diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..853bc0a13 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + # Enable version updates for npm + - package-ecosystem: 'npm' + # Look for `package.json` and `lock` files in the `root` directory + directory: '/' + # Check the npm registry for updates every day (weekdays) + schedule: + interval: 'weekly' + + # Enable version updates for GitHub Actions + - package-ecosystem: 'github-actions' + # Workflow files stored in the default location of `.github/workflows` + # You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`. + directory: '/' + schedule: + interval: 'weekly' diff --git a/.github/workflows/basic-validation.yml b/.github/workflows/basic-validation.yml index 37fa323e6..e93e58009 100644 --- a/.github/workflows/basic-validation.yml +++ b/.github/workflows/basic-validation.yml @@ -16,4 +16,4 @@ jobs: name: Basic validation uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main with: - node-version: '20.x' + node-version: '24.x' diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 509ea6cc7..90ef986ad 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -16,4 +16,4 @@ jobs: name: Check dist/ uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main with: - node-version: '20.x' + node-version: '24.x' diff --git a/.github/workflows/e2e-cache-dependency-path.yml b/.github/workflows/e2e-cache-dependency-path.yml index f276ef312..8b40e99f0 100644 --- a/.github/workflows/e2e-cache-dependency-path.yml +++ b/.github/workflows/e2e-cache-dependency-path.yml @@ -24,13 +24,13 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for gradle uses: ./ id: setup-java with: distribution: 'adopt' - java-version: '11' + java-version: '17' cache: gradle cache-dependency-path: __tests__/cache/gradle1/*.gradle* - name: Create files to cache @@ -51,7 +51,7 @@ jobs: needs: gradle1-save steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for gradle uses: ./ id: setup-java @@ -76,7 +76,7 @@ jobs: needs: gradle1-save steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for gradle uses: ./ id: setup-java diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index 95031dbb1..6df10b578 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -21,16 +21,16 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for gradle uses: ./ id: setup-java with: distribution: 'adopt' - java-version: '11' + java-version: '17' cache: gradle - name: Create files to cache # Need to avoid using Gradle daemon to stabilize the save process on Windows @@ -46,11 +46,11 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-latest] needs: gradle-save steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for gradle uses: ./ id: setup-java @@ -70,10 +70,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for maven uses: ./ id: setup-java @@ -93,11 +93,11 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-latest] needs: maven-save steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for maven uses: ./ id: setup-java @@ -121,10 +121,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-22.04] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for sbt uses: ./ id: setup-java @@ -133,7 +133,7 @@ jobs: java-version: '11' cache: sbt - name: Setup SBT - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-15-intel' run: | echo ""Installing SBT..."" brew install sbt @@ -141,7 +141,7 @@ jobs: run: sbt update - name: Check files to cache on macos-latest - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-15-intel' run: | if [ ! -d ~/Library/Caches/Coursier ]; then echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly" @@ -170,11 +170,11 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-22.04] needs: sbt-save steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run setup-java with the cache for sbt uses: ./ id: setup-java @@ -184,7 +184,7 @@ jobs: cache: sbt - name: Confirm that ~/Library/Caches/Coursier directory has been made - if: matrix.os == 'macos-13' + if: matrix.os == 'macos-15-intel' run: | if [ ! -d ~/Library/Caches/Coursier ]; then echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly" diff --git a/.github/workflows/e2e-local-file.yml b/.github/workflows/e2e-local-file.yml index 9757621ed..92fdf7597 100644 --- a/.github/workflows/e2e-local-file.yml +++ b/.github/workflows/e2e-local-file.yml @@ -21,7 +21,7 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Download Adopt OpenJDK file run: | if ($IsLinux) { @@ -58,7 +58,7 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Download Zulu OpenJDK file run: | if ($IsLinux) { @@ -95,7 +95,7 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Download Eclipse Temurin file run: | if ($IsLinux) { diff --git a/.github/workflows/e2e-publishing.yml b/.github/workflows/e2e-publishing.yml index dd7bd4351..0c0aaafa9 100644 --- a/.github/workflows/e2e-publishing.yml +++ b/.github/workflows/e2e-publishing.yml @@ -25,7 +25,7 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -60,7 +60,7 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create fake settings.xml run: | $xmlDirectory = Join-Path $HOME ".m2" @@ -96,7 +96,7 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create fake settings.xml run: | $xmlDirectory = Join-Path $HOME ".m2" @@ -133,7 +133,7 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index 0553d91a8..845fce16f 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-latest] distribution: [ 'temurin', 'adopt', @@ -30,34 +30,58 @@ jobs: 'microsoft', 'semeru', 'corretto', - 'dragonwell' + 'dragonwell', + 'sapmachine', + 'jetbrains' ] # internally 'adopt-hotspot' is the same as 'adopt' version: ['21', '11', '17'] exclude: - distribution: microsoft version: 8 - distribution: dragonwell - os: macos-13 + os: macos-15-intel include: + - distribution: microsoft + os: windows-latest + version: 25 + - distribution: microsoft + os: ubuntu-latest + version: 25 + - distribution: microsoft + os: macos-latest + version: 25 - distribution: oracle - os: macos-13 + os: macos-15-intel version: 17 - distribution: oracle os: windows-latest - version: 20 + version: 21 - distribution: oracle os: ubuntu-latest - version: 20 - + version: 21 + - distribution: graalvm + os: macos-latest + version: 17.0.12 + - distribution: graalvm + os: windows-latest + version: 21 + - distribution: graalvm + os: ubuntu-latest + version: 21 + - distribution: graalvm + os: ubuntu-latest + version: '24-ea' steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java with: java-version: ${{ matrix.version }} distribution: ${{ matrix.distribution }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Verify Java run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash @@ -78,16 +102,28 @@ jobs: include: - distribution: oracle os: ubuntu-latest - version: '20.0.1' + version: '21.0.4' + - distribution: graalvm + os: ubuntu-latest + version: '21.0.4' - distribution: dragonwell os: ubuntu-latest version: '11.0' - distribution: dragonwell os: ubuntu-latest version: '11.0.13+9' + - distribution: sapmachine + os: ubuntu-latest + version: '17.0.7' + - distribution: jetbrains + os: ubuntu-latest + version: '11.0.11' + - distribution: jetbrains + os: ubuntu-latest + version: '17.0.7' steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -97,6 +133,8 @@ jobs: - name: Verify Java run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} setup-java-check-latest: name: ${{ matrix.distribution }} ${{ matrix.version }} - check-latest flag - ${{ matrix.os }} @@ -106,13 +144,21 @@ jobs: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] - distribution: ['temurin', 'zulu', 'liberica', 'dragonwell'] + distribution: + [ + 'temurin', + 'zulu', + 'liberica', + 'dragonwell', + 'sapmachine', + 'jetbrains' + ] exclude: - distribution: dragonwell os: macos-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -120,6 +166,8 @@ jobs: distribution: ${{ matrix.distribution }} java-version: 11 check-latest: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Verify Java run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}" shell: bash @@ -132,13 +180,21 @@ jobs: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] - distribution: ['temurin', 'zulu', 'liberica', 'dragonwell'] + distribution: + [ + 'temurin', + 'zulu', + 'liberica', + 'dragonwell', + 'sapmachine', + 'jetbrains' + ] exclude: - distribution: dragonwell os: macos-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -147,6 +203,8 @@ jobs: java-version: | 11 17 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Verify Java env variables run: | $versionsArr = "11","17" @@ -154,10 +212,10 @@ jobs: { $envName = "JAVA_HOME_${version}_${env:RUNNER_ARCH}" $JavaVersionPath = [Environment]::GetEnvironmentVariable($envName) - if (-not (Test-Path "$JavaVersionPath")) { + if (-not (Test-Path "$JavaVersionPath")) { Write-Host "$envName is not found" exit 1 - } + } } shell: pwsh - name: Verify Java @@ -171,11 +229,11 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] + os: [macos-15-intel, windows-latest, ubuntu-latest] version: ['17-ea', '15.0.0-ea.14'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -197,7 +255,7 @@ jobs: version: ['17-ea'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -208,6 +266,28 @@ jobs: run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash + setup-java-ea-versions-sapmachine: + name: sapmachine ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} + needs: setup-java-major-minor-versions + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + version: ['17-ea', '21-ea'] + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: setup-java + uses: ./ + id: setup-java + with: + java-version: ${{ matrix.version }} + distribution: sapmachine + - name: Verify Java + run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" + shell: bash + setup-java-custom-package-type: name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} needs: setup-java-major-minor-versions @@ -215,8 +295,9 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, windows-latest, ubuntu-latest] - distribution: ['temurin', 'zulu', 'liberica', 'semeru'] + os: [macos-15-intel, windows-latest, ubuntu-latest] + distribution: + ['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains'] java-package: ['jre'] version: ['17.0'] include: @@ -240,9 +321,50 @@ jobs: java-package: jre version: '8' os: windows-latest + - distribution: 'jetbrains' + java-package: jdk+jcef + version: '11' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jdk+jcef + version: '17' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jdk+jcef + version: '21' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jre+jcef + version: '11' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jre+jcef + version: '17' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jre+jcef + version: '21' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jdk+ft + version: '17' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jdk+ft + version: '21' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jre+ft + version: '17' + os: ubuntu-latest + - distribution: 'jetbrains' + java-package: jre+ft + version: '21' + os: ubuntu-latest + steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -250,6 +372,8 @@ jobs: java-version: ${{ matrix.version }} java-package: ${{ matrix.java-package }} distribution: ${{ matrix.distribution }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Verify Java run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash @@ -263,12 +387,12 @@ jobs: fail-fast: false matrix: # x86 is not supported on macOS - os: [windows-latest, ubuntu-latest] + os: [windows-latest, ubuntu-22.04] distribution: ['liberica', 'zulu', 'corretto'] version: ['11'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: setup-java uses: ./ id: setup-java @@ -291,7 +415,7 @@ jobs: java-version-file: ['.java-version', '.tool-versions'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create .java-version file shell: bash run: echo "17" > .java-version @@ -320,7 +444,7 @@ jobs: java-version-file: ['.java-version', '.tool-versions'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create .java-version file shell: bash run: echo "11" > .java-version @@ -348,7 +472,7 @@ jobs: java-version-file: ['.java-version', '.tool-versions'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create .java-version file shell: bash run: echo "17.0.10" > .java-version @@ -366,23 +490,26 @@ jobs: shell: bash setup-java-version-from-file-major-minor-patch-with-dist: - name: ${{ matrix.distribution }} version from file 'openjdk64-17.0.10' - ${{ matrix.os }} + name: ${{ matrix.distribution }} version from file '${{ matrix.java-version-file }}' - ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] distribution: ['adopt', 'zulu', 'liberica'] - java-version-file: ['.java-version', '.tool-versions'] + java-version-file: ['.java-version', '.tool-versions', '.sdkmanrc'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create .java-version file shell: bash run: echo "openjdk64-17.0.10" > .java-version - name: Create .tool-versions file shell: bash run: echo "java openjdk64-17.0.10" > .tool-versions + - name: Create .sdkmanrc file + shell: bash + run: echo "java=17.0.10-tem" > .sdkmanrc - name: setup-java uses: ./ id: setup-java diff --git a/.github/workflows/publish-immutable-actions.yml b/.github/workflows/publish-immutable-actions.yml new file mode 100644 index 000000000..bfe592049 --- /dev/null +++ b/.github/workflows/publish-immutable-actions.yml @@ -0,0 +1,21 @@ +name: 'Publish Immutable Action Version' + +on: + release: + types: [released] + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + packages: write + + steps: + - name: Checking out + uses: actions/checkout@v6 + - name: Publish + id: publish + uses: actions/publish-immutable-action@v0.0.4 diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index e584e46f6..25192b640 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Update the ${{ env.TAG_NAME }} tag id: update-major-tag - uses: actions/publish-action@v0.2.2 + uses: actions/publish-action@v0.4.0 with: source-tag: ${{ env.TAG_NAME }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.licensed.yml b/.licensed.yml index e97382c4d..012638854 100644 --- a/.licensed.yml +++ b/.licensed.yml @@ -12,4 +12,5 @@ allowed: - unlicense reviewed: - npm: \ No newline at end of file + npm: + - "@actions/http-client" # MIT (license text present), but detected as "other" \ No newline at end of file diff --git a/.licenses/npm/@actions/cache.dep.yml b/.licenses/npm/@actions/cache.dep.yml index b37997fc1..8da40e4e9 100644 --- a/.licenses/npm/@actions/cache.dep.yml +++ b/.licenses/npm/@actions/cache.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/cache" -version: 3.2.4 +version: 5.0.1 type: npm summary: Actions cache lib homepage: https://github.com/actions/toolkit/tree/main/packages/cache diff --git a/.licenses/npm/@actions/core.dep.yml b/.licenses/npm/@actions/core-1.11.1.dep.yml similarity index 98% rename from .licenses/npm/@actions/core.dep.yml rename to .licenses/npm/@actions/core-1.11.1.dep.yml index 06638c01d..09e099f71 100644 --- a/.licenses/npm/@actions/core.dep.yml +++ b/.licenses/npm/@actions/core-1.11.1.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/core" -version: 1.10.1 +version: 1.11.1 type: npm summary: Actions core lib homepage: https://github.com/actions/toolkit/tree/main/packages/core diff --git a/.licenses/npm/@actions/glob-0.4.0.dep.yml b/.licenses/npm/@actions/core-2.0.1.dep.yml similarity index 94% rename from .licenses/npm/@actions/glob-0.4.0.dep.yml rename to .licenses/npm/@actions/core-2.0.1.dep.yml index 137541859..eb49b54d0 100644 --- a/.licenses/npm/@actions/glob-0.4.0.dep.yml +++ b/.licenses/npm/@actions/core-2.0.1.dep.yml @@ -1,9 +1,9 @@ --- -name: "@actions/glob" -version: 0.4.0 +name: "@actions/core" +version: 2.0.1 type: npm -summary: Actions glob lib -homepage: https://github.com/actions/toolkit/tree/main/packages/glob +summary: Actions core lib +homepage: https://github.com/actions/toolkit/tree/main/packages/core license: mit licenses: - sources: LICENSE.md diff --git a/.licenses/npm/@actions/exec.dep.yml b/.licenses/npm/@actions/exec-1.1.1.dep.yml similarity index 100% rename from .licenses/npm/@actions/exec.dep.yml rename to .licenses/npm/@actions/exec-1.1.1.dep.yml diff --git a/.licenses/npm/uuid-8.3.2.dep.yml b/.licenses/npm/@actions/exec-2.0.0.dep.yml similarity index 85% rename from .licenses/npm/uuid-8.3.2.dep.yml rename to .licenses/npm/@actions/exec-2.0.0.dep.yml index bf84da082..132d5859d 100644 --- a/.licenses/npm/uuid-8.3.2.dep.yml +++ b/.licenses/npm/@actions/exec-2.0.0.dep.yml @@ -1,16 +1,16 @@ --- -name: uuid -version: 8.3.2 +name: "@actions/exec" +version: 2.0.0 type: npm -summary: RFC4122 (v1, v4, and v5) UUIDs -homepage: https://github.com/uuidjs/uuid#readme +summary: Actions exec lib +homepage: https://github.com/actions/toolkit/tree/main/packages/exec license: mit licenses: - sources: LICENSE.md - text: | + text: |- The MIT License (MIT) - Copyright (c) 2010-2020 Robert Kieffer and other contributors + Copyright 2019 GitHub 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: diff --git a/.licenses/npm/@actions/glob-0.1.2.dep.yml b/.licenses/npm/@actions/glob.dep.yml similarity index 98% rename from .licenses/npm/@actions/glob-0.1.2.dep.yml rename to .licenses/npm/@actions/glob.dep.yml index becb37de2..f7bf0793a 100644 --- a/.licenses/npm/@actions/glob-0.1.2.dep.yml +++ b/.licenses/npm/@actions/glob.dep.yml @@ -1,6 +1,6 @@ --- name: "@actions/glob" -version: 0.1.2 +version: 0.5.0 type: npm summary: Actions glob lib homepage: https://github.com/actions/toolkit/tree/main/packages/glob diff --git a/.licenses/npm/@actions/http-client.dep.yml b/.licenses/npm/@actions/http-client-2.2.3.dep.yml similarity index 97% rename from .licenses/npm/@actions/http-client.dep.yml rename to .licenses/npm/@actions/http-client-2.2.3.dep.yml index cdccff4e1..1ae400a62 100644 --- a/.licenses/npm/@actions/http-client.dep.yml +++ b/.licenses/npm/@actions/http-client-2.2.3.dep.yml @@ -1,10 +1,10 @@ --- name: "@actions/http-client" -version: 2.2.1 +version: 2.2.3 type: npm summary: Actions Http Client homepage: https://github.com/actions/toolkit/tree/main/packages/http-client -license: mit +license: other licenses: - sources: LICENSE text: | diff --git a/.licenses/npm/@actions/http-client-3.0.0.dep.yml b/.licenses/npm/@actions/http-client-3.0.0.dep.yml new file mode 100644 index 000000000..52aa45336 --- /dev/null +++ b/.licenses/npm/@actions/http-client-3.0.0.dep.yml @@ -0,0 +1,32 @@ +--- +name: "@actions/http-client" +version: 3.0.0 +type: npm +summary: Actions Http Client +homepage: https://github.com/actions/toolkit/tree/main/packages/http-client +license: other +licenses: +- sources: LICENSE + text: | + Actions Http Client for Node.js + + Copyright (c) GitHub, Inc. + + All rights reserved. + + MIT License + + 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. +notices: [] diff --git a/.licenses/npm/@actions/io.dep.yml b/.licenses/npm/@actions/io-1.1.3.dep.yml similarity index 100% rename from .licenses/npm/@actions/io.dep.yml rename to .licenses/npm/@actions/io-1.1.3.dep.yml diff --git a/.licenses/npm/@actions/io-2.0.0.dep.yml b/.licenses/npm/@actions/io-2.0.0.dep.yml new file mode 100644 index 000000000..2707c519b --- /dev/null +++ b/.licenses/npm/@actions/io-2.0.0.dep.yml @@ -0,0 +1,20 @@ +--- +name: "@actions/io" +version: 2.0.0 +type: npm +summary: Actions io lib +homepage: https://github.com/actions/toolkit/tree/main/packages/io +license: mit +licenses: +- sources: LICENSE.md + text: |- + The MIT License (MIT) + + Copyright 2019 GitHub + + 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. +notices: [] diff --git a/.licenses/npm/@azure/abort-controller.dep.yml b/.licenses/npm/@azure/abort-controller-1.1.0.dep.yml similarity index 100% rename from .licenses/npm/@azure/abort-controller.dep.yml rename to .licenses/npm/@azure/abort-controller-1.1.0.dep.yml diff --git a/.licenses/npm/asynckit.dep.yml b/.licenses/npm/@azure/abort-controller-2.1.2.dep.yml similarity index 82% rename from .licenses/npm/asynckit.dep.yml rename to .licenses/npm/@azure/abort-controller-2.1.2.dep.yml index 905e0aaa9..934bd3bfa 100644 --- a/.licenses/npm/asynckit.dep.yml +++ b/.licenses/npm/@azure/abort-controller-2.1.2.dep.yml @@ -1,16 +1,16 @@ --- -name: asynckit -version: 0.4.0 +name: "@azure/abort-controller" +version: 2.1.2 type: npm -summary: Minimal async jobs utility library, with streams support -homepage: https://github.com/alexindigo/asynckit#readme +summary: Microsoft Azure SDK for JavaScript - Aborter +homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md license: mit licenses: - sources: LICENSE text: | The MIT License (MIT) - Copyright (c) 2016 Alex Indigo + Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29,6 +29,4 @@ licenses: 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. -- sources: README.md - text: AsyncKit is licensed under the MIT license. notices: [] diff --git a/.licenses/npm/@azure/core-auth.dep.yml b/.licenses/npm/@azure/core-auth.dep.yml index 85f1bb89b..193d51d60 100644 --- a/.licenses/npm/@azure/core-auth.dep.yml +++ b/.licenses/npm/@azure/core-auth.dep.yml @@ -1,6 +1,6 @@ --- name: "@azure/core-auth" -version: 1.5.0 +version: 1.10.1 type: npm summary: Provides low-level interfaces and helper methods for authentication in Azure SDK @@ -9,9 +9,9 @@ license: mit licenses: - sources: LICENSE text: | - The MIT License (MIT) + Copyright (c) Microsoft Corporation. - Copyright (c) 2020 Microsoft + MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,7 @@ licenses: 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 + 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 diff --git a/.licenses/npm/@azure/core-client.dep.yml b/.licenses/npm/@azure/core-client.dep.yml new file mode 100644 index 000000000..410915353 --- /dev/null +++ b/.licenses/npm/@azure/core-client.dep.yml @@ -0,0 +1,32 @@ +--- +name: "@azure/core-client" +version: 1.10.1 +type: npm +summary: Core library for interfacing with AutoRest generated code +homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/ +license: mit +licenses: +- sources: LICENSE + text: | + Copyright (c) Microsoft Corporation. + + MIT License + + 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. +notices: [] diff --git a/.licenses/npm/@azure/core-http-compat.dep.yml b/.licenses/npm/@azure/core-http-compat.dep.yml new file mode 100644 index 000000000..1f0f6521f --- /dev/null +++ b/.licenses/npm/@azure/core-http-compat.dep.yml @@ -0,0 +1,32 @@ +--- +name: "@azure/core-http-compat" +version: 2.3.1 +type: npm +summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages. +homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/ +license: mit +licenses: +- sources: LICENSE + text: | + Copyright (c) Microsoft Corporation. + + MIT License + + 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. +notices: [] diff --git a/.licenses/npm/@azure/core-lro.dep.yml b/.licenses/npm/@azure/core-lro.dep.yml index 29683014c..46cbe6e51 100644 --- a/.licenses/npm/@azure/core-lro.dep.yml +++ b/.licenses/npm/@azure/core-lro.dep.yml @@ -1,6 +1,6 @@ --- name: "@azure/core-lro" -version: 2.5.4 +version: 2.7.2 type: npm summary: Isomorphic client library for supporting long-running operations in node.js and browser. diff --git a/.licenses/npm/@azure/core-paging.dep.yml b/.licenses/npm/@azure/core-paging.dep.yml index dccc04820..cc3160584 100644 --- a/.licenses/npm/@azure/core-paging.dep.yml +++ b/.licenses/npm/@azure/core-paging.dep.yml @@ -1,6 +1,6 @@ --- name: "@azure/core-paging" -version: 1.5.0 +version: 1.6.2 type: npm summary: Core types for paging async iterable iterators homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md diff --git a/.licenses/npm/@azure/core-rest-pipeline.dep.yml b/.licenses/npm/@azure/core-rest-pipeline.dep.yml new file mode 100644 index 000000000..7b3b7e6a9 --- /dev/null +++ b/.licenses/npm/@azure/core-rest-pipeline.dep.yml @@ -0,0 +1,32 @@ +--- +name: "@azure/core-rest-pipeline" +version: 1.22.2 +type: npm +summary: Isomorphic client library for making HTTP requests in node.js and browser. +homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/ +license: mit +licenses: +- sources: LICENSE + text: | + Copyright (c) Microsoft Corporation. + + MIT License + + 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. +notices: [] diff --git a/.licenses/npm/@azure/core-tracing.dep.yml b/.licenses/npm/@azure/core-tracing.dep.yml index a4649e886..71f7b7f09 100644 --- a/.licenses/npm/@azure/core-tracing.dep.yml +++ b/.licenses/npm/@azure/core-tracing.dep.yml @@ -1,6 +1,6 @@ --- name: "@azure/core-tracing" -version: 1.0.0-preview.13 +version: 1.3.1 type: npm summary: Provides low-level interfaces and helper methods for tracing in Azure SDK homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-tracing/README.md @@ -8,9 +8,9 @@ license: mit licenses: - sources: LICENSE text: | - The MIT License (MIT) + Copyright (c) Microsoft Corporation. - Copyright (c) 2020 Microsoft + MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ licenses: 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 + 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 diff --git a/.licenses/npm/@azure/core-util.dep.yml b/.licenses/npm/@azure/core-util.dep.yml index 75ffb250f..a05648544 100644 --- a/.licenses/npm/@azure/core-util.dep.yml +++ b/.licenses/npm/@azure/core-util.dep.yml @@ -1,6 +1,6 @@ --- name: "@azure/core-util" -version: 1.6.1 +version: 1.13.1 type: npm summary: Core library for shared utility methods homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/ @@ -8,9 +8,9 @@ license: mit licenses: - sources: LICENSE text: | - The MIT License (MIT) + Copyright (c) Microsoft Corporation. - Copyright (c) 2020 Microsoft + MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ licenses: 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 + 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 diff --git a/.licenses/npm/@azure/core-xml.dep.yml b/.licenses/npm/@azure/core-xml.dep.yml new file mode 100644 index 000000000..b82ec6d5b --- /dev/null +++ b/.licenses/npm/@azure/core-xml.dep.yml @@ -0,0 +1,32 @@ +--- +name: "@azure/core-xml" +version: 1.5.0 +type: npm +summary: Core library for interacting with XML payloads +homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/ +license: mit +licenses: +- sources: LICENSE + text: | + Copyright (c) Microsoft Corporation. + + MIT License + + 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. +notices: [] diff --git a/.licenses/npm/@azure/logger.dep.yml b/.licenses/npm/@azure/logger.dep.yml index 971ba001c..065ecaa55 100644 --- a/.licenses/npm/@azure/logger.dep.yml +++ b/.licenses/npm/@azure/logger.dep.yml @@ -1,6 +1,6 @@ --- name: "@azure/logger" -version: 1.0.4 +version: 1.3.0 type: npm summary: Microsoft Azure SDK for JavaScript - Logger homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger/README.md @@ -8,9 +8,9 @@ license: mit licenses: - sources: LICENSE text: | - The MIT License (MIT) + Copyright (c) Microsoft Corporation. - Copyright (c) 2020 Microsoft + MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ licenses: 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 + 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 diff --git a/.licenses/npm/@azure/ms-rest-js.dep.yml b/.licenses/npm/@azure/ms-rest-js.dep.yml deleted file mode 100644 index 762fcdb1e..000000000 --- a/.licenses/npm/@azure/ms-rest-js.dep.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: "@azure/ms-rest-js" -version: 2.7.0 -type: npm -summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client - libraries generated using AutoRest -homepage: https://github.com/Azure/ms-rest-js -license: mit -licenses: -- sources: LICENSE - text: |2 - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE -notices: [] diff --git a/.licenses/npm/@azure/storage-blob.dep.yml b/.licenses/npm/@azure/storage-blob.dep.yml index c1a125164..d0cb028fa 100644 --- a/.licenses/npm/@azure/storage-blob.dep.yml +++ b/.licenses/npm/@azure/storage-blob.dep.yml @@ -1,6 +1,6 @@ --- name: "@azure/storage-blob" -version: 12.17.0 +version: 12.29.1 type: npm summary: Microsoft Azure Storage SDK for JavaScript - Blob homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/ @@ -8,9 +8,9 @@ license: mit licenses: - sources: LICENSE text: | - The MIT License (MIT) + Copyright (c) Microsoft Corporation. - Copyright (c) 2020 Microsoft + MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ licenses: 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 + 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 diff --git a/.licenses/npm/@azure/core-http.dep.yml b/.licenses/npm/@azure/storage-common.dep.yml similarity index 84% rename from .licenses/npm/@azure/core-http.dep.yml rename to .licenses/npm/@azure/storage-common.dep.yml index 6a443e75c..fc3370913 100644 --- a/.licenses/npm/@azure/core-http.dep.yml +++ b/.licenses/npm/@azure/storage-common.dep.yml @@ -1,17 +1,16 @@ --- -name: "@azure/core-http" -version: 3.0.4 +name: "@azure/storage-common" +version: 12.1.1 type: npm -summary: Isomorphic client Runtime for Typescript/node.js/browser javascript client - libraries generated using AutoRest -homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-http/README.md +summary: Azure Storage Common Client Library for JavaScript +homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-internal-avro/ license: mit licenses: - sources: LICENSE - text: | + text: |- The MIT License (MIT) - Copyright (c) 2020 Microsoft + Copyright (c) 2018 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/.licenses/npm/@opentelemetry/api.dep.yml b/.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml similarity index 83% rename from .licenses/npm/@opentelemetry/api.dep.yml rename to .licenses/npm/@protobuf-ts/runtime-rpc.dep.yml index 74c3159ad..79644b5d7 100644 --- a/.licenses/npm/@opentelemetry/api.dep.yml +++ b/.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml @@ -1,14 +1,14 @@ --- -name: "@opentelemetry/api" -version: 1.7.0 +name: "@protobuf-ts/runtime-rpc" +version: 2.11.1 type: npm -summary: Public API for OpenTelemetry -homepage: https://github.com/open-telemetry/opentelemetry-js/tree/main/api +summary: Runtime library for RPC clients generated by the protoc plugin "protobuf-ts" +homepage: https://github.com/timostamm/protobuf-ts license: apache-2.0 licenses: - sources: LICENSE text: |2 - Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -182,42 +182,4 @@ licenses: 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. -- sources: README.md - text: |- - Apache 2.0 - See [LICENSE][license-url] for more information. - - [opentelemetry-js]: https://github.com/open-telemetry/opentelemetry-js - - [discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions - [license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE - [license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat - [docs-tracing]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/tracing.md - [docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/sdk-registration.md notices: [] diff --git a/.licenses/npm/@protobuf-ts/runtime.dep.yml b/.licenses/npm/@protobuf-ts/runtime.dep.yml new file mode 100644 index 000000000..7a210232d --- /dev/null +++ b/.licenses/npm/@protobuf-ts/runtime.dep.yml @@ -0,0 +1,185 @@ +--- +name: "@protobuf-ts/runtime" +version: 2.11.1 +type: npm +summary: Runtime library for code generated by the protoc plugin "protobuf-ts" +homepage: https://github.com/timostamm/protobuf-ts +license: apache-2.0 +licenses: +- sources: LICENSE + text: |2 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + 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. +notices: [] diff --git a/.licenses/npm/@types/node-fetch.dep.yml b/.licenses/npm/@types/node-fetch.dep.yml deleted file mode 100644 index e335d29a1..000000000 --- a/.licenses/npm/@types/node-fetch.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: "@types/node-fetch" -version: 2.6.9 -type: npm -summary: TypeScript definitions for node-fetch -homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-fetch -license: mit -licenses: -- sources: LICENSE - text: |2 - MIT License - - Copyright (c) Microsoft Corporation. - - 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 -notices: [] diff --git a/.licenses/npm/@types/node.dep.yml b/.licenses/npm/@types/node.dep.yml index 06fb919df..86544f488 100644 --- a/.licenses/npm/@types/node.dep.yml +++ b/.licenses/npm/@types/node.dep.yml @@ -1,6 +1,6 @@ --- name: "@types/node" -version: 20.11.24 +version: 24.1.0 type: npm summary: TypeScript definitions for node homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node diff --git a/.licenses/npm/@types/tunnel.dep.yml b/.licenses/npm/@types/tunnel.dep.yml deleted file mode 100644 index b3636b02d..000000000 --- a/.licenses/npm/@types/tunnel.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: "@types/tunnel" -version: 0.0.3 -type: npm -summary: TypeScript definitions for tunnel -homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tunnel -license: mit -licenses: -- sources: LICENSE - text: |2 - MIT License - - Copyright (c) Microsoft Corporation. - - 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 -notices: [] diff --git a/.licenses/npm/@typespec/ts-http-runtime.dep.yml b/.licenses/npm/@typespec/ts-http-runtime.dep.yml new file mode 100644 index 000000000..4b4764430 --- /dev/null +++ b/.licenses/npm/@typespec/ts-http-runtime.dep.yml @@ -0,0 +1,32 @@ +--- +name: "@typespec/ts-http-runtime" +version: 0.3.2 +type: npm +summary: Isomorphic client library for making HTTP requests in node.js and browser. +homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/ts-http-runtime/ +license: mit +licenses: +- sources: LICENSE + text: | + Copyright (c) Microsoft Corporation. + + MIT License + + 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. +notices: [] diff --git a/.licenses/npm/process.dep.yml b/.licenses/npm/agent-base.dep.yml similarity index 84% rename from .licenses/npm/process.dep.yml rename to .licenses/npm/agent-base.dep.yml index 2bf50598a..54c324a34 100644 --- a/.licenses/npm/process.dep.yml +++ b/.licenses/npm/agent-base.dep.yml @@ -1,16 +1,16 @@ --- -name: process -version: 0.11.10 +name: agent-base +version: 7.1.4 type: npm -summary: process information for node.js and browsers -homepage: https://github.com/shtylman/node-process#readme +summary: Turn a function into an `http.Agent` instance +homepage: license: mit licenses: - sources: LICENSE - text: | + text: |- (The MIT License) - Copyright (c) 2013 Roman Shtylman + Copyright (c) 2013 Nathan Rajlich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/.licenses/npm/brace-expansion.dep.yml b/.licenses/npm/brace-expansion.dep.yml index 8fa6cfb31..95ca8eb1f 100644 --- a/.licenses/npm/brace-expansion.dep.yml +++ b/.licenses/npm/brace-expansion.dep.yml @@ -1,6 +1,6 @@ --- name: brace-expansion -version: 1.1.11 +version: 1.1.12 type: npm summary: Brace expansion as known from sh/bash homepage: https://github.com/juliangruber/brace-expansion diff --git a/.licenses/npm/combined-stream.dep.yml b/.licenses/npm/combined-stream.dep.yml deleted file mode 100644 index 2b392155d..000000000 --- a/.licenses/npm/combined-stream.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: combined-stream -version: 1.0.8 -type: npm -summary: A stream that emits multiple other streams one after another. -homepage: https://github.com/felixge/node-combined-stream -license: mit -licenses: -- sources: License - text: | - Copyright (c) 2011 Debuggable Limited - - 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. -- sources: Readme.md - text: combined-stream is licensed under the MIT license. -notices: [] diff --git a/.licenses/npm/debug.dep.yml b/.licenses/npm/debug.dep.yml new file mode 100644 index 000000000..b9b723389 --- /dev/null +++ b/.licenses/npm/debug.dep.yml @@ -0,0 +1,56 @@ +--- +name: debug +version: 4.3.4 +type: npm +summary: Lightweight debugging utility for Node.js and the browser +homepage: +license: mit +licenses: +- sources: LICENSE + text: |+ + (The MIT License) + + Copyright (c) 2014-2017 TJ Holowaychuk + Copyright (c) 2018-2021 Josh Junon + + 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. + +- sources: README.md + text: |- + (The MIT License) + + Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> + Copyright (c) 2018-2021 Josh Junon + + 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. +notices: [] diff --git a/.licenses/npm/delayed-stream.dep.yml b/.licenses/npm/delayed-stream.dep.yml deleted file mode 100644 index 124012173..000000000 --- a/.licenses/npm/delayed-stream.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: delayed-stream -version: 1.0.0 -type: npm -summary: Buffers events from a stream until you are ready to handle them. -homepage: https://github.com/felixge/node-delayed-stream -license: mit -licenses: -- sources: License - text: | - Copyright (c) 2011 Debuggable Limited - - 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. -- sources: Readme.md - text: delayed-stream is licensed under the MIT license. -notices: [] diff --git a/.licenses/npm/abort-controller.dep.yml b/.licenses/npm/fast-xml-parser.dep.yml similarity index 81% rename from .licenses/npm/abort-controller.dep.yml rename to .licenses/npm/fast-xml-parser.dep.yml index 492a609bb..77eec1e10 100644 --- a/.licenses/npm/abort-controller.dep.yml +++ b/.licenses/npm/fast-xml-parser.dep.yml @@ -1,16 +1,16 @@ --- -name: abort-controller -version: 3.0.0 +name: fast-xml-parser +version: 5.3.3 type: npm -summary: An implementation of WHATWG AbortController interface. -homepage: https://github.com/mysticatea/abort-controller#readme +summary: Validate XML, Parse XML, Build XML without C/C++ based libraries +homepage: license: mit licenses: - sources: LICENSE text: | MIT License - Copyright (c) 2017 Toru Nagashima + Copyright (c) 2017 Amit Kumar Gupta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29,4 +29,9 @@ licenses: 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. +- sources: README.md + text: |- + * MIT License + + ![Donate $5](static/img/donation_quote.png) notices: [] diff --git a/.licenses/npm/form-data-2.5.1.dep.yml b/.licenses/npm/form-data-2.5.1.dep.yml deleted file mode 100644 index 000f2223a..000000000 --- a/.licenses/npm/form-data-2.5.1.dep.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: form-data -version: 2.5.1 -type: npm -summary: A library to create readable "multipart/form-data" streams. Can be used to - submit forms and file uploads to other web applications. -homepage: https://github.com/form-data/form-data#readme -license: mit -licenses: -- sources: License - text: | - Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: README.md - text: Form-Data is released under the [MIT](License) license. -notices: [] diff --git a/.licenses/npm/form-data-4.0.0.dep.yml b/.licenses/npm/form-data-4.0.0.dep.yml deleted file mode 100644 index ced7212cc..000000000 --- a/.licenses/npm/form-data-4.0.0.dep.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: form-data -version: 4.0.0 -type: npm -summary: A library to create readable "multipart/form-data" streams. Can be used to - submit forms and file uploads to other web applications. -homepage: https://github.com/form-data/form-data#readme -license: mit -licenses: -- sources: License - text: | - Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -- sources: Readme.md - text: Form-Data is released under the [MIT](License) license. -notices: [] diff --git a/.licenses/npm/mime-db.dep.yml b/.licenses/npm/http-proxy-agent.dep.yml similarity index 85% rename from .licenses/npm/mime-db.dep.yml rename to .licenses/npm/http-proxy-agent.dep.yml index 660566950..bcd275739 100644 --- a/.licenses/npm/mime-db.dep.yml +++ b/.licenses/npm/http-proxy-agent.dep.yml @@ -1,8 +1,8 @@ --- -name: mime-db -version: 1.52.0 +name: http-proxy-agent +version: 7.0.2 type: npm -summary: Media Type Database +summary: An HTTP(s) proxy `http.Agent` implementation for HTTP homepage: license: mit licenses: @@ -10,8 +10,7 @@ licenses: text: | (The MIT License) - Copyright (c) 2014 Jonathan Ong - Copyright (c) 2015-2022 Douglas Christopher Wilson + Copyright (c) 2013 Nathan Rajlich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/.licenses/npm/mime-types.dep.yml b/.licenses/npm/https-proxy-agent.dep.yml similarity index 57% rename from .licenses/npm/mime-types.dep.yml rename to .licenses/npm/https-proxy-agent.dep.yml index 832d2052d..7b6e176d7 100644 --- a/.licenses/npm/mime-types.dep.yml +++ b/.licenses/npm/https-proxy-agent.dep.yml @@ -1,17 +1,16 @@ --- -name: mime-types -version: 2.1.35 +name: https-proxy-agent +version: 7.0.6 type: npm -summary: The ultimate javascript content-type utility. +summary: An HTTP(s) proxy `http.Agent` implementation for HTTPS homepage: license: mit licenses: - sources: LICENSE - text: | + text: |- (The MIT License) - Copyright (c) 2014 Jonathan Ong - Copyright (c) 2015 Douglas Christopher Wilson + Copyright (c) 2013 Nathan Rajlich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -31,17 +30,4 @@ licenses: 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. -- sources: README.md - text: |- - [MIT](LICENSE) - - [ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci - [ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml - [coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master - [coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master - [node-version-image]: https://badgen.net/npm/node/mime-types - [node-version-url]: https://nodejs.org/en/download - [npm-downloads-image]: https://badgen.net/npm/dm/mime-types - [npm-url]: https://npmjs.org/package/mime-types - [npm-version-image]: https://badgen.net/npm/v/mime-types notices: [] diff --git a/.licenses/npm/lru-cache.dep.yml b/.licenses/npm/lru-cache.dep.yml deleted file mode 100644 index 920e7dc58..000000000 --- a/.licenses/npm/lru-cache.dep.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: lru-cache -version: 6.0.0 -type: npm -summary: A cache object that deletes the least-recently-used items. -homepage: https://github.com/isaacs/node-lru-cache#readme -license: isc -licenses: -- sources: LICENSE - text: | - The ISC License - - Copyright (c) Isaac Z. Schlueter and Contributors - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -notices: [] diff --git a/.licenses/npm/event-target-shim.dep.yml b/.licenses/npm/ms.dep.yml similarity index 83% rename from .licenses/npm/event-target-shim.dep.yml rename to .licenses/npm/ms.dep.yml index 7a3fc011b..ac3c8eb15 100644 --- a/.licenses/npm/event-target-shim.dep.yml +++ b/.licenses/npm/ms.dep.yml @@ -1,16 +1,16 @@ --- -name: event-target-shim -version: 5.0.1 +name: ms +version: 2.1.2 type: npm -summary: An implementation of WHATWG EventTarget interface. -homepage: https://github.com/mysticatea/event-target-shim +summary: Tiny millisecond conversion utility +homepage: license: mit licenses: -- sources: LICENSE - text: |+ +- sources: license.md + text: | The MIT License (MIT) - Copyright (c) 2015 Toru Nagashima + Copyright (c) 2016 Zeit, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29,5 +29,4 @@ licenses: 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. - notices: [] diff --git a/.licenses/npm/node-fetch.dep.yml b/.licenses/npm/node-fetch.dep.yml deleted file mode 100644 index ec9a760d2..000000000 --- a/.licenses/npm/node-fetch.dep.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: node-fetch -version: 2.7.0 -type: npm -summary: A light-weight module that brings window.fetch to node.js -homepage: https://github.com/bitinn/node-fetch -license: mit -licenses: -- sources: LICENSE.md - text: |+ - The MIT License (MIT) - - Copyright (c) 2016 David Frank - - 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. - -- sources: README.md - text: |- - MIT - - [npm-image]: https://flat.badgen.net/npm/v/node-fetch - [npm-url]: https://www.npmjs.com/package/node-fetch - [travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch - [travis-url]: https://travis-ci.org/bitinn/node-fetch - [codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master - [codecov-url]: https://codecov.io/gh/bitinn/node-fetch - [install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch - [install-size-url]: https://packagephobia.now.sh/result?p=node-fetch - [discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square - [discord-url]: https://discord.gg/Zxbndcm - [opencollective-image]: https://opencollective.com/node-fetch/backers.svg - [opencollective-url]: https://opencollective.com/node-fetch - [whatwg-fetch]: https://fetch.spec.whatwg.org/ - [response-init]: https://fetch.spec.whatwg.org/#responseinit - [node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams - [mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers - [LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md - [ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md - [UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md -notices: [] diff --git a/.licenses/npm/sax.dep.yml b/.licenses/npm/sax.dep.yml deleted file mode 100644 index 20f6c4671..000000000 --- a/.licenses/npm/sax.dep.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -name: sax -version: 1.3.0 -type: npm -summary: An evented streaming XML parser in JavaScript -homepage: -license: isc -licenses: -- sources: LICENSE - text: | - The ISC License - - Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ==== - - `String.fromCodePoint` by Mathias Bynens used according to terms of MIT - License, as follows: - - Copyright (c) 2010-2022 Mathias Bynens - - 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. -notices: [] diff --git a/.licenses/npm/semver-7.6.0.dep.yml b/.licenses/npm/semver-7.7.1.dep.yml similarity index 98% rename from .licenses/npm/semver-7.6.0.dep.yml rename to .licenses/npm/semver-7.7.1.dep.yml index bd631be07..3194cf4ae 100644 --- a/.licenses/npm/semver-7.6.0.dep.yml +++ b/.licenses/npm/semver-7.7.1.dep.yml @@ -1,6 +1,6 @@ --- name: semver -version: 7.6.0 +version: 7.7.1 type: npm summary: The semantic version parser used by npm. homepage: diff --git a/.licenses/npm/tr46.dep.yml b/.licenses/npm/strnum.dep.yml similarity index 86% rename from .licenses/npm/tr46.dep.yml rename to .licenses/npm/strnum.dep.yml index 3bacc6ec4..3aa1cde76 100644 --- a/.licenses/npm/tr46.dep.yml +++ b/.licenses/npm/strnum.dep.yml @@ -1,15 +1,17 @@ --- -name: tr46 -version: 0.0.3 +name: strnum +version: 2.1.2 type: npm -summary: An implementation of the Unicode TR46 spec -homepage: https://github.com/Sebmaster/tr46.js#readme +summary: Parse String to Number based on configuration +homepage: license: mit licenses: -- sources: Auto-generated MIT license text +- sources: LICENSE text: | MIT License + Copyright (c) 2021 Natural Intelligence + 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 diff --git a/.licenses/npm/tslib-1.14.1.dep.yml b/.licenses/npm/tslib-1.14.1.dep.yml deleted file mode 100644 index 10b2c2ac1..000000000 --- a/.licenses/npm/tslib-1.14.1.dep.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: tslib -version: 1.14.1 -type: npm -summary: Runtime library for TypeScript helper functions -homepage: https://www.typescriptlang.org/ -license: 0bsd -licenses: -- sources: LICENSE.txt - text: |- - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. -notices: -- sources: CopyrightNotice.txt - text: "/*! *****************************************************************************\r\nCopyright - (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute - this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE - SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD - TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR - CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS - SOFTWARE.\r\n***************************************************************************** - */" diff --git a/.licenses/npm/tslib-2.6.2.dep.yml b/.licenses/npm/tslib.dep.yml similarity index 98% rename from .licenses/npm/tslib-2.6.2.dep.yml rename to .licenses/npm/tslib.dep.yml index 427097a71..4611137ca 100644 --- a/.licenses/npm/tslib-2.6.2.dep.yml +++ b/.licenses/npm/tslib.dep.yml @@ -1,6 +1,6 @@ --- name: tslib -version: 2.6.2 +version: 2.8.1 type: npm summary: Runtime library for TypeScript helper functions homepage: https://www.typescriptlang.org/ diff --git a/.licenses/npm/undici-types.dep.yml b/.licenses/npm/undici-types.dep.yml index a65b8affc..370219bfa 100644 --- a/.licenses/npm/undici-types.dep.yml +++ b/.licenses/npm/undici-types.dep.yml @@ -1,15 +1,17 @@ --- name: undici-types -version: 5.26.5 +version: 7.8.0 type: npm summary: A stand-alone types package for Undici homepage: https://undici.nodejs.org license: mit licenses: -- sources: Auto-generated MIT license text +- sources: LICENSE text: | MIT License + Copyright (c) Matteo Collina and Undici contributors + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights diff --git a/.licenses/npm/undici.dep.yml b/.licenses/npm/undici.dep.yml index 58844ed3d..fadecf4a7 100644 --- a/.licenses/npm/undici.dep.yml +++ b/.licenses/npm/undici.dep.yml @@ -1,6 +1,6 @@ --- name: undici -version: 5.28.3 +version: 5.29.0 type: npm summary: An HTTP/1.1 client, written from scratch for Node.js homepage: https://undici.nodejs.org diff --git a/.licenses/npm/uuid-3.4.0.dep.yml b/.licenses/npm/uuid.dep.yml similarity index 100% rename from .licenses/npm/uuid-3.4.0.dep.yml rename to .licenses/npm/uuid.dep.yml diff --git a/.licenses/npm/webidl-conversions.dep.yml b/.licenses/npm/webidl-conversions.dep.yml deleted file mode 100644 index 48c1f2272..000000000 --- a/.licenses/npm/webidl-conversions.dep.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: webidl-conversions -version: 3.0.1 -type: npm -summary: Implements the WebIDL algorithms for converting to and from JavaScript values -homepage: https://github.com/jsdom/webidl-conversions#readme -license: bsd-2-clause -licenses: -- sources: LICENSE.md - text: | - # The BSD 2-Clause License - - Copyright (c) 2014, Domenic Denicola - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -notices: [] diff --git a/.licenses/npm/whatwg-url.dep.yml b/.licenses/npm/whatwg-url.dep.yml deleted file mode 100644 index bca799ccc..000000000 --- a/.licenses/npm/whatwg-url.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: whatwg-url -version: 5.0.0 -type: npm -summary: An implementation of the WHATWG URL Standard's URL API and parsing machinery -homepage: https://github.com/jsdom/whatwg-url#readme -license: mit -licenses: -- sources: LICENSE.txt - text: | - The MIT License (MIT) - - Copyright (c) 2015–2016 Sebastian Mayr - - 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. -notices: [] diff --git a/.licenses/npm/xml2js.dep.yml b/.licenses/npm/xml2js.dep.yml deleted file mode 100644 index 92bce8dda..000000000 --- a/.licenses/npm/xml2js.dep.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: xml2js -version: 0.5.0 -type: npm -summary: Simple XML to JavaScript object converter. -homepage: https://github.com/Leonidas-from-XIV/node-xml2js -license: mit -licenses: -- sources: LICENSE - text: | - Copyright 2010, 2011, 2012, 2013. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. -notices: [] diff --git a/.licenses/npm/xmlbuilder.dep.yml b/.licenses/npm/xmlbuilder.dep.yml deleted file mode 100644 index e8c7ee12f..000000000 --- a/.licenses/npm/xmlbuilder.dep.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: xmlbuilder -version: 11.0.1 -type: npm -summary: An XML builder for node.js -homepage: http://github.com/oozcitak/xmlbuilder-js -license: mit -licenses: -- sources: LICENSE - text: | - The MIT License (MIT) - - Copyright (c) 2013 Ozgur Ozcitak - - 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. -notices: [] diff --git a/.licenses/npm/yallist.dep.yml b/.licenses/npm/yallist.dep.yml deleted file mode 100644 index 1e1c46f1b..000000000 --- a/.licenses/npm/yallist.dep.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: yallist -version: 4.0.0 -type: npm -summary: Yet Another Linked List -homepage: https://github.com/isaacs/yallist#readme -license: isc -licenses: -- sources: LICENSE - text: | - The ISC License - - Copyright (c) Isaac Z. Schlueter and Contributors - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR - IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -notices: [] diff --git a/README.md b/README.md index 7702e6f1c..91fc03445 100644 --- a/README.md +++ b/README.md @@ -18,17 +18,26 @@ The `setup-java` action provides the following functionality for GitHub Actions This action allows you to work with Java and Scala projects. +## Breaking changes in V5 + +- Upgraded action from node20 to node24 + > Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1) + +For more details, see the full release notes on the [releases page](https://github.com/actions/setup-java/releases/tag/v5.0.0) + ## V2 vs V1 - V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK. - V2 requires you to specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2. +For information about the latest releases, recent updates, and newly supported distributions, please refer to the `setup-java` [Releases](https://github.com/actions/setup-java/releases). + ## Usage - `java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified. - `java-version-file`: The path to a file containing java version. Supported file types are `.java-version` and `.tool-versions`. See more details in [about .java-version-file](docs/advanced-usage.md#Java-version-file). - + - `distribution`: _(required)_ Java [distribution](#supported-distributions). - `java-package`: The packaging variant of the chosen distribution. Possible values: `jdk`, `jre`, `jdk+fx`, `jre+fx`. Default value: `jdk`. @@ -69,8 +78,8 @@ This action allows you to work with Java and Scala projects. #### Eclipse Temurin ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' # See 'Supported distributions' for available options java-version: '21' @@ -80,8 +89,8 @@ steps: #### Azul Zulu OpenJDK ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'zulu' # See 'Supported distributions' for available options java-version: '21' @@ -108,6 +117,9 @@ Currently, the following distributions are supported: | `semeru` | IBM Semeru Runtime Open Edition | [Link](https://developer.ibm.com/languages/java/semeru-runtimes/downloads/) | [Link](https://openjdk.java.net/legal/gplv2+ce.html) | | `oracle` | Oracle JDK | [Link](https://www.oracle.com/java/technologies/downloads/) | [Link](https://java.com/freeuselicense) | `dragonwell` | Alibaba Dragonwell JDK | [Link](https://dragonwell-jdk.io/) | [Link](https://www.aliyun.com/product/dragonwell/) +| `sapmachine` | SAP SapMachine JDK/JRE | [Link](https://sapmachine.io/) | [Link](https://github.com/SAP/SapMachine/blob/sapmachine/LICENSE) +| `graalvm` | Oracle GraalVM | [Link](https://www.graalvm.org/) | [Link](https://www.oracle.com/downloads/licenses/graal-free-license.html) +| `jetbrains` | JetBrains Runtime | [Link](https://github.com/JetBrains/JetBrainsRuntime/) | [Link](https://github.com/JetBrains/JetBrainsRuntime/blob/main/LICENSE) **NOTE:** The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions. @@ -115,6 +127,8 @@ Currently, the following distributions are supported: **NOTE:** For Azul Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness. +**NOTE:** To comply with the GraalVM Free Terms and Conditions (GFTC) license, it is recommended to use GraalVM JDK 17 version 17.0.12, as this is the only version of GraalVM JDK 17 available under the GFTC license. Additionally, it is encouraged to consider upgrading to GraalVM JDK 21, which offers the latest features and improvements. + ### Caching packages dependencies The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files: @@ -131,8 +145,8 @@ The cache input is optional, and caching is turned off by default. #### Caching gradle dependencies ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' @@ -142,12 +156,17 @@ steps: sub-project/**/gradle-wrapper.properties - run: ./gradlew build --no-daemon ``` +Using the `cache: gradle` provides a simple and effective way to cache Gradle dependencies with minimal configuration. + +For projects that require more advanced `Gradle` caching features, such as caching build outputs, support for Gradle configuration cache, encrypted cache storage, fine-grained cache control (including options to enable or disable the cache, set it to read-only or write-only, perform automated cleanup, and define custom cache rules), or optimized performance for complex CI workflows, consider using [`gradle/actions/setup-gradle`](https://github.com/gradle/actions/tree/main/setup-gradle). + +For setup details and a comprehensive overview of all available features, visit the [setup-gradle documentation](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md). #### Caching maven dependencies ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' @@ -160,8 +179,8 @@ steps: #### Caching sbt dependencies ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' @@ -180,8 +199,8 @@ Usually, cache gets downloaded in multiple segments of fixed sizes. Sometimes, a env: SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5' steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' @@ -200,8 +219,8 @@ For Java distributions that are not cached on Hosted images, `check-latest` alwa ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' @@ -219,9 +238,9 @@ jobs: java: [ '8', '11', '17', '21' ] name: Java ${{ matrix.Java }} sample steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: '' java-version: ${{ matrix.java }} @@ -230,11 +249,11 @@ jobs: ### Install multiple JDKs -All versions are added to the PATH. The last version will be used and available globally. Other Java versions can be accessed through env variables with such specification as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'. +All configured Java versions are added to the PATH. The last one added to the PATH (i.e., the last JDK set up by this action) will be used as the default and available globally. Other Java versions can be accessed through environment variables such as 'JAVA_HOME_{{ MAJOR_VERSION }}_{{ ARCHITECTURE }}'. To use a specific Java version, set the JAVA_HOME environment variable accordingly and prepend its bin directory to the PATH to ensure it takes priority during execution. ```yaml steps: - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: '' java-version: | @@ -257,6 +276,8 @@ In the example above multiple JDKs are installed for the same job. The result af - [Amazon Corretto](docs/advanced-usage.md#Amazon-Corretto) - [Oracle](docs/advanced-usage.md#Oracle) - [Alibaba Dragonwell](docs/advanced-usage.md#Alibaba-Dragonwell) + - [SapMachine](docs/advanced-usage.md#SapMachine) + - [GraalVM](docs/advanced-usage.md#GraalVM) - [Installing custom Java package type](docs/advanced-usage.md#Installing-custom-Java-package-type) - [Installing custom Java architecture](docs/advanced-usage.md#Installing-custom-Java-architecture) - [Installing custom Java distribution from local file](docs/advanced-usage.md#Installing-Java-from-local-file) @@ -268,6 +289,15 @@ In the example above multiple JDKs are installed for the same job. The result af - [Modifying Maven Toolchains](docs/advanced-usage.md#Modifying-Maven-Toolchains) - [Java Version File](docs/advanced-usage.md#Java-version-file) +## Recommended permissions + +When using the `setup-java` action in your GitHub Actions workflow, it is recommended to set the following permissions to ensure proper functionality: + +```yaml +permissions: + contents: read # access to check out code and install dependencies +``` + ## License The scripts and documentation in this project are released under the [MIT License](LICENSE). diff --git a/__tests__/data/dragonwell.json b/__tests__/data/dragonwell.json index 58025e901..290c5989c 100644 --- a/__tests__/data/dragonwell.json +++ b/__tests__/data/dragonwell.json @@ -481,6 +481,54 @@ } } } + }, + "11.0.23.20.9" : { + "alpine-linux" : { + "x64" : { + "Extended" : { + "sha256" : "9d61fefb4f1a8368f8e7eec17893934b438b67f360cb8b7ef727ab459695d14e", + "name" : "Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_alpine-linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_alpine-linux.tar.gz" + } + } + }, + "linux" : { + "aarch64" : { + "Extended" : { + "sha256" : "2f399231644fe1e3f1b4b5298e85f21f4863017767e9e5afb00ee46e2d7780d9", + "name" : "Alibaba_Dragonwell_Extended_11.0.23.20.9_aarch64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_aarch64_linux.tar.gz" + } + }, + "x64" : { + "Extended" : { + "sha256" : "662dfdc584e21bcfb7ed87942b5bb4e71a7b7467d4c82211a3615d0834d1c833", + "name" : "Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux.tar.gz" + } + }, + "riscv" : { + "Extended" : { + "sha256" : "f3488461cbfd95e6c08ad2dc01c51950b9c629c46eea6305002311b263ce2ad9", + "name" : "Alibaba_Dragonwell_Extended_11.0.23.20.9_riscv64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_riscv64_linux.tar.gz" + } + } + }, + "windows" : { + "x64" : { + "Extended" : { + "sha256" : "ba8dba2b7f2279f87220f396afcce49cb26482705deb5144c6e22a90ba443f9d", + "name" : "Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_windows.zip", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_windows.zip" + } + } + } } }, "17":{ @@ -1134,5 +1182,143 @@ } } } + }, + "21" : { + "21.0.3.0.3.9" : { + "alpine-linux" : { + "x64" : { + "Standard" : { + "sha256" : "c3c5d193a0a6aee8757fd3036dc13b7921a4306b089bf8759ba6b822d1e8416e", + "name" : "Alibaba_Dragonwell_Standard_21.0.3.0.3.9_x64_alpine-linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_x64_alpine-linux.tar.gz" + } + } + }, + "linux" : { + "aarch64" : { + "Standard" : { + "sha256" : "3cc309627ad2a9515ca50cdeff9eff118f14326b37eaa536b758570082aeb242", + "name" : "Alibaba_Dragonwell_Standard_21.0.3.0.3.9_aarch64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_aarch64_linux.tar.gz" + } + }, + "x64" : { + "Standard" : { + "sha256" : "1c0508db048c0b50e2d61b2cc5a5390d3b9bcafec6e185d2cb53dde1fc530203", + "name" : "Alibaba_Dragonwell_Standard_21.0.3.0.3.9_x64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_x64_linux.tar.gz" + } + }, + "riscv" : { + "Standard" : { + "sha256" : "e374698f8ee9c66b8d4a59ba50d0511aa654b55514732bc787e29c9afaddf846", + "name" : "Alibaba_Dragonwell_Standard_21.0.3.0.3.9_riscv64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_riscv64_linux.tar.gz" + } + } + }, + "windows" : { + "x64" : { + "Standard" : { + "sha256" : "0b75fc888cb2a9c7e050132fd020c30cbe65f3179feb36812a7c6be3c76ad277", + "name" : "Alibaba_Dragonwell_Standard_21.0.3.0.3.9_x64_windows.zip", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_x64_windows.zip" + } + } + } + }, + "21.0.2.0.2.13" : { + "alpine-linux" : { + "x64" : { + "Standard" : { + "sha256" : "71a391987fdd569385c0afe1aaf16dbd48d127e14306793ef9ac0e0986b9632c", + "name" : "Alibaba_Dragonwell_Standard_21.0.2.0.2.13_x64_alpine-linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.2.0.2%2B13_jdk-21.0.2-ga/Alibaba_Dragonwell_Standard_21.0.2.0.2.13_x64_alpine-linux.tar.gz" + } + } + }, + "linux" : { + "aarch64" : { + "Standard" : { + "sha256" : "307321a399c206f8d56e0ce5c65921f9448ec9882dfb81ffc5e841b8fb5f8ed8", + "name" : "Alibaba_Dragonwell_Standard_21.0.2.0.2.13_aarch64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.2.0.2%2B13_jdk-21.0.2-ga/Alibaba_Dragonwell_Standard_21.0.2.0.2.13_aarch64_linux.tar.gz" + } + }, + "x64" : { + "Standard" : { + "sha256" : "24198f0d436bb913b152181e07205647b05da01c196f5c10a96e9a998b10381a", + "name" : "Alibaba_Dragonwell_Standard_21.0.2.0.2.13_x64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.2.0.2%2B13_jdk-21.0.2-ga/Alibaba_Dragonwell_Standard_21.0.2.0.2.13_x64_linux.tar.gz" + } + }, + "riscv" : { + "Standard" : { + "sha256" : "970a49103b8971952e46c81be844bc3776caca04da8456337f12e3a7d2a18011", + "name" : "Alibaba_Dragonwell_Standard_21.0.2.0.2.13_riscv64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.2.0.2%2B13_jdk-21.0.2-ga/Alibaba_Dragonwell_Standard_21.0.2.0.2.13_riscv64_linux.tar.gz" + } + } + }, + "windows" : { + "x64" : { + "Standard" : { + "sha256" : "b77de54be5ef1595fc568f6f18fbd4b61d64d99a0c9c5ef78a84018b4f82032b", + "name" : "Alibaba_Dragonwell_Standard_21.0.2.0.2.13_x64_windows.zip", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.2.0.2%2B13_jdk-21.0.2-ga/Alibaba_Dragonwell_Standard_21.0.2.0.2.13_x64_windows.zip" + } + } + } + }, + "21.0.1.0.1.12" : { + "alpine-linux" : { + "x64" : { + "Standard" : { + "sha256" : "b9cea58bffe555484b831ff6d7cdb277c07e86a76d32b373ec35fa21ecb5fdc9", + "name" : "Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_alpine-linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.1.0.1%2B12_jdk-21.0.1-ga/Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_alpine-linux.tar.gz" + } + } + }, + "linux" : { + "aarch64" : { + "Standard" : { + "sha256" : "d36cef494ccc1939c6b5da04133cfdbe0b03956fd04147aef46014536bc5a37b", + "name" : "Alibaba_Dragonwell_Standard_21.0.1.0.1.12_aarch64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.1.0.1%2B12_jdk-21.0.1-ga/Alibaba_Dragonwell_Standard_21.0.1.0.1.12_aarch64_linux.tar.gz" + } + }, + "x64" : { + "Standard" : { + "sha256" : "dfb8d325a98b8f577d72fd639cc54feee325eec8ebba497868184c8405a1cf41", + "name" : "Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_linux.tar.gz", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.1.0.1%2B12_jdk-21.0.1-ga/Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_linux.tar.gz" + } + } + }, + "windows" : { + "x64" : { + "Standard" : { + "sha256" : "b8ab99ed9060341f75edb8cc238830fbfd608e51536e43f34bd45c3e968ebab5", + "name" : "Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_windows.zip", + "content_type" : "application/zip", + "download_url" : "https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.1.0.1%2B12_jdk-21.0.1-ga/Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_windows.zip" + } + } + } + } } } diff --git a/__tests__/data/jetbrains.json b/__tests__/data/jetbrains.json new file mode 100644 index 000000000..535bb5cba --- /dev/null +++ b/__tests__/data/jetbrains.json @@ -0,0 +1,1454 @@ +[ + { + "tag_name": "jbr-release-21.0.3b465.3", + "semver": "21.0.3", + "build": "465.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b465.3.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.3b458.1", + "semver": "21.0.3", + "build": "458.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b458.1.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.3b453.2", + "semver": "21.0.3", + "build": "453.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b453.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.11b1207.24", + "semver": "17.0.11", + "build": "1207.24", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.11-linux-x64-b1207.24.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.11b1207.23", + "semver": "17.0.11", + "build": "1207.23", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.11-linux-x64-b1207.23.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.3b446.1", + "semver": "21.0.3", + "build": "446.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b446.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.14", + "semver": "17.0.10", + "build": "1207.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b829.27", + "semver": "17.0.10", + "build": "829.27", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b829.27.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1087.23", + "semver": "17.0.10", + "build": "1087.23", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1087.23.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.12", + "semver": "17.0.10", + "build": "1207.12", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.12.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1087.21", + "semver": "17.0.10", + "build": "1087.21", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1087.21.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.6", + "semver": "17.0.10", + "build": "1207.6", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.6.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.2b375.1", + "semver": "21.0.2", + "build": "375.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.2-linux-x64-b375.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.1", + "semver": "17.0.10", + "build": "1207.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1186.1", + "semver": "17.0.10", + "build": "1186.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1186.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1171.14", + "semver": "17.0.10", + "build": "1171.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1171.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b829.26", + "semver": "17.0.10", + "build": "829.26", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b829.26.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.2b346.3", + "semver": "21.0.2", + "build": "346.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.2-linux-x64-b346.3.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1000.48", + "semver": "17.0.10", + "build": "1000.48", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1000.48.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.2b341.4", + "semver": "21.0.2", + "build": "341.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.2-linux-x64-b341.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1087.17", + "semver": "17.0.10", + "build": "1087.17", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1087.17.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1166.2", + "semver": "17.0.9", + "build": "1166.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1166.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1162.7", + "semver": "17.0.9", + "build": "1162.7", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1162.7.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.11", + "semver": "17.0.9", + "build": "1087.11", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.11.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.9", + "semver": "17.0.9", + "build": "1087.9", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.9.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.7", + "semver": "17.0.9", + "build": "1087.7", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.7.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1000.47", + "semver": "17.0.9", + "build": "1000.47", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1000.47.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1000.46", + "semver": "17.0.9", + "build": "1000.46", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1000.46.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.3", + "semver": "17.0.9", + "build": "1087.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.3.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1080.1", + "semver": "17.0.8.1", + "build": "1080.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1080.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1072.1", + "semver": "17.0.8.1", + "build": "1072.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1072.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1070.2", + "semver": "17.0.8.1", + "build": "1070.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1070.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1063.1", + "semver": "17.0.8.1", + "build": "1063.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1063.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1000.32", + "semver": "17.0.8.1", + "build": "1000.32", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1000.32.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1059.3", + "semver": "17.0.8.1", + "build": "1059.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1059.3.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8b1000.22", + "semver": "17.0.8", + "build": "1000.22", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8-linux-x64-b1000.22.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8b1000.8", + "semver": "17.0.8", + "build": "1000.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8-linux-x64-b1000.8.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b1000.6", + "semver": "17.0.7", + "build": "1000.6", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b1000.6.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b1000.5", + "semver": "17.0.7", + "build": "1000.5", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b1000.5.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b1000.2", + "semver": "17.0.7", + "build": "1000.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b1000.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b985.2", + "semver": "17.0.7", + "build": "985.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b985.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b979.4", + "semver": "17.0.7", + "build": "979.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b979.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b829.16", + "semver": "17.0.7", + "build": "829.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b829.16.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b966.2", + "semver": "17.0.7", + "build": "966.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b966.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b964.1", + "semver": "17.0.7", + "build": "964.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b964.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b829.14", + "semver": "17.0.7", + "build": "829.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b829.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b953.1", + "semver": "17.0.7", + "build": "953.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b953.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.9", + "semver": "17.0.6", + "build": "829.9", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.9.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b469.82", + "semver": "17.0.6", + "build": "469.82", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b469.82.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.5", + "semver": "17.0.6", + "build": "829.5", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.5.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b653.34", + "semver": "17.0.6", + "build": "653.34", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b653.34.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.4", + "semver": "17.0.6", + "build": "829.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.1", + "semver": "17.0.6", + "build": "829.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b653.32", + "semver": "17.0.6", + "build": "653.32", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b653.32.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b802.4", + "semver": "17.0.6", + "build": "802.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b802.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b802.1", + "semver": "17.0.6", + "build": "802.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b802.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b785.1", + "semver": "17.0.6", + "build": "785.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b785.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b779.1", + "semver": "17.0.6", + "build": "779.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b779.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b762.1", + "semver": "17.0.5", + "build": "762.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b762.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.25", + "semver": "17.0.5", + "build": "653.25", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.25.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b759.1", + "semver": "17.0.5", + "build": "759.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b759.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.23", + "semver": "17.0.5", + "build": "653.23", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.23.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.14", + "semver": "17.0.5", + "build": "653.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b469.71", + "semver": "17.0.5", + "build": "469.71", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b469.71.tar.gz" + }, + { + "tag_name": "jbr11_0_16b2043.64", + "semver": "11.0.16", + "build": "2043.64", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_nomod-11_0_16-linux-x64-b2043.64.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.6", + "semver": "17.0.5", + "build": "653.6", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.6.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b469.67", + "semver": "17.0.5", + "build": "469.67", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b469.67.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b653.1", + "semver": "17.0.4.1", + "build": "653.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b653.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b646.8", + "semver": "17.0.4.1", + "build": "646.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b646.8.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b629.2", + "semver": "17.0.4.1", + "build": "629.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b629.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b617.2", + "semver": "17.0.4.1", + "build": "617.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b617.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b469.62", + "semver": "17.0.4.1", + "build": "469.62", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b469.62.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b597.1", + "semver": "17.0.4.1", + "build": "597.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b597.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4b469.53", + "semver": "17.0.4", + "build": "469.53", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4-linux-x64-b469.53.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4b469.44", + "semver": "17.0.4", + "build": "469.44", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4-linux-x64-b469.44.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.3b469.37", + "semver": "17.0.3", + "build": "469.37", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.37.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.32", + "semver": "17.0.3", + "build": "469.32", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.32.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.30", + "semver": "17.0.3", + "build": "469.30", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.30.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.19", + "semver": "17.0.3", + "build": "469.19", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.19.tar.gz" + }, + { + "tag_name": "jbr17.0.3b498.3", + "semver": "17.0.3", + "build": "498.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b498.3.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.16", + "semver": "17.0.3", + "build": "469.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.16.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.12", + "semver": "17.0.3", + "build": "469.12", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.12.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.3", + "semver": "17.0.3", + "build": "469.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.3.tar.gz" + }, + { + "tag_name": "jbr17.0.3b463.3", + "semver": "17.0.3", + "build": "463.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b463.3.tar.gz" + }, + { + "tag_name": "jbr17.0.3b423.10", + "semver": "17.0.3", + "build": "423.10", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b423.10.tar.gz" + }, + { + "tag_name": "jbr11_0_15b2043.56", + "semver": "11.0.15", + "build": "2043.56", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_nomod-11_0_15-linux-x64-b2043.56.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.45", + "semver": "11.0.14.1", + "build": "2043.45", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_nomod-11_0_14_1-linux-x64-b2043.45.tar.gz" + }, + { + "tag_name": "jbr17.0.2b396.4", + "semver": "17.0.2", + "build": "396.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.2-linux-x64-b396.4.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.25", + "semver": "11.0.14.1", + "build": "2043.25", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.25.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.22", + "semver": "11.0.14.1", + "build": "2043.22", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.22.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.17", + "semver": "11.0.14.1", + "build": "2043.17", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.17.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.14", + "semver": "11.0.14.1", + "build": "2043.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.14.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.11", + "semver": "11.0.14.1", + "build": "2043.11", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.11.tar.gz" + }, + { + "tag_name": "jbr11_0_14b2043.2", + "semver": "11.0.14", + "build": "2043.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14-linux-x64-b2043.2.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b1751.46", + "semver": "11.0.14.1", + "build": "1751.46", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b1751.46.tar.gz" + }, + { + "tag_name": "jbr11_0_14b1993.2", + "semver": "11.0.14", + "build": "1993.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14-linux-x64-b1993.2.tar.gz" + }, + { + "tag_name": "jbr17_0_2b315.1", + "semver": "17.0.2", + "build": "315.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17_0_2-linux-x64-b315.1.tar.gz" + }, + { + "tag_name": "jbr11_0_14b1982.1", + "semver": "11.0.14", + "build": "1982.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14-linux-x64-b1982.1.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1890.3", + "semver": "11.0.13", + "build": "1890.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1890.3.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.25", + "semver": "11.0.13", + "build": "1751.25", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.25.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.24", + "semver": "11.0.13", + "build": "1751.24", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.24.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.21", + "semver": "11.0.13", + "build": "1751.21", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.21.tar.gz" + }, + { + "tag_name": "jbr17_0_1b164.8", + "semver": "17.0.1", + "build": "164.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17_0_1-linux-x64-b164.8.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.19", + "semver": "11.0.13", + "build": "1751.19", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.19.tar.gz" + }, + { + "tag_name": "jb11_0_13-b1504.49", + "semver": "11.0.13", + "build": "1504.49", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1504.49.tar.gz" + }, + { + "tag_name": "jbr17_0_1b164.4", + "semver": "17.0.1", + "build": "164.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17_0_1-linux-x64-b164.4.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.16", + "semver": "11.0.13", + "build": "1751.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.16.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1751.11", + "semver": "11.0.12", + "build": "1751.11", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1751.11.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1729.1", + "semver": "11.0.12", + "build": "1729.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1729.1.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1715.4", + "semver": "11.0.12", + "build": "1715.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1715.4.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1692.9", + "semver": "11.0.12", + "build": "1692.9", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1692.9.tar.gz" + }, + { + "tag_name": "jb11_0_12-b1504.37", + "semver": "11.0.12", + "build": "1504.37", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1504.37.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1665.1", + "semver": "11.0.12", + "build": "1665.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1665.1.tar.gz" + }, + { + "tag_name": "jb11_0_12-b1504.28", + "semver": "11.0.12", + "build": "1504.28", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1504.28.tar.gz" + }, + { + "tag_name": "jb11_0_12-b1504.27", + "semver": "11.0.12", + "build": "1504.27", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1504.27.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.16", + "semver": "11.0.11", + "build": "1504.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.16.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.13", + "semver": "11.0.11", + "build": "1504.13", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.13.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.12", + "semver": "11.0.11", + "build": "1504.12", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.12.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1542.1", + "semver": "11.0.11", + "build": "1542.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1542.1.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.8", + "semver": "11.0.11", + "build": "1504.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.8.tar.gz" + }, + { + "tag_name": "11_0_11b1536.2", + "semver": "11.0.11", + "build": "1536.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1536.2.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.3b465.3", + "semver": "21.0.3", + "build": "465.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b465.3.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.3b458.1", + "semver": "21.0.3", + "build": "458.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b458.1.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.3b453.2", + "semver": "21.0.3", + "build": "453.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b453.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.11b1207.24", + "semver": "17.0.11", + "build": "1207.24", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.11-linux-x64-b1207.24.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.11b1207.23", + "semver": "17.0.11", + "build": "1207.23", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.11-linux-x64-b1207.23.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.3b446.1", + "semver": "21.0.3", + "build": "446.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.3-linux-x64-b446.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.14", + "semver": "17.0.10", + "build": "1207.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b829.27", + "semver": "17.0.10", + "build": "829.27", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b829.27.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1087.23", + "semver": "17.0.10", + "build": "1087.23", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1087.23.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.12", + "semver": "17.0.10", + "build": "1207.12", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.12.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1087.21", + "semver": "17.0.10", + "build": "1087.21", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1087.21.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.6", + "semver": "17.0.10", + "build": "1207.6", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.6.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.2b375.1", + "semver": "21.0.2", + "build": "375.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.2-linux-x64-b375.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1207.1", + "semver": "17.0.10", + "build": "1207.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1207.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1186.1", + "semver": "17.0.10", + "build": "1186.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1186.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1171.14", + "semver": "17.0.10", + "build": "1171.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1171.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b829.26", + "semver": "17.0.10", + "build": "829.26", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b829.26.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.2b346.3", + "semver": "21.0.2", + "build": "346.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.2-linux-x64-b346.3.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1000.48", + "semver": "17.0.10", + "build": "1000.48", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1000.48.tar.gz" + }, + { + "tag_name": "jbr-release-21.0.2b341.4", + "semver": "21.0.2", + "build": "341.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-21.0.2-linux-x64-b341.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.10b1087.17", + "semver": "17.0.10", + "build": "1087.17", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.10-linux-x64-b1087.17.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1166.2", + "semver": "17.0.9", + "build": "1166.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1166.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1162.7", + "semver": "17.0.9", + "build": "1162.7", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1162.7.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.11", + "semver": "17.0.9", + "build": "1087.11", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.11.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.9", + "semver": "17.0.9", + "build": "1087.9", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.9.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.7", + "semver": "17.0.9", + "build": "1087.7", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.7.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1000.47", + "semver": "17.0.9", + "build": "1000.47", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1000.47.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1000.46", + "semver": "17.0.9", + "build": "1000.46", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1000.46.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.9b1087.3", + "semver": "17.0.9", + "build": "1087.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.9-linux-x64-b1087.3.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1080.1", + "semver": "17.0.8.1", + "build": "1080.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1080.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1072.1", + "semver": "17.0.8.1", + "build": "1072.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1072.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1070.2", + "semver": "17.0.8.1", + "build": "1070.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1070.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1063.1", + "semver": "17.0.8.1", + "build": "1063.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1063.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1000.32", + "semver": "17.0.8.1", + "build": "1000.32", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1000.32.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8.1b1059.3", + "semver": "17.0.8.1", + "build": "1059.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8.1-linux-x64-b1059.3.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8b1000.22", + "semver": "17.0.8", + "build": "1000.22", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8-linux-x64-b1000.22.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.8b1000.8", + "semver": "17.0.8", + "build": "1000.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.8-linux-x64-b1000.8.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b1000.6", + "semver": "17.0.7", + "build": "1000.6", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b1000.6.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b1000.5", + "semver": "17.0.7", + "build": "1000.5", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b1000.5.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b1000.2", + "semver": "17.0.7", + "build": "1000.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b1000.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b985.2", + "semver": "17.0.7", + "build": "985.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b985.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b979.4", + "semver": "17.0.7", + "build": "979.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b979.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b829.16", + "semver": "17.0.7", + "build": "829.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b829.16.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b966.2", + "semver": "17.0.7", + "build": "966.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b966.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b964.1", + "semver": "17.0.7", + "build": "964.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b964.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b829.14", + "semver": "17.0.7", + "build": "829.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b829.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.7b953.1", + "semver": "17.0.7", + "build": "953.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b953.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.9", + "semver": "17.0.6", + "build": "829.9", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.9.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b469.82", + "semver": "17.0.6", + "build": "469.82", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b469.82.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.5", + "semver": "17.0.6", + "build": "829.5", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.5.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b653.34", + "semver": "17.0.6", + "build": "653.34", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b653.34.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.4", + "semver": "17.0.6", + "build": "829.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b829.1", + "semver": "17.0.6", + "build": "829.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b829.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b653.32", + "semver": "17.0.6", + "build": "653.32", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b653.32.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b802.4", + "semver": "17.0.6", + "build": "802.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b802.4.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b802.1", + "semver": "17.0.6", + "build": "802.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b802.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b785.1", + "semver": "17.0.6", + "build": "785.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b785.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.6b779.1", + "semver": "17.0.6", + "build": "779.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.6-linux-x64-b779.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b762.1", + "semver": "17.0.5", + "build": "762.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b762.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.25", + "semver": "17.0.5", + "build": "653.25", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.25.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b759.1", + "semver": "17.0.5", + "build": "759.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b759.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.23", + "semver": "17.0.5", + "build": "653.23", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.23.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.14", + "semver": "17.0.5", + "build": "653.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.14.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b469.71", + "semver": "17.0.5", + "build": "469.71", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b469.71.tar.gz" + }, + { + "tag_name": "jbr11_0_16b2043.64", + "semver": "11.0.16", + "build": "2043.64", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_nomod-11_0_16-linux-x64-b2043.64.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b653.6", + "semver": "17.0.5", + "build": "653.6", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b653.6.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.5b469.67", + "semver": "17.0.5", + "build": "469.67", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.5-linux-x64-b469.67.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b653.1", + "semver": "17.0.4.1", + "build": "653.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b653.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b646.8", + "semver": "17.0.4.1", + "build": "646.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b646.8.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b629.2", + "semver": "17.0.4.1", + "build": "629.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b629.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b617.2", + "semver": "17.0.4.1", + "build": "617.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b617.2.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b469.62", + "semver": "17.0.4.1", + "build": "469.62", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b469.62.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4.1b597.1", + "semver": "17.0.4.1", + "build": "597.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4.1-linux-x64-b597.1.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4b469.53", + "semver": "17.0.4", + "build": "469.53", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4-linux-x64-b469.53.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.4b469.44", + "semver": "17.0.4", + "build": "469.44", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.4-linux-x64-b469.44.tar.gz" + }, + { + "tag_name": "jbr-release-17.0.3b469.37", + "semver": "17.0.3", + "build": "469.37", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.37.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.32", + "semver": "17.0.3", + "build": "469.32", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.32.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.30", + "semver": "17.0.3", + "build": "469.30", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.30.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.19", + "semver": "17.0.3", + "build": "469.19", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.19.tar.gz" + }, + { + "tag_name": "jbr17.0.3b498.3", + "semver": "17.0.3", + "build": "498.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b498.3.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.16", + "semver": "17.0.3", + "build": "469.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.16.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.12", + "semver": "17.0.3", + "build": "469.12", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.12.tar.gz" + }, + { + "tag_name": "jbr17.0.3b469.3", + "semver": "17.0.3", + "build": "469.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b469.3.tar.gz" + }, + { + "tag_name": "jbr17.0.3b463.3", + "semver": "17.0.3", + "build": "463.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b463.3.tar.gz" + }, + { + "tag_name": "jbr17.0.3b423.10", + "semver": "17.0.3", + "build": "423.10", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.3-linux-x64-b423.10.tar.gz" + }, + { + "tag_name": "jbr11_0_15b2043.56", + "semver": "11.0.15", + "build": "2043.56", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_nomod-11_0_15-linux-x64-b2043.56.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.45", + "semver": "11.0.14.1", + "build": "2043.45", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_nomod-11_0_14_1-linux-x64-b2043.45.tar.gz" + }, + { + "tag_name": "jbr17.0.2b396.4", + "semver": "17.0.2", + "build": "396.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.2-linux-x64-b396.4.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.25", + "semver": "11.0.14.1", + "build": "2043.25", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.25.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.22", + "semver": "11.0.14.1", + "build": "2043.22", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.22.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.17", + "semver": "11.0.14.1", + "build": "2043.17", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.17.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.14", + "semver": "11.0.14.1", + "build": "2043.14", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.14.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b2043.11", + "semver": "11.0.14.1", + "build": "2043.11", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b2043.11.tar.gz" + }, + { + "tag_name": "jbr11_0_14b2043.2", + "semver": "11.0.14", + "build": "2043.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14-linux-x64-b2043.2.tar.gz" + }, + { + "tag_name": "jbr11_0_14_1b1751.46", + "semver": "11.0.14.1", + "build": "1751.46", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14_1-linux-x64-b1751.46.tar.gz" + }, + { + "tag_name": "jbr11_0_14b1993.2", + "semver": "11.0.14", + "build": "1993.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14-linux-x64-b1993.2.tar.gz" + }, + { + "tag_name": "jbr17_0_2b315.1", + "semver": "17.0.2", + "build": "315.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17_0_2-linux-x64-b315.1.tar.gz" + }, + { + "tag_name": "jbr11_0_14b1982.1", + "semver": "11.0.14", + "build": "1982.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_14-linux-x64-b1982.1.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1890.3", + "semver": "11.0.13", + "build": "1890.3", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1890.3.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.25", + "semver": "11.0.13", + "build": "1751.25", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.25.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.24", + "semver": "11.0.13", + "build": "1751.24", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.24.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.21", + "semver": "11.0.13", + "build": "1751.21", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.21.tar.gz" + }, + { + "tag_name": "jbr17_0_1b164.8", + "semver": "17.0.1", + "build": "164.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17_0_1-linux-x64-b164.8.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.19", + "semver": "11.0.13", + "build": "1751.19", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.19.tar.gz" + }, + { + "tag_name": "jb11_0_13-b1504.49", + "semver": "11.0.13", + "build": "1504.49", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1504.49.tar.gz" + }, + { + "tag_name": "jbr17_0_1b164.4", + "semver": "17.0.1", + "build": "164.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17_0_1-linux-x64-b164.4.tar.gz" + }, + { + "tag_name": "jbr11_0_13b1751.16", + "semver": "11.0.13", + "build": "1751.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_13-linux-x64-b1751.16.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1751.11", + "semver": "11.0.12", + "build": "1751.11", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1751.11.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1729.1", + "semver": "11.0.12", + "build": "1729.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1729.1.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1715.4", + "semver": "11.0.12", + "build": "1715.4", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1715.4.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1692.9", + "semver": "11.0.12", + "build": "1692.9", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1692.9.tar.gz" + }, + { + "tag_name": "jb11_0_12-b1504.37", + "semver": "11.0.12", + "build": "1504.37", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1504.37.tar.gz" + }, + { + "tag_name": "jbr11_0_12b1665.1", + "semver": "11.0.12", + "build": "1665.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1665.1.tar.gz" + }, + { + "tag_name": "jb11_0_12-b1504.28", + "semver": "11.0.12", + "build": "1504.28", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1504.28.tar.gz" + }, + { + "tag_name": "jb11_0_12-b1504.27", + "semver": "11.0.12", + "build": "1504.27", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_12-linux-x64-b1504.27.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.16", + "semver": "11.0.11", + "build": "1504.16", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.16.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.13", + "semver": "11.0.11", + "build": "1504.13", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.13.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.12", + "semver": "11.0.11", + "build": "1504.12", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.12.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1542.1", + "semver": "11.0.11", + "build": "1542.1", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1542.1.tar.gz" + }, + { + "tag_name": "jb11_0_11-b1504.8", + "semver": "11.0.11", + "build": "1504.8", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1504.8.tar.gz" + }, + { + "tag_name": "11_0_11b1536.2", + "semver": "11.0.11", + "build": "1536.2", + "url": "https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-11_0_11-linux-x64-b1536.2.tar.gz" + } +] \ No newline at end of file diff --git a/__tests__/data/microsoft.json b/__tests__/data/microsoft.json index 18e67d9d3..b2f0e68a1 100644 --- a/__tests__/data/microsoft.json +++ b/__tests__/data/microsoft.json @@ -1,4 +1,47 @@ [ + { + "version": "25.0.0", + "stable": true, + "release_url": "https://aka.ms/download-jdk", + "files": [ + { + "filename": "microsoft-jdk-25.0.0-macos-x64.tar.gz", + "arch": "x64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-linux-x64.tar.gz", + "arch": "x64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-windows-x64.zip", + "arch": "x64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-x64.zip" + }, + { + "filename": "microsoft-jdk-25.0.0-macos-aarch64.tar.gz", + "arch": "aarch64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-linux-aarch64.tar.gz", + "arch": "aarch64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-windows-aarch64.zip", + "arch": "aarch64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-aarch64.zip" + } + ] + }, { "version": "21.0.0", "stable": true, diff --git a/__tests__/data/sapmachine.json b/__tests__/data/sapmachine.json new file mode 100644 index 000000000..aec5dac4c --- /dev/null +++ b/__tests__/data/sapmachine.json @@ -0,0 +1,87242 @@ +{ + "23": { + "updates": { + "23": { + "sapmachine-23+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B15", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.15_aix-ppc64_bin.tar.gz", + "checksum": "33852b93e96e7513d75a75fa5c4a1a8ebbb94d525ef5e41d6e187b39c94e5911", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "e6e7d6beb1401739c2e9c42ffa45623a77f469b0ce04bdaf1e9dffbe588734f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "69b687d738c0d725431f971096fe1b3b00d54bba9c3dbf6c92e0d24085845e48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.15_linux-x64_bin.tar.gz", + "checksum": "9adce2c8595acf25816c1f5a8d2c3322638b5b99a703a98e4f18a16f89460de3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "56bdf3c6dccfbc63c30b0b78896bfdf3ed21949612463e00dc89ed699adf1231", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_macos-aarch64_bin.dmg", + "checksum": "8860f98f6d48af460a73c45cfed68d8762a5be4919546f2fb8677dffce1c482b" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "182286dc8eb634ac061fdfaad7ee8a695242e79c3bdbc0b5e7d98a8c4c6d06ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_macos-x64_bin.dmg", + "checksum": "1eae474d514ed6f38d7e6b801331f115b9fa9c1d7386f1a847dd2b4dfe1d9d26" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.15_macos-x64_bin.tar.gz", + "checksum": "696d7e90f967eb2d18a2bb596700296b41c74f1ef8bc9a0fec163d224e1e420d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.15_windows-x64_bin.zip", + "checksum": "c4d5d46ffb9f4806f60fcd352efb84ba24296e8f3e8a8c0e82e81e31ba0af20c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.15_aix-ppc64_bin.tar.gz", + "checksum": "e0aaa5a5b19f3517866dd490c84cae16dc517a3ba83571a54fab6f9f97b7521d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "0b4fee0df589f8486eabf07bb0f7f9471ab325efc98d078b0997ed880ace709f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "7131d5cfa65c709ab21cfa7bada37d8cdcb315cdc22ab74e951ac9925183a059", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.15_linux-x64_bin.tar.gz", + "checksum": "e27578fd9d1aabbff5e97cd71857ea6a3e438ceff675e7ab2f0556542afca65f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "503b4557c0ad6a3829334676db7dde82e7468db8f778d89e163d81d13c927d95", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_macos-aarch64_bin.dmg", + "checksum": "b6aaf7a20b6fb3c6ceb87eee6927e17e144dd4012d448c290513cf2f3f4bafe7" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "afe649a6be1b85516c875173bea99151a218ada8301014610c5e06b771e2c8a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_macos-x64_bin.dmg", + "checksum": "0febfba9bfb4a5a107fc97696abd0bbc7863098e856db90516ab7b798408ddb0" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.15_macos-x64_bin.tar.gz", + "checksum": "6b3f52c9d626a34a72a412d2557bd1d3ae48ba9c0951d88f9b357259a4b6232d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.15_windows-x64_bin.zip", + "checksum": "42a4b8cce43e5f15ce52bbdfb5ccf7bc652b2e5141c7a73781c06f5548ee0416", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jre-23-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B14", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.14_aix-ppc64_bin.tar.gz", + "checksum": "789380d96efc3acae2ce17a9f9dac9b286858e5392e6456aeb770ec4b49e8c36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "258ad06fb23e48f7bd685701ec606955c0a489744b5ef88a884e6d12e31b5e4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "15b35a6893d598c15daefa9d2d2c735627c6fab86598261baf573eb1f91de598", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.14_linux-x64_bin.tar.gz", + "checksum": "b43871b937747089cdeb02388877a239361ef00815b9cd102b2d4d7dc7b16580", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "cf55898f59f8e3466da461d0b1693adbc30ba393995e73670a8f981a2ead940d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_macos-aarch64_bin.dmg", + "checksum": "ffd9ef1d4538d85ffe80823dcd7ce45b13be74f07515d57ce2c72b0aea159538" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "257ca278b5ff2568ad269eefd7fa920732ff0d8a498978219f9e2593556c72dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_macos-x64_bin.dmg", + "checksum": "0d1310e76f094657467536e3cb0c8c6d485a8238c53c5f2107485869c9cc9943" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.14_macos-x64_bin.tar.gz", + "checksum": "60d6df2b585f54ee8781c973445ccd22c90280c8f9577b49e98f5e2a592cb3b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.14_windows-x64_bin.zip", + "checksum": "7200d0ce6134fd185428cd2760a4d8427f0e07f78f9917f1a3634152dee2b459", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jdk-23-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.14_aix-ppc64_bin.tar.gz", + "checksum": "f9c87514f70bb3c8a4f3ac96b7560e54510a609f6bba1a12b57e4a939bcc4b78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "5e8a2a20320233c92e145d09df45dee0a4e0b8e4b25529d3f2b29c634bc57d96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "e68ea8db7a0320de657c5025185e6a9f7eb181b1c494c3f6a5da317cd9345a86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.14_linux-x64_bin.tar.gz", + "checksum": "019ef7abd4df75c11cf6e84b5689c065fb2c56a8db3cff77eac058aa33054756", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "a149f030675d715f262b03b9099c307200326bcd6f55b2c9da84c6cf9bf72bb7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_macos-aarch64_bin.dmg", + "checksum": "913e851ff918a42bb73a4a10a8b1a6826072a913512b430f507a74e339853403" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "02386f2cf32a51dd4bd94568a07ff1d5fa6c56f70b56533d068a27d7c6140483", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_macos-x64_bin.dmg", + "checksum": "9dad6cbcc9fe588b44f7f5c1a244116ffbfc18383e30073a6a27b940cc515e73" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.14_macos-x64_bin.tar.gz", + "checksum": "1feec8dbb34c950224649144e8d3a550e31c8dcf43a38c8a7e350200c9d5f5e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.14_windows-x64_bin.zip", + "checksum": "95ed26a5b9fc4f0941f8b4c976443601dfa38fca196ec932a7dd2c9c7d501be5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B14/sapmachine-jre-23-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B13", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.13_aix-ppc64_bin.tar.gz", + "checksum": "25e1114c91bfe51f0b71e7993144fe0f5800b3cd9b4661876b1fd234ef242816", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "00e9a155affa0755d7958339bed733dd1d0d0696fd3f0310b4546dd1477eb270", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "3ea6c9f9f5a4dddd38fc71c9fcf23426c6e573d88541856abb333bb7e0442cfa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.13_linux-x64_bin.tar.gz", + "checksum": "444bf3b3410465746874a777a83b158963d8b92e2a20ace6e5d5c8e6ccf5cc91", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "0ea37891c558b41f233b0426d49b60233b36d5f3d7427f290b8f8bca203071da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_macos-aarch64_bin.dmg", + "checksum": "c8381ae86dba7229aa5808b6db3fc10e30a80474b4ba4a01381150c1c8d4ea8e" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "edd2d423599140de3dce7eea5376a2646ea236b7d3c58214b71af33cf60e42c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_macos-x64_bin.dmg", + "checksum": "05570146976634a4cb1192de7def6b1f0f03d14fe796c09dc62ef197f676fd08" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.13_macos-x64_bin.tar.gz", + "checksum": "cc44d5266484871f0e82467b978ec6fadee983ea8da328a1e5b2bd0fd7e7cd1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.13_windows-x64_bin.zip", + "checksum": "bbac7dc1687efbfc89dae6d7c3363b55b20e14a8851eb6fac2ffe0e1216f75dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jdk-23-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.13_aix-ppc64_bin.tar.gz", + "checksum": "dd3ea88d86735b7c31fa85858c5f09b161e56c91d9399cb935c12edc50b3e825", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "0b031fcb722e0221c3e6bf64aca8492e826599f7bfa46808df5cdd4f13d66fe4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "b922d0bd346be5660226368b8dc79c69d94f748c0c998e8f2eaa559a44283a09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.13_linux-x64_bin.tar.gz", + "checksum": "f1aa889db777ad7833ad1d19d52d4ba80265d2cbb23608264df64c123f5ce8a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "0fbe76f6ebe24aaa02ae805c51dbe51271c6c150f305911340b9244a2c4187e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_macos-aarch64_bin.dmg", + "checksum": "0070b7acc5753ea87ef41b8a09601c1ed0e0f7dbbbf23a5108736360d06c5a88" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "674955186472a9adb20af4686a1f1ed4e0a372f265ac7ad670c4af839ea5a412", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_macos-x64_bin.dmg", + "checksum": "c5b3b9a3ecc25414f1c1387d272d6f63a487cf522860609ed0af6f8e40ceba20" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.13_macos-x64_bin.tar.gz", + "checksum": "1e0cfafe0092ea33bff214fe88f68e58dfeacbb50ec2d340a0ebcde1983637db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.13_windows-x64_bin.zip", + "checksum": "428459331c43718a782d03c435207dcad9d53d62c18c2d38d2617a722ba47aec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B13/sapmachine-jre-23-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B12", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.12_aix-ppc64_bin.tar.gz", + "checksum": "1a3aac6d8bf329eccf38b28522e55e4b5d220031307b594b2762e8f0818886c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "383cc77f8262f4fb6868bfda13b6ceba6397f9ee7cc91f82456d67c5b0fbc1f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "b014cacf2e314bffafc44b615662b4fa36cec81b93234bf7cef80b9d5baef300", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.12_linux-x64_bin.tar.gz", + "checksum": "11781ffe641f3081878b4edd1695da48030fddb02c2a7bea354ffae731414ad4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "e407483ca797e0ac4a3146efabf912d037d5c227fbf7e5e673bb82b3bae3075a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_macos-aarch64_bin.dmg", + "checksum": "f2b94a5af637bad2e507ae8757244c832a3bde8ba8ec9bccf1d360299bcb36c9" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "62ff6fefbb70db73e81115bc6619bb4431699257ef864857e6792acbe6a927ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_macos-x64_bin.dmg", + "checksum": "040928dab36aa7208a3fa4c824fe7032b18ab0be5e414cc42a09d8e293c4e185" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.12_macos-x64_bin.tar.gz", + "checksum": "ab1799bd4a3a2dc6dff55dc257140f32ceb121759dc993ee775a462117aa5e4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.12_windows-x64_bin.zip", + "checksum": "f48db8e4f3f3d3a81913679ad71183a5d194057ed47081ae4990d27655109717", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jdk-23-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.12_aix-ppc64_bin.tar.gz", + "checksum": "c38dc21b10a93e9050803d2e0dcf3dc977afb761e55c0e0496e79b3f2ed628fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "7e9cba21d559ac407637d78cb932a15fa371104352895f2b630e984f1e630e4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "59777daa38a8abc856871bb9c06cacb3ae7abe69a8d1e5e57bf5869327b2b896", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.12_linux-x64_bin.tar.gz", + "checksum": "e552df626af0014f9e196c47947aa143061a3958a0ae06aa5b37ba5ee3880427", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "6456721f2f7c0b91c436090714e29cb5e899d72505e231a957c95223a91a2196", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_macos-aarch64_bin.dmg", + "checksum": "6a097d1743f77def35b40f9760e507fcadeab3041f0dcd70378453ec0a56473b" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "93100827bbfca972cfb3b6182b0d95833c3bd0f53e46241b9fb48b7891ad0a90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_macos-x64_bin.dmg", + "checksum": "2b228eb1bf9d290ddf4f68f0e5f36d5d79dc9fdf25272984252461377e1ba825" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.12_macos-x64_bin.tar.gz", + "checksum": "9a037f7bee1de44860c26bb30039fe0863336f0762a79fca0eedd1f8dddd804f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.12_windows-x64_bin.zip", + "checksum": "a9b9c9cc06bf4afeae2a36079a5ccf018eef2e61b35e753a4e5acbd10461a23e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B12/sapmachine-jre-23-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B11", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.11_aix-ppc64_bin.tar.gz", + "checksum": "cf9c9849fd8b8860524972355ef552b4b660f6ca39be795e0664b6aaca096ecb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "5916f056d3fa25e1bde25ea0712b7ea2308df86546db0eb211f074910a915fdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "73bdd90c5dc8713240fbac330ca899ec260876e0de68c58a9062a1e8c840465b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.11_linux-x64_bin.tar.gz", + "checksum": "f55515ecf28bd89eca21503c9b1791292a257a329976cccd99a99d2638738076", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.11_linux-x64-musl_bin.tar.gz", + "checksum": "742d4e46f45cd25cad385db023201149aeeef2f9d6937dfc818ba5961378dba4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.11_macos-aarch64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "4cf729fb2438d722b1355b8328c36d6d2e5e7bd591925aea6b17069c4f1eb2ae" + }, + "dmg": { + "name": "sapmachine-jdk-23-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_macos-aarch64_bin.dmg", + "checksum": "ef60d16aa131380a80df0b72a2779b4321b0bacadf863d322cec5fd50623f289" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_macos-x64_bin.dmg", + "checksum": "6f863785b10bec5ac641457ac22bf46ff8a16892a9dae2e53c781c3a74f70fce" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.11_macos-x64_bin.tar.gz", + "checksum": "d6ded110239e9ba90f157ca66b0e4ed31908bb58b54a6fce61574e94b502bc2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jdk-23-ea.11_windows-x64_bin.zip", + "checksum": "e69aac032a23ab9213ee207c78fb5bff2f9736716e9aea9cb1ba25c302f0518b" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.11_aix-ppc64_bin.tar.gz", + "checksum": "c5a062057c5410177a40ced2260fd1901fcc443dcb7f36956aac53e28a0bdb00", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "ec22a64636b4464b1dd4956d3a94c7c6e88f42e47d108da4cbc9c5a27b638a99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "2de70ef8d01a37793d86e60472dc63b65aea97e559f368fc63f809da79c625c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.11_linux-x64_bin.tar.gz", + "checksum": "975f0bbfac6f492966c9af594978614f7923e986516c6a23994102a3833925b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.11_linux-x64-musl_bin.tar.gz", + "checksum": "24b26d750732e469516a34ff75730c3c2f775056999f6efed45c27534944cfc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.11_macos-aarch64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "dc316731a5409b05c9872e592d26d44f3c681ea208ecb7a268989256fdbfb981" + }, + "dmg": { + "name": "sapmachine-jre-23-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_macos-aarch64_bin.dmg", + "checksum": "bbc6c5eca03b4bcfc721f6882a5524d8ede744692215598f0bce4ee2556a28ec" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_macos-x64_bin.dmg", + "checksum": "0975f540cc4b1c9bb0a3c1f2cd1159826e6d952dabc951d8ec076f9432f7f55c" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.11_macos-x64_bin.tar.gz", + "checksum": "4805c52446603b6511dcb084c8bf4b9c0c92936e3f8c2b28e6e4b01fc8e9154b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B11/sapmachine-jre-23-ea.11_windows-x64_bin.zip", + "checksum": "a0941156cfca288be174a88eaadfb47e3889fe1e92b8b2557c1dac5155bbf22d" + } + } + } + } + }, + "sapmachine-23+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B10", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.10_aix-ppc64_bin.tar.gz", + "checksum": "c74978c883a709886f53ddb7309325cb6d15b01b6d2dda181a43fcc121c73bf3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "e2f725f9d3553d8b41b9f9916dd949ef42a7d1558818127d669dde42dd3ffbd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "1726cdeb7a67f5324d1f320e1ce9b7440bb66475432c8d45a660ba6301259059", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.10_linux-x64_bin.tar.gz", + "checksum": "665f66037b33c1c7f6b761bdceba92d6497e68f35d2bc7ad8e96b0bd8347de5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "2bbf9645b0a063f082601c17fc3fd94674c507886d7ac187f4879f094198bbe9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_macos-aarch64_bin.dmg", + "checksum": "8bbaa23bd5f41e39333c44f35a399035987756dc433dc173acbc5f75e2cde5a4" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "83f7b1aadc8b05070f20ad5a23310b7dcbfd2f05d27ddd5ff6a520eb5fc7709b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_macos-x64_bin.dmg", + "checksum": "a6c7fbedf9ea696cb6e91be158dced5e20a9d3dee697440b6b9cd9a4f7743a68" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.10_macos-x64_bin.tar.gz", + "checksum": "838b166e0507f2cbe167a3df9382cec6f96ed482da609e9a49993f5ac672beb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.10_windows-x64_bin.zip", + "checksum": "437f6dc433baae0e36e891d724bcbc6fe4a83865bd2cc4b84c14a26a34cffc10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jdk-23-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.10_aix-ppc64_bin.tar.gz", + "checksum": "57640a57b06d32f934cbd5257573b479e0fab5c4d75698da76f968775cf5072f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "68c289b94c7b249ae30020ab0b4c2fe1e7d06020f2080eb9ff9eef37a94e7798", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "4952a2a4b4567e73c496c826146c45a300cd0054c3a85f4353e58f233119477b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.10_linux-x64_bin.tar.gz", + "checksum": "7a29260fb4d76dc412bc6669c52d0fbd0e23b68c11e319f29d84a7bdf51df22b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "356d8d53ce1d9c853428758c8e4356ca7eae65e88d6d310cf73c3ec7a8251dad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_macos-aarch64_bin.dmg", + "checksum": "23ad9773268656acaa0728c67faf5b74662bf9f9e08f87008134808eeb743881" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "6d7e9dbce3543069cbf68a28a6f8751ea996a22b721fc1ea49546fdf8554ef74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_macos-x64_bin.dmg", + "checksum": "47789a5c9a2f707399bd7ecaf6f2d49d814fd5e83524067650af031e1fc4d590" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.10_macos-x64_bin.tar.gz", + "checksum": "ef483869e0440ed4d696cb47242bda4e1d09c05c9423727a27c7d3e968a35276", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.10_windows-x64_bin.zip", + "checksum": "cfcadc14a5464d77a974c9e19af20bd395516a1a489c183a1b4e679456be00cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B10/sapmachine-jre-23-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B9", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.9_aix-ppc64_bin.tar.gz", + "checksum": "0b6c414af9d0ca53ebe3b6cf3cc83339dbaf5f1e4d9d0f3685f73c67ab3de00d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "c2558806aa57f70a0eff9d753db2d4d2dc1578ff6dd39950423098cd1b8f60da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "782607d300ac8f216441c48a7fa7827e3c9d02c0600b24dc78c4a1c0db6cb2a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.9_linux-x64_bin.tar.gz", + "checksum": "450add210a0deed8f31f0efa328048f483dd15c3a855fab3a5cd57ea9eaf5efa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "d68cdaa2af1bfc558741df405eb8363aa5b6fdb6740f3818e12851c12f8834e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_macos-aarch64_bin.dmg", + "checksum": "b67b0143d5534eae08314be026fb740e7b407fa5fe528b614ae357d7fec48fe7" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "4fd7ddf142f51da4614710829955595e58788ba8c23cf34d99e7a0a082c93955", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_macos-x64_bin.dmg", + "checksum": "038c908611d8255c8394ceae5895d2f6cc69fa7fc0f010e2a853447ec5ce22a9" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.9_macos-x64_bin.tar.gz", + "checksum": "e4f7d5a9f1bcd599c7fdb4d62077e08a64038c6da1690cbe6b0f678b64a9289b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.9_windows-x64_bin.zip", + "checksum": "2ba79c03edb3347df18da19f683113000e8ea0b39b5c50ecc7150967c766c9ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jdk-23-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.9_aix-ppc64_bin.tar.gz", + "checksum": "e7879df5e1ff6061f865b5e176a07b3f7d80ec468e60d4482a63cf2790298099", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "e703cdb020b571599dff4cfb0ec896779283d42567f4be493b5bdee07afeae56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "0d7c00501d774da077fd52318a5015adbb2368018c705e6ac2d0e490c85116a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.9_linux-x64_bin.tar.gz", + "checksum": "4ff8e93b12bc5939d0d5241237b7944f14ec9b5d0d54d5607fa4da1510e200af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "b27b140eb60601ab2b316fb7243938f9578abbfd5b106cd8c24ffab0c7ed1017", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_macos-aarch64_bin.dmg", + "checksum": "044a8fd517eae6446152f0e1f264ac7a4e28161cb4c60b2384c7da7aa83e3e0b" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "e5fb70f48618cc5df3c8d65060a67e6715f98bff68c21ac3bfc94bedc406fc65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_macos-x64_bin.dmg", + "checksum": "70a3e445f3cf326e5687c18a45479afc468f9469811679c841331738c42f9de6" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.9_macos-x64_bin.tar.gz", + "checksum": "85b9276e52b673d4ce7655aedcc26e5b0f2fde88f40e5ee4c932271fecaaa247", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.9_windows-x64_bin.zip", + "checksum": "c5fad65cefbeeaa86809c41255707ab5a01bc323cd56f565c21bd8271c2701d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B9/sapmachine-jre-23-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B8", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.8_aix-ppc64_bin.tar.gz", + "checksum": "fc47e1290f800a1f0a31c0e50df612e31cd204894542126a23a499c883316a80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "ee947682fe93a8763b88ae366548581cb1b69a5584de675487746890dca81dd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "dfef33b08457d7407602840e9650df8e9bd815341d61553c5a1a28c753b14429", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.8_linux-x64_bin.tar.gz", + "checksum": "6ed3c9db98dbf31f346bfb45c04b23158cf68ce81594d31ad40bc2f377c89538", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.8_linux-x64-musl_bin.tar.gz", + "checksum": "40ffc90c0335b421954894c856aafa1a1551f0f6f381eb8b42fca107740b296d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_macos-aarch64_bin.dmg", + "checksum": "bfefa7400f072927df68c14fbb4ca94a3291f158789293eb9f7de9e6ece6af8f" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "cc86ec7ef3240f14f95840a10ae57f3d08b00cb5c35bc92e54ac03d92158a815", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_macos-x64_bin.dmg", + "checksum": "9f2ff5c53a454e6032bebca978f8af3a049a163be4a2484ea498a396e62956e6" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.8_macos-x64_bin.tar.gz", + "checksum": "2407558c7dc50806ef234d0855aaf8cf055460ef91ee24cf8e40414033ec7184", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.8_windows-x64_bin.zip", + "checksum": "6105707695fae1b08c1656c13b269f129d95bcad025ca2ffacd7ad11c40bd142", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jdk-23-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.8_aix-ppc64_bin.tar.gz", + "checksum": "a71307c77c951a05663c808fb92383d8617f87bf7755c0eed1c300ede0ebf4fc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "0b8fbb8b190632cfabd673e7f5357cf0e67be3831edcd8e0f847dbbd157de51b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "2f2ba8ce6beff17b009c3d1f681675f89bd7a0b1e8c1961110a924ad3dd9253f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.8_linux-x64_bin.tar.gz", + "checksum": "cd21430444bd737bda23900253815c2db56e4009c9253724fe8bc3a210ab5009", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.8_linux-x64-musl_bin.tar.gz", + "checksum": "01d6abfae5e927f51c3bd822c4425a545390d900659897bf866dd4bd935239b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_macos-aarch64_bin.dmg", + "checksum": "c3d4191b057fd767eaabaf3f19c3db2c1dae8f0dead0340b528dab6e35b1d274" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "11cd10ddf7d173c4392fe42faf6bd1939579af0c5fa6a30b40a06982cb0b4778", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_macos-x64_bin.dmg", + "checksum": "bd3e19f5a3fa9b7705d30fd0e969c937570bb6232eb2d6e878b3275497bf6928" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.8_macos-x64_bin.tar.gz", + "checksum": "ee83aacc56b3df2c4bdb391bd08aee50192f4f40afef56796c772f25db8ad6c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.8_windows-x64_bin.zip", + "checksum": "77c50faabf278152e96c1da37d5191bc3a7ae08c0e5cfddf5cff95aeb7017d30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B8/sapmachine-jre-23-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B7", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.7_aix-ppc64_bin.tar.gz", + "checksum": "794d96c24db7311d56547a3661bfda5ba6d3a064e90fdf281e5f8a02af6a4808", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "de23cd22d69bc9f43a3e42c7fa8d06f9044b97f875375951fd610e2506ef7be8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "90c0e5252c13869de35b8e8e420d87fe82d077793e96857993eeb320151cdd79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.7_linux-x64_bin.tar.gz", + "checksum": "237041a7994801973cbb630664127bd66b95e426a76e5875ae0fcdb4ebd53963", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "6281af78d8fa757c863d082ac31ad0e5688db8f5572d58eb9bf3b83d4a3ae2c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_macos-aarch64_bin.dmg", + "checksum": "a50a448a0b017f9b717e4f954f8ab6c8ab7ed073d17673cebd44eed310b80887" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "44956e39a18ebbbf85baeb71dae1bdf965a6c3a8ad9d5524a8211761682989fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_macos-x64_bin.dmg", + "checksum": "dd38df18bf0c23e7a765ed50d88c98bb369eec39e5be1433e7ba5d3e8273f35f" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.7_macos-x64_bin.tar.gz", + "checksum": "a15b763372e52994848c20bfe8f0ce7eb82675419809e6659350f8f786051c5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.7_windows-x64_bin.zip", + "checksum": "b878859c3e0ca628a4e3354a9b0359073fabc4d939142d84c0a84d8d08b285bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jdk-23-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.7_aix-ppc64_bin.tar.gz", + "checksum": "1cdb56a61c9dd3c084b9e577fb4f52d03fe9f39094a21c28c0164844a896376d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "beed79ab7c852cba6429f5dc5eb0008b0edfe5c6619654072d788516ff369771", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "67148078f20167c0297d81d77261810c0bf345fb09114b3990140574505b0b9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.7_linux-x64_bin.tar.gz", + "checksum": "8b990816cd8c6c553cf923bd61ab8e432c0063146ded143b471f405a3e24f73f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "d2ae22e6ea70deb12a26bf5143383f3e3fc245a11f5ce90f5dcf36a7ea6b74f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_macos-aarch64_bin.dmg", + "checksum": "06bbaf201f464186c1ef4eaf27326409b7c7d164c226fb32fe99d4b4ff4dba14" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "2080068d81c9dce16a096ecb6ae8255dd33ae5b11a03ecabad8042902c9ededd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_macos-x64_bin.dmg", + "checksum": "8199752268812d5b693b961279c09791a75079c05807abcd784e082930a7f800" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.7_macos-x64_bin.tar.gz", + "checksum": "df4e78ae07b1f0b3cab7178ad80761dd1aa7496fbe4ad0050b67d85c32c63cc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.7_windows-x64_bin.zip", + "checksum": "0bc1d4ba7010b0a77b9131ff22cf177c216b91f6d0c0dd2b9189ba8c39277d3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B7/sapmachine-jre-23-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B6", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.6_aix-ppc64_bin.tar.gz", + "checksum": "e7ecadb06941652ceade99c8b283c099efb70fb2ed5c56bbc354ca0ab89a61d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "d8b99ee96eff328a3dbb2047ca727a699386b1e29d3c2a7e6097114d882f521f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "3e1fbc985712746aa69093d271fcabd2905ae6b70f658b3e0d506cda2589413e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.6_linux-x64_bin.tar.gz", + "checksum": "ab4cf4f98cf26a47b9a8277022f3303f3b690aa3ed7a342f5c1b7ff19261ed78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "2fd1c5ee78d95b033cc49492e77efd83755031c8de3f5f6173a2f259a12dfb36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_macos-aarch64_bin.dmg", + "checksum": "80f649bdc6575953d5872f18753e9356b42e707838d9c7afbed5ed6f55e77a4d" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "f4c95f677126f31c2b880a4f486e8cf2cc52143691a02523c2fcd0aa86ce884b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_macos-x64_bin.dmg", + "checksum": "5d7edfe8ebab645b7a893e8f77986f846275b40085278c1e3db6abcf88c114a8" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.6_macos-x64_bin.tar.gz", + "checksum": "93a9336b4e212aa482f8c01237f333207259665aa2224cde28ccf8dfb8e5c972", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.6_windows-x64_bin.zip", + "checksum": "03c2e30a5e4d6a4787bd617f989e2f0cdc6d62006fc9ed121136c54fdc6c08fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jdk-23-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.6_aix-ppc64_bin.tar.gz", + "checksum": "5c03ca67db06e6c328ed64457814b7ad836961afdfcdd0e6644feddf3c93d60a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "f1a380d063d8a05d9f7f9cb424f65c6a831f31e1231a2fb8100fa3e673b01e14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "6a8221cf24898450e533f12b8ac70fd57ec43a589b31d3ceb00c5803b5c42546", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.6_linux-x64_bin.tar.gz", + "checksum": "57009a50b68466077a9f480dd32f629ff6b839b720cc481bd97479b2a714690c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "588c4196791ddd0cb95d824fe1e2464413a04551b9c2c38cbbdaf7e8251a5227", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_macos-aarch64_bin.dmg", + "checksum": "ae84ea5d71599a9c006582a21be62391b81ad638186854fa5c31b997154d8184" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "a7ed3cf928dfa0f19dd667b001e02d2434c92cfc71cfc17b1da6b3e7c01c86a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_macos-x64_bin.dmg", + "checksum": "72f7f12192f81e7dc5d3b8bf2d4f0ce05304869b3747352ac8d7278ca6db01e1" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.6_macos-x64_bin.tar.gz", + "checksum": "5101b7bb4e32078da429ffb9e44dd4bea1caa9f3c2d81e858d92e53468e51ca0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.6_windows-x64_bin.zip", + "checksum": "d3bb9acb535500753b8a9d7495c4b11a9509f29210189e9d26999457d8eaa733", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B6/sapmachine-jre-23-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B5", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.5_aix-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_aix-ppc64_bin.tar.gz", + "checksum": "f3c86fd1cf50de34e6166f72eaed8482ce2c40d589bba235fc2d49913824881a" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "a1554418b09e4a527c512da3c296ab224242dca5daf75c44eb51afb8d463c3de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "a24c11039cab7bf74fbf3298a3111f32ebb46339d89333aefa544f9634a38eae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.5_linux-x64_bin.tar.gz", + "checksum": "fee85392729005d579b04872c85a31d8340c44f2fe20cdf78e404c970fda033f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "47db6fab19d178b50a5e5ce86a34f146dd4af0ff904d4370d036c89988c131a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_macos-aarch64_bin.dmg", + "checksum": "213738b279003f3e7386bc4b86ab581770f1489656c044ff398189a747b1d21a" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "852e15a554ef249168413c7f381f883ddb63713bad5ec5b033fba6aee55b4a2b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_macos-x64_bin.dmg", + "checksum": "65fca9b722206848dc7542f53eeddbb3ea5b63aced17218d7ded329a990c67b3" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.5_macos-x64_bin.tar.gz", + "checksum": "e4f40b3298db39f7631fd61198fdc5307c08066c0cb9cfc8d5b77f01aa3770bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.5_windows-x64_bin.zip", + "checksum": "2f2083d2b92e73aecebde8ff0da162141902a178d0b3897809b1bb36a3e06f8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jdk-23-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.5_aix-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_aix-ppc64_bin.tar.gz", + "checksum": "12bed3a32f387dd3781755a9340576507aafe1f6e8c5efa2dcab325eb790a82e" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "ecf8c0d0c77cedb445160b722257ed53842e24f4c1391b1337a67dbfcbd4a5fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "731e84b4aa28535873f6662e55dc5596c8cda736cc6779a99b2fbca49153dd4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.5_linux-x64_bin.tar.gz", + "checksum": "65e4e81c94642b084a71a13d96d8b45584ffd8ae654ee5e212212da15fece2a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "cd53424304bfc70ebaefd387e9b56e3a6af395a7702aadb6a5fb361748307878", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_macos-aarch64_bin.dmg", + "checksum": "9d1f23f8f5616dec518cb154bd944fd5b19ac9b3f70bab2e09fe8fd18650a4b5" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "70f7ea433e0aca35fcf89ac954af11dccabcb033609f260ef6140cb4b1d4b4ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_macos-x64_bin.dmg", + "checksum": "bc59c7067801b565c0cd7179e192d6c469d44857742aab799613113cb8d18383" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.5_macos-x64_bin.tar.gz", + "checksum": "2d56d56b20200fa8c1c7d0306bf4dc55de916f463aefe4289dac0f1061877cb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.5_windows-x64_bin.zip", + "checksum": "8919a7fe163f481010bd0a10a7b8781eaea610fdbc85a60541d874069a3330e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B5/sapmachine-jre-23-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B4", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.4_aix-ppc64_bin.tar.gz", + "checksum": "3ad32d4d9050097454b8390d936fc7698e55850d78810d44a1450d61a3f31e90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "805cbe425a49b2372e67bf8005f86f64954388ae0227dc4260458e0de749da67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "4597601dd67ceb61a20c5c3620b60b57b815361864514270d1bd208b5fd5a123", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.4_linux-x64_bin.tar.gz", + "checksum": "8f5e5ad22d51d6f0d42e0189d5e5d1ad1518b03242d9e86b3e526a716ab61e08", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "d59ba37c2dd35823e5b12811afe44923e44481997773e5680d29f372ef2f496b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_macos-aarch64_bin.dmg", + "checksum": "f61d0585e208fb8c1498adc95c6f20ee623d1eb9e2dafff10c1c2831ecd31431" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "1da7d76a4e8012a8739a827cee57a3b1e66dfef29b9506cf6dde93b29252a860", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_macos-x64_bin.dmg", + "checksum": "f974d84f55e269f610df03b4b2adf94bd9029ea170a62f3a801b08929786a86a" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.4_macos-x64_bin.tar.gz", + "checksum": "6246fbd08ec063d364942faa2769dca6aedb32701790a552042e1e597aa89d69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.4_windows-x64_bin.zip", + "checksum": "5119884ff3334006d6d82c36ffb38140c11ada28e7411c25a8ce970fdd07dbd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jdk-23-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.4_aix-ppc64_bin.tar.gz", + "checksum": "9f8945fd520aca33443fdf5baad9f62b819d0413726ee8db954372159a6d8479", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "470eb09b3cedde32a762a9f6f1c9a20d476025823d63196fbef38f394875d251", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "632e21f75a0dc21ed3692ff8890c4c8c95a6ba6c3a1ddd4613c218c3c7b7e227", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.4_linux-x64_bin.tar.gz", + "checksum": "653f02b98a8ccb205f1948676eeb33329a5bb7c7cc7249057500305e03677a7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "94de3e3f5e0a52ec5f79aa5fcae04971c985bb02691fa4f5147f7c0cd4c1e4d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_macos-aarch64_bin.dmg", + "checksum": "ca3fa797d112b5fbb1d06b07506069a675f9b3677abfa2ab6263a45860a2af69" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "4662f9d81a306c183493422429b56efb28d10a0da82f74ea573b318b42ee977d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_macos-x64_bin.dmg", + "checksum": "2470b9e78899108ac596bc71f227fbe36e163eca82d54b786dda855f96b70187" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.4_macos-x64_bin.tar.gz", + "checksum": "f1ae12922e6f0a83966afd674a583d331bf29500ede649343a2d28a12e6f3bb2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.4_windows-x64_bin.zip", + "checksum": "40faa404b9bcfad3ede2fc5ecb685681d3adf7a05c4f11caa4a6e1584f67d213", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B4/sapmachine-jre-23-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B3", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.3_aix-ppc64_bin.tar.gz", + "checksum": "f8a7042ccf03107a2ff017ea15b83ba3ad2e5326988a267c67a74a811156ccbd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "360e2af107d8e06dc95c0c4cc673d8f4917241861510e14f33134751d1d6b95c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2614cbcbb8ef4777d6c329bd416fdac95adfc591f0215d52abf500c34b5e07ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.3_linux-x64_bin.tar.gz", + "checksum": "ebca4d0dcd24ca853f114595cad6bddd8ed9c1b0700ae1530de067d1f4ef682b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "944552bd38bcfe9e08d320bde1abd7056638698a2b2918885963e7037532a9a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_macos-aarch64_bin.dmg", + "checksum": "7a8a82af56abc3b3d1765990c76f9fa0ec549895c316189ef2dc7ac23328f4b5" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "bc60e85a46347205ecf2ed31fbd4b47617ae291ced56b3b2518bc980cd8656a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_macos-x64_bin.dmg", + "checksum": "54b5b7a2f33857651d502116aa3228031d7ee5ae717d7bf10f7d5626909c27bc" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.3_macos-x64_bin.tar.gz", + "checksum": "bf5b2316c1eeb634bb2e77970cd90630dbd63a7acf3ebea303a91346ab8e40b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.3_windows-x64_bin.zip", + "checksum": "5f4795ac5ded12f2a69b20c1fcbf6db6dad7f8d727e75061b8c75415b3c06583", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jdk-23-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.3_aix-ppc64_bin.tar.gz", + "checksum": "a95b66fd32554ec63d3e00a701674c4e805b64dd9d1b88449ab3c057435a49ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "13e88a23d1f76af95072d3ed3fa38d02e0f190bce01b60c8d32d4334d02b61d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "906efcbfafd7b23960ad32115d9d50836d818ed693692a274c547c182039a332", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.3_linux-x64_bin.tar.gz", + "checksum": "2d8ba4969bec4e2d2025f7776699915c3d943b28b93b190a4dca0e2f44a64d92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "13f4b446c1cafe967dd6d2331983557f6d3927e62228fca4872826014cabc435", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_macos-aarch64_bin.dmg", + "checksum": "0f1167e6e20aa21768255535b3f2aa6536b17d1b9d820e04270536c54ca0127c" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "632c1b25d1dc3f79d8dafe0c4c680f1005a85de4343ef11ff23e95960a10aa1b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_macos-x64_bin.dmg", + "checksum": "8c53d61397875132e192d3d18960e186bd34ef502c4f4db259f0bc5055d6ca7d" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.3_macos-x64_bin.tar.gz", + "checksum": "64d1093be2b47555f13f17b3b14a0543f06459e50ee5454eef2088adde41e3bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.3_windows-x64_bin.zip", + "checksum": "8013578a693b9a36bc81c61b7105dabe06f3af412d4321646ea8191988dacdd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B3/sapmachine-jre-23-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B2", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.2_aix-ppc64_bin.tar.gz", + "checksum": "d1606ed0fa72d08b17128ad527de00ecf80457be895c9a80bdae2e6deefafeea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "97e9bac0f0b4918d0e7039b664733f84d066d71e8acfcb3702f70f1d771469c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "986f601e07b237d322468b94c79b1b88f289e5ec41d7cc57718fef55d593ca46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.2_linux-x64_bin.tar.gz", + "checksum": "04a7376a13c7f8a83427cc9429a68472a439f025c9c99d581c5816cd911edb23", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "8e1a910810494315fa94f019bbb6b5dd36e4a5d751643a19214e763e1708041d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_macos-aarch64_bin.dmg", + "checksum": "a2bb49af88c7a9d6f5a49bd80875017f98a0bac3d33ab05a938b06f64fa8b277" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "160acab2c341bd60a856d063446d1cef0954503dbd13e9c8c5c29a1b79867010", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_macos-x64_bin.dmg", + "checksum": "9000bfe122e0314c457c007054dfa8b591cd0ac28fbf841e10345c5c775b2332" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.2_macos-x64_bin.tar.gz", + "checksum": "10d06b653427239c44627c8065678fb0c39743ce9e906ee5a5913686b010d5d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.2_windows-x64_bin.zip", + "checksum": "0678fcc6b018b74c0651588bfbbd1fa8e2de2db3dd0e919a8fc1e3ac69051ee0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jdk-23-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.2_aix-ppc64_bin.tar.gz", + "checksum": "4266a93249377f136dae7a221cb17e06262ef20d4b575c10f44d7df63acfab7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "93cf5dfcc2351ef46c40c840034bb746b2d5c566bd144db3b9a87e543bbd83a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "c858441cbd010d08b9126fc9372b822c14603b9510bb53d1da6f58a41e480ec2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.2_linux-x64_bin.tar.gz", + "checksum": "3282436988d62ad04d89f76af24974741ff408f4e25a72b2e540747d5c97f451", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "647e5d78f09b09357a8ef9b876980285c89bc758768849d12293bce350ea7bd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_macos-aarch64_bin.dmg", + "checksum": "0b7e7d1186f13694e85dda4740186429d14241192ddc09c030b7f2aea1be21e3" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "35d4f0efec01112e02e193985b968c86879a20a2941182ac1eb17293d4cc8707", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_macos-x64_bin.dmg", + "checksum": "8c0dec9deb5059ce9502fa7ad62971ebc7f70fbbbb6915cc8697f48f500218c5" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.2_macos-x64_bin.tar.gz", + "checksum": "71b073202e649f42fc83949e95ec5040b8f452c52d0606438731951404ab576c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.2_windows-x64_bin.zip", + "checksum": "2ef927158690e430d65546ae48f27834b299d653d63fe647625129cb55585530", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B2/sapmachine-jre-23-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-23+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-23%2B1", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.1_aix-ppc64_bin.tar.gz", + "checksum": "427390401cdf937162ca046518780a4d3db6d8c64ece049a0346391ced5add2b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "7aed275ec116ca16ad5519f225eec8516f5b3e43a54c4f43005e2e1dbfe39ec7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "586e52aa50b8dd34fdb1b418aae9beef1b1d30b6364d6e54ba8cdc3f916d683d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.1_linux-x64_bin.tar.gz", + "checksum": "4329f672185b5b1bfbf6b998059eba1fd483b5c4e394b8876fb6330d43207477", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-23-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "9835d3bc045bda80e6116278cac2a42fdb2c20fe433779cd679a7df20bdb67ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_macos-aarch64_bin.dmg", + "checksum": "542ee75d4b457dce2639ba9dbe4529e0834af375399bb3b86ac5908f2dca1bd8" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "81a8df4aefac49ffaced985ab3c7e36c0289eaf18866a9f4a792a7171f5179ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-23-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_macos-x64_bin.dmg", + "checksum": "10bc47c919751fb984a89e128ef74ea33e047d1a047fa0def09e2b423e42064f" + }, + "tar.gz": { + "name": "sapmachine-jdk-23-ea.1_macos-x64_bin.tar.gz", + "checksum": "0cfa6674a87db2635b24da49b5ea7c000ef3e19b04089b8a32896f19dad56315", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-23-ea.1_windows-x64_bin.zip", + "checksum": "3981fb760efa9c0213e8e7a8581330aa12ef34a5cd1f8fb6b0f31a20d183a8d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jdk-23-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.1_aix-ppc64_bin.tar.gz", + "checksum": "574dbacc4eab78954f3e7ceadf4db3ebdae877430ec9db9b1ee3fe5e2792a4f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "f74e0d8442a85d7597f4afd774d8a754304cfbc8492b930c17812b50951058fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "889a9ef7c7fc3ac512346de20a3bf08acc556bdca0c522a040d38c5fb61de89e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.1_linux-x64_bin.tar.gz", + "checksum": "a5441e00ad118840184ec458a6198bf981a4e005850762ee55d684eb3e9f6be5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-23-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "b007913c842ce0ca26420b7439fd03e09bf40078b1b030de197b4b4f4541e3d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-23-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_macos-aarch64_bin.dmg", + "checksum": "eb7822fe37487ef01536bd46c8e83fd4e8f8b8df8e92712405742bc9e78bfd5c" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "6817ceea4f4d87f69814bb98a366f1d278f424d8ecb4b9418d5eb3433ae232ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-23-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_macos-x64_bin.dmg", + "checksum": "afa9b42cafce132e1714d9e7c3116c3770dc259e73437693b3584759753de36d" + }, + "tar.gz": { + "name": "sapmachine-jre-23-ea.1_macos-x64_bin.tar.gz", + "checksum": "5f88cc969b0dccf47899623feb01ee26a09589b066d394750008c45d7fe691f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-23-ea.1_windows-x64_bin.zip", + "checksum": "ff6e5ce4841dc710c480c9381e157f9587ca5182b9f18d2852267b7090d34c9e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B1/sapmachine-jre-23-ea.1_windows-x64_bin.zip" + } + } + } + } + } + } + }, + "lts": "false" + }, + "22": { + "updates": { + "22": { + "sapmachine-22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22", + "ea": "false", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22_aix-ppc64_bin.tar.gz", + "checksum": "df8561ee220d9e9a143c05ecb60712ba55f1cffe9bda49f89c7e321aef7801b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22_linux-aarch64_bin.tar.gz", + "checksum": "6cffaad0274ae0534c5bed3695e54c09b6be37dd302848fc0031139a92479f6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22_linux-ppc64le_bin.tar.gz", + "checksum": "4c392061f8ab0c0cd29cab5838d246960f110810f2fd2b1a5b8fb8488e9ebf3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22_linux-x64_bin.tar.gz", + "checksum": "42c13834842b64e3a553aaee308b99802db81e48a0b7e0c87bf3a9791ce29d60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22_linux-x64-musl_bin.tar.gz", + "checksum": "893ec34b0314fd3be7a521317870098c8c46e87035d8a09de032ce98bbb23b5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_macos-aarch64_bin.dmg", + "checksum": "b275798b5028071d7637fc70b5cbe28ed55f03259793983322ea3d8e8c1f6540" + }, + "tar.gz": { + "name": "sapmachine-jdk-22_macos-aarch64_bin.tar.gz", + "checksum": "ee55231c8d2da95c1be4f85361b4cca2d0f3d5b25e63c4b649b6c4b1c7a5d866", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_macos-x64_bin.dmg", + "checksum": "528419c3ae4dc7fa04054eeeaae912407566190016ba56457dfcaa823ac4262f" + }, + "tar.gz": { + "name": "sapmachine-jdk-22_macos-x64_bin.tar.gz", + "checksum": "63f5c6ecb1aebea19892c740e0bed610a85376b0115566b83d34ded642d19d8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22_windows-x64_bin.zip", + "checksum": "1f4e8d834ac3af6c49ea3d2260ab6e312175d56a3a98d65a47659bbbce497cb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jdk-22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jdk-22_windows-x64_bin.msi", + "checksum": "c852fdb2f1f25919fcda1b144cf28a4a2f77ceb6c625bd0b215c86ae55e01daa" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22_aix-ppc64_bin.tar.gz", + "checksum": "0e7bac487a5d4c2d8935952a0a81ae342dac5112437286563c7c04061a1a9407", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22_linux-aarch64_bin.tar.gz", + "checksum": "ff829871287e30d023746c8b1c52aa8bab9611637405fa799dced307691795df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22_linux-ppc64le_bin.tar.gz", + "checksum": "db6aa65b98fd44f726e96f213d34a3c5d65838dc9bb3c561574a45ff19ec380b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22_linux-x64_bin.tar.gz", + "checksum": "661ed9c3f89b31d5aa6d655326645560051be1c18c9d0da614e7ce3743aff98f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22_linux-x64-musl_bin.tar.gz", + "checksum": "4257b60540822abfecc482b30735e18701cf910194553dbf62a1ebf4a403f10d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_macos-aarch64_bin.dmg", + "checksum": "2826d2e25fec7737509fdc7c5465c5fbb8f4c54f5fca83454f2b272eeb5a5736" + }, + "tar.gz": { + "name": "sapmachine-jre-22_macos-aarch64_bin.tar.gz", + "checksum": "961abd9d5e3ea8b51989c6dc6e3a61d83dcdd1ee3bcfdb097ca2dd785f825246", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_macos-x64_bin.dmg", + "checksum": "66d351c9cd0a7960c5be527ad8d4123910875501fecf6f7187ae9631188cced1" + }, + "tar.gz": { + "name": "sapmachine-jre-22_macos-x64_bin.tar.gz", + "checksum": "a79e279a043a11d2dba1f2a4d8c1d9f090bb10f3c34673a525130d4327ecac71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22_windows-x64_bin.zip", + "checksum": "c1dfb594083bc3d6e001dde94db25b40a309a2d50e3e2a187a4d29f6825be654", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jre-22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22/sapmachine-jre-22_windows-x64_bin.msi", + "checksum": "7435d13e51b6f97a5e9bd7a2d66892d241d07c3c9e4fd311e4b9b0a8afca8f3a" + } + } + } + } + }, + "sapmachine-22+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B36", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.36_aix-ppc64_bin.tar.gz", + "checksum": "187f472328277e5c5549b2f9f5e87c78289a73c916a0d87b68b29c8d883999b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.36_linux-aarch64_bin.tar.gz", + "checksum": "65d554d0f5f6e55d62b2719a86da9f19cb7e5a060b426bbc8826aeaea7dc7ad3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "2551d922bca1b7fc95af14cd5433eadb4d4b2c64c9bb70c3b6f7fb5ae436b4a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.36_linux-x64_bin.tar.gz", + "checksum": "5c1fbb61bc1b7386b273e5ac98058329498f63dbf98bb82c08c7d084d508f6d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.36_linux-x64-musl_bin.tar.gz", + "checksum": "6b0ab3d1cc6e0e358e97ea9e8df3a94e74293f325d661dc9a9be3bd99743a504", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_macos-aarch64_bin.dmg", + "checksum": "90424b9f1e6217fda77d6c835bd3c867300cf5cebd5187444650e38cc3c4a7f0" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "d8fe043eec5641bfe99c3c88714b8771c5db1961744571f31726776d097f1921", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_macos-x64_bin.dmg", + "checksum": "2a37e4b7cb88ea31569cf30f3d32753ceaddb49961a65c0875dd975c7928f15c" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.36_macos-x64_bin.tar.gz", + "checksum": "f6bf8e5c7e86fa226c4d937d229aa783b80435f33dab54b440dda507c38c9c41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.36_windows-x64_bin.zip", + "checksum": "6b86916b87c2f9eff59b19cfbf000139e6b1f7f98b1b989560c2cd06da8c28c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jdk-22-ea.36_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.36_aix-ppc64_bin.tar.gz", + "checksum": "5a4b63d45e777aa47e1b82a6d188fa3bfdcc40e541445b886d67d34802007a2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.36_linux-aarch64_bin.tar.gz", + "checksum": "e2f57f9a511922d3fe08f8221ff65dba17ddc84d7d63b3f9ac7f62e9f97146dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "d750e7cd82f538f4442d87ee297b090d94b24f6332e877b86f93a087c513e5ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.36_linux-x64_bin.tar.gz", + "checksum": "fd79bf905348ead7592051635464d34a2af613aac2c7d769f4176c6086800bb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.36_linux-x64-musl_bin.tar.gz", + "checksum": "71c1fa3f9d6ced2adc2e1df078cf1985ccd1046faaa3998183e07362e6f24c50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_macos-aarch64_bin.dmg", + "checksum": "412a19574d26ecd95078295be5c5a84ba861315eaf3dacd0b07d7d6f0ccc4163" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "a6acf12357e782301042862d28a42b0a02bded5d1bad7dd0953639702b46ff0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_macos-x64_bin.dmg", + "checksum": "fdd5dc4295c23b7eac9f06845f71687bcd5dde5b1258c0d730cad7e748b97691" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.36_macos-x64_bin.tar.gz", + "checksum": "128e38af47522b4f09a2d8a8ed85302fe59df2b88f5ff9ef5f74a1f6393b07be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.36_windows-x64_bin.zip", + "checksum": "3aa07348e9d614aa51430fb18b6eec65954a0efc344e0238d2a5467f5e332f5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B36/sapmachine-jre-22-ea.36_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B35", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.35_aix-ppc64_bin.tar.gz", + "checksum": "7091b2995aededdf474ef4a5f4cb5c867f166e6acdf78ba51c43878193b7f2ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "845984cd6cc9d9e54f0ad549c79c10d2f93798874997c086b3457a8a88c4dae2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "83fd923c9d6575aec4301cd3604b6db5c9a8313655938101e1581edad0d302b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.35_linux-x64_bin.tar.gz", + "checksum": "ca3451e45d2e1e03f1affc1dcfea8b9a6ebb830b5409aca5072e49ee60e79cb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.35_linux-x64-musl_bin.tar.gz", + "checksum": "a3ce515cc46b16228938b4e17f0c6c8460083013e6b4dbaee347986bac5d9a64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_macos-aarch64_bin.dmg", + "checksum": "16f07f13fb0d71fa0996d8a05487158f3e17102669dcf2ff9e327e9f7092616b" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "103347ec5ef5db755ddb490305b2ce6e5a59c6baee159ffdeb191edc41d0c271", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_macos-x64_bin.dmg", + "checksum": "f68573dfd07fad38bffd706360717c30060c96df7bbb50cbfecd8b3a3e26e292" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.35_macos-x64_bin.tar.gz", + "checksum": "a0fdd7fbd8034ff330b672f12e7a8c0160666360146ae7538d77b2f49eca1d31", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.35_windows-x64_bin.zip", + "checksum": "f9d88cb4d5f35c7a5c5374fd3ece63844e6af2db74fe1cb8c0125e25905df7d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jdk-22-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.35_aix-ppc64_bin.tar.gz", + "checksum": "382d7df45d133af555af9f66bca8ff748d68926c0fa2bca73ec82cbaaf171849", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "3d9f0c0f422709fca8b658c12b0de904a270b21c8937afc6c05a22ff48d8efc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "c7b069efe7a39dad635da1b34e4e651be22f30a429a7c0f44236e5a062ec3d04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.35_linux-x64_bin.tar.gz", + "checksum": "b3a604ad44e382916b09411e2704f37cf54620a2889db96f875994b95ed00ca8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.35_linux-x64-musl_bin.tar.gz", + "checksum": "a433ffe916aec2d946bfe34324e4803ca8e29da7a73bffd5c4f60bcb5ddbc05b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_macos-aarch64_bin.dmg", + "checksum": "97f292e7b771d9b4294e7e6ca2418cc68bddc1bb9a28dc11318c7ce4141c9167" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "2bd15d14e348ad01a03897601e988f0e5731c0dc514fdc2e42b545c2f370f1cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_macos-x64_bin.dmg", + "checksum": "c903924db75dd6e68a9d2a5463c2bb93f7cd2409d6770fc25fa03264873aa725" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.35_macos-x64_bin.tar.gz", + "checksum": "6c4baaa3d3678f46c2695a20b90cf9ee151e1bc1d0eb5e80d7594aac922ae77a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.35_windows-x64_bin.zip", + "checksum": "ba5a28a80eb0dc40700219dc87019cc141448aa2b1d2d8467f0162ec0be6b251", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B35/sapmachine-jre-22-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B34", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.34_aix-ppc64_bin.tar.gz", + "checksum": "d0d9c86939603569b974207b333ea35f23283fc7f7d1fc308745ebd8c8677594", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "f041061b8b76f6e72d8409e0cf677bcddcaa4658d9cfa1715dc8c16d616d6f76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "6bf5ba5cb4cb86d09a00436eb860f0b35d9bd9872eccfd8fae9dbb4bfdd18455", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.34_linux-x64_bin.tar.gz", + "checksum": "47dc3468adfb4c811107d8acb1bbc9b2f8d99e015d71a5379b6ee8ca825d9126", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.34_linux-x64-musl_bin.tar.gz", + "checksum": "8481f881067c996959516800d4c04a22bf7e5292c14fc97659fb75e743ad168f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_macos-aarch64_bin.dmg", + "checksum": "cbe6ecc717072ada709322aad0fc2dcaf40ab59effb918c5ca34588500a8a78c" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "46f36fe9626ef2b5ca84b2fca26ef550b8e4417069d61b51a084ac0ac92d46e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_macos-x64_bin.dmg", + "checksum": "f560865f5e89ca5029689ae874db3b96a4f2728426c8c6139a761958ce4b3e13" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.34_macos-x64_bin.tar.gz", + "checksum": "682cf7326549b2c2eec69e421e45cf16a594083b8f486bb8540c94786178103d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.34_windows-x64_bin.zip", + "checksum": "aeed94306cfa3b15c18892fa4053dba28a8b4005f30312bcec0e1f73738ad6eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jdk-22-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.34_aix-ppc64_bin.tar.gz", + "checksum": "9175b70fbadf757a903a6feba029775e6b1df594925722d050641441584f91e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "1805fd490e3a866cff667781d5a987453a466a406af0e3d3ab3a2cdc478f4d47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "136eeaf9cacb2f7ae99bdbe7bd83b05422b8a2e75c4465fb7131ac6f2e0712f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.34_linux-x64_bin.tar.gz", + "checksum": "637109c9f6e8d8f0de092c6fc44a25cef25f644d8aadf61c95ae052d3422ef23", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.34_linux-x64-musl_bin.tar.gz", + "checksum": "8af66e02ab6e443ba388942c3bff945f64a903c467916f16a834812a9bcc55ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_macos-aarch64_bin.dmg", + "checksum": "79ffc02cf1c89a1815d0b0270fa3f1fce0047deb3329de57e0aefc4d216a93d0" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "2a33347e0c3e76eb16f390c7474f9e3f69af7a95a908edcb51cefc624debb07d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_macos-x64_bin.dmg", + "checksum": "80498902e7976e9132d6a72aaeecaeced21ce42e55896c0246f1135d64dfaa69" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.34_macos-x64_bin.tar.gz", + "checksum": "e66b01819584d7bb0a983bc98e0e0cc0f31dee68c30f638ddf8aad6e0d8fc102", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.34_windows-x64_bin.zip", + "checksum": "c79e7d23ff95163a135b4ba46179bcbd5ca37820619a7a73be5862442ab004ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B34/sapmachine-jre-22-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B33", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.33_aix-ppc64_bin.tar.gz", + "checksum": "ed64264ef1ebc46616b7faf5df7eb1bac2e1f0468543a2c604430d37cbbb5e9e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "31e6fc1964530beeb3cd0fb0a4ebacf34be65acd6d10524b223e7d56dd01b71e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "7843b63fb029cc12f09e915142a976cdcbb41074e0f4986380042612a84fc917", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.33_linux-x64_bin.tar.gz", + "checksum": "75f9f1525119216df7da2de9e25b1ea68d1301e08cf6ad544dbd63e93244b76a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.33_linux-x64-musl_bin.tar.gz", + "checksum": "3395feaf976f56d918e9ea7a154e30d84ba9438c7b885f8aea860f6e7de2b512", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_macos-aarch64_bin.dmg", + "checksum": "22a768dffe11830126a643e87ba3990662715e330470ae209f1a1db051e9a509" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "15e464c7208f42d23b6a079aaa5764a66b9f824780130fd109b6dc1a001d94e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_macos-x64_bin.dmg", + "checksum": "ae908e11ba3b10d759e6956725ea7cead2e3b087f5121ca596c9d1a82e72c529" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.33_macos-x64_bin.tar.gz", + "checksum": "e039b3f065af962d0057a2eec11bf370c99da132ce9ea88070114203f67a403b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.33_windows-x64_bin.zip", + "checksum": "da4201a35817c8a02361a8baab420757eed36edaee6bbd75c7a90f25f412ab7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jdk-22-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.33_aix-ppc64_bin.tar.gz", + "checksum": "af12aca92eb79f524b6afc07fce5ced98f86bc476d887a644ba5d0476d31d1aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "e875fc6d9c7aa0bb50d1790df55baf37e1469e9aef58587ea6d64d93ca9e4719", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "291f226758b04a9315c6b50b0a48f5b052222d89ccfaddfdf70c4b42ffa30ba1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.33_linux-x64_bin.tar.gz", + "checksum": "61fa48e2b819b12281402ac8517947ca16e8908506c8e051e41494e20846d5ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.33_linux-x64-musl_bin.tar.gz", + "checksum": "3e09b314a59f6c9c0c5496379c17f8070e1283c447055b6791bc023f2cd32fd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_macos-aarch64_bin.dmg", + "checksum": "eb5ed10a5ca75629742e24c6383c85f831e7048d37b187078e0bdbcfefa2968f" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "a28f4482a8c1e5c01bfbc3135cc162a403a0f1d5ea317d960354db785b022637", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_macos-x64_bin.dmg", + "checksum": "a8cebe449af6746e485c1a83330f45e686096b8e0371049f88fda5ff8d024a28" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.33_macos-x64_bin.tar.gz", + "checksum": "de532caa237c9cff8fad46148a6ddd95d2c421f29b32e3a7ab8b3315087c096a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.33_windows-x64_bin.zip", + "checksum": "12bbc669a17f3dad6f7b1710076f85ad110fd52e151fbd17466bc61aa295bf50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B33/sapmachine-jre-22-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B32", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.32_aix-ppc64_bin.tar.gz", + "checksum": "e051d4c0c676aba97695c419f7bf037d7e29450396359a0869d8b964d10ed18c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "32543103a3349876d288ece9df0ae3f83ec7b2bdc0b13a63a8242188937cf2c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "6f4c6b8307abb7e5bd62515e778b77a6fba812573c7c853c3b3bfddc66523213", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.32_linux-x64_bin.tar.gz", + "checksum": "714595a0a003026704e66ab623d67ddec303b5e4da673e8eab45dd0f86258406", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.32_linux-x64-musl_bin.tar.gz", + "checksum": "909eab2b0174a6aef3942c79474d3691e98b8fb34dc9624fa7a28b6d45ebf6c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_macos-aarch64_bin.dmg", + "checksum": "ae95a7035d19c95e80bdbe09b3aebb5930db8be675133ee6780ec4d14997c665" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "f308a5b117de04ab7e710e8e8e67c2b945ce93347838eea87318e5e04a0e9dff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_macos-x64_bin.dmg", + "checksum": "0b2d9ac36cd834e4f16926c9c88e5168bb7039674abf97aa2d1d3375bfac4e6b" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.32_macos-x64_bin.tar.gz", + "checksum": "b0b4c28db3f76ca8f1610a569bd58941f7e5fefbfb2c4d77d703af42b18e5762", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.32_windows-x64_bin.zip", + "checksum": "2b330a664513246adc08c697623f9e4977acb240b041c4b3c0bbf6d51bf5be57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jdk-22-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.32_aix-ppc64_bin.tar.gz", + "checksum": "4ce51698e41a91ee0693f6052b3c1ff1e828f3eda96fd11fca38368c8e0b149a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "c74bb376e1f29005b897d2a29a74441aa07ce2777e60a6328352ceed683142bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "b84d4cdb94844af8fcd0b96ea69b9131e9c228131b1cf1ab1b4d8659c15e9484", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.32_linux-x64_bin.tar.gz", + "checksum": "a2b94b63b6a0d1c8cf06acd853b2614c6463bea13d93b55d253999f9ac6f1188", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.32_linux-x64-musl_bin.tar.gz", + "checksum": "e2bb7dd1309b67bee38fde6719b2668e9cfc261abd4f704db015e6e5bd2331b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_macos-aarch64_bin.dmg", + "checksum": "f3a06b01ec5fde173034e0415974351b74ad9879b295e271779b88c25cb7d48f" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "10b0362d20feca19b3564a6cefed86e4f130a04262d3c025cadddd979ddd79de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_macos-x64_bin.dmg", + "checksum": "3bdbfb23ea68bdd30fbf7f3a026d859bb4927c5cb4931eae479db1f331727a9a" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.32_macos-x64_bin.tar.gz", + "checksum": "8210b36224c853545e1eae567c139fdb8ad997271df6eb0806fd734101bf8b68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.32_windows-x64_bin.zip", + "checksum": "4756bf4267b1b3fa54a1ff433a87c2a0794ac5574ed7fde5f39de899b86d31c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B32/sapmachine-jre-22-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B31", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.31_aix-ppc64_bin.tar.gz", + "checksum": "7a11b14a8609e11804917092c39bd0c7c35a9421f8ac481fff324bfcb9726b82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "5c05a7d4ccefd2626d0c3e2c569abd87aae6f794ac40808064c588e8b99a7b16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "c30fa6c3136029899c02ecebe537f59f788c46ca45819858e72550c721cf3268", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.31_linux-x64_bin.tar.gz", + "checksum": "88254f28dc35aab2d16b22a4240be17a87795258874bdde342317447e6975270", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.31_linux-x64-musl_bin.tar.gz", + "checksum": "077960aac22caa86b19c3877da1558e9489f9964817145ee4c320259b5bd5a0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_macos-aarch64_bin.dmg", + "checksum": "41793e58f7bbd4beec0935ce017dcc726e8feb4412aa0f54e83463686ef41cf9" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "6deee438b4885bebc996e1689e7fd647c22bb70e23efd3650ef1781e145df44c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_macos-x64_bin.dmg", + "checksum": "c56b52155a8b8cd3d8b00661b9561fd026baed2ee7a616de9ae34b97626904e2" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.31_macos-x64_bin.tar.gz", + "checksum": "ea9cd5418a0e0eacf7c983c79c1d5f6ce37f32beeabb3d5fc14d919a11129bcd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.31_windows-x64_bin.zip", + "checksum": "c46c97b92ba79007bbe3f0686637c183909a40f3c903b3faf057010856d45dbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jdk-22-ea.31_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.31_aix-ppc64_bin.tar.gz", + "checksum": "5d723a6278a11b8fe6b8aab0b97923890acbfdb32f982559b43761f36582ac53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "68a7f9474b0d2c6e21a61988cd693f4c0aa72f60ac638c4f01f4800e6e9b37d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "13e8d4a643e51b73c38e6fd007893a49052202f71da35f4f4b4f21947cf6d78b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.31_linux-x64_bin.tar.gz", + "checksum": "73626b21076896db7838c5429cef5f5e0a1c452b210d06c2dba4f981ba8489fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.31_linux-x64-musl_bin.tar.gz", + "checksum": "e96e028ff7e84610e5f1ac577e6007150ba7d8a7acce813cf6147c9787f36650", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_macos-aarch64_bin.dmg", + "checksum": "c4b1768a39ca5e3a9788a20ca51dbc909ce86cc778ef1589b31e9edbec8a6212" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "340d4df635022e702584a81d3c7303a4fc3aa070e34264116a8aa8763015ea92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_macos-x64_bin.dmg", + "checksum": "6ece0ff983b09f3db58a9b68d3a4171fb48a5815e613e2b125b87b84b381cb70" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.31_macos-x64_bin.tar.gz", + "checksum": "f066e02fa1a2bdce96a22da7aec7d5b136869202ebc1b92d8991818522f1178d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.31_windows-x64_bin.zip", + "checksum": "f4a05d430ffae0ee69a082ad4d4c468879a85031ba74d8fe822e991fd1aa6fb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B31/sapmachine-jre-22-ea.31_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B30", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.30_aix-ppc64_bin.tar.gz", + "checksum": "325fc76a80c32bfd52da57da115322090fff6e563963ce59cfda1a7a852cccec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "32817dfa2a2da8351549b5996e94ad7624be73cf11d7633f1a0198385c9fdb45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "cffd435e6898bdc39542b87ce9164b5989e7c4667e911d4ebeba80e7d1512ed0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.30_linux-x64_bin.tar.gz", + "checksum": "97212b98a581a5a1758225c8c2c46cc23f846a7724f2156db0fbd50764417ca4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.30_linux-x64-musl_bin.tar.gz", + "checksum": "8b9757c09880aeb17cd1a4d8b2b553368798ce1f2ad1bf1ef60b8684b65a2447", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_macos-aarch64_bin.dmg", + "checksum": "8554a5c489cf28888d5ff0a76f52fb8d64ade8d71dc20ba693bd31c78eed14a8" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "65b28f6d5832e1220db58345b420aac85c9fbed7eba6fd513874fc3ccbd80b65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_macos-x64_bin.dmg", + "checksum": "bc0a6693439c027a238cb07c8fa41fbf2b8f7645221c456ccb9ec15eefb4ee2f" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.30_macos-x64_bin.tar.gz", + "checksum": "e8755945a847cca833c8e3a65b247037e940118b3cc3a6f51b98e98395843be4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.30_windows-x64_bin.zip", + "checksum": "62cfd3d1ce779c5093bb003785e11232e6a7e709114817cb8c9f628fd85b1331", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jdk-22-ea.30_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.30_aix-ppc64_bin.tar.gz", + "checksum": "afb0b251ef07f7897f11f9bd42f82eb20a15c1194502d360d312e90eeab20bc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "ca0ed66d15ee3163d6b593d27d3b17c55c2722a0b74e2ef75c78fc778192d076", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "642beda15ed05a0250dce6af54b2631d737c2a732ea0c5c4ea7e7c5175b9b029", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.30_linux-x64_bin.tar.gz", + "checksum": "f3b207f6faf47926d9002c4eaab0d904f638076495c13e873b59c5616d82cf5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.30_linux-x64-musl_bin.tar.gz", + "checksum": "1ae9554b52a30a23b4ad1b96555c9eedda76999aed6bc2a4d1eb32a3fa0adfc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_macos-aarch64_bin.dmg", + "checksum": "22a7bed14c408aef95d9e0108d00aa2c19435e7d49b80884a83b77d11772aa8d" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "177773e1e0e9b0ec2acd84b01a9e1be7bc80b70e7d7dd77c10a75a17f2bbab29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_macos-x64_bin.dmg", + "checksum": "f446067f83b5db37d5881b8dbd7694c1ba163fcbd3550673097080e0dcbcfb38" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.30_macos-x64_bin.tar.gz", + "checksum": "70e55d227dee79cd800eb1fa36f52e931c12cfd7d38cecd132d2885f64cd9b3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.30_windows-x64_bin.zip", + "checksum": "dc13167c3fa853fb0c3ffb2a633359284aa6a791d0474663760344cb7b6ef96b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B30/sapmachine-jre-22-ea.30_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B29", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.29_aix-ppc64_bin.tar.gz", + "checksum": "945d4d17238b9829334545448cce166789f3819e673d3739e3ea467e7196b662", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "724b966eef0964b768bebdda7ee22dfa3f20981f3d2eb7bae3765db551b1c330", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "4c4718dc86e6157b32ec1bd23cbe3bfe60a09f296518a6eea5480793e663f243", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.29_linux-x64_bin.tar.gz", + "checksum": "96ef503c35a5c172dbee177c98d955e7510de115cc37c4ed073592e5a3e52b45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.29_linux-x64-musl_bin.tar.gz", + "checksum": "183434c5654a3cd531d355ea2142e241b51182c9a4ffbf74115d460d0423d026", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_macos-aarch64_bin.dmg", + "checksum": "2ab2a563628cfb1077f4d5c6031bda844a46c4759e1d9c5b4e4c89326ebbf03b" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "f22a5ab6e4d6859db6f9e7487410a5ec2962f9aa7488dc5d3a7a59521e287a24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_macos-x64_bin.dmg", + "checksum": "a394b6be946439f2fb6501a800947918ad64bc37be828c41d6f6d4d0f1ab1afc" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.29_macos-x64_bin.tar.gz", + "checksum": "4238dcafc11c8a5a70a31d22dfbade99e7fce36c29c129b17cbcc5ada6071407", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.29_windows-x64_bin.zip", + "checksum": "180846b4a3227bdac8c65e13365ce01779e4acfb9d843c2240cd1a07434c0148", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jdk-22-ea.29_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.29_aix-ppc64_bin.tar.gz", + "checksum": "906b02c1280b7d1c9b3fb9bc7f3b18c2812eb21aa7e813a0c241f83fef2e4f98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "9b79ce6f96ea98bca69ad4b7959d4a79fde3f3d5c997f15a3efc11f07d06210d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "4dbfd175e4f58f12a9a10b100ea5d6154aa318947f3fba836fed3e024680182b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.29_linux-x64_bin.tar.gz", + "checksum": "12252e3a89642fe73dd5a483eec59a2b2589dfa081692998ae6b46080ce9541c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.29_linux-x64-musl_bin.tar.gz", + "checksum": "d34c887660daacb5ae383daff94889511df06eabe7cfbc08bd4a256690361fa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_macos-aarch64_bin.dmg", + "checksum": "9c601d61525a8fbb1f78120175a842975c13b161feb02f555e33677bd3e9d8f4" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "8a4c193c5d88eeec94e5825cc4c3b529bfa5657ae78dbe77650090429cec8d77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_macos-x64_bin.dmg", + "checksum": "6f2d67b85dae7ba87689d7405a86b5d2c098ccdda8dbc868031fa199fa066691" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.29_macos-x64_bin.tar.gz", + "checksum": "8651b3c570672b521680f5b532ba21f1a12782de66816ff43d7fd15e05c1ccb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.29_windows-x64_bin.zip", + "checksum": "360c9a0684c01b8ee0fcaaf0dc583f287ade24db5084d98ebda2307ce6c4411f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B29/sapmachine-jre-22-ea.29_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B28", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.28_aix-ppc64_bin.tar.gz", + "checksum": "f716fed8bf22d99c4b301f5388f168c38385ca541e7c3a8f94aa676b0d8760e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "9131fa0dfa46e9882114efcd8eb524c39a20f45e62e94f84ba9a5236d3dbcb24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "cd09f21c12ba0d865da30704bd1d1849a88de2f28e0f487ea05f6201f6d22e1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.28_linux-x64_bin.tar.gz", + "checksum": "30d5baeda15751235fc1d26ae60aacc1f46268e778af194c6d8431ca2f7ca353", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.28_linux-x64-musl_bin.tar.gz", + "checksum": "92d7120cb887012685c739675373d9c481b0eb9c86fbe1a68116803784319f8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_macos-aarch64_bin.dmg", + "checksum": "bbf9ec548a0555f118faaaa417df454e3354fd6469d637a2aa4dc2792f0cb23e" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "7ffc47e2ffb7d20c585721e1d4a8f8de9426e1ec2351659a2af2118f4178957e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_macos-x64_bin.dmg", + "checksum": "3f95f5f77886125b2747a8ee91bca0c02f9579a4fa1557906ccb32a51df3882f" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.28_macos-x64_bin.tar.gz", + "checksum": "3880a8b870ec198120122a2c69f893ce028e57f179d378353e5eaaa74465f2f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.28_windows-x64_bin.zip", + "checksum": "8dce4931e8b72aac94ae536a4180805c6eb4eca7722041845bf54b87b3812f82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jdk-22-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.28_aix-ppc64_bin.tar.gz", + "checksum": "b1d253a82902865de20634414b33616e866c8bbd89a9acc4b3292a4e2c4d6fca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "afa925aa22723953b7d2916e51f07b432f45c0a1201be34bdc384468bbb64efd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "07eccd6c8a3dd9ec12191c8d8f85fdaa85ea540fd3619775cf2596b5f20c397f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.28_linux-x64_bin.tar.gz", + "checksum": "9f9f3839c7acd92a698d612fad73d289617dc68edc2ac4c14a796baf14a6de63", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.28_linux-x64-musl_bin.tar.gz", + "checksum": "d27dcf520bc3c6feb41b8c73d10f4bba7f409f28f14f68d045f1a30ff22f107e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_macos-aarch64_bin.dmg", + "checksum": "a06306368404f0786a51689d96eef1940572cb8e19237e107082aa86ef4fe662" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "4bf1b3c4d1426471f06f02d78e546f2ee7ae1c089c4695cfeeb34c2fb92cabc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_macos-x64_bin.dmg", + "checksum": "b47ecd911df536eda53604f65dd0e36ef4fac966c8fb0824ad5f0ed7e25e8f79" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.28_macos-x64_bin.tar.gz", + "checksum": "e943902207afadb3b6522032265d82de5f42ad88a15e4a738c4329fa689196ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.28_windows-x64_bin.zip", + "checksum": "ad5486075809e49e4879dc65252b3e50a7384ba122c5138074cddd0329793660", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B28/sapmachine-jre-22-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B27", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.27_aix-ppc64_bin.tar.gz", + "checksum": "4f621553e523eaa64d2e556364f0999e8b07e622f9f7c3beba0e2ef4ab5f24ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "635fec486776bcf50bdd419d7639ef63a7d980eb9d9d6ce249ea47da3e117a17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "fd94e08abace7cf24666e3ed77f1fd37b3420b4ea7e32daededadd6edb182800", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.27_linux-x64_bin.tar.gz", + "checksum": "b1174f10a1a731ca87e533a3612eb209c2200aa5779068807122f55ba61eee9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.27_linux-x64-musl_bin.tar.gz", + "checksum": "df3a33e30e38178f70cf37d1d945641b85fcbdfb0e6e069b34d959de579e070b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_macos-aarch64_bin.dmg", + "checksum": "1bc5d196993db3fdf8a67729ca717e572481da05d7738cd0b18b571aaae76568" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "edddb3a7f09e6f046abc8fa6836e818db175dcbedef7638a3cee8d23165f5af1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_macos-x64_bin.dmg", + "checksum": "07d7eb416fd2683826a903d3de7f368818845eb8f527617fd72606e4d5335cc7" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.27_macos-x64_bin.tar.gz", + "checksum": "8df754f235f227566d7694ecc07146ee90f5bedebb6c098b4bd7ed9353d5d389", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.27_windows-x64_bin.zip", + "checksum": "07dee677a5b0b8bb707c985558f0f6035c7ae01942377644353a48ed6cde7cd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jdk-22-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.27_aix-ppc64_bin.tar.gz", + "checksum": "e0f960be4751ce079f7f5c2e71182e05ec5f8c66c9e5084cc0961e60f8170356", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "646dda087a35c48d912f215a0217089695501144407d0ec9fca8ca23ab3e2654", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "ad674c39376acfe41e230c1bdf00305a9752be6209344100a86dea426a0758e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.27_linux-x64_bin.tar.gz", + "checksum": "74a94b4e5a0ef3ce724b9532e1470f98a0614afc04a7dc25f3526af10f537a6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.27_linux-x64-musl_bin.tar.gz", + "checksum": "6ec8174f71e586e3fb2436993a1146ea702b2d2fac6096631b6f57d8b8e8298f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_macos-aarch64_bin.dmg", + "checksum": "5b2a1819c85dbb585f3e7b8b951733e3d1f0eaaef6f985c34d160200df27ad37" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "85eed677e6485da8e2c1d87ca7c740f79101fd445fc67754687cd3ac8bc10f9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_macos-x64_bin.dmg", + "checksum": "ccde4bcbcb958edf5cd1c56f247d0574be9b4a1a3672524f9401e4bc3766d42b" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.27_macos-x64_bin.tar.gz", + "checksum": "0cc1a9e064aec35479c4e484317da49b80f7b3972eb8b86587b3534f58d77599", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.27_windows-x64_bin.zip", + "checksum": "1dd1b1ab046a7442006c4c7acb0dc18aab0868d21fc5908c04a656c142f08ffd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B27/sapmachine-jre-22-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B26", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.26_aix-ppc64_bin.tar.gz", + "checksum": "9fd127de8e65063221ace7d28fa02979a295077dd13b0f4a49b6f513e11da8f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-eabeta.26_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "b083d7cb9ea2cbfc99bf36550c348aa8f1b7d42f49e0afbd14558662c78f2af6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "0ed80a86caac3ca0a8818b45f9eed61428e71c7f2dbe79ed3962883ceb881dcd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.26_linux-x64_bin.tar.gz", + "checksum": "27c66d88eac3bec00fbd8ce9f811d27becdea4bfbc8a6ce8f7ddec033aa2b2a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.26_linux-x64-musl_bin.tar.gz", + "checksum": "3aab45aa850621e8825fe5c067f24724e266d16acbf617317fb6756daed99ca2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_macos-aarch64_bin.dmg", + "checksum": "c3fb981268699d2f822ea8f01fd131f41106452de0dc1f42cbbd442a8b97daa6" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "4a8724ad217be1897709b61fbd7c8c06f14ffa2d12420b97533d3cb16e608c41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_macos-x64_bin.dmg", + "checksum": "ab250316500ee463340636696a126039f162d6922e7531a60399dc29a7ff912e" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.26_macos-x64_bin.tar.gz", + "checksum": "d099d68e34d4cdc6a418798f3ca60107d4d3efbc41c45c7a8d5fa31388ce8c13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.26_windows-x64_bin.zip", + "checksum": "33e6269a7b909df647ee18d4e1b0751ff5fc8bc5233858587acfc36941a502c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jdk-22-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.26_aix-ppc64_bin.tar.gz", + "checksum": "78dcd89568186941107cd26095f39d0c05575e762f5265298c82c9bef8dcc6a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-eabeta.26_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "2b4508e8195ff90d22d86df45460ca5772d846dc71ef8e678a816d3a878f1091", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "5d654cc2831dab27b44ea2dbc0ab5ace2519337862f97c120453e71a67171501", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.26_linux-x64_bin.tar.gz", + "checksum": "9368f5dd81b4bc69053857242b717540d19310424d7df319bc364258497ebfea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.26_linux-x64-musl_bin.tar.gz", + "checksum": "3bb48922d75aa16c8ddcbdff00abb103b0ceac9ee58e6676a6e3481e1dafb36f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_macos-aarch64_bin.dmg", + "checksum": "fc274edd3f8d930d27bfa3b16cdc59554257a4a3433752b5c6c8f2a461cce561" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "b851a844df37a226e1e3247a857d6b7858d5fa1e03e334fcddc0caaf0625815f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_macos-x64_bin.dmg", + "checksum": "88a1ff52e0db03ea149dce7bbd62429009b0aeef68e618cf1cdc15dc58e966d2" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.26_macos-x64_bin.tar.gz", + "checksum": "f96ab6ad330ea71802400829854c2c73cd82060bce76396a5840d560abe948dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.26_windows-x64_bin.zip", + "checksum": "db98ffa1c34a4efa5ccd11d57afd7da74e998d1ddfd54e7ed7c9a95f268af531", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B26/sapmachine-jre-22-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B25", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.25_aix-ppc64_bin.tar.gz", + "checksum": "3531db100e5349e517efc220998842511c7e90afe8d65e29898846a1fc1eeaf5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-eabeta.25_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "ad02ca8ad3f240dede073a9b08c0cc8cdf3eaf17dcebbf75b53d5bedf8b6b136", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "d1e158d8852fa7679d962830e6ddcdd77e4cbb7fd5d10d4851d3440413764647", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.25_linux-x64_bin.tar.gz", + "checksum": "8af9305984b3e9a6497b6482e5caf188664b6cd83f285690b5f3c58e9b73d8ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.25_linux-x64-musl_bin.tar.gz", + "checksum": "27ac5124bd7b0bf7508938bdf544e97ab82fcd0886453ed4a121efaf677fc4ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_macos-aarch64_bin.dmg", + "checksum": "e13c81306a5eef3a56e31097927988e13ab162fcb78969ee76c74d0a0bb6fd35" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "b2d29dd32f38a2c325bf46c3cad5f5cfdf65b12c073397ce5b98c7bc51fc46b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_macos-x64_bin.dmg", + "checksum": "f698fb7859a3a855aafebaa3408139e3b1d7da1ff839333ed4a74c16c45a00fa" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.25_macos-x64_bin.tar.gz", + "checksum": "423845c1c7bdd5eca819c0279a71e404b22bb6cb6689712669312841486125ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.25_windows-x64_bin.zip", + "checksum": "0248970a6d0a03fa33277b492f4ea178f871eacf3bd1ee03c8d40673a7a1db1b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jdk-22-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.25_aix-ppc64_bin.tar.gz", + "checksum": "b51b4b9bd1bf7989db4b468e4524e6493d2f82f81c2aa2bd985d73bb543fc9e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-eabeta.25_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "8413d9e008fc4e4a3694f0ceaac4ea74638a9898e0fb7016a050d2d014e8df3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "57e44ee4cf3adc527e4d9a1c5e0e531f3e29cc8170d80b15b9d6d769f7f67787", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.25_linux-x64_bin.tar.gz", + "checksum": "a99f3c1104b604ff1358f5285c859b95f8c2478e829526a411299ef1b5efeee8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.25_linux-x64-musl_bin.tar.gz", + "checksum": "006b22533e3b92a9037443ba8550043f8149505a0498e07b83e3b00486fef7e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_macos-aarch64_bin.dmg", + "checksum": "e6b041fa8f028b3b98d0dfee81a2896106588536b38f7bcf67d0e034f610f9b0" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "bb482be5bcacef718c49ccc518bdf8afdedade637ae7b1ae4314b573082be69c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_macos-x64_bin.dmg", + "checksum": "075767e2a87a8494cf17d48ba2e03459bd54dfa321061816dc2dd6d182d1b76a" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.25_macos-x64_bin.tar.gz", + "checksum": "d656f497f41a3c2b8c2c1ac14f204298922a07bea435264e2b0629961d65ca60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.25_windows-x64_bin.zip", + "checksum": "80a87ca766964ea9cb9b97bfe822d9a1140d9bb428635edfa745908f7be1f861", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B25/sapmachine-jre-22-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B24", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.24_aix-ppc64_bin.tar.gz", + "checksum": "d57b33912635d88ec5e3c4193a14fdb5a965474328c44f28db0cc0eb4b018b16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-eabeta.24_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "74b94c5ce061fccc32d63e911dba812f69d631a68c7753af5b27511e00540b73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "914f16c28b653e22d09eb57e8a01b9e87dcc5621d45e7c9d5399256dbca88d0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.24_linux-x64_bin.tar.gz", + "checksum": "bd8d904a73bd2f32b8de2e395379f8ccb5672852eec123310f25e4d6166a3563", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.24_linux-x64-musl_bin.tar.gz", + "checksum": "54b44a5a353c7cf840828b55f3cc217b643eacbcc995b08a7e9f82e0f64b38c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_macos-aarch64_bin.dmg", + "checksum": "d393b268dc529c2efa88adebc970c8a3c6ca53f5c454d1888f5d76877edff679" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "17f353a26f646d7aa0ddf409d442948510982c164c27f36c6512ffd3c18cc4be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_macos-x64_bin.dmg", + "checksum": "b6f61d7d74ced6823b15289bc524aaf94a19a8c87a6a4ec261d6598593264197" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.24_macos-x64_bin.tar.gz", + "checksum": "cf5425987323f095bb19bcd3f7d61cd8a73078a530056ddc1a23234f3a65b93c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.24_windows-x64_bin.zip", + "checksum": "53c9e283a048f9394bdc63e292cad9881bb4d3d74395b7c41ad5a0524b009c85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jdk-22-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.24_aix-ppc64_bin.tar.gz", + "checksum": "1eb466b7ac0b43dd97b009d78249bf5e2771deb6bd8e827a7ba97621b02cf8d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-eabeta.24_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "30e8770117544040ba8a8703b4414a2824f3be7512a1f8a6257a7cba15176ed4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "0a2701828b8da330d95de88a751e773951dccedb848a1680147260d52121a9e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.24_linux-x64_bin.tar.gz", + "checksum": "80c6913670397868c3993596e590b50fd6248e0b5b63c520bbfb5e3d1b5bb648", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.24_linux-x64-musl_bin.tar.gz", + "checksum": "3fe4c60b58e309c1f9a548f9e0adf6f0e018002ff9edf61187b05c7812240ee7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_macos-aarch64_bin.dmg", + "checksum": "d6fe8d63be54a89ff17cbbfe1cd8cac425bdc62b0f55921d4819d899da42843f" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "ee816b2360e617e4c3260694462a6680b12ad52ef450da7aae18cdebe8c1b525", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_macos-x64_bin.dmg", + "checksum": "d94c4a64ce5711b2bb1446ef3c9b230fa8db9593dd6d1ce3dd7c1e3b41082cb2" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.24_macos-x64_bin.tar.gz", + "checksum": "e9e0e64b53d87c90c26a954eecb1ea453c4ea3267e5aa4ee38e56b1dfab1a0e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.24_windows-x64_bin.zip", + "checksum": "a74e50c1a67ae0325358aa1c46e2b0890d8c159a23cf485bf39f45d1af638d36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B24/sapmachine-jre-22-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B23", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.23_aix-ppc64_bin.tar.gz", + "checksum": "47c5818a1933f2f0253498c8c8a8344e81dee54ac07f5431c64ddcf0d8471227", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-eabeta.23_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "1095743995d04a0548c15adf193ca7bd4f34737f94f7daf57da9bef7285f8aed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "472fe711c5a1871a8d83a76f9f8ca4f6c2c7e50c86500b03ee611a5eb44737cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.23_linux-x64_bin.tar.gz", + "checksum": "e59d4f3e6112706887d7d99c8bf134594f329157d13473341a81ef84164da7b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.23_linux-x64-musl_bin.tar.gz", + "checksum": "8eb710547837f03de59275539c2644af1516ab7aaa9c2271edf12512c7b3c291", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_macos-aarch64_bin.dmg", + "checksum": "6d1db3ba413630863af85aa4fcf0504ff2acc5b8c2efb06611303347c4fad3c4" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "6afed2d1b09c8324e416a865018c17b3ee250cae1820820187d309a812ca4a44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_macos-x64_bin.dmg", + "checksum": "564db86ff5a0afc91820d1a5b48a0ff8ed216432f747d367fa8b642cf129c880" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.23_macos-x64_bin.tar.gz", + "checksum": "5e11ad1167ce722ecf059505c34df47b18552d6a40976f24786f2c8826847867", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.23_windows-x64_bin.zip", + "checksum": "0a16d25d05aa3bfc48589e9bda20cb0065d7a8392b63ea31d12359fed6a0267e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jdk-22-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.23_aix-ppc64_bin.tar.gz", + "checksum": "b0cb214adfdcdd2c816c71ba928ee16ef318b6fdf74fb15a4ef90ac5802229aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-eabeta.23_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "18a55e61d567b0ba6a8d6012a788ded04904b0d6f691b37ee8f5d8249bc0c7d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "471de18545f35663bfa2a492335432f0fefeab677e17f2236120b830e66452d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.23_linux-x64_bin.tar.gz", + "checksum": "1cd2e4670dbf68ee31a260a9607834b1f5ae94d3181ecbe037884a8fead020e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.23_linux-x64-musl_bin.tar.gz", + "checksum": "4f29879cf07da89984f0ad060d471aa78eac4073e4ef1c5869887a0dc7fbe21e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_macos-aarch64_bin.dmg", + "checksum": "77075e663d73762217a4ba7a088832cb7d260a3e2993d11c92e6f5cb1342ee45" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "354ece969a23252cb75cbe75d637ec19517bd475f009093be358446dee533603", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_macos-x64_bin.dmg", + "checksum": "37e97a2f81088053e00a17b453b00154cb1631171fb7cbfa3cbbea85e453d52a" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.23_macos-x64_bin.tar.gz", + "checksum": "5ec6ecf9b0b99286e4a4d7e492472fb348170274f2b9f81b2f81e6d83506b665", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.23_windows-x64_bin.zip", + "checksum": "776f97b2482493aa7d20f184b2b39303147cccc3a0f1fc065ffd68eca6a7870a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B23/sapmachine-jre-22-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B22", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.22_aix-ppc64_bin.tar.gz", + "checksum": "a0ef937e65bb2a7ff5a45073b4228e24c1d329fbfe77a4f635d5cd93cd7ffcfd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-eabeta.22_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.22_linux-aarch64_bin.tar.gz", + "checksum": "a7a3c63caf6599612932c0ed0bbcf80ec776e6aedf9a842fedc68267dbe57ca2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "e76c571b0f5338c8db5f8a03b8c96985cf690d7cbb1d6abf88c79c2b78dd6ca0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.22_linux-x64_bin.tar.gz", + "checksum": "1c40f0712248411eb3e4f51e2d951018e4c98cb218291229280faf5c7c4bcece", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.22_linux-x64-musl_bin.tar.gz", + "checksum": "661bde4f90d26b9ce1ba50f7cda94c941dec1041f1606da38865d496173eadbd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_macos-aarch64_bin.dmg", + "checksum": "5b2c9b8fd3898dcd3256cb00a8392070f8a769f7c6106f3dc33fe9f3743cd7e2" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "5ef9505e1f53cfaa436774aa1ea3b10a3d5c6b72aa2f17f5ce047f4978886c7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_macos-x64_bin.dmg", + "checksum": "54a2f72eb5a2e1a228096d5cffb4fad473eff5ff98078a0b08c5b880d925d979" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.22_macos-x64_bin.tar.gz", + "checksum": "ff95cde664e9857fdf2b2880e11c39bc2b523bbf98cc04b87628bc21755fb776", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.22_windows-x64_bin.zip", + "checksum": "f138efc2fbfb63ec0286cedc20fb2b304318d5340984c7061da44f0af1230435", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jdk-22-ea.22_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.22_aix-ppc64_bin.tar.gz", + "checksum": "c4656ea49a0e729a5e3d05338951381cb65af4bbe1896b041410e5cef09a29b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-eabeta.22_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.22_linux-aarch64_bin.tar.gz", + "checksum": "71a06644470d8842be668918e294f20fa857f3becaa16b767795ff55a19640a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "cf4ff8dc8886cae4b83d60300e464a78c85900b12a694f4acb48a621ee0c5396", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.22_linux-x64_bin.tar.gz", + "checksum": "ce1891ea8643a255f14332882d0b40133f5e7155e09dd8a8daab033c4608b9cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.22_linux-x64-musl_bin.tar.gz", + "checksum": "d26ddcbb1be4cb70a8ee7dcaa6a52e3307db8070101686a36ba0e7ef17bec532", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_macos-aarch64_bin.dmg", + "checksum": "a7e85e89695f1728281aaf4f51f222fa51c2a529cb34474587e5a6d4178d6d56" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "136f6311647bf3d1412d99cfe806f625387e0d3aad247e66c7db88afd94d74c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_macos-x64_bin.dmg", + "checksum": "48e6632487ff145f954b30622c0b2dba0eb49c4b8310eda2e4986cc1dc30ad8f" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.22_macos-x64_bin.tar.gz", + "checksum": "4c2bcbff5f61be71ac763c5ca678bf8cb10dfbacf73f008d076b3e037124b9e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.22_windows-x64_bin.zip", + "checksum": "9551ba47a34253f948934b1250471d7d836e68fe5ce3a7be603f23ba5b01f74b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B22/sapmachine-jre-22-ea.22_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B21", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.21_aix-ppc64_bin.tar.gz", + "checksum": "1eb63211fd0a00066d47e0b7aaa5afccb15e6c6cc968a225b7b90f3a096600cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-eabeta.21_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.21_linux-aarch64_bin.tar.gz", + "checksum": "c6e9a16fdc49649399a818f88554f3c020ec9eedcea9124b85604b0bffb56369", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "ba2b01189a0bfdb412a6ff69097a119f717e2ac9dc7d5a1945172b31f8687406", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.21_linux-x64_bin.tar.gz", + "checksum": "132882018c47f1dd4b5237d9fc9743825c3de921abea5937c9ed74d6cbcd7654", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.21_linux-x64-musl_bin.tar.gz", + "checksum": "69597199dfc69d8f1705b5973138082910781a62490c35c2804bdb7eb6443d03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_macos-aarch64_bin.dmg", + "checksum": "572f58e6bbb1d3057a53e6cbc0ad889cb2645edeef8d0556a3d8473303345ef4" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "89f1918c4c82c77962969a58fdd4264dde6023a584dbd7e80e5ea2face3061dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_macos-x64_bin.dmg", + "checksum": "e024245ba61775c60fc473be76a95928ee0f7f2edd1c410701ab3395a72fde56" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.21_macos-x64_bin.tar.gz", + "checksum": "98f0f611d915d0734f17ffd836eed365dcdaada7067efd319d63910ed78d65e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.21_windows-x64_bin.zip", + "checksum": "b89cb4a6bb18acf103dd8ea7f277c3982529fa53390611f91cc2128d44155d5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jdk-22-ea.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.21_aix-ppc64_bin.tar.gz", + "checksum": "28e0574b3b3302a3f5b6d91f4b1006172e376248d79d9c0ab8f6d84dc8fbcff9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-eabeta.21_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.21_linux-aarch64_bin.tar.gz", + "checksum": "10dc4a3fb241d6e8bcf375b043dca93a8fd106aa390437e2ad8c5948f38312d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "879cf026ac0abdc7630790b73710f017879f66245d98632df88acdcd28df3249", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.21_linux-x64_bin.tar.gz", + "checksum": "c032b59270fe01bb7ae75d2dfdd97930f8ef4f44c5421a49fcfaf7bc3397c459", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.21_linux-x64-musl_bin.tar.gz", + "checksum": "fa64114176576dd7010a1aca4fb68c658d43b08b5afcf7e911b3d65ee008723f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_macos-aarch64_bin.dmg", + "checksum": "8d77b847d29a955dbee5f9920f4ebff0ee9c45707c9226e52f10717a5365b649" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "f7d851621456c79ad7e2dbc5e9dbaac62f3a5ceaa8db5ce255165676d1f54af8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_macos-x64_bin.dmg", + "checksum": "69990e7add54d21e9b2daa314987cec343c0a1ac5552ef71a7af0f558dd6d486" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.21_macos-x64_bin.tar.gz", + "checksum": "1a1e2a28350f514d271d7bc85293958154c07f21970a6d603b1eb1a363079328", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.21_windows-x64_bin.zip", + "checksum": "5d29c6bfb09e2faade3e24b6ae783d862b45ed63084fc80587090e6dc770db36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B21/sapmachine-jre-22-ea.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B20", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.20_aix-ppc64_bin.tar.gz", + "checksum": "35b0d8a6eac1848dcad5792a3d00c9ec34a1f6d3c397fe0a3984e3852fe49d02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-eabeta.20_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.20_linux-aarch64_bin.tar.gz", + "checksum": "212a021e97f964e9e422dbe27521ee3413044848383e29af593e510704176414", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "fa25a660b93cf60ff87da0888b06c76261cc4a4f171d6f80e7e101957f297521", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.20_linux-x64_bin.tar.gz", + "checksum": "605135326fab53edd6f4930ff18313f2dc5807e0427bc52b0ec5a7870136c109", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.20_linux-x64-musl_bin.tar.gz", + "checksum": "5a0dfb5c58af87a44f4bbb931bf99e6955b4c1e26368720e70bc49d01747543f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_macos-aarch64_bin.dmg", + "checksum": "0e61c34e18a91fb2b409c6ecdcd39cded8521acc4283970db5ef6fd3d95634a3" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "0ea1021d61a20737759d034a8e8aaf38866d6f100f202d8334b821e0b2957b2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_macos-x64_bin.dmg", + "checksum": "cfc710a698dc1270a62bf135dc24bf0940f09973d7ade3f599b04f31b0cf6ded" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.20_macos-x64_bin.tar.gz", + "checksum": "07e796bb659e84dd95b453388a6f0e7638874819ffd6bc94413ff36249bd54f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.20_windows-x64_bin.zip", + "checksum": "4006f90479c3f8dc68294c2a90d5d5749d3844bc79255d3b12ee2ebfc99071b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jdk-22-ea.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.20_aix-ppc64_bin.tar.gz", + "checksum": "39e47290adbaf4b6542e1408a3a3f73baac26bb0902eb6ad851d6ac516256ddf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-eabeta.20_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.20_linux-aarch64_bin.tar.gz", + "checksum": "caff0f2912c3151c294b2da06beca05d12ee4c663b28619fbdbb738641d89d55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "92cede53ea52e625e14129a985df2e1b865a9c24f96006c72ae590fe67df42ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.20_linux-x64_bin.tar.gz", + "checksum": "d0e79939113186033e330a7ffc3de0b639844633336b83295dce178288cbfaed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.20_linux-x64-musl_bin.tar.gz", + "checksum": "59489fc83e5fe2ab05535c9dc2068bc42faff6b6be0d0db73e4229f0493a8f90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_macos-aarch64_bin.dmg", + "checksum": "5410f48f03bbf96ff215cbc686895f6da0112b2a0cbcd1a83f51bfcd83daf6ab" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "d194fa46f362d801f262707d6852a9bf8ebf05be22adadbd89e75f6a72f9ff23", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_macos-x64_bin.dmg", + "checksum": "fe226ade3843b447c083895351042cb82f07455a652611fc3187411a3e20e64f" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.20_macos-x64_bin.tar.gz", + "checksum": "8cfb8b3661bc85ba965ea62a7c73b892788253ba94ea0f8187d70eadff23a3f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.20_windows-x64_bin.zip", + "checksum": "c494200fd5407bc6665f336e99f75c9ad06e60c17c0a35534f5412c7f952d3c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B20/sapmachine-jre-22-ea.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B19", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.19_aix-ppc64_bin.tar.gz", + "checksum": "b46697dcbc7c4c60992576ebb2e9668e0850ba5b8d4ed3bffc40a5ce5632207c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-eabeta.19_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.19_linux-aarch64_bin.tar.gz", + "checksum": "fa186478d7f8ef7972451377409c75a33896fd28663cfb51bc40afc382746835", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "b939129fa19b5a90399097201bf6219fa769c649acb99c640adec44253625bd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.19_linux-x64_bin.tar.gz", + "checksum": "c376ad5575c9536818b404c067b4424a96bc90027326b5cc2f0c0526cd58c572", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.19_linux-x64-musl_bin.tar.gz", + "checksum": "42dc216062746d7e04a482acf965423f0b2afbdd72a99fdcd3235d276a41579f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_macos-aarch64_bin.dmg", + "checksum": "6e5b684ae30517b83a8e6c50d20b20548d56926c40f8cd116b83cc3f40907093" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "bbc9300ae986605ce5643f50b83feec47c583c320eb8a6571da019376db9ad60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_macos-x64_bin.dmg", + "checksum": "5dc9a15bb22bb5f05154d27e7b7d316df0059c01e3223fb51957dcaff85bdb96" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.19_macos-x64_bin.tar.gz", + "checksum": "de270a104f100c48afb3209b237a6c7d1b54afc8492b43885fcaad4169cc15e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.19_windows-x64_bin.zip", + "checksum": "4e5cf83365884d32adf4d76ef4da113e14340441a3f700eb3f7f8f7ae804f8a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jdk-22-ea.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.19_aix-ppc64_bin.tar.gz", + "checksum": "b173df1e62b9d7aabbc205f3a5bde73fb1530d2ed7c422e65b1122d542bf4f31", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-eabeta.19_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.19_linux-aarch64_bin.tar.gz", + "checksum": "86786c958c9b74233acaefdca5c1ac1751b968912b9886e641fbc9bf94929522", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "b51034992ccd63e6e2072a727c03ad44f57a8f63cf4b8eb96911a3223032e83a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.19_linux-x64_bin.tar.gz", + "checksum": "14c9c388dc40bd2ab0b9469c482828692d04c095d0591f4a39e74c85eae010f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.19_linux-x64-musl_bin.tar.gz", + "checksum": "60d7929b60e7493358080892dd3757ff2e488e07c1e9f66c7f5075e030e879b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_macos-aarch64_bin.dmg", + "checksum": "e5c51d4d545131e74bf9345bb15787ee7ddc4e342d4e1de85ba4ec89f0113a34" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "80928370936eb1441b88de1c760bdb254efaad8f8febeedbaf79d0b981c80cce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_macos-x64_bin.dmg", + "checksum": "8f5b025c8537c7d19b5dce256446887c9b8eaffa061a3401209eb72badced801" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.19_macos-x64_bin.tar.gz", + "checksum": "5fe6fedf2d19bc2ac43e58c453ac736320d669e3ff6c3a5d854f996f2b19a1dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.19_windows-x64_bin.zip", + "checksum": "0d0e92ea797554578f771e5b12a2d1d3b03029fcadb2b171fba2d756d3a43bd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B19/sapmachine-jre-22-ea.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B18", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.18_aix-ppc64_bin.tar.gz", + "checksum": "9c9bf5950c49696cd36b6ca743fd67ea965542c973c410438d57169247c03dbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-eabeta.18_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.18_linux-aarch64_bin.tar.gz", + "checksum": "57b473afb2796173ff6a269eeb7293ce47a331e2851b61446f5c688bd9ae9079", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "4b0f2d3537575f517a203a121af306dbc179c0146d497fe91c4dcabcfeb9a8ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.18_linux-x64_bin.tar.gz", + "checksum": "fd281ddfbedaf02e14dcdc682b1c0fb108b269e7fdb3ad184efe4ec3e0058bd7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.18_linux-x64-musl_bin.tar.gz", + "checksum": "03dbea5938e37316066574eeeda489b20a2b44271a06dab57617eff30df42110", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_macos-aarch64_bin.dmg", + "checksum": "d26e4b0e9a0183c35ee6e351e0c51f008c7dc5d0e57c79cf0ae058ed2481313f" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "e2621f6e68d59df073818eb05973a6fa04c407114b46586aec7347bcbacba5b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_macos-x64_bin.dmg", + "checksum": "1ab625a755e8a1ebb96bfdbebf1a2eab517cc11c83405ca25138559f803aa66b" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.18_macos-x64_bin.tar.gz", + "checksum": "f363534d9d95f5b994c8a1406c995c6896a2ae8e897cadf2f7ce29c89c5d101b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.18_windows-x64_bin.zip", + "checksum": "5007876f03ed5b05edd16f904e1b6b5f136d8a46a3bae33df04c99320dddde26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jdk-22-ea.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.18_aix-ppc64_bin.tar.gz", + "checksum": "b4842afe1c6490111e09be4669129d71ec760faf85d31686411c86f9e39f39a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-eabeta.18_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.18_linux-aarch64_bin.tar.gz", + "checksum": "5ee09c05bae8a9e703ef2bed4717ad52c379e118dbfb3b7c87f564f6ac63a5a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "5e4c37e0162b72a89fdf5d754348e1385d9363bc0d1b7d261f11841da7730d68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.18_linux-x64_bin.tar.gz", + "checksum": "873ead9aa5927babc68e49f07a25d417d7eb78d343806a4ae4d7968470fdb379", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.18_linux-x64-musl_bin.tar.gz", + "checksum": "bacf04e704f8da002912284352202a9da7d7756c9a6744c13e5a8987448b608c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_macos-aarch64_bin.dmg", + "checksum": "7667d20b1e847a50c7f4a16b6bc9e2db2c690872a323ea6c95de2963e2d28797" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "911cd5b84ad756acd983c24cf3e89dc9328637f40dc88abca107f8e493823eac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_macos-x64_bin.dmg", + "checksum": "12ffcc2b07b5bad39478a69998930ed85c827f39acfbcc5c454523dc47fb9b51" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.18_macos-x64_bin.tar.gz", + "checksum": "3c9d192c879f73b3ff484080d03e75fec96e6a7410975bfcdd63c56a2c2300d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.18_windows-x64_bin.zip", + "checksum": "9132f4001b3e13726228f168430950ba240247685bc611929fc4238870f70d72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B18/sapmachine-jre-22-ea.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B17", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.17_aix-ppc64_bin.tar.gz", + "checksum": "f1e2166421446cc3d314e0b66b673af3516abd106b5334376bce5e62036214a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-eabeta.17_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.17_linux-aarch64_bin.tar.gz", + "checksum": "5a4ea92487a461d1fb04064a85d4cf8f9a75aba960f67e159382d0dca24a8a53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "536167d4182ddfd171cf1c4c6a0faac1514c0d5db3a3c615994bbfaf0ce3b3d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.17_linux-x64_bin.tar.gz", + "checksum": "733f734767b9b8314281938486b05df1077365a9a2f515f831e4988258a6209e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.17_linux-x64-musl_bin.tar.gz", + "checksum": "cf1c069f51fee51b21188b7f72c126923d640bf27c13945d60db05b3bcb77332", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_macos-aarch64_bin.dmg", + "checksum": "04b991725bd81f670dbbbf1201bf6a926b3e53c6d2a1ebe5dcd546a790e3a92c" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "b4d627fadd227ab54ca3d945d20989094f93453e94a2d092b1643188ffc4bbd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_macos-x64_bin.dmg", + "checksum": "09027e8def7b9200efc0c737bf423030619d7f577b6e3234deec3bac0703d5cc" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.17_macos-x64_bin.tar.gz", + "checksum": "b32245e8c0a6524baf1594bf3617d2880424fd82be7756ffb4782f89a2373d01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.17_windows-x64_bin.zip", + "checksum": "0226c7e44ec2ad3724e2ab294bfc423dd3e3b4f6201b43283bfc47d8f6354dc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jdk-22-ea.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.17_aix-ppc64_bin.tar.gz", + "checksum": "1a76843b6837af91c4a6092b9c7fab120d89e64b0f37700b8b3242d89ac4fee0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-eabeta.17_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.17_linux-aarch64_bin.tar.gz", + "checksum": "1bc995ade5afb5c94d7729b0b1302db90578f38dcde0941aefd4b27d6683670c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "b10bc69a74300ee8d704b8066772e04613c81211e5faf09af02e332028b73190", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.17_linux-x64_bin.tar.gz", + "checksum": "fbe7a0aa6f01d0a603e0c9b4ccbb9d6a25df1d892d3e7cf67b6f9e8fae7c88f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.17_linux-x64-musl_bin.tar.gz", + "checksum": "b757da228632b68b2ff17c18ec1560e733840b23cf9b17d1fc9910c8abe1f863", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_macos-aarch64_bin.dmg", + "checksum": "2368ac0d1f6fef28113a3f07fd2afbc9bc3db31207e8be671fa0084a3a79d763" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "d218b10886f1507c90a878092afc898c44e12beaeba583e2c90085345079b372", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_macos-x64_bin.dmg", + "checksum": "9b103f2265dcc6fa7f38122fb4be2280d909f805f9683f66cb33d4412effeae7" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.17_macos-x64_bin.tar.gz", + "checksum": "b53c3175357f67ae8f7a31df10889452666fa6103427e01f0febc08876a80056", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.17_windows-x64_bin.zip", + "checksum": "6a48beed4014187608b13defe6b78dfbe97522552892514fcda54a44605e19ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B17/sapmachine-jre-22-ea.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B16", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-22-eabeta.16_aix-ppc64_bin.tar.gz", + "checksum": "c5710e1e6ead573218c37b51fdcc23f31c539bd871e0be9b128978ea9dc23d17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-eabeta.16_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.16_linux-aarch64_bin.tar.gz", + "checksum": "4e0ff56046d88a1848d676b61d90f7e32daced2995358153a316614f38f2e7b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "8737b03a0f1ca9d92b56d62f82f326f924ce925c7299187c0f50fa74cce64c4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.16_linux-x64_bin.tar.gz", + "checksum": "6d125285dc9310d459acde6c2d5e79ddd380f9715559839f2819858748eb1e3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.16_linux-x64-musl_bin.tar.gz", + "checksum": "7056463387d8109d88c05de597268c0781d30b07031ccf24fc236c0ffa6ad9e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_macos-aarch64_bin.dmg", + "checksum": "1955a27eb81a7db71c71fa8ba1810cce5eeec1a24c3e59c68fcffa4e1f811c2e" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "1d5995dcd4cd7bb7aca4029b49f4f25b1f8fb3494551c53592728a02ecd78c53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_macos-x64_bin.dmg", + "checksum": "407cc45b47e844a0dcacc48dda92d769b764dc7d9ba74093f020dae5c8e7db56" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.16_macos-x64_bin.tar.gz", + "checksum": "0173b0243e7f1881426134660df674c398ecc8313a44d40cc240dec2a69f31fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.16_windows-x64_bin.zip", + "checksum": "7a038d9329493d4f6f760eb542d4a9c0a31051e31b2876a5f9567ca4d1d24ee4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jdk-22-ea.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-22-eabeta.16_aix-ppc64_bin.tar.gz", + "checksum": "a529fa038a8952f650bc38280d0da0812bdd10f2b312c93fea44c44072e81b17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-eabeta.16_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.16_linux-aarch64_bin.tar.gz", + "checksum": "afdf25476fb02f8b6e546b6e0dff29ffbde0413851fdf494f246623d54252a24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "db8be16ea04c7b900b55487305226ecdc187289a7ced8588953895b604be74a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.16_linux-x64_bin.tar.gz", + "checksum": "b9b2ab4e8fa8f4c53112c94128c46306a929d150c29eb66ddf3e664f3f7c7e44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.16_linux-x64-musl_bin.tar.gz", + "checksum": "cd4a42939432244f713bf2861f29c2869a48384b8681ca8b068cd3204f624920", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_macos-aarch64_bin.dmg", + "checksum": "52c244908a4c29ac665d098267fcba48d5f580e931c0fe0d4ef166ee2c70fb7a" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "1b524d70080298816bcec8477520edeb1dfb9698c378c97514f98037b3197e5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_macos-x64_bin.dmg", + "checksum": "4b981ce6e19b542d94f344ff6d2d4e6117ed644539450247fa0f67c1fffac2dc" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.16_macos-x64_bin.tar.gz", + "checksum": "fde8c7f83dc3cca544cd170a975f5ad0c63749029fd11a6aab1ae708cdef2adf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.16_windows-x64_bin.zip", + "checksum": "7464206def10a0b68c8c94532e0aba46642d252ac3cc600aff1b128e88faf382", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B16/sapmachine-jre-22-ea.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "90edc27828230ae52b65cc1bce05f43b1fc42c776db0c866e7a1c65d2f9c6311", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "b01aa06e9d3d3f78eb61c4c9bb11e92d28f3ae1f4e01913949bd44ff01c142ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.15_linux-x64_bin.tar.gz", + "checksum": "35945fa9f449f0f14d77add5812249c46715a47d28ec15a88b3de435a9ec6ce2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "c2ff826de9affc4bd9d20e624a771c738cd5cf7f4836fdd278cf455c329df406", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_macos-aarch64_bin.dmg", + "checksum": "20f4e80d2fdc6d27f4b6b9bebc68aa710ee0f413714df5138a853b43f5b9909c" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "562437c9195623314423e7476326e7dcee67f3e043b703156972905e21b44eee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_macos-x64_bin.dmg", + "checksum": "31aad7a9a4e650e8dbbf2a94b45ab656fab74777ad3bed8dbfb28897f1709cdc" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.15_macos-x64_bin.tar.gz", + "checksum": "e8361ef85fadc1f8382ce69b2e562cdf414252f5f4ab4386d75e19663db62241", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.15_windows-x64_bin.zip", + "checksum": "4640ff2db287fbddddbc4f83416e40c5a81b7e9ea7915bdd9024978d2c169676", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jdk-22-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "04d7bc366ff76c000e47ef31a30927ee0eb6bca3c5d5ed2320ff7adf88b2b114", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "084fdc58b12665d5420a23a826126e5799028565437322ed7e9ec31dd9c37b21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.15_linux-x64_bin.tar.gz", + "checksum": "8c1af115a0335b6b98e1fbedbce806222570c5af42a255258c528380dd29d263", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "ddc93accf6a7864e9aa08f0eca09fe6851a60dccea44931c4194e9795a8bb638", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_macos-aarch64_bin.dmg", + "checksum": "4f6963ff86956594348b5569c68e9af17bb5cd3f21f14c30e2418ed28e2a5bad" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "433a90991cf01cf6be12291ca87211c1354b98221947693f54fdd72c49f90ad4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_macos-x64_bin.dmg", + "checksum": "68275169f33926fb951403fad0abfe1108ea9ea6ade6c8d2b10437a5541e7f84" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.15_macos-x64_bin.tar.gz", + "checksum": "aa891b38c88752ef0f1c645c68a184e9ea33e9f2e547af010c04ddbd8e4138b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.15_windows-x64_bin.zip", + "checksum": "621a350125437d913eefcbdb8a4d9dc5d0926518e73011d5534c5c31c4fde500", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B15/sapmachine-jre-22-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "79bfbc7d6b2827db49c47b330322927008c4ae35b5452ef457b0e984bc8c1d7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "27926532e7f737884e5ea6d2521b475e60b6a9810bb5f382c3f0f85688c42898", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.14_linux-x64_bin.tar.gz", + "checksum": "f8176990365111ed462345fb9dd71be7b286f7459f484c4b9944879c857499c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "d0dad65015e56e7e5ed693457ce1a625e78f4e68f2222fde4afe2436bcaf33bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_macos-aarch64_bin.dmg", + "checksum": "e186b2f6bce60ae3754b14f3db52b525af7e780074ee230a00c3a579b37c1afd" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "603920ce7267f597ae0ffe64550674b13b7d0527cf4f36d040f8357fb15d43a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_macos-x64_bin.dmg", + "checksum": "c8f3948f7872a589a8e9d3bf656b5cfeb5542f89b2cd6ae4f9752b3dc0e4fab9" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.14_macos-x64_bin.tar.gz", + "checksum": "c8ce08821555e5c30a8a87ed133e3e4f0dd6f1dd8a68dd623c9c09929b306520", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.14_windows-x64_bin.zip", + "checksum": "2064400d7255fcebe89e696feada505c3b8e895a88a4623e5a442dae27118706", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jdk-22-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "083fa52be402538488671e019ffdc875e3bb94c964813519dd6e154519ff38c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "ea0b3143689fe5c5fc7ecaf2098dcf4162af9d2cb44cfc1705571ac50c62b409", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.14_linux-x64_bin.tar.gz", + "checksum": "5022a3dc9b17d7114532da7083652f8df64e95096119330e5f149aea45e8ee31", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "e936f2c638bf502af7b4ce5056c4c731425c2328221171c16364fd4092b55716", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_macos-aarch64_bin.dmg", + "checksum": "da396aeb409c581f71089b7c5f008a2db1db9f89cc3834e614e320f9ac932abd" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "587070428da59e467fc5752533235616391414fddf0d79e998a877240a7c9bdd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_macos-x64_bin.dmg", + "checksum": "9e3e85aeb53a63269db518bdf76c3c2a01c59adee22482947c0dc5323ba15978" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.14_macos-x64_bin.tar.gz", + "checksum": "cde539820a7cb77847a8ae98b7b72cb8e13248007b1e7e1ed8ffe15e2012d655", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.14_windows-x64_bin.zip", + "checksum": "65bce33a40c18ecffbcdde49db724bcc887f048c4584c9f4ff0703e6b9d02475", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B14/sapmachine-jre-22-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "28dcf1c55eefb9edcfbc7543bc60d429ced7641a13bb18e5bcca6611dfeb12ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "edf179cfd8d9800d344965b50745ff1b87ca58237ae8a9bf3e2a5ff50f8806f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.13_linux-x64_bin.tar.gz", + "checksum": "69975057eb7adcf4ee8e50501121b94d151b85a4a9ba07d01bdb3c395af64e3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "aba5302b78486d576232d50e4441eeb6f5e54347a2376a9804be588172e5e81e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_macos-aarch64_bin.dmg", + "checksum": "504bc3f81c319a7a427202f8b9aca1d6d69d1222f7a9619f2afd9771798dd9f9" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "676437170ab29ae5fbc3f3a7e740fd2b767e0173c0468d6cc400b605f7e25621", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_macos-x64_bin.dmg", + "checksum": "b3ca4593b00a462adc1b72a241ce09645af7945a9e5cd1f37423696bc3332915" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.13_macos-x64_bin.tar.gz", + "checksum": "39f75dc1e7760bc78b5196324266635ade05fecdea623375acc4c2030c277efc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.13_windows-x64_bin.zip", + "checksum": "e7bdbad69750d6caeeabbcd061338d4f8956967751e5c7e972cd75b369e34fdd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jdk-22-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "d92ba4fd438ba45c25ac766f5a0e59a490f3fd6ecdd0869b46ad7e05b7c21f1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "665cd1822c0693060fb2c162086c66cca89ad53922012980e96410fb16faf045", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.13_linux-x64_bin.tar.gz", + "checksum": "c9feaf6b39608edfd07b8b5aeaad0de9ec84fa7a5acfd8d92c54f30815317af4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "4ed7ed0f37f23c77f969de0cac46b3106438a3b250f482d05be94caff8cbb02d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_macos-aarch64_bin.dmg", + "checksum": "4879fbdd0c5a2573a749008e397b0e855fcb6d2dc209a5a9f800f0f2482ca170" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "f576a4f4e0c424084a62697ff37ff5f2294c50fb4d3259c05857f46e2ac9e689", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_macos-x64_bin.dmg", + "checksum": "bb8b7eb45c64b0bbea9611b71628e29dfd019a5539fdc7858021c0ddfdf9b9f7" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.13_macos-x64_bin.tar.gz", + "checksum": "a35ea1c473572490fb1f16eba232254f704dee3b915e1fa8a16cb5af26c7abf1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.13_windows-x64_bin.zip", + "checksum": "a1897c19adfb89aab743fe26eee42b489b4d70df6cb1b6b5ebd548f3ae65cfc3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B13/sapmachine-jre-22-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "218cfae627535a33f0f1b492d095507d2bfefe1ab7288eb4cfda109bf4caa021", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "7d4dd3352f33f408f562d435b268a0a792919c11f5d0c19356af5bb3fdcdeece", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.12_linux-x64_bin.tar.gz", + "checksum": "9f394d630b2fb922444d632c6843103ca3f921c69edd5005e3d20a08f3555aa3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "2882ff2974281aa0a71be511160760410d0d8b90352e75ea9e34b37bd7be4f98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_macos-aarch64_bin.dmg", + "checksum": "c8aa47d5c7949d1b3b6c8742456ea7b0669006a5fc5205d250cec68df381c7bf" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "ed3ad8ac46ad30adce61271094336d7345d4021c3af6fae6f8e4ebf7fa3aaf7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_macos-x64_bin.dmg", + "checksum": "11af2298da1eb271ba92d129df84298948d44b5b153bf5df09de52f61f4ce6c6" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.12_macos-x64_bin.tar.gz", + "checksum": "fd000d8fc295463cf73c5a23b5b07351cbd7ac4fd96964e5055604b488b0100d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.12_windows-x64_bin.zip", + "checksum": "6a112bfb4f9ab31429dfefa5f0266d1a64a982e8eb6eddeecde0572cd9f376ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jdk-22-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "3316e9413c1f591fc0b09d0794364625d8ff74f7d346b45aaf257313dea6b8b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "be38656414a378f7225a632ee07dd62d9a2e15bd4a49b375b30837e59b1f2d16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.12_linux-x64_bin.tar.gz", + "checksum": "600598504acb10a09ed5625779cec3dbbac40f8a756418d4c4607ed27d97a538", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "c08a287662d0d362fa1a6749c3ca362c1f9b15a9c55ef97d8b07784aa3c2a9db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_macos-aarch64_bin.dmg", + "checksum": "0ede315f913ce033db1857639776d2d7499ea10f16e05c3bfe911d27e01f95ed" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "908a2a54ac43d5eb2c3b76c5b4bee54d5fe980d559cdb918eec3fd20a81211bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_macos-x64_bin.dmg", + "checksum": "4ba305a0abb014458ff34c523caf54cc30bbdddd51dc1e38e48de8fa6f5420b6" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.12_macos-x64_bin.tar.gz", + "checksum": "6f1cc22974e0d5f621a95bcc4f0123a07ddaeeda4a2c5f424fb134ee192010b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.12_windows-x64_bin.zip", + "checksum": "339c0173b2e810c334b9e13b3cc32e8d6ca88b930a406f643ed6cec3dae892a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B12/sapmachine-jre-22-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "f64315bb56f46693c1263bf7e5c357ea36895818e76fec43a14700dbe648cc34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "e50b9d6b38ba6f3bd33e0da6d55c95277be9b912024db461b6db5967df102976", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.11_linux-x64_bin.tar.gz", + "checksum": "0a2a3163276078f697740efac3bf301e7858004ac0bd740341bb18ead0da0af1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.11_linux-x64-musl_bin.tar.gz", + "checksum": "1d558415d9c4a1952965b8bd6a47baf5ad125ba63daaf59ab679d971c88dea49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_macos-aarch64_bin.dmg", + "checksum": "b82e616c2666083dab7e7f4135aa7c88b006d4c15f66e325f2834d7dadd4d361" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "05755a3d685f8edd9e73116f684da66c7cfa311cc7aaef52a41e5802632b7b9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_macos-x64_bin.dmg", + "checksum": "3ab30bbbe5cb9781810c4647863bb077147ffe1c745751d826dcfb623baa07f8" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.11_macos-x64_bin.tar.gz", + "checksum": "635a6320e8c1b2d6e80cdda343e5bac57b3080ebcc899f9157f8d144563c6f11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.11_windows-x64_bin.zip", + "checksum": "3ce35ff02c6fe8b336a317e56c38200262fcd7e62882dc4e38027dc31e29eccd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jdk-22-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "a85b350efef99b177b95c982f4fd3559e7979b971df19417b308bf63127e5b24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "1ce8675989187cdf552d3b77523615ed4f64db80f858e542b4ee1c475f1cb4fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.11_linux-x64_bin.tar.gz", + "checksum": "f39c5b5242a2c2b340ecfb883962b932bf7952c97c77fde0f80a848ae55de674", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.11_linux-x64-musl_bin.tar.gz", + "checksum": "0d009ef3e4be25990b566a4760444f4d9d0505e6b69531c49c139950226b9cf7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_macos-aarch64_bin.dmg", + "checksum": "2c4bd7a718e95bc5355f8658c5c89f68d6194a57db4610a619759b8722c82fe1" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "d0fb897e77926f2947a996f547a474e7135538d729639735aabeb93742cb45fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_macos-x64_bin.dmg", + "checksum": "55f7cc8eece41b8bfd42b3a19ee6f586689e51cc3d99f0cf7b73b54e832652cd" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.11_macos-x64_bin.tar.gz", + "checksum": "62e915f7152f67a14011f94467adc39eb990191b6277d89cf61c300bbbd70948", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.11_windows-x64_bin.zip", + "checksum": "083f8a53ad4e12c4eb4a466ec57f9d9479cf4d5de936e0fd1308bd251d01b85b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B11/sapmachine-jre-22-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "fa5a7e0bb5a0df284cbef53ecca872d1064a81bb4995797a8f2d0eda911e911d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "eb7f5439f93e5fdd4d5194da82a63c5821672f7dfa41300c229d5fec8ab991fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.10_linux-x64_bin.tar.gz", + "checksum": "8503c99ebd5260df89cd75fefc761fecde2586949db2fdb74b03c2e0acd98a2b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "09602a1e8539ec367de6b365e5dd039ea13e8a4ff1abf7b84e65c964c5146b06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_macos-aarch64_bin.dmg", + "checksum": "ada57857b71fedbc55a8cc9ed99d9cb613d8ccc3b2dc9577d17f055be44e959d" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "3cda8423dc2ab715837097c9b0c05102c6253e82578254a492e74abe97eedc8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_macos-x64_bin.dmg", + "checksum": "6b073ef355b009ddff009e16f936dc1e1f9ad3ab50f066ec477d42faa969d21b" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.10_macos-x64_bin.tar.gz", + "checksum": "8946b6292aaccfdba7f3ab9c3dcb53de6f33f44443cdd001a74a15840e1a9139", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.10_windows-x64_bin.zip", + "checksum": "c3a2ddf4e3ca53d4d1c36186eb318e8370ca5ce9b88b59baf7b87dab509d0dab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jdk-22-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "8d226ceead2200e9845175e8b7faa8de6224d2de83529a4ae693cdcfa606045b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "fa48b4c080ad03e1b6dd85bb98da5eac5d3f9c4bf8b9f704b93316b00507dae5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.10_linux-x64_bin.tar.gz", + "checksum": "d602806d9c66b0f3a6f78116e03400975bc1ca07b15418b8e8eb3b370b96e70c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "fe7694599eeab7d78b2fe03051ce463f720f941fbbf4e7c5b1b337a977710812", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_macos-aarch64_bin.dmg", + "checksum": "4de0d5d07d5e99e94da7ed57d55f83e338a795ab50786809b495ee1920354af7" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "9768bcc0e3cbe699624579eefff3426be1235825c9c239bed9289ce39768e055", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_macos-x64_bin.dmg", + "checksum": "2f52b1beaaf559e41f3134bffab670086f4170cca2b51a2be2312e082ed007d7" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.10_macos-x64_bin.tar.gz", + "checksum": "90668c11c655c5cd8eb5d353b7f665778b91eca8f46ad94d68ac6a3785d54c7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.10_windows-x64_bin.zip", + "checksum": "00974fae6d95151b7ffcd9e9a44934cf635442514dd0e8e8d9b42f76525b105a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B10/sapmachine-jre-22-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "cfc8c3c3284038277a267f448e965add011e6afdcc215d33da106f7e48cdb964", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "b88897965c399316da1a164ff333ae21be20646b83fd71253e58d23154b548c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.9_linux-x64_bin.tar.gz", + "checksum": "d42e8ca43ea4fa19aa6aac09cacc7d5995b2ea8f138b2b6dd200d13abb4735fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "5047cd678e3d69e94d1ba7f67b04db28fec6b4c2160a67b87600f0cebb0bc4e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_macos-aarch64_bin.dmg", + "checksum": "307662697069268cca72f0748dd2fb8ac09d62f0aeee04be0d4a94931fd395b5" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "44adad6ea6cdd3415a5a98f2f08e55385515abff63961a8645940c42031cf873", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_macos-x64_bin.dmg", + "checksum": "9b9b50f2936f9d864f782d4693c6a09952acab2688975cc89c6660b5ebdbfe94" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.9_macos-x64_bin.tar.gz", + "checksum": "158f6aae30dddb45fe680db1bfddbee857ffe9a59e69580688e205f769c928f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.9_windows-x64_bin.zip", + "checksum": "701f0a5c3e1269ff7468516d18969883016392656de721ac6bd7cf1651894339", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jdk-22-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "795df3854e365dd7b1e0a264798561d31705eb648f394fc18fab0d72e741c66b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "1eb18849820f73471cfa4322272fea02b20e3c88dcf4d22db1f8d464a714c106", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.9_linux-x64_bin.tar.gz", + "checksum": "1f499945808a4712a11cbedaedc6c5e18c9d2f9e725474ff5ea3d51f988572b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "536e234e0b21463d544828ad3d441d12f688f150eba45503a5386ca16e421826", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_macos-aarch64_bin.dmg", + "checksum": "74dca901857adfda138e0271c04a646028689111be3e2925eb877dd2eaf6e8d5" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "59e4cb8f1c895180fecf32957dcea15eecc28a6fa0289ab9faf4b73f4d55eb43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_macos-x64_bin.dmg", + "checksum": "36ca8a1ddeef59b1394443aeaa267cdde597ce940f5d4290155e6e8a5f801a2a" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.9_macos-x64_bin.tar.gz", + "checksum": "8963ab2b4d9ef149a22caebbbda4237f8676de1a9d90edf7b29ddb332d67de28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.9_windows-x64_bin.zip", + "checksum": "67476fd998f6da1deeb30c7f51ddcf8e8718ed70789574c510b0bb9fb1dbc72e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B9/sapmachine-jre-22-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "09c79d97c980973ac30f9a285655707a91a7f907bb7e9be71c9eff1dd7f74ecf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "c0edf373b57a832bbd13b2ca982d1c9587865616ea7263732bff6c3a73e4ddcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.8_linux-x64_bin.tar.gz", + "checksum": "665f1c7092cb2e41b54399cb4ae1c3ae0aff99f24cde8e6bd932848722c94b4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.8_linux-x64-musl_bin.tar.gz", + "checksum": "752f2f3c08520870977549bef6f15e84290e21586ce604fc51a0c4a6bba7b1eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_macos-aarch64_bin.dmg", + "checksum": "fabb864a1caa27c9c847afb119ec77455485a1f812ceceb240f91053d1b70350" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "0cf01ec05cb3de647d84f8e83b022a2101af4d0d971fc10ff537d4eb560e0fc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_macos-x64_bin.dmg", + "checksum": "cf584e49a15ae3ac9bde4f2761d65d6979c4cb77bfa9f1c6f00333c19dfef2fd" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.8_macos-x64_bin.tar.gz", + "checksum": "d33c8cc0cc2d072b329acf7ad1950f3a21d2ffa667a41cab8dd6a97b68663f18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.8_windows-x64_bin.zip", + "checksum": "1584d3a131f292b4e09e929f82d71114781e4d0d95c3425aa2fcfed3fc149102", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jdk-22-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "9349def6b1c1fb877b1c701d7557e369d329424cdcca0c639a2a5ad169ae5de7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "8e726713df2e5342b1418748341f709e48b70c4edc862d4c77058f887c89d316", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.8_linux-x64_bin.tar.gz", + "checksum": "7e43fead7f2ea1519e8db50e1dec8bcea9bb434dff0a2e0d46a07c8babff761b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.8_linux-x64-musl_bin.tar.gz", + "checksum": "ae1526bf247a297c5309dc10c2846073fcdeb5bc8065f00f71883eb778262bbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_macos-aarch64_bin.dmg", + "checksum": "a501199793efb84988954bdc46aa1dae9be4f8c366b7e3252c02fffcc5cb0475" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "f8c55e084e3ded07c83589120be5a219a9879b329930dba56d89aad1cbdd8e8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_macos-x64_bin.dmg", + "checksum": "e5723cf71eb5aebbc4a1da3f786d690d37fa1e8526b907809c8f5374ba6e62df" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.8_macos-x64_bin.tar.gz", + "checksum": "2657c0d029e18bfcf049be294f2c6b88abbab14b5e890d5a8ff31b7f1eb0f5b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.8_windows-x64_bin.zip", + "checksum": "b9b0874dbffdee3f2ede1e31f0e15555ce360372fe96ebba72e55d8fa8fd5199", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B8/sapmachine-jre-22-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "6b66ebc5d69f54316a48fc77fda1e5e4b7b9e3eace84122b28a2a208a9773e53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "940adf229511a5d6405563585b22a154cc9051e3635cfee9f3c83e2b1253e7ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.7_linux-x64_bin.tar.gz", + "checksum": "cdfaaaa1098d9fdb2df10ddfe74139a0875e6f4ec1e70c5044062477aca273f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "466f71a4a0237ef2bfa5cc289a3a2e6e99ba3875f701d8aa0403fb5c3be4ed93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_macos-aarch64_bin.dmg", + "checksum": "802a6dab473181668f72ff68ac9dc18644c1a8c17f8fd98087a6869c0de0beb5" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "9e65f9ae91ac794c2ee04da3a05c8b6fe15e78b28c752e0a158026a2c4587ca8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_macos-x64_bin.dmg", + "checksum": "70a268966e297f1b7efdcbe2a366d1f497346e927c96d390de4102137b650881" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.7_macos-x64_bin.tar.gz", + "checksum": "9939015ffd15df5c223ddd594f161b151826b695017b47fac570c4ea5d8cd59a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.7_windows-x64_bin.zip", + "checksum": "56a09288c18e67a7c651c00cfb01303f3f4f88bf8dcd47bf86ac946bad923a2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jdk-22-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "de33e44787f365f32c52168cf33f147679c9168c42363b08bb9168a7841ad0a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "050e79d66ae356c7d5bff7823091886672276391a07e2b46a1645b17090b4c21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.7_linux-x64_bin.tar.gz", + "checksum": "120430d556c339b384e51e93df929a5125d149d1d6b3eec0b7d490519b91de9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "347484ee923ce8bc382de6cf7e1ad598abc3a08373b2d458d989cd24c62ade11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_macos-aarch64_bin.dmg", + "checksum": "eefcd0d21ae201c1c5221bfc83286b3d1139b9d699e8ea23d51284f137015657" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "472817c979d4b99fc64312fd2e35b815a8d4a02e54c72df1cd656c0f05c27c0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_macos-x64_bin.dmg", + "checksum": "dc231a99d3a60e568f4731cd63f817a73b0f0974ed9c6560a3f3c8eab07d3652" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.7_macos-x64_bin.tar.gz", + "checksum": "71e7bec58b56b8bc31362f1f6148b3efb22a0d1c49bdb9802a12599c8adb1a69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.7_windows-x64_bin.zip", + "checksum": "0c0e7931e18d6669fdc55d67e55ca7c6b1f632e3a0ba9dbb42c8d495a0b6a007", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B7/sapmachine-jre-22-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "cfc562857e3e5d5bec904365fe8b41192169e2a9319c33a780d40e81e82b1461", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "3cf59a80fe1b48e681e7e0534cee821e052da9911f6518136b4c3e68119cfbf2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.6_linux-x64_bin.tar.gz", + "checksum": "21e843e2ca3a5122310c525e88b69a7c8efbe4560fd7d1f8bff1b65a1336d355", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "91a614c192a88344b1d61c5e494ba087eb4b35d3f1f10368408d78a4c0552d09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_macos-aarch64_bin.dmg", + "checksum": "d18a3af0b99e064951f6ec18cdb1be952a7f037e95f4565c40fa4f95f0d8ade2" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "a2dcaed07d5e1b963e0aca1973657f9323c72a56c5bd495574d9724debbb7afd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_macos-x64_bin.dmg", + "checksum": "a454817453677ee5a5f712b49a657a7640096a740ed0945642cb29c9c37df0e4" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.6_macos-x64_bin.tar.gz", + "checksum": "5bfc0d730b0d506123bcd9db8b7efc3abdfb35b817d84aa8c0aba4dc29ec6997", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.6_windows-x64_bin.zip", + "checksum": "5372f582553470b21570af7429bee61226a7eee3ea0c75834ffde3bc7bb854fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jdk-22-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "cd191c17b6468f2236717107c4f146b783e7f2572447f15fdf320f65ad86e443", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "34467911e7febf2b18e56b81355442e645dfd103ca408f3dcb072dce97246038", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.6_linux-x64_bin.tar.gz", + "checksum": "e2eba7d0068090e7639bba19cfced831a931e10f55e5b5dddfbd4beb530df3ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "17a6752d349f82cc5bd638766a23fb9f3e4ee4e00734d28d943eac460b2b02f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_macos-aarch64_bin.dmg", + "checksum": "9bd2c79df202d9744fb02aee1b872158cc865b9e208edc2e31b9732483b33f7a" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "9d5de69cc35ff7133ae4bbd5ce4696bfde4bd3f1e81ce2546049661e71fbe685", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_macos-x64_bin.dmg", + "checksum": "ea817593d4f5279efe163ce5562139cb6de8fee33ca8935b674cb9a276a1b619" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.6_macos-x64_bin.tar.gz", + "checksum": "cf8a200fcc82733ae86a35fe27d595d81b0bdfbf7a45241760a50d25b2ceb9d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.6_windows-x64_bin.zip", + "checksum": "c47a0b1667bcb5d88f8a21c7652618e155f6fa55b06ecd2f7f204c180a075bf2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B6/sapmachine-jre-22-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "b39defd8b9e0fde54798af34e1a1903ce319bfb200508928618bb2f29fd55747", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "2be9061d758b0392464bd4c8722ff2b7073cdd00130827a900b717d3bbfd89b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.5_linux-x64_bin.tar.gz", + "checksum": "5e0dc75cf725ce5df2de970fddf4d04dc06f17c1611501d78763ce005e1039b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "b77fc98f4503c6edb3bce3f6dc58f19133009dd0146542e4b11643740abf741f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_macos-aarch64_bin.dmg", + "checksum": "63af026f8075d6d37e428651174507c74e01afc1bc87bebe6e8ad0d5510c4ef8" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "27a4f1e3dfe88bc4803c7cb88933d13645cdbb5a96dfa18a493eb7fcefa684b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_macos-x64_bin.dmg", + "checksum": "90b07ad02dc01887a7c74a9ef37dc56eaed7a284bba6ba9de143d47ddae6775d" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.5_macos-x64_bin.tar.gz", + "checksum": "b4bcb0c02e6cdc35683f493f388c9469b1f325f81acfc92ee275faca8c9e5900", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.5_windows-x64_bin.zip", + "checksum": "0bb405d09e6e4245b66b643331051999fcd998840ce57cacb04246d6753feb28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jdk-22-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "a323e112b3734af43bfb53ab85b016663b4ffd93694c277b930e24d89e6f4656", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "70f302b98075467c91fefae9fb63ff9d01a12ca02f9e4d39ffddbca72b676509", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.5_linux-x64_bin.tar.gz", + "checksum": "7248ea1a7905e45b8012c421850075a16c01f6509713f2e4e7c41daba6bf845b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "bd2132b232151c203eb5308a71ee924e0605284cabed09d81d82f06f98036b0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_macos-aarch64_bin.dmg", + "checksum": "ab7c977d7ded23e26b4a8e14b9027f8c6a515b23c00d05a58b41e810f2128a8d" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "ed6e205b85536f7511f7c21bc8b394e2cf70807e9c97274f09edeba0bd6f032d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_macos-x64_bin.dmg", + "checksum": "b52fa770c6d51cc51ccb4a32533958fcccde3b0d81cfa916f5d16e2aa669fefa" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.5_macos-x64_bin.tar.gz", + "checksum": "d6b3df2d25225634aeb66e9cbaa13edfefe2d928407df15ddce42779fb59135c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.5_windows-x64_bin.zip", + "checksum": "3018eff38ea789aa910ee8c2bb5ef972b8be0ceec63d77a9b93f4399a84dd8cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B5/sapmachine-jre-22-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "7a3adfd91994899e22662dedbecb16579e10efa9a6af825d6ac94e901c33d135", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "9a3216aa2549089f40cd2b7ab8aa21ddd0af2228f8a3b7b78976ed1ced4cb110", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.4_linux-x64_bin.tar.gz", + "checksum": "528d7b843164efb8d0344750002de3d0e357bc9fb9856b7d2946eef0b157a3a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "31bfd195dd6e99b080c2021c41358f7bd5463f900e7a1f0e1c80e9105edb171b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_macos-aarch64_bin.dmg", + "checksum": "f5edcc3d36f8517b364bfc6f7989f0876c048f6c57b453adde5bb1def460785e" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "393a911509e1c1b72fd644381a5b1d684752b09852f54e701e000e522f3b8f0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_macos-x64_bin.dmg", + "checksum": "56e6148894f69c7adb79ed99a99a2bb1ef8f5d1d46cd34a8dffc76c0c43d0d4e" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.4_macos-x64_bin.tar.gz", + "checksum": "8bd3fa1c73a9645a9b41109a89a76ee63edb95bc4ff8fe44eb96c3e25bed8d5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.4_windows-x64_bin.zip", + "checksum": "3bb3b490df035fdfca97d8cdfb3c2529892c344e3aa2eb5223d59d131470d57f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jdk-22-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "67ef7c801eb43b43b75d3549187843110cf949c8f56b72026af4c5e40c89710c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "cdad638c95d6e41e9943eedf146ad02f47cde5789589e3e177d9eab2a2b1f16a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.4_linux-x64_bin.tar.gz", + "checksum": "5ccb38c5a71996c396ea5358c33efe9f7d27a81eaa55653c1dfca02a41884555", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "69bf60b99e49a1419bfb0aa79eec95e3988a9c91a2c92ca66706b0663984e4c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_macos-aarch64_bin.dmg", + "checksum": "15a2237bbcacb2b281865871042335ccb2e7b2f12c97b807c2bca0e41603c8d9" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "93c9520234531919dd19f72f91b343174a31990653a12a4c5ccf7e7feaa79ca6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_macos-x64_bin.dmg", + "checksum": "fbd1673ce0caaba12064ada104de75812c4a2a11644b53fdb986cf2bda3d406c" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.4_macos-x64_bin.tar.gz", + "checksum": "f54b7a4c27b1486c8d6b715454e45254eab01628d716275b505685a3998d2b47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.4_windows-x64_bin.zip", + "checksum": "d44ba61151c0b619c3180ffad0b0b36733079e2bf011962a082ea364229d5b79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B4/sapmachine-jre-22-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "f662fd1740fcf1e9a05e3ec64adf86528c116dd00387bcf408c181759f7a34a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "8bc790b1a9bb7799dcdefccb372f58c7190e37af3e82381480d213cf6ff407c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.3_linux-x64_bin.tar.gz", + "checksum": "cc80c0d554480a625da3ba868219c500e07292a70a3032d6b2862eead3851448", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "52e6f6132373ce7f6d9127e6a3fcab71be63e6aa2bb3e8512b9244ab49232597", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_macos-aarch64_bin.dmg", + "checksum": "6f8d89a97fcd1f106747834682fa3ec0a3f0b99361924d6368f1c6467c215f22" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "04a14d8369a2866677b9b2e1c948b8d589ee47d53213f8163e0beea7c0eb3539", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_macos-x64_bin.dmg", + "checksum": "62e4830cca6cb2c80d39e969b4d968993ca1de6eb6676500c9d3bf2e33aaf4d2" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.3_macos-x64_bin.tar.gz", + "checksum": "24e186c0a33dcceefd9cfd8856782f598a579026f16c2121e03767fb209ae1d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.3_windows-x64_bin.zip", + "checksum": "53031c86404d8974cc170759ab3bb50c1ffde84c1df41702ca6676e4ce4eccf0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jdk-22-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "04ef803f2d84b47f8a306996b2244705e91d4bddfd7672b33dc73171a16c7873", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "f95069a4f042aee3a34f7948f418c52fc1882546def287d3fcf29f53c1103e9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.3_linux-x64_bin.tar.gz", + "checksum": "34c7cbd050eeb64ac681ae7b5c4b0352910feaaeb53d552826bfa987fab4e70e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "4bf29a34ecc0e0ea7c8194c70b3a3d64587a6bea3aeb096ad26d5600b76e5a99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_macos-aarch64_bin.dmg", + "checksum": "fe8f17872958ae43462a76a88f98457625e846a609739e7ba3e4fd9006cc0725" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "8c8f2eee7d3bca5888304c540fb62a74fd48f09e68fdff2296c851b8bb95a9e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_macos-x64_bin.dmg", + "checksum": "6bc69fed91328893391d28befce90e8ba4fe7dec973025fb77f3572d0c7ba798" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.3_macos-x64_bin.tar.gz", + "checksum": "3cad07dacccefde9a89c11084dc7fc550d8c2b403b60944b04c02820cbfa4da6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.3_windows-x64_bin.zip", + "checksum": "1fdac84435eb1616b82d349ffdda3ae3c6b8c65e74e018e82cf046df71c614e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B3/sapmachine-jre-22-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "db0c820fb664bb955ab96cf135508d28601e89812535d42b8a7e6467cc7fa40b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "cfe5a5c97d4f31c1a57f64bef80b0fe02fd3ee9ec5b8546a7431bf6837502667", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.2_linux-x64_bin.tar.gz", + "checksum": "02415da41715369afa7bfd2aeb108f6d8dd439e8dcf52ad36467672d25db2060", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "746e9812d517f807d7abf85deec0cd2ccc8b68872ad3dd11c58f3fe0d744febb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_macos-aarch64_bin.dmg", + "checksum": "a9d66630765de0cd6c5515ce83ff8e474766bc081e2888930032470c344ba0a5" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "93c232ee8b8e4e9dad55c993c6467d5effa036c161db08f3d06bd56c0f7bbe9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_macos-x64_bin.dmg", + "checksum": "26768e4be30cc374aca3f3f9243efcf82d741a2693e7c6d109602159082587c2" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.2_macos-x64_bin.tar.gz", + "checksum": "eb43a964156e101f3e7a55e3ca18ec2cb4069e1d8d15690113edb52e2fab4ec7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.2_windows-x64_bin.zip", + "checksum": "d5b7a5c10bf97dff82e04dc8e7b83368f160952c625ecd09ae7c07a26bdb2936", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jdk-22-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "bedbf8e54cc7a2f9375225752039a1ff47a1512214c7ead3c8a1928d3cfec045", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "613cca60e69fd0f30a0a91b35901a19f55300e8bd2855f5e467d9fbd9e68d8e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.2_linux-x64_bin.tar.gz", + "checksum": "aa6735b71df904a9c0e084e2b1f3929fbdb91e739a784909b36bdfaeb32d5f2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "5c2de1822b3280fa959ec62b1cb9061a4497eb466636f5e8049728546a3d6af7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_macos-aarch64_bin.dmg", + "checksum": "ade698c2ad51ef2e19f065ca44cdb7e418df3a67f189d516099b3b6045cad767" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "68fc3eb517b76b4413b90e1e4a278a9ed517d04eccc56fb1819b3c43992f7632", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_macos-x64_bin.dmg", + "checksum": "f07542a8c9fc539957ff7bc5abfce47b2859b1788f95450f7c111416204e4974" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.2_macos-x64_bin.tar.gz", + "checksum": "7b84c4f97e90471f36977f6d7088ec29c1257b63caa1875c60710f08fd069bc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.2_windows-x64_bin.zip", + "checksum": "aef7908d9b8d4607b9f0e01f689812fcacdf0f5370eaefe5f410071e89a50fcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B2/sapmachine-jre-22-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-22+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-22%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "819de739ec8186c83fb7d322dda9eb009912e02caf0db19a0b13a7a5dbb716ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "951148b1a4c9a63c46936482b4fd832f54d2268e9b4d087406057ca3e30cec2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.1_linux-x64_bin.tar.gz", + "checksum": "04c10e42992433e0f1358f1ac92a820b185ddd4f0a114d6c80315bc7a9a8fc85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-22-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "9017829441e870f62188dd698abffeb8ab7f63b97129f10ddaf274334dd6c985", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_macos-aarch64_bin.dmg", + "checksum": "d854f768e1147bf871af82caecf43c7e60ef0ae8cb286cd531a683a1636968a5" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "7eab27fbd4e1daa25c95953a0238c497e96f24fbb77e88cc72b2e4286dc8ec27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-22-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_macos-x64_bin.dmg", + "checksum": "ec313a45d83e59d488537e08909d19d0d82ccc88cd05e03ddde7afb478f9ec3b" + }, + "tar.gz": { + "name": "sapmachine-jdk-22-ea.1_macos-x64_bin.tar.gz", + "checksum": "76240f6361dde8e89fde82c62e1479238ef1e578fb119f9ce9da5af1d2201bc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-22-ea.1_windows-x64_bin.zip", + "checksum": "d7b2a5665fcef0110d4792435bd7a25bb4711448ffca8e641346bc85a6ea111e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jdk-22-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "2f09f2e25dc1dc064448992b472aff94215ffe4c0d0a45881eed46df5c458c19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "5d50f8c3de02986c463f0433d40bf512b7c4213940bf0a3e5028d1fd10fdcb3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.1_linux-x64_bin.tar.gz", + "checksum": "979b82fc6c363de82de3e586a8759a46dcb8cb5fc4a89175d5d652b86685b005", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-22-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "ab7e46d98ba656b42ef5a0520455644e2bdb2b1a0a060ef9318afa2222307b6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-22-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_macos-aarch64_bin.dmg", + "checksum": "ff4218ca09b5209580e1ec54b53cb8964100807c404b86ecfc67a666fad0bb80" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "4360245435b723c592b57dbb97236f024dc48e255de57b06a56382988e4c9d8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-22-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_macos-x64_bin.dmg", + "checksum": "53f7acec26c8b424b7870c87b170fe1e6a95dd8a45ace68d32919d9f5e0e2a7e" + }, + "tar.gz": { + "name": "sapmachine-jre-22-ea.1_macos-x64_bin.tar.gz", + "checksum": "8b5a0a8ac9dba3433fe31a0c41633e0d8e30cbb047e2851f83dd534577033fb2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-22-ea.1_windows-x64_bin.zip", + "checksum": "86163ddf5d8a4f9740a57b1533202e53fdbf6f1c015277bc54c9d67ed5cb6d44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-22%2B1/sapmachine-jre-22-ea.1_windows-x64_bin.zip" + } + } + } + } + } + } + }, + "lts": "false" + }, + "21": { + "updates": { + "21.0.3": { + "sapmachine-21.0.3+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.3%2B7", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.7_aix-ppc64_bin.tar.gz", + "checksum": "380cb017e907770aab38ae0bd4e2a7ac8df139fbd2038aab2d3169bf52973c33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "e3a07b504a2fe2561a2eab0319089b8b27264717cf40ce160ba347a4ca617538", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "ad98da94ea2eb65284dcfb0dc72891db179da1a71dc14159cf4f6e05f59dea3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.7_linux-x64_bin.tar.gz", + "checksum": "1bcd6098580941e3830e0f99aebf3db387c5b64c7687fab782c24af680568404", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "4217db07e1478c2a8657681f965ba650467d206f032e600cb6e1cb58a34434a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_macos-aarch64_bin.dmg", + "checksum": "d6caabc6811b8b8a7742e0d32242ca2098ad7a64fa06a0791678daa6e4ba693c" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "1f36fd499ea4dc814ba815c64ce153aa0be30e5e7f61b6174cf70506a4ddf8af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_macos-x64_bin.dmg", + "checksum": "9de4d51ad796f0ede660415bb5af4018871a380af0b74e0f9475beeeaab1a9c2" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.7_macos-x64_bin.tar.gz", + "checksum": "7c987499c2c7d5ef8d2263ca27b57c3ab8a56769665861e16213e858e936ec26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.3-ea.7_windows-x64_bin.zip", + "checksum": "8d6c1886d5b4537033d29f9d3b221e301f3a65007e367460ce1f945e311d1088", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jdk-21.0.3-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.7_aix-ppc64_bin.tar.gz", + "checksum": "04c2e8001c5935ec8b2d889edb14403f95cc2cfd74be85c8466da5612177d877", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "687fc2cdc986804c3c07d2f7317ec0a5b82bb214d06f8b1556a48b5933c6dbd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "1149ab90303647095b0c75fda4e0bdc3006aaa3ffdd10d45f2b25ea695042443", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.7_linux-x64_bin.tar.gz", + "checksum": "c8cd5774c4c201c67671b459ad03fcbd1bba02a71217187e78eeadbd7157c8b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "9d186dc5513f1bfeecc78de26ac115469f8af3e883e4da89b8a686b7c75447c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_macos-aarch64_bin.dmg", + "checksum": "82cd1624af91e1e1edb533f850a8396ad17c868b9831e043ad8aa2ad72152cf7" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "117cbf8830b465ca914185de7771e3b8c509baf2ccc72a3d2da1a7f31fccbca2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_macos-x64_bin.dmg", + "checksum": "12c4991d06b49ff8e1d3ad26e224a4b4634cfc841860ebeb4cae158035a86f56" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.7_macos-x64_bin.tar.gz", + "checksum": "8f3857c393179e13d9a70320655b31c1d5e1f881a4c3f30d860ec24f8fb32255", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.3-ea.7_windows-x64_bin.zip", + "checksum": "bc0a04fe4fcdcbbe9968c154abfe0a578652a461a89624576124261429b86739", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B7/sapmachine-jre-21.0.3-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.3+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.3%2B6", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.6_aix-ppc64_bin.tar.gz", + "checksum": "b5113a77aac9c203ce0d19a207c406f1bac231a9ba2e5cb7a3e4902256e0cb87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "340a4839e65c698811ea31318606e312502a7469e611585c59455fdd5c8f8c77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "e6bfc20fd1cfbaa357baf5e58d69f3165aaece1fd6b66ae4864203f9aa02bed6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.6_linux-x64_bin.tar.gz", + "checksum": "39538af9457a15e320ee0c2214c70255a0597d88bdcbc7aa6cda40399f131d07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "159dee7f1a9d1997dcac53534e2e6482226b2f059a0c950d1dd0c90aa5a6ab4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_macos-aarch64_bin.dmg", + "checksum": "579e495608525f61efd47f984ba4a3ac96851c81d5042c362176b35c4b02993b" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "b704d9f639c80b33b0e4cd68d61ccdc379edb79eea0d6516bfccdcf6e71b536b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_macos-x64_bin.dmg", + "checksum": "38b5e8c3c27b9526111c39b68004b15bea1c1e891ba58dc1416de394dd937c1a" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.6_macos-x64_bin.tar.gz", + "checksum": "74f2910acc3e20561c584febb110170899b984984054ed45534dd47b5ed110a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.3-ea.6_windows-x64_bin.zip", + "checksum": "4b6429197480c39b8e3ba27aec334772c57c0de4620174ded430989201b18971", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jdk-21.0.3-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.6_aix-ppc64_bin.tar.gz", + "checksum": "da718131a72894cf6c4b2dc3c6848bd9ceb59f1a2a8df0c5aea0c6b75c9493b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "29b5dbb4c3f9249ebf24eafdd9dfa1fd16ef27b899e1ea5a496097486e844df0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "aab1cd6e2569d904fb8235f33ded91fac0bc18140c09628090e9ba86db1bdc5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.6_linux-x64_bin.tar.gz", + "checksum": "606d5c82039abf90d17d20caaaa4063fc80c4cfa993ad7e2cb54b631bfb79576", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "abd46a585222e953267e1958ac7936fac6d0acab498884963bd92cdb8dcfc3cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_macos-aarch64_bin.dmg", + "checksum": "ac2e45ceaaf151b3f92bb1fc4d818307dcdae029d89a9ea72f5f0d26e1ab7a3e" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "6f634100ba582f6eb2a140d31b6663086fafb6bfb169f877195cab3421591185", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_macos-x64_bin.dmg", + "checksum": "b505dda94cd01f5e000bb48984e30c9d25bcf564b7e7d30e41c82bcff92ee6bd" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.6_macos-x64_bin.tar.gz", + "checksum": "7aa06014cf3bf689d5d38f3d85179eb709fc013fa767a372014829712f242917", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.3-ea.6_windows-x64_bin.zip", + "checksum": "ceb384edaa311419b8bf7e27c8c660d8a4dfa7526409ebe34bcf88236d48e5d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B6/sapmachine-jre-21.0.3-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.3+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.3%2B5", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.5_aix-ppc64_bin.tar.gz", + "checksum": "4d01dad2c6da097f6592907f3b48930906885452d617de48ac833cf87aea701b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "89cfea23df65812dfa1704acf22d5e2bbf51c896af6925b2e72894746e1f6ce2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "291bce7b408fe59698a7013a7ba9607310296140b697fbaff27d03bee0069d5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.5_linux-x64_bin.tar.gz", + "checksum": "9b0664be0ca9f0bb9857a3509c15c82d649c438342e77a70124080a82e6b9169", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "083bc23c1d23d328b571263f9d7a3f2d996699feef76a2cad35eae2c00fc9136", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_macos-aarch64_bin.dmg", + "checksum": "94c6661dc9a78c844e053a24087bd205b6251f5ede81430476f3085f0703dd0a" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "619877eb346faf5471feab9fecd12d10513a7bb6893b38f7bdd3b15c4213bd7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_macos-x64_bin.dmg", + "checksum": "a98e3d32e13db4868b0796940e7a9a17950fb0dff56bc13e7550a2c87fa81287" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.5_macos-x64_bin.tar.gz", + "checksum": "dd8838f32d277798418c72eda0c7b27e29510c03e6383825260c085a2a004a11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.3-ea.5_windows-x64_bin.zip", + "checksum": "36c210eae2989947de72537eca32def56b6237915e8acdd7e79db3fa95299d28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jdk-21.0.3-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.5_aix-ppc64_bin.tar.gz", + "checksum": "1f288d7288af69866a3df5dfa4d9ac39aa7965afc43b4a07492df0b7928735dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "154fe4a8fa80d4049dd167fbefd38b8e945752f0afe82fb51f4e96de9e6c8e3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "112a8e6bc01f85a348e9d9cc810f85fd3cbd817028654c8c61a95ac90dcdb857", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.5_linux-x64_bin.tar.gz", + "checksum": "7cfc2a68a92232638ace0d4a211afd6d5c30d9e7fe3907d851d788afea9aff87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "686b8ecc114e990df1ace95d19c9f8029031a0896a41caa5a20c618f3a3b5048", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_macos-aarch64_bin.dmg", + "checksum": "0748525d070c86408c0c37b3348531d84dd36e243b6fb827fa7f18a97f2a8ebc" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "bc53d0eed1602cd278c7073947da234d604486ebdf9e99dee9512db785575c77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_macos-x64_bin.dmg", + "checksum": "9f5c1fc8ece3f9b42494e184cd919a1016d3450251119db483303f10756d5088" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.5_macos-x64_bin.tar.gz", + "checksum": "61ef1be268962f4258e8da0c7273935590c8402f77c6ec733764030ea6d2a61a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.3-ea.5_windows-x64_bin.zip", + "checksum": "750356e4bf575ad9e7fad49f0f56c7cdac418b11f6a4f4002f76a74ab34ac17c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B5/sapmachine-jre-21.0.3-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.3+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.3%2B4", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.4_aix-ppc64_bin.tar.gz", + "checksum": "d3e9ef851ff215fa4537650ad49c1e5ad8694f140ffe3c34f757ccebff4dfc13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "b36f99ff0a0050b532d57e8e29e7d36c04b7107db8bad94c8d78bd8a042ca81b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "48c46bbc23bebc02dc9e8484783bd04afb15ad42a7b26379010321482e1f765f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.4_linux-x64_bin.tar.gz", + "checksum": "4bc2441e66511a2f413dc7b82b9e00d8183a23b06283e98e6a573e89f4078090", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "964bc6c8e905aede804d20045a0e6348b4950e5bd49f604387e23b120dac9e3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_macos-aarch64_bin.dmg", + "checksum": "885b6a36402184371d48c5487e4c6681bb38b6724e28cc0f3bf3023c1fdc7d50" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "f912573d83abc85a8f512300a47a345354e3cfc726816f66ea948c74f4574560", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_macos-x64_bin.dmg", + "checksum": "4084ede847d27ac92a80d11bae9a0bd13ac749e702153231dfca98c541b7f880" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.4_macos-x64_bin.tar.gz", + "checksum": "de65d4af0dd327f276b1737e1128c485c908bfc5bc69b599ea1675831dc22628", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.3-ea.4_windows-x64_bin.zip", + "checksum": "d0f57a6775371b788530ccae54cad337d15af9311aea9b96fda2b3faafd501a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jdk-21.0.3-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.4_aix-ppc64_bin.tar.gz", + "checksum": "540d72ba053ca478119d6cf97f9e2f55ee1eef803ccae61be2b47be111bc59ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "7f42b14fe4199410226330809f5e4945e6286bdc56c936aa664ee1fe416e3dc5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "2f49512e7ac0215258973bc40d1e4869e656803d114cfd85a1354a4ba95d1822", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.4_linux-x64_bin.tar.gz", + "checksum": "bfaae6613cdb249c89a5f6f528a897f046bfa8860e49a468cc9988ef9dd88867", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "e3f9537e8ee7cdc71a828b6fa39c93f6778757642f33964b1554ebfb60e2bedc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_macos-aarch64_bin.dmg", + "checksum": "674e4ac80a85d5729003fa1b49a36abf5643dad940cd0ab004f2ab8ffef1e91b" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "d8905f87c7ea090d2e89d13b6a7596addbd99de1e692c420bde800c854424d96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_macos-x64_bin.dmg", + "checksum": "71b257de0100d27a002310bc3fd36845e8b73b5c06829192c401f5006e627854" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.4_macos-x64_bin.tar.gz", + "checksum": "9c83402218ccf3defa5976a84063c0b15393384f01791ee7baac2188a185d4ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.3-ea.4_windows-x64_bin.zip", + "checksum": "b255483b6e106ab7ce9541c2504733d59172f64d6375d0fc756f189f3a6c8699", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B4/sapmachine-jre-21.0.3-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.3+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.3%2B3", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.3_aix-ppc64_bin.tar.gz", + "checksum": "39bf9eb88c30315667f66470744f9d9dfac048818c3d5d12a965e86a9a2265be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "160b47ae3391b9ef0e66973f6c31f87ee607ffebec43ea8aab3575c5abdbfbdd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "6c1bbfb96a9b2f0959a9fc109d20b8d3f434bf66d74843bd5d88fb1a9f17969a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.3_linux-x64_bin.tar.gz", + "checksum": "adee554eab91ccf94413c03b199c95b5ac93f3afd11eb4e50694968badbd1b09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "b2820adbd0935e823a3eaa97e8720b246a6b2a0dde908fefc8e196a5e85bcdca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_macos-aarch64_bin.dmg", + "checksum": "a176306bf19f0918986f9d9cf4480fd82a67130583f5462db675cfb4fa913323" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "95b4d9c36db80265eaf8cb96ae71b3e7b3590c317ebec1a6552dcd7cc782f667", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_macos-x64_bin.dmg", + "checksum": "65f0794fa7edcb84d842c9d8b55240298a5d15f32975c9763c9037eb9a777291" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.3_macos-x64_bin.tar.gz", + "checksum": "fbe9e7f560dff761c5f79a1dfb405c41400af8f3d1ed758994cfa10ca3733c35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.3-ea.3_windows-x64_bin.zip", + "checksum": "c46197fda4c3f7f66078771f761432b5be741e02389d5ea692284d6255204daf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jdk-21.0.3-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.3_aix-ppc64_bin.tar.gz", + "checksum": "1abe25f444662ebee8de6f4c8419ed5f526aab36ed84ec23db29aeb4ad8a6a3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "7c7d3b40cf2d279755f5f676a001bc0f656b4a6252dcdfe3c482b8b11d845203", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "9c960c812aba207c4169fe7ab690243f52ff867429a1e3b0cde5c51c68700c2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.3_linux-x64_bin.tar.gz", + "checksum": "618cfb30b02738a344e296959ac0c5a294c49de37a3f72adedf1f330e7e95432", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "89654f1475c6b34b1b15efebb632a454432afaf816dd1ccaefc64b086cee1ffa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_macos-aarch64_bin.dmg", + "checksum": "34164179d21225190efe5c43327600c012f6ccddf226e9e954a579dd4df89982" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "4a65f736b8f41e140aa6b2886ec819d49d7beb8b55f9ab7debf3e23c2ca5552e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_macos-x64_bin.dmg", + "checksum": "2240bff7f9bef75b1f04f280c8b73426f2377f4f1790c94c36a2b112deae50ea" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.3_macos-x64_bin.tar.gz", + "checksum": "e40316cd421a6184c2c11bdd55187a08c8f672fe77d0e1971c9b8454eed69319", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.3-ea.3_windows-x64_bin.zip", + "checksum": "4c1320a4ff54e32a1a99086b8894f24c038a5c3ad98a7c88eabcd4c6152ba1a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B3/sapmachine-jre-21.0.3-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.3+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.3%2B2", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.2_aix-ppc64_bin.tar.gz", + "checksum": "c1d19a24d1a8c58a87b5a7868b93ad48d9879bc1aa227e484dd5441c5b0d2a3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "e1d75b2d1ea10e9533796d7b2a8a8fdb197d930d6a65715a814bdd300ff3a647", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "bcd8c6c3618aaa134b83f07f039128c9e7a18b4579c9a7a6650deef883487a30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.2_linux-x64_bin.tar.gz", + "checksum": "ab1069327f1d8fcde2de83a55257b2317e31ec4d713924688a9a2e3846870b75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "eb6a2c98f639ad54242536dd8d1ad94cf71e34a3fa951898108834b115cfa5f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_macos-aarch64_bin.dmg", + "checksum": "85633fb36364a4a35b0ccb705b1aedcdcd0a1fec229c68e0fb167189b265086b" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "41e1347805f2526edf555774967be604644861b3f2c100958331758dd7a8838b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_macos-x64_bin.dmg", + "checksum": "4dab6f3ffe8e6b9212458330c1920ec2be036c214e0e6382260cb9f429dacff5" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.2_macos-x64_bin.tar.gz", + "checksum": "e22487db8087c1eadb0895c097836242775aa1f4603a944727d777e19262db8f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.3-ea.2_windows-x64_bin.zip", + "checksum": "24d49ac86e924e246d9644d92a68810baa1fc8a2977955e923a2d43fe61699ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jdk-21.0.3-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.2_aix-ppc64_bin.tar.gz", + "checksum": "fbcb296b5d8a078c0e831b2ebab69657acc153f5a07d1c15f20c08a79de69188", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "08aa830ef9f460268367f2d924d5df14ec7913660c9b90ad94cf19bcdc43e466", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "34c460021cf7626a754e64c530dde760f6972ce36edfb3249390c4c85c5ffd46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.2_linux-x64_bin.tar.gz", + "checksum": "648a1635eb8a2e741a13661f9a8a9fff80a354fa2d0a62bb8eb5845f8333d43f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "e28fcff96fd09aa1cbc8c42a4fbfcca736c4d3cb5dd832c24c8f87db3c1d8862", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_macos-aarch64_bin.dmg", + "checksum": "9b457024ff8853cf67b248b7f321f63446505f4abb95069fc46dac648c7185de" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "dbf7f116dcf69079f97376507efa553a99f6999378eb9e6f2eec2330d119a39b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_macos-x64_bin.dmg", + "checksum": "930be71b61d6a52f7a2051b5925c00041ba6f9c4a22870ca88bdb243b489228f" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.2_macos-x64_bin.tar.gz", + "checksum": "0fc33f9c627b7ff63be276f0c1903a56206addb940774162298478ac48f9920d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.3-ea.2_windows-x64_bin.zip", + "checksum": "230e42f45ef240acdd0c33c04b6076584ef7d8a65f080955f7e43ff21c4c8c92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B2/sapmachine-jre-21.0.3-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.3+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.3%2B1", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.1_aix-ppc64_bin.tar.gz", + "checksum": "e79df751d49742f8df24c88dc2b4546c0bbeb720ff1997aaec4eec3da445ba01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "8838ccd7112ebba9e59dda59b4986a24a0a5e97ecc071b0cc220fd8f3bb3d6db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "b8c23521b0680538e230bdcd8bd4b4eee20a3c85726b8a9be0688e0cae69006b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.1_linux-x64_bin.tar.gz", + "checksum": "ed67877c4e33b29fcdc3b6751a801a0668a195721e16813997b629a29f2731a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "dc40723f337fd05dfefba65612dec744c03f0ecd0c0c246405176caaf522cea2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_macos-aarch64_bin.dmg", + "checksum": "1b69464c46f3575707242b440bdf5778d4a6e57b0e243e125c64202f23d46c37" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "7d390016379994b2cd4da64e24e0051d907ec2e044ba049067da7c6ed0f45fac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.3-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_macos-x64_bin.dmg", + "checksum": "4724d22a04d3f26dcc16f408313419bb81922ad68e8598dd65399bf142b8298d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.3-ea.1_macos-x64_bin.tar.gz", + "checksum": "8d504c3ab93bd6dba70aa9bd59edf18c87729ed956fc41d30c3b0fe26a531d2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.3-ea.1_windows-x64_bin.zip", + "checksum": "f26cfa173e3b05d3c98a937deb6a0c61bf7be93000591404a4a790bf3fec39eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jdk-21.0.3-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.1_aix-ppc64_bin.tar.gz", + "checksum": "27b258c065f557c81f4664b2c9f16130dd38facdde94889b24a4f667c087a9c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "67bd820df3b15ac741d0dbda03c7f876a73945e58ffda5d8fe0f2935abbdf92a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c3d21a3622277df9d80af572eb0bd7533cf649c693d7083e071bf8e988c1ea3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.1_linux-x64_bin.tar.gz", + "checksum": "711040f10984872ed599df4561605a861134dbc99f196045c63b072abc876934", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "ef20a8b15a5327d46eb6c871b73591153fc3a2cf3c9347d87963aad0ce844d56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_macos-aarch64_bin.dmg", + "checksum": "9010546df66391f8d0504b14b0d7d24451e9554737c98a2d6564cdd12258d6d3" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "6ace329eadd683163a6cda2b35ea4696a5559b5beaeea07e5d4047e87da530ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.3-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_macos-x64_bin.dmg", + "checksum": "4b18abf78016797d7d21de9004cfd62a6797ff25a9ae4405b9ca78bc72b23f63" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.3-ea.1_macos-x64_bin.tar.gz", + "checksum": "bb04010e23039e9dcc31a835c21ad6bef3d02dc37152e7346adb03bac5c04a2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.3-ea.1_windows-x64_bin.zip", + "checksum": "def17e20bd3957004c739e36eeeff42a423faac55e54104109a8b0e9a35a2f7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.3%2B1/sapmachine-jre-21.0.3-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "21.0.2": { + "sapmachine-21.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.2", + "ea": "false", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2_aix-ppc64_bin.tar.gz", + "checksum": "dfa8c80057d1fad0b5162e4fd9f64579a2a31006766115d2522e49ec549a7d5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2_linux-aarch64_bin.tar.gz", + "checksum": "e5a3a1c377cd35d2068de2337685c9940e27654370768008c1d82b0400fbc628", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "b3b95295461e05d2cb58e192e29af27c2586d868848f72f1a86e216cc20707a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2_linux-x64_bin.tar.gz", + "checksum": "3123189ec5b99eed78de0328e2fd49d7c13cc7d4524c341f1fe8fbd5165be31f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2_linux-x64-musl_bin.tar.gz", + "checksum": "4534dc15b952590aaf167ca908ed924a875c6265dd06f0a23d588bbdd41f4c93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_macos-aarch64_bin.dmg", + "checksum": "5382dbb1f80b2c5bdac2713cf6e3a9aec2b7315b62870f110ac7dae628c8f08e" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.2_macos-aarch64_bin.tar.gz", + "checksum": "3e8bb34477c760d145955a12d8554180b9636295a7b0f49b2ef50702f70f3c4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_macos-x64_bin.dmg", + "checksum": "06f1e707b913e6ca3f3ac7714bda28ebebb0d2cc8f9a3a7cb89f17281da4c2f0" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.2_macos-x64_bin.tar.gz", + "checksum": "826fb6c8c5b4c24a1150ad3e393114a8be9072b9f9a65bc10ec8343971eb48fc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.2_windows-x64_bin.zip", + "checksum": "8b2bc8007381240728ca50a23f020a3603ca84314308df707d4b3eff5b3bcfd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jdk-21.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jdk-21.0.2_windows-x64_bin.msi", + "checksum": "f3f77b87051e7b42768ab4c3fd8b0f2e5adbd63dbab8cee67e2bec4c43960d50" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2_aix-ppc64_bin.tar.gz", + "checksum": "cecb536e68e33f0183abac2d3cd808a0c15ae1a3ba360bcfd6e81a4d1a1e52eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2_linux-aarch64_bin.tar.gz", + "checksum": "396876d56ecc988dd5631ff3f71aa16414ff37695b00bf75df7647a0f0bfea1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "2b37a1683e152f1c282b6b4ac74262c19b2e6749b18b5812ca5cd65c3bba1c82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2_linux-x64_bin.tar.gz", + "checksum": "9b80175e20c846e29ee5c7c02af6b0d3a8d74a8e483f07954168c49d776afbf8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2_linux-x64-musl_bin.tar.gz", + "checksum": "75a7c2aefae00cf681fb6cd79d2cf8e003dd7097a95b5cff943ddaebb57a9912", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_macos-aarch64_bin.dmg", + "checksum": "ce059f4b66affc81f053d81873c9313b08e5e9006fb9dfcc66e23bcfd2a6ae19" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.2_macos-aarch64_bin.tar.gz", + "checksum": "1ca2c9105f94b1894d31ccbb8e93d54704e6c107517dc5ad8bd4bf78b93346b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_macos-x64_bin.dmg", + "checksum": "824431d9d9ba6453c3e85aa2692e117d3f9fad198abcc77a4a0eb06b59b789af" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.2_macos-x64_bin.tar.gz", + "checksum": "0cb9e6d1b7756ee10c70c638b4f889387e5fac0e253de74028325c6ca6807b77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.2_windows-x64_bin.zip", + "checksum": "65ec3f9d67334a93e139b132ee87b74220eea27ba909c600f24034336c221c09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jre-21.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2/sapmachine-jre-21.0.2_windows-x64_bin.msi", + "checksum": "14dcbc01f4c34d4c72ed83292f60f6f5b2d29960bdabf4e3bbfbf1b7d26e86d1" + } + } + } + } + }, + "sapmachine-21.0.2+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.2%2B2", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.2_aix-ppc64_bin.tar.gz", + "checksum": "03ad969f17ffbb3f38312679d05005d99666e85d21df040519dc1fd42e9c53de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "b050d9ffcb841f47bf8ec5afbebbbf367b40af2b7262015f72e8b6773a8555a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "b294274d250372c2939b5e8484eb2ec2fadbb532831f2f3a61ab026ae315f6f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.2_linux-x64_bin.tar.gz", + "checksum": "320e13af77180100792e1ebff3f118fbcb38f3b890b1dce7c1823b513480acd7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "f95edb7ada03bf0eb9e92c8e32993c7b14620daf95f5cfc723d689f73522458a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.2-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_macos-aarch64_bin.dmg", + "checksum": "5e3a7f32fc4c90a5d5c5a26ab65b1d9dd0c534bd894b189e16884f20de3b1e9a" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "cd7125890ac87f126db0fb7415c13532ce9525d294e8e0d4d105545ca7f92b55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.2-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_macos-x64_bin.dmg", + "checksum": "adf0627822c170e6843330aef6e134bf0a8f88a02651c6d2a2419481f90c088e" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.2_macos-x64_bin.tar.gz", + "checksum": "6116a0ecd34ae74f531928afc4230ba144a94718619a1ed6970de456aba875ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.2-ea.2_windows-x64_bin.zip", + "checksum": "57f7886c052146fbf12da841e972c73cf7bbd48a7af0f341c1b516def0699737", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.2_aix-ppc64_bin.tar.gz", + "checksum": "cb1b00399ceccfc36b96c703071ec9a9212b2adc512251d8b2538507a15fba79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "7b12304723b274476aaaa20e648316adeb49225f03e58b8621fc9834ac67ae8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "db9f679a2d933186e34c4e77ec93ccd79dcf77fee40c706a630109a73f20f9bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.2_linux-x64_bin.tar.gz", + "checksum": "a7d9f07f4050ca28a78ae65a039dcf6e80acb721ce4a111e433c884bfb5c6613", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "42202d2a2055dbdde7e665bd6936051b7af01b4e657b218ab5face4a8545e1e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.2-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_macos-aarch64_bin.dmg", + "checksum": "6a9201eb69a1dc1df6963129ec8cbce93cf8c52c5ce612c417f58556fd60b3bc" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "eafdd1c6467e9f12ce666fc9f5e7131843ca2892e889d38b4474214fc7243f34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.2-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_macos-x64_bin.dmg", + "checksum": "1a2503c7c9ad3fb28c99e41c3ca2bbf030cceefb1071b7047b8ac22346fe3ec1" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.2_macos-x64_bin.tar.gz", + "checksum": "db05dc3c09acc69d421ee5231a91f77a1d7f2ed488984be6ad9d3b4e84865919", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.2-ea.2_windows-x64_bin.zip", + "checksum": "4d59f4f43f0b9ba3b0c24c1e9e8637049490ca3b2b70ba30131e06690f9103f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jre-21.0.2-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.2+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.2%2B1", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-eabeta.1_aix-ppc64_bin.tar.gz", + "checksum": "d2aa4f6e8e612cdf94aee3e102a01d0de5597065c2bdc5bd3fa9d97d70c31b0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-eabeta.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "79e338728dd404920fcf45dd8204bcf51162c6258250e03b1b86bf098defba6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "a4ca31ad8730122d5d35e5c952236a2631277d03402f64fe26793dd64aaaf3bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "96d71521ca2be7373ba249173cb233533821fd61ec6e455787b56bf85c017d72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "557e493e55f57814b46014c3978b650e7ff9de8c45bf856df0d92ebc27f50646", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "8e0daddf16377fd2e15da63169f216bf2f363e089c73a9861fc4f4c7dccc7509" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "091df0b5a64853f1157f0a994f888590ac8bbb376a2c06a50b9e676211853a4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "ac8f8a4037aab8fa93e39accc170d495ee116f696c6b918eb736b95efa4ca3e7" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "7c8fb99a45fcbfac1c4052671f6b0899f5d46b8ebf3eedf3ac2eb8823a0a9cd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.2-ea.1_windows-x64_bin.zip", + "checksum": "ebb2fc1d8f5a8f8d9141313453cc0065b980350ed93ad3822584d92e06c1590e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jdk-21.0.2-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-eabeta.1_aix-ppc64_bin.tar.gz", + "checksum": "46fbdca5bafc68c9bc7ea0e3dec21f9542741aeca521c7c37c457d2f37864cd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-eabeta.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "c3ac312d15b0cebef57754bb23a56e1de596bfc923f79b728f6ffbf7b1f8cbeb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "a6a01fbb94c503311eecb8ac5a0c39815f76cd8a17d067a4692f09e7caf38cb2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "1664da7d5ffb4636858f35f0ab296b8ffda921d2007062441d6f2801b12f32fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "16a096bb22c9230b7d43dd5d8d373285648943a9aa3b1dc46d121ffd63010a74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "7ba79731ecd024c9eb0205e3b1ccba62b2612066cd4ced72b495880ed7d722a3" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "1fc86e9823d671931f98ed5875005baae6059918ea9b4a8a9ddf75b21fafb756", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "41261105f063d42ba52f81c306bcfed3a6d46aa8476f75ee0e4efeb2106a7098" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "b31e0f1f76223ffc19110770d65e1dae44447bd6ccd31c5e0dd33a05dc677be8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.2-ea.1_windows-x64_bin.zip", + "checksum": "6965cf5ebc5db82803d304138bc4bf069b30dcb913b1b26e8a7e22f87cc766e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B1/sapmachine-jre-21.0.2-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "21.0.1": { + "sapmachine-21.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.1", + "ea": "false", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-beta_aix-ppc64_bin.tar.gz", + "checksum": "1c4c2ece50b1aaeeaa2155d6c0b31fe76d709c3bca8dcf1b93219419c43680f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1-beta_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1_linux-aarch64_bin.tar.gz", + "checksum": "a157f4236307bfdf4efe2f2726958040ef18d10c67dbb4752e0dc5b569a7afc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "ae7227826ad60b463bc45064a7fb65843f7424ecfccdc8f7266729120b30977d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1_linux-x64_bin.tar.gz", + "checksum": "450426abc41695696c49c02df437882e6763344522c70a46ae6b0b682ba370ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1_linux-x64-musl_bin.tar.gz", + "checksum": "9443df09772041419c8c9f211520abd75954df964d7ee7624e213c4e2e728004", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_macos-aarch64_bin.dmg", + "checksum": "1da0413c09f94d7ba9fef3c8249588e3754d317d0a6d821a8ce0f4dbb1d5cdc1" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.1_macos-aarch64_bin.tar.gz", + "checksum": "8a052e50e4b48e87d6519489b0c7116df1e8f87a52480b81db27fee8259a5cc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_macos-x64_bin.dmg", + "checksum": "13a9059cbec76083ae0c0d12c1cefcc3818dc4be9dfbe0f23020e99268f147d2" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.1_macos-x64_bin.tar.gz", + "checksum": "498bdb5635be4b784ccfe12f83dc4c83f6a5fb2f37666a4fec408a2fd4083afa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-21.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_windows-x64_bin.msi", + "checksum": "fbca3339248aa045fce94c8943a908c6172842633421b4462820aea0df86c46c" + }, + "zip": { + "name": "sapmachine-jdk-21.0.1_windows-x64_bin.zip", + "checksum": "d200fc7b4e5c13293caf992aef3207dd627917353c3f189901e4d95fe23bdea5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jdk-21.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1-beta_aix-ppc64_bin.tar.gz", + "checksum": "1f10e475e737f0f38238e7e180437f42f6f0c87c00948f68494840652c9cbc1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1-beta_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1_linux-aarch64_bin.tar.gz", + "checksum": "71792196d5cf1b501df0f453fc57f3becab3b682affca2b7886823075a79296c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "05388fd8711aaf0dd9d0ff533bf9759084ac4bde370a725adbe41f4f8b88ca33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1_linux-x64_bin.tar.gz", + "checksum": "8eba84c547954eb49cd7eef5bf3ef8c271ca66df7b5fa9fee06e846b9fb5c3de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1_linux-x64-musl_bin.tar.gz", + "checksum": "12b41bae07cfd03d0cc1099d234fe5fae6d31e9b860b5195e165fcf86920ae2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_macos-aarch64_bin.dmg", + "checksum": "a337a9028831cdf6cdbf3ae9bc2685c7120155e0772b03e33f8e4dde8937368f" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.1_macos-aarch64_bin.tar.gz", + "checksum": "074331f5ebca12b51d9326949595f8f044297e8a5a02085960813768a5744263", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_macos-x64_bin.dmg", + "checksum": "9e43d0035675c8639b6fbeb37a3c800f4dfeb26c9c7a2bbb3be0be21d4219464" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.1_macos-x64_bin.tar.gz", + "checksum": "b01507f65c0c6a07fe16ba5c3e622e6e212fb323f2f420c606db3828a3b64ff9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-21.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_windows-x64_bin.msi", + "checksum": "4d6e0c8d00410da0184d538645088a4fd04c41816c922333bfc19d9fb5a28693" + }, + "zip": { + "name": "sapmachine-jre-21.0.1_windows-x64_bin.zip", + "checksum": "16b83c8f60e90f18b491af1350c9d2f417e7dab9c8f0d847d82f9f6d8c4fd7b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1/sapmachine-jre-21.0.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21.0.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21.0.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-eabeta.1_aix-ppc64_bin.tar.gz", + "checksum": "96b4d26570fc1b131372bbb2ae308d32e399ede94569f54f113384487b311475", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-eabeta.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "b2660c4a8d1ffb384938fc68769dff81eea83951c077e4595abc38ff2f962b6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "6751d076875c46fa69958a6e0859da09593c58b8dd6874dec6cb97dfc7666098", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "a21427f124e68291f1ac9f433d9c4e63fdd636255f29b400e2fe033173d89e54", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "3da62023efb4bd119a4977342ef8b33a5829f9a8e904c67db9b3f8468d7ab76a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "62672728dd909c618ae0cfd7ed67d3d73fb21f59a97aa1409b1a7c173ad78c64" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "55c90dc2f8c3a1de47af90437a034d56e2bd472c8ec5addb3795b634709f0dba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "4d2bf5f56a15dad0cafd36db613fef3df34358e3070e0358006129ce7f8738cb" + }, + "tar.gz": { + "name": "sapmachine-jdk-21.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "f38726626b0b2af0819e389d23baadd2a655406b817119e204f0d109857835cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21.0.1-ea.1_windows-x64_bin.zip", + "checksum": "b6042ea31e26002cce28e9eceea9fe71296500de210f61b4eae0397e8a3ad139", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jdk-21.0.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "aix-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1-eabeta.1_aix-ppc64_bin.tar.gz", + "checksum": "a46cf8d92fa61bebe1b8b0b9ca120024dbf5b881edf62ee5f27ac143a81918b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-eabeta.1_aix-ppc64_bin.tar.gz" + } + }, + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "39312fc3920b1260cd7afab6d5d4f8a403db0e79bae34fb79a9a57a49bf5cd11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "21a67c5fc0724e025c621591d26825493872005df8045c0bc68ffb77658d0822", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "d6f0765f7c06f997a6ace556539cfa6d9f41f6c63f7c36e08a8ae49418ede741", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21.0.1-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "d9d381bf6fee5471720852bddc68f8dda2d875abe3fc533db3dca78f3946b1b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "d304b6d52543ab9fea6269523b4b12fab2ec8efd8721ce6fc3d5f3446dbfbd65" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "4168cd858315e67b694e60aa3f7a3b3fa857455ffc20a8fe59e8f23293e04e1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "c01b26ab9f6aa8fc473ca005b7dcd0264ca8f8397314bd261ed46c780ba6580c" + }, + "tar.gz": { + "name": "sapmachine-jre-21.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "ac0a3a3f64cc76d6e863968042e86850313f094a93f70e97d16e678e32510125", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21.0.1-ea.1_windows-x64_bin.zip", + "checksum": "0736953a0fde57646ccf65a37a7b7a6055b33123e48ba9bc38db50bbf15a52ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.1%2B1/sapmachine-jre-21.0.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "21": { + "sapmachine-21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21_linux-aarch64_bin.tar.gz", + "checksum": "ca6f5a06253954a41ffaa398a0d9e15a21e7d2cf3c9a86aa25fad0e993858872", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21_linux-ppc64le_bin.tar.gz", + "checksum": "4a8df67b9cd9cec7a8165e935c84cb677a68509c6c85811640a52b9d045d6753", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21_linux-x64_bin.tar.gz", + "checksum": "3e5ccebadf96a5399c5bebdf5360260ade37b3a6d6ad76fa26f0552c57bbeea1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21_linux-x64-musl_bin.tar.gz", + "checksum": "2fff28d4e2479c621d1f27df6d0ba104341e81f88317760aca8013147f06fd93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_macos-aarch64_bin.dmg", + "checksum": "12f0fa4af1c1f97845542f511db485cbc838d3ab5d87e88591cb58a1f5e58f7f" + }, + "tar.gz": { + "name": "sapmachine-jdk-21_macos-aarch64_bin.tar.gz", + "checksum": "9075930a2fdc48c960b9dbac68418ecce9107696736c8eaf34720db3fa69ab4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_macos-x64_bin.dmg", + "checksum": "326250808c81212e31707605d98939aaec47ff1b8e95f40c606100f20cb5eac4" + }, + "tar.gz": { + "name": "sapmachine-jdk-21_macos-x64_bin.tar.gz", + "checksum": "665f34d7730fd769383df9bbfadef1ea9819f06b151903e9219b570ca3b0dc73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_windows-x64_bin.msi", + "checksum": "0a7e9c7aaa6c17ce6e66c70f07b4142a4b68f2be3a08fd54413da2d7a7c1b486" + }, + "zip": { + "name": "sapmachine-jdk-21_windows-x64_bin.zip", + "checksum": "cb81b42cfa7d1cf822525ee76b69eb526449749aa48e030dfded16a9a3e1292b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jdk-21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21_linux-aarch64_bin.tar.gz", + "checksum": "cdfd617f8d25fd71a4d0464d00e93b04af7d89a8aed5ebe805e89fd7ac64bf09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21_linux-ppc64le_bin.tar.gz", + "checksum": "17c6819c96b07cf3022a22cd76e31282ad1b496ccddfd61facc5a64939ca894c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21_linux-x64_bin.tar.gz", + "checksum": "4d36b9f97a0f8d17b0193669d4e0c8f2957b73299c25ae5b9356fa429365ee26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21_linux-x64-musl_bin.tar.gz", + "checksum": "e32a121004281044634caad6aa39ef19d31e5c89a54c419fb34574fec9e8aa5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_macos-aarch64_bin.dmg", + "checksum": "90fd1c500132712c1b95e98d4f0ef7b7eb534a0f9fab8af54358692b909e1429" + }, + "tar.gz": { + "name": "sapmachine-jre-21_macos-aarch64_bin.tar.gz", + "checksum": "fb196ffeff9ec2810ae38a052956700342876f2db97f552e907c8e57907bddff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_macos-x64_bin.dmg", + "checksum": "1b9384e43403e860fda834bf6d2dcfc6c0883da209db17be49df8466d21c39c1" + }, + "tar.gz": { + "name": "sapmachine-jre-21_macos-x64_bin.tar.gz", + "checksum": "a66ce82a95e04199623c2db387c17d5169fb1142df33a888688822132515a0e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_windows-x64_bin.msi", + "checksum": "46b507395253a252c518aec8f70c492124bbff7dc69464dc8a84bcd01a5e05c8" + }, + "zip": { + "name": "sapmachine-jre-21_windows-x64_bin.zip", + "checksum": "f747b9ee576e5653d64a34385324113fcc7af9f3e12b8316317fd50b062e466b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21/sapmachine-jre-21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B35", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "c452da9d60173d96867a2a8038e23be70b70f3715fc76eb2fc60bcfe67fb7230", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "ce35c02313759a2783b4183eb5c19511e88bd313d16e660e1ae1ad21879feaa2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.35_linux-x64_bin.tar.gz", + "checksum": "4955e4c2f2663306009a834bba3f202bd857bb85314cc8c33d31e56e909afa35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.35_linux-x64-musl_bin.tar.gz", + "checksum": "b006a56c478f3658ab05c79f1ef6b69b457aa5878a5f603ad705e5c05f099c5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_macos-aarch64_bin.dmg", + "checksum": "c257276430af863a0f642a75a6bbd8625d78aa6bbac12db4c622b58e20ac206f" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "41d880593aac47c8abaa085d0e9b74738f657644a01620918643d47b9f4c95d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_macos-x64_bin.dmg", + "checksum": "ffee4dd8557262701a2079d96f823cadc1e2b6359c9f196cf03445ea9fffdd5f" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.35_macos-x64_bin.tar.gz", + "checksum": "c492758833afda0765225a866eaefc1fe3dbac2ec9dfee6b7456379a9a54c8c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.35_windows-x64_bin.zip", + "checksum": "dcab836fff5016f7b85127b17f15e6dc97ee7609f74df8838c916b342eca5fce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jdk-21-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "7132bf29cc1afd417391e6e495503ccdb4cc82fc870d59ff0cd912498136740f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "e96135d60f93e5f2e29336f23a045674b4f3b025bd2216b66e2eeec9d5dab2d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.35_linux-x64_bin.tar.gz", + "checksum": "032da432c2881b12b626efde352453bdf0e9b950bf3601528c84735fe99b11a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.35_linux-x64-musl_bin.tar.gz", + "checksum": "c2a12558ce2799a2687c0c3f31a1834f99e0824e051108fd95b5e6f0ebad4319", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_macos-aarch64_bin.dmg", + "checksum": "85360b081f2ef58e136e5923da2c92f84c4d16f185fa56cb2e92d479512e1e6a" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "5cca300df4ad106bdb34f091aab14aae4f55d00ae1e6b6d147e3d72078134efa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_macos-x64_bin.dmg", + "checksum": "6f9ffeb3a6796edcdb6664fc9d564616f1b623880f7a1921f313087b14499df3" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.35_macos-x64_bin.tar.gz", + "checksum": "66f2d2f2a549eb3e4849c86c1c38464837b919af0c0ebd2104d5e2d58c2e1d0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.35_windows-x64_bin.zip", + "checksum": "78a6d0e5a60435bbc7de679a90b3cd48d1d889df1369075ca877ef292e6bf27e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B35/sapmachine-jre-21-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "e8620c4169de13e24fadcb1e498f942d240532b0e8dc1046050048084006a9db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "39b78efb8103dcf72cf5c9e5d480aab69ca898d8e117b57634115f6454632562", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.34_linux-x64_bin.tar.gz", + "checksum": "ee1b1edd7ef4612fea2d93acd9fb0f6e897089bd90303e8602b952483dc65af8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.34_linux-x64-musl_bin.tar.gz", + "checksum": "e603cfa83537cf1c027e556040e279c11c827146eca5ebc1633bbfbbf5ca0a9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_macos-aarch64_bin.dmg", + "checksum": "a832c59d04099bb3014e3392955eb887d4fd743619f0ec11e95580d578879ffc" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "178fc2965d8218fa57115aff2d878a7d7e34be2213ff89784a7090e077efbeb3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_macos-x64_bin.dmg", + "checksum": "e09b1747fa7a03765262ab427dee52df56aa5c5caa927ba2a3db214350e4ade6" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.34_macos-x64_bin.tar.gz", + "checksum": "0cbf76f18030eb3d887644522273f22d6b9223295843b4ab94e35317232936af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.34_windows-x64_bin.zip", + "checksum": "cf826cf37a3567cbd0fd13179e3a6665d55dae21a68011cc350391f04500cfba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jdk-21-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "678c1c3946d7fa6495099f34b7105dc9c7fa9d631bc12a352b1198a7bfe1280b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "41315c1584f7302ab4861573831f51aa5b4f92f63b83f4663d07b63687c07119", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.34_linux-x64_bin.tar.gz", + "checksum": "a8f04b6d652959363a29181b7caf8980612f90079b98f1977fcd98b166f5bcce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.34_linux-x64-musl_bin.tar.gz", + "checksum": "74c7454db613681b9e2d1233c3c780d2b546998d5f1edcfec440347dd913f3fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_macos-aarch64_bin.dmg", + "checksum": "40ab36e5e7abfdd77cd052d5d3c1e3639693670ad1968a19017a3e17b22ca9fc" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "3ed056719d31886e40eb68c8bf91297a4cfcd362896db4109474647dfa6b9a0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_macos-x64_bin.dmg", + "checksum": "6ff5e2aaddc21ae2fec6bb52c79ec505b06e10bc755d40c3eb09ed3fff4269c5" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.34_macos-x64_bin.tar.gz", + "checksum": "29d55e193e81e92a9a9fd0a393f39b136d050efb7cfab6199cca781dfe7aad3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.34_windows-x64_bin.zip", + "checksum": "b0a3bc8afde28d832f534921eafed14bad609f86a28e18f40b13f3eaee5dd4d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B34/sapmachine-jre-21-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "47078466af73e56979b923edaf419c03eaa1f0a3681a817b15e49da94bdae21b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "bcdcee3ad5a8bd03ea5e270abe59811cf4433f201bed76c193b99868ad4c8386", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.33_linux-x64_bin.tar.gz", + "checksum": "4438270857b350d19a21afd5883a27a2f86075b0cd1ba447ecdd3a095fe89eb2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.33_linux-x64-musl_bin.tar.gz", + "checksum": "ee941fc7b84320c78e938cea9e128ec23a8f8f992c2df1994bdb5d1cd3188b73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_macos-aarch64_bin.dmg", + "checksum": "f36857682b77a8f816cc39d1fbe37f0ed4b4c500c2733a94ca4a34ee7957b490" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "eee8595ff4f079bed9f10008ad93517960f37da493abc37221ba538edaf23de0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_macos-x64_bin.dmg", + "checksum": "104371bd1c3709faead992b8f53cc713cf7551db7b9351588a7c9dc3a762c154" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.33_macos-x64_bin.tar.gz", + "checksum": "a63325156baccb52500f1fa5e209dd415dff8fd53411d9976d9f4dd4ab43ef5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.33_windows-x64_bin.zip", + "checksum": "ae7059d719114ae22f0e20260ce17335bc0aab3f6b867354120a47f000816f8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jdk-21-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "268077cbdeb42dd465a66d64f693df78150ceb4ea966b580ccbc99bb5b283285", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "4ffd3eac995994b2f3e18441c56b383911541c62ab78981b207556e460c90720", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.33_linux-x64_bin.tar.gz", + "checksum": "f2da62b9cd4c600a574df44665b97bdc2de73b541524882bb79ec751a330c63f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.33_linux-x64-musl_bin.tar.gz", + "checksum": "86e7208e12c6bcff2fd12b78c6f18bb50542d7f2310ae9a10d6d2d58834bc893", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_macos-aarch64_bin.dmg", + "checksum": "b402b879f84886e27f7d68ba124b3cbe51d18b04703cd82750b24eb47f4573c7" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "6d3c84f83db6842e217038d3abfc8ff3cabd12d1e6c1363ddb1171ff3c56b8a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_macos-x64_bin.dmg", + "checksum": "9959a8613c834e79dd0f3a7f2be1a8b2eeb5f57446f3cce6118167946aae504b" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.33_macos-x64_bin.tar.gz", + "checksum": "f0c7e95eadf80c533f0ca06097ba21d50ae096e337b5c1289497e2309e39d3a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.33_windows-x64_bin.zip", + "checksum": "1675cc6b93e5de4ee7e1ba3aa1d662f0306ade1628c1286eff50debdd378c815", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B33/sapmachine-jre-21-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "f696808fd5b99d5ab7a35a9368138fb0f8f32ef4c8064e6b40e6d3674b96c8dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "47892500efcf8d52819ecba18245c99b4762640e526fba0b8a514b0b0c92af9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.32_linux-x64_bin.tar.gz", + "checksum": "814cd0c3a30d4a1f53683fa060b6c60be78bff815bce57aa82fd20b756f57e57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.32_linux-x64-musl_bin.tar.gz", + "checksum": "c2231c21d3aea7e348513f3460cca87b32b715b6945956231dc66ac3d1a415da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_macos-aarch64_bin.dmg", + "checksum": "11eb4f9cca6553f470881ae2bc6d21f3dec4d6cbcd24feb53eecd8f0f7e5df84" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "b8e371faf44a47683077a321e25ff1282b9b77c75d7dffed992453f38d6a5e22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_macos-x64_bin.dmg", + "checksum": "10800937b7c7b7670471caff66df9e4c0dd1850fe03160a32247327a8f5bb43a" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.32_macos-x64_bin.tar.gz", + "checksum": "e9bec4c31301394daefc26c146d74e279a6ea20c4710c62776354ebb5c7a6a14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.32_windows-x64_bin.zip", + "checksum": "b9e13f8e959e7f5392603f6939be0f7251e4502699ce670a4676e0cf8b543cef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jdk-21-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "8f74b29dde5e3e400f89a2999d380756249b17b5511008bfba31374f59a5f548", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "7d090bd9fe24d04b5699f8adebbb4065d8c56b887fce3bb9130fbfaf089e5887", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.32_linux-x64_bin.tar.gz", + "checksum": "ef195ee08b72ab611a0a3da072f4f6989bcf05c86861302fcd17daeb3d65ec1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.32_linux-x64-musl_bin.tar.gz", + "checksum": "6e30a641e28ccc07d844ff7ae4c6ad5f140562ce371156728b5802cc19e86621", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_macos-aarch64_bin.dmg", + "checksum": "ab37a6f877b6b10ce1c2b67d91451408b230a85d8886b0ed046363aeab9613d9" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "6870263837cff5a8d06d69021111a1788e075b2cff259b2b60ef26725fb89cb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_macos-x64_bin.dmg", + "checksum": "dfea2a026160d77366b236787d029c1647889bece78e1aa61ff3c51d93d30d2d" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.32_macos-x64_bin.tar.gz", + "checksum": "dd433832f1d72d2fd047ed7fca56d85b78fab0970567743d3b36c1870e0b7df8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.32_windows-x64_bin.zip", + "checksum": "7f21c5b94710ef49477cf12586d69a88e16f495c2d67d78cfee77049bc651bee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B32/sapmachine-jre-21-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "cec8ca250567c81019e988650bb108fb710c3f6c97367aff948f6da3f4683a22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "7fa54c0a1433029e9ee54d5cbf8d3e7a45a095e424a8325ebf3a9b888811b3f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.31_linux-x64_bin.tar.gz", + "checksum": "c5283c47a56d4d557c067a20d7432abdb99f8a0016e57becf91780c6550ca625", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.31_linux-x64-musl_bin.tar.gz", + "checksum": "e3f67baa30fd09c132e3ffeed0c84230bf60cfbd42b136b3d000a7fe2ac988c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_macos-aarch64_bin.dmg", + "checksum": "cbca1dbf623d0695f33e179707e9e857e3736e649ea6a775d8328d87596032d1" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "f6a111834e7a0dacd127e38eab2d148b938b5d92f586e79157a5723998f52e40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_macos-x64_bin.dmg", + "checksum": "9749b4ebe69e040e9611d30524f79056aa5be26b60db160282bc26dad1150e54" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.31_macos-x64_bin.tar.gz", + "checksum": "316b3d7d2f612a98800e132be6c8f0d254325b1f1b29201933fb8b7a3fa39a60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.31_windows-x64_bin.zip", + "checksum": "49b514581bdc7e5b35209abaa0136e2c84aa0b3d3f8b2f63169e16fbf4c5db21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jdk-21-ea.31_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "d2a6447beb3742b926515afa384438259b0796ad23dbac8318c784da5db330f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "0355324a788765f5a47d4a146496ff71cf5e7313aee49da995478896b16d2058", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.31_linux-x64_bin.tar.gz", + "checksum": "574ac2d5378dde71be120c5526f628e3bbb32bb864d74521c81d474fb7d54293", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.31_linux-x64-musl_bin.tar.gz", + "checksum": "be6e56b664919c7b6cd4cd1be820be61b82c0f2000b7a3b3402de6d98f8b4b13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_macos-aarch64_bin.dmg", + "checksum": "23fb532cb95503f879ff140a30c2f4c6b8c50cd5c4b892242a2e4ff3b62a123b" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "ff85a987f9d1bcb9c9a054aa9a5685c019b098a6d8d14df865edcc9e34025674", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_macos-x64_bin.dmg", + "checksum": "f8c2cf5c0271d128a2d78b8defd392532a9a3c7894452f5998df1904685de250" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.31_macos-x64_bin.tar.gz", + "checksum": "fb5cab08d5c4e99e33890060968d0e2fde33c5858aa32da509698fefba0cce34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.31_windows-x64_bin.zip", + "checksum": "c6047aca55609139d8e764538e92efb28a11be7a1a5d918e893e12f03429a4df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B31/sapmachine-jre-21-ea.31_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "dec1e6e6a0b4928aaf3b180b4cedc371b35941888b2ed135840925dc7c508d37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "803583ed4329dc8d0875c986074a2db8464e2fb4ff0aa7f136159966d8a5d7f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.30_linux-x64_bin.tar.gz", + "checksum": "e8ad60aa14c96050c1687622b46d909e30dd9c866bd6434078cca630730bd5d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.30_linux-x64-musl_bin.tar.gz", + "checksum": "2da577abb70ef3477402139c888c157d1c3033098133fdaa27924c64dd054587", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_macos-aarch64_bin.dmg", + "checksum": "891391f110689b8f5085f3b1dc4ee33ce205672b6bb76e1b567ff99a0ec08379" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "188c6b6dd2e194d025627b10dbfdf4e4f8410c2d1e24357a54f6eac653ec0b89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_macos-x64_bin.dmg", + "checksum": "99424e7f14ab93a7c29a1941149126d56622b0bf3393c5878f5ed4c9b065584e" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.30_macos-x64_bin.tar.gz", + "checksum": "a64cc15e7601c8468a90068305eb4be2a38dd62b8a0b1fd3328444c41edb666a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.30_windows-x64_bin.zip", + "checksum": "1a97d891bf8353cd76e50e10d7627fe895dcf48f58ab48c3ef5cc1c8dcae3dbd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jdk-21-ea.30_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "555f1794e1ad74ae3d68f4c114f619c4ad11332b04abbfae5b9ef7f9e596c612", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "c0fb786e81f0e0f5b349a28e63bdcef9c8b2e0d5c18eb332774231a6b717098e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.30_linux-x64_bin.tar.gz", + "checksum": "1e2df10f4c16c0af52a54e3df2ed6c9c1eff64b98905f4fa9f0da8319e81a64c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.30_linux-x64-musl_bin.tar.gz", + "checksum": "34337641458c2b3b28a05ec509957f0fc9da733e68d3768bdf4327a7a3570514", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_macos-aarch64_bin.dmg", + "checksum": "e43a9c479709d2adff1fb00951f584e2c35a85a6a619335d4c4f39966897717d" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "abaa3a92d3d825e281ee9ff7b2feaf8d70eda3ee33b8b1c9c2e844289de24592", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_macos-x64_bin.dmg", + "checksum": "825f6f9c6f73381a11e3b2f0d9074ba19c2a3e72e30764bb158eafc9b97c7c78" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.30_macos-x64_bin.tar.gz", + "checksum": "ed63a593dd150a519d5b749c2c6dd8e26ec47a894fd44177222099699a38cbff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.30_windows-x64_bin.zip", + "checksum": "635649d0910c5cd627ab3cb27b3f35cb5236db14342544d9259f8f782220174e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B30/sapmachine-jre-21-ea.30_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "af522b6b21bc8e307941e04a1aa6c0f58c3d57942d01bb047328c577fdc41671", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "7397f9926bece939b5514b7ae77edca6c454c7c17ac93022c142f7ef40d1185c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.29_linux-x64_bin.tar.gz", + "checksum": "3e17467880dae20c0e36df23cfac7b2697fa77cb2f142d73b70025595b92b2fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.29_linux-x64-musl_bin.tar.gz", + "checksum": "dc77ce94ee5daf28f9737b0d187463bfae956b96b8556c4750c34962f3cc12fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_macos-aarch64_bin.dmg", + "checksum": "fe7093d6f3ea4e4824122b4aa6c65e4d68275faee55f1d7e62c71ff2bf027015" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "17ffc99b8ac9a9bd7f36cb991f00eeb9523e54a73f95f19e45b75bc9803e6f0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_macos-x64_bin.dmg", + "checksum": "63d3f3de8debe9e331eb6627ad89732d41831689ec02315a21108d4d520ce16e" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.29_macos-x64_bin.tar.gz", + "checksum": "44cfb42e74b8ffb0885fe3ce08abdddbd2f88fb7f9d67cd67ae864e708fb62da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.29_windows-x64_bin.zip", + "checksum": "0f1ad3cb90f4a76ce067f8589a64f2a6bcee7669f2915938947b3ebaff243282", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jdk-21-ea.29_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "18ab7852a7675e2cea8f61a86308ca396ec9ded79340c00eca84c42f7f47aaa9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "966012b76f6bd0725de3dcfa6392992b9055597076bacd1caca43d127836534e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.29_linux-x64_bin.tar.gz", + "checksum": "de0d094f1548ed7911da25d19a5361bf3cdf3585a511b17ec6d8aea33df4ebf5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.29_linux-x64-musl_bin.tar.gz", + "checksum": "fe36e7dec8211af8bf3c290e75420e685fc726f21f207f75b633660bff0ab1cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_macos-aarch64_bin.dmg", + "checksum": "f8fde4deffe64a6c6b7fed501d6b538e6e86e18591b1016e1489569fbda26712" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "5c28fb541f35a165c6a40329ce0046b7ff1a34117bc7bb62a3c6af9ba985c59b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_macos-x64_bin.dmg", + "checksum": "801c18c963db9cbad9184c3a44ab2d25143462c90ea4778a44db62f4dd2fc7b9" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.29_macos-x64_bin.tar.gz", + "checksum": "e767b7156ae5c049622d78f8716f40e3a3f6a71296a00fc0b245a15c3c4b1b2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.29_windows-x64_bin.zip", + "checksum": "c7b032776abad0d14933aea9f4024b0fba104f4a4fcee25b183516869fa99921", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B29/sapmachine-jre-21-ea.29_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "aa540802fa493d1b55c2ad7081d8239a1a73ef4d756336a17babceee20f9269b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "592b9ec03d11531779b87d15cb3fb5dfcf8e68817c5853a0ff47fd99dbc18053", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.28_linux-x64_bin.tar.gz", + "checksum": "05f925d8cb7fc08e55c88916c94b9b59354224fad034eb4f992597ca0b52fab3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.28_linux-x64-musl_bin.tar.gz", + "checksum": "0294feccb997f9244fed3f5c66d5407f65aa975c51587056815ace4a92208868", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_macos-aarch64_bin.dmg", + "checksum": "3a35f24fcec27b02ec81cca0d63b1e457a84a9093d91dec15b3685d47bbb04c4" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "b760f378cba911da76dd49f4a993b5fbef62bbfc123239700656598122ba4dc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_macos-x64_bin.dmg", + "checksum": "f9acbf0d85ca6459f9cd18c5ea25a41f7c62792df417698b2f9641d19b9f0e97" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.28_macos-x64_bin.tar.gz", + "checksum": "6cb7e233636ee83cc768061d0bfec8be53d59cf4f37518f2ad0ea60d06a18779", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.28_windows-x64_bin.zip", + "checksum": "470d90e7199929c4fe0408d673d0e677a7bc3dc5f72ad90b223e4d62a00ed027", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jdk-21-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "52a66943b715bb613ee18171877899a96529ecd00a8582da22ae4f7a220026be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "e06a17fe0821e9299b61f96a3da6e177e7271dd7bba6c07e15f8c317c477befe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.28_linux-x64_bin.tar.gz", + "checksum": "dddf42c7139ddc9709cd3145c6625a41acf8701b21247d8bf28cb13f8766ffff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.28_linux-x64-musl_bin.tar.gz", + "checksum": "3a10b8783ca60ebcc84eff25685fa30aa474833a49d72ed3f565c54713e0fe4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_macos-aarch64_bin.dmg", + "checksum": "c45daba10bd5014e0cdf28f175b90261f352870284ed1600d8ff8ac86dfc7694" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "6d55b3876d8a0c6c2b158f5d4ecbc36a50513dda6e8ac5e173fe8ce31b739f7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_macos-x64_bin.dmg", + "checksum": "0db26fd90f39cf22d02b64d499f2ec351c279063a9a13d56b995a3e1b14ee6c1" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.28_macos-x64_bin.tar.gz", + "checksum": "726691e29441f7eddb3c4927014e1fa197c26df67f709dd1742f54dc88fa9161", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.28_windows-x64_bin.zip", + "checksum": "1bd39a8a002045ecda712f6cda05df95d576e983900356474b2f4003bbe136ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B28/sapmachine-jre-21-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "524fbabf7f7611b32b035e6f6e0a7d90522033b8138821078699094c005e5d36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "a508725cd0c4f8ef4799b1736092a7c5f0b8c32a7a4fd92e9e6a103e00859dd6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.27_linux-x64_bin.tar.gz", + "checksum": "c510638b1c055017dff4cf83a6f3db644acb2fca05c714aee2701a6223725486", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.27_linux-x64-musl_bin.tar.gz", + "checksum": "1a1a27c6ee14458caba952f0615a3da6192be882e0e92ce3aea1bbe43d2b17d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_macos-aarch64_bin.dmg", + "checksum": "fe1d558998c194e89f9f32c51b2e3e6aeb1679295ed74fe86e44214081639d0c" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "4e6d61d8bf9c1caadde495827543d2a8eccc0648e7d4e8b60efa81853a79b094", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_macos-x64_bin.dmg", + "checksum": "df57ae4c5b8f768f17d8bdd6885ed3cdfbed519e4faa0df8553c42eb7db164ec" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.27_macos-x64_bin.tar.gz", + "checksum": "6fb45d26c0cbb5ce4e3a555b5fe9517360adc7ce02fdd91f93ac4355fa7dc3d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.27_windows-x64_bin.zip", + "checksum": "13ccc8c371fbb25d48f7e18bd76280ac6cd6cbd7d3294d9998ea525c7c73e5e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jdk-21-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "ff40c3c489111d07d80dd6f02d215240d93e14547c16661c7bd07d6765dbaab2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "4dded10eedbeca7d1290a278fe3f5f46543c02290a333e121052ae2ade991160", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.27_linux-x64_bin.tar.gz", + "checksum": "adc5dc9fa5c0eaa0efb25a214bf0d6f55eca8cb210cb80864b2039fc9c9094af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.27_linux-x64-musl_bin.tar.gz", + "checksum": "bc7f544f95c17156b7f75c38142723ad230a389bc9070dd35d1c2e631de05fd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_macos-aarch64_bin.dmg", + "checksum": "a7630a8e26ed7ab972f96e14b9ef27e652ac40977da7958d44b0acd006e3af18" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "126b6d96730512f12459d53b7b2461c24fbeae3e6fc55b128087c2796d508d29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_macos-x64_bin.dmg", + "checksum": "8e757c7c8def124a6f770beb3961e6379478e40bdb78f31c5344679b83adee7f" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.27_macos-x64_bin.tar.gz", + "checksum": "a4c198d159bebb3082ca04ff2b3be0f4d287041d06d786b8961282738b478301", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.27_windows-x64_bin.zip", + "checksum": "b717e5dbcf593e549acebbd696fe78082b1c182dac315420c18258997d9c8d49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B27/sapmachine-jre-21-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "84875b55fb798cf8a9b003bf9a4cab9cac7ac28a9314000bf1f4531c448f85e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "aa624562b125663ee8e9b6b37a7da0fd0bbe4aef68ed6dcc95593adab498f659", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.26_linux-x64_bin.tar.gz", + "checksum": "820bec726a6e01efa54019d032e7dabaa4b8ad5d22bfd6568fe53a3e56b84fcc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.26_linux-x64-musl_bin.tar.gz", + "checksum": "271802127798fc5da06f6f62d25c6d39e36a8469ff700fb55ac51a6a97b0b705", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_macos-aarch64_bin.dmg", + "checksum": "de6637446bf8d536bfa4f99ffeb1b63f52ef0330a20cde77500aa1da903684ed" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "176eb28512e9aeb6993634a9dc0ae722a9f694320ac47d1f530b61c1783d3142", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_macos-x64_bin.dmg", + "checksum": "9470ba921676eafd2f9195d787f8b6ca7a219c5c14efaba5f8928fb2b26483d3" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.26_macos-x64_bin.tar.gz", + "checksum": "d28fc56c32c583db1d3ddb499e8d345af19ad46baf9e2bd2b88761a01996ed4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.26_windows-x64_bin.zip", + "checksum": "2622628f0a941ec7e68720dd7fd6b1e7ec71936411d2a1b829b8eb6458251020", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jdk-21-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "53f41bc2d38eae9ceb1356acdeef2a79c66797abdc3ae714b4370a264f315018", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "5c5d9c9819d7acb67672553635d51fc37971d50618b458e74fe8abb46d6529a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.26_linux-x64_bin.tar.gz", + "checksum": "4d44b32d5b4404707e38dcb4b93ced979e1b9949b80f61604f005105bd488b8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.26_linux-x64-musl_bin.tar.gz", + "checksum": "9d013ebb3debeab1a26db2a8146b7150a1e6f3220e1520173f0eed30bbe2a2fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_macos-aarch64_bin.dmg", + "checksum": "5d530c27052ffdf8713c144b5bef9754dd3b1f88156773317da5c894ad5ab3c0" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "1ab89b366be0ad05a2cb3158913531f0d2ecfab3ac2ac78146f15853ce075170", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_macos-x64_bin.dmg", + "checksum": "eb26201d70f75a09bc282ec273b2c454f953baff1663987cf9a1dd7254e1706c" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.26_macos-x64_bin.tar.gz", + "checksum": "bd4f76342b83c3a7cff0550b1bf42356fa0702c0e76a410f9c4db4608d1edc3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.26_windows-x64_bin.zip", + "checksum": "92905a2215b780d3cfa9134b9662295ba277d3e2a677624e7b06a40fbba55a91", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B26/sapmachine-jre-21-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "f23f54f42f7f3eda830b90bb6c07bbaa55593a89cbd45068e7cf3a242e67859e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "85ade3791cbf755106e50ec060e7be7b840e47beba5ccba0bcda4baa511fa022", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.25_linux-x64_bin.tar.gz", + "checksum": "e89a7afca10e89c7f4ffcfb19b1c9da4c2cfbb772b924a143c7ac5e62cca9564", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.25_linux-x64-musl_bin.tar.gz", + "checksum": "058efabdb59859f3ab5f99ce008c960f31e4b841d8c5b00530f351ccee0770ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_macos-aarch64_bin.dmg", + "checksum": "b2dc88d1a8354db3a471a103e6b261a4c9a1fb25c5a33c36661bb3062449015d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "02db1de1b082b0c3f4e59b463834b568e05da4dbb8716e7cf84ba8c1b407f6a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_macos-x64_bin.dmg", + "checksum": "79368a7a782fd76d60a9cbe7a1a565c6e8488c7de821e071de4b7d84f53777fd" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.25_macos-x64_bin.tar.gz", + "checksum": "a68eee2068c1b2c172308da67644bc398bca0987316cbfc94ec20d14d697521d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.25_windows-x64_bin.zip", + "checksum": "4681b07e525d260956d5496f51bd5a6895d92ea06da3bd57f189571d4ceb8a94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jdk-21-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "a3d51a192620bbf7377a419c5faaff54abefd7b6c9b4d422a0ee5a627f2e4a39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "a3ffca72f9d4d128178683e000a4410346b92367aa087f5c978260cf331b0ed7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.25_linux-x64_bin.tar.gz", + "checksum": "8d4acebb7e311cb21af66a08c88ccea890a2e60c607f7cd5122a56433153bf89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.25_linux-x64-musl_bin.tar.gz", + "checksum": "1c91a6f632d3d7b467d4e465711547775b691a74fb458602599daaa3bda556a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_macos-aarch64_bin.dmg", + "checksum": "12f86a5942fe4adb95e0cedd794d616434e203cff2bf354f95e712cdf55ec483" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "af9ac037cdadab099c2b55a2a01bb8ca005eaabc697f25cb5ecc87ee62976363", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_macos-x64_bin.dmg", + "checksum": "4eaf4f4adc043ad5cd8a0769496e9546e7b8fcd725094a4b70c7c9ccd70940a3" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.25_macos-x64_bin.tar.gz", + "checksum": "42ae47719e3372e7a7517c7ff3a6e2a00743e0e57004d18fe1d8b9ec653dc514", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.25_windows-x64_bin.zip", + "checksum": "d6f599513743f2bfdccc858aa7884d2cb2f855d3eb647a9b2a3e3ab8911d92f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B25/sapmachine-jre-21-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "775d76d4abcb7f185c880e9eb0a5aaabaafd55a3fb611225ed0f5ecbd645d090", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "54fc1967750c75e2a9edf9594375333151d3ea1dd8b9f0a4cc381ec44fc64bd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.24_linux-x64_bin.tar.gz", + "checksum": "2df696f38ce24dc3e36494e983e1b2bff78ab9ca3d6f535a7a59df99aa35e391", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.24_linux-x64-musl_bin.tar.gz", + "checksum": "211f5b38a67ab85e98e00bd3380430173cff70a52e7a1c91565dd1a7e7092c88", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_macos-aarch64_bin.dmg", + "checksum": "45ca7fba0bd3cd368c6a8987f3c01195113e3ec3be8c9e08cf037baa9afbe50d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "f84a4f8fca82f9ea21046f1d7a15772b991b555c31b7d0680da0acfac73d48ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_macos-x64_bin.dmg", + "checksum": "5cb154aa7f10f0a1c5d121e1450d0a147ca500015cf63adf3d45eb4a1fd845aa" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.24_macos-x64_bin.tar.gz", + "checksum": "68a781ebfdfca83b75daf7fcaddc95083dcab9a597003c2dfc76e6235e494d7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.24_windows-x64_bin.zip", + "checksum": "9cc605388cde0895d6a7519acd0c75987cfeeea02c967764c642922312d6bdbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jdk-21-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "f76c4a2c9d237a6dfbb4629fd8073e89650edfe1a69a0abcb91c52fa0a65ddd6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "1908f9998ab9c379e56533e829662e589d810707c2b05beddddb1e2631eb2373", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.24_linux-x64_bin.tar.gz", + "checksum": "7aa5ed980c02c0cae420fbed21629903320b383dd793d926ec61eb0da6ac9e6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.24_linux-x64-musl_bin.tar.gz", + "checksum": "3d95b596c9a88fe085571c84498af24c47f68df490d04eef94886daa5b2b3214", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_macos-aarch64_bin.dmg", + "checksum": "0b6caf6bf2f3db3fb73ea366594cbe4dc29af353ca813d16d3033fb2acb6e1fd" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "15a00491fd00b05887bb61777403556a12f914864a39da1b83b93ede32e5c176", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_macos-x64_bin.dmg", + "checksum": "41e35ed96d7b2be61c82ad05b4563d3e44fd11570e4dbddf959443cafc060c3d" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.24_macos-x64_bin.tar.gz", + "checksum": "1dcb99323b80b47a8b3916bfe08f6d082e6b9bd2abf7e6ffd4e33d1e0f245248", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.24_windows-x64_bin.zip", + "checksum": "edb797d48fa7d90e8c68b4317befdcef0c8dc9b64574e7d917bafa166cb5356f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B24/sapmachine-jre-21-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "85243bb74ee9eace4c6fd67e08737112311bad21b0321d07155bbd9af35456d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "c1ae390bdedcd50eb519b76455c74525d8525b6cf399aefe4b11b3346a8854b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.23_linux-x64_bin.tar.gz", + "checksum": "39e4d81dc1decbb7438eb4d02404a8d34e055774917974e0fcdbe18fc85cc90b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.23_linux-x64-musl_bin.tar.gz", + "checksum": "647e348aa1799d53686148d5ec1434e797fe2bf40df88b69df43ba4d4dd07452", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_macos-aarch64_bin.dmg", + "checksum": "016cc3bc174053c4a43e852c8aa9b7a4bf33658a397aa8e2e85ddd6dd5f1c34b" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "27b2ad3ebc15cea810f37f1f71914512cd0085d1115bf83e8765ed4144b0f9bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_macos-x64_bin.dmg", + "checksum": "646ffbd9f2668be09e2ccd8533f3cf9d49c05a4ddecc6222396abe6abe4d80f7" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.23_macos-x64_bin.tar.gz", + "checksum": "ea2d8bb30d3e4d3fade9e751394f4e16407cddd4c702303ce5272d1b0452ca45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.23_windows-x64_bin.zip", + "checksum": "c84780a9f0ab8bcebf74fd94a964bfc3b4e46c091666b7a9b3814730593a13c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jdk-21-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "5b33886e9fe21aad8bf83c60505a0d847ec6ba38ac4d3671877daccae8e443a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "21d55e5a5696fdce68f9ca095b67a87dd3e5627d363bf0b17f5440c371b2652b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.23_linux-x64_bin.tar.gz", + "checksum": "f7f8a7e66357c3965ce1733661f86de5a5c3271c57189483d441d4e385bfa448", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.23_linux-x64-musl_bin.tar.gz", + "checksum": "0f219c083a6861ab547cd7648e659c97b55c493454160e44f85ff31689a0ed2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_macos-aarch64_bin.dmg", + "checksum": "85a35d3e6515f31b12d658f8785cffc975fb617b160460a4de071f2f05e950c6" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "fc4f28e6edc1fe80e4a95c3551c7dd39153be8e12262efa0dde1e727085b3fde", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_macos-x64_bin.dmg", + "checksum": "efb8531a162a305f95e07bb92ebddcf11a167f7bbeaa76a13c05527f8f586665" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.23_macos-x64_bin.tar.gz", + "checksum": "5c5d9d5f57f3378ee2336322ed870f6ccb49e0ffeaeafb6ff7c62aeb70d13817", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.23_windows-x64_bin.zip", + "checksum": "610272326b300ef5a848539f735a8455465d40131871957a36b5bffb3487322f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B23/sapmachine-jre-21-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.22_linux-aarch64_bin.tar.gz", + "checksum": "8aac441bb5df92ef1f9fa78ea9b0162ca458ef8b4adabe2f9918e08ac566dadc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "ee2803912bdc8730f84a98ba413e4b5aa6e54db359f2ba1e5aa2cb8b6fb87d64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.22_linux-x64_bin.tar.gz", + "checksum": "48444c8f34a38667ae59d62016c3305913a722a736f2713c27f2edc44f00532c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.22_linux-x64-musl_bin.tar.gz", + "checksum": "81e423c46edaf57a2cbd190d36d7ae5fe7f7ce38ddb906771663fce90f8cc83a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_macos-aarch64_bin.dmg", + "checksum": "ddfd5ae2db66fc678f1997932f7f9e314b142d27c76bdfe35cebfeb0eae56506" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "1f8b5514051215fd755e34c39d560ad56f9b79438598d617cd0b217cc0749460", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_macos-x64_bin.dmg", + "checksum": "2c6ef6543a16c1528e274ec54281c6de42a36ad554732546472c8094d9399665" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.22_macos-x64_bin.tar.gz", + "checksum": "9de5d9df407a912b2e6afead0265391902ec3ad1e380f67873f6c3007b239ade", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.22_windows-x64_bin.zip", + "checksum": "e35e97581e9f0ab0e80a9a842d2f1810731d3cdc42fb4c299abf871511e58c09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jdk-21-ea.22_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.22_linux-aarch64_bin.tar.gz", + "checksum": "2fd96478bae731ce070f0f673fbae1a5fe5be33c6d679bec05329f2c98d9221a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "2aab47185bfdc02823acb1ebb5dbf31bd26adf7a92b8c898731b13f7718bd5bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.22_linux-x64_bin.tar.gz", + "checksum": "1cda3c15ef37fc8ef083c3ef4b2480b09144d9f2321770de1ef2e3093bc2feaf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.22_linux-x64-musl_bin.tar.gz", + "checksum": "86a9f9fb549d0ce269b5513d7fcda1ca887d3250e8dfcad6fcd230bd008b6b60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_macos-aarch64_bin.dmg", + "checksum": "b1bdfa829f35211f932b6e005ee5e11123cb84ad53b14aadb9201b0fdaf97d12" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "a6a7a483268ebd8adf4ac63f79294a9b00556212b698d36d96528814b6e36ddd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_macos-x64_bin.dmg", + "checksum": "fe5d898dfaa9c0fadae08b63782fd1472bc96a8c3ca17830385f0ac972aa32f0" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.22_macos-x64_bin.tar.gz", + "checksum": "ae91870de5b0f6f938e48b8135468133d3416dc66ba3c3b4ec92f17341728065", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.22_windows-x64_bin.zip", + "checksum": "9388c9856eeb86e91b8d2d619af89449d49bb5ac0cb6e0270954d7d701120c4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B22/sapmachine-jre-21-ea.22_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.21_linux-aarch64_bin.tar.gz", + "checksum": "5d1c5f7057ebca6b6415a93e9de946dbe8c57ec268caeb457867041b599577db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "8c49b76448f053580cf09d01bcc75f06fc2677cdcb1443bc2943ec8c5e485d60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.21_linux-x64_bin.tar.gz", + "checksum": "ca1adf07cc13f4e779d924bf7d9dec37c9de89b51075349284584a67d9da61f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.21_linux-x64-musl_bin.tar.gz", + "checksum": "0305b30a16f77dece7e730012fe097692f27794ceaf1a0096ddd6be82b167a66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_macos-aarch64_bin.dmg", + "checksum": "1912d9500c63eaabf3a47cdfcdb49efeb7e88a5e8505736b2b2c6de0760200c4" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "0aa1e63e65095b7647f2d58141c47a50108ac937e098e42b92973df61c9f9ebb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_macos-x64_bin.dmg", + "checksum": "8af65bc9f90ab0250748a69e8939b5d8178cc98a26086f46dfc24cf2fd1d90a3" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.21_macos-x64_bin.tar.gz", + "checksum": "57dc5e780bad9b51a9a2a3958fc72af3331f55750a10f88ca11aff91e87a5331", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.21_windows-x64_bin.zip", + "checksum": "4c844256b7e77714e55ff133bc088e0ae4b68dc7fd5dfc8a4b1b19449a6aae11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jdk-21-ea.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.21_linux-aarch64_bin.tar.gz", + "checksum": "5e55d1f19ae3ac11fe599bbc9692e590f6087583a600a2edeaa9ef283167279b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "3809e6d09377006a79a6dad20abb6a3547d297c0187b649cef3c1241b7578eaa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.21_linux-x64_bin.tar.gz", + "checksum": "a629b214a1c3e5e91c71dcd6c5c132f25f55e69af5da59f52419eb67945a748b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.21_linux-x64-musl_bin.tar.gz", + "checksum": "d30a67045c5c9d4fb64982dd63cd103abb7d42900be7197f62cbad7d8da6995c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_macos-aarch64_bin.dmg", + "checksum": "9d631f707cbff589b6c6111d431752150184281f111752d457519689ccea9201" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "4ae66d4730c2a38bb47182be6c3acdd19fd6e73043b1e109102e83f6d0fa216c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_macos-x64_bin.dmg", + "checksum": "895edd076e8346177d5a5e5f0541b2f2da7e0d482f1b245bd5597221ffa0f618" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.21_macos-x64_bin.tar.gz", + "checksum": "14adc782a713e7f2e9eb257f1d955982160d8c78e655b920b37d801c1176e5f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.21_windows-x64_bin.zip", + "checksum": "a8900f275bfc13662659803cf76608b41a3f3134f7874bd11b45e4fabfef31a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B21/sapmachine-jre-21-ea.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.20_linux-aarch64_bin.tar.gz", + "checksum": "538778f2d7957b5fc2f7da4ca9b3aa841e3cc29ad7f2d45abc4a4d0e0fea9c30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "5cd9ed6582693be84149dbd007f53d1f543d04a1d465bae8af77a2399484dea0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.20_linux-x64_bin.tar.gz", + "checksum": "e0a951fdc96ae702ed3c3c1e104a503d1eda9962cb9918ef180f606c1a347ef1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.20_linux-x64-musl_bin.tar.gz", + "checksum": "992a41ef0a4b16feb8f4b4902d2511aad0c69dba024d785ffb3b32c868095930", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_macos-aarch64_bin.dmg", + "checksum": "3fb67e5cd5acc2a98efc3422a7b0af16b8c1b7a1462689f95b2b9766624f8c44" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "a72cb8c1b53e25397e965609a94d3b9fee19579eed4b9f53d80ff854d3051c66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_macos-x64_bin.dmg", + "checksum": "c6305a4a0c5e3448552554612761468e48eaa013de88368834580fb063c92909" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.20_macos-x64_bin.tar.gz", + "checksum": "08001f20623c4ac6a506bcd935cb92ae68594a2298c9126f66a198bb416587c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.20_windows-x64_bin.zip", + "checksum": "714e90835d579d3e2a7c976204167048e1785cd6fcc8d9a31c9db72dc89fa2b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jdk-21-ea.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.20_linux-aarch64_bin.tar.gz", + "checksum": "bfa4755f3582562278a2554fdcb789962280c638c21968ee645ba2c832a13444", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "ff2aace219891b05e8879b592125b114c7ec83c48bce9a942cf1127780199218", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.20_linux-x64_bin.tar.gz", + "checksum": "d656075bd07b0fe6448a349dc344546145480e848fc483b9c74866fa2d130532", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.20_linux-x64-musl_bin.tar.gz", + "checksum": "cb196726d6e471bddf6c7c3fc18b647f32d4276905453b7b23f90bb623575e97", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_macos-aarch64_bin.dmg", + "checksum": "55db16a7a3bca15b95107c4abebd879bf2a46a6bc6b8ac11064080ffce199eb6" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "feaecc7163d105ebcdb479ae37349799e5d91534d75212d7b6d49769e9d00921", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_macos-x64_bin.dmg", + "checksum": "06d6b990482a801d7d0be13e2652787cce118f58cbc53de3d9c08f1f18e82bb4" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.20_macos-x64_bin.tar.gz", + "checksum": "0f05879fad44399fd4024838af8dc4a3124f6b306a479d924fe95b7b5ec631ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.20_windows-x64_bin.zip", + "checksum": "365c18c5e7fd0be971dd75814e46107c98cdac7c6ee22744b8dfaad42a236e42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B20/sapmachine-jre-21-ea.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.19_linux-aarch64_bin.tar.gz", + "checksum": "e4b66c44a95a4b4b47d1a39269edbc5fd567544adcc232f1178159abdb747a0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "2f413394d13848c157af3ce89ae4be37fac5c7bc462ccfcfc22f7ed6f3b5fb75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.19_linux-x64_bin.tar.gz", + "checksum": "0e2b356b0dd26f7433cad2a684066a2ba5116e99d1fead31a235e7fde8febb99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.19_linux-x64-musl_bin.tar.gz", + "checksum": "e475fb4894e6bbef820f8c160b61830bc3b9957b0c366090d6e475c9e4ca518c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_macos-aarch64_bin.dmg", + "checksum": "641bd4cdc64d1156c347996033a1df42dfa4f17d0d040f7a7d01f4da8378864d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "47a01393941b4308de4e2b9644bfc892490656ee57663da8adf1046a61caaa8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_macos-x64_bin.dmg", + "checksum": "ffa043e7a3b920b4313fdf470737d22d3a9f3668d46aa9932f30c0cd700b8e66" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.19_macos-x64_bin.tar.gz", + "checksum": "7cdbef3a028efd595e8ec3f2395b9ceff4fe11deff6aa005f52762c1cad84d43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.19_windows-x64_bin.zip", + "checksum": "5abdc3729b1a803e92986a1309f34dfefc6b2cdbeb62de5844afa6a7be153c5b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jdk-21-ea.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.19_linux-aarch64_bin.tar.gz", + "checksum": "5489264241dbf7e46339df890ead720782226012877df161b105cd9c1f8313a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "eac9ab46885a70b21d7afa24a82d6e858da77184e11d31943507df6d52c2c3e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.19_linux-x64_bin.tar.gz", + "checksum": "3fee9605f9517ea40e843c22122b20ab3cd54fe0f35f5de1dbf078160e585eb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.19_linux-x64-musl_bin.tar.gz", + "checksum": "dd329f35508ad2518322f64f711f072a98d6ec314deac1757f3b070c27d25e5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_macos-aarch64_bin.dmg", + "checksum": "b99b6e99f5eef70f278d1435feabbb405ba47f541deeb2595fed4b2bb2448799" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "db16993d5656cdaf5825e8285ce34f008bcfc2f5e48d37461756f5691003f8ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_macos-x64_bin.dmg", + "checksum": "03cbc0f85b866a25d10c1ccfb521d1503cdefc4a21e20c7c80589d5314835106" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.19_macos-x64_bin.tar.gz", + "checksum": "c700c4cef10baa944892561f0c7e0a80bff3fd2d881d2435f4c656cc89b40395", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.19_windows-x64_bin.zip", + "checksum": "f0ec41299fb1ee0a4e8c5828cd8a2c3985329c2ead54321f8495ba5cc20279ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B19/sapmachine-jre-21-ea.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.18_linux-aarch64_bin.tar.gz", + "checksum": "dc8ede39dcd73c8568351d6bdabedd42129c3c109492188b1840fa262a66ca17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "6e537a119f29c65a0b1c7c4f87836eee6adc62f29e08eddc16bbd2fd479bc538", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.18_linux-x64_bin.tar.gz", + "checksum": "cbb85e90ac97f5a83ea986d5b0c8fb398b11cd36fff7b9b1591a54bda2981c49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.18_linux-x64-musl_bin.tar.gz", + "checksum": "ac5675a50d3028ac75e9cdf84154d2fe934f033ab2308038381fcb2b7e5f6738", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_macos-aarch64_bin.dmg", + "checksum": "5848dbc19bc06271806701c02a4b60fe1ab3427e70b9e0e56fe72e420ca797e0" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "056a53120d3ef4208d5163bfa553d879e1080a6a5cf4470e6278f141bf8ffb9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_macos-x64_bin.dmg", + "checksum": "a621ae8bc066c67f47d24583738220e77ade0063f661ca3ff8c91587cbc50bff" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.18_macos-x64_bin.tar.gz", + "checksum": "69b0ed11929518212dd12f88d905746fffc0023689b588a71d58c40f34c3b12f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.18_windows-x64_bin.zip", + "checksum": "06869a2e400de35faebf7879dae79fb57b0eb76b44e073b6040e3166541f4645", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jdk-21-ea.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.18_linux-aarch64_bin.tar.gz", + "checksum": "bc5a73778e39b0dc152c75d9288e8a6764604b81eee2280a1d4eb0bf08e15084", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "89a3de3bdfb4c25a70908fcf0bde4a7d75f9351aef99e23a3470e7752956543c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.18_linux-x64_bin.tar.gz", + "checksum": "d8b1f543b9a4452d9b6d7ee4b0d7533e65cd5638e51ae3b7109acff0b4756372", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.18_linux-x64-musl_bin.tar.gz", + "checksum": "21811ca46bb3523e08b306ba53995e23047ff53ae4eaa020021869fc365c648b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_macos-aarch64_bin.dmg", + "checksum": "b014f8ac92a6f5d9ac09d77081b6623bf69ed27db89da7a4ae1ab32f1400c7ad" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "a3ffbd02cedb53b4c6b4aa569c08986f255eb2f3155f94a163ff6d6aa183d5d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_macos-x64_bin.dmg", + "checksum": "f06e1a0a18c0fb330e15c68fe4139bb30ad525ffa166d331bec1382f2d8d522c" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.18_macos-x64_bin.tar.gz", + "checksum": "a1217bd45fde15cb9b3cf16839fe1506d1f2a2f01418cde60c3bc3c9b4387ae8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.18_windows-x64_bin.zip", + "checksum": "5b4e57e3d7a347a88df7a59971c5f8d33ab9e2087f17747db58ec3fdd86c8ef2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B18/sapmachine-jre-21-ea.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.17_linux-aarch64_bin.tar.gz", + "checksum": "054027b936a4fb6eade0522ceff821446680a6e23f1be90e791939c6c6a86d72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "dd1e0c15a6651048d92d384c38ada8537f3bdd6f9154e94b152739c1f7257303", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.17_linux-x64_bin.tar.gz", + "checksum": "d3525b944df5fed1231b34507b8a219da885844ed21a1d2b46df6bdb7f883af6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.17_linux-x64-musl_bin.tar.gz", + "checksum": "073a664891cac4a8f8aba06db5bef419a366a5fd8680c1f38a080637540a75a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_macos-aarch64_bin.dmg", + "checksum": "8c79819886a6b8260fbfa6009ce7f1843df9de081d04acaa9835003c9eb3cd87" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "00811aab86c5443a6bf7bc39d6ba233729b62800460e6dc46b964b237b386ccd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_macos-x64_bin.dmg", + "checksum": "37c3e77cc7fba91aebc5b6c46c410546d676fea67c6648819578bbcf0ff4f68c" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.17_macos-x64_bin.tar.gz", + "checksum": "bb2a568214fd81d93995e8944ceeb8ac9983083dd2e5b179d3b8fd44d693e3a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.17_windows-x64_bin.zip", + "checksum": "169e4508cf1880bcda5e9b1877aa84aae94442fe83ec7a043bbd61639938e128", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jdk-21-ea.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.17_linux-aarch64_bin.tar.gz", + "checksum": "27b14e9355524be165506ca983bca1f2881b39b7230f18a0d43515e81c3b67dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "552fffc7da883a79226a099ef277dd194245a63e356ed565180414e392fb29fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.17_linux-x64_bin.tar.gz", + "checksum": "9ac9c6ea92c0f40fb34a331bfeb6880284c0133c03b5610355c97436427b92cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.17_linux-x64-musl_bin.tar.gz", + "checksum": "34ad39aeaf4d5cfa4cc39f7e6ca0bcad4c22ce71c7b15f95286fdcdf11bf8a97", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_macos-aarch64_bin.dmg", + "checksum": "3dca3232b868f1b60d53878c06648a14f5e7fdbcd85a2a1967d3f8eddf2857b5" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "689a97059ba9b8eb18664dd3cf2b25dc42ce7bed0e8d0f5bd85f294b7b272052", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_macos-x64_bin.dmg", + "checksum": "5941e25770aff2771e08b6764f4bc525b238765f1a36efc9020125ad6737a648" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.17_macos-x64_bin.tar.gz", + "checksum": "f516ea4990fa3e0ab56e3c70608e0ed26a6efd08df06a658d54dd52a6649ccd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.17_windows-x64_bin.zip", + "checksum": "917888816d4d0ca87edcf532fc3ffd16d0a5fa649d22d4d52a3858e39d85e41b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B17/sapmachine-jre-21-ea.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.16_linux-aarch64_bin.tar.gz", + "checksum": "7cce92a7cabea8db5b2b8194fc7af0adcdca11e5266a1ab6e0ede147878fbf29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "ead3c9018a66e46449f72dbd53f7bfa4e5ed1196cb464b8455325bb4a6e19ad5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.16_linux-x64_bin.tar.gz", + "checksum": "8af314dd4a4c8113245b98cbf986997a65c7887fb6e8e85ecc30f11f90ceef82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.16_linux-x64-musl_bin.tar.gz", + "checksum": "61e923efb9827cd232fe27903c5ade9e1ee521944734e41e6ecc11db35cc1ad4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_macos-aarch64_bin.dmg", + "checksum": "efe69cde98b80a6b992dd47a1910350cf6a4d43817862b7f187f93f837b2c408" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "c81f0800d17e95e1a952c6a8772f5779e1196e9408188f638140fb7fdb3f3070", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_macos-x64_bin.dmg", + "checksum": "c6b540924c68e6c9abce005122dfcbe06dfde92d9b39449970d247fb5dc0b6e5" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.16_macos-x64_bin.tar.gz", + "checksum": "fb8ea07a87e172f8d461a2fbd9419254c17c548a26027fad125f672478fbc733", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.16_windows-x64_bin.zip", + "checksum": "fceaa0ec2107cea06176645a8820de330d57e1028293b75f15b25bd37423bfba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jdk-21-ea.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.16_linux-aarch64_bin.tar.gz", + "checksum": "8273e274e1e2526df0a64ca01cec64617ffa24798e9681ed125d5950854ee352", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "c7e0191f4c24ae756abad889990c00c96ce6099c7d836a76e18cd4fd872b6d39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.16_linux-x64_bin.tar.gz", + "checksum": "7b1f16a01ef9b511b5edca76e56872e3cc95d590b5867410cd1defa17ae70168", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.16_linux-x64-musl_bin.tar.gz", + "checksum": "99f65b4799e08cc216acbd8836d43b0f048cf76365bf326cc8d81038281bc4cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_macos-aarch64_bin.dmg", + "checksum": "096ddc0fa36463f64ab6f7156c395edc052fce2075ea0b96b3f9fbef6444e239" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "248a00be2ae09f8cb392ab0ee534fecded93e3a5798dc1f2fb00a0612df77170", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_macos-x64_bin.dmg", + "checksum": "252cd525f97975426330fb04c21341c816a6ae2e03baf2e0e101803858d52073" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.16_macos-x64_bin.tar.gz", + "checksum": "37ec1c9b8426d059d0b1cc02b5f16d4b4fcf82411afdbf8f4b8a5ee6c86e6979", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.16_windows-x64_bin.zip", + "checksum": "b01809f60d83f2ebc09bc1fe167c6d0aaf11441739b308ddd98d33561f5cc112", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B16/sapmachine-jre-21-ea.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "ea48c6f618e908ad63718794ee51025de54ad741638a6b3ed55b23ee7fc9b12f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "83215a0e67cfe2dec1073219ce0c8b5d2f1ead17425a5fd0f2efe6a9110ab587", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.15_linux-x64_bin.tar.gz", + "checksum": "c5ae15e3c62365a102546f250a2ec706b00925ac82d4a2d149df7efad179042f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "33834a5fb25a9c2923ee8c953af3b2295cb5713a408a85e507ea6aa45c5b831f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_macos-aarch64_bin.dmg", + "checksum": "487cd845a56e0a00dcfde840ab4ea6d55ed97790c1fc52a31de1e45fd1b67694" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "03b24846baffa73c40374820f23a7730de90aff8b9fe218e9793b13a997dfefa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_macos-x64_bin.dmg", + "checksum": "6b4dcd995cd821a36735b64baf4962bf685725926f859f82ac2e658be698c7ee" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.15_macos-x64_bin.tar.gz", + "checksum": "435d7d97897d2d81816e86856e9989e0588750033aead10fa11968f7b41c437c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.15_windows-x64_bin.zip", + "checksum": "e6007d12986108bb01616f609ee9a1c8b67196e1feb1c8a19876d78ee9033f20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jdk-21-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "2af9b6a453d87745fab88638768ee35d847e38ed566f8ee7967575485918885b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "dabaa32088bcb8a3c3dae9a28fbb6beee4a41231b81ec3a27287e803910a27fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.15_linux-x64_bin.tar.gz", + "checksum": "4f6e6aa8d0b1db8a5a259ba65a43d31f654cd675864b3319afcf53e09c8a0454", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "764c26b464c205bf75c3b6108e3c726900548ca44db25e79ed490f7e63539968", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_macos-aarch64_bin.dmg", + "checksum": "16126dcdf0beccadd18c5abfcbbb26fee44d6465ac719908e5aa68de1037fad5" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "89c0884ee4484d6ef276e31694b27b958e1f5530fd72c2f196adfac4468a42cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_macos-x64_bin.dmg", + "checksum": "9548ecf595210cc25c4a7da9b5e1fe464fb6497146aeaeb359c13663f83a109b" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.15_macos-x64_bin.tar.gz", + "checksum": "9d2b47f96fe041bf400d9968c3d1d0b2797e5adc03e47b8720a117d712819ab9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.15_windows-x64_bin.zip", + "checksum": "df4d267fa83d81e9eb05221771a252b0ba2cebe180c68e1809883e3ecea39782", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B15/sapmachine-jre-21-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "4f2aff4144ba86e88d9077f1c337407215930dd423fbc8ab8446aa1241803f65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "438be65ada96856d7f89d8fde4caa56db3e508746ef21e61589cd211addd3874", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.14_linux-x64_bin.tar.gz", + "checksum": "421b1896f29f055852c3c154d8e586dfa33e64df1e28642d3eae2725370d7050", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "6c7fa3bec4576733ad7b83ad1d5f28d286292d5d0ba17e60814ab563045de838", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_macos-aarch64_bin.dmg", + "checksum": "c79e791d317489664f79a1b8db58db0e31f14a2c969e61855b0a5ec7418e55a3" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "17b8a12d9a0d8f6c94f182bff788f17800f1edf611fe883c913c4978ffffe4a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_macos-x64_bin.dmg", + "checksum": "1bc5c32a064bb2070bde42da1c9f0f710cc30d137d5fbf53da9b5b44d49dd774" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.14_macos-x64_bin.tar.gz", + "checksum": "0cb161ea324de4e802f519d1ba147ad53c4f7ebb52f60500752b0cbe69054464", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.14_windows-x64_bin.zip", + "checksum": "b4034d07ae816f10a05f9c35e61f5b5b5276256c2c1ec2d267b457cfaa66f681", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jdk-21-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "ac3e4fdf6f34e70e7481f72123cc27b042d59e550fc44430500ba2786aeae91b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "104e11406ac356d90286c98651e7d0ec889b1e56afd108d959e9acfda92fcbeb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.14_linux-x64_bin.tar.gz", + "checksum": "ca81550f7dea36f690e18cf24909f29fc1f1addd6160d04f1f3183a26418b77d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "3ca1d0a24c6c811a2447e5078d2f26654af799b4c5bd1a9ff46e09f2ec90f11c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_macos-aarch64_bin.dmg", + "checksum": "ca86efad60000f7ed50294b0d8ae2d06f13efb3218bc91982bc55a3e11189bf0" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "61cf73b074b16da18f536ba0893e8f15955eaad0aedf7cfce913acaa54c4be20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_macos-x64_bin.dmg", + "checksum": "e11fb451083552b977fdb2ac8fdf2a63bf5ac97c94d38f7e5db7300d3d58b738" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.14_macos-x64_bin.tar.gz", + "checksum": "fa98275b10acb02022974e9d51c3cbb1d24310d18444a24a528e208550914ecc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.14_windows-x64_bin.zip", + "checksum": "a4aa092ee55240f6dc82a62fd0ce8f588ab31f758a5553d3c5ddfaeb2b3b36ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B14/sapmachine-jre-21-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "2ddb19adecad38b478b658a5c88c127f9f0f3f8d2ab5d19b3e8e663c79cdea2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "4a67ac085fb88714b14060c9a3cb270b318f05777c2a9b6193af96d4b3778bca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.13_linux-x64_bin.tar.gz", + "checksum": "6c7112f918faecd4557fe5db7c63748c6ce66dd9f03b84763917ac823a15ec88", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "1432fd7a2cada1d99152ca325d4cdaebd8a0faa5f4df357e00a442440a797d83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_macos-aarch64_bin.dmg", + "checksum": "26c6e0380ddaca1bc3e05edf7fdc474d89eda1393f495d58e97072bcca958802" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "ba4db3ca9e07e369f927ae2eb4447025cb826cad893a9c0d5785402564f79a8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_macos-x64_bin.dmg", + "checksum": "976eddfdeff1b551c7bf9e181042c5d97a9b678ab632c106441dc55e5d12e630" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.13_macos-x64_bin.tar.gz", + "checksum": "57b9cc67093afef0202fa5c7b74a8189b491583641716681c6caea91e8bc1f71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.13_windows-x64_bin.zip", + "checksum": "91df4431be42cf76732e9172b03ef21cde6fe9375ca942692b22522ac5310dad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jdk-21-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "3522f8a76b0e9b3c98aee8cfd70afbe976e8ed0b0d7270329fc695f1193fbbc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "68accb81fc1d668a89ad1edcf067d48feb4bf6f93355aa3b303ee5e37568c074", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.13_linux-x64_bin.tar.gz", + "checksum": "d5dd162efb6aab5734191d54564b2f7760c8a7a723e7e5493291cdf80af759db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "c467a354daf25598156c0b2c5a4d20cdbbac5f27f257bfcf99dd36b9a6bd411d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_macos-aarch64_bin.dmg", + "checksum": "e4dceeecb725556d496e1011149db91a17585c885bfd6d8d0abe92df0d82c318" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "b2b4a4ae9d3ffcb35795940fab0deb92cab8efc63561b2e061701f0eb71d6e7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_macos-x64_bin.dmg", + "checksum": "ace54ddb3cd21197b773fe7ff3f36f5737a825a27844f385a6ed3c029790db55" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.13_macos-x64_bin.tar.gz", + "checksum": "a63d82ec396f7532714878b311ad04329c16631d55467479556e777bed2ea99c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.13_windows-x64_bin.zip", + "checksum": "b546ace69a6d7b1490dc405901a8a2fcd7f08095a37a593aff898a5854465bdb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B13/sapmachine-jre-21-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "e9adcec520f729f0911b1d08977d30da497e65838589b42ccc6660e6ae3b16df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "63d0d3fe52942842279674ff30bfff40276fe01c9782e491849e448ddf7d61dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.12_linux-x64_bin.tar.gz", + "checksum": "3acfc5da8cface4025215091eb28f0df57b6598205238765d672baaef780e236", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "05187dfac256da240e610cda740eba523c9b1784ff3ab71de1f58089ffd7fb36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_macos-aarch64_bin.dmg", + "checksum": "693168946b41756fceee3487aceede173ea80fd2f27b7b37f1a4d0e258d8f5a9" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "f9fc65bf6eaf1938dded83846c9e5434d5f816b8b999dd6ab3048f6f624e35e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_macos-x64_bin.dmg", + "checksum": "da0a113c4fc26a9ce2ecc069af34c7eadd003a7db77f58069144bf48f675867d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.12_macos-x64_bin.tar.gz", + "checksum": "86d001e732504383c031606c06e8dac45ebaa028bd3b1b4625ea44175a3687e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.12_windows-x64_bin.zip", + "checksum": "06acb89c040a442726c47d4ef15a5ea08db9ac21cbec4d69980cfbdc24fda8f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jdk-21-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "84e958a1be0c717794b8cff1eef77454f88cb218adf5389a70d4fb0b98d1a362", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "aeae2d94931719d5452b31af89c9652f8b902421cd749cc99eab3091ec238c11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.12_linux-x64_bin.tar.gz", + "checksum": "520366b9bcee21a7f79082a0eeaf8fa60e5f0369a2ad3596fdd680c11c547dae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "e0bc0671dbc0a12c5bfcf3415d89370f9e22d5cde15d04496f2cc6c36cb06178", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_macos-aarch64_bin.dmg", + "checksum": "5ee0cbcd4f9a9f46a7879b83ab31e11686f399ec8021b40373ed0a9a52dabe8c" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "2569a45fd1ffdb03220c55c3a419f8345fb3c6073a9bc66cc444eb522bd4e60e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_macos-x64_bin.dmg", + "checksum": "24b49f81d6c79e8a73853e6fb16160cad97d4bca56194e9a34182c899ea9a49d" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.12_macos-x64_bin.tar.gz", + "checksum": "e01983b76d4247cc032412e2b0b838139b2f1d9b3bdc95e24eb97ebeae0311af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.12_windows-x64_bin.zip", + "checksum": "91334e6f4e4c7435e99f3842e5ad0d67bc86582f9bb6e059b338d10f2c8b10c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B12/sapmachine-jre-21-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "e80343d9fe49685a4f485b127056f2a3223a60273af338d3a541670f263105a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "6e815e3d1bb5af933a1e16794840d7385631858ca068455df9c3ab8882f82647", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.11_linux-x64_bin.tar.gz", + "checksum": "d9e53387f1a145a42947ea23e6d3a869fa93c76fec82841b24a9b1ef000acc71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.11_linux-x64-musl_bin.tar.gz", + "checksum": "9e6da24ee9dde35e324d16b43814594c24dff1f148591eaa9a57a31cab478423", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_macos-aarch64_bin.dmg", + "checksum": "e521ca4adb427e01850b4b6246e08c300380a7dd62314a174c8591f2a2366fd0" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "085420e120355c4812d39738186e102d16e4dc8796ac10239161224ce67d1437", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_macos-x64_bin.dmg", + "checksum": "23f498ff33341e6aa52919563d9c1437f51cb3feed9ddde8abdbf9a2ac29feae" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.11_macos-x64_bin.tar.gz", + "checksum": "80521e808dea36fae218897401b3fdd76b661de5c5a61c371f9766aed874a60c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.11_windows-x64_bin.zip", + "checksum": "60fc57eee337e9b6139beba1531207695060c13770dc5388a4d285d7dca3ef17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jdk-21-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "5bd4f5fbd1fb4c658e610e94f6d5be1d64bf51424771d8bf67d8198712c38c1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "c332d86e558646008d36beb0c2c8e8b3bd17c239e8acbf1f350858f474936463", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.11_linux-x64_bin.tar.gz", + "checksum": "4005aba9d571b00ac7738347aed9c4f9b520a5d7963268a936d64a942a9b6712", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.11_linux-x64-musl_bin.tar.gz", + "checksum": "9e2a51aeadd9b8a192ec7a373473d548a560f73250ce183fd145a2a48473ad30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_macos-aarch64_bin.dmg", + "checksum": "531997f704f12dca04b458ed833c7bed380cb983fd5bfe04df1f668f8163c693" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "bd12ceb6e56941e8f1f76a4030e275da4e2e8d7e0b37dcd684ce0beff145093c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_macos-x64_bin.dmg", + "checksum": "f341def20885cc9988c44a19fb8c81ff0fc55683e4d230afe3676a251b1e3c0d" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.11_macos-x64_bin.tar.gz", + "checksum": "cd7cf19fb74812bc4d33b8aeaea276458747ec8ff725dafaa0215b84541c9a25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.11_windows-x64_bin.zip", + "checksum": "22ca617edaef013f5529834e5ccc253d58b9dcbf7fd8d2f1d9a52be8c295d05c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B11/sapmachine-jre-21-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "3653389541f52bc605f2c0f001546fb5bfe15f99407e1ef307425f8c9c636853", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "1c30974c6bd7866779e8c388e5d5c2079b410530dd6e34f8c6c85db788438857", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.10_linux-x64_bin.tar.gz", + "checksum": "86833ebda89cddd1e3845b05c8b1df2d2d26b82d028e814aac85abb7197a5d7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "4ec1a889c617869965a52e6319a204fcc4bf843785b6c8824cad9860bc24343a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_macos-aarch64_bin.dmg", + "checksum": "a994880d068edd1dd651dca84d542999ca2c127d4968b955840a472cbfe83a3d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "bcd8d61c918da6467645f04c152b71942f0c0e507259b40a5cce68f7db767a6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_macos-x64_bin.dmg", + "checksum": "fb700998f6a66af8df68ee1031e7722d17de8627a7a6a2147d1b0a48c8a4fdb0" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.10_macos-x64_bin.tar.gz", + "checksum": "b804f188ac95ecc0989e3f1b49c2f3e558bc87b24aba53b6ccd0b4c8482e346d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.10_windows-x64_bin.zip", + "checksum": "0a2c967adadeefb527e247652ce70560d9b78d9e3acd3437c29b1a52ea5dd8d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jdk-21-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "238ab319a1f6abfe38835c4b91f2bd4153b4538c4ff3e7840980e4fb56cb807c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "7f1f3c4a0540b5dae4f0deac1e79ebb7874fad30b9619b375e8cd1e22c21e2a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.10_linux-x64_bin.tar.gz", + "checksum": "4d1034cbb68d1e4287ccee0f906ce0cd6dfe7cafc5825fa9d411597189efe88a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "c9d3b718d54543d2818bb8698f80ee1da0af3b10735e9042762f54f81d72749a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_macos-aarch64_bin.dmg", + "checksum": "a50cae87f961880ab195a9569029f0c07a5f124f2e9bd285714fb9992c912553" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "3e5c5fd6bc5b7f575b9fcd8ac7c021660268a1ab240ec0c159e46d94fbd8dbc4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_macos-x64_bin.dmg", + "checksum": "6dd3f81e210fc647e579da6f57a07cc8c24e6ae682fb6aa70548151305b2cdfb" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.10_macos-x64_bin.tar.gz", + "checksum": "af5f25ff7618cc19f6c935d6cd4f45165d3bd82c48c2fd8d0044fe402413e59d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.10_windows-x64_bin.zip", + "checksum": "a1126ed7103e9bf6a385ceecc37d58344a07012c8314fc5da07dc73d6b404661", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B10/sapmachine-jre-21-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "e3ea5308d95379f727dd62d07ef71b3c9d0824fd78fcd025b359c687423613f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "449f4dfa30ef6d65b779dbf916ef22a4fbaa6e20e518aacc7fbe4151ca168896", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.9_linux-x64_bin.tar.gz", + "checksum": "84f105e02546d601013b3441466bf7da53482345b445b0ba1646a1a5d197ae44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "a829fe36bea31c0aec97609f18c5926479fb9a620b223acf6fdc6c27365764dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_macos-aarch64_bin.dmg", + "checksum": "de76e29dae387c42857423d2f3ce53cc218def828942e2dd1c0299ea84f679a7" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "7720d149a6fd245207799f2ec523dc491a41109add398db7c84ec67bc8f83756", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_macos-x64_bin.dmg", + "checksum": "1374a2d2990d089000cb657082cf241e1e323b78fbd1f80564c32cc422552b85" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.9_macos-x64_bin.tar.gz", + "checksum": "22fb85a1cecdefa56181515f1854980029766ca6857fb1472fac0127e647312b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.9_windows-x64_bin.zip", + "checksum": "a0a7c567bde4fca5006b49a281b47391bee063caa761860531f60ae4e8d803c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jdk-21-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "38094026f3fd636399e0050aa51164eddd7a255ac48448f7c8532160810745a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "5e44358188263621a8e6b77becd07c4203d6f918cef24c8b520100349aa479d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.9_linux-x64_bin.tar.gz", + "checksum": "bf7795d021e43d1eea7aefbd1820b5d03220206e1dd0365ea0919af7c0884b9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "f07047917f60122b9165f7e53cfd2d646567558c9a44d5ae36a171cfa71d66ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_macos-aarch64_bin.dmg", + "checksum": "811b2aee686586334b6ca3a42e4717fd93d3993fedad80df25f79ec5b04eadf1" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "a56502729789d4343aefee0aeaecddb47d1940131cbfc439e92dd24fabf34044", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_macos-x64_bin.dmg", + "checksum": "0be46954875a88575e3313066b6d2fd77fca72018629a8d6245e6adeafc64a23" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.9_macos-x64_bin.tar.gz", + "checksum": "7bf3dda9018a1a6228a7cf7c759a8b569ca63e8866938e0af4e9fa390b3bf913", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.9_windows-x64_bin.zip", + "checksum": "3cdfba5f6b6f823d19c452379856b238024dc7d882aa708ec1f19b285ad4f7a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B9/sapmachine-jre-21-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "315fbcf0a8007f655b7aa01bb187c52743d0b3bf0061377e58f5483ad84a8e70", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "afcd89791cea84a8e685f5ea2b7e6348fb46586e5664a62f4d570d080b129008", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.8_linux-x64_bin.tar.gz", + "checksum": "b7b93fd7229a39710442694bdf82e47a5b2197cf1c966427926f74b30e04da78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "c0e5c19631b0fa26e3422d7dda81cda22ff77eae83a2d032e4f71ef1e18f2428", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_macos-aarch64_bin.dmg", + "checksum": "1f16a8f52aba09a3db7dcc59e6dea00274e44896b2765289537d7889fd16775b" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "579d39ad89c24f951c86620521d98d2c7edffaed8b747a5f3682ad32afa7aac9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_macos-x64_bin.dmg", + "checksum": "3e9df681d50e9e4e71381147aca5873778b9799a4d4637e7bc713974783b6300" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.8_macos-x64_bin.tar.gz", + "checksum": "cf1afa4659f1ec43419f61bbdb5b3c01111f0e203578f369dcea5aa6e067557f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.8_windows-x64_bin.zip", + "checksum": "adc89efaa70ff824d1eee03a52ce9bdea9d48e2e2817c731b11b1692f97e9ee4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jdk-21-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "94c9a3cee3a2afb6d3160eb6a35dfcf715c3794e752b6e1cbf996d8543a177e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "c1fa9f8185e8591406616adf7bba501b385617e20ca9361529808c2d529fb2ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.8_linux-x64_bin.tar.gz", + "checksum": "fb387d0ec84ce85d0f2303a53840886b6e5f998eba564e0c66d7271c415f4c71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "d1635f7c28bfc4d42f07f83629eb370644c15dfb8d38d4c57434f4ced56e2883", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_macos-aarch64_bin.dmg", + "checksum": "abc6974c18cad7fd30c9a7deb6d20c9c6bf99f7411aa9aad398acea05fedf3f8" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "b810a729e714fe335bb0ca55d53365d0761101ec444e308a8d4bacecc33e28e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_macos-x64_bin.dmg", + "checksum": "813bb5e2f79c778e1edf41ce37ec16c3a9a4ea1b1a630d6950ca4a8073b86c01" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.8_macos-x64_bin.tar.gz", + "checksum": "235be515976d9ff184ffe9286a17cf1e0cd9e048f9c17a25a725789ca1af5f72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.8_windows-x64_bin.zip", + "checksum": "f0fe187d8a50d7c7d617cebeb7ca6fc4abf6d0382620fc650eee6131b338465b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B8/sapmachine-jre-21-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "78ac5d57513dcd4e7395470f4e0b411c54de765e1309b4286dae27d8fa65e99f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "e21b05fb091f08b4a42f9897078cf55ce936cc635cbe0100412ea8450fa7ee01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.7_linux-x64_bin.tar.gz", + "checksum": "0a20e3e1f474c812cfbb705d30a75637de573a96400307c14e2738ae1a014b0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "318efd1e65fcde3aa9c3f2a45565fa7c1ed3d55487ba253b9ef5caf071420bca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_macos-aarch64_bin.dmg", + "checksum": "dc9fe443f59b81a80ed28d4b1c3bb20cabfc7a0ed580853adf9d61d535f9aee5" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "5e8f0a66ec608dbe0cf2a08d46c4a5f7a8961c338805279f448f1c5fb0552fed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_macos-x64_bin.dmg", + "checksum": "73c1f35441122648d9386b727c5c7d07d46a8ab7a256d40b155ca72d0212eb1d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.7_macos-x64_bin.tar.gz", + "checksum": "e7b6134f4fdc96737e6755c0034e13aeccb567b9a3742c58bbd49e0e7ab2eaa7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.7_windows-x64_bin.zip", + "checksum": "c5dee71542019ab0c2b34d3bda9b230bbdebebc7df222cbaa9355b84e780cb8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jdk-21-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "5d94471d3ea8969a0b9d0b805272ccfe3608f7acf187023b4df0f01e073a4814", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "0b2c7ba9c59081814c521044d8c9fdeccabbcebffb30a6978f845448dffbf705", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.7_linux-x64_bin.tar.gz", + "checksum": "7df2d33b7172014f864fefcb4a48be8348455e703dd964c40c16688cb70d997a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "3ffbdb125b0c2a697269300b02bef8bf1e19513fe93372fbcb79b7a4b09f334d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_macos-aarch64_bin.dmg", + "checksum": "ddd77434cd94b0fe7560f573503b982157289eeddee0f4adb4de3953c54566af" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "88259b714b0ef881fbc2b4215daa6d7fa185aff2d1d01b54204e3c8db6295386", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_macos-x64_bin.dmg", + "checksum": "82675559c38e4aa48beb93e4518fc81455a284cc489a376dc355ad562737215e" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.7_macos-x64_bin.tar.gz", + "checksum": "45d885cff1bb9e5cb2c7cb7fbb957e1f90e07c28d4dab86a6fcf2318c83289f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.7_windows-x64_bin.zip", + "checksum": "07e330d1989f09d6e81fca36258da7ef00d64a7760b724d81b640bd118e5c424", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B7/sapmachine-jre-21-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "5ee167e85b75bfb2c14025bf7ab5460d6e2863055204e9ea770f9b3477a74f22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d1b4b4cb8e0c914ae74e0c73f3498930afdfa695645f8699a2f32f781bd9700b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.6_linux-x64_bin.tar.gz", + "checksum": "dbbaacc444961b93a2bd7b6dc0634d963b5b7a66ecfb5433052e25d97aa53d25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "83cec0b33512ed220b8bd8f39c12912f624a61ebcb7b8dcbab5b8301ecc453da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_macos-aarch64_bin.dmg", + "checksum": "8ca954dc4854770b834be38619e277e1cb2fdf3855ebc99893d5d8cc6660c8ff" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "7d2ade4de054ef54f67e153d2b54cfa0926e3b08c5e22fd6b3bfa30125dacef9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_macos-x64_bin.dmg", + "checksum": "7055703194762f53d9fb5cd66c265dce6ab63bca7e1123820dae5581f4214bea" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.6_macos-x64_bin.tar.gz", + "checksum": "1ba0e5598dddc144ac9bdcdee90f67c5477cc95b2eba4e7e1fb3597db768cd8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.6_windows-x64_bin.zip", + "checksum": "6707a38d74c62b9684fd762bd66978238695981631039359ead24938306cbc57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jdk-21-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "a9ac2bd3132f7f7be4e916d0a8911538c8e755a4b018378ecb90606558e4f3b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "b1323d049c16ef2c892a3710cd038e45a0871933d031f10fd95dcde39dd3a00a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.6_linux-x64_bin.tar.gz", + "checksum": "b561764ff1a540c03ed365b62e55cd5b05379fa521a99b956848c2d9ad1bb96c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "17e3acb9505b648df9fc0b7578d4fed5c946f153ccf1900aaf8f24c898ec481f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_macos-aarch64_bin.dmg", + "checksum": "84589a429c85ec4fe67186f1aa60de692f11a29564ae4afaf40c028c91302157" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "e2972d2ff855ac548f935f9078442e2f6ebff8578ce633a59db2f45f77cd2917", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_macos-x64_bin.dmg", + "checksum": "d021a2b1d52b278c1f05f3debc1899f0333fb86e3cf30808a55192b92c707adf" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.6_macos-x64_bin.tar.gz", + "checksum": "23e065ef1e76bf375c724381d54c5bdb7601a0f3b47e234476a6ff446b4eb4d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.6_windows-x64_bin.zip", + "checksum": "ef63b3f51b9dc0a0a4adb3487222161a96a5d29da64b7c48aba901266baa6b63", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B6/sapmachine-jre-21-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "c48cdebcefcb5485133a6a1f74e46eac9cbfb13af07fe03abeb1a0e85e7256cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "257f426fca98f36c2925e4235357abcc60396c531a0cb7dfc6fbece71e21f7cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.5_linux-x64_bin.tar.gz", + "checksum": "1ed63679f6450492bc537aa980696ef56ef1ad826ea92a5d26036643e7ec3974", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "63f78bf71c9544ac2476d552a45fc1597181be5a25d664b1e2c34391be6db563", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_macos-aarch64_bin.dmg", + "checksum": "655fcecd1d09ee9798a88a734060e1afdc7e55410686843333eb196e28ec677d" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "33ab45eab49c9ade5cce15d5940b47201fc2013771eff15120e68da77c38fc84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_macos-x64_bin.dmg", + "checksum": "9d504a20a80f878c46e99cc02690f3b673b4503f26924f91748ad30d254e8a44" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.5_macos-x64_bin.tar.gz", + "checksum": "923d49397ac1db3e57dac401b9cc6e890fd4e7ae5a76ecab00f7bd62653c62c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.5_windows-x64_bin.zip", + "checksum": "545fb130f6f5b9d2ddfdb9f8983aeb5727917f0c7ccafbfe29411e5d6d3af5e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jdk-21-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "d2a153f45a7544c620ea0deac87a281047055b4bf0d084b23d0807d47e09c433", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "147c03428838c652b8ae844b0d6b5cc85e9bf0c3708934cd5f37bd242d8747ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.5_linux-x64_bin.tar.gz", + "checksum": "39af75404d8b64c6455b2ee506cad60101fe1e99966bbf11e269a7b956155359", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "54229bc6e7c5c5f2b0ae5c671b92b8192b42040dc4d9502355ad63a5b93b26de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_macos-aarch64_bin.dmg", + "checksum": "c0d4fb9c2b4deef20db14f834f1092a92dfa92f04e5fb7059e84391476d4a25c" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "9f9cd6fa60bef4a5a3746449b2371232780c462674756c25d9519e4f611d0f60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_macos-x64_bin.dmg", + "checksum": "11514e7a04f9739862f9f827f28973809cf5e647211f3f64e283290569d71759" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.5_macos-x64_bin.tar.gz", + "checksum": "bb0a019ffd85fb2d01d297aa5a510b38bb7c89d02048770dc6f34549d636b477", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.5_windows-x64_bin.zip", + "checksum": "778e98cc3cbaf693f84cbd1c7cddfb270b50f19941d0ceed59e37523c3e22133", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B5/sapmachine-jre-21-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "db1ab5f0ebc01f30d3ac1216e65cccb191e81141c121523d1e76f4bf2845b45b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "7c27d670b9906c86435e130aeb387f52f75bff21f07c6ef77648d5cbd7c254e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.4_linux-x64_bin.tar.gz", + "checksum": "03cdcc68f02c6da14c2d715506904fff3cca9248803d3ec5b8df10e9040f93ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "95dc4ea75c8099ec4f5a371c3cdfddf4c875324a6b135daf6cde9f10a4e05fc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_macos-aarch64_bin.dmg", + "checksum": "9e4ed157ca217a009bd9ecf847cf3be1e6603c700d447a8f40be88dbbcc487f2" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "df791f7c9a52c2ae32562f7abe376c76a06ee80f7f4360898a1008db3800ea31", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_macos-x64_bin.dmg", + "checksum": "d1060dd61f9092c71d1c5d480c141fd8015002a278bea5b4ef27b31f8f76d330" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.4_macos-x64_bin.tar.gz", + "checksum": "65fc144518ccf573feaf10d77317eadcdf0ba9817b76994670674c8756c6537b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.4_windows-x64_bin.zip", + "checksum": "7692d9c289f49ce8ee62d8bdf4fd1dd1c84f1151379aa560ca01feff733dcedf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jdk-21-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "203e7113185dce5bd59e76ce63e687aa87127773143ffdec601b0b76cb53c2ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "fda3108072bbc30cab2cd5e716997a66417430dd02a08be2ffb23c55d822864b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.4_linux-x64_bin.tar.gz", + "checksum": "b2c53b428c0e2d5057e017c64bedb6dfb77c1bd8735c3044b23178cb5f84c17f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "823ba80392e2051707688d1d82b7c44cb9dbe4559ffa077b2d7cebaca9e71fbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_macos-aarch64_bin.dmg", + "checksum": "a19de558a5d7bc7faa557132c2d7bf62eb0bc1d2ee10393208db6b83b4730adc" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "81a397dce9bf59a530011b4030e85aff78cc95b59276efc0fd5f1dec0ce7583e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_macos-x64_bin.dmg", + "checksum": "e34207516f1a4d6c4563447e8f30b9095252c3762b3bc5e4826abdfa21ec081a" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.4_macos-x64_bin.tar.gz", + "checksum": "db07a5f292e1ccc296f9f9c60aa94dd9632103c328098a12d61ded46145b3a41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.4_windows-x64_bin.zip", + "checksum": "354650bdd0e81d85c6dfbb591496c92f044e1171205c0fa37c94c0b5120b5218", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B4/sapmachine-jre-21-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "e99263b97bba181164ed2dcaa8068b6a05a1b20743aef3d02eac4b5b6d7b6dfa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "0a05f22fef63b80bde73e09d186d885a8bc7a794bc7c738790bc032733897a5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.3_linux-x64_bin.tar.gz", + "checksum": "6c9498ffc0cf0c16b93345db31f005ef143ac6a91fb6d316daa2fc4b34567789", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.3_linux-x64-musl_bin.tar.gz", + "checksum": "790a9ef91db58a058c1bfb0fc89a7175a6a82dea1a04b3dfbe56d732500e2699", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-eabeta.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_macos-aarch64_bin.dmg", + "checksum": "9f235f31206bf54616e895814195a6847d6648e94fcd45a5f51bb1339a6da1f3" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "2001bdc53324f816452fc84c1f3074b7f5a9ac2424c8d7dd691bcee71cbedb67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_macos-x64_bin.dmg", + "checksum": "ff9f99ed6f02312451145aa6838459e15d14f60e94fddfa0ddba7e7f11b9d9f8" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.3_macos-x64_bin.tar.gz", + "checksum": "229a38eb6d04e660330f81ecd4db5d0f919c09454d6904ce0c82d7a3f124906d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.3_windows-x64_bin.zip", + "checksum": "d5751cadb3a826fbc0b938b6f832a213eeb6288728a77b6c6eeb89b58429b63a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jdk-21-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "f1e700c94dece6766de05be45e4771690449b91334e633428783f1211dda0947", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "edc9e30a40e05ff4131cc7e15646e50d5c48d273f8e16e79ccba5ac52fbd964a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.3_linux-x64_bin.tar.gz", + "checksum": "28cf24e863cf532e58e3d67149074ff382ace5f8215749a1f2fd05020fb220c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.3_linux-x64-musl_bin.tar.gz", + "checksum": "e75c7cd5240df9e4079437387f2e30bcdc779ba69498323fe086aa32e2c03443", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-eabeta.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_macos-aarch64_bin.dmg", + "checksum": "2071d6e3ed724d15fdfad52951087a4771c21c10d019097a138ff8e33edf7026" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "1bce00f6e585b4b131a1fc3c1f9f08aad5c00be9528b11f79237251720c84677", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_macos-x64_bin.dmg", + "checksum": "d69d052315170fcec56dc95aba077d00b7f3d349c81155a6f01ea6964f4aa726" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.3_macos-x64_bin.tar.gz", + "checksum": "eaa6d0fbe90692db7515d3aa965053435caf06b86d952793a9b8c3d57e22ff7e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.3_windows-x64_bin.zip", + "checksum": "957be49d82d7732e492ba9bc638d2cc207f04004623d21c955cefc88e8f54db4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B3/sapmachine-jre-21-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "b7ba2376f7d5c850f2836957e8343a683fd191719d5aac02b8c5d8c6e15bb4e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "6fdb656f4286fd1428b92ca1ea54eefdd7e0c45a75f98349ada13003356ce6cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.2_linux-x64_bin.tar.gz", + "checksum": "2d271b5ac0f813b8600ac87cf93066e1277df9c6713ccdfa0a69d9f5c95534bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.2_linux-x64-musl_bin.tar.gz", + "checksum": "0fd66b7039566586ebfa5c06b5786ae6c7090b8d09c9ec941dbe0b167bd499c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-eabeta.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_macos-aarch64_bin.dmg", + "checksum": "98d4e14838f1f7e0c1645bfaf8d29f29b577c195ce73bb2a1ad5567d0f431221" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "eed6d24ecee66716f80fb8c2a24aa9630b1a8523e65f0556b547021b40ec85cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_macos-x64_bin.dmg", + "checksum": "4f0c4e2695330d34657b94f29d96dcacbd06ce75fcc997a37ef1f9483114b4c5" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.2_macos-x64_bin.tar.gz", + "checksum": "556f51aebf1cc16942bd98b16c1ee49d2818f2eb94bf57392e7a981e7fdcbbe6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.2_windows-x64_bin.zip", + "checksum": "94c20776a515c5dce2483e3358ba0fee0af1abaeaea003dfca5f8658f92b9827", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jdk-21-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "e08684f5378d9eb04fff8e633ffbe859a59886b3ff47214ba0c3a3ba49dc2719", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "9f315f691a867c1ed5a4f36497af7ba4850e767426c2f30c606caaa9ff8aeca3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.2_linux-x64_bin.tar.gz", + "checksum": "66725d75a8c6125913493cd5fd9211ab1b66accc2291b2eb83bced7b70a69099", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.2_linux-x64-musl_bin.tar.gz", + "checksum": "d4b64b77ea5e6fa5abc3739b5a294e6c496a39de766fd6fb8a6a7c0eb4728685", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-eabeta.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_macos-aarch64_bin.dmg", + "checksum": "24bd2e084b4d09d53dd9da8d039e5923ce4bf47c12bf4e4eb2d6112229bb9ddc" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "64e6ca2e976913310ebd0cb4c8afe897274cb1b617f30000ac6a5fc497004a57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_macos-x64_bin.dmg", + "checksum": "647f3789e4c227ca8a51f5fb1fef12e4b5f7596cf556dbcbf7d3fa4f4b6f0e1e" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.2_macos-x64_bin.tar.gz", + "checksum": "da782f83e3cdd03f068dfaf6f4346d9944ebbc75c704f48735ba63f07913aace", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.2_windows-x64_bin.zip", + "checksum": "5e3f9a69e19a239f11b6e9ef63d596a79ef643a586a1c642af6d7a32faa38462", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B2/sapmachine-jre-21-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-21+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-21%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "f8316be7f6d520faca93bbca59062660277b15e8edf53ab378bdff9b2f333e9e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "3a9e59d7a59a20c35f8832950d6c7ca531b5fe53271bd8664382ee33da3b6018", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-21-ea.1_linux-x64_bin.tar.gz", + "checksum": "f765d92a0544e943c1d06cbe59b8fea64f27b4f6075d360eca667da58efe9f39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-21-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "1d36b9d5e7c9136bbbeeabff8935be364bafd7118d5a595220945b853a8160ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_macos-aarch64_bin.dmg", + "checksum": "d29e960aa80564253eb7645ce4707a36f0289eb05e829e42fe5404746c36056e" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "2418fcc48dab9cd818327007f2261803d5e09a419fd98e0e26eb61e9ee70923a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-21-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_macos-x64_bin.dmg", + "checksum": "73452cad0b2464359e0e88c9cc51251618a6bc0de23395c57542892c40588562" + }, + "tar.gz": { + "name": "sapmachine-jdk-21-ea.1_macos-x64_bin.tar.gz", + "checksum": "d414a2ad9be411027f82145632145608baf67fe5b0d6f32b3587ba37f53e2dea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-21-ea.1_windows-x64_bin.zip", + "checksum": "457a24361f8dca1a0d4c83cd2a512f1534f5f03acc1fce5e8927e6255e013bc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jdk-21-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "3be5be939166990653e7c5a19d79fb5b498308302302b8300b21df8edabe4853", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "b33293ffa579248d7b290a07d82d90b62898f9606e599b5f370bbf76133db2ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-21-ea.1_linux-x64_bin.tar.gz", + "checksum": "74b5a5e184e5824d534bb4cc99e0bb82d38c1e50c70054c37cc204ef69f91bf6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-21-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "970c4d70805cf5eab15678bfc03d45e0ed101c9cc81832e679088bf887756dd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-21-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_macos-aarch64_bin.dmg", + "checksum": "310945d1e348a9f3a1ed089e08c79c66914fae716368b336b86ef36c1c561520" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "fa36150e9ef935a58b1176f4376c1d67c608a8f41eb835d38f3115a4ed007877", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-21-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_macos-x64_bin.dmg", + "checksum": "36a113a3e7ea29fe623a1a91bf1cc00f0e27fd3c6865f0092bdcb36b764cbed5" + }, + "tar.gz": { + "name": "sapmachine-jre-21-ea.1_macos-x64_bin.tar.gz", + "checksum": "7b34693bda135a8e13e5f49c9c0d4b629285b9c6309c7ddb578389a2737c3e6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-21-ea.1_windows-x64_bin.zip", + "checksum": "a532686822312c87e655080adaff89620d6a06baa841f98d70cc474c1c63ca16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-21%2B1/sapmachine-jre-21-ea.1_windows-x64_bin.zip" + } + } + } + } + } + } + }, + "lts": "true" + }, + "20": { + "updates": { + "20.0.2": { + "sapmachine-20.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2_linux-aarch64_bin.tar.gz", + "checksum": "2632998967a16de48e89e944d1ed1a4f35372f980455868e564eadafb207ead1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "338a5b5aa74173a2fa6cdf98338668db71f560bb939c0b478fb34f11a7995f8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2_linux-x64_bin.tar.gz", + "checksum": "79a8e2bced58a45e70bb5d7e4cfdc8593bde6784f8c3b2587db26bb578e9bef1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2_linux-x64-musl_bin.tar.gz", + "checksum": "6d1039ee0d37c3c34fca20f8b1bf8af6b3ed17b425a1422cb9b98da5259036fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_macos-aarch64_bin.dmg", + "checksum": "8b52aef8ff440ffce862349c226dad1423c6550e1e367873ed84643c61dc2bb9" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.2_macos-aarch64_bin.tar.gz", + "checksum": "5cedd9a935ed094df5f6ccecbb937f1c65b0db11ede2ca3e1a41de92084c42c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_macos-x64_bin.dmg", + "checksum": "56943625ec616509b7569c456ff19dfa7bf3489563fbe2f8ab3506cd18f5a33e" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.2_macos-x64_bin.tar.gz", + "checksum": "3565914dffecafbccb31c7768b8efd804ee47144cff8a593685d06f6945ece94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_windows-x64_bin.msi", + "checksum": "81217d8606c57f7cb1aa1479e8c21658199b7ef4d90db7bb675f79c030fcef8c" + }, + "zip": { + "name": "sapmachine-jdk-20.0.2_windows-x64_bin.zip", + "checksum": "7fddcee932a40b5d55647f4d96c83ac0796e9aeafdde9bcd42e01ee65703c6b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jdk-20.0.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2_linux-aarch64_bin.tar.gz", + "checksum": "145f4703a1c5ce56d0c93f2b6f8d936ce66682cb019d2191efdec17eb72051f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "84bf7344635e9afe172680befb88a62895dc0934da5a3e58934a1077260fe2fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2_linux-x64_bin.tar.gz", + "checksum": "27797965f81909ee8907ec86d6d150d98fac8527aab5e942f403e40f09697b5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2_linux-x64-musl_bin.tar.gz", + "checksum": "221afa3e5f5dca5a196a8a2154ee7f3477f47c53b5a04c6c3eddd9a78efd5b3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_macos-aarch64_bin.dmg", + "checksum": "ad78d1d70cbaf0140d92392de88099535623c48271480e39d9c6dd17229e1ff4" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.2_macos-aarch64_bin.tar.gz", + "checksum": "62ee8652a9b95e9987bf143c54149773c38bb41b0670b15af8de9c2725cd42d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_macos-x64_bin.dmg", + "checksum": "6d89166e1be4b102d939d0f79961a133ca289c1fee72183481219a60a9fffc67" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.2_macos-x64_bin.tar.gz", + "checksum": "e71cc1788be2f428471bacaa151ab3f55b9eaa5d52f325d64aa6421cba63e8ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_windows-x64_bin.msi", + "checksum": "b7aa31fc34c64e994fef73c7fed7dac032800f210044322688e2e8400a718bf8" + }, + "zip": { + "name": "sapmachine-jre-20.0.2_windows-x64_bin.zip", + "checksum": "3c432706827719710d6e26d7f8acf24b686d1dbd1e10d75ab94493459ec87601", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2/sapmachine-jre-20.0.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20.0.2+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20.0.2%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "eac40ee5a3db7dd2017e6626053e221e8025c760bbc65fa402d2bd70e112c790", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "ae5c322c980388374ccb22323dcada473e93caeec6a5d367877de75a8265a4f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "80d4538002c2ad8bed33e9f7e4a47279fb24c75ca70f2de51ad6bb9802a5c50c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.2-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "9771561aa9d3232c73140b929c71a95a73770b71d11f9cadd1f949536f2b57ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "9eec454b566e2e0b9476e9c661b5662f96d6fcdec8e8c36b00f9d0a09f8392df" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "c6af4c71d8c0c5dc4e14124befa580339116730da671f4c1ce711fbb0c258799", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "eccf459ecd200db7a12a19ac0f82bacecef0b0b26e5df23d8ef8da2664dba754" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "b7031bf969dda5175971ec9566ac9d11305b68fae1d195d30ae03f119192f68c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-20.0.2-ea.1_windows-x64_bin.zip", + "checksum": "cfe56fb536814c9b608d4a800670a44686cfa937b3bd1ddc66f2a256659ef15c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jdk-20.0.2-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "59e3120954b2a8b2a5641b75f6e4705af31a113e56469a7dc9848ced4d7d6a30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "24b182b9f810ad68d7cdbf8f194999d0cbed7bbf14d3057e63adb734b3d0f083", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "1a506b7e5ca84336e1d928acf924aa634991d167734a9aed2e63df7b462de0e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20.0.2-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "4676e91caabc13c7ab4d53c6e1d59cad297307e3bfc5858db190e1fc37b9ac4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "8cbadb9ed42eabe426922f7b76c8d4b3d63908eb3648c53ad9bee02af3c81d84" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "d32ef04cf445a6cdf99de16d3a0b0f19b1e877c603cd1766f51be948af2f8b25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "72c7c8aaea19075a341225ffb68782234cf188fdbcd8b60bf07745ea2222c412" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "d0833182174579a1633bea86f7ca43e68c268d174382dad7b845cb2ba0947939", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-20.0.2-ea.1_windows-x64_bin.zip", + "checksum": "4393b1ee8166bfe6c67e398cb167324df055d4add53fe3ba384b095079d680f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.2%2B1/sapmachine-jre-20.0.2-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "20.0.1": { + "sapmachine-20.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1_linux-aarch64_bin.tar.gz", + "checksum": "eb5c0ee77bd9121cc4a4c9c80b86bbfe6bb061c71c5d918727ce33cee3887743", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "eae061ad131bcfd6cb81160a00a044ee4c05216a849005cfff8186ae5bb1c517", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1_linux-x64_bin.tar.gz", + "checksum": "192de59d7c7b7b6577539117f03ced5b46b4689add537b1e2b1175d013380ecd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1_linux-x64-musl_bin.tar.gz", + "checksum": "681e3ab6ac374b759807161570b996c04e67557207016b67b7026720d8e955b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_macos-aarch64_bin.dmg", + "checksum": "75f85bfb4db30e73e7893703c8016c5a087d412cfb656ad5f89652ba432b0f7a" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.1_macos-aarch64_bin.tar.gz", + "checksum": "7f587844546558174f3ab48d7e1523373bb4b35144cdf87b66ff4c9e88885177", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_macos-x64_bin.dmg", + "checksum": "449efda64407162788eb04734a522d79540510663d3a648dd487519ab281450e" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.1_macos-x64_bin.tar.gz", + "checksum": "2140c1c35966c5202e4ded8e3a22b2e2114ad011cd49ea561b529dfd2b4257ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_windows-x64_bin.msi", + "checksum": "90cfd91c0e0d80eb5d15720e158f2fcf7aecb231afd66f4980f464ad51caa662" + }, + "zip": { + "name": "sapmachine-jdk-20.0.1_windows-x64_bin.zip", + "checksum": "031f0116e4c7d69ddd08c0d448dc5decb912cdbbe7e46f9fdb771576e4ef104e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jdk-20.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1_linux-aarch64_bin.tar.gz", + "checksum": "66bb3eba48f14646b1844b5877f4f5a4951e5960a7f893a4efe4c2feb3428520", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "8a10413c2d09a431f343e9dc86b5d9cf5e3fb59147fb24c8335a969be5a82b78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1_linux-x64_bin.tar.gz", + "checksum": "c49d6928c57913bcf6d5da00763661b5318c9b5dd96cb30f110e1e470561f796", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1_linux-x64-musl_bin.tar.gz", + "checksum": "dc3a34fb560cf72b4c7a12364259ce231849bd64d4bab14cd2e4025cb42d448d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_macos-aarch64_bin.dmg", + "checksum": "2eec57e1919cc135b1d3020443a091e706476c562d2632e8964b21af3304d1e4" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.1_macos-aarch64_bin.tar.gz", + "checksum": "a11b7664494c7882e4c583b558820f632702101e2be4cab991fcdccfc55cf599", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_macos-x64_bin.dmg", + "checksum": "47bf70c3f553c1b1d674e023f7967646cd09565b4f649a6ad2756c3831c193ca" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.1_macos-x64_bin.tar.gz", + "checksum": "77600ec23ee2f137411de2cf769d11709f8459283f479f1584263ba069ae00ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_windows-x64_bin.msi", + "checksum": "82f075de31d3035522865407eb50d04c065de64628416107c1a03c01def526ad" + }, + "zip": { + "name": "sapmachine-jre-20.0.1_windows-x64_bin.zip", + "checksum": "44fe3cfd9dd37608c7b4ed938efabeac91c7dc29f60c45b361c72f6f72910d90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1/sapmachine-jre-20.0.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20.0.1+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20.0.1%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "9b78a367c50762accc4d8df6e8e0d567dac07d2d128ce56934f7e0114e9f7d3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "11485b40beba2105150f240a8bccdd7966f8dfb845abe2d4649384d0673d7455", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "06b460aae472e198657c568a426868f4da878df7150150e0baa2f0d6ad930a61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "9e271b1311fa3a126d3547604b57e95fdbcf707dede5784c3d9e22d4929bbe65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20.0.1-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_macos-aarch64_bin.dmg", + "checksum": "9b90798d1acb9d2b6b9b0175aa7b1f04cb68fab7fef43acc2bb3a2421aac9092" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "49db0772bfa2cc76daf9f56ad182484528dc26f6da5a751e48645b28f576e3ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20.0.1-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_macos-x64_bin.dmg", + "checksum": "8624f60e2ecb8c69d34b1c813392dfa9f57fb6e4f8f5b1c22513c6eab4820128" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.9_macos-x64_bin.tar.gz", + "checksum": "19bc3e272c74b5e6fdd20234c244dbf4540165265879b4a7a8cfd9b95def5530", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-20.0.1-ea.9_windows-x64_bin.zip", + "checksum": "1cdb7ac6c07b59ec3f225f94a616076a62cfdf7697c52195d21fe16ee8e97e5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jdk-20.0.1-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "f08095a1e92a381171c3f48242e43638368c7d8f4a2fdd54b8094bacbec8582b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "7472bc36a51101109b64c902ab32da8204db761fcec4b5193f27428e02a5e4a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "cefbc9a833e072377a58d05f3a71c4dfb34cc7573dab477ae261f3374090073c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "c3db5638a0dcad561c701a7963be010a8526d6335db6c8cc3c71deb7060cfead", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20.0.1-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_macos-aarch64_bin.dmg", + "checksum": "b1f3423ea3f45f09a309591f0f13f81952d2204ec7364df8f808fecc88ed653a" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "e58f3b8e3f4b4d1e4bfe955896d0643a344eae7fb1c7b43d6d567f6e7e6f63ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20.0.1-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_macos-x64_bin.dmg", + "checksum": "e719ca4de4f591dc5670001560f86d765f8ebbae3c6a9bea4381d1d52373e1e2" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.9_macos-x64_bin.tar.gz", + "checksum": "3b80360af3a1903cc31bfb4e691d15d8d1b485c2f63753d302de9ca5fff3efbc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-20.0.1-ea.9_windows-x64_bin.zip", + "checksum": "85c967dbb05f0c70eecbf6180834cccbf4748370c83a160030e6338727abd8bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B9/sapmachine-jre-20.0.1-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20.0.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20.0.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "56e950169c8330f283530f48df79358e4559b3084e99b403ec677bb41fc32a32", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "ae97da06745c38bf6503014b00ba20663ecc535b8961416523311e6735d9274b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "348b18d9a4ad433902917fc6983035838780a07f16e2be8a213be398bbd98946", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "0f6aad9216b5d4ee63e80024c211e7978ca8f7fb2472d00cf50db32a894649a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "0f3a5b10dfcae37e97fd914ba8cdd49903a535f6819afabee4db373fe6402b43" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "6c3ba020bc282c2ff64e6604bb9cae81c47cae3b988692f551dfda3976fca260", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "8f0561028566c4ce32ca414324d8c5ef9a13da15acb58e4c950297178a952ab4" + }, + "tar.gz": { + "name": "sapmachine-jdk-20.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "00028b3f302175e295365792ef4c16d269ba419a3cf82f16ed67ed000b33a6e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_windows-x64_bin.msi", + "checksum": "5c5db8ac107ed728906e655cb089f656d87d74aeb026bacf811e7b1825ff466e" + }, + "zip": { + "name": "sapmachine-jdk-20.0.1-ea.1_windows-x64_bin.zip", + "checksum": "e2011172a00dc624386ff3c4c31af47ed5e0a869a59ca8a62278eaf5dc2c2106", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jdk-20.0.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "b35be4f3961568dd7be730c117aa2db507d7e404271ec955894849ec1177bde2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "281f25ea1dbaa7823a21463fa60121e644017bb28963315cdff38a98ce453827", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "a66386e12f81e4652d220f759d9176e6ed548d0cea8904135426e9516424f185", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "90d83c2d81a130d58aa8bb9ffc8efdaaa01714b7b9308009d31272617a5fd1af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "959d7a3f4b1ca4efcc8ac20dfd1d54c109290b670945aa952fbd6085c2082e29" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "b0c6162300f114edd174372a46d0fdb9755159cd7ad0f79ffd3bfe4d457022cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "73d331e092132b12ba7450d9f5d84347c377bd1a51767c02d7b251a14cbbcd07" + }, + "tar.gz": { + "name": "sapmachine-jre-20.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "3cb104daaadc40b98496c266faadba2e839076e3411ca9e042ea67f2353af2b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_windows-x64_bin.msi", + "checksum": "85d1c2a062c63cb576a9e11a1e677673375cc6b4fc20efae96cc5b6da733ddc4" + }, + "zip": { + "name": "sapmachine-jre-20.0.1-ea.1_windows-x64_bin.zip", + "checksum": "93e45f293b4ed7e2f3faec814d304cb1bdfc271c3a7ab0e39b6bf32cce756dac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20.0.1%2B1/sapmachine-jre-20.0.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "20": { + "sapmachine-20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20_linux-aarch64_bin.tar.gz", + "checksum": "f673855182d92973f1928d5695a504dbf17262828c9dd00f30c60c5e10e0eac4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20_linux-ppc64le_bin.tar.gz", + "checksum": "50749b911e1d6eb0535088c59c74d99dd049d894e0df70201a92d37edcaf8291", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20_linux-x64_bin.tar.gz", + "checksum": "29fbec8a7c89561264d3e53547636b5eb4a8af65e8aa3892504418e0b9b60e16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20_linux-x64-musl_bin.tar.gz", + "checksum": "a6704d9023cfd5850af92ca4b2b968b4e5ecaac7fa8f709a5a102f193f7083b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_macos-aarch64_bin.dmg", + "checksum": "86b57d7ad1011e459efe80ad947bcbd59b1580f6d63220e8464426263ac1577c" + }, + "tar.gz": { + "name": "sapmachine-jdk-20_macos-aarch64_bin.tar.gz", + "checksum": "c5c360e340902514c4c7a8966e2e48f0b73c9ef10dbd73527afe0384a2bb058c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_macos-x64_bin.dmg", + "checksum": "cb5a0abefdf02118747c89f6e8a9fc59f37feef361bb68b39be40d368012b80c" + }, + "tar.gz": { + "name": "sapmachine-jdk-20_macos-x64_bin.tar.gz", + "checksum": "d4e47a7b5cd233a4348aa393c4d9fb2d4c30ef76ce5bca163fecab85241386a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_windows-x64_bin.msi", + "checksum": "68eef2eab33e8201d794c078e08203ac73fe3caa17e9b23ad187678fd940fb5b" + }, + "zip": { + "name": "sapmachine-jdk-20_windows-x64_bin.zip", + "checksum": "3c05efd803b6c3c0e007039c6d50fb49257399a5bf40b3d1ba37464c44afcd79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jdk-20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20_linux-aarch64_bin.tar.gz", + "checksum": "c9ca206026f8816cc680fd326c0d55740da1f293456d134e312dc0b57302a3fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20_linux-ppc64le_bin.tar.gz", + "checksum": "5cc9dd95f86c7e87feba962400e878458b8dd1161cd72f3346090e4aa024d903", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20_linux-x64_bin.tar.gz", + "checksum": "bf759512ad35a8f812d23960100de8222f40f1b37f561692655ae22315b17b81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20_linux-x64-musl_bin.tar.gz", + "checksum": "426ff7ea99947f129a6816cf191a35f215df95054054fa174172eed7d8dce17b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_macos-aarch64_bin.dmg", + "checksum": "a6be67c1942de4faa49f88780832165064bf493eca69d99c69eb017352a9a0b5" + }, + "tar.gz": { + "name": "sapmachine-jre-20_macos-aarch64_bin.tar.gz", + "checksum": "c16516b25a320d2e7ffa4c13a79f0b0b302088e1633268bfd6e84f82898570be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_macos-x64_bin.dmg", + "checksum": "7fd600d4de49ae03977f43ee25e81571a82f5fd4c993921f2ab76003f42f74bc" + }, + "tar.gz": { + "name": "sapmachine-jre-20_macos-x64_bin.tar.gz", + "checksum": "a32bf4d97ef0a7abf59f031e92f541f24359dd2fb8a62be117c9c5072cd01fbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_windows-x64_bin.msi", + "checksum": "c017c9781cefdd45fc120a024515a363243824fdde90bb23c4e99f87c95d5f5f" + }, + "zip": { + "name": "sapmachine-jre-20_windows-x64_bin.zip", + "checksum": "48529cf25bd386b06b54f266cfb51510d0128cfd0fa32e5c2efab3f372b9dcea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20/sapmachine-jre-20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B36", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.36_linux-aarch64_bin.tar.gz", + "checksum": "433138cf44a4adde5d56710fb7cfac1072be29db391966c4701235b66e5fc8e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "0aa494c2e076d9c2ba5fb7fda6354755d6029c4f7738507299780cf1385aedf6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.36_linux-x64_bin.tar.gz", + "checksum": "0919f2fcf90ffdec2d98ce264c6a9ecc8343f1fb4628291262c59cc162483529", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.36_linux-x64-musl_bin.tar.gz", + "checksum": "2f2a6a21ba891c44305637aed987363f9bd74782eb3ad2aa106352f20c5ea15d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_macos-aarch64_bin.dmg", + "checksum": "c6cf4427b33b7dfcf071e5ac23962f92a0093fee863f6aba40baccf0bdbea971" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "15bdb1557a15bcb84b3fbba1c2ed8a3504ede3317cf4961d18ee072964175930", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_macos-x64_bin.dmg", + "checksum": "508769a108cc42488d1e88941cce5ea87d09c95cf3563b0ff07f09b3ad5dd242" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.36_macos-x64_bin.tar.gz", + "checksum": "df126fdf9e0d3187ba9636353e4af9881e159d7180ad9ca7c513b8b2984a5dcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_windows-x64_bin.msi", + "checksum": "e4a81bd52549c10e671f98644865e24c47549190baf0f36b7d86cdc62fcdc73d" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.36_windows-x64_bin.zip", + "checksum": "673ff4ed26b38f1426067da8276089ed4a01177dca945c880ad0015797413f05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jdk-20-ea.36_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.36_linux-aarch64_bin.tar.gz", + "checksum": "7508488d86c1cd44c219f62dad795e1ae8305de84cb4c8cd6acc1f3eaa82da6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "8f887bd020c83afa6791a000085fd70069f896bf196f630e14447c7287b1341f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.36_linux-x64_bin.tar.gz", + "checksum": "bed0fca6dc93a6c218f6ee0960d1b43e31a6baef92900cdb61411f8018277a93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.36_linux-x64-musl_bin.tar.gz", + "checksum": "43111db5ad6ffae9fc0e2a2d85a15924f95b64275c54484b8ad9f6aa1ae8ee37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_macos-aarch64_bin.dmg", + "checksum": "1de66dd83289b92cf92913d1c6c55647fad5aa607359ef3cd37aafc675a388ba" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "0d8d52b595e71602477a6e5c387009e909253eaef78bd233540cfa98a8836b86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_macos-x64_bin.dmg", + "checksum": "108a72d05a45dc2c63faa8d26c7796caa7207a88dc041d2421e7852b5afd137a" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.36_macos-x64_bin.tar.gz", + "checksum": "6e8a376e0f94ffb841e6757b9c52bded7de1c9dc5ed69f2919948aed941c367f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_windows-x64_bin.msi", + "checksum": "63dc9a1013b99930a1ed2a16bdab67f884da3a96015aaf5066a84605a22911fe" + }, + "zip": { + "name": "sapmachine-jre-20-ea.36_windows-x64_bin.zip", + "checksum": "d2883338758949ab8d5c3fe69b6415a573546d69c5b144cc32a2494198dd63f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B36/sapmachine-jre-20-ea.36_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B35", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "fb5fc1785b7f807fb73e995b12571061a9c356aa61bcb6451e6893b4d1550fb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "7c00c3b655fccde940f0237a4ae9c800d2459a18f19d08238e473bfa055d5777", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.35_linux-x64_bin.tar.gz", + "checksum": "4ba52ba4e3b6bbec325da5437b8265045547e8931e3f867faf0edaef2c327afc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.35_linux-x64-musl_bin.tar.gz", + "checksum": "510e5cccaa1152253f54d9e0940e24f0e6fb61a8ebeb0e8422f2e48670297ef3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-eabeta.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_macos-aarch64_bin.dmg", + "checksum": "74a9402ba893130de4c23171f77bb0401c38735acf37086669d55a13035c7520" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "90aa488e8c8da82b2273a143c1e78c69f7364821059c3ddd8f2214677da36c75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_macos-x64_bin.dmg", + "checksum": "8bcb16a679bed1e075e8f3f032f38f6b1f0788f5d1199fc33a3414ce62c4ccda" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.35_macos-x64_bin.tar.gz", + "checksum": "19e6dc88492cd9058ab58dfc1d609aa7e952ab9221bc43392fd3eafad6c878e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_windows-x64_bin.msi", + "checksum": "01530a3c25a0ca45e2bbe06530d6c5c88362e2873aefb35031aa529dbc4b6276" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.35_windows-x64_bin.zip", + "checksum": "3d676c83c8ccc6ce104bb82d39cfdff35f1fb6865e9a5ebb1d9b003b4cc453ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jdk-20-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "9947ac3ca45dd20ca0ecb62937153b2ffd1daac870cde03f2ee3d9ca695f1584", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "9f550a6e8a687567add885d4e834b2780a146c9df8bcbe0b40c52e9c5510f498", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.35_linux-x64_bin.tar.gz", + "checksum": "d8c759c89a466d9e0c70ffe1809d291a632120c6b029e3768d2f6e5a32bb9fed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.35_linux-x64-musl_bin.tar.gz", + "checksum": "98b4686a4cdce52d8fbb502112206897f6d08d2897c144076d5280c33ee7c808", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-eabeta.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_macos-aarch64_bin.dmg", + "checksum": "a561f47821866bb3628a027d904a156dac6c0cc7e7eaf0b0a6ee9f49edd597f8" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "b8e4c78278e3561b96056b9dc1d487bcfdc5707595cb94ca7318592f1b4535d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_macos-x64_bin.dmg", + "checksum": "33aa770811c02e03f5f8683b9478ab79055a5b1c7330b1103fd7f3ad4d313663" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.35_macos-x64_bin.tar.gz", + "checksum": "974ae4520606777b470bf63670ca79f6aee57204b5987bb855bbd4ba30743e73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_windows-x64_bin.msi", + "checksum": "f0e910c5d40adf999a816a6f740e63336e3d1e95d450becca22b72c10682be49" + }, + "zip": { + "name": "sapmachine-jre-20-ea.35_windows-x64_bin.zip", + "checksum": "4ea48e2141f32030f709d663ccf58663a5b8890ae4371396f96af59620ed675a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B35/sapmachine-jre-20-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "590d585d5ac9571c1af946aaf7684af9b96e987bb85352b825b9ac056740f51a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "4625d378c2303949cf336f6f62849e56f1c9faca206a38ebbc1a34d7cc69dbe2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.34_linux-x64_bin.tar.gz", + "checksum": "6208fe67411405625611fd9a458358da3fd19528260b261bc63a39c184a0d87a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.34_linux-x64-musl_bin.tar.gz", + "checksum": "fca7778ef6ef43360a0fa24cd2c942cf57afaa4765b598954aede03d93c487bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-eabeta.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_macos-aarch64_bin.dmg", + "checksum": "403e75b5b2fde6f172aaa015f583661ae89252824872a69f4674d4ce0f2220e2" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "25f941a14573d1883e5a4be7fde0954767892fe179f2969a397db18476d1f18c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_macos-x64_bin.dmg", + "checksum": "bf9af73ca3deb5068de683d9042a4c569187c2e765dc9476863f557eeffd9abb" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.34_macos-x64_bin.tar.gz", + "checksum": "18b274b164b93caeaa81e54bbc551456dd78dc10ef0fad3e74ad570f9da569d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_windows-x64_bin.msi", + "checksum": "f88afc4e0b28b12c735de58172094a31d98f49c1f97175d1e925eadd577048af" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.34_windows-x64_bin.zip", + "checksum": "8cd30ce3f27f4d0054fd9d424165ce95608ee94a51dbf8053e3519bee85c244e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jdk-20-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "ae2d5fa42c9025ddeaa85ab12a0ae340f08433b4a7193e546696d13842981a3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "6910e44af2d952ff673591f9f3312bc855978d238a5caf4755a739324493dbd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.34_linux-x64_bin.tar.gz", + "checksum": "d951bcce7766bf944d85be46b1595b634fd8df7b851b564eaca0bed5f1e1a136", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.34_linux-x64-musl_bin.tar.gz", + "checksum": "0e15331f4a778b19b2fc73f7723e5623897e40241ad2576497b77d4c0b78d2c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-eabeta.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_macos-aarch64_bin.dmg", + "checksum": "64854ea1744427b4afcc6dda9909613d425fb7c89d57b5ac131510894ff7ac21" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "b75629f01ab48bab46ee76ef6ebc7742e685e09042e66b86d730bb112302c2e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_macos-x64_bin.dmg", + "checksum": "7e04452a2e225fa6a2268ed9559eada13d68d5bf9b6e2c29fe768759cedbe196" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.34_macos-x64_bin.tar.gz", + "checksum": "61c4a83cf297757b81a3482f428ff7953f10b3f6187f1c2547d70d94d63136ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_windows-x64_bin.msi", + "checksum": "43fdef493cfee91ad6073de580973f86f7d1d4e28ddc57e92d67ba6c1947aba1" + }, + "zip": { + "name": "sapmachine-jre-20-ea.34_windows-x64_bin.zip", + "checksum": "0cc72d7211b31025ea5500a2b3980d2f16ee727b0f94ceced7bb31be890a5ca5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B34/sapmachine-jre-20-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "174799a0f98063720c3a7adb19e3c2e4ba3069efd548c27690ceefb548cb41e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "9cf4d4a381a8c3a3e58b3baa95aafdc75e97d6be46243ca5a07a682a13b8912b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.33_linux-x64_bin.tar.gz", + "checksum": "6f8faea94889340f2100bbd468769f2173fff6b3e4c120d10d0d90560b75890e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.33_linux-x64-musl_bin.tar.gz", + "checksum": "310d3f4ce816ac5a07e174d1e919f491f9ad332379bbc9b3a4ea55d2ee5898ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-eabeta.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_macos-aarch64_bin.dmg", + "checksum": "d983cb7d0a5d2dec0d34c373280535d293d7a61f78fc7f99edbd5129e85e2c17" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "fe53e02f8f97797dabb4d97bf85224f8df2cdf6ad3a3a96d2aa41ae6436f9a40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_macos-x64_bin.dmg", + "checksum": "3db7607ac59a29084d958d3b2013e789076a90335f9342a7c81c5eceaa53ba72" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.33_macos-x64_bin.tar.gz", + "checksum": "8e378354c9c5ac398f8514d6d58c79ff1f0faa42a11438ca493bb653cc37dbfd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_windows-x64_bin.msi", + "checksum": "0a072607b75a36555940835c617dc0a3b69149a704bca423c849b42c06efafef" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.33_windows-x64_bin.zip", + "checksum": "bccd8ba8bb55c09ccc5cb144c7eac1a1df8189c03e3bd388c05395619b84ae6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jdk-20-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "e1a2c99f871757a823d0e3435961adf15a42a3d7c1b3b627a9dd82692dcc8717", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "467840ce4442562ec7296787e7f4d99f28014ce05e2816499f4813e1b8537c79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.33_linux-x64_bin.tar.gz", + "checksum": "277bef3e72915e54afa4d45311cabd6e89991863eebf245b1b463f8db5eac809", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.33_linux-x64-musl_bin.tar.gz", + "checksum": "2969813f2348057da1bcbfaa5a0a1a593f63fa2f056f505527750d9de15f43fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-eabeta.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_macos-aarch64_bin.dmg", + "checksum": "9acff9e475e7af393f41e7348177dd42dca5ae062529d078ef428bd08bca02bf" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "3662e501cba7cb1686b8a413f0e83ffb197ec3061b142bf940eede7305bfbb06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_macos-x64_bin.dmg", + "checksum": "1418ef03522556595c5fd6664aec1a6127fa244e2392a00497ad3fa08305f0d3" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.33_macos-x64_bin.tar.gz", + "checksum": "79fe1180cade30b0b02950cae87e93aa308bcf7ea74b32fd892dff66707eaa2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_windows-x64_bin.msi", + "checksum": "75abe7890005f4ede8b0c51cd6a3c1d9995d172e2f7f452698889fc6041dfa68" + }, + "zip": { + "name": "sapmachine-jre-20-ea.33_windows-x64_bin.zip", + "checksum": "2aec20f3761f0aac76ca7fc58cbfdbfebfc83f4975b5665efef85ecbafac9ea7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B33/sapmachine-jre-20-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "525eea6ccb78764d42607580f476bbddd262c029f683c44bd90d2aaf4ffbbbf7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "50c58cb7430d7dfd0d7b4f7067aed06184a9c898ccaf54edc813d4c99e1a341b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.32_linux-x64_bin.tar.gz", + "checksum": "14577709e88384795ae1e81b3cf87ded3d1327f7e29ab369cd2a9942e50bcb38", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.32_linux-x64-musl_bin.tar.gz", + "checksum": "53cba9718d61bf6b7605b8f3611c0e162ecd0d2f6627e18950006a4f7ed370d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-eabeta.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_macos-aarch64_bin.dmg", + "checksum": "41dde2fa3338a750958d6fa356e9f183cda8c40691046f74eed9e1e613b624f9" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "f712f174a1fe3962d1c38b92eb5de313e2f30b9837b0fdc409aacdfd5e57bb1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_macos-x64_bin.dmg", + "checksum": "a54f2974f6f755fe1c017e4524db50c04b73c7e44eaeca897378948638f31ab0" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.32_macos-x64_bin.tar.gz", + "checksum": "cf34c9a2efc4f5e543cee77d79e185db75be712ffb5ff61e3bf25e5b903df8f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_windows-x64_bin.msi", + "checksum": "baf52a215327e79b13d6d907829420681695a26bcf83689c830a1a4bfa2807b2" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.32_windows-x64_bin.zip", + "checksum": "cb191655baaeed1fb0d725a596e221d885b63de8fac77d3aa8865bdc572fd1eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jdk-20-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "47df1b3f14e6ae8d6e02e5fff2d17f4a37b0adfcc8e6204b3902021dc06f9ff8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "ad680551b5dc1cf968baeb1cab23323c0e03091d6ae0621366cb4d6dd8085388", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.32_linux-x64_bin.tar.gz", + "checksum": "b4d8073fa639ad92d1df87cc5bed66c046f2ef2e6cf3f5077583258557f9e208", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.32_linux-x64-musl_bin.tar.gz", + "checksum": "4710f8ab23e460e3522641f9ea4613df6743148011139f9f916a9ff59acbcfae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-eabeta.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_macos-aarch64_bin.dmg", + "checksum": "dca16e6d52857f10ca54d9062f011655fe15aeae81b50f20664adf397eb02eb8" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "94f2b33976a503063275589a6df99479ea20fef335d419016aa541aab06ad6c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_macos-x64_bin.dmg", + "checksum": "1caf617dd54fcabc45e040eaf30a6eb5f40f653cbef0ebd47d12e6d727887bc2" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.32_macos-x64_bin.tar.gz", + "checksum": "765cb6bc6c49c19d6aa8d8c02fc58d8f907ada19cbbc43d92c73082d48ea852f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_windows-x64_bin.msi", + "checksum": "7e9c83e2a35b25631bc2c4bc51f63deb60b6d8aefe7181502dc59756a3190e95" + }, + "zip": { + "name": "sapmachine-jre-20-ea.32_windows-x64_bin.zip", + "checksum": "9fa49aa6de3f605298ee84a742f1bc639ba35423ba9157d77ca3c5bba7a8aeb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B32/sapmachine-jre-20-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "efb5fbfabf31c7d5b4cf59e5a8376707d22a0d1eee4158f708949fd86a6c6db0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "c1cea501ec312ecf97b8e9356f97eb92b713cd52a8da431ab123c25194ef5cdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.31_linux-x64_bin.tar.gz", + "checksum": "3115013ff5e5e3a8b698dea03c2597ba5d4cd230e6a5e4ecdfc0ef64ea930d86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.31_linux-x64-musl_bin.tar.gz", + "checksum": "72f915ff90f37e6e2eda4183caeb5627744041a2dc4bf8c9d7a8bf40bc2b87e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-eabeta.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_macos-aarch64_bin.dmg", + "checksum": "54fd2a412d3359e89af71a18cbc8eea9a307c6422edfa7a9bedd751686f8c881" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "ba15e423ff8376ee73ab25dd72e356fb0c88287a1864348874b70d3043bdb942", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_macos-x64_bin.dmg", + "checksum": "f3c5b5c9ed5acec0d667c8e2a297719786623f2a8d246d3704a5d2808bd1fadc" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.31_macos-x64_bin.tar.gz", + "checksum": "b89abc27ea32ac9f6df7c54f2d9e2e68edc948217d77b8415a45cf55d7018894", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_windows-x64_bin.msi", + "checksum": "f0d99ff7bfdebf8a1e83b3b2ae8f8fa82e67a5ee9c3997e4a1337b2c2d16e2a6" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.31_windows-x64_bin.zip", + "checksum": "4d1c6be5d0c4e98de3612048edf4870897bc26faa7ec5a8420e12baf3e251e4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jdk-20-ea.31_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "c7b4fe985704fbeef4cc58923c4df3baa82b5c07ee5c6b113afcd85f8b1418e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "bea57e2e0cb0a423b5438af8d9a461a760bf1436ce0ee5dbb50bf3b7ce52e4a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.31_linux-x64_bin.tar.gz", + "checksum": "b1093863ba74a5bc5ee357774fa8372b046587828e9b1da27ff6cdc6d233aa66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.31_linux-x64-musl_bin.tar.gz", + "checksum": "a6d30c0c0171469f0aeed91c447cc5ea2a14dda6b8b43e4dcd4ee3863780d6b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-eabeta.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_macos-aarch64_bin.dmg", + "checksum": "2f06d67b09dbb8dc8870b0fdd3b308f28a4801b00f41af902591986eb8654220" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "94309cfcba359cd335935be77a981f3848e452af56aee641b891f376454c3b94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_macos-x64_bin.dmg", + "checksum": "8365eb2e615d1646f2f2909f661348261e997f6c20f7688ef94e9fb225e820eb" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.31_macos-x64_bin.tar.gz", + "checksum": "31d77c404935ae083eecaca96d53c4e7b4b37163541751da0d043ffd3d756626", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_windows-x64_bin.msi", + "checksum": "a29bd541a6e06cd98a23a069252030732cf58e5ee7dfb2f81b9c5f4168d4d329" + }, + "zip": { + "name": "sapmachine-jre-20-ea.31_windows-x64_bin.zip", + "checksum": "79f71994ff70cf8ebdac4e9b9e5223c24ec69500eef8becf3b0fede86ec2c1cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B31/sapmachine-jre-20-ea.31_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "4c136a2b198431b96fd8a51eb0a050a22bb314251de5f45eee78fea09f6cfc61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "fbb2c33cfac921c52a53295aa2712d36f53dd356c9086b2548be402a6ab4828f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.30_linux-x64_bin.tar.gz", + "checksum": "a462bfe24ee74ca34974a16f461951f698a840536c3a0fd828725233f0fcf2e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.30_linux-x64-musl_bin.tar.gz", + "checksum": "db5f8ccd57e23c9a7387beb8a47c3d8a45c7a7d95b410e862274c2e64f9e4c2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-eabeta.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_macos-aarch64_bin.dmg", + "checksum": "cb983ed901981aa79f5435233639e8bb66331f9d3fb4093a08d842055c66aaa5" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "8c3bdce3f2e9270def7e65af07244fa0f503efc1a66b8699b2028ee352bd9f3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_macos-x64_bin.dmg", + "checksum": "ecadaf0769a244a4c3f9a140742b11ae18980e4dc6b8d29eff277131fe01ee5b" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.30_macos-x64_bin.tar.gz", + "checksum": "5493cb31cfe243e5655dd4d658b26a9497c5624f03cf3a9d6fd54b4d4e4c3c76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_windows-x64_bin.msi", + "checksum": "f2730d8356968f04c7ac7bbc8e514e0fd2f47315dc8d8cbc8ed90a1b1357b04b" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.30_windows-x64_bin.zip", + "checksum": "5c716aace5250eae041dcbf8a8b7aaf5bda6e8e22e6a4782f66b049bcef5c1f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jdk-20-ea.30_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "8fa80456bedd233c0f5b7665faa2a2c23204ce1a18e0b3ac5742df9ce3b10cce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "ef84b1282946698fd52469028f6dfa011f6d210a1a6ee5fd6837db304c984cdb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.30_linux-x64_bin.tar.gz", + "checksum": "40aa0da5ff2c05781812f364685335061b587630fefd0ed300fd610f1f28909b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.30_linux-x64-musl_bin.tar.gz", + "checksum": "bfe341585f8e256385398c9dd83440320a3f9bbb15bdcd0d32c446ad9e7637ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-eabeta.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_macos-aarch64_bin.dmg", + "checksum": "f6d9d2e4f96a7c18f50c6fb746bfa62d1ab974c47c12d6b4acfd1fed24de9df0" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "1795f9fe2533e2bdd2fa51da5b85bf8f20d286c9cc77dc8ff3fe7f2703d3b6e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_macos-x64_bin.dmg", + "checksum": "037d2d620be04d0a5b5ccc9600c1b3b065590430b073f90b2b9369516dd3c44c" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.30_macos-x64_bin.tar.gz", + "checksum": "fc3e429c460ef3d4279d52b313deaef915dc0fbe0fb983773b5925915169f82d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_windows-x64_bin.msi", + "checksum": "980c2a39235c6e33315bd2a2d08c726205d81fe23b8e2b7cf1655a0fce1ce7d6" + }, + "zip": { + "name": "sapmachine-jre-20-ea.30_windows-x64_bin.zip", + "checksum": "c9792d8546ef485744dbd29f192f22ccc1bc7b69730583531e36d1d74e84ecce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B30/sapmachine-jre-20-ea.30_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "7770d1ff37afc30d363b715b54d0c36116b48375111e5dac909d125b6358b239", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "9a4e43150b4effe9e6a20f2a358f58af3e6304905a5bd8ef38e537e623954554", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.29_linux-x64_bin.tar.gz", + "checksum": "ea792332b545ef2b697b34749c99255c47a215e1b98360404797e6b3394de5aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.29_linux-x64-musl_bin.tar.gz", + "checksum": "3de3f181590087c6bf381f10f12d2fd9a7b6195ab5ecaccd1277e881ba19516c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-eabeta.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_macos-aarch64_bin.dmg", + "checksum": "127f844039c8e2557de128be58f031b115360969397b5ad7fdea246dad1cc98d" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "04be75a50b8ef4492cda0feff87e71ef7eed4c2647de4aa529d01e230455d96b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_macos-x64_bin.dmg", + "checksum": "32b5d609a0ab04fba0a735c67dab01756593291f676cfdf720a6da918d0a5bf0" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.29_macos-x64_bin.tar.gz", + "checksum": "fb443543fce150de8874afa3ae16046936cd0b87556e533817da68134272e22e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_windows-x64_bin.msi", + "checksum": "44a796c5b780c7cbdf04280ff5fcf88d676a89f11c6c2e60fc8ba02e62080016" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.29_windows-x64_bin.zip", + "checksum": "a4dfb04b42702926933e1c61af6e4c6871b404ef69edc529bc48d10752414ef0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jdk-20-ea.29_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "5688e1cd4f0eb29ff04c98e14f43265ae89e6e961e553bd15054fd8a477a26b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "185f3bf210b8138915d087f5d88d1677ec35fd07f281e36e9272d64fea6cf320", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.29_linux-x64_bin.tar.gz", + "checksum": "7a0a32bec3cfee3d5f4e10550e2f8813a65a5f9e0972f125be1f796c0e9338f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.29_linux-x64-musl_bin.tar.gz", + "checksum": "588eb371f565a7c28a568bd4eb44fb97005ec30d44470f2dacb7dc9dd5ab0bc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-eabeta.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_macos-aarch64_bin.dmg", + "checksum": "3aa1b6d0d111220742d675a3d689e554d6fa4e57d5a6be6b639c83f23664b985" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "c325a4a3c51b31e58ce442ba5b72d3696260b9b9a5209f3820fbdc16fd9222c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_macos-x64_bin.dmg", + "checksum": "349112ff7af7957ccce847da407c6c6605035f86cf0db6f22f6a3ad15ff72955" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.29_macos-x64_bin.tar.gz", + "checksum": "af9b612ef0660ecc4e87ae6e21c2500dca78b862a01726260dc6026ac833673f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_windows-x64_bin.msi", + "checksum": "5f46d8aff88d1497f411acc92ceae90a4977a7067e4973f81fefa2aedab7811a" + }, + "zip": { + "name": "sapmachine-jre-20-ea.29_windows-x64_bin.zip", + "checksum": "a70c227a1cc35d3558f1fb80069c59087386ef6ab9d8952feb595aefb7f44fbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B29/sapmachine-jre-20-ea.29_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "35ae6b9dcdf3a13f8dbb0fdb4f9a1edfa04c41f7820d3419ab42a803c1a781da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "26abc7b1350f43b561ff0582dd525e714a9b0f09a4f2f3dc4fd2704947099bea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.28_linux-x64_bin.tar.gz", + "checksum": "5ffc7604e4dc93485d1f2a99ffcb01cb2eec04d0768ab47f956e52890517093e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.28_linux-x64-musl_bin.tar.gz", + "checksum": "9bde1709ae09800c04ca69a99e5339aa9424f6a3c6d303bd51071f976f8dfa93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-eabeta.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_macos-aarch64_bin.dmg", + "checksum": "98f763fa6c39f489443e3573c6a322c0f11fba0ad650400d264bec9cd56f23b5" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "b891856de84027611dd3c33b7eaa9b62a722b372d3effdb80acd1a4707f4ebee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_macos-x64_bin.dmg", + "checksum": "3c1930eea2c2388c22ab9edfb583301bdddb07c89b07f76196f98a7b24fb9a9e" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.28_macos-x64_bin.tar.gz", + "checksum": "b3825dee9254a8f3af0fbc5d8d77b9f0fb865694fb8ff5473e7d2159297c7710", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_windows-x64_bin.msi", + "checksum": "550c51f057f35a401925e967a9f976311ede2948ec2d56a0f432fb518a6a55b3" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.28_windows-x64_bin.zip", + "checksum": "279d867d51eb7ffcd3da518d6a260ee13da9a4c40885a8ed493db40977108c94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jdk-20-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "2278458079f4541388b4df9d612779ef62dabd54c6f40f45bcb368584d3b68f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "b0b53805a08a31c0a97e3022103297fc7d8a1a186e2c60e28e96ff7e6b108f0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.28_linux-x64_bin.tar.gz", + "checksum": "945ea21dc4fad25dc92648a2105162400a0f5c24834d104f0707755345b3a479", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.28_linux-x64-musl_bin.tar.gz", + "checksum": "ae8ae68d06cd1e9c5275df3e7d4229f23a92309d2007935bd49c970576b10615", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-eabeta.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_macos-aarch64_bin.dmg", + "checksum": "36e3bd67d0c5e1408046ccd88663356c056b170558cee9741431ecb0de55f849" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "df6fb2a13229a967f6f9ffd2b613c811a27d936748556d46c15c2d98a54894ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_macos-x64_bin.dmg", + "checksum": "1551197fdc769ea560fc42f753205604eb992f3218b7e7ca57f80edad5cd1685" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.28_macos-x64_bin.tar.gz", + "checksum": "b5e7ea8aaa8ab8213987dc95485a43fc1a039a26d0aea72e74258418e5071052", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_windows-x64_bin.msi", + "checksum": "aa11237d50ec09267cfeac0b65d20e287fc5d6bd43ca987b1abc9b4b51996a86" + }, + "zip": { + "name": "sapmachine-jre-20-ea.28_windows-x64_bin.zip", + "checksum": "9caaaa1e5de9253a039fc465222381e2a0e9f71d06854541c0ffad59e30ce2c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B28/sapmachine-jre-20-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "67bd1e676367ea21487a753c1a7429b0a4599b9751405dd3bad95b1e10dbda5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "d719cb7b9542ddbec90a6afc681c591f0f08881becf6330f36395c33cefd7350", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.27_linux-x64_bin.tar.gz", + "checksum": "ec1353d0f017c5dd07e24050bfb4c98f2ef0cab79c1752d0fd1bc9e776f19e7e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.27_linux-x64-musl_bin.tar.gz", + "checksum": "03222554ff8db000b3c92fccf296832152ff3e9e6ce3dc55408c7d4d17b52e81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-eabeta.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_macos-aarch64_bin.dmg", + "checksum": "a97acbadfd1605ba53ad4fecd9cb40befb3304d4fe14661cb6df98a46c8af2f9" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "0364126a8c9f0d538cd545fa697efee9aadd61d2e375af01c7e14a4f28124c72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_macos-x64_bin.dmg", + "checksum": "a7e9590cf82f1e6c5eb8d6c7ccc023871a0318d89378244aece36f747d3df257" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.27_macos-x64_bin.tar.gz", + "checksum": "52c630ceb13cfe99f7e1f207497b98e09a2e3bdbc15596c5d31bf6f8c847cda8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_windows-x64_bin.msi", + "checksum": "0ff05f8d56760582350273cf463f297e3eca0a2471ea2828bbbd36111f36a507" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.27_windows-x64_bin.zip", + "checksum": "14c1e086e7e09518916a789a261dc353f84a4dd3a3c7054cd06508954c909762", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jdk-20-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "7a2647bbfff2fa11c42a0f98b469063926c4d987c6b32d531e5f6fbfdbddcea0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "d542e76525bcd3ff3e36a6feeebf8da60f287934067bffd56af399c7b557699a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.27_linux-x64_bin.tar.gz", + "checksum": "094e8f91a8997b9e0e9fabab862abff2236fdc873ed33e4200fa60a9c896821c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.27_linux-x64-musl_bin.tar.gz", + "checksum": "440196b2d0273cca9bcc2777f2330773e1d37b0c63fcdfb9542a5eb936da0761", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-eabeta.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_macos-aarch64_bin.dmg", + "checksum": "ce73803f3aebbd9654bdf117510b3ecef720a7bc8637e45719df4223fa4b8d39" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "3a821990d79a95a56ca0687919b3c5a6a290ad643c58ab5b0e614f59816aa946", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_macos-x64_bin.dmg", + "checksum": "851a9de69b87affa7b3cb4cdc10e9278aa435ec9c45173443b8633a8b431fff6" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.27_macos-x64_bin.tar.gz", + "checksum": "b4fa5cd30cdcc5c63a5acbfb9bcde9bb5292db9dff6f88072a68ddfa8316ecfd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_windows-x64_bin.msi", + "checksum": "00c071c659c7c06d2a32af4100279b132babb2811a805fd5a6af6c4bde24b96f" + }, + "zip": { + "name": "sapmachine-jre-20-ea.27_windows-x64_bin.zip", + "checksum": "beb227827ab71b5a1df83016522e3902a26c864a3ca59fbec36014a843072fe2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B27/sapmachine-jre-20-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "557a37e714711e0ffdb232451a1a96e4e902e0bb12b8887ef738a942ec868141", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "0dc20589add3d80e663b1584f8f7e61c4186bb875b0594e44da3c423dee02ce0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.26_linux-x64_bin.tar.gz", + "checksum": "7c8b70101d04dfe34c0b3b3e05f3d9d4a18ed26ea1d5dfa68bd7f4811ee70259", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.26_linux-x64-musl_bin.tar.gz", + "checksum": "33526b254641bd481d3ba5220232fbe83ac8bd07a3502451b1e2e559ce8a99bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-eabeta.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_macos-aarch64_bin.dmg", + "checksum": "0906100917342ce36b301370ff598e49573c84d0246de3c75f1e4c789f50c5ae" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "1456116f282b11de1ae2a0469d391b5515e63a4edf62550e7d14ca0fb851edcc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_macos-x64_bin.dmg", + "checksum": "075930ca1149e1b0dfcf3da7e1c92626bbd7b3f2125068958c3193dfdcdf8ed0" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.26_macos-x64_bin.tar.gz", + "checksum": "054e146228a666924810e819d3f3b88b8a026ba8215df7d4f6c8b7f28e0e0654", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_windows-x64_bin.msi", + "checksum": "b2b9eebddd17a0d25a7e4da00993eceda02ca5e73d3782f2d8f403d96e9838d7" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.26_windows-x64_bin.zip", + "checksum": "bab8adf6eec56eb5cb456794d067872bd1165c8737760b4ee147a128a4570eff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jdk-20-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "c8ec64d5950ce6b044afc2203d318d7ffcbf7ddbcd93e7a3a3d98694ec96d0b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "f262ddfed751222be98c28f8ac27bf735a59661314a3d9f5ec79b15e4b93b576", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.26_linux-x64_bin.tar.gz", + "checksum": "1816b98a6d9b2cdc62c956d08c6332ca06e5415552002aadb4a6297fd0d1ce96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.26_linux-x64-musl_bin.tar.gz", + "checksum": "b6c837ff38bdfb10a9c9a0b878690cafa22d0339441b9cfc17a04839f091a969", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-eabeta.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_macos-aarch64_bin.dmg", + "checksum": "f605bd043ebe2ac08dd7491d348d190b905f494dba831a12fdfb63c52b9498c7" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "60f2569108f2541eb12152f532bafc2191ff5a7b8e20f6ca6346309d29257d81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_macos-x64_bin.dmg", + "checksum": "d85cf149b64aa824a0dda914c26c7722e67b32c9de00c6c7cf3537c6ec85226c" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.26_macos-x64_bin.tar.gz", + "checksum": "a153836dde3b20da240cb08dded38aa92fd9e959b32a1e37bb009859b7d20637", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_windows-x64_bin.msi", + "checksum": "5bb50f4a33efecf7ab6ba1cbbd76a1d6f4f84d3e6e69725058aaf19921c79748" + }, + "zip": { + "name": "sapmachine-jre-20-ea.26_windows-x64_bin.zip", + "checksum": "fe17b01cb5b400d0aa6118eba908e41b4007fd6b34cafff846026593ab281056", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B26/sapmachine-jre-20-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "5afa2b58753156d44f2f1deaef4b74051f5995fc1c2b2959c50d1c6ebca0699f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "1efc055e2c5bbd20c9f2354e9d774548e4189369237488ed7a76c39c3d9e112c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.25_linux-x64_bin.tar.gz", + "checksum": "4747fcf673b90cc5ea87cbc2ce93b2ef98b8896400d4007f343d7865aeaba469", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.25_linux-x64-musl_bin.tar.gz", + "checksum": "44768618bd571b6dce82aa789817b61f4da9f3d034066cdc07ef88a0b77a6205", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-eabeta.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_macos-aarch64_bin.dmg", + "checksum": "77779665141e81a8d210c1bec2f61d0b4b5806c933d11c54c8de506342bb7d0a" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "04b160d012407242066d4bf2a9a40cbdcb9369a4834f551197f7b55ee0c4db01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_macos-x64_bin.dmg", + "checksum": "cab9efea440d97cdccaaa33162088bbb6fe994e18ad93efdb47e2ad8e9922c7d" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.25_macos-x64_bin.tar.gz", + "checksum": "f60ba48a2c061dd71345d25c84244bf8f60ed6f74ab97c5c99a6d03fd4f5d0b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_windows-x64_bin.msi", + "checksum": "69e09bf0a27d9f86cc917bc62d0829cf83b0f7821757424d5e7541b199d42d8e" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.25_windows-x64_bin.zip", + "checksum": "2f86e85359ef9868a8b81ee41e6cb770c82c59864dd224abff7ef4a96b510b96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jdk-20-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "95eea19fe2db927dd90b81e8a74edc426f0b8799117c73f7b82c6913b9f070a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "f05aa816f507f66db2ff78529c83e194651b37f7e766743e0052a70e10983eb1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.25_linux-x64_bin.tar.gz", + "checksum": "5f57438d9bb17d20328dd2eae80a6facaf34f1efad7e468755b1b67cf5c46df4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.25_linux-x64-musl_bin.tar.gz", + "checksum": "241d4d6c6f8af21a3615dcb2099bbff133ac8bcff47813267fec04750b38ca56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-eabeta.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_macos-aarch64_bin.dmg", + "checksum": "bc676684b8bdc3852a08bff239806a5568830fd928f06972cbebec49861f4301" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "c7dbe45d6e4714ef20090861344cfb31cbf9ee29583f3e07257d1e15c9918fdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_macos-x64_bin.dmg", + "checksum": "cfc2d1e18187dfa92b798df3629b58188dc3112fc741ae89c7d90468b4e7b301" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.25_macos-x64_bin.tar.gz", + "checksum": "0c0c7dbd91ea95f51f7be84d3d06fb9e38bbeff540340c5bcc034a591b3e7829", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_windows-x64_bin.msi", + "checksum": "36fd3aaf17a162133bf547ed212d8ecda0413d014270cd150f3fd97b26af3ab9" + }, + "zip": { + "name": "sapmachine-jre-20-ea.25_windows-x64_bin.zip", + "checksum": "e85bbb0aced6628e716c881f12effa3983c486ae5758980520968ab4007820b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B25/sapmachine-jre-20-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "4d12a096153f243cd5e3aa869a111037631e67ab6ac45120807c900c45534dfc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "fb23e997119c77dbaae447d119255e1ad4d4ae6bb6be5db779d6d9ec6d3b0164", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.24_linux-x64_bin.tar.gz", + "checksum": "c1b11539e75bb7c4e6b3d4ed60fd103efb46371e7f852eb996f50a03d64ed543", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.24_linux-x64-musl_bin.tar.gz", + "checksum": "625f79da1d32140391050f61afeb395274c9026ff12bdd87590064c00ad3a096", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-eabeta.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_macos-aarch64_bin.dmg", + "checksum": "61d24e91d4f4574164d7cde0299f81c303a61febd91f28cf09c7d5c9d968214f" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "e13ef9657c4858c77b520eb9dcdde46c91dc47ec4be490a7937713fe38269dff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_macos-x64_bin.dmg", + "checksum": "cececa0390ed09b080fc47547641ce257192b07b45ac49cbbf20daf0aba361cf" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.24_macos-x64_bin.tar.gz", + "checksum": "129eb538ef8dca4a7682dbeababead8515bb707ef934c72cdd52452cc14b88f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_windows-x64_bin.msi", + "checksum": "ee603690e90a7f85d3a3f4a99e20badf79809b4d591a37368d3166469eaea6dd" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.24_windows-x64_bin.zip", + "checksum": "eb5f656590c0228637998a45cf4a52cef251a8cc6e21e8672c926d44772865dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jdk-20-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "a0f21d60d4b98db4f1775133b1535abaa1948ca4b5fd137b1058a0f915be599c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "b0dff1dff3f5302d480b56aeba41537e1e004b0e29496f506b688cbb2177e478", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.24_linux-x64_bin.tar.gz", + "checksum": "2258efd6ee04ffd76e9bb669ec061fb980564935d41683a321d724ebcb64f8cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.24_linux-x64-musl_bin.tar.gz", + "checksum": "bfbd4621883d3c019b87d8581b86f6c5ec016b92b1c0f135820bbcf8608f4ed6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-eabeta.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_macos-aarch64_bin.dmg", + "checksum": "ae88c3178db2df821c83596d83eeb81a1ed2c443b73c3d5a22f23285e3ae35b7" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "d5e11fc541ee919760ed402729317fc308ad8d526b02c18e7cb3011dfb6b0007", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_macos-x64_bin.dmg", + "checksum": "bc05b8ba8b548647ab0711e2bf85a2506f0cbba7e6446af372a57a995b52f6a2" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.24_macos-x64_bin.tar.gz", + "checksum": "e6a941ace7fa831f946d53eb26ba567ae49a0d4bcccf623241da726dfe83c45d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_windows-x64_bin.msi", + "checksum": "9a5f45c20de2f3cdf9d94d8a7abccb7d5176661b44ad77230379a8130b53116b" + }, + "zip": { + "name": "sapmachine-jre-20-ea.24_windows-x64_bin.zip", + "checksum": "4140bea9faacccc74d3664c72eef1d9ce6a891d0a4e380a3f287dd410820fcc3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B24/sapmachine-jre-20-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "9533e42b6fb41e785d43a324de62f3bbeb6decde6f0e43dc381daf0529ae4c6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "c78edb2c6390904ca79143e6e3bcf718ea13d9770fa44d5e949a1a96a51c38ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.23_linux-x64_bin.tar.gz", + "checksum": "2f9e3943e5d9a59803ba11cc3b82670379a015b0c6dd3b11a556bf586ad171c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.23_linux-x64-musl_bin.tar.gz", + "checksum": "8c3b403048e8b7330b98b3c80698b8cb04a28aff6e07a464631d3f35dc6ab675", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-eabeta.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_macos-aarch64_bin.dmg", + "checksum": "23f3789c30d5eca01ea9cbe8decd53d7dbb25c85a3ad494a5e4b66da75bed34e" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "5e0d815921e84f1b27c3be1fd10f4b36868583ea33b71e2400fa51e58877b4bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_macos-x64_bin.dmg", + "checksum": "a07f30514aa942a2e3b0bca9ebcf8838bbac1ec4aa1fc3d45f8bbd3b6ea995ae" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.23_macos-x64_bin.tar.gz", + "checksum": "589d609887d648eadb2c62dfc76d3a6067530b9f43a5e4421dfb1f4347f8b5f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_windows-x64_bin.msi", + "checksum": "a2222690cd291dd0598553f99751bab3e0e958b58ab974e5681bd24ff4ced1b4" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.23_windows-x64_bin.zip", + "checksum": "d68e2b3aff2fc600a03546f5109f6df143493770d5c45f9565b7509f3be1bb18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jdk-20-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "682588ef96d1e119bd742cb7501010c4f65641e28f585b0674269854987fe8df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "d543b51e482a6d0bccefb64bcd57a8e591778bfe5792ad46c495d2d7913dd5ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.23_linux-x64_bin.tar.gz", + "checksum": "e1dde615950339320238c9341f064617420d7ebc29ded7405d4393b5982aeb33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.23_linux-x64-musl_bin.tar.gz", + "checksum": "13c4f48d7c0713247390733e4e64436e5270ba3351a1054c73fc5644f880438c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-eabeta.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_macos-aarch64_bin.dmg", + "checksum": "27ce21cca8b01ec823c0f58e8e5ed35f9847c4edca2c48844a4567a236ba2878" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "317ae7e7a1eed9e2cb6cb3304d8f0d407965c0bffd1241f1c744f6ba8b878eb7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_macos-x64_bin.dmg", + "checksum": "3a6a3ec5aee2f090065f120a482579a4a8079f38668503479d2ac9abb108592b" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.23_macos-x64_bin.tar.gz", + "checksum": "9dbe170045ae5222c519872851db95e68d8ba60d96ec828ea05d537eddc25dcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_windows-x64_bin.msi", + "checksum": "78b516e2820f7fe74b7722c71979eb17f07a639c35ee576c66be06b724496a3c" + }, + "zip": { + "name": "sapmachine-jre-20-ea.23_windows-x64_bin.zip", + "checksum": "83e2a07b37ee95ff65aa184237e4ac7b697a12d9f09facb33002017161786e94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B23/sapmachine-jre-20-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.22_linux-aarch64_bin.tar.gz", + "checksum": "02a30feee45ea3f6a6e2de968ca83a4c5450fb405456a81bd01032740b894cd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "b21bd4b9266b558763e12b439369a266ae7d6e6ac29a3f574932e7cc79b953a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.22_linux-x64_bin.tar.gz", + "checksum": "fae2edde78dd7d0508bc0f47f2ae82990c2a88446b8f11d6864c9284d5fcb17f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.22_linux-x64-musl_bin.tar.gz", + "checksum": "a77c8d30932e9371000384295a5d20858c3a9d3c2dcca93c2ae0393ec33426a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-eabeta.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_macos-aarch64_bin.dmg", + "checksum": "3e3957a42650a1b55fddbfbb04fc43454991848d297f6b561776d4fc32b3fd29" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "926c7c91069832886fb6770b4a901aabc717411204821e1b06a7f60ae88effe8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_macos-x64_bin.dmg", + "checksum": "da8a03ea6e129e216746b2d8999d9fde39a2573e489b53e1e0ae2ed1d9bd3780" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.22_macos-x64_bin.tar.gz", + "checksum": "06930952fa3ebd3fabaccfea919ade24f49585cbaf4427d49d8029f13633a88e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_windows-x64_bin.msi", + "checksum": "37dab6875b9afb10051798120564aea7a837ba1267e87e04cf44c730a6440ca9" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.22_windows-x64_bin.zip", + "checksum": "bc5d7c92e097462d261f2dabc98b612fc11aedfdaf02e751eb7979f0651f944f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jdk-20-ea.22_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.22_linux-aarch64_bin.tar.gz", + "checksum": "fc40edaf04b08f01a88ad6e7ee2ae89c06aca24f0fd99648011ff8918c1a441c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "16ddf4638922db603f7e70e60f7922c1acd4782d7627d17853002f8cff951389", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.22_linux-x64_bin.tar.gz", + "checksum": "7c4491ad18b8d62d53b6c0dc28b36604dcfd25e7a3965280a504edd511c26169", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.22_linux-x64-musl_bin.tar.gz", + "checksum": "840cc3e14027235fc5fb05628f6210b91951fab5724409b8fbbeb81c8f974f78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-eabeta.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_macos-aarch64_bin.dmg", + "checksum": "197f25dc3e2ccd82546145190ea46d4a0f7f4e6c71fe0ac4a1a130015166e340" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "70bfd2f84ae1f4132cf296dd0c8389006616af9d92f6aee8319979cbb8821136", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_macos-x64_bin.dmg", + "checksum": "cf13254fd780cda203c62d388149e3bd948e7816a27763c3710b50f904052239" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.22_macos-x64_bin.tar.gz", + "checksum": "043aaf51121b5b42cbdfcc21ebebd5a0908ce0c6700764973bd67da910fce763", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_windows-x64_bin.msi", + "checksum": "eeb826ff32baa7d47dcf67423c51030c3344975e1f311ecaf39b735dfc4d0598" + }, + "zip": { + "name": "sapmachine-jre-20-ea.22_windows-x64_bin.zip", + "checksum": "3b0ee43b12d8e1cd1a79e0f8c72c0a63d12bcfef9ee2456ad85925b6cd007531", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B22/sapmachine-jre-20-ea.22_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.21_linux-aarch64_bin.tar.gz", + "checksum": "0a2b747946d93b7e8647903e8adff84d59db1b69a1466683c947ae40c29825b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "1ae28bff8009baf2434de6316026a88e41cbe9e9d8e5b822dd71022b7d29c535", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.21_linux-x64_bin.tar.gz", + "checksum": "008c33d84cda8b90d29eccbefdf79ef37613878598ffe5ec0fdec0f162af44b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.21_linux-x64-musl_bin.tar.gz", + "checksum": "a22a669ad820ded524a14c11dbed540b21b9a9feccb8b09459c6a59da8f9fc41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-eabeta.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_macos-aarch64_bin.dmg", + "checksum": "585c59f3de3f0c151ab0cca1c3d80e764664cdc014e0f830f043f3cd519c5faf" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "bf7b5b9fbb698a9c5b758c6dccce3e5d33a69c3f1837cd2c7208f9bd03954030", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_macos-x64_bin.dmg", + "checksum": "c29913ad34f1d16a4df6063066268076e96989d87f4986d4c99f9346450c6c3e" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.21_macos-x64_bin.tar.gz", + "checksum": "6698496b08862b8de2f8082864bc126edfd5b6f3d1d6f0a30f98f8cf4b5445a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_windows-x64_bin.msi", + "checksum": "f6962cc010db9248b09eb52e390f83f4480d9c03b1dbeb3717bf49c90b667be8" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.21_windows-x64_bin.zip", + "checksum": "9228c52abd7f035991059bac039aed0f2f90821154ab1ca31d65121971e978d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jdk-20-ea.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.21_linux-aarch64_bin.tar.gz", + "checksum": "3eb529e87ac9f5e6c50ad22cefb2864ded3a411d6fb91c15eb85b05e0ea9d926", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "7f5712eaed70c5d5c263faabfeb3a18e231376aaa8a67e0aa6b0e169d6d98dd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.21_linux-x64_bin.tar.gz", + "checksum": "96e27d5d0b0f6af969e225f16317a9f1f89eb1504fbe325758034e795342228e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.21_linux-x64-musl_bin.tar.gz", + "checksum": "f23611a4bb5256568ef751c567a33f8d06e8997f9d03207994d44686ce546dd8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-eabeta.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_macos-aarch64_bin.dmg", + "checksum": "31c0ac2cd84880bce4e0261c4dc68cdcd42c6198b7d2db9b64b902c87bc9f437" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "77ddfdd1d9c8788dde8d357dc5fa8ff56c8c3d80b72848c5a13e69b31e40acd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_macos-x64_bin.dmg", + "checksum": "1419922de0a6067d6a5715abf98b28e2a937b04345193e5b6aa94e1b1d74368a" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.21_macos-x64_bin.tar.gz", + "checksum": "7ba682308610eb57e41b2176478b26640e39da05639c99ba70901daafeeebcd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_windows-x64_bin.msi", + "checksum": "2ba661b1838c68ba4356d84d3ebf73a46942bbc3e0e4f89a012eabf60cd5eb98" + }, + "zip": { + "name": "sapmachine-jre-20-ea.21_windows-x64_bin.zip", + "checksum": "dd96928a6762e7faeb845be6afaa43318478140de69babd05540aeccb0f79507", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B21/sapmachine-jre-20-ea.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.20_linux-aarch64_bin.tar.gz", + "checksum": "b5212a5eff880c46fedae4fe3a106e334112a7dd53f625411c4317831e8da2d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "d41fb6dd28a5e2a66026215413dfd279a9e2c9ee9c5b5227949d60522991ea26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.20_linux-x64_bin.tar.gz", + "checksum": "bb4e89027816cd2ae2fd8bb16ac04c43e143e30f96776446846030bd7614e2be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.20_linux-x64-musl_bin.tar.gz", + "checksum": "ea31b9724007450b3897e6b68b1dcc5bde2d0a8a579bd21f222e4ca00679299e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-eabeta.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_macos-aarch64_bin.dmg", + "checksum": "05b390b53054f7a24165aa0164e05ebdb0c7f0d87bf77c1b5e95e4f7bb788e68" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "a587f4e65fe4cc6ab848b30893669d3b57b9fddd64c756e61fa421474a7af789", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_macos-x64_bin.dmg", + "checksum": "7795cad833a47e393651b34974a73bc0f1e4e56da0736551ca5b9938021ba551" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.20_macos-x64_bin.tar.gz", + "checksum": "27c98a67a2ff435b61d90e2bf29bb0e287804e4c528cceb025e7859c3dc18e62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_windows-x64_bin.msi", + "checksum": "85a0911f4942a4ab9cc2ec6b2e002ac9fc9e5fc7460f52f3fb1aee3455d4e4f1" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.20_windows-x64_bin.zip", + "checksum": "aff535d4160f7aac9e2a026b9cafd36ab966a94b45f9b3fc6d04d92baff0ab74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jdk-20-ea.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.20_linux-aarch64_bin.tar.gz", + "checksum": "310425e7ffa01310c19b573a7b1f4582ff43748a4d23b8b15b2a4a230ed5b6ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "cc6bc62ab98361e6ba3e451674ae3981049c63eb8ed1efa55d833bfb08f17d21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.20_linux-x64_bin.tar.gz", + "checksum": "ca39d5122229242245d330333ae448b24e6858e0cc043c47f65b162fa8c90dde", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.20_linux-x64-musl_bin.tar.gz", + "checksum": "7c94efe55be62b4b3137fa9f417efe3320f72d1f42b0a01643681863a611a263", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-eabeta.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_macos-aarch64_bin.dmg", + "checksum": "b7eb9460dd07e7406b53d9f2afe05bd73ce74dddc746d921aaa934742883f373" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "05a9e3c3c2e4c0561f0f809cde1a67b3510463dcef60ba0ff021e37f5e94f433", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_macos-x64_bin.dmg", + "checksum": "e6da67c01bb3786740d945806dc9e4d128e25ab0ef6ac61b2c33b81771855073" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.20_macos-x64_bin.tar.gz", + "checksum": "665d0f97f83f06e5f4e2ade1a9dab26c4958ed78f430ecc4fd06741a7dbeaf0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_windows-x64_bin.msi", + "checksum": "d01922a4256512b0f775df45ac3f4000caf252e2b9c80d8905e856f2e92cf00b" + }, + "zip": { + "name": "sapmachine-jre-20-ea.20_windows-x64_bin.zip", + "checksum": "e0553059a20c05e8708a632a341dd21f972f1e081ddb0d887eb20b1455a279ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B20/sapmachine-jre-20-ea.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.19_linux-aarch64_bin.tar.gz", + "checksum": "69f46d316804f95eeba17a31dac81f0e00463cb80b5cdd7baf5374a2129172c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "4096d43e6a14f29c4e83f06984a87e6c2af082c5ab99a1fd116a2bd706beace8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.19_linux-x64_bin.tar.gz", + "checksum": "e32d242093038899d53d0387afb9c878468f32bb9487b507b44510674eb8578c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.19_linux-x64-musl_bin.tar.gz", + "checksum": "bc3a8b5bb01b8a7293c988c6d2d9d98af146e07dce6d70240fc4505931b726eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-eabeta.19_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_macos-aarch64_bin.dmg", + "checksum": "926fb8e417c091c013f30209a9eb61e5e38dac8b29160c52a4a28b61bb4f154d" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "ea2002099407f2a17be83c0bc54785d5a9f30ff9d1a92a5bc73c6f1f50f4f8cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_macos-x64_bin.dmg", + "checksum": "80868dc0fb839a9442c8131eaef0a2a1a27be4f065de5182dd9ff0ba88a340db" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.19_macos-x64_bin.tar.gz", + "checksum": "a8e2e12c417c98b84da3e9c02e611d2eb0ff11faa9fc57feed1a9fbe2204fa2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_windows-x64_bin.msi", + "checksum": "c76ea23ea5758292e77f9476b21f17d123e267adf4fd707a48eee1ef51cdf6d1" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.19_windows-x64_bin.zip", + "checksum": "70061326e41c8e7ba8dc3af7c30d563de6ef023870a25af9daded057397dd4e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jdk-20-ea.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.19_linux-aarch64_bin.tar.gz", + "checksum": "cb86bdcb00929a6ad70f3c6d9b469df308b801b4f11912d8c827ade26206e250", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "73ae45a91024e92f6e2859619497c800b232c93ab977a368408917f00ae1ab47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.19_linux-x64_bin.tar.gz", + "checksum": "f847355941c98cea10e7684763032b0a45ad57bfe2e3bbe32f6ac6f30a8ec4b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.19_linux-x64-musl_bin.tar.gz", + "checksum": "98f042294789b04129c755b04c14aead30e42cfad213d4e6918a45a68ee8b2ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-eabeta.19_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_macos-aarch64_bin.dmg", + "checksum": "04f59e98f6b70e40bff59fe429862efcf218ddfe1f2f099e5bb6c1bda5abac56" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "984657f1dbf233179128c0741f031346154e62f7d44b1112aee90a59ebca3a65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_macos-x64_bin.dmg", + "checksum": "91fda027992a91b42be66c5809ee8e52d405d7c61a00d2798d92ef8565661c84" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.19_macos-x64_bin.tar.gz", + "checksum": "d88456322e63c7aa14d23568e6a0ea93dee3ee64bcebd794e819f79c14679c14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_windows-x64_bin.msi", + "checksum": "d75b96db88d6350e22995d8c2be27fb1ca1589aa45f0704993e064ba263d645d" + }, + "zip": { + "name": "sapmachine-jre-20-ea.19_windows-x64_bin.zip", + "checksum": "6d6737f5f4c9cce539ca2271e61abfe11e4d8bc32bc16a093f518c0a58e2e6d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B19/sapmachine-jre-20-ea.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.18_linux-aarch64_bin.tar.gz", + "checksum": "bd97f2a4960f7a2fab252bdcbf4cea403005e23d20af26946ef6a25a28094286", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "e7d4f50e11af5ee64630db97defdeeb9336419cc8472dfa27c09108989da4bc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.18_linux-x64_bin.tar.gz", + "checksum": "4786bffd242b69fc0a56cd0a410edd0c47501c69a94064eb8acd31f4c897ca4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.18_linux-x64-musl_bin.tar.gz", + "checksum": "68bbf38a0e47460e0d54f3535fa2cb05b3b9668b81f9a612c5f570e25474a27d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-eabeta.18_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_macos-aarch64_bin.dmg", + "checksum": "c798b79391fec7e81b92c3fa62c39329f9c53ad5002b23c5da75a7a2437ea306" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "c49358cfe48bc4fa40065f9691fc1f93fb2b2b8e5c4cef2c1b27ab24f416fb89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_macos-x64_bin.dmg", + "checksum": "0ecd1e01572fd8cdd2ff09be5ae5a37ebdc746145839bb16a58605d041e41593" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.18_macos-x64_bin.tar.gz", + "checksum": "880e7bcce1a4824df7eb730d77bc122d94fee4216ba2eb33c474bac338e21ce7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_windows-x64_bin.msi", + "checksum": "0142b127d6b0ab161fa21315c6113b1703e9124feabd94e317bcdb7970f0ca63" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.18_windows-x64_bin.zip", + "checksum": "5ac4091029763062d2514ca8b464413de82f5a60d4c16464537e7c9d7a7c63ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jdk-20-ea.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.18_linux-aarch64_bin.tar.gz", + "checksum": "b1262d083e2700d01c7e1ecb6aaae0c1f686d91145b0a9e7daa5b0b841e4fc69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "2d7f3b4ea3f7e560af0c2cb7e28af8a66e282a037d9b4ee989a9f2d9fa191129", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.18_linux-x64_bin.tar.gz", + "checksum": "60e6a48a24faa8c68ba68e7564e1770443205da89c351557fd6aea943f5ae47c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.18_linux-x64-musl_bin.tar.gz", + "checksum": "45d018013bd98ccd6d71f8b1328aab3f791d91084b884ee14b17794d18041144", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-eabeta.18_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_macos-aarch64_bin.dmg", + "checksum": "e5250254a45f15996e8275df30c13f24db395794a26579f70f715f0e74b230ae" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "aca5ad5e1f01e8da66bb057f18af1b92518658303c4ec80c9bdd143345fbbf7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_macos-x64_bin.dmg", + "checksum": "6fff1cdd7be92c4b8e35242bf9e381f0e1fa4c4d6f1aca7b9b7536853f1da1d9" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.18_macos-x64_bin.tar.gz", + "checksum": "e0c790ecb901dd0461395e8da8a75caa63da5c7a76aefc97ca5109f80b1a97f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_windows-x64_bin.msi", + "checksum": "c582ecbb6e091115c3566970f3d992aa436d3d4f41e68a8946e4f265741e767f" + }, + "zip": { + "name": "sapmachine-jre-20-ea.18_windows-x64_bin.zip", + "checksum": "e4f0277ca4bcf78165d198120eeb4599a7537f0ae5f8320665eab69f862d15bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B18/sapmachine-jre-20-ea.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.17_linux-aarch64_bin.tar.gz", + "checksum": "c326e5513cef8bbeb0bae5ee03473feeaf296726501b95e6975e8f3275c4c118", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "b8cbfb67da69b1ce9b33fa2580823d315cf7f7c6dec93e73e048f26d9ba2bd29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.17_linux-x64_bin.tar.gz", + "checksum": "53b7c5820d3e139ddf136e4bb5ec40e0490da41f5a026e1832ed5dab4ced6f83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.17_linux-x64-musl_bin.tar.gz", + "checksum": "5c7c83906fdd904f92244edd96852b5ed80354a5aa51a76fb635fedac59f6ef7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-eabeta.17_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_macos-aarch64_bin.dmg", + "checksum": "a29bb27ad23add7eb983bc201b11bd46a8f6a9d9e5c3ad29e4fc62498388786a" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "9efe3a22c1e2c71d5026a2d3340af6f3d86d6add65afb54ceaad06d1a45c31ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_macos-x64_bin.dmg", + "checksum": "45864a09c1f2454c0ff3e19be0af422b87a8839735afc3e8f9fd9461ac4c54a6" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.17_macos-x64_bin.tar.gz", + "checksum": "49e634d448bb4c7fc9707510bc9501ada0e60a8795a663286e6271d1e8192d74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_windows-x64_bin.msi", + "checksum": "010fa750b5628f0e59c81d19e8dc50ba71f5408422ea85cfadb65043e72cf566" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.17_windows-x64_bin.zip", + "checksum": "ac596001cdc6b0a3ea05fa8ada40437e25e5481a4cc4f0b5ff9ce366ba70421f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jdk-20-ea.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.17_linux-aarch64_bin.tar.gz", + "checksum": "ada98530df175a8f371243565a4e84e3f42b0341472fc47cec0a60187de9a05d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "b40fa9942879050e60109202b92f714f2ff1dbd9b3bac87c20769c934faae177", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.17_linux-x64_bin.tar.gz", + "checksum": "ad415d079b03bd3121a1337f61e18bfb6bc4cf23dd39a0e8ea6735d7282c6889", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.17_linux-x64-musl_bin.tar.gz", + "checksum": "77249aac40b6995c50bfad69c1db9c5fba95007a15a8f56042e001152262f2ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-eabeta.17_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_macos-aarch64_bin.dmg", + "checksum": "be7a5e72a32ef1b016cc4ce22642d767eed0d5943025ac37b4f877c21f91109c" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "49aaf5ac1c60081bbe28e2b1e98bc673251a3b404a9f1a91f074832e5135b212", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_macos-x64_bin.dmg", + "checksum": "02df72890dd68aff1409ee5c56baa99082c791ea5a4936648f92390fab47fd7e" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.17_macos-x64_bin.tar.gz", + "checksum": "79683c0f4043521cc6c4ead9ef261c8743559fc6bdabf191a736203ec70a5511", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_windows-x64_bin.msi", + "checksum": "8ba98c8b4b430b96d326cdedd02d066f7b69d4f7d6e7d8d1c11a7fc3b65ef17d" + }, + "zip": { + "name": "sapmachine-jre-20-ea.17_windows-x64_bin.zip", + "checksum": "fc6a020d8f013880d1792850a5f9e2f1c4819db6feb24a7dd1692ceef8c8d641", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B17/sapmachine-jre-20-ea.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.16_linux-aarch64_bin.tar.gz", + "checksum": "cc2e3fd6404e80527e3ce66d9c4f553dc5ed2068d21357ef3c09ad499ceb59bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "f06a1b3bc458e86dda932d381d1d579896de7d6c3a7219794fdf0d71fa894730", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.16_linux-x64_bin.tar.gz", + "checksum": "cf8ce10cdcc39b9f7064d1ecc7c3276bf0375f7eaa4619d9610098798e95d669", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.16_linux-x64-musl_bin.tar.gz", + "checksum": "38d0cad6f9e24096f3f32549ef312fa6a44a8b6284eea7c2756d7bee331b1b6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-eabeta.16_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_macos-aarch64_bin.dmg", + "checksum": "4c5e90bab25e15dbc60d32144d5a1ca3ba5de794bd45616afc983500c654357c" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "4a52d4296dc055127c548b39b103b66532a037d39538d6ec8e6486732904034d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_macos-x64_bin.dmg", + "checksum": "26710eb6b6f4d15810633e2ac1865c2c9155767c76cf0807150a4ef6e265dbed" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.16_macos-x64_bin.tar.gz", + "checksum": "a633af5249216a90e742cec2edf7b61fa6127c622716b554639905efef0c4ebe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_windows-x64_bin.msi", + "checksum": "d59f6480f2366e762196927e42ad4178bc5dc554f5532263d834aa93e8bd8364" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.16_windows-x64_bin.zip", + "checksum": "87d7a0cbddd8b41a20a84414ed54b6d40ee2bb6db83e219918c326ddee102b90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jdk-20-ea.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.16_linux-aarch64_bin.tar.gz", + "checksum": "091ad0123542e95f88cf8c0198c307a188500b271c0e9bd9f95b7612ec7e0494", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "9fed673d35bb38817e6750826fd4995c12be60cca59e6823d517e2b0262c3a74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.16_linux-x64_bin.tar.gz", + "checksum": "3189cb0a441e15da3b0967b46ae3af71fce243b3ac91cecde5aa533d2c4b42cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.16_linux-x64-musl_bin.tar.gz", + "checksum": "b39104e137dfed32c187066945afe67f4de9b860f615de998274d1c1e075e4bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-eabeta.16_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_macos-aarch64_bin.dmg", + "checksum": "90987e87a09148ecd515c0c01f0a401b1d0d8c1887a944b27e5962acb97cc6c3" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "ea84fe8150851e5e322ada404679a28d9136ff87ef341fa087c8db9c05167319", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_macos-x64_bin.dmg", + "checksum": "5d90de788d47c965446493234d2e9379484acce70ceaf2ff28e88c14cd69bed7" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.16_macos-x64_bin.tar.gz", + "checksum": "6bd1454175a066a0edb73bab291f64af5e8d427037be5acb5b00acbff61aae5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_windows-x64_bin.msi", + "checksum": "b9753848b45019de68a03953cf5ba01c4138f31e324ac62350cf67bf6972c2fa" + }, + "zip": { + "name": "sapmachine-jre-20-ea.16_windows-x64_bin.zip", + "checksum": "7276d0af753da48410cff64a86060eebfbb1b60d84242b3887d9e1843f962314", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B16/sapmachine-jre-20-ea.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "b7ca45a2eb56c934e3fe197343c7cab63f7b9c3e89cf2f781417f29f2b88e986", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "a9c2e2267737afd2f1c0884a9f418e15550998e24f6b322afa58fd6586265caf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.15_linux-x64_bin.tar.gz", + "checksum": "40c19fa2c61ebdb2e24acbb695c82ec56cb9966ccc251b10718f98b61d66531b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.15_linux-x64-musl_bin.tar.gz", + "checksum": "21d96b587e3ca079cade893aba2329d3e3975e565af36dbcc925d51e613fd22f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-eabeta.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_macos-aarch64_bin.dmg", + "checksum": "3378d77307e6a29e6aca0dd0925994e4f3b4af02a9babb820e19c03db52b2b10" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "69659f1e9ec01df80c092b98cc3b697e7d726cfca615165aecc46b9e9b6030b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_macos-x64_bin.dmg", + "checksum": "933db0b4821b2cbd1cc200f143fb158e6c282324bacf12882023e4f810bf4b5b" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.15_macos-x64_bin.tar.gz", + "checksum": "534f431c6316fea874afb31218afaf7fb1825a5d36b073f97b6ba4530ec8020f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_windows-x64_bin.msi", + "checksum": "e244b83d5ccac5116cfc5e5d5ef3fa1a868a06a465255105e5817baeaf438322" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.15_windows-x64_bin.zip", + "checksum": "baeb4790d7cdfb1d1d8472685533c2c51828452bda630e2ed0bbf4b5bc1fdfa1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jdk-20-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.15_linux-aarch64_bin.tar.gz", + "checksum": "6d0773f17076e34e5c943d125087dab5f0396df5c32ea074499b5f00516459ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "5cb8d8bedb44e038526f2adefa1f4f861667aeedf6f42f9112cbb76c6658d86f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.15_linux-x64_bin.tar.gz", + "checksum": "9847c14e1e33ba2bb8c83892c90be099c1e4181a6c3a7824880bb9c76c046f24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.15_linux-x64-musl_bin.tar.gz", + "checksum": "1863fd2580c84ce395f7ae8d6fa5fddf434ad13c4428673a198a6e3162293e59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-eabeta.15_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_macos-aarch64_bin.dmg", + "checksum": "bcb05aaa5902d599c6a6ffd7c5c5684b071c75b7a1264403a3e879c1a0da5dfe" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "74f65e407916b14cbdee23092f38475743c022f85d8d61177e90fa302df07994", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_macos-x64_bin.dmg", + "checksum": "63a779c05dac34d08478d12c4fc148592d0340032b84d6f13b312eaac2def132" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.15_macos-x64_bin.tar.gz", + "checksum": "af3d0f54d2824cbaff99d43c4212a34d990ae26780b110234c05926eec46f94c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_windows-x64_bin.msi", + "checksum": "477f684fcb5c135cb7cf5938011f44dea159e1e562be75e9d65a10ddd3fc510d" + }, + "zip": { + "name": "sapmachine-jre-20-ea.15_windows-x64_bin.zip", + "checksum": "e4656cb93f2d910b1e5a9422de612b8532c0162a76514631315dac8830bce875", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B15/sapmachine-jre-20-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "e23a470f1c1e8fdee5eb8098ca3d17ea2c05ac4710e7b2e0ed356fd9faa6ebe7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "78ac95759df2e7b6725c01a79c773eb0d268ee5fcee791149ca624354e9e66e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.14_linux-x64_bin.tar.gz", + "checksum": "8431f5c5d584ed8924f0817c57c6c30f0e402d95ee59dde01e5ceb04e8758ab0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.14_linux-x64-musl_bin.tar.gz", + "checksum": "49fc2a2e7d0d315f8104907b28a1a61a053f26beedd2f9af08436cc7f1398a46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-eabeta.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_macos-aarch64_bin.dmg", + "checksum": "a511605c4657adcf6440cf3e6601d967cd5dd22d327a13e2c8526193676cf468" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "4b5eddaf3ff28baa53030cf66eefba68aa4edddadfe3327f3047278fd3854a45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_macos-x64_bin.dmg", + "checksum": "960d672e573c6feaf2e9bea9553c6a49c2caadca350e5fb794135201fc12b8fd" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.14_macos-x64_bin.tar.gz", + "checksum": "ba667a3b63c4b4d005469be88e0415deff0c5c9362430d02f1ddda5155a7447c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_windows-x64_bin.msi", + "checksum": "849ae024003cfb4122de579163d5dcef27d4a5eb941354bd4e49ef653e43c672" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.14_windows-x64_bin.zip", + "checksum": "53d5425f0c91fcb0482c4acda713b714982b449dc3dff4378bb6887b4ae6c643", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jdk-20-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.14_linux-aarch64_bin.tar.gz", + "checksum": "6f1b9bf06c202e45ed2e0ecf9841d5e2798bec98ee0e4f4800c0d549c85bb841", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "a4267b2509fc88bba6c05e1a7096ced4ff849014a8602257b2d277cf0d741226", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.14_linux-x64_bin.tar.gz", + "checksum": "a72258b4934b6ee590d85b91222c5bfabfdd81c053447190fdfdeea4e5a4c82c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.14_linux-x64-musl_bin.tar.gz", + "checksum": "1c39c12f841b8e5ed6931cd918a19ce9c6a76c0098a7a28ffae5188327c6ce8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-eabeta.14_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_macos-aarch64_bin.dmg", + "checksum": "bea982b66c188adb5417ce627289eaef37edfa9ae61c9c93d80e3deab6648456" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "03e29cec9671a28a4cea0d25a329af060e32240cd4d78ba3ddb0e06660e4651d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_macos-x64_bin.dmg", + "checksum": "5705db5db123f8953b6d285d424a366af3c67098baf2aa8314b152db9c834582" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.14_macos-x64_bin.tar.gz", + "checksum": "15c1c3a98f0e83e5faf39f9679e9aafc0af8a5bbdc99f9956bf949af3bde481c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_windows-x64_bin.msi", + "checksum": "5ca3bf354338776141d8af47ee6c8673fd39fa01e4574501b771ad20dd34a074" + }, + "zip": { + "name": "sapmachine-jre-20-ea.14_windows-x64_bin.zip", + "checksum": "56e8037e49132bb3ab59a719919db76fbb1297cefebb4b118ce1b5c0708e7dae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B14/sapmachine-jre-20-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "44f1451dfcf496ab4378643eb0ad30ae7c46fac2c1ee6f53e2af7f025b9269c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "289509cce7168a1fc99cd7c21e8877051c00bec16d25fc94af7b4ada02865613", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.13_linux-x64_bin.tar.gz", + "checksum": "546bfe89b110d0a7616b1642c85045eff87eb906d03f03b126cbacfa38eb5e11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.13_linux-x64-musl_bin.tar.gz", + "checksum": "7f3dc049ea63b70d4510d37006a3c9ef97284ae04a76e2d5090345c71cdc0126", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-eabeta.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_macos-aarch64_bin.dmg", + "checksum": "6b2ca6fec29c65dada57585c11e356732898c1fefb6af15fa54e2301a5581429" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "6f7496821d3359abd175b582fe4c6abb665675cdf8f0a5b368921df9f946de49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_macos-x64_bin.dmg", + "checksum": "702ff422dc24fd347cb06b285c02b56363c843d23d62f9571513f59e536d869b" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.13_macos-x64_bin.tar.gz", + "checksum": "fe480988c1d5e57dd18b1b8b3bb5ac08253ae8d58f6b35529f3114afbf537f52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_windows-x64_bin.msi", + "checksum": "6196ebd09c275b2dfef575b8f13595e7d94bf559aad010db44da07eed4a97a62" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.13_windows-x64_bin.zip", + "checksum": "755af6ef348fdb69a6eca66a5a6a2a565c9b1fafbc701b2068dcc15273fc22d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jdk-20-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.13_linux-aarch64_bin.tar.gz", + "checksum": "16d7a890919510ed8091fb59ffaffbdb9cc6bce9b881e82c97c4f9477989b23d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "b2ec77132d339ac77018f2543457adc59926c2c900af79c02b13d88ce4f0d4c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.13_linux-x64_bin.tar.gz", + "checksum": "3c507810daed567c0f897645efa85e43025f435aaa8c32d078405e6cbb0c9b07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.13_linux-x64-musl_bin.tar.gz", + "checksum": "ef1a6d4ec6094e5d7690b225c7d5380fcf4727d37b2622bcc1b1df0d16aa752d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-eabeta.13_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_macos-aarch64_bin.dmg", + "checksum": "2c0615e6e429af11461306163d3b7de03ae584d1423d8e74c357b8090bd39782" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "66d2b599b876f71c57f1c1559f52aa18a3b0b45d1160540c8df286c8dd09330b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_macos-x64_bin.dmg", + "checksum": "d6ef6f9041d1b716b93639cdc3e60aec8bf91670d61a34205f69075656676364" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.13_macos-x64_bin.tar.gz", + "checksum": "fa49661afe14f6b8d23566ee4b5a580124913bf3a6e20a3ecbba03a9f7447847", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_windows-x64_bin.msi", + "checksum": "08939147e82e41b2b50d14c5f99914027702361fa3d5d1deebb8922b07071003" + }, + "zip": { + "name": "sapmachine-jre-20-ea.13_windows-x64_bin.zip", + "checksum": "c8c73d4d67e12c0d022767a8b7ea1df50ed029595dbf98051cd602a28c3abb59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B13/sapmachine-jre-20-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "57a7fef060cec41ba3cb1fa510a48feb1822768a3cdbc32c542f9861f5bf4c4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "ca8cb10f0815b240f82d058b3a089a978c36928be050120c309b9fcdc19cdeb7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.12_linux-x64_bin.tar.gz", + "checksum": "01f13c8ca8abb1c86fdc64081af8d5befc6ae25b7f8231b43d72159874cbeca1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.12_linux-x64-musl_bin.tar.gz", + "checksum": "beb953027fc9845bfe0d12e3f0192fabfa94b7ce0db786477bd4fd4bfa4720e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-eabeta.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_macos-aarch64_bin.dmg", + "checksum": "45d4b174c884a45c0d4686dce3fe738bc83d73cd2922469c654d80bfd1516334" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "06d54082acae1c422444c3c7587fd292230a1b7255041f1746df86475e611736", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_macos-x64_bin.dmg", + "checksum": "a7f14cb6327b4a601ef3c471c4d1661b487a0936f544295b4fc293164d60ba78" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.12_macos-x64_bin.tar.gz", + "checksum": "aec9c60f7f9d2f212390e07ea2e2855ab670ad3c9bf462fa1f6baf44d7083871", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_windows-x64_bin.msi", + "checksum": "c623c8f81f699cced70d8d686f8b4a87bbe0855937d9656f19633555b11bb68d" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.12_windows-x64_bin.zip", + "checksum": "64a19c076a230c622ffb8780ff2e68682b151d746ebbc4dbca53c69e9140ef65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jdk-20-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.12_linux-aarch64_bin.tar.gz", + "checksum": "d788c727c082d6328c4a97691efdb402f3e16ad9d5797f328f684b8f4cecc908", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "f7255f2b8e14b401264d2df34761c5b649400be0fcbbb12ddcb9fe8974c110a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.12_linux-x64_bin.tar.gz", + "checksum": "f36de0c29798f2b408ab1ef274f11a26b78c334502a8fe1d04a92a0bca8b0bdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.12_linux-x64-musl_bin.tar.gz", + "checksum": "932dbf5272839fecb16f529c8d4d9fd617f6cdd7bf5f47d3a13e59fa715e6660", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-eabeta.12_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_macos-aarch64_bin.dmg", + "checksum": "17d75bb90145f1d3c6e75c29f1f99aeb556218d242bdc48de09ef0b068974511" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "dde5ac28220833fdbf1c20496afd79f68003a34530dc356cb5760dd32d0fbe68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_macos-x64_bin.dmg", + "checksum": "87dac0522ba82c450e4a98721bee81da514e0f9b08cc76f2b6d4bb69dfc87835" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.12_macos-x64_bin.tar.gz", + "checksum": "05d21e7805af0ece571f4c049d9c141befee5dd93edc20fab27bb07896250c05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_windows-x64_bin.msi", + "checksum": "8722f36365aa86b79d3c2830caf966d6362f4fc2ba58f1606c2e1073523a5e3c" + }, + "zip": { + "name": "sapmachine-jre-20-ea.12_windows-x64_bin.zip", + "checksum": "f55805ffcef28dc10df4e86aef88dac3e969b4a02e6adc03299e80d0f64acd97", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B12/sapmachine-jre-20-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "bdeb568cd1ae61e1422ea3cd5655547892e96ba33184c22b4d25feacaff8046f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "3f2bfabbccc57ed051818d5af80cfe2155e15c33d025716def2cecabf7e3fc48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.11_linux-x64_bin.tar.gz", + "checksum": "7ca3b52a2a64e8bd869bf7edea99de5ec86bc9f452076f2e59f7841f7cfb8d62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.11_linux-x64-musl_bin.tar.gz", + "checksum": "abb383842973abc6ef579800789ff5b824b60439c623068e7d148cf678a086a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-eabeta.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_macos-aarch64_bin.dmg", + "checksum": "0000ed08a6dd1703ad7ce4ba567e1c230ebec6a448d7629d7f7bf5e89fadbbcd" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "48c7fff79ea891bf66a41f476be6bbcd9c6e3be1565215be7c78c499b3726d9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_macos-x64_bin.dmg", + "checksum": "bccc76a3b47320c100dc3a9e9988de303000b2e17ba971e3736cddaa7d2a5441" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.11_macos-x64_bin.tar.gz", + "checksum": "0544d24869cfb178314b9435cb431815f61b4d590a456ac48d850536f47679fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_windows-x64_bin.msi", + "checksum": "23b7010cfc770df84ae4e95113164116aa1c46e36e2388110513e8878ac2325b" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.11_windows-x64_bin.zip", + "checksum": "71cb066f932821267866b6f2c1a2955ed4a01ff69ba1a7edce79aeb977b8b46a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jdk-20-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.11_linux-aarch64_bin.tar.gz", + "checksum": "cfe9e4dca46ead60a8abed2274b51aa758fb701e1e3cca2d0a7638bcaece395b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "4e175f5b8ebefb5584bc745f7d2a26d3e4bbffd0dfa39813832ab07ac1f165ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.11_linux-x64_bin.tar.gz", + "checksum": "9bb36b631db4e883880e27a892e1a2cf4f03558c641b8ca92909226ec69ddbac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.11_linux-x64-musl_bin.tar.gz", + "checksum": "f2ec42d7d96ba35f8adb797955f239f879f536391960b6176238aef70a408530", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-eabeta.11_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_macos-aarch64_bin.dmg", + "checksum": "f7b12f27c838675ad63aed0380b4870c6b7b149c3ef22e6b2a527d37a4d84903" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "bd4fd56fee0e4adcc5ace0bd0a7e7fccdc68d91bb423cd24fd6a2157cd6a0bad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_macos-x64_bin.dmg", + "checksum": "a1884ca2f1f187f85b3fdb43252943f8af92e31b1e4dfd92e3a0d0ffb25fc32f" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.11_macos-x64_bin.tar.gz", + "checksum": "ee262037567791184794285b940c7a4a625b97fbd01dd4a66f65c5d27642d8d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_windows-x64_bin.msi", + "checksum": "7beb7f183abbee7003efceb2ed600024cc643376ac1d543a6077d82e35962e24" + }, + "zip": { + "name": "sapmachine-jre-20-ea.11_windows-x64_bin.zip", + "checksum": "bab00d35e39aab5fe0af0d89a1c9c529b3b1083b980581ad7a2b3405ae1340f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B11/sapmachine-jre-20-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "d348b955d792973a301e73a9d0888225c4cd56477787b774acef0c0265fdcad8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "8b6a9fd223f5d969187a39e469a26fef177ffb601ef6b68d41001a38da5c609e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.10_linux-x64_bin.tar.gz", + "checksum": "41c15e475a9748fed6ed91ad73d7af97f2d3b5676e082b149a210551fd3442fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.10_linux-x64-musl_bin.tar.gz", + "checksum": "d8a966946de8e6675796ffcab04726eafa6f14cd70ec590e4c48bf9e0350726b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-eabeta.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_macos-aarch64_bin.dmg", + "checksum": "75d3d306991f1da79dac2ed9b9701ddbacbc6461ce1576fa971527c4d3f53139" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "4ecd099c3869d10e002572664ccc30f9f4a834ca988519abe9088ab68a87bc1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_macos-x64_bin.dmg", + "checksum": "771defa16ad06bb886c28b7ac31b34ff4c3a9f1e64e69cd9ae96b92b2d20f83b" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.10_macos-x64_bin.tar.gz", + "checksum": "9a57500db57ba0da24996f045616651f36cf64f92be92906d9e26889cc981d42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_windows-x64_bin.msi", + "checksum": "33ba1269107f5e531a13a6a73f21d5bb51264780df0c43ec6a1f8f471fca1d75" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.10_windows-x64_bin.zip", + "checksum": "a26c7254dad72c89c8ecc343754f6f0cdb1e60c40d49d3274c0829c1fbf0c68c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jdk-20-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "49dcad8de9900fcfb805f407ff8cd74c5a8fc5f1a3bbc358cc3260e8fc7ed7dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "e88ab4c76d49d2622e25bfe549cb1e4972509031cacb57cf8064e0db773d8ad0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.10_linux-x64_bin.tar.gz", + "checksum": "807fd4ed51104a501143deef7066fc8c786f9fecac8c575f7cbff4f80d5de591", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.10_linux-x64-musl_bin.tar.gz", + "checksum": "10e60db36ab8c7fcbbd986cbaaf4eb9d50ef5a98d523dd292d3c4f4208ed2e07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-eabeta.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_macos-aarch64_bin.dmg", + "checksum": "9dbef0a90c8f12df762cb7a29e4b564674e7406d6dc4fba0ab2f9d932eddb435" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "366539667ed6e86ee9b8e5f718900b43d23cb125f3582e67e057c9fd862816dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_macos-x64_bin.dmg", + "checksum": "a3a1b51618e8eda6d42353f9f61ee4e750fdd567b31d277cd2aad6a76e547d0d" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.10_macos-x64_bin.tar.gz", + "checksum": "18656833e100e7d31908e75a1316a53a0485de8c7d63fe7c0bf0cb8e7dcc6f42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_windows-x64_bin.msi", + "checksum": "c28920c02115ad596a45741240d4660fd4c73137b30b5cb07cff6dc31c80ef77" + }, + "zip": { + "name": "sapmachine-jre-20-ea.10_windows-x64_bin.zip", + "checksum": "bd911c9ad7a4a00ee0e0c1761f4b0a7ce411547bd9fff8090c110755f7c0f568", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B10/sapmachine-jre-20-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "822979460b7f4bed38deae5b5aef2f3109f9431346999e99b6b9fa3d1ebbf189", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "88833b7ec1d1e8b09066f200c752d273472089a40b3396f5a872f47b646ebc62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.9_linux-x64_bin.tar.gz", + "checksum": "e9b4c37da35371223bfe72e4d84e45a574d98938f4fbe7480826726b07047705", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "048acb30666860831bcf4d41d52aeaefcd2514b6879730fe8999f2a3a6c86ede", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_macos-aarch64_bin.dmg", + "checksum": "49ffd34bcf4bd8fdf6293f056132b852b7a4c2c6dee1ba9d65f109d070d68d20" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "8199da586950bbee0cdf206f5c3123ff0de4a7553511920753f57960dee8230a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_macos-x64_bin.dmg", + "checksum": "bdc26495bafb9761734ab61834841c34c17da9c1ec7eb49863720cbce07d1c69" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.9_macos-x64_bin.tar.gz", + "checksum": "58017bf484b0a05a9e1a44370df2a7f97ae01a1f779f271e5853381c6b9408fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_windows-x64_bin.msi", + "checksum": "5ddec1b790cdcff1184b5c7a6f1db4c9ccd08a6c96b44b6fbfc248d1780adf23" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.9_windows-x64_bin.zip", + "checksum": "cfeba58436162c632ca0e23228256f0c321eff7b56ec932843df4d593bdccb77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jdk-20-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "6cc4be494984b97d1ee90d33875a3110787a2e436c0e3635bbbabc932777f630", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "c5eae7685eca81d1437a0f65871baa240e731b5d69b66eca0975a19fe41f0caa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.9_linux-x64_bin.tar.gz", + "checksum": "9ad8a58f791bdf89589a43e652779f8c1f170b6a4e542da69632ba22eeb4b093", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "6917b6c08c3093a31d01f04e07f2f2a5310861240244bd6c898ac699097d140a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_macos-aarch64_bin.dmg", + "checksum": "c2904ac15f3680354ee8e474db8552ced6622ff0cb32f342922463b0f1adbd12" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "ccab311aa163a7aaf3f0f46ac9ec37193a25b9c92487a7c38335d914625fb9ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_macos-x64_bin.dmg", + "checksum": "88f8efea1accfc88163d73398882bed2910a6f187e2f52299f96bcedb535bde8" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.9_macos-x64_bin.tar.gz", + "checksum": "960546fa3f07a9428227850312f60a63f94fabe233bfc0889ae6f9361578cf06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_windows-x64_bin.msi", + "checksum": "167f263f62c25afdcf608c3a5ee64fc5d18e0c123a64e56f86d01baa9461fda0" + }, + "zip": { + "name": "sapmachine-jre-20-ea.9_windows-x64_bin.zip", + "checksum": "94badda10025faa1b0bb3ee7797f403c7b8356d32d1f1580389302ec6c156dcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B9/sapmachine-jre-20-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "8410100ac6715fa67e48fde523a99dd313222e3fad8c786e2232e9acea86891c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "6516bdc2756f1895606848a6ae9da2e5b50e58beb062b574ff585f65c3d45284", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.8_linux-x64_bin.tar.gz", + "checksum": "c588d30b5d2747238c1bbf7e0a45eefbf76c918f19a73f05e7f5d48d687d7319", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "25fb9126fc46c06534540b543fd935a8fa9c9f70f59c99d92ed357c1a3e6adee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_macos-aarch64_bin.dmg", + "checksum": "866f3f0ffa5f32ca9a234945a2bba7b08ef3e6abc26685d95cfaa2f749af709c" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "6229c6aaa255cc583d18a2552c9ab7b18e882b53c6c40aa5fd445795677dac1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_macos-x64_bin.dmg", + "checksum": "0b267e75d481d56f2d54a881f4421f04c73881437cb264697ee076c1d2268cb7" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.8_macos-x64_bin.tar.gz", + "checksum": "57a6a950a4122bfdf153c60507e6c5d8e344a6fac3e7f2f06453a620d837136d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_windows-x64_bin.msi", + "checksum": "7078766662be07a48c94eca4d1f8c7eb188351fa3467c4534f0b16d10cebdb04" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.8_windows-x64_bin.zip", + "checksum": "d1769dbe5e031ab43f581653f63f8963388afd5aabe2431f4d81df5d900682dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jdk-20-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "3662a1e8a1e5a4b5bc6fcf0a95bc959c7eb4e6c86db714966accf74124433cdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "b64e0d615a664f114d9bce979f536af001190e3d02da80de7798448a3f5c5698", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.8_linux-x64_bin.tar.gz", + "checksum": "bcb6a0fb989a21ca5c1c9929c9da2a2577ccd4fb7a1823e9f22d4788d3986a6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "fe4872296202e04487592c53314821d7d768474af7167cbdfa5bad8dee675a6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_macos-aarch64_bin.dmg", + "checksum": "9189a7b12da49aa42cba7c8a9aab698ca6ce312bd082ae89e7e4f656f33d2f8c" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "4984750347e5e674d28833ed71d9121a7278904aafa4400083d767aace20e6d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_macos-x64_bin.dmg", + "checksum": "456ce8cae46433cecd62d260a3e4a3f7ba08bf0a389cd7117685fcd539ba206d" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.8_macos-x64_bin.tar.gz", + "checksum": "17e3078594b7f54198a45bc1bacbcfdad0307b44bd8aac74b1b8043ed3afb204", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_windows-x64_bin.msi", + "checksum": "fdf2e67bdd21d50587e3970e6a1fea31478ee82ca5f2c7e20a375d9e28e9c4f2" + }, + "zip": { + "name": "sapmachine-jre-20-ea.8_windows-x64_bin.zip", + "checksum": "5d54232d97bc94184d48e3198bf55029567e597d9ea04be28358e095c3628e49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B8/sapmachine-jre-20-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "5517e436484c868f28c5a3dacf04bb79d356152ac4db0c23c160ecea393dba4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "df37d66a048f52060b92eabc197e6d1c6cafdadaf16211e77cda91de61452756", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.7_linux-x64_bin.tar.gz", + "checksum": "957b2388f6a4b05e8fd5bb4aac15c9b20d251f6ebd71a7724f480b3f36cc42f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "aea7e2b4cd357b772d69df539abba520252dc728705790db4681fba9daf8ebf2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_macos-aarch64_bin.dmg", + "checksum": "ad2b03ba9fb6a1d50696d14a6259ba41401c6b167b7801c2db9b93b034ec12d4" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "03b585c1dfde3913ccd479a3de278d82aa53d3c0878756d063956ad4677a20f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_macos-x64_bin.dmg", + "checksum": "fcbfdc9a8c6ccdb65119e68a4fccdac0afda67c2bbbb5c123a8109c57b5a16d4" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.7_macos-x64_bin.tar.gz", + "checksum": "a3f500ad86bd7aacd12ef8300c90e26087b1066e65b27e059a3f0a3ebe827d17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_windows-x64_bin.msi", + "checksum": "6f90c135133a8c07bc1e18aef1b7d3ec7bd492a4cb272c13448ab7ff6a0b609c" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.7_windows-x64_bin.zip", + "checksum": "9cbb6046024449e68101253ca9ebac59f9dd14e8460fdd14902f175750c1c0f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jdk-20-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "90f5cce8d47de51d8e4cc4ba7e72a028d32eed8c64d57e6dec148976a43268bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "bb216cfbae139448468609d54fb181d0a4d1f9a36aa9c95e7503d14162793f9e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.7_linux-x64_bin.tar.gz", + "checksum": "297376660a07906520bdd2fbdeadf42663bfa2fe725a49e587d0c9e7884b268d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "708dfecba019bc3f1b535c91d4c4c61437f79642a24ccfc2dcdaaf1ebed291e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_macos-aarch64_bin.dmg", + "checksum": "9746116a0525ebe7c78cbdce1c436f1c94bb53b8e4e2a98adb61a21d6fbaa01a" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "534682321959c3889537385ff1f17c9fb1436208d654a2d75575000b965fb756", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_macos-x64_bin.dmg", + "checksum": "f7ab0969347f034b2b37549ea38d3fcb4df2cb9e9d6e5babe25225b797c75a3f" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.7_macos-x64_bin.tar.gz", + "checksum": "a060d29adb6532e3af98abeb0f580b9cb1f57ee8ba1aa6221331822b01aa4297", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_windows-x64_bin.msi", + "checksum": "15c0af85b407d7aba9b4a9739ffbafaeef28da684d4c0a0f55fe2bad3fead54f" + }, + "zip": { + "name": "sapmachine-jre-20-ea.7_windows-x64_bin.zip", + "checksum": "0a5d34072712391db18985cc23f91337a4f1fc065343e2e273165d4649f501d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B7/sapmachine-jre-20-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "bcb708de672e3c6aa0b58ccf5b49296d15b654447af363f9925cf53a3760a584", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "e63904684d0d388db32140066c83b0f0e2d4583e53e16fd0c5ea353c0540b2e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.6_linux-x64_bin.tar.gz", + "checksum": "3e8b3bbfe4c4c4f4c16c877179d2622392871b946881bd52070a1f33fd03ce5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "fe588f90156f7772b87b00f0df0ccc07ea2f03552887d3ba93efdff4bb45f303", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_macos-aarch64_bin.dmg", + "checksum": "f948baf4024af03ab23bf369b83abafe7ae03ee9d4685489652f8dfd25bff51f" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "74ccae002a1f375997727822457bf61907ba84b8ce50f715f95d63b7a82a2e43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_macos-x64_bin.dmg", + "checksum": "ffd25f39a661fdbf3b79c15b436be681e779ee9e7a6d2e9368be39742cfa8d61" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.6_macos-x64_bin.tar.gz", + "checksum": "4e244de1b886ab564e393603773c7cc105149bc4161c9503576654de79bc48b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_windows-x64_bin.msi", + "checksum": "9e407fa1c5024cfdc15e2df68c78275f5153297c09cb21f5e64c5d09e788bcbd" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.6_windows-x64_bin.zip", + "checksum": "e421db2c2cc0c4aa095c63f18ece2ef7b0d4b3a44f38fd06c2c146311d2374ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jdk-20-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "8eefa4db1ef3aadb07f9b030eaf8dd936b84b3220ecfd90b49bef71ecc782983", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "44f7348cab6fef6c87a525bf7ea27de3163ba6da48059f6988ad04c34ef0909a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.6_linux-x64_bin.tar.gz", + "checksum": "c66227293fe82e9529d5f6828552d8df25ccc204c47b880e56d95592824f8714", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "2b18b79840d73a28c4f4ea289be3bcff86b098c8fd68721b6fbe3ce531c3ba88", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_macos-aarch64_bin.dmg", + "checksum": "f5ab2d4939e04d1bfb6b5ee67e449bf9a86e2cb2d881e2f9b8bbbf0abba89e91" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "b8f495cc66548c94eeecf3b3299d8bc0a8ae55ede5ac76fb797697e960b14cb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_macos-x64_bin.dmg", + "checksum": "fc26b787b01ba02114bcd2bde562fd21be5e392b194d5257d2f6dd7d7ecff6b4" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.6_macos-x64_bin.tar.gz", + "checksum": "d6a69413d1080606002bd1c285e3744cdbfbe9ad10fcdd98f8d0f9905bdf5057", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_windows-x64_bin.msi", + "checksum": "d08b2f7775492ad5a69aa84c89cc9e1491a17505f8f3f2fe0b4601b693a7ae95" + }, + "zip": { + "name": "sapmachine-jre-20-ea.6_windows-x64_bin.zip", + "checksum": "3ef854ad0e5e5f9ed096a795d674448000c2afbcbe2cdec0b0ffc1586b648b62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B6/sapmachine-jre-20-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "632de185a7ebbe641edcd7b8f083a80f314431ce1da1266af321391fea444cc5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "46a3d2d93e2f906b3c5677c34c0add182628deb244928f3ea14bd0ab51634291", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.5_linux-x64_bin.tar.gz", + "checksum": "447bbfb6382f64b0262744dc7c0c84b12d9470d4bba474d83eda50e72a6e8865", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "9fd709862c4a5760a77614e95c8bd7df297c97d14dd2cc14568ff34b112f4db2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_macos-aarch64_bin.dmg", + "checksum": "309bdbc9d88462eca313d60a8537a142a0a963a09d6539e6465e120eb00eb719" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "4d2739108e2c80f0c8840ad4d60887c5c6cbb405e8f89c4d3f48ef5800a3100a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_macos-x64_bin.dmg", + "checksum": "54014cb672931b2df9fc358ef0c9471e6c7452555df92025f5a6b4953051473c" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.5_macos-x64_bin.tar.gz", + "checksum": "27a7e1f7a0dd2a428f983934ede571460e459f9129286f25182ee8070ff9e631", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_windows-x64_bin.msi", + "checksum": "d64c3fd1c52dd481afd7cbe282e3ef86392a38d8565ce9d1c5c0f0cb7c7b3709" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.5_windows-x64_bin.zip", + "checksum": "cf844b9498424369ddd7939f6caa0002b17500ff104474ad8b3dcd0bf2cd43ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jdk-20-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "1a73b3f061e1de9d44c68c6b4e701b1128e39edef8d3e588fac48436be4220e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "27139f3cfcef8d75ba7b1e6b9c8803dbac7310a2d0bf546f64a95be4e063bee0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.5_linux-x64_bin.tar.gz", + "checksum": "0f48f91dfe52fa2e42f2e9a25e73a4f986b74af2ce5c18710c8139b181d8f028", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "8db41a644da40c998388e34e861c780d30cad55ea5901025c2cb72d53e1d10c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_macos-aarch64_bin.dmg", + "checksum": "07d2ae2ea46bbe51dacdfcd11048bdeb80acbf2a3025ba78de65d74df506b500" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "b8cd38d3f8ca1a09d9ce6d56478ebce4c1915cfa63b968f085ceb73e1b749ef4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_macos-x64_bin.dmg", + "checksum": "5fa14c11c52c0a28d09f4c4311e9299b6d1e556d9f6149a80ebdb5408d07dd20" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.5_macos-x64_bin.tar.gz", + "checksum": "99e58f8ab48a48f247b73c5a5683ff3d54f8e2b43a28bf1fad9b6dcf3eb79a30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_windows-x64_bin.msi", + "checksum": "abc726ada21b561b47292e3122045f9603c426337dd640c7f127d8ed0b965b11" + }, + "zip": { + "name": "sapmachine-jre-20-ea.5_windows-x64_bin.zip", + "checksum": "eee2e902bdd4054c2d3fbc88093f5be46b804f7575a87734dd593329f14e237a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B5/sapmachine-jre-20-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "a71a220ee14e0f7f283591766277e6a8d2f8c39659304099aa641169482800b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "eeb2b6cfa17170242075eb372a071c3e0f6cec47e0305f64a2defa00909977ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.4_linux-x64_bin.tar.gz", + "checksum": "9f3a0f14f9874452fae4195fd19f81558c373196cc9e2794a2ca03c69975dbf5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "cdefcd8202fff3c366c93f575ba616a3514581e9ec553dc4748e8b5611b87a8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_macos-aarch64_bin.dmg", + "checksum": "d51deee5432ebc54790c099fa77e423569c10eeb4b3aaa882d03adbc70e7b219" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "f11a50fdfc0e9601d677740eadb0ed0aff0fbca33c396d54658181fac7b32d55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_macos-x64_bin.dmg", + "checksum": "db858e81d7eb859bb14e140bf40cb2f7868263a9da1fc68f869799d52d5a9ce1" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.4_macos-x64_bin.tar.gz", + "checksum": "96752977e7a7907f711cf819020c28ea6820067d9a900198b2c4dc3a8aa9de42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_windows-x64_bin.msi", + "checksum": "54970768652ac8766e4b9b5035756c834ec3a176e512b7218ce7ca56e58bd067" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.4_windows-x64_bin.zip", + "checksum": "6720cbe96d81a1bd7d5504f21cd0d20c857ac73d468fa41ad60f6854bcba2d6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jdk-20-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "683856a9200ff254a4a3e35d79e0696fc6c0af455a69f3e67223fb1a878388b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "66b53e8ee317146b7c5b0ac1a55f14df4d3168827d79b37bce56970185679b96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.4_linux-x64_bin.tar.gz", + "checksum": "502db421e0a14fb03b473e098cd344216edf97688e09b407c8bb9fab2449e434", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "7a90f3703ff8a04bc08128bb4695b483498134e30abc75e01f8149b96529b8af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_macos-aarch64_bin.dmg", + "checksum": "383a9df6e084c0a26a7acd674de65f4df5e22abb0dbb3950eae9806b3b978921" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "c3cfc4fd3b42c89b6a60f1838fbed0d7891939ecbbc5c760d9dfa603b53e85fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_macos-x64_bin.dmg", + "checksum": "8ceb0f0ece16391b40e7f5daa1f0ac83b07ada6c6d68334dc77c4f4ee71bfc30" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.4_macos-x64_bin.tar.gz", + "checksum": "b68b0ed342c0019e64b996f052c735a4aa7f729f398d791291f34c754f1a1c39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_windows-x64_bin.msi", + "checksum": "cb0efe876c1e51f9c01ef8d33747c46805a9d3234ff6d19fc0ebc6d27e36cbb1" + }, + "zip": { + "name": "sapmachine-jre-20-ea.4_windows-x64_bin.zip", + "checksum": "c82587ce140ce49d3cfc299a2da9280950bd1e6fabd3ef26496f6467a41544b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B4/sapmachine-jre-20-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "bff89c12fdc1c49d3d2742fd5916f1958cdaf4aa24fe31d686223b4691d1f878", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "65ed3f0b662e35a8a5cbe81fdb79c4e7fec3aa4e8c19c24d800c5bf5967ffab5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.3_linux-x64_bin.tar.gz", + "checksum": "8fa88f77eed335f8a13bbf1aa08111f55aeff2cc5a5b02357a1bab96abf86422", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.3_linux-x64-musl_bin.tar.gz", + "checksum": "ec59bec893492336cfc242193934653deeef2b1a6d8a8b996047bb4ff181a5a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-eabeta.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_macos-aarch64_bin.dmg", + "checksum": "908dc393c71fffbff7d796fe326a0b5d7312d79ab4be94ab5f9dfe09f518f0d8" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "383c50d664eb216693e8b0840da431b5a94a61bc476f9ab4b6ad4b6796183083", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_macos-x64_bin.dmg", + "checksum": "3c742be039f83a102f9138af71b3080e75d93ec7a443934e6816f8fc7ff9b463" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.3_macos-x64_bin.tar.gz", + "checksum": "2d2984d4cb60b968576d3550cdb16ab7b32e9da05af331b2301d0925cd14b4b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.3_windows-x64_bin.zip", + "checksum": "63c1d583e5c19a3da0573a56ac23a14d8efcedf68f6b6723293b3cd76954d44a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jdk-20-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "4bbbb809fb1b7b89d30bac871c7f6475172968273a4cef81afd382c4fb6596dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "37a6818c845bd33243491a748e29339e23853423e6323926f617582864241ce5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.3_linux-x64_bin.tar.gz", + "checksum": "eab683cbc5739db22051f2e9891ae806833296f187ae58523ea4bc635e2393f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.3_linux-x64-musl_bin.tar.gz", + "checksum": "f32459accf35d8fd05ee7e1aded0b5db8ff89df9c5f16bc05896dd7dee1e2585", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-eabeta.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_macos-aarch64_bin.dmg", + "checksum": "040335667006edf6fd669724933f33f34ee213462111323eb30012b4fdf87efe" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "dfbce5605c22b0843dc1308990e652e8f61178ddab8124b9b0d0891e1c968128", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_macos-x64_bin.dmg", + "checksum": "294a593b3c5a0c653d9d02b8029d0f455aa15f253e54c9459479a7d88eaaf829" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.3_macos-x64_bin.tar.gz", + "checksum": "6e4d5a8f35c146dd7ffe16c7958f3ee8838d738ffc9655131895f98670221c1e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-20-ea.3_windows-x64_bin.zip", + "checksum": "e52e4f6cd158afe71cdac010d9f3fa2d2d78ad454f80d62988d9d98e989585a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B3/sapmachine-jre-20-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "66cd5ba3b300cd614225cfe97c7cba4ee10ca564f3c40a421ca5e556cf5ad635", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "a215d551c3c11f48c9483bb13cc49ae072d3a4e1688ba620f42451c1547629dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.2_linux-x64_bin.tar.gz", + "checksum": "0700afac2433125bec1a94693b19a5c5dbc9873d926b9dc86d19b4afd56e6369", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.2_linux-x64-musl_bin.tar.gz", + "checksum": "76d16875c8d9d8277ac5a47963d81ce37da696941efcf46c086178d0c5480a48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-eabeta.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_macos-aarch64_bin.dmg", + "checksum": "0708476436d9587e91dbb98abb70ee01b4bbac16cecf5cf31e45fdfdce0d9f91" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "68644b3842700cd9e3b2a49a54a7fc4e109801d64ed801fbe9caa94f7380fa8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_macos-x64_bin.dmg", + "checksum": "4a959f38b2aae90c6276cc9cab1160afe3b1a462bb82fbc32c66c33982f7793f" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.2_macos-x64_bin.tar.gz", + "checksum": "1f8daa1ed01b593d0c5772562094afe0ca023cdeef84f7dfd3a55360d94c12b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.2_windows-x64_bin.zip", + "checksum": "0150c94d5142b7ba1c4340b0479c13a949e5191765a523734f6bed19713ce688", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jdk-20-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "c75bca16127c9985eb57bb0f66fda5b619fbce229ddd1c93595adb86d6236df9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "dd19ec0d2fb72ea9704132f98f0be0c7b7340adda2250708be477a627fd8072a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.2_linux-x64_bin.tar.gz", + "checksum": "cd7808824f6232e447e28cca262bb3a198b219c091e4770bc1f491a01cfec561", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.2_linux-x64-musl_bin.tar.gz", + "checksum": "4af8d08c0e287c109ea5bb6103694c1d3d049e277d672a80ec3b5d13cef7500b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-eabeta.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_macos-aarch64_bin.dmg", + "checksum": "61afe92cb3ad40a94058e24cbc44496092e21c222b68a37c7fbe6a0411df6175" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "13db27369ba42a281610a4e39906439440d2e18231e1ef2e358d4ee2c800df85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_macos-x64_bin.dmg", + "checksum": "fa0ace436a3f5cac5711a1525c831d7029d02f26441972bb02a39dd48bbe20a8" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.2_macos-x64_bin.tar.gz", + "checksum": "16e3291b522a70357bb44e293ed1ce89d2a506f184f3c54c6bdbbe20672fae62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-20-ea.2_windows-x64_bin.zip", + "checksum": "b477792ba3dfcc73d3be5145250bb5898117ce6e04c0fb83e23f3ea5f9dc5ba7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B2/sapmachine-jre-20-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-20+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-20%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "5861b76e2f7a72516cde3472069aa10ebebcec6632be835789a4ed84ba2ab413", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "faf30de7d9465e0fb48016b19aed32293a42f11f1a52207603d58f8aa3b566e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-20-ea.1_linux-x64_bin.tar.gz", + "checksum": "8fd2b8adf3c54dc33a1a3a974038dba003131a6f1620c892dc984db0d3cf253b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-20-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "61a4f32f939c62c03aa6c43a721bca06c8d65cb6b6e6e9ab14edec6a3c1a22f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_macos-aarch64_bin.dmg", + "checksum": "ab901b6cbe7a9d7454f4528304e476f4039fa350d29c64d1bb2ed7a9b6235db4" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "ddae3206622d1a780d8f1f5884002462ad46ac1e0aeeb86a15695005ba7b81f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-20-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_macos-x64_bin.dmg", + "checksum": "fcb8663e69e2141bb5d1f6f24fb94f9343e5be5d52867871144540720181c552" + }, + "tar.gz": { + "name": "sapmachine-jdk-20-ea.1_macos-x64_bin.tar.gz", + "checksum": "882a2b9d8f0ebc71fd131a6eee4f82c65095d1485034a6bbd3eb6c991f65f104", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-20-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-20-ea.1_windows-x64_bin.zip", + "checksum": "21aae45e46b9506d3409de431f95408313f08cc36280c73e196fc1bc763d8d31", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jdk-20-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "cc8696e6ed45a7287912a2d9b077336ddac829b212b5a7f789630517646ad796", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "550729cd6d832d99f1052d0fa6eb76dfbd4c11ea3c2928eacf8826604b7e5e19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-20-ea.1_linux-x64_bin.tar.gz", + "checksum": "5abf66a9f7f7415e23ae61026d23380f948856bae32f90c3ca4bb2cd2e7d4489", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-20-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "014fa3a0528ddb2f6187af01b8ef9b8a64a21829bc27ba5185ee54bb5e7d961b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-20-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_macos-aarch64_bin.dmg", + "checksum": "985de3dd670badbe3aab6395760c2c4ba5fe30763343838abd5466fd423f47a3" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "5ae60b3dc738db3acfaab07950f8f0e6ce8f56c59f927cbcb16f6bd62a6f6ae1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-20-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_macos-x64_bin.dmg", + "checksum": "639078c90a058ae9ffac4e4a02ae58b95638371c34f94970c04a03a62e18297d" + }, + "tar.gz": { + "name": "sapmachine-jre-20-ea.1_macos-x64_bin.tar.gz", + "checksum": "b2fe1ac771f19d5bf7eb110a5a1ee88ea4043cb14a272cecf98e3f0f3c6f0676", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-20-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-20-ea.1_windows-x64_bin.zip", + "checksum": "d3ac70800911af637fc6fbdbc6021b3b60620e0224aaa4f899fc431a825eb742", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-20%2B1/sapmachine-jre-20-ea.1_windows-x64_bin.zip" + } + } + } + } + } + } + }, + "lts": "false" + }, + "19": { + "updates": { + "19.0.2": { + "sapmachine-19.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2_linux-aarch64_bin.tar.gz", + "checksum": "e7d1c359cf979c5517f22f6895c2a8d695ad97313a85a5fc8ce0785018ef1022", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "9d6a3a0e36277204cb34906bb99d655a049f7b274fb7666d5e2f1c0f2a460ac8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2_linux-x64_bin.tar.gz", + "checksum": "e7b27e8b5b4ca2a172b0a6299eaba9cf7e0cceeea11aeb37fd3ff1ef71cff018", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2-beta_linux-x64-musl_bin.tar.gz", + "checksum": "0859d24774a45da3a26e648d733948c437d891c66570a54ee9e23dac5c76e7e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_macos-aarch64_bin.dmg", + "checksum": "f354ef6ce50590330973c2b2ae53918ba6471bb1c1e89862dea4d18a9c7cfa9e" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.2_macos-aarch64_bin.tar.gz", + "checksum": "9378c84c6773fb93d4c65742aeff3d006fa636b12d9657e421a0ed2ebbd2040b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_macos-x64_bin.dmg", + "checksum": "916d060f0af16fcffd20b1520028cb9383bdb8c8e231fd0e1f172eaffbae6071" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.2_macos-x64_bin.tar.gz", + "checksum": "526d827d243c97dcee965a40ec5735fc82dcb8d8b32ab5b118a9ce9199d213f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_windows-x64_bin.msi", + "checksum": "f4c353d07882c812e48cc6aa6c964caf358cb1a290b1205777f1d73c6a5bdfb1" + }, + "zip": { + "name": "sapmachine-jdk-19.0.2_windows-x64_bin.zip", + "checksum": "1be5e8578ea41afd4e1c6d433500adea4847709ba0ea6ab4e2d99a979a970998", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jdk-19.0.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2_linux-aarch64_bin.tar.gz", + "checksum": "78f417d2c961bb52c5d5297653a84b925f1b129f2435f13192ea2d889c426a86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "069b735c701c257597b0a0d0130db2cabf4118a6fcea8d79116c2261c89966af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2_linux-x64_bin.tar.gz", + "checksum": "2055444242d4bc3124235b2bb4ca7f2c75a2546cd98d8df6f2033d09f1baad6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2-beta_linux-x64-musl_bin.tar.gz", + "checksum": "0d6fea887dcb83bf85f1e10e5bce9002ee1aa219725a2911c0d3faecdc011dd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_macos-aarch64_bin.dmg", + "checksum": "99dfb9a5e9614e1d8ffde8cab718e4a03bd6e822bdb77652f3348ba0fc9d4c69" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.2_macos-aarch64_bin.tar.gz", + "checksum": "f10af5ab84d3e573928ba25c5d1871dc42b5e2ea66800ae157b9ad34fd3b61f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_macos-x64_bin.dmg", + "checksum": "09ae2fd8bcbf3f1e458f63df28398679df30c61e297c122ff998855d3bc37f33" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.2_macos-x64_bin.tar.gz", + "checksum": "fc684cf4c00a5d681d16ffa6233bab785ec083f80d8356ec67aebecaf32a690f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_windows-x64_bin.msi", + "checksum": "1d7c1b85511d07f51f4c1d2c3387bcbb4aa6488157061a5bb78b47a7ac052134" + }, + "zip": { + "name": "sapmachine-jre-19.0.2_windows-x64_bin.zip", + "checksum": "db9dccc4507f856c45975a410a189936c3f9472a0102246b1301668df7de2752", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2/sapmachine-jre-19.0.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19.0.2+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19.0.2%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "f1711d0e456de55447b0f2c0a843b750685052b63f5d544da62ccaeab2630693", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "0b14e1b577e8c97881fa9a1e4de91694bd9de21b42846bba59b35c15c3b204c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "9d35fdbb5744be0ae83ab5a056311df08320576d2d148c6dea70af5c03f36802", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.2-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "063d3f3c3061b12dc773f92ce47bc4204f3d764293ba15efb352f5aba9133c2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "f7e685dd440591ce35ed34314337ab43c5306dfead0bfe9bc4bb77cf4d5e0b1b" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "169fed837f822b05ee53349f3d3697048a666e6ba39817993edc88cc3bc7ab4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "4c00d7000dd2c6a711256639d14dfebab9885398cf724554e97a48736063dee7" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "bff3ddc77defc5b0cde607ea0c39766a74e31b1dd5a4ffae2daf91469d4109b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_windows-x64_bin.msi", + "checksum": "265118c24e85ccdbf6e429224677bd59915dcd44d94f629a3976b2c1e09a8e2f" + }, + "zip": { + "name": "sapmachine-jdk-19.0.2-ea.1_windows-x64_bin.zip", + "checksum": "e25ec9230bda6ff9cca39b115fbcc59cae3467499f2dbfd36dd1eed1e1b70472", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jdk-19.0.2-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "400db38527f07914be56f156689c71d14fa5359bac2811d772dad44c31110c93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "e0d7c179ba56aeac8afc2c09cd5ae64ae5e3b2ba7b66cfe5bebf00785300411d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "51d8de13c6131b1d3d8bf520caaba661f500fc90d2f9691d5d76bf134783f3b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19.0.2-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "77a7cd5523729f933c6869b357f28d46e6e970bb4b2f7c48cbd8789e912fe86a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "21ecaea350cd4b8de7d2e9f82c0c0b9e8664f03c4dd92fb48f47a5b7d7b840eb" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "3e9743b4427b5cf7df5703cd836befec1fbfd2af0cfa07bbff701fb37e8cd93d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "c87913ebe0ca035a247c6d481fd1c6b91578917daeca71560ac80006f2fd42bf" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "9f4b7e40110dc5c2621b08a330fb4df33c1f7a8c7b5844912838430e7efd7306", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_windows-x64_bin.msi", + "checksum": "b6bbcd309fa00ed2c77906944c01576c044cb0b9c2b73b2bdca69e51a17f33fc" + }, + "zip": { + "name": "sapmachine-jre-19.0.2-ea.1_windows-x64_bin.zip", + "checksum": "c501192fdb7316b46201fabfaf9c8e386ba3bfb5c05579bf39b8c4c5b5e2e9d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.2%2B1/sapmachine-jre-19.0.2-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "19.0.1": { + "sapmachine-19.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1_linux-aarch64_bin.tar.gz", + "checksum": "c936c3ff014616652836cbeec4fe3afcc9c7d937e2f14807e6f3e45a2237147c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "1c5c606bff5bd2bc9b88a5d4d153e3c0acaf0ae1ade0f519e80bcb7358dc7711", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1_linux-x64_bin.tar.gz", + "checksum": "a8aa60ce6e9bb67388cf23bb710c742d4a5132a55da2f21113d082e91b6453d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "06929eb7f24a9cbaeb73952f41a3213377064833f904eab1b2f60e607e3333f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_macos-aarch64_bin.dmg", + "checksum": "ccaacc6d33fbffc01a5f32fc33399638145ebc8fb9a08a4ce8239822e15f0411" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.1_macos-aarch64_bin.tar.gz", + "checksum": "19830ca15d0038c01a888794588547079ad747a2696b62f4b0a3d263138eb189", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_macos-x64_bin.dmg", + "checksum": "4ddd5b450b61e41501434771937dc5d1758025d8169ab0fbb382af745645db42" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.1_macos-x64_bin.tar.gz", + "checksum": "720d2a956fa7ad4ea89b5f3d9f9ee1c9c2e464bccc54f9cb72f8e2bb40850505", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_windows-x64_bin.msi", + "checksum": "3f636a0f6e8a0fd3ea0f3afe37d85c2aa58b68bfe9864440a23c8b49d331a813" + }, + "zip": { + "name": "sapmachine-jdk-19.0.1_windows-x64_bin.zip", + "checksum": "176594e9f36c4d32f260f51f411fd97daea7e8d280903cab141b46afbced94e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jdk-19.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1_linux-aarch64_bin.tar.gz", + "checksum": "e17217d8915204467b3f5f4616f74004fb283ef41be70f23a0a2cc795572fd4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "0bc25d7f2522ef3c94ba2bf3db80184b9947f015f7947c77fc11a9d046d523ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1_linux-x64_bin.tar.gz", + "checksum": "f230c375581eda3c6a542bf987dc877e2b55421f1af5ed054077e20fe4bc78a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "43d4b2f318c5f6e480480fa960bd4ba973fbc48d7005a92acabc89195d4467df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_macos-aarch64_bin.dmg", + "checksum": "cbbc6455fc17edbd348be20ed1945330196383155486e5aa71f00aa1cc762304" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.1_macos-aarch64_bin.tar.gz", + "checksum": "1a23431f4c0c1710cfe980c09f027e0b9bdba694fe5ffdd51532f70d91ccbb05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_macos-x64_bin.dmg", + "checksum": "402893bb8147b83b12e7ebf2168a113db0e538bb9b08bac02a1b6543d8baaa0f" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.1_macos-x64_bin.tar.gz", + "checksum": "8a4232a6e7ad9bf670c9717f98d4711296b013058d2c3ec638c9a580d7f8ea6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_windows-x64_bin.msi", + "checksum": "0c5f2d102c191766c1d1a76348a387c9626d83a19b199842e5acce065f2fc005" + }, + "zip": { + "name": "sapmachine-jre-19.0.1_windows-x64_bin.zip", + "checksum": "a4e6465f5e0654b976ac329d90f51a7738f6d43549b475c4ad396b3ff9c66916", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1/sapmachine-jre-19.0.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19.0.1+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19.0.1%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "0bace7897783e095b8ac97a46a2b8326e50de4dcf9e165d1d481acb7b7a8b05c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "d7c6653eba059d046b9e01c5557d36147e90d0dc7d67e951bbdf7ccbb8d372ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.10_linux-x64_bin.tar.gz", + "checksum": "21de671fa27da78bb874461ed992f9a6a549e15a6806ac0a3e2d6dda4975f07c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-eabeta.10_linux-x64-musl_bin.tar.gz", + "checksum": "4997beca62f899f90be4ec7dd3e1c5de11221bcb9bda5e2bf16be0cd8cc2976a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-eabeta.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19.0.1-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_macos-aarch64_bin.dmg", + "checksum": "d69ce80c4f2c97a9676a0a72fe5ca2735724e12e60828487c9159655c9434c94" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "a82f339e3c627c5c0cfd5e4818169d7a3c20953a0235ab8f2f0686c3544e405e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19.0.1-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_macos-x64_bin.dmg", + "checksum": "7e6b2c2b2338258d196557ad50582b4ff878bdeacdd0283a338c610b3260abdc" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.10_macos-x64_bin.tar.gz", + "checksum": "ab5e216ae57fd4c21d45b1ff951b28dc03c614a455555428b464511d5f41ce77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19.0.1-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_windows-x64_bin.msi", + "checksum": "9b74383e71b27c24f236cb8114f511bfb3102a5f69710f6559bdc224fe42cc3b" + }, + "zip": { + "name": "sapmachine-jdk-19.0.1-ea.10_windows-x64_bin.zip", + "checksum": "45728446ad3dada62fb5abad55827b48d039a0e7db4bd9123be43f2780413e25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jdk-19.0.1-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.10_linux-aarch64_bin.tar.gz", + "checksum": "1309c9dea006094e83124438346d085876e219421952f668dfe420e4cf37d54b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "fb46818a9d13c8a56f0d1aeb5b15d3de670ac10dffc00d3a19c1158e5bdb0e0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.10_linux-x64_bin.tar.gz", + "checksum": "22675092b5e4a2411ad334046a7375c21548ee4458b8638d37c5cf260e2b91cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-eabeta.10_linux-x64-musl_bin.tar.gz", + "checksum": "faaf50ed812901f2ebe10e3c55cee4dab601d15232f1c2e1c3420710dc8f51c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-eabeta.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19.0.1-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_macos-aarch64_bin.dmg", + "checksum": "5a42db55c1f74a3b2b3c13576085fe59cdef9e041e0fe853a9c636356c7f3721" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "9b406d44bedbb0fd72a3555fa1becf84986dee2c6f5010eb1aceec46493186a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19.0.1-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_macos-x64_bin.dmg", + "checksum": "2977c18b74b1e12a0b4f61944a74828ced79df6034fb7bbc0d3645acf7aaa75e" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.10_macos-x64_bin.tar.gz", + "checksum": "b4928cf9f603652741036f8370ddbf593fdf74d636e2a6d45154162a2e868d16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19.0.1-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_windows-x64_bin.msi", + "checksum": "533dbbfd6a3e20d85a4341cbb76fff6dbc30c1d43cfaa4727453f6d60c93839d" + }, + "zip": { + "name": "sapmachine-jre-19.0.1-ea.10_windows-x64_bin.zip", + "checksum": "5fb0fb9d919e69f8d3e313b071db73b9d6e4b24e6d5a88ec9438eacb525572df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B10/sapmachine-jre-19.0.1-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19.0.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19.0.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "d3cb2b2898d093e797f0e8d3ba61708a43eb798dbd8834e2c03b3054ad2d7120", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "f38e950f7babd82ff5142ef0aedf7147e5fb7d3bbaef2e802606ab12e383205a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "2c6c0c39bfcb3ab29e44ba51f40f84e93e46946f156b7cdd0b13fe58e5d5aea7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "cb5bd64acecf15a8458f3359b28a00fc9d1a793514836a77dd0c77deecf46fd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "aad563fea129c9f0aa6b1d54f769fd7a885c31072c75affc805bbd5bf841ce15" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "624e6900091643692567f6b077adc33fcaef17d237b5b9ee3b2e935464f4413a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "e23fcc37b68dcdd1311236504772fa791a34d2e8552c3853fad898c27f3884fb" + }, + "tar.gz": { + "name": "sapmachine-jdk-19.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "44f167dba235f7ed0871a2dc0db68eb7275bb8677a007152c65ee115beba1347", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_windows-x64_bin.msi", + "checksum": "d9f95a24b33337dd89bfbfaaca328332b93ed5c8edd7683021487cca17d5f44a" + }, + "zip": { + "name": "sapmachine-jdk-19.0.1-ea.1_windows-x64_bin.zip", + "checksum": "1c694f1c30b62225ea7353e7fb9e02b149b4e40ea63a7723d1a7d1cc7565dff6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jdk-19.0.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "0462344dffb11e2573eb758d70e109b6cfc9b3b33d68a2461e54bb8da2098a1b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "26a4bb0268de68bd5ba3c9e0c5470028c711666b4ba942a620126d62168e0a01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "7d4d13e76d5c99cfbe93739e6997f937a4e9135a843eaf347fa9203fda0150cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19.0.1-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "0ccc255d22a74190225be9a1d9dc1b4eca873e168b944deb350a34955d59b86e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "663c8030bf4dffbd9c587540426bb16ab6850dabf32d1ac84c9dd483dc504373" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "a7bb987c804a87711e6486574bf0608b88033ffc5b200813b7f14b6d868417c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "fc54b19763569abac3be6b0f5c0272cf61b06f625dc098c5f0eced850878bdd7" + }, + "tar.gz": { + "name": "sapmachine-jre-19.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "2f483c676112158742727e32f59d885b61b7a43101ba44d891f0ba72f91cee00", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_windows-x64_bin.msi", + "checksum": "9cca4e614a4ffeb8560a96006f3b340fbe244838ce9d993357fca66ed6399488" + }, + "zip": { + "name": "sapmachine-jre-19.0.1-ea.1_windows-x64_bin.zip", + "checksum": "ae70e22ff686552eae691191ee4039822fdb05112e1eadd2c18aa903de814767", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19.0.1%2B1/sapmachine-jre-19.0.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "19": { + "sapmachine-19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19_linux-aarch64_bin.tar.gz", + "checksum": "ae2ac322d4a2145329c10d004e1f5d8e748a68604c0692e8c15049dd90c8c013", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19_linux-ppc64le_bin.tar.gz", + "checksum": "6555b085e379284df2917040ef43eee251784448ff6907f438dbbc1b15a2cf89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19_linux-x64_bin.tar.gz", + "checksum": "0bbd853c82524ff19a09eb0e7ad847eb846792d951435d74a138dec65e736879", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-beta_linux-x64-musl_bin.tar.gz", + "checksum": "3976486008f96dba54efb53ba1551e011a659864e46a152967321032eba4262a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_macos-aarch64_bin.dmg", + "checksum": "d7d549820d1970a332c972848e09af2cc1672170802c1089e12c8230ebec437e" + }, + "tar.gz": { + "name": "sapmachine-jdk-19_macos-aarch64_bin.tar.gz", + "checksum": "c677b1b9bd021557cfa68d0d0a36c54217387be37a0b4fc84bc67121da341af8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_macos-x64_bin.dmg", + "checksum": "199b08f859548a9e8973621e2a72e4781bc997ef85ca84940da411063a1148f2" + }, + "tar.gz": { + "name": "sapmachine-jdk-19_macos-x64_bin.tar.gz", + "checksum": "5db122e254cfea9ea86938bfe529f152458841b36f103d512384ac2a94fcf621", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_windows-x64_bin.msi", + "checksum": "6861f3dbb9577c6b14502f181b07702f07e12b1695df74ede7023f2328c1ff72" + }, + "zip": { + "name": "sapmachine-jdk-19_windows-x64_bin.zip", + "checksum": "dfb392b079398c822b1970d5ba75a361bd0bd768dadd6ab4709d99bfa2426d81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jdk-19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19_linux-aarch64_bin.tar.gz", + "checksum": "5debf8fa898094b30fa21e0fa3be3172bce41203dc730dfb773ca08453a38002", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19_linux-ppc64le_bin.tar.gz", + "checksum": "6cc4f951e162c6ed09c7109fae10d8c463cff7e5d6ddec9898b69e8fbb905a09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19_linux-x64_bin.tar.gz", + "checksum": "84961c9dd962e5abae90d2ecae9f74d1cc697d73d3f6597ca10c1c1ef53aaf67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-beta_linux-x64-musl_bin.tar.gz", + "checksum": "68d8e20c38fed5649192f2181dcff2b8c7a888fd9d7f71668a64c02cd8c429be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_macos-aarch64_bin.dmg", + "checksum": "8f724d831ac5f76c8a6eddf693851e39b792460801c074c6670fb12a08c5be83" + }, + "tar.gz": { + "name": "sapmachine-jre-19_macos-aarch64_bin.tar.gz", + "checksum": "fc3a018baf0f0814f509b631c8426cf215b76ae1512636997e84da7cac32b636", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_macos-x64_bin.dmg", + "checksum": "d6959a17ff7fd0825a6e482d3628e3bdf3bc8d4f7edcb23023fa594813b1c53f" + }, + "tar.gz": { + "name": "sapmachine-jre-19_macos-x64_bin.tar.gz", + "checksum": "286cef5d0c79c15835da4c4b9f3cbd99c4e92ce54e868621071412561a77cc64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_windows-x64_bin.msi", + "checksum": "a26e38d5f157353ed785112baf258426c536b0a6999d396a0245da7abe2da1d5" + }, + "zip": { + "name": "sapmachine-jre-19_windows-x64_bin.zip", + "checksum": "ed81dd6eb347ed88750a64413b90df902f090f93f0e65da2f785367aba7f80de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19/sapmachine-jre-19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B36", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.36_linux-aarch64_bin.tar.gz", + "checksum": "c6a0ab7ba5838c6c55716465fece979a9c37e9a1df2552bb08c7c9f42950d520", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "500fc1dc3bda90313969602c125c1739599421695f8c168e5402dde158c37480", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.36_linux-x64_bin.tar.gz", + "checksum": "7c24ce08dfc361ee0a0e2bdbec808d1e13c0da65143287174fdd215b9fcbba4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.36_linux-x64-musl_bin.tar.gz", + "checksum": "b5b803379c29bec3267b97657709312ac9eddea9a737e4f84ee0c58ecb0d04fc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-eabeta.36_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_macos-aarch64_bin.dmg", + "checksum": "6152225849892ac1d0b7a0532c9fa136490b2bd9ab7b963952f90a32e83292f2" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "c159c8287b07bcadf7847700629dbe34ce202607d99fb8b4556fbed0460f9c03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_macos-x64_bin.dmg", + "checksum": "d60e5dbfd5ad79c51701ca806115c835c782a7a3d082bcc8f967864e63545a83" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.36_macos-x64_bin.tar.gz", + "checksum": "7a840863e0c68dc92b1c3b7616056c5058c1170663dd92c2c472a5d0c016b272", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_windows-x64_bin.msi", + "checksum": "b032f0c49c9f46491f5e479d043d46485afa617de9ed6295d67e8b92e679d845" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.36_windows-x64_bin.zip", + "checksum": "a5b86abd3321934c9c3c2b31e19975a996e6513021edcf8cbbefb6032528315c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jdk-19-ea.36_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.36_linux-aarch64_bin.tar.gz", + "checksum": "b6f5b050f008797126620887b7f5b41e0eab62ebf84a2457eee05e2837167732", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "d318dea851eb052607c42d89c9e874ef1d33da1b6115816c27524fb0b5c64370", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.36_linux-x64_bin.tar.gz", + "checksum": "ff970977227d74d4d2d71c634b407195b9ff812cfbf90bab55a658d25462d0df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.36_linux-x64-musl_bin.tar.gz", + "checksum": "f0525aa2e35735c2e8866a3a3efbf8704fdcbaefe030ece4d6147da25612ac72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-eabeta.36_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_macos-aarch64_bin.dmg", + "checksum": "46ccf70a19c586146341d43e4762d6c6e43b2cd2df7ee2fc80d6beb1ca0b36f0" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "ab3a55f122701d7d8316867cd327f0bac63af5098c0c20385776ff8f7fe151de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_macos-x64_bin.dmg", + "checksum": "4693205110d7d5bc4bbb0e62a5e4e6fc0fdd9278bda079ea18631c79e1b949a0" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.36_macos-x64_bin.tar.gz", + "checksum": "9e937a49e8e97f3d73b5645d5bd4daeed44e7488f9d1b51cca93487f3c40f0cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_windows-x64_bin.msi", + "checksum": "3941e2d0989ad8d85e30277d9d4b247753a10de916a2f93a3521a9b0908713e3" + }, + "zip": { + "name": "sapmachine-jre-19-ea.36_windows-x64_bin.zip", + "checksum": "b4504a21c0ec8e232b55bfa2e8be57ce7ab138b7d3f5df9dbb4cef14fe459174", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B36/sapmachine-jre-19-ea.36_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B35", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "777c27829051779c3fb17dc5b4099319636cfbcc5f72be67038dc10bf6171ee7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "12c0e342e1bd4c45d87e5c30ed22e88b8625b9496498938a9652ecfd12768f96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.35_linux-x64_bin.tar.gz", + "checksum": "6c7194f0069d237260eaaa5cbf74ecdf1750d24676575a34124b0e2953ada6e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.35_linux-x64-musl_bin.tar.gz", + "checksum": "acbe66fa53f682f1725511041b4be466a5a9d39d90beb9487e94d37760c8fc5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-eabeta.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_macos-aarch64_bin.dmg", + "checksum": "348546ac7748dfc36a0ea058dedf7ce053269f0299304d24c425ed62ce131266" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "b5802c18f63fa738f20e6da204a23ea95135097a06c170ba8bf190c1cfcb7475", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_macos-x64_bin.dmg", + "checksum": "75eda0e9d6f366765b8afc34a776d61d8094410c99416dcd9bb0f09514490543" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.35_macos-x64_bin.tar.gz", + "checksum": "5e801312e29351b1d53c5b29796552e11f89ef677cd42b2b92a6ff8a2f8ca756", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_windows-x64_bin.msi", + "checksum": "46de87ad2e63f9482ff6610b694f30471fd9836f30dc98b67ace947b8a67e70f" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.35_windows-x64_bin.zip", + "checksum": "44470a36287f86646906e8ebbb4228c3a0abbeafbab4c7a5da950c39fa62efba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jdk-19-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.35_linux-aarch64_bin.tar.gz", + "checksum": "67e5e2f18ecdf9b2c5cfcd748686e925309ca7c7861a7ae1c26281fe02aad821", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "791ec2a112faca13a69702e95347bbeb0c3f4d4343f65c9bb7a644bcef09f4ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.35_linux-x64_bin.tar.gz", + "checksum": "fa1ecbf65afd5cbd6eb9f8f9f003aed67a3bcf8b09c5f2a4d90a8b8f07419e09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.35_linux-x64-musl_bin.tar.gz", + "checksum": "8eb580046cfb491e31ff16f6cb8ed8ee5210ef422b3f33f1de260dc01b2d6838", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-eabeta.35_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_macos-aarch64_bin.dmg", + "checksum": "844da6159c5555e02a295aaf4a0303e707981cad1016a1b127e3532f0584435c" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "646d0d1592ea9928a2779da1c1d4b7665055892740920a9a90dddbd35cc53e73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_macos-x64_bin.dmg", + "checksum": "d344e067b8bb122cbf4c7acc915cfea91f3cc1c1d11874f866890f7a161ff6dd" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.35_macos-x64_bin.tar.gz", + "checksum": "ead0f195e50055f04e785de089fe286422360c3a5deec256bce4b23f7d1784f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_windows-x64_bin.msi", + "checksum": "1b729da4284a27edae7a7fe7f7c417b45053b923e1b4aa876e553e060a43fa8c" + }, + "zip": { + "name": "sapmachine-jre-19-ea.35_windows-x64_bin.zip", + "checksum": "a293d2faa972db3fc3d663f3989d9e0aa50aaedc7704f5d4873b24d569f1fd1e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B35/sapmachine-jre-19-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "d487cb414b48f8906cf92220d8425cbf54676259d0f03d8f2d3dcde366177c10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "223ea3a504e0101950b323f659c119b403e99e665a51bcc5813f669ca9bfda99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.34_linux-x64_bin.tar.gz", + "checksum": "c42259fbf51f9a66f6ba286a89a0dc1fd6562bfb03b4396583a64d45005ae258", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.34_linux-x64-musl_bin.tar.gz", + "checksum": "16c330e12a756a709f8472da5e28c7c6daecd9fc1b639aab861ca487d022b982", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-eabeta.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_macos-aarch64_bin.dmg", + "checksum": "4e1d6a17bba52fffcf9eff152db5c511732a300e87c95a2d5a72ad07ea5d2a48" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "a864999ddb9cadab3a52d4d6c2ce83298f871b3d01c60db10c53ae4552c61c1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_macos-x64_bin.dmg", + "checksum": "6f795dbcdbcc7b0a4d1e25899eb9fd142bcffac4d491950cb0275b7568114924" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.34_macos-x64_bin.tar.gz", + "checksum": "593dfde08f7e5d2ec13e2e1459f72a78b0ee1b8581702c8a6891b8e0613291b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_windows-x64_bin.msi", + "checksum": "39ba5ccdae213a92f4d81d80f3e65ade7a959e0d5a15d5e31cf324475e063205" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.34_windows-x64_bin.zip", + "checksum": "026a35d54ee1d9a6d2f51d7a61d5b181129c5d06484491a43fede60d5a2c5e82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jdk-19-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.34_linux-aarch64_bin.tar.gz", + "checksum": "cd4a37e0df1a845ce5b96570bb20fa2706200b738cfd1fa053435d95eb1618f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "8a6bd5913cdcf3241990c2eb5fc1a78e998abe0626716faa4d5475090c54e022", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.34_linux-x64_bin.tar.gz", + "checksum": "991815a8250361e394f5caa9550b9d3b1cb6b37306e02d1ad6f62a8f836a3466", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.34_linux-x64-musl_bin.tar.gz", + "checksum": "b23ee48a17bc43fac88daf7cebe4c2bda6f04a2668f611ebb7dfc41d0f2195fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-eabeta.34_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_macos-aarch64_bin.dmg", + "checksum": "d18202bbb6540f732218ef31bc5094560e85fcd0154e0e68a438958993dd3ef7" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "a5e49a2ff08ea4de2ed9ae09c36ecbf69a7973188f3c475a75b6ff7cb57d8500", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_macos-x64_bin.dmg", + "checksum": "12e329ae074b65ae891bf721f36a933603e500d81dd6f8c7900503ef178cbbf0" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.34_macos-x64_bin.tar.gz", + "checksum": "4626564a03ff76e7f059852a4ca5c41168f5f61d8b8dca8df98a9fe13d61063a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_windows-x64_bin.msi", + "checksum": "72cb9f6a6cda592047e90741ed7260019aca4f86d5fdfdd71abedbe8fa708e15" + }, + "zip": { + "name": "sapmachine-jre-19-ea.34_windows-x64_bin.zip", + "checksum": "4584e1aa000c367e06a996e25a4acf7cd13e700e7e3ff88cb057bfa362ed5f9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B34/sapmachine-jre-19-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "bfb3d09a8b377d297ad6f11afde2d1689241da6ef6b6e0c261cb857cd1f83c53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "64022418842629958ce8246d1e53fc689e172fd946a12962c71b32f94648b631", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.33_linux-x64_bin.tar.gz", + "checksum": "cfd0b6be4e660c5cf137d6a013803d95b32f1edbd060fb2ecc2f3cd64e37a13a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.33_linux-x64-musl_bin.tar.gz", + "checksum": "89486e43ff1d23a67a95804d51ab142631b350d71312ed05ab863dd27d06fabb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-eabeta.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_macos-aarch64_bin.dmg", + "checksum": "cead2f0234852a6a2958561f7e6a402731074385fe32d7bfce64d7e6f980551a" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "fae2ba4afdcbdffae8dd7072ea1eee7d204c6b257d5fee5e57ad01605b1bd9f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_macos-x64_bin.dmg", + "checksum": "e54bf5a2d1ea48a81b24e2e40e1cac52a0de87a4ea362c4f508ac85645066603" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.33_macos-x64_bin.tar.gz", + "checksum": "e47c4ec57a6488fdf53fac009de5f230a56eaa764183446f7f103f1074dbc067", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_windows-x64_bin.msi", + "checksum": "c337e7a3664e7df566a38d49a3eebbf595583088b63878162e2de0a46a40449b" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.33_windows-x64_bin.zip", + "checksum": "fdad5200fe8e557bb734738d5890d443e573fb9a2e831ec1b8b064fa62844ad7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jdk-19-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.33_linux-aarch64_bin.tar.gz", + "checksum": "f0d2b766a663b8691210aee220499775f239120a67d0a0f24ca7c1acda2bc2f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "da039e9240c61abc97e788b5d6a878c60d3c6e8b88be34e34355c2c7b4e917d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.33_linux-x64_bin.tar.gz", + "checksum": "c05a9e99e2abbc1d178c1d03f9c8920dfdcb5eab6eaabb35764521b5e875b26f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.33_linux-x64-musl_bin.tar.gz", + "checksum": "aa5c81e3b4c8c755f8c7a5fc3bd1b447a8172e22b26ad888b990c16c61f6690a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-eabeta.33_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_macos-aarch64_bin.dmg", + "checksum": "103bc3933dbbb9a86b24a622b4aeeb721d8bc803c5ea73823fbcca2259812f78" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "274691fa4859aa0d02fef4e4b1060d9b7d12ee8e425b62b6a14c8cd0c6fa85ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_macos-x64_bin.dmg", + "checksum": "f226cb8d1f577698dc635c2c86241cc938f440aab8c35052544f7f0eea0a0879" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.33_macos-x64_bin.tar.gz", + "checksum": "060330ae97081ab562531f993f12fe35e1238c6fc0ac4a9fcf87057c5511799d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_windows-x64_bin.msi", + "checksum": "8c20739329fb602348c3ac69bbf169c050913596a86a17a0caa2a9fd56123813" + }, + "zip": { + "name": "sapmachine-jre-19-ea.33_windows-x64_bin.zip", + "checksum": "580fbb773242f6339c43c84213f2d48cb8478ac20fbca5255de49e1e22a4396c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B33/sapmachine-jre-19-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "3d402cb61d03ed830d9f4e28bdca6b268e842032f19ce3a48485d2b4eda83d0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "34c9998327f97c818c44b8808e414bd38ae16c3a4a7cd62a8a32b152172f9b22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.32_linux-x64_bin.tar.gz", + "checksum": "47f97681345e9ad7778f20a7274e9f290ea7df9eaf10bfc43e66cb14ca85186c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.32_linux-x64-musl_bin.tar.gz", + "checksum": "6873a9a0ea9f9c1fe80288206f8447cb117099be8cd21b91545257e14ef881c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-eabeta.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_macos-aarch64_bin.dmg", + "checksum": "7e284cbbb0272025a7d7a5583c21178269453d994847dcf7bdd2813fcf156504" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "accf9f61b8ca13478b812bdfbfbc97c7d4180dc2feedc62accf8ae0ed424b247", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_macos-x64_bin.dmg", + "checksum": "1740883ffdce5c4f64ce91079f99c973d1e0d2277a920eedefe18dd88041a185" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.32_macos-x64_bin.tar.gz", + "checksum": "90c6521b550a05396caf66ca7a059d49294277003d231304db9dda73f8851016", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_windows-x64_bin.msi", + "checksum": "263b72b6164340fca2b291d485bfd045baa6029059f3cdb4816458cf311c0d19" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.32_windows-x64_bin.zip", + "checksum": "c8ae536198c3c121bef42e7ba88043233b8db83120927526bcb55a7c03d0a8ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jdk-19-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.32_linux-aarch64_bin.tar.gz", + "checksum": "840472dc7c41eb65b2b13ab40686953da6fd73439a8dbc6ee2a20b40a6840d78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "ead3d8e5433ca702e0951d18816b7c0c1da01603202fbb384406c3e583db00df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.32_linux-x64_bin.tar.gz", + "checksum": "f6c514278bec40b940f4bfcc47d6a0ac9ebe7580d26be3ad0014b334659615e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.32_linux-x64-musl_bin.tar.gz", + "checksum": "719bee4f99256e7a75ec37c55de890725817893983d4ceabc7c720ad6fb068b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-eabeta.32_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_macos-aarch64_bin.dmg", + "checksum": "be7d72bd8f1e432c7034249f0db0701b780cfd96e440e877ae47dda948627f3c" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "7dbdfb94c00ee658842fb34a65b90e5aea00f77993f4901ec59b14ab6bb999bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_macos-x64_bin.dmg", + "checksum": "e4088e2849e2e6502826a8d452b9113b5db6bc78288d1470b767129162b023cc" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.32_macos-x64_bin.tar.gz", + "checksum": "809d86ceeb8d8e23704ded9d92ed8dbd2b467f0f75505b3e352ad76fee08a490", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_windows-x64_bin.msi", + "checksum": "94a0f524b67919ed3010a7bd08b7efe48f3d89217d16d0c5e2d9053265996058" + }, + "zip": { + "name": "sapmachine-jre-19-ea.32_windows-x64_bin.zip", + "checksum": "833bcb7d789a0641247c4bc0de5318e6510654aac912c27d2b261101e205679f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B32/sapmachine-jre-19-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "b91147d79df6b59dcc1632182d605dc378bd51072e716d02b516fc21f9b159de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "9734ec21c96e5d5a307ba7ff12e571ceab00d8b02bdd8182f5448b3c5e427f71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.31_linux-x64_bin.tar.gz", + "checksum": "57f24a0186c288fb849ca2ff5017b7109fe78798307e5700ea05942ed4376cd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.31_linux-x64-musl_bin.tar.gz", + "checksum": "10a5284c7fa9095ac62f029b86ecee8f0004d37a4cd41a0213e4dbf9d3e4fc30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-eabeta.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_macos-aarch64_bin.dmg", + "checksum": "553d7178bee3656dbe7946691ef64b88878b91e03fc95a9a30c4728f12be02f6" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "bc568a0b6ae65e4bc5b3a93d3d4fb710b9ff1c832026dec1fe07601fb7757e10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_macos-x64_bin.dmg", + "checksum": "8e8a94a9386990d85144817ce948bef4f667d1504e2cf3b4ef111adb967823a9" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.31_macos-x64_bin.tar.gz", + "checksum": "26a8516e83d6d292abdfa289c344e1a4bd2e131770f04069e187ef5a910d1652", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_windows-x64_bin.msi", + "checksum": "b30c118faaaa9b2825ef1e46fd69af0794f091852ecf70971f77bb065f22b505" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.31_windows-x64_bin.zip", + "checksum": "b5b79ab95954a75402959797e9cbe65931d72398d39dfbedcd471fb8259574ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jdk-19-ea.31_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.31_linux-aarch64_bin.tar.gz", + "checksum": "9d00c7c9602221303f69970d5f2cee13389702e6798be7c1a8b420e448c23e86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "957636f727c3749bceac1ee95e00eae1e22b106a32260a1b5097bf529f759326", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.31_linux-x64_bin.tar.gz", + "checksum": "0f47f6b6e5167890f4e67df93d06f04de9360b6519ecfbeda0783add04064597", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.31_linux-x64-musl_bin.tar.gz", + "checksum": "3aaa604614760f14871d0c3491313b180143ca62fcbe503ba551a6f1e8aca2d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-eabeta.31_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_macos-aarch64_bin.dmg", + "checksum": "70c296b75da9d368599eb9fbbccb767375853f245a7a856a6112f9213fb0ceec" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "1c0861618d736e38b3344d366ea03a50b4da28e0af8a31915787600ef0a18a1e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_macos-x64_bin.dmg", + "checksum": "1c668edec0c4e81691c195ef21f67848b6436d5ce21f15e07062e10ccacfff9c" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.31_macos-x64_bin.tar.gz", + "checksum": "b142334e6a27af1c69e4ff8cb1999fd4a2e9e1283e492422592bd7b24ef4defa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_windows-x64_bin.msi", + "checksum": "28c4c6697891226449cf7ae799fbfbc69821e7e259e3336f1e795d5b77353aef" + }, + "zip": { + "name": "sapmachine-jre-19-ea.31_windows-x64_bin.zip", + "checksum": "33041d93d5f6f1c6b4d0c2adedc0beba28ca2423af6976973fdf2f2b02efd8de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B31/sapmachine-jre-19-ea.31_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "768e4cfa000dcfb515b337e6b5f3612a5c1003f6e8917893785d6a8cbebe6c5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "bd208296f8603ef31c8f17869d43c81b1472698da7dc0e26912a08e5b675c764", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.30_linux-x64_bin.tar.gz", + "checksum": "4b793a71d8c8e0adcfe9b891a7539ae1e927b8854af05f897a0ba2dc85851845", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.30_linux-x64-musl_bin.tar.gz", + "checksum": "19b69b1458735c1a99b2b59c3b7262c6ecbc9dd3f25e1a74be6b88bac68b1d94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-eabeta.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_macos-aarch64_bin.dmg", + "checksum": "7cb0a138cef9c792b88730c45adaeaee71e880b31d35f6f97ca157259ef3b828" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "e12d8a6a447ac9101e917466d42e1f4e42b443e43c11685cf02a2f0b7fe3a3dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_macos-x64_bin.dmg", + "checksum": "d4a30224184043b23d127f199684a4cab534451d44c3041aae61230ca674b8c3" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.30_macos-x64_bin.tar.gz", + "checksum": "60595872764e3e4585d1a26a39e5c45abdf706bbc9c21ebd27fad994313137a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_windows-x64_bin.msi", + "checksum": "abb9c619adff9ce25d845653fe46a67abe5265d76811ce3f30efebc85d96075c" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.30_windows-x64_bin.zip", + "checksum": "cc2f27afb653724c67bbaac747670db6f1202eac8de6ecac63c121cb85a8dc6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jdk-19-ea.30_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.30_linux-aarch64_bin.tar.gz", + "checksum": "eb2e3bd39576eb90d4ec6b0e1a33181fba198475374e3076b681b3b3ecb4af32", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "bb1d297e48fbec817b71ffd957adae61d6bc40037ff1b2245b6d8760e19d1e36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.30_linux-x64_bin.tar.gz", + "checksum": "10e43fd3044cc19c10525c4e5f0208be867f17b9dc2de17fc08fef6bd910ed69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.30_linux-x64-musl_bin.tar.gz", + "checksum": "6be37ddef6c5f2bf61f7a9d0b82c8d5c8b314cb1d73121d2c84a9bb5481f7201", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-eabeta.30_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_macos-aarch64_bin.dmg", + "checksum": "5cd6cca1bc2e395bfec352fb3fe133d11d91a62b2833fefbb90112de3dee8bef" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "aee7e92f843300ad81125c1c897fd7bd323ce8c70fc64bac595147403553af93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_macos-x64_bin.dmg", + "checksum": "bb67825bee8deed4845e6945145d68d17dc00de61d5e4ea82f4bc583b4e4bbf0" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.30_macos-x64_bin.tar.gz", + "checksum": "b49e1567d186cde9e9b5eb0b04453af86e069f9ca15a4ca7918e66f39d13106b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_windows-x64_bin.msi", + "checksum": "3bf3eba7797d16f04aedb1c397e88a39164b55bd2c909ae8d84685a8399de7cd" + }, + "zip": { + "name": "sapmachine-jre-19-ea.30_windows-x64_bin.zip", + "checksum": "b82d3b6c00dfa1dd61c5587c554fed33c0f5549a2598c4fd462fc55fb7293cd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B30/sapmachine-jre-19-ea.30_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "106b9748a18e26cbac2ba979e2c2336150b83a643d8e7b4e05fea4530f0197e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "b0d06890ae38fba4a95f2345c393ab1e3ae7e9543ffcc8001b8a548855a2730e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.29_linux-x64_bin.tar.gz", + "checksum": "06b1993437227ca8193e25147e1070f3d0bd4f7ef1272025b6b8445a38bb01ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.29_linux-x64-musl_bin.tar.gz", + "checksum": "c3c7aab83e7a0c759a467cc764aacd5a0bd1a3e1e94a5a4013cdfb09df48f4bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-eabeta.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_macos-aarch64_bin.dmg", + "checksum": "6b13d753937ff9574907fd1d1527126f22a335df5bb0ed94484e906f40d857d5" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "88770c7d69322776ec1f47fb12fcdf6cb0d852077d2fd3dbdd2da95e8b97bd68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_macos-x64_bin.dmg", + "checksum": "f0aeacf50b6ddde9e14f3941625666817cc506480c5b5ddd55ebda92592d71e5" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.29_macos-x64_bin.tar.gz", + "checksum": "87f9c667183d487f9ff6a789b77fcea2e836df1333fdd168b0c0fe854b337c8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_windows-x64_bin.msi", + "checksum": "bd7d8f90b12150283dccac8135de1d979d9bd28585dacd7bff7fd50c4f80a519" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.29_windows-x64_bin.zip", + "checksum": "9695948e4ff7924bbec0fe396f0b1c86523d57758525585c448f7aaecee0c3f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jdk-19-ea.29_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.29_linux-aarch64_bin.tar.gz", + "checksum": "a3473a59a4e21eb80063daf45c4aae6e88db9dcaff233f4ad993c765c0964d73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "0b7578b87f96138a20c3a90a9add25e2edbbd41bdcd70479f3f32859445bc0ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.29_linux-x64_bin.tar.gz", + "checksum": "ce7a4008894261a3bd218ef7c9c8d737a47432ddece4df4c5d78f1571dc81e52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.29_linux-x64-musl_bin.tar.gz", + "checksum": "5f0827ed6c7f9cdb3da76f8e086ea935044f3906ab678169a801e4eb0b7d92fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-eabeta.29_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_macos-aarch64_bin.dmg", + "checksum": "9eefa71a949e056bd763157015a4f2ee4e7eb7b70483975dfa0a41086a68cf08" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "27d173acac8460cbceb2b1f12d2ab58d8e4a3d6a2b994b5c1aaedaafd04f87ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_macos-x64_bin.dmg", + "checksum": "90018a89bd40e1ba103b5acd8770d7357d933504544810c7a9daec04f461d316" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.29_macos-x64_bin.tar.gz", + "checksum": "e4430044914878fec17db104fa4d449e29c3d522a24ab73b5c37875497d7eca7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_windows-x64_bin.msi", + "checksum": "22c5340ee4a6288144d88d51b817e1bea730af5cf0c2ffe90629c080a5492276" + }, + "zip": { + "name": "sapmachine-jre-19-ea.29_windows-x64_bin.zip", + "checksum": "d7ec90602eb6df47e3fe499300a349ccb8c6a574e2076d643d115086099ca91b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B29/sapmachine-jre-19-ea.29_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "c678d8014838328f6713470551bc946f780d60ad1b290d1ce6c68ca9bcaf07ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "6e5727e7d1616b2d96fd25d203af06b65206a291e8e54f8c58391a5311891f40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.28_linux-x64_bin.tar.gz", + "checksum": "3b6e99b1e255f2979dabe38d972c4a7ad47d9dcb05eeb4843b4095537a3c8cfa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.28_linux-x64-musl_bin.tar.gz", + "checksum": "5742aa10cc6da8571b284fe05d4009a6d95d683b5a7d05d9bdbab55d8c5f0507", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-eabeta.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_macos-aarch64_bin.dmg", + "checksum": "56f1ba5f12744eebe4ca6d6fae5c4d9cefb2bc96d7f08967a1c7195d081ddb72" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "145bb4893864b2cda42779cbadefa2cc860e8dfe9cf02b39373bf2401312c931", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_macos-x64_bin.dmg", + "checksum": "35435751f5ec8cf54db092811af25fb25354e6e7804ae739d105553203307221" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.28_macos-x64_bin.tar.gz", + "checksum": "c4bbf5b6551bf355019f8d9367609df20e0b7b5b01b0c01a9d80b3d5c5063f1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.28_windows-x64_bin.zip", + "checksum": "ba9941e114354e1916662cb0394b63ab553166cda075be55581e93c2ac979882", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jdk-19-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.28_linux-aarch64_bin.tar.gz", + "checksum": "6ab2688abb092b025e3e00a9dc12d5e788af93f7b9b1fb54b1f4bbe710d1f4e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "94ea55604b02e0ba0938de0eac00a69ac2463b63ebe0250233f9d442cbcd97a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.28_linux-x64_bin.tar.gz", + "checksum": "569fd470ebb7749070c86afd817d5611230b349b3b68a637c15ee05df25d6b05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.28_linux-x64-musl_bin.tar.gz", + "checksum": "94a3a6fbe99c35a2bde2c1941a50b11d1646aff5b4c2baad12bbc79dc97bf143", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-eabeta.28_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_macos-aarch64_bin.dmg", + "checksum": "dbb372a8a45daee45867a4c6e8bec2bbf93614306f4b596920a187f9c925d305" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "39f4c5a2aeddd11e045e0aafab78569037a7298ca346316bc0d11cf6f180415e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_macos-x64_bin.dmg", + "checksum": "0ec4048deb3bc72d8bb3a5c47a80127c3b97834b59d2ed50b694e850f6b75141" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.28_macos-x64_bin.tar.gz", + "checksum": "1b86962d41fb45fbc8ab5f140249cc1cd400c9c2600da7b85f325d4c93bde570", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.28_windows-x64_bin.zip", + "checksum": "cf02931afc322bea9b0abd79d9714c3737fa6a2582ed253f5df2ac5e43da3e44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B28/sapmachine-jre-19-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "185b0bf4295528a1d40210c1ca106a4d262cfe31297c0e6dde36244c00567e86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "f65293ed0fd1be9496c861bbf52d9fe5ceed83a59516c26d1d35d07ddb35e3c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.27_linux-x64_bin.tar.gz", + "checksum": "29c9c21acc2c0bdd3095f94b92ef98839e2dcbd9d54c4a7f7f84b06bc4ca0a3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.27_linux-x64-musl_bin.tar.gz", + "checksum": "60d79538fa472bee894f05173c7340db6addad6b854877411e15ccf388227f98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-eabeta.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_macos-aarch64_bin.dmg", + "checksum": "7e5f845e34a5b0f53cd66631af8d8a6ebc7657b61a4946fba4283765df93e89f" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "940666fa855877cb29c636f6b84ae326574fb7430b8f8b904fa42690504e634e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_macos-x64_bin.dmg", + "checksum": "efc01c5743575ebd5266b6617093a369ac77b97438a1fa79707d3b2ae9a93461" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.27_macos-x64_bin.tar.gz", + "checksum": "d9cced9ac30cd746da4a6db5afcdb0fe39b9d98e6ce934ee8f2994e7ad72f25b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.27_windows-x64_bin.zip", + "checksum": "65842dc1097e5dde649b98f6b21379771cd12cb3724f73e32d8ecda86bd650fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jdk-19-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.27_linux-aarch64_bin.tar.gz", + "checksum": "cd87858565a4cfe3c4e9496f0a8f58bb6349e3ad3c9c9947c4d642ebfc8580ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "04af3b0f1959bf9a16c9dbd8d8b85b66b47e97e0483061a57563d90856cc264c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.27_linux-x64_bin.tar.gz", + "checksum": "3eb95cfb3c78c0239d8954827054627d7360d6efc78f34c1e9e1c10ccc350537", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.27_linux-x64-musl_bin.tar.gz", + "checksum": "5cc713087ac0a33dc0a61931f52d019bd001b9a9122ed85b243f479fd3e0a3f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-eabeta.27_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_macos-aarch64_bin.dmg", + "checksum": "d24a2de90642c551178ec76064c97f865e611c18f08fcf451817163ee7cec0e9" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "c134fc6010152499f65de9d855cea5a36ceca2c393807899775c9352194db2db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_macos-x64_bin.dmg", + "checksum": "0434be38722c20aabe4c430cac16ba8f7f239cc1b72966acf9f00800a448b5ec" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.27_macos-x64_bin.tar.gz", + "checksum": "eb34fd72838381763127c60046ece77c9936002bf4fb3dc398a425f855b1e64b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.27_windows-x64_bin.zip", + "checksum": "7ed3564ba811ea7470b6b01674771d56a8bbe369c9b6b5ce9ae4b0d9952843b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B27/sapmachine-jre-19-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "45a319a8efaac907fa7d2da7529589554e8c2d0e9bb3f436aaad39a3305aabf5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "01813aba4950d372d33894221ca223242c1fb485fe9d767bca6147142caf43c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.26_linux-x64_bin.tar.gz", + "checksum": "3f10198ecf5d4d5da2ad3c20ae848f3a2ed90d07069dd9acef6f1fc28073583e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.26_linux-x64-musl_bin.tar.gz", + "checksum": "60d79d7070a2164f94fe38df32bdc0c7e20c1cbb1df423e1737158f6243aaa6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-eabeta.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_macos-aarch64_bin.dmg", + "checksum": "c1d5e0f90f66e3ef7581c377477a51c126062ba7e66c8fcce4d1a0a95f4edf3f" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "3cd8e1eb6689e962a33634264857cfc0041cfda45724aa9247cc771ad4f3cd4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_macos-x64_bin.dmg", + "checksum": "a20050d1e52fa226ca9b2db88cb5624123e49a9e0b35add8a6aa1eaffcfaa220" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.26_macos-x64_bin.tar.gz", + "checksum": "b4e0e154840f8636ff24ffa113e13cf198f76436dafd296a27811ba0469b5ef3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.26_windows-x64_bin.zip", + "checksum": "12031d8dd8e5acda111ca38b5106455d7c0abf0e78016be73e270caff0c098c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jdk-19-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.26_linux-aarch64_bin.tar.gz", + "checksum": "b552ad97954d8f22caf4f3825b2ef82b165739f0d762017b8c827e9e5bee019e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "606d1f40a77316f9cea4a9bd37b1913bc1239fc31509c3c72c5eaf9945982e7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.26_linux-x64_bin.tar.gz", + "checksum": "7edad171dcdb0b18c4dc291b9f9f0175bffdab5ea98ed53a9b7cf81928ff27ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.26_linux-x64-musl_bin.tar.gz", + "checksum": "81252463a64bb95174e1f50fc399ae9d14600d36982ae2b20a3c50691c5cede5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-eabeta.26_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_macos-aarch64_bin.dmg", + "checksum": "5c9205b9baf4e9d8d9c98b47b6532127e498d228f0ac5cfa6a886059b7fd2d16" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "6afb039c4e2db9224ff2cefb2e331b95f6f778b15b72316d48d2c05d3942b0a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_macos-x64_bin.dmg", + "checksum": "5ac2a89e2fc88007c216afbdc710e73e06dffe0bbab1f4a0752734b890b7b9d3" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.26_macos-x64_bin.tar.gz", + "checksum": "b9171b5b6406c3b9e9c5685267bcb6c0f4fbf309425a05310397a20ae03fc9d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.26_windows-x64_bin.zip", + "checksum": "7ccba189ae85d8626c9b05bc803b51bb4afe390e01a15a06921e4f6820027266", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B26/sapmachine-jre-19-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "1291e9ea42c3ba3e9b91217706d3227b0d4bdb5cdbfdcd198d5ac06542a7808c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "bdfa51de4aee791292fa7b7111ed352ce485c59a1e3da5726fc3279b7b6adf60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.25_linux-x64_bin.tar.gz", + "checksum": "3b5809f6182d8299f123d534eb0d6af048c06a4b46d5a957b773cfe92a8bf49e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.25_linux-x64-musl_bin.tar.gz", + "checksum": "c2928cfaa8784dbf54aaca073efd65a7af33d8d3c770cf6740ad12def8a401d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-eabeta.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_macos-aarch64_bin.dmg", + "checksum": "57ca8a08325f64a1d4164b4f408b89ca4fe4c52bebe66141e65db2552be128cd" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "653d9dab68db1b42a634e5d5264f034f0f76b989eb254d664b3987d14cf03fa8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_macos-x64_bin.dmg", + "checksum": "8d144cbb64870dc96d746ffb6a684f6657f762f73bb34dc63d4be378995f9f0d" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.25_macos-x64_bin.tar.gz", + "checksum": "d3f2999e08f35b29a11070aa345013964746e87b27be7a99cce93c4595a20ef1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.25_windows-x64_bin.zip", + "checksum": "39614cd2496ebdd58bc0abc641631032feed9c8905c3debef625ff6140753c08", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jdk-19-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.25_linux-aarch64_bin.tar.gz", + "checksum": "de12163dfc25a56d9b92e153e3a2c86670a567374296329c001d3faef9562bfb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "1fa378bba72b3472d8723603d5b6a5f177801bb4a82073662f262c101f9cc73e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.25_linux-x64_bin.tar.gz", + "checksum": "be87dbf2d2854ee63962fc3cea7f2a49b0ef39e66e990c8475b55a39186fa50e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.25_linux-x64-musl_bin.tar.gz", + "checksum": "00fb71a34eedb2c12ad0c2b183535ec99147890a0a9833d4edbc1da9206d7fd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-eabeta.25_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_macos-aarch64_bin.dmg", + "checksum": "b760ce3c638262ad7c346c42a32be7ef4f915c14724fefacd175531bdbe64aa6" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "3699e2506920848553c7ce823b0cc3b5d6d2d0d37e8c3fad2d7ffcf154dd4e84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_macos-x64_bin.dmg", + "checksum": "2afb62fb5fbf3ce961ff05bc4245eae8693e3d8ab1a4e914ac7bec028e4d5736" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.25_macos-x64_bin.tar.gz", + "checksum": "4d412cf0b4d7902a286e9e4f1405f298f8f3047639930347bb2919165dffcbc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.25_windows-x64_bin.zip", + "checksum": "8f011c7a49a6d82b6b4c97a92b6bc3b36a5ca06c776813f3d6a5eeadaf84d008", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B25/sapmachine-jre-19-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "e2b99706c6d3f2fd60758b2969cdca8fc1cdcecfc578340bb2911358bfac7818", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "8459aba60dad0de9991a7000a85bae490a11a86fadd6d5d3ecd3726d0f1c5ce9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.24_linux-x64_bin.tar.gz", + "checksum": "c9d1d23e5498ceaa30d4f6714956f17cf55f650020a861c87db3b5963cce90e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.24_linux-x64-musl_bin.tar.gz", + "checksum": "c3602d87b1d8c6c25f2389201c4554f3fc2f1a7e4f6bdda33c337c1bb4563fb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-eabeta.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_macos-aarch64_bin.dmg", + "checksum": "8d4198eba93351351cd33e9db253ab36e45902bd64a9d43df97412f7ad4c33c8" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "e1cfb4fb9cea22c2075b04f1f898acfadc2dd6c89c1a4a69444dae3c3cb38ab3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_macos-x64_bin.dmg", + "checksum": "036d70871846cfc20b50c1d744a76ed19824617427032af53130b2a01dcbe4fa" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.24_macos-x64_bin.tar.gz", + "checksum": "ce0bc39fdb7375a158b189217f8510fabed42e484a0b349bc1f66622ffedabb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.24_windows-x64_bin.zip", + "checksum": "58bdca3722ebf9a7b5a00235d1e5ec33d42ee385ac0619df6f6378a19f5987ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jdk-19-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.24_linux-aarch64_bin.tar.gz", + "checksum": "2690f835684b1ef9d7184a4a585b06cdb0c41d21c75dc654895ee26ca1ac62d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "b5709092eb5063ca49fe8a8c5a6cc285a08c0bb3639e20432f3798ab0b34768e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.24_linux-x64_bin.tar.gz", + "checksum": "1545ab1cf95a5017826930fc6a6cba0bf0d8e2ad03be829860395698464760b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.24_linux-x64-musl_bin.tar.gz", + "checksum": "9485b992562909d592f3ee280bbda1988327cf2b5edbe1c9d4b0e79b9f354678", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-eabeta.24_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_macos-aarch64_bin.dmg", + "checksum": "4727c5648f762db82e7dcb5513bf87d741be90ec8977e3beabdc8a79e7a51dd3" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "9b944248587197d57bf85f1779db7a088816e078af82f79e7ac3556d74abbc8f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_macos-x64_bin.dmg", + "checksum": "8baefd939ea2644f5abacb402d65ae41549e7c0179ee7b738c52944d8d9ced19" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.24_macos-x64_bin.tar.gz", + "checksum": "fb83439fca386880a7a6c49005db54256614872b73a0430d6043be286c28c80d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.24_windows-x64_bin.zip", + "checksum": "345722862c589549d490385ce9b91da254e39a4c04284d4dd6ad1e838fff187f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B24/sapmachine-jre-19-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "eb6a3724276dce04d2fae7d340a18a1f8e5dd7e8d03d60b2e6f910faf2020d8f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "f9371d60ef454d73a1fed4dfb6a11e5d9cb04e821cd7004855a24d95effc337e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.23_linux-x64_bin.tar.gz", + "checksum": "0530e5dd1a7ed2206e38373832901e4ce10fef1fefe58a6ab78d1a49432bac95", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.23_linux-x64-musl_bin.tar.gz", + "checksum": "5ab409cf188e0d99e8d026d7b6bd9f1ccc1d09666f2a81e11be5a0b61bf2c12a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-eabeta.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_macos-aarch64_bin.dmg", + "checksum": "6c7df06c0eb624154a21e3e75e665c40354384e59c479f3ab45214fad1901719" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "2dba7a425301249bb9d93c0527a850eaf2bb2b9f5ef84c1e651ce9c268c3f5ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_macos-x64_bin.dmg", + "checksum": "72887148b6870147945bb07c637d7e6806c03576232a635bd98197d8e917288e" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.23_macos-x64_bin.tar.gz", + "checksum": "8a0f76db292b2171bd8cbdbabf9e9b25a6476ba649dcb9a7a9da66385aba26d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.23_windows-x64_bin.zip", + "checksum": "cff9f7741871df8dbb07a97493ade8af29f716baa0ffe8720c716a45a37bbabd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jdk-19-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.23_linux-aarch64_bin.tar.gz", + "checksum": "34fd59878da63c85eea4fa730804fa8926145260cdb05d4b1b04058096528e24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "8c0febc24465cf9321a5c6ee80419fb9a6dde104f7a135a40c66b5c10756386f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.23_linux-x64_bin.tar.gz", + "checksum": "edd349aeaecd9fb9f03b8cbeeed04b065cbe427e5a44ff08e5f3c13ddc51803a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.23_linux-x64-musl_bin.tar.gz", + "checksum": "147162ec82bd85822d5c473f4bc3def80c39608ade1cdf8253aade8e86039ce7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-eabeta.23_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_macos-aarch64_bin.dmg", + "checksum": "da4f077370aabf55d4800bdafb2d20fe91591eabc9dc04b0512a1205bf7f06c1" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "ac54a5e09754ca9bbdaa76c8042f1546210a29798bca8a6c74b56d457b416903", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_macos-x64_bin.dmg", + "checksum": "d3d57b58142dbe1f1a45fb9b31c25af6f9aaa12787a22f10a9fb833779509b82" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.23_macos-x64_bin.tar.gz", + "checksum": "7b62d14febe2eb590a397f4d6af5ccd89ca2994272d56c9d2bf4b17b4aba8532", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.23_windows-x64_bin.zip", + "checksum": "80e8d74a0b3f659b445381f016b9bd7ce33ea2f1dbbd59d9c2b0869b44f8f2a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B23/sapmachine-jre-19-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "74e87ae9ab531dbe54ea35f139a793d301d061ac546e80523e2186c8417ea2ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "65555d8dde603339d48a60eed72956689e58de028f16f21edebaa32e48584497", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.22_linux-x64_bin.tar.gz", + "checksum": "8b93ddba700027403a9de710d6984e08f31af6d1e9edcae3b5ef94bb479a6e19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.22_linux-x64-musl_bin.tar.gz", + "checksum": "78518579eac70e7d57210adbf13fe3bc70ab9699392576163262ae472b677ab4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-eabeta.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_macos-aarch64_bin.dmg", + "checksum": "e53d2bf1b9372c16663f5ac419c1541bbf98c159f8ff36a05b27c14ff7f63074" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "3ac26d62a58616fa972f174ca32b9971e46a16001b2020683d92c33e7583c4d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_macos-x64_bin.dmg", + "checksum": "cdc742b3f01e23d9a5963721e2d782844446335bdf29f72489b5e925b6a43cbe" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.22_macos-x64_bin.tar.gz", + "checksum": "5189679fd1de247ade0f64589c0b4b87fe1fb3a7eb324b012eb3047f7368687a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.22_windows-x64_bin.zip", + "checksum": "7ce5b9a6ee3836b83ec129fd7c4d19839aba800bf207c4bf204cb9ec9dde1454", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jdk-19-ea.22_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "bef178d4cfc315aef878ab643f61e9cd344d8523da31a1e233c1937a48dc3614", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "1ac4be393295ec896155d1717ac93fe7920cfc212dc85fab8c56d0e805a8f654", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.22_linux-x64_bin.tar.gz", + "checksum": "f2b21f01d3fdef5ab1da48054065876e57488e86c765654a6a3e4ecb0d86901a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.22_linux-x64-musl_bin.tar.gz", + "checksum": "0e0eb49299dd2e54d38b5d853859d29759de6f715ec9f8f16b8ec43c94a23af9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-eabeta.22_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_macos-aarch64_bin.dmg", + "checksum": "298a1d520a8b1d0d37d63a2f873e6e589ad55b9db5eeb318d18fb76b4e3ed38d" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "4262924c46909a4c923f572da2f7e772fe82d6523e87c10c197e26cf0f32a216", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_macos-x64_bin.dmg", + "checksum": "d6a6f68d53779a4952b9ec0c57e7fab35086827363d449c24856d3c17730eb3f" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.22_macos-x64_bin.tar.gz", + "checksum": "66389c0087c1d578726add49ccf5f7f9098ac135476646f31d1d84dc1f97c02b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.22_windows-x64_bin.zip", + "checksum": "fe40df6167a4fd4db707962d53a2fb42a98cb6c3fb7203d09744a7b1777044df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B22/sapmachine-jre-19-ea.22_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "0de708a4675877759152478f4dae473db22d71c34fbb178c13237524cdd6520b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "c370b860ba6cf4026cbf87f48525b4c04a8afcf5c04ad8104a928f235f60437d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.21_linux-x64_bin.tar.gz", + "checksum": "adf07114f91aebd116eef435f5bf70272728cd8c0f2b30221e76de69140dd947", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.21_linux-x64-musl_bin.tar.gz", + "checksum": "2ec0f3d0b311b143f827e7f78e456a1dec29cc1d2d6a8909f38b6e4d6e5bab98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-eabeta.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_macos-aarch64_bin.dmg", + "checksum": "34cd18d5630f7626207ac0ff72e4cfe2037910301950bb7093826fa08c42f86c" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "6dbd971fab64c279d4e982babd6bc847214ab4c1a0ebd0c974a2180f81ea9116", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_macos-x64_bin.dmg", + "checksum": "6daf4240754f233b5048adfb2d0953181a75de2521494cdff3b984d0475df4c6" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.21_macos-x64_bin.tar.gz", + "checksum": "f60b38b7fbf4adcbf9c4688d56f84efaf5524b328b46a66c384571cb618ab6e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.21_windows-x64_bin.zip", + "checksum": "93fb587420610ebc2470b5a335a408ec2a8a31394f41ded40222eba051f25470", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jdk-19-ea.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "2b5046c8cadfdf0f9740bb12a31c2faf8d96b7486622657d5480acf4e42d91dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "72d370758f9b0025fae97c8e08356be900b20bb69880cbb954375996b3d02e2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.21_linux-x64_bin.tar.gz", + "checksum": "3f552008b5212ef1efd80a9d439fe527701fa3cffc094fdcee11668c1afcbfb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.21_linux-x64-musl_bin.tar.gz", + "checksum": "8d2f76ee2ed3b67d969363ed110b41df6f3607a8376b5422efb4f83f45396260", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-eabeta.21_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_macos-aarch64_bin.dmg", + "checksum": "7bfda666f3e604348e698a4983ab7f3685419964b9220b5e81149ce9f26b2b9e" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "3fea1c3781d38916686f7493783615e130453402dfe46f22808593dccfd7bb6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_macos-x64_bin.dmg", + "checksum": "ccfe475770bf5b473d41fe535f5279f22e8e4d14949023c28b63f98e97aabd14" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.21_macos-x64_bin.tar.gz", + "checksum": "b6c9c59976cba770b72113dba84201db24ce1dd28b6350e1a9cf002814950be8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.21_windows-x64_bin.zip", + "checksum": "29277a48672a9a1c34ebc75b485b71a511d2e04b9a003818ffa17de04276c818", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B21/sapmachine-jre-19-ea.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "279b19d0b0fe7663b147c725d6de1cf069e52e5f0dc62a3226a4e9ca8a8713b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "a4882f133fb64cb75f83321916e2d8ba4cf7ad4bb75eea20ceb929d6f4a46661", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.20_linux-x64_bin.tar.gz", + "checksum": "0e35f2faac9518808384a6821ad4fbfec6ff4bb5b02175d1350800a65dc99d74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.20_linux-x64-musl_bin.tar.gz", + "checksum": "e0575780f1066027a4d240c50c1b3aaa64618d2994b12b06cb30faef3b5c0d00", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-eabeta.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_macos-aarch64_bin.dmg", + "checksum": "612a5e327f645fe6108d90e0df404ea49b6be2652cb0100575020220dfb4f2f3" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "1d33a72bce2cb2ac6f64310abfa35279261c2cdc180a6da2dd5b4ed80aae5e81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_macos-x64_bin.dmg", + "checksum": "5ca483794152bbd95f9f81f6ed79ed13dec226d3d55a1586fb607b42498463be" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.20_macos-x64_bin.tar.gz", + "checksum": "ec4e42309d205dd12fb933a70487f638fac1850baa9ec2456ff27aa1001024c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.20_windows-x64_bin.zip", + "checksum": "e1a5ab2727223eef0f268dce0bbe5a7c87f3da15841c78a4a7ef54c61daebdcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jdk-19-ea.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "d482cb8df3e63aab168bebcc81a2ec642677099c443c16e5e06d3eb36deac3c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "48c8ae1cae5c37b983ddde3525cfe478825b8a30a7fea3cc2c3b193293f4da7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.20_linux-x64_bin.tar.gz", + "checksum": "e71502ad99f896c7976df8cfa62ca62307702416db7dc8cabe487ca287af8b8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.20_linux-x64-musl_bin.tar.gz", + "checksum": "2c51ef57ed63c9c05c4db6bf572d126f2ad28314184d38f73999c89d44b47b8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-eabeta.20_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_macos-aarch64_bin.dmg", + "checksum": "3506b35b761fd5a484dff5dacb023256fd2cef94792fad6e8fccb6a1158187a9" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "f97d36e80ae2220639116905f58dcbed34f2b0b38755c482261d539f0dd7721d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_macos-x64_bin.dmg", + "checksum": "332c16f6c237f3ebecfdfbca769dc7783756ee944b090af06d5cbd04128d766a" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.20_macos-x64_bin.tar.gz", + "checksum": "11cfa3b13b52edc0886ef2e1ab44270d513f2fc1c38400af4b13143a4524ce09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.20_windows-x64_bin.zip", + "checksum": "6fdab5f8da0603bbf6fe4e6a82279baedc62cd2a261312151c73d0a3ab2c2928", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B20/sapmachine-jre-19-ea.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "413cfb4dc882fa3c0c07c5ef81b5b6d23a98c1275ad46a94f602e0757a259366", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "40e829b8d8c6fa29c2abbeb101cb8b08b9ba439e3feb0c2013ec06566cd659f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.19_linux-x64_bin.tar.gz", + "checksum": "5354986d42cb58ffcf1ffb116ade52c659cccae5522b15eb750a5ae86ff1061b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_macos-aarch64_bin.dmg", + "checksum": "5e8a5651d31e0193f8f82a70bcb63e0bf12acea9192167fbcae36f82b6d52778" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "50de4ab553274841b39d195a8032fbaeaf02141b98a03bc213c81e46918b1b5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_macos-x64_bin.dmg", + "checksum": "e1046e0d8aed0e84131130a39710dfc8ed1eee75d308d5f5b112f7257886a384" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.19_macos-x64_bin.tar.gz", + "checksum": "0f6aba80ea24fa1b871d7bd3c9a898d2cbc70ed7d0155298a9e1b008fdf58936", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.19_windows-x64_bin.zip", + "checksum": "69f41cd5491134a9293a7c7357b7b36068a88c7c3420debcd521a567af2d10d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jdk-19-ea.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "a00855e9c3d6937ca7954db8780ef7d4f0ea5edd0a07260d63fb9aa1923e88f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "8eeaa27826ec9c8527d76ee93e3a866fe45b31d09940d08cdfcffdc2d6284412", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.19_linux-x64_bin.tar.gz", + "checksum": "0b7db813cf475b4aa07aeec74bcbb06cced0debd5d51245f369378e70dcc607e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_macos-aarch64_bin.dmg", + "checksum": "c51d473ef21702122c42bc716a0e22985e572b6252ae9dc005609ad084fc4030" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "bee3f3871d6c6f63cb335dca304ebe87bf340159201b267a2f7b8d78732495f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_macos-x64_bin.dmg", + "checksum": "712679825691dc17effad1afca48cbe2387a16837daa26ff811ff9eb325b92f9" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.19_macos-x64_bin.tar.gz", + "checksum": "d1bfeebfd1144e96db873f78a3db6232a4e22742d250bca8b95705f807acc04b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.19_windows-x64_bin.zip", + "checksum": "bb003113ba373c1f6ab2ad6a498d299047d7e657a474eb761bb5b4f26515ae4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B19/sapmachine-jre-19-ea.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "86602e3b60ef51393e249cc43cafb5db6b6ba9a4588172c376f71a377be93962", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "6b06eb0a2715887d276b19d9c41632824bdcac6e3a2ec167575385cebf3b90a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.18_linux-x64_bin.tar.gz", + "checksum": "6b0dfc47e7feb8ee7aca05471b616f1585ba1c47b01a7849f33242c30fa4d07d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_macos-aarch64_bin.dmg", + "checksum": "1438a87152a923dca6533d0804d92e0084000b3df9a0591b805c1fd52fe76b6a" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "f201280141e9166f7c3a4b3dad27d37d10f167f33ae93ef7d7c2a00eb77bd128", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_macos-x64_bin.dmg", + "checksum": "0c82e6402907068f15d58fb5c53f88c38b7b70879ca590cf63afc5b4df1b1634" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.18_macos-x64_bin.tar.gz", + "checksum": "83e385934b575cff05a7e765edcbb44b9fff2789abb1090ba3500e93e0239bd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.18_windows-x64_bin.zip", + "checksum": "3e71f6b6cb66019bc74238f02e6a8feceb09b3308c14350af84e22fde0112e91", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jdk-19-ea.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "37d7a581a147a29938eb89637267355c7e9121c8ec7d50c02c05d2a4a8a003b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "288d982da5899da7535a941fd801ac47d115025d0c1ba851585aacda464f29e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.18_linux-x64_bin.tar.gz", + "checksum": "54c7a961a0062f5fafaf35e5b3b4ba500daf676f8fa4628834d2d4178cbe054a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_macos-aarch64_bin.dmg", + "checksum": "d15fc072e2e980cdbb15f332ba9e65809eadcb0046e47a42a24d7c37941fc8f2" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "b8fd565ad6cb33dfa8b9b285f58eac4607f0250d0cdadaef629d89a5d9fcf36b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_macos-x64_bin.dmg", + "checksum": "b3ab2e389045c497a1b26cc08373ff1213e7814d98286894a41a66cd01b90493" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.18_macos-x64_bin.tar.gz", + "checksum": "62f5fcc3e26622c581dc5edec491229afb9bdc7651265533c173bcc79082e6f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.18_windows-x64_bin.zip", + "checksum": "2c47f2b7207647c272145fa8248df571bb49bfb8d3a5991c3c274074f35df6ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B18/sapmachine-jre-19-ea.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.17_linux-aarch64_bin.tar.gz", + "checksum": "1df989fe8f243b6c069050d91310b37b9042df9aae5fd316063f7547ea8b09b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-eabeta.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "cd8265060eea98eb0a3990ebaf1026539cb2ecbbb5bed51decf753c15fa17241", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.17_linux-x64_bin.tar.gz", + "checksum": "b39399dfbef918db7158a2014779f8396956e21a7d51adb6f37082a2bf5279dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_macos-aarch64_bin.dmg", + "checksum": "a2422f1caa0e7f93412bbac8be0578ef5e96deab15deb5a0496630f018d99019" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "25c32b7df12fb2fe4c7bff8a4c839f75cdc4c680a9a5354e04990bfc0fe27f0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_macos-x64_bin.dmg", + "checksum": "610610bd11ff29c29603d98e851fe28b9a2661899f0fb6fba5acb1cf86cae893" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.17_macos-x64_bin.tar.gz", + "checksum": "53fb28586bbe1a8c5fa90ebfc8e040fb60c4dfe6f1a68f4789dae35c0db81561", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.17_windows-x64_bin.zip", + "checksum": "586ca3dc811b8f8b767b7ea53cde30fb4c00fe37433690db058cd2c306715c7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jdk-19-ea.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.17_linux-aarch64_bin.tar.gz", + "checksum": "17ee25222539555f40b1edbc694ec3d51e37fd454007617279d78fe15c13961d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-eabeta.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "fbf746340fc1307821eed4e1a06e7316a7f2a52cb2d2b663cf5195424b043482", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.17_linux-x64_bin.tar.gz", + "checksum": "62cd3425a655841949c45f5df37912bc11e3b1ab60eaa61dafe001dfe36e8c0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_macos-aarch64_bin.dmg", + "checksum": "10eff2665cae5aac29cf16839b274a6e9eb4b72ae7949d87e330baf03cae16d5" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "66aba6518e580ad69d9ddaea431d4a907b0aec35558181f33b61e1107de1e878", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_macos-x64_bin.dmg", + "checksum": "728e452a5184871feaee856d6850d28ed80371cc4db13fe1b2d4d2d26d7fa70e" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.17_macos-x64_bin.tar.gz", + "checksum": "21901111df9abb430acd849eebfd05ac5eea7cc82f15207d50ed7fa803573980", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.17_windows-x64_bin.zip", + "checksum": "8bc594bad386df6468034c24e78f54f76315aa6659e3edc30f21c9cfef1b8866", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B17/sapmachine-jre-19-ea.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.16_linux-aarch64_bin.tar.gz", + "checksum": "f160e4b1e6f5bdfba24d8fbc65e27f52ddd1f8f9b759f142c2901b87b620a140", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-eabeta.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "46c0f1ccaf4a3123db3f3f5142a5a7d558ec6d23502312b7431998d8951de0f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.16_linux-x64_bin.tar.gz", + "checksum": "1692d3bc4a7a46a15bc42d662058278bf676c0f17423686a09139ffc85716058", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_macos-aarch64_bin.dmg", + "checksum": "fb1a5a7c7ec3e5f225f44926bd994fd4c44d3e86c6e138e043f3c2f21cc73da3" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "9ba52c9b8f07529c3c68f686b00b9262f31fbe5cdb84c408e421010870520df4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_macos-x64_bin.dmg", + "checksum": "2d83b39795111e65a7fe4b852df27e2b1c29ad9d412f364daff56330aa674490" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.16_macos-x64_bin.tar.gz", + "checksum": "15b07ffd9f1a19197b6790cec3f825bb51cb0c7453158cbaefa0a0c0745e72e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.16_windows-x64_bin.zip", + "checksum": "9bf75ab9d6941289b26b28e1bd5b78f0e3022a1bcb88f67bb48c4bd519fb2b55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jdk-19-ea.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.16_linux-aarch64_bin.tar.gz", + "checksum": "3960d058a89569bed3dbff0eaf7678f0354a36113e764ba5cba9f2127507c978", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-eabeta.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "de11d02583f05b20732ff0a9307e61d8370711a0a93c2c96a54e3dfa44c3ec68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.16_linux-x64_bin.tar.gz", + "checksum": "edf376f4a32275540e6842491e0e65e2a106329fb07be689bdf9a9c7f6015edf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_macos-aarch64_bin.dmg", + "checksum": "17556f917c5c6ff00579a0ead2f76163fa6407f76b04abfcef386a9b04d68663" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "3a3607a5db1284edc5d8cca79bd61d5bae06fb8a2459bcbe14740698a3ae98d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_macos-x64_bin.dmg", + "checksum": "2a2aa245ee34d98e6f82350d84916c91741250b71cc45796e77f610da0aa2cda" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.16_macos-x64_bin.tar.gz", + "checksum": "9aa5b9f9c86b4cce29fcf09861595ea029f7b2c55f711846b884a9e04bee9280", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.16_windows-x64_bin.zip", + "checksum": "3fc0f53dfc7d087e4c6cea958c945dfb82131aa0111bb5355c6152e8f996faff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B16/sapmachine-jre-19-ea.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "e4316508f16b5b587b38e5129d5b40ddd9cedcbb31335abb8c94575177de448e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "c229d0119bae0e386629be967ff8af8de6a09064eeb863821720f0d3fb0a958e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.15_linux-x64_bin.tar.gz", + "checksum": "cc9c02118091d9151c7559ef1d0f3da9684e4c06b165f37068060493fb81bc27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_macos-aarch64_bin.dmg", + "checksum": "f739901b544ea5bd1e34159dd550ca4f64fd47550a630b9b382d660d4d5bc0d2" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "4911b0aee8a0e8e94c247c969a4592252b0f2375790e2bfeaa755ca054547faa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_macos-x64_bin.dmg", + "checksum": "5a27a1f49c69c688039bdfcf2e01a7f62d4d7765b8a83188dff0eeaacc237071" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.15_macos-x64_bin.tar.gz", + "checksum": "1794396363662458a89576615e42e00e08113bdc8944980603cd196cf709d585", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.15_windows-x64_bin.zip", + "checksum": "50a9b81e35de01a9be437edf2221955a3431f24bab6e5e8b6303187d0f7f22fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jdk-19-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "2f85ebd77cc321b91d14c64f47eea86ba7f160322078a6d13a6a0aa7d9a85791", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "91b1703873f60bcb09d5a74b23fdba779c7bd9bdd8a69ca9f52e989bed2dac7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.15_linux-x64_bin.tar.gz", + "checksum": "489ec5249abbe3b8f10abf5b7625ac0467823b795b9a069926d1b8fcc3adff73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_macos-aarch64_bin.dmg", + "checksum": "fd7cd8e89b5d7ec6dabcf55b1aa2c0c2bd6a77cd06989bd31f1d8b3b1d533343" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "6ea91867161f759b8fbc780812c1c4a40c1318851502c61d1097a6f86cce56a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_macos-x64_bin.dmg", + "checksum": "308571f15fd77e4241f01849ba7041f617a384c18a7437ffac717caeb4998535" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.15_macos-x64_bin.tar.gz", + "checksum": "1dd07f08cf59a120b8d01864df66fc275d044e05ece0022b4b410f27ff2e9d19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.15_windows-x64_bin.zip", + "checksum": "9b3f41e4422b3e0b2ceb9444c2152e738ce9f0dd2a61636b4ab2dd076c633916", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B15/sapmachine-jre-19-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "32fa0015aff25f80e179e1f00bc10674fdb0d40b66585092c32da816a9ac45f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "d8f351a67572e668dc0c60f7fdd0fab9954af8d38a9dd67471e9545af8141bf5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.14_linux-x64_bin.tar.gz", + "checksum": "d24fbd0fc904ca4c49eea1bba7d9bd88e836e7d7aedd7948ee33ea6c699546d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_macos-aarch64_bin.dmg", + "checksum": "95d4550cfd7946066f2be8f2ec3afc0ccd79e90f1d2d0a6a4e1a0482066ebfe6" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "2fa6435fd9e1ec5eb9e4fbf5b29790f5e9b14b53d52ddec06f6de72e3bcf752d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_macos-x64_bin.dmg", + "checksum": "2b4c5766475ad6eeeb122ac881747d34317fbc7f70d0dbf0d4cc68ba7d091847" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.14_macos-x64_bin.tar.gz", + "checksum": "e2e287043954c1db2fd5c82bd3c111f33ad07b3750c2d24d497c0f633ead790f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.14_windows-x64_bin.zip", + "checksum": "b4db8f5e5570db39265d45c51a1abf6a8df7d208569cf77ba51d4c875d165102", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jdk-19-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "c78140876de1170d887a755811d79488088102750fc1d46fa30ed0c81557634e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "6f42a59d0b3606804d332be04bfdff723c16276db654d741ac189277fbdf6142", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.14_linux-x64_bin.tar.gz", + "checksum": "e2811f4fd4853b7c87f8380431dee3fadf4308137a97b093eab3385fec91781b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_macos-aarch64_bin.dmg", + "checksum": "0a7524c2341b0ee9cb75f8c271d9894f6fc00efddc4e0c302c429133f3a5777e" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "26dd51abd58be2be9ac21276d7ff8a0379ebc36cb25c9e1b9cf7cb064b4e74d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_macos-x64_bin.dmg", + "checksum": "22c6bb2ca4b14b988af0ebdca17c87e89f8271a0f60c7625a2ec010d57ba74fd" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.14_macos-x64_bin.tar.gz", + "checksum": "9963f207b9f26845943a80343de7dbc22b88bfacab2f1a28622734d2bc17037c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.14_windows-x64_bin.zip", + "checksum": "226263b90c8efae269e44954a113292801a256979f1337a3b642819cfabef0bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B14/sapmachine-jre-19-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.13_linux-aarch64_bin.tar.gz", + "checksum": "8f868bbb8cb4e68db389d5081f77ed7687f85e2704248a1987e881dd1a30eb87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-eabeta.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "52e525e792ed1cfd065f5bbc5069f5fc13681ee2625f62eb168d05cc33b12ec8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.13_linux-x64_bin.tar.gz", + "checksum": "7cc4ef3ae7cc1f08a6eb2894b843580cc0fd6b5c7e7457e11b6239810c36a0c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_macos-aarch64_bin.dmg", + "checksum": "55dd04a1348ac975772ba073209ac4da8fc90cd70389296759c3d45dd7b6a206" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "efa8a27cc9f044104efc89b269923dfcb260b1aa10c272b8882b50c2dc57bdcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_macos-x64_bin.dmg", + "checksum": "9139ce1f99146c6ae6f5899135d05d4f3c2842b16eef5644f75250735feec1d6" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.13_macos-x64_bin.tar.gz", + "checksum": "a44478e831aee0c481dc83f944b523926a595f20f18039abe465c5e621d42b39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.13_windows-x64_bin.zip", + "checksum": "eab7cb055bb0ed4648140a4cb8e22b2fef2bf60e405646d44c2582faab5613f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jdk-19-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.13_linux-aarch64_bin.tar.gz", + "checksum": "aa2060deeb05072155db88c6cc05cff39d4329a9a0e854a29823b3dfbfbff2f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-eabeta.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "e5a46542ce71506d1d42c34b7d0525934bfbf53b5cd4fab310bea83c1779f9c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.13_linux-x64_bin.tar.gz", + "checksum": "aceea7169b2338f2dcf7818acd0fe4ba5dad8ebf833b5e4b5a5e3d3e1fdbcc60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_macos-aarch64_bin.dmg", + "checksum": "9fe75b8e0d051719dec337e270d17a5e3a8152511d5db6023d0abdc2e09cc69d" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "0f705bc9fcd3c6f2fcc5ecabf4027f34523123e89e1b8c4ec88920395bb8a9eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_macos-x64_bin.dmg", + "checksum": "7399c09d127011b71c891e9706d2ebc66e0d7fb23d61eb1e8770179dc1d1cc6d" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.13_macos-x64_bin.tar.gz", + "checksum": "2fbf4e632a6b6e9e522e99d6432835e78d0c523852c3850c593527d1f8a6fa1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.13_windows-x64_bin.zip", + "checksum": "4061bf7f0ece7da81bd1c3ce3d8f3dbae3735b4238ab16f5efe60e7e9351efae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B13/sapmachine-jre-19-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "b742a163b1b2a90c81a4982d9da15347eb4bc293e413ec5cc4d7914a769fe5c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "b3eeb4150a32ccf1919d21c4f2fc24ee9aad858768c72e57c860fd562981143b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.12_linux-x64_bin.tar.gz", + "checksum": "054142339e0f4e0fa46241d2f25d63716c0b7e46c6bc2a67677dea15a62f4eb5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_macos-aarch64_bin.dmg", + "checksum": "38b606c33b58e7f7f37e0fef8e9641bbb0634bc3a7e424daf48afa37157a9910" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "228d97331ee3b04c32fafa5d2cf4cc8ee9e92a06ad4e96d8eaea3f15e0988914", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_macos-x64_bin.dmg", + "checksum": "739cc7684a6d76ba1c1e15a1f8bd3d24a920218a02423b97963b11b65328bdab" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.12_macos-x64_bin.tar.gz", + "checksum": "d75b385c82192fa4cd76908ea92cd534a6cb1158be122089e522d1d2e08e98a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.12_windows-x64_bin.zip", + "checksum": "11b9a1548d02cc155ae3c9bc7d7d362eb76f66ba569ef57f4c99df44bd5070e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jdk-19-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "8bca6f7636d1b39c1e2af89969c91612b850ec6c61fa6eb5604ddb1897eb4ace", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "52e8c51bbde74b337d39a84d27639d2b5fe7370bd99d2bceb123d8d6f3ff4e0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.12_linux-x64_bin.tar.gz", + "checksum": "16f8b512da6a7082b21be64766b56d4867c96ed9dec8172b6d9975cfe47fbaed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_macos-aarch64_bin.dmg", + "checksum": "99f52dd7c84dbf168a808b3c159c099e1d8b60d03d6de8a50ea84954c69a6333" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "73d726abf84baebce0a82ac9c6344e08d13f0ae71ad20ee7eb12d14c6dd0bdb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_macos-x64_bin.dmg", + "checksum": "412d1acb1ed2425cdc8bfa805bd5d96547ae4fa18ad5c7e2360c6f915fd83170" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.12_macos-x64_bin.tar.gz", + "checksum": "c91dcd36f5e032aad11ac6b382ec31c9a9b6adb33cb1f2ad0deff93b59add0d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.12_windows-x64_bin.zip", + "checksum": "72528ce17c4c710843623efb771d198272ceb42f41c8d191618be0b52e672f46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B12/sapmachine-jre-19-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "15fd01fefad2f49af024af7fde7b498793194e0efde156fa1499848723fa162c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "c7f12b13dbfdc01338e733f821dd312c10fa7f282c2c1b3992e33d59ee532d20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.11_linux-x64_bin.tar.gz", + "checksum": "d01040af022299eedcb71cbef0fa8f9ea68ab5d82a620993cc2e3f8b8f52004d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_macos-aarch64_bin.dmg", + "checksum": "b1cf409c6a629766bc34b5bb20e471d3f03c075c5708035c61c2d98f96c964aa" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "9b7eb166bf7238427c10b4c08835b98076d49022b214989ae4d9d94220de45bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_macos-x64_bin.dmg", + "checksum": "7999044ad097ca5cfee958e1924a9af894c92d67022461436a5cadd306703f34" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.11_macos-x64_bin.tar.gz", + "checksum": "41d7fa5f8c64a949f42deab154f394addb17bbf731dcad87cd7d0b4531b93441", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.11_windows-x64_bin.zip", + "checksum": "3560b015159fc1b2c561269b8c9e5a70ccef9dec723c4a3f0076ce7834d02784", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jdk-19-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "53f92ef5fa79848535c5056f402c5fb7cd6687f9f362db54f9242da55f7305ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "d3c5efebd4c525a41e6520306eeac451a238c231b2f9785f2226a639531825d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.11_linux-x64_bin.tar.gz", + "checksum": "734bd43295d317129d463e67110d7872a62225c65686c04713c1cb00744c5975", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_macos-aarch64_bin.dmg", + "checksum": "7a5440d9bba78ed8e6d017963d36b53c75b18438c7fda53a1ab458ea3ab1e81b" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "ea12c16f9613f0a9097ab06590be5116eb2a1e50589fcfaa25e200a9b133e64e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_macos-x64_bin.dmg", + "checksum": "e437bf5c2018ae8b61072a1827dc3efdd58e0c28778262db2bc74af653d89d07" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.11_macos-x64_bin.tar.gz", + "checksum": "75dcb555e5c79a9ae1e40c135f8540f1bd60d9dae07bd41848b73bb7be654568", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.11_windows-x64_bin.zip", + "checksum": "c67bb599756d3f551d9a71331d5a6f369ae14e8b017512053b49499f57933bb7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B11/sapmachine-jre-19-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "0687ec4a9a39d7a2ef2ae049a9f4e5ae19ec46a0599da58d4c7581a8d72abe74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "344c5cff72d7c220c3fff02c95f2f4648f1ccf89d0762025e15e5001e490faa8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.10_linux-x64_bin.tar.gz", + "checksum": "c8de134d275467c2b29ec3501ca20a0e4e86f8d342ced37350c01451463a90ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_macos-aarch64_bin.dmg", + "checksum": "57691e36df5f7f7ed314c2aaca94935a6c1a0d9745afa735a74bd9f20ac9b70d" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "40d7cd22736ad46b62adf5952d6ef014b504b0aeabdc37fadce296c89c253e42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_macos-x64_bin.dmg", + "checksum": "efbfcf565e5bab4ec186346100155e55a6cf35152801c40930f589aac781eda1" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.10_macos-x64_bin.tar.gz", + "checksum": "92b48f3c8c17e5debb567e3e0d97ce13b7600af52149098080fb840a14bb8903", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.10_windows-x64_bin.zip", + "checksum": "956e9ca66bead711519cf2c7b9f0093a0fa4083df456cb192466d3c0d0f2f961", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jdk-19-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "64507dac17a5202275546476e2d8176a92181fd9c4802ddcebd90085621f85c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "c1fb539da4c7c9511321990a45290dee7ba51b23bf38dfe5582cacec14fa8e25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.10_linux-x64_bin.tar.gz", + "checksum": "0732a6ed057086796db85046582499b31b5c0b5cbe720bb3e75eaf228f1b3f51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_macos-aarch64_bin.dmg", + "checksum": "270c0c86cd557c692ddd724b5a9fd0b7c552338d9cb4d2d30fc4578c32d271a8" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "5fbe7e11dfa8ed071ef4cf171602027f51376505e7af8da9a0e1e73b1a56cc61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_macos-x64_bin.dmg", + "checksum": "5fd528c024e000c4e02db380ae41819cd70b49109b3926098fc2456cf6f8112e" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.10_macos-x64_bin.tar.gz", + "checksum": "10a81c9b9b6507c0b510bd278e226c4125891b71c804b472c1dbaa0edcbad45a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.10_windows-x64_bin.zip", + "checksum": "fa1f15b46047fc4c610c1b6b3770c697275ddb5b406fdb56508ab7a1fbc63f6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B10/sapmachine-jre-19-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "c843744d31004442b3a515ad4bea9c95827499b3bea9577ea6d8385e91715aca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "8efabb664355a8a9cb54bbff2a34a492c6d1238995ce37fac7019043ce0806a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.9_linux-x64_bin.tar.gz", + "checksum": "09b68eedf40b8b367083bfce5cac21d4ba8bcb9f13697331aff68e172cedb9cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_macos-aarch64_bin.dmg", + "checksum": "afe5d26e2faa3b39aee0a40bb86d451aa499041411e7ad6e4f3fb9d007855c5d" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "a15365dcb34709cd5323d227fd1479f62ddb743aeca2058dd45a62fb17677165", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_macos-x64_bin.dmg", + "checksum": "03c757f0604028c91e444040e7b9d78cfda1e543f31e5fcdbe82fc59014c16f7" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.9_macos-x64_bin.tar.gz", + "checksum": "0cc147b880709abfe63b8e5a440a96001b5c23103fd9a90f6c19338cbdad31cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.9_windows-x64_bin.zip", + "checksum": "a5fdb4ca1a220758452188f0e327395c8bc72dc4d75ce5f65232763c6d8ddf33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jdk-19-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "ed8e3c7baee1791aaf8cc356843b73531ea8c29d49bea1d61be05f3cc9c095d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "36bb174449e46c65e36c83e826ccefde674ca5ee6444eb60275e2248a8d1fb6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.9_linux-x64_bin.tar.gz", + "checksum": "b5db080cad84e7460e591f8f644e5be0d8e0420ed0a235e7eebefa6037d3a020", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_macos-aarch64_bin.dmg", + "checksum": "5d819a22975392bc52d79c4346f7a28f400f2a860926cead40c80099880da044" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "201816ff8fedccf9ffa81e6d481f69662775d91295981c5c1b487e2708a4bfa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_macos-x64_bin.dmg", + "checksum": "02401dbb42559ba00bfa41ba415b205f9899be08061732e76dbfc169c3168efd" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.9_macos-x64_bin.tar.gz", + "checksum": "be735cadee78a1144a9a8b0bfea769fd032135fee23f0012ef5ef5dc999536ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.9_windows-x64_bin.zip", + "checksum": "c46a79875aba79f1ff130b8f8271776876f2c257b8e8ae0fe2b8a3544339b539", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B9/sapmachine-jre-19-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "06aeecd7c9ceedcebffe6869889b8ad6742e0b67505f4d040ad4923fc1f8efe2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "0a2a3098ba5e5dfddfe117b43ee53580045dede6d0a388f8e450593ae5c49ed3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.8_linux-x64_bin.tar.gz", + "checksum": "31c9bcc4cdcd4fbd164a4cde64c173c8c3a3e45a9681e878df3bb8c3090338d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_macos-aarch64_bin.dmg", + "checksum": "1f8f0da97f7c751476b50ca28aa9ae6a8ff46af5763792bc1f30f075c0aab418" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "046365c9e976ac5fb9c1b0c448207c31b4e0ee2fe8de2019d0c322c23672d08f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_macos-x64_bin.dmg", + "checksum": "5c1246d2b5586caa4318e9ae5349b55bcd1b2a5f64c825e1f64e334b0d49c3db" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.8_macos-x64_bin.tar.gz", + "checksum": "a351250866cb28ec121d69779e6e6b509161e291b9c39feb41ed729a1e316ad2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.8_windows-x64_bin.zip", + "checksum": "3461b5125652e2ec0d725d386bf42ed9414fe4f6b5256c08446814f441173d56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jdk-19-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "4458ddc9e3fb5fd2d5c3a37a83edb8721b78279b5177698be14176342903a21d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "c2941d9a0d6dbaa3f6e3313837a497b07cf7da1a26f49ef4bf8ac2c79aeaa226", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.8_linux-x64_bin.tar.gz", + "checksum": "370e2b4b8dab67fb70be38102610af40f299424d57113aeeca20dbda76d86e8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_macos-aarch64_bin.dmg", + "checksum": "1c2d1abe5c1cb371107ea0daf86b46e45f9ee09ec6eec762e33acdacf933f9c5" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "a692314d0534e33546286090edcd0116eaa3aaf9fcad0a155ed8a4251abe4d99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_macos-x64_bin.dmg", + "checksum": "2827db7bf6cfa0d850c36bc73f74e6a8c8188bf4b71c2648cd79c379a62fd61e" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.8_macos-x64_bin.tar.gz", + "checksum": "4e4a805a2946e5dc2051f08f2a14bcf6bc429c199ef19e79d326652023718ac4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.8_windows-x64_bin.zip", + "checksum": "d1b90de5aac7db0bf8cfb1ae65207fa28d4bda3bfc2f76dca4c0222c6b093de4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B8/sapmachine-jre-19-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "93a6a7d541fd8aebe1ee2eef67aa19f266e164185b021daae63541a13819e8cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "936e51b2638b03c5ed190e22db4dffa501f9788f1186018da757d4a8205ce889", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.7_linux-x64_bin.tar.gz", + "checksum": "8c7330f23881892be52eb36abe43baa6bd2f84c6b40c446abecca531782c4452", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_macos-aarch64_bin.dmg", + "checksum": "17b2938d47eb6da7bacf4ef5a7a8bb9d9126f9484a2ca47a422c8b59a73ac648" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "1ea84ff8833c015e433a6da2296bd6339f8d3a233f8d31dc350822764ba56e03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_macos-x64_bin.dmg", + "checksum": "0885e7a8a499a5c7565207351b73f4b5aaa6493325cc2e5ab3e2179a86d464ec" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.7_macos-x64_bin.tar.gz", + "checksum": "af882f92d5b3e7027cabe0776d872b117c7ddb0993b2ae4636e37667035cfcd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.7_windows-x64_bin.zip", + "checksum": "5ec3075646e53485aa2ac36ab083c62cb5dfd55342295e81ad7041df5781f761", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jdk-19-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "877d9736b9b42f8c436aa2acc6d6662efb1805e3bc8aafaa1ba88a05b2c9d2a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "1d26cb3b2af2883d9b0496a3252336b2b06f297e446bb5d34187c8aedb456c1b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.7_linux-x64_bin.tar.gz", + "checksum": "2eae0e04bd0703f6811a4b35eea1ace536aaff646890886ba0f5a0570e627b9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_macos-aarch64_bin.dmg", + "checksum": "d7aa7a80e1646af518049e2863b8a371d760da75850e00ccfac6efb2d0335c4f" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "17aa5b819e8a3151db1ab33bce76255515c12c6e0b03922ea740b9d56cda4591", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_macos-x64_bin.dmg", + "checksum": "41c7567f4b2f320eb8dc9231ef89cbfd7804ffa0e8ca6df2271efbea2423660f" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.7_macos-x64_bin.tar.gz", + "checksum": "d0378300414cab1ea97ba36cb843c97867478942e83212e47b8e4dc5be43a4b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.7_windows-x64_bin.zip", + "checksum": "60437ef5266084d855ac9056f07e655d871caf644d23c1be254a9784a9d17890", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B7/sapmachine-jre-19-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "eda524638cc9411f45c4bf096ecafa926782a4b419e06919c87e227de65b5b5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "21cc0b0b3cbab8a38c8a104d3c10502b7f0161dfee797ca8ba42727fbcc8c1e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.6_linux-x64_bin.tar.gz", + "checksum": "8cb35f51c34aa513ccc29ca85cb1fa876d82ec31388a5528ad0b60fe4095fe24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_macos-aarch64_bin.dmg", + "checksum": "f89995af987816cf72bcdb0994c491c97e50d667862ad256fdb3eecf9369bae3" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "91cbf4d8cff42607b7d4dc4739f3ab5e8c5fb9a51e1797bc04ddcdcecff97cb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_macos-x64_bin.dmg", + "checksum": "faa5267ea8b9f5353966fac2e14b521d05ff0bb4dbd1c07f909966dd25c348ee" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.6_macos-x64_bin.tar.gz", + "checksum": "3b09fce382565c68383b40de89147e8b9453e084b42c03dfee59c056d414c295", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.6_windows-x64_bin.zip", + "checksum": "915d1130d0d9b9cab3518d572d8284fa4a60ca91afb32756b22719a2b7989b64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jdk-19-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "16145c4346ec39922e57c14d0c08ed0befb97df65348963454c32c3283de327a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d91295f121f33b14edbf1f677129dec8e49f40b1e4c9b866e639e7a4fa951e58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.6_linux-x64_bin.tar.gz", + "checksum": "9ea78b3342898942c89028dfbff5937fc7603d8b5ab89229671dc16a6dd17166", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_macos-aarch64_bin.dmg", + "checksum": "27a3f29eeeaf37c616343fa352fd87292fb21bbd5c2bedc82326da7dfdae78dc" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "ea169e777adc7d6f896de0cb2c4a7917b1ec2f2be1d7cd526d4ceeaabfcca7c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_macos-x64_bin.dmg", + "checksum": "5ae05e070473da573318ddff728636e1d5137bbf1af8268ed0804f9396c675dd" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.6_macos-x64_bin.tar.gz", + "checksum": "0ed7955cdf9207358c71c18d766e20bcd6a0dfdfd2bb54123910fb1fc9d9452a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.6_windows-x64_bin.zip", + "checksum": "c20b62b4248aa61ef83e768efb9f337f81550ca2dfcb04b4f8ca0cbbe29e2c21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B6/sapmachine-jre-19-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "1e9dc2e87e9ea5b809790a8259bf484ada73406e0a05cdfd8e6467cf20b3637b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0b24846fbe4ed6c634736d5172c931a7f4eb2a6873324eb71959801d2b3faec7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.5_linux-x64_bin.tar.gz", + "checksum": "36f1a4ba7f8459acef3a91ecdd97dd1dc97beff20ca12ed5a4066303277241c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_macos-aarch64_bin.dmg", + "checksum": "37652d40d052ff8a20ba0ad83a28c1b1c35f4da1139a5f960036c94a2f542613" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "6cc36b2efdc93fa8fee8814aedce6dd4e8e47c65b98d1970bedac6e0945eb8c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_macos-x64_bin.dmg", + "checksum": "c6dcde8ec05cc1d8054631f1e2c319a1dca169ec0524f7b6f9ef2b1ac59b7f49" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.5_macos-x64_bin.tar.gz", + "checksum": "15efa6015c6955d799e904beb1927adc00a8c9fdaf1968364db42bc070c8ff61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.5_windows-x64_bin.zip", + "checksum": "6b68ff99315ccbbe44bdaf9621940fb35e247a28684a212e01df169a6790e6d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jdk-19-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "bb1a61d49792bd1dbdcc7dc4b74b62cdc4dc78527a205227bcac6b61b62a04df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "2e7f8bccf948283d1bb0db5f3b8d10cefe5eb2080556cdf675fe394baf83e2ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.5_linux-x64_bin.tar.gz", + "checksum": "fd65f09c590bc2d6e64e5a85d66cdfb3adaa5617ba137b1910730ddc0bdaf1a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_macos-aarch64_bin.dmg", + "checksum": "d241f8f83d9e0fc7f4a1666d3dcbe2d9706c1e85ee482f16fb91c572901711ab" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "f0f609cc70cae04df26e23c6fddeab09e1ca9782ae3dc954774d1dea7022b624", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_macos-x64_bin.dmg", + "checksum": "a63af239e1d803a9b27333da4f7dd78b4e14c1339ae8b54802dfe27cb43afb4a" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.5_macos-x64_bin.tar.gz", + "checksum": "4bafa97e326bdeed05674b064dfd47a44efe1de44651bded3e6ca423611c10f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.5_windows-x64_bin.zip", + "checksum": "fd840bbaf9192f1c3bfa968ed110edc22a9cc68c76d20ffef2398774dd568f58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B5/sapmachine-jre-19-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "ff9f4631287ba1266a254a5366b7fc559526d688b279d4f65b3003ab8ab3c6a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "abc22167c9565cf42fe305f704566e6e2d6b122625e01284455354ecd9a1e695", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.4_linux-x64_bin.tar.gz", + "checksum": "ab7b973445f457d07104b4a50e292cbbab88b4d37d98999027a3c72ab771a903", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_macos-aarch64_bin.dmg", + "checksum": "f444c07eb94369ff8d9945b75f72e00d892f806beb8e15b4d2a3c8b46cbeefd6" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "1565ac1fd7d893fddacd29d6ed09baec69d0aa4580501e06a88e123a8ebc4461", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_macos-x64_bin.dmg", + "checksum": "51caae6e946b3dd1129bbc97dc0deb9711484b65281d7b0e720dcb0614b1ee37" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.4_macos-x64_bin.tar.gz", + "checksum": "42a88ac34f23bd524db7338932e6e80d74b2bca7a43bbe5bdf61811581107091", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.4_windows-x64_bin.zip", + "checksum": "9b9e3314d308724ed3d1cac50341b034f9fbb8a8ca9be2414aa94694ff4d996b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jdk-19-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "01be98d885f294db65f954a2ae00ac6fc9bb356a4d60f307e012cc8664f3b9ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "3f1f6506394e587df7031b73362c3b24b5f2b29bd66166d81d00091db29763d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.4_linux-x64_bin.tar.gz", + "checksum": "812968fbf26badbcb68c9d510762504c39fbf76af53b5d9f2091f29424dd3fa1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_macos-aarch64_bin.dmg", + "checksum": "ac112c2266608e0b863acd125463410dc014db77b24b8caac969ee766f5c089c" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "befdca62725e0e02f67fad81e6de1e517436a224e56df10dc50e3fdff0c9796b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_macos-x64_bin.dmg", + "checksum": "52453da5211f2a3e31e032dfeaa90fe4e3f4972d8b2ae5d11c8b24e46e81d3d3" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.4_macos-x64_bin.tar.gz", + "checksum": "76c8185a9e792b8b577a38b71d68cef7d7ae30b84248ac111c25247263ac5cc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.4_windows-x64_bin.zip", + "checksum": "49c73865a95e967a6385eca020ff8fca4c2b1a9de008ac8fca31198fe42c03e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B4/sapmachine-jre-19-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "3767a2338fc81b33b7deddc632784fcb85dc186528708a54906fced1135c3dc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "bb21c7d15f226163228729e0620edf1f686b50a4a18e0ae7ba353da4cd589fcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.3_linux-x64_bin.tar.gz", + "checksum": "6c044433a9fc1dd861edc9d2c727492dd0bf5bcea243dd002a16d15b64159c44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_macos-aarch64_bin.dmg", + "checksum": "638b3ef0e5f4f80646e181748794a073d08fd9930ce8deb5ed555a60f90cd0bd" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "a4530edcd6fe410a889584df864833f788efe3bcd81dd94a0736d71b6cad8467", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_macos-x64_bin.dmg", + "checksum": "b17babdb8f771d83a6e80f6eaa8395d277fccf2582716fd77b53118daa871708" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.3_macos-x64_bin.tar.gz", + "checksum": "050f8204897f8616086dd32c14341ac8bdf1d2a116427a9422ab996db713fd43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.3_windows-x64_bin.zip", + "checksum": "b6fd3b3a12318072f33562450ab8df8b1c88143bab5c0474bfe8c6206979d2b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jdk-19-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "a40d693d74d1339b8b202cc5a710db72907ce5da1cac37f0a4f412a68362b83e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2506d9fbc989cc1877072316f30e5bbae98fad6b847bc3d7b36510221e8dbb19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.3_linux-x64_bin.tar.gz", + "checksum": "54c7b8b84b84da3c57b34504d7a04ff19b24ffd50c8b2184d4ce627ca9529f09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_macos-aarch64_bin.dmg", + "checksum": "ff438865e1e671335d31d158d87a353a3126b633d8705991341bceea51f84482" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "f70e04875f679d6cd0c128bd8a50936ab41daea62f24d9399169d72182563cc4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_macos-x64_bin.dmg", + "checksum": "2de3c3b141d265911d294508da9d6d7cb4cc6674aabe469d2b1b89e44efc0b60" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.3_macos-x64_bin.tar.gz", + "checksum": "7cbd5dcfde31c31bbca2872ab0f5b82ec83441d0f8c4b54f267adebf7fce771f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.3_windows-x64_bin.zip", + "checksum": "6685423dc452fc58b08f87b658bfc4b4e04133fa1abf3ac85725edb292945504", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B3/sapmachine-jre-19-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "5eaed09babd829dbe036b974e0312af703173837efb97424a567bed2365663cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "0136cdc9058d519d8e754a95b6d45d266ebed1784f54b2d8dee9a6a6287b2d1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.2_linux-x64_bin.tar.gz", + "checksum": "1e0dd3643335300915cd579eecdc4aef59c3007ae5d8cd33aaccc0570a449ed3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_macos-aarch64_bin.dmg", + "checksum": "61a6f9cc83b68bdd43612e89514e34d3a9130da1e2c8fcb1650d086e3b112983" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "0fa3ada768fec6a30e2d3484bf4c4b3816fa13602c562ba129ec524b44055c8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_macos-x64_bin.dmg", + "checksum": "de74c4f6cb2499014aa10fedf28ba7970bdafc6a18950d65ee42d4cf7ad6cabd" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.2_macos-x64_bin.tar.gz", + "checksum": "281f9660df219c84bd2203210fdd7235e41e3864beef61d71c2da3135623d402", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.2_windows-x64_bin.zip", + "checksum": "a0a7f665b02c5c1289ae96c2a4d6b19576c58a7e3c4ef513ca18143e1f81b48a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jdk-19-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "8cdca73daa9d77b48b834052e987dd943e1c89044dfa6645e2290a8e84cc40b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "794ad5526da07bd6aff116578f77b432f9709fdd8f70a99312c6acc2bc9ac0c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.2_linux-x64_bin.tar.gz", + "checksum": "e69fb951944a855dcd2e7fb9987a307335ab8abcc89c40ecb61598330c6a33ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_macos-aarch64_bin.dmg", + "checksum": "32c545285bbfe6e526381efd38b3efa03358709e1203f0d1acf89eadb357b109" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "4f5746d4bf2666c4c95a99b64c8588b41940d7d353ec8edd121414513fd484f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_macos-x64_bin.dmg", + "checksum": "368819af7e4620117aea4c7d3181f9d7609ff905152399f522827297d8e59e94" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.2_macos-x64_bin.tar.gz", + "checksum": "ee9d3427ab472f5ba71c45206e75e3d9efd5a9a4370e83e3111c9ef27c754f61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.2_windows-x64_bin.zip", + "checksum": "78e35382f3d6f5f52471ffbd94019314b3e45dfcfc4a91ee7f8b448ba01c9452", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B2/sapmachine-jre-19-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-19+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-19%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-19-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "d7d3c7caf386f3a072d0d8d62bb58fba2e3a42c8effe85411c8061f867e596ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c473194de9d3d9ebd99870321501adef4c33590090a53bcd28b58a36d643d3d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-19-ea.1_linux-x64_bin.tar.gz", + "checksum": "78fcdde68bea17c3ad02c9af2736204a715467e09de6e606ee8c018593afcfd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_macos-aarch64_bin.dmg", + "checksum": "1211d4d00f80a745470f4efe37a44cd8da89f14d252ce3f92bcb06f5fe3d5003" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "a5bac783c3e2da4f70bcc436ad46772e06d146e6fa58f3513533c6876ab516d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-19-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_macos-x64_bin.dmg", + "checksum": "fb46507cbfb754e7476716d77f4caac018424d8bd88461d48b781c29ba6c4025" + }, + "tar.gz": { + "name": "sapmachine-jdk-19-ea.1_macos-x64_bin.tar.gz", + "checksum": "0e9207e6b49d4426f9ba4cfbdb3c18389b898be123073351508752a9636040db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-19-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-19-ea.1_windows-x64_bin.zip", + "checksum": "b2b21b6195035a43c335ed86a96abd34f470c78a379766bff96c1053cf39b81d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jdk-19-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-19-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "9149dd71ba9c680a2f7849f0d646281f88d7bf42c6d6cc6e80056e79df998db8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "bbabe9d8b6b25def6b3bf83b4ebed0d9f4f4d4123a2cc0af90c6e368e39df7b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-19-ea.1_linux-x64_bin.tar.gz", + "checksum": "6c4af347889ad01dba7734dc98a82cc0b61b1c125947338763f1aaa3cc97d67e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-19-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_macos-aarch64_bin.dmg", + "checksum": "6139d036ee1cbd142104dbecf02f7fca2b834a612cb217ebd49a360be2218aa2" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "7894b95b069aa2fe8f7a0bb08dfa674c1bfa36dfa9f0a57bfb05b1d3985c110f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-19-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_macos-x64_bin.dmg", + "checksum": "162154baaffcaa40edd7a4ec96db60a748aaf0086931ac84a867452f6f30bac3" + }, + "tar.gz": { + "name": "sapmachine-jre-19-ea.1_macos-x64_bin.tar.gz", + "checksum": "6d157ee80bf2b041fb0fdd67b906c295033daf6c4ade442a3fac4d0e272e2f0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-19-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-19-ea.1_windows-x64_bin.zip", + "checksum": "1b4edd2950a0ff87845e239ef08fdb386b4f65502dad6f2ddc5b9fda7b1bed9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-19%2B1/sapmachine-jre-19-ea.1_windows-x64_bin.zip" + } + } + } + } + } + } + }, + "lts": "false" + }, + "18": { + "updates": { + "18.0.2.1": { + "sapmachine-18.0.2.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.2.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1_linux-aarch64_bin.tar.gz", + "checksum": "16108ea2b1f0f368f08369ac90e5793214bd2fc204e88e17af0b51452dc70cc9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1_linux-ppc64le_bin.tar.gz", + "checksum": "ebf1f8185bba80567a36c4ad1f0ed12663cb5275bd6af9644d44b549c12c0579", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1_linux-x64_bin.tar.gz", + "checksum": "06b8caad96303cef8ad2b9012faa256d9d57146520f51b67d8778de868b0e7f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "04a97ee8426ba87f18614acf11f76d0f7f5ead1d92c9af35bd6f13bd19912093", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_macos-aarch64_bin.dmg", + "checksum": "1d43d404987b67fb5fa9667a4e22d01a48a79ed8a9fda52d1570414f81ba775b" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1_macos-aarch64_bin.tar.gz", + "checksum": "3ec5a50c2404c2bbe19e6d9b2beb59763642ad9ab4d800e10ff8ca76c96ccf70", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_macos-x64_bin.dmg", + "checksum": "16125f779bbb631d62eaea6e55fda405344b1ff4fc17e2b1edcc946d3f8abd1b" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1_macos-x64_bin.tar.gz", + "checksum": "b1a125af11804e90ebb6d4eb1be8336b706cb39a38ffafdbf5906de9dd0cdf86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.2.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_windows-x64_bin.msi", + "checksum": "f2b9d5955f5d9d38539d2b278bf6fc5baba35e4c3737e265c2976ad7920d0e69" + }, + "zip": { + "name": "sapmachine-jdk-18.0.2.1_windows-x64_bin.zip", + "checksum": "03db06ccccc69d519367fb1bf8142f7f447c7e955ddf9eba0b76a84c8469585d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jdk-18.0.2.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1_linux-aarch64_bin.tar.gz", + "checksum": "def1e6d34af92cbd52dcd2829ee21843837cbcf0b979bac29b025afbb55ca491", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1_linux-ppc64le_bin.tar.gz", + "checksum": "a7c8b40f010c8050b89169981d740e28d209e41a03e0a6c3020a5339a80c5c4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1_linux-x64_bin.tar.gz", + "checksum": "eb8895b8eaced501dd8ebb36bf010e318f54f5c88488783203f1213138ea87b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "a09774c96a2eb9ca6fa662be79f7f89b45a567207328de18eb3a01f1958e3b6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.2.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_macos-aarch64_bin.dmg", + "checksum": "dbd19c2f1addb14357dc2f4cd40d3cc620646ed61760d2850e2cb8a586714e4b" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1_macos-aarch64_bin.tar.gz", + "checksum": "bee17c7fb0642ed9fef8028c4fc38db6e4ee5d319a9ff0d0b225e1aac6178e06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.2.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_macos-x64_bin.dmg", + "checksum": "f9ee7d4a142241b59c74b30407f218a81ef909becdc97f5c08243682d42bfa27" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1_macos-x64_bin.tar.gz", + "checksum": "257337bace1e8bf5228eddd0fb236ff2371042d2cab202979a053997825dff22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.2.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_windows-x64_bin.msi", + "checksum": "50251d0ada8d261b888390d41a425651ac3fd516810a8d71d020c6d3d7244553" + }, + "zip": { + "name": "sapmachine-jre-18.0.2.1_windows-x64_bin.zip", + "checksum": "a59a8a19b1e487cd463d2be5a4fe73f989cb58f48cbec0389164c2acfb129f0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1/sapmachine-jre-18.0.2.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18.0.2.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.2.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "a5f39e5f327c6a4d9fc9a8eee7e097601edcb18baebbd1e191a94e302d3b5127", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "bf2f3670461bb4201adb12aaad5ccccd9d19cfa0226d43d3e97c1a0a4e530e68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "746b7be47381ba25e48a0fed5f003fe6aa07069b88fa92c931fbcc51b60d8724", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "b3efffb2682af2407addc713b631fb33648c825c6bb3d6a014694997492aeb1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "4f01d304c51502a03472981fadfb370aa1eaa102d7e0cbaa5021448d090a59e2" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "d7c77079faa952e6b64303f2e1ceb5e7ef4f6e18a913a2339a44e9b3f8033d30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_macos-x64_bin.dmg", + "checksum": "89a0e3015f1f4137899829d3f19602c2d6078f182425fba1169beabd350ceb13" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "15a327342fdb8880a1705b664c71d25225f497afadc8a5eecc65e72894c2d61c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_windows-x64_bin.msi", + "checksum": "b67ba04affa382b54675797fb6d672089f842fccdcf1094c806c50e0793e2aa7" + }, + "zip": { + "name": "sapmachine-jdk-18.0.2.1-ea.1_windows-x64_bin.zip", + "checksum": "8f48a2a9ea4489d390b3eb7e8d8e7840375e1e66abdcf69a2e5375d497d673d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jdk-18.0.2.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "7da7c3fecda6d0f89e7734bd84c2657c4159612a31eda7300b33e823d3d4d8df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "16a4da33d6392bccf5d2999cb1c8e07bcc418752ce088392df3882bc7a652e7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "2074e443a96b56f7debbf258c6d033edf6ff3193255a684acbca6bea558beef4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "223270fc3d92094e7d9db8552384a0adcde04bfce256daa2e3c4b8ffa7605c71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.2.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "bb83f000bf081c33775822bc8bca0b3f7c39250e3adcf848b2bbc7e2e1e2e4cc" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "e44d52bc874fa8d24fa310eec328d2697152033329860354c7fc56b2cec4ade4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.2.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_macos-x64_bin.dmg", + "checksum": "4879a76172adfde120243082b3c1c3a3f13daef6294624d35ffef973f1e31042" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "217f5df539162684e538b881c80697c792be0939517630f458eb1ce55eb4ef82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.2.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_windows-x64_bin.msi", + "checksum": "ac2850e8aa831e80f2be57c0f4efc33b90f7694a0c2d6fbbf956de76da42d2f5" + }, + "zip": { + "name": "sapmachine-jre-18.0.2.1-ea.1_windows-x64_bin.zip", + "checksum": "e01ca92c99c2045d871cf8bc4830ba7228d5061774a821341ac034224411ba4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2.1%2B1/sapmachine-jre-18.0.2.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "18.0.2": { + "sapmachine-18.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2_linux-aarch64_bin.tar.gz", + "checksum": "982cd0181bb5b620b1a5a4e94309e6054fcde6fc73833cdd59facd3d0cde501a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "2bcad719f2ba00bafc00fa90b42e11b5bc819fded54947523330b2d4f7607cfa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2_linux-x64_bin.tar.gz", + "checksum": "5a6a1753d5195537ba43f9d2d272ec66a5bab91ce11e56f2041aacfa23298190", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2-beta_linux-x64-musl_bin.tar.gz", + "checksum": "955964a738ae1ec233f004e192fa71d3c8b8d39fb4ba606c0015d694bdbc96f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_macos-aarch64_bin.dmg", + "checksum": "6d298f7983b2494be94e1304830fc6d8f6b47ea8a2b9be384d8072fd9173f1e5" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2_macos-aarch64_bin.tar.gz", + "checksum": "75a7e28b1fcfa4366dec5810265b7b8f7844d53e87005176feb797d4173456ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_macos-x64_bin.dmg", + "checksum": "80812da1eb3edf40d59c62366d9f85ab1c4b51dd0e075ca0a25bb7226c17f369" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2_macos-x64_bin.tar.gz", + "checksum": "6f3ae5267896de1fc887b455157c26eac9c6d32c64aa6aee94b0bc2c61253b14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_windows-x64_bin.msi", + "checksum": "e1425b92154d35aecc2940c31fe8e1d000541eb53f3021d8b3b30a15c9827a0b" + }, + "zip": { + "name": "sapmachine-jdk-18.0.2_windows-x64_bin.zip", + "checksum": "373f06e210a19e8347469bb4cc388de8c49acac01ad8f8da4311c6f283f1f0a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jdk-18.0.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2_linux-aarch64_bin.tar.gz", + "checksum": "91955e4af687a166a14cb4cf40405720cc62af01ef478eec8cbb4d31c95b19ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "8f82545c66f63c8d0ee60e7647ee4b6b7bd03fba6d54ba0683dc2c523176ff7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2_linux-x64_bin.tar.gz", + "checksum": "ddeb08a72657167bab8e4cfdaf9e5ecab72727fcae9d87f545168356cf9a2185", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2-beta_linux-x64-musl_bin.tar.gz", + "checksum": "453b18240a58ddddd6b5fc684537c71d0ed6886c42b05ad965c94f1f1d1409f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_macos-aarch64_bin.dmg", + "checksum": "bcdb1223b9d8d059ba0a5027e3185c19a7531b84f36945eb3c4b9bab998cddb1" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2_macos-aarch64_bin.tar.gz", + "checksum": "ed8a7dde62a88bd28586bc798478592b3cadc4968bd2f0834830a428efc197e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_macos-x64_bin.dmg", + "checksum": "80946cac0c636913f256419abe74e38a1b6869ab1f8efa353058c9565d0b2946" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2_macos-x64_bin.tar.gz", + "checksum": "994ab7b4b06109791c6200b21c44ae14c5deb5526dc8ebe3db0cf64143b6d698", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_windows-x64_bin.msi", + "checksum": "ae12a9760d5a19dc568c572c823bed48d2a6fdc30a5d1b43235b40e90bc34fe1" + }, + "zip": { + "name": "sapmachine-jre-18.0.2_windows-x64_bin.zip", + "checksum": "131140aeee666b20cc6e8111fa557759dc20129e18c687db19aee515d60b5122", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2/sapmachine-jre-18.0.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18.0.2+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.2%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "e652f0feeabf8b1615eef1a913715c1afe9486da133d9ea42f45abff884b023c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "383d1d4d82e8abbe615f491581796e84fc5eefa22343ab9c7277d11add3ab90c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2-ea.9_linux-x64_bin.tar.gz", + "checksum": "0f98baba8284f7cddc96429e0804dbaa264d43c9037de256b0015ccd7873974a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.2-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "4989b82136df83139a31b8d6dc23e4309e5f953bf60003891f69a30fce00c533", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_macos-aarch64_bin.dmg", + "checksum": "6dc01ee94fcc8f43a56f9be82275234ccbb0fc3d0e823b2ddab19fbb9d84e40b" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "cb60aafea9c3461bcf297369a2f621b37ccffb5fb3dc6d8474d35ac341a1c95e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.2-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_macos-x64_bin.dmg", + "checksum": "389a4da4dbec34087e1a1af35924dc7a33e852252101fec40f3636da440d0c07" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.2-ea.9_macos-x64_bin.tar.gz", + "checksum": "6dccf3abff0749da1dffb426c627644f6a8aa616724d734a04fc37f0dd943a16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.2-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_windows-x64_bin.msi", + "checksum": "e7db98e53e234806febad47d3616d16a6fa44a196916658cc6ea7205fa9f2ac5" + }, + "zip": { + "name": "sapmachine-jdk-18.0.2-ea.9_windows-x64_bin.zip", + "checksum": "034859f42a04aebf34f14f7919efdcd8373aa62546c29e01ef80befd35593c3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jdk-18.0.2-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "049990ce8ceb0915a05f6d85d7bbc01c594b4c46a0bf9dd2414670cc93b0aaa8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "70a68e834688b48ee732892aa80e48070021b5e8acd66b5defbecb4e046dcf83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2-ea.9_linux-x64_bin.tar.gz", + "checksum": "1ec061d66b4b5a3d3ab6497efa664506d2407ba9725cf8be418346d36019ce68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-18.0.2-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "9933bac7c6a039b6fc41d83ac886cb958f54d66622dd96a33d3289a8d80ed749", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.2-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_macos-aarch64_bin.dmg", + "checksum": "3a7b123f85611b025210820abba6622cbb32d64d50c352007e30cfc2d93535db" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "a985b69e48c56f745c36956aaa4933c7ca22c650eb9844497b95b567d3406409", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.2-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_macos-x64_bin.dmg", + "checksum": "54f79377d87b54d5a842fb7f8ab360d8266edb278e51fbb703d76e285e98242c" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.2-ea.9_macos-x64_bin.tar.gz", + "checksum": "2bfb88e6aa0b35e9aff41b100f6faf02d026c2dbbc249d048d096db3d820b14f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.2-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_windows-x64_bin.msi", + "checksum": "c4c04e49ab9e67b08fbfb9073baaaa24c940b3b13b61c931bff6a31edf358a26" + }, + "zip": { + "name": "sapmachine-jre-18.0.2-ea.9_windows-x64_bin.zip", + "checksum": "9d146b156a274ba55c8210f2e6d5cc72f38c7fa8b251e7c4071d2ddde25f6bed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.2%2B9/sapmachine-jre-18.0.2-ea.9_windows-x64_bin.zip" + } + } + } + } + } + }, + "18.0.1.1": { + "sapmachine-18.0.1.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.1.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "15d566f073278096e5b01dc451d6b9057d98b33746156ff2786425110a399a49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1_linux-ppc64le_bin.tar.gz", + "checksum": "d02d525400629c3c151d24b3f90661e94bed338a12ef592a1a1fc4bf0e4f3437", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1_linux-x64_bin.tar.gz", + "checksum": "de4357f3c04fc03241047f93ae01f25c3db17408c584a7504f3545091b35d736", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "c5086dbdb757a39b814e7c783c7c580ccdcf90f60ac8de20cc9fb4e31d624a84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_macos-aarch64_bin.dmg", + "checksum": "0b0fd7590ae9a7ef1a9c50474d711bb994ce2fe1172c94088f0541b9cf941e57" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1_macos-aarch64_bin.tar.gz", + "checksum": "21f4142aae281003867195c843f7587902402f79fc4a57a7d6fdd2162e8106d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_macos-x64_bin.dmg", + "checksum": "e26be90ec536d7f1f24a048ab289ec36829cc6d6fc67d113423b051bcbd76ee7" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1_macos-x64_bin.tar.gz", + "checksum": "b184f2202f27c72724f8488ffca6ceb7b375da8c1b41b33460a403fe3573e244", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.1.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_windows-x64_bin.msi", + "checksum": "d8906af534f6f753adcec69485bdba27101b6580820cf721f359934b268784b4" + }, + "zip": { + "name": "sapmachine-jdk-18.0.1.1_windows-x64_bin.zip", + "checksum": "4f8932b05f5de02d30420e348d42a60d1c0f6a004b41aac5b6b6b0b32a130a7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jdk-18.0.1.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "038177fb61439417117c3a65bc74cfea108d2c438f15babef4bcd2917f9bbc7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1_linux-ppc64le_bin.tar.gz", + "checksum": "5c1f3fd51e8b6ffa0a077e8638da28ee3572e97642ea3c4c44f08459fc813db6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1_linux-x64_bin.tar.gz", + "checksum": "216c1b2666149117647895dd999fe0c73e77653bb915921d23be8add28a55a75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "eade96a8586953bb05ef6f1bddaabf7e8f32b5ac87c3a2cc0614261c8abc56d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.1.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_macos-aarch64_bin.dmg", + "checksum": "1779b501f404c106a28bb4873c08207c750cac659d2bf44df49d955f1ecb7fe1" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1_macos-aarch64_bin.tar.gz", + "checksum": "0a4d8df2bfc5d090fcc64549b70de2d8957d1f9248b705293240204f2bfca38b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.1.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_macos-x64_bin.dmg", + "checksum": "a786f86029ea90f0e2d74bc1fc5096e63813f90fbc8839e6b248f457fb3b8177" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1_macos-x64_bin.tar.gz", + "checksum": "ffb005923014e2249b3be6bf856cd3739f274703b738d2fd48d384807f042c73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.1.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_windows-x64_bin.msi", + "checksum": "c186864157344db94ef9bc88eaf8bde8e80566cb7241c92aaebc12db81e910c4" + }, + "zip": { + "name": "sapmachine-jre-18.0.1.1_windows-x64_bin.zip", + "checksum": "2644fc5a5dd9acfeba23ecf661a0481cc113e48ee7975f2346c2842e907a38f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1/sapmachine-jre-18.0.1.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18.0.1.1+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.1.1%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "9461edfeaab342c4b066c55a4e66687e5ed178ee7ff316f536390b808ef56da6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "ddc3a5e02b5d5cb3695d4091b751b00be486a2e583d6bac3d97a7e0ea7d07601", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_linux-x64_bin.tar.gz", + "checksum": "dbed317c6c36a14f965bbad51000a624c8a48eea3208e4706f0eeeaaab86f69f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_macos-aarch64_bin.dmg", + "checksum": "46826307e35729a2281560f69ce8c3343c034e0094d690ee900c5bad3cefc6d4" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "b8af5effc5cb544834833e4f34bca5c96253d05e31a19eaf2dac1929e50696c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_macos-x64_bin.dmg", + "checksum": "d1e322b0c0921ee352e31297d966371731d30612248a029ed1b2537f2a9153f5" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_macos-x64_bin.tar.gz", + "checksum": "d7f07c71abe9a2fa31da00e4236ac13f9b80ac9a858ea93bb8e9a312e9878c17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18.0.1.1-ea.2_windows-x64_bin.zip", + "checksum": "702241ba52b921c1131a158a97bcf1346f211e24115498712a47112015a29c8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jdk-18.0.1.1-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "de47632b77a44e39044cea3f0b9eb8fc01fb7056f8cbad0ca21e4b0c593e0e0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "333f4967bf24aeb87187883faa15dd484b93ef5b9c2431a4549b688dabb8111d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1-ea.2_linux-x64_bin.tar.gz", + "checksum": "5cba78fc22807fbc852ca0d9025cae172a0f058b342842f4dfdcc78f7a983a4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.1.1-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_macos-aarch64_bin.dmg", + "checksum": "5b6693afd16a021a6f263fb6c63072f9e6d125a258fc1726bab18ac78c050ed1" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "6aa21158e789c7bcd1652129ac297ac5910a95c74371bc471d53d7702e1bfc7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.1.1-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_macos-x64_bin.dmg", + "checksum": "d0fc2471a4028cc2018cffe0a17c646b2e0177d4972bcb81d9cb6857142bb4f7" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1.1-ea.2_macos-x64_bin.tar.gz", + "checksum": "0d14faf4c3c9f36214571fa11cdb461920603d7cd96612517217e4a6818539e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.1.1-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18.0.1.1-ea.2_windows-x64_bin.zip", + "checksum": "a2e9b3faaae8b581239dcdddb91728add631f65131b4b9c03e678ced039ad296", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1.1%2B2/sapmachine-jre-18.0.1.1-ea.2_windows-x64_bin.zip" + } + } + } + } + } + }, + "18.0.1": { + "sapmachine-18.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "c7a3171a0e09df42ba5f59b8574caebc6e823073a6bb4cb4b07c41e3c61c7a97", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "b6e6008222d698a5bc44e18de2e89e796a10a7610f0ca82dc5fa75c38c5e4710", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1_linux-x64_bin.tar.gz", + "checksum": "574be15adb877bcc91894468868ae4f34c56e45bd56f201f30a04a6c321e42bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_macos-aarch64_bin.dmg", + "checksum": "1ac9161d77d0548f61e2b90c7f2b3b6eaf9a7da327c52b4dc79fdffd28976c98" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1_macos-aarch64_bin.tar.gz", + "checksum": "340846512d086051e61b36be3eb4a2a30845ea759505084779ca1b9658d1c491", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_macos-x64_bin.dmg", + "checksum": "e295a69941ac9345794503b47414ff2c1c8534cb66e75d00721939c63f27735a" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1_macos-x64_bin.tar.gz", + "checksum": "f876e444c7761303c180de6f43c092c6531581576b0342e4f2d41716fb6ce16a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18.0.1_windows-x64_bin.zip", + "checksum": "53e93eaaeb01fffb51d629850d20e87390e8a878c396de2f3cb82348d5a62bae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jdk-18.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "cf1616ea570cf7123730ced1373bc7774cdc97a47f205ddb7010b4bd412bec32", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "64ad3421e865263f1fcbd430b738696e5445aaac8468316ce325db77e5d33abf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1_linux-x64_bin.tar.gz", + "checksum": "8d7e853bc0b770559586c1cbd4106fa2f70de841d6b289f9b209eccbb26925ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_macos-aarch64_bin.dmg", + "checksum": "6729c76c02acc2ae3845f2e29d389d6d5547d6bcf9c13fd138886f8dd7c14b94" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1_macos-aarch64_bin.tar.gz", + "checksum": "0dbe8607d6af23527ccf01f27866b9361a4ddbf992f42b0d66b851d0acbd0172", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_macos-x64_bin.dmg", + "checksum": "6bbae8e09c7f788e1c00a2bbc18ebf3c32de537850498275b12bd65d8c0079d5" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1_macos-x64_bin.tar.gz", + "checksum": "01930c37e18824f2beceadc85bb255a3d4f4eba72ec0c8fa8882e32b714383d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18.0.1_windows-x64_bin.zip", + "checksum": "60c013a80953a2e9aa72b13be135fe3c979ec9934cb8cbf9dae63bb2ab3cc918", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1/sapmachine-jre-18.0.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18.0.1+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.1%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "be5894a48fe775785a19c6f9fb64a993c61a56e25c6b07b9e8d55e0af83dd162", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "2ef1a5c47c426100627d7bb13a162de2d5b66132a99b82439961c7e5484d5913", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.10_linux-x64_bin.tar.gz", + "checksum": "9ceb59ce3ce19c79b1b3615e04c1e7e2171d3e46bfeb9eb9a9841796a610a027", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_macos-aarch64_bin.dmg", + "checksum": "2027f18b7e3ba635785336fb8066fd962edbb15d47d7a65005cb5885446c432a" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "e32b83fc688673a8e6e8bbf9b8cea9ee41564b495d02ed1f6879a4f39019e3c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_macos-x64_bin.dmg", + "checksum": "b6c7a71c3e964fe06eeca0f4b92ea5a09f07410f951cdfaceebf8a0dc49b449b" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.10_macos-x64_bin.tar.gz", + "checksum": "aa3fee5cf093670f3be7b9a87cc761ef18355079fef510b4956835ba21801622", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.1-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18.0.1-ea.10_windows-x64_bin.zip", + "checksum": "10a04d70be6f48d9be5fbbe1015494997b1ae0a7f4b4a439d83094f56da3ecce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jdk-18.0.1-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "7baf96955862a8c9c0645e527c1e759924744f11010baaea9f415206f65da25d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "80a897855cba4b0a1bf8faecf639285a755143cec9844990eef1bfadb009fb25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.10_linux-x64_bin.tar.gz", + "checksum": "0ac89c17c72a10e67234cbb00def6e9533df9be4e0e17700285f7850329be3ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.1-ea.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_macos-aarch64_bin.dmg", + "checksum": "0466bd009e2816f7534327295ddbd2c5ecd1f572efba2ca8403364ead750e45c" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "ebb8153092c18461ff18ddcec166eb6c1339b671a3daf3acfef8aea3eb081126", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.1-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_macos-x64_bin.dmg", + "checksum": "c8f0f4cd2634e1ce4a46626b266cb26e79a2a10f9ca40c3c04f55e90c0c53de4" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.10_macos-x64_bin.tar.gz", + "checksum": "99a1d0caae8125ca8e2e907415ec2a5e0bcfe041ac59665a1a928dbc752b5d0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.1-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18.0.1-ea.10_windows-x64_bin.zip", + "checksum": "c460f0a7a6f7bd300e5d9912eb0a1ba8c632e9c9b852a05b18d6858800d299b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B10/sapmachine-jre-18.0.1-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18.0.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18.0.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "b36008b0a386f6dac3d2868b57273c5109ced60ab1f34e210450aa9ce9a3c181", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "84fb3efa0a93360be21d94ed3a358b7d29c9f36e13aad84a2ec047d2a6972365", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "aad9de2da8d4fc935d1920a4991de3252b6bc2a675b93ddc0cbd095c4bd42878", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "04f2cb14395ce6a4c98ca8f19951f107584957e760684d80fd031ddf53c9e80e" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "b771e3617d4357b29aad8747b3c043fafe0cded29c79d9f4601a5715d3053463", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "69e85bf076c7667195ae81ccd9b328d2b6760e0c17e6c29d793f370b5d27c38e" + }, + "tar.gz": { + "name": "sapmachine-jdk-18.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "16075a50f6caaadd03a2138b59f2927c4a87a48263a669da803909222b298d28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18.0.1-ea.1_windows-x64_bin.zip", + "checksum": "c096ef8181d23168769fc807b418ed0602319f5d0298afa67fb458123c92de59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jdk-18.0.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "642257d837440758e792562bcd058cd8ef56fb0dad48e1a8f01c7d1344f36d25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "60853041ddd60e2baf26f895a4bf5c4726cc75d564a1db120f0a65ba974f026c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "8ba1da419c20deab50223247e0a4c586f4a70c0d347d98a6f5dee4f4b31c9c6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18.0.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "08abf2cc6d3808c65193ea1a1fdf650471b275aeacb9ff98eb144a0f1d0dcaaf" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "9bb1fbfa9d33e72d266689847679421d86c53d1a02f0027b1153b0c6d369f857", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18.0.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_macos-x64_bin.dmg", + "checksum": "5f4b74e4cebe12b9efb5db886956e2d3d9ed01a1240010f4ee2dcef1391c10a7" + }, + "tar.gz": { + "name": "sapmachine-jre-18.0.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "3905e165a05775b50297befa017eac12162f521b6e878c08dd707019dc074f5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18.0.1-ea.1_windows-x64_bin.zip", + "checksum": "6945b6a9040c749a51c2375c0d34ff5b6ec29402a53c86e3b50b8e329ddef131", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18.0.1%2B1/sapmachine-jre-18.0.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "18": { + "sapmachine-18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-beta_linux-aarch64_bin.tar.gz", + "checksum": "b06f3e9b440ccf70c599bc6e94f4135b0dfbcd05bedbacb872267c4aca866355", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18_linux-ppc64le_bin.tar.gz", + "checksum": "078ae94967506bae0852521f82aadf2fce4ce07ec88a938e7ed08af315ab9f90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18_linux-x64_bin.tar.gz", + "checksum": "65082c74154b7633007cf7573d26ea07820b38f84114720c896373b0a200a765", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_macos-aarch64_bin.dmg", + "checksum": "dc5febf7d11b5e60889d94d3b95ba101999cfea45f3ebc0e22240a71e85d2ce4" + }, + "tar.gz": { + "name": "sapmachine-jdk-18_macos-aarch64_bin.tar.gz", + "checksum": "47c5fb2b20dc18080426106703d616e3db8f76e0b791bc1ef32c3b4bec6867d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_macos-x64_bin.dmg", + "checksum": "bbdc9db3a47944f3bc8c7bc7ea6747b92e4c9fba40150263af7881b312f46b30" + }, + "tar.gz": { + "name": "sapmachine-jdk-18_macos-x64_bin.tar.gz", + "checksum": "930e6ab1d4452a16ef73aa519f4a47c1c06a5d21a1233a1e68e2459fb0a5d8cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18_windows-x64_bin.zip", + "checksum": "769ae659cacdb227027078dac8e5c827064f895489f1c98377269e403eb662f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jdk-18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-beta_linux-aarch64_bin.tar.gz", + "checksum": "9b5fc128e46bb4e874efa6f8ec74553daee111efbe52abe3b3ac069b2f7e946b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18_linux-ppc64le_bin.tar.gz", + "checksum": "b2df118352056ecd866f9fb6d80db2b77f8a1d725a330bcdb7369702950f3abb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18_linux-x64_bin.tar.gz", + "checksum": "1d93f9b324aa204a4e2022a3142b1e1571d297e32f720d095142cfda45f7433e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_macos-aarch64_bin.dmg", + "checksum": "3a6bb29f3ecb9683c5cd0214ada97777de7246107b0a4709936aafe956bafb22" + }, + "tar.gz": { + "name": "sapmachine-jre-18_macos-aarch64_bin.tar.gz", + "checksum": "47d1f1cd7f2b1fb460642c68be724bb23be38e1834947434b1682a150eb9eab2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_macos-x64_bin.dmg", + "checksum": "e341f46fbb04aa342549a24d837a255f37dbf4b67627f3ab34a5f90cf1138890" + }, + "tar.gz": { + "name": "sapmachine-jre-18_macos-x64_bin.tar.gz", + "checksum": "f4a676434b42ab43a4a61dc1b53b79640136220d3a998da3bf3e8a652916e377", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18_windows-x64_bin.zip", + "checksum": "c2cc80c0a8744530251a5b9257bc21264a2017c20009f1d9201001ae0fc0a2e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18/sapmachine-jre-18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B36", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.36_linux-aarch64_bin.tar.gz", + "checksum": "ac0b92df66c58e98dd24fbdeb14ed44e68881ef9f1420b15a83aa5de15a3082c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-eabeta.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "203fe28015416fc080b2401f3b2eccff3176e8e6cbe7ebdef575225e682e575e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.36_linux-x64_bin.tar.gz", + "checksum": "75f1854b5d2ff64d3ff57240dafaa1747ef925ccc1fa7541290f1ebe231a669e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_macos-aarch64_bin.dmg", + "checksum": "8a4f5f68ebe8465f44a610bf9362490e9ed546aa42b8ee4946980e0e3a5cb096" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "c02335491fe5972b2b0800d59ec67d32f12136be824df1821be8eac999e4eb20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_macos-x64_bin.dmg", + "checksum": "5c0154f449122b649354d008fcb749188163e26046428dcaf251cfea635020c8" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.36_macos-x64_bin.tar.gz", + "checksum": "68327617a59b446e695fba43e286741c0d881af5eea04b4001120824c86fca9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.36_windows-x64_bin.zip", + "checksum": "9121c0c4e931a90049e4665de3ef6e5e6db0cd53ca7bc5ce8f09dfe1092d3b90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jdk-18-ea.36_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.36_linux-aarch64_bin.tar.gz", + "checksum": "0ae647fa65e9b49b0369bb8844e36be1a3c2cb045f53180bde7cf1f9f7f1ba48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-eabeta.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "863c47fef44733c106b73cf9cc3f88a75a52bc2ae29fe062c0c4478d14fd14fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.36_linux-x64_bin.tar.gz", + "checksum": "831ede9c6b7168984a15528cf63da2e862005edea7e4ce5eadd1fa0e142fe26c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.36_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_macos-aarch64_bin.dmg", + "checksum": "ed3f9054c4ffcf1c4e35e04bb32e8c1c7b0418a2ff9795eb9b04d63f6d7cc081" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.36_macos-aarch64_bin.tar.gz", + "checksum": "36830beb4a4dccfeb43e4a0775a0f9d257c5da1f88eff072e28abd6f9dd8c425", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.36_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_macos-x64_bin.dmg", + "checksum": "b4cd142b33c6df58c327f812bd35abfc99ba44367c5599c54316e92d20e0f250" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.36_macos-x64_bin.tar.gz", + "checksum": "8de5b519ee4978fa4e722a4a8593f98f386b979f3efa6c4c0ad380f04c8c564a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.36_windows-x64_bin.zip", + "checksum": "37bd289ec65e467d164ef3f60dc6e4333a2aac0610a6b1b80710f9ee4476fc12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B36/sapmachine-jre-18-ea.36_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B35", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.35_linux-aarch64_bin.tar.gz", + "checksum": "0156bc03f0464810d294de4fdc893cdc9a9f4fd7b9410807606cd9a647923cc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-eabeta.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "629efb94ae9bcf121fd89351cf38aff01e7fbb12efb1a046889af8ef4dd3c6e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.35_linux-x64_bin.tar.gz", + "checksum": "6bad9bed26ec8ef4a22906466ac9434b8a7a5758af771172fe7e7f68dd2c3f1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_macos-aarch64_bin.dmg", + "checksum": "f58af6dfab9fd2763a0f06b52b4b463d7952baa8d2c194f937287cdd2f1ff75c" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "a4df357c08c94caf4ca953401887df5027d853a754d586dff51cd99cbda8bbdb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_macos-x64_bin.dmg", + "checksum": "b85d3407c784ab8f54d31f83c09b5743a07ad72e5be5e23d0d9279f702d075f4" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.35_macos-x64_bin.tar.gz", + "checksum": "6fd3cce9918434a0eeee366654354024f4364cacf47065c9ff88c977c5b40dde", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.35_windows-x64_bin.zip", + "checksum": "50bc9793bbb435f706ce6e4f58d1dcdea3d7e6a2b4d978755b48915b36b8513f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jdk-18-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.35_linux-aarch64_bin.tar.gz", + "checksum": "5fa60509ba8304118543b662728641eee4762cead6e5fd6bf2472dc249f90b50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-eabeta.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "e08e412405af457f8db7e13f055821030d74d090fe1d3cb5043f1d1fb76f6f14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.35_linux-x64_bin.tar.gz", + "checksum": "47b58f9491e485efbd7b691192eff51a808413198bfcb4b49be004e78d3cc70d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_macos-aarch64_bin.dmg", + "checksum": "5e9df0b96ca4d04ef5b78420188668687601771f63f4d2d4776d59fe74bea24b" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "49669c252485960f6676c8e256a80f5c72c4e97d27d0a5c40d5c9f49dee81edf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_macos-x64_bin.dmg", + "checksum": "1774a9b242a6949043027270d3a52dc06c7f07d34bbc8ced628d7797a1fba12a" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.35_macos-x64_bin.tar.gz", + "checksum": "d7bea8d013d81f86589384e580c5ae1623cca85704d77be02efcb732a02bcedc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.35_windows-x64_bin.zip", + "checksum": "b26ef06e3d8e602bf7c20c04e8f34d189c191984bb34ba8b07bb7b235a95e34a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B35/sapmachine-jre-18-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.34_linux-aarch64_bin.tar.gz", + "checksum": "1aef4d1215051ba4ddf59f280dbca49bd39c99a64d30b91a874a116f5fc78f5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-eabeta.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "09b81436400871ad1e29ad54af9cb6c7d074c2a80f38bcc08de0058c258aff8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.34_linux-x64_bin.tar.gz", + "checksum": "c8fb440f2866133e3f6dc08457447b09fc82ee8593d95d024e17feb38b97e568", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_macos-aarch64_bin.dmg", + "checksum": "d3fd049fd04199fb90e45b6c1ef1408368d72049d27255b6b925fd07c80cfea7" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "f191422c8ffba06621b7629e91f37025b8902d1dacefc09bdb478443f80d3ff6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_macos-x64_bin.dmg", + "checksum": "93c68f99c49e15066952d8c814ea63f72f11ac1b5b61f00cc44a416c8b421d8f" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.34_macos-x64_bin.tar.gz", + "checksum": "2c0cd60668bf855a77c585c033777ae102acec7a0f39236801f1e1f9f74ed4aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.34_windows-x64_bin.zip", + "checksum": "ec8c9707b3c9d95af48e1ba3fe3751a10bde52a1e333d55d7c6014aa11683315", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jdk-18-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.34_linux-aarch64_bin.tar.gz", + "checksum": "7cbc42d08b7028d7fcd54739a5371c129577be7dd9aa276dad96df902a6cd655", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-eabeta.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "9f4cc1ebf0a597c30ea28f3cd83315cff068065ad710a2a67a9058776f0b023a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.34_linux-x64_bin.tar.gz", + "checksum": "5d42227699b2f2c4bc7c09e469413c97b4ddeb55f7264187aec42c6481ebe753", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.34_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_macos-aarch64_bin.dmg", + "checksum": "f16276339a27cff78adacbeac1b2f44ffdcc632d63e481c1dc77668db8bec000" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "26f41a6792c140c9d490204fca77d840ed459b7372e1463f400ae79565ccba6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_macos-x64_bin.dmg", + "checksum": "713c6044ade557feea6ab36b324111f09e8d41dd0cd00d51bd569be515131868" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.34_macos-x64_bin.tar.gz", + "checksum": "04a2a28a0b9261b35cfe99f610958c9c6e5428bf6c258cff5cacd92a685eacca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.34_windows-x64_bin.zip", + "checksum": "70778335f92db46b318299fc4bea62822f4ef1dd6dfb66a13fc16ec79a5c6695", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B34/sapmachine-jre-18-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.33_linux-aarch64_bin.tar.gz", + "checksum": "6253536e69de1cb8b25d2c1c6307befbd983cd9c62046422b21d710e84f00b4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-eabeta.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "1c710b94b9efb0e3309e9225683579334a6373d7a1441ea27cd1e04f93fb4257", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.33_linux-x64_bin.tar.gz", + "checksum": "40336466259969b4dfe6e1e507f44cd715d9886f14430919fe761b82ed453009", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_macos-aarch64_bin.dmg", + "checksum": "1a73d7ea73241ed8f56023b1024c127bf6097fa522e34402d8ff59f42cfd358c" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "a9708884f6dd98dc043a2bc8b12cb59ff9d45d14bfde1aeb920b03f0c571c38a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_macos-x64_bin.dmg", + "checksum": "b00fbd3ebfed2f2e2977f861c45cbbbe188461a00b1684ceeff845d341b7a80d" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.33_macos-x64_bin.tar.gz", + "checksum": "cc657ca1366e62b6a9d462a81b20a31feb14ef4000f12ff7f3a6de560936a09b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.33_windows-x64_bin.zip", + "checksum": "23a7ddddfff54c209ef102e18fbfe69dbe5c5c1ca7efb5a3b65047e4b8f88616", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jdk-18-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.33_linux-aarch64_bin.tar.gz", + "checksum": "4a649e819d10a18f96edf9abf5f369f573136299e51ef4642b01bdda13fdfd12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-eabeta.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "874016192b5ff24d492207bd2c14b04518228c8ddf829ecdecadeb02b99d0109", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.33_linux-x64_bin.tar.gz", + "checksum": "3a0bc5b7a08877653bc40392cae177650081cb51151d2bbe35b30a18ea3f2a4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.33_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_macos-aarch64_bin.dmg", + "checksum": "1978de73f8643adc997916a9173ca3e1456cdb4607f8252e7b05a2badf933cb3" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "c87041081165bf08e5d980e4dfb72a07c837997bb5a1d526a2cd470990a8bae9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_macos-x64_bin.dmg", + "checksum": "c9ebec81b8d30b04f2f7bba923eae2e2efb3eccef4c353bc36654f4337719b0c" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.33_macos-x64_bin.tar.gz", + "checksum": "b7834dbb48e127f4249d0d52ab251f4602df06b91f171e88158f0e0d257b0d43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.33_windows-x64_bin.zip", + "checksum": "37ecb57f99a7f8d0d4a77dfd9d806e175420adda8ce059f90523244dfc33f902", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B33/sapmachine-jre-18-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.32_linux-aarch64_bin.tar.gz", + "checksum": "b46e8f30498291bc85246ce245e020083ba22e66023cea19f5a462a85d571612", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-eabeta.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "0b1dc3a32effb7a8bf7ffe74ba0ef7ed36a6cb25bb94787e262636497ccb799d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.32_linux-x64_bin.tar.gz", + "checksum": "ab96bce1c36a23b9df6c11b43f8d071948d2ae57face6a34e23bf3a8c19512a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_macos-aarch64_bin.dmg", + "checksum": "2ffea07bde3c91aa7f5fdaf5ee81d9d1ceeebb6d29b3ff672e42ea683fa08e27" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "9024b4dd66a5ea6448cd952f22c491faf11984251b030f26f24482fc789cf47f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_macos-x64_bin.dmg", + "checksum": "1d4a4d40bb6c344ffba073f2d1a81ff472794329577f97b17aecb5735f162f0f" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.32_macos-x64_bin.tar.gz", + "checksum": "14cdb20a9373d927406a5dcc2ee9eefb455468a96ba5294ca952b1b34e235c7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.32_windows-x64_bin.zip", + "checksum": "f1896b011c8ad4b4a62942355d64837608f8c6b13e239db47f1b043e3ba235bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jdk-18-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.32_linux-aarch64_bin.tar.gz", + "checksum": "bc3b76d1f8a581e23741d81328d266b6f49992a0afda4b303902d0f147869a58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-eabeta.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "90e6fdf2dcfd85c1f5c3cc3b1ecc8c94f8dc6af7f2f993e651bed2e7db00af49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.32_linux-x64_bin.tar.gz", + "checksum": "2469acf7b5b196bb991e922ea9f4267b0d19df81ffdeef42b1826613dab1f0e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.32_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_macos-aarch64_bin.dmg", + "checksum": "c77198e38f037777a504397b43a60edd035a294d385bf50e31185bf05ec1fc21" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "8fe9b3fc4eb54e59246efb841197db982af441a8bcc69ac44f78f110487b467f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_macos-x64_bin.dmg", + "checksum": "717b95b8170909a3bc6aded4b4ef23903942fce21d94b427a179a30e617c739c" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.32_macos-x64_bin.tar.gz", + "checksum": "36f4c91cd69b8b78217d4f896505cf843b204deda7e451ef670ce95b07155c2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.32_windows-x64_bin.zip", + "checksum": "26c34489fc7ec69f34875351aace088e1a38b92f1593111958f201fa937fa332", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B32/sapmachine-jre-18-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.31_linux-aarch64_bin.tar.gz", + "checksum": "aac13f24bdb29f4d73a9a923d90476a4cea900fc0f61c4f50e2aa60a54ffddbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-eabeta.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "e8b0b1d99460cd57c64c03c68f40b4417fb12744b89746b0bf376c99bd064582", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.31_linux-x64_bin.tar.gz", + "checksum": "693ee8d796e823b8ae220faae23c464fa6fee9e53811b68633e59b8aa8121a64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_macos-aarch64_bin.dmg", + "checksum": "033199015f81bf87bc34dd4b7a44e531bd690a3af917e7b2a31e47a2a286cd45" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "de70b1b129911d90bd9eaf2ca70e5233fa9108dd2dcf89cd976693945db6a404", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_macos-x64_bin.dmg", + "checksum": "e20aa3b3443b2db773fc9d4223b50cbbcba5b29d1c889be1ec53d1f624876df8" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.31_macos-x64_bin.tar.gz", + "checksum": "e0303219e8edeae811fe2e9e7e18937294593207116dcdde0e27a100a5e57970", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.31_windows-x64_bin.zip", + "checksum": "98dab2952b5efacd0d7aa8f6c32d2f74c7bd54ad2232bc86a6b5f70114eba288", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jdk-18-ea.31_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.31_linux-aarch64_bin.tar.gz", + "checksum": "014c3db1e6882cc1f4b60205ac8fe2ce1520736371652e0bbce4c9d907acad20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-eabeta.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "4042974338aa6b04470b06962f377f680e41793982ee18eb5569e30ccc85aa6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.31_linux-x64_bin.tar.gz", + "checksum": "72522db9e92840aa373a0a40d8e927a86b10a5c3c2f7b5c405ac2475ca5e52b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.31_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_macos-aarch64_bin.dmg", + "checksum": "15dfb2628d2f1e078a0989645aaea74776ca7c5d8217c4d29739c454fb8dec6e" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "678bbd7c2fbed666ad91257079e1f4edb6630ed757a4b803bb220e00390e8cc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_macos-x64_bin.dmg", + "checksum": "1401231208b1435f5b45f5479f60bf892dd7f318d3ec81fb5306a8c1692924f6" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.31_macos-x64_bin.tar.gz", + "checksum": "a503bbb55de25269f5e97f4e29d80c53cd3f288b23efd3a947348889c0cf5773", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.31_windows-x64_bin.zip", + "checksum": "f4f5e9f61924075ed8d5ebae62c91c77f04122a4a35e8c17ca21b70bfe3bface", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B31/sapmachine-jre-18-ea.31_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.30_linux-aarch64_bin.tar.gz", + "checksum": "0ec9db0dcdecee2a5ed8b3145f1659336ca98e58d25920def7485ccf660f4f02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-eabeta.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "fab255957eb740e5675a3bd5b2bc89d8d16c2b5fcd41a801e2251f536d965a5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.30_linux-x64_bin.tar.gz", + "checksum": "751cdcd70bbea4d5cb327bc23e62f59a95eeece05e92c567fdf165e884928e6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_macos-aarch64_bin.dmg", + "checksum": "b74868b52744eae81d5e01989b72cf789f17468d83b2b5c55db5cb3cab5dda95" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "ba977b6d1ff66f91a8099d27c12cd47f9c263171cc858bac3bbd74f13a7e26d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_macos-x64_bin.dmg", + "checksum": "9212cc00eacabaf6d4fb41b19ffa8d6b03aaf8703586e1b2c80a37db57a275cf" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.30_macos-x64_bin.tar.gz", + "checksum": "6852f08a4f708dd8e2fa26c691223b8e4a6c7ec75a38c9fef8c6170c3698f0dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.30_windows-x64_bin.zip", + "checksum": "6b2dc479101a742826e8cf2f2b2a6337d367682c0953b57f81b2608bb9fb89cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jdk-18-ea.30_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.30_linux-aarch64_bin.tar.gz", + "checksum": "5db38c2a783cce84fa1d5083b7c5552774061fac59792e7a5c8f261362f08e9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-eabeta.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "da81298824ce759be7956d26ddbdc9a7b03a90e5e604705cc6e08d2ef1561e71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.30_linux-x64_bin.tar.gz", + "checksum": "96ca59eaf9364c18b59d3f15b6127f5c77f4efcb88913fcf2b2b89e2e48450f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.30_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_macos-aarch64_bin.dmg", + "checksum": "5f95208f7e1011b2e3aa28a52f5ea991acdc8e2f67c9c9b8d6a68fb7171c86af" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "753d96eb9225238c8df6f23562cb9f7d0dda57d3ea15cb65ffcf12854064ceff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_macos-x64_bin.dmg", + "checksum": "d1c98cb29046fbd0b691941219f9cf6eea8428c09906201650202838439b577d" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.30_macos-x64_bin.tar.gz", + "checksum": "56df69f3298681f5af23c75f4bda9d5e07f3778642ac9f1f2f4dbb6eedf95f0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.30_windows-x64_bin.zip", + "checksum": "05eb49d7ece27094f630ef5942fbb70bf1c9b5b97408d6f7834d4c2a45562ccf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B30/sapmachine-jre-18-ea.30_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.29_linux-aarch64_bin.tar.gz", + "checksum": "b8f7f980b413165da5977d70208b7329585205c4cb07f697cdf171f54cf814b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-eabeta.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "e29c6f1f304010da04e3cfff7286e74e914de4d6c7e74368c864daaf30919cdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.29_linux-x64_bin.tar.gz", + "checksum": "4acbcf274a2b0c4242dc61fefab952f6285bfa270a4dab5ae6c278bb08b98766", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_macos-aarch64_bin.dmg", + "checksum": "308d0063dc4f0a215f6f44a174483eda5b3b701f85e931484c02da82356bd746" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "ce3ca66e38a18493c365db5a76192507dedd30fd1e1692e9951ac65935d3ecff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_macos-x64_bin.dmg", + "checksum": "b17506fe2026d238220c4bf107c4c1049a06f0de63008cd1d042b390d57337e8" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.29_macos-x64_bin.tar.gz", + "checksum": "36eea4c1250b0e37b00bd74b2ca7e4b4b698dbb06c2152037da10fcadc352a18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.29_windows-x64_bin.zip", + "checksum": "617293613e8f44f241e8bc87551b6fb6ec3e757a6c78e68c5207e4199fa9a35c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jdk-18-ea.29_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.29_linux-aarch64_bin.tar.gz", + "checksum": "19764486c280dd40f705cc2be8dfa4e5305ab77bafdc27b5bbd4eba6475ac2af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-eabeta.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "4ba0cfa14a4211376bbf39925ca511b32d489c58abe15a1639148326557dfad4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.29_linux-x64_bin.tar.gz", + "checksum": "d9feddc739ec7064e321fa9ba37da772680f43f3847921a11a85dfea561ad2cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_macos-aarch64_bin.dmg", + "checksum": "f84f9099547a9a2e75490ea43d63039df3a0ba7da2ba5866a56121f8dc610b82" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "bdcfbbbdc6e3068ba8aacc2e53e2597f227e37f11f451e084652d2f4ba16acec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_macos-x64_bin.dmg", + "checksum": "c0e6b7c9bbc81f0ddbc216e08aa8406e6ad8d7fb036eb548efac785dd2211cd0" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.29_macos-x64_bin.tar.gz", + "checksum": "095394c20cf6bddef8b77220ce258788196e76dbda4b67e6a197a9671d6f2978", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.29_windows-x64_bin.zip", + "checksum": "f7a53a10be9ed01982e3bd04004a92768520bfdf2534f3a51cfb15bc2e8dcfa4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B29/sapmachine-jre-18-ea.29_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.28_linux-aarch64_bin.tar.gz", + "checksum": "8fcdf1e6b2babcb18376e630a08cac4217565ba07f712d19353a0caa03fb5e9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-eabeta.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "cb09c3d8f0d8a748643f46184e246dd221abb46e734a595153f1b834fc2c4e64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.28_linux-x64_bin.tar.gz", + "checksum": "ccfb1055b1d33cb3bc3c6abd6690978e10407cd28c1820da9c66c29d004d5fbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-internal.0_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-internal.0_macos-aarch64_bin.dmg", + "checksum": "8efa242f1e480365587b7ce47999b3331cec09d06ae6932140615de4c1de77d0" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-internal.0_macos-aarch64_bin.tar.gz", + "checksum": "24e42330b3c6431321485a3059d21cd2e86773867ecdf15534e445e748c6acdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-internal.0_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-ea.28_macos-x64_bin.dmg", + "checksum": "dfe98e55617280f4baa9153aeec39442f88d9adc579139ce4c49ad5c90d0c721" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.28_macos-x64_bin.tar.gz", + "checksum": "e01137572d3e7064817a44eefdf76f4b01310a347faec6da0d50cc8092fc1887", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.28_windows-x64_bin.zip", + "checksum": "7a662162096eaf9de8c84f0c1b6ef0c385981dfcee7af2fdc7cb178ef1846a69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jdk-18-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.28_linux-aarch64_bin.tar.gz", + "checksum": "3f5ebbf0ad510ca28d40e3b5f709dee62d9207068fc86ccf246ffdae86626dc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-eabeta.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "8400eaf0b82c842d81a4dde6bf14b36097312a02d88a0b8e627b3d81f611e14e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.28_linux-x64_bin.tar.gz", + "checksum": "c39d33a92e6aa227f0eb2ed85f76cfc310fc568680f909aeb53a1e8c1094eb47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-internal.0_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-internal.0_macos-aarch64_bin.dmg", + "checksum": "7b094b8f29d82667dbc9d823b87f1e468b0754a95e811ca95db1e01b1a61b935" + }, + "tar.gz": { + "name": "sapmachine-jre-18-internal.0_macos-aarch64_bin.tar.gz", + "checksum": "a2bf38ff1372e01e4517709e63d186e0cd0333c055e3a71dca3494d39b5549da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-internal.0_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-ea.28_macos-x64_bin.dmg", + "checksum": "3ec3aae32e4cbff9a7d33fb54067b90c563bddd20373799494675d37d7318114" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.28_macos-x64_bin.tar.gz", + "checksum": "56fc15a576257332ce3177aab396c7d43218303b9459aa9e7d7a4c0dc4cfe47f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.28_windows-x64_bin.zip", + "checksum": "234a7baa9e4ebe9500a2d286e03cc40894b86fea0e314a5fa52824e7fab6e019", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B28/sapmachine-jre-18-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.27_linux-aarch64_bin.tar.gz", + "checksum": "4b11f3863d1145196c868228918191fd661cb8215b9473458743099ac80fa3e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-eabeta.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "8793a9fcd41f079c1b7d9e50fa741eb63df2105d1ca2e38409dce80ca7ca74d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.27_linux-x64_bin.tar.gz", + "checksum": "b29e7d14fca5138a9edbe6323a3e1b70e6abc210d4904e30bcded2e809287b35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_macos-aarch64_bin.dmg", + "checksum": "042e3f194da9516d16016d05a3878c07a63c33c9d766845432c15c133e9f2789" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "a1d80bcf3cd2dfdcc718bd3579eefaacf74f984f678715f817f7d70f3f882d2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_macos-x64_bin.dmg", + "checksum": "a9785dc19e729a842f28e3287b7d11b8939843c2085471bb493de66240aab8b6" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.27_macos-x64_bin.tar.gz", + "checksum": "503cf3dff53603a90b0de62d30ceb5d655e02d4b37f9815a1693d2ee36c13927", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.27_windows-x64_bin.zip", + "checksum": "6c86b6c76aa28561e348d36bf8c8937bddfe5aa9500bdb706356c3e1bd7a4e02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jdk-18-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.27_linux-aarch64_bin.tar.gz", + "checksum": "b1f7f323794a0ef1bcadb12e5e283d4fe9b6255201dbb2b412bde4e7fa49c435", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-eabeta.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "e0154b2d8f25397e492ecb73df9ed206b89273dbb5549e8b1ad7b9f993b2fb52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.27_linux-x64_bin.tar.gz", + "checksum": "bb411b6395b25fe50f27dacc411dab429c78a77151ca350231a95f24269967a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_macos-aarch64_bin.dmg", + "checksum": "3c7668a5c870fb050fe85c795776291c7047751d0655112a7a2e29c94458ce1c" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "f98e49a53c0463b147ce6bdb342e8299121060f5066eefecc6403da0674a7d7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_macos-x64_bin.dmg", + "checksum": "253ed58540317c76c71311231284a4b58d65687baa84190673b1d665282c3cb6" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.27_macos-x64_bin.tar.gz", + "checksum": "9a97b71c90c6b4be7842553c87971097e81576f120476ca27ddd4c162e8f8ccb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.27_windows-x64_bin.zip", + "checksum": "f5990ec9568138f3b4eaee49fe211d649a496d6483925ce90b8e38ac9d8f4ea1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B27/sapmachine-jre-18-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.26_linux-aarch64_bin.tar.gz", + "checksum": "c0e565e527960d098102f37c52bbf022565f3d8d51bbea66effb326f7edb71ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-eabeta.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "113222e10059c1ec94171cdcb896ae83efdc0a94c297733366d8c26f4a54bd8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.26_linux-x64_bin.tar.gz", + "checksum": "987708f8d2c0a8fe47d22335b1a776a408f6ba271b09de51d1edd0579c2a13af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_macos-aarch64_bin.dmg", + "checksum": "4ea93418e1bf60312e5c334163ab2e678320195345b3121f38c80fb99751e3ca" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "a729b9b47ae9b2e503dfc98d90e83128aa5e09ef03fce6ccdbb51842deffa97d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_macos-x64_bin.dmg", + "checksum": "95662141293444779a7e0a912927c4c6e3002057013bc9e5121685077534c71c" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.26_macos-x64_bin.tar.gz", + "checksum": "700fc267738b8ac4cd8b9266ccbd4ed9f5cd2f6871dfbaf0bcf8cae91c08846d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.26_windows-x64_bin.zip", + "checksum": "82d759b30588aae0c503bb9cc0393d0a88af035430f134f4eee2978d17580327", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jdk-18-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.26_linux-aarch64_bin.tar.gz", + "checksum": "4d134c3fb3bde7a64122fcefb2557d6a531caaa0338aa26ce28737f6a06c6701", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-eabeta.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "cdf0bccd201562309ff7ff72c576b8bce9c92ee0b9efdd0f0ae718044b6ff126", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.26_linux-x64_bin.tar.gz", + "checksum": "9d81fb024c75f8155fefae44e41b8d4d4a3232393b6208de28a1c7f1312fb6e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_macos-aarch64_bin.dmg", + "checksum": "62b24b4106a469304671e982cbf1aefbcdc6fe479b34d1ae0ad1672ef6ccffeb" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "60c3a9a4ed1c79c887c9a8e964c4f1479bd842cbc0028462eb61473b1cb80b37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_macos-x64_bin.dmg", + "checksum": "0b70411eb38ee2480e2bec394daa337dc92f93e8fc36ac34d620b8ccd80f8ef5" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.26_macos-x64_bin.tar.gz", + "checksum": "929f0a461490074bf276e6372dc4532420c1e38e0f4aa59f7bab38a75d3c1729", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.26_windows-x64_bin.zip", + "checksum": "25d2288a8a96481a9c82df9aa6d274ea90f8b86521c996f02ab48d3c4c5f0ab4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B26/sapmachine-jre-18-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.25_linux-aarch64_bin.tar.gz", + "checksum": "502a1653e0c14dced4bf508f7a01dccedbabf5c6a3f631f28a80b00b0c9d19df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-eabeta.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "d998ba3842c7f6728e7608539814b60c03fbdcf81ca55649c9adfeda7c5b53ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.25_linux-x64_bin.tar.gz", + "checksum": "935f20133be6d3e4d2a78e10192758e69fd57c2a70a2f3efbf714238a448bcdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_macos-aarch64_bin.dmg", + "checksum": "9ee61e8af831f35d2125c8c335e36b44acfc2629014c1a13156b2e887745add5" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "d9eff1f92a9bc80998c5303ac0d03a5e44ecd83484d63b4ebe6f557c06ce0a9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_macos-x64_bin.dmg", + "checksum": "7c2998f2cb9833f55a615db34686a045b0b7de49c98a2485d6357d75c6ffa941" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.25_macos-x64_bin.tar.gz", + "checksum": "c97a0b5a39c360bf3dcabf77db403eaa325c1aae610b9fcf1807bb1f113ac9ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.25_windows-x64_bin.zip", + "checksum": "a4bd8e86d15b45d3c79dc7829c38aad6aa8ec235176921153139f372055305d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jdk-18-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.25_linux-aarch64_bin.tar.gz", + "checksum": "31fd511c887cbaf4006b4e7008b3897de387b03bf9b0eb6dedc760af6ba573f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-eabeta.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "982301c3cd0266ef6e085214b47f58876cb527220809e794e60f300b68e40f80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.25_linux-x64_bin.tar.gz", + "checksum": "1e99a73e416ce8dc70d5f3eb775909d15613a1ac122f46450f6570336d0f363c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.25_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_macos-aarch64_bin.dmg", + "checksum": "c0bab8bcde09950322d2401f6b76e11dcb62fe0626ad5294594e45efd09cf8b1" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.25_macos-aarch64_bin.tar.gz", + "checksum": "e55014fdfddb4211323da4b06af22981755c4080e02ec2faedc48d38ac9f7ccd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_macos-x64_bin.dmg", + "checksum": "422c4fa5df6edcb7cc8593f41c3739d322f57d61a6f9fb3b8d77f06e5470a45b" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.25_macos-x64_bin.tar.gz", + "checksum": "b00ab49a82e3a4646ce19a3141f7fce908f033cebd798d517c5d93a82bcbe9f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.25_windows-x64_bin.zip", + "checksum": "487d263aa52a35f8b81f67fba0e7c783de30183e61f58291c29feed34a2eb738", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B25/sapmachine-jre-18-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.24_linux-aarch64_bin.tar.gz", + "checksum": "aae4589d8579eb584ac60030010ceefdfa465dbab6102c66656ade3cde3b6ea4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-eabeta.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "693012301709296f1ea76d6f3953612bb45b2862d5f7cba9a494bd155357da12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_linux-x64_bin.tar.gz", + "checksum": "080fe56baf5896db784ac7e7f252948ffaece19d5361ca973ac7fb34196afe3d" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_macos-aarch64_bin.dmg", + "checksum": "b9c1b655e3f7b867d9cdffa6b1f885a36bd2922c5225d0b59daafd226131d1ce" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "badffdc1db6c1a3b0b3bef5c6fa19ef84a8814eba168da6aba80fc0e3137637f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_macos-x64_bin.dmg", + "checksum": "e9df863edb96894840c33f158801e3b214005190fdd6ce48b1a81c73882b3bfa" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.24_macos-x64_bin.tar.gz", + "checksum": "1a93720a6541633509a121549a5974dfa547e1c8ab6c63ca4d6aeb8385b921ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.24_windows-x64_bin.zip", + "checksum": "6eafbd3d828fda779ed64d69ece326c9dd499f2c890bea17da113778d3e99abb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jdk-18-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.24_linux-aarch64_bin.tar.gz", + "checksum": "90c9794143652655cd8db51badef85f9e98dbcc268e253841986491a91028c2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-eabeta.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "218225eac5fc7a8eb2f52122269efc62413a42a017e2016d94efadc086359466", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.24_linux-x64_bin.tar.gz", + "checksum": "7202d31674fbdaa907ada83d138a50470bc523f9540f819ea2d302ccad1a8d08", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.24_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_macos-aarch64_bin.dmg", + "checksum": "c3f297f13f87dcf7d20de8c985817b9ea1c88c032d08acd53e03c243a5f47de7" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.24_macos-aarch64_bin.tar.gz", + "checksum": "39289ae86d2f60a569f2fa3bd90d9802ad02cc30b1ce7138d6def39a725affd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_macos-x64_bin.dmg", + "checksum": "f8eaf147b373924ef0e4f51526cb39b35242b8e5a8d30ea903b632289d1846fe" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.24_macos-x64_bin.tar.gz", + "checksum": "c319561cbbb187167a6ec8dfd826008e76bf0d02eb44f4272efa6bb73b063bad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.24_windows-x64_bin.zip", + "checksum": "7a2334c5b0dfb06c886d43e23b099404c62fa2333ea24757f65acb071a1689f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B24/sapmachine-jre-18-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.23_linux-aarch64_bin.tar.gz", + "checksum": "00cd772c025919bc43b5b15d46a6fecdaf728e1ff7d1e7978ecc277390a1e92e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-eabeta.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "a9b4618ff0ab11e14fa899998d5548a31a7b08f6dcd39acc6d4dc2560b8771ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.23_linux-x64_bin.tar.gz", + "checksum": "0dd7cd48c5e808c42a63f311d15dd0a567ac88f79a44fc9aa4d7938ffce11af9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_macos-aarch64_bin.dmg", + "checksum": "812ca6542ff21e1ea4645a13bebd4e60a20311a596a21be4d5021fabbf0f1809" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "c091ce229d574c6c6230f1e7b466aa1a0d53f78aae96c149a4ad40cbbd0f63ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_macos-x64_bin.dmg", + "checksum": "afa55e5ffc9bc3144c9fcf5f97f2ef47d4370dc6c35efedd235180778d054446" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.23_macos-x64_bin.tar.gz", + "checksum": "f4001781f8a50885c5b8da99502513013013eec57a08002d3a05e7f47b25c656", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.23_windows-x64_bin.zip", + "checksum": "e5f4a36f4a35ea1b00a7968aa2dd1e5280c56f12e5d01ae8ac9615f4d9d5dfd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jdk-18-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.23_linux-aarch64_bin.tar.gz", + "checksum": "b959584ed78c96eec009fc47e53466796ae531d7c6c660b878e2f8312cc281fc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-eabeta.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "26ef4b2a041972efa960efa0dfb0a82f6473428be01af9f20617006f65da561a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.23_linux-x64_bin.tar.gz", + "checksum": "c88c52487d9917ecfa233c34fb581a9f524a3bf59583e92aecef229cc47b3961", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.23_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_macos-aarch64_bin.dmg", + "checksum": "34f7051adec720e00fc78c2ee65853f34cf9345cfbf178192d4985eed575792f" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.23_macos-aarch64_bin.tar.gz", + "checksum": "307497bcbc7ed4080ba4eb4810ae3395590f7e1854a46127d92edf4bcb0b4c48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_macos-x64_bin.dmg", + "checksum": "9f3c8e20a94dc0c806c779f1002bc7fa6aae1c681d587052bb7d825055587e1e" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.23_macos-x64_bin.tar.gz", + "checksum": "6159f454d3533c22c9b511c8e061be3f1636eef29a140f40c95368b1aea0330c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.23_windows-x64_bin.zip", + "checksum": "aaebd1c7af1989e67bdfac05ee9aa5c2af75646abd9cc4366240e089d5dde564", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B23/sapmachine-jre-18-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "a66c4f3c504c3f4ab78d0f693b05adfd17c3bfee1250db859cbe5f97f58a7452", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "f6e2302875cdd53cecf3f1519d6056d966f9073284ce8bb75355625f7bbd9646", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.22_linux-x64_bin.tar.gz", + "checksum": "9e9c50a806494e82d51d76e24dad92f6dcb715f0a2d9beb07d913cc471e5ad0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_macos-aarch64_bin.dmg", + "checksum": "964d5c8ce1a85ee00a2341f46c25e667648202817c0937bcca3a6be0dc7024ee" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "90c9665f64ca692a07b84cae70cc8d2042461a3f97e78766f0c7f19b030d27a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_macos-x64_bin.dmg", + "checksum": "a2b646253b4cf03cd9534a9b2d670927d2c2c8f65ddfe0a8c19ae997e7231bc1" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.22_macos-x64_bin.tar.gz", + "checksum": "ed239d49e98aeef69430557b97e411cd130c508191fddde6871c6c1ba55a842c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.22_windows-x64_bin.zip", + "checksum": "41cfc44b6cb24edc38efa79b422e1ba14a3429a35e530dae41b0989de0bf4740", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jdk-18-ea.22_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "1061fdf4e1538c8960a9c556ef055bb3dac64530e727122a9ec7260fe506a268", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "7d360e59b79662f36e9c9495174072f9bd840f6984bcf64915034cc5f0e8d614", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.22_linux-x64_bin.tar.gz", + "checksum": "2b8109a3d9e9ee790b729d76c185fcafbebc15e9c8f90593eb8e90d70fea4b81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_macos-aarch64_bin.dmg", + "checksum": "ce50d2a9c8296f5b8793d610d5319d8354981bcd2924315a2026395ea0e68420" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.22_macos-aarch64_bin.tar.gz", + "checksum": "91f0a83474a1943c93cda5afa8bbbf79a30414dcdc98f867266e2de809d99965", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_macos-x64_bin.dmg", + "checksum": "1a349e718e94b27ba6cd58d1dae02ccffa638853a88e72be72582daf95514449" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.22_macos-x64_bin.tar.gz", + "checksum": "a611e2d88827542e0bdc71e09cace75e42b0e4aef0e8f3eb5803d698c88ad2e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.22_windows-x64_bin.zip", + "checksum": "a11f0bcd9549efef0f4b8c075605be7fc102fe9cb9d970635030d0a7a86a855f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B22/sapmachine-jre-18-ea.22_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "5ff0d37040bd74cec28eaed0c23a25795a928c342be42e407176cdfc6622c8f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "55f54cd1e26dc6788792f8db60c23d1b42326456401438bc1406fd3892bc30b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.21_linux-x64_bin.tar.gz", + "checksum": "2ef6cb06e079e36301e981e37468568178b9c13c3389cb1b925d238d54655913", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_macos-aarch64_bin.dmg", + "checksum": "cf29ecb8375d8a5fe5e76c7817c74e467857e44af15c13dbd17d5a5bf680877d" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "9c822376d10defaf92f9af442398310fde0a7027e2bff0b29bae7dae7279839b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_macos-x64_bin.dmg", + "checksum": "ce421fd2fd97af965ba1dde1c9d6ce11c03101afb4c38bf037095302a6040f53" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.21_macos-x64_bin.tar.gz", + "checksum": "40b73c4cae5ca31f39c8b1e853dfeb68ed4588dc966086875eff4adef7679707", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.21_windows-x64_bin.zip", + "checksum": "3415d5173e346809709ba96f1250cf892558822b353d338dbc4eef4aa9466927", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jdk-18-ea.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "39bde9c2ff8aba8cd86d57afe0491e86cf839c8eb3626d512d6e0c4793af4f34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "30877aab5aeefec6ada1338391c104a49a6f4d01cf244a35b4dea26b8fc02759", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.21_linux-x64_bin.tar.gz", + "checksum": "baed859bb0aaa5f5ed75f227e8c1f094bebc3586f95ab990acf41c53006a91c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_macos-aarch64_bin.dmg", + "checksum": "fcb6816eda3c3c8f4b55d739d4e62b1accb26c403a3b04f1de5d2dfa3dc10851" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.21_macos-aarch64_bin.tar.gz", + "checksum": "2cc6b54c3b4a2b632c3ce6513b537086bd60f5e8c6744eb49aa39c461d6c6450", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_macos-x64_bin.dmg", + "checksum": "9f284b37d96412bd57a42de9f17f88f98ac1f013d41ed8b13c62707892c8afdd" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.21_macos-x64_bin.tar.gz", + "checksum": "0dcbb627b6c1c0c83b7ad73e87f401faa257426e7c748dd8327a939ff1d91f36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.21_windows-x64_bin.zip", + "checksum": "80503ce170377486b78d1fc0c6770e519dd3721ca7e2bebcea5a718d04d14784", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B21/sapmachine-jre-18-ea.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "5563e2e649cf050718d528682bfb2b2e94c7a48fe265cad166c0b7a7cca3241f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "c67d4c6ea35f56744a804ebaea9f87daeb9a63891e877f8b29ffbe88bdd8ac2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.20_linux-x64_bin.tar.gz", + "checksum": "b3a1e48112ec01da1c6b2a553053af44b1381649e551262f3e08348e14020cca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_macos-aarch64_bin.dmg", + "checksum": "6d3fe0a70a5c358f30e3d5593b06b8193ded14d13ca305789655f49c43275ce1" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "bfa7945833ac59ab623889d851c7d3249a03def6f66523a6a9702eb8ba718e7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_macos-x64_bin.dmg", + "checksum": "0a37ac83ea22612086d58dee5f975a3351c00ca5aa4cc5a015375569a0e4f393" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.20_macos-x64_bin.tar.gz", + "checksum": "cc27f369d7a76b0a2e2e440f2fb35a0068d32795c1d36eaab0e0c3f357b3ba10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.20_windows-x64_bin.zip", + "checksum": "fca64b5465eede4c29402ce51099e46f7d62966da5866cf3099ed93fadd7b690", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jdk-18-ea.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "905f8397b004001bdab31e25a01f0ebc10178cf54f1da35501b8cc1d1aaa7029", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "02c95dc875e62f4f3dacc0aa3061a225312d3c8b4be4dcde4cdefdb5917fef36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.20_linux-x64_bin.tar.gz", + "checksum": "eea1cc236d8e76e42c6c5aea99acec3b6b1e648d29337facea84e3b4c8890856", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_macos-aarch64_bin.dmg", + "checksum": "9ba7083d81fb7d9fe0dcb63c505596099afa0db4d7a08d16e580c98d2a23657c" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.20_macos-aarch64_bin.tar.gz", + "checksum": "3039bcd021ee73c9b9fb86e41c0fe2e67aeee5c45d513b2bbea839d295009ce4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_macos-x64_bin.dmg", + "checksum": "e6126a7e7573b8263e9ad96aa87bab530626daec6ed2f893f2f0b0cc36b664e0" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.20_macos-x64_bin.tar.gz", + "checksum": "0fca48c2166c9802466d1302e23a9c289c318e2f6178e6bf5a6093046d2f5a2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.20_windows-x64_bin.zip", + "checksum": "ec3d79875cbc02fed2dd00072bee9d3aecf356e312fd3e9d858209c96322125d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B20/sapmachine-jre-18-ea.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "7a6bd3c80f7ca1856720aee23f32b6eee9e159bce626dd327b21429c70b174d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "6c5d3521fbe0ccea1ebc1daefefeade96bd752aab8815a188e0e58c4b3479d49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.19_linux-x64_bin.tar.gz", + "checksum": "f625971a762d1d08a646718d6b06535428d9ecf632e98661fdad2e40c8aa937a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_macos-aarch64_bin.dmg", + "checksum": "7375bb1b93eec699fb48a456d42dd91d5f74799084535dc9631321cc2208649c" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "0b4fb67269376528619139c7d634b2b6fd7c1025a70c3400b1d6e6ea3d9d402e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_macos-x64_bin.dmg", + "checksum": "601bf8fabc1f930a32d5b5c4f4f9075e4c658cb54944af88816242c4c091de88" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.19_macos-x64_bin.tar.gz", + "checksum": "814f9dc5a578002f4124046a3dfb91f53eebb65f964041b220e5398dc7aed617", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.19_windows-x64_bin.zip", + "checksum": "f481c8cb293a26de3287128f0dd537f99d995595a9c496603a3debf92e3d659f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jdk-18-ea.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "e360bc08e3e9f7fb3984f452a31ab6c7d1cc11a34d582b14a94f8f694b492b07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "9a40b03c713d36ae28af4af3412eb7752ccaa5906f11fc555916c3f508dc9c38", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.19_linux-x64_bin.tar.gz", + "checksum": "cb97c53860a2bb34c510da2713194482549c3c70d854302f8f32ae2ac95413dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_macos-aarch64_bin.dmg", + "checksum": "8ee56c3edf9177b9f7e2f292cc77877ac515c0f0e8a8f6dbf24fdd558c337258" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.19_macos-aarch64_bin.tar.gz", + "checksum": "aa36c67abfe7232a13582c9c748911088e5c5328ad7d694e3c86722e8c9889c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_macos-x64_bin.dmg", + "checksum": "a519482f7a18980c23f19217d8f54c996d22cc99d137c64331328ae25b498173" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.19_macos-x64_bin.tar.gz", + "checksum": "6392c16bd694b0f55509c4c256e535e8cb0689155674776dd6f27a55bb80227f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.19_windows-x64_bin.zip", + "checksum": "2e9d1fd857245c213fc3461ceac7164ec375b2b0458d366f4f3f9635da5080c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B19/sapmachine-jre-18-ea.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "e4bd16d087485d6204493797fce0cb920596dd86871200e67f19ee09537107ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "391792254af7dbc77d992fa0935f4bbdcbc6b38ba0efd7e7f24e2e99aa5cbf82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.18_linux-x64_bin.tar.gz", + "checksum": "fc2d67b7ecd42feb11510cee1ec0f1654bbaf5ffdbcd1aae16fdab1e4533be62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_macos-aarch64_bin.dmg", + "checksum": "cc12c1d0096ed1f47de7a8495e6e00c77b79cb6b262e4092f111d7f09111aa33" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "cd2354fb2fbb18b761804d94d04c75f3d143c3924fc519f609ec5d2fc4ff4009", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_macos-x64_bin.dmg", + "checksum": "537952b81ad7479d1a8ecf83ba542396e02305aa2256ce80af7527cdb8106cca" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.18_macos-x64_bin.tar.gz", + "checksum": "7ee06e10aed994dff44573c10696d93f03fae8e1bcd25615bb4c52a37eac914e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.18_windows-x64_bin.zip", + "checksum": "65bfc25f385036107bc11a7ac5f0c26101f25e2787d4a8e1b5dce92121db1d81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jdk-18-ea.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "52c0c2ca6efa2ccfb3b785ec5dbdb19b8ae9f48372106c9dd3869eea1a48c304", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "74bc89af0edc5d29a464f3838f084bd5ca2283292c263cee67979e9ff4d60833", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.18_linux-x64_bin.tar.gz", + "checksum": "a7ce53cbd1582ca58b5e33ed80b6628104607add3fbb12bb31debcbcf9ce2d9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_macos-aarch64_bin.dmg", + "checksum": "8936628a2eaa027eeb4ab3cdeba80d019939010cb8c7da185f139e9b4f7f3c13" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.18_macos-aarch64_bin.tar.gz", + "checksum": "f726b8ccaa28e78d621611dcbc1815416f0fa544ea0e943d538cb9fb3dcc6931", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_macos-x64_bin.dmg", + "checksum": "5a46f23da9dd7f07e744ff975fd1943dcd0f1c785cdb7e7def170f61fe5983f6" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.18_macos-x64_bin.tar.gz", + "checksum": "7233a9e72782d950d3fe97a5c35e6aae750fb6d903666db8b5787aec5030be90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.18_windows-x64_bin.zip", + "checksum": "27d748c269e604c792d605abe34ba9fd5e9e3888e5bab2d73483f7b77ca6910a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B18/sapmachine-jre-18-ea.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.17_linux-aarch64_bin.tar.gz", + "checksum": "92f12da279e95006a66af360e68cea0b948861a3ea1ce0e4423e875445768902", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-eabeta.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "5a88a2416630726116c437093429e54b44f7440f87bf092d8612a1fff6481622", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.17_linux-x64_bin.tar.gz", + "checksum": "11ea7b84ce79fc43997f4465e12fcb8ef07cbba0f8909e8e3589beaf8be3d90a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_macos-aarch64_bin.dmg", + "checksum": "c3cd3229bafbff300aabdea450f5c9f9a5229b691a17e68abee338cb3cf73339" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "a461536550672689da69e84691a6d3a8cc96aae612652518ca7da4d4e8f1ce0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_macos-x64_bin.dmg", + "checksum": "d5095a95adae4758387e871a8f88ee0abbed7d03295ca7e1e4a6e451e0dfb5a9" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.17_macos-x64_bin.tar.gz", + "checksum": "b092b6ce72aec4f199c590b1857034060b8000eb9ffe56b9fdce655765875550", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.17_windows-x64_bin.zip", + "checksum": "97389f64dfae036bfbb67d4243cf0aa46f583e9798f38ed71ea6737a90b670db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jdk-18-ea.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.17_linux-aarch64_bin.tar.gz", + "checksum": "bd8810d02072484faefff16d51916a9313f598a0f33fb85cd443aee36f776c20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-eabeta.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "8eb72b1a7df657267ed6b5aadd481ac2e5920203098fef7a27a708c6a1646a5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.17_linux-x64_bin.tar.gz", + "checksum": "56ee481c362ea22005a26e4873888eaf87a38903f4dba42b5c24c345dff97317", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_macos-aarch64_bin.dmg", + "checksum": "b4cd0bcea965553126bd1243f20e776b8831046ea11cfd07ce0564c8d75cc01a" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.17_macos-aarch64_bin.tar.gz", + "checksum": "96aa6e8b94cad93fb3730026843bad67f29eca00d3aefc17c02e4da8b55c280f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_macos-x64_bin.dmg", + "checksum": "9d20e4c2d42de216430901091541ede660326d7cdd1c52a7e9e1c68723a2f677" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.17_macos-x64_bin.tar.gz", + "checksum": "8ca2220259e89861537d564bb0a1ad844ddd03f4bcb739eea42b468f2fff4e83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.17_windows-x64_bin.zip", + "checksum": "be2befe4c89d581c3016d79aea672f83f964159fb0e8089ca6b5fc860d9fdce0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B17/sapmachine-jre-18-ea.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.16_linux-aarch64_bin.tar.gz", + "checksum": "5164b825afde8599aea7a7cb6de3bd72343bdd14c20c9a8fc76035cafd1b6b3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-eabeta.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "b8fdb21386bf2421f7342cb976cd25245b9946a5dbf64cfcee8e720b0ddeb77b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.16_linux-x64_bin.tar.gz", + "checksum": "ce23546e3f4ac9689c5ca0383ca0530da433d6ba50e86dba04961e15ec7ef8bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_macos-aarch64_bin.dmg", + "checksum": "59df5b1f71479da7fdc66cc458cf565e259e3adcc2420bdc7d5a257e637cfedc" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "a7e84fb844d4241fb83029e1dda2f885e6953a07e2931097c9413f908b23f66d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_macos-x64_bin.dmg", + "checksum": "b5a53087fcffe0e488787f215db3b5dda5eda4e1690a1805705255d648383b9a" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.16_macos-x64_bin.tar.gz", + "checksum": "baa3bce133c4b5c7b73c2329b84d303abc054dd9d9a3df778f54ce11d5487d73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.16_windows-x64_bin.zip", + "checksum": "4f6f83fab52d9eacf2c1f56f86ccd2246e4d569a017ebc8334afca20b8940c16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jdk-18-ea.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.16_linux-aarch64_bin.tar.gz", + "checksum": "5562052dfb99a12e62978526dd6faee8f95b44ab92955ff5e2b84694c2337e2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-eabeta.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "3a12706f1289ef814cec40149e6142305435f77836333c7fae0d479bc0b7c5b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.16_linux-x64_bin.tar.gz", + "checksum": "b55b1fb1642f7f3c01214edc36fd3aba36a82448b3570d44a0fcfbcb3c7958d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_macos-aarch64_bin.dmg", + "checksum": "7454542286d913f86b3a28bd2773fcf6f4dd1818df775496b3f231a244da429e" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.16_macos-aarch64_bin.tar.gz", + "checksum": "6b6bb8d6dc768fde29d70a501ebce124e86be3825b0888f50a4acc2324b01d1d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_macos-x64_bin.dmg", + "checksum": "398cc6a8f444afe6d226ab9fc89211a34eb29721d62c7921c104546a2f522c1c" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.16_macos-x64_bin.tar.gz", + "checksum": "83000a81bf98e699bd1025c1345552be8c3f2c05f92bcdc289131cf0de573a46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.16_windows-x64_bin.zip", + "checksum": "24d3e23482ffed02dfe0e38fcbc51303c4bcbfd375350ffa2ca9f7543d4e8b4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B16/sapmachine-jre-18-ea.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "dd9dba21b70937d4476bf010fe6ba4833e5c9adc12fe81db50b84a0e5826adf9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "2c9875fa9ef6c8d81ada533f89c8696876e4592586d866f56264b005f2d2c955", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.15_linux-x64_bin.tar.gz", + "checksum": "628ebb55f02df3d0d7fc5af919a46d9bea0c1d9b8e578439b4a00c565dc09154", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_macos-aarch64_bin.dmg", + "checksum": "e50a11189d4cc01e0bbd34c460c06ccc866d0c4111b7e62c1e15e1a0cf5c7593" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "73d87fbf27347afe0e67b5a8f8f41501a0241830b12e58f66bae4e1935a2c95f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_macos-x64_bin.dmg", + "checksum": "974224ca26086ac14b38468b27ec78bfe74d40c3f3ee3608373d81b12d06c9d2" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.15_macos-x64_bin.tar.gz", + "checksum": "0f27409ad107bd592381455dd2e41b03e690340c11f75afb3682609f17be1bd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.15_windows-x64_bin.zip", + "checksum": "8c50976987a1b6a08f794a5ba6ab8436ff58f9d115b03ec5eb05b208ddfa295c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jdk-18-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "7abefe4e40bf66dfced62e503ad3109742c10a4bb72dd6b99d0207c0415a3632", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "77634564d8fbceb0c3cfdac4878d383701dfccf2dc9b97723ba013e72c3a2f60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.15_linux-x64_bin.tar.gz", + "checksum": "5f387ed6fc35b0aa0961de3f6b31fc91fce7e0cef863ff6de5b0449b2f6516f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.15_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_macos-aarch64_bin.dmg", + "checksum": "d0e97e147cb1895b97569387f147970580eadf470e7890529805f3e1ed65e34e" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.15_macos-aarch64_bin.tar.gz", + "checksum": "a0465327d516f3550d96b340e1005a6d550224498320aff8d3b686d012efa6f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.15_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_macos-x64_bin.dmg", + "checksum": "3fa0f27f5ab84d9470a990be642b241251ad1d7df9fc516eb912be180c235fd8" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.15_macos-x64_bin.tar.gz", + "checksum": "254c10b665586f0b04c8d0fbd7883c386f16e9db59f268e56e4b7f65885887de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.15_windows-x64_bin.zip", + "checksum": "e4a1d68557d6b60aa3f2704ba5db3cf8e8dc512c5efcd034d780ca8d3eaf8236", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B15/sapmachine-jre-18-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "fbf93422f9525d1122f8e7e3b49aefca2fc71ce52db8c42da5dea103b9e530d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "942b4867cacfb10102d6469f766c6412374cde7bf8b6a549baa9eea61fb5aee4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.14_linux-x64_bin.tar.gz", + "checksum": "91c3493b4f542e9196700de341b33ff035ec5d34827b973fd47b5e26d7773fdc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_macos-aarch64_bin.dmg", + "checksum": "573259c994b567ca625ddd5d93f32b113cf8f6dc4282761d9f3e6a9458afa6dd" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "056ad257e09ac073d9cbe0f2cb47cd868b4592659327f83fc41d1a2b07c1c4be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_macos-x64_bin.dmg", + "checksum": "888b6440abe1c56eacc43622794299ef53998bd103e1d5354aaa7547c85ec23a" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.14_macos-x64_bin.tar.gz", + "checksum": "035bab0f3eaedb6ac7f83a5bd93c7c346caec6e983b065bcaf37c88b73083ca2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.14_windows-x64_bin.zip", + "checksum": "e00d7aff63f31002de31563a9a5b5d873f91ac0e0c03f43b9bdc8ce024bc12ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jdk-18-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "30a00803a0934c2e0641692f25ae0a56395c1ea1262fc4b2b2b459385b438396", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "53c12259d4c69dc0a0c84a8cf1e4685e27e1d8f70f3b7a475ad57d460db3a04c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.14_linux-x64_bin.tar.gz", + "checksum": "25a61a9c98dd6883ab756def87c4ca749adc1a983786f053e853454544130c51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.14_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_macos-aarch64_bin.dmg", + "checksum": "0494b90becd66e5c9fcb0d511a3019b52b07498faca4de944d69bd4f5236e09c" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.14_macos-aarch64_bin.tar.gz", + "checksum": "58936276fc87e1da1a90052ed597e33ca744a2ac5331c1dfe195da0f4c7c46da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.14_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_macos-x64_bin.dmg", + "checksum": "0cc75d4be5a915e4ba35441665d41486e307fb7c483660f95263aafbbc17e03e" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.14_macos-x64_bin.tar.gz", + "checksum": "9341a7a67ddb712730abac848ff340fd3c7910bc87e3cd487f38ef0a611cd81b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.14_windows-x64_bin.zip", + "checksum": "cdd40519ca17ce00637a886c836f16e6b8b0bd5e96cc59b82177170e2cffeff1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B14/sapmachine-jre-18-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.13_linux-aarch64_bin.tar.gz", + "checksum": "6d67cbc19b1495401e0f85f0128804baafd0ff7b331f1ee5c968107f4e01608d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-eabeta.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "80dd8fb8ce6736ae70c2002baa7668fab98db0d2f84412542b2b3ccf44dda072", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.13_linux-x64_bin.tar.gz", + "checksum": "8ce5a79d6b3731437a7640e1cda22967f4983447eff4f6c5dc3b5fe0e46bc88b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_macos-aarch64_bin.dmg", + "checksum": "d4abc9569738c41c071aa6a023f3247e3dc7e3fbd8307d4a53848fa7ff91ab1d" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "589f7cf765522d5e0a05e013cd7f8c2eac7cb93841b771cc3d8f93d19dc4a132", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_macos-x64_bin.dmg", + "checksum": "1020e1a276fa139d80a99235b54c124521e3c3a32dd75b445a7e6c2d11a69047" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.13_macos-x64_bin.tar.gz", + "checksum": "038de3b7a87d4f0793f74199cc8cb50a563af797846862c1eb8ebf9c7f2127aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.13_windows-x64_bin.zip", + "checksum": "e9a51a7d8be41e3252ad070b0e1b8aaa65167659d52a634e9ba7b0d62ae07a21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jdk-18-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.13_linux-aarch64_bin.tar.gz", + "checksum": "5dfb8c399a96bd8e9b9d2eb941d71c89b3143e1548bca2017814b21610eee9b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-eabeta.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "baae40b1dcb0da3f9f6d5f9b966b7e6faa8d8a2eb59c3017dd7d693be3265082", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.13_linux-x64_bin.tar.gz", + "checksum": "1c1d9557c6bb6a25e4691de2a9fa5652922ff489adc61ce117548419bf53da2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.13_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_macos-aarch64_bin.dmg", + "checksum": "9b1ac539bfb6b88a04e151772cf7c7220f883468b7d191a9dfee77b771d76cfb" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.13_macos-aarch64_bin.tar.gz", + "checksum": "2e53e0dfd871bc8f893e09ec93d2fff7dccf7f071f03a92bc50d55398f7b305e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.13_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_macos-x64_bin.dmg", + "checksum": "a568e47aface64478af11ee7966447a05c16cd1bc67e7682e2bacf654903a08c" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.13_macos-x64_bin.tar.gz", + "checksum": "b30a13de3200f804773f25b8c999cf4d98b9023e65c2e54a3d7be156b7e25a68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.13_windows-x64_bin.zip", + "checksum": "c01c16233c2edef47bd14b18438e9275bd15bec56caab450a43d9b02cdf2d7d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B13/sapmachine-jre-18-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "94b4548a47709dab55a869a238bda4c34b326d8c15e6addb16c4ac90f70558c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "f086b376f04b987933f1a163318e5c36ab9ebd84fdfa02bf976b8f9f4b4c1cc4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.12_linux-x64_bin.tar.gz", + "checksum": "9eed3d5234a0ce70838510b65f8f2ff0d1bf15b426f66e814c72a68258f0cc42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_macos-aarch64_bin.dmg", + "checksum": "80320c029027991f193675150c9d401598b56aeb261c29e6adbc67465405aa74" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "857cbb6ba5a1116333248e52f5025b1d40c53b7c5a6792078f458bc22f31bf44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_macos-x64_bin.dmg", + "checksum": "1c3c8b8f06aa82e66bb4640e6796d36c38efc91bb4833e6f14d0e53e7eee81d3" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.12_macos-x64_bin.tar.gz", + "checksum": "5d87497a355a4e5857c26d4bc8bd816a6fe06200c6686b00e5c72bb6c1dda73c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.12_windows-x64_bin.zip", + "checksum": "995ea3bbb167fc18c59af24ac85121da69da3e43c385557b761587bcbf1a66ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jdk-18-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "7605a31b16b9d3c7ec03e2bbfd3f7346e50d5533c735723882128ca9a45f1f19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "703c77a90c715bea6d24c246ca49f28c692d2911fa6d15433241fb01bc33fb20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.12_linux-x64_bin.tar.gz", + "checksum": "ae81ce1ec5fdb66e03e6e3d1f3f1351770a74712518b37cfa3968477cb3407ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_macos-aarch64_bin.dmg", + "checksum": "911764b12e2a2afca69451bc0c7594d0b4d34ad070b5a0fb2869d9bb74ca24bf" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "afd2cddefaa604df9b77a5baf26e4acdb48b38dbc1bc169347f571fd2cb399c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_macos-x64_bin.dmg", + "checksum": "bbbe709b7f18cec2eb12b45d9fd8efe1d8cd8bb48c5668c195fd5fb9756111b0" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.12_macos-x64_bin.tar.gz", + "checksum": "a21ecd6c9b9fe4cc5e966ce8e0344b6bc11cc3ea677096715ff15e5ec186c0f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.12_windows-x64_bin.zip", + "checksum": "48fa4ab4a0337e74cdce7190154aceb740a17a87d6aaac08fe51eedd94b407c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B12/sapmachine-jre-18-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "cf2709165f822533f1beee95e8507c08c73573bbf06d0691443ecc6bb52f8ad3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "72d53c9ecaa6b4ce07c6cba045566d63afac791ee2e7df094444929641526bca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.11_linux-x64_bin.tar.gz", + "checksum": "181950f466934146b33c6d45adc84636f176378f536ea832e9c5d3b11e8e6f55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_macos-aarch64_bin.dmg", + "checksum": "dcea45c77119bffe6590b53c59e401b314b6df142072b939a181d6a20a9e62ac" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "13088e7c66382212fa46119819c651acc7f2ef39c2b45c59d9e026d1bd430448", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_macos-x64_bin.dmg", + "checksum": "201fb52158a70d42fa0657a53ed9c4fa6c5633d75e576080bccaca33797261fc" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.11_macos-x64_bin.tar.gz", + "checksum": "e2bf09c05450ce97c92af415e3847f74092868e83869a477a85b8e9f20895dae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.11_windows-x64_bin.zip", + "checksum": "7592537d1d304a6ad083f8624385383987d6d2675db25cf89c95d95324843c26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jdk-18-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "8a5359c4ab836b2a72991ebc7779b175e4fc1563bd5f9cad531c72f73154c5f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "e31634b7a6fb0492d3c2d7f41481e34c06ec37f94671b103adfc448fc3011299", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.11_linux-x64_bin.tar.gz", + "checksum": "d8a9c870cba5f0cc772d0d868746c183e42ebac93b1171558518b335c6c5dd66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.11_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_macos-aarch64_bin.dmg", + "checksum": "ad204cbdf2289b2d9c836db77d0369a023219ef1dc7cad2338d3e3a4ea5f1775" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.11_macos-aarch64_bin.tar.gz", + "checksum": "4016895fc2bd77f2cc82b9d91a4bca6197e8f777d2681945d3250d243c2f3bae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.11_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_macos-x64_bin.dmg", + "checksum": "e6519712374372939a7b14e7e97d9e0a8b5638650f7b2001e38dd173f6b65073" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.11_macos-x64_bin.tar.gz", + "checksum": "9aad0385fcf7f0da8d6723606a29f48ac4c94e9d557ff54531ab9cfa8e81a553", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.11_windows-x64_bin.zip", + "checksum": "7f01a29cbbc6083417c5eb7c428da4f47be5350ce86cc91680b7424526b37c81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B11/sapmachine-jre-18-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "2bd3d4cd0bc870207f272e2147d8d5696dc73dc3d41ff6e09edb11ede50e2bc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "16c0895a133235aa08780977d9696f7cda7e83d31e08eecc8d9fb032dfd38202", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.10_linux-x64_bin.tar.gz", + "checksum": "8b1e2d6a2a4585f95b4f39ccdecdf0723334e5c6440578fce054bd7a4dbaace1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "11002b091c3effded2d63beb6d892fcb0172e28943583b51fb1ab2606c5cc453", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-ea.10_macos-x64_bin.dmg", + "checksum": "327e41f98ccb6652f64f3b572fcb42228fdd3901e6404ad14a9228d1115e1bef" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.10_macos-x64_bin.tar.gz", + "checksum": "1f8ad7c9ffd07e55ea76622a23e9895cdfd2ed77aa65b7fe9d130e3890c24322", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.10_windows-x64_bin.zip", + "checksum": "350afa27e9b8d05afc496dfa4d8aefc558e5824088089073661df58604c5bfab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jdk-18-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "d8822aba44ac9356625e93290dbf1b144eb48b7e8098600150188db9fe3e84fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "d49fe51994f69f3fbcfe6f6ddd78bf67e69f660ffda7aa7c212feb82cd2e51f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.10_linux-x64_bin.tar.gz", + "checksum": "0c848603d03b641bebeee202460e4d61fb988ce2c008b95a8dd8e2d4028249f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.10_macos-aarch64_bin.tar.gz", + "checksum": "228f3d58e9fc0a9dea70aef0ae56afa98c25b17b63ac6c52bb5636767d85da7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-ea.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-ea.10_macos-x64_bin.dmg", + "checksum": "893995c4c70d1d0b129dc0fc6048e9aab27c96b2a861fec627c0345f87749ec8" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.10_macos-x64_bin.tar.gz", + "checksum": "e59e8c815c2034137401f0bc6568a5e05236021932333dfa2eb0bad0871e8a0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-ea.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.10_windows-x64_bin.zip", + "checksum": "40c07eeb03793d19523e1e15d6f2b03c3014ad9f9a36f4719d7f63f04247478e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B10/sapmachine-jre-18-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "d66df1014f639fa09d830f5fc4933544ccbe8eda67ef259cda873545e8096231", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "ec97b0a6aab87d2cca1077d458b7f2978f3c0db96e4321dca8b88aba3fb8b3e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.9_linux-x64_bin.tar.gz", + "checksum": "351a3ff0c2f7a31741e283b9359f2fd0a5152203b262f042b4be90b14b301483", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "78fe014f4653b5015afacae6b07ba67eaa3370c1301f1c5ca9ee540f5999d637", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-ea.9_macos-x64_bin.dmg", + "checksum": "5351bbca5eb863b6a7b5253590cbbbfc7a4be51bd6432f13bd6ff1dc30e7f3d2" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.9_macos-x64_bin.tar.gz", + "checksum": "ffbd464387e6f3cb50e48f8837bb7d75ba3e61a04e7715a1d02cfb61e50f4f60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.9_windows-x64_bin.zip", + "checksum": "423c55c0ca77ea527db47f0d4e515332a02487bd52de82002845023b34a00232", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jdk-18-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "1ee0c3792a79dcbba341f1d73b38cb6ce1d66cd7e8f9c2e632263ebbbe416b7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "04f786dc81c9ce27c522a6ae7f7db5fbc428ae5273205b3e62a3b57e54bfc42b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.9_linux-x64_bin.tar.gz", + "checksum": "8ebb095b925dcf999d282444e96ee415ae647e7539f074b5ffbfef795e43fa8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "5fed147bc192685c83b4d5a7eac74520d9e2daa57391f4b72806719f348d9e85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-ea.9_macos-x64_bin.dmg", + "checksum": "461360544cb70e85be1dca8e0fb436cd602a944bb770ddef1fc4132686b6c6a7" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.9_macos-x64_bin.tar.gz", + "checksum": "df17fc73eebab06b7c1b9469736e8b3bd04b687b687fa3ccb86dc97b22d9d71f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.9_windows-x64_bin.zip", + "checksum": "af2e60fe0817c98d039293128f9d71faa50df18d57ab26bbf33ee983bafe8c4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B9/sapmachine-jre-18-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "bca57c96e3655575757e864b6e08866c3631aa5960e0c66db8c5bea4c6aa0127", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "11de8415dfc73cdf1ed78f0fea2686fcbfde2d95780d3be2f6e88fc9721f50d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.8_linux-x64_bin.tar.gz", + "checksum": "6d4c7c8d2ddf88cd5fdb86837616843e94ac3ca1f1737505bf8aaedbbf644d51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "8df1a43367283a69e631ba2d9306be55a205e50c69c72e6d54484ae912fafed5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-ea.8_macos-x64_bin.dmg", + "checksum": "6d884c2379dd444f460add04b78cdb03553029b99748cd62b7e2034da32c056a" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.8_macos-x64_bin.tar.gz", + "checksum": "29f6afc89d85c201ddcbf95dc2f9d049331a08e67fa76dfd204ef7313743dac6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.8_windows-x64_bin.zip", + "checksum": "086049ee7bb08af7ad832e3d358055675669bfcf5373e0c6edf26bdfd169c9a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jdk-18-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "828a98faecf7c246298cd0b9a1ee82570a6bdaf26f5dc4a70add2e7627a81c14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "d15da615f422217fb5507d77f56f32d100ae07449515e5eadd7afc61964565cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.8_linux-x64_bin.tar.gz", + "checksum": "d4f966cbece796dfc01775c2b51cd5e1d16c2007da5657d958651cb46ce48403", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "b1d1282a29bf2ef8201d572492a6e39758075e39957ef5c093b5eeb64f02c516", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-ea.8_macos-x64_bin.dmg", + "checksum": "8fc4ab70b97c2a8856de5b149f97a23b67df0f3b1aebe0a4acd428029851b127" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.8_macos-x64_bin.tar.gz", + "checksum": "d98f56718bd9f7518201d9a775f8104a7da4767311c5007c612448fab16451ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.8_windows-x64_bin.zip", + "checksum": "3a73870d55bbcafcdb22d3c3ab6bac830ecf10a28ae96ff6baa15037e73947fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B8/sapmachine-jre-18-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "c9975687e475692fcec2f0a83ec062b85f367a3c0766bc1633308a6ac7cc4ab2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "343403707ea016254a4ce79f94ccb73929fdd989450659b2c4d20cb35c14ffd7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.7_linux-x64_bin.tar.gz", + "checksum": "924c3c8ab37831c7f49efad00f803f2eb04b71e6d4ca9017bedbc15f7fe0b4a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "6b5b7c96921a903e14c60bbd9ba052749c497e0dc355db1248afa98d2fa7e72b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-ea.7_macos-x64_bin.dmg", + "checksum": "b8a56911ecb8c1c0202500297ef26098a1a929e71c1ae969ddd9ab5e63f30d61" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.7_macos-x64_bin.tar.gz", + "checksum": "f6573999e6e0d3698c153496090b875f38aa4d130976ae3182e07ae15d46fad5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.7_windows-x64_bin.zip", + "checksum": "01962b5d7d706cfc723c39cbdfcdffb7fe020e9ebf00f9aba527cc2be1987542", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jdk-18-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "2aea3835260e94945fb64936ab6060894426417abaf7ab271959fb465d0b3f5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "84eeddd01eb226b8f483760151a2718ce3f45ea93745e6cb406c26c1d41c695e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.7_linux-x64_bin.tar.gz", + "checksum": "ecde5595a5ece8bbc1d0c883094dd21bf24ad63d3329274fa1a599e99875c7ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "5183c7a883becabcba584f83705cfbd69b71e23e4b99082fb4234402dff217cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-ea.7_macos-x64_bin.dmg", + "checksum": "18077d9e63537b57cea16756af7fc5c7910043862a3a75d57fdd344fee1c5bd4" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.7_macos-x64_bin.tar.gz", + "checksum": "33fd369070c8c3731622afbefc1eba6ecc7e2859e228743614c73ee68efb90cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.7_windows-x64_bin.zip", + "checksum": "88cda441826c2f911d6c4e943b5f8886aa9ab52f6f62141c134422ee3b976130", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B7/sapmachine-jre-18-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "69b334966eae7bcfefe1f7afc426389c15a659a79afdc86c1ac6f47a6b6fdc2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "da473b79413b64edf8920a3935295202ad38081e919981485f4bd60f6ef7f2b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.6_linux-x64_bin.tar.gz", + "checksum": "09f9ad362840114194238b540634314b49e43fe3fbbc7240c572d6f9cf2ec7d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "db87137c2868a5242e1f06b4b2e51e0ae700ee85395e1c847643a5de2c6bdf48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-ea.6_macos-x64_bin.dmg", + "checksum": "5b6369d459d4154e1b7275948a6603566e3c6f90c95880c81b2f68d3d73422f4" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.6_macos-x64_bin.tar.gz", + "checksum": "dd984bd6927b5f4154103ef037025067aedce4ae400fba8d9240180802b13e47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.6_windows-x64_bin.zip", + "checksum": "22d06c477b678a25a2bced5197a36a6440de41e3cf6f8b4f8369ef5f3ffbcc89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jdk-18-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "664d031cf8fc312db8f1cf7004727187e43adcac4bb5efbb0a18d5cc2ce4f82a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d9589f092ff4d72ed623f2eee795400c52379a09dda3fa2f61f8dde81810c9e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.6_linux-x64_bin.tar.gz", + "checksum": "118252a84c5a3ade03ce38089fa68734196fb9de316c4819a70c91053cf1f346", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "085edb0cdc2a52c14598a83aace9eba4534b2bf9cf5bc20ede552cf8169bd716", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-ea.6_macos-x64_bin.dmg", + "checksum": "f6420288e121841204f0c2bd6018c34b8f2ac8a7c2d70fe0d8eb8fd660e2f2fe" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.6_macos-x64_bin.tar.gz", + "checksum": "db8644a7f2f91437e52905e83e012d15c2429d591406cc233b11be2776fee0e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.6_windows-x64_bin.zip", + "checksum": "9a4c4dc57c270a54fe93ea5ee6a6e39dd211c820d8a4f589b287c107bcbf6044", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B6/sapmachine-jre-18-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "343eff4f803b95c152c3377cef56e31816d68d07f9145ecacf4abe8e20f28816", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "9f122b1ec9f312b3800117518c408696e4c1c9200176fdb2da3af35e471e7a76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.5_linux-x64_bin.tar.gz", + "checksum": "993715dbae0cc695ece188503ad3d4583fc58d7c2ec206e5a5eea7ef5be20341", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "183236ab5e2ce9a46d9af12c85b816673f63bb6ef71619437b440c0a04df6c45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-ea.5_macos-x64_bin.dmg", + "checksum": "26819665172466c8e08bfb7b8aba37ba1fe76dbebb4a4ce54bbeb2d58fd7b6d0" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.5_macos-x64_bin.tar.gz", + "checksum": "eeae3327c8b3e7569b129771890ce56dfd2087802d19220f3198ae63dcd4c84a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.5_windows-x64_bin.zip", + "checksum": "a6c70d505a4e9dc5c8fa60546436dd7ca8a911545b5c3fdca928a25cdaf908ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jdk-18-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "d6ffa0d661042b643a91e5d92ffe18b6b6ea819bdb55198d9b0689d4df167a73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "cac0ea3c64f4161f47b8e22b5a61b48ab0cd3ce44d478423e25321b2374aa054", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.5_linux-x64_bin.tar.gz", + "checksum": "f567befb0999c35242ae750b32e2e7dd7eb219036a3e1ff7efd726bf900b6e86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "602caaf296239385d3b525f6e63737f04271e7c85964b1440de09f728bc22ced", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-ea.5_macos-x64_bin.dmg", + "checksum": "e67a31ba5077d1fc9f7b54b604c6b22bde08a9532236199fe0bb7b81adeca940" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.5_macos-x64_bin.tar.gz", + "checksum": "b60d5cd25eb3db42b56868e2704cb4bcde4be4f6ad8dcbb810ccff3384a14fbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.5_windows-x64_bin.zip", + "checksum": "16d7f149565757b17f6246fe58faf12e317b905552c8ed2fb8384448587ef1ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B5/sapmachine-jre-18-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "cb1b881a75365b2d57b6836278717fcb40ff691645682a1293bfd95aae247a50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "e9c565b552f6084e433c8a8701597c98dea1c1a43e587c8bc63b26d6020c274a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.4_linux-x64_bin.tar.gz", + "checksum": "7ca2a4fb9a6200bf6ee4cf98b2880355f5c876d5d3b17d99f3d7859ebb7f32a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_macos-aarch64_bin.dmg", + "checksum": "94f234ec259ad65de5a3062bda59ee6568abef5b2fba27752f3a33b97b5e4adf" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "1ceaeadc7e488b3f529d9aac50c0a131dc9ef6031121cfd0ace4db42b50b4075", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_macos-x64_bin.dmg", + "checksum": "159d427a5d963b52bfc76660831aa98b5e2dc2c4f64fcefe91d574e50cda052e" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.4_macos-x64_bin.tar.gz", + "checksum": "648bc1f5ddd98e937af7ecbe3bd7b86f3cef362ea5be0c91dc56febe1ebc64b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.4_windows-x64_bin.zip", + "checksum": "98caa03edaaff3ed60c1cfec384e4e223f017c1a99101b4961c837f1c44adcdb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jdk-18-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "2e45e2fda39b10c74bf88b5891f83a878ab8020d1ad51a1808ca19e881f05754", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "cd59d63fc5411921480b93a4a0adcf12620de16c886abc73ce44a85ca48b21a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.4_linux-x64_bin.tar.gz", + "checksum": "86146eb1df7b058fe9d9a9d478e75343ee546d2957e61ce7de58c255724f089a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_macos-aarch64_bin.dmg", + "checksum": "72907780cf547757dfa3ae9f51b11c9d3d527800f00f3e090891003efa010562" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "81b21b5b7f3a3afadc07189ed4300b103aca46ccf65834609a899e441c2540ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_macos-x64_bin.dmg", + "checksum": "b8a1668c6b3c37799e1be1c4c081760a4b2ca7d9d82be9752c7dd6008dd94b47" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.4_macos-x64_bin.tar.gz", + "checksum": "611c633d9b34b9e4a3bb343d559d3a70ce368f51f7b0b34c0b41d186ca587bbc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.4_windows-x64_bin.zip", + "checksum": "b93d52dad99ab8bef9e879a706ee1d236a26afa3379129cf1b3678546c30a6f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B4/sapmachine-jre-18-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "181c5762fa2005c79e3508373581611c84968146fdbd305f8e932d12c404c39a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "f3f7480f2c9763a38498be81eb02ed4309da29492c53d5e4a4cd859ae0f93ca4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.3_linux-x64_bin.tar.gz", + "checksum": "eac1dc7efc3b6014e0fdcbf06ebf6adc1ec59b82140a57f52a0b91ff20473649", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_macos-aarch64_bin.dmg", + "checksum": "4b7539512e99fafe78d9556f007e59b9b1843dfa5d090b26c1b8075eb380f0d4" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "bde2af8e6d3b2804a7889733f0a68750c80467ca87415c7aa61f1b9fa0f003f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_macos-x64_bin.dmg", + "checksum": "e49bc4c8d9bcb8e0d65ec25043cf9d88b5fed92356c833c1e36a6363b80d4322" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.3_macos-x64_bin.tar.gz", + "checksum": "3eaeec612b69e58e43e0fea20cd4b04db1bd49c932cbc7134b9539c5cfd354ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.3_windows-x64_bin.zip", + "checksum": "ab91319df30ebbb999f74fc177d0c9e9fd53562b10f294d4a35a7d65c3d6ad3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jdk-18-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "db94e371d8b8dd415bb9ec5de7c7bc8df4723d643e53f23585d7ed2867ec2b56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "d37b69cac3c389c1535fcb0e39c5fa74ea8d77220728be04da42bd5e8640b33c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.3_linux-x64_bin.tar.gz", + "checksum": "f446dc375b918c43041756252eb09e1acc927008c365263097b7d98c021d699c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_macos-aarch64_bin.dmg", + "checksum": "dd5bab9122bef6cd90f19067f4edef2e778c0cca235c859b8207374659ffcfcf" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "da578386bc1191f803edc21b87ec35cae7e69663e62d27c4a8ff4dbdd32f9a11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_macos-x64_bin.dmg", + "checksum": "dbf1943d1f694852f6024f9a2e2adfc84a269ef66c3e2757306ce5d6d09afe87" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.3_macos-x64_bin.tar.gz", + "checksum": "1c9edd956bbd466976fa8b59cd640d659a60ad388f1601ddc9af122c35753e35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.3_windows-x64_bin.zip", + "checksum": "a9eedf2078eb8563d1278229d7bdf03a8822662c2865b399ff7331ace905be7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B3/sapmachine-jre-18-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "b08d749886cb235ec4a567152ea7a2774e6dce2ea3d40cec707b6b231ddf2704", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "3aa95eac84e11ce6c7e2d982fba5c2feb9ebea4981e6fd62ee90fe369b1bbe7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.2_linux-x64_bin.tar.gz", + "checksum": "9da6c10fb2373ed5ef223ebd6db8d24b34dfd7510752bb0cd73112ec89e58ec1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_macos-aarch64_bin.dmg", + "checksum": "e2e35ce2ee0e2e162c4bd82cde78c47839d6b4150c2c9459e022506408d492db" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "a1d04a8361bf0d67856dfe38209faaf689ff63a232e9766adb2f7a2df7dbf549", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_macos-x64_bin.dmg", + "checksum": "847e4799f2513a441fd6192974b014f221ae77ea8241628f68ed95a55c8ceac4" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.2_macos-x64_bin.tar.gz", + "checksum": "adbe795f203dd1642f3aba76134c1fe852596fc67e029b4619f232e2e507f3d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.2_windows-x64_bin.zip", + "checksum": "062de09a399b4bd6fbc6cb60200473e6712bb99f7c703cb455cac92ecfbc54d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jdk-18-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "28e337e4f863ebb713824fa88eb102446e03a1a1a8694e7a39d74dd8263ed827", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "690500b6c1b4d9e70c77c9c06c7e7d22b076209256a6c76591307ebd7a3ca2b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.2_linux-x64_bin.tar.gz", + "checksum": "ae116e025e739da8ec8dd515c879fd87604d8f0cc30ae880c021a9e7a7333bd7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_macos-aarch64_bin.dmg", + "checksum": "63c3658ef2e93918edb4ea944d06d1300804edbcd632b3db8518a1c3e4f06c95" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "7785daaf07b2c07c698a03d8d8ad133f568cd18b90782faa3ab79c2abf04ada1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_macos-x64_bin.dmg", + "checksum": "12c3102ecb2d0778abf9353a434088405090167d26701bae7e21d13d52dc1253" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.2_macos-x64_bin.tar.gz", + "checksum": "de4839b857cf6d781c053cf1f33940d9f25ec4d0c4916896ece4de53bcf88491", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.2_windows-x64_bin.zip", + "checksum": "4ab350224ea56403522e16044a818e7c471b1bd18c7c74b0be8b3c3ebf48464b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B2/sapmachine-jre-18-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-18+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-18%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-18-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "b075f1b5d9759a80042fd31763fdc918aaedf4a6105393e079bfa7c8c9ad73f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "91153dad8f3e46560d253b612155d2d11a9ad46a25838253ff42aaf1b29c1710", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-18-ea.1_linux-x64_bin.tar.gz", + "checksum": "866228a3ab5a913e1b5c1ed2ce7c4afb7c05150ab2c8285d618b97d4ceb5eac1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_macos-aarch64_bin.dmg", + "checksum": "6947ae8f5a9158efbffa642ef93a07b40f2f9654faafb9963bc3ced37b0a42b3" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "80f25989ddc85172047e2b4d829ce9faca32e2b30f15635972cfd56ec2a603cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-18-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_macos-x64_bin.dmg", + "checksum": "c25f2406b333366f568632555627fdc033d3c5a6e6ced2e109369913a8004957" + }, + "tar.gz": { + "name": "sapmachine-jdk-18-ea.1_macos-x64_bin.tar.gz", + "checksum": "1a67105bec5b16b08572fa9c8cd0837a32fd86e31c7c2845d70c91414e2d7e51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-18-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-18-ea.1_windows-x64_bin.zip", + "checksum": "b2a9b7b86d033027dd8541339aa02a5c6027f7e5ca891a73b7892a89a1d9b045", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jdk-18-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-18-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "f07bf8fc442a4ccc45ad59271c61c61ca129babb0b4e48407e813f6e3528cd5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "d6c2d3875ac30a5a21fe1606cb72edbddc13b6370478ab64d8c36de043211d34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-18-ea.1_linux-x64_bin.tar.gz", + "checksum": "4952f344ede424b62d9938640219aacac58ee6399ed22b16a2e41c47632a19ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-18-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_macos-aarch64_bin.dmg", + "checksum": "2d1ccff7f4b3d215c3cf2caad3d8ce1af77dee33abb685b3ec1f5768c993fff9" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "bf6debce89721673af3c6c21f670f1b79311ce5d74fd11dd2fafdc9b64c6177d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-18-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_macos-x64_bin.dmg", + "checksum": "85be693abea57a2d8d42be133601ad4bbe1c85a5bb26722dca6bff895c859fe4" + }, + "tar.gz": { + "name": "sapmachine-jre-18-ea.1_macos-x64_bin.tar.gz", + "checksum": "cbe141c691456f946c8fa488d074b8f3b4d124d939c289eabd313c4631bb1d70", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-18-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-18-ea.1_windows-x64_bin.zip", + "checksum": "0babb99f8f4f428832a4d1dc5ca6351ae6508c6dfee038f36c3cb6cc0a460fbc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-18%2B1/sapmachine-jre-18-ea.1_windows-x64_bin.zip" + } + } + } + } + } + } + }, + "lts": "false" + }, + "17": { + "updates": { + "17.0.11": { + "sapmachine-17.0.11+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.11%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "0c59defd20e17df72dc51d42905caa648a56bf4e6b61b3b4a4c72fef61ba0cb5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "1e6f118092edb60bec6065a23b54b136f94d6bfac50353a5f0ef364b4fa720f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.7_linux-x64_bin.tar.gz", + "checksum": "af735b5e68f526e37bb38a4ea6055b3f23fd406fc3e64cd74c0e54e24c313e79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "ec24eaa6bfcf12062e0ddaf41d2bb7bc14c1e9a228e1d33bd5b5d5a63646ecdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_macos-aarch64_bin.dmg", + "checksum": "8938c2b9ad42722832f06732be7f59abab26a33f631820ab804049980925ffa9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "7d407179207d7b4fdfc189f6798045170dafcaf2570587a588e698d04d19296d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_macos-x64_bin.dmg", + "checksum": "51388b5b821e57ae201df9afd334211c9a010c6ae5b9ad71c91993c32f0b9baf" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.7_macos-x64_bin.tar.gz", + "checksum": "5c1e66bb7ff4aa2e0a5cbefac8d0e0d06505e4fd180d56800fd22636ddf219f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.11-ea.7_windows-x64_bin.zip", + "checksum": "086ed5d0378c115d63cfd31cbab1fe49038e6deba639012df0463eeb8ce0009d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jdk-17.0.11-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "66055d6aa7b89fdfc936a7c2c334cb220b32641f70410bda0000dba008bee410", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "2a9b6f3e5afaf4ccfbb1d11a59cdaa838f6fef29d50a86ce50c8a26775d9293a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.7_linux-x64_bin.tar.gz", + "checksum": "a2cd11a26f8144d3529a16b8ce43a12db3e3992cb47b2057456ef847ac86a27d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "292c6dc6cfe3f6502967308d20b55f894dae6a5826a7a6130c7bf9059f08bd6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_macos-aarch64_bin.dmg", + "checksum": "23dda4a224308b41fc959df3cc611ea12b097a7d120444de6fe2b9f8d3b9efd4" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "2428357df157e5c4fb74a4b32aaf5039e0b222bcd23ec1faba07ebd76e65eb78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_macos-x64_bin.dmg", + "checksum": "2682238a44963bfca21ff3901923ba7a5dcece1547adcfcfd3c14dbc1513c8d5" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.7_macos-x64_bin.tar.gz", + "checksum": "3529eb4a43baf0fdf6b2e32c33258e906286337800bcf999f83185ff2226a684", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.11-ea.7_windows-x64_bin.zip", + "checksum": "14fed07a2df0737aa6c29d56b41c17fd6f427576c7250eb2603b1ad6dc5b3ff5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B7/sapmachine-jre-17.0.11-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.11+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.11%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "1f1026614c51a54fdb986611be0fe8b15c72d5694d2b6b04b0bd9abdc8e5b51a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "f9d24676a8ba9fb4812231a1522a8bf4ed37b974304874390a50548c67324b39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.6_linux-x64_bin.tar.gz", + "checksum": "47a0f170e7a73eb3b8c92643b94ee4c93f61ed57e2e8c7c915485820f65a4d66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "4b27cb13efe1465a1f22e46311f8a5dfcb1a4a8d3890f080751f517dd4785879", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_macos-aarch64_bin.dmg", + "checksum": "513519eb12958e763df021b7af28699a6076749ba748aaa600eb2a26ad05769d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "1d32113ae39c184c8480d64f90c2341b9ab805c78d8a391edebdb34ef41ff02f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_macos-x64_bin.dmg", + "checksum": "c21de53b81068b478dcf8489de99269cf5c13dbc11ed8d0f6d08289e32c7250d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.6_macos-x64_bin.tar.gz", + "checksum": "d167da1ce391741655b74a956f0e9d777758432435d14a2a881dbda4d8cb1888", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.11-ea.6_windows-x64_bin.zip", + "checksum": "c22f5dba492ca989832123d5431bc6f95ddfc15394a1086eddd391e0bb336dca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jdk-17.0.11-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "f1328f4f20a6d80497b6fbac2369c2373c2e7b08d4550d7261ee621926fa5291", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "110f0fb5c25e866b4a7bd23a47efd36043092ee2b675e21df12b9b1f4cab3267", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.6_linux-x64_bin.tar.gz", + "checksum": "8c27aae7f58b143d823b40a94c946f4744f8a05940d6854f4cf351709cffd577", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "3da04ba1318b17c7882b9ead671eed0aff586614a7fea07dbee42780058b6a2b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_macos-aarch64_bin.dmg", + "checksum": "5858dec191d707d3f2cd050b75b0b165c0a6291f7e0d4c93f1ae0ac5f8cdc5d7" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "426579184edc5841eeaa919a7c62b1b3811de92e7fffd3a52cae2e3273bf8b45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_macos-x64_bin.dmg", + "checksum": "6822bb7971a9c7ffa92bcd05701fc8cd5d4ef7509d8d28b34f81c7bb0c9b4f19" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.6_macos-x64_bin.tar.gz", + "checksum": "49407448f7d68b82d0df384bdb6f040e905ae14eb855687deee93ff20676c88d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.11-ea.6_windows-x64_bin.zip", + "checksum": "e4b940c16825d18c6e2aa9323861f543bd5dbb8b8201f5e9417357b764388283", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B6/sapmachine-jre-17.0.11-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.11+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.11%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "34743b78172b1aa0210d0a1a9ee51c96b5f2737cd8f0af0006c87fcef3ba27c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "aa4ca07e3237db0072071902c580384bfaa405f988f56a28da9335664ae7d29b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.5_linux-x64_bin.tar.gz", + "checksum": "9cc67ac8b8c9b4fcf86d8d3dbe97c24ed12a8cffd18c2eff824d268fd44c2ee0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "bef3746f56333465d9fbc84c4cc8157c78f36f5535a79e844803db3dd32c0f98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_macos-aarch64_bin.dmg", + "checksum": "28fbe766535e30b53a486d31928d7a1cb32c5073fada61a5a677ba76f32e988a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "4b21196155c305ab4e3bebb819d53a7d07c74a1eeb0110d59ca89c218dedde16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_macos-x64_bin.dmg", + "checksum": "7f4fe272dac20c074698e8bc6ed9382344350c2bd22b4fffbc17661394ef5f80" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.5_macos-x64_bin.tar.gz", + "checksum": "a2555dc19f83edf692e1bb6d709b731871ae9c5ddf8a05e136393c68f097f107", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.11-ea.5_windows-x64_bin.zip", + "checksum": "b789377efea2d709b9ea2d4c63d199dc054f562fd73ed92faa411e85b06c9459", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jdk-17.0.11-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "eb12b10027848f65a17bf7fd8abe0d7f705cae16a9936498b3c6490e051c5614", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0cc5cd80feacef61fe81a2d07eed4158b0d2377885253fc1a93d6e7e7443bb84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.5_linux-x64_bin.tar.gz", + "checksum": "f8084ea88253c409282e4403cedcd8c9239a377e5570a6e540cb27fabaae3d75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "cd8807e17440e77f06e26b0ed63d5fc414a724e97e1a6b9e70c39e3a9e0e6df4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_macos-aarch64_bin.dmg", + "checksum": "c9e066479027f08c95ef9593a8ddc365f2200f7354234e170e5a9d462b24cfd1" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "c6949d924d0d9d51aea793b27ef9734200886ff01dfebaec360e1dc2acfb5842", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_macos-x64_bin.dmg", + "checksum": "51d8754a64fb473184d0e8bad6a84cb2bfed78e03e155c5e8d9b3b054fd55002" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.5_macos-x64_bin.tar.gz", + "checksum": "fee179f87f46aed9f838975b31d30b7a90661341e45128d565b1745c71a05658", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.11-ea.5_windows-x64_bin.zip", + "checksum": "2020ed290110dc2652b29c582344a9b9a2e160459f01d2a8b66d99a1e91d0e2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B5/sapmachine-jre-17.0.11-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.11+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.11%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "a196a4b048a0622f0a4b2949ecf5cee781f8a27ac4707e215d82783915b09ee3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "4409a913a8383f03c3fb4f63dc6381f4ba2aa1bae21d6b090b5c3760310ec2a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.4_linux-x64_bin.tar.gz", + "checksum": "a847360d3041639a9845b6252f50fcf4d4ddf3463830c5564b6042b155160fa4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "9c33225d4954dc53836c973bc782dae6731bc2407965227bb28c4bdacb27be1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_macos-aarch64_bin.dmg", + "checksum": "6723477357b3884ace0c0abcdd19f83f3a8a25646f5c7672fee3bd36c9df2d67" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "fa306f2a284292b72e3d48ae41620303d6b9dc80ad2feec11f0f094644b9f27b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_macos-x64_bin.dmg", + "checksum": "9acb004322a18512d24448def59d01ed8a3cf7b728a59a75ed7c7276ba39ace3" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.4_macos-x64_bin.tar.gz", + "checksum": "ca055033d096f59211cc8bda15b410d9225063df282d85b6e66a9e15e7bdf65e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.11-ea.4_windows-x64_bin.zip", + "checksum": "0149439e4fd17fe30bb0ffe98d73bf7b0e1da7bd8150280e5f5b80b3676850b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jdk-17.0.11-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "53367785538bdd000f7ac1c3a60edb9e92e5206c82e1bf0b6795bc8b44074bb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "44ad080a45a24f930f070fbc89079c488a82169b9cd5f8068c16dd23d8f6b21f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.4_linux-x64_bin.tar.gz", + "checksum": "605954a486e92e45747a2108e96d8b24ba55d3cc58e21f68819ade1ca671eede", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "28bd44086e0a5631512816fb59a157d51dfbe4de6570ffda243b375a0aecff2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_macos-aarch64_bin.dmg", + "checksum": "b8e2df53ab6b4a354af18e5f2851adbf246769cded03c1f90f95905433bc1dcd" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "b9a2b00f1ed49e8e41b7994fd71a8f88f145d4661562a0dfe39c998f438bbc5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_macos-x64_bin.dmg", + "checksum": "440dd259cc2136de4c27879fba384cbced05e24c23d7fefb3925c6b53881b54a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.4_macos-x64_bin.tar.gz", + "checksum": "b1c232fca76a90cff5c046f2740aa63c9edb445b1e2dc6acee2cd77254f1d50e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.11-ea.4_windows-x64_bin.zip", + "checksum": "87ce4802ce95551ea34ddb143ede0ff373a42d51ab3d6334c0829e832886c385", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B4/sapmachine-jre-17.0.11-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.11+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.11%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "b6ffd19f487facdad169020cca52e23726edc69c030744dac2c9e1157fbbf595", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "cd74edb613e863e6f10b3cb9e436b82b9fcd5a35a15031c51be5764f62787df9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.3_linux-x64_bin.tar.gz", + "checksum": "030075fe17573fde31d3c3ba905263aaf587e9981bb35fb48a2b912921717aac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.3_linux-x64-musl_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "3fd878e48f76e40fdcfdb6cfe11a07207d34f0c282875a120d67000de82674e6" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_macos-aarch64_bin.dmg", + "checksum": "dd1a5cfda885275e9ceb8e17b311557c8188f60593ba20d9dec875e8b83a61b6" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "3e6b6e18b15b282ca021c8d2ebade1a5b2321cc6dd52ef5236fcfa18da26a341", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_macos-x64_bin.dmg", + "checksum": "08bdafb0073cea7664ea14fef95fe17a9b8fd3157be6baec25753f8f2adefa5c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.3_macos-x64_bin.tar.gz", + "checksum": "79ebf5a22d82106911e5995e8b02b933e499db9b56604e00082f47a049c5133a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.11-ea.3_windows-x64_bin.zip", + "checksum": "e5b7728f3f7b37444dd7ea748911c65bdd4ef67fc195e1f0bd70cd80d0a00562", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jdk-17.0.11-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "82cda5279352ac63e6f427435df056f143ff9ef5b30da0dc6e6889b0e3edab41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "822b3caab014071d664d6a2196531d44bba55db01b5ff144cde8169528e0514c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.3_linux-x64_bin.tar.gz", + "checksum": "914ff851e9832c442667592d1c3fe608e98a4ea4c1a8636033bc6e3ca209a137", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.3_linux-x64-musl_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "8876850ce011201b538c286fdd3bf6fbd35554deb1009c03e78e8ec43662b9cb" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_macos-aarch64_bin.dmg", + "checksum": "4ab828b0b61a5149b60a96fe7ebd07fad1af48c86fb45da2fea3927faef99447" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "de4c2270a96aed587d84373ef8947868c97edcca8c5518b811ce4974ee2cdb1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_macos-x64_bin.dmg", + "checksum": "186bd04bf3187476acdf808a6b7f7c0563fa32e6223b3d604be66b402fc8813d" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.3_macos-x64_bin.tar.gz", + "checksum": "ee544933e30fd8e9637582865faacde77be9654de7c6646ddcc9679ddc230d0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.11-ea.3_windows-x64_bin.zip", + "checksum": "8a8ff7e9bb71d6027a2c2a3a6c55a2fb93ece3fad149b556aae8809a5cab8897", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B3/sapmachine-jre-17.0.11-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.11+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.11%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "19696b7d1698ebf18b1a3d36cd27eb46b3942f4da04cc6230c79eee12eea95f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "5ca7d3796ea3e0e7728996c6069f67c367d607fe72fe034b9969ef56eea24466", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.2_linux-x64_bin.tar.gz", + "checksum": "a151aa43fcc4c2faa4b19f761cef71a895385030378ab4cc1256f8048a164a5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "16ed2ba619b5cff2703d974f9cc94d42605909e8c7edbdff3efd4dc77e3e80c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_macos-aarch64_bin.dmg", + "checksum": "661b23a77ada5bef60b23fc01dc58cf3d0666feb7ad02cb4414175f8de8e8688" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "307c0037ea34c33596bb806f94f7cdc90f76c4f6a03b35ad16890f8c787bb8a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_macos-x64_bin.dmg", + "checksum": "87d043e7338ad0f2c94cf962a0a3fa6f7d04dd569003b2919e606bae0967528d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.2_macos-x64_bin.tar.gz", + "checksum": "0ab9a8f5c6815fcb55358c9031d14d7e1ab9d08dafdd0cb9294914f41d06fb7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.11-ea.2_windows-x64_bin.zip", + "checksum": "00fc13183632694410ebe29e507a6030987676170c8b4b71739457c28af9cdcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jdk-17.0.11-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "98462ba621fa16ebbd396fb7ba4dd1e291dc89c456f1e87a2ea53e5e9a2d1329", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "acea8168b51972b0b0129e59012f85b6279c409f5e49fa9d57a8b894856f5c7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.2_linux-x64_bin.tar.gz", + "checksum": "de3d0e555b165ae19812a6e87e2e10a6764dccb81b8b88b717889961805fbf9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "4bd10c3d6519507d4ae075893ef2bf772f9d901a09594f9a80cd2632276febdd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_macos-aarch64_bin.dmg", + "checksum": "5fa723ffdf256b04254d8cb3ed87b0f26555c27d8b6aa2947f6af995bac84cd3" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "715448fd7375775aa6fc82287cfa326db3815455cb5f754b7e2a04aba2c4fe8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_macos-x64_bin.dmg", + "checksum": "9717960e93d255405ef1272f34a96611db113d2ff29731a7c8737bfa45b38ac3" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.2_macos-x64_bin.tar.gz", + "checksum": "7de3e9c41f61bdf898c53e8a9d22c536c41999b56fca5adabb17be9dfde1c32d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.11-ea.2_windows-x64_bin.zip", + "checksum": "2fa321e8cf4e708f1788e7f8b12c63df0edef6dd76d08bba1a518f84d4618c43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B2/sapmachine-jre-17.0.11-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.11+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.11%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "9ce85de3d334f2aeb900d1465963ede9924f378dc4e94ba5756e9641f1edb9d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "a42072f4b6d3d00eefd056eff63c01f5b88d54f182ead175b3e84d11887e0b5b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.1_linux-x64_bin.tar.gz", + "checksum": "a644598562d1c02847552f7f74428d94f28a2007df56ffe838bbdfbb536b365b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "351c45a2e08d39fa37c255866e090fb869745d344a19dc66b6fbb27fe738cd02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_macos-aarch64_bin.dmg", + "checksum": "f8e9ef5ebb287894d57173f37c41d6e54ad329abf9bc0593449cce7d80d88a16" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "07ca3cf87a29ac29d8f71d964b60014df2b810da62b1cc583bac479d0e4a25e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.11-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_macos-x64_bin.dmg", + "checksum": "3026e1ce54ecff4732ada7a30df791bfe726b3862bc6e485012b0e61f39dca6c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.11-ea.1_macos-x64_bin.tar.gz", + "checksum": "532deacc806f04acd15e70dac788e22dfc79eb0953cb3afe25c888a4b68a4914", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.11-ea.1_windows-x64_bin.zip", + "checksum": "26e29376890fd3afc7a0fd0fe8a304a655d0eee7059596b474ff3b86bbb3dc47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jdk-17.0.11-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "f5b8cad113a553113eecf31b7d2b44142b617ee4b1e6cc2dcbc240bfbe2349c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "f7cb47cf2d1d074086012dc5bb9b40e576f38d45193f17607d45f65bf9e55c87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.1_linux-x64_bin.tar.gz", + "checksum": "0dff10de9e68abe6857fd930e2731675c2fcb7b6c74a6fa7a10cea35c0c46066", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "18761c788af2175cec87b1cc064e289ea9b35bc61270ce4a174e6e4bfa47a8cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_macos-aarch64_bin.dmg", + "checksum": "a6b36482339c0d59bd23f304d9d681526aa9294121eb71c5044bcf3253010f6f" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "887196776bf090c9c459b73a01573e42720d12352e3bdb9bc1eddfa358cef040", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.11-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_macos-x64_bin.dmg", + "checksum": "a00c9ab6b512c7dd2eaa3a85856db3cf896627d2834f7490e68c152040b92db1" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.11-ea.1_macos-x64_bin.tar.gz", + "checksum": "740ddd343861f44d3f8a767abc39d00093b07717a18c477dbda2ace49dd8cc1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.11-ea.1_windows-x64_bin.zip", + "checksum": "19371485b0445e28d1f41c0b056bc6a988aa9c96947860ffc381eb1433544bb3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.11%2B1/sapmachine-jre-17.0.11-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.10": { + "sapmachine-17.0.10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.10", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10_linux-aarch64_bin.tar.gz", + "checksum": "595dfc28d7219b1485a140ff0bf6244e71d0c87309cdd1d46e207b97817b2657", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10_linux-ppc64le_bin.tar.gz", + "checksum": "e3e46215463d1733aea550e8513d096328d204d8af456fe3d0e67d44a39817b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz", + "checksum": "959b15787880abc09949207cf66d53ed0590dfe176174cc6690f90de27c49e58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10_linux-x64-musl_bin.tar.gz", + "checksum": "8f3b59e05779629db4fc513736220ec57c2e19ec6376f77d28ef87567794823f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_macos-aarch64_bin.dmg", + "checksum": "8849d4cdd83447050dc48ffc32374a1611fa3d2b345ff4f5f0bf57b18a7e0897" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10_macos-aarch64_bin.tar.gz", + "checksum": "5f52866432a5b4df193b332cce51195e5f3b1bdd5507338c10c125d8a3e2bbdc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_macos-x64_bin.dmg", + "checksum": "d28da6a312a09f72a0aab45cbecd479c1c00ab8da35dfbc1baa1849acd8bbb68" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10_macos-x64_bin.tar.gz", + "checksum": "e46767f542377315bd7986454cbc227711ae89c0e273ec51c6dd65177062a914", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.10_windows-x64_bin.zip", + "checksum": "514a84103475a5b40b8bf5953ce1a9cb2e93899898a08ff4b2aa952a807cab3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jdk-17.0.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_windows-x64_bin.msi", + "checksum": "c363035e8bd0d031cd1cadb4d5094c88bcaa5956d021ff89d7389baca0208ebb" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10_linux-aarch64_bin.tar.gz", + "checksum": "06c013c6184f77f26a3b5d935d2b9fbb8345370ce92cf761b217a1a46619d873", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10_linux-ppc64le_bin.tar.gz", + "checksum": "63ea2425b7647b00c5c3649b4f1d4f41b98441af08b74bb1ae1abe15851feab0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10_linux-x64_bin.tar.gz", + "checksum": "96abda2018e4b537d21de67ffb7a192eea7b7b6a0e54e0982aaaf5e53edfb7eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10_linux-x64-musl_bin.tar.gz", + "checksum": "885ff6ff1517d4d0048f92b138b880dfa47af340be79b578757fba94509e6e22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.10_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_macos-aarch64_bin.dmg", + "checksum": "23d50cb52368eddcdd38553460e11e60e6e885d88a3842a2ed484634136bb073" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10_macos-aarch64_bin.tar.gz", + "checksum": "fc7a970aaa2efce2c9a9533a82bc5686700a0bcaa246f1199be6f2300c2304a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.10_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_macos-x64_bin.dmg", + "checksum": "f615f5dcefc43b517b2c5bcd2041ed94c5fdb7f13b57a43040933f8b391b94a1" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10_macos-x64_bin.tar.gz", + "checksum": "0b6ac5556963a388528cfc81bca33141817a4dccb595cde7d10e45a139f13a27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.10_windows-x64_bin.zip", + "checksum": "380cb3357ecfb933e0dd997f5edd9725fc1275dff176e6769ab9c8aa3bbb7388", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jre-17.0.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_windows-x64_bin.msi", + "checksum": "234fe259e500cc5dec31a8deacefbefdbe7b43c0be1c6b60e2a4b848b9382ca6" + } + } + } + } + }, + "sapmachine-17.0.10+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.10%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "924825326c0a904b70b768e9fa9438a983d43f1ee9fe253af95c8c1dca522cda", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "7204cfe02d2c403e3c768fd5794317874b27cd34d683e14f5d2fc5584a3efbd6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.6_linux-x64_bin.tar.gz", + "checksum": "96925873d0a5711e3ecb403957ee3f5ac11c9924b3cad6055066156479ea7bbc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "b4f966506f84dd72a74825866ad57d0c42e091fb4d5931877245eb2594704edd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_macos-aarch64_bin.dmg", + "checksum": "f56b3a15fbd71aad3a5f6b4cb3c3479137cf5cad01b0fb3409f13b6a26a830a4" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "2ad379b8051eae5b35fd3bbc7e70b41f7bfaed19100398e9422b5d4ea6acac29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_macos-x64_bin.dmg", + "checksum": "e73f8410f1968635fc5bd79c914d28f3155a69e236ab1371d22195e01b72b424" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.6_macos-x64_bin.tar.gz", + "checksum": "b3a3908819526105c4765b63939e02157e64f86f555ef532a75f1e8523708761", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.10-ea.6_windows-x64_bin.zip", + "checksum": "5c774415c546a6668fa25ba6e11df8145ab82fb0c7f7e6d6de5408ab35da1a37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jdk-17.0.10-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "49564e06a0fdd7c2af81cf813eee6163cb88afed2466796459e96058880e746c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "1c5fe7693b325be70b6b8384839b236bbb15cc6c863cf49ddd3ba1655c949f0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.6_linux-x64_bin.tar.gz", + "checksum": "e93068d8b88960fdb34c1bf2686b14c60c820b45c0ea9d063ba4e7ea221b831a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "6688c73e1fec024ecbdc7390e8f84f7e1d0bca8c263b5e3ed24955ae95a197c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_macos-aarch64_bin.dmg", + "checksum": "a3c91cc4f9a7b9d47b8af80fa616cb6825cb2203320127f39aef9ca73a32a598" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "622bafac19f137690172a8c041af992e930ce4307bb50776010944c13cc6fd00", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_macos-x64_bin.dmg", + "checksum": "2d3ff5873df71d257751c41604bfde6bd4b3a28777db5d580d935b3d729d34cd" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.6_macos-x64_bin.tar.gz", + "checksum": "3ae56e6eef2d6e3703bda130bb931f28dc6c32520b9f65e08d070c23f5245602", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.10-ea.6_windows-x64_bin.zip", + "checksum": "86a2d84333811c6a816e647ca4b8552a4357174b4ae0e6a5201d43c43bab6e89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B6/sapmachine-jre-17.0.10-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.10+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.10%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "686e66d1e24244d9f155def93ecde732e18fb846d1b9f6300c208200fa150e55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "3cfd82d79f266447682fe7f3d5c1ee09ab21d33f02bb185c84e96bb73ee461b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.5_linux-x64_bin.tar.gz", + "checksum": "062c22ada854b46c48e5384c67241967995f0c54f1098acf9d8586c4fb12844b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "5f36b1e40587330ff2109257e0046af55a8b351e1683e4e77ef9dfa5df380908", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_macos-aarch64_bin.dmg", + "checksum": "723d619451f9a6c24ab8db1bc3b639d4a4d07fbe0fe9027871bfa5c11407ad4c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "5d42dd22cd955a34965019d9c46ffc937aeada0d79e41a7c732a6951a9fe378b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_macos-x64_bin.dmg", + "checksum": "af2d405ce02a767134cb0222c338d6a3e77ac173efa3a374032ad3760aa90c17" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.5_macos-x64_bin.tar.gz", + "checksum": "c961fb1a3116c151dd74d95f3fe04f933ef0b6c0bcf7e6df63e313e85baeafc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.10-ea.5_windows-x64_bin.zip", + "checksum": "dac9057562a55022c895dc36cfc095b84e6e92a8711089b6dec2685eed1cf4a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jdk-17.0.10-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "a8a296fb153a722194412e6698b9f8f7cf2c530fde1e5914e6207535bce8d22e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "f93f2bf3d0700a8d035e1f130fce982d2f8d5a5cd3c97b2e99febaabc11cbd4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.5_linux-x64_bin.tar.gz", + "checksum": "fb6a81a9fbcf996d973991d691cf040fd2cf8048ac43ceec4f5676a9c34742f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "29962d07092266aaded3774266bc36b635502a6c73f05bd2fca3099f69a8cbc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_macos-aarch64_bin.dmg", + "checksum": "1aa8c9dbf6a397607b3ead385bbd90a8e69102662da2c84492afd5ff26e33ab9" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "1ce65da735286bba71f0619c7275ef970d777086cc2e83b05eb33573f9514f99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_macos-x64_bin.dmg", + "checksum": "f097a60da01c152e300363de8117751035e942c65f3647b7469260eb860f3328" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.5_macos-x64_bin.tar.gz", + "checksum": "19cd5f56297b4dc82f3f9d762e3a607ea7c217e2867ff2c7e45939b181bccda5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.10-ea.5_windows-x64_bin.zip", + "checksum": "cf7c047b10e246628b3fa8f94777a7203fe88cf516bb0f87c09f779ed2e4b5d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B5/sapmachine-jre-17.0.10-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.10+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.10%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "c89d5382aa0ad6310a7b217cf7bc4b389930d5dd8e93ca3aead18ca50c70732b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "25c387184c237668fc91e49ffdcf6533994416fd76c3c73913152e808dd45f83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.4_linux-x64_bin.tar.gz", + "checksum": "ac6b324f696e8aef43149dd2a03ef68413aaf389aecae0a993960daa9dd2b8f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "b035a156544ef6ac2e816676ee0efa8af1553ad67aae5e08d4792377f057fca6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_macos-aarch64_bin.dmg", + "checksum": "031c4f009b4d0cd2d67711a69e7e9bd2965fdc06e3535e462bd9e31b372900eb" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "b70fa9701cf480bbe60535eb419a878d767c32a113939ec22f32d2a5e4a5c76e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_macos-x64_bin.dmg", + "checksum": "b35d1a812fb92c85313591f92b38b62cfeb0321e8860b2d033ce0348686ec436" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.4_macos-x64_bin.tar.gz", + "checksum": "736aed3f251971e78cc63fe8fdd634ac9e690849c9ce43a85a1ad52bfbf59802", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.10-ea.4_windows-x64_bin.zip", + "checksum": "34fe338e3ec4f61d7deaca375e70847c7d1fe43190cec1eb2cbedcf0db5788fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jdk-17.0.10-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "66aa439a4dac8816e2bcc0e356ee0dbe58e0487731b41362f5611ddefb947317", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "60145b7465ba525154b1daf61febe592afd683dc7f26f2c21d53d4a2b5189c4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.4_linux-x64_bin.tar.gz", + "checksum": "8ae7d8f8ab0ec8e4aa3c40082ce4683fffd91f0662b4974ab896263cfe71be3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "450017fe69c3f8f7b0c36a606a38cc8e7ff9cb3b539fc0c3b6ec0f07bd2403d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_macos-aarch64_bin.dmg", + "checksum": "4cb814b09010ed6e71a332569173b23681686d5b34c4863783ed349e274c5d61" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "188adc08e55781df12e6ca2dfd2058e5f277abb26db73ff6f44828d9d173e19c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_macos-x64_bin.dmg", + "checksum": "7cae229026fa67ae2dd959ec86b220ae4c8949e54b3464afcd864e6e920fa3fc" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.4_macos-x64_bin.tar.gz", + "checksum": "dfa08889a76064f9c682b29ecf28cf57580c60f1565254831fbb0970af372832", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.10-ea.4_windows-x64_bin.zip", + "checksum": "47563fd750151520d889dc093aafd758d6720df8c34d3054a7370ee05f33208d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B4/sapmachine-jre-17.0.10-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.10+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.10%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "ac41701dd79923edca9da99139d49d2faa6472d2181f9c5cd4d42c1e7e771d6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "c1f4deda489c3e0f6099ff0891353f434030477dbb91527e30e4ca0a2575565d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.3_linux-x64_bin.tar.gz", + "checksum": "4188bf8f3bbe3489d30dbb33f9f625b2149138bbfdb026656d0e3ebbc42d6bb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "03650f4b12fa3c0e6d12c5e899256e4adff6fe2d39f255ee747c2bb6aeb546d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_macos-aarch64_bin.dmg", + "checksum": "2cf428dd883141c33df342b613ccd72ec5a6d85f60bb70f2d28d0b97c8d3133a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "a8873520a1cd75ad546f707bd093439aea739334d9298f8db44483d6674a5f5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_macos-x64_bin.dmg", + "checksum": "b533f48338b2dacd3c63cacd0144499858c6f850213fb2f8681c6073afe13854" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.3_macos-x64_bin.tar.gz", + "checksum": "784ade2d311eeb85cdf2f3d426cb4a3a35374da1cd12e390ffb47101002c1339", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.10-ea.3_windows-x64_bin.zip", + "checksum": "0fbea1360e1278cc66f5a42c7f51d266b4c3b9cd7078405a45ea64a38d8bc8ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jdk-17.0.10-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "7511fe50bc84b2913e25161049ef27b425da6da44f4b81237e62c3387d3c7346", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "338de2279e15e096083ce07e468d835acc20dbb7304ff0ee398d488f3739543c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.3_linux-x64_bin.tar.gz", + "checksum": "be0dad7899b2e8eb37d39eafeab38a2bea55cd5a3efba1eddbd95c884c7f3d3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "4b5c4afdc9e81eeb12700e4af782c2a057051d7d9fdadbdc0c267f879f702287", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_macos-aarch64_bin.dmg", + "checksum": "217c427840c962dd0608805bc737b8e4c6229a696e2a22a89e641f9073ed4fd2" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "749e0d9a466842795e3c5f579697e422112c5a1ce67d360203db411214c9a2ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_macos-x64_bin.dmg", + "checksum": "eb98c814f139665938b81dd40993bb956015cd8cd9548f9260577e4b20460b8b" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.3_macos-x64_bin.tar.gz", + "checksum": "8525e0e098dadc11267e0410900f0fd662c2e0dd21a836d138aa659a00f6e58c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.10-ea.3_windows-x64_bin.zip", + "checksum": "fee08a35a3324cc1a036c0302185d9f9bdc5c808a7861407ef015e84affd3397", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B3/sapmachine-jre-17.0.10-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.10+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.10%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "b06b6dc7522714d3281d4477e3de9e6d7f39c0d7326bb9c9c92be21bb2389213", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "d9b2b5b4907012135c6b3081fd64cb5a7ef7c19c5cf64e810310c7fbedf11fcd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.2_linux-x64_bin.tar.gz", + "checksum": "af733f600e69e0feb5dea7933d1e91b2076fbfa62013bcc72bdf3e07567c9bcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "b8a195d18fb98e122cf8ba4382e5c62e9f1c49249ab7e943bf886904b7694b9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_macos-aarch64_bin.dmg", + "checksum": "2dc138291b5f0781124da93c901d5ff6b591cd2415475c5bba907ee11ffb0fa0" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "aecb8cd3d0b56a8a599ce541591a3824feb691fe689199a7d8372dfc282566bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_macos-x64_bin.dmg", + "checksum": "0629f6ad5014f8dff17896d9ab965a00b0916e4c86d2a7d42a6bc0c8801d61af" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.2_macos-x64_bin.tar.gz", + "checksum": "e398bfe080c375a0eb6f1086bbad672b75a024e18c0c3743f2c987197240f2e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.10-ea.2_windows-x64_bin.zip", + "checksum": "3e83ff0ae0d0e0c063aae126031095429d58cb3d2d0e4add5dd081e23e924e73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jdk-17.0.10-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "fadcd8f0ba2da16d6a0eb4291224daeb0f617b3148820f62c68e54bf81c97204", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "82801ca92929468a11509bc9580065b428b9099406ee73f70ca55a1a12be1ba3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.2_linux-x64_bin.tar.gz", + "checksum": "416db41a077253515a0d539f20bc0a50397af52a754a134fc0bb074f9615c10f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "5d341f0309a1fc78f149569785bc2d25a7380388b17946c6111e35d33693afcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_macos-aarch64_bin.dmg", + "checksum": "550151c52e674fb29504aea4c6b24d6d3533a469efd3dc9bd18f5a2077602c19" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "b5d3400064d83e6d3973ff4349c7eeb501d3539d8651dfb4dbedd1eddc5dc6fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_macos-x64_bin.dmg", + "checksum": "8296c988a7f66ea3707d11c3ea97ca707fcfc7e5a48c0e470373610a4eb2cc14" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.2_macos-x64_bin.tar.gz", + "checksum": "fbc6c9b7ef4a270670192638552b594d7e5847ca62b4f4310d859c618161cfbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.10-ea.2_windows-x64_bin.zip", + "checksum": "bafc0c7de8b30d607367f3d78ca860de932f1cf146ab49b54b0c9481b01f2076", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B2/sapmachine-jre-17.0.10-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.10+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.10%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "24523825adbf1e35226baaa095a12ce58c1a01e8117881479be4847bef185208", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "33f7a024d06ef684de5f7056ac4c56f6549b6f6756721f457ed7c238a7092a64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.1_linux-x64_bin.tar.gz", + "checksum": "6c9eff7ce55afd75d8b1c34bd21c0e62bc00026f4076b0607fbdb1618b41a2c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "6fc09a8897fe9b2220c21f8e5ce231dbfe3b7c81e8ed91d182728631bf4d961e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_macos-aarch64_bin.dmg", + "checksum": "b98171bafa98419efa977fc68151c1604c61a2fb6b31c9a1901b63e28ffb4e9b" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "398089b8a171f76416b76c15a880d7e5cc73e17832a531f59dff9b3987b01b62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.10-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_macos-x64_bin.dmg", + "checksum": "0d696bc86857413e409f4ecf272592ee3db586fe7288ed2ce95f344485008f77" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.10-ea.1_macos-x64_bin.tar.gz", + "checksum": "d817e78fc3d26ed792ad633fa356870723fb6b68e2d67e73e27a1d3a429e7674", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.10-ea.1_windows-x64_bin.zip", + "checksum": "2579530f0a79d3510bd883bfb0d22a08df2f094ced83ca7746e2a888ba5df5a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jdk-17.0.10-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "4742aa5ceaafa7855ad8075f92aed584ad2f669f7b809e4e0ae955a6854c6a13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "7d4317d66cbf414f8e05ccf8c6b246bf8f6e32d9bdd1f07b8ac990a14cf92449", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.1_linux-x64_bin.tar.gz", + "checksum": "46e5f3d5dae392a10199fb5857e1aa717549c54caaaf85ef38e2393fc358f0fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "a5f955d39929ab73f70c9f37a83e499fff270c1ee5fb50884fb3d0394b7ee505", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_macos-aarch64_bin.dmg", + "checksum": "0caff2b9e7376fa048bbae4c99b6fa9492070e4c8ba557b53db54dd9a54a6f2c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "43222200233ac77cf807d487cba66063e7edb0652a104805c8238acc40ae99d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.10-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_macos-x64_bin.dmg", + "checksum": "31a89fe68b67681925dd3909f344117c35e76c2b3409624e082d3b73c2b6c072" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.10-ea.1_macos-x64_bin.tar.gz", + "checksum": "c66c88c1791f6e3b9ebbe4da7b919bfaad78572217f769a88d72db1dc1e7c304", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.10-ea.1_windows-x64_bin.zip", + "checksum": "d2eaa5016cfb0a07cda95e3467b8e2d2d93ca7bb4347971a112e84c45f928b36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10%2B1/sapmachine-jre-17.0.10-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.9": { + "sapmachine-17.0.9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9_linux-aarch64_bin.tar.gz", + "checksum": "041096f68edf86522d8fe076148128bb652aa33583bbd4956f31cd886c9d9c67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9_linux-ppc64le_bin.tar.gz", + "checksum": "d6b5a04f92596a05f8a95b948ae30ef7c8ea13513e4eb087fb3f36d995c4156a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9_linux-x64_bin.tar.gz", + "checksum": "502107296e925e6323c368017e74a5cef51f3664f72c5a1926e174319d1d39fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9_linux-x64-musl_bin.tar.gz", + "checksum": "1cc5e6f864b9f695fb83d8bea30a8bed517e6bb3d6e82e1f18571d2e93c9d843", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_macos-aarch64_bin.dmg", + "checksum": "6b2e16189ce41fa48cd237e942d58b7dbbb86c2f361271573510b45f3f286ffc" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9_macos-aarch64_bin.tar.gz", + "checksum": "dd731745e9b43e589bde40535368376b4e11452377a40848ff05eca19c54bf24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_macos-x64_bin.dmg", + "checksum": "0d8e3ba48615fce3893cb4caf056edc75399469ac96c1d2764b8ed8f308707c8" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9_macos-x64_bin.tar.gz", + "checksum": "b025d24f1ae1ab0834b262ea0ff4c4f0fd823ad88732d444a3ec676d8d2d1952", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_windows-x64_bin.msi", + "checksum": "e94736b15ca932e10aeac44017597998c518ebeb11728f22961fc4747c0e26cc" + }, + "zip": { + "name": "sapmachine-jdk-17.0.9_windows-x64_bin.zip", + "checksum": "7066ed52936f65d6e99def2ca1d70cf97eaf39d125f9c7f1bc23a1ff2303d468", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jdk-17.0.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9_linux-aarch64_bin.tar.gz", + "checksum": "7b66efb5b78b823df4eaef2f2bd563d11fde4b1c267e39e73efa70d1c8a8a87f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9_linux-ppc64le_bin.tar.gz", + "checksum": "f66e74c1fc7d638c80bde53fbf8e343b86bf8edabc4de9d9c97fe9c70ed107f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9_linux-x64_bin.tar.gz", + "checksum": "869e556c33b8743ed57ec8a40b4aeb63e3dd7d65f36178445b88882c91ac901b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9_linux-x64-musl_bin.tar.gz", + "checksum": "d42b60ae5ecd0ba75474f35774a0597d36e64d40566f3fefcc3a8a560e9800bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_macos-aarch64_bin.dmg", + "checksum": "354a2fef3dc9876d58cda96805741f45601876d9df9f0127979cb39dfeba7f37" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9_macos-aarch64_bin.tar.gz", + "checksum": "a29714fbb31b26a405db15c3a839790e2cea7a9dadad870572ef6b3eff78d929", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_macos-x64_bin.dmg", + "checksum": "1e33539a8f860c0c32c835d3b82a17489dc140ca52ce922744e04fad9293fa2c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9_macos-x64_bin.tar.gz", + "checksum": "db68c8711db2ec794efe38f7b4bab992965da1e76829f4efd3c76c35cf8c8cc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_windows-x64_bin.msi", + "checksum": "39b40ff606f02e3b6e8fb17d4fc71506ed45f269f2cea76515c9dedafd47fb50" + }, + "zip": { + "name": "sapmachine-jre-17.0.9_windows-x64_bin.zip", + "checksum": "271e982870181a5c60c7b5256f6fb174702fe1f57fe69e3aaae1e492c050fa0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9/sapmachine-jre-17.0.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.9+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "bdbafe37f5aa9c747b24a3860d7bcfd76036c9c0ab18f5780cf7c9f8c626a660", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "bb87b8f8cabcb68d1238a8e1427d9061f94336b45b5e9679a57dac62778300b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.7_linux-x64_bin.tar.gz", + "checksum": "7d3bbf06aeff1e84f77beaacc2aa249e2ef6c6882f03efaa59e247d6cadd8811", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "1b20ae1531f13fc4d3c5e805b97206830e87168a0db87e865e94661fc062aa9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_macos-aarch64_bin.dmg", + "checksum": "48968fe60b3a8c4a67193aff7c8dcba9ec45f7b36c54667f0acf9ce4428c79df" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "5c9e22979485d194869b88df7eb17b75bd4aaab94beff02660cccd0890b7f9e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_macos-x64_bin.dmg", + "checksum": "1f4e5d8562198ed767dd1867c9c6826206f7164456688195bd24ca7a0a660f5d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.7_macos-x64_bin.tar.gz", + "checksum": "cebd08fb30dc2982556181de387f130599975d0a9a22395b002d6f82b4e717d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.9-ea.7_windows-x64_bin.zip", + "checksum": "a61227dc7e11010502552aadfad28175fbb023c514964191f29b495d065dda09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jdk-17.0.9-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "43bf52ed67e6424cf9cf3c992ac5d69e8cb1cd473bd00eeb0d819442f60ac938", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "5ddb76c5932a5d555ded610332bda26e8209e00fa75e2d28971aeec840659f10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.7_linux-x64_bin.tar.gz", + "checksum": "c52914535a04a4e343e0f4f14d658d1f33205974f8c186758b68e571852b8fb3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "538b67c929540a66f41eabb7bf4f58a3ab7c823e3a549fca4d52b20589521b50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_macos-aarch64_bin.dmg", + "checksum": "ff45ed7aa17ca82fd13394c8890af3d0eb6d343943221e08db487971aa08369e" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "5e4e1d64106787a223b57b6bcc078086c01f5a025a1fb1efc606c9fa3293d5aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_macos-x64_bin.dmg", + "checksum": "5367a59ed36ea994c99c6742421fafe40a3bf1c80285ab0b382c5f2baa0d4ad4" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.7_macos-x64_bin.tar.gz", + "checksum": "4783a1f573ff9fc3c6724841b5c92395800ce74daf3aa9df6e85c88595721ce6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.9-ea.7_windows-x64_bin.zip", + "checksum": "f7904d0c78b4273efa245edf63d9e9336b0d0e6224fcf7ae1842ec6c43bd9583", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B7/sapmachine-jre-17.0.9-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.9+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "e50214fba1e027a4f6efe76adb13c54fa3263780e419d132d3844c4c0859cc70", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "8d56f7eea65744096c7d9556117f900be4d10a2b6b0bf9d93114f207e1cd19ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.6_linux-x64_bin.tar.gz", + "checksum": "9af74b9edbbcdf6020b68ec2299c4a1b14830de1a4f7185237700d21952c4609", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "6467a5634a80973cc8ad446c3908ce0faf9758d2f9ea4f531d005b58d3891f6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_macos-aarch64_bin.dmg", + "checksum": "1b5a65a6fb7f7904e330e83a25129c3bac50e2bd7df1676944ecff08a4802256" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "4d0d76845eaac295c4b7873eb6508632ee3fafa9c83d676938162647959257dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_macos-x64_bin.dmg", + "checksum": "4a713abd47eaea63d9b83682bfcbfc82afa8f59525128150bfe08c15417450e4" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.6_macos-x64_bin.tar.gz", + "checksum": "90131e95b4dc9e349e3d4b2706e04d711b8b417523f358b7bb144ddf34b22ed7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.9-ea.6_windows-x64_bin.zip", + "checksum": "f7548c2b62536f56d60da3948e7bad590c0327e3af26f804d09354df39982e85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jdk-17.0.9-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "b153848416b970f87d07992ea0e046a385b57674a271f0f94d09472743f0aa96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "a708266ffa0e109074669c38f749e525ac95fa7c5bc68b1e8cbb5c1d9ceaa053", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.6_linux-x64_bin.tar.gz", + "checksum": "ecb73efe41c5dbb7d0bfe72412e5e2f852c49745036d4fb5d96b5011e65caf6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "e6b1af410e96414e6b945e05f39c5e328173deac1cb7a7b6b516268a70c38977", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_macos-aarch64_bin.dmg", + "checksum": "0ddc49d9f2490a556fef184f1ece4c680dc1817c6d088cbed5459792abae8184" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "1f5fc3975eda88dbf06c364e2980d8d5afdaddd6010e7a76bfad7d3136211627", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_macos-x64_bin.dmg", + "checksum": "70b6afb82dd19b68d85c124b6e7e75bb9f3c0532a103b6e8208a5b40f6a39214" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.6_macos-x64_bin.tar.gz", + "checksum": "cf5a23359f02a9a9ff4ed1f55b09eb5eae995802eb5b490b3e676af6c029f14b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.9-ea.6_windows-x64_bin.zip", + "checksum": "a295c4b671433d25595f65f169ff44b24f5a7afaab032c6a5f1b53639bfe61ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B6/sapmachine-jre-17.0.9-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.9+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "fb240fafc2a12abd083e346afd77ab71fe1bee00cc07b8ab383bae61b1a5dfb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "c9bbb0eee8bfb15b2782e3bfc0663ef062b330af871edcfc3b6d0ed6e1ab7a09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.5_linux-x64_bin.tar.gz", + "checksum": "21f466cd0427d737a24ea27948e9cd024b84ed8363e7d028ddb63f34713e6d92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "9245dedcdf457425202b6d06ba8cdb19a90c1061b9332a6126092f17d9590bba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_macos-aarch64_bin.dmg", + "checksum": "9736da350e90f0e78718fa3a1ba1d69a115840cccd6791d70a1c101c112fe0f4" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "d86b6b4e38275ac9f6527197492624b67a5fc021990c257787f1893eacd45b9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_macos-x64_bin.dmg", + "checksum": "7adb193d885043d253ba356992048ade34433e6e99b046150eeadbbb6f0e0fa9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.5_macos-x64_bin.tar.gz", + "checksum": "366725a930bcceecc632f56f357eac1961db25d1179ea1bb2c9eda349ef901d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.9-ea.5_windows-x64_bin.zip", + "checksum": "661af6518c77481fafd827cdfa93f292fff414e0343e814f8916db03fd061f9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jdk-17.0.9-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "fa101ab280e19577dec7db3e30d5953aed55c2a5d4202feb3b86750e36d14480", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "352c0bc37319f77c531baadea7f56353c1a9ee34381e07c631949f914b889d57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.5_linux-x64_bin.tar.gz", + "checksum": "6273b64fefacc2e8741a76b7a69aca473490a99e736fa0dc095ebfa93a277292", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "81e8d7cd591d69f3da3b10c9b502b672bff97528ff4117bbc14f885d1cf5081e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_macos-aarch64_bin.dmg", + "checksum": "725c85d0f4ccea560d65e09d077ee70bbd4f7ba853dc1a39db87b3be821e9d48" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "2ee55217b5d2b3f7b47d57bdfb5696bee78813db5f639a8c125d97a42d1081a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_macos-x64_bin.dmg", + "checksum": "fbccac43e71261e76a38c73833b6c237cdd02591f9cbf8eee86b0515ee11c6f6" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.5_macos-x64_bin.tar.gz", + "checksum": "998b8c2a373da8779e41939745cdca662d7b9e8d5d2072870b1dd340371609f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.9-ea.5_windows-x64_bin.zip", + "checksum": "1b0547ed9b817b7357621c200f6439678ce263db7d064eff1d7148ea29dc4c5b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B5/sapmachine-jre-17.0.9-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.9+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "486a40060e538d2e129694991b5be30c693dd1a6f7690a658bf4310040d8bb8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "f525931cc1aa63131b41aaf61b245fb02deb2103723cdfab404c2761f1792cea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.4_linux-x64_bin.tar.gz", + "checksum": "0e0e7a1aa8e77b1c57006907c37fa205fdf148c90effe9e2447feaadd9fdaf06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "74a5f7e5def1589eb19f6a8f3d05e5ee32984ace74c6148af9980f0edd0e45cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_macos-aarch64_bin.dmg", + "checksum": "d80930d3d7bd981b24a3b29a31f462ea4bea7a20a9bf1ebe1d9478e355081576" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "21df186d36eb73d89db3ddb673ccc7e579a77879e9df296bf6080b72cb01454a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_macos-x64_bin.dmg", + "checksum": "4756b4bc85774868e87c2dc9ea0e8be60c0381b3866644e74950d4771112f10d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.4_macos-x64_bin.tar.gz", + "checksum": "cd106519fdd368bedfb69eabb69af4091c77e2ea51c357ca44694b996d4c911c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.9-ea.4_windows-x64_bin.zip", + "checksum": "a9b06725771b13c6c8c92edeebd2b1bba835de81153ae34756d2b32e938ffd6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jdk-17.0.9-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "3c532058165b204b635727f405ee7e5e00c5f3b3e39e78df741f7db2647de018", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "1b965367ad66dbb19b8e4b6a2d093c4afb0bb6ff4203e8ef9074620c996af0c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.4_linux-x64_bin.tar.gz", + "checksum": "0fbb623959d74151faf8c04dcdae1956d0e87fe726ca84f504fd4380815f1f59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "04e8bec049b9bed67f9063269739c3262d2e423a3d1049eb0cc11e3faf868871", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_macos-aarch64_bin.dmg", + "checksum": "2b3630db8bdae33c89d700af7666aac72d91ddce8bf3d3854048407301dc22f3" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "61b75447fccfcde74e08e1c8ae7bad3a3faf50c1e8fbfe8365cea97a4801c71e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_macos-x64_bin.dmg", + "checksum": "c2977540e027bebdad82d011aba3088779227e4688d068b1eab2975f7f2bf272" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.4_macos-x64_bin.tar.gz", + "checksum": "4592e65480e8dfe21b626dddbbf97936648d92204ae1e9d58c49de82894caf06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.9-ea.4_windows-x64_bin.zip", + "checksum": "b3ac4c983352cc40677e305027a1b798beedbbe92695dc3e824004e2d9fdee39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B4/sapmachine-jre-17.0.9-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.9+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "8943d4f9e8cef6824907db20bab984c815e6a48cd5c5973a0ebd85c49b617e8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "feaa37f2d629d1b0fbdde3669e2281e9cfb4956c67d61eaad29ae9eca78edb61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.3_linux-x64_bin.tar.gz", + "checksum": "de0fdaa72c8d2a796b35cd06a12a88cd63c41d7a53b7cd3036670c4b6c98ec97", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "aca04dcd820d43ddaf89001e62887e8823607ba229cd62b3098e6412c148464a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_macos-aarch64_bin.dmg", + "checksum": "72c219b9844a50ccd19a6f37c52de2d10917d92fe40a95ce01c65357e8e872ea" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "7ccd995bde1f941f2e8ceb4c5ec2da94d4cf64361f69de5ee3da42b6b13e506d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_macos-x64_bin.dmg", + "checksum": "36901fb763383dc7114b75169b39852d1f35363e5ef0a62bc311860f9971ff1c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.3_macos-x64_bin.tar.gz", + "checksum": "d1da119421cc1520c56e6d0941028d18fd922cdee787b273781e93a26428fe22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.9-ea.3_windows-x64_bin.zip", + "checksum": "4a5b21c1f75774a76c0f24dc40576f7e7a2970c76f7371d08b1df80253da6f10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jdk-17.0.9-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "8a1a7de02504ea39d663da36cbe563a3cb1a5622ceec40bb683e9a06d0e395c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "c15a3c2e9f327bf1bbb885f102de9d2d6cf0b723eb4c13629181d6ffa20ccdb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.3_linux-x64_bin.tar.gz", + "checksum": "9341890e9fb8fa9f6febeadf43d7a5f59bc97c4fbd7176b70f78b2ce2f90c6a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "910117e373ca60fd784ba5ee44fb052734eb7343b2a84af20108d048fe81dc5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_macos-aarch64_bin.dmg", + "checksum": "5b634c80daf162633c7ecc201bed7cbcfd7888b2b60189a8bd65b3ac9deb613d" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "08c8744dee5edb74c62ea534de86903d91a476ee11b8ea56a3f301d67dfaa21f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_macos-x64_bin.dmg", + "checksum": "687415ce9a8b611f1913035c60627689206662afd51cdc7469a665d40204838a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.3_macos-x64_bin.tar.gz", + "checksum": "a5e45b9a3cbb75731ec2fb776d5e8f6708bcabb612650495f22eff1dfe639dfb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.9-ea.3_windows-x64_bin.zip", + "checksum": "a43551f55c480984be40d370713ac0e2534d3d65ea42feb285784920dd21a057", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B3/sapmachine-jre-17.0.9-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.9+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "055616ae2e035d70c84ea4b6ff3f2b99d903760f9387ddce838b830a3ff3303f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "6c87c2650e8a9b0afd2fe53a71d60e2e08438317e1dadceb4c1f5dc6bb949d51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.2_linux-x64_bin.tar.gz", + "checksum": "35d7d5190cd26a0b1e43353eb8747a4f9e9600676c7be1848457aab5f843d99e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "ba8fec7bf54771d01400e9648c7eb93d90046874446a8f83ecbe3357495f3502", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_macos-aarch64_bin.dmg", + "checksum": "d7687c92ddd7de5ade02b7eed0857294f503d08f6cc63b9cf74f67fef7bbcae6" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "bf78b9f57052c608729626b4925cc4464e54b61727a4cfab960476663783100c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_macos-x64_bin.dmg", + "checksum": "1f9f56f2d5b615cf4946620fed6ad2b393f67387f6011cbc92f1ed5f2837ecb9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.2_macos-x64_bin.tar.gz", + "checksum": "09063d2e0157e8553eb2bff2e5353ca2b80350880a878afc31d432c4e39305bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.9-ea.2_windows-x64_bin.zip", + "checksum": "34b436697015a42d283ba6a907fe1dac80677e8697e33bb9e9130c5a18898f38", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jdk-17.0.9-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "dfe31612e4df6382ab730230767ab81bf5c4d277645ab2bc8a3d21de9106d5ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "39e73588d36de210da7a3a41e1cb3b715bd51189dce34244622857918f46122c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.2_linux-x64_bin.tar.gz", + "checksum": "5c82aa98f8a14fa9a56b0b78a0fc9961530da28e543820b0cca1208a18380897", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "bc7ad4afac8c7ffdf19c6864524b10113436c93938b42d72c6bf68192db50b46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_macos-aarch64_bin.dmg", + "checksum": "60ecd1ca23ec8d5e7b34deac326531846246c910616bd9d63015913ca99b8497" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "87afd12751e8d9616166935b5dd1a98695878d6b14cf9fef575099a6ea66bb60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_macos-x64_bin.dmg", + "checksum": "efc1fef92bb5a35ba1c2aa1644ceaa1ebcfceea85ff5355b96dc47b59e050886" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.2_macos-x64_bin.tar.gz", + "checksum": "66d85a4dcc5af9bdb8891be18f015d2d88d548b9d7e9476de3167d11b103df6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.9-ea.2_windows-x64_bin.zip", + "checksum": "0713f3764038a71ac588f08b2a7cd0eeda0cd1f659072df07742e34298afae6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B2/sapmachine-jre-17.0.9-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.9+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.9%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "c95128bd410d23448c57ec324130c32a3a031d8e404e259719b0a76bcfa0040b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "db103a65c19c892b586f15987ab326a0cd22f5056661d3c5eb9c230e46ca5f4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.1_linux-x64_bin.tar.gz", + "checksum": "faab393ee9b46ed7f4e7a0fd409a47c840fcf110f6d94b93939e4f0d654b8d6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "0446a4ced17dca680368a82a3fbd2b5a1255abb34f5626f0acf812ab8539c211", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_macos-aarch64_bin.dmg", + "checksum": "f2d132bbd8fae9b2290471e71eabb5a25eaf41d3ffcd306734d1daffe6abe393" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "68c26fc1624690fedb9767571cd1d6f3797eb1d15243529ea2cb870fe22e1432", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.9-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_macos-x64_bin.dmg", + "checksum": "3b85bbdc590019ee3d3e8e43c37069f84f3eb7e24e20b6d0e0cc990b5e874cc8" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.9-ea.1_macos-x64_bin.tar.gz", + "checksum": "d4e926e2fad91b6b198e645eca80aaad42c4f74bc524f0514041ef95ac49a676", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.9-ea.1_windows-x64_bin.zip", + "checksum": "9e706d60e7866abb7de3bd60ffb3d1a37c9011ea354287bbf248425a064dfb03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jdk-17.0.9-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "4048d6c0dc26dfbfee3429568a74a288c0c0a71226a1c8fa4e226a9a7e046c4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "0443cebab1e73fffe69fb5c57af623fdd44017e351bfe2ebea00f145c351f5e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.1_linux-x64_bin.tar.gz", + "checksum": "993cb43dab7b7a46066870b9acc5122e2a329f017f449d4f69c059429aad868a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "2a235f5f0722019bccac2159fd09c3ed66e4f86c0be2ab6fd511dfece5d79d30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_macos-aarch64_bin.dmg", + "checksum": "4ab1b9ece84f8552d3744af08bda8967fc6fd5d52f67333cd83306953ab2987a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "6dcdd358957454e695d560845e2d82e7bd63d0db27c48de8c475186bdcdb96da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.9-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_macos-x64_bin.dmg", + "checksum": "95c4c488e0ca1a00add7dfbba8aa0927ba812f1036022435dc1167d6443638f8" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.9-ea.1_macos-x64_bin.tar.gz", + "checksum": "46298b3615f1d047eb62bd73a188646b6d944b77d72faa5bc33a2b0622ab09ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.9-ea.1_windows-x64_bin.zip", + "checksum": "d0c1982aa3d375f1a0f16fb2b0bb6264cd7d49bfee418f641b646583f468bf5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.9%2B1/sapmachine-jre-17.0.9-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.8.1": { + "sapmachine-17.0.8.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8.1_linux-aarch64_bin.tar.gz", + "checksum": "59329e8445eef359d1de41ae18e63d3dd197a0cc34e76afa2c96952375bc326b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8.1_linux-ppc64le_bin.tar.gz", + "checksum": "020f32299a4b82b02ad2fb5422b6e71416534ec545bba1abe742a49e382daea4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8.1_linux-x64_bin.tar.gz", + "checksum": "1c439fce29d1c0026acac466400abf6306b3060663b7c632f06b4390e95a5a90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8.1_linux-x64-musl_bin.tar.gz", + "checksum": "9cea01a5ea25e074de8c21b6f345c60165019516c20dcc6d8cdc95849065fdb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_macos-aarch64_bin.dmg", + "checksum": "331a91196672b6158c24c71b40125896da59b19c547bd63092e8ef730ff44b93" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8.1_macos-aarch64_bin.tar.gz", + "checksum": "8164e13176ca80cdf15d22ecb33b502721b42ef6b5f98c480089e2f7d79cf2fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_macos-x64_bin.dmg", + "checksum": "3c57d060555c51983fee527ccae66f7cf81a5e63e38d3f492cdbd7e83baad594" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8.1_macos-x64_bin.tar.gz", + "checksum": "db7611f5429f94f58f17c7b9e9c16f99b5e48d082291ff2757ca7f69065b2197", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.8.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_windows-x64_bin.msi", + "checksum": "b037608afb48bfb7ce73eb1096013afeffb019791542826731037d497704760c" + }, + "zip": { + "name": "sapmachine-jdk-17.0.8.1_windows-x64_bin.zip", + "checksum": "331052bb54218dab63479471b76a7593f35bf37a9623a7578942390fbea8dbbd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jdk-17.0.8.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8.1_linux-aarch64_bin.tar.gz", + "checksum": "a6d9d2f6fe4431a3a9baa623fdaf9d3ae4e051f5884829b1777ba63f3f85428b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8.1_linux-ppc64le_bin.tar.gz", + "checksum": "d0c055e1cd399e1182ca33ef2e594af64e743b610c1aa9f83029c9b827c15017", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8.1_linux-x64_bin.tar.gz", + "checksum": "ad10c3cf9a65f892dbd16204c70186a5945a88a8355e8d06c200e08f5dfb8718", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8.1_linux-x64-musl_bin.tar.gz", + "checksum": "029fa1803fd2c8dc45c13493b0786d878f0d975145de0fcd132327b578f99578", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_macos-aarch64_bin.dmg", + "checksum": "2e3b259d6b1ada63c17837dd903163f04cf96f3f37df4fa045ad461c3d0f470b" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8.1_macos-aarch64_bin.tar.gz", + "checksum": "d4b4ad5622845e9bc9f1070353199f7673c8d2802d298540b4910ad73cf9ccc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_macos-x64_bin.dmg", + "checksum": "783583d30a0848b2c0f4a06fa6435b37961de79fbaebc2f1de0b1ef18916ab5a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8.1_macos-x64_bin.tar.gz", + "checksum": "00ae7342ee0d0097d545d3f3c52834f47a83550938de251cf61c776095f5f861", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.8.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_windows-x64_bin.msi", + "checksum": "474e9f82cd6c46db7d4d0099dc272bf6bb77554109739108de40535cb83a4d89" + }, + "zip": { + "name": "sapmachine-jre-17.0.8.1_windows-x64_bin.zip", + "checksum": "67642dc266acb946a0f513e71abe8d1c865b1544eb539eb5e3d8b4ff2253d728", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8.1/sapmachine-jre-17.0.8.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.8": { + "sapmachine-17.0.8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8_linux-aarch64_bin.tar.gz", + "checksum": "0d55b992eae869cec53bf2ff4e7901fe161d51a6966bcdc18859d77e17d6f4ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8_linux-ppc64le_bin.tar.gz", + "checksum": "7085ae9e29107d9a819fe55c81a44f9048a696386b50c58da445f9b750882980", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8_linux-x64_bin.tar.gz", + "checksum": "892e5db311b6afbce70ede2931c6698d49ed3bb6c07cf7a034cfe5884a686e89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8_linux-x64-musl_bin.tar.gz", + "checksum": "a0a7e2d8b6680d654cd323a6d944be3e81d3c1f4781caea7363d6bcafec03481", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_macos-aarch64_bin.dmg", + "checksum": "5096bd71f73d426180a6fdedbc0b79e3b6c07ab8608f0b371e3e8b21247f53b9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8_macos-aarch64_bin.tar.gz", + "checksum": "7650dd4daa01e5a0189180d945d2f8a93b1141c24c1ecc4a8fc78067e512e22b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_macos-x64_bin.dmg", + "checksum": "4082bf0a4c9d9f3661fc6beea53150973fbe78efbc550104cba9bf883dcbd42c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8_macos-x64_bin.tar.gz", + "checksum": "c78bddc218c1548cf5d06c9c5c1baeb1ad951b9247bf8be539e73bb2b53af7e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_windows-x64_bin.msi", + "checksum": "0d15003d81f8f49b6fb13c787fe483fa6060811a37a120703e3270df4886e85b" + }, + "zip": { + "name": "sapmachine-jdk-17.0.8_windows-x64_bin.zip", + "checksum": "27f05b3e4707b07de40c9c687250f6f91861261fc6886064b915e8130cf04275", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jdk-17.0.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8_linux-aarch64_bin.tar.gz", + "checksum": "0634fdbd5ba6736168e5e5332978e1cb42f7f7a2f343efa232214e9ab53f8a28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8_linux-ppc64le_bin.tar.gz", + "checksum": "b0386dfd56c4521bb18710b59199e06c5dbdc5b1e41f307416c25f640423ddd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8_linux-x64_bin.tar.gz", + "checksum": "7b10859e3c27d68c23806c97793d21c12a1a6badcc2146279169eb153f3cad6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8_linux-x64-musl_bin.tar.gz", + "checksum": "dff20bade155737e6e0e57caf768acef88d0ce59bb7331d5d5a9e9104e005168", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_macos-aarch64_bin.dmg", + "checksum": "a28cf02a671f7d5b675807eced0ddca29ae68899b48b1268589519d630cc603c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8_macos-aarch64_bin.tar.gz", + "checksum": "4f27be6670a4be0c9bcce614acd052d158e907afe4741aa5e92644e03eeb00e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_macos-x64_bin.dmg", + "checksum": "1a4b0951aef428e705047ed357ef4e3f709b7c58bb4719321654b5ffb8e871bb" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8_macos-x64_bin.tar.gz", + "checksum": "b94a3c8f986ddf4c356cb0bdde3ebc60adfef83fd73012db4f5fe24cbfe55942", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_windows-x64_bin.msi", + "checksum": "c3e8bff2c80b21adf9955a1c7c07257db0c9df243c0f802f7cb5a12625c0d059" + }, + "zip": { + "name": "sapmachine-jre-17.0.8_windows-x64_bin.zip", + "checksum": "8bbd140307a566b86c24eb6c3d66523269385440ef3879f4afe7e348fd273285", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8/sapmachine-jre-17.0.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.8+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "62e61984611caa9dd6d016a62606a9860007a45971145ab04c41c399be0707ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "f304138de8d5aaea2dbaa2686b23aead493b6d9b15241f0c2535ef98f927c20e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.7_linux-x64_bin.tar.gz", + "checksum": "2e6b0f68e82c802e2eb655c0dd920b4642a638c3077686ad7292ecb250e8bbf4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "1894fc5240dd6b8bf15e713c2302b6976dfbfa620accf65e2c8af12246024469", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_macos-aarch64_bin.dmg", + "checksum": "b49bed1faeb605f48af488a72d40790ab0eab046572981780e9f54e2db379bbf" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "953d9e9614fb34bcdaef5601020a027acefb2ec802e94c9b497d741d26dd352c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_macos-x64_bin.dmg", + "checksum": "c565034dca3861a4a0d6f491f87e90d6ea45b75ec9a31ee9f154913c135ec0f9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.7_macos-x64_bin.tar.gz", + "checksum": "92142691bb8d503b300aa39c5c9abd046f65415ffa72883589fa365e1ea625e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.8-ea.7_windows-x64_bin.zip", + "checksum": "b8223026c456c77fc0535425541a0efdd35d2d74c3202472a4b1aeafbd39472c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jdk-17.0.8-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "84160110c44a0e3dd4f0b2a82d32d698691d369b98aac55e50b7c2d5fc3fcc69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "366f1343bb24e18b75ece31da7a97084b36e56f55637f23305bf273717684f99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.7_linux-x64_bin.tar.gz", + "checksum": "c78093e5f4f45cc02bca64e075bd6d79ef80081c908832d37673a9f41f58534f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "5a99183675d9e0f05d22e305d131bb92944575448e92bbb0541abb8884100f25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_macos-aarch64_bin.dmg", + "checksum": "4533ab5f78b479c7de01978712dab7a17fd5af9ad191ebc35cf3e4f222e2a9ec" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "93b8207c0c39c951c9dc2e79e2bd647ab8d98335c0e4202b0780ca9ff6911b91", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_macos-x64_bin.dmg", + "checksum": "c109332445adaf62b9118dd1b9413f8afabe47825705db6ebf3cf1040152682c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.7_macos-x64_bin.tar.gz", + "checksum": "3935e21fd80ddd4e983dcbb6ca9a868af1cb447a42ca30c567008f2637b0c3c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.8-ea.7_windows-x64_bin.zip", + "checksum": "6a7340dc205bd836d6206b67609db66e3d539bae5a38fb3db145ba2afa47c196", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B7/sapmachine-jre-17.0.8-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.8+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "bfedf3bbe1345a7dcb3d6cfa05ea31aaf1efb859898171ad6b60698072911783", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "a44b79ad0f52bdb712b5ee25e5cedb81c6b3070851a6a33f1e3a79e6192be608", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.6_linux-x64_bin.tar.gz", + "checksum": "28eaa7bb60bbc5f6af3328243969d525b708b1ef6260517ac9c66b54a6bb137f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "a0bd189bd66b950de7a94297428d754d3e49e6403a5a95e043e01baaf928557a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_macos-aarch64_bin.dmg", + "checksum": "7754466405b6c77ddf6c22132711c3105b16cedd55a8ae3d1c1872b2ae73cc68" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "5c6d368ef360da45eb7a1b163f77c510a3dc2816e87e054f7e520a700f5535e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_macos-x64_bin.dmg", + "checksum": "e7c0c30076047d72fce68d48e79f9ee82e98079eac57a2841062ded18d4ba6c4" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.6_macos-x64_bin.tar.gz", + "checksum": "c5d1434ac898f669f26a3b3796fb9650a755c8c996957a9072c56a15a81411a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.8-ea.6_windows-x64_bin.zip", + "checksum": "d0b088d1e4f95c554918460dedd9bb3bd8b9d26396eab8e34bec3679ee82c9ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jdk-17.0.8-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "3f5f9bd5af26932d5ba3c1285b82e62a362f2966fb5af8e04905b3798ef14332", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "aea1f9f9b782660ab470fcf49bd386dc6282975fc82465ce470e3971761264af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.6_linux-x64_bin.tar.gz", + "checksum": "b6292b645be254b0995d0176a43935591f64e992598846c3fc96550490106e14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "4d151e1cd8e9f88eef90329e98a4076e452ebcbe87422121a798e06254aaa28e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_macos-aarch64_bin.dmg", + "checksum": "b319471ec2fef9fd7dfd73b1378fa6eef37b7ac1729f1c404a351804ac1aeaf9" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "d0642cd2cb3914c52699b7ee4db32792c0561ac9a03269478865a890c41e8e89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_macos-x64_bin.dmg", + "checksum": "4fd18d9580bf9bddd5c3ce7d49ac5c5b5965071fa15a86f187d76c4f9a082681" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.6_macos-x64_bin.tar.gz", + "checksum": "e856f9b3f2da920033fb9bcd5a9b33ca415859ccf3ab7aaf8c4e3136fab454c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.8-ea.6_windows-x64_bin.zip", + "checksum": "a9beb5be0a97dd5ce1cef882232e4ecf7489140c5d94c7432db6e3704c93fa17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B6/sapmachine-jre-17.0.8-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.8+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "2e41c987bb76a997be798abbda589111046690ef425fa02bc10c1c1131de6d06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "9bac2acf229496f33d36429f733d9e4ee77b15d5735a9c6d03db0adb5fa64d17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.5_linux-x64_bin.tar.gz", + "checksum": "bb0e351af1975acee0c9c6c5e8ca0d225376b47e0b1ddad36776dce779efd760", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "dec580551f63cca8021697a1338133848fe343bb924ab19f92f361d7587babfe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_macos-aarch64_bin.dmg", + "checksum": "e077f7f460fce52ff80efd4d5c77f78a0e37361a87f48df0661286d60e8bf962" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "0313c8f51d4e4cfdc9b5d9bb48abfb73a4fa6cdca75f8d6568c09b2f3dfedf52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_macos-x64_bin.dmg", + "checksum": "291fbda12d1bd16667972ad9ed4e4ae3d0d756cf70233f2260aae3a61148d816" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.5_macos-x64_bin.tar.gz", + "checksum": "ddb27c18e52065f0b8620d529e7c116218ede2535b167e84ece07211cdd531fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.8-ea.5_windows-x64_bin.zip", + "checksum": "dff6191ffb1de61028d74582dc420e47401422a500a3fece18d76a49b8d3c148", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jdk-17.0.8-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "288c98565612e3c7b5f9629beb9492d69b4bfe7a1f4c4de900d7d4a0143a44ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "5f08ea39ad92544c1e6eac0bdb05d07d1ab8b35ee2b50046b819ed0e34618481", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.5_linux-x64_bin.tar.gz", + "checksum": "d008942fe3b0dc612ddf60d377ae43afccd04a8a9801467c79ebc503dd06e2f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "dc429b93ef166c975e2ca876994f2a1dfa26048bcf80654d9eee5681a79d08a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_macos-aarch64_bin.dmg", + "checksum": "27e763dbf89411012e102d68ff704ca460de9b02abe8598328186ca7438d5f38" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "bd011d393bc56ab6d474d8e33194b0b9cbc907db03c744d324c2ca4baf1fc137", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_macos-x64_bin.dmg", + "checksum": "8754bad9d641e10640e5e7c091b0c894a1425724707871e3d1bfb0e140faeb38" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.5_macos-x64_bin.tar.gz", + "checksum": "a6ce829b32028592af91e4d63f70815e517f800aa4320daef7e55456f9d4757a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.8-ea.5_windows-x64_bin.zip", + "checksum": "cc8b5bfd38cdef5f413b9e9792fa141f29a5fe8ddeb5e17b2891c1db3d15f6b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B5/sapmachine-jre-17.0.8-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.8+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "939311acf3d7efdcaa7e3789c2b6aee708db02e06c7d31b593a604becc726189", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "8540f37042cd23f4bad8cabece045b0c7c80220af67212018c180c336cb709a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.4_linux-x64_bin.tar.gz", + "checksum": "938e3f46faace100352299b590cf45bb522dabbb998b514cd90834dba9965d06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "85523152515568ef860e2d6016357f2872db5d98ac2334041a2e5f7da23c03f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_macos-aarch64_bin.dmg", + "checksum": "938dde2052c985bedc155590dcd27201ac299fddf6d99e94b62dd19703608194" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "c6aac401ff465838787e5b45e02621cfb20e01d037f8bde6e34562f660ad1fec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_macos-x64_bin.dmg", + "checksum": "330ddc7a8cdfdcb72a9a6c9e2448f4a4b7a2e791e78ba74e7b12e4fd0739fb15" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.4_macos-x64_bin.tar.gz", + "checksum": "a1d99ebc8748cc8a606732b5a2cec0e7eab5cadbcfa57f1c69e89361e582381a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.8-ea.4_windows-x64_bin.zip", + "checksum": "d626401b86f5fda1f7a17a1a62dfeea2fa633db046238edbe794a0acb6066b23", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jdk-17.0.8-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "f30d8b0c3f73e7cae9f8c1df7036821ec5707eb1d1a27f1c9d0d2725d929e852", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "691bc6b19f0da40d853916d276202e91c181679983239ac35034bf7ef7519011", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.4_linux-x64_bin.tar.gz", + "checksum": "8e393a8c3df86a00612139a27f38090ac789f70631caca3987208250961d0cd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "aa7d8e7df4d6b49f4fb5e22f246af848838e1061b1a08e18d97f2747374b002c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_macos-aarch64_bin.dmg", + "checksum": "61306b77f102477088d15bf7df99248027307a686b89afa0a86067dd90f1dd93" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "8be01ce72940caffc4ffdd4caa78424160f03dc023d4dc604f17a4cff9c90deb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_macos-x64_bin.dmg", + "checksum": "4da0317dee51ada6b5fed8b52ac92d8f6e9aa8ea074e15909ab1aa2af5ef252a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.4_macos-x64_bin.tar.gz", + "checksum": "3fee45d15b27074587a4209892926719ad92169d3c88e0759081296d38792d33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.8-ea.4_windows-x64_bin.zip", + "checksum": "3704a66ad9d6ff7e04f32bec83b972264804dca387d83c6e0eae55887934cfe4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B4/sapmachine-jre-17.0.8-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.8+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "d6e08da0e72fc93b315a1556f57d992194dad914a4a7987a9dab53767d13b987", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "48f8c03573af1859585cee75b0f053624ad41978d402af36b1496d485c8c553d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.3_linux-x64_bin.tar.gz", + "checksum": "bea1abd4ff7214e7c2799aede09af525c7bf1118edfeb293e52f7374d10bf54a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "936dca8ae2ffe99f92a35818c44acfb4fd44a65478987f0266fe948a83e76905", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_macos-aarch64_bin.dmg", + "checksum": "551b4b1d99024f529611c9a2ec00af16f130076849bdd5b7fcacf037cc110608" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "47ff11c6d6d61c6512811e76ce6a6d584f405863e53151deae76cf1fb6702018", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_macos-x64_bin.dmg", + "checksum": "a495490e0c90fc83cbb2c1f96ffa2f3a9cd114feab5e37c6ec3623ef99fea0cd" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.3_macos-x64_bin.tar.gz", + "checksum": "14517cd1ec33924f189abed44edb9cf4adf84a9de788dd96aaf3061b50f7ea62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.8-ea.3_windows-x64_bin.zip", + "checksum": "8ff27d36bf0cebeeb4d6ddeeb1cd8792908fc3c89f505d6d986a8699ba121c53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jdk-17.0.8-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "7578e33a0e05652ff5d770060dc3bd405e7224abc392e7e7bdd0f27b7d112a3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "01ee75a9821471e4e6d9a0e70848b7c8892c1b972b22276d104ee5a044b835a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.3_linux-x64_bin.tar.gz", + "checksum": "737dca6b00ef09cb1c4a1e613a18c79e7324e3293aa95ea52c4ea1f093c6669f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "9412a883f45df37878b9c8ff2a31820ec5a0d10c7a1578349feab4bc9767dbc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_macos-aarch64_bin.dmg", + "checksum": "1c406c7fc9cc6b9e7fa14b9728e5acf90d0bb0e066ace8e1509a9f6ac1a6c3c2" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "bd68831eca41e34e690a74b5f0d93c59de8e44122080642fa318b1f55bfdbdfb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_macos-x64_bin.dmg", + "checksum": "0840adcb8ff9c81a5013afd9c7bdfa074c07a55df7911acda85fd19c0951117f" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.3_macos-x64_bin.tar.gz", + "checksum": "c39bedba8e03a92cc8df269fd1b53b3f6b560ec7398cb17ac10723ab0ad3e334", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.8-ea.3_windows-x64_bin.zip", + "checksum": "10bd4ba2d124a5e7d88aa11af3d0f2e807a2dc7189362f1ecd7dfd07e50fe285", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B3/sapmachine-jre-17.0.8-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.8+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "72b5f9aea742208a62980dcfdcacc4d0f0629bf5026c0285558f87b5527e15bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "65588d4dec9e8d5a4e31d81ceba28d520a05468f4ce0ce03015b45147de0dff0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.2_linux-x64_bin.tar.gz", + "checksum": "fc35599cda509a92e1d721253d899d7d081a1398783a36366f34669e89da4007", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "ab0da2bdf95114357f42d68f771bd66a2c301509499084784e7e61760408a079", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_macos-aarch64_bin.dmg", + "checksum": "510799abdd1d9122910b7886e363a62239fe8ab381d5a3a6d69a3a6e8413d3b9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "31448de04b870efbe8947e1e0cbb4c113e3f3af61d8b53b5c37c1bf9bd639ba9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_macos-x64_bin.dmg", + "checksum": "f88588e2db0d430805644da17f0724696adfc0f28ddc58c598e43b73da42c048" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.2_macos-x64_bin.tar.gz", + "checksum": "4366c2c7a475e5e23705030f62b379d5a4a39782c9a21ed4c4e4be174a7b36c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.8-ea.2_windows-x64_bin.zip", + "checksum": "c349b224b394cc7d68f34b0a3503fee2f24d0c4ff9c8861c20c13559149b75a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jdk-17.0.8-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "ff510f4f1b78d0108cad0d856e6978f67ecbd394dacb15162b59d399961c2be6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "18d5f188bc517b215099c8de7e2b6b05c0de41c5c2df09e7492abcc9cdebaf37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.2_linux-x64_bin.tar.gz", + "checksum": "1839d808c2851777e9146773fd1df6c2aea7d71b0d5abcf5fdb58295959bcd04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "c02089dae6cca94399501bc1709a31de0e2a0a2f9f87fa66c7c95c788ad7eedf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_macos-aarch64_bin.dmg", + "checksum": "432104d7ec07e48434b3f85083709a291d92b788d072dcf9b0a3776008f82d2a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "5392c305aca7ebcf23b0dbb84541a083ad64592e2e029d0b5692b13c399c0f6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_macos-x64_bin.dmg", + "checksum": "c57fba3420aeb449cbd2e4e7642ad3bf5d1a2c68b96fc28148e27c67cdc94575" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.2_macos-x64_bin.tar.gz", + "checksum": "112f981958ebbbd374f35172dd0a2d2b410d31305d77ad5c78d927cd553ace18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.8-ea.2_windows-x64_bin.zip", + "checksum": "87499b23f4f5860ed03ca64de5a3edfd781172429880f6e9092dea283d24c620", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B2/sapmachine-jre-17.0.8-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.8+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.8%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "328f232937ce7b090fe80ed47a3c5a95c566c0218db3ddbf726d5aa46e5c49c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "bf2b1d83b9afea7689cf371329835a43a98789f51a20b8fdbf8c96459e7a13d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.1_linux-x64_bin.tar.gz", + "checksum": "979478025a9d1c6a751c91382e1b41fc2b90a585e6d448e06e58d0ceb42cfabd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "af0f1aeb8183685d15cd64e4dc5530dd1baf33c61985df52ae2acddf29271ab5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_macos-aarch64_bin.dmg", + "checksum": "b154797fa0aaa8892e016e5b05d317e1230f066a3a592d9e037e986c480b08ad" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "a46155d41b5819dfcd77fd091f24154e5d274c03bda675fe9721e5956ff95ab1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.8-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_macos-x64_bin.dmg", + "checksum": "04e9a414707b81c601b909b8ed87d11b13539672e3e5c83993fdac623ddb0154" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.8-ea.1_macos-x64_bin.tar.gz", + "checksum": "9127edd67cbb2e1dc991aa11c0f7e43f2e05f43a94b042062478f3aed0dedd21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.8-ea.1_windows-x64_bin.zip", + "checksum": "bed4b81707f6ab272795597cef9771a992d3bdf9704cc3d8d296d574d2fd376d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jdk-17.0.8-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "bedc137366f1fae5a4082f295dd5163ce729d10d0a76dcfaded1ba2f30d04c0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "6e6ba98b16e32330cfa50f8af65331cf7318351cc1f4e9d6ce09d97e751704ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.1_linux-x64_bin.tar.gz", + "checksum": "f678a0af24434ca5a5cfd248d564f5a283598e041665844fd49520da20b79c0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "5409c42237bd5a6442057e85398af786fc8869dda57fd6d2e5c19a2883394bde", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_macos-aarch64_bin.dmg", + "checksum": "f37647cd41da567bf10adda625169d6da209c2546a419639438b3cdaa825376f" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "1e1fcb3cb01c111f74e4ac84aa254a17fe2aa6a723ea7ac3ba8e209289b41af8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.8-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_macos-x64_bin.dmg", + "checksum": "508f60dc630964d3f5f1ed6f2e01f203f4020956043423c4ddcc7ee80edb5826" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.8-ea.1_macos-x64_bin.tar.gz", + "checksum": "afb249e089b6e1b6882a4dc178b5746131918874493f6e91aee06a4f6f1f1e50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.8-ea.1_windows-x64_bin.zip", + "checksum": "e60ad6c79844d0956d089cb4ee0976b0f84eee1375b53d213b3698908c5499af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.8%2B1/sapmachine-jre-17.0.8-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.7": { + "sapmachine-17.0.7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7_linux-aarch64_bin.tar.gz", + "checksum": "77bf9ed226d01436f9f90896706309ddf5376d93e769e188fe9a845880136c61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7_linux-ppc64le_bin.tar.gz", + "checksum": "c498452ad40300e90abc7c42f1990b2434f45f6cfd4972368f448746125871c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7_linux-x64_bin.tar.gz", + "checksum": "4b50fad2be69d3955f53faef5e54a3ece89ee74bd279d55a93ba8d864f3d718d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7_linux-x64-musl_bin.tar.gz", + "checksum": "413a0791a6fa8651d24fd0e4471043a69f49be6e1f3e8ef7517bf5c1aa60b514", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_macos-aarch64_bin.dmg", + "checksum": "ecaf8a1c2fe8fe2df00cba36c7c87678b9bf46d8428cffc66f7a1aa6b2c44883" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7_macos-aarch64_bin.tar.gz", + "checksum": "3db9ccca0b5df89a10f53c566bc78f3fd5742d07c11044957996e13f2459c6f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_macos-x64_bin.dmg", + "checksum": "3edf63f35a55ef6f906adab1985e2e85a2c3de13672970837428df1d29793128" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7_macos-x64_bin.tar.gz", + "checksum": "16b876049d34050d1442fe7971c70b581e70c1dec74c3755e2f53c1d04bd2ad0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_windows-x64_bin.msi", + "checksum": "c3de4d9568fd61294c2b400e2050cb397ae9164e5e7f935287639635683dc2c6" + }, + "zip": { + "name": "sapmachine-jdk-17.0.7_windows-x64_bin.zip", + "checksum": "7cf36f89a8e009214fd3238175b5074edfabed4f2d61b98d8eb92244ecc03df5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jdk-17.0.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7_linux-aarch64_bin.tar.gz", + "checksum": "620571190431d0c398c85ec25d6fc57eb3892f2712075c69371a3f12417d2912", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7_linux-ppc64le_bin.tar.gz", + "checksum": "da8b83cca44ca40fd8f8dd227906cbc5f6482695a3a1d2beebe0a2848f3b8a7e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7_linux-x64_bin.tar.gz", + "checksum": "1e5d8e9e18f4a4e45e554e1614f5feb06df44d65ae098d0bd992dd3fc72e4b6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7_linux-x64-musl_bin.tar.gz", + "checksum": "4c4961e94bfbab75406d49996b422bc54c892eb912d9b3fc8396ccc857872631", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_macos-aarch64_bin.dmg", + "checksum": "922b7f7ef71331653e7555f3ff584922b8faef45341cd1c4eab2509e1b4491c7" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7_macos-aarch64_bin.tar.gz", + "checksum": "79d26077e60cc24c3ca7d55a41dda99cbaa5fe7d05d057c8645209234cad4244", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_macos-x64_bin.dmg", + "checksum": "26c1229df73e08369590ee07d74428791f02b7ea04e78dbe502b5e3d4e62a6c8" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7_macos-x64_bin.tar.gz", + "checksum": "93ed8d3f634c7bf79c372947d05f476c2f76fe2321190cfc3f1d12ba568c56b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_windows-x64_bin.msi", + "checksum": "59e69408676a47f54e85c071abccccbbff6b5f724649505ad4ce70c66df10892" + }, + "zip": { + "name": "sapmachine-jre-17.0.7_windows-x64_bin.zip", + "checksum": "248e02c322e6f7d0d5a3e1161e420c24b99dc656bc10550490ee4954d15ec75d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7/sapmachine-jre-17.0.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.7+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "7f75fcbc401edac34d81547ce95a2fbca39eebcb0365bc66bcf2e7a61f621a8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "57ea212e3dc1e23f13aed80ba3b28da757c91a5f47f209acd7452f92c0993ccc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.7_linux-x64_bin.tar.gz", + "checksum": "81f4856183c11afba763bafd6516120bc22eae32d603d8b732ae0b9612a065f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "a526fbd9e607a523da7c68318876b89a1939b49696379c5dfe73a02aa270af4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_macos-aarch64_bin.dmg", + "checksum": "e6f45a05fb122a29810d04b2faa8e2e45b6d984dd379af17ab271bf7fb6c0928" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "3fb8b3abd1480ef164e83c18c21f0125559c476a568f3c708aa61cde1a3b066b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_macos-x64_bin.dmg", + "checksum": "8f90541609c31f9cba30082d6f51881fcc20b92890b18dc6f292a6d9bc56e758" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.7_macos-x64_bin.tar.gz", + "checksum": "b3d028a994d5a824ad4900dd397d0edb1bc296d2e0bcbdce451fcd83d897518c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-17.0.7-ea.7_windows-x64_bin.zip", + "checksum": "32a5407aee629f27ef88258d02e832d51eb4ec8bb213880fb9dab3826e887a1b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jdk-17.0.7-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "3bf3cd4eea697659c8b5ac984cb0131444919572f24fb55779b933e4af997a00", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "5b0113127dbe5400663d80a6ced77d8480bbd4ec1832fde8ed5215b72f1de3b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.7_linux-x64_bin.tar.gz", + "checksum": "22d2946455940d63abbfa20b1a104c92b0d7ab044251cce7b4171d3fc460e88d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.7_linux-x64-musl_bin.tar.gz", + "checksum": "4201c126424595cacd9f78509c41b93a9c1c0ddf6d860269ee5702dfba25cd55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_macos-aarch64_bin.dmg", + "checksum": "14cb67fe8dd57e84eb5101c24ba01bf46828c995bef20a6cc5825c4ac378ef4a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "13c102758e215296ffc063190c124477b0b482ba9a232e22e066e70fc7f9be80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_macos-x64_bin.dmg", + "checksum": "615c2e73e64a39eec7446e244411cf945cb8ffc0a6e5c3a1551dd7f3511e2fd5" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.7_macos-x64_bin.tar.gz", + "checksum": "a3fdad31c36ff35855140b6726c7361daf118aaa022743c1435d4c4832419617", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-17.0.7-ea.7_windows-x64_bin.zip", + "checksum": "8b70f724a4e06936a527cc0abeeea8c1ea67f18a05525f7382ef1df9eaff6eb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B7/sapmachine-jre-17.0.7-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.7+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "446f59b9500430a00b08498b3c63ecbbb83eef2a032554a6fc0c73e05f91b137", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "9dd43ff6523eda76167e9bd3f9010f70abe7589a10559fa5b76a5ad1bcbfb002", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.6_linux-x64_bin.tar.gz", + "checksum": "a4485690f5c4293ca54d63a950989d5a68240d6e002bd3d6c102b375185fb059", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "ca62c204c0a98774eff03accf163db2b53e98c672189fc30f4bd3ec026d40ec2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_macos-aarch64_bin.dmg", + "checksum": "f276db8ce596fbd02fef5003cd7411a7c7ef8a95336f6f54c874da199aee4411" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "e870aa0f39ba40de133d65b413a8bc4fc2419013314b16d4afacc1ebc493a432", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_macos-x64_bin.dmg", + "checksum": "4bc66440ff518180e2a35525cc85151115c6fcf5d47cd1f103b0cd834fba1441" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.6_macos-x64_bin.tar.gz", + "checksum": "7e916f2a160611dc1312e90b7fb76d79ceb9bf636ad85fafb20b0640f9bbe3ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.7-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_windows-x64_bin.msi", + "checksum": "2e216741e8be74dcc4d845a8e886785a4e9de1575e10e33e939ccec1dd773b06" + }, + "zip": { + "name": "sapmachine-jdk-17.0.7-ea.6_windows-x64_bin.zip", + "checksum": "62cccc1bef290aeb48fe46d5a20241e2fb047a2e79d8c25182670eaa53e1d5ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jdk-17.0.7-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "6076918f7687c6ff2ca1bf5479f654f8e1d4dbe7ac4f744638dbccb6f31ad7f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "5e5306f4fa20b16cafa5f2f933ee36a7f9587da2ade71a9fabe0149370d705e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.6_linux-x64_bin.tar.gz", + "checksum": "23e2386f2692cf51d37fc70a9495fea9080206aabcabd206c0ac5c18541374d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "81e2ede87d09441f4bf5570cd551eb9e4ecce8cd0cd8c119c54afcb4eaabaf22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_macos-aarch64_bin.dmg", + "checksum": "8355170713afff7ba6db901351619e798d70a3e254b2521365b0c9b82570f03d" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "5d747b219d11bf95837dbdc8e15623a41d91e611e12e15eaf7d2f51a5190cf75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_macos-x64_bin.dmg", + "checksum": "0f58cbbed9c4b323a61c1d0ab4a2a211112b3605b52bd689c69792de55e49b55" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.6_macos-x64_bin.tar.gz", + "checksum": "e76e308842ba86e8fdeda36d4ade0cb1fed140cb6834da142d6df383764a18a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.7-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_windows-x64_bin.msi", + "checksum": "34760475187c03cb6739dfa5aa2905234ccd86bd7f2ff1dec1f4d8408830c6af" + }, + "zip": { + "name": "sapmachine-jre-17.0.7-ea.6_windows-x64_bin.zip", + "checksum": "9e5eccf1e9d643b38b100b282c6d75c11fdbd33190a77aec2975bcf8bfc00bf5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B6/sapmachine-jre-17.0.7-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.7+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "08d2f0ef0cdf5e071990147a986eaa8558df9f763560b23975c6e7dd0374ccd7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0114729a9180be8dbf41efb89b4099cf85d630e4033678677a9c315fb91583d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.5_linux-x64_bin.tar.gz", + "checksum": "84fc1c22d161bb8044e8ad1c4acd4633482c7ac1631d10db8490d360943abc78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "8769e65a835512feba5021d7a8bbf60555be3b678efc37e3e5194f32acbe3b4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_macos-aarch64_bin.dmg", + "checksum": "35df4711dc284c2f66a90124c4ee3ebdf5496d446535618eeb7a99b285f617c7" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "afc0cb0b898c5d0480bed27b7410010fc1d9e9cdb89ccc1b8163b525e8476aaa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_macos-x64_bin.dmg", + "checksum": "17cf8294bc866e7a22c099dfcf5059e8f6a053146e3efcb07150220036d0d07a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.5_macos-x64_bin.tar.gz", + "checksum": "2abc983e1979b11388bddfb6368987275c7b197e20fa0b8fe317e912667ebad1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.7-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_windows-x64_bin.msi", + "checksum": "9ff5a21fa6db40a928611d337d6673c33ab57ce1549efca607f205ebb437ffde" + }, + "zip": { + "name": "sapmachine-jdk-17.0.7-ea.5_windows-x64_bin.zip", + "checksum": "2098abbbd80d181432ca11cc0879ea39a595f5ae19cb66f04e46a9bd2f63dd43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jdk-17.0.7-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "e77961dd6448a88cb3c2fee105082a6ffa75cef26da7b3c863b7c6f32ca3d905", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "f9322fb4b71d61c1bd5222dd9cd6efcc013652f83828ffb2051c473b5049632f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.5_linux-x64_bin.tar.gz", + "checksum": "b1f8335a0e3f440d8d973eb94c28d42de0ab47035c65f01b109d4507b3c17c85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "97efca71fb9aa7f755bbc6b8eee204b184f0e0f50648752555b9dc672266ef71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_macos-aarch64_bin.dmg", + "checksum": "c06da99b6691ba65be64ef54ddb69263a47547af98387e13befa4aa54f47d1de" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "ffdc429db0c0f50ce4409efe6f182be725408e34a2e51854d080d3f75346759d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_macos-x64_bin.dmg", + "checksum": "9064f81bfdb09ae2e31de0fbbad535d5beb2d968327af1f62691913291b4f6e2" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.5_macos-x64_bin.tar.gz", + "checksum": "f41f543987000b0afff170d69e87c3cf9994121b802e365fdbf3077ea00f4fdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.7-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_windows-x64_bin.msi", + "checksum": "1e444fdc8b467c9f14ff3283bf574e2cc167d57fc499aac19b0ffbdb1963bf6f" + }, + "zip": { + "name": "sapmachine-jre-17.0.7-ea.5_windows-x64_bin.zip", + "checksum": "5ca68529ecd4bb05a9ec43c6884e249c6051979bb3fb7b85b81c5489f6e40bcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B5/sapmachine-jre-17.0.7-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.7+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "d74bb85c21d392e6ba1e609b2bd9b7966b5a9c648613edae88484fb669d8948b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "2fabd1c4e461030570bf3d2481de036df5ec745f57a41b37d20aa0b8534be3d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.4_linux-x64_bin.tar.gz", + "checksum": "719c3f771c6fa6f7d8d6168235352c8c1557ccfad729866d4dfc2e558c67996c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "802ce0bab76b6c3fd601039a47eb80ec094e2d0ad866648051ff4b0c96e8db72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_macos-aarch64_bin.dmg", + "checksum": "0137702c9ae93ec5d6397445bba4c4b212e3c556f8b9d0d237c7a8e647034de9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "666fbd2e305f743d91573a57b5e25d1d51764f771540da0bfe86fa725fe6ef53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_macos-x64_bin.dmg", + "checksum": "9846e71bdc9cdc73e2a946be80c2ed0015cfdbc6b6025e92da41aa9d81a627f7" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.4_macos-x64_bin.tar.gz", + "checksum": "16fc9fadd0149af574b8c71c1987c8f0861648779bc6babdc555b42aff64c1bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.7-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_windows-x64_bin.msi", + "checksum": "1744a1ca01606b58eb8d9ebe8a7429a140a13816273b68c88c63a643764bd746" + }, + "zip": { + "name": "sapmachine-jdk-17.0.7-ea.4_windows-x64_bin.zip", + "checksum": "1d348ece8a6c907110e0d92431ca083618748c27e7fd9b5b62e06ffe4bcb4ce9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jdk-17.0.7-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "2ab61f48e2a8161eaaf86d027c6c6f995014dc492f06442d8233e7a50072a2ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "2d087debe9b54fc9e2ca3888e474edd25ce42d49c0b7161441397a319792840f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.4_linux-x64_bin.tar.gz", + "checksum": "17c9b62fdd0436b98f8a7bf81d97818d96e1498e3fd1b6da8c03c3aff5f8a733", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.4_linux-x64-musl_bin.tar.gz", + "checksum": "4b7dd41580951ba6517a16c7612e089374237b339d30809c7c35fc67e060d59f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_macos-aarch64_bin.dmg", + "checksum": "68e44bac84e9451425611c98bb2b6d55639eef0c3a62db25fc109aadf30fa3ff" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "3eead8164d4907a80f7d3cfcbf8decb0552e8a027e07250c6771e9e82e8cf533", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_macos-x64_bin.dmg", + "checksum": "5d06744d1ffb91f2654008e49e298b5dc118c867345326ea969cc2ee5722f891" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.4_macos-x64_bin.tar.gz", + "checksum": "d4634c88ea1b8afe59f787149c6e7e6ea1bcc666c0a2057a62dfd7c65152756f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.7-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_windows-x64_bin.msi", + "checksum": "2383b0c417042533e403af9028334cc48fe3e29710ea78198cd679ac17b33ecc" + }, + "zip": { + "name": "sapmachine-jre-17.0.7-ea.4_windows-x64_bin.zip", + "checksum": "dfdb970ae4daadbb800680e9761e8481c97b4ad0185942f3343ceeceba3e186e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B4/sapmachine-jre-17.0.7-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.7+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "6db425206ba9e5e06e40b839d5172fd9418fc00f5488fe5943c13e6412f55ef7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "dc9b058a646e84c0f980d88e94f8714ff81edaf9dd5dd3171f5fbe0a669a1bcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.3_linux-x64_bin.tar.gz", + "checksum": "04b70eddd0002ca8b70046a90b86b7d48b8aa217f5aca02234525a7ae95f0e36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "effaea751e77b34695b9c35400de09d246b770c25942685e31e8ff2a0d6471d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_macos-aarch64_bin.dmg", + "checksum": "d6d79eaf77c95c5a851c32770ef5e54876b83c0458da33bc9f1e1709b247d17c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "5671b2047c51e25a83ccb9174fe6236ddbef9f359ef9a5d53ab8e27cfb8d71d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_macos-x64_bin.dmg", + "checksum": "3ca707e1792d0aa1f18c8f1a8afee9116ca8e44b4b80f965780e900bd62161c1" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.3_macos-x64_bin.tar.gz", + "checksum": "cc2f3b5c1fe09df3e50b4a4ce9b7f6f3fec4db43cdb9b6a82bb4fd7e122adbb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.7-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_windows-x64_bin.msi", + "checksum": "4cecf71be15b9caa3704ac046b9a7ea5d93aa6c69271969255b93b2d500bd4bb" + }, + "zip": { + "name": "sapmachine-jdk-17.0.7-ea.3_windows-x64_bin.zip", + "checksum": "ef83e811ca26fe160e57e29e67cc944f222ce713d44655eb6dcdf45d89132d7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jdk-17.0.7-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "79f20c69b27471c3183b371e21b8e68b2f778c44bf748f845c7649c6fce0dadf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "71420d0ab15c01f10f3c0d2daebb680b9abedc6f210bb68a786196639971045b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.3_linux-x64_bin.tar.gz", + "checksum": "7efee1239296acd41a2067569c24cc56d8197320d441c894de2cad3ff8efa2e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "8b3ac6f02e3a85ed603639c1c70419caa2967d5a7dd70cd089b207ee17e78ef0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_macos-aarch64_bin.dmg", + "checksum": "9fa537e2dd602ddc654fe27ed10b1f8152309103133a05c7b7eebb89a4e62916" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "8909a799c1929f149f521712691cb6098a16d875e039c58dad6a102a234c4b9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_macos-x64_bin.dmg", + "checksum": "540f622558477417738ee7842e06413ef9c58c09643ff55027dee8c37ebe7469" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.3_macos-x64_bin.tar.gz", + "checksum": "9be745953e704988d9d8fbd4c2ea064af3b55019f07b7ad760a72cf444278c71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.7-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_windows-x64_bin.msi", + "checksum": "6bedcf2582bbc33280cbfe1442882883dc6c08d5194ef71adad682c148e1e015" + }, + "zip": { + "name": "sapmachine-jre-17.0.7-ea.3_windows-x64_bin.zip", + "checksum": "49f81360af6c56804fc5e4237a0e122e726b19f7412cdd19a03fd538b01d4017", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B3/sapmachine-jre-17.0.7-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.7+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "8d1cefbf0638d82c5c7cca267abdfd3ff6bd851cd58ae3416b3c2f1581e4af70", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "d914278f6d4c68a50aa207be6228262b0727e20a3709140ba5dbff370b66eb55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.2_linux-x64_bin.tar.gz", + "checksum": "00160ec05fa8c63cd2e95c919a905d17b9e255a9bb675abc0bc324944cef031d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "4f1335ef8c365be505c408c2480a34e07603687e06200550a1358a66bd56caef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_macos-aarch64_bin.dmg", + "checksum": "c5657984920ace8fb5d47ede0378c78d051eb1676f179938d323f30e74531f6a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "da7f3771d5e0764efd2962d07bdce438869109fbada6c3f81d6c752707a403f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_macos-x64_bin.dmg", + "checksum": "43fd4449de79b334106683767fb428f7fff7dc35352fd85aa64e5b0709045d00" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.2_macos-x64_bin.tar.gz", + "checksum": "8259c4f809ee060d65aacb9249169bf843c0c7681a27a1c3bd1b45fb923ae43f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.7-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_windows-x64_bin.msi", + "checksum": "fe27bc8c583ca7cad861ab9d5a7eb1a4d39d8c610e0dce6ac0ce25df2ca0d2e6" + }, + "zip": { + "name": "sapmachine-jdk-17.0.7-ea.2_windows-x64_bin.zip", + "checksum": "a37dace165874edfc139597fa6cb60e1977cc4259b1118bdf3fd92171175be48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jdk-17.0.7-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "d513cd782e6c149a692339ba5e23f13e387b4fb23bc7dc6c469c0c8bf8d464c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "594e61f9514c8ebf79b4377251fc3adc1024d838b0d57da02e33e0cec0184cac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.2_linux-x64_bin.tar.gz", + "checksum": "830ecedda817367ea39a71e2bfdcbb9bd6ae555e73696a2b7e9b2ee5a63991e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "a2e611506e159de077c4a542898dbf71bbc64c659a0631416ed3b4183717a9fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_macos-aarch64_bin.dmg", + "checksum": "a6ffd11bd304877795a0cad409aaadf31b0071e98a34484238bc39051f76a5d6" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "f61365dc2cddb25275041d669c263d8dea26b6cbc83a917997251047a8488158", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_macos-x64_bin.dmg", + "checksum": "b8ebd7952e9ecf2d47b8696bca3c150d1b997418cb04b63700795d1aac6cc1d6" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.2_macos-x64_bin.tar.gz", + "checksum": "b32bd49e267925639143b4ed6d33cecb1421b06e49f09025f7fd18841efbf5af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.7-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_windows-x64_bin.msi", + "checksum": "82cb83c72933b42f138881b239f9af83665b01c5231444fef72c4d9fd47ce37b" + }, + "zip": { + "name": "sapmachine-jre-17.0.7-ea.2_windows-x64_bin.zip", + "checksum": "829e3e1000f05af0e47bc2b7a50bb93d2d4ddfd68152e51bf8bb98240646f065", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B2/sapmachine-jre-17.0.7-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.7+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.7%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "d305f6b1508a86af5596d7b3e021bb0b3b215a4a896e7e074235700e20d81816", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "20cd507fe631b48e1e7718227ff1089e995629b7c1528778b7953f28ddf5db73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.1_linux-x64_bin.tar.gz", + "checksum": "2e118b8c05cebd4a3cef867b904ac9ba3df0e2cdfb147de1223124e665ede05e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "ecbf29ff9d4a502e922d1191132417c26aa431df0ae1c6ea60d5c6a1dcab4cb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_macos-aarch64_bin.dmg", + "checksum": "2eaa888ebfc1145f99ca31ef1d838ec45fc93fd569128f3689f9a3fb11f7ccdc" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "5b244ca93f090338a68e41798fb4e33bce327cb3743542bdf9910feb1e79d009", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.7-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_macos-x64_bin.dmg", + "checksum": "de43b60d73e60e821d3b9361758b4e075beff739652928f5d6c953fe067c422c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.7-ea.1_macos-x64_bin.tar.gz", + "checksum": "e35baa30a1589e622ce56dc5d18d98782dc9182a2333b797adbfa35581fbf1f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.7-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_windows-x64_bin.msi", + "checksum": "cc9c873b8606e189a32f2db055812825358eb2096c69d0b34886464406299823" + }, + "zip": { + "name": "sapmachine-jdk-17.0.7-ea.1_windows-x64_bin.zip", + "checksum": "952d336ee534ec2071e70844f974e7cda7c8303a18193a7759f55323588f0229", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jdk-17.0.7-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "9c747fccb8619d2e2639bee306beb3ed4fedf1053eaa68f37474f948eb65ed69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c7e7090d1f38647b478a3ffc0b55f2ad5dd48d6b363a01dd4fc8c30807737997", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.1_linux-x64_bin.tar.gz", + "checksum": "4bdc109271e5809fe154452d0b766f926c8017c29ca06069edfd2caf8927e581", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.7-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "9c2ce205fb746701c4be2ff14ba7410d9729228ec76e4cdb507638f81e1fa07c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_macos-aarch64_bin.dmg", + "checksum": "6e3f4e6d2256e614220fdf5f031f8be669d9a3c4d7910eb27bed011c57b06e8b" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "1916cd5128f296ce90a01093345c97245788767cefd402a4ba62fc06c601b613", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.7-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_macos-x64_bin.dmg", + "checksum": "330e9438197988778fd0f3df5fef0b6270764b764a368e70022b0481a4871581" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.7-ea.1_macos-x64_bin.tar.gz", + "checksum": "9e6e6e7a3b98df75155669f49e027c7e3adaf2c2cb2e58adabd31c308eea6e4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.7-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_windows-x64_bin.msi", + "checksum": "18a6c67f356a713b581b15dedb60e36b8904b12eedbe7e5184261efa05e74b44" + }, + "zip": { + "name": "sapmachine-jre-17.0.7-ea.1_windows-x64_bin.zip", + "checksum": "21a5fae1aa262d2f2801c807ad217997a30467c3e269dd40a2bc050310b302d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.7%2B1/sapmachine-jre-17.0.7-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.6": { + "sapmachine-17.0.6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6_linux-aarch64_bin.tar.gz", + "checksum": "15703d71e12ec1d43b827dc46bc63db687aa2c2455f6e699aa382837493204f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6_linux-ppc64le_bin.tar.gz", + "checksum": "ceee857ee5188af4b20e9e1fd87542cc44c11c365cde45fada51c7d85a17dea3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6_linux-x64_bin.tar.gz", + "checksum": "a9d61a0dc7260505bdeb626ed747c8503255a634884b5126b31e18965464d0f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-beta_linux-x64-musl_bin.tar.gz", + "checksum": "d1c1e1c1c973e6d17160b296f884e44d227cf9f60a4529fccf018cf5b4312ae6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_macos-aarch64_bin.dmg", + "checksum": "1c2695f97847bffefbec7c7dedd2be234219a42b44776a39712862e789e8039f" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6_macos-aarch64_bin.tar.gz", + "checksum": "31c7d36a8dfd4d0b14fcd82edeccb14be408128099dcdd41e89f0698f0882ac9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_macos-x64_bin.dmg", + "checksum": "b1e7c066692d56de7b1a5e945701a7094fe5031820df59db1a69dd13c165bae5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6_macos-x64_bin.tar.gz", + "checksum": "2332a717bb7e204b93fb017035a9ecca33ee440df652df2c3ab32ab76be4bcc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_windows-x64_bin.msi", + "checksum": "2d133b54ec96ae1fe3342c4e8e7d5404cf6a25bec5a7542645f71122505cc898" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6_windows-x64_bin.zip", + "checksum": "77cc1b941c25f82836b599c6b294b3b92178efc5ddc8feaa7ffd32cbc6b76d3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jdk-17.0.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6_linux-aarch64_bin.tar.gz", + "checksum": "9fb3b5afa2e527bd5095d251632e7282e76de88c904077fe8ec509df0a95ebee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6_linux-ppc64le_bin.tar.gz", + "checksum": "6aaaf58064519059b74c424c5b07e1385897f732f544876587a2ba5d74e8edcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6_linux-x64_bin.tar.gz", + "checksum": "2774ee35461af4ab60f197d5262ceba1eb5c82f7ce21c371e3c8cd62106b222b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-beta_linux-x64-musl_bin.tar.gz", + "checksum": "c1840a644f23a26632e35d9513ca970dd4ac7a96d8c5a7139e160413ce376090", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_macos-aarch64_bin.dmg", + "checksum": "18fed837409d8575e23296f95f05ca527451036b23f4c6d4d2ada982d5537100" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6_macos-aarch64_bin.tar.gz", + "checksum": "c29e6891eacddd2c2351dabce8c9db03e39795d063a5ddb4ba84e7eac25242a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_macos-x64_bin.dmg", + "checksum": "69707a7678a0bc87b791da3bd82d5ec33ae475cbe3235870d157c2eda705c4fb" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6_macos-x64_bin.tar.gz", + "checksum": "d259064b91a6bdaaddb7247a7c8c01b430c0dd3cde43170c36bf6f8b048a791f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_windows-x64_bin.msi", + "checksum": "1be56c3500d099a78073a36db40d26c3b65563c21d8fbe3908b6e4b148f40e06" + }, + "zip": { + "name": "sapmachine-jre-17.0.6_windows-x64_bin.zip", + "checksum": "59a987eed3a616f83e5a8d4236b7c92a5e6e1ea5c4b136d30609985ca8a959d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6/sapmachine-jre-17.0.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "4ac2293da069395a9871714aa3ab7c84b8204633f61420279c3a5a190726bc4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "40ca2b3bc567c1c006ba05d89dd98ad98e68cb5d89c4faa45afc7238a87ff62c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.9_linux-x64_bin.tar.gz", + "checksum": "c792fdd8b0f183e0ebefd10e5c6395a93ee351d178fd29c18c98a4ab1b0df2a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "d00816acb56196d31c1f18e1911f64579bfe749c1377cfe9020214fcc01c382e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_macos-aarch64_bin.dmg", + "checksum": "8ffbec25ac9df35cf1315b667349a484c99d596df17dc178b72cc8fdf0478205" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "b1e512c95502da7d26e5f1ad33a93958ada1112281e7d224ec7dc569f9499165", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_macos-x64_bin.dmg", + "checksum": "c3745eb0514dfbf07c922dd0275179133ccf3594efb4e0fbc057a729a78cefd9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.9_macos-x64_bin.tar.gz", + "checksum": "f80b5d301d871ef6bd7115d3cfff2820bb6ea6ee75820b3d98c3cf42551569fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_windows-x64_bin.msi", + "checksum": "e497092ea289bda173b1e8c09ceecdaad9de49489cf24f349a73f428d29c5ffb" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.9_windows-x64_bin.zip", + "checksum": "a8bfce0ae787dc695570769996f75c50c143f7e84b3ce7c709f2e3c9b2aaac3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jdk-17.0.6-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "37e995d8fd7d86681924da2fc01d3a42c451dc37fcfc76e222f54115be7a9130", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "ef1577b3bc5e6071c036c6e5bfd1481618e5dcf2a6bda1433299b603dfaaf08e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.9_linux-x64_bin.tar.gz", + "checksum": "bb3b388fdd79c5db3d6f236d3032d23bb5d8bf050644ac840212043a865227fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.9_linux-x64-musl_bin.tar.gz", + "checksum": "85248e79b296235bca2a8dec6c2fb6ab0e8add2b470bf639cfd81f25875adad1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-eabeta.9_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_macos-aarch64_bin.dmg", + "checksum": "bfca770acf4bb5c7c421c9890b4f1694f66ed94a62455067d60c225611d3f23e" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "af204ef9064d7e044898c089d961809492b5c528efd14d5cb524d0d593366e9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_macos-x64_bin.dmg", + "checksum": "e84ecc302d35f52d3261b16dbed2c3abfa10745533b733b42e47300c29c4b92b" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.9_macos-x64_bin.tar.gz", + "checksum": "2b52c93df1d1c6b572122ffc18e1779ca4c49e3df03ab27dbdeaee5324c1af92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_windows-x64_bin.msi", + "checksum": "003cc63c2555d1b1f187d91d8cdb2d95a59df4eb21c64ae2876ced86255a1ac2" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.9_windows-x64_bin.zip", + "checksum": "db0a941bbf45a4afb06e42e2e3b8bc8b87e8aacf9c611a4b3d9af94852c3dd99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B9/sapmachine-jre-17.0.6-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "bc6fd06782eee609401865d40d9c7dd05c45e8c95efa24181e47df76743041b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "c3b27398dfbaf0df751e7ebc45f93318bc31383d9503bceffbb75a26c27cb789", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.8_linux-x64_bin.tar.gz", + "checksum": "2641b042d2eaa27e37384e61b7d970a17de15550d8f640cddd3485cb2918a62d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "f38cd6a785937d3eed003e0930a51ac3b3949d75e75a6f04b2a057cb9ec26639", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_macos-aarch64_bin.dmg", + "checksum": "6d857d4ac4b2debc2e7d2ac13ab1de4dac944bda907d10cfb4093a9b7355511a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "94c7f93df03ec8fd3253731d9284b31b317f353af102bbaab1c3c54b35eb389f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_macos-x64_bin.dmg", + "checksum": "cfc01d30b6e5420ab22e1db89def3002662b96d7634e22d144134d3fa9632311" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.8_macos-x64_bin.tar.gz", + "checksum": "43e9a636b3c4d6fabd68c6596b89c478c0c8f674982dc6fc201d571fc4b64710", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_windows-x64_bin.msi", + "checksum": "be20873bab393ec938a3b74525ea2cfa6c21c21ba62e5331b2e1fdbf85a08ab9" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.8_windows-x64_bin.zip", + "checksum": "07a64d2089bfb9679d895204fa9a1758561a4cb684b0e90fdbd24d1d5409ba89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jdk-17.0.6-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "d273e0507efceff8947aa355ebbc84252610a5486b9615bf4d41d8105737e89b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "fc5a16030bd94c61b9412e49d8237916780303413f1eb398b3261519293db1e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.8_linux-x64_bin.tar.gz", + "checksum": "37aaa93f8abf1867947c9da3b0271effbfe08bf057cc90cd5a79c0f504ad9840", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "b9282d3a4857c36dd28d9e6b1464437ebc8cbe3a10d4c2ba0d4a7a34114916ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_macos-aarch64_bin.dmg", + "checksum": "a7a5d27b18f05df9d624204895f6c92cba96eb8ee76a2f69fef38de09cbcd4dd" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "8c76bd5026662e60a6387c022f6488399c1eddaf760b4ce31421a5a78cc9bf66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_macos-x64_bin.dmg", + "checksum": "7f5623492c5b987b284d55003d378b2bc6b3c8721499119b64dec74edd5ba15b" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.8_macos-x64_bin.tar.gz", + "checksum": "64689bd2dc63799efd47deaf33cff8658cb796f75459fac309bbac378b0f783d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_windows-x64_bin.msi", + "checksum": "83b00e734b6f91c80d684d0a62e22c20dbfce68d334f958d75e7eff1af773e26" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.8_windows-x64_bin.zip", + "checksum": "45bc636993bca89050ed1d593e3046002c6931b4d2f61206107b5e38620c7d17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B8/sapmachine-jre-17.0.6-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "faa6a8d0af75d68a4ae1c618b103c63523b26240190a99b2179737ffec899ae4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "a6bc8e1395bf9d8ab8aaa3ee3a626564d6cc20eedd7cb11745efd7a2445ce307", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.7_linux-x64_bin.tar.gz", + "checksum": "f992d50333b69795f9a96ebf01ae94bb035c7fd462bde654526fedb01a94f6bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "5f85c904ee0987f937080e8678c75b89fb966b4dc6c1b477479c7fb05d6009b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_macos-aarch64_bin.dmg", + "checksum": "445cf3adf4fa9c4b80b5fe1dec3a7adb0b7b1d9b81abdc820b8c52a292da18db" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "356ec7c10dd82730ab660ffb52a8f0179a57d4d10594e76c2d619554e66b0944", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_macos-x64_bin.dmg", + "checksum": "2c1372379139df25fa19fbebd3f4637009050e1b02726daa0927cc38f64ac20a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.7_macos-x64_bin.tar.gz", + "checksum": "60d320f02499b832e0ca97f4d3e7e239841bc02c2860f3f8f77d06fc4accd2b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_windows-x64_bin.msi", + "checksum": "9f1fc6ea66c624abf61cbf06caff9b076b2eedd55951d65ee0e9ba6f68d1c3b1" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.7_windows-x64_bin.zip", + "checksum": "1f530042975ff837c4c76c5c8b293e61a2f60e6b6e81659cdfebe87a9543ad05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jdk-17.0.6-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "a2ecddcbe2b9853494d9072a92bf68274d1ef7e1d3fe42b540bee6459c60d742", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "cd5e65514ae75084eb075925ba74d5f1d1b663fbff0e91f1d07719b9b4d1ed58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.7_linux-x64_bin.tar.gz", + "checksum": "a6793aba04569166533c3913af35056604f398b573176e8f77e3411dd7fb3eb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "0b0ea2719c87797c3aa8a973b4c76fa834abb632d22aab9ca5224fb31575ed02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_macos-aarch64_bin.dmg", + "checksum": "8f15c7e5ac3756a272c6c990100d8b9f1f7d936f5887f17cd6a8168a963e33da" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "3c036ea27e31c7dd439513cbaebedc0d63a3278ceda496cad5b8c18fb338ba3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_macos-x64_bin.dmg", + "checksum": "d66889bbc071d0497cbf5320c09d6917d36f9de549faca1d8c294cf88b9acdc3" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.7_macos-x64_bin.tar.gz", + "checksum": "f79a43018b47c5f31eacf39d007f2fd4374a75938de471abd46ca0ca52d9a609", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_windows-x64_bin.msi", + "checksum": "68a2d4c3086f0cbd2e9c787464aac12752dd592a0a57b16396e7dc299f0db8ea" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.7_windows-x64_bin.zip", + "checksum": "a0ab7eabd0e44064244c4497736dcf723145415f041e855f38ad90f361e6cfa9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B7/sapmachine-jre-17.0.6-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "2e616001b3fdf5974f9cdd8f7b33998860bd870e02361dd4b9669026c8d3c5e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d6760292c5dfa6430f4c91fcc114f3107b5e11371b7e6f058dff601261e67a24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.6_linux-x64_bin.tar.gz", + "checksum": "34ea722b3beffac04c0704c216726011e29c844f2c3f24197bc62c4ff8a1e6ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "1c222eae967e0eb0a24afafa962029f8f477008b167a4b15b5ea25d5fb8c982d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_macos-aarch64_bin.dmg", + "checksum": "847d4c2c2e5666ef92e9d7a2c48aec4744267c0ff7098ceadf31282cdb6da39d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "b5200e0fa415c2e660ddd1ae56717564a5eb7eb423de7a3cb24e85baf8666863", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_macos-x64_bin.dmg", + "checksum": "bceb509084eeedd42b94f8ce62a1820419018834307630167a8922b8356c0167" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.6_macos-x64_bin.tar.gz", + "checksum": "97b453c6452bce7b9fd10a95d54089378869b3882011c8085bb2fcdc7eff9ad9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_windows-x64_bin.msi", + "checksum": "164f0f6da345fd5bd777fdd4d751782a9bdbc85d45e6926c42e85df87854cffb" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.6_windows-x64_bin.zip", + "checksum": "6a3e9668c30ce87aa455a865140b351457ac37bbdb700dc9b86f9d376ebef4e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jdk-17.0.6-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "eed636708760fb030685d3403addaca3621220ec4c8ca056907529dae2d041d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "3ef485b5351c7f6b295f32bb821ce224a96832026488fe6a176ca26290f9cb23", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.6_linux-x64_bin.tar.gz", + "checksum": "229556821d98af2a053809d46a2a5158d78a7082448aa163528973736fb750df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "233cc8d941cfcc226cfaebacf2075dc2656f10f607b3dc0c736d483ac7dc9f42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_macos-aarch64_bin.dmg", + "checksum": "64cb7927d8c068aa4a51b93e435fe9af91f7022bbb8f341df931f9da77193f73" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "6b001d1bfb7274fd6e49525fc3fae9a0b920dd8f32b86d08ae190c5127130d4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_macos-x64_bin.dmg", + "checksum": "027609230d8230eb4fce0c53ad871717677bce466f53895699328113dccbea89" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.6_macos-x64_bin.tar.gz", + "checksum": "8de25022b2bc3604a2ce8bcfd2d6a0e3313d0b0f01cdac4d197419a7b4fc4ba9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_windows-x64_bin.msi", + "checksum": "857ee443d0fa35746f9011e97d23bc3a7afcf0954b76a2a292b878179e3830e0" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.6_windows-x64_bin.zip", + "checksum": "021f1eceecae6d44c95b58f195ec19e8acf15bcaa933289fb352e2a69726211b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B6/sapmachine-jre-17.0.6-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "7a2bfd40ee3d912ae5aeda19b8728c07485699d1e457649ee3e82954c61b250e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0ff3db4a3d5bfa75314aa214bdfc09be7081b1d91efa5e6fd9b93bc830866447", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.5_linux-x64_bin.tar.gz", + "checksum": "2555aaf2efe5ba5c808aa4b9626304242dfac9a3a984c990c2d5958a0ef22535", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "7eee279d0fac811bcfa469c865e6a338a5b0a5359767f5673dbb7e1cde09242a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_macos-aarch64_bin.dmg", + "checksum": "380d0ba3a40b9dd4a657b073f47ef94627a90136b6e6dea3b618ac42fffd9ed2" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "3cf66e8e674e07ea08e2a498aa94cf65eb49ff52ce144b87315109b1cdda9120", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_macos-x64_bin.dmg", + "checksum": "0bb566e5a41f410fae8de7d3cf20227707d84ba034df5d03a5f1e377877a2e45" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.5_macos-x64_bin.tar.gz", + "checksum": "fe1864ebcd91ca0814f75b700f16fddae0bf5fe91f2ebbd05ec407fb898d1b79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_windows-x64_bin.msi", + "checksum": "07b51fc72fd1a93082d7ec95aca2e789c6ecb9e3b81d09be44f4791f96eac3b3" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.5_windows-x64_bin.zip", + "checksum": "93123baef7398dda05c92cfbfbbfae0a731d57823fe9beaa6047f5b6222ee320", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jdk-17.0.6-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "2f6a59be357b663faea4f1f3a346052c2977eaafce3a3f54bc4d33a219f4f0d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "1aa75ef6864d790080abe2ec7ccc5178e3cf214fb794f6d926cc683d3897853f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.5_linux-x64_bin.tar.gz", + "checksum": "c12e4cea0714c04942087844ba6fd432567869a4926442a792ad084eb560b6bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "2c1514c367574850a2bb3df616095340fa3d050c8429aae07893f7a920680863", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_macos-aarch64_bin.dmg", + "checksum": "9354a5b58b71bb28f900e0ae452f4f1da3f40ca1843446ec4fab34c6c09df6be" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "d3b0af426a2b877bdfba9323e8eeb4c879d30b96f1637d57953e88aca0a6ea9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_macos-x64_bin.dmg", + "checksum": "f8a4a321d3fa2758aa5143f2486f07ffef5fe275b478b22225a73535881a0c31" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.5_macos-x64_bin.tar.gz", + "checksum": "7ee363396777baad63ce1325959292d88144f6110acfae3965749099ac494e23", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_windows-x64_bin.msi", + "checksum": "ed2387e8266e8370e28078a2af30c24b9cd4b7f8de3bceac1f86fa430c63a99c" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.5_windows-x64_bin.zip", + "checksum": "4e500428342be8ffa6ae7efcc150c4bd930e88e679b533a62c6c49a0edf7cfca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B5/sapmachine-jre-17.0.6-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "2ba12573ab8fca4df226a839e9245eb78a0dcb5b9f4c5c0853119ef09f8efa7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "6b9b701e5347ec838187bb0527edc688f252ef5c25925ea503ab3cd9dc1fe936", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.4_linux-x64_bin.tar.gz", + "checksum": "9944002a5712584648d396b351cb1cf001af3f34156f1d226dddd492b99f4fc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "1cd0d7d6469d9a48c0f84c9faaf393f82cf33e9e5db57755702e738f7492b681", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_macos-aarch64_bin.dmg", + "checksum": "0156f8a9de654443b156af50298b63325499a22e5df5907b85be662d3ab066b3" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "921ec80fd4046a41201a106033df5662e1b65877534811b4dceb0530a44bd329", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_macos-x64_bin.dmg", + "checksum": "8164f41ee3576b85fe4171c22385c9978ce5aefa5a377550580859f7f0dbb109" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.4_macos-x64_bin.tar.gz", + "checksum": "8d6bfb7181c97ad9872bfca26542e393a4466b46367eaa29fdcacb290d826106", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_windows-x64_bin.msi", + "checksum": "f2534ce3f0ea00854bc709ad5577f1cdbbb571eb48f6b43959fdda95a1f3e66d" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.4_windows-x64_bin.zip", + "checksum": "a820f5530a976dc51a541eb127f41d6f3861cf356cd8897c45058fb8c8504c9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jdk-17.0.6-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "4c67decca7c285ea2da51e65de9f83cf86903a556bdb059d3a87ba77ebc73029", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "12caada09dad5f9368c3c4b0b76a3fdd81001d26d9beedc73e44d3d7ae285bb5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.4_linux-x64_bin.tar.gz", + "checksum": "0dba666414cf340d8781d9079fa0adc00d18ce023a5539180556ea32c5156049", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "dbd9f93bc9a7023d0dc687a0d80674e94badf1f439899c8e2601f2373a5bb3b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_macos-aarch64_bin.dmg", + "checksum": "8a597490b2f5556a54d01507a05c009c0d159d890bce379f2a69f9b5a27f16b3" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "fbe3fd165feafceb158ebe8092d2242c30044470f8d6394996c9748ae2e7b7fc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_macos-x64_bin.dmg", + "checksum": "37f3e56e7e5e3dd1efa4ad3201bd743d149c1529246825dfa68214c1cafdbe86" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.4_macos-x64_bin.tar.gz", + "checksum": "ea94878809ea35f6034573c3c53f6539c61ffd5729b0d861f610390abe60d30b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_windows-x64_bin.msi", + "checksum": "4eaa63764afaf1fcfc699fe1b829e155737e83d9fe984fffdc1453df0198559d" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.4_windows-x64_bin.zip", + "checksum": "057847ed7777f8163cb0d382382216db541baa23b13c7cdbdbd5210b6bbe9d92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B4/sapmachine-jre-17.0.6-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "f8e3d4cbf89a488ba0790832376fed49e8f6dae0a463cabb310877e76481f463", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "35e89c188bd79ed43115ff773fdadcf4ffdb6c855b5fc010b2cfceb5c82b465d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.3_linux-x64_bin.tar.gz", + "checksum": "47d7a7fd15710aa375e99e53cd70ae6c669d78cd8a99ca6a56badeee959967e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.3_linux-x64-musl_bin.tar.gz", + "checksum": "ec06cdb6230248f7811929657c3bdb25287b181acc939cd175136b214844ad3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-eabeta.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_macos-aarch64_bin.dmg", + "checksum": "54e48c37af7a07df1244de49527678a82fdc097cb46c1b30d88010db0bd8d5a5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "55746066fac78c04576dc8efd654c7e5b39fbbaee2541f7006fe9431574e1036", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_macos-x64_bin.dmg", + "checksum": "7f8e7136401a6f3e4a96831771fa4f49d41d86c5c3e26ddcdab4af0255ffeb3c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.3_macos-x64_bin.tar.gz", + "checksum": "f1023ce8f3c170f76fe08139f7d9974796997f6378e4f53e4db4c703a0a829cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_windows-x64_bin.msi", + "checksum": "760557b62beee3cdd12b458413cef7df893df630305dada26d5481f7abdaf07f" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.3_windows-x64_bin.zip", + "checksum": "09773a8dbd083c4147df4808e864b52bb2c1fa134dba1379f43346abc42165a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jdk-17.0.6-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "9b6e20ef1e3cc51f1bbbf709301f502a762219b89e53b8733e0bab0033b0120d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "b0f39d6ece4d2d417980ba7195c3fc95df049f9a3aa21a6b88c31fd42d1049b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.3_linux-x64_bin.tar.gz", + "checksum": "12fb24efaa0039a4e1703230e3e9a89afd5b764859ba79b381c8cf5eb45e5974", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.3_linux-x64-musl_bin.tar.gz", + "checksum": "d3edb8a762ff27fb38f4c50765ace248d577592a0f33ae17991d7382692607da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-eabeta.3_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_macos-aarch64_bin.dmg", + "checksum": "3d20839f50584d27c80d9659079cd10619fe2e2ac4c29818883ae2d912498544" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "15ac2161f1c6c87946bca760e6904fa77048966d23bcd7b246f2d5f4e663fadc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_macos-x64_bin.dmg", + "checksum": "b7509b68b26b3c069b235d3708e10b52769d4c986c3a40e08692106d2cc920a7" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.3_macos-x64_bin.tar.gz", + "checksum": "d203f76c35ecb9346c11e985abde7df99a5eccbf9c61d6d5d6f05acc7280c9b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_windows-x64_bin.msi", + "checksum": "e89989eb5cdea8562ff844fda7b318ccd6266b7c69d7aedc36370315b675363c" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.3_windows-x64_bin.zip", + "checksum": "1215ee1b60b2ac9a6b8aa1f5064df157bfbc05969daac5c7a0f400203480ddf6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B3/sapmachine-jre-17.0.6-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "2e52a315952a7990358234c9cf80549d7eb23d73f7eb9e41ae54987aa7fbe3db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "54234ec79332653bb5db62cb518b0bd4af870ba3ee113455cdbda914083f18ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.2_linux-x64_bin.tar.gz", + "checksum": "4671d89c4c77ba48cabb7c2bfc8313c97de7625f495cb90c3407ef6bb06fbe2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.2_linux-x64-musl_bin.tar.gz", + "checksum": "1e217e538d70a256b27e67afaa73b0bfcc3f2a534e0d097aaf999a13638414e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-eabeta.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_macos-aarch64_bin.dmg", + "checksum": "96fb91e03d75f38e023d39c82c5f7d5dea8edbb083c23fa4e01ff53f4e5042ba" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "09ed1c4c22ecae0ffa9774689bdafbed7ebb3d42af7bea5222a03767533deb21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_macos-x64_bin.dmg", + "checksum": "92459064506dcb003990dcccaaf6ec3a5de54c7fab675c34ed36b6d1c2fc0125" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.2_macos-x64_bin.tar.gz", + "checksum": "9c339d2d4fd5f20dea869ff7936757a93c730200baf669f8c0b5d390939934a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_windows-x64_bin.msi", + "checksum": "4749fce86b41824a2ab466dc45f52b66ee3b1db75414d8f395a428e0ecfb3c8c" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.2_windows-x64_bin.zip", + "checksum": "46699e352811fc4011ad122ff245420ad148cd38138f2aa501c3844169ebcdb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jdk-17.0.6-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "74aedce5611d636af8ee32b5110a57519bc53a3257d270db6b676aa6d83f7ddb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "790952153ba0630e328823d9a943904d422c58f52f8242bc9a902a0f4fdc1fd2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.2_linux-x64_bin.tar.gz", + "checksum": "7b6f7894336cb88b0971c52505df205f5c6b7d5807e78f7334f9484ea22d6b68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.2_linux-x64-musl_bin.tar.gz", + "checksum": "757e99ee6774e1280478047c59374727c4914c2f76c51b4d7e8c3f9dadafe3df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-eabeta.2_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_macos-aarch64_bin.dmg", + "checksum": "cbc7d26ae7c2face5ba8cda3d72f145b018e3c3f65bb06abd9098b08529dd983" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "5cfcc1ca7574dad780b2f1c4ee71fc84524aa12cff36ec1a64379101b566ffc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_macos-x64_bin.dmg", + "checksum": "57144e86d283585649279595db3c89b80f88597236b53d892fde139963f4c2a6" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.2_macos-x64_bin.tar.gz", + "checksum": "fc5dce11002c848113e44966c2b03d19be1a46ced3fb6d126f16123888f23fb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_windows-x64_bin.msi", + "checksum": "09e067175792b3a40a65f0cbd9f84b202de1ae875bffaf7723d4a00c18681928" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.2_windows-x64_bin.zip", + "checksum": "faf894cc30f8d77d76a52ec609817f47609d35ad95bbd1ac984545130de01791", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B2/sapmachine-jre-17.0.6-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.6+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.6%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "bf91b91c7379411678a77b13a3b5951720d92a260578aeb21a88a0de02c81a30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "9e901b673d2700064263eddf85d8730723ece3cf311cabc8ee62ffb7f2852c1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.1_linux-x64_bin.tar.gz", + "checksum": "e69591c4c6a84a2c177c0775a88baf254fbc035716cf388a8818e677ae507f59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "622e25174c1aaf4e7fe354d67aed0d64498aebb41589693190ac56c08031ded7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_macos-aarch64_bin.dmg", + "checksum": "ad804835e6fbdaea69a2fce19df546acbd7d4afd706e5fd480337bcd038cb3b5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "f49f1cac7d4988178ec344dcd40284e0183f21bc3a38e398a384ea996832866c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.6-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_macos-x64_bin.dmg", + "checksum": "89ba7b36c7a3df64669a5dd2e9487d33ade22cb49e678946dd37089b31799fdd" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.6-ea.1_macos-x64_bin.tar.gz", + "checksum": "481e9ac0ff820fa788fb71edb4c086f8bcc73efb5e77c074d1ec279c37210b8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.6-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_windows-x64_bin.msi", + "checksum": "7f5eb18894c0fb30010347e6c377ca753efadf1ce991e0df62709aabec3ff560" + }, + "zip": { + "name": "sapmachine-jdk-17.0.6-ea.1_windows-x64_bin.zip", + "checksum": "e85f265c744d544098d185a40fb0944dbf727f677cc9674dfec2d20e8d6aa4b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jdk-17.0.6-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "6fa4a22414c0eb93efe49d41221f515b155dec187314725987e45f730595fe81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "719cc630eacdbe0cde2cb3f54b88633256b47d57400e66a42afe006d0ea22c18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.1_linux-x64_bin.tar.gz", + "checksum": "6581fca5b8957a9aacb500c6b82b030213930879c4c69c1abbee699d3a4ce0cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.6-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "26387f33c275055a84759389ea9af580e721efa76aac071c3fc0ed46e55f230a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_macos-aarch64_bin.dmg", + "checksum": "e60e770e2213288d045511a99735b49f8533154d1200ca5e73ecca11bc3851b4" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "2d9f978c9c2c5a0a0fe1ce6fa4e518efc6067519a57bd5209f5fc5a124f15ef0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.6-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_macos-x64_bin.dmg", + "checksum": "a03af9d11fe143ff58a4ff1fbe744a462e9f0b0de12d30df65c783b350ca43cf" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.6-ea.1_macos-x64_bin.tar.gz", + "checksum": "af80b4df173ec00a3f4240bfb641674dbf5150289c53d83c97587f1b3b2ea778", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.6-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_windows-x64_bin.msi", + "checksum": "1e865a1d9a40725a1bbd0abf677aacc2982f3f8ec2946ced806c82031bc6041e" + }, + "zip": { + "name": "sapmachine-jre-17.0.6-ea.1_windows-x64_bin.zip", + "checksum": "c82cb543b2ce446c50fa4b6d2e10f4279f45b68e57c0f3e61cb03f9cc13429bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.6%2B1/sapmachine-jre-17.0.6-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.5": { + "sapmachine-17.0.5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5_linux-aarch64_bin.tar.gz", + "checksum": "c0784ea43df77d4edf624e1f8e62987095e93ce86b1b497026b6a47011d56fa7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5_linux-ppc64le_bin.tar.gz", + "checksum": "a7069bc8907e4dbce866efb7aff0cc90b30552b8f0b08797f461d5599d2cdc35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5_linux-x64_bin.tar.gz", + "checksum": "910de7a2a045f6df52ef96573f2ab83fe9375417651b94a7c96cc30487d4357a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-beta_linux-x64-musl_bin.tar.gz", + "checksum": "6d9cf8a8957efcd8da139a37d1a91fef4b2e4dac43449794168358b5d3ed7917", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_macos-aarch64_bin.dmg", + "checksum": "69b0e647e8d3d0e0de84e5169a305b36b6059cfd77806dfabcbac5364ceccd76" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5_macos-aarch64_bin.tar.gz", + "checksum": "62325dd21f25bdb403e04dc3661241ac485d79444953aaeaf354b1be48040f93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_macos-x64_bin.dmg", + "checksum": "392f565a07eebb20f3483b7c5f0511224abffac6c0333d6689e74b6e7289a473" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5_macos-x64_bin.tar.gz", + "checksum": "ced97fe7eef75beede2a70e59263353c3862b05d20153d2381bd7e9fa3d3ebff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_windows-x64_bin.msi", + "checksum": "d019d731661bfab909ad0cc1fc5119f243f65ded63f2b0d7d15afc9eb587f56e" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5_windows-x64_bin.zip", + "checksum": "482ad4dc9a85d1a57e157f3d1ed60c9e8be23bea3b5e3ffd7190307daa74d690", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jdk-17.0.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5_linux-aarch64_bin.tar.gz", + "checksum": "7d28c07648b89798191f2bca3817491b9e5a88af674ca8298d57d803e5ef822e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5_linux-ppc64le_bin.tar.gz", + "checksum": "9aebd47cfa43f90f85598831517a34c9b5b623279e3f6dd44f7885be0580d088", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5_linux-x64_bin.tar.gz", + "checksum": "016bf2b709fb21c516264d975da041338e7da36a0bc17a1cf0543f3dec2c6940", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-beta_linux-x64-musl_bin.tar.gz", + "checksum": "f7c3369a595bb43b49263d94b7097e03128f1c473a73dd56ef42ada69e6829d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_macos-aarch64_bin.dmg", + "checksum": "5e992c3de79ef01da4f8f16e1ac6346ed686ea69afdbaabc62716e7d4c6b6c88" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5_macos-aarch64_bin.tar.gz", + "checksum": "b1e23c1d911ae78ac4184d0b360392ecab70046dba0f270ed3a548b208d09c03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_macos-x64_bin.dmg", + "checksum": "eb1c0952bb88cc6c75a40183f1bf0e30776776e1247004399e3a51ec775e7daf" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5_macos-x64_bin.tar.gz", + "checksum": "ceecae5c77bb1a56c1cd926aa918581af2db08785970228bcb873b7149e42d69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_windows-x64_bin.msi", + "checksum": "5835852da062bdb950f2c5245a32fcd69d8c50e11fdd8c735c2af6684e045bc7" + }, + "zip": { + "name": "sapmachine-jre-17.0.5_windows-x64_bin.zip", + "checksum": "d18796848ce78e41cc2242ca3664620ef41b4571fa6104272adbbc8e21429a57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5/sapmachine-jre-17.0.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "3408b6f72036ac92332949a408988585dccde6a06624e29604eff743979a4e84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "104e6d936942222cbefd9404cc4f1242414cbf7ddbd730bea99944cd59b730fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.8_linux-x64_bin.tar.gz", + "checksum": "853a598c6705ffc872c4d23c950df9bb450036b17202b3639e5dd3424bd66a03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "4eeaa922044044adec8523a911c5b690bd33e8350ca14628462003c41ee889a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_macos-aarch64_bin.dmg", + "checksum": "59bb299dcbd1bc1f5d0b2faeec2653fe891f8ad3b06493f0102c748281ad4427" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "2db96f3df4d1615386be5e52b3de02c9ba446f2e163a0432b3ce10faf9627bc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_macos-x64_bin.dmg", + "checksum": "905a00085f3ef9fdeca2bf66ac84585d219a7c9a768c15b46e5d21a1c8e1694a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.8_macos-x64_bin.tar.gz", + "checksum": "5a61b8c2b6b80fae2e6746162f5d9c6c97e4a6fe053044d81c9ff8473f2899e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_windows-x64_bin.msi", + "checksum": "bb69abda9cd1ccfdebd9a729d254a97fd9044d33b1b2cf9f9e71410d7c37f0d0" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.8_windows-x64_bin.zip", + "checksum": "e278530310fdb8d787fb90bf535a355f1b9921adf9855896086a2145ceaf3c80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jdk-17.0.5-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "037d94ee50508660df617c9b5401ff6ca305eec43239a8c197a944d841a2cae3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "6e3a10d0d6033ff24c080db2305ba600efe0b126bffdbd34226e7a77483b3df9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.8_linux-x64_bin.tar.gz", + "checksum": "349e7a1094724fa41763ccb2ebca4c4b2ec20021752b123e9b57ad67551e34d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "388439e8c3fc33c19b0c6b6256724fced9bf19a49335a896b25fd1051500fa51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_macos-aarch64_bin.dmg", + "checksum": "8324583b4a29fae0f675d879e82cd559c3a069f0c33de74c65e3d7f5f9e3f1a1" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "39edbb2ddd952284c974bff5148cf4fb309913d4cd8159d988ed2f82ec792cf0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_macos-x64_bin.dmg", + "checksum": "d681433d17d7b12dc17d60649a43e92fb6614b351ad88031d4d0120f244dc51c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.8_macos-x64_bin.tar.gz", + "checksum": "fdc5a3647a3b0a7facc49e6d1054999fcdca3cae8a97130ddfeb67b6de4ac3ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_windows-x64_bin.msi", + "checksum": "a5ab394752d0f8aec6fbda63853d8897bad50dd6627c8f1ddfb41401d45c76e2" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.8_windows-x64_bin.zip", + "checksum": "6997234e1e20a5853ede6db5d49944c622a28007e5aee5b152a1b37a44f3a4bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B8/sapmachine-jre-17.0.5-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "c0652c90d0ba879f2f3622c20bcb26b61bb320fa9e4f5394a3254fbbe11edcf7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "cb332eb331c4febffdbec3487541f65454285042033b53d2c9ebfce5386ad080", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.7_linux-x64_bin.tar.gz", + "checksum": "78bd4c2b8e043cd28a0bbec5085e684e22233fe4c8576efc5185a51295a4282f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "dd54019c754935036102d2e4aaa0d9888c7e3e4eb42822052aa7e021f99ebe40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_macos-aarch64_bin.dmg", + "checksum": "ff8a030d3c3ea023bf2a10e087b3edde871c5cd20c3669501085776c0651fbdc" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "7edf0728dadd26aef1dd6dfc6318f22283a97349196aea72707780ebbcf77134", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_macos-x64_bin.dmg", + "checksum": "4fc5e027a5c5f181c45fc3e2331f24feb71e25714c35a182753383d90a6ccec3" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.7_macos-x64_bin.tar.gz", + "checksum": "f1bb5ec7b9d0cc39fb0864f616d5b17c1996492839a386f544e40f6edfad90b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_windows-x64_bin.msi", + "checksum": "b300f7109bd0f2ba30798ac229f5c6bc0b4b505cc5071c4ccfb9d97b350be620" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.7_windows-x64_bin.zip", + "checksum": "938fa53eab82c2cc243131ea86424901b83951d8ef6321f062b0291a4585878d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jdk-17.0.5-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "2efddcd316f66c28fbc48ba7f26453fb71abdf1c6c9856d7c808550a19c05e3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "b60fffe166ddd5085b7c9966f01415308ef21c59bcb36457334d097652d39f0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.7_linux-x64_bin.tar.gz", + "checksum": "9271a6ff654f50424d936e77e79cb4469a502e8cd1e3151dcae493a89499d1a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-eabeta.7_linux-x64-musl_bin.tar.gz", + "checksum": "2ab27adbe7b2ad11799dcf100acb9d8d498776b24b1f2894ae5ff419f7779d71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-eabeta.7_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_macos-aarch64_bin.dmg", + "checksum": "a3b55ba1dfc4511279649dd525c75bc16486b207b5949b6ea580e13088cd1ce8" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "2ac59903620230d3e3241e28dc32981daded7afbcc4b5f29d7cf73ead2c71c13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_macos-x64_bin.dmg", + "checksum": "459d6c6d6f1e82900f3f34dd00fd62c54fb47ddd1aecda3b43a6664744629e83" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.7_macos-x64_bin.tar.gz", + "checksum": "bf9ee9de5233f8d2d3b00947ab6a62a3038a69355a99d4a5907d01aa22862cdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_windows-x64_bin.msi", + "checksum": "eea4a07bb3f28a2192a87797b13bf7777ae0a0058a96923316c265f261401132" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.7_windows-x64_bin.zip", + "checksum": "1569ef5c2639792f0376ed3f9740f4d032d8c960fec9cdecc3c04de7df6fe046", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B7/sapmachine-jre-17.0.5-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "d11a8bbd11998096ce6f3f6cefb2434a446f925354920d014a37cd64e9730a6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "4bf1bdfc2a2bd725ecd492aa8948670f70d739491eee222a140b3b6b0f997507", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.6_linux-x64_bin.tar.gz", + "checksum": "9c3fc20693b0889369365e1e1d34db5102b92a0b8d4a8b5a53902f2fd1829d02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "816947235c3755eb926dad9dda4dd17fd30e82f97f1b54ebb1e1473ecd339013", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_macos-aarch64_bin.dmg", + "checksum": "6e8012eb9ca78da00c56b2aaf41f3dae78bcdba44a8826bdfa32c6bab234910e" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "ea4ced79b352f7bcbcf204885404cb5640d1d67bb4dc8d29716b248c9405ebcd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_macos-x64_bin.dmg", + "checksum": "36f63cb20c57b595e1bf6419529f8fbcf71ee7a9dff3a67adbf25be6d26d75f5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.6_macos-x64_bin.tar.gz", + "checksum": "f8e8b2ed65cd2f064a21fda66158fac6bc88c0b837419d5ba576d7a28d1556f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_windows-x64_bin.msi", + "checksum": "d3f11dfddcbefd9a2ed7167dbe634536c77d6cd720122286e8eb3df4803b747d" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.6_windows-x64_bin.zip", + "checksum": "85bed86e829c513d7416ee8f896e4fab9588446f9745b5efb488e4a17bae7593", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jdk-17.0.5-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "732827c9891aa9e868b871ffa5e6925668b65013e80dbc5e3f751ca2ccbbb8f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "b60f6ef5c02f620af66b71de073b388b8564ec1b55ccb82712938cf59a84db82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.6_linux-x64_bin.tar.gz", + "checksum": "c5b6b0dbd8dd3cc1c479b78607a65327b30076348a8f5b27398adf151425e54c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-eabeta.6_linux-x64-musl_bin.tar.gz", + "checksum": "954647083ae7034995901d60af54410bf8403e422bc863dc8abba5cd580cbdf0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-eabeta.6_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_macos-aarch64_bin.dmg", + "checksum": "482b0038f93bc8dab5aa303f04779bd267a3a39b2401e258fa37a290b3a24520" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "70afca6b8cb785510ddf2add138266425cc47089be9af668c1ea8c83da386a97", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_macos-x64_bin.dmg", + "checksum": "d3e01e739d3e3142f7b5cc7487af331007368c9c8289f4bc8153c4c8c4efe2a8" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.6_macos-x64_bin.tar.gz", + "checksum": "d99f2eb140f022688f16517be32b99ecdb2e3812aa03eebbd54c9727628d4eb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_windows-x64_bin.msi", + "checksum": "d269fb4ec7b8acfb389f4aa7fee2f1f866ce8fe22482d96a4f08e08ff2a73349" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.6_windows-x64_bin.zip", + "checksum": "7b450d13247aebbbe3003f49800e663c4d2011da6acde913e17bd40511ebc1df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B6/sapmachine-jre-17.0.5-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "ab92c07df81d5c6c50c718c00965dabb28051faade6bb4aa134ca8d4e85c6a19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "b3ebb1e44924be4c492d7e11c9ef9340cd09974b4e29da9c5e194e6e3f2b65fc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.5_linux-x64_bin.tar.gz", + "checksum": "09f349d30c36fa681cea064e9b486c7c632cdd8dc70ca87ec7489b725f00025b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "118f497152f9e34f4eda10cb6739b127747b0b1566ba2023d518702fcfb39b86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_macos-aarch64_bin.dmg", + "checksum": "803c71c1a694954655a93d4a83be727022299d087daf035d4961c2b5e1a7e8e8" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "fe8df7938ba61bb30ab1ccb999920245ed971816030b334c466a3430af956001", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_macos-x64_bin.dmg", + "checksum": "9d31fabd3bf77f5731c63fdf76e9d859aab6fcd19e227113373d3903be858236" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.5_macos-x64_bin.tar.gz", + "checksum": "19c6231c7a665d8a99c1799496bd03fd98c3a2306b2a56f77328f72a3e7908c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_windows-x64_bin.msi", + "checksum": "0bd5a6131eb21ee2b808d6047e9ef785d457eefafee56de2f3b0a049d4b67d1e" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.5_windows-x64_bin.zip", + "checksum": "e978733ec35997e09365be73fca1979117ad1328aea99682c7a105188cf562a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jdk-17.0.5-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "050cb29c31716d5462584d4af1f6292ca137a490ac30328485560f5809982b65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "b05b1f0d2f21927fefb5809ea829f964a38ffa02bf7cb114657193b763b666df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.5_linux-x64_bin.tar.gz", + "checksum": "39bed37e6b9566603862218e825ef6a20031fc08c0fb769e2fb80e7fe9cc895d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-eabeta.5_linux-x64-musl_bin.tar.gz", + "checksum": "39ad0cd1a83d45c95d2f2dfe94b877a8eac354be18647031287b1ac1c1642d3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-eabeta.5_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_macos-aarch64_bin.dmg", + "checksum": "7d7f84f556b61069dd016e1399ed8945a4ac8631de6d911331a7efc4e7d0fd08" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "094bb1e092ddf69a160df689be2020fefea9caf70894e863291da9e51f5dd62f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_macos-x64_bin.dmg", + "checksum": "9de9e90646dc47b6292ce8def07236ab27e3cd811efd96db885b230c46061b98" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.5_macos-x64_bin.tar.gz", + "checksum": "ba6e8df4c8155e6cfeafbbaceea8f2b1177a3d2faf914ac3a2a3f334dae70061", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_windows-x64_bin.msi", + "checksum": "c78628f0c45cea5efb4a798fabe4fdf3a32a6883f5ec166a75b5420bb68bd6cf" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.5_windows-x64_bin.zip", + "checksum": "4b0158313d4cc96f8a264aee0f153319263d4cd062990aca134ee62cddb07e25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B5/sapmachine-jre-17.0.5-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "d636f9b26f123d3402b6a6b219ca6b35111acb0487fe4703c2bbae6f4e254d94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "df288092b1e9ae916f77504ad3dd2ae8e3ac42d47982bb770c78f7fa5e7eed15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.4_linux-x64_bin.tar.gz", + "checksum": "f3276a5a4e0518b78fa2e05b014e69883f1ae0a4c03414170d0be4fd9dea72a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "128b8bc794a3584c1c2e71bba976d9ae4f4b9f9bb6beec9afc7c81eafabb0c7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_macos-aarch64_bin.dmg", + "checksum": "49920de7a6a688c05dab7e36952f19260ce4b7b90e532be35d002dfd7cf2e85c" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "8194a2bd2f9a309459526b8b6d9f56a62b409424eacb7203b8ea86825a69629b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_macos-x64_bin.dmg", + "checksum": "b142994758215da129e93853044beb238b5fd7c67be5c37e1ea6253d6498e828" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.4_macos-x64_bin.tar.gz", + "checksum": "59de6a46d659aed73f2748c1dbbd1f7e0df4e6879a089752211596ea4f0c770b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_windows-x64_bin.msi", + "checksum": "1b88a896e7633e7f83a03a7fd14300c4a41b988e574b42d870490ffc5beb5eb0" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.4_windows-x64_bin.zip", + "checksum": "159192a31c1c2cae99a752fab1b647393c37309f3b201520c48089d5f7f2f668", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jdk-17.0.5-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "8ea6b604c694ad8ff62f23585df70b8788a27ed0c0cf97b35b3df538dfb014f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "52a84d96f2474fa97b2a12b8a7ab4d33db2c56ee7c221354dfe8e59c0bfd23cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.4_linux-x64_bin.tar.gz", + "checksum": "9e151a132e5d926d651f8675efe8b7f0444c0ebaf52f1a84f57da5283a425ef0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-eabeta.4_linux-x64-musl_bin.tar.gz", + "checksum": "8b2f039ff38d604a87fa33f01f2431382dfd6d1d10d67571f57377be829aacc5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-eabeta.4_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_macos-aarch64_bin.dmg", + "checksum": "5c939aa760570a65284906ca79c01ad7e62abcbcc683d13d201e9d51ae0645fc" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "04b86a9d824930b88eefa5152cd1b4ac498a2ba257ec8d964a7b9091d50e194c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_macos-x64_bin.dmg", + "checksum": "be75ab776660dd05257a9aedf9cb8604f2064aff419e9d9f3aedaee60ff1d04f" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.4_macos-x64_bin.tar.gz", + "checksum": "25230bcdb75670169efdee6220cfe0af5eab55ee37ae46eccf28544e02359391", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_windows-x64_bin.msi", + "checksum": "45f289cdcd16c60abd162ef843b333035bb8f421b9ebf97ab3119f4b9704ce34" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.4_windows-x64_bin.zip", + "checksum": "19884cb153ef1dfaa6c148fda5e1c31da3f661621f30e0a74af34e1753d0cfdd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B4/sapmachine-jre-17.0.5-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "34a16ee0e606fddc5919b61356b1dd9f317392440e10f437a16ea01f7c9f0ddb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2b244be6304c79d175ed63ae40031d9eff3946e5b791ce0fc2f4b949aa37321d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.3_linux-x64_bin.tar.gz", + "checksum": "638bdd02d71846e5cbc982016aa38e301f4742a2d09ee17224370d97b71ec2ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_macos-aarch64_bin.dmg", + "checksum": "7c1f0815e1d27c83f1b64069b314912fc78b0d80db3144873bdcf492ece0c24d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "90c3f34978c678b000f1c9ec80a4c0c3a7a6645fe9c43c93eb0a20e4aaf7d60e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_macos-x64_bin.dmg", + "checksum": "a4a57372148e6155d191ef1a24a2438f4ca689efc7dfcc58d8f86e2fbcdae19a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.3_macos-x64_bin.tar.gz", + "checksum": "db72591e8d5200a891b8e91bc2e160ab071dc14bbb5429b0f1d6ef68d8624dab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_windows-x64_bin.msi", + "checksum": "ce7e0a65cd973b8a1e7f71ea30e63f7020e985f88dce3fb06caee64e4f3c18dc" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.3_windows-x64_bin.zip", + "checksum": "d64c1793136474d90acb6a0beb1f8f4e94ea3dab451bc7230eea84240c243c97", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jdk-17.0.5-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "28194e7ba2496bf515518e7f655f4b2d17544b94f09f350c7fdbbc825d5a6790", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "34c96417468ee9ad2fd6b1f8c68701e230915f8a6b171bcde884e9d63e33c4c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.3_linux-x64_bin.tar.gz", + "checksum": "5dba59af890c1743cd3f71ed4b2c1a1a924d471f52910c00453c476dfe32967d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_macos-aarch64_bin.dmg", + "checksum": "3bc342b6cebd1f36d11a137c9b565a27b0afd6b29a603de5e0f1d515d0d73792" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "db50a885612717e110cfa37781257214e5b6e351fc0a08d9cd89e7b7cd42670e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_macos-x64_bin.dmg", + "checksum": "278a053835cdadb861ca08a8476e42cbab8e4c7023c3cf16b03bb6b6836abe89" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.3_macos-x64_bin.tar.gz", + "checksum": "7a965c254c7b43a677709c883c5b6d9bfebc45ad453498487cd06eacb7e2960a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_windows-x64_bin.msi", + "checksum": "885938edf20ad53ca02baaf93e8884e58c6e28ae48b6c23a6235d2d3a94e192f" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.3_windows-x64_bin.zip", + "checksum": "f27f8084adbcaa5a63d1bdf4654ca8971a7e728b903569944c44b8a6e2facd0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B3/sapmachine-jre-17.0.5-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "e9b62ba9f288ce3c536056bdef43e657a66416b5608b0840954c1c586e8c4de2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "d432026489c0d83f099c2217b6d9213f3a25c280055fe04250be4ae7694ca93c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.2_linux-x64_bin.tar.gz", + "checksum": "856558ed13f5bd42fb549ea20f5a6439aa14ef79f36c88cd32597d170f0267a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_macos-aarch64_bin.dmg", + "checksum": "371c80df0b993a44f90d7134b82ff911ede714254e352dcc750449fd31e34620" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "633169eafb63fd9a7c51c9ca8e7f966eb8cc35b2169d4103871cfab1f13fa79f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_macos-x64_bin.dmg", + "checksum": "3b5be20580e959f6b23e34bc49b6531e653217536c0a3aeb05f4026e426dd324" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.2_macos-x64_bin.tar.gz", + "checksum": "cb3920b8d886f7aed59b3463003cf29c27d09a327882fdb2edc19afa2d2aecbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_windows-x64_bin.msi", + "checksum": "bd6971d6a6a8c43744bc4848681eb397f0532ff61e00035d20547beda2a83bc9" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.2_windows-x64_bin.zip", + "checksum": "375e2fd4974189a1f9e512080606bf82043e03f775566f1a4c0f959670e531c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jdk-17.0.5-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "81c1845ef1ffe8cff54913157c62eb799952d89a7b386c8be44345e21e223154", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "559954fd27d25dd23758ba9d98dafa1641d9853949182287a2afceb5052b1bc5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.2_linux-x64_bin.tar.gz", + "checksum": "31aefff5bb83e3746b1105b22ddd7936ec68156f174bc7897be2cf131c79bef9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_macos-aarch64_bin.dmg", + "checksum": "41ac4e96d0d66aa5e8291edff3fb0a4623ceb07953b3af1da262a40617937c0c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "b833ebb4c707bf8364486a801d5691b058c0bbb16fc6999de08a10d4361cfe7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_macos-x64_bin.dmg", + "checksum": "3d02e842f4bb0c7f9c1be925f45e56c1662f7f41a3875ea7b2a0c8ba291ba185" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.2_macos-x64_bin.tar.gz", + "checksum": "459f284248bb7f56afbf3b574ebbf320362b1cd3aa42752ee4d1a19bb9dda277", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_windows-x64_bin.msi", + "checksum": "21a3c959e8129dff71f42132c4fc3e5bb755e7e6be1148b4e203a58cec744db2" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.2_windows-x64_bin.zip", + "checksum": "26f9cb8f2380539286b7e6b107b6aa2af4f10c1714d5c79e76392fa6e90f4282", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B2/sapmachine-jre-17.0.5-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.5+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.5%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "a280c0931a809119920ffc28fa0a76a131ba5bda6cbaea902fe42f6fee477abf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "079667df1024dab0a722de0f629dbe8d96c1d90f9a097afbd4c0b19f16e68c8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.1_linux-x64_bin.tar.gz", + "checksum": "1417fa4d570bfda2ef3226fd39bdd1d1254ecaa99eee541a00670cc4295c4ae6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_macos-aarch64_bin.dmg", + "checksum": "2e45aa68894c6d1fc5c7788fdf4623814a01534c18d3e49340e2997e1c8fdcea" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "0df03063a4ae3943f78a970844285c7eadb315d9772c1aa8701d4d2cb06cde51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.5-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_macos-x64_bin.dmg", + "checksum": "6b557cd08daadaa4df66363353bc24920c4f8a9902f53e5ca783e62a371b4e8a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.5-ea.1_macos-x64_bin.tar.gz", + "checksum": "6ae32a68ee68a5c09724dcb5a62ed90ed9cbb6931565286d650cc10a45c91c9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.5-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_windows-x64_bin.msi", + "checksum": "ac9402b68e77ced365ecf9c0f5b472b790ce09db70f32616e557364b63f1f06a" + }, + "zip": { + "name": "sapmachine-jdk-17.0.5-ea.1_windows-x64_bin.zip", + "checksum": "dadcb4c70e4d899740a46b3d212eeb598314c5e0cebd08c827d03bb6671dda16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jdk-17.0.5-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "c65439a7766405d7ac770e432ec4c43da7d9b05dbb4c35f7c13344a1d151b953", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "e55162d255a31b9ffc9b4bec96d2a39be4e79734f3dc8a1277fafcee8248bded", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.1_linux-x64_bin.tar.gz", + "checksum": "2670eb22a19c69676cf7ee2c3472158e0b7fb009eb4064f1b6a2856b0b1750a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_macos-aarch64_bin.dmg", + "checksum": "642826e69a108cfadcd7740e9742fa7b6b4d88d92f47e43cc77d5e96ea2755e7" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "d3fe4b40950504fd232eee63b1878ec2a4365335bc2ab2ebbb6330dc2303e775", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.5-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_macos-x64_bin.dmg", + "checksum": "28032133b26d4ac893e8289645fa7c6847071800593f5a220107f66f78616623" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.5-ea.1_macos-x64_bin.tar.gz", + "checksum": "56142f7ef743255d1e2829a5a70eb9d5f1a94ee437893678a884368d4fbbc78f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.5-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_windows-x64_bin.msi", + "checksum": "a4635313a380d1ed8c0a6381ddd9feb3ef05cd06034de42403cf7c356641100a" + }, + "zip": { + "name": "sapmachine-jre-17.0.5-ea.1_windows-x64_bin.zip", + "checksum": "db44ab09d6136f1284ebc8c97482ce8620e1e68a143f0a6c376bbdd710e594d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.5%2B1/sapmachine-jre-17.0.5-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.4.1": { + "sapmachine-17.0.4.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1_linux-aarch64_bin.tar.gz", + "checksum": "ce74118ddf73310935e96c52c4590848c7fd80230132b5d7b40cbdf51cd9893b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1_linux-ppc64le_bin.tar.gz", + "checksum": "9c2846fedbf169b48ee9eaf79b5e3a06c4771e360529262e5a0446c7adb3adfc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1_linux-x64_bin.tar.gz", + "checksum": "f3325f56ed91d6ba840d7ef84b928be948b8f970f037fe4cfbb6194f96e51e21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "e260f193f51b97c50fd62da1d45ad98ebfc36ec3e40512fcc6199c6e50ea1923", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_macos-aarch64_bin.dmg", + "checksum": "519a64b209e61286757f6c218370f008230ebe712e6e2c7fca67a82c80738f35" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1_macos-aarch64_bin.tar.gz", + "checksum": "0f77e79f2314243c736170f90527418f8dcad404e3a8b7c991052f1d6f53d9f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_macos-x64_bin.dmg", + "checksum": "5f12f032fbb50bb269528d0d5adbf3bbc9a66152823808467c2dcb984c119b34" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1_macos-x64_bin.tar.gz", + "checksum": "9650dfe7f85edf28bf01f5d1243e60c2b351e4434e6f0207664534af8e220f1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_windows-x64_bin.msi", + "checksum": "15a5c0ef268e4c979311294abe95c996560f1cb4c56f15a14ad6bb93a48f035e" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4.1_windows-x64_bin.zip", + "checksum": "1ff66ed99105593e265277fba2ddc6879c3c5912f30ccf13e81cbdb972410792", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1_linux-aarch64_bin.tar.gz", + "checksum": "8ddc8e0c3929e651e87fc4ef63c930d241e60687ca50814404dcea8ea24a8e36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1_linux-ppc64le_bin.tar.gz", + "checksum": "21e59f327a6cb02cecd8b7fdef059d7de04cf842fda50a945a83fa2c3e54dd0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1_linux-x64_bin.tar.gz", + "checksum": "415a7ecc8dde01265da0c50ea50b7e24fba8d922f007c09abb0d2b9ba5421892", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1-beta_linux-x64-musl_bin.tar.gz", + "checksum": "8d132ae973c84daa1e11a956aa50c58153548cfbc99caede1c269925a13429c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_macos-aarch64_bin.dmg", + "checksum": "b3086339711663f4a713f7f97318bce684514b1e1c60e5901c9d6616f4ee53ab" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1_macos-aarch64_bin.tar.gz", + "checksum": "f795446b229e1888ff9ef16f848cdbbe1d6ca325db8d9c9ee83c38dc5c3ebe1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_macos-x64_bin.dmg", + "checksum": "e6e52d88189f36671bc5312ca73031ded8fd2d6f72073f807332a7c909f67de3" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1_macos-x64_bin.tar.gz", + "checksum": "0f94321d4a9e8766cd4d990800c7d58925da318518d4c52df7ab8f755e3ba607", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_windows-x64_bin.msi", + "checksum": "7e516a32ca890b6488923f361fd048a44d1e58d8ea5963093edf47dd75d0daf8" + }, + "zip": { + "name": "sapmachine-jre-17.0.4.1_windows-x64_bin.zip", + "checksum": "c91d9c94c62d474beb719e88d499d87ebbaa8aa508764b19126c7538f87ea02d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "d888c91af27f5033604ca0c61c199aabe9e9f24c1794503e1183ff3f4f79049f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "ccd8f96866414448d2ca97e52e94025514581b04047227ab0193fefc6f48947a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "ca80bb71ab9316affbdcf4e0b91d75f38019384a72eb60f6703d70cb5ff8ca35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "a05b6de36295def34cb03a37feb1dc9eff5cb380c2d60ed27ddf48a1468b4a56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "9d9088bb50f89392038ddfe14a48193c252d87123a20a9f9386222417b023657" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "c345f96eccddfbb0516f0dcad3a152762a06f203886d5179035ef2e6e3a0a07b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_macos-x64_bin.dmg", + "checksum": "f1024cf4952d1c0ad49b49786a095e6140228dc23fae0066fe264eda7aaa4af1" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "8241ee7eaa0d2dc69fb7a67652a59df8c06a1f7fbd2c9780ecf7db5dc1ea6a10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_windows-x64_bin.msi", + "checksum": "52a6d90b34d83af7405390b6d156fc770bbc97e465cf904099730362472bca8f" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4.1-ea.1_windows-x64_bin.zip", + "checksum": "c58d507b6bf09900f90bc1c8dbf213f8cd5b3b65153064f35d8e2523f310c1f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jdk-17.0.4.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "e4b35fa75081a48b958f63c4efd7af82d79a2bbb66c84c3e34e00cc1b1c8fb21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "07f34071e799fcca27b77d197dad9fc71b7764c3a79b7698a162e4aff82bca5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "9d4d766cbd2b0f9e5a4b6f83d959bfbb2bc724d763b84f258cdf8080f9f010dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1-eabeta.1_linux-x64-musl_bin.tar.gz", + "checksum": "5a0a91d17fc333b94f098518e51ea0362f9d0ed11264f8999dfac2e73f07dd49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-eabeta.1_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "6df88b609610fb9842ad35c65f6120f1d16ba6864fccc333ebd7ab828925f8cb" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "6f93c72e917e239f5ec0f0f4b9efaba7b9908b18b8067b05563bee6c4bb4b52e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_macos-x64_bin.dmg", + "checksum": "6673f48071379a96f153ca1e2ff1644b17d3dfac9a4a21e261a46eabba37fed2" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "85c2aec786624b75ec62d1307100237fc3a627990097e713169489f0eb92e1d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_windows-x64_bin.msi", + "checksum": "0433459631a27895ced1b32891be88b21d21b77cc28b7c73144151456cbe1fa3" + }, + "zip": { + "name": "sapmachine-jre-17.0.4.1-ea.1_windows-x64_bin.zip", + "checksum": "478dad4003e11afe5878d458042114525209301200a25298739c640b71d96563", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1%2B1/sapmachine-jre-17.0.4.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.4": { + "sapmachine-17.0.4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4_linux-aarch64_bin.tar.gz", + "checksum": "acc52e5d11c0beed82dc05f5c0904096b07b75a921e1671351af8de82978754d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4_linux-ppc64le_bin.tar.gz", + "checksum": "bcd7adc98105f0512c795b5736dc7ca6b0983cc5318bb3e57fa00f41be8803d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4_linux-x64_bin.tar.gz", + "checksum": "b03ad6982a023c1a16be6e8184500935cecbfcafa59a9cc65000c995dce29a0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-beta_linux-x64-musl_bin.tar.gz", + "checksum": "d4aa5af862a1f4517f6f26585491eb3f74ad5603be322c1f6790fdfa2f8efd0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_macos-aarch64_bin.dmg", + "checksum": "659d7fda2de582ec81cf4ff4b0d595d1004bcce6de4aa7dd04237910005fc0e8" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4_macos-aarch64_bin.tar.gz", + "checksum": "e5bb306387a87af2140ece8d4100f8ff1610266ce1417c11e05ca887b38f6480", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_macos-x64_bin.dmg", + "checksum": "f7bb3fff11f5b170169c55983a94cf48359b1290242a00ccfd143233a472ce0b" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4_macos-x64_bin.tar.gz", + "checksum": "78dba5e09788d0e88f45d00fbab37b85c17af22bae7f404f6bae0252ba0b14d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_windows-x64_bin.msi", + "checksum": "cb119809efc211981ae81570a22009d880f4d3ec51fd88ce0f54728786b911dd" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4_windows-x64_bin.zip", + "checksum": "49df6166a30792bd508813e1c622358fba395cab5809add706562dd96a6ae86b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jdk-17.0.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4_linux-aarch64_bin.tar.gz", + "checksum": "df27d46cc69816dde30131e07f7dd660ab89daf1d3ff37c6df4f2d4555b46e94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4_linux-ppc64le_bin.tar.gz", + "checksum": "9cfc6c380802ae73f41937db34600e3274d7049f9366b14bdf72ffd616d2f4f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4_linux-x64_bin.tar.gz", + "checksum": "f407ddc88ab090a5500b7d4342e664ff3a71278f9fa02e66f2e8217f79ab7a83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-beta_linux-x64-musl_bin.tar.gz", + "checksum": "933adb602e18827dd51b6db8a13b82c3e1b975e8cf5a958f03d50ec50ce87c12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4-beta_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_macos-aarch64_bin.dmg", + "checksum": "9299c73b699d1ba0df80b399040b17511793c02b16615bf01846fd95fe809afb" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4_macos-aarch64_bin.tar.gz", + "checksum": "a6e3537ecd1a4c5b902060d883c095b774e44a859fedbfbb087331751842d132", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_macos-x64_bin.dmg", + "checksum": "39ca91a008fed7d10351d52afadd332103dbc3ef97bdd386356ea3f0436373dc" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4_macos-x64_bin.tar.gz", + "checksum": "dcfafa06a162eef3597f8ee879aeed59fd6ad8915157f05322328e66f1f299f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_windows-x64_bin.msi", + "checksum": "7d29db37820271597f5b2d316c2c025715d2bba09b84f4276d7f4a616249bca1" + }, + "zip": { + "name": "sapmachine-jre-17.0.4_windows-x64_bin.zip", + "checksum": "512f226b8680e26915a1e0d7c8a44297b545edefb8806d685c813bef671623d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4/sapmachine-jre-17.0.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "2bf56675cdc232fb0a65402349c7451d5eaa051955c14ca8084f5e6568bc6476", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "bd12ac0df11a58d92fbaf6f3860ad971a10b4646f47fa8e0a18a6ff2b4f44bd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.8_linux-x64_bin.tar.gz", + "checksum": "ee61330ff56f0aa08cca322dcb285530c5c56f9a4ebe9e23599f543ea78f3d5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "7c42ee4ec8318dcc95c4b97b3acecaaeb31b04d2c259f1c386b0a73999c02fc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_macos-aarch64_bin.dmg", + "checksum": "f0e26bd5d8240483c46a6050fa6738b0a92c1bbed330d073b55b1c59f5783ef8" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "0acc4d7a42a65b9507fd731b6b93d3cc384894ec2507aed0b45c4f2d2afb0e1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_macos-x64_bin.dmg", + "checksum": "0fde9964a8084879dc5f019ac02efd54ad2813ffed92f771a9fdac50466f5f24" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.8_macos-x64_bin.tar.gz", + "checksum": "1a5a302bd54ec693fdec9d9b75ccb0ce4022029dbe3b2ecb7d72d177d42a20aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_windows-x64_bin.msi", + "checksum": "926f18d0655a4581105526144bb9c713439c9de7b6ea90a224a4693f9780e5b1" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.8_windows-x64_bin.zip", + "checksum": "be0f1d3ec88f54d7505431a289f0c3b449d1dce17e4dbcdfea884caf6bd58880", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jdk-17.0.4-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "6752972f2152ec3a3c829b17872ca76b1577de686a944f58e510c790c4674652", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "133f475283b0476d7b41a5e78a528c9480c57ea3ec54de352b6bfd0c0c2d463f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.8_linux-x64_bin.tar.gz", + "checksum": "a4c15ed16067f746391dae95b3d775f88908edcaee92fda24e2c5ecfaff92cf8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-eabeta.8_linux-x64-musl_bin.tar.gz", + "checksum": "c09ed0b3f2a56b76bf00fd1832b28dd81cac68c73a2415ff90aed2303ab6cc22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-eabeta.8_linux-x64-musl_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_macos-aarch64_bin.dmg", + "checksum": "7ee431d7ec9122ec9e1188c0d7e80477584632583d50e5e5156637d68ce43b71" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "578d13bde0316586015cf933389b2f37b85bbf9c3d86b85303de2c3b06bc7dd7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_macos-x64_bin.dmg", + "checksum": "990191a5a59e85293f9b7f70abb1c2a3956fd8e0ac88b381ae558c72f2f232d4" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.8_macos-x64_bin.tar.gz", + "checksum": "7a126397248204207f5b6c167d390b9cef1924de4a5d4505bb08409e74df4823", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_windows-x64_bin.msi", + "checksum": "c12ad1c30def1e5bf93e403a78a64a05346b656d29b8d216432e5138bb081daf" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.8_windows-x64_bin.zip", + "checksum": "db284e15ba619e5083d904bba497b43813e23b05973d66d4e3827d8363d78166", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B8/sapmachine-jre-17.0.4-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "be3a4366a70e45c76c399cae7d92d206cc89193299fd3940047daf0c1f87a058", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "bfecfec881b64aef46ba27ca6ab592099db0d72e69a1b48a2d2dfe56c49e185a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.7_linux-x64_bin.tar.gz", + "checksum": "f2092a009b158a30a910c3d2135fb5c1a2fadffb3c2aa609b6b0ac03a499e5d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_macos-aarch64_bin.dmg", + "checksum": "029e0aa82ea16b6db73e7cca94490b19d2ca31e961346d553ed66869b0e5b030" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "cb82c5b4862ec655c2cfe25808a01ed5fa2b11f275836697d617f5ac91d71b92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_macos-x64_bin.dmg", + "checksum": "7b8b7e8cf1d51f22d2a1510951255f3dad905ed630ebb450d39a5d78586e6aee" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.7_macos-x64_bin.tar.gz", + "checksum": "69babca70b7a5c57b06388f6c71605abb1d6f2e21b89c7c097517c1eeaaa0758", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.7_windows-x64_bin.zip", + "checksum": "d096eefb768845e27465b82a9226cd8823f50978c362c8babfd62b6bb11ffd3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jdk-17.0.4-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "b9d68eac6d0ae2b05a9c2ef32c95028437cd3519f8f74d2e85d562daf8498944", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "6c118fd2f325f2aa3d6c002751c52d08a67788c24d49aced180194070d4495b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.7_linux-x64_bin.tar.gz", + "checksum": "9139e58741b21549a6d9e5ff5bac8e1624b1ed19c7169fef20fefbd049af7f9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_macos-aarch64_bin.dmg", + "checksum": "dc2bfc50ece1ee65feafc7848f8ef74dabbeedea85cdb14d8b838605738fb5d1" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "950d2759d1ca7c48955ab3598fddcc2e2f22d28e5ba5092f7e484f71924f8c04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_macos-x64_bin.dmg", + "checksum": "6fa7e4fe716705bd11faa6ac232c3475347c8ce4022f5eeb89f61d4aae274345" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.7_macos-x64_bin.tar.gz", + "checksum": "25a7f14751a65bedfa0360016bc21c508ef9dce4abd8dac7366c03aec2ec9c36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.7_windows-x64_bin.zip", + "checksum": "523c3e60f28a7d7725d4081aef7f844d1a365f45bbf91e9dd1234860a82b852c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B7/sapmachine-jre-17.0.4-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "9ff1f9bd972ab7220191ca0f50a2fc1f63b53d583ed4612ecda5b9f289fd5d20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "b7a914484505f563c7d75392423c1e866d69d17c8052d6103060bc21f82da267", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.6_linux-x64_bin.tar.gz", + "checksum": "276c1109a07bc5b2a4722fad9f432863ad5e4a238eb2e533d1652b0f0ccbc666", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_macos-aarch64_bin.dmg", + "checksum": "e9bde18edf9c40127182044f67112580149d6cf6f2575287b28f8a98e6af856e" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "7760591dac1fe3f6430b109570e4f702277b4a749c22bb17f9416ed587a264db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_macos-x64_bin.dmg", + "checksum": "e5c090c517b070e35d2bff93883adbac71948822b8a5b561c4ebd9317217e56b" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.6_macos-x64_bin.tar.gz", + "checksum": "501f58b654dfef7d5c3d93ceef41c5ff957e6f30387f8933ebdc4e22c0171783", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.6_windows-x64_bin.zip", + "checksum": "a5846226d01e2051b87b2bf1bb363d6d0318a823f0eefccca921ffa8f72d8357", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jdk-17.0.4-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "54a24b66ecff2e23bc1c5134079bf55a533d8921b38b32ef697a86b1921d34df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "05d3630176079b3b9b26bb5493e6df34a7ad65975cc872fc60237effe2ee75ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.6_linux-x64_bin.tar.gz", + "checksum": "3a81159b67456efe56951b645a971d6ea07d1292cd29d453c396fb15f940fcf0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_macos-aarch64_bin.dmg", + "checksum": "92956e4635330e43d26b8d7c28eb6c97d58f3ce8430eaaf4fec26d51abe0c236" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "44952d441127f7d799ab8595d4ed3f17ff1c21b3de373c6343add92c0307b589", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_macos-x64_bin.dmg", + "checksum": "cbb4f3474b879c1abc8e46ac14a4d21b4ade7443a7f5dc0c3e9a972f781accfc" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.6_macos-x64_bin.tar.gz", + "checksum": "27da2abe20c947f30620fb556c5bb0d7cd2662671a9d4750f0a49390ed737995", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.6_windows-x64_bin.zip", + "checksum": "0904104ee8d02741316a676cb33258cfdfbcbaf1cf87f48cd460dfc0ddfa2241", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B6/sapmachine-jre-17.0.4-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "adb6e4daa61f21810a6111a5353f9389b77aa8c8112d3166903cbe6d5bd74153", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "3cf7614fd0528df9a3e12e951980692a4c07adba117b291d3b877acfd40b4b96", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.5_linux-x64_bin.tar.gz", + "checksum": "fafce47fbedecac53f39c31b1d8c578f288ef3f9ba3848a3b0046df05abdc503", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_macos-aarch64_bin.dmg", + "checksum": "b630fd10e737a02e2a37462d26fa43ae55ca881d895e0f84c3122185c11583c4" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "eb67f7e950270780cba5f6eefc0a401b495b1ba55d26eff6c10d5ffad3b00019", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_macos-x64_bin.dmg", + "checksum": "513cb5c7d64b63edd4848cef427948a0610bcc1fc7aff42712a2dd8c6db73720" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.5_macos-x64_bin.tar.gz", + "checksum": "211f7993d75350a24479265aba8895c6794deae898c05042b15b744531dc614b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.5_windows-x64_bin.zip", + "checksum": "b1c19715e5c6d86c5086af19b9ac491cb3ba6895569338aad71c1655c1a47a74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jdk-17.0.4-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "3451f95ada5eb16cda4fff7b8043252104cd87899a5483a12ea67c78ffacf0f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0160e2e3d534cbd5163b7c25ff9b6a558839e7e71731fc18a039c238a96d1f06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.5_linux-x64_bin.tar.gz", + "checksum": "a45d62f0884c1429ca5381c32b5921738c4d730bbd849a14c6523e2d295fd21e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_macos-aarch64_bin.dmg", + "checksum": "fd0dc18388d71a8815adde3455bd7874c4cf2acf99b6542bb3cf45c4372df04b" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "b5056cf2ca196e68a7802c5966ce25b5ec5a1448226828cb6285d401b4678efd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_macos-x64_bin.dmg", + "checksum": "de6ca3598c2f5992babc63d7d00fcc90f53ee932d229ad5b90f00dd9eaaaf61e" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.5_macos-x64_bin.tar.gz", + "checksum": "baf23c4a6824b21a3c794a3f54bebb29d9004c6748359886f2ad6966946d0a24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.5_windows-x64_bin.zip", + "checksum": "295e738d42cf0e3e2ddf468ecdc77816665360f461f78c1eaadf5d584d6cd0fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B5/sapmachine-jre-17.0.4-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "868ceb465b2d4fc142c2b6e95d2df29d0a39184a747767e2f05fe8708b8df79e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "2ea2f65357dd0c4657d18938b96e33a49ea51f5311bf179a427257be9dc7ba80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.4_linux-x64_bin.tar.gz", + "checksum": "988a718571ce23330c668209a86d593a66e4d6c972f97f7d1311829444b753ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_macos-aarch64_bin.dmg", + "checksum": "1ad6dbe0314db0f9cd111ee7bce2c8624e0fbc42a40a680f01f5249d3cae007f" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "45cc32b83370ac88e62c66e6e48b998c68d0f329a30c485ad77978c9899177f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_macos-x64_bin.dmg", + "checksum": "9b40bd24bd371d86880a9fc136b724aa0aedf298176d042b00521e294a01b310" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.4_macos-x64_bin.tar.gz", + "checksum": "97c97182ebbf6a768d35824c46378f8924803b835c89d02e74878e056a3b532e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.4_windows-x64_bin.zip", + "checksum": "8fad1d637698fae752c92bca1bcf9e28b32f8e2c1a16d7a527c1fc4947da2099", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jdk-17.0.4-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "4d1d0045ad1d664cf343a7ae18907405654a904048090c49eee39605f0a84505", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "48ff9afd8d983608ddc5ca0b675d2f5acf80a48fba5d3c5e607066346ecc0ba9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.4_linux-x64_bin.tar.gz", + "checksum": "ac77849b519e0dc7ff55cfd70bdf2b8b76a610565877b5dec256a52fbddfb759", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_macos-aarch64_bin.dmg", + "checksum": "a0812451868d464db850709b6571562b9c382ee62576ed43334a3397e076b42c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "66ceb12a390d0188a2360cc2fc1ffbbfcc1a1a3b1e4a5c7599fbcc60b1df4f67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_macos-x64_bin.dmg", + "checksum": "63a487d3ebb75109682a5412368e9c3a4d9e3b448f90a00d5a78b1c66ac3b67e" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.4_macos-x64_bin.tar.gz", + "checksum": "3c015a1438cac9230701af6f5f8a4555077672f6c960d66daf4c0bbded51bcd7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.4_windows-x64_bin.zip", + "checksum": "10cf5d4a241e5ae69254e2e025176ea7886d940e0521e4a7bf6adf7c111b8fa3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B4/sapmachine-jre-17.0.4-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "13a91fa6a057bf8764158a4741fd02bb0f550cc0cafcadc7d3ffca4b287728b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "a56a2971d29eca5f306b476267932bbafebebe5ad6cb540042e32d22eb74006a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.3_linux-x64_bin.tar.gz", + "checksum": "e5cd05616a73b0bb5f49cbc597d68ae68fc89e681fea1717f49d4c53d5271230", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_macos-aarch64_bin.dmg", + "checksum": "605fbb917b78d28c3094c48301f81df86588fa9cb63726ae823be8d6e9cd1684" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "ec7a15a0554d58ff6174d655999faed78afcc7a1c0e02c5397f55375cf1bdbd6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_macos-x64_bin.dmg", + "checksum": "3a1b4f44e0919c89fe8aa9d2cc5db7caf0a54dc7333da76b8b136f5596eae8f4" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.3_macos-x64_bin.tar.gz", + "checksum": "ff2888ae9e7fe5bb39150166941b3ed27309879b4846fe922d4ec4b1bfc2fb42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.3_windows-x64_bin.zip", + "checksum": "7f828b17e703f652536493c822c6be72313374e93ddca6fd39f292796d24b7ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jdk-17.0.4-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "b589aa10175384899ac611884190dc54f229ed80ea2130f83688dea53a05a1fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "9fa1c9907244261ea7f83fa142f4f31585aa31d9e1ea0f6ea617127767219ccb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.3_linux-x64_bin.tar.gz", + "checksum": "585672290514c25189e314c29b8d5f637301afe2864dba8c4694cf18ad3d0993", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_macos-aarch64_bin.dmg", + "checksum": "f233551bff2a37820a0b293ef50eead8cea8daedbf7ca0b1850bc9119609bde0" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "922acab0096de162cc934fd940bd836691d92e604153bc7fcbd53daf3eac6023", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_macos-x64_bin.dmg", + "checksum": "ac8329c860548f5027af2143762bdb0a4f2516afa69f2da247a8e5399148338a" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.3_macos-x64_bin.tar.gz", + "checksum": "a0627d73e284f0c1245297a18e165e6c6d614b22024cb8f193ccdb6b492236b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.3_windows-x64_bin.zip", + "checksum": "fc6e2548e04df244da782b5696cc940b4670c659cb0c10afa9be4c22ceb374bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B3/sapmachine-jre-17.0.4-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "54a22b68b88ecc2717d844788f01ef0aa8c3f4580616a80a58c6aea6bf21a0b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "44639cc04dd458eef8e06cab13278dadf79c0742f4305aa977f26c6d8399bc12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.2_linux-x64_bin.tar.gz", + "checksum": "70e1431aa466cb47f6b65ec72cc92085736ea4272d3bdb891b275dabf6c8c838", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_macos-aarch64_bin.dmg", + "checksum": "081e0b63993438786c53ffe64512f622714ad398a0d777a037958ea29c42e698" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "5e0c924b72da2174cf190e5330ed69d54fd2fc837aac01dc4c3a1aa11bacdf64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_macos-x64_bin.dmg", + "checksum": "5afe2e5b4422c64d6deb52d35eb1dbf08100a8636504223ad93b28005a5802de" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.2_macos-x64_bin.tar.gz", + "checksum": "999ac8d9f083b8b016eb58c76fe646a6717490e737afcd1db5328b2144adb9fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.2_windows-x64_bin.zip", + "checksum": "6bb2c8431261fddded364bd36a6f1d1636f01666ec15ee3a1cc1a499aabc0b36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jdk-17.0.4-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "1d0b987e3315ff70808a3d01498400f413b89aaa5a5b2ee94c1630c429e4bc11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "011bf3c99ab2e6ddf71fcc48aae4398ccdcfdfdd9dd8d68eb2468518bbd0e590", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.2_linux-x64_bin.tar.gz", + "checksum": "516c8ee3349bd2dd88e76ea7d80ef2009418486ab039aa5a02823b88e151020a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_macos-aarch64_bin.dmg", + "checksum": "d51a2984ab0369a6b7cb9f0cad2106572e9fb1a379952b6c683b299e35601c3f" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "e0aa0afea90d70fd0c75c5f05837a055883cf65cb8df37e2e89c04e50eb2369a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_macos-x64_bin.dmg", + "checksum": "48dd1595f73a18768b9fdf6ee160960c46d0b80245b88557d0cfc6feba418898" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.2_macos-x64_bin.tar.gz", + "checksum": "6e53b1fe9ab8f5c54d249566bc6f0140191f43ae57ebae70b2e76392f0664c67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.2_windows-x64_bin.zip", + "checksum": "e5e4ae664ff6eb08d202f5610e7da8250c83a40549287c5eb82b65817d25541c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B2/sapmachine-jre-17.0.4-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.4+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.4%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "7c69a0cac78383aaae0c799b9afdeb88021d69f1791020ad9629dfa41a768ee3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "4f92c28b08e454062e4bc2692916ffeefd1d34f0af4d06cfaec169231e33bc2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.1_linux-x64_bin.tar.gz", + "checksum": "48325c698bc805db6c610539399fb6956475542539bc2d3dde9a06a19f1e33d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_macos-aarch64_bin.dmg", + "checksum": "0c88ab0a4d1969109e25da54c2bb8cd559723e60ef203e9f664a7544989fec47" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "c482657c5b8919a6719f6a775b81e427842d29a900debf93a55a2428bbe23bc5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.4-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_macos-x64_bin.dmg", + "checksum": "df3554db06bdbab1f75fc02711b8ccbff81170f729c4aaba8d2d9b7e242948a0" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.4-ea.1_macos-x64_bin.tar.gz", + "checksum": "8fa55d48e49b77e074a1c67707ccf8f87dc5d0e6da336bfcf8cdfcf2ca95bb98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.4-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.4-ea.1_windows-x64_bin.zip", + "checksum": "1520bdada19fc98bc4cf90d6402db25254682299ad425476d802d63d13da0972", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jdk-17.0.4-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "7bdebf0a2c1594d48f849e3ac154661df3a5c036374382a79968ae711ef775dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "dd5d76c65f11d18a53a32b343610e3f3720d33547c44c69d347d000a2134ffcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.1_linux-x64_bin.tar.gz", + "checksum": "07691ad2f31d2007163869237286595ac237d9cd9a11c8a2c490f8ca4edd6d0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_macos-aarch64_bin.dmg", + "checksum": "414367cfa9e303abcb16d28e8ef541f4e85dc0113f551eb11f852e0d84517655" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "60b99ff62e3fbee685177a40434af3d4e938cec7f4d76d4c70faf6ae20d6742b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.4-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_macos-x64_bin.dmg", + "checksum": "7e9265d607f8057e414ab3aec9d44b2d7b438e5a999a561caa894e024b310279" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.4-ea.1_macos-x64_bin.tar.gz", + "checksum": "a8839fd4f5c1ed2cef5a3a7ddd78b83628035309f6edcfb1fbedf149202d7d68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.4-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.4-ea.1_windows-x64_bin.zip", + "checksum": "47a5e524c32f00fdc74e40ef86be8121dc627586ba2c201f94b583874b84dfee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4%2B1/sapmachine-jre-17.0.4-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.3.0.1": { + "sapmachine-17.0.3.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "6b0e0fd31fe93901676a7e2ed46fe70871e3207e4d2572b1814d08420a3864f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "7075e13dd8c8124b66c3733947bf5fefc5c5ed5e8b15ee760c67221b00768cd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3.0.1_linux-x64_bin.tar.gz", + "checksum": "f69de3d41b852578be01414cf3e1377827a6da04015e1067f991de9b167a64d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_macos-aarch64_bin.dmg", + "checksum": "ef1caa159f4c15e54dbf30fd6cd6665cc455f93c4ab7b40e019923103428cb69" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3.0.1_macos-aarch64_bin.tar.gz", + "checksum": "e1653c1ad4bb5fbd317e30796271c6d0cb4e2964efd2c80c07c518ea92127062", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_macos-x64_bin.dmg", + "checksum": "665932b8f9f7fccef703705f9b7c962730d9a04d2481c4da19ccc11a28f23492" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3.0.1_macos-x64_bin.tar.gz", + "checksum": "9757e310fdd10183d986b3ce0421b9ab96ceefa97526f5ed90b8cd364abae54e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_windows-x64_bin.msi", + "checksum": "82b156d4a27cf797a86bc6feba54b7d73cffc80513ff20e5e60ab135e0a8b919" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3.0.1_windows-x64_bin.zip", + "checksum": "3e0ca90c7308e01a84ec2141759fc682a638190f736f0772c91033d500503ae3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jdk-17.0.3.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "a79a0eac3c53ce6159116ee285081c0f4559b50a035e0e586135cc20fb6f2720", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "50e014d7fdb7018a0ebd69f9565912f93f4f20aeb953fa83fafb5af2ffd7efb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3.0.1_linux-x64_bin.tar.gz", + "checksum": "85c9a06cce1dfcc1e0bfbff88a1b7d3b4611a0b0d9af4300af55c993744e2908", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_macos-aarch64_bin.dmg", + "checksum": "db05fef84a8e7d69dd791c2866d122cccb89349e1ff79da8e5eab6f513f72c08" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3.0.1_macos-aarch64_bin.tar.gz", + "checksum": "40b64d8b38e72ee0fda790051421b7870b7789022a603335f29beeb9e1026991", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_macos-x64_bin.dmg", + "checksum": "fdf88e534d1f151b1f30c15471a1a064e9f7f373dfff435420fd1dec5f015861" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3.0.1_macos-x64_bin.tar.gz", + "checksum": "570ab4a1525f6f5f5daba2d95826bfc8cbb7c118b71cb3b840f8cd7ab4212bdc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_windows-x64_bin.msi", + "checksum": "b193aef1e885f8d20f71f967042f0a16848475e9ecf2b71a39e34a87bf94bf40" + }, + "zip": { + "name": "sapmachine-jre-17.0.3.0.1_windows-x64_bin.zip", + "checksum": "94ce43269c16319bfe30e79aa2c9989200223357694c23640a9e56926bc15e83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3.0.1/sapmachine-jre-17.0.3.0.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.3": { + "sapmachine-17.0.3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-beta_linux-aarch64_bin.tar.gz", + "checksum": "34de88cac287a6d4e7deb5c6a145f194ecf91d0f76cdeab87fea82f3b5f09fc5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3_linux-ppc64le_bin.tar.gz", + "checksum": "1d8c0147e9d75fe734a5146bbe0e1f45e11c626c30c9151c41b230e1ce73c706", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3_linux-x64_bin.tar.gz", + "checksum": "3aa649ffef0d21b98019bbfae6591d54438c76571614e9b328e6021a493d07f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_macos-aarch64_bin.dmg", + "checksum": "9c30310d3ed2e1ead98c1984d8a690371de961042e79c31dc3839b57c9e805b5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3_macos-aarch64_bin.tar.gz", + "checksum": "5b1718288aea89aa22db1dc71388a9ffeae9befe2c8a057af4d8103daef5fcdb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_macos-x64_bin.dmg", + "checksum": "610ee82d50f145d99f13258c47a441ea54476fd6e6fab4ba0344f5506186afc3" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3_macos-x64_bin.tar.gz", + "checksum": "eb3dc4f099b3038368e7cd0762d7820f07d64fc6bc880ae5e8606ece1b32b1c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3_windows-x64_bin.zip", + "checksum": "ba1043bd9ad2cac3c3d760fb898b961e12192c056530d422dcc9bf54857976f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jdk-17.0.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-beta_linux-aarch64_bin.tar.gz", + "checksum": "069dd8979db90a1c587391d7a8da08c73e38555eae52d551f9a52002ccd6dc25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3_linux-ppc64le_bin.tar.gz", + "checksum": "81895a0cd6ff42e14e38b73c24a55f48e955ccf6b0d36f21e1f79bd4cdb023da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3_linux-x64_bin.tar.gz", + "checksum": "49cfdb77922dc659b9d517a74a398a899dc5c3362644b4f3dae0b17f34ae4e58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_macos-aarch64_bin.dmg", + "checksum": "a55b6367c9c5278a4699a9633cac31db258b3535d4a51fde160626312ec0b274" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3_macos-aarch64_bin.tar.gz", + "checksum": "e6309a79ce196f1856ef6dfb3592ac6eb63d6ced5ba13d1a2c7d2b9235719ac3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_macos-x64_bin.dmg", + "checksum": "adb8859abdf4331985ba192c1a45da51a5ea94125e567d9f705392ea19b03ee1" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3_macos-x64_bin.tar.gz", + "checksum": "9e478f55f11d57ab260c72090e6aca2cb94def8bdb91d08a76f59dd12de63561", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3_windows-x64_bin.zip", + "checksum": "defdbaf811ef3ce2be8ac7aa778a2d2375d89b9aa3aa04c579df140963124107", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3/sapmachine-jre-17.0.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.3+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "45b0efb736a778a8304d39ec72f64fec12acbcb639edb43f16b0f6ca356a82d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "9579bbbd633084fb33499b7b684e96407fa2d17028d50561f2c10a1c7a569d04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.7_linux-x64_bin.tar.gz", + "checksum": "672628332bf1c9c00d5ec23772ac019ed89cebf67ede996a3a5fb0b6c1c859a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_macos-aarch64_bin.dmg", + "checksum": "c960f7976f9b95362c9acc9896f65498a21154f1828e9ab9081b7afef6acda01" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "070f018b33c7f3b6e8dac25a0d880bb453fd3c138640c8c159ab4155b70bd7ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_macos-x64_bin.dmg", + "checksum": "1a19211b9787af8a21cf644ab95a0c8aac25f76de6b70691477dbfdb82998bab" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.7_macos-x64_bin.tar.gz", + "checksum": "c3d8d42a10873cfd3251acfdce686098e6cff0d334d42cdb43578feab44c2bee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3-ea.7_windows-x64_bin.zip", + "checksum": "32fd6d60d3d0cbf98096872c903a4d8cda2e654d2c6aaee682917dbb35e33e35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jdk-17.0.3-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "2eec85e1e134f053143d08d03729b1ae0d15514baef643aa9585557f0d94f2f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "f06f2308379aebc17aa8945b765ef44872d228faa8a9cf1d8d271bba0c9666a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.7_linux-x64_bin.tar.gz", + "checksum": "0430fb830993146cea12b2cbb9ec93c0c3abfe610a1e10faf90bf9e192edc874", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_macos-aarch64_bin.dmg", + "checksum": "92b62c51079011cd5d369be72c9592742894e2b39103a3bc8cc184290b1d9a36" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "4ef12b319ccf4e8087e96e511b9864987aa2619c380483ac785396a94b9e3d48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_macos-x64_bin.dmg", + "checksum": "1a92cb55e7fef16f08f2dec5b9108592b46c3a1c62fe534046f4298e937407cc" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.7_macos-x64_bin.tar.gz", + "checksum": "4bca48c75d3f98cc916af06fc6b7492108cd2bcd775fb9b9ab296a0c3dc9e11a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3-ea.7_windows-x64_bin.zip", + "checksum": "3b9bfb05bdac8792ff69b40f6d0327efef1f4466f58f8a1ebe6d99c559a372ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B7/sapmachine-jre-17.0.3-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.3+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "6a445a33e8aae6406fc9db4665be5a1633ed960d9f0d1692fda2d32190abc9eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "c763b9ca64d89f358fe7ec4f8c158769f13f59e965f7a461ff6f10e561c3d88a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.6_linux-x64_bin.tar.gz", + "checksum": "0b71cadd43ef6eae461c1bfa931832cb3306e6a133dd110deffd14520c9996d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_macos-aarch64_bin.dmg", + "checksum": "94e458acfe451a9ce9502ae87fb265d4fd5fe922878403e7b1fda4ff5d5faa4d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "f7363b1eed8ab6fe3dc5c9a71278fa746991bf08dd8e1258f72699e151f2279a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_macos-x64_bin.dmg", + "checksum": "68f1d5b11b445b76ce9618bd9f1744267afa0ff7f876991ec8aec1ab2d245251" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.6_macos-x64_bin.tar.gz", + "checksum": "4f2be80ba000b33e28cb03e2dc5830d45e56344699ae89dbf8727acb892ea189", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3-ea.6_windows-x64_bin.zip", + "checksum": "22fcbd6862d212ca18d9fec128cae3a03064784f1dfcf79cb5d68bc39acec310", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jdk-17.0.3-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "64b2298c2ec45310e8081e92ba9841be7f291e9c2a88b64108f8b84bfd21f92e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "1f0c8c5b07f3bc2d9aee8c540206a0271b5a3188a55d991523e4cbe6914668a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.6_linux-x64_bin.tar.gz", + "checksum": "2c66bde383373e7f237644068b01d439ee134d05276961ffbb009fbc0aa2972e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_macos-aarch64_bin.dmg", + "checksum": "19c16922da02ba7d43916719f537d241c24b136ea6c555c377fa2970c210fe39" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "cf0de310cc34f0b072431fc0b04a0de2e2a9d256204248dcf08611a5ffe5c0a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_macos-x64_bin.dmg", + "checksum": "09c62eb766fff000cef1fea1f98620c0a92dd95bc00d6cac33e3865af28fe95d" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.6_macos-x64_bin.tar.gz", + "checksum": "5f62a72454449309d3f6c110170b0c2c394d923cdc0b7f05621693c389ef53a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3-ea.6_windows-x64_bin.zip", + "checksum": "8a2877b19cb900ba81f954478754f8d6248acc49a34342d343c5cdb35f535c5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B6/sapmachine-jre-17.0.3-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.3+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "510768f46eedab9ad82baf844a87672d150f7542648442900e54ea2a3d789584", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "22e091f4c83028f7a5f2eaf14b8daf5b7970a469d5bbc9a8bcf4d05bf681dbb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.5_linux-x64_bin.tar.gz", + "checksum": "03ec32c683fa2953b2fe3817a915f0f8d8679787c3f6d2602691219545ffc4eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_macos-aarch64_bin.dmg", + "checksum": "c9b61d607ec5eb5f733a2c2703bb64d33ff52017e4663f7f0446e83256f6fb71" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "5757f43cc33af421b62aeb7a770d559461bb9060a5928435a97ed646339fcaa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_macos-x64_bin.dmg", + "checksum": "62c842c24520c4b3760675a3b3f6e14046faf3b471dc64ba1c8fc69eb52b8c90" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.5_macos-x64_bin.tar.gz", + "checksum": "cfec4645f27b49ec6e2628b1a55bfc34f5f75870dc2a0784a956d3114e53bc6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3-ea.5_windows-x64_bin.zip", + "checksum": "211d65fe60a5def35e669ddfb56e69680377a172ded2434508ac21bc19955f25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jdk-17.0.3-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "c0fa1430f8a24b8ce919df120d4c77ab3a5e8bbaeff17cbf0599c8b764dcdd4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "f3fce2f87ee653be110215515d155f4f01cf4fc743ac2d810ef470300e884113", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.5_linux-x64_bin.tar.gz", + "checksum": "6cf655e179138de0b81de31ec5ec61b5befdc38ea49c82922205b7413e313875", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_macos-aarch64_bin.dmg", + "checksum": "7dbe35a10648ce131b8c0333a77b005a52ed5f6072ffb99ecda76ef331974007" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "f62ba378d33fdb400a4b96b421114a7af928170024c856cd91012e27923433cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_macos-x64_bin.dmg", + "checksum": "e0167725bd0ae2f461864d7acaef27681f9c956fe02b5903e61ca7a192cff830" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.5_macos-x64_bin.tar.gz", + "checksum": "417caf23eccd961102463034c5f8599275d9d048278d7611823cf1f5209a61f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3-ea.5_windows-x64_bin.zip", + "checksum": "34b0e13814398d73d73b656b9694e03dcea8a7fc930911a8a67407f3dc586bf5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B5/sapmachine-jre-17.0.3-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.3+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "1617819160ec77da283d5a13fcd0a93eb00c2946d2460ea8dd86959099d8cb90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "9d4581260202b2ced3470e00c857c800b66b7abc369f6d1e7a141246c20a5f57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.4_linux-x64_bin.tar.gz", + "checksum": "2e81b30f03ad5809cada801a04899ed397e77bc3a124d27d80a74b3d7f62fdfa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_macos-aarch64_bin.dmg", + "checksum": "e7295471829e761b619ab67a192bcf635607a35b648f0e021ba02378e236f881" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "0102d345f3cad11e34018a07eb49d6d38a94673a0e2d380ff21f773ba6d9423d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_macos-x64_bin.dmg", + "checksum": "789b7b9ac2049dcb49b60d7b56a412c84c4e24656cfa384d44cab57cd6ac3fb0" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.4_macos-x64_bin.tar.gz", + "checksum": "8bf2ecb1ec5768e264c6e5961736fb94bfc4f733d8e95b07d6d57798759395f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3-ea.4_windows-x64_bin.zip", + "checksum": "f14584f2bab41838d506f4b7e78993f05c8d775f2eb690bc714f1ba5c1106102", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jdk-17.0.3-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "b20ec4707d0702128b3106cbf1286c904ba6079234541f5d2cc883af68c23323", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "342d78b204b225e19a6925e74a540d5910f2a4b8111fb2c08509b871e07129bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.4_linux-x64_bin.tar.gz", + "checksum": "c2f8ac28fcc755c177cd6192967e3bb996e547204dd5f85df3f12145de9f5c73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_macos-aarch64_bin.dmg", + "checksum": "37656872c8a2e41f4bf740083cd927dd7a482160d7a940f4b18ffea715d9dfba" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "d8c2542b418d70546f23b571cda8c2c964b92291e27d20bb919964d205c5d896", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_macos-x64_bin.dmg", + "checksum": "59a1c0cffa4f607fb480e0bba012c29a1f46094dcad89df2fb29c730a59b8789" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.4_macos-x64_bin.tar.gz", + "checksum": "bdb408f85b4788b9a2e1d268ec94a67252eef480dd02edb633e890000ee70bca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3-ea.4_windows-x64_bin.zip", + "checksum": "377adb541e9e2db73e0c460207f22abd257964f1da86caf4b8caccc171505940", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B4/sapmachine-jre-17.0.3-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.3+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "2267531bd9131252a892b4d6c8d3700c0cb48920a61036d167fbd3b831f94b67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "7581f8bb3cd28317c2dda8fce4b2dc628b3de71c80f14119e302c16c8c2cdee6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.3_linux-x64_bin.tar.gz", + "checksum": "09a5d56a87b5d49c4bf98408dc2eaf001ae214b782d19ffb8c12ab3e6e85b090", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_macos-aarch64_bin.dmg", + "checksum": "3db996400305ec35b9157f710f86a9342172dbb154e6ae1252e2adf6ad26b6ab" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "95658b28c4246cf965b385ba07b524b38606d882e9c07fbc68009f3bd59b9cc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_macos-x64_bin.dmg", + "checksum": "262f329b7f9cfb3b5975335dc2b058aad997afc670a7cc58bc92fb1fd0a00afa" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.3_macos-x64_bin.tar.gz", + "checksum": "39b92abf132350b29e91deb174be29ff6c5f54c1fd72e65253e80da71b4787b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3-ea.3_windows-x64_bin.zip", + "checksum": "0df302af6c4028cf5d6d07c2ea6642bfb17a9f1997233658eaf9e2eb8e13bf3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jdk-17.0.3-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "81709e3dddbe1b464c3dad56671ae59cadb961f8f941347042896d18bef23fab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "170e5c4ddabe856f6fd0204fb2223132d3d1160990f3005efbe73a480e0ec99d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.3_linux-x64_bin.tar.gz", + "checksum": "b66aa23b430a6a56889dc27478b7802eb2617d653e1b15261a94ac141866a000", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_macos-aarch64_bin.dmg", + "checksum": "3ab48c3f38bebf4faca73e7ebc51b0e616bcd02915b018f442a569c5bf377071" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "0e8cc212bd07a6b7b529dfdbd2612975c6517e8e6357b480d7e1b07bfb9c3cdc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_macos-x64_bin.dmg", + "checksum": "c0dcf9edeba14952773a52f76d10446dd57bf82ebf6d268b981d8b2b6962c611" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.3_macos-x64_bin.tar.gz", + "checksum": "21997252862f515472f4db8e65b2286cfbe1d5d0bcf6d22eaad692af4b7c4656", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3-ea.3_windows-x64_bin.zip", + "checksum": "ed74e0979922de370e9067debbfbf177c563ce3f85e2de010b4e32e2fc8161e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B3/sapmachine-jre-17.0.3-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.3+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "9f7326af174bd36c26e68429d3c3e1ec9b18d8f624f2c2238725a7d6ebcd2195", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "478218e6ae4e94d313d9101f9e85e1724a1c863f6d2d2ce76414722cf59008bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.2_linux-x64_bin.tar.gz", + "checksum": "b6079802d36cd3affcf49be3498967aa229f02b7bd8b1495b1f23710689a1d3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_macos-aarch64_bin.dmg", + "checksum": "9542bdb0a0d9234356d81d2a4f26f9cd87a3ee3ea29e2c383f1f36ad7d46f977" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "9c26f263d8d7e8c902081df35dd2436cc938724e0ddba115faafa4640a50c2ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_macos-x64_bin.dmg", + "checksum": "6ea7afee74b9dc93103a5cc2ce0851fac12aaa01677c726bdcd7833abb1be234" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.2_macos-x64_bin.tar.gz", + "checksum": "8b5dc5f4ea9ad267d362b9f0652cf642cc6759168673b3d6ef0a876666638143", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3-ea.2_windows-x64_bin.zip", + "checksum": "a94f7ffd04fbbe786924f273572de67d6c645c0a9f92a10d196d93287cb2669d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jdk-17.0.3-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "381f2d687065a8e1c5a283c92f63f0854b760505b0ed15bb6fac55cac211eba8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "381a7b052c9bde4c61f0b4c3028b180da44fa509ed5e3e6a64d5e2e684c3c59d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.2_linux-x64_bin.tar.gz", + "checksum": "201ea0c199e2308d80ba08c2180b6660347ab90219e0e2af119fd6c131a80dc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_macos-aarch64_bin.dmg", + "checksum": "47bdb5d9f1a72c138a6a4442aefb51ed97596acd434ba8b9e58a084bdf8a67fa" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "8d71b69d34e49ef938b7eb743736d76cd8cd14edccb0eed444b4040579c9449b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_macos-x64_bin.dmg", + "checksum": "9d00a771b947cb95ce5325aceccedf660b942c6d00136790308c320377aee43c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.2_macos-x64_bin.tar.gz", + "checksum": "c6cfd4edfc0a73c39b14bb15f7d6df04579b6a8299dcc4e726035b06928badec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3-ea.2_windows-x64_bin.zip", + "checksum": "5d1738c76bc295e7a7281d95a5f889dd88da8637cb710ff333f28c7ad3289985", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B2/sapmachine-jre-17.0.3-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.3+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.3%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "e855e79fab1011a2218280fa7c7c032fbf0cf22e93b4371df808ba5f40fdc7c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "19ef50b1b99f00075c07cf139a19fcb6576d9e5f15ac3302acce05f48391ace6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.1_linux-x64_bin.tar.gz", + "checksum": "7ba4d14298b61878d08bbd07d89dce556290c39032c9c76f1a194874e9882135", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_macos-aarch64_bin.dmg", + "checksum": "090bc4fc20af9e0cb9870ebc409d497b698959bcb981e78a9018d89f599421ae" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "81c89da665e915c706c673287964692e65c61ebab9185e02c732b49a629bb378", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.3-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_macos-x64_bin.dmg", + "checksum": "378758b77cacbbe13ae5c04665492d9f8a0f010d40d73cc5046b363d9d06671d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.3-ea.1_macos-x64_bin.tar.gz", + "checksum": "f41707e86225dce3baf410c9a118ace9f423ce8f7143c39228cd017c8829f590", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.3-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.3-ea.1_windows-x64_bin.zip", + "checksum": "9b82cc8ae7814e988078071e75607a991297bd3e63848089798b969925b72699", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jdk-17.0.3-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "4851e13fb3cb51fc099161e5a11d30cf9f884a70b5d301f1ae4d434c392353f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "d66ab98f0b8df0d8709da276e83071a6079b57063600befbf01ded7a77b85b90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.1_linux-x64_bin.tar.gz", + "checksum": "20981ab42076031c7bd4d442360b0f49cd0ba6f65581956c7724dc3c63b2c38c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_macos-aarch64_bin.dmg", + "checksum": "22cb433f95eaaf27fdc625478cafc0f17556ecdd3f3ccfb54bc828c1c8bb86e5" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "47767c4da89e339b7f4863e5d80aacbee1f25759a2762d3698dd9fd40050209c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.3-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_macos-x64_bin.dmg", + "checksum": "775ea5a20d413577115256704110e0eaf21a709076d2e11b1525ef9665f48818" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.3-ea.1_macos-x64_bin.tar.gz", + "checksum": "11c4f76e950506b7d08e772bd862b4ab3a4dd7dcae3a1d50bd831d4830ba3054", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.3-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.3-ea.1_windows-x64_bin.zip", + "checksum": "eb8af36a6b49580c2caf2ba9345bccfc68718b9eddd20adfde8ce407f51a9431", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.3%2B1/sapmachine-jre-17.0.3-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.2": { + "sapmachine-17.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-beta_linux-aarch64_bin.tar.gz", + "checksum": "868248f1b1f5b171e3b9ada9901673d3ba38e2c36aa7712d68cbcd8d47dcc7f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "da6961c6da97ffb1cff3d5e02edd335eb9e5910ed57ddb74d13670aef4d7e14e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2_linux-x64_bin.tar.gz", + "checksum": "f0c17f9477169159c92f4a2d445d37626cf1fe26732af0b550281b27e44c6f34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_macos-aarch64_bin.dmg", + "checksum": "7502b95cf9e691197e21637a8e4acfca3a0955aa11f36e47824bf0083085bfc2" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.2_macos-aarch64_bin.tar.gz", + "checksum": "06c28b5365527db346b5d2e121e5f70baaef0ddde07766c59c17bfc577a0e4c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_macos-x64_bin.dmg", + "checksum": "c00b7a32f7be3e1a400d815c22d0e254cdab0e8f421cb6d63ef8a50c8e8a501a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.2_macos-x64_bin.tar.gz", + "checksum": "228b9952002dd60e626c46b8ff051e8e25d577d358390cd52dd7e4ea50863cef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.2_windows-x64_bin.zip", + "checksum": "fdc230b23b5114e52ef7bacaabd6d0a121b4ce70cfdd9f477735dbffbf5b047b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jdk-17.0.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2-beta_linux-aarch64_bin.tar.gz", + "checksum": "55315321b29b6f488dc95ea2efcd4f5c0f73cce7500757e1883358313d007e86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "9afd4eef6c7b2f0d35b472b2220c35d58e75c702b2382e4d9bb643492b4be66f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2_linux-x64_bin.tar.gz", + "checksum": "bab999ff89a9bbb567073e05f889aad932543fccd741d245b09380d8edb30418", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_macos-aarch64_bin.dmg", + "checksum": "ff73799a5a9a6ded9edb137c8782a9619a1ee296c1d0232d4e0c471c24589bc2" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.2_macos-aarch64_bin.tar.gz", + "checksum": "ede53113b50f33c6c7b15a20d1c63e5689816a7c7eb9302581b4d0b3d8e5c8d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_macos-x64_bin.dmg", + "checksum": "30e20815324556dc59f9a9f6c60b7b1352f4f9567e3dd40706ec95ca7c9b5c68" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.2_macos-x64_bin.tar.gz", + "checksum": "26a08bace25e4c7634cdf0f0a3c8cce7e7f3dcbcbe1d1c6b685887a0582294ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.2_windows-x64_bin.zip", + "checksum": "08168660dcfbd10ce809d218427c67702b8cebeb3c8eb9b990520e79ff9d165e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2/sapmachine-jre-17.0.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.2+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.2%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "471d6c61e2ca20518f80296191c69f7f39cafa5a4486cac969bd9f6dc1b69d10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "590b7180b920d62add39af54e2e0aa016fa97a91ad0b1e72b29febd04bc6a80f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.8_linux-x64_bin.tar.gz", + "checksum": "39e3e4f8d3755272527031448a590f24808f3222caca1a91855dc517a20f51ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.2-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_macos-aarch64_bin.dmg", + "checksum": "531b84c4ba9354c6a9fa213513abab251811dcf5402be528ebbb9fb823f4a280" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "181fdb2ec17650203488d9f676882164992ced7c068133d199e08897ecca37bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.2-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_macos-x64_bin.dmg", + "checksum": "8f8e2f30946e677ecf7403105f2b713863b173bf850dd6d17be61af4c46728c6" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.8_macos-x64_bin.tar.gz", + "checksum": "f7bc5ef38ca1fbaddb5b04f0e62fba7bfef12d22978597536df6f97d82a86a67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.2-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.2-ea.8_windows-x64_bin.zip", + "checksum": "d834bb711424e7a4c521657e58e377c3734cb8e83def48ba2e39f8a36f298440", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jdk-17.0.2-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "95e7e742880dcce13533a50960e14b3c8765f459d463694c8487ea1a5e1e66eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "f79e689697924df0a7df6cf5ce92169fa628ec1275a1bbff3cd7a42f7ba75172", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.8_linux-x64_bin.tar.gz", + "checksum": "85e886d7081216595b213f779212d0893c32b3f6b643dc120c090b1916fe1c58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.2-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_macos-aarch64_bin.dmg", + "checksum": "53bf37f9c1428bd308222d92cd8209ff06ac793a5b744071625347274c30bc7d" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "3d3ff6a3c2cf090fdf038daa5e9f9e4dceae22f72ef0d5d47b205ef66b07ad24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.2-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_macos-x64_bin.dmg", + "checksum": "e4dd10b1b9520acefe5a7acf95b260d2886380843dae0e4a653821e8ba18dbcb" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.8_macos-x64_bin.tar.gz", + "checksum": "d68289885bdb4bf21e086bf06d0ed64eebceed863422fd69faa5b45e9642ccf0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.2-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.2-ea.8_windows-x64_bin.zip", + "checksum": "0ba62227a79c4abf8cb1334f0f51e296d3f01ce09eae8244feaa73a30182322c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B8/sapmachine-jre-17.0.2-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.2+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.2%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "737ede4b1b1d4d6c7153b16812b55a275d5c9e3f566e5ae6ae9681018ac6483e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "0843dd6a29ac5b4ffd5c1643be8a19b1a51d5d2deadb2d78c083e7146548c9e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "36625bf74c9593b48b55830d4b3f0745d2b3b63c5c19c3e63fef85caeaf5749c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "008d7b160ab8fcdd07a38f25adcf6d39c463e1ea9b672d1a591b29c6a18488a2" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "c7e25fa9312b8ef7fd983975cdb2fc2cfbf8baa99f621aa988f5409717987d6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "42c4a6818196b168d1b644380d7f4480b9eb969224047e55cc457836a4596e83" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "89ef8f7c8c1916613a3a9e8d447e10252a64b0192095cae22c94c666e07fd37b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.2-ea.1_windows-x64_bin.zip", + "checksum": "53cbbd4b2dd65c50b91fe00fbbf36cf0addacf8bdc869decba2a23005c741a5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jdk-17.0.2-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "7b4c757c727ac30faee7c0350f7fd1322dd3b323edfbcd3f3fba204fb82f02b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "1e9b68016c6e15943d82358e7990941d6d63cb70c5849c25fa085803052ba494", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "ca00eaa9fc40528f2cd6d882ba2caf2adfb964b0cda6560312f64dd5dd22cd0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.2-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_macos-aarch64_bin.dmg", + "checksum": "d97d875e35868a0cf3f9c40c9198fc42f5b44c961e54953a4a433e1bb8948dfd" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "e52f5022dac0b64b8891fbb11528d8a3480de33f4c53c108d2e7c7ffb615c74c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.2-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_macos-x64_bin.dmg", + "checksum": "b53fb6a76b0ae54457c379400fcecaadcbb50e180f79612bcf11af8e95163e9c" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.2-ea.1_macos-x64_bin.tar.gz", + "checksum": "f6332da9b537027cdc414d20c35e13365e19f9124a26977890a7868a311e833e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.2-ea.1_windows-x64_bin.zip", + "checksum": "7b0ca0e62b48f0da51dde7d3a24668a46ea2597e94c44e5c3daacad74632a6f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.2%2B1/sapmachine-jre-17.0.2-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "17.0.1": { + "sapmachine-17.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "d4563d246b93945b417026598224a8bf805b9965450942e036589b92c0c3f076", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "2c1f7cd6a71c2cc1c00bbcfdcf31db1dc3117a81d0bde09fd9882a66e189c88d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.1_linux-x64_bin.tar.gz", + "checksum": "247fbd090b4584f725ab92e5747d31a181ff77fbb31dcaea449574862ce5a249", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_macos-aarch64_bin.dmg", + "checksum": "958c37a0875a822e93302365701dbd78546da5371948615f617154b056585108" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.1_macos-aarch64_bin.tar.gz", + "checksum": "47c47c4a11d4795178d63928d7f8e505e538d61512e731add85cd989accc6bab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_macos-x64_bin.dmg", + "checksum": "86a3c95d2f7f478677aacbbd498637027b5f270652be75690f475b22483cbef5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.1_macos-x64_bin.tar.gz", + "checksum": "48d1f69ea8123f017e6a3a47b4fae15480c24b2e06d45fbe15756f5c05c8141e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.1_windows-x64_bin.zip", + "checksum": "eb8d9c5ec4cd3b990b7125e302ff681bd2fbccb2cdbf1cc0399a2077b1470841", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jdk-17.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "186063a1c73249c48e5c34c9b80dd14663309e5ccdddfb668fcf4c70b7174e3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "d6379aa47e8c0325dee954d0506dbb85bce3b5666be021dc1f3ca7373540970a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.1_linux-x64_bin.tar.gz", + "checksum": "47d2b36b65d119483bdf0b500aee1112234836d3181df507deb6ee5361e71a7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_macos-aarch64_bin.dmg", + "checksum": "1974791da9773c5d96a2ca80c0ebb7d8aa5528b6cd5fc4fe4f5fbb993e8514b6" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.1_macos-aarch64_bin.tar.gz", + "checksum": "ea018d80e4551291b65e6db480426a376dccdc1ef0dd4a48878795caffe026c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_macos-x64_bin.dmg", + "checksum": "1739c62f05a1d9b67d521bd749689711a4fd789ecfe60b997a4c259b6963ea5e" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.1_macos-x64_bin.tar.gz", + "checksum": "abc1c67d8d604f555064ed457542c33d4bc358c8dca558b88f2b5b4c47d9b9ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.1_windows-x64_bin.zip", + "checksum": "47566ab3c794e65c9e75ec494c8bba54fce35de236f36d0f1a8d14a7f00cfa24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1/sapmachine-jre-17.0.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17.0.1+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17.0.1%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.1-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "84098b51cc0a330d55b97c12874cc865202eb05b83ecd5bf1acaa2caf6dc438e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.1-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "82ab8008e2715152479709357580f9e820b7c92a23d41ac2afb2ad3a46ce6e3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17.0.1-ea.12_linux-x64_bin.tar.gz", + "checksum": "75d9a7ec61e3e6b7b48b93c47ccafaf38c9b72e7c9b7fa12090028285d2e5126", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17.0.1-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_macos-aarch64_bin.dmg", + "checksum": "813dd76525326126a9472678a18f2dc4aa0487dab84b648daca493b5e4b072b5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.1-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "b1d66d3dc711b8563f061761c312591a1abe58f5e7353d91c0213d64daa6af20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17.0.1-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_macos-x64_bin.dmg", + "checksum": "7493822c5350e43bcc4aaf1ab7c7de635ec67527cb2b5c292784248f270e7954" + }, + "tar.gz": { + "name": "sapmachine-jdk-17.0.1-ea.12_macos-x64_bin.tar.gz", + "checksum": "14f64decb8b819b852b491380e9da70452eaeeac0d3c26ad51206c8ade5b5a79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17.0.1-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17.0.1-ea.12_windows-x64_bin.zip", + "checksum": "6491db1bdcff88685b4dfd86a8b69c142da83981cb981b786ace7da3f4e86d07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jdk-17.0.1-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.1-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "c72ab75e5b079efa5083b1fb576ae0b39a2687e708c7a9b939932eefee730357", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17.0.1-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "404b1141f6f011c1e4bb9212bfbc3b1e5a982d0c78e77cc6b8dc11935671df06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17.0.1-ea.12_linux-x64_bin.tar.gz", + "checksum": "8f246eb73c4e641d1ab207d4ac80b4b768b72adbdbd547d794af0903fba87c12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17.0.1-ea.12_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_macos-aarch64_bin.dmg", + "checksum": "b57f79c0b3a66b407cf8091e54755db28ce97f72a583a34d73296c6bb23f7caf" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.1-ea.12_macos-aarch64_bin.tar.gz", + "checksum": "7470797d58c84a27629a658957de854c0c3f8cc0c29407ec943677cf2e2a01f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17.0.1-ea.12_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_macos-x64_bin.dmg", + "checksum": "441d626229e6bd1370cb92cc42fa18cb28dbe40d881d7555925845b837a97bd0" + }, + "tar.gz": { + "name": "sapmachine-jre-17.0.1-ea.12_macos-x64_bin.tar.gz", + "checksum": "11b754b1eb50b55e9ccf3f97b486714cd6461f2dae6536bbcd21ffe49a721aa3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17.0.1-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17.0.1-ea.12_windows-x64_bin.zip", + "checksum": "7488b54c075de51f4ea2c02d4485ae6c2eee20abd5ee5b04a25f59ae22e049d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.1%2B12/sapmachine-jre-17.0.1-ea.12_windows-x64_bin.zip" + } + } + } + } + } + }, + "17": { + "sapmachine-17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-beta_linux-aarch64_bin.tar.gz", + "checksum": "101c4074d6bc21334045eaa2b17a6848473be9a6f37a798254683230ab3bb392", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17_linux-ppc64le_bin.tar.gz", + "checksum": "013f4052931e83aa92d7cc638bf238affb43cf92a513064b7c3667bdc8c16f45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17_linux-x64_bin.tar.gz", + "checksum": "0d1eb78051983ade81b7190150329c53c866d44a7416acf7c6f9a6f5c9da595e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_macos-aarch64_bin.dmg", + "checksum": "e993513eb8837399507009ebbc8f980de6fd57ce55196a2e102bfd7fb617530f" + }, + "tar.gz": { + "name": "sapmachine-jdk-17_macos-aarch64_bin.tar.gz", + "checksum": "f5d47a9b612ddd724d23f6641cc4985ab579e134bc79bc264794194b25926816", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_macos-x64_bin.dmg", + "checksum": "0b29168998bf0a72107aca7eff5a1d80a9dacbe5af5cbdbf6026a746ff093dfe" + }, + "tar.gz": { + "name": "sapmachine-jdk-17_macos-x64_bin.tar.gz", + "checksum": "b318751a39c9ca22eba42dda68f7e8b13c137bb7e6d9b108f6ad628577bd0fbd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17_windows-x64_bin.zip", + "checksum": "d0061a21d05d9346ccdd3da8423298b120df1de555b5a754485e90b5a175ee6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jdk-17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-beta_linux-aarch64_bin.tar.gz", + "checksum": "ea5a9951bc963824f7d6b3925fa943642a7fcee2acda2446be7e78728cde900a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17_linux-ppc64le_bin.tar.gz", + "checksum": "98aaa64dff564d00bf600ade92ed3e6b17df5a60873f8b7168479ff715bcbc17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17_linux-x64_bin.tar.gz", + "checksum": "4e0955f39519947c184d40b71871b4a7f0c343043bbd3e5e0b041cc00d70bd05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_macos-aarch64_bin.dmg", + "checksum": "83837fa38b00fdee83023358e50f4542170ea0946a62fab269ab1c4e3dc0eca3" + }, + "tar.gz": { + "name": "sapmachine-jre-17_macos-aarch64_bin.tar.gz", + "checksum": "3cfef9794b762f7641856346847a7fdabdd00e8f35b6032bdc1df91c13b4f4f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_macos-x64_bin.dmg", + "checksum": "011dd0c7a002a979d8dce8625952bb1c8c327fcd58b13b19779956543dd41b1b" + }, + "tar.gz": { + "name": "sapmachine-jre-17_macos-x64_bin.tar.gz", + "checksum": "df56fdc84b0160ded36cb301129678aa142b785236fded43b38c629817c7c98c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17_windows-x64_bin.zip", + "checksum": "6b7d488913a8e7b0319d27b2412a2e46eef4f1bdb79877b1af4a3a5d2ba60229", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17/sapmachine-jre-17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B35", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.35_linux-aarch64_bin.tar.gz", + "checksum": "050aad6ab075cd5385d45bf205cbf530c4234694d2e1aaf1b5bf97b465073815", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-eabeta.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "925277cb0432e9f8572a29f17f537e04d64511447ca0e8daff19e0acb6d161c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.35_linux-x64_bin.tar.gz", + "checksum": "59e842aa3f632905574ab225fd1ce0b918687cc82280d24cfe9fbe6e16eccc7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_macos-aarch64_bin.dmg", + "checksum": "5c77ebb93d2cdb0ba3df4ed4aeb297990c6eb4bde3aad00e91e01d36177579de" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "993290f1cf125651a96caf8b8994e0fa83362644be81ad46b5aa91a685bd8c94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_macos-x64_bin.dmg", + "checksum": "8db62e5bb8561fb807cd60e3dc5ca815e7811b664a1487d24715dcd280b7ffb3" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.35_macos-x64_bin.tar.gz", + "checksum": "2250133447426fe4ec9722f5fdd65f00ddae25e75f5682df18150c7fd8dc37b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.35_windows-x64_bin.zip", + "checksum": "6c54829318d3b7d0d9b1f185db07c094116c26b15c274dcd19e6cec414162599", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jdk-17-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.35_linux-aarch64_bin.tar.gz", + "checksum": "0492435d6640e8097bcc0a28604624f29bfe84479f148cc0a2bf4fcd98742d13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-eabeta.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "38bf7d45de87b2669dcd8625cb79fbea9409a141ce4e20c5ea49fc3c9cc5edbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.35_linux-x64_bin.tar.gz", + "checksum": "be0bf3b952dd22c11ddb9232bb0680f07632abc1c3f072b64825e8e7fe86f17d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17-ea.35_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_macos-aarch64_bin.dmg", + "checksum": "ca0065215e406213d16340eeab5ace5185f617073267219a39e95eb62b2c1c97" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.35_macos-aarch64_bin.tar.gz", + "checksum": "a506e69108e37748dc02067172431dd63d9bdcdbcbd8d45293f5606b623d01d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.35_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_macos-x64_bin.dmg", + "checksum": "dc2f78bd54038f7d79e79ad33d3d5a971a1e1d569670d2f3f3e2d987f5d9bf24" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.35_macos-x64_bin.tar.gz", + "checksum": "6f27e87952e3d25f093a90aaea9adb002663c1af1e03d8cfb74d35c8ff39dbc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.35_windows-x64_bin.zip", + "checksum": "ba7609119ccd73a034e2a3134aebd21f773973d26637d8c233c2239738562941", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B35/sapmachine-jre-17-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.34_linux-aarch64_bin.tar.gz", + "checksum": "2d2b5d6e9d0e7ea442cb697ddc3f07daf0f1c30fbf534f39e714aa6e51d4e0bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-eabeta.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "cf9b31195338ad103c4d89bc13f9e9a5815dfe248b8d6441844af1aeb46609c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.34_linux-x64_bin.tar.gz", + "checksum": "4a194362744145962d32805c140cfb6825db6cbb00b0b76cd0e832d1783cde88", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "cc1ac70ef52377f5c2c78d1729f4ed9303e4b3d5a83ec46dfcb69537eb55a2b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-ea.34_macos-x64_bin.dmg", + "checksum": "80e4c1e9fce1a6b51cef50a8db4b67a8df86ca2b0b8850d2eeb84fafe2cc433d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.34_macos-x64_bin.tar.gz", + "checksum": "022eb3638d7c237d2eea6ab4fa7ca2fc8583ca02910569ca736224f728ff0943", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.34_windows-x64_bin.zip", + "checksum": "9d28c2afa0b86c6b194f09220d0fe9eca3db7f23073b40a557cff5e4cfc5992c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jdk-17-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.34_linux-aarch64_bin.tar.gz", + "checksum": "56a732a97dd92dd358ce47980e268e3d702561419650ef851f397c51998d60a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-eabeta.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "ce046356005b54f4640c7f050c89eaa58116976998f39fe13382f94e00f72a4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.34_linux-x64_bin.tar.gz", + "checksum": "65b87cb7a3dcd534c8d1fe612503bbbcc71b3c1562fd08c1390f643e4a48f8d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.34_macos-aarch64_bin.tar.gz", + "checksum": "b0acad8fb08e7455ab281ec17bfc899ca7f040411bc12f61753294175cc3f73e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-ea.34_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.34_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-ea.34_macos-x64_bin.dmg", + "checksum": "ff091d4034ebe0050f311675d5f7d6a63dfd917b827c3be987426853909f7b66" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.34_macos-x64_bin.tar.gz", + "checksum": "be07e95e6ec5893a2564b7e86791ad2ca64b05e77ff1fbea0195f15ed772159c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-ea.34_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.34_windows-x64_bin.zip", + "checksum": "83d11af4b77769d702041b3775e996c392981476924c167ea10c1c12ea6efc50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B34/sapmachine-jre-17-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.33_linux-aarch64_bin.tar.gz", + "checksum": "69804020fe94e8360019039f04e7b193412bf7e8636270e859f1dd105ab49608", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-eabeta.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "4bac3cfaef030709ea3b169b79f6bc985bbc74d279b033e21f5021e5777069be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.33_linux-x64_bin.tar.gz", + "checksum": "a3cd6d7f2d751d9620a5b67068774cfb8ccfcd0e4e3dc43edd6ac3385f2aedb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "132c4898e3cb810d888dbd171e186ebb7edfb1087c6cb4f44f8e7dcf167d9fc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-ea.33_macos-x64_bin.dmg", + "checksum": "0744b5cb762c20005f68f345bd3fd453f2f0c1863473080b46cabdfaee8a2a3d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.33_macos-x64_bin.tar.gz", + "checksum": "bd0e3f3c055612c2162e062659a6e66f6c34c4e9fd10cbf757b27fd546f89fcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.33_windows-x64_bin.zip", + "checksum": "00fa8e9bb88d50346b72685d8fb8726afd9229e5429a7718050dfbfc296042db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jdk-17-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.33_linux-aarch64_bin.tar.gz", + "checksum": "a26a9fdb5abb79968f546aa1f3cc8eeee0d3b1fc8dec98181c43484c07e78ed4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-eabeta.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "4cbba2c4923b720e06d25fa0a6e3f762790f243503b8f1d09dba91abaf359030", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.33_linux-x64_bin.tar.gz", + "checksum": "b633f32ab887eed6e41447a5dd01bab55841463a55df396798fa0441340ad2f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.33_macos-aarch64_bin.tar.gz", + "checksum": "6e0362d86302cc6e1be69489b6ee71ad384e021011c119fbca0552ee125a57b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-ea.33_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.33_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-ea.33_macos-x64_bin.dmg", + "checksum": "30ce5469b75c429bb1f674525bf21cf0582f1136e1d6224d5d291a60dac636a8" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.33_macos-x64_bin.tar.gz", + "checksum": "50365d9a3b306e506b2f427e33ef489917fe733cfd347ec9c9496c8956f866b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-ea.33_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.33_windows-x64_bin.zip", + "checksum": "6a8dfcb06e857425c493a49be1412c174b902e63a630e884b00f5b58d570a7c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B33/sapmachine-jre-17-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.32_linux-aarch64_bin.tar.gz", + "checksum": "91de8a9fc9c92b1f57e83be27bff2387bf794ff3d4b3e60136e9793745f522fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-eabeta.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "49fb2ef80e81eaceb5e7e64993571799d2f1b757d7d9867d751028df85d9ca4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.32_linux-x64_bin.tar.gz", + "checksum": "54383f8904e84cc7b57a11ecb7f1467be51c9f0559007edc3beddbfbce9b61a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "a8e0a4da9e232e2934bb92273628eb219931d893e27991f6714cba5cc47c102a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-ea.32_macos-x64_bin.dmg", + "checksum": "dd91d05669f310eb2809210ae3838e777200c5fcee49aee7ce1d06de5b532710" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.32_macos-x64_bin.tar.gz", + "checksum": "a327220f0991807c16da30f02fd89b23d16419088f51a832a1a89b13acebcb11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.32_windows-x64_bin.zip", + "checksum": "9dfcaf4006a135406cbb67aa87ee80caef6bb60fef89b2d3e96f365a70406375", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jdk-17-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.32_linux-aarch64_bin.tar.gz", + "checksum": "17cc9125062eab740f8bbd20bd1542dac64b61c5e3a96d6c2a76663c25dbd2bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-eabeta.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "129c437db4c1e7586b9bc5781ebcc8b9c0bba67d8e9e0b5183a4f2567ce1d281", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.32_linux-x64_bin.tar.gz", + "checksum": "a97187b1d69af16deb76f8543b8bf90ef6f54ed545e3a69e360332092e4b451d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.32_macos-aarch64_bin.tar.gz", + "checksum": "4e8a59fc564fca5d45495453e9b9056d8e85eda1efca3524856e9e0cfd0a2658", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-ea.32_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.32_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-ea.32_macos-x64_bin.dmg", + "checksum": "c26292f00254eeabb2869b6f15c3e4d16fee0d2c649736885bc488b2a2e7a94b" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.32_macos-x64_bin.tar.gz", + "checksum": "5e008bb19819943d89a0954b2d9cbdbe763ebd85daa07bbf31acddfde717fcac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-ea.32_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.32_windows-x64_bin.zip", + "checksum": "609d022d27a7ce4b3da233e5aaa762a669b5402c64add3c1210435b5ad0bdea4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B32/sapmachine-jre-17-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.31_linux-aarch64_bin.tar.gz", + "checksum": "7ad6da997685d6d0d42581818678940d1747736fb7a40d91358f1d0fad646588", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-eabeta.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "42a1065565db1e879224eb3c41895e001cf85371657a153d3684be600aff1b5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.31_linux-x64_bin.tar.gz", + "checksum": "9fd1a1ceaf6b33ab7eba15fb36eea03a08063b74a16a0e6764eb4acc1a029e37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-ea.31_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "73e8a9cd670c59e370d1be1365dc7adc47ebadff0df2ae5dfb91ecf7ce543316", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-ea.31_macos-x64_bin.dmg", + "checksum": "bdc6beb7133201275cc7405b8de5334466b394180b2b4e9857fe7417c3df910a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.31_macos-x64_bin.tar.gz", + "checksum": "8c529e6e1b10b92c73438b87c0b822376d551c5cf0fc9fc99627f841030f4148", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-ea.31_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.31_windows-x64_bin.zip", + "checksum": "d857d2fb56018a0bc3648e743edcdca0e0dacd2f3155af66843f872402c0de8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jdk-17-ea.31_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.31_linux-aarch64_bin.tar.gz", + "checksum": "10b3de88484d5072a2e4679d5c5f0873823dfaaa6e0376e6b8156dca9138edc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-eabeta.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "abfd2e607733b769beda76b1e3e6d804fb85fd699ad64f6368042eb8c99ea703", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.31_linux-x64_bin.tar.gz", + "checksum": "4fb488ecbd17e88a52289a403a19e21490fac0b0d07b1c88f473c303e517cbd2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-ea.31_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.31_macos-aarch64_bin.tar.gz", + "checksum": "a53c3c3306bcf44f275d9b5084a02a587cc75c13005cf4c75890ac2d4d4dffc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-ea.31_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.31_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-ea.31_macos-x64_bin.dmg", + "checksum": "3c3a75a82e793ae334b8d9d005aa2d87621df762a80ef0f1fcbe597f1e1895b0" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.31_macos-x64_bin.tar.gz", + "checksum": "77567ab7793ca9a6edac1a8feb4a6988e2615a24255faa954ffa3ac94e3a3644", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-ea.31_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-ea.31_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.31_windows-x64_bin.zip", + "checksum": "941f19b88da5c1545a91ae7a4ac3493003e9251e8ceebc43f77b39d334906ca4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B31/sapmachine-jre-17-ea.31_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.30_linux-aarch64_bin.tar.gz", + "checksum": "493a2f62e069a1bf3f2ff949ce171f073a58d247126b57a2f972050628dbd146", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-eabeta.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "c8917ab5121c47f2666923613ace008b0c1b9314d530a5cc8174f88a6870dc4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.30_linux-x64_bin.tar.gz", + "checksum": "28994bb828c87e40bc389d458b5c622faf752d6b7f83a6d2af5ca3788d1cdd99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-ea.30_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "d393ae4a3c99c0198d2aec4c0641096bbe4c423707b9128e2ec16f32b4e9df25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-ea.30_macos-x64_bin.dmg", + "checksum": "c3ea60d0c6c36cdfef6bbd45c5e3f440d76338d14e3918ac7d6be2bebf542f87" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.30_macos-x64_bin.tar.gz", + "checksum": "eb21f904a25e56a48105a58e511b1f637f90df436acaa7eb48f5c84671df1444", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-ea.30_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.30_windows-x64_bin.zip", + "checksum": "aa92e002bad8b45aec8accc733c0a9a0f113f21fc7b0fa423963cd26046579ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jdk-17-ea.30_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.30_linux-aarch64_bin.tar.gz", + "checksum": "2b7f18d5e9942471953619d4326226601b6f0d12b39484eda5ceb387de95f19b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-eabeta.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "852a885087a2ff072161305efdad153c61285944e2978b789ada91d7b5391b89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.30_linux-x64_bin.tar.gz", + "checksum": "2d715e2025a9ec4fb210253b7ea3557510db8bcce065d89db54d8cd020a3a1b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-ea.30_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.30_macos-aarch64_bin.tar.gz", + "checksum": "0fdc67250480859e82d5ffde258997519f64b9426b7b7e0c46d89fc22dc6cd0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-ea.30_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.30_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-ea.30_macos-x64_bin.dmg", + "checksum": "99828db620e91c78df2894871768b7ceadfe5ef6240c3a5fca1213ec255e3bf5" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.30_macos-x64_bin.tar.gz", + "checksum": "fdcec507129ce1c86308f9d25d9f6fc0b4556ccf666b703cca2cfac20f42ee80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-ea.30_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-ea.30_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.30_windows-x64_bin.zip", + "checksum": "b7cdc739d860c3548feba6f1a4758617565fb5bca8569b128290d79db45fbee2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B30/sapmachine-jre-17-ea.30_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.29_linux-aarch64_bin.tar.gz", + "checksum": "05fa39e6763f8567ff45f36bd4f0c159b2eb3d66030317383ec146b800e33433", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-eabeta.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "0f80d80f80c3569d7f482f8d96dd8be2aa34b641539bfd64c3fd7722742a45c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.29_linux-x64_bin.tar.gz", + "checksum": "a2bb6d04aac17e367d6c80fb1cb3ec994051ab7c22717228f51ec376cb9c4322", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_macos-aarch64_bin.dmg", + "checksum": "d078ce51ec79b3af1eebb84b30fd9fe4f9b36ef65d22036a8c619f1824b3f1e2" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "be35df62d5a77bb9f6f3c4393840bd41ec3800b94ba6b414651d25e8f9f5261d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_macos-x64_bin.dmg", + "checksum": "ebb774502efa3832a7c3b2001a5f6befefbb5953edc879fbf37032c72bc1c819" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.29_macos-x64_bin.tar.gz", + "checksum": "5c0f7e1f4f6c3be769fcc4165ae1628d9f1bb9fac53a90dc6c865ed7779c486b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.29_windows-x64_bin.zip", + "checksum": "3dcad502d1700234a6138829c2614cc82c523a5c5ea01ff2449174b5df455a94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jdk-17-ea.29_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.29_linux-aarch64_bin.tar.gz", + "checksum": "ef4db92cc91006cfe449444097a1a2d9f5a81860c6bc9ca0355ef159a9154672", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-eabeta.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "bc3a15cba40b7dcf262a3bda33a762644cb493460e8c5bb98852cc39c8f07076", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.29_linux-x64_bin.tar.gz", + "checksum": "4ce5376ff08a89a1b23700996910be5f010016ab16ed2b74d38fb1b76a502b74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17-ea.29_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_macos-aarch64_bin.dmg", + "checksum": "74f122a414e06218cacf91a1ae58bded6d065e3ac7a167eca9743bbdb23874b6" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.29_macos-aarch64_bin.tar.gz", + "checksum": "ae059485d1cc45221f8f3285a266be3b68124eca3861633140a3fa755e92a1b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.29_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_macos-x64_bin.dmg", + "checksum": "984f3e28ff017e6ee27074027353a983869e18d21d1c43a96b2d918e170d3cfc" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.29_macos-x64_bin.tar.gz", + "checksum": "27b41e14d8d48527a317fc27c82d6d03a58d8a92c3181de13855e128171f4600", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.29_windows-x64_bin.zip", + "checksum": "34c978b6c78ade4d623502b45291ca20fb5c18c5fa28a04caf45d10d0fca73cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B29/sapmachine-jre-17-ea.29_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.28_linux-aarch64_bin.tar.gz", + "checksum": "cf4dbb29e4d4b4ee32392e08de5f0e67bb01cbae063e048c422b714c601cb674", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-eabeta.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "f6bb42afa951b69eaa6020770dc4f2777da8296240eea60808576e00450e35c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.28_linux-x64_bin.tar.gz", + "checksum": "c8a2c621191d6357e2cc4d4e97eb082dff8ef667ab8d1e5d4bfd19fb949b572a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_macos-aarch64_bin.dmg", + "checksum": "adde1d002da90c9dd25b829dbe15bbe4ce5e5d04789a4e4b0c2e759e2c9a53cd" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "d6463f5dac90323c870f93549db984d0784c380715b05d86e9e02afcef614746", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_macos-x64_bin.dmg", + "checksum": "79c95f2e20ca858c90f798eaddf9a57cbff2058f9193364ed0395326d7d8d220" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.28_macos-x64_bin.tar.gz", + "checksum": "8ba44a4a37ac41ff0ff1ad75ef744f21976b2d4fdd445d56ff67df2b03018d89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.28_windows-x64_bin.zip", + "checksum": "9259894c9342fb11b0a33fa7ab199c8ed7c41cb118ed429532a5ee8e4968c05d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jdk-17-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.28_linux-aarch64_bin.tar.gz", + "checksum": "9cae2b06dfa6d1605a5ad3b392b45c92a590d7bda7de1178becd9d8389776479", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-eabeta.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "f7a1ef159bdc88c99bdc5b8d4c7013e337d071e3347ea78bffaba3a361cd16d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.28_linux-x64_bin.tar.gz", + "checksum": "8d7bd41e02bf3f0930081da5891da73cd4bb17358604a2854146cb6015607e16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17-ea.28_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_macos-aarch64_bin.dmg", + "checksum": "b7426b68ba47767dcc7b6247a4bbbb834966b1553f3e4af844f42a9cee4d5530" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.28_macos-aarch64_bin.tar.gz", + "checksum": "70d51cac864409e46068d3c22aa30b93cedb6e0a88c4c89cfc718ae861034c1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.28_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_macos-x64_bin.dmg", + "checksum": "f0b1d53de348af3499ca94a807050e3b6dae29cb1042fd414a5e7a47d8f6b174" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.28_macos-x64_bin.tar.gz", + "checksum": "1ed37ff3e4040de78d5c6f63521f33edba9f02cdb17b1fc0a7ecbdcdfdf2a7f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.28_windows-x64_bin.zip", + "checksum": "6b34efc1e5d6225d818568e01bf5779dd3e9476b3398a186064ef0aa326cf8d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B28/sapmachine-jre-17-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.27_linux-aarch64_bin.tar.gz", + "checksum": "72b2c8a6979851411cb0e22c562d4b0645a2f05ad9729ceb4b7484312e7bb690", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-eabeta.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "fc76379d3b112e04653bdaae8efb97244509144c0ec72d8091ab2f51ea6d2112", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.27_linux-x64_bin.tar.gz", + "checksum": "2f30c8ac7b735b334fe93570d8e1dff488f856aefef88c863b0584ee97e20c04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_macos-aarch64_bin.dmg", + "checksum": "5bac05f7fb76d5af9f7e14d72c88db310f7a12299f6d36f60905bfa3579bd33d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "bc963086a7ea38d1e97412ee432d70632c3d4ef3b61a4fbd24f7e3ab4ede6506", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_macos-x64_bin.dmg", + "checksum": "19e5ccd23235ab62fcad8b22b00eb96a72c39c0e5df6715f0c6280013bd91216" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.27_macos-x64_bin.tar.gz", + "checksum": "b01b3201cdd030ee2111930f64cad9733d24c12ab9e2a5b3a5e15d7d2c5c4503", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.27_windows-x64_bin.zip", + "checksum": "fdf84a5f6f34cb6a324d3440b7c70e975a260c14f0c469613671823aa457cc69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jdk-17-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.27_linux-aarch64_bin.tar.gz", + "checksum": "31b3c244e83817d212a1a45bf0f38272515f418f7e07843cfc2a63bceb98bf04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-eabeta.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "c0de865aa06a29dc2ba3c5e349541cb353521432bddbabeaf2ca9752283481af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.27_linux-x64_bin.tar.gz", + "checksum": "51f4b4c618ae80e16d4d3281d275fca178fb0adb476f7f445f29cabb15e841d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17-ea.27_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_macos-aarch64_bin.dmg", + "checksum": "d97f223bae4fbe7c49aeb7767a520b9bac2b2883e36609cf4a56374d5accd053" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.27_macos-aarch64_bin.tar.gz", + "checksum": "076ceef6b4ead365fdcce48053f2d111fc023aa7478b24d32be504a8a48cc579", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.27_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_macos-x64_bin.dmg", + "checksum": "0582df6ba59e89bc28ba9059cecf5628640d159700ea21c34d10a3af213278a2" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.27_macos-x64_bin.tar.gz", + "checksum": "d343c6f03fb14a9afeaff8737db213d054af80de06d29f2b37d491bbffe87b38", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.27_windows-x64_bin.zip", + "checksum": "4cb66905a29def2fc72ea1b5ba18656436a088e8699ca2974947128d2de91424", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B27/sapmachine-jre-17-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.26_linux-aarch64_bin.tar.gz", + "checksum": "b93824948c04925ff8faea303cbb1c83e5b665ef1cfc0759b8c4eddca27ceef7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-eabeta.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "406322c79347d30c80557466146947567aa2f92375ee40737bc61e3378f7e3d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.26_linux-x64_bin.tar.gz", + "checksum": "8941d106f321956ff4ff2e79e570c68a2da24a9d35633c1acf902688d30e8761", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_macos-aarch64_bin.dmg", + "checksum": "4793a9297ce09a87d1df5a6ab3b0dabe5d88314bc2e66dc2d7a5468d50a9c900" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "28d581ce6b5bc9a3f9caeff533ebe433134eacdb46e0613987279e68f69c08cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_macos-x64_bin.dmg", + "checksum": "b7442f797ab7b4e69bc84ba9dad4f1a68ae97e6d20ee1dc4ea00897b2e167369" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.26_macos-x64_bin.tar.gz", + "checksum": "1b9573d852f4c0e4b7f8df0355a16826d7c729b08c498a6c5761643ab562a290", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.26_windows-x64_bin.zip", + "checksum": "cb2e9822aa1250680ba3177f658325fb2363b836f479d1fbd9e153e9e0fed2f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jdk-17-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.26_linux-aarch64_bin.tar.gz", + "checksum": "b9282a67c9fd50dbb57b16037f5ac50918de18491dcb176fc381aec5dfdc0662", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-eabeta.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "0562da44539b03a4fb7c9cf8592eb91bc38207ecbf5f2a09ecbfec3d25ac6343", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-17-ea.26_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_macos-aarch64_bin.dmg", + "checksum": "5bf77d298595c71fc35048010ec6690c095e54bec73c8ed8bd09836f27af758d" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.26_macos-aarch64_bin.tar.gz", + "checksum": "d50af46225dc14c3ab6f9c5bb883e6540cd6e883b41367856b248dbc85b677d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.26_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_macos-x64_bin.dmg", + "checksum": "10fc3dc051f5d79699c3a577d86ee5750ce5779ae6dbbceb78b7c7977514f7c0" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.26_macos-x64_bin.tar.gz", + "checksum": "3ff42e8a9e269e0951530ec2cbb2486151ac598d40c513f56d4f49021e1cc562", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.26_windows-x64_bin.zip", + "checksum": "d674781472a8ab2111078775196866df612fce8b84739fc27356b5a1b088d05c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B26/sapmachine-jre-17-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.25_linux-aarch64_bin.tar.gz", + "checksum": "4ca2df61b16743483fa482ffc0ba44e3cdeddeeebf636ee79c78e655245bc91b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jdk-17-eabeta.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "160f77c5b7afa91febaf298d4507ae08cf299908be865262f119dc26f27c1604", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jdk-17-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.25_linux-x64_bin.tar.gz", + "checksum": "694aa01b41197da53012595cb212aeec0476082e351ea228e6f68ba901f618b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jdk-17-ea.25_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jdk-17-ea.25_macos-x64_bin.dmg", + "checksum": "a539952ab4eb037d69eaa89d10b1f0417ad5d11562c134a9b2451b25d56567b9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.25_macos-x64_bin.tar.gz", + "checksum": "5631ff86afa564aafc1ce4026fba69d1df2ad0415093ae1be4fc5b7e67ae21e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jdk-17-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jdk-17-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.25_windows-x64_bin.zip", + "checksum": "e3846bfa3944210261c2eb626c530aa03947422f0cbcb39c5cdeb078d1b3f78e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jdk-17-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.25_linux-aarch64_bin.tar.gz", + "checksum": "c9117ea444a19c79411c9b5232efededc392c4d7cec98b1565183370f6d5490f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jre-17-eabeta.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "08d77cb502f9ea7a9a49ca2d551a709a140ad413a76d0e9502be2a200de8c52b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jre-17-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.25_linux-x64_bin.tar.gz", + "checksum": "7f3dbf1a520f790c0b176ebf0e0e6e911324e820bef8dd8a1911dbac9f9e6995", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jre-17-ea.25_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.25_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jre-17-ea.25_macos-x64_bin.dmg", + "checksum": "dc9fe92ccab157d6330b5a6f8535c7873d56d2b828e13169ac48e1a993b80c19" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.25_macos-x64_bin.tar.gz", + "checksum": "45e76185b299e54c9d7a2ca365f9ac70c6b47fb46029a7080a4c6fbd76f29927", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jre-17-ea.25_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jre-17-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.25_windows-x64_bin.zip", + "checksum": "89050f424c30317a5e24e6c9bd42a311e3413b1eb04a82bda4ecacfe853690f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B25/sapmachine-jre-17-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.24_linux-aarch64_bin.tar.gz", + "checksum": "f045081bbe70f891edbe91e7a9030d979df137601caa81a6046051bc27062ab6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-eabeta.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "b5967603dc420c34c5f0427cb4cb4ca29f674f845ef550321a58b52bc547cbaf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-ea.24_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "e5f840f46b7aaf2512a81d6156739673a835808e931f9a2917ba109f37d3be30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.24_linux-x64_bin.tar.gz", + "checksum": "eafc75ab1691661aadd147b287bc41877d134a7ef4870d88843f549c6b2b7e89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-ea.24_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-ea.24_macos-x64_bin.dmg", + "checksum": "e88a0313879c1ef537c074c10e7de83f22cefa432c6d46ad2803e79ec6dcf2f8" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.24_macos-x64_bin.tar.gz", + "checksum": "c960693a90a8316485152c5a802b81d36363389c774532df1546d5dbf0bc985f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.24_windows-x64_bin.zip", + "checksum": "e392ddf1e355d7c8b6f109239b7c25ad03fbd02bf6c1ce4d0633cb99f7c69e47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jdk-17-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.24_linux-aarch64_bin.tar.gz", + "checksum": "e8947c5ecd538e6d2203da7c6dbaeb5051fe1e239638ebf3cb6c6ed94389feab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-eabeta.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "2e0f1f675d52668e9b58b95e6b703efa0ea1316eb956c5ac5b60b032a281f6c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-ea.24_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "53dc79ce6315bdf2259b5267c84e6738125fc776b6902576f01e3ef15f320de8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.24_linux-x64_bin.tar.gz", + "checksum": "d3ce4a496562d4daa2481fe83a2b861953456ef1beed0e749e741f142aa8640a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-ea.24_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.24_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-ea.24_macos-x64_bin.dmg", + "checksum": "0b6dad93c31127877b37a4855c8578c353bb8cfb49071649f9754c856411f2a9" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.24_macos-x64_bin.tar.gz", + "checksum": "a11f132ce6800101412144331ecf6c19f2c3426cd99356c742b4edb4b341f62b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-ea.24_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.24_windows-x64_bin.zip", + "checksum": "a27abcce76a7da347e25fab73010d4ce78e34b7471cac83a5a95260696f72248", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B24/sapmachine-jre-17-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.23_linux-aarch64_bin.tar.gz", + "checksum": "8c20cbde6609b404a1644cddb547e6e52b493aa4e75a87815d1e95591c38fd11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-eabeta.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "b359d4418bcfeffbec56c7844c9d7e99e325d0dbd38063d9080445106c7e81e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-ea.23_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "29d3544abe2ffdd148e08736c81318369d3226bd08bdd62067a60098d7add9d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.23_linux-x64_bin.tar.gz", + "checksum": "06d3d8e5ba1a00fba0854a57e6804f839d9d19a9d24c9f4379f99b65efbf7fa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-ea.23_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-ea.23_macos-x64_bin.dmg", + "checksum": "57ddf4e12cbd08c8e369d85c1ce561af781b6afa31ef7cebc98c5711fb138898" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.23_macos-x64_bin.tar.gz", + "checksum": "3cf1aaa152d5eadaa96aadffe9498d2ea8c29b0f4eb13d2befec8cb6b0c207e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.23_windows-x64_bin.zip", + "checksum": "fb27af13e7dacb3f0a2f73d10fa8ecf9e1eabfe99b671089a480459f5c4c061b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jdk-17-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.23_linux-aarch64_bin.tar.gz", + "checksum": "87b19348f421406fc43a3695e2d7fbcee97c428a215d34d3df4fee5f022e86ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-eabeta.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "975b88473059b4bbbc1eb5eaf24ece641e55b40db4416cff1739a859ec9c2b6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-ea.23_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "7568ae2b4593a05daf31420e3e7ed603bf40cc5969b658d6d7fbd0cd41917e28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.23_linux-x64_bin.tar.gz", + "checksum": "0bac621900a936743b40b95bd0234355301dfd80c802bafdd46b0fb2233763af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-ea.23_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.23_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-ea.23_macos-x64_bin.dmg", + "checksum": "ea020ff10b32356315e4d01e58b4f2fffd2d61a481b72fc15ff723bccffc5050" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.23_macos-x64_bin.tar.gz", + "checksum": "7a05202fd5fd0e6d88f55917d83bfd816bad68584cc5f1cccf627921d7856b51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-ea.23_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.23_windows-x64_bin.zip", + "checksum": "4880035424240e409946dcc8905cacf84321bfd891001f05b3f9bb2ac2c0ef2b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B23/sapmachine-jre-17-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "1a65c766ce4510cd3d70ba69443ff198c71146be7d1fe4bceaeb540330b05fe9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "532b635511a5bdc2680db9f8cfd85ecd8b9b36d24570ac7890ac10b1c7f66aae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-ea.22_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "9a85a6b58e7e357ac4bab1cb33b888d433d79b4d96a036981813f9ee6900155b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.22_linux-x64_bin.tar.gz", + "checksum": "1ad928c7a6b23d28f6fd697d173ef8852ab847efc91799c783bb4a40dbe8d380", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-ea.22_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-ea.22_macos-x64_bin.dmg", + "checksum": "2d320d8d9d8190bbd31b73527b16b660f8b26de08ff40c4b7588de6980ba38d6" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.22_macos-x64_bin.tar.gz", + "checksum": "4af4830e5ea21f3ee24d44988e079b66357ac1d4b9de96b9ab1e9b05e82654ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.22_windows-x64_bin.zip", + "checksum": "7ddcea54ce76f76ab8554d5f0cc2d7d73aebf3cdfe1fbaea92d3922c59aace51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jdk-17-ea.22_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "ffece4a8c0ca62529ca7d6bdb328bdb6174ddd3cbc515bb2dae384a68fa218b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "a915b84d68da4ed35c604be4185a289ad1ae72a5bcdf99f36b2b72b827279b10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-ea.22_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "8af17b374cae2b2167b469a4a2212aa0a4babe0e7896f1af23d8d16cce01685c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.22_linux-x64_bin.tar.gz", + "checksum": "484d978a8dd0797fa5a59a3de6fdfb78bbfeb02174969c374fd49c9802418f80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-ea.22_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-ea.22_macos-x64_bin.dmg", + "checksum": "9ee1d18b4fe2aaf5766e9a1fa0c280c52e63854bf131302d34a17db8f6dcfa80" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.22_macos-x64_bin.tar.gz", + "checksum": "9c9aa456783cedc11ae28c658269ba76aafd871abe2a8ee8b786202f76599fd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-ea.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.22_windows-x64_bin.zip", + "checksum": "a02ce000fd3881d1ff6b445da028525fe50590ea514b5e45e0ceac7d563c798a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B22/sapmachine-jre-17-ea.22_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "3c8ff927a80ba75e7dfba012acce2efbaa91d4b6ef3e92741d5f9aafe5949d45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "d3c72bf36e6a494b84d36899570d831a0c4da19442c183060ea27d94066bf188", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-ea.21_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "82a8ef6197d06e8ee91fffab35caddc382cf2104868ceed8b032e857d6ddb07d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.21_linux-x64_bin.tar.gz", + "checksum": "e5bc0f3ca999ae96007beb02c32b33aca545fa6db5227341e7c740b4a7f4ff2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-ea.21_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-ea.21_macos-x64_bin.dmg", + "checksum": "01a1a55df53663605515072cccd6fff1f34ce47254c3572c03c6c164de266760" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.21_macos-x64_bin.tar.gz", + "checksum": "d48572cce59c33a176f40c35bf1bb041abe5166b4df25605ade666d224b5d2f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.21_windows-x64_bin.zip", + "checksum": "f25c1012ea885e9def295b140d305962c2fa6f9597262a647ce40eda98e3d916", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jdk-17-ea.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "70fe5ba17d9f65017dd9d91e273b36a0a5924970dee446c8611a7d362645ac2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "a5fb757369774672f55070c20f98de6dd38a16af4ca5214ec8d3324158daf92c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-ea.21_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "cbf58ab0d85f700a55b800ccf7254293620ba2503785be77ab434cc41bf4ec17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.21_linux-x64_bin.tar.gz", + "checksum": "8d3ed8a64426627b1b79bfb43fc16b5f56ca612f4017df646979c991301e76f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-ea.21_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-ea.21_macos-x64_bin.dmg", + "checksum": "5cd50cfde9eaf283324e9c185de69167424ac23d7fcb42251e70bc315984ab44" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.21_macos-x64_bin.tar.gz", + "checksum": "6dc7259cd9097eec4a7e23575900f2f392b54c1affbdfd5d66cddaac0bf994fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-ea.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.21_windows-x64_bin.zip", + "checksum": "1e2b1629a09a44d8d2bd566b320870aa5957210b421dba1c1608bc1430618077", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B21/sapmachine-jre-17-ea.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "c387d5af55a5ad31cc29965f5ea40f9cf3a5eab3b4e6b15d3bfeb7232028be62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "3a73658ad36ebc9838e8c27807841700abfa7827ec0df02988fd45ea818fc087", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-ea.20_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-internal.0_linux-ppc64le_bin.tar.gz", + "checksum": "4905b4e350ac40e6effe8cfb3614446143e0882b5b482141ab5da50e1036f98d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-internal.0_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.20_linux-x64_bin.tar.gz", + "checksum": "549565aff4bb3860761b09ca2e0f4fc9c1f4625b0ec2fc7651092bf79304a1a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-ea.20_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-ea.20_osx-x64_bin.dmg", + "checksum": "01094e39c403a967ca3b1459e91b9822f37bc8321b331aa76be44acadaaebe04" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.20_osx-x64_bin.tar.gz", + "checksum": "64220b81257b330ae1bf418801ef45759d82e69976a2bd4cb44f99cedeaf81d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-ea.20_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.20_windows-x64_bin.zip", + "checksum": "0eed873c536ca93eacb009606fc75a7183da69e906f3b07c22f24cac3d975bcd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jdk-17-ea.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "b16618638b685fd0a824d7804f1699eb388ca19e94f9e5b0c4f6b4ec1e0616de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "809b5e32f99b743c6b4de3149e6423d0d530976d532b447faa788a6e1b2fd248", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-ea.20_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-internal.0_linux-ppc64le_bin.tar.gz", + "checksum": "ec50899807008b05d7fdbffd13b00dd8b661d10b1ab0cc0bb29d0068d9c0a1bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-internal.0_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.20_linux-x64_bin.tar.gz", + "checksum": "ef846e50ca893756f72d9733ae6c3000d348140ee7295b941d539caf885fc768", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-ea.20_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-ea.20_osx-x64_bin.dmg", + "checksum": "b559ff10fc1cf43920a50e75d1c060191d7d2ab5d478ec48a5252fa0b096a705" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.20_osx-x64_bin.tar.gz", + "checksum": "46cff3a449cc66c4e4fd93c4a2b8e468a88d2893561cd4234deeed6d62a72d42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-ea.20_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.20_windows-x64_bin.zip", + "checksum": "3a9663b9872499595fbd4d7a892edf6ec824bd1c99fe7a3d774bcb690804e202", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B20/sapmachine-jre-17-ea.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "ad3a1d13965ab4792f58d8ec994c52a12049397996bcc9b0ea937562d78e84af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "80c92fc5287d95cfed2d8f4d625db79c13f3586b04c80fabe780925c257bd9ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-ea.19_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "0fb6fe517b367e8bacfee34623c064d5a5ef080b9aab37ce99850c07f599e17d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.19_linux-x64_bin.tar.gz", + "checksum": "23ae3c2e93a46ab17de25117330f44b2ff78ee358a63a19f5cc886e68e6c03c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-ea.19_osx-x64_bin.dmg", + "checksum": "22a71f7f95a465624ac2448f778110a1229f2be111de40a153b63e2c5c997e4a" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.19_osx-x64_bin.tar.gz", + "checksum": "c3ffd50510090eb95e454647a6ebb02c47cb921b51a129812b8765d17b846919", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-ea.19_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.19_windows-x64_bin.zip", + "checksum": "2411e94b1819cd33dc8b0e6bccc1834b18233b80a23f072fdbff0f0ce7b3b8f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jdk-17-ea.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "b58aa5398d9b9986d27c21defc5f8ea7bdbc3ef336fbb311479dd58c0375951a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "b821b57db2dd22076e15fcf2277767a03a8b9b5cb8aad24341cf09f5dbed31f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-ea.19_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "bccaa33ca41a1fe4369335c55d4287acc38a221ceaab45effce5a52cd390372f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.19_linux-x64_bin.tar.gz", + "checksum": "b1f36675e4d46538b428b8745238bc3fab4ef0f9dbc87145e6491ff21bc2219d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-ea.19_osx-x64_bin.dmg", + "checksum": "14793c9dc048d34bc44b1b73980a73d1713ac2571879dbced8120bc2f97e31ce" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.19_osx-x64_bin.tar.gz", + "checksum": "c88ddea4df42e51f856af72c0e2f9b98cabf2bf91818396554aeff6de669a86d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-ea.19_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.19_windows-x64_bin.zip", + "checksum": "f402d048971beba70027b516b7e1489e001730572ed36820e43ccb6b23745770", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B19/sapmachine-jre-17-ea.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "46d55d29ad9040b85f9f4dee7db8b596ad46d5a9c4ceb1feaddeed768a168e51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "bb96584805ead0f139a7ede6653fbbf8a8ca82944feef6927c33e1b779f42959", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-ea.18_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "4229b4eaf84754d22b463e2d27b48c604e51b0fb40aad92ae44cff120eedcbb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.18_linux-x64_bin.tar.gz", + "checksum": "668c1ab10c67c4ceeec762dbe88657e327dffea87fe82578e2cb001398a47fd2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-ea.18_osx-x64_bin.dmg", + "checksum": "39806d1f02dde62558254ccf0778206056a74c216777e000ddc525e94ba748df" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.18_osx-x64_bin.tar.gz", + "checksum": "a8d6cdfda4e26b7e910e9190eeaeb77aa2e72c9904ec85a6099833fbbf33a6b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-ea.18_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.18_windows-x64_bin.zip", + "checksum": "cb95f111f91a0d5a5712c9363ce7f82036c545feca46c75c4fe55930e3800a1d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jdk-17-ea.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "1cff47a39c67ba4a68b21661fef52a1de56843834a3c9d308c57d30ddf0b30e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "8288de4b0a58bf089bebad746dbcda26eaf352c8cc36ab0bbef518919fbdcb4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-ea.18_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "3a64262d02082a84b8a0edc2055663152458f7380f672b5959169a3d32dce509", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.18_linux-x64_bin.tar.gz", + "checksum": "a6c6ee0e28672cabb68b8815f8838ab5f4f0b2c57ac8e27b88d3d99c8beb3d24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-ea.18_osx-x64_bin.dmg", + "checksum": "e5d952e2897ad3fc82de0226c430f8fe8d27fa76fba2a1d8ae8c5ed062558fdb" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.18_osx-x64_bin.tar.gz", + "checksum": "c7030d6b66849aff791492ebeec6fb579eb3cc75549fa3a4ae0e28ac1a5f340f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-ea.18_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.18_windows-x64_bin.zip", + "checksum": "fc41b823b5d1494a4a38e70f98845c699915c35fb6b1225026a5a596ff942678", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B18/sapmachine-jre-17-ea.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "91005bbf4cc30ed3017f2f6d79db8001846aa92ebf096104d7e317273fb3a891", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jdk-17-ea.17_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "998ef5e7a112baf752739a8a4498627e8e5b484cb42fa3351620c7406f8fa607", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jdk-17-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.17_linux-x64_bin.tar.gz", + "checksum": "e99aa89dcb00827ebef98bc6a9948ecc4177da35f5102895360e292aaad9c01f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jdk-17-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jdk-17-ea.17_osx-x64_bin.dmg", + "checksum": "481e11681239dc7f58aa31e4eb63e448adf4f0f6ba8e63f0c7063cf0f9f16057" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.17_osx-x64_bin.tar.gz", + "checksum": "314bf9c4f353dc7b3f99a5b325a247c7f5f190dc208ba869e0849f3348383c61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jdk-17-ea.17_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jdk-17-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.17_windows-x64_bin.zip", + "checksum": "ca24ff0658a681f22cf43c8780fb24f6181076e3919e32f19854c8006084d7fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jdk-17-ea.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "69b9f6583572478d53e6aa987add7fdbfe8e909b4afff64e873be254ad1423f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jre-17-ea.17_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "b98959f10687a1eb97c42e96732ad98d6bb5d09965e6257ed2377480fde30b35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jre-17-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.17_linux-x64_bin.tar.gz", + "checksum": "d20a58540d6e68889da78626233cb9354e549f005c4d93aec84b1df5f9a3502e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jre-17-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jre-17-ea.17_osx-x64_bin.dmg", + "checksum": "41765ba7ba7b376dabcc602d28a4f7ff439cd4c77312f9258359554c236119e5" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.17_osx-x64_bin.tar.gz", + "checksum": "a82bcf3789fc4d355f2c7888c4cc27f16c05d30a4fe0dc0163646dd344b6e8df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jre-17-ea.17_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jre-17-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.17_windows-x64_bin.zip", + "checksum": "7c92b2dfdef06b486ca7f8377c8d2b236bb6b33fd165f9b9fd5b2b8e809c9cbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B17/sapmachine-jre-17-ea.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "352acd3830b7da6ddd70eeac4dc2238cc0a65bf175b8fe78b18f5edeb04ff906", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jdk-17-ea.16_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "0d0cb3e77bbe48e12a26f10a680c7f64cb5a5d2f5c83d9d9b3b743fa053d58d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jdk-17-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.16_linux-x64_bin.tar.gz", + "checksum": "73e00eb61d0c0888a58e74dea653f881290630edc13fe0bf81e6b9b857e28982", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jdk-17-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jdk-17-ea.16_osx-x64_bin.dmg", + "checksum": "1fedb746b2aba4d16dab056828cb7467dcd3197ed5e2a6d987850ee9197d6cfc" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.16_osx-x64_bin.tar.gz", + "checksum": "73404b75065c35e85808a1566aaff183a4fec74d0fa57de63acc1bc9b0323dd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jdk-17-ea.16_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jdk-17-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.16_windows-x64_bin.zip", + "checksum": "11781651c71e794ef9dcbc450f5690cb6c4f9744ddb7b62d276960bb5c6588b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jdk-17-ea.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "f3819ee595248ffbc6c4d5c6929f04a901b14326c0569f579bce13fad2a6404e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jre-17-ea.16_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "62e36bb8f9722a9c1bebc44335ca51c620984cd7ece3841b063f332d2df0cba2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jre-17-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.16_linux-x64_bin.tar.gz", + "checksum": "fb0f163bd2a02bc42bd6a45fcd241bafd2019ecce427d886fe3ce5735961797a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jre-17-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jre-17-ea.16_osx-x64_bin.dmg", + "checksum": "00eaefc08b1d8458a538191cb51603c3b4a571e8bc9c9ed2ba41ea1c4a55f8fc" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.16_osx-x64_bin.tar.gz", + "checksum": "28e8afd338dc7337b03f1cfce53cad177f9ab3127e810d7ca72c377e18e6e8ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jre-17-ea.16_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jre-17-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.16_windows-x64_bin.zip", + "checksum": "28d0a8ab4944321534a9705476df05347462f4abc3a69cffb2d3446eacfc1af5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B16/sapmachine-jre-17-ea.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "ce8a82f7b7614faa51028760e101c771f9d9d131d8738296f51e09f91d4728b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "02c4a56327da3224a6fb592ef9e1d87f21d5dd096ce79f9d96f2f6cd21092ea0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-ea.15_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "2b21f0e3af000942ec6c68de3660f58d70947c67432fe2301843e566601a43ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.15_linux-x64_bin.tar.gz", + "checksum": "a7422814ffcd87748769712e19688ab24a603f91e243b1282a138228eef22318", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-ea.15_osx-x64_bin.dmg", + "checksum": "6708a85943d11a7d4dd439cfb87ff8d5f2eabf0a1454f41095ac5c879a2b181e" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.15_osx-x64_bin.tar.gz", + "checksum": "ab1b155778668bc94df678f9a4fc367efcd2fbd73b23324a602c55067c30750e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-ea.15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.15_windows-x64_bin.zip", + "checksum": "686803463bdfcacf9db54f60e2a4cc3a7549abb560e03bbaf7974169319a2945", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jdk-17-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "4088b72fa2b43597090b0b89124564d003d47ad90e034169a7217a8e2f40068f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "0fcef1ddad39b418a860408f854551fb4f167eb3b309830d4e9e93426bcf1ad9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-ea.15_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "c84aa8753726ade438749fbaf17a84297797f4390fd6e60b301ab71339fba803", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.15_linux-x64_bin.tar.gz", + "checksum": "e6a792d596479a8fce10ae5f2b9f6139f646f56ece2f00c1c4de2208f14b0058", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-ea.15_osx-x64_bin.dmg", + "checksum": "b13b3e2f04e93848b33aef08bbb17f0a6500da3b5e220935f69e6658f2a19746" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.15_osx-x64_bin.tar.gz", + "checksum": "61fe58d75be90976708e6468df190e7c57a899a22cff76364012d42601e443ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-ea.15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.15_windows-x64_bin.zip", + "checksum": "6fa485212728226da2e52a736958cccac8e3767858eb4f6eb5bda4752e6b1a46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B15/sapmachine-jre-17-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "25a723443bf9b1b44b9542e91fa7ab411ab57a68284b085f0e82c8cda8a49dbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "3d6a8fb2be0be57194b42eac8f228fea630c92d454f8b8e5152538fc5a09b5e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-ea.14_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "ff646cfe262c294801abde160ef03460d10fced12a96a01c2727cf2db868c9e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.14_linux-x64_bin.tar.gz", + "checksum": "76a0b2d3b98b4faab62cc0c6a22c9327b8a9b3013ee9a691a17663069507e3a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-ea.14_osx-x64_bin.dmg", + "checksum": "4964bf0824f9a5f35d30f0debdae7d07297a5bb200ee52bf63f3acff38527245" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.14_osx-x64_bin.tar.gz", + "checksum": "496d7587bed52d5ad1045f8a6e4f5dbce957a42b1cb1a8ce49a33ff016bd1547", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-ea.14_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.14_windows-x64_bin.zip", + "checksum": "98d546b4eac03e14f38794ce2c5e92f72c3bbb29dfd96ae7e2fa8321a96dd17d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jdk-17-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "abeccf86b8460626a2fd00a46e41984dd23f2ee87c7998ba54c50fa98b3475ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "98d036b90c9ffe314b3b7a599ace1800bd2c9f78ca99001fe4defa8be4694ec7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-ea.14_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "0b1815dd70fb4c9ba0e1f27a3b0db4be5153e412997e8584364fa94f5b5a24af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.14_linux-x64_bin.tar.gz", + "checksum": "5b9a3e03263fcb93a53895bb0fb0689425da35cdcee59dcd1c0cc2ca96ec7084", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-ea.14_osx-x64_bin.dmg", + "checksum": "c75c0fc7ac958edf6bb6cc5c5a2ad1ad74b8481f13fc2acbb159e47b0400f4c9" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.14_osx-x64_bin.tar.gz", + "checksum": "a6361abaed1e31a0738f8a6d90ce62f187dd0226c057776ac5194878bf3d0a1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-ea.14_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.14_windows-x64_bin.zip", + "checksum": "317a25beb6c3b15156301f4df5c59e4eb33f1d63b88519b01de8787fbef68c71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B14/sapmachine-jre-17-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.13_linux-aarch64_bin.tar.gz", + "checksum": "8fb61468dd7e95f7cba8822b1d0f184d17ea4a3472b0a01a5727e57fc97bbc2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-eabeta.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "b5c612a270d54e92dce9cec9dd0c9320bdecd431f58224faad39087ebccce2d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-ea.13_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "8dd6ac7d1ac9b5a1679ea146119ff6e97a8e24f7062be1a0743f376197a9472f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.13_linux-x64_bin.tar.gz", + "checksum": "3342b49def7f1fa00d41fafe69b12c205c75fd508510525b7c3757d0415daca9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-ea.13_osx-x64_bin.dmg", + "checksum": "de7b83d5013ecb349dcb9a447bc6daa892ed8d94f987f92d4eebfb788efbfcd9" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.13_osx-x64_bin.tar.gz", + "checksum": "97347dca64dea299fcb51b8e6d5a93e7b8b8e1015992f185a213ca7cb7a4be53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-ea.13_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.13_windows-x64_bin.zip", + "checksum": "037ab194e3487d3d9e2e394f3b05fdffe202215fdb30cfab720e84ea51a2e001", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jdk-17-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.13_linux-aarch64_bin.tar.gz", + "checksum": "5c559709b15027201c4db32c469ff245214da7d0320a530986a09e92ca3e5ba3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-eabeta.13_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "a841a804b4795bda1d21e8c7ee6539bf4d33368ccdb404369fabcead35266bfa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-ea.13_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "d45e0adcee99f98bb24c2698393fe36f293c47f645d22a05d7a7adf520adfae6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.13_linux-x64_bin.tar.gz", + "checksum": "4004ac38cad68197d364b114e2c3c7d3c670520a4b3422cad8b3118764d86ea3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-ea.13_osx-x64_bin.dmg", + "checksum": "ad19ea516c0cc50d0227696dfb59d0f1715b383b285b90292d6af79f5497d424" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.13_osx-x64_bin.tar.gz", + "checksum": "e8a95e6470b65196b2c0aa18837b17393f9d2ee616525bda72848f5faaa3813a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-ea.13_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.13_windows-x64_bin.zip", + "checksum": "4e018ea720497754b0358fdad62ff3bd42ed925bb082b5102f5e491af2b766d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B13/sapmachine-jre-17-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "966026d191ccf8e197a5209f781d0d737ad5c37473496374fdb67b7ea911074c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "744b146bb5055096a6a3de3f5f1e48e8cccada64d516aa824148129e89e589b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "8cee66d6d0f736a27237be5f954bc63474d087836c82cfb3ac4b944a92d9ee7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.12_linux-x64_bin.tar.gz", + "checksum": "6062ff09d9ca045a8739a4dd533e6022a2c647af2a0cce9d2b7c242f0a71a839", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-ea.12_osx-x64_bin.dmg", + "checksum": "3b062b50827c37f586b130d027fa08b4f38f69c5cfde2ecab0f78396e0afa9d3" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.12_osx-x64_bin.tar.gz", + "checksum": "3574332f401f90c3b4ade6be9b8f40f393ed30c4f88d105e4d7827e6cd319c22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-ea.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.12_windows-x64_bin.zip", + "checksum": "ac1bf0f151a3792c5286c37b0a8296bc85ccf381dfca302bedff757f24205ab5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jdk-17-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "fd7656860749947874188b89eb41f9e996b2b956708aec10fb211019d9fd9362", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "66f59db059cf3dc337faf3e1f377730c728944fce0cab58480cb607a2ae01018", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "269a0eca0a8083fec76bcd33f2ace299c0cfb71b749191f0d77ca93e716c3d75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.12_linux-x64_bin.tar.gz", + "checksum": "02d6f5db7ef4d4dd86ea84537f20429485617669ca8cd637b5fa02a2270d990f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-ea.12_osx-x64_bin.dmg", + "checksum": "6f2614693380d6aabf168a84df43d5b9f089c0a76e7067d6871a4b9b48afccbf" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.12_osx-x64_bin.tar.gz", + "checksum": "f8603091815cda7a19cd1a4f551b6d9f4b93b42ae5a74e8e877731d3a066f16f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-ea.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.12_windows-x64_bin.zip", + "checksum": "8c3ed3aa701229753f8f3c763cd8ec2c7ed47b27533293fd775aadb700871230", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B12/sapmachine-jre-17-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "97cbda7126ac28d319dda2ba1575e395b09b61848235ca83ad9c424936604039", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "4da7a7eec2c3143edf027f73500c2f6688ee2c470cfb244e0a12c9b9761a5c68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "73fe989cf4d3e2b47e79c225a944a8333be57e7892e0bb20a317305dd3455ffd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.11_linux-x64_bin.tar.gz", + "checksum": "470edbc17ede0d6588c5b9c9181d90094e08cab50cbc814c4cfd649fd2b2b09c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-ea.11_osx-x64_bin.dmg", + "checksum": "8721a8a52bff3bd52bfc35d34d9fbb3376c4ac0954f49e17272ef7b6f61c4142" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.11_osx-x64_bin.tar.gz", + "checksum": "b5ccb987c4773028666418c990afadb531d32a688be2f094d0633e771dd54b18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-ea.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.11_windows-x64_bin.zip", + "checksum": "b6f0f25ef90f9ca827c0be6f1bfeb85dbbea236fc1465dbe3957add7506269d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jdk-17-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "892ff15242f8a09ed4e04d8b1d7118849b0bd687a797b6696a0ce48a50600baf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "83ed5556ce6e4f48ecd8819613ed9c5fa116d4aa52d9cfa140dac6661687bf48", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "681c4c2b5247a44932d8b6341482bd0b188155b0ac61f2ac35a2918b4b4c14b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.11_linux-x64_bin.tar.gz", + "checksum": "17e8e49700d54d48578cd1c51f79d6881d1edfd7aaaff1c74005ff1144757ef3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-ea.11_osx-x64_bin.dmg", + "checksum": "87452fbcd409940c55a6376081a0d696cddc7a889be81a14b59d6038c4ba698e" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.11_osx-x64_bin.tar.gz", + "checksum": "b4e2b6862754da6920c441e2de80ee914ab6ddc036b6bbd3adbfc026bed2fa69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-ea.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.11_windows-x64_bin.zip", + "checksum": "aa4dce40a2071622f56993503f68757b87f9af41d753d50f080df3997d3610f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B11/sapmachine-jre-17-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "48b4b7dea45c1960db9cad2f0fa11a5a581093143bfd4758634f52b9c3c68eb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "e0624e45726bf42d5827b81e2e8543c09860ae69c96f41c0cdcbe7cfb5f9147b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "3c6dac857053ab51ebbfa332eeb7ebc096c7c0dce2792ad6e2b25d695a28831f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.10_linux-x64_bin.tar.gz", + "checksum": "afe501de4d540a59b7f22fa1d391936dcb70959d147ff2d00d4a63628b631072", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-ea.10_osx-x64_bin.dmg", + "checksum": "4b69492f2ee17c9a09aff400e5d6995788fc7a6fef81adae45ee431d792efce1" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.10_osx-x64_bin.tar.gz", + "checksum": "40ab45ff35a4c1722fcf871a6e3c4afbc79431f582501aa9edd19aa250e98875", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.10_windows-x64_bin.zip", + "checksum": "d26f2b87821e933ffdd37966d6cd6e4d11591d3d264c2125e09739a63ae02e93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jdk-17-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "265d4dcf3024a009e78e35c0331d20aa58f1889d3e24973df606bc9ee1eee660", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "d53155d5d664ea6277696465b4775f28363ee8e715242796911ddec8bfcff61c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "ba7fff3912004d3eae6f409e512a78494d9dcd6d0c01bf5c5bde27683dbac875", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.10_linux-x64_bin.tar.gz", + "checksum": "5b673c6e5847f0df3c69aed5e44a5ec10ecf07795dcf9e71acbfb0495137d381", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-ea.10_osx-x64_bin.dmg", + "checksum": "ffe6fb475880e57f36168c79ece0b9d195ba0307564cc4ec0bc6bfa5020409b9" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.10_osx-x64_bin.tar.gz", + "checksum": "8d148b9e4a2955e8ff75c95d9ae334f0b9471e0b90f3f25523cb2a63e7fe5003", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.10_windows-x64_bin.zip", + "checksum": "66b384669eb27990fc91495fd94c59939e0dc78b7eaefa51644ab72d27c1670c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B10/sapmachine-jre-17-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "212a89b74417c13250bff57ab52e69cc3a14ecbe42b4f4adbcd69e5c62d6f60c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "3c66bad5d1d28ce9318ca25a9189569ddd8fb4b093fbb9052aa079df4d5ba7c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "e3ffdf3e0eee5bd30e496ac2097f1dab1141a91e93cc9034b1e076d4e2c25242", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.9_linux-x64_bin.tar.gz", + "checksum": "5b738c6f36c0a4cfb25cabd8494ad4215459feff86b23a6c98722fd27c0d6d28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-ea.9_osx-x64_bin.dmg", + "checksum": "9bedbcb4ec3f073d8d0b75fedae2a0654e7ae2655064de2bef6dd097af186a65" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.9_osx-x64_bin.tar.gz", + "checksum": "ba2f0ab578648ac526250fabd57bf59f5f8b310298e73745b6afeb8fc194be8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.9_windows-x64_bin.zip", + "checksum": "dc2704caed809509147de9d35b6bf06107f932a9e9ae1aa5cd8de6976e73e317", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jdk-17-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "744db42736ba6dcfe8749e290a0ba9341ce717bea0cd01f0658dc0a3dc2ebe09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "7108811510c6f32b48db923ebf72a7da9bdd454e272d19e1600663951d56b80b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "c7ac8f8bbfa8befe2a9e7c37b5b7d3624df9fa3e8f85d260bfb635a67db99942", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.9_linux-x64_bin.tar.gz", + "checksum": "fd59c55ee7ece5604361f7cc0f93049d2db78d11a411f43f652e3a2672cf1779", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-ea.9_osx-x64_bin.dmg", + "checksum": "7f327ed58ca3b3a7e3a693e5cdf9f2473604fe673993ca0f5545c717c4c832fe" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.9_osx-x64_bin.tar.gz", + "checksum": "c3c520a375b1e45ece688a6b5245c5c431c11fce342b43921e8ef5cfd717c4a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.9_windows-x64_bin.zip", + "checksum": "64354c3697f6f70037f35fbff8bd26730935c2b25fed252c14e63e714926011e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B9/sapmachine-jre-17-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "944a5cb1807642879ac162943102216d20853df7cb4ec52504640cca0b418014", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "773e67197803ddaa038daba75f2e3d958fad82597833d06fcb8a7d6d3e46a553", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "5b193777be0ee8c959359f722fc5f61a78b63e692464ec60d80f8a742fbc2d33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.8_linux-x64_bin.tar.gz", + "checksum": "183782bda759a9babea7459ec369fe54e015dd9a4c32170584456634d9df9a60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-ea.8_osx-x64_bin.dmg", + "checksum": "f63a2e79b61bb82b9d7f8d0cadcfbc41416e0daa090733aca500c2da9d864222" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.8_osx-x64_bin.tar.gz", + "checksum": "51eba74ed6bccbedf5979744895e150fd0606103034de82d7fc427439049efd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.8_windows-x64_bin.zip", + "checksum": "f9aa39a6b9abe62fa4bb78ce5f136d251d7272188d61f1480249d0c2232f4af3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jdk-17-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "fe7d76965f6ee648458887865808c4f72c4ebc21d93d8a8b3119f95bef10ca15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "654bb30f6bd252ba715c8b7171c8c992a87e183a8e7312cfb5e4f460ab82c376", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "fc678b050b6f8adb81bc000b02c74913d0d811970c05a582d3b697fe3604c583", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.8_linux-x64_bin.tar.gz", + "checksum": "dd5234fa37e35a10a62a30f6bd84b45b644175cf859f71ae123b5f835ae9cd71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-ea.8_osx-x64_bin.dmg", + "checksum": "49b00e7cdd0fcaaf1cd43e1ccbf275867ce416d1294622b66f34d7f1bf7534de" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.8_osx-x64_bin.tar.gz", + "checksum": "1e8b34eba0768e32399d8483b22b77fd5c7aa72d6f1d463a61b1a8e306d8638b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.8_windows-x64_bin.zip", + "checksum": "03c2c5051a270ecfabbda2f3f86ad0841f4105003c74020f9e20ae350b6a8c86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B8/sapmachine-jre-17-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "7f3e7a83b02f1ef54b73b74ce51b438ec2bb5c865059fdcc0894f7697786c184", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "d55f8478c04429f531b64d2aa653b112a569f1edd2826ca16135e7085aa3be86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "fd73f8d5f6b5c03c33e1862bd6366386b30f3633249f181d697ea86292481a1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.7_linux-x64_bin.tar.gz", + "checksum": "c30f9bd8421da5afb84334de4a537bc740f6733aebcde0368c32de4d08c41d53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-ea.7_osx-x64_bin.dmg", + "checksum": "b7a77404c32fab7cb3fb83630f1a5fb60f19fe93706017681822c88418778711" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.7_osx-x64_bin.tar.gz", + "checksum": "e924a212c5458f7b6d20933da63bb7dfbcadd13e68d4bd9e727fdb59851af469", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.7_windows-x64_bin.zip", + "checksum": "45723c6e0475b33d18a262e5a33db6b2076e468bffce939ae1f9902a2cd1cbb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jdk-17-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "a49cd2f6d9f7082118c79b33fa0bf607e598530f4c92bd36729b4c80615e2758", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "ee92dc1ddd33706924dbf8d70830571510e6d83faef8f205ab6a8020e44bbab4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "a55182e01274de78db77d1a1e66fe9c018e85880432200b5506c766dc40886e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.7_linux-x64_bin.tar.gz", + "checksum": "787b95855bd27d09270b1c2a2be136cf712b114f50a3b18d6fe33344969d8a18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-ea.7_osx-x64_bin.dmg", + "checksum": "ffeb833c173d32ac0bd62c850fa69780cd19b1cdce388696aa7d12852bdcc19f" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.7_osx-x64_bin.tar.gz", + "checksum": "df269c36415f033b3e995f876db5378dc6074bbda69935fffdf9880576d07867", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.7_windows-x64_bin.zip", + "checksum": "bc210d82cb0f44c9607b8b8f80654789901b2c32ef99d065abecbeb8f3ef7c10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B7/sapmachine-jre-17-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "95f85a3dad2be87843c6c9c3f8b1fb54fbd4dcb2b6bb4d3ed6e92b4cc0611a7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "83c2eca8a203edd6e97138597c1bf48d7518c9c2e418d7b7d25c2f5cd0575f8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "78f6ba176401dbd8abacea392ec09c3eecc6965af1c664043d70530ad701c153", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.6_linux-x64_bin.tar.gz", + "checksum": "046f2b2168f42e7c6937b5e62d3847b0c89f75d7f7e2d8c89f83bd4cb4049c34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-ea.6_osx-x64_bin.dmg", + "checksum": "625702804fe5c66cc7af4cb15b48da978adc7c6ddb40cc068b4c7f2b28921672" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.6_osx-x64_bin.tar.gz", + "checksum": "3645a9dbd2f1f9ea66b6e305df9feb7c81d53e3060c7cad4b62643ff85785d07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.6_windows-x64_bin.zip", + "checksum": "b909e235836914391db2a4a5f1adbf0a30c888dfae02bff783f227acf37909d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jdk-17-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "8d7a79802a34b82c4f02abe643e087e36a2acd9aecd41a4f693a9620419c05e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "610371c0928f9e38feafff8fa449926b6d48ea131c2f9ff49470bfa282901a40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "b68dc729a2e33754c31ca06531f71a5dc3a77ca45759b849367298e59bf52849", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.6_linux-x64_bin.tar.gz", + "checksum": "5fabcefb73ce1c001614d344401ded2ce8c37e2758fee8c87891997d10d0957d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-ea.6_osx-x64_bin.dmg", + "checksum": "495250f93bae30e6a37fc76edc64fa116fbfc000f6b5227573689c71ef4c0cd5" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.6_osx-x64_bin.tar.gz", + "checksum": "d338c9925dcc53c7f56965e901210e9e719497d1c87d932ac10c02e63a117171", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.6_windows-x64_bin.zip", + "checksum": "f0d969a7fdb12994a730849b291d7678b6404bba861f181ac3a1aa43fbbcbfbc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B6/sapmachine-jre-17-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "73bddce52d2f7a286aa1a7e90acf5569da883e700bcbe870ae2a81595a576042", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "2faeea450a8a31511f7241b0a8695e07051297daad68d091e8a39806c0a7549c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "b1ba213d69feba8eee7fa6f6150068c534c63db369fb4fcae34c20e4f08fb1e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.5_linux-x64_bin.tar.gz", + "checksum": "4a00e8b01a1f01377b9df77372cec17083ed621f23ab8aaa5e3c525c31b5dd2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-ea.5_osx-x64_bin.dmg", + "checksum": "7331e8f99d7e82134dcdfe3c3171e8cd01ada2348fc2de863008f9f8080166c5" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.5_osx-x64_bin.tar.gz", + "checksum": "a2d9a1979249668ba2cc05f747c19891af2a1b42a72b7cab7d3bfc0d617dc205", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.5_windows-x64_bin.zip", + "checksum": "b4a741a301fb9cc9d334d75584c7b9e3266a94a310d6312cc47e7838185d3ab4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jdk-17-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "4ecaf51c833a6c78b62752d1dcb89ab83d91f2c941f8c95806819894835ccbb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "bb4409248ab3509f0f51955bb74589301f3e25a787dd7e25dfbba6cda2243e3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "72160c3d1cef05318ca6f186fd50739f098721768ec590916c011aae6f11bf6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.5_linux-x64_bin.tar.gz", + "checksum": "2ff0b29f3e6e8fbcd198c39270dff9b26a59dc4e431b8579e0af3767d4ef7edf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-ea.5_osx-x64_bin.dmg", + "checksum": "4b835df3961f10a2374c8af088fb6425912fa9ab129f843df5f38633d7b6d355" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.5_osx-x64_bin.tar.gz", + "checksum": "9133a635b7dfdac7c76865191e2e5832d5ba8cabcb99368551982ff3f4300625", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.5_windows-x64_bin.zip", + "checksum": "9bfde88c4ac1fb7bd4198f60e9667a0362b804bb27b98ab8eb40c6888da5e78c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B5/sapmachine-jre-17-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "6f63569ace38b8879e54c64f84abfad4bdbc6a2ceb2808b98c7239e35bf19191", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "cd426ec6c875e15f8cfe956e82a36122406356cc5241c27f4dc7c64b7b877333", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "d0ed8465d5c37d1ccab38721f64144d5bca7e8883913585ee3ee6e2ba5ae2085", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.4_linux-x64_bin.tar.gz", + "checksum": "e5f64feb7368ab204aa675a6f9c08207daaaa0ed4d41b6317c92443acaaa7088", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-ea.4_osx-x64_bin.dmg", + "checksum": "fe0960a2faad368a40ad1ccf098fca73273d252123b36d6c1affe3381f44ed4d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.4_osx-x64_bin.tar.gz", + "checksum": "bca7e40308e615402a708f8687abb55851a73ccfbec6f5bb46f00ec5f414e012", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.4_windows-x64_bin.zip", + "checksum": "e841a8a4d4dc59ef0e257de915faf91fd368e544156ecc40c3ec1f6729530cd2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jdk-17-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "bb4cd89d67d3e6e4b217c5fe569f4270cda0d79bf39697cf1c1befa709177dd6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "d241a8b6e8f7d2edd368ee99dcebd0c570dc73e1ef172c622fa547e61430893a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "24b2f92891088d953c56c784454f48553ff41c1f99dfc92e2e8a26f33cfd69e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.4_linux-x64_bin.tar.gz", + "checksum": "199283695fd8ed7389c491c2ca7e828cae9425d4d2f7ff99ceb5510c4a84b191", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-ea.4_osx-x64_bin.dmg", + "checksum": "4c2ba1e1cc6230642a6821b0af41d10ffca5d34468936cd94b58179f39319630" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.4_osx-x64_bin.tar.gz", + "checksum": "4ba2d0860fe1d118c69cbee88ca22af6c85e4cf9afcfb74acc9c140646bfac07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.4_windows-x64_bin.zip", + "checksum": "96ae86847cc9dfbfbc58c45aac9ae8fd310f2657a1c383520e7107685159e832", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B4/sapmachine-jre-17-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "2dff1bf03a72f45192df423e10ec4f9267cbd51262a200af1ee75e9d331ac1fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "53b1910a58700f13adbd31417bb6d88899db3c4ade222f3c026a2105b7e000b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "ca227f29dc1dbe5b8af1b7a9fd1a4d7ccd29ef422548d2d03afa378a99ff40be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.3_linux-x64_bin.tar.gz", + "checksum": "8c86fbc3478e08d5d03f911655e5db524c17961a529e2298e0158fb9508961a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-ea.3_osx-x64_bin.dmg", + "checksum": "614d84873f75f3f411b40aca2a2814b60601aa4f74a0b81ffadc79f2dabc36f7" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.3_osx-x64_bin.tar.gz", + "checksum": "105b348892ed95bc1778f610b02977f8d8eb0882524be3d774481df4edac6524", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.3_windows-x64_bin.zip", + "checksum": "0aa635ee121496ba374b4747f376db8f6827da969434afc77bfa8f678f719b2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jdk-17-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "654b41f1463538ccffed83f2feb4b63f4860d8894e4ef73e2d79026f778f4ff2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "5e2a902b80ad480d89ec3044a92dd51ec377408bd2bd4c1200633a9fe5bccb1b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "d3313282542a4c1a6820aa170ba8a534ccd399cfd288d931be5924c758cb1e9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.3_linux-x64_bin.tar.gz", + "checksum": "d75ddc07a8ccfa83d3880b671f9b975f7ec3541f0eb3b037a3a5a614eb3f5504", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-ea.3_osx-x64_bin.dmg", + "checksum": "ba88c500f77d8489bf3eaa9915214ea55a04f081ec9d2be3e0130b1af5b0602a" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.3_osx-x64_bin.tar.gz", + "checksum": "be86d18789465373a7d52eee2004eb2ddb864e007e6809870a2a92cac74696e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.3_windows-x64_bin.zip", + "checksum": "19c5e7055ac9a5d9ecec0d134538ce0f059744c74a3d00fe29409512e3bffc93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B3/sapmachine-jre-17-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "9094918e66886d9edebd7633d62c0b7870b0ace54ab5f8cbb44b2f28885988c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "2c945e0e1fe6a2b6c6ceb381a7f2519494f3c2c8053df168b5cda75e30b08e6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "75d39bc06a77a267ab18980da9ffe592decfced1417faa86acecfe210330693e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.2_linux-x64_bin.tar.gz", + "checksum": "45540c9d4519d22ccf1742b938bddd49ebffdc2bdcf1dcc60b6f99bdfb4c6dc3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-ea.2_osx-x64_bin.dmg", + "checksum": "d3c9acd316d54ef18d431c72534977006b8b58798193e0eb0ccf904a29563c0d" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.2_osx-x64_bin.tar.gz", + "checksum": "698ba6f435a59f9a91835670a3a75c6f020b0b337dddfbd1c59c224eb6399873", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.2_windows-x64_bin.zip", + "checksum": "e4082420dbfaa828834d4988a00bedaea3c1d6bd98a7cb6266fb567e18f880b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jdk-17-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "e288efdceea5496c11145de2848d3746d496e6f7b7f4fada8d508637bb40f008", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "c50e2ded3e4fa0e9b647bc55c9e1016874ebee51a85ea113f90d3c6c48991c0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "7fbec0a1fb74202f6898e2076081ee48b94c005b0b6a7290e582bacf424931ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.2_linux-x64_bin.tar.gz", + "checksum": "24bb079210190524ea5d57de92c433ec5c9bf665972f660dea28537f15d54cef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-ea.2_osx-x64_bin.dmg", + "checksum": "ffa5a49fcc8549c6b61c52314c1d557dd3e29aa4970549faa046957a26c549cd" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.2_osx-x64_bin.tar.gz", + "checksum": "201db69c9dd487317c72f5cd12a2870dcc7fd6208b7d14b2ab2cf37f0e411bce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.2_windows-x64_bin.zip", + "checksum": "1af69f17dd5549ddb3c105afc53a6c7a06ad773d657f290a76dadb8231a1ef38", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B2/sapmachine-jre-17-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-17-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "e3b261e8e11e8b3bf807408787d3e36b04e3a300db05390bd290c452d7a4cc50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "6304b7bbe432fc9ef41578b0415a08ae1b6ab0c2df497e3fb3de48611323df44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "749ed83f1d77d763db849f410052ff49094b98ca4710fb1114ed3d4ca8529e4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-17-ea.1_linux-x64_bin.tar.gz", + "checksum": "af405c9923e7d1bfc58ea3faee5fc0931554a5afd66970815d675c52aead2b94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-17-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-ea.1_osx-x64_bin.dmg", + "checksum": "585e4f6f6ab10751eb480172998990895722c683652b312b82fe371068010b66" + }, + "tar.gz": { + "name": "sapmachine-jdk-17-ea.1_osx-x64_bin.tar.gz", + "checksum": "d79499d92460506f55610196f0deb597591704a0d222fe980ac8b45062893490", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-17-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-17-ea.1_windows-x64_bin.zip", + "checksum": "3e217a9b3b608e086e8187ceb943a31b195208a690cbef71ec4f9f4db4fd4eb1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jdk-17-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-17-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "cac57d248b8d953e8dad5efc0bbf19141c56c7bab35b559268ddb3ce3bf77636", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "2b8cbd324779c68b8ddcfed0394bbbd6a68bef18098da407d09f7f53122f5a09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "cf3521bf1a4007be2bb3420807617e0b6843a18023d3423eec6a10047917093a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-17-ea.1_linux-x64_bin.tar.gz", + "checksum": "35e781ef00f0f56bc1b92ff883a960e3c57ab36cc9f19119ef4af06828372ef3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-17-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-ea.1_osx-x64_bin.dmg", + "checksum": "00a18510b74df9af1a509d4bee3a72f858fc254f3fe3700f69b61942a993e3fa" + }, + "tar.gz": { + "name": "sapmachine-jre-17-ea.1_osx-x64_bin.tar.gz", + "checksum": "6aef72dded0abaadd47e774790ca0d5269057f81f1aefb63eceb088d6d404022", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-17-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-17-ea.1_windows-x64_bin.zip", + "checksum": "5968cf798d8decc2a20bd3b70a871be404189adf41a0acfdd2e86489e8be7ad5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B1/sapmachine-jre-17-ea.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-17+0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-17%2B0", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.0_linux-aarch64_bin.tar.gz", + "checksum": "07f05efc0170cae666035e2b40444cfbadcd484a7459413dd9cdbb39d3828b6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-eabeta.0_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.0_linux-ppc64_bin.tar.gz", + "checksum": "9e2c041a825d4e565bf5c9ea4e966e44807c2b1393400053f8417f4839805359", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-ea.0_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.0_linux-ppc64le_bin.tar.gz", + "checksum": "8a0af42f4716e515f7b2c7d4c5a17dffd39d233746b61e904edba31be00e4d78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-ea.0_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.0_linux-x64_bin.tar.gz", + "checksum": "8f195d5966e55edcb2f541c5059d2ec293e5d9d0392b67053f092017159cae52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-ea.0_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.0_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-ea.0_osx-x64_bin.dmg", + "checksum": "455b495df5ea273c06816cb7fcedd6509875a58e6876b820874cf3c2ab4dbd5e" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.0_osx-x64_bin.tar.gz", + "checksum": "204bd2aacb8cd1f97d2e36c464b5e1745b5de57e6f5155d6c42f0205d44c46f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-ea.0_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.0_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-ea.0_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.0_windows-x64_bin.zip", + "checksum": "cae7d38d49e9aef0f61aac028985c01f7440323cedf03a86e9ca09a341a3fa03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jdk-16-ea.0_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.0_linux-aarch64_bin.tar.gz", + "checksum": "997b813df614c9780bf33f3fbcb076b6f7b4c6622dbfe9b941d5456aaae63e18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-eabeta.0_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.0_linux-ppc64_bin.tar.gz", + "checksum": "d74ad90508c4e72b832d9e5fbcc2e5ca0d6bf54ed7b15eb9e3f4d82239c39a27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-ea.0_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.0_linux-ppc64le_bin.tar.gz", + "checksum": "ecdf0ecd8cc6eda0d0697a33ab21b533696e28e5029f799ea8801dfb5803a0a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-ea.0_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.0_linux-x64_bin.tar.gz", + "checksum": "cd074235b7c13579d19688dc1881743d50d3bb1c040c1baf5584d3a1ca2cd679", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-ea.0_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.0_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-ea.0_osx-x64_bin.dmg", + "checksum": "c3b625de6a8d01e5bbc9a043bcb41df10b11bf9ad4f3399d9f3540aed902df0c" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.0_osx-x64_bin.tar.gz", + "checksum": "1b6546669e506890f859e5a1f67836fae0ebf73053eb7b3f589762f434903431", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-ea.0_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.0_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-ea.0_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.0_windows-x64_bin.zip", + "checksum": "ea7acff2ade9203228176852176cf4e2de62291cc74f1c3777130061c52599fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-17%2B0/sapmachine-jre-16-ea.0_windows-x64_bin.zip" + } + } + } + } + } + } + }, + "lts": "true" + }, + "16": { + "updates": { + "16.0.2": { + "sapmachine-16.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-beta_linux-aarch64_bin.tar.gz", + "checksum": "dd83fd6961d104b73c269b751c00ad9295cab54a3be290fa8d7cf31821994d75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2_linux-ppc64_bin.tar.gz", + "checksum": "6da645f3385b0b8e69e6c2948cf8acaaf5f9fb46765d871bc7807ecb068bcbcc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "de42d98c7781f77ec4e25872861ad5e454f7c4543db43f03457b328c4d9e9b2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2_linux-x64_bin.tar.gz", + "checksum": "43831d4ebb9cd6ec9cf6f992406b290b3da409af21cd61b37d80e8a051c1a998", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2_osx-x64_bin.dmg", + "checksum": "d385e29399a35156ecaa23fbeed08b876c4b9bfcf076640169bde95196ee1d78" + }, + "tar.gz": { + "name": "sapmachine-jdk-16.0.2_osx-x64_bin.tar.gz", + "checksum": "7fae51236896642455e7ff667bc1bb40e001c6a39e24837b0924f7ff8aab7318", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16.0.2_windows-x64_bin.zip", + "checksum": "d8e07df2d3f6bdc8366120d2a4ca962530702b36d854b88203cba4e984c157ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jdk-16.0.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-beta_linux-aarch64_bin.tar.gz", + "checksum": "5d664db324e52732d813821261cbc7e4ed998e869a0a08c38f2cda9268b1de4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2_linux-ppc64_bin.tar.gz", + "checksum": "61cbcfc403fb4c828c1230ad15883b55a8bb054f49e5d6fc4e02285e19c59b78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "96f3f110d8111302c9be5a5e11ce5468ee1b427a604dcbb5a37838b3a0df4fa0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2_linux-x64_bin.tar.gz", + "checksum": "4b0bcb0a15813077a7ecaf3c21041f80f524b759471b9e971896ed7cbc8d58a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2_osx-x64_bin.dmg", + "checksum": "728fef2bb383a788e6b34b9fe962f833802b0c02d2001ec51ca01b970ac1e149" + }, + "tar.gz": { + "name": "sapmachine-jre-16.0.2_osx-x64_bin.tar.gz", + "checksum": "3df8398fdca048cffd07cd762a750ce527e983ec44c47cd9f652764e4bd8a751", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16.0.2_windows-x64_bin.zip", + "checksum": "436ef8d6ff5c711eca8e3ab620dc671dcfe74b0564e7b26c3b7fb0ed2a677521", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2/sapmachine-jre-16.0.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16.0.2+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16.0.2%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "481e710b8dbac4a0b6948250f3f038323bc256571a4ba429f8fc690ad6d9ab33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "a3e67e184710b77d38be0f298c347f24d4cc06d89b5e990dac06651a5b44be51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-internal.0_linux-ppc64le_bin.tar.gz", + "checksum": "c3d6c488ac876bbe343f3d1ccdddbf19463899db8832cb2da9726b3afa12051f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-internal.0_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-ea.7_linux-x64_bin.tar.gz", + "checksum": "752ececbf297d22dd570cc46e576450ccc7b412fbff7929368f60a95319c1f03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16.0.2-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-ea.7_osx-x64_bin.dmg", + "checksum": "c486ed86d3b57d605eb1ad36ed13e03df805ff6b0e8009bfb8f13b94308e10b8" + }, + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-ea.7_osx-x64_bin.tar.gz", + "checksum": "452a28b79beac7013819de4b1cec4d19802315ea2111fbc4e1228a4b8d853619", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16.0.2-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16.0.2-ea.7_windows-x64_bin.zip", + "checksum": "298681b03927e35940c3e693484a351f17576aa9d7686f3a14e7ba7f1fd6d0e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jdk-16.0.2-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "c9a5048feabe61a44f2f62de9465a79282ee621c9eb9c216b3a3dbbd11065675", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "a614cebebafd4c3a3c787cb6d6b6619633caefa1c226700ec7d9d7b1d522e631", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-internal.0_linux-ppc64le_bin.tar.gz", + "checksum": "38a84ef7484fc67e354271471a369765d565815400d6260f7f998a4a1ce9bb15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-internal.0_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-ea.7_linux-x64_bin.tar.gz", + "checksum": "8d134af589e7d2536d38c63aa3facb555c97d61ada3353822f591bc4ec9dfe27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16.0.2-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-ea.7_osx-x64_bin.dmg", + "checksum": "c231cdf03657678907c0902b8f2c454cb9f3365703bb23659589cb6c1145a12b" + }, + "tar.gz": { + "name": "sapmachine-jre-16.0.2-ea.7_osx-x64_bin.tar.gz", + "checksum": "e7df217935560b333a517d730d1ab5a5dd93592596b861469cebe6ae2255d174", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16.0.2-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16.0.2-ea.7_windows-x64_bin.zip", + "checksum": "599cb029fc11eb1dfba6ca5e665c390c1db28b730949d231d74fe8113fd6b4c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B7/sapmachine-jre-16.0.2-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16.0.2+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16.0.2%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "70dd0c8bbf0a2dd1a44b8ab52b4a0c96c82a0d74a2bf50f3c9ee3f7e5a447e61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "1d56bad9bda008ab420beaf768d564259a5d37ab163a5081b5392515cb1d8b02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "e3c3743a2ce3c77156f25e7a381fba3ef7029572aee0328523e555ca484b53f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "1ec4075129cf576a5e07c464dd51d54fc6db965dccf8c375dd05442d0ff888c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16.0.2-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-ea.1_osx-x64_bin.dmg", + "checksum": "2e165556b5b705b429831a176a2a4854e951db9ff38f06ae5ee2eec0978f4441" + }, + "tar.gz": { + "name": "sapmachine-jdk-16.0.2-ea.1_osx-x64_bin.tar.gz", + "checksum": "bbd49fe12e524d5e5ce254c596475a2169b5913dbe2942b18763348edeb54316", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16.0.2-ea.1_windows-x64_bin.zip", + "checksum": "89889b529cc430d8b360369c8200f3832d4581a1eab99dc8ca8fac35dc6ecb7e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jdk-16.0.2-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "38968906712e4c6ffc694458a7f818b5bcfb369dadcf3c813ddd4025a7c51c17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "e78572a63aff58e79b485c1e4e5f1b6aeeb65ade2e41cb62e65b29ee76e41ecb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "dc2d262d2eb2edf06c8b390da633a12a74c343b86ce75f8135b84981b4722a06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "5893a07694c3c72ac5818893d267b416b5d0635f1ed7ba9105258dcd056079ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16.0.2-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-ea.1_osx-x64_bin.dmg", + "checksum": "080535859f04c212618e74042266d150a2ed0480cc0f315e70bf24b021c50fb4" + }, + "tar.gz": { + "name": "sapmachine-jre-16.0.2-ea.1_osx-x64_bin.tar.gz", + "checksum": "871adbbf089ab6b674ba2b42609f9e9a29782e620956ba7b7c6307c09f3302c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16.0.2-ea.1_windows-x64_bin.zip", + "checksum": "d5d1caa5e5da18d4986403eac4d8a845981184caf1cf66af3b6031a420729e6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.2%2B1/sapmachine-jre-16.0.2-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "16.0.1": { + "sapmachine-16.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "86da8c5516ee2f2f8c2aa4bd59b3d1cbef40dda5ad340e9d7984f3cfdb36307e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1_linux-ppc64_bin.tar.gz", + "checksum": "7ddbf19651ee8e20118153ce8aa200a0b528d72bb7c808d4f4d80b14a2418b39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "81846fe07252db3795ff9c7943ef7617212ccc846a87a59e7f23758401b0ff71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1_linux-x64_bin.tar.gz", + "checksum": "a9b0a5748909b94ff8956572d32162147f7fd6e4a8878a6a06611e13c1897f44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1_osx-x64_bin.dmg", + "checksum": "858bf721b32f839011ecbc2f387a1133c93cfec8bbf147d13f23a96553bbe40d" + }, + "tar.gz": { + "name": "sapmachine-jdk-16.0.1_osx-x64_bin.tar.gz", + "checksum": "b248c00f259212496329496f3a6d0f6076b62099039ddad393c3e0c60d909b20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16.0.1_windows-x64_bin.zip", + "checksum": "4dc9e84497918f6242cf8f2ae2aef47b6b31c667744f05f75564c1795eaf20ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jdk-16.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "5467bb2fd7e2ce4b87c8245664e7bbda296070ebb6cbf0a554d70e5087ea4ef3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1_linux-ppc64_bin.tar.gz", + "checksum": "28ed084f1957ed200be1e3f99658a684286e5a7be1db18e691ec352230806f84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "cbb60f0f71d191b476b962951f09c1b05807710404d0df2d26c9e7b083f04a92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1_linux-x64_bin.tar.gz", + "checksum": "df15edcf12aeed73a8d88b774f6b20945d258abb59944ef5b708fc7b755c7c5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1_osx-x64_bin.dmg", + "checksum": "03718a0808252b9b04cb729594d0c800a3f977c021ee719ac05395c916a3bb00" + }, + "tar.gz": { + "name": "sapmachine-jre-16.0.1_osx-x64_bin.tar.gz", + "checksum": "fe9fc8ac16ddf6dd3b01564cff4c0a062208f940409dc5e33ed6b32f243f97de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16.0.1_windows-x64_bin.zip", + "checksum": "19fb2d5affdbbf4cf1de9d20210708c777cde2c28f76a845d5c7b60d81980f2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1/sapmachine-jre-16.0.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16.0.1+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16.0.1%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "c8c4de34aa38e6b87ca2b3daa1a6cc603251a47474458b89800841d5c250b23d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "c5c5fd952e3e39dcee859e9a9ffc1570dbbc87b458c89a279c7890906b1d6f15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "e980cf25cd4135ca3423eb1b85acaeb6dca117a8461be41b8ceccfc3d9ae8397", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "66fded16cffa357ab0c309a4a476e8c25d99d37164e2df4e6bbc6653ac59a70d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16.0.1-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-ea.9_osx-x64_bin.dmg", + "checksum": "587c6537cf95a27021512a589a54e108d5bf97adb6137374bb534f25504e001c" + }, + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.9_osx-x64_bin.tar.gz", + "checksum": "15bd99c9c4d1f80af8822f30669b40b0f9e64906d1c042572d2cfd8eb437ba2b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16.0.1-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16.0.1-ea.9_windows-x64_bin.zip", + "checksum": "37e5577878ce0b501c7c5101e804675757c35cb00f837768c41185887213e900", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jdk-16.0.1-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "71b0e1afaca8deab2fb05cdc1ed17e36c26f13aafc906074ee59fd187536984d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "aff42f7df74b0b72af38aa8861405ec5bcbe786a93f0ee059f37bb569f100857", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "01c326f2ce4f93615d5a28226cc78265d7e16063fefb87d88c32cdad7c3989d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "24c7b11177661bb0ec81663aa1c487182bf8cf262921d3f463aa0dae4364ce0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16.0.1-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-ea.9_osx-x64_bin.dmg", + "checksum": "4de0bfd435da71129dcfa1051f1c2fe24aaff74c0ba1f47f7b3917c1eb96d6cf" + }, + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.9_osx-x64_bin.tar.gz", + "checksum": "2ed54fde0510255bb6f274cbcb68e3d586e707babb4e678b294813b8e13ea915", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16.0.1-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16.0.1-ea.9_windows-x64_bin.zip", + "checksum": "411b08fc827601856bf251be82f0b95d8626ccd6d0fa955e7c54b624a6afe0a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B9/sapmachine-jre-16.0.1-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16.0.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16.0.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "f167ddee17abaf615b3aae8597a8213762253acc70250bb231edc05e865d7eda", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "1664799dbad68bbe7a2ff4beff4e31a20e49588295769798a8f8492ad7e2ea5b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "05cbd5a7eb0add81db25995c864df6dc4ceeff396b354ebb868b697e4a83a7ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "78aa4538b7dee3cd0c5ad15c361f7c5276f20c42b819e8d75ceec0e9dac3ebfb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16.0.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-ea.1_osx-x64_bin.dmg", + "checksum": "555f5b0c7f11080ee5662bbb1850471d44d0e5edadf5f24c149c386954323bf7" + }, + "tar.gz": { + "name": "sapmachine-jdk-16.0.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "79bc1747cb0077426ab9bb1b1ba54716a1972e4d3e4e3a2e79f7864582f48fe0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16.0.1-ea.1_windows-x64_bin.zip", + "checksum": "9a23c35f825e3d73a1873a04b15f7e47628f2d2082dbc3ca882e7c1fa0dc455e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jdk-16.0.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "f158c5e677fdbe1a57ebd8ec092526568339c9baeb084cf1a10253e8c5bb68ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "b60a0bfd31d9021bedf01fae600471609b0c45b22fca4ab8451b2f00e41327c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "acdf6a06b44b0cd5445b213d78155897a7ee300bbf5498dbd0d4533c071b822f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "90aa313b9e8d4464f2de542d96d5dacaa4c3fd0b57d3ec0eaf3d2f319a88415e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16.0.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-ea.1_osx-x64_bin.dmg", + "checksum": "c67a5b25b95552db8c48b34cee30d4c308bfaea2a8f52ed893f9dc52a1f5e100" + }, + "tar.gz": { + "name": "sapmachine-jre-16.0.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "2fa62df41304d1bc97a8fe3cadafabe6236a5f7a73ffa264e844f48f8207d41f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16.0.1-ea.1_windows-x64_bin.zip", + "checksum": "94555fcc80f27870dba9980e4f0ebbfddc0d9a5531b5462d1cb4c74fe148e7e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16.0.1%2B1/sapmachine-jre-16.0.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "16": { + "sapmachine-16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-beta_linux-aarch64_bin.tar.gz", + "checksum": "c5c6fd666b53fb12ff7789ff2577e907e8e2c13ed3b4ab8f6616687ebfd89e11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16_linux-ppc64_bin.tar.gz", + "checksum": "e637facc6655316402d63e912a035b9bbf27546e8a9cd3849fb1a76b59d96328", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16_linux-ppc64le_bin.tar.gz", + "checksum": "89b136073272181003ba80b517a5c9d6818611944eb739fc37447678ae708693", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16_linux-x64_bin.tar.gz", + "checksum": "c8198de439a08708e54e035c32b7a26bad2b22651c02020e4b92787b9480e9c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16_osx-x64_bin.dmg", + "checksum": "d0d073685f15ed76eba35b54d0097ab11c9252aad59d2fc9fa52d347440bfc4a" + }, + "tar.gz": { + "name": "sapmachine-jdk-16_osx-x64_bin.tar.gz", + "checksum": "f2d93d3f0a5a0cbcb60f27e08b44059256a240ac4bd6e3c5081bc5aa8fad6a66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16_windows-x64_bin.zip", + "checksum": "22092f26ad98526c89ce47d78b11ecf04f46b61a3e018f645fa668d77a1f0fed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jdk-16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-beta_linux-aarch64_bin.tar.gz", + "checksum": "b4b5da3187270bd303dbc481198a3babf196330d1010415198a8f2a3b150f8eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16_linux-ppc64_bin.tar.gz", + "checksum": "7dc138fc2b85805d6dc43c746871ce634381d6440f266ddb729a1e143eb6805b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16_linux-ppc64le_bin.tar.gz", + "checksum": "b19bde1cefa2da11524cd638c8ada0ce1c3126c0690f28a3184a815a0f305b2b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16_linux-x64_bin.tar.gz", + "checksum": "38addbe1d1e3278de79a2f4e485325e9ef9f4def45657c43975a7c07de7dfcf9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16_osx-x64_bin.dmg", + "checksum": "6544699901a2da6a929bf8751f3523ab6e47d480ad1ee7ce341e7c04b9b5f610" + }, + "tar.gz": { + "name": "sapmachine-jre-16_osx-x64_bin.tar.gz", + "checksum": "72ef46665479d41c58aed55ca7f7971fcda8b50f9996b458560e2b510ea5d5b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16_windows-x64_bin.zip", + "checksum": "d07849aaa4cd846945002beecdb40a2dbf6165cb1b1e03b6efe27369b27e9ce4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16/sapmachine-jre-16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B36", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.36_linux-aarch64_bin.tar.gz", + "checksum": "bca9740ff394c86234d97b4610452d91a180cced6739986932df23f64b624a2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-eabeta.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.36_linux-ppc64_bin.tar.gz", + "checksum": "a99c692ba2715889e3c2f3924c776496ca22ab0c8c122a8c33f8908d02d3ed49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-ea.36_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "24e905b46cea99d2bdb1249ba0b7b37ca8526d4da2cfdb7f811017c27cd81608", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.36_linux-x64_bin.tar.gz", + "checksum": "f84271655313f6fe25f2315247ce4dd9742945640074032be99764e12807cadb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-ea.36_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.36_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-ea.36_osx-x64_bin.dmg", + "checksum": "fc2aceedf0966736476c022f90ac3fa06fe481cc0d103670f5afab3d8787fe0c" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.36_osx-x64_bin.tar.gz", + "checksum": "da8b171375b7e426b20ef403a2417e8e4b51d5a3d88827ce82a300e57bc67ed7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-ea.36_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-ea.36_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.36_windows-x64_bin.zip", + "checksum": "270701b6ecffb5ab4e960eff14f3126f0a5acbc3080de5eaa41afb778a85105d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jdk-16-ea.36_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.36_linux-aarch64_bin.tar.gz", + "checksum": "6d516b8a52d8d644b66bd883bc39940403f75a4def2f9ef7f10d53f72d5cb064", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-eabeta.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.36_linux-ppc64_bin.tar.gz", + "checksum": "57a2ed5dabe70ebe63b20b62d4736b082e358b023d23ce0573fa9b2eebdde90e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-ea.36_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "e1aaa3c257c3fcd272bad7cebb0fbe204c48133cf059192281a264191bd96a7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.36_linux-x64_bin.tar.gz", + "checksum": "36330c182a54ac9d072e9d19c0ffed8de641edd0f54f14fe4f6b18a6288814b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-ea.36_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.36_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-ea.36_osx-x64_bin.dmg", + "checksum": "e4bb9f21434be9f13ae4851b487e0f7845e60ff52c77843d32953990bcc966b9" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.36_osx-x64_bin.tar.gz", + "checksum": "400e3060116a51940abeba1adf07f6f10db47db683de1210b7ae5e5cb2105377", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-ea.36_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-ea.36_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.36_windows-x64_bin.zip", + "checksum": "2ecb9af4e37dcc83cd148d9573b2ec191706be386bf981bd36b3e38aecf7aafa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B36/sapmachine-jre-16-ea.36_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B35", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.35_linux-aarch64_bin.tar.gz", + "checksum": "f9a87545b5e97a822b7f30a96b9c2f29b19d3e3741aba24404b1cb5cf788a309", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-eabeta.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.35_linux-ppc64_bin.tar.gz", + "checksum": "7d762974ea01fb65d3bef099614a2606102caadfca8b25568733e62b571a8727", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-ea.35_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "5d0015cebb5da5ca80add421c31b79f87009fe1132ac59fcc0a2a73c4dc6767f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.35_linux-x64_bin.tar.gz", + "checksum": "ffc3a5054f242fa1f8f56b04f24e547c9049b8f6ed566adcdd808e51fd537f2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.35_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-ea.35_osx-x64_bin.dmg", + "checksum": "6b542e037403dbea79f95b2d260d3bb8b180d49da8c75542b2aed8c84fb1cbd4" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.35_osx-x64_bin.tar.gz", + "checksum": "f914c0a4c55ca7443b2c5e8ef8a8bbaf39389812e4c3788792550e0f319ae054", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-ea.35_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.35_windows-x64_bin.zip", + "checksum": "f85f52f2b64f76150e483c70df7e13efa6986b01fcd8be7111c8ec6e09c575d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jdk-16-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.35_linux-aarch64_bin.tar.gz", + "checksum": "107f1475cadd3116043efeba6549c7c3ba1602298f4ef845df6f6e6bf1ad9ac3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-eabeta.35_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.35_linux-ppc64_bin.tar.gz", + "checksum": "267318340b717e7459ebbeca73625425edc261eef4c8710151f624d6c6b86403", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-ea.35_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "09e8ec7061a94061c94bb76c4b7b32637374f20bd73a47ca215c38c1d674b4a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.35_linux-x64_bin.tar.gz", + "checksum": "b0f6d34621018ab1fc3453e5bae7c47565da8d7a6cb0e2f8fbc6fae324916a7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.35_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-ea.35_osx-x64_bin.dmg", + "checksum": "26de8fd39e32aa731c5ba8b780d6d5827ce8f3dac58e364299a83c12f4a68d1c" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.35_osx-x64_bin.tar.gz", + "checksum": "3d66890bcbcb376fd4aeb9b902cf96ea6c9859f516a7aaad548de8b7f93c86f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-ea.35_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.35_windows-x64_bin.zip", + "checksum": "e2453efd2a0b83e198faa25a8b704c42eaec960c598d67263fc6ecd3d01af6c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B35/sapmachine-jre-16-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.34_linux-aarch64_bin.tar.gz", + "checksum": "5ba6e1f3521c408a387af1f195fd450f1cd5f55ccc10454435b1394ac935e337", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-eabeta.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.34_linux-ppc64_bin.tar.gz", + "checksum": "62e7bea8b7cb8f703eac1e51ddc18ad8da080fea2d848bf2ee51aea53e32b347", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-ea.34_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "afeddbbdccc6c9d1ce2ef45ef58fe5dc57a830ca4bd9acae5c7007cf5fe792c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.34_linux-x64_bin.tar.gz", + "checksum": "b79f6ce46fda8af74992deb02ec636e832d49144c562a3a98e74414441e14474", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.34_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-ea.34_osx-x64_bin.dmg", + "checksum": "07938c94957ccfbe77400c1896937f6faa7173023c0d360d16180581fb30def2" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.34_osx-x64_bin.tar.gz", + "checksum": "77428301044901bd91942bb89306b7884c9829e28559eda0a51be597ac0b1225", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-ea.34_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.34_windows-x64_bin.zip", + "checksum": "3da988fa32b56cebdf857c8e1ed7f9a2ce0d800ef25151f3b8d46788f9ead62a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jdk-16-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.34_linux-aarch64_bin.tar.gz", + "checksum": "1a81651cd462be8bff469b4f5986278a7cb054d2b23f297328c64398c1fffec1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-eabeta.34_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.34_linux-ppc64_bin.tar.gz", + "checksum": "dd75575e4071f7db4ec91058e951d8230234851d152e731e18eb77d53c741539", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-ea.34_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "68e0f7d3a6e6f9f0dfdab2ced32d0f858cb7256ddabf475ac9f84ebfb65af245", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.34_linux-x64_bin.tar.gz", + "checksum": "41ff1be097f91ac22bde4e2d8cdde9275d80273c7d2a49ce1a8406ec7628a849", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.34_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-ea.34_osx-x64_bin.dmg", + "checksum": "a33c17f67b93020c61e082e64c80f6b58180c0d0892667ab0e61f2f9d8637488" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.34_osx-x64_bin.tar.gz", + "checksum": "f3ee69ea4a7b0cbf75866bd250d7848ac8c0e6fc65fba738374b6a81eb55952b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-ea.34_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.34_windows-x64_bin.zip", + "checksum": "7b5c6b48f18b6108888565da9f2ace28aaee28e939172948ee31b98a48e6b9ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B34/sapmachine-jre-16-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.33_linux-aarch64_bin.tar.gz", + "checksum": "329f13f2ca882dbd3b395d22f759cae41459eebb518c3d93b837773b768e6ef8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-eabeta.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "2e4f1676b1b43509cd3a27fbc4a734b12da4e5f6035a8b7f60405dc80ef62c4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-ea.33_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "c842edd9025aa9dd56c910dcd4d4a37bf733ae97e9391c1bcb35f1ca24aa9fc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.33_linux-x64_bin.tar.gz", + "checksum": "91ff563f833b6b06b7715d13b1e35effb0b157384691cb61703da2a2dc1e2ea3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.33_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-ea.33_osx-x64_bin.dmg", + "checksum": "faa7c421ead3099777ce963169a37603e09a6bbc5e052c2be43ad545dee77244" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.33_osx-x64_bin.tar.gz", + "checksum": "c78e103069f52df664b935b63df254b6e7b91d715165d3a203fe3b1955f0cce1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-ea.33_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.33_windows-x64_bin.zip", + "checksum": "2886621b0de438c1861850aa46fdd0828c3de84d75cbfdd957541c3b890460ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jdk-16-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.33_linux-aarch64_bin.tar.gz", + "checksum": "a6cab4634c983cd515b0489ee59f613532047d78957525a7c1bc18e3eca803d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-eabeta.33_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "21e42e8612477fc7155a6aac56c16c9319f1b929413b44c290d517794b5dde83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-ea.33_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "797f824a0ddc94515ab93a45940b57160af9e70c3a47869dee7eeb1b55e564e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.33_linux-x64_bin.tar.gz", + "checksum": "78a35ccfbc96ffa30ab7a5aca2d61d35b5fdd8ab38ac6002bf71dfa812eba4b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.33_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-ea.33_osx-x64_bin.dmg", + "checksum": "ddc23fba51527fd0e9dcbb7d7de3de6ab5a34c342de0a81a284b9e18227dcd50" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.33_osx-x64_bin.tar.gz", + "checksum": "a64d2c2f594ccaf205ac71834c17c344406c1c642ddba94f805657984558f434", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-ea.33_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.33_windows-x64_bin.zip", + "checksum": "745855d813d24c0a6e6d8e923548d5444a07ac500302aa1cf16b156e60185d39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B33/sapmachine-jre-16-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.32_linux-aarch64_bin.tar.gz", + "checksum": "cb608fad4b2288fd1ded7f75f1a3835d6319e752b6ea146ce92fe29f7c8e582c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-eabeta.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "2c286a29674438e6e775fdbc2c82e478977d6289aee24048e24e3d56299e89f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-ea.32_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "44ced20a4fd297271e960b760b5f5b1eda7ddb50c12a87dc8b4b6b00383b37b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.32_linux-x64_bin.tar.gz", + "checksum": "b7c3c0dcd8d32492f348a2647ac0c55c773d04b067c2bd151782fd348454de7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.32_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-ea.32_osx-x64_bin.dmg", + "checksum": "e67efa9c626bb03eca81fd5e18ffa50b181fcc097268f0369d314587c63e31a8" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.32_osx-x64_bin.tar.gz", + "checksum": "9543e80f8cd562b940e0deabf9d0419d75d1b01a2419357d07adbe96c4c09a06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-ea.32_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.32_windows-x64_bin.zip", + "checksum": "087ead0e3c9307a83d737f65dcf4f65f0fea555e3c9fdb0d40ad07573f9fb71a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jdk-16-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.32_linux-aarch64_bin.tar.gz", + "checksum": "a6491c993186a6f1f65d70a33061e4323b2f8bd7d9ada099eb018b6e8cf49fa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-eabeta.32_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "5c9b56425de1c13d06ca0d4cf4ad67c32853fc7a2752517e5e708ff98bdf62cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-ea.32_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "241ce3fd4ae70357fb7476955838a6ce92f5d1092d050057447b63cdb3209eb3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.32_linux-x64_bin.tar.gz", + "checksum": "278c59751a38c0e44b2d02c37ac39014225764c13c8412f6b992383e07f47226", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.32_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-ea.32_osx-x64_bin.dmg", + "checksum": "82767866b85801cea70dbde76803e5f7fa5d59b176cb4147a2cdd59e83c2d7c5" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.32_osx-x64_bin.tar.gz", + "checksum": "32b37afb50cf71c310309c4972aca965a09a6e9619cb71ac8efc7a00ebcb4c9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-ea.32_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.32_windows-x64_bin.zip", + "checksum": "3bb239e8fb95be68d22c0cada544ab27aaf231df6f9e27a49ad95b56ee90d7ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B32/sapmachine-jre-16-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.31_linux-aarch64_bin.tar.gz", + "checksum": "6f70df2a6ab05624d91f2980691af2e2e95050959ad08e7aa5a45a73d5cb46c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-eabeta.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "f050194c75e2f795a39f3edc915b88cd5c51608c4a7cc388be0a5517e5ff0a5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-ea.31_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "52f5beed5acbb439fba409838240ed942180c22d592b5a4e2b64ae1150fef5b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.31_linux-x64_bin.tar.gz", + "checksum": "dd6abb1158aa5f5a9df767b277789da4f80e5dd501fbff8d626fe8bba8a97b92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-ea.31_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.31_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-ea.31_osx-x64_bin.dmg", + "checksum": "69e4bb4a30ebfb391c1ee33ddd9a7ccae3a00d90c513967641ba5496b2089e9d" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.31_osx-x64_bin.tar.gz", + "checksum": "30ce5805bf0b1d21db10c79c869a1d41c71375fa6541384e200cde048916f025", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-ea.31_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-ea.31_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.31_windows-x64_bin.zip", + "checksum": "22b31b2fd8c7c519d44c0d302168ade454374ed1b07d244dd47d8b8f34d3cb91", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jdk-16-ea.31_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.31_linux-aarch64_bin.tar.gz", + "checksum": "2e2d54c3d4837f425709debaae932bc16d19e84f21c07d2e1238ef6627cd84c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-eabeta.31_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "a49751dd87163f26bc5ebeb10d085fe37cb3edc4834fa2116b88da54ee0203a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-ea.31_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "3e62e620b88b3f13a706af4745fda0979a53d44083ab3997af8e381d4e7a0164", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-ea.31_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.31_linux-x64_bin.tar.gz", + "checksum": "80085a4a3886405292f33ccc20c40f319121b69edb166dee4587ec6c6fe1f643", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-ea.31_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.31_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-ea.31_osx-x64_bin.dmg", + "checksum": "82190b3d698dcf355cf60f6ab02a767d258cbf18d7733e5a958245caa2767053" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.31_osx-x64_bin.tar.gz", + "checksum": "703bbb1267e0d717ea313ee87e8810c01de67eeab9fb9c41f91fd9ce3ce505f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-ea.31_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-ea.31_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.31_windows-x64_bin.zip", + "checksum": "02f38e4192ecfefce470ccc54aada2da5dc2538fc914e08e70a4f2ce66229e0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B31/sapmachine-jre-16-ea.31_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.30_linux-aarch64_bin.tar.gz", + "checksum": "74fcd31afb5bcf99bf9228d0cd22a5ecee20dcea55c00f55e5f9ed9617c5beb1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-eabeta.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "706777ff81905e20d673986ca7738cb02fe6a67de349dae29e546b5378919753", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-ea.30_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "c0a8ed7d9976709f6f6d393bcfdd28cc3b129328419212b032ff7170cd0bac52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.30_linux-x64_bin.tar.gz", + "checksum": "ea9475e286e6bb1204496e7660bf7bd22e6d7d4dee75202781dc7787a362d348", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-ea.30_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.30_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-ea.30_osx-x64_bin.dmg", + "checksum": "d2ba4134e1cdf8e08dd0d20b4eb4feeb267bf550b8c4c7976f6b20b73e9038a3" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.30_osx-x64_bin.tar.gz", + "checksum": "d45f501ce9b5636df814c139a898460f2e66edcd3730801fbc4397e5cd952e10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-ea.30_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-ea.30_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.30_windows-x64_bin.zip", + "checksum": "2e542e773d1beb1244235b71d1d445d9e91614d02ec17056f7354a1d8e3f242a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jdk-16-ea.30_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.30_linux-aarch64_bin.tar.gz", + "checksum": "1da8002cb26acf3394324c3ed137d00bc4d03a0119f910519531350a58cb7349", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-eabeta.30_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "be3f1ea021ed58500cc0f7b45ddaa89c9e3bdbc3ffe30e3978803e8f3dbb0764", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-ea.30_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "6bc2e1594f7685c320b299a9e458748bd108ba3fa86397ad7b9e6ebe1ede571c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-ea.30_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.30_linux-x64_bin.tar.gz", + "checksum": "5728893a9675eaa123838eb82eb7e46388529baf614cbc8b6a12dd72671fcb9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-ea.30_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.30_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-ea.30_osx-x64_bin.dmg", + "checksum": "c366d48c00346e413e9cde58ebe066db6e2b658b798116bec5927b6dac536676" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.30_osx-x64_bin.tar.gz", + "checksum": "3dc97e833f324b9b94d774eadbac7f9517bdbefe9309f037e450a2cb70619e91", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-ea.30_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-ea.30_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.30_windows-x64_bin.zip", + "checksum": "149716281a10024c6f846ed3a50e162244a3eff7f008e7ec7fe6ff30270f0770", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B30/sapmachine-jre-16-ea.30_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.29_linux-aarch64_bin.tar.gz", + "checksum": "5c739e396a0a53397052bcfbdb002d03d69cd7d1cb0a292fb9dd5d1a468aa891", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-eabeta.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "ee1bfb768718f78317e6ddfe4e0fe61c810723e5912e10b7aafa473f63f587cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-ea.29_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "78d92b769a7a19f1e6098efd4b604790657d0ab1350929f636a27e665d63b522", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.29_linux-x64_bin.tar.gz", + "checksum": "00e765a4bfca7d1321e75b82c58a919613026246cb6c78338f2ef6f303dd8131", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-ea.29_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.29_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-ea.29_osx-x64_bin.dmg", + "checksum": "68c605634a54b42a68c2a73c7ad4ed43b32ebd08a3e56c505ec5e15c68949ede" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.29_osx-x64_bin.tar.gz", + "checksum": "2a09576488f1f0a7236a111c0fb139abe08f7ed6323947951753af339a4e90cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-ea.29_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-ea.29_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.29_windows-x64_bin.zip", + "checksum": "533dd2583e5981a989f074a8f628bab5f4cb379ee81030439b26e9a7d6ec73d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jdk-16-ea.29_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.29_linux-aarch64_bin.tar.gz", + "checksum": "27689f118531ad5896460f89e346ba9a61ef3d41a51f34de26676cadf41fc4b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-eabeta.29_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "6d2ea3046dc0fc47d747c90e9c4025708e042b5fcf15ea043fd350dabc8a19dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-ea.29_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "9650985f1fe7f5e67e49e8052f1a7bc408014b0d7428066690b87d049b8d0107", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-ea.29_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.29_linux-x64_bin.tar.gz", + "checksum": "918b7b84ddd7f9201d6619ac2173901d8737244e40dd467ed830fbf24866a537", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-ea.29_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.29_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-ea.29_osx-x64_bin.dmg", + "checksum": "871052067aa84b69287ca10695c0c2a22ee165cc0cf9567856327d138be650a2" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.29_osx-x64_bin.tar.gz", + "checksum": "d8672f504a6335886cd52b0bd30c0e4233ede2bb8d886f613ef152bda984f936", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-ea.29_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-ea.29_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.29_windows-x64_bin.zip", + "checksum": "ed4b021285528a9add15c5a47c0bb9cf52899ca409ce02dc11606093af2810b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B29/sapmachine-jre-16-ea.29_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.28_linux-aarch64_bin.tar.gz", + "checksum": "16c330b37c6cb994ffc664a32115b2be3a6335216b82f45f921f59c2798a801f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-eabeta.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "66621ef53bdd969afb41fb7196771b1bd05bdd41dfed9ac9222c5e0b8bad5234", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-ea.28_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "d3c7e4219bcc4b0789a276078ad1e69b291f2407c1cb8bfc79a7c861f7f6addc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.28_linux-x64_bin.tar.gz", + "checksum": "ad21da55310fb089d0550646c890c57996fb101c6fb8d10c6a9a143f9a154f03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.28_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-ea.28_osx-x64_bin.dmg", + "checksum": "d82ab2f3f28940ff64af04eac95e03324b9074b9d691b878f7a34289c7dad876" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.28_osx-x64_bin.tar.gz", + "checksum": "722feaa835d3545d0cd96e512e50684d0cd8b926ae76f0dbd66006c1d90e6d25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-ea.28_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.28_windows-x64_bin.zip", + "checksum": "5ea53813b69a7b12d43cf9b99d16ebb01729d8568ac89493c9d90fe5aa9ce802", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jdk-16-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.28_linux-aarch64_bin.tar.gz", + "checksum": "f7be007dd6c5d354846fc3374c86616bc412c7c1526490cc20eb35c8bb9758f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-eabeta.28_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "5b124f79b6a373346ddd5169a171653cc53ffa9049b46b3fb57660da80da1630", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-ea.28_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "fbfc41d0687fed78d9fdba2258d60a7ec87695ec7697a5c59eb3bb34ac3356c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.28_linux-x64_bin.tar.gz", + "checksum": "4890450284ac89e41b98cad4756317f2962e2333e190c1f57abc2f358ab86b6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.28_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-ea.28_osx-x64_bin.dmg", + "checksum": "bffca8dedf8bdb8c8a46f4669c7cc16cbbb289ac3db57b370ef548db2ca3f20f" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.28_osx-x64_bin.tar.gz", + "checksum": "2916d76dfcc6c23f4db7d0f73ebd6f825b161c6133b6bbc2eb4a02183af6afde", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-ea.28_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-ea.28_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.28_windows-x64_bin.zip", + "checksum": "2f417c1f29e5b97a43c8e380cc9630960ef8f2d430d7288723771f90cf3176de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B28/sapmachine-jre-16-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.27_linux-aarch64_bin.tar.gz", + "checksum": "d2a04408cad41ee3a88629e033e2a174470bd8e657fa1cae67bc0d85c3fd4a01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-eabeta.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "19bf0b5885d379c6a0598bfc56804bf0311ad928571cb7b2ad1b3974d6da5ac7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-ea.27_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "c7a1c7323657297034edabaa6f2965ca574d029bcfe91a5c84689cd4423684cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.27_linux-x64_bin.tar.gz", + "checksum": "c612407d8a445bf3528f4a91acb97f00cdd3029f070b0508af453dfb111b8905", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-ea.27_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.27_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-ea.27_osx-x64_bin.dmg", + "checksum": "c73fcfde2fd6473eac10febb4d944df1477dea5b580eedbece3cdc51f1a910b8" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.27_osx-x64_bin.tar.gz", + "checksum": "e2243c6e03c360e65f25ca4c27194eae1af1314103bc6ad29442871855516223", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-ea.27_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.27_windows-x64_bin.zip", + "checksum": "0b544dc0e17833985ab2d83b57653ff7f63e3db4dc53c4325dbb828da75ca0fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jdk-16-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.27_linux-aarch64_bin.tar.gz", + "checksum": "69f51d9da4457727f7e518cb0feaac0bbf1b2472b1edb72f562d58ad6faced2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-eabeta.27_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "b01e12f7ee92fb1b463ce90bb9c637d4397bcdaa6ea7adbaa244ca9664ff2508", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-ea.27_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "34fa6b61ab0dc4f0b1a026fddb9379e62d5554991ed01feb40d99579323effa2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.27_linux-x64_bin.tar.gz", + "checksum": "9119289c7f51c6c9d47ff79ca802424509cbf8d2bd620f21eb8d2a33c0c12def", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-ea.27_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.27_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-ea.27_osx-x64_bin.dmg", + "checksum": "2492da2e50cc2eb109e5f0ba1fee6e321036d9e36b0f3d89af4b9cba4a3d3b28" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.27_osx-x64_bin.tar.gz", + "checksum": "6385bd06b088c6ceda75914705fd2fc90b4ff8129753010ebdcf7a49cb4bf556", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-ea.27_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-ea.27_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.27_windows-x64_bin.zip", + "checksum": "791c7af01cd372c2421517a5ef8f88c505b8b5083f854a22c641051017338510", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B27/sapmachine-jre-16-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.26_linux-aarch64_bin.tar.gz", + "checksum": "e2294f6fbdee16780eb9bc5d35f7a1798014284a2929340c0dec000ef352057b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-eabeta.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "91ff36f721495bdce609c77a937f250f9024c11891df2f49303978ae9545054e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-ea.26_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "ea960d6e80cab1234e8d64df828b4ae36bf47fdeb55eaa90f266a8b4c16928e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.26_linux-x64_bin.tar.gz", + "checksum": "e46098c584439219769ba69479190f747e09917d9ef3b394bb276f3e3e0ec987", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-ea.26_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.26_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-ea.26_osx-x64_bin.dmg", + "checksum": "4a79a1df84a8d07377bfc91c53480b1a54ab311db9d1d18a3442da37adebfd36" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.26_osx-x64_bin.tar.gz", + "checksum": "21b17f51ca0838614bf5d5ceac252b6ff47f5ba09dc94528b6f86875c466ed6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-ea.26_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.26_windows-x64_bin.zip", + "checksum": "e7bb31529cc2393c4cbbf13a8bb04dd0947dd6ce53aab3dca39b4856158a8173", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jdk-16-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.26_linux-aarch64_bin.tar.gz", + "checksum": "7c6f9de37bab50d42328cbf0961d3ef64dbe247b64d0efb0890942b41d3bd78f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-eabeta.26_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "2d47a1e21bbdd4f35b7baf7e69b85ebb6868fc2551ef09d664b10e34f766b019", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-ea.26_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "d9a16925296f08cda8e61daee4d93a44ea4479d18138fc88304a3d4446ffff0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.26_linux-x64_bin.tar.gz", + "checksum": "6778343f1e85d27f60360d81a8ba6aa04fee04263544a77ee03d6c3860dd16cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-ea.26_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.26_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-ea.26_osx-x64_bin.dmg", + "checksum": "b1e3bebadfcd619002c1c2c576772f923bd007c6d53acb32c7004f5681cf0b0c" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.26_osx-x64_bin.tar.gz", + "checksum": "71f89e995de7ad7d6f799051d32de94b3be131f6ac134212aadda65bec1fdd77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-ea.26_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-ea.26_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.26_windows-x64_bin.zip", + "checksum": "3c40b107b0986ef893cf4f3e38cd87ec199acfccf4d7cc10136c67b725c217b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B26/sapmachine-jre-16-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.25_linux-aarch64_bin.tar.gz", + "checksum": "534eacdb9150ba5b0ef96939a6e1ba9e2b4fce96395d5530c978e3aa65e07caa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-eabeta.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "2d1d592cbc350bd1672452da73b1b09c93afd019344bb5b4377ec0810ef8e7dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-ea.25_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "bdd98f61a723f565611e85decb9a99bbb64a52c844a858c416d24a34f718dd33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.25_linux-x64_bin.tar.gz", + "checksum": "774ee341459aa363e65fe19e2150527ba5081a3840c55a7253953df433c1bb66", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-ea.25_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.25_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-ea.25_osx-x64_bin.dmg", + "checksum": "873296ecbabb6380594046455a9f753e90aacbd7d7adf6c3ffec983a82ecdd4c" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.25_osx-x64_bin.tar.gz", + "checksum": "53166a47d794c7ad37cee42dec34fffdbabd524864e47b760f09ecdb872e4110", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-ea.25_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.25_windows-x64_bin.zip", + "checksum": "23781bd0f10753598529375abdcf403f81940b674e4ac2aa91c77af68fe4b630", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jdk-16-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.25_linux-aarch64_bin.tar.gz", + "checksum": "538b6b73ea5ed565f3c50247957682f5222c551bcb891aa92e65a24c184352e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-eabeta.25_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "5509f846b8c899cc0a330e0145503525c983d0d77f3486511468638631b5f7a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-ea.25_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "2a8c1a514c640d37cea07d06caee8e1ac2726c93cc3767c4bedfde30c25a63eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.25_linux-x64_bin.tar.gz", + "checksum": "216a4238a1524760fad4095be56189db6acf49e6629c2b47c82ac8faaba2faa9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-ea.25_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.25_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-ea.25_osx-x64_bin.dmg", + "checksum": "f412a167a71a61537c7f5218fda30b525c5add6b2d9b76f376662da2ca6d1f1a" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.25_osx-x64_bin.tar.gz", + "checksum": "43a98c8657f4d00582474f3734a3a982403583329e35765d16135448312ba6b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-ea.25_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-ea.25_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.25_windows-x64_bin.zip", + "checksum": "dd8efec453f86748b484acea3342aecc32c4f33b8a0cf23dac4d799c895223a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B25/sapmachine-jre-16-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.24_linux-aarch64_bin.tar.gz", + "checksum": "44847800f1607ac3866efa5d4195db2bc450afa044473db363e613e445336426", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-eabeta.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "f7993921ee0330833c75a73bc6a858b9fad94982996cfd13adde23b37c67a9bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-ea.24_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "eb1605ac20e2c4c1fa2745d2afead27b8250a766780119b15fbee5ac2757e81e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.24_linux-x64_bin.tar.gz", + "checksum": "cd3827fc80597c26c959dcb8de7d07c82e2ed8b1248c1835ef78aa328b694c73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-ea.24_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.24_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-ea.24_osx-x64_bin.dmg", + "checksum": "9c21afa67364523fad73d61c59ac159ac43933d933d433e3e70a16222b79ee71" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.24_osx-x64_bin.tar.gz", + "checksum": "4fb8412d51d3b1a58a4dd6e52762c31f3c612a0d0396deb245b15c4006efb60a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-ea.24_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.24_windows-x64_bin.zip", + "checksum": "373720f54d12e010f0892be689b2a468059225e627c6b8caa105617e998d73b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jdk-16-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.24_linux-aarch64_bin.tar.gz", + "checksum": "16c5447816a42586f6c1b079016f75697ec33101b5c6f213759c4ce85be62f6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-eabeta.24_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "599dd54bbe080bfebaab17304a62d6f7d84ed8b893e4b821c68739bf4b85dfaa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-ea.24_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "dc32d11d3812260403add8a9bb70923e7f3fb5c36e716298f38e173deac2e383", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.24_linux-x64_bin.tar.gz", + "checksum": "3f4326bfdad16268f9a8bf1f61c4d505a98a2f48d1d84e3d210915c4e49f4268", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-ea.24_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.24_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-ea.24_osx-x64_bin.dmg", + "checksum": "82ee82c5c0aba1565fc73676d77559f9b2dd16f56e19bc32e6ed62ee278768ec" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.24_osx-x64_bin.tar.gz", + "checksum": "f6121c9be2be41cd5827bae2c084d3d04cb0828910458a9ae766230538257582", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-ea.24_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-ea.24_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.24_windows-x64_bin.zip", + "checksum": "7c8befc7dcc2b248a53b4369b2448703f88906d1458b91ab4dc9695c74352368", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B24/sapmachine-jre-16-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.23_linux-aarch64_bin.tar.gz", + "checksum": "42aea03ebc2448c3cd62c5881b2936e27d6070b93ce644ec77955a2b52cc2deb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-eabeta.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "fc8996977506ae49f70bd6d0007b18debe8b2ff3f541cdde88fdbcd1fb16c1d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-ea.23_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "d494cd5c2a7bd11cb0972d21cb11c3b762eb8d3024fbe0b8b5590d9d0e4244b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.23_linux-x64_bin.tar.gz", + "checksum": "a957c81c3be5caffa69ec952240195f50da1d7d6028e154c1c1a5a50a9a757f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-ea.23_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.23_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-ea.23_osx-x64_bin.dmg", + "checksum": "4eff672c89359512a0f293b844056d915106efaa40113f12c7ffdc25ddf6a443" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.23_osx-x64_bin.tar.gz", + "checksum": "9dad95096049d1b566d112371cbc7e97b042f9f3e582f5c56724ea4553d36ec1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-ea.23_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.23_windows-x64_bin.zip", + "checksum": "933edc827217fe3a89aafcded0911b386355b78cdad579c625e23d4b2b8cd85f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jdk-16-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.23_linux-aarch64_bin.tar.gz", + "checksum": "e7851f8d757bc51ce8a37527f2b0bdfccf8e17949d9bec1b4f1284ec9ec269b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-eabeta.23_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "96ceae3fbd901dddd59df38a34b8fc8bd1d709571042eac597a3e70f801f51d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-ea.23_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "48dde4426d0743a35c111923bcb10b9c23b31472324bffe566eb401223a669b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.23_linux-x64_bin.tar.gz", + "checksum": "506e864a3b456f59c27bb3d41a5735126b19fd13dde7b5e9a3fa2abb64a08c3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-ea.23_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.23_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-ea.23_osx-x64_bin.dmg", + "checksum": "e6e4e2f1b642a90657d15dd7bb50b2513b063a7a7926835167654193bfd0cf2d" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.23_osx-x64_bin.tar.gz", + "checksum": "38fb86f386e9031c924017e4056aa5434c8f58279d15d41f58b4c65bcb67e902", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-ea.23_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-ea.23_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.23_windows-x64_bin.zip", + "checksum": "21ae44cd0afbf6122e66fef304b5cea9aad37f8a1d7a65eb4951990b7fd3ca82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B23/sapmachine-jre-16-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "dd9cd7c0e6b00397a83adb8511056e48adeeeebbcc5ebc69f3e8c31cc9149fb7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "6ca447c13c66398d52e7d63d5d63098ffb4aabade94447c2aecf72d66ffc407e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-ea.22_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "3c8c4100d1e1a2934db9506cd915970dd0530463a8dab7a76319a234ca32e12d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.22_linux-x64_bin.tar.gz", + "checksum": "c908b2d9b1a47719b968a192e438deb49d54d3ff80db57ff6eb8ece9b0f1d2e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-ea.22_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.22_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-ea.22_osx-x64_bin.dmg", + "checksum": "da1cbdf1bdd6da57f6e514ec4239baad0a0192e5ce594c8cc7b343252b586b35" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.22_osx-x64_bin.tar.gz", + "checksum": "7d415339d71fd336520a48a9060bc22f6457cb68882244039ed39c16a3fd03a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-ea.22_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.22_windows-x64_bin.zip", + "checksum": "3bce7b287eb515e3570d8d747b8052bcb499c1babadb477db74a5ae38f3d4253", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jdk-16-ea.22_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.22_linux-aarch64_bin.tar.gz", + "checksum": "c69dba40564877b53a555f8513fb328ae692a7e09967c372e35d555f09c00015", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-eabeta.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "9d2654785cbe0b12f21ea605649c3e73e9643635edbc04ad4f39accf42afc411", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-ea.22_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "69f8cb648cbf0e2fc1c5bae1e0f3bebd98aa480b82a8d06e55d9dc0d17fc4e6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-ea.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.22_linux-x64_bin.tar.gz", + "checksum": "db151a17da1475f6efe0f1f3a6db228a652d190fdb462bcf7a3bf50548aeee9e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-ea.22_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.22_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-ea.22_osx-x64_bin.dmg", + "checksum": "56ac42ec2021fbca9febf4c75c9e027807ac2f49f30c89538741b1ab3e4b2988" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.22_osx-x64_bin.tar.gz", + "checksum": "47d90dc8cf86a6b28e53879e0640130a3c8776cc2027947451ba868655161f9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-ea.22_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-ea.22_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.22_windows-x64_bin.zip", + "checksum": "496f7389df639668f124f4a245e7d91069778d5dbda26311fc89c11a13f4272e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B22/sapmachine-jre-16-ea.22_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "54b754d332264a66be34222d132307c98b430bfe1dcc59eb1ee0b96b2363bd77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "37284d0abe9723704b29e6964912ae807308c5beb5b246960d9002d8abb5966a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-ea.21_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "780e657da0fef01d75becd13dd16125423553d371d30ae69da95b21b82f836e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.21_linux-x64_bin.tar.gz", + "checksum": "9c3fb6a740005fc48f4f25e8e79e6aded2c79b84939665c34e69e92a9a9d2a8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-ea.21_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.21_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-ea.21_osx-x64_bin.dmg", + "checksum": "d972bad42d26a998ffb001aa37932708eb6dce3caaee0c6909b69af27659a76a" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.21_osx-x64_bin.tar.gz", + "checksum": "f6586d51bdb8c5385b7c3cc28b696d295a89280f40ff6da77039e4aa927d6900", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-ea.21_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.21_windows-x64_bin.zip", + "checksum": "5449159f7d18376a899325de76da3354f16bb29e15e05edd1f004a0a3aaa2523", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jdk-16-ea.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.21_linux-aarch64_bin.tar.gz", + "checksum": "8a30037ae17d8f3b0d75f7df4137076e26a82afe47301d74e33c09358b46d7a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-eabeta.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "4f82a490b68ed5bcf418bc7686904cf852f55188fa599716feba24379b9dfc7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-ea.21_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "0075ce8dbb0ab5f37345b243b3299e34e45960742f4ef9077e69fd420db3fcc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-ea.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.21_linux-x64_bin.tar.gz", + "checksum": "a8780a0792af40324d28ae44ea2c4e07c1611007a76ab7dc2b587b401db2f787", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-ea.21_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.21_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-ea.21_osx-x64_bin.dmg", + "checksum": "e87c5b4171a70710af18e1bd7f28e2928ec50748293aa352bf70299d7fc184e4" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.21_osx-x64_bin.tar.gz", + "checksum": "0c93776974234932ca92855f934ab6b2b178fca518848ac491ef7fb213da5035", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-ea.21_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-ea.21_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.21_windows-x64_bin.zip", + "checksum": "53c898cb403fc37866efca550a0ec3f45040fea9b2b407329cd2365d28c8e4af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B21/sapmachine-jre-16-ea.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "ea9ffa7770a860a2f467e4e126142dc61bd95d2d603caae09c33b46a8991d3ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "96f7b2bbb4eeed0bff5383a3a5574cf32c169d7a9f182f0a6ff203a04a22e6f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-ea.20_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "cde4b97cc1b6bdc2a262fa789875fdab1bb5e4224dbfcb7a2034232ed0377126", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.20_linux-x64_bin.tar.gz", + "checksum": "485b47323a49185d4f0e8e848705482aed4097ccd6fb351bc39d92eef252a9a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-ea.20_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-ea.20_osx-x64_bin.dmg", + "checksum": "f59580021b2b50b2162cde74c597be652c24cef3e154012a5eae12dbfeb62e20" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.20_osx-x64_bin.tar.gz", + "checksum": "79e86a15d8ae3fdfe63185d2f4be02d78152358594d94105d27755983d826251", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-ea.20_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.20_windows-x64_bin.zip", + "checksum": "ba5e5db970ade18e089d3b9bfd9bc693cefbd0f7d769538aac633889696bebdd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jdk-16-ea.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.20_linux-aarch64_bin.tar.gz", + "checksum": "629d121aa8ba403a32e3abdb9923477729955e7edbef653034df6a88da836e16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-eabeta.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "b7d4db132c55e47a5081298ccc92a3ea5d4acebd87132d2126aa2cd2080ef409", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-ea.20_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "ed2a08c2ed6bf5d5874c4f9a644c735e1c93a62a01fdc63b3153bcca604897ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-ea.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.20_linux-x64_bin.tar.gz", + "checksum": "cd0333701bcf7136cdb71812fd0171a014c6981b82a916577b00861752d27bd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-ea.20_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-ea.20_osx-x64_bin.dmg", + "checksum": "16ed8df1bc070b593f7d984cdef3393a9036b7a326ab3f0478c8d4cbade63119" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.20_osx-x64_bin.tar.gz", + "checksum": "0819c0b7b7b1678f58fa221c0e95d25ee10b52240c0374e8fc57775b00985abf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-ea.20_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-ea.20_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.20_windows-x64_bin.zip", + "checksum": "caca6b37112808481c23b61c359ca69673ca687cb72d3ad482a2e3adba8d93a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B20/sapmachine-jre-16-ea.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "f0747b7cd946e089643b44528d62325e2453f4644e774456641cfa0e18b64420", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "9d9e27ceda924667ec76f050b275125aa4458f8455ed4c7b9b7a919773678c22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-ea.19_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "3580dd225534cfb0401bfeb15e3c96bd7e7e641980fd4aa5d1a5894309f5442c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.19_linux-x64_bin.tar.gz", + "checksum": "e27f29ab63a2db02d055c49f9b7ada53a02d01604ad162687a6b86666284eb18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-ea.19_osx-x64_bin.dmg", + "checksum": "5c11d5ea0b49377464734aac19cf7b8c41f6b35eaedb2fa4717c62f3cfaf17af" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.19_osx-x64_bin.tar.gz", + "checksum": "552986d692d22f41338b0b8f3c5f03037feb256d65d90a4edbdc96f959ec47b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-ea.19_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.19_windows-x64_bin.zip", + "checksum": "a706607077902616b799a7be4ae34bb45a0243534ffce94cd942971688381e59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jdk-16-ea.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.19_linux-aarch64_bin.tar.gz", + "checksum": "9e09c07c0be43253cb1f7c457ea22cb09c94cdc0dfddfbcafcdc13beed43f718", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-eabeta.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "77a69139194a5016b3365e4fb8f5d48a0c6055ced0d96f6b5730bf84595fb86f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-ea.19_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "7a52ca1ecd993202d13cea81e1caa8423def2892e99eddb8f2d687a9cc3b6edd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-ea.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.19_linux-x64_bin.tar.gz", + "checksum": "d17402461ea4b61e458fd3953f075b68a35e7f8cd5e89bc7e44dda8c58fec1ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-ea.19_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-ea.19_osx-x64_bin.dmg", + "checksum": "bd7cc745c5e63a61e8a7fc766e699ea5537385e7a1aaeda69cdbd36f06058184" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.19_osx-x64_bin.tar.gz", + "checksum": "6aa09344e25cbf1745bf245f023758bf89c6abeb0559e0ddbc1c4de6bb0a0c51", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-ea.19_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-ea.19_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.19_windows-x64_bin.zip", + "checksum": "12fabe375966a9f604c57b8983f2917c0717ebe2dc581aef350b95553fbd03a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B19/sapmachine-jre-16-ea.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "e347133475a633bc1c2992fc2d9e77d0ca6f4765d3dd6c35896fa3a3c4cfafe4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "825aa928c5ddc053690a6fe11b9c7f15053cc9d9f593d3dcac444c853f46e7e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-ea.18_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "64f36bf7955694e71e5d1b49f3bc4205344c11401bf2b735dcccaaeef16d9e6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.18_linux-x64_bin.tar.gz", + "checksum": "c59573d480cb5f427c26bb95f4715d48ecc3e4a83a725f0622ae781fe838d4c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-ea.18_osx-x64_bin.dmg", + "checksum": "0c0a9aeb6d4b023f034c12eb74c205311dc7d18e1cd64016b51241b2d5a1cd45" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.18_osx-x64_bin.tar.gz", + "checksum": "d960a73c68854d45c4305c37dc008ad066bedf7aef4bfe4f1d898b9be435e30b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-ea.18_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.18_windows-x64_bin.zip", + "checksum": "36d6605d7cb84c117477c77c9b991d3e7356661a357b932b018740cf53f46c3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jdk-16-ea.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.18_linux-aarch64_bin.tar.gz", + "checksum": "92fcff4d217e750af2c93392dee8fe944543cc0ce104ad110ddcee1652b7ef79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-eabeta.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "be6fd49328ae430efdd398225c1bd5f015fd832db9cb2520e000d96a67bbe16a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-ea.18_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "ff4180f2f87155d3f988aab33f59faf2bc82110ceb2b0957e43e3af8f93cdd4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-ea.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.18_linux-x64_bin.tar.gz", + "checksum": "5c854ff7749a14934b5e7ee4ef5647b929525bc476b8750dc918b3a33ebb1194", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-ea.18_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-ea.18_osx-x64_bin.dmg", + "checksum": "2afb0690a09e5ac400587463ba8ebcac4c039e9dc049b384478177b436d294f3" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.18_osx-x64_bin.tar.gz", + "checksum": "83f3e8c02e8a429724cefe82ab65913b9eb39a68de390017afce6ab7c9808003", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-ea.18_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-ea.18_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.18_windows-x64_bin.zip", + "checksum": "f12fb8a3c0546cb9359d09d47882f22fc71dec8782f1348a2e48bf4d00d8df25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B18/sapmachine-jre-16-ea.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.17_linux-aarch64_bin.tar.gz", + "checksum": "b15bea778909fb2de3f16181cee9ce04c7d0210a471760152895844d92c9cd1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-eabeta.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "f70b333bccecabb0ab1c50c594bf39eba5570b0ab3af381b90abc5d5d435373b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-ea.17_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "a93d639ee9bfcad158a462db671aff42a03d799dea7a643dc0e6133c7676462c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.17_linux-x64_bin.tar.gz", + "checksum": "122c05446d968ad8cb2888e8ed71af890fb4704a713d739073976efad8146656", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-ea.17_osx-x64_bin.dmg", + "checksum": "c8c9278eb04a6f2e5ff24c9a161631757991c9889dcc179f938bb73a675a7f6a" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.17_osx-x64_bin.tar.gz", + "checksum": "2feb963a1bc000f3fe6e54dc3693d954ddd332aaca8aa0f50b58a38317d76b55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-ea.17_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.17_windows-x64_bin.zip", + "checksum": "d37f26cc5ee7a6abc40fd364e5d34157a432c2cbeaa0dcc682d1e01805d27543", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jdk-16-ea.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.17_linux-aarch64_bin.tar.gz", + "checksum": "6da6af87a88f47679b208c556bc65082ad0715bffdcf5d16976110c5953ac930", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-eabeta.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "00e3631fbfab6419c5ade582417d3ba6127d9cb9339b2744d277931f0bf611c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-ea.17_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "af3300a8dae373b8434fb5a8c9a0f043acd2deefc958bc936bd2c1d64672c514", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-ea.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.17_linux-x64_bin.tar.gz", + "checksum": "3d381967ba0df43e60265be3da45e0780839591746d3234ef0364c6161af2bae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-ea.17_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-ea.17_osx-x64_bin.dmg", + "checksum": "570f22631f51028c8865d35fad8d58fc4ef7aee172903b7dcea91663b80bc724" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.17_osx-x64_bin.tar.gz", + "checksum": "5e8d9a55d8ca23f263e533d5b5a94b27fdc487460a6a6a0e0e0dd80f30f4751f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-ea.17_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-ea.17_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.17_windows-x64_bin.zip", + "checksum": "e8fcdb7340d5bcd3eeb45870e7d45ced934e365a90df9498f79be38b37d33fb3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B17/sapmachine-jre-16-ea.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.16_linux-aarch64_bin.tar.gz", + "checksum": "e6f0beae864e518855b5dd47df7f4d79214e84c08bff8c0ab07ca632c0dec7f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-eabeta.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "9f479f038d22ae5c2edf470b0d790c643956c11978a018e84a10fe60fd7b1bd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-ea.16_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "18d03fb3e20c0b83d68655d13ffd604cdc821a7199d0d3cc989e94be3a56d49b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.16_linux-x64_bin.tar.gz", + "checksum": "6f03643afa13308fd2fcaf8190c570406fb2056ebf9412c3613eb558d9a12b58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-ea.16_osx-x64_bin.dmg", + "checksum": "c500cd4b45e1e03dcc824672d9ad53b717e0d5bf83945d3abc4d40200fd9ff04" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.16_osx-x64_bin.tar.gz", + "checksum": "069eb0af20c8d2f70e8d43b691dc22161ebbc1247b65a038e260291146fb32f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-ea.16_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.16_windows-x64_bin.zip", + "checksum": "9ddfe9c66b41754ace0061a87bc1a4249862bf53d75ad417f74e3922649436f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jdk-16-ea.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.16_linux-aarch64_bin.tar.gz", + "checksum": "8b71e601fecd2e72453f9887d8cb3e287fb9e6eb3ac9ee42e2f17e7fb4aaf52f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-eabeta.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "b040888fe3f2290ea106ba35ea9cce065ffe1c81a0f992cde7748632e943ef5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-ea.16_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "6c665ba962dd4dc0420af3ae96a23de9e3e818f5f075a35e69f364534364938d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-ea.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.16_linux-x64_bin.tar.gz", + "checksum": "bd67cf1f099c6397504d7001f557859c198acc30a09dc3ccaccee0ea2cd79bb2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-ea.16_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-ea.16_osx-x64_bin.dmg", + "checksum": "6db65a74e8ea3c5ad30920750d9e3a835279a766e2219f5a3261aa0e0aca8c90" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.16_osx-x64_bin.tar.gz", + "checksum": "1a7a92e7fe1edb5c84af54d6467dcad5009da92d0293949e5c590d584fb4a3f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-ea.16_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-ea.16_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.16_windows-x64_bin.zip", + "checksum": "7ee83eb3730f48d8150fa3023cbe1870fb0318c00ec791d5bd71449e3a90a86d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B16/sapmachine-jre-16-ea.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "5ae8381c98fb82f72af4962d001e0c0e7ffdd24e496d0b6e1a0d0769f91531b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "c1ec4669cccc32d843e36464cde44842e17e4daf0ae789abb6d35607265d5ab3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-ea.15_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "ccdf0b304253ba24a6b2c9fc86b541ff698a1ae9e7ec7646539270e717d556de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.15_linux-x64_bin.tar.gz", + "checksum": "65280587414ee3c1b77c4230128398e7c9359d28d4a8fe84e5b9f8a7937f128c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-ea.15_osx-x64_bin.dmg", + "checksum": "fba7859df00533ef06c97d73af2612f01ea7acc8bfc681e89fd6b9dfd1220ede" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.15_osx-x64_bin.tar.gz", + "checksum": "52c9a62a7f2dfb413fb7e68dcca793e4375cc7f91569c269e44cfd80511cddb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-ea.15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.15_windows-x64_bin.zip", + "checksum": "038f519694ecb5d2290d9df88b13abebc04c41b7e2e8160e576e39c5557191fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jdk-16-ea.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.15_linux-aarch64_bin.tar.gz", + "checksum": "931be9c6302e19874a91c2c41e2df0fd88b9f6b366cbe8438b7bcbbc514c5344", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-eabeta.15_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "3e34e283f081f38ef060988b35331c4d7ae8a5435310dc1e9b83f91623c843c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-ea.15_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "e6c34d6947e4b5831fc9268a770614b698d68df78d6c2d28c33b4c143a11719a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-ea.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.15_linux-x64_bin.tar.gz", + "checksum": "cde45f3f83badcb367346e42426a0912189f0e9339a48bd14ee5fba83e35858f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-ea.15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-ea.15_osx-x64_bin.dmg", + "checksum": "fc8abd03be5e0b3375f3a4c06d9154bd76a653530b1ce5318be88acf4d777097" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.15_osx-x64_bin.tar.gz", + "checksum": "8b95b4dcde1fcb9c682d2042b5c1df7e68c86b2ae998c774dbd1be72ef69a8e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-ea.15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-ea.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.15_windows-x64_bin.zip", + "checksum": "3477b41e551cc97fa70855c164fd2a807031b40fb9295b01992d3c8c4665af70", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B15/sapmachine-jre-16-ea.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "c4cc8241d9e8ed0ff5349385b6d5a775332a18a25744fa6eacd333c424670664", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "baffb2b812648d86f8c2e055849791e6e47ba140983fb8c56ddd07db5aa2ced6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-ea.14_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "c7275d2d74611b2c80cc80e3ddcf90cada58c314d2007216579ec2111c4b9343", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.14_linux-x64_bin.tar.gz", + "checksum": "71a7f371fa04b3a1fe025b3377947948d517d7dc5676849f47e62757d119520c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-ea.14_osx-x64_bin.dmg", + "checksum": "76f7038494545d92a393396a80455c8b21f4896cc8a3d03b74a43986d5e75020" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.14_osx-x64_bin.tar.gz", + "checksum": "610762e505f9ad6295e08c6c50e7c9277f4ee697fb1e54e65977542c39b14540", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-ea.14_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.14_windows-x64_bin.zip", + "checksum": "aa4db8d9f6e251aff09f341d4bee59724b88c15b35aa796084dd36c1f59542e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jdk-16-ea.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.14_linux-aarch64_bin.tar.gz", + "checksum": "f5d9e4113d1da0b94cef6a11e1a1b9ab70936317a747ec43a9456a8303a92c7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-eabeta.14_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "55c27b361550613d70033729d16323308ce75e2b7d87394dbd86310289802ad7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-ea.14_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "40872b35faf82c2f449b61bf32d817c634546175ee75f55944a05452c607017c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-ea.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.14_linux-x64_bin.tar.gz", + "checksum": "967e5416588eabea9da075dd8c7ec14cd72342ba921badb515a7c19f4b3baa32", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-ea.14_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-ea.14_osx-x64_bin.dmg", + "checksum": "bed3a021ee2f764d791822e4b89380f7d5cf06eff4a1132df50bdf5479c2adfd" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.14_osx-x64_bin.tar.gz", + "checksum": "c2020d4c00a42274f98156796525de4e25a1248639f469eb28313488e23082ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-ea.14_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-ea.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.14_windows-x64_bin.zip", + "checksum": "538b431123ee3fa1f7b314fc595beb56436a1aafaf81e7d57588a589bf54fcb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B14/sapmachine-jre-16-ea.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "54bcac8f9540e835d60a54bd74536b3a518c15c3c73a8a412946eda42d9c53ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jdk-16-ea.13_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "af6d10f65fc5870935ee801b6691e2394c21c29a4e8d281f1023dfe33035053a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jdk-16-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.13_linux-x64_bin.tar.gz", + "checksum": "513615f7229f2d0a04c3aace2544042c0f8af062b871bed484a696761ef6a3e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jdk-16-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jdk-16-ea.13_osx-x64_bin.dmg", + "checksum": "a0f787076ae0bc409d818651d0fd88e1bd174156d87ca3a0dbacde0c8d5a9760" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.13_osx-x64_bin.tar.gz", + "checksum": "86fbb2f67c328e384780a3c2b028d82b24d14606f1ed79f0843ea8897c83cd5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jdk-16-ea.13_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jdk-16-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.13_windows-x64_bin.zip", + "checksum": "86182ff2f6f9c62c98d2c49d56d9494140214a987ea61d29161ef56cb2207fc3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jdk-16-ea.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "bc75392322b80edab2fa9a39203ab6be74574e8100fbaef1335a86b2e06f088e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jre-16-ea.13_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "0feb09e80fc4b3903d15e2d0438b1a6729ee0c7a3eaa91477dd03dff0ec790ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jre-16-ea.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.13_linux-x64_bin.tar.gz", + "checksum": "3745abcefbccaf6e7ee4c04a3ae2d72667d3c12809c6e04542937764e3832c39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jre-16-ea.13_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jre-16-ea.13_osx-x64_bin.dmg", + "checksum": "b47260c1ea15fddc6cfdc358a6d1455080a319320d26613f9d9fefb379150f27" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.13_osx-x64_bin.tar.gz", + "checksum": "cd8968908262b2471ddf0bccce5bbb6a867244ce990f8ffb318939372b4cc8de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jre-16-ea.13_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jre-16-ea.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.13_windows-x64_bin.zip", + "checksum": "5698e2243a6205cc6466af41290db8a3ff6326dd54c7627bc779511662b4fb77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B13/sapmachine-jre-16-ea.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-16-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "7ffaf902d6cb973bae1020bc0567d84f5a225e12d248078c1390ba0f12a1a84f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "1fda17ca0c351bdcd7e1808e6f46a1db28d5939c6cdb7801f331f4d991b72df3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "b6f20f6a772c753f9012261c7ff5864a97f6e9c459657942c73b0913ae1552f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.12_linux-x64_bin.tar.gz", + "checksum": "8213a1211d1da04ff5c3eb2eb78d968a0c41ca659fdef31042ba13c68f0688dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-ea.12_osx-x64_bin.dmg", + "checksum": "f29e2f158264b4250a9cffcfa2598645bc631520e94dfafdd8b0518c46a2de29" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.12_osx-x64_bin.tar.gz", + "checksum": "feaf98a0ea659d93713977a69550a036c41582ed6d5bbdb69705a0fa7b659dfc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-ea.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.12_windows-x64_bin.zip", + "checksum": "1de704f4d94e0189948230f26538bf65e88901f5d860c522d1897d70308870a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jdk-16-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-16-eabeta.12_linux-aarch64_bin.tar.gz", + "checksum": "03f1c126713894c3f851f98e0a98d8d95029b8f08c669bbaf986d14448389422", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-eabeta.12_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "f8655bd0b9f6a4c8370727404e6f7c32f7ceec4e0f49834c352d35710011f80e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "045c0e2ed7830a6ee0022b74082ca01ac2ecac05a828a5431945f7eb4b621984", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.12_linux-x64_bin.tar.gz", + "checksum": "7138f19285c4aa99832c690b301937222631b8418251fb3172eb01bce511c74b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-ea.12_osx-x64_bin.dmg", + "checksum": "1bca77a4a1840a605f1f697227214ba534ce490980740f9e518afd05e27ccac3" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.12_osx-x64_bin.tar.gz", + "checksum": "6551d0347ecacf74f86b365b6022e31722d61964132ca1931a4cc777d1fcbbd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-ea.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.12_windows-x64_bin.zip", + "checksum": "54d50c97c065db02fefd88e6faf668ad7cd5fdd5c71c69d1c52e1fec7542ad79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B12/sapmachine-jre-16-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "f654e21c815c9d467253e039ef0c50a657c33745c471f530455bd6b24f58b752", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jdk-16-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "3c0d996055e9086de9edc54bdf317625c7222aef3784657adfc39cd377bda1f9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jdk-16-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.11_linux-x64_bin.tar.gz", + "checksum": "4335c2c6e3c590753be1612b4e40956a584d254eca4f77e708163da80dce8ca3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jdk-16-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jdk-16-ea.11_osx-x64_bin.dmg", + "checksum": "3affd6cfc150cb292a0b81729d03fb72e0d6366df9a5af8d185054e3b198cbaa" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.11_osx-x64_bin.tar.gz", + "checksum": "05e5ddec04ef76b45f735a7e19d38d39cd5371ecf2faac13b7b180d7a4475572", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jdk-16-ea.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jdk-16-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.11_windows-x64_bin.zip", + "checksum": "1294781900900aa8cff1fdad20f26bec4d892bd9c5c4809a0bdbf8362355710c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jdk-16-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "859a0145e1f5b4e87547da9ef032e73063f582e14151c3af77372ed961f7b2f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jre-16-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "23fa074a0149a9d94aab750d11943c9c281f3c4179f417fbddf2bbc45c62a5eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jre-16-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.11_linux-x64_bin.tar.gz", + "checksum": "1ad1e538f8ee149f5fbb172dc8c13a173ed776a1ad0a5cd71e09a4c01ad1a005", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jre-16-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jre-16-ea.11_osx-x64_bin.dmg", + "checksum": "171fbabdd35371feb1b189d42ccc5807aeb5e52c3e1ff2434e7ea3d6aea4449d" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.11_osx-x64_bin.tar.gz", + "checksum": "b40f632c17f6461ce267905ca143aa1b76363a1ad761df4795ab8ed4f419087c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jre-16-ea.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jre-16-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.11_windows-x64_bin.zip", + "checksum": "b68cba141c9d8fe1481ba2e24d9736966f83bbc6f729c41db727820d5176cb4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B11/sapmachine-jre-16-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "d2658d87c670f58a33882b321bc21ce077cedd51065b6b7c36b3aa049376b2e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jdk-16-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "fc1916b3216b30fef3ffc80c17bf73b1c774ba023e41fa1554c914aed0e3d333", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jdk-16-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.10_linux-x64_bin.tar.gz", + "checksum": "76985ff8ac19fdf35a869c74e3a24fc191401f6418bdef82dfea20cb24876343", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jdk-16-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jdk-16-ea.10_osx-x64_bin.dmg", + "checksum": "1337782b65e61e541f10515bfc23927571e967238ff6cf84b7a269e600490ee9" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.10_osx-x64_bin.tar.gz", + "checksum": "ebb98b9611c972b5c7eb623e423e462e6dcd2405c723b0fc9010495a5cb13f3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jdk-16-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jdk-16-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.10_windows-x64_bin.zip", + "checksum": "84012c6e624400796330455c62932601809dfe790f97f5d656da5ce9b385a535", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jdk-16-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "916212d0179f3209a45e83b2a2474b0b89715576c32b46356e76a1ae36fc4b07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jre-16-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "fbbfab9bf0be814d07f6437c8b0dbfb64dc3882945a9315b85c2a7cedbc193a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jre-16-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.10_linux-x64_bin.tar.gz", + "checksum": "800d8a3c94bf33763503f81b799dfe2c569542b8e88f531a6219ebb83191a90f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jre-16-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jre-16-ea.10_osx-x64_bin.dmg", + "checksum": "d777ecdeeea0b73a7f7b0d08a0fb670c5e90c84f83db4f864caf10147230e1ae" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.10_osx-x64_bin.tar.gz", + "checksum": "a03dbcc9b29ffaac972837e648d648dd43ae65d06976c896bcd8e53af303a550", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jre-16-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jre-16-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.10_windows-x64_bin.zip", + "checksum": "f7cef75201c551f6c114d09b8095d791de5a85fa4768f796bc2759b29e1f8bc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B10/sapmachine-jre-16-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "1ee98efa3598521c202b567e14f000964ad2ff2eeec9f6f549a22de362200f09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jdk-16-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "1d2ba9cee96e19a58e0607bea66e9664b48e9120661884ab6725a650a25deb83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jdk-16-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.9_linux-x64_bin.tar.gz", + "checksum": "236bd2b2e0f8ad5cc8331ebfd2161d9135c86b5978ea4e6327cf99b5979b69c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jdk-16-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jdk-16-ea.9_osx-x64_bin.dmg", + "checksum": "7facec4a4a71934b655654a9f041831436d40c368f767fcaa93f8c3b4ce460cb" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.9_osx-x64_bin.tar.gz", + "checksum": "561206c8bf8237c0d130c73c5128c65c2bfde49de5efc07d957812d7f96e6654", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jdk-16-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jdk-16-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.9_windows-x64_bin.zip", + "checksum": "54cd16d09dda1354ba6579804fad9dcbdec360f1330131eff6f8baca43020f6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jdk-16-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "94beb889cb3bf0090186d043f0b89f15fa06d08ed6e30360b886d206214c3927", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jre-16-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "fd48c756312a63dcc7ac4bbf85879213bcee88fb76d7216e9cf86f919b956330", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jre-16-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.9_linux-x64_bin.tar.gz", + "checksum": "c79cec97377dc12ee2193bdec4749e514f8646efe0cfbde4eaeadfb87acb06c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jre-16-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jre-16-ea.9_osx-x64_bin.dmg", + "checksum": "9a027cf2bc8c938c075a39b4df7ec336220d651b96ee2c0c48ca20afff6c5fc3" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.9_osx-x64_bin.tar.gz", + "checksum": "b46e825eed7e2838c8885a12f8cd954d21b3ca955b7e36fa72e3eb43fc9d24eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jre-16-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jre-16-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.9_windows-x64_bin.zip", + "checksum": "ff04f9cc97a1bbed8c4f37858c2aef4ee652f4077d1cb84f07cbddd56f00f9f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B9/sapmachine-jre-16-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "764a1796c8611de00bbb23ac5b4b38358c2d172bf4a97abe72c384d69a13d99c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jdk-16-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "31ec96238741127d95f2d0c92546a26636dcef59b7bc30d1fc8dee17a28c0e40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jdk-16-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.8_linux-x64_bin.tar.gz", + "checksum": "46f3d03d44b7f28de982f9cb91812d52d811721ddeb993829066d1a78f7d47c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jdk-16-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jdk-16-ea.8_osx-x64_bin.dmg", + "checksum": "51a630210a7322f6f6b76408857887f83af532099d842e7d9923708f47068bc2" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.8_osx-x64_bin.tar.gz", + "checksum": "19b015f430348968fd47860c8a19676406fc86dfdc91d80dcc162bb32aa3e4fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jdk-16-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jdk-16-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.8_windows-x64_bin.zip", + "checksum": "da8d0106101001f92e722584831f3b4718daedc9ea968d81ec4d8a7f42105708", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jdk-16-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "bc12cab3b271fbdebc93442cd56c2e36f12292fec8f4b4650efb54727c01e36c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jre-16-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "faa7410aec5867e3197cfaf992288c071b00a660c40e463f86075bfc58ae7e18", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jre-16-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.8_linux-x64_bin.tar.gz", + "checksum": "9191a4c093993d2b2ca20d5af583aa590f191837024fd9a47d4d0255963d5b2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jre-16-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jre-16-ea.8_osx-x64_bin.dmg", + "checksum": "486a66d94acb2ea5c048e3ab81629b7ab7630451afabd5b9ca3fd57676320932" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.8_osx-x64_bin.tar.gz", + "checksum": "3ca205336a676bfc30bf95fcee2212535440fceda0bf0f4646e40333c202ebd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jre-16-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jre-16-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.8_windows-x64_bin.zip", + "checksum": "8084a7a532dc2fd60370fd47da407e7ee72bbb1b347410e8b7d5a8e2bbde59db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B8/sapmachine-jre-16-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "f9db6bbe60a87c38f9a3e64a437362b30eee8f695c38eae560a14b6fdc5a2539", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jdk-16-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "5997a4cf206d4ca743fca48eb3ce20be67d93490bc312e1c4bc81cc557f270b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jdk-16-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.7_linux-x64_bin.tar.gz", + "checksum": "4e08dd46e4d1780ee9dcbc0773e7f3415343313221f14ce0fcc75867a0abdc4a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jdk-16-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jdk-16-ea.7_osx-x64_bin.dmg", + "checksum": "d9b0040477150687269c2cfa7e8ec1f05dec87d4e8c09220456361a0bdcb3c2b" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.7_osx-x64_bin.tar.gz", + "checksum": "bcc74b38944a2badea3bcab861aa4f5994fda48a11c2ed100db7e3cf5b006de5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jdk-16-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jdk-16-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.7_windows-x64_bin.zip", + "checksum": "a3a4106c4f7776a4b8f85aabdbeb8c929affd2f0ef2a00cfc20218f7319450ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jdk-16-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "27dc44f8e85e723a9cc5dc89d85d2cebda505436c137f1d2aad020098dbdbd6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jre-16-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "02e9da6eff9b5d78628498c5cd322ff6cf4877d3e21e3fef759074c9ff658047", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jre-16-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.7_linux-x64_bin.tar.gz", + "checksum": "504abc78371ed1098cb5874fe578ac1c9cae6a7f51917fddd104efc20ef236fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jre-16-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jre-16-ea.7_osx-x64_bin.dmg", + "checksum": "4e2c7347d4d35d04d81e2b69c84fe9e0f7ed2484d6629dc2979197a8b2d0295e" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.7_osx-x64_bin.tar.gz", + "checksum": "ba03fb4e86610a326f4ef6f792a575ddff7bd00b4ad1a2c3d15402a45868a68c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jre-16-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jre-16-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.7_windows-x64_bin.zip", + "checksum": "c47ad26b72535b9b66d782a3780e6fb1d673ca557418555ab01dab1af4a01ad2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B7/sapmachine-jre-16-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "634b186445118ec19ae98e47730b596be2bc1d448a738bccd953ca70ea6bc974", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jdk-16-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "a474aa10fcf13ac507f51172aeb43d6ff6e268701ff89ca9450c69c8562deaf7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jdk-16-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.6_linux-x64_bin.tar.gz", + "checksum": "13e256d12206b64f8835bf15e867479bd0c1939e5bd0331f383b1d9488a2d195", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jdk-16-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jdk-16-ea.6_osx-x64_bin.dmg", + "checksum": "1fd8cb969ea347ae9f30c8ef2f94a5d0a43f487b8086b9ed68127b9c50af5d8c" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.6_osx-x64_bin.tar.gz", + "checksum": "8f50aaa03b45dd76f2594ba113b9b36a59ca80694b73880cdb75981eca53fd2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jdk-16-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jdk-16-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.6_windows-x64_bin.zip", + "checksum": "424d84dc219f0c07542f1c5373a4ef6fa9a80c2eef8fbbb1f52e6411d0028539", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jdk-16-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "1b67ba59804d465bb87a83c4407a78c910375ff56346ca7ca6a63b3a6011c0dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jre-16-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "6809c1ba61da02bbd41392ef211fca4c9c051a1705263633b92653536fe68146", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jre-16-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.6_linux-x64_bin.tar.gz", + "checksum": "275f903642e3d0835a5a403e829b5174bdaedddedabe41e499278042163046db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jre-16-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jre-16-ea.6_osx-x64_bin.dmg", + "checksum": "c01bdf27a31061bfe31541c0d165a832412387d569bed3805cd875b7c87ae740" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.6_osx-x64_bin.tar.gz", + "checksum": "673ccbe13ef629f518d02fb2c3e2b4321a20aa1b6cb0ad5e48abf2936f778d76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jre-16-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jre-16-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.6_windows-x64_bin.zip", + "checksum": "03cac0f701f7a4eeea15ff48534b08750106572cc709d8ff6496a5f394ddb306", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B6/sapmachine-jre-16-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "15b57e83831c40c4cdd8d5709e41846f44916bd6b3552e266b4fc8808aba6f26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jdk-16-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "ae56e4a0d5d6b909a751f5c00e00350d87d128a1c54b5ffa8fc7c9e054d228e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jdk-16-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.5_linux-x64_bin.tar.gz", + "checksum": "8750152c009bb5b4976c625ab38c25be9cbd4125c5c9d0fd825db5c936d428f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jdk-16-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-16-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jdk-16-ea.5_osx-x64_bin.dmg", + "checksum": "13dbd9deebacb4f66c407b65beeb1d341d2670cef03b5df735b8521faa3a1bac" + }, + "tar.gz": { + "name": "sapmachine-jdk-16-ea.5_osx-x64_bin.tar.gz", + "checksum": "e66e2533acd195aed9656920d5b28a4105f72b9b9e0c4934ce27b4fcd454b485", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jdk-16-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-16-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jdk-16-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-16-ea.5_windows-x64_bin.zip", + "checksum": "26e948a55df328a1ecec78ee4412f601aee975f326aff3c8b7e06b89f0cf1c9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jdk-16-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "31a4383f4d3ddf127807154860682e686033a736b1e290daba578934fad1ae42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jre-16-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "e82ad0f409acab9440f7b569c4c2827cbc970c4190b61fb6807fd8ba71151b90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jre-16-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.5_linux-x64_bin.tar.gz", + "checksum": "9bf8b27e002c3068a1279fa89b262eeb993e0becc04a4b6f47a613c2059608d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jre-16-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-16-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jre-16-ea.5_osx-x64_bin.dmg", + "checksum": "a7a3a688103ec7a1dbdfbca8af2a52019e8d60e756be7ac888eec645da1c5fe7" + }, + "tar.gz": { + "name": "sapmachine-jre-16-ea.5_osx-x64_bin.tar.gz", + "checksum": "1ded169b7d8fbf8efa3f24f14407ee96769ba4c416ed67a7ed5c6801211c1522", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jre-16-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-16-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jre-16-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-16-ea.5_windows-x64_bin.zip", + "checksum": "8b4a1ca4f516c8e5e438dbc3a3790f8832622da4f82cfe8fc10a876360c2a573", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B5/sapmachine-jre-16-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-16+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jdk-16-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "bafda08cb9770efc81366e54194fa532dcc17e7110791d8f1b67b184f2098ca1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jdk-16-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "3b531fb52c2176a6c02a97c70a34022e16873696f714e7f8aecc8dd0938fb2b3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jdk-16-ea.4_linux-x64_bin.tar.gz", + "checksum": "fb0be3ebae5659436cb843a75fe18895d52ad51250045e32b32276b82f83e424" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jdk-16-ea.4_osx-x64_bin.tar.gz", + "checksum": "df0967f4f3424b267a6e8cd7f792d4a6a99b67e418bd11ead4fec571c4277d41" + }, + "dmg": { + "name": "sapmachine-jdk-16-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jdk-16-ea.4_osx-x64_bin.dmg", + "checksum": "2a60e96f0b8ccceafddf99225ef7b4cf2b9dfdbe7fc75954ab01568b19f7be76" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-16-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jdk-16-ea.4_windows-x64_bin.zip", + "checksum": "b0f8717ad02327f7370c1bde0104b5075277fae4dbf34c54bb7f26e25fc6c745" + }, + "msi": { + "name": "sapmachine-jdk-16-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jdk-16-ea.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jre-16-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "1552adcaa5d62c2c292f807086a789f4c5715736b2bd669f23d7c29386d9ace0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jre-16-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "190ca641a284963c3f4cd4e333ea5f7334d0cd2f7686a100ba948b8216987b75" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jre-16-ea.4_linux-x64_bin.tar.gz", + "checksum": "72e69e9e092044f3e984dd18df8872c458a02872a2daf305c68affbdf9b02c73" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jre-16-ea.4_osx-x64_bin.tar.gz", + "checksum": "aa698019e163e8e7b53312536ab9bc766d2b1d73526ca67f009a9c04b1c07ce5" + }, + "dmg": { + "name": "sapmachine-jre-16-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jre-16-ea.4_osx-x64_bin.dmg", + "checksum": "7bd49ee1a51008807e08813ad245de8509a9d39ac03aae2484dfc0a79bc21eca" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-16-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jre-16-ea.4_windows-x64_bin.zip", + "checksum": "f956693fc2905726b3787a390c6093a69eeb74a582b13925f96649cde4e6b1a3" + }, + "msi": { + "name": "sapmachine-jre-16-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B4/sapmachine-jre-16-ea.4_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-16+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jdk-16-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "040bbc2528eec0efda621d7ecd6a77fa05d309f14919ce71bac9250d965edf7d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jdk-16-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "0e18f86b6717cd2b4eea5ff3d983a1a31359403db4da4ebcb521b28597166d6c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jdk-16-ea.3_linux-x64_bin.tar.gz", + "checksum": "16eccead68e3899a62ccfe592e5b483b36eb143953644a4d0646e0246d585bae" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jdk-16-ea.3_osx-x64_bin.tar.gz", + "checksum": "eabb0270a213aff085f43d8af85955d9aac789ff551f0fae936d497419c22525" + }, + "dmg": { + "name": "sapmachine-jdk-16-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jdk-16-ea.3_osx-x64_bin.dmg", + "checksum": "c2a2ce299f90a2d9309879be78300a21384819068a19dd70f90ea9857ded89b8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-16-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jdk-16-ea.3_windows-x64_bin.zip", + "checksum": "fec8edfa02e36e9e9d48e021b8eaaf1f2be68724bdd35f322ee053100e2d5167" + }, + "msi": { + "name": "sapmachine-jdk-16-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jdk-16-ea.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jre-16-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "3a9bba8c57a5ada189dcfc082a3659170909d3f61ecd2642ee8106fa106c1fd9" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jre-16-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "dd2cf9a13fc9bb27541dc37c59159d120fe854010a340206d55dbc8f50ddf6b2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jre-16-ea.3_linux-x64_bin.tar.gz", + "checksum": "ed766f2d3896b2b8d6089c809dac7a8c49f12bc21b1484f3b9e55929bb64e3db" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jre-16-ea.3_osx-x64_bin.tar.gz", + "checksum": "6fc510143e2daa3dd178b50ae4b49d7e5c19fd68cb8af4bb347eb1a11f4a7e32" + }, + "dmg": { + "name": "sapmachine-jre-16-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jre-16-ea.3_osx-x64_bin.dmg", + "checksum": "63ec23f68013db945e41eb72029e9cb6fc7bb81f00ce1dff6848f1274025f791" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-16-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jre-16-ea.3_windows-x64_bin.zip", + "checksum": "e6f5b9c5fd6ea3f111a1362845d77a66a0d1ed98e7284ab337fc6387a36bc4d3" + }, + "msi": { + "name": "sapmachine-jre-16-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B3/sapmachine-jre-16-ea.3_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-16+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jdk-16-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "2c7639128be01aaf548178de9c1ce6ca4d97661209787eaf179b7129533e15d5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jdk-16-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "e9417b38d5e85e0067404f43813251049b3e0187b02b485e51ab30c0dbbe7e38" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jdk-16-ea.2_linux-x64_bin.tar.gz", + "checksum": "47589dca9dd9835def9604ba89e1ee855bf3b2f4a884ebe3fe8bca8749ac564e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jdk-16-ea.2_osx-x64_bin.tar.gz", + "checksum": "4dbbf2691ff66e0fc1797dd6fe79ac6286510151fff965964432a834117ab8c3" + }, + "dmg": { + "name": "sapmachine-jdk-16-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jdk-16-ea.2_osx-x64_bin.dmg", + "checksum": "93f92b75b3a3b4963ec74306696a569b260453fe9b817ee81a4e9b3e32c563fd" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-16-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jdk-16-ea.2_windows-x64_bin.zip", + "checksum": "3b3c6afd2c2aeb48f924ba111a19696e0b662dfb70fa626140a4d1f311bb3c31" + }, + "msi": { + "name": "sapmachine-jdk-16-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jdk-16-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jre-16-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "2fde01033782291057f1ea2da450220f2c95ac8fcc1625c6209e784d9ca9e26c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jre-16-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "d3a4be586cf1b63437bd83ed27129968463146f91b65e970a8e4f38cba34a489" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jre-16-ea.2_linux-x64_bin.tar.gz", + "checksum": "8ba4081da24f6715f33384796964b77b00e652344fb7eb0dad4f56a4ca2d7877" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jre-16-ea.2_osx-x64_bin.tar.gz", + "checksum": "e1ea8f400ddbc67f4c7f9cf9a6a3a91938fe4e892addff351977ffcd46806ff3" + }, + "dmg": { + "name": "sapmachine-jre-16-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jre-16-ea.2_osx-x64_bin.dmg", + "checksum": "3e474cee40b635420c478d96dd448debb66d7e4ed8c6f78185bda9dfe2261250" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-16-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jre-16-ea.2_windows-x64_bin.zip", + "checksum": "d098c410ac9a89493de799064aefb92e27ac31a85acea1f50ac6c716de219d2d" + }, + "msi": { + "name": "sapmachine-jre-16-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B2/sapmachine-jre-16-ea.2_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-16+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-16%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jdk-16-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "e20947abae5fcb2dc5cd0755b4861afe390f81fbec794ea84f29bf20c60f8ffb" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jdk-16-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "1c0ab4b586eca911d6254bffa869f7a02b8d9739015e6d572e0f10e58a95c790" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jdk-16-ea.1_linux-x64_bin.tar.gz", + "checksum": "c576a0ba3b6a82ba5aee9b48dfdd6ab359924ed4a237f845d4db8ecb5543434c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-16-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jdk-16-ea.1_osx-x64_bin.tar.gz", + "checksum": "64c303acc8cc3b340fc5ca07bd11f7f07776af1a197a9d5423de9e5b3c4a420d" + }, + "dmg": { + "name": "sapmachine-jdk-16-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jdk-16-ea.1_osx-x64_bin.dmg", + "checksum": "db730f1d65b7877cc0fbb0fb663257163862f80f0dc4bbb5a71005e66ff600c8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-16-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jdk-16-ea.1_windows-x64_bin.zip", + "checksum": "042c1c1c7165982912c8d507253cb43e3b256f9eaac2955b98447255d4d677de" + }, + "msi": { + "name": "sapmachine-jdk-16-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jdk-16-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jre-16-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "5bd4f84be4449441f1fcf9fabaa2743f62cc2aab77031c1c6915675426373318" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jre-16-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "f5ba97564e6eda22366181cd4d37c3deae8e8cd17eb0fa7f94165af3815e3124" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jre-16-ea.1_linux-x64_bin.tar.gz", + "checksum": "520e6a3278efcc2955474f1e504521baa8f959a2e9445070b4b74cf6c39fb0a9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-16-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jre-16-ea.1_osx-x64_bin.tar.gz", + "checksum": "5b854ecee31f74fbb65090afeac7a13adde1eab73c8a4dce1047c38f95b20db5" + }, + "dmg": { + "name": "sapmachine-jre-16-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jre-16-ea.1_osx-x64_bin.dmg", + "checksum": "6ff4d3e775346da65d43109c7eb4e6f9e6f1241c9f80e0a119cac72382ce13d3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-16-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jre-16-ea.1_windows-x64_bin.zip", + "checksum": "708e2acd69e85f1f8375fd530dd0bf592979cff738cd4fd2d8db379ce92ad576" + }, + "msi": { + "name": "sapmachine-jre-16-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-16%2B1/sapmachine-jre-16-ea.1_windows-x64_bin.msi" + } + } + } + } + } + } + }, + "lts": "false" + }, + "15": { + "updates": { + "15.0.2": { + "sapmachine-15.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2-beta_linux-aarch64_bin.tar.gz", + "checksum": "56e8fcb46ddccf9becd3e935ccb1a1f7cb23b537c836285600813649d895de71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2_linux-ppc64_bin.tar.gz", + "checksum": "93d98ebba57ad5b7fe383d1b5075133e009a81736d1d60ed5a7c65f4ce19461d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "0ebb781176c647aa610f95aeb0f5be3ccc654b59b4a4f7868540be8d52b070cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2_linux-x64_bin.tar.gz", + "checksum": "8b548fdaa37c4ab15cb91ca8078424f920d117076ff3f5734db3dd0bd74abb65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2_osx-x64_bin.dmg", + "checksum": "35fd651595cac2588de08a943e8bb61ee2dd10146f4b459511ae577e9c3fa42c" + }, + "tar.gz": { + "name": "sapmachine-jdk-15.0.2_osx-x64_bin.tar.gz", + "checksum": "76c3060e4a976f90987b5bf7f752e1d886de5bcecd2ec35dfa0b1c139ebead4e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15.0.2_windows-x64_bin.zip", + "checksum": "9746e01bdd26d28480af21ddc0a571d64396fe0925b53c7f0e1c34830ac8b3ca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jdk-15.0.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2-beta_linux-aarch64_bin.tar.gz", + "checksum": "2ef13f3a7283e0f5971caafc2d4ead2557795bf817773fa17ab375d23ee51804", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2_linux-ppc64_bin.tar.gz", + "checksum": "b8004adc53f9edad992abaaf9eea630863bbf15b8d2c80ac7bb4a631a1ec11f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "ac5cc601ae555f5d5f8dd0b774312a0b9e63bccb10a9275e832715022c87542e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2_linux-x64_bin.tar.gz", + "checksum": "aff5cc06743f61579de2e87d2b3978e89ebf7a5b068d799287a448d4eca0e97e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2_osx-x64_bin.dmg", + "checksum": "61be4d4d557384d4b7221861c920e1b120df830a23c221bf7d1c311d4c9ba438" + }, + "tar.gz": { + "name": "sapmachine-jre-15.0.2_osx-x64_bin.tar.gz", + "checksum": "6c8feb2933b01b805a84779de2987765671f9c064ee52f7857a7c488b5ded52d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15.0.2_windows-x64_bin.zip", + "checksum": "7bd44564ac04d300c5389b2c8ec3bf8131dc61ccb08c3022a476e359e2dd16c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2/sapmachine-jre-15.0.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15.0.2+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15.0.2%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "ce7abf280fd793d1870e806375b137afaaaa6d9802070b9fcc380df13e5e5bf1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "428e74e832d9c12186f1b9f3d74ca89bfbcce0d43272106b76caee52d6f926d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "73db4c48f0f02570796f0903f764a192639d2fc7441607deb48148f381c96d41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.2-ea.7_linux-x64_bin.tar.gz", + "checksum": "cf69e11f9fc0015fa8db9063f2536ab1900888808ece652b4602af016c3c55ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15.0.2-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-ea.7_osx-x64_bin.dmg", + "checksum": "8e07ded382a0d0a6e36b96ca339b9d1c34442b19605b6998c3604c429c1f5635" + }, + "tar.gz": { + "name": "sapmachine-jdk-15.0.2-ea.7_osx-x64_bin.tar.gz", + "checksum": "b0fd8a6cd56e0ab5fa1d586a4a24cfec2e7784ba0ad55da7c263d2a5ec7f3044", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15.0.2-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15.0.2-ea.7_windows-x64_bin.zip", + "checksum": "0edbcfe2f1dfb1a2a69c5d3604145de4b302a3ae072193c4113268b710cb7561", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jdk-15.0.2-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "cfa6e2da91404d9a33768a959f72d60c68c607fc52b634f9ef4f69e122d901ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "5685d1df73797cdd97615a57abd3b06b8ff9086ec4279f1624016bdef781565f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "10ae7c38497764934680225cdfca6d3dfbbed68e56b4cd0bedb558d37c970f73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.2-ea.7_linux-x64_bin.tar.gz", + "checksum": "c13d6c247ed48c96367a9e09af6515b71768804bb92614315b7814d894dcc34a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15.0.2-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-ea.7_osx-x64_bin.dmg", + "checksum": "6d977f4ee83a5b866a78b5d61660476fb4d359132558cf8017bc4da5a21138c3" + }, + "tar.gz": { + "name": "sapmachine-jre-15.0.2-ea.7_osx-x64_bin.tar.gz", + "checksum": "c0ceb722cd2457db43b3b0d110703536cd0f3c68e4836f28ab9e54415d0f7556", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15.0.2-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15.0.2-ea.7_windows-x64_bin.zip", + "checksum": "8b2fca0bd0fb8cf61cc038c7ff385b9f6e9f720b0497789238ceb305feb23273", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.2%2B7/sapmachine-jre-15.0.2-ea.7_windows-x64_bin.zip" + } + } + } + } + } + }, + "15.0.1": { + "sapmachine-15.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "18d92316c41b75e8157d669ec55b48abd56fe4da53a5d6435fe9d9fd344ca3bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1_linux-ppc64_bin.tar.gz", + "checksum": "ca1f1ccf914412ad1212a0421faebe08cb44978ff15993d363d598f326bc5689", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "8c9117ec06a17aaab389f464749edea88ad077ffae3b0541b2faa33128cfb3ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1_linux-x64_bin.tar.gz", + "checksum": "d871ba2aaf377489668b9e473c381247f48952108598f224fa1484f6f2d9ba99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1_osx-x64_bin.dmg", + "checksum": "dd95938bdf230c052e13819e6ddfd228001abc4fec3afbd82b007b6fe0df7d23" + }, + "tar.gz": { + "name": "sapmachine-jdk-15.0.1_osx-x64_bin.tar.gz", + "checksum": "c3eff22163231077d65b3663f25ed70e295d96f2ffdd456bbbeaec90762afd7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15.0.1_windows-x64_bin.zip", + "checksum": "8cef4a529548dc6457108dc64c894a6e11ae88fc477953ebf5a01adc8ab091fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jdk-15.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "7d237cd184aec6ab1a041587a743afcad9d4286f8db62f53af556f9c50bc1c92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1_linux-ppc64_bin.tar.gz", + "checksum": "628672397a4c125f1180393d3899a96f2848e91d6136fbeb4a294ae9099e96b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "6474c8ec37c571f672a4c674676b21f43e3a81992347f532c2bfc3682d9e2938", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1_linux-x64_bin.tar.gz", + "checksum": "cf9a687c8fb27f7b6c334309ba0f426c0916936fac0c75dc1928f2313396102b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1_osx-x64_bin.dmg", + "checksum": "350d4545c73bb56ab0345ae30a0f9e5fafb8d6828a28cd9a756b6376763f76c3" + }, + "tar.gz": { + "name": "sapmachine-jre-15.0.1_osx-x64_bin.tar.gz", + "checksum": "351dc27d3cb3b8fb6e14ec66c19a1691e6bcde7dd6911859cb89d338ffc0d9f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15.0.1_windows-x64_bin.zip", + "checksum": "f5e12f38345a7e1623f910082ea404923548a9a7af4962c6e451694c17e07848", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1/sapmachine-jre-15.0.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15.0.1+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15.0.1%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "4383ea1a18c72ee14b441239fb7e8a067c908667ba28377cd2be5c083dce9f88", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "4b298e94c34340234289bec5cb6633a5c9561053227f5858f7c9599692aa9dcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "ce55c268606e7885d4bad4e69a26b1b6518c3c010873fd31c8f69aae92ac2cc9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "6a1fcf1e1dc652ac3e779fb6c2966141e01d13e24289eaeade43ce1bf9160b76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15.0.1-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-ea.9_osx-x64_bin.dmg", + "checksum": "3f579cb894dc3ad382c5c474a3ddf4771100c3fb70808e774281280afa3df2c5" + }, + "tar.gz": { + "name": "sapmachine-jdk-15.0.1-ea.9_osx-x64_bin.tar.gz", + "checksum": "4f8167e8b9cf0d718dbd8e4c1692ccd03046b96229b2db0c295854063441ebcd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15.0.1-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15.0.1-ea.9_windows-x64_bin.zip", + "checksum": "e42f74166fb5831d28e26c3f62791676f4332324b92fc31b94dfe17313527535", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jdk-15.0.1-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "92a6734117b39f982f2284bffb98521405e4e9fd07ed1e811b123edd7a86f3ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "f2e4fb51545cfbd9377d44a0dea5a4b099f5d19e8ee83f736802b1489ad26ce1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "66dd0c0512b3e006e1b5a25b2e824a1aa1ef62f21b31c24dda0c05bd5fe6fd20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "99b11c4730dda9b4b4fcc1209d2ae83622362a5ec51197a6c0f512b799803ba5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15.0.1-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-ea.9_osx-x64_bin.dmg", + "checksum": "0ba8a980872499e629ae69ad875da1ec48441f95e99fdf41440a967f06989165" + }, + "tar.gz": { + "name": "sapmachine-jre-15.0.1-ea.9_osx-x64_bin.tar.gz", + "checksum": "5e228910966a425a98511f78d2522303f85becae77ea4364242a7edd9aa2092d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15.0.1-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15.0.1-ea.9_windows-x64_bin.zip", + "checksum": "791dba6e2ab19563387422a6c9b955ea01353df28eeccdb8a99f3b8303dccd8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15.0.1%2B9/sapmachine-jre-15.0.1-ea.9_windows-x64_bin.zip" + } + } + } + } + } + }, + "15": { + "sapmachine-15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-15-beta_linux-aarch64_bin.tar.gz", + "checksum": "337f4c5653fa0ef09c29b2268a5cc0443b5bf73130bc76818fdcc7c15d752dd2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15_linux-ppc64_bin.tar.gz", + "checksum": "9a532d635f136dc22ee844c00f8426feba48881307b28b9efd2f0cd16775902e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15_linux-ppc64le_bin.tar.gz", + "checksum": "72a31b9f340366f14bf1b3e28bd30074d7bc6c88451c2f97017ceae706ef6494", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15_linux-x64_bin.tar.gz", + "checksum": "0f08290a7a1cd39ed03797b2578c79529ca64983f3c48d62f3a4a2c322eb6882", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15_osx-x64_bin.dmg", + "checksum": "9ffd4a9b3d654d4ae4c4ba357cbef85cc97a40c334999c464d2c34cda07a0314" + }, + "tar.gz": { + "name": "sapmachine-jdk-15_osx-x64_bin.tar.gz", + "checksum": "5ddd6ee1af9308857589a1c82023061eccd03f042c4082ee00e3044a4200c233", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15_windows-x64_bin.zip", + "checksum": "eef3ce54df37e89b1cdd78d48c5d426722a7eb252f86ca67808fe4fb9449c2d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jdk-15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-15-beta_linux-aarch64_bin.tar.gz", + "checksum": "23f53c524b4fe7831f92d65adbdd551fcbc588d257872799be0ac5d29321661c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15_linux-ppc64_bin.tar.gz", + "checksum": "dfe7ba2331a892bd0a130ebeb7191166cbb8bcd696009e706ae2289d019f7b9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15_linux-ppc64le_bin.tar.gz", + "checksum": "569403ebebd4f9348c58c1135b03bbc618d8f463799dcd0b75df07983128ac77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15_linux-x64_bin.tar.gz", + "checksum": "211c57914754b7e558cfceb22c6e02bc5121215e59c7aff6f43d5293f3943378", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15_osx-x64_bin.dmg", + "checksum": "d9e840e6fb2f5088a236d66cd4acd1e0ebf37d446dcb371b0ed187d20e5ace59" + }, + "tar.gz": { + "name": "sapmachine-jre-15_osx-x64_bin.tar.gz", + "checksum": "d82a583502b86eab96da02b19d11af18ff51e1abc6f3f8d9e55305e2458e72fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15_windows-x64_bin.zip", + "checksum": "4c2a51805a06c080f00bb70a8849f67a64f0764fbd6b56c77239bddfb87b4144", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15/sapmachine-jre-15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B36", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-15-eabeta.36_linux-aarch64_bin.tar.gz", + "checksum": "f2b05871af49201f80a79617521ac076e1035634e41ca5a6a3b8d12cb41cb1dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-eabeta.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.36_linux-ppc64_bin.tar.gz", + "checksum": "3a66f4010869402f7b41f7f77ef4f376a14f8ab00f7ac30fa30c9e64db8fce45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-ea.36_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "13425a35d8010d57a4e3df19f07bc3912a503186190d04eacad2b73a5db9e41e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.36_linux-x64_bin.tar.gz", + "checksum": "80731a9924cb846e3869ef28390ac11d97aef54a05513960ee46018926524e86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-ea.36_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15-ea.36_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-ea.36_osx-x64_bin.dmg", + "checksum": "6cf14da63c9e08588f31cc5791122db4847aa5b56574dbe13a7b64696528c4f1" + }, + "tar.gz": { + "name": "sapmachine-jdk-15-ea.36_osx-x64_bin.tar.gz", + "checksum": "db1706906e6348d5f9ff6f95d933eac6625dc538e7392e57e8df0a8c3bf856aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-ea.36_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-ea.36_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15-ea.36_windows-x64_bin.zip", + "checksum": "9306afc8660d4fd40cf38cb52a7ba6394df555ffc9564a04a120689efe0f0eb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jdk-15-ea.36_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-15-eabeta.36_linux-aarch64_bin.tar.gz", + "checksum": "38453ab8a6f7a1d45db385290ce419bdf2535801f1d5d759ca12efdfe823ec78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-eabeta.36_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.36_linux-ppc64_bin.tar.gz", + "checksum": "af9fb6c62e2eddb97fe184d6fc795ca939cf3c4fb289849fb8fbe89ab235a482", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-ea.36_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "36eabf4d634847e9d16c14aa9af9e6939ffc413f17bce002344d30b3f7373cbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-ea.36_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.36_linux-x64_bin.tar.gz", + "checksum": "75dd100711d5100366437c953b44f844be3b5a52da24c74015fb21d4ab9b7a1d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-ea.36_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15-ea.36_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-ea.36_osx-x64_bin.dmg", + "checksum": "e9982d777f1e0a033147c0c3bf87054cd301655d1e795dd69cae6ea4a389471a" + }, + "tar.gz": { + "name": "sapmachine-jre-15-ea.36_osx-x64_bin.tar.gz", + "checksum": "000da352a288656f892997e06d134724625bf4dc6ed9534ee6b652476d870814", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-ea.36_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-ea.36_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15-ea.36_windows-x64_bin.zip", + "checksum": "ad842b628a044b719b4821c881acbac84407f5a5ef55192e36675221e00e4398", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B36/sapmachine-jre-15-ea.36_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B35", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.35_linux-ppc64_bin.tar.gz", + "checksum": "335028963223cbe7c396f006d858444439e404af8083d928b1b9456e9b807ac3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jdk-15-ea.35_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "2443df02126905170f8a4410564d3ac8e0d9391ea56a99439c44d1e2e0638033", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jdk-15-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.35_linux-x64_bin.tar.gz", + "checksum": "fa95a74cf6a6172a49ae339690ed54f1732bc9512c1cb4bdf0886549696f7eeb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jdk-15-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15-ea.35_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jdk-15-ea.35_osx-x64_bin.dmg", + "checksum": "5997d768924aac98c59f721d93e36b3bb7f1fc51dfbc12cb5250d431fc2cb3f2" + }, + "tar.gz": { + "name": "sapmachine-jdk-15-ea.35_osx-x64_bin.tar.gz", + "checksum": "6fb74751dc713c8f07de4f0754e4291b69e2ead1044846081451f53034929f76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jdk-15-ea.35_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jdk-15-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15-ea.35_windows-x64_bin.zip", + "checksum": "b292c21b7c36adb1962a37f62271a61cf573946d2c67268aa2f6cf2b0b6b660e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jdk-15-ea.35_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.35_linux-ppc64_bin.tar.gz", + "checksum": "f490cd70223c95e4564ed9bb0db5c72ada18b113bdfb35d69020214a62979072", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jre-15-ea.35_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.35_linux-ppc64le_bin.tar.gz", + "checksum": "a926fd02f7e52aea689e2426dc1b665fb6277ad320afc51ca2aef218a3746f59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jre-15-ea.35_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.35_linux-x64_bin.tar.gz", + "checksum": "31a6a8855091e48b9cbdeeed15183bf3c374094f8dd8b69957cdd14c01e99742", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jre-15-ea.35_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15-ea.35_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jre-15-ea.35_osx-x64_bin.dmg", + "checksum": "cfd8bd45f41b8bba367645a7bd023b7bc3efdb1d16031dcc3d4910ff54a38870" + }, + "tar.gz": { + "name": "sapmachine-jre-15-ea.35_osx-x64_bin.tar.gz", + "checksum": "f617b84eda73026fca8c6984ce940d9db75355a0e920fc3ae54435cb5d91eb7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jre-15-ea.35_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15-ea.35_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jre-15-ea.35_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15-ea.35_windows-x64_bin.zip", + "checksum": "6025fb3cb9a9ba6202aaf6c3ccc0cfcead6b71652b647f2968e08384e47d8c11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B35/sapmachine-jre-15-ea.35_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.34_linux-ppc64_bin.tar.gz", + "checksum": "7b44eb0f203e0e25c9a8f88b1179b2b298a5112415186caa21f009047576b20d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jdk-15-ea.34_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "8ddafcdcefa214f9635e8f5b945efccce13bb0b77903560adb2b94dc6544c629", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jdk-15-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.34_linux-x64_bin.tar.gz", + "checksum": "af1a643a48c452fd312684f68fe939ebd5450abfb837204d8b9ddb0965c87008", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jdk-15-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15-ea.34_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jdk-15-ea.34_osx-x64_bin.dmg", + "checksum": "d609be4915d4718d0d21bff5d65522059d36f7c852ea43a9401084b15ea8d98e" + }, + "tar.gz": { + "name": "sapmachine-jdk-15-ea.34_osx-x64_bin.tar.gz", + "checksum": "025afdc891e390345b49ce02617a0ac2cef2f142204bff59f15a41f012617991", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jdk-15-ea.34_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jdk-15-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15-ea.34_windows-x64_bin.zip", + "checksum": "76eddf5996c8e01da4c316f7223141ee3d5e912cbd370540a59af3d7b99e8e85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jdk-15-ea.34_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.34_linux-ppc64_bin.tar.gz", + "checksum": "5f28b12efde0e7798c84d599c95c3f9d07a507878a9f3c6a3779037401eaede4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jre-15-ea.34_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "ecc23774126dee61d8fa50c3c66ead1058e4548404546f8c9563583dec4ee916", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jre-15-ea.34_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.34_linux-x64_bin.tar.gz", + "checksum": "d18d01f4f7b07a6fea4be5f4c85ac1fa30c435f7068b6380ac2ea5a1fae4e21a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jre-15-ea.34_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15-ea.34_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jre-15-ea.34_osx-x64_bin.dmg", + "checksum": "f9852865d1ef2c64c734ae54de66e23f5dc0214c2b07c1e1f2efbb6108aabfaf" + }, + "tar.gz": { + "name": "sapmachine-jre-15-ea.34_osx-x64_bin.tar.gz", + "checksum": "f4215f546f4ff6d6341116901b2cc344669f0f93603c5744c727841c9f792918", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jre-15-ea.34_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jre-15-ea.34_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15-ea.34_windows-x64_bin.zip", + "checksum": "89bb5621b5fe556ce4b973b8db28ce1847445b1654fb05227c99e48deafee816", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B34/sapmachine-jre-15-ea.34_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "509a408cec1ca9dd5f25427d78207beab4b699167b610285a566cb147901b0b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jdk-15-ea.33_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "b4a8cf26b66aaef4fd89fd52b038b07db953f2a39642220f6a36698615a3017e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jdk-15-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.33_linux-x64_bin.tar.gz", + "checksum": "aaede637e22d98c211fa39b1fbe3475988f6f0d3333795395eb217064d3c4239", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jdk-15-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15-ea.33_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jdk-15-ea.33_osx-x64_bin.dmg", + "checksum": "a253618b44a171a17ae7ff000a5a47a2e3ae8477878d88c286b29dd73f842cde" + }, + "tar.gz": { + "name": "sapmachine-jdk-15-ea.33_osx-x64_bin.tar.gz", + "checksum": "d00e413c9d5f92ba6516e36c1f32565def388dbddf1580a70fcdeef589c1f056", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jdk-15-ea.33_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jdk-15-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15-ea.33_windows-x64_bin.zip", + "checksum": "37bb7dde951b83946956c74d87ba67ee01b8ae4accb8d1dffae2800efd22d7da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jdk-15-ea.33_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "defc064379a3a4c4484fafddf9d8f1c65fd98896ae2d7cc461cf42e2f85cddf0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jre-15-ea.33_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "e6c3461978f878a77001de61cad18a31ef419e65b5954762ccd63a5512b3ff90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jre-15-ea.33_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.33_linux-x64_bin.tar.gz", + "checksum": "f7727b59ca91229a99245fa372e01dfa421cbeab1feeae260ffde2323fa74ecf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jre-15-ea.33_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15-ea.33_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jre-15-ea.33_osx-x64_bin.dmg", + "checksum": "120cdfae34050a882fb0e43e595cc6727739420fd43766be69b271678aac1fd2" + }, + "tar.gz": { + "name": "sapmachine-jre-15-ea.33_osx-x64_bin.tar.gz", + "checksum": "e791c59358d7296e488e5ad280062bcea106f0a49b90a4dd2c2e3607e76468da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jre-15-ea.33_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jre-15-ea.33_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15-ea.33_windows-x64_bin.zip", + "checksum": "118d6a7cf735098ba896292ef2dc1413a144ea1f6cb8cc7c03f6add17ff27c17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B33/sapmachine-jre-15-ea.33_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "a1b006af3a6fe20a15e6382552a3d6f453dd9bc56c64c985eaae06caace46691", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jdk-15-ea.32_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "34e9227d90e98b250fb13532c7764d3bee702a68a056389e1998ce2e15c05e64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jdk-15-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.32_linux-x64_bin.tar.gz", + "checksum": "26b4c0a9f8087bcfa7378a5b4115df112d40bb1cd19d096255b7d6734276bba4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jdk-15-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-15-ea.32_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jdk-15-ea.32_osx-x64_bin.dmg", + "checksum": "8f4dee53e5ac3b776afde2a8cef39fa5aa3fe4244c78538568fb3bd898133bbd" + }, + "tar.gz": { + "name": "sapmachine-jdk-15-ea.32_osx-x64_bin.tar.gz", + "checksum": "f341a69373739d06977d54ff9946cbc861025010ebab34555260208201f093a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jdk-15-ea.32_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-15-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jdk-15-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-15-ea.32_windows-x64_bin.zip", + "checksum": "b34b953c7694629dc81849a30ff8692ae474f3b373250ae1c56eea9fe9c173ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jdk-15-ea.32_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "9df122d1ad8b3d0154fac9f2927909973b9266c6f88934c8ad340f0f1fc14165", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jre-15-ea.32_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "8ae34d29108e1dd90a9af1cd7ec1f7ee634ef7e948cf254ddca310a5334f00b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jre-15-ea.32_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.32_linux-x64_bin.tar.gz", + "checksum": "dc9dd2726d9fe7ed7c6257f515088078c7535f1801645fcf16807ba46b8ac883", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jre-15-ea.32_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-15-ea.32_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jre-15-ea.32_osx-x64_bin.dmg", + "checksum": "fd941764a4f0451619197d43aeb0e4ad446394eaaa7f1ba3c74c97872bf3ea8c" + }, + "tar.gz": { + "name": "sapmachine-jre-15-ea.32_osx-x64_bin.tar.gz", + "checksum": "638d785c95bc34dd76acb21033100c34d55361ca1685d8940e82a1f2c9f73b65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jre-15-ea.32_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-15-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jre-15-ea.32_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-15-ea.32_windows-x64_bin.zip", + "checksum": "6256d0c80f220fa0078204027ba014493ff66384d7c78b263abc504ec297f234", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B32/sapmachine-jre-15-ea.32_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-15+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jdk-15-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "6ae8b97021be9517d8633552af7af43f90fd9ab451cc414db3a8d60f5047fa7e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jdk-15-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "606704d62888b9f1ed445a5759aa046ac5ca7de7191143820862ab7ce3b90dcd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jdk-15-ea.31_linux-x64_bin.tar.gz", + "checksum": "84a2d629b1743ab1da813e6e15104b7068401c90a2041bfb965a149f3f871407" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jdk-15-ea.31_osx-x64_bin.tar.gz", + "checksum": "3f2594432819ca674250f15aed880acc570ffca878e53eeb678ac5776333a083" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.31_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jdk-15-ea.31_osx-x64_bin.dmg", + "checksum": "02131c688053d2f57bd0d03bc8c3f1c3ac8872b0b5368db7c60be84b6ed0cdc8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jdk-15-ea.31_windows-x64_bin.zip", + "checksum": "b321c3896d8cd78c833c2170d70b984c2aa10c46d41dd8fc944203d6d30e4360" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jdk-15-ea.31_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jre-15-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "438eba1eb1cb5a0b86a9b53cc808e4a4b3324fbf864d16fe6f9b2e5aa7069443" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jre-15-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "53441ceff1524480b162880388764c5e74ed88fdc63f53aaef1162c69ed974e3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jre-15-ea.31_linux-x64_bin.tar.gz", + "checksum": "795e1ee4f1169f08b48f192b8b54461bf3fe8d003c94a3838953d8dcd282e874" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jre-15-ea.31_osx-x64_bin.tar.gz", + "checksum": "1199b6832138f21415b988c39e923a3239399f8228e95d95c62f604dba3e24ae" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.31_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jre-15-ea.31_osx-x64_bin.dmg", + "checksum": "7818594f1faabce32a1d356b87517478a66e1b815a95fedc3c9cdad93dc80ee0" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jre-15-ea.31_windows-x64_bin.zip", + "checksum": "240aa90245aad9ae9dff72d6e311239d79ea5cd235169476cec6a0234e2ceae5" + }, + "msi": { + "name": "sapmachine-jre-15-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B31/sapmachine-jre-15-ea.31_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jdk-15-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "cba0886f4f3cf4ca43c3dd78d5c8f70b1153e271ddf3547bd136416886cc4109" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jdk-15-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "dcd7bff02142188122138bbfb7ff99633ff34c18b92790fe9e6ecac2beebb1ee" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jdk-15-ea.30_linux-x64_bin.tar.gz", + "checksum": "a7f8bfd5e8f57a50c44a0f51e743d8ce7eb4e158d86595b675f187be03db4556" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jdk-15-ea.30_osx-x64_bin.tar.gz", + "checksum": "52a9626099eb7d1b3343a32a3faf1bebe5d4cd4ff0312870679228c9f7c0e627" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.30_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jdk-15-ea.30_osx-x64_bin.dmg", + "checksum": "823838e7b7e2ac7f6fcb97fe49f32dcd556ce1b5e0354ea3db38fb059a212fd5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jdk-15-ea.30_windows-x64_bin.zip", + "checksum": "69fc6a9052b987c6789b011fffddf0bd56e0c2b22f66c477eda3e921341e95c4" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jdk-15-ea.30_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jre-15-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "f129badcbd3c78ff1ba5eaa2a968d69e2ae9fa237588b2ad3b5187484902b50e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jre-15-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "bd9a711f969d9bcaf708ea7eba159c6d9a4477b9769bc2eadbd87ebfb38bac9f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jre-15-ea.30_linux-x64_bin.tar.gz", + "checksum": "2b839bc5e8d40e6100f69f7bc54bc83c89982f014b963df58556a8a0aa53a3ab" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jre-15-ea.30_osx-x64_bin.tar.gz", + "checksum": "405cb40542e85ca53abb4fdc796d470c360b820a540378e0f129be552d6bce81" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.30_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jre-15-ea.30_osx-x64_bin.dmg", + "checksum": "8defded61eb94bed9b4d0b8d9a57277f2b8b77cc7d83aec718feeb8da28d8731" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jre-15-ea.30_windows-x64_bin.zip", + "checksum": "fb704d23ac547453c7bd726fc9e99522eb721631578ada61364d2baaa1d62947" + }, + "msi": { + "name": "sapmachine-jre-15-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B30/sapmachine-jre-15-ea.30_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jdk-15-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "e823f420a6e7ffd04fd6f1de5dfc2fa01b4b460dce66522ec5aecb47b54452a2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jdk-15-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "1566890ba6ebb1b4647c203bcbaa962ef6b2ffe0015a79555843b643c0de1799" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jdk-15-ea.29_linux-x64_bin.tar.gz", + "checksum": "5fa9bdb465833741f081424d6e2f562bb6bdf45d8cc5f7515614db0dfffc1635" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jdk-15-ea.29_osx-x64_bin.tar.gz", + "checksum": "6a36e15e4ae130d3e8cd33968698a2f4fe3bc5ade48fb235932ad2913121f6ad" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.29_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jdk-15-ea.29_osx-x64_bin.dmg", + "checksum": "db9bca28b1b50f57a38dfc15f195ea1b76a1a1a73f2a5f4989251ad6962b3807" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jdk-15-ea.29_windows-x64_bin.zip", + "checksum": "c382909088404de936f9e44b78de71482d1e306f3972f11cbe2dd7771e60e02f" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jdk-15-ea.29_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jre-15-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "9cfc72f3b8ae96d833d233971f65af6d36eb9539453902e70f5aadc24f9c50cc" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jre-15-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "003a1f17ba4379339c2d7eef614c7d5d47b0b80bc25336f2b441d9938e8c22cb" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jre-15-ea.29_linux-x64_bin.tar.gz", + "checksum": "c190f870eaa966f5de5050eeacb96ec6eeaf2b89981524a3df0bb6b009f9d2ab" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jre-15-ea.29_osx-x64_bin.tar.gz", + "checksum": "ada69cd45e3d955794ea77b0b950d6ff122724fec2fb9ad49e98e2b075c3e13d" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.29_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jre-15-ea.29_osx-x64_bin.dmg", + "checksum": "5e7db6b06b2d22b29e228dadb7aa80d89481f1df2e0ffda7c6e55c71c1ee233c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jre-15-ea.29_windows-x64_bin.zip", + "checksum": "17036bdfd91cda60f9c1fc372369f70e751e96b0daeb3d4e63cef3183221a0c3" + }, + "msi": { + "name": "sapmachine-jre-15-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B29/sapmachine-jre-15-ea.29_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jdk-15-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "0de966d218607a4840233d2a4637d39b47718126018903be661f7b81b1d30dfc" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jdk-15-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "96c54b4260209c889ad5be53f93e41b04d62ed88a62b585abad13357f84ec194" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jdk-15-ea.28_linux-x64_bin.tar.gz", + "checksum": "9b096229b8cdc06f247950825166a75814111ecd5c86264288ce8444ac209d5c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jdk-15-ea.28_osx-x64_bin.tar.gz", + "checksum": "a67202d7bda669b70446edcd003c3eb71b3667cff97da7148209f5fc1f7c0caa" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.28_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jdk-15-ea.28_osx-x64_bin.dmg", + "checksum": "c6658adc9a29cbbcea018f2763baf6750a5360e36776fb0cf2930109254b6b60" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jdk-15-ea.28_windows-x64_bin.zip", + "checksum": "1338d5b2ddc025c6c45bfdf374c44eea33ab9d805e37c3f20db4664e6a804b4d" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jdk-15-ea.28_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jre-15-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "b43d11a3c05f4f46bdf87ef73a17ee969d203582fd8ad575170e6a602da1469b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jre-15-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "4ef3a770609edd4ac186dce354badd273a7ef9c92fe1dde1f5602c0ff5b99275" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jre-15-ea.28_linux-x64_bin.tar.gz", + "checksum": "c213f6c734fc93e2cfb8dd65ba893369d9e9101c6e0c27952eae5b49714788e9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jre-15-ea.28_osx-x64_bin.tar.gz", + "checksum": "217500d7c5a8121f17cb433d9efd4d32f0874c4b67130d1693f08d12878ec520" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.28_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jre-15-ea.28_osx-x64_bin.dmg", + "checksum": "dcace619ad1429edd50cfcb21f7846cbc82a0bd233c4d23fe7b6fc1db712405d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jre-15-ea.28_windows-x64_bin.zip", + "checksum": "e8291eab13ba6dfc0e78b606d441b312b2163777e68ae9799d9a45db9b0ea918" + }, + "msi": { + "name": "sapmachine-jre-15-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B28/sapmachine-jre-15-ea.28_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jdk-15-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "080280b6b54f299c6479e7ce6e3af6d1d3b2fe9c32b24982f17e4a10c9c71eb8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jdk-15-ea.27_linux-x64_bin.tar.gz", + "checksum": "7bb19488a2fe7948b10b8e233396d68fa5c8932fe63aad41929e2ff7632879c6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.27_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jdk-15-ea.27_osx-x64_bin.tar.gz", + "checksum": "f820bfaf341cbda7f5c895d9d8370196645da6e514d99010263862d88556f50e" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.27_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jdk-15-ea.27_osx-x64_bin.dmg", + "checksum": "1907d6d44f4b245fc7fae47bed1a0a02033fa7d111f8da8532a8d9aa02fe6086" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jdk-15-ea.27_windows-x64_bin.zip", + "checksum": "406d560740cc69726b0cc9a8e6db44b929124251d20dab8d88a5773659b5a312" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jdk-15-ea.27_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jre-15-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "3e32ccab6961c9a1b749a64669c1a23526aa863d9ba8fc254c8757f3d8786735" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jre-15-ea.27_linux-x64_bin.tar.gz", + "checksum": "57f00f5ea428b49fe990f501f659b7804d375d454fe907c17da793a5d208634f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.27_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jre-15-ea.27_osx-x64_bin.tar.gz", + "checksum": "1511c66b0249b41dd7f1d21d02966b59a4e4eb63e67d0027098803e6361482ee" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.27_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jre-15-ea.27_osx-x64_bin.dmg", + "checksum": "3a291bbbd9eaf69ebdf0afc655d2007cdbcd7ada290206cca932a306a56ab17a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jre-15-ea.27_windows-x64_bin.zip", + "checksum": "1c0d403d42cf5b102918679a3e2e5bdfb7429b97a49e124eb005d000e34e6af0" + }, + "msi": { + "name": "sapmachine-jre-15-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B27/sapmachine-jre-15-ea.27_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jdk-15-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "5920bca372d9fe3efe376cb41f2a49fcade554bd09ec6ee8cd1dd07af1edb40a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jdk-15-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "3889c88085ac0ead98f305aa5a95abc98ce06ef1bc7a809eb4367c858fc1d771" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jdk-15-ea.26_linux-x64_bin.tar.gz", + "checksum": "37eee862e08745fe6166b2dc56015850209696f139485d37e285b62973a5cafa" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jdk-15-ea.26_osx-x64_bin.tar.gz", + "checksum": "e3b47f314f4c55fc43d801b4f09eb8a4289c34d1f812b44fa7210a3f20f7b0d7" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.26_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jdk-15-ea.26_osx-x64_bin.dmg", + "checksum": "139acc1093fc67af94c3555fe76aa93f8135431756f5b7dcdb8a7cbd146cc677" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jdk-15-ea.26_windows-x64_bin.zip", + "checksum": "155dfe749096fe1f131f73e500262cd829e47ddb27d849732e08c4ff25ed78cf" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jdk-15-ea.26_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jre-15-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "11318582154900d356e3d230ae27c40c97ecf90d0b99b5d72b523c17f7295d1c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jre-15-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "0da235192a3cb211c868f614217f63247c6d63aff4d5a0ec49474e90fdb53558" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jre-15-ea.26_linux-x64_bin.tar.gz", + "checksum": "52e1734f085115f012dae2a09a0b71a290c66df2d5d9bfd02c5e6faef616cc0b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jre-15-ea.26_osx-x64_bin.tar.gz", + "checksum": "d49b88b62dd7343a52d5b49b4ba24333843db45db5a22b9728406c0a7c7a2f1e" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.26_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jre-15-ea.26_osx-x64_bin.dmg", + "checksum": "09f32c115995355b0ffa6dbb76af71f6733bf319628213fcecbd59b160a2c975" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jre-15-ea.26_windows-x64_bin.zip", + "checksum": "d326b191c65148f7ddab473185caaa3d91a1e6b3c5b517d72eacf032aead5af9" + }, + "msi": { + "name": "sapmachine-jre-15-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B26/sapmachine-jre-15-ea.26_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.25_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jdk-15-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "5cb7e23b425a0751a0befdcfe17b1ba3004d3af42042c2ff32b95277ad0ab796" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.25_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jdk-15-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "f63a3c1daaa6a161378332899e2c35391baed19b15786e8049220356dbbfc400" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.25_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jdk-15-ea.25_linux-x64_bin.tar.gz", + "checksum": "7351211d88e14bdad3c70de08aa9c2d9a07c58f31dc451438f163371a928619e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.25_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jdk-15-ea.25_osx-x64_bin.tar.gz", + "checksum": "b865decc1b4b7038ea554b2fe8db044045328b4c6a5428964b2aa047a8fb0bc8" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.25_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jdk-15-ea.25_osx-x64_bin.dmg", + "checksum": "b0b546471c80ba488221869e5170b891df8b211b24f7e7fe934b5d905793ed04" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.25_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jdk-15-ea.25_windows-x64_bin.zip", + "checksum": "62eb0f200a1a5e6ca397e597fed1469b6ce6294fc956a2ed14b53da69a4822d4" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jdk-15-ea.25_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.25_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jre-15-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "ed838e503a2eaa70570b84fdc4b48b2f05fe5e6a6c7b72b9e74c96ff1b9fcb7f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.25_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jre-15-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "26110a59bf76f7744e95f9b0f986fa5ac44a62d34e03117a31b5bbba55d0f608" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.25_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jre-15-ea.25_linux-x64_bin.tar.gz", + "checksum": "7a16cadd6648d7def30352bebe3824284d254202eb3f0b1900ec015fad502a51" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.25_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jre-15-ea.25_osx-x64_bin.tar.gz", + "checksum": "4d28cc18faed7b1350a1ab756bc5f57a209fbf9fc05d4ab2ba9eccde753a7c17" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.25_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jre-15-ea.25_osx-x64_bin.dmg", + "checksum": "15a4304bb6af95f6cba4c14a0fddf6060eb1dcc108fbc56253fce79ad9717f13" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.25_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jre-15-ea.25_windows-x64_bin.zip", + "checksum": "2bb7032109ce865c8c2db7b6ca45cc7f027d2078b9e9a0139ab71c78ce92ce35" + }, + "msi": { + "name": "sapmachine-jre-15-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B25/sapmachine-jre-15-ea.25_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.24_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jdk-15-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "6b9b0b534b845d438f2b5a8a00b9599546174061b655653bad9699e10399c2a0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jdk-15-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "b5d2faef759230ee91a105c6432247d996d2996f6a94cead3bbf0afb1b077c44" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jdk-15-ea.24_linux-x64_bin.tar.gz", + "checksum": "49377aa134102f6cadad256865536804ade6ab37bcead503280b621de5fff502" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.24_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jdk-15-ea.24_osx-x64_bin.tar.gz", + "checksum": "bcd5ac7421d3b1526324cf9791f5eafbbd19515e0279599d71e4cf562fb10b66" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.24_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jdk-15-ea.24_osx-x64_bin.dmg", + "checksum": "c7c0065bce1cd5ad972e769c6b5177e2784c50e24df90cad57b7b2324328ac06" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jdk-15-ea.24_windows-x64_bin.zip", + "checksum": "734f18adecbd10cf64af0c74a92492640ab4246885008eb45e765b2e6d932d71" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jdk-15-ea.24_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.24_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jre-15-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "ef90ccb229a16b02f6c11fa60c8fedbf7951ff2978e1193edbf906ca85f7ad8c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jre-15-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "b60e0e8c1f80537a5f41c0c3807e3213351b4a9ad003e9a65232158a2e8cba88" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jre-15-ea.24_linux-x64_bin.tar.gz", + "checksum": "646e829434bdfa316dd52561d0cc7d94c77371477207072d6784eac509307e00" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.24_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jre-15-ea.24_osx-x64_bin.tar.gz", + "checksum": "90d3a21107c62c8f96c59fcedb28d3f8114a5dddb64da9378899d86359babcd2" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.24_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jre-15-ea.24_osx-x64_bin.dmg", + "checksum": "8156d6dd44ce47caa25ee6ec78129696bfb946a31bbefad2c9abf2eb826e0a41" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jre-15-ea.24_windows-x64_bin.zip", + "checksum": "ca60650baf5da10c5556251f5ac1753f617f68ca36d48ecfd26366f883da62d0" + }, + "msi": { + "name": "sapmachine-jre-15-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B24/sapmachine-jre-15-ea.24_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.23_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jdk-15-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "580185776e1f0965fc8b79bd27599e9add1dac04a6fb6155e29369d9b58a7641" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jdk-15-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "06411d87a2a45bb9aea0926df97da8d5d308a588f6d8c4b94d38c319fc8ab046" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jdk-15-ea.23_linux-x64_bin.tar.gz", + "checksum": "f440ee4aa5da71c719589a2d923d363bbdfb039e3ec39f9a6a16ed0a98ed5493" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.23_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jdk-15-ea.23_osx-x64_bin.tar.gz", + "checksum": "6e84cb9642336084a79a871f86988ce617005b370325e1903b437320ffd6ff8f" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.23_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jdk-15-ea.23_osx-x64_bin.dmg", + "checksum": "2f5cb65acfcd19c72c39dae34909898fb58a181bb7ac79aaad5045d8820d2822" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.23_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jdk-15-ea.23_windows-x64_bin.zip", + "checksum": "c3ad821551b774f614da20b0c568f86dbfdf1648ea0749daa9e8026d06e87d3d" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jdk-15-ea.23_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.23_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jre-15-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "ce581ad83b78ca86c8180a1cb45ec0e1fc6f5145d74f337f291c69f414d347e0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jre-15-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "619864a0e0658b3e67954890467ed0688b6df1e855a2917f7d9e7832ed06b5a5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jre-15-ea.23_linux-x64_bin.tar.gz", + "checksum": "7fe4d2dbfd5ccddbcb8345e2d94cc4b0b8e5b96183bf00b29717ff56e2bee5a7" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.23_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jre-15-ea.23_osx-x64_bin.tar.gz", + "checksum": "07d12802ff5a1973ad42f2f6a433ed03eb38c835f4e4e6ddc7ecc5aa74d198f3" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.23_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jre-15-ea.23_osx-x64_bin.dmg", + "checksum": "01588c8c65f7007387aa41f0d74e55184779fdabf8e44086f44be0dc0139259d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.23_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jre-15-ea.23_windows-x64_bin.zip", + "checksum": "a6c6b45a977613100611b78edfeeba62a4ea35fb20077eacd25e93f78aa4d216" + }, + "msi": { + "name": "sapmachine-jre-15-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B23/sapmachine-jre-15-ea.23_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.22_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jdk-15-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "6f7d27b91d0c1a0e892d0ef24101bdbdaf09b9db4293fffd9ac9dc36752a7eba" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jdk-15-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "4537be0f76da015b46027fdb4e9947ba591fef51ad03ce13e9a5d954690b8fec" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.22_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jdk-15-ea.22_linux-x64_bin.tar.gz", + "checksum": "08cc834021d2dc398d21fcab45dd140976fee86be04d738e2e8ad2fdfccecca9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.22_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jdk-15-ea.22_osx-x64_bin.tar.gz", + "checksum": "bed5591c020bd93eb503d7d9abccbb8dd127f7c601d816534fd55bcc581b7105" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.22_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jdk-15-ea.22_osx-x64_bin.dmg", + "checksum": "70db9938ded2a90fd711b99b94d8ad43115ffe8d749a8f95eeecc43fc02957e3" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.22_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jre-15-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "3b0f449567ea2aa89b30e5eae12d28d05656bf8e0c872c030dbca3b48f018303" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jre-15-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "68864943cdece37438c8b7cc92c5f34e7aaf144b09b56ef07cbbc15b252410c5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.22_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jre-15-ea.22_linux-x64_bin.tar.gz", + "checksum": "975e71455e07593de7d9e9ad29a8e07560dc5e4ae203848be76f8b8922880777" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.22_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jre-15-ea.22_osx-x64_bin.tar.gz", + "checksum": "898ff2a645c3caf6f72457f09a865440af52a62c7449abb5b039e5beb1b912fb" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.22_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B22/sapmachine-jre-15-ea.22_osx-x64_bin.dmg", + "checksum": "e55574fdb0d3065de4bc0b8d5a511bce5b2aa5470b5e26f899cf874963f8bf5f" + } + } + } + } + }, + "sapmachine-15+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.21_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jdk-15-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "92f17211207c6d2421a83a7893b024ee125f84d487c9280ed07ce57d53c2fa00" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jdk-15-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "d72f4e8f8020459d0a1dedc42ca7bd6466108586e63b172ddea553d8cced299a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jdk-15-ea.21_linux-x64_bin.tar.gz", + "checksum": "de98eb8c4f0b767b97f2be7ae68fcecaf70ec0facc563c7f559c7a306bcb4b9d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.21_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jdk-15-ea.21_osx-x64_bin.tar.gz", + "checksum": "6842ce5f02c39f4f08acb6eff8f80d7f8ac82825b5273b8c19fd254817be4b65" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.21_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jdk-15-ea.21_osx-x64_bin.dmg", + "checksum": "1fdb2490fb43c2742d37e03e45eb63f522b8392ffd6800fa2a41d63e7a204851" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jdk-15-ea.21_windows-x64_bin.zip", + "checksum": "99612ca8be5f64bd436027b2d8965d07f164fc7f6121addc20293b966f6b6d4a" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jdk-15-ea.21_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.21_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jre-15-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "352d6ced979831104b4472f7b82b41385295bc78a50f741324fa967975325971" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jre-15-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "fee4daf749169e3e15bf9fbc6f35c39d05f1d9a6cd429f0448407b38178c3ae1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jre-15-ea.21_linux-x64_bin.tar.gz", + "checksum": "b39a301190179a1dbf87c684561f825dcbd6bf32a6a4a673cf75be6edafd7ded" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.21_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jre-15-ea.21_osx-x64_bin.tar.gz", + "checksum": "d74b03a1afb9ef0714fde69ed5158d04dbc1879c16dad7e7bdbd8522ff3dff51" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.21_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jre-15-ea.21_osx-x64_bin.dmg", + "checksum": "cc0d8188b180994b419ab9c42417ea3496a2e2c456ffa1731617fd1a0ed488e5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jre-15-ea.21_windows-x64_bin.zip", + "checksum": "67f7546db440736f1c4e8fad6da845a099212e298a3d2f21bac0e98fe0f0e956" + }, + "msi": { + "name": "sapmachine-jre-15-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B21/sapmachine-jre-15-ea.21_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.20_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jdk-15-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "d8ee788bf27a5445f10e551f83440caa36ae92151c709682769b80460612c44b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jdk-15-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "dec9bf79a921e4e2ebb68091d72510dfb1b84fbd269b7db8d223ae2713bc89b6" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jdk-15-ea.20_linux-x64_bin.tar.gz", + "checksum": "e21ffa87a300fde25caa910909ec93e97a09770f79bddb2e61b3acfc3b00766c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.20_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jdk-15-ea.20_osx-x64_bin.tar.gz", + "checksum": "b59e14f43b47b9ad6ea0f0b614748db09324a477df669924036b57cc0bed8aab" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jdk-15-ea.20_osx-x64_bin.dmg", + "checksum": "19cf4e0ccab93e4b9bb8006f4ad4118e52a0e073588f9b6c2e69fa0d2892ebb9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.20_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jdk-15-ea.20_windows-x64_bin.zip", + "checksum": "4009c759c2dccc2b2a51793e3087cd0040a1cd8bdbc3dd6870bff3f1ba834952" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jdk-15-ea.20_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.20_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jre-15-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "748952ffee3889874ba1489a81dd9bc91ebd14cb264532b6f48ab2393e45ab9f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jre-15-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "69d82465d2db968002ae6ba8977a26896a88f5cbcb265e29fc5c63ad5985d568" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jre-15-ea.20_linux-x64_bin.tar.gz", + "checksum": "c76a70ec18f471abf756e54a4c0ad6976a392c3b39ab0a780484602cec019b5a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.20_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jre-15-ea.20_osx-x64_bin.tar.gz", + "checksum": "6fcf93735ae1fd2052a1cb9f1df5b96622459b1b90a1e81f2906d38470c07646" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jre-15-ea.20_osx-x64_bin.dmg", + "checksum": "710ef2f8b85ecdec42d9898d8aaff4d7e5fa93f7a3bcf0c60f40871db9fdac59" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.20_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jre-15-ea.20_windows-x64_bin.zip", + "checksum": "bad63b4d6b489bf746365c37430424123c95712f6125eb0014ae623360d82ac7" + }, + "msi": { + "name": "sapmachine-jre-15-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B20/sapmachine-jre-15-ea.20_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.19_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jdk-15-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "b161563a191c51de8c86a17e3817226d93ff5ae0a2fe472c7d391ac9f20bd278" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.19_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jdk-15-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "542e2ff879e6785b5779279511fd69bfdd5505d06fdc58d636cd9e1020ddc274" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.19_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jdk-15-ea.19_linux-x64_bin.tar.gz", + "checksum": "5f0591d18b709e8b3edef85fde6894346ea93d35cd42aacafa0ebb5da2320eda" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.19_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jdk-15-ea.19_osx-x64_bin.tar.gz", + "checksum": "c3fdef0eece596f04c72d11d30988e992850984eb4cab768d256d7254f370f3a" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jdk-15-ea.19_osx-x64_bin.dmg", + "checksum": "b5dfa6b80fc7fb0c00e74157fdb2bc162b4dedf2a96717b001c81e9ac8ad5a12" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.19_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jdk-15-ea.19_windows-x64_bin.zip", + "checksum": "1ded97a343957fb15d444883f48c497c05d1bddfb12518666c6542614695a66a" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jdk-15-ea.19_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.19_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jre-15-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "ec901c2f20ef93205677322faea39159c89165d8905860cad01b501f56c840ad" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.19_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jre-15-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "32ef3d8896866d45566ae3bbca117f0e06bf952067ae06e167392f3183abb3c8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.19_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jre-15-ea.19_linux-x64_bin.tar.gz", + "checksum": "1d1834b83ca40449b8bf78f5a6549ca0a82a0ae2f6ebc579df3e42f6a05147bd" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.19_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jre-15-ea.19_osx-x64_bin.tar.gz", + "checksum": "1c427d10ac2835e6de74a24e87a1f8b2d0359a20678e1a74cedc3f5afea95fc2" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jre-15-ea.19_osx-x64_bin.dmg", + "checksum": "91ffec90d607cc764b5a51305ef1542bff3aeb89783aa3b441fd4d5cbb2a237b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.19_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jre-15-ea.19_windows-x64_bin.zip", + "checksum": "6ec9445be5c325069097e97db4953834984c8b68fe3023af22e564495e99d23f" + }, + "msi": { + "name": "sapmachine-jre-15-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B19/sapmachine-jre-15-ea.19_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jdk-15-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "7a64529ced53401e510b3dd80fef8cef2ade662264e983795b322d6e503a75dc" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jdk-15-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "093dc2787a6f7409e7c758d9cb98a4b2bb74ec06c4e1efd2dec361b8be29a9e7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jdk-15-ea.18_linux-x64_bin.tar.gz", + "checksum": "02ef6affe01d46878a2b779d675edbee76e16c96392aeada9f36ae96db80c808" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.18_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jdk-15-ea.18_osx-x64_bin.tar.gz", + "checksum": "01b4c33afb2d81712f7bdc3ef1c701655cd9c9eaecdd7492f99a76aa2317f4d2" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jdk-15-ea.18_osx-x64_bin.dmg", + "checksum": "5a1ba406ad9d4ef42015e92b39491b06226433edb77898b8d5d344e9b5a1e4ac" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.18_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jdk-15-ea.18_windows-x64_bin.zip", + "checksum": "7fa24636508537498d6fa33b6853fc6414bd8070de7f7269467bc5c2b9af4ad3" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jdk-15-ea.18_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jre-15-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "7aa0abee295ff2e437177f0126b67e368d71835ab62d52615afebaa2634c1505" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jre-15-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "d748417fcadcae109ffab223e51429254486faf116a36f3a91522dd70a6db22b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jre-15-ea.18_linux-x64_bin.tar.gz", + "checksum": "1364f28613f893a0c237d171d44db1906be6ab5edac29b668ed26b34ee3f60e2" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.18_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jre-15-ea.18_osx-x64_bin.tar.gz", + "checksum": "ad763b9857f751d42f63f2525ca9ae76cff8b4b8f6c29a36b597f29d3347f521" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jre-15-ea.18_osx-x64_bin.dmg", + "checksum": "a94bdb7151f6b9c370a2ac19f8b41706692634eb0d4f702e72859c6c6e47c56d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.18_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jre-15-ea.18_windows-x64_bin.zip", + "checksum": "65c5ad155639582b5c5d18af430ff8b5cd330b8c2055c88c938c557a60ddd002" + }, + "msi": { + "name": "sapmachine-jre-15-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B18/sapmachine-jre-15-ea.18_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jdk-15-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "9e1f1e29299df2fb4db150de37e7e14537b0583f2c0d8a816a6781d5eabce1a7" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jdk-15-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "787ee0fbbad8305b010c8b6a31f3a0bf6eb606cc193b7581f4d76d2686a9e5c1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jdk-15-ea.17_linux-x64_bin.tar.gz", + "checksum": "ee2858072667654fc449a8ac0347d7f0170baffcb7d56aa71b5c376910315ba1" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.17_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jdk-15-ea.17_osx-x64_bin.tar.gz", + "checksum": "02febc5dbbd0718982fdb542874a9e4bf4c27ae2a56601b6a92e8e61e4200e7f" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jdk-15-ea.17_osx-x64_bin.dmg", + "checksum": "29b8d9baaf583b08ae3206e3e34a268408e885b98f65af94f5f2d0128f570003" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jdk-15-ea.17_windows-x64_bin.zip", + "checksum": "fb319a45111878da6cc37eb1d6b1a8fb679663b855c1f82db54bde061cac904f" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jdk-15-ea.17_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jre-15-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "fe7312f4df850506c4ec64bdf9dabed286937c8af27ab485a0bf7ca570e43a57" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jre-15-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "f45e154b07fe2664545f3a96794f1d40c0df0197ebfea5f29f663aa01dad73f2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jre-15-ea.17_linux-x64_bin.tar.gz", + "checksum": "27a7607ef46f4c7b473befe1d428ebd1de5f2f9a96e332a553e3ab3b64e1d388" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.17_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jre-15-ea.17_osx-x64_bin.tar.gz", + "checksum": "08649b639783f87900b70fc3e0c855753fa6f8dbcbb831dc07743abf10dc3a08" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jre-15-ea.17_osx-x64_bin.dmg", + "checksum": "0b40989f24ecb703295dd0da4afb11e4997e4cbf0ee68987bf1c0587ca22efe9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jre-15-ea.17_windows-x64_bin.zip", + "checksum": "e972b4eb949d28696bc2cc99ef871027065e0dead14a9330890a3f1102362db0" + }, + "msi": { + "name": "sapmachine-jre-15-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B17/sapmachine-jre-15-ea.17_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.16_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jdk-15-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "b9801cf13377a96890730fd6a35e15261dbbee6666f5fe7fa9358a341b982d66" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jdk-15-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "b8fe784a986805562e02d28446ed24bcce44e7afa61951dc95415ee9f86784bf" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jdk-15-ea.16_linux-x64_bin.tar.gz", + "checksum": "5a6ebcd9f41245652137f581aa4f78ed7a070e3ff22dd06e822f9c642d2a8521" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.16_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jdk-15-ea.16_osx-x64_bin.tar.gz", + "checksum": "c2d3a00f87234b504f23f759a39d58d60dc160c84a2fc75c7a561f17ccb43fa5" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jdk-15-ea.16_osx-x64_bin.dmg", + "checksum": "2ba0d239e9a6bf1c5fa8c47ab4a57e2a4a8446014159fc36fdbbecd97f90ec23" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jdk-15-ea.16_windows-x64_bin.zip", + "checksum": "367dc8027eed978d44dcedc6dd310f63bd50a3f8c18a7b7da75d2da627e880fa" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jdk-15-ea.16_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.16_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jre-15-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "1cdca214b38c30a2fc8e8be537b036bd3ab2ee4327b24701c4836822bca03a02" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jre-15-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "54dca0bf41712b6e59906ea0b8441e4c2f73248923e9b37663a31eb94d1f57d2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jre-15-ea.16_linux-x64_bin.tar.gz", + "checksum": "13d6a16c872d36f192367931a683b32fbdf27482cabe096e52527732f4b25c56" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.16_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jre-15-ea.16_osx-x64_bin.tar.gz", + "checksum": "942b0af9c6fdb6febe4ba7d6810354218ca557a3ab0bdd9d4f38cfe118d65c88" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jre-15-ea.16_osx-x64_bin.dmg", + "checksum": "80e170b60a4163a719ebaec15ecbb4733893480e0d8d145da8f8e8441a2679a0" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jre-15-ea.16_windows-x64_bin.zip", + "checksum": "420a921a5980eabb54a72022908b23aedebc62345b5e7f3f4499ea3deaa9b161" + }, + "msi": { + "name": "sapmachine-jre-15-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B16/sapmachine-jre-15-ea.16_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jdk-15-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "72787a436ff26c398267d52e06e7f500f3118d4a9655a16832cd29676616fb84" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jdk-15-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "71ad8192943a2c8c194c6e806997cca83298045781d02484e70199471863b53c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jdk-15-ea.15_linux-x64_bin.tar.gz", + "checksum": "682188ea1d431857965527cf740e03248f3df895e99adaea0cdd0e68260a8dfa" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.15_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jdk-15-ea.15_osx-x64_bin.tar.gz", + "checksum": "deb0e74ade86984b2be0856f7c44f1123ef31ff150ce396cfdbb874212665d56" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jdk-15-ea.15_osx-x64_bin.dmg", + "checksum": "b2389d2779de626e156fb729a6ac74b7b6a905cc2c2c1b090e4d2f7849fdeb71" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.15_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jdk-15-ea.15_windows-x64_bin.zip", + "checksum": "3706063b9f131a19fb6293c6b96d390482e5bfb49c18161b6a92f1f5077e48c2" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jdk-15-ea.15_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jre-15-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "6104a0856c328eeca2e479289e1242a9de986fb65a1c50c0c7085e39718d1807" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jre-15-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "a080094cef9a4769bdef544ddddb434b8bd2611bad653533bb6c3670e2f3a220" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jre-15-ea.15_linux-x64_bin.tar.gz", + "checksum": "5cf65dd866f6dbd4bdb097a3c4c179b62d1a3302e3cdc418f00d5d326bef26e0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.15_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jre-15-ea.15_osx-x64_bin.tar.gz", + "checksum": "48c16619ce89291e1adccdebe559e31e5fdec61f6aec34b473a822ab2d1c23ea" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jre-15-ea.15_osx-x64_bin.dmg", + "checksum": "348c44fd636b2676a708c5f356d791f39d45602ffc2c6bf2ca1720d0f45857c6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.15_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jre-15-ea.15_windows-x64_bin.zip", + "checksum": "4d24499fabe5bc1e17587a1e8dcc5c237f83571628aa06b356efa19a37621dbd" + }, + "msi": { + "name": "sapmachine-jre-15-ea.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B15/sapmachine-jre-15-ea.15_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jdk-15-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "83cfbe33f2628ac322e88fc8f317411ec11679d35bdced1f0ad1338d0d16e1b3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jdk-15-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "c8b2ea3c76278d43c7bdaac5860059e02f5b0a680e0ddf426196bef7a4c075da" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jdk-15-ea.14_linux-x64_bin.tar.gz", + "checksum": "9613c1d09db595a5e378be5873a093f60550a7733d9eb3507a62572cf6403ba2" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jdk-15-ea.14_osx-x64_bin.tar.gz" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jdk-15-ea.14_osx-x64_bin.dmg", + "checksum": "91b08b67f5f1d289266ee98856860dcb532b61cf617bc7233900ecb3ea288269" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jdk-15-ea.14_windows-x64_bin.zip", + "checksum": "673d2156b1692c24c6acb7b6f96e5cd16d5fa88bd6631c361f174d98071d9cb9" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jdk-15-ea.14_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jre-15-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "80f6418c300a2d123269a1cfad6adf1407db21d9efefc24efa49d4935d913709" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jre-15-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "9b059bcfea1a352f5fe262508a88cbbe2b401e13234638e8f271320b1c2589a1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jre-15-ea.14_linux-x64_bin.tar.gz", + "checksum": "1e3c33095ce5d2199c2d4ac42202407b5f219a0c4fced1286f47c654243eca31" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jre-15-ea.14_osx-x64_bin.tar.gz", + "checksum": "794198fae797d5fbaae4a8c313843844ad87bab6736a54c9c634ec713618b0c4" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jre-15-ea.14_osx-x64_bin.dmg", + "checksum": "e9dbeffee16c93672910bf89e54f4675cf8659e19f64e5ed56d3db52cadab126" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jre-15-ea.14_windows-x64_bin.zip", + "checksum": "29b0237cb684cc174623eb20d2bb325ac44c074f67709ce7e5b00644d5997315" + }, + "msi": { + "name": "sapmachine-jre-15-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B14/sapmachine-jre-15-ea.14_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jdk-15-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "37464a8702adb0162cdc93542b6811570b6058432ef4c93726eef43a77205f5c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jdk-15-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "0f23cac77d63fe45b78b9bdba702af1c47a04de0b70eb3f3d146a5e55460c7d1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jdk-15-ea.13_linux-x64_bin.tar.gz", + "checksum": "edd84a3f80f1c51dce62632be7577e3b5f974bc49dda9325ffe126940263d13a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jdk-15-ea.13_osx-x64_bin.tar.gz", + "checksum": "f70fb8ade48474bd6fcacac2d4f976b887b5a874f305fa8509d3b19e42a91309" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jdk-15-ea.13_osx-x64_bin.dmg", + "checksum": "aff34a11c08360e78bfa311d236370e9f865223338074f9df1477ae78630a4ee" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jdk-15-ea.13_windows-x64_bin.zip", + "checksum": "03f5ffe27d5d39601a2a3255c4d1282258dbcd5fc49a8bed489c2ffb44a9a293" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jdk-15-ea.13_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jre-15-ea.13_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jre-15-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "2bf05c8585ac6dc333f17e20b9bdf664980059bcd0f5e947a1fb602090c26f09" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jre-15-ea.13_linux-x64_bin.tar.gz", + "checksum": "f669ad90c148a935980da41f0e5d7d920b111e350d117793e3c811c60023804c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jre-15-ea.13_osx-x64_bin.tar.gz", + "checksum": "f4aeb32e4ec8101ec0bcd67d0a7670a0c4c95083727d415b1a460177a46eadf8" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jre-15-ea.13_osx-x64_bin.dmg", + "checksum": "bc7845c255492548a08c1af6c93dbc391b246a4129f9f98faacae7fe2d62920d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jre-15-ea.13_windows-x64_bin.zip", + "checksum": "b624b1625faa89af7ba8efe0de88490dda226ff6172d8fcc94cd48d796f93864" + }, + "msi": { + "name": "sapmachine-jre-15-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B13/sapmachine-jre-15-ea.13_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jdk-15-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "4fbb13ff392aa87a2904c3997ca49f20fdb1e24f834b27605c67bf8c80427852" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jdk-15-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "4b8a5992c8807d94c43a7c1c3fd406a9a5956633df92c459e60f3b7cf462c401" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jdk-15-ea.12_linux-x64_bin.tar.gz", + "checksum": "981743e3bbb3f57ca75e997c2a773490a1e7df2102308b71b996613d1869d37e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jdk-15-ea.12_osx-x64_bin.tar.gz", + "checksum": "c6124facc560fefab293d72c0dd623341641ebe560c27c9d97fda34314d139e2" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jdk-15-ea.12_osx-x64_bin.dmg", + "checksum": "c3f334380c37f8e40838870aa2d0a2d62c18afc3a7ef14f5e34c7e5ee1843520" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jdk-15-ea.12_windows-x64_bin.zip", + "checksum": "ec04fa14e6f349822d82ef5c4a0f6db7cd4a51a37123b6077aff1ce31b9356d7" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jdk-15-ea.12_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jre-15-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "6dfef454d4209e73295c2d5797bff939cbe08ca16d6e19440ff368ff30519d13" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jre-15-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "4c73fda546eac288e3632c15bb9378780c3f7e29082fc8ee914a09ed48f05256" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jre-15-ea.12_linux-x64_bin.tar.gz", + "checksum": "3a5efdef4dc000687c03a41c59894080b203398b0ec775e4352820988451d291" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jre-15-ea.12_osx-x64_bin.tar.gz" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jre-15-ea.12_osx-x64_bin.dmg", + "checksum": "229f298cb2abbe9ba8c8474fba416ef8527f7e192917fe433cf7da555e856df8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jre-15-ea.12_windows-x64_bin.zip", + "checksum": "4ebde9785b23f32b8d637420b5b457499a6bdbba180cfe461d65ba44c4f44396" + }, + "msi": { + "name": "sapmachine-jre-15-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B12/sapmachine-jre-15-ea.12_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jdk-15-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "536ca1b7357455c46555cba343b0ab98c399db29e4a6d0ef48771887be7694e2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jdk-15-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "460012cb42fedd4b9166464e91a76da68669febf394dc04a98537e8147ca785b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jdk-15-ea.11_linux-x64_bin.tar.gz", + "checksum": "943e364765a999b269ede2cd379c3d458379ecb9c0bd8c9eed5e55cd0b50b923" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jdk-15-ea.11_osx-x64_bin.tar.gz", + "checksum": "d58a08bd7043ded7aec9933bb8dc0024f5d7cf76fb3df04d412db9ba9dca1ff6" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jdk-15-ea.11_osx-x64_bin.dmg", + "checksum": "e5dbbacc388a70fe09da2a3f9599deb41f2e07d4a8e2ce7bbfa44ddeb54302a3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jdk-15-ea.11_windows-x64_bin.zip", + "checksum": "02d30f1e5c5cda8f35ee97f7bdee5a9df3b04495a4d9e02c675e3ddc7f829a16" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jdk-15-ea.11_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jre-15-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "16c0d9f0938670bc8cb49f31a252ecc766d4a55ac421e9e47e53f702e323c364" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jre-15-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "440cb329eb216091216e1d4f4c960d2617237cf81b2696d417a3be8b1d9933ab" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jre-15-ea.11_linux-x64_bin.tar.gz", + "checksum": "ec011a8df8326b95e1dbff7b0da3819e49427487b6c8a2b01f6d0013cf23d74a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jre-15-ea.11_osx-x64_bin.tar.gz", + "checksum": "57b9ec03cc1321696da5448972e756f3fa32c1ab156b6d7774fb86d9a0316139" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jre-15-ea.11_osx-x64_bin.dmg", + "checksum": "d6454dd7528996c93a0dbb18ab0e12e9d6cceab155143493381d95e48d3233ee" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jre-15-ea.11_windows-x64_bin.zip", + "checksum": "11c131708c1b57eaf929177cccbe6df8476810e2851793e29b144667bd6d3c8d" + }, + "msi": { + "name": "sapmachine-jre-15-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B11/sapmachine-jre-15-ea.11_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jdk-15-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "7070ed61767ea80ab633498a201e169c7feecd87667b60643a498da0d44a5d5b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "18405e277a18bda9fda1fd8219ba79399c8b8bcabcbcdf8d8256882bb2be1e9a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jdk-15-ea.10_linux-x64_bin.tar.gz", + "checksum": "255012c54e984ff6a00f44a1d756e568ab46b4a2ba5caf93673cc3baaffac6cd" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jdk-15-ea.10_osx-x64_bin.tar.gz", + "checksum": "503fe77b811c6d288fc09434788683ea9ef2832c49716bc4cb256ca7aa5c3421" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jdk-15-ea.10_osx-x64_bin.dmg", + "checksum": "0ab1977d58924dc8b1c12e3cce08e62691ea4996edf15c0680c680890b0a649d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jdk-15-ea.10_windows-x64_bin.zip", + "checksum": "a62cb50ed85dbcd1f108fd1ea24d22d39ca94f62af9a908403f2dbf7177d48cc" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jdk-15-ea.10_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jre-15-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "702053efff2392fee644d7d6ab361e98dbaa921b22eef26d2627e76dfbcdcfce" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jre-15-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "d305af03aa9b964490e0723c431b382867efdf44ba953f45374ca785c6e1addd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jre-15-ea.10_linux-x64_bin.tar.gz", + "checksum": "e7ae006c1e50a921a78504f2e5fc961c2adfe108af8e02fa75dde4903dfca97f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jre-15-ea.10_osx-x64_bin.tar.gz", + "checksum": "ea01e6ddb3fdae511f9e417e33d3da4778101111fc566318a5222dfda0ba961d" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jre-15-ea.10_osx-x64_bin.dmg", + "checksum": "686580f6ccb8da766002fceca18cc9e3c8f9d1c37ac7c6a50b6d2c6eac0ca1d6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jre-15-ea.10_windows-x64_bin.zip", + "checksum": "8fdb4944ee8bf9e9349dd36cb61e137e20b541ea2bf13523d77a81c806814f39" + }, + "msi": { + "name": "sapmachine-jre-15-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B10/sapmachine-jre-15-ea.10_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jdk-15-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "bacc49e46ac9156b6b08a1dc875a7fde80e5a38a419d24f9cbc54e083f02a084" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jdk-15-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "8fe2ff279424fa7bd5496671886b212bdb2e9510c3af72020bc78e99bfa9036d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jdk-15-ea.9_linux-x64_bin.tar.gz", + "checksum": "433367446048c94624ef480401f76c64b6e16b8ead97b2b3f6b3f0a29d71dc13" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jdk-15-ea.9_osx-x64_bin.tar.gz", + "checksum": "a380f55b0872c135ae2fd964851b2889c611f77b75e25ee98a8d9a539afd7ba4" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jdk-15-ea.9_osx-x64_bin.dmg", + "checksum": "15c4e57f0418de7aa09ed619c2d2135b0ece472478933db2cc12d511d37b7d9c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jdk-15-ea.9_windows-x64_bin.zip", + "checksum": "9a8e108d98840a524200fc71ed1f77b516a1de331d75d88367abfca7dc2bd33a" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jdk-15-ea.9_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jre-15-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "a965ac064d85a75cb8a7cae14a5c6401d828d00b0d2105e1c07080ea69d594c0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jre-15-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "e4586b4c2c79e08e4f668afefe16a6f5cb4de3078e420f681388681a87fcab32" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jre-15-ea.9_linux-x64_bin.tar.gz", + "checksum": "8683aa05dc41a673ad446c660cff22605bf59bddbee1465e34807d34cec20855" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jre-15-ea.9_osx-x64_bin.tar.gz", + "checksum": "b8488ee2f71ad8c59d3852ae935ea825a840f41a98be075115c87334b1020316" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jre-15-ea.9_osx-x64_bin.dmg", + "checksum": "c57958c55501a624f0978a2ebbcae567510d16eefb727190baf0cecb0c24b6e9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jre-15-ea.9_windows-x64_bin.zip", + "checksum": "1401804aaacc6e41ea88404b41372dea27f1bfc8cb179a2f265c438de0e4fa70" + }, + "msi": { + "name": "sapmachine-jre-15-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B9/sapmachine-jre-15-ea.9_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jdk-15-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "b99da5b72b606c3512e30a8a2f05878d1451315f9a72385b2ebdd5c3abbd9d4f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jdk-15-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "da7cb9631e6ba92efce60fd85b2fcdca51339575a42d96dac21f83dc82b8ab62" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jdk-15-ea.8_linux-x64_bin.tar.gz", + "checksum": "e80e81aa87cf9521613f712ab4f7a8b69a6794eecacd6a157e555bfbcaced894" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jdk-15-ea.8_osx-x64_bin.tar.gz", + "checksum": "a9aec9313bdefe81df78eee7cbb2e8ade74b86a2007ef02e5bcba087fb1a852c" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jdk-15-ea.8_osx-x64_bin.dmg", + "checksum": "4faf006cdce3d59ceaaa9db32042f80098d716c5b6cf0d3fa72065781c9a636f" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jre-15-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "9ba59dd6644b5197e51975e1937a7987fbddc7fa288a404c35c99239a4600acc" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jre-15-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "8d802a85b56ae7a24869f009ec91457dc3b8f4d6bfa4e75e0d2b8cb4ca68c475" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jre-15-ea.8_linux-x64_bin.tar.gz", + "checksum": "90105a52123cd7c5afe58894fe213f8497c4e3dd3a2ea3dfff4a9c419b6c53fa" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jre-15-ea.8_osx-x64_bin.tar.gz", + "checksum": "cd1f67028dfe7c5a346a4b57b93fdcda63128190d4dccea3477e9e932c560b2f" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B8/sapmachine-jre-15-ea.8_osx-x64_bin.dmg", + "checksum": "5bdfe5a64f0f3ebd32f1c83a424b1418be42ff47ab0a7c5f2027921024e85204" + } + } + } + } + }, + "sapmachine-15+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jdk-15-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "96273e8e7acf768ae0c1c87ade5a0a4787abb37c298e8034abb9cdde840ad2da" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jdk-15-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "ecc6fd5639a505d6f2b53f594555b462911d3afe496f9a5d33561e59c3ec05dd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jdk-15-ea.7_linux-x64_bin.tar.gz", + "checksum": "e0adbce7f485882a4512b5cf913ed308fb3a54e586b48c0c4f58f67c0ca09a71" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jdk-15-ea.7_osx-x64_bin.tar.gz", + "checksum": "ae5a5e4d377c9eb9671850eac8904f286f455e74dde0771d88aeaefcfbed9f2c" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jdk-15-ea.7_osx-x64_bin.dmg", + "checksum": "c1a5025c564b41d168d7cf0061310bceb7a2bccaa5a8e4661fcbf681586b411e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jdk-15-ea.7_windows-x64_bin.zip", + "checksum": "779526b236031e97b7c9d1f513da65a5291ee4bafbb7e959ddeaa0d35b47288d" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jdk-15-ea.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jre-15-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "77699d395ae2829ee643bfc2a8f148e37c1da31b5daf804b98c0e3cb9cdd5981" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jre-15-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "92ee9b4b9d0822b01a41ba93d50c2ba4b8e4fca29d36bfeca5c48e845ee11a4c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jre-15-ea.7_linux-x64_bin.tar.gz", + "checksum": "b2bdc860ddf842354f67a15bcc03c763f5811a5c4b1bea3d86d1b39e694da1e8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jre-15-ea.7_osx-x64_bin.tar.gz", + "checksum": "dfc5a760277f090fd26f6bd8deb2f2328f0e381488eb14caca06d434fbdafd6c" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jre-15-ea.7_osx-x64_bin.dmg", + "checksum": "1321b0da3bfc9bb0fdd8a63ef314e829240de582e7d467a833f00d16440aead5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jre-15-ea.7_windows-x64_bin.zip", + "checksum": "60ecd70b523da5e6edc81f51dfe5779f1d4461b2b64d2e00932dcfa1363c4fc2" + }, + "msi": { + "name": "sapmachine-jre-15-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B7/sapmachine-jre-15-ea.7_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jdk-15-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "d5db41aea5e39e048d7b9f74e6ca2c8b4398b52c085aa70f4f1b8e8cd32558eb" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jdk-15-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "1bdf96859ece3ec5052cb2b45826088534ac7c65453bb482f645c785f4a45e4e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jdk-15-ea.6_linux-x64_bin.tar.gz", + "checksum": "9c010ca9baecd984302557df479467a3ee75a1cc1035d8a87d72a4d58f016901" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jdk-15-ea.6_osx-x64_bin.tar.gz", + "checksum": "11d08ca354f6a63bcbe3542af26a33902d093cbcd02e1c60b1ed26d30841f763" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jdk-15-ea.6_osx-x64_bin.dmg", + "checksum": "dfe5d5a76e3b5511f41b122413f01baf1f2e641dd6932200de252af0c7ceaf83" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jdk-15-ea.6_windows-x64_bin.zip", + "checksum": "72d95de44b85872bef05ff4c902ff6f238a4566b210a6e0118936bc20d337345" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jdk-15-ea.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jre-15-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "762133e095e38ae39a7f541ef3d1d791958fef81d20c5e55b74c8614f883525e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jre-15-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "ee274d9c9955063c035a81799282837cb5b7e0555bcd840ad2d94a03c391b135" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jre-15-ea.6_linux-x64_bin.tar.gz", + "checksum": "446601aaa0a9ada8c81d57d4d11471ab0b0c2bf3128e1cf75b1bac57c1e8fce0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jre-15-ea.6_osx-x64_bin.tar.gz", + "checksum": "51ab1aade130940f96d3a2e3671a34a8e13a23417b9b2f614537980300c8b276" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jre-15-ea.6_osx-x64_bin.dmg", + "checksum": "6f12cb1d86cf9dd786daa38bc272defc52a61967b3cb1d1757f3fd26d0cd2bc2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jre-15-ea.6_windows-x64_bin.zip", + "checksum": "d111e149a989e46947b090c6f0b2ca38bbe02be38ac65d0bb22f625b1fc73380" + }, + "msi": { + "name": "sapmachine-jre-15-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B6/sapmachine-jre-15-ea.6_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jdk-15-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "639eb2b44c767dbe9d698f47a615aa8a8e557a1f6db19b6cbba62f3185c47733" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jdk-15-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "ef21217e6d72321d13035c973598bdb0cb3da55781ada6d3929848926042bac6" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jdk-15-ea.5_linux-x64_bin.tar.gz", + "checksum": "296031d9b7791c9f98bbb0aff4f441d9dc6527cffc831a70ce5028c4e53a6f98" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jdk-15-ea.5_osx-x64_bin.tar.gz", + "checksum": "e7982302e75423a16b071c8285fbdd3df4ba1eb3cf7fffa38e209cec70e1a92b" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jdk-15-ea.5_osx-x64_bin.dmg", + "checksum": "b701df4f8e185c7f4715438c736074e8af283271c7c2e72ca3a333d29d41a226" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jdk-15-ea.5_windows-x64_bin.zip", + "checksum": "7b7a0d3e02743250fc37f38eba048fd954f5b94ced097236c6f0beb86984b233" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jdk-15-ea.5_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jre-15-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "611870fcc0c3567f8f586199da723946996e579863d383e0a8ae89f160583dd1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jre-15-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "4e6a1977c24499a36c600c9eb11e44c39f09b25f6478324edf9d089cf4e6a3f5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jre-15-ea.5_linux-x64_bin.tar.gz", + "checksum": "ac0bfe5fb13753d206248748063158abaa5eb763c807e09efd0cd008648833b6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jre-15-ea.5_osx-x64_bin.tar.gz", + "checksum": "c725e1225384a2ee6d8637fd1eeedc0dadb5459acf200650c40c34f5f90cc579" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jre-15-ea.5_osx-x64_bin.dmg", + "checksum": "cb1dd5c32997e15dbd66bc47eccfe2e996f82c61987de82c05b982e1a54a8c24" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jre-15-ea.5_windows-x64_bin.zip", + "checksum": "54a0cf79c8afd701b3c3a84b7d3e75e099f95fdd469aa1bf15172323b8739aab" + }, + "msi": { + "name": "sapmachine-jre-15-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B5/sapmachine-jre-15-ea.5_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jdk-15-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "8544a1e0f2a22433d9ab7caba4c5ec3da189a56042afdfc43710a0a363f7b0db" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jdk-15-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "08ba3171ed11af5e5f94f912023528ef81bf3e33d6b4683a93ff535bc007557e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jdk-15-ea.4_linux-x64_bin.tar.gz", + "checksum": "ce897db6d3efeb09c97b2354642202be4eda3c9c76747c64310176d85c1436a0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jdk-15-ea.4_osx-x64_bin.tar.gz", + "checksum": "113f8a40a3cdba6be88fc6908b0ecb4f59590396ecb9a3037d1758bc46b7df42" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jdk-15-ea.4_osx-x64_bin.dmg", + "checksum": "25322b344a68e119dd9af02087e974f8d69eba017a7e2839eb40ae3a1ec8be60" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jdk-15-ea.4_windows-x64_bin.zip", + "checksum": "771f2798a95fba7a17c94c44574228ac9e5909dc02b2ef1983751d41f9a3b333" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jdk-15-ea.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jre-15-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "4af4aeaf230681016d0a6cda7a061be886434ef7974824c1883b8b22f219bd1d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jre-15-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "c1827eec4c48a02538f63b0f28a179a4b620aaeb70c0b6fa38c13b12c0a23737" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jre-15-ea.4_linux-x64_bin.tar.gz", + "checksum": "713ad5abd9cddafe77fd9ddbbd1334c73fc14a9f4901d828fa971e158fb1ec55" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jre-15-ea.4_osx-x64_bin.tar.gz", + "checksum": "e506d94dcb2470517be13d7909c8787c2c7255b55f0627fd736886ce010a1161" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jre-15-ea.4_osx-x64_bin.dmg", + "checksum": "29eab70d66e720b9b0b33a9bfabe0bd9cbbecff753358ea167cb94cffce0a516" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jre-15-ea.4_windows-x64_bin.zip", + "checksum": "ae806016d0f3a5efc31e48988c30d5a270436ae8a89c4b0362661ab422c314ec" + }, + "msi": { + "name": "sapmachine-jre-15-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B4/sapmachine-jre-15-ea.4_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jdk-15-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "bda7a64633d5bd68aa414d557a320cf93965d7d840e3101fae799971c161a1b2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jdk-15-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "5d5269bc87e75a5b04f66b0dc2c9f21d91c7b9918cf1d3df48bd14adaca6dd98" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jdk-15-ea.3_linux-x64_bin.tar.gz", + "checksum": "fb7874ca605618827ba403bc5e236cd2b15c62dd3659ba62ba80a80194e74471" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jdk-15-ea.3_osx-x64_bin.tar.gz", + "checksum": "9b63c6bc896e7179da030946bb81c06dd1e67d65a1f80699f2afb20a47338c0e" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jdk-15-ea.3_osx-x64_bin.dmg", + "checksum": "c55efc42b7cc94a2788c83db580ecde597f2eb437e69bf1551b39e7813b1c057" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jdk-15-ea.3_windows-x64_bin.zip", + "checksum": "c9f22ddead25b4ba00ed77b12270d5bdc3030f1395b355f9575d341662c2e433" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jdk-15-ea.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jre-15-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "4627c9ec4feaf73089d398b1480fcd0cb961403aa54a716d3f74716d588b0bbd" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jre-15-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "9d62c8bfb4e214d29d1c1cc79c1762527659a63181a3692becaee3d283e7fd68" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jre-15-ea.3_linux-x64_bin.tar.gz", + "checksum": "06503ea11df82a6d94a14c3460d78d9a7186287cf57c52d9bd15d94c1d831739" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jre-15-ea.3_osx-x64_bin.tar.gz", + "checksum": "3401e792286b2c29df81c354970223b5dbaf725701a1aeb170df4b87d1d81b3b" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jre-15-ea.3_osx-x64_bin.dmg", + "checksum": "97ae5e764de2b112c76c9be1e121117575731a7a5798810247dd67a7d1a3395d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jre-15-ea.3_windows-x64_bin.zip", + "checksum": "b10e7cab9094c74d7672d95e821727db72a4a81b14acf2e3ae18ff21f4144d44" + }, + "msi": { + "name": "sapmachine-jre-15-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B3/sapmachine-jre-15-ea.3_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jdk-15-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "64f752914652c7a6c79879c6b9a8cc30b5d605717b9c4190639a1b101073b9e8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jdk-15-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "ea0bdcd81f071da8962adc13d1dbd357dbd33a5846ed83ca02b0a109536ccac3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jdk-15-ea.2_linux-x64_bin.tar.gz", + "checksum": "e98c28a7a884485cc8bc8ff84681adfab47bdde2f43dfac561d79d01bf25fd38" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jdk-15-ea.2_osx-x64_bin.tar.gz", + "checksum": "dc952e43dcc4e31a11f1fd43aea9dcfb4ce56d3ec608edd476ea75b61d950698" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jdk-15-ea.2_osx-x64_bin.dmg", + "checksum": "98a0508623f3b228aa77df49bc9a1b9847cae77dc7ff8ba0fbc683baeac10fca" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jdk-15-ea.2_windows-x64_bin.zip", + "checksum": "9a22213c401cd63b9dbd56f9e9deadb02a82c289b76dc7a5def06d8a893e62ce" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jdk-15-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jre-15-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "b5ea38661cf245e3921c6ca5cdc6fda32fc883d063269d962c0c137e2ad13714" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jre-15-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "ff007489cdc8fd4af97934415a1cbe66e24dd98c8a348e3a576e4b8f85f42cb8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jre-15-ea.2_linux-x64_bin.tar.gz", + "checksum": "a5a32f060567fb7a895c4de71e150ae66eba3d64e16a913b90f071d7b30eb5ed" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jre-15-ea.2_osx-x64_bin.tar.gz", + "checksum": "89c145adab95ffead7bd5e6febe66b03d36b4411a4225149f0981fb1f351a18c" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jre-15-ea.2_osx-x64_bin.dmg", + "checksum": "0ba6c87ff06ce366e8c94223ed04911708fc65f0d4f6a578d0b89b8e4814958a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jre-15-ea.2_windows-x64_bin.zip", + "checksum": "40b6cd0dae30ef07f5b0a1cab9b7e5ebef6f804d27b72dc108ab2b276f2532bb" + }, + "msi": { + "name": "sapmachine-jre-15-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B2/sapmachine-jre-15-ea.2_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-15+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-15%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jdk-15-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "4ac29bece75f21fa9f82c3010a8d52dc4e3b5275a6589e3b55c2cdc2d09ada3b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jdk-15-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "608ab9da33bd24ace851edc1b1abdc6f062cb0840b2f07faab1a4f74fd5cd668" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jdk-15-ea.1_linux-x64_bin.tar.gz", + "checksum": "43fb834ed1bff6f10abe4c43b5fdc6c7e86176a5b21e6933459741877bdfd3e7" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-15-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jdk-15-ea.1_osx-x64_bin.tar.gz", + "checksum": "72f320b3dffee8073ef788ed144f83e63ef67cc02231525756ae6b53f9ca3cd3" + }, + "dmg": { + "name": "sapmachine-jdk-15-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jdk-15-ea.1_osx-x64_bin.dmg", + "checksum": "4429c1de61c2027f26458ac5eac824648f7991836382144517733b7de63b8d6e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-15-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jdk-15-ea.1_windows-x64_bin.zip", + "checksum": "81a56392f79f3cea0be6bf91485dec840e9a482dac6daa0946fc1775e46aa4e7" + }, + "msi": { + "name": "sapmachine-jdk-15-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jdk-15-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jre-15-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "e17224183b66d01e3560cba3379ca3953c3fc9ac05998b6aaf7ce7c291a20315" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jre-15-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "183075ee000e6c7c6e81ebf90efbf4b23de0f3f24a5b5a3a20a178c4eb73a02a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jre-15-ea.1_linux-x64_bin.tar.gz", + "checksum": "48f2d37ac2fcee0f08a27c13a8fd6421d4723f358276d1727d15b497be5f4237" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-15-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jre-15-ea.1_osx-x64_bin.tar.gz", + "checksum": "81614aacc3029fc295bdd4911629c19eb54bee93d266477dc3d1877072816925" + }, + "dmg": { + "name": "sapmachine-jre-15-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jre-15-ea.1_osx-x64_bin.dmg", + "checksum": "624714938a9d2a6d08b89decd6472221313d6ce79d592c0316b5e7c4382fb97b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-15-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jre-15-ea.1_windows-x64_bin.zip", + "checksum": "6093e3393557c4405ed2c084b630488ddaaaae7328750291b7987f8e53361b94" + }, + "msi": { + "name": "sapmachine-jre-15-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-15%2B1/sapmachine-jre-15-ea.1_windows-x64_bin.msi" + } + } + } + } + } + } + }, + "lts": "false" + }, + "14": { + "updates": { + "14.0.2": { + "sapmachine-14.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2_linux-ppc64_bin.tar.gz", + "checksum": "7bdda648051d97f8d35172f4ab9cb97ad79089047a37be4a0d3c113d9aaccbcc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jdk-14.0.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "3640783191855f18f08cc6e66a85a6f7d61c44c23cbdebd6a363b5d1363d0375", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jdk-14.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2_linux-x64_bin.tar.gz", + "checksum": "59d7b4b9866a3f9108937161ae9d9bc3885d4bab3f2ffac334c2170a258b7258", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jdk-14.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-14.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jdk-14.0.2_osx-x64_bin.dmg", + "checksum": "9c11682ba91c4285f8ca56682114a46c2e0bf723b65b81060b6f8403d681ff1f" + }, + "tar.gz": { + "name": "sapmachine-jdk-14.0.2_osx-x64_bin.tar.gz", + "checksum": "cdbd70ac46b65d9755ec130dee34466d4256b8830476dfd191b7c35ef49643db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jdk-14.0.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-14.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jdk-14.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-14.0.2_windows-x64_bin.zip", + "checksum": "8bc286bdce3a074a4707ea6e5c7bc3b1b1c2d083813129df44f6239b00f22fad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jdk-14.0.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2_linux-ppc64_bin.tar.gz", + "checksum": "c001b6de60ed70281b4ef10a7c08ce1ef30d21e4414141911ed2513e9b729e63", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jre-14.0.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "3ba30dc3b682e9474051d9d88b6ebcbc4f1cd46f83e94bf7cb4f6a1e39f5385e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jre-14.0.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2_linux-x64_bin.tar.gz", + "checksum": "06bcfeca40775fb062a4fe23e475ab8eae8c7537f9a702df5ca28009a80a5921", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jre-14.0.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-14.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jre-14.0.2_osx-x64_bin.dmg", + "checksum": "83539946edc09895c149d1e9a0a766a2a0e86739aad46a265b1592de63fb820c" + }, + "tar.gz": { + "name": "sapmachine-jre-14.0.2_osx-x64_bin.tar.gz", + "checksum": "4d68166592e3391937645673bc2c22534e01c4cda035c3f85310cd0e1450bd59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jre-14.0.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-14.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jre-14.0.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-14.0.2_windows-x64_bin.zip", + "checksum": "d67a65a8e475de6b6ac020c4e65869a513df67c4a2d3e1e2f4a4c9728e8f6df6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2/sapmachine-jre-14.0.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-14.0.2+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14.0.2%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "a93b38a51720eb451d960d3686806d689688874b659e20571d7d222b88faa7e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jdk-14.0.2-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "a2f4a6080771a3c4d8d5927df25ef3988574f7dec13d7cf150aca89720020b15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jdk-14.0.2-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.12_linux-x64_bin.tar.gz", + "checksum": "52097c88820be4c328d3a5f901c951b56bae03d844118a15c024879b08c9b4e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jdk-14.0.2-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-14.0.2-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jdk-14.0.2-ea.12_osx-x64_bin.dmg", + "checksum": "4ee49ee684a2479e7bd5ae7b18184585d4a380d0a68db98e0507af2b2750dee2" + }, + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.12_osx-x64_bin.tar.gz", + "checksum": "4211c68217cfe20567860d5dec5d8d7dd8381360a586da01673cf11ae70eabc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jdk-14.0.2-ea.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-14.0.2-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jdk-14.0.2-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-14.0.2-ea.12_windows-x64_bin.zip", + "checksum": "55dc3acd16d5a9ba34abf1c1bf87b063523f3cde705b97cf22853942ea0bcf8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jdk-14.0.2-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "a28d82a3234eeae09f07e9a3b26b2ae771a6856cb4a84d917325a868a89cd9e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jre-14.0.2-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "5361669a7436574b7dd772471051f0fcc8762dc13c13860a425d940f5d987a1e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jre-14.0.2-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.12_linux-x64_bin.tar.gz", + "checksum": "1e12cd6c50de6e785cb73004aeede2c5251d3f6bf781d00500999dd7d27617fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jre-14.0.2-ea.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-14.0.2-ea.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jre-14.0.2-ea.12_osx-x64_bin.dmg", + "checksum": "4b6472b00a69bf4cf48a66b601165e24ab241dbad8757599a9d6940352023e91" + }, + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.12_osx-x64_bin.tar.gz", + "checksum": "db7541891a0be957b8d962d7866124b397a6b8a80fae8f164d894eca1d0a98c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jre-14.0.2-ea.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-14.0.2-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jre-14.0.2-ea.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-14.0.2-ea.12_windows-x64_bin.zip", + "checksum": "8db6d13122ff2ad73856bc554898349d66a0ac19b91b5964eeea794a3c406c7f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B12/sapmachine-jre-14.0.2-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-14.0.2+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14.0.2%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jdk-14.0.2-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "6173f33d018889d3deabfe21c6a5d46e5f58f191fd443f0c1fd0423e2d20da17" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jdk-14.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "3c81f2449fd0ded0874344e46fa29958210e12922ac73ef1769983828e875634" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jdk-14.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "715775125968224c90769b4952630cbb6653d58f2476e6a389115d0e40998a39" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.2-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jdk-14.0.2-ea.1_osx-x64_bin.tar.gz", + "checksum": "7ad54045c699b6f208dfd6cf4134e16cfd8d3c5bc153258c10911257960444d4" + }, + "dmg": { + "name": "sapmachine-jdk-14.0.2-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jdk-14.0.2-ea.1_osx-x64_bin.dmg", + "checksum": "35aa2dc4b022c3695fee68e219e85214efab3aa5a12c4474fdfbb226d0107d9a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14.0.2-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jdk-14.0.2-ea.1_windows-x64_bin.zip", + "checksum": "4a6ad0644d5403456f927e70bd6ce14cf8aa09aafc35e0cef59d776a78e69d39" + }, + "msi": { + "name": "sapmachine-jdk-14.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jdk-14.0.2-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jre-14.0.2-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "0567f822bf4b28ef0b667d69fcde7f0bd1feb525c0f9936efdc9cddf90148922" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jre-14.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "b985378d499d0165c884254c8e2448ef910ecefd30f68143540e3874957aa273" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jre-14.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "7dc4c32df1a6b1b9a741eff04e67c3259f06fc7d5ca198375acb041b627aee90" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.2-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jre-14.0.2-ea.1_osx-x64_bin.tar.gz", + "checksum": "7dc16e1aaa00ff450bc2a3c38b3372d14638b49964d85753eec58b18815e9518" + }, + "dmg": { + "name": "sapmachine-jre-14.0.2-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jre-14.0.2-ea.1_osx-x64_bin.dmg", + "checksum": "834a1766e8feeed53f676f6af40a4c4d07eae57eb025ce646903ca320457868e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14.0.2-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jre-14.0.2-ea.1_windows-x64_bin.zip", + "checksum": "eb4b48a620c00e74776d6f79476ee684e5b3931faaee7f50884190e571f035ae" + }, + "msi": { + "name": "sapmachine-jre-14.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.2%2B1/sapmachine-jre-14.0.2-ea.1_windows-x64_bin.msi" + } + } + } + } + } + }, + "14.0.1": { + "sapmachine-14.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jdk-14.0.1_linux-ppc64_bin.tar.gz", + "checksum": "e722d24f67da4d929619db887fd83841a3d588fc110a1b345ecb340162e5a546" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jdk-14.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "925412701507b5d57db687363db886a65c11c1bff6fde9634af4ae9b60622fde" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jdk-14.0.1_linux-x64_bin.tar.gz", + "checksum": "08ce3075fb56156c84c0958415d5da277e1fa4f128c9829228126b73ab76e092" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jdk-14.0.1_osx-x64_bin.tar.gz", + "checksum": "572f42aa097c41663d80061c8a6a0cca81f1964b2fd16ca2823f81c7182713d4" + }, + "dmg": { + "name": "sapmachine-jdk-14.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jdk-14.0.1_osx-x64_bin.dmg", + "checksum": "70627d74dafb9d21a766365e3184b872a160ec17099c5fbc41926c6e9ccf4c9f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jdk-14.0.1_windows-x64_bin.zip", + "checksum": "56f5bb29f8ab982fc78a159a651fe4867cedfb49d87ae5c594ac52ed8f8b79e4" + }, + "msi": { + "name": "sapmachine-jdk-14.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jdk-14.0.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jre-14.0.1_linux-ppc64_bin.tar.gz", + "checksum": "64b1a49a017dd3f73b4fc4aa9029d2ffbf10415f85301ec631d80a96977b74c2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jre-14.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "58c4cce03110f54a7ffdfff7eff16468297baabd86c3d27cd78a660f83962ec6" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jre-14.0.1_linux-x64_bin.tar.gz", + "checksum": "7d96247d1268f4ec7eca6e87851f3010f6d4d3cc905e1c046c918deea79b3ad5" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jre-14.0.1_osx-x64_bin.tar.gz", + "checksum": "8515e902f8cf1ab512e30873a760c044fa9d8ad276b7c717e0c36eb70ea8fc92" + }, + "dmg": { + "name": "sapmachine-jre-14.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jre-14.0.1_osx-x64_bin.dmg", + "checksum": "5a113f2cf9fc9e47aee4511544da7fa9d8658f39a95065d51ba3a740cd79b5f8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jre-14.0.1_windows-x64_bin.zip", + "checksum": "02e81152f053158002033865e4f2e14ed88e54b9ff8aa2bbcc6623bc30eded39" + }, + "msi": { + "name": "sapmachine-jre-14.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1/sapmachine-jre-14.0.1_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14.0.1+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14.0.1%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jdk-14.0.1-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "b10fb1e089bea77f470a65d2094dc3c37d64ac2e1677ba82266da37f21cfe9bf" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jdk-14.0.1-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "fe1854e448b1aa45642879406ae986158763050ddeb43830595fdc060b4d13d8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jdk-14.0.1-ea.7_linux-x64_bin.tar.gz", + "checksum": "f91cfd366fb20d8ac9e2409560975a8c99bd0ac053ef5d8d790ae8052acf23f3" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jdk-14.0.1-ea.7_osx-x64_bin.tar.gz", + "checksum": "9c56eb25c198613bd57c3e60efbced4e5508476f3b9074f3ea15657bcfd8b5b8" + }, + "dmg": { + "name": "sapmachine-jdk-14.0.1-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jdk-14.0.1-ea.7_osx-x64_bin.dmg", + "checksum": "4001a28d6956a83bd23151a7bd1f55185a3219d9db488bb3575770d46308c529" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14.0.1-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jdk-14.0.1-ea.7_windows-x64_bin.zip", + "checksum": "433e80711a1c5c7b80cffa99bcbe7524629894e0a914e0f19aa65a4059c50004" + }, + "msi": { + "name": "sapmachine-jdk-14.0.1-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jdk-14.0.1-ea.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jre-14.0.1-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "0f9e485a2d82edf702cc8a0a4b4de63577ffa70cb34c18be27ceb35348b13009" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jre-14.0.1-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "21ecc74560a515178116ccc45f8d366f4ac0e32ca77c19f12bf19b2ed4136ae0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jre-14.0.1-ea.7_linux-x64_bin.tar.gz", + "checksum": "da22079702a7c1b37c79030f9c8799085da38bd64ec18a62cc7924a3666cc952" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jre-14.0.1-ea.7_osx-x64_bin.tar.gz", + "checksum": "72f5c9b7a3b64ac9ebfdeed981c52ff6e9190e09db1e5f4ea7b1cb73265081ab" + }, + "dmg": { + "name": "sapmachine-jre-14.0.1-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jre-14.0.1-ea.7_osx-x64_bin.dmg", + "checksum": "556a10a0769867468e7c400e6f133d2b4e4238e84ffef078757e996d2edf136e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14.0.1-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jre-14.0.1-ea.7_windows-x64_bin.zip", + "checksum": "51b1bde3f9cd144f09515385569db4b3c4eec33ea44b7b20aa517e811b50cd1a" + }, + "msi": { + "name": "sapmachine-jre-14.0.1-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B7/sapmachine-jre-14.0.1-ea.7_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14.0.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14.0.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jdk-14.0.1-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "15a212739b1980d1cc8f27189fc5f1c240f6e6a4a6aa00aacf9e2646ff535ea0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jdk-14.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "b18664a781625d4ff6365ed766227d6be81ae8c9c4bf5f0f19559dd65254f421" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jdk-14.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "1ef2562bb3f4075a80b9979c563086b9fa10d85e0f99f04ede1900aed35816ad" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14.0.1-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jdk-14.0.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "7913e638644fbfbf377e4d244af595feb86cdf2a4ba869d2ab4455e91e003eba" + }, + "dmg": { + "name": "sapmachine-jdk-14.0.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jdk-14.0.1-ea.1_osx-x64_bin.dmg", + "checksum": "60ab04196cb7693cac18ef61f1ad7432679794092744b6ba68a345cf2b9a0d4f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14.0.1-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jdk-14.0.1-ea.1_windows-x64_bin.zip", + "checksum": "367275478be27b42c49eebb145809054d23d5e8d246f13d83f3cc59c9c33dd41" + }, + "msi": { + "name": "sapmachine-jdk-14.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jdk-14.0.1-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jre-14.0.1-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "a80be9827a4785f97378345a2e37980b1ca26d30bb525660489411fb8979ed29" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jre-14.0.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "0271f75a521262bcf537bda8eaec69d4a0bfad6753ad28cc53763cf63c9dd74a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jre-14.0.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "5627609ceb829f12904abd8ddc7f9a5cf515b230385f410b9e57db07dc34e170" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14.0.1-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jre-14.0.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "681ff1588aec70cb355aea3e4fe9a52ddbe9a32d2fc386afaafb1a50355a96be" + }, + "dmg": { + "name": "sapmachine-jre-14.0.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jre-14.0.1-ea.1_osx-x64_bin.dmg", + "checksum": "af4cad8e3bd00cc5b49af64458610d02d59f11fd8c3bf402b116e8aa254882ce" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14.0.1-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jre-14.0.1-ea.1_windows-x64_bin.zip", + "checksum": "dd266973c34aa32667cb4d9018b6566b98a4e20a63b0ef9041c0fa4e8c83eb6f" + }, + "msi": { + "name": "sapmachine-jre-14.0.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14.0.1%2B1/sapmachine-jre-14.0.1-ea.1_windows-x64_bin.msi" + } + } + } + } + } + }, + "14": { + "sapmachine-14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jdk-14_linux-ppc64_bin.tar.gz", + "checksum": "e87f074c62f54d40237de2b397b92b7420809b222f916e5f3176865b393cad6b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jdk-14_linux-ppc64le_bin.tar.gz", + "checksum": "744914285ea9edff438316980b87d9dfeb9d70eff02b35634296827aa511f2a4" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jdk-14_linux-x64_bin.tar.gz", + "checksum": "0fc03f9ed9c56672e77192d2ac9100612cb972103ba2e4338f2a136a3458bbf0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jdk-14_osx-x64_bin.tar.gz", + "checksum": "7567b612062874be2a01b8ad821db4a3370eab8811189ac117eb946a0fcdee6e" + }, + "dmg": { + "name": "sapmachine-jdk-14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jdk-14_osx-x64_bin.dmg", + "checksum": "28ae77dd93bc99733ef16cc99d7e2dc5b8c0a3c5e38507a2235861c3882b7460" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jdk-14_windows-x64_bin.zip", + "checksum": "a9ae45e0869019e0247cf67dbd6bd26a53c9be7bbe38abdbeeba219cf0d8c54e" + }, + "msi": { + "name": "sapmachine-jdk-14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jdk-14_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jre-14_linux-ppc64_bin.tar.gz", + "checksum": "48f26e55b3d4c119a7f55aa090d24b47a0639631a26e34b0e3ac1a578f7ae109" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jre-14_linux-ppc64le_bin.tar.gz", + "checksum": "99a3effdceed4c7a0e399a03be1ae3a8fefaf97d9be6d65ccbdc19714b5c2af1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jre-14_linux-x64_bin.tar.gz", + "checksum": "2b7af29036a22e67be162e6306c1eb922c55afc846160467d1c2cbd0e48f456e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jre-14_osx-x64_bin.tar.gz", + "checksum": "85b53e92c1cc346218e6a0d457bafc10530c6564ed57365b08be250d2daae172" + }, + "dmg": { + "name": "sapmachine-jre-14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jre-14_osx-x64_bin.dmg", + "checksum": "6fcfc20a29fe9dda8ef5ebad7791bc468087dee1426d8ecfd3443a1e8c05c271" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jre-14_windows-x64_bin.zip", + "checksum": "be5090c02588594542a007c23f552803a6dd9eee2ba330e34da8b243fe0b0414" + }, + "msi": { + "name": "sapmachine-jre-14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14/sapmachine-jre-14_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B36", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.36_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jdk-14-ea.36_linux-ppc64_bin.tar.gz", + "checksum": "46115d4ab4e81627317f643e0e49359a3f7e7290388cd59ce92c72c14000f49a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.36_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jdk-14-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "30563e907874ca40cafae79a2b7dd82063b5b5fb0a8e07f62dbab60bbac6aa6a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.36_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jdk-14-ea.36_linux-x64_bin.tar.gz", + "checksum": "5569d14d699a70da16940cd65a78d80c423b388b945b0eaf6e7b2a5277493962" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.36_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jdk-14-ea.36_osx-x64_bin.tar.gz", + "checksum": "78469f17c22fcd52b1f63d4f9019bb7abf5d6d2fb1a96c299c9a78c37cf93fcb" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.36_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jdk-14-ea.36_osx-x64_bin.dmg", + "checksum": "905da29e72a251b63784ee662220b5862239288da0807fbb2387eb70115c4caf" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.36_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jdk-14-ea.36_windows-x64_bin.zip", + "checksum": "f349152421593cc4378766c88a4605dab563adea8b904fcae4efebae81369c22" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jdk-14-ea.36_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.36_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jre-14-ea.36_linux-ppc64_bin.tar.gz", + "checksum": "b5797a4599b44ee1b60e2fe3a6d4ac5b9e6ddaedf39cce62980a39a05b70232b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.36_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jre-14-ea.36_linux-ppc64le_bin.tar.gz", + "checksum": "e11c05f5b83a72137ba8dde2641b09636d97e51d17a7579deb86f820b0a2d62f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.36_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jre-14-ea.36_linux-x64_bin.tar.gz", + "checksum": "4dde5d2f2554e8899c5f6d19b5bbaef5586fd667129bf8e2b832fe5e07e97e06" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.36_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jre-14-ea.36_osx-x64_bin.tar.gz", + "checksum": "8e38e1657e5cc3e765a6b00accb7bb7b48b7273bec6aed06e1e891d84597be08" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.36_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jre-14-ea.36_osx-x64_bin.dmg", + "checksum": "2dd26637130a435e7e738711af133d35480d15c71e4fb51874b64b8dba8afaae" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.36_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jre-14-ea.36_windows-x64_bin.zip", + "checksum": "f32a6653a5d01a685ca000d1fbc5548303af1909ce8dd9be36fced207ea955bb" + }, + "msi": { + "name": "sapmachine-jre-14-ea.36_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B36/sapmachine-jre-14-ea.36_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+34": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B34", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.34_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jdk-14-ea.34_linux-ppc64_bin.tar.gz", + "checksum": "4c586e4837fae5a160a8dd2c6ff702ab5083eb9200a1dad668718d7112e55bc5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.34_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jdk-14-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "90a1a978bec1435fce337452b3514eb18083ed789582cbacf60126e71478c5f3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.34_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jdk-14-ea.34_linux-x64_bin.tar.gz", + "checksum": "ca62b94faaebe349520fd040319a4827bb6852a49572b44544770bca60e713b4" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.34_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jdk-14-ea.34_osx-x64_bin.tar.gz", + "checksum": "22ae76c9bdccd3777b7a477180e92540df40bd97a2a85f6361c83106252904d3" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.34_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jdk-14-ea.34_osx-x64_bin.dmg", + "checksum": "aba301d5138e083be3ac63c02691990742cfc38a5dec825b97ebdfaf58aa0e41" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.34_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jdk-14-ea.34_windows-x64_bin.zip", + "checksum": "5cf8fbca97c8da608f6190548524acb569e812b39a7233306750d5f0469eda83" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jdk-14-ea.34_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.34_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jre-14-ea.34_linux-ppc64_bin.tar.gz", + "checksum": "2fedb9ee8b140ba658631c28e235f9e1deb2793a33aa7b4231a1821ceb36f081" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.34_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jre-14-ea.34_linux-ppc64le_bin.tar.gz", + "checksum": "34b008d509d0b2f7ef92696bbf0c1e9f373a07d5a78886935d28f178cf98c5e9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.34_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jre-14-ea.34_linux-x64_bin.tar.gz", + "checksum": "e6f84ffbb492adf7f2607ac84404fe74f071426f803a5515c792454e7d1a3ef3" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.34_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jre-14-ea.34_osx-x64_bin.tar.gz", + "checksum": "8249b7ce1698fda7a169f38b0d1b27ee71dff71b98c8b9a2e41ba2bc80aa81cf" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.34_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jre-14-ea.34_osx-x64_bin.dmg", + "checksum": "8c256acb42ce2c99dfbf16fd5d3201268e3d6da5bba62e9ec33e614759efdcf6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.34_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jre-14-ea.34_windows-x64_bin.zip", + "checksum": "711cdad10f5bf842aef94d9148f6eb4167117bbbba8862b2a02d09e68a7207e5" + }, + "msi": { + "name": "sapmachine-jre-14-ea.34_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B34/sapmachine-jre-14-ea.34_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.33_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jdk-14-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "b9460a4081bacc90df97eb133c2c4c84ab09e61a27c2567b75d9565cde62a155" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.33_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jdk-14-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "2bc252f3f46ce7cb261c7fe0099fbb41f44ee16819e4411f2c6abfe4869a57f0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.33_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jdk-14-ea.33_linux-x64_bin.tar.gz", + "checksum": "6652722b96de430b03ebdd2f0c9e1eccecbfd5cd306877479215148ae215062b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.33_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jdk-14-ea.33_osx-x64_bin.tar.gz", + "checksum": "16b203a1c135758d5c8d6eb2179f31192c5d90f703cf7cb447b74001ee4a7d1f" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.33_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jdk-14-ea.33_osx-x64_bin.dmg", + "checksum": "92526b868930293dc1e12a4d28e1d9a5fc1787a291c894c9397fa1862cb3be0a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.33_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jdk-14-ea.33_windows-x64_bin.zip", + "checksum": "f06286804885f1119ae740fb7bf3a3d971e677c692c13df7a225e00357cfdd50" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jdk-14-ea.33_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.33_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jre-14-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "303376e98cb78ed93e1a15f87e3080f5a70d974140c25bfde5550a5ff59eff68" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.33_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jre-14-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "b84ad2a6e5f25dab56ff112099cf5e248850c05c80e2bbae4025f4370e9a9f66" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.33_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jre-14-ea.33_linux-x64_bin.tar.gz", + "checksum": "658e65be2d5db2e72b9e7849b5283debc8de7a33e2ca7dfd159d0da4037ac5af" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.33_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jre-14-ea.33_osx-x64_bin.tar.gz", + "checksum": "f1994d032491176b759ffa624a7843652714628313ef586eac8e3e31e6712bee" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.33_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jre-14-ea.33_osx-x64_bin.dmg", + "checksum": "01c95e749201211956531390f014be704ecdfd365c6bcbf10f352a6865bc684d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.33_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jre-14-ea.33_windows-x64_bin.zip", + "checksum": "70180669c8b8f56e7092cc74f4424c40945f6a788b1e98048187f8c2ec3b634f" + }, + "msi": { + "name": "sapmachine-jre-14-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B33/sapmachine-jre-14-ea.33_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.32_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jdk-14-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "2b113639d1d392bed4a3482e2a9f7e071c9a2ee37ae500e5a2fc8d7bba38e4b4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.32_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jdk-14-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "c2a306ab508397f4a5da1ba3c1ef70c5ea987faed88e34e6567d5962f9db58b8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.32_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jdk-14-ea.32_linux-x64_bin.tar.gz", + "checksum": "0c71d061d0a3192babb7d277501a0efd15b1d1c994e7e3c0690e50713c5a1eac" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.32_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jdk-14-ea.32_osx-x64_bin.tar.gz", + "checksum": "e0390f2f33c4fe9849dac3ab9bdc5f990ac9c8e1e5c08298fe4d48975f732711" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.32_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jdk-14-ea.32_osx-x64_bin.dmg", + "checksum": "c8b6d601e2c3fbb340b00a9d44d782f6ce85a05c26cf2fd0045aa1801f730adc" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.32_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jdk-14-ea.32_windows-x64_bin.zip", + "checksum": "d11665ceecf7b6b348eea9738b1cd3a0a676515474464ce7934c9306c2879efc" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jdk-14-ea.32_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.32_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jre-14-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "1bb651253b7828e1b8ef569b8231013de6f1baf7228824fdd431713f1cdfbf74" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.32_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jre-14-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "314d722abead266c7bdc3309dec4a6436e4dd24c52221625daa7a953a637210f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.32_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jre-14-ea.32_linux-x64_bin.tar.gz", + "checksum": "e17dc6a0d4f773a467ff812af55acd77b6266e47a0903294c49a17da5f54048a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.32_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jre-14-ea.32_osx-x64_bin.tar.gz", + "checksum": "f9f1a48629daab73f91ba59f16ffe803b379488b2f3b7d23ba6330177957907a" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.32_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jre-14-ea.32_osx-x64_bin.dmg", + "checksum": "506dbe4c1f0bbf1ecdf6f774422d0647ba6cb578a976d67f30b7e3da8a12d7ab" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.32_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jre-14-ea.32_windows-x64_bin.zip", + "checksum": "e1fedd7163db8bb02cec2622a81e1d15e2d93d7a34fc57f3ec09e14e75045de8" + }, + "msi": { + "name": "sapmachine-jre-14-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B32/sapmachine-jre-14-ea.32_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jdk-14-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "5ade74baad10170ca4b9bf47675f002072beedf7919d301ae0d824386a8bfeca" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jdk-14-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "5f354c26279d49401573dd66c038ce257d4ae4ab0a3aa145990987e4f1d351f9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jdk-14-ea.31_linux-x64_bin.tar.gz", + "checksum": "ad9d027b7fd01a3fb092a6ce486b3c4fb49040f1cd73c08cd994624d99c96f9c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jdk-14-ea.31_osx-x64_bin.tar.gz", + "checksum": "fa5c39d116ad72ce0ea3c9914bdb2a2ebdc18e8abc73125b319b6f3258174bcb" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.31_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jdk-14-ea.31_osx-x64_bin.dmg", + "checksum": "e232b9ec3ef7dfffb2ee7536a5388bc4a8468e69ecc3be18afb765e5a8233293" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jdk-14-ea.31_windows-x64_bin.zip", + "checksum": "732cfc3846490a83c04a2bcb1e1b3e0e56c8132d2652350cdb2c850ebefd6aad" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jdk-14-ea.31_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jre-14-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "5e9bbec213b7be9b730ff499d2982529b86d2fb6157092dbf057f510a1b42a5d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jre-14-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "ee1ea587677a3855841bc7fdd0ae8db8ab68b97c83a9cba90d7162ed0d577a8f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jre-14-ea.31_linux-x64_bin.tar.gz", + "checksum": "b9ff02b258d33acdc2e2a7897ba3c838513b63a23c752a0fd692cd2313564273" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jre-14-ea.31_osx-x64_bin.tar.gz", + "checksum": "1a493425005f38bd75c591a1fd8a347fd90466992f9f254681a4b1b9fbebd48d" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.31_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jre-14-ea.31_osx-x64_bin.dmg", + "checksum": "b5712bc63933f23f54538a2c7440b7380cbe58953b6b8b986bb0fd977f336bc4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jre-14-ea.31_windows-x64_bin.zip", + "checksum": "483d3fc908f29f7aa04fd6b655eaae8319841cdf174d91d7638bd1a42d3ae4dc" + }, + "msi": { + "name": "sapmachine-jre-14-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B31/sapmachine-jre-14-ea.31_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jdk-14-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "6e34f7b5dc4e51aaa901604b660a7fc99ef697607d47b2a978dcf66a25506c68" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jdk-14-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "4c391af76358a700850935b5ad3c0612a16d7ac5dc3bc2ab4917e8a00ce1878c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jdk-14-ea.30_linux-x64_bin.tar.gz", + "checksum": "3f96bf6b545d52d8b3cb5b06b93e5efc3d996477e509e515dbeb6de604d2efd0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jdk-14-ea.30_osx-x64_bin.tar.gz", + "checksum": "4fd8a7b660960e84f8be68b1fb4bc1ef61b166400ee54be9982605be482e1e19" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.30_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jdk-14-ea.30_osx-x64_bin.dmg", + "checksum": "c3faca345c27bda0b70874fce8f762040b4522ec2d4962eace6b99808d8ebd15" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jdk-14-ea.30_windows-x64_bin.zip", + "checksum": "b3cc210485f761dee4280b4f0b16af9163b15ce1f0b3d286795a638a73d3c469" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jdk-14-ea.30_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jre-14-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "625e4d2a21bf20cc9b33c252e6211edf5899e040d86c1e3afe812a4b11bbe83e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jre-14-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "8daf5b8c26c1c909a90456233cc20bbab900ecd463de14e3846d85dbc31a37ae" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jre-14-ea.30_linux-x64_bin.tar.gz", + "checksum": "44d784bb32e16b53eb70f6223aa9d60a3b6f941eb32c7bbd8863efaa8bd0b57c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jre-14-ea.30_osx-x64_bin.tar.gz", + "checksum": "6e5f9caa9ed5479c9dc14f151b15c4b263340ce67dac261a66d39b815114d40a" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.30_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jre-14-ea.30_osx-x64_bin.dmg", + "checksum": "56554f086b1273b329daaf8e02642344dd6fa137d7dc201aa8e456d8c51fa9c0" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jre-14-ea.30_windows-x64_bin.zip", + "checksum": "b365d957b699f55778e3137a081e63f6bdc1a6d9aba85a76d434d022b3df6390" + }, + "msi": { + "name": "sapmachine-jre-14-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B30/sapmachine-jre-14-ea.30_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jdk-14-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "5c72fc7d2885d3211d31948b660e9de0ef3365ac1b3cd1e0038f9f943eb8cb5e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jdk-14-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "d5e3bb819e68bb234a5b850357defaed68c821bd345cab0f0e1f93801516b1bc" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jdk-14-ea.29_linux-x64_bin.tar.gz", + "checksum": "f27c61c9c240d4fff563c0cff0c69f50f11cd48ee4c147eace0e5dc5c01e6408" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jdk-14-ea.29_osx-x64_bin.tar.gz", + "checksum": "aef6d3c4ccbdf12412698f14c78d4d7dad2b1e2818e9d5f6af0462e6644b081f" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.29_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jdk-14-ea.29_osx-x64_bin.dmg", + "checksum": "4175dba43609a32d5dcd3cc069ee91c8066ff70c08040082c0adef4796af096d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jdk-14-ea.29_windows-x64_bin.zip", + "checksum": "09b5195e146f5b731d2e02cd498883cc5a9a7e485cdb73fbca6c27d1c0506273" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jdk-14-ea.29_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jre-14-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "455972149cf017aab86d11606372f50ceda35ee69c55e6d4be1b3d764abccff6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jre-14-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "f05296fa882ed30bef3a4a52189305491026b9a1bc286e888ca7af5dc0189859" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jre-14-ea.29_linux-x64_bin.tar.gz", + "checksum": "62bb19888631f509c22725ec05c9e9015c9d4dbf8f91675722f7b69e54693835" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jre-14-ea.29_osx-x64_bin.tar.gz", + "checksum": "23225f55c5d6b403c8902eb105b5ceddb5c308751ea77a5f0ed0490724825a4b" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.29_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jre-14-ea.29_osx-x64_bin.dmg", + "checksum": "c9ed439f6720ed2359aa27b9da47bed271dcfd766b426f624225ff0aa6bc38b6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jre-14-ea.29_windows-x64_bin.zip", + "checksum": "20f8f48be3f015c7829e9e3a690c0aa5c0d8134f23ce317065c3931c9969bc95" + }, + "msi": { + "name": "sapmachine-jre-14-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B29/sapmachine-jre-14-ea.29_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jdk-14-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "4802028f73138129119defef37d532f1d5bbcd2e718effdf9b30cf82c7e35375" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jdk-14-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "e570f3300c1c99d4a021890d7e7ce9ae8f7ab85f90c4d5775f1e5d0508da0c04" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jdk-14-ea.28_linux-x64_bin.tar.gz", + "checksum": "ad61ffca71b2dc4312c764438b77b01beb363885865c5471dd1e68defcd72b1b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jdk-14-ea.28_osx-x64_bin.tar.gz", + "checksum": "f59b4d80053b098172de81e45913a957c0db81e93b08ffeeef4918a8d241401d" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.28_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jdk-14-ea.28_osx-x64_bin.dmg", + "checksum": "4ade2a08bff212e7ec7eece128c798878b6ecd88c00ca27fbb3436a7d0d76d0c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jdk-14-ea.28_windows-x64_bin.zip", + "checksum": "14a9da3898b0bc6cbaf9e4f6b2f7711518122fa83bb32167378ba37e1848f37f" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jdk-14-ea.28_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jre-14-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "b7128d160f67f97ac9878dd0dced1f1521b78d9eefa05ded59d15edd7bc4625c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jre-14-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "847b5c4b80546106dffcb6c1a0c5a9d8296a6e6c727357221ce3333270521239" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jre-14-ea.28_linux-x64_bin.tar.gz", + "checksum": "9ad18ee112d501047f7cc1ba898e26f42f1fd68cf168b874a6e469a51852352b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jre-14-ea.28_osx-x64_bin.tar.gz", + "checksum": "bb022351a0a62d8108707b8450c6c36c1ba268d04986d2853ddb2e2d7add5cf9" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.28_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jre-14-ea.28_osx-x64_bin.dmg", + "checksum": "79bf64f1ee57b08a2014a71d44007ac9ad7d732582698359619a6a217dfaf007" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jre-14-ea.28_windows-x64_bin.zip", + "checksum": "d5900cdf586637810a5d391fe1932f733f162593730814590e3bea37336751b7" + }, + "msi": { + "name": "sapmachine-jre-14-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B28/sapmachine-jre-14-ea.28_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.27_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jdk-14-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "752f47e7ef7c464c5bac58498692e562ddea500007e42e7fe223cb5d33b7375e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jdk-14-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "eeabfcf2bd467c1eafadff140ab52a775546169b3c4892679c6649babc61496a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jdk-14-ea.27_linux-x64_bin.tar.gz", + "checksum": "fac4402fc6aaed1572ddedbe55f798d9f7f67073093651c40731832f8cff2afe" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.27_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jdk-14-ea.27_osx-x64_bin.tar.gz", + "checksum": "88626a2e7816b79cb67862ef3641333bccee1c35245461c750c79856cc84ead2" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.27_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jdk-14-ea.27_osx-x64_bin.dmg", + "checksum": "73781c63f10d9e4312222de9edc7b715416ad73d40566358798b22c3f65f78cf" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jdk-14-ea.27_windows-x64_bin.zip", + "checksum": "a0b879fdf1eb4b451dcfe653285a48f8468d0f0c0bb0bd0f289f8ab40fc39265" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jdk-14-ea.27_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.27_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jre-14-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "eef5cdab37bcbbc4b6ed3020c1a3614850f1ff2ba081e7086056303b20dd7cc9" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jre-14-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "1bbb9f66b35b5d4a5e02fd9fd89a490686ff68e222b0478bfe1c82600c97fb9b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jre-14-ea.27_linux-x64_bin.tar.gz", + "checksum": "9a184d254f7f7604504e0bb0212fac6cf775c4483ae8db342f4ed31aaf2e8fa0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.27_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jre-14-ea.27_osx-x64_bin.tar.gz", + "checksum": "3b0daca013f13ae98759090413ab267edf318511853cc70e470713e21d9a51c2" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.27_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jre-14-ea.27_osx-x64_bin.dmg", + "checksum": "d5e171191067f58612f6f4db04569ad438d88bf42a976a5244acc6ed250ce3a2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jre-14-ea.27_windows-x64_bin.zip", + "checksum": "f0cbc800fadf71314278b41d0b91c9983d57fbb044929c52818dba532ac8fe42" + }, + "msi": { + "name": "sapmachine-jre-14-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B27/sapmachine-jre-14-ea.27_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jdk-14-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "ebdb3f7f00768081927386e05dd981d97055f19dcbb4b4e89ea8e5f7b23cdfcb" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jdk-14-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "b578af55c2aee3f4af074f0a9bb5486e19d925f49a7984624a14a9399dd05a46" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jdk-14-ea.26_linux-x64_bin.tar.gz", + "checksum": "a08fc731b10f1c6f9541dc9d8b91e671f8ddaf6b8fd490a687dd69282a76d95a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jdk-14-ea.26_osx-x64_bin.tar.gz", + "checksum": "e0f7f55311f881eacc16e339729cf1b1889f5a6d57e62082d4ef479b2e136d9d" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.26_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jdk-14-ea.26_osx-x64_bin.dmg", + "checksum": "c07f2f582058142826e5f610a66ef971121acca69b3d820a3a8c338d04d80674" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jdk-14-ea.26_windows-x64_bin.zip", + "checksum": "f12c7481abb5d334c72b08c356a25ef63005095261efa618615f5d0dc1df43fc" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jdk-14-ea.26_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jre-14-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "3de4953900130543e1ccd9546c9b676a68690b834f352e755676aa9e456bc9ba" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jre-14-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "26bd89fc31aa3b56f5991b212611145879898fd6e2d9dcbd70876fa043ff7312" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jre-14-ea.26_linux-x64_bin.tar.gz", + "checksum": "4a2022ccbe343c8bd081686243fd6c65e8e082f8f3e2f74f71845a15c343fdea" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jre-14-ea.26_osx-x64_bin.tar.gz", + "checksum": "885fc4abd7279fe4cd5d837d534e7b7a91b26da8001f7240e9e7e341fc319f1b" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.26_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jre-14-ea.26_osx-x64_bin.dmg", + "checksum": "0829a4674060ddc46d8dd2feddfc3a263da1ec90c1e8665f24191d5a472d7797" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jre-14-ea.26_windows-x64_bin.zip", + "checksum": "8141f7177d67b2908b0c00994729ea6e7e30ae327307774e60ac025c25a9849c" + }, + "msi": { + "name": "sapmachine-jre-14-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B26/sapmachine-jre-14-ea.26_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.25_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jdk-14-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "3166d75da0e65a6033fdd68f655db8c8354cdf4f8cce7e3503271d0c4904b6a5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.25_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jdk-14-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "3721be39637e432250149f819dab26043430f88b752ba48f7a5b724ea6f822fd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.25_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jdk-14-ea.25_linux-x64_bin.tar.gz", + "checksum": "e7a3ac95d7fe216b9a1df6106948c50581e22543b365091c35ed36ca404dd527" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.25_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jdk-14-ea.25_osx-x64_bin.tar.gz", + "checksum": "62f12313fa47bb3165ccf229ba93c24c08ed44301715853bac6f69b2e31b4904" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.25_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jdk-14-ea.25_osx-x64_bin.dmg", + "checksum": "46d112e9171f1e87d1aed752e39e85e44c0e8298c339b8b00dfb64d96b70ab31" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.25_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jdk-14-ea.25_windows-x64_bin.zip", + "checksum": "d59c34e979cc5bd3bc9016e62271d822f9e1ccde875b412653924b58239552e8" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jdk-14-ea.25_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.25_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jre-14-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "b639db1dc7f6967325f4816a50ace6d1268e24949ef56c690673e1310ac2f282" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.25_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jre-14-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "95b5b2e556b5133ae285c3978a1bf31ba04a1a353f7f9d7238651e91db6fcb3e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.25_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jre-14-ea.25_linux-x64_bin.tar.gz", + "checksum": "f52d8e125d533ca422e702ad5495f2efa625bf689f90d5e29023a75bc88dd729" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.25_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jre-14-ea.25_osx-x64_bin.tar.gz", + "checksum": "e9bc355ca4ab2bd76a2f51d4728ff111cc41173f63e975a5d3b6a1641ac85393" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.25_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jre-14-ea.25_osx-x64_bin.dmg", + "checksum": "e3a9b81c441f33c1962031d1ae057d106cf4c3cbe14070d5a5ea72669bfad57d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.25_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jre-14-ea.25_windows-x64_bin.zip", + "checksum": "3e177e47e527adf74717e630d1f3a99e5542c8dc4888cf7541a24d8e194da8fb" + }, + "msi": { + "name": "sapmachine-jre-14-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B25/sapmachine-jre-14-ea.25_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.24_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jdk-14-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "2c8a037c3977e1d47e6ea1575627283a0713ebfd00c803c5eee2cfd887bb6f53" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jdk-14-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "8492cf9cfc2f6860c3e43e42bd029e4aff3f414f1d94fe0d93623c604756132c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jdk-14-ea.24_linux-x64_bin.tar.gz", + "checksum": "9899ce2b5b52fe123ed7511a092a541f727f3ac726e37fab8fb2a5d7c8d40904" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.24_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jdk-14-ea.24_osx-x64_bin.tar.gz", + "checksum": "e96de464097edd946a9dbfc9d27de6bf2b4c6c01e94cad1e5590f640159c9bda" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.24_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jdk-14-ea.24_osx-x64_bin.dmg", + "checksum": "384726608a529acd0bca63ca2acee6c39338fa03b2bed05a2927ff3e527306db" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jdk-14-ea.24_windows-x64_bin.zip", + "checksum": "f4ba90cb16ad858116750608bbef7d826629eaff63bb08788c60d4941a9b48d2" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jdk-14-ea.24_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.24_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jre-14-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "2db260563558b667d385efab145e328df131cebc6d881136477c6093d7164bf7" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jre-14-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "69d70ac59106d2f67fcf7b74090aeb1f12451f48a1cb51baf11e85fcb6b75b83" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jre-14-ea.24_linux-x64_bin.tar.gz", + "checksum": "97574d26403ee47c044e9f6d1002197f0bbe312151e15a900f50b50c576be99b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.24_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jre-14-ea.24_osx-x64_bin.tar.gz", + "checksum": "84415a1212be8e765f40b801de30d52cf83861e4216c9b8014ae11952d7c0de9" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.24_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jre-14-ea.24_osx-x64_bin.dmg", + "checksum": "30d7fd62287871eebdb85e483aa9a6e07d90dcabd622f0d3d5a0f074e808b04e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jre-14-ea.24_windows-x64_bin.zip", + "checksum": "7369c2056fe4675493de1dfd0326ad8ee5043e54afa157c09799b17c22e13c8f" + }, + "msi": { + "name": "sapmachine-jre-14-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B24/sapmachine-jre-14-ea.24_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-14+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.23_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jdk-14-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "053c132a3de5021fd116f73bb9f65220d0895fac9ae23a2dbccca904851269b5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jdk-14-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "c8e52fab242b02e736fbbc1c2f30d60da01eeb874d4ead5d7ce783efca954db5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jdk-14-ea.23_linux-x64_bin.tar.gz", + "checksum": "64bf4a1d67b45bc642780f51649c13ceaa520cde6377d7662dc44fe3e429a759" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.23_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jdk-14-ea.23_osx-x64_bin.tar.gz", + "checksum": "5fcb23d8b8a739f55c98d59f2b7a5177cd2973b3958a5ffd376b92dbc8bc125f" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.23_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jdk-14-ea.23_osx-x64_bin.dmg", + "checksum": "83f488b85d1787c207c91aef01447a3f6d772c50c09f8de6402083441af19584" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.23_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jdk-14-ea.23_windows-x64_bin.zip", + "checksum": "6e4f25d0b6a1659c64717cb6cba7904b2ba859401c6b76348b028da283557b5e" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.23_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jdk-14-ea.23_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.23_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jre-14-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "823ac40404def6a91f9ab74944b50f2b0d8419b9c125c8bd0d5b5139e47c7397" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jre-14-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "87964878a609ee7c7a65672a730c475e41a562ea84b89c6b457d9ea111cef502" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jre-14-ea.23_linux-x64_bin.tar.gz", + "checksum": "601d4123118d81db5ca91fca44b9df2ed22cc955fded1521348ec0262ddfc695" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.23_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jre-14-ea.23_osx-x64_bin.tar.gz", + "checksum": "fe47f9ba534dc5e8eb0d537063980dff30b33f24710b58dc5f6fdfe05bc25fc5" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.23_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jre-14-ea.23_osx-x64_bin.dmg", + "checksum": "644531f606e7e56b7191ec105b1b765b22c1909e0ef34c929c09e26287a8ab64" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.23_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B23/sapmachine-jre-14-ea.23_windows-x64_bin.zip", + "checksum": "d01554f12274c5c8ea8ce983c68e5935a35b3c298de90947c6fc2c070a250623" + } + } + } + } + }, + "sapmachine-14+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.22_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jdk-14-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "aa9cec31882b6012b78f1ec9bced0f85f3523f82f24478869ed48109fefe7628" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jdk-14-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "ab37c175c67cb4c383b0ae779919dd6d2b02a419e8b3ba9a3500a3ab62fec7c1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.22_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jdk-14-ea.22_linux-x64_bin.tar.gz", + "checksum": "51080869142e3396e4199b1b9f5390ddc96f22460701cdcfdbea2672522831e7" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.22_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jdk-14-ea.22_osx-x64_bin.tar.gz", + "checksum": "d5cf4805cc7f1af039af8536142215e431584399391c28dfe527c5e617ad8cda" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.22_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jdk-14-ea.22_osx-x64_bin.dmg", + "checksum": "aff362f9f2ae4dae154dc8af7dde1a78754adc0dbaa51c36ac78bace45dbcd51" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.22_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jdk-14-ea.22_windows-x64_bin.zip", + "checksum": "6545416393816f64226e561c5912767ba962286a7795173105275015a2bb2dae" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jdk-14-ea.22_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.22_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jre-14-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "ab4ac4258a595df974fc19eed80b079d5c37de019dfd0b80aa8afe1de3cfa4cf" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jre-14-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "e69f54132c52aa8d60d2cf270e854314da6ff126b57441cd17720f58eb0a3c84" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.22_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jre-14-ea.22_linux-x64_bin.tar.gz", + "checksum": "ac23c9ab47004062adc4dbfb0421fa94a8b6301b79a69accf2f74960c8e6d226" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.22_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jre-14-ea.22_osx-x64_bin.tar.gz", + "checksum": "53a810fbbdb96b8bf2909c6f5577e548868a652de17df2fd11011686022b1157" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.22_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jre-14-ea.22_osx-x64_bin.dmg", + "checksum": "6c7462810690f8aa8faf35076058f96a16358aa33ce63470f74e40d8640b1a1f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.22_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B22/sapmachine-jre-14-ea.22_windows-x64_bin.zip", + "checksum": "cad711120f34d11f11f70b633a809a123e0d14591da33a54c490281df5d881f7" + } + } + } + } + }, + "sapmachine-14+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.21_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jdk-14-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "d94e6e83500a38cfb2740af887ff6a256a32f276e142e855366f39600b56d820" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jdk-14-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "ea14def245949eb84686f9f5df75c2eb856774b61ce467106feb5183fb823685" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jdk-14-ea.21_linux-x64_bin.tar.gz", + "checksum": "684daedf8048d2ff091b128d66161a045686c12a6f64885018ce9ffbf35241cc" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.21_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jdk-14-ea.21_osx-x64_bin.tar.gz", + "checksum": "7cc186cddf42a1b624c13adb0b98df0683759a0af5a620a8947362461c8e618d" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.21_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jdk-14-ea.21_osx-x64_bin.dmg", + "checksum": "4190aca485997df250d8d9ae333faab34dab21ca48afe4a0a50353f6669935ba" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jdk-14-ea.21_windows-x64_bin.zip", + "checksum": "6d5fe04986a59b5cedf36a974e1f250a15268355f48dd942933b4b009d28aeb3" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jdk-14-ea.21_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.21_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jre-14-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "3668eb47c7320cf7b3161c0fd034f134409f29d109d67753433dbaa1e334a5c6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jre-14-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "8468a5f92a2d9a6788423fb2968a3d48fec5ead644a081a1dc5511dd0bee53e7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jre-14-ea.21_linux-x64_bin.tar.gz", + "checksum": "2cc552648912aa702e0c6e69b7fc3c2ad8a49e5c33dd46275d81e0c96b9de792" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.21_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jre-14-ea.21_osx-x64_bin.tar.gz", + "checksum": "0192ea2201da0cf2e99fcff87afffd415d4d37e4dc5bccc9007e9abdf823f344" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.21_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jre-14-ea.21_osx-x64_bin.dmg", + "checksum": "c93b329d774d929ead796161b585462e321c1b59d700aac3f7ff00814802e51f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B21/sapmachine-jre-14-ea.21_windows-x64_bin.zip", + "checksum": "20a0e23c7219061311893ffdf81722255b6f0291f7c8d241114b74c366f3ff66" + } + } + } + } + }, + "sapmachine-14+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.20_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jdk-14-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "347551820775291f9fe9a1d24adbe8896a32d2d5fe824e7de734132a74d0cf1d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jdk-14-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "5a9890df2cdde22cf540941ade58b66c78ef475ed3f640d2c90bcee4cdc2f7e9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jdk-14-ea.20_linux-x64_bin.tar.gz", + "checksum": "fa8421f6c8b1d7fd9782347bd59ab20f378b9bad8db9eac9adc09ec32c019e00" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.20_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jdk-14-ea.20_osx-x64_bin.tar.gz", + "checksum": "f87721b654c2d3a5ba874af224fc56fc412800ea46776c198d3d708fd500b82e" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jdk-14-ea.20_osx-x64_bin.dmg", + "checksum": "48fa6437dd6be15d8c8e0c6fd80070382bfbf642688e22ddb90f063acb875e00" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.20_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jre-14-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "659d517ede0eb2c43b14656e64d05776d70a26e30d7185e1b06b6797da897374" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jre-14-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "a4053d5d81666cb6905f11b3b0d3ac1b845d9af95f213a7439b6d74dd842b5ca" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jre-14-ea.20_linux-x64_bin.tar.gz", + "checksum": "c64aae8aa48dc0de9e1f7799137014b270248e0e0b249b5c51b64681029ca2eb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.20_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jre-14-ea.20_osx-x64_bin.tar.gz", + "checksum": "38d38f8d0fe71fc5e0bb80112c978f55a23cb77c46009006ef3745c118725eae" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.20_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B20/sapmachine-jre-14-ea.20_osx-x64_bin.dmg", + "checksum": "381723acb401c300bd2b0ca0edb0918502c8a944be616373c16c299ba7357b7c" + } + } + } + } + }, + "sapmachine-14+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.19_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jdk-14-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "ff26793a5afba17bfbee4558e0477aa00441253cba5c73f7c26c82ac315d1db4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.19_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jdk-14-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "9d39a676e1057d013b9c9f59695a640a66b27f5282f6ea5b838fb767fbb58c75" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.19_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jdk-14-ea.19_linux-x64_bin.tar.gz", + "checksum": "a4685db8d3c776b257e1f837f3ae39f8776f3e0d766f50f11c4c589dc353a62c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.19_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jdk-14-ea.19_osx-x64_bin.tar.gz", + "checksum": "012d91b840113a94fa850537240a6b05be1a08cd63508486a98e551aa198245b" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jdk-14-ea.19_osx-x64_bin.dmg", + "checksum": "c1089eb8618a36e3cdb4773ee2353675a23f03557ca75905586427a3a2fb3ed3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.19_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jdk-14-ea.19_windows-x64_bin.zip", + "checksum": "31cae5d72e83148dae3f61fa8ad74b097d0e40d560ca90ed168050537db8a028" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jdk-14-ea.19_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.19_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jre-14-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "4b9475cc0c53618d73f09b4c7c3844b4fbb35107c1ff07c4e3633c27d7ad5faa" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.19_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jre-14-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "66f6d0bb494bcfa2dd9b0c7d337113802c609cbe6af78bef32e5a8e48d6825cd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.19_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jre-14-ea.19_linux-x64_bin.tar.gz", + "checksum": "dfa6d6d3d6fb45c3e8ebd288d950049fd3975b1ffafd997dd99b0f6edae37a0b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.19_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jre-14-ea.19_osx-x64_bin.tar.gz", + "checksum": "fc5bf66defdd6528fd4f1cec7f132b239b482ee69ce7f83f878ea0ec323537b7" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.19_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jre-14-ea.19_osx-x64_bin.dmg", + "checksum": "dfc9df65032c75c0bee996454e62ae04043e785bd7293c2315c793dab985256f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.19_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B19/sapmachine-jre-14-ea.19_windows-x64_bin.zip", + "checksum": "e917fd2a92def679b3311408544ac9be0248735a87f639829a306af4e82837b6" + } + } + } + } + }, + "sapmachine-14+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jdk-14-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "0dbe537c1989cce632c1c5cdc3f0104823b386d7ed7a6abf11d158432df01a20" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jdk-14-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "a3fe5c7c18188f07d96ef96100585dddf90cb9e69b688374e75841c80fb824a0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jdk-14-ea.18_linux-x64_bin.tar.gz", + "checksum": "db245d581221c1f1f65065e91234f73095231452412dea16442f97347e7fd89b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.18_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jdk-14-ea.18_osx-x64_bin.tar.gz", + "checksum": "a389299fa1556f7605b1b379163ad1e1206bbbd1c199ab5e2e2c8cbbf40ebc93" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jdk-14-ea.18_osx-x64_bin.dmg", + "checksum": "697eea5579ee8065316645e54f08680e44f6461c48ca34d2cf13b7666987e1fb" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.18_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jdk-14-ea.18_windows-x64_bin.zip", + "checksum": "56e030aaebe941e5b7aab79fc39f45a41e76a08edc42badf1df043e1cd7f3d6e" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jdk-14-ea.18_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jre-14-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "94be6773f4d9bc68d44642402c2f282ddc11b133df9575f9bf87d62c71f0a950" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jre-14-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "ba79ab8739b24d6d5b37ceb85b058e737640287e64a5f54a81ced581187dd134" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jre-14-ea.18_linux-x64_bin.tar.gz", + "checksum": "07dc6e95827d63d0cf6c19650a7f6c0a16a30e5b98b81a204f1d0636af85cb01" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.18_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jre-14-ea.18_osx-x64_bin.tar.gz", + "checksum": "106446f65f7280d6d236111441995cfc6f2ba1902bdc22819cd279cdaa5736d6" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.18_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jre-14-ea.18_osx-x64_bin.dmg", + "checksum": "4a23612bdd32db83f52c5267d71c1ffdadfc9e93f04ad42e3697418555fdbe6b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.18_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B18/sapmachine-jre-14-ea.18_windows-x64_bin.zip", + "checksum": "aa7a2000a68bcb1845878fcfda96b85883f3f0e614538a8a8450610780992111" + } + } + } + } + }, + "sapmachine-14+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jdk-14-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "84f001b27e97129abcec8cba23a606e493eec1ce1a93943bb7bba9ae30d553dc" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jdk-14-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "f112baf71311696658eb7baf17a09666922b03a3b9f260bea98ee280c5be5354" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jdk-14-ea.17_linux-x64_bin.tar.gz", + "checksum": "972970d2bcc4080644a2808005e0f83c393c1864b7f18dcff52b25c35ab2d8d2" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.17_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jdk-14-ea.17_osx-x64_bin.tar.gz", + "checksum": "a5e82a24b52ff62374741af66d78b68ad9e82365b9b87a80be76400eaf158d4d" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jdk-14-ea.17_osx-x64_bin.dmg", + "checksum": "226515e5b43343278daaac8735ff8567ac3c739e14fe1b8967e1ba9e78776460" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jdk-14-ea.17_windows-x64_bin.zip", + "checksum": "b7be156fbae204293e820c6ee51099f1de03132fa5d43ff21a744f4b6db8b43a" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jdk-14-ea.17_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jre-14-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "6bd809681ec1b8d076c9f12961c389a7d19716db555297330dc6d2dbe35fdb72" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jre-14-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "45dbc57fc499fe8551cea96eb222ee0e8f6cf85b4bacc4be5cb33eff0360845c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jre-14-ea.17_linux-x64_bin.tar.gz", + "checksum": "e4ee9a5a3f6935aed68d03d0df71b6d8d0d11c15e17db483501a5e9b096108ee" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.17_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jre-14-ea.17_osx-x64_bin.tar.gz", + "checksum": "ac013a2271d76e0fdfa394492695c7f935f9e568b2f9d074dc3982a43d87f980" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.17_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jre-14-ea.17_osx-x64_bin.dmg", + "checksum": "5e634ad2b416ab7d598ee7d2e80a380733185caa51a8eb4c86c76ebb1ab0b528" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B17/sapmachine-jre-14-ea.17_windows-x64_bin.zip", + "checksum": "da64fca0b6a94832de38e7d19b4aa47b7e2dabc0304e3a58432c7e813f22673d" + } + } + } + } + }, + "sapmachine-14+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.16_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jdk-14-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "010b912d4fee77125c4ace49f0420bf06e20e36af2297019c232cc35d6d4a5d1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jdk-14-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "c5e7b4f8d5d0ec7e49291afac400c94b1df22c3ae62a8db9283c397fd4291d53" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jdk-14-ea.16_linux-x64_bin.tar.gz", + "checksum": "429d820c0b568456fe787ad1ebcfdc27f8f311641d054124bd81d16e2a64233f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.16_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jdk-14-ea.16_osx-x64_bin.tar.gz", + "checksum": "a38e5c16db71f6435f64340928f88fd2bd5a944dbc27f6066889c8f47edf2f56" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jdk-14-ea.16_osx-x64_bin.dmg", + "checksum": "24a323ea530db447b5429a303151bd0d489169e2f98754782ef74fc1e3042560" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jdk-14-ea.16_windows-x64_bin.zip", + "checksum": "c46ce40f1252be6b0a8521bce9d6939e93ac6feb93a71a08cceae1e2276a4b17" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jdk-14-ea.16_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.16_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jre-14-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "3f71882e66279f954efce50a808e1a72eec61b610cb289115a6f61e6c585b962" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jre-14-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "44f848871630b3565baa85428825250256e294b04f4d82318e9241f811501b6e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jre-14-ea.16_linux-x64_bin.tar.gz", + "checksum": "d97b9bbc77faa4e1538b20644d86925854d88580468afbd3a86a4e04ab56ac1f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.16_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jre-14-ea.16_osx-x64_bin.tar.gz", + "checksum": "72c018d07fc3ab06cc5d2025e8b5341dc9a0c46d50799beb86435753c71c86f7" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.16_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jre-14-ea.16_osx-x64_bin.dmg", + "checksum": "1de19773197c84e46e37eb3b5e1afc69ed5fad1979a6bdc1d6bbb0c6791f2229" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B16/sapmachine-jre-14-ea.16_windows-x64_bin.zip", + "checksum": "69f07a26628a365e8ecabfaf9d299308375a1c2e380be0d109c24a6189c30f6f" + } + } + } + } + }, + "sapmachine-14+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jdk-14-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "5282b1c8edf6ee08301b281d12a0322923281e5e983a5ba843f3d2cfd5623bfd" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jdk-14-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "1db0ebbaa66e7eb3eb8a05a6809364c107d9b1275a4278420d5c2db68710b2ee" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jdk-14-ea.15_linux-x64_bin.tar.gz", + "checksum": "3d27f849c478233ef8a91d52173708e10bea384731128fdb1dd6725b9107fd75" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.15_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jdk-14-ea.15_osx-x64_bin.tar.gz", + "checksum": "e032cf65cf4a90e1845dd872ca6433c81f3bb21d0812d98acc0ecaafe1933c34" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jdk-14-ea.15_osx-x64_bin.dmg", + "checksum": "3e1c652a19289b3b3dda10adca55cb164d8d80e793895e0c1a4738df843cdf35" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jre-14-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "e0ce280a4bcf3ddfe526b9fe44907a4f32dbdce3a1eaefa8c39386133fc919f9" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jre-14-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "c33fb32f6e4b0a7104bed7a767d5b0468a6698ea907b414a72d0d09ff3923631" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jre-14-ea.15_linux-x64_bin.tar.gz", + "checksum": "53f55a84f4cc163bd9bdcded70a15e9d15f8a73515fcace9b0191ba30d0a8157" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.15_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jre-14-ea.15_osx-x64_bin.tar.gz", + "checksum": "ff638f72a4d23167124afd17dd468c06dc9d3fded9da8467d39159fdf1467afc" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B15/sapmachine-jre-14-ea.15_osx-x64_bin.dmg", + "checksum": "b846b300979d370856b088d3a64f53bb3f408ea49df48b9b73cc3f592570b6de" + } + } + } + } + }, + "sapmachine-14+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jdk-14-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "3aef21e952cdc3ffc7ef6702a896eba945c09037fb19901a2135f171741c2a8b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jdk-14-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "da27100d4597424a36630818c6aa15cb0384524af3044891da190c9a06ee4914" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jdk-14-ea.14_linux-x64_bin.tar.gz", + "checksum": "7811383a563a32aaab1766903bfc6b6e02ef7fe3566bf0dba16a993d1701ae74" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jdk-14-ea.14_osx-x64_bin.tar.gz", + "checksum": "2e1def83a0a2cf17f3e5a02821cac29e5063a60b0194b89f0fcdb08847eb588d" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jdk-14-ea.14_osx-x64_bin.dmg", + "checksum": "e9be358c28708a7fc47392ce41ba1ffff15099b49e806b75b862c31bc0235e1e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jdk-14-ea.14_windows-x64_bin.zip", + "checksum": "a5fb7491bb72953da7316ec583e0de55f8bfe9342d06a64f788c57cdfb498ca5" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jdk-14-ea.14_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jre-14-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "30484ef4c7ad1fad45ffce04777333d414266b67839748e2139b8b89a332264b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jre-14-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "6e873b36533d88859c82f2bfdf1e5ffa06edb246c3445def0a989bc1dca7d8ac" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jre-14-ea.14_linux-x64_bin.tar.gz", + "checksum": "1f7d6f80b122f7d3c7a7637a1c3106f56f7651119cfe11e3c03a110f89f45684" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jre-14-ea.14_osx-x64_bin.tar.gz", + "checksum": "96a0c4157d8aeea5353a2badf87bfcda71239fd042a516625a97054537435dd2" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jre-14-ea.14_osx-x64_bin.dmg", + "checksum": "5fc37c1fcbef6b9585db497468f6fb0fcd74d67f859e4b00e91b9bd221be6da2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B14/sapmachine-jre-14-ea.14_windows-x64_bin.zip", + "checksum": "638945cc7a518968666191e1f3402887a1671cba724803a0d1835aa3941eddd1" + } + } + } + } + }, + "sapmachine-14+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jdk-14-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "59da87ffb7902a669aa919eb7e02cbae637e75cdf7cde7ce8e5727556f966acd" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jdk-14-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "826e4043956c2899abf71e26f3b39ef72559841e66ed3639fdc9a2243a0a3b01" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jdk-14-ea.13_linux-x64_bin.tar.gz", + "checksum": "02771232bf4275a04909220a1c90e4d3878d390aad5d455cfebde502c32ce66a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jdk-14-ea.13_osx-x64_bin.tar.gz", + "checksum": "15d2b8a539094cb7e89557c818d8bc27df9c6ab5fcdd9d4297faca4c3bbd62d1" + }, + "dmg": { + "name": "sapmachine-jdk-14-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jdk-14-ea.13_osx-x64_bin.dmg", + "checksum": "0dc0f82b30b99688bf5fbf8a9a622b88ec90018b3ce8f2e632d0aa096157150c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jdk-14-ea.13_windows-x64_bin.zip", + "checksum": "0dda164fb61fc389ec99902e52e6ff5dc59ad3e0ec9f07f86341e270863c2a95" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jdk-14-ea.13_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jre-14-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "7a308560a1f77bd11f4dd83847f5e3aa2925ef8e4b4e33017dba8215f3c19ae4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jre-14-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "b3fd3cfdd61f7190a4417cefb6ab838ccb11bfe996016f8fdfb165b03b9bf8db" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jre-14-ea.13_linux-x64_bin.tar.gz", + "checksum": "9192538fc38147ed52f91709f30c7769d63c08d79e34bcd7c7234abc0d84cd1c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jre-14-ea.13_osx-x64_bin.tar.gz", + "checksum": "9c0aa0676f20880afa1f8a1d3760e39fd8cc2e891d3989674b53fdd973caea32" + }, + "dmg": { + "name": "sapmachine-jre-14-ea.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jre-14-ea.13_osx-x64_bin.dmg", + "checksum": "18367a4239e63ca36b93d82b4f617585cb70eb76181108479d1b2b87d51c1c02" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B13/sapmachine-jre-14-ea.13_windows-x64_bin.zip", + "checksum": "aeb799ec876ad6c3e42f105dbcc902f957d7836fc4980bdba51fb712c466d161" + } + } + } + } + }, + "sapmachine-14+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jdk-14-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "35dee46f04ad93812ad26a70f487430318552f0780431e4ea4c739b4439b2ef1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jdk-14-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "1a9a48c5312ad018f7be391d43785feab86fb61fa21ffb42cb6fab2a08715ee2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jdk-14-ea.12_linux-x64_bin.tar.gz", + "checksum": "a65d8d8a483cdfa2209c84bd3ec88b8019ccec5b4e25571b978b5d889908e5ce" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jdk-14-ea.12_osx-x64_bin.tar.gz", + "checksum": "1c11a0ddf07a5c5efbcee56f5ab469dd1e7337d65712afe05d846982871c79b9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jdk-14-ea.12_windows-x64_bin.zip", + "checksum": "0577f025685e6158e73d80c39657665045123499e528b6baf98c796c8c2e447c" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jdk-14-ea.12_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jre-14-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "ec294e408a5365dcfd5c894035ac0b3803b7e027170f5bc859f6ea3f26ae4c97" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jre-14-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "ee752d6cfeaccbeab7d1bf920d47da61340e64cf2a64032664278cc0a802b676" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jre-14-ea.12_linux-x64_bin.tar.gz", + "checksum": "d52d51316078e673c56bbb3f2d4c679bcad5aac78658de6a5a17a560fc4a33cf" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jre-14-ea.12_osx-x64_bin.tar.gz", + "checksum": "99c61ec957e8d0978ef105390e2d4c61da89ca49bd54d9797e869b3eef0d9d9f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B12/sapmachine-jre-14-ea.12_windows-x64_bin.zip", + "checksum": "1faaf31db8016303b3291ed792eab198fad723f8a324fc7f7a4dba221baf4667" + } + } + } + } + }, + "sapmachine-14+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jdk-14-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "e6d188da1083e85c378efe2e41e680e0eb9f59606659676d639f6aca35dfda18" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jdk-14-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "43f549fc21c1554270921575c3734c3c70bccfea2095b757eddaa35ad00e4974" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jdk-14-ea.11_linux-x64_bin.tar.gz", + "checksum": "e05dc20dd7bb151365db1ef395bcc88ae100d827cf5b248e922381023fbc23dd" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jdk-14-ea.11_osx-x64_bin.tar.gz", + "checksum": "7b6b929c36e35303bfdbcb75a8af13812c5c0b53c18af8161cc38627f6a649c4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jdk-14-ea.11_windows-x64_bin.zip", + "checksum": "fc3c77bffba4b3f37d46d648530ac433483b2ecfb18e65e9fb9e255677931233" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jdk-14-ea.11_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jre-14-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "b6e80191e5b8c45ae10566673d606190c9cce6cb64ff40c103197601f399e4d9" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jre-14-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "28ca32e5cc7ddbc091c46f480e257917cbdcc9f1531d8f2261687f2563a2a21e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jre-14-ea.11_linux-x64_bin.tar.gz", + "checksum": "d830faaec9d8686d4f05689a13edde2264b07b0d080f32d7ae5990d1deda5ec9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jre-14-ea.11_osx-x64_bin.tar.gz", + "checksum": "51402dace15bea6ea5dff679bd26c81a05ccdedc37b189f41a177f88c9d25d22" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B11/sapmachine-jre-14-ea.11_windows-x64_bin.zip", + "checksum": "2e9edacd8dca62db6424ea11316a95467453565c83a3dc48c71bf098bdf8db61" + } + } + } + } + }, + "sapmachine-14+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B10/sapmachine-jdk-14-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "8d197f814529695b993943eeea7cab6f2cbda2d6e8b24e9290da9095011cd29f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B10/sapmachine-jdk-14-ea.10_linux-x64_bin.tar.gz", + "checksum": "04f05d9819768d69c8d8e28b4ac635e239e3d73bba48b1d6c8c2fa0d123acc31" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B10/sapmachine-jdk-14-ea.10_osx-x64_bin.tar.gz", + "checksum": "218aee7be5512a48daebb428d1755adec2372f89444e7f1ec1f8937c3d6a2892" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B10/sapmachine-jre-14-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "30220c7b690a0463431a0dceb240cca3736514cce3ddfa4e6413889f36b231bc" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B10/sapmachine-jre-14-ea.10_linux-x64_bin.tar.gz", + "checksum": "0b27d3d43d3ade8d7a13caf2bf090e4d7e487aa8d3846cebfc1db47c347a3cb7" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B10/sapmachine-jre-14-ea.10_osx-x64_bin.tar.gz", + "checksum": "22c2e8e43bb43e0d31e4501b01aa32e221ba61a1d1145609c8143986c3de2f12" + } + } + } + } + }, + "sapmachine-14+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jdk-14-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "fe78bfbbcc7d51a15ed960747302f5896c1f772f509a38bb75de1df5941d14ca" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jdk-14-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "b993911a0a07aea41604963a31c5f78aeb82775e7bceb7e44d16b9b594d32590" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jdk-14-ea.9_linux-x64_bin.tar.gz", + "checksum": "a1b789a40f8407fde87d30412eb09679c61336a33c2e1aa7b6a4d0e4e09f2ded" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jdk-14-ea.9_osx-x64_bin.tar.gz", + "checksum": "1ac5e74ddc0c53334930acb2b5cd08fd6d5641ecf3fcb200a98658689682ebda" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jdk-14-ea.9_windows-x64_bin.zip", + "checksum": "32229b611ab4fe2512861c5850f7c02a82c4d507572a8776e2b1507dd7738d03" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jdk-14-ea.9_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jre-14-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "56b945343fcf28b87a871b4d6e130c838fabc3e67f07eea4f1b69a64c22292f6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jre-14-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "1766bdf848e4887191bbfe66d430f0ecf0c1a68dd81fab91a2509ceab1bcdf50" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jre-14-ea.9_linux-x64_bin.tar.gz", + "checksum": "9aa47d1d21a55a264a7ed25f6ed6d8efba4ad472d069863f27da5fc169a1bff8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jre-14-ea.9_osx-x64_bin.tar.gz", + "checksum": "00c53952dd479e499409974da0990712d895a5963872238fa9e50a5cedabaa6a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B9/sapmachine-jre-14-ea.9_windows-x64_bin.zip", + "checksum": "28715017ef11bba06ad3933e5efb115535afae0d0b48c16c34a167115915e261" + } + } + } + } + }, + "sapmachine-14+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jdk-14-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "4bead64b9d3239d0888e24f56a8f0204ca97cce064b2664a1cd1b31fa08a3ea1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jdk-14-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "321d739bae8cf8b30173d84dd5278a394b41fab33d7a8b27aaea4b28efd7baf0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jdk-14-ea.8_linux-x64_bin.tar.gz", + "checksum": "42105220c41e48eaa07be24c603976156885373f218ddd3619a7344e1b019075" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jdk-14-ea.8_osx-x64_bin.tar.gz", + "checksum": "8cf47bff9828f475dfe0dd5469a5755afa64e025c39dd38e84180e9cad934c88" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jdk-14-ea.8_windows-x64_bin.zip", + "checksum": "c7398bbf3b5c3dcf3fa44aae65abbadb3f901cdc50975d51db496ae329ecdeaa" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jdk-14-ea.8_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jre-14-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "9deb271a5a25a403410a4908e0e7cc3b019a5cc1e05457798d86744bf9ee9db0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jre-14-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "898bf32d27d6bf1b1e14708ba53633d17e48a671dbd627eb7ca03c125fec3d80" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jre-14-ea.8_linux-x64_bin.tar.gz", + "checksum": "89c13d7ec0a4a689fa4086848e414c2d1d531ebb45b7e7693b5320006f3e0b1f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jre-14-ea.8_osx-x64_bin.tar.gz", + "checksum": "9ba7f7ca2cd0a801b2ade374d82120301c4626c65d74887a5ac5ce77a41ac900" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B8/sapmachine-jre-14-ea.8_windows-x64_bin.zip", + "checksum": "9936d75ff44c7dc7dcba265f778c815350a1f6e893f38c215f5c913c97e6a294" + } + } + } + } + }, + "sapmachine-14+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jdk-14-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "b0e08ff6452e669613aa93990b2f7e8c52612bf66f0222f67e9009c53cb73eba" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jdk-14-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "e6e1e63d9d2c56a50ba95b9261198e646c7fa9d0488ba79c1fa94336c29ccc42" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jdk-14-ea.7_linux-x64_bin.tar.gz", + "checksum": "d68859a491f3ae7c22ab3acf8f18892f858e9e5b973a72598f5f8f40029cf75e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jdk-14-ea.7_osx-x64_bin.tar.gz", + "checksum": "62cc0cf777f35e118c20976aaace0e9f9763c08bfc7876b3f29ecffb27b47440" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jdk-14-ea.7_windows-x64_bin.zip", + "checksum": "494cb2f986bb330d89847ceb035dfaa03809ce4352dafe4447804eab9ed1251d" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jdk-14-ea.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jre-14-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "81ad84c836ac721347596b91438afd9c69692e203e7447c4144f21476ff8445e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jre-14-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "219ff755b115b8a537a4778bb5490248bdb517c48865ec6b8ab3105e1786b09f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jre-14-ea.7_linux-x64_bin.tar.gz", + "checksum": "2f43a7012348f6b789973336b18fb2d7f15d485c48f0937b7d8ef5d879062b11" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jre-14-ea.7_osx-x64_bin.tar.gz", + "checksum": "cc9c157796d1a38be4f77397ea0fb5660de30bad2668ced0dfaf91f6f2c2e3c1" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B7/sapmachine-jre-14-ea.7_windows-x64_bin.zip", + "checksum": "d18a5eaff49b4247fc0fb92db0441bcee29d3cdc8a5dc8f7ef06d63e5fe9df81" + } + } + } + } + }, + "sapmachine-14+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jdk-14-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "c386b4786f10afbf40517e5705a36a686086dad69a927ad9c700ca711d5110c0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jdk-14-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d07d947d6e6ba4237c86dfc496c13c7919b9c32207788b228768c09d37edca0e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jdk-14-ea.6_linux-x64_bin.tar.gz", + "checksum": "fc5c66ae69441948b5642e8a396576af79d885f4c3630ac0472ffa5bed529fa1" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jdk-14-ea.6_osx-x64_bin.tar.gz", + "checksum": "7f00c3020f92775de4fbf8459f462da5acd773fe6e174bfd903b39b2d51801f2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jdk-14-ea.6_windows-x64_bin.zip", + "checksum": "843472dccc7419ef0f201753a0919976d344eee80af2adabd8154f46639e9d53" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jdk-14-ea.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jre-14-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "8cd10c6611440acaeaea6474dd5e8ea5dca6c8b03888fe752d2c1b4bed5cfb46" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jre-14-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "f5a4c0d2bfab4a944945b55fc2f3d404fbb31fdef3ec613006f86be65e0fec3c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jre-14-ea.6_linux-x64_bin.tar.gz", + "checksum": "c7798ee373ccd1c0ec8e2445c83d1372098a16f73445cd1688dfdc59df87d9b9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jre-14-ea.6_osx-x64_bin.tar.gz", + "checksum": "270e99f7c9507ed3fe86613f7400c691b86dcf169a14e558eba737391435356c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B6/sapmachine-jre-14-ea.6_windows-x64_bin.zip", + "checksum": "8b7da84cb48c6558c0668bec1f4c12d9e3b9b919251fddf5c5c02d19f3a7b3d2" + } + } + } + } + }, + "sapmachine-14+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jdk-14-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "18f16ca383b79aa31f81aeaad7d535d5d21e3e383c275496780ad324b0e57318" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jdk-14-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "73b761fb54f64fe0439b000973bbfd4af7651b8a886a073417f624c9c64d8ee0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jdk-14-ea.5_linux-x64_bin.tar.gz", + "checksum": "3000ebbe9f5abf2f5e9772cf6cc9abe2354799d0d09810d1831db43ec9b66660" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jdk-14-ea.5_osx-x64_bin.tar.gz", + "checksum": "f1124f5d5bb2c359b45c010459f7fb7e8ec773f2848520082703d424e75395db" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jdk-14-ea.5_windows-x64_bin.zip", + "checksum": "0e87039bc3903d249e9bd9e19a81a358004c37fbb0394b4d214145c794736f9a" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jdk-14-ea.5_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jre-14-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "0a773e5f7ff65635d6bb8d097c35947f5021d5b5ff8997003e970481f2040d7b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jre-14-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "1e5c9372f972e2b6e50bf1c8d4140aa6990143d0c97378ed2299a74952a85ba6" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jre-14-ea.5_linux-x64_bin.tar.gz", + "checksum": "b7ab51c2b0947296d68ceda9565f3eca67a6d7e986db6ac9d2f418576fa7c0c4" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jre-14-ea.5_osx-x64_bin.tar.gz", + "checksum": "b2edb9fcdc639b3c700add8b7a580bd91f2145c645ffe20bfa57e1efc281aa9d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B5/sapmachine-jre-14-ea.5_windows-x64_bin.zip", + "checksum": "cef6d8260e62aec848b42e68882a958f49177cb868826cffd9900d12d8ef7c3c" + } + } + } + } + }, + "sapmachine-14+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jdk-14-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "d97e9b6215f60a68120b0385a3aa4d6389fa5212d79bd7bfb5ceac3ce117d55b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jdk-14-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "5bd5f487dee752988db9a2f53a9fccba5f62bc710d403c9c2e4bb203766b1732" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jdk-14-ea.4_linux-x64_bin.tar.gz", + "checksum": "26bcbeb55139a4b0ee51e49c3905b36d38a9dbf97a6a4f601f62bb4073ae58fb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jdk-14-ea.4_osx-x64_bin.tar.gz", + "checksum": "c4a370855a55a905cb76bd38982fff967691ac15ffc5ee93e6e54562236cc960" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jdk-14-ea.4_windows-x64_bin.zip", + "checksum": "b13b55caf75e3a4e44f6e3b9b0699880b525a0b2c6d11468a39b0977745fd0ad" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jdk-14-ea.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jre-14-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "f426f35ab5f995da14c6dbe1a776160ced2859344e55e6cc0af2c4543a82b10b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jre-14-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "0a090f101ad217ea221e706cc91f8aec0afdce2abada4b1f1799d63944852ee0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jre-14-ea.4_linux-x64_bin.tar.gz", + "checksum": "4b027140d44995bf4a29a0dcaaa2a2a7c577a81a0074991c233f3f963ede9dfa" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jre-14-ea.4_osx-x64_bin.tar.gz", + "checksum": "d865b1fab2b243e8235ef5d08af5382176f5a808d80d82e3c7ff7233304ba3d3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B4/sapmachine-jre-14-ea.4_windows-x64_bin.zip", + "checksum": "10f402c905e0a0dd6a6fdc0de6db02c0d11f426a08a3178844e2c05fc4459dd2" + } + } + } + } + }, + "sapmachine-14+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jdk-14-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "1515153e0f7bceb0af6f7de43eb558378fb8899ed576b5074436bb8e62be09e0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jdk-14-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "8020c459e59d4c3d090cd99e7c0186eaf73977356d29e2de72bdfa323b1098bf" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jdk-14-ea.3_linux-x64_bin.tar.gz", + "checksum": "2787df4f39f957f180d216aaed4a0aeb70b080c27dbafc3cc0c8865f749877e0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jdk-14-ea.3_osx-x64_bin.tar.gz", + "checksum": "56f8f113a26b4ada267249934aa9d69743edff3f21db2642a561d5d3b9a80257" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jdk-14-ea.3_windows-x64_bin.zip", + "checksum": "c1c11993f23fb9321a9e648e6d10a42094adeabf9006a17fec6cd70ca8ed9071" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jdk-14-ea.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jre-14-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "d0498b53c5f213c7f633a620bd2b547963f59156c371f395a9ffbc16cc74f8e4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jre-14-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "c19f8abc3ef0267b2769b560bedcf40164b132fedb8ad9b4866d6ef66de0f280" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jre-14-ea.3_linux-x64_bin.tar.gz", + "checksum": "c93bf01365796563b3343a2332ed4ed7093d462ded0f4bd83a1c0ad5fe5c8e99" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jre-14-ea.3_osx-x64_bin.tar.gz", + "checksum": "a87d830f58a1589a7c60dfb5abb9323d0f8dc3ebebeafd40754a0115a16f1ea5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B3/sapmachine-jre-14-ea.3_windows-x64_bin.zip", + "checksum": "7b46568401b4c3805b8eba3e62f30cd9f09214ce0ecad14eec8b899cdea81db0" + } + } + } + } + }, + "sapmachine-14+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jdk-14-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "8ad9f7e1fec2d6a6e9421e9ad477b9874cd6c134d33989e7ef78fcfbb15e3cb3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jdk-14-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "fe0da74a503ae51bdb3ce47da03a36e7d58a7f0d520128ad07ae5bac0f661b50" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jdk-14-ea.2_linux-x64_bin.tar.gz", + "checksum": "6a6fb20c9cbf631ece6b77a6204e101c857a5075d9511d46d0407d2c3b43858c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jdk-14-ea.2_osx-x64_bin.tar.gz", + "checksum": "6767d81e29f5a1f858f4bfc93959cfdf67e3c937886ace326681606fa7eec6ff" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jdk-14-ea.2_windows-x64_bin.zip", + "checksum": "2bcc295dad73b1cfef87ec07478ddda7a0bb193bf2f407465baa6a2d5dbec360" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jdk-14-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jre-14-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "bfc20ee975ff9161cd6590d7418dfc0029e4c8ea199805701966186f29df4e8f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jre-14-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "74653eb762962b11f54ce23d2c19fe171e5a1235ba5fbab136633573ef287342" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jre-14-ea.2_linux-x64_bin.tar.gz", + "checksum": "a4f5a0e00e3ba07be73e352cf8d53d03114bd56366070db12aab056dbb1841bc" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jre-14-ea.2_osx-x64_bin.tar.gz", + "checksum": "32e246990f9912f91290de26644f641f3fc748b4a078705bf75c455863c636fb" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B2/sapmachine-jre-14-ea.2_windows-x64_bin.zip", + "checksum": "060131edd7a3a3fc0d3204baf87ae58b88f36eb79ca53cd6bba99e4a3430d196" + } + } + } + } + }, + "sapmachine-14+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-14%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jdk-14-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "ba4de963d9945a8e00d08336f1d678d08bd94f4030ea3f3319871eb177615b7a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jdk-14-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "9059ad9d1d20c7ada52d4caccf9ec6a151d30e8cbae23aa0a4817dcbedf9c719" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jdk-14-ea.1_linux-x64_bin.tar.gz", + "checksum": "9702281ed4017c43b4b7cfa504f1a06ea9826b318be3d649de1eb1e10bc014ea" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-14-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jdk-14-ea.1_osx-x64_bin.tar.gz", + "checksum": "1c5999af940ef1247c745cbd9a3d1bf2fecf6c8c067f1b09111a62eae12bdd01" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-14-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jdk-14-ea.1_windows-x64_bin.zip", + "checksum": "80f311317509e49d6b0017a7bc95638731dd3afea7cab07478ca727b4e3a09e7" + }, + "msi": { + "name": "sapmachine-jdk-14-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jdk-14-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jre-14-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "fc3c97a556c7f5ab03c915f4180d110751ab7022024756be3f25138d1532ccc5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jre-14-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "0295f1055797c5b8a042ae988374e247564dee0cd4c8d07ca696b73040d3e801" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jre-14-ea.1_linux-x64_bin.tar.gz", + "checksum": "3246a199209daec862ebf4ffa31a98f0d38d9495686ea77063f0d435c2d2ab5d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-14-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jre-14-ea.1_osx-x64_bin.tar.gz", + "checksum": "72dde5e5c20cdf4d6a1093970f236ac627e796305fde2dd44b95244cc374bab2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-14-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-14%2B1/sapmachine-jre-14-ea.1_windows-x64_bin.zip", + "checksum": "386b41f9a8896c61b6e48577c08ce11db122dd976cfe92c30376d57781170732" + } + } + } + } + } + } + }, + "lts": "false" + }, + "13": { + "updates": { + "13.0.2": { + "sapmachine-13.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jdk-13.0.2_linux-ppc64_bin.tar.gz", + "checksum": "2cf6cf02a80684fc3898f5cf359063d2be679e823c2b7bb161068cfaf976d68d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jdk-13.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "78cea7955959c4732e6e3845f6076275d3c353e31320738d68fd8ebd25cee373" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jdk-13.0.2_linux-x64_bin.tar.gz", + "checksum": "f45604b8f6d42ea80a4eef788a1586c85d1e7fb90af2e91aa111beb7c408d464" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jdk-13.0.2_osx-x64_bin.tar.gz", + "checksum": "52b97651e06e31b943bf3df1a42dbfae9efd1c672962ad02cb44a669f04d54f3" + }, + "dmg": { + "name": "sapmachine-jdk-13.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jdk-13.0.2_osx-x64_bin.dmg", + "checksum": "12f84ff3f5be670520a404024b2d6eb9eec6bd9197b478bbd0af88faed25b48d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13.0.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jdk-13.0.2_windows-x64_bin.zip", + "checksum": "b92730ec4a0bafa33957a57c5b55ee77ab5a0e09347539a34d94326a142ae863" + }, + "msi": { + "name": "sapmachine-jdk-13.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jdk-13.0.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jre-13.0.2_linux-ppc64_bin.tar.gz", + "checksum": "69120fcba817f13b9d6c8b06f26667a0b58e50f0fb715cfb0be2be0d835fca0e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jre-13.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "6e08da804da0e0715af32ceb24a8106149de3acc92b78879c319f2eec8dc1679" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jre-13.0.2_linux-x64_bin.tar.gz", + "checksum": "5b529c887d8a6d3972cea337e0a66c8dd0487546d3aaf6619260286eb5e47e8a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jre-13.0.2_osx-x64_bin.tar.gz", + "checksum": "8f73e49f1fb43f5b80eb5ab5dd818928d9b5b6fc5cdcae59b2c8b8e966b2d9fb" + }, + "dmg": { + "name": "sapmachine-jre-13.0.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jre-13.0.2_osx-x64_bin.dmg", + "checksum": "9258f1c497ec97ed0ef1341c661a2277f1e1d3aba8bcece8ad8d283441e37cc2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13.0.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jre-13.0.2_windows-x64_bin.zip", + "checksum": "b57c18f51a0ab7e34b6f42f9c27c4471af31186774480b468701e594493fae0b" + }, + "msi": { + "name": "sapmachine-jre-13.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2/sapmachine-jre-13.0.2_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-13.0.2+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13.0.2%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jdk-13.0.2-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "63a9cd7c2252c9cd9352cbcadb0ea1ec04232623cd135eb6f137276f776a9ee8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jdk-13.0.2-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "d8254967c8f88f388ff49f12920b1fcbe40db3f472ad7edd00b8521b63d801a9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jdk-13.0.2-ea.8_linux-x64_bin.tar.gz", + "checksum": "458f11af7c85a3dc5d4adbaa30db6752a88f83ab4f0365a0b5c455cd054da116" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jdk-13.0.2-ea.8_osx-x64_bin.tar.gz", + "checksum": "9a4ffac6dca029d91233e57a11892f66e4f05351d980e1953998028f01258721" + }, + "dmg": { + "name": "sapmachine-jdk-13.0.2-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jdk-13.0.2-ea.8_osx-x64_bin.dmg", + "checksum": "aa56b511b0dc70bfd2334035a9bf68e02401325dda5d84a938ee51560dbab7ee" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13.0.2-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jdk-13.0.2-ea.8_windows-x64_bin.zip", + "checksum": "5a42e2638a6edbe5e121787bab04c0c38c18c3c531cc23e29ecf0d0094795e54" + }, + "msi": { + "name": "sapmachine-jdk-13.0.2-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jdk-13.0.2-ea.8_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jre-13.0.2-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "e4970a8700fe01859dc0e9e15dd4c43c4b33c7252e4800698ff7c7cc94a58d49" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jre-13.0.2-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "28a3445c890caee24e64c25016eee0ef25bd9ea1ab2cdca4aeaa6a113c2dd8af" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jre-13.0.2-ea.8_linux-x64_bin.tar.gz", + "checksum": "4267fff7e0d3d5b0262d9c0e6850ef5636cb5ec3c7f6978ea0d861df975dc2ed" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jre-13.0.2-ea.8_osx-x64_bin.tar.gz", + "checksum": "86c612b9daf953d31b8d4138b7f4afada0e8b26ae8728cf03b1a28a0d160bb05" + }, + "dmg": { + "name": "sapmachine-jre-13.0.2-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jre-13.0.2-ea.8_osx-x64_bin.dmg", + "checksum": "68de5d566fd4bd7512d1318a807b2027322d50e0bdcd5253332c069141009e61" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13.0.2-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jre-13.0.2-ea.8_windows-x64_bin.zip", + "checksum": "ed3726dfa7a06dc1e7c34f2731ed16c2b6e0d4502c9d96ba29d99ef5a4802cf3" + }, + "msi": { + "name": "sapmachine-jre-13.0.2-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B8/sapmachine-jre-13.0.2-ea.8_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-13.0.2+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13.0.2%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jdk-13.0.2-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "968e9e5ac3cae99cfd1f940d8d1b5c9851b323c5e1ae5579d971320311df41c3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jdk-13.0.2-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "0b432fd470fc58a9a2d7ff6710f34f58d00ff29461ed9033d1429a44d6344602" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jdk-13.0.2-ea.2_linux-x64_bin.tar.gz", + "checksum": "ea53b5d437c4d2079b77d7ef82afe6e5451de1e33445f81a66ba57ae688c8861" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jdk-13.0.2-ea.2_osx-x64_bin.tar.gz", + "checksum": "3fb5a123b6d8243c9730d6deda8def07db11a3b72badb3b0c6483d66ec1dc5cb" + }, + "dmg": { + "name": "sapmachine-jdk-13.0.2-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jdk-13.0.2-ea.2_osx-x64_bin.dmg", + "checksum": "6c07dfa3b626f89c320236c6ba37155767ecf1bec691289c9db116d51679bef0" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13.0.2-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jdk-13.0.2-ea.2_windows-x64_bin.zip", + "checksum": "1522bd8f26968018a04d7d755b7d7db8f223f08da5721138cd5935a8d5a98e7b" + }, + "msi": { + "name": "sapmachine-jdk-13.0.2-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jdk-13.0.2-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jre-13.0.2-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "248dd874074f9e63336def3cbd6ad89d36aa45c0e87d8b55fd826ee0e29238c7" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jre-13.0.2-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "1d9f457f272ddd18aa998b728706583d571d7d9e9a362bbdd0361654a0f7636e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jre-13.0.2-ea.2_linux-x64_bin.tar.gz", + "checksum": "235fe9896ad18b98c30bed4d86a7d3e303047de0e3176ccfb5de5b8708b6a7ce" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jre-13.0.2-ea.2_osx-x64_bin.tar.gz", + "checksum": "9cdad0b9bd896f3f394be3d21c44a1a0b828baf58e67729549deced1941bec6d" + }, + "dmg": { + "name": "sapmachine-jre-13.0.2-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jre-13.0.2-ea.2_osx-x64_bin.dmg", + "checksum": "6a93b2575c4b4b081a0e14d320b087c31a83e6ca93bea7695761e796d3ed9bd6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13.0.2-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jre-13.0.2-ea.2_windows-x64_bin.zip", + "checksum": "33bf44f4047250c11c3b857bea4871583b6996a0ce52e1dc8e4dc4e133fee62e" + }, + "msi": { + "name": "sapmachine-jre-13.0.2-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B2/sapmachine-jre-13.0.2-ea.2_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-13.0.2+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13.0.2%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jdk-13.0.2-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "37f17ce14aba2f14f19c21594bb33c679f17390cb2325848ee44d161f4dead98" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jdk-13.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "8640acf1c313381d33159fa59723ca53fac52fa36baebdff61f2d2e0cf910da9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jdk-13.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "e396ddea90996a811875de73814abe357ce4cc9c682aeb884a74bb6894a970b8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.2-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jdk-13.0.2-ea.1_osx-x64_bin.tar.gz", + "checksum": "b54041ba5eb6ee7fb07e7e67151c1b5e9846c1585ffa126d70f0b3eca2ab0af7" + }, + "dmg": { + "name": "sapmachine-jdk-13.0.2-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jdk-13.0.2-ea.1_osx-x64_bin.dmg", + "checksum": "04eddd92272618e5e5548904f0a5c690a9d2cc2e077cb542153cca30f7a63f04" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13.0.2-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jdk-13.0.2-ea.1_windows-x64_bin.zip", + "checksum": "a56a72551b8f110d7eb7baefbd221f3e1332e5e9eadaee678bc2fe842ae7ec3d" + }, + "msi": { + "name": "sapmachine-jdk-13.0.2-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jdk-13.0.2-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jre-13.0.2-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "409f2c3e71c1dea83b83f2f41fe4b7ea9a24b3017a8848b48c071c8f45bb5627" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jre-13.0.2-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "a0cd74fa2458bd878dbf3d8e5593b43072abd512ad1f78a8d20276aa54d2dfe5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jre-13.0.2-ea.1_linux-x64_bin.tar.gz", + "checksum": "73422e2d0d9cc66c45e851f9db4615a72e2316dd02e46666c652eca2c609e9ec" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.2-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jre-13.0.2-ea.1_osx-x64_bin.tar.gz", + "checksum": "458af7df7daa0c7f5545e2d480d654b65ea13723e6594dd9c108ed39b4064b79" + }, + "dmg": { + "name": "sapmachine-jre-13.0.2-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jre-13.0.2-ea.1_osx-x64_bin.dmg", + "checksum": "114807533388a329aa611272f0928c2dc36340f7cc1e905aa17fe381227fd02e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13.0.2-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.2%2B1/sapmachine-jre-13.0.2-ea.1_windows-x64_bin.zip", + "checksum": "9fed94597d822f681be2b2c9951ec391fb647923a1cff38cc5f22d3788e95307" + } + } + } + } + } + }, + "13.0.1": { + "sapmachine-13.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jdk-13.0.1_linux-ppc64_bin.tar.gz", + "checksum": "93efde2453aa3c4f36df9e3b1e2b1297d1e0879b91ffb4200444f0c53930815f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jdk-13.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "aa1ee7f0e64e331e2b9d51dd4dd63281591fd39508364b00da5d10a6f39b0482" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jdk-13.0.1_linux-x64_bin.tar.gz", + "checksum": "21b2a4d3d80bb8434235e9416d347967ca4714e1c54e49136e739b8447c87e56" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jdk-13.0.1_osx-x64_bin.tar.gz", + "checksum": "f0111c1cba6d1b1042724df7d28f2a274981bd90fbfe6c940ca5cc9ceddd8825" + }, + "dmg": { + "name": "sapmachine-jdk-13.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jdk-13.0.1_osx-x64_bin.dmg", + "checksum": "7b77d7eb6dd625fac75b857d6ead53f946fd905e73c463a24f8e3c7e93706a20" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jdk-13.0.1_windows-x64_bin.zip", + "checksum": "916b5d947391fbe31c9955267e4c6ad5fc17e64c9450aa4573678450297b7b8b" + }, + "msi": { + "name": "sapmachine-jdk-13.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jdk-13.0.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jre-13.0.1_linux-ppc64_bin.tar.gz", + "checksum": "c76c69f8e7bb3e23471aa6dcc3b4b22b0a8e8def27db18d7f14057a21e7e9b1a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jre-13.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "88323b033b3c4cd9f1d9f25d0d40435c7cd54efca49215bb20432bf24021f8b9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jre-13.0.1_linux-x64_bin.tar.gz", + "checksum": "a359d59b054c1c233c6d428e5b8b4c54c40c2786cbc1613894c769470e78f95a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jre-13.0.1_osx-x64_bin.tar.gz", + "checksum": "405a22c2894373fdd1c06be1d103adad863c540881515e1ea6d1ccb87d175575" + }, + "dmg": { + "name": "sapmachine-jre-13.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jre-13.0.1_osx-x64_bin.dmg", + "checksum": "4c3079e0a86dbd6eb2856b6338ec85efb4eebce095c6a01359aa0d68d11ef540" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jre-13.0.1_windows-x64_bin.zip", + "checksum": "6edb380acd6db46fe6f131e83dd0136a8a543a6d34e121cd4d6fe63588c9c29f" + }, + "msi": { + "name": "sapmachine-jre-13.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1/sapmachine-jre-13.0.1_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-13.0.1+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13.0.1%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jdk-13.0.1-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "7556ffaf487bd2de49236fe1c8626fde887abf85f97db390600f890d5210181b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jdk-13.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "75802cdfd8a07f1e6509436cc0a85f691b7cc66aa1a1316e5d73accf6e65e77c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jdk-13.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "165474f9351323eb81fa272958674ba5c74fda622805fb80652da2c47e6e15b0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13.0.1-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jdk-13.0.1-ea.9_osx-x64_bin.tar.gz", + "checksum": "917c345cc4b63dd7579992eb2e3330482559aa71b5361d46b7b4db9767dac9dd" + }, + "dmg": { + "name": "sapmachine-jdk-13.0.1-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jdk-13.0.1-ea.9_osx-x64_bin.dmg", + "checksum": "00baebc672cdf8e3eb1a87ae7bfce0528733330573aac98330a80c0430a70bb7" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13.0.1-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jdk-13.0.1-ea.9_windows-x64_bin.zip", + "checksum": "47f18b7c082f09d507635b1d7ecff076382f958ab0bc56202cbdea61c342585f" + }, + "msi": { + "name": "sapmachine-jdk-13.0.1-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jdk-13.0.1-ea.9_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jre-13.0.1-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "5a21423dee4e8ae9cc0b936f00c9907c0a52b5c95990e9e636f3a4bb554c21be" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jre-13.0.1-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "da8083e1f5f8cf6814f40343a3cc9fec707f8fe33d2316073f36b6cdf942965b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jre-13.0.1-ea.9_linux-x64_bin.tar.gz", + "checksum": "7554386cdf4c0c3d3b4c50fe52869964b579195258cf6ff0cedaf052267e462a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13.0.1-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jre-13.0.1-ea.9_osx-x64_bin.tar.gz", + "checksum": "bb10a2c743c34b7cee510cf1100c56e045dcd020d11f9e191b44895308c06aaf" + }, + "dmg": { + "name": "sapmachine-jre-13.0.1-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jre-13.0.1-ea.9_osx-x64_bin.dmg", + "checksum": "073eaa8779ddbf7833b920d9a9c29a7a9583a0c25a285f2405010ba89d3abd48" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13.0.1-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13.0.1%2B9/sapmachine-jre-13.0.1-ea.9_windows-x64_bin.zip", + "checksum": "05f952fa671afaab587311115238d95b4210f6473c191a428a16c760fa65d0de" + } + } + } + } + } + }, + "13": { + "sapmachine-13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jdk-13_linux-ppc64_bin.tar.gz", + "checksum": "c33045cd306e738d4144fc76f98ab376040b66079810c76b991f83ec3b755652" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jdk-13_linux-ppc64le_bin.tar.gz", + "checksum": "c01787bda514d2ef0b1d90afbef4261cac707273fe042f855d72d1e3166a10c0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jdk-13_linux-x64_bin.tar.gz", + "checksum": "0b779a4b4cbc24e26c28ccdca6e62fc04f34e746774a54f5077cc7a2d321eb9c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jdk-13_osx-x64_bin.tar.gz", + "checksum": "08bd76c0525bc6e7e782a747c4dc17b59d88e8013a3f0870569efba909b105c8" + }, + "dmg": { + "name": "sapmachine-jdk-13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jdk-13_osx-x64_bin.dmg", + "checksum": "d4f85394cb02db999baa906dedf51897b7b99189cd4c44f298c305529ee0cb2a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jdk-13_windows-x64_bin.zip", + "checksum": "3823d88d764cb301afa16c3c91cf98d226bf031ad174518fb01909f3c0ee1b05" + }, + "msi": { + "name": "sapmachine-jdk-13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jdk-13_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jre-13_linux-ppc64_bin.tar.gz", + "checksum": "0e77d934bab481251e4a9c683ad80062492b50343fde2107f789cc869852f4df" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jre-13_linux-ppc64le_bin.tar.gz", + "checksum": "dc015ad7b636a8edda73079f5201cf149029483e77e330e10bdc2de6a0b8d198" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jre-13_linux-x64_bin.tar.gz", + "checksum": "4b51e8343854deb9ec3a76c8e3d7b2ec5d05ddaa85b5e10eb095c55972d21dd8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jre-13_osx-x64_bin.tar.gz", + "checksum": "8d9ea521ced26ca63ee07f1d08e657f210cc5a180279bf41f93179467ae8a717" + }, + "dmg": { + "name": "sapmachine-jre-13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jre-13_osx-x64_bin.dmg", + "checksum": "22c4514298981d74ea470fd3f7ee27dbf16dc510f6894aee9d3e5fd7a7a3eef9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13/sapmachine-jre-13_windows-x64_bin.zip", + "checksum": "ce0a8325d1c8e481cf9c5213f1a51ecb9381a4e48870da9765607cfe497521be" + } + } + } + } + }, + "sapmachine-13+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.33_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jdk-13-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "14db26cc16d45116a5508a3c9479f917d26136808863062139634bf3d22ba010" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.33_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jdk-13-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "f3fd63eaddf8c772d097228a13b2189f7af2ca2ae9351761e2e55340360df304" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.33_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jdk-13-ea.33_linux-x64_bin.tar.gz", + "checksum": "5cb8ab4e74c06cc25d4bb508217ecde2651456643a49030e6400bb3274510772" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.33_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jdk-13-ea.33_osx-x64_bin.tar.gz", + "checksum": "158a56a348e3ec9a980231292a1fa101213e217a39f87017b0f7f17f7736d016" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.33_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jdk-13-ea.33_windows-x64_bin.zip", + "checksum": "c4616c2635352b69e00c421f68109db734498e56c3ee00363fb6cca0a63498d5" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.33_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jdk-13-ea.33_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.33_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jre-13-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "3e3794609342bfb764ba394037164d2c3099ad89f5e88071f51893c609012ab8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.33_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jre-13-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "40747e7d0de93c5b2a1b0769f4240d5d61cd48469404b865e73c57974ac57c1e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.33_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jre-13-ea.33_linux-x64_bin.tar.gz", + "checksum": "8fad73114091feab3e0f07ed4a660025a75737c38f690ab35a5fdaa0809db69e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.33_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jre-13-ea.33_osx-x64_bin.tar.gz", + "checksum": "ec728ac4b41353293e5b73686a45bb9ba69f0ecdafa1106345cc3b95be6cfae5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.33_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B33/sapmachine-jre-13-ea.33_windows-x64_bin.zip", + "checksum": "4323b06c0fd3f86bad7034fb1f93d249aa89c76097f604227bfabd298256aa19" + } + } + } + } + }, + "sapmachine-13+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.32_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jdk-13-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "76aa006827dcf82ef020957e8ceebfc27862e223304d48e29f0618ec48e754f0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.32_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jdk-13-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "a93af74cd6dc2d7f863d0cdd40c62883db23aa76deb89555a5b499d4938dc01c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.32_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jdk-13-ea.32_linux-x64_bin.tar.gz", + "checksum": "e611b9c47729f722fefe8c8212f72f7c30001b6e4991b7ffc4c7abe839cb71a4" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.32_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jdk-13-ea.32_osx-x64_bin.tar.gz", + "checksum": "04ea9c3fc3ee7798eba81697f0b9ccaaf66aacd6b5bbd4a49a955905b443bbad" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.32_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jdk-13-ea.32_windows-x64_bin.zip", + "checksum": "aa79ef1127e13ae9dbf10430e3c7ede5e438c83874da7e40a712c72c8498ce7a" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.32_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jdk-13-ea.32_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.32_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jre-13-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "74ec550e538980fab2e7ef6d7dd066af5d2b86a8b8c0073627a90adc8b743c83" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.32_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jre-13-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "2f3f92030e64bc5a817e1a1a0ef1cbc7fb251161b7f036a5b8af2a9dfc07e88a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.32_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jre-13-ea.32_linux-x64_bin.tar.gz", + "checksum": "c41d2ea861c5cf082c95106f18d87c5ded6909b8dcc907718685400482b04eab" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.32_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jre-13-ea.32_osx-x64_bin.tar.gz", + "checksum": "10040d0b273b77fdc9c1327acbcd340ee2d8f2097a1960e62ea50d3d98e70cdf" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.32_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B32/sapmachine-jre-13-ea.32_windows-x64_bin.zip", + "checksum": "1809003d57d10a5838e22815553b1b82478fdd637e5665c3f62c78af6ab76d91" + } + } + } + } + }, + "sapmachine-13+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jdk-13-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "d67855e217252599f87c0415c03b0c4dfc04ccf41ebc51b68281f6019d8e0876" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jdk-13-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "f11ecb1f1e1262fd3be7ad558b01feddfd15cf54b97f473e548f22ca50f2cfdc" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jdk-13-ea.31_linux-x64_bin.tar.gz", + "checksum": "ea1c2cb87a727fe1a813f73d8ea51aaefacc625651b2787902965940490b7eb3" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jdk-13-ea.31_osx-x64_bin.tar.gz", + "checksum": "ba0980495853ee163e9d0b0d6d94cd78d24de8eae2016c6c10369508789288b9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jdk-13-ea.31_windows-x64_bin.zip", + "checksum": "7b211ac677c434367acd0315b0119df23aee404a10471363049646817d91afba" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.31_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jdk-13-ea.31_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jre-13-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "3dd94031b65b1dbef6645f23a0a850370fe11fb51818d64e4eab027eabef25de" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jre-13-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "bb03152f73cfb6e663cd1bff45eeeea12804b4cec36956e502f23995c96fc28e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jre-13-ea.31_linux-x64_bin.tar.gz", + "checksum": "bdb7fce92dde00edf109298eeb4c7c0afe34c0c0a235adf1a15537b90b4cc0d9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jre-13-ea.31_osx-x64_bin.tar.gz", + "checksum": "15d05dc95deb01c126a5fe43729bfd81ae12a1275370f90cbb64e2f0ac73ca86" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B31/sapmachine-jre-13-ea.31_windows-x64_bin.zip", + "checksum": "51dac2394cf909311d2a6e5e2182d7d00cccfa5b90e61a2adfdd98dfef388388" + } + } + } + } + }, + "sapmachine-13+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jdk-13-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "3f6cfbcbbb02e49772ab3471b48fd067f96625a7f2b3888c3a9ca0cd4a8ecdf1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jdk-13-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "71cfce36a3a13cebcdc0621d554c28ee64212ac23ade522526426a8a1e4faf28" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jdk-13-ea.30_linux-x64_bin.tar.gz", + "checksum": "e3e8bb782a25ef90613148d4eead6220467b9ea91bebf6c2c91f29c28b366c26" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jdk-13-ea.30_osx-x64_bin.tar.gz", + "checksum": "d866299a27b4efeaf45095030b9f717d8f19c9ffff904c8f4434ca6a6352c482" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jdk-13-ea.30_windows-x64_bin.zip", + "checksum": "73abd621a85085105bb6e29d0ef0154d2a3e94f0dab92386e9862769dd82ee47" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.30_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jdk-13-ea.30_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jre-13-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "6bf93e598d3763f30325e2cb3ba5964a1ec4a65dec4b06f4e1e8d63bb17c4919" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jre-13-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "fd2dc89576d31f063febd4d134e877119282a4cb965da6640114d79386e46b94" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jre-13-ea.30_linux-x64_bin.tar.gz", + "checksum": "08203613fb9d5c9ec8a8dcac178dc96620c44dbc8b302f11e12298e204ce6efe" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jre-13-ea.30_osx-x64_bin.tar.gz", + "checksum": "446d7c584c91bb25015e4a8f71d02d1c5880415273f1e9a0255c044363d757a6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B30/sapmachine-jre-13-ea.30_windows-x64_bin.zip", + "checksum": "cda009114f53e301500b77530aea2ca948732239739ab32db0b2ad94240ea1a0" + } + } + } + } + }, + "sapmachine-13+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jdk-13-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "272e5941156916fcbd182e25e19aef06998c5655e83c5c2c442cd01beaa7bf5b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jdk-13-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "5e9398b37b8ab992a78ae90b5ecca39650ec7c69ec614e7e096edad6af63fcb7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jdk-13-ea.29_linux-x64_bin.tar.gz", + "checksum": "66cc42df4225bd4e3193fe4c872b86b226091e67e24a708fb602e83afacbd280" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jdk-13-ea.29_osx-x64_bin.tar.gz", + "checksum": "90b1ccb7ac301b03856e9f81108df4b792e2f19f92091860d14fbd6250c5ffbc" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jdk-13-ea.29_windows-x64_bin.zip", + "checksum": "4e1226c26eca190bb721f410d0dabf633857cd2bebc962ad513ddb1eb2d43124" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.29_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jdk-13-ea.29_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jre-13-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "4bd92d3359300c47d89ee63a62e2cf2199e3b41e23d70dcd8b7e0c8b049e913f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jre-13-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "9ed11e53fe25b5ad6e02bb6c4a8808178edd903529cc05e3e995c6823b6bc8ce" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jre-13-ea.29_linux-x64_bin.tar.gz", + "checksum": "dc6aa9bba181953e18b12e926870407ae34c52da8d5d920cd5fc456b1e487d25" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jre-13-ea.29_osx-x64_bin.tar.gz", + "checksum": "4ade8f70e24a7aea1a0679f8ef39d2d5d1d3c4ed3917115d27317da8e2af3677" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B29/sapmachine-jre-13-ea.29_windows-x64_bin.zip", + "checksum": "624e4e5abf53cc524928e7ac8441ed92d807c493b0feada66c5bbf89602e54f1" + } + } + } + } + }, + "sapmachine-13+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jdk-13-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "3d2ca6434d95308567ae5e7cc7ada4d9dd5269248d7f878e09e25e183df6a67e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jdk-13-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "fa0e0f662d73713797e5ac04a4a039b2b8e1ba6c1af5451bbf612a3d60b94d2e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jdk-13-ea.28_linux-x64_bin.tar.gz", + "checksum": "1ecae05728f1768af0b67137c96a72d7612cc1466981a4f91c065b4dce8e9861" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jdk-13-ea.28_osx-x64_bin.tar.gz", + "checksum": "6d3c001d1663be9340c5a145a5372cd3197cf7337a3e1fe72e21b8d0458e80b8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jdk-13-ea.28_windows-x64_bin.zip", + "checksum": "61c36cd91ddffd6735dacdf079934552c39e56395f49442b98cbddc4e1dea65a" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.28_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jdk-13-ea.28_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jre-13-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "f69b34124cfb4bf8b8f6c72b2d3f45ac77a00816986e2e3535c196029e6913df" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jre-13-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "d38b675ea7ff3666b0e960cf7bb2829bd5fb4fb77cb89d06b2d2aab7471daa2b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jre-13-ea.28_linux-x64_bin.tar.gz", + "checksum": "5364f0c6d1db2efa965bad1b706bf6c89f77465b4120ebb2ee6780a6def708d6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jre-13-ea.28_osx-x64_bin.tar.gz", + "checksum": "8c199acc430b85e7799ab268438710d018e153d65e5adf58af9a6a3720b45af1" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B28/sapmachine-jre-13-ea.28_windows-x64_bin.zip", + "checksum": "4b5c2e63b03e5df3ba8a16f48f943cca745888630e308866af01dad3b73e9589" + } + } + } + } + }, + "sapmachine-13+27": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B27", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.27_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jdk-13-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "1ece8b1a27dc12b81d0809b942d431c7ed6673f9186e80e80c2c94c729dbe57d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jdk-13-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "faace1aa47fca74b5a2e04ba56618bb17a4c2aa6ada515a085cea5d6884565b1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jdk-13-ea.27_linux-x64_bin.tar.gz", + "checksum": "ff086eb26fcb47cb733c5faf94f117ec5935a0acc738e941278fb767eee0aef3" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.27_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jdk-13-ea.27_osx-x64_bin.tar.gz", + "checksum": "09a4b69b8deb0d861cde8b9dec40b025132984f80d7920d23eef97422017ceda" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jdk-13-ea.27_windows-x64_bin.zip", + "checksum": "4026e39b72beddda545f07a5effdd670f56bdf87380dc7d788c9c07fe8ee1ade" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.27_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jdk-13-ea.27_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.27_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jre-13-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "5a2e810ce042ee9e79784598af35da803b5e46a058d89a72024f2a918d2d6879" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jre-13-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "12cd0ebcf84e97a068985a18be4a621236bed185a63ed88920384b308887ee31" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jre-13-ea.27_linux-x64_bin.tar.gz", + "checksum": "353dee4dad875e4ba902051acd74c7b72acab950fc27367954cb387ed23d64a4" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.27_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jre-13-ea.27_osx-x64_bin.tar.gz", + "checksum": "a58aa823fd3d477345ec7c372599435dbe81675aab076ce8814a8951f7d288be" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B27/sapmachine-jre-13-ea.27_windows-x64_bin.zip", + "checksum": "547dd35c69bbd1700a257f4ea23bcde1a8f6d1f65f198fa9396e64e63c05f6b0" + } + } + } + } + }, + "sapmachine-13+26": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B26", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jdk-13-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "2dc3fda674611145362113cd21d8be0429c8e1c6954680f2c2716d66d6b3acc6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jdk-13-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "1f764b2bbfcd1f574730f22ee4d1433b5be00cf6b468b6631afc2719b2550ba7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jdk-13-ea.26_linux-x64_bin.tar.gz", + "checksum": "0d2487368ee77c42363b2f0e8a7b685967558561d408cd441230346016286a3e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jdk-13-ea.26_osx-x64_bin.tar.gz", + "checksum": "0ec82dccbd918510b39460d70016d73f2a74d34c078160f18c704aa657aa776a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jdk-13-ea.26_windows-x64_bin.zip", + "checksum": "c029d80a9640f40053e4472ce7fc65933ff8e4c931b954a4980a5a3d9c8a3a72" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.26_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jdk-13-ea.26_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jre-13-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "16673e4ca1b6b7ab6306548957143f36f0dc73f0e7b7a21ff0f250bc8f8dcc43" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jre-13-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "b8dd9bcb2808e4121c117614a964513ce8afbab20ee2b965f805d019aac76667" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jre-13-ea.26_linux-x64_bin.tar.gz", + "checksum": "acd5cfb1e6418400d73e0a0bd647f1c626751d413a1232d9e04a111c565232be" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jre-13-ea.26_osx-x64_bin.tar.gz", + "checksum": "78df3e8e951eb0537f3f853f5d30afb1579314c47fc19620e201e7c412c1ac1f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B26/sapmachine-jre-13-ea.26_windows-x64_bin.zip", + "checksum": "baec234b6caaaa940c7ef401ffe1c683a2b9092b9b4dc9936ba41739f8e94e7b" + } + } + } + } + }, + "sapmachine-13+25": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B25", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.25_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jdk-13-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "7ccb83c70fbe13fee2ad1bc4cb8ff0639196bf59bc64bcf60e7057c30d3650ee" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.25_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jdk-13-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "3e94442b586b1d793a8c65b88c8ae2b9f2ae92b4cc294852d33713487d83ddaa" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.25_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jdk-13-ea.25_linux-x64_bin.tar.gz", + "checksum": "280eb17f215d4296f1cea3e0c3d2ea55af57aa557bdb6b4cf6c235db963b6ce6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.25_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jdk-13-ea.25_osx-x64_bin.tar.gz", + "checksum": "ba2bb962d3427301c28362f96383290e4632c78deb8fd5afb8d54d552d8c9bd1" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.25_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jdk-13-ea.25_windows-x64_bin.zip", + "checksum": "1ae86d2b9344c850e2aa468776a8d4eec71df3e8e7aaf19dff8b3259b53b2b6a" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.25_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jdk-13-ea.25_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.25_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jre-13-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "ebc9d49373e6949501241d9dc6fcb45bc654cb571ecede7d45ceaed5cd7ea99b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.25_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jre-13-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "0913ad12ec9e751d6409fa616125f79d197e5b7d77197b0d86625b403b161856" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.25_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jre-13-ea.25_linux-x64_bin.tar.gz", + "checksum": "720ec68d9f941dc5513958d9037a04bec65d675e37357619c37d4f05a0bce5ab" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.25_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jre-13-ea.25_osx-x64_bin.tar.gz", + "checksum": "9efcc459b0f704e85e8283698afb475d334642f99bd75075c3a8896108d0dd43" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.25_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B25/sapmachine-jre-13-ea.25_windows-x64_bin.zip", + "checksum": "d0211855e7a7f220aba572ddaaae891d0ebee79a03822c8280088e305e32ce3b" + } + } + } + } + }, + "sapmachine-13+24": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B24", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.24_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jdk-13-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "7cc5e3f2a68070666a9e0575c7034b163c9500a83f6de3eee00a7a44f722657b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jdk-13-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "a82e610f7094bfb9635ea5e2e65cef5f44077d0fe7e338f879f403346e75a65d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jdk-13-ea.24_linux-x64_bin.tar.gz", + "checksum": "42f1e953a99e778c8afad5d6014731439daea7e28f196a4b3aab8c0097ee7514" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.24_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jdk-13-ea.24_osx-x64_bin.tar.gz", + "checksum": "56c1b9bff932941dfa97f4f5adf0e62bbf42dfd79d9c6415314e0e48be167ffb" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jdk-13-ea.24_windows-x64_bin.zip", + "checksum": "48210f150ff475fe03a9b5344b9b043b208b400ddb8d50bb0e198d22a8d58e6d" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.24_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jdk-13-ea.24_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.24_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jre-13-ea.24_linux-ppc64_bin.tar.gz", + "checksum": "29c328e983decee18594d41356026514e86e6eee8a18e71dd817d0c7d1fe4fcd" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jre-13-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "6413b16a81f3fdb3c69a1f2230301b0941a3c61b733632e55b4b74f096e98a1e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jre-13-ea.24_linux-x64_bin.tar.gz", + "checksum": "859459b1c426e287bc04ba6f8434817c8a3f18b09ce828e3e16afa958145093e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.24_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jre-13-ea.24_osx-x64_bin.tar.gz", + "checksum": "92de1615ca201028a4f39cd614c2a32fb5b5f52ebe5f055bb955bb69f18d4cba" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B24/sapmachine-jre-13-ea.24_windows-x64_bin.zip", + "checksum": "dd6253859f3460794c3b9647e028e0b06b93449a22c19c0b22f4848cf9db5213" + } + } + } + } + }, + "sapmachine-13+23": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B23", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.23_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jdk-13-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "99ab710413696d6a6644a401e3c4744eb6164bb1c11736ade344fc1456c3d422" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jdk-13-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "771139c872a800df068d834b78e146681ce7cc572f1971cbbfe4d3a657c25e21" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jdk-13-ea.23_linux-x64_bin.tar.gz", + "checksum": "2550ba1a35f331dba54964aa6147a1b7890ba71f904c35f1b044b60e3cef481d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.23_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jdk-13-ea.23_osx-x64_bin.tar.gz", + "checksum": "df9ee680f33251abab8b2cb449bdfb793b6fb1bcdcc532f551ab8402f701fea7" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.23_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jre-13-ea.23_linux-ppc64_bin.tar.gz", + "checksum": "5181117bb5a5cb0105f0ece7fd484b91672ec2e311ce8038bbfd0bc7b9cf918a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jre-13-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "e631428b6a6f83702f4fbba4633079661b48b6faaa12af346f562f8addaafff9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jre-13-ea.23_linux-x64_bin.tar.gz", + "checksum": "acbaba7ce11b8243632ccead0fbaf3dd8b63469d8a80a340e957361df6dc23eb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.23_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B23/sapmachine-jre-13-ea.23_osx-x64_bin.tar.gz", + "checksum": "c3224fea9d4af851839a19ac54d9213292db2bd8aed96f9fa3e5b1d66c13ff90" + } + } + } + } + }, + "sapmachine-13+22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B22", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.22_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jdk-13-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "2bfb221ff0ebd744d9663484c486d5268f5a2e556326328ab4bcbb76ce7f201c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jdk-13-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "88aa5e0555bce7269ff258207e23f6fd2b51a30b4e01e704d24ad81e8a6ec402" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.22_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jdk-13-ea.22_linux-x64_bin.tar.gz", + "checksum": "5c64c7c6a40a157a3f56328c818be0589576dd96d976251e219fdf2e52253015" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.22_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jdk-13-ea.22_osx-x64_bin.tar.gz", + "checksum": "3732f7f848e3281e33673b3595a6a85bdcff221cb41d8edcae9613041072472c" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.22_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jre-13-ea.22_linux-ppc64_bin.tar.gz", + "checksum": "e617849bb7ab3f818483594a10009757f9ebc7d503eaeec541b662578e1090a7" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jre-13-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "754adbf293e22c5b582c39508e64cb534db6154c33bc816fea5164c3242e8ee0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.22_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jre-13-ea.22_linux-x64_bin.tar.gz", + "checksum": "bf49a96ed4cfebb091305bdf88f8ffb167a60b29c48165d0e5b9bb0882f90cdb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.22_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B22/sapmachine-jre-13-ea.22_osx-x64_bin.tar.gz", + "checksum": "37f57b587f1b54789d404c3d09d4679bc009d67c19b5e19b8e51a6dbfc43c573" + } + } + } + } + }, + "sapmachine-13+21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B21", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.21_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jdk-13-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "d01df5f29a5e208f0c36365aa3a2044a9c70563b4686586cbe7b8d496fb94f7b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jdk-13-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "a527fb9f76d8ca298491fc1e07d054182717f7f045f359829729493e552c7f78" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jdk-13-ea.21_linux-x64_bin.tar.gz", + "checksum": "731e13d729a7387ba8e4b1cd3564440e93d13782ab4306f6b3737a1a856c1bf8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.21_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jdk-13-ea.21_osx-x64_bin.tar.gz", + "checksum": "1159024f6a6c13160aaa04d9e104d6e29a4b8071b998bfebd77dbe1c5059dcd4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jdk-13-ea.21_windows-x64_bin.zip", + "checksum": "554a679fccb8d25e393a64f314674330de65a3ddc659175c81cabe9469280cdf" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jdk-13-ea.21_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.21_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jre-13-ea.21_linux-ppc64_bin.tar.gz", + "checksum": "5bc1a48a5d510bc0d597bb0cca2c73c464c558bbc044c22ebc70f8268ae693f7" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jre-13-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "d429eb42c9d312a32f14c78ca95a76e274fbfeceed2c2c81749f7d7feb3f7955" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jre-13-ea.21_linux-x64_bin.tar.gz", + "checksum": "fd001702d61e343ec57ac3846863b7243822756b2b989981a4d73f0d566eb657" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.21_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jre-13-ea.21_osx-x64_bin.tar.gz", + "checksum": "4f13d39921005b5cb1fe272e826c88cac64324b4fbd9ecbe5502e7ffe9234852" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B21/sapmachine-jre-13-ea.21_windows-x64_bin.zip", + "checksum": "a9d4cec79ef71809fd6b1c1bd7b7cae81cc80675ad9e554c20930aaef8190962" + } + } + } + } + }, + "sapmachine-13+20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B20", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.20_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jdk-13-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "df100363f18a0c78fc6095a01da543925a03b3491fbddb00bcb5661119950b6e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jdk-13-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "c8c168539a83825dceab595fdd457194b455efe17e06815665f1ae4c585b29fb" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jdk-13-ea.20_linux-x64_bin.tar.gz", + "checksum": "2551a06b9c3d8b87c213d8c848bf8b09d6523f892796fdf23109d297cd1c4d6a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.20_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jdk-13-ea.20_osx-x64_bin.tar.gz", + "checksum": "130277dc6f3615a66bde4b79d9083e8a0041f02c1b2c4643422d1ad8b0a30308" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.20_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jdk-13-ea.20_windows-x64_bin.zip", + "checksum": "c6d6ab36cd1892b106ad1c6643d67491c05de9b49b41cdb7c2ac52bdab4e2c98" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jdk-13-ea.20_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.20_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jre-13-ea.20_linux-ppc64_bin.tar.gz", + "checksum": "1dac116c0660b448802fa3a186ef8b68efb993c4db684bb1950b3d0f5bd8db9b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jre-13-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "bd93269a87a6bd807ecf31605c2b3b5d8f93f09811b0b0da8a59f18d66c2250a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jre-13-ea.20_linux-x64_bin.tar.gz", + "checksum": "1033af1c06e03842b120014aa0c8880270704eb8bd718a551b58d5d26a63e15c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.20_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jre-13-ea.20_osx-x64_bin.tar.gz", + "checksum": "a4a702f108a4ed78a6c9af6441f9b0d10a7dd08217c5ca9abf9a3e66239c303b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.20_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B20/sapmachine-jre-13-ea.20_windows-x64_bin.zip", + "checksum": "30458e887e0541c35c7d8a9dfeaeb93a2af1d4de73d91f287476fc28ef28b426" + } + } + } + } + }, + "sapmachine-13+19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B19", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.19_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jdk-13-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "4d1ea97a414a4cf363db45db64e734c6523334343e83cef8b65c177a05e709c8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.19_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jdk-13-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "724cc6f9a0290f2cbd8d6e0d8cbf5f497cb33961974cad61f36907c9003f0203" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.19_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jdk-13-ea.19_linux-x64_bin.tar.gz", + "checksum": "abe99e1c333cde74967d9e023d188ad222d25ac2145ab7f8f877ecc0eea7b3ec" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.19_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jdk-13-ea.19_osx-x64_bin.tar.gz", + "checksum": "034d36bf935cf2db5117a1b2f2db80697e45718bdd1dfff897e173c7b0df57f2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.19_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jdk-13-ea.19_windows-x64_bin.zip", + "checksum": "42e27342ad115e554d90f5182964327386b4b28ee9389ad261b0648c32e81cfb" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jdk-13-ea.19_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.19_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jre-13-ea.19_linux-ppc64_bin.tar.gz", + "checksum": "0af435f61b52b3c6eac32c5296aa48e9b46bdb06f43e0a4b753eb56dcf05e745" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.19_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jre-13-ea.19_linux-ppc64le_bin.tar.gz", + "checksum": "44281b310b20f53c5b8572595e5943589737de3d6ce302dfa121c43fe0f64583" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.19_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jre-13-ea.19_linux-x64_bin.tar.gz", + "checksum": "a5dac897add087521f438e50abced39f66a90492435e9438c97f6d13835783be" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.19_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jre-13-ea.19_osx-x64_bin.tar.gz", + "checksum": "d2e3e2b4b4d738e403c3467d9b2348ab732d28bae2e9c6287d28a11476f9f148" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.19_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B19/sapmachine-jre-13-ea.19_windows-x64_bin.zip", + "checksum": "5bf365722e356cb761ceb3ae057f529e180132466ca2da0229878c6165434093" + } + } + } + } + }, + "sapmachine-13+18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B18", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jdk-13-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "4575c036b995520485121c1aa58109aa728a97de7c7f029f89c23e1c98723e4d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jdk-13-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "a29af02c6abbd4ef9777d79c7baf2eeb2e0425f84b87353f6d510a2be4f594d2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jdk-13-ea.18_linux-x64_bin.tar.gz", + "checksum": "45f55532eb426f7ca4b7a0f5eb476f89675d8612532dab9dc63373f86e2bf6a9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.18_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jdk-13-ea.18_osx-x64_bin.tar.gz", + "checksum": "6d58b5eb84e41567f55acbbd9995c5c574a49834a5022a2d0fa82f521f03254f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.18_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jdk-13-ea.18_windows-x64_bin.zip", + "checksum": "e1a12ee0f673ca2e8399a936381c57c4654bc6df05e93ceb8c6c54da4edd2486" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jdk-13-ea.18_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jre-13-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "5d8c3c7c4ff7f8d286a11b145b7f15294a29be86f5e81a7409757c2e3d5780ed" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jre-13-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "969a7171ba1bb7fe6acaab7f3f0e4386d52952c16e7a2ae4c4910b60f3a17a13" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jre-13-ea.18_linux-x64_bin.tar.gz", + "checksum": "54771334690a0087e4ec4f9291375977231c930b240505aa61a4c028345f482f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.18_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jre-13-ea.18_osx-x64_bin.tar.gz", + "checksum": "fa4259f417b1fdbf068a6f033edd91370aa5b9c80953e3844c003e4ef11c40b4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.18_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B18/sapmachine-jre-13-ea.18_windows-x64_bin.zip", + "checksum": "d2aa2096faaefeb53d388d7a705fc4d615e70f836341c0c24af2e2f804783214" + } + } + } + } + }, + "sapmachine-13+17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B17", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jdk-13-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "de2758389c4b9a94f209d8d6a5641167f78bf774cd1e988e9edf32aaf264a78e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jdk-13-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "073076d788b71120487383840e0a38791c3e6848d15b7365e68ae5a1326bee30" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jdk-13-ea.17_linux-x64_bin.tar.gz", + "checksum": "497faa11635c26816bf88c68b6872805f33dcbc76779f44ff5709611da18eccd" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.17_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jdk-13-ea.17_osx-x64_bin.tar.gz", + "checksum": "40cff249708e4dbb7fc4fe631d71103d083bcd4ea5fd81714893d0d8cd737a73" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jdk-13-ea.17_windows-x64_bin.zip", + "checksum": "f6f4b525fa525b12af7c424027886323dce320309ba99484b2fe3311ce6814dd" + }, + "msi": { + "name": "sapmachine-jdk-13-ea.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jdk-13-ea.17_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jre-13-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "2924b8141a318d1ccc323f53ef7c256f6c956dc219a7dce307c74a6b25dc1739" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jre-13-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "926fd6471331d1783726a9c35baf1bb1106c6cbc808aaad78eece5e6f1293468" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jre-13-ea.17_linux-x64_bin.tar.gz", + "checksum": "332d1f7cf835991c5ed70860fd6ef2f148942e579cb64629e06c921d0a0bb60f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.17_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jre-13-ea.17_osx-x64_bin.tar.gz", + "checksum": "52fa60113e141577a29270bf9882c54eb5e0285b86ddad599fd82aaed3422df8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B17/sapmachine-jre-13-ea.17_windows-x64_bin.zip", + "checksum": "6a52e260832d67d5451883f57868b0ac8e46a0e6b473aaeee781f553e45a5726" + } + } + } + } + }, + "sapmachine-13+16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B16", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.16_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jdk-13-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "3f06b621c8ae0d6b5144aafbe972b0912cce250adfef540196a7b9f5f01026d3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jdk-13-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "3105e64f8176d970d44b253805b85d5d4751765e99a21c57c36a67a2a33bfbf6" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jdk-13-ea.16_linux-x64_bin.tar.gz", + "checksum": "d6df8eff800dfc6feeffff52b8216e2f68a33dbe913ed848d93a01a1b8bd01f5" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.16_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jdk-13-ea.16_osx-x64_bin.tar.gz", + "checksum": "6e3e88636163245ae3931f42c29ade10673d1aa315decdd5f231ad49060a6357" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jdk-13-ea.16_windows-x64_bin.zip", + "checksum": "e58b3faeb4bdf8af5cfb7cfee7794a27ed565ae0e46b548e42ba0d5ebd1c8ebd" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.16_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jre-13-ea.16_linux-ppc64_bin.tar.gz", + "checksum": "f528194d85f15dc11459ada018dda506feb2ecc77a68d0ad7beaaa7c5a48529a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jre-13-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "c4d1a91a0920b646ee8be86948fe5aa09664750eeb8e77c791eeb71d0f52e9f9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jre-13-ea.16_linux-x64_bin.tar.gz", + "checksum": "09394a401af015816f1da973a6209f9f710f2692ecf6717c2a7e6f626691042f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.16_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jre-13-ea.16_osx-x64_bin.tar.gz", + "checksum": "b2d6fc3d637b5194e396bf753e243616b008e44d49a51fbaf10583cd0e1069d9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B16/sapmachine-jre-13-ea.16_windows-x64_bin.zip", + "checksum": "d9f6c8ccdd54eccc6597bb676262dd23d9e9fc22d8ae444ebcc2ad4b4ca41608" + } + } + } + } + }, + "sapmachine-13+15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B15", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jdk-13-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "b6a2e4118e1d583d5ae5b261b939af1c61558c7192eca303cb9fe060f651764a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jdk-13-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "ef7897cbe3d3a0564a069e8aa9c43c9b88ee88361fb905863be3d5cbd7f7381b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jdk-13-ea.15_linux-x64_bin.tar.gz", + "checksum": "59908708186d6ef199a6e5aa65648417f2632da87929cabd146778d38a12af76" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.15_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jdk-13-ea.15_osx-x64_bin.tar.gz", + "checksum": "1ef2fe744297b312075adc5a493ec795ddeba6807926efea3842dcd33ede4c70" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.15_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jdk-13-ea.15_windows-x64_bin.zip", + "checksum": "f6b2c1d30ded956ef7359fa67de7609f5435e47040958421bcd8407d0af4e471" + }, + "msi": { + "name": "sapmachine-jdk-13+15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jdk-13%2B15_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jre-13-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "f7b8bd81df80ef2039fcc31c7811984ffd64c78bea59e77276b82f0417f885f2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jre-13-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "6bd01c2e6069d0663eb16305ee814b978970cfca234d76e0ca6f3c82529e42fb" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jre-13-ea.15_linux-x64_bin.tar.gz", + "checksum": "13165891a9b4be90de7c82bace10ab601c08a369d54070e5e47e916a2bd7116f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.15_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jre-13-ea.15_osx-x64_bin.tar.gz", + "checksum": "882d97ba9695f3dbee78b53832ea1d9d6a69c1a5db894d6404d7181793719f97" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.15_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B15/sapmachine-jre-13-ea.15_windows-x64_bin.zip", + "checksum": "abac49b9d2f35b817410a200a978d52a9f689021c934834d331b19ef7f94400d" + } + } + } + } + }, + "sapmachine-13+14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B14", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jdk-13-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "a1ba0ab011b80827e587699aa5b15b622dea656a98c67075e0ed628d8def9893" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jdk-13-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "b10be1cd5aec6711ed910b98c08babf708e31990d2f4cc39c4cf70532c9441a7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jdk-13-ea.14_linux-x64_bin.tar.gz", + "checksum": "bc46c1e01029274c053366ed689edc4b7b97d09e6fc20669cae73255f37d323a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jdk-13-ea.14_osx-x64_bin.tar.gz", + "checksum": "95783886f95504f31e13ed179ed91e92c03151609bc5ed24f5c53da294130560" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jdk-13-ea.14_windows-x64_bin.zip", + "checksum": "3219ca2eee9eb08761cb641319a4d9dd2902315a07106b38106612285de4b3d0" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.14_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jre-13-ea.14_linux-ppc64_bin.tar.gz", + "checksum": "3891289acf371afd9e665b2a7f2bcdc85e37c2af2a3d13a638a30dc0c66d597c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.14_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jre-13-ea.14_linux-ppc64le_bin.tar.gz", + "checksum": "a3bab7e6325be9004f1f2e926f867372ea9df6f2c17bea494706b99dc5ac94a4" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.14_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jre-13-ea.14_linux-x64_bin.tar.gz", + "checksum": "8517923e4a2967bc809d83cb437b3ffb9b1192049bdce871816e28d4341ce8e6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.14_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jre-13-ea.14_osx-x64_bin.tar.gz", + "checksum": "26fff469aaa434d8d441441cfe166ca6e9af3cf03d1f7d728131cd07d46caa9a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.14_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B14/sapmachine-jre-13-ea.14_windows-x64_bin.zip", + "checksum": "b73e019890be601db6e9db6da71acece3a5887008b02f7744b36d76bf2bdb6ff" + } + } + } + } + }, + "sapmachine-13+13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B13", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jdk-13-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "2832fb465ea4cfab69a9f31ee5fa0f5902f67cc7384318f3fe07b772cd193f36" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jdk-13-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "c6304e506c52ca1a481ef652afa980534dabac2143d971d784c7bfdd0004f11a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jdk-13-ea.13_linux-x64_bin.tar.gz", + "checksum": "a2efdf7344bcd246c4da04e00f98d3a1343aaf7c6d2450d0d1283b2faf5d13b9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jdk-13-ea.13_osx-x64_bin.tar.gz", + "checksum": "7bc1cbff7eddb3d805b720d4f763dfda809b64b960bd78252ddf842c4de7b06b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jdk-13-ea.13_windows-x64_bin.zip", + "checksum": "870925f972e9d0fe784bdee06c3a51c4b132815bcfcb96fb92dc498184ddef21" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jre-13-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "3808aeb7f5a9dfb97d7b822ecdeb00c10df534fc2130e5e89f89b72c05f94930" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jre-13-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "c36e76bdde83804bf6c8c09ec9643b9e09cf2714bcf033074d7994705c3e5e5d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jre-13-ea.13_linux-x64_bin.tar.gz", + "checksum": "859a95f9ffa12334cda7ca72166cd27768c57e19dcd97c3b83f3e4bb61c698f1" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jre-13-ea.13_osx-x64_bin.tar.gz", + "checksum": "8b6aeade1c624fc081dba3fd6544c9055453e0a2e07d3ad90d5bb4d739088a4a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B13/sapmachine-jre-13-ea.13_windows-x64_bin.zip", + "checksum": "ab1ef714e898f08a523cedb38781d213111ac2f56037f4cd91d17977b2672ff4" + } + } + } + } + }, + "sapmachine-13+12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B12", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jdk-13-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "a9a84ddd651191572930c37cd9b8abd34eb5c8a4fe81f2256238642aab151da4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jdk-13-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "57b8fb9f0b0bbc80b52622cd9f5115c2eba5429a564ba0981779d2068e4fdcfd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jdk-13-ea.12_linux-x64_bin.tar.gz", + "checksum": "5fc5e8fecbaa72967581a812b175fa00a42d01461fee1a951ede5f204e220b82" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jdk-13-ea.12_osx-x64_bin.tar.gz", + "checksum": "38e60fc72a79cfcb804cc6f01b80a06701d4149a8755c5a2fe5a2fa2cf2499b7" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jdk-13-ea.12_windows-x64_bin.zip", + "checksum": "da2254803a9092e7a9dbdf76c8521c48c1295558059376198512a63fe02c9af9" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jre-13-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "0546f3a604fa41a45ee08a0bc8106047369f647760d468ef7224af0063163772" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jre-13-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "16aa9580d96f02858ece6cc4bfd723e8e4d9c18ece95c5a7c7cffa14d55d36f6" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jre-13-ea.12_linux-x64_bin.tar.gz", + "checksum": "bafb90d00dba3bc2b4bfe61cc8e019c4263a76f2faa54dcc73c663a4c0b9a4b6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jre-13-ea.12_osx-x64_bin.tar.gz", + "checksum": "057203452a33db679b7c701ea3c75ad17bf78d0578c2585ad0eb418442c4a0a5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B12/sapmachine-jre-13-ea.12_windows-x64_bin.zip", + "checksum": "4f8ae2452d99e6702bea4c02bd308b3b527778abb61e3d290c932abb1e532894" + } + } + } + } + }, + "sapmachine-13+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jdk-13-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "b95e0970b2c5231f25d1c7924300b05ac925d5a85bb750fedcf52c25c801bbcb" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jdk-13-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "ce7e2f63dda575dd8e2460ea6ce793ae15841189c7346dd4a00e90d46aa0d8b7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jdk-13-ea.11_linux-x64_bin.tar.gz", + "checksum": "38af2bc908dcecac2aba0d2de89a6816835c6972ea0cd693ed1c0e02f5ca2488" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jdk-13-ea.11_osx-x64_bin.tar.gz", + "checksum": "8cf863c4f3f30f468f435cec2ebde60054e660357317b0c3417eabf937f335ec" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jdk-13-ea.11_windows-x64_bin.zip", + "checksum": "418bf9a27742e49bb58b321294258600ad5a3949e7b090cac34e3646acf7803c" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jre-13-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "3fe768219b0fc182781b14a0d027d0ab5af290551e34243009d1a46a75fc093a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jre-13-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "49ddc72d9ae701b4e49b661e85e96139a0c74de68bf82d73a52e6c2158b15095" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jre-13-ea.11_linux-x64_bin.tar.gz", + "checksum": "cc5f545c2ebf9b6bdfaade4999390003ed959513f0ca4b9fa9f15c55fe6eb6d2" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jre-13-ea.11_osx-x64_bin.tar.gz", + "checksum": "fa23d1b6537f85a8b6539330a1568f9ef898f63b95432c81e4da4b1a96a9f936" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B11/sapmachine-jre-13-ea.11_windows-x64_bin.zip", + "checksum": "4a69238b25d6a55e95f9a782e461de40efc28cbc033bb448d03f785740e8b5e7" + } + } + } + } + }, + "sapmachine-13+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jdk-13-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "199d16357fcdde3435b1cba0e4e75af927011e3e18733ca68ffc24f854d87167" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jdk-13-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "2d5a58081a958dc971b58a0dc982870c2696cddcfd0a2e0ba4c8422a7d880cf4" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jdk-13-ea.10_linux-x64_bin.tar.gz", + "checksum": "8a686804e9f79a9232e3286910a7fded27c933c6616408b242046b4fff5a0dba" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jdk-13-ea.10_osx-x64_bin.tar.gz", + "checksum": "0afcbb606b60c9752bb3dcc1c6a6b6270c3094209e777cad19dde3bf7299f3ea" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jdk-13-ea.10_windows-x64_bin.zip", + "checksum": "c5fa98ba43c92de2099118177fd26e802fccf6e6c0811940c63afe2adf5bf964" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jre-13-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "2bec8baf2877760e527d6e79292086d558417f5028d038518a663ce8ef28212a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jre-13-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "e119e9577bb9659b983585588f460c8ebfc7682cd76aabd14af72bb038427d16" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jre-13-ea.10_linux-x64_bin.tar.gz", + "checksum": "75a1602f2fdc9122b81afd1d454805eee6cba09d2dc08f880a0dd87902957d6a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jre-13-ea.10_osx-x64_bin.tar.gz", + "checksum": "5aab84bc3c84c7207a8a15fe3a49f35de552b0f3dba0ed8b485151573cb738ce" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B10/sapmachine-jre-13-ea.10_windows-x64_bin.zip", + "checksum": "463d9824561638c995ef56f5cc8521180362041661576e7ec994b9ddac2883c1" + } + } + } + } + }, + "sapmachine-13+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jdk-13-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "bf336c4b394765a3356e46dddcf44c52ba703e3a608a0a9ff1780d1003c08c91" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jdk-13-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "eedb1570caa6ce847520f62f94ae3dd0b03412fe1ffb4d821fe7916ec15f5abd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jdk-13-ea.9_linux-x64_bin.tar.gz", + "checksum": "c518fd28ef4ac9cacfebd9da95fe391bb92c989666809ba9c0d9c5cc038f8ec4" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jdk-13-ea.9_osx-x64_bin.tar.gz", + "checksum": "a9e7b9fd109861beb2ba732ee799a435018b8969a345c5189b63f54cc1af87e4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jdk-13-ea.9_windows-x64_bin.zip", + "checksum": "7fb0df7492d8b341713bdb4c176c0131534f93e7803d0fe765025d02b6a6086a" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jre-13-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "e314ae955c2a202cfe8604164af7514228100c60e8a316ee4265004bfbcf3c59" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jre-13-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "de3ad0085a48a4d400fe48daff91d0a519a192146680f972ac5967f284a7a67d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jre-13-ea.9_linux-x64_bin.tar.gz", + "checksum": "18d27d60a7b236bd40ac9303f193f00a9c1851fc68d33f6c9196a69c381f0893" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jre-13-ea.9_osx-x64_bin.tar.gz", + "checksum": "c78418ae02e4977ca7499e6aa693cd997e44f8d1d043f0eb75ffb8ed3835113c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B9/sapmachine-jre-13-ea.9_windows-x64_bin.zip", + "checksum": "c87c2928eea50db59d952a9af6838b088a55b5eb18fec537fbaf463c98cd2252" + } + } + } + } + }, + "sapmachine-13+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jdk-13-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "7c4517a320aa9f3415eadae431761e0a0fd1b3435e376090c11e7306f492c36b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jdk-13-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "d6a79173f4dbccea8f75a7ea66ea29432e3e4b132b5926c71e6051f4a212764c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jdk-13-ea.8_linux-x64_bin.tar.gz", + "checksum": "36427d28b561876cdc8a54baa72856dfbff6c1abcea96127302d769c189f5c79" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jdk-13-ea.8_osx-x64_bin.tar.gz", + "checksum": "2e25b12d201b87cee34cd19ff4951037d15224b0169b74a58acdd2745d2eeb96" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jdk-13-ea.8_windows-x64_bin.zip", + "checksum": "646b4b4492295402346bd2890e6b8f2e3a920a14e87f42d3ac2be2b51bbf4704" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jre-13-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "7d2cb9fc835c6a0e2a6b2345fbf6eb9d1e615952138df3fcf1f33fc469d7e93b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jre-13-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "ce8263f4e3f26233a168bf8d72b9962d5797c4a274a5e1368cb23649019fdd7b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jre-13-ea.8_linux-x64_bin.tar.gz", + "checksum": "db755e9a6b65cc8033e19f924d5cac19a2adaebe9967c54e870a564b1f7c6522" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jre-13-ea.8_osx-x64_bin.tar.gz", + "checksum": "5ee2914bf9865ba6e90db21f52ee64677e2b7a2edf193dbac196082eccf7e2e3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B8/sapmachine-jre-13-ea.8_windows-x64_bin.zip", + "checksum": "50fe42d5b6a95df7cf6231c23c694277c740702893f1898cb6b8d798e46390f0" + } + } + } + } + }, + "sapmachine-13+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jdk-13-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "0ae3f9c5228076d423f15f00517beea116190c26597aa919e4e6f401b486238f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jdk-13-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "78754bc8fb0b3898a0e47ab3eb827cb2ff64c09315a5a2e4169b0acbd5e24077" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jdk-13-ea.7_linux-x64_bin.tar.gz", + "checksum": "ad5ff319e70260981d0aa6d2a8abd0e4f0d427f88d858da119bb0d62f5632eaf" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jdk-13-ea.7_osx-x64_bin.tar.gz", + "checksum": "a11e228886fe5093091305d91c08ae995da640d24414c40cdecf923f8abc0a7c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jdk-13-ea.7_windows-x64_bin.zip", + "checksum": "4a09f5099f8c5bf350949860020bd1e8b14cc22831ff2bdef948b5a39dd83cb8" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jre-13-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "05d3c5a912565f626f42228df6b80abd2d8ecaf90fab287219ddd5c638be5769" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jre-13-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "3c15169d25350c8aebd499fe4885a9161afe824fc2cbddb7442fdc5436c516b3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jre-13-ea.7_linux-x64_bin.tar.gz", + "checksum": "9531b123a64ba55a7a183985701825e3b944f371253dfac126aec834a183b620" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jre-13-ea.7_osx-x64_bin.tar.gz", + "checksum": "f3d8bd63c60557ddc6258a70dffea06a1f3153b2c79f9652221c2958ebb84c9c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B7/sapmachine-jre-13-ea.7_windows-x64_bin.zip", + "checksum": "569821163548640d610bc8c8c7755f2e193ce3c4252a4561085a35881c33777e" + } + } + } + } + }, + "sapmachine-13+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jdk-13-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "cd0d1b2834698dfeaba1316741c599185f218fdb023a70eeb4a3acc60f4223e3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jdk-13-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "a6b76d561219b284027a1151b305c5243a9aae2dccf27008c84da7f35a77f1ce" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jdk-13-ea.6_linux-x64_bin.tar.gz", + "checksum": "b7ccd90609ec54d4220302c8a0e9fdc48b5dfc1986710634cf7901230453b072" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jdk-13-ea.6_osx-x64_bin.tar.gz", + "checksum": "82c3cd7e0b44c69b39ab3e609e07325e7a7a6cf1cddb7e64141268b068c554a6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jdk-13-ea.6_windows-x64_bin.zip", + "checksum": "68788a13eaea13575cfcc2a6270dbd1bf53c282ba398bde9432c48b8d73c6581" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jre-13-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "78067e78287af77f420c0e9fa9e4c5273f0612c0001ce1f0b2e3e837cf30f00a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jre-13-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "f3f2a57576bf867e461222c57217a9da8eb9a0a13169f5c84b74887bbd2a99b2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jre-13-ea.6_linux-x64_bin.tar.gz", + "checksum": "9faa8e64f754f9e1fd92b5b4f9eb91c5e7658104769606b3e460783271513a73" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jre-13-ea.6_osx-x64_bin.tar.gz", + "checksum": "e32339e04d6c2e78f9fd29287028290561e2140a39d0a3dd5f0e3cf6d46cae98" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B6/sapmachine-jre-13-ea.6_windows-x64_bin.zip", + "checksum": "9f49bfacccf86b091cf2e1577cb7444cbc4c88faf53ed9f48b8aba0ea36b1081" + } + } + } + } + }, + "sapmachine-13+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jdk-13-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "62a28885ab9d1b4e4607a4ba84b7e3cf0b09d2d11121367f71fd469688631170" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jdk-13-ea.5_linux-x64_bin.tar.gz", + "checksum": "13090e82a835c0a14130f50985ca87775622e56966874685c5cad393d3036d49" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jdk-13-ea.5_osx-x64_bin.tar.gz", + "checksum": "a620c90c3a79c4f1db2d9830ae614b325c59ec6da5ada9f9ce3d4640d0f4d1d5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jdk-13-ea.5_windows-x64_bin.zip", + "checksum": "5126269f2274341c89ddeab4556e3e9b433cc84ccd22c625401ae177c36745f1" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jre-13-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "e15b480fcb91342d22aec980b739d0d31a0dd585906b9fda12c9f3d35e16ca3e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jre-13-ea.5_linux-x64_bin.tar.gz", + "checksum": "b75cf642c7526b72108fb126f67682cfc26f80729a213c2e69d1b64d2b055a61" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jre-13-ea.5_osx-x64_bin.tar.gz", + "checksum": "d779405a70dad338378479ee1f42e7a5a226cfa8df67fdcd7d97c2acca71182d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B5/sapmachine-jre-13-ea.5_windows-x64_bin.zip", + "checksum": "d54d8d3c07942b2a7dbf26342d9299aa85812fd55e0b09e6b1f5a4a1f70ac53e" + } + } + } + } + }, + "sapmachine-13+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jdk-13-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "d533e4af285974c5b2e0e59f41ad167e40aff5623ef66a8e2da31bef9dc6b594" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jdk-13-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "12db02c25d76837433d45138d13d6371b48e402c0b7f79d915961ea9c9d0282f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jdk-13-ea.4_linux-x64_bin.tar.gz", + "checksum": "cb7b2807cc89ecb1f05cc2da5f193c321523368ea79a9ed3cb9618b83e49ff7d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jdk-13-ea.4_osx-x64_bin.tar.gz", + "checksum": "285564b415ca67bab121c9e374607800da1bd561c168cd43f43955bd2ed68d9e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jdk-13-ea.4_windows-x64_bin.zip", + "checksum": "1ec3180221de2ac70c4617fe166e7fbf3a87d7e9e5bb05849c5f3fad73388937" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jre-13-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "09d5a45adf8ce3f3b3dcd1d1cbfda89b0ab93dcd5f3c6f4f7367cb747953e27e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jre-13-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "7654cc75a6a450a3b35c894339119683865f947be342d4c72536a6bd932fea53" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jre-13-ea.4_linux-x64_bin.tar.gz", + "checksum": "7b2e525fdd56da55ec8d2045e867c0181385c1413ebfa4645bc132ce87345005" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jre-13-ea.4_osx-x64_bin.tar.gz", + "checksum": "3ed8d8b67344d12c89808c0cecad60a880071c1840ed96cbacf002e4db643f42" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B4/sapmachine-jre-13-ea.4_windows-x64_bin.zip", + "checksum": "e7fc77a55f0f7eda24a2f2227da2e88b1937d04a472bd27ced0932bea8c3688f" + } + } + } + } + }, + "sapmachine-13+3-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B3-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jdk-13-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "07b00bef611d21ec94687fbeca6e1dd4230a874dea10ddfd97c4448a8fcffea2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jdk-13-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "3721a51e34e695af5f8ec02ecc8280c1bd91165b1516a38481320624c5412288" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jdk-13-ea.3_linux-x64_bin.tar.gz", + "checksum": "726373ea0d2ea6d551409e4d9d0f62d9e9268f61572804d0abd8b8fadde297e5" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jdk-13-ea.3_osx-x64_bin.tar.gz", + "checksum": "e79d11a2af769666e9c004840a7d546371f12cb87bb04bf719dc53f1b581a78f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jdk-13-ea.3_windows-x64_bin.zip", + "checksum": "986eb3a6cb050997d35d83f8cf90e3c709fab0fc68e691446f7c9bc48e818dd2" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jre-13-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "59399fed75a99bf9b4e00262bcf3ac9e67891d39a02aa72ca31d2fde9254687c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jre-13-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "c63af1cdf23c85998ff3d1b6f95e0a93a3464de0c63f2f08e9113b50e6bd9bdf" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jre-13-ea.3_linux-x64_bin.tar.gz", + "checksum": "9113ed856d8abafb56d21364d393d385f7b90f1f96649e364cc7e9fd47a6b44b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jre-13-ea.3_osx-x64_bin.tar.gz", + "checksum": "a0133497eb22a9d56f1dc539b52771759fcd4f55cf0a921765d35f6fda8485cf" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B3-0/sapmachine-jre-13-ea.3_windows-x64_bin.zip", + "checksum": "93086e418853eab539f5845024c0bdc65c668c91a4d21971b8ff696060085513" + } + } + } + } + }, + "sapmachine-13+2-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-13%2B2-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B2-0/sapmachine-jdk-13-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "9f3c838a415070825cc4b10bd325e92b9b241279ea63a48c25477692cb098c02" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-13-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B2-0/sapmachine-jdk-13-ea.2_osx-x64_bin.tar.gz", + "checksum": "a3245b67f807b3fa7cdb459c381c503652ca0bda77adf6c63c35f5bcf530bae5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-13-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B2-0/sapmachine-jdk-13-ea.2_windows-x64_bin.zip", + "checksum": "2ce7366f8d0f18cad4b1c1f1783171768defd2acc283cebda1e6d3fd49219fa9" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B2-0/sapmachine-jre-13-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "565a4ac0c65ef14247cdc877e616d5a4e27e136d844e2fb4119c6cdc414a9c6f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-13-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B2-0/sapmachine-jre-13-ea.2_osx-x64_bin.tar.gz", + "checksum": "8bce02f425c47d6acb6d44ae2f9027c33d3e8a4cee5f02b993d0a64d1737d185" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-13-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-13%2B2-0/sapmachine-jre-13-ea.2_windows-x64_bin.zip", + "checksum": "0852140dd593c1db7a9e6d17250194526e676d4c1655c808daccd415c33ad203" + } + } + } + } + } + } + }, + "lts": "false" + }, + "12": { + "updates": { + "12.0.2": { + "sapmachine-12.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jdk-12.0.2_linux-ppc64_bin.tar.gz", + "checksum": "ea78c196de92d4cae7d18c536dd2b931d902b1321b70bd5ad536df04a6d22c30" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jdk-12.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "41bd642d24d369dea88f843cbeffede76eaa66298ffa47707852f347b2023652" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jdk-12.0.2_linux-x64_bin.tar.gz", + "checksum": "eca2903188702a58dbba34286e581c8e9b29a4323249ce0c2137313fb77d0272" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jdk-12.0.2_osx-x64_bin.tar.gz", + "checksum": "ede180009ded8bef782e41ad72bd242faa6749ac889297c01777559278fc4848" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12.0.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jdk-12.0.2_windows-x64_bin.zip", + "checksum": "6b2d360412ad2d998be257bea4b2fbaaa95fda6e1f6cfdbd2d1d6108220f03ab" + }, + "msi": { + "name": "sapmachine-jdk-12.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jdk-12.0.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jre-12.0.2_linux-ppc64_bin.tar.gz", + "checksum": "12366ca23c24c0ebd27171e47688f39ea5283889021ea32a85f16090a8d584d8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jre-12.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "e3d6701d34b066e00652afdba454a1eefae4e8a72d97a305c95faf63c302aa1c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jre-12.0.2_linux-x64_bin.tar.gz", + "checksum": "92ff16cdc59ba09b133726f4ea2c5e70b5ccd3ed31d0f6aec5205a2579a1c5d8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jre-12.0.2_osx-x64_bin.tar.gz", + "checksum": "91f62145fa53771a3f3971dcb0ead4837dc534c9c62badc5fff51c7ad42a5a29" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12.0.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2/sapmachine-jre-12.0.2_windows-x64_bin.zip", + "checksum": "d5ff306ec684b5b0edefc581b5ec49620e00de6cb6a591e465f6557dc15b2ba8" + } + } + } + } + }, + "sapmachine-12.0.2+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12.0.2%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jdk-12.0.2-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "ecad4443b54017d2d26d7435e31c5dcac3a5f6df49853cd2892aefd1176caaf5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jdk-12.0.2-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "7fafb623e42c715ce1f01dfa01cda8d650bbcacbdb408a3d69cc28044f131aa3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jdk-12.0.2-ea.9_linux-x64_bin.tar.gz", + "checksum": "f19b1c3ad77217766b50a3cf3dee1ebb1ca4dbd63fa3ec56ef930c6419f7e039" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.2-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jdk-12.0.2-ea.9_osx-x64_bin.tar.gz", + "checksum": "b401f92deb8d6c60c9324019fd628b900b4c0862bffbe712fc4757e8b2141466" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12.0.2-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jdk-12.0.2-ea.9_windows-x64_bin.zip", + "checksum": "d471e9f2d2ee2e13c501b5c66525fd8fb01d86ffdfb7e9b3e45999821f4dfd5e" + }, + "msi": { + "name": "sapmachine-jdk-12.0.2-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jdk-12.0.2-ea.9_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jre-12.0.2-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "6ba536587e6fa607dc1d827519baa013ccdd76e59e5be7d71374c262448cce71" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jre-12.0.2-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "4252f11205640b1abf01b38eecd21769122afbb682d28ada2fa3972d8fce915f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jre-12.0.2-ea.9_linux-x64_bin.tar.gz", + "checksum": "4093ef7b3ab811f3fe512aa9b6507be9116c646cb956bda7608ea2c2c37e3bb0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.2-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jre-12.0.2-ea.9_osx-x64_bin.tar.gz", + "checksum": "0e92892eaf693e5dca6cd6e6f65cca7249e361f79b77cf2fa045b8fd8f87b846" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12.0.2-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.2%2B9/sapmachine-jre-12.0.2-ea.9_windows-x64_bin.zip", + "checksum": "7e5ee65fa488e642b94b4972a3bfb7605963c65fe813e60470dbe44222a9bafa" + } + } + } + } + } + }, + "12.0.1": { + "sapmachine-12.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jdk-12.0.1_linux-ppc64_bin.tar.gz", + "checksum": "533b64035e2b6483f5f0f86700f886fdb3143cd922ec8decfebfdb118482b22c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jdk-12.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "4a929e1f08fa73069dff2f1cf962236b9a363d7db0237224a1e3b1caa327ae35" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jdk-12.0.1_linux-x64_bin.tar.gz", + "checksum": "fdb52c04bdbb18ccce87c16c8dda246c7f5ff8344d88bc46cbd2a3666fd27c43" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jdk-12.0.1_osx-x64_bin.tar.gz", + "checksum": "5094b7437356c00a8a347f8c178b10b0228bdb840248980ca28008b746a7fc05" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jdk-12.0.1_windows-x64_bin.zip", + "checksum": "94be7be2a9c201f8ea4718be168b461b6c01043b48801ff67cf32c801a32b5e5" + }, + "msi": { + "name": "sapmachine-jdk-12.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jdk-12.0.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jre-12.0.1_linux-ppc64_bin.tar.gz", + "checksum": "19559e5868a3582c2a651e2a8b4cf8c2f4404ee0562a03c159a96d8244844279" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jre-12.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "68993e422d4dd093f82e1198363ee6b23713ab689eb884870876a05f60c654f9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jre-12.0.1_linux-x64_bin.tar.gz", + "checksum": "761467fc6d75fb9562320f25fc355631ca988c1da956b4ae17fa137436ffb196" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jre-12.0.1_osx-x64_bin.tar.gz", + "checksum": "6d12e108d34a2ece8236d498ead3affcada73b32c1e1957237d9fb8fc419866b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12.0.1/sapmachine-jre-12.0.1_windows-x64_bin.zip", + "checksum": "1caa617737446d0d640fde50effb8aaee0fda57d97a5e1f233b7c1db3d4f39c9" + } + } + } + } + } + }, + "12": { + "sapmachine-12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jdk-12_linux-ppc64_bin.tar.gz", + "checksum": "9f8d28f1b19e77b1783fba6e11c0a94efb245e7ea839f7b9239dca88da907aab" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jdk-12_linux-ppc64le_bin.tar.gz", + "checksum": "3f965b9cd880cecc050b7d16446c17fa5c6971713d50b08bebbc5014dbfc2317" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jdk-12_linux-x64_bin.tar.gz", + "checksum": "2377b47def069adfc5ea15ccd291a57a9d0c854a9dac3650b5027b54ba963846" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jdk-12_osx-x64_bin.tar.gz", + "checksum": "c6fb21384e098756373072e5ec335ea688d6b2e8b4e7fdcff68b878a417ca35b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jdk-12_windows-x64_bin.zip", + "checksum": "14965af816d1f87df7752b6af7ad9c1502665cf9ba0a1e26d3929bf728ce915c" + }, + "msi": { + "name": "sapmachine-jdk-12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jdk-12_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jre-12_linux-ppc64_bin.tar.gz", + "checksum": "1b8122896576d8f03097ecb698e70a3e0a09337f916168dfc8cfd4d959f1aabc" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jre-12_linux-ppc64le_bin.tar.gz", + "checksum": "17b6d2eb9a5424a47b8f907b713d3267bc1ed7749b60d96c6398966c4cb48d60" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jre-12_linux-x64_bin.tar.gz", + "checksum": "a2d9280ddc4b04eca43a85fc60e71de88125ac87bf17f07ce9c82eb5ccb3cad9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jre-12_osx-x64_bin.tar.gz", + "checksum": "2e7e3f23c64e9a7d19ea548dc0d230041720ebfe049f87b27471d33d39cb4bfa" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12/sapmachine-jre-12_windows-x64_bin.zip", + "checksum": "5296bcbac8bdf04d8e268d902315797c3bbf283cbb4681d5b09a602c3a9ed103" + } + } + } + } + }, + "sapmachine-12+33": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B33", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.33_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jdk-12-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "a5765a431210a78c70e9596db73894091bc9fa6b928a75dc7371090bbc35ffa3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.33_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jdk-12-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "a7b4928c327aac940416e3f7b63380b3213fc039eba731973de3c3f176ca0d00" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.33_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jdk-12-ea.33_linux-x64_bin.tar.gz", + "checksum": "ec1b1b8181c0d0516d4532f16052a713f8db5a7b126d9b81b651f1337e2d041d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.33_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jdk-12-ea.33_osx-x64_bin.tar.gz", + "checksum": "aa5732bf1de28e5389690222eac41dfef982838d0c2a52f5f39a67b411715a56" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.33_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jdk-12-ea.33_windows-x64_bin.zip", + "checksum": "a792c41dbe807d7e404b0562d69dc2f139ed37ea74f23f2d0f69bc6bff39df3a" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.33_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jre-12-ea.33_linux-ppc64_bin.tar.gz", + "checksum": "a6209c6f391a6c1898d969a0ff7417ae9e3518df89f7768c88b532a6b3541a84" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.33_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jre-12-ea.33_linux-ppc64le_bin.tar.gz", + "checksum": "a2bd7b05d2f44136bf7e0c11b265061f1a34169149ee4266de214431704fd4e0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.33_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jre-12-ea.33_linux-x64_bin.tar.gz", + "checksum": "c0688d54009090a633003502a3f5201a481c80e5eeebb7621bd9cc98f46baa02" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.33_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jre-12-ea.33_osx-x64_bin.tar.gz", + "checksum": "baa9f05594d1530bc85183d618b65d4ef2417df678e5f9bf22292a165d72e694" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.33_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B33/sapmachine-jre-12-ea.33_windows-x64_bin.zip", + "checksum": "02dd62bfef3963517b9172f51711cad65b60eddfbda2dd4de264675fc3495ba1" + } + } + } + } + }, + "sapmachine-12+32": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B32", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.32_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jdk-12-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "96c4c6cf63265f6b9e895f9cf18f15d31cc7f0e8683b80130a0a1bbaf570d068" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.32_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jdk-12-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "45661a0666020222bd2a56ebba11f4040e23557d577a52a4eb2eab09a51ffd0d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.32_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jdk-12-ea.32_linux-x64_bin.tar.gz", + "checksum": "f921212a32d6a4d7aea5e27b5c434ee066dc77c7c8a2b3dc92c8ca74a1c31d27" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.32_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jdk-12-ea.32_osx-x64_bin.tar.gz", + "checksum": "54a8df68e5920f1a1e192ab30bed991a9d00e2e311c1d4438486f24edad6cf69" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.32_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jdk-12-ea.32_windows-x64_bin.zip", + "checksum": "74099039b8f27572295611693aa26acf450ce0fcd6873a7b300f37097c4d1919" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.32_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jre-12-ea.32_linux-ppc64_bin.tar.gz", + "checksum": "a50034df6d85a12677efeed7ca0666d6467fe5e19d978aaefb87e39c92b410a6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.32_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jre-12-ea.32_linux-ppc64le_bin.tar.gz", + "checksum": "9b3bc6d2db08ee3b275254ab0c5041857e08c999dadf0c6cf685e2eabd77a794" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.32_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jre-12-ea.32_linux-x64_bin.tar.gz", + "checksum": "7e3e36d08b35ca7d5882539f075536a03d5f7c2c69606fc8f4dd377815e44f19" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.32_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jre-12-ea.32_osx-x64_bin.tar.gz", + "checksum": "4596ddd97240c2f73ffe16d1c139e34c1790a4baaad5d1d323ae753b5e44d50e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.32_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B32/sapmachine-jre-12-ea.32_windows-x64_bin.zip", + "checksum": "59a79a2f1353009a9b654a6ac0e4d1287def04c5fe6ce217dd8b2c514b2b3937" + } + } + } + } + }, + "sapmachine-12+31": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B31", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jdk-12-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "b94e3ba303be7a0e71e4b30bcfe5576e7a03f0f0695f5faa0ad6ba1918c0d74b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jdk-12-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "f4a0628a1cb70a9bcc33963bd603901faa1bcd400dea5f398c40b9678c0bb9b0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jdk-12-ea.31_linux-x64_bin.tar.gz", + "checksum": "d73d3bc06df61086304f3fbc215ba13acfd735d01f545170819b6438837a22b5" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jdk-12-ea.31_osx-x64_bin.tar.gz", + "checksum": "654a86874783bb2246de546dc1d63f08eb8bb456a9e72a39f142be8ab5f9c72f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jdk-12-ea.31_windows-x64_bin.zip", + "checksum": "d2072f0c15cee701d414e0531df9a6375b2dcac47c784c280d785b225ef104ce" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.31_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jre-12-ea.31_linux-ppc64_bin.tar.gz", + "checksum": "9cd6135d08118dc96a7d08a8d45d2a1c08dbaf75bce59df7a358b9311bfd4007" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.31_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jre-12-ea.31_linux-ppc64le_bin.tar.gz", + "checksum": "9837bd8b7313ad2ba906f5e34db61486917950378ceb1e3ffd7f74baef3c299f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.31_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jre-12-ea.31_linux-x64_bin.tar.gz", + "checksum": "1bdbb77e37bd2e9f143b734d3c0c47aa9159be8f4f4fca234c49bc327d57d196" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.31_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jre-12-ea.31_osx-x64_bin.tar.gz", + "checksum": "3a40cd5c50ac8e60988fe7f1564b562504aaaf751d7bfb074b342e3ce4091d44" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.31_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B31/sapmachine-jre-12-ea.31_windows-x64_bin.zip", + "checksum": "68dc49e8cb40fe5bd6d5ec58e772b47b02a65788474746a4d4a92b877818cb6a" + } + } + } + } + }, + "sapmachine-12+30": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B30", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jdk-12-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "9db0487ca729d1f7d8c18e62e332ee4d9955a4f6d75ff7e3e6fec2dc09ef1832" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jdk-12-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "f6141ddf8f427a77be3741bc9844ff10ad8f44787c47824de837cab18f49f81c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jdk-12-ea.30_linux-x64_bin.tar.gz", + "checksum": "5d06f6ce9874c416a8f7d7471cb5e871e03f0701f4024be634072fa64421a603" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jdk-12-ea.30_osx-x64_bin.tar.gz", + "checksum": "449e2b02ff5b46eec803adc11da9e774111d45da4ef4c2dd956166a7f6f6190c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jdk-12-ea.30_windows-x64_bin.zip", + "checksum": "26c465982578aa17790ac8ce2fb03ab3d73fb05bc486f16b911478f31c4278ff" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.30_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jre-12-ea.30_linux-ppc64_bin.tar.gz", + "checksum": "b0c1bcb3a93f77ec0ac0c7377095aa4a7f7d6f5844247820040fe2d6df6eb5a2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.30_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jre-12-ea.30_linux-ppc64le_bin.tar.gz", + "checksum": "4adbf7041ca0fe30da0bf5cf7ca92bc04e0a426b05b501b705d3f426a6c746c7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.30_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jre-12-ea.30_linux-x64_bin.tar.gz", + "checksum": "c8e0692f9f74b3a985b9e9c87cb681f3f1daa8c9449953b375533686433bcee3" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.30_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jre-12-ea.30_osx-x64_bin.tar.gz", + "checksum": "ed328b192441a13f8a9675481f593ae392ee99ef366bdbc05fcc25dbcaa17748" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.30_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B30/sapmachine-jre-12-ea.30_windows-x64_bin.zip", + "checksum": "eb6cc3e6b6bc86551fdf80633cdfe9c2c308d495d43363064984f2712a6ffdbf" + } + } + } + } + }, + "sapmachine-12+29": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B29", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jdk-12-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "50a41f9a3849aef4dc2ae4d678582bce95d950d9bde9a62d3df32e9160aeae21" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jdk-12-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "551ad86283b9054066ccf5ffeb52ae88c0a01e9b5c7954e05077b7639e949c47" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jdk-12-ea.29_linux-x64_bin.tar.gz", + "checksum": "a3026dac66763358d1376cb54913a7678b9b138652fb317577d124494a898abb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jdk-12-ea.29_osx-x64_bin.tar.gz", + "checksum": "ccb16fa5f1fdb1c3fc4eedd3670b53287652816d2a4576ad40c5dc5644933d1a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jdk-12-ea.29_windows-x64_bin.zip", + "checksum": "5e17f28b0078007811beb246e088192f2a5331b11ac9b1c33b149475a6929587" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.29_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jre-12-ea.29_linux-ppc64_bin.tar.gz", + "checksum": "ced16944dbc7ef7642481efdfe4ab3c2ec71beca12a3e8ede6a7280424e70615" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.29_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jre-12-ea.29_linux-ppc64le_bin.tar.gz", + "checksum": "5e2c04fc1a64ef27cb3b3b57ea6bd26b0351ab966a3ef005e5a082a3565db7dd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.29_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jre-12-ea.29_linux-x64_bin.tar.gz", + "checksum": "cdb87c82c83138fd9d6245cbd084d014f4245e72f2ba62f3df2ac53a432460e0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.29_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jre-12-ea.29_osx-x64_bin.tar.gz", + "checksum": "2ba189d292b55074ed2d52e947805a7dfd690e8f563f092772ac9b24c6802568" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.29_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B29/sapmachine-jre-12-ea.29_windows-x64_bin.zip", + "checksum": "b758f91da493f1d040a478f4a9fba4d517151fc4dc10803f2e5f26c1746ef572" + } + } + } + } + }, + "sapmachine-12+28": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B28", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jdk-12-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "fc3c24ecf9896dec67a2a5eae93a944e8fad613031821198dbf32e7fbfbfd94d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jdk-12-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "6c93a072c6e0a36ba194c81bec905597303761bc966cd411627c28d52100dc06" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jdk-12-ea.28_linux-x64_bin.tar.gz", + "checksum": "6dd12034cb670724baf70233cce3b6fd1b6e99f11a1ad44b566dfdf7d3a8d834" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jdk-12-ea.28_osx-x64_bin.tar.gz", + "checksum": "017a82f5cd4483c49749230ec07e62a1105186da90c5c5387d3066150a9847ac" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jdk-12-ea.28_windows-x64_bin.zip", + "checksum": "565f4d230836447b6153b381137561b6898cc541d215e71411e08f4a86286e6e" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.28_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jre-12-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "bef1189f00d2dc0d5d35a7adf885159db82418e89f138ed513056300c8c58eb5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.28_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jre-12-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "ccd27101d8df012c0149ab398964ac01968b14267cba6f1f5c9fdd34175acf3b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.28_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jre-12-ea.28_linux-x64_bin.tar.gz", + "checksum": "b111e2928b0872227e36527734f2598063318948ea745b13875df6a0c66f5307" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jre-12-ea.28_osx-x64_bin.tar.gz", + "checksum": "9d2239ff6a622009d1cbf71e95e1409b319182b4ee7f56f79f68a5677c9ef311" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.28_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B28/sapmachine-jre-12-ea.28_windows-x64_bin.zip", + "checksum": "1a965cf521494fd2a28c7ed0feb37f81e9801831943b50b166232ebe8b7ca215" + } + } + } + } + }, + "sapmachine-12+27-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B27-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.27_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jdk-12-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "e31ba56591e41735529a7ee0a05199ee2a530e0a38acd54fa4688dde5ee6e21e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jdk-12-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "e9b2f2e18c9538c68e676c8b96658b09e5340a0aec7142482c8e3d68e1476d42" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jdk-12-ea.27_linux-x64_bin.tar.gz", + "checksum": "a2f888effe325a6f3bafc939e59b01de2cbab19bb4904f4331dd96c92af9f80d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jdk-12-ea.27_windows-x64_bin.zip", + "checksum": "3d1d48bd8b3e58b367bc4cb5dc91928eb9a1431880868eccb6108fda7fc88671" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.27_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jre-12-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "26e6033ceb1bcc43e779eead26f8b24147a56b8868f359afe996c8538e2b01ee" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.27_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jre-12-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "2e1ee6ab4e0dfbfe94b19269d5db1f2c0d9a2fd1a8e519fe241704b2d9489b73" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.27_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jre-12-ea.27_linux-x64_bin.tar.gz", + "checksum": "ba2a6a933ed99c6b6ff6969ca133646f0a7feda23c052929692179d1da976ba7" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.27_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B27-0/sapmachine-jre-12-ea.27_windows-x64_bin.zip", + "checksum": "216e651ca238af0576e6837253291debea1a8fad12e9b2dcb3a8f5a9f4321d8a" + } + } + } + } + }, + "sapmachine-12+26-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B26-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jdk-12-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "64d4a9a6dc7145379a6b650ee28b19e88a5cc7aabebe28e06ced6dc1c22264a8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jdk-12-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "c3c2d4ec6fbd412a47e8df52a2dc019c353aa52caf0b00b14d0c226bbc21a088" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jdk-12-ea.26_linux-x64_bin.tar.gz", + "checksum": "06db71c71d2a414365b084366656732c48baec2ed079abd853eb03f9c24ea33d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jdk-12-ea.26_osx-x64_bin.tar.gz", + "checksum": "cd54674a079b6fd6ea18b177cd64af9638028eab0b11df161badb1f5dab7c35d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jdk-12-ea.26_windows-x64_bin.zip", + "checksum": "50f1e37f49ccd2bb61efd1fb5f9fcc8b53904972b444d3eed68da585aca8d5f5" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.26_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jre-12-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "2c5e7841275fb6b5280155639dea0be73d3bca8cf2acf4f2806f6c02da988ece" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.26_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jre-12-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "612afa9ec47c67d0d97d71861b711392cb747c5d05639e541544e9fb6d3cee1a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.26_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jre-12-ea.26_linux-x64_bin.tar.gz", + "checksum": "317e3131980e84c5df35abc47868faa3c76341f5c1196e6b66b203018a5e6d82" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.26_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jre-12-ea.26_osx-x64_bin.tar.gz", + "checksum": "1abc2ea238c951eb6aad3c8eba9a28f414d4215bbdb801f0a15093ba7bac617a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.26_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B26-0/sapmachine-jre-12-ea.26_windows-x64_bin.zip", + "checksum": "2d1d590dcda6ce0c288411f3e2a5bdd36c1a988fc4129c3a241d55c4e18b9697" + } + } + } + } + }, + "sapmachine-12+24-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B24-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B24-0/sapmachine-jdk-12-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "832909dced77d1d1ec72f1f707eb64b7a0e520d01fd06d0fc971ef579bec3a2c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B24-0/sapmachine-jdk-12-ea.24_linux-x64_bin.tar.gz", + "checksum": "e4272033754271da91f6fbf78dba4d7a0920c6486a67b386c0b1222850fd42a7" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B24-0/sapmachine-jdk-12-ea.24_windows-x64_bin.zip", + "checksum": "8644d577bcf60507e51dbfa1236c8461e1f5d3d7157f276c269e100df4a02772" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.24_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B24-0/sapmachine-jre-12-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "a56b50086a5a70ff6832f420bc203512ccfdd61144b5926c5ea2d7df2d109f29" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.24_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B24-0/sapmachine-jre-12-ea.24_linux-x64_bin.tar.gz", + "checksum": "898cc6e86e58f391f6043effd747b83d66301f319bd7d77a61f99d2fe7233941" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.24_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B24-0/sapmachine-jre-12-ea.24_windows-x64_bin.zip", + "checksum": "899386287e86e98a5bce77af90938ea481b01c420afc0d5fe4ca6ce1c45e65db" + } + } + } + } + }, + "sapmachine-12+23-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B23-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B23-0/sapmachine-jdk-12-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "561daff91b9d23ea126ec6f2cdc4515bfdb8515ca9d3be6181f398881694ae92" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B23-0/sapmachine-jdk-12-ea.23_linux-x64_bin.tar.gz", + "checksum": "22690ed87ef67aa7b88207bd1d752f38def7cf0f663ff8d98362b4086613b063" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.23_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B23-0/sapmachine-jdk-12-ea.23_windows-x64_bin.zip", + "checksum": "a85f1d1279c0c2a3b24cd2bf16b2153c57ff9a195695e1a6d14b51a5d767867d" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.23_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B23-0/sapmachine-jre-12-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "9d8eec79d3a1eb2e0451da55c9a368d1f9cd440030c425673c613ad1782c1642" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.23_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B23-0/sapmachine-jre-12-ea.23_linux-x64_bin.tar.gz", + "checksum": "0945da9035fb804dedbbbb60a878f9e5141b21f950c74058c41bb3459019c90d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.23_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B23-0/sapmachine-jre-12-ea.23_windows-x64_bin.zip", + "checksum": "0c0c50b9683682fe084a9c8ff28d340f63f575f92148a56b4aea68beed070557" + } + } + } + } + }, + "sapmachine-12+22-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B22-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B22-0/sapmachine-jdk-12-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "a387f6272e93a208b4eac9aaf84382114588fc5de04d8861fd8c8185374b8018" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.22_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B22-0/sapmachine-jdk-12-ea.22_windows-x64_bin.zip", + "checksum": "75183321cc5debda500dc7fac9c13c6f33b705291a9c8f3fc97e8a1476640d21" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.22_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B22-0/sapmachine-jre-12-ea.22_linux-ppc64le_bin.tar.gz", + "checksum": "88704f530c82632d71c9fb06aeac461bea6654e7fb26d4fb1f2ec5cfa3ded397" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.22_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B22-0/sapmachine-jre-12-ea.22_windows-x64_bin.zip", + "checksum": "6e3d4f8b5b901ebcb01402667ee77a7d8c825455175fa1dd37eff1e09ddc405f" + } + } + } + } + }, + "sapmachine-12+21-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B21-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B21-0/sapmachine-jdk-12-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "4b12104a2534744766f404e33746c30df3ba370b642b3b86dee0398d3055702a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B21-0/sapmachine-jdk-12-ea.21_linux-x64_bin.tar.gz", + "checksum": "8c88c3823c1887b4d6f4ba06b585130f0dd499d573014782933986a7f6dcff84" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B21-0/sapmachine-jdk-12-ea.21_windows-x64_bin.zip", + "checksum": "9b93b5d5c1ce2d1b32bcc973f17260335082c0bf669ce9b3bfe315e7dfe6cfa3" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.21_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B21-0/sapmachine-jre-12-ea.21_linux-ppc64le_bin.tar.gz", + "checksum": "6770d082075e36f0995484b161412642a75c6147557a0e1c9ec5f7746f3c4f47" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.21_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B21-0/sapmachine-jre-12-ea.21_linux-x64_bin.tar.gz", + "checksum": "6a0a7e52bfbb6d01b286f1b2ba4a4a268031061247965a851261ffd9558f0652" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.21_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B21-0/sapmachine-jre-12-ea.21_windows-x64_bin.zip", + "checksum": "5b1dab908158c0d34c8f36dcda7f79f5d164f419ed6bcf29f50943da772f59a0" + } + } + } + } + }, + "sapmachine-12+20-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B20-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B20-0/sapmachine-jdk-12-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "23f54aae4a1646bb011d4533d415e211d57548506965bfb2b483ff9eaf568ebd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B20-0/sapmachine-jdk-12-ea.20_linux-x64_bin.tar.gz", + "checksum": "477adf3d804147f8cd8076e3f6554c6b9025b7c4e2ea826a25a64e5cacaaf6ca" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.20_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B20-0/sapmachine-jdk-12-ea.20_windows-x64_bin.zip", + "checksum": "a0ddaf5c90f5f8997cc5448c389f8ae477cc06245b660ca5e2161e0309c9c234" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.20_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B20-0/sapmachine-jre-12-ea.20_linux-ppc64le_bin.tar.gz", + "checksum": "fc99e377cf08651242e6c6b6f1ec3d5fe3dfac39cb0275994eba28ad7a588283" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.20_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B20-0/sapmachine-jre-12-ea.20_linux-x64_bin.tar.gz", + "checksum": "298f814f0c74d8b45a728054b6b3813381a261087da02a0bd352eb315f0c807d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.20_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B20-0/sapmachine-jre-12-ea.20_windows-x64_bin.zip", + "checksum": "d60a81e745093b166d538c414a925436b22b46c48e10a4e65d2f10ca13b189a4" + } + } + } + } + }, + "sapmachine-12+18-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B18-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B18-0/sapmachine-jdk-12-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "6bfd6cd824f2f74db608b28f91ccce59e58e7dcfe05fc6a19170bf5e0f014eab" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B18-0/sapmachine-jdk-12-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "04f6fc3dec6e388a84ba829fede0d1cce08dcd1c62713d0636b3060f81ebe4c3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B18-0/sapmachine-jdk-12-ea.18_linux-x64_bin.tar.gz", + "checksum": "37f567c96c1617153ce0a3669c5ae06f631936702eb5d9a81cbcee4e3f68d758" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.18_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B18-0/sapmachine-jre-12-ea.18_linux-ppc64_bin.tar.gz", + "checksum": "41b023a511f6d12089c2fff0e03a1512c990eecb1947fd48f05f652959dcdd8c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.18_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B18-0/sapmachine-jre-12-ea.18_linux-ppc64le_bin.tar.gz", + "checksum": "d7ed3f631e5ce15425557a19f24a2b40b90e3c29d48dcf622bd48de54d1a1973" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.18_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B18-0/sapmachine-jre-12-ea.18_linux-x64_bin.tar.gz", + "checksum": "ee42b3a097f31e15f8b914f5ae938a0bd0a9d4fe288770ff862a718cfbf1b0fb" + } + } + } + } + }, + "sapmachine-12+17-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B17-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jdk-12-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "c23111b3a404b3d23f6291f3cfac830d800f4b1ad0a1647878f2fc3384e46875" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jdk-12-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "1f9c4fbd818f752860abb8475fb9766f29b47a638cb23109dd7409b5715f3096" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jdk-12-ea.17_linux-x64_bin.tar.gz", + "checksum": "2a8370031fc5bf7222153191268634e77d04428eedca1b366e96615ead27b31d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jdk-12-ea.17_windows-x64_bin.zip", + "checksum": "375f1b836dd596004e24f7e28fc9cb0142774b252a56947299b3e42b02e793b7" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.17_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jre-12-ea.17_linux-ppc64_bin.tar.gz", + "checksum": "3805b7cfc8107fd833c1fac205feeb8f492ca39cb1821bd04342e2d81b080256" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.17_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jre-12-ea.17_linux-ppc64le_bin.tar.gz", + "checksum": "856b8dd553a8733279e86878bdd68c2706c40e82bedcad82e446fc7b02fbe0c8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.17_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jre-12-ea.17_linux-x64_bin.tar.gz", + "checksum": "9b095eb317b98e40791e0780232dda7ca83307a62afbb0b7434996262bd846af" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.17_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B17-0/sapmachine-jre-12-ea.17_windows-x64_bin.zip", + "checksum": "64071832f2d74b0965b63d4e04d43736f6843ac9358b85d17f1b300388459265" + } + } + } + } + }, + "sapmachine-12+16-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B16-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B16-0/sapmachine-jdk-12-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "ca18f894e9fd9fd8aaf31dea351ce580995497ca3b613ddf2f42c10d62e1386b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B16-0/sapmachine-jdk-12-ea.16_linux-x64_bin.tar.gz", + "checksum": "e95e55901250d994c3eda1ea4738822650ecaaecb0959c65fa06e0fead361fa6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B16-0/sapmachine-jdk-12-ea.16_windows-x64_bin.zip", + "checksum": "8261e6af60c98476b2e9a3f67f16b2766df59546d58922a1d870fd3097ecbc57" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.16_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B16-0/sapmachine-jre-12-ea.16_linux-ppc64le_bin.tar.gz", + "checksum": "d1d80cbc6d3bb034b298a54e52bf7aa893139c1af8c870c1f7ed84a3d32237ed" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.16_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B16-0/sapmachine-jre-12-ea.16_linux-x64_bin.tar.gz", + "checksum": "4bb4dc62241676305e41ee52adfb32da6792fca34d152b12c985275fd66cba01" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.16_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B16-0/sapmachine-jre-12-ea.16_windows-x64_bin.zip", + "checksum": "c9adaa782c2b9c7ab8dd6e3e07143c76b218fb84854327ea974d818a3553edc9" + } + } + } + } + }, + "sapmachine-12+15-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B15-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jdk-12-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "3a1fdaec763206e10a69130fb454fe80a5e05fdbf01e6c7dc44e73a13c0af3d7" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jdk-12-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "865833d1700b19f0059062cd3dd737770d4c37a959e755538fa37ba3a0e3bd27" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jdk-12-ea.15_linux-x64_bin.tar.gz", + "checksum": "8512398e38fb658debb8e167208b09e609110417fc753c6a9020fc45146e1900" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.15_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jdk-12-ea.15_windows-x64_bin.zip", + "checksum": "a526ee1e19b4cb0dd196a3da3ca3aeac2b1484a9c82cff9acded042fefc61ba9" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.15_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jre-12-ea.15_linux-ppc64_bin.tar.gz", + "checksum": "010e87b4c61217f28c9afbb34d41d664606fe84c63fe90d4ef73379e3dac8a43" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.15_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jre-12-ea.15_linux-ppc64le_bin.tar.gz", + "checksum": "6a50113fe2a632b2d38447894b7e2cb0a64e948f3f3ca624c6fd1569962957e5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.15_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jre-12-ea.15_linux-x64_bin.tar.gz", + "checksum": "994867a7732e75b50cf1b942313410487a8e3d43af2ce4a021cb185449ba60f1" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.15_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B15-0/sapmachine-jre-12-ea.15_windows-x64_bin.zip", + "checksum": "c95b0fceecc5a787d31a3097cb6eb4421d0635134cd6b8367df7b897bd37f996" + } + } + } + } + }, + "sapmachine-12+13-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B13-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jdk-12-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "452c7ac5babb9e823cdb2d7e8da85287bd7aafe175c4b0bae950310108e49772" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jdk-12-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "39b61ebb605dbd72fd921e26a3849b6ae7adb553e34b99e4f0bc0d28e38f73b6" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jdk-12-ea.13_linux-x64_bin.tar.gz", + "checksum": "c607dd05f063c8f43a91b608da82f39e08cab1e706a8c9a8c0218b2d859e683e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jdk-12-ea.13_windows-x64_bin.zip", + "checksum": "40efdf92e5e65ce7ca86d40c9393a06ba0bc9b39be08c0425a437c5dfdbb5900" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jre-12-ea.13_linux-ppc64_bin.tar.gz", + "checksum": "487119a8c4806680bf7f95e7ba5d1cd737505cd28a3305f4de32904622c6270c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jre-12-ea.13_linux-ppc64le_bin.tar.gz", + "checksum": "0f58ef414751ec7db1f42582fa164a525ba2815b237a6adc878bcd4ed6a3d5d9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jre-12-ea.13_linux-x64_bin.tar.gz", + "checksum": "3a9d4c462d60e64789d5b4a28d6f1cd9e6e6f35ac1f30aef109aa43d9354e4a2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B13-0/sapmachine-jre-12-ea.13_windows-x64_bin.zip", + "checksum": "eae96c05ae2865c2de300d62ae887464f3bdc74221f22410bffaa333404a7642" + } + } + } + } + }, + "sapmachine-12+12-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B12-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "8ad7974c87eefbf9bcfd4c95fd99666731b6fc87e4cd98ecd7496f7a0b0ce434", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jdk-12-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "837067d2778a1dca2444990538fe6447ff988eb988e415cdb4b8f02862450e2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jdk-12-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.12_linux-x64_bin.tar.gz", + "checksum": "c5ea7424939cd594d6be2e35836ac9eed67d8e5a8a3d2828fd3f8ca7e4e6a249", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jdk-12-ea.12_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.12_windows-x64_bin.zip", + "checksum": "0e0f7c7fa204cb5989f19ddbe3afaecedf0d2193543a83b52172f3c484154a89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jdk-12-ea.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.12_linux-ppc64_bin.tar.gz", + "checksum": "f5d8954e4462ea1a2a82241443788ba6b46e94d9172d9a220690b2ead29bc9e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jre-12-ea.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.12_linux-ppc64le_bin.tar.gz", + "checksum": "fa4a7589166bdf28b7211e92d3a3e9fa47962a49321117d6c224a2ec478cdf50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jre-12-ea.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.12_linux-x64_bin.tar.gz", + "checksum": "dd3913089ff3a073ce5822d90e610ae97c72f17edb82bc9a1570bd200b387e86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jre-12-ea.12_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.12_windows-x64_bin.zip", + "checksum": "dbddd67acc09d4271a33210eba9a255157e45ded5bc14f7456e4ac9b1c2f81af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B12-0/sapmachine-jre-12-ea.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+11-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B11-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "85144d223ab959a6bc4cc0e413f7cffa060d410cc19866016e346e2b1a857aad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jdk-12-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "c2e44f36ab6ed05895f93d5afecc3556a976bdd1589c4fb6578b3b0b09f9c4c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jdk-12-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.11_linux-x64_bin.tar.gz", + "checksum": "50e859d881cfe6cfd839149747117ba685932abe0169fd2ba7f270a87afba3f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jdk-12-ea.11_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.11_windows-x64_bin.zip", + "checksum": "5388548b31dde7c7509de79c7f4dc097de88b1faada028645cc899c821683b2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jdk-12-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "56b9f213750a5497681d63fbf3ac4241d6e979d61f18a85a2d148ef7950be3ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jre-12-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "6c04dabb734b8f2408ddfcbf4ca0db51644bacc380ca9216480096e2e469e122", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jre-12-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.11_linux-x64_bin.tar.gz", + "checksum": "860cc98a2ee69b5a9dc3a7b3e5b695d9892e44580a4e33674f4c19f6e5e45dd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jre-12-ea.11_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.11_windows-x64_bin.zip", + "checksum": "d4f9d9d7ffafde6ea45e0c30002a0959e20e538b9bf5534fab10882c127d47c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B11-0/sapmachine-jre-12-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+10-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B10-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "8482c7d4869ef2e8abe082fe682100e625f0cb895397df01fe1c4315e1091197", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jdk-12-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "99518b1863ffe96ebaa71a1d45b55c7414f29417b03b8fc83e7a3aea5b860d7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jdk-12-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.10_linux-x64_bin.tar.gz", + "checksum": "51b158edc0c432e1fc2650041499d67b74d30e7dd1cc25accf5f00267a391f45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jdk-12-ea.10_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.10_windows-x64_bin.zip", + "checksum": "db58fe91aafb101de8bb98191b44000d8466bf298b41290276aec41a8f85e63e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jdk-12-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "a3925b65535d029c4cc954799e4b3cc65b5b6ee5d009e1c0d4c41bb87a373604", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jre-12-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "a4b1ba0fcfd3cc414230920dc914b3a5ff6f22e65923482038c6c9c172b424e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jre-12-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.10_linux-x64_bin.tar.gz", + "checksum": "30d34c76b790ac2146b47677dd49ffd520f904f1610b6d09482c14814af9e902", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jre-12-ea.10_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.10_windows-x64_bin.zip", + "checksum": "dc929b8b3d6bc09922c66427440e0c55074d661b5fd58594ebc01169bb42b70d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B10-0/sapmachine-jre-12-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+8-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B8-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "376385c28f370ce7d95da8fb77997e400c237047da6720814a5326d133a29a7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jdk-12-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "87d6fbc324cedee42d40eca3944dba1bd20cf8c633b38f8e44822324b5b97791", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jdk-12-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.8_linux-x64_bin.tar.gz", + "checksum": "cb4b04a74148f79a63f4744f19bb716e8c2038cafe04e51e3b39570c50c1ac40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jdk-12-ea.8_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.8_windows-x64_bin.zip", + "checksum": "bbe5a51bb91d10bfea2ad4a1c6ff398f6a31cb8b6578605efea1a1ac8c904725", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jdk-12-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "34a039d5390251fea11c781885f3281230cb933382fff90433ec62e7a17ffc2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jre-12-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "a9a0e38ca2f8ec97d0a580fa8b2d40c444e618945ed9d163b1f14ecc26a573b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jre-12-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.8_linux-x64_bin.tar.gz", + "checksum": "7432b818b9053c6ed2c72bede5ea5c178cc083d95871d5527693933f98e8e156", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jre-12-ea.8_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.8_windows-x64_bin.zip", + "checksum": "a43584d2924b0f5c42f096e39c0463e62577bebe17b831c8854c7ef75d7a246b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B8-0/sapmachine-jre-12-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+7-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B7-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "9d8117994ac95ba9f055a84c63ea59d1235f5ada4732a1847e7e343924101fbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jdk-12-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "fe11cedc37899726a789b3a3e6087bf615bf099e4b422a3775f6b316d49ee1d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jdk-12-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.7_linux-x64_bin.tar.gz", + "checksum": "efae5b5546ad711985bd79a0e9684a4e2a73f4cb305add9f021037cf08861678", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jdk-12-ea.7_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.7_windows-x64_bin.zip", + "checksum": "920f352ed4afe795cdf49a71caafe8af962d3e9dd47830cdb65f030b5909bb78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jdk-12-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "3551c2820c20bda9cc95169afb1b8c8aea1ef2d90531383d49d0cf6a4301cd69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jre-12-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "7069298dec98c9e33dcb72d8c8b9720abe1467ce13526e08ba9642b5aecc01a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jre-12-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.7_linux-x64_bin.tar.gz", + "checksum": "984e2f5a501074ba8d911ab9195ef64ac04d59d16d505e0d4998474b72b62612", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jre-12-ea.7_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.7_windows-x64_bin.zip", + "checksum": "86bccfd9a2c7b964df81743fc0fbb7c52bd3cf327f2b31d28b54b14d2b3adb76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B7-0/sapmachine-jre-12-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+6-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B6-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "31c1901a3f54e8ef93e8cdaaf70873f919d61963b642fd293c99fec0cfcaa8e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jdk-12-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "e71d2bc9b13ed780bc2e57a850505d55e507278b47f89c4ed062369e3b19ad2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jdk-12-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.6_linux-x64_bin.tar.gz", + "checksum": "7ac83112d57356d7f8ca9399525a26357e8d6fdae648eec79e41e45a487ef222", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jdk-12-ea.6_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.6_windows-x64_bin.zip", + "checksum": "5a7dda2e0f03965702070968bb1c095dc916e1641d3bc2e9db368c5f9ba2f794", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jdk-12-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "53104632637e8c24cd78c2cb4fc950df8996be806e63cf016e262d0185edc347", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jre-12-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d5a8659538ba17947745dd869087cc539f5e01e3194e712cde9ed7ba684914c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jre-12-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.6_linux-x64_bin.tar.gz", + "checksum": "031e291a6f7b0860227376bebed41233cac252bf07fc5eb07c029e645b5d3ddb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jre-12-ea.6_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.6_windows-x64_bin.zip", + "checksum": "d3d5a0894404e3315e70484d55c81df2b300a8bf7f2004f2eab8223e48447a4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B6-0/sapmachine-jre-12-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+5-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B5-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "3ccb831cdb7e7ea8da192419f4f39f1b6e1286bf958a71650517bf690fcdcc55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B5-0/sapmachine-jdk-12-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.5_linux-x64_bin.tar.gz", + "checksum": "fef358c5a8562acab1d49489c92b2cb9320d1e24e25620e2af51d41e1dc43028", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B5-0/sapmachine-jdk-12-ea.5_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.5_windows-x64_bin.zip", + "checksum": "5a0dab3ad2e82aa4b421d47fc3dca37e282c326d0ecdf120280ad275610c5dbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B5-0/sapmachine-jdk-12-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "c5b8a4d6dacbe4a2f5a280b11cdbf9336c59b833cc2be88b549239ab0b632df5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B5-0/sapmachine-jre-12-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.5_linux-x64_bin.tar.gz", + "checksum": "590bef3cacacc8780c06eb64828d4bdd4ca56d857085292c0dcdb1d8a669f77a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B5-0/sapmachine-jre-12-ea.5_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.5_windows-x64_bin.zip", + "checksum": "6b9764eadc50d5fd5e8ade10a391e70a096559469045836b943451b172abfb14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B5-0/sapmachine-jre-12-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+4-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B4-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "cc93a76495add59e765a37f977c6ec9883ba8668c02fd19be3f963d9580b0818", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B4-0/sapmachine-jdk-12-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.4_linux-x64_bin.tar.gz", + "checksum": "c216ed33c0fdedc3a7d0d4fc6207016a5e0e1d5e4f2762852ce78cae8bf48471", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B4-0/sapmachine-jdk-12-ea.4_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-12-ea.4_windows-x64_bin.zip", + "checksum": "9c2c2617f96b5c8dc42dea61d44c383d70365acb57252926337a801694830cfa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B4-0/sapmachine-jdk-12-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "ef67865a498fad4a2d439631e2dbf2ba87a6a3ffeb015d71ae27eb23062ef6a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B4-0/sapmachine-jre-12-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.4_linux-x64_bin.tar.gz", + "checksum": "b246e1386be059b0181a1d5b86c1dce7489fe26e399b621af3ca17c080bc05b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B4-0/sapmachine-jre-12-ea.4_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-12-ea.4_windows-x64_bin.zip", + "checksum": "0918f98892d0ac26fe7376b3e6f6c29256e83eacb64bbec42e9120b9e75f560f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B4-0/sapmachine-jre-12-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-12+3-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B3-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "672a755b46a020a68a2fb55302a9b364ed1b16af50cd68286e9a140453bdf417", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B3-0/sapmachine-jdk-12-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.3_linux-x64_bin.tar.gz", + "checksum": "862bf45a6b9776df9473b5634bbaacca6e71eec9619c4077ccbeae5e2f5390a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B3-0/sapmachine-jdk-12-ea.3_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2e1268d92c1b274d41e9bef99b602a22fb9160fe7d3a5cec2f307a4936dbe460", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B3-0/sapmachine-jre-12-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.3_linux-x64_bin.tar.gz", + "checksum": "ca965a3265c56e3050e5e020a4e74725a00f2fbb4c1c653cbd72060ce316db4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B3-0/sapmachine-jre-12-ea.3_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-12+2-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B2-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.2_linux-x64_bin.tar.gz", + "checksum": "e94db1027c24fa03a4f60aaf30797b6c5dff64d01d0a65051dc47836803d6c3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B2-0/sapmachine-jdk-12-ea.2_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.2_linux-x64_bin.tar.gz", + "checksum": "4c7e21f5e54e9744dabcee133a85decc724436680370d50d6acc60392be5c25d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B2-0/sapmachine-jre-12-ea.2_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-12+1-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-12%2B1-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-12-ea.1_linux-x64_bin.tar.gz", + "checksum": "b0ef4cc72b6ce315a7291b7a94e70d82a3ef4c1841f49fd69e48fa4a47af9b3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B1-0/sapmachine-jdk-12-ea.1_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-12-ea.1_linux-x64_bin.tar.gz", + "checksum": "ac75490538b7e1b7200f619752ef69954bd0fb8337292a3233e7ce5c5c821a2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-12%2B1-0/sapmachine-jre-12-ea.1_linux-x64_bin.tar.gz" + } + } + } + } + } + } + }, + "lts": "false" + }, + "11": { + "updates": { + "11.0.23": { + "sapmachine-11.0.23+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.23%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "e66771139f1bbf1e0e1ab5a01ab777877eeed0a66a40065a7bb90baf015f0399", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "1da56bc0c302bb6bee6980b3d2138ee2f771b6f544d86a69b8b7909e3f5e45db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.7_linux-x64_bin.tar.gz", + "checksum": "2ee90f30305aa16f4ccdc75b667bc8a9bb23d545673e14e417fdba75a01512e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_macos-aarch64_bin.dmg", + "checksum": "e997a45631d029e35de9b3548bf61347a787c99309abba9e7b2697f3de13a179" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "c19914fcd0203ce8eeb3e38f7207e6e809424555cfbbc993c5c924a838089738", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_macos-x64_bin.dmg", + "checksum": "25c4c6f6e54249ba617430c749e3a41d135862ede15364f7a34b02412385599c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.7_macos-x64_bin.tar.gz", + "checksum": "3364e8f01b861cdfe847dcde6bdb9e2fe6a44c69ccad937ea31836cc4d7d1469", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.23-ea.7_windows-x64_bin.zip", + "checksum": "cffcc11f1d67cdda3e0c1650b26ef479ab63de0a3883a46e01148aabc7985132", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jdk-11.0.23-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "155fb0daf6c3010a10e0f552ecba597f9279e5bb57ddbd79bc504e0df341a199", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "bd942a47105e322b1c638b3b2b16d01ab51dfea1e116baf85a752b9bc9a7a281", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.7_linux-x64_bin.tar.gz", + "checksum": "345a43263dc22a360ab0b6fd338d44c3552008b2a3ad3f80a5a9deec20df8ddd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_macos-aarch64_bin.dmg", + "checksum": "46fbb92f8541d814a5f9012e2963a3134025db528a9f3fe964a9fb406e500971" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "eef08d82ba13294e7a96205f9d78f37ec8d635864e3ce7181904efad00565a60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_macos-x64_bin.dmg", + "checksum": "8142069545e2542806e5f57a480dc3c9e5ab40249645bf0a431b21f99795f6c9" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.7_macos-x64_bin.tar.gz", + "checksum": "931593256a7b4b46b6f881e4efd55fac464e7fb968fad6c7095fda92c7e1b662", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.23-ea.7_windows-x64_bin.zip", + "checksum": "65253b994636f8d39a748065faac797b95b0ed1a8f5889442fe9652239a06a34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B7/sapmachine-jre-11.0.23-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.23+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.23%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "58cdd5fcc83a9b7bd749472f34a56231d4e2e6545bd6c16abe9f76c54d3fdff5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "039dc98ffab5eaf8f80b5f4f3adbb612907acdc1524b0b20b24fdd4ebe8c9035", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.6_linux-x64_bin.tar.gz", + "checksum": "92ffbac31a7e3c80cf1bbcba8f2d9a79183b6a2f1086df91129e7974558a1523", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_macos-aarch64_bin.dmg", + "checksum": "35ece69b076a1c9ba40abd81eaaedf4d3a5118bf4ce31f74584c37061b186206" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "84f24c27139e4f09f94c7d892d4c73bab3fbcf4c85f35197c0d1c7dddce5518e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_macos-x64_bin.dmg", + "checksum": "3e5ce8abe71a66123a85bf5f6e3f47a9f4f0eaf53baed1408e22583d2864f246" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.6_macos-x64_bin.tar.gz", + "checksum": "bfc37a8a7c60072a871373ba31ebc180d51c6ce8473e3fc3996535527e79c052", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.23-ea.6_windows-x64_bin.zip", + "checksum": "1aeb0ae2f67957ca809a300710054e6b9f0f9754e2ba10abac837949b5c53dee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jdk-11.0.23-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "570069bed29766dfbe2fb15e383bf0441f049d837b38b3c5e76a54f7f04fc2bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "8a68919c446e0f53343cfd7e5db11c7dd82a42ee8a60040c32918af9d1f8f67e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.6_linux-x64_bin.tar.gz", + "checksum": "51ebc5d62a70f7479efba7a4dfb9a19ee5c1aee7acc23253c1b8725f59776f72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_macos-aarch64_bin.dmg", + "checksum": "b13a2d56e681889146e940de941222803204042ba76b6d5cd26a0169387cac3b" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "92a49c774c27117afb444db6d0cb06e5a6cf7c19f015fff7bb551aa33247aefb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_macos-x64_bin.dmg", + "checksum": "5786ac5815eb213f035ccae0e9f4b17bae6d1aad79139735b991456f9befe049" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.6_macos-x64_bin.tar.gz", + "checksum": "1f882fc0176e17b72810a5aaa5215fa1f0d34e0c6c4c1f21c5e5e523bcf4a975", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.23-ea.6_windows-x64_bin.zip", + "checksum": "9f4f1692d4e8523f8486cf86c03f4b9ba02530b20ff91f7838e160cf865e3287", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B6/sapmachine-jre-11.0.23-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.23+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.23%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "ad0ec5effb0d7d8cf900ef8514afd0b300e6e891d0d08be2510addd097b23380", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "3aec91e6195b2ce68dd2780f8b92367a48f1f35ad51b18e10e09a7feaaecf1ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.5_linux-x64_bin.tar.gz", + "checksum": "e0f3638736924491786a3503f6b6cd067c0c46cb39ec591f1db35cc5406bb2e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_macos-aarch64_bin.dmg", + "checksum": "6efd59f46b109cadcda32b34193833563acee2253966a59ae11c63cbb1fc4d56" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "3701b4956775b562d70916001a2b8d8fe1e4840adcaf1d47ebd74295de310a3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_macos-x64_bin.dmg", + "checksum": "5827937f4247c7ed153c6fc663002b46b0238a8c22cb757c7a57f0abf80096ba" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.5_macos-x64_bin.tar.gz", + "checksum": "24cf3a3b890b169342bb9c7f7bf61e942d446eb0d39680531eee299ad2560fd2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.23-ea.5_windows-x64_bin.zip", + "checksum": "89b1712007d3cdd439fbd2a8c775ca6416d69a866a890a1bc53b28e6e1c653cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jdk-11.0.23-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "4836b73e3938377d6199f512060890457374f9354a933ecc9c09cbfbbc26e822", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "4122e9434eca0dadda118e00c9e101ea22e057c3759c8b06284af44db81b6e28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.5_linux-x64_bin.tar.gz", + "checksum": "d32b593fd949e02313951cc9999a73c9e58b6be2d997fe7fc2c0d9b6933c0992", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_macos-aarch64_bin.dmg", + "checksum": "29c94320054877135d49245bf6c05bf32467cbebd2111f4cb6b5f93d16bc5398" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "faa2d73e5e6ae8823550ffb6be634a99c1b2e3756c6a849b98de46c5480fc780", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_macos-x64_bin.dmg", + "checksum": "5320f93027d0e30b470b5b4d1110f996f008800e70ba1a1bfa5fa0254a2f9910" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.5_macos-x64_bin.tar.gz", + "checksum": "96ddd741dc2d0ec239273a22cb6a4f604c25f71bc45c6e41d6fcfd3424f2b751", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.23-ea.5_windows-x64_bin.zip", + "checksum": "2e265c46ada81d809376ac9d16b1bf0985f197e0e43cd373d7419daedcf109e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B5/sapmachine-jre-11.0.23-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.23+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.23%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "9817c66491e5b7bb0d1b84b75db50898f23f8a56eb3c1867a95e0e391a14cb2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "5b68d0122e79137cc4fa0db998740ddd6cef260334de7b2fb667cc3732e8bce0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.4_linux-x64_bin.tar.gz", + "checksum": "e7ceb6717ff403d5731be9ab5e1fd5e6eb85756d44c2a055104392b8ecdc134f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_macos-aarch64_bin.dmg", + "checksum": "4ad0ddf493e06f4b0eab9fa6c153a1a7ccdd1238289f033d8306d5cd9d23e5a5" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "a5874073767aea6e09585140854222cce1e3a5f4fd8b3b7a3f8be11ab1de3499", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_macos-x64_bin.dmg", + "checksum": "e1d349b1797014417eccca33729c6bd541b7d932d41fe47769dd026facceeb0e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.4_macos-x64_bin.tar.gz", + "checksum": "966a2a9a8aac3022088a1256744420e72458185ec3d98dcfba09779c1c2d5fcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.23-ea.4_windows-x64_bin.zip", + "checksum": "e5202429663863bc91557609e8898bb183ad505540f79e1dd3b7d3472902f211", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jdk-11.0.23-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "330bc1ffef6396672c7b4d6cb544bea67e50499c4ee8edc3ceb053dbcfae9494", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "5b114d7af780aef3c6d6e5a125660d40456efb717e60e93e0f466de9066ceb13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.4_linux-x64_bin.tar.gz", + "checksum": "0c55d32308363f7e878c1982a144553c195341b752dce836df3a51724fc6af08", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_macos-aarch64_bin.dmg", + "checksum": "1e1fe3d328bda6beed12b35917a9a1ef5df5f87ca4de197503e0235489a67e41" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "a4aa9a671992b64626e5610694ff48f88b40b6c8a298490366a7e4c4e7d04304", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_macos-x64_bin.dmg", + "checksum": "8165d3b202013f32d95ce44f8b81f647ad6bc59e4a1e268577879211bd01fd3c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.4_macos-x64_bin.tar.gz", + "checksum": "e2fc248795bc50b47ed4681e9bd76d591c6a1421015bfb0054f575358ec40f79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.23-ea.4_windows-x64_bin.zip", + "checksum": "8a2986f4390849d26cba75c98fa11340b5daf46dc279187ebe9117207a6e7d10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B4/sapmachine-jre-11.0.23-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.23+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.23%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "8988f4af52037efb29e5da6f04973895d6da9cf1414b2bbca2087b4787866b60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "6976e2a98da8494f4f9201799c7c95044d002e2d94412600220683c6baf02317", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.3_linux-x64_bin.tar.gz", + "checksum": "a7bfdc658f3283d39d35cca3ec86fe8ff577924e2973bb5bc267ffa184fea85a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_macos-aarch64_bin.dmg", + "checksum": "15dc86aa67c2437dbb3a4b41c87f8619edcc93692544a8a2f202d5cc88121333" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "3df0fff6d94c53b2b3e1c6bd218ecea8eefd9277b633a47f83cb39ccddf6aa09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_macos-x64_bin.dmg", + "checksum": "4938431a8f783e72b2a5a61063fc73b943feef6301e8c9909bcd8d4c30341e4f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.3_macos-x64_bin.tar.gz", + "checksum": "fb0c8f7a4e0b5ac1e0089108e9045e5b75a83c670ef8efc14d37be75a36b2cfc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.23-ea.3_windows-x64_bin.zip", + "checksum": "818aada4d96cf970c0f77ff49d4498ce1301a81d9301479614759dfcd09c0e73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jdk-11.0.23-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "a0e786187a055a2000da96d2a10de66f6d53317571464405d3e4e622fd33a16a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "7314b5016a6cb39679f3c1fb8e5f6a91d840d5db04ae39855696ef5b94cc917d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.3_linux-x64_bin.tar.gz", + "checksum": "8b88300276f290b059ce647dcaeb35f7a17d9ebe77c250dc66290ab3d1d22c0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_macos-aarch64_bin.dmg", + "checksum": "1f69f2c257eb7b800b9ac213840731425f148c40d82c02789e1b52afaa5de114" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "a7ca6697b58463fc46a8c915b5857c8f82c7b6e532c85bbb17d71373175f9652", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_macos-x64_bin.dmg", + "checksum": "468cbfc4ce0b991c5a6bb81329c6bfe4f89a90ec2d1a01658cd375c69c484b52" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.3_macos-x64_bin.tar.gz", + "checksum": "f85ede8361da8ee44236cf30f307c6c0fc47b200d1d2694687a08e7d3bba69dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.23-ea.3_windows-x64_bin.zip", + "checksum": "bd2221e46ce2df14070a2fd0d4cfa2acc15c0c3549f7199d4912964f52198da1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B3/sapmachine-jre-11.0.23-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.23+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.23%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "b68ae0fc011fd38a70b9625684adf89d4eccb416a774086dca5015f8bd2360cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "02dca99a78cced4a2cf9bf17c9c6060aa46fd73885b6e53973338b3c10c7f262", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.2_linux-x64_bin.tar.gz", + "checksum": "672caa90dce1ff832fc2e5cd934b995e2805c179b5a4a9b3f52b761af71bcafc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_macos-aarch64_bin.dmg", + "checksum": "1fbda9e2319c4007b01077070e0ef86aa20e6c555a61a0bf3d46eb18e3f68661" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "bb5886bdb5e10d50d9176e5f2b659cfc4710cfeb9fcf4686da6159e2e327ee7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_macos-x64_bin.dmg", + "checksum": "2fd5ad8ed1b921766ad9128348189cadb98daf5ba0ae566a7b14aeecc7edd1d6" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.2_macos-x64_bin.tar.gz", + "checksum": "0f1319612e00c9a12e99ec515e61d50a647b81725eebc346d70da4af30a11217", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.23-ea.2_windows-x64_bin.zip", + "checksum": "9054ede112578dc17fab2a50bd855c8c5b5dbaaddcd6d4ca7764494d389e411d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jdk-11.0.23-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "d70be512d5440eb58f3fed1334b6a264a0bf5c543cbc5d05f383b3bf0e1064e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "345f549990e417d9a1f1349d6ae2a52574f683355be145d66f20a62972734b22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.2_linux-x64_bin.tar.gz", + "checksum": "39b8adfe464bebac965fd8e40e674a573a4a14c7acf97a03604757ec49a269cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_macos-aarch64_bin.dmg", + "checksum": "bb6148418ecc40a7ead64ef67ef34e696d4119b66068e42260bb7edb96e4fd7e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "d602f501b7e87765afd2689d9847ab4c80d62c3cafc0ab442b29c78ba47cb819", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_macos-x64_bin.dmg", + "checksum": "cc7e415246575ddbe4e79fe8056167fe5fcb88b4aca983f6c63c04de03a45047" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.2_macos-x64_bin.tar.gz", + "checksum": "f0721aace070dbe6f477b404642b24ee5f19f8c2f4b0f5083ee0a93eefcfa5b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.23-ea.2_windows-x64_bin.zip", + "checksum": "7111ea4c54df845c539ccee8729019ebc1df363bf56b7b49ed8ed439e34507be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B2/sapmachine-jre-11.0.23-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.23+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.23%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "dc0d114baa730a9a9722efeafe8d2f1ce6d3062556666c679f6106245f0ef546", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "4cd7616820f8256bf2db95f0b562cc8dc14ddc8290896d23e2719c32e36c4a04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.1_linux-x64_bin.tar.gz", + "checksum": "dfc5cfc7f69c8f6ac7190a7ae6c21e3c6ba7b187dd1a9e35fc7554827e52c277", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_macos-aarch64_bin.dmg", + "checksum": "53adf14dfaf67c4ff566bcde33d012a4fb732d1f5cf834845bbc2182f53801a9" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "8f70bbaffa377836af49a9a127ab2dde49efd557d134001360c6127277af4eb7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.23-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_macos-x64_bin.dmg", + "checksum": "ef83b98bbfa0ec4c9a6ede5384582db0545367008c72eba01bc00c73372ee3bd" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.23-ea.1_macos-x64_bin.tar.gz", + "checksum": "7ae3eac3a26cafb3dbc0a0cdfdd7c731dceffe6361cfb27f0fecdd7c26574827", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.23-ea.1_windows-x64_bin.zip", + "checksum": "2185047d6000fc6d974e9922a2ded8f0fcb33dace122154bfe86f470f9de707a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jdk-11.0.23-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "6420db6a409afa8ffcab941f4881ef2f40b96a0007f55caf79efbf3d46dd31fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "35d79a985400a0300fdfd29ee873cc97c2ef63bda133f89d5ab691edbb373771", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.1_linux-x64_bin.tar.gz", + "checksum": "7bd02ab7e95697b52bda8e82f460e68208d5b05c9b02905a68abb282a7ef8a17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_macos-aarch64_bin.dmg", + "checksum": "df062166bb91a272f3ebd9aff062b901f2023de001424235c3adb31551ee2e15" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "beb7ec3ea4a51da103edd40a27d7545b3854e97b76ca1baec3abcc4d52040bca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.23-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_macos-x64_bin.dmg", + "checksum": "34aa8e01c8f46f37baa57cdb8d2ad12e89fdafb143839bc60764583ec4c22831" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.23-ea.1_macos-x64_bin.tar.gz", + "checksum": "4dd569fb917b1a3765a95c02558325db5b87a1c8f47c9be60d26b497459bc345", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.23-ea.1_windows-x64_bin.zip", + "checksum": "a9535efcdb1ff7e6f42bc58d1ff3e120d1aeaa70e428eb89355e78457b76d04b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.23%2B1/sapmachine-jre-11.0.23-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.22": { + "sapmachine-11.0.22": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.22", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22_linux-aarch64_bin.tar.gz", + "checksum": "38e51e5683d46a9173a0399b9551db2b771edcf5195a5ccb8264bd4dff4692fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22_linux-ppc64le_bin.tar.gz", + "checksum": "5cae55860b4d543dba5b6f704d545825b1535a72f6fa42fb7848b487897e478c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22_linux-x64_bin.tar.gz", + "checksum": "38d3ad91b469b6d51b34be9c419cfb2fdb7a2964047f871b3c193fc095e06af9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_macos-aarch64_bin.dmg", + "checksum": "d074f89b14e57b8bb30c34a037c04dcf0e87b5a11703dc2eb61af816f433da9c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22_macos-aarch64_bin.tar.gz", + "checksum": "682c9ef9597e4ee9fef49b24d6b4f44316052553008c23efca6a89eb0344507d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_macos-x64_bin.dmg", + "checksum": "06db909828f8ddd94683ae36571221a467540b0fc61f11726b102981386f70bb" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22_macos-x64_bin.tar.gz", + "checksum": "b2908cd13e39e13aadbf15b8bcbec0710158b3a6ab43a1fcbece03a8c991de59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.22_windows-x64_bin.zip", + "checksum": "e0c17cf37fd8ca325b8a0a10bb1c49f873a7ae91e493e164dcbc6fc9aa1980b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jdk-11.0.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_windows-x64_bin.msi", + "checksum": "f4677de9161ccf48254fc245a41b4987af7df19946f51e4782b650dfd56cd788" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22_linux-aarch64_bin.tar.gz", + "checksum": "12e9185f9fc0162d228583318336b17e9c1a67728e8353e0dc7d02c4323d3eee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22_linux-ppc64le_bin.tar.gz", + "checksum": "7bb1e7155b936bbd3eabd5f13015cd904c5a80e593113e6cc8a7bb284a88fa85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22_linux-x64_bin.tar.gz", + "checksum": "16a73284bd0813b202e4dd820594c7d2811054824fcb34684d04853bb86a4091", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.22_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_macos-aarch64_bin.dmg", + "checksum": "8d2c97af584012de2d0f925bc42278e186a6e2d1a9e107334abd2533b672c9dc" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22_macos-aarch64_bin.tar.gz", + "checksum": "028afb79aaaac163e606f2cd8d26f35715c91322be7815c53a1e287404052ed8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.22_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_macos-x64_bin.dmg", + "checksum": "6cdfa506a046a672b9855bceb8a10907f9ff8b1d27a7994026728313556c4273" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22_macos-x64_bin.tar.gz", + "checksum": "3b1b1ca8c7044c75c1ddfb6e3a02db13638e1680ea4d7ddcc01048004595cd40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.22_windows-x64_bin.zip", + "checksum": "ae4dc2d727eda77dd6a5495075b28ca14bd1860bb128b8f4075bd0d5f0e937b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_windows-x64_bin.zip" + }, + "msi": { + "name": "sapmachine-jre-11.0.22_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jre-11.0.22_windows-x64_bin.msi", + "checksum": "7dd9f45a109df0073d2579daac767cc8044240cbdc2303fd6665f44bb8976989" + } + } + } + } + }, + "sapmachine-11.0.22+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.22%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "540b9451fd53f961ee9b3d2de35528cb1596550fa1d4b4fd2b840b6c474190d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "0cf75e9fd605c4378e24a64e79c423fbdfaa59051959506252d7e4551c4d7c8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.6_linux-x64_bin.tar.gz", + "checksum": "d214aa180cecf8d7269938f8561f6395b68cf90de3a6096e6c769dfbe0f48ad6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_macos-aarch64_bin.dmg", + "checksum": "a2444eeab72b0255fa6eec8622dc82f47413dbfd2a956d2e0f1dc8d30dfbc7cd" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "5680b1fd622c4925ddfcdceb4d8303e18b31307bcebbd81573881bc879e8a4c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_macos-x64_bin.dmg", + "checksum": "556dac4fa8756a48ac90ffb6cf9a89cd705ebd06616f76d5de7f75e0899137b6" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.6_macos-x64_bin.tar.gz", + "checksum": "8367168b44c43ea77ab8c37aa6a2f9d93698eba651ee760587b6dc71204d0fbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.22-ea.6_windows-x64_bin.zip", + "checksum": "620b18550e51e976a7b92c789be94df441c3117a87b11e11088e6db456a43397", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jdk-11.0.22-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "4572d88af916da46111aca3762636bbb28c5c04a70e70386c74882a93dbc5ce4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "a964db3b94a94938a1c3de5c3fe34ce66cfa2035dd9f6c1d332cc84a581f264c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.6_linux-x64_bin.tar.gz", + "checksum": "e0a8a05f299228076fe78e025c11474c2a942d08c6f77090583e7247ac3bee12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_macos-aarch64_bin.dmg", + "checksum": "76dd7b7c618112fb66f6e8ba0bb4da0c10bcfe4cb38e0b4e98eef0a90dee872b" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "8dd08f847eeee5c23ade6f75f6387271b5edac15b2304dd637d071eaecffe4f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_macos-x64_bin.dmg", + "checksum": "c28e234747bee23a696a0df5c86ddd1a8b66a89d78592f0ac388fee5dc0c687c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.6_macos-x64_bin.tar.gz", + "checksum": "ffbd36607a37296a17f42c8fed16d5f5e23fad2f3c7ff2f7f782e7496860feb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.22-ea.6_windows-x64_bin.zip", + "checksum": "2dc0268b703de7a3f07c20c2072430739497d21222f9401b2e95a076087586c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B6/sapmachine-jre-11.0.22-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.22+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.22%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "ba3c1c82dfce3c207a8752cd6729fa10db68036d2279eed3d0e58a01821c7106", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "2c6de3aa81b5c9e9407a4ff6c6fd3b601bf14ecd23c3017b69cd3c6042175ebd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.5_linux-x64_bin.tar.gz", + "checksum": "9dc50ded1f14e790b97ef4a19a0c5619c7189dbb5b2d7755d7f01eaacbae445e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_macos-aarch64_bin.dmg", + "checksum": "0d82649b2abb8f6c55191e0d9fd4735a0c3831ba573d2fec6ea31d48855e39a3" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "f732ed6d1b83e6e2dd10d3b2018996b79169e114059b39d69a69c63f1026cdd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_macos-x64_bin.dmg", + "checksum": "0ecac765a1d58c308df97431a83eaa341d99c209598cf7ea88a2ca0264caefec" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.5_macos-x64_bin.tar.gz", + "checksum": "91e000f6bb8a64e6b88680d1c90bb3af27891ddfc8b0c86d1ff19cbf46550f8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.22-ea.5_windows-x64_bin.zip", + "checksum": "433bf44f67b6a738a9e96ceafa542df3c585b6ca89f8a036486b9ec3fd8695a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jdk-11.0.22-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "d7eaa8934672781cc9b47e10475d88af122697b3dcb9fc3bda270266ef26d926", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "226219c94528f3c94694a6c7e8123ac26c821d35d635d7aeceb3dc0f38e8046f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.5_linux-x64_bin.tar.gz", + "checksum": "f972173519d1f3d7f9efd36bdf43079e05eee8ae756441d3b84978bddec73e56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_macos-aarch64_bin.dmg", + "checksum": "fb4939016c5f3be80f9a65a5ad9b9b387f52ef88873461e6adec7d71a32d2b78" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "1efbd067916c6cf8cfc901ccce109c3a992f8776d9c4a2db9f1992bf0534f5b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_macos-x64_bin.dmg", + "checksum": "bde2cb30f7de1822da6585b26e40549e75e3eeebbaa3c059c16a49b02ea07ea8" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.5_macos-x64_bin.tar.gz", + "checksum": "49a6021773fdad70244d48a48c9fb70619b7cab3cb2db32328aa411db9cff5dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.22-ea.5_windows-x64_bin.zip", + "checksum": "bcc3fd1aeca5e41e048c3731ec1f264d8a13a69e5485cfa203e6f2291cb98293", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B5/sapmachine-jre-11.0.22-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.22+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.22%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "37f1be320216d498c6a56eb5b5aaa385a67047f493edb0087d18543928b01f32", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "6ac45b8fa264eaba2f88df0625a380f19d4c2ad6139eb2a7150584d51789fca4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.4_linux-x64_bin.tar.gz", + "checksum": "95c14079ecbeb1111a9e0a5c2963d978204c94519da83c6325204a1d42c7ce73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_macos-aarch64_bin.dmg", + "checksum": "704d1a98589067d8fec07b941da5af33af9c34762e59e234de7c8ee3e84f848e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "99babded0c66ead3efd91734ca6d11fd595f6693af1f97734cbcee489544b8f0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_macos-x64_bin.dmg", + "checksum": "bb321a0840b94519f22187f6b00f1c24069c629bc6ebb41fc4da86883633afaf" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.4_macos-x64_bin.tar.gz", + "checksum": "aeb219d60c937f9858e3c2bedbb7b3cdfbabb5f0a0689b98e468f1eaf8d68584", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.22-ea.4_windows-x64_bin.zip", + "checksum": "02fa34b4a20a5dd7e900e1d1f42a880dab5723cc56e0f68171403e8737686c34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jdk-11.0.22-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "b297de5455c47de6a5f47d5dc9dbfa00c8c991b8eb7cdf34feef350caedb4c8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "008f6152898b470e0aad9e6e878ea17d05194d310a5cb41f2af97143e5a34471", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.4_linux-x64_bin.tar.gz", + "checksum": "0cd63c05c853c95770140f7208a17c070d525854f1e87364c8da5a2b0ad49198", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_macos-aarch64_bin.dmg", + "checksum": "8906539b23182865f9d45752f7592934cd372b28c07dc918ca52c9e684e97a09" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "0a1fc8fa156f845882896d72d178383b6636c8ccb0bbc13f4ae0bc98400cad9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_macos-x64_bin.dmg", + "checksum": "a0d911ae4c20a89b780402f8944ca8e037db046a308afc79e77b578930fe5554" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.4_macos-x64_bin.tar.gz", + "checksum": "83e1367d57b0f28e1d450add06da536f30d75b7f35e549fb7ad274eb344681a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.22-ea.4_windows-x64_bin.zip", + "checksum": "4d829120c1d3a0a62aea095f0a650d5e6a3af0007276ff5a548a780ab8fb148e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B4/sapmachine-jre-11.0.22-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.22+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.22%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "9dd657cd450bc43a81ecf43e0bc76fbec31551b8678f5dfe1f7b1d09369458ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "eb44314134db04a5ca4c9820df56ce98b3608fdec40533d37ef1452b25daff8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.3_linux-x64_bin.tar.gz", + "checksum": "9d83b034f08b8bfff6f54ae3c7a405917182c772b1db5c45f8d129951a16caca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_macos-aarch64_bin.dmg", + "checksum": "c78243ed249de3976563b25313930a3ef142169615705c07ad723b6ced82ab8f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "c72b2995cf789a5b579a9fa020abf83e01378e3b1833fa5d881fbad85c2670f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_macos-x64_bin.dmg", + "checksum": "79df7d0224b096231e9e70483e88cee092b1028c01539aba1d88116130caae02" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.3_macos-x64_bin.tar.gz", + "checksum": "933fb00661352c4f12a8bc9873d8014505e7f39cefeaea713db7b1654ed59b62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.22-ea.3_windows-x64_bin.zip", + "checksum": "468616ff60e9aa177ac9f182daca49699e55e19dd6450ed6856ca5551d1cea1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jdk-11.0.22-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "9790a2304c5193ba40f302e02de2ed23d45bf07b81f09eecc1a02d101f8bf38a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "29e401aec22845650779087071713d0371eb3e47cbab24c0be4c1dfb0d40b878", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.3_linux-x64_bin.tar.gz", + "checksum": "5e928f2e3a216aa096391dc0f408497b1ef4961118eadfac6d5832cb00841110", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_macos-aarch64_bin.dmg", + "checksum": "5e4492e54ff23f5f7157b8d4ef029bdf37542b5bc42caa5f2a4b36c681ab90bc" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "336f829e4c65b6fba52d48de7ca8519507b6b4f2ea034a7e44ddae5497936695", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_macos-x64_bin.dmg", + "checksum": "b4b19d2f28fad0614fee6a055699fb79b544caabb0bff508d1bfcc62ce1c383f" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.3_macos-x64_bin.tar.gz", + "checksum": "8e9c7d41a0e6dbed708205dc1b6f74030d77856c442e123f746b7eb4bf467287", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.22-ea.3_windows-x64_bin.zip", + "checksum": "1d9bd4441e95fdee028429b07efdc9b7573271090203cfbdbe3250c1f55a5bf2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B3/sapmachine-jre-11.0.22-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.22+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.22%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "cd0bd98da867e720df436db95615df610212b4424c8ca31d0980964b0384c156", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "3146af76014ffafa2154f1ac2b8a657123acdded1404a3654ce4989c1dc1d19f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.2_linux-x64_bin.tar.gz", + "checksum": "f53e8d065c2eedb4510ccfe8619037447d0f62c0582994ed6dd86b50af3fc9f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_macos-aarch64_bin.dmg", + "checksum": "e096763fe71d9e97b6a8cad27c5ac7422c788196420ea3dd51a58bcfd73a13f0" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "881f1c9d1ec82ce9f0d5a8b0d6e29a845e043f070a9cfb2edeabacd074088018", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_macos-x64_bin.dmg", + "checksum": "ee683c65b19d77d5fbe1ae038bb0ca48dd46648c0ebd91063b959d3c5354225a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.2_macos-x64_bin.tar.gz", + "checksum": "2a75fdbf4edeaadd04b3edcaa167aa76e7a6a6cd0d2f67be185c01793513ee7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.22-ea.2_windows-x64_bin.zip", + "checksum": "5194101b04ddaf5bfdd6380594cf0ca912f0b1a07a1d0181f113f24d12ce7c6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jdk-11.0.22-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "c427002636433f78650556c7e4866b0945632c9ce018b93e6061adf8d9cb3d5b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "e2d121a388346bcb473d1fd50e760ae516d982d440512c589789ec816e53b0c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.2_linux-x64_bin.tar.gz", + "checksum": "bafea51f125f47b4b7e71592247ef129fbba1e80e0ff9156e535a225f0838ac5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_macos-aarch64_bin.dmg", + "checksum": "48516b3e2c5df92ddcc6b0111d22c0306b6f120d36510a88e669669239a163e6" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "b9d3bb2616007618773f178f8dc862e15ad4f211cb46542f3f13bebdaeee5b10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_macos-x64_bin.dmg", + "checksum": "d004663bf60dc5d23c174a2052cad2e609849a65334595f5fe517ba0c03e5396" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.2_macos-x64_bin.tar.gz", + "checksum": "00fd8de5fc2a19f12f61d490e923730f23b01ecd985bec2fa1a7a897e1c2cdb5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.22-ea.2_windows-x64_bin.zip", + "checksum": "4a4fbe795eb233e98cf95ce4a1f0079a1b9ac327a4c7e4400ddb8579c32e963a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B2/sapmachine-jre-11.0.22-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.22+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.22%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "544307f34af260aa75fb5db43d062358b5253999a1134e33ab75d67b6d623063", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "ae271831b7de7548cd470cd0a679d4e3f4c0c6f294db512f9ace011e48de0f08", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.1_linux-x64_bin.tar.gz", + "checksum": "31f2ab849ccf61ef7591b3568ad7d712fbbd26a250075a7b30853593d1ff5c50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_macos-aarch64_bin.dmg", + "checksum": "3a2d39a47fa5cf9c861de8be8d216aebd34f880d08cb88838d8186eb66de895e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "324eb5321284412f59b284e3eebe2ef4bce0a290d8cade5d58ef604bedb27c44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.22-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_macos-x64_bin.dmg", + "checksum": "f88850b8524844bf64bc79629e8250f462d188d8583c1f1af17959d41109f008" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.22-ea.1_macos-x64_bin.tar.gz", + "checksum": "d7a55d56c18970c3be91da315e00a0ab56275537f10bed73ed33b21679aa6dc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.22-ea.1_windows-x64_bin.zip", + "checksum": "d4f3d8edcb4f1cb643b36b0e224120f24026b2a41a8813ac0df3fa00cd1e7926", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jdk-11.0.22-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "637b8a6ba1bd88c82ffe248e0827e06088e2b25d9cbbb47785b82bce9174c0ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "1253dda7c1993e68b2446b7a8e512bc1b7e07969e77255f7cc46a437d782a676", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.1_linux-x64_bin.tar.gz", + "checksum": "e222d689275f2884650398e820f7c64227cf5fdc556bbf0f67575ffb1a116ed8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_macos-aarch64_bin.dmg", + "checksum": "414d2ab3fc7105520dab3bffed07b6796ee523ef3ebf79182ba5e5225479c6cc" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "0602d2c8c74266746c9277a382f39946afafd2b38216555d2301da40cb96a2b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.22-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_macos-x64_bin.dmg", + "checksum": "45f86a640b30e0fb0afb3cfb5aacc20986bccdaba8677f3111a93ad6ffeb809a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.22-ea.1_macos-x64_bin.tar.gz", + "checksum": "473722f06e90a3b68523c3fee2da43108ffc390441f5189671098931e7b3ceb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.22-ea.1_windows-x64_bin.zip", + "checksum": "ea715409649412eceacf28f6aabddc306f6f8d9fcff24bf94e5029a8d551e237", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22%2B1/sapmachine-jre-11.0.22-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.21": { + "sapmachine-11.0.21": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21_linux-aarch64_bin.tar.gz", + "checksum": "255364b5a18be1f30029d4c5ff0a645b52714702edc7b5f5cb8a77067b586f41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21_linux-ppc64le_bin.tar.gz", + "checksum": "a72a81d78eedf882985a7c27b8fad00142d9cd07ab2ece299b0c2a8d4343b32c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21_linux-x64_bin.tar.gz", + "checksum": "d1dc3ed8b6d44f5da34a3f09ae35ed71eb4c63fe1e6a530861f7df75f60b3703", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_macos-aarch64_bin.dmg", + "checksum": "90fcd8d3594aab06d7f33f4663e35f49a2e8ba08f85c99819aebeb13bfb7a7c9" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21_macos-aarch64_bin.tar.gz", + "checksum": "3a1a0e45d6de1fdc6874ea91f63713e3cd3e3663865bbe97941e0f8872b2907e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_macos-x64_bin.dmg", + "checksum": "b173e28aaf46abbcb9fe717365f1112b3b547f24b26232f610ad0c6a170bebd2" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21_macos-x64_bin.tar.gz", + "checksum": "76d90d33a25ff61227e178034876c6877dc051933d0af57403b43e8a4b2feb65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_windows-x64_bin.msi", + "checksum": "0c7506594d6b3b5208335adeec9d28bf4987387489541d5e0feab85470badaff" + }, + "zip": { + "name": "sapmachine-jdk-11.0.21_windows-x64_bin.zip", + "checksum": "d9bf9fca1ec278d272faa0919a97c929b5c7f24c2b5c9853a22de47b9226e10c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jdk-11.0.21_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21_linux-aarch64_bin.tar.gz", + "checksum": "dbb7888d8879e13d974d9747904c2ef0b063b59fb2d81e9db13105b91c7756fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21_linux-ppc64le_bin.tar.gz", + "checksum": "01ca137ef436e9a0f1447979eb8e8485273e1b9c54d4445d90388bbd63419282", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21_linux-x64_bin.tar.gz", + "checksum": "104f8076f01e010e3f6e6bb0e2567a8556a87f26759224e447fd12cc786162f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_macos-aarch64_bin.dmg", + "checksum": "c7f716930c31ede4a52ace2eea9011732b0b2529a2b13be7f681368808667251" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21_macos-aarch64_bin.tar.gz", + "checksum": "55512ea6ff2a22703a2859ebd3d85c252cf0267d30fa47895c46f9209c563170", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_macos-x64_bin.dmg", + "checksum": "81c6b42d6f6ea499785cce60a4eb383cbf5eac9da484d64ebe4e2e0a81c6c200" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21_macos-x64_bin.tar.gz", + "checksum": "e265bda2e6a08b8fd119234f9e8da0a3b6f53f416e69e92c53ff31f19116af0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.21_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_windows-x64_bin.msi", + "checksum": "5b11e366cfb0e65d5e484c872da392cbd6786accd5113ba39010a9f785040e2e" + }, + "zip": { + "name": "sapmachine-jre-11.0.21_windows-x64_bin.zip", + "checksum": "622b5e00c823c518cc53fb74c80592b5516489f3a0fdb3e2b86068d5a6c50c98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21/sapmachine-jre-11.0.21_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "e45cf17b164daba5560b634c4384a19a30f52f5126192b94beac5bfbfbed05b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "c92fe8dcda165b8fe118d8935888dc5f92ed4b3fbe14127792fd4fe3f0aa0c4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.8_linux-x64_bin.tar.gz", + "checksum": "f3a178b4215fce17050d0da48b037c72d6e4824e60a56c88f9e10e59e145a540", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_macos-aarch64_bin.dmg", + "checksum": "1f3021bce9740f4f574f4209af831d3d6ae7a867157073ae4df3676923632fd4" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "a298b4a32017ecf49762ad07057298c17379fa41579d7f358a5424d3e249d6c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_macos-x64_bin.dmg", + "checksum": "5615365552af1e68458f1299ff49cd128038a3d109b8679aaf049a6cb07945e1" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.8_macos-x64_bin.tar.gz", + "checksum": "232623be7226b36f5680a8aed7412ff5e5f11c6a9a3fc8a0167d6b3ff167d71a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.8_windows-x64_bin.zip", + "checksum": "1a54e1b54018094d2d509a7c4551281cb073a8ff05a16f3cfa3d2994fc08e8fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jdk-11.0.21-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "bc8c73e783620616d052f975cdf8f96ef070076800f7f353c9d54a0c56bbe06d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "baa41235aed62f3123bd276622ee0e6d7191d3b3d954105cd7eefc147356e610", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.8_linux-x64_bin.tar.gz", + "checksum": "0badbd215e387dec4c23f207b5957b28433d4553d1a2fffe98b2715d68ba4222", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_macos-aarch64_bin.dmg", + "checksum": "73c69b28d7ee27461aa6875ac361ff469c8079af85b549b25b4b1230ada3bb5d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "4f9c5b3ade5c1eb30942d201785fac0e5aef0d42b0b572fa60e7fe3904f05a2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_macos-x64_bin.dmg", + "checksum": "75086f72c063a4c6b6e4680c3e2a6ff0282bc8096b0ae220e11407c69a09daeb" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.8_macos-x64_bin.tar.gz", + "checksum": "05be8f2cb49d8671df05780cfef363de8c8f3f9eb619101bc8e00c0f15c57f47", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.8_windows-x64_bin.zip", + "checksum": "bac9ed21f1ce1010be8e1b5416fb71bbbb15d87f10052301447af636e23a3409", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B8/sapmachine-jre-11.0.21-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "153e964fe9f36e8356b27a0ce33730b0f42aa1527a16eb74ec8bfe291f1391f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "c603c218e733b3ec32b333d1eb7b24233eefbdba2a8b42beeeab2d514be4ca69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.7_linux-x64_bin.tar.gz", + "checksum": "e8370c05b4c5854343a294fece752be7bde7fc02f241590388dde44a5b2012ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_macos-aarch64_bin.dmg", + "checksum": "42fc8e0c7372afb9042a2e0f17b3274af711b543e94ac9fde6d4991815cd05b3" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "687dc7702d766d8004b3edfcf598fafb2e7ae741f391612424fba78aeb2485eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_macos-x64_bin.dmg", + "checksum": "a0ffe0a6166bb2059630420a79eb799cc758571c41802b936e1b97dc6c83e6e7" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.7_macos-x64_bin.tar.gz", + "checksum": "ac06c1caa1b71220e5c3b5e5d5cd91e54c6e632cdd340cf10b0f2520d955fc46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.7_windows-x64_bin.zip", + "checksum": "2895fd8c638c353016b41373c2cac98b425e3ceaad9ac78e648ba0fe968820c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jdk-11.0.21-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "fbebcde9877527de6a8bba118e711a9493671b0a6813a771172aa86b37b38b57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "0eba763316688024c8f752739f11b666fcc3d2e841d631f0c86a601e7b703e46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.7_linux-x64_bin.tar.gz", + "checksum": "ddde256fd7fad1874ee90fe98cdd0004f337ebe886ded74dcbe2de965d423210", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_macos-aarch64_bin.dmg", + "checksum": "b5103ae9eb0c629d6e42813cf0848bf29ae58af753ba9641f92ee61ceac25725" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "1c2acd0ec85eee46009bb1cd4ee6dadcad03a6a03c6756e6c49099d8ca638c05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_macos-x64_bin.dmg", + "checksum": "8b38f57c263c5ed4ff8f873535a6c2670aa80fb1e5403f7793d9f63d99d058f7" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.7_macos-x64_bin.tar.gz", + "checksum": "fd47b7bc98a2176f06404adaa7e149280db9d85355b23b6420587cc2ce954a37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.7_windows-x64_bin.zip", + "checksum": "82cc2148b8f59da7a417f378d5a39e89dc00dadf4dda7f1e8b66cb900139216d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B7/sapmachine-jre-11.0.21-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "90b1d0635133ba794ef8d0ae6c7cf5f2d78e850d392bbd33de8929253f0d962b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "f8664a8717872ffa7452449abaaf193fe531304a9d1c588f9aee25a055979719", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.6_linux-x64_bin.tar.gz", + "checksum": "d43374a11d9f707828fc180ce02800594d8584c0d6958656f4f019ddd0f30d2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_macos-aarch64_bin.dmg", + "checksum": "b3c5fa2cff9193c80076aade2ad81988e110ee50676fbecb03d3b7b9ad452185" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "b5d4f2093831de939a3b8a51d3e9b8054196e173eab66f178c6f85e47a99024f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_macos-x64_bin.dmg", + "checksum": "f7e90164856be0dd16e2bb176e5bc511ad8da33221799b1492098c9ce9a76e11" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.6_macos-x64_bin.tar.gz", + "checksum": "48adf585756e96c8898a173101616269207980501d78ed41d2b547959f0e3e46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.6_windows-x64_bin.zip", + "checksum": "d5f182d257fae785581bcc83158580713b6bbdb1497f9179efb6d9c2b2cb624b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jdk-11.0.21-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "0d1b2e570d0218343997721ff1392817378d5020802b0f728edb0d29b4eadc61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "599bea1cb3cd43686f8e2eb9c85764a1a164bdc339f40ebc44b1e5ae589fcb37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.6_linux-x64_bin.tar.gz", + "checksum": "859d988a489291184e75470666f363257fc94d992cd0626da3a830b3f1afb2f6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_macos-aarch64_bin.dmg", + "checksum": "c6f709a6b37b68237efe29a5cf9a801919caa8a10ade30f3f379ab96d889f847" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "610770889a8c086afadaaf904e3fafb525461dfae5c44f532c6323b0aad8ffc5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_macos-x64_bin.dmg", + "checksum": "5a0ce740c540b16f75cbf955cf0ed3f31e25135c75a5c2a4bbad68095fbd5e55" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.6_macos-x64_bin.tar.gz", + "checksum": "b96cce4ad39ab227eb6daee5fb39c28fc7a57c399afd4881aeb74f279a0c379e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.6_windows-x64_bin.zip", + "checksum": "cc4f3382274c931bd1736c56369e3785ac1921ac781a66b1e868c2b56c1884a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B6/sapmachine-jre-11.0.21-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "d69e986a7f7d49ed4a1dde86ad0604a06b904aa1ca5b7e5b0f4334fcc13b298c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "fede8d07fbaee2787ba34aa4ccf54d2542261bc0c936effa6f0664482c188bb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.5_linux-x64_bin.tar.gz", + "checksum": "30ab6900b8c2758474eca88db835e055871429b060e61115065bc5e39282cd95", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_macos-aarch64_bin.dmg", + "checksum": "e3381f6e499f799efd51052ef06f5302b839ebf5855fb552e2d00c4de4005b75" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "54c45eeb927c0af98edfd8d91a2f6b86b308ff55cd58f69728316df41da04936", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_macos-x64_bin.dmg", + "checksum": "d8d054a4c595d084ee4b10aa0867e14a95ac642604dd7e12714f1f3ce8060051" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.5_macos-x64_bin.tar.gz", + "checksum": "5bf4a08c5680921086528cc2e09eba9f295eef6f48670d52a432bf2ae3cdaa35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.5_windows-x64_bin.zip", + "checksum": "c90aacbc090347654e081088ccacf021b817af7a5abbcb2a7225a9e34966ab17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jdk-11.0.21-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "38ecd5f62462e8228cfcdc5dad7d8050b5fb44c8e9b29b67404bfb870368ec0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "397687293cff05a0fcd6ed55e827b280d0c4ca81c367ab26f0fe08b8ea2eb37e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.5_linux-x64_bin.tar.gz", + "checksum": "f45007c20d3f6e045dbed176f281da30484cd8832a35af0a53608e747450f431", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_macos-aarch64_bin.dmg", + "checksum": "59b0e5fb39ef3ffa346aaf20efcd9560110efea9150e3bec2a9d5109cc82a80d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "807baf5432bb6ecae68e0c0656a3168319facccf6313429307ca0951770b64b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_macos-x64_bin.dmg", + "checksum": "18ea152345e5bee798e6c6094f96b0e7518ed99fb01cecf2348e463fda55de90" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.5_macos-x64_bin.tar.gz", + "checksum": "20f9e8e624adc91b76afdfca7dcf647343d45e6e770782ba809acd19796300b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.5_windows-x64_bin.zip", + "checksum": "434b5bb3a55b99ee3dd4ff5dcf6fdbaeccfe866271328a1bdad7a2e257a44875", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B5/sapmachine-jre-11.0.21-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "ba4f2e84ff70e394367b88ab4d946ebebaa5ca9553a61ab541aecd35699de8db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "547caf20c241d14616f03067b00e6f10d5a10732b516cde17eb3a51b487793f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.4_linux-x64_bin.tar.gz", + "checksum": "3def40973897f0756eca4986a4ddb77b1d308479707df39075b0ffa3a3903904", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_macos-aarch64_bin.dmg", + "checksum": "427d6dd7f09e0a1e7458fa42a2238f74df8867c8a500658a7ba7e4ebff315228" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "40414ed34cd15006a79903650746f24da44f0735558729b70abea7f85cdc0fcc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_macos-x64_bin.dmg", + "checksum": "f0806ff78d28dadaea30d4aa9fb7f0f649fcbf4c079b62aca98b0dd60c982758" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.4_macos-x64_bin.tar.gz", + "checksum": "4af3596690b01031c5c379fedf15ca5a0747406a8a6051303ed37d40fd0f8521", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.4_windows-x64_bin.zip", + "checksum": "3204bf979b06be216b23867c91b63aeff8f00257a2e0a427c154c0f73b7570a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jdk-11.0.21-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "c3089224a554fc4da01a2aed568232367c7e22d38d8729b6cf9cba603b23637b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "9e5a4ec11b12d82bf3cc34da139180400619dc53b7e0fbe9089dcaa55853b60c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.4_linux-x64_bin.tar.gz", + "checksum": "6d739c22369535001d1761ae252d73e1215aa098a525107f8970c0f6bc687625", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_macos-aarch64_bin.dmg", + "checksum": "d8f54d1f37a5ae90f2b92ff45c5b5080c204bb79dbb66a0f2270b7be1260613c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "61bd0141233174e79e15117865b1247f81fc64ce7067ed8d5bf61d6c7607efe9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_macos-x64_bin.dmg", + "checksum": "fe4b8dc7a7af116032d1e4bad2d297ea683454760b698ec8a2f3f5691e9547f1" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.4_macos-x64_bin.tar.gz", + "checksum": "e2014d9fe0b0e687257a726e5012943a8a14676bfaa3ef0ebb4f4004a2dad618", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.4_windows-x64_bin.zip", + "checksum": "8e76f3edec989d0a647b1987f5cb65d12205450b53c5bade67a68f53b4ef2c2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B4/sapmachine-jre-11.0.21-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "6031857188f3dddf777aca63d224277f75de888e476380c80ff2368e8ffb32f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "a0f0441e166f98d5ccc02fe5aa31387d8d4ee8fc274fe1facacc4336bd42ca5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.3_linux-x64_bin.tar.gz", + "checksum": "7ba14b0e803b2a5d4d7a90377628bff7ee77a26ba5b241c5cde7fa97ba9398ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_macos-aarch64_bin.dmg", + "checksum": "6c9c847aadd63787f3c4457ad844d321be56961f2625b4fe2ad5439279437fe8" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "5519e068b89a22e5637c3511aad886e132d7a21a4ee232c225e2b525bd1e4f05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_macos-x64_bin.dmg", + "checksum": "464a65b2fc41eeeafe22d66e34630310385551ae4fb6aa93b4a9c64a536c1ace" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.3_macos-x64_bin.tar.gz", + "checksum": "df991251189123d6922fde5394a8d0dd060829bef9355c0d55a758f661cf775f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.3_windows-x64_bin.zip", + "checksum": "e2999612d907db9c47afecb8e167023d708e847f5ae4d7b53dc2ebc032f96dcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jdk-11.0.21-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "ba10d6b23f86f17366f8cacfc4f164149363afd1057e701fbd8917fda503c3aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "680e6c3e7c0c778ff9dfc56a308edcd7e69234f3aae3837ab708f3b085e3d1cc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.3_linux-x64_bin.tar.gz", + "checksum": "35d31238f4fd61afe53ca04d210eb973275c1401a70c31a8dd754bdd9d25520c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_macos-aarch64_bin.dmg", + "checksum": "2ab2460b7512b9a1541a2ed55b3a3ef445992f5cbde3f8f23887fa146cb9f27c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "7de12c34314ce224d1b08d8b3845a3964e5f127927b4a69375f1c41b64a1240d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_macos-x64_bin.dmg", + "checksum": "a0d99cd59a0d0e6378b923e56d0feb4f5e543bbc72953850a4e781c0212d38fc" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.3_macos-x64_bin.tar.gz", + "checksum": "d080c1c69fcdb5d0dd6b8ce7b6ca5b9096943c437eba07a8f2e0339b9ec09b03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.3_windows-x64_bin.zip", + "checksum": "1eedce8362c708aef82eafeef4820c3b875df6672a6e637e3641121b9a6ab890", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B3/sapmachine-jre-11.0.21-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "cca356aaea9972944889f2c41a90d96c34f56a06300ce53fdeab452f40248196", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "396c2e2b891ad37e8f36155a268b8d3a35341085d0dc1c55f5a20df8d2c77226", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.2_linux-x64_bin.tar.gz", + "checksum": "ff81692e405413f3ab9fd702f964744368333f71e62a3ce54b5e9afd7974d37e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_macos-aarch64_bin.dmg", + "checksum": "b816a001832f141c2067da7de6995ba827e6947a0c363f356933b3faacd825d9" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "07020ad0ff6da5370c686dc9e68e8e682331ee2a3c44e76005301d44976bd0d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_macos-x64_bin.dmg", + "checksum": "84535c8a75056dbc12c679b694846578493f967d06fcb47799336e799b05a427" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.2_macos-x64_bin.tar.gz", + "checksum": "0631dca2d0c439c2133b10820243aaa95c7ffea0075bcbc9bdb70d6c61558c82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.2_windows-x64_bin.zip", + "checksum": "c732cd9a9db55ad5cb9043b03f9bfcc9ada61d834e1d2c5ba1508d3b3307ea2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jdk-11.0.21-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "2ae42565f874fb478f46367aeb60b5fc0880d8fbad89f1b3475aaf04389884bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "af4472c7c2067302ff7f996366b2d999e3dbc8a94f767af86087d40ed6a7adb0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.2_linux-x64_bin.tar.gz", + "checksum": "71c4c591d1c92f27726b71a0e48627b397b884dd8a9bffa3d8cac989310b7a19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_macos-aarch64_bin.dmg", + "checksum": "5f37323ad603d94e121f9aab894e8a1ea152f26ba234f48645fdbe89ebfbdd05" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "c2a30ca9e9a337a1746221ceb27d9150bf8c37a6e0663f80bd0dfb4df7d238af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_macos-x64_bin.dmg", + "checksum": "63f9cbe996a9b67ce2cfc73ca64f4f6dc135d3e67197de069c2e32fa6b368c14" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.2_macos-x64_bin.tar.gz", + "checksum": "e50d7dd205bc0d121e82b80cd7175fce682cc442c9cb1ad309edf3b7d073a5b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.2_windows-x64_bin.zip", + "checksum": "15eb2c0dc43523a6ffdb03f5cfd9e8842d53fc17a29e68ac55f46a097124ea45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B2/sapmachine-jre-11.0.21-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.21+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.21%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "831dad1ffe95c065bff7b106c53e652df93e206b10583a13908cb207a08916a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "2219ec733ed690b82aff07947871fe4c0c662bacb8a31b32dcb4b50cdf19d374", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.1_linux-x64_bin.tar.gz", + "checksum": "9c1092de948f45c63899e0328af8b2bbd98bf57d7a33fa429c1bc6f09ea1735a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_macos-aarch64_bin.dmg", + "checksum": "75f61ef89ce0ad043d8e4df8f38b67ba6e94240eb0c93d4f2c423f5af5538e78" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "1b48b9385ff021d8a2062a49edfdae11e5b70c25d9bd43b0e777d3a84da8a19f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.21-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_macos-x64_bin.dmg", + "checksum": "d132c9283777855aa1e8839106d8b08fe4516c8613f6e7b8623aa4e9a7f3b022" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.21-ea.1_macos-x64_bin.tar.gz", + "checksum": "a28109278a7514846f8a101dc1e850a67b47c761b636b66938f73cd6e0b4bf69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.21-ea.1_windows-x64_bin.zip", + "checksum": "ddf71b51fb7c5040692692b16107d4f9b40fa265c2460302f106a30bd8f04436", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jdk-11.0.21-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "de6fea3d6d468a841ce613a56f709a629f5516c4e45ee70f53a029ea889c9259", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "7c4777f947be8fcb32a80349b557636b9cb4c65b002945cde3f456034e4e75af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.1_linux-x64_bin.tar.gz", + "checksum": "8227bf471c410375bc70cc0049fef63ff941480cdbcfe54de7bee6824fc49576", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_macos-aarch64_bin.dmg", + "checksum": "2bd02df6c039eb04080091ce2aad4c9ae32314fff1a08172d4f6bf51fd264287" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "f629995e0ee9cb54dbbf58100733ff544e31727fcc05fdf01ee6597a54017702", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.21-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_macos-x64_bin.dmg", + "checksum": "9d1d715c18e81a01893d36386f46cf8a937b8858a7ca2dae59cef703e8bd8c79" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.21-ea.1_macos-x64_bin.tar.gz", + "checksum": "8ad4fb76ef796ac569cfee98605835d3e6240c347d3b30b6437a94a68fb73c0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.21-ea.1_windows-x64_bin.zip", + "checksum": "41fb2bbfea3b96716ca3fcdc14f69c71deba1c710dd32081fe182cb8572f1642", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.21%2B1/sapmachine-jre-11.0.21-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.20.1": { + "sapmachine-11.0.20.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20.1_linux-aarch64_bin.tar.gz", + "checksum": "5bf09e5b982d6e55955b0d34f83fa878bb64d0ec3706916cbeabc3af78bb99dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20.1_linux-ppc64le_bin.tar.gz", + "checksum": "7c9405a96258e99cb25fc55c4ec951da97e9fc1548b7b1532bc249d091199372", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20.1_linux-x64_bin.tar.gz", + "checksum": "349514c4ff66c1452873110489fe9a0c4dc9bd2a47a5207e0a43e45fa49a6fff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_macos-aarch64_bin.dmg", + "checksum": "28b287ac3a137d55968c9e318909442e75adc26c6ed8d64074a5fabdc1340ace" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20.1_macos-aarch64_bin.tar.gz", + "checksum": "0d6387b711cc9fef11fbaaafde6c3f068ed0cc9a1088ece8c0fd90eb9a778b6b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_macos-x64_bin.dmg", + "checksum": "df8def51297f40d7bc63e64a9f49808d6a281316ef1e78e214f06dbf4c67cb50" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20.1_macos-x64_bin.tar.gz", + "checksum": "98c0f8294644bec653e6b6fa788093501e049cf0321b56662a0dc28a07e93674", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.20.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_windows-x64_bin.msi", + "checksum": "349c72cd87e55c1cf0a06a5bdae5dd452898a96f65ef7ee630fdb8b2ac15cb65" + }, + "zip": { + "name": "sapmachine-jdk-11.0.20.1_windows-x64_bin.zip", + "checksum": "51868075e11b627c28409a2cbe054749c0df949128d8704b322ced96f5e3616f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jdk-11.0.20.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20.1_linux-aarch64_bin.tar.gz", + "checksum": "84d456d21aaa0e78b8b8eedd86a9d4308911e4c22b0fc3127f6de8f0a4c80a94", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20.1_linux-ppc64le_bin.tar.gz", + "checksum": "eb4f2bfa218cfb4670884a7553ee77be52202c934e16062152c5d0873f68508b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20.1_linux-x64_bin.tar.gz", + "checksum": "cfad46a7c6e25b37d69bd6f4cf37f6ffa9f99b74b7856b4681c24428808ee524", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_macos-aarch64_bin.dmg", + "checksum": "e12c0eea46de98a1f056794da1da5df4721d582a48b5d85f572f275433c5eb4a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20.1_macos-aarch64_bin.tar.gz", + "checksum": "0db1fed6d59130f6d45104e8febc6a46301ac9324250455071a124eb15119ec3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_macos-x64_bin.dmg", + "checksum": "ff331555681985169851d68d2c9b509bcc85acc1d8e294b9818c036d2c685669" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20.1_macos-x64_bin.tar.gz", + "checksum": "a9f8542c84f42d21bb254e3a940e4bf361d89710936560d343cfd15c51c0d80b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.20.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_windows-x64_bin.msi", + "checksum": "2feb8abfe143664065bcdf51a1f44e44da7577f65dbda0a21673e03288935892" + }, + "zip": { + "name": "sapmachine-jre-11.0.20.1_windows-x64_bin.zip", + "checksum": "b57d6bcdc9f577efe74ad98a9a213ab8ddb6420f8df828167b282c1325726a85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20.1/sapmachine-jre-11.0.20.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.20": { + "sapmachine-11.0.20": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20_linux-aarch64_bin.tar.gz", + "checksum": "8c2de32f2843a62d49b0b14d1c14fc66eb3a3f15634e0dd52457a8ed04f532b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20_linux-ppc64le_bin.tar.gz", + "checksum": "6c4a893fab42092a6ab7874c457cf0f5f0f6c5901a50a427d8885ba087bac1d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20_linux-x64_bin.tar.gz", + "checksum": "d62f1cfff22c0800a03ae645ab91fee0aefaf6538337c6cb81e9c2a2476433bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_macos-aarch64_bin.dmg", + "checksum": "ff60fcc8ebd2a5f76fa7e318f5c046ab888ebcf91ae3b5937b7fd9d012f74a4b" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20_macos-aarch64_bin.tar.gz", + "checksum": "52bb4d9840cacb05d23986bda75e908e65a552a3dd2ed6df2ab3e9b0e9f9681c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_macos-x64_bin.dmg", + "checksum": "016c4622d57d4110189d73df8061dd5bde5f5632fc0e092e40076a64b6fcb591" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20_macos-x64_bin.tar.gz", + "checksum": "6c251b1d8fe46350c8bbfc94c88fee91115ba4966e158fa71d46190be81d8629", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_windows-x64_bin.msi", + "checksum": "a80875ffa275c53e77f4e668b95aa93165b97265a3669f8157541aa78d6fe438" + }, + "zip": { + "name": "sapmachine-jdk-11.0.20_windows-x64_bin.zip", + "checksum": "c167388103efebb5a930981f909e21c48140d25d9a9631e311f91d44d0d0d582", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jdk-11.0.20_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20_linux-aarch64_bin.tar.gz", + "checksum": "cdc5b7a2afd6020dd9b1e3ab1e383d2fd749df19db0f17fcbe230558e63b0cdb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20_linux-ppc64le_bin.tar.gz", + "checksum": "bfb31bc3f5d2752bf1609707e660bc9474ae5f96448713b4d670e0d838596d8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20_linux-x64_bin.tar.gz", + "checksum": "c97e0697bc27d1a1a57e1aa23a0f5a6a9a951844e36b255b90c944b30e8aa45f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_macos-aarch64_bin.dmg", + "checksum": "1e82c71fb4a18e7d077f9a32e2a851f2609dcaa9d820f045cf20bd7d2a4e9379" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20_macos-aarch64_bin.tar.gz", + "checksum": "a5f48f9608acf4383f04c32f1d405d4d92729d2250111036b2b796df9ae50779", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_macos-x64_bin.dmg", + "checksum": "c29b02c44216920c390d560b2961ef94815ccee8c53181079555c9d980e68ef4" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20_macos-x64_bin.tar.gz", + "checksum": "1bec1024b342dc5728a0a477203fb9e12ce4b14db7cf6fdcb68dd21458e96fcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.20_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_windows-x64_bin.msi", + "checksum": "b51260d33f7d5eb9fbbd414e0b7288ab87585f0f086eaa1f4dbc6997504f26c2" + }, + "zip": { + "name": "sapmachine-jre-11.0.20_windows-x64_bin.zip", + "checksum": "ab25dcdef5dfff50497e21a76d25e80d3be5021d690ac5945c6d01d95a8857c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20/sapmachine-jre-11.0.20_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "da4a46c7077438c08c7b905deda2d1d27166bb4e5a95e7f29465590beed7cce9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "284f339a4c93010d6818c966ae065666b8ce705f02052d7b0fc69e1602014390", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.8_linux-x64_bin.tar.gz", + "checksum": "df17d5feb59ed1f9574465534ad78e196414c6ba41ea2551107fd8bd220cf60a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_macos-aarch64_bin.dmg", + "checksum": "437d8b6cb74fe045b171fcae5a9bbc4a8c2283dac090029fa3b2ba672b6c900f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "0014d7b424241b80e48c44d872a16e777758a24da703b41e49b70866ec8b758f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_macos-x64_bin.dmg", + "checksum": "52be25f5f1fdee6a5c480437552164c6921826dfdcbaad3aed26b2298517c2d4" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.8_macos-x64_bin.tar.gz", + "checksum": "b234b5e65efc9b3361121e97e72fca19094a5c701b80d3e1032e5f8dd8c37e93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.8_windows-x64_bin.zip", + "checksum": "4b3c0be3ef0d095718f90f2b1eb8137420927cbd9c2efc8725094b21e0362f19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jdk-11.0.20-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "872210957b43ffef672a01604fee062b091e8a1943df291e1deb53e57d795811", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "091d9e13af354aec4c668c858aae134b2ac5eb28c75603902bb329d98bfecc35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.8_linux-x64_bin.tar.gz", + "checksum": "d7233867e8bae870cb247f006b8072474816e99628e4e8efd25bb81b967f04eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_macos-aarch64_bin.dmg", + "checksum": "7e558fd34bc44b6b54eb81a183d87ee389963e360cf22977567aa1e82a76c9f5" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "be08955ea1869e036a67cd2371f9d569b0ca85e95e7b330680648676e75a3dfd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_macos-x64_bin.dmg", + "checksum": "ea02ae3990d1c509d0e3a79cfa490ea8048721ac0cfdded08a3d34c9a3198468" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.8_macos-x64_bin.tar.gz", + "checksum": "ad34d0ae303a88e7c52cd54f3fded9765250a433d083e3aed5bc5105addf0576", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.8_windows-x64_bin.zip", + "checksum": "a3f65a0739f61ce700033e8c0a51cdefcf1d25eadb57cdcb4aaeb05976c07482", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B8/sapmachine-jre-11.0.20-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "306dad7b27938190edfae01bfa273084eaf8b99b7d67c55902ec7f5fd02898fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "ef5c3dfc6f87ddcd45b2beb286e90b436de3d54dfa6f38441a09da66aadb9024", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.7_linux-x64_bin.tar.gz", + "checksum": "de1bfd39924fc4c3a448a6990a46b51744501ec7b3335b31d94e96375e984b50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_macos-aarch64_bin.dmg", + "checksum": "ba755996010f19993493733f222a0d7e20f7cfba4fabbf4d453e887943ce8aaf" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "9e891dd7e04b09093e852f274d904fe0d9c5a7c0514901cb8dbcfbb7347a8c7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_macos-x64_bin.dmg", + "checksum": "e4172a4ce7d843d2451bebd9232719b0d944efc0c2e22ae2dd2415ca1d814bc8" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.7_macos-x64_bin.tar.gz", + "checksum": "cfd8f6c4c2ddab60a6e0f09ced095ced26b0e23a5d4743c99680ddacc1555f7c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.7_windows-x64_bin.zip", + "checksum": "8773244b37a15fd2e75ce4b49a23a2df7799ba6013af2aabc2cd04c9447aee5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jdk-11.0.20-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "802ae12fb337106aacfeef7c2b522438fb89416c1ff381fd787d44f7aa876b6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "7eaaab6fadd91581741f341c87dd326925023162d27c73f7a65c60cbe2286b73", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.7_linux-x64_bin.tar.gz", + "checksum": "5686c2e6f74f6c031bde07a48345f33e9757047284524fd27eb921cd6631460f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_macos-aarch64_bin.dmg", + "checksum": "9ab2db1059c78735ad4b04529671e7b6ea7c15da2e590b4b7aafde29b63cfb36" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "e472627a70e98bc298a82cba3140d1320e2be11c3d3841beb28de7eae77688ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_macos-x64_bin.dmg", + "checksum": "8079455faf1cf67ad46b79b550aa3bc68920be8910c789b822ab4c06589f2340" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.7_macos-x64_bin.tar.gz", + "checksum": "420338f58bcc766beabf8430b019718d578c6e573f47597d124fc0100bc6f663", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.7_windows-x64_bin.zip", + "checksum": "3bd4f23ea81fa1de836d03ce71719a4f901273a8a17d992c535ed16858fa381a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B7/sapmachine-jre-11.0.20-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "979e5a1ec5e88b4704ed364c39fb0049e915cc4f315b2d10e42b96929ba97157", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "7079c1d12fc229427dab6ddc5a9a37fcedd0df25e9d0e38274edb667f4587683", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.6_linux-x64_bin.tar.gz", + "checksum": "9b0d635ded3801e4c6600084433616abb3925360e864b4be1dfd7af01d400a4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_macos-aarch64_bin.dmg", + "checksum": "63e02cdb602fa3ccc4a64edb79c8a20b0f3663ce0f0673a4ce7627a4bf98c346" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "322293167fbade4111b26da5eaa675b12b6b3cd52a0fd0554857325d2143d116", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_macos-x64_bin.dmg", + "checksum": "c9b3ffd866875cdc85a20ba51dbfedb139c6bd99dfbe88149d2fb1f55e2d40ab" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.6_macos-x64_bin.tar.gz", + "checksum": "ec16af7075eb5be3ebe25bffd5fd63c5d5739d79e2f46b959b156f18fe20d9a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.6_windows-x64_bin.zip", + "checksum": "fdf6bd4f42cc053ddd6bebd71455cd396069eab7e2d6f315fe02a1bd71595beb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jdk-11.0.20-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "97cc2cc97f7f97aefe5a8fb59239e38d59d863c11325b88839b810853b10cbcb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "cfa57e6e69e1b00bdfd82411b2a89bc419d392c1ad973f4f67d10558216d3d8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.6_linux-x64_bin.tar.gz", + "checksum": "5c3b5e29b5b07a0c5ae78356d192212700be5c6ab395e60d30877d438dc65f42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_macos-aarch64_bin.dmg", + "checksum": "c24057d2763b7a3fb7b666f159ae70e22625968a2f52300363e273aea0209b94" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "5763513e7bbb4083a2aa363250e7c74d1e5d1feec7c3d44074f7aa78e7e733ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_macos-x64_bin.dmg", + "checksum": "a8ff0231d4740873c8f0b9ee5b24823384ef5e34b396fcbc4c077f6a287197b7" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.6_macos-x64_bin.tar.gz", + "checksum": "a2f52bba9ff4b92b9c7269f417a2038496b2af5252950fe89c5b396d8bcd0dbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.6_windows-x64_bin.zip", + "checksum": "595777b35cf8f9a508aa1c14ce8c01040f264b249e3805b60b0f129566fe02dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B6/sapmachine-jre-11.0.20-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "854a1ad36c68c71887fe3f6cd842c89d6a20cee33999d045c5f1352fb8808d0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "df16a894095d2deb0b50c145f123fa9a5b374ce268e61f59e2aac68a63a2385d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.5_linux-x64_bin.tar.gz", + "checksum": "803f215b1a3799447385fb9b1fe68766c8e85613cf15a6c88a4453cb636af5f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_macos-aarch64_bin.dmg", + "checksum": "8eb02ac8591bb6727b0b4132a7254b7420da00bbea33812817701e7496568017" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "5ed5cdb3e41d6b78835dd5149475f0b3a8d8cd6fe9070a18da73e91d6e240f2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_macos-x64_bin.dmg", + "checksum": "e498a6f505812fc371245954423a6113b94c2f7b790728fc03e2e6d6b31f2ac9" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.5_macos-x64_bin.tar.gz", + "checksum": "e8a1673e6271bc5c78a64a8dbe73029f3bcb85b0012e371efb3fd447f6fe968a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.5_windows-x64_bin.zip", + "checksum": "5d0b68d5447bd12d70df2ce99bc42feb75870b3466d55d294ccfb0176cd5b902", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jdk-11.0.20-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "6521c7b615a3c157b211d370930c53df9606d316cd94c454aa787762eeffc5c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "d687d0dbcee307f044eae785010ec277b63c291631b5f2af89dd268e5e51bb58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.5_linux-x64_bin.tar.gz", + "checksum": "c91313e467801e9593a509e2f8c63f0eb39b9d3ccf0403b74e195e2deb91843d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_macos-aarch64_bin.dmg", + "checksum": "f8a37bd8e800d4911ce59fbbc0339a230692e7a1a44651a54b60dce3bab8a6fa" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "2d6f1a689fec5e2928128b0d7a9f3b230018a2c9d3555d522acd08120433033a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_macos-x64_bin.dmg", + "checksum": "4e483c0a331560b39b828c922525372467b50c8c93e85c8e92598d20ad0f9d52" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.5_macos-x64_bin.tar.gz", + "checksum": "6f3c7e53b5cee53c274332a743b0fdc98de3618695f29cfe16b1ee3ee87a6ac6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.5_windows-x64_bin.zip", + "checksum": "298d0eafb4204e455d667f44e2ca1badf16e4cbcb0a259009ddf2cdd188619be", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B5/sapmachine-jre-11.0.20-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "344dc6fd0805452e4bee76183c4fb65ba3e545491bb3c656cc91e84acdc78307", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "448a9b96942f0ff9e1f0a349698e06a194a8fb5c19d2888956aa0048c4bb1ce7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.4_linux-x64_bin.tar.gz", + "checksum": "904cbc87972a2d294271b4404a0d3f7d036a333f75fe591e72fa3bf9140a0332", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_macos-aarch64_bin.dmg", + "checksum": "d20d7ae6b52b9099b55da4c1b80bc4a9b00767e9e947636fc2d3c61986245475" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "7d2724261fb85a3f1d17fd470f284cc2ba3aa5698e1026c6890c60679ecfe7c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_macos-x64_bin.dmg", + "checksum": "bce727c7fcd0fb4f3255872765dddc251599cff430d92d1355d1e10d3a31f2be" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.4_macos-x64_bin.tar.gz", + "checksum": "8e2b5c24b28cbf1a930951c7413f90553f3596bf47c101784aa625767b74e09c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.4_windows-x64_bin.zip", + "checksum": "798b4191078694e4fc9a05e80d416f68c74b295787ebe7fffba3a564cfb66476", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jdk-11.0.20-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "9b9dcaf8b1d6a4f057298ba4e6be9d999baaee4b96bf8583fa914517126ef1b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "053a412453d647380b307c8473077e82d926d4f8531e1fed5243ffabc8721479", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.4_linux-x64_bin.tar.gz", + "checksum": "47739baef0cee235a4445d26d9177c70d36d1e872e385856f58a0c8422953a45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_macos-aarch64_bin.dmg", + "checksum": "4dde2478baebfb954997128e8bb5f59de904cb74ac298f99d9e1e315de23ae49" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "5c98e6ef5ff788e2f108fdadd1756ada59c606913c1833f7e89d114075bf3573", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_macos-x64_bin.dmg", + "checksum": "ebe48c8aa0ac8422ced08d3b21a4ea88c99cf737f659f970b66965920c78a855" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.4_macos-x64_bin.tar.gz", + "checksum": "0c11fef554c7a3c057da62a1abc84043ce9b5424d7ed34926a45b3e219a190c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.4_windows-x64_bin.zip", + "checksum": "49b4965ad3de2cbeb7520e85a9ec53fe19ed80b7e954fbeac49d1909bed9b69b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B4/sapmachine-jre-11.0.20-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "17283154bd3df376a4f0b3846ed1fb67817dabcc063d20a4e72fff6f60d75ad0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "4cdfcb45b256e50a9c1257c4e0a10b21dc89679753fa46ffeddb9c2d4b029346", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.3_linux-x64_bin.tar.gz", + "checksum": "f9f5c849739e8b217aadeae216abeb40126997aa57a269fad1be97355174cb86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_macos-aarch64_bin.dmg", + "checksum": "bfd45c9cdaf181af3796c173741c17c961e2cd4ad5d3eadfb1586cd1cd3dbf01" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "cf8f64a2dd61861f08511788876779bac8be0f25a26099fd1fbeba451c5830a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_macos-x64_bin.dmg", + "checksum": "3c64f89f374d96d0ceb272c96c33adb50c9243da90e2fbd984b761fd0e40fe70" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.3_macos-x64_bin.tar.gz", + "checksum": "90421079a46a7c89b2ebb822399386b6f235f61266570d16a01ea9426db92971", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.3_windows-x64_bin.zip", + "checksum": "62b133abacb139bcadaee18c3842f0ba2344e867f227859289e5c2dbef7b4562", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jdk-11.0.20-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "bd064a72bbeab97b4efeff312d8d22546d0eb6bcd2785c4549294bb49565bbde", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2c235bef7422e405627f2ddbf3f26ad714a943b3abc5d491a90999da7a6658fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.3_linux-x64_bin.tar.gz", + "checksum": "6c56366722c9b596f086e9d47493544b0c18ba454950ec9ae9bb0abee3de775b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_macos-aarch64_bin.dmg", + "checksum": "d8bd8230456957ae5ed10fed3c300f7ada51567f9f664249a2deb0516eff962e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "920589241a421c1487732b404d00f0638a913042afd50c6eca77c6f55fddb71b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_macos-x64_bin.dmg", + "checksum": "3687350a8d23ca11ef9d9ef3479dd1271a35bcc0b022d0a9adcfeb4c76e86df2" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.3_macos-x64_bin.tar.gz", + "checksum": "03e3f34a431a811a5f5951f08881f07a29a5389291fe1f65be46deeafb6b1ec1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.3_windows-x64_bin.zip", + "checksum": "267a1ec561a7c2bd34caeb0032597912161a91ac3602f7ed5b9e09f5e7afe5e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B3/sapmachine-jre-11.0.20-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "fe71140d766afe596f8e7b0079cc4eaf5c59858392514542be333427ecaffdc4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "5d08d4a61c815dbba3017fa242604081f5c5c2f53167b4817e241eeb730ddfc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.2_linux-x64_bin.tar.gz", + "checksum": "0cdd3a4188203102034c677f711cc28b075650d4404d280c81f927dd05e38e36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_macos-aarch64_bin.dmg", + "checksum": "e690d585648e9cef36f401941109d7284c0099c77144b0cc0bd5156c0660f10a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "f6632a3966b49c8842983de5bb5f3e31a834aef7e741eb672a14769785ec3dc9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_macos-x64_bin.dmg", + "checksum": "59888da044cf168e15f12b23d5c6b5eb4b921b4a906fc479cd3d894a13e72a17" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.2_macos-x64_bin.tar.gz", + "checksum": "ee4abe12c0a7d6722d4c2fd801382cc2696b60397ab97da46fd9ea00077af137", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.2_windows-x64_bin.zip", + "checksum": "0d0d3d31c3e072c219da336488f9e588832eb19ac546e2666ae325d0c452dfe8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jdk-11.0.20-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "6ff7929e1926b7fd41ed42c71284fb0d355afe3805ca67a354abea18ab2773b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "4b053c0bdf3f93c4fe022ed58bfcf58816ea968d649289528442a8c7dc5ff0e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.2_linux-x64_bin.tar.gz", + "checksum": "96753ba3a2964ea3920a8d2ff8bf0ba839a271f9e0e6dc7abb9338689883cae1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_macos-aarch64_bin.dmg", + "checksum": "9987d5344160bc0bf5df1381221ac9131dac05bc8d55749e824c0fe16034838c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "c51ed9fae35dd10bf078d8e2997d0f2cb80b8ce80cc3422fe5846cbfae57ba44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_macos-x64_bin.dmg", + "checksum": "72dda10d17ad6f8462d6d2cef74bab6d11eada1e790a4c2e704e50ea7f76c4f3" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.2_macos-x64_bin.tar.gz", + "checksum": "1ab40c63719eaf1f2f45317392ec36aafaf64b29c8b9d106db23f700562c8c52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.2_windows-x64_bin.zip", + "checksum": "fc467dd98d41f52bc67d9510bbdc79b4df33ed259cab3cbf8e9a9cc96ec6eec8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B2/sapmachine-jre-11.0.20-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.20+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.20%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "346cc2d2f132b123e01102db5f623430e946c84a4c848c484931951394ddcf69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c94550810375204bdf93b631c71c401d20c55bf5abbba1dd5950068d88c9cc75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.1_linux-x64_bin.tar.gz", + "checksum": "9986c674ec319dc7fa1d27f49bab869544bc8419667d125ef1ff999ff44ce0de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_macos-aarch64_bin.dmg", + "checksum": "2fc55bf9a626b43afda64fe1ef708239b1bee9dde8dad572dad88523e62eb2a7" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "aee2a3cd2b06e046ad133c6a0cda2983f90dc168942f108fcbf56e8f264501b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.20-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_macos-x64_bin.dmg", + "checksum": "9b2109421bc90b2e44f6bafb5a105ba327121380da9884326fcb6f9fe765fcf7" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.20-ea.1_macos-x64_bin.tar.gz", + "checksum": "cc724f474612d490914325016b9c7ddda36dea267118adccdbace12ec0a1f3cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.20-ea.1_windows-x64_bin.zip", + "checksum": "a801c26c92c04719973a4f8521d2a09923a556520729bae79e197c75b6b2ca5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jdk-11.0.20-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "878767517c40da8595eb277464314f556f23d27ca98c2d101dc043a0588999e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "899f6f636941bdf58689784fb0201a3f7217bb327b21018157b3035bc0717ef1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.1_linux-x64_bin.tar.gz", + "checksum": "15bade2822fc265ca3f9f4360368d5c6aebc2342782c4f221fdf2b56a3f06e0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_macos-aarch64_bin.dmg", + "checksum": "f3481cf6e661a92defc9d6466a2a187166d880f06052e8107757af6d6f98e14f" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "f20e10fe468b1b224a683d02bdf0f62448d9411da92f1e8e50ce09c742492353", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.20-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_macos-x64_bin.dmg", + "checksum": "12db4142023a6ade3c6a6ae3235e8a7c73a50dfb7dee89154146a52e6160f93b" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.20-ea.1_macos-x64_bin.tar.gz", + "checksum": "f35d0a4cae80047104f2e273bb0f5ddcf08db29b942feea90986bf0c9755b2ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.20-ea.1_windows-x64_bin.zip", + "checksum": "74a79ac4d554f084989f82ab842ac0272db386214d544ef49b39b2e48e7f8b5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.20%2B1/sapmachine-jre-11.0.20-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.19": { + "sapmachine-11.0.19": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19_linux-aarch64_bin.tar.gz", + "checksum": "4bb85eff093c867c58ae961258b1e3417d0fd73388ec17e8ecb8f482d15330a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19_linux-ppc64le_bin.tar.gz", + "checksum": "a7596b54fe1e9f2cbab0136a9476286693cecfa725715c501b300a7540afc987", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19_linux-x64_bin.tar.gz", + "checksum": "0a8d754e5cb5c741badbdd2ac8df48126334c7c2e04a80819c970216dcc7dbb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_macos-aarch64_bin.dmg", + "checksum": "90876d2396dece12bab4f1058a45252db371ace05fc4c08ac7b14a3f74115d19" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19_macos-aarch64_bin.tar.gz", + "checksum": "be9a2446297f641d4cdbbd4083f08a8839b6881d9a0a9dccff6be5038589c029", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_macos-x64_bin.dmg", + "checksum": "47fa3722ee0b4fa65a95607719743ddee45e115ac624ceec9dbe9739e044a70a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19_macos-x64_bin.tar.gz", + "checksum": "6e57187b804f6614834db1b1cef5469e7e6c74aa9224b685b3fbf8cd99e0083d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_windows-x64_bin.msi", + "checksum": "bc6414eadccbb886c6efb80684fd762af70b9f7f7bc36c8ca8502fc217f8198a" + }, + "zip": { + "name": "sapmachine-jdk-11.0.19_windows-x64_bin.zip", + "checksum": "e67c161d4f0c64c455cd23b5bed4451291a738c320a0ef81a94e9041c1a14c64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jdk-11.0.19_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19_linux-aarch64_bin.tar.gz", + "checksum": "742b93811fa3c2ef1d164aa42386816c031156d8095b1e3f0b51afce042d0bbd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19_linux-ppc64le_bin.tar.gz", + "checksum": "4689bea8da35d4a4db8fa66c8a14af72e3f517624010fb101c7388a6a208ae43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19_linux-x64_bin.tar.gz", + "checksum": "0ccc36129fad28656352619026eff1c314cb033091f888616f90103139b58f05", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_macos-aarch64_bin.dmg", + "checksum": "135d11caa3d2199fa037cd10341f8f3cd068e583b74ac528902d072822ef400c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19_macos-aarch64_bin.tar.gz", + "checksum": "ac448bf3295c33e80fd0ba9e93a9a5c46ba0cd8825268e6a57d667e01e8b95dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_macos-x64_bin.dmg", + "checksum": "c00b4b6660beabe986e4149e79768b9f3164353eee968723a28d8c5c6618fe75" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19_macos-x64_bin.tar.gz", + "checksum": "333c9012cae83d61c1efbbe590f5e0e8656da5b998d94a557aae07c7066fab46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.19_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_windows-x64_bin.msi", + "checksum": "b124d1c0fe38b8cc3bb5c6ccd74fa30af0a210b9beb4113685d1b11b42a07700" + }, + "zip": { + "name": "sapmachine-jre-11.0.19_windows-x64_bin.zip", + "checksum": "732347e250d6b4a18b000d58f4022453362435d138823c5edc8b0f413bc56f87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19/sapmachine-jre-11.0.19_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.19+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "67128895c96470745a0bca12e1b0203ba4d998dddf5f5bc47db169fd4dec6139", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "444427c7d76ab132f330db591a70a02b27cb0aa9a16c35d4f57d65bb40895401", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.7_linux-x64_bin.tar.gz", + "checksum": "747f8517b974d854a8890de67dc585fc8a4493e8823a7aab1014e5e5c4ce5a01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_macos-aarch64_bin.dmg", + "checksum": "b26fb6347ade591df5f97c563adb9145b56a21bdd7eb6c9ade72e22cdaa2ad31" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "4fd5ab11a6773b734e1af74ff03a182a16472b78e061fa8c27568b6540159102", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_macos-x64_bin.dmg", + "checksum": "ef4400163bacbe0bd8bac420cc4b3ce2ef27e4b846b716d534eabd06d81a9635" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.7_macos-x64_bin.tar.gz", + "checksum": "134ea9bd722dc552b22718b8b29f08b06369c2e32f56b06976acbde4150861e1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.19-ea.7_windows-x64_bin.zip", + "checksum": "e6ad0fbdadcd44a4e1dc47717edc8fb4d3093171e92fa62e018b02f6b1ecd8a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jdk-11.0.19-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "8cc878e081d125f8d8769d562c02fd6f5ad6bed9c275b4f89bae8706ee19b0b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "f409a62525116f916889f204bc7f67d9a75706e03965feab068147a555ea6fae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.7_linux-x64_bin.tar.gz", + "checksum": "7a639dec7756dcff390dabb673aad5d6fdc266f8f18306bb907622f5da1005ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_macos-aarch64_bin.dmg", + "checksum": "61c2bb216cfde2c0694cd1574a8f0a6f711641470966ba40bf4f85f62508660d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "c6681bc63b2a4d097c409ce4426ac234a5c9d6a9b4f49de6f53aad28d4602a5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_macos-x64_bin.dmg", + "checksum": "e256ee20ea402f9dc46ea955d9f391c1d1338b936befc8253cea9cb3951c42e4" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.7_macos-x64_bin.tar.gz", + "checksum": "c20721fe8f3c3a90bc5fb631a8f71e546b9ca3f6a8ead1ca8b27cf6024a77143", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.19-ea.7_windows-x64_bin.zip", + "checksum": "387dc79abe35b0f18e2ac9a3201b1c47f84c645eea8ff5e9a34ad21c1f71eb8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B7/sapmachine-jre-11.0.19-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.19+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "09925f8241fea0991cc48e1971e20efab8a2cf2016984c5ce88a10de95a8ee42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "2acd56e71f59800a55a6997e875cdf790b38f738561025008fe37e0316d917fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.6_linux-x64_bin.tar.gz", + "checksum": "e94d2c34f7f8eee562fafa29fce3cfd7cf5dced9e74389650204560c7aad39f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_macos-aarch64_bin.dmg", + "checksum": "cfb7536e36300c7e8362a863fa40f07b422e8c8420b2b91574f2c9d7215cee7c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "4bac475590bfe9e3f3c78b45bac9380dcbbdd7c31d9e8d21737b6fe9856644f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_macos-x64_bin.dmg", + "checksum": "3a2640f178d20d6298db4b81c30d26bceac00ca221eaf86d8500776fcb852e30" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.6_macos-x64_bin.tar.gz", + "checksum": "ef6a0fbe03378a660a6185b6d9a3a23b3548eca454a0a7372ade446e1d84b4b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.19-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_windows-x64_bin.msi", + "checksum": "a1af6d52c0e009d59ea447a9bfe2b639c0503254e16957834612eb4a6cd9875b" + }, + "zip": { + "name": "sapmachine-jdk-11.0.19-ea.6_windows-x64_bin.zip", + "checksum": "f72793eb04175d58f2ff751741c58b6b2ef116d22e3e2da17fe4c5ebb0f2c367", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jdk-11.0.19-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "02e7aea187198f2f6d491a665eb9b1efcaad18a7337ae72063b6568d149762ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d903030ab4f52cccfacdc854745ba14cba6b78a7168e73e8ede0e98d659da3e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.6_linux-x64_bin.tar.gz", + "checksum": "f7f1185ce85e6a9618ff721ce49abe30fdccccd678a46fcf5fbd7ffbed03d713", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_macos-aarch64_bin.dmg", + "checksum": "d2cb8b37364318597f85af924476bebc90bbe415f1c7d1debc0e0ee1bc571e99" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "c06a8360ff19e168a2d3f8f5fdaff94fd200769d06e4a8c091fa33f61c192d8f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_macos-x64_bin.dmg", + "checksum": "07b149e686f808e4512a1a1b0c9ccf4cc826ec52dea5c53454710ee00410c09d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.6_macos-x64_bin.tar.gz", + "checksum": "a2af9c721e24376a4eeb72c0c97d75efbb84f57931b37201db99f2fe6dd52d41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.19-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_windows-x64_bin.msi", + "checksum": "6088db36da80e465a9768ba5e65853efe154a39b8ef08de5aef72c0c594b75ac" + }, + "zip": { + "name": "sapmachine-jre-11.0.19-ea.6_windows-x64_bin.zip", + "checksum": "d4501a915c1d8f6906ded532d4cb5b8f97a1b7c1a7bbdc17613ebe086c9d8587", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B6/sapmachine-jre-11.0.19-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.19+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "fa263998b9c6fedb6fa3e7ccd0e1dcd47c0d6c33db91805276c17f02359a6c25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "192d88ccc42ffd8d575604fd07275bdb6a9789a274f2710824a96cac28483ea1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.5_linux-x64_bin.tar.gz", + "checksum": "318c687653522c8657b45a603673307680e0b8370e85076ad6bcfc8bfbb32cd8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_macos-aarch64_bin.dmg", + "checksum": "af8cd1913068aeaa4d10812b80d19d462588cbeb0c25b495c2ac9280b28def92" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "a097d08f40b78280366dd2837f0680dc1a88e932b8a5533ae95a8ae1bea27783", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_macos-x64_bin.dmg", + "checksum": "06db140ebdbff28042ac3a9f7d91554d83514769f7b4d3d6a2b838106b275be8" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.5_macos-x64_bin.tar.gz", + "checksum": "3499654ad9686ae9d8eac36613cadbe662a10b27e12bd52d56e5be086edda941", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.19-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_windows-x64_bin.msi", + "checksum": "23099589756e7574590b5d6a71855aad11a673b546d9e34a966c27851dd09086" + }, + "zip": { + "name": "sapmachine-jdk-11.0.19-ea.5_windows-x64_bin.zip", + "checksum": "dae832377c61dbd0b107b8936612f2762b4f741485de921903f77a6cef8ff9f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jdk-11.0.19-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "7fe235de052f35011d18e3c342776183c32d444e38e480081139b37e488fe87d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "b8c1d0da01b37a8fa423943e62d24a2d05000c04b9cf9ace141d9609b6a54814", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.5_linux-x64_bin.tar.gz", + "checksum": "c05f38e81b4879ef4829b1a2602b647dab9cadc031fb83baf0712291f71cf16f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_macos-aarch64_bin.dmg", + "checksum": "a28c54ecad188b2003275df328131008340b97aed86bbd7daa3b0da8671ac635" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "7ce3e7686fd7183b79626c9e7bc1958eaf6bef884349f9604d46aa93a6e13dae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_macos-x64_bin.dmg", + "checksum": "ec5186104078cbb6f2416d9d1573b2411e0ac493d5a8a1e73ed2f0fa65f700a6" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.5_macos-x64_bin.tar.gz", + "checksum": "47c77ca76a3f44122b5a78b4277dec9e49dd7c705c3dfc84e3c7c761ad0c2e0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.19-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_windows-x64_bin.msi", + "checksum": "207ba66f5d5c278e01c17678560d4a124feb04084b367acb48478e83e8d1d758" + }, + "zip": { + "name": "sapmachine-jre-11.0.19-ea.5_windows-x64_bin.zip", + "checksum": "89b1ff4cca714d045b432253640023b4f7a5ee9d94d4dfaec29f9624a2605a56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B5/sapmachine-jre-11.0.19-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.19+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "6d1d72a3aa2949da7e689c73d83c6ed8b84397f20ed064fd0f38e4e3b2f3de1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "32b9c7aa7f96ec8a228a2ddfcc128a797769385ca9028ecdace45457b5fcc6e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.4_linux-x64_bin.tar.gz", + "checksum": "9c3e22b9ea9230fd68aceccd056b4a27d90f1dfe1b71e380c397170b88dbc35d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_macos-aarch64_bin.dmg", + "checksum": "f94c03912a8e467895ea8942b3121dec8395d880754b1a07819dbca9bed3ffe4" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "16a16436df3b231a2ef9f02523d62e2580c29884ae62425204dc61440a855d3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_macos-x64_bin.dmg", + "checksum": "6837b813782a20548c808e9a942bd63ace38c148d83fe3b79cea03941f860c4b" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.4_macos-x64_bin.tar.gz", + "checksum": "1a1c5912af54aa8b8379741ead2ebea83eb535331f07be1e23453389ab83e69e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.19-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_windows-x64_bin.msi", + "checksum": "b448f3c1ec5f9129d89fb4be389b8c559c09577fb71d3106eed408f8adb02e90" + }, + "zip": { + "name": "sapmachine-jdk-11.0.19-ea.4_windows-x64_bin.zip", + "checksum": "7b59546ce1fac96e5953b2fc2d68a555454b5768921d4a7f06159c22478e7aac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jdk-11.0.19-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "077056ca9d161d90bfc0c6b0479e51534a61d079e8de5fd50b402193c3770307", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "f69f4dd02b8614bd9cdec8384bef6d3a5c08602700e749f225f05aa9bbffe3e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.4_linux-x64_bin.tar.gz", + "checksum": "6fdf684eec976b11231bdc8ac2ce8116b6bba7b463ef1cd2d0c7af07f0698d3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_macos-aarch64_bin.dmg", + "checksum": "d5935d85813c1a887ba38451cf61929c28ec4359a8ab7dc7b678c3257567e34b" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "14464224f75838f397102518b4cb7e1d9bf5d3e76da7fd1871afbdac50c23888", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_macos-x64_bin.dmg", + "checksum": "3ee9f2dad23861133c4a339ef467ced479b1b34d683878e2419a6b6de182af88" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.4_macos-x64_bin.tar.gz", + "checksum": "3ff90fec7e33ad4f5b213e0691c74fef4c4a83e979d546728ec8a258a04bce7e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.19-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_windows-x64_bin.msi", + "checksum": "5e2b46d72caab5ca3836171cd134875899be90bd60b8c9a65842232bc01745e7" + }, + "zip": { + "name": "sapmachine-jre-11.0.19-ea.4_windows-x64_bin.zip", + "checksum": "f96b7853713115a92ae01bbe7c4331577907a5f20d5d8d26d0077affc32c88b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B4/sapmachine-jre-11.0.19-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.19+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "bfb409c0be76a7c245305bc6d8d093176cbd691fef51a78521dc593890c2169b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2bdb8bfd99b8160919cec5cebae59ce6e79792eaab48e7c4bc1b6791740ddfbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.3_linux-x64_bin.tar.gz", + "checksum": "611af3ada14c76c7e306f6e18b298359aef16f0cdc0603cb95fbadf64803a3c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_macos-aarch64_bin.dmg", + "checksum": "cbb3e655fd1e89b6225b2cde4a1175584138c04f3c61133daf78370a59c4d4dd" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "72a3a100a49a41f817bc88efa022f2dd96619e5d5f0396ed33ddef3d34574c72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_macos-x64_bin.dmg", + "checksum": "aa4926c0c39345204792edebadfbe0112eba3be81e4460324db21fbb42e47265" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.3_macos-x64_bin.tar.gz", + "checksum": "f1e1d2032c17b7456554e23587bc7af298b8d5cca822f8432e65c1cad0486146", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.19-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_windows-x64_bin.msi", + "checksum": "f7eb77a4aa66be6dd73496d15d723d016fe97cbe0b11b430a3a6e9b603f2084d" + }, + "zip": { + "name": "sapmachine-jdk-11.0.19-ea.3_windows-x64_bin.zip", + "checksum": "43505fccee3575d1cd920ecbb42b8ebe8f172dba5ce35d594b1286d45f8a39bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jdk-11.0.19-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "afee5a1b9fdb7dc6993fb94ba0129190c1df711c98b05af9404ceb8326fdc1fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "e4bdc40b60e6428f365f9a00a08870173dfddc70d3e1232582ba8002d49198f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.3_linux-x64_bin.tar.gz", + "checksum": "d728d4759e2b2169739cd64b3798d90b8fd0e33f592b3d97478c91168ae32032", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_macos-aarch64_bin.dmg", + "checksum": "bbf65938ca3ea4235f491bc938c54e5027a96bbf732721e099003624c84a1f0a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "3b3705953e0cba2b12e26ce1bd3ac85dabf45b237398ad9553537653e1ca9446", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_macos-x64_bin.dmg", + "checksum": "77ee92faaaa6a5cea8b05c49709e174812ac9d596760e1ede9058bbfe5a7f5ab" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.3_macos-x64_bin.tar.gz", + "checksum": "5f79dbc1c958b4e5ca220849f0b09ea2888747d24f239db9755cdc57d0121131", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.19-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_windows-x64_bin.msi", + "checksum": "37ad1ccee2a4bb8f1ce40a7d9e4b0acbac87a1573d064795d40c3b84bd3c5967" + }, + "zip": { + "name": "sapmachine-jre-11.0.19-ea.3_windows-x64_bin.zip", + "checksum": "5feb5fe8d902c26bbe2ea5157bb64092024562323866e112764dbeec772391a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B3/sapmachine-jre-11.0.19-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.19+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "214e18079c940c6ace5e2ea334c3fbd35ba56d959d85fa5adf954c5837acc6c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "7940bbf56bb4cd5841f139159e4b1d381baaf557bc216a7b092d3f544479fb79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.2_linux-x64_bin.tar.gz", + "checksum": "9ee712377a933610fb4588a878a93b34f23062cd4088fa929a13d4ff13b57a57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_macos-aarch64_bin.dmg", + "checksum": "9dd8d634ba9fa391508032925cbdb98e0fab77ceb9cd3ecbd433c95cd9ffcf45" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "69127880fa2aa7aa01eb8652b130165f27cb1504d73f224cd2898bd776b0eaa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_macos-x64_bin.dmg", + "checksum": "9429d283085faa099efe3e5121d636e24f5ba2432743efd000ee657d9f6bcf56" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.2_macos-x64_bin.tar.gz", + "checksum": "4e11753a11376b6510008f264b1899ab6cd261077e6e16ee308f46179f723dfe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.19-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_windows-x64_bin.msi", + "checksum": "78c05009c0c7aa2e958de37441e7bf81eaa626288171fa16f927bee1504b086b" + }, + "zip": { + "name": "sapmachine-jdk-11.0.19-ea.2_windows-x64_bin.zip", + "checksum": "830e3ff07440fbd0dfcda554144ca248d594c08f2b94045252af3ada964432d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jdk-11.0.19-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "8d8d11de215636bed340d559934a91101956c33befee5e77945f9a24cf7b381e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "f0866a0cb4c1f93e58884c89f05bcafda06ec6e5f506791e8bc3ff223395653e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.2_linux-x64_bin.tar.gz", + "checksum": "dc5e63f6a3a58090fec20d157ff0dd17c792209fe9707a72b35124e779d1ddd0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_macos-aarch64_bin.dmg", + "checksum": "6857a0e3e13c73080104f374479d234f0ef221a6587d3523437c6db3dc4dba8a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "cd54052d96e578495d334769e42e5a70b6fce327fe8dc17e869dc1d1d66f5db0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_macos-x64_bin.dmg", + "checksum": "8d1ff265bd332d90d3ab9adee5fd9e4c301f8f1a6eccf1b3536465f0e47aa6fc" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.2_macos-x64_bin.tar.gz", + "checksum": "8fb7cfd7ef4bc2b08b5bb2d59e7b1075e7553ceb3baff40bced84cf25664785a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.19-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_windows-x64_bin.msi", + "checksum": "3b8a1743880b6d5d7d74d066a2a76b2bd8ac5325af6225eb276f24cef029a036" + }, + "zip": { + "name": "sapmachine-jre-11.0.19-ea.2_windows-x64_bin.zip", + "checksum": "0855435edf6ab8dab303dcf4d417f4cb415119abf3d4dedf0eb57684051ee59e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B2/sapmachine-jre-11.0.19-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.19+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.19%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "6f9c81ea7450dfed679e4a3f680cc5fe592d5d7a89b0d70195a57654f5690005", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "f434471a14e1bbb39aa7258fd1eb5136b03744bef19f12bbf03cfb5a5ea9b94a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.1_linux-x64_bin.tar.gz", + "checksum": "5f751c3484aea2948863a31b93fd8cfffba24675b22b40d8e76214d2ffff8849", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_macos-aarch64_bin.dmg", + "checksum": "eb2816f085b471171e0a18b61c737605965cf9405ce14ac77452eed72305b730" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "3a3e980c775de0b67342f39adaf5cd7ee891b80865b31931f462e29bc3acdced", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.19-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_macos-x64_bin.dmg", + "checksum": "ac03d201c4dffc203822dee020838f5b2dd33c2e9fecb9e677ee9bb6c125293a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.19-ea.1_macos-x64_bin.tar.gz", + "checksum": "5cd52bd1643bb1d98ed0745c691393c132cb4b9d5322cdb5972b42766afa1e67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.19-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_windows-x64_bin.msi", + "checksum": "f7ce0d368d21111c5dcebf853c3422f8e1219707efb46656fcb85d63d3e7d57d" + }, + "zip": { + "name": "sapmachine-jdk-11.0.19-ea.1_windows-x64_bin.zip", + "checksum": "18f7e3f6727655d75b1bbde33fd278101d51864add9c86b4a5aa2d398b4eefc2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jdk-11.0.19-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "80f2bfbaee92d5da82f70e9a90994d1e1a404ae8e49e5497a554d70cbf39bc79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "be5661d6aa6a7cd29d8c1e107c07b49e3de7b0d6db3cd2a47a436cb8c3dc99a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.1_linux-x64_bin.tar.gz", + "checksum": "855b8b1c5b67e898b5887f19fcd78d19e798bd549faed4e8002f0ee4850fe9f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_macos-aarch64_bin.dmg", + "checksum": "2a27ed4514014527d06b3b05904d4bd0092db7225a4de0cc6751e46da4d438fb" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "249171adaf380f86c131c44b92e6819aeb2745d9c37931789ed51b406fd09a42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.19-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_macos-x64_bin.dmg", + "checksum": "449575483d7318dff8557662893f82b29911b22519fcefb19f5984d1e67b9c8f" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.19-ea.1_macos-x64_bin.tar.gz", + "checksum": "254f502b1c876ab40e37fff8d412fb8d5f1d60af47b7f216e42ea4d202aea8fc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.19-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_windows-x64_bin.msi", + "checksum": "9cc6191c369087e9eb87d64f1b02450b48088c5e8c113392ffe6771f8353083e" + }, + "zip": { + "name": "sapmachine-jre-11.0.19-ea.1_windows-x64_bin.zip", + "checksum": "0565a098d8373157d95a70a18b9a430a172f68d1c1ce6990feb60604e69fa42f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.19%2B1/sapmachine-jre-11.0.19-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.18": { + "sapmachine-11.0.18": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18_linux-aarch64_bin.tar.gz", + "checksum": "564298a3aecf0603ef7c05b60b2955271afa9f2f503dd09e22a9af67a6cf53d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18_linux-ppc64le_bin.tar.gz", + "checksum": "672ec3825ec6a3ce6013b124ea631bd2072a86e4f928f8af900afcb10d1c115e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18_linux-x64_bin.tar.gz", + "checksum": "ecff9792f91b20a205f11dd7c04f0554c84ba0edb154e52610ccc9e20b69d359", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_macos-aarch64_bin.dmg", + "checksum": "5aedb555e51952e1fe6b2253b58f8caa2928d94ba661168d9f6e68ffc512bfc7" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18_macos-aarch64_bin.tar.gz", + "checksum": "2a026c9083d27b5cf2e6c9690eeb7c6a9373bdd0cd6e29fc25bce8079b9aeb19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_macos-x64_bin.dmg", + "checksum": "c1aaae74d2079467a80f2b463550da8cc4cc6165059b0d372e55595d85472973" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18_macos-x64_bin.tar.gz", + "checksum": "50eb0d30c6fc34e6e47763e24b3ad5e3ad9099e222abbf603c634681b7dbce50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_windows-x64_bin.msi", + "checksum": "b1abd3dc3ce98c6dfad3e2cc5d66900701411824896c21f5ea88ab2524472203" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18_windows-x64_bin.zip", + "checksum": "255b2186e42943bd822eaec5a163cbfccee4f390598d99335f260be180f448d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jdk-11.0.18_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18_linux-aarch64_bin.tar.gz", + "checksum": "55b9abe2830053e9b159f9fb967adc9f0b6a7d732d267edd5638e3f7dd1cde89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18_linux-ppc64le_bin.tar.gz", + "checksum": "731946624fe1a52c15a85b954f58bf5175e07892480691d2fa271da6e4fa5d76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18_linux-x64_bin.tar.gz", + "checksum": "73e63a7d9a260eff85ace71eca5e327f6baefada399680140e66b39514b2b871", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_macos-aarch64_bin.dmg", + "checksum": "20df96f6c4f6a15f72e20b8e6e33b6045d35e11a416e8f67c9cf5d4a26c8aa32" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18_macos-aarch64_bin.tar.gz", + "checksum": "eaee13f8f70413a6866e7a4b2cdc360450235447d766b4865b4bf6d73042a339", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_macos-x64_bin.dmg", + "checksum": "3a80c74310ba17d23fcb35f5d87d95795eb3cbde2dc8b60b8e93b55f6589db9d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18_macos-x64_bin.tar.gz", + "checksum": "66e60a96c8526fa52ac083624210d36d96da9227e24ed70024d39469b63cff80", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_windows-x64_bin.msi", + "checksum": "051d5d61e09523c80d3778ee37315a2b70921f1581d200847808252b80f57d57" + }, + "zip": { + "name": "sapmachine-jre-11.0.18_windows-x64_bin.zip", + "checksum": "49b9b997daa2b06601ab8582ee838f9bfd5a6f9d9beab05debb81197ac00ee32", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18/sapmachine-jre-11.0.18_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "880694e82117526a0f93b032c4ea6e82ae0518d829c0d9141de9a667d424874c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "8cdd9ebf9a14a9a1d1f0b2688fc5b384d9fc95fe4e17f2c0b22d9159b12788f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.9_linux-x64_bin.tar.gz", + "checksum": "65d007bf0e09bfe2631aa8222736f60a62907581680117feac079dabf7709249", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_macos-aarch64_bin.dmg", + "checksum": "c2e84f0aca81a78d76a2672ab254c07801edf13c9ea19c1ba1fbd1360c7d6278" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "e06c9f784e0b9f603831b32f664b6eb28aab84059551e2689a33c1ee33902892", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_macos-x64_bin.dmg", + "checksum": "c78fc2e7430362fdd079ec0a813cf20735b2f653ec8869a1a2d0a788bdb76c26" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.9_macos-x64_bin.tar.gz", + "checksum": "4ba017476a39681ddb5b91c3f657185fbc6fb37c3a472b1b0fdfcc40cc37c234", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_windows-x64_bin.msi", + "checksum": "6a1dd2745ea363182ef4d3d3adb4e05d6a937195cf5cd7e00b2609421ed3e046" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.9_windows-x64_bin.zip", + "checksum": "98c0e8434d11053dfd138dca36a3962ff0b29e87346f004fd477723219634051", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jdk-11.0.18-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.9_linux-aarch64_bin.tar.gz", + "checksum": "430a51f6de431a2da7c9cda24ce6ff899a42ef3f27cf03f9ac6eefd33e093b4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "11acf9342c149c9dc211a146e187a14f071bd9f5e41f5f5ec7f34c2ede649267", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.9_linux-x64_bin.tar.gz", + "checksum": "8a1499b444d027d53a6e205d90737aa2e974a5547fdcdb9619eb486a937e22b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.9_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_macos-aarch64_bin.dmg", + "checksum": "7265ec5f5e49d5f0df86825cd7348135363c9f65655ebf795b5f1256cb7b5b31" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.9_macos-aarch64_bin.tar.gz", + "checksum": "817b1d00b0d340bfef8612dadb26211fd584a06ee91e428a7c47be2357fe28bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.9_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_macos-x64_bin.dmg", + "checksum": "d02259703777adbf47b7c4da13d79b487bc955eb0d60936a917b46c62210c6ee" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.9_macos-x64_bin.tar.gz", + "checksum": "52aa8a3ba457d2368c419473c21b5929498885897f9f66f2a6fafe99f4cf35dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_windows-x64_bin.msi", + "checksum": "546fa3c2dfbc218ad1590f020a16df71fa99def7eaac8790cb5b40073c03b52e" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.9_windows-x64_bin.zip", + "checksum": "135e9e84f9ac3f0b9f8fe018fe9bbdcd851f5b013b41e474d6a9ef1d6689f459", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B9/sapmachine-jre-11.0.18-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "4ac9cd8f3bb65e4beb40695f543fd54b9f527e17f68dac3157650994895187ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "fe9640e1843cdd1dc7c6356f6ab16bc5763914e5283fc3d3af27ab422bba173e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.8_linux-x64_bin.tar.gz", + "checksum": "c1e7e871e96e52b065739140e9af707446c636345e1618cd897bd58701e93940", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_macos-aarch64_bin.dmg", + "checksum": "e7c4b1e4adbf7ea08ffa0c3b4249c16b5d731db0b34ca30373d09e48414d3b69" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "1c4d6ab35855ad2c3b929d5c79c6c87a09e7a8bc9e21ef187ac77b7ca36d4bdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_macos-x64_bin.dmg", + "checksum": "793045e93ac4e62446249ea6520833ab2d94ac1a995e80bfde3ad709c7f9e8b3" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.8_macos-x64_bin.tar.gz", + "checksum": "142d7f037f976f9accc6e14a1e3603ac46e0201606bed5848bf33545cf66c53f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_windows-x64_bin.msi", + "checksum": "94fbb5b2bdcdf6c26e2fbb47b926a76a8c452797edb946b17b28e3d618980cc7" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.8_windows-x64_bin.zip", + "checksum": "6ded4b9e174dd8f1ff12aab4c628c1b388e0e6727c446e2ab5c4744535ce345b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jdk-11.0.18-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "2a9b3cef292ca7fcbae881f28059e88160b3f6d24e4c2ab7afdee21fa18f3ce0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "932b407849b7951e417b47a763ad4eebe9ecafc21836bc7393b418e0ae70022c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.8_linux-x64_bin.tar.gz", + "checksum": "0e27c3f198a59eb0274e079f6f3cbcf82ef374bf0b161acff0e193279678bac5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_macos-aarch64_bin.dmg", + "checksum": "088cce5f09b780be376cba217988cf4b699a97e94e55ae21b5a9ac35d3dce877" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "f8db6a9ed86f1c589f93e41cdd7e736871372d4c57355c9959e424ca196cfa33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_macos-x64_bin.dmg", + "checksum": "7e69146001bdd1640f88f7c4fccb3ba6bf92088fd98565f43bf645d96c942634" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.8_macos-x64_bin.tar.gz", + "checksum": "2bc8b096a8f27b1631a8320ebbf9dc31ed0d429b65fff224b0acb3785bb64ca2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_windows-x64_bin.msi", + "checksum": "48e5b697ebfb92b638cbdb4701456756d1b94de83520bb89eefa9331a0cd61ed" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.8_windows-x64_bin.zip", + "checksum": "0219482297d2d8e9e0c22e712d2ece4cd0d4acdfb1a9e9a001b931e0499b9305", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B8/sapmachine-jre-11.0.18-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "70ceee24e9f6474ad22cd46ca81623ed3be7471173f316ed1e19935bdbf5d406", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "20c7e903b98a0d8652990b6de942feeecafd5bf9b5be04d88c89d529e3849cf3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.7_linux-x64_bin.tar.gz", + "checksum": "ed4a6e1b9f2c340e93cdf12a606d3f3ff67bb6f8d08ddec5c1e78b7b287781ec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_macos-aarch64_bin.dmg", + "checksum": "ca0b0d5737a083ed55fb5bb735db76eea7c46ae52612dab8c27e4c1bb57f85af" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "0a2da178108f0ffd702f1ba18cadfad46975d0a7de85fa1b8d3f75fed74d1ee2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_macos-x64_bin.dmg", + "checksum": "629a5b8407cdc1511812f540501861e965e1b4ec55bb54233916836c659e8140" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.7_macos-x64_bin.tar.gz", + "checksum": "e5a4962a410e65e258e2d030bf94d30aea3549c457266b23c71544ee688dc491", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_windows-x64_bin.msi", + "checksum": "e2181c42f26b004d14e741205fffa50999a42f24a0b12a12a365a0afb606e7aa" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.7_windows-x64_bin.zip", + "checksum": "42fc59370e1a138d43309e82f3d58d3a980180535f71166e277d799605133f54", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jdk-11.0.18-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "4cc3834240cf0781f4b847a95d9a4dc852f90f865711c35bad821d239f72cf09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "c418ad1bf0a9f091a2179066c1884e874e6e19f4d6cf1891c2438129f5df24af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.7_linux-x64_bin.tar.gz", + "checksum": "4d3ed45a7126d80c57bc1877491b953fdf2084c7cc0b29c91152a21bd8280791", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_macos-aarch64_bin.dmg", + "checksum": "d41b14483950f53119e57bff0d61fb2b5eae64a58aca9bc560bbafed07c87fce" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "a3fb87e3100c1993c4b8dd25a423c9bea0e6fb6873c346f7353145614f4adb8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_macos-x64_bin.dmg", + "checksum": "94c7287e3c80bbfb1dc553fa6ea9b7b3475377ac3095c83424bd70aabbf8b6a1" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.7_macos-x64_bin.tar.gz", + "checksum": "44f4f3821d5bfcf0d01c713671ba49ac689f42238b6a1cadc50d627c8511c8b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_windows-x64_bin.msi", + "checksum": "7795f9c167cc6b95e20a50b9a7ee9846482a494c57f8db8e03df93d55d05dbd6" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.7_windows-x64_bin.zip", + "checksum": "5501279ce9f44ebd657c87d686d6658344db9447ff2f26ec90c78a62c97aa9d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B7/sapmachine-jre-11.0.18-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "09717a14f91115854e7defb4dd6554d8366286a812d7e119b019112a64e0eb03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "23d7949dc33f432ed4e393f638d44e27839cabbb4e809484d35c2fcad398873d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.6_linux-x64_bin.tar.gz", + "checksum": "5b1bc9cdc09cd6bfad9526b65ea65b3627956e0e46767138fe19a934b6027a76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_macos-aarch64_bin.dmg", + "checksum": "1d81fbce31d28ee78e520e7f0dc361001853f7cdd42581c5a3fe37cdcf8550d4" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "3beddea63244afb3f2a4b71b80f1990fb778836a49147f40762abd8d75002d9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_macos-x64_bin.dmg", + "checksum": "247b792d4b01b9a26bf0994077a6c3e4e2e15459c29c93a9c7f01367932e55c6" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.6_macos-x64_bin.tar.gz", + "checksum": "2382c7d9e5b9188ae2220f11f92395adbca90bc1b8ea2138008519aa7cc5c1f8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_windows-x64_bin.msi", + "checksum": "806d55712fe394672629b434122b9dac51f735cbbe555c1e821e7b988c834ea3" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.6_windows-x64_bin.zip", + "checksum": "329e5d3cf14d1814119a804562faf437b98e35b7a391012768e24a7da0775aaa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jdk-11.0.18-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "08ffb2606193ac5a8f50e9d790bc5ff33d11a8854548b5798b4981e1306b201f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "22eb6f44cf9cbd1fc6969973a19f654b779a512d58720ff715c11e36c45c8330", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.6_linux-x64_bin.tar.gz", + "checksum": "a394ac2035e8e7b7a0020b97a85ac80972c5b639674e998e32d7696db12767ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_macos-aarch64_bin.dmg", + "checksum": "dec2ecbcc69333772ea726f5d48d8cd7a835c0fc788763e1532a1924fc9e8061" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "32061daf1c29370e8d990f843b0d343f6cd2df2675f25aa397c78ee18256108e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_macos-x64_bin.dmg", + "checksum": "8f8f81cc8e6e3726a9f4978ca29816b8388fb88c01b2c8205e6d3f273c6c8b23" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.6_macos-x64_bin.tar.gz", + "checksum": "4965bffc5eae9669ae540bf4b132773e6491a198851292321e8dd218eab30026", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_windows-x64_bin.msi", + "checksum": "09a5c46bd204bbbaa62bd00bfab2ef3d3925c54118eb4d36d0f860a302a61cca" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.6_windows-x64_bin.zip", + "checksum": "7c99e6eeee583c5b812143f5df16b3b10b10ea2f6962818203946efc89149fc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B6/sapmachine-jre-11.0.18-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "eb4a9860d4a37b0934842448e4dfd90a26ffbbb1b7ede7c1af701f9ea7734d11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0b0510938468d710f161d3b1c4d5084b733f63ac56e94ebd39e02e22d06ae7af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.5_linux-x64_bin.tar.gz", + "checksum": "4e28f96b5ec1af97df1d84e76114a37959fa80ebb7f96a76f41a421af4f9e8c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_macos-aarch64_bin.dmg", + "checksum": "5d6853197d838255dc90acda199bb73bb2bb55d18b4218e1e41604723a96eb4f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "67f47f94ed2480222e60a19ca24c4b382445bb566aed411953a3f69c2724e86f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_macos-x64_bin.dmg", + "checksum": "4aeddf05e17d11f4f07c8c4824c25ed3d45324b4c1c40b4aff8ef2385fd74556" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.5_macos-x64_bin.tar.gz", + "checksum": "fdb76d26304ca855011750f1fa21448d641a1863eb855a147d5c5b88976ff5a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_windows-x64_bin.msi", + "checksum": "2249fc4d4bd81619150b249fd642835d7606c0f14da395ab8769a79052f2aeaf" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.5_windows-x64_bin.zip", + "checksum": "1e58f05b1eb140485808ad3676d9132d736720904ea4edc62e21b0aa0501a2fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jdk-11.0.18-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "1d4f2f7db512ad15401da79e9cb617022e754812bf5cacc86b1ff4e5bcfc041c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "5104c5da0678866696623ed11dcd5a7a669bf6bb367e681ab345c5b0c86a0ef2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.5_linux-x64_bin.tar.gz", + "checksum": "ef89c8efbe707918e0a035cc04e31990fc92da31d7b2883187d66e549b60c318", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_macos-aarch64_bin.dmg", + "checksum": "1951d708fa81110108c7ae96f5d01b62a2cee9ee8d54746ac001cb7fadd9e55f" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "70fad9efaaeb816e5ba655d902d6670186168dfa5a82683c79d16404f9824271", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_macos-x64_bin.dmg", + "checksum": "01de21eca455902d4fea364bfc52f9a7efbd20f2c295c2b6e7939ed1590d6fb1" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.5_macos-x64_bin.tar.gz", + "checksum": "9dbf46666df90640df4dbb74c44430deea3e5e2021cd5f5926ec627a72fa9f74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_windows-x64_bin.msi", + "checksum": "1ce4b734c48c70cf9cf84fe548c3274ff9f02904ce36e9b8a2cef8a359f44d97" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.5_windows-x64_bin.zip", + "checksum": "767f6b18710b6ce3b68bf71049cb56b442abee78c9c3e02f22b49262f6315787", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B5/sapmachine-jre-11.0.18-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "989ce9e388c5ad933f4e573025fcc16a1dea00e5b7cedfaf4674ae646bf17991", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "6014555660bc133e2d14e4a5e1ed2c6d7de8f8f75e540dc95aea1d0cf9ab884b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.4_linux-x64_bin.tar.gz", + "checksum": "28e4f41604fdcc2dfbb1f7233acd5f68912ceb33fbead895d48d147e4c882a2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_macos-aarch64_bin.dmg", + "checksum": "5ca331ece77fba0aa82d4af84a4553fd257fd935fd5ab151f364146b1b2afeec" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "b1798e2820a26e8f81ac21f1519cea16f21959e4b97724f003bf33088383afb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_macos-x64_bin.dmg", + "checksum": "1322a90d9ab4ea6b4b4591fc255dca6f34db1daf4f384c6909327023d064518f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.4_macos-x64_bin.tar.gz", + "checksum": "1be52574d4ed4cf78a3036a510525f74176667c5e572a27345776010ca91e0bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_windows-x64_bin.msi", + "checksum": "08873cbf6bd5d75f1f6c163290649c9eac166598190118dc5edc4ac7f80cdf6d" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.4_windows-x64_bin.zip", + "checksum": "d3bce81f24bf39474ace88e611f276359c6beebfc04e40fdeef4f622d187be56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jdk-11.0.18-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "08342d408df5670bd3b1b7702dfc96396176864bd0f375f0ed3a67d3b5501484", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "422e4787a0cd77d8433be44ea44583fc62d875e3cc50227b971a56295bc14a1e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.4_linux-x64_bin.tar.gz", + "checksum": "b4b405e6779c560f4b1d9a5d8a450c952e6c87a706f55c049e1b2fa6b32d7e79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_macos-aarch64_bin.dmg", + "checksum": "b365b179832de0203cfc98e0e0baff935c2280b9fe7e3435d4e2360142a0bc41" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "ed07984775d55fd5d39b9b350990dc5ba655ac302840a82f73e4075c4a5380db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_macos-x64_bin.dmg", + "checksum": "b0f5b14552ad3f8b1f27fb82666e6ed72050172cc4d80d7520589338df97efaa" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.4_macos-x64_bin.tar.gz", + "checksum": "da6852a7ddb1c13d7f7eaec80395420f8c66f8b419a51480909e8b7ca78bc2d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_windows-x64_bin.msi", + "checksum": "7cd8d589aebe9fcb4e4d477438731242889f9d5a3302765ee74a4484e51f9140" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.4_windows-x64_bin.zip", + "checksum": "354871d3db6bde8b737b4676ce0471294288aafc4c852d3d26d12338fcf3434a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B4/sapmachine-jre-11.0.18-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "734f8bb79f7df2a04f80ee1f725e4f5e7001138297310f2b98f9a2b6f8b43cdd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "6dc3a213934c4bb8086a4d1474909c28e77fecb7fd7b53dbe4f7f6c7f4a2dfd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.3_linux-x64_bin.tar.gz", + "checksum": "c2dea32ba8e29c6c5c7937f1e0f6a2c3785417f856608b913a1e3276d094fe32", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_macos-aarch64_bin.dmg", + "checksum": "2e4ec22012bcd1c09b8b96d8b9826ff0a2d9925cbc103759136c1b41a4eae605" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "edf9490b576a5e2808792f08a0d9380ba94b279f0b026d951f8919cfa6136626", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_macos-x64_bin.dmg", + "checksum": "952c59061114c52632a41ad98e9ecb7b11aca3d418e783cfc670fca2b526ded8" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.3_macos-x64_bin.tar.gz", + "checksum": "44fc2827a46b8c1e042adb70a2379840a20fa099a56d5d4668b507e86196c5b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_windows-x64_bin.msi", + "checksum": "039fc39dac270e7a1655a47b7c9a9ae2d26ef4f149527e2f89802dab726c974a" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.3_windows-x64_bin.zip", + "checksum": "1c494d361ac5685cea57157463a306758227627483d19c3f1f4b071ec2d3135c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jdk-11.0.18-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "7ddc544c068f8c3b78e6889433a30e588cb1a82c36e3ccc34ee29ccad90263ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "f9370dedffd5ef07a8ce5d097a18038ff1fe30aaa0de491a256c626f5ad0b1df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.3_linux-x64_bin.tar.gz", + "checksum": "75ce30b983112f4eb089d5727b9232869b081bec4ef55cc01291bc771e95d4f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_macos-aarch64_bin.dmg", + "checksum": "6dff7fcc97ae10bcfb0c551006eafafcb88487ddcf28174f464ece2c5b847696" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "474a67ff9cdcfb190240db40fc3cf36cb26b7b7aee97e8fe184e5790a224c91d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_macos-x64_bin.dmg", + "checksum": "fa4361dab528d3f912e70e29bfe9463ddbb95d0c07b705685c44e2b761c17a87" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.3_macos-x64_bin.tar.gz", + "checksum": "ea2be5544fece5c8a501601d57bd6379bcda686329d1a4ead6d05e75e6877bac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_windows-x64_bin.msi", + "checksum": "91a50de7050bb0d497f4387535661a08401828e0bc11d725384fa4c820676c66" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.3_windows-x64_bin.zip", + "checksum": "dbd50fd4695b2c338bcb1c656f1e9b2bcbec42457cfb5d33fe4d62ac132184ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B3/sapmachine-jre-11.0.18-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "f63a20af471e5b089a9dea4aaaa9fb53c40ed91883f976fd59e0fca8aa6fc10b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "d41e086c1d2833291e7f1f5d6fd89b874047f059124f296a2b91e6ccc699c0c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.2_linux-x64_bin.tar.gz", + "checksum": "5a2d8010947c9a07cbae6fc0847de4124bc38e742825c2b5715dd004539d67a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_macos-aarch64_bin.dmg", + "checksum": "4f08d5172181f9b76c90904b202891f375bb7962e7bb79baa75278ac45024567" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "ec25219c961a3e263ad4f62c067fbed0fbccc2f2411caf6cdd5eb83673087893", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_macos-x64_bin.dmg", + "checksum": "a803624cfe7d2f21a2fc44b40c5c3da3e6c545807f07c57485f80f24b4616c4c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.2_macos-x64_bin.tar.gz", + "checksum": "50c840c3dbdb6f15bb96cd54b2b0568f986206048b4c73f1fbacce6d227ada83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_windows-x64_bin.msi", + "checksum": "e0507828aefbf28cdb80f5d16551d2d11894f809efc2f334f9142b0a24bf79a1" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.2_windows-x64_bin.zip", + "checksum": "ecfabe35c1149153dc502e79c6b30b7fdbd66cc9d7ea843b2d7b1b3c480c39d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jdk-11.0.18-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.2_linux-aarch64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "235f87a5e428323b176f3cf941172a77c0c0f7f8d2f5cb17b2ff6134669ed9e8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.2_linux-x64_bin.tar.gz", + "checksum": "5a4668b750fe927f6ad4855477e78f04002f361c762a1dd735f7a4535bc1c7a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_macos-aarch64_bin.dmg", + "checksum": "528f30fa8e6365c916b3c995e9d6487b34f6fe2a5c5ab06e77345dfb82bddd7a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "24c558553112734392c4049f904a5eaa1917d5dc8d102bbd218c9e5a6e24def0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_macos-x64_bin.dmg", + "checksum": "a8fdc4d83c4bd81943c8997fb1fb15402c96e359dbc363e17ce3ff76a0e6379d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.2_macos-x64_bin.tar.gz", + "checksum": "fccb973e91e77bf5968a1a1d1f70212d1f3e2763837490e452f5b0b953f9a69b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_windows-x64_bin.msi", + "checksum": "aeeba18ca5f7d3917405e1bd421e4387d1d88466bc84375263e37cef6f47f3f3" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.2_windows-x64_bin.zip", + "checksum": "eef4e6f138fa037d6d084f59b9b1ba36e021dd2bdce5b88d506cb8672010f7b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B2/sapmachine-jre-11.0.18-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.18+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.18%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "843f4e040692987a8cfc6795e30d3a377faeba26defccef8bee9118f5c65e02b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "0759f3aedab32b3a5df5177301b9ae4484d42afc1bd452124aa4f2b25b495de0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.1_linux-x64_bin.tar.gz", + "checksum": "bd2b78b79319f3b1ba6959d5f09d20c01dc31d1b0ea099ea3874cdacc0974209", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_macos-aarch64_bin.dmg", + "checksum": "c845fd49a87a6ef0b6a07706e11de1fd8992e947e9384cc338213adda192477f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "db67eeb5318f6d5d8471a472e52e279c9e6b935a4afa862b637c6db48a35032d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.18-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_macos-x64_bin.dmg", + "checksum": "287bca106eb319b012aea37603a346de858f4d43a2d44e0eb2faf73ffdcdd5bf" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.18-ea.1_macos-x64_bin.tar.gz", + "checksum": "d5623d69b85e8d5d25b0ebe15b5360334e6820edf4712abc6d93ee9db5cea874", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.18-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_windows-x64_bin.msi", + "checksum": "8f7625f95eb722216ede7b99c0aea7e1f8c17abde2d82f03cca3b8564134786b" + }, + "zip": { + "name": "sapmachine-jdk-11.0.18-ea.1_windows-x64_bin.zip", + "checksum": "9e69f89973f2eebb3f50d06c00c49b4337293df8857030c39376a8051637d868", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jdk-11.0.18-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "e51407e679bc3750b80c02dc48f5bfd075c1cedb70f1f59f2885951ae2b2c824", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "4a5a2becde69c9dbf800043080fdd81b7991a06c32373e77ee7752ac3fe2af29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.1_linux-x64_bin.tar.gz", + "checksum": "42839cbe1ae981683c86f3b79921ed4ff9a343fc62da90d64e6a93276e663ef8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_macos-aarch64_bin.dmg", + "checksum": "19fd75d3b280e9dfd5aaa752b30661ea1e5cefd9e8d7e3ab5a57b12f383fca15" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "755eea8694416c0b3af574ec5c7c46a9865015f8e36498457d5b717200b6f830", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.18-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_macos-x64_bin.dmg", + "checksum": "4d5196f69113afc18f51ecabf17a6762618d84d9cf222d218e6bbf240ae7a020" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.18-ea.1_macos-x64_bin.tar.gz", + "checksum": "3d749cd830973ae32f889382c1bf3aa3d01e3a02a6de1175579cdf6e3ba6520f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.18-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_windows-x64_bin.msi", + "checksum": "acfd6856884a4b61010395ef4720bf3b7d55d14d785d079d4bf8d57af1f8f7e3" + }, + "zip": { + "name": "sapmachine-jre-11.0.18-ea.1_windows-x64_bin.zip", + "checksum": "8bc5dc9a2da2bf5918d566b813d53a51c6a6f7b619d8a952ed27765473fe892a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.18%2B1/sapmachine-jre-11.0.18-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.17": { + "sapmachine-11.0.17": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17_linux-aarch64_bin.tar.gz", + "checksum": "ffcf85a7ac51d30cb1a9c4067aff499db285873b110e7a5763e1009d8684d5ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17_linux-ppc64le_bin.tar.gz", + "checksum": "adaa8d72354630f20b171d87a6c348480b612625348caaf2190f2a24943576c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17_linux-x64_bin.tar.gz", + "checksum": "d0ffa1f08cd6edb5f1cf7302407dbd1dc81b015d3b4cba4636bacdd43ddb3e60", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_macos-aarch64_bin.dmg", + "checksum": "507689b2399ff4c9b60e38e4fcdcf723ee7cb1ffbe046cec5efeb25b9f079e4d" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17_macos-aarch64_bin.tar.gz", + "checksum": "3b77efd1a2df2517b98c260a31926700f73ae5336aa4db1aa7ffa3eb1724de8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_macos-x64_bin.dmg", + "checksum": "e0dce6500b0b3d6bb45fea53b8386cd9a6a38725133f024856f81db6eeb74f9f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17_macos-x64_bin.tar.gz", + "checksum": "f5a0a04f4fcc0044bdb8f8ba071e996e9686152e9c38ab645d741e2e2ea724ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_windows-x64_bin.msi", + "checksum": "3fceee9b7f9a4ba73a846413f71a2b015f05dc0e5929d43f2e8c466c47e45032" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17_windows-x64_bin.zip", + "checksum": "35ccd8bdbcfc58c1443bb277796b7ce32ccaddf5b0bfddec624b90c8fea7e4ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17_linux-aarch64_bin.tar.gz", + "checksum": "36967a36d0a16341bbc7896620a867946cf1d7b64c42eed1622a2afc1054f0a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17_linux-ppc64le_bin.tar.gz", + "checksum": "968738cd545658a78c11c621e05cb91d29b211b4789cff31af79849d781024cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17_linux-x64_bin.tar.gz", + "checksum": "d6e68ede2e4673dd5c154e1609696efdd69f2bc092ae3eb705eefbd63bfd00c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_macos-aarch64_bin.dmg", + "checksum": "f80657cbc9e4ce69f38d9464da95daf67828de9bf97c25ce5a6ff6c789d01f5e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17_macos-aarch64_bin.tar.gz", + "checksum": "ffe2330cd959e24eae9437a93f6aaecb73b8bb4863f47027215db901047f49fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_macos-x64_bin.dmg", + "checksum": "f1e583e83ee0dae3a897a0db3d55b1e7f2ede842548e36f2d07c5eb13dbbf048" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17_macos-x64_bin.tar.gz", + "checksum": "d50c0c8183fca895e6a4d09ea13bb4a2fa741c77e6308f479a6ba7dc90541b79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_windows-x64_bin.msi", + "checksum": "fd1796497ed01dce1c0441b415a45327e772128dd8a1f7d7597e57203ed452f0" + }, + "zip": { + "name": "sapmachine-jre-11.0.17_windows-x64_bin.zip", + "checksum": "95cf03fb5552aa9b7b8558a3e19eed800c0af0914c5647067a5afe3ed17673b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jre-11.0.17_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "6e0a6dca9777342de75e9e742e47b4da6fba59197809e66bf0a0f6725efd0f74", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "9b60d319d775a85053493cfdcc344d441263161640def25142ef97d1b0af02d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.8_linux-x64_bin.tar.gz", + "checksum": "3ed6194e23fd0b7ab3952e7c5a8352b7388816adc965562d27a62429fb8f1157", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_macos-aarch64_bin.dmg", + "checksum": "bfe724587c338ed5868aa783d218790e84d762966b741120d87497b5f3a83987" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "3b04fab0e517d273bb919c8cf022617d92ac704355d9eb3204107f6ed6a8946f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_macos-x64_bin.dmg", + "checksum": "0855e9ad7142a4fe4a6a8a90f281b196f0fedc264b33e1ec66af1135aa298e87" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.8_macos-x64_bin.tar.gz", + "checksum": "9793acd9b92ed00a854554d0d5b2488b092e36d6701d30c7b8c87ccdade12d3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_windows-x64_bin.msi", + "checksum": "89dbaa9e6e8f3ffecaf4b34c1c97ef7008c1435f50ba5d6b0eda266b59446b80" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.8_windows-x64_bin.zip", + "checksum": "6a2964b6ad6b024d36c4c9d8467c4bb858477b2a2b8e3ee2bcc2119a34d0acc1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jdk-11.0.17-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "ff60b8f5305b3df8a8b31c5d5f5da3b432fa46a3d6975bbfd4ba3081c445b03a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "5c9699ee72e99bfffa8492c93a1d41c733ced7aa7cafb6d0568d18823500e076", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.8_linux-x64_bin.tar.gz", + "checksum": "8d3c995f5678f9bf3908f436f24a3a41fec1e92babef6a54dffc6fb5ec9d2434", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_macos-aarch64_bin.dmg", + "checksum": "f16513aff5265a140573f3f80107823af93ec8c717b6fd6287a66f87c2ae9c05" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "c1e2d452f5e8021dc97785d418bb115aa96f89c067c523c9c90ce395ed71468e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_macos-x64_bin.dmg", + "checksum": "01f7cb7fbb20654a3b83c1a996cba08dad1584cdfb5b47f4aadc23e614b94e41" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.8_macos-x64_bin.tar.gz", + "checksum": "c90fadbe119faf68d11dc594774f00291c5bf17822499965ba91f017079d90c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_windows-x64_bin.msi", + "checksum": "64cedd7adf6561d083e1ff9186ca24f2be2de4877a6c71401fadd2a0c62b8a1d" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.8_windows-x64_bin.zip", + "checksum": "beb28da0b073f54719b58c8fe531c036e177c7e348c8870e6175735596c0cd11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B8/sapmachine-jre-11.0.17-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "35222dc825c2fab1499099a5b75e6f5dd7ea7f0f4e3b0c0faed862821d2b1d86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "0e9b99b68a993502961d4e2273e5bfce1b37a8271fc17d119279d08ea19f1cb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.7_linux-x64_bin.tar.gz", + "checksum": "b65838f3c868052c54292705076234110aae169bcf284d9abf3e01b4d62591e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_macos-aarch64_bin.dmg", + "checksum": "e78e89d4ec585e9b585fbe849265a07f03eaeac2474324f1055e8eb644ec3e16" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "3bbd0176ed5fdcbed1aaa78d351f558ce776125e93849a324ef46fa39b5b9f3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_macos-x64_bin.dmg", + "checksum": "b9b15f7ef7aa351ef507b1383772c47d4f68f121eb4e1c96a77e475cece63c4c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.7_macos-x64_bin.tar.gz", + "checksum": "c4cafd06ec17eccc0ecff4b38b436e6e7a78811ca11a5a716d68903c3aac73da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_windows-x64_bin.msi", + "checksum": "8b2c498b48c1f69a275a3c543f72eba14e36cbf3b7af7ec61b044abc39685b44" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.7_windows-x64_bin.zip", + "checksum": "1f5fd439dffaa16348ed19ae5eb77c093c52e5021da954c3ae98d87b16afbcad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jdk-11.0.17-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "900bee38a78f21969082946a86cb2165fd7d2051c1bff59f00022aba07370fb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "2d03f29b081562591ff09f4a57f7a6349f224e89482f3051931cf4b0e738bb6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.7_linux-x64_bin.tar.gz", + "checksum": "e2652afeb96eaa9a28fbaf8f3248ddf835f4836502a132d19ef45493057d42f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_macos-aarch64_bin.dmg", + "checksum": "8f1c756bf040cb1ca82ee557b536d7dfabbf2eb23ef0ff94c89ba93396edfdec" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "4f71100ef59af4e0c1eab1e6137f5b3894b80f34a5da110fd3a910c3cc896da3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_macos-x64_bin.dmg", + "checksum": "38f7a8d3993f36f4cf0cabaff044bc4fac980768345d5626acc733c4af9e3931" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.7_macos-x64_bin.tar.gz", + "checksum": "74e1b0381ea3f1a8a69ee9aa9a66b5d76cc95187ba0fff3a2fed0a8dad035af2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_windows-x64_bin.msi", + "checksum": "0ab11fa5429a99c199bfca46e268e01291163be6a1be171765176e860a50dcfe" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.7_windows-x64_bin.zip", + "checksum": "70fdf4516c7e7ee900f90f98053a52642ddc732da2a01ed1d2c95c43998f3621", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B7/sapmachine-jre-11.0.17-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "a7d833b5f7292f9868435d44275d3e4100d14ddd2640f02459aa5bc9c3409a13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "bcac5ede3d9caf6d1675d6969daa4a5bf199d1b9a1b98d8284c2534d22717966", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.6_linux-x64_bin.tar.gz", + "checksum": "f41adcb0a3c78cb932d0daab3b452df2f47287848a3d920399eb35550fc0ed4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_macos-aarch64_bin.dmg", + "checksum": "8277036d4666e1b95cc2087667604f3a51a0907003d54e9c192ba1fb130b2346" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "9178b6107766bb794fd07a4724f34e0f0614ad0ddaceb326f024122790e2739f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_macos-x64_bin.dmg", + "checksum": "1d3c8d137f76a86a5c06f2ad6b8a1442022e842f93d0447e078db652833862e7" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.6_macos-x64_bin.tar.gz", + "checksum": "4be3ab31ae3f1c00e6ffb65b18244f2ca0b7540dd0f5ba6f1271882a04bb949f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_windows-x64_bin.msi", + "checksum": "695d82d024770cc9958de7bde0818ab1f9c1613b08b83aad955bf7dbba9b12f8" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.6_windows-x64_bin.zip", + "checksum": "4f867d470670c36acfde24a38b983e0ae14e11512327e32f094875813178f408", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jdk-11.0.17-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "df1a2bfaf55cee559f20ca820e59e554996fc88a91610b83ed6503c8c9569bec", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d3c620bbd3a834cb271c1c6398b0c88b5982b61e5666d8f6c0568a6d8c7897a5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.6_linux-x64_bin.tar.gz", + "checksum": "baa92d52599d31563d9c71febf4fc55f5d0fb87f27b44c03018a24b0d68393f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_macos-aarch64_bin.dmg", + "checksum": "3d6affd736498a09601949adbcb9f4b8a69d75a2f3d83879606473d421acdc6c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "b1c6284682564314e2aadf4da664752c5c2ebb8dc46f653314a33b8e762eb0d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_macos-x64_bin.dmg", + "checksum": "17706a82a17da847fab4ad2a392c8898b50cf568ce798e8985006ec2e2261466" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.6_macos-x64_bin.tar.gz", + "checksum": "ec5669895db08b556060d4c9bcea8e01a19743336bebf3b35dbc4e38c045cd9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_windows-x64_bin.msi", + "checksum": "0e73efad5f6179784bbeed84105318b6e9085bfa94af5ddc93f57f08b358711b" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.6_windows-x64_bin.zip", + "checksum": "71d96541ba92433bae6e2b53e27e3095a99bd10935183ef75a16add24618bf09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B6/sapmachine-jre-11.0.17-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "9c1fdd66cc61c3057ad3f6219ac9995a74147ba90645e51f229be773c5b127bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "3a22030da28213edd9b72903b0f72ade3494bbf00fd7cdb213a246a23b7e509e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.5_linux-x64_bin.tar.gz", + "checksum": "5a1bd42db44c7d8a6204b8f7834b5d610d07758831216613a4945f4128ef3650", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_macos-aarch64_bin.dmg", + "checksum": "de0361b36c3e3b723d11816845b1c0215c7cc2da93707d9f2d9b0dd016c7f29a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "d14101342f7015c21e626c4033316c0d59cb58e012e3281ba6aad0fba9dfdc1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_macos-x64_bin.dmg", + "checksum": "0ae7d312705bb4af1d5587cab1d195cb2f5f6f916bc5d787a9fa71d91eba70ee" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.5_macos-x64_bin.tar.gz", + "checksum": "ccbdf3041c8f5e3f9db34b3ae9450cf5702130a034e4d2d5d8ed9ce707a97e01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_windows-x64_bin.msi", + "checksum": "df063f8d6c71bf3ca8f3eaba262fe80391cb5ab87594a3979f9399cb169a238f" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.5_windows-x64_bin.zip", + "checksum": "5c9700284eee166802e6b836558c9a4c13d5e3899d62c4ec82174919cf93d955", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jdk-11.0.17-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "ba54bd8b464cf5f9281ff431e3e62e6897705f1a7fe3a33a922dbf13252e0c0a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "814080d4a8952a27a3a9ca136aeb492bbeaee83d25b2349179c39b054530d3f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.5_linux-x64_bin.tar.gz", + "checksum": "4f88c614cf92bd784234644fe8e5ba0d484e492d858f1f7587083649255c6412", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_macos-aarch64_bin.dmg", + "checksum": "e9f1cf537c2f6c7ff6606261fa91d80a0f687dab5a94e4e58639d1c083e89bbc" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "5eba4bf926e944ef9c6ae0255da359f518adcad79b96062cc46e9a6a245cbc15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_macos-x64_bin.dmg", + "checksum": "bbdd33602aeb026f1812ba53f0d4f0ede47ceb18921e5729af4566e3f22bd290" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.5_macos-x64_bin.tar.gz", + "checksum": "df9a90f36793ad279cf02defdd3eb6b329f7328cfd20bd2152cd8842ba4f3e15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_windows-x64_bin.msi", + "checksum": "907b83a01a68c5e8d0b1b373f95e75de003f54be615eefd59688b5e0212c516a" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.5_windows-x64_bin.zip", + "checksum": "36f03ff905c2d11cd46b74d326ef64ec6838eb26942e16f73065e7237a36c4e7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B5/sapmachine-jre-11.0.17-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "72d45a22d877f74b0c80b5daf0a7437c74f0126a2f8b6617e239b7b516e8186b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "db5d0c64fd724c8d9fea2af5af263ad04ed250f1611f25f5241c89286dbd1784", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.4_linux-x64_bin.tar.gz", + "checksum": "af511288500352b468ad0dc81e985694cf8b7685222aa5dadf25ef780b5f9c27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_macos-aarch64_bin.dmg", + "checksum": "5875dd5e0930ad9b031642791aa424aca06a0cee7f85188717a3daf2f231430f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "87f33776b5f98d24c795c459a17041f33521c36eb2eed25e5b18b329968b2a5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_macos-x64_bin.dmg", + "checksum": "8cbf967c5dd02dc0fb7a9a0d7a28842607637f65d1f870f6628b3c288e427897" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.4_macos-x64_bin.tar.gz", + "checksum": "d77e093986f11212f719e1c314ac61385ab56f77cc8464b434eca3392b0730c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_windows-x64_bin.msi", + "checksum": "7e155dfc11ca3b140398d9a90505b89fa744250502add8a951e07c3a82e29fb0" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.4_windows-x64_bin.zip", + "checksum": "28a99d82cb391787a20fad70a0839490709b6c3957f366bf6bffe52ab2861aae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jdk-11.0.17-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "6ccf364837ae472e940edcd01d7c67a2ed0e989db8077f2a14513ba986a342b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "fd22adac2d4d4a7912811b28e32a95835962f465b0caf5e6ca77349ba5ce2597", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.4_linux-x64_bin.tar.gz", + "checksum": "7ddb5a201f00801ae739a75c6fc91c74e44bfbfc9640acdecd6220d09aed1c3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_macos-aarch64_bin.dmg", + "checksum": "3d585d1d8c1a0694b730e748465f95f321054ceca1b5efb69662e5daf49defdd" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "32e7c8d4dd9b6a18d7932e6a30358176004a8a144df30d8d16c05648fff8cad4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_macos-x64_bin.dmg", + "checksum": "cd6923bc111261d0555d93efa02ade8887092b270b93b87ef59cc96d4b8b7c01" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.4_macos-x64_bin.tar.gz", + "checksum": "d2e5ae859a31a8a733dbd3a463e696e2df2c066e041dd1e187fd2b45c9bd088e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_windows-x64_bin.msi", + "checksum": "3cb62518685c2a37c64380fbd655714547ceacd563398939345fb9771c1a63d7" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.4_windows-x64_bin.zip", + "checksum": "16822053df57b326060af60acefadfc42c6bfe82286b2b89c4c5b7fa46d426ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B4/sapmachine-jre-11.0.17-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "e558575e0d1b952f731f56cd861b6888e58c1d7e7a5c8ec1f26659ebb3857dc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "710e2dc2ba27b8bfe20d9b18096063c65c82ca31e0f8c09e61dc9ad13178d25e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.3_linux-x64_bin.tar.gz", + "checksum": "67952b1d0310c96ac0780df07beaaa587540d2697eee67ada64fb5ca62c4e379", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_macos-aarch64_bin.dmg", + "checksum": "85c0f8b756e6fd66b1c3a1356691d026d792f3e3d29b2721a70d3a30d6f18dd2" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "97b56d97bf87dfb9de72fb381d8c791ffd493cfaed21c08c4dee8103867b9278", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_macos-x64_bin.dmg", + "checksum": "a7c2388207ffec4c26d6d414d9cdd8ce9751815498ef18c1b0077504047fca70" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.3_macos-x64_bin.tar.gz", + "checksum": "e1746a39d812c54a5525ad4f78ae2043dfb4f5bd870216b0c83eb448860bc467", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_windows-x64_bin.msi", + "checksum": "cb1fb9e20e121fed2537a968b3a5bbb66ecd98fa08436a1f6298f2c91915e88c" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.3_windows-x64_bin.zip", + "checksum": "cf7edb24aa253d647aa68101aca11fda92a69c187617e8022587bff63ea446a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jdk-11.0.17-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "fea624adbcc5819d491c063e72f0f688354c63c483f585ba072051484cfb2c43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "3814d756690346f2cd47fe0893ca280916e9f17ca57eda855b643d51631df451", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.3_linux-x64_bin.tar.gz", + "checksum": "c4d82c848ee6e1bc23529e22592b3044a1e1288a8857f4fa35a633edc1e7f506", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.3_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_macos-aarch64_bin.dmg", + "checksum": "c21e4c976f6f852a7665eac02938bbe19f116d6823766fc11d92afa8cbf7eeba" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.3_macos-aarch64_bin.tar.gz", + "checksum": "2aeedf102cb994627430e0fac61a44ddbd2f1502917d79ac855c4d3bea7b0151", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_macos-x64_bin.dmg", + "checksum": "21a16ca9e1d8945210d0dab00c331eb2c269ed9511315c59ea785bbb83d236ac" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.3_macos-x64_bin.tar.gz", + "checksum": "bb489043bb90d37b58c6cc5bdbf1404581ac7047b164218b806c1f32c3425893", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_windows-x64_bin.msi", + "checksum": "67d18610db00668bb39e5c4bfeebe433a7b15c2fde7d985ae429f75cd1bfb2a1" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.3_windows-x64_bin.zip", + "checksum": "2739897e8ba183570abd2bc4fad4d0caff0e881a06948c5c4253b1a19ca04e30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B3/sapmachine-jre-11.0.17-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "d6b83df61a5a9693e8a59541fb8d5cea01305323ca183c5d371a5a764e1460d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "2d68c6a28f4dcc27fc1738b4c1f011f78814df95f0342a98f44e34719c3115a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.2_linux-x64_bin.tar.gz", + "checksum": "4752a04cf1767094418fccbc71782dea0da52f65bca4c443ab9e03fb4233b4ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_macos-aarch64_bin.dmg", + "checksum": "22234df2ea7fbfd9e2c0430cd93e136f61db861b1b464edf0532129152707420" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "f2e9a68a61692208a2f6087e0b0aa1e8dc6125aed3087901216917eba4b78be1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_macos-x64_bin.dmg", + "checksum": "97ca6e49cc8be6ed1c387564b2fd0eba9c4b70be398c3ef84def95844af80a3f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.2_macos-x64_bin.tar.gz", + "checksum": "bb32009761e84f71a7f325cc3825243e14c6a54fb50823077d8524c4a90b2dbd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_windows-x64_bin.msi", + "checksum": "be287068d4bcc4ac8558df801d6cda5d416247f2ad9619e2c1aefea6e66b6835" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.2_windows-x64_bin.zip", + "checksum": "d34582e2b6bef069c2a24455400561902ec6d73d70ffaed6580b6c5cf29513b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jdk-11.0.17-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.2_linux-aarch64_bin.tar.gz", + "checksum": "6e9c43ef568c9643191eaad38a6beeb2ae3227afbdc5a5d05aebdc452ef80d95", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "90638e273fd4e1cb74ca9c4a304736d7a641c94ea8b0f0d3f7edc721832af47b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.2_linux-x64_bin.tar.gz", + "checksum": "31e2705e4f03612c78ae4190cf222010db3aafb6fb1351eaf7ca0ace390c5a33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.2_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_macos-aarch64_bin.dmg", + "checksum": "7afe753a03215200e65019e632e89007db87c34fdfdb82bb47144b1a28dbb23c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.2_macos-aarch64_bin.tar.gz", + "checksum": "60f9a15dda1ea14d81ea9dde584f4ad4cf684c920db022621d888d4eb46983e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_macos-x64_bin.dmg", + "checksum": "8b8fbbc0c1308cb910d6cb1a03137aab70bf4c2ee84f83641d54e5b7ffe053db" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.2_macos-x64_bin.tar.gz", + "checksum": "0067e9fcc4a1794253669b2ad32ca02f06150963c265a9fce781d05a9ed32daa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_windows-x64_bin.msi", + "checksum": "cf46418b21bc7eebde32ec59ed56791ece76a0cf6ba08f211c6b01e755ef019b" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.2_windows-x64_bin.zip", + "checksum": "a34e2ec0318f209d6ac10948d1dd337e818ec808f788301e5426b62241d88a5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B2/sapmachine-jre-11.0.17-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.17+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.17%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "88172d7bc572fa5f99a41cbde5ac23a34f6ac3f195a9c8bfb519cb34a0c7ac02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "81453f6872a6e40b85627282ca4b7a17211638c9a2d3e99bcb77283f56c0dd90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.1_linux-x64_bin.tar.gz", + "checksum": "65f2c2120e3e6f534da234f86d6be859ba75f4c9bceb112fdf5f6fb5fa7d683f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_macos-aarch64_bin.dmg", + "checksum": "74397c175a2276809f5675642644a3d48779ca1f481678e01cd394f396974b9d" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "99ebe1e78960b02a2d334661976ff27602badcff796f4f364a0bc4e5469a3eff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.17-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_macos-x64_bin.dmg", + "checksum": "a029e0c78ebf81bf4005be5fc2c12181769a05e2dc9e65f116d8bf9988ccbd4a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.17-ea.1_macos-x64_bin.tar.gz", + "checksum": "d624f1abe667afb644ed33b053275514dbb823f83e1dd9b4448685497ba1c47b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.17-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_windows-x64_bin.msi", + "checksum": "e6e770e798d27e299541b1404ce03adcdf16ad6f57ed7d8223ca6ac53eddd959" + }, + "zip": { + "name": "sapmachine-jdk-11.0.17-ea.1_windows-x64_bin.zip", + "checksum": "27057b6170a39554217fcaee03fd8f2ddc91c26998b32d0ad7e8b6a364f23ab0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jdk-11.0.17-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "276694c5a538e620bc89fe099693188fc69b8fa1561cc557aeac49550796ed5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "81d5ef9b19efcfba3d0f1c4d0c8439b659a7de112442c871a46afdc722cf628b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.1_linux-x64_bin.tar.gz", + "checksum": "6757b7c8d1d33b4ebe614ae68f6f587b92a022c6ee0db1d06b0bd933a517ef2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_macos-aarch64_bin.dmg", + "checksum": "b4aed5927688f78a2788951c176159b6fc3ecef310fa0488de3c7cbe2a0b8375" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "d6df66138e2dce6299346d962c08bacda57ea5da30429f789fcab2acfb17885d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.17-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_macos-x64_bin.dmg", + "checksum": "a58528068676d51a987fdbf3b02dba83c0b0303529fcdc04276435943fe5258e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.17-ea.1_macos-x64_bin.tar.gz", + "checksum": "e8a460bf2a934ed0bb30792091422901022ce4026c8ba1a24b319f37848188f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.17-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_windows-x64_bin.msi", + "checksum": "55c86adda8b83e22f501cd5dde5207b822cdf483c09f7e3c0980312e155cd069" + }, + "zip": { + "name": "sapmachine-jre-11.0.17-ea.1_windows-x64_bin.zip", + "checksum": "8bc9b164917e3fe0b314f64f815ea7ac227d8e2e55ca962f4eeb267a7e354366", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17%2B1/sapmachine-jre-11.0.17-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.16.1": { + "sapmachine-11.0.16.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1_linux-aarch64_bin.tar.gz", + "checksum": "18042a496d3b83b12cad094e59318badfd6b99dbedd13f8cae1e9e09670c123d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1_linux-ppc64le_bin.tar.gz", + "checksum": "b1c53539d1198f2eb2eda041a17f65115f460dcb2c800e5ce748e3a4dee8d16c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1_linux-x64_bin.tar.gz", + "checksum": "e95b0b309bba41b04077ade8cde773e0e9152ea3800f01256abef5707258019f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_macos-aarch64_bin.dmg", + "checksum": "0503a8f13a7b31dc1070cf2ab4bb660d9476c740051e6609f5871f8fa28c822e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1_macos-aarch64_bin.tar.gz", + "checksum": "e3d8d11afd3766c300b02f5c4b4158041807ef2b6dba63d3de7320f9ce5a4826", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_macos-x64_bin.dmg", + "checksum": "d23ec9f13f323b0510387fcad9916eeccca394889eb2e648669668bd0663a68b" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1_macos-x64_bin.tar.gz", + "checksum": "1d6d0b4f8f8fd32b559102ab4fe7e571ed3eee3848877d055ce4d475448ad9a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_windows-x64_bin.msi", + "checksum": "22c9c8da169f6ba121e2f641a4409e1cf5a32f081dd13487b75952f8d4cd5df1" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16.1_windows-x64_bin.zip", + "checksum": "4bfe4a93ff9cb9a2a7d62e315383d31f2c948fa014eb41e7059b7bf00606ccd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jdk-11.0.16.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1_linux-aarch64_bin.tar.gz", + "checksum": "47cec4ff377ca5555b1257e6e7b7e12af6739f82d01401d78aea336849c95039", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1_linux-ppc64le_bin.tar.gz", + "checksum": "64c2df713ee83e16e303cfdb25fa81be0547947a743817892f3bda67302d3f93", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1_linux-x64_bin.tar.gz", + "checksum": "8932cb8e8b1f5f1b0225a0cc55b1ee965c56da94b275952b6699df3a6a7f798a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_macos-aarch64_bin.dmg", + "checksum": "9475702c5a20542cc4d3c995b8babbeb5e3361610a811a2db57de998ce2b5ba8" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1_macos-aarch64_bin.tar.gz", + "checksum": "d3009b9efabb83024349c1952f174611c5723d864cb378919f9b48c3881978dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_macos-x64_bin.dmg", + "checksum": "b642e501051f70e373a85e0c6486980662510ee7ef75e646e9bf7b50a0e84d71" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1_macos-x64_bin.tar.gz", + "checksum": "59abc6357ae241afb478014d2c3da206ad8a5babbb1d13b2f623672d1cbf8fd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_windows-x64_bin.msi", + "checksum": "4817a3848a2b8d4d84c555700b337189d8bc8506b2ef97d84d0daedea803254e" + }, + "zip": { + "name": "sapmachine-jre-11.0.16.1_windows-x64_bin.zip", + "checksum": "fff9bf49d33a42c76cdbde394b6e227e45f667244ae15f7d71caba8b30bdf133", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1/sapmachine-jre-11.0.16.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "c8f4c664b2811a0b6ac69f68aaf66a258ed7f8e1d9c2e77bbe1426255149860a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "baecd91ed408a707c63be0d17af226f12604aac74cec47744417834f32d02ba5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "3675f6d26c0f322fe749fc32086ded933d034e02d48cde8dad62878b0b71f848", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "6530ed43e4f64bc2c954b1d7355fdea5c5e9642a38592de75403aaeca93f9079" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "aa9fce0cb5da00c9b06d354d2904fb8ded42ea60fc3d01f7dcad505e13d12293", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_macos-x64_bin.dmg", + "checksum": "5ed6f71d26bfa0fab22631c2f72cedd786e2fdcc5ece47c0386a8456e8c2c0d9" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "115d866974c23f930bc48ce223a3def7a82c45a6786bbb18baad1c9140985fda", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_windows-x64_bin.msi", + "checksum": "82ea687fa2fc4473a17ce749be11038b15b2e1b3c1a0d153f38304575a5f92ac" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16.1-ea.1_windows-x64_bin.zip", + "checksum": "14268a8997a74eee4dc70bd88b1a78cedd6cd4e9f7fef29909ca450b52f78acf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jdk-11.0.16.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1-ea.1_linux-aarch64_bin.tar.gz", + "checksum": "5f8e249e850f9cc66a99cdf8d3b0fdc60f0f2adf44752ecad2ccc075c34a1f83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "8a68ffdbd2edef4c9c97809270fa9eff6c2465ef24ed711caa588ac7b252638f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "db4f4ae3d88b9706b661aaacb1a50207849f4352f2d3577b53f963e8f4d1c95a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16.1-ea.1_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_macos-aarch64_bin.dmg", + "checksum": "c416c5adfb697748fe409e0b7faaed03494ab8e4238e471081b42c9960c56126" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1-ea.1_macos-aarch64_bin.tar.gz", + "checksum": "c88a0c11545c0f523b6a25febe12f083bd26932d57e6980b48ff3081c37bd4ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16.1-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_macos-x64_bin.dmg", + "checksum": "763c6423f1b5787c75193167654bbf01e8598d0665937fe1c5b353aab8f0248a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16.1-ea.1_macos-x64_bin.tar.gz", + "checksum": "aac8338770e89cd4f596b4260dc6bad7210f43494c39911160312d3e9f926286", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_windows-x64_bin.msi", + "checksum": "d644783235fd08aae395c41df925a00d08e392e772652d507b68e7f5d237b0bc" + }, + "zip": { + "name": "sapmachine-jre-11.0.16.1-ea.1_windows-x64_bin.zip", + "checksum": "ccf5255c72633b983fecf86ee4c49bc84502736f6473351f530b76f9990df027", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16.1%2B1/sapmachine-jre-11.0.16.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.16": { + "sapmachine-11.0.16": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16_linux-aarch64_bin.tar.gz", + "checksum": "75b018adbb1604cf394b3a7775661eb443e95ab1c641a2fec8add80609691c7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16_linux-ppc64le_bin.tar.gz", + "checksum": "5cf48915406141d161c2ddd05949946d4741b4c54adf73c43cbdadcc69542427", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16_linux-x64_bin.tar.gz", + "checksum": "52dc3d35e683135bef651345c619ba42902b39897a655e9d1f3b2eb9385364cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_macos-aarch64_bin.dmg", + "checksum": "121ea9d9ed03aa1457db61e5ee5bd9cc011bca61f726bd96449188ae4c41892c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16_macos-aarch64_bin.tar.gz", + "checksum": "828d2906526b560cdea086deac7025cadc0cefef80e06d3f65d9688c04efb160", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_macos-x64_bin.dmg", + "checksum": "1204b77c9f61da2597fd7a24bd5906a135b6308ed6809d9e077be544aa099a72" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16_macos-x64_bin.tar.gz", + "checksum": "183837bb7407fc0dca48cdfbe6af08b8ed85d1805fa223b05b8e61e2597d2652", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_windows-x64_bin.msi", + "checksum": "b40c3f92bccc2ce2789869bc78cc198cae4e6fe80d956cacadd1b91a3eb79c61" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16_windows-x64_bin.zip", + "checksum": "931ffd1235bb5788d430754b1ea94b7bfd7ec6f3de5bf5a4b60849f4bebb74ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jdk-11.0.16_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16_linux-aarch64_bin.tar.gz", + "checksum": "9bfad83f44fe7c55bf40f1175d1182e31610b98537b4fba18e0e9462dbcf2031", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16_linux-ppc64le_bin.tar.gz", + "checksum": "a25da217d83707e8e25d6b1f695ef062a6f4d0a1226f9003766daa8610b73020", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16_linux-x64_bin.tar.gz", + "checksum": "efa79271a061c9ef0f068f9cd149d88e5e0f4d6e174db6d46cab16c148162540", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_macos-aarch64_bin.dmg", + "checksum": "0b2836dae5daece547b6f4a1798adf97ea34494ba6aef1b8824aca4c9320dc8e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16_macos-aarch64_bin.tar.gz", + "checksum": "514303a3b389a4bb13a7a2bdfc51eb78627ea1b0fce37be576548e96ffd7cf25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_macos-x64_bin.dmg", + "checksum": "e89ef90de0e0d87e241c1f9db338990cc2074cdc391cbfb14b69cb5f7e5dbe0e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16_macos-x64_bin.tar.gz", + "checksum": "da1c62c38602e9d84e69b655e9d66e5fe33eddcede8ede377cdc350063a936e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_windows-x64_bin.msi", + "checksum": "fbefc6d24f70ac60db6dd6cdd6bcc1ec90fd4d4855bdc62bf06cfc1e8a003659" + }, + "zip": { + "name": "sapmachine-jre-11.0.16_windows-x64_bin.zip", + "checksum": "9699ba16887c1d715be2d75af215113d8ec7c3ac753c39e5c8dc2628d0c1aa39", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16/sapmachine-jre-11.0.16_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "6a255ab9a60ee0d7fe07d978cd18c915734cda530eed74ea897b2c457790750a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "3ed53c403ffabb425a7cbca58f35dd2ee02e2a847c7787d12bd2be6fe6d229c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.8_linux-x64_bin.tar.gz", + "checksum": "3d94ca284ef02045f6ca4ff841cda691912d3e133554a27cb01a6f4793d4a185", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_macos-aarch64_bin.dmg", + "checksum": "2876d47941bab33fe3fb49335f4f91735405cf0b93a178ef651391d562b581ea" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "862f539e5448121b7591cc0d5efad6888e1b0c7b6ba3ed79552e2e748119187a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_macos-x64_bin.dmg", + "checksum": "d5df442059320d012bcc5d4339b2a3ada987890c01086fbb2f2224fd44917408" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.8_macos-x64_bin.tar.gz", + "checksum": "39be52d82f9a0f875b1f4ae53f8dc6361e72ab4255fec72a0be60fd5595d34c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_windows-x64_bin.msi", + "checksum": "146689c0c9187dd2875ce997138c538188dd97dac0cfd3b633e0a0182397d810" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.8_windows-x64_bin.zip", + "checksum": "8f09c48b6e53afeec6202a5053533b3025fe04b959305a3982cc5eee726a72d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jdk-11.0.16-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.8_linux-aarch64_bin.tar.gz", + "checksum": "a13af2fb32e4adb4dc6ab1b2f04ebd44b5315e587c5e708a34c89462491172f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "17aba757b1dc656d17f22f6def96c7a730ba47c434f803403b444a2224af633f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.8_linux-x64_bin.tar.gz", + "checksum": "06e9a263ba523956ad5a2a9fe7682f382684ccbfe43debe1b18ee5d84928e2d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.8_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_macos-aarch64_bin.dmg", + "checksum": "96692eead4db0f4d8c594738f496160d62b4fe8bab1fc529b81fe45e0973a2df" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.8_macos-aarch64_bin.tar.gz", + "checksum": "d6bd1d96b76e866aa08d0b594b023951f34572a855ee0b2ffbbb23c30eab4a84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.8_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_macos-x64_bin.dmg", + "checksum": "0b96906051e50612e4095b45baf2cce34ad0501563b8e64d611dd2a77a27968c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.8_macos-x64_bin.tar.gz", + "checksum": "fdb709adf60bf9694614525c01cc21128a663ca44a5e0b97490b185a1bb0b0a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_windows-x64_bin.msi", + "checksum": "21e2a9fd425aa361906132aa755878b6292fda9d267dd2c249be594374c2230b" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.8_windows-x64_bin.zip", + "checksum": "6f5f589c450e8990fded148a060fbebcd53309f44d312513f3e72de930a7b449", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B8/sapmachine-jre-11.0.16-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "61158d191de694744e0daf13b501db33c64c6532367c093340fb1908a5b8820f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "65ea6bfb1284cb1b997c354d2a0765c31ed1414b8cbed838cb86a075e870d470", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.7_linux-x64_bin.tar.gz", + "checksum": "44014a1620476cee04c37973d3dd4138f755972c13721dd1e5a6880daabff8ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_macos-aarch64_bin.dmg", + "checksum": "446ea4de53edbc82826bac9da8fe7e678fb9200e9f06756f43596613876d857f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "7a08877014f26e478984a1e8ee537bf35769a77f6fe414cebc4e41aa273e5ba1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_macos-x64_bin.dmg", + "checksum": "f0ce67985cc5d59a1625fce7ca6e03542bf472652de611776c445002cbdaaa2b" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.7_macos-x64_bin.tar.gz", + "checksum": "36b5698ce2d7fd98b1f1108bd08b5fbd627042329a17d9fb11fd097d29cc32e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.7_windows-x64_bin.zip", + "checksum": "b5ef4233bd59183f39ce6c024858d531720a2f6f4ccbf057c73fdcf98f984d8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jdk-11.0.16-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.7_linux-aarch64_bin.tar.gz", + "checksum": "59fa95b96bdf1e34e30883bc9a6d6f9ac25a98375338b91c20d46e0dc64552d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "d6967637a594d68ecd2a7443315d4be68c653da770a9a1db5960e69171579f92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.7_linux-x64_bin.tar.gz", + "checksum": "69fd2ae1f60593f98af4535b0b9241b921493599e08f0a540d87970f49e794e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.7_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_macos-aarch64_bin.dmg", + "checksum": "a1eb8966d2a9756f0869debfcca52d0623fb0eb579e7429b54cca9414a8de434" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.7_macos-aarch64_bin.tar.gz", + "checksum": "097d1513051ba02b06e2c1644adc87a8813d5ea19b5611104a16fd2e959bfa1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.7_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_macos-x64_bin.dmg", + "checksum": "9cbbdc2c9fa0572ec4f1dfe91f73d7357200fbaeac3843b25f225d1c47edcabb" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.7_macos-x64_bin.tar.gz", + "checksum": "bf515e431d8a7707c3325a2dc2ca481037fb2a09f40500b4dadb2b81b6472433", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.7_windows-x64_bin.zip", + "checksum": "c3a58caa86be262d1c153a853d1009c86e92438b57e772902e72d8c23f95c1fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B7/sapmachine-jre-11.0.16-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "ee258c4a9a97103d83ce76cb9b9e5e24467d0c9d1d2c5848d7dd117ec6bdafd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "52b7969aad646779f9ff8764a047f61cb552b44afebf0b9f1a545301c36224ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.6_linux-x64_bin.tar.gz", + "checksum": "9818a797f779f86a82ebefeaa1f975524d4a050a48ba70cbb0526ca9b799cc56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_macos-aarch64_bin.dmg", + "checksum": "4289dfff5a1c934393ea301089817898f7ac989b10bbb01863f23f5b68325be8" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "71c5f824bb58015ab5b8346b4efff1a03e48b9a299523ac91d993bf356ffd7b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_macos-x64_bin.dmg", + "checksum": "5dfc5ca40137b0118aacab050718d148cf02229dad1ae67eda6f3199e5adf089" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.6_macos-x64_bin.tar.gz", + "checksum": "5091a86247466bacc0a55d2f978aeecd5d34c63156bef052464320f20832ce55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.6_windows-x64_bin.zip", + "checksum": "1d0843dfc5ea2609043521c68c628eaad475bcc54c37420b9395467fd4d52f64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jdk-11.0.16-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.6_linux-aarch64_bin.tar.gz", + "checksum": "f02d589603b6067ba5409398e8fc777054f0c6d025ccbd9712c3f7a2b892cab7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "e525aded7d49384c77de1f7efd9f7c503d39589b3155ec20aa1d404e2c0464db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.6_linux-x64_bin.tar.gz", + "checksum": "3d25877516cc1b228c26c89bcb1ebe7b452ea889b68195eea86fe89404816c27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.6_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_macos-aarch64_bin.dmg", + "checksum": "504c99d3c9d67999bfe9621e33715557bf867a69166265d3c82a8863ecbccafc" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.6_macos-aarch64_bin.tar.gz", + "checksum": "bc3ce6f1d327c3042c00bffbee620a54c2ff893ef6428e83c596a0aad0c2231b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.6_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_macos-x64_bin.dmg", + "checksum": "47ab17cd5afe1176903a19909200f0ae0db37c793ff338c92c27077a10e49026" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.6_macos-x64_bin.tar.gz", + "checksum": "b7277301090a40939cb9014c69d4149b3bcb176918de623c1c377b0710461cb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.6_windows-x64_bin.zip", + "checksum": "03b1a83a9e4769a7f2d5003420887d48e4f66673f789eb9bb85398288cc28938", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B6/sapmachine-jre-11.0.16-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "03c486d7a88dcbe4eb41fc83b4269ae436b8f5a038329ac1580ecdb8f21d18cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "eca9de00f3cd4b56f7b23112b37830433ee8dad10675621a1c1c05a3ec5e32d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.5_linux-x64_bin.tar.gz", + "checksum": "e03eeb195be65febde2adc4124b6085b918ff3328b9a079b8dbade5e1424fddd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_macos-aarch64_bin.dmg", + "checksum": "f6f980e32096ef6a1d498b35b3bb88ae76404687eb0c154f2b8e2c195afb3781" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "e5337dc46b3d902b012dac2f086900a22e3e695a88075ee437e3305e06a37b04", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_macos-x64_bin.dmg", + "checksum": "39b432513f958031d4cecb42cdc241477387ccaaee551e88f1fb05ae8b63e223" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.5_macos-x64_bin.tar.gz", + "checksum": "118a2bb216ec74d05076eb8ddcab4019f4fefa32f59ad82f7cd65361fa69699a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.5_windows-x64_bin.zip", + "checksum": "3cd842b35879df191143f63e42217784b7e3fa4e41645b17d00721e0d8d9643e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jdk-11.0.16-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.5_linux-aarch64_bin.tar.gz", + "checksum": "58d2d36cf3dbb186104def7a595562f880d75868f3325ff2cbd6f83a25cdfac3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "6e16f58ea6a4ed8f41ce30336464f38f182af2ec6716c9595a338ecdb0615d03", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.5_linux-x64_bin.tar.gz", + "checksum": "7396b8003344a5a4a8a309da4d4349b605c2fca95983c477a5e3bc0bc62c5a7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.5_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_macos-aarch64_bin.dmg", + "checksum": "481067ea9482aeabd6d0ae3fb37b971a92a7f8327be2f74e815b28ed26a74c80" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.5_macos-aarch64_bin.tar.gz", + "checksum": "e3e3024b8066151307903050b6a9ca204d6b8e06cf9e1bc00e8b21fdede2944f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.5_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_macos-x64_bin.dmg", + "checksum": "6cf14de00314f98d959997fe88f0bc5af9f5849b877b60d2dc1c117b1c9c25e8" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.5_macos-x64_bin.tar.gz", + "checksum": "f3b5cb3141502a1dee92d165365d0d0cda4328d1e92900488c9d05b9c3f9049f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.5_windows-x64_bin.zip", + "checksum": "c33c1fd627c39837eb958f8a0a4128f64eb902079d8a59d0c3c3ddb6c4590065", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B5/sapmachine-jre-11.0.16-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "b4bc2fca1ce3b3079710aa1312a875ccad653e1406e8c579b743aff731dab5fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "24bcd80cfe6535f55506deb96d1e892b9f951e6c5efcebef5bd69a600ac59156", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.4_linux-x64_bin.tar.gz", + "checksum": "1a331ede05459581b0c1518b19e2239e61c65beab4e8c51ba6319bf5a0f6dfab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_macos-aarch64_bin.dmg", + "checksum": "624f5ebefbb471aef395eeaf7ead75cc17f9a8859c9666d5e83aa7a83af7449c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "16e626f01eb1629e99a16e09f9f63b74c70101b486b64325abe555ff8af0d668", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_macos-x64_bin.dmg", + "checksum": "c6354897bde429172a60e2e5455baef4804ce92fd37a1a791ced9dba5d06b8d1" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.4_macos-x64_bin.tar.gz", + "checksum": "2eafccbdd7851b0737cd8d714458b82ff85014d0b07433d73b3934086534b0de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.4_windows-x64_bin.zip", + "checksum": "042cc8e12447e54b1ccb17add502756a8bb525896dfcf3d0cc359a2709e6fcce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jdk-11.0.16-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.4_linux-aarch64_bin.tar.gz", + "checksum": "3c82e3fae5e8a0eb425f6cc20d92b41930bb448ffd2009a299a06535c5c96419", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "363c5758ef3738f7937eaa8eaf52fa39700fca51d9bf20d463518442eeba52af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.4_linux-x64_bin.tar.gz", + "checksum": "1d4ea97ce83d3e0915c34190c322524d2422fc8b35b3966c328f08e8ed0f687d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-aarch64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.4_macos-aarch64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_macos-aarch64_bin.dmg", + "checksum": "77d1ff6102fd280a581da23e0b3a1fc09db32aafcfb870e6127760e8e6ce659b" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.4_macos-aarch64_bin.tar.gz", + "checksum": "15665727b7e40ec649c8a6166cb52335706f1afddb766656fde2b0e5545e5602", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_macos-aarch64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.4_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_macos-x64_bin.dmg", + "checksum": "378e2309f70be6bb308f50f5d7657629930ab1689357d2cb9efb5cde15508cde" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.4_macos-x64_bin.tar.gz", + "checksum": "137323c141116475891aa8eaee214833f4588083559c32d12609d0de9278b7d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.4_windows-x64_bin.zip", + "checksum": "21efa22a7f107884b7eb8dcd4dd7192c7b433264cb0124c7afa76112214aecc9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B4/sapmachine-jre-11.0.16-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "0fa79e8244331646b7e6ba0ca6515e90c1ead9c3775fabad287b9b2917da6ebb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jdk-11.0.16-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "a36b761557b22fa3670e6ec12fa39422d8859038bad9d21afdd1f093bb564bef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jdk-11.0.16-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.3_linux-x64_bin.tar.gz", + "checksum": "8dc35a424651f205ad1a8844d063d36891e6532ee9bafc6c4b43791fa088d59d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jdk-11.0.16-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jdk-11.0.16-ea.3_macos-x64_bin.dmg", + "checksum": "2953870fa59a16ccb665154c52c4abf7274c09db37935371ed0de12ce5dc1273" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.3_macos-x64_bin.tar.gz", + "checksum": "0ac62fd39c7aaf22847a12972d92b9a8b5499bc655eccdebb2bf85d0cbb7e423", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jdk-11.0.16-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jdk-11.0.16-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.3_windows-x64_bin.zip", + "checksum": "5b14a4dc22ea2beb0006a6cea24544db0f8a79a03934e205091c431a162f700a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jdk-11.0.16-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.3_linux-aarch64_bin.tar.gz", + "checksum": "8d24f603f3bd769b2c2e7ec96c33d7e1edd7eb41994fc91e0e39fc9afcd970ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jre-11.0.16-ea.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "e138508b91201b0ea502b1c6dd59bcafb2c95d4df58d7ce2feac453e8fd7b7a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jre-11.0.16-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.3_linux-x64_bin.tar.gz", + "checksum": "d6f8f9d2c48fb7da130d7ce39ae0f1979eb5b0ff905b5b4440840a114530aeaf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jre-11.0.16-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.3_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jre-11.0.16-ea.3_macos-x64_bin.dmg", + "checksum": "690ec8615f04b080d815bf2b8c88da48ce3b454f69e0dd411f96149d0a8e46f4" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.3_macos-x64_bin.tar.gz", + "checksum": "d503a2ef67ded81ccb74c6ba34c0c58dbc3dc662407f5eb4b4d836b3b4c0131b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jre-11.0.16-ea.3_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jre-11.0.16-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.3_windows-x64_bin.zip", + "checksum": "8a06b0778aa6495ea3b6c5353bd05bf0d92ee956569878ef57368e5fd1931daf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B3/sapmachine-jre-11.0.16-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "683a7ae536c07c1f85c6789262ca64306966cb2f8e3ff279f1a40218118a7e41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jdk-11.0.16-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "34ae7baddcc73e8dbac9ca4eb947b30fe336ff37b1b2016ae04977f00a0d6836", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jdk-11.0.16-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.2_linux-x64_bin.tar.gz", + "checksum": "857d1d1cb2c969959ef79f5ed3fad8e8fcd642c1a8e780ccf333663af1d0e460", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jdk-11.0.16-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jdk-11.0.16-ea.2_macos-x64_bin.dmg", + "checksum": "3276009b1f207eade186a95069914a02d08301ed667fb12f929d88420b1b9a4f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.2_macos-x64_bin.tar.gz", + "checksum": "9e2a77fca103832bc0ff200164eb9e24a03358aa76b6f1d3ac9c9cadef4e4732", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jdk-11.0.16-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jdk-11.0.16-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.2_windows-x64_bin.zip", + "checksum": "9b256db53e3105181a9b25534a1ddc8f6580e78c01624a80f153e243a1a08822", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jdk-11.0.16-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "a2163e8124b2282e1ce34541c39d851ac934c5ec6c5983eefd644c0666af64c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jre-11.0.16-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "e1b8b05250748f7cfbe6b98ee09e2f572a511a2321404a2e2d285776256f2540", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jre-11.0.16-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.2_linux-x64_bin.tar.gz", + "checksum": "99e04da421186e5d72ee92365591b580212ac0a98f112f583ab81938b8dd99ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jre-11.0.16-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.2_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jre-11.0.16-ea.2_macos-x64_bin.dmg", + "checksum": "96ede7e63fc394fd0afef629d565ec40624aeb83b8950af2ac9c2146e09baa28" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.2_macos-x64_bin.tar.gz", + "checksum": "8c6496d1a91fe9b72e6c724677814449a8e3141a2724ddf81c39536076ab204e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jre-11.0.16-ea.2_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jre-11.0.16-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.2_windows-x64_bin.zip", + "checksum": "d0b6605944c1711c92983b53afcfb068d2b9769baf0912c59fd477cf612e1d8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B2/sapmachine-jre-11.0.16-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.16+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.16%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "d077bcedb00c2fb1d4374c9f907179b14c5f03715afcde999a78431f9531df0c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jdk-11.0.16-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "108adb43e03a12048496674a61c891f2349043993f3d13ad6dda15f812a47fe4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jdk-11.0.16-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.1_linux-x64_bin.tar.gz", + "checksum": "e55bee14681f03e60c89ff5ae69f71382fd0a997f08d5cf7b203953df7bc1870", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jdk-11.0.16-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.16-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jdk-11.0.16-ea.1_macos-x64_bin.dmg", + "checksum": "e1d029fcbc9f71c6d14ebc5cf2cf4dc32d4ca319117d495f7e7675b225331419" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.16-ea.1_macos-x64_bin.tar.gz", + "checksum": "53ed99cb60130ceb12e8815019b446667017e733e6721ecff6c1a68d66cd5e26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jdk-11.0.16-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.16-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jdk-11.0.16-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.16-ea.1_windows-x64_bin.zip", + "checksum": "2a7693ca438a0a6950e43f28432ce9f8e12f4aabcf38d70df4fdbb37c8f51f7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jdk-11.0.16-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "c46e0d1a4fa916f01c5beb35eecef54ad775eeec273c7e9984bee2b5680b8cb2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jre-11.0.16-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "8204e0f8969f60fe43d32fd461e07a220d7a1a2665f7f532d1c161d0d08e76e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jre-11.0.16-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.1_linux-x64_bin.tar.gz", + "checksum": "28153bf9147502bff5b1cd7d43305e8a332c7e56029a159c05713ffa0595c6a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jre-11.0.16-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.16-ea.1_macos-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jre-11.0.16-ea.1_macos-x64_bin.dmg", + "checksum": "41ad62aa0aa815a6b999c579fdc3f88a569b01659cc1366908f8f0a3548697b2" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.16-ea.1_macos-x64_bin.tar.gz", + "checksum": "3a84ab5565a1e84064d0ac519e23305daccc702719754bc96ddd4a0fa9a9731e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jre-11.0.16-ea.1_macos-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.16-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jre-11.0.16-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.16-ea.1_windows-x64_bin.zip", + "checksum": "512d6354a17db4432d0ecc090e18a1761b8369118f6b345e51923e01c7a33ce0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.16%2B1/sapmachine-jre-11.0.16-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.15.0.1": { + "sapmachine-11.0.15.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "27c17a9605fc60e58de19e7568fdc7f135f6cb2610efa4cc61b402589703e506", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jdk-11.0.15.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "2971989aa57bbcff9b84a25123d6f8c08a429958177e4ee32b2f375979d50a89", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jdk-11.0.15.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15.0.1_linux-x64_bin.tar.gz", + "checksum": "826457c300e7315b309bc54d49ed7d0eead98b3800cb70acf10733427fe13942", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jdk-11.0.15.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jdk-11.0.15.0.1_osx-x64_bin.dmg", + "checksum": "3f61d992efc8bf53d56338a4b1ae0e00ff5ee3ef8c449a2c563de81cbbf0b336" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15.0.1_osx-x64_bin.tar.gz", + "checksum": "7744b3632fba1c6e8339b9fb74c46728f8109c07070df49d898799832a934abd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jdk-11.0.15.0.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jdk-11.0.15.0.1_windows-x64_bin.msi", + "checksum": "3959f817aee83a9ed5346e2c054705b0ca03bd5f1bb6b7ccc3cab6b57f70fa24" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15.0.1_windows-x64_bin.zip", + "checksum": "859ac1f20fa31d9fc91d6568b787635d030fa49d156dedb42b0f4be5297e6e62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jdk-11.0.15.0.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15.0.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "2ed07c7eee2ca9ca9bcfd3fdb86bf56a5548d13caaec2aacb04b006e0417086c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jre-11.0.15.0.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "14081a80e128f5a8964254b8b0a0ba07095113f56af384267473610a0593fd35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jre-11.0.15.0.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15.0.1_linux-x64_bin.tar.gz", + "checksum": "8eeecb0bb52c322ff2964dc70f1c02affcc620bf7af416cd93ce166b85553e38", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jre-11.0.15.0.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jre-11.0.15.0.1_osx-x64_bin.dmg", + "checksum": "bcd12c1b28bb571a164804a016d9c4dbc79bf5777fdd525f10ac4f7818b9328d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15.0.1_osx-x64_bin.tar.gz", + "checksum": "72e6a7a1aa3337799e5be448accb3ec8ea35b3a781712f3d5f17bff63586b032", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jre-11.0.15.0.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jre-11.0.15.0.1_windows-x64_bin.msi", + "checksum": "20130e311fc117a1eb7c565725782e8575259bbd08eedae53209966cceda0366" + }, + "zip": { + "name": "sapmachine-jre-11.0.15.0.1_windows-x64_bin.zip", + "checksum": "861171fa00a0b3e1c9cf838ab3ef86a8782a2cfc3977d62abc5fd9503fc2305d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15.0.1/sapmachine-jre-11.0.15.0.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.15": { + "sapmachine-11.0.15": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-beta_linux-aarch64_bin.tar.gz", + "checksum": "6b99939b14af7a185a45c32c51f924fa89754bba97c06bb3523fdb5a7ad561a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jdk-11.0.15-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15_linux-ppc64le_bin.tar.gz", + "checksum": "a2fc2177ea29b722b4dd52be6e7e436b585afd2249b31cc3bd098f9f2a631d86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jdk-11.0.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15_linux-x64_bin.tar.gz", + "checksum": "131418908bda1ff30679bb273db42fa30e1bdf73c64ba812aa8353a754feecf2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jdk-11.0.15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jdk-11.0.15_osx-x64_bin.dmg", + "checksum": "64bda337540c3aded3edf698921c0ae2c1f4064b932fbde0f2d7e30f8f9f3f5c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15_osx-x64_bin.tar.gz", + "checksum": "6edc3e6d4a5fcc2782b24d5957fbdfa16f20e5e349d9b28fd536be0d32deb041", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jdk-11.0.15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jdk-11.0.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15_windows-x64_bin.zip", + "checksum": "377e7be8b18414a5c8ee179dd12293c9d254281fa51d32cf35901b88d43b3f10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jdk-11.0.15_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-beta_linux-aarch64_bin.tar.gz", + "checksum": "fcef890620dce38b0205ec3aac5d50d634c90850cf3a7f53bc3ac4a507ea965e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jre-11.0.15-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15_linux-ppc64le_bin.tar.gz", + "checksum": "2811ecd06440b6ebd351509d37141cfa49a8b86ee96cb2f4ab7afa4e3e59628b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jre-11.0.15_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15_linux-x64_bin.tar.gz", + "checksum": "19f82309d3cdc9fdded952fa224de57c96b023dba8d9a75cf91a86c983d011b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jre-11.0.15_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jre-11.0.15_osx-x64_bin.dmg", + "checksum": "fa92a08e011535a34ac7de7a5750588df1a657e18a19090fcf8be47ab95f314d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15_osx-x64_bin.tar.gz", + "checksum": "ce5feac2c5fd194934d757428891dd57a85ef4b1e4e9ce91778610e102dea7c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jre-11.0.15_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jre-11.0.15_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15_windows-x64_bin.zip", + "checksum": "6383e9b89780f9f4920a4868c2b026d7d31283eba67bfbff84a396d2761bd166", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15/sapmachine-jre-11.0.15_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "225f464727e92d5cea5eef38a6541c46bd26453a02df85afa069a1fcfa68abc4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jdk-11.0.15-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "5bccb70b7ed260eb454e0074870750873329d3b2f74b859a7b0a56d75e7e9174", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jdk-11.0.15-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.10_linux-x64_bin.tar.gz", + "checksum": "482d86de1f48af6a570d3ccc45e93580a748af822c8281a3776d81151e47d7ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jdk-11.0.15-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jdk-11.0.15-ea.10_osx-x64_bin.dmg", + "checksum": "50e00d25c0b5ab7b9d5e932ed31164e85a8be797b91d3cacc087ead148474892" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.10_osx-x64_bin.tar.gz", + "checksum": "25f2bb3334727df8601b88511d61173cfc6fbbc7fa39e5167736f72a3292251f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jdk-11.0.15-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jdk-11.0.15-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.10_windows-x64_bin.zip", + "checksum": "d2f83fe7d3fe3392af9c4a95db998845104549517682106a47f5881db164e32d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jdk-11.0.15-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "5d7924194b774ed1852b278fbcc0ee2529274adbea47a798c3451c35f45a8922", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jre-11.0.15-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "e3b3983c4b5b1595a3eae19cdb3ad6786a20b8d9876b585e8bc92bfce60d713b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jre-11.0.15-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.10_linux-x64_bin.tar.gz", + "checksum": "877dd5df29d1c51e0c87d4d589d5f36fa037b69565027f749790c01467c1aa4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jre-11.0.15-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jre-11.0.15-ea.10_osx-x64_bin.dmg", + "checksum": "7425cb5f6faa183967d43beb363d5d48c444231be6ad399220527a65ab319a0c" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.10_osx-x64_bin.tar.gz", + "checksum": "78fc42e28843138bdea523ae45658e13bad04029cba35adbc477c54b6c164d5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jre-11.0.15-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jre-11.0.15-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.10_windows-x64_bin.zip", + "checksum": "3a23709380500c91c603e43dd44eb9edc1df2b25a5fb3e92b3d41bf8431ec14f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B10/sapmachine-jre-11.0.15-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "e47382526b2b3c8592b6adf239a36014212bf186978517152307bb7ff131e510", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jdk-11.0.15-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "7ef3cc1679cad8db73e79acd9ac82048b10c3a65bd7177dda86ad37b3181d60f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jdk-11.0.15-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.9_linux-x64_bin.tar.gz", + "checksum": "8c92c502ce63dbb6eedd078f3832ffa79a2060b651504597ca84432dfe4b6c3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jdk-11.0.15-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jdk-11.0.15-ea.9_osx-x64_bin.dmg", + "checksum": "efd0f29b79db8d83c621464c52852942b537ca66293d33a770733d4ae6671846" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.9_osx-x64_bin.tar.gz", + "checksum": "a09efdb4647be47c3505529dab73edfe3462cd9493ffecbd7780319264f18ce8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jdk-11.0.15-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jdk-11.0.15-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.9_windows-x64_bin.zip", + "checksum": "05169eca3def5d1f579376540d619e4c22bbcb9379acb41922ed97e814ddce3a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jdk-11.0.15-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "652a2e0840bb96194d8d92197d2be2f36c6f107ed2b26aadf9c4d571e79b456d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jre-11.0.15-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "b85aeefee2e87944de207e8449b311065218fc0463c010cfd27db0ba7e88f843", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jre-11.0.15-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.9_linux-x64_bin.tar.gz", + "checksum": "44e24ab17178a1dad88ceb6d0b1d258c40060a0171a835a00c09d86c973c62bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jre-11.0.15-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jre-11.0.15-ea.9_osx-x64_bin.dmg", + "checksum": "102a584d97b74c146c41489e5ee93c5a9883d1efa18db23c834a8eb7b14a8802" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.9_osx-x64_bin.tar.gz", + "checksum": "633c3d1056346164fe5705f902e11511fc2245c4d75c7c2c6a9d23d48d258a83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jre-11.0.15-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jre-11.0.15-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.9_windows-x64_bin.zip", + "checksum": "6c84b89edce642db9c661ef25561c66df8e162d522c1395dc56c18dad7f0e4eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B9/sapmachine-jre-11.0.15-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "9331f18a35727b08fd1334af9bfdb9f9966614979888edefe8147526ca204889", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jdk-11.0.15-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "abff74b8359de955cdc0f74c043e68c515b641f0ca3326f5a496fe22e91b9c4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jdk-11.0.15-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.8_linux-x64_bin.tar.gz", + "checksum": "034affb0d792348a62757d676135bcc8cda415042a1605fd03c6a4732378dd35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jdk-11.0.15-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jdk-11.0.15-ea.8_osx-x64_bin.dmg", + "checksum": "0e226833045731b52b08dbc93d4e894107e32ec2198275eb53fee8e7d64478df" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.8_osx-x64_bin.tar.gz", + "checksum": "06399e1752949a3fd12d3f107b1129c87c6870666b400a82b1f222f692e83df6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jdk-11.0.15-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jdk-11.0.15-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.8_windows-x64_bin.zip", + "checksum": "0a4b4ea04c0b38a4f4842d965b0b0ccb6e54fc3ab0a713948dbeda6389b90a22", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jdk-11.0.15-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "9fb2011f006fde5d46092184226acdbef04bae2bf8cc4be178124c9bfa1776ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jre-11.0.15-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "dd0838ba6a3900c4c0db698501301c793651c032e3f3a8c610475c646b693e68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jre-11.0.15-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.8_linux-x64_bin.tar.gz", + "checksum": "3da55430af80eb381b82845b8ba406ad9de19080db9b8c0c8618c3d8de97ebcf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jre-11.0.15-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jre-11.0.15-ea.8_osx-x64_bin.dmg", + "checksum": "33c1d7a4b999919c713d612e90e4e55bf290537b4dc68fcdad6b8bfcd99761b6" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.8_osx-x64_bin.tar.gz", + "checksum": "cc26ff13baee1cd1475ee9d63a5701cfd0795f7b35973eb8b00c22066680270b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jre-11.0.15-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jre-11.0.15-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.8_windows-x64_bin.zip", + "checksum": "3dfbf654c1810cfc0cebb5272a77070e7b85f11e16dd555678008d068f3cf33a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B8/sapmachine-jre-11.0.15-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "64340f494591be743b3a336e18bbc57d5f9972b68640af22174dc954696e280b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jdk-11.0.15-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "f9e36abd4c39565751f91a020ff6415c784f56f66aac43a3c2ce2bf74b163940", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jdk-11.0.15-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.7_linux-x64_bin.tar.gz", + "checksum": "1f6369f0455c8bb52fe800500ad4f616d0c4fead71182e4b82e683ae7bb3bd25", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jdk-11.0.15-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jdk-11.0.15-ea.7_osx-x64_bin.dmg", + "checksum": "a541879a9bf547d9294c81a5f04d20763863b1bbbbc724edf92e7e356de4791e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.7_osx-x64_bin.tar.gz", + "checksum": "659b8dabb44307881c09859c3ce4adbb6c284e53f9497fdfe27040705404e13d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jdk-11.0.15-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jdk-11.0.15-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.7_windows-x64_bin.zip", + "checksum": "cff2906c8ef98b256b22efebbaa083db8ccaa7593b110b9e989c7db0808549a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jdk-11.0.15-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "fd00da0bf5dd8d890f6af0d95a0470babd69db852029c7aa345e1e6250d82b62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jre-11.0.15-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "dc5d5a7a672c5fa6721b59a423064d8d58e3ec5dc2f14836e8902249796d5dd2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jre-11.0.15-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.7_linux-x64_bin.tar.gz", + "checksum": "158b75c4216014627d2d395f2f1a50378ddd3029aa08ac3588bb843ad3d276ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jre-11.0.15-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jre-11.0.15-ea.7_osx-x64_bin.dmg", + "checksum": "2b66db5fc8370b785c87ea395d538b597c8cc2e80a88d04c259df83da5e15cdb" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.7_osx-x64_bin.tar.gz", + "checksum": "70eef4a8255ec2bcb330e2912394ac3ac5fad707d1ce9486f410abbae6bcc3e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jre-11.0.15-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jre-11.0.15-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.7_windows-x64_bin.zip", + "checksum": "df4b3cbfa9e3dd11132bd428b183b7a4d1426b622049c4c9c80d5ef36408d98b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B7/sapmachine-jre-11.0.15-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "821192941410095b2c37c48c98c0cf05d4f4fc0d99decb1d3d041c886c8eb537", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jdk-11.0.15-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "a143fce1dc6a60f8771f3182d34fe30c6e16d3645043c153dfa94f97387b52dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jdk-11.0.15-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.6_linux-x64_bin.tar.gz", + "checksum": "7788ba38de0b259b5c09cb4402ef2b7fc2ece489c91a1cd286ea4c069afad76b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jdk-11.0.15-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jdk-11.0.15-ea.6_osx-x64_bin.dmg", + "checksum": "3560b4034e69e7ebb9ce30e93391e07968022557877dc88ba71c5529deeaa19a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.6_osx-x64_bin.tar.gz", + "checksum": "a5de1df3bab918d27ed76bff4c565d008f83c341a5011861718537aa01a308f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jdk-11.0.15-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jdk-11.0.15-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.6_windows-x64_bin.zip", + "checksum": "4ffded07f9e0f02e5c9d6f0c3711823543efe51177fecfa2b6b76a82fc5ff8de", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jdk-11.0.15-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "fe0f738e2dfc054438509de9e50af9f9201d8202f053df229509d765bdb808d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jre-11.0.15-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "d375af05b7971c258300213f3be38d71ee5672b8e03177835332ec6055856247", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jre-11.0.15-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.6_linux-x64_bin.tar.gz", + "checksum": "dca6d6812839bef31d4c1e90adc3320be9d4922907b02f61c2736ef331da9778", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jre-11.0.15-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jre-11.0.15-ea.6_osx-x64_bin.dmg", + "checksum": "6414f9fcac1065dc503503bf398a0fc10da85fc45149cac3a515f93075fbd244" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.6_osx-x64_bin.tar.gz", + "checksum": "452b66c8310613b6c4e00d770134de2af68a2ad9d9f65c22d61b248d0834e7a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jre-11.0.15-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jre-11.0.15-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.6_windows-x64_bin.zip", + "checksum": "c9d5bd7338d1bd89990a8783dc0e4bc443fd5b8f2d212f068d35e9eb67f8eb6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B6/sapmachine-jre-11.0.15-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "8027156cd5e98bf15854ca8fc0af3dc39a654d4da3d7f3ea032d4e1a0817361d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jdk-11.0.15-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "5af43586a2f960e815c3531046ac072edd012ff1279c2fdc3b526f7c90d35889", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jdk-11.0.15-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.5_linux-x64_bin.tar.gz", + "checksum": "bc4c9863742a3382e280e6e29afc6545409acd7e7a8bfcef5fbc9fb854b91bbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jdk-11.0.15-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jdk-11.0.15-ea.5_osx-x64_bin.dmg", + "checksum": "4d8e1fad51a1d1508eda3bd319b73b24030f52dd4f25325daf8afaebc06b746c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.5_osx-x64_bin.tar.gz", + "checksum": "5ac62b5f13fd5ad4681ae7817fbe25c547a47566d28ed1cbca7ae7058b49460e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jdk-11.0.15-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jdk-11.0.15-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.5_windows-x64_bin.zip", + "checksum": "7f155698228b940572805707779921ee0f1b7f0c302df79be3ba491c9ca0874a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jdk-11.0.15-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "e36f94ffa7d8f0567ce628f1bcd4b9f685e40218238bcb5f196da97ae8785a5f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jre-11.0.15-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "4f7df20a0e28f2092dc7d2f2037bc83e7355c94b7b5ef521c74f1bf8a7fe787a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jre-11.0.15-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.5_linux-x64_bin.tar.gz", + "checksum": "0d5453969908929b561c917b07a3c92355384f9dd346d4f85dc122b5476b622d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jre-11.0.15-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jre-11.0.15-ea.5_osx-x64_bin.dmg", + "checksum": "09314b60c2f66b4b1a3d48be0a8512ff602ed274f7c687ca3e7b5c578e2e5b6e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.5_osx-x64_bin.tar.gz", + "checksum": "8cf59ca3c24215910bd4ed3d3513de199f8723b471aab1dbf75e3a0eb52f0f83", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jre-11.0.15-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jre-11.0.15-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.5_windows-x64_bin.zip", + "checksum": "e56df727031e66d5d02b82ecf18893946f292b05308c4fa6a83976d9eb649292", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B5/sapmachine-jre-11.0.15-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "50129c6cd8d4c6d76d621524521a18fb1136662e955171be81c65a6f3249bebf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jdk-11.0.15-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "d1ad4379ec3db3125c1417e4ebfcd3df99cce8715cc1ad4cd30e850b785b6a75", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jdk-11.0.15-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.4_linux-x64_bin.tar.gz", + "checksum": "391e0e97618a436eb22a74eefdabdfadfef19edb30d67a5f4fb2dbb89b09c924", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jdk-11.0.15-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jdk-11.0.15-ea.4_osx-x64_bin.dmg", + "checksum": "d7525cb62d695d9441fa60f4ed39901892c6ca6ccc56e9ddab419977ae2355af" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.4_osx-x64_bin.tar.gz", + "checksum": "7ec6fd18b0140a4a57660ad888dcf90cd466b2df5f0c53826dc2c30d01cecf3c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jdk-11.0.15-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jdk-11.0.15-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.4_windows-x64_bin.zip", + "checksum": "43c6f2eecd0320c0249272f2c68d3bcbed055b9147ccddb83fd90d3df23fb87c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jdk-11.0.15-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "2872f19e5c184a4dd6eee52ecd84a9a9f053e6c1d83e526429bd227917e10078", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jre-11.0.15-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "71f4f755787aae16b6f445344d4eb52b06f4bf45f08b63246e29159175e33870", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jre-11.0.15-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.4_linux-x64_bin.tar.gz", + "checksum": "332de4d8fd527aafb9cc06e9cbb23c11809532c243243cbbae88e186177f833d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jre-11.0.15-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jre-11.0.15-ea.4_osx-x64_bin.dmg", + "checksum": "4ed056e9fc3f12972162e575e00b0db55d3d4e4fa7b0da68d29316e9cf52ffc0" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.4_osx-x64_bin.tar.gz", + "checksum": "3df9f058433113758fe56db0c896a781ef5403470ac20ee8aafa4e4c5ffe2692", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jre-11.0.15-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jre-11.0.15-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.4_windows-x64_bin.zip", + "checksum": "703b7933349a19170656a7cc45a29a76f43f46ba56f43ba862babd002becc774", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B4/sapmachine-jre-11.0.15-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "0d61f7227a9a383c2682645ba672e9d590423f46b020d88e95cec72bfa61aba4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jdk-11.0.15-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "679107faebd3cb5e4653bb38b3558aa067cc9c27d03e3d44378a25f5fa0dce29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jdk-11.0.15-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.3_linux-x64_bin.tar.gz", + "checksum": "ea7e2efa2919a1ad817d6b10f54a42761e8084f92ff1482e79a875225d0aecd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jdk-11.0.15-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jdk-11.0.15-ea.3_osx-x64_bin.dmg", + "checksum": "b029d95498b5a0fb15bd518fd2b8b5267d56d5327ccffdd4b75a3b39fdb3dc58" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.3_osx-x64_bin.tar.gz", + "checksum": "19f3fd7e6f44a71ada6e508ac5ec77a674933752f1691cdd058ae32fa7b8c916", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jdk-11.0.15-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jdk-11.0.15-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.3_windows-x64_bin.zip", + "checksum": "ebe1bf6a69c6bdba3e357c78298eac321fc2157cad97f96b8782a97922da9104", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jdk-11.0.15-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "ba1dbe62d0a9f3802984f46f504ab34090a97b90c786ba521eead63400695f36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jre-11.0.15-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "1581563703c729f873765b3c86335f47725b052693a0a922b0e766b87f076f29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jre-11.0.15-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.3_linux-x64_bin.tar.gz", + "checksum": "279d08fdf35fd18eb71315c03a2ed31f5c9329afb3db3c77cc522b3dbb31c596", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jre-11.0.15-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jre-11.0.15-ea.3_osx-x64_bin.dmg", + "checksum": "68456437327c66862994455b184e1acfc127bafbf53ebfe15ffab3ad8f6bc7bd" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.3_osx-x64_bin.tar.gz", + "checksum": "e2d9faaadbbf98563ed375b647f11418dda7853d2f9c376ae5fba3bc7de65b55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jre-11.0.15-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jre-11.0.15-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.3_windows-x64_bin.zip", + "checksum": "e2bf3333baa55a6fee88d6d418f0b8b68f99333afc8edbaa57cb49a34286a578", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B3/sapmachine-jre-11.0.15-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "149a0d1a34b630688a4351fb1e369ffc049cf970c898d724860290a00e14d7f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jdk-11.0.15-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "409cec0ea893212202ae113bcf44212f9aeafd21507991ffa9d1ba2eeb96d246", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jdk-11.0.15-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.2_linux-x64_bin.tar.gz", + "checksum": "5b2c80927887d6a3ed35e421173ff1881b4bbb2b4231503fc83c8a04d97a88a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jdk-11.0.15-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jdk-11.0.15-ea.2_osx-x64_bin.dmg", + "checksum": "44b09f16790155c63a82f8083a6a3b21f5665ceeb453252645c3eb9d50c57490" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.2_osx-x64_bin.tar.gz", + "checksum": "57814d0e6ec06c977462bf5635ef441add5523752ce717a4dca02f74f1d26cbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jdk-11.0.15-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jdk-11.0.15-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.2_windows-x64_bin.zip", + "checksum": "7e19a15b52016e42cb0423d1e8be26a38209fe43b97305d98e0234b39d9fbed4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jdk-11.0.15-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "f7f4b232fd9f1b8f92569b7509fa12f7be311222d7daf7b7f8686f807c9c1384", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jre-11.0.15-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "7ca5e7b58dd52bdd731c3c659ece124a2cee875f09905f1484971dc877003381", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jre-11.0.15-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.2_linux-x64_bin.tar.gz", + "checksum": "17c954fd0aca016b735712590518c01d0db36e7e2f2937f6c11d786b890df6cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jre-11.0.15-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jre-11.0.15-ea.2_osx-x64_bin.dmg", + "checksum": "5a365f66303a8705238c691d1d6f6eeccadca284bf4e40c38bf185d04c6d3c43" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.2_osx-x64_bin.tar.gz", + "checksum": "a7278c7b9ea2f09f85d09c27776821aeba13105b09c1776e4928c691a2bcd681", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jre-11.0.15-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jre-11.0.15-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.2_windows-x64_bin.zip", + "checksum": "428fda88f6baf4847a9f6b2dca959c43767b213e0e99fc6a9af6e35919f87e15", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B2/sapmachine-jre-11.0.15-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.15+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.15%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "b6d3b6d91437721208f006b0be6f607acf186a8c2e08e21a5f229f4e62d28a98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jdk-11.0.15-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "bca4525cd91e1979442d0a3cc75ac99b5566ad0acdb6c7ae6263b0b214f34c84", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jdk-11.0.15-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.1_linux-x64_bin.tar.gz", + "checksum": "c8811aa587e609681352e579735a1663af6cd446cac33e91e02ded32f24c3a65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jdk-11.0.15-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.15-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jdk-11.0.15-ea.1_osx-x64_bin.dmg", + "checksum": "69741ecd09cf3f92d4fda1eda4c03c3df214af5c78914bb3e449af28836458fb" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.15-ea.1_osx-x64_bin.tar.gz", + "checksum": "babf7ce870a114ccaef28863f82a929277aaad4d1e1a5de84dfe26894a4d4a61", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jdk-11.0.15-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.15-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jdk-11.0.15-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.15-ea.1_windows-x64_bin.zip", + "checksum": "226141f11c78a4eb26cfed6bee95350aeb28645446d6311985f524e9cb97dc43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jdk-11.0.15-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "86744903d02ba21a8fab57ba1d742a03bb09ff74d578042c8224d443d0016159", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jre-11.0.15-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "f0088a5269968a4a47ab5c024d350ee44f270f2827c9e7eea6a7a1de5ca1ad2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jre-11.0.15-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.1_linux-x64_bin.tar.gz", + "checksum": "971756b1da0f52d1f721445fba31724b212e6dd856a7d28b127b0ad9be85b82f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jre-11.0.15-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.15-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jre-11.0.15-ea.1_osx-x64_bin.dmg", + "checksum": "830ef96eff0f9ba201f09623ae5f532da1127e14eed867d1b5a731cf489fe5d3" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.15-ea.1_osx-x64_bin.tar.gz", + "checksum": "cdd919ccb15d4ed09bb73e699efdeeb2054c798e030e1f0fa3b6d954e0e03862", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jre-11.0.15-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.15-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jre-11.0.15-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.15-ea.1_windows-x64_bin.zip", + "checksum": "107bcff3102bc7d036f4ef5ee39ac67871f960c6215aec3960acd15313b79621", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.15%2B1/sapmachine-jre-11.0.15-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.14.1": { + "sapmachine-11.0.14.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "91a18bf421168088dc42af95702a7b53e2b5d142a089b10127f344ee5bf89d9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jdk-11.0.14.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1_linux-ppc64le_bin.tar.gz", + "checksum": "acf100f7013633dadba236dbeb05801e1069e73e9ca53c98f72fe2d8671e3ecb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jdk-11.0.14.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1_linux-x64_bin.tar.gz", + "checksum": "f9ec22c87c76671ee86bf5aecf5ea9fa1a5767c0d1fa96d331dd942215084ea9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jdk-11.0.14.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jdk-11.0.14.1_osx-x64_bin.dmg", + "checksum": "3593829895f30b96f3022f455de1482d7757a8fac4a2d6fd36b6b7b2f3be0393" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1_osx-x64_bin.tar.gz", + "checksum": "497c5d0e697867f44f62a6cf5a8caabe2ceb623dd6c229278a3d5c1d3d11d9fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jdk-11.0.14.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jdk-11.0.14.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14.1_windows-x64_bin.zip", + "checksum": "4d1b5a01cb8ed06620f9c96457bcb5b0637bd752eb6563c39781efc82e92731a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jdk-11.0.14.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "97c93c7776a1ac181fe76ef817f24ea58db96d0b18d19f492a7df83a4ea9c62c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jre-11.0.14.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1_linux-ppc64le_bin.tar.gz", + "checksum": "baffc5866196a28f0999071fea9c34d67dd305baf1a5718b3c6b37295d64dec9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jre-11.0.14.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1_linux-x64_bin.tar.gz", + "checksum": "5b77af3367964d18614ffa289c26d55b884080729fdbe686e2e9e376abe0f32d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jre-11.0.14.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jre-11.0.14.1_osx-x64_bin.dmg", + "checksum": "2762e3cae9f5a2021fab7358293c0b0cb0a8de0c9c4597e3ae737ded4ce48693" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1_osx-x64_bin.tar.gz", + "checksum": "41fd9ff853a58018ac121991c693a673a879f44706153a267aa22376f2aa40bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jre-11.0.14.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jre-11.0.14.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14.1_windows-x64_bin.zip", + "checksum": "860fcb0cc81b1701d724262747b519d7b083b4ed089e9ec97136c14271f29e7b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1/sapmachine-jre-11.0.14.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "a7dcdc7805f3e5d84844a64fc3e9e95819f70a8c78beb16159df7d809c52dfee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jdk-11.0.14.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "6b99bc8011a18f69bd1604b4630e624c0f1b4d300173c1f425dd94f5129aa9ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jdk-11.0.14.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "bb711ce95b1eea03e8bc3533cad31a54f5d4247fa8e8b09ab2d73950e3733016", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jdk-11.0.14.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jdk-11.0.14.1-ea.1_osx-x64_bin.dmg", + "checksum": "3b973bf575ff96d735a9688b37d03e5b5de01082729f49d69b00baa0b20ce4f4" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "0573d785f86e2050a98fa79fdb84d0587e2ff14e6ee4f32e2d66529363ae85d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jdk-11.0.14.1-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jdk-11.0.14.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14.1-ea.1_windows-x64_bin.zip", + "checksum": "7cb5bc57af61973307694d7539146aeabb09a8bbac525246c1894da58456be67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jdk-11.0.14.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "f1fae0c04a8aa511314a93052936787c2c637c9f72fd22451d685e811ee7ace9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jre-11.0.14.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c2b1aeecf556e526cd9eda2f2f1eb3c0013697a3a0335579db2bcb30ac6f7aa7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jre-11.0.14.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "708098259864d90233c694fe6c4606059a96aa91cff61a090e44260c1eb36aa3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jre-11.0.14.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jre-11.0.14.1-ea.1_osx-x64_bin.dmg", + "checksum": "28d537bc80d89124850524629de33705edbbbd217972f40974a8b3d7412b06b3" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "f5c642f5099ce27e38b68cae3a9d3371b487c4778bce08dd3414f964422dc09f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jre-11.0.14.1-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jre-11.0.14.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14.1-ea.1_windows-x64_bin.zip", + "checksum": "ae60af6a898da2509d3210907ae2063b35ad0c8328975e17adc321d6e1638745", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14.1%2B1/sapmachine-jre-11.0.14.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.14": { + "sapmachine-11.0.14": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-beta_linux-aarch64_bin.tar.gz", + "checksum": "b97b8a850619e92d8a68a00b4c434d1242a88db7c187e05c6c5ffcc80f77fac1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jdk-11.0.14-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14_linux-ppc64le_bin.tar.gz", + "checksum": "d26676fac3210154cf8907f669ecec0bdeaf3646270768279df9ffde44c223a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jdk-11.0.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14_linux-x64_bin.tar.gz", + "checksum": "aaf5c63364cca4f208d7dc448485658e06ac6625d9f5dbd7c5120e59360ac6d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jdk-11.0.14_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jdk-11.0.14_osx-x64_bin.dmg", + "checksum": "257697c01485ef5eaca3cff069e4defa6dddc529497a5ff048e9185c07980d11" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14_osx-x64_bin.tar.gz", + "checksum": "1f8ed571b305ffa058a07484f08056a285302e77f4a8b0ae6af3f2c72a3f8acc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jdk-11.0.14_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jdk-11.0.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14_windows-x64_bin.zip", + "checksum": "a9d222bab939c1c6abeab5d57ab118de48abbb64acc1084490db27151b1b3c4c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jdk-11.0.14_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-beta_linux-aarch64_bin.tar.gz", + "checksum": "5ac0664bb54628d6fd9d640309977c352e8d1edb26ad90e1cf0616f81fd52401", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jre-11.0.14-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14_linux-ppc64le_bin.tar.gz", + "checksum": "30ff36f63c3bb620261aa5098164faf0d62d5eecd2d135fde0ecac93564b0127", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jre-11.0.14_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14_linux-x64_bin.tar.gz", + "checksum": "2111f10e699fdd9474096618faa83eef174852f88cee72bece865a59eaa2205e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jre-11.0.14_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jre-11.0.14_osx-x64_bin.dmg", + "checksum": "bb22c7fb3ef591f7d557249c70735fee026a9262831167efcffa509c0961b0ea" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14_osx-x64_bin.tar.gz", + "checksum": "5632c33d17f835eefa00897ce2ba39bcb7ec85fede6ce82b9ef1f495259fe8e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jre-11.0.14_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jre-11.0.14_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14_windows-x64_bin.zip", + "checksum": "2c71456c2ae76515f1eb5affcf6f94f1095dab51227ea638135424fcf52a3cac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14/sapmachine-jre-11.0.14_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "22df7fe585042758fbbf4299a3153e34baaa7fc486168b6afbe26bd2951cfe07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jdk-11.0.14-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "1bf3a7ee9d1d589e5c969e8e41d31e5b8fb931b198cdbd36f02266dd4cfabb44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jdk-11.0.14-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.9_linux-x64_bin.tar.gz", + "checksum": "5ae4e5984b74f3594cc0aea95f70d747b55908fb5b4121c1a47bfa35176b769d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jdk-11.0.14-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jdk-11.0.14-ea.9_osx-x64_bin.dmg", + "checksum": "bdb366f3ae06fc7731b7264fe41b83e7c7a8b94407938032752ba79022011f80" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.9_osx-x64_bin.tar.gz", + "checksum": "1deb729aeb89bd903792523ef90aefad669a2ad3ce861d30eded5ebd8dd109b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jdk-11.0.14-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jdk-11.0.14-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.9_windows-x64_bin.zip", + "checksum": "c38ad6bf0d6cc569af5dcae6f38a0253f1dfa85bbeecf9c80e38e5e21574fd1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jdk-11.0.14-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "c4777cf75e521e87bded299393510a9b10b47f4f74bfbcd155e0d3744fdd6d9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jre-11.0.14-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "30394e13a9e940045e187a2067cf6b482d884aa9119a525721c7f33d4658c7b6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jre-11.0.14-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.9_linux-x64_bin.tar.gz", + "checksum": "c2786cd6559e0dc80e8daadfd9d1ad8428ca35691fe83baf229b93baf78f3b8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jre-11.0.14-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jre-11.0.14-ea.9_osx-x64_bin.dmg", + "checksum": "5d2328b8aab2f33a6488991bb7f08e7f33052c0fbb692ec75cd81bf8f9d3f8d9" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.9_osx-x64_bin.tar.gz", + "checksum": "32a04fe44a01ed81f1d45bff7b6442134274776d1b4c0f39173d7b38c4273083", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jre-11.0.14-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jre-11.0.14-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.9_windows-x64_bin.zip", + "checksum": "ee131848d414fba6226a82b93ba4e5929dd713c9cd9ddf407cf7486124d4f33a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B9/sapmachine-jre-11.0.14-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "50dae8f456377d386bb4251a7cfdd12d791c55d7fcae15460d9d01f51a0193ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jdk-11.0.14-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "8b9fd31231d83d3711ab73c081bd65ef47dc062ca161de21f2e5c7f688a1d29c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jdk-11.0.14-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.8_linux-x64_bin.tar.gz", + "checksum": "17a998a9ce8d93601d846b5851ae56778d9db9bc09929edafd3a7c8ae516b5fd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jdk-11.0.14-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jdk-11.0.14-ea.8_osx-x64_bin.dmg", + "checksum": "352bf17851bc5fcc5dfb107c94a1064fe34d66d0b15c39707e4527ace2edad7d" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.8_osx-x64_bin.tar.gz", + "checksum": "58a676f96049fc62661bc46f66f197a08b7329f4df0c57dcf3efa96e6ae103ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jdk-11.0.14-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jdk-11.0.14-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.8_windows-x64_bin.zip", + "checksum": "1d65b5dccffff5624bb2bb4104ab7037e9c95e06eef6b8c75539c1d7d4b77365", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jdk-11.0.14-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "85328bede04f1cb22d66e4dc4b3cd5f68b69f705bdffe427d0f39ce9dd70d868", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jre-11.0.14-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "d93d97b6e0c5f2b8380d164594a16b6dd97758d301acb8bad9ee77ff76ab3a9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jre-11.0.14-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.8_linux-x64_bin.tar.gz", + "checksum": "fbcbfdc941fff8e264019349a63d2afdd2e257100a3e279d569816dd17d43047", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jre-11.0.14-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jre-11.0.14-ea.8_osx-x64_bin.dmg", + "checksum": "19b41388e813e60f59b31cffcc58a8d1d27fccb472544a6baf98c089b8505a2e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.8_osx-x64_bin.tar.gz", + "checksum": "41c7f4ffca4c9e41841de292721dfd27ee98fb6ec4b7092baf131bd613c9efba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jre-11.0.14-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jre-11.0.14-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.8_windows-x64_bin.zip", + "checksum": "45110bd1799473435eb874c11f565aa94700a5146c8cb0368b0a484fff8b2217", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B8/sapmachine-jre-11.0.14-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "fcbed943cdc7eb5f8fe405ea025d33920327f5ca42cac074b4e0bafe6bc4eea2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jdk-11.0.14-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "58b295a73a4d18688925998850cf1ca8f7f8a46c0831f1e4b3a8ce3ace91291d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jdk-11.0.14-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.7_linux-x64_bin.tar.gz", + "checksum": "c203c7d50b28a4a79f779f35571e9de54424a95b4d16bc777eeb719a998ef2b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jdk-11.0.14-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jdk-11.0.14-ea.7_osx-x64_bin.dmg", + "checksum": "252c643b2f6596d7a66697bf237310135350b64516874d4c187f7b8bbd885fba" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.7_osx-x64_bin.tar.gz", + "checksum": "5c8b918b19e8cd0365ea49a23127bec7d6cef48742acee475af9662337ad867b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jdk-11.0.14-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jdk-11.0.14-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.7_windows-x64_bin.zip", + "checksum": "66db69d2b6f72a75398be9894d4821fefab60c1607d5ea2764ffcd06cc8bc865", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jdk-11.0.14-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "67ede7b4801ef360f6914797400c32a25253ed31fd0c8db9251104cdb61c0fa5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jre-11.0.14-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "317357d1c7e5cc256d13832fcf1f17b95448b86687d2b0a120ebc9629c017d90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jre-11.0.14-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.7_linux-x64_bin.tar.gz", + "checksum": "26554626c66649ea07c033b2757e72e834b6b9fe989f593f2ee31cf71007be67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jre-11.0.14-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jre-11.0.14-ea.7_osx-x64_bin.dmg", + "checksum": "7e10951a06917cd4adcd7859252905567a482c6253e46022eb90099b92d4f780" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.7_osx-x64_bin.tar.gz", + "checksum": "86e702fe5d40760a60f3e056a13a91e16cacb3d33ef84e9dd1f94cf612bbb1f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jre-11.0.14-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jre-11.0.14-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.7_windows-x64_bin.zip", + "checksum": "82a2d1d709cf5c28e0e5ddbe7f9b365106db20dfbed21b1773707c0a7541d3bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B7/sapmachine-jre-11.0.14-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "f05b2fc477a47ada0b5e88f288adcfd8c000dfc1209bb8109fe021e1c6876f17", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jdk-11.0.14-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "074d35d0b890999a060564fa318c3d593536b49ac0fd051c4c6a02bfb3eaf5d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jdk-11.0.14-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.6_linux-x64_bin.tar.gz", + "checksum": "a195b105c8e444d68804190228468ab45b3c29d6417463eb443fac2de9f6161d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jdk-11.0.14-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jdk-11.0.14-ea.6_osx-x64_bin.dmg", + "checksum": "e92953d4aca02435f8c94b2df24858e6049140737b5ded00ecd154a8bd671fdc" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.6_osx-x64_bin.tar.gz", + "checksum": "cb5196d54f7f686f8d897c6d95944bf76ebc647708d44941a4f0b3718f1ad288", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jdk-11.0.14-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jdk-11.0.14-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.6_windows-x64_bin.zip", + "checksum": "632eeee5cf55868747576c9626e5ca46a0ae3fc0a75311276a09fb70f403aa5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jdk-11.0.14-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "dd228b652cf9897af5859f13e38af7df7d00a81b0d8e6f08e61a241307723bb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jre-11.0.14-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "8801219d0d06ade5e35f739571c61cf0ea3b1439b87e409ab5feaddb91ade18c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jre-11.0.14-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.6_linux-x64_bin.tar.gz", + "checksum": "5604157521e1bd29278467a31554ae65087268547947c12194a300f712930f33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jre-11.0.14-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jre-11.0.14-ea.6_osx-x64_bin.dmg", + "checksum": "b63ed278d0890040bf87bc13a19243fe9cf430ceae1d8a40a463f0262a808ed4" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.6_osx-x64_bin.tar.gz", + "checksum": "2267c307812804005f943a4e8b182eeb95d4478fcc87a14fd9251cc2d075bba4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jre-11.0.14-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jre-11.0.14-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.6_windows-x64_bin.zip", + "checksum": "bb1c3cfff5571eff05ceb557f358e58ea1ecfb6fab27e1c9f5a22ee0d394597a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B6/sapmachine-jre-11.0.14-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "610100ecb883a06d55a0f2dbf66eb87062da9490b288a73fab5ad49b837f8596", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jdk-11.0.14-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "e73a9672bbced87a9280bb6455b2d26ac2c3decc09c45db5d5a6c45b6701fc7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jdk-11.0.14-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.5_linux-x64_bin.tar.gz", + "checksum": "8fb32068f6b917fcb946c294fde9a8b1cefb6eff88942cbdef10346ddd40bdd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jdk-11.0.14-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jdk-11.0.14-ea.5_osx-x64_bin.dmg", + "checksum": "c7717e3ac2e3220a894c81eb2a6086cfa23a23b013eb1edfb993cece7f023c7b" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.5_osx-x64_bin.tar.gz", + "checksum": "03e305f09f7c45b380ef66e4278d8aae9a218e9d32807f86b9e4885efc00f85c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jdk-11.0.14-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jdk-11.0.14-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.5_windows-x64_bin.zip", + "checksum": "b83a12254d04658ffde986667dad76bb189a018c024aa8a9a9372596383195e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jdk-11.0.14-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "98ab7ecdf7c6b149b66765a66cce423f0b91ab8892dcb9f73c9779fc3d27bb72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jre-11.0.14-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "80de73e4365a89ea3e4dbf791876a6e6f9353571b86cb686d0b7643564f91352", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jre-11.0.14-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.5_linux-x64_bin.tar.gz", + "checksum": "7252218fdb379b49159fc7bdf09f395c61e50e9db2eae8a1a812eecb30b96242", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jre-11.0.14-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jre-11.0.14-ea.5_osx-x64_bin.dmg", + "checksum": "19c8af01b7d5e15e6a93767fc769cbe017e60d870f04e864cbdc23e6534f2396" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.5_osx-x64_bin.tar.gz", + "checksum": "b49620dd93c60fe6664474390a3eaee5ff2244d66f7b6492014a2b56f9573aa1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jre-11.0.14-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jre-11.0.14-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.5_windows-x64_bin.zip", + "checksum": "9c347c01170750d6e2f9b1f9366dad6591f25a9ef9f9515536703d7262fbb466", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B5/sapmachine-jre-11.0.14-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "fe94117b8617b9b298ac0c4ab12036b4c20dc6d802da9483839999369aa1b75f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jdk-11.0.14-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "f15741ba02cee3b3a904e42d844afea917756883497805c0413e53bed2c6e203", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jdk-11.0.14-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.4_linux-x64_bin.tar.gz", + "checksum": "632bb0afe4e92a353717e6a502368df132bbf02ae9abfdd292bb220637c1ebf9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jdk-11.0.14-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jdk-11.0.14-ea.4_osx-x64_bin.dmg", + "checksum": "d39a372200bb24e8cc9dd64b4490a1d046dccfc1895e698ecb478c7f9bccbda1" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.4_osx-x64_bin.tar.gz", + "checksum": "20e5da9e727349d6c4436fabf5b0279370a04e11d01131cf91d41c01ef966ad6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jdk-11.0.14-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jdk-11.0.14-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.4_windows-x64_bin.zip", + "checksum": "01a97847767f5a1d908d647e6bb325af8e47e0ed4ed1a3ff9935584437e33350", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jdk-11.0.14-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "df4d40aff0de39eb7fd85807e959e66e3ad9c871bfa5a30ba17c3000ece1695e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jre-11.0.14-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "a5d260fa8e8d1820ae53a2f40fc84d39ac892697903b43bac1f8dc70ebe5a421", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jre-11.0.14-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.4_linux-x64_bin.tar.gz", + "checksum": "1853635618d778cdd7ce730e17bc8a21c1311d3c30e525dc3fdc02cdc92827f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jre-11.0.14-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jre-11.0.14-ea.4_osx-x64_bin.dmg", + "checksum": "cb003a9f9032d8ecaa9e054baec5b1276961623c44b32598d5a6e0c6a9f0a093" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.4_osx-x64_bin.tar.gz", + "checksum": "5c25cd4359b9026a5f202c67cd718b950529bdf3d85286ee96373c6be6db7e29", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jre-11.0.14-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jre-11.0.14-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.4_windows-x64_bin.zip", + "checksum": "41afe3cf08695db9cb9bf0f8f72a8548aa8a463d9a7cede0a7d9e83405a87640", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B4/sapmachine-jre-11.0.14-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "c8493233893dd5b8b103142ef5bacf82cf4fbd86ee5942c2c427070277ca8c28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jdk-11.0.14-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "a3c512a4ed5857d0bf40a827562a71a76b156d3c49f2259b0f737c72e5970c4f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jdk-11.0.14-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.3_linux-x64_bin.tar.gz", + "checksum": "f0713c68003754d22038e537424f3b92fea3ebbd09c75d21d185d1bfcb5c6770", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jdk-11.0.14-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jdk-11.0.14-ea.3_osx-x64_bin.dmg", + "checksum": "bf918315d7d74e26c1d416572bc4889288529c89b9e5db19b5f2b5cdfb62edc1" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.3_osx-x64_bin.tar.gz", + "checksum": "5d472b541f474906fb70319d0a3d32da619317933ae70fcebcf5a5d714b74d88", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jdk-11.0.14-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jdk-11.0.14-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.3_windows-x64_bin.zip", + "checksum": "4d9af5bcde8e04c60a204a2a6797e781692d47de4f101cff39bc4a79984cd674", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jdk-11.0.14-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "07a3a8671bdc1d529bd27d49a84998c7b7a917c822d03dfcf75e53d1f09c4549", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jre-11.0.14-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "32a687af811117e646e98ffb251027b88ba9e97e5ea96b33e1d8899b47f1d732", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jre-11.0.14-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.3_linux-x64_bin.tar.gz", + "checksum": "0f5c81e8c08417c63b9abcad284df4f19db364512a4f631f9a913c9acdd79eca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jre-11.0.14-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jre-11.0.14-ea.3_osx-x64_bin.dmg", + "checksum": "0ee697e242bb99d6cca87e3e44bfa2424c2e6cac8849f1752f040d2bd07733ba" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.3_osx-x64_bin.tar.gz", + "checksum": "028562bf6c20c00004ef2cf35dedf70f79bc70d1c3b5be4c2b5d3e2f994de384", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jre-11.0.14-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jre-11.0.14-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.3_windows-x64_bin.zip", + "checksum": "75224541a90825bb1a0fc2693d1b4b233b4332f99203a0bcea36548b82f25014", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B3/sapmachine-jre-11.0.14-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "f508329f0d1736bc2dd1d84aa026f400ee9d13bfd5f183eb1e8c3eb3811dc0af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jdk-11.0.14-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "6a08d2afd8597c2b9614db3366067f935fc95adc927e43a91368773f465087d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jdk-11.0.14-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.2_linux-x64_bin.tar.gz", + "checksum": "a846f181fa0e027cd894f7ba08e1f394be10aeac5170d3c90290031287b72ab4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jdk-11.0.14-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jdk-11.0.14-ea.2_osx-x64_bin.dmg", + "checksum": "e7092b0623b7e279e074a94123f9a72cec63935576875566f70a1c731d8c473d" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.2_osx-x64_bin.tar.gz", + "checksum": "77e40371b5dd18b883ff4fc8db626f58eb94ac82cc5c9dcf438ace6b11009454", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jdk-11.0.14-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jdk-11.0.14-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.2_windows-x64_bin.zip", + "checksum": "e11385bc651c1208299d59aae777f57fff093de4104e85a985b701173dbbe030", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jdk-11.0.14-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "e120fc176caac9ce6f9f6f555297b67d4e50971f774c7dbe5e8f97628dfca42e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jre-11.0.14-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "6dd2c80638c5a571f4d6cb00c38e552853e11e2eb2f18d92f0d511774513f377", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jre-11.0.14-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.2_linux-x64_bin.tar.gz", + "checksum": "5d086e32d99282bed7002cce908e4e47f732babd63a7095902d8b93c2b77ef12", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jre-11.0.14-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jre-11.0.14-ea.2_osx-x64_bin.dmg", + "checksum": "b0ae8684e9f36ce23d3fa4880426d39477508e4f730cf8c4091d2304ca20d83a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.2_osx-x64_bin.tar.gz", + "checksum": "db312b5a24c5538c4cb65cc91c7a6b55628a46b9ab123b050d491b41da505b42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jre-11.0.14-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jre-11.0.14-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.2_windows-x64_bin.zip", + "checksum": "1177426b7a1738535d0a0b7048fcd432c6ad07118886681ddf087c75be25f49e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B2/sapmachine-jre-11.0.14-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.14+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.14%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "8530e38afa062841e2c9bdd86d7e0ee0b32be38da59fcb0d53617b86b039a125", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jdk-11.0.14-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "4810fc5f4c04ef236da147e4c2c617cd116964b7f124758a6536b4e990a18528", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jdk-11.0.14-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.1_linux-x64_bin.tar.gz", + "checksum": "2c0aad14a0c864710c18fa8721d182f82fd11b00ace02be6caf3330554efc359", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jdk-11.0.14-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.14-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jdk-11.0.14-ea.1_osx-x64_bin.dmg", + "checksum": "c477cf420f981a904253ab16c325566e4f7a1b789d13902c888dfa1e3bc0149c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.14-ea.1_osx-x64_bin.tar.gz", + "checksum": "f094898140f1ebcd3f93144c55db1da91c76f91264b03cb1c9f0ad69495fa7f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jdk-11.0.14-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.14-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jdk-11.0.14-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.14-ea.1_windows-x64_bin.zip", + "checksum": "04d787093372ab0ae0120ca22ea5e681d4ea7172a176a594efbcec6f2544de5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jdk-11.0.14-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "9b86a0ee97145b8bad969135bc85183e98a5384a418d1007347804fffec10f6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jre-11.0.14-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "bde7cb67e31c81e525bba804dc65c04c8d7405553ff70bd2d0cf92a32e971c81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jre-11.0.14-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.1_linux-x64_bin.tar.gz", + "checksum": "14e6cbae3cffe33fb5adcb35943971b2e5b93683f4e9b0227cf9a67589f68bd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jre-11.0.14-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.14-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jre-11.0.14-ea.1_osx-x64_bin.dmg", + "checksum": "b17a0644bc2867733bfa60ea6618f8eaca73dcde149aecf54890f2a45f0b35eb" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.14-ea.1_osx-x64_bin.tar.gz", + "checksum": "3e6f165ae2d40b9379d2f5b5292715381b0a835516d68caa56cab16249255677", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jre-11.0.14-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.14-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jre-11.0.14-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.14-ea.1_windows-x64_bin.zip", + "checksum": "638de1b76a19828f65e7afa8e1d53e53cdcdc2e82d36012c6efd370cf9a4c108", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.14%2B1/sapmachine-jre-11.0.14-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.13": { + "sapmachine-11.0.13": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-beta_linux-aarch64_bin.tar.gz", + "checksum": "17c3a972ea6a4f1c090303eb666a2e3a43c1eb6a4b74a1589ae2a4e17ccfd118", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jdk-11.0.13-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13_linux-ppc64le_bin.tar.gz", + "checksum": "54ae6157017c75addf6ebb1006aeac7c72c0ced54d34b2b93e22576b41f31a41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jdk-11.0.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13_linux-x64_bin.tar.gz", + "checksum": "91bdf89bd23a6593343f89c98d5fd3d3942dd85f7d0927aaf2e4e32ec6e863d2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jdk-11.0.13_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jdk-11.0.13_osx-x64_bin.dmg", + "checksum": "28d09578cd76022950b873c38a3a0cd7e1fd243b044c106e3a9ccca2405518df" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13_osx-x64_bin.tar.gz", + "checksum": "0fd703bbb510d75b5a120ad359e05a5c4c7b495c20b30b457b197329629f6757", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jdk-11.0.13_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jdk-11.0.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13_windows-x64_bin.zip", + "checksum": "605aa78ba9c9aabcf303bf3efeaae3261c458ca17d3613591c4502fb4cb50aa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jdk-11.0.13_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-beta_linux-aarch64_bin.tar.gz", + "checksum": "1c6a359de61065922d610bbe5e9d7ba2039f35c27d59c20e2237b0631ba45988", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jre-11.0.13-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13_linux-ppc64le_bin.tar.gz", + "checksum": "d5ce52127362f2a913b2eac1e152c37640064ae487fe49ff3527d07e16b84e31", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jre-11.0.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13_linux-x64_bin.tar.gz", + "checksum": "9b84ffe35df6063d94b9e6af0ad3d89928544ada4ad7e2312183f903f419ebff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jre-11.0.13_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jre-11.0.13_osx-x64_bin.dmg", + "checksum": "807e0d5f12a9e8bbbc4c87d732b9afd89a5ff41011b2df99ef6ab4a711dcbab3" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13_osx-x64_bin.tar.gz", + "checksum": "de531a098804363cbbf98ffe0121acf65e3c3c91a5698c8c2e31bce1f30f1d2d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jre-11.0.13_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jre-11.0.13_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13_windows-x64_bin.zip", + "checksum": "414a1b99e894b85b2acee1e8eb6e549ee8cf271b923b24c095b3a6b77cead1c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13/sapmachine-jre-11.0.13_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "93b40cdb830e759d9f8902afb7a71e377f24e4bc3711f697a27cf44b7dd582c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jdk-11.0.13-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "9f557ae2454120a030c87ecc31caff125763252547c48ef3175c8247a57c779f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jdk-11.0.13-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.8_linux-x64_bin.tar.gz", + "checksum": "be0002635c8522b3b92ee3bd2d0169b2e287fbeb27b99b917c47c97f6954bc21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jdk-11.0.13-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jdk-11.0.13-ea.8_osx-x64_bin.dmg", + "checksum": "abb59948666ddb8f9d264103da4a37c91d444e84431c7392fab0412c378d3a7d" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.8_osx-x64_bin.tar.gz", + "checksum": "8e6d121af917822fc101767219c0473c059222743e841346a95a5240c73f60cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jdk-11.0.13-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jdk-11.0.13-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.8_windows-x64_bin.zip", + "checksum": "7ffe0609a1fb4cb575a05dc079718bdca16712e2f0cf825a199c2971caa52b72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jdk-11.0.13-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "ba1072fd043a7780b62b02dfb61455b21b744601957a1868d4d0faffc32b892b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jre-11.0.13-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "ef055754f0428cc59a041b55a9fd7781f41ebb1490e1fabb733bcf52eb818f77", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jre-11.0.13-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.8_linux-x64_bin.tar.gz", + "checksum": "600c62199f774320c427402ad44cbc03fc19e362db947d4e41d6db703bcb84d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jre-11.0.13-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jre-11.0.13-ea.8_osx-x64_bin.dmg", + "checksum": "27405afd031123e6a9600481d37cb54ff0e2835b88ac9810ed550ccfe5ed3e1b" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.8_osx-x64_bin.tar.gz", + "checksum": "24144198b832dfa333398a081fb8b7de2894e984581a3e79ca17516e6bc6b7f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jre-11.0.13-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jre-11.0.13-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.8_windows-x64_bin.zip", + "checksum": "8023349ae78ecb739dafcfc90bb186de112bc3b6c6ecf81184c69c8ce608ab81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B8/sapmachine-jre-11.0.13-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "f0e55f35de60dfeb469c38afa083e45cf2bbf338fc0a69c677aba16aa55279ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jdk-11.0.13-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "df298c628806340af8cb86f1b8652f88b72b6bfbb1e8b61559418895f51874dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jdk-11.0.13-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.7_linux-x64_bin.tar.gz", + "checksum": "dfabf2b396696cba128004f38d32100352885f7613f2a693a9e5b83cea5de5b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jdk-11.0.13-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jdk-11.0.13-ea.7_osx-x64_bin.dmg", + "checksum": "eedc3df8c4d95e9cf5ca1b1a82f925ea3cf60d7a71dbee5f656146d978d7d5fe" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.7_osx-x64_bin.tar.gz", + "checksum": "735eb4f9b8636384240d00d81987447bfaa02ec07ad204cf706e0d69453e32b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jdk-11.0.13-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jdk-11.0.13-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.7_windows-x64_bin.zip", + "checksum": "a8d1734bddf2eee547f9cd74893188bdb1c19f1ce25c964e2bae53a3d72b7f42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jdk-11.0.13-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "b64dfca5f5d81287830aac5b89be0daacef23397c0b97c50f21bf6636d55f45f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jre-11.0.13-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "7d517b5fa1549df770cb7aa1fe38ab1d72020011259e1ba31f1c0834d8b48aca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jre-11.0.13-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.7_linux-x64_bin.tar.gz", + "checksum": "879c4cb49c96d9c8f47a6b998409efdcdba89319cf789a266207f8a0017db198", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jre-11.0.13-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jre-11.0.13-ea.7_osx-x64_bin.dmg", + "checksum": "5b4e50f62118600c82c15d7dd729fe14ff9544de347695594bc76a8040a877b5" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.7_osx-x64_bin.tar.gz", + "checksum": "1d61a77dcb56b8e6ddcb0f87f8c3ad48b2726e2eea50b4f51ad4038ab95f14b1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jre-11.0.13-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jre-11.0.13-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.7_windows-x64_bin.zip", + "checksum": "35693b8c7f381fd5a178b868958f18afd4d841fed7dec136d2a717bedab14019", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B7/sapmachine-jre-11.0.13-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "793bdb5c8316cb27620d82b8b4dc5d260b481a0cf343320eae9b5d30235e0276", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jdk-11.0.13-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "2c12562b26994e16c682e5c350521414d603779b5d1f5124b07208fc8daaeec4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jdk-11.0.13-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.6_linux-x64_bin.tar.gz", + "checksum": "67fa88f8ecbd31da6490c4d06d4b767ec1f045e7f0a307698ff99d996f421914", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jdk-11.0.13-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jdk-11.0.13-ea.6_osx-x64_bin.dmg", + "checksum": "d2ffeb28104f77fb820475a0827b6070beb2e3090082a1e7bb1b3c9cc52bc0b5" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.6_osx-x64_bin.tar.gz", + "checksum": "06ca71be88d6ca907e94c12a80805f9e6334cf3241a5e691e0c532e76487b62f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jdk-11.0.13-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jdk-11.0.13-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.6_windows-x64_bin.zip", + "checksum": "4e15021e521168161027742d532f59c575d00304c66502b5c15c890447334dca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jdk-11.0.13-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "ee9da1caa121c472f3e280107a58af10c4ffd7bd5f3080820d5a2c0c71634d34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jre-11.0.13-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "a06d931f1638e58a4c5f44f5884828622911d97ed22595a634a97c84aae03d5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jre-11.0.13-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.6_linux-x64_bin.tar.gz", + "checksum": "7620d1fa7955c16ad4aa321c475eacf793a9c902326382d0b1c945dfd3b4a8b3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jre-11.0.13-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jre-11.0.13-ea.6_osx-x64_bin.dmg", + "checksum": "ac86d2b583c356948d0085382b6f981a27a039852929ee412a96f001f6203066" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.6_osx-x64_bin.tar.gz", + "checksum": "b10f741bc4cc5354ae68023a7800cbd061b1facde100391a3617661838b14b76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jre-11.0.13-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jre-11.0.13-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.6_windows-x64_bin.zip", + "checksum": "2e88ae0ce0f4bb4624811db229b7a1fae4827ef49d9bbe250211db190d669951", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B6/sapmachine-jre-11.0.13-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "61cb20deb6a9dad4ce2763b1bd8c4c6b89707bf99ae699200ea51e87cdceb080", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jdk-11.0.13-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "57ae23563cf5c8118897e4bbb8b63bcf3e3a319802417e5b257af9e580f64dca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jdk-11.0.13-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.5_linux-x64_bin.tar.gz", + "checksum": "43a09da63232f7d646e069fd716779752149738123de3bbe773d1729d57f4739", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jdk-11.0.13-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jdk-11.0.13-ea.5_osx-x64_bin.dmg", + "checksum": "a8a0d24a76ec428eb92ac5cee1ee651481dde9249440e45a59fc7fe13807e216" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.5_osx-x64_bin.tar.gz", + "checksum": "451aa3a3a80ff99989692133293443bb891304cf5ae5d5ee0d163b224d6b7ea4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jdk-11.0.13-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jdk-11.0.13-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.5_windows-x64_bin.zip", + "checksum": "9e941eb4df4b976a3d5196df4a6ed5b4fa6bd5a54bd53992b270f45a470d91ba", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jdk-11.0.13-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "6956a35440afc533965e376bbf808b59e5876e9e03f74c959a1068a772184859", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jre-11.0.13-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "ddad5b107575b14e1a730ed321351728a450988f69d2aade598e781ddd9a6fb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jre-11.0.13-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.5_linux-x64_bin.tar.gz", + "checksum": "38c52e651ab34bdcebccaa2e6a77a8d0c8b1b709e5789a840749371ad78e98dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jre-11.0.13-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jre-11.0.13-ea.5_osx-x64_bin.dmg", + "checksum": "431d1e12ad40e4e7b10f56697d704de56356e19f1c2f3a732aa7f9a7baa9180b" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.5_osx-x64_bin.tar.gz", + "checksum": "d9b7b87c3a8c696651e66476e63867185f50d0e195c4c0acf744f5ccf77f9d67", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jre-11.0.13-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jre-11.0.13-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.5_windows-x64_bin.zip", + "checksum": "27b277edf0e83cb54f83cc35c5e38e2ea60c081e51d8500df616419c342ac6ef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B5/sapmachine-jre-11.0.13-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "f795460d55e7550fa19a1a0018194152dc3fa9bf7167643ad77866b32546e2c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jdk-11.0.13-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "79d1b619beaa9d6d61a6a4e9fb64cada132515e16f52e927ea9bc3a511eee863", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jdk-11.0.13-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.4_linux-x64_bin.tar.gz", + "checksum": "a127c22d67d910656a11fb57c4676c5aaea711424276adb62070bba956407e11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jdk-11.0.13-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jdk-11.0.13-ea.4_osx-x64_bin.dmg", + "checksum": "4e29c662a125168e54b35794fbc74329057d267602ba65d448ab281b3f865f37" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.4_osx-x64_bin.tar.gz", + "checksum": "3d0019bd76143c38be4932d38fe151f100c5b56b50f6c818f5bf9d761c7970eb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jdk-11.0.13-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jdk-11.0.13-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.4_windows-x64_bin.zip", + "checksum": "398a16d2e60bd3a27ad7b3371a20a2ccf7efd61da1c02e2eed4c293cc638c382", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jdk-11.0.13-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "37256372dd5171bf436b90b4163517b7a37f13415317eab4ce5dbfb543be7c6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jre-11.0.13-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "e602abd6511b050ad504181ae815326e591c368d7413178f2ce24f98937240a8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jre-11.0.13-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.4_linux-x64_bin.tar.gz", + "checksum": "f96a014a360b4d4870e80c1adf7ede0688921c9aee99036bfedd3c84875b54c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jre-11.0.13-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jre-11.0.13-ea.4_osx-x64_bin.dmg", + "checksum": "a70338d882109c55f7ad3dccd609c7dee86dfd439f6dec1aace81d192fff5623" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.4_osx-x64_bin.tar.gz", + "checksum": "e038b1a16de988c9fe46306195904795757963cd8277ce3170b432a294ae0dc6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jre-11.0.13-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jre-11.0.13-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.4_windows-x64_bin.zip", + "checksum": "77d7dc1ffbbedb0cf915953cc48865e735e066fc6af60e1dc535d61db75ccd16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B4/sapmachine-jre-11.0.13-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "41fe52fe4ce5d177473f23994a741cd08a4b47efe4a8415830b940ed6325f6e0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jdk-11.0.13-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "83f2a96e7e00e7354cd464f81935973beb55a4405734c5e88b77d8226dd9b746", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jdk-11.0.13-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.3_linux-x64_bin.tar.gz", + "checksum": "27af58d4b7394189232c4929a6b34c22a2db58d50285f56834c0e1d6921f21ab", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jdk-11.0.13-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jdk-11.0.13-ea.3_osx-x64_bin.dmg", + "checksum": "50895e44aef0e07e90c1aa8bac1e6590e993a522f641429eb51825feb5a8fdc5" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.3_osx-x64_bin.tar.gz", + "checksum": "7a5ce5def3bfcb9bddcc68c6e0f1c6b3b7740cd128ec559d3c85f87607ecd4b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jdk-11.0.13-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jdk-11.0.13-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.3_windows-x64_bin.zip", + "checksum": "c75cf7d6f1a23f21e207c02afa2c321d7ee28f9d5ffb5fefcf69db69976b336d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jdk-11.0.13-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "769b91cc58a15232316897d2e59b92fbdfb204830502b54b2acc22b834871ab9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jre-11.0.13-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "be8966b2cbc83c69e50009867501f9d58ca9488487e6fe84e7b870e8332dc595", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jre-11.0.13-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.3_linux-x64_bin.tar.gz", + "checksum": "0180436a8114bc9d89d5ad5c4dd42d2a34b3e5788605f91a547a74cb94992571", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jre-11.0.13-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jre-11.0.13-ea.3_osx-x64_bin.dmg", + "checksum": "42ba82649453202ddb8503229df5d61457371a779df4be5b23294be235911366" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.3_osx-x64_bin.tar.gz", + "checksum": "05d36f5d9b69b976dcf597ee227c70ddaee6b080910d832955c52167758f141f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jre-11.0.13-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jre-11.0.13-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.3_windows-x64_bin.zip", + "checksum": "ceea13f0e66b9690e41dfbb365c0dcf26438022b4b2408d4945ae0dbeee0b7c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B3/sapmachine-jre-11.0.13-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "a93e4cb9667ba2946f72550921cd19f37b3adac4d6711022c4f9326fe2e8527f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jdk-11.0.13-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "29a35a23657083ee8b1894ecd613253b796a3cebdd009ef15b728f93082e31e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jdk-11.0.13-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.2_linux-x64_bin.tar.gz", + "checksum": "04bcb70310c1cb139146769404cd3336cbd283f2908320dcfad045a51f3a9337", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jdk-11.0.13-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jdk-11.0.13-ea.2_osx-x64_bin.dmg", + "checksum": "b2f0b5d07bf2078c8165074e9163b16ec53df001eac669adb22205a281b5af6f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.2_osx-x64_bin.tar.gz", + "checksum": "9600e00b6587e904da6c7eab029af8a2667da0b44fa82569a14af4b7ba782e33", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jdk-11.0.13-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jdk-11.0.13-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.2_windows-x64_bin.zip", + "checksum": "c71a21ad119931c8b0110bd604656f440568acd955f95bd071cf434a9d675171", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jdk-11.0.13-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "1f8efdd626071ffe2870bd02283ae8ff81c8665f4c3ab53b32cee15918613235", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jre-11.0.13-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "cba55040c92ce4ae5185c89d4de73ef497a2fc92e02e3fc57ed5bdb495639a30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jre-11.0.13-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.2_linux-x64_bin.tar.gz", + "checksum": "cbac0fdd10e72b9d2bc32fc7e20dd88931d6c6d9cdbeb031de19a7f2e2b332d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jre-11.0.13-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jre-11.0.13-ea.2_osx-x64_bin.dmg", + "checksum": "1899c2fa6b4a2870713ba4ddd6f2e613d38fec5e825746f49184757427e968eb" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.2_osx-x64_bin.tar.gz", + "checksum": "78c2fd8f25ce070e9fd270a023857b7ae0846d6970718d5e245d32387ad03bda", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jre-11.0.13-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jre-11.0.13-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.2_windows-x64_bin.zip", + "checksum": "c93c649ea661076e5ac7bb92f47d1678ce099c5c92d88383e5998f501c594804", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B2/sapmachine-jre-11.0.13-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.13+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.13%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "38aebf4a65f36d9b6f99d7582cb49209faaf8c04a89b028bb123a18b22d9cc13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jdk-11.0.13-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "9d1c929847b1b211fe06c84a07691e6a86d55a2186ddff851b6a631baac54b0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jdk-11.0.13-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.1_linux-x64_bin.tar.gz", + "checksum": "70c43bd76716cdfb29aae3d463b4b7889096a21e53ec2854c7aaddb038a8016b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jdk-11.0.13-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.13-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jdk-11.0.13-ea.1_osx-x64_bin.dmg", + "checksum": "a3f996df6c27838c5dedfd4759bfdae675195c300acc336aa662b53328f987cd" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.13-ea.1_osx-x64_bin.tar.gz", + "checksum": "5290f4b3a1890618631518427c2b1e8b28f7c9c9940c6b249981007cc3af53da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jdk-11.0.13-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.13-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jdk-11.0.13-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.13-ea.1_windows-x64_bin.zip", + "checksum": "5ead79c039c5de289ae058f061546bd93d56f438f18e587d85e5466ffdd568d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jdk-11.0.13-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "a1e0ff181128260d2dace3bfd4860ffe211b9a8d4abf74bca40bb3b32923c363", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jre-11.0.13-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "dee859251cf0f030ba1e7c8d02fc2e5fcb302d110d75de8a0b4ca3be0383445a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jre-11.0.13-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.1_linux-x64_bin.tar.gz", + "checksum": "ed3d7e90cedf496354c3a4e4ffe6608a84ed1428452e8574c47e4b82384a415b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jre-11.0.13-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.13-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jre-11.0.13-ea.1_osx-x64_bin.dmg", + "checksum": "b5501b5392f7e68604254ea894af3b4d1fbbf0a7458d13a642fb1db3a81ceb44" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.13-ea.1_osx-x64_bin.tar.gz", + "checksum": "b17002b9af4e1753dd4881ddaa2b326aaf0a24508f2b5771dc3ca8ae99a4e275", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jre-11.0.13-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.13-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jre-11.0.13-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.13-ea.1_windows-x64_bin.zip", + "checksum": "8bb89eb245c5a03dd93c1b34cfd637e73b27e41f8ba5c373528c0cf8ff14ce1e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.13%2B1/sapmachine-jre-11.0.13-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.12": { + "sapmachine-11.0.12": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-beta_linux-aarch64_bin.tar.gz", + "checksum": "4405e2cc3dc0661e27a5e39f802f698c4fd7425d51b4c3f4e56dff7949940584", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12_linux-ppc64_bin.tar.gz", + "checksum": "d6163a77a81f1818db5a7127c061e538cd7a601cd83b40565266a5df9bbb7bb4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12_linux-ppc64le_bin.tar.gz", + "checksum": "ea34cb6039b67e65d90cdca0162761d2e73ea4743fd9b6244b2f7eb08aa9d801", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12_linux-x64_bin.tar.gz", + "checksum": "f999dd243d00ee037ade946ed9c6c13217636666f4e433f019b635df6eab8f5c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12_osx-x64_bin.dmg", + "checksum": "ca43ae0b88a984fad84d53a0ad846c775f08410b96fb26dd9d93d77458cf847b" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12_osx-x64_bin.tar.gz", + "checksum": "57389db3ec283650cd98ea2a018be10dfccee489a73f065e97722c422a318f11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12_windows-x64_bin.zip", + "checksum": "344407b8525bf3d7d5a5866dc9c90c151140294d67f32478b1c9f565c0de6d8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jdk-11.0.12_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-beta_linux-aarch64_bin.tar.gz", + "checksum": "fa51e9db8731d2f580b27897ca0af0ef1297341c3c0509e8065922da960265ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12_linux-ppc64_bin.tar.gz", + "checksum": "bdce6111abe29c2664166c803ebfab9a33b90c81c62ca619e93f269c5ddcadbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12_linux-ppc64le_bin.tar.gz", + "checksum": "c2101cc90ceef46b9dbd17a96638901ab733904cec00a5ff3ccefc8e9c699799", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12_linux-x64_bin.tar.gz", + "checksum": "8d79c1881f1e826b2b0b0bf082f0c4cd0086d9be78808a04b9a17bf37af133a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12_osx-x64_bin.dmg", + "checksum": "46b0e474c7c2c27c27295f05b60b3f424b4fab149efe615bb241235579d24263" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12_osx-x64_bin.tar.gz", + "checksum": "be0fd98af0334b3c61bd3807ff705abee7153598c37cfc5fb375f1b84bae2aa5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12_windows-x64_bin.zip", + "checksum": "7ed044cbd9778ed6c9581f387ca7b3392bd343e37055cb5b74072740389a2949", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12/sapmachine-jre-11.0.12_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.12+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "f442eeb4948355dc817e1a6dd02e7806f50bc2e6118df7a389b845b1ec08bf2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "0c2d04ae43d9fee01f126ec19dfde0c777566af3795b528da4478fca7221b61f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "6bdd6161be506096fd4e73e84a896cfe8266fc4af99c19d6f682e761ee3af83b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.7_linux-x64_bin.tar.gz", + "checksum": "42faeabcf91e3775d02d33297618cc89ef8cc36936212563c9c96608d7573b4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-ea.7_osx-x64_bin.dmg", + "checksum": "cadcdd28fbaa5022b4fd89139b8aba0c230631714b4ed48c39c3308415b4613e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.7_osx-x64_bin.tar.gz", + "checksum": "b40ccbf9e4d7245f3db5f42a5c59d4be9b05cc355e7e3e12a19b706554204457", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12-ea.7_windows-x64_bin.zip", + "checksum": "d9fdee6611ee95cf0e43239e1b986cc209239d0a5ffe700ed50fe0b778df3943", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jdk-11.0.12-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "b23b25d4d62ff8eee2577adf9232ad8b907343a1390b5ef02ff802950a8fe935", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "96b4eff41f05aeb51f2924e7b6c345bc3b8302ff42eedb6a076ab483a96dd08e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "75496ee9d6397ec3edfe6e87cb67fe344a5a048ee8b704c3ea64b5a5cdc74f3d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.7_linux-x64_bin.tar.gz", + "checksum": "909407be0909691343d6fbeed4b5dbb98411c19e6867f911a805ddac60396371", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-ea.7_osx-x64_bin.dmg", + "checksum": "d0729519c7cad142728dae97ac5c0bce5904f8a42740b25edd04aa6177e2e2bb" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.7_osx-x64_bin.tar.gz", + "checksum": "8fc917ff4b8445084945570c6228a81738fb1f060eee80640718393cbf6d0938", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12-ea.7_windows-x64_bin.zip", + "checksum": "55c5c90e9459e174f2ec6a749396b6c7c6546e2eb782c3dce5cbd2bb458fba02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B7/sapmachine-jre-11.0.12-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.12+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "eb40eada2edb2213adf6d47f674a9b2031c5b71d8d2d08725ddd2465450b9dfd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "aa783b9786ffe88dd2ea523afc8dd9d6e6eb23f74f1f309af73ef83dc95579ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "0ba677df14fbcb248ac26576c629c16577f7b09eaf80d45240bc949fcb67a537", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.6_linux-x64_bin.tar.gz", + "checksum": "ee163030b57cf4cd86f42a78b9786a95c56563e0a7e3c11f5f721de273af625a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-ea.6_osx-x64_bin.dmg", + "checksum": "c4815c0589653659f91e45c87e07c795f63ad1f30ecb431659a53126fcabdd94" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.6_osx-x64_bin.tar.gz", + "checksum": "e2573736721e0949ed6a0e9359a5265586b02fcda96c53101d62ca3d8ee7d608", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12-ea.6_windows-x64_bin.zip", + "checksum": "baaedacc24d9eb0ea37baf506d9f085ef190e7d8577fd58ab7cd63fdb78ea6b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jdk-11.0.12-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "b4b1c8ec6bcbe7b1482780846149096fa9fc0753d05f3e261e890556644aa35c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "2e26b6737253b9b44d212c992c6e7ceaadf00c8389c4085295ca3e56e435d254", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "dd3edd85eb91a20b8280884111d34b10765913b21724b5affb0d152f0e8f0940", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.6_linux-x64_bin.tar.gz", + "checksum": "091e15b8167782abb803cdb6873ec8160b9089b06863fa98300d5b4679c3a546", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-ea.6_osx-x64_bin.dmg", + "checksum": "ba33f47c5bbeec8f528e21143a3099183029ac3042d77c29c443cdebd8375437" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.6_osx-x64_bin.tar.gz", + "checksum": "277b6a2695c77d6087b560a3e4f39a886d906113289f74e6c141cffdd8e484b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12-ea.6_windows-x64_bin.zip", + "checksum": "ed6e982892736ba93bb1013d9f767f4844e2e1bd0f14d7eedce1c37a25bf2297", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B6/sapmachine-jre-11.0.12-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.12+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "156b0e505fa1ae822407ac574012a8e0458d992d813099357a73c1f59ce5a8b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "1afae1d189f18206616df1472d3193d96d32d2cc00937d4eca7f997f35c4c8ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "e9994b65e6a46cdf5b77981039e1b546320b41e91039c4330acb1c1fa9f71c9b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.5_linux-x64_bin.tar.gz", + "checksum": "429e885da0cdb5b2895a1dbd8b01503d67da39bc1548c8b4840a7771e0ddf45f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-ea.5_osx-x64_bin.dmg", + "checksum": "fca25d78faf2d11df63f5b2098790d7e3c39ddc23534aa004329f69565084e7f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.5_osx-x64_bin.tar.gz", + "checksum": "386d876c411d513dd4ce49702fa9413b7ee88b9395d8a34a4cf4bbc9ab72d4a7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12-ea.5_windows-x64_bin.zip", + "checksum": "ce034f413fd53450f291ba5edd5713652c2818b08fdf6c305a1dec3139344528", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jdk-11.0.12-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "a5e30bb4b421a2b6958a0904c847f97bd2cf3f298904f1f62ce5d501fb2034d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "c23624607c396591616559bd2ffb3318f0325edac6e7e34edfcac38ada8c2851", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "1545745966e843b65899a25bd1fa78f7208114c3f2c48145d44b45b520fe0e87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.5_linux-x64_bin.tar.gz", + "checksum": "8a1aab9724a5d42809feee4424cf41fd994ced7c44cd4dc96824f08fc2ac9963", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-ea.5_osx-x64_bin.dmg", + "checksum": "da1b8e457ef6632dc577b37be72221a7322330d32aa5689660be619482d68b76" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.5_osx-x64_bin.tar.gz", + "checksum": "95c1319990b51d1d4ecac286cec408c2cbb85b6e9b5e7c4777f1bbdaafc0d7ff", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12-ea.5_windows-x64_bin.zip", + "checksum": "a666d45aa199e958ef056062c1b2f7df8fbfadad326482050bde3a2227e61305", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B5/sapmachine-jre-11.0.12-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.12+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "cedbe711027e20ad6924d3a6c9c65fb2c165364f57ed6ed6dd35a265d13985f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "bf7ab7d2758313dec4924e2a7c3fdbdc1931123101e3779c7fd2a4984f2a1894", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "ac2f352e9240c706e3d2c9e3b462270ced29548ff434ff0cc766d0f18adfffca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.4_linux-x64_bin.tar.gz", + "checksum": "2a5a83ef63fd9a07d329f63a30d54d45e0e800cafc04ec2e953ee62f299e771b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-ea.4_osx-x64_bin.dmg", + "checksum": "9ad73a3b33711a32f5cadfcf91cdf351586fcc32cfc86dbe4e8851d476a73de7" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.4_osx-x64_bin.tar.gz", + "checksum": "5ea4c561ef9b9f299091a5e89184610f992126bfd378a58528f64d3371b27b98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12-ea.4_windows-x64_bin.zip", + "checksum": "0ccb42ac3f2bb067deababad0f6af28179208ff9d3da42248dc6bde6e4878140", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jdk-11.0.12-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "ee3e6ba9135ef32e0e9dbaec5470871fa35ffa2c7605827929d3b46b74788bdb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "4567aec4a5283c4cef6e5d65d9ee21cbdf775512ca26a8629aa7072fe81c1c34", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "90a576151b173ffa15fd7a94d0da980e9688d4cb5bdded3a135434757d7d8e49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.4_linux-x64_bin.tar.gz", + "checksum": "12c0e5a365b3de2b45229241788a400ce0f27a6769debd77bd72393fbe387835", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-ea.4_osx-x64_bin.dmg", + "checksum": "bc80ae2b802f6d7b8c6e5eb22adca3825485123e7331de95d7085352473b8006" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.4_osx-x64_bin.tar.gz", + "checksum": "48f0f2f23be0bf0ba0b448baf381f2d1c6d09fdbde877211b11f9f8e8200557e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12-ea.4_windows-x64_bin.zip", + "checksum": "4dda78f932b5c96b8228a27551d2038538da0c431a5ba26be5ec13ee62d7b4e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B4/sapmachine-jre-11.0.12-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.12+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "00e64b64b3fce3b626e2fd5a38e1f623dfad97d389f7aa154abfdc61d80a89fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "b052ed799f8250d2028417817c78d0e9d6925e5e35f642b2c93e6a10078d4c0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2ccc80edfaa06e345160a3a37baed0c047d03d78dadcbfd7e401b3af9753a510", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.3_linux-x64_bin.tar.gz", + "checksum": "90ca253d13f5c29a5ab5059588520a5ba571c7994ebc48e050c498375bd810b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-ea.3_osx-x64_bin.dmg", + "checksum": "9975fa90ddf8e136936ddb1060d90fd81a82ecc7f1640ab5bd297dc38a4dbf8e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.3_osx-x64_bin.tar.gz", + "checksum": "fac8ae66ea3c7acba986982b9177635a59c27d9bcefaeba111e6ab25071fd07d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12-ea.3_windows-x64_bin.zip", + "checksum": "49401a326f8f8e2f28af870d04a3e19f158d537eed3af656e9d08b15e1457cc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jdk-11.0.12-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "40699a0d222a2afe5bc3ef5e814fad06c12e1d1414015124430c71d8b5a63bf9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "095f93f604921ef2ae4fed5be25b3127721136c1fd46f4650b472157854dfc01", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "1c8899c51331ac4801d4b68099b46ff025ec03beae9eb47075a08b1bcb3b5582", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.3_linux-x64_bin.tar.gz", + "checksum": "a055b381df9ccd10d5a161e8437dcc124d5413de8665a0936406ca78d4eb3af5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-ea.3_osx-x64_bin.dmg", + "checksum": "326210409c7e490a7fd2a031aea5749c641ddce3fed148cab48722c781d1f166" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.3_osx-x64_bin.tar.gz", + "checksum": "c85c37a65ff1f48751165e243c68e688cf6e9339b71eec913a95d6d7f99648da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12-ea.3_windows-x64_bin.zip", + "checksum": "dd7c247c32bf1d0dd24e4f1938bb1fe82b88e67f0a50d6c521a3682e0553e66c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B3/sapmachine-jre-11.0.12-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.12+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "924ec2abea629f9d55cea46974bc451c4d87c05aa399357f5e4acb3792144708", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "6ac4be6763d4b03be269ca95fe7482b172cdd14e7b992abd1643e78dc94f3fdf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "0c836ca3ac062c973792fbe9d44e4ba02999ab99d52cf7ce56680091516053e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.2_linux-x64_bin.tar.gz", + "checksum": "6ab7ac7dac9d786ea464919369738bfd39fadb1decfdac5a8ba76a43989259a4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-ea.2_osx-x64_bin.dmg", + "checksum": "944ea9a1c2d568b58d5a0b72110659b68e794ee44a5386d0d7feb4d09fbc5afb" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.2_osx-x64_bin.tar.gz", + "checksum": "09d73f0ec154c198e27cdf86cdf6f7b0ac3dd9189e6ab60dd81c4ccb6c0f51bb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12-ea.2_windows-x64_bin.zip", + "checksum": "7f3584c0fb271b07ce423ad2c251beae4b5c5dcc606b6f474b7e390ae0a08999", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jdk-11.0.12-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "892534b12631b59ad92ece418e3f897ddc380fff00b4cffc65c3a4d9e828033c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "a835b72b26f34ba277c3e49992aed6a04da30e730d19bcd1eaa7e03377620314", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "8719f26fb16f63e3b1dfc47dbd3147b074bf7efc57bbb4bf127272b129f0c6a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.2_linux-x64_bin.tar.gz", + "checksum": "b6efd9a8518d00aa7788f55e0bb3e76199f67339e1989b56415afd130aea7ea1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-ea.2_osx-x64_bin.dmg", + "checksum": "a55ba28d0ae270e2b501b1a195acaf97d958b6dec193be2a286b4d958d12e3f0" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.2_osx-x64_bin.tar.gz", + "checksum": "e82fcb35cdefe428f80927357d3a13d49c7e95400b12f365b1e78dc9a4122df0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12-ea.2_windows-x64_bin.zip", + "checksum": "c962ee678166586e349dda84ae291e996cdaf40d5769798404ee95a267a3341f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B2/sapmachine-jre-11.0.12-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.12+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.12%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "fba580c49e29e7bab89f681ef3c8b31203657cd43560afbb4b15d3efe81ec1d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "c4e0c5db6d0fe69d371f26407fe63c8252e008afd8d7d93ce79d1fd933198221", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "27e05c0ac9a732daf00a1a55202891fe0cb538e24d6687a61897e7e8ae65af30", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.1_linux-x64_bin.tar.gz", + "checksum": "068e9d07b0f376a3ce5c9ad7b6e5fd86e60a509c5fb702e5c531828412d02ab0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.12-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-ea.1_osx-x64_bin.dmg", + "checksum": "f2d5f1dd3e93ae334a825095d94f5a2085cb9156bd4433a5d91772ff3e58cf4f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.12-ea.1_osx-x64_bin.tar.gz", + "checksum": "b86451668f36c3e3ee9572246d2735a95a082c2dc7957a60152aedbc71f27901", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.12-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.12-ea.1_windows-x64_bin.zip", + "checksum": "07fe738dd6727cf0b9a8566f955136556c604f81b898cbf14d329f49ef1c307d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jdk-11.0.12-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "37aa5e6f50a713beb0d98825b2527b52c551f28cc99eacb446e612a2703ce929", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "4a03907749b2548ae01349c4ef30db8ca5d4a37047d2f0ddac4f7f7a36affa9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "fb0547543c8a61b192f1db877de55c45aead893873fbc4ccce53badbef359e81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.1_linux-x64_bin.tar.gz", + "checksum": "940dfc83af08795763ce32d31e22a292ecd47702adf2e816dc626c93eba8b031", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.12-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-ea.1_osx-x64_bin.dmg", + "checksum": "5a4934b17c46ac856326ceecec5c1f7f2885bc13e0410818c79b9a12a65f63ca" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.12-ea.1_osx-x64_bin.tar.gz", + "checksum": "4a1b35e034c23c3d479cb9c6d951d48f6ff7dff17787ba1740160528d7459ea8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.12-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.12-ea.1_windows-x64_bin.zip", + "checksum": "045d135b01aa4c65a52d1f250350cfff4bda642866e07f21dd0b913608b2d2c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.12%2B1/sapmachine-jre-11.0.12-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.11": { + "sapmachine-11.0.11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-beta_linux-aarch64_bin.tar.gz", + "checksum": "3244a4f90cce0fbfdb5b0ddc41288cde2fb6e8e47b7cabf0f20d71ae960e9f44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11_linux-ppc64_bin.tar.gz", + "checksum": "afbd411c51d2c5a93dda288afc87a00c03eade8eec4109b76ccf119dd69e465b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11_linux-ppc64le_bin.tar.gz", + "checksum": "933b7006bf9c0610c678c6d041b7789985287c87c3762a847bf1df6bda9e20a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11_linux-x64_bin.tar.gz", + "checksum": "a23cff74ffbd36b25706664d2f2d5eb7720f17b0f1b0e9311f6fc466057d6609", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11_osx-x64_bin.dmg", + "checksum": "f3eac8e9272860ca143e4a3d38b102ed4b0c7df9b4747dac42b2570bad4f43af" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11_osx-x64_bin.tar.gz", + "checksum": "43c1e91a2e58021ef5f7c3c5357d3ba1edaebd4526a344fb1463c4f6d057d619", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11_windows-x64_bin.zip", + "checksum": "247e04d50edb69e0b04bddfbfe144f128cfaebc369a6076e568026b68787b424", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jdk-11.0.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-beta_linux-aarch64_bin.tar.gz", + "checksum": "886d5c6df13529611434368fc4a043e7377a14fb6bbc24e454b847cf89cd8e5e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11_linux-ppc64_bin.tar.gz", + "checksum": "d3f63743c2b3f5f55318b824f1a60e9a0cb52e5732cb45b7c046457c1f9c31fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11_linux-ppc64le_bin.tar.gz", + "checksum": "6e688342ec73d3a41bdef6b2cfe0dc488f872804ec433c8b1cf2c364306a07c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11_linux-x64_bin.tar.gz", + "checksum": "119305a845b18b302324dfbc9cb341110127255185689af902219c3be0fa3b5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11_osx-x64_bin.dmg", + "checksum": "c4f864bffa0cfa1321621a6b1321081f21566b0b3035f32cfbd9f9f5b5fe0e43" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11_osx-x64_bin.tar.gz", + "checksum": "0aacb4cf3c50d76ebdfdb489269cda1b609eb66954fa35f6bc72545440646014", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11_windows-x64_bin.zip", + "checksum": "5424bab6f25728f7cce2b7c9fe5d370dcf1a121b8b3a623571c94f81155bfde2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11/sapmachine-jre-11.0.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "271e8d938a8e5e54499b948e18caa3237141a2282453cb8e34091c2e05974d88", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "08182120fe54a06f52bba8c5a5834ad031ebd2df98add4d84cd8524bcb6cbedc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "578b0372d05d920de16e93750c7002e66fa773a2574a74805ae580b6e1d12c27", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.9_linux-x64_bin.tar.gz", + "checksum": "aeb73cb33eb375ede92a68348e18f59917ba6c8122d2f8fde0bf4d22fe46fd65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-ea.9_osx-x64_bin.dmg", + "checksum": "d8e9fe07ca633642f9699e375e2f42d7f9588c53bd0d45be95446c9d15284526" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.9_osx-x64_bin.tar.gz", + "checksum": "5c43dc291a069a941711172e9be18fb13b0d4801fef2e39ae766cbe919f92bea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.9_windows-x64_bin.zip", + "checksum": "2db571435fb4efa4ba2bbdf0122a038729f4310ca6956395a686bea1bf3bc1af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jdk-11.0.11-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "e9e9fb1db18725f8d95588b16dc78b18de0a11848185933902cd600bc2c60f98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "c835d4321e5374a266b34d403c235c47e50755cb06695411cae18e09b32bfddc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "6dc5b572bdd5ab3c88a4d19a124203e08799d9040ce349a27811299f73f70d56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.9_linux-x64_bin.tar.gz", + "checksum": "2dbe2866c114c5de100bd4c4b8bef0f8f8889d41071b7096217beedafd17ac6a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-ea.9_osx-x64_bin.dmg", + "checksum": "931b91c4335ad014e6e09e94370f13074b1e07cd2a253e4cb59a432bb54100e4" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.9_osx-x64_bin.tar.gz", + "checksum": "37d3751e60379ddbe72a2c639434dd6f9d24f317be5a5cd2108692b568e2d9e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.9_windows-x64_bin.zip", + "checksum": "77f8cd93d3ca0ccb5c677f3e005635d6b1102960c80225a4fe04b8700dc50b37", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B9/sapmachine-jre-11.0.11-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "9c19721c2c85b9123805184ff93396bc3b70be641d6fc89916f0402134752df9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "619a16ee04132f49a403976108387789de4c227032c2afcb49f0cb87007a0e71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "d74fbb66fd385015915ad879d239e68017450695a787dc84d78d06d3b26051df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.8_linux-x64_bin.tar.gz", + "checksum": "0fd5cc249033528633a914b07866d8739840c358c43407cc3c6ec297a5a5c9aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-ea.8_osx-x64_bin.dmg", + "checksum": "cea15779b62c6ecf81e52dbab4f1c80b8b3f3313835392c1a97778ffe042781e" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.8_osx-x64_bin.tar.gz", + "checksum": "0ebd8805b3416695705a8248377baa8d0d24ec4b6395d231688b0cd5b333c4d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.8_windows-x64_bin.zip", + "checksum": "361b9b6cf1f292adc0167a723e3b028ac9c8c8c4d1c1d0887426d67e3fce0541", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jdk-11.0.11-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "63bbdca8beedba2426f6b6321c23b590c6589ec80176692ee2d78cb9308373af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "372c29179280df8b47b124011ab76d81c3235105fb56e956b7ef6c255c43560f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "82b3a434ae9cd6bed0958b59458092225911b0ae04a71861641730f0b740530f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.8_linux-x64_bin.tar.gz", + "checksum": "f491f388df47682c585c367a830847956263d177c3f4b3218d6dc13f7c03df49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-ea.8_osx-x64_bin.dmg", + "checksum": "99450848f420a3bdd37f6b1b2461c46d22b68321fe21772042df263595fe5253" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.8_osx-x64_bin.tar.gz", + "checksum": "6d1ca5e744225b23d1fe48281a054c1a07b320c7ac3d96b4817cff4158cbd8d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.8_windows-x64_bin.zip", + "checksum": "523fe349197ff1f53e3ee351aa7f0e2b48f6c8596bd82efd64d4b67d8e8aa91a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B8/sapmachine-jre-11.0.11-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "2f1db61e5b05abc11f70f2648db7c12dee7678b9c54dc858a975fbd6ecff101b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "ef791f60bf8eb0eaa50d06c7880684faa79c94465cdde1abc3ae29addf636af0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "ec65f525131ed532051566b63c9484a4eed1ee599300fc9f4d3b0ca756054dd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.7_linux-x64_bin.tar.gz", + "checksum": "6d63390f44a2025c0fb0cabba77c6dee2e7e8f566b083c68d32e07c62e2711c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-ea.7_osx-x64_bin.dmg", + "checksum": "36da34d5d2814f39b684993f0b86573899caebcc7c3cdc1faedc0efb8f098f35" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.7_osx-x64_bin.tar.gz", + "checksum": "da8b6df5c72c2ba31a0f4df603769ee383bb2a3ba00239a88608b90c801049ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.7_windows-x64_bin.zip", + "checksum": "d683366f9ff5cfaa0a7777db0428f699eb9dcaf978ed79f92be75ad08c5c32da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jdk-11.0.11-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "75c474e0fed5827d746c2635b47cf83c979b55ac1bde57498e107ab9c9034e65", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "25e3e3b0042bdf48c9fe9f5cb0c289c22257ae1a6ca2d4a3f9d966f0bcadb9fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "9db001319f608c99f30e7fbae6e70945d7013d5ffdf022b4365bcc7fbb2d1dc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.7_linux-x64_bin.tar.gz", + "checksum": "45c1b770b22a12a050601d96e689cb0a4e9d4351a9c17918503a2aa2ffe5a8d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-ea.7_osx-x64_bin.dmg", + "checksum": "297ea0053b207d49d7a9916ce5596ace0153839dced83299fdfc7c17e638250d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.7_osx-x64_bin.tar.gz", + "checksum": "28fd9e69bd87c3a0d12d484b2e92ab3fd52737a7ebcdf83872c78759c30ed913", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.7_windows-x64_bin.zip", + "checksum": "779accf9eb92fa7fe908dabf9ef6e8a596724bd00019704cdd6e440e5521396f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B7/sapmachine-jre-11.0.11-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "62268098c4dac0e6184cf777ae6028218e86ec616e1f1cd34d7815146f2060e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "5647347910d176fc660efa19ccc532ccd33c21e14b6f22ace3e4d8082faf4b7e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "9718f2efb14c486d20cb49741d4587171d082f39b8a95e8a404e01a8241c5436", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.6_linux-x64_bin.tar.gz", + "checksum": "ead352ae22837a7f8efb2d9afb19aeccec440f9e1ccae1f9ee97a9f6438a1a82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-ea.6_osx-x64_bin.dmg", + "checksum": "d2596d3885f5ac118f0565b46388b8141fe84dec9f5772b76ea855cedec3d854" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.6_osx-x64_bin.tar.gz", + "checksum": "16194f4417b56c6c51d2df9620cc34aa2eac608e76b261966c65ab910a43cc1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.6_windows-x64_bin.zip", + "checksum": "3b26c74129f9102be74457b4013b2ab987c3837b85cc5ab5c1594abeffca99c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jdk-11.0.11-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "43218bbe9b99174f922fa75f424a484ac12d20d6ba86c3da7f2491227acfa031", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "80661e847ab6c999d484d07857f909c49df4ec5d9cd1bd35a95da1e6ce2c187d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "20692b4119b46fbda4734318799a9d99f10c2d7321c1607b75b6085bd7b49120", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.6_linux-x64_bin.tar.gz", + "checksum": "6f8a77bdb455b3d0dc85e5906b5f1748a18d3086a79be6534c8da095ab0d53c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-ea.6_osx-x64_bin.dmg", + "checksum": "2ac21ca17a1facc6bac251e9d1a61b492099d4ae4461012a7794be6e2578415e" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.6_osx-x64_bin.tar.gz", + "checksum": "a36b525bfd310c0bb99f567219ea5ac642726ffcb4145887230c1da87e758ee5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.6_windows-x64_bin.zip", + "checksum": "765df9519b70f162c3d8c869150d249e0709d77a4c4cacadd9c00bb0c0702af2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B6/sapmachine-jre-11.0.11-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "d382d7709c24a06148e6c7f2a746a9a6a0339d68b0e7768453c4f64ebc644e63", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "baf5adf9a86eeefd13712a4fb595609504ada37a48997f32b4a3de777500a126", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "19038623e0df4f261389ad5bef31c4a997be77049cb213f2391f16623b2fd1d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.5_linux-x64_bin.tar.gz", + "checksum": "8a55935847e910e35713c844599c29acb5928ad0b24af31b49cf034be3403b8a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-ea.5_osx-x64_bin.dmg", + "checksum": "13de2138af6c587127464808a2482e9ff2faf99a6770ca28142921ab1b8241bb" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.5_osx-x64_bin.tar.gz", + "checksum": "3a81d608a8006e394a45eb9d9b78b8d3a0792ecdada48f86807fdba2947c75d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.5_windows-x64_bin.zip", + "checksum": "89544278244dc90c9bf52c064b32ac3b3336203148add4edf1c8750a80994bdc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jdk-11.0.11-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "6d3441cebcd49e08c9544183ba6cd0276f4d8c309496ea6af48aa12d6da5c3c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "f45495c13bcb146c7851c468bbff8bfdff9295b75a0e28a420c826a0f734e65f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "ee8c46d7bebdc11923bb96fa1bf1fe816903c1d7e9b71d1ee64cbadde5bffcbb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.5_linux-x64_bin.tar.gz", + "checksum": "d0e068e79ef2747d33fcc9b900d2177ced5c9015c7bbce58db32900cb0775dc8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-ea.5_osx-x64_bin.dmg", + "checksum": "8703c639540bbeffa4d7253e2a812bbc597aa4ad095d2cf3c3b6b4ac98c17462" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.5_osx-x64_bin.tar.gz", + "checksum": "0d8b6e17db9d52109705c167123b91bb8f4aa3995c207e357fbd48387b656f42", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.5_windows-x64_bin.zip", + "checksum": "fc8cf89dbb8691aa858b09bb67fc52c5ca8e3860461ab9bfdb6b7bc4ef04451d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B5/sapmachine-jre-11.0.11-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "86f1b8c3b707d9f0d2242a90b65e105202797632c3412759e12cf17bd8c450b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "e8e0db32e48de1177536f6e369e753fbe19c384daff006e9f8d651deb1cf70d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "6e163a316093905e1993365ae7a1911d4e4b4d2da49102dc65333dc09ccfae8e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.4_linux-x64_bin.tar.gz", + "checksum": "7490bc615de4706f6852fbf9467433ec448c3e8b0acd91222277c9c5bf0142ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-ea.4_osx-x64_bin.dmg", + "checksum": "38b28a49f921d5279314be76f2e275f55054189943dc73653038da89ecbcf6c8" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.4_osx-x64_bin.tar.gz", + "checksum": "1a19f121d95057226c7d6d73965d08ba0dca8ed379d9879138f777b30b169434", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.4_windows-x64_bin.zip", + "checksum": "5f1fb4d72c6985b87fb83906f19e6d88881c99df331fcd8a9757d1ee3f455f06", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jdk-11.0.11-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "e71178b5e21715ecd34a731dd4ab20797f89b73b6a681fa80d440e74ec3e5667", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "bd18424ee26390fdd0b751ca20413b8d6a77547dc12b81262fe9a53de8db6eb8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "c92d59003cf7d10abacab8c100e1f338473b58ce4acb87c4b5334847c016210c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.4_linux-x64_bin.tar.gz", + "checksum": "3b078147df79cd14d3aec27df0cb472d5a8b20418b6b6d83769cfefe46835027", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-ea.4_osx-x64_bin.dmg", + "checksum": "589c10025fa0acbb7a2024914767553ebc62b7e74c68e3c70e095c933e8967de" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.4_osx-x64_bin.tar.gz", + "checksum": "fcf7a5d815ce44ae40ffc03e3ed1198fff98e90fda0abe13a04e56ddf64d8401", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.4_windows-x64_bin.zip", + "checksum": "cfbdae7f279ec504b2360c2f3ca3779b74896c5aacc27723ec9964dcc991656f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B4/sapmachine-jre-11.0.11-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "7277e9c36d8a5dd6a9e6df787179f76369f1a34958a2b23191eca49236d01741", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "6d31db27db76da184bf88938181ce82614c1afb5322990478f4237de2520ca3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "3709a6625486f61be5d1cf8e2b6d836035784099daac2841bea6ee4325e0a5a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.3_linux-x64_bin.tar.gz", + "checksum": "64f191fb746467e27fef7c340c2ee75514571a11e7b1dec02106df6c1fff75d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-ea.3_osx-x64_bin.dmg", + "checksum": "9c6212df18d27182195c46a9eb7baa8d2a0498f8fb6ed67a33be237b8b07e477" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.3_osx-x64_bin.tar.gz", + "checksum": "7eeeeb9d8b29e63ad273b20266ef728074809a70319bc3bdd762589767fb9c1d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.3_windows-x64_bin.zip", + "checksum": "de3bbf4b23731922464c9aa9e82c486cdfb93d141253729a43fa85b6d5e158e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jdk-11.0.11-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "ac604c56e707b5c08f58002933b765744e72c835e6c52ea054d313cdc65a555d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "4d8a39e1c94f9b907eb607e976789f75e8692f5e42626239f45e3380a0270930", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "0530b9e32238386b9665918ee9215ba54c259070883056872efbb6137b050ecc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.3_linux-x64_bin.tar.gz", + "checksum": "46382d94bb96194285a4323d628601ee9fdecd87f6365f5efdc18bdbdcee991c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-ea.3_osx-x64_bin.dmg", + "checksum": "13993982fe683867f5acc9746435da325015851eadb10520e4571d0cd60f4ba1" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.3_osx-x64_bin.tar.gz", + "checksum": "e1b51c54c8e465b1b780305d1d3a39d5c76a0ed7c1c08f7f87d6378c7da9c54a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.3_windows-x64_bin.zip", + "checksum": "955ef67c2eacdd0a2c78e4ae6e48b9904a4b52766394b4e07ff5de648333fe13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B3/sapmachine-jre-11.0.11-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "a6248bbce8c1a616590aa2b4839256fcb8735912052f9fd166ca25487d09197f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "5c8e4faf5d6a41d327645a20a4d5288e0bf140ccadc7234c110d12ba9a19c363", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "07915a0aa745920f3381a5cf620997e7ec9daeb9d89fa1a30996aba98a34a967", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.2_linux-x64_bin.tar.gz", + "checksum": "6bd792afbdd2e785396e0d564cfc6a9a91034359a55ef6e121251dfa1f2338d6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-ea.2_osx-x64_bin.dmg", + "checksum": "e1110a9dad888fc7d28acaa8d99908b195c2a402313efbce515379972c970f7f" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.2_osx-x64_bin.tar.gz", + "checksum": "5dd2ae447735cd5a6d2a1a0d809f3e1b3e930e54af808f5896113b5de75f212f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.2_windows-x64_bin.zip", + "checksum": "76451690cb7ac179aee0d986afeaf2758a844577b7e69a9a0ced37c5e239fd9f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jdk-11.0.11-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "8206db22a1a8fd81c618ae9e941f725ce44f3060aa4524a213d1b47e2a604778", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "18442d4dd05e41f1436b8be74e92785e6e0e24ce3e8c469341dff9e00e8cbaf2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "ae88a7e7471ea48ddf7580dac0936afa3873226fee3ae0d3d0179442cfd25685", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.2_linux-x64_bin.tar.gz", + "checksum": "36688ad109be176fbf118a738df78655d3a3f4d24f4530e6aa459f01a65e95e6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-ea.2_osx-x64_bin.dmg", + "checksum": "5a28057a089b2987966abbb0333d2396aa3d6332afe7e71b452a2485bf5fb524" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.2_osx-x64_bin.tar.gz", + "checksum": "6cdbb7c49934b81af2794fe30511390f021e6eee17d0b23aeff3a4027a3f161a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.2_windows-x64_bin.zip", + "checksum": "b1187a9e6b955872281a1df5506fd2c1264cc6bfbc5994822483aa978976e7b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B2/sapmachine-jre-11.0.11-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.11+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.11%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "15f4d5877990d1935078a4340a2f336314aa4c2c054b25c4316b57cbaafed3ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "f3cf1579a4316dc9a7e1a6311e6d023f816b9da21c3a5a584bd8c48a8657c6b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "573c1ac6cad443aa8bf3434d6fa858949f69bac6ae9a7803ef5bcc128b6ebef7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.1_linux-x64_bin.tar.gz", + "checksum": "10e9a501532d927a53a9345d4fc88414e27ccd3a3251292279c12948773201cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.11-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-ea.1_osx-x64_bin.dmg", + "checksum": "7726424be5f2abab44647203a4a56de0a0e69da282b54cc28c267cc14e95041a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.11-ea.1_osx-x64_bin.tar.gz", + "checksum": "d60b350aa25bd00ad9c181bb866b8bcfea688cf4344e31fb69e9538e2bd000bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.11-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.11-ea.1_windows-x64_bin.zip", + "checksum": "926b482c2a43201745f7493a6546ef1eda99df3eaa5d8e53f4aee69f4c068c1d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jdk-11.0.11-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "e6c71f5e4154d8d1bd76ac2f9461e4cba492204135ac7139b20ced0a5dd36c50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "2d2c0bfd260acb1711152fc04234e9dbd3c8bb7864a2791700529ad409351c0f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "d7bb8e4eab1a0a455fb054f3e85845ec6aaca23601a712a81b0a214b5e82c635", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.1_linux-x64_bin.tar.gz", + "checksum": "6d13895eb70bcd0e1e362bbe0435d1a74ff6d70974b4c66e8182bfbc7a8f8a35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.11-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-ea.1_osx-x64_bin.dmg", + "checksum": "69617140543c661d685293b93ee5885929822836a69468c404e1d260d942cd03" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.11-ea.1_osx-x64_bin.tar.gz", + "checksum": "ca9746c6219095ebd85979a5a76b0802136769d7ac7bd717190cb743874d1043", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.11-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.11-ea.1_windows-x64_bin.zip", + "checksum": "aaf2a6019259fcd533a3700ae0a520fdcab2edad7ef289a1bc0557d30b252631", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.11%2B1/sapmachine-jre-11.0.11-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.10": { + "sapmachine-11.0.10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-beta_linux-aarch64_bin.tar.gz", + "checksum": "f6798cdd2381297c22a632997eae79ff9d8d312ccdb0229e7dc0dc2968abbb7d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10_linux-ppc64_bin.tar.gz", + "checksum": "fb8d73c492d605dd4e18a8a810d6d84a65d7d7605747b9c2947a4ee17ef5c831", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10_linux-ppc64le_bin.tar.gz", + "checksum": "64d73971e4ab01767c6d8d8a222e2787ff6347a0d54b2bd2c7080ff65c343aaa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10_linux-x64_bin.tar.gz", + "checksum": "2e6baf16d93b696ea183456d95122c6135559c64bc91ed19a486c4c05c7d8fbf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10_osx-x64_bin.dmg", + "checksum": "9534d6ec89f1dd77615f20f0d3bff7dd4d3f76ba2a4fe2e29431485cd9131dbe" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10_osx-x64_bin.tar.gz", + "checksum": "bd36bcdaaaecfb70eaea9ff58fd6083e2ec23ac7da3366705168427e118b86f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10_windows-x64_bin.zip", + "checksum": "93f1325d55f510047013931c94ef5fcae0e24f6601e5b3184527bf607aead4e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jdk-11.0.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-beta_linux-aarch64_bin.tar.gz", + "checksum": "53ed2ded1c54ee8e6d2eafb3f6858ff5e7c18db426506f358b181b5decb02789", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10_linux-ppc64_bin.tar.gz", + "checksum": "04d60df6b0c63fd3a90e7e01c94b81a448365892ad362ee4e5246556a397d99d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10_linux-ppc64le_bin.tar.gz", + "checksum": "e00f0f0c613ec6cf339ca4e594035fb1378a2ba87d31356b41460989321c513f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10_linux-x64_bin.tar.gz", + "checksum": "396c2a1f37fb3bcc7c235349edb593158cf0650793a7f70bf861289620f7e1df", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_osx-x64_bin.dmg", + "checksum": "3729593ce8dedfe6d2a59bc51c49cce11655721a31840b5865a6f09d7fab1153" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10_osx-x64_bin.tar.gz", + "checksum": "f095ab3f50f1b0d32d9e88d70942fca505b43f540105d11f0dbe8308e936c310", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10_windows-x64_bin.zip", + "checksum": "c828b18d2b6f1696a47c5d93d0c24f47571419754f9d36393c4306471fb1ff55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10/sapmachine-jre-11.0.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "f857cd36429a16f39449f8124589b8e9f4647ba4e24b02cebdc6058d8b647543", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "73f3b27e1a41dbcd23699226ea1e35955da5fca62ec2055a2787e246951ebe78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "188de075090ebd5e360d8343318b0182666656b5b51aa3330439ea2048e0a9b0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.9_linux-x64_bin.tar.gz", + "checksum": "b17955e4aaf7c1959e88582cc335e21836e04b10e5170fb1a102db3a795e4a8b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-ea.9_osx-x64_bin.dmg", + "checksum": "4627e3bc1fa1e603ff3f1dc6902e7d9571e48c5144e771205037222d9cff2462" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.9_osx-x64_bin.tar.gz", + "checksum": "e1cdf9e9165854a51b259a1781261bc07384373148b4250920a79a4b87a4d20a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.9_windows-x64_bin.zip", + "checksum": "54849c1d35be0b5ea7369cc750e42cef65810fa435e52537d167212fadd9b18b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jdk-11.0.10-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "5645ef9f2074cc63feac6429dc7023fbf643aeecde5a265363ca3547beddb7a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "b4a1d79822dacc3fbe0e3ba018e3edcb989950a31d5e1b2416c96382ff6a4ea9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "2d5c5a6ad0f76dc43e614dc11deed3053d732a55e6502008fbc3496ea10b1f49", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.9_linux-x64_bin.tar.gz", + "checksum": "2fe07ccefff245624cd3e26f56a39b114f08bd119f60af0b60eb69aa9b4db503", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-ea.9_osx-x64_bin.dmg", + "checksum": "828d5f947f21313c38a6f0f9e00352060e5670ab378bf8376cd06b7f5401e755" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.9_osx-x64_bin.tar.gz", + "checksum": "c0ba33b26cf170b4c050ad7a782b5651eff452c6f74cfa11f643b21466702c23", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.9_windows-x64_bin.zip", + "checksum": "6302e1a9efd7f07e3c1e4d2ca419e8e9f3800a6affd21013b7d607f20498b66f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B9/sapmachine-jre-11.0.10-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "8d66114f915512bce0ed0ba18b64006ccfe888c9ce97c62ecd4d296dd5278a92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "3f76138beb6cd93f23a4b763cf101a0cafda5183532ca1cff2c92a2d59691661", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "852b930acd29ab5728af794621e3bad8e3300325eea6182de7bdac9164bbdbd4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.8_linux-x64_bin.tar.gz", + "checksum": "32dfe390e05f986ca63cd8fb4e4ce1b09ad75e957df002a0b1693a2fd1fc3082", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-ea.8_osx-x64_bin.dmg", + "checksum": "615a504d54c7ffe5a7bae1692529fa72312b0776a91eeb952d13dd9b949f0860" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.8_osx-x64_bin.tar.gz", + "checksum": "0c3adc56f07be9a25f4d4c3eb2a08a9546347a02afe19d294683cf84b871de8c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.8_windows-x64_bin.zip", + "checksum": "199a8ab4e31124253b574dd45efb44e9b9ba082dde80201497660a5307ac107d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jdk-11.0.10-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "4d361db685a284598f91098148998d6cfa6b016d736c80e58a28d2c5ca687e81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "23774e10542c210b8472566b747673f4f5edf90ec6cacc3ad4e55200427aaea8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "39bf99fe61a7e9bc40eb9824e0c73e20a270fa3849e1f04b9ea24df2fbcf5207", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.8_linux-x64_bin.tar.gz", + "checksum": "1db2af80ccadf518304c9f4dd3ffd141599a56dbd1b6263212331505d562e52e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-ea.8_osx-x64_bin.dmg", + "checksum": "19bf96384afddf614c3e047fe84f18770f20b93bf8dba8c98e06f15acdfb0796" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.8_osx-x64_bin.tar.gz", + "checksum": "99f8ce124e5c89d3646d1a1862b57a03b10df5cb8551c1f2e6c35ea2a5219209", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.8_windows-x64_bin.zip", + "checksum": "aa82931715697731e3cd2a9cb7b42228e8d7af125048108830cdd56a8f4d499d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B8/sapmachine-jre-11.0.10-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "86bd89d2fb872e399fbee51e6592818bd7a0a03e47a8fcd2a89c1d5d1d3c4cce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "bcac52139130ccb6476b6cbda70dbb7ff299377b36e239eeee91a58e4a23e043", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "1dc141e9229830a2b542ac1460668d869617774b962613d5c9e192f3f6927013", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.7_linux-x64_bin.tar.gz", + "checksum": "16e061c4342f4629c0ce5fba7e45af09a03a41013600ce34e19a450cca5738b7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-ea.7_osx-x64_bin.dmg", + "checksum": "3056e3604e604f50847b7c2bcf0ec38966bbe9a084a5735253ebdbf5312fb774" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.7_osx-x64_bin.tar.gz", + "checksum": "089c81c9066e91262a3a75aa33fc23cc4f721834b10c1f5a3e6e5248244d55cf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.7_windows-x64_bin.zip", + "checksum": "242807c84d218f9bee9ac34e536ca784c8571517de05ee81a92c9fca04aedd36", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jdk-11.0.10-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "fc6e004ba32630e7a83d4a6b3bd80c3f4d0de838de978c925f6856f901cd3c0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "3fef99fa02633373f8a9eb9f5f78483b5d917dc8587c62710c1828469483dedd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "fc733c86692d483160a6ac3f21ed986c6a60732b71a0cb75b68a8e69fa3c0b2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.7_linux-x64_bin.tar.gz", + "checksum": "55a8f6433a7cb5ad8c285463223c7054b9b672235dd069eb487db0e6daa04ae5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-ea.7_osx-x64_bin.dmg", + "checksum": "c1163911f38c58be32fe965be42c942fd770c74d497e0025cd11242efc281e82" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.7_osx-x64_bin.tar.gz", + "checksum": "cb5a651f0a967c8f06cff27a9ca80d420d5bd12657107057d7e3d3f17d6d8ce4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.7_windows-x64_bin.zip", + "checksum": "188a445f64e2215dd874670238eb81b04b83279e41c1bef321803bffea2e3b1f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B7/sapmachine-jre-11.0.10-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "713bae66822b33860d6bf7cf9fd4737cc035241cf07615b113aeef2d04c730d3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "eb7a8f100f0e0e2bc2d4ee39dc95d181829a69e2202816cfec8368c41c0e6e9d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "e42e4ac270c1f9f64fb0348d96ce60a7c87bef9a5e2461550974edc9ab0cc628", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.6_linux-x64_bin.tar.gz", + "checksum": "071503e1f6144042303ada8e9d412b5f3324455f3b928471a31521ff77407e0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-ea.6_osx-x64_bin.dmg", + "checksum": "b99d36a1e4929bba18edbef2750332d7ac46c64ad51a032f1aca5e6f74cd9475" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.6_osx-x64_bin.tar.gz", + "checksum": "25bfb8e9f472a71d090f7023e655d70c9ab427ca6f01a28da67801847515c492", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.6_windows-x64_bin.zip", + "checksum": "5b37c7972c03ccc892c114924173f7f6c5b46620c691c68f745e32b7d8d50282", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jdk-11.0.10-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.6_linux-aarch64_bin.tar.gz", + "checksum": "50b27a9b7b99876957f27cc68388857811c4e1f83122d345f3aaaaa94cde04ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-eabeta.6_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "d4d7450f782e321ea095958c2417f03720bb42388446f944db75e9ad0a0dc1c9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "16491f71c5c7c34bce2b4a27049fc4d802c9e577eeb0d022568ca8cc9054d60f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.6_linux-x64_bin.tar.gz", + "checksum": "4997d811a975d9ad1ee77375d67e09256eaad0c0a71fc6e15a7d9eda56c1c2c0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-ea.6_osx-x64_bin.dmg", + "checksum": "efb42d1fc20d27f9683a875211ef70d3d0329b04e057598d25beb7f14cec55ce" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.6_osx-x64_bin.tar.gz", + "checksum": "105c55e966d9f48b843cf60a3725d10719543eddc758b540a4a830449bced545", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.6_windows-x64_bin.zip", + "checksum": "c1de616f3c6af79a54554cb0a374ab9cc30fa0c7d6354af6ad6a8d2a453b7957", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B6/sapmachine-jre-11.0.10-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "7be0846d13d23ffd56555a809e130ad6448133ae6cdb9e093224c87be02ca8d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "d7c4c35e33caec9fa63260baf6e619b602e467c546541f2cbaeb5cb2b5b33c70", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "decb6df75ced4cf65be2420b886e51db703b8e0252051f69dcf14ec846aba728", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.5_linux-x64_bin.tar.gz", + "checksum": "2b5dee52ff06868b901d730582537a915068f7fe923ac0a6b196cb900ba5ed6e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-ea.5_osx-x64_bin.dmg", + "checksum": "40baf21429850bd0eba8902fd93bca5621c12b96797ba80f263de7a642c32665" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.5_osx-x64_bin.tar.gz", + "checksum": "b82b83451fb3944936ffadc8721861ef08ec583cd02f91241a01b6305a04657a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.5_windows-x64_bin.zip", + "checksum": "a9b895ec61f0df6523006bcdc85124aa143f2d368ee3a63372ecb8a5fe59c90f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jdk-11.0.10-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.5_linux-aarch64_bin.tar.gz", + "checksum": "15701dda43824b8b5ea7507ef81719c24ab79535ef4711f7f3379abebaa15e6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-eabeta.5_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "7e2708794eab2d1fc58a28ca511e8d6b750040fc9a0c85e4bc3ee8311764a085", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "a12ea833a7bcc44345472808d0cb737761e32b6579347304a0549fa053548bc7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.5_linux-x64_bin.tar.gz", + "checksum": "46310fbc968fe9b4c44b4d7c0a5ab2f3cceb6a1ed7699c5d175028d25e09b0f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-ea.5_osx-x64_bin.dmg", + "checksum": "7d52b47cea20945af8238378392158d55e50a82ed4dc6cf0b353d3b35aaf60ff" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.5_osx-x64_bin.tar.gz", + "checksum": "a68b74092db6613d0a991892667a005ba9567e4aaf5a952957e30302b1bdd0c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.5_windows-x64_bin.zip", + "checksum": "748c58ce6c89aef0f84b18441a6297b2a3677065fa63e8260add016d498d2253", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B5/sapmachine-jre-11.0.10-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "e3dcd108a656265ea8bd3b1503d656e1b1fa03e501ecf360d271da44bd1eed2a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "3803212e03d2a57366fd0ca728a489af32251637b91f1493705a02c8d42d1ed4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "75e1e00bd0da4e3b11c129c4e0c41829365183b4e9c35737bfd433dcacb6a37d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.4_linux-x64_bin.tar.gz", + "checksum": "fa2a018f775e9d22a5097d2496af9c965e2b74d6478446a44696d742665c1b35", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-ea.4_osx-x64_bin.dmg", + "checksum": "b02a5e3d13ca578449bf779117558292077809877534126b67094afc02bd5bf0" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.4_osx-x64_bin.tar.gz", + "checksum": "73d47b80e146c1ea604bd7f014054ced60c23f3add126258c0989401eb444cb5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.4_windows-x64_bin.zip", + "checksum": "49a4140b70774f9567152038b4cbd0c1d45b8a5b372f4d71a92f2e0adb5dcc16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jdk-11.0.10-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.4_linux-aarch64_bin.tar.gz", + "checksum": "cdeaa9876b47254a21c29d95ede24911563f0ce5c0e3ed448fdf91f6be0f2b0d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-eabeta.4_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "2125718d18686c85d93079af4c62b6dea99bd1f4ca63bfbb7eadc2af91ad6620", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "cfc5cda3a8fa2d0b30f2484f751ac9d5d8d5970b6aba0334500f65f20c3b1b40", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.4_linux-x64_bin.tar.gz", + "checksum": "9c3279d98e479bfd8519aa8af21bc09c3dcba115b1a675a46c2a95cdaa6d3e1a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-ea.4_osx-x64_bin.dmg", + "checksum": "5f73abe92ca2e6b38159d637f7918b5156f11861df25b2a25964c3f80fc450c3" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.4_osx-x64_bin.tar.gz", + "checksum": "40b93b95e5ea8a623cbe6477107e42ec303f56262b1e0060f9ed48987740b5dc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.4_windows-x64_bin.zip", + "checksum": "46761dbc99cdefe8e5f3e5696e2e8b60230a6c2e311ac179abbc77c05a012e50", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B4/sapmachine-jre-11.0.10-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "a120bef86e26c497e44a5037b00af12bc7519e1b36ab409e30321818118ce4f2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "2629ac27f98ceb6fd23a3b359715d1c439f40e3c0c3cf6173e7b5af774283a0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "50b1e1d2f8bae01367d12f9a43a5043102ff353b85604d90f87617515bd64657", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.3_linux-x64_bin.tar.gz", + "checksum": "a9784f16dc5a948c2b23745188d71fc00970fd957c0b75405a12c890834b2614", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-ea.3_osx-x64_bin.dmg", + "checksum": "6ae2e25d661b6ff2ae108f2f23f3fc93faee078ff0d722d50030b673134f2c25" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.3_osx-x64_bin.tar.gz", + "checksum": "05d51c0ef304869ed8799fd44f4f754d7357d631e84718efc83e09c69981cbe2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.3_windows-x64_bin.zip", + "checksum": "ccc2f77efcb632d7563e4ef7ff120169c99e85fd81acd62396d03171b1ce41c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jdk-11.0.10-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.3_linux-aarch64_bin.tar.gz", + "checksum": "1d0e3974cdd490a28e706eb6926baea5fab68ea272c843adb52f7bd675742863", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-eabeta.3_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "eb02fbd53777e2df70367f881df2152b930912e62e2e7174e2be9d0300216cd8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "8d80e94aa958c49137eb2f55f2732f043d59345ab213d2cfa7febd88e4ac0e0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.3_linux-x64_bin.tar.gz", + "checksum": "663c6c008b17c9b2641bea2bc4cb74bc7a94d508a5b8e00f65c40cba854247bf", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-ea.3_osx-x64_bin.dmg", + "checksum": "ed1564a795d4f31ad376ee912b315d988c6b3f9cbb58ca31b806a5b74deaa98a" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.3_osx-x64_bin.tar.gz", + "checksum": "f77f332f86cdce524ec04c46e7f1a5c7127b0a1c2328eca1fc438c05cda518f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.3_windows-x64_bin.zip", + "checksum": "5af9f94312a93ba03c0393df5890bf1541ecb365bc39cf7c3d34c031d65181d5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B3/sapmachine-jre-11.0.10-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "3911daee6ef07b880092131a421d2a416692a2eeb526115f84efc974766d2f3b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "8373f948096ac211af57b7ffa4a52777135dad08d295bfe806a45a4391206464", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "a24b533e27516c68340d539f84b28326f04940a4f03129b1c7524aaade10b7d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.2_linux-x64_bin.tar.gz", + "checksum": "a8fafe06c264153525231ab4c056f95dbe094bd8a1ff5a4b11eda51f23c7b1ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-ea.2_osx-x64_bin.dmg", + "checksum": "fdc707a9648130a14994fa1b2511ce70ffc8d971dcfb2beecceef33f4f4e18d9" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.2_osx-x64_bin.tar.gz", + "checksum": "676aeaaf9ab780842f918d2c42ae86114aae46a6d6f384e8f57d7d5f924fd92e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.2_windows-x64_bin.zip", + "checksum": "9e067ba5d3e64e9900ba106708821ce2c30f41393b373fd76a87062c2d65e262", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jdk-11.0.10-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.2_linux-aarch64_bin.tar.gz", + "checksum": "d6bda8dc92e12326968b1cf537d40c3eb1488494dba1721331a77d81b6af0f9c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-eabeta.2_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "a8041dbc2934fe52006b6870dc624d57f3b8316a318bedc3db57b8a3fb02128f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "bcd84846777600820516c0408d815703fd2b3743f435ae5990d97151936d398c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.2_linux-x64_bin.tar.gz", + "checksum": "7f624125ed7013bc69b5cbecd3d7a164466680d43126cdd64fd83bbf126a751a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-ea.2_osx-x64_bin.dmg", + "checksum": "f9748d34345fc9818fd59a51314ef37da888313fd0d1c4b370b6ef4a56ba0457" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.2_osx-x64_bin.tar.gz", + "checksum": "3c5c0624d42de11b5a11c83f381f745c66fa6303de2ec01a0d1ce5643fac4299", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.2_windows-x64_bin.zip", + "checksum": "12059dc007d401095125b03a0eda98d285fb2d0c131bf3490407e2ad2d1e17a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B2/sapmachine-jre-11.0.10-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.10+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.10%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "a602a746044425964af052085535cc35540d9599c1275a0566d3ead7ecd45b16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "f3a294c4fcb122fe29cecf77823793fa420e160e4ab6aa74dc16aa901ca093da", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c6a970755937882e3b515506cbda705238583c74026adf97980e6a4c68debf10", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.1_linux-x64_bin.tar.gz", + "checksum": "6a4e4b2b5e1f9dd9e9c288e4974ad74b6343f47ac3b2f428e0a07f84a35d73c7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.10-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-ea.1_osx-x64_bin.dmg", + "checksum": "40512952119428cc2996677b2b3e79799ce1efd91c3bf7eb42edbf1b16817e70" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.10-ea.1_osx-x64_bin.tar.gz", + "checksum": "ed278d644eba18927d7719d62e9bca1bf58ea0a5762475fe46e3374f6879d4db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.10-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.10-ea.1_windows-x64_bin.zip", + "checksum": "93e94268de58b37094056144e9d8aeac0ab95e5a5db98435ccf36cfdfc634b07", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jdk-11.0.10-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "762f8c0a2d2d2f1f9cc44dc69fa4822647b9a8c17129e750e6abbc5b55d46e58", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "0081c957f3430884944b528738f4aabfb166c425e6b296e0ab83599b85c49688", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "8b0af375dbe81adbf82440bfbbde0187f8b0df0c858c37bfeae6001d6e0e069a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.1_linux-x64_bin.tar.gz", + "checksum": "92a01e4adbc9b39fd978ce668f2b4e9debcaccc84c4d914e02af3f9be6af8de6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.10-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-ea.1_osx-x64_bin.dmg", + "checksum": "befff35fdae2a24c26d7f4b190ee6a8981b6c46448ceed51c3253835e180b3c6" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.10-ea.1_osx-x64_bin.tar.gz", + "checksum": "cb8bc8a102ea15cff60e3ff6ff43bf6ec09f5d88bf526fca43a5e21de0511219", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.10-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.10-ea.1_windows-x64_bin.zip", + "checksum": "70d5b97cc6ae1f2f7098e3fddd254fefe1e6471bccea50bb4e90a025e5ad15a3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.10%2B1/sapmachine-jre-11.0.10-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.9.1": { + "sapmachine-11.0.9.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9.1", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "c7c5edc71dc2edd7d7aaca21f19af318a23667b7245ddc535551ebeae8322923", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1_linux-ppc64_bin.tar.gz", + "checksum": "a00d7a3796b53af994911bfeae278dcde7b14429c3a2f192244e1ec2e6b2a9f7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1_linux-ppc64le_bin.tar.gz", + "checksum": "5e2a916f1b1e447c5b4deae4600c51f20954277991f47e4bb35827492523fbe3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1_linux-x64_bin.tar.gz", + "checksum": "abc1530fa7d6b589161844ccb6a390b61755d5ce54aa9734c2300613a64c0198", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1_osx-x64_bin.dmg", + "checksum": "7f54314b375d1809b7b58af5f382979952ad1108797af56ba87b3341e02e0011" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1_osx-x64_bin.tar.gz", + "checksum": "5784fd582e10e0f78b3daaeb969e7be57555df610e89c2b48f896b8589d07e85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9.1_windows-x64_bin.zip", + "checksum": "8da918eb5c0dcad52b8bbb12db096f4e43e24e89552c747134bd4d7ab0ea47a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jdk-11.0.9.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1-beta_linux-aarch64_bin.tar.gz", + "checksum": "6c27c1c04a51c17d438638e8b69454aa2d82c1bc7af1ea1b8de806bfe905e4a6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1_linux-ppc64_bin.tar.gz", + "checksum": "2edad9852db1a36cd6e67b4b55bed70e46dd4705972f4fe7e15dd98cc0e75f6f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1_linux-ppc64le_bin.tar.gz", + "checksum": "7488e87758706c37490aebf08181b24dbddb941ce3252f692e90fa9f250cc3f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1_linux-x64_bin.tar.gz", + "checksum": "493cecfd2b0cab8d2e1e427c2fdaf52dc71431c906bb1e5c7dafb424219f8043", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1_osx-x64_bin.dmg", + "checksum": "0a3b2772b616b476cb84665deee86dca604f75fe2b2654efa8089d14e81c8546" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1_osx-x64_bin.tar.gz", + "checksum": "e34ad4c07c75f8dbae279b19f58a4f76677b2160f50a7f7a0e76ede519463d69", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9.1_windows-x64_bin.zip", + "checksum": "170008c06dec9576b3dafb267838cfc575103f7a306e4df4851c842492d02b87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1/sapmachine-jre-11.0.9.1_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9.1+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9.1%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "046ba8856f21b74d75fbda1d0761b3f409dfee092f91e4b68e927589a4977a4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "b89083798ca483a1c38e0a71b8eba5a05d1d3eaec736b8a48a8912f480a033e3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "e10dd85be459d9bd5125040430970a8ad2af24711592fc6c71519acbe239706f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "2baa4b4655244480917c91d7af1d8e9197bb6bd8d0de0641d715f3676cae3e3f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-ea.1_osx-x64_bin.dmg", + "checksum": "e0818a8477191909b8cab06ced475addc7aeadf9092c213e49dca42de87667be" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "49530aaef22d8e2215e36cbf265cb7b3196e73fbd83738156f9957cf2749bde8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9.1-ea.1_windows-x64_bin.zip", + "checksum": "1c114a08855d128d8252db4da49c04fab0f49e923fcd6d490958c0b146716ce9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jdk-11.0.9.1-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1-eabeta.1_linux-aarch64_bin.tar.gz", + "checksum": "fe6733327b75a75d573a53f397a14d9a7e0edcb20c91a5f68d8f6aaeb41d9331", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-eabeta.1_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "ac900afcf4ef2abb79743d36e35e2bd9501ceca46b5729bf8cb7d90826ccca38", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "93e07e569f7efb443cf11adad0581bea1b13f4aa03432830e536008c03fbb6fe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1-ea.1_linux-x64_bin.tar.gz", + "checksum": "9235dd300329be14f10d1ef2e289fd976e5ff4c83ed0ff1080314414636df369", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9.1-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-ea.1_osx-x64_bin.dmg", + "checksum": "428a20c7758f69bc560ea51235ed00747e6dfdc1da94b88a5399c24caa345dc7" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9.1-ea.1_osx-x64_bin.tar.gz", + "checksum": "b414b47e7858357c76c3faca19665a6c48f26457124b8822dd94c1880792de81", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9.1-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9.1-ea.1_windows-x64_bin.zip", + "checksum": "2f5ae2b955c5f604407ade5900b77559b8917b58d838c768216bf8a779ed9db2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9.1%2B1/sapmachine-jre-11.0.9.1-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.9": { + "sapmachine-11.0.9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9", + "ea": "false", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-beta_linux-aarch64_bin.tar.gz", + "checksum": "32221ec9e082e899fb47c97864bc3c8604e5add89738523b23fac04102332579", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9_linux-ppc64_bin.tar.gz", + "checksum": "71a884725588b4c028a7cebf8d614f298470895b8f43e2ae614588e068562089", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9_linux-ppc64le_bin.tar.gz", + "checksum": "6cfc12ccb98a6a36f67313f7d5b9ae24e681509fb49ac346928104d2985b2ad9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9_linux-x64_bin.tar.gz", + "checksum": "a4879f32cff8c1575364888775e61705f79b37f4ec5135fbd20b220d0f0aecca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9_osx-x64_bin.dmg", + "checksum": "c68b26cc9d4817feaa14beefde927dd663e7c35354fbe0ca10c966085648159c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9_osx-x64_bin.tar.gz", + "checksum": "76936ba702b463c4ddd1908cf0bd2af6bf18144a34f8c6531d2fc47774cbaea8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9_windows-x64_bin.zip", + "checksum": "7beab71c42a6f1e6faef1a16d78beebd0e3d488bd3368b5b07be8600b50dde43", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jdk-11.0.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-beta_linux-aarch64_bin.tar.gz", + "checksum": "f5301fd6d6cd84b7556dba02ae24c6d8beb9ac4bab30f3fd480098f66f18dbb9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9-beta_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9_linux-ppc64_bin.tar.gz", + "checksum": "12cd02f5e10cbebe2f87ddfb74b1e9bc8784abb218e0786b289715c12a16c038", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9_linux-ppc64le_bin.tar.gz", + "checksum": "e697dcb8d32ba054f30fdc2f181494c99f25e5ba797b1116002533a54de49339", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9_linux-x64_bin.tar.gz", + "checksum": "423a5ddd873aaf80d96d4602cf3d893da728edd2e8ea29d9250e881be7388d52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9_osx-x64_bin.dmg", + "checksum": "78d2fe77ba060694b2b8c4811f1535fb71178f42ec60b9fc40b6fbf19a6284db" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9_osx-x64_bin.tar.gz", + "checksum": "c1bdae781cdc33708dd6f8ba47e391d488e17c50c0378844e5fe7069ac8b66f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9_windows-x64_bin.zip", + "checksum": "f7ab33d7dce87ed6db2aca51b91719aaa33abd106a9b66532eb07ef4b331e3ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9/sapmachine-jre-11.0.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "8533ec523deed2e2e31643d65702940db09e6f8f43f2f9731385cddf0be49cfe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "e56a23845776378c37f00fb5be329fb16a4fd810addf1ab0f46681ba3bdfa9aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "a8303b9090056a61b81bf44716c9596389251bb802d2b8b98033159f6f329313", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.11_linux-x64_bin.tar.gz", + "checksum": "5127e218ff32e231a73180569f8f22984daf9b0af90980320e64da5723940b2f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-ea.11_osx-x64_bin.dmg", + "checksum": "e9094860a9749839fd70552e9761e1cc98b4a92b5530b4eddbbae55552266c4c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.11_osx-x64_bin.tar.gz", + "checksum": "4f755c35195ff6cddc40081192cf11cb379a268a3aa2cb979881cb81ec508055", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-ea.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.11_windows-x64_bin.zip", + "checksum": "a04847451fdae32851798df5ce2e32b00b0ad657ccb7f035c8fa50b773926f24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jdk-11.0.9-ea.11_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-eabeta.11_linux-aarch64_bin.tar.gz", + "checksum": "868f45f40fed8a813b2d4863ef0cae687bb4216ff946c613da8fc644d8e13384", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-eabeta.11_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "b9f629d40f16110576b168882ab4f34841a1bcf5563bb5609f47456a95725aa5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-ea.11_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "b00f8d2920afc3a14eb5f2a0e38558f3a4b97753f0d6420b68fc39bf90a6cc6c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-ea.11_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.11_linux-x64_bin.tar.gz", + "checksum": "e97789a5110bbd9c6f0ae2b2eaada50e9751b606011f9952355080a992599a79", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-ea.11_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.11_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-ea.11_osx-x64_bin.dmg", + "checksum": "41ed6b51a5c57ffa392d43891f543bcaa589bfa8fef4862960231cc39928161d" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.11_osx-x64_bin.tar.gz", + "checksum": "91bc4299023fbe04c4827e25d5fe2dcb9e4e9cfcdfa1cfc26a4c1f2a01873139", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-ea.11_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-ea.11_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.11_windows-x64_bin.zip", + "checksum": "16b9aad2875f97a67c73a64ec8a003a1187cef37e8ec3ab80097e758d51f15f5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B11/sapmachine-jre-11.0.9-ea.11_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "d047a535303028bbb24ddc6835ff4e316976756260d77a56f89c706c5c837f11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "1740f96720c75860625cf15659b8979dcbe04e718a542fb4808670b8c10fe4c4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "879a9277479c1e6710d8a06b9698e6dcbdaeef6d667de28d9ca8580ad220fcc9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.10_linux-x64_bin.tar.gz", + "checksum": "6166f7d7067a2bfe8aabbf4968de025ef49ef976d3f0b074867a4d4e02178af9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-ea.10_osx-x64_bin.dmg", + "checksum": "0792d7ea56b90ebd80a78dfe459c301d12c7192a9a73e33da4c622ff4756d268" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.10_osx-x64_bin.tar.gz", + "checksum": "f62d5018343356456e647062bd10ce5dcb68d7649767f15db59ea77a39584d90", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.10_windows-x64_bin.zip", + "checksum": "17dff3532cdf13934c9ab1b0e2cede566b727ee80630d957dadda59473ab5c55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jdk-11.0.9-ea.10_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-eabeta.10_linux-aarch64_bin.tar.gz", + "checksum": "35b9f4c832645a9fdc66196b66f8254c44fb81221ad4c46c0c90bf5382b0980b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-eabeta.10_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "92259120ecb62bd36a32af7a52bf4498da24a605ae3c331329be480ab11f2b16", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-ea.10_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "ffcea7f6391b93e92f50378361409821aa6173819c17c82b77db8ea08bea9f09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-ea.10_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.10_linux-x64_bin.tar.gz", + "checksum": "ffa43b5ab6709c2570b3efe4cc82b71fda6d5bdef7283f929ace31f177fa6e46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-ea.10_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-ea.10_osx-x64_bin.dmg", + "checksum": "5b9b55f4f671bee1657fbccc024445172b22c2f767db303459ea580b5a772abd" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.10_osx-x64_bin.tar.gz", + "checksum": "0d4b27112054f061c8c972dcebc748dfb73f7c68e3020efd16f93282f68b5661", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-ea.10_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-ea.10_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.10_windows-x64_bin.zip", + "checksum": "062fd34d309a78be0a822df5d6c695acb64d2d88cea0f773f2183267fc100673", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B10/sapmachine-jre-11.0.9-ea.10_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "0019e29d7913758f6a09fb9f1a75897a58678ff84e594131a2cd4aded7c27210", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "024a5c08b9936f2be79459c2e43941c4f8bed7a2b4bf8d6aaf7142435fcfe482", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "67ec7669290dd4abd809aeaf5777bf9ddb1961836992c8b56db04de7469f766e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.9_linux-x64_bin.tar.gz", + "checksum": "525287d686ff8454967b64137ec12f27f13a31e1376337f70b32ed57f74b242a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-ea.9_osx-x64_bin.dmg", + "checksum": "0d87d37debb76ee6f7c9342cdc519b2bacf48932f2740330111095f639c58427" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.9_osx-x64_bin.tar.gz", + "checksum": "94ef490164f126df1f56bd11721faa349c3cd691487ed74272e8df49af11fc72", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.9_windows-x64_bin.zip", + "checksum": "f39a19b28c144ac4a8000d569ce25ae6a419d365f2785d8acba68c1c51fc3097", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jdk-11.0.9-ea.9_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-eabeta.9_linux-aarch64_bin.tar.gz", + "checksum": "be7856e039d7debf6daa654c6b89e23fd8eaee4579ee01b77c973cb931fedf68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-eabeta.9_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "1cc95cb4ecc7da179c6d4e353c898240e479621378bfc477234192ae89d1af2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-ea.9_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "c6cb3605cc821094cd893c7c062e90289b8633853f8e1c759db3f881ad3f8546", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-ea.9_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.9_linux-x64_bin.tar.gz", + "checksum": "95f0c4772059581678fe2e78df6a2fbe0267c753f0f4f11630557cebf2fb0a53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-ea.9_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-ea.9_osx-x64_bin.dmg", + "checksum": "5dee611c0221f0275e0cfaa000f86cda0a65723cbb5054d612ee70ea05903062" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.9_osx-x64_bin.tar.gz", + "checksum": "c873b64ceef1ee6432bc5132c4bacd86fc13f3008bfd54732aeaae7234a3d35c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-ea.9_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-ea.9_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.9_windows-x64_bin.zip", + "checksum": "7900ddb67148ac88bfe3dad0e5a74408fe20b96b260938d412cb299323793919", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B9/sapmachine-jre-11.0.9-ea.9_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "4615d3f5a8c7f78c9da5d35c8ce5fc036f275e24ff51164b06d46517c853a119", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "690a85361b8b5a43806a648508b66300d2cd3b9857ed996a5d774ea972aa6fb6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "91e13fd3633594878dff8a4b81657140fa878e1c7d0fdfab9be725cc8bc510b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.8_linux-x64_bin.tar.gz", + "checksum": "ca1cdfd8a83c8daa011c40f791274afcc389e9af25da5558e18c99ceb7aa033a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-ea.8_osx-x64_bin.dmg", + "checksum": "d4518e369a8273e1cf9e5026709e59266dea6b319451cd4492bc750766d52fa4" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.8_osx-x64_bin.tar.gz", + "checksum": "2fb27f6c6824e159a35fe7a1c80c534ca6f106c6bf1371d542c351c7546f1cd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.8_windows-x64_bin.zip", + "checksum": "c98ee8485a73e708345b91577fdeb742843419fd6f2c1a932975db1c27fc47e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jdk-11.0.9-ea.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-eabeta.8_linux-aarch64_bin.tar.gz", + "checksum": "98112773cc2bcc534da5dd663fa186d90201a459c7eb9081c32bdf1157bbadc0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-eabeta.8_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "41ba0647a0681cec36ccb7fe9cecf76ec2af90876b8e0f3e005b7c09da818ca9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-ea.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "dbddcb551eaf154c4bd9e169cb9bced827ad4b9be10575ad21aa55db64702fa0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-ea.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.8_linux-x64_bin.tar.gz", + "checksum": "cd8c6aae418caeef75e0b8ae14b542db5b3fe7f43fbfd3be2b7a2cadd604b8fa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-ea.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-ea.8_osx-x64_bin.dmg", + "checksum": "fdda57f320ea5b68ab3f668ce62ae12cd6a97b92f92716c63576bf0a553262c1" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.8_osx-x64_bin.tar.gz", + "checksum": "54ef244942a8e3a0b4270a7e5e86f4ecea1a6b5b83d3b3d5591e3beac22ffd8f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-ea.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-ea.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.8_windows-x64_bin.zip", + "checksum": "798845f8e4f47fa5101432febf6842b1cc315f00fed4d08bd14bd4e2634e2b63", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B8/sapmachine-jre-11.0.9-ea.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "d64ec17d3fc312de3811edc60a02781981a3dfffbf381dcae79095f7d0568639", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "06b59c5a4776c3fc7948551c41ff2861a481a0ef42f1a9a541d9ce75a212bded", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "28396bdd5360c71e86439f88c02596fd539e31b87c8cb63b7bee7c382194246f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.7_linux-x64_bin.tar.gz", + "checksum": "a000a4b22f22b376b992bb1eaec5c1e6660fe319bce5ad06b1f15bafb3806096", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-ea.7_osx-x64_bin.dmg", + "checksum": "af86a05880df6ac8660a264068bb5d4b021187d6436ed29f5e2de1f77f5b5d18" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.7_osx-x64_bin.tar.gz", + "checksum": "bb7c65dab42e863d5ca6f1d81ff01a4a2e85cc387052b18bc3d0e4c4737488e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.7_windows-x64_bin.zip", + "checksum": "d2296daf37e23e1797beafdf87ec721dcf27756bf12a57218c14917a4345e8a2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jdk-11.0.9-ea.7_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-aarch64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-eabeta.7_linux-aarch64_bin.tar.gz", + "checksum": "cde4342dde77a2431ba652d289d4305123eec6f0c3ca71bd87dba6dda2dcf637", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-eabeta.7_linux-aarch64_bin.tar.gz" + } + }, + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "84826b78be9c5c756c5a9c2b74584c2e0e9c7b553208f58be7d7a85405db3aed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-ea.7_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "5fa8f0a97408a988e1c0f31cb6364b76a4d99a8319fa7a9b9d97d30b3f0b3ef1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-ea.7_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.7_linux-x64_bin.tar.gz", + "checksum": "0237e88ac03d7fc8506ef53874316a62c597b064f0b6283d03601428954716ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-ea.7_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-ea.7_osx-x64_bin.dmg", + "checksum": "e8f797e4215c115287bc80872e4d0a9a547bae4066c1888d19894f6691fa0355" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.7_osx-x64_bin.tar.gz", + "checksum": "bc46ee7a55de03a15813d118b894e43b267c88eb7fb20104f3e5751e017e78c5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-ea.7_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-ea.7_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.7_windows-x64_bin.zip", + "checksum": "43c9be0bd42a899bee16a1af667b875be310274a16d872724ff291ae0c3e0f09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B7/sapmachine-jre-11.0.9-ea.7_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "1ef24e87a467662be8832e2dec9490134eea3ae40db4b8f0ce21c8d4e29e1f87", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jdk-11.0.9-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "725cbce283e44262ae0882f2d2503a2c0d509780baafbc70b42fc94460ecbfc9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jdk-11.0.9-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.6_linux-x64_bin.tar.gz", + "checksum": "091a9108d5d05a79859a62043b71ca9364f6f1498577f5d65d3dba1c242cb41c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jdk-11.0.9-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jdk-11.0.9-ea.6_osx-x64_bin.dmg", + "checksum": "2b0438e9680160363cc931c8430f6184268b694dbab5e63f57173c469dca7a8c" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.6_osx-x64_bin.tar.gz", + "checksum": "898dacff8d28566697cab8e52f9eb6d9ab3f8ae895e51681c0ca1fb8341da304", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jdk-11.0.9-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jdk-11.0.9-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.6_windows-x64_bin.zip", + "checksum": "23fbb56495a9d2ead54f79c8b9edf9ba1ebfc5f45e7dbbc4c81810abdb94f608", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jdk-11.0.9-ea.6_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "d34212d0c4e8710368bfb716411af73157d80eac82fed8122aa713cfde937380", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jre-11.0.9-ea.6_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "3a0cc4d7770ee8ab290d3893105164b7da2600ef9e01944f4dd401f2f83e1462", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jre-11.0.9-ea.6_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.6_linux-x64_bin.tar.gz", + "checksum": "ec75072bca0305e5f3efbfb96961dc5c87fca945da580cca6392b2763245bfd8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jre-11.0.9-ea.6_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jre-11.0.9-ea.6_osx-x64_bin.dmg", + "checksum": "ad45b9514a34036b19c51a8f74414a284ec5a01b0572409e856dbc380b424023" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.6_osx-x64_bin.tar.gz", + "checksum": "1f30395186995902aa9171c6186b72bdf6b082b71f379146b9ec8e0c4500d3d9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jre-11.0.9-ea.6_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jre-11.0.9-ea.6_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.6_windows-x64_bin.zip", + "checksum": "4b356d42b263ab2f2147a58bf27c32f0e9c10eca33393b31645f7ac5cd01435d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B6/sapmachine-jre-11.0.9-ea.6_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "87deb6712199aa6aa941d84b9d1b6f0eab460e626f45c6aa8ca4ed27d00d2d8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jdk-11.0.9-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "742e04d96e053bce6c1a40bf7c6d54c66ceb3b982c0dfb784df1d511dec465af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jdk-11.0.9-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.5_linux-x64_bin.tar.gz", + "checksum": "5e4373f6145264c5bff94d74aabfd52eb715ebab2954eabff220d99270d3e571", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jdk-11.0.9-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jdk-11.0.9-ea.5_osx-x64_bin.dmg", + "checksum": "554a66799f883f1fee635ec65bba77afc63e7c7a9cdb789fa6abe3adf339645a" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.5_osx-x64_bin.tar.gz", + "checksum": "35d1069f38e1ec0cd8e5dccd4ccd448ee7179f9744c23c01d759f5a23ae56297", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jdk-11.0.9-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jdk-11.0.9-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.5_windows-x64_bin.zip", + "checksum": "4a750ed9776bb5406421ae4a5db9f802a0dcc224fc0b43f3d1c85d9b804f5281", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jdk-11.0.9-ea.5_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "2d338ee962b2e24c3439e57d7b9eaa2a1bd593a1699fdbf67019bb20ae779864", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jre-11.0.9-ea.5_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "508bfda49f9dbaaafcc5391142ff44d017fe380fd0b63884c2bb0ec82aa9c178", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jre-11.0.9-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.5_linux-x64_bin.tar.gz", + "checksum": "7fee538413bc5db1f9a5fb3bce5f86284865fe050acde28b779b85953cf93843", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jre-11.0.9-ea.5_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jre-11.0.9-ea.5_osx-x64_bin.dmg", + "checksum": "16863c41a97f2114f6ae8e5cc0e41ccd5e7d82a0adc1a23a30dee0dfa08fa047" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.5_osx-x64_bin.tar.gz", + "checksum": "baf6400bf2a4d59117153de992b83e0943c0e9496c62fa3480961bd13f3e0a24", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jre-11.0.9-ea.5_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jre-11.0.9-ea.5_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.5_windows-x64_bin.zip", + "checksum": "30a170bb1a6597ebc1a385874124a81b369a8d3fd26c72a8c1d32b0328220812", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B5/sapmachine-jre-11.0.9-ea.5_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "d3e4b8f3b9862ff5a1bb603e6e199c24fd11168a353aa10d03a0c8d44d048070", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jdk-11.0.9-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "a96859e2626dc65be07746a0f5075fc7bac19dfc6f48660b258482fdc80c679c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jdk-11.0.9-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.4_linux-x64_bin.tar.gz", + "checksum": "4dc09afab1cc0d52aa9077a44e28f8142cecb73ea34da738a872fdbbc1249516", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jdk-11.0.9-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jdk-11.0.9-ea.4_osx-x64_bin.dmg", + "checksum": "0b52dd84eb0bed3986fa030704967eec1179234c995c3a6dcb587e13a56a5231" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.4_osx-x64_bin.tar.gz", + "checksum": "96ff732f631f3a92423a947f510d676ae9b1c5e9e95e447257facb68b17d4e91", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jdk-11.0.9-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jdk-11.0.9-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.4_windows-x64_bin.zip", + "checksum": "6833bb2cafc12430fcd5feaa13951fc2771db18bda612c07a7e9f681c7404da7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jdk-11.0.9-ea.4_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "b94ac5c556f7f9a0ce24ed91116734afda09666b8b2f0c3fe26d8eaabd72c4af", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jre-11.0.9-ea.4_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "fc936539ee5da896a8e3c5bee13d8df09428571a010c5f1cc0250504268b4b44", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jre-11.0.9-ea.4_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.4_linux-x64_bin.tar.gz", + "checksum": "f9a72834c1f741f18cfae5c74ae793f7959cbf4d15b1b5acee8d5ced9a30a183", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jre-11.0.9-ea.4_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jre-11.0.9-ea.4_osx-x64_bin.dmg", + "checksum": "b30f28f74cb101e2474d84a031a093db36e8d7be0b0825eee91c72e3577419d7" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.4_osx-x64_bin.tar.gz", + "checksum": "babde94375972b5537a969e130945e5be5c522f2fd8b9b0664f9b42730a1ce52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jre-11.0.9-ea.4_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jre-11.0.9-ea.4_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.4_windows-x64_bin.zip", + "checksum": "32515803e2862898b95d88bcc0b34ea51c10b74ca80f4a65e3711ba6d2571a78", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B4/sapmachine-jre-11.0.9-ea.4_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "0c124a0059ef92de5e055911fbb6dbd75fdda2129e11edeb3641682f05a25765", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jdk-11.0.9-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2f5b2d55a0d09f3e051c22eafcc0e510f0d30a34ebf45f0495d905b6a001cf86", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jdk-11.0.9-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.3_linux-x64_bin.tar.gz", + "checksum": "ab9ecf77a4401c1ba3a822bfe360c224f2d678ff8d246ab495f52c491e61c1cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jdk-11.0.9-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jdk-11.0.9-ea.3_osx-x64_bin.dmg", + "checksum": "2ad371c0c18a0fd1c62c5700aa2e9620f6fd0ac0c3dbc2a42f698f4081c88bcc" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.3_osx-x64_bin.tar.gz", + "checksum": "469784c1f79f4e04e157d75ce15472f1960c5336a0d919a7296ea792b4dd188e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jdk-11.0.9-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jdk-11.0.9-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.3_windows-x64_bin.zip", + "checksum": "c386a4bfa57740b4f943aabccc33eb27ada584fb4f9c5d41c21d2a04680fe1db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jdk-11.0.9-ea.3_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "2d9fba97dfde1b80657e534845cc85f482e65610b2ad742b3e2357fb1cb11b1c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jre-11.0.9-ea.3_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "e0076a6bc0edf65dc23b3e031ec05e8e87ba4eace1c0a155f7582548b4673c26", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jre-11.0.9-ea.3_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.3_linux-x64_bin.tar.gz", + "checksum": "e1811550e6b0c4539df6c57837acc46bc5b36d79ce80ee5909e1226f4de835db", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jre-11.0.9-ea.3_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jre-11.0.9-ea.3_osx-x64_bin.dmg", + "checksum": "a5d7640c08c40661543da857ab7d615ad25292f06775c8e1ef41a74979f70700" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.3_osx-x64_bin.tar.gz", + "checksum": "247b60ced8cd04c5c61c678da05d4df705d16ff2bbf2356b15accd679940c1aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jre-11.0.9-ea.3_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jre-11.0.9-ea.3_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.3_windows-x64_bin.zip", + "checksum": "fbac435865167aacbeaf937122d01b6fa7c5850fc3df3cdbfb74013140688597", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B3/sapmachine-jre-11.0.9-ea.3_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "2f33ee01abaa4501ed5579ec553bf17ff8669c87ce44dfe4ed000b3a7e34f507", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jdk-11.0.9-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "cdc61ea986a653f87870d0c7c327ba8169cf54dc24055de2728677a077c8bdf1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jdk-11.0.9-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.2_linux-x64_bin.tar.gz", + "checksum": "e3d3428a054398648bb3cd95e641095ce979452a2a851fe60016fba2a183b310", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jdk-11.0.9-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jdk-11.0.9-ea.2_osx-x64_bin.dmg", + "checksum": "59a564f17a050dd576117f115c06e9978377fce6ccda4f658b174771b04f6ab5" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.2_osx-x64_bin.tar.gz", + "checksum": "03be1474c212d6c831ab469ef26afb7ef59b0da5de882c84b7694fd5edbf3cd1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jdk-11.0.9-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jdk-11.0.9-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.2_windows-x64_bin.zip", + "checksum": "03328edae0c919b6b1d4fc78acb882a5926e8afe86581e29c48866dcf80d39b8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jdk-11.0.9-ea.2_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "51527874d6eaaf9909d68eff06ffd5a2296077d4169c3078425412eb006c6d52", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jre-11.0.9-ea.2_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "3f76408bf932bd4c605bae3adc1f8b684598eecde99509c5d0e88dc91659dacd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jre-11.0.9-ea.2_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.2_linux-x64_bin.tar.gz", + "checksum": "d10bd0029c985b0709f8a85d5f0c8f0dd56bd1b0e849350f9c56b99846df3f68", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jre-11.0.9-ea.2_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jre-11.0.9-ea.2_osx-x64_bin.dmg", + "checksum": "78763c8aa76991335979ac6449c97ee6345bc62cb1ab648260ddde72edf5ecf1" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.2_osx-x64_bin.tar.gz", + "checksum": "e47ee8083504b5dc2752bc0dfd638de3dc6741a100395f36fea94b281b58ac0e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jre-11.0.9-ea.2_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jre-11.0.9-ea.2_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.2_windows-x64_bin.zip", + "checksum": "573465ae13194b937fa95689a2cfc8e8edcf8e42afc0417f33ad815088ba1265", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B2/sapmachine-jre-11.0.9-ea.2_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.9+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.9%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "9debb78ff09f2d462b3abcc75c2f9873a5c7d29074f6bdbdf88b457d657da3ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jdk-11.0.9-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c7a45f4345a9d1fe17ab643213a29c1dede56d4b9ecd59987e2943366755c53e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jdk-11.0.9-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.1_linux-x64_bin.tar.gz", + "checksum": "d1aec0944be68fae3ed5f50207d5158a6a41048305c81db45176299dea57672c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jdk-11.0.9-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.9-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jdk-11.0.9-ea.1_osx-x64_bin.dmg", + "checksum": "c2b959353e904bb64e99408507b01fe35b574ff2f37ccbaa2693945beac46338" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.9-ea.1_osx-x64_bin.tar.gz", + "checksum": "e97b1d3f68283eb8cea03de1e5a29eb796ba7eca1599fe504f901fee9a2226a9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jdk-11.0.9-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.9-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jdk-11.0.9-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.9-ea.1_windows-x64_bin.zip", + "checksum": "2d5d54965a4772f5bc74f6cd8c4c9a34923d15dec7a06235632901ff8e59d429", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jdk-11.0.9-ea.1_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "470a8fab6b3d2471edaf4cb64ebba2607d2e1d601b568a6af9b13d7b10401c56", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jre-11.0.9-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "96c764c2ae66301d7029f66fc178fa9b3c92face0c29b66c7b795a6246791c8d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jre-11.0.9-ea.1_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.1_linux-x64_bin.tar.gz", + "checksum": "d0f3c174e1311c69b8b1c5fe08a5d8df465d16a5a07de96ef8b19c674390e3c3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jre-11.0.9-ea.1_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.9-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jre-11.0.9-ea.1_osx-x64_bin.dmg", + "checksum": "1ac43954c713b1ce139a26de13cd4fbc9d63742d48ca7b40dcd6679f8b7cf217" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.9-ea.1_osx-x64_bin.tar.gz", + "checksum": "83a8bc051980438f4a20451c7d5d931c257f95f32d4abdb2165cc8f8c5b78688", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jre-11.0.9-ea.1_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.9-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jre-11.0.9-ea.1_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.9-ea.1_windows-x64_bin.zip", + "checksum": "b3e32faa9a87100a347592863a967b0ab238316bbc042a120e176fde8ce947ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.9%2B1/sapmachine-jre-11.0.9-ea.1_windows-x64_bin.zip" + } + } + } + } + } + }, + "11.0.8": { + "sapmachine-11.0.8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8_linux-ppc64_bin.tar.gz", + "checksum": "eefa502045b44fefcf81dc4cf8f33f3cc259d78d85d113420afb17d0cee50916", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jdk-11.0.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8_linux-ppc64le_bin.tar.gz", + "checksum": "89319a75c5b3d1438a01abb3390c6f6de2df4dc9d5c5ecd854412a4685ab1778", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jdk-11.0.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8_linux-x64_bin.tar.gz", + "checksum": "fb0a39e18ab893da6a27a0b7f09f52b0b049503205d4d1c29a2228cb16372539", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jdk-11.0.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jdk-11.0.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jdk-11.0.8_osx-x64_bin.dmg", + "checksum": "15829218eb47303b74eaecbc28d307c10123d841e67fe9701a904cd45365dc2d" + }, + "tar.gz": { + "name": "sapmachine-jdk-11.0.8_osx-x64_bin.tar.gz", + "checksum": "6935a166231deb6357e83cf6b0be214b06d05a73415bfda45f367c0eec9edc55", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jdk-11.0.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jdk-11.0.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jdk-11.0.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jdk-11.0.8_windows-x64_bin.zip", + "checksum": "19ed73a3bc2a1f8e1fc2409f4e3c1fba9ef93d43ec267cb9ebcfaa5f0f43e3c8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jdk-11.0.8_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8_linux-ppc64_bin.tar.gz", + "checksum": "4d28cdc480de486fecf495af8ed15dba27020dc4755fc2c0872116ec1ecca319", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jre-11.0.8_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8_linux-ppc64le_bin.tar.gz", + "checksum": "52be20af0f4d0ea672a3f2eb561e71e9b3a5af214c254e56c43410a340810fd3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jre-11.0.8_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8_linux-x64_bin.tar.gz", + "checksum": "e4fba48b4752c73901ea62dcec6b58e1abcab10ce768499a68c0fe7c3b2b3f99", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jre-11.0.8_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "dmg": { + "name": "sapmachine-jre-11.0.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jre-11.0.8_osx-x64_bin.dmg", + "checksum": "144bdd632c053b755fdf9c6a8f23b70dfa76b9a5d6c0ed9c578cda15ef835a77" + }, + "tar.gz": { + "name": "sapmachine-jre-11.0.8_osx-x64_bin.tar.gz", + "checksum": "9cacc02c5a6f6818de6488c39459cdd8e27bb103c6de56d158d945a8c2d698ad", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jre-11.0.8_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "msi": { + "name": "sapmachine-jre-11.0.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jre-11.0.8_windows-x64_bin.msi" + }, + "zip": { + "name": "sapmachine-jre-11.0.8_windows-x64_bin.zip", + "checksum": "2f3ba1cae2e5170b9f12e41d80b303fd8f654a1ac1df40f750c5eab8c4c6d3a0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8/sapmachine-jre-11.0.8_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11.0.8+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jdk-11.0.8-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "a94a589d69bf65ec1374a24a088f0784236b4d2b2504520f06cdeadad1745c7c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jdk-11.0.8-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "361f030668d917b7164c11ab15adbf55a49ab5a8a6fef6853aba059a54c3fb9b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jdk-11.0.8-ea.10_linux-x64_bin.tar.gz", + "checksum": "a62adf25334009ef9a38a303b983fa88a2afc17467dd1b8949162207d7527446" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jdk-11.0.8-ea.10_osx-x64_bin.tar.gz", + "checksum": "49f8351672650a2807f8d69355be0327d4f5e5ff3e40b6ba5abbbadd56511384" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jdk-11.0.8-ea.10_osx-x64_bin.dmg", + "checksum": "10a06bd50d24db4bc0e43c417365c9f79a06cef676aa24fb2b6a11b7a72a4273" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jdk-11.0.8-ea.10_windows-x64_bin.zip", + "checksum": "5a06d93531fb90af3b6f25ecc3b28e98993076be24f0d817e1ee1eae6aef418a" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jdk-11.0.8-ea.10_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jre-11.0.8-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "52e5a4d0306190f19a3ff34cb26a6befd6e4b6a1ac02e6609ed681401ab59b83" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jre-11.0.8-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "07527e7d198c834d43a12340a91a3b4d2a9fd7acf488f8c783b78416bfb41940" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jre-11.0.8-ea.10_linux-x64_bin.tar.gz", + "checksum": "50f06e2603cae25cf3ad795593cfdeb366b2ecbfbb38549a85929c52719612cc" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jre-11.0.8-ea.10_osx-x64_bin.tar.gz", + "checksum": "c7fda8a74fa0db98bf52b650f213fbb82ced0ef4da77d47de452c4d717fd432c" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jre-11.0.8-ea.10_osx-x64_bin.dmg", + "checksum": "81b90dfde5884b30132e701864ed598346bf31002ace00081676c51ad0e7a49a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jre-11.0.8-ea.10_windows-x64_bin.zip", + "checksum": "fbbd13cc3c551d7ce14423aac9715eed810b5466de78c6519fa81bb60226b727" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B10/sapmachine-jre-11.0.8-ea.10_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jdk-11.0.8-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "bd20c57f44a3fe645dc5a6482baab2a5bc01dacd84691ed4b59ec230bfaac230" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jdk-11.0.8-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "7e34db131b220684576ca0286e378653aa0320d37878a02c61af4fb0d63c89e1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jdk-11.0.8-ea.8_linux-x64_bin.tar.gz", + "checksum": "1d18531fad163d6a9f785d1ea9cebc2c80f6d944c7231969104fcf5a9ecfaf21" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jdk-11.0.8-ea.8_osx-x64_bin.tar.gz", + "checksum": "5cba707fe4f218d4e52b0992ae671e239559e6cab56dd16b9468d4e510532306" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jdk-11.0.8-ea.8_osx-x64_bin.dmg", + "checksum": "031ed29a34e959c98d9b05aeaacb4ddcb9f0c48cc1e2dabae9aad3794e666bbb" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jdk-11.0.8-ea.8_windows-x64_bin.zip", + "checksum": "a896549f2ef13ae10b16243f0f76883ffa9010b9167d659dbb512cd929bf47e4" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jdk-11.0.8-ea.8_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jre-11.0.8-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "46a67eb912298cec8b6d9cc50a9cfadadfeb8ca536e988fd1599c77d9fe070e2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jre-11.0.8-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "a36c44e3bc459e9d968793fe8ca2317871e947ea7872c4c5f5919b11afba840c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jre-11.0.8-ea.8_linux-x64_bin.tar.gz", + "checksum": "74419aba944184a68ef6bc67d056c57efbcb3314b9491f0749e167c1faa8bd2c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jre-11.0.8-ea.8_osx-x64_bin.tar.gz", + "checksum": "ad090f32f5e2542fa23711daf5623626651f972c8c0ffd49edbc917f7d437c82" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jre-11.0.8-ea.8_osx-x64_bin.dmg", + "checksum": "bcbf5fcf8c547062a56f0ca140942ae6a113d9c2a1226c7d189da77eb4634539" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jre-11.0.8-ea.8_windows-x64_bin.zip", + "checksum": "2e3f4f00516c8a5c4223a1b5f0ed39d8b9b6a4630e43e2bb9cf89ff88a9877a2" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B8/sapmachine-jre-11.0.8-ea.8_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jdk-11.0.8-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "321443cc3f3f32a6182c4d828912c9cd218a1f97b687ce9817425b5004ba9224" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jdk-11.0.8-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "e1658daab0646bc26de3b2724035298fa0ad6d1d75e0d2ebc51d42518b4195ec" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jdk-11.0.8-ea.7_linux-x64_bin.tar.gz", + "checksum": "b29602f62e787dfe0b1866198805c4f5a3f6d7152689d463092e650bcad2b7b0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jdk-11.0.8-ea.7_osx-x64_bin.tar.gz", + "checksum": "6834fefb90c30cac44dfc66fe1efb9d80b4ba6917ab73c21ae45c23606c1f8ea" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jdk-11.0.8-ea.7_osx-x64_bin.dmg", + "checksum": "38c3732fc59b7783e233a0b14b5fdc60e0888a1e765050fd874c64eac9288a7c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jdk-11.0.8-ea.7_windows-x64_bin.zip", + "checksum": "fc34c58a5aaaf6c9b0330811a090e0470c6a9a682867dfb8da92a66312e1ae50" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jdk-11.0.8-ea.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jre-11.0.8-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "8e29372a72881e9c535826500e8c489f370ac20531635b9c81d13c47f49a10d4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jre-11.0.8-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "1af57b46439a632aaea7f2df560b38727c0b2d0da73503effa4eaa30491e5ac2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jre-11.0.8-ea.7_linux-x64_bin.tar.gz", + "checksum": "4ffa9ef46251a754f20e07e431419718783e997348cbea9a68ea5f24a3a49c73" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jre-11.0.8-ea.7_osx-x64_bin.tar.gz", + "checksum": "92ea224f0cbd90426bc601a23a14429014b3bf1949a7ec78d8b74ba28d80cb3b" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jre-11.0.8-ea.7_osx-x64_bin.dmg", + "checksum": "ce319e426b5d11106250ee8ebc0cdd9246d464b6d0880db31863f485374853bd" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jre-11.0.8-ea.7_windows-x64_bin.zip", + "checksum": "cb9fe305bca398a284777068c71c751e2df1af935c637bfb7dc9785bfa121e86" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B7/sapmachine-jre-11.0.8-ea.7_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jdk-11.0.8-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "bacd765e0f0b4107fdfb8cd93217ad776d4924c58ca1af22797aefd2118321a5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jdk-11.0.8-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "35efe4f4565bb0ad35a8c03b3ef4d9754658be100c18f55dfcbea318fb600038" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jdk-11.0.8-ea.6_linux-x64_bin.tar.gz", + "checksum": "f2df3976542767a864dd88e44bc00b6147c7567b2322ad5c26899a2814732458" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jdk-11.0.8-ea.6_osx-x64_bin.tar.gz", + "checksum": "227e6232e4eb288deb0c9064b3132396d040c157d0e26da92f83f5abbcab46f7" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jdk-11.0.8-ea.6_osx-x64_bin.dmg", + "checksum": "af9d1fc627941a6d03fdb5df6de1c0e059393a475ee921b845b759de28d526d3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jdk-11.0.8-ea.6_windows-x64_bin.zip", + "checksum": "936ce633451ebb18deaafa988af7e42f71019b9784f5668f6ae74d7302c883ab" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jdk-11.0.8-ea.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jre-11.0.8-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "54a6a60118a83b54a53af4e9ca09bb887e537a019b206177a0c7d4101d13fc8d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jre-11.0.8-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "9dce4a875a75f70873abe2140b51d48c596901e1f4ed4e4f7e5c8ad45ad5c13a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jre-11.0.8-ea.6_linux-x64_bin.tar.gz", + "checksum": "8c6f4522598bbd4725dc9565fa8b25c1ac001602b05118dae284bba2b68b4e6f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jre-11.0.8-ea.6_osx-x64_bin.tar.gz", + "checksum": "948c073a7bc3d3a4742be40b89e9d23021afb61715bf01c5e103ce90af261924" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jre-11.0.8-ea.6_osx-x64_bin.dmg", + "checksum": "1394f7f2b6dc5dac67e39323915f2ea168d0e824ca8d9fabf231b499c7ab309f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jre-11.0.8-ea.6_windows-x64_bin.zip", + "checksum": "6b2c2ac6c4c929bc2b9e99e70d4da1df6b2df9485778917a72a35b937ff1ebe0" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B6/sapmachine-jre-11.0.8-ea.6_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jdk-11.0.8-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "1c6c19550cc070e217bc929d1d2355309811a9a0e013e27671e17ae5d67500fc" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jdk-11.0.8-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "b0b29d8ff1a036036431ba21c98248e786d6cd8ef0544a2a1be37f7a62dd7152" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jdk-11.0.8-ea.5_linux-x64_bin.tar.gz", + "checksum": "1f15c25b3f8212f07cbe3df5a596f8540b6a99a37df778a93e366c75ec662e53" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jdk-11.0.8-ea.5_osx-x64_bin.tar.gz", + "checksum": "f93db16253bbeaf8cdb3d7f8c471e139fcba2d1a66e5ae09c57c50d7095a0473" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jdk-11.0.8-ea.5_osx-x64_bin.dmg", + "checksum": "8690e6a4094e4a9693f5c82ff93d969e4a2764f869392e38baac41546f919ce2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jdk-11.0.8-ea.5_windows-x64_bin.zip", + "checksum": "4927cce4cf6a2904b46eb23d580d18014d3938b59a7ccbcd9c261ebdcdcef5fb" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jdk-11.0.8-ea.5_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jre-11.0.8-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "4d3e85b6703783db1a39debee67b452ed485a93e524089b8993aef92f9aa0b85" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jre-11.0.8-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "545865aaf445ec7cc90a3e5a48c699428d09f3a3b0e65c8d1627831414e5605c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jre-11.0.8-ea.5_linux-x64_bin.tar.gz", + "checksum": "e335054353d2993b9f5868d979e33ee92897b42a01b40b307d0c0235491863ce" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jre-11.0.8-ea.5_osx-x64_bin.tar.gz", + "checksum": "bf1151ff94ea131094b6d9de1fe292995e80c54a97fe3a6e68bee9e25321c7d1" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jre-11.0.8-ea.5_osx-x64_bin.dmg", + "checksum": "54fcfe56e3b2fea48b5fbeb6dc8c6273e6f80797f81fd6edbcd8f2ad351853d4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jre-11.0.8-ea.5_windows-x64_bin.zip", + "checksum": "52a08df69407ee338e9be0b00057b059c047ec59c5424f940b9c44a519a1a818" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B5/sapmachine-jre-11.0.8-ea.5_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jdk-11.0.8-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "e9192ff4aa1b7bf2535a499ce9aa1ac176f317a0d40abfeeb187865cc9ffd350" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jdk-11.0.8-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "3f953e517dd127ac7c26b1983a10ba15aae0740369aaf54a57ef641003be7bb3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jdk-11.0.8-ea.4_linux-x64_bin.tar.gz", + "checksum": "564f5ad425d231017345288097e9c24c4837e2c72314cddb0203bc8735a06726" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jdk-11.0.8-ea.4_osx-x64_bin.tar.gz", + "checksum": "7989ebfdbd15f13b4c08a0efb335da1bea7d440be80b565963aa4bef036dc0a2" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jdk-11.0.8-ea.4_osx-x64_bin.dmg", + "checksum": "1c49b3f5f9cac69419136819fd58cb881b93995751f8c6c6dcfd185aae57dde5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jdk-11.0.8-ea.4_windows-x64_bin.zip", + "checksum": "63e6395d542fb99f1ccbd67aa76e73a2f929627581b50475375dfd96f109c148" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jdk-11.0.8-ea.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jre-11.0.8-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "73204fdb917d673ce45a6984465f5b39c00c4ae9bcc7132948134bb9f8fcb164" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jre-11.0.8-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "579146c1396e14732a3c8cd5c2e05cc65916af99a25c95e5e860523ae0db4d48" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jre-11.0.8-ea.4_linux-x64_bin.tar.gz", + "checksum": "a60c5a2ea2ca13155e093ed90ec9588960841a2e8819aa4d4e2165e79c35550c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jre-11.0.8-ea.4_osx-x64_bin.tar.gz", + "checksum": "74ac71e8282d98ce17d1de37b207c823db7df50542bb7d97f1b30c7ee9138259" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jre-11.0.8-ea.4_osx-x64_bin.dmg", + "checksum": "1a8d6eeb65d2a926ed260bec3de81f73fec79d5032289f250a9d95f256142f63" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jre-11.0.8-ea.4_windows-x64_bin.zip", + "checksum": "8d312092aaf77eeffee3c0920139f3c5b4d82872b092c0b4665caa451c4aad9c" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B4/sapmachine-jre-11.0.8-ea.4_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jdk-11.0.8-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "813fb1b17789d3b6039e1ad98aab853eb80adfeea8f1df9e728df81e14b079c9" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jdk-11.0.8-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "2dc2f94df3349d196bd563ae56f8d5a75d366c2008a04dc8d0d185c8450c6594" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jdk-11.0.8-ea.3_linux-x64_bin.tar.gz", + "checksum": "dc7229016eac937db91b3555def1c7a87af3b4739202f1199ed68058eecb2ec6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jdk-11.0.8-ea.3_osx-x64_bin.tar.gz", + "checksum": "36533501d8f1a6936f7da20446071e201b7bb572af493607fc19cba4161b211f" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jdk-11.0.8-ea.3_osx-x64_bin.dmg", + "checksum": "97e8c712b4cc733b0c3d10fab26420aa8536d5eba0c2dfb95621ed6f32692a51" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jdk-11.0.8-ea.3_windows-x64_bin.zip", + "checksum": "45b652bbcfd46ebb52389a4fc35b55f06ab11de6ec014caf778370301fb10806" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jdk-11.0.8-ea.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jre-11.0.8-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "f5525b90737b0816eedae1de2361cafbb2fbb0b3e468fd9be07ff2bba19da591" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jre-11.0.8-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "e91b483af6e3eeeb00c684b551f70768adfadfffa22d4386f7c13970e94fcdcc" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jre-11.0.8-ea.3_linux-x64_bin.tar.gz", + "checksum": "6dcd865bad1228119b5b1b9f8c93d2fa57860ed17349f80a5095d4a18c245575" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jre-11.0.8-ea.3_osx-x64_bin.tar.gz", + "checksum": "efa3c6d48261fc0cdba2865d24157fd504107071cd554468015d6c80edffa30a" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jre-11.0.8-ea.3_osx-x64_bin.dmg", + "checksum": "f2b9867250c4a8476c1c5d390b7428c9210383d000d9c832277bbc868414ed90" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jre-11.0.8-ea.3_windows-x64_bin.zip", + "checksum": "a67b855b8df7efa2b8b7ded9645ff30a7d65b5d1e62c0dd6e06666b2dc45beb2" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B3/sapmachine-jre-11.0.8-ea.3_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jdk-11.0.8-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "2367c8ea0b93b1f61b0fced40c53d34ad6277e4798f269a12c97d89426a552a8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jdk-11.0.8-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "9d2ee8ad198b81b1e191a11b449fb1cae995b15ce2a785bc8b90cc091b0a5eaf" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jdk-11.0.8-ea.2_linux-x64_bin.tar.gz", + "checksum": "9544ee4661ac826b10c2934ec85db6ea80060810445ef8f7b39a1c2a2e5de84c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jdk-11.0.8-ea.2_osx-x64_bin.tar.gz", + "checksum": "aca0906752a7e9d302b1c777887e9b5e3f00922797056bf6cddd827130d2ebed" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jdk-11.0.8-ea.2_osx-x64_bin.dmg", + "checksum": "8375256b674328fe1d7db8f9354de7e41c63aa71b0285e818a7e2ef89b27cb00" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jdk-11.0.8-ea.2_windows-x64_bin.zip", + "checksum": "706f906ee756d69a38bf9353d3ceadbebf7cb404b47def3a4383741c79a6efb4" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jdk-11.0.8-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jre-11.0.8-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "064a973ef1ff91fbb51d7f2b949c6fc7a9b11298766130ed1c9eda0a919b0ed6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jre-11.0.8-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "2833f007d40196413324bb667530dbc07f97358cbc7d71097ef5aea84dffef40" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jre-11.0.8-ea.2_linux-x64_bin.tar.gz", + "checksum": "1e722d64fa78bb09a1690b023bbf9f56b5958f7adc326b62cbae554372192b1a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jre-11.0.8-ea.2_osx-x64_bin.tar.gz", + "checksum": "143c50e5deabc965bc254477f7b4f859da65f9d3cf45639a7aa03a30d3597c59" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jre-11.0.8-ea.2_osx-x64_bin.dmg", + "checksum": "52e08f7d3e5bb7b0826ade7d7a4bd90a60decb097722f66a288a906c46458062" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jre-11.0.8-ea.2_windows-x64_bin.zip", + "checksum": "2b9e73b326817c5b8405e11a7465c49a232e450cf8554af208f456cfb4afc775" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B2/sapmachine-jre-11.0.8-ea.2_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.8+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.8%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jdk-11.0.8-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "2d3035700d7ae3d0704e4af60755e9f945461e76c9c66cd362833c7e05ff7c17" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jdk-11.0.8-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "61aa7bad2f4ea8563b507ced6c54e3af33d06530ffb2ac3eae468ae10a8c17ee" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jdk-11.0.8-ea.1_linux-x64_bin.tar.gz", + "checksum": "1a39818745abf88bf859cd11ac48456c4781c651eba167b2a8be85dd525fe35f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.8-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jdk-11.0.8-ea.1_osx-x64_bin.tar.gz", + "checksum": "4e42cb226bee1ee31b18c38b9c63f5551b7f8baea41ff48481484542dac16616" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.8-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jdk-11.0.8-ea.1_osx-x64_bin.dmg", + "checksum": "4c769c7fddc38ab7d0af7d2f41aeff756f656db0a2d75885ccb81007da7f9b17" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.8-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jdk-11.0.8-ea.1_windows-x64_bin.zip", + "checksum": "c623fb16485ef35e03ccab3308445d50b2f7c39d67843b027ae2d15fd980d7eb" + }, + "msi": { + "name": "sapmachine-jdk-11.0.8-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jdk-11.0.8-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jre-11.0.8-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "25b2a550461678f4c7cb9791bd2b92ac253a8c1cc5a6930b2d70e74b63dcf6f4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jre-11.0.8-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "abe920dbce9210ddd52dd266aefc3db17beba9566c995098e6a5708d8a5b3a1d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jre-11.0.8-ea.1_linux-x64_bin.tar.gz", + "checksum": "478a775ea5da76405b209bd95991b1f2b93721b8f2691c9676d43132bf1d8918" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.8-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jre-11.0.8-ea.1_osx-x64_bin.tar.gz", + "checksum": "35beef6ad6d196781a7402f3425bb9ae2ec5e1df532b37c2b7084589508b3100" + }, + "dmg": { + "name": "sapmachine-jre-11.0.8-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jre-11.0.8-ea.1_osx-x64_bin.dmg", + "checksum": "ebe952f18ec2c6e8564edf600a464a8d3351503114d4a49661386834623f222b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.8-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jre-11.0.8-ea.1_windows-x64_bin.zip", + "checksum": "99a5f61f1121d3ab9223a9fe7c0ffaedab918a0c7181d61615c6adc0c9c0eb15" + }, + "msi": { + "name": "sapmachine-jre-11.0.8-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.8%2B1/sapmachine-jre-11.0.8-ea.1_windows-x64_bin.msi" + } + } + } + } + } + }, + "11.0.7": { + "sapmachine-11.0.7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jdk-11.0.7_linux-ppc64_bin.tar.gz", + "checksum": "4f435508a9914d879c8e6eda5b5cbe4369ea169583d33619d7b4da2ec5fa910f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jdk-11.0.7_linux-ppc64le_bin.tar.gz", + "checksum": "a615ada7df3dd07509ad26ec02de4d34f9bb5180a84a45847116e60bdcbff9b1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jdk-11.0.7_linux-x64_bin.tar.gz", + "checksum": "1817306e827cd7f99b78530509d8c8d83035542231d7f319eff34d98170dd4fa" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jdk-11.0.7_osx-x64_bin.tar.gz", + "checksum": "0a3d51e9d07e46e8ce624a1e385efa186d99097c7c7c56e529ec6b50a5e63b40" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jdk-11.0.7_osx-x64_bin.dmg", + "checksum": "2a69888af8eb313fd91145eeea595cd6a3f9409d0a9ed9856ad74aa85268b9d0" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jdk-11.0.7_windows-x64_bin.zip", + "checksum": "3f16ce7f09598eb7b136de8dc6805b7cc0d1c8678a2bc29108e4952250b8c0cb" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jdk-11.0.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jre-11.0.7_linux-ppc64_bin.tar.gz", + "checksum": "6e006978a22d0297ad30dd443ac7fcfe1d355b0b418e2b1d61c7cfb4ad365d1d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jre-11.0.7_linux-ppc64le_bin.tar.gz", + "checksum": "52217de9e5b103afcb659ad91f48f35aee95302114dbb67ff1ba893b0b6adba8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jre-11.0.7_linux-x64_bin.tar.gz", + "checksum": "edd51958d1bfa1f9024c56e7298e741976b7d0edaa5be8b8cd6abb225806d43a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jre-11.0.7_osx-x64_bin.tar.gz", + "checksum": "dfed9f7f6d7a3a3b3dc9180fab238a521541564808074dbb536384a2070289a3" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jre-11.0.7_osx-x64_bin.dmg", + "checksum": "b694490e4331ab1d604a0319b8909d3863ccd92f45e2ec5439e55cf31f1e4a13" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jre-11.0.7_windows-x64_bin.zip", + "checksum": "e64c185440e1addcf9bd49c6b57a04d0fd340e7c628bb22a0d0b6bce4d5de492" + }, + "msi": { + "name": "sapmachine-jre-11.0.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7/sapmachine-jre-11.0.7_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jdk-11.0.7-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "eeb560a35fcb623b7ff823a8ecbadc5748343fc252df6bd056d50011944eb415" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jdk-11.0.7-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "7e6b63ba52d82e87adc3cae82e017de5e1b6f6c37333c0b0bf4250ca9d7f607f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jdk-11.0.7-ea.10_linux-x64_bin.tar.gz", + "checksum": "0041fe46999f27743270f996d3099ec7d63068d8204ad4bfaaee50b7cf604a83" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jdk-11.0.7-ea.10_osx-x64_bin.tar.gz", + "checksum": "ce91a6cef2393ed0303227d6757b53e8542608da3c0c82c8f28ace9a12f27b22" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jdk-11.0.7-ea.10_osx-x64_bin.dmg", + "checksum": "7acaf3896a96037aa4d289f65c00fc3c9921fb9d5463efe8ab47326280ad6ab8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jdk-11.0.7-ea.10_windows-x64_bin.zip", + "checksum": "8d7c3da2e0c24d1416c16b7e6461402221b721960f145b9c05f56f442f66ec0c" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jdk-11.0.7-ea.10_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jre-11.0.7-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "6ad0a29b7394ff2f61eac245d596ed3400ce88028b67c8d1e8bfb87f5f1c2981" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jre-11.0.7-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "5b1c75f43136ae6acc22763f53d54c27420e413723da6abafdb6c7b30855e7ad" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jre-11.0.7-ea.10_linux-x64_bin.tar.gz", + "checksum": "7d0cf8b40d2e4abfd570d953924e28588fc5c7ae896790b36fd0a2ec38f0111e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jre-11.0.7-ea.10_osx-x64_bin.tar.gz", + "checksum": "75f3c7d593cf7bd254b2fc3d8e11bd4b1da71749a42d8e3bcec82977d1f4a54b" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jre-11.0.7-ea.10_osx-x64_bin.dmg", + "checksum": "d2239162d807dc50106fe2b5af151020c178f9954fe9830bb2e93ab147499a86" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jre-11.0.7-ea.10_windows-x64_bin.zip", + "checksum": "68277c1f2e6b680864deb93ab688f0e2c9e340f3016940c9ade5767aa4cb097b" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B10/sapmachine-jre-11.0.7-ea.10_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jdk-11.0.7-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "45b3b29cfa5972adcd5ddb571e4939af3dde3231527f5595fa9a3ed2d7af8f95" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jdk-11.0.7-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "fee4d9cf7df1df3401806ce93e499cc71ff4a9bdd28175a28c587b21aac52a02" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jdk-11.0.7-ea.9_linux-x64_bin.tar.gz", + "checksum": "ad832b07d506cd16b601445179ca25cf748a6fa76cd0408a7010178ff8a6cd69" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jdk-11.0.7-ea.9_osx-x64_bin.tar.gz", + "checksum": "8083b3ce7104b03e911b82416d4f983c803f14a59d9ba64190cea62690074b7b" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jdk-11.0.7-ea.9_osx-x64_bin.dmg", + "checksum": "3458fdb0a058cbe88d995c16221f2ae0829c265d8b1672ef8c7ae9f9153ed179" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jdk-11.0.7-ea.9_windows-x64_bin.zip", + "checksum": "7f488164e4a41357d26145afd7f42bd069f2a8ee784abbd42d4235bace75648e" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jdk-11.0.7-ea.9_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jre-11.0.7-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "3762c83744e0eaec6338e922a2c448bf354f9b892de2c6a5a5b10fbd33936541" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jre-11.0.7-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "dbee6cdb4143737623bc2fa13bb096056aa4683fff58a7a7ffd2ba165bd33984" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jre-11.0.7-ea.9_linux-x64_bin.tar.gz", + "checksum": "ea5db20735ab7c1fd216d19af90f47f6d6a4493ccf91c56ffa621758e9e51719" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jre-11.0.7-ea.9_osx-x64_bin.tar.gz", + "checksum": "ddbd8690c3f64da4b71a79063253e4435922f1f8a2b955cb9fc72dcc04ecfe52" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jre-11.0.7-ea.9_osx-x64_bin.dmg", + "checksum": "c71e831bf72c17cca31a4b8f7264369d03fc538de69b2960e261f0c08a59551d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jre-11.0.7-ea.9_windows-x64_bin.zip", + "checksum": "cf373584538030327f7f4efbd8ef269dadffeed5d756ec10e37bc21f005bd649" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B9/sapmachine-jre-11.0.7-ea.9_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jdk-11.0.7-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "0c97fe4c4b0824068c6b03a894d6549b08e79a9359dc22a9fc3c5b4c6e5613e8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jdk-11.0.7-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "518d0eae6eb3a8d87a3ab110aab1d4d17bfde99784e9a486ff2e2e7e7da7c611" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jdk-11.0.7-ea.8_linux-x64_bin.tar.gz", + "checksum": "bf149861fdadd5dc99fc837de913305242f720c88b0f6619edb26649747b2378" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jdk-11.0.7-ea.8_osx-x64_bin.tar.gz", + "checksum": "43376f22a01fe5b026d508348b78516ed652385690e30d8b6242090600a3d2ac" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jdk-11.0.7-ea.8_osx-x64_bin.dmg", + "checksum": "8cd7e8e34b4ad755d24969664b14bc6b89ec371d394fad4f8455d02a86e733f9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jdk-11.0.7-ea.8_windows-x64_bin.zip", + "checksum": "ecf5de31fba88fab9af8ad6c645fd3181a4343431a6af6c13cca58f63a5e21c4" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jdk-11.0.7-ea.8_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jre-11.0.7-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "a983d5d4bbc638da0bb107434e02b5bbdd0a24f62fc0be18fbd9c44868ee8b15" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jre-11.0.7-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "62c88965a50301e9345889313ea473213d84a37e774f7ca1a34033218841271f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jre-11.0.7-ea.8_linux-x64_bin.tar.gz", + "checksum": "ba35e1519b698e0fc07e453a8fbd35e7a805c69e54b7df277c84ee72d0328de2" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jre-11.0.7-ea.8_osx-x64_bin.tar.gz", + "checksum": "1d4e88724050ccb20bc1cf8cfeee5760e81d5cdc677b4a3a7d31fce7e9b2e88c" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jre-11.0.7-ea.8_osx-x64_bin.dmg", + "checksum": "bff0a043b75aa2971aae25a355773c70c5a734c3fd7ea07536f3a95a9bad4322" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jre-11.0.7-ea.8_windows-x64_bin.zip", + "checksum": "720d08aa806404d0b2395110609dfec0e6dac9efdb9f74d041eee15757c520ca" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B8/sapmachine-jre-11.0.7-ea.8_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jdk-11.0.7-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "047fd23f01ba543be594cace16bc7e064ed51ac84a27e84a717afbbe4e043056" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jdk-11.0.7-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "4ab987a3ec015f736523dd17e56b1b23de100b97eeacdc405389f48beeda48c5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jdk-11.0.7-ea.7_linux-x64_bin.tar.gz", + "checksum": "c31fe6c22951aa23d4f4121f56bb977d74c0df37a3a387493e7699eccdb9858a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jdk-11.0.7-ea.7_osx-x64_bin.tar.gz", + "checksum": "19cc89a449b57fb25661c14c5ebc10b93b8f49d216779bebb05de32cc85ebff1" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.7_osx-x64_bin.dmg", + "checksum": "354bc59a9dad7889d4e6c4875427f48c4ad09798deb69e20e5a793bc0ef87813", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jdk-11.0.7-ea.7_osx-x64_bin.dmg" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jdk-11.0.7-ea.7_windows-x64_bin.zip", + "checksum": "8adc7501f0d26c984a16d70718de190bd96d46385a5465fc4fe9768c2eec205b" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jdk-11.0.7-ea.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jre-11.0.7-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "b61b0bd8e23b13ccba5b4a5144235f549dbdc387cd3285d3fdb817a3f7ee938a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jre-11.0.7-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "88ed4a2d28d08a38edfee74716d9ae07dd0355b028bf28c756b8fcd05d0e938d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jre-11.0.7-ea.7_linux-x64_bin.tar.gz", + "checksum": "d215d5c5eb13d01a246910115450ff531489bdfd7b07733262fff202efaff126" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jre-11.0.7-ea.7_osx-x64_bin.tar.gz", + "checksum": "b4c8a6f3339162e1d12e6b4ed0f50ce189b6bd2b99200024d55813eba55f75f3" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jre-11.0.7-ea.7_osx-x64_bin.dmg", + "checksum": "c9f16b1e721d622992041685f7aadbd90d38c5d5f9a494661ddd50179354a4f8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jre-11.0.7-ea.7_windows-x64_bin.zip", + "checksum": "9d457e3e32cb596e728763dda845958009e62b25b5773deda3149abe856087f5" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B7/sapmachine-jre-11.0.7-ea.7_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jdk-11.0.7-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "369b65ff8bf305eb879e4ef3ac8baee65f62134db2db705a70fd582f132c65f9" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jdk-11.0.7-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "cf634735ac8806fee94c85b386747a153f51ab4d76996bad841f530f497e80c1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.6_linux-x64_bin.tar.gz", + "checksum": "b7c6075c3b06587c7de6c465ae8dc59c294282f4075a89e2be4dc49de0165c3f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jdk-11.0.7-ea.6_osx-x64_bin.tar.gz", + "checksum": "f4bbb33ceadb0dfb8814de7c637be6bc4faeeec373a85529011178e2fad397ab" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jdk-11.0.7-ea.6_osx-x64_bin.dmg", + "checksum": "9d2eafa0493e5d97c18339fd571277af27b2e40529e14c9effade109ec257ff5" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jdk-11.0.7-ea.6_windows-x64_bin.zip", + "checksum": "7a7d21efeaa9b6708dc4db81549aad25d8dc150e473d033a5cb56d2889eb9d8d" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jdk-11.0.7-ea.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jre-11.0.7-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "062ad1033bd58935bfdc44a2d629ba54c2ba51e26339c199c6c98f13887a33b2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jre-11.0.7-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "3633a478df67243f1637c01d3edc73a2f5b5bc46bf4b12009d680a20dd642bb2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jre-11.0.7-ea.6_linux-x64_bin.tar.gz", + "checksum": "cfb585ae352523f3f41a82d69831404fd389400f7049ac4cf245357f694c6d41" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jre-11.0.7-ea.6_osx-x64_bin.tar.gz", + "checksum": "4d2f37f15a31eebce3ef5d1f41e9882cb08108236dc3a726dbbe1df8f9f6a4af" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jre-11.0.7-ea.6_osx-x64_bin.dmg", + "checksum": "3da4e8aa660eecced5780b4c510d626a4682893e397326ed74e1d77899f98771" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jre-11.0.7-ea.6_windows-x64_bin.zip", + "checksum": "fa0968ea1c0bae4b714be401b2f53b73a5227a806dfd9711938cedd3be441675" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B6/sapmachine-jre-11.0.7-ea.6_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jdk-11.0.7-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "6fb86d0bdd617258077852c50a5dd7db397733af21d2bd991d7d5e240706df12" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jdk-11.0.7-ea.5_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jdk-11.0.7-ea.5_linux-x64_bin.tar.gz", + "checksum": "226a688ce6b9c5f9972551719105fe971c915561e42fb379d8eb73ad29a2136f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jdk-11.0.7-ea.5_osx-x64_bin.tar.gz", + "checksum": "93c80480703847149db26248f7245dbd7b0394add799a859c29984b0d7eba9cb" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jdk-11.0.7-ea.5_osx-x64_bin.dmg", + "checksum": "3db190b310783518dcb182ef6595dbfbfd0d2c5ea084a082de7234090f8b52b9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jdk-11.0.7-ea.5_windows-x64_bin.zip", + "checksum": "76e9b696cf3f581c146a465ce226f65d3202856b10c5e3cd71e4919eddd58618" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jre-11.0.7-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "1066cdde1af4182e12759abe54de23088e0467fad3d36fd397e6930ce22d7d3d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jre-11.0.7-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0151cee6bf67d5ca36116c1839b3aa44558375a119a366e79efab3c90b36253e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jre-11.0.7-ea.5_linux-x64_bin.tar.gz", + "checksum": "482023b66ab78175ba5ac11ddcc3b79bdfea79c6c6557fce583b04d5ef01e954" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jre-11.0.7-ea.5_osx-x64_bin.tar.gz", + "checksum": "be92b8d0ad18581153730ae775a42098fb260b4bb8340e2936b0f6056545ebb4" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jre-11.0.7-ea.5_osx-x64_bin.dmg", + "checksum": "05de5a68cc8c620c3dbec7d530423bd226a76c5c9652462eabab32c048945339" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jre-11.0.7-ea.5_windows-x64_bin.zip", + "checksum": "4a0784f2357b830a4db291b88912dc4dfa6b7f4c3ca6fb866f9e053b810f7ef5" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B5/sapmachine-jre-11.0.7-ea.5_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jdk-11.0.7-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "1a9f5897d51cbcb752e0d171de522db39aa293feab83131149221a52fcfa1f55" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jdk-11.0.7-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "2772c6d432fe240ec6255b742b274bb99564fc780538acfce45923799e326e0f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jdk-11.0.7-ea.4_linux-x64_bin.tar.gz", + "checksum": "fa6902539d077791781cf78f784348b93e63e6e70f917405d0618d53e2ffd5fa" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jdk-11.0.7-ea.4_osx-x64_bin.tar.gz", + "checksum": "24c6c4243fffe75cd5b50e6a0fa712d24e23a7a806ca48a7b5bea7956b11f586" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jdk-11.0.7-ea.4_osx-x64_bin.dmg", + "checksum": "6e05bb28599b24886d54827a972856399c29f8c28ec25c09d50bbac5e7b455bc" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jdk-11.0.7-ea.4_windows-x64_bin.zip", + "checksum": "b5ed81649be910da3c33f016786620bb3a4d324e5eeec8ec74a4829c05653371" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jdk-11.0.7-ea.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jre-11.0.7-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "c2151010aaeb35b47deddc191bef8e0572f8b0eba7a9336d8f082e541149aab3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jre-11.0.7-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "6654c26120e2de8f48f9b3f8a7107d5bf8189dc1186969f4cbec3a957d048ff9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jre-11.0.7-ea.4_linux-x64_bin.tar.gz", + "checksum": "91030661bdc7d16f73b1c1c292d74586453f711ffd6234466cc4955b23e19ac7" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jre-11.0.7-ea.4_osx-x64_bin.tar.gz" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jre-11.0.7-ea.4_osx-x64_bin.dmg", + "checksum": "d115503b305322a1a40012d18d2fe020267d4a4fdf843e0d47ba8c7fd6deeaaa" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jre-11.0.7-ea.4_windows-x64_bin.zip", + "checksum": "a9f7cd55d1093bfcbee3d31eba59bcefa425de6d8db8f2f9d288ae9b9a1762ce" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B4/sapmachine-jre-11.0.7-ea.4_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jdk-11.0.7-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "8fdb68da7b218d332abcb59aef2843725a65fcd2fd8efd96e5993dc4306ea22d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jdk-11.0.7-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "19300f2d63047ac561611277d3314dbc939e605f88a0ca5cd280fa98479d4fca" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jdk-11.0.7-ea.3_linux-x64_bin.tar.gz", + "checksum": "62ab53102e22e1c1accbc52ccd3df14161955f0efb028a7b85d315d12ea80110" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jdk-11.0.7-ea.3_osx-x64_bin.tar.gz", + "checksum": "1e1079afdd2d605587f7161c8d1f1f20e193aa9937c541f0be957ec327bf66cb" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jdk-11.0.7-ea.3_osx-x64_bin.dmg", + "checksum": "1b98d7ea5c54dd289397b50b29c15ed3158313b82938795d43a1e20b55d099c9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jdk-11.0.7-ea.3_windows-x64_bin.zip", + "checksum": "6fd760d17ecb40d48d32842e994b1accceb1247ed298b92b1f2dbf0100b776a3" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jdk-11.0.7-ea.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jre-11.0.7-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "ef3e9538ce28a5f4beaf04bd6189dc7e2b9e54c4b7537a8bcbc5c83fe7bb751b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jre-11.0.7-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "c3c92e44635de5b578054d30fe2f93b984cdc62fdc8656445694bab20861266c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jre-11.0.7-ea.3_linux-x64_bin.tar.gz", + "checksum": "cc47c586f8f8d2af479689b29a3ceb367a96dc49bab64bb59f5ebf244befb583" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jre-11.0.7-ea.3_osx-x64_bin.tar.gz", + "checksum": "9b51f6a31516121c41adccb81a9accb2df36939649a5c68d39d39bac2b13bd49" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jre-11.0.7-ea.3_osx-x64_bin.dmg" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jre-11.0.7-ea.3_windows-x64_bin.zip", + "checksum": "fd5f11ac4175b347369be560620ce070839a179291bb4cc45cb7e17f5eef9ef8" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B3/sapmachine-jre-11.0.7-ea.3_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jdk-11.0.7-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "91a60a1ac50b0e18047e6133a1a1e4df1b1ca58f6c143a4285afe57a0b1b8126" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jdk-11.0.7-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "6219645eb4153b6f9cd25f13e8cbc224e7e766b3488e9bed2cdb3f97625373ed" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jdk-11.0.7-ea.2_linux-x64_bin.tar.gz", + "checksum": "a8b278078b6e113eaaa8a199aa713aaf4c7daae92f751683693a3e3f56b37c3a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jdk-11.0.7-ea.2_osx-x64_bin.tar.gz", + "checksum": "44160ea832fab38e8c8b7ea171941b701367e2ca8b56cf9ec277180587387a1e" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jdk-11.0.7-ea.2_osx-x64_bin.dmg", + "checksum": "3c2ffa75256075b20ea81a5e28fd199da71a98536fef7ce11e4d5589743bfcca" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jdk-11.0.7-ea.2_windows-x64_bin.zip", + "checksum": "d57f1e320693dec47799869b638e044f4318170087da97a6523cd46fe4ddbae7" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jdk-11.0.7-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jre-11.0.7-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "499b100bb3a285453cb0210a9b5e2a5f68dd6d2634c8777126b877255b42247c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jre-11.0.7-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "3edca3741f3a5dd1bca1028d797b2a9467db4c5006306dad7dc1fb3ccb2ac0a5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jre-11.0.7-ea.2_linux-x64_bin.tar.gz", + "checksum": "22df28202b188ef5b1ea5ff822f04690f8bc15636ca5304dbaaea58a32a1b240" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jre-11.0.7-ea.2_osx-x64_bin.tar.gz", + "checksum": "da0b50e63be259516e0857794321ad22896c0cbde2b8fbdb69cfa62fc2ac8764" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jre-11.0.7-ea.2_osx-x64_bin.dmg", + "checksum": "24f72de1d927046076ff0b678b1aa56d770214fa8def6998a7aaa97c60ca8672" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jre-11.0.7-ea.2_windows-x64_bin.zip", + "checksum": "8c005e5ff23fed0f8fd117a8b0896b141dc62dd45b0789538bc36700e525e640" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B2/sapmachine-jre-11.0.7-ea.2_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.7+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.7%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jdk-11.0.7-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "6e13e133e96fcc1be3f90832a3b14cba6a3a2497922fa5b8d72bcd7103ae175d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jdk-11.0.7-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "d96fd24775b3953c57ef60b05f1bb6f1ff7a843ae6bbbbfb67b4233920d00d0a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jdk-11.0.7-ea.1_linux-x64_bin.tar.gz", + "checksum": "d602e2802948a27ae390d467d1c5f6ed0a119e116074218bc4526b405f0af670" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.7-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jdk-11.0.7-ea.1_osx-x64_bin.tar.gz", + "checksum": "7df103ebc08051eef625e4a1e2b3d20d61e474b9398513558e6033f8ffe3a84a" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.7-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jdk-11.0.7-ea.1_osx-x64_bin.dmg", + "checksum": "74394e56bd2e5826d0e1e66f0612198b2fbb37dd58bbca84e501140e74e16ef7" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.7-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jdk-11.0.7-ea.1_windows-x64_bin.zip", + "checksum": "17d8af34213d9daf8cfe233645546be0cc1051192cc5912e5183c5ee70ce553d" + }, + "msi": { + "name": "sapmachine-jdk-11.0.7-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jdk-11.0.7-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jre-11.0.7-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "e8a5beb2471633c23bc4e8ad3591036dd6368c5f13d7dbde9e5bc5b8ebe12bc0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jre-11.0.7-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "68a1d316b65d6bdf407b2c16ba8379ebc77793970b081085e7b4760c8a82d366" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jre-11.0.7-ea.1_linux-x64_bin.tar.gz", + "checksum": "d923a26e2e0e3bd5ce886ec8fa2124bc2f97111a1717db4a991c06d823d1435d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.7-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jre-11.0.7-ea.1_osx-x64_bin.tar.gz", + "checksum": "3137d1c73894beabf19edbecdf9cbbbbf41f029d53465662b56e982758f577a0" + }, + "dmg": { + "name": "sapmachine-jre-11.0.7-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jre-11.0.7-ea.1_osx-x64_bin.dmg", + "checksum": "9e130e9b40ae3e997495ddf6a05c1a846808afa464031aed68b9de6ae418bf61" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.7-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jre-11.0.7-ea.1_windows-x64_bin.zip", + "checksum": "cea38e58a8dd480d9865a73dfbd8d17de848ab64a32737ad084aa464125964b9" + }, + "msi": { + "name": "sapmachine-jre-11.0.7-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.7%2B1/sapmachine-jre-11.0.7-ea.1_windows-x64_bin.msi" + } + } + } + } + } + }, + "11.0.6.0.1": { + "sapmachine-11.0.6.0.1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6.0.1", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jdk-11.0.6.0.1_linux-ppc64_bin.tar.gz", + "checksum": "c3212dcc7486e8449edb4931a15a3b8b6971c553b6c71c0ef80943df06298290" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jdk-11.0.6.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "cdc904cddbf40a21e4855cc045c0ee4e07a205e837743a886bd4f266337426a2" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jdk-11.0.6.0.1_linux-x64_bin.tar.gz", + "checksum": "697d5575ac0a9f24ee4f7a11d264311f2ca0e05841305236fd02d47325792e25" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jdk-11.0.6.0.1_osx-x64_bin.tar.gz", + "checksum": "e722275d93fed1d68d35b71c02e6a45d136ae09c4e1d07c2ee89e95a5b91cc4b" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jdk-11.0.6.0.1_osx-x64_bin.dmg", + "checksum": "ec7d720f3da0e6c07eb37e68a74e82c74c696a338b40adb9734ff8284f59beb1" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jdk-11.0.6.0.1_windows-x64_bin.zip", + "checksum": "b7c2d070827eb78270a2422c9f7f6805475ef2050ddb2973585aa1a6dd11e51c" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jdk-11.0.6.0.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6.0.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jre-11.0.6.0.1_linux-ppc64_bin.tar.gz", + "checksum": "d6036919114ba38ce4b88abe2343f9d3b6b33197b467c32519a484edf479f151" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6.0.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jre-11.0.6.0.1_linux-ppc64le_bin.tar.gz", + "checksum": "6946bdc436b91f6bd30a8bb23f331586de56b415c4f1699295f023daba455f98" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6.0.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jre-11.0.6.0.1_linux-x64_bin.tar.gz", + "checksum": "d90fc415a66856a9c4c5c76564ee7f6dbfd5e2f6950f2697d1788657010ad98a" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6.0.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jre-11.0.6.0.1_osx-x64_bin.tar.gz", + "checksum": "62af948aeed6e4a05c618492bb22ac5f6a43a592f8e523171f8356aa560d5094" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6.0.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jre-11.0.6.0.1_osx-x64_bin.dmg", + "checksum": "3cafb5c3e6d846b75fbcd958f8d454a46e10d01fd4ee6d55df57fbcfc91b8a44" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6.0.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jre-11.0.6.0.1_windows-x64_bin.zip", + "checksum": "0bfce50e63dc118b44673867f2248fe8fd7d7bf7e12497f4ddc275fc39e088eb" + }, + "msi": { + "name": "sapmachine-jre-11.0.6.0.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6.0.1/sapmachine-jre-11.0.6.0.1_windows-x64_bin.msi" + } + } + } + } + } + }, + "11.0.6": { + "sapmachine-11.0.6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jdk-11.0.6_linux-ppc64_bin.tar.gz", + "checksum": "210b1443468c19ba5bc5fd56fa563e2629d0dc35828316d41e7ba0cb344d5a51" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jdk-11.0.6_linux-ppc64le_bin.tar.gz", + "checksum": "88cf0a1770931a29247bf475f6e9fa370e99fdfb72ae405bb97b876d167d24a5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jdk-11.0.6_linux-x64_bin.tar.gz", + "checksum": "9bc9af984caaa531d46a7ea8ef38e2e24eb5ac331d7f783f90d9801b332719bf" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jdk-11.0.6_osx-x64_bin.tar.gz", + "checksum": "e21e81f71fc4d399480a72657fc7d93e0f38d1b51f2f8fccc58bcbc5a3c4b6c9" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jdk-11.0.6_osx-x64_bin.dmg", + "checksum": "53f5770b08e146cd3cf582e1485feb370cd4c393856f3e7c7234ce07af00b041" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jdk-11.0.6_windows-x64_bin.zip", + "checksum": "1d5da8f6a9b7fdc57598a8c7da7a1daa6999ee9397005dedc3edb9598c663673" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jdk-11.0.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jre-11.0.6_linux-ppc64_bin.tar.gz", + "checksum": "14d6bb7b4d5843b73fe3d0ae1a11e810626d77af39f9165f30c9f33331e1f828" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jre-11.0.6_linux-ppc64le_bin.tar.gz", + "checksum": "a59f6297e3e77c57d368f3685c609be3596f3ea537bb637ff2c84979ab16f215" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jre-11.0.6_linux-x64_bin.tar.gz", + "checksum": "e40e11b1bcd408887dd4ff8c6b816b256f7c6cfef6715e0e608ec33dcce7a320" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jre-11.0.6_osx-x64_bin.tar.gz", + "checksum": "c80b6355a15f37f4a8722efb04e6af06ae21dcba51530dd0a4236739b215d767" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jre-11.0.6_osx-x64_bin.dmg", + "checksum": "25cb4e1942780721a683713cbf194c2b541cebdcef21494818d1753a78b80665" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jre-11.0.6_windows-x64_bin.zip", + "checksum": "b53baf1d7fef30dcd9ec5d2cfff24a0103093a6a65407e129fd706105c26e7af" + }, + "msi": { + "name": "sapmachine-jre-11.0.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6/sapmachine-jre-11.0.6_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.6+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jdk-11.0.6-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "1a57cd5588efa49d9020c8d2ce0d372735957beea1821987102796611494ef72" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jdk-11.0.6-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "da6fcdb54203d37ce706218401e003112f751f6c256164693e2b56af5130f8b7" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jdk-11.0.6-ea.10_linux-x64_bin.tar.gz", + "checksum": "de7f4f13222bf8e3f2fcebecdba173e6d64fad49e2127e71f82e7776f706c0c3" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jdk-11.0.6-ea.10_osx-x64_bin.tar.gz", + "checksum": "46af285e352bd7ce463c365805c466b45a1b06fbf6880f632055f26f431e3e60" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jdk-11.0.6-ea.10_osx-x64_bin.dmg", + "checksum": "516d3f72f1f89c5afcaf78bd8a7a6a3a08069032596b79f89b6096120dae6e83" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jdk-11.0.6-ea.10_windows-x64_bin.zip", + "checksum": "bec819219fe2764e150e35d0494afb3f12b13a0543d29f8ad29234ccc57131c1" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jdk-11.0.6-ea.10_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jre-11.0.6-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "11168f010f2df0c292c7c6e0e53df38d550f56ad7d42b22a881af0e67d164571" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jre-11.0.6-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "e918cb5b76d88afb0bec5b40bafd3a3a9159259788b39588e685898c7f5c08da" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jre-11.0.6-ea.10_linux-x64_bin.tar.gz", + "checksum": "e04ee0c05c940c1e619a144cc3fe3d9102cc47ade4da0f29b8c9b9b3d2addb3d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jre-11.0.6-ea.10_osx-x64_bin.tar.gz", + "checksum": "bf67206ebab716f5148c9eabb6acd82410081928664a2c77edbee5cb37d242e9" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.10_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jre-11.0.6-ea.10_osx-x64_bin.dmg", + "checksum": "cb7b395b250d2b84b51974247c4d805dd0a8a32c9344942da2a88b2faf78c93e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jre-11.0.6-ea.10_windows-x64_bin.zip", + "checksum": "4cb23cd3e503acd21dc3814a6857e44811026d914b6285d805aec00b91492e73" + }, + "msi": { + "name": "sapmachine-jre-11.0.6-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B10/sapmachine-jre-11.0.6-ea.10_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.6+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jdk-11.0.6-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "1e6eecd1f9a5873c35cb82ab0b569687c5a0c9c586998fea40df4aa71548fad6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jdk-11.0.6-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "9bb838997cf95d5a91c6fe11cd890939d191fe441328628b04c167e98dcab4ed" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jdk-11.0.6-ea.9_linux-x64_bin.tar.gz", + "checksum": "02ed75b0f590af095ebf6809aa06eeb588cc0c44ffe13e0f8c2803c35d791eb9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jdk-11.0.6-ea.9_osx-x64_bin.tar.gz", + "checksum": "0d06e254a35e7db01c4a28cee3b7ba70547142ab5c77fa9dc580b01ff5799e01" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jdk-11.0.6-ea.9_osx-x64_bin.dmg", + "checksum": "9261e7ed87931f98c0c3d416813c6953542bac6baea72839148bbc86edfabb06" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jdk-11.0.6-ea.9_windows-x64_bin.zip", + "checksum": "7611155a45d177af66fad36e785a1c8b2f11baf0623626f164bc3dcd0b184f76" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jdk-11.0.6-ea.9_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jre-11.0.6-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "6d2e83c9d4f8f287ee6bae187389540ad84dab387764cb8884f4327620022bc2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jre-11.0.6-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "2a020315c0103d63150ed3e7b1cb090f6768844646ba91dc1e4b92ee3d1c76ef" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jre-11.0.6-ea.9_linux-x64_bin.tar.gz", + "checksum": "c393cf33ae0049c9dd3975b41f652adf6c7a6f28ffe783c494db6c76cf350cde" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jre-11.0.6-ea.9_osx-x64_bin.tar.gz", + "checksum": "c10946572708472b71712c6671dfe1ee9362a0b63e4388feb890ff5a9f4756af" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jre-11.0.6-ea.9_osx-x64_bin.dmg", + "checksum": "346a0ea3109bddb8fbc1b9cca68a18cdf209eaf3070d3fef4aee43556b72d5f4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jre-11.0.6-ea.9_windows-x64_bin.zip", + "checksum": "65124a1b9e6247484c7acfe28606deb104215357b9c23c854902f32c0f298dc1" + }, + "msi": { + "name": "sapmachine-jre-11.0.6-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B9/sapmachine-jre-11.0.6-ea.9_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.6+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jdk-11.0.6-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "3f1de4563d043104e730bf3abbce849a9ef40920b73196aab342101b393e1a71" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jdk-11.0.6-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "97bbdc7529d4c45f70117022895054096c9a758f0a2f6e8bd0c7907f778dd934" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jdk-11.0.6-ea.8_linux-x64_bin.tar.gz", + "checksum": "604bd5c8b95ee663768588ef164607a49fcbb93677a9d767f5e5bbfdb350fb4f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jdk-11.0.6-ea.8_osx-x64_bin.tar.gz", + "checksum": "0baa65c8dcc6d3a0a725c16c78ec2881864f7616f83e4eb4adef84a9a5ed1fbc" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jdk-11.0.6-ea.8_osx-x64_bin.dmg", + "checksum": "0e56612dea8dff9a27a60a7c6793cf42217e19b1b3a8206c0241c08d82b21900" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jdk-11.0.6-ea.8_windows-x64_bin.zip", + "checksum": "c31696f551d9bc0c218dfcf7997a6a2cc55680f490e42d563d92d06c40da54b4" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jdk-11.0.6-ea.8_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jre-11.0.6-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "68aae974567e12a54142b9dc60134f24bb32ce7f82a1dcd91a674bad220e3340" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jre-11.0.6-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "d5dda22509eba0c4ca751636a04fad75bec80f515be7563350bd0383afeae109" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jre-11.0.6-ea.8_linux-x64_bin.tar.gz", + "checksum": "6e5e388cf4be53d6bed4562ef4111e20c0938bda7c27acc2bc62e00a9a6be1ff" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jre-11.0.6-ea.8_osx-x64_bin.tar.gz", + "checksum": "bb36537d1f6baab843c8596bfdb43a26bb26ae682178f4eb071cf0d886fd9b66" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jre-11.0.6-ea.8_osx-x64_bin.dmg", + "checksum": "f7b1a3d17567f43824ed827c3f2e60dd9da5176d99b6158cefa64edc1c6da2cb" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jre-11.0.6-ea.8_windows-x64_bin.zip", + "checksum": "28303c693f1e8def42049fa16b449c457b475ca4d0aa434ecedce3c59259a818" + }, + "msi": { + "name": "sapmachine-jre-11.0.6-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B8/sapmachine-jre-11.0.6-ea.8_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.6+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jdk-11.0.6-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "5b487e0ea9a996dd8ab017a69d7f95983ceaaa034cbb4bf5ae15065cb404e341" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jdk-11.0.6-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "a72d492483f5fff32d3a86a1b3b7b5be2b2906c2583f381e68dbb5eab3cff461" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jdk-11.0.6-ea.7_linux-x64_bin.tar.gz", + "checksum": "15d245b4d6dc3e7fb1002adf2e9b778a2be0c68bfcb8dfc1ab07a27393a42148" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jdk-11.0.6-ea.7_osx-x64_bin.tar.gz", + "checksum": "908af0c0859ba0ca70993606bc93426a9ce6792be218d61ec523d7b32bd82203" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jdk-11.0.6-ea.7_osx-x64_bin.dmg", + "checksum": "308a86651f5a3f3e6c52b8bb3c0a887d66a890457cea67bbdbba801e807e5a6a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jdk-11.0.6-ea.7_windows-x64_bin.zip", + "checksum": "057fd842b524deef2c402d75b65ca2f3abcb4f71c52a0d652180bf883194c77b" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jdk-11.0.6-ea.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jre-11.0.6-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "9a7d6ec2ec5ea2ab874e93f82f683d89ceca5559580f4c8db67f6876aad4c095" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jre-11.0.6-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "66a2016bf599340dedb4b15efe2296e07f3c40807498ad7374cb9a8f1eee2fb8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jre-11.0.6-ea.7_linux-x64_bin.tar.gz", + "checksum": "3e2be3678bea8919d7f770b5efdd09d40d725f8ac664899ee77f8fba607a8c41" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jre-11.0.6-ea.7_osx-x64_bin.tar.gz", + "checksum": "4f0cd6e7dd36c44ab08eaabce8553026e1d0e6ac798096bc9280a6b7d017a272" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jre-11.0.6-ea.7_osx-x64_bin.dmg", + "checksum": "477866db5d620efd7d7559e7a9e3e5274d135185d9617531aeaecc776f2ffa95" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jre-11.0.6-ea.7_windows-x64_bin.zip", + "checksum": "a05b84bf84da2c7201f372df185b9715ef7e0212911ebdf9d44cfa8b2f9c4177" + }, + "msi": { + "name": "sapmachine-jre-11.0.6-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B7/sapmachine-jre-11.0.6-ea.7_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.6+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jdk-11.0.6-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "227c8e52b4a7f2044d82935632ef2446619d1322f2e54e081cbc0349d56fb81c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jdk-11.0.6-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "7bd40d8810f51da0448755c0531bd90fa1cc2d4cec71c12c9df50fe610b01509" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jdk-11.0.6-ea.6_linux-x64_bin.tar.gz", + "checksum": "1b7df99512b0824c7af03edcc6fbe9eae387c0f817a3e9add28d217818c12d39" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jdk-11.0.6-ea.6_osx-x64_bin.tar.gz", + "checksum": "3d14c86d94646b02cbcc734ada17e02f9ef4e0af2a52c54e4d0545bd2f899a3e" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jdk-11.0.6-ea.6_osx-x64_bin.dmg", + "checksum": "4073e6254b532c0229c6e377a732fe851cf75e2017c0b07f6fd915a92080bb3e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jdk-11.0.6-ea.6_windows-x64_bin.zip", + "checksum": "4c83f36f483ac1acdb5c511fb977901b2c6843d0088700d668d2faf71b6f614e" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jdk-11.0.6-ea.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jre-11.0.6-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "4aa334bee10fc03042d53d853ed189aa063883199dd7292ae460e64e5a92d126" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jre-11.0.6-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "21bb9ccba1fd17a2fdde2bde965701e9e0a89229baae61fa793ea0be938de852" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jre-11.0.6-ea.6_linux-x64_bin.tar.gz", + "checksum": "492add2871294e4c452d26628dedb57d3610381635776666c734cbf9033912c9" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jre-11.0.6-ea.6_osx-x64_bin.tar.gz", + "checksum": "c8056a9024b98b1f18376147a853d36c7d53cef66a222f0d77bc48779d8877d7" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jre-11.0.6-ea.6_osx-x64_bin.dmg", + "checksum": "e64ad93c9aa9f88f8eb74ceaefb2bc25435021e6091e5b2df9892d66b862604b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jre-11.0.6-ea.6_windows-x64_bin.zip", + "checksum": "8313d30af53577dca18ab0c49ff6052a86d2b1b145da4f33d34d1290405cbb72" + }, + "msi": { + "name": "sapmachine-jre-11.0.6-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B6/sapmachine-jre-11.0.6-ea.6_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.6+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jdk-11.0.6-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "006677191b5b0d2e3d1c75e1392b0394d128d8a83f0925e35b6a5af6f39cba80" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jdk-11.0.6-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "0fcdaf5e640fec87f27ff1b64de78c02781bbc02f717009a928286e15e7bef79" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jdk-11.0.6-ea.5_linux-x64_bin.tar.gz", + "checksum": "c5c54d0a125c4a722d123e7bd5bfb9ef36542d7ce0abeabd68c7d0edd1f6067b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jdk-11.0.6-ea.5_osx-x64_bin.tar.gz", + "checksum": "7635271068b8270155a1c9373405b53148040f9c1d0bbe51212ef993046aa5a5" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jdk-11.0.6-ea.5_osx-x64_bin.dmg", + "checksum": "1961e10f69c4d27a089dd6d64c7a9e8d67ee2c174a1d2994c3c6fa15a7043b0e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jdk-11.0.6-ea.5_windows-x64_bin.zip", + "checksum": "5e3606d711eee311ff255a0234fee5968bb41cf6e4a1076e133c843678ffea16" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jdk-11.0.6-ea.5_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jre-11.0.6-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "270bb177c2f6fdbef90a61a51a9696a5837c7ef05ad6f83b566ae0719a699098" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jre-11.0.6-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "61b90c86eebd62ebd802dd2c20f9e76d9a6ba6d05f358566ebff2e3036fcc937" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jre-11.0.6-ea.5_linux-x64_bin.tar.gz", + "checksum": "5d4ff2b73dd7bbf96f245f9953f7d5147a2916f6dc072068429ca2d921954c7f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jre-11.0.6-ea.5_osx-x64_bin.tar.gz", + "checksum": "862bfe091d3c45563f90708d4c0e4520c54971e29ffdf6bb14d35540920a39ce" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jre-11.0.6-ea.5_osx-x64_bin.dmg", + "checksum": "a8fd8bb1e6664422fbddd2215fd137b5bbb996f0c1eebfdb4ff6a22c8c2f5866" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jre-11.0.6-ea.5_windows-x64_bin.zip", + "checksum": "ee5abbcce2c044aca0e06c881d833e41fe2ffbc94943611a413d7f280df8d4e1" + }, + "msi": { + "name": "sapmachine-jre-11.0.6-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B5/sapmachine-jre-11.0.6-ea.5_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.6+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jdk-11.0.6-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "c221ecbd8ccf0f512939a6dbc76205be2860db070cc5c4acc91b8b48d55b64fd" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jdk-11.0.6-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "a8e08e7b90cef33ddbd7336b8fada44a0c6bbed7033d477ceeab4041ee158c5e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jdk-11.0.6-ea.4_linux-x64_bin.tar.gz", + "checksum": "a9dbff52a54554b87e6dfab72f776ec7cc40ae925e9782ddea89b0b3694601de" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jdk-11.0.6-ea.4_osx-x64_bin.tar.gz", + "checksum": "f7be0b3bf92ec6a88ed83a3ad5e2a793d3e3eed13e527a01a4a5f0a8b05c1279" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jdk-11.0.6-ea.4_osx-x64_bin.dmg", + "checksum": "556780ef35d4fff72ab67c5e7c5057ed65fafe943b3ce345e5b18f0de364a015" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jdk-11.0.6-ea.4_windows-x64_bin.zip", + "checksum": "4bb3e1a8fd086bd65f1bad491f26b0f447640977f20c0a85d280fdda3c0e6657" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jdk-11.0.6-ea.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jre-11.0.6-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "56737246f3adadbb3a18afdc5be09c31031ea273c383b33101b22034ea560ae3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jre-11.0.6-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "95141f78aaee545561b328e3f165b9cde1a3e28b69eed560c24d2244ed80bf5a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jre-11.0.6-ea.4_linux-x64_bin.tar.gz", + "checksum": "53265ce8df7c38ac12c3e93b0de8d078c416e7dfa007847abe83adce0991817e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jre-11.0.6-ea.4_osx-x64_bin.tar.gz", + "checksum": "303be49436e80f2124b404cba26bbadf2b204fe81f82a0a15a56e676ad2ce22b" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jre-11.0.6-ea.4_osx-x64_bin.dmg", + "checksum": "bb826b039760f3e18c194dbd8b6e3bd7d1b19527f4ad44647c450345c3dbb959" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B4/sapmachine-jre-11.0.6-ea.4_windows-x64_bin.zip", + "checksum": "d98cd67667eaa32c8044546284bd9a2240ac67edc48b3389b39884c47d65c56d" + } + } + } + } + }, + "sapmachine-11.0.6+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jdk-11.0.6-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "a1b763426690d73162d8a2ae1e658f63f301f11b73a413aaf3b1ba1be0aaafcc" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jdk-11.0.6-ea.3_linux-x64_bin.tar.gz", + "checksum": "930c71a92cdd07bd43fc1677652bc34b2f647e5d14e176754809a8de88d494a0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jdk-11.0.6-ea.3_osx-x64_bin.tar.gz", + "checksum": "afce3b44d4598a59df968a85f5f6311a8493aad02b7fea614b04fec29a8db52f" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jdk-11.0.6-ea.3_osx-x64_bin.dmg", + "checksum": "48cf21cbbf1a9b4adfc47d1f239a99320aa1f764708401a9760161ef30ad32cd" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jdk-11.0.6-ea.3_windows-x64_bin.zip", + "checksum": "e99e56a79d4f2904a1fb0d8c88fcf9c294d4164c3ef2720374f383fd4635cad7" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jdk-11.0.6-ea.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jre-11.0.6-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "4afde5c5d1ac1fb2fc83577b045211bbf167f735f17ece3f4abd25f05ba889a5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jre-11.0.6-ea.3_linux-x64_bin.tar.gz", + "checksum": "77e6fafd9823c42c1856fb706ef1735d926fb9a4145756ae4f82d2b165dcdc8d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jre-11.0.6-ea.3_osx-x64_bin.tar.gz", + "checksum": "0dc9dae53c96618ae2fd1397547728d62461ad3d5007c62e90dd3c9755bcb538" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.3_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jre-11.0.6-ea.3_osx-x64_bin.dmg", + "checksum": "4782a19e0881bb5f017f64211d92a44c5e5d96838bab22bed9ad9882558ca223" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B3/sapmachine-jre-11.0.6-ea.3_windows-x64_bin.zip", + "checksum": "57d72511a440b38846935434d445ec0f2376f7666dbcace5aad79d1f233f1ee0" + } + } + } + } + }, + "sapmachine-11.0.6+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jdk-11.0.6-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "560fb70735ec37c51bd252da2c6d71f562dac1b207fb4ee6240cce69f3c20e5e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jdk-11.0.6-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "cf39217ea2f0f18f1cf80fb2a79d02b72c052120bae1c10b5d5279a0351af4af" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jdk-11.0.6-ea.2_linux-x64_bin.tar.gz", + "checksum": "53170e15595e0c9edd3928bca7bd9908e64da08ccdae4cf665ffa2f5cff9a7f6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jdk-11.0.6-ea.2_osx-x64_bin.tar.gz", + "checksum": "7248da73759337ab5625a5bf57a1b093cbbe1b02099cc295232b67b5f999967b" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jdk-11.0.6-ea.2_osx-x64_bin.dmg", + "checksum": "842ff1c662b8fa0238c486b2f3315722fbd4697c64cd2c92e81cdfce044e75a2" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jdk-11.0.6-ea.2_windows-x64_bin.zip", + "checksum": "e430fda6437b0b145221def4f611b82b586ded7be2375ee0831bfeef3c3a83eb" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jdk-11.0.6-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jre-11.0.6-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "465518e745b7dd9d0a59dde4c148bfe45b1b8f4889da231ff67eeb7e59cd0564" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jre-11.0.6-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "88d5f2158c879b68a3aabfe5a87e75c9520832c2c93226254d55a03dd7b8db7a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jre-11.0.6-ea.2_linux-x64_bin.tar.gz", + "checksum": "3a4539a3868059d624e8b423769c17f0bd627d56cce12567b54dc5fa121dd912" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jre-11.0.6-ea.2_osx-x64_bin.tar.gz", + "checksum": "c1e4fda3c6e7c6ad283f379a13ef0f649bcc3d95c6e5f5f5dabeb6f5630941d8" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.2_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jre-11.0.6-ea.2_osx-x64_bin.dmg", + "checksum": "2a36c54eb838e2ea1d72a9745c8d14d753feec006637766f953b4733f034bbde" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B2/sapmachine-jre-11.0.6-ea.2_windows-x64_bin.zip", + "checksum": "b726d09ad7db4e3f27353e14fa11437d58be4f141d2486f0a52a419f7177b985" + } + } + } + } + }, + "sapmachine-11.0.6+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jdk-11.0.6-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "9b61c52a8a13759f892f2baae38c3bfebf94de73ce0ad2f71e7457241b715d34" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jdk-11.0.6-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "c8775f4777987bb405bdce336f6110a45770952f6860b6da114f3e4a2ddc7188" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jdk-11.0.6-ea.1_linux-x64_bin.tar.gz", + "checksum": "b3952adf1f07f0bd472b4bda3fa91149dd6983d8f56ad3d0fd5d6d643e68bc0e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.6-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jdk-11.0.6-ea.1_osx-x64_bin.tar.gz", + "checksum": "cb9b7873926401cb6e510c0f4118a2ecf59220f355089141d050e53b97be27a6" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.6-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jdk-11.0.6-ea.1_osx-x64_bin.dmg", + "checksum": "e5739d55186e3b06e2a582877ea1018ed9aa289a102ee970213c8aaefb27270f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.6-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jdk-11.0.6-ea.1_windows-x64_bin.zip", + "checksum": "6b532e2e044edf90a12da751e6b618c9c3603c9d47341d585d8da441ae3a7425" + }, + "msi": { + "name": "sapmachine-jdk-11.0.6-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jdk-11.0.6-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jre-11.0.6-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "2ab3a4f744fa565f8cc702d5d2a9f6bc9ed90357db982cdce9dd32bb5924f59f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jre-11.0.6-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "ba3192d560b453193bebeebc2a2f1c82f9d6da76d4e0c334a2dc8c8adf612782" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jre-11.0.6-ea.1_linux-x64_bin.tar.gz", + "checksum": "1cdf775361d97aacbc7d209c7dc26f9f3d0effc5e9e2264cd64814de87d19e6f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.6-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jre-11.0.6-ea.1_osx-x64_bin.tar.gz", + "checksum": "e9185b35d58b77b4cc832b0fc0d9b02c0eb990951bf2763050b5837c3a79a109" + }, + "dmg": { + "name": "sapmachine-jre-11.0.6-ea.1_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jre-11.0.6-ea.1_osx-x64_bin.dmg", + "checksum": "c14165adfb12617bf644cd49df1c911a207f7b5f3ba9eeca1ce581525a08d609" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.6-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B1/sapmachine-jre-11.0.6-ea.1_windows-x64_bin.zip", + "checksum": "1573c18ef73e8efa679a6e567f78a6b3ca54675de0f8cef10b8b9ef7343dbaef" + } + } + } + } + }, + "sapmachine-11.0.6+0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.6%2B0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.0_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jdk-11.0.5-ea.0_linux-ppc64_bin.tar.gz", + "checksum": "8e6108e3bd520ff7077c676374dbb94ce4d2f51367d2b80e3ee067a1e1760477" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.0_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jdk-11.0.5-ea.0_linux-ppc64le_bin.tar.gz", + "checksum": "fbaa378a60e33e52f0c4d956eca8985e6399f90f177049fb58e1a2a3e8a9d672" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.0_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jdk-11.0.5-ea.0_linux-x64_bin.tar.gz", + "checksum": "7f625a1239cd4a10118e2d92198f303e872bc129ff80c0f30720eb10f845476e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.0_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jdk-11.0.5-ea.0_windows-x64_bin.zip", + "checksum": "c65630d21437248dabc8f8d22ca1fe33add7fd5e2a4b3645dd05022fd0f50af8" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.0_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jdk-11.0.5-ea.0_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.0_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jre-11.0.5-ea.0_linux-ppc64_bin.tar.gz", + "checksum": "1104ae07ed2c8b198c4b1f84bb7e214751206b7a71563a14eae136d2297ceada" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.0_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jre-11.0.5-ea.0_linux-ppc64le_bin.tar.gz", + "checksum": "de2d104770f23549c332cc127f909680311333116ac24083e065faa5cee62a67" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.0_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jre-11.0.5-ea.0_linux-x64_bin.tar.gz", + "checksum": "c22e2abb99c38dbbba48a320c7d4ad00c5a0b6ad7fe06f8e2c90f1b9aff494f6" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.0_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.6%2B0/sapmachine-jre-11.0.5-ea.0_windows-x64_bin.zip", + "checksum": "193088c22cd97df96e5abc1360ee863aa956d769eff8c87795aa4fd09fa5937b" + } + } + } + } + } + }, + "11.0.5": { + "sapmachine-11.0.5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jdk-11.0.5_linux-ppc64_bin.tar.gz", + "checksum": "d26f947d7f456914bc93adfd55b6156a534a9d689ce7e3b4c48c76affc067396" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jdk-11.0.5_linux-ppc64le_bin.tar.gz", + "checksum": "827bf60567d8d6d5624e6dc76a38c3adb2753b17ceaad4764302eb95aa1848e4" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jdk-11.0.5_linux-x64_bin.tar.gz", + "checksum": "f8b849bbd044acfd38972987305bd4c8bf5706a794ec12b51f1ed747a492ca55" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jdk-11.0.5_osx-x64_bin.tar.gz", + "checksum": "31fcd79060ca5c62be9866450cf501361c0e478f3418c366a136f63a7a530059" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jdk-11.0.5_osx-x64_bin.dmg", + "checksum": "c3521e365a9b85a0126a2b6bec5b9ec36e2a83776b0d7371e2bbee5a8199723d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jdk-11.0.5_windows-x64_bin.zip", + "checksum": "52f3671d0ef9c6612d43101b17a3a5dbc64a926bc1ca2e8e7af88c2f5484ef74" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jdk-11.0.5_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jre-11.0.5_linux-ppc64_bin.tar.gz", + "checksum": "31e1911c7508257a7167e24266861cba8173069f404298880e5ceaed917ba7be" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jre-11.0.5_linux-ppc64le_bin.tar.gz", + "checksum": "181b12c48f45f26c08f070129fb697088da843dace58233d0a4b01c63b937510" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jre-11.0.5_linux-x64_bin.tar.gz", + "checksum": "42844a023db2c74e82b7e08b934f90ab4615a147bbbd7088f67520a0d05a71d2" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jre-11.0.5_osx-x64_bin.tar.gz", + "checksum": "cbab8be999a902d2f679669f3ddf3810d96050c710b8b7e07636f1282a763b19" + }, + "dmg": { + "name": "sapmachine-jre-11.0.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jre-11.0.5_osx-x64_bin.dmg", + "checksum": "09aad6aa1d713aa76a4a08c90143262047bec0907b05888f4147080cdba50897" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jre-11.0.5_windows-x64_bin.zip", + "checksum": "13ecd5554b23dae50340c23f46b374b89a15335802f68c46794c141ebf022627" + }, + "msi": { + "name": "sapmachine-jre-11.0.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5/sapmachine-jre-11.0.5_windows-x64_bin.msi" + } + } + } + } + }, + "sapmachine-11.0.5+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jdk-11.0.5-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "5919d061cd0f9c1be94dfa68503d1a4d64c37ad19e9d008826d1b82aa46dea35" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jdk-11.0.5-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "7a8f9bc98d8342e66b56ffd5b126db38920ef11943ecdc09d1e97a8dac0d477b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jdk-11.0.5-ea.9_linux-x64_bin.tar.gz", + "checksum": "a595d7282118b6e5d729d1f068ca3167d9194e27ee2365b5683441d88d096e5c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jdk-11.0.5-ea.9_osx-x64_bin.tar.gz", + "checksum": "07979f0ab797a25e78ff6d5086eb4fa78802b02d5aea6982ff1633a0e2de4200" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.5-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jdk-11.0.5-ea.9_osx-x64_bin.dmg", + "checksum": "52914eec503b78f8349868f74f9280ae28cdf748dcec801ed81236e8f0431464" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jdk-11.0.5-ea.9_windows-x64_bin.zip", + "checksum": "62bd78fc2e6ea781b38d20390b486f77533ebc00a421a5d9e978e88f0386c704" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.9_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jdk-11.0.5-ea.9_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jre-11.0.5-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "0ec3a42efc1c0e5743873e722fc36cdd422bf5fbe35b5b775c7a7e07cf03dc1b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jre-11.0.5-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "5950f9218a3600224cdb18a5168611f18ed945cb359e53ebd200f22a496a4b99" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jre-11.0.5-ea.9_linux-x64_bin.tar.gz", + "checksum": "b0dfdca004705f8d0606c364b8fa9e0c61d1cb0d66f17f74801209f985794f6b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jre-11.0.5-ea.9_osx-x64_bin.tar.gz", + "checksum": "02fbef62e8b3928f0c13a35ebc45177f2b41f8b4e9556a882bdf1eb91678d255" + }, + "dmg": { + "name": "sapmachine-jre-11.0.5-ea.9_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jre-11.0.5-ea.9_osx-x64_bin.dmg", + "checksum": "42ea64037012cd5a6bc4241a862807c54b937f8357f5d1305e753a723e44438b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.9_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B9/sapmachine-jre-11.0.5-ea.9_windows-x64_bin.zip", + "checksum": "fde057f1b228f0f6272d118a9e5e176e701b7955f4f78b62e01173cee718dff2" + } + } + } + } + }, + "sapmachine-11.0.5+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jdk-11.0.5-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "1072bd877f5dab1634e156f0199d34c89a97144e22256a1095bd89c40c75237f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jdk-11.0.5-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "1a6ec6ee3e9aeff68b58bd04048b9e7feb2cd1d3f96acc13892557433c1af36d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jdk-11.0.5-ea.8_linux-x64_bin.tar.gz", + "checksum": "6caa273615ac50f94fa7d506e8bea74e7adaaf02db856ae62e76d4a7df86ad16" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jdk-11.0.5-ea.8_osx-x64_bin.tar.gz", + "checksum": "1c553703fcb48b619389adb9046095a163f89512e1db08836544e56cb8d3aa16" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.5-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jdk-11.0.5-ea.8_osx-x64_bin.dmg", + "checksum": "9047e22b5cce9c83df088b9fd013814f7dcabbeb22f3691cc1253fcfc400e218" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jdk-11.0.5-ea.8_windows-x64_bin.zip", + "checksum": "ea18409b5ac20b67f32b2a4a5021d459986679551de6c6ef30a39392fcc127db" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jdk-11.0.5-ea.8_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jre-11.0.5-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "4163b295e15717a1e46fb3776e55396cec668f5a0d466a01bfa99a7e0ebbd629" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jre-11.0.5-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "5852656317af598bd4e5e3ceb38cc7624cfd1dcf1625edb732046ea0cd213973" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jre-11.0.5-ea.8_linux-x64_bin.tar.gz", + "checksum": "7f0463ad21ab5f4a98b4a4e1045652f78f596cd06000bb98552674bac0fdc87f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jre-11.0.5-ea.8_osx-x64_bin.tar.gz", + "checksum": "9f922d578a861ad9383327f15991bdc1fb3c7239cb68af0a4bc8aa2cc0bcb22c" + }, + "dmg": { + "name": "sapmachine-jre-11.0.5-ea.8_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jre-11.0.5-ea.8_osx-x64_bin.dmg", + "checksum": "88922cea721437920f103c057ca816530deff97163e3c23e608f186a02ba5f26" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B8/sapmachine-jre-11.0.5-ea.8_windows-x64_bin.zip", + "checksum": "9b50ab64e22e19b92dafd60f6ac9f0358d58998d3b41f581cf5422cebfe59003" + } + } + } + } + }, + "sapmachine-11.0.5+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jdk-11.0.5-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "56aade1c8bcf594c78ed38c3155c44ad17b85e5a88a8420cc8ba2388ad8d1a11" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jdk-11.0.5-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "eb15b7f708d1f57675f9d6e63266a0bf833a0b02949d10bee41e1d766e87ec57" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jdk-11.0.5-ea.7_linux-x64_bin.tar.gz", + "checksum": "a05566807ffe52540fe40ba34fb853faef2f402ccff0762193e7ad675fc0d06d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jdk-11.0.5-ea.7_osx-x64_bin.tar.gz", + "checksum": "88a86185de9a65d184164033af5aadc84c563d87f840eafb172639603b207f67" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.5-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jdk-11.0.5-ea.7_osx-x64_bin.dmg", + "checksum": "0dc44a0f451c0ec7392794419b6f763218b9d02c9b8f0f2a79b41590a22bc990" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jdk-11.0.5-ea.7_windows-x64_bin.zip", + "checksum": "e2fb2214055ddb9dbc2f5b93624b88d545adfc8113bc733bfd663fe1c494e553" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.7_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jdk-11.0.5-ea.7_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jre-11.0.5-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "08987734eef093bd7ab426b5515ba4776a5a7bb3ef766570701ff392293bab25" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jre-11.0.5-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "76a81cc23613f11f1f61f5a1a9db0e31422021075826c6e0b77ba2bc036be390" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jre-11.0.5-ea.7_linux-x64_bin.tar.gz", + "checksum": "c4bca462a94f8d27470d4cc35fee47481572d28745f5927bf9bd8a0e6a9a8466" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jre-11.0.5-ea.7_osx-x64_bin.tar.gz", + "checksum": "12b6fd5fac3b52e9de73c1dd4513f563fe117134e09a9518d4d9ac13330d716f" + }, + "dmg": { + "name": "sapmachine-jre-11.0.5-ea.7_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jre-11.0.5-ea.7_osx-x64_bin.dmg", + "checksum": "74a9e5515601263c22934e2fa7259a489e764dae835fec946f5f86618b431f04" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.7_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B7/sapmachine-jre-11.0.5-ea.7_windows-x64_bin.zip", + "checksum": "6c65ab6781d0c50ec91dae18c43b62b10df713fd47079ec660113b0566e00efb" + } + } + } + } + }, + "sapmachine-11.0.5+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jdk-11.0.5-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "ce074af2639b8bcd2a97b31279926cf25f99f8621d1be42ae78f767684a4b02f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jdk-11.0.5-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "3eca5e6ed36364017a750832b5a024edb49e011c98d0ecd99c8c4650ff3df88c" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jdk-11.0.5-ea.6_linux-x64_bin.tar.gz", + "checksum": "23e3a71daa6d40cd88be5b4d0a6420bcaa76ca42cbd40b1722f3a365f225894e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jdk-11.0.5-ea.6_osx-x64_bin.tar.gz", + "checksum": "4a69a4696d4a3bfd65172671d13975510a53988ff72f0dbc3e2aa61821430ec3" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.5-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jdk-11.0.5-ea.6_osx-x64_bin.dmg", + "checksum": "e7a0efb02bb1242bb489059dde73f134f2177e3e27e01743a2e30a030186b3d3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jdk-11.0.5-ea.6_windows-x64_bin.zip", + "checksum": "ad00ef067d6c329cac857d528b8ad9782ae3ad708835b0563092a26d5ed2e374" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jdk-11.0.5-ea.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jre-11.0.5-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "9fa9540a5949d98d5ad4a142b4dd727baf6b4e06268067ae969ba7e7f6d22d3d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jre-11.0.5-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "66ddc2b28909dc17513120a811eda114d082f38fabd86ef1cd56b8dc93e2a5cd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jre-11.0.5-ea.6_linux-x64_bin.tar.gz", + "checksum": "6bec0e5fdab593f03b1c58ce77d08402ab2b93ee946c8c6ba3c88dc52402f00d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jre-11.0.5-ea.6_osx-x64_bin.tar.gz", + "checksum": "1ff1a15fe32b8efdd10b5a9c6c82780365ffd112bfb0ddd9522554639d960271" + }, + "dmg": { + "name": "sapmachine-jre-11.0.5-ea.6_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jre-11.0.5-ea.6_osx-x64_bin.dmg", + "checksum": "d5981d91ab28a66b86f8a955e4ce7dbd49a5c262d8dccb18f88e324755e6745e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B6/sapmachine-jre-11.0.5-ea.6_windows-x64_bin.zip", + "checksum": "6d0134085a6bc225098b9b42e1e4c2b57eda07dd4b3a79ab501c2ffd4dc8efdf" + } + } + } + } + }, + "sapmachine-11.0.5+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jdk-11.0.5-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "a9f8441123e888446b69b13c83c42624d18cd06ff138369c3dbeaef9cbc6652d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jdk-11.0.5-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "87586353b8f04bab465ee6bb9e9deef4c11f7812dd64b71d16cd1db6b7141eeb" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jdk-11.0.5-ea.5_linux-x64_bin.tar.gz", + "checksum": "529510865c324eba6e2f9c5e6bfacfbdd40ab94da3e3b7a7d9ef9c65eee76d48" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jdk-11.0.5-ea.5_osx-x64_bin.tar.gz", + "checksum": "d4127a8b9f01762b6d7f8a6803af858d42e3acf68c2ad0f499a7ff333e6f62f9" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.5-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jdk-11.0.5-ea.5_osx-x64_bin.dmg", + "checksum": "a658f1a82a964f112f4e3a489966147c30258c743589dfab9ba7b951a75711cb" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jdk-11.0.5-ea.5_windows-x64_bin.zip", + "checksum": "080fdc91040c9ca7b9ceaa02ee964fdfdad50d816a749fe2f34a853e6d9378b6" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.5_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jdk-11.0.5-ea.5_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jre-11.0.5-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "e7207a1ad38d4b5e04272bd8a9e4d1346163d86e0a0f3b2a2fd2d47db0cb92d3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jre-11.0.5-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "897651014c47eb381d68d59549dfff3cd8d8a39452434bfa55ac6da30fe00e58" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jre-11.0.5-ea.5_linux-x64_bin.tar.gz", + "checksum": "1376e76e9dd51445bfc997faef277abddfeaaf6ee499fd5ccd14b7d10da4956e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jre-11.0.5-ea.5_osx-x64_bin.tar.gz", + "checksum": "05efb505a2812da9d6486012b6cd8769940314910b278c5c2faf9cffa272bc15" + }, + "dmg": { + "name": "sapmachine-jre-11.0.5-ea.5_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jre-11.0.5-ea.5_osx-x64_bin.dmg", + "checksum": "e9c38b9138ee876a5fc8d3a9685d4405937a6a9fe18be6196d75276f7419ad91" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B5/sapmachine-jre-11.0.5-ea.5_windows-x64_bin.zip", + "checksum": "b9fbb18bec04481d114d079d7a527dd8264ac140e4c466278068d098e3b3cadf" + } + } + } + } + }, + "sapmachine-11.0.5+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jdk-11.0.5-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "1f6be3b2c73101f09d2901a9ba4bec8df771f8f42f1cb59456125c4448d563d7" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jdk-11.0.5-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "d3bf2aceb3934c7dacb30fe59ad741d267fde8909a2485c471177af504445574" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jdk-11.0.5-ea.4_linux-x64_bin.tar.gz", + "checksum": "32a7f945ca840e97bd6d9ecbb920f8d539bf94e17ccfd59c9a9fa7616407d7eb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jdk-11.0.5-ea.4_osx-x64_bin.tar.gz", + "checksum": "79c860ccc5a1217d850795dc59833ec96b699feb70e0523a6c99b44841176a96" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jdk-11.0.5-ea.4_windows-x64_bin.zip", + "checksum": "eb646f8e8f91fede917f47118c718f550c3087af50c7578f74949e93f3487d8e" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jdk-11.0.5-ea.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jre-11.0.5-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "d3235a952c8fed0eb551ace32e7b7a8b2d72eabdcf45cd4c8fcea15764a7c25a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jre-11.0.5-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "e95216ec9db922b678ce0b863bc409210fa683b7517d03ecc190ac1bc4701776" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jre-11.0.5-ea.4_linux-x64_bin.tar.gz", + "checksum": "01a3d06f0b47e808bf76670e3464c4ea16b490007b74a3cffd5676239e05c706" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jre-11.0.5-ea.4_osx-x64_bin.tar.gz", + "checksum": "ba63f7703f5d664e67109664eafa40deccb847c7a9be6af2d5eab3e3ef44423e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B4/sapmachine-jre-11.0.5-ea.4_windows-x64_bin.zip", + "checksum": "80f6c44ba648b1936439e68e9d419322222974e107ef4ecc6467000411d71bae" + } + } + } + } + }, + "sapmachine-11.0.5+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jdk-11.0.5-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "c6a843342fdca79b3255ebe173b127b7a80bacecf1f97346ce06347caf225d8f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jdk-11.0.5-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "d3c3e540d1f1f3cdb0ea79eacd6dcd4c5be77658168e88109091308c0dba0854" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jdk-11.0.5-ea.3_linux-x64_bin.tar.gz", + "checksum": "836ce297e802e235748df12ac0d6d577083ad3b88f4cc0b3457fdd51e3243ff6" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jdk-11.0.5-ea.3_osx-x64_bin.tar.gz", + "checksum": "0ac9c16cdbe708d464095bf835cfc7d331080790f1d60bb37350a7bf3380677f" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jre-11.0.5-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "2e562b233e486ea06424d6b266b64a416f1851e949651bcb59bf2a0b8ea5c25b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jre-11.0.5-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "d55c68b1486b37faaf28fa6de035d73aff2bb3bd9084076a62671fd32fb97602" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jre-11.0.5-ea.3_linux-x64_bin.tar.gz", + "checksum": "cdc1936783903588ada7f8199aaa422befed75bb2ecb04342db44d657236c17b" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B3/sapmachine-jre-11.0.5-ea.3_osx-x64_bin.tar.gz", + "checksum": "0516c3b3f3de75c965dd2b1c452aac2a5d0879fc3f6268b18947ed72f43a8ba6" + } + } + } + } + }, + "sapmachine-11.0.5+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jdk-11.0.5-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "54b694447b2a040f05bf3f8ebe7db90c359a9668be501e4b1e5d5e3c3e6bc0c9" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jdk-11.0.5-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "7d593f27eb1903c958a0515141f98150b452b6cfc74ab0fa9c6bc7ee7a742e74" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jdk-11.0.5-ea.2_linux-x64_bin.tar.gz", + "checksum": "4ce1ea371b5eb202dcebc946f2b161fe3b2cfb49ba5fb89023aa1668de77e888" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jdk-11.0.5-ea.2_osx-x64_bin.tar.gz", + "checksum": "196f7e15edb2356391e964dd9837342f81f52289670c1fceace50aff8b076e0c" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jdk-11.0.5-ea.2_windows-x64_bin.zip", + "checksum": "2844272aa553a7a8172530020a6373672e375525c4c5d309be93bdbdce34dbb0" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jdk-11.0.5-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jre-11.0.5-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "63df834b89e5b0639479db307da18c7a11761f3f17e59e43fde6a1ba220eacb6" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jre-11.0.5-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "5bfbfeb6978b5e7a78dae0701ccda80586c6f9c423ac00d3dd9316bad5bc622b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jre-11.0.5-ea.2_linux-x64_bin.tar.gz", + "checksum": "a6ee2bdd858cf0a95641f00f34b6e8fcac385bf08ae712a002210b3519f904c8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jre-11.0.5-ea.2_osx-x64_bin.tar.gz", + "checksum": "dba6ea4d71bdb490a91f5fa169fe8ce66ccb0eb6ded2a963b0b91fb2806ca0ea" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B2/sapmachine-jre-11.0.5-ea.2_windows-x64_bin.zip", + "checksum": "34735d8c53d646aa21b1c8d96c8f7f3c16dd4ed6d176001690c6c50b3fb34ffe" + } + } + } + } + }, + "sapmachine-11.0.5+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.5%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jdk-11.0.5-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "dc1acc2ac07771125a4a26abd395dd1d384f27b1358ca60b0af5f22bbdf183ce" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jdk-11.0.5-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "a0425c5894ebe3f7b4c2784533783eb0eb3fc62afb3269a29bf98dc86c38c3cd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jdk-11.0.5-ea.1_linux-x64_bin.tar.gz", + "checksum": "00bf49913b949303dbbf5cd1d48cbacfc3b1dae6c84397479c341916be941f1d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.5-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jdk-11.0.5-ea.1_osx-x64_bin.tar.gz", + "checksum": "95967a5aefb967d098ffe07b1f05bed472a51d60f199a26c672b1c7895177610" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.5-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jdk-11.0.5-ea.1_windows-x64_bin.zip", + "checksum": "3cf7c94c63df03dde2a3f4c7b9678e9c03dc6ccdc7ea1c204664668b24ccf298" + }, + "msi": { + "name": "sapmachine-jdk-11.0.5-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jdk-11.0.5-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jre-11.0.5-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "a9509556f49f886a1441bd72400c1d8c3f4b4952b7dcc61ece5289e60d5edbe8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jre-11.0.5-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "592a7e20d4e71e67eae0abb47590771b2888b563b4e8a661e9535a5b0eb42362" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jre-11.0.5-ea.1_linux-x64_bin.tar.gz", + "checksum": "fc89ecc7b662ab64527127b56c3c47530080cc25028eaa096d6dca3fc45c7708" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.5-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jre-11.0.5-ea.1_osx-x64_bin.tar.gz", + "checksum": "56ee43c98e30998bb24dc165114da2046714f85fd6e9e145313d90e462d9fcf4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.5-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.5%2B1/sapmachine-jre-11.0.5-ea.1_windows-x64_bin.zip", + "checksum": "f8f304ed208d972d2690abe6fda36adc837692afa2f9e79a8f88d1d7201ee9bd" + } + } + } + } + } + }, + "11.0.4": { + "sapmachine-11.0.4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jdk-11.0.4_linux-ppc64_bin.tar.gz", + "checksum": "2a59b5404ab750cb87dff2e9d870474700df882ad25c84cb27b36357427d90b4" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jdk-11.0.4_linux-ppc64le_bin.tar.gz", + "checksum": "362459afc09714235783e0d737177e40222579b7609ad5b921e7895f455330ac" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jdk-11.0.4_linux-x64_bin.tar.gz", + "checksum": "a572665d9dce3caf4c8f73ff954cd49bf66291d8cdd6a5d1caa64a575f869f12" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jdk-11.0.4_osx-x64_bin.tar.gz", + "checksum": "98afe558077e2057e40dfcdcb66e9be213494b32e2d306e74d0e949892b2e3c9" + }, + "dmg": { + "name": "sapmachine-jdk-11.0.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jdk-11.0.4_osx-x64_bin.dmg", + "checksum": "bfe87af4495b0b4a7209a694c36108d9591ebaf136cb45801dc06cdad296ad51" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jdk-11.0.4_windows-x64_bin.zip", + "checksum": "f05c34c08b0ef79755f84820184ab1f811b4f54be74cde8d5344cded6e596404" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jdk-11.0.4_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jre-11.0.4_linux-ppc64_bin.tar.gz", + "checksum": "92e5f133f4f8c68d6b4c01f09a747e4f7b20189bebad2567fc0736aab1004bc3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jre-11.0.4_linux-ppc64le_bin.tar.gz", + "checksum": "c143b1da2517f567f5eedee820ba5213a2cc58407a89578812c7566d9c9a15dc" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jre-11.0.4_linux-x64_bin.tar.gz", + "checksum": "6916ce95f7cbd043d11f8c8f30d7979b7f3fe2a69b5d9b56c8a5242d38ab372d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jre-11.0.4_osx-x64_bin.tar.gz", + "checksum": "b03786ec1ad7eb70985b2089fd1bdd654d297f8a6b7fbedd9ee19bd2b1a4e14d" + }, + "dmg": { + "name": "sapmachine-jre-11.0.4_osx-x64_bin.dmg", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jre-11.0.4_osx-x64_bin.dmg", + "checksum": "7c6e4f9440f03601d728fc522729f5c8d9ee64ace62530742d5715d2e729e201" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4/sapmachine-jre-11.0.4_windows-x64_bin.zip", + "checksum": "648680332b2270f265f9d65ae5f5a0189e1c27a745a832c462ffb6990c2826d9" + } + } + } + } + }, + "sapmachine-11.0.4+11": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B11", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jdk-11.0.4-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "d08467f321d118f6c764e55cd71fa0ad295e6672d8072461c612a70b7b616b5a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jdk-11.0.4-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "f6cb3960be59f79a6d7aa9115620e6c19aacb37af65c92563b65357e279fa2d1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jdk-11.0.4-ea.11_linux-x64_bin.tar.gz", + "checksum": "6201bf18c63d7f3bafec65decb8900c18507235eae6b1b96aeb6109786c385bf" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jdk-11.0.4-ea.11_osx-x64_bin.tar.gz", + "checksum": "7fdf99bd359625a489aeba16798e507801675c2b53eb2d68abcf3d8597555b6e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jdk-11.0.4-ea.11_windows-x64_bin.zip", + "checksum": "30e3d935a2babd4383036bf6822ebb09678e210086405234dbe601a2a7856474" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4-ea.11_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jdk-11.0.4-ea.11_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.11_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jre-11.0.4-ea.11_linux-ppc64_bin.tar.gz", + "checksum": "0b300a2221dcabaac74adff714fbc6a76acf2505fa2ff05e626d97b64aae91df" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.11_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jre-11.0.4-ea.11_linux-ppc64le_bin.tar.gz", + "checksum": "07c42772a0723c0acd34de561421a32681ea2ec627ad055a23ccd43857ba92f4" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.11_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jre-11.0.4-ea.11_linux-x64_bin.tar.gz", + "checksum": "5eaa575b1826e5424734f73b288f4d99f39979e0c9bea9c3ded3d5402ce7b1e0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.11_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jre-11.0.4-ea.11_osx-x64_bin.tar.gz", + "checksum": "6acfa38f2fd277d6d0c8a62af5f2ed600a31336b6945499778f96be813d26003" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4-ea.11_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B11/sapmachine-jre-11.0.4-ea.11_windows-x64_bin.zip", + "checksum": "a5d1a36cc110e4401179921103be76ca842e2015c5cb9b8029a743998f138bb8" + } + } + } + } + }, + "sapmachine-11.0.4+10": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B10", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jdk-11.0.4-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "689dee0d4b4b6c3c3833c80350a52d7013900d377bdbccab25c361558d598387" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jdk-11.0.4-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "4e5d6ebfad24428b6e542f81d284b680e708d244d9f9eae9b4c9d0cb9553d2e8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jdk-11.0.4-ea.10_linux-x64_bin.tar.gz", + "checksum": "b843bda77d9cd85fd2cdb1f82cdfd805393ca57e58abdc128230d37e71c08113" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jdk-11.0.4-ea.10_osx-x64_bin.tar.gz", + "checksum": "1ca6ad7987f38accd2d99784cf0ecd3e0aee559a52df31ec1a1cd89e217b8ef8" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jdk-11.0.4-ea.10_windows-x64_bin.zip", + "checksum": "9d4df69bd906cdd707299112e4b975ca97dcbe2983eee4ef787a912108819d64" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4-ea.10_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jdk-11.0.4-ea.10_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.10_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jre-11.0.4-ea.10_linux-ppc64_bin.tar.gz", + "checksum": "8c298dbe1e4794d47465bda1ba69f279086629c6dada9f40e9fcacf20b7a4e5f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.10_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jre-11.0.4-ea.10_linux-ppc64le_bin.tar.gz", + "checksum": "0c3d6d6dd12a213c8818b98a0ee7846a16e9eea02d8b3a80d62d2cf5ca76ca41" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.10_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jre-11.0.4-ea.10_linux-x64_bin.tar.gz", + "checksum": "199fded1cbf6204e5ad7df406dba1633e8f5aed187e6dbe9aa14fa4f1e7229cb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.10_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jre-11.0.4-ea.10_osx-x64_bin.tar.gz", + "checksum": "9ad2fe87c7eae40732e2967d7440e30bc4f2d2373d763fe8874555cb27bedb61" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4-ea.10_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B10/sapmachine-jre-11.0.4-ea.10_windows-x64_bin.zip", + "checksum": "4925cadcf1a8a9c4b846674a92fdd22ad7cae71184d03dc68d3e9b537cb3ebcb" + } + } + } + } + }, + "sapmachine-11.0.4+9": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B9", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jdk-11.0.4-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "00be60046a29c9a3bce950634fa2affcdcd76d9b52ed5a10133b9bc61d59c3a8" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jdk-11.0.4-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "2fd9d74b4c82190d28159f9cd106e644c1f2ee7f6ad8136213852b22a69e5ffd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jdk-11.0.4-ea.9_linux-x64_bin.tar.gz", + "checksum": "9759876625104b01af6deaaa30d7a5fe5065119ac3493e95d0cd071e6e24ae27" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jdk-11.0.4-ea.9_osx-x64_bin.tar.gz", + "checksum": "1970ffa585f8cc0ed1e89f4b2fe08550015e8941e7f46ee9992b4ee6769ad74e" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.9_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jre-11.0.4-ea.9_linux-ppc64_bin.tar.gz", + "checksum": "4278b0b8550ff2b1fec99164e27743403d294b97648a69757584f436cabef902" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.9_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jre-11.0.4-ea.9_linux-ppc64le_bin.tar.gz", + "checksum": "88bc3a0e430fd91bf5b3d10913339deb2f61f96d4bdbba53d02b3ad41f3f45a8" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.9_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jre-11.0.4-ea.9_linux-x64_bin.tar.gz", + "checksum": "d2c059874f4476db0ebb18eaf56577fc84a6ec922b3193397324dda20c3b656c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.9_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B9/sapmachine-jre-11.0.4-ea.9_osx-x64_bin.tar.gz", + "checksum": "a28dce9a7a7e8ae06b3d1ae435e85cfe5319dcf5b108c597a0a8f2f0291d9576" + } + } + } + } + }, + "sapmachine-11.0.4+8": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B8", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jdk-11.0.4-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "2f82b701ccacea037d596752b877b59bf90b3497b42e0a2ddf2ada3df27d199a" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jdk-11.0.4-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "68857c2189946a202eabd25bd88230bf440734a6fa5c5219214d00fe7878dd10" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jdk-11.0.4-ea.8_linux-x64_bin.tar.gz", + "checksum": "604d1b51e40f100f64ef4082b1a923d7bd75a716d16f9c0d7e7015f59d676dbc" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jdk-11.0.4-ea.8_osx-x64_bin.tar.gz", + "checksum": "1c9cb298d052f9d014b5fb0804145ea2f52ecd7c926ae7fb6614cdde7449c218" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jdk-11.0.4-ea.8_windows-x64_bin.zip", + "checksum": "f17ab81528c7ded604d7b7148fd27fc801149359c0f26d4b8ec20f11203deaac" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4-ea.8_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jdk-11.0.4-ea.8_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.8_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jre-11.0.4-ea.8_linux-ppc64_bin.tar.gz", + "checksum": "1b47396a43ef2fab15187330e899534c53aae5eb9f3c450f17a03e22bd5c2f9b" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.8_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jre-11.0.4-ea.8_linux-ppc64le_bin.tar.gz", + "checksum": "a6e0eea7b1a50978a2cd5302857c86f1d1d624ed5015470359ba55c8124cf926" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.8_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jre-11.0.4-ea.8_linux-x64_bin.tar.gz", + "checksum": "4932bdcd598ed978bb2aa0e26d1385aa809611ccfeee8ab94002b0c6df67f6bb" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.8_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jre-11.0.4-ea.8_osx-x64_bin.tar.gz", + "checksum": "a6733055fbaf4ab566ed454fdad8d6626ae41b45a579145bee6bc7353408d627" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4-ea.8_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B8/sapmachine-jre-11.0.4-ea.8_windows-x64_bin.zip", + "checksum": "ffcbe7cc729a20b5df922dc7fb8153c64b73c34522abaa9a51dacd4bbeff1970" + } + } + } + } + }, + "sapmachine-11.0.4+7": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B7", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jdk-11.0.4-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "6a2768191b19831d410f89ec738ddc448aa0b717a9b9c7619576355f2480c2bb" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jdk-11.0.4-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "f783247e750692ebd0e492980ccb8780e87f778280d1f65b1d9cf044177d6eab" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jdk-11.0.4-ea.7_linux-x64_bin.tar.gz", + "checksum": "623cd7a2f2a900934952f66af28aff447f2712dbb7a686b2778450010f4c57df" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jdk-11.0.4-ea.7_osx-x64_bin.tar.gz", + "checksum": "50c30267ea74cb48e353da96e510306862f5fe50337b7869e3c3d4e6b0ceb55c" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.7_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jre-11.0.4-ea.7_linux-ppc64_bin.tar.gz", + "checksum": "63bc6bb63132826c7a0ab764b81b85bc02c6d224b7b2c73078ebcfb04964e5a0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.7_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jre-11.0.4-ea.7_linux-ppc64le_bin.tar.gz", + "checksum": "fe6196cf4623ca2705bc142e9c62ac19776739234570130e94cf1caba4db72f3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.7_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jre-11.0.4-ea.7_linux-x64_bin.tar.gz", + "checksum": "42b8d27e1962e4e77d6c4a956aa6679ca5a3a223d2a6deccfb446cfb593835f8" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.7_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B7/sapmachine-jre-11.0.4-ea.7_osx-x64_bin.tar.gz", + "checksum": "8d2c84bc34542f4674a3c86b10b9e11b43587afb73baf460fb8bde52c78c7d5c" + } + } + } + } + }, + "sapmachine-11.0.4+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jdk-11.0.4-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "9360e296e6fec90c4622fd397859eed6cd720a5655b7776d24c047c5456df7b0" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jdk-11.0.4-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "92d1685a118be94889a7999a2abb5af8b048fc6bad0f700d438b75dda503be1e" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jdk-11.0.4-ea.6_linux-x64_bin.tar.gz", + "checksum": "19bf3cd5f5782c6fa72526c32b4b1c4227b7a6159db19d7b0e6b7de9f962f16d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jdk-11.0.4-ea.6_osx-x64_bin.tar.gz", + "checksum": "87f25d01627edfc156c4e77a0bb570ecab0555d33cb05b03c3be9b13bdf503a0" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jdk-11.0.4-ea.6_windows-x64_bin.zip", + "checksum": "e3a2dc9a8d22b10bd02d0b48108e7504b23713607c01c374409caa5275bd252b" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4-ea.6_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jdk-11.0.4-ea.6_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jre-11.0.4-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "2fb163d10960ed96eb0ae1d9c3d9e6d6d0645f21a262af96faba13b9633bb456" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jre-11.0.4-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "81b5d91a4205f8de0ea6dfb51f943a25b28f45fac67d2e5de01927fd6e9892bd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jre-11.0.4-ea.6_linux-x64_bin.tar.gz", + "checksum": "77af284eb2ee665c46d624b494810d2b112ad398aa29dfa21c13660a32fafd6c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jre-11.0.4-ea.6_osx-x64_bin.tar.gz", + "checksum": "edf8edb51a9eac1eeede38d70175bedabab016f0380790803181f187a33b78e7" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B6/sapmachine-jre-11.0.4-ea.6_windows-x64_bin.zip", + "checksum": "0839e589d87d89f465108b25a4c5f316b5082caca6e8c1be75558e92e6e0820f" + } + } + } + } + }, + "sapmachine-11.0.4+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jdk-11.0.4-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "184f56d8e3b1a47d895648e96805663091e3789fb0658c09e6b73ca01ac95c09" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jdk-11.0.4-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "b93e164986a668b8c5862f66a9c867f90bdacab1e309c4f1ca54ab0bc77eaaf5" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jdk-11.0.4-ea.5_linux-x64_bin.tar.gz", + "checksum": "f5a978557cfdbc4511a51c9cff9303193b72801e07d3047d970553ef7bea9ba1" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jdk-11.0.4-ea.5_osx-x64_bin.tar.gz", + "checksum": "bb2ccb6f286d525110a341a4956f3e28b8059d442c8c87b96a7c7b6a36db0ee0" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jre-11.0.4-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "eb88c5e88165aebecc31717dadef260fc8e012b0d615dbd922de85252815cd37" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jre-11.0.4-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "7a09494d6d27dd08e5a2e58fb45e34779f9e587dfcd5a40c09219fb9701ff5da" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jre-11.0.4-ea.5_linux-x64_bin.tar.gz", + "checksum": "59e7294eec8b886d1e2267a5d0f2772a16a61ece94ae687c968f4fbd82ed8e3f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B5/sapmachine-jre-11.0.4-ea.5_osx-x64_bin.tar.gz", + "checksum": "db0514a11c289431462ed35274f42a911eca67f4cd4b60ff3dab9d4a8481584c" + } + } + } + } + }, + "sapmachine-11.0.4+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jdk-11.0.4-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "18e72d0cc702429c59662e1c42c61c190abdda7fba5c27cf58dd26c3ba0737ee" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jdk-11.0.4-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "577351c975bdd453ed2a763b3419a90fa6960b5c2768faf075a0e9b3665a1fe1" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jdk-11.0.4-ea.4_linux-x64_bin.tar.gz", + "checksum": "1e3c926467e047cb14a61fc007653db2dc64f025a8fc5f7904680b5797c6673d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jdk-11.0.4-ea.4_osx-x64_bin.tar.gz", + "checksum": "85f26dd37ec34a05aa73ae3c1ee345665bcefd90d503138d5ef67472a14104f9" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jre-11.0.4-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "513724917728895f5ef1bb182807c817851477280e3447f14e123f3f6d85199f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jre-11.0.4-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "0ff1e393ed067524e05ca33f057b91a3d08084f99edb5b4e1ea5758b4129866a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jre-11.0.4-ea.4_linux-x64_bin.tar.gz", + "checksum": "da5f9dcdf09bf391efd38576e7310cb146a9ee13b34f4b2a7f3a5a4f151ba27e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B4/sapmachine-jre-11.0.4-ea.4_osx-x64_bin.tar.gz", + "checksum": "84cc02ac31adc30ccfa31a624b56596f1e0d27f5a9b3a4c44dd2192e04801e06" + } + } + } + } + }, + "sapmachine-11.0.4+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jdk-11.0.4-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "8c8872dd1cca85d08c220adacc1bc9fce34332d59071ea5f73454eda2af3acec" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jdk-11.0.4-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "fe6da44b19e99291c08a0d0a4634aed4c7562ee51898a130b632db7d915545d9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jdk-11.0.4-ea.3_linux-x64_bin.tar.gz", + "checksum": "6efb23608fce887e5cbfe4b1795f33612e18bce268bd5cdba60d160b63e4d363" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jdk-11.0.4-ea.3_osx-x64_bin.tar.gz", + "checksum": "888a806b5479a6e853411d6832f003ceed4b7a044eee232ff894aa21d813540a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jdk-11.0.4-ea.3_windows-x64_bin.zip", + "checksum": "67103ee5fd031fcf5a74799c4e179a8001c5e4ffe6900b2368e57531bb3c4273" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4-ea.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jdk-11.0.4-ea.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jre-11.0.4-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "c55dff14b549241e53171866137d155b4658c6661b340d940d3aa8cb2a067cb3" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jre-11.0.4-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "bca6280ef7336d24f3385a1a7a1c0e17105a16aba41479011db376a81b06c32a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jre-11.0.4-ea.3_linux-x64_bin.tar.gz", + "checksum": "8e045d346aab264e2f2cf0313364f950fbebcc547dd10c46b37c9b50b115ffcd" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jre-11.0.4-ea.3_osx-x64_bin.tar.gz", + "checksum": "47ebd71462f4efe0dd040423b1e72aacf6a85e26f4a7c6be4535effbee6789c9" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B3/sapmachine-jre-11.0.4-ea.3_windows-x64_bin.zip", + "checksum": "6d93a6c662d2dff848a9b6cc92aeeffc83121bef70085ced078e8db4876ae398" + } + } + } + } + }, + "sapmachine-11.0.4+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jdk-11.0.4-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "33e5ef5c0b90291a87f91c1e23a272900cdb98a145756e58987b3b5ca3813387" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jdk-11.0.4-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "826be61c30dd6eeff4aefe5579da12ce91b1421d64ce58191407ee77982e0ea3" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jdk-11.0.4-ea.2_linux-x64_bin.tar.gz", + "checksum": "be547a0267c6d1e7becf42f9f585875d5cad7276c15f4a3975eb01f481fc74b7" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jdk-11.0.4-ea.2_osx-x64_bin.tar.gz", + "checksum": "bf6bc12790fca78f7f0085fefbb715e8db3ddfb5236a78e8bfb366f9e8209d1d" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jdk-11.0.4-ea.2_windows-x64_bin.zip", + "checksum": "0f6c2f6ef71ed60ea8b895009642a7be2befa8bfc25b0026bd612c7c00db9abb" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4-ea.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jdk-11.0.4-ea.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jre-11.0.4-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "691709ea9b1c3dc81aaca6cb20a8436f0b87865a21772935dd65d523531354e1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jre-11.0.4-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "2ac99149fe2714141ce0ceeb937f05e13f15f16677c33cda712861745b089936" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jre-11.0.4-ea.2_linux-x64_bin.tar.gz", + "checksum": "f8a97574e20341f1ee86dfc4b14e872409a6c0673fc5dcbb005c6d664439b5dc" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jre-11.0.4-ea.2_osx-x64_bin.tar.gz", + "checksum": "6f080c56d9be3b35fc136861f3d15caecbaa3a468a93b23108b443f75c8200d0" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B2/sapmachine-jre-11.0.4-ea.2_windows-x64_bin.zip", + "checksum": "8dc4877971cc2272795af918f825c8889cc2e4d94df24390344780aad28b9634" + } + } + } + } + }, + "sapmachine-11.0.4+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.4%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jdk-11.0.4-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "6b35eff7702dc67c39b0217567795b0e963e41cd4a1d129c2697d2b1c935e07f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jdk-11.0.4-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "05433b52f13eabb69d7168c904c6c7036092a7323166ee1694e9ff6fa1a7374f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jdk-11.0.4-ea.1_linux-x64_bin.tar.gz", + "checksum": "6e6f30e539a1befdcd2358373062519c194a58b0e04332bbcf5ff5de4170c8c3" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.4-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jdk-11.0.4-ea.1_osx-x64_bin.tar.gz", + "checksum": "6fc6e31b9b83eefd880b238ad5bbc6bd96f095d3da5584dd7fb0dc8e040e438a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.4-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jdk-11.0.4-ea.1_windows-x64_bin.zip", + "checksum": "bf87d856eb9eb1c4af3fcb3ae7191a5df0db0a490ffe9e17e5335c3744e6942d" + }, + "msi": { + "name": "sapmachine-jdk-11.0.4-ea.1_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jdk-11.0.4-ea.1_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jre-11.0.4-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "ccb3b2c1db9e73229786e610cfc3fddd9d2ae4ddd04579855d1485a93b0bb1c5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jre-11.0.4-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "e988aa678df401c1260b413618027523f155571c61f3722f2eb2e8c3f91cf874" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jre-11.0.4-ea.1_linux-x64_bin.tar.gz", + "checksum": "d4dc18e89ef42f806e2064464628e10453e073b81589e2657b96b39006cdc75c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.4-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jre-11.0.4-ea.1_osx-x64_bin.tar.gz", + "checksum": "c6db9234f1e548dcbd065fd0b83e00c2fe7708efc1753e9de5c2bac2b4b422c4" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.4-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.4%2B1/sapmachine-jre-11.0.4-ea.1_windows-x64_bin.zip", + "checksum": "8a35014247ebb2cc9ab3dc46bb3a5e0c9a99e9413bbf4321311821f6362d98c9" + } + } + } + } + } + }, + "11.0.3": { + "sapmachine-11.0.3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.3", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jdk-11.0.3_linux-ppc64_bin.tar.gz", + "checksum": "49d202808c2be10a1e679f1c398c439f6a0f72bca5ee8aaa48b2111322a1d05e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jdk-11.0.3_linux-ppc64le_bin.tar.gz", + "checksum": "5e3dddf2e8d617511f84c14a1c32db9d02f06811aec6ea71566dc895d1f8644a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jdk-11.0.3_linux-x64_bin.tar.gz", + "checksum": "ad3d4b65214734e324bfdc50392c1092d2f6bfebef12067604066ba3a3d50367" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jdk-11.0.3_osx-x64_bin.tar.gz", + "checksum": "c051f653e2a14b1e152ff20327200b4907fd8c9fda180ab7f2deb0a6b5242400" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jdk-11.0.3_windows-x64_bin.zip", + "checksum": "dd1299a577fd8f61003eb20baf999a3135ba968f0620f37a477f96afc2c1fc3b" + }, + "msi": { + "name": "sapmachine-jdk-11.0.3_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jdk-11.0.3_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jre-11.0.3_linux-ppc64_bin.tar.gz", + "checksum": "fb614843ccb2170884b5dfb5f4e494fce40cbfd7da938cc6773d1d8b904b0571" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jre-11.0.3_linux-ppc64le_bin.tar.gz", + "checksum": "84c405a25dccfd501b67b5ff95e52209aaa5cc00cd6751bd5f7b990c332a5d3a" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jre-11.0.3_linux-x64_bin.tar.gz", + "checksum": "c5202447e2afb3afae0478596235bc66b75ed711d42dbee115e1c7dbdc3b1ab5" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jre-11.0.3_osx-x64_bin.tar.gz", + "checksum": "63532b2c58d4b599d1f6edf92193572844f8fbe3449b50fad56c7636061f7aa1" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3/sapmachine-jre-11.0.3_windows-x64_bin.zip", + "checksum": "4fe9b38a55d1f30fe222230ffb3ed95dff91cea30f814aeda57f013a9d000917" + } + } + } + } + }, + "sapmachine-11.0.3+6": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.3%2B6", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jdk-11.0.3-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "dbd8489a149971289fb6f01f7e323583d36024043e1c153a7691b1b3b8935416" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jdk-11.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "8dacebbd9408d9a271345e81056cfd1eead526fb59585d0d8f4db681224c25cf" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jdk-11.0.3-ea.6_linux-x64_bin.tar.gz", + "checksum": "cb174eb3fce95cace727c9859e81c8117fa355784cc145b6f59f13eaacd8f517" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jdk-11.0.3-ea.6_osx-x64_bin.tar.gz", + "checksum": "1760215a7b9dfb23f9f06b6d0f7079e5941cb611467a72eb8ce89ba97a71d3b3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.3-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jdk-11.0.3-ea.6_windows-x64_bin.zip", + "checksum": "92afb65b08425f772b7b2f00d40833c253a3bc01ad0a9da956ddc549c9e4ad05" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.6_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jre-11.0.3-ea.6_linux-ppc64_bin.tar.gz", + "checksum": "8b26ae99ab186457e2bc104c8fd8d40b2140fe03af8c0c163a629cace12e7502" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jre-11.0.3-ea.6_linux-ppc64le_bin.tar.gz", + "checksum": "5555d57379c979fb162ee48864c6738b1cfc52ae9b61e54609dc33ccb96e70cb" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.6_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jre-11.0.3-ea.6_linux-x64_bin.tar.gz", + "checksum": "5680215ffd1ea3e318153174dd3e6e1591824b4da1e8d65f2fda498cb9422798" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.6_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jre-11.0.3-ea.6_osx-x64_bin.tar.gz", + "checksum": "a3b83a4c73f15ea24c58b15fb63b03de06598ea183f0bd49bd1f19f574609c87" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.3-ea.6_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B6/sapmachine-jre-11.0.3-ea.6_windows-x64_bin.zip", + "checksum": "1b97c2c55875281e4ec69f479fdb9ebd0582011faa962a688ad846fda1c3bebd" + } + } + } + } + }, + "sapmachine-11.0.3+5": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.3%2B5", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jdk-11.0.3-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "d14844373735144b6f3a326a9a60b8a711675aed8df7d2ab9e0fa1617e9ea10d" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jdk-11.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "b04a2d1dcdf2b4c2fc1aa9c89fc6454d5b11762f8133ce64a2aebe68a842ceee" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jdk-11.0.3-ea.5_linux-x64_bin.tar.gz", + "checksum": "8a61887e4c1a98527a9ae259cfdfcd907342f6cdf1bdc183795cc8475fc2f7a1" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jdk-11.0.3-ea.5_osx-x64_bin.tar.gz", + "checksum": "0eb1c9dfcb58b247dbba04da96981550fb465f26d64a3c8ff0ae547a918f7366" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.3-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jdk-11.0.3-ea.5_windows-x64_bin.zip", + "checksum": "89aec537f615ef547e810eb92abb783aae0f87e53bb1a9884199f33f9f09f37f" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.5_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jre-11.0.3-ea.5_linux-ppc64_bin.tar.gz", + "checksum": "eaf49da63bc7865e22aab5b5bdcd57f3ba012c07e05cf5ec4e8920d39c7a4305" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jre-11.0.3-ea.5_linux-ppc64le_bin.tar.gz", + "checksum": "036cffef76002f747f7c0e2f360ec6c40b70d3901813a51c726a5fb8fdf3d8de" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.5_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jre-11.0.3-ea.5_linux-x64_bin.tar.gz", + "checksum": "c1d9c30930903bb978ed09ab3ef3f432130e45041c9a6228705139be7ee69241" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.5_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jre-11.0.3-ea.5_osx-x64_bin.tar.gz", + "checksum": "8a546096dd654170b84c3cd243094914eee2ad8a405726ae53b26782bd330a1f" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.3-ea.5_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B5/sapmachine-jre-11.0.3-ea.5_windows-x64_bin.zip", + "checksum": "77d9cf912e8abce433e575b1c21e8888b260c99765a98d1946bfa0ca587ef8bc" + } + } + } + } + }, + "sapmachine-11.0.3+4": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.3%2B4", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jdk-11.0.3-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "91b4f6df50b1219df779eb501be569ccd371ee68f7c85e6bb6b2755a52a48e25" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jdk-11.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "12a8032d7724970e322b888df7a1ef094580a74b3c507b7b8fb47324e4c6015d" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jdk-11.0.3-ea.4_linux-x64_bin.tar.gz", + "checksum": "3d6251bf5abf4fd6890b4e075f1880bcce5a5d19904ff88cb652269ec92cb40d" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jdk-11.0.3-ea.4_osx-x64_bin.tar.gz", + "checksum": "fbe0a6fc874e2e6a8d6f5e8771fd7a91a1fdd90affd3cf9902d5de8e0a04a885" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.3-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jdk-11.0.3-ea.4_windows-x64_bin.zip", + "checksum": "9a311574baa2aeeaa03add072c1e7e2064a96c3a6086fcf304572f9475a549b2" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.4_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jre-11.0.3-ea.4_linux-ppc64_bin.tar.gz", + "checksum": "f7d6ef6b16807df41466ab0fe4ba65b2c34086bd922794e4f6c9f7bfa3c885d1" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jre-11.0.3-ea.4_linux-ppc64le_bin.tar.gz", + "checksum": "5ccead4388ad56b3cdbfc2d5d908266bc3d236321a7d35c7520bb6da7365d9d0" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.4_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jre-11.0.3-ea.4_linux-x64_bin.tar.gz", + "checksum": "af7bf7be1b0682d170f4f3a277ea58a723de4fc555fa19b80c8a0a21a8675e3c" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.4_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jre-11.0.3-ea.4_osx-x64_bin.tar.gz", + "checksum": "fc4fd020dc6901511db6ef21081b531da0afd4d2b59426548886f8256d981958" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.3-ea.4_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B4/sapmachine-jre-11.0.3-ea.4_windows-x64_bin.zip", + "checksum": "81e29ab274d5f7080c7cfef4a39a2fb1c83f48095646663d2c301eb298bcaa0b" + } + } + } + } + }, + "sapmachine-11.0.3+3": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.3%2B3", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jdk-11.0.3-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "5e96b0b8fc9e1cae5b4b2a8fa10b3c479fd572bec6098505ce4cbce884937341" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jdk-11.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "63ae0d1dbd9caae376d7f885f321422ede6004bc73ee20dcbf53bceba9205e7f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jdk-11.0.3-ea.3_linux-x64_bin.tar.gz", + "checksum": "2565bb2b4216634b6849b2603f657ff73c771fecfa7b8bc8be26c30cd06826b5" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jdk-11.0.3-ea.3_osx-x64_bin.tar.gz", + "checksum": "070daa430002eb929affaa5965d21473f07c12935aff0dd49f7759122e1f124e" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.3-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jdk-11.0.3-ea.3_windows-x64_bin.zip", + "checksum": "d918192a9a412f3558011fc312fb6269bc99b11cba6986df982647b37c01a40f" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.3_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jre-11.0.3-ea.3_linux-ppc64_bin.tar.gz", + "checksum": "01b517c1a78a2ad3bdcc9bbebcb251f5377ed10eab16c368f07a5e91eff3282c" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jre-11.0.3-ea.3_linux-ppc64le_bin.tar.gz", + "checksum": "1fbf6f29e0f0e1787438cf8496e3ab410d551fc2ee0670736ee4e1c716c9a522" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.3_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jre-11.0.3-ea.3_linux-x64_bin.tar.gz", + "checksum": "a50f23a7062ec679201a0622ac7b5df0f4e38814f255c76fc0fe2017506b6a47" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.3_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jre-11.0.3-ea.3_osx-x64_bin.tar.gz", + "checksum": "39b609efe724429971032804655083d03be4a50787a875e86a40e694656dd46b" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.3-ea.3_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B3/sapmachine-jre-11.0.3-ea.3_windows-x64_bin.zip", + "checksum": "0a92d86054f5358019764bd39bc3eb1827594c56aa240841e7614dd12cfe4fb5" + } + } + } + } + }, + "sapmachine-11.0.3+2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.3%2B2", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jdk-11.0.3-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "aa12b9e0e0d1e31f84715b8771364e1980ef347d30453b4b09891ddd0142ee81" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jdk-11.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "ee80fff6cc972c8eeffc5cdad5241074ad986cf61852e26e9bab7fbb67f2a10b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jdk-11.0.3-ea.2_linux-x64_bin.tar.gz", + "checksum": "7b55addf6eb9268b53756ef1927662f02d630f70b8acee95948a652d7ead7260" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jdk-11.0.3-ea.2_osx-x64_bin.tar.gz", + "checksum": "107987fbb2d129e4b0df579ef118c093c9ec2fc027a367ffa4d9ba3572aa3bd3" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.3-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jdk-11.0.3-ea.2_windows-x64_bin.zip", + "checksum": "e155238daedf28a0a5f7847599f23d6ea18ee18090368b5e82d41220c7807577" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jre-11.0.3-ea.2_linux-ppc64_bin.tar.gz", + "checksum": "c54eefff7e6eb6a185bd1ae191a8efa02870b612ecdfe42e6974d4a4e4d60b33" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jre-11.0.3-ea.2_linux-ppc64le_bin.tar.gz", + "checksum": "c414775f2fc0ae9aed3581d3ba8fd1d9e1be285d29fe66eccbfcba0f706f4cfd" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jre-11.0.3-ea.2_linux-x64_bin.tar.gz", + "checksum": "027629a2849f233341706cf8826911f64c5325b0094dacf4a121226d8c8c12f0" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jre-11.0.3-ea.2_osx-x64_bin.tar.gz", + "checksum": "255b01b2e899e8245bada3dd62ef8a22c46774d9842006266301fb4591e37b57" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.3-ea.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B2/sapmachine-jre-11.0.3-ea.2_windows-x64_bin.zip", + "checksum": "9bdd6a31d9fd81c5d23e0596a2e564001f0a32f2447d6c5a1050158744c70521" + } + } + } + } + }, + "sapmachine-11.0.3+1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.3%2B1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jdk-11.0.3-ea.1_linux-ppc64_bin.tar.gz", + "checksum": "78ccd06bf71b0c717e36deddf68e6c31907f6dec63b37f6864ce03af3c03dfd5" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jdk-11.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "bd695e09c4b3d287b23b03d9dfa3b5eb4ee2284ea6ecaa0ae1e8095b1aaff271" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jdk-11.0.3-ea.1_linux-x64_bin.tar.gz", + "checksum": "f84b47bfe521dd494bb58bbe4b83f9d0b6bf5d3b598d4b42c920e267662eec82" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.3-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jdk-11.0.3-ea.1_osx-x64_bin.tar.gz", + "checksum": "5131e625b6829ba478c330e463081c3a200ea522ecd7763e0a35f997c1a5d204" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.3-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jdk-11.0.3-ea.1_windows-x64_bin.zip", + "checksum": "fba93887e19f8a835eb374e0961a4886cd2b220f56a7ccfcbc5d001494fd30cc" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.1_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jre-11.0.3-ea.1_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jre-11.0.3-ea.1_linux-ppc64le_bin.tar.gz", + "checksum": "efc0e0d18f248d2714f6fc9fb68901be75970ca889c36f99687b9bbbf0c2db49" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.1_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jre-11.0.3-ea.1_linux-x64_bin.tar.gz", + "checksum": "1c184d588bffb5874c63ba2415e3603e07d0f1ac7ab966a8b304271394c787f1" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.3-ea.1_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jre-11.0.3-ea.1_osx-x64_bin.tar.gz", + "checksum": "d148f60a52783fd8245054bcf630c73d7fc9933fce4b85134a65dbb1a752c286" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.3-ea.1_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.3%2B1/sapmachine-jre-11.0.3-ea.1_windows-x64_bin.zip", + "checksum": "01a3b5d1a4761bb1beaa9d6adb3e27e02a0a538d546060a5fa36137ad6a2d2b7" + } + } + } + } + } + }, + "11.0.2": { + "sapmachine-11.0.2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.2", + "ea": "false", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jdk-11.0.2_linux-ppc64_bin.tar.gz", + "checksum": "798666badc1302f9897947e6ce2a227b933ebe62a1ddf048e0fd5f7254e0f01e" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jdk-11.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "e98c40d4e7a83b1d3420509034e3c3148d10ff5230c46e5b8cfea3ba04edeefe" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jdk-11.0.2_linux-x64_bin.tar.gz", + "checksum": "fb5629021615651c8e3f2179d5d33ceaa140beace9ce7184d00a82d953c6687e" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jdk-11.0.2_osx-x64_bin.tar.gz", + "checksum": "c17526aca0891ab291916faeca7a6cdcef77d63de8acb8362c1af0eb95a9c680" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jdk-11.0.2_windows-x64_bin.zip", + "checksum": "9cd3567fa6d61d46d8f83ba637feef4fe3deca7d17e0932c7f0c59128477f1d3" + }, + "msi": { + "name": "sapmachine-jdk-11.0.2_windows-x64_bin.msi", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jdk-11.0.2_windows-x64_bin.msi" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.2_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jre-11.0.2_linux-ppc64_bin.tar.gz", + "checksum": "4bf2a5db3266c16c71fd29eaedc694559a8dc63a20998a1f0b6444f7d477fc4f" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.2_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jre-11.0.2_linux-ppc64le_bin.tar.gz", + "checksum": "d41d780bed11f60bed4c8665e4f1a36d7d17d3ce1215d1f4b6df93a311e3ac9f" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.2_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jre-11.0.2_linux-x64_bin.tar.gz", + "checksum": "a0323ec152fd600c1753092bc690ef39966c43d798f9db4ceda144380721e651" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.2_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jre-11.0.2_osx-x64_bin.tar.gz", + "checksum": "a2ccbe4a105933a80529c2d713a0b8267ae63b0019b692208cee64171debcf43" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.2_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.2/sapmachine-jre-11.0.2_windows-x64_bin.zip", + "checksum": "1032ff2dabd8c93d379548984b6bd56571aa2654e586b49eec4e3f0e83cbdeda" + } + } + } + } + } + }, + "11.0.1": { + "sapmachine-11.0.1+13-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11.0.1%2B13-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.1.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jdk-11.0.1.13_linux-ppc64_bin.tar.gz", + "checksum": "3fc44392a634fae1841409f861e065bcb3a78e260f95ce2d50bf366ad4fc2296" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.1.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jdk-11.0.1.13_linux-ppc64le_bin.tar.gz", + "checksum": "29d595d5e020a25858f2c240d0ddce7596ef9842c8d4b90ad0f62cd8fbaa3da9" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.1.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jdk-11.0.1.13_linux-x64_bin.tar.gz", + "checksum": "41d70861c71d33ed437d28f3aaa0a22543b83271c35b7910cd8613961dee3d2f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.0.1.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jdk-11.0.1.13_osx-x64_bin.tar.gz", + "checksum": "600fc431d96fbc0b22a3cb160a1b1fbe878b887efd5be99668f3cf9677aa11cc" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.0.1.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jdk-11.0.1.13_windows-x64_bin.zip", + "checksum": "66e10ceadf6ba718ee445f332c6f96a8fe0782aae4433e5477b2e9e1593783d9" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.1.13_linux-ppc64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jre-11.0.1.13_linux-ppc64_bin.tar.gz", + "checksum": "54a7a4c6ee9ef3d5d29203e62993c9d4d7f50e7f34744217b0fa07e72c7acfb2" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.0.1.13_linux-ppc64le_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jre-11.0.1.13_linux-ppc64le_bin.tar.gz", + "checksum": "b8baddb06ff61c6da45ee9f71c32c4882c58edbd9a4aae9b2c828820dcfe370b" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.1.13_linux-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jre-11.0.1.13_linux-x64_bin.tar.gz", + "checksum": "e59fb5c426da0433a15d4f49198ad37fdd8f124b7ee82d3ca22711190090be1f" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.0.1.13_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jre-11.0.1.13_osx-x64_bin.tar.gz", + "checksum": "b0c0fd2616c7d1f8ae801ce7135ff53296735f3ae69f44b4bd46860e3c10e45a" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.0.1.13_windows-x64_bin.zip", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.1%2B13-0/sapmachine-jre-11.0.1.13_windows-x64_bin.zip", + "checksum": "ea31742e663a7ccd75f6bc1f81b95ae91460d2afef9c0798438e695eab198417" + } + } + } + } + } + }, + "11": { + "sapmachine-11+0-2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B0-2", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.0_linux-x64_bin.tar.gz", + "checksum": "fceb14c80903428c25348b50c9adca30d47559930d340d4046f706d361b4acd5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B0-2/sapmachine-jdk-11-ea.0_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.0_linux-x64-musl_bin.tar.gz", + "checksum": "db16f0b3058305f551d21ca1f718fd0e4a779887b6a0e89a81ccefc86b107d64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B0-2/sapmachine-jdk-11-ea.0_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.0_linux-x64_bin.tar.gz", + "checksum": "c9a04f78b429e07067a4f0df4becebf86329c11f05e9aab99b193496cf3dafa6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B0-2/sapmachine-jre-11-ea.0_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.0_linux-x64-musl_bin.tar.gz", + "checksum": "4e9439f6f7c0ed55ac356d9bf5b63c0866fc7011eaa189092dc28d748c204df4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B0-2/sapmachine-jre-11-ea.0_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+28-1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B28-1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11.28_linux-ppc64_bin.tar.gz", + "checksum": "301cc48aa7089e0746978c8b159faf96c8717049a6b29864f6fd7610581ef947", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jdk-11.28_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11.28_linux-ppc64le_bin.tar.gz", + "checksum": "b3e531785731a003f458e2cd979fbe7e3443227b8909311ca808f220f59fa9d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jdk-11.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11.28_linux-x64_bin.tar.gz", + "checksum": "2236f8c407134c4b12ce136c874018e03429940603f176b67c27a7eaee04fc95", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jdk-11.28_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11+28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jdk-11%2B28_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11.28_windows-x64_bin.zip", + "checksum": "1cb21c23dc89a34c0d974d2e3fc9553f4f06848dff7f3c5c969760ea1bc27479", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jdk-11.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11.28_linux-ppc64_bin.tar.gz", + "checksum": "2c08a302dba737880500a466b59a55be4f36449db212717e1ec8b81da48e1e20", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jre-11.28_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11.28_linux-ppc64le_bin.tar.gz", + "checksum": "c773fb4cdc71af37963c86b4b2c2b853c3bfeec0231eb76fdb91c7eab57f2859", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jre-11.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11.28_linux-x64_bin.tar.gz", + "checksum": "5d57d3b8ccafb40324cad3882ce80681c16b003ea0822b0e958b6cf6314bd15e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jre-11.28_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11+28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jre-11%2B28_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11.28_windows-x64_bin.zip", + "checksum": "0dd6185e050a04d79074570f266d00eee3adabc75c9728886b8a03f3f03e77d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-1/sapmachine-jre-11.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11+21-1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B21-1", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.21_linux-x64_bin.tar.gz", + "checksum": "ed1d8f5e05a5e46f2a85c48ee164ea184635b015dbaef2dcd5fbfd739aae3aa0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B21-1/sapmachine-jdk-11-ea.21_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.21_linux-x64_bin.tar.gz", + "checksum": "c0245afae76ceacfe0dbddfc2883a8552a9279690200bde30c2854283b3c1367", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B21-1/sapmachine-jre-11-ea.21_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+0-1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B0-1", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.0_linux-x64_bin.tar.gz", + "checksum": "82cb6c59e6db144c017d3ef9ef4777d150675d1d374b84942050d16ab5f04c13", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B0-1/sapmachine-jdk-11-ea.0_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.0_linux-x64_bin.tar.gz", + "checksum": "1ef48e2f4824801efbc3722dbd93efc48f8ba3c08339b872578eb7c12279c73b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B0-1/sapmachine-jre-11-ea.0_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+28-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B28-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "562a8507c08d858022d451d361634562b7a7d805036afeb2487c5facd209c372", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jdk-11-ea.28_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "d818247bd11240f58f82b8063d0226e18e0e0ac8854683d024050db7607e3f46", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jdk-11-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.28_linux-x64_bin.tar.gz", + "checksum": "d0f623d6e27fa29fab8d3779bcb705a633700746d4732ce8b9783994dc45a801", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jdk-11-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jdk-11-ea.28_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11-ea.28_windows-x64_bin.zip", + "checksum": "9c4fdbb8a914da49282e4a4d197c6a4590224f0e8e8a86371081219d25415958", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jdk-11-ea.28_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.28_linux-ppc64_bin.tar.gz", + "checksum": "f6dbbd683a06b5f7e7d6e0fbbe4178eb1eddcc9c2ea4b94b8d59552efc5ca0c6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jre-11-ea.28_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.28_linux-ppc64le_bin.tar.gz", + "checksum": "460b79b290261170726dfc456a96b08f9499772760a99092a426140545bd3632", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jre-11-ea.28_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.28_linux-x64_bin.tar.gz", + "checksum": "c2ae7d94cee018db1f21df03ce7788733ead637e905e489573d9e833e987f9aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jre-11-ea.28_linux-x64_bin.tar.gz" + } + }, + "macos-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.28_osx-x64_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jre-11-ea.28_osx-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11-ea.28_windows-x64_bin.zip", + "checksum": "7af97ea88534dc061cd45ae31a7c29143a7cc042971b45aa447fa54d5092c7f1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B28-0/sapmachine-jre-11-ea.28_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11+27-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B27-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "aff14d7c021a9984262531d36f6ed4d21234a3e91cab497d85ff81cf12e028e9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jdk-11-ea.27_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "879211e3c910bf5ae124c7d7677f4ffe3bf850fbfdf8672ee8475a0d6d6a7c59", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jdk-11-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.27_linux-x64_bin.tar.gz", + "checksum": "4679f4eedeca986b556f2ce92b75868a02673a3f6201c66dfc88e477fc18ded4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jdk-11-ea.27_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11-ea.27_windows-x64_bin.zip", + "checksum": "9b049cfbe1a96761d1c20c771d5f67f3237eb99bedefaf7fc8483e461c548efd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jdk-11-ea.27_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.27_linux-ppc64_bin.tar.gz", + "checksum": "70a0df1c02b17af80d67a8c0f71452617f274e3c2fcfd02a9d960281737f871c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jre-11-ea.27_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.27_linux-ppc64le_bin.tar.gz", + "checksum": "08c43c78e44f0bb2765fbda9a971d3223b0395dd4149eb9cc1cdc3ae58865f2e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jre-11-ea.27_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.27_linux-x64_bin.tar.gz", + "checksum": "f85f65cf483876412cdff23d0d90aa7f49f72e03538afd99195ca5a86954dece", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jre-11-ea.27_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11-ea.27_windows-x64_bin.zip", + "checksum": "894ec6f94618ffd0c1d6bd0702957c12d60afb0fec778c1e6ad06fc62990c06a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B27-0/sapmachine-jre-11-ea.27_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11+26-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B26-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "2dd570d8af1e067b55136b4d925756928130bcca5e60baa8f5a2ef880a3680d8", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jdk-11-ea.26_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "d7195b9f7b5d387da6a8d2b9f1794c2f363a7d06b624b4a98e91b4b4ff60aeca", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jdk-11-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.26_linux-x64_bin.tar.gz", + "checksum": "837451f98a8ab84bd3693bf119877d2d446221082e79266da0a6858634a4ee98", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jdk-11-ea.26_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11-ea.26_windows-x64_bin.zip", + "checksum": "5ec65c05eec14de0753db5f5295302ebed2fa0b08ae8491f95bc3a28e87d07e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jdk-11-ea.26_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.26_linux-ppc64_bin.tar.gz", + "checksum": "5389c0d0b332c36047a2627509192255fde2f97664fc44d9f4a9267f5561e252", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jre-11-ea.26_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.26_linux-ppc64le_bin.tar.gz", + "checksum": "8451c59aab5f340705b4b8dd685313a4b5bb4b7fea5fc2298e25dafa8b0e610a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jre-11-ea.26_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.26_linux-x64_bin.tar.gz", + "checksum": "1e2b8f1bd4f3bace43b666959a70ef033f79db71e31b297fdf7f74bf698955cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jre-11-ea.26_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11-ea.26_windows-x64_bin.zip", + "checksum": "f1329333fc1ca2ba006075a143844ba6760a74c862904902eca4b73ea9d816f4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B26-0/sapmachine-jre-11-ea.26_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11+25-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B25-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "5f15adb2807c0ebd0ca47f376b14cd47798abf9487cbbdce17ff16f462c6adbe", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jdk-11-ea.25_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "5eb877c693cef8b707669ddb363ac9b1ecafb234a91c235267d5e00ecbfe5302", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jdk-11-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.25_linux-x64_bin.tar.gz", + "checksum": "1b0229fcd4d9a9db313268fc592ebc74d7449dfa09f0a47e282888cc5b3bf272", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jdk-11-ea.25_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11-ea.25_windows-x64_bin.zip", + "checksum": "1aeec7982ccbad9dcffc22d055214c09f2ffc357ad67454c19cced6ac4e0b9c1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jdk-11-ea.25_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.25_linux-ppc64_bin.tar.gz", + "checksum": "ce68c8b868f86e8240f049d200e8fd09bbcd6bbdd07e49be6e61a798e34fc98b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jre-11-ea.25_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.25_linux-ppc64le_bin.tar.gz", + "checksum": "a5f639c15fcb9e544ea55c9e9a5f72421b3089a4a77633700ef4d67125e0f384", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jre-11-ea.25_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.25_linux-x64_bin.tar.gz", + "checksum": "73c574a35fd1dd2850232e62d5152037cd48c0afa7fcd61a866f1042fdd5c9cd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jre-11-ea.25_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11-ea.25_windows-x64_bin.zip", + "checksum": "9238a17487a8aaab5663feab2131aa23c8dd1400a211352844a2318e85c0d63f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B25-0/sapmachine-jre-11-ea.25_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11+24-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B24-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "d6272a953c6a52c5ffe6a092017d4029f19f2f3424b8e1a03d111c1305703a3e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B24-0/sapmachine-jdk-11-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.24_linux-x64_bin.tar.gz", + "checksum": "aaa29704b7cf813759d69e7ba5df541edda2ee13d560806b9543aeddf85b2a08", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B24-0/sapmachine-jdk-11-ea.24_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11-ea.24_windows-x64_bin.zip", + "checksum": "53cdd38e3649427df2fc245348713abb3a07301090d272bda68bdca07a53e8b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B24-0/sapmachine-jdk-11-ea.24_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.24_linux-ppc64le_bin.tar.gz", + "checksum": "5d99723a5a83702c4136e7a123ac1a719e0fac850cee4cf3cf3e36dfc526efdc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B24-0/sapmachine-jre-11-ea.24_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.24_linux-x64_bin.tar.gz", + "checksum": "a2206cba3dc2667c295abca7f6e10bbd8bc2689baf8c687bcfcee8223130da57", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B24-0/sapmachine-jre-11-ea.24_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11-ea.24_windows-x64_bin.zip", + "checksum": "c961cc96115299e201d52f6fa8138fb2b4d84aa9a378e651c8651d6540ecc082", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B24-0/sapmachine-jre-11-ea.24_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11+23-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B23-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "f62c207cea4560efb6f50ccacc5bffe8da13ced6d482ac72961e69265d5a4f09", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B23-0/sapmachine-jdk-11-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.23_linux-x64_bin.tar.gz", + "checksum": "76828302806fde0bbdc24a7b39d5edc04f259dc8eedb4c11595c607ead3b0870", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B23-0/sapmachine-jdk-11-ea.23_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jdk-11-ea.23_windows-x64_bin.zip", + "checksum": "3f2ac1288cd8cfdae003514d40c856b6f11acbdf9851395872165e9a89309945", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B23-0/sapmachine-jdk-11-ea.23_windows-x64_bin.zip" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.23_linux-ppc64le_bin.tar.gz", + "checksum": "ed0e4b549433fbe8b5cde5883b539dccac1c681c9d25458ebd6ab7c0f520a162", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B23-0/sapmachine-jre-11-ea.23_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.23_linux-x64_bin.tar.gz", + "checksum": "55162837979a20bcc250fab99083af511ce63a87e5efd489cc31650d52e71f6d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B23-0/sapmachine-jre-11-ea.23_linux-x64_bin.tar.gz" + } + }, + "windows-x64": { + "zip": { + "name": "sapmachine-jre-11-ea.23_windows-x64_bin.zip", + "checksum": "9bf3fddddc64e646d25306d65a4fd583bd0a1316fbbe8802e69dd8bbac13400d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B23-0/sapmachine-jre-11-ea.23_windows-x64_bin.zip" + } + } + } + } + }, + "sapmachine-11+21-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B21-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.21_linux-x64_bin.tar.gz", + "checksum": "afd331f030fe92d28b58ca3c55522f71c4dfe64c425d7428a356b88c2c4ffede", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B21-0/sapmachine-jdk-11-ea.21_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.21_linux-x64_bin.tar.gz", + "checksum": "6e5040ab6edef9005939ebc60efe443545dfac57052196934e0fae0ee716ea71", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B21-0/sapmachine-jre-11-ea.21_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+19-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B19-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.19_linux-x64_bin.tar.gz", + "checksum": "0a64737df28c2582158119289307504b7751648cb924d26d2cf7ebf986e554b4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B19-0/sapmachine-jdk-11-ea.19_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.19_linux-x64_bin.tar.gz", + "checksum": "fc72cca5c1cbef7fecfbd139fdb4b7c913006757ee921ec8d9f37d83472745f3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B19-0/sapmachine-jre-11-ea.19_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+18-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B18-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.18_linux-x64_bin.tar.gz", + "checksum": "49c1730615d3039fdf9b61790f844f15a072153a98aa325a163bcab7591461cb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B18-0/sapmachine-jdk-11-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.18_linux-x64-musl_bin.tar.gz", + "checksum": "75046aeae2c9f83cb576d5f5ee07c97f1e56ea0b2561c0712ef3c5710709d3a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B18-0/sapmachine-jdk-11-ea.18_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.18_linux-x64_bin.tar.gz", + "checksum": "73b8a59d0f95c73832ed735e07e101610deefeb2684d51a4d588a48f9139feb7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B18-0/sapmachine-jre-11-ea.18_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.18_linux-x64-musl_bin.tar.gz", + "checksum": "d682fe3bba08dfabcc9121423ee9a941b7cd61a3bda335db449b18686e53b9aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B18-0/sapmachine-jre-11-ea.18_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+16-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B16-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.16_linux-x64_bin.tar.gz", + "checksum": "9cf274f27624c6d8101b3978c45d4da734adee59f22b051d35a2d91022135622", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B16-0/sapmachine-jdk-11-ea.16_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.16_linux-x64_bin.tar.gz", + "checksum": "1d225280bafc87f6a8e25b1779e707ede36c4550759dd84367f78bdbfc1b2801", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B16-0/sapmachine-jre-11-ea.16_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+15-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B15-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.15_linux-x64_bin.tar.gz", + "checksum": "a1e44a0dc0a68cd9eff28aaad839becdc10018ed801dffe55533316b01a0259b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B15-0/sapmachine-jdk-11-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "663d4ad900dc7574ed8efdf0176e6bb3738c51ea8b4fa5bfd9d5fea6cf51aa5d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B15-0/sapmachine-jdk-11-ea.15_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.15_linux-x64_bin.tar.gz", + "checksum": "97691bfee52d50cf76a8b9365a48d834461578119c764a5e39bebd789591087e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B15-0/sapmachine-jre-11-ea.15_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.15_linux-x64-musl_bin.tar.gz", + "checksum": "19878c58815a2dc7b12a9d48c522a4581c40729793c77a1606fffb2d61d08cd9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B15-0/sapmachine-jre-11-ea.15_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+14-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B14-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.14_linux-x64_bin.tar.gz", + "checksum": "7930b19cf96721f9290deec818fd22b7b3b817067688e176246446cf426fd7e4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B14-0/sapmachine-jdk-11-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "f75fcf2c02976bd3c4d47839220e87244bb50e2c4469a5b17d3f2cda8b4f8991", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B14-0/sapmachine-jdk-11-ea.14_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.14_linux-x64_bin.tar.gz", + "checksum": "532dfbf0c0baf37f728229b9dc1fb80164c213521abe7006bd023cd4c83397aa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B14-0/sapmachine-jre-11-ea.14_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.14_linux-x64-musl_bin.tar.gz", + "checksum": "ac6a7b9624b7657b5fb4b19569cd3dc7e941662e3b2e65d3dd5ed1147f5a4442", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B14-0/sapmachine-jre-11-ea.14_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+13-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B13-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.13_linux-x64_bin.tar.gz", + "checksum": "db0b73efc63688257c97115fe70dcca5e0033c88c3d1613933d4606fd0badf41", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B13-0/sapmachine-jdk-11-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "5764b8f5b87779dfbb6640bdbd765712987dca2e259045bb282b8fe1b25aca11", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B13-0/sapmachine-jdk-11-ea.13_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.13_linux-x64_bin.tar.gz", + "checksum": "b4ee8ade6d6f7b3ace7ae4b7a573feb263e4f7d139840f4f9cdf960ff189284a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B13-0/sapmachine-jre-11-ea.13_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.13_linux-x64-musl_bin.tar.gz", + "checksum": "59f1fd899a9b488a3f47a2c7289f7fccd2dbeb85725a361327c8abd5d6c067ae", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B13-0/sapmachine-jre-11-ea.13_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+12-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B12-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.12_linux-x64_bin.tar.gz", + "checksum": "829ce933bb889fb63b3516d87e2f684d409e4e41e541838d77e937a5041f9099", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B12-0/sapmachine-jdk-11-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "56c823c242cb0142cd03f4a80cdf73b0c3124ead6d9ceabf2f280e501710eebb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B12-0/sapmachine-jdk-11-ea.12_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.12_linux-x64_bin.tar.gz", + "checksum": "b31c8cf6ac340850dc943fe27ed40956d01ab986f6582734fcbb16624f0878ee", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B12-0/sapmachine-jre-11-ea.12_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.12_linux-x64-musl_bin.tar.gz", + "checksum": "4319a0c62a794f87506b2cf5eae0570fc4d1de0950da25ccac2d211a2e7e8707", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B12-0/sapmachine-jre-11-ea.12_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+11-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B11-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.11_linux-x64_bin.tar.gz", + "checksum": "65947a274d64fcf937dc0fbcf889ca7e3b9e13a8547639acd3a2d52384c21a19", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B11-0/sapmachine-jdk-11-ea.11_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.11_linux-x64_bin.tar.gz", + "checksum": "e185c8944164a2b3d18c970146f9f11b3172c2886a8fe10f64d7ad38f3316319", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B11-0/sapmachine-jre-11-ea.11_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+10-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B10-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.10_linux-x64_bin.tar.gz", + "checksum": "ef9efbe7bc42f4e50432b71531d0e5613819a4d440ef1004aaf4efcb891f4967", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B10-0/sapmachine-jdk-11-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "8eab58e69a490c3ecadf5b91ad06f28497f6084a65a08af269df1b423bfd16fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B10-0/sapmachine-jdk-11-ea.10_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.10_linux-x64_bin.tar.gz", + "checksum": "b12c7938ea33de21cffc036cfc20df18bc718b97db763d3464589de7f749b26e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B10-0/sapmachine-jre-11-ea.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.10_linux-x64-musl_bin.tar.gz", + "checksum": "af485f7081bb6452125b31d167363f931a1d1cd8e4b4901a346b74c6ef11ae4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B10-0/sapmachine-jre-11-ea.10_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+9-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B9-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.9_linux-x64_bin.tar.gz", + "checksum": "895187672171bce6815587f13ff5c7f383de393bb92f178a4f477fa908d55d4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B9-0/sapmachine-jdk-11-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "6538b98ef068a41f258308ac04a46d073a99ef3e84cf6ff9cfcdf3c4f95d11d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B9-0/sapmachine-jdk-11-ea.9_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.9_linux-x64_bin.tar.gz", + "checksum": "3cf5c6c2749988341efb44b21ca5115036bf096000e0667424a0200ffd5f7b9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B9-0/sapmachine-jre-11-ea.9_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.9_linux-x64-musl_bin.tar.gz", + "checksum": "2f56b2b2e6ce3d428c9b2a715ac482891686c42f17f1f9eb21fb371c7ed92152", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B9-0/sapmachine-jre-11-ea.9_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+8-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B8-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.8_linux-x64_bin.tar.gz", + "checksum": "6c785c86ad6975ad1115ecee725e99515d8ae60bea73deb8f3e1ed62486bafac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B8-0/sapmachine-jdk-11-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.8_linux-x64-musl_bin.tar.gz", + "checksum": "1fbf8b196b5aab051b3f7683a02e67b02514384ba4334566d5963cc02f62d1e5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B8-0/sapmachine-jdk-11-ea.8_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.8_linux-x64_bin.tar.gz", + "checksum": "769e6c05670b53ca4c9c3c2cb4102de4b3ab3624f8eda64edf625cd52e814ae7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B8-0/sapmachine-jre-11-ea.8_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.8_linux-x64-musl_bin.tar.gz", + "checksum": "090d8d29a2e554ed7e19f20b50e612fbcd10e3bff142865d54b912e4a4e6a097", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B8-0/sapmachine-jre-11-ea.8_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+7-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B7-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.7_linux-x64_bin.tar.gz", + "checksum": "50736a7fdd972c54962ea35e0cc0d7c38061e02e188adaa89faf8ba98d9a7104", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B7-0/sapmachine-jdk-11-ea.7_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.7_linux-x64_bin.tar.gz", + "checksum": "11cd738eb89cb416bc161fb631a25b638fae824d7f3ab199a283535615d2d9e2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B7-0/sapmachine-jre-11-ea.7_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+6-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B6-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.6_linux-x64_bin.tar.gz", + "checksum": "7d07a6964a2905f8f30a0d3da3f592106252e3a20f621d48ac800f86fe49b676", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B6-0/sapmachine-jdk-11-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "60282fa7c3f34bd6347d0944224e3fcde79d9a38aa0401ddbb5eb63e78a37f28", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B6-0/sapmachine-jdk-11-ea.6_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.6_linux-x64_bin.tar.gz", + "checksum": "dc56e83b24504254e3a1b660329235cd30ee0fbce1affb7ec3e5659768681610", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B6-0/sapmachine-jre-11-ea.6_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.6_linux-x64-musl_bin.tar.gz", + "checksum": "0db003181db0b412e60a1bad719afcb015986bb1ab393fa51aab236246985d9a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B6-0/sapmachine-jre-11-ea.6_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+5-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B5-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.5_linux-x64_bin.tar.gz", + "checksum": "5c09a24891e773110d4e1672545f2289cc61d169f9dda928a89fadd60ed1ba9e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B5-0/sapmachine-jdk-11-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "8204e232b7108ebf0f339da0b9acf0636e9f66b866f9f1dd2ee9f134c5ce1eaa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B5-0/sapmachine-jdk-11-ea.5_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.5_linux-x64_bin.tar.gz", + "checksum": "dc541e1d6465a1d93a3ccf68ff96a0d1efb4cfb056990f24258e93aae27695b2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B5-0/sapmachine-jre-11-ea.5_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.5_linux-x64-musl_bin.tar.gz", + "checksum": "0082169d92afdcfb39ea847548de323ea959648c874c7ca820e2d53e1f218145", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B5-0/sapmachine-jre-11-ea.5_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+3-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B3-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.3_linux-x64_bin.tar.gz", + "checksum": "ce17ce42f71498077b77361a03911d8433431dc0fa7093556da55d0ecfa6258b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B3-0/sapmachine-jdk-11-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "1dcc5458ca700f43afcb4a91807e7524f777003a89f419026a2024bf25fbed4b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B3-0/sapmachine-jdk-11-ea.3_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.3_linux-x64_bin.tar.gz", + "checksum": "e2a8531ca12e6e4a66f7af3bf286e33273e52ecda1946d142abfea3f184c82ce", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B3-0/sapmachine-jre-11-ea.3_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.3_linux-x64-musl_bin.tar.gz", + "checksum": "3b8ee3b99d4eb43d1016231de58c95bf5af46978a4ffb7b8857e3b6409e6f840", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B3-0/sapmachine-jre-11-ea.3_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+2-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B2-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.2_linux-x64_bin.tar.gz", + "checksum": "8f312ad22ad0ba7dc73c950e8cbeb476365b59e8639ed865cc133e8f6dff3d62", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B2-0/sapmachine-jdk-11-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "8ac87298c02fa5266c0852c3737831d823630082be8fa92c5e615aa209c23612", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B2-0/sapmachine-jdk-11-ea.2_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.2_linux-x64_bin.tar.gz", + "checksum": "b4b87361777555ee962944212c9910071972b82396d22f0094ec558b1456ec92", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B2-0/sapmachine-jre-11-ea.2_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.2_linux-x64-musl_bin.tar.gz", + "checksum": "5478921e1539f4b19673c2afa6ecbecec8f5132caa44d69e43bced277e46f86f", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B2-0/sapmachine-jre-11-ea.2_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-11+1-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-11%2B1-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.1_linux-x64_bin.tar.gz", + "checksum": "5f6cae1b812f1154d4bd2e4b5386d75a410ba1bb1fd96124dc423c850991f688", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B1-0/sapmachine-jdk-11-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-11-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "4bf0df632cca7d22a6f5f6a794f84e1e44bb38eb068876e4c47eb0af5c4aa252", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B1-0/sapmachine-jdk-11-ea.1_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.1_linux-x64_bin.tar.gz", + "checksum": "5bc685f10401575c075ce45178235ee87ee93552596536b6a14441538ceacd82", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B1-0/sapmachine-jre-11-ea.1_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-11-ea.1_linux-x64-musl_bin.tar.gz", + "checksum": "8ec8bbb0cd0e0a68f308e9663fcf36132ab7774797c7e76d5dc78a73ae6c0df1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-11%2B1-0/sapmachine-jre-11-ea.1_linux-x64-musl_bin.tar.gz" + } + } + } + } + } + } + }, + "lts": "true" + }, + "10": { + "updates": { + "10.0.2": { + "sapmachine-10.0.2+13-1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10.0.2%2B13-1", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jdk-10.0.2.13_linux-ppc64_bin.tar.gz", + "checksum": "9d2f3017fa6028354542581e29d43259174c3d963d9ba39e85b6dc1956690245", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-1/sapmachine-jdk-10.0.2.13_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-10.0.2.13_linux-ppc64le_bin.tar.gz", + "checksum": "6d3c8effd4814a642d52234dad109d3064aa002655ee49539bea51bfefa613d7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-1/sapmachine-jdk-10.0.2.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10.0.2.13_linux-x64_bin.tar.gz", + "checksum": "26117204d872fec0af05a5c0689e6d548366372a191a22730b43f7a01bcff718", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-1/sapmachine-jdk-10.0.2.13_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-ppc64": { + "tar.gz": { + "name": "sapmachine-jre-10.0.2.13_linux-ppc64_bin.tar.gz", + "checksum": "3f88fe465cf0a21857d460b2f7dc2bb09c3daa5e3cb175031f90ddda27d9a5ea", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-1/sapmachine-jre-10.0.2.13_linux-ppc64_bin.tar.gz" + } + }, + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-10.0.2.13_linux-ppc64le_bin.tar.gz", + "checksum": "a97a828bb7109f3509f1c0b7624eae5759317df21080d53300210c94a5e78efa", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-1/sapmachine-jre-10.0.2.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10.0.2.13_linux-x64_bin.tar.gz", + "checksum": "8d4a207454c7dbd3ca2be00286cffedbf68717012af70d03c84ade7033585b21", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-1/sapmachine-jre-10.0.2.13_linux-x64_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10.0.2+13-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10.0.2%2B13-0", + "ea": "true", + "assets": { + "jdk": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jdk-10.0.2.13_linux-ppc64le_bin.tar.gz", + "checksum": "a055211181c77f466edd22be20e0d419aee91e51542488fdce33e91d33a42ff3", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-0/sapmachine-jdk-10.0.2.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10.0.2.13_linux-x64_bin.tar.gz", + "checksum": "7cbba13effe3d6ea0fb91d94644ef267d3e0183569a49a9899d0a181b8a194fb", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-0/sapmachine-jdk-10.0.2.13_linux-x64_bin.tar.gz" + } + } + }, + "jre": { + "linux-ppc64le": { + "tar.gz": { + "name": "sapmachine-jre-10.0.2.13_linux-ppc64le_bin.tar.gz", + "checksum": "9d39167b4dfefc931550ee080d4b8c792d6fb22c63c419f62f94c5f31c6e9b2c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-0/sapmachine-jre-10.0.2.13_linux-ppc64le_bin.tar.gz" + } + }, + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10.0.2.13_linux-x64_bin.tar.gz", + "checksum": "55a7dc05489d710571f2a1161a2d0c102515f4eafbe0d6c873b4a7f437ef7c0b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.2%2B13-0/sapmachine-jre-10.0.2.13_linux-x64_bin.tar.gz" + } + } + } + } + } + }, + "10.0.1": { + "sapmachine-10.0.1+10-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10.0.1%2B10-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10.0.1.10_linux-x64_bin.tar.gz", + "checksum": "8d367d49aef22cbc4be938905da93650193564c10881289dd372c076ee291519", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.1%2B10-0/sapmachine-jdk-10.0.1.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10.0.1.10_linux-x64-musl_bin.tar.gz", + "checksum": "4cd4840e74640b6cd4b01f190c629fb837e5848386b789d7eafef51c312a086d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.1%2B10-0/sapmachine-jdk-10.0.1.10_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10.0.1.10_linux-x64_bin.tar.gz", + "checksum": "fd1986fba3d9a6ecc32aeacf1132d832f4f6ac5f299377b21d07eb5c729729ed", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.1%2B10-0/sapmachine-jre-10.0.1.10_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10.0.1.10_linux-x64-musl_bin.tar.gz", + "checksum": "ed3bfc1f614203adcb29920bfb2034e84126ec58885910cae451d7911aebdc7a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10.0.1%2B10-0/sapmachine-jre-10.0.1.10_linux-x64-musl_bin.tar.gz" + } + } + } + } + } + }, + "10": { + "sapmachine-10+46-2": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B46-2", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10.46_linux-x64_bin.tar.gz", + "checksum": "f3f3e072a3f8887f0dea47ddeb724b9c063c02014c46896d341e9af108cca4d4", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-2/sapmachine-jdk-10.46_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.46_linux-x64-musl_bin.tar.gz", + "checksum": "a326d7db8e4a272b8f83addebb1e1cc5aa1d402234b69a5ab913a5610293e6ac", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-2/sapmachine-jdk-10-ea.46_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10.46_linux-x64_bin.tar.gz", + "checksum": "2af0c4e41ef93f78fde27df019c401d0b77de11eb630ab18cc47803dcf35ef64", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-2/sapmachine-jre-10.46_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.46_linux-x64-musl_bin.tar.gz", + "checksum": "9c0d648121ae653cdfcd8bacf12e5367e87c555e0b967e6d3e6cfba874284015", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-2/sapmachine-jre-10-ea.46_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+46-1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B46-1", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.46_linux-x64_bin.tar.gz", + "checksum": "fcbc57890f242362058a812fe0750ffc8bf515fbba3c707f6a3b829fe92bd23c", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-1/sapmachine-jdk-10-ea.46_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.46_linux-x64-musl_bin.tar.gz", + "checksum": "42d631b43aeba26b242731e20bebd1f37d78e8ca3142b6b64fa12342d06476b9", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-1/sapmachine-jdk-10-ea.46_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.46_linux-x64_bin.tar.gz", + "checksum": "e9ef10d3a9a5c629bb8878232b5f7a3bdfd85e564112252b6b08798612988fde", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-1/sapmachine-jre-10-ea.46_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.46_linux-x64-musl_bin.tar.gz", + "checksum": "dee0d65d834968783314a251d4e9a068747768ff2560303ded2db07d2f5bb262", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-1/sapmachine-jre-10-ea.46_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+39-1": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B39-1", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.39_linux-x64_bin.tar.gz", + "checksum": "063f3bd57d0cae6441b1f3fd0a1c0ff9812539461b1f8c60dd236edfd901b758", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B39-1/sapmachine-jdk-10-ea.39_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.39_linux-x64-musl_bin.tar.gz", + "checksum": "8a86b166292b55d5e39b666fba7e67b5f76f172b3ce8004c23f815109fd92d5a", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B39-1/sapmachine-jdk-10-ea.39_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.39_linux-x64_bin.tar.gz", + "checksum": "e4e1c9c5dd5ebb3242fee3532810f18f2ff36f4201d06c5bc2fce0be9611eb53", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B39-1/sapmachine-jre-10-ea.39_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.39_linux-x64-musl_bin.tar.gz", + "checksum": "0ad50d4b0db3f5bc88071bd29e4ad9133905882cacf8206c65ef8bf4aba56f76", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B39-1/sapmachine-jre-10-ea.39_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+46-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B46-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.46_linux-x64_bin.tar.gz", + "checksum": "abf028dfecb6c63f6fad59926385da105ee51955dc464444ac5e81b6b2529433", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-0/sapmachine-jdk-10-ea.46_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.46_linux-x64-musl_bin.tar.gz", + "checksum": "1eb5d26d1a25f079c1ba09c8662b384dadb7d4ecd2fecacfff0c9b957c8b5423", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-0/sapmachine-jdk-10-ea.46_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.46_linux-x64_bin.tar.gz", + "checksum": "c90a299deba0615fabaccf74492250aed94cc996a9775f1aadac2614fed3feef", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-0/sapmachine-jre-10-ea.46_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.46_linux-x64-musl_bin.tar.gz", + "checksum": "de0522621797054dcf66da762c010517d55646656dc182971f6276e7bac217dd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B46-0/sapmachine-jre-10-ea.46_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+45-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B45-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.45_linux-x64_bin.tar.gz", + "checksum": "c5566464b942668dfc4abfb881a69bf8257a7652fd089f1e7f5d59872482bd85", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B45-0/sapmachine-jdk-10-ea.45_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.45_linux-x64-musl_bin.tar.gz", + "checksum": "22e88e0ce06622649eb26342de5300434893a3d422bc6d636581e7a26053456e", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B45-0/sapmachine-jdk-10-ea.45_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.45_linux-x64_bin.tar.gz", + "checksum": "710c3f0f67cb2797271cda7019c3dec70da2fe336787fed94bbd369b2d42a5d0", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B45-0/sapmachine-jre-10-ea.45_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.45_linux-x64-musl_bin.tar.gz", + "checksum": "8955c6d32dc40b427503ba570c5120e5ca4d2728150ec9528c603188ec85f599", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B45-0/sapmachine-jre-10-ea.45_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+44-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B44-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.44_linux-x64_bin.tar.gz", + "checksum": "c35c729682b5a7e2cf8721081c224f6fd8ec2f9bec220bd6c405146375a362b5", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B44-0/sapmachine-jdk-10-ea.44_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.44_linux-x64-musl_bin.tar.gz", + "checksum": "0673352d49327229d777673d32306d82f26b867cc7de5fcefff6135e284850bc", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B44-0/sapmachine-jdk-10-ea.44_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.44_linux-x64_bin.tar.gz", + "checksum": "aaecd34ef75e9523721c4adde18f75f789a35e1701199b68232828b806456876", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B44-0/sapmachine-jre-10-ea.44_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.44_linux-x64-musl_bin.tar.gz", + "checksum": "3cd912683193a6057c96b6c0459e8a864e498895e8f2464c582b20d8254f12d1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B44-0/sapmachine-jre-10-ea.44_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+43-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B43-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.43_linux-x64_bin.tar.gz", + "checksum": "9eccdfaea7a6299dc8126cc127342edf731c1635485046d483613c052f238667", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B43-0/sapmachine-jdk-10-ea.43_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.43_linux-x64-musl_bin.tar.gz", + "checksum": "4fe12c79f4388ede630cb4e9b9670ed1cc56415972ba3b3038111f3d558a1855", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B43-0/sapmachine-jdk-10-ea.43_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.43_linux-x64_bin.tar.gz", + "checksum": "a82566a00d5b7c1d2868a329811869c15c8f2fc6c712d9bd4ba6dabe2f1875c2", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B43-0/sapmachine-jre-10-ea.43_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.43_linux-x64-musl_bin.tar.gz", + "checksum": "7d5356176cbb7bb04622f716330e6afa5f721e9a048baeb730f56a547c4a3b45", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B43-0/sapmachine-jre-10-ea.43_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+42-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B42-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.42_linux-x64_bin.tar.gz", + "checksum": "cbba0342a5023b1e8e4e655d70b3b768523c37364234939025cf61b4fa2aab4d", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B42-0/sapmachine-jdk-10-ea.42_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.42_linux-x64-musl_bin.tar.gz", + "checksum": "01e91419fcb6cd9fe9539ecb4fc7f8f31f39da7b8edc3ef1c883ae7a89e8ddf6", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B42-0/sapmachine-jdk-10-ea.42_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.42_linux-x64_bin.tar.gz", + "checksum": "c99b9abbac13035041279e7e6d3a945d8293483ee5208d74cbbd1d36d1624212", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B42-0/sapmachine-jre-10-ea.42_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.42_linux-x64-musl_bin.tar.gz", + "checksum": "1778ded6e9b858661ed3f604775e60598ac655a233cba1099bc8490da579e675", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B42-0/sapmachine-jre-10-ea.42_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+41-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B41-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.41_linux-x64_bin.tar.gz", + "checksum": "b6bdf8a79bc2f5268cb1e2e30ad05f829d2cdbf9caa4c88f52fcc764df1b4920", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B41-0/sapmachine-jdk-10-ea.41_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.41_linux-x64-musl_bin.tar.gz", + "checksum": "5f6be92df55fbb527212bfa30bc934bbd5910c554d66dc415cf6524f54248e02", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B41-0/sapmachine-jdk-10-ea.41_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.41_linux-x64_bin.tar.gz", + "checksum": "d0f5e98ee9fa098c17023493d86300af28045ef2c9d2b7e8d7f658cdef17be14", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B41-0/sapmachine-jre-10-ea.41_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.41_linux-x64-musl_bin.tar.gz", + "checksum": "ffd06c4763ede272ae9233452cbb76d64593f7951ade9fee8336e6e4f2fe7677", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B41-0/sapmachine-jre-10-ea.41_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+40-0": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B40-0", + "ea": "true", + "assets": { + "jdk": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.40_linux-x64_bin.tar.gz", + "checksum": "4d600263b5c1dbdd7d48d4bae1b022d83eb401a5a37b89647820bc81f85ba1bd", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B40-0/sapmachine-jdk-10-ea.40_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.40_linux-x64-musl_bin.tar.gz", + "checksum": "1249a3990bd90da4365c68fedea37a810a410142949e425431702b76cd19331b", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B40-0/sapmachine-jdk-10-ea.40_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.40_linux-x64_bin.tar.gz", + "checksum": "9b90f8886e8eb8490734e75e94bfd2855e1e723aee1e6bfb045ebe1b1329c5a1", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B40-0/sapmachine-jre-10-ea.40_linux-x64_bin.tar.gz" + } + }, + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.40_linux-x64-musl_bin.tar.gz", + "checksum": "6a13eb7212736418cce1b04cbe86205a4df95ba78e7fab6eae27bf538df57ce7", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B40-0/sapmachine-jre-10-ea.40_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+39": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B39", + "ea": "true", + "assets": { + "jdk": { + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jdk-10-ea.39_linux-x64-musl_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B39/sapmachine-jdk-10-ea.39_linux-x64-musl_bin.tar.gz" + } + } + }, + "jre": { + "linux-x64-musl": { + "tar.gz": { + "name": "sapmachine-jre-10-ea.39_linux-x64-musl_bin.tar.gz", + "url": "https://github.com/SAP/SapMachine/releases/download/sapmachine-10%2B39/sapmachine-jre-10-ea.39_linux-x64-musl_bin.tar.gz" + } + } + } + } + }, + "sapmachine-10+37": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B37", + "ea": "true", + "assets": {} + }, + "sapmachine-10+36": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B36", + "ea": "true", + "assets": {} + }, + "sapmachine-10+35": { + "url": "https://github.com/SAP/SapMachine/releases/tag/sapmachine-10%2B35", + "ea": "true", + "assets": {} + } + } + }, + "lts": "false" + } +} \ No newline at end of file diff --git a/__tests__/data/sdkman-java-versions.csv b/__tests__/data/sdkman-java-versions.csv new file mode 100644 index 000000000..5c75a44c9 --- /dev/null +++ b/__tests__/data/sdkman-java-versions.csv @@ -0,0 +1,135 @@ +6.0.119-zulu, 6.0.119 +7.0.352-zulu, 7.0.352 +8.0.282-trava, 8.0.282 +8.0.432-albba, 8.0.432 +8.0.432-amzn, 8.0.432 +8.0.432-kona, 8.0.432 +8.0.432-librca, 8.0.432 +8.0.432-sem, 8.0.432 +8.0.432-tem, 8.0.432 +8.0.432-zulu, 8.0.432 +8.0.432.fx-librca, 8.0.432 +8.0.432.fx-zulu, 8.0.432 +8.0.442-amzn, 8.0.442 +8.0.442-librca, 8.0.442 +8.0.442-tem, 8.0.442 +8.0.442-zulu, 8.0.442 +8.0.442.fx-librca, 8.0.442 +8.0.442.fx-zulu, 8.0.442 +11.0.14.1-jbr, 11.0.14 +11.0.15-trava, 11.0.15 +11.0.25-albba, 11.0.25 +11.0.25-amzn, 11.0.25 +11.0.25-kona, 11.0.25 +11.0.25-librca, 11.0.25 +11.0.25-ms, 11.0.25 +11.0.25-sapmchn, 11.0.25 +11.0.25-sem, 11.0.25 +11.0.25-tem, 11.0.25 +11.0.25-zulu, 11.0.25 +11.0.25.fx-librca, 11.0.25 +11.0.25.fx-zulu, 11.0.25 +11.0.26-amzn, 11.0.26 +11.0.26-librca, 11.0.26 +11.0.26-ms, 11.0.26 +11.0.26-sapmchn, 11.0.26 +11.0.26-zulu, 11.0.26 +11.0.26.fx-librca, 11.0.26 +11.0.26.fx-zulu, 11.0.26 +17.0.12-graal, 17.0.12 +17.0.12-jbr, 17.0.12 +17.0.12-oracle, 17.0.12 +17.0.13-albba, 17.0.13 +17.0.13-amzn, 17.0.13 +17.0.13-kona, 17.0.13 +17.0.13-librca, 17.0.13 +17.0.13-ms, 17.0.13 +17.0.13-sapmchn, 17.0.13 +17.0.13-sem, 17.0.13 +17.0.13-tem, 17.0.13 +17.0.13-zulu, 17.0.13 +17.0.13.crac-librca, 17.0.13 +17.0.13.crac-zulu, 17.0.13 +17.0.13.fx-librca, 17.0.13 +17.0.13.fx-zulu, 17.0.13 +17.0.14-amzn, 17.0.14 +17.0.14-librca, 17.0.14 +17.0.14-ms, 17.0.14 +17.0.14-sapmchn, 17.0.14 +17.0.14-zulu, 17.0.14 +17.0.14.fx-librca, 17.0.14 +17.0.14.fx-zulu, 17.0.14 +17.0.9-graalce, 17.0.9 +21.0.2-graalce, 21.0.2 +21.0.2-open, 21.0.2 +21.0.5-amzn, 21.0.5 +21.0.5-graal, 21.0.5 +21.0.5-jbr, 21.0.5 +21.0.5-kona, 21.0.5 +21.0.5-librca, 21.0.5 +21.0.5-ms, 21.0.5 +21.0.5-oracle, 21.0.5 +21.0.5-sapmchn, 21.0.5 +21.0.5-sem, 21.0.5 +21.0.5-tem, 21.0.5 +21.0.5-zulu, 21.0.5 +21.0.5.crac-librca, 21.0.5 +21.0.5.crac-zulu, 21.0.5 +21.0.5.fx-librca, 21.0.5 +21.0.5.fx-zulu, 21.0.5 +21.0.6-amzn, 21.0.6 +21.0.6-graal, 21.0.6 +21.0.6-librca, 21.0.6 +21.0.6-ms, 21.0.6 +21.0.6-oracle, 21.0.6 +21.0.6-sapmchn, 21.0.6 +21.0.6-tem, 21.0.6 +21.0.6-zulu, 21.0.6 +21.0.6.fx-librca, 21.0.6 +21.0.6.fx-zulu, 21.0.6 +22.0.2-oracle, 22.0.2 +22.1.0.1.r11-gln, 22.1.0 +22.1.0.1.r17-gln, 22.1.0 +22.3.5.r11-nik, 22.3.5 +22.3.5.r17-mandrel, 22.3.5 +22.3.5.r17-nik, 22.3.5 +23-open, 23 +23.0.1-amzn, 23.0.1 +23.0.1-graal, 23.0.1 +23.0.1-graalce, 23.0.1 +23.0.1-librca, 23.0.1 +23.0.1-open, 23.0.1 +23.0.1-oracle, 23.0.1 +23.0.1-sapmchn, 23.0.1 +23.0.1-tem, 23.0.1 +23.0.1-zulu, 23.0.1 +23.0.1.crac-zulu, 23.0.1 +23.0.1.fx-librca, 23.0.1 +23.0.1.fx-zulu, 23.0.1 +23.0.2-amzn, 23.0.2 +23.0.2-graal, 23.0.2 +23.0.2-graalce, 23.0.2 +23.0.2-librca, 23.0.2 +23.0.2-oracle, 23.0.2 +23.0.2-sapmchn, 23.0.2 +23.0.2-tem, 23.0.2 +23.0.2-zulu, 23.0.2 +23.0.2.fx-librca, 23.0.2 +23.0.2.fx-zulu, 23.0.2 +23.0.6.fx-nik, 23.0.6 +23.0.6.r17-mandrel, 23.0.6 +23.0.6.r17-nik, 23.0.6 +23.1.5.fx-nik, 23.1.5 +23.1.5.r21-mandrel, 23.1.5 +23.1.5.r21-nik, 23.1.5 +24.0.2.r22-mandrel, 24.0.2 +24.ea.27-graal, 24.0.0 +24.ea.28-graal, 24.0.0 +24.ea.31-open, 24.0.0 +24.ea.32-open, 24.0.0 +24.1.1.r23-mandrel, 24.1.1 +24.1.1.r23-nik, 24.1.1 +25.ea.4-graal, 25.0.0 +25.ea.5-graal, 25.0.0 +25.ea.5-open, 25.0.0 +25.ea.6-open, 25.0.0 \ No newline at end of file diff --git a/__tests__/distributors/adopt-installer.test.ts b/__tests__/distributors/adopt-installer.test.ts index 8a112243f..0b35c3d3e 100644 --- a/__tests__/distributors/adopt-installer.test.ts +++ b/__tests__/distributors/adopt-installer.test.ts @@ -191,7 +191,9 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: string) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); const installerOptions: JavaInstallerOptions = { version: '17', diff --git a/__tests__/distributors/base-installer.test.ts b/__tests__/distributors/base-installer.test.ts index b2c610260..08a95828c 100644 --- a/__tests__/distributors/base-installer.test.ts +++ b/__tests__/distributors/base-installer.test.ts @@ -287,7 +287,7 @@ describe('setupJava', () => { spyCoreSetOutput = jest.spyOn(core, 'setOutput'); spyCoreSetOutput.mockImplementation(() => undefined); - jest.spyOn(os, 'arch').mockReturnValue('x86'); + jest.spyOn(os, 'arch').mockReturnValue('x86' as ReturnType); }); afterEach(() => { diff --git a/__tests__/distributors/corretto-installer.test.ts b/__tests__/distributors/corretto-installer.test.ts index a8ffef229..1da5e393e 100644 --- a/__tests__/distributors/corretto-installer.test.ts +++ b/__tests__/distributors/corretto-installer.test.ts @@ -150,9 +150,8 @@ describe('getAvailableVersions', () => { }); mockPlatform(distribution, platform); - const availableVersion = await distribution['findPackageForDownload']( - version - ); + const availableVersion = + await distribution['findPackageForDownload'](version); expect(availableVersion).not.toBeNull(); expect(availableVersion.url).toBe(expectedLink); }); @@ -203,29 +202,27 @@ describe('getAvailableVersions', () => { }); it.each([ - ['arm64', 'aarch64'], - ['amd64', 'x64'] + ['amd64', 'x64'], + ['arm64', 'aarch64'] ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: string) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); - const version = '17'; - const installerOptions: JavaInstallerOptions = { - version, + const distribution = new CorrettoDistribution({ + version: '17', architecture: '', // to get default value packageType: 'jdk', checkLatest: false - }; - - const distribution = new CorrettoDistribution(installerOptions); + }); mockPlatform(distribution, 'macos'); const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`; - const availableVersion = await distribution['findPackageForDownload']( - version - ); + const availableVersion = + await distribution['findPackageForDownload']('17'); expect(availableVersion).not.toBeNull(); expect(availableVersion.url).toBe(expectedLink); } diff --git a/__tests__/distributors/dragonwell-installer.test.ts b/__tests__/distributors/dragonwell-installer.test.ts index 44cc39640..627a96ab3 100644 --- a/__tests__/distributors/dragonwell-installer.test.ts +++ b/__tests__/distributors/dragonwell-installer.test.ts @@ -41,15 +41,16 @@ describe('getAvailableVersions', () => { describe('getAvailableVersions', () => { it.each([ ['8', 'x86', 'linux', 0], - ['8', 'aarch64', 'linux', 24], - ['8.6.6', 'x64', 'linux', 27], + ['8', 'aarch64', 'linux', 28], + ['8.6.6', 'x64', 'linux', 31], ['8', 'x86', 'anolis', 0], ['8', 'x86', 'windows', 0], ['8', 'x86', 'mac', 0], - ['11', 'x64', 'linux', 27], - ['11', 'aarch64', 'linux', 24], - ['17', 'riscv', 'linux', 0], - ['16.0.1', 'x64', 'linux', 27] + ['11', 'x64', 'linux', 31], + ['11', 'aarch64', 'linux', 28], + ['17', 'riscv', 'linux', 3], + ['16.0.1', 'x64', 'linux', 31], + ['21', 'x64', 'linux', 31] ])( 'should get right number of available versions from JSON', async ( @@ -103,25 +104,31 @@ describe('getAvailableVersions', () => { '11', 'linux', 'x64', - 'https://github.com/alibaba/dragonwell11/releases/download/dragonwell-extended-11.0.17.13_jdk-11.0.17-ga/Alibaba_Dragonwell_Extended_11.0.17.13.8_x64_linux.tar.gz' + 'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux.tar.gz' ], [ '11', 'linux', 'aarch64', - 'https://github.com/alibaba/dragonwell11/releases/download/dragonwell-extended-11.0.17.13_jdk-11.0.17-ga/Alibaba_Dragonwell_Extended_11.0.17.13.8_aarch64_linux.tar.gz' + 'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_aarch64_linux.tar.gz' + ], + [ + '11', + 'linux', + 'riscv', + 'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_riscv64_linux.tar.gz' ], [ '11', 'windows', 'x64', - 'https://github.com/alibaba/dragonwell11/releases/download/dragonwell-extended-11.0.17.13_jdk-11.0.17-ga/Alibaba_Dragonwell_Extended_11.0.17.13.8_x64_windows.zip' + 'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_windows.zip' ], [ '11', 'alpine-linux', 'x64', - 'https://github.com/alibaba/dragonwell11/releases/download/dragonwell-extended-11.0.17.13_jdk-11.0.17-ga/Alibaba_Dragonwell_Extended_11.0.17.13.8_x64_alpine-linux.tar.gz' + 'https://github.com/dragonwell-project/dragonwell11/releases/download/dragonwell-extended-11.0.23.20_jdk-11.0.23-ga/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_alpine-linux.tar.gz' ], [ '11.0.17', @@ -158,6 +165,30 @@ describe('getAvailableVersions', () => { 'linux', 'x64', 'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.4.0.4%2B8_jdk-17.0.4-ga/Alibaba_Dragonwell_Standard_17.0.4.0.4%2B8_x64_linux.tar.gz' + ], + [ + '17.0.4+8', + 'linux', + 'x64', + 'https://github.com/alibaba/dragonwell17/releases/download/dragonwell-standard-17.0.4.0.4%2B8_jdk-17.0.4-ga/Alibaba_Dragonwell_Standard_17.0.4.0.4%2B8_x64_linux.tar.gz' + ], + [ + '21', + 'linux', + 'aarch64', + 'https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_aarch64_linux.tar.gz' + ], + [ + '21.0.3+9', + 'linux', + 'riscv', + 'https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.3.0.3%2B9_jdk-21.0.3-ga/Alibaba_Dragonwell_Standard_21.0.3.0.3.9_riscv64_linux.tar.gz' + ], + [ + '21.0.1+12', + 'linux', + 'x64', + 'https://github.com/dragonwell-project/dragonwell21/releases/download/dragonwell-standard-21.0.1.0.1%2B12_jdk-21.0.1-ga/Alibaba_Dragonwell_Standard_21.0.1.0.1.12_x64_linux.tar.gz' ] ])( 'should return proper link according to the specified java-version, platform and arch', @@ -175,9 +206,8 @@ describe('getAvailableVersions', () => { }); mockPlatform(distribution, platform); - const availableVersion = await distribution['findPackageForDownload']( - jdkVersion - ); + const availableVersion = + await distribution['findPackageForDownload'](jdkVersion); expect(availableVersion).not.toBeNull(); expect(availableVersion.url).toBe(expectedLink); } diff --git a/__tests__/distributors/graalvm-installer.test.ts b/__tests__/distributors/graalvm-installer.test.ts new file mode 100644 index 000000000..d2dda9f6d --- /dev/null +++ b/__tests__/distributors/graalvm-installer.test.ts @@ -0,0 +1,924 @@ +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; +import * as http from '@actions/http-client'; +import fs from 'fs'; +import path from 'path'; +import {GraalVMDistribution} from '../../src/distributions/graalvm/installer'; +import {JavaInstallerOptions} from '../../src/distributions/base-models'; +import * as util from '../../src/util'; + +jest.mock('@actions/core'); +jest.mock('@actions/tool-cache'); +jest.mock('@actions/http-client'); + +jest.mock('../../src/util', () => ({ + ...jest.requireActual('../../src/util'), + extractJdkFile: jest.fn(), + getDownloadArchiveExtension: jest.fn(), + renameWinArchive: jest.fn(), + getGitHubHttpHeaders: jest.fn().mockReturnValue({Accept: 'application/json'}) +})); + +jest.mock('fs', () => ({ + ...jest.requireActual('fs'), + readdirSync: jest.fn(), + existsSync: jest.fn() +})); + +beforeAll(() => { + process.env.NODE_ENV = 'test'; + + if (!jest.isMockFunction(http.HttpClient)) { + throw new Error('HTTP client must be mocked in tests!'); + } + + if (!jest.isMockFunction(tc.downloadTool)) { + throw new Error('Tool cache downloadTool must be mocked in tests!'); + } + + console.log('✅ All external dependencies are properly mocked'); +}); + +describe('GraalVMDistribution', () => { + let distribution: GraalVMDistribution; + let mockHttpClient: jest.Mocked; + + const defaultOptions: JavaInstallerOptions = { + version: '17', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }; + + beforeEach(() => { + jest.clearAllMocks(); + + distribution = new GraalVMDistribution(defaultOptions); + + mockHttpClient = new http.HttpClient() as jest.Mocked; + (distribution as any).http = mockHttpClient; + + (util.getDownloadArchiveExtension as jest.Mock).mockReturnValue('tar.gz'); + }); + + afterAll(() => { + expect(jest.isMockFunction(http.HttpClient)).toBe(true); + + expect(jest.isMockFunction(tc.downloadTool)).toBe(true); + expect(jest.isMockFunction(tc.cacheDir)).toBe(true); + + jest.restoreAllMocks(); + jest.clearAllMocks(); + }); + + describe('getPlatform', () => { + it('should map darwin to macos', () => { + const result = distribution.getPlatform('darwin'); + expect(result).toBe('macos'); + }); + + it('should map win32 to windows', () => { + const result = distribution.getPlatform('win32'); + expect(result).toBe('windows'); + }); + + it('should map linux to linux', () => { + const result = distribution.getPlatform('linux'); + expect(result).toBe('linux'); + }); + + it('should throw error for unsupported platform', () => { + expect(() => distribution.getPlatform('aix' as NodeJS.Platform)).toThrow( + "Platform 'aix' is not supported. Supported platforms: 'linux', 'macos', 'windows'" + ); + }); + }); + + describe('downloadTool', () => { + const javaRelease = { + version: '17.0.5', + url: 'https://example.com/graalvm.tar.gz' + }; + + beforeEach(() => { + (tc.downloadTool as jest.Mock).mockResolvedValue('/tmp/archive.tar.gz'); + (tc.cacheDir as jest.Mock).mockResolvedValue('/cached/java/path'); + + (util.extractJdkFile as jest.Mock).mockResolvedValue('/tmp/extracted'); + + // Mock renameWinArchive - it returns the same path (no renaming) + (util.renameWinArchive as jest.Mock).mockImplementation((p: string) => p); + + (util.getDownloadArchiveExtension as jest.Mock).mockReturnValue('tar.gz'); + + // Mock fs.existsSync to return true for extracted path + (fs.existsSync as jest.Mock).mockReturnValue(true); + + (fs.readdirSync as jest.Mock).mockReturnValue(['graalvm-jdk-17.0.5']); + + jest + .spyOn(distribution as any, 'getToolcacheVersionName') + .mockImplementation(version => version); + }); + + it('should download, extract and cache the tool successfully', async () => { + const result = await (distribution as any).downloadTool(javaRelease); + + // Verify the download was initiated + expect(tc.downloadTool).toHaveBeenCalledWith(javaRelease.url); + + // The implementation uses the original path for extraction + expect(util.extractJdkFile).toHaveBeenCalledWith( + '/tmp/archive.tar.gz', // Original path + 'tar.gz' + ); + + // Verify path existence check + expect(fs.existsSync).toHaveBeenCalledWith('/tmp/extracted'); + + // Verify directory reading + expect(fs.readdirSync).toHaveBeenCalledWith('/tmp/extracted'); + + // Verify caching with correct parameters + expect(tc.cacheDir).toHaveBeenCalledWith( + path.join('/tmp/extracted', 'graalvm-jdk-17.0.5'), + 'Java_GraalVM_jdk', + '17.0.5', + 'x64' + ); + + // Verify the result + expect(result).toEqual({ + version: '17.0.5', + path: '/cached/java/path' + }); + + // Verify logging + expect(core.info).toHaveBeenCalledWith( + 'Downloading Java 17.0.5 (GraalVM) from https://example.com/graalvm.tar.gz ...' + ); + expect(core.info).toHaveBeenCalledWith('Extracting Java archive...'); + }); + + it('should throw error when extracted path does not exist', async () => { + (fs.existsSync as jest.Mock).mockReturnValue(false); + + await expect( + (distribution as any).downloadTool(javaRelease) + ).rejects.toThrow( + 'Extraction failed: path /tmp/extracted does not exist' + ); + + expect(core.error).toHaveBeenCalledWith( + expect.stringContaining('Failed to download and extract GraalVM:') + ); + }); + + it('should throw error when extracted directory is empty', async () => { + (fs.existsSync as jest.Mock).mockReturnValue(true); + (fs.readdirSync as jest.Mock).mockReturnValue([]); + + await expect( + (distribution as any).downloadTool(javaRelease) + ).rejects.toThrow( + 'Extraction failed: no files found in extracted directory' + ); + + expect(core.error).toHaveBeenCalledWith( + expect.stringContaining('Failed to download and extract GraalVM:') + ); + }); + + it('should handle download errors', async () => { + const downloadError = new Error('Network error during download'); + (tc.downloadTool as jest.Mock).mockRejectedValue(downloadError); + + await expect( + (distribution as any).downloadTool(javaRelease) + ).rejects.toThrow('Network error during download'); + + expect(core.error).toHaveBeenCalledWith( + 'Failed to download and extract GraalVM: Error: Network error during download' + ); + }); + + it('should handle extraction errors', async () => { + const extractError = new Error('Failed to extract archive'); + (util.extractJdkFile as jest.Mock).mockRejectedValue(extractError); + + await expect( + (distribution as any).downloadTool(javaRelease) + ).rejects.toThrow('Failed to extract archive'); + + expect(core.error).toHaveBeenCalledWith( + 'Failed to download and extract GraalVM: Error: Failed to extract archive' + ); + }); + + it('should handle different archive extensions', async () => { + // Test with a .zip file + (util.getDownloadArchiveExtension as jest.Mock).mockReturnValue('zip'); + (tc.downloadTool as jest.Mock).mockResolvedValue('/tmp/archive.zip'); + + const zipRelease = { + version: '17.0.5', + url: 'https://example.com/graalvm.zip' + }; + + const result = await (distribution as any).downloadTool(zipRelease); + + expect(util.extractJdkFile).toHaveBeenCalledWith( + '/tmp/archive.zip', + 'zip' + ); + + expect(result).toEqual({ + version: '17.0.5', + path: '/cached/java/path' + }); + }); + }); + + describe('findPackageForDownload', () => { + beforeEach(() => { + jest.spyOn(distribution, 'getPlatform').mockReturnValue('linux'); + }); + + describe('input validation', () => { + it('should throw error for null version range', async () => { + await expect( + (distribution as any).findPackageForDownload(null) + ).rejects.toThrow('Version range is required and must be a string'); + }); + + it('should throw error for undefined version range', async () => { + await expect( + (distribution as any).findPackageForDownload(undefined) + ).rejects.toThrow('Version range is required and must be a string'); + }); + + it('should throw error for empty string version range', async () => { + await expect( + (distribution as any).findPackageForDownload('') + ).rejects.toThrow('Version range is required and must be a string'); + }); + + it('should throw error for non-string version range', async () => { + await expect( + (distribution as any).findPackageForDownload(123) + ).rejects.toThrow('Version range is required and must be a string'); + }); + + it('should throw error for invalid version format', async () => { + await expect( + (distribution as any).findPackageForDownload('abc') + ).rejects.toThrow('Invalid version format: abc'); + }); + }); + + describe('stable builds', () => { + it('should construct correct URL for specific version', async () => { + const mockResponse = { + message: {statusCode: 200} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + const result = await (distribution as any).findPackageForDownload( + '17.0.5' + ); + + expect(result).toEqual({ + url: 'https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.5_linux-x64_bin.tar.gz', + version: '17.0.5' + }); + expect(mockHttpClient.head).toHaveBeenCalledWith(result.url); + }); + + it('should construct correct URL for major version (latest)', async () => { + const mockResponse = { + message: {statusCode: 200} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + const result = await (distribution as any).findPackageForDownload('21'); + + expect(result).toEqual({ + url: 'https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_linux-x64_bin.tar.gz', + version: '21' + }); + }); + + it('should throw error for unsupported architecture', async () => { + distribution = new GraalVMDistribution({ + ...defaultOptions, + architecture: 'x86' + }); + (distribution as any).http = mockHttpClient; + + await expect( + (distribution as any).findPackageForDownload('17') + ).rejects.toThrow( + 'Unsupported architecture: x86. Supported architectures are: x64, aarch64' + ); + }); + + it('should throw error for JDK versions less than 17', async () => { + await expect( + (distribution as any).findPackageForDownload('11') + ).rejects.toThrow( + 'GraalVM is only supported for JDK 17 and later. Requested version: 11' + ); + }); + + it('should throw error for non-jdk package types', async () => { + distribution = new GraalVMDistribution({ + ...defaultOptions, + packageType: 'jre' + }); + (distribution as any).http = mockHttpClient; + + await expect( + (distribution as any).findPackageForDownload('17') + ).rejects.toThrow('GraalVM provides only the `jdk` package type'); + }); + + it('should throw error when file not found (404)', async () => { + const mockResponse = { + message: {statusCode: 404} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + await expect( + (distribution as any).findPackageForDownload('17.0.99') + ).rejects.toThrow( + 'Could not find GraalVM for SemVer 17.0.99. Please check if this version is available at https://download.oracle.com/graalvm' + ); + }); + + it('should throw error for unauthorized access (401)', async () => { + const mockResponse = { + message: {statusCode: 401} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + await expect( + (distribution as any).findPackageForDownload('17') + ).rejects.toThrow( + 'Access denied when downloading GraalVM. Status code: 401. Please check your credentials or permissions.' + ); + }); + + it('should throw error for forbidden access (403)', async () => { + const mockResponse = { + message: {statusCode: 403} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + await expect( + (distribution as any).findPackageForDownload('17') + ).rejects.toThrow( + 'Access denied when downloading GraalVM. Status code: 403. Please check your credentials or permissions.' + ); + }); + + it('should throw error for other HTTP errors with status message', async () => { + const mockResponse = { + message: { + statusCode: 500, + statusMessage: 'Internal Server Error' + } + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + await expect( + (distribution as any).findPackageForDownload('17') + ).rejects.toThrow( + 'HTTP request for GraalVM failed with status code: 500 (Internal Server Error)' + ); + }); + + it('should throw error for other HTTP errors without status message', async () => { + const mockResponse = { + message: {statusCode: 500} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + await expect( + (distribution as any).findPackageForDownload('17') + ).rejects.toThrow( + 'HTTP request for GraalVM failed with status code: 500 (Unknown error)' + ); + }); + }); + + describe('EA builds', () => { + beforeEach(() => { + distribution = new GraalVMDistribution(defaultOptions); + (distribution as any).http = mockHttpClient; + (distribution as any).stable = false; + }); + + it('should delegate to findEABuildDownloadUrl for unstable versions', async () => { + const currentPlatform = + process.platform === 'win32' ? 'windows' : process.platform; + + const mockEAVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'x64', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-x64_bin.tar.gz' + }, + { + arch: 'aarch64', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-aarch64_bin.tar.gz' + } + ] + } + ]; + + mockHttpClient.getJson.mockResolvedValue({ + result: mockEAVersions, + statusCode: 200, + headers: {} + }); + + jest + .spyOn(distribution as any, 'distributionArchitecture') + .mockReturnValue('x64'); + + const result = await (distribution as any).findPackageForDownload('23'); + + expect(result).toEqual({ + url: 'https://example.com/download/graalvm-jdk-23_linux-x64_bin.tar.gz', + version: '23-ea-20240716' + }); + + expect(mockHttpClient.getJson).toHaveBeenCalledWith( + 'https://api.github.com/repos/graalvm/oracle-graalvm-ea-builds/contents/versions/23-ea.json?ref=main', + {Accept: 'application/json'} + ); + }); + + it('should throw error when no latest EA version found', async () => { + const currentPlatform = + process.platform === 'win32' ? 'windows' : process.platform; + + const mockEAVersions = [ + { + version: '23-ea-20240716', + latest: false, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'x64', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-x64_bin.tar.gz' + } + ] + } + ]; + + mockHttpClient.getJson.mockResolvedValue({ + result: mockEAVersions, + statusCode: 200, + headers: {} + }); + + jest + .spyOn(distribution as any, 'distributionArchitecture') + .mockReturnValue('x64'); + + await expect( + (distribution as any).findPackageForDownload('23') + ).rejects.toThrow("Unable to find latest version for '23-ea'"); + + // Verify error logging + expect(core.error).toHaveBeenCalledWith( + 'Available versions: 23-ea-20240716' + ); + }); + + it('should throw error when no matching file for architecture in EA build', async () => { + const currentPlatform = + process.platform === 'win32' ? 'windows' : process.platform; + + const mockEAVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'arm64', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-arm64_bin.tar.gz' + } + ] + } + ]; + + mockHttpClient.getJson.mockResolvedValue({ + result: mockEAVersions, + statusCode: 200, + headers: {} + }); + + jest + .spyOn(distribution as any, 'distributionArchitecture') + .mockReturnValue('x64'); + + await expect( + (distribution as any).findPackageForDownload('23') + ).rejects.toThrow( + `Unable to find file for architecture 'x64' and platform '${currentPlatform}'` + ); + + // Verify error logging + expect(core.error).toHaveBeenCalledWith( + expect.stringContaining('Available files for architecture x64:') + ); + }); + + it('should throw error when no matching platform in EA build', async () => { + const mockEAVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'x64', + platform: 'different-platform', + filename: 'graalvm-jdk-23_different-x64_bin.tar.gz' + } + ] + } + ]; + + mockHttpClient.getJson.mockResolvedValue({ + result: mockEAVersions, + statusCode: 200, + headers: {} + }); + + jest + .spyOn(distribution as any, 'distributionArchitecture') + .mockReturnValue('x64'); + + const currentPlatform = + process.platform === 'win32' ? 'windows' : process.platform; + + await expect( + (distribution as any).findPackageForDownload('23') + ).rejects.toThrow( + `Unable to find file for architecture 'x64' and platform '${currentPlatform}'` + ); + }); + + it('should throw error when filename does not start with graalvm-jdk-', async () => { + const currentPlatform = + process.platform === 'win32' ? 'windows' : process.platform; + + const mockEAVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'x64', + platform: currentPlatform, + filename: 'wrong-prefix-23_linux-x64_bin.tar.gz' + } + ] + } + ]; + + mockHttpClient.getJson.mockResolvedValue({ + result: mockEAVersions, + statusCode: 200, + headers: {} + }); + + jest + .spyOn(distribution as any, 'distributionArchitecture') + .mockReturnValue('x64'); + + await expect( + (distribution as any).findPackageForDownload('23') + ).rejects.toThrow( + "Invalid filename format: wrong-prefix-23_linux-x64_bin.tar.gz. Expected to start with 'graalvm-jdk-'" + ); + }); + + it('should throw error when EA version JSON is not found', async () => { + mockHttpClient.getJson.mockResolvedValue({ + result: null, + statusCode: 404, + headers: {} + }); + + await expect( + (distribution as any).findPackageForDownload('23') + ).rejects.toThrow( + "No GraalVM EA build found for version '23-ea'. Please check if the version is correct." + ); + }); + }); + }); + + describe('findEABuildDownloadUrl', () => { + const currentPlatform = + process.platform === 'win32' ? 'windows' : process.platform; + + const mockEAVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'x64', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-x64_bin.tar.gz' + }, + { + arch: 'aarch64', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-aarch64_bin.tar.gz' + } + ] + }, + { + version: '23-ea-20240709', + latest: false, + download_base_url: 'https://example.com/old/', + files: [ + { + arch: 'x64', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-x64_bin.tar.gz' + } + ] + } + ]; + + let fetchEASpy: jest.SpyInstance; + + beforeEach(() => { + fetchEASpy = jest.spyOn(distribution as any, 'fetchEAJson'); + jest + .spyOn(distribution as any, 'distributionArchitecture') + .mockReturnValue('x64'); + }); + + it('should find latest version and return correct URL', async () => { + fetchEASpy.mockResolvedValue(mockEAVersions); + + const result = await (distribution as any).findEABuildDownloadUrl( + '23-ea' + ); + + expect(fetchEASpy).toHaveBeenCalledWith('23-ea'); + expect(result).toEqual({ + url: 'https://example.com/download/graalvm-jdk-23_linux-x64_bin.tar.gz', + version: '23-ea-20240716' + }); + + // Verify debug logging + expect(core.debug).toHaveBeenCalledWith('Searching for EA build: 23-ea'); + expect(core.debug).toHaveBeenCalledWith('Found 2 EA versions'); + expect(core.debug).toHaveBeenCalledWith( + 'Latest version found: 23-ea-20240716' + ); + expect(core.debug).toHaveBeenCalledWith( + 'Download URL: https://example.com/download/graalvm-jdk-23_linux-x64_bin.tar.gz' + ); + }); + + it('should throw error when no latest version found', async () => { + const noLatestVersions = mockEAVersions.map(v => ({...v, latest: false})); + fetchEASpy.mockResolvedValue(noLatestVersions); + + await expect( + (distribution as any).findEABuildDownloadUrl('23-ea') + ).rejects.toThrow("Unable to find latest version for '23-ea'"); + + expect(core.error).toHaveBeenCalledWith( + 'Available versions: 23-ea-20240716, 23-ea-20240709' + ); + }); + + it('should throw error when no matching file for architecture', async () => { + const wrongArchVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'arm', + platform: currentPlatform, + filename: 'graalvm-jdk-23_linux-arm_bin.tar.gz' + } + ] + } + ]; + fetchEASpy.mockResolvedValue(wrongArchVersions); + + await expect( + (distribution as any).findEABuildDownloadUrl('23-ea') + ).rejects.toThrow( + `Unable to find file for architecture 'x64' and platform '${currentPlatform}'` + ); + + expect(core.error).toHaveBeenCalledWith( + expect.stringContaining('Available files for architecture x64:') + ); + }); + + it('should throw error when filename does not start with graalvm-jdk-', async () => { + const badFilenameVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'x64', + platform: currentPlatform, + filename: 'wrong-name.tar.gz' + } + ] + } + ]; + fetchEASpy.mockResolvedValue(badFilenameVersions); + + await expect( + (distribution as any).findEABuildDownloadUrl('23-ea') + ).rejects.toThrow( + "Invalid filename format: wrong-name.tar.gz. Expected to start with 'graalvm-jdk-'" + ); + }); + + it('should work with aarch64 architecture', async () => { + jest + .spyOn(distribution as any, 'distributionArchitecture') + .mockReturnValue('aarch64'); + + fetchEASpy.mockResolvedValue(mockEAVersions); + + const result = await (distribution as any).findEABuildDownloadUrl( + '23-ea' + ); + + expect(result).toEqual({ + url: 'https://example.com/download/graalvm-jdk-23_linux-aarch64_bin.tar.gz', + version: '23-ea-20240716' + }); + }); + + it('should throw error when platform does not match', async () => { + const wrongPlatformVersions = [ + { + version: '23-ea-20240716', + latest: true, + download_base_url: 'https://example.com/download/', + files: [ + { + arch: 'x64', + platform: 'different-platform', + filename: 'graalvm-jdk-23_different-x64_bin.tar.gz' + } + ] + } + ]; + fetchEASpy.mockResolvedValue(wrongPlatformVersions); + + await expect( + (distribution as any).findEABuildDownloadUrl('23-ea') + ).rejects.toThrow( + `Unable to find file for architecture 'x64' and platform '${currentPlatform}'` + ); + }); + }); + + describe('fetchEAJson', () => { + it('should fetch and return EA version data', async () => { + const mockData = [{version: '23-ea', files: []}]; + mockHttpClient.getJson.mockResolvedValue({ + result: mockData, + statusCode: 200, + headers: {} + }); + + const result = await (distribution as any).fetchEAJson('23-ea'); + + expect(mockHttpClient.getJson).toHaveBeenCalledWith( + 'https://api.github.com/repos/graalvm/oracle-graalvm-ea-builds/contents/versions/23-ea.json?ref=main', + {Accept: 'application/json'} + ); + expect(result).toEqual(mockData); + expect(core.debug).toHaveBeenCalled(); + }); + + it('should throw error when no data returned', async () => { + mockHttpClient.getJson.mockResolvedValue({ + result: null, + statusCode: 200, + headers: {} + }); + + await expect((distribution as any).fetchEAJson('23-ea')).rejects.toThrow( + "No GraalVM EA build found for version '23-ea'. Please check if the version is correct." + ); + }); + + it('should handle 404 errors with specific message', async () => { + const error404 = new Error('Not Found: 404'); + mockHttpClient.getJson.mockRejectedValue(error404); + + await expect((distribution as any).fetchEAJson('23-ea')).rejects.toThrow( + "GraalVM EA version '23-ea' not found. Please verify the version exists in the EA builds repository." + ); + }); + + it('should handle generic HTTP errors with context', async () => { + const networkError = new Error('Network timeout'); + mockHttpClient.getJson.mockRejectedValue(networkError); + + await expect((distribution as any).fetchEAJson('23-ea')).rejects.toThrow( + "Failed to fetch GraalVM EA version information for '23-ea': Network timeout" + ); + }); + + it('should handle non-Error exceptions', async () => { + mockHttpClient.getJson.mockRejectedValue('String error'); + + await expect((distribution as any).fetchEAJson('23-ea')).rejects.toThrow( + "Failed to fetch GraalVM EA version information for '23-ea'" + ); + }); + }); + + describe('Integration tests', () => { + it('should handle different architectures correctly', async () => { + const architectures = ['x64', 'aarch64']; + + for (const arch of architectures) { + distribution = new GraalVMDistribution({ + ...defaultOptions, + architecture: arch + }); + (distribution as any).http = mockHttpClient; + + const mockResponse = { + message: {statusCode: 200} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + const result = await (distribution as any).findPackageForDownload('17'); + expect(result.url).toContain(arch); + } + }); + + it('should handle different platforms correctly', async () => { + const platforms = [ + {process: 'darwin', expected: 'macos'}, + {process: 'win32', expected: 'windows'}, + {process: 'linux', expected: 'linux'} + ]; + + const originalPlatform = process.platform; + + for (const {process: proc, expected} of platforms) { + Object.defineProperty(process, 'platform', { + value: proc, + configurable: true + }); + + distribution = new GraalVMDistribution(defaultOptions); + (distribution as any).http = mockHttpClient; + + const mockResponse = { + message: {statusCode: 200} + } as http.HttpClientResponse; + mockHttpClient.head.mockResolvedValue(mockResponse); + + const result = await (distribution as any).findPackageForDownload('17'); + expect(result.url).toContain(expected); + } + + Object.defineProperty(process, 'platform', { + value: originalPlatform, + configurable: true + }); + }); + }); +}); diff --git a/__tests__/distributors/jetbrains-installer.test.ts b/__tests__/distributors/jetbrains-installer.test.ts new file mode 100644 index 000000000..44d8ef896 --- /dev/null +++ b/__tests__/distributors/jetbrains-installer.test.ts @@ -0,0 +1,117 @@ +import https from 'https'; +import {HttpClient} from '@actions/http-client'; +import {JetBrainsDistribution} from '../../src/distributions/jetbrains/installer'; + +import manifestData from '../data/jetbrains.json'; +import os from 'os'; + +describe('getAvailableVersions', () => { + let spyHttpClient: jest.SpyInstance; + + beforeEach(() => { + spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); + spyHttpClient.mockReturnValue({ + statusCode: 200, + headers: {}, + result: [] + }); + }); + + afterEach(() => { + jest.resetAllMocks(); + jest.clearAllMocks(); + jest.restoreAllMocks(); + }); + + it('load available versions', async () => { + spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); + spyHttpClient.mockReturnValueOnce({ + statusCode: 200, + headers: {}, + result: manifestData as any + }); + + const distribution = new JetBrainsDistribution({ + version: '17', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + const availableVersions = await distribution['getAvailableVersions'](); + expect(availableVersions).not.toBeNull(); + + const length = + os.platform() === 'win32' ? manifestData.length : manifestData.length + 2; + expect(availableVersions.length).toBe(length); + }, 10_000); +}); + +describe('findPackageForDownload', () => { + it.each([ + ['17', '17.0.11+1207.24'], + ['11.0', '11.0.16+2043.64'], + ['11.0.11', '11.0.11+1542.1'], + ['21.0.2', '21.0.2+375.1'], + ['21', '21.0.3+465.3'], + ['x', '21.0.3+465.3'] + ])('version is resolved correctly %s -> %s', async (input, expected) => { + const distribution = new JetBrainsDistribution({ + version: input, + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + const resolvedVersion = await distribution['findPackageForDownload'](input); + expect(resolvedVersion.version).toBe(expected); + }); + + it.each(['17', '11.0', '11.0.11', '21.0.2', '21'])( + 'version %s can be downloaded', + async input => { + const distribution = new JetBrainsDistribution({ + version: input, + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + const resolvedVersion = + await distribution['findPackageForDownload'](input); + const url = resolvedVersion.url; + const options = {method: 'HEAD'}; + + https.request(url, options, res => { + // JetBrains uses 403 for inexistent packages + expect(res.statusCode).not.toBe(403); + res.resume(); + }); + } + ); + + it('version is not found', async () => { + const distribution = new JetBrainsDistribution({ + version: '8.0.452', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect(distribution['findPackageForDownload']('8.x')).rejects.toThrow( + /Could not find satisfied version for SemVer */ + ); + }); + + it('version list is empty', async () => { + const distribution = new JetBrainsDistribution({ + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => []; + await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( + /Could not find satisfied version for SemVer */ + ); + }); +}); diff --git a/__tests__/distributors/liberica-installer.test.ts b/__tests__/distributors/liberica-installer.test.ts index 33a51017d..5e664d5f3 100644 --- a/__tests__/distributors/liberica-installer.test.ts +++ b/__tests__/distributors/liberica-installer.test.ts @@ -105,9 +105,11 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); - const distribution = new LibericaDistributions({ + const distributions = new LibericaDistributions({ version: '17', architecture: '', // to get default value packageType: 'jdk', @@ -117,11 +119,11 @@ describe('getAvailableVersions', () => { const additionalParams = '&installation-type=archive&fields=downloadUrl%2Cversion%2CfeatureVersion%2CinterimVersion%2C' + 'updateVersion%2CbuildVersion'; - distribution['getPlatformOption'] = () => 'macos'; + distributions['getPlatformOption'] = () => 'macos'; const buildUrl = `https://api.bell-sw.com/v1/liberica/releases?os=macos&bundle-type=jdk&bitness=${distroArch.bitness}&arch=${distroArch.arch}&build-type=all${additionalParams}`; - await distribution['getAvailableVersions'](); + await distributions['getAvailableVersions'](); expect(spyHttpClient.mock.calls).toHaveLength(1); expect(spyHttpClient.mock.calls[0][0]).toBe(buildUrl); diff --git a/__tests__/distributors/liberica-linux-installer.test.ts b/__tests__/distributors/liberica-linux-installer.test.ts index 8e6a665e0..58c4e4781 100644 --- a/__tests__/distributors/liberica-linux-installer.test.ts +++ b/__tests__/distributors/liberica-linux-installer.test.ts @@ -105,7 +105,9 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); const distribution = new LibericaDistributions({ version: '17', diff --git a/__tests__/distributors/liberica-windows-installer.test.ts b/__tests__/distributors/liberica-windows-installer.test.ts index 1ccc57ede..22d287410 100644 --- a/__tests__/distributors/liberica-windows-installer.test.ts +++ b/__tests__/distributors/liberica-windows-installer.test.ts @@ -105,7 +105,9 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); const distribution = new LibericaDistributions({ version: '17', diff --git a/__tests__/distributors/microsoft-installer.test.ts b/__tests__/distributors/microsoft-installer.test.ts index 00c4b6c6e..16c436370 100644 --- a/__tests__/distributors/microsoft-installer.test.ts +++ b/__tests__/distributors/microsoft-installer.test.ts @@ -29,6 +29,11 @@ describe('findPackageForDownload', () => { }); it.each([ + [ + '25.x', + '25.0.0', + 'https://aka.ms/download-jdk/microsoft-jdk-25.0.0-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}' + ], [ '21.x', '21.0.0', @@ -95,7 +100,9 @@ describe('findPackageForDownload', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: string) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); jest.spyOn(os, 'platform').mockReturnValue('darwin'); const version = '17'; @@ -119,7 +126,9 @@ describe('findPackageForDownload', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: string) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); jest.spyOn(os, 'platform').mockReturnValue('linux'); const version = '17'; @@ -143,7 +152,9 @@ describe('findPackageForDownload', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: string) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); jest.spyOn(os, 'platform').mockReturnValue('win32'); const version = '17'; diff --git a/__tests__/distributors/oracle-installer.test.ts b/__tests__/distributors/oracle-installer.test.ts index 356c0c682..226eca905 100644 --- a/__tests__/distributors/oracle-installer.test.ts +++ b/__tests__/distributors/oracle-installer.test.ts @@ -95,7 +95,9 @@ describe('findPackageForDownload', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: string) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); jest.spyOn(os, 'platform').mockReturnValue('linux'); const version = '18'; @@ -115,7 +117,8 @@ describe('findPackageForDownload', () => { const expectedUrl = `https://download.oracle.com/java/18/archive/jdk-18_${osType}-${distroArch}_bin.${archiveType}`; expect(result.url).toBe(expectedUrl); - } + }, + 10000 ); it('should throw an error', async () => { diff --git a/__tests__/distributors/sapmachine-installer.test.ts b/__tests__/distributors/sapmachine-installer.test.ts new file mode 100644 index 000000000..5073cd9fe --- /dev/null +++ b/__tests__/distributors/sapmachine-installer.test.ts @@ -0,0 +1,292 @@ +import {HttpClient} from '@actions/http-client'; +import {SapMachineDistribution} from '../../src/distributions/sapmachine/installer'; +import * as utils from '../../src/util'; + +import manifestData from '../data/sapmachine.json'; + +describe('getAvailableVersions', () => { + let spyHttpClient: jest.SpyInstance; + let spyUtilGetDownloadArchiveExtension: jest.SpyInstance; + + beforeEach(() => { + spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); + spyHttpClient.mockReturnValue({ + statusCode: 200, + headers: {}, + result: manifestData + }); + + spyUtilGetDownloadArchiveExtension = jest.spyOn( + utils, + 'getDownloadArchiveExtension' + ); + spyUtilGetDownloadArchiveExtension.mockReturnValue('tar.gz'); + }); + + afterEach(() => { + jest.resetAllMocks(); + jest.clearAllMocks(); + jest.restoreAllMocks(); + }); + + const mockPlatform = ( + distribution: SapMachineDistribution, + platform: string + ) => { + distribution['getPlatformOption'] = () => platform; + const mockedExtension = platform == 'windows' ? 'zip' : 'tar.gz'; + spyUtilGetDownloadArchiveExtension.mockReturnValue(mockedExtension); + }; + + describe('shouldFallbackToBackupUrl', () => { + it('should return correct release when the primary URL is not available', async () => { + spyHttpClient.mockReturnValueOnce({ + statusCode: 404, + headers: {}, + result: '' + }); + spyHttpClient.mockReturnValueOnce({ + statusCode: 200, + headers: {}, + result: manifestData + }); + + const version = '17'; + const distribution = new SapMachineDistribution({ + version: version, + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + + mockPlatform(distribution, 'linux'); + + const availableVersion = + await distribution['findPackageForDownload'](version); + expect(availableVersion).not.toBeNull(); + expect(availableVersion.url).toBe( + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz' + ); + }); + }); + + describe('getAvailableVersions', () => { + it.each([ + ['11', 'x64', 'linux', 71], + ['11', 'aarch64', 'linux', 54], + ['17', 'riscv', 'linux', 0], + ['16.0.1', 'x64', 'linux', 71], + ['23-ea', 'x64', 'linux', 798], + ['23-ea', 'aarch64', 'windows', 0], + ['23-ea', 'x64', 'windows', 750] + ])( + 'should get right number of available versions from JSON', + async ( + jdkVersion: string, + arch: string, + platform: string, + len: number + ) => { + const distribution = new SapMachineDistribution({ + version: jdkVersion, + architecture: arch, + packageType: 'jdk', + checkLatest: false + }); + mockPlatform(distribution, platform); + + const availableVersions = await distribution['getAvailableVersions'](); + expect(availableVersions).not.toBeNull(); + expect(availableVersions.length).toBe(len); + } + ); + }); + + describe('findPackageForDownload', () => { + it.each([ + [ + '11', + 'linux', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_linux-x64_bin.tar.gz' + ], + [ + '11', + 'linux', + 'aarch64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_linux-aarch64_bin.tar.gz' + ], + [ + '11', + 'windows', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.22/sapmachine-jdk-11.0.22_windows-x64_bin.zip' + ], + [ + '11.0.17', + 'linux', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.17/sapmachine-jdk-11.0.17_linux-x64_bin.tar.gz' + ], + [ + '17', + 'linux', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz' + ], + [ + '17', + 'linux', + 'aarch64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-aarch64_bin.tar.gz' + ], + [ + '17', + 'windows', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_windows-x64_bin.zip' + ], + [ + '17.0.4', + 'linux', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jdk-17.0.4.1_linux-x64_bin.tar.gz' + ], + [ + '17', + 'linux', + 'x64', + 'jre', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_linux-x64_bin.tar.gz' + ], + [ + '17', + 'linux', + 'aarch64', + 'jre', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_linux-aarch64_bin.tar.gz' + ], + [ + '17', + 'windows', + 'x64', + 'jre', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jre-17.0.10_windows-x64_bin.zip' + ], + [ + '17.0.4', + 'linux', + 'x64', + 'jre', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.4.1/sapmachine-jre-17.0.4.1_linux-x64_bin.tar.gz' + ], + [ + '23-ea', + 'linux', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-23%2B15/sapmachine-jdk-23-ea.15_linux-x64_bin.tar.gz', + '23' + ], + [ + '21.0.2+2-ea', + 'linux', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.2%2B2/sapmachine-jdk-21.0.2-ea.2_linux-x64_bin.tar.gz', + '21.0.2+2' + ], + [ + '17', + 'linux-musl', + 'x64', + 'jdk', + 'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64-musl_bin.tar.gz' + ] + ])( + 'should return proper link according to the specified java-version, platform and arch', + async ( + version: string, + platform: string, + arch: string, + packageType: string, + expectedLink: string, + normalizedVersion: string = version + ) => { + const distribution = new SapMachineDistribution({ + version: version, + architecture: arch, + packageType: packageType, + checkLatest: false + }); + mockPlatform(distribution, platform); + + const availableVersion = + await distribution['findPackageForDownload'](normalizedVersion); + expect(availableVersion).not.toBeNull(); + expect(availableVersion.url).toBe(expectedLink); + } + ); + + it.each([ + ['8', 'linux', 'x64'], + ['8', 'macos', 'aarch64'], + ['23', 'macos', 'aarch64'], + ['17', 'linux', 'riscv'], + ['23', 'linux', 'x64'], + ['25-ea', 'linux', 'x64', '25'], + ['8-ea', 'linux', 'x64', '8'], + ['21.0.3+7', 'linux', 'x64', '21.0.3+7'], + ['21.0.3+8-ea', 'linux', 'x64', '21.0.3+8'], + ['17', 'linux-muse', 'aarch64'] + ])( + 'should throw when required version of JDK can not be found in the JSON', + async ( + version: string, + platform: string, + arch: string, + normalizedVersion: string = version + ) => { + const distribution = new SapMachineDistribution({ + version: version, + architecture: arch, + packageType: 'jdk', + checkLatest: false + }); + mockPlatform(distribution, platform); + + await expect( + distribution['findPackageForDownload'](normalizedVersion) + ).rejects.toThrow( + `Couldn't find any satisfied version for the specified java-version: "${normalizedVersion}" and architecture: "${arch}".` + ); + } + ); + + it('should throw when required package type is not supported', async () => { + const jdkVersion = '17'; + const arch = 'x64'; + const platform = 'linux'; + const distribution = new SapMachineDistribution({ + version: jdkVersion, + architecture: arch, + packageType: 'jdk+fx', + checkLatest: false + }); + mockPlatform(distribution, platform); + await expect( + distribution['findPackageForDownload'](jdkVersion) + ).rejects.toThrow( + 'SapMachine provides only the `jdk` and `jre` package type' + ); + }); + }); +}); diff --git a/__tests__/distributors/semeru-installer.test.ts b/__tests__/distributors/semeru-installer.test.ts index 97f25cc81..690478f79 100644 --- a/__tests__/distributors/semeru-installer.test.ts +++ b/__tests__/distributors/semeru-installer.test.ts @@ -207,7 +207,7 @@ describe('findPackageForDownload', () => { }); distribution['getAvailableVersions'] = async () => []; await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( - `Unsupported architecture for IBM Semeru: ${arch}, the following are supported: x64, x86, ppc64le, ppc64, s390x, aarch64` + `Unsupported architecture for IBM Semeru: ${arch} for your current OS version, the following are supported: x64, x86, ppc64le, ppc64, s390x, aarch64` ); } ); diff --git a/__tests__/distributors/temurin-installer.test.ts b/__tests__/distributors/temurin-installer.test.ts index b8c9e7fde..f540901eb 100644 --- a/__tests__/distributors/temurin-installer.test.ts +++ b/__tests__/distributors/temurin-installer.test.ts @@ -147,7 +147,9 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: string) => { - jest.spyOn(os, 'arch').mockReturnValue(distroArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); const installerOptions: JavaInstallerOptions = { version: '17', diff --git a/__tests__/distributors/zulu-installer.test.ts b/__tests__/distributors/zulu-installer.test.ts index f8b8a72cb..100429b30 100644 --- a/__tests__/distributors/zulu-installer.test.ts +++ b/__tests__/distributors/zulu-installer.test.ts @@ -1,5 +1,4 @@ import {HttpClient} from '@actions/http-client'; -import * as semver from 'semver'; import {ZuluDistribution} from '../../src/distributions/zulu/installer'; import {IZuluVersions} from '../../src/distributions/zulu/models'; import * as utils from '../../src/util'; @@ -126,7 +125,9 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); const distribution = new ZuluDistribution({ version: '17', diff --git a/__tests__/distributors/zulu-linux-installer.test.ts b/__tests__/distributors/zulu-linux-installer.test.ts index 60f36ee59..a25344cbd 100644 --- a/__tests__/distributors/zulu-linux-installer.test.ts +++ b/__tests__/distributors/zulu-linux-installer.test.ts @@ -126,7 +126,9 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); const distribution = new ZuluDistribution({ version: '17', @@ -135,7 +137,9 @@ describe('getAvailableVersions', () => { checkLatest: false }); distribution['getPlatformOption'] = () => 'linux'; - const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=zip&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`; + // Override extension for linux default arch case to match util behavior + spyUtilGetDownloadArchiveExtension.mockReturnValue('tar.gz'); + const buildUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?os=linux&ext=tar.gz&bundle_type=jdk&javafx=false&arch=${distroArch.arch}&hw_bitness=${distroArch.bitness}&release_status=ga`; await distribution['getAvailableVersions'](); diff --git a/__tests__/distributors/zulu-windows-installer.test.ts b/__tests__/distributors/zulu-windows-installer.test.ts index dcac5aa0d..a3511ac90 100644 --- a/__tests__/distributors/zulu-windows-installer.test.ts +++ b/__tests__/distributors/zulu-windows-installer.test.ts @@ -126,7 +126,9 @@ describe('getAvailableVersions', () => { ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { - jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest + .spyOn(os, 'arch') + .mockReturnValue(osArch as ReturnType); const distribution = new ZuluDistribution({ version: '17', diff --git a/__tests__/util.test.ts b/__tests__/util.test.ts index bb7560dca..85b76069e 100644 --- a/__tests__/util.test.ts +++ b/__tests__/util.test.ts @@ -1,9 +1,13 @@ import * as cache from '@actions/cache'; import * as core from '@actions/core'; +import * as fs from 'fs'; +import * as path from 'path'; import { convertVersionToSemver, + getVersionFromFileContent, isVersionSatisfies, - isCacheFeatureAvailable + isCacheFeatureAvailable, + isGhes } from '../src/util'; jest.mock('@actions/cache'); @@ -80,3 +84,78 @@ describe('convertVersionToSemver', () => { expect(actual).toBe(expected); }); }); + +describe('getVersionFromFileContent', () => { + describe('.sdkmanrc', () => { + it.each([ + ['java=11.0.20.1-tem', '11.0.20'], + ['java = 11.0.20.1-tem', '11.0.20'], + ['java=11.0.20.1-tem # a comment in sdkmanrc', '11.0.20'], + ['java=11.0.20.1-tem\n#java=21.0.20.1-tem\n', '11.0.20'], // choose first match + ['java=11.0.20.1-tem\njava=21.0.20.1-tem\n', '11.0.20'], // choose first match + ['#java=11.0.20.1-tem\njava=21.0.20.1-tem\n', '21.0.20'] // first one is 'commented' in .sdkmanrc + ])('parsing %s should return %s', (content: string, expected: string) => { + const actual = getVersionFromFileContent(content, 'openjdk', '.sdkmanrc'); + expect(actual).toBe(expected); + }); + + describe('known versions', () => { + const csv = fs.readFileSync( + path.join(__dirname, 'data/sdkman-java-versions.csv'), + 'utf8' + ); + const versions = csv.split('\n').map(r => r.split(', ')); + + it.each(versions)( + 'parsing %s should return %s', + (sdkmanJavaVersion: string, expected: string) => { + const asContent = `java=${sdkmanJavaVersion}`; + const actual = getVersionFromFileContent( + asContent, + 'openjdk', + '.sdkmanrc' + ); + expect(actual).toBe(expected); + } + ); + }); + }); +}); + +describe('isGhes', () => { + const pristineEnv = process.env; + + beforeEach(() => { + jest.resetModules(); + process.env = {...pristineEnv}; + }); + + afterAll(() => { + process.env = pristineEnv; + }); + + it('returns false when the GITHUB_SERVER_URL environment variable is not defined', async () => { + delete process.env['GITHUB_SERVER_URL']; + expect(isGhes()).toBeFalsy(); + }); + + it('returns false when the GITHUB_SERVER_URL environment variable is set to github.com', async () => { + process.env['GITHUB_SERVER_URL'] = 'https://github.com'; + expect(isGhes()).toBeFalsy(); + }); + + it('returns false when the GITHUB_SERVER_URL environment variable is set to a GitHub Enterprise Cloud-style URL', async () => { + process.env['GITHUB_SERVER_URL'] = 'https://contoso.ghe.com'; + expect(isGhes()).toBeFalsy(); + }); + + it('returns false when the GITHUB_SERVER_URL environment variable has a .localhost suffix', async () => { + process.env['GITHUB_SERVER_URL'] = 'https://mock-github.localhost'; + expect(isGhes()).toBeFalsy(); + }); + + it('returns true when the GITHUB_SERVER_URL environment variable is set to some other URL', async () => { + process.env['GITHUB_SERVER_URL'] = 'https://src.onpremise.fabrikam.com'; + expect(isGhes()).toBeTruthy(); + }); +}); diff --git a/action.yml b/action.yml index 0969d5d42..21a4269d7 100644 --- a/action.yml +++ b/action.yml @@ -81,6 +81,6 @@ outputs: cache-hit: description: 'A boolean value to indicate an exact match was found for the primary key' runs: - using: 'node20' + using: 'node24' main: 'dist/setup/index.js' post: 'dist/cleanup/index.js' diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index b079c3296..d11a8dbeb 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -436,7 +436,7 @@ const requestUtils_1 = __nccwpck_require__(13981); const storage_1 = __nccwpck_require__(27577); const uploadUtils_1 = __nccwpck_require__(1786); const google_auth_library_1 = __nccwpck_require__(20810); -const storage_blob_1 = __nccwpck_require__(84100); +const storage_blob_1 = __nccwpck_require__(37168); const versionSalt = '1.0'; function getCacheApiUrl(resource) { var _a; @@ -5131,7 +5131,11 @@ function coerce (version, options) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5144,7 +5148,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5206,13 +5210,13 @@ class Command { } } function escapeData(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') @@ -5230,7 +5234,11 @@ function escapeProperty(s) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5243,7 +5251,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5257,7 +5265,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; const command_1 = __nccwpck_require__(87351); const file_command_1 = __nccwpck_require__(717); const utils_1 = __nccwpck_require__(5278); @@ -5277,7 +5285,7 @@ var ExitCode; * A code indicating that the action was a failure */ ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +})(ExitCode || (exports.ExitCode = ExitCode = {})); //----------------------------------------------------------------------- // Variables //----------------------------------------------------------------------- @@ -5288,13 +5296,13 @@ var ExitCode; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val)); } - command_1.issueCommand('set-env', { name }, convertedVal); + (0, command_1.issueCommand)('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; /** @@ -5302,7 +5310,7 @@ exports.exportVariable = exportVariable; * @param secret value of the secret */ function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); + (0, command_1.issueCommand)('add-mask', {}, secret); } exports.setSecret = setSecret; /** @@ -5312,10 +5320,10 @@ exports.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env['GITHUB_PATH'] || ''; if (filePath) { - file_command_1.issueFileCommand('PATH', inputPath); + (0, file_command_1.issueFileCommand)('PATH', inputPath); } else { - command_1.issueCommand('add-path', {}, inputPath); + (0, command_1.issueCommand)('add-path', {}, inputPath); } process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } @@ -5390,10 +5398,10 @@ exports.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env['GITHUB_OUTPUT'] || ''; if (filePath) { - return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value)); } process.stdout.write(os.EOL); - command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); + (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value)); } exports.setOutput = setOutput; /** @@ -5402,7 +5410,7 @@ exports.setOutput = setOutput; * */ function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); + (0, command_1.issue)('echo', enabled ? 'on' : 'off'); } exports.setCommandEcho = setCommandEcho; //----------------------------------------------------------------------- @@ -5433,7 +5441,7 @@ exports.isDebug = isDebug; * @param message debug message */ function debug(message) { - command_1.issueCommand('debug', {}, message); + (0, command_1.issueCommand)('debug', {}, message); } exports.debug = debug; /** @@ -5442,7 +5450,7 @@ exports.debug = debug; * @param properties optional properties to add to the annotation. */ function error(message, properties = {}) { - command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.error = error; /** @@ -5451,7 +5459,7 @@ exports.error = error; * @param properties optional properties to add to the annotation. */ function warning(message, properties = {}) { - command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning; /** @@ -5460,7 +5468,7 @@ exports.warning = warning; * @param properties optional properties to add to the annotation. */ function notice(message, properties = {}) { - command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.notice = notice; /** @@ -5479,14 +5487,14 @@ exports.info = info; * @param name The name of the output group */ function startGroup(name) { - command_1.issue('group', name); + (0, command_1.issue)('group', name); } exports.startGroup = startGroup; /** * End an output group. */ function endGroup() { - command_1.issue('endgroup'); + (0, command_1.issue)('endgroup'); } exports.endGroup = endGroup; /** @@ -5524,9 +5532,9 @@ exports.group = group; function saveState(name, value) { const filePath = process.env['GITHUB_STATE'] || ''; if (filePath) { - return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value)); } - command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); + (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value)); } exports.saveState = saveState; /** @@ -5562,6 +5570,10 @@ var path_utils_1 = __nccwpck_require__(2981); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +/** + * Platform utilities exports + */ +exports.platform = __importStar(__nccwpck_require__(85243)); //# sourceMappingURL=core.js.map /***/ }), @@ -5574,7 +5586,11 @@ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: funct // For internal use, subject to change. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5587,7 +5603,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5595,9 +5611,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ +const crypto = __importStar(__nccwpck_require__(6113)); const fs = __importStar(__nccwpck_require__(57147)); const os = __importStar(__nccwpck_require__(22037)); -const uuid_1 = __nccwpck_require__(78974); const utils_1 = __nccwpck_require__(5278); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -5607,14 +5623,14 @@ function issueFileCommand(command, message) { if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { encoding: 'utf8' }); } exports.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_1.toCommandValue(value); + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); // These should realistically never happen, but just in case someone finds a // way to exploit uuid generation let's not allow keys or values that contain // the delimiter. @@ -5699,9 +5715,9 @@ class OidcClient { const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } - core_1.debug(`ID token url is ${id_token_url}`); + (0, core_1.debug)(`ID token url is ${id_token_url}`); const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); + (0, core_1.setSecret)(id_token); return id_token; } catch (error) { @@ -5722,7 +5738,11 @@ exports.OidcClient = OidcClient; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5735,7 +5755,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5780,6 +5800,107 @@ exports.toPlatformPath = toPlatformPath; /***/ }), +/***/ 85243: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; +const os_1 = __importDefault(__nccwpck_require__(22037)); +const exec = __importStar(__nccwpck_require__(71514)); +const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; +}); +const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; + return { + name, + version + }; +}); +const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { + silent: true + }); + const [name, version] = stdout.trim().split('\n'); + return { + name, + version + }; +}); +exports.platform = os_1.default.platform(); +exports.arch = os_1.default.arch(); +exports.isWindows = exports.platform === 'win32'; +exports.isMacOS = exports.platform === 'darwin'; +exports.isLinux = exports.platform === 'linux'; +function getDetails() { + return __awaiter(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, (yield (exports.isWindows + ? getWindowsInfo() + : exports.isMacOS + ? getMacOsInfo() + : getLinuxInfo()))), { platform: exports.platform, + arch: exports.arch, + isWindows: exports.isWindows, + isMacOS: exports.isMacOS, + isLinux: exports.isLinux }); + }); +} +exports.getDetails = getDetails; +//# sourceMappingURL=platform.js.map + +/***/ }), + /***/ 81327: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -6117,773 +6238,127 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 78974: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(81595)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(26993)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(51472)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(16217)); - -var _nil = _interopRequireDefault(__nccwpck_require__(32381)); - -var _version = _interopRequireDefault(__nccwpck_require__(40427)); - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 5842: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 32381: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 26385: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 86230: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 9784: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 38844: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 61458: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 71514: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; })); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getExecOutput = exports.exec = void 0; +const string_decoder_1 = __nccwpck_require__(71576); +const tr = __importStar(__nccwpck_require__(88159)); /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + * Exec a command. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); +function exec(commandLine, args, options) { + return __awaiter(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + // Path to tool to execute should be first arg + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); } - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; +exports.exec = exec; +/** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ +function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + let stdout = ''; + let stderr = ''; + //Using string decoder covers the case where a mult-byte character is split + const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); + const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + //flush any remaining characters + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); } - -var _default = stringify; -exports["default"] = _default; +exports.getExecOutput = getExecOutput; +//# sourceMappingURL=exec.js.map /***/ }), -/***/ 81595: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 88159: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 26993: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(65920)); - -var _md = _interopRequireDefault(__nccwpck_require__(5842)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 65920: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 51472: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 16217: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(65920)); - -var _sha = _interopRequireDefault(__nccwpck_require__(38844)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 92609: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(86230)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 40427: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 71514: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(71576); -const tr = __importStar(__nccwpck_require__(88159)); -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec(commandLine, args, options) { - return __awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -exports.exec = exec; -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter(this, void 0, void 0, function* () { - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); - const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); -} -exports.getExecOutput = getExecOutput; -//# sourceMappingURL=exec.js.map - -/***/ }), - -/***/ 88159: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); @@ -7530,6 +7005,7 @@ class Context { this.action = process.env.GITHUB_ACTION; this.actor = process.env.GITHUB_ACTOR; this.job = process.env.GITHUB_JOB; + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; @@ -7796,7 +7272,7 @@ function hashFiles(patterns, currentWorkspace = '', options, verbose = false) { followSymbolicLinks = options.followSymbolicLinks; } const globber = yield create(patterns, { followSymbolicLinks }); - return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } exports.hashFiles = hashFiles; @@ -7811,7 +7287,11 @@ exports.hashFiles = hashFiles; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -7824,7 +7304,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -7839,7 +7319,8 @@ function getOptions(copy) { followSymbolicLinks: true, implicitDescendants: true, matchDirectories: true, - omitBrokenSymbolicLinks: true + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === 'boolean') { @@ -7858,6 +7339,10 @@ function getOptions(copy) { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === 'boolean') { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -7873,7 +7358,11 @@ exports.getOptions = getOptions; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -7886,7 +7375,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -7940,19 +7429,21 @@ class DefaultGlobber { return this.searchPaths.slice(); } glob() { - var e_1, _a; + var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } } @@ -8010,6 +7501,10 @@ class DefaultGlobber { if (!stats) { continue; } + // Hidden file or directory? + if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) { + continue; + } // Directory if (stats.isDirectory()) { // Matched @@ -8115,7 +7610,11 @@ exports.DefaultGlobber = DefaultGlobber; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8128,7 +7627,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8157,19 +7656,21 @@ const stream = __importStar(__nccwpck_require__(12781)); const util = __importStar(__nccwpck_require__(73837)); const path = __importStar(__nccwpck_require__(71017)); function hashFiles(globber, currentWorkspace, verbose = false) { - var e_1, _a; - var _b; + var _a, e_1, _b, _c; + var _d; return __awaiter(this, void 0, void 0, function* () { const writeDelegate = verbose ? core.info : core.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace - : (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); + : (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash('sha256'); let count = 0; try { - for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { - const file = _d.value; + for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; writeDelegate(file); if (!file.startsWith(`${githubWorkspace}${path.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); @@ -8192,7 +7693,7 @@ function hashFiles(globber, currentWorkspace, verbose = false) { catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); } finally { if (e_1) throw e_1.error; } } @@ -8232,7 +7733,7 @@ var MatchKind; MatchKind[MatchKind["File"] = 2] = "File"; /** Matched */ MatchKind[MatchKind["All"] = 3] = "All"; -})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); +})(MatchKind || (exports.MatchKind = MatchKind = {})); //# sourceMappingURL=internal-match-kind.js.map /***/ }), @@ -8244,7 +7745,11 @@ var MatchKind; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8257,7 +7762,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8307,8 +7812,8 @@ exports.dirname = dirname; * or `C:` are expanded based on the current working directory. */ function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); // Already rooted if (hasAbsoluteRoot(itemPath)) { return itemPath; @@ -8318,7 +7823,7 @@ function ensureAbsoluteRoot(root, itemPath) { // Check for itemPath like C: or C:foo if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); // Drive letter matches cwd? Expand to cwd if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { // Drive only, e.g. C: @@ -8343,11 +7848,11 @@ function ensureAbsoluteRoot(root, itemPath) { // Check for itemPath like \ or \foo else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); // Otherwise ensure root ends with a separator if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) { // Intentionally empty @@ -8364,7 +7869,7 @@ exports.ensureAbsoluteRoot = ensureAbsoluteRoot; * `\\hello\share` and `C:\hello` (and using alternate separator). */ function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); // Normalize separators itemPath = normalizeSeparators(itemPath); // Windows @@ -8381,7 +7886,7 @@ exports.hasAbsoluteRoot = hasAbsoluteRoot; * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). */ function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); // Normalize separators itemPath = normalizeSeparators(itemPath); // Windows @@ -8449,7 +7954,11 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8462,7 +7971,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8487,7 +7996,7 @@ class Path { this.segments = []; // String if (typeof itemPath === 'string') { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); // Normalize slashes and trim unnecessary trailing slash itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); // Not rooted @@ -8514,24 +8023,24 @@ class Path { // Array else { // Must not be empty - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); // Each segment for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; // Must not be empty - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); // Normalize slashes segment = pathHelper.normalizeSeparators(itemPath[i]); // Root segment if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } // All other segments else { // Must not contain slash - assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -8569,7 +8078,11 @@ exports.Path = Path; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8582,7 +8095,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8670,7 +8183,11 @@ exports.partialMatch = partialMatch; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8683,7 +8200,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8715,9 +8232,9 @@ class Pattern { else { // Convert to pattern segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -8811,13 +8328,13 @@ class Pattern { */ static fixupPattern(pattern, homedir) { // Empty - assert_1.default(pattern, 'pattern cannot be empty'); + (0, assert_1.default)(pattern, 'pattern cannot be empty'); // Must not contain `.` segment, unless first segment // Must not contain `..` segment const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); // Normalize slashes pattern = pathHelper.normalizeSeparators(pattern); // Replace leading `.` segment @@ -8827,8 +8344,8 @@ class Pattern { // Replace leading `~` segment else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) { homedir = homedir || os.homedir(); - assert_1.default(homedir, 'Unable to determine HOME directory'); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, 'Unable to determine HOME directory'); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = Pattern.globEscape(homedir) + pattern.substr(1); } // Replace relative drive root, e.g. pattern is C: or C:foo @@ -12835,27553 +12352,2409 @@ function coerce (version, options) { /***/ }), -/***/ 4654: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 46412: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * 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. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpProxyAgent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const tls = __importStar(__nccwpck_require__(24404)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const events_1 = __nccwpck_require__(82361); -const agent_base_1 = __nccwpck_require__(70694); -const url_1 = __nccwpck_require__(57310); -const debug = (0, debug_1.default)('http-proxy-agent'); -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. +exports.ResourceStream = exports.paginator = exports.Paginator = void 0; +/*! + * @module common/paginator */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpProxyAgent instance: %o', this.proxy.href); - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; +const arrify = __nccwpck_require__(61546); +const extend = __nccwpck_require__(38171); +const resource_stream_1 = __nccwpck_require__(72199); +Object.defineProperty(exports, "ResourceStream", ({ enumerable: true, get: function () { return resource_stream_1.ResourceStream; } })); +/*! Developer Documentation + * + * paginator is used to auto-paginate `nextQuery` methods as well as + * streamifying them. + * + * Before: + * + * search.query('done=true', function(err, results, nextQuery) { + * search.query(nextQuery, function(err, results, nextQuery) {}); + * }); + * + * After: + * + * search.query('done=true', function(err, results) {}); + * + * Methods to extend should be written to accept callbacks and return a + * `nextQuery`. + */ +class Paginator { + /** + * Cache the original method, then overwrite it on the Class's prototype. + * + * @param {function} Class - The parent class of the methods to extend. + * @param {string|string[]} methodNames - Name(s) of the methods to extend. + */ + // tslint:disable-next-line:variable-name + extend(Class, methodNames) { + methodNames = arrify(methodNames); + methodNames.forEach(methodName => { + const originalMethod = Class.prototype[methodName]; + // map the original method to a private member + Class.prototype[methodName + '_'] = originalMethod; + // overwrite the original to auto-paginate + /* eslint-disable @typescript-eslint/no-explicit-any */ + Class.prototype[methodName] = function (...args) { + const parsedArguments = paginator.parseArguments_(args); + return paginator.run_(parsedArguments, originalMethod.bind(this)); + }; + }); } - addRequest(req, opts) { - req._header = null; - this.setRequestProps(req, opts); - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - super.addRequest(req, opts); + /** + * Wraps paginated API calls in a readable object stream. + * + * This method simply calls the nextQuery recursively, emitting results to a + * stream. The stream ends when `nextQuery` is null. + * + * `maxResults` will act as a cap for how many results are fetched and emitted + * to the stream. + * + * @param {string} methodName - Name of the method to streamify. + * @return {function} - Wrapped function. + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ + streamify(methodName) { + return function ( + /* eslint-disable @typescript-eslint/no-explicit-any */ + ...args) { + const parsedArguments = paginator.parseArguments_(args); + const originalMethod = this[methodName + '_'] || this[methodName]; + return paginator.runAsStream_(parsedArguments, originalMethod.bind(this)); + }; } - setRequestProps(req, opts) { - const { proxy } = this; - const protocol = opts.secureEndpoint ? 'https:' : 'http:'; - const hostname = req.getHeader('host') || 'localhost'; - const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); - if (opts.port !== 80) { - url.port = String(opts.port); + /** + * Parse a pseudo-array `arguments` for a query and callback. + * + * @param {array} args - The original `arguments` pseduo-array that the original + * method received. + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ + parseArguments_(args) { + let query; + let autoPaginate = true; + let maxApiCalls = -1; + let maxResults = -1; + let callback; + const firstArgument = args[0]; + const lastArgument = args[args.length - 1]; + if (typeof firstArgument === 'function') { + callback = firstArgument; } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = String(url); - // Inject the `Proxy-Authorization` header if necessary. - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; + else { + query = firstArgument; } - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; + if (typeof lastArgument === 'function') { + callback = lastArgument; } - for (const name of Object.keys(headers)) { - const value = headers[name]; - if (value) { - req.setHeader(name, value); + if (typeof query === 'object') { + query = extend(true, {}, query); + // Check if the user only asked for a certain amount of results. + if (query.maxResults && typeof query.maxResults === 'number') { + // `maxResults` is used API-wide. + maxResults = query.maxResults; + } + else if (typeof query.pageSize === 'number') { + // `pageSize` is Pub/Sub's `maxResults`. + maxResults = query.pageSize; + } + if (query.maxApiCalls && typeof query.maxApiCalls === 'number') { + maxApiCalls = query.maxApiCalls; + delete query.maxApiCalls; + } + // maxResults is the user specified limit. + if (maxResults !== -1 || query.autoPaginate === false) { + autoPaginate = false; } } + const parsedArguments = { + query: query || {}, + autoPaginate, + maxApiCalls, + maxResults, + callback, + }; + parsedArguments.streamOptions = extend(true, {}, parsedArguments.query); + delete parsedArguments.streamOptions.autoPaginate; + delete parsedArguments.streamOptions.maxResults; + delete parsedArguments.streamOptions.pageSize; + return parsedArguments; } - async connect(req, opts) { - req._header = null; - if (!req.path.includes('://')) { - this.setRequestProps(req, opts); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._implicitHeader(); - if (req.outputData && req.outputData.length > 0) { - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - // Create a socket connection to the proxy server. - let socket; - if (this.proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - socket = tls.connect(this.connectOpts); + /** + * This simply checks to see if `autoPaginate` is set or not, if it's true + * then we buffer all results, otherwise simply call the original method. + * + * @param {array} parsedArguments - Parsed arguments from the original method + * call. + * @param {object=|string=} parsedArguments.query - Query object. This is most + * commonly an object, but to make the API more simple, it can also be a + * string in some places. + * @param {function=} parsedArguments.callback - Callback function. + * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. + * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. + * @param {number} parsedArguments.maxResults - Maximum results to return. + * @param {function} originalMethod - The cached method that accepts a callback + * and returns `nextQuery` to receive more results. + */ + run_(parsedArguments, originalMethod) { + const query = parsedArguments.query; + const callback = parsedArguments.callback; + if (!parsedArguments.autoPaginate) { + return originalMethod(query, callback); } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); + const results = new Array(); + let otherArgs = []; + const promise = new Promise((resolve, reject) => { + const stream = paginator.runAsStream_(parsedArguments, originalMethod); + stream + .on('error', reject) + .on('data', (data) => results.push(data)) + .on('end', () => { + otherArgs = stream._otherArgs || []; + resolve(results); + }); + }); + if (!callback) { + return promise.then(results => [results, query, ...otherArgs]); } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - await (0, events_1.once)(socket, 'connect'); - return socket; + promise.then(results => callback(null, results, query, ...otherArgs), (err) => callback(err)); } -} -HttpProxyAgent.protocols = ['http', 'https']; -exports.HttpProxyAgent = HttpProxyAgent; -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } + /** + * This method simply calls the nextQuery recursively, emitting results to a + * stream. The stream ends when `nextQuery` is null. + * + * `maxResults` will act as a cap for how many results are fetched and emitted + * to the stream. + * + * @param {object=|string=} parsedArguments.query - Query object. This is most + * commonly an object, but to make the API more simple, it can also be a + * string in some places. + * @param {function=} parsedArguments.callback - Callback function. + * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. + * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. + * @param {number} parsedArguments.maxResults - Maximum results to return. + * @param {function} originalMethod - The cached method that accepts a callback + * and returns `nextQuery` to receive more results. + * @return {stream} - Readable object stream. + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ + runAsStream_(parsedArguments, originalMethod) { + return new resource_stream_1.ResourceStream(parsedArguments, originalMethod); } - return ret; } +exports.Paginator = Paginator; +const paginator = new Paginator(); +exports.paginator = paginator; //# sourceMappingURL=index.js.map /***/ }), -/***/ 84100: +/***/ 72199: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - +/*! + * Copyright 2019 Google Inc. All Rights Reserved. + * + * 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. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); - -var coreRestPipeline = __nccwpck_require__(29146); -var tslib = __nccwpck_require__(4351); -var coreAuth = __nccwpck_require__(98834); -var coreUtil = __nccwpck_require__(80637); -var coreHttpCompat = __nccwpck_require__(25083); -var coreClient = __nccwpck_require__(7611); -var coreXml = __nccwpck_require__(17309); -var logger$1 = __nccwpck_require__(89497); -var abortController = __nccwpck_require__(1753); -var crypto = __nccwpck_require__(6113); -var coreTracing = __nccwpck_require__(19363); -var stream = __nccwpck_require__(12781); -var coreLro = __nccwpck_require__(90334); -var events = __nccwpck_require__(82361); -var fs = __nccwpck_require__(57147); -var util = __nccwpck_require__(73837); -var buffer = __nccwpck_require__(14300); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); +exports.ResourceStream = void 0; +const stream_1 = __nccwpck_require__(12781); +class ResourceStream extends stream_1.Transform { + constructor(args, requestFn) { + const options = Object.assign({ objectMode: true }, args.streamOptions); + super(options); + this._ended = false; + this._maxApiCalls = args.maxApiCalls === -1 ? Infinity : args.maxApiCalls; + this._nextQuery = args.query; + this._reading = false; + this._requestFn = requestFn; + this._requestsMade = 0; + this._resultsToSend = args.maxResults === -1 ? Infinity : args.maxResults; + this._otherArgs = []; + } + /* eslint-disable @typescript-eslint/no-explicit-any */ + end(...args) { + this._ended = true; + return super.end(...args); + } + _read() { + if (this._reading) { + return; + } + this._reading = true; + // Wrap in a try/catch to catch input linting errors, e.g. + // an invalid BigQuery query. These errors are thrown in an + // async fashion, which makes them un-catchable by the user. + try { + this._requestFn(this._nextQuery, (err, results, nextQuery, ...otherArgs) => { + if (err) { + this.destroy(err); + return; + } + this._otherArgs = otherArgs; + this._nextQuery = nextQuery; + if (this._resultsToSend !== Infinity) { + results = results.splice(0, this._resultsToSend); + this._resultsToSend -= results.length; + } + let more = true; + for (const result of results) { + if (this._ended) { + break; + } + more = this.push(result); + } + const isFinished = !this._nextQuery || this._resultsToSend < 1; + const madeMaxCalls = ++this._requestsMade >= this._maxApiCalls; + if (isFinished || madeMaxCalls) { + this.end(); + } + if (more && !this._ended) { + setImmediate(() => this._read()); + } + this._reading = false; + }); + } + catch (e) { + this.destroy(e); + } } - n.default = e; - return Object.freeze(n); } +exports.ResourceStream = ResourceStream; +//# sourceMappingURL=resource-stream.js.map -var coreHttpCompat__namespace = /*#__PURE__*/_interopNamespaceDefault(coreHttpCompat); -var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient); -var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs); -var util__namespace = /*#__PURE__*/_interopNamespaceDefault(util); +/***/ }), -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The `@azure/logger` configuration for this package. - */ -const logger = logger$1.createClientLogger("storage-blob"); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The base class from which all request policies derive. - */ -class BaseRequestPolicy { - /** - * The main method to implement that manipulates a request/response. - */ - constructor( - /** - * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline. - */ - _nextPolicy, - /** - * The options that can be passed to a given request policy. - */ - _options) { - this._nextPolicy = _nextPolicy; - this._options = _options; - } - /** - * Get whether or not a log with the provided log level should be logged. - * @param logLevel - The log level of the log that will be logged. - * @returns Whether or not a log with the provided log level should be logged. - */ - shouldLog(logLevel) { - return this._options.shouldLog(logLevel); - } - /** - * Attempt to log the provided message to the provided logger. If no logger was provided or if - * the log level does not meat the logger's threshold, then nothing will be logged. - * @param logLevel - The log level of this log. - * @param message - The message of this log. - */ - log(logLevel, message) { - this._options.log(logLevel, message); - } -} +/***/ 3497: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const SDK_VERSION = "12.27.0"; -const SERVICE_VERSION = "2025-05-05"; -const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB -const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB -const BLOCK_BLOB_MAX_BLOCKS = 50000; -const DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB -const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB -const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; -const REQUEST_TIMEOUT = 100 * 1000; // In ms -/** - * The OAuth scope to use with Azure Storage. - */ -const StorageOAuthScopes = "https://storage.azure.com/.default"; -const URLConstants = { - Parameters: { - FORCE_BROWSER_NO_CACHE: "_", - SNAPSHOT: "snapshot", - VERSIONID: "versionid", - TIMEOUT: "timeout", - }, -}; -const HTTPURLConnection = { - HTTP_ACCEPTED: 202}; -const HeaderConstants = { - AUTHORIZATION: "Authorization", - CONTENT_ENCODING: "Content-Encoding", - CONTENT_ID: "Content-ID", - CONTENT_LANGUAGE: "Content-Language", - CONTENT_LENGTH: "Content-Length", - CONTENT_MD5: "Content-Md5", - CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", - CONTENT_TYPE: "Content-Type", - COOKIE: "Cookie", - DATE: "date", - IF_MATCH: "if-match", - IF_MODIFIED_SINCE: "if-modified-since", - IF_NONE_MATCH: "if-none-match", - IF_UNMODIFIED_SINCE: "if-unmodified-since", - PREFIX_FOR_STORAGE: "x-ms-", - RANGE: "Range", - X_MS_DATE: "x-ms-date", - X_MS_ERROR_CODE: "x-ms-error-code", - X_MS_VERSION: "x-ms-version"}; -const ETagNone = ""; -const ETagAny = "*"; -const SIZE_1_MB = 1 * 1024 * 1024; -const BATCH_MAX_REQUEST = 256; -const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; -const HTTP_LINE_ENDING = "\r\n"; -const HTTP_VERSION_1_1 = "HTTP/1.1"; -const EncryptionAlgorithmAES25 = "AES256"; -const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; -const StorageBlobLoggingAllowedHeaderNames = [ - "Access-Control-Allow-Origin", - "Cache-Control", - "Content-Length", - "Content-Type", - "Date", - "Request-Id", - "traceparent", - "Transfer-Encoding", - "User-Agent", - "x-ms-client-request-id", - "x-ms-date", - "x-ms-error-code", - "x-ms-request-id", - "x-ms-return-client-request-id", - "x-ms-version", - "Accept-Ranges", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-MD5", - "Content-Range", - "ETag", - "Last-Modified", - "Server", - "Vary", - "x-ms-content-crc64", - "x-ms-copy-action", - "x-ms-copy-completion-time", - "x-ms-copy-id", - "x-ms-copy-progress", - "x-ms-copy-status", - "x-ms-has-immutability-policy", - "x-ms-has-legal-hold", - "x-ms-lease-state", - "x-ms-lease-status", - "x-ms-range", - "x-ms-request-server-encrypted", - "x-ms-server-encrypted", - "x-ms-snapshot", - "x-ms-source-range", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "x-ms-access-tier", - "x-ms-access-tier-change-time", - "x-ms-access-tier-inferred", - "x-ms-account-kind", - "x-ms-archive-status", - "x-ms-blob-append-offset", - "x-ms-blob-cache-control", - "x-ms-blob-committed-block-count", - "x-ms-blob-condition-appendpos", - "x-ms-blob-condition-maxsize", - "x-ms-blob-content-disposition", - "x-ms-blob-content-encoding", - "x-ms-blob-content-language", - "x-ms-blob-content-length", - "x-ms-blob-content-md5", - "x-ms-blob-content-type", - "x-ms-blob-public-access", - "x-ms-blob-sequence-number", - "x-ms-blob-type", - "x-ms-copy-destination-snapshot", - "x-ms-creation-time", - "x-ms-default-encryption-scope", - "x-ms-delete-snapshots", - "x-ms-delete-type-permanent", - "x-ms-deny-encryption-scope-override", - "x-ms-encryption-algorithm", - "x-ms-if-sequence-number-eq", - "x-ms-if-sequence-number-le", - "x-ms-if-sequence-number-lt", - "x-ms-incremental-copy", - "x-ms-lease-action", - "x-ms-lease-break-period", - "x-ms-lease-duration", - "x-ms-lease-id", - "x-ms-lease-time", - "x-ms-page-write", - "x-ms-proposed-lease-id", - "x-ms-range-get-content-md5", - "x-ms-rehydrate-priority", - "x-ms-sequence-number-action", - "x-ms-sku-name", - "x-ms-source-content-md5", - "x-ms-source-if-match", - "x-ms-source-if-modified-since", - "x-ms-source-if-none-match", - "x-ms-source-if-unmodified-since", - "x-ms-tag-count", - "x-ms-encryption-key-sha256", - "x-ms-copy-source-error-code", - "x-ms-copy-source-status-code", - "x-ms-if-tags", - "x-ms-source-if-tags", -]; -const StorageBlobLoggingAllowedQueryParameters = [ - "comp", - "maxresults", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "se", - "si", - "sip", - "sp", - "spr", - "sr", - "srt", - "ss", - "st", - "sv", - "include", - "marker", - "prefix", - "copyid", - "restype", - "blockid", - "blocklisttype", - "delimiter", - "prevsnapshot", - "ske", - "skoid", - "sks", - "skt", - "sktid", - "skv", - "snapshot", -]; -const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; -const BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; -/// List of ports used for path style addressing. -/// Path style addressing means that storage account is put in URI's Path segment in instead of in host. -const PathStylePorts = [ - "10000", - "10001", - "10002", - "10003", - "10004", - "10100", - "10101", - "10102", - "10103", - "10104", - "11000", - "11001", - "11002", - "11003", - "11004", - "11100", - "11101", - "11102", - "11103", - "11104", -]; +"use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MissingProjectIdError = exports.replaceProjectIdToken = void 0; +const stream_1 = __nccwpck_require__(12781); +// Copyright 2014 Google LLC +// +// 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. /** - * Reserved URL characters must be properly escaped for Storage services like Blob or File. - * - * ## URL encode and escape strategy for JS SDKs - * - * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. - * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL - * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. - * - * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. - * - * This is what legacy V2 SDK does, simple and works for most of the cases. - * - When customer URL string is "http://account.blob.core.windows.net/con/b:", - * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", - * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. - * - * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is - * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. - * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. - * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. - * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: - * - * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. - * - * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. - * - When customer URL string is "http://account.blob.core.windows.net/con/b:", - * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", - * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", - * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. - * - * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string - * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. - * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. - * And following URL strings are invalid: - * - "http://account.blob.core.windows.net/con/b%" - * - "http://account.blob.core.windows.net/con/b%2" - * - "http://account.blob.core.windows.net/con/b%G" - * - * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. - * - * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` - * - * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * Populate the `{{projectId}}` placeholder. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * @throws {Error} If a projectId is required, but one is not provided. * - * @param url - + * @param {*} - Any input value that may contain a placeholder. Arrays and objects will be looped. + * @param {string} projectId - A projectId. If not provided + * @return {*} - The original argument with all placeholders populated. */ -function escapeURLPath(url) { - const urlParsed = new URL(url); - let path = urlParsed.pathname; - path = path || "/"; - path = escape(path); - urlParsed.pathname = path; - return urlParsed.toString(); -} -function getProxyUriFromDevConnString(connectionString) { - // Development Connection String - // https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key - let proxyUri = ""; - if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { - // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri - const matchCredentials = connectionString.split(";"); - for (const element of matchCredentials) { - if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { - proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function replaceProjectIdToken(value, projectId) { + if (Array.isArray(value)) { + value = value.map(v => replaceProjectIdToken(v, projectId)); + } + if (value !== null && + typeof value === 'object' && + !(value instanceof Buffer) && + !(value instanceof stream_1.Stream) && + typeof value.hasOwnProperty === 'function') { + for (const opt in value) { + // eslint-disable-next-line no-prototype-builtins + if (value.hasOwnProperty(opt)) { + value[opt] = replaceProjectIdToken(value[opt], projectId); } } } - return proxyUri; -} -function getValueInConnString(connectionString, argument) { - const elements = connectionString.split(";"); - for (const element of elements) { - if (element.trim().startsWith(argument)) { - return element.trim().match(argument + "=(.*)")[1]; + if (typeof value === 'string' && + value.indexOf('{{projectId}}') > -1) { + if (!projectId || projectId === '{{projectId}}') { + throw new MissingProjectIdError(); } + value = value.replace(/{{projectId}}/g, projectId); } - return ""; + return value; } +exports.replaceProjectIdToken = replaceProjectIdToken; /** - * Extracts the parts of an Azure Storage account connection string. + * Custom error type for missing project ID errors. + */ +class MissingProjectIdError extends Error { + constructor() { + super(...arguments); + this.message = `Sorry, we cannot connect to Cloud Services without a project + ID. You may specify one with an environment variable named + "GOOGLE_CLOUD_PROJECT".`.replace(/ +/g, ' '); + } +} +exports.MissingProjectIdError = MissingProjectIdError; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 19203: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* eslint-disable prefer-rest-params */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.callbackifyAll = exports.callbackify = exports.promisifyAll = exports.promisify = void 0; +/** + * Wraps a callback style function to conditionally return a promise. * - * @param connectionString - Connection string. - * @returns String key value pairs of the storage account's url and credentials. + * @param {function} originalMethod - The method to promisify. + * @param {object=} options - Promise options. + * @param {boolean} options.singular - Resolve the promise with single arg instead of an array. + * @return {function} wrapped */ -function extractConnectionStringParts(connectionString) { - let proxyUri = ""; - if (connectionString.startsWith("UseDevelopmentStorage=true")) { - // Development connection string - proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; +function promisify(originalMethod, options) { + if (originalMethod.promisified_) { + return originalMethod; } - // Matching BlobEndpoint in the Account connection string - let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); - // Slicing off '/' at the end if exists - // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) - blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; - if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && - connectionString.search("AccountKey=") !== -1) { - // Account connection string - let defaultEndpointsProtocol = ""; - let accountName = ""; - let accountKey = Buffer.from("accountKey", "base64"); - let endpointSuffix = ""; - // Get account name and key - accountName = getValueInConnString(connectionString, "AccountName"); - accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); - if (!blobEndpoint) { - // BlobEndpoint is not present in the Account connection string - // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` - defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); - const protocol = defaultEndpointsProtocol.toLowerCase(); - if (protocol !== "https" && protocol !== "http") { - throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + options = options || {}; + const slice = Array.prototype.slice; + // tslint:disable-next-line:no-any + const wrapper = function () { + let last; + for (last = arguments.length - 1; last >= 0; last--) { + const arg = arguments[last]; + if (typeof arg === 'undefined') { + continue; // skip trailing undefined. } - endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); - if (!endpointSuffix) { - throw new Error("Invalid EndpointSuffix in the provided Connection String"); + if (typeof arg !== 'function') { + break; // non-callback last argument found. } - blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; - } - if (!accountName) { - throw new Error("Invalid AccountName in the provided Connection String"); - } - else if (accountKey.length === 0) { - throw new Error("Invalid AccountKey in the provided Connection String"); - } - return { - kind: "AccountConnString", - url: blobEndpoint, - accountName, - accountKey, - proxyUri, - }; - } - else { - // SAS connection string - let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); - let accountName = getValueInConnString(connectionString, "AccountName"); - // if accountName is empty, try to read it from BlobEndpoint - if (!accountName) { - accountName = getAccountNameFromUrl(blobEndpoint); - } - if (!blobEndpoint) { - throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); - } - else if (!accountSas) { - throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + return originalMethod.apply(this, arguments); } - // client constructors assume accountSas does *not* start with ? - if (accountSas.startsWith("?")) { - accountSas = accountSas.substring(1); + // peel trailing undefined. + const args = slice.call(arguments, 0, last + 1); + // tslint:disable-next-line:variable-name + let PromiseCtor = Promise; + // Because dedupe will likely create a single install of + // @google-cloud/common to be shared amongst all modules, we need to + // localize it at the Service level. + if (this && this.Promise) { + PromiseCtor = this.Promise; } - return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; - } -} -/** - * Internal escape method implemented Strategy Two mentioned in escapeURL() description. - * - * @param text - - */ -function escape(text) { - return encodeURIComponent(text) - .replace(/%2F/g, "/") // Don't escape for "/" - .replace(/'/g, "%27") // Escape for "'" - .replace(/\+/g, "%20") - .replace(/%25/g, "%"); // Revert encoded "%" + return new PromiseCtor((resolve, reject) => { + // tslint:disable-next-line:no-any + args.push((...args) => { + const callbackArgs = slice.call(args); + const err = callbackArgs.shift(); + if (err) { + return reject(err); + } + if (options.singular && callbackArgs.length === 1) { + resolve(callbackArgs[0]); + } + else { + resolve(callbackArgs); + } + }); + originalMethod.apply(this, args); + }); + }; + wrapper.promisified_ = true; + return wrapper; } +exports.promisify = promisify; /** - * Append a string to URL path. Will remove duplicated "/" in front of the string - * when URL path ends with a "/". + * Promisifies certain Class methods. This will not promisify private or + * streaming methods. * - * @param url - Source URL string - * @param name - String to be appended to URL - * @returns An updated URL string + * @param {module:common/service} Class - Service class. + * @param {object=} options - Configuration object. */ -function appendToURLPath(url, name) { - const urlParsed = new URL(url); - let path = urlParsed.pathname; - path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name; - urlParsed.pathname = path; - return urlParsed.toString(); -} -/** - * Set URL parameter name and value. If name exists in URL parameters, old value - * will be replaced by name key. If not provide value, the parameter will be deleted. - * - * @param url - Source URL string - * @param name - Parameter name - * @param value - Parameter value - * @returns An updated URL string - */ -function setURLParameter(url, name, value) { - const urlParsed = new URL(url); - const encodedName = encodeURIComponent(name); - const encodedValue = value ? encodeURIComponent(value) : undefined; - // mutating searchParams will change the encoding, so we have to do this ourselves - const searchString = urlParsed.search === "" ? "?" : urlParsed.search; - const searchPieces = []; - for (const pair of searchString.slice(1).split("&")) { - if (pair) { - const [key] = pair.split("=", 2); - if (key !== encodedName) { - searchPieces.push(pair); - } +// tslint:disable-next-line:variable-name +function promisifyAll(Class, options) { + const exclude = (options && options.exclude) || []; + const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); + const methods = ownPropertyNames.filter(methodName => { + // clang-format off + return (!exclude.includes(methodName) && + typeof Class.prototype[methodName] === 'function' && // is it a function? + !/(^_|(Stream|_)|promise$)|^constructor$/.test(methodName) // is it promisable? + ); + // clang-format on + }); + methods.forEach(methodName => { + const originalMethod = Class.prototype[methodName]; + if (!originalMethod.promisified_) { + Class.prototype[methodName] = exports.promisify(originalMethod, options); } - } - if (encodedValue) { - searchPieces.push(`${encodedName}=${encodedValue}`); - } - urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; - return urlParsed.toString(); -} -/** - * Get URL parameter by name. - * - * @param url - - * @param name - - */ -function getURLParameter(url, name) { - var _a; - const urlParsed = new URL(url); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : undefined; -} -/** - * Set URL host. - * - * @param url - Source URL string - * @param host - New host string - * @returns An updated URL string - */ -function setURLHost(url, host) { - const urlParsed = new URL(url); - urlParsed.hostname = host; - return urlParsed.toString(); + }); } +exports.promisifyAll = promisifyAll; /** - * Get URL path from an URL string. + * Wraps a promisy type function to conditionally call a callback function. * - * @param url - Source URL string + * @param {function} originalMethod - The method to callbackify. + * @param {object=} options - Callback options. + * @param {boolean} options.singular - Pass to the callback a single arg instead of an array. + * @return {function} wrapped */ -function getURLPath(url) { - try { - const urlParsed = new URL(url); - return urlParsed.pathname; - } - catch (e) { - return undefined; +function callbackify(originalMethod) { + if (originalMethod.callbackified_) { + return originalMethod; } + // tslint:disable-next-line:no-any + const wrapper = function () { + if (typeof arguments[arguments.length - 1] !== 'function') { + return originalMethod.apply(this, arguments); + } + const cb = Array.prototype.pop.call(arguments); + originalMethod.apply(this, arguments).then( + // tslint:disable-next-line:no-any + (res) => { + res = Array.isArray(res) ? res : [res]; + cb(null, ...res); + }, (err) => cb(err)); + }; + wrapper.callbackified_ = true; + return wrapper; } +exports.callbackify = callbackify; /** - * Get URL scheme from an URL string. + * Callbackifies certain Class methods. This will not callbackify private or + * streaming methods. * - * @param url - Source URL string + * @param {module:common/service} Class - Service class. + * @param {object=} options - Configuration object. */ -function getURLScheme(url) { - try { - const urlParsed = new URL(url); - return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; - } - catch (e) { - return undefined; - } +function callbackifyAll( +// tslint:disable-next-line:variable-name +Class, options) { + const exclude = (options && options.exclude) || []; + const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); + const methods = ownPropertyNames.filter(methodName => { + // clang-format off + return (!exclude.includes(methodName) && + typeof Class.prototype[methodName] === 'function' && // is it a function? + !/^_|(Stream|_)|^constructor$/.test(methodName) // is it callbackifyable? + ); + // clang-format on + }); + methods.forEach(methodName => { + const originalMethod = Class.prototype[methodName]; + if (!originalMethod.callbackified_) { + Class.prototype[methodName] = exports.callbackify(originalMethod); + } + }); } -/** - * Get URL path and query from an URL string. - * - * @param url - Source URL string - */ -function getURLPathAndQuery(url) { - const urlParsed = new URL(url); - const pathString = urlParsed.pathname; - if (!pathString) { - throw new RangeError("Invalid url without valid path."); - } - let queryString = urlParsed.search || ""; - queryString = queryString.trim(); - if (queryString !== "") { - queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?' - } - return `${pathString}${queryString}`; +exports.callbackifyAll = callbackifyAll; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 44458: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); + +var _v = _interopRequireDefault(__nccwpck_require__(33542)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(29411)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(83424)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(64051)); + +var _nil = _interopRequireDefault(__nccwpck_require__(46570)); + +var _version = _interopRequireDefault(__nccwpck_require__(35611)); + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +var _parse = _interopRequireDefault(__nccwpck_require__(99645)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ 84953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); } -/** - * Get URL query key value pairs from an URL string. - * - * @param url - - */ -function getURLQueries(url) { - let queryString = new URL(url).search; - if (!queryString) { - return {}; - } - queryString = queryString.trim(); - queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; - let querySubStrings = queryString.split("&"); - querySubStrings = querySubStrings.filter((value) => { - const indexOfEqual = value.indexOf("="); - const lastIndexOfEqual = value.lastIndexOf("="); - return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); - }); - const queries = {}; - for (const querySubString of querySubStrings) { - const splitResults = querySubString.split("="); - const key = splitResults[0]; - const value = splitResults[1]; - queries[key] = value; - } - return queries; + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +/***/ 46570: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 99645: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; } -/** - * Append a string to URL query. - * - * @param url - Source URL string. - * @param queryParts - String to be appended to the URL query. - * @returns An updated URL string. - */ -function appendToURLQuery(url, queryParts) { - const urlParsed = new URL(url); - let query = urlParsed.search; - if (query) { - query += "&" + queryParts; - } - else { - query = queryParts; - } - urlParsed.search = query; - return urlParsed.toString(); + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 94323: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 91430: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); } -/** - * Rounds a date off to seconds. - * - * @param date - - * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; - * If false, YYYY-MM-DDThh:mm:ssZ will be returned. - * @returns Date string in ISO8061 format, with or without 7 milliseconds component - */ -function truncatedISO8061Date(date, withMilliseconds = true) { - // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" - const dateString = date.toISOString(); - return withMilliseconds - ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" - : dateString.substring(0, dateString.length - 5) + "Z"; + +/***/ }), + +/***/ 77416: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); } + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +/***/ 32122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + /** - * Base64 encode. - * - * @param content - + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ -function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); } -/** - * Generate a 64 bytes base64 block ID string. - * - * @param blockIndex - - */ -function generateBlockID(blockIDPrefix, blockIndex) { - // To generate a 64 bytes base64 string, source string should be 48 - const maxSourceStringLength = 48; - // A blob can have a maximum of 100,000 uncommitted blocks at any given time - const maxBlockIndexLength = 6; - const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; - if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { - blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); - } - const res = blockIDPrefix + - padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); - return base64encode(res); -} -/** - * Delay specified time interval. - * - * @param timeInMs - - * @param aborter - - * @param abortError - - */ -async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve, reject) => { - /* eslint-disable-next-line prefer-const */ - let timeout; - const abortHandler = () => { - if (timeout !== undefined) { - clearTimeout(timeout); - } - reject(abortError); - }; - const resolveHandler = () => { - if (aborter !== undefined) { - aborter.removeEventListener("abort", abortHandler); - } - resolve(); - }; - timeout = setTimeout(resolveHandler, timeInMs); - if (aborter !== undefined) { - aborter.addEventListener("abort", abortHandler); - } - }); + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; } -/** - * String.prototype.padStart() - * - * @param currentString - - * @param targetLength - - * @param padString - - */ -function padStart(currentString, targetLength, padString = " ") { - // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes - if (String.prototype.padStart) { - return currentString.padStart(targetLength, padString); - } - padString = padString || " "; - if (currentString.length > targetLength) { - return currentString; + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 33542: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(91430)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } - else { - targetLength = targetLength - currentString.length; - if (targetLength > padString.length) { - padString += padString.repeat(targetLength / padString.length); - } - return padString.slice(0, targetLength) + currentString; + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); } -/** - * If two strings are equal when compared case insensitive. - * - * @param str1 - - * @param str2 - - */ -function iEqual(str1, str2) { - return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 29411: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(74624)); + +var _md = _interopRequireDefault(__nccwpck_require__(84953)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 74624: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +var _parse = _interopRequireDefault(__nccwpck_require__(99645)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; } -/** - * Extracts account name from the url - * @param url - url to extract the account name from - * @returns with the account name - */ -function getAccountNameFromUrl(url) { - const parsedUrl = new URL(url); - let accountName; - try { - if (parsedUrl.hostname.split(".")[1] === "blob") { - // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; - accountName = parsedUrl.hostname.split(".")[0]; - } - else if (isIpEndpointStyle(parsedUrl)) { - // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ - // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ - // .getPath() -> /devstoreaccount1/ - accountName = parsedUrl.pathname.split("/")[1]; - } - else { - // Custom domain case: "https://customdomain.com/containername/blob". - accountName = ""; - } - return accountName; - } - catch (error) { - throw new Error("Unable to extract accountName with provided information."); + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); } -} -function isIpEndpointStyle(parsedUrl) { - const host = parsedUrl.host; - // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. - // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part. - // Case 3: Ipv4, use broad regex which just check if host contains Ipv4. - // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html. - return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || - (Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port))); -} -/** - * Convert Tags to encoded string. - * - * @param tags - - */ -function toBlobTagsString(tags) { - if (tags === undefined) { - return undefined; + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); } - const tagPairs = []; - for (const key in tags) { - if (Object.prototype.hasOwnProperty.call(tags, key)) { - const value = tags[key]; - tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); - } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; } - return tagPairs.join("&"); + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; } -/** - * Convert Tags type to BlobTags. - * - * @param tags - - */ -function toBlobTags(tags) { - if (tags === undefined) { - return undefined; - } - const res = { - blobTagSet: [], - }; - for (const key in tags) { - if (Object.prototype.hasOwnProperty.call(tags, key)) { - const value = tags[key]; - res.blobTagSet.push({ - key, - value, - }); - } + +/***/ }), + +/***/ 83424: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(91430)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } - return res; + + return buf; + } + + return (0, _stringify.default)(rnds); } -/** - * Covert BlobTags to Tags type. - * - * @param tags - - */ -function toTags(tags) { - if (tags === undefined) { - return undefined; - } - const res = {}; - for (const blobTag of tags.blobTagSet) { - res[blobTag.key] = blobTag.value; - } - return res; + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +/***/ 64051: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(74624)); + +var _sha = _interopRequireDefault(__nccwpck_require__(77416)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +/***/ 20937: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(94323)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); } -/** - * Convert BlobQueryTextConfiguration to QuerySerialization type. - * - * @param textConfiguration - - */ -function toQuerySerialization(textConfiguration) { - if (textConfiguration === undefined) { - return undefined; - } - switch (textConfiguration.kind) { - case "csv": - return { - format: { - type: "delimited", - delimitedTextConfiguration: { - columnSeparator: textConfiguration.columnSeparator || ",", - fieldQuote: textConfiguration.fieldQuote || "", - recordSeparator: textConfiguration.recordSeparator, - escapeChar: textConfiguration.escapeCharacter || "", - headersPresent: textConfiguration.hasHeaders || false, - }, - }, - }; - case "json": - return { - format: { - type: "json", - jsonTextConfiguration: { - recordSeparator: textConfiguration.recordSeparator, - }, - }, - }; - case "arrow": - return { - format: { - type: "arrow", - arrowConfiguration: { - schema: textConfiguration.schema, - }, - }, - }; - case "parquet": - return { - format: { - type: "parquet", - }, - }; - default: - throw Error("Invalid BlobQueryTextConfiguration."); - } -} -function parseObjectReplicationRecord(objectReplicationRecord) { - if (!objectReplicationRecord) { - return undefined; - } - if ("policy-id" in objectReplicationRecord) { - // If the dictionary contains a key with policy id, we are not required to do any parsing since - // the policy id should already be stored in the ObjectReplicationDestinationPolicyId. - return undefined; - } - const orProperties = []; - for (const key in objectReplicationRecord) { - const ids = key.split("_"); - const policyPrefix = "or-"; - if (ids[0].startsWith(policyPrefix)) { - ids[0] = ids[0].substring(policyPrefix.length); - } - const rule = { - ruleId: ids[1], - replicationStatus: objectReplicationRecord[key], - }; - const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); - if (policyIndex > -1) { - orProperties[policyIndex].rules.push(rule); - } - else { - orProperties.push({ - policyId: ids[0], - rules: [rule], - }); - } - } - return orProperties; + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 35611: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); } -function httpAuthorizationToString(httpAuthorization) { - return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; + +var _default = version; +exports["default"] = _default; + +/***/ }), + +/***/ 40334: +/***/ ((module) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + createTokenAuth: () => createTokenAuth +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/auth.js +var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +var REGEX_IS_INSTALLATION = /^ghs_/; +var REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; } -function BlobNameToString(name) { - if (name.encoded) { - return decodeURIComponent(name.content); - } - else { - return name.content; - } + +// pkg/dist-src/with-authorization-prefix.js +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; } -function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }), - } }); + +// pkg/dist-src/hook.js +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); } -function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }), - } }); + +// pkg/dist-src/index.js +var createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 76762: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var index_exports = {}; +__export(index_exports, { + Octokit: () => Octokit +}); +module.exports = __toCommonJS(index_exports); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_before_after_hook = __nccwpck_require__(83682); +var import_request = __nccwpck_require__(36234); +var import_graphql = __nccwpck_require__(88467); +var import_auth_token = __nccwpck_require__(40334); + +// pkg/dist-src/version.js +var VERSION = "5.2.2"; + +// pkg/dist-src/index.js +var noop = () => { +}; +var consoleWarn = console.warn.bind(console); +var consoleError = console.error.bind(console); +function createLogger(logger = {}) { + if (typeof logger.debug !== "function") { + logger.debug = noop; + } + if (typeof logger.info !== "function") { + logger.info = noop; + } + if (typeof logger.warn !== "function") { + logger.warn = consoleWarn; + } + if (typeof logger.error !== "function") { + logger.error = consoleError; + } + return logger; } -function* ExtractPageRangeInfoItems(getPageRangesSegment) { - let pageRange = []; - let clearRange = []; - if (getPageRangesSegment.pageRange) - pageRange = getPageRangesSegment.pageRange; - if (getPageRangesSegment.clearRange) - clearRange = getPageRangesSegment.clearRange; - let pageRangeIndex = 0; - let clearRangeIndex = 0; - while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) { - if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { - yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false, - }; - ++pageRangeIndex; - } - else { - yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true, - }; - ++clearRangeIndex; +var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var Octokit = class { + static { + this.VERSION = VERSION; + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; } + super( + Object.assign( + {}, + defaults, + options, + options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; + } + static { + this.plugins = []; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; + return NewOctokit; + } + constructor(options = {}) { + const hook = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; } - for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) { - yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false, - }; + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; } - for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) { - yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true, - }; + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = import_request.request.defaults(requestDefaults); + this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); + this.log = createLogger(options.log); + this.hook = hook; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth = (0, import_auth_token.createTokenAuth)(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); } + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 59440: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + endpoint: () => endpoint +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "9.0.6"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + +// pkg/dist-src/util/lowercase-keys.js +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); } -/** - * Escape the blobName but keep path separator ('/'). - */ -function EscapePath(blobName) { - const split = blobName.split("/"); - for (let i = 0; i < split.length; i++) { - split[i] = encodeURIComponent(split[i]); + +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/util/merge-deep.js +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); } - return split.join("/"); + }); + return result; } -/** - * A typesafe helper for ensuring that a given response object has - * the original _response attached. - * @param response - A response object from calling a client operation - * @returns The same object, but with known _response property - */ -function assertResponse(response) { - if (`_response` in response) { - return response; + +// pkg/dist-src/util/remove-undefined-properties.js +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; } - throw new TypeError(`Unexpected response object ${response}`); + } + return obj; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * RetryPolicy types. - */ -exports.StorageRetryPolicyType = void 0; -(function (StorageRetryPolicyType) { - /** - * Exponential retry. Retry time delay grows exponentially. - */ - StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - /** - * Linear retry. Retry time delay grows linearly. - */ - StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; -})(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {})); -// Default values of StorageRetryOptions -const DEFAULT_RETRY_OPTIONS$1 = { - maxRetryDelayInMs: 120 * 1000, - maxTries: 4, - retryDelayInMs: 4 * 1000, - retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL, - secondaryHost: "", - tryTimeoutInMs: undefined, // Use server side default timeout strategy -}; -const RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); -/** - * Retry policy with exponential retry and linear retry implemented. - */ -class StorageRetryPolicy extends BaseRequestPolicy { - /** - * Creates an instance of RetryPolicy. - * - * @param nextPolicy - - * @param options - - * @param retryOptions - - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { - super(nextPolicy, options); - // Initialize retry options - this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType - ? retryOptions.retryPolicyType - : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 - ? Math.floor(retryOptions.maxTries) - : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 - ? retryOptions.tryTimeoutInMs - : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 - ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs - ? retryOptions.maxRetryDelayInMs - : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) - : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 - ? retryOptions.maxRetryDelayInMs - : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost - ? retryOptions.secondaryHost - : DEFAULT_RETRY_OPTIONS$1.secondaryHost, - }; +// pkg/dist-src/merge.js +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); } - /** - * Sends request. - * - * @param request - - */ - async sendRequest(request) { - return this.attemptSendRequest(request, false, 1); + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; +} + +// pkg/dist-src/util/add-query-parameters.js +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } - /** - * Decide and perform next retry. Won't mutate request parameter. - * - * @param request - - * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then - * the resource was not found. This may be due to replication delay. So, in this - * case, we'll never try the secondary again for this operation. - * @param attempt - How many retries has been attempted to performed, starting from 1, which includes - * the attempt will be performed by this method call. - */ - async attemptSendRequest(request, secondaryHas404, attempt) { - const newRequest = request.clone(); - const isPrimaryRetry = secondaryHas404 || - !this.retryOptions.secondaryHost || - !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || - attempt % 2 === 1; - if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); - } - // Set the server-side timeout query parameter "timeout=[seconds]" - if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); - } - let response; - try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); - response = await this._nextPolicy.sendRequest(newRequest); - if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { - return response; - } - secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); - } - catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); - if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { - throw err; - } - } - await this.delay(isPrimaryRetry, attempt, request.abortSignal); - return this.attemptSendRequest(request, secondaryHas404, ++attempt); + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^{}}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); +} + +// pkg/dist-src/util/omit.js +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; } - /** - * Decide whether to retry according to last HTTP response and retry counters. - * - * @param isPrimaryRetry - - * @param attempt - - * @param response - - * @param err - - */ - shouldRetry(isPrimaryRetry, attempt, response, err) { - if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions - .maxTries}, no further try.`); - return false; - } - // Handle network failures, you may need to customize the list when you implement - // your own http client - const retriableErrors = [ - "ETIMEDOUT", - "ESOCKETTIMEDOUT", - "ECONNREFUSED", - "ECONNRESET", - "ENOENT", - "ENOTFOUND", - "TIMEOUT", - "EPIPE", - "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js - ]; - if (err) { - for (const retriableError of retriableErrors) { - if (err.name.toUpperCase().includes(retriableError) || - err.message.toUpperCase().includes(retriableError) || - (err.code && err.code.toString().toUpperCase() === retriableError)) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); - return true; - } + } + return result; +} + +// pkg/dist-src/util/url-template.js +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); } + }); } - // If attempt was against the secondary & it returned a StatusNotFound (404), then - // the resource was not found. This may be due to replication delay. So, in this - // case, we'll never try the secondary again for this operation. - if (response || err) { - const statusCode = response ? response.status : err ? err.statusCode : 0; - if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); - return true; - } - // Server internal error or server timeout - if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); - return true; + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); } + }); } - // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. - // if (response) { - // // Retry select Copy Source Error Codes. - // if (response?.status >= 400) { - // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); - // if (copySourceError !== undefined) { - // switch (copySourceError) { - // case "InternalError": - // case "OperationTimedOut": - // case "ServerBusy": - // return true; - // } - // } - // } - // } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); - return true; + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); } - return false; + } } - /** - * Delay a calculated time between retries. - * - * @param isPrimaryRetry - - * @param attempt - - * @param abortSignal - - */ - async delay(isPrimaryRetry, attempt, abortSignal) { - let delayTimeInMs = 0; - if (isPrimaryRetry) { - switch (this.retryOptions.retryPolicyType) { - case exports.StorageRetryPolicyType.EXPONENTIAL: - delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); - break; - case exports.StorageRetryPolicyType.FIXED: - delayTimeInMs = this.retryOptions.retryDelayInMs; - break; - } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); } - else { - delayTimeInMs = Math.random() * 1000; + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); + } else { + return encodeReserved(literal); + } } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. - */ -class StorageRetryPolicyFactory { - /** - * Creates an instance of StorageRetryPolicyFactory. - * @param retryOptions - - */ - constructor(retryOptions) { - this.retryOptions = retryOptions; - } - /** - * Creates a StorageRetryPolicy object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); +// pkg/dist-src/parse.js +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Credential policy used to sign HTTP(S) requests before sending. This is an - * abstract class. - */ -class CredentialPolicy extends BaseRequestPolicy { - /** - * Sends out request. - * - * @param request - - */ - sendRequest(request) { - return this._nextPolicy.sendRequest(this.signRequest(request)); + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/(? { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } } - /** - * Child classes must implement this method with request signing. This method - * will be executed in {@link sendRequest}. - * - * @param request - - */ - signRequest(request) { - // Child classes must override this method with request signing. This method - // will be executed in sendRequest(). - return request; + } + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/* - * We need to imitate .Net culture-aware sorting, which is used in storage service. - * Below tables contain sort-keys for en-US culture. - */ -const table_lv0 = new Uint32Array([ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721, - 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e, - 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a, - 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89, - 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748, - 0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, - 0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c, - 0x0, 0x750, 0x0, -]); -const table_lv2 = new Uint32Array([ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, - 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, - 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, -]); -const table_lv4 = new Uint32Array([ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, -]); -function compareHeader(lhs, rhs) { - if (isLessThan(lhs, rhs)) - return -1; - return 1; +// pkg/dist-src/endpoint-with-defaults.js +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); } -function isLessThan(lhs, rhs) { - const tables = [table_lv0, table_lv2, table_lv4]; - let curr_level = 0; - let i = 0; - let j = 0; - while (curr_level < tables.length) { - if (curr_level === tables.length - 1 && i !== j) { - return i > j; - } - const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1; - const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1; - if (weight1 === 0x1 && weight2 === 0x1) { - i = 0; - j = 0; - ++curr_level; - } - else if (weight1 === weight2) { - ++i; - ++j; - } - else if (weight1 === 0) { - ++i; - } - else if (weight2 === 0) { - ++j; - } - else { - return weight1 < weight2; - } - } - return false; + +// pkg/dist-src/with-defaults.js +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. - */ -class StorageSharedKeyCredentialPolicy extends CredentialPolicy { - /** - * Creates an instance of StorageSharedKeyCredentialPolicy. - * @param nextPolicy - - * @param options - - * @param factory - - */ - constructor(nextPolicy, options, factory) { - super(nextPolicy, options); - this.factory = factory; - } - /** - * Signs request. - * - * @param request - - */ - signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); - if (request.body && - (typeof request.body === "string" || request.body !== undefined) && - request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); - } - const stringToSign = [ - request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE), - ].join("\n") + - "\n" + - this.getCanonicalizedHeadersString(request) + - this.getCanonicalizedResourceString(request); - const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); - // console.log(`[URL]:${request.url}`); - // console.log(`[HEADERS]:${request.headers.toString()}`); - // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); - // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); - return request; - } - /** - * Retrieve header value according to shared key sign rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - * - * @param request - - * @param headerName - - */ - getHeaderValueToSign(request, headerName) { - const value = request.headers.get(headerName); - if (!value) { - return ""; - } - // When using version 2015-02-21 or later, if Content-Length is zero, then - // set the Content-Length part of the StringToSign to an empty string. - // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { - return ""; - } - return value; - } - /** - * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: - * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. - * 2. Convert each HTTP header name to lowercase. - * 3. Sort the headers lexicographically by header name, in ascending order. - * Each header may appear only once in the string. - * 4. Replace any linear whitespace in the header value with a single space. - * 5. Trim any whitespace around the colon in the header. - * 6. Finally, append a new-line character to each canonicalized header in the resulting list. - * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. - * - * @param request - - */ - getCanonicalizedHeadersString(request) { - let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); - }); - headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); - }); - // Remove duplicate headers - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { - return false; - } - return true; - }); - let canonicalizedHeadersStringToSign = ""; - headersArray.forEach((header) => { - canonicalizedHeadersStringToSign += `${header.name - .toLowerCase() - .trimRight()}:${header.value.trimLeft()}\n`; - }); - return canonicalizedHeadersStringToSign; - } - /** - * Retrieves the webResource canonicalized resource string. - * - * @param request - - */ - getCanonicalizedResourceString(request) { - const path = getURLPath(request.url) || "/"; - let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path}`; - const queries = getURLQueries(request.url); - const lowercaseQueries = {}; - if (queries) { - const queryKeys = []; - for (const key in queries) { - if (Object.prototype.hasOwnProperty.call(queries, key)) { - const lowercaseKey = key.toLowerCase(); - lowercaseQueries[lowercaseKey] = queries[key]; - queryKeys.push(lowercaseKey); - } - } - queryKeys.sort(); - for (const key of queryKeys) { - canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; - } - } - return canonicalizedResourceString; - } -} +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Credential is an abstract class for Azure Storage HTTP requests signing. This - * class will host an credentialPolicyCreator factory which generates CredentialPolicy. - */ -class Credential { - /** - * Creates a RequestPolicy object. - * - * @param _nextPolicy - - * @param _options - - */ - create(_nextPolicy, _options) { - throw new Error("Method should be implemented in children classes."); - } + +/***/ }), + +/***/ 88467: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var index_exports = {}; +__export(index_exports, { + GraphqlResponseError: () => GraphqlResponseError, + graphql: () => graphql2, + withCustomRequest: () => withCustomRequest +}); +module.exports = __toCommonJS(index_exports); +var import_request3 = __nccwpck_require__(36234); +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "7.1.1"; + +// pkg/dist-src/with-defaults.js +var import_request2 = __nccwpck_require__(36234); + +// pkg/dist-src/graphql.js +var import_request = __nccwpck_require__(36234); + +// pkg/dist-src/error.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); } +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +}; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * StorageSharedKeyCredential for account key authorization of Azure Storage service. - */ -class StorageSharedKeyCredential extends Credential { - /** - * Creates an instance of StorageSharedKeyCredential. - * @param accountName - - * @param accountKey - - */ - constructor(accountName, accountKey) { - super(); - this.accountName = accountName; - this.accountKey = Buffer.from(accountKey, "base64"); +// pkg/dist-src/graphql.js +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); } - /** - * Creates a StorageSharedKeyCredentialPolicy object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); } - /** - * Generates a hash signature for an HTTP request or for a SAS. - * - * @param stringToSign - - */ - computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources - * or for use with Shared Access Signatures (SAS). - */ -class AnonymousCredentialPolicy extends CredentialPolicy { - /** - * Creates an instance of AnonymousCredentialPolicy. - * @param nextPolicy - - * @param options - - */ - // The base class has a protected constructor. Adding a public one to enable constructing of this class. - /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ - constructor(nextPolicy, options) { - super(nextPolicy, options); + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); } + return response.data.data; + }); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * AnonymousCredential provides a credentialPolicyCreator member used to create - * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with - * HTTP(S) requests that read public resources or for use with Shared Access - * Signatures (SAS). - */ -class AnonymousCredential extends Credential { - /** - * Creates an {@link AnonymousCredentialPolicy} object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); - } +// pkg/dist-src/with-defaults.js +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -let _defaultHttpClient; -function getCachedDefaultHttpClient() { - if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); - } - return _defaultHttpClient; +// pkg/dist-src/index.js +var graphql2 = withDefaults(import_request3.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); } +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The programmatic identifier of the StorageBrowserPolicy. - */ -const storageBrowserPolicyName = "storageBrowserPolicy"; -/** - * storageBrowserPolicy is a policy used to prevent browsers from caching requests - * and to remove cookies and explicit content-length headers. - */ -function storageBrowserPolicy() { + +/***/ }), + +/***/ 64193: +/***/ ((module) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + composePaginateRest: () => composePaginateRest, + isPaginatingEndpoint: () => isPaginatingEndpoint, + paginateRest: () => paginateRest, + paginatingEndpoints: () => paginatingEndpoints +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "9.2.2"; + +// pkg/dist-src/normalize-paginated-list-response.js +function normalizePaginatedListResponse(response) { + if (!response.data) { return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - // According to XHR standards, content-length should be fully controlled by browsers - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - }, + ...response, + data: [] }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) + return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Name of the {@link storageRetryPolicy} - */ -const storageRetryPolicyName = "storageRetryPolicy"; -/** - * RetryPolicy types. - */ -var StorageRetryPolicyType; -(function (StorageRetryPolicyType) { - /** - * Exponential retry. Retry time delay grows exponentially. - */ - StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - /** - * Linear retry. Retry time delay grows linearly. - */ - StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; -})(StorageRetryPolicyType || (StorageRetryPolicyType = {})); -// Default values of StorageRetryOptions -const DEFAULT_RETRY_OPTIONS = { - maxRetryDelayInMs: 120 * 1000, - maxTries: 4, - retryDelayInMs: 4 * 1000, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, - secondaryHost: "", - tryTimeoutInMs: undefined, // Use server side default timeout strategy -}; -const retriableErrors = [ - "ETIMEDOUT", - "ESOCKETTIMEDOUT", - "ECONNREFUSED", - "ECONNRESET", - "ENOENT", - "ENOTFOUND", - "TIMEOUT", - "EPIPE", - "REQUEST_SEND_ERROR", -]; -const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); -/** - * Retry policy with exponential retry and linear retry implemented. - */ -function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; - function shouldRetry({ isPrimaryRetry, attempt, response, error, }) { - var _a, _b; - if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); - return false; - } - if (error) { - for (const retriableError of retriableErrors) { - if (error.name.toUpperCase().includes(retriableError) || - error.message.toUpperCase().includes(retriableError) || - (error.code && error.code.toString().toUpperCase() === retriableError)) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); - return true; - } - } - if ((error === null || error === void 0 ? void 0 : error.code) === "PARSE_ERROR" && - (error === null || error === void 0 ? void 0 : error.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); - return true; - } - } - // If attempt was against the secondary & it returned a StatusNotFound (404), then - // the resource was not found. This may be due to replication delay. So, in this - // case, we'll never try the secondary again for this operation. - if (response || error) { - const statusCode = (_b = (_a = response === null || response === void 0 ? void 0 : response.status) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.statusCode) !== null && _b !== void 0 ? _b : 0; - if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); - return true; - } - // Server internal error or server timeout - if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); - return true; +// pkg/dist-src/iterator.js +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^<>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] } + }; } - // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. - // if (response) { - // // Retry select Copy Source Error Codes. - // if (response?.status >= 400) { - // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); - // if (copySourceError !== undefined) { - // switch (copySourceError) { - // case "InternalError": - // case "OperationTimedOut": - // case "ServerBusy": - // return true; - // } - // } - // } - // } - return false; - } - function calculateDelay(isPrimaryRetry, attempt) { - let delayTimeInMs = 0; - if (isPrimaryRetry) { - switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: - delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); - break; - case StorageRetryPolicyType.FIXED: - delayTimeInMs = retryDelayInMs; - break; - } - } - else { - delayTimeInMs = Math.random() * 1000; - } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delayTimeInMs; - } - return { - name: storageRetryPolicyName, - async sendRequest(request, next) { - // Set the server-side timeout query parameter "timeout=[seconds]" - if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000))); - } - const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : undefined; - let secondaryHas404 = false; - let attempt = 1; - let retryAgain = true; - let response; - let error; - while (retryAgain) { - const isPrimaryRetry = secondaryHas404 || - !secondaryUrl || - !["GET", "HEAD", "OPTIONS"].includes(request.method) || - attempt % 2 === 1; - request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; - response = undefined; - error = undefined; - try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); - response = await next(request); - secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); - } - catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); - error = e; - } - else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); - throw e; - } - } - retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); - if (retryAgain) { - await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); - } - attempt++; - } - if (response) { - return response; - } - throw error !== null && error !== void 0 ? error : new coreRestPipeline.RestError("RetryPolicy failed without known error."); - }, - }; + } + }) + }; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The programmatic identifier of the storageSharedKeyCredentialPolicy. - */ -const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; -/** - * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. - */ -function storageSharedKeyCredentialPolicy(options) { - function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); - if (request.body && - (typeof request.body === "string" || Buffer.isBuffer(request.body)) && - request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); - } - const stringToSign = [ - request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE), - ].join("\n") + - "\n" + - getCanonicalizedHeadersString(request) + - getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey) - .update(stringToSign, "utf8") - .digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); - // console.log(`[URL]:${request.url}`); - // console.log(`[HEADERS]:${request.headers.toString()}`); - // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); - // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); - } - /** - * Retrieve header value according to shared key sign rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - */ - function getHeaderValueToSign(request, headerName) { - const value = request.headers.get(headerName); - if (!value) { - return ""; - } - // When using version 2015-02-21 or later, if Content-Length is zero, then - // set the Content-Length part of the StringToSign to an empty string. - // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { - return ""; - } - return value; +// pkg/dist-src/paginate.js +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); +} +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) { + return results; } - /** - * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: - * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. - * 2. Convert each HTTP header name to lowercase. - * 3. Sort the headers lexicographically by header name, in ascending order. - * Each header may appear only once in the string. - * 4. Replace any linear whitespace in the header value with a single space. - * 5. Trim any whitespace around the colon in the header. - * 6. Finally, append a new-line character to each canonicalized header in the resulting list. - * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. - * - */ - function getCanonicalizedHeadersString(request) { - let headersArray = []; - for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { - headersArray.push({ name, value }); - } - } - headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); - }); - // Remove duplicate headers - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { - return false; - } - return true; - }); - let canonicalizedHeadersStringToSign = ""; - headersArray.forEach((header) => { - canonicalizedHeadersStringToSign += `${header.name - .toLowerCase() - .trimRight()}:${header.value.trimLeft()}\n`; - }); - return canonicalizedHeadersStringToSign; + let earlyExit = false; + function done() { + earlyExit = true; } - function getCanonicalizedResourceString(request) { - const path = getURLPath(request.url) || "/"; - let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path}`; - const queries = getURLQueries(request.url); - const lowercaseQueries = {}; - if (queries) { - const queryKeys = []; - for (const key in queries) { - if (Object.prototype.hasOwnProperty.call(queries, key)) { - const lowercaseKey = key.toLowerCase(); - lowercaseQueries[lowercaseKey] = queries[key]; - queryKeys.push(lowercaseKey); - } - } - queryKeys.sort(); - for (const key of queryKeys) { - canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; - } - } - return canonicalizedResourceString; + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; } - return { - name: storageSharedKeyCredentialPolicyName, - async sendRequest(request, next) { - signRequest(request); - return next(request); - }, - }; + return gather(octokit, results, iterator2, mapFn); + }); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: - * - * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. - * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL - * thus avoid the browser cache. - * - * 2. Remove cookie header for security - * - * 3. Remove content-length header to avoid browsers warning - */ -class StorageBrowserPolicy extends BaseRequestPolicy { - /** - * Creates an instance of StorageBrowserPolicy. - * @param nextPolicy - - * @param options - - */ - // The base class has a protected constructor. Adding a public one to enable constructing of this class. - /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ - constructor(nextPolicy, options) { - super(nextPolicy, options); - } - /** - * Sends out request. - * - * @param request - - */ - async sendRequest(request) { - if (coreUtil.isNode) { - return this._nextPolicy.sendRequest(request); - } - if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - } - request.headers.remove(HeaderConstants.COOKIE); - // According to XHR standards, content-length should be fully controlled by browsers - request.headers.remove(HeaderConstants.CONTENT_LENGTH); - return this._nextPolicy.sendRequest(request); - } -} +// pkg/dist-src/compose-paginate.js +var composePaginateRest = Object.assign(paginate, { + iterator +}); -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. - */ -class StorageBrowserPolicyFactory { - /** - * Creates a StorageBrowserPolicyFactory object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); - } -} +// pkg/dist-src/generated/paginating-endpoints.js +var paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/organization-roles/{role_id}/teams", + "GET /orgs/{org}/organization-roles/{role_id}/users", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", + "GET /repos/{owner}/{repo}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /repositories/{repository_id}/environments/{environment_name}/variables", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" +]; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The programmatic identifier of the storageCorrectContentLengthPolicy. - */ -const storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; -/** - * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. - */ -function storageCorrectContentLengthPolicy() { - function correctContentLength(request) { - if (request.body && - (typeof request.body === "string" || Buffer.isBuffer(request.body)) && - request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); - } - } - return { - name: storageCorrectContentLengthPolicyName, - async sendRequest(request, next) { - correctContentLength(request); - return next(request); - }, - }; +// pkg/dist-src/paginating-endpoints.js +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A helper to decide if a given argument satisfies the Pipeline contract - * @param pipeline - An argument that may be a Pipeline - * @returns true when the argument satisfies the Pipeline contract - */ -function isPipelineLike(pipeline) { - if (!pipeline || typeof pipeline !== "object") { - return false; - } - const castPipeline = pipeline; - return (Array.isArray(castPipeline.factories) && - typeof castPipeline.options === "object" && - typeof castPipeline.toServiceClientOptions === "function"); -} -/** - * A Pipeline class containing HTTP request policies. - * You can create a default Pipeline by calling {@link newPipeline}. - * Or you can create a Pipeline with your own policies by the constructor of Pipeline. - * - * Refer to {@link newPipeline} and provided policies before implementing your - * customized Pipeline. - */ -class Pipeline { - /** - * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. - * - * @param factories - - * @param options - - */ - constructor(factories, options = {}) { - this.factories = factories; - this.options = options; - } - /** - * Transfer Pipeline object to ServiceClientOptions object which is required by - * ServiceClient constructor. - * - * @returns The ServiceClientOptions object from this Pipeline. - */ - toServiceClientOptions() { - return { - httpClient: this.options.httpClient, - requestPolicyFactories: this.factories, - }; - } -} -/** - * Creates a new Pipeline object with Credential provided. - * - * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. - * @param pipelineOptions - Optional. Options. - * @returns A new Pipeline object. - */ -function newPipeline(credential, pipelineOptions = {}) { - if (!credential) { - credential = new AnonymousCredential(); - } - const pipeline = new Pipeline([], pipelineOptions); - pipeline._credential = credential; - return pipeline; -} -function processDownlevelPipeline(pipeline) { - const knownFactoryFunctions = [ - isAnonymousCredential, - isStorageSharedKeyCredential, - isCoreHttpBearerTokenFactory, - isStorageBrowserPolicyFactory, - isStorageRetryPolicyFactory, - isStorageTelemetryPolicyFactory, - isCoreHttpPolicyFactory, - ]; - if (pipeline.factories.length) { - const novelFactories = pipeline.factories.filter((factory) => { - return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); - }); - if (novelFactories.length) { - const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); - // if there are any left over, wrap in a requestPolicyFactoryPolicy - return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), - afterRetry: hasInjector, - }; - } - } - return undefined; -} -function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); - let httpClient = pipeline._coreHttpClient; - if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); - pipeline._coreHttpClient = httpClient; - } - let corePipeline = pipeline._corePipeline; - if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; - const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix - ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info, - }, userAgentOptions: { - userAgentPrefix, - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#", - }, - }, - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#", - }, - }, - } })); - corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); - const downlevelResults = processDownlevelPipeline(pipeline); - if (downlevelResults) { - corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : undefined); - } - const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge }, - }), { phase: "Sign" }); - } - else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ - accountName: credential.accountName, - accountKey: credential.accountKey, - }), { phase: "Sign" }); - } - pipeline._corePipeline = corePipeline; - } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); -} -function getCredentialFromPipeline(pipeline) { - // see if we squirreled one away on the type itself - if (pipeline._credential) { - return pipeline._credential; - } - // if it came from another package, loop over the factories and look for one like before - let credential = new AnonymousCredential(); - for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { - // Only works if the factory has been attached a "credential" property. - // We do that in newPipeline() when using TokenCredential. - credential = factory.credential; - } - else if (isStorageSharedKeyCredential(factory)) { - return factory; - } - } - return credential; -} -function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { - return true; - } - return factory.constructor.name === "StorageSharedKeyCredential"; -} -function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { - return true; - } - return factory.constructor.name === "AnonymousCredential"; -} -function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); -} -function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { - return true; - } - return factory.constructor.name === "StorageBrowserPolicyFactory"; -} -function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { - return true; - } - return factory.constructor.name === "StorageRetryPolicyFactory"; -} -function isStorageTelemetryPolicyFactory(factory) { - return factory.constructor.name === "TelemetryPolicyFactory"; -} -function isInjectorPolicyFactory(factory) { - return factory.constructor.name === "InjectorPolicyFactory"; -} -function isCoreHttpPolicyFactory(factory) { - const knownPolicies = [ - "GenerateClientRequestIdPolicy", - "TracingPolicy", - "LogPolicy", - "ProxyPolicy", - "DisableResponseDecompressionPolicy", - "KeepAlivePolicy", - "DeserializationPolicy", - ]; - const mockHttpClient = { - sendRequest: async (request) => { - return { - request, - headers: request.headers.clone(), - status: 500, - }; - }, - }; - const mockRequestPolicyOptions = { - log(_logLevel, _message) { - /* do nothing */ - }, - shouldLog(_logLevel) { - return false; - }, - }; - const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions); - const policyName = policyInstance.constructor.name; - // bundlers sometimes add a custom suffix to the class name to make it unique - return knownPolicies.some((knownPolicyName) => { - return policyName.startsWith(knownPolicyName); - }); +// pkg/dist-src/index.js +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; } +paginateRest.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -const BlobServiceProperties = { - serializedName: "BlobServiceProperties", - xmlName: "StorageServiceProperties", - type: { - name: "Composite", - className: "BlobServiceProperties", - modelProperties: { - blobAnalyticsLogging: { - serializedName: "Logging", - xmlName: "Logging", - type: { - name: "Composite", - className: "Logging", - }, - }, - hourMetrics: { - serializedName: "HourMetrics", - xmlName: "HourMetrics", - type: { - name: "Composite", - className: "Metrics", - }, - }, - minuteMetrics: { - serializedName: "MinuteMetrics", - xmlName: "MinuteMetrics", - type: { - name: "Composite", - className: "Metrics", - }, - }, - cors: { - serializedName: "Cors", - xmlName: "Cors", - xmlIsWrapped: true, - xmlElementName: "CorsRule", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CorsRule", - }, - }, - }, - }, - defaultServiceVersion: { - serializedName: "DefaultServiceVersion", - xmlName: "DefaultServiceVersion", - type: { - name: "String", - }, - }, - deleteRetentionPolicy: { - serializedName: "DeleteRetentionPolicy", - xmlName: "DeleteRetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - }, - }, - staticWebsite: { - serializedName: "StaticWebsite", - xmlName: "StaticWebsite", - type: { - name: "Composite", - className: "StaticWebsite", - }, - }, - }, - }, -}; -const Logging = { - serializedName: "Logging", - type: { - name: "Composite", - className: "Logging", - modelProperties: { - version: { - serializedName: "Version", - required: true, - xmlName: "Version", - type: { - name: "String", - }, - }, - deleteProperty: { - serializedName: "Delete", - required: true, - xmlName: "Delete", - type: { - name: "Boolean", - }, - }, - read: { - serializedName: "Read", - required: true, - xmlName: "Read", - type: { - name: "Boolean", - }, - }, - write: { - serializedName: "Write", - required: true, - xmlName: "Write", - type: { - name: "Boolean", - }, - }, - retentionPolicy: { - serializedName: "RetentionPolicy", - xmlName: "RetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - }, - }, - }, - }, -}; -const RetentionPolicy = { - serializedName: "RetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - modelProperties: { - enabled: { - serializedName: "Enabled", - required: true, - xmlName: "Enabled", - type: { - name: "Boolean", - }, - }, - days: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "Days", - xmlName: "Days", - type: { - name: "Number", - }, - }, - }, - }, -}; -const Metrics = { - serializedName: "Metrics", - type: { - name: "Composite", - className: "Metrics", - modelProperties: { - version: { - serializedName: "Version", - xmlName: "Version", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "Enabled", - required: true, - xmlName: "Enabled", - type: { - name: "Boolean", - }, - }, - includeAPIs: { - serializedName: "IncludeAPIs", - xmlName: "IncludeAPIs", - type: { - name: "Boolean", - }, - }, - retentionPolicy: { - serializedName: "RetentionPolicy", - xmlName: "RetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - }, - }, - }, - }, -}; -const CorsRule = { - serializedName: "CorsRule", - type: { - name: "Composite", - className: "CorsRule", - modelProperties: { - allowedOrigins: { - serializedName: "AllowedOrigins", - required: true, - xmlName: "AllowedOrigins", - type: { - name: "String", - }, - }, - allowedMethods: { - serializedName: "AllowedMethods", - required: true, - xmlName: "AllowedMethods", - type: { - name: "String", - }, - }, - allowedHeaders: { - serializedName: "AllowedHeaders", - required: true, - xmlName: "AllowedHeaders", - type: { - name: "String", - }, - }, - exposedHeaders: { - serializedName: "ExposedHeaders", - required: true, - xmlName: "ExposedHeaders", - type: { - name: "String", - }, - }, - maxAgeInSeconds: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "MaxAgeInSeconds", - required: true, - xmlName: "MaxAgeInSeconds", - type: { - name: "Number", - }, - }, - }, - }, + +/***/ }), + +/***/ 83044: +/***/ ((module) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -const StaticWebsite = { - serializedName: "StaticWebsite", - type: { - name: "Composite", - className: "StaticWebsite", - modelProperties: { - enabled: { - serializedName: "Enabled", - required: true, - xmlName: "Enabled", - type: { - name: "Boolean", - }, - }, - indexDocument: { - serializedName: "IndexDocument", - xmlName: "IndexDocument", - type: { - name: "String", - }, - }, - errorDocument404Path: { - serializedName: "ErrorDocument404Path", - xmlName: "ErrorDocument404Path", - type: { - name: "String", - }, - }, - defaultIndexDocumentPath: { - serializedName: "DefaultIndexDocumentPath", - xmlName: "DefaultIndexDocumentPath", - type: { - name: "String", - }, - }, - }, - }, -}; -const StorageError = { - serializedName: "StorageError", - type: { - name: "Composite", - className: "StorageError", - modelProperties: { - message: { - serializedName: "Message", - xmlName: "Message", - type: { - name: "String", - }, - }, - code: { - serializedName: "Code", - xmlName: "Code", - type: { - name: "String", - }, - }, - authenticationErrorDetail: { - serializedName: "AuthenticationErrorDetail", - xmlName: "AuthenticationErrorDetail", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobServiceStatistics = { - serializedName: "BlobServiceStatistics", - xmlName: "StorageServiceStats", - type: { - name: "Composite", - className: "BlobServiceStatistics", - modelProperties: { - geoReplication: { - serializedName: "GeoReplication", - xmlName: "GeoReplication", - type: { - name: "Composite", - className: "GeoReplication", - }, - }, - }, - }, -}; -const GeoReplication = { - serializedName: "GeoReplication", - type: { - name: "Composite", - className: "GeoReplication", - modelProperties: { - status: { - serializedName: "Status", - required: true, - xmlName: "Status", - type: { - name: "Enum", - allowedValues: ["live", "bootstrap", "unavailable"], - }, - }, - lastSyncOn: { - serializedName: "LastSyncTime", - required: true, - xmlName: "LastSyncTime", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ListContainersSegmentResponse = { - serializedName: "ListContainersSegmentResponse", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "ListContainersSegmentResponse", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - prefix: { - serializedName: "Prefix", - xmlName: "Prefix", - type: { - name: "String", - }, - }, - marker: { - serializedName: "Marker", - xmlName: "Marker", - type: { - name: "String", - }, - }, - maxPageSize: { - serializedName: "MaxResults", - xmlName: "MaxResults", - type: { - name: "Number", - }, - }, - containerItems: { - serializedName: "ContainerItems", - required: true, - xmlName: "Containers", - xmlIsWrapped: true, - xmlElementName: "Container", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerItem", - }, - }, - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerItem = { - serializedName: "ContainerItem", - xmlName: "Container", - type: { - name: "Composite", - className: "ContainerItem", - modelProperties: { - name: { - serializedName: "Name", - required: true, - xmlName: "Name", - type: { - name: "String", - }, - }, - deleted: { - serializedName: "Deleted", - xmlName: "Deleted", - type: { - name: "Boolean", - }, - }, - version: { - serializedName: "Version", - xmlName: "Version", - type: { - name: "String", - }, - }, - properties: { - serializedName: "Properties", - xmlName: "Properties", - type: { - name: "Composite", - className: "ContainerProperties", - }, - }, - metadata: { - serializedName: "Metadata", - xmlName: "Metadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; -const ContainerProperties = { - serializedName: "ContainerProperties", - type: { - name: "Composite", - className: "ContainerProperties", - modelProperties: { - lastModified: { - serializedName: "Last-Modified", - required: true, - xmlName: "Last-Modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "Etag", - required: true, - xmlName: "Etag", - type: { - name: "String", - }, - }, - leaseStatus: { - serializedName: "LeaseStatus", - xmlName: "LeaseStatus", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - leaseState: { - serializedName: "LeaseState", - xmlName: "LeaseState", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseDuration: { - serializedName: "LeaseDuration", - xmlName: "LeaseDuration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - publicAccess: { - serializedName: "PublicAccess", - xmlName: "PublicAccess", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, - hasImmutabilityPolicy: { - serializedName: "HasImmutabilityPolicy", - xmlName: "HasImmutabilityPolicy", - type: { - name: "Boolean", - }, - }, - hasLegalHold: { - serializedName: "HasLegalHold", - xmlName: "HasLegalHold", - type: { - name: "Boolean", - }, - }, - defaultEncryptionScope: { - serializedName: "DefaultEncryptionScope", - xmlName: "DefaultEncryptionScope", - type: { - name: "String", - }, - }, - preventEncryptionScopeOverride: { - serializedName: "DenyEncryptionScopeOverride", - xmlName: "DenyEncryptionScopeOverride", - type: { - name: "Boolean", - }, - }, - deletedOn: { - serializedName: "DeletedTime", - xmlName: "DeletedTime", - type: { - name: "DateTimeRfc1123", - }, - }, - remainingRetentionDays: { - serializedName: "RemainingRetentionDays", - xmlName: "RemainingRetentionDays", - type: { - name: "Number", - }, - }, - isImmutableStorageWithVersioningEnabled: { - serializedName: "ImmutableStorageWithVersioningEnabled", - xmlName: "ImmutableStorageWithVersioningEnabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const KeyInfo = { - serializedName: "KeyInfo", - type: { - name: "Composite", - className: "KeyInfo", - modelProperties: { - startsOn: { - serializedName: "Start", - required: true, - xmlName: "Start", - type: { - name: "String", - }, - }, - expiresOn: { - serializedName: "Expiry", - required: true, - xmlName: "Expiry", - type: { - name: "String", - }, - }, - }, - }, -}; -const UserDelegationKey = { - serializedName: "UserDelegationKey", - type: { - name: "Composite", - className: "UserDelegationKey", - modelProperties: { - signedObjectId: { - serializedName: "SignedOid", - required: true, - xmlName: "SignedOid", - type: { - name: "String", - }, - }, - signedTenantId: { - serializedName: "SignedTid", - required: true, - xmlName: "SignedTid", - type: { - name: "String", - }, - }, - signedStartsOn: { - serializedName: "SignedStart", - required: true, - xmlName: "SignedStart", - type: { - name: "String", - }, - }, - signedExpiresOn: { - serializedName: "SignedExpiry", - required: true, - xmlName: "SignedExpiry", - type: { - name: "String", - }, - }, - signedService: { - serializedName: "SignedService", - required: true, - xmlName: "SignedService", - type: { - name: "String", - }, - }, - signedVersion: { - serializedName: "SignedVersion", - required: true, - xmlName: "SignedVersion", - type: { - name: "String", - }, - }, - value: { - serializedName: "Value", - required: true, - xmlName: "Value", - type: { - name: "String", - }, - }, - }, - }, -}; -const FilterBlobSegment = { - serializedName: "FilterBlobSegment", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "FilterBlobSegment", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - where: { - serializedName: "Where", - required: true, - xmlName: "Where", - type: { - name: "String", - }, - }, - blobs: { - serializedName: "Blobs", - required: true, - xmlName: "Blobs", - xmlIsWrapped: true, - xmlElementName: "Blob", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FilterBlobItem", - }, - }, - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const FilterBlobItem = { - serializedName: "FilterBlobItem", - xmlName: "Blob", - type: { - name: "Composite", - className: "FilterBlobItem", - modelProperties: { - name: { - serializedName: "Name", - required: true, - xmlName: "Name", - type: { - name: "String", - }, - }, - containerName: { - serializedName: "ContainerName", - required: true, - xmlName: "ContainerName", - type: { - name: "String", - }, - }, - tags: { - serializedName: "Tags", - xmlName: "Tags", - type: { - name: "Composite", - className: "BlobTags", - }, - }, - }, - }, -}; -const BlobTags = { - serializedName: "BlobTags", - xmlName: "Tags", - type: { - name: "Composite", - className: "BlobTags", - modelProperties: { - blobTagSet: { - serializedName: "BlobTagSet", - required: true, - xmlName: "TagSet", - xmlIsWrapped: true, - xmlElementName: "Tag", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobTag", - }, - }, - }, - }, - }, - }, -}; -const BlobTag = { - serializedName: "BlobTag", - xmlName: "Tag", - type: { - name: "Composite", - className: "BlobTag", - modelProperties: { - key: { - serializedName: "Key", - required: true, - xmlName: "Key", - type: { - name: "String", - }, - }, - value: { - serializedName: "Value", - required: true, - xmlName: "Value", - type: { - name: "String", - }, - }, - }, - }, -}; -const SignedIdentifier = { - serializedName: "SignedIdentifier", - xmlName: "SignedIdentifier", - type: { - name: "Composite", - className: "SignedIdentifier", - modelProperties: { - id: { - serializedName: "Id", - required: true, - xmlName: "Id", - type: { - name: "String", - }, - }, - accessPolicy: { - serializedName: "AccessPolicy", - xmlName: "AccessPolicy", - type: { - name: "Composite", - className: "AccessPolicy", - }, - }, - }, - }, -}; -const AccessPolicy = { - serializedName: "AccessPolicy", - type: { - name: "Composite", - className: "AccessPolicy", - modelProperties: { - startsOn: { - serializedName: "Start", - xmlName: "Start", - type: { - name: "String", - }, - }, - expiresOn: { - serializedName: "Expiry", - xmlName: "Expiry", - type: { - name: "String", - }, - }, - permissions: { - serializedName: "Permission", - xmlName: "Permission", - type: { - name: "String", - }, - }, - }, - }, -}; -const ListBlobsFlatSegmentResponse = { - serializedName: "ListBlobsFlatSegmentResponse", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "ListBlobsFlatSegmentResponse", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - containerName: { - serializedName: "ContainerName", - required: true, - xmlName: "ContainerName", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - prefix: { - serializedName: "Prefix", - xmlName: "Prefix", - type: { - name: "String", - }, - }, - marker: { - serializedName: "Marker", - xmlName: "Marker", - type: { - name: "String", - }, - }, - maxPageSize: { - serializedName: "MaxResults", - xmlName: "MaxResults", - type: { - name: "Number", - }, - }, - segment: { - serializedName: "Segment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobFlatListSegment", - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobFlatListSegment = { - serializedName: "BlobFlatListSegment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobFlatListSegment", - modelProperties: { - blobItems: { - serializedName: "BlobItems", - required: true, - xmlName: "BlobItems", - xmlElementName: "Blob", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobItemInternal", - }, - }, - }, - }, - }, - }, -}; -const BlobItemInternal = { - serializedName: "BlobItemInternal", - xmlName: "Blob", - type: { - name: "Composite", - className: "BlobItemInternal", - modelProperties: { - name: { - serializedName: "Name", - xmlName: "Name", - type: { - name: "Composite", - className: "BlobName", - }, - }, - deleted: { - serializedName: "Deleted", - required: true, - xmlName: "Deleted", - type: { - name: "Boolean", - }, - }, - snapshot: { - serializedName: "Snapshot", - required: true, - xmlName: "Snapshot", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "VersionId", - xmlName: "VersionId", - type: { - name: "String", - }, - }, - isCurrentVersion: { - serializedName: "IsCurrentVersion", - xmlName: "IsCurrentVersion", - type: { - name: "Boolean", - }, - }, - properties: { - serializedName: "Properties", - xmlName: "Properties", - type: { - name: "Composite", - className: "BlobPropertiesInternal", - }, - }, - metadata: { - serializedName: "Metadata", - xmlName: "Metadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - blobTags: { - serializedName: "BlobTags", - xmlName: "Tags", - type: { - name: "Composite", - className: "BlobTags", - }, - }, - objectReplicationMetadata: { - serializedName: "ObjectReplicationMetadata", - xmlName: "OrMetadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - hasVersionsOnly: { - serializedName: "HasVersionsOnly", - xmlName: "HasVersionsOnly", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const BlobName = { - serializedName: "BlobName", - type: { - name: "Composite", - className: "BlobName", - modelProperties: { - encoded: { - serializedName: "Encoded", - xmlName: "Encoded", - xmlIsAttribute: true, - type: { - name: "Boolean", - }, - }, - content: { - serializedName: "content", - xmlName: "content", - xmlIsMsText: true, - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobPropertiesInternal = { - serializedName: "BlobPropertiesInternal", - xmlName: "Properties", - type: { - name: "Composite", - className: "BlobPropertiesInternal", - modelProperties: { - createdOn: { - serializedName: "Creation-Time", - xmlName: "Creation-Time", - type: { - name: "DateTimeRfc1123", - }, - }, - lastModified: { - serializedName: "Last-Modified", - required: true, - xmlName: "Last-Modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "Etag", - required: true, - xmlName: "Etag", - type: { - name: "String", - }, - }, - contentLength: { - serializedName: "Content-Length", - xmlName: "Content-Length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "Content-Type", - xmlName: "Content-Type", - type: { - name: "String", - }, - }, - contentEncoding: { - serializedName: "Content-Encoding", - xmlName: "Content-Encoding", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "Content-Language", - xmlName: "Content-Language", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "Content-MD5", - xmlName: "Content-MD5", - type: { - name: "ByteArray", - }, - }, - contentDisposition: { - serializedName: "Content-Disposition", - xmlName: "Content-Disposition", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "Cache-Control", - xmlName: "Cache-Control", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - blobType: { - serializedName: "BlobType", - xmlName: "BlobType", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - leaseStatus: { - serializedName: "LeaseStatus", - xmlName: "LeaseStatus", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - leaseState: { - serializedName: "LeaseState", - xmlName: "LeaseState", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseDuration: { - serializedName: "LeaseDuration", - xmlName: "LeaseDuration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - copyId: { - serializedName: "CopyId", - xmlName: "CopyId", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "CopyStatus", - xmlName: "CopyStatus", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - copySource: { - serializedName: "CopySource", - xmlName: "CopySource", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "CopyProgress", - xmlName: "CopyProgress", - type: { - name: "String", - }, - }, - copyCompletedOn: { - serializedName: "CopyCompletionTime", - xmlName: "CopyCompletionTime", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "CopyStatusDescription", - xmlName: "CopyStatusDescription", - type: { - name: "String", - }, - }, - serverEncrypted: { - serializedName: "ServerEncrypted", - xmlName: "ServerEncrypted", - type: { - name: "Boolean", - }, - }, - incrementalCopy: { - serializedName: "IncrementalCopy", - xmlName: "IncrementalCopy", - type: { - name: "Boolean", - }, - }, - destinationSnapshot: { - serializedName: "DestinationSnapshot", - xmlName: "DestinationSnapshot", - type: { - name: "String", - }, - }, - deletedOn: { - serializedName: "DeletedTime", - xmlName: "DeletedTime", - type: { - name: "DateTimeRfc1123", - }, - }, - remainingRetentionDays: { - serializedName: "RemainingRetentionDays", - xmlName: "RemainingRetentionDays", - type: { - name: "Number", - }, - }, - accessTier: { - serializedName: "AccessTier", - xmlName: "AccessTier", - type: { - name: "Enum", - allowedValues: [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - ], - }, - }, - accessTierInferred: { - serializedName: "AccessTierInferred", - xmlName: "AccessTierInferred", - type: { - name: "Boolean", - }, - }, - archiveStatus: { - serializedName: "ArchiveStatus", - xmlName: "ArchiveStatus", - type: { - name: "Enum", - allowedValues: [ - "rehydrate-pending-to-hot", - "rehydrate-pending-to-cool", - "rehydrate-pending-to-cold", - ], - }, - }, - customerProvidedKeySha256: { - serializedName: "CustomerProvidedKeySha256", - xmlName: "CustomerProvidedKeySha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "EncryptionScope", - xmlName: "EncryptionScope", - type: { - name: "String", - }, - }, - accessTierChangedOn: { - serializedName: "AccessTierChangeTime", - xmlName: "AccessTierChangeTime", - type: { - name: "DateTimeRfc1123", - }, - }, - tagCount: { - serializedName: "TagCount", - xmlName: "TagCount", - type: { - name: "Number", - }, - }, - expiresOn: { - serializedName: "Expiry-Time", - xmlName: "Expiry-Time", - type: { - name: "DateTimeRfc1123", - }, - }, - isSealed: { - serializedName: "Sealed", - xmlName: "Sealed", - type: { - name: "Boolean", - }, - }, - rehydratePriority: { - serializedName: "RehydratePriority", - xmlName: "RehydratePriority", - type: { - name: "Enum", - allowedValues: ["High", "Standard"], - }, - }, - lastAccessedOn: { - serializedName: "LastAccessTime", - xmlName: "LastAccessTime", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiresOn: { - serializedName: "ImmutabilityPolicyUntilDate", - xmlName: "ImmutabilityPolicyUntilDate", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "ImmutabilityPolicyMode", - xmlName: "ImmutabilityPolicyMode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - legalHold: { - serializedName: "LegalHold", - xmlName: "LegalHold", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const ListBlobsHierarchySegmentResponse = { - serializedName: "ListBlobsHierarchySegmentResponse", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "ListBlobsHierarchySegmentResponse", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - containerName: { - serializedName: "ContainerName", - required: true, - xmlName: "ContainerName", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - prefix: { - serializedName: "Prefix", - xmlName: "Prefix", - type: { - name: "String", - }, - }, - marker: { - serializedName: "Marker", - xmlName: "Marker", - type: { - name: "String", - }, - }, - maxPageSize: { - serializedName: "MaxResults", - xmlName: "MaxResults", - type: { - name: "Number", - }, - }, - delimiter: { - serializedName: "Delimiter", - xmlName: "Delimiter", - type: { - name: "String", - }, - }, - segment: { - serializedName: "Segment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobHierarchyListSegment", - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobHierarchyListSegment = { - serializedName: "BlobHierarchyListSegment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobHierarchyListSegment", - modelProperties: { - blobPrefixes: { - serializedName: "BlobPrefixes", - xmlName: "BlobPrefixes", - xmlElementName: "BlobPrefix", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobPrefix", - }, - }, - }, - }, - blobItems: { - serializedName: "BlobItems", - required: true, - xmlName: "BlobItems", - xmlElementName: "Blob", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobItemInternal", - }, - }, - }, - }, - }, - }, -}; -const BlobPrefix = { - serializedName: "BlobPrefix", - type: { - name: "Composite", - className: "BlobPrefix", - modelProperties: { - name: { - serializedName: "Name", - xmlName: "Name", - type: { - name: "Composite", - className: "BlobName", - }, - }, - }, - }, -}; -const BlockLookupList = { - serializedName: "BlockLookupList", - xmlName: "BlockList", - type: { - name: "Composite", - className: "BlockLookupList", - modelProperties: { - committed: { - serializedName: "Committed", - xmlName: "Committed", - xmlElementName: "Committed", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - uncommitted: { - serializedName: "Uncommitted", - xmlName: "Uncommitted", - xmlElementName: "Uncommitted", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - latest: { - serializedName: "Latest", - xmlName: "Latest", - xmlElementName: "Latest", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; -const BlockList = { - serializedName: "BlockList", - type: { - name: "Composite", - className: "BlockList", - modelProperties: { - committedBlocks: { - serializedName: "CommittedBlocks", - xmlName: "CommittedBlocks", - xmlIsWrapped: true, - xmlElementName: "Block", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Block", - }, - }, - }, - }, - uncommittedBlocks: { - serializedName: "UncommittedBlocks", - xmlName: "UncommittedBlocks", - xmlIsWrapped: true, - xmlElementName: "Block", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Block", - }, - }, - }, - }, - }, - }, -}; -const Block = { - serializedName: "Block", - type: { - name: "Composite", - className: "Block", - modelProperties: { - name: { - serializedName: "Name", - required: true, - xmlName: "Name", - type: { - name: "String", - }, - }, - size: { - serializedName: "Size", - required: true, - xmlName: "Size", - type: { - name: "Number", - }, - }, - }, - }, -}; -const PageList = { - serializedName: "PageList", - type: { - name: "Composite", - className: "PageList", - modelProperties: { - pageRange: { - serializedName: "PageRange", - xmlName: "PageRange", - xmlElementName: "PageRange", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PageRange", - }, - }, - }, - }, - clearRange: { - serializedName: "ClearRange", - xmlName: "ClearRange", - xmlElementName: "ClearRange", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClearRange", - }, - }, - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageRange = { - serializedName: "PageRange", - xmlName: "PageRange", - type: { - name: "Composite", - className: "PageRange", - modelProperties: { - start: { - serializedName: "Start", - required: true, - xmlName: "Start", - type: { - name: "Number", - }, - }, - end: { - serializedName: "End", - required: true, - xmlName: "End", - type: { - name: "Number", - }, - }, - }, - }, -}; -const ClearRange = { - serializedName: "ClearRange", - xmlName: "ClearRange", - type: { - name: "Composite", - className: "ClearRange", - modelProperties: { - start: { - serializedName: "Start", - required: true, - xmlName: "Start", - type: { - name: "Number", - }, - }, - end: { - serializedName: "End", - required: true, - xmlName: "End", - type: { - name: "Number", - }, - }, - }, - }, -}; -const QueryRequest = { - serializedName: "QueryRequest", - xmlName: "QueryRequest", - type: { - name: "Composite", - className: "QueryRequest", - modelProperties: { - queryType: { - serializedName: "QueryType", - required: true, - xmlName: "QueryType", - type: { - name: "String", - }, - }, - expression: { - serializedName: "Expression", - required: true, - xmlName: "Expression", - type: { - name: "String", - }, - }, - inputSerialization: { - serializedName: "InputSerialization", - xmlName: "InputSerialization", - type: { - name: "Composite", - className: "QuerySerialization", - }, - }, - outputSerialization: { - serializedName: "OutputSerialization", - xmlName: "OutputSerialization", - type: { - name: "Composite", - className: "QuerySerialization", - }, - }, - }, - }, -}; -const QuerySerialization = { - serializedName: "QuerySerialization", - type: { - name: "Composite", - className: "QuerySerialization", - modelProperties: { - format: { - serializedName: "Format", - xmlName: "Format", - type: { - name: "Composite", - className: "QueryFormat", - }, - }, - }, - }, -}; -const QueryFormat = { - serializedName: "QueryFormat", - type: { - name: "Composite", - className: "QueryFormat", - modelProperties: { - type: { - serializedName: "Type", - required: true, - xmlName: "Type", - type: { - name: "Enum", - allowedValues: ["delimited", "json", "arrow", "parquet"], - }, - }, - delimitedTextConfiguration: { - serializedName: "DelimitedTextConfiguration", - xmlName: "DelimitedTextConfiguration", - type: { - name: "Composite", - className: "DelimitedTextConfiguration", - }, - }, - jsonTextConfiguration: { - serializedName: "JsonTextConfiguration", - xmlName: "JsonTextConfiguration", - type: { - name: "Composite", - className: "JsonTextConfiguration", - }, - }, - arrowConfiguration: { - serializedName: "ArrowConfiguration", - xmlName: "ArrowConfiguration", - type: { - name: "Composite", - className: "ArrowConfiguration", - }, - }, - parquetTextConfiguration: { - serializedName: "ParquetTextConfiguration", - xmlName: "ParquetTextConfiguration", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; -const DelimitedTextConfiguration = { - serializedName: "DelimitedTextConfiguration", - xmlName: "DelimitedTextConfiguration", - type: { - name: "Composite", - className: "DelimitedTextConfiguration", - modelProperties: { - columnSeparator: { - serializedName: "ColumnSeparator", - xmlName: "ColumnSeparator", - type: { - name: "String", - }, - }, - fieldQuote: { - serializedName: "FieldQuote", - xmlName: "FieldQuote", - type: { - name: "String", - }, - }, - recordSeparator: { - serializedName: "RecordSeparator", - xmlName: "RecordSeparator", - type: { - name: "String", - }, - }, - escapeChar: { - serializedName: "EscapeChar", - xmlName: "EscapeChar", - type: { - name: "String", - }, - }, - headersPresent: { - serializedName: "HeadersPresent", - xmlName: "HasHeaders", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const JsonTextConfiguration = { - serializedName: "JsonTextConfiguration", - xmlName: "JsonTextConfiguration", - type: { - name: "Composite", - className: "JsonTextConfiguration", - modelProperties: { - recordSeparator: { - serializedName: "RecordSeparator", - xmlName: "RecordSeparator", - type: { - name: "String", - }, - }, - }, - }, -}; -const ArrowConfiguration = { - serializedName: "ArrowConfiguration", - xmlName: "ArrowConfiguration", - type: { - name: "Composite", - className: "ArrowConfiguration", - modelProperties: { - schema: { - serializedName: "Schema", - required: true, - xmlName: "Schema", - xmlIsWrapped: true, - xmlElementName: "Field", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArrowField", - }, - }, - }, - }, - }, - }, -}; -const ArrowField = { - serializedName: "ArrowField", - xmlName: "Field", - type: { - name: "Composite", - className: "ArrowField", - modelProperties: { - type: { - serializedName: "Type", - required: true, - xmlName: "Type", - type: { - name: "String", - }, - }, - name: { - serializedName: "Name", - xmlName: "Name", - type: { - name: "String", - }, - }, - precision: { - serializedName: "Precision", - xmlName: "Precision", - type: { - name: "Number", - }, - }, - scale: { - serializedName: "Scale", - xmlName: "Scale", - type: { - name: "Number", - }, - }, - }, - }, -}; -const ServiceSetPropertiesHeaders = { - serializedName: "Service_setPropertiesHeaders", - type: { - name: "Composite", - className: "ServiceSetPropertiesHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceSetPropertiesExceptionHeaders = { - serializedName: "Service_setPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "ServiceSetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetPropertiesHeaders = { - serializedName: "Service_getPropertiesHeaders", - type: { - name: "Composite", - className: "ServiceGetPropertiesHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetPropertiesExceptionHeaders = { - serializedName: "Service_getPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetStatisticsHeaders = { - serializedName: "Service_getStatisticsHeaders", - type: { - name: "Composite", - className: "ServiceGetStatisticsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetStatisticsExceptionHeaders = { - serializedName: "Service_getStatisticsExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetStatisticsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceListContainersSegmentHeaders = { - serializedName: "Service_listContainersSegmentHeaders", - type: { - name: "Composite", - className: "ServiceListContainersSegmentHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceListContainersSegmentExceptionHeaders = { - serializedName: "Service_listContainersSegmentExceptionHeaders", - type: { - name: "Composite", - className: "ServiceListContainersSegmentExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetUserDelegationKeyHeaders = { - serializedName: "Service_getUserDelegationKeyHeaders", - type: { - name: "Composite", - className: "ServiceGetUserDelegationKeyHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetUserDelegationKeyExceptionHeaders = { - serializedName: "Service_getUserDelegationKeyExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetUserDelegationKeyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetAccountInfoHeaders = { - serializedName: "Service_getAccountInfoHeaders", - type: { - name: "Composite", - className: "ServiceGetAccountInfoHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - skuName: { - serializedName: "x-ms-sku-name", - xmlName: "x-ms-sku-name", - type: { - name: "Enum", - allowedValues: [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - ], - }, - }, - accountKind: { - serializedName: "x-ms-account-kind", - xmlName: "x-ms-account-kind", - type: { - name: "Enum", - allowedValues: [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage", - ], - }, - }, - isHierarchicalNamespaceEnabled: { - serializedName: "x-ms-is-hns-enabled", - xmlName: "x-ms-is-hns-enabled", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetAccountInfoExceptionHeaders = { - serializedName: "Service_getAccountInfoExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetAccountInfoExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceSubmitBatchHeaders = { - serializedName: "Service_submitBatchHeaders", - type: { - name: "Composite", - className: "ServiceSubmitBatchHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceSubmitBatchExceptionHeaders = { - serializedName: "Service_submitBatchExceptionHeaders", - type: { - name: "Composite", - className: "ServiceSubmitBatchExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceFilterBlobsHeaders = { - serializedName: "Service_filterBlobsHeaders", - type: { - name: "Composite", - className: "ServiceFilterBlobsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceFilterBlobsExceptionHeaders = { - serializedName: "Service_filterBlobsExceptionHeaders", - type: { - name: "Composite", - className: "ServiceFilterBlobsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerCreateHeaders = { - serializedName: "Container_createHeaders", - type: { - name: "Composite", - className: "ContainerCreateHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerCreateExceptionHeaders = { - serializedName: "Container_createExceptionHeaders", - type: { - name: "Composite", - className: "ContainerCreateExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetPropertiesHeaders = { - serializedName: "Container_getPropertiesHeaders", - type: { - name: "Composite", - className: "ContainerGetPropertiesHeaders", - modelProperties: { - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobPublicAccess: { - serializedName: "x-ms-blob-public-access", - xmlName: "x-ms-blob-public-access", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, - hasImmutabilityPolicy: { - serializedName: "x-ms-has-immutability-policy", - xmlName: "x-ms-has-immutability-policy", - type: { - name: "Boolean", - }, - }, - hasLegalHold: { - serializedName: "x-ms-has-legal-hold", - xmlName: "x-ms-has-legal-hold", - type: { - name: "Boolean", - }, - }, - defaultEncryptionScope: { - serializedName: "x-ms-default-encryption-scope", - xmlName: "x-ms-default-encryption-scope", - type: { - name: "String", - }, - }, - denyEncryptionScopeOverride: { - serializedName: "x-ms-deny-encryption-scope-override", - xmlName: "x-ms-deny-encryption-scope-override", - type: { - name: "Boolean", - }, - }, - isImmutableStorageWithVersioningEnabled: { - serializedName: "x-ms-immutable-storage-with-versioning-enabled", - xmlName: "x-ms-immutable-storage-with-versioning-enabled", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetPropertiesExceptionHeaders = { - serializedName: "Container_getPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "ContainerGetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerDeleteHeaders = { - serializedName: "Container_deleteHeaders", - type: { - name: "Composite", - className: "ContainerDeleteHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerDeleteExceptionHeaders = { - serializedName: "Container_deleteExceptionHeaders", - type: { - name: "Composite", - className: "ContainerDeleteExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetMetadataHeaders = { - serializedName: "Container_setMetadataHeaders", - type: { - name: "Composite", - className: "ContainerSetMetadataHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetMetadataExceptionHeaders = { - serializedName: "Container_setMetadataExceptionHeaders", - type: { - name: "Composite", - className: "ContainerSetMetadataExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetAccessPolicyHeaders = { - serializedName: "Container_getAccessPolicyHeaders", - type: { - name: "Composite", - className: "ContainerGetAccessPolicyHeaders", - modelProperties: { - blobPublicAccess: { - serializedName: "x-ms-blob-public-access", - xmlName: "x-ms-blob-public-access", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetAccessPolicyExceptionHeaders = { - serializedName: "Container_getAccessPolicyExceptionHeaders", - type: { - name: "Composite", - className: "ContainerGetAccessPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetAccessPolicyHeaders = { - serializedName: "Container_setAccessPolicyHeaders", - type: { - name: "Composite", - className: "ContainerSetAccessPolicyHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetAccessPolicyExceptionHeaders = { - serializedName: "Container_setAccessPolicyExceptionHeaders", - type: { - name: "Composite", - className: "ContainerSetAccessPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRestoreHeaders = { - serializedName: "Container_restoreHeaders", - type: { - name: "Composite", - className: "ContainerRestoreHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRestoreExceptionHeaders = { - serializedName: "Container_restoreExceptionHeaders", - type: { - name: "Composite", - className: "ContainerRestoreExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRenameHeaders = { - serializedName: "Container_renameHeaders", - type: { - name: "Composite", - className: "ContainerRenameHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRenameExceptionHeaders = { - serializedName: "Container_renameExceptionHeaders", - type: { - name: "Composite", - className: "ContainerRenameExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSubmitBatchHeaders = { - serializedName: "Container_submitBatchHeaders", - type: { - name: "Composite", - className: "ContainerSubmitBatchHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSubmitBatchExceptionHeaders = { - serializedName: "Container_submitBatchExceptionHeaders", - type: { - name: "Composite", - className: "ContainerSubmitBatchExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerFilterBlobsHeaders = { - serializedName: "Container_filterBlobsHeaders", - type: { - name: "Composite", - className: "ContainerFilterBlobsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerFilterBlobsExceptionHeaders = { - serializedName: "Container_filterBlobsExceptionHeaders", - type: { - name: "Composite", - className: "ContainerFilterBlobsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerAcquireLeaseHeaders = { - serializedName: "Container_acquireLeaseHeaders", - type: { - name: "Composite", - className: "ContainerAcquireLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerAcquireLeaseExceptionHeaders = { - serializedName: "Container_acquireLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerAcquireLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerReleaseLeaseHeaders = { - serializedName: "Container_releaseLeaseHeaders", - type: { - name: "Composite", - className: "ContainerReleaseLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerReleaseLeaseExceptionHeaders = { - serializedName: "Container_releaseLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerReleaseLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRenewLeaseHeaders = { - serializedName: "Container_renewLeaseHeaders", - type: { - name: "Composite", - className: "ContainerRenewLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerRenewLeaseExceptionHeaders = { - serializedName: "Container_renewLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerRenewLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerBreakLeaseHeaders = { - serializedName: "Container_breakLeaseHeaders", - type: { - name: "Composite", - className: "ContainerBreakLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseTime: { - serializedName: "x-ms-lease-time", - xmlName: "x-ms-lease-time", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerBreakLeaseExceptionHeaders = { - serializedName: "Container_breakLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerBreakLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerChangeLeaseHeaders = { - serializedName: "Container_changeLeaseHeaders", - type: { - name: "Composite", - className: "ContainerChangeLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerChangeLeaseExceptionHeaders = { - serializedName: "Container_changeLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerChangeLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobFlatSegmentHeaders = { - serializedName: "Container_listBlobFlatSegmentHeaders", - type: { - name: "Composite", - className: "ContainerListBlobFlatSegmentHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobFlatSegmentExceptionHeaders = { - serializedName: "Container_listBlobFlatSegmentExceptionHeaders", - type: { - name: "Composite", - className: "ContainerListBlobFlatSegmentExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobHierarchySegmentHeaders = { - serializedName: "Container_listBlobHierarchySegmentHeaders", - type: { - name: "Composite", - className: "ContainerListBlobHierarchySegmentHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobHierarchySegmentExceptionHeaders = { - serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", - type: { - name: "Composite", - className: "ContainerListBlobHierarchySegmentExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetAccountInfoHeaders = { - serializedName: "Container_getAccountInfoHeaders", - type: { - name: "Composite", - className: "ContainerGetAccountInfoHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - skuName: { - serializedName: "x-ms-sku-name", - xmlName: "x-ms-sku-name", - type: { - name: "Enum", - allowedValues: [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - ], - }, - }, - accountKind: { - serializedName: "x-ms-account-kind", - xmlName: "x-ms-account-kind", - type: { - name: "Enum", - allowedValues: [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage", - ], - }, - }, - isHierarchicalNamespaceEnabled: { - serializedName: "x-ms-is-hns-enabled", - xmlName: "x-ms-is-hns-enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const ContainerGetAccountInfoExceptionHeaders = { - serializedName: "Container_getAccountInfoExceptionHeaders", - type: { - name: "Composite", - className: "ContainerGetAccountInfoExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDownloadHeaders = { - serializedName: "Blob_downloadHeaders", - type: { - name: "Composite", - className: "BlobDownloadHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - createdOn: { - serializedName: "x-ms-creation-time", - xmlName: "x-ms-creation-time", - type: { - name: "DateTimeRfc1123", - }, - }, - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - objectReplicationPolicyId: { - serializedName: "x-ms-or-policy-id", - xmlName: "x-ms-or-policy-id", - type: { - name: "String", - }, - }, - objectReplicationRules: { - serializedName: "x-ms-or", - headerCollectionPrefix: "x-ms-or-", - xmlName: "x-ms-or", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - contentLength: { - serializedName: "content-length", - xmlName: "content-length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - contentRange: { - serializedName: "content-range", - xmlName: "content-range", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - contentEncoding: { - serializedName: "content-encoding", - xmlName: "content-encoding", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "cache-control", - xmlName: "cache-control", - type: { - name: "String", - }, - }, - contentDisposition: { - serializedName: "content-disposition", - xmlName: "content-disposition", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "content-language", - xmlName: "content-language", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - blobType: { - serializedName: "x-ms-blob-type", - xmlName: "x-ms-blob-type", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - copyCompletedOn: { - serializedName: "x-ms-copy-completion-time", - xmlName: "x-ms-copy-completion-time", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "x-ms-copy-status-description", - xmlName: "x-ms-copy-status-description", - type: { - name: "String", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "x-ms-copy-progress", - xmlName: "x-ms-copy-progress", - type: { - name: "String", - }, - }, - copySource: { - serializedName: "x-ms-copy-source", - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - isCurrentVersion: { - serializedName: "x-ms-is-current-version", - xmlName: "x-ms-is-current-version", - type: { - name: "Boolean", - }, - }, - acceptRanges: { - serializedName: "accept-ranges", - xmlName: "accept-ranges", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-server-encrypted", - xmlName: "x-ms-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - blobContentMD5: { - serializedName: "x-ms-blob-content-md5", - xmlName: "x-ms-blob-content-md5", - type: { - name: "ByteArray", - }, - }, - tagCount: { - serializedName: "x-ms-tag-count", - xmlName: "x-ms-tag-count", - type: { - name: "Number", - }, - }, - isSealed: { - serializedName: "x-ms-blob-sealed", - xmlName: "x-ms-blob-sealed", - type: { - name: "Boolean", - }, - }, - lastAccessed: { - serializedName: "x-ms-last-access-time", - xmlName: "x-ms-last-access-time", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiresOn: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - legalHold: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - contentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - }, - }, -}; -const BlobDownloadExceptionHeaders = { - serializedName: "Blob_downloadExceptionHeaders", - type: { - name: "Composite", - className: "BlobDownloadExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetPropertiesHeaders = { - serializedName: "Blob_getPropertiesHeaders", - type: { - name: "Composite", - className: "BlobGetPropertiesHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - createdOn: { - serializedName: "x-ms-creation-time", - xmlName: "x-ms-creation-time", - type: { - name: "DateTimeRfc1123", - }, - }, - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - objectReplicationPolicyId: { - serializedName: "x-ms-or-policy-id", - xmlName: "x-ms-or-policy-id", - type: { - name: "String", - }, - }, - objectReplicationRules: { - serializedName: "x-ms-or", - headerCollectionPrefix: "x-ms-or-", - xmlName: "x-ms-or", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - blobType: { - serializedName: "x-ms-blob-type", - xmlName: "x-ms-blob-type", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - copyCompletedOn: { - serializedName: "x-ms-copy-completion-time", - xmlName: "x-ms-copy-completion-time", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "x-ms-copy-status-description", - xmlName: "x-ms-copy-status-description", - type: { - name: "String", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "x-ms-copy-progress", - xmlName: "x-ms-copy-progress", - type: { - name: "String", - }, - }, - copySource: { - serializedName: "x-ms-copy-source", - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - isIncrementalCopy: { - serializedName: "x-ms-incremental-copy", - xmlName: "x-ms-incremental-copy", - type: { - name: "Boolean", - }, - }, - destinationSnapshot: { - serializedName: "x-ms-copy-destination-snapshot", - xmlName: "x-ms-copy-destination-snapshot", - type: { - name: "String", - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - contentLength: { - serializedName: "content-length", - xmlName: "content-length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - contentEncoding: { - serializedName: "content-encoding", - xmlName: "content-encoding", - type: { - name: "String", - }, - }, - contentDisposition: { - serializedName: "content-disposition", - xmlName: "content-disposition", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "content-language", - xmlName: "content-language", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "cache-control", - xmlName: "cache-control", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - acceptRanges: { - serializedName: "accept-ranges", - xmlName: "accept-ranges", - type: { - name: "String", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-server-encrypted", - xmlName: "x-ms-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - accessTier: { - serializedName: "x-ms-access-tier", - xmlName: "x-ms-access-tier", - type: { - name: "String", - }, - }, - accessTierInferred: { - serializedName: "x-ms-access-tier-inferred", - xmlName: "x-ms-access-tier-inferred", - type: { - name: "Boolean", - }, - }, - archiveStatus: { - serializedName: "x-ms-archive-status", - xmlName: "x-ms-archive-status", - type: { - name: "String", - }, - }, - accessTierChangedOn: { - serializedName: "x-ms-access-tier-change-time", - xmlName: "x-ms-access-tier-change-time", - type: { - name: "DateTimeRfc1123", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - isCurrentVersion: { - serializedName: "x-ms-is-current-version", - xmlName: "x-ms-is-current-version", - type: { - name: "Boolean", - }, - }, - tagCount: { - serializedName: "x-ms-tag-count", - xmlName: "x-ms-tag-count", - type: { - name: "Number", - }, - }, - expiresOn: { - serializedName: "x-ms-expiry-time", - xmlName: "x-ms-expiry-time", - type: { - name: "DateTimeRfc1123", - }, - }, - isSealed: { - serializedName: "x-ms-blob-sealed", - xmlName: "x-ms-blob-sealed", - type: { - name: "Boolean", - }, - }, - rehydratePriority: { - serializedName: "x-ms-rehydrate-priority", - xmlName: "x-ms-rehydrate-priority", - type: { - name: "Enum", - allowedValues: ["High", "Standard"], - }, - }, - lastAccessed: { - serializedName: "x-ms-last-access-time", - xmlName: "x-ms-last-access-time", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiresOn: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - legalHold: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetPropertiesExceptionHeaders = { - serializedName: "Blob_getPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "BlobGetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDeleteHeaders = { - serializedName: "Blob_deleteHeaders", - type: { - name: "Composite", - className: "BlobDeleteHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDeleteExceptionHeaders = { - serializedName: "Blob_deleteExceptionHeaders", - type: { - name: "Composite", - className: "BlobDeleteExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobUndeleteHeaders = { - serializedName: "Blob_undeleteHeaders", - type: { - name: "Composite", - className: "BlobUndeleteHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobUndeleteExceptionHeaders = { - serializedName: "Blob_undeleteExceptionHeaders", - type: { - name: "Composite", - className: "BlobUndeleteExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetExpiryHeaders = { - serializedName: "Blob_setExpiryHeaders", - type: { - name: "Composite", - className: "BlobSetExpiryHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobSetExpiryExceptionHeaders = { - serializedName: "Blob_setExpiryExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetExpiryExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetHttpHeadersHeaders = { - serializedName: "Blob_setHttpHeadersHeaders", - type: { - name: "Composite", - className: "BlobSetHttpHeadersHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetHttpHeadersExceptionHeaders = { - serializedName: "Blob_setHttpHeadersExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetHttpHeadersExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetImmutabilityPolicyHeaders = { - serializedName: "Blob_setImmutabilityPolicyHeaders", - type: { - name: "Composite", - className: "BlobSetImmutabilityPolicyHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiry: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - }, - }, -}; -const BlobSetImmutabilityPolicyExceptionHeaders = { - serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetImmutabilityPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDeleteImmutabilityPolicyHeaders = { - serializedName: "Blob_deleteImmutabilityPolicyHeaders", - type: { - name: "Composite", - className: "BlobDeleteImmutabilityPolicyHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobDeleteImmutabilityPolicyExceptionHeaders = { - serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", - type: { - name: "Composite", - className: "BlobDeleteImmutabilityPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetLegalHoldHeaders = { - serializedName: "Blob_setLegalHoldHeaders", - type: { - name: "Composite", - className: "BlobSetLegalHoldHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - legalHold: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const BlobSetLegalHoldExceptionHeaders = { - serializedName: "Blob_setLegalHoldExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetLegalHoldExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetMetadataHeaders = { - serializedName: "Blob_setMetadataHeaders", - type: { - name: "Composite", - className: "BlobSetMetadataHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetMetadataExceptionHeaders = { - serializedName: "Blob_setMetadataExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetMetadataExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobAcquireLeaseHeaders = { - serializedName: "Blob_acquireLeaseHeaders", - type: { - name: "Composite", - className: "BlobAcquireLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobAcquireLeaseExceptionHeaders = { - serializedName: "Blob_acquireLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobAcquireLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobReleaseLeaseHeaders = { - serializedName: "Blob_releaseLeaseHeaders", - type: { - name: "Composite", - className: "BlobReleaseLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobReleaseLeaseExceptionHeaders = { - serializedName: "Blob_releaseLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobReleaseLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobRenewLeaseHeaders = { - serializedName: "Blob_renewLeaseHeaders", - type: { - name: "Composite", - className: "BlobRenewLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobRenewLeaseExceptionHeaders = { - serializedName: "Blob_renewLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobRenewLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobChangeLeaseHeaders = { - serializedName: "Blob_changeLeaseHeaders", - type: { - name: "Composite", - className: "BlobChangeLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobChangeLeaseExceptionHeaders = { - serializedName: "Blob_changeLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobChangeLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobBreakLeaseHeaders = { - serializedName: "Blob_breakLeaseHeaders", - type: { - name: "Composite", - className: "BlobBreakLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseTime: { - serializedName: "x-ms-lease-time", - xmlName: "x-ms-lease-time", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobBreakLeaseExceptionHeaders = { - serializedName: "Blob_breakLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobBreakLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCreateSnapshotHeaders = { - serializedName: "Blob_createSnapshotHeaders", - type: { - name: "Composite", - className: "BlobCreateSnapshotHeaders", - modelProperties: { - snapshot: { - serializedName: "x-ms-snapshot", - xmlName: "x-ms-snapshot", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCreateSnapshotExceptionHeaders = { - serializedName: "Blob_createSnapshotExceptionHeaders", - type: { - name: "Composite", - className: "BlobCreateSnapshotExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobStartCopyFromURLHeaders = { - serializedName: "Blob_startCopyFromURLHeaders", - type: { - name: "Composite", - className: "BlobStartCopyFromURLHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobStartCopyFromURLExceptionHeaders = { - serializedName: "Blob_startCopyFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlobStartCopyFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCopyFromURLHeaders = { - serializedName: "Blob_copyFromURLHeaders", - type: { - name: "Composite", - className: "BlobCopyFromURLHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyStatus: { - defaultValue: "success", - isConstant: true, - serializedName: "x-ms-copy-status", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCopyFromURLExceptionHeaders = { - serializedName: "Blob_copyFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlobCopyFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobAbortCopyFromURLHeaders = { - serializedName: "Blob_abortCopyFromURLHeaders", - type: { - name: "Composite", - className: "BlobAbortCopyFromURLHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobAbortCopyFromURLExceptionHeaders = { - serializedName: "Blob_abortCopyFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlobAbortCopyFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTierHeaders = { - serializedName: "Blob_setTierHeaders", - type: { - name: "Composite", - className: "BlobSetTierHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTierExceptionHeaders = { - serializedName: "Blob_setTierExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetTierExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetAccountInfoHeaders = { - serializedName: "Blob_getAccountInfoHeaders", - type: { - name: "Composite", - className: "BlobGetAccountInfoHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - skuName: { - serializedName: "x-ms-sku-name", - xmlName: "x-ms-sku-name", - type: { - name: "Enum", - allowedValues: [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - ], - }, - }, - accountKind: { - serializedName: "x-ms-account-kind", - xmlName: "x-ms-account-kind", - type: { - name: "Enum", - allowedValues: [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage", - ], - }, - }, - isHierarchicalNamespaceEnabled: { - serializedName: "x-ms-is-hns-enabled", - xmlName: "x-ms-is-hns-enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const BlobGetAccountInfoExceptionHeaders = { - serializedName: "Blob_getAccountInfoExceptionHeaders", - type: { - name: "Composite", - className: "BlobGetAccountInfoExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobQueryHeaders = { - serializedName: "Blob_queryHeaders", - type: { - name: "Composite", - className: "BlobQueryHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - contentLength: { - serializedName: "content-length", - xmlName: "content-length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - contentRange: { - serializedName: "content-range", - xmlName: "content-range", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - contentEncoding: { - serializedName: "content-encoding", - xmlName: "content-encoding", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "cache-control", - xmlName: "cache-control", - type: { - name: "String", - }, - }, - contentDisposition: { - serializedName: "content-disposition", - xmlName: "content-disposition", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "content-language", - xmlName: "content-language", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - blobType: { - serializedName: "x-ms-blob-type", - xmlName: "x-ms-blob-type", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - copyCompletionTime: { - serializedName: "x-ms-copy-completion-time", - xmlName: "x-ms-copy-completion-time", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "x-ms-copy-status-description", - xmlName: "x-ms-copy-status-description", - type: { - name: "String", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "x-ms-copy-progress", - xmlName: "x-ms-copy-progress", - type: { - name: "String", - }, - }, - copySource: { - serializedName: "x-ms-copy-source", - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - acceptRanges: { - serializedName: "accept-ranges", - xmlName: "accept-ranges", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-server-encrypted", - xmlName: "x-ms-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - blobContentMD5: { - serializedName: "x-ms-blob-content-md5", - xmlName: "x-ms-blob-content-md5", - type: { - name: "ByteArray", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - contentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - }, - }, -}; -const BlobQueryExceptionHeaders = { - serializedName: "Blob_queryExceptionHeaders", - type: { - name: "Composite", - className: "BlobQueryExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetTagsHeaders = { - serializedName: "Blob_getTagsHeaders", - type: { - name: "Composite", - className: "BlobGetTagsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetTagsExceptionHeaders = { - serializedName: "Blob_getTagsExceptionHeaders", - type: { - name: "Composite", - className: "BlobGetTagsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTagsHeaders = { - serializedName: "Blob_setTagsHeaders", - type: { - name: "Composite", - className: "BlobSetTagsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTagsExceptionHeaders = { - serializedName: "Blob_setTagsExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetTagsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCreateHeaders = { - serializedName: "PageBlob_createHeaders", - type: { - name: "Composite", - className: "PageBlobCreateHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCreateExceptionHeaders = { - serializedName: "PageBlob_createExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobCreateExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesHeaders = { - serializedName: "PageBlob_uploadPagesHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesExceptionHeaders = { - serializedName: "PageBlob_uploadPagesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobClearPagesHeaders = { - serializedName: "PageBlob_clearPagesHeaders", - type: { - name: "Composite", - className: "PageBlobClearPagesHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobClearPagesExceptionHeaders = { - serializedName: "PageBlob_clearPagesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobClearPagesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesFromURLHeaders = { - serializedName: "PageBlob_uploadPagesFromURLHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesFromURLHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesFromURLExceptionHeaders = { - serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesHeaders = { - serializedName: "PageBlob_getPageRangesHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - blobContentLength: { - serializedName: "x-ms-blob-content-length", - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesExceptionHeaders = { - serializedName: "PageBlob_getPageRangesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesDiffHeaders = { - serializedName: "PageBlob_getPageRangesDiffHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesDiffHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - blobContentLength: { - serializedName: "x-ms-blob-content-length", - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesDiffExceptionHeaders = { - serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesDiffExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobResizeHeaders = { - serializedName: "PageBlob_resizeHeaders", - type: { - name: "Composite", - className: "PageBlobResizeHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobResizeExceptionHeaders = { - serializedName: "PageBlob_resizeExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobResizeExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUpdateSequenceNumberHeaders = { - serializedName: "PageBlob_updateSequenceNumberHeaders", - type: { - name: "Composite", - className: "PageBlobUpdateSequenceNumberHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUpdateSequenceNumberExceptionHeaders = { - serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobUpdateSequenceNumberExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCopyIncrementalHeaders = { - serializedName: "PageBlob_copyIncrementalHeaders", - type: { - name: "Composite", - className: "PageBlobCopyIncrementalHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCopyIncrementalExceptionHeaders = { - serializedName: "PageBlob_copyIncrementalExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobCopyIncrementalExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobCreateHeaders = { - serializedName: "AppendBlob_createHeaders", - type: { - name: "Composite", - className: "AppendBlobCreateHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobCreateExceptionHeaders = { - serializedName: "AppendBlob_createExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobCreateExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockHeaders = { - serializedName: "AppendBlob_appendBlockHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobAppendOffset: { - serializedName: "x-ms-blob-append-offset", - xmlName: "x-ms-blob-append-offset", - type: { - name: "String", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockExceptionHeaders = { - serializedName: "AppendBlob_appendBlockExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockFromUrlHeaders = { - serializedName: "AppendBlob_appendBlockFromUrlHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockFromUrlHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobAppendOffset: { - serializedName: "x-ms-blob-append-offset", - xmlName: "x-ms-blob-append-offset", - type: { - name: "String", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockFromUrlExceptionHeaders = { - serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockFromUrlExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobSealHeaders = { - serializedName: "AppendBlob_sealHeaders", - type: { - name: "Composite", - className: "AppendBlobSealHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isSealed: { - serializedName: "x-ms-blob-sealed", - xmlName: "x-ms-blob-sealed", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const AppendBlobSealExceptionHeaders = { - serializedName: "AppendBlob_sealExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobSealExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobUploadHeaders = { - serializedName: "BlockBlob_uploadHeaders", - type: { - name: "Composite", - className: "BlockBlobUploadHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobUploadExceptionHeaders = { - serializedName: "BlockBlob_uploadExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobUploadExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobPutBlobFromUrlHeaders = { - serializedName: "BlockBlob_putBlobFromUrlHeaders", - type: { - name: "Composite", - className: "BlockBlobPutBlobFromUrlHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobPutBlobFromUrlExceptionHeaders = { - serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobPutBlobFromUrlExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockHeaders = { - serializedName: "BlockBlob_stageBlockHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockHeaders", - modelProperties: { - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockExceptionHeaders = { - serializedName: "BlockBlob_stageBlockExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockFromURLHeaders = { - serializedName: "BlockBlob_stageBlockFromURLHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockFromURLHeaders", - modelProperties: { - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockFromURLExceptionHeaders = { - serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobCommitBlockListHeaders = { - serializedName: "BlockBlob_commitBlockListHeaders", - type: { - name: "Composite", - className: "BlockBlobCommitBlockListHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobCommitBlockListExceptionHeaders = { - serializedName: "BlockBlob_commitBlockListExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobCommitBlockListExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobGetBlockListHeaders = { - serializedName: "BlockBlob_getBlockListHeaders", - type: { - name: "Composite", - className: "BlockBlobGetBlockListHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - blobContentLength: { - serializedName: "x-ms-blob-content-length", - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobGetBlockListExceptionHeaders = { - serializedName: "BlockBlob_getBlockListExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobGetBlockListExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; - -var Mappers = /*#__PURE__*/Object.freeze({ - __proto__: null, - AccessPolicy: AccessPolicy, - AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders: AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders: AppendBlobSealHeaders, - ArrowConfiguration: ArrowConfiguration, - ArrowField: ArrowField, - BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders: BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders: BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders: BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders, - BlobDeleteHeaders: BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders, - BlobDownloadHeaders: BlobDownloadHeaders, - BlobFlatListSegment: BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders: BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders: BlobGetTagsHeaders, - BlobHierarchyListSegment: BlobHierarchyListSegment, - BlobItemInternal: BlobItemInternal, - BlobName: BlobName, - BlobPrefix: BlobPrefix, - BlobPropertiesInternal: BlobPropertiesInternal, - BlobQueryExceptionHeaders: BlobQueryExceptionHeaders, - BlobQueryHeaders: BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders: BlobRenewLeaseHeaders, - BlobServiceProperties: BlobServiceProperties, - BlobServiceStatistics: BlobServiceStatistics, - BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders: BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders: BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders: BlobSetTagsHeaders, - BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders, - BlobSetTierHeaders: BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders, - BlobTag: BlobTag, - BlobTags: BlobTags, - BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders: BlobUndeleteHeaders, - Block: Block, - BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders: BlockBlobUploadHeaders, - BlockList: BlockList, - BlockLookupList: BlockLookupList, - ClearRange: ClearRange, - ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders, - ContainerCreateHeaders: ContainerCreateHeaders, - ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders: ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders, - ContainerItem: ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders, - ContainerProperties: ContainerProperties, - ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders, - ContainerRenameHeaders: ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders: ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders: ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders, - CorsRule: CorsRule, - DelimitedTextConfiguration: DelimitedTextConfiguration, - FilterBlobItem: FilterBlobItem, - FilterBlobSegment: FilterBlobSegment, - GeoReplication: GeoReplication, - JsonTextConfiguration: JsonTextConfiguration, - KeyInfo: KeyInfo, - ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse: ListContainersSegmentResponse, - Logging: Logging, - Metrics: Metrics, - PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders: PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders: PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders: PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders, - PageList: PageList, - PageRange: PageRange, - QueryFormat: QueryFormat, - QueryRequest: QueryRequest, - QuerySerialization: QuerySerialization, - RetentionPolicy: RetentionPolicy, - ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders, - SignedIdentifier: SignedIdentifier, - StaticWebsite: StaticWebsite, - StorageError: StorageError, - UserDelegationKey: UserDelegationKey -}); - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -const contentType = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; -const blobServiceProperties = { - parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties, -}; -const accept = { - parameterPath: "accept", - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; -const url = { - parameterPath: "url", - mapper: { - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String", - }, - }, - skipEncoding: true, -}; -const restype = { - parameterPath: "restype", - mapper: { - defaultValue: "service", - isConstant: true, - serializedName: "restype", - type: { - name: "String", - }, - }, -}; -const comp = { - parameterPath: "comp", - mapper: { - defaultValue: "properties", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const timeoutInSeconds = { - parameterPath: ["options", "timeoutInSeconds"], - mapper: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "timeout", - xmlName: "timeout", - type: { - name: "Number", - }, - }, -}; -const version = { - parameterPath: "version", - mapper: { - defaultValue: "2025-05-05", - isConstant: true, - serializedName: "x-ms-version", - type: { - name: "String", - }, - }, -}; -const requestId = { - parameterPath: ["options", "requestId"], - mapper: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, -}; -const accept1 = { - parameterPath: "accept", - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; -const comp1 = { - parameterPath: "comp", - mapper: { - defaultValue: "stats", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const comp2 = { - parameterPath: "comp", - mapper: { - defaultValue: "list", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const prefix = { - parameterPath: ["options", "prefix"], - mapper: { - serializedName: "prefix", - xmlName: "prefix", - type: { - name: "String", - }, - }, -}; -const marker = { - parameterPath: ["options", "marker"], - mapper: { - serializedName: "marker", - xmlName: "marker", - type: { - name: "String", - }, - }, -}; -const maxPageSize = { - parameterPath: ["options", "maxPageSize"], - mapper: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "maxresults", - xmlName: "maxresults", - type: { - name: "Number", - }, - }, -}; -const include = { - parameterPath: ["options", "include"], - mapper: { - serializedName: "include", - xmlName: "include", - xmlElementName: "ListContainersIncludeType", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: ["metadata", "deleted", "system"], - }, - }, - }, - }, - collectionFormat: "CSV", -}; -const keyInfo = { - parameterPath: "keyInfo", - mapper: KeyInfo, -}; -const comp3 = { - parameterPath: "comp", - mapper: { - defaultValue: "userdelegationkey", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const restype1 = { - parameterPath: "restype", - mapper: { - defaultValue: "account", - isConstant: true, - serializedName: "restype", - type: { - name: "String", - }, - }, -}; -const body = { - parameterPath: "body", - mapper: { - serializedName: "body", - required: true, - xmlName: "body", - type: { - name: "Stream", - }, - }, -}; -const comp4 = { - parameterPath: "comp", - mapper: { - defaultValue: "batch", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const contentLength = { - parameterPath: "contentLength", - mapper: { - serializedName: "Content-Length", - required: true, - xmlName: "Content-Length", - type: { - name: "Number", - }, - }, -}; -const multipartContentType = { - parameterPath: "multipartContentType", - mapper: { - serializedName: "Content-Type", - required: true, - xmlName: "Content-Type", - type: { - name: "String", - }, - }, -}; -const comp5 = { - parameterPath: "comp", - mapper: { - defaultValue: "blobs", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const where = { - parameterPath: ["options", "where"], - mapper: { - serializedName: "where", - xmlName: "where", - type: { - name: "String", - }, - }, -}; -const restype2 = { - parameterPath: "restype", - mapper: { - defaultValue: "container", - isConstant: true, - serializedName: "restype", - type: { - name: "String", - }, - }, -}; -const metadata = { - parameterPath: ["options", "metadata"], - mapper: { - serializedName: "x-ms-meta", - xmlName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, -}; -const access = { - parameterPath: ["options", "access"], - mapper: { - serializedName: "x-ms-blob-public-access", - xmlName: "x-ms-blob-public-access", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, -}; -const defaultEncryptionScope = { - parameterPath: [ - "options", - "containerEncryptionScope", - "defaultEncryptionScope", - ], - mapper: { - serializedName: "x-ms-default-encryption-scope", - xmlName: "x-ms-default-encryption-scope", - type: { - name: "String", - }, - }, -}; -const preventEncryptionScopeOverride = { - parameterPath: [ - "options", - "containerEncryptionScope", - "preventEncryptionScopeOverride", - ], - mapper: { - serializedName: "x-ms-deny-encryption-scope-override", - xmlName: "x-ms-deny-encryption-scope-override", - type: { - name: "Boolean", - }, - }, -}; -const leaseId = { - parameterPath: ["options", "leaseAccessConditions", "leaseId"], - mapper: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, -}; -const ifModifiedSince = { - parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], - mapper: { - serializedName: "If-Modified-Since", - xmlName: "If-Modified-Since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const ifUnmodifiedSince = { - parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], - mapper: { - serializedName: "If-Unmodified-Since", - xmlName: "If-Unmodified-Since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const comp6 = { - parameterPath: "comp", - mapper: { - defaultValue: "metadata", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const comp7 = { - parameterPath: "comp", - mapper: { - defaultValue: "acl", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const containerAcl = { - parameterPath: ["options", "containerAcl"], - mapper: { - serializedName: "containerAcl", - xmlName: "SignedIdentifiers", - xmlIsWrapped: true, - xmlElementName: "SignedIdentifier", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SignedIdentifier", - }, - }, - }, - }, -}; -const comp8 = { - parameterPath: "comp", - mapper: { - defaultValue: "undelete", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const deletedContainerName = { - parameterPath: ["options", "deletedContainerName"], - mapper: { - serializedName: "x-ms-deleted-container-name", - xmlName: "x-ms-deleted-container-name", - type: { - name: "String", - }, - }, -}; -const deletedContainerVersion = { - parameterPath: ["options", "deletedContainerVersion"], - mapper: { - serializedName: "x-ms-deleted-container-version", - xmlName: "x-ms-deleted-container-version", - type: { - name: "String", - }, - }, -}; -const comp9 = { - parameterPath: "comp", - mapper: { - defaultValue: "rename", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const sourceContainerName = { - parameterPath: "sourceContainerName", - mapper: { - serializedName: "x-ms-source-container-name", - required: true, - xmlName: "x-ms-source-container-name", - type: { - name: "String", - }, - }, -}; -const sourceLeaseId = { - parameterPath: ["options", "sourceLeaseId"], - mapper: { - serializedName: "x-ms-source-lease-id", - xmlName: "x-ms-source-lease-id", - type: { - name: "String", - }, - }, -}; -const comp10 = { - parameterPath: "comp", - mapper: { - defaultValue: "lease", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const action = { - parameterPath: "action", - mapper: { - defaultValue: "acquire", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const duration = { - parameterPath: ["options", "duration"], - mapper: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Number", - }, - }, -}; -const proposedLeaseId = { - parameterPath: ["options", "proposedLeaseId"], - mapper: { - serializedName: "x-ms-proposed-lease-id", - xmlName: "x-ms-proposed-lease-id", - type: { - name: "String", - }, - }, -}; -const action1 = { - parameterPath: "action", - mapper: { - defaultValue: "release", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const leaseId1 = { - parameterPath: "leaseId", - mapper: { - serializedName: "x-ms-lease-id", - required: true, - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, -}; -const action2 = { - parameterPath: "action", - mapper: { - defaultValue: "renew", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const action3 = { - parameterPath: "action", - mapper: { - defaultValue: "break", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const breakPeriod = { - parameterPath: ["options", "breakPeriod"], - mapper: { - serializedName: "x-ms-lease-break-period", - xmlName: "x-ms-lease-break-period", - type: { - name: "Number", - }, - }, -}; -const action4 = { - parameterPath: "action", - mapper: { - defaultValue: "change", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const proposedLeaseId1 = { - parameterPath: "proposedLeaseId", - mapper: { - serializedName: "x-ms-proposed-lease-id", - required: true, - xmlName: "x-ms-proposed-lease-id", - type: { - name: "String", - }, - }, -}; -const include1 = { - parameterPath: ["options", "include"], - mapper: { - serializedName: "include", - xmlName: "include", - xmlElementName: "ListBlobsIncludeItem", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "copy", - "deleted", - "metadata", - "snapshots", - "uncommittedblobs", - "versions", - "tags", - "immutabilitypolicy", - "legalhold", - "deletedwithversions", - ], - }, - }, - }, - }, - collectionFormat: "CSV", -}; -const delimiter = { - parameterPath: "delimiter", - mapper: { - serializedName: "delimiter", - required: true, - xmlName: "delimiter", - type: { - name: "String", - }, - }, -}; -const snapshot = { - parameterPath: ["options", "snapshot"], - mapper: { - serializedName: "snapshot", - xmlName: "snapshot", - type: { - name: "String", - }, - }, -}; -const versionId = { - parameterPath: ["options", "versionId"], - mapper: { - serializedName: "versionid", - xmlName: "versionid", - type: { - name: "String", - }, - }, -}; -const range = { - parameterPath: ["options", "range"], - mapper: { - serializedName: "x-ms-range", - xmlName: "x-ms-range", - type: { - name: "String", - }, - }, -}; -const rangeGetContentMD5 = { - parameterPath: ["options", "rangeGetContentMD5"], - mapper: { - serializedName: "x-ms-range-get-content-md5", - xmlName: "x-ms-range-get-content-md5", - type: { - name: "Boolean", - }, - }, -}; -const rangeGetContentCRC64 = { - parameterPath: ["options", "rangeGetContentCRC64"], - mapper: { - serializedName: "x-ms-range-get-content-crc64", - xmlName: "x-ms-range-get-content-crc64", - type: { - name: "Boolean", - }, - }, -}; -const encryptionKey = { - parameterPath: ["options", "cpkInfo", "encryptionKey"], - mapper: { - serializedName: "x-ms-encryption-key", - xmlName: "x-ms-encryption-key", - type: { - name: "String", - }, - }, -}; -const encryptionKeySha256 = { - parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], - mapper: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, -}; -const encryptionAlgorithm = { - parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], - mapper: { - serializedName: "x-ms-encryption-algorithm", - xmlName: "x-ms-encryption-algorithm", - type: { - name: "String", - }, - }, -}; -const ifMatch = { - parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], - mapper: { - serializedName: "If-Match", - xmlName: "If-Match", - type: { - name: "String", - }, - }, -}; -const ifNoneMatch = { - parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], - mapper: { - serializedName: "If-None-Match", - xmlName: "If-None-Match", - type: { - name: "String", - }, - }, -}; -const ifTags = { - parameterPath: ["options", "modifiedAccessConditions", "ifTags"], - mapper: { - serializedName: "x-ms-if-tags", - xmlName: "x-ms-if-tags", - type: { - name: "String", - }, - }, -}; -const deleteSnapshots = { - parameterPath: ["options", "deleteSnapshots"], - mapper: { - serializedName: "x-ms-delete-snapshots", - xmlName: "x-ms-delete-snapshots", - type: { - name: "Enum", - allowedValues: ["include", "only"], - }, - }, -}; -const blobDeleteType = { - parameterPath: ["options", "blobDeleteType"], - mapper: { - serializedName: "deletetype", - xmlName: "deletetype", - type: { - name: "String", - }, - }, -}; -const comp11 = { - parameterPath: "comp", - mapper: { - defaultValue: "expiry", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const expiryOptions = { - parameterPath: "expiryOptions", - mapper: { - serializedName: "x-ms-expiry-option", - required: true, - xmlName: "x-ms-expiry-option", - type: { - name: "String", - }, - }, -}; -const expiresOn = { - parameterPath: ["options", "expiresOn"], - mapper: { - serializedName: "x-ms-expiry-time", - xmlName: "x-ms-expiry-time", - type: { - name: "String", - }, - }, -}; -const blobCacheControl = { - parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], - mapper: { - serializedName: "x-ms-blob-cache-control", - xmlName: "x-ms-blob-cache-control", - type: { - name: "String", - }, - }, -}; -const blobContentType = { - parameterPath: ["options", "blobHttpHeaders", "blobContentType"], - mapper: { - serializedName: "x-ms-blob-content-type", - xmlName: "x-ms-blob-content-type", - type: { - name: "String", - }, - }, -}; -const blobContentMD5 = { - parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], - mapper: { - serializedName: "x-ms-blob-content-md5", - xmlName: "x-ms-blob-content-md5", - type: { - name: "ByteArray", - }, - }, -}; -const blobContentEncoding = { - parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], - mapper: { - serializedName: "x-ms-blob-content-encoding", - xmlName: "x-ms-blob-content-encoding", - type: { - name: "String", - }, - }, -}; -const blobContentLanguage = { - parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], - mapper: { - serializedName: "x-ms-blob-content-language", - xmlName: "x-ms-blob-content-language", - type: { - name: "String", - }, - }, -}; -const blobContentDisposition = { - parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], - mapper: { - serializedName: "x-ms-blob-content-disposition", - xmlName: "x-ms-blob-content-disposition", - type: { - name: "String", - }, - }, -}; -const comp12 = { - parameterPath: "comp", - mapper: { - defaultValue: "immutabilityPolicies", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const immutabilityPolicyExpiry = { - parameterPath: ["options", "immutabilityPolicyExpiry"], - mapper: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const immutabilityPolicyMode = { - parameterPath: ["options", "immutabilityPolicyMode"], - mapper: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, -}; -const comp13 = { - parameterPath: "comp", - mapper: { - defaultValue: "legalhold", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const legalHold = { - parameterPath: "legalHold", - mapper: { - serializedName: "x-ms-legal-hold", - required: true, - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, -}; -const encryptionScope = { - parameterPath: ["options", "encryptionScope"], - mapper: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, -}; -const comp14 = { - parameterPath: "comp", - mapper: { - defaultValue: "snapshot", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const tier = { - parameterPath: ["options", "tier"], - mapper: { - serializedName: "x-ms-access-tier", - xmlName: "x-ms-access-tier", - type: { - name: "Enum", - allowedValues: [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - ], - }, - }, -}; -const rehydratePriority = { - parameterPath: ["options", "rehydratePriority"], - mapper: { - serializedName: "x-ms-rehydrate-priority", - xmlName: "x-ms-rehydrate-priority", - type: { - name: "Enum", - allowedValues: ["High", "Standard"], - }, - }, -}; -const sourceIfModifiedSince = { - parameterPath: [ - "options", - "sourceModifiedAccessConditions", - "sourceIfModifiedSince", - ], - mapper: { - serializedName: "x-ms-source-if-modified-since", - xmlName: "x-ms-source-if-modified-since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const sourceIfUnmodifiedSince = { - parameterPath: [ - "options", - "sourceModifiedAccessConditions", - "sourceIfUnmodifiedSince", - ], - mapper: { - serializedName: "x-ms-source-if-unmodified-since", - xmlName: "x-ms-source-if-unmodified-since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const sourceIfMatch = { - parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], - mapper: { - serializedName: "x-ms-source-if-match", - xmlName: "x-ms-source-if-match", - type: { - name: "String", - }, - }, -}; -const sourceIfNoneMatch = { - parameterPath: [ - "options", - "sourceModifiedAccessConditions", - "sourceIfNoneMatch", - ], - mapper: { - serializedName: "x-ms-source-if-none-match", - xmlName: "x-ms-source-if-none-match", - type: { - name: "String", - }, - }, -}; -const sourceIfTags = { - parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], - mapper: { - serializedName: "x-ms-source-if-tags", - xmlName: "x-ms-source-if-tags", - type: { - name: "String", - }, - }, -}; -const copySource = { - parameterPath: "copySource", - mapper: { - serializedName: "x-ms-copy-source", - required: true, - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, -}; -const blobTagsString = { - parameterPath: ["options", "blobTagsString"], - mapper: { - serializedName: "x-ms-tags", - xmlName: "x-ms-tags", - type: { - name: "String", - }, - }, -}; -const sealBlob = { - parameterPath: ["options", "sealBlob"], - mapper: { - serializedName: "x-ms-seal-blob", - xmlName: "x-ms-seal-blob", - type: { - name: "Boolean", - }, - }, -}; -const legalHold1 = { - parameterPath: ["options", "legalHold"], - mapper: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, -}; -const xMsRequiresSync = { - parameterPath: "xMsRequiresSync", - mapper: { - defaultValue: "true", - isConstant: true, - serializedName: "x-ms-requires-sync", - type: { - name: "String", - }, - }, -}; -const sourceContentMD5 = { - parameterPath: ["options", "sourceContentMD5"], - mapper: { - serializedName: "x-ms-source-content-md5", - xmlName: "x-ms-source-content-md5", - type: { - name: "ByteArray", - }, - }, -}; -const copySourceAuthorization = { - parameterPath: ["options", "copySourceAuthorization"], - mapper: { - serializedName: "x-ms-copy-source-authorization", - xmlName: "x-ms-copy-source-authorization", - type: { - name: "String", - }, - }, -}; -const copySourceTags = { - parameterPath: ["options", "copySourceTags"], - mapper: { - serializedName: "x-ms-copy-source-tag-option", - xmlName: "x-ms-copy-source-tag-option", - type: { - name: "Enum", - allowedValues: ["REPLACE", "COPY"], - }, - }, -}; -const comp15 = { - parameterPath: "comp", - mapper: { - defaultValue: "copy", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const copyActionAbortConstant = { - parameterPath: "copyActionAbortConstant", - mapper: { - defaultValue: "abort", - isConstant: true, - serializedName: "x-ms-copy-action", - type: { - name: "String", - }, - }, -}; -const copyId = { - parameterPath: "copyId", - mapper: { - serializedName: "copyid", - required: true, - xmlName: "copyid", - type: { - name: "String", - }, - }, -}; -const comp16 = { - parameterPath: "comp", - mapper: { - defaultValue: "tier", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const tier1 = { - parameterPath: "tier", - mapper: { - serializedName: "x-ms-access-tier", - required: true, - xmlName: "x-ms-access-tier", - type: { - name: "Enum", - allowedValues: [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - ], - }, - }, -}; -const queryRequest = { - parameterPath: ["options", "queryRequest"], - mapper: QueryRequest, -}; -const comp17 = { - parameterPath: "comp", - mapper: { - defaultValue: "query", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const comp18 = { - parameterPath: "comp", - mapper: { - defaultValue: "tags", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const tags = { - parameterPath: ["options", "tags"], - mapper: BlobTags, -}; -const transactionalContentMD5 = { - parameterPath: ["options", "transactionalContentMD5"], - mapper: { - serializedName: "Content-MD5", - xmlName: "Content-MD5", - type: { - name: "ByteArray", - }, - }, -}; -const transactionalContentCrc64 = { - parameterPath: ["options", "transactionalContentCrc64"], - mapper: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, -}; -const blobType = { - parameterPath: "blobType", - mapper: { - defaultValue: "PageBlob", - isConstant: true, - serializedName: "x-ms-blob-type", - type: { - name: "String", - }, - }, -}; -const blobContentLength = { - parameterPath: "blobContentLength", - mapper: { - serializedName: "x-ms-blob-content-length", - required: true, - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, -}; -const blobSequenceNumber = { - parameterPath: ["options", "blobSequenceNumber"], - mapper: { - defaultValue: 0, - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, -}; -const contentType1 = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/octet-stream", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; -const body1 = { - parameterPath: "body", - mapper: { - serializedName: "body", - required: true, - xmlName: "body", - type: { - name: "Stream", - }, - }, -}; -const accept2 = { - parameterPath: "accept", - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; -const comp19 = { - parameterPath: "comp", - mapper: { - defaultValue: "page", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const pageWrite = { - parameterPath: "pageWrite", - mapper: { - defaultValue: "update", - isConstant: true, - serializedName: "x-ms-page-write", - type: { - name: "String", - }, - }, -}; -const ifSequenceNumberLessThanOrEqualTo = { - parameterPath: [ - "options", - "sequenceNumberAccessConditions", - "ifSequenceNumberLessThanOrEqualTo", - ], - mapper: { - serializedName: "x-ms-if-sequence-number-le", - xmlName: "x-ms-if-sequence-number-le", - type: { - name: "Number", - }, - }, -}; -const ifSequenceNumberLessThan = { - parameterPath: [ - "options", - "sequenceNumberAccessConditions", - "ifSequenceNumberLessThan", - ], - mapper: { - serializedName: "x-ms-if-sequence-number-lt", - xmlName: "x-ms-if-sequence-number-lt", - type: { - name: "Number", - }, - }, -}; -const ifSequenceNumberEqualTo = { - parameterPath: [ - "options", - "sequenceNumberAccessConditions", - "ifSequenceNumberEqualTo", - ], - mapper: { - serializedName: "x-ms-if-sequence-number-eq", - xmlName: "x-ms-if-sequence-number-eq", - type: { - name: "Number", - }, - }, -}; -const pageWrite1 = { - parameterPath: "pageWrite", - mapper: { - defaultValue: "clear", - isConstant: true, - serializedName: "x-ms-page-write", - type: { - name: "String", - }, - }, -}; -const sourceUrl = { - parameterPath: "sourceUrl", - mapper: { - serializedName: "x-ms-copy-source", - required: true, - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, -}; -const sourceRange = { - parameterPath: "sourceRange", - mapper: { - serializedName: "x-ms-source-range", - required: true, - xmlName: "x-ms-source-range", - type: { - name: "String", - }, - }, -}; -const sourceContentCrc64 = { - parameterPath: ["options", "sourceContentCrc64"], - mapper: { - serializedName: "x-ms-source-content-crc64", - xmlName: "x-ms-source-content-crc64", - type: { - name: "ByteArray", - }, - }, -}; -const range1 = { - parameterPath: "range", - mapper: { - serializedName: "x-ms-range", - required: true, - xmlName: "x-ms-range", - type: { - name: "String", - }, - }, -}; -const comp20 = { - parameterPath: "comp", - mapper: { - defaultValue: "pagelist", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const prevsnapshot = { - parameterPath: ["options", "prevsnapshot"], - mapper: { - serializedName: "prevsnapshot", - xmlName: "prevsnapshot", - type: { - name: "String", - }, - }, -}; -const prevSnapshotUrl = { - parameterPath: ["options", "prevSnapshotUrl"], - mapper: { - serializedName: "x-ms-previous-snapshot-url", - xmlName: "x-ms-previous-snapshot-url", - type: { - name: "String", - }, - }, -}; -const sequenceNumberAction = { - parameterPath: "sequenceNumberAction", - mapper: { - serializedName: "x-ms-sequence-number-action", - required: true, - xmlName: "x-ms-sequence-number-action", - type: { - name: "Enum", - allowedValues: ["max", "update", "increment"], - }, - }, -}; -const comp21 = { - parameterPath: "comp", - mapper: { - defaultValue: "incrementalcopy", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const blobType1 = { - parameterPath: "blobType", - mapper: { - defaultValue: "AppendBlob", - isConstant: true, - serializedName: "x-ms-blob-type", - type: { - name: "String", - }, - }, -}; -const comp22 = { - parameterPath: "comp", - mapper: { - defaultValue: "appendblock", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const maxSize = { - parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], - mapper: { - serializedName: "x-ms-blob-condition-maxsize", - xmlName: "x-ms-blob-condition-maxsize", - type: { - name: "Number", - }, - }, -}; -const appendPosition = { - parameterPath: [ - "options", - "appendPositionAccessConditions", - "appendPosition", - ], - mapper: { - serializedName: "x-ms-blob-condition-appendpos", - xmlName: "x-ms-blob-condition-appendpos", - type: { - name: "Number", - }, - }, -}; -const sourceRange1 = { - parameterPath: ["options", "sourceRange"], - mapper: { - serializedName: "x-ms-source-range", - xmlName: "x-ms-source-range", - type: { - name: "String", - }, - }, -}; -const comp23 = { - parameterPath: "comp", - mapper: { - defaultValue: "seal", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const blobType2 = { - parameterPath: "blobType", - mapper: { - defaultValue: "BlockBlob", - isConstant: true, - serializedName: "x-ms-blob-type", - type: { - name: "String", - }, - }, -}; -const copySourceBlobProperties = { - parameterPath: ["options", "copySourceBlobProperties"], - mapper: { - serializedName: "x-ms-copy-source-blob-properties", - xmlName: "x-ms-copy-source-blob-properties", - type: { - name: "Boolean", - }, - }, -}; -const comp24 = { - parameterPath: "comp", - mapper: { - defaultValue: "block", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const blockId = { - parameterPath: "blockId", - mapper: { - serializedName: "blockid", - required: true, - xmlName: "blockid", - type: { - name: "String", - }, - }, -}; -const blocks = { - parameterPath: "blocks", - mapper: BlockLookupList, -}; -const comp25 = { - parameterPath: "comp", - mapper: { - defaultValue: "blocklist", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const listType = { - parameterPath: "listType", - mapper: { - defaultValue: "committed", - serializedName: "blocklisttype", - required: true, - xmlName: "blocklisttype", - type: { - name: "Enum", - allowedValues: ["committed", "uncommitted", "all"], - }, - }, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing Service operations. */ -class ServiceImpl { - /** - * Initialize a new instance of the class Service class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * Sets properties for a storage account's Blob service endpoint, including properties for Storage - * Analytics and CORS (Cross-Origin Resource Sharing) rules - * @param blobServiceProperties The StorageService properties. - * @param options The options parameters. - */ - setProperties(blobServiceProperties, options) { - return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); - } - /** - * gets the properties of a storage account's Blob service, including properties for Storage Analytics - * and CORS (Cross-Origin Resource Sharing) rules. - * @param options The options parameters. - */ - getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); - } - /** - * Retrieves statistics related to replication for the Blob service. It is only available on the - * secondary location endpoint when read-access geo-redundant replication is enabled for the storage - * account. - * @param options The options parameters. - */ - getStatistics(options) { - return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec); - } - /** - * The List Containers Segment operation returns a list of the containers under the specified account - * @param options The options parameters. - */ - listContainersSegment(options) { - return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec); - } - /** - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using - * bearer token authentication. - * @param keyInfo Key information - * @param options The options parameters. - */ - getUserDelegationKey(keyInfo, options) { - return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); - } - /** - * Returns the sku name and account kind - * @param options The options parameters. - */ - getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); - } - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch - * boundary. Example header value: multipart/mixed; boundary=batch_ - * @param body Initial data - * @param options The options parameters. - */ - submitBatch(contentLength, multipartContentType, body, options) { - return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec$1); - } - /** - * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a - * given search expression. Filter blobs searches across all containers within a storage account but - * can be scoped within the expression to a single container. - * @param options The options parameters. - */ - filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); - } -} -// Operation Specifications -const xmlSerializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const setPropertiesOperationSpec = { - path: "/", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: ServiceSetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders, - }, - }, - requestBody: blobServiceProperties, - queryParameters: [ - restype, - comp, - timeoutInSeconds, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$5, -}; -const getPropertiesOperationSpec$2 = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders, - }, - }, - queryParameters: [ - restype, - comp, - timeoutInSeconds, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const getStatisticsOperationSpec = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders, - }, - }, - queryParameters: [ - restype, - timeoutInSeconds, - comp1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const listContainersSegmentOperationSpec = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const getUserDelegationKeyOperationSpec = { - path: "/", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders, - }, - }, - requestBody: keyInfo, - queryParameters: [ - restype, - timeoutInSeconds, - comp3, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$5, -}; -const getAccountInfoOperationSpec$2 = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - headersMapper: ServiceGetAccountInfoHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders, - }, - }, - queryParameters: [ - comp, - timeoutInSeconds, - restype1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const submitBatchOperationSpec$1 = { - path: "/", - httpMethod: "POST", - responses: { - 202: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: ServiceSubmitBatchHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders, - }, - }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], - headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$5, -}; -const filterBlobsOperationSpec$1 = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing Container operations. */ -class ContainerImpl { - /** - * Initialize a new instance of the class Container class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * creates a new container under the specified account. If the container with the same name already - * exists, the operation fails - * @param options The options parameters. - */ - create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); - } - /** - * returns all user-defined metadata and system properties for the specified container. The data - * returned does not include the container's list of blobs - * @param options The options parameters. - */ - getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); - } - /** - * operation marks the specified container for deletion. The container and any blobs contained within - * it are later deleted during garbage collection - * @param options The options parameters. - */ - delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); - } - /** - * operation sets one or more user-defined name-value pairs for the specified container. - * @param options The options parameters. - */ - setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); - } - /** - * gets the permissions for the specified container. The permissions indicate whether container data - * may be accessed publicly. - * @param options The options parameters. - */ - getAccessPolicy(options) { - return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec); - } - /** - * sets the permissions for the specified container. The permissions indicate whether blobs in a - * container may be accessed publicly. - * @param options The options parameters. - */ - setAccessPolicy(options) { - return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec); - } - /** - * Restores a previously-deleted container. - * @param options The options parameters. - */ - restore(options) { - return this.client.sendOperationRequest({ options }, restoreOperationSpec); - } - /** - * Renames an existing container. - * @param sourceContainerName Required. Specifies the name of the container to rename. - * @param options The options parameters. - */ - rename(sourceContainerName, options) { - return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); - } - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch - * boundary. Example header value: multipart/mixed; boundary=batch_ - * @param body Initial data - * @param options The options parameters. - */ - submitBatch(contentLength, multipartContentType, body, options) { - return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); - } - /** - * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given - * search expression. Filter blobs searches within the given container. - * @param options The options parameters. - */ - filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param options The options parameters. - */ - acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - releaseLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - renewLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param options The options parameters. - */ - breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 - * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor - * (String) for a list of valid GUID string formats. - * @param options The options parameters. - */ - changeLease(leaseId, proposedLeaseId, options) { - return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec$1); - } - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container - * @param options The options parameters. - */ - listBlobFlatSegment(options) { - return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec); - } - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix - * element in the response body that acts as a placeholder for all blobs whose names begin with the - * same substring up to the appearance of the delimiter character. The delimiter may be a single - * character or a string. - * @param options The options parameters. - */ - listBlobHierarchySegment(delimiter, options) { - return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); - } - /** - * Returns the sku name and account kind - * @param options The options parameters. - */ - getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); - } -} -// Operation Specifications -const xmlSerializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const createOperationSpec$2 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: ContainerCreateHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const getPropertiesOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - headersMapper: ContainerGetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const deleteOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "DELETE", - responses: { - 202: { - headersMapper: ContainerDeleteHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const setMetadataOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerSetMetadataHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp6, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const getAccessPolicyOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { name: "Composite", className: "SignedIdentifier" }, - }, - }, - serializedName: "SignedIdentifiers", - xmlName: "SignedIdentifiers", - xmlIsWrapped: true, - xmlElementName: "SignedIdentifier", - }, - headersMapper: ContainerGetAccessPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp7, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const setAccessPolicyOperationSpec = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerSetAccessPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders, - }, - }, - requestBody: containerAcl, - queryParameters: [ - timeoutInSeconds, - restype2, - comp7, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$4, -}; -const restoreOperationSpec = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: ContainerRestoreHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp8, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const renameOperationSpec = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerRenameHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp9, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const submitBatchOperationSpec = { - path: "/{containerName}", - httpMethod: "POST", - responses: { - 202: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: ContainerSubmitBatchHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders, - }, - }, - requestBody: body, - queryParameters: [ - timeoutInSeconds, - comp4, - restype2, - ], - urlParameters: [url], - headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$4, -}; -const filterBlobsOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const acquireLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: ContainerAcquireLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const releaseLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerReleaseLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const renewLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerRenewLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const breakLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: ContainerBreakLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const changeLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerChangeLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const listBlobFlatSegmentOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const listBlobHierarchySegmentOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const getAccountInfoOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - headersMapper: ContainerGetAccountInfoHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders, - }, - }, - queryParameters: [ - comp, - timeoutInSeconds, - restype1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing Blob operations. */ -class BlobImpl { - /** - * Initialize a new instance of the class Blob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Download operation reads or downloads a blob from the system, including its metadata and - * properties. You can also call Download to read a snapshot. - * @param options The options parameters. - */ - download(options) { - return this.client.sendOperationRequest({ options }, downloadOperationSpec); - } - /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system - * properties for the blob. It does not return the content of the blob. - * @param options The options parameters. - */ - getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); - } - /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is - * permanently removed from the storage account. If the storage account's soft delete feature is - * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible - * immediately. However, the blob service retains the blob or snapshot for the number of days specified - * by the DeleteRetentionPolicy section of [Storage service properties] - * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is - * permanently removed from the storage account. Note that you continue to be charged for the - * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the - * "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You - * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a - * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 - * (ResourceNotFound). - * @param options The options parameters. - */ - delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec); - } - /** - * Undelete a blob that was previously soft deleted - * @param options The options parameters. - */ - undelete(options) { - return this.client.sendOperationRequest({ options }, undeleteOperationSpec); - } - /** - * Sets the time a blob will expire and be deleted. - * @param expiryOptions Required. Indicates mode of the expiry time - * @param options The options parameters. - */ - setExpiry(expiryOptions, options) { - return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); - } - /** - * The Set HTTP Headers operation sets system properties on the blob - * @param options The options parameters. - */ - setHttpHeaders(options) { - return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec); - } - /** - * The Set Immutability Policy operation sets the immutability policy on the blob - * @param options The options parameters. - */ - setImmutabilityPolicy(options) { - return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec); - } - /** - * The Delete Immutability Policy operation deletes the immutability policy on the blob - * @param options The options parameters. - */ - deleteImmutabilityPolicy(options) { - return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec); - } - /** - * The Set Legal Hold operation sets a legal hold on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param options The options parameters. - */ - setLegalHold(legalHold, options) { - return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); - } - /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more - * name-value pairs - * @param options The options parameters. - */ - setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param options The options parameters. - */ - acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - releaseLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - renewLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 - * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor - * (String) for a list of valid GUID string formats. - * @param options The options parameters. - */ - changeLease(leaseId, proposedLeaseId, options) { - return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param options The options parameters. - */ - breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); - } - /** - * The Create Snapshot operation creates a read-only snapshot of a blob - * @param options The options parameters. - */ - createSnapshot(options) { - return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec); - } - /** - * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - startCopyFromURL(copySource, options) { - return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); - } - /** - * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return - * a response until the copy is complete. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - copyFromURL(copySource, options) { - return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); - } - /** - * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination - * blob with zero length and full metadata. - * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob - * operation. - * @param options The options parameters. - */ - abortCopyFromURL(copyId, options) { - return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); - } - /** - * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium - * storage account and on a block blob in a blob storage account (locally redundant storage only). A - * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block - * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's - * ETag. - * @param tier Indicates the tier to be set on the blob. - * @param options The options parameters. - */ - setTier(tier, options) { - return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); - } - /** - * Returns the sku name and account kind - * @param options The options parameters. - */ - getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); - } - /** - * The Query operation enables users to select/project on blob data by providing simple query - * expressions. - * @param options The options parameters. - */ - query(options) { - return this.client.sendOperationRequest({ options }, queryOperationSpec); - } - /** - * The Get Tags operation enables users to get the tags associated with a blob. - * @param options The options parameters. - */ - getTags(options) { - return this.client.sendOperationRequest({ options }, getTagsOperationSpec); - } - /** - * The Set Tags operation enables users to set tags on a blob. - * @param options The options parameters. - */ - setTags(options) { - return this.client.sendOperationRequest({ options }, setTagsOperationSpec); - } -} -// Operation Specifications -const xmlSerializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const downloadOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobDownloadHeaders, - }, - 206: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobDownloadHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const getPropertiesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: BlobGetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const deleteOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "DELETE", - responses: { - 202: { - headersMapper: BlobDeleteHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const undeleteOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobUndeleteHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setExpiryOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetExpiryHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setHttpHeadersOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetHttpHeadersHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders, - }, - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setImmutabilityPolicyOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp12, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const deleteImmutabilityPolicyOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp12, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setLegalHoldOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetLegalHoldHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp13, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - legalHold, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setMetadataOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetMetadataHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const acquireLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlobAcquireLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const releaseLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobReleaseLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const renewLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobRenewLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const changeLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobChangeLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const breakLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: BlobBreakLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const createSnapshotOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlobCreateSnapshotHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const startCopyFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: BlobStartCopyFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const copyFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: BlobCopyFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const abortCopyFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 204: { - headersMapper: BlobAbortCopyFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp15, - copyId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setTierOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetTierHeaders, - }, - 202: { - headersMapper: BlobSetTierHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const getAccountInfoOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - headersMapper: BlobGetAccountInfoHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders, - }, - }, - queryParameters: [ - comp, - timeoutInSeconds, - restype1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const queryOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobQueryHeaders, - }, - 206: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobQueryHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders, - }, - }, - requestBody: queryRequest, - queryParameters: [ - timeoutInSeconds, - snapshot, - comp17, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$3, -}; -const getTagsOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setTagsOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 204: { - headersMapper: BlobSetTagsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders, - }, - }, - requestBody: tags, - queryParameters: [ - timeoutInSeconds, - versionId, - comp18, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$3, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing PageBlob operations. */ -class PageBlobImpl { - /** - * Initialize a new instance of the class PageBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Create operation creates a new page blob. - * @param contentLength The length of the request. - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The - * page blob size must be aligned to a 512-byte boundary. - * @param options The options parameters. - */ - create(contentLength, blobContentLength, options) { - return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec$1); - } - /** - * The Upload Pages operation writes a range of pages to a page blob - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - uploadPages(contentLength, body, options) { - return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); - } - /** - * The Clear Pages operation clears a set of pages from a page blob - * @param contentLength The length of the request. - * @param options The options parameters. - */ - clearPages(contentLength, options) { - return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); - } - /** - * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a - * URL - * @param sourceUrl Specify a URL to the copy source. - * @param sourceRange Bytes of source data in the specified range. The length of this range should - * match the ContentLength header and x-ms-range/Range destination range header. - * @param contentLength The length of the request. - * @param range The range of bytes to which the source range would be written. The range should be 512 - * aligned and range-end is required. - * @param options The options parameters. - */ - uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { - return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); - } - /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a - * page blob - * @param options The options parameters. - */ - getPageRanges(options) { - return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); - } - /** - * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were - * changed between target blob and previous snapshot. - * @param options The options parameters. - */ - getPageRangesDiff(options) { - return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); - } - /** - * Resize the Blob - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The - * page blob size must be aligned to a 512-byte boundary. - * @param options The options parameters. - */ - resize(blobContentLength, options) { - return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); - } - /** - * Update the sequence number of the blob - * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. - * This property applies to page blobs only. This property indicates how the service should modify the - * blob's sequence number - * @param options The options parameters. - */ - updateSequenceNumber(sequenceNumberAction, options) { - return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); - } - /** - * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. - * The snapshot is copied such that only the differential changes between the previously copied - * snapshot are transferred to the destination. The copied snapshots are complete copies of the - * original snapshot and can be read or copied from as usual. This API is supported since REST version - * 2016-05-31. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - copyIncremental(copySource, options) { - return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); - } -} -// Operation Specifications -const xmlSerializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const createOperationSpec$1 = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobCreateHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const uploadPagesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobUploadPagesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer$2, -}; -const clearPagesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobClearPagesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const uploadPagesFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const getPageRangesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const getPageRangesDiffOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const resizeOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: PageBlobResizeHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders, - }, - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const updateSequenceNumberOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders, - }, - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const copyIncrementalOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: PageBlobCopyIncrementalHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - ], - isXML: true, - serializer: xmlSerializer$2, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing AppendBlob operations. */ -class AppendBlobImpl { - /** - * Initialize a new instance of the class AppendBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Create Append Blob operation creates a new append blob. - * @param contentLength The length of the request. - * @param options The options parameters. - */ - create(contentLength, options) { - return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob. The - * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to - * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - appendBlock(contentLength, body, options) { - return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob where - * the contents are read from a source url. The Append Block operation is permitted only if the blob - * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version - * 2015-02-21 version or later. - * @param sourceUrl Specify a URL to the copy source. - * @param contentLength The length of the request. - * @param options The options parameters. - */ - appendBlockFromUrl(sourceUrl, contentLength, options) { - return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); - } - /** - * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version - * 2019-12-12 version or later. - * @param options The options parameters. - */ - seal(options) { - return this.client.sendOperationRequest({ options }, sealOperationSpec); - } -} -// Operation Specifications -const xmlSerializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const createOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: AppendBlobCreateHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1, - ], - isXML: true, - serializer: xmlSerializer$1, -}; -const appendBlockOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: AppendBlobAppendBlockHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer$1, -}; -const appendBlockFromUrlOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1, - ], - isXML: true, - serializer: xmlSerializer$1, -}; -const sealOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: AppendBlobSealHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition, - ], - isXML: true, - serializer: xmlSerializer$1, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing BlockBlob operations. */ -class BlockBlobImpl { - /** - * Initialize a new instance of the class BlockBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing - * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put - * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a - * partial update of the content of a block blob, use the Put Block List operation. - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - upload(contentLength, body, options) { - return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); - } - /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read - * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are - * not supported with Put Blob from URL; the content of an existing blob is overwritten with the - * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, - * use the Put Block from URL API in conjunction with Put Block List. - * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - putBlobFromUrl(contentLength, copySource, options) { - return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); - } - /** - * The Stage Block operation creates a new block to be committed as part of a blob - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string - * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified - * for the blockid parameter must be the same size for each block. - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - stageBlock(blockId, contentLength, body, options) { - return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); - } - /** - * The Stage Block operation creates a new block to be committed as part of a blob where the contents - * are read from a URL. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string - * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified - * for the blockid parameter must be the same size for each block. - * @param contentLength The length of the request. - * @param sourceUrl Specify a URL to the copy source. - * @param options The options parameters. - */ - stageBlockFromURL(blockId, contentLength, sourceUrl, options) { - return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); - } - /** - * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the - * blob. In order to be written as part of a blob, a block must have been successfully written to the - * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading - * only those blocks that have changed, then committing the new and existing blocks together. You can - * do this by specifying whether to commit a block from the committed block list or from the - * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list - * it may belong to. - * @param blocks Blob Blocks. - * @param options The options parameters. - */ - commitBlockList(blocks, options) { - return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); - } - /** - * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block - * blob - * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted - * blocks, or both lists together. - * @param options The options parameters. - */ - getBlockList(listType, options) { - return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); - } -} -// Operation Specifications -const xmlSerializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const uploadOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobUploadHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer, -}; -const putBlobFromUrlOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties, - ], - isXML: true, - serializer: xmlSerializer, -}; -const stageBlockOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobStageBlockHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [ - timeoutInSeconds, - comp24, - blockId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer, -}; -const stageBlockFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp24, - blockId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1, - ], - isXML: true, - serializer: xmlSerializer, -}; -const commitBlockListOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobCommitBlockListHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders, - }, - }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer, -}; -const getBlockListOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - ], - isXML: true, - serializer: xmlSerializer, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { - /** - * Initializes a new instance of the StorageClient class. - * @param url The URL of the service account, container, or blob that is the target of the desired - * operation. - * @param options The parameter options - */ - constructor(url, options) { - var _a, _b; - if (url === undefined) { - throw new Error("'url' cannot be null"); - } - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults = { - requestContentType: "application/json; charset=utf-8", - }; - const packageDetails = `azsdk-js-azure-storage-blob/12.27.0`; - const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix, - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); - super(optionsWithDefaults); - // Parameter assignments - this.url = url; - // Assigning values to Constant parameters - this.version = options.version || "2025-05-05"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); - } -}; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * @internal - */ -class StorageContextClient extends StorageClient$1 { - async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); - if (operationSpecToSend.path === "/{containerName}" || - operationSpecToSend.path === "/{containerName}/{blob}") { - operationSpecToSend.path = ""; - } - return super.sendOperationRequest(operationArguments, operationSpecToSend); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} - * and etc. - */ -class StorageClient { - /** - * Creates an instance of StorageClient. - * @param url - url to resource - * @param pipeline - request policy pipeline. - */ - constructor(url, pipeline) { - // URL should be encoded and only once, protocol layer shouldn't encode URL again - this.url = escapeURLPath(url); - this.accountName = getAccountNameFromUrl(url); - this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); - // Override protocol layer's default content-type - const storageClientContext = this.storageClientContext; - storageClientContext.requestContentType = undefined; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Creates a span using the global tracer. - * @internal - */ -const tracingClient = coreTracing.createTracingClient({ - packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, - namespace: "Microsoft.Storage", -}); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting - * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all - * the values are set, this should be serialized with toString and set as the permissions field on a - * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ -class BlobSASPermissions { - constructor() { - /** - * Specifies Read access granted. - */ - this.read = false; - /** - * Specifies Add access granted. - */ - this.add = false; - /** - * Specifies Create access granted. - */ - this.create = false; - /** - * Specifies Write access granted. - */ - this.write = false; - /** - * Specifies Delete access granted. - */ - this.delete = false; - /** - * Specifies Delete version access granted. - */ - this.deleteVersion = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Specifies Move access granted. - */ - this.move = false; - /** - * Specifies Execute access granted. - */ - this.execute = false; - /** - * Specifies SetImmutabilityPolicy access granted. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - } - /** - * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an - * Error if it encounters a character that does not correspond to a valid permission. - * - * @param permissions - - */ - static parse(permissions) { - const blobSASPermissions = new BlobSASPermissions(); - for (const char of permissions) { - switch (char) { - case "r": - blobSASPermissions.read = true; - break; - case "a": - blobSASPermissions.add = true; - break; - case "c": - blobSASPermissions.create = true; - break; - case "w": - blobSASPermissions.write = true; - break; - case "d": - blobSASPermissions.delete = true; - break; - case "x": - blobSASPermissions.deleteVersion = true; - break; - case "t": - blobSASPermissions.tag = true; - break; - case "m": - blobSASPermissions.move = true; - break; - case "e": - blobSASPermissions.execute = true; - break; - case "i": - blobSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - blobSASPermissions.permanentDelete = true; - break; - default: - throw new RangeError(`Invalid permission: ${char}`); - } - } - return blobSASPermissions; - } - /** - * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const blobSASPermissions = new BlobSASPermissions(); - if (permissionLike.read) { - blobSASPermissions.read = true; - } - if (permissionLike.add) { - blobSASPermissions.add = true; - } - if (permissionLike.create) { - blobSASPermissions.create = true; - } - if (permissionLike.write) { - blobSASPermissions.write = true; - } - if (permissionLike.delete) { - blobSASPermissions.delete = true; - } - if (permissionLike.deleteVersion) { - blobSASPermissions.deleteVersion = true; - } - if (permissionLike.tag) { - blobSASPermissions.tag = true; - } - if (permissionLike.move) { - blobSASPermissions.move = true; - } - if (permissionLike.execute) { - blobSASPermissions.execute = true; - } - if (permissionLike.setImmutabilityPolicy) { - blobSASPermissions.setImmutabilityPolicy = true; - } - if (permissionLike.permanentDelete) { - blobSASPermissions.permanentDelete = true; - } - return blobSASPermissions; - } - /** - * Converts the given permissions to a string. Using this method will guarantee the permissions are in an - * order accepted by the service. - * - * @returns A string which represents the BlobSASPermissions - */ - toString() { - const permissions = []; - if (this.read) { - permissions.push("r"); - } - if (this.add) { - permissions.push("a"); - } - if (this.create) { - permissions.push("c"); - } - if (this.write) { - permissions.push("w"); - } - if (this.delete) { - permissions.push("d"); - } - if (this.deleteVersion) { - permissions.push("x"); - } - if (this.tag) { - permissions.push("t"); - } - if (this.move) { - permissions.push("m"); - } - if (this.execute) { - permissions.push("e"); - } - if (this.setImmutabilityPolicy) { - permissions.push("i"); - } - if (this.permanentDelete) { - permissions.push("y"); - } - return permissions.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. - * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. - * Once all the values are set, this should be serialized with toString and set as the permissions field on a - * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ -class ContainerSASPermissions { - constructor() { - /** - * Specifies Read access granted. - */ - this.read = false; - /** - * Specifies Add access granted. - */ - this.add = false; - /** - * Specifies Create access granted. - */ - this.create = false; - /** - * Specifies Write access granted. - */ - this.write = false; - /** - * Specifies Delete access granted. - */ - this.delete = false; - /** - * Specifies Delete version access granted. - */ - this.deleteVersion = false; - /** - * Specifies List access granted. - */ - this.list = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Specifies Move access granted. - */ - this.move = false; - /** - * Specifies Execute access granted. - */ - this.execute = false; - /** - * Specifies SetImmutabilityPolicy access granted. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - /** - * Specifies that Filter Blobs by Tags is permitted. - */ - this.filterByTags = false; - } - /** - * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an - * Error if it encounters a character that does not correspond to a valid permission. - * - * @param permissions - - */ - static parse(permissions) { - const containerSASPermissions = new ContainerSASPermissions(); - for (const char of permissions) { - switch (char) { - case "r": - containerSASPermissions.read = true; - break; - case "a": - containerSASPermissions.add = true; - break; - case "c": - containerSASPermissions.create = true; - break; - case "w": - containerSASPermissions.write = true; - break; - case "d": - containerSASPermissions.delete = true; - break; - case "l": - containerSASPermissions.list = true; - break; - case "t": - containerSASPermissions.tag = true; - break; - case "x": - containerSASPermissions.deleteVersion = true; - break; - case "m": - containerSASPermissions.move = true; - break; - case "e": - containerSASPermissions.execute = true; - break; - case "i": - containerSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - containerSASPermissions.permanentDelete = true; - break; - case "f": - containerSASPermissions.filterByTags = true; - break; - default: - throw new RangeError(`Invalid permission ${char}`); - } - } - return containerSASPermissions; - } - /** - * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const containerSASPermissions = new ContainerSASPermissions(); - if (permissionLike.read) { - containerSASPermissions.read = true; - } - if (permissionLike.add) { - containerSASPermissions.add = true; - } - if (permissionLike.create) { - containerSASPermissions.create = true; - } - if (permissionLike.write) { - containerSASPermissions.write = true; - } - if (permissionLike.delete) { - containerSASPermissions.delete = true; - } - if (permissionLike.list) { - containerSASPermissions.list = true; - } - if (permissionLike.deleteVersion) { - containerSASPermissions.deleteVersion = true; - } - if (permissionLike.tag) { - containerSASPermissions.tag = true; - } - if (permissionLike.move) { - containerSASPermissions.move = true; - } - if (permissionLike.execute) { - containerSASPermissions.execute = true; - } - if (permissionLike.setImmutabilityPolicy) { - containerSASPermissions.setImmutabilityPolicy = true; - } - if (permissionLike.permanentDelete) { - containerSASPermissions.permanentDelete = true; - } - if (permissionLike.filterByTags) { - containerSASPermissions.filterByTags = true; - } - return containerSASPermissions; - } - /** - * Converts the given permissions to a string. Using this method will guarantee the permissions are in an - * order accepted by the service. - * - * The order of the characters should be as specified here to ensure correctness. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - */ - toString() { - const permissions = []; - if (this.read) { - permissions.push("r"); - } - if (this.add) { - permissions.push("a"); - } - if (this.create) { - permissions.push("c"); - } - if (this.write) { - permissions.push("w"); - } - if (this.delete) { - permissions.push("d"); - } - if (this.deleteVersion) { - permissions.push("x"); - } - if (this.list) { - permissions.push("l"); - } - if (this.tag) { - permissions.push("t"); - } - if (this.move) { - permissions.push("m"); - } - if (this.execute) { - permissions.push("e"); - } - if (this.setImmutabilityPolicy) { - permissions.push("i"); - } - if (this.permanentDelete) { - permissions.push("y"); - } - if (this.filterByTags) { - permissions.push("f"); - } - return permissions.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * UserDelegationKeyCredential is only used for generation of user delegation SAS. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas - */ -class UserDelegationKeyCredential { - /** - * Creates an instance of UserDelegationKeyCredential. - * @param accountName - - * @param userDelegationKey - - */ - constructor(accountName, userDelegationKey) { - this.accountName = accountName; - this.userDelegationKey = userDelegationKey; - this.key = Buffer.from(userDelegationKey.value, "base64"); - } - /** - * Generates a hash signature for an HTTP request or for a SAS. - * - * @param stringToSign - - */ - computeHMACSHA256(stringToSign) { - // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Generate SasIPRange format string. For example: - * - * "8.8.8.8" or "1.1.1.1-255.255.255.255" - * - * @param ipRange - - */ -function ipRangeToString(ipRange) { - return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Protocols for generated SAS. - */ -exports.SASProtocol = void 0; -(function (SASProtocol) { - /** - * Protocol that allows HTTPS only - */ - SASProtocol["Https"] = "https"; - /** - * Protocol that allows both HTTPS and HTTP - */ - SASProtocol["HttpsAndHttp"] = "https,http"; -})(exports.SASProtocol || (exports.SASProtocol = {})); -/** - * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} - * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should - * be taken here in case there are existing query parameters, which might affect the appropriate means of appending - * these query parameters). - * - * NOTE: Instances of this class are immutable. - */ -class SASQueryParameters { - /** - * Optional. IP range allowed for this SAS. - * - * @readonly - */ - get ipRange() { - if (this.ipRangeInner) { - return { - end: this.ipRangeInner.end, - start: this.ipRangeInner.start, - }; - } - return undefined; - } - constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { - this.version = version; - this.signature = signature; - if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { - // SASQueryParametersOptions - this.permissions = permissionsOrOptions.permissions; - this.services = permissionsOrOptions.services; - this.resourceTypes = permissionsOrOptions.resourceTypes; - this.protocol = permissionsOrOptions.protocol; - this.startsOn = permissionsOrOptions.startsOn; - this.expiresOn = permissionsOrOptions.expiresOn; - this.ipRangeInner = permissionsOrOptions.ipRange; - this.identifier = permissionsOrOptions.identifier; - this.encryptionScope = permissionsOrOptions.encryptionScope; - this.resource = permissionsOrOptions.resource; - this.cacheControl = permissionsOrOptions.cacheControl; - this.contentDisposition = permissionsOrOptions.contentDisposition; - this.contentEncoding = permissionsOrOptions.contentEncoding; - this.contentLanguage = permissionsOrOptions.contentLanguage; - this.contentType = permissionsOrOptions.contentType; - if (permissionsOrOptions.userDelegationKey) { - this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; - this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; - this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; - this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; - this.signedService = permissionsOrOptions.userDelegationKey.signedService; - this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; - this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; - this.correlationId = permissionsOrOptions.correlationId; - } - } - else { - this.services = services; - this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn; - this.permissions = permissionsOrOptions; - this.protocol = protocol; - this.startsOn = startsOn; - this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope; - this.identifier = identifier; - this.resource = resource; - this.cacheControl = cacheControl; - this.contentDisposition = contentDisposition; - this.contentEncoding = contentEncoding; - this.contentLanguage = contentLanguage; - this.contentType = contentType; - if (userDelegationKey) { - this.signedOid = userDelegationKey.signedObjectId; - this.signedTenantId = userDelegationKey.signedTenantId; - this.signedStartsOn = userDelegationKey.signedStartsOn; - this.signedExpiresOn = userDelegationKey.signedExpiresOn; - this.signedService = userDelegationKey.signedService; - this.signedVersion = userDelegationKey.signedVersion; - this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; - this.correlationId = correlationId; - } - } - } - /** - * Encodes all SAS query parameters into a string that can be appended to a URL. - * - */ - toString() { - const params = [ - "sv", - "ss", - "srt", - "spr", - "st", - "se", - "sip", - "si", - "ses", - "skoid", // Signed object ID - "sktid", // Signed tenant ID - "skt", // Signed key start time - "ske", // Signed key expiry time - "sks", // Signed key service - "skv", // Signed key version - "sr", - "sp", - "sig", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "saoid", - "scid", - ]; - const queries = []; - for (const param of params) { - switch (param) { - case "sv": - this.tryAppendQueryParameter(queries, param, this.version); - break; - case "ss": - this.tryAppendQueryParameter(queries, param, this.services); - break; - case "srt": - this.tryAppendQueryParameter(queries, param, this.resourceTypes); - break; - case "spr": - this.tryAppendQueryParameter(queries, param, this.protocol); - break; - case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined); - break; - case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined); - break; - case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined); - break; - case "si": - this.tryAppendQueryParameter(queries, param, this.identifier); - break; - case "ses": - this.tryAppendQueryParameter(queries, param, this.encryptionScope); - break; - case "skoid": // Signed object ID - this.tryAppendQueryParameter(queries, param, this.signedOid); - break; - case "sktid": // Signed tenant ID - this.tryAppendQueryParameter(queries, param, this.signedTenantId); - break; - case "skt": // Signed key start time - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined); - break; - case "ske": // Signed key expiry time - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined); - break; - case "sks": // Signed key service - this.tryAppendQueryParameter(queries, param, this.signedService); - break; - case "skv": // Signed key version - this.tryAppendQueryParameter(queries, param, this.signedVersion); - break; - case "sr": - this.tryAppendQueryParameter(queries, param, this.resource); - break; - case "sp": - this.tryAppendQueryParameter(queries, param, this.permissions); - break; - case "sig": - this.tryAppendQueryParameter(queries, param, this.signature); - break; - case "rscc": - this.tryAppendQueryParameter(queries, param, this.cacheControl); - break; - case "rscd": - this.tryAppendQueryParameter(queries, param, this.contentDisposition); - break; - case "rsce": - this.tryAppendQueryParameter(queries, param, this.contentEncoding); - break; - case "rscl": - this.tryAppendQueryParameter(queries, param, this.contentLanguage); - break; - case "rsct": - this.tryAppendQueryParameter(queries, param, this.contentType); - break; - case "saoid": - this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); - break; - case "scid": - this.tryAppendQueryParameter(queries, param, this.correlationId); - break; - } - } - return queries.join("&"); - } - /** - * A private helper method used to filter and append query key/value pairs into an array. - * - * @param queries - - * @param key - - * @param value - - */ - tryAppendQueryParameter(queries, key, value) { - if (!value) { - return; - } - key = encodeURIComponent(key); - value = encodeURIComponent(value); - if (key.length > 0 && value.length > 0) { - queries.push(`${key}=${value}`); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; -} -function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential - ? sharedKeyCredentialOrUserDelegationKey - : undefined; - let userDelegationKeyCredential; - if (sharedKeyCredential === undefined && accountName !== undefined) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); - } - if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { - throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); - } - // Version 2020-12-06 adds support for encryptionscope in SAS. - if (version >= "2020-12-06") { - if (sharedKeyCredential !== undefined) { - return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); - } - else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); - } - } - // Version 2019-12-12 adds support for the blob tags permission. - // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. - // https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string - if (version >= "2018-11-09") { - if (sharedKeyCredential !== undefined) { - return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); - } - else { - // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId. - if (version >= "2020-02-10") { - return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); - } - else { - return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); - } - } - } - if (version >= "2015-04-05") { - if (sharedKeyCredential !== undefined) { - return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); - } - else { - throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); - } - } - throw new RangeError("'version' must be >= '2015-04-05'."); -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. - * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. - * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && - !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - if (blobSASSignatureValues.blobName) { - resource = "b"; - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. - * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. - * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && - !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. - * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. - * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && - !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. - * - * WARNING: identifier will be ignored, permissions and expiresOn are required. - * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - - */ -function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - // Stored access policies are not supported for a user delegation SAS. - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType, - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. - * - * WARNING: identifier will be ignored, permissions and expiresOn are required. - * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - - */ -function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - // Stored access policies are not supported for a user delegation SAS. - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - undefined, // agentObjectId - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType, - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. - * - * WARNING: identifier will be ignored, permissions and expiresOn are required. - * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - - */ -function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - // Stored access policies are not supported for a user delegation SAS. - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - undefined, // agentObjectId - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType, - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), - stringToSign: stringToSign, - }; -} -function getCanonicalName(accountName, containerName, blobName) { - // Container: "/blob/account/containerName" - // Blob: "/blob/account/containerName/blobName" - const elements = [`/blob/${accountName}/${containerName}`]; - if (blobName) { - elements.push(`/${blobName}`); - } - return elements.join(""); -} -function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { - throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); - } - if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { - throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); - } - if (blobSASSignatureValues.versionId && version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); - } - if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { - throw RangeError("Must provide 'blobName' when providing 'versionId'."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.setImmutabilityPolicy && - version < "2020-08-04") { - throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.deleteVersion && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.permanentDelete && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.tag && - version < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); - } - if (version < "2020-02-10" && - blobSASSignatureValues.permissions && - (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { - throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); - } - if (version < "2021-04-10" && - blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.filterByTags) { - throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); - } - if (version < "2020-02-10" && - (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { - throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); - } - if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { - throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); - } - blobSASSignatureValues.version = version; - return blobSASSignatureValues; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. - */ -class BlobLeaseClient { - /** - * Gets the lease Id. - * - * @readonly - */ - get leaseId() { - return this._leaseId; - } - /** - * Gets the url. - * - * @readonly - */ - get url() { - return this._url; - } - /** - * Creates an instance of BlobLeaseClient. - * @param client - The client to make the lease operation requests. - * @param leaseId - Initial proposed lease id. - */ - constructor(client, leaseId) { - const clientContext = client.storageClientContext; - this._url = client.url; - if (client.name === undefined) { - this._isContainer = true; - this._containerOrBlobOperation = clientContext.container; - } - else { - this._isContainer = false; - this._containerOrBlobOperation = clientContext.blob; - } - if (!leaseId) { - leaseId = coreUtil.randomUUID(); - } - this._leaseId = leaseId; - } - /** - * Establishes and manages a lock on a container for delete operations, or on a blob - * for write and delete operations. - * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param duration - Must be between 15 to 60 seconds, or infinite (-1) - * @param options - option to configure lease management operations. - * @returns Response data for acquire lease operation. - */ - async acquireLease(duration, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ - abortSignal: options.abortSignal, - duration, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - proposedLeaseId: this._leaseId, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * To change the ID of the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param proposedLeaseId - the proposed new lease Id. - * @param options - option to configure lease management operations. - * @returns Response data for change lease operation. - */ - async changeLease(proposedLeaseId, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - this._leaseId = proposedLeaseId; - return response; - }); - } - /** - * To free the lease if it is no longer needed so that another client may - * immediately acquire a lease against the container or the blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param options - option to configure lease management operations. - * @returns Response data for release lease operation. - */ - async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * To renew the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param options - Optional option to configure lease management operations. - * @returns Response data for renew lease operation. - */ - async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a; - return this._containerOrBlobOperation.renewLease(this._leaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - }); - }); - } - /** - * To end the lease but ensure that another client cannot acquire a new lease - * until the current lease period has expired. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param breakPeriod - Break period - * @param options - Optional options to configure lease management operations. - * @returns Response data for break lease operation. - */ - async breakLease(breakPeriod, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a; - const operationOptions = { - abortSignal: options.abortSignal, - breakPeriod, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); - }); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. - */ -class RetriableReadableStream extends stream.Readable { - /** - * Creates an instance of RetriableReadableStream. - * - * @param source - The current ReadableStream returned from getter - * @param getter - A method calling downloading request returning - * a new ReadableStream from specified offset - * @param offset - Offset position in original data source to read - * @param count - How much data in original data source to read - * @param options - - */ - constructor(source, getter, offset, count, options = {}) { - super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = undefined; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - // console.log( - // `Offset: ${this.offset}, Received ${data.length} from internal stream` - // ); - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - // console.log( - // `Source stream emits end or error, offset: ${ - // this.offset - // }, dest end : ${this.end}` - // ); - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } - else if (this.offset <= this.end) { - // console.log( - // `retries: ${this.retries}, max retries: ${this.maxRetries}` - // ); - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset) - .then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }) - .catch((error) => { - this.destroy(error); - }); - } - else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } - else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; - this.getter = getter; - this.source = source; - this.start = offset; - this.offset = offset; - this.end = offset + count - 1; - this.maxRetryRequests = - options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; - this.onProgress = options.onProgress; - this.options = options; - this.setSourceEventHandlers(); - } - _read() { - this.source.resume(); - } - setSourceEventHandlers() { - this.source.on("data", this.sourceDataHandler); - this.source.on("end", this.sourceErrorOrEndHandler); - this.source.on("error", this.sourceErrorOrEndHandler); - // needed for Node14 - this.source.on("aborted", this.sourceAbortedHandler); - } - removeSourceEventHandlers() { - this.source.removeListener("data", this.sourceDataHandler); - this.source.removeListener("end", this.sourceErrorOrEndHandler); - this.source.removeListener("error", this.sourceErrorOrEndHandler); - this.source.removeListener("aborted", this.sourceAbortedHandler); - } - _destroy(error, callback) { - // remove listener from source and release source - this.removeSourceEventHandlers(); - this.source.destroy(); - callback(error === null ? undefined : error); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will - * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot - * trigger retries defined in pipeline retry policy.) - * - * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js - * Readable stream. - */ -class BlobDownloadResponse { - /** - * Indicates that the service supports - * requests for partial file content. - * - * @readonly - */ - get acceptRanges() { - return this.originalResponse.acceptRanges; - } - /** - * Returns if it was previously specified - * for the file. - * - * @readonly - */ - get cacheControl() { - return this.originalResponse.cacheControl; - } - /** - * Returns the value that was specified - * for the 'x-ms-content-disposition' header and specifies how to process the - * response. - * - * @readonly - */ - get contentDisposition() { - return this.originalResponse.contentDisposition; - } - /** - * Returns the value that was specified - * for the Content-Encoding request header. - * - * @readonly - */ - get contentEncoding() { - return this.originalResponse.contentEncoding; - } - /** - * Returns the value that was specified - * for the Content-Language request header. - * - * @readonly - */ - get contentLanguage() { - return this.originalResponse.contentLanguage; - } - /** - * The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs. - * - * @readonly - */ - get blobSequenceNumber() { - return this.originalResponse.blobSequenceNumber; - } - /** - * The blob's type. Possible values include: - * 'BlockBlob', 'PageBlob', 'AppendBlob'. - * - * @readonly - */ - get blobType() { - return this.originalResponse.blobType; - } - /** - * The number of bytes present in the - * response body. - * - * @readonly - */ - get contentLength() { - return this.originalResponse.contentLength; - } - /** - * If the file has an MD5 hash and the - * request is to read the full file, this response header is returned so that - * the client can check for message content integrity. If the request is to - * read a specified range and the 'x-ms-range-get-content-md5' is set to - * true, then the request returns an MD5 hash for the range, as long as the - * range size is less than or equal to 4 MB. If neither of these sets of - * conditions is true, then no value is returned for the 'Content-MD5' - * header. - * - * @readonly - */ - get contentMD5() { - return this.originalResponse.contentMD5; - } - /** - * Indicates the range of bytes returned if - * the client requested a subset of the file by setting the Range request - * header. - * - * @readonly - */ - get contentRange() { - return this.originalResponse.contentRange; - } - /** - * The content type specified for the file. - * The default content type is 'application/octet-stream' - * - * @readonly - */ - get contentType() { - return this.originalResponse.contentType; - } - /** - * Conclusion time of the last attempted - * Copy File operation where this file was the destination file. This value - * can specify the time of a completed, aborted, or failed copy attempt. - * - * @readonly - */ - get copyCompletedOn() { - return this.originalResponse.copyCompletedOn; - } - /** - * String identifier for the last attempted Copy - * File operation where this file was the destination file. - * - * @readonly - */ - get copyId() { - return this.originalResponse.copyId; - } - /** - * Contains the number of bytes copied and - * the total bytes in the source in the last attempted Copy File operation - * where this file was the destination file. Can show between 0 and - * Content-Length bytes copied. - * - * @readonly - */ - get copyProgress() { - return this.originalResponse.copyProgress; - } - /** - * URL up to 2KB in length that specifies the - * source file used in the last attempted Copy File operation where this file - * was the destination file. - * - * @readonly - */ - get copySource() { - return this.originalResponse.copySource; - } - /** - * State of the copy operation - * identified by 'x-ms-copy-id'. Possible values include: 'pending', - * 'success', 'aborted', 'failed' - * - * @readonly - */ - get copyStatus() { - return this.originalResponse.copyStatus; - } - /** - * Only appears when - * x-ms-copy-status is failed or pending. Describes cause of fatal or - * non-fatal copy operation failure. - * - * @readonly - */ - get copyStatusDescription() { - return this.originalResponse.copyStatusDescription; - } - /** - * When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible - * values include: 'infinite', 'fixed'. - * - * @readonly - */ - get leaseDuration() { - return this.originalResponse.leaseDuration; - } - /** - * Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. - * - * @readonly - */ - get leaseState() { - return this.originalResponse.leaseState; - } - /** - * The current lease status of the - * blob. Possible values include: 'locked', 'unlocked'. - * - * @readonly - */ - get leaseStatus() { - return this.originalResponse.leaseStatus; - } - /** - * A UTC date/time value generated by the service that - * indicates the time at which the response was initiated. - * - * @readonly - */ - get date() { - return this.originalResponse.date; - } - /** - * The number of committed blocks - * present in the blob. This header is returned only for append blobs. - * - * @readonly - */ - get blobCommittedBlockCount() { - return this.originalResponse.blobCommittedBlockCount; - } - /** - * The ETag contains a value that you can use to - * perform operations conditionally, in quotes. - * - * @readonly - */ - get etag() { - return this.originalResponse.etag; - } - /** - * The number of tags associated with the blob - * - * @readonly - */ - get tagCount() { - return this.originalResponse.tagCount; - } - /** - * The error code. - * - * @readonly - */ - get errorCode() { - return this.originalResponse.errorCode; - } - /** - * The value of this header is set to - * true if the file data and application metadata are completely encrypted - * using the specified algorithm. Otherwise, the value is set to false (when - * the file is unencrypted, or if only parts of the file/application metadata - * are encrypted). - * - * @readonly - */ - get isServerEncrypted() { - return this.originalResponse.isServerEncrypted; - } - /** - * If the blob has a MD5 hash, and if - * request contains range header (Range or x-ms-range), this response header - * is returned with the value of the whole blob's MD5 value. This value may - * or may not be equal to the value returned in Content-MD5 header, with the - * latter calculated from the requested range. - * - * @readonly - */ - get blobContentMD5() { - return this.originalResponse.blobContentMD5; - } - /** - * Returns the date and time the file was last - * modified. Any operation that modifies the file or its properties updates - * the last modified time. - * - * @readonly - */ - get lastModified() { - return this.originalResponse.lastModified; - } - /** - * Returns the UTC date and time generated by the service that indicates the time at which the blob was - * last read or written to. - * - * @readonly - */ - get lastAccessed() { - return this.originalResponse.lastAccessed; - } - /** - * Returns the date and time the blob was created. - * - * @readonly - */ - get createdOn() { - return this.originalResponse.createdOn; - } - /** - * A name-value pair - * to associate with a file storage object. - * - * @readonly - */ - get metadata() { - return this.originalResponse.metadata; - } - /** - * This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. - * - * @readonly - */ - get requestId() { - return this.originalResponse.requestId; - } - /** - * If a client request id header is sent in the request, this header will be present in the - * response with the same value. - * - * @readonly - */ - get clientRequestId() { - return this.originalResponse.clientRequestId; - } - /** - * Indicates the version of the Blob service used - * to execute the request. - * - * @readonly - */ - get version() { - return this.originalResponse.version; - } - /** - * Indicates the versionId of the downloaded blob version. - * - * @readonly - */ - get versionId() { - return this.originalResponse.versionId; - } - /** - * Indicates whether version of this blob is a current version. - * - * @readonly - */ - get isCurrentVersion() { - return this.originalResponse.isCurrentVersion; - } - /** - * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned - * when the blob was encrypted with a customer-provided key. - * - * @readonly - */ - get encryptionKeySha256() { - return this.originalResponse.encryptionKeySha256; - } - /** - * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to - * true, then the request returns a crc64 for the range, as long as the range size is less than - * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is - * specified in the same request, it will fail with 400(Bad Request) - */ - get contentCrc64() { - return this.originalResponse.contentCrc64; - } - /** - * Object Replication Policy Id of the destination blob. - * - * @readonly - */ - get objectReplicationDestinationPolicyId() { - return this.originalResponse.objectReplicationDestinationPolicyId; - } - /** - * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. - * - * @readonly - */ - get objectReplicationSourceProperties() { - return this.originalResponse.objectReplicationSourceProperties; - } - /** - * If this blob has been sealed. - * - * @readonly - */ - get isSealed() { - return this.originalResponse.isSealed; - } - /** - * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. - * - * @readonly - */ - get immutabilityPolicyExpiresOn() { - return this.originalResponse.immutabilityPolicyExpiresOn; - } - /** - * Indicates immutability policy mode. - * - * @readonly - */ - get immutabilityPolicyMode() { - return this.originalResponse.immutabilityPolicyMode; - } - /** - * Indicates if a legal hold is present on the blob. - * - * @readonly - */ - get legalHold() { - return this.originalResponse.legalHold; - } - /** - * The response body as a browser Blob. - * Always undefined in node.js. - * - * @readonly - */ - get contentAsBlob() { - return this.originalResponse.blobBody; - } - /** - * The response body as a node.js Readable stream. - * Always undefined in the browser. - * - * It will automatically retry when internal read stream unexpected ends. - * - * @readonly - */ - get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : undefined; - } - /** - * The HTTP response. - */ - get _response() { - return this.originalResponse._response; - } - /** - * Creates an instance of BlobDownloadResponse. - * - * @param originalResponse - - * @param getter - - * @param offset - - * @param count - - * @param options - - */ - constructor(originalResponse, getter, offset, count, options = {}) { - this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const AVRO_SYNC_MARKER_SIZE = 16; -const AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); -const AVRO_CODEC_KEY = "avro.codec"; -const AVRO_SCHEMA_KEY = "avro.schema"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -class AvroParser { - /** - * Reads a fixed number of bytes from the stream. - * - * @param stream - - * @param length - - * @param options - - */ - static async readFixedBytes(stream, length, options = {}) { - const bytes = await stream.read(length, { abortSignal: options.abortSignal }); - if (bytes.length !== length) { - throw new Error("Hit stream end."); - } - return bytes; - } - /** - * Reads a single byte from the stream. - * - * @param stream - - * @param options - - */ - static async readByte(stream, options = {}) { - const buf = await AvroParser.readFixedBytes(stream, 1, options); - return buf[0]; - } - // int and long are stored in variable-length zig-zag coding. - // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt - // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream, options = {}) { - let zigZagEncoded = 0; - let significanceInBit = 0; - let byte, haveMoreByte, significanceInFloat; - do { - byte = await AvroParser.readByte(stream, options); - haveMoreByte = byte & 0x80; - zigZagEncoded |= (byte & 0x7f) << significanceInBit; - significanceInBit += 7; - } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers - if (haveMoreByte) { - // Switch to float arithmetic - // eslint-disable-next-line no-self-assign - zigZagEncoded = zigZagEncoded; - significanceInFloat = 268435456; // 2 ** 28. - do { - byte = await AvroParser.readByte(stream, options); - zigZagEncoded += (byte & 0x7f) * significanceInFloat; - significanceInFloat *= 128; // 2 ** 7 - } while (byte & 0x80); - const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; - if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) { - throw new Error("Integer overflow."); - } - return res; - } - return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1); - } - static async readLong(stream, options = {}) { - return AvroParser.readZigZagLong(stream, options); - } - static async readInt(stream, options = {}) { - return AvroParser.readZigZagLong(stream, options); - } - static async readNull() { - return null; - } - static async readBoolean(stream, options = {}) { - const b = await AvroParser.readByte(stream, options); - if (b === 1) { - return true; - } - else if (b === 0) { - return false; - } - else { - throw new Error("Byte was not a boolean."); - } - } - static async readFloat(stream, options = {}) { - const u8arr = await AvroParser.readFixedBytes(stream, 4, options); - const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); - return view.getFloat32(0, true); // littleEndian = true - } - static async readDouble(stream, options = {}) { - const u8arr = await AvroParser.readFixedBytes(stream, 8, options); - const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); - return view.getFloat64(0, true); // littleEndian = true - } - static async readBytes(stream, options = {}) { - const size = await AvroParser.readLong(stream, options); - if (size < 0) { - throw new Error("Bytes size was negative."); - } - return stream.read(size, { abortSignal: options.abortSignal }); - } - static async readString(stream, options = {}) { - const u8arr = await AvroParser.readBytes(stream, options); - const utf8decoder = new TextDecoder(); - return utf8decoder.decode(u8arr); - } - static async readMapPair(stream, readItemMethod, options = {}) { - const key = await AvroParser.readString(stream, options); - // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter. - const value = await readItemMethod(stream, options); - return { key, value }; - } - static async readMap(stream, readItemMethod, options = {}) { - const readPairMethod = (s, opts = {}) => { - return AvroParser.readMapPair(s, readItemMethod, opts); - }; - const pairs = await AvroParser.readArray(stream, readPairMethod, options); - const dict = {}; - for (const pair of pairs) { - dict[pair.key] = pair.value; - } - return dict; - } - static async readArray(stream, readItemMethod, options = {}) { - const items = []; - for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) { - if (count < 0) { - // Ignore block sizes - await AvroParser.readLong(stream, options); - count = -count; - } - while (count--) { - const item = await readItemMethod(stream, options); - items.push(item); - } - } - return items; - } -} -var AvroComplex; -(function (AvroComplex) { - AvroComplex["RECORD"] = "record"; - AvroComplex["ENUM"] = "enum"; - AvroComplex["ARRAY"] = "array"; - AvroComplex["MAP"] = "map"; - AvroComplex["UNION"] = "union"; - AvroComplex["FIXED"] = "fixed"; -})(AvroComplex || (AvroComplex = {})); -var AvroPrimitive; -(function (AvroPrimitive) { - AvroPrimitive["NULL"] = "null"; - AvroPrimitive["BOOLEAN"] = "boolean"; - AvroPrimitive["INT"] = "int"; - AvroPrimitive["LONG"] = "long"; - AvroPrimitive["FLOAT"] = "float"; - AvroPrimitive["DOUBLE"] = "double"; - AvroPrimitive["BYTES"] = "bytes"; - AvroPrimitive["STRING"] = "string"; -})(AvroPrimitive || (AvroPrimitive = {})); -class AvroType { - /** - * Determines the AvroType from the Avro Schema. - */ - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - static fromSchema(schema) { - if (typeof schema === "string") { - return AvroType.fromStringSchema(schema); - } - else if (Array.isArray(schema)) { - return AvroType.fromArraySchema(schema); - } - else { - return AvroType.fromObjectSchema(schema); - } - } - static fromStringSchema(schema) { - switch (schema) { - case AvroPrimitive.NULL: - case AvroPrimitive.BOOLEAN: - case AvroPrimitive.INT: - case AvroPrimitive.LONG: - case AvroPrimitive.FLOAT: - case AvroPrimitive.DOUBLE: - case AvroPrimitive.BYTES: - case AvroPrimitive.STRING: - return new AvroPrimitiveType(schema); - default: - throw new Error(`Unexpected Avro type ${schema}`); - } - } - static fromArraySchema(schema) { - return new AvroUnionType(schema.map(AvroType.fromSchema)); - } - static fromObjectSchema(schema) { - const type = schema.type; - // Primitives can be defined as strings or objects - try { - return AvroType.fromStringSchema(type); - } - catch (_a) { - // no-op - } - switch (type) { - case AvroComplex.RECORD: - if (schema.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema}`); - } - if (!schema.name) { - throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); - } - // eslint-disable-next-line no-case-declarations - const fields = {}; - if (!schema.fields) { - throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); - } - for (const field of schema.fields) { - fields[field.name] = AvroType.fromSchema(field.type); - } - return new AvroRecordType(fields, schema.name); - case AvroComplex.ENUM: - if (schema.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema}`); - } - if (!schema.symbols) { - throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); - } - return new AvroEnumType(schema.symbols); - case AvroComplex.MAP: - if (!schema.values) { - throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); - } - return new AvroMapType(AvroType.fromSchema(schema.values)); - case AvroComplex.ARRAY: // Unused today - case AvroComplex.FIXED: // Unused today - default: - throw new Error(`Unexpected Avro type ${type} in ${schema}`); - } - } -} -class AvroPrimitiveType extends AvroType { - constructor(primitive) { - super(); - this._primitive = primitive; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream, options = {}) { - switch (this._primitive) { - case AvroPrimitive.NULL: - return AvroParser.readNull(); - case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream, options); - case AvroPrimitive.INT: - return AvroParser.readInt(stream, options); - case AvroPrimitive.LONG: - return AvroParser.readLong(stream, options); - case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream, options); - case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream, options); - case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream, options); - case AvroPrimitive.STRING: - return AvroParser.readString(stream, options); - default: - throw new Error("Unknown Avro Primitive"); - } - } -} -class AvroEnumType extends AvroType { - constructor(symbols) { - super(); - this._symbols = symbols; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream, options = {}) { - const value = await AvroParser.readInt(stream, options); - return this._symbols[value]; - } -} -class AvroUnionType extends AvroType { - constructor(types) { - super(); - this._types = types; - } - async read(stream, options = {}) { - const typeIndex = await AvroParser.readInt(stream, options); - return this._types[typeIndex].read(stream, options); - } -} -class AvroMapType extends AvroType { - constructor(itemType) { - super(); - this._itemType = itemType; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream, options = {}) { - const readItemMethod = (s, opts) => { - return this._itemType.read(s, opts); - }; - return AvroParser.readMap(stream, readItemMethod, options); - } -} -class AvroRecordType extends AvroType { - constructor(fields, name) { - super(); - this._fields = fields; - this._name = name; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream, options = {}) { - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - const record = {}; - record["$schema"] = this._name; - for (const key in this._fields) { - if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream, options); - } - } - return record; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -function arraysEqual(a, b) { - if (a === b) - return true; - if (a == null || b == null) - return false; - if (a.length !== b.length) - return false; - for (let i = 0; i < a.length; ++i) { - if (a[i] !== b[i]) - return false; - } - return true; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -class AvroReader { - get blockOffset() { - return this._blockOffset; - } - get objectIndex() { - return this._objectIndex; - } - constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { - this._dataStream = dataStream; - this._headerStream = headerStream || dataStream; - this._initialized = false; - this._blockOffset = currentBlockOffset || 0; - this._objectIndex = indexWithinCurrentBlock || 0; - this._initialBlockOffset = currentBlockOffset || 0; - } - async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { - abortSignal: options.abortSignal, - }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { - throw new Error("Stream is not an Avro file."); - } - // File metadata is written as if defined by the following map schema: - // { "type": "map", "values": "bytes"} - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { - abortSignal: options.abortSignal, - }); - // Validate codec - const codec = this._metadata[AVRO_CODEC_KEY]; - if (!(codec === undefined || codec === null || codec === "null")) { - throw new Error("Codecs are not supported"); - } - // The 16-byte, randomly-generated sync marker for this file. - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal, - }); - // Parse the schema - const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema); - if (this._blockOffset === 0) { - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal, - }); - // skip block length - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - this._initialized = true; - if (this._objectIndex && this._objectIndex > 0) { - for (let i = 0; i < this._objectIndex; i++) { - await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); - this._itemsRemainingInBlock--; - } - } - } - hasNext() { - return !this._initialized || this._itemsRemainingInBlock > 0; - } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { - abortSignal: options.abortSignal, - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal, - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal, - })); - } - catch (_a) { - // We hit the end of the stream. - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - // Ignore block size - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } - } - yield yield tslib.__await(result); - } - }); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -class AvroReadable { -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); -class AvroReadableFromStream extends AvroReadable { - toUint8Array(data) { - if (typeof data === "string") { - return Buffer.from(data); - } - return data; - } - constructor(readable) { - super(); - this._readable = readable; - this._position = 0; - } - get position() { - return this._position; - } - async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - throw ABORT_ERROR; - } - if (size < 0) { - throw new Error(`size parameter should be positive: ${size}`); - } - if (size === 0) { - return new Uint8Array(); - } - if (!this._readable.readable) { - throw new Error("Stream no longer readable."); - } - // See if there is already enough data. - const chunk = this._readable.read(size); - if (chunk) { - this._position += chunk.length; - // chunk.length maybe less than desired size if the stream ends. - return this.toUint8Array(chunk); - } - else { - // register callback to wait for enough data to read - return new Promise((resolve, reject) => { - /* eslint-disable @typescript-eslint/no-use-before-define */ - const cleanUp = () => { - this._readable.removeListener("readable", readableCallback); - this._readable.removeListener("error", rejectCallback); - this._readable.removeListener("end", rejectCallback); - this._readable.removeListener("close", rejectCallback); - if (options.abortSignal) { - options.abortSignal.removeEventListener("abort", abortHandler); - } - }; - const readableCallback = () => { - const callbackChunk = this._readable.read(size); - if (callbackChunk) { - this._position += callbackChunk.length; - cleanUp(); - // callbackChunk.length maybe less than desired size if the stream ends. - resolve(this.toUint8Array(callbackChunk)); - } - }; - const rejectCallback = () => { - cleanUp(); - reject(); - }; - const abortHandler = () => { - cleanUp(); - reject(ABORT_ERROR); - }; - this._readable.on("readable", readableCallback); - this._readable.once("error", rejectCallback); - this._readable.once("end", rejectCallback); - this._readable.once("close", rejectCallback); - if (options.abortSignal) { - options.abortSignal.addEventListener("abort", abortHandler); - } - /* eslint-enable @typescript-eslint/no-use-before-define */ - }); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. - */ -class BlobQuickQueryStream extends stream.Readable { - /** - * Creates an instance of BlobQuickQueryStream. - * - * @param source - The current ReadableStream returned from getter - * @param options - - */ - constructor(source, options = {}) { - super(); - this.avroPaused = true; - this.source = source; - this.onProgress = options.onProgress; - this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); - this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); - } - _read() { - if (this.avroPaused) { - this.readInternal().catch((err) => { - this.emit("error", err); - }); - } - } - async readInternal() { - this.avroPaused = false; - let avroNext; - do { - avroNext = await this.avroIter.next(); - if (avroNext.done) { - break; - } - const obj = avroNext.value; - const schema = obj.$schema; - if (typeof schema !== "string") { - throw Error("Missing schema in avro record."); - } - switch (schema) { - case "com.microsoft.azure.storage.queryBlobContents.resultData": - { - const data = obj.data; - if (data instanceof Uint8Array === false) { - throw Error("Invalid data in avro result record."); - } - if (!this.push(Buffer.from(data))) { - this.avroPaused = true; - } - } - break; - case "com.microsoft.azure.storage.queryBlobContents.progress": - { - const bytesScanned = obj.bytesScanned; - if (typeof bytesScanned !== "number") { - throw Error("Invalid bytesScanned in avro progress record."); - } - if (this.onProgress) { - this.onProgress({ loadedBytes: bytesScanned }); - } - } - break; - case "com.microsoft.azure.storage.queryBlobContents.end": - if (this.onProgress) { - const totalBytes = obj.totalBytes; - if (typeof totalBytes !== "number") { - throw Error("Invalid totalBytes in avro end record."); - } - this.onProgress({ loadedBytes: totalBytes }); - } - this.push(null); - break; - case "com.microsoft.azure.storage.queryBlobContents.error": - if (this.onError) { - const fatal = obj.fatal; - if (typeof fatal !== "boolean") { - throw Error("Invalid fatal in avro error record."); - } - const name = obj.name; - if (typeof name !== "string") { - throw Error("Invalid name in avro error record."); - } - const description = obj.description; - if (typeof description !== "string") { - throw Error("Invalid description in avro error record."); - } - const position = obj.position; - if (typeof position !== "number") { - throw Error("Invalid position in avro error record."); - } - this.onError({ - position, - name, - isFatal: fatal, - description, - }); - } - break; - default: - throw Error(`Unknown schema ${schema} in avro progress record.`); - } - } while (!avroNext.done && !this.avroPaused); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will - * parse avor data returned by blob query. - */ -class BlobQueryResponse { - /** - * Indicates that the service supports - * requests for partial file content. - * - * @readonly - */ - get acceptRanges() { - return this.originalResponse.acceptRanges; - } - /** - * Returns if it was previously specified - * for the file. - * - * @readonly - */ - get cacheControl() { - return this.originalResponse.cacheControl; - } - /** - * Returns the value that was specified - * for the 'x-ms-content-disposition' header and specifies how to process the - * response. - * - * @readonly - */ - get contentDisposition() { - return this.originalResponse.contentDisposition; - } - /** - * Returns the value that was specified - * for the Content-Encoding request header. - * - * @readonly - */ - get contentEncoding() { - return this.originalResponse.contentEncoding; - } - /** - * Returns the value that was specified - * for the Content-Language request header. - * - * @readonly - */ - get contentLanguage() { - return this.originalResponse.contentLanguage; - } - /** - * The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs. - * - * @readonly - */ - get blobSequenceNumber() { - return this.originalResponse.blobSequenceNumber; - } - /** - * The blob's type. Possible values include: - * 'BlockBlob', 'PageBlob', 'AppendBlob'. - * - * @readonly - */ - get blobType() { - return this.originalResponse.blobType; - } - /** - * The number of bytes present in the - * response body. - * - * @readonly - */ - get contentLength() { - return this.originalResponse.contentLength; - } - /** - * If the file has an MD5 hash and the - * request is to read the full file, this response header is returned so that - * the client can check for message content integrity. If the request is to - * read a specified range and the 'x-ms-range-get-content-md5' is set to - * true, then the request returns an MD5 hash for the range, as long as the - * range size is less than or equal to 4 MB. If neither of these sets of - * conditions is true, then no value is returned for the 'Content-MD5' - * header. - * - * @readonly - */ - get contentMD5() { - return this.originalResponse.contentMD5; - } - /** - * Indicates the range of bytes returned if - * the client requested a subset of the file by setting the Range request - * header. - * - * @readonly - */ - get contentRange() { - return this.originalResponse.contentRange; - } - /** - * The content type specified for the file. - * The default content type is 'application/octet-stream' - * - * @readonly - */ - get contentType() { - return this.originalResponse.contentType; - } - /** - * Conclusion time of the last attempted - * Copy File operation where this file was the destination file. This value - * can specify the time of a completed, aborted, or failed copy attempt. - * - * @readonly - */ - get copyCompletedOn() { - return undefined; - } - /** - * String identifier for the last attempted Copy - * File operation where this file was the destination file. - * - * @readonly - */ - get copyId() { - return this.originalResponse.copyId; - } - /** - * Contains the number of bytes copied and - * the total bytes in the source in the last attempted Copy File operation - * where this file was the destination file. Can show between 0 and - * Content-Length bytes copied. - * - * @readonly - */ - get copyProgress() { - return this.originalResponse.copyProgress; - } - /** - * URL up to 2KB in length that specifies the - * source file used in the last attempted Copy File operation where this file - * was the destination file. - * - * @readonly - */ - get copySource() { - return this.originalResponse.copySource; - } - /** - * State of the copy operation - * identified by 'x-ms-copy-id'. Possible values include: 'pending', - * 'success', 'aborted', 'failed' - * - * @readonly - */ - get copyStatus() { - return this.originalResponse.copyStatus; - } - /** - * Only appears when - * x-ms-copy-status is failed or pending. Describes cause of fatal or - * non-fatal copy operation failure. - * - * @readonly - */ - get copyStatusDescription() { - return this.originalResponse.copyStatusDescription; - } - /** - * When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible - * values include: 'infinite', 'fixed'. - * - * @readonly - */ - get leaseDuration() { - return this.originalResponse.leaseDuration; - } - /** - * Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. - * - * @readonly - */ - get leaseState() { - return this.originalResponse.leaseState; - } - /** - * The current lease status of the - * blob. Possible values include: 'locked', 'unlocked'. - * - * @readonly - */ - get leaseStatus() { - return this.originalResponse.leaseStatus; - } - /** - * A UTC date/time value generated by the service that - * indicates the time at which the response was initiated. - * - * @readonly - */ - get date() { - return this.originalResponse.date; - } - /** - * The number of committed blocks - * present in the blob. This header is returned only for append blobs. - * - * @readonly - */ - get blobCommittedBlockCount() { - return this.originalResponse.blobCommittedBlockCount; - } - /** - * The ETag contains a value that you can use to - * perform operations conditionally, in quotes. - * - * @readonly - */ - get etag() { - return this.originalResponse.etag; - } - /** - * The error code. - * - * @readonly - */ - get errorCode() { - return this.originalResponse.errorCode; - } - /** - * The value of this header is set to - * true if the file data and application metadata are completely encrypted - * using the specified algorithm. Otherwise, the value is set to false (when - * the file is unencrypted, or if only parts of the file/application metadata - * are encrypted). - * - * @readonly - */ - get isServerEncrypted() { - return this.originalResponse.isServerEncrypted; - } - /** - * If the blob has a MD5 hash, and if - * request contains range header (Range or x-ms-range), this response header - * is returned with the value of the whole blob's MD5 value. This value may - * or may not be equal to the value returned in Content-MD5 header, with the - * latter calculated from the requested range. - * - * @readonly - */ - get blobContentMD5() { - return this.originalResponse.blobContentMD5; - } - /** - * Returns the date and time the file was last - * modified. Any operation that modifies the file or its properties updates - * the last modified time. - * - * @readonly - */ - get lastModified() { - return this.originalResponse.lastModified; - } - /** - * A name-value pair - * to associate with a file storage object. - * - * @readonly - */ - get metadata() { - return this.originalResponse.metadata; - } - /** - * This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. - * - * @readonly - */ - get requestId() { - return this.originalResponse.requestId; - } - /** - * If a client request id header is sent in the request, this header will be present in the - * response with the same value. - * - * @readonly - */ - get clientRequestId() { - return this.originalResponse.clientRequestId; - } - /** - * Indicates the version of the File service used - * to execute the request. - * - * @readonly - */ - get version() { - return this.originalResponse.version; - } - /** - * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned - * when the blob was encrypted with a customer-provided key. - * - * @readonly - */ - get encryptionKeySha256() { - return this.originalResponse.encryptionKeySha256; - } - /** - * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to - * true, then the request returns a crc64 for the range, as long as the range size is less than - * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is - * specified in the same request, it will fail with 400(Bad Request) - */ - get contentCrc64() { - return this.originalResponse.contentCrc64; - } - /** - * The response body as a browser Blob. - * Always undefined in node.js. - * - * @readonly - */ - get blobBody() { - return undefined; - } - /** - * The response body as a node.js Readable stream. - * Always undefined in the browser. - * - * It will parse avor data returned by blob query. - * - * @readonly - */ - get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : undefined; - } - /** - * The HTTP response. - */ - get _response() { - return this.originalResponse._response; - } - /** - * Creates an instance of BlobQueryResponse. - * - * @param originalResponse - - * @param options - - */ - constructor(originalResponse, options = {}) { - this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Represents the access tier on a blob. - * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} - */ -exports.BlockBlobTier = void 0; -(function (BlockBlobTier) { - /** - * Optimized for storing data that is accessed frequently. - */ - BlockBlobTier["Hot"] = "Hot"; - /** - * Optimized for storing data that is infrequently accessed and stored for at least 30 days. - */ - BlockBlobTier["Cool"] = "Cool"; - /** - * Optimized for storing data that is rarely accessed. - */ - BlockBlobTier["Cold"] = "Cold"; - /** - * Optimized for storing data that is rarely accessed and stored for at least 180 days - * with flexible latency requirements (on the order of hours). - */ - BlockBlobTier["Archive"] = "Archive"; -})(exports.BlockBlobTier || (exports.BlockBlobTier = {})); -/** - * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. - * Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} - * for detailed information on the corresponding IOPS and throughput per PageBlobTier. - */ -exports.PremiumPageBlobTier = void 0; -(function (PremiumPageBlobTier) { - /** - * P4 Tier. - */ - PremiumPageBlobTier["P4"] = "P4"; - /** - * P6 Tier. - */ - PremiumPageBlobTier["P6"] = "P6"; - /** - * P10 Tier. - */ - PremiumPageBlobTier["P10"] = "P10"; - /** - * P15 Tier. - */ - PremiumPageBlobTier["P15"] = "P15"; - /** - * P20 Tier. - */ - PremiumPageBlobTier["P20"] = "P20"; - /** - * P30 Tier. - */ - PremiumPageBlobTier["P30"] = "P30"; - /** - * P40 Tier. - */ - PremiumPageBlobTier["P40"] = "P40"; - /** - * P50 Tier. - */ - PremiumPageBlobTier["P50"] = "P50"; - /** - * P60 Tier. - */ - PremiumPageBlobTier["P60"] = "P60"; - /** - * P70 Tier. - */ - PremiumPageBlobTier["P70"] = "P70"; - /** - * P80 Tier. - */ - PremiumPageBlobTier["P80"] = "P80"; -})(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {})); -function toAccessTier(tier) { - if (tier === undefined) { - return undefined; - } - return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service). -} -function ensureCpkIfSpecified(cpk, isHttps) { - if (cpk && !isHttps) { - throw new RangeError("Customer-provided encryption key must be used over HTTPS."); - } - if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; - } -} -/** - * Defines the known cloud audiences for Storage. - */ -exports.StorageBlobAudience = void 0; -(function (StorageBlobAudience) { - /** - * The OAuth scope to use to retrieve an AAD token for Azure Storage. - */ - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - /** - * The OAuth scope to use to retrieve an AAD token for Azure Disk. - */ - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; -})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {})); -/** - * - * To get OAuth audience for a storage account for blob service. - */ -function getBlobServiceAccountAudience(storageAccountName) { - return `https://${storageAccountName}.blob.core.windows.net/.default`; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Function that converts PageRange and ClearRange to a common Range object. - * PageRange and ClearRange have start and end while Range offset and count - * this function normalizes to Range. - * @param response - Model PageBlob Range response - */ -function rangeResponseFromModel(response) { - const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start, - })); - const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start, - })); - return Object.assign(Object.assign({}, response), { pageRange, - clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange, - } }) }); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This is the poller returned by {@link BlobClient.beginCopyFromURL}. - * This can not be instantiated directly outside of this package. - * - * @hidden - */ -class BlobBeginCopyFromUrlPoller extends coreLro.Poller { - constructor(options) { - const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options; - let state; - if (resumeFrom) { - state = JSON.parse(resumeFrom).state; - } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { blobClient, - copySource, - startCopyFromURLOptions })); - super(operation); - if (typeof onProgress === "function") { - this.onProgress(onProgress); - } - this.intervalInMs = intervalInMs; - } - delay() { - return coreUtil.delay(this.intervalInMs); - } -} -/** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ -const cancel = async function cancel(options = {}) { - const state = this.state; - const { copyId } = state; - if (state.isCompleted) { - return makeBlobBeginCopyFromURLPollOperation(state); - } - if (!copyId) { - state.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state); - } - // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call - await state.blobClient.abortCopyFromURL(copyId, { - abortSignal: options.abortSignal, - }); - state.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state); -}; -/** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ -const update = async function update(options = {}) { - const state = this.state; - const { blobClient, copySource, startCopyFromURLOptions } = state; - if (!state.isStarted) { - state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); - // copyId is needed to abort - state.copyId = result.copyId; - if (result.copyStatus === "success") { - state.result = result; - state.isCompleted = true; - } - } - else if (!state.isCompleted) { - try { - const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal }); - const { copyStatus, copyProgress } = result; - const prevCopyProgress = state.copyProgress; - if (copyProgress) { - state.copyProgress = copyProgress; - } - if (copyStatus === "pending" && - copyProgress !== prevCopyProgress && - typeof options.fireProgress === "function") { - // trigger in setTimeout, or swallow error? - options.fireProgress(state); - } - else if (copyStatus === "success") { - state.result = result; - state.isCompleted = true; - } - else if (copyStatus === "failed") { - state.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); - state.isCompleted = true; - } - } - catch (err) { - state.error = err; - state.isCompleted = true; - } - } - return makeBlobBeginCopyFromURLPollOperation(state); -}; -/** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ -const toString = function toString() { - return JSON.stringify({ state: this.state }, (key, value) => { - // remove blobClient from serialized state since a client can't be hydrated from this info. - if (key === "blobClient") { - return undefined; - } - return value; - }); -}; -/** - * Creates a poll operation given the provided state. - * @hidden - */ -function makeBlobBeginCopyFromURLPollOperation(state) { - return { - state: Object.assign({}, state), - cancel, - toString, - update, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Generate a range string. For example: - * - * "bytes=255-" or "bytes=0-511" - * - * @param iRange - - */ -function rangeToString(iRange) { - if (iRange.offset < 0) { - throw new RangeError(`Range.offset cannot be smaller than 0.`); - } - if (iRange.count && iRange.count <= 0) { - throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); - } - return iRange.count - ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` - : `bytes=${iRange.offset}-`; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -// In browser, during webpack or browserify bundling, this module will be replaced by 'events' -// https://github.com/Gozala/events -/** - * States for Batch. - */ -var BatchStates; -(function (BatchStates) { - BatchStates[BatchStates["Good"] = 0] = "Good"; - BatchStates[BatchStates["Error"] = 1] = "Error"; -})(BatchStates || (BatchStates = {})); -/** - * Batch provides basic parallel execution with concurrency limits. - * Will stop execute left operations when one of the executed operation throws an error. - * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. - */ -class Batch { - /** - * Creates an instance of Batch. - * @param concurrency - - */ - constructor(concurrency = 5) { - /** - * Number of active operations under execution. - */ - this.actives = 0; - /** - * Number of completed operations under execution. - */ - this.completed = 0; - /** - * Offset of next operation to be executed. - */ - this.offset = 0; - /** - * Operation array to be executed. - */ - this.operations = []; - /** - * States of Batch. When an error happens, state will turn into error. - * Batch will stop execute left operations. - */ - this.state = BatchStates.Good; - if (concurrency < 1) { - throw new RangeError("concurrency must be larger than 0"); - } - this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); - } - /** - * Add a operation into queue. - * - * @param operation - - */ - addOperation(operation) { - this.operations.push(async () => { - try { - this.actives++; - await operation(); - this.actives--; - this.completed++; - this.parallelExecute(); - } - catch (error) { - this.emitter.emit("error", error); - } - }); - } - /** - * Start execute operations in the queue. - * - */ - async do() { - if (this.operations.length === 0) { - return Promise.resolve(); - } - this.parallelExecute(); - return new Promise((resolve, reject) => { - this.emitter.on("finish", resolve); - this.emitter.on("error", (error) => { - this.state = BatchStates.Error; - reject(error); - }); - }); - } - /** - * Get next operation to be executed. Return null when reaching ends. - * - */ - nextOperation() { - if (this.offset < this.operations.length) { - return this.operations[this.offset++]; - } - return null; - } - /** - * Start execute operations. One one the most important difference between - * this method with do() is that do() wraps as an sync method. - * - */ - parallelExecute() { - if (this.state === BatchStates.Error) { - return; - } - if (this.completed >= this.operations.length) { - this.emitter.emit("finish"); - return; - } - while (this.actives < this.concurrency) { - const operation = this.nextOperation(); - if (operation) { - operation(); - } - else { - return; - } - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This class generates a readable stream from the data in an array of buffers. - */ -class BuffersStream extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - // check byteLength is no larger than buffers[] total length - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - // The last buffer may be longer than the data it contains. - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - // chunkSize = size - i - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } - else { - // chunkSize = remaining - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - // this.buffers[this.bufferIndex] used up, shift to next one - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } - else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } - else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const maxBufferLength = buffer.constants.MAX_LENGTH; -/** - * This class provides a buffer container which conceptually has no hard size limit. - * It accepts a capacity, an array of input buffers and the total length of input data. - * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers - * into the internal "buffer" serially with respect to the total length. - * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream - * assembled from all the data in the internal "buffer". - */ -class PooledBuffer { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - /** - * Internal buffers used to keep the data. - * Each buffer has a length of the maxBufferLength except last one. - */ - this.buffers = []; - this.capacity = capacity; - this._size = 0; - // allocate - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - // clear copied from source buffers - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This class accepts a Node.js Readable stream as input, and keeps reading data - * from the stream into the internal buffer structure, until it reaches maxBuffers. - * Every available buffer will try to trigger outgoingHandler. - * - * The internal buffer structure includes an incoming buffer array, and a outgoing - * buffer array. The incoming buffer array includes the "empty" buffers can be filled - * with new incoming data. The outgoing array includes the filled buffers to be - * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. - * - * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING - * - * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers - * - * PERFORMANCE IMPROVEMENT TIPS: - * 1. Input stream highWaterMark is better to set a same value with bufferSize - * parameter, which will avoid Buffer.concat() operations. - * 2. concurrency should set a smaller value than maxBuffers, which is helpful to - * reduce the possibility when a outgoing handler waits for the stream data. - * in this situation, outgoing handlers are blocked. - * Outgoing queue shouldn't be empty. - */ -class BufferScheduler { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - /** - * An internal event emitter. - */ - this.emitter = new events.EventEmitter(); - /** - * An internal offset marker to track data offset in bytes of next outgoingHandler. - */ - this.offset = 0; - /** - * An internal marker to track whether stream is end. - */ - this.isStreamEnd = false; - /** - * An internal marker to track whether stream or outgoingHandler returns error. - */ - this.isError = false; - /** - * How many handlers are executing. - */ - this.executingOutgoingHandlers = 0; - /** - * How many buffers have been allocated. - */ - this.numBuffers = 0; - /** - * Because this class doesn't know how much data every time stream pops, which - * is defined by highWaterMarker of the stream. So BufferScheduler will cache - * data received from the stream, when data in unresolvedDataArray exceeds the - * blockSize defined, it will try to concat a blockSize of buffer, fill into available - * buffers from incoming and push to outgoing array. - */ - this.unresolvedDataArray = []; - /** - * How much data consisted in unresolvedDataArray. - */ - this.unresolvedLength = 0; - /** - * The array includes all the available buffers can be used to fill data from stream. - */ - this.incoming = []; - /** - * The array (queue) includes all the buffers filled from stream data. - */ - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset) - .then(resolve) - .catch(reject); - } - else if (this.unresolvedLength >= this.bufferSize) { - return; - } - else { - resolve(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer) { - if (!buffer) { - buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } - else { - buffer.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer.size; - return buffer; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer; - if (this.incoming.length > 0) { - buffer = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer); - } - else { - if (this.numBuffers < this.maxBuffers) { - buffer = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } - else { - // No available buffer, wait for buffer returned - return false; - } - } - this.outgoing.push(buffer); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer = this.outgoing.shift(); - if (buffer) { - this.triggerOutgoingHandler(buffer); - } - } while (buffer); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer) { - const bufferLength = buffer.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); - } - catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer) { - this.incoming.push(buffer); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Reads a readable stream into buffer. Fill the buffer from offset to end. - * - * @param stream - A Node.js Readable stream - * @param buffer - Buffer to be filled, length must greater than or equal to offset - * @param offset - From which position in the buffer to be filled, inclusive - * @param end - To which position in the buffer to be filled, exclusive - * @param encoding - Encoding of the Readable stream - */ -async function streamToBuffer(stream, buffer, offset, end, encoding) { - let pos = 0; // Position in stream - const count = end - offset; // Total amount of data needed in stream - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream.on("readable", () => { - if (pos >= count) { - clearTimeout(timeout); - resolve(); - return; - } - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } - // How much data needed in this chunk - const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); - pos += chunkLength; - }); - stream.on("end", () => { - clearTimeout(timeout); - if (pos < count) { - reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); - } - resolve(); - }); - stream.on("error", (msg) => { - clearTimeout(timeout); - reject(msg); - }); - }); -} -/** - * Reads a readable stream into buffer entirely. - * - * @param stream - A Node.js Readable stream - * @param buffer - Buffer to be filled, length must greater than or equal to offset - * @param encoding - Encoding of the Readable stream - * @returns with the count of bytes read. - * @throws `RangeError` If buffer size is not big enough. - */ -async function streamToBuffer2(stream, buffer, encoding) { - let pos = 0; // Position in stream - const bufferSize = buffer.length; - return new Promise((resolve, reject) => { - stream.on("readable", () => { - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } - if (pos + chunk.length > bufferSize) { - reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); - return; - } - buffer.fill(chunk, pos, pos + chunk.length); - pos += chunk.length; - }); - stream.on("end", () => { - resolve(pos); - }); - stream.on("error", reject); - }); -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. - * - * @param rs - The read stream. - * @param file - Destination file path. - */ -async function readStreamToLocalFile(rs, file) { - return new Promise((resolve, reject) => { - const ws = fs__namespace.createWriteStream(file); - rs.on("error", (err) => { - reject(err); - }); - ws.on("error", (err) => { - reject(err); - }); - ws.on("close", resolve); - rs.pipe(ws); - }); -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Promisified version of fs.stat(). - */ -const fsStat = util__namespace.promisify(fs__namespace.stat); -const fsCreateReadStream = fs__namespace.createReadStream; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, - * append blob, or page blob. - */ -class BlobClient extends StorageClient { - /** - * The name of the blob. - */ - get name() { - return this._name; - } - /** - * The name of the storage container the blob is associated with. - */ - get containerName() { - return this._containerName; - } - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - options = options || {}; - let pipeline; - let url; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { - options = blobNameOrOptions; - } - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - ({ blobName: this._name, containerName: this._containerName } = - this.getBlobAndContainerNamesFromUrl()); - this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); - } - /** - * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp - */ - withSnapshot(snapshot) { - return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * Creates a new BlobClient object pointing to a version of this blob. - * Provide "" will remove the versionId and return a Client to the base blob. - * - * @param versionId - The versionId. - * @returns A new BlobClient object pointing to the version of this blob. - */ - withVersion(versionId) { - return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline); - } - /** - * Creates a AppendBlobClient object. - * - */ - getAppendBlobClient() { - return new AppendBlobClient(this.url, this.pipeline); - } - /** - * Creates a BlockBlobClient object. - * - */ - getBlockBlobClient() { - return new BlockBlobClient(this.url, this.pipeline); - } - /** - * Creates a PageBlobClient object. - * - */ - getPageBlobClient() { - return new PageBlobClient(this.url, this.pipeline); - } - /** - * Reads or downloads a blob from the system, including its metadata and properties. - * You can also call Get Blob to read a snapshot. - * - * * In Node.js, data returns in a Readable stream readableStreamBody - * * In browsers, data returns in a promise blobBody - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob - * - * @param offset - From which position of the blob to download, greater than or equal to 0 - * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined - * @param options - Optional options to Blob Download operation. - * - * - * Example usage (Node.js): - * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); - * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); - * } - * ``` - * - * Example usage (browser): - * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded - * ); - * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); - * } - * ``` - */ - async download(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onDownloadProgress: coreUtil.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream - }, - range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), - rangeGetContentMD5: options.rangeGetContentMD5, - rangeGetContentCRC64: options.rangeGetContentCrc64, - snapshot: options.snapshot, - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - // Return browser response immediately - if (!coreUtil.isNode) { - return wrappedRes; - } - // We support retrying when download stream unexpected ends in Node.js runtime - // Following code shouldn't be bundled into browser build, however some - // bundlers may try to bundle following code and "FileReadResponse.ts". - // In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts" - // The config is in package.json "browser" field - if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) { - // TODO: Default value or make it a required parameter? - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; - } - if (res.contentLength === undefined) { - throw new RangeError(`File download response doesn't contain valid content length header`); - } - if (!res.etag) { - throw new RangeError(`File download response doesn't contain valid etag header`); - } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a; - const updatedDownloadOptions = { - leaseAccessConditions: options.conditions, - modifiedAccessConditions: { - ifMatch: options.conditions.ifMatch || res.etag, - ifModifiedSince: options.conditions.ifModifiedSince, - ifNoneMatch: options.conditions.ifNoneMatch, - ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions, - }, - range: rangeToString({ - count: offset + res.contentLength - start, - offset: start, - }), - rangeGetContentMD5: options.rangeGetContentMD5, - rangeGetContentCRC64: options.rangeGetContentCrc64, - snapshot: options.snapshot, - cpkInfo: options.customerProvidedKey, - }; - // Debug purpose only - // console.log( - // `Read from internal stream, range: ${ - // updatedOptions.range - // }, options: ${JSON.stringify(updatedOptions)}` - // ); - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; - }, offset, res.contentLength, { - maxRetryRequests: options.maxRetryRequests, - onProgress: options.onProgress, - }); - }); - } - /** - * Returns true if the Azure blob resource represented by this client exists; false otherwise. - * - * NOTE: use this function with care since an existing blob might be deleted by other clients or - * applications. Vice versa new blobs might be added by other clients or applications after this - * function completes. - * - * @param options - options to Exists operation. - */ - async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { - try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - await this.getProperties({ - abortSignal: options.abortSignal, - customerProvidedKey: options.customerProvidedKey, - conditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - }); - return true; - } - catch (e) { - if (e.statusCode === 404) { - // Expected exception when checking blob existence - return false; - } - else if (e.statusCode === 409 && - (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || - e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { - // Expected exception when checking blob existence - return true; - } - throw e; - } - }); - } - /** - * Returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties - * - * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if - * they originally contained uppercase characters. This differs from the metadata keys returned by - * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which - * will retain their original casing. - * - * @param options - Optional options to Get Properties operation. - */ - async getProperties(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - }); - } - /** - * Marks the specified blob or snapshot for deletion. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob - * - * @param options - Optional options to Blob Delete operation. - */ - async delete(options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ - abortSignal: options.abortSignal, - deleteSnapshots: options.deleteSnapshots, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob - * - * @param options - Optional options to Blob Delete operation. - */ - async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Restores the contents and metadata of soft deleted blob and any associated - * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 - * or later. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/undelete-blob - * - * @param options - Optional options to Blob Undelete operation. - */ - async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets system properties on the blob. - * - * If no value provided, or no value provided for the specified blob HTTP headers, - * these blob HTTP headers without a value will be cleared. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties - * - * @param blobHTTPHeaders - If no value provided, or no value provided for - * the specified blob HTTP headers, these blob HTTP - * headers without a value will be cleared. - * A common header to set is `blobContentType` - * enabling the browser to provide functionality - * based on file type. - * @param options - Optional options to Blob Set HTTP Headers operation. - */ - async setHTTPHeaders(blobHTTPHeaders, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ - abortSignal: options.abortSignal, - blobHttpHeaders: blobHTTPHeaders, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets user-defined metadata for the specified blob as one or more name-value pairs. - * - * If no option provided, or no metadata defined in the parameter, the blob - * metadata will be removed. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata - * - * @param metadata - Replace existing metadata with this value. - * If no value provided the existing metadata will be removed. - * @param options - Optional options to Set Metadata operation. - */ - async setMetadata(metadata, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets tags on the underlying blob. - * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. - * Valid tag key and value characters include lower and upper case letters, digits (0-9), - * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). - * - * @param tags - - * @param options - - */ - async setTags(tags, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags), - })); - }); - } - /** - * Gets the tags associated with the underlying blob. - * - * @param options - - */ - async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); - return wrappedResponse; - }); - } - /** - * Get a {@link BlobLeaseClient} that manages leases on the blob. - * - * @param proposeLeaseId - Initial proposed lease Id. - * @returns A new BlobLeaseClient object for managing leases on the blob. - */ - getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); - } - /** - * Creates a read-only snapshot of a blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/snapshot-blob - * - * @param options - Optional options to the Blob Create Snapshot operation. - */ - async createSnapshot(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Asynchronously copies a blob to a destination within the storage account. - * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. - * Note that the onProgress callback will not be invoked if the operation completes in the first - * request, and attempting to cancel a completed copy will result in an error being thrown. - * - * In version 2012-02-12 and later, the source for a Copy Blob operation can be - * a committed blob in any Azure storage account. - * Beginning with version 2015-02-21, the source for a Copy Blob operation can be - * an Azure file in any Azure storage account. - * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob - * operation to copy from another storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob - * - * Example using automatic polling: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` - * - * Example using manual polling: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); - * } - * const result = copyPoller.getResult(); - * ``` - * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * onProgress(state) { - * console.log(`Progress: ${state.copyProgress}`); - * } - * }); - * const result = await copyPoller.pollUntilDone(); - * ``` - * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress - * }); - * const result = await copyPoller.pollUntilDone(); - * ``` - * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * // cancel operation after starting it. - * try { - * await copyPoller.cancelOperation(); - * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); - * } - * } - * ``` - * - * @param copySource - url to the source Azure Blob/File. - * @param options - Optional options to the Blob Start Copy From URL operation. - */ - async beginCopyFromURL(copySource, options = {}) { - const client = { - abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), - getProperties: (...args) => this.getProperties(...args), - startCopyFromURL: (...args) => this.startCopyFromURL(...args), - }; - const poller = new BlobBeginCopyFromUrlPoller({ - blobClient: client, - copySource, - intervalInMs: options.intervalInMs, - onProgress: options.onProgress, - resumeFrom: options.resumeFrom, - startCopyFromURLOptions: options, - }); - // Trigger the startCopyFromURL call by calling poll. - // Any errors from this method should be surfaced to the user. - await poller.poll(); - return poller; - } - /** - * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero - * length and full metadata. Version 2012-02-12 and newer. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob - * - * @param copyId - Id of the Copy From URL operation. - * @param options - Optional options to the Blob Abort Copy From URL operation. - */ - async abortCopyFromURL(copyId, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not - * return a response until the copy is complete. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url - * - * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication - * @param options - - */ - async syncCopyFromURL(copySource, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource, { - abortSignal: options.abortSignal, - metadata: options.metadata, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - }, - sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, - legalHold: options.legalHold, - encryptionScope: options.encryptionScope, - copySourceTags: options.copySourceTags, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets the tier on a blob. The operation is allowed on a page blob in a premium - * storage account and on a block blob in a blob storage account (locally redundant - * storage only). A premium page blob's tier determines the allowed size, IOPS, - * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive - * storage type. This operation does not update the blob's ETag. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-tier - * - * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. - * @param options - Optional options to the Blob Set Tier operation. - */ - async setAccessTier(tier, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier), { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - rehydratePriority: options.rehydratePriority, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer; - let offset = 0; - let count = 0; - let options = param4; - if (param1 instanceof Buffer) { - buffer = param1; - offset = param2 || 0; - count = typeof param3 === "number" ? param3 : 0; - } - else { - offset = typeof param1 === "number" ? param1 : 0; - count = typeof param2 === "number" ? param2 : 0; - options = param3 || {}; - } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0) { - throw new RangeError("blockSize option must be >= 0"); - } - if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; - } - if (offset < 0) { - throw new RangeError("offset option must be >= 0"); - } - if (count && count <= 0) { - throw new RangeError("count option must be greater than 0"); - } - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { - // Customer doesn't specify length, get it - if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - count = response.contentLength - offset; - if (count < 0) { - throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); - } - } - // Allocate the buffer of size = count if the buffer is not provided - if (!buffer) { - try { - buffer = Buffer.alloc(count); - } - catch (error) { - throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`); - } - } - if (buffer.length < count) { - throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); - } - let transferProgress = 0; - const batch = new Batch(options.concurrency); - for (let off = offset; off < offset + count; off = off + blockSize) { - batch.addOperation(async () => { - // Exclusive chunk end position - let chunkEnd = offset + count; - if (off + blockSize < chunkEnd) { - chunkEnd = off + blockSize; - } - const response = await this.download(off, chunkEnd - off, { - abortSignal: options.abortSignal, - conditions: options.conditions, - maxRetryRequests: options.maxRetryRequestsPerBlock, - customerProvidedKey: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - }); - const stream = response.readableStreamBody; - await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset); - // Update progress after block is downloaded, in case of block trying - // Could provide finer grained progress updating inside HTTP requests, - // only if convenience layer download try is enabled - transferProgress += chunkEnd - off; - if (options.onProgress) { - options.onProgress({ loadedBytes: transferProgress }); - } - }); - } - await batch.do(); - return buffer; - }); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Downloads an Azure Blob to a local file. - * Fails if the the given file path already exits. - * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. - * - * @param filePath - - * @param offset - From which position of the block blob to download. - * @param count - How much data to be downloaded. Will download to the end when passing undefined. - * @param options - Options to Blob download options. - * @returns The response data for blob download operation, - * but with readableStreamBody set to undefined since its - * content is already read and written into a local file - * at the specified path. - */ - async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); - } - // The stream is no longer accessible so setting it to undefined. - response.blobDownloadStream = undefined; - return response; - }); - } - getBlobAndContainerNamesFromUrl() { - let containerName; - let blobName; - try { - // URL may look like the following - // "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString"; - // "https://myaccount.blob.core.windows.net/mycontainer/blob"; - // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString"; - // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt"; - // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob` - // http://localhost:10001/devstoreaccount1/containername/blob - const parsedUrl = new URL(this.url); - if (parsedUrl.host.split(".")[1] === "blob") { - // "https://myaccount.blob.core.windows.net/containername/blob". - // .getPath() -> /containername/blob - const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); - containerName = pathComponents[1]; - blobName = pathComponents[3]; - } - else if (isIpEndpointStyle(parsedUrl)) { - // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob - // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob - // .getPath() -> /devstoreaccount1/containername/blob - const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); - containerName = pathComponents[2]; - blobName = pathComponents[4]; - } - else { - // "https://customdomain.com/containername/blob". - // .getPath() -> /containername/blob - const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); - containerName = pathComponents[1]; - blobName = pathComponents[3]; - } - // decode the encoded blobName, containerName - to get all the special characters that might be present in them - containerName = decodeURIComponent(containerName); - blobName = decodeURIComponent(blobName); - // Azure Storage Server will replace "\" with "/" in the blob names - // doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName - blobName = blobName.replace(/\\/g, "/"); - if (!containerName) { - throw new Error("Provided containerName is invalid."); - } - return { blobName, containerName }; - } - catch (error) { - throw new Error("Unable to extract blobName and containerName with provided information."); - } - } - /** - * Asynchronously copies a blob to a destination within the storage account. - * In version 2012-02-12 and later, the source for a Copy Blob operation can be - * a committed blob in any Azure storage account. - * Beginning with version 2015-02-21, the source for a Copy Blob operation can be - * an Azure file in any Azure storage account. - * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob - * operation to copy from another storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob - * - * @param copySource - url to the source Azure Blob/File. - * @param options - Optional options to the Blob Start Copy From URL operation. - */ - async startCopyFromURL(copySource, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: options.sourceConditions.ifMatch, - sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, - sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, - sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, - sourceIfTags: options.sourceConditions.tagConditions, - }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - sealBlob: options.sealBlob, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasUrl(options) { - return new Promise((resolve) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; - } - /** - * - * Generates a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasStringToSign(options, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).stringToSign; - } - /** - * Delete the immutablility policy on the blob. - * - * @param options - Optional options to delete immutability policy on the blob. - */ - async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Set immutability policy on the blob. - * - * @param options - Optional options to set immutability policy on the blob. - */ - async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ - immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, - immutabilityPolicyMode: immutabilityPolicy.policyMode, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Set legal hold on the blob. - * - * @param options - Optional options to set legal hold on the blob. - */ - async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information - * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. - */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } -} -/** - * AppendBlobClient defines a set of operations applicable to append blobs. - */ -class AppendBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. - // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString; - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - // The second parameter is undefined. Use anonymous credential. - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - this.appendBlobContext = this.storageClientContext.appendBlob; - } - /** - * Creates a new AppendBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot) { - return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param options - Options to the Append Block Create operation. - * - * - * Example usage: - * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); - * await appendBlobClient.create(); - * ``` - */ - async create(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param options - - */ - async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Seals the append blob, making it read only. - * - * @param options - - */ - async seal(options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ - abortSignal: options.abortSignal, - appendPositionAccessConditions: options.conditions, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Commits a new block of data to the end of the existing append blob. - * @see https://learn.microsoft.com/rest/api/storageservices/append-block - * - * @param body - Data to be appended. - * @param contentLength - Length of the body in bytes. - * @param options - Options to the Append Block operation. - * - * - * Example usage: - * - * ```js - * const content = "Hello World!"; - * - * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); - * await newAppendBlobClient.create(); - * await newAppendBlobClient.appendBlock(content, content.length); - * - * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); - * await existingAppendBlobClient.appendBlock(content, content.length); - * ``` - */ - async appendBlock(body, contentLength, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength, body, { - abortSignal: options.abortSignal, - appendPositionAccessConditions: options.conditions, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onUploadProgress: options.onProgress, - }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob - * where the contents are read from a source url. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/append-block-from-url - * - * @param sourceURL - - * The url to the blob that will be the source of the copy. A source blob in the same storage account can - * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob - * must either be public or must be authenticated via a shared access signature. If the source blob is - * public, no authentication is required to perform the operation. - * @param sourceOffset - Offset in source to be appended - * @param count - Number of bytes to be appended as a block - * @param options - - */ - async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { - abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - leaseAccessConditions: options.conditions, - appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } -} -/** - * BlockBlobClient defines a set of operations applicable to block blobs. - */ -class BlockBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. - // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { - options = blobNameOrOptions; - } - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - this.blockBlobContext = this.storageClientContext.blockBlob; - this._blobContext = this.storageClientContext.blob; - } - /** - * Creates a new BlockBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a URL to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot) { - return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Quick query for a JSON or CSV formatted blob. - * - * Example usage (Node.js): - * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); - * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); - * } - * ``` - * - * @param query - - * @param options - - */ - async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { - throw new Error("This operation currently is only supported in Node.js."); - } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ - abortSignal: options.abortSignal, - queryRequest: { - queryType: "SQL", - expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration), - }, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - })); - return new BlobQueryResponse(response, { - abortSignal: options.abortSignal, - onProgress: options.onProgress, - onError: options.onError, - }); - }); - } - /** - * Creates a new block blob, or updates the content of an existing block blob. - * Updating an existing block blob overwrites any existing metadata on the blob. - * Partial updates are not supported; the content of the existing blob is - * overwritten with the new content. To perform a partial update of a block blob's, - * use {@link stageBlock} and {@link commitBlockList}. - * - * This is a non-parallel uploading method, please use {@link uploadFile}, - * {@link uploadStream} or {@link uploadBrowserData} for better performance - * with concurrency uploading. - * - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function - * which returns a new Readable stream whose offset is from data source beginning. - * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a - * string including non non-Base64/Hex-encoded characters. - * @param options - Options to the Block Blob Upload operation. - * @returns Response data for the Block Blob Upload operation. - * - * Example usage: - * - * ```js - * const content = "Hello world!"; - * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); - * ``` - */ - async upload(body, contentLength, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength, body, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onUploadProgress: options.onProgress, - }, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Creates a new Block Blob where the contents of the blob are read from a given URL. - * This API is supported beginning with the 2020-04-08 version. Partial updates - * are not supported with Put Blob from URL; the content of an existing blob is overwritten with - * the content of the new blob. To perform partial updates to a block blob’s contents using a - * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. - * - * @param sourceURL - Specifies the URL of the blob. The value - * may be a URL of up to 2 KB in length that specifies a blob. - * The value should be URL-encoded as it would appear - * in a request URI. The source blob must either be public - * or must be authenticated via a shared access signature. - * If the source blob is public, no authentication is required - * to perform the operation. Here are some examples of source object URLs: - * - https://myaccount.blob.core.windows.net/mycontainer/myblob - * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param options - Optional parameters. - */ - async syncUploadFromURL(sourceURL, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions, - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); - }); - } - /** - * Uploads the specified block to the block blob's "staging area" to be later - * committed by a call to commitBlockList. - * @see https://learn.microsoft.com/rest/api/storageservices/put-block - * - * @param blockId - A 64-byte value that is base64-encoded - * @param body - Data to upload to the staging area. - * @param contentLength - Number of bytes to upload. - * @param options - Options to the Block Blob Stage Block operation. - * @returns Response data for the Block Blob Stage Block operation. - */ - async stageBlock(blockId, body, contentLength, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - requestOptions: { - onUploadProgress: options.onProgress, - }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Stage Block From URL operation creates a new block to be committed as part - * of a blob where the contents are read from a URL. - * This API is available starting in version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-from-url - * - * @param blockId - A 64-byte value that is base64-encoded - * @param sourceURL - Specifies the URL of the blob. The value - * may be a URL of up to 2 KB in length that specifies a blob. - * The value should be URL-encoded as it would appear - * in a request URI. The source blob must either be public - * or must be authenticated via a shared access signature. - * If the source blob is public, no authentication is required - * to perform the operation. Here are some examples of source object URLs: - * - https://myaccount.blob.core.windows.net/mycontainer/myblob - * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param offset - From which position of the blob to download, greater than or equal to 0 - * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined - * @param options - Options to the Block Blob Stage Block From URL operation. - * @returns Response data for the Block Blob Stage Block From URL operation. - */ - async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Writes a blob by specifying the list of block IDs that make up the blob. - * In order to be written as part of a blob, a block must have been successfully written - * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to - * update a blob by uploading only those blocks that have changed, then committing the new and existing - * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list - * - * @param blocks - Array of 64-byte value that is base64-encoded - * @param options - Options to the Block Blob Commit Block List operation. - * @returns Response data for the Block Blob Commit Block List operation. - */ - async commitBlockList(blocks, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks }, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns the list of blocks that have been uploaded as part of a block blob - * using the specified block list filter. - * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list - * - * @param listType - Specifies whether to return the list of committed blocks, - * the list of uncommitted blocks, or both lists together. - * @param options - Options to the Block Blob Get Block List operation. - * @returns Response data for the Block Blob Get Block List operation. - */ - async getBlockList(listType, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - if (!res.committedBlocks) { - res.committedBlocks = []; - } - if (!res.uncommittedBlocks) { - res.uncommittedBlocks = []; - } - return res; - }); - } - // High level functions - /** - * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. - * - * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is - * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} - * to commit the block list. - * - * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is - * `blobContentType`, enabling the browser to provide - * functionality based on file type. - * - * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView - * @param options - - */ - async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer; - if (data instanceof Buffer) { - buffer = data; - } - else if (data instanceof ArrayBuffer) { - buffer = Buffer.from(data); - } - else { - data = data; - buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); - } - return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); - } - else { - const browserBlob = new Blob([data]); - return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); - } - }); - } - /** - * ONLY AVAILABLE IN BROWSERS. - * - * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. - * - * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call - * {@link commitBlockList} to commit the block list. - * - * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is - * `blobContentType`, enabling the browser to provide - * functionality based on file type. - * - * @deprecated Use {@link uploadData} instead. - * - * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView - * @param options - Options to upload browser data. - * @returns Response data for the Blob Upload operation. - */ - async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { - const browserBlob = new Blob([browserData]); - return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); - }); - } - /** - * - * Uploads data to block blob. Requires a bodyFactory as the data source, - * which need to return a {@link HttpRequestBody} object with the offset and size provided. - * - * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is - * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} - * to commit the block list. - * - * @param bodyFactory - - * @param size - size of the data to upload. - * @param options - Options to Upload to Block Blob operation. - * @returns Response data for the Blob Upload operation. - */ - async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); - } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); - } - if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`${size} is too larger to upload to a block blob.`); - } - if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; - } - } - } - if (!options.blobHTTPHeaders) { - options.blobHTTPHeaders = {}; - } - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { - if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); - } - const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` + - `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); - } - const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); - let transferProgress = 0; - const batch = new Batch(options.concurrency); - for (let i = 0; i < numBlocks; i++) { - batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); - const start = blockSize * i; - const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength = end - start; - blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { - abortSignal: options.abortSignal, - conditions: options.conditions, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - }); - // Update progress after block is successfully uploaded to server, in case of block trying - // TODO: Hook with convenience layer progress event in finer level - transferProgress += contentLength; - if (options.onProgress) { - options.onProgress({ - loadedBytes: transferProgress, - }); - } - }); - } - await batch.do(); - return this.commitBlockList(blockList, updatedOptions); - }); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Uploads a local file in blocks to a block blob. - * - * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. - * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList - * to commit the block list. - * - * @param filePath - Full path of local file - * @param options - Options to Upload to Block Blob operation. - * @returns Response data for the Blob Upload operation. - */ - async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; - return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { - autoClose: true, - end: count ? offset + count - 1 : Infinity, - start: offset, - }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - }); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Uploads a Node.js Readable stream into block blob. - * - * PERFORMANCE IMPROVEMENT TIPS: - * * Input stream highWaterMark is better to set a same value with bufferSize - * parameter, which will avoid Buffer.concat() operations. - * - * @param stream - Node.js Readable stream - * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB - * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, - * positive correlation with max uploading concurrency. Default value is 5 - * @param options - Options to Upload Stream to Block Blob operation. - * @returns Response data for the Blob Upload operation. - */ - async uploadStream(stream, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { - if (!options.blobHTTPHeaders) { - options.blobHTTPHeaders = {}; - } - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { - let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); - let transferProgress = 0; - const blockList = []; - const scheduler = new BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); - blockList.push(blockID); - blockNum++; - await this.stageBlock(blockID, body, length, { - customerProvidedKey: options.customerProvidedKey, - conditions: options.conditions, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - }); - // Update progress after block is successfully uploaded to server, in case of block trying - transferProgress += length; - if (options.onProgress) { - options.onProgress({ loadedBytes: transferProgress }); - } - }, - // concurrency should set a smaller value than maxConcurrency, which is helpful to - // reduce the possibility when a outgoing handler waits for stream data, in - // this situation, outgoing handlers are blocked. - // Outgoing queue shouldn't be empty. - Math.ceil((maxConcurrency / 4) * 3)); - await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); - }); - } -} -/** - * PageBlobClient defines a set of operations applicable to page blobs. - */ -class PageBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. - // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - this.pageBlobContext = this.storageClientContext.pageBlob; - } - /** - * Creates a new PageBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot) { - return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * Creates a page blob of the specified length. Call uploadPages to upload data - * data to a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param size - size of the page blob. - * @param options - Options to the Page Blob Create operation. - * @returns Response data for the Page Blob Create operation. - */ - async create(size, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - blobSequenceNumber: options.blobSequenceNumber, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Creates a page blob of the specified length. Call uploadPages to upload data - * data to a page blob. If the blob with the same name already exists, the content - * of the existing blob will remain unchanged. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param size - size of the page blob. - * @param options - - */ - async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; - try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://learn.microsoft.com/rest/api/storageservices/put-page - * - * @param body - Data to upload - * @param offset - Offset of destination page blob - * @param count - Content length of the body, also number of bytes to be uploaded - * @param options - Options to the Page Blob Upload Pages operation. - * @returns Response data for the Page Blob Upload Pages operation. - */ - async uploadPages(body, offset, count, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onUploadProgress: options.onProgress, - }, - range: rangeToString({ offset, count }), - sequenceNumberAccessConditions: options.conditions, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Upload Pages operation writes a range of pages to a page blob where the - * contents are read from a URL. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-page-from-url - * - * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication - * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob - * @param destOffset - Offset of destination page blob - * @param count - Number of bytes to be uploaded from source page blob - * @param options - - */ - async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { - abortSignal: options.abortSignal, - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - leaseAccessConditions: options.conditions, - sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - }, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Frees the specified pages from the page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-page - * - * @param offset - Starting byte position of the pages to clear. - * @param count - Number of bytes to clear. - * @param options - Options to the Page Blob Clear Pages operation. - * @returns Response data for the Page Blob Clear Pages operation. - */ - async clearPages(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - sequenceNumberAccessConditions: options.conditions, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns Response data for the Page Blob Get Ranges operation. - */ - async getPageRanges(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - tracingOptions: updatedOptions.tracingOptions, - })); - return rangeResponseFromModel(response); - }); - } - /** - * getPageRangesSegment returns a single segment of page ranges starting from the - * specified Marker. Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call getPageRangesSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to PageBlob Get Page Ranges Segment operation. - */ - async listPageRangesSegment(offset = 0, count, marker, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker, - maxPageSize: options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param marker - A string value that identifies the portion of - * the get of page ranges to be returned with the next getting operation. The - * operation returns the ContinuationToken value within the response body if the - * getting operation did not return all page ranges remaining within the current page. - * The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of get - * items. The marker value is opaque to the client. - * @param options - Options to List Page Ranges operation. - */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker || marker === undefined) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker, options)); - marker = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to List Page Ranges operation. - */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_1) throw e_1.error; } - } - }); - } - /** - * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * .byPage() returns an async iterable iterator to list of page ranges for a page blob. - * - * Example using `for await` syntax: - * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` - * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRanges()) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns An asyncIterableIterator that supports paging. - */ - listPageRanges(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - // AsyncIterableIterator to iterate over blobs - const iter = this.listPageRangeItems(offset, count, options); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - }, - }; - } - /** - * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page blob - * @param count - Number of bytes to get ranges diff. - * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - * @returns Response data for the Page Blob Get Page Range Diff operation. - */ - async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), - tracingOptions: updatedOptions.tracingOptions, - })); - return rangeResponseFromModel(result); - }); - } - /** - * getPageRangesDiffSegment returns a single segment of page ranges starting from the - * specified Marker for difference between previous snapshot and the target page blob. - * Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call getPageRangesDiffSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ - offset: offset, - count: count, - }), - marker: marker, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} - * - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param marker - A string value that identifies the portion of - * the get of page ranges to be returned with the next getting operation. The - * operation returns the ContinuationToken value within the response body if the - * getting operation did not return all page ranges remaining within the current page. - * The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of get - * items. The marker value is opaque to the client. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker || marker === undefined) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options)); - marker = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_2) throw e_2.error; } - } - }); - } - /** - * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * - * Example using `for await` syntax: - * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` - * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns An asyncIterableIterator that supports paging. - */ - listPageRangesDiff(offset, count, prevSnapshot, options = {}) { - options.conditions = options.conditions || {}; - // AsyncIterableIterator to iterate over blobs - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - }, - }; - } - /** - * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page blob - * @param count - Number of bytes to get ranges diff. - * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - * @returns Response data for the Page Blob Get Page Range Diff operation. - */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl, - range: rangeToString({ offset, count }), - tracingOptions: updatedOptions.tracingOptions, - })); - return rangeResponseFromModel(response); - }); - } - /** - * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties - * - * @param size - Target size - * @param options - Options to the Page Blob Resize operation. - * @returns Response data for the Page Blob Resize operation. - */ - async resize(size, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets a page blob's sequence number. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties - * - * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. - * @param sequenceNumber - Required if sequenceNumberAction is max or update - * @param options - Options to the Page Blob Update Sequence Number operation. - * @returns Response data for the Page Blob Update Sequence Number operation. - */ - async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { - abortSignal: options.abortSignal, - blobSequenceNumber: sequenceNumber, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. - * The snapshot is copied such that only the differential changes between the previously - * copied snapshot are transferred to the destination. - * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://learn.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots - * - * @param copySource - Specifies the name of the source page blob snapshot. For example, - * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param options - Options to the Page Blob Copy Incremental operation. - * @returns Response data for the Page Blob Copy Incremental operation. - */ - async startCopyIncremental(copySource, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -async function getBodyAsText(batchResponse) { - let buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer); - // Slice the buffer to trim the empty ending. - buffer = buffer.slice(0, responseLength); - return buffer.toString(); -} -function utf8ByteLength(str) { - return Buffer.byteLength(str); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const HTTP_HEADER_DELIMITER = ": "; -const SPACE_DELIMITER = " "; -const NOT_FOUND = -1; -/** - * Util class for parsing batch response. - */ -class BatchResponseParser { - constructor(batchResponse, subRequests) { - if (!batchResponse || !batchResponse.contentType) { - // In special case(reported), server may return invalid content-type which could not be parsed. - throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); - } - if (!subRequests || subRequests.size === 0) { - // This should be prevent during coding. - throw new RangeError("Invalid state: subRequests is not provided or size is 0."); - } - this.batchResponse = batchResponse; - this.subRequests = subRequests; - this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; - this.batchResponseEnding = `--${this.responseBatchBoundary}--`; - } - // For example of response, please refer to https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#response - async parseBatchResponse() { - // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse - // sub request's response. - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { - throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); - } - const responseBodyAsText = await getBodyAsText(this.batchResponse); - const subResponses = responseBodyAsText - .split(this.batchResponseEnding)[0] // string after ending is useless - .split(this.perResponsePrefix) - .slice(1); // string before first response boundary is useless - const subResponseCount = subResponses.length; - // Defensive coding in case of potential error parsing. - // Note: subResponseCount == 1 is special case where sub request is invalid. - // We try to prevent such cases through early validation, e.g. validate sub request count >= 1. - // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user. - if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { - throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); - } - const deserializedSubResponses = new Array(subResponseCount); - let subResponsesSucceededCount = 0; - let subResponsesFailedCount = 0; - // Parse sub subResponses. - for (let index = 0; index < subResponseCount; index++) { - const subResponse = subResponses[index]; - const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); - let subRespHeaderStartFound = false; - let subRespHeaderEndFound = false; - let subRespFailed = false; - let contentId = NOT_FOUND; - for (const responseLine of responseLines) { - if (!subRespHeaderStartFound) { - // Convention line to indicate content ID - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { - contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); - } - // Http version line with status code indicates the start of sub request's response. - // Example: HTTP/1.1 202 Accepted - if (responseLine.startsWith(HTTP_VERSION_1_1)) { - subRespHeaderStartFound = true; - const tokens = responseLine.split(SPACE_DELIMITER); - deserializedSubResponse.status = parseInt(tokens[1]); - deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); - } - continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: * - } - if (responseLine.trim() === "") { - // Sub response's header start line already found, and the first empty line indicates header end line found. - if (!subRespHeaderEndFound) { - subRespHeaderEndFound = true; - } - continue; // Skip empty line - } - // Note: when code reach here, it indicates subRespHeaderStartFound == true - if (!subRespHeaderEndFound) { - if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) { - // Defensive coding to prevent from missing valuable lines. - throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); - } - // Parse headers of sub response. - const tokens = responseLine.split(HTTP_HEADER_DELIMITER); - deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { - deserializedSubResponse.errorCode = tokens[1]; - subRespFailed = true; - } - } - else { - // Assemble body of sub response. - if (!deserializedSubResponse.bodyAsText) { - deserializedSubResponse.bodyAsText = ""; - } - deserializedSubResponse.bodyAsText += responseLine; - } - } // Inner for end - // The response will contain the Content-ID header for each corresponding subrequest response to use for tracking. - // The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it - // to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that - // unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose. - if (contentId !== NOT_FOUND && - Number.isInteger(contentId) && - contentId >= 0 && - contentId < this.subRequests.size && - deserializedSubResponses[contentId] === undefined) { - deserializedSubResponse._request = this.subRequests.get(contentId); - deserializedSubResponses[contentId] = deserializedSubResponse; - } - else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); - } - if (subRespFailed) { - subResponsesFailedCount++; - } - else { - subResponsesSucceededCount++; - } - } - return { - subResponses: deserializedSubResponses, - subResponsesSucceededCount: subResponsesSucceededCount, - subResponsesFailedCount: subResponsesFailedCount, - }; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var MutexLockStatus; -(function (MutexLockStatus) { - MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED"; - MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED"; -})(MutexLockStatus || (MutexLockStatus = {})); -/** - * An async mutex lock. - */ -class Mutex { - /** - * Lock for a specific key. If the lock has been acquired by another customer, then - * will wait until getting the lock. - * - * @param key - lock key - */ - static async lock(key) { - return new Promise((resolve) => { - if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) { - this.keys[key] = MutexLockStatus.LOCKED; - resolve(); - } - else { - this.onUnlockEvent(key, () => { - this.keys[key] = MutexLockStatus.LOCKED; - resolve(); - }); - } - }); - } - /** - * Unlock a key. - * - * @param key - - */ - static async unlock(key) { - return new Promise((resolve) => { - if (this.keys[key] === MutexLockStatus.LOCKED) { - this.emitUnlockEvent(key); - } - delete this.keys[key]; - resolve(); - }); - } - static onUnlockEvent(key, handler) { - if (this.listeners[key] === undefined) { - this.listeners[key] = [handler]; - } - else { - this.listeners[key].push(handler); - } - } - static emitUnlockEvent(key) { - if (this.listeners[key] !== undefined && this.listeners[key].length > 0) { - const handler = this.listeners[key].shift(); - setImmediate(() => { - handler.call(this); - }); - } - } -} -Mutex.keys = {}; -Mutex.listeners = {}; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A BlobBatch represents an aggregated set of operations on blobs. - * Currently, only `delete` and `setAccessTier` are supported. - */ -class BlobBatch { - constructor() { - this.batch = "batch"; - this.batchRequest = new InnerBatchRequest(); - } - /** - * Get the value of Content-Type for a batch request. - * The value must be multipart/mixed with a batch boundary. - * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 - */ - getMultiPartContentType() { - return this.batchRequest.getMultipartContentType(); - } - /** - * Get assembled HTTP request body for sub requests. - */ - getHttpRequestBody() { - return this.batchRequest.getHttpRequestBody(); - } - /** - * Get sub requests that are added into the batch request. - */ - getSubRequests() { - return this.batchRequest.getSubRequests(); - } - async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); - try { - this.batchRequest.preAddSubRequest(subRequest); - await assembleSubRequestFunc(); - this.batchRequest.postAddSubRequest(subRequest); - } - finally { - await Mutex.unlock(this.batch); - } - } - setBatchType(batchType) { - if (!this.batchType) { - this.batchType = batchType; - } - if (this.batchType !== batchType) { - throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); - } - } - async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url; - let credential; - if (typeof urlOrBlobClient === "string" && - ((coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential) || - credentialOrOptions instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrOptions))) { - // First overload - url = urlOrBlobClient; - credential = credentialOrOptions; - } - else if (urlOrBlobClient instanceof BlobClient) { - // Second overload - url = urlOrBlobClient.url; - credential = urlOrBlobClient.credential; - options = credentialOrOptions; - } - else { - throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); - } - if (!options) { - options = {}; - } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { - this.setBatchType("delete"); - await this.addSubRequestInternal({ - url: url, - credential: credential, - }, async () => { - await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); - }); - }); - } - async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url; - let credential; - let tier; - if (typeof urlOrBlobClient === "string" && - ((coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential) || - credentialOrTier instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrTier))) { - // First overload - url = urlOrBlobClient; - credential = credentialOrTier; - tier = tierOrOptions; - } - else if (urlOrBlobClient instanceof BlobClient) { - // Second overload - url = urlOrBlobClient.url; - credential = urlOrBlobClient.credential; - tier = credentialOrTier; - options = tierOrOptions; - } - else { - throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); - } - if (!options) { - options = {}; - } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { - this.setBatchType("setAccessTier"); - await this.addSubRequestInternal({ - url: url, - credential: credential, - }, async () => { - await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); - }); - }); - } -} -/** - * Inner batch request class which is responsible for assembling and serializing sub requests. - * See https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled. - */ -class InnerBatchRequest { - constructor() { - this.operationCount = 0; - this.body = ""; - const tempGuid = coreUtil.randomUUID(); - // batch_{batchid} - this.boundary = `batch_${tempGuid}`; - // --batch_{batchid} - // Content-Type: application/http - // Content-Transfer-Encoding: binary - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; - // multipart/mixed; boundary=batch_{batchid} - this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; - // --batch_{batchid}-- - this.batchRequestEnding = `--${this.boundary}--`; - this.subRequests = new Map(); - } - /** - * Create pipeline to assemble sub requests. The idea here is to use existing - * credential and serialization/deserialization components, with additional policies to - * filter unnecessary headers, assemble sub requests into request's body - * and intercept request from going to wire. - * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. - */ - createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - xmlCharKey: "#", - }, - }, - }), { phase: "Serialize" }); - // Use batch header filter policy to exclude unnecessary headers - corePipeline.addPolicy(batchHeaderFilterPolicy()); - // Use batch assemble policy to assemble request and intercept request from going to wire - corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge }, - }), { phase: "Sign" }); - } - else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ - accountName: credential.accountName, - accountKey: credential.accountKey, - }), { phase: "Sign" }); - } - const pipeline = new Pipeline([]); - // attach the v2 pipeline to this one - pipeline._credential = credential; - pipeline._corePipeline = corePipeline; - return pipeline; - } - appendSubRequestToBody(request) { - // Start to assemble sub request - this.body += [ - this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID - "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method - ].join(HTTP_LINE_ENDING); - for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; - } - this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line - // No body to assemble for current batch request support - // End to assemble sub request - } - preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); - } - // Fast fail if url for sub request is invalid - const path = getURLPath(subRequest.url); - if (!path || path === "") { - throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); - } - } - postAddSubRequest(subRequest) { - this.subRequests.set(this.operationCount, subRequest); - this.operationCount++; - } - // Return the http request body with assembling the ending line to the sub request body. - getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; - } - getMultipartContentType() { - return this.multipartContentType; - } - getSubRequests() { - return this.subRequests; - } -} -function batchRequestAssemblePolicy(batchRequest) { - return { - name: "batchRequestAssemblePolicy", - async sendRequest(request) { - batchRequest.appendSubRequestToBody(request); - return { - request, - status: 200, - headers: coreRestPipeline.createHttpHeaders(), - }; - }, - }; -} -function batchHeaderFilterPolicy() { - return { - name: "batchHeaderFilterPolicy", - async sendRequest(request, next) { - let xMsHeaderName = ""; - for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { - xMsHeaderName = name; - } - } - if (xMsHeaderName !== "") { - request.headers.delete(xMsHeaderName); // The subrequests should not have the x-ms-version header. - } - return next(request); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - */ -class BlobBatchClient { - constructor(url, credentialOrPipeline, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - let pipeline; - if (isPipelineLike(credentialOrPipeline)) { - pipeline = credentialOrPipeline; - } - else if (!credentialOrPipeline) { - // no credential provided - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - pipeline = newPipeline(credentialOrPipeline, options); - } - const storageClientContext = new StorageContextClient(url, getCoreClientOptions(pipeline)); - const path = getURLPath(url); - if (path && path !== "/") { - // Container scoped. - this.serviceOrContainerContext = storageClientContext.container; - } - else { - this.serviceOrContainerContext = storageClientContext.service; - } - } - /** - * Creates a {@link BlobBatch}. - * A BlobBatch represents an aggregated set of operations on blobs. - */ - createBatch() { - return new BlobBatch(); - } - async deleteBlobs(urlsOrBlobClients, credentialOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - const batch = new BlobBatch(); - for (const urlOrBlobClient of urlsOrBlobClients) { - if (typeof urlOrBlobClient === "string") { - await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); - } - else { - await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); - } - } - return this.submitBatch(batch); - } - async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - const batch = new BlobBatch(); - for (const urlOrBlobClient of urlsOrBlobClients) { - if (typeof urlOrBlobClient === "string") { - await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); - } - else { - await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); - } - } - return this.submitBatch(batch); - } - /** - * Submit batch request which consists of multiple subrequests. - * - * Get `blobBatchClient` and other details before running the snippets. - * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` - * - * Example usage: - * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" - * }); - * const batchResp = await blobBatchClient.submitBatch(batchRequest); - * console.log(batchResp.subResponsesSucceededCount); - * ``` - * - * Example using a lease: - * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } - * }); - * const batchResp = await blobBatchClient.submitBatch(batchRequest); - * console.log(batchResp.subResponsesSucceededCount); - * ``` - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - * - * @param batchRequest - A set of Delete or SetTier operations. - * @param options - - */ - async submitBatch(batchRequest, options = {}) { - if (!batchRequest || batchRequest.getSubRequests().size === 0) { - throw new RangeError("Batch request should contain one or more sub requests."); - } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { - const batchRequestBody = batchRequest.getHttpRequestBody(); - // ServiceSubmitBatchResponseModel and ContainerSubmitBatchResponse are compatible for now. - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202). - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); - const responseSummary = await batchResponseParser.parseBatchResponse(); - const res = { - _response: rawBatchResponse._response, - contentType: rawBatchResponse.contentType, - errorCode: rawBatchResponse.errorCode, - requestId: rawBatchResponse.requestId, - clientRequestId: rawBatchResponse.clientRequestId, - version: rawBatchResponse.version, - subResponses: responseSummary.subResponses, - subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, - subResponsesFailedCount: responseSummary.subResponsesFailedCount, - }; - return res; - }); - } -} - -/** - * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. - */ -class ContainerClient extends StorageClient { - /** - * The name of the container. - */ - get containerName() { - return this._containerName; - } - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName parameter"); - } - super(url, pipeline); - this._containerName = this.getContainerNameFromUrl(); - this.containerContext = this.storageClientContext.container; - } - /** - * Creates a new container under the specified account. If the container with - * the same name already exists, the operation fails. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata - * - * @param options - Options to Container Create operation. - * - * - * Example usage: - * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); - * const createContainerResponse = await containerClient.create(); - * console.log("Container was created successfully", createContainerResponse.requestId); - * ``` - */ - async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); - }); - } - /** - * Creates a new container under the specified account. If the container with - * the same name already exists, it is not changed. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata - * - * @param options - - */ - async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - else { - throw e; - } - } - }); - } - /** - * Returns true if the Azure container resource represented by this client exists; false otherwise. - * - * NOTE: use this function with care since an existing container might be deleted by other clients or - * applications. Vice versa new containers with the same name might be added by other clients or - * applications after this function completes. - * - * @param options - - */ - async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { - try { - await this.getProperties({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - }); - return true; - } - catch (e) { - if (e.statusCode === 404) { - return false; - } - throw e; - } - }); - } - /** - * Creates a {@link BlobClient} - * - * @param blobName - A blob name - * @returns A new BlobClient object for the given blob name. - */ - getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Creates an {@link AppendBlobClient} - * - * @param blobName - An append blob name - */ - getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Creates a {@link BlockBlobClient} - * - * @param blobName - A block blob name - * - * - * Example usage: - * - * ```js - * const content = "Hello world!"; - * - * const blockBlobClient = containerClient.getBlockBlobClient(""); - * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); - * ``` - */ - getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Creates a {@link PageBlobClient} - * - * @param blobName - A page blob name - */ - getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Returns all user-defined metadata and system properties for the specified - * container. The data returned does not include the container's list of blobs. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties - * - * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if - * they originally contained uppercase characters. This differs from the metadata keys returned by - * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which - * will retain their original casing. - * - * @param options - Options to Container Get Properties operation. - */ - async getProperties(options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); - }); - } - /** - * Marks the specified container for deletion. The container and any blobs - * contained within it are later deleted during garbage collection. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container - * - * @param options - Options to Container Delete operation. - */ - async delete(options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Marks the specified container for deletion if it exists. The container and any blobs - * contained within it are later deleted during garbage collection. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container - * - * @param options - Options to Container Delete operation. - */ - async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Sets one or more user-defined name-value pairs for the specified container. - * - * If no option provided, or no metadata defined in the parameter, the container - * metadata will be removed. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-metadata - * - * @param metadata - Replace existing metadata with this value. - * If no value provided the existing metadata will be removed. - * @param options - Options to Container Set Metadata operation. - */ - async setMetadata(metadata, options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - if (options.conditions.ifUnmodifiedSince) { - throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); - } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata, - modifiedAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Gets the permissions for the specified container. The permissions indicate - * whether container data may be accessed publicly. - * - * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. - * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl - * - * @param options - Options to Container Get Access Policy operation. - */ - async getAccessPolicy(options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - const res = { - _response: response._response, - blobPublicAccess: response.blobPublicAccess, - date: response.date, - etag: response.etag, - errorCode: response.errorCode, - lastModified: response.lastModified, - requestId: response.requestId, - clientRequestId: response.clientRequestId, - signedIdentifiers: [], - version: response.version, - }; - for (const identifier of response) { - let accessPolicy = undefined; - if (identifier.accessPolicy) { - accessPolicy = { - permissions: identifier.accessPolicy.permissions, - }; - if (identifier.accessPolicy.expiresOn) { - accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); - } - if (identifier.accessPolicy.startsOn) { - accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); - } - } - res.signedIdentifiers.push({ - accessPolicy, - id: identifier.id, - }); - } - return res; - }); - } - /** - * Sets the permissions for the specified container. The permissions indicate - * whether blobs in a container may be accessed publicly. - * - * When you set permissions for a container, the existing permissions are replaced. - * If no access or containerAcl provided, the existing container ACL will be - * removed. - * - * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. - * During this interval, a shared access signature that is associated with the stored access policy will - * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-acl - * - * @param access - The level of public access to data in the container. - * @param containerAcl - Array of elements each having a unique Id and details of the access policy. - * @param options - Options to Container Set Access Policy operation. - */ - async setAccessPolicy(access, containerAcl, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { - const acl = []; - for (const identifier of containerAcl || []) { - acl.push({ - accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn - ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) - : "", - permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn - ? truncatedISO8061Date(identifier.accessPolicy.startsOn) - : "", - }, - id: identifier.id, - }); - } - return assertResponse(await this.containerContext.setAccessPolicy({ - abortSignal: options.abortSignal, - access, - containerAcl: acl, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Get a {@link BlobLeaseClient} that manages leases on the container. - * - * @param proposeLeaseId - Initial proposed lease Id. - * @returns A new BlobLeaseClient object for managing leases on the container. - */ - getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); - } - /** - * Creates a new block blob, or updates the content of an existing block blob. - * - * Updating an existing block blob overwrites any existing metadata on the blob. - * Partial updates are not supported; the content of the existing blob is - * overwritten with the new content. To perform a partial update of a block blob's, - * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. - * - * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, - * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better - * performance with concurrency uploading. - * - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param blobName - Name of the block blob to create or update. - * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function - * which returns a new Readable stream whose offset is from data source beginning. - * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a - * string including non non-Base64/Hex-encoded characters. - * @param options - Options to configure the Block Blob Upload operation. - * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. - */ - async uploadBlockBlob(blobName, body, contentLength, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { - const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body, contentLength, updatedOptions); - return { - blockBlobClient, - response, - }; - }); - } - /** - * Marks the specified blob or snapshot for deletion. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob - * - * @param blobName - - * @param options - Options to Blob Delete operation. - * @returns Block blob deletion response data. - */ - async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { - let blobClient = this.getBlobClient(blobName); - if (options.versionId) { - blobClient = blobClient.withVersion(options.versionId); - } - return blobClient.delete(updatedOptions); - }); - } - /** - * listBlobFlatSegment returns a single segment of blobs starting from the - * specified Marker. Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call listBlobsFlatSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs - * - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to Container List Blob Flat Segment operation. - */ - async listBlobFlatSegment(marker, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); - return wrappedResponse; - }); - } - /** - * listBlobHierarchySegment returns a single segment of blobs starting from - * the specified Marker. Use an empty Marker to start enumeration from the - * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment - * again (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to Container List Blob Hierarchy Segment operation. - */ - async listBlobHierarchySegment(delimiter, marker, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); - return wrappedResponse; - }); - } - /** - * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse - * - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the ContinuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list blobs operation. - */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker || marker === undefined) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options)); - marker = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator of {@link BlobItem} objects - * - * @param options - Options to list blobs operation. - */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_1) throw e_1.error; } - } - }); - } - /** - * Returns an async iterable iterator to list all the blobs - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. - * - * Example using `for await` syntax: - * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` - * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` - * - * @param options - Options to list blobs. - * @returns An asyncIterableIterator that supports paging. - */ - listBlobsFlat(options = {}) { - const include = []; - if (options.includeCopy) { - include.push("copy"); - } - if (options.includeDeleted) { - include.push("deleted"); - } - if (options.includeMetadata) { - include.push("metadata"); - } - if (options.includeSnapshots) { - include.push("snapshots"); - } - if (options.includeVersions) { - include.push("versions"); - } - if (options.includeUncommitedBlobs) { - include.push("uncommittedblobs"); - } - if (options.includeTags) { - include.push("tags"); - } - if (options.includeDeletedWithVersions) { - include.push("deletedwithversions"); - } - if (options.includeImmutabilityPolicy) { - include.push("immutabilitypolicy"); - } - if (options.includeLegalHold) { - include.push("legalhold"); - } - if (options.prefix === "") { - options.prefix = undefined; - } - const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {})); - // AsyncIterableIterator to iterate over blobs - const iter = this.listItems(updatedOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - }, - }; - } - /** - * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the ContinuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list blobs operation. - */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter, marker, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker || marker === undefined) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter, marker, options)); - marker = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param options - Options to list blobs operation. - */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter, options = {}) { - var _a, e_2, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_2) throw e_2.error; } - } - }); - } - /** - * Returns an async iterable iterator to list all the blobs by hierarchy. - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. - * - * Example using `for await` syntax: - * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); - * - * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; - * - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param options - Options to list blobs operation. - */ - listBlobsByHierarchy(delimiter, options = {}) { - if (delimiter === "") { - throw new RangeError("delimiter should contain one or more characters"); - } - const include = []; - if (options.includeCopy) { - include.push("copy"); - } - if (options.includeDeleted) { - include.push("deleted"); - } - if (options.includeMetadata) { - include.push("metadata"); - } - if (options.includeSnapshots) { - include.push("snapshots"); - } - if (options.includeVersions) { - include.push("versions"); - } - if (options.includeUncommitedBlobs) { - include.push("uncommittedblobs"); - } - if (options.includeTags) { - include.push("tags"); - } - if (options.includeDeletedWithVersions) { - include.push("deletedwithversions"); - } - if (options.includeImmutabilityPolicy) { - include.push("immutabilitypolicy"); - } - if (options.includeLegalHold) { - include.push("legalhold"); - } - if (options.prefix === "") { - options.prefix = undefined; - } - const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {})); - // AsyncIterableIterator to iterate over blob prefixes and blobs - const iter = this.listItemsByHierarchy(delimiter, updatedOptions); - return { - /** - * The next method, part of the iteration protocol - */ - async next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - }, - }; - } - /** - * The Filter Blobs operation enables callers to list blobs in the container whose tags - * match a given search expression. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ - abortSignal: options.abortSignal, - where: tagFilterSqlExpression, - marker, - maxPageSize: options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); - return wrappedResponse; - }); - } - /** - * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker, options = {}) { - let response; - if (!!marker || marker === undefined) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options)); - response.blobs = response.blobs || []; - marker = response.continuationToken; - yield yield tslib.__await(response); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for blobs. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to findBlobsByTagsItems. - */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_3) throw e_3.error; } - } - }); - } - /** - * Returns an async iterable iterator to find all blobs with specified tag - * under the specified container. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. - * - * Example using `for await` syntax: - * - * ```js - * let i = 1; - * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * // Passing next marker as continuationToken - * iterator = containerClient - * .findBlobsByTags("tagkey='tagvalue'") - * .byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * ``` - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to find blobs by tags. - */ - findBlobsByTags(tagFilterSqlExpression, options = {}) { - // AsyncIterableIterator to iterate over blobs - const listSegmentOptions = Object.assign({}, options); - const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - }, - }; - } - /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information - * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. - */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - getContainerNameFromUrl() { - let containerName; - try { - // URL may look like the following - // "https://myaccount.blob.core.windows.net/mycontainer?sasString"; - // "https://myaccount.blob.core.windows.net/mycontainer"; - // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername` - // http://localhost:10001/devstoreaccount1/containername - const parsedUrl = new URL(this.url); - if (parsedUrl.hostname.split(".")[1] === "blob") { - // "https://myaccount.blob.core.windows.net/containername". - // "https://customdomain.com/containername". - // .getPath() -> /containername - containerName = parsedUrl.pathname.split("/")[1]; - } - else if (isIpEndpointStyle(parsedUrl)) { - // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername - // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername - // .getPath() -> /devstoreaccount1/containername - containerName = parsedUrl.pathname.split("/")[2]; - } - else { - // "https://customdomain.com/containername". - // .getPath() -> /containername - containerName = parsedUrl.pathname.split("/")[1]; - } - // decode the encoded containerName - to get all the special characters that might be present in it - containerName = decodeURIComponent(containerName); - if (!containerName) { - throw new Error("Provided containerName is invalid."); - } - return containerName; - } - catch (error) { - throw new Error("Unable to extract containerName with provided information."); - } - } - /** - * Only available for ContainerClient constructed with a shared key credential. - * - * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasUrl(options) { - return new Promise((resolve) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Only available for ContainerClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI - * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; - } - /** - * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI - * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasStringToSign(options, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).stringToSign; - } - /** - * Creates a BlobBatchClient object to conduct batch operations. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - * - * @returns A new BlobBatchClient object for this container. - */ - getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the - * values are set, this should be serialized with toString and set as the permissions field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ -class AccountSASPermissions { - constructor() { - /** - * Permission to read resources and list queues and tables granted. - */ - this.read = false; - /** - * Permission to write resources granted. - */ - this.write = false; - /** - * Permission to delete blobs and files granted. - */ - this.delete = false; - /** - * Permission to delete versions granted. - */ - this.deleteVersion = false; - /** - * Permission to list blob containers, blobs, shares, directories, and files granted. - */ - this.list = false; - /** - * Permission to add messages, table entities, and append to blobs granted. - */ - this.add = false; - /** - * Permission to create blobs and files granted. - */ - this.create = false; - /** - * Permissions to update messages and table entities granted. - */ - this.update = false; - /** - * Permission to get and delete messages granted. - */ - this.process = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Permission to filter blobs. - */ - this.filter = false; - /** - * Permission to set immutability policy. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - } - /** - * Parse initializes the AccountSASPermissions fields from a string. - * - * @param permissions - - */ - static parse(permissions) { - const accountSASPermissions = new AccountSASPermissions(); - for (const c of permissions) { - switch (c) { - case "r": - accountSASPermissions.read = true; - break; - case "w": - accountSASPermissions.write = true; - break; - case "d": - accountSASPermissions.delete = true; - break; - case "x": - accountSASPermissions.deleteVersion = true; - break; - case "l": - accountSASPermissions.list = true; - break; - case "a": - accountSASPermissions.add = true; - break; - case "c": - accountSASPermissions.create = true; - break; - case "u": - accountSASPermissions.update = true; - break; - case "p": - accountSASPermissions.process = true; - break; - case "t": - accountSASPermissions.tag = true; - break; - case "f": - accountSASPermissions.filter = true; - break; - case "i": - accountSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - accountSASPermissions.permanentDelete = true; - break; - default: - throw new RangeError(`Invalid permission character: ${c}`); - } - } - return accountSASPermissions; - } - /** - * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const accountSASPermissions = new AccountSASPermissions(); - if (permissionLike.read) { - accountSASPermissions.read = true; - } - if (permissionLike.write) { - accountSASPermissions.write = true; - } - if (permissionLike.delete) { - accountSASPermissions.delete = true; - } - if (permissionLike.deleteVersion) { - accountSASPermissions.deleteVersion = true; - } - if (permissionLike.filter) { - accountSASPermissions.filter = true; - } - if (permissionLike.tag) { - accountSASPermissions.tag = true; - } - if (permissionLike.list) { - accountSASPermissions.list = true; - } - if (permissionLike.add) { - accountSASPermissions.add = true; - } - if (permissionLike.create) { - accountSASPermissions.create = true; - } - if (permissionLike.update) { - accountSASPermissions.update = true; - } - if (permissionLike.process) { - accountSASPermissions.process = true; - } - if (permissionLike.setImmutabilityPolicy) { - accountSASPermissions.setImmutabilityPolicy = true; - } - if (permissionLike.permanentDelete) { - accountSASPermissions.permanentDelete = true; - } - return accountSASPermissions; - } - /** - * Produces the SAS permissions string for an Azure Storage account. - * Call this method to set AccountSASSignatureValues Permissions field. - * - * Using this method will guarantee the resource types are in - * an order accepted by the service. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - * - */ - toString() { - // The order of the characters should be as specified here to ensure correctness: - // https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - // Use a string array instead of string concatenating += operator for performance - const permissions = []; - if (this.read) { - permissions.push("r"); - } - if (this.write) { - permissions.push("w"); - } - if (this.delete) { - permissions.push("d"); - } - if (this.deleteVersion) { - permissions.push("x"); - } - if (this.filter) { - permissions.push("f"); - } - if (this.tag) { - permissions.push("t"); - } - if (this.list) { - permissions.push("l"); - } - if (this.add) { - permissions.push("a"); - } - if (this.create) { - permissions.push("c"); - } - if (this.update) { - permissions.push("u"); - } - if (this.process) { - permissions.push("p"); - } - if (this.setImmutabilityPolicy) { - permissions.push("i"); - } - if (this.permanentDelete) { - permissions.push("y"); - } - return permissions.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the - * values are set, this should be serialized with toString and set as the resources field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but - * the order of the resources is particular and this class guarantees correctness. - */ -class AccountSASResourceTypes { - constructor() { - /** - * Permission to access service level APIs granted. - */ - this.service = false; - /** - * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. - */ - this.container = false; - /** - * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. - */ - this.object = false; - } - /** - * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an - * Error if it encounters a character that does not correspond to a valid resource type. - * - * @param resourceTypes - - */ - static parse(resourceTypes) { - const accountSASResourceTypes = new AccountSASResourceTypes(); - for (const c of resourceTypes) { - switch (c) { - case "s": - accountSASResourceTypes.service = true; - break; - case "c": - accountSASResourceTypes.container = true; - break; - case "o": - accountSASResourceTypes.object = true; - break; - default: - throw new RangeError(`Invalid resource type: ${c}`); - } - } - return accountSASResourceTypes; - } - /** - * Converts the given resource types to a string. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - * - */ - toString() { - const resourceTypes = []; - if (this.service) { - resourceTypes.push("s"); - } - if (this.container) { - resourceTypes.push("c"); - } - if (this.object) { - resourceTypes.push("o"); - } - return resourceTypes.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant access to that service. Once all the - * values are set, this should be serialized with toString and set as the services field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but - * the order of the services is particular and this class guarantees correctness. - */ -class AccountSASServices { - constructor() { - /** - * Permission to access blob resources granted. - */ - this.blob = false; - /** - * Permission to access file resources granted. - */ - this.file = false; - /** - * Permission to access queue resources granted. - */ - this.queue = false; - /** - * Permission to access table resources granted. - */ - this.table = false; - } - /** - * Creates an {@link AccountSASServices} from the specified services string. This method will throw an - * Error if it encounters a character that does not correspond to a valid service. - * - * @param services - - */ - static parse(services) { - const accountSASServices = new AccountSASServices(); - for (const c of services) { - switch (c) { - case "b": - accountSASServices.blob = true; - break; - case "f": - accountSASServices.file = true; - break; - case "q": - accountSASServices.queue = true; - break; - case "t": - accountSASServices.table = true; - break; - default: - throw new RangeError(`Invalid service character: ${c}`); - } - } - return accountSASServices; - } - /** - * Converts the given services to a string. - * - */ - toString() { - const services = []; - if (this.blob) { - services.push("b"); - } - if (this.table) { - services.push("t"); - } - if (this.queue) { - services.push("q"); - } - if (this.file) { - services.push("f"); - } - return services.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual - * REST request. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - * - * @param accountSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { - return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) - .sasQueryParameters; -} -function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version = accountSASSignatureValues.version - ? accountSASSignatureValues.version - : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.setImmutabilityPolicy && - version < "2020-08-04") { - throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.deleteVersion && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.permanentDelete && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.tag && - version < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.filter && - version < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); - } - if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { - throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); - } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); - let stringToSign; - if (version >= "2020-12-06") { - stringToSign = [ - sharedKeyCredential.accountName, - parsedPermissions, - parsedServices, - parsedResourceTypes, - accountSASSignatureValues.startsOn - ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) - : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", - accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version, - accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", - "", // Account SAS requires an additional newline character - ].join("\n"); - } - else { - stringToSign = [ - sharedKeyCredential.accountName, - parsedPermissions, - parsedServices, - parsedResourceTypes, - accountSASSignatureValues.startsOn - ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) - : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", - accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version, - "", // Account SAS requires an additional newline character - ].join("\n"); - } - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope), - stringToSign: stringToSign, - }; -} - -/** - * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you - * to manipulate blob containers. - */ -class BlobServiceClient extends StorageClient { - /** - * - * Creates an instance of BlobServiceClient from connection string. - * - * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. - * [ Note - Account connection string can only be used in NODE.JS runtime. ] - * Account connection string example - - * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` - * SAS connection string example - - * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` - * @param options - Optional. Options to configure the HTTP pipeline. - */ - static fromConnectionString(connectionString, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - const pipeline = newPipeline(sharedKeyCredential, options); - return new BlobServiceClient(extractedCreds.url, pipeline); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); - return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - constructor(url, credentialOrPipeline, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - let pipeline; - if (isPipelineLike(credentialOrPipeline)) { - pipeline = credentialOrPipeline; - } - else if ((coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) || - credentialOrPipeline instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); - } - else { - // The second parameter is undefined. Use anonymous credential - pipeline = newPipeline(new AnonymousCredential(), options); - } - super(url, pipeline); - this.serviceContext = this.storageClientContext.service; - } - /** - * Creates a {@link ContainerClient} object - * - * @param containerName - A container name - * @returns A new ContainerClient object for the given container name. - * - * Example usage: - * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); - * ``` - */ - getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); - } - /** - * Create a Blob container. @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * - * @param containerName - Name of the container to create. - * @param options - Options to configure Container Create operation. - * @returns Container creation response and the corresponding container client. - */ - async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(containerName); - const containerCreateResponse = await containerClient.create(updatedOptions); - return { - containerClient, - containerCreateResponse, - }; - }); - } - /** - * Deletes a Blob container. - * - * @param containerName - Name of the container to delete. - * @param options - Options to configure Container Delete operation. - * @returns Container deletion response. - */ - async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(containerName); - return containerClient.delete(updatedOptions); - }); - } - /** - * Restore a previously deleted Blob container. - * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. - * - * @param deletedContainerName - Name of the previously deleted container. - * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. - * @param options - Options to configure Container Restore operation. - * @returns Container deletion response. - */ - async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); - // Hack to access a protected member. - const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName, - deletedContainerVersion, - tracingOptions: updatedOptions.tracingOptions, - })); - return { containerClient, containerUndeleteResponse }; - }); - } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - // Hack to access a protected member. - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } - /** - * Gets the properties of a storage account’s Blob service, including properties - * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties - * - * @param options - Options to the Service Get Properties operation. - * @returns Response data for the Service Get Properties operation. - */ - async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets properties for a storage account’s Blob service endpoint, including properties - * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties - * - * @param properties - - * @param options - Options to the Service Set Properties operation. - * @returns Response data for the Service Set Properties operation. - */ - async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Retrieves statistics related to replication for the Blob service. It is only - * available on the secondary location endpoint when read-access geo-redundant - * replication is enabled for the storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats - * - * @param options - Options to the Service Get Statistics operation. - * @returns Response data for the Service Get Statistics operation. - */ - async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information - * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. - */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns a list of the containers under the specified account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2 - * - * @param marker - A string value that identifies the portion of - * the list of containers to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all containers remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to the Service List Container Segment operation. - * @returns Response data for the Service List Container Segment operation. - */ - async listContainersSegment(marker, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); - }); - } - /** - * The Filter Blobs operation enables callers to list blobs across all containers whose tags - * match a given search expression. Filter blobs searches across all containers within a - * storage account but can be scoped within the expression to a single container. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ - abortSignal: options.abortSignal, - where: tagFilterSqlExpression, - marker, - maxPageSize: options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); - return wrappedResponse; - }); - } - /** - * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker, options = {}) { - let response; - if (!!marker || marker === undefined) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options)); - response.blobs = response.blobs || []; - marker = response.continuationToken; - yield yield tslib.__await(response); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for blobs. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to findBlobsByTagsItems. - */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_1) throw e_1.error; } - } - }); - } - /** - * Returns an async iterable iterator to find all blobs with specified tag - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties - * - * Example using `for await` syntax: - * - * ```js - * let i = 1; - * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * // Passing next marker as continuationToken - * iterator = blobServiceClient - * .findBlobsByTags("tagkey='tagvalue'") - * .byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * ``` - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to find blobs by tags. - */ - findBlobsByTags(tagFilterSqlExpression, options = {}) { - // AsyncIterableIterator to iterate over blobs - const listSegmentOptions = Object.assign({}, options); - const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - }, - }; - } - /** - * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses - * - * @param marker - A string value that identifies the portion of - * the list of containers to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all containers remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list containers operation. - */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker, options = {}) { - let listContainersSegmentResponse; - if (!!marker || marker === undefined) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options)); - listContainersSegmentResponse.containerItems = - listContainersSegmentResponse.containerItems || []; - marker = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for Container Items - * - * @param options - Options to list containers operation. - */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_2) throw e_2.error; } - } - }); - } - /** - * Returns an async iterable iterator to list all the containers - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the containers in pages. - * - * Example using `for await` syntax: - * - * ```js - * let i = 1; - * for await (const container of blobServiceClient.listContainers()) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 container names - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * // Passing next marker as continuationToken - * iterator = blobServiceClient - * .listContainers() - * .byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 container names - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * } - * ``` - * - * @param options - Options to list containers. - * @returns An asyncIterableIterator that supports paging. - */ - listContainers(options = {}) { - if (options.prefix === "") { - options.prefix = undefined; - } - const include = []; - if (options.includeDeleted) { - include.push("deleted"); - } - if (options.includeMetadata) { - include.push("metadata"); - } - if (options.includeSystem) { - include.push("system"); - } - // AsyncIterableIterator to iterate over containers - const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {})); - const iter = this.listItems(listSegmentOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - }, - }; - } - /** - * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). - * - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using - * bearer token authentication. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key - * - * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time - * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time - */ - async getUserDelegationKey(startsOn, expiresOn, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn, false), - }, { - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - const userDelegationKey = { - signedObjectId: response.signedObjectId, - signedTenantId: response.signedTenantId, - signedStartsOn: new Date(response.signedStartsOn), - signedExpiresOn: new Date(response.signedExpiresOn), - signedService: response.signedService, - signedVersion: response.signedVersion, - value: response.value, - }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); - return res; - }); - } - /** - * Creates a BlobBatchClient object to conduct batch operations. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - * - * @returns A new BlobBatchClient object for this service. - */ - getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); - } - /** - * Only available for BlobServiceClient constructed with a shared key credential. - * - * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas - * - * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. - * @param permissions - Specifies the list of permissions to be associated with the SAS. - * @param resourceTypes - Specifies the resource types associated with the shared access signature. - * @param options - Optional parameters. - * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); - } - if (expiresOn === undefined) { - const now = new Date(); - expiresOn = new Date(now.getTime() + 3600 * 1000); - } - const sas = generateAccountSASQueryParameters(Object.assign({ permissions, - expiresOn, - resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); - } - /** - * Only available for BlobServiceClient constructed with a shared key credential. - * - * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas - * - * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. - * @param permissions - Specifies the list of permissions to be associated with the SAS. - * @param resourceTypes - Specifies the resource types associated with the shared access signature. - * @param options - Optional parameters. - * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasStringToSign(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); - } - if (expiresOn === undefined) { - const now = new Date(); - expiresOn = new Date(now.getTime() + 3600 * 1000); - } - return generateAccountSASQueryParametersInternal(Object.assign({ permissions, - expiresOn, - resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).stringToSign; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ -exports.KnownEncryptionAlgorithmType = void 0; -(function (KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; -})(exports.KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = {})); - -Object.defineProperty(exports, "RestError", ({ - enumerable: true, - get: function () { return coreRestPipeline.RestError; } -})); -exports.AccountSASPermissions = AccountSASPermissions; -exports.AccountSASResourceTypes = AccountSASResourceTypes; -exports.AccountSASServices = AccountSASServices; -exports.AnonymousCredential = AnonymousCredential; -exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; -exports.AppendBlobClient = AppendBlobClient; -exports.BaseRequestPolicy = BaseRequestPolicy; -exports.BlobBatch = BlobBatch; -exports.BlobBatchClient = BlobBatchClient; -exports.BlobClient = BlobClient; -exports.BlobLeaseClient = BlobLeaseClient; -exports.BlobSASPermissions = BlobSASPermissions; -exports.BlobServiceClient = BlobServiceClient; -exports.BlockBlobClient = BlockBlobClient; -exports.ContainerClient = ContainerClient; -exports.ContainerSASPermissions = ContainerSASPermissions; -exports.Credential = Credential; -exports.CredentialPolicy = CredentialPolicy; -exports.PageBlobClient = PageBlobClient; -exports.Pipeline = Pipeline; -exports.SASQueryParameters = SASQueryParameters; -exports.StorageBrowserPolicy = StorageBrowserPolicy; -exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; -exports.StorageOAuthScopes = StorageOAuthScopes; -exports.StorageRetryPolicy = StorageRetryPolicy; -exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; -exports.StorageSharedKeyCredential = StorageSharedKeyCredential; -exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; -exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; -exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; -exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; -exports.isPipelineLike = isPipelineLike; -exports.logger = logger; -exports.newPipeline = newPipeline; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 46412: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/*! - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResourceStream = exports.paginator = exports.Paginator = void 0; -/*! - * @module common/paginator - */ -const arrify = __nccwpck_require__(61546); -const extend = __nccwpck_require__(38171); -const resource_stream_1 = __nccwpck_require__(72199); -Object.defineProperty(exports, "ResourceStream", ({ enumerable: true, get: function () { return resource_stream_1.ResourceStream; } })); -/*! Developer Documentation - * - * paginator is used to auto-paginate `nextQuery` methods as well as - * streamifying them. - * - * Before: - * - * search.query('done=true', function(err, results, nextQuery) { - * search.query(nextQuery, function(err, results, nextQuery) {}); - * }); - * - * After: - * - * search.query('done=true', function(err, results) {}); - * - * Methods to extend should be written to accept callbacks and return a - * `nextQuery`. - */ -class Paginator { - /** - * Cache the original method, then overwrite it on the Class's prototype. - * - * @param {function} Class - The parent class of the methods to extend. - * @param {string|string[]} methodNames - Name(s) of the methods to extend. - */ - // tslint:disable-next-line:variable-name - extend(Class, methodNames) { - methodNames = arrify(methodNames); - methodNames.forEach(methodName => { - const originalMethod = Class.prototype[methodName]; - // map the original method to a private member - Class.prototype[methodName + '_'] = originalMethod; - // overwrite the original to auto-paginate - /* eslint-disable @typescript-eslint/no-explicit-any */ - Class.prototype[methodName] = function (...args) { - const parsedArguments = paginator.parseArguments_(args); - return paginator.run_(parsedArguments, originalMethod.bind(this)); - }; - }); - } - /** - * Wraps paginated API calls in a readable object stream. - * - * This method simply calls the nextQuery recursively, emitting results to a - * stream. The stream ends when `nextQuery` is null. - * - * `maxResults` will act as a cap for how many results are fetched and emitted - * to the stream. - * - * @param {string} methodName - Name of the method to streamify. - * @return {function} - Wrapped function. - */ - /* eslint-disable @typescript-eslint/no-explicit-any */ - streamify(methodName) { - return function ( - /* eslint-disable @typescript-eslint/no-explicit-any */ - ...args) { - const parsedArguments = paginator.parseArguments_(args); - const originalMethod = this[methodName + '_'] || this[methodName]; - return paginator.runAsStream_(parsedArguments, originalMethod.bind(this)); - }; - } - /** - * Parse a pseudo-array `arguments` for a query and callback. - * - * @param {array} args - The original `arguments` pseduo-array that the original - * method received. - */ - /* eslint-disable @typescript-eslint/no-explicit-any */ - parseArguments_(args) { - let query; - let autoPaginate = true; - let maxApiCalls = -1; - let maxResults = -1; - let callback; - const firstArgument = args[0]; - const lastArgument = args[args.length - 1]; - if (typeof firstArgument === 'function') { - callback = firstArgument; - } - else { - query = firstArgument; - } - if (typeof lastArgument === 'function') { - callback = lastArgument; - } - if (typeof query === 'object') { - query = extend(true, {}, query); - // Check if the user only asked for a certain amount of results. - if (query.maxResults && typeof query.maxResults === 'number') { - // `maxResults` is used API-wide. - maxResults = query.maxResults; - } - else if (typeof query.pageSize === 'number') { - // `pageSize` is Pub/Sub's `maxResults`. - maxResults = query.pageSize; - } - if (query.maxApiCalls && typeof query.maxApiCalls === 'number') { - maxApiCalls = query.maxApiCalls; - delete query.maxApiCalls; - } - // maxResults is the user specified limit. - if (maxResults !== -1 || query.autoPaginate === false) { - autoPaginate = false; - } - } - const parsedArguments = { - query: query || {}, - autoPaginate, - maxApiCalls, - maxResults, - callback, - }; - parsedArguments.streamOptions = extend(true, {}, parsedArguments.query); - delete parsedArguments.streamOptions.autoPaginate; - delete parsedArguments.streamOptions.maxResults; - delete parsedArguments.streamOptions.pageSize; - return parsedArguments; - } - /** - * This simply checks to see if `autoPaginate` is set or not, if it's true - * then we buffer all results, otherwise simply call the original method. - * - * @param {array} parsedArguments - Parsed arguments from the original method - * call. - * @param {object=|string=} parsedArguments.query - Query object. This is most - * commonly an object, but to make the API more simple, it can also be a - * string in some places. - * @param {function=} parsedArguments.callback - Callback function. - * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. - * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. - * @param {number} parsedArguments.maxResults - Maximum results to return. - * @param {function} originalMethod - The cached method that accepts a callback - * and returns `nextQuery` to receive more results. - */ - run_(parsedArguments, originalMethod) { - const query = parsedArguments.query; - const callback = parsedArguments.callback; - if (!parsedArguments.autoPaginate) { - return originalMethod(query, callback); - } - const results = new Array(); - let otherArgs = []; - const promise = new Promise((resolve, reject) => { - const stream = paginator.runAsStream_(parsedArguments, originalMethod); - stream - .on('error', reject) - .on('data', (data) => results.push(data)) - .on('end', () => { - otherArgs = stream._otherArgs || []; - resolve(results); - }); - }); - if (!callback) { - return promise.then(results => [results, query, ...otherArgs]); - } - promise.then(results => callback(null, results, query, ...otherArgs), (err) => callback(err)); - } - /** - * This method simply calls the nextQuery recursively, emitting results to a - * stream. The stream ends when `nextQuery` is null. - * - * `maxResults` will act as a cap for how many results are fetched and emitted - * to the stream. - * - * @param {object=|string=} parsedArguments.query - Query object. This is most - * commonly an object, but to make the API more simple, it can also be a - * string in some places. - * @param {function=} parsedArguments.callback - Callback function. - * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. - * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. - * @param {number} parsedArguments.maxResults - Maximum results to return. - * @param {function} originalMethod - The cached method that accepts a callback - * and returns `nextQuery` to receive more results. - * @return {stream} - Readable object stream. - */ - /* eslint-disable @typescript-eslint/no-explicit-any */ - runAsStream_(parsedArguments, originalMethod) { - return new resource_stream_1.ResourceStream(parsedArguments, originalMethod); - } -} -exports.Paginator = Paginator; -const paginator = new Paginator(); -exports.paginator = paginator; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 72199: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/*! - * Copyright 2019 Google Inc. All Rights Reserved. - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResourceStream = void 0; -const stream_1 = __nccwpck_require__(12781); -class ResourceStream extends stream_1.Transform { - constructor(args, requestFn) { - const options = Object.assign({ objectMode: true }, args.streamOptions); - super(options); - this._ended = false; - this._maxApiCalls = args.maxApiCalls === -1 ? Infinity : args.maxApiCalls; - this._nextQuery = args.query; - this._reading = false; - this._requestFn = requestFn; - this._requestsMade = 0; - this._resultsToSend = args.maxResults === -1 ? Infinity : args.maxResults; - this._otherArgs = []; - } - /* eslint-disable @typescript-eslint/no-explicit-any */ - end(...args) { - this._ended = true; - return super.end(...args); - } - _read() { - if (this._reading) { - return; - } - this._reading = true; - // Wrap in a try/catch to catch input linting errors, e.g. - // an invalid BigQuery query. These errors are thrown in an - // async fashion, which makes them un-catchable by the user. - try { - this._requestFn(this._nextQuery, (err, results, nextQuery, ...otherArgs) => { - if (err) { - this.destroy(err); - return; - } - this._otherArgs = otherArgs; - this._nextQuery = nextQuery; - if (this._resultsToSend !== Infinity) { - results = results.splice(0, this._resultsToSend); - this._resultsToSend -= results.length; - } - let more = true; - for (const result of results) { - if (this._ended) { - break; - } - more = this.push(result); - } - const isFinished = !this._nextQuery || this._resultsToSend < 1; - const madeMaxCalls = ++this._requestsMade >= this._maxApiCalls; - if (isFinished || madeMaxCalls) { - this.end(); - } - if (more && !this._ended) { - setImmediate(() => this._read()); - } - this._reading = false; - }); - } - catch (e) { - this.destroy(e); - } - } -} -exports.ResourceStream = ResourceStream; -//# sourceMappingURL=resource-stream.js.map - -/***/ }), - -/***/ 3497: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MissingProjectIdError = exports.replaceProjectIdToken = void 0; -const stream_1 = __nccwpck_require__(12781); -// Copyright 2014 Google LLC -// -// 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. -/** - * Populate the `{{projectId}}` placeholder. - * - * @throws {Error} If a projectId is required, but one is not provided. - * - * @param {*} - Any input value that may contain a placeholder. Arrays and objects will be looped. - * @param {string} projectId - A projectId. If not provided - * @return {*} - The original argument with all placeholders populated. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function replaceProjectIdToken(value, projectId) { - if (Array.isArray(value)) { - value = value.map(v => replaceProjectIdToken(v, projectId)); - } - if (value !== null && - typeof value === 'object' && - !(value instanceof Buffer) && - !(value instanceof stream_1.Stream) && - typeof value.hasOwnProperty === 'function') { - for (const opt in value) { - // eslint-disable-next-line no-prototype-builtins - if (value.hasOwnProperty(opt)) { - value[opt] = replaceProjectIdToken(value[opt], projectId); - } - } - } - if (typeof value === 'string' && - value.indexOf('{{projectId}}') > -1) { - if (!projectId || projectId === '{{projectId}}') { - throw new MissingProjectIdError(); - } - value = value.replace(/{{projectId}}/g, projectId); - } - return value; -} -exports.replaceProjectIdToken = replaceProjectIdToken; -/** - * Custom error type for missing project ID errors. - */ -class MissingProjectIdError extends Error { - constructor() { - super(...arguments); - this.message = `Sorry, we cannot connect to Cloud Services without a project - ID. You may specify one with an environment variable named - "GOOGLE_CLOUD_PROJECT".`.replace(/ +/g, ' '); - } -} -exports.MissingProjectIdError = MissingProjectIdError; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 19203: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* eslint-disable prefer-rest-params */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.callbackifyAll = exports.callbackify = exports.promisifyAll = exports.promisify = void 0; -/** - * Wraps a callback style function to conditionally return a promise. - * - * @param {function} originalMethod - The method to promisify. - * @param {object=} options - Promise options. - * @param {boolean} options.singular - Resolve the promise with single arg instead of an array. - * @return {function} wrapped - */ -function promisify(originalMethod, options) { - if (originalMethod.promisified_) { - return originalMethod; - } - options = options || {}; - const slice = Array.prototype.slice; - // tslint:disable-next-line:no-any - const wrapper = function () { - let last; - for (last = arguments.length - 1; last >= 0; last--) { - const arg = arguments[last]; - if (typeof arg === 'undefined') { - continue; // skip trailing undefined. - } - if (typeof arg !== 'function') { - break; // non-callback last argument found. - } - return originalMethod.apply(this, arguments); - } - // peel trailing undefined. - const args = slice.call(arguments, 0, last + 1); - // tslint:disable-next-line:variable-name - let PromiseCtor = Promise; - // Because dedupe will likely create a single install of - // @google-cloud/common to be shared amongst all modules, we need to - // localize it at the Service level. - if (this && this.Promise) { - PromiseCtor = this.Promise; - } - return new PromiseCtor((resolve, reject) => { - // tslint:disable-next-line:no-any - args.push((...args) => { - const callbackArgs = slice.call(args); - const err = callbackArgs.shift(); - if (err) { - return reject(err); - } - if (options.singular && callbackArgs.length === 1) { - resolve(callbackArgs[0]); - } - else { - resolve(callbackArgs); - } - }); - originalMethod.apply(this, args); - }); - }; - wrapper.promisified_ = true; - return wrapper; -} -exports.promisify = promisify; -/** - * Promisifies certain Class methods. This will not promisify private or - * streaming methods. - * - * @param {module:common/service} Class - Service class. - * @param {object=} options - Configuration object. - */ -// tslint:disable-next-line:variable-name -function promisifyAll(Class, options) { - const exclude = (options && options.exclude) || []; - const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); - const methods = ownPropertyNames.filter(methodName => { - // clang-format off - return (!exclude.includes(methodName) && - typeof Class.prototype[methodName] === 'function' && // is it a function? - !/(^_|(Stream|_)|promise$)|^constructor$/.test(methodName) // is it promisable? - ); - // clang-format on - }); - methods.forEach(methodName => { - const originalMethod = Class.prototype[methodName]; - if (!originalMethod.promisified_) { - Class.prototype[methodName] = exports.promisify(originalMethod, options); - } - }); -} -exports.promisifyAll = promisifyAll; -/** - * Wraps a promisy type function to conditionally call a callback function. - * - * @param {function} originalMethod - The method to callbackify. - * @param {object=} options - Callback options. - * @param {boolean} options.singular - Pass to the callback a single arg instead of an array. - * @return {function} wrapped - */ -function callbackify(originalMethod) { - if (originalMethod.callbackified_) { - return originalMethod; - } - // tslint:disable-next-line:no-any - const wrapper = function () { - if (typeof arguments[arguments.length - 1] !== 'function') { - return originalMethod.apply(this, arguments); - } - const cb = Array.prototype.pop.call(arguments); - originalMethod.apply(this, arguments).then( - // tslint:disable-next-line:no-any - (res) => { - res = Array.isArray(res) ? res : [res]; - cb(null, ...res); - }, (err) => cb(err)); - }; - wrapper.callbackified_ = true; - return wrapper; -} -exports.callbackify = callbackify; -/** - * Callbackifies certain Class methods. This will not callbackify private or - * streaming methods. - * - * @param {module:common/service} Class - Service class. - * @param {object=} options - Configuration object. - */ -function callbackifyAll( -// tslint:disable-next-line:variable-name -Class, options) { - const exclude = (options && options.exclude) || []; - const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); - const methods = ownPropertyNames.filter(methodName => { - // clang-format off - return (!exclude.includes(methodName) && - typeof Class.prototype[methodName] === 'function' && // is it a function? - !/^_|(Stream|_)|^constructor$/.test(methodName) // is it callbackifyable? - ); - // clang-format on - }); - methods.forEach(methodName => { - const originalMethod = Class.prototype[methodName]; - if (!originalMethod.callbackified_) { - Class.prototype[methodName] = exports.callbackify(originalMethod); - } - }); -} -exports.callbackifyAll = callbackifyAll; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 44458: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(33542)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(29411)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(83424)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(64051)); - -var _nil = _interopRequireDefault(__nccwpck_require__(46570)); - -var _version = _interopRequireDefault(__nccwpck_require__(35611)); - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -var _parse = _interopRequireDefault(__nccwpck_require__(99645)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 84953: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 46570: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 99645: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 94323: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 91430: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 77416: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 32122: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 33542: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(91430)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 29411: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(74624)); - -var _md = _interopRequireDefault(__nccwpck_require__(84953)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 74624: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -var _parse = _interopRequireDefault(__nccwpck_require__(99645)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 83424: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(91430)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 64051: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(74624)); - -var _sha = _interopRequireDefault(__nccwpck_require__(77416)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 20937: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(94323)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 35611: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 40334: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createTokenAuth: () => createTokenAuth -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/auth.js -var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; -var REGEX_IS_INSTALLATION = /^ghs_/; -var REGEX_IS_USER_TO_SERVER = /^ghu_/; -async function auth(token) { - const isApp = token.split(/\./).length === 3; - const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); - const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; - return { - type: "token", - token, - tokenType - }; -} - -// pkg/dist-src/with-authorization-prefix.js -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - return `token ${token}`; -} - -// pkg/dist-src/hook.js -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -// pkg/dist-src/index.js -var createTokenAuth = function createTokenAuth2(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 76762: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var index_exports = {}; -__export(index_exports, { - Octokit: () => Octokit -}); -module.exports = __toCommonJS(index_exports); -var import_universal_user_agent = __nccwpck_require__(45030); -var import_before_after_hook = __nccwpck_require__(83682); -var import_request = __nccwpck_require__(36234); -var import_graphql = __nccwpck_require__(88467); -var import_auth_token = __nccwpck_require__(40334); - -// pkg/dist-src/version.js -var VERSION = "5.2.1"; - -// pkg/dist-src/index.js -var noop = () => { -}; -var consoleWarn = console.warn.bind(console); -var consoleError = console.error.bind(console); -var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var Octokit = class { - static { - this.VERSION = VERSION; - } - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); - return; - } - super( - Object.assign( - {}, - defaults, - options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null - ) - ); - } - }; - return OctokitWithDefaults; - } - static { - this.plugins = []; - } - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - static plugin(...newPlugins) { - const currentPlugins = this.plugins; - const NewOctokit = class extends this { - static { - this.plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); - } - }; - return NewOctokit; - } - constructor(options = {}) { - const hook = new import_before_after_hook.Collection(); - const requestDefaults = { - baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" - } - }; - requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; - } - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; - } - this.request = import_request.request.defaults(requestDefaults); - this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); - this.hook = hook; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - const auth = (0, import_auth_token.createTokenAuth)(options.auth); - hook.wrap("request", auth.hook); - this.auth = auth; - } - } else { - const { authStrategy, ...otherOptions } = options; - const auth = authStrategy( - Object.assign( - { - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, - options.auth - ) - ); - hook.wrap("request", auth.hook); - this.auth = auth; - } - const classConstructor = this.constructor; - for (let i = 0; i < classConstructor.plugins.length; ++i) { - Object.assign(this, classConstructor.plugins[i](this, options)); - } - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 59440: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - endpoint: () => endpoint -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/defaults.js -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "9.0.6"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; - -// pkg/dist-src/util/lowercase-keys.js -function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -// pkg/dist-src/util/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/util/merge-deep.js -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} - -// pkg/dist-src/util/remove-undefined-properties.js -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} - -// pkg/dist-src/merge.js -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} - -// pkg/dist-src/util/add-query-parameters.js -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return url + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -// pkg/dist-src/util/extract-url-variable-names.js -var urlVariableRegex = /\{[^{}}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); -} - -// pkg/dist-src/util/omit.js -function omit(object, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; - } - } - return result; -} - -// pkg/dist-src/util/url-template.js -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } -} - -// pkg/dist-src/parse.js -function parse(options) { - let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format) => format.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/(? { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); - } - } - } - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} - -// pkg/dist-src/endpoint-with-defaults.js -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); - const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); - return Object.assign(endpoint2, { - DEFAULTS: DEFAULTS2, - defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), - parse - }); -} - -// pkg/dist-src/index.js -var endpoint = withDefaults(null, DEFAULTS); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 88467: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var index_exports = {}; -__export(index_exports, { - GraphqlResponseError: () => GraphqlResponseError, - graphql: () => graphql2, - withCustomRequest: () => withCustomRequest -}); -module.exports = __toCommonJS(index_exports); -var import_request3 = __nccwpck_require__(36234); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "7.1.1"; - -// pkg/dist-src/with-defaults.js -var import_request2 = __nccwpck_require__(36234); - -// pkg/dist-src/graphql.js -var import_request = __nccwpck_require__(36234); - -// pkg/dist-src/error.js -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors: -` + data.errors.map((e) => ` - ${e.message}`).join("\n"); -} -var GraphqlResponseError = class extends Error { - constructor(request2, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request2; - this.headers = headers; - this.response = response; - this.name = "GraphqlResponseError"; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } -}; - -// pkg/dist-src/graphql.js -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType" -]; -var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request2, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject( - new Error(`[@octokit/graphql] "query" cannot be used as variable name`) - ); - } - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; - return Promise.reject( - new Error( - `[@octokit/graphql] "${key}" cannot be used as variable name` - ) - ); - } - } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; - const requestOptions = Object.keys( - parsedOptions - ).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; - } - if (!result.variables) { - result.variables = {}; - } - result.variables[key] = parsedOptions[key]; - return result; - }, {}); - const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { - requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); - } - return request2(requestOptions).then((response) => { - if (response.data.errors) { - const headers = {}; - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; - } - throw new GraphqlResponseError( - requestOptions, - headers, - response.data - ); - } - return response.data.data; - }); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(request2, newDefaults) { - const newRequest = request2.defaults(newDefaults); - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: newRequest.endpoint - }); -} - -// pkg/dist-src/index.js -var graphql2 = withDefaults(import_request3.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 64193: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - composePaginateRest: () => composePaginateRest, - isPaginatingEndpoint: () => isPaginatingEndpoint, - paginateRest: () => paginateRest, - paginatingEndpoints: () => paginatingEndpoints -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "9.2.2"; - -// pkg/dist-src/normalize-paginated-list-response.js -function normalizePaginatedListResponse(response) { - if (!response.data) { - return { - ...response, - data: [] - }; - } - const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); - if (!responseNeedsNormalization) - return response; - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; - } - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } - response.data.total_count = totalCount; - return response; -} - -// pkg/dist-src/iterator.js -function iterator(octokit, route, parameters) { - const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); - const requestMethod = typeof route === "function" ? route : octokit.request; - const method = options.method; - const headers = options.headers; - let url = options.url; - return { - [Symbol.asyncIterator]: () => ({ - async next() { - if (!url) - return { done: true }; - try { - const response = await requestMethod({ method, url, headers }); - const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( - /<([^<>]+)>;\s*rel="next"/ - ) || [])[1]; - return { value: normalizedResponse }; - } catch (error) { - if (error.status !== 409) - throw error; - url = ""; - return { - value: { - status: 200, - headers: {}, - data: [] - } - }; - } - } - }) - }; -} - -// pkg/dist-src/paginate.js -function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = void 0; - } - return gather( - octokit, - [], - iterator(octokit, route, parameters)[Symbol.asyncIterator](), - mapFn - ); -} -function gather(octokit, results, iterator2, mapFn) { - return iterator2.next().then((result) => { - if (result.done) { - return results; - } - let earlyExit = false; - function done() { - earlyExit = true; - } - results = results.concat( - mapFn ? mapFn(result.value, done) : result.value.data - ); - if (earlyExit) { - return results; - } - return gather(octokit, results, iterator2, mapFn); - }); -} - -// pkg/dist-src/compose-paginate.js -var composePaginateRest = Object.assign(paginate, { - iterator -}); - -// pkg/dist-src/generated/paginating-endpoints.js -var paginatingEndpoints = [ - "GET /advisories", - "GET /app/hook/deliveries", - "GET /app/installation-requests", - "GET /app/installations", - "GET /assignments/{assignment_id}/accepted_assignments", - "GET /classrooms", - "GET /classrooms/{classroom_id}/assignments", - "GET /enterprises/{enterprise}/dependabot/alerts", - "GET /enterprises/{enterprise}/secret-scanning/alerts", - "GET /events", - "GET /gists", - "GET /gists/public", - "GET /gists/starred", - "GET /gists/{gist_id}/comments", - "GET /gists/{gist_id}/commits", - "GET /gists/{gist_id}/forks", - "GET /installation/repositories", - "GET /issues", - "GET /licenses", - "GET /marketplace_listing/plans", - "GET /marketplace_listing/plans/{plan_id}/accounts", - "GET /marketplace_listing/stubbed/plans", - "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", - "GET /networks/{owner}/{repo}/events", - "GET /notifications", - "GET /organizations", - "GET /orgs/{org}/actions/cache/usage-by-repository", - "GET /orgs/{org}/actions/permissions/repositories", - "GET /orgs/{org}/actions/runners", - "GET /orgs/{org}/actions/secrets", - "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", - "GET /orgs/{org}/actions/variables", - "GET /orgs/{org}/actions/variables/{name}/repositories", - "GET /orgs/{org}/blocks", - "GET /orgs/{org}/code-scanning/alerts", - "GET /orgs/{org}/codespaces", - "GET /orgs/{org}/codespaces/secrets", - "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", - "GET /orgs/{org}/copilot/billing/seats", - "GET /orgs/{org}/dependabot/alerts", - "GET /orgs/{org}/dependabot/secrets", - "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", - "GET /orgs/{org}/events", - "GET /orgs/{org}/failed_invitations", - "GET /orgs/{org}/hooks", - "GET /orgs/{org}/hooks/{hook_id}/deliveries", - "GET /orgs/{org}/installations", - "GET /orgs/{org}/invitations", - "GET /orgs/{org}/invitations/{invitation_id}/teams", - "GET /orgs/{org}/issues", - "GET /orgs/{org}/members", - "GET /orgs/{org}/members/{username}/codespaces", - "GET /orgs/{org}/migrations", - "GET /orgs/{org}/migrations/{migration_id}/repositories", - "GET /orgs/{org}/organization-roles/{role_id}/teams", - "GET /orgs/{org}/organization-roles/{role_id}/users", - "GET /orgs/{org}/outside_collaborators", - "GET /orgs/{org}/packages", - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", - "GET /orgs/{org}/personal-access-token-requests", - "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", - "GET /orgs/{org}/personal-access-tokens", - "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", - "GET /orgs/{org}/projects", - "GET /orgs/{org}/properties/values", - "GET /orgs/{org}/public_members", - "GET /orgs/{org}/repos", - "GET /orgs/{org}/rulesets", - "GET /orgs/{org}/rulesets/rule-suites", - "GET /orgs/{org}/secret-scanning/alerts", - "GET /orgs/{org}/security-advisories", - "GET /orgs/{org}/teams", - "GET /orgs/{org}/teams/{team_slug}/discussions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/invitations", - "GET /orgs/{org}/teams/{team_slug}/members", - "GET /orgs/{org}/teams/{team_slug}/projects", - "GET /orgs/{org}/teams/{team_slug}/repos", - "GET /orgs/{org}/teams/{team_slug}/teams", - "GET /projects/columns/{column_id}/cards", - "GET /projects/{project_id}/collaborators", - "GET /projects/{project_id}/columns", - "GET /repos/{owner}/{repo}/actions/artifacts", - "GET /repos/{owner}/{repo}/actions/caches", - "GET /repos/{owner}/{repo}/actions/organization-secrets", - "GET /repos/{owner}/{repo}/actions/organization-variables", - "GET /repos/{owner}/{repo}/actions/runners", - "GET /repos/{owner}/{repo}/actions/runs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", - "GET /repos/{owner}/{repo}/actions/secrets", - "GET /repos/{owner}/{repo}/actions/variables", - "GET /repos/{owner}/{repo}/actions/workflows", - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", - "GET /repos/{owner}/{repo}/activity", - "GET /repos/{owner}/{repo}/assignees", - "GET /repos/{owner}/{repo}/branches", - "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", - "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", - "GET /repos/{owner}/{repo}/code-scanning/alerts", - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", - "GET /repos/{owner}/{repo}/code-scanning/analyses", - "GET /repos/{owner}/{repo}/codespaces", - "GET /repos/{owner}/{repo}/codespaces/devcontainers", - "GET /repos/{owner}/{repo}/codespaces/secrets", - "GET /repos/{owner}/{repo}/collaborators", - "GET /repos/{owner}/{repo}/comments", - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/commits", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", - "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", - "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", - "GET /repos/{owner}/{repo}/commits/{ref}/status", - "GET /repos/{owner}/{repo}/commits/{ref}/statuses", - "GET /repos/{owner}/{repo}/contributors", - "GET /repos/{owner}/{repo}/dependabot/alerts", - "GET /repos/{owner}/{repo}/dependabot/secrets", - "GET /repos/{owner}/{repo}/deployments", - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", - "GET /repos/{owner}/{repo}/environments", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", - "GET /repos/{owner}/{repo}/events", - "GET /repos/{owner}/{repo}/forks", - "GET /repos/{owner}/{repo}/hooks", - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", - "GET /repos/{owner}/{repo}/invitations", - "GET /repos/{owner}/{repo}/issues", - "GET /repos/{owner}/{repo}/issues/comments", - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/issues/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", - "GET /repos/{owner}/{repo}/issues/{issue_number}/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", - "GET /repos/{owner}/{repo}/keys", - "GET /repos/{owner}/{repo}/labels", - "GET /repos/{owner}/{repo}/milestones", - "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", - "GET /repos/{owner}/{repo}/notifications", - "GET /repos/{owner}/{repo}/pages/builds", - "GET /repos/{owner}/{repo}/projects", - "GET /repos/{owner}/{repo}/pulls", - "GET /repos/{owner}/{repo}/pulls/comments", - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", - "GET /repos/{owner}/{repo}/releases", - "GET /repos/{owner}/{repo}/releases/{release_id}/assets", - "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", - "GET /repos/{owner}/{repo}/rules/branches/{branch}", - "GET /repos/{owner}/{repo}/rulesets", - "GET /repos/{owner}/{repo}/rulesets/rule-suites", - "GET /repos/{owner}/{repo}/secret-scanning/alerts", - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", - "GET /repos/{owner}/{repo}/security-advisories", - "GET /repos/{owner}/{repo}/stargazers", - "GET /repos/{owner}/{repo}/subscribers", - "GET /repos/{owner}/{repo}/tags", - "GET /repos/{owner}/{repo}/teams", - "GET /repos/{owner}/{repo}/topics", - "GET /repositories", - "GET /repositories/{repository_id}/environments/{environment_name}/secrets", - "GET /repositories/{repository_id}/environments/{environment_name}/variables", - "GET /search/code", - "GET /search/commits", - "GET /search/issues", - "GET /search/labels", - "GET /search/repositories", - "GET /search/topics", - "GET /search/users", - "GET /teams/{team_id}/discussions", - "GET /teams/{team_id}/discussions/{discussion_number}/comments", - "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /teams/{team_id}/discussions/{discussion_number}/reactions", - "GET /teams/{team_id}/invitations", - "GET /teams/{team_id}/members", - "GET /teams/{team_id}/projects", - "GET /teams/{team_id}/repos", - "GET /teams/{team_id}/teams", - "GET /user/blocks", - "GET /user/codespaces", - "GET /user/codespaces/secrets", - "GET /user/emails", - "GET /user/followers", - "GET /user/following", - "GET /user/gpg_keys", - "GET /user/installations", - "GET /user/installations/{installation_id}/repositories", - "GET /user/issues", - "GET /user/keys", - "GET /user/marketplace_purchases", - "GET /user/marketplace_purchases/stubbed", - "GET /user/memberships/orgs", - "GET /user/migrations", - "GET /user/migrations/{migration_id}/repositories", - "GET /user/orgs", - "GET /user/packages", - "GET /user/packages/{package_type}/{package_name}/versions", - "GET /user/public_emails", - "GET /user/repos", - "GET /user/repository_invitations", - "GET /user/social_accounts", - "GET /user/ssh_signing_keys", - "GET /user/starred", - "GET /user/subscriptions", - "GET /user/teams", - "GET /users", - "GET /users/{username}/events", - "GET /users/{username}/events/orgs/{org}", - "GET /users/{username}/events/public", - "GET /users/{username}/followers", - "GET /users/{username}/following", - "GET /users/{username}/gists", - "GET /users/{username}/gpg_keys", - "GET /users/{username}/keys", - "GET /users/{username}/orgs", - "GET /users/{username}/packages", - "GET /users/{username}/projects", - "GET /users/{username}/received_events", - "GET /users/{username}/received_events/public", - "GET /users/{username}/repos", - "GET /users/{username}/social_accounts", - "GET /users/{username}/ssh_signing_keys", - "GET /users/{username}/starred", - "GET /users/{username}/subscriptions" -]; - -// pkg/dist-src/paginating-endpoints.js -function isPaginatingEndpoint(arg) { - if (typeof arg === "string") { - return paginatingEndpoints.includes(arg); - } else { - return false; - } -} - -// pkg/dist-src/index.js -function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator.bind(null, octokit) - }) - }; -} -paginateRest.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 83044: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); @@ -42385,11798 +16758,17170 @@ var Endpoints = { updateAuthenticated: ["PATCH /user"] } }; -var endpoints_default = Endpoints; +var endpoints_default = Endpoints; + +// pkg/dist-src/endpoints-to-methods.js +var endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); + } +} +var handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); + } + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); + } + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + function withDecorations(...args) { + let options = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; + } + delete options2[name]; + } + } + return requestWithDefaults(options2); + } + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} + +// pkg/dist-src/index.js +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api + }; +} +restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; +} +legacyRestEndpointMethods.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 10537: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError +}); +module.exports = __toCommonJS(dist_src_exports); +var import_deprecation = __nccwpck_require__(58932); +var import_once = __toESM(__nccwpck_require__(1223)); +var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var RequestError = class extends Error { + constructor(message, statusCode, options) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + /(? { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + request: () => request +}); +module.exports = __toCommonJS(dist_src_exports); +var import_endpoint = __nccwpck_require__(59440); +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "8.4.1"; + +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/fetch-wrapper.js +var import_request_error = __nccwpck_require__(10537); + +// pkg/dist-src/get-buffer-response.js +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +// pkg/dist-src/fetch-wrapper.js +function fetchWrapper(requestOptions) { + var _a, _b, _c, _d; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; + } + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + return fetch(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, + headers: requestOptions.headers, + signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new import_request_error.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: void 0 + }, + request: requestOptions + }); + } + if (status === 304) { + throw new import_request_error.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new import_request_error.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url, + headers, + data + }; + }).catch((error) => { + if (error instanceof import_request_error.RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + throw new import_request_error.RequestError(message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; + } else { + suffix = ""; + } + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + } + return `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); + } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); +} + +// pkg/dist-src/index.js +var request = withDefaults(import_endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + } +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 81040: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +function once(emitter, name, { signal } = {}) { + return new Promise((resolve, reject) => { + function cleanup() { + signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup); + emitter.removeListener(name, onEvent); + emitter.removeListener('error', onError); + } + function onEvent(...args) { + cleanup(); + resolve(args); + } + function onError(err) { + cleanup(); + reject(err); + } + signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup); + emitter.on(name, onEvent); + emitter.on('error', onError); + }); +} +exports["default"] = once; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 61659: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var eventTargetShim = __nccwpck_require__(84697); + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends eventTargetShim.EventTarget { + /** + * AbortSignal cannot be constructed directly. + */ + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } + /** + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + */ + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + eventTargetShim.EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { + /** + * Initialize this controller. + */ + constructor() { + signals.set(this, createAbortSignal()); + } + /** + * Returns the `AbortSignal` object associated with this object. + */ + get signal() { + return getSignal(this); + } + /** + * Abort and signal to any observers that the associated activity is to be aborted. + */ + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +exports.AbortController = AbortController; +exports.AbortSignal = AbortSignal; +exports["default"] = AbortController; + +module.exports = AbortController +module.exports.AbortController = module.exports["default"] = AbortController +module.exports.AbortSignal = AbortSignal +//# sourceMappingURL=abort-controller.js.map + + +/***/ }), + +/***/ 8348: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.req = exports.json = exports.toBuffer = void 0; +const http = __importStar(__nccwpck_require__(13685)); +const https = __importStar(__nccwpck_require__(95687)); +async function toBuffer(stream) { + let length = 0; + const chunks = []; + for await (const chunk of stream) { + length += chunk.length; + chunks.push(chunk); + } + return Buffer.concat(chunks, length); +} +exports.toBuffer = toBuffer; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +async function json(stream) { + const buf = await toBuffer(stream); + const str = buf.toString('utf8'); + try { + return JSON.parse(str); + } + catch (_err) { + const err = _err; + err.message += ` (input: ${str})`; + throw err; + } +} +exports.json = json; +function req(url, opts = {}) { + const href = typeof url === 'string' ? url : url.href; + const req = (href.startsWith('https:') ? https : http).request(url, opts); + const promise = new Promise((resolve, reject) => { + req + .once('response', resolve) + .once('error', reject) + .end(); + }); + req.then = promise.then.bind(promise); + return req; +} +exports.req = req; +//# sourceMappingURL=helpers.js.map + +/***/ }), + +/***/ 70694: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Agent = void 0; +const net = __importStar(__nccwpck_require__(41808)); +const http = __importStar(__nccwpck_require__(13685)); +const https_1 = __nccwpck_require__(95687); +__exportStar(__nccwpck_require__(8348), exports); +const INTERNAL = Symbol('AgentBaseInternalState'); +class Agent extends http.Agent { + constructor(opts) { + super(opts); + this[INTERNAL] = {}; + } + /** + * Determine whether this is an `http` or `https` request. + */ + isSecureEndpoint(options) { + if (options) { + // First check the `secureEndpoint` property explicitly, since this + // means that a parent `Agent` is "passing through" to this instance. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (typeof options.secureEndpoint === 'boolean') { + return options.secureEndpoint; + } + // If no explicit `secure` endpoint, check if `protocol` property is + // set. This will usually be the case since using a full string URL + // or `URL` instance should be the most common usage. + if (typeof options.protocol === 'string') { + return options.protocol === 'https:'; + } + } + // Finally, if no `protocol` property was set, then fall back to + // checking the stack trace of the current call stack, and try to + // detect the "https" module. + const { stack } = new Error(); + if (typeof stack !== 'string') + return false; + return stack + .split('\n') + .some((l) => l.indexOf('(https.js:') !== -1 || + l.indexOf('node:https:') !== -1); + } + // In order to support async signatures in `connect()` and Node's native + // connection pooling in `http.Agent`, the array of sockets for each origin + // has to be updated synchronously. This is so the length of the array is + // accurate when `addRequest()` is next called. We achieve this by creating a + // fake socket and adding it to `sockets[origin]` and incrementing + // `totalSocketCount`. + incrementSockets(name) { + // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no + // need to create a fake socket because Node.js native connection pooling + // will never be invoked. + if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { + return null; + } + // All instances of `sockets` are expected TypeScript errors. The + // alternative is to add it as a private property of this class but that + // will break TypeScript subclassing. + if (!this.sockets[name]) { + // @ts-expect-error `sockets` is readonly in `@types/node` + this.sockets[name] = []; + } + const fakeSocket = new net.Socket({ writable: false }); + this.sockets[name].push(fakeSocket); + // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` + this.totalSocketCount++; + return fakeSocket; + } + decrementSockets(name, socket) { + if (!this.sockets[name] || socket === null) { + return; + } + const sockets = this.sockets[name]; + const index = sockets.indexOf(socket); + if (index !== -1) { + sockets.splice(index, 1); + // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` + this.totalSocketCount--; + if (sockets.length === 0) { + // @ts-expect-error `sockets` is readonly in `@types/node` + delete this.sockets[name]; + } + } + } + // In order to properly update the socket pool, we need to call `getName()` on + // the core `https.Agent` if it is a secureEndpoint. + getName(options) { + const secureEndpoint = this.isSecureEndpoint(options); + if (secureEndpoint) { + // @ts-expect-error `getName()` isn't defined in `@types/node` + return https_1.Agent.prototype.getName.call(this, options); + } + // @ts-expect-error `getName()` isn't defined in `@types/node` + return super.getName(options); + } + createSocket(req, options, cb) { + const connectOpts = { + ...options, + secureEndpoint: this.isSecureEndpoint(options), + }; + const name = this.getName(connectOpts); + const fakeSocket = this.incrementSockets(name); + Promise.resolve() + .then(() => this.connect(req, connectOpts)) + .then((socket) => { + this.decrementSockets(name, fakeSocket); + if (socket instanceof http.Agent) { + try { + // @ts-expect-error `addRequest()` isn't defined in `@types/node` + return socket.addRequest(req, connectOpts); + } + catch (err) { + return cb(err); + } + } + this[INTERNAL].currentSocket = socket; + // @ts-expect-error `createSocket()` isn't defined in `@types/node` + super.createSocket(req, options, cb); + }, (err) => { + this.decrementSockets(name, fakeSocket); + cb(err); + }); + } + createConnection() { + const socket = this[INTERNAL].currentSocket; + this[INTERNAL].currentSocket = undefined; + if (!socket) { + throw new Error('No socket was returned in the `connect()` function'); + } + return socket; + } + get defaultPort() { + return (this[INTERNAL].defaultPort ?? + (this.protocol === 'https:' ? 443 : 80)); + } + set defaultPort(v) { + if (this[INTERNAL]) { + this[INTERNAL].defaultPort = v; + } + } + get protocol() { + return (this[INTERNAL].protocol ?? + (this.isSecureEndpoint() ? 'https:' : 'http:')); + } + set protocol(v) { + if (this[INTERNAL]) { + this[INTERNAL].protocol = v; + } + } +} +exports.Agent = Agent; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 61546: +/***/ ((module) => { + +"use strict"; + + +const arrify = value => { + if (value === null || value === undefined) { + return []; + } + + if (Array.isArray(value)) { + return value; + } + + if (typeof value === 'string') { + return [value]; + } + + if (typeof value[Symbol.iterator] === 'function') { + return [...value]; + } + + return [value]; +}; + +module.exports = arrify; + + +/***/ }), + +/***/ 33415: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Packages +var retrier = __nccwpck_require__(71604); + +function retry(fn, opts) { + function run(resolve, reject) { + var options = opts || {}; + var op; + + // Default `randomize` to true + if (!('randomize' in options)) { + options.randomize = true; + } + + op = retrier.operation(options); + + // We allow the user to abort retrying + // this makes sense in the cases where + // knowledge is obtained that retrying + // would be futile (e.g.: auth errors) + + function bail(err) { + reject(err || new Error('Aborted')); + } + + function onError(err, num) { + if (err.bail) { + bail(err); + return; + } + + if (!op.retry(err)) { + reject(op.mainError()); + } else if (options.onRetry) { + options.onRetry(err, num); + } + } + + function runAttempt(num) { + var val; + + try { + val = fn(bail, num); + } catch (err) { + onError(err, num); + return; + } + + Promise.resolve(val) + .then(resolve) + .catch(function catchIt(err) { + onError(err, num); + }); + } + + op.attempt(runAttempt); + } + + return new Promise(run); +} + +module.exports = retry; + + +/***/ }), + +/***/ 14812: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = +{ + parallel : __nccwpck_require__(8210), + serial : __nccwpck_require__(50445), + serialOrdered : __nccwpck_require__(3578) +}; + + +/***/ }), + +/***/ 1700: +/***/ ((module) => { + +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} + + +/***/ }), + +/***/ 72794: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var defer = __nccwpck_require__(15295); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} + + +/***/ }), + +/***/ 15295: +/***/ ((module) => { + +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} + + +/***/ }), + +/***/ 9023: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var async = __nccwpck_require__(72794) + , abort = __nccwpck_require__(1700) + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} + + +/***/ }), + +/***/ 42474: +/***/ ((module) => { + +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} + + +/***/ }), + +/***/ 37942: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var abort = __nccwpck_require__(1700) + , async = __nccwpck_require__(72794) + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} + + +/***/ }), + +/***/ 8210: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(9023) + , initState = __nccwpck_require__(42474) + , terminator = __nccwpck_require__(37942) + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} + + +/***/ }), + +/***/ 50445: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var serialOrdered = __nccwpck_require__(3578); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} + + +/***/ }), + +/***/ 3578: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(9023) + , initState = __nccwpck_require__(42474) + , terminator = __nccwpck_require__(37942) + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} + + +/***/ }), + +/***/ 91403: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var CombinedStream = __nccwpck_require__(85443); +var util = __nccwpck_require__(73837); +var path = __nccwpck_require__(71017); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var parseUrl = (__nccwpck_require__(57310).parse); +var fs = __nccwpck_require__(57147); +var Stream = (__nccwpck_require__(12781).Stream); +var crypto = __nccwpck_require__(6113); +var mime = __nccwpck_require__(43583); +var asynckit = __nccwpck_require__(14812); +var setToStringTag = __nccwpck_require__(11770); +var hasOwn = __nccwpck_require__(62157); +var populate = __nccwpck_require__(47027); + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; // eslint-disable-line no-param-reassign + for (var option in options) { // eslint-disable-line no-restricted-syntax + this[option] = options[option]; + } +} + +// make it a Stream +util.inherits(FormData, CombinedStream); + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function (field, value, options) { + options = options || {}; // eslint-disable-line no-param-reassign + + // allow filename as single option + if (typeof options === 'string') { + options = { filename: options }; // eslint-disable-line no-param-reassign + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value === 'number' || value == null) { + value = String(value); // eslint-disable-line no-param-reassign + } + + // https://github.com/felixge/node-form-data/issues/38 + if (Array.isArray(value)) { + /* + * Please convert your array into string + * the way web server expects it + */ + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function (header, value, options) { + var valueLength = 0; + + /* + * used w/ getLengthSync(), when length is known. + * e.g. for streaming directly from a remote server, + * w/ a known file a size, and not wanting to wait for + * incoming file to finish to get its size. + */ + if (options.knownLength != null) { + valueLength += Number(options.knownLength); + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response or not a stream + if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function (value, callback) { + if (hasOwn(value, 'fd')) { + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function (err, stat) { + if (err) { + callback(err); + return; + } + + // update final size based on the range options + var fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (hasOwn(value, 'httpVersion')) { + callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return + + // or request stream http://github.com/mikeal/request + } else if (hasOwn(value, 'httpModule')) { + // wait till response come back + value.on('response', function (response) { + value.pause(); + callback(null, Number(response.headers['content-length'])); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); // eslint-disable-line callback-return + } +}; + +FormData.prototype._multiPartHeader = function (field, value, options) { + /* + * custom header specified (as string)? + * it becomes responsible for boundary + * (e.g. to handle extra CRLFs on .NET servers) + */ + if (typeof options.header === 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header === 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { // eslint-disable-line no-restricted-syntax + if (hasOwn(headers, prop)) { + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return + var filename; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || (value && (value.name || value.path))) { + /* + * custom filename take precedence + * formidable and the browser add a name property + * fs- and request- streams have path property + */ + filename = path.basename(options.filename || (value && (value.name || value.path))); + } else if (value && value.readable && hasOwn(value, 'httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } + + if (filename) { + return 'filename="' + filename + '"'; + } +}; + +FormData.prototype._getContentType = function (value, options) { + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && value && typeof value === 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function () { + return function (next) { + var footer = FormData.LINE_BREAK; + + var lastPart = this._streams.length === 0; + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function () { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function (userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { // eslint-disable-line no-restricted-syntax + if (hasOwn(userHeaders, header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.setBoundary = function (boundary) { + if (typeof boundary !== 'string') { + throw new TypeError('FormData boundary must be a string'); + } + this._boundary = boundary; +}; + +FormData.prototype.getBoundary = function () { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype.getBuffer = function () { + var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap + var boundary = this.getBoundary(); + + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + // Add content to the buffer. + if (Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); + } else { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); + } + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); + } + } + } + + // Add the footer and return the Buffer object. + return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); +}; + +FormData.prototype._generateBoundary = function () { + // This generates a 50 character boundary similar to those used by Firefox. + + // They are optimized for boyer-moore parsing. + this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually and add it as knownLength option +FormData.prototype.getLengthSync = function () { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + /* + * Some async length retrievers are present + * therefore synchronous length calculation is false. + * Please use getLength(callback) to get proper length + */ + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function () { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function (cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function (length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function (params, cb) { + var request; + var options; + var defaults = { method: 'post' }; + + // parse provided url if it's string or treat it as options object + if (typeof params === 'string') { + params = parseUrl(params); // eslint-disable-line no-param-reassign + /* eslint sort-keys: 0 */ + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + } else { // use custom params + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol === 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol === 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function (err, length) { + if (err && err !== 'Unknown stream') { + this._error(err); + return; + } + + // add content length + if (length) { + request.setHeader('Content-Length', length); + } + + this.pipe(request); + if (cb) { + var onResponse; + + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); + + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function (err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; +setToStringTag(FormData.prototype, 'FormData'); + +// Public API +module.exports = FormData; + + +/***/ }), + +/***/ 47027: +/***/ ((module) => { + +"use strict"; + + +// populates missing values +module.exports = function (dst, src) { + Object.keys(src).forEach(function (prop) { + dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign + }); + + return dst; +}; + + +/***/ }), + +/***/ 9417: +/***/ ((module) => { + +"use strict"; + +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + + +/***/ }), + +/***/ 26463: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + + +/***/ }), + +/***/ 83682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var register = __nccwpck_require__(44670); +var addHook = __nccwpck_require__(5549); +var removeHook = __nccwpck_require__(6819); + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind; +var bindable = bind.bind(bind); + +function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); +} + +function HookSingular() { + var singularHookName = "h"; + var singularHookState = { + registry: {}, + }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; +} + +function HookCollection() { + var state = { + registry: {}, + }; + + var hook = register.bind(null, state); + bindApi(hook, state); + + return hook; +} + +var collectionHookDeprecationMessageDisplayed = false; +function Hook() { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; + } + return HookCollection(); +} + +Hook.Singular = HookSingular.bind(); +Hook.Collection = HookCollection.bind(); + +module.exports = Hook; +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook; +module.exports.Singular = Hook.Singular; +module.exports.Collection = Hook.Collection; + + +/***/ }), + +/***/ 5549: +/***/ ((module) => { + +module.exports = addHook; + +function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; + } + + if (kind === "before") { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)); + }; + } + + if (kind === "after") { + hook = function (method, options) { + var result; + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_; + return orig(result, options); + }) + .then(function () { + return result; + }); + }; + } + + if (kind === "error") { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options); + }); + }; + } + + state.registry[name].push({ + hook: hook, + orig: orig, + }); +} + + +/***/ }), + +/***/ 44670: +/***/ ((module) => { + +module.exports = register; + +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } + + if (!options) { + options = {}; + } + + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); + } + + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); + } + + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} + + +/***/ }), + +/***/ 6819: +/***/ ((module) => { + +module.exports = removeHook; + +function removeHook(state, name, method) { + if (!state.registry[name]) { + return; + } + + var index = state.registry[name] + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); + + if (index === -1) { + return; + } + + state.registry[name].splice(index, 1); +} + + +/***/ }), + +/***/ 87558: +/***/ (function(module) { + +;(function (globalObject) { + 'use strict'; + +/* + * bignumber.js v9.3.1 + * A JavaScript library for arbitrary-precision arithmetic. + * https://github.com/MikeMcl/bignumber.js + * Copyright (c) 2025 Michael Mclaughlin + * MIT Licensed. + * + * BigNumber.prototype methods | BigNumber methods + * | + * absoluteValue abs | clone + * comparedTo | config set + * decimalPlaces dp | DECIMAL_PLACES + * dividedBy div | ROUNDING_MODE + * dividedToIntegerBy idiv | EXPONENTIAL_AT + * exponentiatedBy pow | RANGE + * integerValue | CRYPTO + * isEqualTo eq | MODULO_MODE + * isFinite | POW_PRECISION + * isGreaterThan gt | FORMAT + * isGreaterThanOrEqualTo gte | ALPHABET + * isInteger | isBigNumber + * isLessThan lt | maximum max + * isLessThanOrEqualTo lte | minimum min + * isNaN | random + * isNegative | sum + * isPositive | + * isZero | + * minus | + * modulo mod | + * multipliedBy times | + * negated | + * plus | + * precision sd | + * shiftedBy | + * squareRoot sqrt | + * toExponential | + * toFixed | + * toFormat | + * toFraction | + * toJSON | + * toNumber | + * toPrecision | + * toString | + * valueOf | + * + */ + + + var BigNumber, + isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, + mathceil = Math.ceil, + mathfloor = Math.floor, + + bignumberError = '[BigNumber Error] ', + tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ', + + BASE = 1e14, + LOG_BASE = 14, + MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 + // MAX_INT32 = 0x7fffffff, // 2^31 - 1 + POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], + SQRT_BASE = 1e7, + + // EDITABLE + // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and + // the arguments to toExponential, toFixed, toFormat, and toPrecision. + MAX = 1E9; // 0 to MAX_INT32 + + + /* + * Create and return a BigNumber constructor. + */ + function clone(configObject) { + var div, convertBase, parseNumeric, + P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null }, + ONE = new BigNumber(1), + + + //----------------------------- EDITABLE CONFIG DEFAULTS ------------------------------- + + + // The default values below must be integers within the inclusive ranges stated. + // The values can also be changed at run-time using BigNumber.set. + + // The maximum number of decimal places for operations involving division. + DECIMAL_PLACES = 20, // 0 to MAX + + // The rounding mode used when rounding to the above decimal places, and when using + // toExponential, toFixed, toFormat and toPrecision, and round (default value). + // UP 0 Away from zero. + // DOWN 1 Towards zero. + // CEIL 2 Towards +Infinity. + // FLOOR 3 Towards -Infinity. + // HALF_UP 4 Towards nearest neighbour. If equidistant, up. + // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + ROUNDING_MODE = 4, // 0 to 8 + + // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] + + // The exponent value at and beneath which toString returns exponential notation. + // Number type: -7 + TO_EXP_NEG = -7, // 0 to -MAX + + // The exponent value at and above which toString returns exponential notation. + // Number type: 21 + TO_EXP_POS = 21, // 0 to MAX + + // RANGE : [MIN_EXP, MAX_EXP] + + // The minimum exponent value, beneath which underflow to zero occurs. + // Number type: -324 (5e-324) + MIN_EXP = -1e7, // -1 to -MAX + + // The maximum exponent value, above which overflow to Infinity occurs. + // Number type: 308 (1.7976931348623157e+308) + // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. + MAX_EXP = 1e7, // 1 to MAX + + // Whether to use cryptographically-secure random number generation, if available. + CRYPTO = false, // true or false + + // The modulo mode used when calculating the modulus: a mod n. + // The quotient (q = a / n) is calculated according to the corresponding rounding mode. + // The remainder (r) is calculated as: r = a - n * q. + // + // UP 0 The remainder is positive if the dividend is negative, else is negative. + // DOWN 1 The remainder has the same sign as the dividend. + // This modulo mode is commonly known as 'truncated division' and is + // equivalent to (a % n) in JavaScript. + // FLOOR 3 The remainder has the same sign as the divisor (Python %). + // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. + // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). + // The remainder is always positive. + // + // The truncated division, floored division, Euclidian division and IEEE 754 remainder + // modes are commonly used for the modulus operation. + // Although the other rounding modes can also be used, they may not give useful results. + MODULO_MODE = 1, // 0 to 9 + + // The maximum number of significant digits of the result of the exponentiatedBy operation. + // If POW_PRECISION is 0, there will be unlimited significant digits. + POW_PRECISION = 0, // 0 to MAX + + // The format specification used by the BigNumber.prototype.toFormat method. + FORMAT = { + prefix: '', + groupSize: 3, + secondaryGroupSize: 0, + groupSeparator: ',', + decimalSeparator: '.', + fractionGroupSize: 0, + fractionGroupSeparator: '\xA0', // non-breaking space + suffix: '' + }, + + // The alphabet used for base conversion. It must be at least 2 characters long, with no '+', + // '-', '.', whitespace, or repeated character. + // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_' + ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz', + alphabetHasNormalDecimalDigits = true; + + + //------------------------------------------------------------------------------------------ + + + // CONSTRUCTOR + + + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * v {number|string|BigNumber} A numeric value. + * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. + */ + function BigNumber(v, b) { + var alphabet, c, caseChanged, e, i, isNum, len, str, + x = this; + + // Enable constructor call without `new`. + if (!(x instanceof BigNumber)) return new BigNumber(v, b); + + if (b == null) { + + if (v && v._isBigNumber === true) { + x.s = v.s; + + if (!v.c || v.e > MAX_EXP) { + x.c = x.e = null; + } else if (v.e < MIN_EXP) { + x.c = [x.e = 0]; + } else { + x.e = v.e; + x.c = v.c.slice(); + } + + return; + } + + if ((isNum = typeof v == 'number') && v * 0 == 0) { + + // Use `1 / n` to handle minus zero also. + x.s = 1 / v < 0 ? (v = -v, -1) : 1; + + // Fast path for integers, where n < 2147483648 (2**31). + if (v === ~~v) { + for (e = 0, i = v; i >= 10; i /= 10, e++); + + if (e > MAX_EXP) { + x.c = x.e = null; + } else { + x.e = e; + x.c = [v]; + } + + return; + } + + str = String(v); + } else { + + if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum); + + x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1; + } + + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); + + // Exponential form? + if ((i = str.search(/e/i)) > 0) { + + // Determine exponent. + if (e < 0) e = i; + e += +str.slice(i + 1); + str = str.substring(0, i); + } else if (e < 0) { + + // Integer. + e = str.length; + } + + } else { + + // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + intCheck(b, 2, ALPHABET.length, 'Base'); + + // Allow exponential notation to be used with base 10 argument, while + // also rounding to DECIMAL_PLACES as with other bases. + if (b == 10 && alphabetHasNormalDecimalDigits) { + x = new BigNumber(v); + return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE); + } + + str = String(v); + + if (isNum = typeof v == 'number') { + + // Avoid potential interpretation of Infinity and NaN as base 44+ values. + if (v * 0 != 0) return parseNumeric(x, str, isNum, b); + + x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1; + + // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' + if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) { + throw Error + (tooManyDigits + v); + } + } else { + x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1; + } + + alphabet = ALPHABET.slice(0, b); + e = i = 0; + + // Check that str is a valid base b number. + // Don't use RegExp, so alphabet can contain special characters. + for (len = str.length; i < len; i++) { + if (alphabet.indexOf(c = str.charAt(i)) < 0) { + if (c == '.') { + + // If '.' is not the first character and it has not be found before. + if (i > e) { + e = len; + continue; + } + } else if (!caseChanged) { + + // Allow e.g. hexadecimal 'FF' as well as 'ff'. + if (str == str.toUpperCase() && (str = str.toLowerCase()) || + str == str.toLowerCase() && (str = str.toUpperCase())) { + caseChanged = true; + i = -1; + e = 0; + continue; + } + } + + return parseNumeric(x, String(v), isNum, b); + } + } + + // Prevent later check for length on converted number. + isNum = false; + str = convertBase(str, b, 10, x.s); + + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); + else e = str.length; + } + + // Determine leading zeros. + for (i = 0; str.charCodeAt(i) === 48; i++); + + // Determine trailing zeros. + for (len = str.length; str.charCodeAt(--len) === 48;); + + if (str = str.slice(i, ++len)) { + len -= i; + + // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' + if (isNum && BigNumber.DEBUG && + len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) { + throw Error + (tooManyDigits + (x.s * v)); + } + + // Overflow? + if ((e = e - i - 1) > MAX_EXP) { + + // Infinity. + x.c = x.e = null; + + // Underflow? + } else if (e < MIN_EXP) { + + // Zero. + x.c = [x.e = 0]; + } else { + x.e = e; + x.c = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first element of the coefficient array. + i = (e + 1) % LOG_BASE; + if (e < 0) i += LOG_BASE; // i < 1 + + if (i < len) { + if (i) x.c.push(+str.slice(0, i)); + + for (len -= LOG_BASE; i < len;) { + x.c.push(+str.slice(i, i += LOG_BASE)); + } + + i = LOG_BASE - (str = str.slice(i)).length; + } else { + i -= len; + } + + for (; i--; str += '0'); + x.c.push(+str); + } + } else { + + // Zero. + x.c = [x.e = 0]; + } + } + + + // CONSTRUCTOR PROPERTIES + + + BigNumber.clone = clone; + + BigNumber.ROUND_UP = 0; + BigNumber.ROUND_DOWN = 1; + BigNumber.ROUND_CEIL = 2; + BigNumber.ROUND_FLOOR = 3; + BigNumber.ROUND_HALF_UP = 4; + BigNumber.ROUND_HALF_DOWN = 5; + BigNumber.ROUND_HALF_EVEN = 6; + BigNumber.ROUND_HALF_CEIL = 7; + BigNumber.ROUND_HALF_FLOOR = 8; + BigNumber.EUCLID = 9; + + + /* + * Configure infrequently-changing library-wide settings. + * + * Accept an object with the following optional properties (if the value of a property is + * a number, it must be an integer within the inclusive range stated): + * + * DECIMAL_PLACES {number} 0 to MAX + * ROUNDING_MODE {number} 0 to 8 + * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] + * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] + * CRYPTO {boolean} true or false + * MODULO_MODE {number} 0 to 9 + * POW_PRECISION {number} 0 to MAX + * ALPHABET {string} A string of two or more unique characters which does + * not contain '.'. + * FORMAT {object} An object with some of the following properties: + * prefix {string} + * groupSize {number} + * secondaryGroupSize {number} + * groupSeparator {string} + * decimalSeparator {string} + * fractionGroupSize {number} + * fractionGroupSeparator {string} + * suffix {string} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined, except for ALPHABET. + * + * Return an object with the properties current values. + */ + BigNumber.config = BigNumber.set = function (obj) { + var p, v; + + if (obj != null) { + + if (typeof obj == 'object') { + + // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. + // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) { + v = obj[p]; + intCheck(v, 0, MAX, p); + DECIMAL_PLACES = v; + } + + // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. + // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) { + v = obj[p]; + intCheck(v, 0, 8, p); + ROUNDING_MODE = v; + } + + // EXPONENTIAL_AT {number|number[]} + // Integer, -MAX to MAX inclusive or + // [integer -MAX to 0 inclusive, 0 to MAX inclusive]. + // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) { + v = obj[p]; + if (v && v.pop) { + intCheck(v[0], -MAX, 0, p); + intCheck(v[1], 0, MAX, p); + TO_EXP_NEG = v[0]; + TO_EXP_POS = v[1]; + } else { + intCheck(v, -MAX, MAX, p); + TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v); + } + } + + // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. + // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}' + if (obj.hasOwnProperty(p = 'RANGE')) { + v = obj[p]; + if (v && v.pop) { + intCheck(v[0], -MAX, -1, p); + intCheck(v[1], 1, MAX, p); + MIN_EXP = v[0]; + MAX_EXP = v[1]; + } else { + intCheck(v, -MAX, MAX, p); + if (v) { + MIN_EXP = -(MAX_EXP = v < 0 ? -v : v); + } else { + throw Error + (bignumberError + p + ' cannot be zero: ' + v); + } + } + } + + // CRYPTO {boolean} true or false. + // '[BigNumber Error] CRYPTO not true or false: {v}' + // '[BigNumber Error] crypto unavailable' + if (obj.hasOwnProperty(p = 'CRYPTO')) { + v = obj[p]; + if (v === !!v) { + if (v) { + if (typeof crypto != 'undefined' && crypto && + (crypto.getRandomValues || crypto.randomBytes)) { + CRYPTO = v; + } else { + CRYPTO = !v; + throw Error + (bignumberError + 'crypto unavailable'); + } + } else { + CRYPTO = v; + } + } else { + throw Error + (bignumberError + p + ' not true or false: ' + v); + } + } + + // MODULO_MODE {number} Integer, 0 to 9 inclusive. + // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'MODULO_MODE')) { + v = obj[p]; + intCheck(v, 0, 9, p); + MODULO_MODE = v; + } + + // POW_PRECISION {number} Integer, 0 to MAX inclusive. + // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'POW_PRECISION')) { + v = obj[p]; + intCheck(v, 0, MAX, p); + POW_PRECISION = v; + } + + // FORMAT {object} + // '[BigNumber Error] FORMAT not an object: {v}' + if (obj.hasOwnProperty(p = 'FORMAT')) { + v = obj[p]; + if (typeof v == 'object') FORMAT = v; + else throw Error + (bignumberError + p + ' not an object: ' + v); + } + + // ALPHABET {string} + // '[BigNumber Error] ALPHABET invalid: {v}' + if (obj.hasOwnProperty(p = 'ALPHABET')) { + v = obj[p]; + + // Disallow if less than two characters, + // or if it contains '+', '-', '.', whitespace, or a repeated character. + if (typeof v == 'string' && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) { + alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789'; + ALPHABET = v; + } else { + throw Error + (bignumberError + p + ' invalid: ' + v); + } + } + + } else { + + // '[BigNumber Error] Object expected: {v}' + throw Error + (bignumberError + 'Object expected: ' + obj); + } + } + + return { + DECIMAL_PLACES: DECIMAL_PLACES, + ROUNDING_MODE: ROUNDING_MODE, + EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS], + RANGE: [MIN_EXP, MAX_EXP], + CRYPTO: CRYPTO, + MODULO_MODE: MODULO_MODE, + POW_PRECISION: POW_PRECISION, + FORMAT: FORMAT, + ALPHABET: ALPHABET + }; + }; + + + /* + * Return true if v is a BigNumber instance, otherwise return false. + * + * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. + * + * v {any} + * + * '[BigNumber Error] Invalid BigNumber: {v}' + */ + BigNumber.isBigNumber = function (v) { + if (!v || v._isBigNumber !== true) return false; + if (!BigNumber.DEBUG) return true; + + var i, n, + c = v.c, + e = v.e, + s = v.s; + + out: if ({}.toString.call(c) == '[object Array]') { + + if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) { + + // If the first element is zero, the BigNumber value must be zero. + if (c[0] === 0) { + if (e === 0 && c.length === 1) return true; + break out; + } + + // Calculate number of digits that c[0] should have, based on the exponent. + i = (e + 1) % LOG_BASE; + if (i < 1) i += LOG_BASE; + + // Calculate number of digits of c[0]. + //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) { + if (String(c[0]).length == i) { + + for (i = 0; i < c.length; i++) { + n = c[i]; + if (n < 0 || n >= BASE || n !== mathfloor(n)) break out; + } + + // Last element cannot be zero, unless it is the only element. + if (n !== 0) return true; + } + } + + // Infinity/NaN + } else if (c === null && e === null && (s === null || s === 1 || s === -1)) { + return true; + } + + throw Error + (bignumberError + 'Invalid BigNumber: ' + v); + }; + + + /* + * Return a new BigNumber whose value is the maximum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.maximum = BigNumber.max = function () { + return maxOrMin(arguments, -1); + }; + + + /* + * Return a new BigNumber whose value is the minimum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.minimum = BigNumber.min = function () { + return maxOrMin(arguments, 1); + }; + + + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' + * '[BigNumber Error] crypto unavailable' + */ + BigNumber.random = (function () { + var pow2_53 = 0x20000000000000; + + // Return a 53 bit integer n, where 0 <= n < 9007199254740992. + // Check if Math.random() produces more than 32 bits of randomness. + // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. + // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. + var random53bitInt = (Math.random() * pow2_53) & 0x1fffff + ? function () { return mathfloor(Math.random() * pow2_53); } + : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + + (Math.random() * 0x800000 | 0); }; + + return function (dp) { + var a, b, e, k, v, + i = 0, + c = [], + rand = new BigNumber(ONE); + + if (dp == null) dp = DECIMAL_PLACES; + else intCheck(dp, 0, MAX); + + k = mathceil(dp / LOG_BASE); + + if (CRYPTO) { + + // Browsers supporting crypto.getRandomValues. + if (crypto.getRandomValues) { + + a = crypto.getRandomValues(new Uint32Array(k *= 2)); + + for (; i < k;) { + + // 53 bits: + // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) + // 11111 11111111 11111111 11111111 11100000 00000000 00000000 + // ((Math.pow(2, 32) - 1) >>> 11).toString(2) + // 11111 11111111 11111111 + // 0x20000 is 2^21. + v = a[i] * 0x20000 + (a[i + 1] >>> 11); + + // Rejection sampling: + // 0 <= v < 9007199254740992 + // Probability that v >= 9e15, is + // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 + if (v >= 9e15) { + b = crypto.getRandomValues(new Uint32Array(2)); + a[i] = b[0]; + a[i + 1] = b[1]; + } else { + + // 0 <= v <= 8999999999999999 + // 0 <= (v % 1e14) <= 99999999999999 + c.push(v % 1e14); + i += 2; + } + } + i = k / 2; + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + a = crypto.randomBytes(k *= 7); + + for (; i < k;) { + + // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 + // 0x100000000 is 2^32, 0x1000000 is 2^24 + // 11111 11111111 11111111 11111111 11111111 11111111 11111111 + // 0 <= v < 9007199254740992 + v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) + + (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) + + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]; + + if (v >= 9e15) { + crypto.randomBytes(7).copy(a, i); + } else { + + // 0 <= (v % 1e14) <= 99999999999999 + c.push(v % 1e14); + i += 7; + } + } + i = k / 7; + } else { + CRYPTO = false; + throw Error + (bignumberError + 'crypto unavailable'); + } + } + + // Use Math.random. + if (!CRYPTO) { + + for (; i < k;) { + v = random53bitInt(); + if (v < 9e15) c[i++] = v % 1e14; + } + } + + k = c[--i]; + dp %= LOG_BASE; + + // Convert trailing digits to zeros according to dp. + if (k && dp) { + v = POWS_TEN[LOG_BASE - dp]; + c[i] = mathfloor(k / v) * v; + } + + // Remove trailing elements which are zero. + for (; c[i] === 0; c.pop(), i--); + + // Zero? + if (i < 0) { + c = [e = 0]; + } else { + + // Remove leading elements which are zero and adjust exponent accordingly. + for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE); + + // Count the digits of the first element of c to determine leading zeros, and... + for (i = 1, v = c[0]; v >= 10; v /= 10, i++); + + // adjust the exponent accordingly. + if (i < LOG_BASE) e -= LOG_BASE - i; + } + + rand.e = e; + rand.c = c; + return rand; + }; + })(); + + + /* + * Return a BigNumber whose value is the sum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.sum = function () { + var i = 1, + args = arguments, + sum = new BigNumber(args[0]); + for (; i < args.length;) sum = sum.plus(args[i++]); + return sum; + }; + + + // PRIVATE FUNCTIONS + + + // Called by BigNumber and BigNumber.prototype.toString. + convertBase = (function () { + var decimal = '0123456789'; + + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. toBaseOut('255', 10, 16) returns [15, 15]. + * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. + */ + function toBaseOut(str, baseIn, baseOut, alphabet) { + var j, + arr = [0], + arrL, + i = 0, + len = str.length; + + for (; i < len;) { + for (arrL = arr.length; arrL--; arr[arrL] *= baseIn); + + arr[0] += alphabet.indexOf(str.charAt(i++)); + + for (j = 0; j < arr.length; j++) { + + if (arr[j] > baseOut - 1) { + if (arr[j + 1] == null) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; + } + } + } + + return arr.reverse(); + } + + // Convert a numeric string of baseIn to a numeric string of baseOut. + // If the caller is toString, we are converting from base 10 to baseOut. + // If the caller is BigNumber, we are converting from baseIn to base 10. + return function (str, baseIn, baseOut, sign, callerIsToString) { + var alphabet, d, e, k, r, x, xc, y, + i = str.indexOf('.'), + dp = DECIMAL_PLACES, + rm = ROUNDING_MODE; + + // Non-integer. + if (i >= 0) { + k = POW_PRECISION; + + // Unlimited precision. + POW_PRECISION = 0; + str = str.replace('.', ''); + y = new BigNumber(baseIn); + x = y.pow(str.length - i); + POW_PRECISION = k; + + // Convert str as if an integer, then restore the fraction part by dividing the + // result by its base raised to a power. + + y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'), + 10, baseOut, decimal); + y.e = y.c.length; + } + + // Convert the number as integer. + + xc = toBaseOut(str, baseIn, baseOut, callerIsToString + ? (alphabet = ALPHABET, decimal) + : (alphabet = decimal, ALPHABET)); + + // xc now represents str as an integer and converted to baseOut. e is the exponent. + e = k = xc.length; + + // Remove trailing zeros. + for (; xc[--k] == 0; xc.pop()); + + // Zero? + if (!xc[0]) return alphabet.charAt(0); + + // Does str represent an integer? If so, no need for the division. + if (i < 0) { + --e; + } else { + x.c = xc; + x.e = e; + + // The sign is needed for correct rounding. + x.s = sign; + x = div(x, y, dp, rm, baseOut); + xc = x.c; + r = x.r; + e = x.e; + } + + // xc now represents str converted to baseOut. + + // The index of the rounding digit. + d = e + dp + 1; + + // The rounding digit: the digit to the right of the digit that may be rounded up. + i = xc[d]; + + // Look at the rounding digits and mode to determine whether to round up. + + k = baseOut / 2; + r = r || d < 0 || xc[d + 1] != null; + + r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 || + rm == (x.s < 0 ? 8 : 7)); + + // If the index of the rounding digit is not greater than zero, or xc represents + // zero, then the result of the base conversion is zero or, if rounding up, a value + // such as 0.00001. + if (d < 1 || !xc[0]) { + + // 1^-dp or 0 + str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0); + } else { + + // Truncate xc to the required number of decimal places. + xc.length = d; + + // Round up? + if (r) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for (--baseOut; ++xc[--d] > baseOut;) { + xc[d] = 0; + + if (!d) { + ++e; + xc = [1].concat(xc); + } + } + } + + // Determine trailing zeros. + for (k = xc.length; !xc[--k];); + + // E.g. [4, 11, 15] becomes 4bf. + for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++])); + + // Add leading zeros, decimal point and trailing zeros as required. + str = toFixedPoint(str, e, alphabet.charAt(0)); + } + + // The caller will add the sign. + return str; + }; + })(); + + + // Perform division in the specified base. Called by div and convertBase. + div = (function () { + + // Assume non-zero x and k. + function multiply(x, k, base) { + var m, temp, xlo, xhi, + carry = 0, + i = x.length, + klo = k % SQRT_BASE, + khi = k / SQRT_BASE | 0; + + for (x = x.slice(); i--;) { + xlo = x[i] % SQRT_BASE; + xhi = x[i] / SQRT_BASE | 0; + m = khi * xlo + xhi * klo; + temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry; + carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi; + x[i] = temp % base; + } + + if (carry) x = [carry].concat(x); + + return x; + } + + function compare(a, b, aL, bL) { + var i, cmp; + + if (aL != bL) { + cmp = aL > bL ? 1 : -1; + } else { + + for (i = cmp = 0; i < aL; i++) { + + if (a[i] != b[i]) { + cmp = a[i] > b[i] ? 1 : -1; + break; + } + } + } + + return cmp; + } + + function subtract(a, b, aL, base) { + var i = 0; + + // Subtract b from a. + for (; aL--;) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for (; !a[0] && a.length > 1; a.splice(0, 1)); + } + + // x: dividend, y: divisor. + return function (x, y, dp, rm, base) { + var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, + yL, yz, + s = x.s == y.s ? 1 : -1, + xc = x.c, + yc = y.c; + + // Either NaN, Infinity or 0? + if (!xc || !xc[0] || !yc || !yc[0]) { + + return new BigNumber( + + // Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : + + // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. + xc && xc[0] == 0 || !yc ? s * 0 : s / 0 + ); + } + + q = new BigNumber(s); + qc = q.c = []; + e = x.e - y.e; + s = dp + e + 1; + + if (!base) { + base = BASE; + e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE); + s = s / LOG_BASE | 0; + } + + // Result exponent may be one less then the current value of e. + // The coefficients of the BigNumbers from convertBase may have trailing zeros. + for (i = 0; yc[i] == (xc[i] || 0); i++); + + if (yc[i] > (xc[i] || 0)) e--; + + if (s < 0) { + qc.push(1); + more = true; + } else { + xL = xc.length; + yL = yc.length; + i = 0; + s += 2; + + // Normalise xc and yc so highest order digit of yc is >= base / 2. + + n = mathfloor(base / (yc[0] + 1)); + + // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1. + // if (n > 1 || n++ == 1 && yc[0] < base / 2) { + if (n > 1) { + yc = multiply(yc, n, base); + xc = multiply(xc, n, base); + yL = yc.length; + xL = xc.length; + } + + xi = yL; + rem = xc.slice(0, yL); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for (; remL < yL; rem[remL++] = 0); + yz = yc.slice(); + yz = [0].concat(yz); + yc0 = yc[0]; + if (yc[1] >= base / 2) yc0++; + // Not necessary, but to prevent trial digit n > base, when using base 3. + // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15; + + do { + n = 0; + + // Compare divisor and remainder. + cmp = compare(yc, rem, yL, remL); + + // If divisor < remainder. + if (cmp < 0) { + + // Calculate trial digit, n. + + rem0 = rem[0]; + if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); + + // n is how many times the divisor goes into the current remainder. + n = mathfloor(rem0 / yc0); + + // Algorithm: + // product = divisor multiplied by trial digit (n). + // Compare product and remainder. + // If product is greater than remainder: + // Subtract divisor from product, decrement trial digit. + // Subtract product from remainder. + // If product was less than remainder at the last compare: + // Compare new remainder and divisor. + // If remainder is greater than divisor: + // Subtract divisor from remainder, increment trial digit. + + if (n > 1) { + + // n may be > base only when base is 3. + if (n >= base) n = base - 1; + + // product = divisor * trial digit. + prod = multiply(yc, n, base); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + // If product > remainder then trial digit n too high. + // n is 1 too high about 5% of the time, and is not known to have + // ever been more than 1 too high. + while (compare(prod, rem, prodL, remL) == 1) { + n--; + + // Subtract divisor from product. + subtract(prod, yL < prodL ? yz : yc, prodL, base); + prodL = prod.length; + cmp = 1; + } + } else { + + // n is 0 or 1, cmp is -1. + // If n is 0, there is no need to compare yc and rem again below, + // so change cmp to 1 to avoid it. + // If n is 1, leave cmp as -1, so yc and rem are compared again. + if (n == 0) { + + // divisor < remainder, so n must be at least 1. + cmp = n = 1; + } + + // product = divisor + prod = yc.slice(); + prodL = prod.length; + } + + if (prodL < remL) prod = [0].concat(prod); + + // Subtract product from remainder. + subtract(rem, prod, remL, base); + remL = rem.length; + + // If product was < remainder. + if (cmp == -1) { + + // Compare divisor and new remainder. + // If divisor < new remainder, subtract divisor from remainder. + // Trial digit n too low. + // n is 1 too low about 5% of the time, and very rarely 2 too low. + while (compare(yc, rem, yL, remL) < 1) { + n++; + + // Subtract divisor from remainder. + subtract(rem, yL < remL ? yz : yc, remL, base); + remL = rem.length; + } + } + } else if (cmp === 0) { + n++; + rem = [0]; + } // else cmp === 1 and n will be 0 + + // Add the next digit, n, to the result array. + qc[i++] = n; + + // Update the remainder. + if (rem[0]) { + rem[remL++] = xc[xi] || 0; + } else { + rem = [xc[xi]]; + remL = 1; + } + } while ((xi++ < xL || rem[0] != null) && s--); + + more = rem[0] != null; + + // Leading zero? + if (!qc[0]) qc.splice(0, 1); + } + + if (base == BASE) { + + // To calculate q.e, first get the number of digits of qc[0]. + for (i = 1, s = qc[0]; s >= 10; s /= 10, i++); + + round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more); + + // Caller is convertBase. + } else { + q.e = e; + q.r = +more; + } + + return q; + }; + })(); + + + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. + * + * n: a BigNumber. + * i: the index of the last digit required (i.e. the digit that may be rounded up). + * rm: the rounding mode. + * id: 1 (toExponential) or 2 (toPrecision). + */ + function format(n, i, rm, id) { + var c0, e, ne, len, str; + + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + if (!n.c) return n.toString(); + + c0 = n.c[0]; + ne = n.e; + + if (i == null) { + str = coeffToString(n.c); + str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) + ? toExponential(str, ne) + : toFixedPoint(str, ne, '0'); + } else { + n = round(new BigNumber(n), i, rm); + + // n.e may have changed if the value was rounded up. + e = n.e; + + str = coeffToString(n.c); + len = str.length; + + // toPrecision returns exponential notation if the number of significant digits + // specified is less than the number of digits necessary to represent the integer + // part of the value in fixed-point notation. + + // Exponential notation. + if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) { + + // Append zeros? + for (; len < i; str += '0', len++); + str = toExponential(str, e); + + // Fixed-point notation. + } else { + i -= ne + (id === 2 && e > ne); + str = toFixedPoint(str, e, '0'); + + // Append zeros? + if (e + 1 > len) { + if (--i > 0) for (str += '.'; i--; str += '0'); + } else { + i += e - len; + if (i > 0) { + if (e + 1 == len) str += '.'; + for (; i--; str += '0'); + } + } + } + } + + return n.s < 0 && c0 ? '-' + str : str; + } + + + // Handle BigNumber.max and BigNumber.min. + // If any number is NaN, return NaN. + function maxOrMin(args, n) { + var k, y, + i = 1, + x = new BigNumber(args[0]); + + for (; i < args.length; i++) { + y = new BigNumber(args[i]); + if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) { + x = y; + } + } + + return x; + } + + + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. + */ + function normalise(n, c, e) { + var i = 1, + j = c.length; + + // Remove trailing zeros. + for (; !c[--j]; c.pop()); + + // Calculate the base 10 exponent. First get the number of digits of c[0]. + for (j = c[0]; j >= 10; j /= 10, i++); + + // Overflow? + if ((e = i + e * LOG_BASE - 1) > MAX_EXP) { + + // Infinity. + n.c = n.e = null; + + // Underflow? + } else if (e < MIN_EXP) { + + // Zero. + n.c = [n.e = 0]; + } else { + n.e = e; + n.c = c; + } + + return n; + } + + + // Handle values that fail the validity test in BigNumber. + parseNumeric = (function () { + var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, + dotAfter = /^([^.]+)\.$/, + dotBefore = /^\.([^.]+)$/, + isInfinityOrNaN = /^-?(Infinity|NaN)$/, + whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + + return function (x, str, isNum, b) { + var base, + s = isNum ? str : str.replace(whitespaceOrPlus, ''); + + // No exception on ±Infinity or NaN. + if (isInfinityOrNaN.test(s)) { + x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + } else { + if (!isNum) { + + // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i + s = s.replace(basePrefix, function (m, p1, p2) { + base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8; + return !b || b == base ? p1 : m; + }); + + if (b) { + base = b; + + // E.g. '1.' to '1', '.1' to '0.1' + s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1'); + } + + if (str != s) return new BigNumber(s, base); + } + + // '[BigNumber Error] Not a number: {n}' + // '[BigNumber Error] Not a base {b} number: {n}' + if (BigNumber.DEBUG) { + throw Error + (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); + } + + // NaN + x.s = null; + } + + x.c = x.e = null; + } + })(); + + + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. + */ + function round(x, sd, rm, r) { + var d, i, j, k, n, ni, rd, + xc = x.c, + pows10 = POWS_TEN; + + // if x is not Infinity or NaN... + if (xc) { + + // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. + // n is a base 1e14 number, the value of the element of array x.c containing rd. + // ni is the index of n within x.c. + // d is the number of digits of n. + // i is the index of rd within n including leading zeros. + // j is the actual index of rd within n (if < 0, rd is a leading zero). + out: { + + // Get the number of digits of the first element of xc. + for (d = 1, k = xc[0]; k >= 10; k /= 10, d++); + i = sd - d; + + // If the rounding digit is in the first element of xc... + if (i < 0) { + i += LOG_BASE; + j = sd; + n = xc[ni = 0]; + + // Get the rounding digit at index j of n. + rd = mathfloor(n / pows10[d - j - 1] % 10); + } else { + ni = mathceil((i + 1) / LOG_BASE); + + if (ni >= xc.length) { + + if (r) { + + // Needed by sqrt. + for (; xc.length <= ni; xc.push(0)); + n = rd = 0; + d = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + n = k = xc[ni]; + + // Get the number of digits of n. + for (d = 1; k >= 10; k /= 10, d++); + + // Get the index of rd within n. + i %= LOG_BASE; + + // Get the index of rd within n, adjusted for leading zeros. + // The number of leading zeros of n is given by LOG_BASE - d. + j = i - LOG_BASE + d; + + // Get the rounding digit at index j of n. + rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10); + } + } + + r = r || sd < 0 || + + // Are there any non-zero digits after the rounding digit? + // The expression n % pows10[d - j - 1] returns all digits of n to the right + // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. + xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]); + + r = rm < 4 + ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 || + rm == (x.s < 0 ? 8 : 7)); + + if (sd < 1 || !xc[0]) { + xc.length = 0; + + if (r) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE]; + x.e = -sd || 0; + } else { + + // Zero. + xc[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if (i == 0) { + xc.length = ni; + k = 1; + ni--; + } else { + xc.length = ni + 1; + k = pows10[LOG_BASE - i]; + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of n. + xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0; + } + + // Round up? + if (r) { + + for (; ;) { + + // If the digit to be rounded up is in the first element of xc... + if (ni == 0) { + + // i will be the length of xc[0] before k is added. + for (i = 1, j = xc[0]; j >= 10; j /= 10, i++); + j = xc[0] += k; + for (k = 1; j >= 10; j /= 10, k++); + + // if i != k the length has increased. + if (i != k) { + x.e++; + if (xc[0] == BASE) xc[0] = 1; + } + + break; + } else { + xc[ni] += k; + if (xc[ni] != BASE) break; + xc[ni--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for (i = xc.length; xc[--i] === 0; xc.pop()); + } + + // Overflow? Infinity. + if (x.e > MAX_EXP) { + x.c = x.e = null; + + // Underflow? Zero. + } else if (x.e < MIN_EXP) { + x.c = [x.e = 0]; + } + } + + return x; + } + -// pkg/dist-src/endpoints-to-methods.js -var endpointMethodsMap = /* @__PURE__ */ new Map(); -for (const [scope, endpoints] of Object.entries(endpoints_default)) { - for (const [methodName, endpoint] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); - const endpointDefaults = Object.assign( - { - method, - url - }, - defaults - ); - if (!endpointMethodsMap.has(scope)) { - endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + function valueOf(n) { + var str, + e = n.e; + + if (e === null) return n.toString(); + + str = coeffToString(n.c); + + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential(str, e) + : toFixedPoint(str, e, '0'); + + return n.s < 0 ? '-' + str : str; } - endpointMethodsMap.get(scope).set(methodName, { - scope, - methodName, - endpointDefaults, - decorations - }); - } -} -var handler = { - has({ scope }, methodName) { - return endpointMethodsMap.get(scope).has(methodName); - }, - getOwnPropertyDescriptor(target, methodName) { - return { - value: this.get(target, methodName), - // ensures method is in the cache - configurable: true, - writable: true, - enumerable: true + + + // PROTOTYPE/INSTANCE METHODS + + + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. + */ + P.absoluteValue = P.abs = function () { + var x = new BigNumber(this); + if (x.s < 0) x.s = 1; + return x; }; - }, - defineProperty(target, methodName, descriptor) { - Object.defineProperty(target.cache, methodName, descriptor); - return true; - }, - deleteProperty(target, methodName) { - delete target.cache[methodName]; - return true; - }, - ownKeys({ scope }) { - return [...endpointMethodsMap.get(scope).keys()]; - }, - set(target, methodName, value) { - return target.cache[methodName] = value; - }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; - } - const method = endpointMethodsMap.get(scope).get(methodName); - if (!method) { - return void 0; - } - const { endpointDefaults, decorations } = method; - if (decorations) { - cache[methodName] = decorate( - octokit, - scope, - methodName, - endpointDefaults, - decorations - ); - } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); - } - return cache[methodName]; - } -}; -function endpointsToMethods(octokit) { - const newMethods = {}; - for (const scope of endpointMethodsMap.keys()) { - newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); - } - return newMethods; -} -function decorate(octokit, scope, methodName, defaults, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults); - function withDecorations(...args) { - let options = requestWithDefaults.endpoint.merge(...args); - if (decorations.mapToData) { - options = Object.assign({}, options, { - data: options[decorations.mapToData], - [decorations.mapToData]: void 0 - }); - return requestWithDefaults(options); - } - if (decorations.renamed) { - const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn( - `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` - ); - } - if (decorations.deprecated) { - octokit.log.warn(decorations.deprecated); - } - if (decorations.renamedParameters) { - const options2 = requestWithDefaults.endpoint.merge(...args); - for (const [name, alias] of Object.entries( - decorations.renamedParameters - )) { - if (name in options2) { - octokit.log.warn( - `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` - ); - if (!(alias in options2)) { - options2[alias] = options2[name]; + + + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. + */ + P.comparedTo = function (y, b) { + return compare(this, new BigNumber(y, b)); + }; + + + /* + * If dp is undefined or null or true or false, return the number of decimal places of the + * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * + * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * [dp] {number} Decimal places: integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + */ + P.decimalPlaces = P.dp = function (dp, rm) { + var c, n, v, + x = this; + + if (dp != null) { + intCheck(dp, 0, MAX); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + return round(new BigNumber(x), dp + x.e + 1, rm); + } + + if (!(c = x.c)) return null; + n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE; + + // Subtract the number of trailing zeros of the last number. + if (v = c[v]) for (; v % 10 == 0; v /= 10, n--); + if (n < 0) n = 0; + + return n; + }; + + + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.dividedBy = P.div = function (y, b) { + return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); + }; + + + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). + */ + P.dividedToIntegerBy = P.idiv = function (y, b) { + return div(this, new BigNumber(y, b), 0, 1); + }; + + + /* + * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. + * + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are integers, otherwise it + * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. + * + * n {number|string|BigNumber} The exponent. An integer. + * [m] {number|string|BigNumber} The modulus. + * + * '[BigNumber Error] Exponent not an integer: {n}' + */ + P.exponentiatedBy = P.pow = function (n, m) { + var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, + x = this; + + n = new BigNumber(n); + + // Allow NaN and ±Infinity, but not other non-integers. + if (n.c && !n.isInteger()) { + throw Error + (bignumberError + 'Exponent not an integer: ' + valueOf(n)); + } + + if (m != null) m = new BigNumber(m); + + // Exponent of MAX_SAFE_INTEGER is 15. + nIsBig = n.e > 14; + + // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0. + if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) { + + // The sign of the result of pow when x is negative depends on the evenness of n. + // If +n overflows to ±Infinity, the evenness of n would be not be known. + y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n))); + return m ? y.mod(m) : y; + } + + nIsNeg = n.s < 0; + + if (m) { + + // x % m returns NaN if abs(m) is zero, or m is NaN. + if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN); + + isModExp = !nIsNeg && x.isInteger() && m.isInteger(); + + if (isModExp) x = x.mod(m); + + // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15. + // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15. + } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 + // [1, 240000000] + ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 + // [80000000000000] [99999750000000] + : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) { + + // If x is negative and n is odd, k = -0, else k = 0. + k = x.s < 0 && isOdd(n) ? -0 : 0; + + // If x >= 1, k = ±Infinity. + if (x.e > -1) k = 1 / k; + + // If n is negative return ±0, else return ±Infinity. + return new BigNumber(nIsNeg ? 1 / k : k); + + } else if (POW_PRECISION) { + + // Truncating each coefficient array to a length of k after each multiplication + // equates to truncating significant digits to POW_PRECISION + [28, 41], + // i.e. there will be a minimum of 28 guard digits retained. + k = mathceil(POW_PRECISION / LOG_BASE + 2); + } + + if (nIsBig) { + half = new BigNumber(0.5); + if (nIsNeg) n.s = 1; + nIsOdd = isOdd(n); + } else { + i = Math.abs(+valueOf(n)); + nIsOdd = i % 2; + } + + y = new BigNumber(ONE); + + // Performs 54 loop iterations for n of 9007199254740991. + for (; ;) { + + if (nIsOdd) { + y = y.times(x); + if (!y.c) break; + + if (k) { + if (y.c.length > k) y.c.length = k; + } else if (isModExp) { + y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m)); } - delete options2[name]; + } + + if (i) { + i = mathfloor(i / 2); + if (i === 0) break; + nIsOdd = i % 2; + } else { + n = n.times(half); + round(n, n.e + 1, 1); + + if (n.e > 14) { + nIsOdd = isOdd(n); + } else { + i = +valueOf(n); + if (i === 0) break; + nIsOdd = i % 2; + } + } + + x = x.times(x); + + if (k) { + if (x.c && x.c.length > k) x.c.length = k; + } else if (isModExp) { + x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m)); + } + } + + if (isModExp) return y; + if (nIsNeg) y = ONE.div(y); + + return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer + * using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' + */ + P.integerValue = function (rm) { + var n = new BigNumber(this); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + return round(n, n.e + 1, rm); + }; + + + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise return false. + */ + P.isEqualTo = P.eq = function (y, b) { + return compare(this, new BigNumber(y, b)) === 0; + }; + + + /* + * Return true if the value of this BigNumber is a finite number, otherwise return false. + */ + P.isFinite = function () { + return !!this.c; + }; + + + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise return false. + */ + P.isGreaterThan = P.gt = function (y, b) { + return compare(this, new BigNumber(y, b)) > 0; + }; + + + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise return false. + */ + P.isGreaterThanOrEqualTo = P.gte = function (y, b) { + return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0; + + }; + + + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. + */ + P.isInteger = function () { + return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; + }; + + + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise return false. + */ + P.isLessThan = P.lt = function (y, b) { + return compare(this, new BigNumber(y, b)) < 0; + }; + + + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise return false. + */ + P.isLessThanOrEqualTo = P.lte = function (y, b) { + return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0; + }; + + + /* + * Return true if the value of this BigNumber is NaN, otherwise return false. + */ + P.isNaN = function () { + return !this.s; + }; + + + /* + * Return true if the value of this BigNumber is negative, otherwise return false. + */ + P.isNegative = function () { + return this.s < 0; + }; + + + /* + * Return true if the value of this BigNumber is positive, otherwise return false. + */ + P.isPositive = function () { + return this.s > 0; + }; + + + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise return false. + */ + P.isZero = function () { + return !!this.c && this.c[0] == 0; + }; + + + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). + */ + P.minus = function (y, b) { + var i, j, t, xLTy, + x = this, + a = x.s; + + y = new BigNumber(y, b); + b = y.s; + + // Either NaN? + if (!a || !b) return new BigNumber(NaN); + + // Signs differ? + if (a != b) { + y.s = -b; + return x.plus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if (!xe || !ye) { + + // Either Infinity? + if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN); + + // Either zero? + if (!xc[0] || !yc[0]) { + + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : + + // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity + ROUNDING_MODE == 3 ? -0 : 0); } } - return requestWithDefaults(options2); - } - return requestWithDefaults(...args); - } - return Object.assign(withDecorations, requestWithDefaults); -} -// pkg/dist-src/index.js -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - rest: api - }; -} -restEndpointMethods.VERSION = VERSION; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - ...api, - rest: api - }; -} -legacyRestEndpointMethods.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + // Determine which is the bigger number. + if (a = xe - ye) { -/***/ }), + if (xLTy = a < 0) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; + } -/***/ 10537: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + t.reverse(); -"use strict"; + // Prepend zeros to equalise exponents. + for (b = a; b--; t.push(0)); + t.reverse(); + } else { -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + // Exponents equal. Check digit by digit. + j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b; -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - RequestError: () => RequestError -}); -module.exports = __toCommonJS(dist_src_exports); -var import_deprecation = __nccwpck_require__(58932); -var import_once = __toESM(__nccwpck_require__(1223)); -var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var RequestError = class extends Error { - constructor(message, statusCode, options) { - super(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - let headers; - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - /(? 0) for (; b--; xc[i++] = 0); + b = BASE - 1; -/***/ 36234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Subtract yc from xc. + for (; j > a;) { -"use strict"; + if (xc[--j] < yc[j]) { + for (i = j; i && !xc[--i]; xc[i] = b); + --xc[i]; + xc[j] += BASE; + } -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + xc[j] -= yc[j]; + } -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - request: () => request -}); -module.exports = __toCommonJS(dist_src_exports); -var import_endpoint = __nccwpck_require__(59440); -var import_universal_user_agent = __nccwpck_require__(45030); + // Remove leading zeros and adjust exponent accordingly. + for (; xc[0] == 0; xc.splice(0, 1), --ye); -// pkg/dist-src/version.js -var VERSION = "8.4.1"; + // Zero? + if (!xc[0]) { -// pkg/dist-src/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} + // Following IEEE 754 (2008) 6.3, + // n - n = +0 but n - n = -0 when rounding towards -Infinity. + y.s = ROUNDING_MODE == 3 ? -1 : 1; + y.c = [y.e = 0]; + return y; + } -// pkg/dist-src/fetch-wrapper.js -var import_request_error = __nccwpck_require__(10537); + // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity + // for finite x and y. + return normalise(y, xc, ye); + }; -// pkg/dist-src/get-buffer-response.js -function getBufferResponse(response) { - return response.arrayBuffer(); -} -// pkg/dist-src/fetch-wrapper.js -function fetchWrapper(requestOptions) { - var _a, _b, _c, _d; - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - let { fetch } = globalThis; - if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { - fetch = requestOptions.request.fetch; - } - if (!fetch) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - return fetch(requestOptions.url, { - method: requestOptions.method, - body: requestOptions.body, - redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, - headers: requestOptions.headers, - signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. + */ + P.modulo = P.mod = function (y, b) { + var q, s, + x = this; + + y = new BigNumber(y, b); + + // Return NaN if x is Infinity or NaN, or y is NaN or zero. + if (!x.c || !y.s || y.c && !y.c[0]) { + return new BigNumber(NaN); + + // Return x if y is Infinity or x is zero. + } else if (!y.c || x.c && !x.c[0]) { + return new BigNumber(x); } - throw new import_request_error.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions - }); - } - if (status === 304) { - throw new import_request_error.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); - } - if (status >= 400) { - const data = await getResponseData(response); - const error = new import_request_error.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; - } - return parseSuccessResponseBody ? await getResponseData(response) : response.body; - }).then((data) => { - return { - status, - url, - headers, - data - }; - }).catch((error) => { - if (error instanceof import_request_error.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; + + if (MODULO_MODE == 9) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // r = x - qy where 0 <= r < abs(y) + s = y.s; + y.s = 1; + q = div(x, y, 0, 3); + y.s = s; + q.s *= s; + } else { + q = div(x, y, 0, MODULO_MODE); } - } - throw new import_request_error.RequestError(message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json().catch(() => response.text()).catch(() => ""); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); -} -function toErrorMessage(data) { - if (typeof data === "string") - return data; - let suffix; - if ("documentation_url" in data) { - suffix = ` - ${data.documentation_url}`; - } else { - suffix = ""; - } - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; - } - return `${data.message}${suffix}`; - } - return `Unknown error: ${JSON.stringify(data)}`; -} -// pkg/dist-src/with-defaults.js -function withDefaults(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); - } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); + y = x.minus(q.times(y)); + + // To match JavaScript %, ensure sign of zero is sign of dividend. + if (!y.c[0] && MODULO_MODE == 1) y.s = x.s; + + return y; }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); -} -// pkg/dist-src/index.js -var request = withDefaults(import_endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value + * of BigNumber(y, b). + */ + P.multipliedBy = P.times = function (y, b) { + var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, + base, sqrtBase, + x = this, + xc = x.c, + yc = (y = new BigNumber(y, b)).c; + + // Either NaN, ±Infinity or ±0? + if (!xc || !yc || !xc[0] || !yc[0]) { + + // Return NaN if either is NaN, or one is 0 and the other is Infinity. + if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) { + y.c = y.e = y.s = null; + } else { + y.s *= x.s; + + // Return ±Infinity if either is ±Infinity. + if (!xc || !yc) { + y.c = y.e = null; + + // Return ±0 if either is ±0. + } else { + y.c = [0]; + y.e = 0; + } + } + + return y; + } + + e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE); + y.s *= x.s; + xcL = xc.length; + ycL = yc.length; + + // Ensure xc points to longer array and xcL to its length. + if (xcL < ycL) { + zc = xc; + xc = yc; + yc = zc; + i = xcL; + xcL = ycL; + ycL = i; + } -/***/ }), + // Initialise the result array with zeros. + for (i = xcL + ycL, zc = []; i--; zc.push(0)); -/***/ 81040: -/***/ ((__unused_webpack_module, exports) => { + base = BASE; + sqrtBase = SQRT_BASE; -"use strict"; + for (i = ycL; --i >= 0;) { + c = 0; + ylo = yc[i] % sqrtBase; + yhi = yc[i] / sqrtBase | 0; -Object.defineProperty(exports, "__esModule", ({ value: true })); -function once(emitter, name, { signal } = {}) { - return new Promise((resolve, reject) => { - function cleanup() { - signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup); - emitter.removeListener(name, onEvent); - emitter.removeListener('error', onError); - } - function onEvent(...args) { - cleanup(); - resolve(args); - } - function onError(err) { - cleanup(); - reject(err); + for (k = xcL, j = i + k; j > i;) { + xlo = xc[--k] % sqrtBase; + xhi = xc[k] / sqrtBase | 0; + m = yhi * xlo + xhi * ylo; + xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c; + c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi; + zc[j--] = xlo % base; } - signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup); - emitter.on(name, onEvent); - emitter.on('error', onError); - }); -} -exports["default"] = once; -//# sourceMappingURL=index.js.map -/***/ }), + zc[j] = c; + } -/***/ 61659: -/***/ ((module, exports, __nccwpck_require__) => { + if (c) { + ++e; + } else { + zc.splice(0, 1); + } -"use strict"; -/** - * @author Toru Nagashima - * See LICENSE file in root directory for full license. - */ + return normalise(y, zc, e); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. + */ + P.negated = function () { + var x = new BigNumber(this); + x.s = -x.s || null; + return x; + }; -var eventTargetShim = __nccwpck_require__(84697); -/** - * The signal class. - * @see https://dom.spec.whatwg.org/#abortsignal - */ -class AbortSignal extends eventTargetShim.EventTarget { - /** - * AbortSignal cannot be constructed directly. - */ - constructor() { - super(); - throw new TypeError("AbortSignal cannot be constructed directly"); - } - /** - * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). */ - get aborted() { - const aborted = abortedFlags.get(this); - if (typeof aborted !== "boolean") { - throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); - } - return aborted; - } -} -eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); -/** - * Create an AbortSignal object. - */ -function createAbortSignal() { - const signal = Object.create(AbortSignal.prototype); - eventTargetShim.EventTarget.call(signal); - abortedFlags.set(signal, false); - return signal; -} -/** - * Abort a given signal. - */ -function abortSignal(signal) { - if (abortedFlags.get(signal) !== false) { - return; - } - abortedFlags.set(signal, true); - signal.dispatchEvent({ type: "abort" }); -} -/** - * Aborted flag for each instances. - */ -const abortedFlags = new WeakMap(); -// Properties should be enumerable. -Object.defineProperties(AbortSignal.prototype, { - aborted: { enumerable: true }, -}); -// `toString()` should return `"[object AbortSignal]"` -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortSignal", - }); -} + P.plus = function (y, b) { + var t, + x = this, + a = x.s; -/** - * The AbortController. - * @see https://dom.spec.whatwg.org/#abortcontroller - */ -class AbortController { - /** - * Initialize this controller. - */ - constructor() { - signals.set(this, createAbortSignal()); - } - /** - * Returns the `AbortSignal` object associated with this object. - */ - get signal() { - return getSignal(this); - } - /** - * Abort and signal to any observers that the associated activity is to be aborted. - */ - abort() { - abortSignal(getSignal(this)); - } -} -/** - * Associated signals. - */ -const signals = new WeakMap(); -/** - * Get the associated signal of a given controller. - */ -function getSignal(controller) { - const signal = signals.get(controller); - if (signal == null) { - throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); - } - return signal; -} -// Properties should be enumerable. -Object.defineProperties(AbortController.prototype, { - signal: { enumerable: true }, - abort: { enumerable: true }, -}); -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortController", - }); -} + y = new BigNumber(y, b); + b = y.s; -exports.AbortController = AbortController; -exports.AbortSignal = AbortSignal; -exports["default"] = AbortController; + // Either NaN? + if (!a || !b) return new BigNumber(NaN); -module.exports = AbortController -module.exports.AbortController = module.exports["default"] = AbortController -module.exports.AbortSignal = AbortSignal -//# sourceMappingURL=abort-controller.js.map + // Signs differ? + if (a != b) { + y.s = -b; + return x.minus(y); + } + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; -/***/ }), + if (!xe || !ye) { -/***/ 8348: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // Return ±Infinity if either ±Infinity. + if (!xc || !yc) return new BigNumber(a / 0); -"use strict"; + // Either zero? + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0); + } -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.req = exports.json = exports.toBuffer = void 0; -const http = __importStar(__nccwpck_require__(13685)); -const https = __importStar(__nccwpck_require__(95687)); -async function toBuffer(stream) { - let length = 0; - const chunks = []; - for await (const chunk of stream) { - length += chunk.length; - chunks.push(chunk); - } - return Buffer.concat(chunks, length); -} -exports.toBuffer = toBuffer; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -async function json(stream) { - const buf = await toBuffer(stream); - const str = buf.toString('utf8'); - try { - return JSON.parse(str); - } - catch (_err) { - const err = _err; - err.message += ` (input: ${str})`; - throw err; - } -} -exports.json = json; -function req(url, opts = {}) { - const href = typeof url === 'string' ? url : url.href; - const req = (href.startsWith('https:') ? https : http).request(url, opts); - const promise = new Promise((resolve, reject) => { - req - .once('response', resolve) - .once('error', reject) - .end(); - }); - req.then = promise.then.bind(promise); - return req; -} -exports.req = req; -//# sourceMappingURL=helpers.js.map + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); -/***/ }), + // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. + if (a = xe - ye) { + if (a > 0) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; + } -/***/ 70694: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + t.reverse(); + for (; a--; t.push(0)); + t.reverse(); + } -"use strict"; + a = xc.length; + b = yc.length; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Agent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const http = __importStar(__nccwpck_require__(13685)); -const https_1 = __nccwpck_require__(95687); -__exportStar(__nccwpck_require__(8348), exports); -const INTERNAL = Symbol('AgentBaseInternalState'); -class Agent extends http.Agent { - constructor(opts) { - super(opts); - this[INTERNAL] = {}; - } - /** - * Determine whether this is an `http` or `https` request. - */ - isSecureEndpoint(options) { - if (options) { - // First check the `secureEndpoint` property explicitly, since this - // means that a parent `Agent` is "passing through" to this instance. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (typeof options.secureEndpoint === 'boolean') { - return options.secureEndpoint; - } - // If no explicit `secure` endpoint, check if `protocol` property is - // set. This will usually be the case since using a full string URL - // or `URL` instance should be the most common usage. - if (typeof options.protocol === 'string') { - return options.protocol === 'https:'; - } - } - // Finally, if no `protocol` property was set, then fall back to - // checking the stack trace of the current call stack, and try to - // detect the "https" module. - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack - .split('\n') - .some((l) => l.indexOf('(https.js:') !== -1 || - l.indexOf('node:https:') !== -1); - } - // In order to support async signatures in `connect()` and Node's native - // connection pooling in `http.Agent`, the array of sockets for each origin - // has to be updated synchronously. This is so the length of the array is - // accurate when `addRequest()` is next called. We achieve this by creating a - // fake socket and adding it to `sockets[origin]` and incrementing - // `totalSocketCount`. - incrementSockets(name) { - // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no - // need to create a fake socket because Node.js native connection pooling - // will never be invoked. - if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { - return null; - } - // All instances of `sockets` are expected TypeScript errors. The - // alternative is to add it as a private property of this class but that - // will break TypeScript subclassing. - if (!this.sockets[name]) { - // @ts-expect-error `sockets` is readonly in `@types/node` - this.sockets[name] = []; - } - const fakeSocket = new net.Socket({ writable: false }); - this.sockets[name].push(fakeSocket); - // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` - this.totalSocketCount++; - return fakeSocket; - } - decrementSockets(name, socket) { - if (!this.sockets[name] || socket === null) { - return; - } - const sockets = this.sockets[name]; - const index = sockets.indexOf(socket); - if (index !== -1) { - sockets.splice(index, 1); - // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` - this.totalSocketCount--; - if (sockets.length === 0) { - // @ts-expect-error `sockets` is readonly in `@types/node` - delete this.sockets[name]; - } - } - } - // In order to properly update the socket pool, we need to call `getName()` on - // the core `https.Agent` if it is a secureEndpoint. - getName(options) { - const secureEndpoint = typeof options.secureEndpoint === 'boolean' - ? options.secureEndpoint - : this.isSecureEndpoint(options); - if (secureEndpoint) { - // @ts-expect-error `getName()` isn't defined in `@types/node` - return https_1.Agent.prototype.getName.call(this, options); - } - // @ts-expect-error `getName()` isn't defined in `@types/node` - return super.getName(options); - } - createSocket(req, options, cb) { - const connectOpts = { - ...options, - secureEndpoint: this.isSecureEndpoint(options), - }; - const name = this.getName(connectOpts); - const fakeSocket = this.incrementSockets(name); - Promise.resolve() - .then(() => this.connect(req, connectOpts)) - .then((socket) => { - this.decrementSockets(name, fakeSocket); - if (socket instanceof http.Agent) { - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - return socket.addRequest(req, connectOpts); - } - this[INTERNAL].currentSocket = socket; - // @ts-expect-error `createSocket()` isn't defined in `@types/node` - super.createSocket(req, options, cb); - }, (err) => { - this.decrementSockets(name, fakeSocket); - cb(err); - }); - } - createConnection() { - const socket = this[INTERNAL].currentSocket; - this[INTERNAL].currentSocket = undefined; - if (!socket) { - throw new Error('No socket was returned in the `connect()` function'); - } - return socket; - } - get defaultPort() { - return (this[INTERNAL].defaultPort ?? - (this.protocol === 'https:' ? 443 : 80)); - } - set defaultPort(v) { - if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v; - } - } - get protocol() { - return (this[INTERNAL].protocol ?? - (this.isSecureEndpoint() ? 'https:' : 'http:')); - } - set protocol(v) { - if (this[INTERNAL]) { - this[INTERNAL].protocol = v; + // Point xc to the longer array, and b to the shorter length. + if (a - b < 0) { + t = yc; + yc = xc; + xc = t; + b = a; + } + + // Only start adding at yc.length - 1 as the further digits of xc can be ignored. + for (a = 0; b;) { + a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0; + xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; + } + + if (a) { + xc = [a].concat(xc); + ++ye; + } + + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + // ye = MAX_EXP + 1 possible + return normalise(y, xc, ye); + }; + + + /* + * If sd is undefined or null or true or false, return the number of significant digits of + * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * If sd is true include integer-part trailing zeros in the count. + * + * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. + * boolean: whether to count integer-part trailing zeros: true or false. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + */ + P.precision = P.sd = function (sd, rm) { + var c, n, v, + x = this; + + if (sd != null && sd !== !!sd) { + intCheck(sd, 1, MAX); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + return round(new BigNumber(x), sd, rm); + } + + if (!(c = x.c)) return null; + v = c.length - 1; + n = v * LOG_BASE + 1; + + if (v = c[v]) { + + // Subtract the number of trailing zeros of the last element. + for (; v % 10 == 0; v /= 10, n--); + + // Add the number of digits of the first element. + for (v = c[0]; v >= 10; v /= 10, n++); + } + + if (sd && x.e + 1 > n) n = x.e + 1; + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' + */ + P.shiftedBy = function (k) { + intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); + return this.times('1e' + k); + }; + + + /* + * sqrt(-n) = N + * sqrt(N) = N + * sqrt(-I) = N + * sqrt(I) = I + * sqrt(0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.squareRoot = P.sqrt = function () { + var m, n, r, rep, t, + x = this, + c = x.c, + s = x.s, + e = x.e, + dp = DECIMAL_PLACES + 4, + half = new BigNumber('0.5'); + + // Negative/NaN/Infinity/zero? + if (s !== 1 || !c || !c[0]) { + return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); + } + + // Initial estimate. + s = Math.sqrt(+valueOf(x)); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if (s == 0 || s == 1 / 0) { + n = coeffToString(c); + if ((n.length + e) % 2 == 0) n += '0'; + s = Math.sqrt(+n); + e = bitFloor((e + 1) / 2) - (e < 0 || e % 2); + + if (s == 1 / 0) { + n = '5e' + e; + } else { + n = s.toExponential(); + n = n.slice(0, n.indexOf('e') + 1) + e; } - } -} -exports.Agent = Agent; -//# sourceMappingURL=index.js.map -/***/ }), + r = new BigNumber(n); + } else { + r = new BigNumber(s + ''); + } -/***/ 61546: -/***/ ((module) => { + // Check for zero. + // r could be zero if MIN_EXP is changed after the this value was created. + // This would cause a division by zero (x/t) and hence Infinity below, which would cause + // coeffToString to throw. + if (r.c[0]) { + e = r.e; + s = e + dp; + if (s < 3) s = 0; -"use strict"; + // Newton-Raphson iteration. + for (; ;) { + t = r; + r = half.times(t.plus(div(x, t, dp, 1))); + if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) { -const arrify = value => { - if (value === null || value === undefined) { - return []; - } + // The exponent of r may here be one less than the final result exponent, + // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits + // are indexed correctly. + if (r.e < e) --s; + n = n.slice(s - 3, s + 1); - if (Array.isArray(value)) { - return value; - } + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits + // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the + // iteration. + if (n == '9999' || !rep && n == '4999') { - if (typeof value === 'string') { - return [value]; - } + // On the first iteration only, check to see if rounding up gives the + // exact result as the nines may infinitely repeat. + if (!rep) { + round(t, t.e + DECIMAL_PLACES + 2, 0); - if (typeof value[Symbol.iterator] === 'function') { - return [...value]; - } + if (t.times(t).eq(x)) { + r = t; + break; + } + } - return [value]; -}; + dp += 4; + s += 4; + rep = 1; + } else { -module.exports = arrify; + // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact + // result. If not, then there are further digits and m will be truthy. + if (!+n || !+n.slice(1) && n.charAt(0) == '5') { + // Truncate to the first rounding digit. + round(r, r.e + DECIMAL_PLACES + 2, 1); + m = !r.times(r).eq(x); + } -/***/ }), + break; + } + } + } + } -/***/ 33415: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); + }; -// Packages -var retrier = __nccwpck_require__(71604); -function retry(fn, opts) { - function run(resolve, reject) { - var options = opts || {}; - var op; + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + */ + P.toExponential = function (dp, rm) { + if (dp != null) { + intCheck(dp, 0, MAX); + dp++; + } + return format(this, dp, rm, 1); + }; - // Default `randomize` to true - if (!('randomize' in options)) { - options.randomize = true; - } - op = retrier.operation(options); + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + */ + P.toFixed = function (dp, rm) { + if (dp != null) { + intCheck(dp, 0, MAX); + dp = dp + this.e + 1; + } + return format(this, dp, rm); + }; - // We allow the user to abort retrying - // this makes sense in the cases where - // knowledge is obtained that retrying - // would be futile (e.g.: auth errors) - function bail(err) { - reject(err || new Error('Aborted')); - } + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the format or FORMAT object (see BigNumber.set). + * + * The formatting object may contain some or all of the properties shown below. + * + * FORMAT = { + * prefix: '', + * groupSize: 3, + * secondaryGroupSize: 0, + * groupSeparator: ',', + * decimalSeparator: '.', + * fractionGroupSize: 0, + * fractionGroupSeparator: '\xA0', // non-breaking space + * suffix: '' + * }; + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * [format] {object} Formatting options. See FORMAT pbject above. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + * '[BigNumber Error] Argument not an object: {format}' + */ + P.toFormat = function (dp, rm, format) { + var str, + x = this; - function onError(err, num) { - if (err.bail) { - bail(err); - return; + if (format == null) { + if (dp != null && rm && typeof rm == 'object') { + format = rm; + rm = null; + } else if (dp && typeof dp == 'object') { + format = dp; + dp = rm = null; + } else { + format = FORMAT; + } + } else if (typeof format != 'object') { + throw Error + (bignumberError + 'Argument not an object: ' + format); } - if (!op.retry(err)) { - reject(op.mainError()); - } else if (options.onRetry) { - options.onRetry(err, num); + str = x.toFixed(dp, rm); + + if (x.c) { + var i, + arr = str.split('.'), + g1 = +format.groupSize, + g2 = +format.secondaryGroupSize, + groupSeparator = format.groupSeparator || '', + intPart = arr[0], + fractionPart = arr[1], + isNeg = x.s < 0, + intDigits = isNeg ? intPart.slice(1) : intPart, + len = intDigits.length; + + if (g2) { + i = g1; + g1 = g2; + g2 = i; + len -= i; + } + + if (g1 > 0 && len > 0) { + i = len % g1 || g1; + intPart = intDigits.substr(0, i); + for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1); + if (g2 > 0) intPart += groupSeparator + intDigits.slice(i); + if (isNeg) intPart = '-' + intPart; + } + + str = fractionPart + ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize) + ? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'), + '$&' + (format.fractionGroupSeparator || '')) + : fractionPart) + : intPart; } - } - function runAttempt(num) { - var val; + return (format.prefix || '') + str + (format.suffix || ''); + }; - try { - val = fn(bail, num); - } catch (err) { - onError(err, num); - return; + + /* + * Return an array of two BigNumbers representing the value of this BigNumber as a simple + * fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to the specified + * maximum denominator. If a maximum denominator is not specified, the denominator will be + * the lowest value necessary to represent the number exactly. + * + * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. + * + * '[BigNumber Error] Argument {not an integer|out of range} : {md}' + */ + P.toFraction = function (md) { + var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, + x = this, + xc = x.c; + + if (md != null) { + n = new BigNumber(md); + + // Throw if md is less than one or is not an integer, unless it is Infinity. + if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) { + throw Error + (bignumberError + 'Argument ' + + (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n)); + } } - Promise.resolve(val) - .then(resolve) - .catch(function catchIt(err) { - onError(err, num); - }); - } + if (!xc) return new BigNumber(x); - op.attempt(runAttempt); - } + d = new BigNumber(ONE); + n1 = d0 = new BigNumber(ONE); + d1 = n0 = new BigNumber(ONE); + s = coeffToString(xc); - return new Promise(run); -} + // Determine initial denominator. + // d is a power of 10 and the minimum max denominator that specifies the value exactly. + e = d.e = s.length - x.e - 1; + d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp]; + md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n; -module.exports = retry; + exp = MAX_EXP; + MAX_EXP = 1 / 0; + n = new BigNumber(s); + // n0 = d1 = 0 + n0.c[0] = 0; -/***/ }), + for (; ;) { + q = div(n, d, 0, 1); + d2 = d0.plus(q.times(d1)); + if (d2.comparedTo(md) == 1) break; + d0 = d1; + d1 = d2; + n1 = n0.plus(q.times(d2 = n1)); + n0 = d2; + d = n.minus(q.times(d2 = d)); + n = d2; + } -/***/ 14812: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + d2 = div(md.minus(d0), d1, 0, 1); + n0 = n0.plus(d2.times(n1)); + d0 = d0.plus(d2.times(d1)); + n0.s = n1.s = x.s; + e = e * 2; -module.exports = -{ - parallel : __nccwpck_require__(8210), - serial : __nccwpck_require__(50445), - serialOrdered : __nccwpck_require__(3578) -}; + // Determine which fraction is closer to x, n0/d0 or n1/d1 + r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo( + div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; + MAX_EXP = exp; -/***/ }), + return r; + }; -/***/ 1700: -/***/ ((module) => { -// API -module.exports = abort; + /* + * Return the value of this BigNumber converted to a number primitive. + */ + P.toNumber = function () { + return +valueOf(this); + }; -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - // reset leftover jobs - state.jobs = {}; -} + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + */ + P.toPrecision = function (sd, rm) { + if (sd != null) intCheck(sd, 1, MAX); + return format(this, sd, rm, 2); + }; -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); + + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. + * + * [b] {number} Integer, 2 to ALPHABET.length inclusive. + * + * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + */ + P.toString = function (b) { + var str, + n = this, + s = n.s, + e = n.e; + + // Infinity or NaN? + if (e === null) { + if (s) { + str = 'Infinity'; + if (s < 0) str = '-' + str; + } else { + str = 'NaN'; + } + } else { + if (b == null) { + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential(coeffToString(n.c), e) + : toFixedPoint(coeffToString(n.c), e, '0'); + } else if (b === 10 && alphabetHasNormalDecimalDigits) { + n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE); + str = toFixedPoint(coeffToString(n.c), n.e, '0'); + } else { + intCheck(b, 2, ALPHABET.length, 'Base'); + str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true); + } + + if (s < 0 && n.c[0]) str = '-' + str; + } + + return str; + }; + + + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. + */ + P.valueOf = P.toJSON = function () { + return valueOf(this); + }; + + + P._isBigNumber = true; + + if (configObject != null) BigNumber.set(configObject); + + return BigNumber; } -} -/***/ }), + // PRIVATE HELPER FUNCTIONS -/***/ 72794: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // These functions don't need access to variables, + // e.g. DECIMAL_PLACES, in the scope of the `clone` function above. -var defer = __nccwpck_require__(15295); -// API -module.exports = async; + function bitFloor(n) { + var i = n | 0; + return n > 0 || n === i ? i : i - 1; + } -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - // check if async happened - defer(function() { isAsync = true; }); + // Return a coefficient array as a string of base 10 digits. + function coeffToString(a) { + var s, z, + i = 1, + j = a.length, + r = a[0] + ''; - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); + for (; i < j;) { + s = a[i++] + ''; + z = LOG_BASE - s.length; + for (; z--; s = '0' + s); + r += s; } - }; -} + // Determine trailing zeros. + for (j = r.length; r.charCodeAt(--j) === 48;); -/***/ }), + return r.slice(0, j + 1 || 1); + } -/***/ 15295: -/***/ ((module) => { -module.exports = defer; + // Compare the value of BigNumbers x and y. + function compare(x, y) { + var a, b, + xc = x.c, + yc = y.c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); + // Either NaN? + if (!i || !j) return null; - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} + a = xc && !xc[0]; + b = yc && !yc[0]; + // Either zero? + if (a || b) return a ? b ? 0 : -j : i; -/***/ }), + // Signs differ? + if (i != j) return i; -/***/ 9023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + a = i < 0; + b = k == l; -var async = __nccwpck_require__(72794) - , abort = __nccwpck_require__(1700) - ; + // Either Infinity? + if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1; -// API -module.exports = iterate; + // Compare exponents. + if (!b) return k > l ^ a ? 1 : -1; -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + j = (k = xc.length) < (l = yc.length) ? k : l; - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } + // Compare digit by digit. + for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1; - // clean up jobs - delete state.jobs[key]; + // Compare lengths. + return k == l ? 0 : k > l ^ a ? 1 : -1; + } - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - // return salvaged results - callback(error, state.results); - }); -} + /* + * Check that n is a primitive number, an integer, and in range, otherwise throw. + */ + function intCheck(n, min, max, name) { + if (n < min || n > max || n !== mathfloor(n)) { + throw Error + (bignumberError + (name || 'Argument') + (typeof n == 'number' + ? n < min || n > max ? ' out of range: ' : ' not an integer: ' + : ' not a primitive number: ') + String(n)); + } + } -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); + // Assumes finite n. + function isOdd(n) { + var k = n.c.length - 1; + return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0; } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); + + + function toExponential(str, e) { + return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) + + (e < 0 ? 'e' : 'e+') + e; } - return aborter; -} + function toFixedPoint(str, e, z) { + var len, zs; -/***/ }), + // Negative exponent? + if (e < 0) { -/***/ 42474: -/***/ ((module) => { + // Prepend zeros. + for (zs = z + '.'; ++e; zs += z); + str = zs + str; -// API -module.exports = state; + // Positive exponent + } else { + len = str.length; -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length + // Append zeros. + if (++e > len) { + for (zs = z, e -= len; --e; zs += z); + str += zs; + } else if (e < len) { + str = str.slice(0, e) + '.' + str.slice(e); + } } - ; - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); + return str; } - return initState; -} + // EXPORT -/***/ }), -/***/ 37942: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + BigNumber = clone(); + BigNumber['default'] = BigNumber.BigNumber = BigNumber; -var abort = __nccwpck_require__(1700) - , async = __nccwpck_require__(72794) - ; + // AMD. + if (typeof define == 'function' && define.amd) { + define(function () { return BigNumber; }); -// API -module.exports = terminator; + // Node.js and other environments that support module.exports. + } else if ( true && module.exports) { + module.exports = BigNumber; -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; + // Browser. + } else { + if (!globalObject) { + globalObject = typeof self != 'undefined' && self ? self : window; + } + + globalObject.BigNumber = BigNumber; } +})(this); - // fast forward iteration index - this.index = this.size; - // abort jobs - abort(this); +/***/ }), - // send back results we have so far - async(callback)(null, this.results); -} +/***/ 33717: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var concatMap = __nccwpck_require__(86891); +var balanced = __nccwpck_require__(9417); -/***/ }), +module.exports = expandTop; -/***/ 8210: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(42474) - , terminator = __nccwpck_require__(37942) - ; +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} -// Public API -module.exports = parallel; +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; - state.index++; + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); } - return terminator.bind(state, callback); + parts.push.apply(parts, p); + + return parts; } +function expandTop(str) { + if (!str) + return []; -/***/ }), + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } -/***/ 50445: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return expand(escapeBraces(str), true).map(unescapeBraces); +} -var serialOrdered = __nccwpck_require__(3578); +function identity(e) { + return e; +} -// Public API -module.exports = serial; +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; } +function expand(str, isTop) { + var expansions = []; -/***/ }), + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; -/***/ 3578: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(42474) - , terminator = __nccwpck_require__(37942) - ; + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; } + var pad = n.some(isPadded); - state.index++; + N = []; - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; + return expansions; } -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} /***/ }), -/***/ 91403: +/***/ 9239: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var CombinedStream = __nccwpck_require__(85443); -var util = __nccwpck_require__(73837); -var path = __nccwpck_require__(71017); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var parseUrl = (__nccwpck_require__(57310).parse); -var fs = __nccwpck_require__(57147); -var Stream = (__nccwpck_require__(12781).Stream); -var mime = __nccwpck_require__(43583); -var asynckit = __nccwpck_require__(14812); -var populate = __nccwpck_require__(47027); - -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - -/** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream - */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; - for (var option in options) { - this[option] = options[option]; - } -} +"use strict"; +/*jshint node:true */ -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; +var Buffer = (__nccwpck_require__(14300).Buffer); // browserify +var SlowBuffer = (__nccwpck_require__(14300).SlowBuffer); -FormData.prototype.append = function(field, value, options) { +module.exports = bufferEq; - options = options || {}; +function bufferEq(a, b) { - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; + // shortcutting on type is necessary for correctness + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + return false; } - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; + // buffer sizes should be well-known information, so despite this + // shortcutting, it doesn't leak any information about the *contents* of the + // buffers. + if (a.length !== b.length) { + return false; } - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; + var c = 0; + for (var i = 0; i < a.length; i++) { + /*jshint bitwise:false */ + c |= a[i] ^ b[i]; // XOR } + return c === 0; +} - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); +bufferEq.install = function() { + Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { + return bufferEq(this, that); + }; }; -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; +var origBufEqual = Buffer.prototype.equal; +var origSlowBufEqual = SlowBuffer.prototype.equal; +bufferEq.restore = function() { + Buffer.prototype.equal = origBufEqual; + SlowBuffer.prototype.equal = origSlowBufEqual; +}; - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; - // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { - return; - } +/***/ }), - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; +/***/ 19227: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -FormData.prototype._lengthRetriever = function(value, callback) { +"use strict"; - if (value.hasOwnProperty('fd')) { - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { +var bind = __nccwpck_require__(88334); - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); +var $apply = __nccwpck_require__(54177); +var $call = __nccwpck_require__(2808); +var $reflectApply = __nccwpck_require__(48309); - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { +/** @type {import('./actualApply')} */ +module.exports = $reflectApply || bind.call($call, $apply); - var fileSize; - if (err) { - callback(err); - return; - } +/***/ }), - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } +/***/ 54177: +/***/ ((module) => { - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); +"use strict"; - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); - // something else - } else { - callback('Unknown stream'); - } -}; +/** @type {import('./functionApply')} */ +module.exports = Function.prototype.apply; -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; - } - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); +/***/ }), - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; +/***/ 2808: +/***/ ((module) => { - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); - } +"use strict"; - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; - // skip nullish headers. - if (header == null) { - continue; - } +/** @type {import('./functionCall')} */ +module.exports = Function.prototype.call; - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } +/***/ }), - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; +/***/ 86815: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -FormData.prototype._getContentDisposition = function(value, options) { +"use strict"; - var filename - , contentDisposition - ; - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); - } +var bind = __nccwpck_require__(88334); +var $TypeError = __nccwpck_require__(6361); - if (filename) { - contentDisposition = 'filename="' + filename + '"'; - } +var $call = __nccwpck_require__(2808); +var $actualApply = __nccwpck_require__(19227); - return contentDisposition; +/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ +module.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== 'function') { + throw new $TypeError('a function is required'); + } + return $actualApply(bind, $call, args); }; -FormData.prototype._getContentType = function(value, options) { - // use custom content-type above all - var contentType = options.contentType; +/***/ }), - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } +/***/ 48309: +/***/ ((module) => { - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } +"use strict"; - // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { - contentType = value.headers['content-type']; - } - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); - } +/** @type {import('./reflectApply')} */ +module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } - return contentType; -}; +/***/ }), -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; +/***/ 85443: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } +var util = __nccwpck_require__(73837); +var Stream = (__nccwpck_require__(12781).Stream); +var DelayedStream = __nccwpck_require__(18611); - next(footer); - }.bind(this); -}; +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; +CombinedStream.create = function(options) { + var combinedStream = new this(); - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; } - return formHeaders; -}; - -FormData.prototype.setBoundary = function(boundary) { - this._boundary = boundary; + return combinedStream; }; -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); }; -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); - var boundary = this.getBoundary(); +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); - } + this._handleErrors(stream); - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); - } + if (this.pauseStreams) { + stream.pause(); } } - // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); + this._streams.push(stream); + return this; }; -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; }; -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; +CombinedStream.prototype._getNext = function() { + this._currentStream = null; - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call } - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; } - - return knownLength; }; -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; - } - - return hasKnownLength; -}; +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - if (this._streams.length) { - knownLength += this._lastBoundary().length; + if (typeof stream == 'undefined') { + this.end(); + return; } - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); + if (typeof stream !== 'function') { + this._pipeNext(stream); return; } - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); } - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); + this._pipeNext(stream); + }.bind(this)); }; -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); + var value = stream; + this.write(value); + this._getNext(); +}; - // use custom params - } else { +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; - } +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; } - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); } - // get content length and fire away - this.getLength(function(err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); - return; - } + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; - // add content length - if (length) { - request.setHeader('Content-Length', length); - } +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; - this.pipe(request); - if (cb) { - var onResponse; +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; - return cb.call(this, error, responce); - }; +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } - onResponse = callback.bind(this, null); + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; - request.on('error', callback); - request.on('response', onResponse); +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; } - }.bind(this)); - return request; -}; + self.dataSize += stream.dataSize; + }); -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; } }; -FormData.prototype.toString = function () { - return '[object FormData]'; +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); }; /***/ }), -/***/ 47027: +/***/ 86891: /***/ ((module) => { -// populates missing values -module.exports = function(dst, src) { - - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; - return dst; +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; }; /***/ }), -/***/ 9417: -/***/ ((module) => { +/***/ 28222: +/***/ ((module, exports, __nccwpck_require__) => { -"use strict"; +/* eslint-env browser */ -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); +/** + * This is the web browser implementation of `debug()`. + */ - var r = range(a, b, str); +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} +/** + * Colors. + */ -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } - bi = str.indexOf(b, i + 1); - } + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } - i = ai < bi && ai >= 0 ? ai : bi; - } + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} - if (begs.length) { - result = [ left, right ]; - } - } +/** + * Colorize log arguments if enabled. + * + * @api public + */ - return result; -} +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); -/***/ }), + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); -/***/ 26463: -/***/ ((__unused_webpack_module, exports) => { + args.splice(lastC, 0, c); +} -"use strict"; +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i + return r; } -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ -function getLens (b64) { - var len = b64.length +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } +module.exports = __nccwpck_require__(46243)(exports); - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len +const {formatters} = module.exports; - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ - return [validLen, placeHoldersLen] -} +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} +/***/ }), -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] +/***/ 46243: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - var curByte = 0 +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __nccwpck_require__(80900); + createDebug.destroy = destroy; - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } + /** + * The currently active debug mode names, and names to skip. + */ - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } + createDebug.names = []; + createDebug.skips = []; - return arr -} + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } + const self = debug; - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; - return parts.join('') -} + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } -/***/ }), + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); -/***/ 83682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); -var register = __nccwpck_require__(44670); -var addHook = __nccwpck_require__(5549); -var removeHook = __nccwpck_require__(6819); + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind; -var bindable = bind.bind(bind); + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } -function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); -} + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. -function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; -} + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } -function HookCollection() { - var state = { - registry: {}, - }; + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); - var hook = register.bind(null, state); - bindApi(hook, state); + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } - return hook; -} + return debug; + } -var collectionHookDeprecationMessageDisplayed = false; -function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; - } - return HookCollection(); -} + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } -Hook.Singular = HookSingular.bind(); -Hook.Collection = HookCollection.bind(); + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; -module.exports = Hook; -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook; -module.exports.Singular = Hook.Singular; -module.exports.Collection = Hook.Collection; + createDebug.names = []; + createDebug.skips = []; + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; -/***/ }), + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } -/***/ 5549: -/***/ ((module) => { + namespaces = split[i].replace(/\*/g, '.*?'); -module.exports = addHook; + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); - }; - } + let i; + let len; - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); - }); - }; - } + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; + } -/***/ }), + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } -/***/ 44670: -/***/ ((module) => { + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } -module.exports = register; + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } + createDebug.enable(createDebug.load()); - if (!options) { - options = {}; - } + return createDebug; +} - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } +module.exports = setup; - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} +/***/ }), +/***/ 38237: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/***/ }), +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ -/***/ 6819: -/***/ ((module) => { +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = __nccwpck_require__(28222); +} else { + module.exports = __nccwpck_require__(35332); +} -module.exports = removeHook; -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } +/***/ }), - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); +/***/ 35332: +/***/ ((module, exports, __nccwpck_require__) => { - if (index === -1) { - return; - } +/** + * Module dependencies. + */ - state.registry[name].splice(index, 1); -} +const tty = __nccwpck_require__(76224); +const util = __nccwpck_require__(73837); +/** + * This is the Node.js implementation of `debug()`. + */ -/***/ }), +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); -/***/ 87558: -/***/ (function(module) { +/** + * Colors. + */ -;(function (globalObject) { - 'use strict'; +exports.colors = [6, 2, 3, 4, 5, 1]; -/* - * bignumber.js v9.1.2 - * A JavaScript library for arbitrary-precision arithmetic. - * https://github.com/MikeMcl/bignumber.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licensed. - * - * BigNumber.prototype methods | BigNumber methods - * | - * absoluteValue abs | clone - * comparedTo | config set - * decimalPlaces dp | DECIMAL_PLACES - * dividedBy div | ROUNDING_MODE - * dividedToIntegerBy idiv | EXPONENTIAL_AT - * exponentiatedBy pow | RANGE - * integerValue | CRYPTO - * isEqualTo eq | MODULO_MODE - * isFinite | POW_PRECISION - * isGreaterThan gt | FORMAT - * isGreaterThanOrEqualTo gte | ALPHABET - * isInteger | isBigNumber - * isLessThan lt | maximum max - * isLessThanOrEqualTo lte | minimum min - * isNaN | random - * isNegative | sum - * isPositive | - * isZero | - * minus | - * modulo mod | - * multipliedBy times | - * negated | - * plus | - * precision sd | - * shiftedBy | - * squareRoot sqrt | - * toExponential | - * toFixed | - * toFormat | - * toFraction | - * toJSON | - * toNumber | - * toPrecision | - * toString | - * valueOf | +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __nccwpck_require__(59318); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); - var BigNumber, - isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, - mathceil = Math.ceil, - mathfloor = Math.floor, - - bignumberError = '[BigNumber Error] ', - tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ', - - BASE = 1e14, - LOG_BASE = 14, - MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 - // MAX_INT32 = 0x7fffffff, // 2^31 - 1 - POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], - SQRT_BASE = 1e7, - - // EDITABLE - // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and - // the arguments to toExponential, toFixed, toFormat, and toPrecision. - MAX = 1E9; // 0 to MAX_INT32 - - - /* - * Create and return a BigNumber constructor. - */ - function clone(configObject) { - var div, convertBase, parseNumeric, - P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null }, - ONE = new BigNumber(1), - - - //----------------------------- EDITABLE CONFIG DEFAULTS ------------------------------- - - - // The default values below must be integers within the inclusive ranges stated. - // The values can also be changed at run-time using BigNumber.set. - - // The maximum number of decimal places for operations involving division. - DECIMAL_PLACES = 20, // 0 to MAX - - // The rounding mode used when rounding to the above decimal places, and when using - // toExponential, toFixed, toFormat and toPrecision, and round (default value). - // UP 0 Away from zero. - // DOWN 1 Towards zero. - // CEIL 2 Towards +Infinity. - // FLOOR 3 Towards -Infinity. - // HALF_UP 4 Towards nearest neighbour. If equidistant, up. - // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. - // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. - // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. - // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. - ROUNDING_MODE = 4, // 0 to 8 - - // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] - - // The exponent value at and beneath which toString returns exponential notation. - // Number type: -7 - TO_EXP_NEG = -7, // 0 to -MAX - - // The exponent value at and above which toString returns exponential notation. - // Number type: 21 - TO_EXP_POS = 21, // 0 to MAX - - // RANGE : [MIN_EXP, MAX_EXP] - - // The minimum exponent value, beneath which underflow to zero occurs. - // Number type: -324 (5e-324) - MIN_EXP = -1e7, // -1 to -MAX - - // The maximum exponent value, above which overflow to Infinity occurs. - // Number type: 308 (1.7976931348623157e+308) - // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. - MAX_EXP = 1e7, // 1 to MAX - - // Whether to use cryptographically-secure random number generation, if available. - CRYPTO = false, // true or false + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } - // The modulo mode used when calculating the modulus: a mod n. - // The quotient (q = a / n) is calculated according to the corresponding rounding mode. - // The remainder (r) is calculated as: r = a - n * q. - // - // UP 0 The remainder is positive if the dividend is negative, else is negative. - // DOWN 1 The remainder has the same sign as the dividend. - // This modulo mode is commonly known as 'truncated division' and is - // equivalent to (a % n) in JavaScript. - // FLOOR 3 The remainder has the same sign as the divisor (Python %). - // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. - // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). - // The remainder is always positive. - // - // The truncated division, floored division, Euclidian division and IEEE 754 remainder - // modes are commonly used for the modulus operation. - // Although the other rounding modes can also be used, they may not give useful results. - MODULO_MODE = 1, // 0 to 9 + obj[prop] = val; + return obj; +}, {}); - // The maximum number of significant digits of the result of the exponentiatedBy operation. - // If POW_PRECISION is 0, there will be unlimited significant digits. - POW_PRECISION = 0, // 0 to MAX +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ - // The format specification used by the BigNumber.prototype.toFormat method. - FORMAT = { - prefix: '', - groupSize: 3, - secondaryGroupSize: 0, - groupSeparator: ',', - decimalSeparator: '.', - fractionGroupSize: 0, - fractionGroupSeparator: '\xA0', // non-breaking space - suffix: '' - }, +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} - // The alphabet used for base conversion. It must be at least 2 characters long, with no '+', - // '-', '.', whitespace, or repeated character. - // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_' - ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz', - alphabetHasNormalDecimalDigits = true; +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ +function formatArgs(args) { + const {namespace: name, useColors} = this; - //------------------------------------------------------------------------------------------ + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} - // CONSTRUCTOR +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ - /* - * The BigNumber constructor and exported function. - * Create and return a new instance of a BigNumber object. - * - * v {number|string|BigNumber} A numeric value. - * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. - */ - function BigNumber(v, b) { - var alphabet, c, caseChanged, e, i, isNum, len, str, - x = this; +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} - // Enable constructor call without `new`. - if (!(x instanceof BigNumber)) return new BigNumber(v, b); +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} - if (b == null) { +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ - if (v && v._isBigNumber === true) { - x.s = v.s; +function load() { + return process.env.DEBUG; +} - if (!v.c || v.e > MAX_EXP) { - x.c = x.e = null; - } else if (v.e < MIN_EXP) { - x.c = [x.e = 0]; - } else { - x.e = v.e; - x.c = v.c.slice(); - } +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ - return; - } +function init(debug) { + debug.inspectOpts = {}; - if ((isNum = typeof v == 'number') && v * 0 == 0) { + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} - // Use `1 / n` to handle minus zero also. - x.s = 1 / v < 0 ? (v = -v, -1) : 1; +module.exports = __nccwpck_require__(46243)(exports); - // Fast path for integers, where n < 2147483648 (2**31). - if (v === ~~v) { - for (e = 0, i = v; i >= 10; i /= 10, e++); +const {formatters} = module.exports; - if (e > MAX_EXP) { - x.c = x.e = null; - } else { - x.e = e; - x.c = [v]; - } +/** + * Map %o to `util.inspect()`, all on a single line. + */ - return; - } +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; - str = String(v); - } else { +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ - if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum); +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; - x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1; - } - // Decimal point? - if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); +/***/ }), - // Exponential form? - if ((i = str.search(/e/i)) > 0) { +/***/ 18611: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Determine exponent. - if (e < 0) e = i; - e += +str.slice(i + 1); - str = str.substring(0, i); - } else if (e < 0) { +var Stream = (__nccwpck_require__(12781).Stream); +var util = __nccwpck_require__(73837); - // Integer. - e = str.length; - } +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; - } else { + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); - // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' - intCheck(b, 2, ALPHABET.length, 'Base'); +DelayedStream.create = function(source, options) { + var delayedStream = new this(); - // Allow exponential notation to be used with base 10 argument, while - // also rounding to DECIMAL_PLACES as with other bases. - if (b == 10 && alphabetHasNormalDecimalDigits) { - x = new BigNumber(v); - return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE); - } + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } - str = String(v); + delayedStream.source = source; - if (isNum = typeof v == 'number') { + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; - // Avoid potential interpretation of Infinity and NaN as base 44+ values. - if (v * 0 != 0) return parseNumeric(x, str, isNum, b); + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } - x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1; + return delayedStream; +}; - // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' - if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) { - throw Error - (tooManyDigits + v); - } - } else { - x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1; - } +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); - alphabet = ALPHABET.slice(0, b); - e = i = 0; +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; - // Check that str is a valid base b number. - // Don't use RegExp, so alphabet can contain special characters. - for (len = str.length; i < len; i++) { - if (alphabet.indexOf(c = str.charAt(i)) < 0) { - if (c == '.') { +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } - // If '.' is not the first character and it has not be found before. - if (i > e) { - e = len; - continue; - } - } else if (!caseChanged) { + this.source.resume(); +}; - // Allow e.g. hexadecimal 'FF' as well as 'ff'. - if (str == str.toUpperCase() && (str = str.toLowerCase()) || - str == str.toLowerCase() && (str = str.toUpperCase())) { - caseChanged = true; - i = -1; - e = 0; - continue; - } - } +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; - return parseNumeric(x, String(v), isNum, b); - } - } +DelayedStream.prototype.release = function() { + this._released = true; - // Prevent later check for length on converted number. - isNum = false; - str = convertBase(str, b, 10, x.s); + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; - // Decimal point? - if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); - else e = str.length; - } +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; - // Determine leading zeros. - for (i = 0; str.charCodeAt(i) === 48; i++); +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } - // Determine trailing zeros. - for (len = str.length; str.charCodeAt(--len) === 48;); + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } - if (str = str.slice(i, ++len)) { - len -= i; + this._bufferedEvents.push(args); +}; - // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' - if (isNum && BigNumber.DEBUG && - len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) { - throw Error - (tooManyDigits + (x.s * v)); - } +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } - // Overflow? - if ((e = e - i - 1) > MAX_EXP) { + if (this.dataSize <= this.maxDataSize) { + return; + } - // Infinity. - x.c = x.e = null; + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; - // Underflow? - } else if (e < MIN_EXP) { - // Zero. - x.c = [x.e = 0]; - } else { - x.e = e; - x.c = []; +/***/ }), - // Transform base +/***/ 58932: +/***/ ((__unused_webpack_module, exports) => { - // e is the base 10 exponent. - // i is where to slice str to get the first element of the coefficient array. - i = (e + 1) % LOG_BASE; - if (e < 0) i += LOG_BASE; // i < 1 +"use strict"; - if (i < len) { - if (i) x.c.push(+str.slice(0, i)); - for (len -= LOG_BASE; i < len;) { - x.c.push(+str.slice(i, i += LOG_BASE)); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - i = LOG_BASE - (str = str.slice(i)).length; - } else { - i -= len; - } +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) - for (; i--; str += '0'); - x.c.push(+str); - } - } else { + /* istanbul ignore next */ - // Zero. - x.c = [x.e = 0]; - } + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } + this.name = 'Deprecation'; + } - // CONSTRUCTOR PROPERTIES - - - BigNumber.clone = clone; - - BigNumber.ROUND_UP = 0; - BigNumber.ROUND_DOWN = 1; - BigNumber.ROUND_CEIL = 2; - BigNumber.ROUND_FLOOR = 3; - BigNumber.ROUND_HALF_UP = 4; - BigNumber.ROUND_HALF_DOWN = 5; - BigNumber.ROUND_HALF_EVEN = 6; - BigNumber.ROUND_HALF_CEIL = 7; - BigNumber.ROUND_HALF_FLOOR = 8; - BigNumber.EUCLID = 9; +} +exports.Deprecation = Deprecation; - /* - * Configure infrequently-changing library-wide settings. - * - * Accept an object with the following optional properties (if the value of a property is - * a number, it must be an integer within the inclusive range stated): - * - * DECIMAL_PLACES {number} 0 to MAX - * ROUNDING_MODE {number} 0 to 8 - * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] - * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] - * CRYPTO {boolean} true or false - * MODULO_MODE {number} 0 to 9 - * POW_PRECISION {number} 0 to MAX - * ALPHABET {string} A string of two or more unique characters which does - * not contain '.'. - * FORMAT {object} An object with some of the following properties: - * prefix {string} - * groupSize {number} - * secondaryGroupSize {number} - * groupSeparator {string} - * decimalSeparator {string} - * fractionGroupSize {number} - * fractionGroupSeparator {string} - * suffix {string} - * - * (The values assigned to the above FORMAT object properties are not checked for validity.) - * - * E.g. - * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) - * - * Ignore properties/parameters set to null or undefined, except for ALPHABET. - * - * Return an object with the properties current values. - */ - BigNumber.config = BigNumber.set = function (obj) { - var p, v; - if (obj != null) { +/***/ }), - if (typeof obj == 'object') { +/***/ 62693: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. - // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) { - v = obj[p]; - intCheck(v, 0, MAX, p); - DECIMAL_PLACES = v; - } +"use strict"; - // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. - // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) { - v = obj[p]; - intCheck(v, 0, 8, p); - ROUNDING_MODE = v; - } - // EXPONENTIAL_AT {number|number[]} - // Integer, -MAX to MAX inclusive or - // [integer -MAX to 0 inclusive, 0 to MAX inclusive]. - // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) { - v = obj[p]; - if (v && v.pop) { - intCheck(v[0], -MAX, 0, p); - intCheck(v[1], 0, MAX, p); - TO_EXP_NEG = v[0]; - TO_EXP_POS = v[1]; - } else { - intCheck(v, -MAX, MAX, p); - TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v); - } - } +var callBind = __nccwpck_require__(86815); +var gOPD = __nccwpck_require__(18501); - // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or - // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. - // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}' - if (obj.hasOwnProperty(p = 'RANGE')) { - v = obj[p]; - if (v && v.pop) { - intCheck(v[0], -MAX, -1, p); - intCheck(v[1], 1, MAX, p); - MIN_EXP = v[0]; - MAX_EXP = v[1]; - } else { - intCheck(v, -MAX, MAX, p); - if (v) { - MIN_EXP = -(MAX_EXP = v < 0 ? -v : v); - } else { - throw Error - (bignumberError + p + ' cannot be zero: ' + v); - } - } - } +var hasProtoAccessor; +try { + // eslint-disable-next-line no-extra-parens, no-proto + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} - // CRYPTO {boolean} true or false. - // '[BigNumber Error] CRYPTO not true or false: {v}' - // '[BigNumber Error] crypto unavailable' - if (obj.hasOwnProperty(p = 'CRYPTO')) { - v = obj[p]; - if (v === !!v) { - if (v) { - if (typeof crypto != 'undefined' && crypto && - (crypto.getRandomValues || crypto.randomBytes)) { - CRYPTO = v; - } else { - CRYPTO = !v; - throw Error - (bignumberError + 'crypto unavailable'); - } - } else { - CRYPTO = v; - } - } else { - throw Error - (bignumberError + p + ' not true or false: ' + v); - } - } +// eslint-disable-next-line no-extra-parens +var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - // MODULO_MODE {number} Integer, 0 to 9 inclusive. - // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'MODULO_MODE')) { - v = obj[p]; - intCheck(v, 0, 9, p); - MODULO_MODE = v; - } +var $Object = Object; +var $getPrototypeOf = $Object.getPrototypeOf; - // POW_PRECISION {number} Integer, 0 to MAX inclusive. - // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'POW_PRECISION')) { - v = obj[p]; - intCheck(v, 0, MAX, p); - POW_PRECISION = v; - } +/** @type {import('./get')} */ +module.exports = desc && typeof desc.get === 'function' + ? callBind([desc.get]) + : typeof $getPrototypeOf === 'function' + ? /** @type {import('./get')} */ function getDunder(value) { + // eslint-disable-next-line eqeqeq + return $getPrototypeOf(value == null ? value : $Object(value)); + } + : false; - // FORMAT {object} - // '[BigNumber Error] FORMAT not an object: {v}' - if (obj.hasOwnProperty(p = 'FORMAT')) { - v = obj[p]; - if (typeof v == 'object') FORMAT = v; - else throw Error - (bignumberError + p + ' not an object: ' + v); - } - // ALPHABET {string} - // '[BigNumber Error] ALPHABET invalid: {v}' - if (obj.hasOwnProperty(p = 'ALPHABET')) { - v = obj[p]; +/***/ }), - // Disallow if less than two characters, - // or if it contains '+', '-', '.', whitespace, or a repeated character. - if (typeof v == 'string' && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) { - alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789'; - ALPHABET = v; - } else { - throw Error - (bignumberError + p + ' invalid: ' + v); - } - } +/***/ 76599: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - } else { +var stream = __nccwpck_require__(51642) +var eos = __nccwpck_require__(81205) +var inherits = __nccwpck_require__(44124) +var shift = __nccwpck_require__(66121) - // '[BigNumber Error] Object expected: {v}' - throw Error - (bignumberError + 'Object expected: ' + obj); - } - } +var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from([0]) + : new Buffer([0]) - return { - DECIMAL_PLACES: DECIMAL_PLACES, - ROUNDING_MODE: ROUNDING_MODE, - EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS], - RANGE: [MIN_EXP, MAX_EXP], - CRYPTO: CRYPTO, - MODULO_MODE: MODULO_MODE, - POW_PRECISION: POW_PRECISION, - FORMAT: FORMAT, - ALPHABET: ALPHABET - }; - }; +var onuncork = function(self, fn) { + if (self._corked) self.once('uncork', fn) + else fn() +} +var autoDestroy = function (self, err) { + if (self._autoDestroy) self.destroy(err) +} - /* - * Return true if v is a BigNumber instance, otherwise return false. - * - * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. - * - * v {any} - * - * '[BigNumber Error] Invalid BigNumber: {v}' - */ - BigNumber.isBigNumber = function (v) { - if (!v || v._isBigNumber !== true) return false; - if (!BigNumber.DEBUG) return true; +var destroyer = function(self, end) { + return function(err) { + if (err) autoDestroy(self, err.message === 'premature close' ? null : err) + else if (end && !self._ended) self.end() + } +} - var i, n, - c = v.c, - e = v.e, - s = v.s; +var end = function(ws, fn) { + if (!ws) return fn() + if (ws._writableState && ws._writableState.finished) return fn() + if (ws._writableState) return ws.end(fn) + ws.end() + fn() +} - out: if ({}.toString.call(c) == '[object Array]') { +var noop = function() {} - if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) { +var toStreams2 = function(rs) { + return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) +} - // If the first element is zero, the BigNumber value must be zero. - if (c[0] === 0) { - if (e === 0 && c.length === 1) return true; - break out; - } +var Duplexify = function(writable, readable, opts) { + if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) + stream.Duplex.call(this, opts) - // Calculate number of digits that c[0] should have, based on the exponent. - i = (e + 1) % LOG_BASE; - if (i < 1) i += LOG_BASE; + this._writable = null + this._readable = null + this._readable2 = null - // Calculate number of digits of c[0]. - //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) { - if (String(c[0]).length == i) { + this._autoDestroy = !opts || opts.autoDestroy !== false + this._forwardDestroy = !opts || opts.destroy !== false + this._forwardEnd = !opts || opts.end !== false + this._corked = 1 // start corked + this._ondrain = null + this._drained = false + this._forwarding = false + this._unwrite = null + this._unread = null + this._ended = false - for (i = 0; i < c.length; i++) { - n = c[i]; - if (n < 0 || n >= BASE || n !== mathfloor(n)) break out; - } + this.destroyed = false - // Last element cannot be zero, unless it is the only element. - if (n !== 0) return true; - } - } + if (writable) this.setWritable(writable) + if (readable) this.setReadable(readable) +} - // Infinity/NaN - } else if (c === null && e === null && (s === null || s === 1 || s === -1)) { - return true; - } +inherits(Duplexify, stream.Duplex) - throw Error - (bignumberError + 'Invalid BigNumber: ' + v); - }; +Duplexify.obj = function(writable, readable, opts) { + if (!opts) opts = {} + opts.objectMode = true + opts.highWaterMark = 16 + return new Duplexify(writable, readable, opts) +} +Duplexify.prototype.cork = function() { + if (++this._corked === 1) this.emit('cork') +} - /* - * Return a new BigNumber whose value is the maximum of the arguments. - * - * arguments {number|string|BigNumber} - */ - BigNumber.maximum = BigNumber.max = function () { - return maxOrMin(arguments, -1); - }; +Duplexify.prototype.uncork = function() { + if (this._corked && --this._corked === 0) this.emit('uncork') +} +Duplexify.prototype.setWritable = function(writable) { + if (this._unwrite) this._unwrite() - /* - * Return a new BigNumber whose value is the minimum of the arguments. - * - * arguments {number|string|BigNumber} - */ - BigNumber.minimum = BigNumber.min = function () { - return maxOrMin(arguments, 1); - }; + if (this.destroyed) { + if (writable && writable.destroy) writable.destroy() + return + } + if (writable === null || writable === false) { + this.end() + return + } - /* - * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, - * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing - * zeros are produced). - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' - * '[BigNumber Error] crypto unavailable' - */ - BigNumber.random = (function () { - var pow2_53 = 0x20000000000000; + var self = this + var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) - // Return a 53 bit integer n, where 0 <= n < 9007199254740992. - // Check if Math.random() produces more than 32 bits of randomness. - // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. - // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. - var random53bitInt = (Math.random() * pow2_53) & 0x1fffff - ? function () { return mathfloor(Math.random() * pow2_53); } - : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + - (Math.random() * 0x800000 | 0); }; + var ondrain = function() { + var ondrain = self._ondrain + self._ondrain = null + if (ondrain) ondrain() + } - return function (dp) { - var a, b, e, k, v, - i = 0, - c = [], - rand = new BigNumber(ONE); + var clear = function() { + self._writable.removeListener('drain', ondrain) + unend() + } - if (dp == null) dp = DECIMAL_PLACES; - else intCheck(dp, 0, MAX); + if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks - k = mathceil(dp / LOG_BASE); + this._writable = writable + this._writable.on('drain', ondrain) + this._unwrite = clear - if (CRYPTO) { + this.uncork() // always uncork setWritable +} - // Browsers supporting crypto.getRandomValues. - if (crypto.getRandomValues) { +Duplexify.prototype.setReadable = function(readable) { + if (this._unread) this._unread() - a = crypto.getRandomValues(new Uint32Array(k *= 2)); + if (this.destroyed) { + if (readable && readable.destroy) readable.destroy() + return + } - for (; i < k;) { + if (readable === null || readable === false) { + this.push(null) + this.resume() + return + } - // 53 bits: - // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) - // 11111 11111111 11111111 11111111 11100000 00000000 00000000 - // ((Math.pow(2, 32) - 1) >>> 11).toString(2) - // 11111 11111111 11111111 - // 0x20000 is 2^21. - v = a[i] * 0x20000 + (a[i + 1] >>> 11); + var self = this + var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) - // Rejection sampling: - // 0 <= v < 9007199254740992 - // Probability that v >= 9e15, is - // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 - if (v >= 9e15) { - b = crypto.getRandomValues(new Uint32Array(2)); - a[i] = b[0]; - a[i + 1] = b[1]; - } else { + var onreadable = function() { + self._forward() + } - // 0 <= v <= 8999999999999999 - // 0 <= (v % 1e14) <= 99999999999999 - c.push(v % 1e14); - i += 2; - } - } - i = k / 2; + var onend = function() { + self.push(null) + } - // Node.js supporting crypto.randomBytes. - } else if (crypto.randomBytes) { + var clear = function() { + self._readable2.removeListener('readable', onreadable) + self._readable2.removeListener('end', onend) + unend() + } - // buffer - a = crypto.randomBytes(k *= 7); + this._drained = true + this._readable = readable + this._readable2 = readable._readableState ? readable : toStreams2(readable) + this._readable2.on('readable', onreadable) + this._readable2.on('end', onend) + this._unread = clear - for (; i < k;) { + this._forward() +} - // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 - // 0x100000000 is 2^32, 0x1000000 is 2^24 - // 11111 11111111 11111111 11111111 11111111 11111111 11111111 - // 0 <= v < 9007199254740992 - v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) + - (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) + - (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]; +Duplexify.prototype._read = function() { + this._drained = true + this._forward() +} - if (v >= 9e15) { - crypto.randomBytes(7).copy(a, i); - } else { +Duplexify.prototype._forward = function() { + if (this._forwarding || !this._readable2 || !this._drained) return + this._forwarding = true - // 0 <= (v % 1e14) <= 99999999999999 - c.push(v % 1e14); - i += 7; - } - } - i = k / 7; - } else { - CRYPTO = false; - throw Error - (bignumberError + 'crypto unavailable'); - } - } + var data - // Use Math.random. - if (!CRYPTO) { + while (this._drained && (data = shift(this._readable2)) !== null) { + if (this.destroyed) continue + this._drained = this.push(data) + } - for (; i < k;) { - v = random53bitInt(); - if (v < 9e15) c[i++] = v % 1e14; - } - } + this._forwarding = false +} - k = c[--i]; - dp %= LOG_BASE; +Duplexify.prototype.destroy = function(err, cb) { + if (!cb) cb = noop + if (this.destroyed) return cb(null) + this.destroyed = true - // Convert trailing digits to zeros according to dp. - if (k && dp) { - v = POWS_TEN[LOG_BASE - dp]; - c[i] = mathfloor(k / v) * v; - } + var self = this + process.nextTick(function() { + self._destroy(err) + cb(null) + }) +} - // Remove trailing elements which are zero. - for (; c[i] === 0; c.pop(), i--); +Duplexify.prototype._destroy = function(err) { + if (err) { + var ondrain = this._ondrain + this._ondrain = null + if (ondrain) ondrain(err) + else this.emit('error', err) + } + + if (this._forwardDestroy) { + if (this._readable && this._readable.destroy) this._readable.destroy() + if (this._writable && this._writable.destroy) this._writable.destroy() + } + + this.emit('close') +} + +Duplexify.prototype._write = function(data, enc, cb) { + if (this.destroyed) return + if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) + if (data === SIGNAL_FLUSH) return this._finish(cb) + if (!this._writable) return cb() + + if (this._writable.write(data) === false) this._ondrain = cb + else if (!this.destroyed) cb() +} + +Duplexify.prototype._finish = function(cb) { + var self = this + this.emit('preend') + onuncork(this, function() { + end(self._forwardEnd && self._writable, function() { + // haxx to not emit prefinish twice + if (self._writableState.prefinished === false) self._writableState.prefinished = true + self.emit('prefinish') + onuncork(self, cb) + }) + }) +} - // Zero? - if (i < 0) { - c = [e = 0]; - } else { +Duplexify.prototype.end = function(data, enc, cb) { + if (typeof data === 'function') return this.end(null, null, data) + if (typeof enc === 'function') return this.end(data, null, enc) + this._ended = true + if (data) this.write(data) + if (!this._writableState.ending && !this._writableState.destroyed) this.write(SIGNAL_FLUSH) + return stream.Writable.prototype.end.call(this, cb) +} - // Remove leading elements which are zero and adjust exponent accordingly. - for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE); +module.exports = Duplexify - // Count the digits of the first element of c to determine leading zeros, and... - for (i = 1, v = c[0]; v >= 10; v /= 10, i++); - // adjust the exponent accordingly. - if (i < LOG_BASE) e -= LOG_BASE - i; - } +/***/ }), - rand.e = e; - rand.c = c; - return rand; - }; - })(); +/***/ 11728: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +"use strict"; - /* - * Return a BigNumber whose value is the sum of the arguments. - * - * arguments {number|string|BigNumber} - */ - BigNumber.sum = function () { - var i = 1, - args = arguments, - sum = new BigNumber(args[0]); - for (; i < args.length;) sum = sum.plus(args[i++]); - return sum; - }; +var Buffer = (__nccwpck_require__(21867).Buffer); - // PRIVATE FUNCTIONS +var getParamBytesForAlg = __nccwpck_require__(30528); +var MAX_OCTET = 0x80, + CLASS_UNIVERSAL = 0, + PRIMITIVE_BIT = 0x20, + TAG_SEQ = 0x10, + TAG_INT = 0x02, + ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6), + ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6); - // Called by BigNumber and BigNumber.prototype.toString. - convertBase = (function () { - var decimal = '0123456789'; +function base64Url(base64) { + return base64 + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); +} - /* - * Convert string of baseIn to an array of numbers of baseOut. - * Eg. toBaseOut('255', 10, 16) returns [15, 15]. - * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. - */ - function toBaseOut(str, baseIn, baseOut, alphabet) { - var j, - arr = [0], - arrL, - i = 0, - len = str.length; +function signatureAsBuffer(signature) { + if (Buffer.isBuffer(signature)) { + return signature; + } else if ('string' === typeof signature) { + return Buffer.from(signature, 'base64'); + } - for (; i < len;) { - for (arrL = arr.length; arrL--; arr[arrL] *= baseIn); + throw new TypeError('ECDSA signature must be a Base64 string or a Buffer'); +} - arr[0] += alphabet.indexOf(str.charAt(i++)); +function derToJose(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); - for (j = 0; j < arr.length; j++) { + // the DER encoded param should at most be the param size, plus a padding + // zero, since due to being a signed integer + var maxEncodedParamLength = paramBytes + 1; - if (arr[j] > baseOut - 1) { - if (arr[j + 1] == null) arr[j + 1] = 0; - arr[j + 1] += arr[j] / baseOut | 0; - arr[j] %= baseOut; - } - } - } + var inputLength = signature.length; - return arr.reverse(); - } + var offset = 0; + if (signature[offset++] !== ENCODED_TAG_SEQ) { + throw new Error('Could not find expected "seq"'); + } - // Convert a numeric string of baseIn to a numeric string of baseOut. - // If the caller is toString, we are converting from base 10 to baseOut. - // If the caller is BigNumber, we are converting from baseIn to base 10. - return function (str, baseIn, baseOut, sign, callerIsToString) { - var alphabet, d, e, k, r, x, xc, y, - i = str.indexOf('.'), - dp = DECIMAL_PLACES, - rm = ROUNDING_MODE; + var seqLength = signature[offset++]; + if (seqLength === (MAX_OCTET | 1)) { + seqLength = signature[offset++]; + } - // Non-integer. - if (i >= 0) { - k = POW_PRECISION; + if (inputLength - offset < seqLength) { + throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); + } - // Unlimited precision. - POW_PRECISION = 0; - str = str.replace('.', ''); - y = new BigNumber(baseIn); - x = y.pow(str.length - i); - POW_PRECISION = k; + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "r"'); + } - // Convert str as if an integer, then restore the fraction part by dividing the - // result by its base raised to a power. + var rLength = signature[offset++]; - y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'), - 10, baseOut, decimal); - y.e = y.c.length; - } + if (inputLength - offset - 2 < rLength) { + throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); + } - // Convert the number as integer. + if (maxEncodedParamLength < rLength) { + throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } - xc = toBaseOut(str, baseIn, baseOut, callerIsToString - ? (alphabet = ALPHABET, decimal) - : (alphabet = decimal, ALPHABET)); + var rOffset = offset; + offset += rLength; - // xc now represents str as an integer and converted to baseOut. e is the exponent. - e = k = xc.length; + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "s"'); + } - // Remove trailing zeros. - for (; xc[--k] == 0; xc.pop()); + var sLength = signature[offset++]; - // Zero? - if (!xc[0]) return alphabet.charAt(0); + if (inputLength - offset !== sLength) { + throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); + } - // Does str represent an integer? If so, no need for the division. - if (i < 0) { - --e; - } else { - x.c = xc; - x.e = e; + if (maxEncodedParamLength < sLength) { + throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } - // The sign is needed for correct rounding. - x.s = sign; - x = div(x, y, dp, rm, baseOut); - xc = x.c; - r = x.r; - e = x.e; - } + var sOffset = offset; + offset += sLength; - // xc now represents str converted to baseOut. + if (offset !== inputLength) { + throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); + } - // THe index of the rounding digit. - d = e + dp + 1; + var rPadding = paramBytes - rLength, + sPadding = paramBytes - sLength; - // The rounding digit: the digit to the right of the digit that may be rounded up. - i = xc[d]; + var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength); - // Look at the rounding digits and mode to determine whether to round up. + for (offset = 0; offset < rPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); - k = baseOut / 2; - r = r || d < 0 || xc[d + 1] != null; + offset = paramBytes; - r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) - : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 || - rm == (x.s < 0 ? 8 : 7)); + for (var o = offset; offset < o + sPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); - // If the index of the rounding digit is not greater than zero, or xc represents - // zero, then the result of the base conversion is zero or, if rounding up, a value - // such as 0.00001. - if (d < 1 || !xc[0]) { + dst = dst.toString('base64'); + dst = base64Url(dst); - // 1^-dp or 0 - str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0); - } else { + return dst; +} - // Truncate xc to the required number of decimal places. - xc.length = d; +function countPadding(buf, start, stop) { + var padding = 0; + while (start + padding < stop && buf[start + padding] === 0) { + ++padding; + } - // Round up? - if (r) { + var needsSign = buf[start + padding] >= MAX_OCTET; + if (needsSign) { + --padding; + } - // Rounding up may mean the previous digit has to be rounded up and so on. - for (--baseOut; ++xc[--d] > baseOut;) { - xc[d] = 0; + return padding; +} - if (!d) { - ++e; - xc = [1].concat(xc); - } - } - } +function joseToDer(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); - // Determine trailing zeros. - for (k = xc.length; !xc[--k];); + var signatureBytes = signature.length; + if (signatureBytes !== paramBytes * 2) { + throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); + } - // E.g. [4, 11, 15] becomes 4bf. - for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++])); + var rPadding = countPadding(signature, 0, paramBytes); + var sPadding = countPadding(signature, paramBytes, signature.length); + var rLength = paramBytes - rPadding; + var sLength = paramBytes - sPadding; - // Add leading zeros, decimal point and trailing zeros as required. - str = toFixedPoint(str, e, alphabet.charAt(0)); - } + var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; - // The caller will add the sign. - return str; - }; - })(); + var shortLength = rsBytes < MAX_OCTET; + var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes); - // Perform division in the specified base. Called by div and convertBase. - div = (function () { + var offset = 0; + dst[offset++] = ENCODED_TAG_SEQ; + if (shortLength) { + // Bit 8 has value "0" + // bits 7-1 give the length. + dst[offset++] = rsBytes; + } else { + // Bit 8 of first octet has value "1" + // bits 7-1 give the number of additional length octets. + dst[offset++] = MAX_OCTET | 1; + // length, base 256 + dst[offset++] = rsBytes & 0xff; + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = rLength; + if (rPadding < 0) { + dst[offset++] = 0; + offset += signature.copy(dst, offset, 0, paramBytes); + } else { + offset += signature.copy(dst, offset, rPadding, paramBytes); + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = sLength; + if (sPadding < 0) { + dst[offset++] = 0; + signature.copy(dst, offset, paramBytes); + } else { + signature.copy(dst, offset, paramBytes + sPadding); + } - // Assume non-zero x and k. - function multiply(x, k, base) { - var m, temp, xlo, xhi, - carry = 0, - i = x.length, - klo = k % SQRT_BASE, - khi = k / SQRT_BASE | 0; + return dst; +} - for (x = x.slice(); i--;) { - xlo = x[i] % SQRT_BASE; - xhi = x[i] / SQRT_BASE | 0; - m = khi * xlo + xhi * klo; - temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry; - carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi; - x[i] = temp % base; - } +module.exports = { + derToJose: derToJose, + joseToDer: joseToDer +}; - if (carry) x = [carry].concat(x); - return x; - } +/***/ }), - function compare(a, b, aL, bL) { - var i, cmp; +/***/ 30528: +/***/ ((module) => { - if (aL != bL) { - cmp = aL > bL ? 1 : -1; - } else { +"use strict"; - for (i = cmp = 0; i < aL; i++) { - if (a[i] != b[i]) { - cmp = a[i] > b[i] ? 1 : -1; - break; - } - } - } +function getParamSize(keySize) { + var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); + return result; +} - return cmp; - } +var paramBytesForAlg = { + ES256: getParamSize(256), + ES384: getParamSize(384), + ES512: getParamSize(521) +}; - function subtract(a, b, aL, base) { - var i = 0; +function getParamBytesForAlg(alg) { + var paramBytes = paramBytesForAlg[alg]; + if (paramBytes) { + return paramBytes; + } - // Subtract b from a. - for (; aL--;) { - a[aL] -= i; - i = a[aL] < b[aL] ? 1 : 0; - a[aL] = i * base + a[aL] - b[aL]; - } + throw new Error('Unknown algorithm "' + alg + '"'); +} - // Remove leading zeros. - for (; !a[0] && a.length > 1; a.splice(0, 1)); - } +module.exports = getParamBytesForAlg; - // x: dividend, y: divisor. - return function (x, y, dp, rm, base) { - var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, - yL, yz, - s = x.s == y.s ? 1 : -1, - xc = x.c, - yc = y.c; - // Either NaN, Infinity or 0? - if (!xc || !xc[0] || !yc || !yc[0]) { +/***/ }), - return new BigNumber( +/***/ 81205: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Return NaN if either NaN, or both Infinity or 0. - !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : +var once = __nccwpck_require__(1223); - // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. - xc && xc[0] == 0 || !yc ? s * 0 : s / 0 - ); - } +var noop = function() {}; - q = new BigNumber(s); - qc = q.c = []; - e = x.e - y.e; - s = dp + e + 1; +var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process); - if (!base) { - base = BASE; - e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE); - s = s / LOG_BASE | 0; - } +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; - // Result exponent may be one less then the current value of e. - // The coefficients of the BigNumbers from convertBase may have trailing zeros. - for (i = 0; yc[i] == (xc[i] || 0); i++); +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; - if (yc[i] > (xc[i] || 0)) e--; +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; - if (s < 0) { - qc.push(1); - more = true; - } else { - xL = xc.length; - yL = yc.length; - i = 0; - s += 2; + callback = once(callback || noop); - // Normalise xc and yc so highest order digit of yc is >= base / 2. + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + var cancelled = false; - n = mathfloor(base / (yc[0] + 1)); + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; - // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1. - // if (n > 1 || n++ == 1 && yc[0] < base / 2) { - if (n > 1) { - yc = multiply(yc, n, base); - xc = multiply(xc, n, base); - yL = yc.length; - xL = xc.length; - } + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; - xi = yL; - rem = xc.slice(0, yL); - remL = rem.length; + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; - // Add zeros to make remainder as long as divisor. - for (; remL < yL; rem[remL++] = 0); - yz = yc.slice(); - yz = [0].concat(yz); - yc0 = yc[0]; - if (yc[1] >= base / 2) yc0++; - // Not necessary, but to prevent trial digit n > base, when using base 3. - // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15; + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; - do { - n = 0; + var onerror = function(err) { + callback.call(stream, err); + }; - // Compare divisor and remainder. - cmp = compare(yc, rem, yL, remL); + var onclose = function() { + qnt(onclosenexttick); + }; - // If divisor < remainder. - if (cmp < 0) { + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); + }; - // Calculate trial digit, n. + var onrequest = function() { + stream.req.on('finish', onfinish); + }; - rem0 = rem[0]; - if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } - // n is how many times the divisor goes into the current remainder. - n = mathfloor(rem0 / yc0); + if (isChildProcess(stream)) stream.on('exit', onexit); - // Algorithm: - // product = divisor multiplied by trial digit (n). - // Compare product and remainder. - // If product is greater than remainder: - // Subtract divisor from product, decrement trial digit. - // Subtract product from remainder. - // If product was less than remainder at the last compare: - // Compare new remainder and divisor. - // If remainder is greater than divisor: - // Subtract divisor from remainder, increment trial digit. + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); - if (n > 1) { + return function() { + cancelled = true; + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; - // n may be > base only when base is 3. - if (n >= base) n = base - 1; +module.exports = eos; - // product = divisor * trial digit. - prod = multiply(yc, n, base); - prodL = prod.length; - remL = rem.length; - // Compare product and remainder. - // If product > remainder then trial digit n too high. - // n is 1 too high about 5% of the time, and is not known to have - // ever been more than 1 too high. - while (compare(prod, rem, prodL, remL) == 1) { - n--; +/***/ }), - // Subtract divisor from product. - subtract(prod, yL < prodL ? yz : yc, prodL, base); - prodL = prod.length; - cmp = 1; - } - } else { +/***/ 6123: +/***/ ((module) => { - // n is 0 or 1, cmp is -1. - // If n is 0, there is no need to compare yc and rem again below, - // so change cmp to 1 to avoid it. - // If n is 1, leave cmp as -1, so yc and rem are compared again. - if (n == 0) { +"use strict"; - // divisor < remainder, so n must be at least 1. - cmp = n = 1; - } - // product = divisor - prod = yc.slice(); - prodL = prod.length; - } +/** @type {import('.')} */ +var $defineProperty = Object.defineProperty || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} - if (prodL < remL) prod = [0].concat(prod); +module.exports = $defineProperty; - // Subtract product from remainder. - subtract(rem, prod, remL, base); - remL = rem.length; - // If product was < remainder. - if (cmp == -1) { +/***/ }), - // Compare divisor and new remainder. - // If divisor < new remainder, subtract divisor from remainder. - // Trial digit n too low. - // n is 1 too low about 5% of the time, and very rarely 2 too low. - while (compare(yc, rem, yL, remL) < 1) { - n++; +/***/ 91933: +/***/ ((module) => { - // Subtract divisor from remainder. - subtract(rem, yL < remL ? yz : yc, remL, base); - remL = rem.length; - } - } - } else if (cmp === 0) { - n++; - rem = [0]; - } // else cmp === 1 and n will be 0 +"use strict"; - // Add the next digit, n, to the result array. - qc[i++] = n; - // Update the remainder. - if (rem[0]) { - rem[remL++] = xc[xi] || 0; - } else { - rem = [xc[xi]]; - remL = 1; - } - } while ((xi++ < xL || rem[0] != null) && s--); +/** @type {import('./eval')} */ +module.exports = EvalError; - more = rem[0] != null; - // Leading zero? - if (!qc[0]) qc.splice(0, 1); - } +/***/ }), - if (base == BASE) { +/***/ 28015: +/***/ ((module) => { - // To calculate q.e, first get the number of digits of qc[0]. - for (i = 1, s = qc[0]; s >= 10; s /= 10, i++); +"use strict"; - round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more); - // Caller is convertBase. - } else { - q.e = e; - q.r = +more; - } +/** @type {import('.')} */ +module.exports = Error; - return q; - }; - })(); +/***/ }), - /* - * Return a string representing the value of BigNumber n in fixed-point or exponential - * notation rounded to the specified decimal places or significant digits. - * - * n: a BigNumber. - * i: the index of the last digit required (i.e. the digit that may be rounded up). - * rm: the rounding mode. - * id: 1 (toExponential) or 2 (toPrecision). - */ - function format(n, i, rm, id) { - var c0, e, ne, len, str; +/***/ 54415: +/***/ ((module) => { - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); +"use strict"; - if (!n.c) return n.toString(); - c0 = n.c[0]; - ne = n.e; +/** @type {import('./range')} */ +module.exports = RangeError; - if (i == null) { - str = coeffToString(n.c); - str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) - ? toExponential(str, ne) - : toFixedPoint(str, ne, '0'); - } else { - n = round(new BigNumber(n), i, rm); - // n.e may have changed if the value was rounded up. - e = n.e; +/***/ }), - str = coeffToString(n.c); - len = str.length; +/***/ 46279: +/***/ ((module) => { - // toPrecision returns exponential notation if the number of significant digits - // specified is less than the number of digits necessary to represent the integer - // part of the value in fixed-point notation. +"use strict"; - // Exponential notation. - if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) { - // Append zeros? - for (; len < i; str += '0', len++); - str = toExponential(str, e); +/** @type {import('./ref')} */ +module.exports = ReferenceError; - // Fixed-point notation. - } else { - i -= ne; - str = toFixedPoint(str, e, '0'); - // Append zeros? - if (e + 1 > len) { - if (--i > 0) for (str += '.'; i--; str += '0'); - } else { - i += e - len; - if (i > 0) { - if (e + 1 == len) str += '.'; - for (; i--; str += '0'); - } - } - } - } +/***/ }), - return n.s < 0 && c0 ? '-' + str : str; - } +/***/ 75474: +/***/ ((module) => { +"use strict"; - // Handle BigNumber.max and BigNumber.min. - // If any number is NaN, return NaN. - function maxOrMin(args, n) { - var k, y, - i = 1, - x = new BigNumber(args[0]); - for (; i < args.length; i++) { - y = new BigNumber(args[i]); - if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) { - x = y; - } - } +/** @type {import('./syntax')} */ +module.exports = SyntaxError; - return x; - } +/***/ }), - /* - * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. - * Called by minus, plus and times. - */ - function normalise(n, c, e) { - var i = 1, - j = c.length; +/***/ 6361: +/***/ ((module) => { - // Remove trailing zeros. - for (; !c[--j]; c.pop()); +"use strict"; - // Calculate the base 10 exponent. First get the number of digits of c[0]. - for (j = c[0]; j >= 10; j /= 10, i++); - // Overflow? - if ((e = i + e * LOG_BASE - 1) > MAX_EXP) { +/** @type {import('./type')} */ +module.exports = TypeError; - // Infinity. - n.c = n.e = null; - // Underflow? - } else if (e < MIN_EXP) { +/***/ }), - // Zero. - n.c = [n.e = 0]; - } else { - n.e = e; - n.c = c; - } +/***/ 5065: +/***/ ((module) => { - return n; - } +"use strict"; - // Handle values that fail the validity test in BigNumber. - parseNumeric = (function () { - var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, - dotAfter = /^([^.]+)\.$/, - dotBefore = /^\.([^.]+)$/, - isInfinityOrNaN = /^-?(Infinity|NaN)$/, - whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; +/** @type {import('./uri')} */ +module.exports = URIError; - return function (x, str, isNum, b) { - var base, - s = isNum ? str : str.replace(whitespaceOrPlus, ''); - // No exception on ±Infinity or NaN. - if (isInfinityOrNaN.test(s)) { - x.s = isNaN(s) ? null : s < 0 ? -1 : 1; - } else { - if (!isNum) { +/***/ }), - // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i - s = s.replace(basePrefix, function (m, p1, p2) { - base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8; - return !b || b == base ? p1 : m; - }); +/***/ 78308: +/***/ ((module) => { - if (b) { - base = b; +"use strict"; - // E.g. '1.' to '1', '.1' to '0.1' - s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1'); - } - if (str != s) return new BigNumber(s, base); - } +/** @type {import('.')} */ +module.exports = Object; - // '[BigNumber Error] Not a number: {n}' - // '[BigNumber Error] Not a base {b} number: {n}' - if (BigNumber.DEBUG) { - throw Error - (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); - } - // NaN - x.s = null; - } +/***/ }), - x.c = x.e = null; - } - })(); +/***/ 11770: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +"use strict"; - /* - * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. - * If r is truthy, it is known that there are more digits after the rounding digit. - */ - function round(x, sd, rm, r) { - var d, i, j, k, n, ni, rd, - xc = x.c, - pows10 = POWS_TEN; - // if x is not Infinity or NaN... - if (xc) { +var GetIntrinsic = __nccwpck_require__(74538); - // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. - // n is a base 1e14 number, the value of the element of array x.c containing rd. - // ni is the index of n within x.c. - // d is the number of digits of n. - // i is the index of rd within n including leading zeros. - // j is the actual index of rd within n (if < 0, rd is a leading zero). - out: { +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - // Get the number of digits of the first element of xc. - for (d = 1, k = xc[0]; k >= 10; k /= 10, d++); - i = sd - d; +var hasToStringTag = __nccwpck_require__(99038)(); +var hasOwn = __nccwpck_require__(62157); +var $TypeError = __nccwpck_require__(6361); - // If the rounding digit is in the first element of xc... - if (i < 0) { - i += LOG_BASE; - j = sd; - n = xc[ni = 0]; +var toStringTag = hasToStringTag ? Symbol.toStringTag : null; - // Get the rounding digit at index j of n. - rd = mathfloor(n / pows10[d - j - 1] % 10); - } else { - ni = mathceil((i + 1) / LOG_BASE); +/** @type {import('.')} */ +module.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; + var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; + if ( + (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') + || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') + ) { + throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); + } + if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { + if ($defineProperty) { + $defineProperty(object, toStringTag, { + configurable: !nonConfigurable, + enumerable: false, + value: value, + writable: false + }); + } else { + object[toStringTag] = value; // eslint-disable-line no-param-reassign + } + } +}; - if (ni >= xc.length) { - if (r) { +/***/ }), - // Needed by sqrt. - for (; xc.length <= ni; xc.push(0)); - n = rd = 0; - d = 1; - i %= LOG_BASE; - j = i - LOG_BASE + 1; - } else { - break out; - } - } else { - n = k = xc[ni]; +/***/ 84697: +/***/ ((module, exports) => { - // Get the number of digits of n. - for (d = 1; k >= 10; k /= 10, d++); +"use strict"; +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ - // Get the index of rd within n. - i %= LOG_BASE; - // Get the index of rd within n, adjusted for leading zeros. - // The number of leading zeros of n is given by LOG_BASE - d. - j = i - LOG_BASE + d; +Object.defineProperty(exports, "__esModule", ({ value: true })); - // Get the rounding digit at index j of n. - rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10); - } - } +/** + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private + */ - r = r || sd < 0 || +/** + * Private data for event wrappers. + * @type {WeakMap} + * @private + */ +const privateData = new WeakMap(); - // Are there any non-zero digits after the rounding digit? - // The expression n % pows10[d - j - 1] returns all digits of n to the right - // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. - xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]); +/** + * Cache for wrapper classes. + * @type {WeakMap} + * @private + */ +const wrappers = new WeakMap(); - r = rm < 4 - ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) - : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} - // Check whether the digit to the left of the rounding digit is odd. - ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 || - rm == (x.s < 0 ? 8 : 7)); +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } - if (sd < 1 || !xc[0]) { - xc.length = 0; + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} - if (r) { +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); - // Convert sd to decimal places. - sd -= x.e + 1; + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); - // 1, 0.1, 0.01, 0.001, 0.0001 etc. - xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE]; - x.e = -sd || 0; - } else { + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} - // Zero. - xc[0] = x.e = 0; - } +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, - return x; - } + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, - // Remove excess digits. - if (i == 0) { - xc.length = ni; - k = 1; - ni--; - } else { - xc.length = ni + 1; - k = pows10[LOG_BASE - i]; + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, - // E.g. 56700 becomes 56000 if 7 is the rounding digit. - // j > 0 means i > number of leading zeros of n. - xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0; - } + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, - // Round up? - if (r) { + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, - for (; ;) { + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, - // If the digit to be rounded up is in the first element of xc... - if (ni == 0) { + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, - // i will be the length of xc[0] before k is added. - for (i = 1, j = xc[0]; j >= 10; j /= 10, i++); - j = xc[0] += k; - for (k = 1; j >= 10; j /= 10, k++); + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, - // if i != k the length has increased. - if (i != k) { - x.e++; - if (xc[0] == BASE) xc[0] = 1; - } + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, - break; - } else { - xc[ni] += k; - if (xc[ni] != BASE) break; - xc[ni--] = 0; - k = 1; - } - } - } + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); - // Remove trailing zeros. - for (i = xc.length; xc[--i] === 0; xc.pop()); + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); } + }, - // Overflow? Infinity. - if (x.e > MAX_EXP) { - x.c = x.e = null; + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); - // Underflow? Zero. - } else if (x.e < MIN_EXP) { - x.c = [x.e = 0]; + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); } - } + }, - return x; - } + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, - function valueOf(n) { - var str, - e = n.e; + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, - if (e === null) return n.toString(); + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, - str = coeffToString(n.c); + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, - str = e <= TO_EXP_NEG || e >= TO_EXP_POS - ? toExponential(str, e) - : toFixedPoint(str, e, '0'); + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, - return n.s < 0 ? '-' + str : str; - } + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); - // PROTOTYPE/INSTANCE METHODS + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, - /* - * Return a new BigNumber whose value is the absolute value of this BigNumber. + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated */ - P.absoluteValue = P.abs = function () { - var x = new BigNumber(this); - if (x.s < 0) x.s = 1; - return x; - }; + initEvent() { + // Do nothing. + }, +}; +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); - /* - * Return - * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), - * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), - * 0 if they have the same value, - * or null if the value of either is NaN. - */ - P.comparedTo = function (y, b) { - return compare(this, new BigNumber(y, b)); - }; +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} - /* - * If dp is undefined or null or true or false, return the number of decimal places of the - * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. - * - * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. - * - * [dp] {number} Decimal places: integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - */ - P.decimalPlaces = P.dp = function (dp, rm) { - var c, n, v, - x = this; +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} - if (dp != null) { - intCheck(dp, 0, MAX); - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} - return round(new BigNumber(x), dp + x.e + 1, rm); - } +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } - if (!(c = x.c)) return null; - n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE; + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } - // Subtract the number of trailing zeros of the last number. - if (v = c[v]) for (; v % 10 == 0; v /= 10, n--); - if (n < 0) n = 0; + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); - return n; - }; + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + return CustomEvent +} - /* - * n / 0 = I - * n / N = N - * n / I = 0 - * 0 / n = 0 - * 0 / 0 = N - * 0 / N = N - * 0 / I = 0 - * N / n = N - * N / 0 = N - * N / N = N - * N / I = N - * I / n = I - * I / 0 = I - * I / N = N - * I / I = N - * - * Return a new BigNumber whose value is the value of this BigNumber divided by the value of - * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. - */ - P.dividedBy = P.div = function (y, b) { - return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); - }; +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} - /* - * Return a new BigNumber whose value is the integer part of dividing the value of this - * BigNumber by the value of BigNumber(y, b). - */ - P.dividedToIntegerBy = P.idiv = function (y, b) { - return div(this, new BigNumber(y, b), 0, 1); - }; +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} - /* - * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. - * - * If m is present, return the result modulo m. - * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. - * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. - * - * The modular power operation works efficiently when x, n, and m are integers, otherwise it - * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. - * - * n {number|string|BigNumber} The exponent. An integer. - * [m] {number|string|BigNumber} The modulus. - * - * '[BigNumber Error] Exponent not an integer: {n}' - */ - P.exponentiatedBy = P.pow = function (n, m) { - var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, - x = this; +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} - n = new BigNumber(n); +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} - // Allow NaN and ±Infinity, but not other non-integers. - if (n.c && !n.isInteger()) { - throw Error - (bignumberError + 'Exponent not an integer: ' + valueOf(n)); - } +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} - if (m != null) m = new BigNumber(m); +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ - // Exponent of MAX_SAFE_INTEGER is 15. - nIsBig = n.e > 14; +/** + * @type {WeakMap>} + * @private + */ +const listenersMap = new WeakMap(); - // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0. - if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) { +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; - // The sign of the result of pow when x is negative depends on the evenness of n. - // If +n overflows to ±Infinity, the evenness of n would be not be known. - y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n))); - return m ? y.mod(m) : y; - } +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} - nIsNeg = n.s < 0; +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} - if (m) { +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener + } + node = node.next; + } + return null + }, - // x % m returns NaN if abs(m) is zero, or m is NaN. - if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN); + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); - isModExp = !nIsNeg && x.isInteger() && m.isInteger(); + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } - if (isModExp) x = x.mod(m); + node = node.next; + } - // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15. - // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15. - } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 - // [1, 240000000] - ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 - // [80000000000000] [99999750000000] - : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) { + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; + } + } + }, + configurable: true, + enumerable: true, + } +} - // If x is negative and n is odd, k = -0, else k = 0. - k = x.s < 0 && isOdd(n) ? -0 : 0; +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} - // If x >= 1, k = ±Infinity. - if (x.e > -1) k = 1 / k; +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } - // If n is negative return ±0, else return ±Infinity. - return new BigNumber(nIsNeg ? 1 / k : k); + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); - } else if (POW_PRECISION) { + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } - // Truncating each coefficient array to a length of k after each multiplication - // equates to truncating significant digits to POW_PRECISION + [28, 41], - // i.e. there will be a minimum of 28 guard digits retained. - k = mathceil(POW_PRECISION / LOG_BASE + 2); - } + return CustomEventTarget +} - if (nIsBig) { - half = new BigNumber(0.5); - if (nIsNeg) n.s = 1; - nIsOdd = isOdd(n); - } else { - i = Math.abs(+valueOf(n)); - nIsOdd = i % 2; - } +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} - y = new BigNumber(ONE); +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } - // Performs 54 loop iterations for n of 9007199254740991. - for (; ;) { + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; - if (nIsOdd) { - y = y.times(x); - if (!y.c) break; + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } - if (k) { - if (y.c.length > k) y.c.length = k; - } else if (isModExp) { - y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m)); - } + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; } - if (i) { - i = mathfloor(i / 2); - if (i === 0) break; - nIsOdd = i % 2; - } else { - n = n.times(half); - round(n, n.e + 1, 1); + // Add it. + prev.next = newNode; + }, - if (n.e > 14) { - nIsOdd = isOdd(n); - } else { - i = +valueOf(n); - if (i === 0) break; - nIsOdd = i % 2; - } + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return } - x = x.times(x); + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; - if (k) { - if (x.c && x.c.length > k) x.c.length = k; - } else if (isModExp) { - x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m)); + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + return + } + + prev = node; + node = node.next; } - } + }, - if (isModExp) return y; - if (nIsNeg) y = ONE.div(y); + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } - return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; - }; + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer - * using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' - */ - P.integerValue = function (rm) { - var n = new BigNumber(this); - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); - return round(n, n.e + 1, rm); - }; + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); + } + } else { + prev = node; + } + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); + } + } + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } - /* - * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), - * otherwise return false. - */ - P.isEqualTo = P.eq = function (y, b) { - return compare(this, new BigNumber(y, b)) === 0; - }; + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + node = node.next; + } + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); - /* - * Return true if the value of this BigNumber is a finite number, otherwise return false. - */ - P.isFinite = function () { - return !!this.c; - }; + return !wrappedEvent.defaultPrevented + }, +}; +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); - /* - * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), - * otherwise return false. - */ - P.isGreaterThan = P.gt = function (y, b) { - return compare(this, new BigNumber(y, b)) > 0; - }; +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} +exports.defineEventAttribute = defineEventAttribute; +exports.EventTarget = EventTarget; +exports["default"] = EventTarget; - /* - * Return true if the value of this BigNumber is greater than or equal to the value of - * BigNumber(y, b), otherwise return false. - */ - P.isGreaterThanOrEqualTo = P.gte = function (y, b) { - return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0; +module.exports = EventTarget +module.exports.EventTarget = module.exports["default"] = EventTarget +module.exports.defineEventAttribute = defineEventAttribute +//# sourceMappingURL=event-target-shim.js.map - }; +/***/ }), - /* - * Return true if the value of this BigNumber is an integer, otherwise return false. - */ - P.isInteger = function () { - return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; - }; +/***/ 38171: +/***/ ((module) => { +"use strict"; - /* - * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), - * otherwise return false. - */ - P.isLessThan = P.lt = function (y, b) { - return compare(this, new BigNumber(y, b)) < 0; - }; +var hasOwn = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; - /* - * Return true if the value of this BigNumber is less than or equal to the value of - * BigNumber(y, b), otherwise return false. - */ - P.isLessThanOrEqualTo = P.lte = function (y, b) { - return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0; - }; +var isArray = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + return toStr.call(arr) === '[object Array]'; +}; - /* - * Return true if the value of this BigNumber is NaN, otherwise return false. - */ - P.isNaN = function () { - return !this.s; - }; +var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } - /* - * Return true if the value of this BigNumber is negative, otherwise return false. - */ - P.isNegative = function () { - return this.s < 0; - }; + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) { /**/ } + return typeof key === 'undefined' || hasOwn.call(obj, key); +}; - /* - * Return true if the value of this BigNumber is positive, otherwise return false. - */ - P.isPositive = function () { - return this.s > 0; - }; +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } - /* - * Return true if the value of this BigNumber is 0 or -0, otherwise return false. - */ - P.isZero = function () { - return !!this.c && this.c[0] == 0; - }; + return obj[name]; +}; +module.exports = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; - /* - * n - 0 = n - * n - N = N - * n - I = -I - * 0 - n = -n - * 0 - 0 = 0 - * 0 - N = N - * 0 - I = -I - * N - n = N - * N - 0 = N - * N - N = N - * N - I = N - * I - n = I - * I - 0 = I - * I - N = N - * I - I = N - * - * Return a new BigNumber whose value is the value of this BigNumber minus the value of - * BigNumber(y, b). - */ - P.minus = function (y, b) { - var i, j, t, xLTy, - x = this, - a = x.s; + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { + target = {}; + } - y = new BigNumber(y, b); - b = y.s; + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = getProperty(target, name); + copy = getProperty(options, name); - // Either NaN? - if (!a || !b) return new BigNumber(NaN); + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } - // Signs differ? - if (a != b) { - y.s = -b; - return x.plus(y); - } + // Never move original objects, clone them + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); - var xe = x.e / LOG_BASE, - ye = y.e / LOG_BASE, - xc = x.c, - yc = y.c; + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + setProperty(target, { name: name, newValue: copy }); + } + } + } + } + } - if (!xe || !ye) { + // Return the modified object + return target; +}; - // Either Infinity? - if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN); - // Either zero? - if (!xc[0] || !yc[0]) { +/***/ }), - // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. - return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : +/***/ 31133: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity - ROUNDING_MODE == 3 ? -0 : 0); - } - } +var debug; - xe = bitFloor(xe); - ye = bitFloor(ye); - xc = xc.slice(); +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = __nccwpck_require__(38237)("follow-redirects"); + } + catch (error) { /* */ } + if (typeof debug !== "function") { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; - // Determine which is the bigger number. - if (a = xe - ye) { - if (xLTy = a < 0) { - a = -a; - t = xc; - } else { - ye = xe; - t = yc; - } +/***/ }), - t.reverse(); +/***/ 67707: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Prepend zeros to equalise exponents. - for (b = a; b--; t.push(0)); - t.reverse(); - } else { +var url = __nccwpck_require__(57310); +var URL = url.URL; +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var Writable = (__nccwpck_require__(12781).Writable); +var assert = __nccwpck_require__(39491); +var debug = __nccwpck_require__(31133); - // Exponents equal. Check digit by digit. - j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b; +// Preventive platform detection +// istanbul ignore next +(function detectUnsupportedEnvironment() { + var looksLikeNode = typeof process !== "undefined"; + var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; + var looksLikeV8 = isFunction(Error.captureStackTrace); + if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { + console.warn("The follow-redirects package should be excluded from browser builds."); + } +}()); - for (a = b = 0; b < j; b++) { +// Whether to use the native URL object or the legacy url module +var useNativeURL = false; +try { + assert(new URL("")); +} +catch (error) { + useNativeURL = error.code === "ERR_INVALID_URL"; +} - if (xc[b] != yc[b]) { - xLTy = xc[b] < yc[b]; - break; - } - } - } +// URL fields to preserve in copy operations +var preservedUrlFields = [ + "auth", + "host", + "hostname", + "href", + "path", + "pathname", + "port", + "protocol", + "query", + "search", + "hash", +]; - // x < y? Point xc to the array of the bigger number. - if (xLTy) { - t = xc; - xc = yc; - yc = t; - y.s = -y.s; - } +// Create handlers that pass events from native requests +var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; +var eventHandlers = Object.create(null); +events.forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); - b = (j = yc.length) - (i = xc.length); +// Error types with codes +var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError +); +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded", + RedirectionError +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); - // Append zeros to xc if shorter. - // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. - if (b > 0) for (; b--; xc[i++] = 0); - b = BASE - 1; +// istanbul ignore next +var destroy = Writable.prototype.destroy || noop; - // Subtract yc from xc. - for (; j > a;) { +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; - if (xc[--j] < yc[j]) { - for (i = j; i && !xc[--i]; xc[i] = b); - --xc[i]; - xc[j] += BASE; - } + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } - xc[j] -= yc[j]; - } + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { + try { + self._processResponse(response); + } + catch (cause) { + self.emit("error", cause instanceof RedirectionError ? + cause : new RedirectionError({ cause: cause })); + } + }; - // Remove leading zeros and adjust exponent accordingly. - for (; xc[0] == 0; xc.splice(0, 1), --ye); + // Perform the first request + this._performRequest(); +} +RedirectableRequest.prototype = Object.create(Writable.prototype); - // Zero? - if (!xc[0]) { +RedirectableRequest.prototype.abort = function () { + destroyRequest(this._currentRequest); + this._currentRequest.abort(); + this.emit("abort"); +}; - // Following IEEE 754 (2008) 6.3, - // n - n = +0 but n - n = -0 when rounding towards -Infinity. - y.s = ROUNDING_MODE == 3 ? -1 : 1; - y.c = [y.e = 0]; - return y; - } +RedirectableRequest.prototype.destroy = function (error) { + destroyRequest(this._currentRequest, error); + destroy.call(this, error); + return this; +}; - // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity - // for finite x and y. - return normalise(y, xc, ye); - }; +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } + + // Validate input and shift parameters if necessary + if (!isString(data) && !isBuffer(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); + } + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; - /* - * n % 0 = N - * n % N = N - * n % I = n - * 0 % n = 0 - * -0 % n = -0 - * 0 % 0 = N - * 0 % N = N - * 0 % I = 0 - * N % n = N - * N % 0 = N - * N % N = N - * N % I = N - * I % n = N - * I % 0 = N - * I % N = N - * I % I = N - * - * Return a new BigNumber whose value is the value of this BigNumber modulo the value of - * BigNumber(y, b). The result depends on the value of MODULO_MODE. - */ - P.modulo = P.mod = function (y, b) { - var q, s, - x = this; +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (isFunction(data)) { + callback = data; + data = encoding = null; + } + else if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } - y = new BigNumber(y, b); + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; - // Return NaN if x is Infinity or NaN, or y is NaN or zero. - if (!x.c || !y.s || y.c && !y.c[0]) { - return new BigNumber(NaN); +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; - // Return x if y is Infinity or x is zero. - } else if (!y.c || x.c && !x.c[0]) { - return new BigNumber(x); - } +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; - if (MODULO_MODE == 9) { +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + var self = this; - // Euclidian division: q = sign(y) * floor(x / abs(y)) - // r = x - qy where 0 <= r < abs(y) - s = y.s; - y.s = 1; - q = div(x, y, 0, 3); - y.s = s; - q.s *= s; - } else { - q = div(x, y, 0, MODULO_MODE); - } + // Destroys the socket on timeout + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); + } - y = x.minus(q.times(y)); + // Sets up a timer to trigger a timeout event + function startTimer(socket) { + if (self._timeout) { + clearTimeout(self._timeout); + } + self._timeout = setTimeout(function () { + self.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); + } - // To match JavaScript %, ensure sign of zero is sign of dividend. - if (!y.c[0] && MODULO_MODE == 1) y.s = x.s; + // Stops a timeout from triggering + function clearTimer() { + // Clear the timeout + if (self._timeout) { + clearTimeout(self._timeout); + self._timeout = null; + } - return y; - }; + // Clean up all attached listeners + self.removeListener("abort", clearTimer); + self.removeListener("error", clearTimer); + self.removeListener("response", clearTimer); + self.removeListener("close", clearTimer); + if (callback) { + self.removeListener("timeout", callback); + } + if (!self.socket) { + self._currentRequest.removeListener("socket", startTimer); + } + } + // Attach callback if passed + if (callback) { + this.on("timeout", callback); + } - /* - * n * 0 = 0 - * n * N = N - * n * I = I - * 0 * n = 0 - * 0 * 0 = 0 - * 0 * N = N - * 0 * I = N - * N * n = N - * N * 0 = N - * N * N = N - * N * I = N - * I * n = I - * I * 0 = N - * I * N = N - * I * I = I - * - * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value - * of BigNumber(y, b). - */ - P.multipliedBy = P.times = function (y, b) { - var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, - base, sqrtBase, - x = this, - xc = x.c, - yc = (y = new BigNumber(y, b)).c; + // Start the timer if or when the socket is opened + if (this.socket) { + startTimer(this.socket); + } + else { + this._currentRequest.once("socket", startTimer); + } - // Either NaN, ±Infinity or ±0? - if (!xc || !yc || !xc[0] || !yc[0]) { + // Clean up on events + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); + this.on("close", clearTimer); - // Return NaN if either is NaN, or one is 0 and the other is Infinity. - if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) { - y.c = y.e = y.s = null; - } else { - y.s *= x.s; + return this; +}; - // Return ±Infinity if either is ±Infinity. - if (!xc || !yc) { - y.c = y.e = null; +// Proxy all other public ClientRequest methods +[ + "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); - // Return ±0 if either is ±0. - } else { - y.c = [0]; - y.e = 0; - } - } +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); - return y; - } +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } - e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE); - y.s *= x.s; - xcL = xc.length; - ycL = yc.length; + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } - // Ensure xc points to longer array and xcL to its length. - if (xcL < ycL) { - zc = xc; - xc = yc; - yc = zc; - i = xcL; - xcL = ycL; - ycL = i; - } + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; - // Initialise the result array with zeros. - for (i = xcL + ycL, zc = []; i--; zc.push(0)); - base = BASE; - sqrtBase = SQRT_BASE; +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + throw new TypeError("Unsupported protocol " + protocol); + } - for (i = ycL; --i >= 0;) { - c = 0; - ylo = yc[i] % sqrtBase; - yhi = yc[i] / sqrtBase | 0; + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; + } - for (k = xcL, j = i + k; j > i;) { - xlo = xc[--k] % sqrtBase; - xhi = xc[k] / sqrtBase | 0; - m = yhi * xlo + xhi * ylo; - xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c; - c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi; - zc[j--] = xlo % base; - } + // Create the native request and set up its event handlers + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); + } - zc[j] = c; - } + // RFC7230§5.3.1: When making a request directly to an origin server, […] + // a client MUST send only the absolute path […] as the request-target. + this._currentUrl = /^\//.test(this._options.path) ? + url.format(this._options) : + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path; - if (c) { - ++e; - } else { - zc.splice(0, 1); + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + // istanbul ignore else + if (request === self._currentRequest) { + // Report any write errors + // istanbul ignore if + if (error) { + self.emit("error", error); + } + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + // istanbul ignore else + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); + } } + }()); + } +}; - return normalise(y, zc, e); - }; +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. - /* - * Return a new BigNumber whose value is the value of this BigNumber negated, - * i.e. multiplied by -1. - */ - P.negated = function () { - var x = new BigNumber(this); - x.s = -x.s || null; - return x; - }; + // If the response is not a redirect; return it as-is + var location = response.headers.location; + if (!location || this._options.followRedirects === false || + statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + // Clean up + this._requestBodyBuffers = []; + return; + } - /* - * n + 0 = n - * n + N = N - * n + I = I - * 0 + n = n - * 0 + 0 = 0 - * 0 + N = N - * 0 + I = I - * N + n = N - * N + 0 = N - * N + N = N - * N + I = N - * I + n = I - * I + 0 = I - * I + N = N - * I + I = I - * - * Return a new BigNumber whose value is the value of this BigNumber plus the value of - * BigNumber(y, b). - */ - P.plus = function (y, b) { - var t, - x = this, - a = x.s; + // The response is a redirect, so abort the current request + destroyRequest(this._currentRequest); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); - y = new BigNumber(y, b); - b = y.s; + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + throw new TooManyRedirectsError(); + } - // Either NaN? - if (!a || !b) return new BigNumber(NaN); + // Store the request headers if applicable + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host"), + }, this._options.headers); + } - // Signs differ? - if (a != b) { - y.s = -b; - return x.minus(y); - } + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } - var xe = x.e / LOG_BASE, - ye = y.e / LOG_BASE, - xc = x.c, - yc = y.c; + // Drop the Host header, as the redirect might lead to a different host + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - if (!xe || !ye) { + // If the redirect is relative, carry over the host of the last request + var currentUrlParts = parseUrl(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : + url.format(Object.assign(currentUrlParts, { host: currentHost })); - // Return ±Infinity if either ±Infinity. - if (!xc || !yc) return new BigNumber(a / 0); + // Create the redirected request + var redirectUrl = resolveUrl(location, currentUrl); + debug("redirecting to", redirectUrl.href); + this._isRedirect = true; + spreadUrlObject(redirectUrl, this._options); - // Either zero? - // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. - if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0); - } + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if (redirectUrl.protocol !== currentUrlParts.protocol && + redirectUrl.protocol !== "https:" || + redirectUrl.host !== currentHost && + !isSubdomain(redirectUrl.host, currentHost)) { + removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); + } - xe = bitFloor(xe); - ye = bitFloor(ye); - xc = xc.slice(); + // Evaluate the beforeRedirect callback + if (isFunction(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode: statusCode, + }; + var requestDetails = { + url: currentUrl, + method: method, + headers: requestHeaders, + }; + beforeRedirect(this._options, responseDetails, requestDetails); + this._sanitizeOptions(this._options); + } - // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. - if (a = xe - ye) { - if (a > 0) { - ye = xe; - t = yc; - } else { - a = -a; - t = xc; - } + // Perform the redirected request + this._performRequest(); +}; - t.reverse(); - for (; a--; t.push(0)); - t.reverse(); - } +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; - a = xc.length; - b = yc.length; + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - // Point xc to the longer array, and b to the shorter length. - if (a - b < 0) { - t = yc; - yc = xc; - xc = t; - b = a; + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters, ensuring that input is an object + if (isURL(input)) { + input = spreadUrlObject(input); } - - // Only start adding at yc.length - 1 as the further digits of xc can be ignored. - for (a = 0; b;) { - a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0; - xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; + else if (isString(input)) { + input = spreadUrlObject(parseUrl(input)); + } + else { + callback = options; + options = validateUrl(input); + input = { protocol: protocol }; + } + if (isFunction(options)) { + callback = options; + options = null; } - if (a) { - xc = [a].concat(xc); - ++ye; + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString(options.host) && !isString(options.hostname)) { + options.hostname = "::1"; } - // No need to check for zero, as +x + +y != 0 && -x + -y != 0 - // ye = MAX_EXP + 1 possible - return normalise(y, xc, ye); - }; + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } - /* - * If sd is undefined or null or true or false, return the number of significant digits of - * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. - * If sd is true include integer-part trailing zeros in the count. - * - * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. - * - * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. - * boolean: whether to count integer-part trailing zeros: true or false. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' - */ - P.precision = P.sd = function (sd, rm) { - var c, n, v, - x = this; + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; +} - if (sd != null && sd !== !!sd) { - intCheck(sd, 1, MAX); - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); +function noop() { /* empty */ } - return round(new BigNumber(x), sd, rm); - } +function parseUrl(input) { + var parsed; + // istanbul ignore else + if (useNativeURL) { + parsed = new URL(input); + } + else { + // Ensure the URL is valid and absolute + parsed = validateUrl(url.parse(input)); + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); + } + } + return parsed; +} - if (!(c = x.c)) return null; - v = c.length - 1; - n = v * LOG_BASE + 1; +function resolveUrl(relative, base) { + // istanbul ignore next + return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); +} - if (v = c[v]) { +function validateUrl(input) { + if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { + throw new InvalidUrlError({ input: input.href || input }); + } + if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { + throw new InvalidUrlError({ input: input.href || input }); + } + return input; +} - // Subtract the number of trailing zeros of the last element. - for (; v % 10 == 0; v /= 10, n--); +function spreadUrlObject(urlObject, target) { + var spread = target || {}; + for (var key of preservedUrlFields) { + spread[key] = urlObject[key]; + } - // Add the number of digits of the first element. - for (v = c[0]; v >= 10; v /= 10, n++); - } + // Fix IPv6 hostname + if (spread.hostname.startsWith("[")) { + spread.hostname = spread.hostname.slice(1, -1); + } + // Ensure port is a number + if (spread.port !== "") { + spread.port = Number(spread.port); + } + // Concatenate path + spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; - if (sd && x.e + 1 > n) n = x.e + 1; + return spread; +} - return n; - }; +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } + } + return (lastValue === null || typeof lastValue === "undefined") ? + undefined : String(lastValue).trim(); +} +function createErrorType(code, message, baseClass) { + // Create constructor + function CustomError(properties) { + // istanbul ignore else + if (isFunction(Error.captureStackTrace)) { + Error.captureStackTrace(this, this.constructor); + } + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; + } - /* - * Return a new BigNumber whose value is the value of this BigNumber shifted by k places - * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. - * - * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' - */ - P.shiftedBy = function (k) { - intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); - return this.times('1e' + k); - }; + // Attach constructor and set default properties + CustomError.prototype = new (baseClass || Error)(); + Object.defineProperties(CustomError.prototype, { + constructor: { + value: CustomError, + enumerable: false, + }, + name: { + value: "Error [" + code + "]", + enumerable: false, + }, + }); + return CustomError; +} +function destroyRequest(request, error) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); + } + request.on("error", noop); + request.destroy(error); +} - /* - * sqrt(-n) = N - * sqrt(N) = N - * sqrt(-I) = N - * sqrt(I) = I - * sqrt(0) = 0 - * sqrt(-0) = -0 - * - * Return a new BigNumber whose value is the square root of the value of this BigNumber, - * rounded according to DECIMAL_PLACES and ROUNDING_MODE. - */ - P.squareRoot = P.sqrt = function () { - var m, n, r, rep, t, - x = this, - c = x.c, - s = x.s, - e = x.e, - dp = DECIMAL_PLACES + 4, - half = new BigNumber('0.5'); +function isSubdomain(subdomain, domain) { + assert(isString(subdomain) && isString(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); +} - // Negative/NaN/Infinity/zero? - if (s !== 1 || !c || !c[0]) { - return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); - } +function isString(value) { + return typeof value === "string" || value instanceof String; +} - // Initial estimate. - s = Math.sqrt(+valueOf(x)); +function isFunction(value) { + return typeof value === "function"; +} + +function isBuffer(value) { + return typeof value === "object" && ("length" in value); +} + +function isURL(value) { + return URL && value instanceof URL; +} + +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; - // Math.sqrt underflow/overflow? - // Pass x to Math.sqrt as integer, then adjust the exponent of the result. - if (s == 0 || s == 1 / 0) { - n = coeffToString(c); - if ((n.length + e) % 2 == 0) n += '0'; - s = Math.sqrt(+n); - e = bitFloor((e + 1) / 2) - (e < 0 || e % 2); - if (s == 1 / 0) { - n = '5e' + e; - } else { - n = s.toExponential(); - n = n.slice(0, n.indexOf('e') + 1) + e; - } +/***/ }), - r = new BigNumber(n); - } else { - r = new BigNumber(s + ''); - } +/***/ 19320: +/***/ ((module) => { - // Check for zero. - // r could be zero if MIN_EXP is changed after the this value was created. - // This would cause a division by zero (x/t) and hence Infinity below, which would cause - // coeffToString to throw. - if (r.c[0]) { - e = r.e; - s = e + dp; - if (s < 3) s = 0; +"use strict"; - // Newton-Raphson iteration. - for (; ;) { - t = r; - r = half.times(t.plus(div(x, t, dp, 1))); - if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) { +/* eslint no-invalid-this: 1 */ - // The exponent of r may here be one less than the final result exponent, - // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits - // are indexed correctly. - if (r.e < e) --s; - n = n.slice(s - 3, s + 1); +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; - // The 4th rounding digit may be in error by -1 so if the 4 rounding digits - // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the - // iteration. - if (n == '9999' || !rep && n == '4999') { +var concatty = function concatty(a, b) { + var arr = []; - // On the first iteration only, check to see if rounding up gives the - // exact result as the nines may infinitely repeat. - if (!rep) { - round(t, t.e + DECIMAL_PLACES + 2, 0); + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } - if (t.times(t).eq(x)) { - r = t; - break; - } - } + return arr; +}; - dp += 4; - s += 4; - rep = 1; - } else { +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; - // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact - // result. If not, then there are further digits and m will be truthy. - if (!+n || !+n.slice(1) && n.charAt(0) == '5') { +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; - // Truncate to the first rounding digit. - round(r, r.e + DECIMAL_PLACES + 2, 1); - m = !r.times(r).eq(x); - } +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); - break; + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; } - } + return this; } - } + return target.apply( + that, + concatty(args, arguments) + ); - return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); }; + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } - /* - * Return a string representing the value of this BigNumber in exponential notation and - * rounded using ROUNDING_MODE to dp fixed decimal places. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - */ - P.toExponential = function (dp, rm) { - if (dp != null) { - intCheck(dp, 0, MAX); - dp++; - } - return format(this, dp, rm, 1); - }; + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounding - * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', - * but e.g. (-0.00001).toFixed(0) is '-0'. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - */ - P.toFixed = function (dp, rm) { - if (dp != null) { - intCheck(dp, 0, MAX); - dp = dp + this.e + 1; - } - return format(this, dp, rm); - }; + return bound; +}; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounded - * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties - * of the format or FORMAT object (see BigNumber.set). - * - * The formatting object may contain some or all of the properties shown below. - * - * FORMAT = { - * prefix: '', - * groupSize: 3, - * secondaryGroupSize: 0, - * groupSeparator: ',', - * decimalSeparator: '.', - * fractionGroupSize: 0, - * fractionGroupSeparator: '\xA0', // non-breaking space - * suffix: '' - * }; - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * [format] {object} Formatting options. See FORMAT pbject above. +/***/ }), + +/***/ 88334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var implementation = __nccwpck_require__(19320); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 66129: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2018 Google LLC +// 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. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _a; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GaxiosError = exports.GAXIOS_ERROR_SYMBOL = void 0; +exports.defaultErrorRedactor = defaultErrorRedactor; +const url_1 = __nccwpck_require__(57310); +const util_1 = __nccwpck_require__(21980); +const extend_1 = __importDefault(__nccwpck_require__(38171)); +/** + * Support `instanceof` operator for `GaxiosError`s in different versions of this library. + * + * @see {@link GaxiosError[Symbol.hasInstance]} + */ +exports.GAXIOS_ERROR_SYMBOL = Symbol.for(`${util_1.pkg.name}-gaxios-error`); +/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ +class GaxiosError extends Error { + /** + * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - * '[BigNumber Error] Argument not an object: {format}' + * @see {@link GAXIOS_ERROR_SYMBOL} + * @see {@link GaxiosError[GAXIOS_ERROR_SYMBOL]} */ - P.toFormat = function (dp, rm, format) { - var str, - x = this; - - if (format == null) { - if (dp != null && rm && typeof rm == 'object') { - format = rm; - rm = null; - } else if (dp && typeof dp == 'object') { - format = dp; - dp = rm = null; - } else { - format = FORMAT; + static [(_a = exports.GAXIOS_ERROR_SYMBOL, Symbol.hasInstance)](instance) { + if (instance && + typeof instance === 'object' && + exports.GAXIOS_ERROR_SYMBOL in instance && + instance[exports.GAXIOS_ERROR_SYMBOL] === util_1.pkg.version) { + return true; } - } else if (typeof format != 'object') { - throw Error - (bignumberError + 'Argument not an object: ' + format); - } + // fallback to native + return Function.prototype[Symbol.hasInstance].call(GaxiosError, instance); + } + constructor(message, config, response, error) { + var _b; + super(message); + this.config = config; + this.response = response; + this.error = error; + /** + * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. + * + * @see {@link GAXIOS_ERROR_SYMBOL} + * @see {@link GaxiosError[Symbol.hasInstance]} + * @see {@link https://github.com/microsoft/TypeScript/issues/13965#issuecomment-278570200} + * @see {@link https://stackoverflow.com/questions/46618852/require-and-instanceof} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance#reverting_to_default_instanceof_behavior} + */ + this[_a] = util_1.pkg.version; + // deep-copy config as we do not want to mutate + // the existing config for future retries/use + this.config = (0, extend_1.default)(true, {}, config); + if (this.response) { + this.response.config = (0, extend_1.default)(true, {}, this.response.config); + } + if (this.response) { + try { + this.response.data = translateData(this.config.responseType, (_b = this.response) === null || _b === void 0 ? void 0 : _b.data); + } + catch (_c) { + // best effort - don't throw an error within an error + // we could set `this.response.config.responseType = 'unknown'`, but + // that would mutate future calls with this config object. + } + this.status = this.response.status; + } + if (error && 'code' in error && error.code) { + this.code = error.code; + } + if (config.errorRedactor) { + config.errorRedactor({ + config: this.config, + response: this.response, + }); + } + } +} +exports.GaxiosError = GaxiosError; +function translateData(responseType, data) { + switch (responseType) { + case 'stream': + return data; + case 'json': + return JSON.parse(JSON.stringify(data)); + case 'arraybuffer': + return JSON.parse(Buffer.from(data).toString('utf8')); + case 'blob': + return JSON.parse(data.text()); + default: + return data; + } +} +/** + * An experimental error redactor. + * + * @param config Config to potentially redact properties of + * @param response Config to potentially redact properties of + * + * @experimental + */ +function defaultErrorRedactor(data) { + const REDACT = '< - See `errorRedactor` option in `gaxios` for configuration>.'; + function redactHeaders(headers) { + if (!headers) + return; + for (const key of Object.keys(headers)) { + // any casing of `Authentication` + if (/^authentication$/i.test(key)) { + headers[key] = REDACT; + } + // any casing of `Authorization` + if (/^authorization$/i.test(key)) { + headers[key] = REDACT; + } + // anything containing secret, such as 'client secret' + if (/secret/i.test(key)) { + headers[key] = REDACT; + } + } + } + function redactString(obj, key) { + if (typeof obj === 'object' && + obj !== null && + typeof obj[key] === 'string') { + const text = obj[key]; + if (/grant_type=/i.test(text) || + /assertion=/i.test(text) || + /secret/i.test(text)) { + obj[key] = REDACT; + } + } + } + function redactObject(obj) { + if (typeof obj === 'object' && obj !== null) { + if ('grant_type' in obj) { + obj['grant_type'] = REDACT; + } + if ('assertion' in obj) { + obj['assertion'] = REDACT; + } + if ('client_secret' in obj) { + obj['client_secret'] = REDACT; + } + } + } + if (data.config) { + redactHeaders(data.config.headers); + redactString(data.config, 'data'); + redactObject(data.config.data); + redactString(data.config, 'body'); + redactObject(data.config.body); + try { + const url = new url_1.URL('', data.config.url); + if (url.searchParams.has('token')) { + url.searchParams.set('token', REDACT); + } + if (url.searchParams.has('client_secret')) { + url.searchParams.set('client_secret', REDACT); + } + data.config.url = url.toString(); + } + catch (_b) { + // ignore error - no need to parse an invalid URL + } + } + if (data.response) { + defaultErrorRedactor({ config: data.response.config }); + redactHeaders(data.response.headers); + redactString(data.response, 'data'); + redactObject(data.response.data); + } + return data; +} +//# sourceMappingURL=common.js.map - str = x.toFixed(dp, rm); +/***/ }), - if (x.c) { - var i, - arr = str.split('.'), - g1 = +format.groupSize, - g2 = +format.secondaryGroupSize, - groupSeparator = format.groupSeparator || '', - intPart = arr[0], - fractionPart = arr[1], - isNeg = x.s < 0, - intDigits = isNeg ? intPart.slice(1) : intPart, - len = intDigits.length; +/***/ 28133: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - if (g2) { - i = g1; - g1 = g2; - g2 = i; - len -= i; +"use strict"; + +// Copyright 2018 Google LLC +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _Gaxios_instances, _a, _Gaxios_urlMayUseProxy, _Gaxios_applyRequestInterceptors, _Gaxios_applyResponseInterceptors, _Gaxios_prepareRequest, _Gaxios_proxyAgent, _Gaxios_getProxyAgent; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Gaxios = void 0; +const extend_1 = __importDefault(__nccwpck_require__(38171)); +const https_1 = __nccwpck_require__(95687); +const node_fetch_1 = __importDefault(__nccwpck_require__(80467)); +const querystring_1 = __importDefault(__nccwpck_require__(63477)); +const is_stream_1 = __importDefault(__nccwpck_require__(41554)); +const url_1 = __nccwpck_require__(57310); +const common_1 = __nccwpck_require__(66129); +const retry_1 = __nccwpck_require__(31052); +const stream_1 = __nccwpck_require__(12781); +const uuid_1 = __nccwpck_require__(19694); +const interceptor_1 = __nccwpck_require__(14309); +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fetch = hasFetch() ? window.fetch : node_fetch_1.default; +function hasWindow() { + return typeof window !== 'undefined' && !!window; +} +function hasFetch() { + return hasWindow() && !!window.fetch; +} +function hasBuffer() { + return typeof Buffer !== 'undefined'; +} +function hasHeader(options, header) { + return !!getHeader(options, header); +} +function getHeader(options, header) { + header = header.toLowerCase(); + for (const key of Object.keys((options === null || options === void 0 ? void 0 : options.headers) || {})) { + if (header === key.toLowerCase()) { + return options.headers[key]; + } + } + return undefined; +} +class Gaxios { + /** + * The Gaxios class is responsible for making HTTP requests. + * @param defaults The default set of options to be used for this instance. + */ + constructor(defaults) { + _Gaxios_instances.add(this); + this.agentCache = new Map(); + this.defaults = defaults || {}; + this.interceptors = { + request: new interceptor_1.GaxiosInterceptorManager(), + response: new interceptor_1.GaxiosInterceptorManager(), + }; + } + /** + * Perform an HTTP request with the given options. + * @param opts Set of HTTP options that will be used for this HTTP request. + */ + async request(opts = {}) { + opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_prepareRequest).call(this, opts); + opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyRequestInterceptors).call(this, opts); + return __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyResponseInterceptors).call(this, this._request(opts)); + } + async _defaultAdapter(opts) { + const fetchImpl = opts.fetchImplementation || fetch; + const res = (await fetchImpl(opts.url, opts)); + const data = await this.getResponseData(opts, res); + return this.translateResponse(opts, res, data); + } + /** + * Internal, retryable version of the `request` method. + * @param opts Set of HTTP options that will be used for this HTTP request. + */ + async _request(opts = {}) { + var _b; + try { + let translatedResponse; + if (opts.adapter) { + translatedResponse = await opts.adapter(opts, this._defaultAdapter.bind(this)); + } + else { + translatedResponse = await this._defaultAdapter(opts); + } + if (!opts.validateStatus(translatedResponse.status)) { + if (opts.responseType === 'stream') { + let response = ''; + await new Promise(resolve => { + (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('data', chunk => { + response += chunk; + }); + (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('end', resolve); + }); + translatedResponse.data = response; + } + throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse); + } + return translatedResponse; } - - if (g1 > 0 && len > 0) { - i = len % g1 || g1; - intPart = intDigits.substr(0, i); - for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1); - if (g2 > 0) intPart += groupSeparator + intDigits.slice(i); - if (isNeg) intPart = '-' + intPart; + catch (e) { + const err = e instanceof common_1.GaxiosError + ? e + : new common_1.GaxiosError(e.message, opts, undefined, e); + const { shouldRetry, config } = await (0, retry_1.getRetryConfig)(err); + if (shouldRetry && config) { + err.config.retryConfig.currentRetryAttempt = + config.retryConfig.currentRetryAttempt; + // The error's config could be redacted - therefore we only want to + // copy the retry state over to the existing config + opts.retryConfig = (_b = err.config) === null || _b === void 0 ? void 0 : _b.retryConfig; + return this._request(opts); + } + throw err; } - - str = fractionPart - ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize) - ? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'), - '$&' + (format.fractionGroupSeparator || '')) - : fractionPart) - : intPart; - } - - return (format.prefix || '') + str + (format.suffix || ''); - }; - - - /* - * Return an array of two BigNumbers representing the value of this BigNumber as a simple - * fraction with an integer numerator and an integer denominator. - * The denominator will be a positive non-zero value less than or equal to the specified - * maximum denominator. If a maximum denominator is not specified, the denominator will be - * the lowest value necessary to represent the number exactly. - * - * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. - * - * '[BigNumber Error] Argument {not an integer|out of range} : {md}' - */ - P.toFraction = function (md) { - var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, - x = this, - xc = x.c; - - if (md != null) { - n = new BigNumber(md); - - // Throw if md is less than one or is not an integer, unless it is Infinity. - if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) { - throw Error - (bignumberError + 'Argument ' + - (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n)); + } + async getResponseData(opts, res) { + switch (opts.responseType) { + case 'stream': + return res.body; + case 'json': { + let data = await res.text(); + try { + data = JSON.parse(data); + } + catch (_b) { + // continue + } + return data; + } + case 'arraybuffer': + return res.arrayBuffer(); + case 'blob': + return res.blob(); + case 'text': + return res.text(); + default: + return this.getResponseDataFromContentType(res); } - } - - if (!xc) return new BigNumber(x); - - d = new BigNumber(ONE); - n1 = d0 = new BigNumber(ONE); - d1 = n0 = new BigNumber(ONE); - s = coeffToString(xc); - - // Determine initial denominator. - // d is a power of 10 and the minimum max denominator that specifies the value exactly. - e = d.e = s.length - x.e - 1; - d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp]; - md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n; - - exp = MAX_EXP; - MAX_EXP = 1 / 0; - n = new BigNumber(s); - - // n0 = d1 = 0 - n0.c[0] = 0; - - for (; ;) { - q = div(n, d, 0, 1); - d2 = d0.plus(q.times(d1)); - if (d2.comparedTo(md) == 1) break; - d0 = d1; - d1 = d2; - n1 = n0.plus(q.times(d2 = n1)); - n0 = d2; - d = n.minus(q.times(d2 = d)); - n = d2; - } - - d2 = div(md.minus(d0), d1, 0, 1); - n0 = n0.plus(d2.times(n1)); - d0 = d0.plus(d2.times(d1)); - n0.s = n1.s = x.s; - e = e * 2; - - // Determine which fraction is closer to x, n0/d0 or n1/d1 - r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo( - div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; - - MAX_EXP = exp; - - return r; - }; - - - /* - * Return the value of this BigNumber converted to a number primitive. + } + /** + * By default, throw for any non-2xx status code + * @param status status code from the HTTP response */ - P.toNumber = function () { - return +valueOf(this); - }; - - - /* - * Return a string representing the value of this BigNumber rounded to sd significant digits - * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits - * necessary to represent the integer part of the value in fixed-point notation, then use - * exponential notation. - * - * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + validateStatus(status) { + return status >= 200 && status < 300; + } + /** + * Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo) + * @param params key value pars to encode */ - P.toPrecision = function (sd, rm) { - if (sd != null) intCheck(sd, 1, MAX); - return format(this, sd, rm, 2); - }; - - - /* - * Return a string representing the value of this BigNumber in base b, or base 10 if b is - * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and - * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent - * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than - * TO_EXP_NEG, return exponential notation. - * - * [b] {number} Integer, 2 to ALPHABET.length inclusive. - * - * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + paramsSerializer(params) { + return querystring_1.default.stringify(params); + } + translateResponse(opts, res, data) { + // headers need to be converted from a map to an obj + const headers = {}; + res.headers.forEach((value, key) => { + headers[key] = value; + }); + return { + config: opts, + data: data, + headers, + status: res.status, + statusText: res.statusText, + // XMLHttpRequestLike + request: { + responseURL: res.url, + }, + }; + } + /** + * Attempts to parse a response by looking at the Content-Type header. + * @param {FetchResponse} response the HTTP response. + * @returns {Promise} a promise that resolves to the response data. */ - P.toString = function (b) { - var str, - n = this, - s = n.s, - e = n.e; - - // Infinity or NaN? - if (e === null) { - if (s) { - str = 'Infinity'; - if (s < 0) str = '-' + str; - } else { - str = 'NaN'; + async getResponseDataFromContentType(response) { + let contentType = response.headers.get('Content-Type'); + if (contentType === null) { + // Maintain existing functionality by calling text() + return response.text(); } - } else { - if (b == null) { - str = e <= TO_EXP_NEG || e >= TO_EXP_POS - ? toExponential(coeffToString(n.c), e) - : toFixedPoint(coeffToString(n.c), e, '0'); - } else if (b === 10 && alphabetHasNormalDecimalDigits) { - n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE); - str = toFixedPoint(coeffToString(n.c), n.e, '0'); - } else { - intCheck(b, 2, ALPHABET.length, 'Base'); - str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true); + contentType = contentType.toLowerCase(); + if (contentType.includes('application/json')) { + let data = await response.text(); + try { + data = JSON.parse(data); + } + catch (_b) { + // continue + } + return data; } - - if (s < 0 && n.c[0]) str = '-' + str; - } - - return str; - }; - - - /* - * Return as toString, but do not accept a base argument, and include the minus sign for - * negative zero. + else if (contentType.match(/^text\//)) { + return response.text(); + } + else { + // If the content type is something not easily handled, just return the raw data (blob) + return response.blob(); + } + } + /** + * Creates an async generator that yields the pieces of a multipart/related request body. + * This implementation follows the spec: https://www.ietf.org/rfc/rfc2387.txt. However, recursive + * multipart/related requests are not currently supported. + * + * @param {GaxioMultipartOptions[]} multipartOptions the pieces to turn into a multipart/related body. + * @param {string} boundary the boundary string to be placed between each part. */ - P.valueOf = P.toJSON = function () { - return valueOf(this); - }; - - - P._isBigNumber = true; - - if (configObject != null) BigNumber.set(configObject); - - return BigNumber; - } - - - // PRIVATE HELPER FUNCTIONS - - // These functions don't need access to variables, - // e.g. DECIMAL_PLACES, in the scope of the `clone` function above. - - - function bitFloor(n) { - var i = n | 0; - return n > 0 || n === i ? i : i - 1; - } - - - // Return a coefficient array as a string of base 10 digits. - function coeffToString(a) { - var s, z, - i = 1, - j = a.length, - r = a[0] + ''; - - for (; i < j;) { - s = a[i++] + ''; - z = LOG_BASE - s.length; - for (; z--; s = '0' + s); - r += s; + async *getMultipartRequest(multipartOptions, boundary) { + const finale = `--${boundary}--`; + for (const currentPart of multipartOptions) { + const partContentType = currentPart.headers['Content-Type'] || 'application/octet-stream'; + const preamble = `--${boundary}\r\nContent-Type: ${partContentType}\r\n\r\n`; + yield preamble; + if (typeof currentPart.content === 'string') { + yield currentPart.content; + } + else { + yield* currentPart.content; + } + yield '\r\n'; + } + yield finale; } - - // Determine trailing zeros. - for (j = r.length; r.charCodeAt(--j) === 48;); - - return r.slice(0, j + 1 || 1); - } - - - // Compare the value of BigNumbers x and y. - function compare(x, y) { - var a, b, - xc = x.c, - yc = y.c, - i = x.s, - j = y.s, - k = x.e, - l = y.e; - - // Either NaN? - if (!i || !j) return null; - - a = xc && !xc[0]; - b = yc && !yc[0]; - - // Either zero? - if (a || b) return a ? b ? 0 : -j : i; - - // Signs differ? - if (i != j) return i; - - a = i < 0; - b = k == l; - - // Either Infinity? - if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1; - - // Compare exponents. - if (!b) return k > l ^ a ? 1 : -1; - - j = (k = xc.length) < (l = yc.length) ? k : l; - - // Compare digit by digit. - for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1; - - // Compare lengths. - return k == l ? 0 : k > l ^ a ? 1 : -1; - } - - - /* - * Check that n is a primitive number, an integer, and in range, otherwise throw. - */ - function intCheck(n, min, max, name) { - if (n < min || n > max || n !== mathfloor(n)) { - throw Error - (bignumberError + (name || 'Argument') + (typeof n == 'number' - ? n < min || n > max ? ' out of range: ' : ' not an integer: ' - : ' not a primitive number: ') + String(n)); +} +exports.Gaxios = Gaxios; +_a = Gaxios, _Gaxios_instances = new WeakSet(), _Gaxios_urlMayUseProxy = function _Gaxios_urlMayUseProxy(url, noProxy = []) { + var _b, _c; + const candidate = new url_1.URL(url); + const noProxyList = [...noProxy]; + const noProxyEnvList = ((_c = ((_b = process.env.NO_PROXY) !== null && _b !== void 0 ? _b : process.env.no_proxy)) === null || _c === void 0 ? void 0 : _c.split(',')) || []; + for (const rule of noProxyEnvList) { + noProxyList.push(rule.trim()); + } + for (const rule of noProxyList) { + // Match regex + if (rule instanceof RegExp) { + if (rule.test(candidate.toString())) { + return false; + } + } + // Match URL + else if (rule instanceof url_1.URL) { + if (rule.origin === candidate.origin) { + return false; + } + } + // Match string regex + else if (rule.startsWith('*.') || rule.startsWith('.')) { + const cleanedRule = rule.replace(/^\*\./, '.'); + if (candidate.hostname.endsWith(cleanedRule)) { + return false; + } + } + // Basic string match + else if (rule === candidate.origin || + rule === candidate.hostname || + rule === candidate.href) { + return false; + } + } + return true; +}, _Gaxios_applyRequestInterceptors = +/** + * Applies the request interceptors. The request interceptors are applied after the + * call to prepareRequest is completed. + * + * @param {GaxiosOptions} options The current set of options. + * + * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. + */ +async function _Gaxios_applyRequestInterceptors(options) { + let promiseChain = Promise.resolve(options); + for (const interceptor of this.interceptors.request.values()) { + if (interceptor) { + promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); + } + } + return promiseChain; +}, _Gaxios_applyResponseInterceptors = +/** + * Applies the response interceptors. The response interceptors are applied after the + * call to request is made. + * + * @param {GaxiosOptions} options The current set of options. + * + * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. + */ +async function _Gaxios_applyResponseInterceptors(response) { + let promiseChain = Promise.resolve(response); + for (const interceptor of this.interceptors.response.values()) { + if (interceptor) { + promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); + } + } + return promiseChain; +}, _Gaxios_prepareRequest = +/** + * Validates the options, merges them with defaults, and prepare request. + * + * @param options The original options passed from the client. + * @returns Prepared options, ready to make a request + */ +async function _Gaxios_prepareRequest(options) { + var _b, _c, _d, _e; + const opts = (0, extend_1.default)(true, {}, this.defaults, options); + if (!opts.url) { + throw new Error('URL is required.'); + } + // baseUrl has been deprecated, remove in 2.0 + const baseUrl = opts.baseUrl || opts.baseURL; + if (baseUrl) { + opts.url = baseUrl.toString() + opts.url; + } + opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer; + if (opts.params && Object.keys(opts.params).length > 0) { + let additionalQueryParams = opts.paramsSerializer(opts.params); + if (additionalQueryParams.startsWith('?')) { + additionalQueryParams = additionalQueryParams.slice(1); + } + const prefix = opts.url.toString().includes('?') ? '&' : '?'; + opts.url = opts.url + prefix + additionalQueryParams; + } + if (typeof options.maxContentLength === 'number') { + opts.size = options.maxContentLength; + } + if (typeof options.maxRedirects === 'number') { + opts.follow = options.maxRedirects; + } + opts.headers = opts.headers || {}; + if (opts.multipart === undefined && opts.data) { + const isFormData = typeof FormData === 'undefined' + ? false + : (opts === null || opts === void 0 ? void 0 : opts.data) instanceof FormData; + if (is_stream_1.default.readable(opts.data)) { + opts.body = opts.data; + } + else if (hasBuffer() && Buffer.isBuffer(opts.data)) { + // Do not attempt to JSON.stringify() a Buffer: + opts.body = opts.data; + if (!hasHeader(opts, 'Content-Type')) { + opts.headers['Content-Type'] = 'application/json'; + } + } + else if (typeof opts.data === 'object') { + // If www-form-urlencoded content type has been set, but data is + // provided as an object, serialize the content using querystring: + if (!isFormData) { + if (getHeader(opts, 'content-type') === + 'application/x-www-form-urlencoded') { + opts.body = opts.paramsSerializer(opts.data); + } + else { + // } else if (!(opts.data instanceof FormData)) { + if (!hasHeader(opts, 'Content-Type')) { + opts.headers['Content-Type'] = 'application/json'; + } + opts.body = JSON.stringify(opts.data); + } + } + } + else { + opts.body = opts.data; + } } - } - - - // Assumes finite n. - function isOdd(n) { - var k = n.c.length - 1; - return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0; - } - - - function toExponential(str, e) { - return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) + - (e < 0 ? 'e' : 'e+') + e; - } - - - function toFixedPoint(str, e, z) { - var len, zs; - - // Negative exponent? - if (e < 0) { - - // Prepend zeros. - for (zs = z + '.'; ++e; zs += z); - str = zs + str; - - // Positive exponent - } else { - len = str.length; - - // Append zeros. - if (++e > len) { - for (zs = z, e -= len; --e; zs += z); - str += zs; - } else if (e < len) { - str = str.slice(0, e) + '.' + str.slice(e); - } + else if (opts.multipart && opts.multipart.length > 0) { + // note: once the minimum version reaches Node 16, + // this can be replaced with randomUUID() function from crypto + // and the dependency on UUID removed + const boundary = (0, uuid_1.v4)(); + opts.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; + const bodyStream = new stream_1.PassThrough(); + opts.body = bodyStream; + (0, stream_1.pipeline)(this.getMultipartRequest(opts.multipart, boundary), bodyStream, () => { }); } - - return str; - } - - - // EXPORT - - - BigNumber = clone(); - BigNumber['default'] = BigNumber.BigNumber = BigNumber; - - // AMD. - if (typeof define == 'function' && define.amd) { - define(function () { return BigNumber; }); - - // Node.js and other environments that support module.exports. - } else if ( true && module.exports) { - module.exports = BigNumber; - - // Browser. - } else { - if (!globalObject) { - globalObject = typeof self != 'undefined' && self ? self : window; + opts.validateStatus = opts.validateStatus || this.validateStatus; + opts.responseType = opts.responseType || 'unknown'; + if (!opts.headers['Accept'] && opts.responseType === 'json') { + opts.headers['Accept'] = 'application/json'; } - - globalObject.BigNumber = BigNumber; - } -})(this); - + opts.method = opts.method || 'GET'; + const proxy = opts.proxy || + ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.HTTPS_PROXY) || + ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.https_proxy) || + ((_d = process === null || process === void 0 ? void 0 : process.env) === null || _d === void 0 ? void 0 : _d.HTTP_PROXY) || + ((_e = process === null || process === void 0 ? void 0 : process.env) === null || _e === void 0 ? void 0 : _e.http_proxy); + const urlMayUseProxy = __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_urlMayUseProxy).call(this, opts.url, opts.noProxy); + if (opts.agent) { + // don't do any of the following options - use the user-provided agent. + } + else if (proxy && urlMayUseProxy) { + const HttpsProxyAgent = await __classPrivateFieldGet(_a, _a, "m", _Gaxios_getProxyAgent).call(_a); + if (this.agentCache.has(proxy)) { + opts.agent = this.agentCache.get(proxy); + } + else { + opts.agent = new HttpsProxyAgent(proxy, { + cert: opts.cert, + key: opts.key, + }); + this.agentCache.set(proxy, opts.agent); + } + } + else if (opts.cert && opts.key) { + // Configure client for mTLS + if (this.agentCache.has(opts.key)) { + opts.agent = this.agentCache.get(opts.key); + } + else { + opts.agent = new https_1.Agent({ + cert: opts.cert, + key: opts.key, + }); + this.agentCache.set(opts.key, opts.agent); + } + } + if (typeof opts.errorRedactor !== 'function' && + opts.errorRedactor !== false) { + opts.errorRedactor = common_1.defaultErrorRedactor; + } + return opts; +}, _Gaxios_getProxyAgent = async function _Gaxios_getProxyAgent() { + __classPrivateFieldSet(this, _a, __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent) || (await Promise.resolve().then(() => __importStar(__nccwpck_require__(77219)))).HttpsProxyAgent, "f", _Gaxios_proxyAgent); + return __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent); +}; +/** + * A cache for the lazily-loaded proxy agent. + * + * Should use {@link Gaxios[#getProxyAgent]} to retrieve. + */ +// using `import` to dynamically import the types here +_Gaxios_proxyAgent = { value: void 0 }; +//# sourceMappingURL=gaxios.js.map /***/ }), -/***/ 33717: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var concatMap = __nccwpck_require__(86891); -var balanced = __nccwpck_require__(9417); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } +/***/ 59555: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - parts.push.apply(parts, p); +"use strict"; - return parts; +// Copyright 2018 Google LLC +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.instance = exports.Gaxios = exports.GaxiosError = void 0; +exports.request = request; +const gaxios_1 = __nccwpck_require__(28133); +Object.defineProperty(exports, "Gaxios", ({ enumerable: true, get: function () { return gaxios_1.Gaxios; } })); +var common_1 = __nccwpck_require__(66129); +Object.defineProperty(exports, "GaxiosError", ({ enumerable: true, get: function () { return common_1.GaxiosError; } })); +__exportStar(__nccwpck_require__(14309), exports); +/** + * The default instance used when the `request` method is directly + * invoked. + */ +exports.instance = new gaxios_1.Gaxios(); +/** + * Make an HTTP request using the given options. + * @param opts Options for the request + */ +async function request(opts) { + return exports.instance.request(opts); } +//# sourceMappingURL=index.js.map -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } +/***/ }), - return expand(escapeBraces(str), true).map(unescapeBraces); -} +/***/ 14309: +/***/ ((__unused_webpack_module, exports) => { -function identity(e) { - return e; -} +"use strict"; -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); +// Copyright 2024 Google LLC +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GaxiosInterceptorManager = void 0; +/** + * Class to manage collections of GaxiosInterceptors for both requests and responses. + */ +class GaxiosInterceptorManager extends Set { } +exports.GaxiosInterceptorManager = GaxiosInterceptorManager; +//# sourceMappingURL=interceptor.js.map -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} +/***/ }), -function expand(str, isTop) { - var expansions = []; +/***/ 31052: +/***/ ((__unused_webpack_module, exports) => { - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; +"use strict"; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); +// Copyright 2018 Google LLC +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRetryConfig = getRetryConfig; +async function getRetryConfig(err) { + let config = getConfig(err); + if (!err || !err.config || (!config && !err.config.retry)) { + return { shouldRetry: false }; } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; + config = config || {}; + config.currentRetryAttempt = config.currentRetryAttempt || 0; + config.retry = + config.retry === undefined || config.retry === null ? 3 : config.retry; + config.httpMethodsToRetry = config.httpMethodsToRetry || [ + 'GET', + 'HEAD', + 'PUT', + 'OPTIONS', + 'DELETE', + ]; + config.noResponseRetries = + config.noResponseRetries === undefined || config.noResponseRetries === null + ? 2 + : config.noResponseRetries; + config.retryDelayMultiplier = config.retryDelayMultiplier + ? config.retryDelayMultiplier + : 2; + config.timeOfFirstRequest = config.timeOfFirstRequest + ? config.timeOfFirstRequest + : Date.now(); + config.totalTimeout = config.totalTimeout + ? config.totalTimeout + : Number.MAX_SAFE_INTEGER; + config.maxRetryDelay = config.maxRetryDelay + ? config.maxRetryDelay + : Number.MAX_SAFE_INTEGER; + // If this wasn't in the list of status codes where we want + // to automatically retry, return. + const retryRanges = [ + // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes + // 1xx - Retry (Informational, request still processing) + // 2xx - Do not retry (Success) + // 3xx - Do not retry (Redirect) + // 4xx - Do not retry (Client errors) + // 408 - Retry ("Request Timeout") + // 429 - Retry ("Too Many Requests") + // 5xx - Retry (Server errors) + [100, 199], + [408, 408], + [429, 429], + [500, 599], + ]; + config.statusCodesToRetry = config.statusCodesToRetry || retryRanges; + // Put the config back into the err + err.config.retryConfig = config; + // Determine if we should retry the request + const shouldRetryFn = config.shouldRetry || shouldRetryRequest; + if (!(await shouldRetryFn(err))) { + return { shouldRetry: false, config: err.config }; + } + const delay = getNextRetryDelay(config); + // We're going to retry! Incremenent the counter. + err.config.retryConfig.currentRetryAttempt += 1; + // Create a promise that invokes the retry after the backOffDelay + const backoff = config.retryBackoff + ? config.retryBackoff(err, delay) + : new Promise(resolve => { + setTimeout(resolve, delay); }); - } + // Notify the user if they added an `onRetryAttempt` handler + if (config.onRetryAttempt) { + config.onRetryAttempt(err); } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; + // Return the promise in which recalls Gaxios to retry the request + await backoff; + return { shouldRetry: true, config: err.config }; +} +/** + * Determine based on config if we should retry the request. + * @param err The GaxiosError passed to the interceptor. + */ +function shouldRetryRequest(err) { + var _a; + const config = getConfig(err); + // node-fetch raises an AbortError if signaled: + // https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal + if (err.name === 'AbortError' || ((_a = err.error) === null || _a === void 0 ? void 0 : _a.name) === 'AbortError') { + return false; } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); + // If there's no config, or retries are disabled, return. + if (!config || config.retry === 0) { + return false; } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); + // Check if this error has no response (ETIMEDOUT, ENOTFOUND, etc) + if (!err.response && + (config.currentRetryAttempt || 0) >= config.noResponseRetries) { + return false; + } + // Only retry with configured HttpMethods. + if (!err.config.method || + config.httpMethodsToRetry.indexOf(err.config.method.toUpperCase()) < 0) { + return false; + } + // If this wasn't in the list of status codes where we want + // to automatically retry, return. + if (err.response && err.response.status) { + let isInRange = false; + for (const [min, max] of config.statusCodesToRetry) { + const status = err.response.status; + if (status >= min && status <= max) { + isInRange = true; + break; + } + } + if (!isInRange) { + return false; + } } - } - - return expansions; + // If we are out of retry attempts, return + config.currentRetryAttempt = config.currentRetryAttempt || 0; + if (config.currentRetryAttempt >= config.retry) { + return false; + } + return true; } - - +/** + * Acquire the raxConfig object from an GaxiosError if available. + * @param err The Gaxios error with a config object. + */ +function getConfig(err) { + if (err && err.config && err.config.retryConfig) { + return err.config.retryConfig; + } + return; +} +/** + * Gets the delay to wait before the next retry. + * + * @param {RetryConfig} config The current set of retry options + * @returns {number} the amount of ms to wait before the next retry attempt. + */ +function getNextRetryDelay(config) { + var _a; + // Calculate time to wait with exponential backoff. + // If this is the first retry, look for a configured retryDelay. + const retryDelay = config.currentRetryAttempt ? 0 : (_a = config.retryDelay) !== null && _a !== void 0 ? _a : 100; + // Formula: retryDelay + ((retryDelayMultiplier^currentRetryAttempt - 1 / 2) * 1000) + const calculatedDelay = retryDelay + + ((Math.pow(config.retryDelayMultiplier, config.currentRetryAttempt) - 1) / + 2) * + 1000; + const maxAllowableDelay = config.totalTimeout - (Date.now() - config.timeOfFirstRequest); + return Math.min(calculatedDelay, maxAllowableDelay, config.maxRetryDelay); +} +//# sourceMappingURL=retry.js.map /***/ }), -/***/ 9239: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 21980: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -/*jshint node:true */ - -var Buffer = (__nccwpck_require__(14300).Buffer); // browserify -var SlowBuffer = (__nccwpck_require__(14300).SlowBuffer); - -module.exports = bufferEq; - -function bufferEq(a, b) { - - // shortcutting on type is necessary for correctness - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - return false; - } - - // buffer sizes should be well-known information, so despite this - // shortcutting, it doesn't leak any information about the *contents* of the - // buffers. - if (a.length !== b.length) { - return false; - } - - var c = 0; - for (var i = 0; i < a.length; i++) { - /*jshint bitwise:false */ - c |= a[i] ^ b[i]; // XOR - } - return c === 0; -} - -bufferEq.install = function() { - Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { - return bufferEq(this, that); - }; -}; - -var origBufEqual = Buffer.prototype.equal; -var origSlowBufEqual = SlowBuffer.prototype.equal; -bufferEq.restore = function() { - Buffer.prototype.equal = origBufEqual; - SlowBuffer.prototype.equal = origSlowBufEqual; -}; +// Copyright 2023 Google LLC +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pkg = void 0; +exports.pkg = __nccwpck_require__(6318); +//# sourceMappingURL=util.js.map /***/ }), -/***/ 85443: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(73837); -var Stream = (__nccwpck_require__(12781).Stream); -var DelayedStream = __nccwpck_require__(18611); - -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; - - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; -} -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - - return combinedStream; -}; - -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; - -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); +/***/ 19694: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; - } +"use strict"; - this._handleErrors(stream); - if (this.pauseStreams) { - stream.pause(); - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; } - - this._streams.push(stream); - return this; -}; - -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; - -CombinedStream.prototype._getNext = function() { - this._currentStream = null; - - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; } - - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; } -}; - -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); - - - if (typeof stream == 'undefined') { - this.end(); - return; +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; } - - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; } - - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); - } - - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; - -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; - -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; } - - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; - -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; - -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; - -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; - -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; } +})); - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); -}; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; - } +var _v = _interopRequireDefault(__nccwpck_require__(94625)); - self.dataSize += stream.dataSize; - }); +var _v2 = _interopRequireDefault(__nccwpck_require__(93951)); - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; +var _v3 = _interopRequireDefault(__nccwpck_require__(52507)); -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; +var _v4 = _interopRequireDefault(__nccwpck_require__(18457)); +var _nil = _interopRequireDefault(__nccwpck_require__(27298)); -/***/ }), +var _version = _interopRequireDefault(__nccwpck_require__(40278)); -/***/ 86891: -/***/ ((module) => { +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; +var _stringify = _interopRequireDefault(__nccwpck_require__(52956)); -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; +var _parse = _interopRequireDefault(__nccwpck_require__(55558)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 28222: -/***/ ((module, exports, __nccwpck_require__) => { - -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); +/***/ 12484: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Colors. - */ +"use strict"; -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); } -/** - * Colorize log arguments if enabled. - * - * @api public - */ +var _default = md5; +exports["default"] = _default; -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); +/***/ }), - if (!this.useColors) { - return; - } +/***/ 53513: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); +"use strict"; - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - args.splice(lastC, 0, c); -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } +var _default = { + randomUUID: _crypto.default.randomUUID +}; +exports["default"] = _default; - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } +/***/ }), - return r; -} +/***/ 27298: +/***/ ((__unused_webpack_module, exports) => { -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ +"use strict"; -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} -module.exports = __nccwpck_require__(46243)(exports); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; -const {formatters} = module.exports; +/***/ }), -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ +/***/ 55558: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; +"use strict"; -/***/ }), +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -/***/ 46243: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __nccwpck_require__(80900); - createDebug.destroy = destroy; + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ - /** - * The currently active debug mode names, and names to skip. - */ + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ - createDebug.names = []; - createDebug.skips = []; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } +var _default = parse; +exports["default"] = _default; - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; +/***/ }), - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; +/***/ 23894: +/***/ ((__unused_webpack_module, exports) => { - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } +"use strict"; - const self = debug; - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; - args[0] = createDebug.coerce(args[0]); +/***/ }), - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } +/***/ 27440: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); +"use strict"; - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); +let poolPtr = rnds8Pool.length; - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); - return debug; - } + poolPtr = 0; + } - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; +/***/ }), - createDebug.names = []; - createDebug.skips = []; +/***/ 45682: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; +"use strict"; - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - namespaces = split[i].replace(/\*/g, '.*?'); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } - let i; - let len; + return _crypto.default.createHash('sha1').update(bytes).digest(); +} - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } +var _default = sha1; +exports["default"] = _default; - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } +/***/ }), - return false; - } +/***/ 52956: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } +"use strict"; - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +exports.unsafeStringify = unsafeStringify; - createDebug.enable(createDebug.load()); +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); - return createDebug; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); } -module.exports = setup; +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} + +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} +var _default = stringify; +exports["default"] = _default; /***/ }), -/***/ 38237: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 94625: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(27440)); -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ +var _stringify = __nccwpck_require__(52956); -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __nccwpck_require__(28222); -} else { - module.exports = __nccwpck_require__(35332); -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; -/***/ }), +let _clockseq; // Previous uuid creation time -/***/ 35332: -/***/ ((module, exports, __nccwpck_require__) => { -/** - * Module dependencies. - */ +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details -const tty = __nccwpck_require__(76224); -const util = __nccwpck_require__(73837); +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 -/** - * This is the Node.js implementation of `debug()`. - */ + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } -/** - * Colors. - */ + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. -exports.colors = [6, 2, 3, 4, 5, 1]; -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __nccwpck_require__(59318); + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - obj[prop] = val; - return obj; -}, {}); + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch -function formatArgs(args) { - const {namespace: name, useColors} = this; + msecs += 12219292800000; // `time_low` - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} + b[i++] = clockseq & 0xff; // `node` -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } -function load() { - return process.env.DEBUG; + return buf || (0, _stringify.unsafeStringify)(b); } -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ +var _default = v1; +exports["default"] = _default; -function init(debug) { - debug.inspectOpts = {}; +/***/ }), - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} +/***/ 93951: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(46243)(exports); +"use strict"; -const {formatters} = module.exports; -/** - * Map %o to `util.inspect()`, all on a single line. - */ +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; +var _v = _interopRequireDefault(__nccwpck_require__(64313)); -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ +var _md = _interopRequireDefault(__nccwpck_require__(12484)); -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; /***/ }), -/***/ 18611: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 64313: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var Stream = (__nccwpck_require__(12781).Stream); -var util = __nccwpck_require__(73837); +"use strict"; -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.URL = exports.DNS = void 0; +exports["default"] = v35; -DelayedStream.create = function(source, options) { - var delayedStream = new this(); +var _stringify = __nccwpck_require__(52956); - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } +var _parse = _interopRequireDefault(__nccwpck_require__(55558)); - delayedStream.source = source; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); } - return delayedStream; -}; + return bytes; +} -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } + if (typeof value === 'string') { + value = stringToBytes(value); + } - this.source.resume(); -}; + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } -DelayedStream.prototype.pause = function() { - this.source.pause(); -}; + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` -DelayedStream.prototype.release = function() { - this._released = true; - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; -}; + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; + if (buf) { + offset = offset || 0; -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } + return buf; + } - this._bufferedEvents.push(args); -}; + return (0, _stringify.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } - if (this.dataSize <= this.maxDataSize) { - return; - } + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} /***/ }), -/***/ 58932: -/***/ ((__unused_webpack_module, exports) => { +/***/ 52507: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) +var _native = _interopRequireDefault(__nccwpck_require__(53513)); - /* istanbul ignore next */ +var _rng = _interopRequireDefault(__nccwpck_require__(27440)); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); +var _stringify = __nccwpck_require__(52956); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); + } + + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } - this.name = 'Deprecation'; + return buf; } + return (0, _stringify.unsafeStringify)(rnds); } -exports.Deprecation = Deprecation; - +var _default = v4; +exports["default"] = _default; /***/ }), -/***/ 76599: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var stream = __nccwpck_require__(51642) -var eos = __nccwpck_require__(81205) -var inherits = __nccwpck_require__(44124) -var shift = __nccwpck_require__(66121) +/***/ 18457: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) - ? Buffer.from([0]) - : new Buffer([0]) +"use strict"; -var onuncork = function(self, fn) { - if (self._corked) self.once('uncork', fn) - else fn() -} -var autoDestroy = function (self, err) { - if (self._autoDestroy) self.destroy(err) -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -var destroyer = function(self, end) { - return function(err) { - if (err) autoDestroy(self, err.message === 'premature close' ? null : err) - else if (end && !self._ended) self.end() - } -} +var _v = _interopRequireDefault(__nccwpck_require__(64313)); -var end = function(ws, fn) { - if (!ws) return fn() - if (ws._writableState && ws._writableState.finished) return fn() - if (ws._writableState) return ws.end(fn) - ws.end() - fn() -} +var _sha = _interopRequireDefault(__nccwpck_require__(45682)); -var noop = function() {} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var toStreams2 = function(rs) { - return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) -} +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; -var Duplexify = function(writable, readable, opts) { - if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) - stream.Duplex.call(this, opts) +/***/ }), - this._writable = null - this._readable = null - this._readable2 = null +/***/ 75559: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this._autoDestroy = !opts || opts.autoDestroy !== false - this._forwardDestroy = !opts || opts.destroy !== false - this._forwardEnd = !opts || opts.end !== false - this._corked = 1 // start corked - this._ondrain = null - this._drained = false - this._forwarding = false - this._unwrite = null - this._unread = null - this._ended = false +"use strict"; - this.destroyed = false - if (writable) this.setWritable(writable) - if (readable) this.setReadable(readable) -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -inherits(Duplexify, stream.Duplex) +var _regex = _interopRequireDefault(__nccwpck_require__(23894)); -Duplexify.obj = function(writable, readable, opts) { - if (!opts) opts = {} - opts.objectMode = true - opts.highWaterMark = 16 - return new Duplexify(writable, readable, opts) -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -Duplexify.prototype.cork = function() { - if (++this._corked === 1) this.emit('cork') +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); } -Duplexify.prototype.uncork = function() { - if (this._corked && --this._corked === 0) this.emit('uncork') -} +var _default = validate; +exports["default"] = _default; -Duplexify.prototype.setWritable = function(writable) { - if (this._unwrite) this._unwrite() +/***/ }), - if (this.destroyed) { - if (writable && writable.destroy) writable.destroy() - return - } +/***/ 40278: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (writable === null || writable === false) { - this.end() - return - } +"use strict"; - var self = this - var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) - var ondrain = function() { - var ondrain = self._ondrain - self._ondrain = null - if (ondrain) ondrain() - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - var clear = function() { - self._writable.removeListener('drain', ondrain) - unend() - } +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); - if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - this._writable = writable - this._writable.on('drain', ondrain) - this._unwrite = clear +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } - this.uncork() // always uncork setWritable + return parseInt(uuid.slice(14, 15), 16); } -Duplexify.prototype.setReadable = function(readable) { - if (this._unread) this._unread() +var _default = version; +exports["default"] = _default; - if (this.destroyed) { - if (readable && readable.destroy) readable.destroy() - return - } +/***/ }), - if (readable === null || readable === false) { - this.push(null) - this.resume() - return - } +/***/ 51904: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var self = this - var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) +"use strict"; - var onreadable = function() { - self._forward() - } +/** + * Copyright 2022 Google LLC + * + * 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. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GCE_LINUX_BIOS_PATHS = void 0; +exports.isGoogleCloudServerless = isGoogleCloudServerless; +exports.isGoogleComputeEngineLinux = isGoogleComputeEngineLinux; +exports.isGoogleComputeEngineMACAddress = isGoogleComputeEngineMACAddress; +exports.isGoogleComputeEngine = isGoogleComputeEngine; +exports.detectGCPResidency = detectGCPResidency; +const fs_1 = __nccwpck_require__(57147); +const os_1 = __nccwpck_require__(22037); +/** + * Known paths unique to Google Compute Engine Linux instances + */ +exports.GCE_LINUX_BIOS_PATHS = { + BIOS_DATE: '/sys/class/dmi/id/bios_date', + BIOS_VENDOR: '/sys/class/dmi/id/bios_vendor', +}; +const GCE_MAC_ADDRESS_REGEX = /^42:01/; +/** + * Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance). + * + * Uses the: + * - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}. + * + * @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise. + */ +function isGoogleCloudServerless() { + /** + * `CLOUD_RUN_JOB` is used for Cloud Run Jobs + * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * + * `FUNCTION_NAME` is used in older Cloud Functions environments: + * - See {@link https://cloud.google.com/functions/docs/env-var Python 3.7 and Go 1.11}. + * + * `K_SERVICE` is used in Cloud Run and newer Cloud Functions environments: + * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * - See {@link https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}. + */ + const isGFEnvironment = process.env.CLOUD_RUN_JOB || + process.env.FUNCTION_NAME || + process.env.K_SERVICE; + return !!isGFEnvironment; +} +/** + * Determines if the process is running on a Linux Google Compute Engine instance. + * + * @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise. + */ +function isGoogleComputeEngineLinux() { + if ((0, os_1.platform)() !== 'linux') + return false; + try { + // ensure this file exist + (0, fs_1.statSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_DATE); + // ensure this file exist and matches + const biosVendor = (0, fs_1.readFileSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, 'utf8'); + return /Google/.test(biosVendor); + } + catch (_a) { + return false; + } +} +/** + * Determines if the process is running on a Google Compute Engine instance with a known + * MAC address. + * + * @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise. + */ +function isGoogleComputeEngineMACAddress() { + const interfaces = (0, os_1.networkInterfaces)(); + for (const item of Object.values(interfaces)) { + if (!item) + continue; + for (const { mac } of item) { + if (GCE_MAC_ADDRESS_REGEX.test(mac)) { + return true; + } + } + } + return false; +} +/** + * Determines if the process is running on a Google Compute Engine instance. + * + * @returns {boolean} `true` if the process is running on GCE, `false` otherwise. + */ +function isGoogleComputeEngine() { + return isGoogleComputeEngineLinux() || isGoogleComputeEngineMACAddress(); +} +/** + * Determines if the process is running on Google Cloud Platform. + * + * @returns {boolean} `true` if the process is running on GCP, `false` otherwise. + */ +function detectGCPResidency() { + return isGoogleCloudServerless() || isGoogleComputeEngine(); +} +//# sourceMappingURL=gcp-residency.js.map - var onend = function() { - self.push(null) - } +/***/ }), - var clear = function() { - self._readable2.removeListener('readable', onreadable) - self._readable2.removeListener('end', onend) - unend() - } +/***/ 3563: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - this._drained = true - this._readable = readable - this._readable2 = readable._readableState ? readable : toStreams2(readable) - this._readable2.on('readable', onreadable) - this._readable2.on('end', onend) - this._unread = clear +"use strict"; - this._forward() +/** + * Copyright 2018 Google LLC + * + * 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. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.gcpResidencyCache = exports.METADATA_SERVER_DETECTION = exports.HEADERS = exports.HEADER_VALUE = exports.HEADER_NAME = exports.SECONDARY_HOST_ADDRESS = exports.HOST_ADDRESS = exports.BASE_PATH = void 0; +exports.instance = instance; +exports.project = project; +exports.universe = universe; +exports.bulk = bulk; +exports.isAvailable = isAvailable; +exports.resetIsAvailableCache = resetIsAvailableCache; +exports.getGCPResidency = getGCPResidency; +exports.setGCPResidency = setGCPResidency; +exports.requestTimeout = requestTimeout; +const gaxios_1 = __nccwpck_require__(59555); +const jsonBigint = __nccwpck_require__(55031); +const gcp_residency_1 = __nccwpck_require__(51904); +const logger = __nccwpck_require__(97306); +exports.BASE_PATH = '/computeMetadata/v1'; +exports.HOST_ADDRESS = 'http://169.254.169.254'; +exports.SECONDARY_HOST_ADDRESS = 'http://metadata.google.internal.'; +exports.HEADER_NAME = 'Metadata-Flavor'; +exports.HEADER_VALUE = 'Google'; +exports.HEADERS = Object.freeze({ [exports.HEADER_NAME]: exports.HEADER_VALUE }); +const log = logger.log('gcp metadata'); +/** + * Metadata server detection override options. + * + * Available via `process.env.METADATA_SERVER_DETECTION`. + */ +exports.METADATA_SERVER_DETECTION = Object.freeze({ + 'assume-present': "don't try to ping the metadata server, but assume it's present", + none: "don't try to ping the metadata server, but don't try to use it either", + 'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)", + 'ping-only': 'skip the BIOS probe, and go straight to pinging', +}); +/** + * Returns the base URL while taking into account the GCE_METADATA_HOST + * environment variable if it exists. + * + * @returns The base URL, e.g., http://169.254.169.254/computeMetadata/v1. + */ +function getBaseUrl(baseUrl) { + if (!baseUrl) { + baseUrl = + process.env.GCE_METADATA_IP || + process.env.GCE_METADATA_HOST || + exports.HOST_ADDRESS; + } + // If no scheme is provided default to HTTP: + if (!/^https?:\/\//.test(baseUrl)) { + baseUrl = `http://${baseUrl}`; + } + return new URL(exports.BASE_PATH, baseUrl).href; +} +// Accepts an options object passed from the user to the API. In previous +// versions of the API, it referred to a `Request` or an `Axios` request +// options object. Now it refers to an object with very limited property +// names. This is here to help ensure users don't pass invalid options when +// they upgrade from 0.4 to 0.5 to 0.8. +function validate(options) { + Object.keys(options).forEach(key => { + switch (key) { + case 'params': + case 'property': + case 'headers': + break; + case 'qs': + throw new Error("'qs' is not a valid configuration option. Please use 'params' instead."); + default: + throw new Error(`'${key}' is not a valid configuration option.`); + } + }); +} +async function metadataAccessor(type, options = {}, noResponseRetries = 3, fastFail = false) { + let metadataKey = ''; + let params = {}; + let headers = {}; + if (typeof type === 'object') { + const metadataAccessor = type; + metadataKey = metadataAccessor.metadataKey; + params = metadataAccessor.params || params; + headers = metadataAccessor.headers || headers; + noResponseRetries = metadataAccessor.noResponseRetries || noResponseRetries; + fastFail = metadataAccessor.fastFail || fastFail; + } + else { + metadataKey = type; + } + if (typeof options === 'string') { + metadataKey += `/${options}`; + } + else { + validate(options); + if (options.property) { + metadataKey += `/${options.property}`; + } + headers = options.headers || headers; + params = options.params || params; + } + const requestMethod = fastFail ? fastFailMetadataRequest : gaxios_1.request; + const req = { + url: `${getBaseUrl()}/${metadataKey}`, + headers: { ...exports.HEADERS, ...headers }, + retryConfig: { noResponseRetries }, + params, + responseType: 'text', + timeout: requestTimeout(), + }; + log.info('instance request %j', req); + const res = await requestMethod(req); + log.info('instance metadata is %s', res.data); + // NOTE: node.js converts all incoming headers to lower case. + if (res.headers[exports.HEADER_NAME.toLowerCase()] !== exports.HEADER_VALUE) { + throw new Error(`Invalid response from metadata service: incorrect ${exports.HEADER_NAME} header. Expected '${exports.HEADER_VALUE}', got ${res.headers[exports.HEADER_NAME.toLowerCase()] ? `'${res.headers[exports.HEADER_NAME.toLowerCase()]}'` : 'no header'}`); + } + if (typeof res.data === 'string') { + try { + return jsonBigint.parse(res.data); + } + catch (_a) { + /* ignore */ + } + } + return res.data; +} +async function fastFailMetadataRequest(options) { + var _a; + const secondaryOptions = { + ...options, + url: (_a = options.url) === null || _a === void 0 ? void 0 : _a.toString().replace(getBaseUrl(), getBaseUrl(exports.SECONDARY_HOST_ADDRESS)), + }; + // We race a connection between DNS/IP to metadata server. There are a couple + // reasons for this: + // + // 1. the DNS is slow in some GCP environments; by checking both, we might + // detect the runtime environment signficantly faster. + // 2. we can't just check the IP, which is tarpitted and slow to respond + // on a user's local machine. + // + // Additional logic has been added to make sure that we don't create an + // unhandled rejection in scenarios where a failure happens sometime + // after a success. + // + // Note, however, if a failure happens prior to a success, a rejection should + // occur, this is for folks running locally. + // + let responded = false; + const r1 = (0, gaxios_1.request)(options) + .then(res => { + responded = true; + return res; + }) + .catch(err => { + if (responded) { + return r2; + } + else { + responded = true; + throw err; + } + }); + const r2 = (0, gaxios_1.request)(secondaryOptions) + .then(res => { + responded = true; + return res; + }) + .catch(err => { + if (responded) { + return r1; + } + else { + responded = true; + throw err; + } + }); + return Promise.race([r1, r2]); +} +/** + * Obtain metadata for the current GCE instance. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const serviceAccount: {} = await instance('service-accounts/'); + * const serviceAccountEmail: string = await instance('service-accounts/default/email'); + * ``` + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function instance(options) { + return metadataAccessor('instance', options); +} +/** + * Obtain metadata for the current GCP project. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const projectId: string = await project('project-id'); + * const numericProjectId: number = await project('numeric-project-id'); + * ``` + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function project(options) { + return metadataAccessor('project', options); +} +/** + * Obtain metadata for the current universe. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const universeDomain: string = await universe('universe-domain'); + * ``` + */ +function universe(options) { + return metadataAccessor('universe', options); } - -Duplexify.prototype._read = function() { - this._drained = true - this._forward() +/** + * Retrieve metadata items in parallel. + * + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * + * @example + * ``` + * const data = await bulk([ + * { + * metadataKey: 'instance', + * }, + * { + * metadataKey: 'project/project-id', + * }, + * ] as const); + * + * // data.instance; + * // data['project/project-id']; + * ``` + * + * @param properties The metadata properties to retrieve + * @returns The metadata in `metadatakey:value` format + */ +async function bulk(properties) { + const r = {}; + await Promise.all(properties.map(item => { + return (async () => { + const res = await metadataAccessor(item); + const key = item.metadataKey; + r[key] = res; + })(); + })); + return r; } - -Duplexify.prototype._forward = function() { - if (this._forwarding || !this._readable2 || !this._drained) return - this._forwarding = true - - var data - - while (this._drained && (data = shift(this._readable2)) !== null) { - if (this.destroyed) continue - this._drained = this.push(data) - } - - this._forwarding = false +/* + * How many times should we retry detecting GCP environment. + */ +function detectGCPAvailableRetries() { + return process.env.DETECT_GCP_RETRIES + ? Number(process.env.DETECT_GCP_RETRIES) + : 0; } - -Duplexify.prototype.destroy = function(err, cb) { - if (!cb) cb = noop - if (this.destroyed) return cb(null) - this.destroyed = true - - var self = this - process.nextTick(function() { - self._destroy(err) - cb(null) - }) +let cachedIsAvailableResponse; +/** + * Determine if the metadata server is currently available. + */ +async function isAvailable() { + if (process.env.METADATA_SERVER_DETECTION) { + const value = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase(); + if (!(value in exports.METADATA_SERVER_DETECTION)) { + throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${value}\`, but it should be \`${Object.keys(exports.METADATA_SERVER_DETECTION).join('`, `')}\`, or unset`); + } + switch (value) { + case 'assume-present': + return true; + case 'none': + return false; + case 'bios-only': + return getGCPResidency(); + case 'ping-only': + // continue, we want to ping the server + } + } + try { + // If a user is instantiating several GCP libraries at the same time, + // this may result in multiple calls to isAvailable(), to detect the + // runtime environment. We use the same promise for each of these calls + // to reduce the network load. + if (cachedIsAvailableResponse === undefined) { + cachedIsAvailableResponse = metadataAccessor('instance', undefined, detectGCPAvailableRetries(), + // If the default HOST_ADDRESS has been overridden, we should not + // make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in + // a non-GCP environment): + !(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST)); + } + await cachedIsAvailableResponse; + return true; + } + catch (e) { + const err = e; + if (process.env.DEBUG_AUTH) { + console.info(err); + } + if (err.type === 'request-timeout') { + // If running in a GCP environment, metadata endpoint should return + // within ms. + return false; + } + if (err.response && err.response.status === 404) { + return false; + } + else { + if (!(err.response && err.response.status === 404) && + // A warning is emitted if we see an unexpected err.code, or err.code + // is not populated: + (!err.code || + ![ + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'ENETUNREACH', + 'ENOENT', + 'ENOTFOUND', + 'ECONNREFUSED', + ].includes(err.code))) { + let code = 'UNKNOWN'; + if (err.code) + code = err.code; + process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning'); + } + // Failure to resolve the metadata service means that it is not available. + return false; + } + } } - -Duplexify.prototype._destroy = function(err) { - if (err) { - var ondrain = this._ondrain - this._ondrain = null - if (ondrain) ondrain(err) - else this.emit('error', err) - } - - if (this._forwardDestroy) { - if (this._readable && this._readable.destroy) this._readable.destroy() - if (this._writable && this._writable.destroy) this._writable.destroy() - } - - this.emit('close') +/** + * reset the memoized isAvailable() lookup. + */ +function resetIsAvailableCache() { + cachedIsAvailableResponse = undefined; } - -Duplexify.prototype._write = function(data, enc, cb) { - if (this.destroyed) return - if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) - if (data === SIGNAL_FLUSH) return this._finish(cb) - if (!this._writable) return cb() - - if (this._writable.write(data) === false) this._ondrain = cb - else if (!this.destroyed) cb() +/** + * A cache for the detected GCP Residency. + */ +exports.gcpResidencyCache = null; +/** + * Detects GCP Residency. + * Caches results to reduce costs for subsequent calls. + * + * @see setGCPResidency for setting + */ +function getGCPResidency() { + if (exports.gcpResidencyCache === null) { + setGCPResidency(); + } + return exports.gcpResidencyCache; } - -Duplexify.prototype._finish = function(cb) { - var self = this - this.emit('preend') - onuncork(this, function() { - end(self._forwardEnd && self._writable, function() { - // haxx to not emit prefinish twice - if (self._writableState.prefinished === false) self._writableState.prefinished = true - self.emit('prefinish') - onuncork(self, cb) - }) - }) +/** + * Sets the detected GCP Residency. + * Useful for forcing metadata server detection behavior. + * + * Set `null` to autodetect the environment (default behavior). + * @see getGCPResidency for getting + */ +function setGCPResidency(value = null) { + exports.gcpResidencyCache = value !== null ? value : (0, gcp_residency_1.detectGCPResidency)(); } - -Duplexify.prototype.end = function(data, enc, cb) { - if (typeof data === 'function') return this.end(null, null, data) - if (typeof enc === 'function') return this.end(data, null, enc) - this._ended = true - if (data) this.write(data) - if (!this._writableState.ending && !this._writableState.destroyed) this.write(SIGNAL_FLUSH) - return stream.Writable.prototype.end.call(this, cb) +/** + * Obtain the timeout for requests to the metadata server. + * + * In certain environments and conditions requests can take longer than + * the default timeout to complete. This function will determine the + * appropriate timeout based on the environment. + * + * @returns {number} a request timeout duration in milliseconds. + */ +function requestTimeout() { + return getGCPResidency() ? 0 : 3000; } - -module.exports = Duplexify - +__exportStar(__nccwpck_require__(51904), exports); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 11728: +/***/ 74538: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -var Buffer = (__nccwpck_require__(21867).Buffer); - -var getParamBytesForAlg = __nccwpck_require__(30528); +var undefined; -var MAX_OCTET = 0x80, - CLASS_UNIVERSAL = 0, - PRIMITIVE_BIT = 0x20, - TAG_SEQ = 0x10, - TAG_INT = 0x02, - ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6), - ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6); +var $Object = __nccwpck_require__(78308); -function base64Url(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} +var $Error = __nccwpck_require__(28015); +var $EvalError = __nccwpck_require__(91933); +var $RangeError = __nccwpck_require__(54415); +var $ReferenceError = __nccwpck_require__(46279); +var $SyntaxError = __nccwpck_require__(75474); +var $TypeError = __nccwpck_require__(6361); +var $URIError = __nccwpck_require__(5065); -function signatureAsBuffer(signature) { - if (Buffer.isBuffer(signature)) { - return signature; - } else if ('string' === typeof signature) { - return Buffer.from(signature, 'base64'); - } +var abs = __nccwpck_require__(19775); +var floor = __nccwpck_require__(60924); +var max = __nccwpck_require__(52419); +var min = __nccwpck_require__(73373); +var pow = __nccwpck_require__(78029); +var round = __nccwpck_require__(59396); +var sign = __nccwpck_require__(39091); - throw new TypeError('ECDSA signature must be a Base64 string or a Buffer'); -} +var $Function = Function; -function derToJose(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; - // the DER encoded param should at most be the param size, plus a padding - // zero, since due to being a signed integer - var maxEncodedParamLength = paramBytes + 1; +var $gOPD = __nccwpck_require__(18501); +var $defineProperty = __nccwpck_require__(6123); - var inputLength = signature.length; +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __nccwpck_require__(40587)(); + +var getProto = __nccwpck_require__(13592); +var $ObjectGPO = __nccwpck_require__(5045); +var $ReflectGPO = __nccwpck_require__(78859); + +var $apply = __nccwpck_require__(54177); +var $call = __nccwpck_require__(2808); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': $Object, + '%Object.getOwnPropertyDescriptor%': $gOPD, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + + '%Function.prototype.call%': $call, + '%Function.prototype.apply%': $apply, + '%Object.defineProperty%': $defineProperty, + '%Object.getPrototypeOf%': $ObjectGPO, + '%Math.abs%': abs, + '%Math.floor%': floor, + '%Math.max%': max, + '%Math.min%': min, + '%Math.pow%': pow, + '%Math.round%': round, + '%Math.sign%': sign, + '%Reflect.getPrototypeOf%': $ReflectGPO +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} - var offset = 0; - if (signature[offset++] !== ENCODED_TAG_SEQ) { - throw new Error('Could not find expected "seq"'); +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } } - var seqLength = signature[offset++]; - if (seqLength === (MAX_OCTET | 1)) { - seqLength = signature[offset++]; + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __nccwpck_require__(88334); +var hasOwn = __nccwpck_require__(62157); +var $concat = bind.call($call, Array.prototype.concat); +var $spliceApply = bind.call($apply, Array.prototype.splice); +var $replace = bind.call($call, String.prototype.replace); +var $strSlice = bind.call($call, String.prototype.slice); +var $exec = bind.call($call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ - if (inputLength - offset < seqLength) { - throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; } - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "r"'); + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; } - var rLength = signature[offset++]; + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; - if (inputLength - offset - 2 < rLength) { - throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); } - if (maxEncodedParamLength < rLength) { - throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); } - var rOffset = offset; - offset += rLength; + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "s"'); - } + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; - var sLength = signature[offset++]; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } - if (inputLength - offset !== sLength) { - throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } } + return value; +}; - if (maxEncodedParamLength < sLength) { - throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } - var sOffset = offset; - offset += sLength; +/***/ }), - if (offset !== inputLength) { - throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); - } +/***/ 5045: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var rPadding = paramBytes - rLength, - sPadding = paramBytes - sLength; +"use strict"; - var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength); - for (offset = 0; offset < rPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); +var $Object = __nccwpck_require__(78308); - offset = paramBytes; +/** @type {import('./Object.getPrototypeOf')} */ +module.exports = $Object.getPrototypeOf || null; - for (var o = offset; offset < o + sPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); - dst = dst.toString('base64'); - dst = base64Url(dst); +/***/ }), - return dst; -} +/***/ 78859: +/***/ ((module) => { -function countPadding(buf, start, stop) { - var padding = 0; - while (start + padding < stop && buf[start + padding] === 0) { - ++padding; - } +"use strict"; - var needsSign = buf[start + padding] >= MAX_OCTET; - if (needsSign) { - --padding; - } - return padding; -} +/** @type {import('./Reflect.getPrototypeOf')} */ +module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; -function joseToDer(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); - var signatureBytes = signature.length; - if (signatureBytes !== paramBytes * 2) { - throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); - } +/***/ }), - var rPadding = countPadding(signature, 0, paramBytes); - var sPadding = countPadding(signature, paramBytes, signature.length); - var rLength = paramBytes - rPadding; - var sLength = paramBytes - sPadding; +/***/ 13592: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; +"use strict"; - var shortLength = rsBytes < MAX_OCTET; - var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes); +var reflectGetProto = __nccwpck_require__(78859); +var originalGetProto = __nccwpck_require__(5045); - var offset = 0; - dst[offset++] = ENCODED_TAG_SEQ; - if (shortLength) { - // Bit 8 has value "0" - // bits 7-1 give the length. - dst[offset++] = rsBytes; - } else { - // Bit 8 of first octet has value "1" - // bits 7-1 give the number of additional length octets. - dst[offset++] = MAX_OCTET | 1; - // length, base 256 - dst[offset++] = rsBytes & 0xff; - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = rLength; - if (rPadding < 0) { - dst[offset++] = 0; - offset += signature.copy(dst, offset, 0, paramBytes); - } else { - offset += signature.copy(dst, offset, rPadding, paramBytes); - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = sLength; - if (sPadding < 0) { - dst[offset++] = 0; - signature.copy(dst, offset, paramBytes); - } else { - signature.copy(dst, offset, paramBytes + sPadding); +var getDunderProto = __nccwpck_require__(62693); + +/** @type {import('.')} */ +module.exports = reflectGetProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return reflectGetProto(O); } + : originalGetProto + ? function getProto(O) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new TypeError('getProto: not an object'); + } + // @ts-expect-error TS can't narrow inside a closure, for some reason + return originalGetProto(O); + } + : getDunderProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return getDunderProto(O); + } + : null; - return dst; + +/***/ }), + +/***/ 44627: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2012 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthClient = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = exports.DEFAULT_UNIVERSE = void 0; +const events_1 = __nccwpck_require__(82361); +const gaxios_1 = __nccwpck_require__(59555); +const transporters_1 = __nccwpck_require__(72649); +const util_1 = __nccwpck_require__(68905); +/** + * The default cloud universe + * + * @see {@link AuthJSONOptions.universe_domain} + */ +exports.DEFAULT_UNIVERSE = 'googleapis.com'; +/** + * The default {@link AuthClientOptions.eagerRefreshThresholdMillis} + */ +exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1000; +class AuthClient extends events_1.EventEmitter { + constructor(opts = {}) { + var _a, _b, _c, _d, _e; + super(); + this.credentials = {}; + this.eagerRefreshThresholdMillis = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS; + this.forceRefreshOnFailure = false; + this.universeDomain = exports.DEFAULT_UNIVERSE; + const options = (0, util_1.originalOrCamelOptions)(opts); + // Shared auth options + this.apiKey = opts.apiKey; + this.projectId = (_a = options.get('project_id')) !== null && _a !== void 0 ? _a : null; + this.quotaProjectId = options.get('quota_project_id'); + this.credentials = (_b = options.get('credentials')) !== null && _b !== void 0 ? _b : {}; + this.universeDomain = (_c = options.get('universe_domain')) !== null && _c !== void 0 ? _c : exports.DEFAULT_UNIVERSE; + // Shared client options + this.transporter = (_d = opts.transporter) !== null && _d !== void 0 ? _d : new transporters_1.DefaultTransporter(); + if (opts.transporterOptions) { + this.transporter.defaults = opts.transporterOptions; + } + if (opts.eagerRefreshThresholdMillis) { + this.eagerRefreshThresholdMillis = opts.eagerRefreshThresholdMillis; + } + this.forceRefreshOnFailure = (_e = opts.forceRefreshOnFailure) !== null && _e !== void 0 ? _e : false; + } + /** + * Return the {@link Gaxios `Gaxios`} instance from the {@link AuthClient.transporter}. + * + * @expiremental + */ + get gaxios() { + if (this.transporter instanceof gaxios_1.Gaxios) { + return this.transporter; + } + else if (this.transporter instanceof transporters_1.DefaultTransporter) { + return this.transporter.instance; + } + else if ('instance' in this.transporter && + this.transporter.instance instanceof gaxios_1.Gaxios) { + return this.transporter.instance; + } + return null; + } + /** + * Sets the auth credentials. + */ + setCredentials(credentials) { + this.credentials = credentials; + } + /** + * Append additional headers, e.g., x-goog-user-project, shared across the + * classes inheriting AuthClient. This method should be used by any method + * that overrides getRequestMetadataAsync(), which is a shared helper for + * setting request information in both gRPC and HTTP API calls. + * + * @param headers object to append additional headers to. + */ + addSharedMetadataHeaders(headers) { + // quota_project_id, stored in application_default_credentials.json, is set in + // the x-goog-user-project header, to indicate an alternate account for + // billing and quota: + if (!headers['x-goog-user-project'] && // don't override a value the user sets. + this.quotaProjectId) { + headers['x-goog-user-project'] = this.quotaProjectId; + } + return headers; + } + /** + * Retry config for Auth-related requests. + * + * @remarks + * + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. + */ + static get RETRY_CONFIG() { + return { + retry: true, + retryConfig: { + httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], + }, + }; + } } - -module.exports = { - derToJose: derToJose, - joseToDer: joseToDer -}; +exports.AuthClient = AuthClient; /***/ }), -/***/ 30528: -/***/ ((module) => { +/***/ 71569: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -function getParamSize(keySize) { - var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); - return result; -} - -var paramBytesForAlg = { - ES256: getParamSize(256), - ES384: getParamSize(384), - ES512: getParamSize(521) +// Copyright 2021 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; - -function getParamBytesForAlg(alg) { - var paramBytes = paramBytesForAlg[alg]; - if (paramBytes) { - return paramBytes; - } - - throw new Error('Unknown algorithm "' + alg + '"'); +var _a, _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AwsClient = void 0; +const awsrequestsigner_1 = __nccwpck_require__(1754); +const baseexternalclient_1 = __nccwpck_require__(40810); +const defaultawssecuritycredentialssupplier_1 = __nccwpck_require__(89799); +const util_1 = __nccwpck_require__(68905); +/** + * AWS external account client. This is used for AWS workloads, where + * AWS STS GetCallerIdentity serialized signed requests are exchanged for + * GCP access token. + */ +class AwsClient extends baseexternalclient_1.BaseExternalAccountClient { + /** + * Instantiates an AwsClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid AWS credential. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + super(options, additionalOptions); + const opts = (0, util_1.originalOrCamelOptions)(options); + const credentialSource = opts.get('credential_source'); + const awsSecurityCredentialsSupplier = opts.get('aws_security_credentials_supplier'); + // Validate credential sourcing configuration. + if (!credentialSource && !awsSecurityCredentialsSupplier) { + throw new Error('A credential source or AWS security credentials supplier must be specified.'); + } + if (credentialSource && awsSecurityCredentialsSupplier) { + throw new Error('Only one of credential source or AWS security credentials supplier can be specified.'); + } + if (awsSecurityCredentialsSupplier) { + this.awsSecurityCredentialsSupplier = awsSecurityCredentialsSupplier; + this.regionalCredVerificationUrl = + __classPrivateFieldGet(_a, _a, "f", _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL); + this.credentialSourceType = 'programmatic'; + } + else { + const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); + this.environmentId = credentialSourceOpts.get('environment_id'); + // This is only required if the AWS region is not available in the + // AWS_REGION or AWS_DEFAULT_REGION environment variables. + const regionUrl = credentialSourceOpts.get('region_url'); + // This is only required if AWS security credentials are not available in + // environment variables. + const securityCredentialsUrl = credentialSourceOpts.get('url'); + const imdsV2SessionTokenUrl = credentialSourceOpts.get('imdsv2_session_token_url'); + this.awsSecurityCredentialsSupplier = + new defaultawssecuritycredentialssupplier_1.DefaultAwsSecurityCredentialsSupplier({ + regionUrl: regionUrl, + securityCredentialsUrl: securityCredentialsUrl, + imdsV2SessionTokenUrl: imdsV2SessionTokenUrl, + }); + this.regionalCredVerificationUrl = credentialSourceOpts.get('regional_cred_verification_url'); + this.credentialSourceType = 'aws'; + // Data validators. + this.validateEnvironmentId(); + } + this.awsRequestSigner = null; + this.region = ''; + } + validateEnvironmentId() { + var _b; + const match = (_b = this.environmentId) === null || _b === void 0 ? void 0 : _b.match(/^(aws)(\d+)$/); + if (!match || !this.regionalCredVerificationUrl) { + throw new Error('No valid AWS "credential_source" provided'); + } + else if (parseInt(match[2], 10) !== 1) { + throw new Error(`aws version "${match[2]}" is not supported in the current build.`); + } + } + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. This will call the + * {@link AwsSecurityCredentialsSupplier} to retrieve an AWS region and AWS + * Security Credentials, then use them to create a signed AWS STS request that + * can be exchanged for a GCP access token. + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + // Initialize AWS request signer if not already initialized. + if (!this.awsRequestSigner) { + this.region = await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext); + this.awsRequestSigner = new awsrequestsigner_1.AwsRequestSigner(async () => { + return this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext); + }, this.region); + } + // Generate signed request to AWS STS GetCallerIdentity API. + // Use the required regional endpoint. Otherwise, the request will fail. + const options = await this.awsRequestSigner.getRequestOptions({ + ..._a.RETRY_CONFIG, + url: this.regionalCredVerificationUrl.replace('{region}', this.region), + method: 'POST', + }); + // The GCP STS endpoint expects the headers to be formatted as: + // [ + // {key: 'x-amz-date', value: '...'}, + // {key: 'Authorization', value: '...'}, + // ... + // ] + // And then serialized as: + // encodeURIComponent(JSON.stringify({ + // url: '...', + // method: 'POST', + // headers: [{key: 'x-amz-date', value: '...'}, ...] + // })) + const reformattedHeader = []; + const extendedHeaders = Object.assign({ + // The full, canonical resource name of the workload identity pool + // provider, with or without the HTTPS prefix. + // Including this header as part of the signature is recommended to + // ensure data integrity. + 'x-goog-cloud-target-resource': this.audience, + }, options.headers); + // Reformat header to GCP STS expected format. + for (const key in extendedHeaders) { + reformattedHeader.push({ + key, + value: extendedHeaders[key], + }); + } + // Serialize the reformatted signed request. + return encodeURIComponent(JSON.stringify({ + url: options.url, + method: options.method, + headers: reformattedHeader, + })); + } } - -module.exports = getParamBytesForAlg; +exports.AwsClient = AwsClient; +_a = AwsClient; +_AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL = { value: 'https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15' }; +/** + * @deprecated AWS client no validates the EC2 metadata address. + **/ +AwsClient.AWS_EC2_METADATA_IPV4_ADDRESS = '169.254.169.254'; +/** + * @deprecated AWS client no validates the EC2 metadata address. + **/ +AwsClient.AWS_EC2_METADATA_IPV6_ADDRESS = 'fd00:ec2::254'; /***/ }), -/***/ 81205: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var once = __nccwpck_require__(1223); - -var noop = function() {}; - -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; - -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onerror = function(err) { - callback.call(stream, err); - }; - - var onclose = function() { - process.nextTick(onclosenexttick); - }; - - var onclosenexttick = function() { - if (cancelled) return; - if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); +/***/ 1754: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return function() { - cancelled = true; - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; +"use strict"; -module.exports = eos; +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AwsRequestSigner = void 0; +const crypto_1 = __nccwpck_require__(78043); +/** AWS Signature Version 4 signing algorithm identifier. */ +const AWS_ALGORITHM = 'AWS4-HMAC-SHA256'; +/** + * The termination string for the AWS credential scope value as defined in + * https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html + */ +const AWS_REQUEST_TYPE = 'aws4_request'; +/** + * Implements an AWS API request signer based on the AWS Signature Version 4 + * signing process. + * https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html + */ +class AwsRequestSigner { + /** + * Instantiates an AWS API request signer used to send authenticated signed + * requests to AWS APIs based on the AWS Signature Version 4 signing process. + * This also provides a mechanism to generate the signed request without + * sending it. + * @param getCredentials A mechanism to retrieve AWS security credentials + * when needed. + * @param region The AWS region to use. + */ + constructor(getCredentials, region) { + this.getCredentials = getCredentials; + this.region = region; + this.crypto = (0, crypto_1.createCrypto)(); + } + /** + * Generates the signed request for the provided HTTP request for calling + * an AWS API. This follows the steps described at: + * https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html + * @param amzOptions The AWS request options that need to be signed. + * @return A promise that resolves with the GaxiosOptions containing the + * signed HTTP request parameters. + */ + async getRequestOptions(amzOptions) { + if (!amzOptions.url) { + throw new Error('"url" is required in "amzOptions"'); + } + // Stringify JSON requests. This will be set in the request body of the + // generated signed request. + const requestPayloadData = typeof amzOptions.data === 'object' + ? JSON.stringify(amzOptions.data) + : amzOptions.data; + const url = amzOptions.url; + const method = amzOptions.method || 'GET'; + const requestPayload = amzOptions.body || requestPayloadData; + const additionalAmzHeaders = amzOptions.headers; + const awsSecurityCredentials = await this.getCredentials(); + const uri = new URL(url); + const headerMap = await generateAuthenticationHeaderMap({ + crypto: this.crypto, + host: uri.host, + canonicalUri: uri.pathname, + canonicalQuerystring: uri.search.substr(1), + method, + region: this.region, + securityCredentials: awsSecurityCredentials, + requestPayload, + additionalAmzHeaders, + }); + // Append additional optional headers, eg. X-Amz-Target, Content-Type, etc. + const headers = Object.assign( + // Add x-amz-date if available. + headerMap.amzDate ? { 'x-amz-date': headerMap.amzDate } : {}, { + Authorization: headerMap.authorizationHeader, + host: uri.host, + }, additionalAmzHeaders || {}); + if (awsSecurityCredentials.token) { + Object.assign(headers, { + 'x-amz-security-token': awsSecurityCredentials.token, + }); + } + const awsSignedReq = { + url, + method: method, + headers, + }; + if (typeof requestPayload !== 'undefined') { + awsSignedReq.body = requestPayload; + } + return awsSignedReq; + } +} +exports.AwsRequestSigner = AwsRequestSigner; +/** + * Creates the HMAC-SHA256 hash of the provided message using the + * provided key. + * + * @param crypto The crypto instance used to facilitate cryptographic + * operations. + * @param key The HMAC-SHA256 key to use. + * @param msg The message to hash. + * @return The computed hash bytes. + */ +async function sign(crypto, key, msg) { + return await crypto.signWithHmacSha256(key, msg); +} +/** + * Calculates the signing key used to calculate the signature for + * AWS Signature Version 4 based on: + * https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + * + * @param crypto The crypto instance used to facilitate cryptographic + * operations. + * @param key The AWS secret access key. + * @param dateStamp The '%Y%m%d' date format. + * @param region The AWS region. + * @param serviceName The AWS service name, eg. sts. + * @return The signing key bytes. + */ +async function getSigningKey(crypto, key, dateStamp, region, serviceName) { + const kDate = await sign(crypto, `AWS4${key}`, dateStamp); + const kRegion = await sign(crypto, kDate, region); + const kService = await sign(crypto, kRegion, serviceName); + const kSigning = await sign(crypto, kService, 'aws4_request'); + return kSigning; +} +/** + * Generates the authentication header map needed for generating the AWS + * Signature Version 4 signed request. + * + * @param option The options needed to compute the authentication header map. + * @return The AWS authentication header map which constitutes of the following + * components: amz-date, authorization header and canonical query string. + */ +async function generateAuthenticationHeaderMap(options) { + const additionalAmzHeaders = options.additionalAmzHeaders || {}; + const requestPayload = options.requestPayload || ''; + // iam.amazonaws.com host => iam service. + // sts.us-east-2.amazonaws.com => sts service. + const serviceName = options.host.split('.')[0]; + const now = new Date(); + // Format: '%Y%m%dT%H%M%SZ'. + const amzDate = now + .toISOString() + .replace(/[-:]/g, '') + .replace(/\.[0-9]+/, ''); + // Format: '%Y%m%d'. + const dateStamp = now.toISOString().replace(/[-]/g, '').replace(/T.*/, ''); + // Change all additional headers to be lower case. + const reformattedAdditionalAmzHeaders = {}; + Object.keys(additionalAmzHeaders).forEach(key => { + reformattedAdditionalAmzHeaders[key.toLowerCase()] = + additionalAmzHeaders[key]; + }); + // Add AWS token if available. + if (options.securityCredentials.token) { + reformattedAdditionalAmzHeaders['x-amz-security-token'] = + options.securityCredentials.token; + } + // Header keys need to be sorted alphabetically. + const amzHeaders = Object.assign({ + host: options.host, + }, + // Previously the date was not fixed with x-amz- and could be provided manually. + // https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/aws4_testsuite/get-header-value-trim.req + reformattedAdditionalAmzHeaders.date ? {} : { 'x-amz-date': amzDate }, reformattedAdditionalAmzHeaders); + let canonicalHeaders = ''; + const signedHeadersList = Object.keys(amzHeaders).sort(); + signedHeadersList.forEach(key => { + canonicalHeaders += `${key}:${amzHeaders[key]}\n`; + }); + const signedHeaders = signedHeadersList.join(';'); + const payloadHash = await options.crypto.sha256DigestHex(requestPayload); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html + const canonicalRequest = `${options.method}\n` + + `${options.canonicalUri}\n` + + `${options.canonicalQuerystring}\n` + + `${canonicalHeaders}\n` + + `${signedHeaders}\n` + + `${payloadHash}`; + const credentialScope = `${dateStamp}/${options.region}/${serviceName}/${AWS_REQUEST_TYPE}`; + // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html + const stringToSign = `${AWS_ALGORITHM}\n` + + `${amzDate}\n` + + `${credentialScope}\n` + + (await options.crypto.sha256DigestHex(canonicalRequest)); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + const signingKey = await getSigningKey(options.crypto, options.securityCredentials.secretAccessKey, dateStamp, options.region, serviceName); + const signature = await sign(options.crypto, signingKey, stringToSign); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html + const authorizationHeader = `${AWS_ALGORITHM} Credential=${options.securityCredentials.accessKeyId}/` + + `${credentialScope}, SignedHeaders=${signedHeaders}, ` + + `Signature=${(0, crypto_1.fromArrayBufferToHex)(signature)}`; + return { + // Do not return x-amz-date if date is available. + amzDate: reformattedAdditionalAmzHeaders.date ? undefined : amzDate, + authorizationHeader, + canonicalQuerystring: options.canonicalQuerystring, + }; +} /***/ }), -/***/ 84697: -/***/ ((module, exports) => { +/***/ 40810: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -/** - * @author Toru Nagashima - * @copyright 2015 Toru Nagashima. All rights reserved. - * See LICENSE file in root directory for full license. - */ - +// Copyright 2021 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _BaseExternalAccountClient_instances, _BaseExternalAccountClient_pendingAccessToken, _BaseExternalAccountClient_internalRefreshAccessTokenAsync; Object.defineProperty(exports, "__esModule", ({ value: true })); - +exports.BaseExternalAccountClient = exports.DEFAULT_UNIVERSE = exports.CLOUD_RESOURCE_MANAGER = exports.EXTERNAL_ACCOUNT_TYPE = exports.EXPIRATION_TIME_OFFSET = void 0; +const stream = __nccwpck_require__(12781); +const authclient_1 = __nccwpck_require__(44627); +const sts = __nccwpck_require__(86308); +const util_1 = __nccwpck_require__(68905); /** - * @typedef {object} PrivateData - * @property {EventTarget} eventTarget The event target. - * @property {{type:string}} event The original event object. - * @property {number} eventPhase The current event phase. - * @property {EventTarget|null} currentTarget The current event target. - * @property {boolean} canceled The flag to prevent default. - * @property {boolean} stopped The flag to stop propagation. - * @property {boolean} immediateStopped The flag to stop propagation immediately. - * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. - * @property {number} timeStamp The unix time. - * @private + * The required token exchange grant_type: rfc8693#section-2.1 */ - +const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; /** - * Private data for event wrappers. - * @type {WeakMap} - * @private + * The requested token exchange requested_token_type: rfc8693#section-2.1 */ -const privateData = new WeakMap(); - +const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; +/** The default OAuth scope to request when none is provided. */ +const DEFAULT_OAUTH_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; +/** Default impersonated token lifespan in seconds.*/ +const DEFAULT_TOKEN_LIFESPAN = 3600; /** - * Cache for wrapper classes. - * @type {WeakMap} - * @private + * Offset to take into account network delays and server clock skews. */ -const wrappers = new WeakMap(); - +exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; /** - * Get private data. - * @param {Event} event The event object to get private data. - * @returns {PrivateData} The private data of the event. - * @private + * The credentials JSON file type for external account clients. + * There are 3 types of JSON configs: + * 1. authorized_user => Google end user credential + * 2. service_account => Google service account credential + * 3. external_Account => non-GCP service (eg. AWS, Azure, K8s) */ -function pd(event) { - const retv = privateData.get(event); - console.assert( - retv != null, - "'this' is expected an Event object, but got", - event - ); - return retv -} - +exports.EXTERNAL_ACCOUNT_TYPE = 'external_account'; /** - * https://dom.spec.whatwg.org/#set-the-canceled-flag - * @param data {PrivateData} private data. + * Cloud resource manager URL used to retrieve project information. + * + * @deprecated use {@link BaseExternalAccountClient.cloudResourceManagerURL} instead + **/ +exports.CLOUD_RESOURCE_MANAGER = 'https://cloudresourcemanager.googleapis.com/v1/projects/'; +/** The workforce audience pattern. */ +const WORKFORCE_AUDIENCE_PATTERN = '//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+'; +const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/token'; +// eslint-disable-next-line @typescript-eslint/no-var-requires +const pkg = __nccwpck_require__(51402); +/** + * For backwards compatibility. */ -function setCancelFlag(data) { - if (data.passiveListener != null) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error( - "Unable to preventDefault inside passive event listener invocation.", - data.passiveListener - ); +var authclient_2 = __nccwpck_require__(44627); +Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_2.DEFAULT_UNIVERSE; } })); +/** + * Base external account client. This is used to instantiate AuthClients for + * exchanging external account credentials for GCP access token and authorizing + * requests to GCP APIs. + * The base class implements common logic for exchanging various type of + * external credentials for GCP access token. The logic of determining and + * retrieving the external credential based on the environment and + * credential_source will be left for the subclasses. + */ +class BaseExternalAccountClient extends authclient_1.AuthClient { + /** + * Instantiate a BaseExternalAccountClient instance using the provided JSON + * object loaded from an external account credentials file. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + var _a; + super({ ...options, ...additionalOptions }); + _BaseExternalAccountClient_instances.add(this); + /** + * A pending access token request. Used for concurrent calls. + */ + _BaseExternalAccountClient_pendingAccessToken.set(this, null); + const opts = (0, util_1.originalOrCamelOptions)(options); + const type = opts.get('type'); + if (type && type !== exports.EXTERNAL_ACCOUNT_TYPE) { + throw new Error(`Expected "${exports.EXTERNAL_ACCOUNT_TYPE}" type but ` + + `received "${options.type}"`); } - return + const clientId = opts.get('client_id'); + const clientSecret = opts.get('client_secret'); + const tokenUrl = (_a = opts.get('token_url')) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain); + const subjectTokenType = opts.get('subject_token_type'); + const workforcePoolUserProject = opts.get('workforce_pool_user_project'); + const serviceAccountImpersonationUrl = opts.get('service_account_impersonation_url'); + const serviceAccountImpersonation = opts.get('service_account_impersonation'); + const serviceAccountImpersonationLifetime = (0, util_1.originalOrCamelOptions)(serviceAccountImpersonation).get('token_lifetime_seconds'); + this.cloudResourceManagerURL = new URL(opts.get('cloud_resource_manager_url') || + `https://cloudresourcemanager.${this.universeDomain}/v1/projects/`); + if (clientId) { + this.clientAuth = { + confidentialClientType: 'basic', + clientId, + clientSecret, + }; + } + this.stsCredential = new sts.StsCredentials(tokenUrl, this.clientAuth); + this.scopes = opts.get('scopes') || [DEFAULT_OAUTH_SCOPE]; + this.cachedAccessToken = null; + this.audience = opts.get('audience'); + this.subjectTokenType = subjectTokenType; + this.workforcePoolUserProject = workforcePoolUserProject; + const workforceAudiencePattern = new RegExp(WORKFORCE_AUDIENCE_PATTERN); + if (this.workforcePoolUserProject && + !this.audience.match(workforceAudiencePattern)) { + throw new Error('workforcePoolUserProject should not be set for non-workforce pool ' + + 'credentials.'); + } + this.serviceAccountImpersonationUrl = serviceAccountImpersonationUrl; + this.serviceAccountImpersonationLifetime = + serviceAccountImpersonationLifetime; + if (this.serviceAccountImpersonationLifetime) { + this.configLifetimeRequested = true; + } + else { + this.configLifetimeRequested = false; + this.serviceAccountImpersonationLifetime = DEFAULT_TOKEN_LIFESPAN; + } + this.projectNumber = this.getProjectNumber(this.audience); + this.supplierContext = { + audience: this.audience, + subjectTokenType: this.subjectTokenType, + transporter: this.transporter, + }; } - if (!data.event.cancelable) { - return + /** The service account email to be impersonated, if available. */ + getServiceAccountEmail() { + var _a; + if (this.serviceAccountImpersonationUrl) { + if (this.serviceAccountImpersonationUrl.length > 256) { + /** + * Prevents DOS attacks. + * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/84} + **/ + throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`); + } + // Parse email from URL. The formal looks as follows: + // https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/name@project-id.iam.gserviceaccount.com:generateAccessToken + const re = /serviceAccounts\/(?[^:]+):generateAccessToken$/; + const result = re.exec(this.serviceAccountImpersonationUrl); + return ((_a = result === null || result === void 0 ? void 0 : result.groups) === null || _a === void 0 ? void 0 : _a.email) || null; + } + return null; } - - data.canceled = true; - if (typeof data.event.preventDefault === "function") { - data.event.preventDefault(); + /** + * Provides a mechanism to inject GCP access tokens directly. + * When the provided credential expires, a new credential, using the + * external account options, is retrieved. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials) { + super.setCredentials(credentials); + this.cachedAccessToken = credentials; } -} - -/** - * @see https://dom.spec.whatwg.org/#interface-event - * @private - */ -/** - * The event wrapper. - * @constructor - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Event|{type:string}} event The original event to wrap. - */ -function Event(eventTarget, event) { - privateData.set(this, { - eventTarget, - event, - eventPhase: 2, - currentTarget: eventTarget, - canceled: false, - stopped: false, - immediateStopped: false, - passiveListener: null, - timeStamp: event.timeStamp || Date.now(), - }); - - // https://heycam.github.io/webidl/#Unforgeable - Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); - - // Define accessors - const keys = Object.keys(event); - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in this)) { - Object.defineProperty(this, key, defineRedirectDescriptor(key)); + /** + * @return A promise that resolves with the current GCP access token + * response. If the current credential is expired, a new one is retrieved. + */ + async getAccessToken() { + // If cached access token is unavailable or expired, force refresh. + if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { + await this.refreshAccessTokenAsync(); } + // Return GCP access token in GetAccessTokenResponse format. + return { + token: this.cachedAccessToken.access_token, + res: this.cachedAccessToken.res, + }; } -} - -// Should be enumerable, but class methods are not enumerable. -Event.prototype = { /** - * The type of this event. - * @type {string} + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { Authorization: 'Bearer ' } */ - get type() { - return pd(this).event.type - }, - + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = { + Authorization: `Bearer ${accessTokenResponse.token}`, + }; + return this.addSharedMetadataHeaders(headers); + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } /** - * The target of this event. - * @type {EventTarget} + * @return A promise that resolves with the project ID corresponding to the + * current workload identity pool or current workforce pool if + * determinable. For workforce pool credential, it returns the project ID + * corresponding to the workforcePoolUserProject. + * This is introduced to match the current pattern of using the Auth + * library: + * const projectId = await auth.getProjectId(); + * const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`; + * const res = await client.request({ url }); + * The resource may not have permission + * (resourcemanager.projects.get) to call this API or the required + * scopes may not be selected: + * https://cloud.google.com/resource-manager/reference/rest/v1/projects/get#authorization-scopes */ - get target() { - return pd(this).eventTarget - }, - + async getProjectId() { + const projectNumber = this.projectNumber || this.workforcePoolUserProject; + if (this.projectId) { + // Return previously determined project ID. + return this.projectId; + } + else if (projectNumber) { + // Preferable not to use request() to avoid retrial policies. + const headers = await this.getRequestHeaders(); + const response = await this.transporter.request({ + ...BaseExternalAccountClient.RETRY_CONFIG, + headers, + url: `${this.cloudResourceManagerURL.toString()}${projectNumber}`, + responseType: 'json', + }); + this.projectId = response.data.projectId; + return this.projectId; + } + return null; + } /** - * The target of this event. - * @type {EventTarget} + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. */ - get currentTarget() { - return pd(this).currentTarget - }, - + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = opts.headers || {}; + if (requestHeaders && requestHeaders['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = + requestHeaders['x-goog-user-project']; + } + if (requestHeaders && requestHeaders.Authorization) { + opts.headers.Authorization = requestHeaders.Authorization; + } + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; + } + return response; + } /** - * @returns {EventTarget[]} The composed path of this event. + * Forces token refresh, even if unexpired tokens are currently cached. + * External credentials are exchanged for GCP access tokens via the token + * exchange endpoint and other settings provided in the client options + * object. + * If the service_account_impersonation_url is provided, an additional + * step to exchange the external account GCP access token for a service + * account impersonated token is performed. + * @return A promise that resolves with the fresh GCP access tokens. */ - composedPath() { - const currentTarget = pd(this).currentTarget; - if (currentTarget == null) { - return [] + async refreshAccessTokenAsync() { + // Use an existing access token request, or cache a new one + __classPrivateFieldSet(this, _BaseExternalAccountClient_pendingAccessToken, __classPrivateFieldGet(this, _BaseExternalAccountClient_pendingAccessToken, "f") || __classPrivateFieldGet(this, _BaseExternalAccountClient_instances, "m", _BaseExternalAccountClient_internalRefreshAccessTokenAsync).call(this), "f"); + try { + return await __classPrivateFieldGet(this, _BaseExternalAccountClient_pendingAccessToken, "f"); } - return [currentTarget] - }, + finally { + // clear pending access token for future requests + __classPrivateFieldSet(this, _BaseExternalAccountClient_pendingAccessToken, null, "f"); + } + } + /** + * Returns the workload identity pool project number if it is determinable + * from the audience resource name. + * @param audience The STS audience used to determine the project number. + * @return The project number associated with the workload identity pool, if + * this can be determined from the STS audience field. Otherwise, null is + * returned. + */ + getProjectNumber(audience) { + // STS audience pattern: + // //iam.googleapis.com/projects/$PROJECT_NUMBER/locations/... + const match = audience.match(/\/projects\/([^/]+)/); + if (!match) { + return null; + } + return match[1]; + } + /** + * Exchanges an external account GCP access token for a service + * account impersonated access token using iamcredentials + * GenerateAccessToken API. + * @param token The access token to exchange for a service account access + * token. + * @return A promise that resolves with the service account impersonated + * credentials response. + */ + async getImpersonatedAccessToken(token) { + const opts = { + ...BaseExternalAccountClient.RETRY_CONFIG, + url: this.serviceAccountImpersonationUrl, + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: { + scope: this.getScopesArray(), + lifetime: this.serviceAccountImpersonationLifetime + 's', + }, + responseType: 'json', + }; + const response = await this.transporter.request(opts); + const successResponse = response.data; + return { + access_token: successResponse.accessToken, + // Convert from ISO format to timestamp. + expiry_date: new Date(successResponse.expireTime).getTime(), + res: response, + }; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param accessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(accessToken) { + const now = new Date().getTime(); + return accessToken.expiry_date + ? now >= accessToken.expiry_date - this.eagerRefreshThresholdMillis + : false; + } + /** + * @return The list of scopes for the requested GCP access token. + */ + getScopesArray() { + // Since scopes can be provided as string or array, the type should + // be normalized. + if (typeof this.scopes === 'string') { + return [this.scopes]; + } + return this.scopes || [DEFAULT_OAUTH_SCOPE]; + } + getMetricsHeaderValue() { + const nodeVersion = process.version.replace(/^v/, ''); + const saImpersonation = this.serviceAccountImpersonationUrl !== undefined; + const credentialSourceType = this.credentialSourceType + ? this.credentialSourceType + : 'unknown'; + return `gl-node/${nodeVersion} auth/${pkg.version} google-byoid-sdk source/${credentialSourceType} sa-impersonation/${saImpersonation} config-lifetime/${this.configLifetimeRequested}`; + } +} +exports.BaseExternalAccountClient = BaseExternalAccountClient; +_BaseExternalAccountClient_pendingAccessToken = new WeakMap(), _BaseExternalAccountClient_instances = new WeakSet(), _BaseExternalAccountClient_internalRefreshAccessTokenAsync = async function _BaseExternalAccountClient_internalRefreshAccessTokenAsync() { + // Retrieve the external credential. + const subjectToken = await this.retrieveSubjectToken(); + // Construct the STS credentials options. + const stsCredentialsOptions = { + grantType: STS_GRANT_TYPE, + audience: this.audience, + requestedTokenType: STS_REQUEST_TOKEN_TYPE, + subjectToken, + subjectTokenType: this.subjectTokenType, + // generateAccessToken requires the provided access token to have + // scopes: + // https://www.googleapis.com/auth/iam or + // https://www.googleapis.com/auth/cloud-platform + // The new service account access token scopes will match the user + // provided ones. + scope: this.serviceAccountImpersonationUrl + ? [DEFAULT_OAUTH_SCOPE] + : this.getScopesArray(), + }; + // Exchange the external credentials for a GCP access token. + // Client auth is prioritized over passing the workforcePoolUserProject + // parameter for STS token exchange. + const additionalOptions = !this.clientAuth && this.workforcePoolUserProject + ? { userProject: this.workforcePoolUserProject } + : undefined; + const additionalHeaders = { + 'x-goog-api-client': this.getMetricsHeaderValue(), + }; + const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, additionalHeaders, additionalOptions); + if (this.serviceAccountImpersonationUrl) { + this.cachedAccessToken = await this.getImpersonatedAccessToken(stsResponse.access_token); + } + else if (stsResponse.expires_in) { + // Save response in cached access token. + this.cachedAccessToken = { + access_token: stsResponse.access_token, + expiry_date: new Date().getTime() + stsResponse.expires_in * 1000, + res: stsResponse.res, + }; + } + else { + // Save response in cached access token. + this.cachedAccessToken = { + access_token: stsResponse.access_token, + res: stsResponse.res, + }; + } + // Save credentials. + this.credentials = {}; + Object.assign(this.credentials, this.cachedAccessToken); + delete this.credentials.res; + // Trigger tokens event to notify external listeners. + this.emit('tokens', { + refresh_token: null, + expiry_date: this.cachedAccessToken.expiry_date, + access_token: this.cachedAccessToken.access_token, + token_type: 'Bearer', + id_token: null, + }); + // Return the cached access token. + return this.cachedAccessToken; +}; - /** - * Constant of NONE. - * @type {number} - */ - get NONE() { - return 0 - }, - /** - * Constant of CAPTURING_PHASE. - * @type {number} - */ - get CAPTURING_PHASE() { - return 1 - }, +/***/ }), - /** - * Constant of AT_TARGET. - * @type {number} - */ - get AT_TARGET() { - return 2 - }, +/***/ 96875: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Constant of BUBBLING_PHASE. - * @type {number} - */ - get BUBBLING_PHASE() { - return 3 - }, +"use strict"; +// Copyright 2013 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Compute = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const gcpMetadata = __nccwpck_require__(3563); +const oauth2client_1 = __nccwpck_require__(3936); +class Compute extends oauth2client_1.OAuth2Client { /** - * The target of this event. - * @type {number} + * Google Compute Engine service account credentials. + * + * Retrieve access token from the metadata server. + * See: https://cloud.google.com/compute/docs/access/authenticate-workloads#applications */ - get eventPhase() { - return pd(this).eventPhase - }, - + constructor(options = {}) { + super(options); + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { expiry_date: 1, refresh_token: 'compute-placeholder' }; + this.serviceAccountEmail = options.serviceAccountEmail || 'default'; + this.scopes = Array.isArray(options.scopes) + ? options.scopes + : options.scopes + ? [options.scopes] + : []; + } /** - * Stop event bubbling. - * @returns {void} + * Refreshes the access token. + * @param refreshToken Unused parameter */ - stopPropagation() { - const data = pd(this); - - data.stopped = true; - if (typeof data.event.stopPropagation === "function") { - data.event.stopPropagation(); + async refreshTokenNoCache( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + refreshToken) { + const tokenPath = `service-accounts/${this.serviceAccountEmail}/token`; + let data; + try { + const instanceOptions = { + property: tokenPath, + }; + if (this.scopes.length > 0) { + instanceOptions.params = { + scopes: this.scopes.join(','), + }; + } + data = await gcpMetadata.instance(instanceOptions); } - }, - - /** - * Stop event bubbling. - * @returns {void} - */ - stopImmediatePropagation() { - const data = pd(this); - - data.stopped = true; - data.immediateStopped = true; - if (typeof data.event.stopImmediatePropagation === "function") { - data.event.stopImmediatePropagation(); + catch (e) { + if (e instanceof gaxios_1.GaxiosError) { + e.message = `Could not refresh access token: ${e.message}`; + this.wrapError(e); + } + throw e; } - }, - - /** - * The flag to be bubbling. - * @type {boolean} - */ - get bubbles() { - return Boolean(pd(this).event.bubbles) - }, - + const tokens = data; + if (data && data.expires_in) { + tokens.expiry_date = new Date().getTime() + data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res: null }; + } /** - * The flag to be cancelable. - * @type {boolean} + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. */ - get cancelable() { - return Boolean(pd(this).event.cancelable) - }, + async fetchIdToken(targetAudience) { + const idTokenPath = `service-accounts/${this.serviceAccountEmail}/identity` + + `?format=full&audience=${targetAudience}`; + let idToken; + try { + const instanceOptions = { + property: idTokenPath, + }; + idToken = await gcpMetadata.instance(instanceOptions); + } + catch (e) { + if (e instanceof Error) { + e.message = `Could not fetch ID token: ${e.message}`; + } + throw e; + } + return idToken; + } + wrapError(e) { + const res = e.response; + if (res && res.status) { + e.status = res.status; + if (res.status === 403) { + e.message = + 'A Forbidden error was returned while attempting to retrieve an access ' + + 'token for the Compute Engine built-in service account. This may be because the Compute ' + + 'Engine instance does not have the correct permission scopes specified: ' + + e.message; + } + else if (res.status === 404) { + e.message = + 'A Not Found error was returned while attempting to retrieve an access' + + 'token for the Compute Engine built-in service account. This may be because the Compute ' + + 'Engine instance does not have any permission scopes specified: ' + + e.message; + } + } + } +} +exports.Compute = Compute; - /** - * Cancel this event. - * @returns {void} - */ - preventDefault() { - setCancelFlag(pd(this)); - }, - /** - * The flag to indicate cancellation state. - * @type {boolean} - */ - get defaultPrevented() { - return pd(this).canceled - }, +/***/ }), - /** - * The flag to be composed. - * @type {boolean} - */ - get composed() { - return Boolean(pd(this).event.composed) - }, +/***/ 89799: +/***/ (function(__unused_webpack_module, exports) { - /** - * The unix time of this event. - * @type {number} - */ - get timeStamp() { - return pd(this).timeStamp - }, +"use strict"; +// Copyright 2024 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _DefaultAwsSecurityCredentialsSupplier_instances, _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefaultAwsSecurityCredentialsSupplier = void 0; +/** + * Internal AWS security credentials supplier implementation used by {@link AwsClient} + * when a credential source is provided instead of a user defined supplier. + * The logic is summarized as: + * 1. If imdsv2_session_token_url is provided in the credential source, then + * fetch the aws session token and include it in the headers of the + * metadata requests. This is a requirement for IDMSv2 but optional + * for IDMSv1. + * 2. Retrieve AWS region from availability-zone. + * 3a. Check AWS credentials in environment variables. If not found, get + * from security-credentials endpoint. + * 3b. Get AWS credentials from security-credentials endpoint. In order + * to retrieve this, the AWS role needs to be determined by calling + * security-credentials endpoint without any argument. Then the + * credentials can be retrieved via: security-credentials/role_name + * 4. Generate the signed request to AWS STS GetCallerIdentity action. + * 5. Inject x-goog-cloud-target-resource into header and serialize the + * signed request. This will be the subject-token to pass to GCP STS. + */ +class DefaultAwsSecurityCredentialsSupplier { /** - * The target of this event. - * @type {EventTarget} - * @deprecated + * Instantiates a new DefaultAwsSecurityCredentialsSupplier using information + * from the credential_source stored in the ADC file. + * @param opts The default aws security credentials supplier options object to + * build the supplier with. */ - get srcElement() { - return pd(this).eventTarget - }, - + constructor(opts) { + _DefaultAwsSecurityCredentialsSupplier_instances.add(this); + this.regionUrl = opts.regionUrl; + this.securityCredentialsUrl = opts.securityCredentialsUrl; + this.imdsV2SessionTokenUrl = opts.imdsV2SessionTokenUrl; + this.additionalGaxiosOptions = opts.additionalGaxiosOptions; + } /** - * The flag to stop event bubbling. - * @type {boolean} - * @deprecated + * Returns the active AWS region. This first checks to see if the region + * is available as an environment variable. If it is not, then the supplier + * will call the region URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS region string. */ - get cancelBubble() { - return pd(this).stopped - }, - set cancelBubble(value) { - if (!value) { - return + async getAwsRegion(context) { + // Priority order for region determination: + // AWS_REGION > AWS_DEFAULT_REGION > metadata server. + if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get)) { + return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get); } - const data = pd(this); - - data.stopped = true; - if (typeof data.event.cancelBubble === "boolean") { - data.event.cancelBubble = true; + const metadataHeaders = {}; + if (!__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get) && this.imdsV2SessionTokenUrl) { + metadataHeaders['x-aws-ec2-metadata-token'] = + await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); } - }, - - /** - * The flag to indicate cancellation state. - * @type {boolean} - * @deprecated - */ - get returnValue() { - return !pd(this).canceled - }, - set returnValue(value) { - if (!value) { - setCancelFlag(pd(this)); + if (!this.regionUrl) { + throw new Error('Unable to determine AWS region due to missing ' + + '"options.credential_source.region_url"'); } - }, - + const opts = { + ...this.additionalGaxiosOptions, + url: this.regionUrl, + method: 'GET', + responseType: 'text', + headers: metadataHeaders, + }; + const response = await context.transporter.request(opts); + // Remove last character. For example, if us-east-2b is returned, + // the region would be us-east-2. + return response.data.substr(0, response.data.length - 1); + } /** - * Initialize this event object. But do nothing under event dispatching. - * @param {string} type The event type. - * @param {boolean} [bubbles=false] The flag to be possible to bubble up. - * @param {boolean} [cancelable=false] The flag to be possible to cancel. - * @deprecated + * Returns AWS security credentials. This first checks to see if the credentials + * is available as environment variables. If it is not, then the supplier + * will call the security credentials URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS security credentials. */ - initEvent() { - // Do nothing. - }, -}; - -// `constructor` is not enumerable. -Object.defineProperty(Event.prototype, "constructor", { - value: Event, - configurable: true, - writable: true, -}); - -// Ensure `event instanceof window.Event` is `true`. -if (typeof window !== "undefined" && typeof window.Event !== "undefined") { - Object.setPrototypeOf(Event.prototype, window.Event.prototype); - - // Make association for wrappers. - wrappers.set(window.Event.prototype, Event); -} - -/** - * Get the property descriptor to redirect a given property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to redirect the property. - * @private - */ -function defineRedirectDescriptor(key) { - return { - get() { - return pd(this).event[key] - }, - set(value) { - pd(this).event[key] = value; - }, - configurable: true, - enumerable: true, + async getAwsSecurityCredentials(context) { + // Check environment variables for permanent credentials first. + // https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html + if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get)) { + return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get); + } + const metadataHeaders = {}; + if (this.imdsV2SessionTokenUrl) { + metadataHeaders['x-aws-ec2-metadata-token'] = + await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); + } + // Since the role on a VM can change, we don't need to cache it. + const roleName = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName).call(this, metadataHeaders, context.transporter); + // Temporary credentials typically last for several hours. + // Expiration is returned in response. + // Consider future optimization of this logic to cache AWS tokens + // until their natural expiration. + const awsCreds = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials).call(this, roleName, metadataHeaders, context.transporter); + return { + accessKeyId: awsCreds.AccessKeyId, + secretAccessKey: awsCreds.SecretAccessKey, + token: awsCreds.Token, + }; } } - +exports.DefaultAwsSecurityCredentialsSupplier = DefaultAwsSecurityCredentialsSupplier; +_DefaultAwsSecurityCredentialsSupplier_instances = new WeakSet(), _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken = /** - * Get the property descriptor to call a given method property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to call the method property. - * @private + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the IMDSv2 Session Token. */ -function defineCallDescriptor(key) { - return { - value() { - const event = pd(this).event; - return event[key].apply(event, arguments) - }, - configurable: true, - enumerable: true, - } -} - +async function _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken(transporter) { + const opts = { + ...this.additionalGaxiosOptions, + url: this.imdsV2SessionTokenUrl, + method: 'PUT', + responseType: 'text', + headers: { 'x-aws-ec2-metadata-token-ttl-seconds': '300' }, + }; + const response = await transporter.request(opts); + return response.data; +}, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName = /** - * Define new wrapper class. - * @param {Function} BaseEvent The base wrapper class. - * @param {Object} proto The prototype of the original event. - * @returns {Function} The defined wrapper class. - * @private + * @param headers The headers to be used in the metadata request. + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the assigned role to the current + * AWS VM. This is needed for calling the security-credentials endpoint. */ -function defineWrapper(BaseEvent, proto) { - const keys = Object.keys(proto); - if (keys.length === 0) { - return BaseEvent - } - - /** CustomEvent */ - function CustomEvent(eventTarget, event) { - BaseEvent.call(this, eventTarget, event); - } - - CustomEvent.prototype = Object.create(BaseEvent.prototype, { - constructor: { value: CustomEvent, configurable: true, writable: true }, - }); - - // Define accessors. - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in BaseEvent.prototype)) { - const descriptor = Object.getOwnPropertyDescriptor(proto, key); - const isFunc = typeof descriptor.value === "function"; - Object.defineProperty( - CustomEvent.prototype, - key, - isFunc - ? defineCallDescriptor(key) - : defineRedirectDescriptor(key) - ); - } +async function _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName(headers, transporter) { + if (!this.securityCredentialsUrl) { + throw new Error('Unable to determine AWS role name due to missing ' + + '"options.credential_source.url"'); } - - return CustomEvent -} - + const opts = { + ...this.additionalGaxiosOptions, + url: this.securityCredentialsUrl, + method: 'GET', + responseType: 'text', + headers: headers, + }; + const response = await transporter.request(opts); + return response.data; +}, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials = /** - * Get the wrapper class of a given prototype. - * @param {Object} proto The prototype of the original event to get its wrapper. - * @returns {Function} The wrapper class. - * @private + * Retrieves the temporary AWS credentials by calling the security-credentials + * endpoint as specified in the `credential_source` object. + * @param roleName The role attached to the current VM. + * @param headers The headers to be used in the metadata request. + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the temporary AWS credentials + * needed for creating the GetCallerIdentity signed request. */ -function getWrapper(proto) { - if (proto == null || proto === Object.prototype) { - return Event - } - - let wrapper = wrappers.get(proto); - if (wrapper == null) { - wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); - wrappers.set(proto, wrapper); +async function _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials(roleName, headers, transporter) { + const response = await transporter.request({ + ...this.additionalGaxiosOptions, + url: `${this.securityCredentialsUrl}/${roleName}`, + responseType: 'json', + headers: headers, + }); + return response.data; +}, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get() { + // The AWS region can be provided through AWS_REGION or AWS_DEFAULT_REGION. + // Only one is required. + return (process.env['AWS_REGION'] || process.env['AWS_DEFAULT_REGION'] || null); +}, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get() { + // Both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are required. + if (process.env['AWS_ACCESS_KEY_ID'] && + process.env['AWS_SECRET_ACCESS_KEY']) { + return { + accessKeyId: process.env['AWS_ACCESS_KEY_ID'], + secretAccessKey: process.env['AWS_SECRET_ACCESS_KEY'], + token: process.env['AWS_SESSION_TOKEN'], + }; } - return wrapper -} + return null; +}; -/** - * Wrap a given event to management a dispatching. - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Object} event The event to wrap. - * @returns {Event} The wrapper instance. - * @private - */ -function wrapEvent(eventTarget, event) { - const Wrapper = getWrapper(Object.getPrototypeOf(event)); - return new Wrapper(eventTarget, event) -} -/** - * Get the immediateStopped flag of a given event. - * @param {Event} event The event to get. - * @returns {boolean} The flag to stop propagation immediately. - * @private - */ -function isStopped(event) { - return pd(event).immediateStopped -} +/***/ }), -/** - * Set the current event phase of a given event. - * @param {Event} event The event to set current target. - * @param {number} eventPhase New event phase. - * @returns {void} - * @private - */ -function setEventPhase(event, eventPhase) { - pd(event).eventPhase = eventPhase; -} +/***/ 6270: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Set the current target of a given event. - * @param {Event} event The event to set current target. - * @param {EventTarget|null} currentTarget New current target. - * @returns {void} - * @private - */ -function setCurrentTarget(event, currentTarget) { - pd(event).currentTarget = currentTarget; -} +"use strict"; +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DownscopedClient = exports.EXPIRATION_TIME_OFFSET = exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = void 0; +const stream = __nccwpck_require__(12781); +const authclient_1 = __nccwpck_require__(44627); +const sts = __nccwpck_require__(86308); /** - * Set a passive listener of a given event. - * @param {Event} event The event to set current target. - * @param {Function|null} passiveListener New passive listener. - * @returns {void} - * @private + * The required token exchange grant_type: rfc8693#section-2.1 */ -function setPassiveListener(event, passiveListener) { - pd(event).passiveListener = passiveListener; -} - +const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; /** - * @typedef {object} ListenerNode - * @property {Function} listener - * @property {1|2|3} listenerType - * @property {boolean} passive - * @property {boolean} once - * @property {ListenerNode|null} next - * @private + * The requested token exchange requested_token_type: rfc8693#section-2.1 */ - +const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; /** - * @type {WeakMap>} - * @private + * The requested token exchange subject_token_type: rfc8693#section-2.1 */ -const listenersMap = new WeakMap(); - -// Listener types -const CAPTURE = 1; -const BUBBLE = 2; -const ATTRIBUTE = 3; - +const STS_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; /** - * Check whether a given value is an object or not. - * @param {any} x The value to check. - * @returns {boolean} `true` if the value is an object. + * The maximum number of access boundary rules a Credential Access Boundary + * can contain. */ -function isObject(x) { - return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax -} - +exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; /** - * Get listeners. - * @param {EventTarget} eventTarget The event target to get. - * @returns {Map} The listeners. - * @private + * Offset to take into account network delays and server clock skews. */ -function getListeners(eventTarget) { - const listeners = listenersMap.get(eventTarget); - if (listeners == null) { - throw new TypeError( - "'this' is expected an EventTarget object, but got another value." - ) - } - return listeners -} - +exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; /** - * Get the property descriptor for the event attribute of a given event. - * @param {string} eventName The event name to get property descriptor. - * @returns {PropertyDescriptor} The property descriptor. - * @private + * Defines a set of Google credentials that are downscoped from an existing set + * of Google OAuth2 credentials. This is useful to restrict the Identity and + * Access Management (IAM) permissions that a short-lived credential can use. + * The common pattern of usage is to have a token broker with elevated access + * generate these downscoped credentials from higher access source credentials + * and pass the downscoped short-lived access tokens to a token consumer via + * some secure authenticated channel for limited access to Google Cloud Storage + * resources. */ -function defineEventAttributeDescriptor(eventName) { - return { - get() { - const listeners = getListeners(this); - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - return node.listener - } - node = node.next; +class DownscopedClient extends authclient_1.AuthClient { + /** + * Instantiates a downscoped client object using the provided source + * AuthClient and credential access boundary rules. + * To downscope permissions of a source AuthClient, a Credential Access + * Boundary that specifies which resources the new credential can access, as + * well as an upper bound on the permissions that are available on each + * resource, has to be defined. A downscoped client can then be instantiated + * using the source AuthClient and the Credential Access Boundary. + * @param authClient The source AuthClient to be downscoped based on the + * provided Credential Access Boundary rules. + * @param credentialAccessBoundary The Credential Access Boundary which + * contains a list of access boundary rules. Each rule contains information + * on the resource that the rule applies to, the upper bound of the + * permissions that are available on that resource and an optional + * condition to further restrict permissions. + * @param additionalOptions **DEPRECATED, set this in the provided `authClient`.** + * Optional additional behavior customization options. + * @param quotaProjectId **DEPRECATED, set this in the provided `authClient`.** + * Optional quota project id for setting up in the x-goog-user-project header. + */ + constructor(authClient, credentialAccessBoundary, additionalOptions, quotaProjectId) { + super({ ...additionalOptions, quotaProjectId }); + this.authClient = authClient; + this.credentialAccessBoundary = credentialAccessBoundary; + // Check 1-10 Access Boundary Rules are defined within Credential Access + // Boundary. + if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length === 0) { + throw new Error('At least one access boundary rule needs to be defined.'); + } + else if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length > + exports.MAX_ACCESS_BOUNDARY_RULES_COUNT) { + throw new Error('The provided access boundary has more than ' + + `${exports.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`); + } + // Check at least one permission should be defined in each Access Boundary + // Rule. + for (const rule of credentialAccessBoundary.accessBoundary + .accessBoundaryRules) { + if (rule.availablePermissions.length === 0) { + throw new Error('At least one permission should be defined in access boundary rules.'); } - return null - }, - - set(listener) { - if (typeof listener !== "function" && !isObject(listener)) { - listener = null; // eslint-disable-line no-param-reassign + } + this.stsCredential = new sts.StsCredentials(`https://sts.${this.universeDomain}/v1/token`); + this.cachedDownscopedAccessToken = null; + } + /** + * Provides a mechanism to inject Downscoped access tokens directly. + * The expiry_date field is required to facilitate determination of the token + * expiration which would make it easier for the token consumer to handle. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials) { + if (!credentials.expiry_date) { + throw new Error('The access token expiry_date field is missing in the provided ' + + 'credentials.'); + } + super.setCredentials(credentials); + this.cachedDownscopedAccessToken = credentials; + } + async getAccessToken() { + // If the cached access token is unavailable or expired, force refresh. + // The Downscoped access token will be returned in + // DownscopedAccessTokenResponse format. + if (!this.cachedDownscopedAccessToken || + this.isExpired(this.cachedDownscopedAccessToken)) { + await this.refreshAccessTokenAsync(); + } + // Return Downscoped access token in DownscopedAccessTokenResponse format. + return { + token: this.cachedDownscopedAccessToken.access_token, + expirationTime: this.cachedDownscopedAccessToken.expiry_date, + res: this.cachedDownscopedAccessToken.res, + }; + } + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { Authorization: 'Bearer ' } + */ + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = { + Authorization: `Bearer ${accessTokenResponse.token}`, + }; + return this.addSharedMetadataHeaders(headers); + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = opts.headers || {}; + if (requestHeaders && requestHeaders['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = + requestHeaders['x-goog-user-project']; } - const listeners = getListeners(this); - - // Traverse to the tail while removing old value. - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - // Remove old value. - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } - - node = node.next; + if (requestHeaders && requestHeaders.Authorization) { + opts.headers.Authorization = requestHeaders.Authorization; } - - // Add new value. - if (listener !== null) { - const newNode = { - listener, - listenerType: ATTRIBUTE, - passive: false, - once: false, - next: null, - }; - if (prev === null) { - listeners.set(eventName, newNode); - } else { - prev.next = newNode; + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); } } - }, - configurable: true, - enumerable: true, + throw e; + } + return response; + } + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * GCP access tokens are retrieved from authclient object/source credential. + * Then GCP access tokens are exchanged for downscoped access tokens via the + * token exchange endpoint. + * @return A promise that resolves with the fresh downscoped access token. + */ + async refreshAccessTokenAsync() { + var _a; + // Retrieve GCP access token from source credential. + const subjectToken = (await this.authClient.getAccessToken()).token; + // Construct the STS credentials options. + const stsCredentialsOptions = { + grantType: STS_GRANT_TYPE, + requestedTokenType: STS_REQUEST_TOKEN_TYPE, + subjectToken: subjectToken, + subjectTokenType: STS_SUBJECT_TOKEN_TYPE, + }; + // Exchange the source AuthClient access token for a Downscoped access + // token. + const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, undefined, this.credentialAccessBoundary); + /** + * The STS endpoint will only return the expiration time for the downscoped + * access token if the original access token represents a service account. + * The downscoped token's expiration time will always match the source + * credential expiration. When no expires_in is returned, we can copy the + * source credential's expiration time. + */ + const sourceCredExpireDate = ((_a = this.authClient.credentials) === null || _a === void 0 ? void 0 : _a.expiry_date) || null; + const expiryDate = stsResponse.expires_in + ? new Date().getTime() + stsResponse.expires_in * 1000 + : sourceCredExpireDate; + // Save response in cached access token. + this.cachedDownscopedAccessToken = { + access_token: stsResponse.access_token, + expiry_date: expiryDate, + res: stsResponse.res, + }; + // Save credentials. + this.credentials = {}; + Object.assign(this.credentials, this.cachedDownscopedAccessToken); + delete this.credentials.res; + // Trigger tokens event to notify external listeners. + this.emit('tokens', { + refresh_token: null, + expiry_date: this.cachedDownscopedAccessToken.expiry_date, + access_token: this.cachedDownscopedAccessToken.access_token, + token_type: 'Bearer', + id_token: null, + }); + // Return the cached access token. + return this.cachedDownscopedAccessToken; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param downscopedAccessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(downscopedAccessToken) { + const now = new Date().getTime(); + return downscopedAccessToken.expiry_date + ? now >= + downscopedAccessToken.expiry_date - this.eagerRefreshThresholdMillis + : false; } } +exports.DownscopedClient = DownscopedClient; -/** - * Define an event attribute (e.g. `eventTarget.onclick`). - * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. - * @param {string} eventName The event name to define. - * @returns {void} - */ -function defineEventAttribute(eventTargetPrototype, eventName) { - Object.defineProperty( - eventTargetPrototype, - `on${eventName}`, - defineEventAttributeDescriptor(eventName) - ); -} -/** - * Define a custom EventTarget with event attributes. - * @param {string[]} eventNames Event names for event attributes. - * @returns {EventTarget} The custom EventTarget. - * @private - */ -function defineCustomEventTarget(eventNames) { - /** CustomEventTarget */ - function CustomEventTarget() { - EventTarget.call(this); - } +/***/ }), - CustomEventTarget.prototype = Object.create(EventTarget.prototype, { - constructor: { - value: CustomEventTarget, - configurable: true, - writable: true, - }, - }); +/***/ 21380: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - for (let i = 0; i < eventNames.length; ++i) { - defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); +"use strict"; + +// Copyright 2018 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GCPEnv = void 0; +exports.clear = clear; +exports.getEnv = getEnv; +const gcpMetadata = __nccwpck_require__(3563); +var GCPEnv; +(function (GCPEnv) { + GCPEnv["APP_ENGINE"] = "APP_ENGINE"; + GCPEnv["KUBERNETES_ENGINE"] = "KUBERNETES_ENGINE"; + GCPEnv["CLOUD_FUNCTIONS"] = "CLOUD_FUNCTIONS"; + GCPEnv["COMPUTE_ENGINE"] = "COMPUTE_ENGINE"; + GCPEnv["CLOUD_RUN"] = "CLOUD_RUN"; + GCPEnv["NONE"] = "NONE"; +})(GCPEnv || (exports.GCPEnv = GCPEnv = {})); +let envPromise; +function clear() { + envPromise = undefined; +} +async function getEnv() { + if (envPromise) { + return envPromise; + } + envPromise = getEnvMemoized(); + return envPromise; +} +async function getEnvMemoized() { + let env = GCPEnv.NONE; + if (isAppEngine()) { + env = GCPEnv.APP_ENGINE; + } + else if (isCloudFunction()) { + env = GCPEnv.CLOUD_FUNCTIONS; + } + else if (await isComputeEngine()) { + if (await isKubernetesEngine()) { + env = GCPEnv.KUBERNETES_ENGINE; + } + else if (isCloudRun()) { + env = GCPEnv.CLOUD_RUN; + } + else { + env = GCPEnv.COMPUTE_ENGINE; + } } - - return CustomEventTarget + else { + env = GCPEnv.NONE; + } + return env; +} +function isAppEngine() { + return !!(process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME); +} +function isCloudFunction() { + return !!(process.env.FUNCTION_NAME || process.env.FUNCTION_TARGET); } - /** - * EventTarget. - * - * - This is constructor if no arguments. - * - This is a function which returns a CustomEventTarget constructor if there are arguments. - * - * For example: - * - * class A extends EventTarget {} - * class B extends EventTarget("message") {} - * class C extends EventTarget("message", "error") {} - * class D extends EventTarget(["message", "error"]) {} + * This check only verifies that the environment is running knative. + * This must be run *after* checking for Kubernetes, otherwise it will + * return a false positive. */ -function EventTarget() { - /*eslint-disable consistent-return */ - if (this instanceof EventTarget) { - listenersMap.set(this, new Map()); - return - } - if (arguments.length === 1 && Array.isArray(arguments[0])) { - return defineCustomEventTarget(arguments[0]) +function isCloudRun() { + return !!process.env.K_CONFIGURATION; +} +async function isKubernetesEngine() { + try { + await gcpMetadata.instance('attributes/cluster-name'); + return true; } - if (arguments.length > 0) { - const types = new Array(arguments.length); - for (let i = 0; i < arguments.length; ++i) { - types[i] = arguments[i]; - } - return defineCustomEventTarget(types) + catch (e) { + return false; } - throw new TypeError("Cannot call a class as a function") - /*eslint-enable consistent-return */ +} +async function isComputeEngine() { + return gcpMetadata.isAvailable(); } -// Should be enumerable, but class methods are not enumerable. -EventTarget.prototype = { - /** - * Add a given listener to this event target. - * @param {string} eventName The event name to add. - * @param {Function} listener The listener to add. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - addEventListener(eventName, listener, options) { - if (listener == null) { - return - } - if (typeof listener !== "function" && !isObject(listener)) { - throw new TypeError("'listener' should be a function or an object.") - } - - const listeners = getListeners(this); - const optionsIsObj = isObject(options); - const capture = optionsIsObj - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - const newNode = { - listener, - listenerType, - passive: optionsIsObj && Boolean(options.passive), - once: optionsIsObj && Boolean(options.once), - next: null, - }; - - // Set it as the first node if the first node is null. - let node = listeners.get(eventName); - if (node === undefined) { - listeners.set(eventName, newNode); - return - } - - // Traverse to the tail while checking duplication.. - let prev = null; - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - // Should ignore duplication. - return - } - prev = node; - node = node.next; - } - - // Add it. - prev.next = newNode; - }, - - /** - * Remove a given listener from this event target. - * @param {string} eventName The event name to remove. - * @param {Function} listener The listener to remove. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - removeEventListener(eventName, listener, options) { - if (listener == null) { - return - } - const listeners = getListeners(this); - const capture = isObject(options) - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; +/***/ }), - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - return - } +/***/ 8749: +/***/ ((__unused_webpack_module, exports) => { - prev = node; - node = node.next; - } - }, +"use strict"; +// Copyright 2022 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InvalidSubjectTokenError = exports.InvalidMessageFieldError = exports.InvalidCodeFieldError = exports.InvalidTokenTypeFieldError = exports.InvalidExpirationTimeFieldError = exports.InvalidSuccessFieldError = exports.InvalidVersionFieldError = exports.ExecutableResponseError = exports.ExecutableResponse = void 0; +const SAML_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:saml2'; +const OIDC_SUBJECT_TOKEN_TYPE1 = 'urn:ietf:params:oauth:token-type:id_token'; +const OIDC_SUBJECT_TOKEN_TYPE2 = 'urn:ietf:params:oauth:token-type:jwt'; +/** + * Defines the response of a 3rd party executable run by the pluggable auth client. + */ +class ExecutableResponse { /** - * Dispatch a given event. - * @param {Event|{type:string}} event The event to dispatch. - * @returns {boolean} `false` if canceled. + * Instantiates an ExecutableResponse instance using the provided JSON object + * from the output of the executable. + * @param responseJson Response from a 3rd party executable, loaded from a + * run of the executable or a cached output file. */ - dispatchEvent(event) { - if (event == null || typeof event.type !== "string") { - throw new TypeError('"event.type" should be a string.') + constructor(responseJson) { + // Check that the required fields exist in the json response. + if (!responseJson.version) { + throw new InvalidVersionFieldError("Executable response must contain a 'version' field."); } - - // If listeners aren't registered, terminate. - const listeners = getListeners(this); - const eventName = event.type; - let node = listeners.get(eventName); - if (node == null) { - return true + if (responseJson.success === undefined) { + throw new InvalidSuccessFieldError("Executable response must contain a 'success' field."); } - - // Since we cannot rewrite several properties, so wrap object. - const wrappedEvent = wrapEvent(this, event); - - // This doesn't process capturing phase and bubbling phase. - // This isn't participating in a tree. - let prev = null; - while (node != null) { - // Remove this listener if it's once - if (node.once) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); + this.version = responseJson.version; + this.success = responseJson.success; + // Validate required fields for a successful response. + if (this.success) { + this.expirationTime = responseJson.expiration_time; + this.tokenType = responseJson.token_type; + // Validate token type field. + if (this.tokenType !== SAML_SUBJECT_TOKEN_TYPE && + this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE1 && + this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE2) { + throw new InvalidTokenTypeFieldError("Executable response must contain a 'token_type' field when successful " + + `and it must be one of ${OIDC_SUBJECT_TOKEN_TYPE1}, ${OIDC_SUBJECT_TOKEN_TYPE2}, or ${SAML_SUBJECT_TOKEN_TYPE}.`); + } + // Validate subject token. + if (this.tokenType === SAML_SUBJECT_TOKEN_TYPE) { + if (!responseJson.saml_response) { + throw new InvalidSubjectTokenError(`Executable response must contain a 'saml_response' field when token_type=${SAML_SUBJECT_TOKEN_TYPE}.`); } - } else { - prev = node; + this.subjectToken = responseJson.saml_response; } - - // Call this listener - setPassiveListener( - wrappedEvent, - node.passive ? node.listener : null - ); - if (typeof node.listener === "function") { - try { - node.listener.call(this, wrappedEvent); - } catch (err) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error(err); - } + else { + if (!responseJson.id_token) { + throw new InvalidSubjectTokenError("Executable response must contain a 'id_token' field when " + + `token_type=${OIDC_SUBJECT_TOKEN_TYPE1} or ${OIDC_SUBJECT_TOKEN_TYPE2}.`); } - } else if ( - node.listenerType !== ATTRIBUTE && - typeof node.listener.handleEvent === "function" - ) { - node.listener.handleEvent(wrappedEvent); + this.subjectToken = responseJson.id_token; } - - // Break if `event.stopImmediatePropagation` was called. - if (isStopped(wrappedEvent)) { - break + } + else { + // Both code and message must be provided for unsuccessful responses. + if (!responseJson.code) { + throw new InvalidCodeFieldError("Executable response must contain a 'code' field when unsuccessful."); } - - node = node.next; + if (!responseJson.message) { + throw new InvalidMessageFieldError("Executable response must contain a 'message' field when unsuccessful."); + } + this.errorCode = responseJson.code; + this.errorMessage = responseJson.message; } - setPassiveListener(wrappedEvent, null); - setEventPhase(wrappedEvent, 0); - setCurrentTarget(wrappedEvent, null); - - return !wrappedEvent.defaultPrevented - }, -}; - -// `constructor` is not enumerable. -Object.defineProperty(EventTarget.prototype, "constructor", { - value: EventTarget, - configurable: true, - writable: true, -}); - -// Ensure `eventTarget instanceof window.EventTarget` is `true`. -if ( - typeof window !== "undefined" && - typeof window.EventTarget !== "undefined" -) { - Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); -} - -exports.defineEventAttribute = defineEventAttribute; -exports.EventTarget = EventTarget; -exports["default"] = EventTarget; - -module.exports = EventTarget -module.exports.EventTarget = module.exports["default"] = EventTarget -module.exports.defineEventAttribute = defineEventAttribute -//# sourceMappingURL=event-target-shim.js.map - - -/***/ }), - -/***/ 38171: -/***/ ((module) => { - -"use strict"; - - -var hasOwn = Object.prototype.hasOwnProperty; -var toStr = Object.prototype.toString; -var defineProperty = Object.defineProperty; -var gOPD = Object.getOwnPropertyDescriptor; - -var isArray = function isArray(arr) { - if (typeof Array.isArray === 'function') { - return Array.isArray(arr); - } - - return toStr.call(arr) === '[object Array]'; -}; - -var isPlainObject = function isPlainObject(obj) { - if (!obj || toStr.call(obj) !== '[object Object]') { - return false; - } - - var hasOwnConstructor = hasOwn.call(obj, 'constructor'); - var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); - // Not own constructor property must be Object - if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - var key; - for (key in obj) { /**/ } - - return typeof key === 'undefined' || hasOwn.call(obj, key); -}; - -// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target -var setProperty = function setProperty(target, options) { - if (defineProperty && options.name === '__proto__') { - defineProperty(target, options.name, { - enumerable: true, - configurable: true, - value: options.newValue, - writable: true - }); - } else { - target[options.name] = options.newValue; - } -}; - -// Return undefined instead of __proto__ if '__proto__' is not an own property -var getProperty = function getProperty(obj, name) { - if (name === '__proto__') { - if (!hasOwn.call(obj, name)) { - return void 0; - } else if (gOPD) { - // In early versions of node, obj['__proto__'] is buggy when obj has - // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. - return gOPD(obj, name).value; - } - } - - return obj[name]; -}; - -module.exports = function extend() { - var options, name, src, copy, copyIsArray, clone; - var target = arguments[0]; - var i = 1; - var length = arguments.length; - var deep = false; - - // Handle a deep copy situation - if (typeof target === 'boolean') { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { - target = {}; - } - - for (; i < length; ++i) { - options = arguments[i]; - // Only deal with non-null/undefined values - if (options != null) { - // Extend the base object - for (name in options) { - src = getProperty(target, name); - copy = getProperty(options, name); - - // Prevent never-ending loop - if (target !== copy) { - // Recurse if we're merging plain objects or arrays - if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { - if (copyIsArray) { - copyIsArray = false; - clone = src && isArray(src) ? src : []; - } else { - clone = src && isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); - - // Don't bring in undefined values - } else if (typeof copy !== 'undefined') { - setProperty(target, { name: name, newValue: copy }); - } - } - } - } - } - - // Return the modified object - return target; -}; - - -/***/ }), - -/***/ 12603: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const validator = __nccwpck_require__(61739); -const XMLParser = __nccwpck_require__(42380); -const XMLBuilder = __nccwpck_require__(80660); - -module.exports = { - XMLParser: XMLParser, - XMLValidator: validator, - XMLBuilder: XMLBuilder + } + /** + * @return A boolean representing if the response has a valid token. Returns + * true when the response was successful and the token is not expired. + */ + isValid() { + return !this.isExpired() && this.success; + } + /** + * @return A boolean representing if the response is expired. Returns true if the + * provided timeout has passed. + */ + isExpired() { + return (this.expirationTime !== undefined && + this.expirationTime < Math.round(Date.now() / 1000)); + } } - -/***/ }), - -/***/ 38280: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; -const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*' -const regexName = new RegExp('^' + nameRegexp + '$'); - -const getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); +exports.ExecutableResponse = ExecutableResponse; +/** + * An error thrown by the ExecutableResponse class. + */ +class ExecutableResponseError extends Error { + constructor(message) { + super(message); + Object.setPrototypeOf(this, new.target.prototype); } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; -}; - -const isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === 'undefined'); -}; - -exports.isExist = function(v) { - return typeof v !== 'undefined'; -}; - -exports.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; -}; - +} +exports.ExecutableResponseError = ExecutableResponseError; +/** + * An error thrown when the 'version' field in an executable response is missing or invalid. + */ +class InvalidVersionFieldError extends ExecutableResponseError { +} +exports.InvalidVersionFieldError = InvalidVersionFieldError; +/** + * An error thrown when the 'success' field in an executable response is missing or invalid. + */ +class InvalidSuccessFieldError extends ExecutableResponseError { +} +exports.InvalidSuccessFieldError = InvalidSuccessFieldError; +/** + * An error thrown when the 'expiration_time' field in an executable response is missing or invalid. + */ +class InvalidExpirationTimeFieldError extends ExecutableResponseError { +} +exports.InvalidExpirationTimeFieldError = InvalidExpirationTimeFieldError; +/** + * An error thrown when the 'token_type' field in an executable response is missing or invalid. + */ +class InvalidTokenTypeFieldError extends ExecutableResponseError { +} +exports.InvalidTokenTypeFieldError = InvalidTokenTypeFieldError; /** - * Copy all the properties of a into b. - * @param {*} target - * @param {*} a + * An error thrown when the 'code' field in an executable response is missing or invalid. */ -exports.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); // will return an array of own properties - const len = keys.length; //don't make it inline - for (let i = 0; i < len; i++) { - if (arrayMode === 'strict') { - target[keys[i]] = [ a[keys[i]] ]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } -}; -/* exports.merge =function (b,a){ - return Object.assign(b,a); -} */ - -exports.getValue = function(v) { - if (exports.isExist(v)) { - return v; - } else { - return ''; - } -}; - -// const fakeCall = function(a) {return a;}; -// const fakeCallNoReturn = function() {}; - -exports.isName = isName; -exports.getAllMatches = getAllMatches; -exports.nameRegexp = nameRegexp; +class InvalidCodeFieldError extends ExecutableResponseError { +} +exports.InvalidCodeFieldError = InvalidCodeFieldError; +/** + * An error thrown when the 'message' field in an executable response is missing or invalid. + */ +class InvalidMessageFieldError extends ExecutableResponseError { +} +exports.InvalidMessageFieldError = InvalidMessageFieldError; +/** + * An error thrown when the subject token in an executable response is missing or invalid. + */ +class InvalidSubjectTokenError extends ExecutableResponseError { +} +exports.InvalidSubjectTokenError = InvalidSubjectTokenError; /***/ }), -/***/ 61739: +/***/ 38765: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const util = __nccwpck_require__(38280); - -const defaultOptions = { - allowBooleanAttributes: false, //A tag can have attributes without any value - unpairedTags: [] -}; - -//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); -exports.validate = function (xmlData, options) { - options = Object.assign({}, defaultOptions, options); - - //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line - //xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag - //xmlData = xmlData.replace(/()/g,"");//Remove DOCTYPE - const tags = []; - let tagFound = false; - - //indicates that the root tag has been closed (aka. depth 0 has been reached) - let reachedRoot = false; - - if (xmlData[0] === '\ufeff') { - // check for byte order mark (BOM) - xmlData = xmlData.substr(1); - } - - for (let i = 0; i < xmlData.length; i++) { - - if (xmlData[i] === '<' && xmlData[i+1] === '?') { - i+=2; - i = readPI(xmlData,i); - if (i.err) return i; - }else if (xmlData[i] === '<') { - //starting of tag - //read until you reach to '>' avoiding any '>' in attribute value - let tagStartPos = i; - i++; - - if (xmlData[i] === '!') { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === '/') { - //closing tag - closingTag = true; - i++; - } - //read tagname - let tagName = ''; - for (; i < xmlData.length && - xmlData[i] !== '>' && - xmlData[i] !== ' ' && - xmlData[i] !== '\t' && - xmlData[i] !== '\n' && - xmlData[i] !== '\r'; i++ - ) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - //console.log(tagName); - - if (tagName[tagName.length - 1] === '/') { - //self closing tag without attributes - tagName = tagName.substring(0, tagName.length - 1); - //continue; - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '"+tagName+"' is an invalid name."; - } - return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i)); - } - - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject('InvalidAttr', "Attributes for '"+tagName+"' have open quote.", getLineNumberForPosition(xmlData, i)); +// Copyright 2023 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExternalAccountAuthorizedUserClient = exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = void 0; +const authclient_1 = __nccwpck_require__(44627); +const oauth2common_1 = __nccwpck_require__(19510); +const gaxios_1 = __nccwpck_require__(59555); +const stream = __nccwpck_require__(12781); +const baseexternalclient_1 = __nccwpck_require__(40810); +/** + * The credentials JSON file type for external account authorized user clients. + */ +exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = 'external_account_authorized_user'; +const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/oauthtoken'; +/** + * Handler for token refresh requests sent to the token_url endpoint for external + * authorized user credentials. + */ +class ExternalAccountAuthorizedUserHandler extends oauth2common_1.OAuthClientAuthHandler { + /** + * Initializes an ExternalAccountAuthorizedUserHandler instance. + * @param url The URL of the token refresh endpoint. + * @param transporter The transporter to use for the refresh request. + * @param clientAuthentication The client authentication credentials to use + * for the refresh request. + */ + constructor(url, transporter, clientAuthentication) { + super(clientAuthentication); + this.url = url; + this.transporter = transporter; + } + /** + * Requests a new access token from the token_url endpoint using the provided + * refresh token. + * @param refreshToken The refresh token to use to generate a new access token. + * @param additionalHeaders Optional additional headers to pass along the + * request. + * @return A promise that resolves with the token refresh response containing + * the requested access token and its expiration time. + */ + async refreshToken(refreshToken, additionalHeaders) { + const values = new URLSearchParams({ + grant_type: 'refresh_token', + refresh_token: refreshToken, + }); + const headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + ...additionalHeaders, + }; + const opts = { + ...ExternalAccountAuthorizedUserHandler.RETRY_CONFIG, + url: this.url, + method: 'POST', + headers, + data: values.toString(), + responseType: 'json', + }; + // Apply OAuth client authentication. + this.applyClientAuthenticationOptions(opts); + try { + const response = await this.transporter.request(opts); + // Successful response. + const tokenRefreshResponse = response.data; + tokenRefreshResponse.res = response; + return tokenRefreshResponse; } - let attrStr = result.value; - i = result.index; - - if (attrStr[attrStr.length - 1] === '/') { - //self closing tag - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - //continue; //text may presents after self closing tag - } else { - //the result from the nested function returns the position of the error within the attribute - //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute - //this gives us the absolute index in the entire xml, which we can use to find the line at last - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject('InvalidTag', - "Expected closing tag '"+otg.tagName+"' (opened in line "+openPos.line+", col "+openPos.col+") instead of closing tag '"+tagName+"'.", - getLineNumberForPosition(xmlData, tagStartPos)); - } - - //when there are no more tags, we reached the root level. - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - //the result from the nested function returns the position of the error within the attribute - //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute - //this gives us the absolute index in the entire xml, which we can use to find the line at last - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } - - //if the root level has been reached before ... - if (reachedRoot === true) { - return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i)); - } else if(options.unpairedTags.indexOf(tagName) !== -1){ - //don't push into stack - } else { - tags.push({tagName, tagStartPos}); - } - tagFound = true; - } - - //skip tag text value - //It may include comments and CDATA value - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - if (xmlData[i + 1] === '!') { - //comment or CADATA - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i+1] === '?') { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else{ - break; - } - } else if (xmlData[i] === '&') { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - }else{ - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject('InvalidXml', "Extra text at the end", getLineNumberForPosition(xmlData, i)); + catch (error) { + // Translate error to OAuthError. + if (error instanceof gaxios_1.GaxiosError && error.response) { + throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, + // Preserve other fields from the original error. + error); } - } - } //end of reading tag text value - if (xmlData[i] === '<') { - i--; + // Request could fail before the server responds. + throw error; } - } - } else { - if ( isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i)); } - } - - if (!tagFound) { - return getErrorObject('InvalidXml', 'Start tag expected.', 1); - }else if (tags.length == 1) { - return getErrorObject('InvalidTag', "Unclosed tag '"+tags[0].tagName+"'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - }else if (tags.length > 0) { - return getErrorObject('InvalidXml', "Invalid '"+ - JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\r?\n/g, '')+ - "' found.", {line: 1, col: 1}); - } - - return true; -}; - -function isWhiteSpace(char){ - return char === ' ' || char === '\t' || char === '\n' || char === '\r'; } /** - * Read Processing insstructions and skip - * @param {*} xmlData - * @param {*} i + * External Account Authorized User Client. This is used for OAuth2 credentials + * sourced using external identities through Workforce Identity Federation. + * Obtaining the initial access and refresh token can be done through the + * Google Cloud CLI. */ -function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == '?' || xmlData[i] == ' ') { - //tagname - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === 'xml') { - return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') { - //check if valid attribut string - i++; - break; - } else { - continue; - } +class ExternalAccountAuthorizedUserClient extends authclient_1.AuthClient { + /** + * Instantiates an ExternalAccountAuthorizedUserClient instances using the + * provided JSON object loaded from a credentials files. + * An error is throws if the credential is not valid. + * @param options The external account authorized user option object typically + * from the external accoutn authorized user JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + var _a; + super({ ...options, ...additionalOptions }); + if (options.universe_domain) { + this.universeDomain = options.universe_domain; + } + this.refreshToken = options.refresh_token; + const clientAuth = { + confidentialClientType: 'basic', + clientId: options.client_id, + clientSecret: options.client_secret, + }; + this.externalAccountAuthorizedUserHandler = + new ExternalAccountAuthorizedUserHandler((_a = options.token_url) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain), this.transporter, clientAuth); + this.cachedAccessToken = null; + this.quotaProjectId = options.quota_project_id; + // As threshold could be zero, + // eagerRefreshThresholdMillis || EXPIRATION_TIME_OFFSET will override the + // zero value. + if (typeof (additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.eagerRefreshThresholdMillis) !== 'number') { + this.eagerRefreshThresholdMillis = baseexternalclient_1.EXPIRATION_TIME_OFFSET; + } + else { + this.eagerRefreshThresholdMillis = additionalOptions + .eagerRefreshThresholdMillis; + } + this.forceRefreshOnFailure = !!(additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.forceRefreshOnFailure); } - } - return i; -} - -function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') { - //comment - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') { - i += 2; - break; - } + async getAccessToken() { + // If cached access token is unavailable or expired, force refresh. + if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { + await this.refreshAccessTokenAsync(); + } + // Return GCP access token in GetAccessTokenResponse format. + return { + token: this.cachedAccessToken.access_token, + res: this.cachedAccessToken.res, + }; } - } else if ( - xmlData.length > i + 8 && - xmlData[i + 1] === 'D' && - xmlData[i + 2] === 'O' && - xmlData[i + 3] === 'C' && - xmlData[i + 4] === 'T' && - xmlData[i + 5] === 'Y' && - xmlData[i + 6] === 'P' && - xmlData[i + 7] === 'E' - ) { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - angleBracketsCount++; - } else if (xmlData[i] === '>') { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = { + Authorization: `Bearer ${accessTokenResponse.token}`, + }; + return this.addSharedMetadataHeaders(headers); + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); } - } } - } else if ( - xmlData.length > i + 9 && - xmlData[i + 1] === '[' && - xmlData[i + 2] === 'C' && - xmlData[i + 3] === 'D' && - xmlData[i + 4] === 'A' && - xmlData[i + 5] === 'T' && - xmlData[i + 6] === 'A' && - xmlData[i + 7] === '[' - ) { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') { - i += 2; - break; - } + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = opts.headers || {}; + if (requestHeaders && requestHeaders['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = + requestHeaders['x-goog-user-project']; + } + if (requestHeaders && requestHeaders.Authorization) { + opts.headers.Authorization = requestHeaders.Authorization; + } + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; + } + return response; } - } - - return i; -} - -const doubleQuote = '"'; -const singleQuote = "'"; - -/** - * Keep reading xmlData until '<' is found outside the attribute value. - * @param {string} xmlData - * @param {number} i - */ -function readAttributeStr(xmlData, i) { - let attrStr = ''; - let startChar = ''; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === '') { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa - } else { - startChar = ''; - } - } else if (xmlData[i] === '>') { - if (startChar === '') { - tagClosed = true; - break; - } + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * @return A promise that resolves with the refreshed credential. + */ + async refreshAccessTokenAsync() { + // Refresh the access token using the refresh token. + const refreshResponse = await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken); + this.cachedAccessToken = { + access_token: refreshResponse.access_token, + expiry_date: new Date().getTime() + refreshResponse.expires_in * 1000, + res: refreshResponse.res, + }; + if (refreshResponse.refresh_token !== undefined) { + this.refreshToken = refreshResponse.refresh_token; + } + return this.cachedAccessToken; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param credentials The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(credentials) { + const now = new Date().getTime(); + return credentials.expiry_date + ? now >= credentials.expiry_date - this.eagerRefreshThresholdMillis + : false; } - attrStr += xmlData[i]; - } - if (startChar !== '') { - return false; - } - - return { - value: attrStr, - index: i, - tagClosed: tagClosed - }; } +exports.ExternalAccountAuthorizedUserClient = ExternalAccountAuthorizedUserClient; -/** - * Select all the attributes whether valid or invalid. - */ -const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g'); - -//attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" -function validateAttributeString(attrStr, options) { - //console.log("start:"+attrStr+":end"); +/***/ }), - //if(attrStr.trim().length === 0) return true; //empty string +/***/ 94381: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; +"use strict"; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - //nospace before attribute name: a="sd"b="saf" - return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(matches[i])) - } else if (matches[i][3] !== undefined && matches[i][4] === undefined) { - return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) { - //independent attribute: ab - return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(matches[i])); - } - /* else if(matches[i][6] === undefined){//attribute without value: ab= - return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}}; - } */ - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(matches[i])); +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExternalAccountClient = void 0; +const baseexternalclient_1 = __nccwpck_require__(40810); +const identitypoolclient_1 = __nccwpck_require__(20117); +const awsclient_1 = __nccwpck_require__(71569); +const pluggable_auth_client_1 = __nccwpck_require__(44782); +/** + * Dummy class with no constructor. Developers are expected to use fromJSON. + */ +class ExternalAccountClient { + constructor() { + throw new Error('ExternalAccountClients should be initialized via: ' + + 'ExternalAccountClient.fromJSON(), ' + + 'directly via explicit constructors, eg. ' + + 'new AwsClient(options), new IdentityPoolClient(options), new' + + 'PluggableAuthClientOptions, or via ' + + 'new GoogleAuth(options).getClient()'); } - if (!attrNames.hasOwnProperty(attrName)) { - //check for duplicate attribute. - attrNames[attrName] = 1; - } else { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(matches[i])); + /** + * This static method will instantiate the + * corresponding type of external account credential depending on the + * underlying credential source. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + * @return A BaseExternalAccountClient instance or null if the options + * provided do not correspond to an external account credential. + */ + static fromJSON(options, additionalOptions) { + var _a, _b; + if (options && options.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + if ((_a = options.credential_source) === null || _a === void 0 ? void 0 : _a.environment_id) { + return new awsclient_1.AwsClient(options, additionalOptions); + } + else if ((_b = options.credential_source) === null || _b === void 0 ? void 0 : _b.executable) { + return new pluggable_auth_client_1.PluggableAuthClient(options, additionalOptions); + } + else { + return new identitypoolclient_1.IdentityPoolClient(options, additionalOptions); + } + } + else { + return null; + } } - } - - return true; -} - -function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === 'x') { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ';') - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; -} - -function validateAmpersand(xmlData, i) { - // https://www.w3.org/TR/xml/#dt-charref - i++; - if (xmlData[i] === ';') - return -1; - if (xmlData[i] === '#') { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ';') - break; - return -1; - } - return i; -} - -function getErrorObject(code, message, lineNumber) { - return { - err: { - code: code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col, - }, - }; -} - -function validateAttrName(attrName) { - return util.isName(attrName); } +exports.ExternalAccountClient = ExternalAccountClient; -// const startsWithXML = /^xml/i; -function validateTagName(tagname) { - return util.isName(tagname) /* && !tagname.match(startsWithXML) */; -} +/***/ }), -//this function returns the line number for the character at the given index -function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, +/***/ 27646: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; -} +"use strict"; -//this function returns the position of the first character of match within attrStr -function getPositionFromMatch(match) { - return match.startIndex + match[1].length; +// Copyright 2024 Google LLC +// +// 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. +var _a, _b, _c; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FileSubjectTokenSupplier = void 0; +const util_1 = __nccwpck_require__(73837); +const fs = __nccwpck_require__(57147); +// fs.readfile is undefined in browser karma tests causing +// `npm run browser-test` to fail as test.oauth2.ts imports this file via +// src/index.ts. +// Fallback to void function to avoid promisify throwing a TypeError. +const readFile = (0, util_1.promisify)((_a = fs.readFile) !== null && _a !== void 0 ? _a : (() => { })); +const realpath = (0, util_1.promisify)((_b = fs.realpath) !== null && _b !== void 0 ? _b : (() => { })); +const lstat = (0, util_1.promisify)((_c = fs.lstat) !== null && _c !== void 0 ? _c : (() => { })); +/** + * Internal subject token supplier implementation used when a file location + * is configured in the credential configuration used to build an {@link IdentityPoolClient} + */ +class FileSubjectTokenSupplier { + /** + * Instantiates a new file based subject token supplier. + * @param opts The file subject token supplier options to build the supplier + * with. + */ + constructor(opts) { + this.filePath = opts.filePath; + this.formatType = opts.formatType; + this.subjectTokenFieldName = opts.subjectTokenFieldName; + } + /** + * Returns the subject token stored at the file specified in the constructor. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + async getSubjectToken(context) { + // Make sure there is a file at the path. lstatSync will throw if there is + // nothing there. + let parsedFilePath = this.filePath; + try { + // Resolve path to actual file in case of symlink. Expect a thrown error + // if not resolvable. + parsedFilePath = await realpath(parsedFilePath); + if (!(await lstat(parsedFilePath)).isFile()) { + throw new Error(); + } + } + catch (err) { + if (err instanceof Error) { + err.message = `The file at ${parsedFilePath} does not exist, or it is not a file. ${err.message}`; + } + throw err; + } + let subjectToken; + const rawText = await readFile(parsedFilePath, { encoding: 'utf8' }); + if (this.formatType === 'text') { + subjectToken = rawText; + } + else if (this.formatType === 'json' && this.subjectTokenFieldName) { + const json = JSON.parse(rawText); + subjectToken = json[this.subjectTokenFieldName]; + } + if (!subjectToken) { + throw new Error('Unable to parse the subject_token from the credential_source file'); + } + return subjectToken; + } } +exports.FileSubjectTokenSupplier = FileSubjectTokenSupplier; /***/ }), -/***/ 80660: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 20695: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -//parse Empty Node as self closing node -const buildFromOrderedJs = __nccwpck_require__(72462); - -const defaultOptions = { - attributeNamePrefix: '@_', - attributesGroupName: false, - textNodeName: '#text', - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: ' ', - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" },//it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("\'", "g"), val: "'" }, - { regex: new RegExp("\"", "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false +// Copyright 2019 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; - -function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes || this.options.attributesGroupName) { - this.isAttribute = function(/*a*/) { - return false; - }; - } else { - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - - this.processTextOrObjNode = processTextOrObjNode - - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = '>\n'; - this.newLine = '\n'; - } else { - this.indentate = function() { - return ''; - }; - this.tagEndChar = '>'; - this.newLine = ''; - } -} - -Builder.prototype.build = function(jObj) { - if(this.options.preserveOrder){ - return buildFromOrderedJs(jObj, this.options); - }else { - if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){ - jObj = { - [this.options.arrayNodeName] : jObj - } - } - return this.j2x(jObj, 0).val; - } +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; - -Builder.prototype.j2x = function(jObj, level) { - let attrStr = ''; - let val = ''; - for (let key in jObj) { - if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === 'undefined') { - // supress undefined node only if it is not an attribute - if (this.isAttribute(key)) { - val += ''; - } - } else if (jObj[key] === null) { - // null attribute should be ignored by the attribute list, but should not cause the tag closing - if (this.isAttribute(key)) { - val += ''; - } else if (key[0] === '?') { - val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; - } else { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } - // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (jObj[key] instanceof Date) { - val += this.buildTextValNode(jObj[key], key, '', level); - } else if (typeof jObj[key] !== 'object') { - //premitive type - const attr = this.isAttribute(key); - if (attr) { - attrStr += this.buildAttrPairStr(attr, '' + jObj[key]); - }else { - //tag value - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, '' + jObj[key]); - val += this.replaceEntitiesValue(newval); - } else { - val += this.buildTextValNode(jObj[key], key, '', level); - } - } - } else if (Array.isArray(jObj[key])) { - //repeated nodes - const arrLen = jObj[key].length; - let listTagVal = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === 'undefined') { - // supress undefined node - } else if (item === null) { - if(key[0] === "?") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; - else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (typeof item === 'object') { - if(this.options.oneListGroup ){ - listTagVal += this.j2x(item, level + 1).val; - }else{ - listTagVal += this.processTextOrObjNode(item, key, level) - } - } else { - listTagVal += this.buildTextValNode(item, key, '', level); +var _GoogleAuth_instances, _GoogleAuth_pendingAuthClient, _GoogleAuth_prepareAndCacheClient, _GoogleAuth_determineClient; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GoogleAuth = exports.GoogleAuthExceptionMessages = exports.CLOUD_SDK_CLIENT_ID = void 0; +const child_process_1 = __nccwpck_require__(32081); +const fs = __nccwpck_require__(57147); +const gcpMetadata = __nccwpck_require__(3563); +const os = __nccwpck_require__(22037); +const path = __nccwpck_require__(71017); +const crypto_1 = __nccwpck_require__(78043); +const transporters_1 = __nccwpck_require__(72649); +const computeclient_1 = __nccwpck_require__(96875); +const idtokenclient_1 = __nccwpck_require__(80298); +const envDetect_1 = __nccwpck_require__(21380); +const jwtclient_1 = __nccwpck_require__(13959); +const refreshclient_1 = __nccwpck_require__(98790); +const impersonated_1 = __nccwpck_require__(91103); +const externalclient_1 = __nccwpck_require__(94381); +const baseexternalclient_1 = __nccwpck_require__(40810); +const authclient_1 = __nccwpck_require__(44627); +const externalAccountAuthorizedUserClient_1 = __nccwpck_require__(38765); +const util_1 = __nccwpck_require__(68905); +exports.CLOUD_SDK_CLIENT_ID = '764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com'; +exports.GoogleAuthExceptionMessages = { + API_KEY_WITH_CREDENTIALS: 'API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.', + NO_PROJECT_ID_FOUND: 'Unable to detect a Project Id in the current environment. \n' + + 'To learn more about authentication and Google APIs, visit: \n' + + 'https://cloud.google.com/docs/authentication/getting-started', + NO_CREDENTIALS_FOUND: 'Unable to find credentials in current environment. \n' + + 'To learn more about authentication and Google APIs, visit: \n' + + 'https://cloud.google.com/docs/authentication/getting-started', + NO_ADC_FOUND: 'Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.', + NO_UNIVERSE_DOMAIN_FOUND: 'Unable to detect a Universe Domain in the current environment.\n' + + 'To learn more about Universe Domain retrieval, visit: \n' + + 'https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys', +}; +class GoogleAuth { + // Note: this properly is only public to satisfy unit tests. + // https://github.com/Microsoft/TypeScript/issues/5228 + get isGCE() { + return this.checkIsGCE; + } + /** + * Configuration is resolved in the following order of precedence: + * - {@link GoogleAuthOptions.credentials `credentials`} + * - {@link GoogleAuthOptions.keyFilename `keyFilename`} + * - {@link GoogleAuthOptions.keyFile `keyFile`} + * + * {@link GoogleAuthOptions.clientOptions `clientOptions`} are passed to the + * {@link AuthClient `AuthClient`s}. + * + * @param opts + */ + constructor(opts = {}) { + _GoogleAuth_instances.add(this); + /** + * Caches a value indicating whether the auth layer is running on Google + * Compute Engine. + * @private + */ + this.checkIsGCE = undefined; + // To save the contents of the JSON credential file + this.jsonContent = null; + this.cachedCredential = null; + /** + * A pending {@link AuthClient}. Used for concurrent {@link GoogleAuth.getClient} calls. + */ + _GoogleAuth_pendingAuthClient.set(this, null); + this.clientOptions = {}; + this._cachedProjectId = opts.projectId || null; + this.cachedCredential = opts.authClient || null; + this.keyFilename = opts.keyFilename || opts.keyFile; + this.scopes = opts.scopes; + this.clientOptions = opts.clientOptions || {}; + this.jsonContent = opts.credentials || null; + this.apiKey = opts.apiKey || this.clientOptions.apiKey || null; + // Cannot use both API Key + Credentials + if (this.apiKey && (this.jsonContent || this.clientOptions.credentials)) { + throw new RangeError(exports.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS); } - } - if(this.options.oneListGroup){ - listTagVal = this.buildObjectNode(listTagVal, key, '', level); - } - val += listTagVal; - } else { - //nested node - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]); + if (opts.universeDomain) { + this.clientOptions.universeDomain = opts.universeDomain; } - } else { - val += this.processTextOrObjNode(jObj[key], key, level) - } } - } - return {attrStr: attrStr, val: val}; -}; - -Builder.prototype.buildAttrPairStr = function(attrName, val){ - val = this.options.attributeValueProcessor(attrName, '' + val); - val = this.replaceEntitiesValue(val); - if (this.options.suppressBooleanAttributes && val === "true") { - return ' ' + attrName; - } else return ' ' + attrName + '="' + val + '"'; -} - -function processTextOrObjNode (object, key, level) { - const result = this.j2x(object, level + 1); - if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); - } -} - -Builder.prototype.buildObjectNode = function(val, key, attrStr, level) { - if(val === ""){ - if(key[0] === "?") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; - else { - return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; + // GAPIC client libraries should always use self-signed JWTs. The following + // variables are set on the JWT client in order to indicate the type of library, + // and sign the JWT with the correct audience and scopes (if not supplied). + setGapicJWTValues(client) { + client.defaultServicePath = this.defaultServicePath; + client.useJWTAccessWithScope = this.useJWTAccessWithScope; + client.defaultScopes = this.defaultScopes; } - }else{ - - let tagEndExp = ' callback(null, r), callback); + } + else { + return this.getProjectIdAsync(); + } } - - // attrStr is an empty string in case the attribute came as undefined or null - if ((attrStr || attrStr === '') && val.indexOf('<') === -1) { - return ( this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp ); - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - }else { - return ( - this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar + - val + - this.indentate(level) + tagEndExp ); + /** + * A temporary method for internal `getProjectId` usages where `null` is + * acceptable. In a future major release, `getProjectId` should return `null` + * (as the `Promise` base signature describes) and this private + * method should be removed. + * + * @returns Promise that resolves with project id (or `null`) + */ + async getProjectIdOptional() { + try { + return await this.getProjectId(); + } + catch (e) { + if (e instanceof Error && + e.message === exports.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND) { + return null; + } + else { + throw e; + } + } } - } -} - -Builder.prototype.closeTag = function(key){ - let closeTag = ""; - if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired - if(!this.options.suppressUnpairedNode) closeTag = "/" - }else if(this.options.suppressEmptyNode){ //empty - closeTag = "/"; - }else{ - closeTag = `>` + this.newLine; - }else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - }else if(key[0] === "?") {//PI tag - return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; - }else{ - let textValue = this.options.tagValueProcessor(key, val); - textValue = this.replaceEntitiesValue(textValue); - - if( textValue === ''){ - return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; - }else{ - return this.indentate(level) + '<' + key + attrStr + '>' + - textValue + - ' 0 && this.options.processEntities){ - for (let i=0; i { - -const EOL = "\n"; - -/** - * - * @param {array} jArray - * @param {any} options - * @returns - */ -function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; + /** + * Retrieves, caches, and returns the universe domain in the following order + * of precedence: + * - The universe domain in {@link GoogleAuth.clientOptions} + * - An existing or ADC {@link AuthClient}'s universe domain + * - {@link gcpMetadata.universe}, if {@link Compute} client + * + * @returns The universe domain + */ + async getUniverseDomain() { + let universeDomain = (0, util_1.originalOrCamelOptions)(this.clientOptions).get('universe_domain'); + try { + universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = (await this.getClient()).universeDomain); + } + catch (_a) { + // client or ADC is not available + universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = authclient_1.DEFAULT_UNIVERSE); + } + return universeDomain; } - return arrToStr(jArray, options, "", indentation); -} - -function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if(tagName === undefined) continue; - - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName - else newJPath = `${jPath}.${tagName}`; - - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); + /** + * @returns Any scopes (user-specified or default scopes specified by the + * client library) that need to be set on the current Auth client. + */ + getAnyScopes() { + return this.scopes || this.defaultScopes; + } + getApplicationDefault(optionsOrCallback = {}, callback) { + let options; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else { + options = optionsOrCallback; + } + if (callback) { + this.getApplicationDefaultAsync(options).then(r => callback(null, r.credential, r.projectId), callback); + } + else { + return this.getApplicationDefaultAsync(options); + } + } + async getApplicationDefaultAsync(options = {}) { + // If we've already got a cached credential, return it. + // This will also preserve one's configured quota project, in case they + // set one directly on the credential previously. + if (this.cachedCredential) { + // cache, while preserving existing quota project preferences + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, this.cachedCredential, null); + } + let credential; + // Check for the existence of a local environment variable pointing to the + // location of the credential file. This is typically used in local + // developer scenarios. + credential = + await this._tryGetApplicationCredentialsFromEnvironmentVariable(options); + if (credential) { + if (credential instanceof jwtclient_1.JWT) { + credential.scopes = this.scopes; } - if (isPreviousElementTag) { - xmlStr += indentation; + else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { + credential.scopes = this.getAnyScopes(); } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, credential); + } + // Look in the well-known credential file location. + credential = + await this._tryGetApplicationCredentialsFromWellKnownFile(options); + if (credential) { + if (credential instanceof jwtclient_1.JWT) { + credential.scopes = this.scopes; } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; //remove extra spacing - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`; - isPreviousElementTag = true; - continue; + else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { + credential.scopes = this.getAnyScopes(); + } + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, credential); + } + // Determine if we're running on GCE. + if (await this._checkIsGCE()) { + options.scopes = this.getAnyScopes(); + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, new computeclient_1.Compute(options)); + } + throw new Error(exports.GoogleAuthExceptionMessages.NO_ADC_FOUND); + } + /** + * Determines whether the auth layer is running on Google Compute Engine. + * Checks for GCP Residency, then fallback to checking if metadata server + * is available. + * + * @returns A promise that resolves with the boolean. + * @api private + */ + async _checkIsGCE() { + if (this.checkIsGCE === undefined) { + this.checkIsGCE = + gcpMetadata.getGCPResidency() || (await gcpMetadata.isAvailable()); + } + return this.checkIsGCE; + } + /** + * Attempts to load default credentials from the environment variable path.. + * @returns Promise that resolves with the OAuth2Client or null. + * @api private + */ + async _tryGetApplicationCredentialsFromEnvironmentVariable(options) { + const credentialsPath = process.env['GOOGLE_APPLICATION_CREDENTIALS'] || + process.env['google_application_credentials']; + if (!credentialsPath || credentialsPath.length === 0) { + return null; + } + try { + return this._getApplicationCredentialsFromFilePath(credentialsPath, options); + } + catch (e) { + if (e instanceof Error) { + e.message = `Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${e.message}`; + } + throw e; + } + } + /** + * Attempts to load default credentials from a well-known file location + * @return Promise that resolves with the OAuth2Client or null. + * @api private + */ + async _tryGetApplicationCredentialsFromWellKnownFile(options) { + // First, figure out the location of the file, depending upon the OS type. + let location = null; + if (this._isWindows()) { + // Windows + location = process.env['APPDATA']; + } + else { + // Linux or Mac + const home = process.env['HOME']; + if (home) { + location = path.join(home, '.config'); + } + } + // If we found the root path, expand it. + if (location) { + location = path.join(location, 'gcloud', 'application_default_credentials.json'); + if (!fs.existsSync(location)) { + location = null; + } + } + // The file does not exist. + if (!location) { + return null; + } + // The file seems to exist. Try to use it. + const client = await this._getApplicationCredentialsFromFilePath(location, options); + return client; + } + /** + * Attempts to load default credentials from a file at the given path.. + * @param filePath The path to the file to read. + * @returns Promise that resolves with the OAuth2Client + * @api private + */ + async _getApplicationCredentialsFromFilePath(filePath, options = {}) { + // Make sure the path looks like a string. + if (!filePath || filePath.length === 0) { + throw new Error('The file path is invalid.'); + } + // Make sure there is a file at the path. lstatSync will throw if there is + // nothing there. + try { + // Resolve path to actual file in case of symlink. Expect a thrown error + // if not resolvable. + filePath = fs.realpathSync(filePath); + if (!fs.lstatSync(filePath).isFile()) { + throw new Error(); + } + } + catch (err) { + if (err instanceof Error) { + err.message = `The file at ${filePath} does not exist, or it is not a file. ${err.message}`; + } + throw err; + } + // Now open a read stream on the file, and parse it. + const readStream = fs.createReadStream(filePath); + return this.fromStream(readStream, options); + } + /** + * Create a credentials instance using a given impersonated input options. + * @param json The impersonated input object. + * @returns JWT or UserRefresh Client with data + */ + fromImpersonatedJSON(json) { + var _a, _b, _c, _d; + if (!json) { + throw new Error('Must pass in a JSON object containing an impersonated refresh token'); + } + if (json.type !== impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { + throw new Error(`The incoming JSON object does not have the "${impersonated_1.IMPERSONATED_ACCOUNT_TYPE}" type`); + } + if (!json.source_credentials) { + throw new Error('The incoming JSON object does not contain a source_credentials field'); + } + if (!json.service_account_impersonation_url) { + throw new Error('The incoming JSON object does not contain a service_account_impersonation_url field'); + } + const sourceClient = this.fromJSON(json.source_credentials); + if (((_a = json.service_account_impersonation_url) === null || _a === void 0 ? void 0 : _a.length) > 256) { + /** + * Prevents DOS attacks. + * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/85} + **/ + throw new RangeError(`Target principal is too long: ${json.service_account_impersonation_url}`); + } + // Extract service account from service_account_impersonation_url + const targetPrincipal = (_c = (_b = /(?[^/]+):(generateAccessToken|generateIdToken)$/.exec(json.service_account_impersonation_url)) === null || _b === void 0 ? void 0 : _b.groups) === null || _c === void 0 ? void 0 : _c.target; + if (!targetPrincipal) { + throw new RangeError(`Cannot extract target principal from ${json.service_account_impersonation_url}`); + } + const targetScopes = (_d = this.getAnyScopes()) !== null && _d !== void 0 ? _d : []; + return new impersonated_1.Impersonated({ + ...json, + sourceClient, + targetPrincipal, + targetScopes: Array.isArray(targetScopes) ? targetScopes : [targetScopes], + }); + } + /** + * Create a credentials instance using the given input options. + * This client is not cached. + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + * + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data + */ + fromJSON(json, options = {}) { + let client; + // user's preferred universe domain + const preferredUniverseDomain = (0, util_1.originalOrCamelOptions)(options).get('universe_domain'); + if (json.type === refreshclient_1.USER_REFRESH_ACCOUNT_TYPE) { + client = new refreshclient_1.UserRefreshClient(options); + client.fromJSON(json); + } + else if (json.type === impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { + client = this.fromImpersonatedJSON(json); + } + else if (json.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + client = externalclient_1.ExternalAccountClient.fromJSON(json, options); + client.scopes = this.getAnyScopes(); + } + else if (json.type === externalAccountAuthorizedUserClient_1.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE) { + client = new externalAccountAuthorizedUserClient_1.ExternalAccountAuthorizedUserClient(json, options); + } + else { + options.scopes = this.scopes; + client = new jwtclient_1.JWT(options); + this.setGapicJWTValues(client); + client.fromJSON(json); } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; + if (preferredUniverseDomain) { + client.universeDomain = preferredUniverseDomain; } - isPreviousElementTag = true; + return client; } - - return xmlStr; -} - -function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if(!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; + /** + * Return a JWT or UserRefreshClient from JavaScript object, caching both the + * object used to instantiate and the client. + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data + */ + _cacheClientFromJSON(json, options) { + const client = this.fromJSON(json, options); + // cache both raw data used to instantiate client and client itself. + this.jsonContent = json; + this.cachedCredential = client; + return client; } -} - -function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if(!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } + fromStream(inputStream, optionsOrCallback = {}, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; } - } - return attrStr; -} - -function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; -} - -function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); + else { + options = optionsOrCallback; + } + if (callback) { + this.fromStreamAsync(inputStream, options).then(r => callback(null, r), callback); + } + else { + return this.fromStreamAsync(inputStream, options); } } - return textValue; -} -module.exports = toXml; - - -/***/ }), - -/***/ 6072: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const util = __nccwpck_require__(38280); - -//TODO: handle comments -function readDocType(xmlData, i){ - - const entities = {}; - if( xmlData[i + 3] === 'O' && - xmlData[i + 4] === 'C' && - xmlData[i + 5] === 'T' && - xmlData[i + 6] === 'Y' && - xmlData[i + 7] === 'P' && - xmlData[i + 8] === 'E') - { - i = i+9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for(;i') { //Read tag content - if(comment){ - if( xmlData[i - 1] === "-" && xmlData[i - 2] === "-"){ - comment = false; - angleBracketsCount--; + fromStreamAsync(inputStream, options) { + return new Promise((resolve, reject) => { + if (!inputStream) { + throw new Error('Must pass in a stream containing the Google auth settings.'); + } + const chunks = []; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => chunks.push(chunk)) + .on('end', () => { + try { + try { + const data = JSON.parse(chunks.join('')); + const r = this._cacheClientFromJSON(data, options); + return resolve(r); + } + catch (err) { + // If we failed parsing this.keyFileName, assume that it + // is a PEM or p12 certificate: + if (!this.keyFilename) + throw err; + const client = new jwtclient_1.JWT({ + ...this.clientOptions, + keyFile: this.keyFilename, + }); + this.cachedCredential = client; + this.setGapicJWTValues(client); + return resolve(client); } - }else{ - angleBracketsCount--; } - if (angleBracketsCount === 0) { - break; + catch (err) { + return reject(err); } - }else if( xmlData[i] === '['){ - hasBody = true; - }else{ - exp += xmlData[i]; - } - } - if(angleBracketsCount !== 0){ - throw new Error(`Unclosed DOCTYPE`); - } - }else{ - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return {entities, i}; -} - -function readEntityExp(xmlData,i){ - //External entities are not supported - // - - //Parameter entities are not supported - // - - //Internal entities are supported - // - - //read EntityName - let entityName = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"' ); i++) { - // if(xmlData[i] === " ") continue; - // else - entityName += xmlData[i]; - } - entityName = entityName.trim(); - if(entityName.indexOf(" ") !== -1) throw new Error("External entites are not supported"); - - //read Entity Value - const startChar = xmlData[i++]; - let val = "" - for (; i < xmlData.length && xmlData[i] !== startChar ; i++) { - val += xmlData[i]; + }); + }); } - return [entityName, val, i]; -} - -function isComment(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === '-' && - xmlData[i+3] === '-') return true - return false -} -function isEntity(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'E' && - xmlData[i+3] === 'N' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'I' && - xmlData[i+6] === 'T' && - xmlData[i+7] === 'Y') return true - return false -} -function isElement(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'E' && - xmlData[i+3] === 'L' && - xmlData[i+4] === 'E' && - xmlData[i+5] === 'M' && - xmlData[i+6] === 'E' && - xmlData[i+7] === 'N' && - xmlData[i+8] === 'T') return true - return false -} - -function isAttlist(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'A' && - xmlData[i+3] === 'T' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'L' && - xmlData[i+6] === 'I' && - xmlData[i+7] === 'S' && - xmlData[i+8] === 'T') return true - return false -} -function isNotation(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'N' && - xmlData[i+3] === 'O' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'A' && - xmlData[i+6] === 'T' && - xmlData[i+7] === 'I' && - xmlData[i+8] === 'O' && - xmlData[i+9] === 'N') return true - return false -} - -function validateEntityName(name){ - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); -} - -module.exports = readDocType; - - -/***/ }), - -/***/ 86993: -/***/ ((__unused_webpack_module, exports) => { - - -const defaultOptions = { - preserveOrder: false, - attributeNamePrefix: '@_', - attributesGroupName: false, - textNodeName: '#text', - ignoreAttributes: true, - removeNSPrefix: false, // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val) { - return val; - }, - attributeValueProcessor: function(attrName, val) { - return val; - }, - stopNodes: [], //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs){ - return tagName - }, - // skipEmptyListItem: false -}; - -const buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); -}; - -exports.buildOptions = buildOptions; -exports.defaultOptions = defaultOptions; - -/***/ }), - -/***/ 25832: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -///@ts-check - -const util = __nccwpck_require__(38280); -const xmlNode = __nccwpck_require__(7462); -const readDocType = __nccwpck_require__(6072); -const toNumber = __nccwpck_require__(14526); - -// const regx = -// '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' -// .replace(/NAME/g, util.nameRegexp); - -//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); -//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); - -class OrderedObjParser{ - constructor(options){ - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos" : { regex: /&(apos|#39|#x27);/g, val : "'"}, - "gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"}, - "lt" : { regex: /&(lt|#60|#x3C);/g, val : "<"}, - "quot" : { regex: /&(quot|#34|#x22);/g, val : "\""}, - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"}; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent" : { regex: /&(cent|#162);/g, val: "¢" }, - "pound" : { regex: /&(pound|#163);/g, val: "£" }, - "yen" : { regex: /&(yen|#165);/g, val: "¥" }, - "euro" : { regex: /&(euro|#8364);/g, val: "€" }, - "copyright" : { regex: /&(copy|#169);/g, val: "©" }, - "reg" : { regex: /&(reg|#174);/g, val: "®" }, - "inr" : { regex: /&(inr|#8377);/g, val: "₹" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }, - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - } - -} - -function addExternalEntities(externalEntities){ - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&"+ent+";","g"), - val : externalEntities[ent] + /** + * Create a credentials instance using the given API key string. + * The created client is not cached. In order to create and cache it use the {@link GoogleAuth.getClient `getClient`} method after first providing an {@link GoogleAuth.apiKey `apiKey`}. + * + * @param apiKey The API key string + * @param options An optional options object. + * @returns A JWT loaded from the key + */ + fromAPIKey(apiKey, options = {}) { + return new jwtclient_1.JWT({ ...options, apiKey }); } - } -} - -/** - * @param {string} val - * @param {string} tagName - * @param {string} jPath - * @param {boolean} dontTrim - * @param {boolean} hasAttributes - * @param {boolean} isLeafNode - * @param {boolean} escapeEntities - */ -function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val !== undefined) { - if (this.options.trimValues && !dontTrim) { - val = val.trim(); - } - if(val.length > 0){ - if(!escapeEntities) val = this.replaceEntitiesValue(val); - - const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode); - if(newval === null || newval === undefined){ - //don't parse - return val; - }else if(typeof newval !== typeof val || newval !== val){ - //overwrite - return newval; - }else if(this.options.trimValues){ - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - }else{ - const trimmedVal = val.trim(); - if(trimmedVal === val){ - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - }else{ - return val; + /** + * Determines whether the current operating system is Windows. + * @api private + */ + _isWindows() { + const sys = os.platform(); + if (sys && sys.length >= 3) { + if (sys.substring(0, 3).toLowerCase() === 'win') { + return true; + } } - } - } - } -} - -function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(':'); - const prefix = tagname.charAt(0) === '/' ? '/' : ''; - if (tags[0] === 'xmlns') { - return ''; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; + return false; } - } - return tagname; -} - -//TODO: change regex to capture NS -//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); -const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm'); - -function buildAttributesMap(attrStr, jPath, tagName) { - if (!this.options.ignoreAttributes && typeof attrStr === 'string') { - // attrStr = attrStr.replace(/\r?\n/g, ' '); - //attrStr = attrStr || attrStr.trim(); - - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; //don't make it inline - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if(aName === "__proto__") aName = "#__proto__"; - if (oldVal !== undefined) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if(newVal === null || newVal === undefined){ - //don't parse - attrs[aName] = oldVal; - }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){ - //overwrite - attrs[aName] = newVal; - }else{ - //parse - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } + /** + * Run the Google Cloud SDK command that prints the default project ID + */ + async getDefaultServiceProjectId() { + return new Promise(resolve => { + (0, child_process_1.exec)('gcloud config config-helper --format json', (err, stdout) => { + if (!err && stdout) { + try { + const projectId = JSON.parse(stdout).configuration.properties.core.project; + resolve(projectId); + return; + } + catch (e) { + // ignore errors + } + } + resolve(null); + }); + }); } - if (!Object.keys(attrs).length) { - return; + /** + * Loads the project id from environment variables. + * @api private + */ + getProductionProjectId() { + return (process.env['GCLOUD_PROJECT'] || + process.env['GOOGLE_CLOUD_PROJECT'] || + process.env['gcloud_project'] || + process.env['google_cloud_project']); } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs - } -} - -const parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); //TODO: remove this line - const xmlObj = new xmlNode('!xml'); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for(let i=0; i< xmlData.length; i++){//for each char in XML data - const ch = xmlData[i]; - if(ch === '<'){ - // const nextIndex = i+1; - // const _2ndChar = xmlData[nextIndex]; - if( xmlData[i+1] === '/') {//Closing Tag - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") - let tagName = xmlData.substring(i+2,closeIndex).trim(); - - if(this.options.removeNSPrefix){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - } + /** + * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file. + * @api private + */ + async getFileProjectId() { + if (this.cachedCredential) { + // Try to read the project ID from the cached credentials file + return this.cachedCredential.projectId; } - - if(this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); + // Ensure the projectId is loaded from the keyFile if available. + if (this.keyFilename) { + const creds = await this.getClient(); + if (creds && creds.projectId) { + return creds.projectId; + } } - - if(currentNode){ - textData = this.saveTextToParentTag(textData, currentNode, jPath); + // Try to load a credentials file and read its project ID + const r = await this._tryGetApplicationCredentialsFromEnvironmentVariable(); + if (r) { + return r.projectId; } - - //check if last tag of nested tag was unpaired tag - const lastTagName = jPath.substring(jPath.lastIndexOf(".")+1); - if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){ - throw new Error(`Unpaired tag can not be used as closing tag: `); + else { + return null; } - let propIndex = 0 - if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){ - propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1) - this.tagsNodeStack.pop(); - }else{ - propIndex = jPath.lastIndexOf("."); + } + /** + * Gets the project ID from external account client if available. + */ + async getExternalAccountClientProjectId() { + if (!this.jsonContent || this.jsonContent.type !== baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + return null; } - jPath = jPath.substring(0, propIndex); - - currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope - textData = ""; - i = closeIndex; - } else if( xmlData[i+1] === '?') { - - let tagData = readTagExp(xmlData,i, false, "?>"); - if(!tagData) throw new Error("Pi Tag is not closed."); - - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if( (this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags){ - - }else{ - - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - - if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath) - + const creds = await this.getClient(); + // Do not suppress the underlying error, as the error could contain helpful + // information for debugging and fixing. This is especially true for + // external account creds as in order to get the project ID, the following + // operations have to succeed: + // 1. Valid credentials file should be supplied. + // 2. Ability to retrieve access tokens from STS token exchange API. + // 3. Ability to exchange for service account impersonated credentials (if + // enabled). + // 4. Ability to get project info using the access token from step 2 or 3. + // Without surfacing the error, it is harder for developers to determine + // which step went wrong. + return await creds.getProjectId(); + } + /** + * Gets the Compute Engine project ID if it can be inferred. + */ + async getGCEProjectId() { + try { + const r = await gcpMetadata.project('project-id'); + return r; } - - - i = tagData.closeIndex + 1; - } else if(xmlData.substr(i + 1, 3) === '!--') { - const endIndex = findClosingIndex(xmlData, "-->", i+4, "Comment is not closed.") - if(this.options.commentPropName){ - const comment = xmlData.substring(i + 4, endIndex - 2); - - textData = this.saveTextToParentTag(textData, currentNode, jPath); - - currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]); + catch (e) { + // Ignore any errors + return null; } - i = endIndex; - } else if( xmlData.substr(i + 1, 2) === '!D') { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - }else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9,closeIndex); - - textData = this.saveTextToParentTag(textData, currentNode, jPath); - - let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if(val == undefined) val = ""; - - //cdata should be set even if it is 0 length string - if(this.options.cdataPropName){ - currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]); - }else{ - currentNode.add(this.options.textNodeName, val); + } + getCredentials(callback) { + if (callback) { + this.getCredentialsAsync().then(r => callback(null, r), callback); } - - i = closeIndex + 2; - }else {//Opening tag - let result = readTagExp(xmlData,i, this.options.removeNSPrefix); - let tagName= result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; - - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); + else { + return this.getCredentialsAsync(); } - - //save text as child node - if (currentNode && textData) { - if(currentNode.tagname !== '!xml'){ - //when nested tag is found - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } + } + async getCredentialsAsync() { + const client = await this.getClient(); + if (client instanceof impersonated_1.Impersonated) { + return { client_email: client.getTargetPrincipal() }; } - - //check if last tag was unpaired tag - const lastTag = currentNode; - if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){ - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); + if (client instanceof baseexternalclient_1.BaseExternalAccountClient) { + const serviceAccountEmail = client.getServiceAccountEmail(); + if (serviceAccountEmail) { + return { + client_email: serviceAccountEmail, + universe_domain: client.universeDomain, + }; + } } - if(tagName !== xmlObj.tagname){ - jPath += jPath ? "." + tagName : tagName; + if (this.jsonContent) { + return { + client_email: this.jsonContent.client_email, + private_key: this.jsonContent.private_key, + universe_domain: this.jsonContent.universe_domain, + }; } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - //self-closing tag - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } - //unpaired tag - else if(this.options.unpairedTags.indexOf(tagName) !== -1){ - - i = result.closeIndex; - } - //normal tag - else{ - //read until closing tag is found - const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if(!result) throw new Error(`Unexpected end of ${rawTagName}`); - i = result.i; - tagContent = result.tagContent; - } - - const childNode = new xmlNode(tagName); - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if(tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - - this.addChild(currentNode, childNode, jPath) - }else{ - //selfClosing tag - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } - - if(this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - - const childNode = new xmlNode(tagName); - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath) - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } - //opening tag - else{ - const childNode = new xmlNode( tagName); - this.tagsNodeStack.push(currentNode); - - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath) - currentNode = childNode; - } - textData = ""; - i = closeIndex; + if (await this._checkIsGCE()) { + const [client_email, universe_domain] = await Promise.all([ + gcpMetadata.instance('service-accounts/default/email'), + this.getUniverseDomain(), + ]); + return { client_email, universe_domain }; } - } - }else{ - textData += xmlData[i]; + throw new Error(exports.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND); } - } - return xmlObj.child; -} - -function addChild(currentNode, childNode, jPath){ - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]) - if(result === false){ - }else if(typeof result === "string"){ - childNode.tagname = result - currentNode.addChild(childNode); - }else{ - currentNode.addChild(childNode); - } -} - -const replaceEntitiesValue = function(val){ - - if(this.options.processEntities){ - for(let entityName in this.docTypeEntities){ - const entity = this.docTypeEntities[entityName]; - val = val.replace( entity.regx, entity.val); + /** + * Automatically obtain an {@link AuthClient `AuthClient`} based on the + * provided configuration. If no options were passed, use Application + * Default Credentials. + */ + async getClient() { + if (this.cachedCredential) { + return this.cachedCredential; + } + // Use an existing auth client request, or cache a new one + __classPrivateFieldSet(this, _GoogleAuth_pendingAuthClient, __classPrivateFieldGet(this, _GoogleAuth_pendingAuthClient, "f") || __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_determineClient).call(this), "f"); + try { + return await __classPrivateFieldGet(this, _GoogleAuth_pendingAuthClient, "f"); + } + finally { + // reset the pending auth client in case it is changed later + __classPrivateFieldSet(this, _GoogleAuth_pendingAuthClient, null, "f"); + } } - for(let entityName in this.lastEntities){ - const entity = this.lastEntities[entityName]; - val = val.replace( entity.regex, entity.val); + /** + * Creates a client which will fetch an ID token for authorization. + * @param targetAudience the audience for the fetched ID token. + * @returns IdTokenClient for making HTTP calls authenticated with ID tokens. + */ + async getIdTokenClient(targetAudience) { + const client = await this.getClient(); + if (!('fetchIdToken' in client)) { + throw new Error('Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.'); + } + return new idtokenclient_1.IdTokenClient({ targetAudience, idTokenProvider: client }); } - if(this.options.htmlEntities){ - for(let entityName in this.htmlEntities){ - const entity = this.htmlEntities[entityName]; - val = val.replace( entity.regex, entity.val); - } + /** + * Automatically obtain application default credentials, and return + * an access token for making requests. + */ + async getAccessToken() { + const client = await this.getClient(); + return (await client.getAccessToken()).token; } - val = val.replace( this.ampEntity.regex, this.ampEntity.val); - } - return val; -} -function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { //store previously collected data as textNode - if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0 - - textData = this.parseTextData(textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode); - - if (textData !== undefined && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; - } - return textData; -} - -//TODO: use jPath to simplify the logic -/** - * - * @param {string[]} stopNodes - * @param {string} jPath - * @param {string} currentTagName - */ -function isItStopNode(stopNodes, jPath, currentTagName){ - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true; - } - return false; -} - -/** - * Returns the tag Expression and where it is ending handling single-double quotes situation - * @param {string} xmlData - * @param {number} i starting index - * @returns - */ -function tagExpWithClosingIndex(xmlData, i, closingChar = ">"){ - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = "";//reset - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if(closingChar[1]){ - if(xmlData[index + 1] === closingChar[1]){ - return { - data: tagExp, - index: index - } - } - }else{ - return { - data: tagExp, - index: index - } - } - } else if (ch === '\t') { - ch = " " + /** + * Obtain the HTTP headers that will provide authorization for a given + * request. + */ + async getRequestHeaders(url) { + const client = await this.getClient(); + return client.getRequestHeaders(url); } - tagExp += ch; - } -} - -function findClosingIndex(xmlData, str, i, errMsg){ - const closingIndex = xmlData.indexOf(str, i); - if(closingIndex === -1){ - throw new Error(errMsg) - }else{ - return closingIndex + str.length - 1; - } -} - -function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){ - const result = tagExpWithClosingIndex(xmlData, i+1, closingChar); - if(!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if(separatorIndex !== -1){//separate tag name and attributes expression - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); - } - - const rawTagName = tagName; - if(removeNSPrefix){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); + /** + * Obtain credentials for a request, then attach the appropriate headers to + * the request options. + * @param opts Axios or Request options on which to attach the headers + */ + async authorizeRequest(opts) { + opts = opts || {}; + const url = opts.url || opts.uri; + const client = await this.getClient(); + const headers = await client.getRequestHeaders(url); + opts.headers = Object.assign(opts.headers || {}, headers); + return opts; } - } - - return { - tagName: tagName, - tagExp: tagExp, - closeIndex: closeIndex, - attrExpPresent: attrExpPresent, - rawTagName: rawTagName, - } -} -/** - * find paired tag for a stop node - * @param {string} xmlData - * @param {string} tagName - * @param {number} i - */ -function readStopNodeData(xmlData, tagName, i){ - const startIndex = i; - // Starting at 1 since we already have an open tag - let openTagCount = 1; - - for (; i < xmlData.length; i++) { - if( xmlData[i] === "<"){ - if (xmlData[i+1] === "/") {//close tag - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i+2,closeIndex).trim(); - if(closeTagName === tagName){ - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i : closeIndex - } - } - } - i=closeIndex; - } else if(xmlData[i+1] === '?') { - const closeIndex = findClosingIndex(xmlData, "?>", i+1, "StopNode is not closed.") - i=closeIndex; - } else if(xmlData.substr(i + 1, 3) === '!--') { - const closeIndex = findClosingIndex(xmlData, "-->", i+3, "StopNode is not closed.") - i=closeIndex; - } else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i=closeIndex; - } else { - const tagData = readTagExp(xmlData, i, '>') - - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== "/") { - openTagCount++; - } - i=tagData.closeIndex; - } - } - } - }//end for loop -} - -function parseValue(val, shouldParse, options) { - if (shouldParse && typeof val === 'string') { - //console.log(options) - const newval = val.trim(); - if(newval === 'true' ) return true; - else if(newval === 'false' ) return false; - else return toNumber(val, options); - } else { - if (util.isExist(val)) { - return val; - } else { - return ''; + /** + * Automatically obtain application default credentials, and make an + * HTTP request using the given options. + * @param opts Axios request options for the HTTP request. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + async request(opts) { + const client = await this.getClient(); + return client.request(opts); } - } -} - - -module.exports = OrderedObjParser; - - -/***/ }), - -/***/ 42380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { buildOptions} = __nccwpck_require__(86993); -const OrderedObjParser = __nccwpck_require__(25832); -const { prettify} = __nccwpck_require__(42882); -const validator = __nccwpck_require__(61739); - -class XMLParser{ - - constructor(options){ - this.externalEntities = {}; - this.options = buildOptions(options); - - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData,validationOption){ - if(typeof xmlData === "string"){ - }else if( xmlData.toString){ - xmlData = xmlData.toString(); - }else{ - throw new Error("XML data is accepted in String or Bytes[] form.") - } - if( validationOption){ - if(validationOption === true) validationOption = {}; //validate with default options - - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` ) - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if(this.options.preserveOrder || orderedResult === undefined) return orderedResult; - else return prettify(orderedResult, this.options); + /** + * Determine the compute environment in which the code is running. + */ + getEnv() { + return (0, envDetect_1.getEnv)(); } - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value + * Sign the given data with the current private key, or go out + * to the IAM API to sign it. + * @param data The data to be signed. + * @param endpoint A custom endpoint to use. + * + * @example + * ``` + * sign('data', 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/'); + * ``` */ - addEntity(key, value){ - if(value.indexOf("&") !== -1){ - throw new Error("Entity value can't have '&'") - }else if(key.indexOf("&") !== -1 || key.indexOf(";") !== -1){ - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '") - }else if(value === "&"){ - throw new Error("An entity with value '&' is not permitted"); - }else{ - this.externalEntities[key] = value; + async sign(data, endpoint) { + const client = await this.getClient(); + const universe = await this.getUniverseDomain(); + endpoint = + endpoint || + `https://iamcredentials.${universe}/v1/projects/-/serviceAccounts/`; + if (client instanceof impersonated_1.Impersonated) { + const signed = await client.sign(data); + return signed.signedBlob; } - } -} - -module.exports = XMLParser; - -/***/ }), - -/***/ 42882: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -/** - * - * @param {array} node - * @param {any} options - * @returns - */ -function prettify(node, options){ - return compress( node, options); -} - -/** - * - * @param {array} arr - * @param {object} options - * @param {string} jPath - * @returns object - */ -function compress(arr, options, jPath){ - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if(jPath === undefined) newJpath = property; - else newJpath = jPath + "." + property; - - if(property === options.textNodeName){ - if(text === undefined) text = tagObj[property]; - else text += "" + tagObj[property]; - }else if(property === undefined){ - continue; - }else if(tagObj[property]){ - - let val = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val, options); - - if(tagObj[":@"]){ - assignAttributes( val, tagObj[":@"], newJpath, options); - }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){ - val = val[options.textNodeName]; - }else if(Object.keys(val).length === 0){ - if(options.alwaysCreateTextNode) val[options.textNodeName] = ""; - else val = ""; - } - - if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) { - if(!Array.isArray(compressedObj[property])) { - compressedObj[property] = [ compressedObj[property] ]; + const crypto = (0, crypto_1.createCrypto)(); + if (client instanceof jwtclient_1.JWT && client.key) { + const sign = await crypto.sign(client.key, data); + return sign; } - compressedObj[property].push(val); - }else{ - //TODO: if a node is not an array, then check if it should be an array - //also determine if it is a leaf node - if (options.isArray(property, newJpath, isLeaf )) { - compressedObj[property] = [val]; - }else{ - compressedObj[property] = val; + const creds = await this.getCredentials(); + if (!creds.client_email) { + throw new Error('Cannot sign data without `client_email`.'); } - } + return this.signBlob(crypto, creds.client_email, data, endpoint); + } + async signBlob(crypto, emailOrUniqueId, data, endpoint) { + const url = new URL(endpoint + `${emailOrUniqueId}:signBlob`); + const res = await this.request({ + method: 'POST', + url: url.href, + data: { + payload: crypto.encodeBase64StringUtf8(data), + }, + retry: true, + retryConfig: { + httpMethodsToRetry: ['POST'], + }, + }); + return res.data.signedBlob; } - - } - // if(text && text.length > 0) compressedObj[options.textNodeName] = text; - if(typeof text === "string"){ - if(text.length > 0) compressedObj[options.textNodeName] = text; - }else if(text !== undefined) compressedObj[options.textNodeName] = text; - return compressedObj; -} - -function propName(obj){ - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if(key !== ":@") return key; - } } - -function assignAttributes(obj, attrMap, jpath, options){ - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; //don't make it inline - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [ attrMap[atrrName] ]; - } else { - obj[atrrName] = attrMap[atrrName]; - } +exports.GoogleAuth = GoogleAuth; +_GoogleAuth_pendingAuthClient = new WeakMap(), _GoogleAuth_instances = new WeakSet(), _GoogleAuth_prepareAndCacheClient = async function _GoogleAuth_prepareAndCacheClient(credential, quotaProjectIdOverride = process.env['GOOGLE_CLOUD_QUOTA_PROJECT'] || null) { + const projectId = await this.getProjectIdOptional(); + if (quotaProjectIdOverride) { + credential.quotaProjectId = quotaProjectIdOverride; + } + this.cachedCredential = credential; + return { credential, projectId }; +}, _GoogleAuth_determineClient = async function _GoogleAuth_determineClient() { + if (this.jsonContent) { + return this._cacheClientFromJSON(this.jsonContent, this.clientOptions); + } + else if (this.keyFilename) { + const filePath = path.resolve(this.keyFilename); + const stream = fs.createReadStream(filePath); + return await this.fromStreamAsync(stream, this.clientOptions); + } + else if (this.apiKey) { + const client = await this.fromAPIKey(this.apiKey, this.clientOptions); + client.scopes = this.scopes; + const { credential } = await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, client); + return credential; } - } -} - -function isLeafTag(obj, options){ - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - - if (propCount === 0) { - return true; - } - - if ( - propCount === 1 && - (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0) - ) { - return true; - } - - return false; -} -exports.prettify = prettify; - - -/***/ }), - -/***/ 7462: -/***/ ((module) => { - -"use strict"; - - -class XmlNode{ - constructor(tagname) { - this.tagname = tagname; - this.child = []; //nested tags, text, cdata, comments in order - this[":@"] = {}; //attributes map - } - add(key,val){ - // this.child.push( {name : key, val: val, isCdata: isCdata }); - if(key === "__proto__") key = "#__proto__"; - this.child.push( {[key]: val }); - } - addChild(node) { - if(node.tagname === "__proto__") node.tagname = "#__proto__"; - if(node[":@"] && Object.keys(node[":@"]).length > 0){ - this.child.push( { [node.tagname]: node.child, [":@"]: node[":@"] }); - }else{ - this.child.push( { [node.tagname]: node.child }); + else { + const { credential } = await this.getApplicationDefaultAsync(this.clientOptions); + return credential; } - }; }; +/** + * Export DefaultTransporter as a static property of the class. + */ +GoogleAuth.DefaultTransporter = transporters_1.DefaultTransporter; -module.exports = XmlNode; - /***/ }), -/***/ 31133: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 39735: +/***/ ((__unused_webpack_module, exports) => { -var debug; +"use strict"; -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = __nccwpck_require__(38237)("follow-redirects"); +// Copyright 2014 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IAMAuth = void 0; +class IAMAuth { + /** + * IAM credentials. + * + * @param selector the iam authority selector + * @param token the token + * @constructor + */ + constructor(selector, token) { + this.selector = selector; + this.token = token; + this.selector = selector; + this.token = token; } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; + /** + * Acquire the HTTP headers required to make an authenticated request. + */ + getRequestHeaders() { + return { + 'x-goog-iam-authority-selector': this.selector, + 'x-goog-iam-authorization-token': this.token, + }; } - } - debug.apply(null, arguments); -}; - - -/***/ }), - -/***/ 67707: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var url = __nccwpck_require__(57310); -var URL = url.URL; -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var Writable = (__nccwpck_require__(12781).Writable); -var assert = __nccwpck_require__(39491); -var debug = __nccwpck_require__(31133); - -// Whether to use the native URL object or the legacy url module -var useNativeURL = false; -try { - assert(new URL()); -} -catch (error) { - useNativeURL = error.code === "ERR_INVALID_URL"; } +exports.IAMAuth = IAMAuth; -// URL fields to preserve in copy operations -var preservedUrlFields = [ - "auth", - "host", - "hostname", - "href", - "path", - "pathname", - "port", - "protocol", - "query", - "search", - "hash", -]; - -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); - -// Error types with codes -var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError -); -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded", - RedirectionError -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); -// istanbul ignore next -var destroy = Writable.prototype.destroy || noop; +/***/ }), -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; +/***/ 20117: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } +"use strict"; - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - try { - self._processResponse(response); +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IdentityPoolClient = void 0; +const baseexternalclient_1 = __nccwpck_require__(40810); +const util_1 = __nccwpck_require__(68905); +const filesubjecttokensupplier_1 = __nccwpck_require__(27646); +const urlsubjecttokensupplier_1 = __nccwpck_require__(7428); +/** + * Defines the Url-sourced and file-sourced external account clients mainly + * used for K8s and Azure workloads. + */ +class IdentityPoolClient extends baseexternalclient_1.BaseExternalAccountClient { + /** + * Instantiate an IdentityPoolClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid file-sourced or + * url-sourced credential or a workforce pool user project is provided + * with a non workforce audience. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + super(options, additionalOptions); + const opts = (0, util_1.originalOrCamelOptions)(options); + const credentialSource = opts.get('credential_source'); + const subjectTokenSupplier = opts.get('subject_token_supplier'); + // Validate credential sourcing configuration. + if (!credentialSource && !subjectTokenSupplier) { + throw new Error('A credential source or subject token supplier must be specified.'); + } + if (credentialSource && subjectTokenSupplier) { + throw new Error('Only one of credential source or subject token supplier can be specified.'); + } + if (subjectTokenSupplier) { + this.subjectTokenSupplier = subjectTokenSupplier; + this.credentialSourceType = 'programmatic'; + } + else { + const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); + const formatOpts = (0, util_1.originalOrCamelOptions)(credentialSourceOpts.get('format')); + // Text is the default format type. + const formatType = formatOpts.get('type') || 'text'; + const formatSubjectTokenFieldName = formatOpts.get('subject_token_field_name'); + if (formatType !== 'json' && formatType !== 'text') { + throw new Error(`Invalid credential_source format "${formatType}"`); + } + if (formatType === 'json' && !formatSubjectTokenFieldName) { + throw new Error('Missing subject_token_field_name for JSON credential_source format'); + } + const file = credentialSourceOpts.get('file'); + const url = credentialSourceOpts.get('url'); + const headers = credentialSourceOpts.get('headers'); + if (file && url) { + throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); + } + else if (file && !url) { + this.credentialSourceType = 'file'; + this.subjectTokenSupplier = new filesubjecttokensupplier_1.FileSubjectTokenSupplier({ + filePath: file, + formatType: formatType, + subjectTokenFieldName: formatSubjectTokenFieldName, + }); + } + else if (!file && url) { + this.credentialSourceType = 'url'; + this.subjectTokenSupplier = new urlsubjecttokensupplier_1.UrlSubjectTokenSupplier({ + url: url, + formatType: formatType, + subjectTokenFieldName: formatSubjectTokenFieldName, + headers: headers, + additionalGaxiosOptions: IdentityPoolClient.RETRY_CONFIG, + }); + } + else { + throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); + } + } } - catch (cause) { - self.emit("error", cause instanceof RedirectionError ? - cause : new RedirectionError({ cause: cause })); + /** + * Triggered when a external subject token is needed to be exchanged for a GCP + * access token via GCP STS endpoint. Gets a subject token by calling + * the configured {@link SubjectTokenSupplier} + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + return this.subjectTokenSupplier.getSubjectToken(this.supplierContext); } - }; - - // Perform the first request - this._performRequest(); } -RedirectableRequest.prototype = Object.create(Writable.prototype); - -RedirectableRequest.prototype.abort = function () { - destroyRequest(this._currentRequest); - this._currentRequest.abort(); - this.emit("abort"); -}; - -RedirectableRequest.prototype.destroy = function (error) { - destroyRequest(this._currentRequest, error); - destroy.call(this, error); - return this; -}; - -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } - - // Validate input and shift parameters if necessary - if (!isString(data) && !isBuffer(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (isFunction(data)) { - callback = data; - data = encoding = null; - } - else if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } - - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; - - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); - } - - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); - } - - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; - } - - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - self.removeListener("close", clearTimer); - if (callback) { - self.removeListener("timeout", callback); - } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); - } - } - - // Attach callback if passed - if (callback) { - this.on("timeout", callback); - } - - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); - } - else { - this._currentRequest.once("socket", startTimer); - } - - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); - this.on("close", clearTimer); +exports.IdentityPoolClient = IdentityPoolClient; - return this; -}; -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); +/***/ }), -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); +/***/ 80298: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } +"use strict"; - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; +// Copyright 2020 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IdTokenClient = void 0; +const oauth2client_1 = __nccwpck_require__(3936); +class IdTokenClient extends oauth2client_1.OAuth2Client { + /** + * Google ID Token client + * + * Retrieve ID token from the metadata server. + * See: https://cloud.google.com/docs/authentication/get-id-token#metadata-server + */ + constructor(options) { + super(options); + this.targetAudience = options.targetAudience; + this.idTokenProvider = options.idTokenProvider; } - delete options.host; - } - - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; + async getRequestMetadataAsync( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + url) { + if (!this.credentials.id_token || + !this.credentials.expiry_date || + this.isTokenExpiring()) { + const idToken = await this.idTokenProvider.fetchIdToken(this.targetAudience); + this.credentials = { + id_token: idToken, + expiry_date: this.getIdTokenExpiryDate(idToken), + }; + } + const headers = { + Authorization: 'Bearer ' + this.credentials.id_token, + }; + return { headers }; } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); + getIdTokenExpiryDate(idToken) { + const payloadB64 = idToken.split('.')[1]; + if (payloadB64) { + const payload = JSON.parse(Buffer.from(payloadB64, 'base64').toString('ascii')); + return payload.exp * 1000; + } } - } -}; - +} +exports.IdTokenClient = IdTokenClient; -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - throw new TypeError("Unsupported protocol " + protocol); - } - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; - } +/***/ }), - // Create the native request and set up its event handlers - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); - } +/***/ 91103: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // RFC7230§5.3.1: When making a request directly to an origin server, […] - // a client MUST send only the absolute path […] as the request-target. - this._currentUrl = /^\//.test(this._options.path) ? - url.format(this._options) : - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path; +"use strict"; - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - /* istanbul ignore else */ - if (request === self._currentRequest) { - // Report any write errors - /* istanbul ignore if */ - if (error) { - self.emit("error", error); +/** + * Copyright 2021 Google LLC + * + * 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. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Impersonated = exports.IMPERSONATED_ACCOUNT_TYPE = void 0; +const oauth2client_1 = __nccwpck_require__(3936); +const gaxios_1 = __nccwpck_require__(59555); +const util_1 = __nccwpck_require__(68905); +exports.IMPERSONATED_ACCOUNT_TYPE = 'impersonated_service_account'; +class Impersonated extends oauth2client_1.OAuth2Client { + /** + * Impersonated service account credentials. + * + * Create a new access token by impersonating another service account. + * + * Impersonated Credentials allowing credentials issued to a user or + * service account to impersonate another. The source project using + * Impersonated Credentials must enable the "IAMCredentials" API. + * Also, the target service account must grant the orginating principal + * the "Service Account Token Creator" IAM role. + * + * @param {object} options - The configuration object. + * @param {object} [options.sourceClient] the source credential used as to + * acquire the impersonated credentials. + * @param {string} [options.targetPrincipal] the service account to + * impersonate. + * @param {string[]} [options.delegates] the chained list of delegates + * required to grant the final access_token. If set, the sequence of + * identities must have "Service Account Token Creator" capability granted to + * the preceding identity. For example, if set to [serviceAccountB, + * serviceAccountC], the sourceCredential must have the Token Creator role on + * serviceAccountB. serviceAccountB must have the Token Creator on + * serviceAccountC. Finally, C must have Token Creator on target_principal. + * If left unset, sourceCredential must have that role on targetPrincipal. + * @param {string[]} [options.targetScopes] scopes to request during the + * authorization grant. + * @param {number} [options.lifetime] number of seconds the delegated + * credential should be valid for up to 3600 seconds by default, or 43,200 + * seconds by extending the token's lifetime, see: + * https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials#sa-credentials-oauth + * @param {string} [options.endpoint] api endpoint override. + */ + constructor(options = {}) { + var _a, _b, _c, _d, _e, _f; + super(options); + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { + expiry_date: 1, + refresh_token: 'impersonated-placeholder', + }; + this.sourceClient = (_a = options.sourceClient) !== null && _a !== void 0 ? _a : new oauth2client_1.OAuth2Client(); + this.targetPrincipal = (_b = options.targetPrincipal) !== null && _b !== void 0 ? _b : ''; + this.delegates = (_c = options.delegates) !== null && _c !== void 0 ? _c : []; + this.targetScopes = (_d = options.targetScopes) !== null && _d !== void 0 ? _d : []; + this.lifetime = (_e = options.lifetime) !== null && _e !== void 0 ? _e : 3600; + const usingExplicitUniverseDomain = !!(0, util_1.originalOrCamelOptions)(options).get('universe_domain'); + if (!usingExplicitUniverseDomain) { + // override the default universe with the source's universe + this.universeDomain = this.sourceClient.universeDomain; } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - /* istanbul ignore else */ - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } + else if (this.sourceClient.universeDomain !== this.universeDomain) { + // non-default universe and is not matching the source - this could be a credential leak + throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`); } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); + this.endpoint = + (_f = options.endpoint) !== null && _f !== void 0 ? _f : `https://iamcredentials.${this.universeDomain}`; + } + /** + * Signs some bytes. + * + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob Reference Documentation} + * @param blobToSign String to sign. + * + * @returns A {@link SignBlobResponse} denoting the keyID and signedBlob in base64 string + */ + async sign(blobToSign) { + await this.sourceClient.getAccessToken(); + const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; + const u = `${this.endpoint}/v1/${name}:signBlob`; + const body = { + delegates: this.delegates, + payload: Buffer.from(blobToSign).toString('base64'), + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + return res.data; + } + /** The service account email to be impersonated. */ + getTargetPrincipal() { + return this.targetPrincipal; + } + /** + * Refreshes the access token. + */ + async refreshToken() { + var _a, _b, _c, _d, _e, _f; + try { + await this.sourceClient.getAccessToken(); + const name = 'projects/-/serviceAccounts/' + this.targetPrincipal; + const u = `${this.endpoint}/v1/${name}:generateAccessToken`; + const body = { + delegates: this.delegates, + scope: this.targetScopes, + lifetime: this.lifetime + 's', + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + const tokenResponse = res.data; + this.credentials.access_token = tokenResponse.accessToken; + this.credentials.expiry_date = Date.parse(tokenResponse.expireTime); + return { + tokens: this.credentials, + res, + }; } - } - }()); - } -}; - -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); - } - - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - - // Clean up - this._requestBodyBuffers = []; - return; - } - - // The response is a redirect, so abort the current request - destroyRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - throw new TooManyRedirectsError(); - } - - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); - } - - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + catch (error) { + if (!(error instanceof Error)) + throw error; + let status = 0; + let message = ''; + if (error instanceof gaxios_1.GaxiosError) { + status = (_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.status; + message = (_f = (_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.message; + } + if (status && message) { + error.message = `${status}: unable to impersonate: ${message}`; + throw error; + } + else { + error.message = `unable to impersonate: ${error}`; + throw error; + } + } + } + /** + * Generates an OpenID Connect ID token for a service account. + * + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/generateIdToken Reference Documentation} + * + * @param targetAudience the audience for the fetched ID token. + * @param options the for the request + * @return an OpenID Connect ID token + */ + async fetchIdToken(targetAudience, options) { + var _a, _b; + await this.sourceClient.getAccessToken(); + const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; + const u = `${this.endpoint}/v1/${name}:generateIdToken`; + const body = { + delegates: this.delegates, + audience: targetAudience, + includeEmail: (_a = options === null || options === void 0 ? void 0 : options.includeEmail) !== null && _a !== void 0 ? _a : true, + useEmailAzp: (_b = options === null || options === void 0 ? void 0 : options.includeEmail) !== null && _b !== void 0 ? _b : true, + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + return res.data.token; + } +} +exports.Impersonated = Impersonated; - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = parseUrl(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); - // Create the redirected request - var redirectUrl = resolveUrl(location, currentUrl); - debug("redirecting to", redirectUrl.href); - this._isRedirect = true; - spreadUrlObject(redirectUrl, this._options); +/***/ }), - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrl.protocol !== currentUrlParts.protocol && - redirectUrl.protocol !== "https:" || - redirectUrl.host !== currentHost && - !isSubdomain(redirectUrl.host, currentHost)) { - removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); - } +/***/ 68740: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Evaluate the beforeRedirect callback - if (isFunction(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; - beforeRedirect(this._options, responseDetails, requestDetails); - this._sanitizeOptions(this._options); - } +"use strict"; - // Perform the redirected request - this._performRequest(); +// Copyright 2015 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.JWTAccess = void 0; +const jws = __nccwpck_require__(4636); +const util_1 = __nccwpck_require__(68905); +const DEFAULT_HEADER = { + alg: 'RS256', + typ: 'JWT', }; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters, ensuring that input is an object - if (isURL(input)) { - input = spreadUrlObject(input); - } - else if (isString(input)) { - input = spreadUrlObject(parseUrl(input)); - } - else { - callback = options; - options = validateUrl(input); - input = { protocol: protocol }; - } - if (isFunction(options)) { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString(options.host) && !isString(options.hostname)) { - options.hostname = "::1"; - } - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); +class JWTAccess { + /** + * JWTAccess service account credentials. + * + * Create a new access token by using the credential to create a new JWT token + * that's recognized as the access token. + * + * @param email the service account email address. + * @param key the private key that will be used to sign the token. + * @param keyId the ID of the private key used to sign the token. + */ + constructor(email, key, keyId, eagerRefreshThresholdMillis) { + this.cache = new util_1.LRUCache({ + capacity: 500, + maxAge: 60 * 60 * 1000, + }); + this.email = email; + this.key = key; + this.keyId = keyId; + this.eagerRefreshThresholdMillis = + eagerRefreshThresholdMillis !== null && eagerRefreshThresholdMillis !== void 0 ? eagerRefreshThresholdMillis : 5 * 60 * 1000; + } + /** + * Ensures that we're caching a key appropriately, giving precedence to scopes vs. url + * + * @param url The URI being authorized. + * @param scopes The scope or scopes being authorized + * @returns A string that returns the cached key. + */ + getCachedKey(url, scopes) { + let cacheKey = url; + if (scopes && Array.isArray(scopes) && scopes.length) { + cacheKey = url ? `${url}_${scopes.join('_')}` : `${scopes.join('_')}`; + } + else if (typeof scopes === 'string') { + cacheKey = url ? `${url}_${scopes}` : scopes; + } + if (!cacheKey) { + throw Error('Scopes or url must be provided'); + } + return cacheKey; + } + /** + * Get a non-expired access token, after refreshing if necessary. + * + * @param url The URI being authorized. + * @param additionalClaims An object with a set of additional claims to + * include in the payload. + * @returns An object that includes the authorization header. + */ + getRequestHeaders(url, additionalClaims, scopes) { + // Return cached authorization headers, unless we are within + // eagerRefreshThresholdMillis ms of them expiring: + const key = this.getCachedKey(url, scopes); + const cachedToken = this.cache.get(key); + const now = Date.now(); + if (cachedToken && + cachedToken.expiration - now > this.eagerRefreshThresholdMillis) { + return cachedToken.headers; + } + const iat = Math.floor(Date.now() / 1000); + const exp = JWTAccess.getExpirationTime(iat); + let defaultClaims; + // Turn scopes into space-separated string + if (Array.isArray(scopes)) { + scopes = scopes.join(' '); + } + // If scopes are specified, sign with scopes + if (scopes) { + defaultClaims = { + iss: this.email, + sub: this.email, + scope: scopes, + exp, + iat, + }; + } + else { + defaultClaims = { + iss: this.email, + sub: this.email, + aud: url, + exp, + iat, + }; + } + // if additionalClaims are provided, ensure they do not collide with + // other required claims. + if (additionalClaims) { + for (const claim in defaultClaims) { + if (additionalClaims[claim]) { + throw new Error(`The '${claim}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`); + } + } + } + const header = this.keyId + ? { ...DEFAULT_HEADER, kid: this.keyId } + : DEFAULT_HEADER; + const payload = Object.assign(defaultClaims, additionalClaims); + // Sign the jwt and add it to the cache + const signedJWT = jws.sign({ header, payload, secret: this.key }); + const headers = { Authorization: `Bearer ${signedJWT}` }; + this.cache.set(key, { + expiration: exp * 1000, + headers, + }); + return headers; } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; + /** + * Returns an expiration time for the JWT token. + * + * @param iat The issued at time for the JWT. + * @returns An expiration time for the JWT. + */ + static getExpirationTime(iat) { + const exp = iat + 3600; // 3600 seconds = 1 hour + return exp; } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; -} - -function noop() { /* empty */ } - -function parseUrl(input) { - var parsed; - /* istanbul ignore else */ - if (useNativeURL) { - parsed = new URL(input); - } - else { - // Ensure the URL is valid and absolute - parsed = validateUrl(url.parse(input)); - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); + /** + * Create a JWTAccess credentials instance using the given input options. + * @param json The input object. + */ + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the service account auth settings.'); + } + if (!json.client_email) { + throw new Error('The incoming JSON object does not contain a client_email field'); + } + if (!json.private_key) { + throw new Error('The incoming JSON object does not contain a private_key field'); + } + // Extract the relevant information from the json key file. + this.email = json.client_email; + this.key = json.private_key; + this.keyId = json.private_key_id; + this.projectId = json.project_id; } - } - return parsed; -} - -function resolveUrl(relative, base) { - /* istanbul ignore next */ - return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); -} - -function validateUrl(input) { - if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { - throw new InvalidUrlError({ input: input.href || input }); - } - if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { - throw new InvalidUrlError({ input: input.href || input }); - } - return input; -} - -function spreadUrlObject(urlObject, target) { - var spread = target || {}; - for (var key of preservedUrlFields) { - spread[key] = urlObject[key]; - } - - // Fix IPv6 hostname - if (spread.hostname.startsWith("[")) { - spread.hostname = spread.hostname.slice(1, -1); - } - // Ensure port is a number - if (spread.port !== "") { - spread.port = Number(spread.port); - } - // Concatenate path - spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; - - return spread; -} - -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + reject(new Error('Must pass in a stream containing the service account auth settings.')); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('data', chunk => (s += chunk)) + .on('error', reject) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + resolve(); + } + catch (err) { + reject(err); + } + }); + }); } - } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} - -function createErrorType(code, message, baseClass) { - // Create constructor - function CustomError(properties) { - Error.captureStackTrace(this, this.constructor); - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; - } - - // Attach constructor and set default properties - CustomError.prototype = new (baseClass || Error)(); - Object.defineProperties(CustomError.prototype, { - constructor: { - value: CustomError, - enumerable: false, - }, - name: { - value: "Error [" + code + "]", - enumerable: false, - }, - }); - return CustomError; -} - -function destroyRequest(request, error) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); - } - request.on("error", noop); - request.destroy(error); } +exports.JWTAccess = JWTAccess; -function isSubdomain(subdomain, domain) { - assert(isString(subdomain) && isString(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} -function isString(value) { - return typeof value === "string" || value instanceof String; -} +/***/ }), -function isFunction(value) { - return typeof value === "function"; -} +/***/ 13959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function isBuffer(value) { - return typeof value === "object" && ("length" in value); -} +"use strict"; -function isURL(value) { - return URL && value instanceof URL; +// Copyright 2013 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.JWT = void 0; +const gtoken_1 = __nccwpck_require__(76031); +const jwtaccess_1 = __nccwpck_require__(68740); +const oauth2client_1 = __nccwpck_require__(3936); +const authclient_1 = __nccwpck_require__(44627); +class JWT extends oauth2client_1.OAuth2Client { + constructor(optionsOrEmail, keyFile, key, scopes, subject, keyId) { + const opts = optionsOrEmail && typeof optionsOrEmail === 'object' + ? optionsOrEmail + : { email: optionsOrEmail, keyFile, key, keyId, scopes, subject }; + super(opts); + this.email = opts.email; + this.keyFile = opts.keyFile; + this.key = opts.key; + this.keyId = opts.keyId; + this.scopes = opts.scopes; + this.subject = opts.subject; + this.additionalClaims = opts.additionalClaims; + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { refresh_token: 'jwt-placeholder', expiry_date: 1 }; + } + /** + * Creates a copy of the credential with the specified scopes. + * @param scopes List of requested scopes or a single scope. + * @return The cloned instance. + */ + createScoped(scopes) { + const jwt = new JWT(this); + jwt.scopes = scopes; + return jwt; + } + /** + * Obtains the metadata to be sent with the request. + * + * @param url the URI being authorized. + */ + async getRequestMetadataAsync(url) { + url = this.defaultServicePath ? `https://${this.defaultServicePath}/` : url; + const useSelfSignedJWT = (!this.hasUserScopes() && url) || + (this.useJWTAccessWithScope && this.hasAnyScopes()) || + this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; + if (this.subject && this.universeDomain !== authclient_1.DEFAULT_UNIVERSE) { + throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${authclient_1.DEFAULT_UNIVERSE}`); + } + if (!this.apiKey && useSelfSignedJWT) { + if (this.additionalClaims && + this.additionalClaims.target_audience) { + const { tokens } = await this.refreshToken(); + return { + headers: this.addSharedMetadataHeaders({ + Authorization: `Bearer ${tokens.id_token}`, + }), + }; + } + else { + // no scopes have been set, but a uri has been provided. Use JWTAccess + // credentials. + if (!this.access) { + this.access = new jwtaccess_1.JWTAccess(this.email, this.key, this.keyId, this.eagerRefreshThresholdMillis); + } + let scopes; + if (this.hasUserScopes()) { + scopes = this.scopes; + } + else if (!url) { + scopes = this.defaultScopes; + } + const useScopes = this.useJWTAccessWithScope || + this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; + const headers = await this.access.getRequestHeaders(url !== null && url !== void 0 ? url : undefined, this.additionalClaims, + // Scopes take precedent over audience for signing, + // so we only provide them if `useJWTAccessWithScope` is on or + // if we are in a non-default universe + useScopes ? scopes : undefined); + return { headers: this.addSharedMetadataHeaders(headers) }; + } + } + else if (this.hasAnyScopes() || this.apiKey) { + return super.getRequestMetadataAsync(url); + } + else { + // If no audience, apiKey, or scopes are provided, we should not attempt + // to populate any headers: + return { headers: {} }; + } + } + /** + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. + */ + async fetchIdToken(targetAudience) { + // Create a new gToken for fetching an ID token + const gtoken = new gtoken_1.GoogleToken({ + iss: this.email, + sub: this.subject, + scope: this.scopes || this.defaultScopes, + keyFile: this.keyFile, + key: this.key, + additionalClaims: { target_audience: targetAudience }, + transporter: this.transporter, + }); + await gtoken.getToken({ + forceRefresh: true, + }); + if (!gtoken.idToken) { + throw new Error('Unknown error: Failed to fetch ID token'); + } + return gtoken.idToken; + } + /** + * Determine if there are currently scopes available. + */ + hasUserScopes() { + if (!this.scopes) { + return false; + } + return this.scopes.length > 0; + } + /** + * Are there any default or user scopes defined. + */ + hasAnyScopes() { + if (this.scopes && this.scopes.length > 0) + return true; + if (this.defaultScopes && this.defaultScopes.length > 0) + return true; + return false; + } + authorize(callback) { + if (callback) { + this.authorizeAsync().then(r => callback(null, r), callback); + } + else { + return this.authorizeAsync(); + } + } + async authorizeAsync() { + const result = await this.refreshToken(); + if (!result) { + throw new Error('No result returned'); + } + this.credentials = result.tokens; + this.credentials.refresh_token = 'jwt-placeholder'; + this.key = this.gtoken.key; + this.email = this.gtoken.iss; + return result.tokens; + } + /** + * Refreshes the access token. + * @param refreshToken ignored + * @private + */ + async refreshTokenNoCache( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + refreshToken) { + const gtoken = this.createGToken(); + const token = await gtoken.getToken({ + forceRefresh: this.isTokenExpiring(), + }); + const tokens = { + access_token: token.access_token, + token_type: 'Bearer', + expiry_date: gtoken.expiresAt, + id_token: gtoken.idToken, + }; + this.emit('tokens', tokens); + return { res: null, tokens }; + } + /** + * Create a gToken if it doesn't already exist. + */ + createGToken() { + if (!this.gtoken) { + this.gtoken = new gtoken_1.GoogleToken({ + iss: this.email, + sub: this.subject, + scope: this.scopes || this.defaultScopes, + keyFile: this.keyFile, + key: this.key, + additionalClaims: this.additionalClaims, + transporter: this.transporter, + }); + } + return this.gtoken; + } + /** + * Create a JWT credentials instance using the given input options. + * @param json The input object. + * + * @remarks + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. + */ + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the service account auth settings.'); + } + if (!json.client_email) { + throw new Error('The incoming JSON object does not contain a client_email field'); + } + if (!json.private_key) { + throw new Error('The incoming JSON object does not contain a private_key field'); + } + // Extract the relevant information from the json key file. + this.email = json.client_email; + this.key = json.private_key; + this.keyId = json.private_key_id; + this.projectId = json.project_id; + this.quotaProjectId = json.quota_project_id; + this.universeDomain = json.universe_domain || this.universeDomain; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + throw new Error('Must pass in a stream containing the service account auth settings.'); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => (s += chunk)) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + resolve(); + } + catch (e) { + reject(e); + } + }); + }); + } + /** + * Creates a JWT credentials instance using an API Key for authentication. + * @param apiKey The API Key in string form. + */ + fromAPIKey(apiKey) { + if (typeof apiKey !== 'string') { + throw new Error('Must provide an API Key string.'); + } + this.apiKey = apiKey; + } + /** + * Using the key or keyFile on the JWT client, obtain an object that contains + * the key and the client email. + */ + async getCredentials() { + if (this.key) { + return { private_key: this.key, client_email: this.email }; + } + else if (this.keyFile) { + const gtoken = this.createGToken(); + const creds = await gtoken.getCredentials(this.keyFile); + return { private_key: creds.privateKey, client_email: creds.clientEmail }; + } + throw new Error('A key or a keyFile must be provided to getCredentials.'); + } } - -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; +exports.JWT = JWT; /***/ }), -/***/ 66129: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 74524: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright 2018 Google LLC +// Copyright 2014 Google LLC +// // 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 +// 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. -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultErrorRedactor = exports.GaxiosError = exports.GAXIOS_ERROR_SYMBOL = void 0; -const url_1 = __nccwpck_require__(57310); -const util_1 = __nccwpck_require__(21980); -const extend_1 = __importDefault(__nccwpck_require__(38171)); -/** - * Support `instanceof` operator for `GaxiosError`s in different versions of this library. - * - * @see {@link GaxiosError[Symbol.hasInstance]} - */ -exports.GAXIOS_ERROR_SYMBOL = Symbol.for(`${util_1.pkg.name}-gaxios-error`); -/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ -class GaxiosError extends Error { +exports.LoginTicket = void 0; +class LoginTicket { /** - * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. + * Create a simple class to extract user ID from an ID Token * - * @see {@link GAXIOS_ERROR_SYMBOL} - * @see {@link GaxiosError[GAXIOS_ERROR_SYMBOL]} + * @param {string} env Envelope of the jwt + * @param {TokenPayload} pay Payload of the jwt + * @constructor */ - static [(_a = exports.GAXIOS_ERROR_SYMBOL, Symbol.hasInstance)](instance) { - if (instance && - typeof instance === 'object' && - exports.GAXIOS_ERROR_SYMBOL in instance && - instance[exports.GAXIOS_ERROR_SYMBOL] === util_1.pkg.version) { - return true; - } - // fallback to native - return Function.prototype[Symbol.hasInstance].call(GaxiosError, instance); - } - constructor(message, config, response, error) { - var _b; - super(message); - this.config = config; - this.response = response; - this.error = error; - /** - * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. - * - * @see {@link GAXIOS_ERROR_SYMBOL} - * @see {@link GaxiosError[Symbol.hasInstance]} - * @see {@link https://github.com/microsoft/TypeScript/issues/13965#issuecomment-278570200} - * @see {@link https://stackoverflow.com/questions/46618852/require-and-instanceof} - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance#reverting_to_default_instanceof_behavior} - */ - this[_a] = util_1.pkg.version; - // deep-copy config as we do not want to mutate - // the existing config for future retries/use - this.config = (0, extend_1.default)(true, {}, config); - if (this.response) { - this.response.config = (0, extend_1.default)(true, {}, this.response.config); - } - if (this.response) { - try { - this.response.data = translateData(this.config.responseType, (_b = this.response) === null || _b === void 0 ? void 0 : _b.data); - } - catch (_c) { - // best effort - don't throw an error within an error - // we could set `this.response.config.responseType = 'unknown'`, but - // that would mutate future calls with this config object. - } - this.status = this.response.status; - } - if (error && 'code' in error && error.code) { - this.code = error.code; - } - if (config.errorRedactor) { - config.errorRedactor({ - config: this.config, - response: this.response, - }); - } - } -} -exports.GaxiosError = GaxiosError; -function translateData(responseType, data) { - switch (responseType) { - case 'stream': - return data; - case 'json': - return JSON.parse(JSON.stringify(data)); - case 'arraybuffer': - return JSON.parse(Buffer.from(data).toString('utf8')); - case 'blob': - return JSON.parse(data.text()); - default: - return data; - } -} -/** - * An experimental error redactor. - * - * @param config Config to potentially redact properties of - * @param response Config to potentially redact properties of - * - * @experimental - */ -function defaultErrorRedactor(data) { - const REDACT = '< - See `errorRedactor` option in `gaxios` for configuration>.'; - function redactHeaders(headers) { - if (!headers) - return; - for (const key of Object.keys(headers)) { - // any casing of `Authentication` - if (/^authentication$/i.test(key)) { - headers[key] = REDACT; - } - // any casing of `Authorization` - if (/^authorization$/i.test(key)) { - headers[key] = REDACT; - } - // anything containing secret, such as 'client secret' - if (/secret/i.test(key)) { - headers[key] = REDACT; - } - } + constructor(env, pay) { + this.envelope = env; + this.payload = pay; } - function redactString(obj, key) { - if (typeof obj === 'object' && - obj !== null && - typeof obj[key] === 'string') { - const text = obj[key]; - if (/grant_type=/i.test(text) || - /assertion=/i.test(text) || - /secret/i.test(text)) { - obj[key] = REDACT; - } - } + getEnvelope() { + return this.envelope; } - function redactObject(obj) { - if (typeof obj === 'object' && obj !== null) { - if ('grant_type' in obj) { - obj['grant_type'] = REDACT; - } - if ('assertion' in obj) { - obj['assertion'] = REDACT; - } - if ('client_secret' in obj) { - obj['client_secret'] = REDACT; - } - } + getPayload() { + return this.payload; } - if (data.config) { - redactHeaders(data.config.headers); - redactString(data.config, 'data'); - redactObject(data.config.data); - redactString(data.config, 'body'); - redactObject(data.config.body); - try { - const url = new url_1.URL('', data.config.url); - if (url.searchParams.has('token')) { - url.searchParams.set('token', REDACT); - } - if (url.searchParams.has('client_secret')) { - url.searchParams.set('client_secret', REDACT); - } - data.config.url = url.toString(); - } - catch (_b) { - // ignore error - no need to parse an invalid URL + /** + * Create a simple class to extract user ID from an ID Token + * + * @return The user ID + */ + getUserId() { + const payload = this.getPayload(); + if (payload && payload.sub) { + return payload.sub; } + return null; } - if (data.response) { - defaultErrorRedactor({ config: data.response.config }); - redactHeaders(data.response.headers); - redactString(data.response, 'data'); - redactObject(data.response.data); + /** + * Returns attributes from the login ticket. This can contain + * various information about the user session. + * + * @return The envelope and payload + */ + getAttributes() { + return { envelope: this.getEnvelope(), payload: this.getPayload() }; } - return data; } -exports.defaultErrorRedactor = defaultErrorRedactor; -//# sourceMappingURL=common.js.map +exports.LoginTicket = LoginTicket; + /***/ }), -/***/ 28133: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 3936: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC +// // 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 +// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _Gaxios_instances, _a, _Gaxios_urlMayUseProxy, _Gaxios_applyRequestInterceptors, _Gaxios_applyResponseInterceptors, _Gaxios_prepareRequest, _Gaxios_proxyAgent, _Gaxios_getProxyAgent; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Gaxios = void 0; -const extend_1 = __importDefault(__nccwpck_require__(38171)); -const https_1 = __nccwpck_require__(95687); -const node_fetch_1 = __importDefault(__nccwpck_require__(80467)); -const querystring_1 = __importDefault(__nccwpck_require__(63477)); -const is_stream_1 = __importDefault(__nccwpck_require__(41554)); -const url_1 = __nccwpck_require__(57310); -const common_1 = __nccwpck_require__(66129); -const retry_1 = __nccwpck_require__(31052); -const stream_1 = __nccwpck_require__(12781); -const uuid_1 = __nccwpck_require__(19694); -const interceptor_1 = __nccwpck_require__(14309); -/* eslint-disable @typescript-eslint/no-explicit-any */ -const fetch = hasFetch() ? window.fetch : node_fetch_1.default; -function hasWindow() { - return typeof window !== 'undefined' && !!window; -} -function hasFetch() { - return hasWindow() && !!window.fetch; -} -function hasBuffer() { - return typeof Buffer !== 'undefined'; -} -function hasHeader(options, header) { - return !!getHeader(options, header); -} -function getHeader(options, header) { - header = header.toLowerCase(); - for (const key of Object.keys((options === null || options === void 0 ? void 0 : options.headers) || {})) { - if (header === key.toLowerCase()) { - return options.headers[key]; +exports.OAuth2Client = exports.ClientAuthentication = exports.CertificateFormat = exports.CodeChallengeMethod = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const querystring = __nccwpck_require__(63477); +const stream = __nccwpck_require__(12781); +const formatEcdsa = __nccwpck_require__(11728); +const crypto_1 = __nccwpck_require__(78043); +const authclient_1 = __nccwpck_require__(44627); +const loginticket_1 = __nccwpck_require__(74524); +var CodeChallengeMethod; +(function (CodeChallengeMethod) { + CodeChallengeMethod["Plain"] = "plain"; + CodeChallengeMethod["S256"] = "S256"; +})(CodeChallengeMethod || (exports.CodeChallengeMethod = CodeChallengeMethod = {})); +var CertificateFormat; +(function (CertificateFormat) { + CertificateFormat["PEM"] = "PEM"; + CertificateFormat["JWK"] = "JWK"; +})(CertificateFormat || (exports.CertificateFormat = CertificateFormat = {})); +/** + * The client authentication type. Supported values are basic, post, and none. + * https://datatracker.ietf.org/doc/html/rfc7591#section-2 + */ +var ClientAuthentication; +(function (ClientAuthentication) { + ClientAuthentication["ClientSecretPost"] = "ClientSecretPost"; + ClientAuthentication["ClientSecretBasic"] = "ClientSecretBasic"; + ClientAuthentication["None"] = "None"; +})(ClientAuthentication || (exports.ClientAuthentication = ClientAuthentication = {})); +class OAuth2Client extends authclient_1.AuthClient { + constructor(optionsOrClientId, clientSecret, redirectUri) { + const opts = optionsOrClientId && typeof optionsOrClientId === 'object' + ? optionsOrClientId + : { clientId: optionsOrClientId, clientSecret, redirectUri }; + super(opts); + this.certificateCache = {}; + this.certificateExpiry = null; + this.certificateCacheFormat = CertificateFormat.PEM; + this.refreshTokenPromises = new Map(); + this._clientId = opts.clientId; + this._clientSecret = opts.clientSecret; + this.redirectUri = opts.redirectUri; + this.endpoints = { + tokenInfoUrl: 'https://oauth2.googleapis.com/tokeninfo', + oauth2AuthBaseUrl: 'https://accounts.google.com/o/oauth2/v2/auth', + oauth2TokenUrl: 'https://oauth2.googleapis.com/token', + oauth2RevokeUrl: 'https://oauth2.googleapis.com/revoke', + oauth2FederatedSignonPemCertsUrl: 'https://www.googleapis.com/oauth2/v1/certs', + oauth2FederatedSignonJwkCertsUrl: 'https://www.googleapis.com/oauth2/v3/certs', + oauth2IapPublicKeyUrl: 'https://www.gstatic.com/iap/verify/public_key', + ...opts.endpoints, + }; + this.clientAuthentication = + opts.clientAuthentication || ClientAuthentication.ClientSecretPost; + this.issuers = opts.issuers || [ + 'accounts.google.com', + 'https://accounts.google.com', + this.universeDomain, + ]; + } + /** + * Generates URL for consent page landing. + * @param opts Options. + * @return URL to consent page. + */ + generateAuthUrl(opts = {}) { + if (opts.code_challenge_method && !opts.code_challenge) { + throw new Error('If a code_challenge_method is provided, code_challenge must be included.'); + } + opts.response_type = opts.response_type || 'code'; + opts.client_id = opts.client_id || this._clientId; + opts.redirect_uri = opts.redirect_uri || this.redirectUri; + // Allow scopes to be passed either as array or a string + if (Array.isArray(opts.scope)) { + opts.scope = opts.scope.join(' '); + } + const rootUrl = this.endpoints.oauth2AuthBaseUrl.toString(); + return (rootUrl + + '?' + + querystring.stringify(opts)); + } + generateCodeVerifier() { + // To make the code compatible with browser SubtleCrypto we need to make + // this method async. + throw new Error('generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.'); + } + /** + * Convenience method to automatically generate a code_verifier, and its + * resulting SHA256. If used, this must be paired with a S256 + * code_challenge_method. + * + * For a full example see: + * https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js + */ + async generateCodeVerifierAsync() { + // base64 encoding uses 6 bits per character, and we want to generate128 + // characters. 6*128/8 = 96. + const crypto = (0, crypto_1.createCrypto)(); + const randomString = crypto.randomBytesBase64(96); + // The valid characters in the code_verifier are [A-Z]/[a-z]/[0-9]/ + // "-"/"."/"_"/"~". Base64 encoded strings are pretty close, so we're just + // swapping out a few chars. + const codeVerifier = randomString + .replace(/\+/g, '~') + .replace(/=/g, '_') + .replace(/\//g, '-'); + // Generate the base64 encoded SHA256 + const unencodedCodeChallenge = await crypto.sha256DigestBase64(codeVerifier); + // We need to use base64UrlEncoding instead of standard base64 + const codeChallenge = unencodedCodeChallenge + .split('=')[0] + .replace(/\+/g, '-') + .replace(/\//g, '_'); + return { codeVerifier, codeChallenge }; + } + getToken(codeOrOptions, callback) { + const options = typeof codeOrOptions === 'string' ? { code: codeOrOptions } : codeOrOptions; + if (callback) { + this.getTokenAsync(options).then(r => callback(null, r.tokens, r.res), e => callback(e, null, e.response)); + } + else { + return this.getTokenAsync(options); + } + } + async getTokenAsync(options) { + const url = this.endpoints.oauth2TokenUrl.toString(); + const headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + }; + const values = { + client_id: options.client_id || this._clientId, + code_verifier: options.codeVerifier, + code: options.code, + grant_type: 'authorization_code', + redirect_uri: options.redirect_uri || this.redirectUri, + }; + if (this.clientAuthentication === ClientAuthentication.ClientSecretBasic) { + const basic = Buffer.from(`${this._clientId}:${this._clientSecret}`); + headers['Authorization'] = `Basic ${basic.toString('base64')}`; + } + if (this.clientAuthentication === ClientAuthentication.ClientSecretPost) { + values.client_secret = this._clientSecret; + } + const res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + url, + data: querystring.stringify(values), + headers, + }); + const tokens = res.data; + if (res.data && res.data.expires_in) { + tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res }; + } + /** + * Refreshes the access token. + * @param refresh_token Existing refresh token. + * @private + */ + async refreshToken(refreshToken) { + if (!refreshToken) { + return this.refreshTokenNoCache(refreshToken); + } + // If a request to refresh using the same token has started, + // return the same promise. + if (this.refreshTokenPromises.has(refreshToken)) { + return this.refreshTokenPromises.get(refreshToken); + } + const p = this.refreshTokenNoCache(refreshToken).then(r => { + this.refreshTokenPromises.delete(refreshToken); + return r; + }, e => { + this.refreshTokenPromises.delete(refreshToken); + throw e; + }); + this.refreshTokenPromises.set(refreshToken, p); + return p; + } + async refreshTokenNoCache(refreshToken) { + var _a; + if (!refreshToken) { + throw new Error('No refresh token is set.'); + } + const url = this.endpoints.oauth2TokenUrl.toString(); + const data = { + refresh_token: refreshToken, + client_id: this._clientId, + client_secret: this._clientSecret, + grant_type: 'refresh_token', + }; + let res; + try { + // request for new token + res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + url, + data: querystring.stringify(data), + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + }); + } + catch (e) { + if (e instanceof gaxios_1.GaxiosError && + e.message === 'invalid_grant' && + ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) && + /ReAuth/i.test(e.response.data.error_description)) { + e.message = JSON.stringify(e.response.data); + } + throw e; + } + const tokens = res.data; + // TODO: de-duplicate this code from a few spots + if (res.data && res.data.expires_in) { + tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res }; + } + refreshAccessToken(callback) { + if (callback) { + this.refreshAccessTokenAsync().then(r => callback(null, r.credentials, r.res), callback); + } + else { + return this.refreshAccessTokenAsync(); + } + } + async refreshAccessTokenAsync() { + const r = await this.refreshToken(this.credentials.refresh_token); + const tokens = r.tokens; + tokens.refresh_token = this.credentials.refresh_token; + this.credentials = tokens; + return { credentials: this.credentials, res: r.res }; + } + getAccessToken(callback) { + if (callback) { + this.getAccessTokenAsync().then(r => callback(null, r.token, r.res), callback); + } + else { + return this.getAccessTokenAsync(); + } + } + async getAccessTokenAsync() { + const shouldRefresh = !this.credentials.access_token || this.isTokenExpiring(); + if (shouldRefresh) { + if (!this.credentials.refresh_token) { + if (this.refreshHandler) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { + this.setCredentials(refreshedAccessToken); + return { token: this.credentials.access_token }; + } + } + else { + throw new Error('No refresh token or refresh handler callback is set.'); + } + } + const r = await this.refreshAccessTokenAsync(); + if (!r.credentials || (r.credentials && !r.credentials.access_token)) { + throw new Error('Could not refresh access token.'); + } + return { token: r.credentials.access_token, res: r.res }; + } + else { + return { token: this.credentials.access_token }; } } - return undefined; -} -class Gaxios { /** - * The Gaxios class is responsible for making HTTP requests. - * @param defaults The default set of options to be used for this instance. + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * In OAuth2Client, the result has the form: + * { Authorization: 'Bearer ' } + * @param url The optional url being authorized */ - constructor(defaults) { - _Gaxios_instances.add(this); - this.agentCache = new Map(); - this.defaults = defaults || {}; - this.interceptors = { - request: new interceptor_1.GaxiosInterceptorManager(), - response: new interceptor_1.GaxiosInterceptorManager(), + async getRequestHeaders(url) { + const headers = (await this.getRequestMetadataAsync(url)).headers; + return headers; + } + async getRequestMetadataAsync( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + url) { + const thisCreds = this.credentials; + if (!thisCreds.access_token && + !thisCreds.refresh_token && + !this.apiKey && + !this.refreshHandler) { + throw new Error('No access, refresh token, API key or refresh handler callback is set.'); + } + if (thisCreds.access_token && !this.isTokenExpiring()) { + thisCreds.token_type = thisCreds.token_type || 'Bearer'; + const headers = { + Authorization: thisCreds.token_type + ' ' + thisCreds.access_token, + }; + return { headers: this.addSharedMetadataHeaders(headers) }; + } + // If refreshHandler exists, call processAndValidateRefreshHandler(). + if (this.refreshHandler) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { + this.setCredentials(refreshedAccessToken); + const headers = { + Authorization: 'Bearer ' + this.credentials.access_token, + }; + return { headers: this.addSharedMetadataHeaders(headers) }; + } + } + if (this.apiKey) { + return { headers: { 'X-Goog-Api-Key': this.apiKey } }; + } + let r = null; + let tokens = null; + try { + r = await this.refreshToken(thisCreds.refresh_token); + tokens = r.tokens; + } + catch (err) { + const e = err; + if (e.response && + (e.response.status === 403 || e.response.status === 404)) { + e.message = `Could not refresh access token: ${e.message}`; + } + throw e; + } + const credentials = this.credentials; + credentials.token_type = credentials.token_type || 'Bearer'; + tokens.refresh_token = credentials.refresh_token; + this.credentials = tokens; + const headers = { + Authorization: credentials.token_type + ' ' + tokens.access_token, }; + return { headers: this.addSharedMetadataHeaders(headers), res: r.res }; } /** - * Perform an HTTP request with the given options. - * @param opts Set of HTTP options that will be used for this HTTP request. + * Generates an URL to revoke the given token. + * @param token The existing token to be revoked. + * + * @deprecated use instance method {@link OAuth2Client.getRevokeTokenURL} */ - async request(opts = {}) { - opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_prepareRequest).call(this, opts); - opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyRequestInterceptors).call(this, opts); - return __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyResponseInterceptors).call(this, this._request(opts)); - } - async _defaultAdapter(opts) { - const fetchImpl = opts.fetchImplementation || fetch; - const res = (await fetchImpl(opts.url, opts)); - const data = await this.getResponseData(opts, res); - return this.translateResponse(opts, res, data); + static getRevokeTokenUrl(token) { + return new OAuth2Client().getRevokeTokenURL(token).toString(); } /** - * Internal, retryable version of the `request` method. - * @param opts Set of HTTP options that will be used for this HTTP request. + * Generates a URL to revoke the given token. + * + * @param token The existing token to be revoked. */ - async _request(opts = {}) { - var _b; + getRevokeTokenURL(token) { + const url = new URL(this.endpoints.oauth2RevokeUrl); + url.searchParams.append('token', token); + return url; + } + revokeToken(token, callback) { + const opts = { + ...OAuth2Client.RETRY_CONFIG, + url: this.getRevokeTokenURL(token).toString(), + method: 'POST', + }; + if (callback) { + this.transporter + .request(opts) + .then(r => callback(null, r), callback); + } + else { + return this.transporter.request(opts); + } + } + revokeCredentials(callback) { + if (callback) { + this.revokeCredentialsAsync().then(res => callback(null, res), callback); + } + else { + return this.revokeCredentialsAsync(); + } + } + async revokeCredentialsAsync() { + const token = this.credentials.access_token; + this.credentials = {}; + if (token) { + return this.revokeToken(token); + } + else { + throw new Error('No access token to revoke.'); + } + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + async requestAsync(opts, reAuthRetried = false) { + let r2; try { - let translatedResponse; - if (opts.adapter) { - translatedResponse = await opts.adapter(opts, this._defaultAdapter.bind(this)); + const r = await this.getRequestMetadataAsync(opts.url); + opts.headers = opts.headers || {}; + if (r.headers && r.headers['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = r.headers['x-goog-user-project']; } - else { - translatedResponse = await this._defaultAdapter(opts); + if (r.headers && r.headers.Authorization) { + opts.headers.Authorization = r.headers.Authorization; } - if (!opts.validateStatus(translatedResponse.status)) { - if (opts.responseType === 'stream') { - let response = ''; - await new Promise(resolve => { - (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('data', chunk => { - response += chunk; - }); - (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('end', resolve); - }); - translatedResponse.data = response; - } - throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse); + if (this.apiKey) { + opts.headers['X-Goog-Api-Key'] = this.apiKey; } - return translatedResponse; + r2 = await this.transporter.request(opts); } catch (e) { - const err = e instanceof common_1.GaxiosError - ? e - : new common_1.GaxiosError(e.message, opts, undefined, e); - const { shouldRetry, config } = await (0, retry_1.getRetryConfig)(err); - if (shouldRetry && config) { - err.config.retryConfig.currentRetryAttempt = - config.retryConfig.currentRetryAttempt; - // The error's config could be redacted - therefore we only want to - // copy the retry state over to the existing config - opts.retryConfig = (_b = err.config) === null || _b === void 0 ? void 0 : _b.retryConfig; - return this._request(opts); - } - throw err; - } - } - async getResponseData(opts, res) { - switch (opts.responseType) { - case 'stream': - return res.body; - case 'json': { - let data = await res.text(); - try { - data = JSON.parse(data); + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - An access_token and refresh_token were available, but either no + // expiry_date was available or the forceRefreshOnFailure flag is set. + // The absent expiry_date case can happen when developers stash the + // access_token and refresh_token for later use, but the access_token + // fails on the first try because it's expired. Some developers may + // choose to enable forceRefreshOnFailure to mitigate time-related + // errors. + // Or the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - No refresh_token was available + // - An access_token and a refreshHandler callback were available, but + // either no expiry_date was available or the forceRefreshOnFailure + // flag is set. The access_token fails on the first try because it's + // expired. Some developers may choose to enable forceRefreshOnFailure + // to mitigate time-related errors. + const mayRequireRefresh = this.credentials && + this.credentials.access_token && + this.credentials.refresh_token && + (!this.credentials.expiry_date || this.forceRefreshOnFailure); + const mayRequireRefreshWithNoRefreshToken = this.credentials && + this.credentials.access_token && + !this.credentials.refresh_token && + (!this.credentials.expiry_date || this.forceRefreshOnFailure) && + this.refreshHandler; + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + mayRequireRefresh) { + await this.refreshAccessTokenAsync(); + return this.requestAsync(opts, true); } - catch (_b) { - // continue + else if (!reAuthRetried && + isAuthErr && + !isReadableStream && + mayRequireRefreshWithNoRefreshToken) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { + this.setCredentials(refreshedAccessToken); + } + return this.requestAsync(opts, true); } - return data; } - case 'arraybuffer': - return res.arrayBuffer(); - case 'blob': - return res.blob(); - case 'text': - return res.text(); - default: - return this.getResponseDataFromContentType(res); + throw e; } + return r2; } - /** - * By default, throw for any non-2xx status code - * @param status status code from the HTTP response - */ - validateStatus(status) { - return status >= 200 && status < 300; + verifyIdToken(options, callback) { + // This function used to accept two arguments instead of an options object. + // Check the types to help users upgrade with less pain. + // This check can be removed after a 2.0 release. + if (callback && typeof callback !== 'function') { + throw new Error('This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.'); + } + if (callback) { + this.verifyIdTokenAsync(options).then(r => callback(null, r), callback); + } + else { + return this.verifyIdTokenAsync(options); + } + } + async verifyIdTokenAsync(options) { + if (!options.idToken) { + throw new Error('The verifyIdToken method requires an ID Token'); + } + const response = await this.getFederatedSignonCertsAsync(); + const login = await this.verifySignedJwtWithCertsAsync(options.idToken, response.certs, options.audience, this.issuers, options.maxExpiry); + return login; } /** - * Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo) - * @param params key value pars to encode + * Obtains information about the provisioned access token. Especially useful + * if you want to check the scopes that were provisioned to a given token. + * + * @param accessToken Required. The Access Token for which you want to get + * user info. */ - paramsSerializer(params) { - return querystring_1.default.stringify(params); - } - translateResponse(opts, res, data) { - // headers need to be converted from a map to an obj - const headers = {}; - res.headers.forEach((value, key) => { - headers[key] = value; - }); - return { - config: opts, - data: data, - headers, - status: res.status, - statusText: res.statusText, - // XMLHttpRequestLike - request: { - responseURL: res.url, + async getTokenInfo(accessToken) { + const { data } = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + Authorization: `Bearer ${accessToken}`, }, - }; + url: this.endpoints.tokenInfoUrl.toString(), + }); + const info = Object.assign({ + expiry_date: new Date().getTime() + data.expires_in * 1000, + scopes: data.scope.split(' '), + }, data); + delete info.expires_in; + delete info.scope; + return info; } - /** - * Attempts to parse a response by looking at the Content-Type header. - * @param {FetchResponse} response the HTTP response. - * @returns {Promise} a promise that resolves to the response data. - */ - async getResponseDataFromContentType(response) { - let contentType = response.headers.get('Content-Type'); - if (contentType === null) { - // Maintain existing functionality by calling text() - return response.text(); + getFederatedSignonCerts(callback) { + if (callback) { + this.getFederatedSignonCertsAsync().then(r => callback(null, r.certs, r.res), callback); } - contentType = contentType.toLowerCase(); - if (contentType.includes('application/json')) { - let data = await response.text(); - try { - data = JSON.parse(data); + else { + return this.getFederatedSignonCertsAsync(); + } + } + async getFederatedSignonCertsAsync() { + const nowTime = new Date().getTime(); + const format = (0, crypto_1.hasBrowserCrypto)() + ? CertificateFormat.JWK + : CertificateFormat.PEM; + if (this.certificateExpiry && + nowTime < this.certificateExpiry.getTime() && + this.certificateCacheFormat === format) { + return { certs: this.certificateCache, format }; + } + let res; + let url; + switch (format) { + case CertificateFormat.PEM: + url = this.endpoints.oauth2FederatedSignonPemCertsUrl.toString(); + break; + case CertificateFormat.JWK: + url = this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString(); + break; + default: + throw new Error(`Unsupported certificate format ${format}`); + } + try { + res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + url, + }); + } + catch (e) { + if (e instanceof Error) { + e.message = `Failed to retrieve verification certificates: ${e.message}`; } - catch (_b) { - // continue + throw e; + } + const cacheControl = res ? res.headers['cache-control'] : undefined; + let cacheAge = -1; + if (cacheControl) { + const pattern = new RegExp('max-age=([0-9]*)'); + const regexResult = pattern.exec(cacheControl); + if (regexResult && regexResult.length === 2) { + // Cache results with max-age (in seconds) + cacheAge = Number(regexResult[1]) * 1000; // milliseconds } - return data; } - else if (contentType.match(/^text\//)) { - return response.text(); + let certificates = {}; + switch (format) { + case CertificateFormat.PEM: + certificates = res.data; + break; + case CertificateFormat.JWK: + for (const key of res.data.keys) { + certificates[key.kid] = key; + } + break; + default: + throw new Error(`Unsupported certificate format ${format}`); + } + const now = new Date(); + this.certificateExpiry = + cacheAge === -1 ? null : new Date(now.getTime() + cacheAge); + this.certificateCache = certificates; + this.certificateCacheFormat = format; + return { certs: certificates, format, res }; + } + getIapPublicKeys(callback) { + if (callback) { + this.getIapPublicKeysAsync().then(r => callback(null, r.pubkeys, r.res), callback); } else { - // If the content type is something not easily handled, just return the raw data (blob) - return response.blob(); + return this.getIapPublicKeysAsync(); + } + } + async getIapPublicKeysAsync() { + let res; + const url = this.endpoints.oauth2IapPublicKeyUrl.toString(); + try { + res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + url, + }); } + catch (e) { + if (e instanceof Error) { + e.message = `Failed to retrieve verification certificates: ${e.message}`; + } + throw e; + } + return { pubkeys: res.data, res }; + } + verifySignedJwtWithCerts() { + // To make the code compatible with browser SubtleCrypto we need to make + // this method async. + throw new Error('verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.'); } /** - * Creates an async generator that yields the pieces of a multipart/related request body. - * This implementation follows the spec: https://www.ietf.org/rfc/rfc2387.txt. However, recursive - * multipart/related requests are not currently supported. - * - * @param {GaxioMultipartOptions[]} multipartOptions the pieces to turn into a multipart/related body. - * @param {string} boundary the boundary string to be placed between each part. + * Verify the id token is signed with the correct certificate + * and is from the correct audience. + * @param jwt The jwt to verify (The ID Token in this case). + * @param certs The array of certs to test the jwt against. + * @param requiredAudience The audience to test the jwt against. + * @param issuers The allowed issuers of the jwt (Optional). + * @param maxExpiry The max expiry the certificate can be (Optional). + * @return Returns a promise resolving to LoginTicket on verification. */ - async *getMultipartRequest(multipartOptions, boundary) { - const finale = `--${boundary}--`; - for (const currentPart of multipartOptions) { - const partContentType = currentPart.headers['Content-Type'] || 'application/octet-stream'; - const preamble = `--${boundary}\r\nContent-Type: ${partContentType}\r\n\r\n`; - yield preamble; - if (typeof currentPart.content === 'string') { - yield currentPart.content; - } - else { - yield* currentPart.content; - } - yield '\r\n'; + async verifySignedJwtWithCertsAsync(jwt, certs, requiredAudience, issuers, maxExpiry) { + const crypto = (0, crypto_1.createCrypto)(); + if (!maxExpiry) { + maxExpiry = OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_; + } + const segments = jwt.split('.'); + if (segments.length !== 3) { + throw new Error('Wrong number of segments in token: ' + jwt); + } + const signed = segments[0] + '.' + segments[1]; + let signature = segments[2]; + let envelope; + let payload; + try { + envelope = JSON.parse(crypto.decodeBase64StringUtf8(segments[0])); } - yield finale; - } -} -exports.Gaxios = Gaxios; -_a = Gaxios, _Gaxios_instances = new WeakSet(), _Gaxios_urlMayUseProxy = function _Gaxios_urlMayUseProxy(url, noProxy = []) { - var _b, _c; - const candidate = new url_1.URL(url); - const noProxyList = [...noProxy]; - const noProxyEnvList = ((_c = ((_b = process.env.NO_PROXY) !== null && _b !== void 0 ? _b : process.env.no_proxy)) === null || _c === void 0 ? void 0 : _c.split(',')) || []; - for (const rule of noProxyEnvList) { - noProxyList.push(rule.trim()); - } - for (const rule of noProxyList) { - // Match regex - if (rule instanceof RegExp) { - if (rule.test(candidate.toString())) { - return false; + catch (err) { + if (err instanceof Error) { + err.message = `Can't parse token envelope: ${segments[0]}': ${err.message}`; } + throw err; } - // Match URL - else if (rule instanceof url_1.URL) { - if (rule.origin === candidate.origin) { - return false; - } + if (!envelope) { + throw new Error("Can't parse token envelope: " + segments[0]); } - // Match string regex - else if (rule.startsWith('*.') || rule.startsWith('.')) { - const cleanedRule = rule.replace(/^\*\./, '.'); - if (candidate.hostname.endsWith(cleanedRule)) { - return false; + try { + payload = JSON.parse(crypto.decodeBase64StringUtf8(segments[1])); + } + catch (err) { + if (err instanceof Error) { + err.message = `Can't parse token payload '${segments[0]}`; } + throw err; } - // Basic string match - else if (rule === candidate.origin || - rule === candidate.hostname || - rule === candidate.href) { - return false; + if (!payload) { + throw new Error("Can't parse token payload: " + segments[1]); } - } - return true; -}, _Gaxios_applyRequestInterceptors = -/** - * Applies the request interceptors. The request interceptors are applied after the - * call to prepareRequest is completed. - * - * @param {GaxiosOptions} options The current set of options. - * - * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. - */ -async function _Gaxios_applyRequestInterceptors(options) { - let promiseChain = Promise.resolve(options); - for (const interceptor of this.interceptors.request.values()) { - if (interceptor) { - promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); + if (!Object.prototype.hasOwnProperty.call(certs, envelope.kid)) { + // If this is not present, then there's no reason to attempt verification + throw new Error('No pem found for envelope: ' + JSON.stringify(envelope)); } - } - return promiseChain; -}, _Gaxios_applyResponseInterceptors = -/** - * Applies the response interceptors. The response interceptors are applied after the - * call to request is made. - * - * @param {GaxiosOptions} options The current set of options. - * - * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. - */ -async function _Gaxios_applyResponseInterceptors(response) { - let promiseChain = Promise.resolve(response); - for (const interceptor of this.interceptors.response.values()) { - if (interceptor) { - promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); + const cert = certs[envelope.kid]; + if (envelope.alg === 'ES256') { + signature = formatEcdsa.joseToDer(signature, 'ES256').toString('base64'); } - } - return promiseChain; -}, _Gaxios_prepareRequest = -/** - * Validates the options, merges them with defaults, and prepare request. - * - * @param options The original options passed from the client. - * @returns Prepared options, ready to make a request - */ -async function _Gaxios_prepareRequest(options) { - var _b, _c, _d, _e; - const opts = (0, extend_1.default)(true, {}, this.defaults, options); - if (!opts.url) { - throw new Error('URL is required.'); - } - // baseUrl has been deprecated, remove in 2.0 - const baseUrl = opts.baseUrl || opts.baseURL; - if (baseUrl) { - opts.url = baseUrl.toString() + opts.url; - } - opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer; - if (opts.params && Object.keys(opts.params).length > 0) { - let additionalQueryParams = opts.paramsSerializer(opts.params); - if (additionalQueryParams.startsWith('?')) { - additionalQueryParams = additionalQueryParams.slice(1); + const verified = await crypto.verify(cert, signed, signature); + if (!verified) { + throw new Error('Invalid token signature: ' + jwt); } - const prefix = opts.url.toString().includes('?') ? '&' : '?'; - opts.url = opts.url + prefix + additionalQueryParams; - } - if (typeof options.maxContentLength === 'number') { - opts.size = options.maxContentLength; - } - if (typeof options.maxRedirects === 'number') { - opts.follow = options.maxRedirects; - } - opts.headers = opts.headers || {}; - if (opts.multipart === undefined && opts.data) { - const isFormData = typeof FormData === 'undefined' - ? false - : (opts === null || opts === void 0 ? void 0 : opts.data) instanceof FormData; - if (is_stream_1.default.readable(opts.data)) { - opts.body = opts.data; + if (!payload.iat) { + throw new Error('No issue time in token: ' + JSON.stringify(payload)); } - else if (hasBuffer() && Buffer.isBuffer(opts.data)) { - // Do not attempt to JSON.stringify() a Buffer: - opts.body = opts.data; - if (!hasHeader(opts, 'Content-Type')) { - opts.headers['Content-Type'] = 'application/json'; - } + if (!payload.exp) { + throw new Error('No expiration time in token: ' + JSON.stringify(payload)); } - else if (typeof opts.data === 'object') { - // If www-form-urlencoded content type has been set, but data is - // provided as an object, serialize the content using querystring: - if (!isFormData) { - if (getHeader(opts, 'content-type') === - 'application/x-www-form-urlencoded') { - opts.body = opts.paramsSerializer(opts.data); - } - else { - // } else if (!(opts.data instanceof FormData)) { - if (!hasHeader(opts, 'Content-Type')) { - opts.headers['Content-Type'] = 'application/json'; - } - opts.body = JSON.stringify(opts.data); - } - } + const iat = Number(payload.iat); + if (isNaN(iat)) + throw new Error('iat field using invalid format'); + const exp = Number(payload.exp); + if (isNaN(exp)) + throw new Error('exp field using invalid format'); + const now = new Date().getTime() / 1000; + if (exp >= now + maxExpiry) { + throw new Error('Expiration time too far in future: ' + JSON.stringify(payload)); } - else { - opts.body = opts.data; + const earliest = iat - OAuth2Client.CLOCK_SKEW_SECS_; + const latest = exp + OAuth2Client.CLOCK_SKEW_SECS_; + if (now < earliest) { + throw new Error('Token used too early, ' + + now + + ' < ' + + earliest + + ': ' + + JSON.stringify(payload)); } - } - else if (opts.multipart && opts.multipart.length > 0) { - // note: once the minimum version reaches Node 16, - // this can be replaced with randomUUID() function from crypto - // and the dependency on UUID removed - const boundary = (0, uuid_1.v4)(); - opts.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; - const bodyStream = new stream_1.PassThrough(); - opts.body = bodyStream; - (0, stream_1.pipeline)(this.getMultipartRequest(opts.multipart, boundary), bodyStream, () => { }); - } - opts.validateStatus = opts.validateStatus || this.validateStatus; - opts.responseType = opts.responseType || 'unknown'; - if (!opts.headers['Accept'] && opts.responseType === 'json') { - opts.headers['Accept'] = 'application/json'; - } - opts.method = opts.method || 'GET'; - const proxy = opts.proxy || - ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.HTTPS_PROXY) || - ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.https_proxy) || - ((_d = process === null || process === void 0 ? void 0 : process.env) === null || _d === void 0 ? void 0 : _d.HTTP_PROXY) || - ((_e = process === null || process === void 0 ? void 0 : process.env) === null || _e === void 0 ? void 0 : _e.http_proxy); - const urlMayUseProxy = __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_urlMayUseProxy).call(this, opts.url, opts.noProxy); - if (opts.agent) { - // don't do any of the following options - use the user-provided agent. - } - else if (proxy && urlMayUseProxy) { - const HttpsProxyAgent = await __classPrivateFieldGet(_a, _a, "m", _Gaxios_getProxyAgent).call(_a); - if (this.agentCache.has(proxy)) { - opts.agent = this.agentCache.get(proxy); + if (now > latest) { + throw new Error('Token used too late, ' + + now + + ' > ' + + latest + + ': ' + + JSON.stringify(payload)); } - else { - opts.agent = new HttpsProxyAgent(proxy, { - cert: opts.cert, - key: opts.key, - }); - this.agentCache.set(proxy, opts.agent); + if (issuers && issuers.indexOf(payload.iss) < 0) { + throw new Error('Invalid issuer, expected one of [' + + issuers + + '], but got ' + + payload.iss); } - } - else if (opts.cert && opts.key) { - // Configure client for mTLS - if (this.agentCache.has(opts.key)) { - opts.agent = this.agentCache.get(opts.key); + // Check the audience matches if we have one + if (typeof requiredAudience !== 'undefined' && requiredAudience !== null) { + const aud = payload.aud; + let audVerified = false; + // If the requiredAudience is an array, check if it contains token + // audience + if (requiredAudience.constructor === Array) { + audVerified = requiredAudience.indexOf(aud) > -1; + } + else { + audVerified = aud === requiredAudience; + } + if (!audVerified) { + throw new Error('Wrong recipient, payload audience != requiredAudience'); + } } - else { - opts.agent = new https_1.Agent({ - cert: opts.cert, - key: opts.key, - }); - this.agentCache.set(opts.key, opts.agent); + return new loginticket_1.LoginTicket(envelope, payload); + } + /** + * Returns a promise that resolves with AccessTokenResponse type if + * refreshHandler is defined. + * If not, nothing is returned. + */ + async processAndValidateRefreshHandler() { + if (this.refreshHandler) { + const accessTokenResponse = await this.refreshHandler(); + if (!accessTokenResponse.access_token) { + throw new Error('No access token is returned by the refreshHandler callback.'); + } + return accessTokenResponse; } + return; } - if (typeof opts.errorRedactor !== 'function' && - opts.errorRedactor !== false) { - opts.errorRedactor = common_1.defaultErrorRedactor; + /** + * Returns true if a token is expired or will expire within + * eagerRefreshThresholdMillismilliseconds. + * If there is no expiry time, assumes the token is not expired or expiring. + */ + isTokenExpiring() { + const expiryDate = this.credentials.expiry_date; + return expiryDate + ? expiryDate <= new Date().getTime() + this.eagerRefreshThresholdMillis + : false; } - return opts; -}, _Gaxios_getProxyAgent = async function _Gaxios_getProxyAgent() { - __classPrivateFieldSet(this, _a, __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent) || (await Promise.resolve().then(() => __importStar(__nccwpck_require__(77219)))).HttpsProxyAgent, "f", _Gaxios_proxyAgent); - return __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent); -}; +} +exports.OAuth2Client = OAuth2Client; /** - * A cache for the lazily-loaded proxy agent. - * - * Should use {@link Gaxios[#getProxyAgent]} to retrieve. + * @deprecated use instance's {@link OAuth2Client.endpoints} */ -// using `import` to dynamically import the types here -_Gaxios_proxyAgent = { value: void 0 }; -//# sourceMappingURL=gaxios.js.map +OAuth2Client.GOOGLE_TOKEN_INFO_URL = 'https://oauth2.googleapis.com/tokeninfo'; +/** + * Clock skew - five minutes in seconds + */ +OAuth2Client.CLOCK_SKEW_SECS_ = 300; +/** + * The default max Token Lifetime is one day in seconds + */ +OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_ = 86400; + /***/ }), -/***/ 59555: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 19510: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2018 Google LLC +// Copyright 2021 Google LLC +// // 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 +// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.request = exports.instance = exports.Gaxios = exports.GaxiosError = void 0; -const gaxios_1 = __nccwpck_require__(28133); -Object.defineProperty(exports, "Gaxios", ({ enumerable: true, get: function () { return gaxios_1.Gaxios; } })); -var common_1 = __nccwpck_require__(66129); -Object.defineProperty(exports, "GaxiosError", ({ enumerable: true, get: function () { return common_1.GaxiosError; } })); -__exportStar(__nccwpck_require__(14309), exports); +exports.OAuthClientAuthHandler = void 0; +exports.getErrorFromOAuthErrorResponse = getErrorFromOAuthErrorResponse; +const querystring = __nccwpck_require__(63477); +const crypto_1 = __nccwpck_require__(78043); +/** List of HTTP methods that accept request bodies. */ +const METHODS_SUPPORTING_REQUEST_BODY = ['PUT', 'POST', 'PATCH']; /** - * The default instance used when the `request` method is directly - * invoked. + * Abstract class for handling client authentication in OAuth-based + * operations. + * When request-body client authentication is used, only application/json and + * application/x-www-form-urlencoded content types for HTTP methods that support + * request bodies are supported. */ -exports.instance = new gaxios_1.Gaxios(); +class OAuthClientAuthHandler { + /** + * Instantiates an OAuth client authentication handler. + * @param clientAuthentication The client auth credentials. + */ + constructor(clientAuthentication) { + this.clientAuthentication = clientAuthentication; + this.crypto = (0, crypto_1.createCrypto)(); + } + /** + * Applies client authentication on the OAuth request's headers or POST + * body but does not process the request. + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. + */ + applyClientAuthenticationOptions(opts, bearerToken) { + // Inject authenticated header. + this.injectAuthenticatedHeaders(opts, bearerToken); + // Inject authenticated request body. + if (!bearerToken) { + this.injectAuthenticatedRequestBody(opts); + } + } + /** + * Applies client authentication on the request's header if either + * basic authentication or bearer token authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. + */ + injectAuthenticatedHeaders(opts, bearerToken) { + var _a; + // Bearer token prioritized higher than basic Auth. + if (bearerToken) { + opts.headers = opts.headers || {}; + Object.assign(opts.headers, { + Authorization: `Bearer ${bearerToken}}`, + }); + } + else if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'basic') { + opts.headers = opts.headers || {}; + const clientId = this.clientAuthentication.clientId; + const clientSecret = this.clientAuthentication.clientSecret || ''; + const base64EncodedCreds = this.crypto.encodeBase64StringUtf8(`${clientId}:${clientSecret}`); + Object.assign(opts.headers, { + Authorization: `Basic ${base64EncodedCreds}`, + }); + } + } + /** + * Applies client authentication on the request's body if request-body + * client authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + */ + injectAuthenticatedRequestBody(opts) { + var _a; + if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'request-body') { + const method = (opts.method || 'GET').toUpperCase(); + // Inject authenticated request body. + if (METHODS_SUPPORTING_REQUEST_BODY.indexOf(method) !== -1) { + // Get content-type. + let contentType; + const headers = opts.headers || {}; + for (const key in headers) { + if (key.toLowerCase() === 'content-type' && headers[key]) { + contentType = headers[key].toLowerCase(); + break; + } + } + if (contentType === 'application/x-www-form-urlencoded') { + opts.data = opts.data || ''; + const data = querystring.parse(opts.data); + Object.assign(data, { + client_id: this.clientAuthentication.clientId, + client_secret: this.clientAuthentication.clientSecret || '', + }); + opts.data = querystring.stringify(data); + } + else if (contentType === 'application/json') { + opts.data = opts.data || {}; + Object.assign(opts.data, { + client_id: this.clientAuthentication.clientId, + client_secret: this.clientAuthentication.clientSecret || '', + }); + } + else { + throw new Error(`${contentType} content-types are not supported with ` + + `${this.clientAuthentication.confidentialClientType} ` + + 'client authentication'); + } + } + else { + throw new Error(`${method} HTTP method does not support ` + + `${this.clientAuthentication.confidentialClientType} ` + + 'client authentication'); + } + } + } + /** + * Retry config for Auth-related requests. + * + * @remarks + * + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. + */ + static get RETRY_CONFIG() { + return { + retry: true, + retryConfig: { + httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], + }, + }; + } +} +exports.OAuthClientAuthHandler = OAuthClientAuthHandler; /** - * Make an HTTP request using the given options. - * @param opts Options for the request + * Converts an OAuth error response to a native JavaScript Error. + * @param resp The OAuth error response to convert to a native Error object. + * @param err The optional original error. If provided, the error properties + * will be copied to the new error. + * @return The converted native Error object. */ -async function request(opts) { - return exports.instance.request(opts); +function getErrorFromOAuthErrorResponse(resp, err) { + // Error response. + const errorCode = resp.error; + const errorDescription = resp.error_description; + const errorUri = resp.error_uri; + let message = `Error code ${errorCode}`; + if (typeof errorDescription !== 'undefined') { + message += `: ${errorDescription}`; + } + if (typeof errorUri !== 'undefined') { + message += ` - ${errorUri}`; + } + const newError = new Error(message); + // Copy properties from original error to newly generated error. + if (err) { + const keys = Object.keys(err); + if (err.stack) { + // Copy error.stack if available. + keys.push('stack'); + } + keys.forEach(key => { + // Do not overwrite the message field. + if (key !== 'message') { + Object.defineProperty(newError, key, { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: err[key], + writable: false, + enumerable: true, + }); + } + }); + } + return newError; } -exports.request = request; -//# sourceMappingURL=index.js.map + /***/ }), -/***/ 14309: -/***/ ((__unused_webpack_module, exports) => { +/***/ 32460: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright 2024 Google LLC +// // 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 +// 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, @@ -54184,28 +33929,68 @@ exports.request = request; // See the License for the specific language governing permissions and // limitations under the License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GaxiosInterceptorManager = void 0; +exports.PassThroughClient = void 0; +const authclient_1 = __nccwpck_require__(44627); /** - * Class to manage collections of GaxiosInterceptors for both requests and responses. + * An AuthClient without any Authentication information. Useful for: + * - Anonymous access + * - Local Emulators + * - Testing Environments + * */ -class GaxiosInterceptorManager extends Set { +class PassThroughClient extends authclient_1.AuthClient { + /** + * Creates a request without any authentication headers or checks. + * + * @remarks + * + * In testing environments it may be useful to change the provided + * {@link AuthClient.transporter} for any desired request overrides/handling. + * + * @param opts + * @returns The response of the request. + */ + async request(opts) { + return this.transporter.request(opts); + } + /** + * A required method of the base class. + * Always will return an empty object. + * + * @returns {} + */ + async getAccessToken() { + return {}; + } + /** + * A required method of the base class. + * Always will return an empty object. + * + * @returns {} + */ + async getRequestHeaders() { + return {}; + } } -exports.GaxiosInterceptorManager = GaxiosInterceptorManager; -//# sourceMappingURL=interceptor.js.map +exports.PassThroughClient = PassThroughClient; +const a = new PassThroughClient(); +a.getAccessToken(); + /***/ }), -/***/ 31052: -/***/ ((__unused_webpack_module, exports) => { +/***/ 44782: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2018 Google LLC +// Copyright 2022 Google LLC +// // 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 +// 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, @@ -54213,147 +33998,386 @@ exports.GaxiosInterceptorManager = GaxiosInterceptorManager; // See the License for the specific language governing permissions and // limitations under the License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRetryConfig = void 0; -async function getRetryConfig(err) { - var _a; - let config = getConfig(err); - if (!err || !err.config || (!config && !err.config.retry)) { - return { shouldRetry: false }; - } - config = config || {}; - config.currentRetryAttempt = config.currentRetryAttempt || 0; - config.retry = - config.retry === undefined || config.retry === null ? 3 : config.retry; - config.httpMethodsToRetry = config.httpMethodsToRetry || [ - 'GET', - 'HEAD', - 'PUT', - 'OPTIONS', - 'DELETE', - ]; - config.noResponseRetries = - config.noResponseRetries === undefined || config.noResponseRetries === null - ? 2 - : config.noResponseRetries; - // If this wasn't in the list of status codes where we want - // to automatically retry, return. - const retryRanges = [ - // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes - // 1xx - Retry (Informational, request still processing) - // 2xx - Do not retry (Success) - // 3xx - Do not retry (Redirect) - // 4xx - Do not retry (Client errors) - // 408 - Retry ("Request Timeout") - // 429 - Retry ("Too Many Requests") - // 5xx - Retry (Server errors) - [100, 199], - [408, 408], - [429, 429], - [500, 599], - ]; - config.statusCodesToRetry = config.statusCodesToRetry || retryRanges; - // Put the config back into the err - err.config.retryConfig = config; - // Determine if we should retry the request - const shouldRetryFn = config.shouldRetry || shouldRetryRequest; - if (!(await shouldRetryFn(err))) { - return { shouldRetry: false, config: err.config }; - } - // Calculate time to wait with exponential backoff. - // If this is the first retry, look for a configured retryDelay. - const retryDelay = config.currentRetryAttempt ? 0 : (_a = config.retryDelay) !== null && _a !== void 0 ? _a : 100; - // Formula: retryDelay + ((2^c - 1 / 2) * 1000) - const delay = retryDelay + ((Math.pow(2, config.currentRetryAttempt) - 1) / 2) * 1000; - // We're going to retry! Incremenent the counter. - err.config.retryConfig.currentRetryAttempt += 1; - // Create a promise that invokes the retry after the backOffDelay - const backoff = config.retryBackoff - ? config.retryBackoff(err, delay) - : new Promise(resolve => { - setTimeout(resolve, delay); - }); - // Notify the user if they added an `onRetryAttempt` handler - if (config.onRetryAttempt) { - config.onRetryAttempt(err); +exports.PluggableAuthClient = exports.ExecutableError = void 0; +const baseexternalclient_1 = __nccwpck_require__(40810); +const executable_response_1 = __nccwpck_require__(8749); +const pluggable_auth_handler_1 = __nccwpck_require__(18941); +/** + * Error thrown from the executable run by PluggableAuthClient. + */ +class ExecutableError extends Error { + constructor(message, code) { + super(`The executable failed with exit code: ${code} and error message: ${message}.`); + this.code = code; + Object.setPrototypeOf(this, new.target.prototype); } - // Return the promise in which recalls Gaxios to retry the request - await backoff; - return { shouldRetry: true, config: err.config }; } -exports.getRetryConfig = getRetryConfig; +exports.ExecutableError = ExecutableError; /** - * Determine based on config if we should retry the request. - * @param err The GaxiosError passed to the interceptor. + * The default executable timeout when none is provided, in milliseconds. */ -function shouldRetryRequest(err) { - var _a; - const config = getConfig(err); - // node-fetch raises an AbortError if signaled: - // https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal - if (err.name === 'AbortError' || ((_a = err.error) === null || _a === void 0 ? void 0 : _a.name) === 'AbortError') { - return false; +const DEFAULT_EXECUTABLE_TIMEOUT_MILLIS = 30 * 1000; +/** + * The minimum allowed executable timeout in milliseconds. + */ +const MINIMUM_EXECUTABLE_TIMEOUT_MILLIS = 5 * 1000; +/** + * The maximum allowed executable timeout in milliseconds. + */ +const MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS = 120 * 1000; +/** + * The environment variable to check to see if executable can be run. + * Value must be set to '1' for the executable to run. + */ +const GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES = 'GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES'; +/** + * The maximum currently supported executable version. + */ +const MAXIMUM_EXECUTABLE_VERSION = 1; +/** + * PluggableAuthClient enables the exchange of workload identity pool external credentials for + * Google access tokens by retrieving 3rd party tokens through a user supplied executable. These + * scripts/executables are completely independent of the Google Cloud Auth libraries. These + * credentials plug into ADC and will call the specified executable to retrieve the 3rd party token + * to be exchanged for a Google access token. + * + *

To use these credentials, the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment variable + * must be set to '1'. This is for security reasons. + * + *

Both OIDC and SAML are supported. The executable must adhere to a specific response format + * defined below. + * + *

The executable must print out the 3rd party token to STDOUT in JSON format. When an + * output_file is specified in the credential configuration, the executable must also handle writing the + * JSON response to this file. + * + *

+ * OIDC response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:id_token",
+ *   "id_token": "HEADER.PAYLOAD.SIGNATURE",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * SAML2 response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:saml2",
+ *   "saml_response": "...",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * Error response sample:
+ * {
+ *   "version": 1,
+ *   "success": false,
+ *   "code": "401",
+ *   "message": "Error message."
+ * }
+ * 
+ * + *

The "expiration_time" field in the JSON response is only required for successful + * responses when an output file was specified in the credential configuration + * + *

The auth libraries will populate certain environment variables that will be accessible by the + * executable, such as: GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE, GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE, + * GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE, GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL, and + * GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE. + * + *

Please see this repositories README for a complete executable request/response specification. + */ +class PluggableAuthClient extends baseexternalclient_1.BaseExternalAccountClient { + /** + * Instantiates a PluggableAuthClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid pluggable auth credential. + * @param options The external account options object typically loaded from + * the external account JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + super(options, additionalOptions); + if (!options.credential_source.executable) { + throw new Error('No valid Pluggable Auth "credential_source" provided.'); + } + this.command = options.credential_source.executable.command; + if (!this.command) { + throw new Error('No valid Pluggable Auth "credential_source" provided.'); + } + // Check if the provided timeout exists and if it is valid. + if (options.credential_source.executable.timeout_millis === undefined) { + this.timeoutMillis = DEFAULT_EXECUTABLE_TIMEOUT_MILLIS; + } + else { + this.timeoutMillis = options.credential_source.executable.timeout_millis; + if (this.timeoutMillis < MINIMUM_EXECUTABLE_TIMEOUT_MILLIS || + this.timeoutMillis > MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS) { + throw new Error(`Timeout must be between ${MINIMUM_EXECUTABLE_TIMEOUT_MILLIS} and ` + + `${MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS} milliseconds.`); + } + } + this.outputFile = options.credential_source.executable.output_file; + this.handler = new pluggable_auth_handler_1.PluggableAuthHandler({ + command: this.command, + timeoutMillis: this.timeoutMillis, + outputFile: this.outputFile, + }); + this.credentialSourceType = 'executable'; } - // If there's no config, or retries are disabled, return. - if (!config || config.retry === 0) { - return false; + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. + * This uses the `options.credential_source` object to figure out how + * to retrieve the token using the current environment. In this case, + * this calls a user provided executable which returns the subject token. + * The logic is summarized as: + * 1. Validated that the executable is allowed to run. The + * GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment must be set to + * 1 for security reasons. + * 2. If an output file is specified by the user, check the file location + * for a response. If the file exists and contains a valid response, + * return the subject token from the file. + * 3. Call the provided executable and return response. + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + // Check if the executable is allowed to run. + if (process.env[GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES] !== '1') { + throw new Error('Pluggable Auth executables need to be explicitly allowed to run by ' + + 'setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment ' + + 'Variable to 1.'); + } + let executableResponse = undefined; + // Try to get cached executable response from output file. + if (this.outputFile) { + executableResponse = await this.handler.retrieveCachedResponse(); + } + // If no response from output file, call the executable. + if (!executableResponse) { + // Set up environment map with required values for the executable. + const envMap = new Map(); + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE', this.audience); + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE', this.subjectTokenType); + // Always set to 0 because interactive mode is not supported. + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE', '0'); + if (this.outputFile) { + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE', this.outputFile); + } + const serviceAccountEmail = this.getServiceAccountEmail(); + if (serviceAccountEmail) { + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL', serviceAccountEmail); + } + executableResponse = + await this.handler.retrieveResponseFromExecutable(envMap); + } + if (executableResponse.version > MAXIMUM_EXECUTABLE_VERSION) { + throw new Error(`Version of executable is not currently supported, maximum supported version is ${MAXIMUM_EXECUTABLE_VERSION}.`); + } + // Check that response was successful. + if (!executableResponse.success) { + throw new ExecutableError(executableResponse.errorMessage, executableResponse.errorCode); + } + // Check that response contains expiration time if output file was specified. + if (this.outputFile) { + if (!executableResponse.expirationTime) { + throw new executable_response_1.InvalidExpirationTimeFieldError('The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.'); + } + } + // Check that response is not expired. + if (executableResponse.isExpired()) { + throw new Error('Executable response is expired.'); + } + // Return subject token from response. + return executableResponse.subjectToken; } - // Check if this error has no response (ETIMEDOUT, ENOTFOUND, etc) - if (!err.response && - (config.currentRetryAttempt || 0) >= config.noResponseRetries) { - return false; +} +exports.PluggableAuthClient = PluggableAuthClient; + + +/***/ }), + +/***/ 18941: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2022 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PluggableAuthHandler = void 0; +const pluggable_auth_client_1 = __nccwpck_require__(44782); +const executable_response_1 = __nccwpck_require__(8749); +const childProcess = __nccwpck_require__(32081); +const fs = __nccwpck_require__(57147); +/** + * A handler used to retrieve 3rd party token responses from user defined + * executables and cached file output for the PluggableAuthClient class. + */ +class PluggableAuthHandler { + /** + * Instantiates a PluggableAuthHandler instance using the provided + * PluggableAuthHandlerOptions object. + */ + constructor(options) { + if (!options.command) { + throw new Error('No command provided.'); + } + this.commandComponents = PluggableAuthHandler.parseCommand(options.command); + this.timeoutMillis = options.timeoutMillis; + if (!this.timeoutMillis) { + throw new Error('No timeoutMillis provided.'); + } + this.outputFile = options.outputFile; } - // Only retry with configured HttpMethods. - if (!err.config.method || - config.httpMethodsToRetry.indexOf(err.config.method.toUpperCase()) < 0) { - return false; + /** + * Calls user provided executable to get a 3rd party subject token and + * returns the response. + * @param envMap a Map of additional Environment Variables required for + * the executable. + * @return A promise that resolves with the executable response. + */ + retrieveResponseFromExecutable(envMap) { + return new Promise((resolve, reject) => { + // Spawn process to run executable using added environment variables. + const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), { + env: { ...process.env, ...Object.fromEntries(envMap) }, + }); + let output = ''; + // Append stdout to output as executable runs. + child.stdout.on('data', (data) => { + output += data; + }); + // Append stderr as executable runs. + child.stderr.on('data', (err) => { + output += err; + }); + // Set up a timeout to end the child process and throw an error. + const timeout = setTimeout(() => { + // Kill child process and remove listeners so 'close' event doesn't get + // read after child process is killed. + child.removeAllListeners(); + child.kill(); + return reject(new Error('The executable failed to finish within the timeout specified.')); + }, this.timeoutMillis); + child.on('close', (code) => { + // Cancel timeout if executable closes before timeout is reached. + clearTimeout(timeout); + if (code === 0) { + // If the executable completed successfully, try to return the parsed response. + try { + const responseJson = JSON.parse(output); + const response = new executable_response_1.ExecutableResponse(responseJson); + return resolve(response); + } + catch (error) { + if (error instanceof executable_response_1.ExecutableResponseError) { + return reject(error); + } + return reject(new executable_response_1.ExecutableResponseError(`The executable returned an invalid response: ${output}`)); + } + } + else { + return reject(new pluggable_auth_client_1.ExecutableError(output, code.toString())); + } + }); + }); } - // If this wasn't in the list of status codes where we want - // to automatically retry, return. - if (err.response && err.response.status) { - let isInRange = false; - for (const [min, max] of config.statusCodesToRetry) { - const status = err.response.status; - if (status >= min && status <= max) { - isInRange = true; - break; + /** + * Checks user provided output file for response from previous run of + * executable and return the response if it exists, is formatted correctly, and is not expired. + */ + async retrieveCachedResponse() { + if (!this.outputFile || this.outputFile.length === 0) { + return undefined; + } + let filePath; + try { + filePath = await fs.promises.realpath(this.outputFile); + } + catch (_a) { + // If file path cannot be resolved, return undefined. + return undefined; + } + if (!(await fs.promises.lstat(filePath)).isFile()) { + // If path does not lead to file, return undefined. + return undefined; + } + const responseString = await fs.promises.readFile(filePath, { + encoding: 'utf8', + }); + if (responseString === '') { + return undefined; + } + try { + const responseJson = JSON.parse(responseString); + const response = new executable_response_1.ExecutableResponse(responseJson); + // Check if response is successful and unexpired. + if (response.isValid()) { + return new executable_response_1.ExecutableResponse(responseJson); } + return undefined; } - if (!isInRange) { - return false; + catch (error) { + if (error instanceof executable_response_1.ExecutableResponseError) { + throw error; + } + throw new executable_response_1.ExecutableResponseError(`The output file contained an invalid response: ${responseString}`); + } + } + /** + * Parses given command string into component array, splitting on spaces unless + * spaces are between quotation marks. + */ + static parseCommand(command) { + // Split the command into components by splitting on spaces, + // unless spaces are contained in quotation marks. + const components = command.match(/(?:[^\s"]+|"[^"]*")+/g); + if (!components) { + throw new Error(`Provided command: "${command}" could not be parsed.`); + } + // Remove quotation marks from the beginning and end of each component if they are present. + for (let i = 0; i < components.length; i++) { + if (components[i][0] === '"' && components[i].slice(-1) === '"') { + components[i] = components[i].slice(1, -1); + } } + return components; } - // If we are out of retry attempts, return - config.currentRetryAttempt = config.currentRetryAttempt || 0; - if (config.currentRetryAttempt >= config.retry) { - return false; - } - return true; -} -/** - * Acquire the raxConfig object from an GaxiosError if available. - * @param err The Gaxios error with a config object. - */ -function getConfig(err) { - if (err && err.config && err.config.retryConfig) { - return err.config.retryConfig; - } - return; } -//# sourceMappingURL=retry.js.map +exports.PluggableAuthHandler = PluggableAuthHandler; + /***/ }), -/***/ 21980: +/***/ 98790: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2023 Google LLC +// Copyright 2015 Google LLC +// // 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 +// 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, @@ -54361,825 +34385,1106 @@ function getConfig(err) { // See the License for the specific language governing permissions and // limitations under the License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pkg = void 0; -exports.pkg = __nccwpck_require__(6318); -//# sourceMappingURL=util.js.map - -/***/ }), - -/***/ 19694: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(94625)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(93951)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(52507)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(18457)); - -var _nil = _interopRequireDefault(__nccwpck_require__(27298)); - -var _version = _interopRequireDefault(__nccwpck_require__(40278)); - -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(52956)); - -var _parse = _interopRequireDefault(__nccwpck_require__(55558)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 12484: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 53513: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; - -/***/ }), - -/***/ 27298: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 55558: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; +exports.UserRefreshClient = exports.USER_REFRESH_ACCOUNT_TYPE = void 0; +const oauth2client_1 = __nccwpck_require__(3936); +const querystring_1 = __nccwpck_require__(63477); +exports.USER_REFRESH_ACCOUNT_TYPE = 'authorized_user'; +class UserRefreshClient extends oauth2client_1.OAuth2Client { + constructor(optionsOrClientId, clientSecret, refreshToken, eagerRefreshThresholdMillis, forceRefreshOnFailure) { + const opts = optionsOrClientId && typeof optionsOrClientId === 'object' + ? optionsOrClientId + : { + clientId: optionsOrClientId, + clientSecret, + refreshToken, + eagerRefreshThresholdMillis, + forceRefreshOnFailure, + }; + super(opts); + this._refreshToken = opts.refreshToken; + this.credentials.refresh_token = opts.refreshToken; + } + /** + * Refreshes the access token. + * @param refreshToken An ignored refreshToken.. + * @param callback Optional callback. + */ + async refreshTokenNoCache( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + refreshToken) { + return super.refreshTokenNoCache(this._refreshToken); + } + async fetchIdToken(targetAudience) { + const res = await this.transporter.request({ + ...UserRefreshClient.RETRY_CONFIG, + url: this.endpoints.oauth2TokenUrl, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + method: 'POST', + data: (0, querystring_1.stringify)({ + client_id: this._clientId, + client_secret: this._clientSecret, + grant_type: 'refresh_token', + refresh_token: this._refreshToken, + target_audience: targetAudience, + }), + }); + return res.data.id_token; + } + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the user refresh token'); + } + if (json.type !== 'authorized_user') { + throw new Error('The incoming JSON object does not have the "authorized_user" type'); + } + if (!json.client_id) { + throw new Error('The incoming JSON object does not contain a client_id field'); + } + if (!json.client_secret) { + throw new Error('The incoming JSON object does not contain a client_secret field'); + } + if (!json.refresh_token) { + throw new Error('The incoming JSON object does not contain a refresh_token field'); + } + this._clientId = json.client_id; + this._clientSecret = json.client_secret; + this._refreshToken = json.refresh_token; + this.credentials.refresh_token = json.refresh_token; + this.quotaProjectId = json.quota_project_id; + this.universeDomain = json.universe_domain || this.universeDomain; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + async fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + return reject(new Error('Must pass in a stream containing the user refresh token.')); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => (s += chunk)) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + return resolve(); + } + catch (err) { + return reject(err); + } + }); + }); + } + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + static fromJSON(json) { + const client = new UserRefreshClient(); + client.fromJSON(json); + return client; + } } +exports.UserRefreshClient = UserRefreshClient; -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 23894: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 27440: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} /***/ }), -/***/ 45682: +/***/ 86308: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StsCredentials = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const querystring = __nccwpck_require__(63477); +const transporters_1 = __nccwpck_require__(72649); +const oauth2common_1 = __nccwpck_require__(19510); +/** + * Implements the OAuth 2.0 token exchange based on + * https://tools.ietf.org/html/rfc8693 + */ +class StsCredentials extends oauth2common_1.OAuthClientAuthHandler { + /** + * Initializes an STS credentials instance. + * @param tokenExchangeEndpoint The token exchange endpoint. + * @param clientAuthentication The client authentication credentials if + * available. + */ + constructor(tokenExchangeEndpoint, clientAuthentication) { + super(clientAuthentication); + this.tokenExchangeEndpoint = tokenExchangeEndpoint; + this.transporter = new transporters_1.DefaultTransporter(); + } + /** + * Exchanges the provided token for another type of token based on the + * rfc8693 spec. + * @param stsCredentialsOptions The token exchange options used to populate + * the token exchange request. + * @param additionalHeaders Optional additional headers to pass along the + * request. + * @param options Optional additional GCP-specific non-spec defined options + * to send with the request. + * Example: `&options=${encodeUriComponent(JSON.stringified(options))}` + * @return A promise that resolves with the token exchange response containing + * the requested token and its expiration time. + */ + async exchangeToken(stsCredentialsOptions, additionalHeaders, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + options) { + var _a, _b, _c; + const values = { + grant_type: stsCredentialsOptions.grantType, + resource: stsCredentialsOptions.resource, + audience: stsCredentialsOptions.audience, + scope: (_a = stsCredentialsOptions.scope) === null || _a === void 0 ? void 0 : _a.join(' '), + requested_token_type: stsCredentialsOptions.requestedTokenType, + subject_token: stsCredentialsOptions.subjectToken, + subject_token_type: stsCredentialsOptions.subjectTokenType, + actor_token: (_b = stsCredentialsOptions.actingParty) === null || _b === void 0 ? void 0 : _b.actorToken, + actor_token_type: (_c = stsCredentialsOptions.actingParty) === null || _c === void 0 ? void 0 : _c.actorTokenType, + // Non-standard GCP-specific options. + options: options && JSON.stringify(options), + }; + // Remove undefined fields. + Object.keys(values).forEach(key => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (typeof values[key] === 'undefined') { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + delete values[key]; + } + }); + const headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + }; + // Inject additional STS headers if available. + Object.assign(headers, additionalHeaders || {}); + const opts = { + ...StsCredentials.RETRY_CONFIG, + url: this.tokenExchangeEndpoint.toString(), + method: 'POST', + headers, + data: querystring.stringify(values), + responseType: 'json', + }; + // Apply OAuth client authentication. + this.applyClientAuthenticationOptions(opts); + try { + const response = await this.transporter.request(opts); + // Successful response. + const stsSuccessfulResponse = response.data; + stsSuccessfulResponse.res = response; + return stsSuccessfulResponse; + } + catch (error) { + // Translate error to OAuthError. + if (error instanceof gaxios_1.GaxiosError && error.response) { + throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, + // Preserve other fields from the original error. + error); + } + // Request could fail before the server responds. + throw error; + } + } } +exports.StsCredentials = StsCredentials; -var _default = sha1; -exports["default"] = _default; /***/ }), -/***/ 52956: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 7428: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; - -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - +// Copyright 2024 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UrlSubjectTokenSupplier = void 0; /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + * Internal subject token supplier implementation used when a URL + * is configured in the credential configuration used to build an {@link IdentityPoolClient} */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} - -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} - -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; +class UrlSubjectTokenSupplier { + /** + * Instantiates a URL subject token supplier. + * @param opts The URL subject token supplier options to build the supplier with. + */ + constructor(opts) { + this.url = opts.url; + this.formatType = opts.formatType; + this.subjectTokenFieldName = opts.subjectTokenFieldName; + this.headers = opts.headers; + this.additionalGaxiosOptions = opts.additionalGaxiosOptions; + } + /** + * Sends a GET request to the URL provided in the constructor and resolves + * with the returned external subject token. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + async getSubjectToken(context) { + const opts = { + ...this.additionalGaxiosOptions, + url: this.url, + method: 'GET', + headers: this.headers, + responseType: this.formatType, + }; + let subjectToken; + if (this.formatType === 'text') { + const response = await context.transporter.request(opts); + subjectToken = response.data; + } + else if (this.formatType === 'json' && this.subjectTokenFieldName) { + const response = await context.transporter.request(opts); + subjectToken = response.data[this.subjectTokenFieldName]; + } + if (!subjectToken) { + throw new Error('Unable to parse the subject_token from the credential_source URL'); + } + return subjectToken; + } } +exports.UrlSubjectTokenSupplier = UrlSubjectTokenSupplier; -var _default = stringify; -exports["default"] = _default; /***/ }), -/***/ 94625: +/***/ 14693: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(27440)); - -var _stringify = __nccwpck_require__(52956); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** +// Copyright 2019 Google LLC // -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; +// 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. +/* global window */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BrowserCrypto = void 0; +// This file implements crypto functions we need using in-browser +// SubtleCrypto interface `window.crypto.subtle`. +const base64js = __nccwpck_require__(26463); +const crypto_1 = __nccwpck_require__(78043); +class BrowserCrypto { + constructor() { + if (typeof window === 'undefined' || + window.crypto === undefined || + window.crypto.subtle === undefined) { + throw new Error("SubtleCrypto not found. Make sure it's an https:// website."); + } } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + async sha256DigestBase64(str) { + // SubtleCrypto digest() method is async, so we must make + // this method async as well. + // To calculate SHA256 digest using SubtleCrypto, we first + // need to convert an input string to an ArrayBuffer: + const inputBuffer = new TextEncoder().encode(str); + // Result is ArrayBuffer as well. + const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); + return base64js.fromByteArray(new Uint8Array(outputBuffer)); } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.unsafeStringify)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 93951: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(64313)); - -var _md = _interopRequireDefault(__nccwpck_require__(12484)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 64313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; - -var _stringify = __nccwpck_require__(52956); - -var _parse = _interopRequireDefault(__nccwpck_require__(55558)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); + randomBytesBase64(count) { + const array = new Uint8Array(count); + window.crypto.getRandomValues(array); + return base64js.fromByteArray(array); } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); + static padBase64(base64) { + // base64js requires padding, so let's add some '=' + while (base64.length % 4 !== 0) { + base64 += '='; + } + return base64; } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; + async verify(pubkey, data, signature) { + const algo = { + name: 'RSASSA-PKCS1-v1_5', + hash: { name: 'SHA-256' }, + }; + const dataArray = new TextEncoder().encode(data); + const signatureArray = base64js.toByteArray(BrowserCrypto.padBase64(signature)); + const cryptoKey = await window.crypto.subtle.importKey('jwk', pubkey, algo, true, ['verify']); + // SubtleCrypto's verify method is async so we must make + // this method async as well. + const result = await window.crypto.subtle.verify(algo, cryptoKey, signatureArray, dataArray); + return result; + } + async sign(privateKey, data) { + const algo = { + name: 'RSASSA-PKCS1-v1_5', + hash: { name: 'SHA-256' }, + }; + const dataArray = new TextEncoder().encode(data); + const cryptoKey = await window.crypto.subtle.importKey('jwk', privateKey, algo, true, ['sign']); + // SubtleCrypto's sign method is async so we must make + // this method async as well. + const result = await window.crypto.subtle.sign(algo, cryptoKey, dataArray); + return base64js.fromByteArray(new Uint8Array(result)); + } + decodeBase64StringUtf8(base64) { + const uint8array = base64js.toByteArray(BrowserCrypto.padBase64(base64)); + const result = new TextDecoder().decode(uint8array); + return result; + } + encodeBase64StringUtf8(text) { + const uint8array = new TextEncoder().encode(text); + const result = base64js.fromByteArray(uint8array); + return result; + } + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + async sha256DigestHex(str) { + // SubtleCrypto digest() method is async, so we must make + // this method async as well. + // To calculate SHA256 digest using SubtleCrypto, we first + // need to convert an input string to an ArrayBuffer: + const inputBuffer = new TextEncoder().encode(str); + // Result is ArrayBuffer as well. + const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); + return (0, crypto_1.fromArrayBufferToHex)(outputBuffer); + } + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + async signWithHmacSha256(key, msg) { + // Convert key, if provided in ArrayBuffer format, to string. + const rawKey = typeof key === 'string' + ? key + : String.fromCharCode(...new Uint16Array(key)); + const enc = new TextEncoder(); + const cryptoKey = await window.crypto.subtle.importKey('raw', enc.encode(rawKey), { + name: 'HMAC', + hash: { + name: 'SHA-256', + }, + }, false, ['sign']); + return window.crypto.subtle.sign('HMAC', cryptoKey, enc.encode(msg)); } - - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; } +exports.BrowserCrypto = BrowserCrypto; + /***/ }), -/***/ 52507: +/***/ 78043: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _native = _interopRequireDefault(__nccwpck_require__(53513)); - -var _rng = _interopRequireDefault(__nccwpck_require__(27440)); - -var _stringify = __nccwpck_require__(52956); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } - - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; +// Copyright 2019 Google LLC +// +// 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. +/* global window */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createCrypto = createCrypto; +exports.hasBrowserCrypto = hasBrowserCrypto; +exports.fromArrayBufferToHex = fromArrayBufferToHex; +const crypto_1 = __nccwpck_require__(14693); +const crypto_2 = __nccwpck_require__(30757); +function createCrypto() { + if (hasBrowserCrypto()) { + return new crypto_1.BrowserCrypto(); } - - return buf; - } - - return (0, _stringify.unsafeStringify)(rnds); + return new crypto_2.NodeCrypto(); +} +function hasBrowserCrypto() { + return (typeof window !== 'undefined' && + typeof window.crypto !== 'undefined' && + typeof window.crypto.subtle !== 'undefined'); +} +/** + * Converts an ArrayBuffer to a hexadecimal string. + * @param arrayBuffer The ArrayBuffer to convert to hexadecimal string. + * @return The hexadecimal encoding of the ArrayBuffer. + */ +function fromArrayBufferToHex(arrayBuffer) { + // Convert buffer to byte array. + const byteArray = Array.from(new Uint8Array(arrayBuffer)); + // Convert bytes to hex string. + return byteArray + .map(byte => { + return byte.toString(16).padStart(2, '0'); + }) + .join(''); } -var _default = v4; -exports["default"] = _default; /***/ }), -/***/ 18457: +/***/ 30757: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeCrypto = void 0; +const crypto = __nccwpck_require__(6113); +class NodeCrypto { + async sha256DigestBase64(str) { + return crypto.createHash('sha256').update(str).digest('base64'); + } + randomBytesBase64(count) { + return crypto.randomBytes(count).toString('base64'); + } + async verify(pubkey, data, signature) { + const verifier = crypto.createVerify('RSA-SHA256'); + verifier.update(data); + verifier.end(); + return verifier.verify(pubkey, signature, 'base64'); + } + async sign(privateKey, data) { + const signer = crypto.createSign('RSA-SHA256'); + signer.update(data); + signer.end(); + return signer.sign(privateKey, 'base64'); + } + decodeBase64StringUtf8(base64) { + return Buffer.from(base64, 'base64').toString('utf-8'); + } + encodeBase64StringUtf8(text) { + return Buffer.from(text, 'utf-8').toString('base64'); + } + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + async sha256DigestHex(str) { + return crypto.createHash('sha256').update(str).digest('hex'); + } + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + async signWithHmacSha256(key, msg) { + const cryptoKey = typeof key === 'string' ? key : toBuffer(key); + return toArrayBuffer(crypto.createHmac('sha256', cryptoKey).update(msg).digest()); + } +} +exports.NodeCrypto = NodeCrypto; +/** + * Converts a Node.js Buffer to an ArrayBuffer. + * https://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer + * @param buffer The Buffer input to covert. + * @return The ArrayBuffer representation of the input. + */ +function toArrayBuffer(buffer) { + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); +} +/** + * Converts an ArrayBuffer to a Node.js Buffer. + * @param arrayBuffer The ArrayBuffer input to covert. + * @return The Buffer representation of the input. + */ +function toBuffer(arrayBuffer) { + return Buffer.from(arrayBuffer); +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(64313)); - -var _sha = _interopRequireDefault(__nccwpck_require__(45682)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; /***/ }), -/***/ 75559: +/***/ 20810: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GoogleAuth = exports.auth = exports.DefaultTransporter = exports.PassThroughClient = exports.ExecutableError = exports.PluggableAuthClient = exports.DownscopedClient = exports.BaseExternalAccountClient = exports.ExternalAccountClient = exports.IdentityPoolClient = exports.AwsRequestSigner = exports.AwsClient = exports.UserRefreshClient = exports.LoginTicket = exports.ClientAuthentication = exports.OAuth2Client = exports.CodeChallengeMethod = exports.Impersonated = exports.JWT = exports.JWTAccess = exports.IdTokenClient = exports.IAMAuth = exports.GCPEnv = exports.Compute = exports.DEFAULT_UNIVERSE = exports.AuthClient = exports.gaxios = exports.gcpMetadata = void 0; +// Copyright 2017 Google LLC +// +// 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. +const googleauth_1 = __nccwpck_require__(20695); +Object.defineProperty(exports, "GoogleAuth", ({ enumerable: true, get: function () { return googleauth_1.GoogleAuth; } })); +// Export common deps to ensure types/instances are the exact match. Useful +// for consistently configuring the library across versions. +exports.gcpMetadata = __nccwpck_require__(3563); +exports.gaxios = __nccwpck_require__(59555); +var authclient_1 = __nccwpck_require__(44627); +Object.defineProperty(exports, "AuthClient", ({ enumerable: true, get: function () { return authclient_1.AuthClient; } })); +Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_1.DEFAULT_UNIVERSE; } })); +var computeclient_1 = __nccwpck_require__(96875); +Object.defineProperty(exports, "Compute", ({ enumerable: true, get: function () { return computeclient_1.Compute; } })); +var envDetect_1 = __nccwpck_require__(21380); +Object.defineProperty(exports, "GCPEnv", ({ enumerable: true, get: function () { return envDetect_1.GCPEnv; } })); +var iam_1 = __nccwpck_require__(39735); +Object.defineProperty(exports, "IAMAuth", ({ enumerable: true, get: function () { return iam_1.IAMAuth; } })); +var idtokenclient_1 = __nccwpck_require__(80298); +Object.defineProperty(exports, "IdTokenClient", ({ enumerable: true, get: function () { return idtokenclient_1.IdTokenClient; } })); +var jwtaccess_1 = __nccwpck_require__(68740); +Object.defineProperty(exports, "JWTAccess", ({ enumerable: true, get: function () { return jwtaccess_1.JWTAccess; } })); +var jwtclient_1 = __nccwpck_require__(13959); +Object.defineProperty(exports, "JWT", ({ enumerable: true, get: function () { return jwtclient_1.JWT; } })); +var impersonated_1 = __nccwpck_require__(91103); +Object.defineProperty(exports, "Impersonated", ({ enumerable: true, get: function () { return impersonated_1.Impersonated; } })); +var oauth2client_1 = __nccwpck_require__(3936); +Object.defineProperty(exports, "CodeChallengeMethod", ({ enumerable: true, get: function () { return oauth2client_1.CodeChallengeMethod; } })); +Object.defineProperty(exports, "OAuth2Client", ({ enumerable: true, get: function () { return oauth2client_1.OAuth2Client; } })); +Object.defineProperty(exports, "ClientAuthentication", ({ enumerable: true, get: function () { return oauth2client_1.ClientAuthentication; } })); +var loginticket_1 = __nccwpck_require__(74524); +Object.defineProperty(exports, "LoginTicket", ({ enumerable: true, get: function () { return loginticket_1.LoginTicket; } })); +var refreshclient_1 = __nccwpck_require__(98790); +Object.defineProperty(exports, "UserRefreshClient", ({ enumerable: true, get: function () { return refreshclient_1.UserRefreshClient; } })); +var awsclient_1 = __nccwpck_require__(71569); +Object.defineProperty(exports, "AwsClient", ({ enumerable: true, get: function () { return awsclient_1.AwsClient; } })); +var awsrequestsigner_1 = __nccwpck_require__(1754); +Object.defineProperty(exports, "AwsRequestSigner", ({ enumerable: true, get: function () { return awsrequestsigner_1.AwsRequestSigner; } })); +var identitypoolclient_1 = __nccwpck_require__(20117); +Object.defineProperty(exports, "IdentityPoolClient", ({ enumerable: true, get: function () { return identitypoolclient_1.IdentityPoolClient; } })); +var externalclient_1 = __nccwpck_require__(94381); +Object.defineProperty(exports, "ExternalAccountClient", ({ enumerable: true, get: function () { return externalclient_1.ExternalAccountClient; } })); +var baseexternalclient_1 = __nccwpck_require__(40810); +Object.defineProperty(exports, "BaseExternalAccountClient", ({ enumerable: true, get: function () { return baseexternalclient_1.BaseExternalAccountClient; } })); +var downscopedclient_1 = __nccwpck_require__(6270); +Object.defineProperty(exports, "DownscopedClient", ({ enumerable: true, get: function () { return downscopedclient_1.DownscopedClient; } })); +var pluggable_auth_client_1 = __nccwpck_require__(44782); +Object.defineProperty(exports, "PluggableAuthClient", ({ enumerable: true, get: function () { return pluggable_auth_client_1.PluggableAuthClient; } })); +Object.defineProperty(exports, "ExecutableError", ({ enumerable: true, get: function () { return pluggable_auth_client_1.ExecutableError; } })); +var passthrough_1 = __nccwpck_require__(32460); +Object.defineProperty(exports, "PassThroughClient", ({ enumerable: true, get: function () { return passthrough_1.PassThroughClient; } })); +var transporters_1 = __nccwpck_require__(72649); +Object.defineProperty(exports, "DefaultTransporter", ({ enumerable: true, get: function () { return transporters_1.DefaultTransporter; } })); +const auth = new googleauth_1.GoogleAuth(); +exports.auth = auth; + -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +/***/ }), -var _regex = _interopRequireDefault(__nccwpck_require__(23894)); +/***/ 16608: +/***/ ((__unused_webpack_module, exports) => { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +"use strict"; -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); +// Copyright 2017 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validate = validate; +// Accepts an options object passed from the user to the API. In the +// previous version of the API, it referred to a `Request` options object. +// Now it refers to an Axiox Request Config object. This is here to help +// ensure users don't pass invalid options when they upgrade from 0.x to 1.x. +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function validate(options) { + const vpairs = [ + { invalid: 'uri', expected: 'url' }, + { invalid: 'json', expected: 'data' }, + { invalid: 'qs', expected: 'params' }, + ]; + for (const pair of vpairs) { + if (options[pair.invalid]) { + const e = `'${pair.invalid}' is not a valid configuration option. Please use '${pair.expected}' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.`; + throw new Error(e); + } + } } -var _default = validate; -exports["default"] = _default; /***/ }), -/***/ 40278: +/***/ 72649: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.slice(14, 15), 16); +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefaultTransporter = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const options_1 = __nccwpck_require__(16608); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const pkg = __nccwpck_require__(51402); +const PRODUCT_NAME = 'google-api-nodejs-client'; +class DefaultTransporter { + constructor() { + /** + * A configurable, replacable `Gaxios` instance. + */ + this.instance = new gaxios_1.Gaxios(); + } + /** + * Configures request options before making a request. + * @param opts GaxiosOptions options. + * @return Configured options. + */ + configure(opts = {}) { + opts.headers = opts.headers || {}; + if (typeof window === 'undefined') { + // set transporter user agent if not in browser + const uaValue = opts.headers['User-Agent']; + if (!uaValue) { + opts.headers['User-Agent'] = DefaultTransporter.USER_AGENT; + } + else if (!uaValue.includes(`${PRODUCT_NAME}/`)) { + opts.headers['User-Agent'] = + `${uaValue} ${DefaultTransporter.USER_AGENT}`; + } + // track google-auth-library-nodejs version: + if (!opts.headers['x-goog-api-client']) { + const nodeVersion = process.version.replace(/^v/, ''); + opts.headers['x-goog-api-client'] = `gl-node/${nodeVersion}`; + } + } + return opts; + } + /** + * Makes a request using Gaxios with given options. + * @param opts GaxiosOptions options. + * @param callback optional callback that contains GaxiosResponse object. + * @return GaxiosPromise, assuming no callback is passed. + */ + request(opts) { + // ensure the user isn't passing in request-style options + opts = this.configure(opts); + (0, options_1.validate)(opts); + return this.instance.request(opts).catch(e => { + throw this.processError(e); + }); + } + get defaults() { + return this.instance.defaults; + } + set defaults(opts) { + this.instance.defaults = opts; + } + /** + * Changes the error to include details from the body. + */ + processError(e) { + const res = e.response; + const err = e; + const body = res ? res.data : null; + if (res && body && body.error && res.status !== 200) { + if (typeof body.error === 'string') { + err.message = body.error; + err.status = res.status; + } + else if (Array.isArray(body.error.errors)) { + err.message = body.error.errors + .map((err2) => err2.message) + .join('\n'); + err.code = body.error.code; + err.errors = body.error.errors; + } + else { + err.message = body.error.message; + err.code = body.error.code; + } + } + else if (res && res.status >= 400) { + // Consider all 4xx and 5xx responses errors. + err.message = body; + err.status = res.status; + } + return err; + } } +exports.DefaultTransporter = DefaultTransporter; +/** + * Default user agent. + */ +DefaultTransporter.USER_AGENT = `${PRODUCT_NAME}/${pkg.version}`; -var _default = version; -exports["default"] = _default; /***/ }), -/***/ 51904: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 68905: +/***/ (function(__unused_webpack_module, exports) { "use strict"; +// Copyright 2023 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _LRUCache_instances, _LRUCache_cache, _LRUCache_moveToEnd, _LRUCache_evict; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LRUCache = void 0; +exports.snakeToCamel = snakeToCamel; +exports.originalOrCamelOptions = originalOrCamelOptions; /** - * Copyright 2022 Google LLC + * Returns the camel case of a provided string. * - * 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 + * @remarks * - * http://www.apache.org/licenses/LICENSE-2.0 + * Match any `_` and not `_` pair, then return the uppercase of the not `_` + * character. * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.detectGCPResidency = exports.isGoogleComputeEngine = exports.isGoogleComputeEngineMACAddress = exports.isGoogleComputeEngineLinux = exports.isGoogleCloudServerless = exports.GCE_LINUX_BIOS_PATHS = void 0; -const fs_1 = __nccwpck_require__(57147); -const os_1 = __nccwpck_require__(22037); -/** - * Known paths unique to Google Compute Engine Linux instances + * @internal + * + * @param str the string to convert + * @returns the camelCase'd string */ -exports.GCE_LINUX_BIOS_PATHS = { - BIOS_DATE: '/sys/class/dmi/id/bios_date', - BIOS_VENDOR: '/sys/class/dmi/id/bios_vendor', -}; -const GCE_MAC_ADDRESS_REGEX = /^42:01/; +function snakeToCamel(str) { + return str.replace(/([_][^_])/g, match => match.slice(1).toUpperCase()); +} /** - * Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance). - * - * Uses the: - * - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. - * - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}. + * Get the value of `obj[key]` or `obj[camelCaseKey]`, with a preference + * for original, non-camelCase key. * - * @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise. + * @param obj object to lookup a value in + * @returns a `get` function for getting `obj[key || snakeKey]`, if available */ -function isGoogleCloudServerless() { +function originalOrCamelOptions(obj) { /** - * `CLOUD_RUN_JOB` is used for Cloud Run Jobs - * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. - * - * `FUNCTION_NAME` is used in older Cloud Functions environments: - * - See {@link https://cloud.google.com/functions/docs/env-var Python 3.7 and Go 1.11}. * - * `K_SERVICE` is used in Cloud Run and newer Cloud Functions environments: - * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. - * - See {@link https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}. + * @param key an index of object, preferably snake_case + * @returns the value `obj[key || snakeKey]`, if available */ - const isGFEnvironment = process.env.CLOUD_RUN_JOB || - process.env.FUNCTION_NAME || - process.env.K_SERVICE; - return !!isGFEnvironment; + function get(key) { + var _a; + const o = (obj || {}); + return (_a = o[key]) !== null && _a !== void 0 ? _a : o[snakeToCamel(key)]; + } + return { get }; } -exports.isGoogleCloudServerless = isGoogleCloudServerless; /** - * Determines if the process is running on a Linux Google Compute Engine instance. + * A simple LRU cache utility. + * Not meant for external usage. * - * @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise. + * @experimental + * @internal */ -function isGoogleComputeEngineLinux() { - if ((0, os_1.platform)() !== 'linux') - return false; - try { - // ensure this file exist - (0, fs_1.statSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_DATE); - // ensure this file exist and matches - const biosVendor = (0, fs_1.readFileSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, 'utf8'); - return /Google/.test(biosVendor); +class LRUCache { + constructor(options) { + _LRUCache_instances.add(this); + /** + * Maps are in order. Thus, the older item is the first item. + * + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map} + */ + _LRUCache_cache.set(this, new Map()); + this.capacity = options.capacity; + this.maxAge = options.maxAge; } - catch (_a) { - return false; + /** + * Add an item to the cache. + * + * @param key the key to upsert + * @param value the value of the key + */ + set(key, value) { + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, value); + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); + } + /** + * Get an item from the cache. + * + * @param key the key to retrieve + */ + get(key) { + const item = __classPrivateFieldGet(this, _LRUCache_cache, "f").get(key); + if (!item) + return; + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, item.value); + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); + return item.value; + } +} +exports.LRUCache = LRUCache; +_LRUCache_cache = new WeakMap(), _LRUCache_instances = new WeakSet(), _LRUCache_moveToEnd = function _LRUCache_moveToEnd(key, value) { + __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(key); + __classPrivateFieldGet(this, _LRUCache_cache, "f").set(key, { + value, + lastAccessed: Date.now(), + }); +}, _LRUCache_evict = function _LRUCache_evict() { + const cutoffDate = this.maxAge ? Date.now() - this.maxAge : 0; + /** + * Because we know Maps are in order, this item is both the + * last item in the list (capacity) and oldest (maxAge). + */ + let oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); + while (!oldestItem.done && + (__classPrivateFieldGet(this, _LRUCache_cache, "f").size > this.capacity || // too many + oldestItem.value[1].lastAccessed < cutoffDate) // too old + ) { + __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(oldestItem.value[0]); + oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); } -} -exports.isGoogleComputeEngineLinux = isGoogleComputeEngineLinux; +}; + + +/***/ }), + +/***/ 74118: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Colours = void 0; /** - * Determines if the process is running on a Google Compute Engine instance with a known - * MAC address. + * Handles figuring out if we can use ANSI colours and handing out the escape codes. * - * @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise. + * This is for package-internal use only, and may change at any time. + * + * @private + * @internal */ -function isGoogleComputeEngineMACAddress() { - const interfaces = (0, os_1.networkInterfaces)(); - for (const item of Object.values(interfaces)) { - if (!item) - continue; - for (const { mac } of item) { - if (GCE_MAC_ADDRESS_REGEX.test(mac)) { - return true; - } +class Colours { + /** + * @param stream The stream (e.g. process.stderr) + * @returns true if the stream should have colourization enabled + */ + static isEnabled(stream) { + return (stream.isTTY && + (typeof stream.getColorDepth === 'function' + ? stream.getColorDepth() > 2 + : true)); + } + static refresh() { + Colours.enabled = Colours.isEnabled(process.stderr); + if (!this.enabled) { + Colours.reset = ''; + Colours.bright = ''; + Colours.dim = ''; + Colours.red = ''; + Colours.green = ''; + Colours.yellow = ''; + Colours.blue = ''; + Colours.magenta = ''; + Colours.cyan = ''; + Colours.white = ''; + Colours.grey = ''; } + else { + Colours.reset = '\u001b[0m'; + Colours.bright = '\u001b[1m'; + Colours.dim = '\u001b[2m'; + Colours.red = '\u001b[31m'; + Colours.green = '\u001b[32m'; + Colours.yellow = '\u001b[33m'; + Colours.blue = '\u001b[34m'; + Colours.magenta = '\u001b[35m'; + Colours.cyan = '\u001b[36m'; + Colours.white = '\u001b[37m'; + Colours.grey = '\u001b[90m'; + } + } +} +exports.Colours = Colours; +Colours.enabled = false; +Colours.reset = ''; +Colours.bright = ''; +Colours.dim = ''; +Colours.red = ''; +Colours.green = ''; +Colours.yellow = ''; +Colours.blue = ''; +Colours.magenta = ''; +Colours.cyan = ''; +Colours.white = ''; +Colours.grey = ''; +Colours.refresh(); +//# sourceMappingURL=colours.js.map + +/***/ }), + +/***/ 97306: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - return false; -} -exports.isGoogleComputeEngineMACAddress = isGoogleComputeEngineMACAddress; -/** - * Determines if the process is running on a Google Compute Engine instance. - * - * @returns {boolean} `true` if the process is running on GCE, `false` otherwise. - */ -function isGoogleComputeEngine() { - return isGoogleComputeEngineLinux() || isGoogleComputeEngineMACAddress(); -} -exports.isGoogleComputeEngine = isGoogleComputeEngine; -/** - * Determines if the process is running on Google Cloud Platform. - * - * @returns {boolean} `true` if the process is running on GCP, `false` otherwise. - */ -function detectGCPResidency() { - return isGoogleCloudServerless() || isGoogleComputeEngine(); -} -exports.detectGCPResidency = detectGCPResidency; -//# sourceMappingURL=gcp-residency.js.map + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(13029), exports); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 3563: +/***/ 13029: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -/** - * Copyright 2018 Google LLC - * - * Distributed under MIT license. - * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT - */ +// Copyright 2021-2024 Google LLC +// +// 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 +// +// https://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. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -55191,12630 +35496,15074 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi if (k2 === undefined) k2 = k; o[k2] = m[k]; })); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.requestTimeout = exports.setGCPResidency = exports.getGCPResidency = exports.gcpResidencyCache = exports.resetIsAvailableCache = exports.isAvailable = exports.bulk = exports.universe = exports.project = exports.instance = exports.METADATA_SERVER_DETECTION = exports.HEADERS = exports.HEADER_VALUE = exports.HEADER_NAME = exports.SECONDARY_HOST_ADDRESS = exports.HOST_ADDRESS = exports.BASE_PATH = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const jsonBigint = __nccwpck_require__(55031); -const gcp_residency_1 = __nccwpck_require__(51904); -exports.BASE_PATH = '/computeMetadata/v1'; -exports.HOST_ADDRESS = 'http://169.254.169.254'; -exports.SECONDARY_HOST_ADDRESS = 'http://metadata.google.internal.'; -exports.HEADER_NAME = 'Metadata-Flavor'; -exports.HEADER_VALUE = 'Google'; -exports.HEADERS = Object.freeze({ [exports.HEADER_NAME]: exports.HEADER_VALUE }); +exports.env = exports.DebugLogBackendBase = exports.placeholder = exports.AdhocDebugLogger = exports.LogSeverity = void 0; +exports.getNodeBackend = getNodeBackend; +exports.getDebugBackend = getDebugBackend; +exports.getStructuredBackend = getStructuredBackend; +exports.setBackend = setBackend; +exports.log = log; +const node_events_1 = __nccwpck_require__(15673); +const process = __importStar(__nccwpck_require__(97742)); +const util = __importStar(__nccwpck_require__(47261)); +const colours_1 = __nccwpck_require__(74118); +// Some functions (as noted) are based on the Node standard library, from +// the following file: +// +// https://github.com/nodejs/node/blob/main/lib/internal/util/debuglog.js /** - * Metadata server detection override options. + * This module defines an ad-hoc debug logger for Google Cloud Platform + * client libraries in Node. An ad-hoc debug logger is a tool which lets + * users use an external, unified interface (in this case, environment + * variables) to determine what logging they want to see at runtime. This + * isn't necessarily fed into the console, but is meant to be under the + * control of the user. The kind of logging that will be produced by this + * is more like "call retry happened", not "event you'd want to record + * in Cloud Logger". * - * Available via `process.env.METADATA_SERVER_DETECTION`. + * More for Googlers implementing libraries with it: + * go/cloud-client-logging-design */ -exports.METADATA_SERVER_DETECTION = Object.freeze({ - 'assume-present': "don't try to ping the metadata server, but assume it's present", - none: "don't try to ping the metadata server, but don't try to use it either", - 'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)", - 'ping-only': 'skip the BIOS probe, and go straight to pinging', -}); /** - * Returns the base URL while taking into account the GCE_METADATA_HOST - * environment variable if it exists. - * - * @returns The base URL, e.g., http://169.254.169.254/computeMetadata/v1. + * Possible log levels. These are a subset of Cloud Observability levels. + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity */ -function getBaseUrl(baseUrl) { - if (!baseUrl) { - baseUrl = - process.env.GCE_METADATA_IP || - process.env.GCE_METADATA_HOST || - exports.HOST_ADDRESS; - } - // If no scheme is provided default to HTTP: - if (!/^https?:\/\//.test(baseUrl)) { - baseUrl = `http://${baseUrl}`; +var LogSeverity; +(function (LogSeverity) { + LogSeverity["DEFAULT"] = "DEFAULT"; + LogSeverity["DEBUG"] = "DEBUG"; + LogSeverity["INFO"] = "INFO"; + LogSeverity["WARNING"] = "WARNING"; + LogSeverity["ERROR"] = "ERROR"; +})(LogSeverity || (exports.LogSeverity = LogSeverity = {})); +/** + * Our logger instance. This actually contains the meat of dealing + * with log lines, including EventEmitter. This contains the function + * that will be passed back to users of the package. + */ +class AdhocDebugLogger extends node_events_1.EventEmitter { + /** + * @param upstream The backend will pass a function that will be + * called whenever our logger function is invoked. + */ + constructor(namespace, upstream) { + super(); + this.namespace = namespace; + this.upstream = upstream; + this.func = Object.assign(this.invoke.bind(this), { + // Also add an instance pointer back to us. + instance: this, + // And pull over the EventEmitter functionality. + on: (event, listener) => this.on(event, listener), + }); + // Convenience methods for log levels. + this.func.debug = (...args) => this.invokeSeverity(LogSeverity.DEBUG, ...args); + this.func.info = (...args) => this.invokeSeverity(LogSeverity.INFO, ...args); + this.func.warn = (...args) => this.invokeSeverity(LogSeverity.WARNING, ...args); + this.func.error = (...args) => this.invokeSeverity(LogSeverity.ERROR, ...args); + this.func.sublog = (namespace) => log(namespace, this.func); } - return new URL(exports.BASE_PATH, baseUrl).href; -} -// Accepts an options object passed from the user to the API. In previous -// versions of the API, it referred to a `Request` or an `Axios` request -// options object. Now it refers to an object with very limited property -// names. This is here to help ensure users don't pass invalid options when -// they upgrade from 0.4 to 0.5 to 0.8. -function validate(options) { - Object.keys(options).forEach(key => { - switch (key) { - case 'params': - case 'property': - case 'headers': - break; - case 'qs': - throw new Error("'qs' is not a valid configuration option. Please use 'params' instead."); - default: - throw new Error(`'${key}' is not a valid configuration option.`); + invoke(fields, ...args) { + // Push out any upstream logger first. + if (this.upstream) { + this.upstream(fields, ...args); } - }); -} -async function metadataAccessor(type, options = {}, noResponseRetries = 3, fastFail = false) { - let metadataKey = ''; - let params = {}; - let headers = {}; - if (typeof type === 'object') { - const metadataAccessor = type; - metadataKey = metadataAccessor.metadataKey; - params = metadataAccessor.params || params; - headers = metadataAccessor.headers || headers; - noResponseRetries = metadataAccessor.noResponseRetries || noResponseRetries; - fastFail = metadataAccessor.fastFail || fastFail; - } - else { - metadataKey = type; - } - if (typeof options === 'string') { - metadataKey += `/${options}`; + // Emit sink events. + this.emit('log', fields, args); } - else { - validate(options); - if (options.property) { - metadataKey += `/${options.property}`; - } - headers = options.headers || headers; - params = options.params || params; + invokeSeverity(severity, ...args) { + this.invoke({ severity }, ...args); } - try { - const requestMethod = fastFail ? fastFailMetadataRequest : gaxios_1.request; - const res = await requestMethod({ - url: `${getBaseUrl()}/${metadataKey}`, - headers: { ...exports.HEADERS, ...headers }, - retryConfig: { noResponseRetries }, - params, - responseType: 'text', - timeout: requestTimeout(), - }); - // NOTE: node.js converts all incoming headers to lower case. - if (res.headers[exports.HEADER_NAME.toLowerCase()] !== exports.HEADER_VALUE) { - throw new Error(`Invalid response from metadata service: incorrect ${exports.HEADER_NAME} header.`); - } - else if (!res.data) { - throw new Error('Invalid response from the metadata service'); - } - if (typeof res.data === 'string') { - try { - return jsonBigint.parse(res.data); +} +exports.AdhocDebugLogger = AdhocDebugLogger; +/** + * This can be used in place of a real logger while waiting for Promises or disabling logging. + */ +exports.placeholder = new AdhocDebugLogger('', () => { }).func; +/** + * The base class for debug logging backends. It's possible to use this, but the + * same non-guarantees above still apply (unstable interface, etc). + * + * @private + * @internal + */ +class DebugLogBackendBase { + constructor() { + var _a; + this.cached = new Map(); + this.filters = []; + this.filtersSet = false; + // Look for the Node config variable for what systems to enable. We'll store + // these for the log method below, which will call setFilters() once. + let nodeFlag = (_a = process.env[exports.env.nodeEnables]) !== null && _a !== void 0 ? _a : '*'; + if (nodeFlag === 'all') { + nodeFlag = '*'; + } + this.filters = nodeFlag.split(','); + } + log(namespace, fields, ...args) { + try { + if (!this.filtersSet) { + this.setFilters(); + this.filtersSet = true; } - catch (_a) { - /* ignore */ + let logger = this.cached.get(namespace); + if (!logger) { + logger = this.makeLogger(namespace); + this.cached.set(namespace, logger); } + logger(fields, ...args); } - return res.data; - } - catch (e) { - const err = e; - if (err.response && err.response.status !== 200) { - err.message = `Unsuccessful response status code. ${err.message}`; + catch (e) { + // Silently ignore all errors; we don't want them to interfere with + // the user's running app. + // e; + console.error(e); } - throw e; } } -async function fastFailMetadataRequest(options) { - const secondaryOptions = { - ...options, - url: options.url.replace(getBaseUrl(), getBaseUrl(exports.SECONDARY_HOST_ADDRESS)), - }; - // We race a connection between DNS/IP to metadata server. There are a couple - // reasons for this: - // - // 1. the DNS is slow in some GCP environments; by checking both, we might - // detect the runtime environment signficantly faster. - // 2. we can't just check the IP, which is tarpitted and slow to respond - // on a user's local machine. - // - // Additional logic has been added to make sure that we don't create an - // unhandled rejection in scenarios where a failure happens sometime - // after a success. - // - // Note, however, if a failure happens prior to a success, a rejection should - // occur, this is for folks running locally. - // - let responded = false; - const r1 = (0, gaxios_1.request)(options) - .then(res => { - responded = true; - return res; - }) - .catch(err => { - if (responded) { - return r2; - } - else { - responded = true; - throw err; - } - }); - const r2 = (0, gaxios_1.request)(secondaryOptions) - .then(res => { - responded = true; - return res; - }) - .catch(err => { - if (responded) { - return r1; - } - else { - responded = true; - throw err; +exports.DebugLogBackendBase = DebugLogBackendBase; +// The basic backend. This one definitely works, but it's less feature-filled. +// +// Rather than using util.debuglog, this implements the same basic logic directly. +// The reason for this decision is that debuglog checks the value of the +// NODE_DEBUG environment variable before any user code runs; we therefore +// can't pipe our own enables into it (and util.debuglog will never print unless +// the user duplicates it into NODE_DEBUG, which isn't reasonable). +// +class NodeBackend extends DebugLogBackendBase { + constructor() { + super(...arguments); + // Default to allowing all systems, since we gate earlier based on whether the + // variable is empty. + this.enabledRegexp = /.*/g; + } + isEnabled(namespace) { + return this.enabledRegexp.test(namespace); + } + makeLogger(namespace) { + if (!this.enabledRegexp.test(namespace)) { + return () => { }; } - }); - return Promise.race([r1, r2]); + return (fields, ...args) => { + var _a; + // TODO: `fields` needs to be turned into a string here, one way or another. + const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`; + const pid = `${colours_1.Colours.yellow}${process.pid}${colours_1.Colours.reset}`; + let level; + switch (fields.severity) { + case LogSeverity.ERROR: + level = `${colours_1.Colours.red}${fields.severity}${colours_1.Colours.reset}`; + break; + case LogSeverity.INFO: + level = `${colours_1.Colours.magenta}${fields.severity}${colours_1.Colours.reset}`; + break; + case LogSeverity.WARNING: + level = `${colours_1.Colours.yellow}${fields.severity}${colours_1.Colours.reset}`; + break; + default: + level = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.DEFAULT; + break; + } + const msg = util.formatWithOptions({ colors: colours_1.Colours.enabled }, ...args); + const filteredFields = Object.assign({}, fields); + delete filteredFields.severity; + const fieldsJson = Object.getOwnPropertyNames(filteredFields).length + ? JSON.stringify(filteredFields) + : ''; + const fieldsColour = fieldsJson + ? `${colours_1.Colours.grey}${fieldsJson}${colours_1.Colours.reset}` + : ''; + console.error('%s [%s|%s] %s%s', pid, nscolour, level, msg, fieldsJson ? ` ${fieldsColour}` : ''); + }; + } + // Regexp patterns below are from here: + // https://github.com/nodejs/node/blob/c0aebed4b3395bd65d54b18d1fd00f071002ac20/lib/internal/util/debuglog.js#L36 + setFilters() { + const totalFilters = this.filters.join(','); + const regexp = totalFilters + .replace(/[|\\{}()[\]^$+?.]/g, '\\$&') + .replace(/\*/g, '.*') + .replace(/,/g, '$|^'); + this.enabledRegexp = new RegExp(`^${regexp}$`, 'i'); + } } /** - * Obtain metadata for the current GCE instance. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} - * - * @example - * ``` - * const serviceAccount: {} = await instance('service-accounts/'); - * const serviceAccountEmail: string = await instance('service-accounts/default/email'); - * ``` + * @returns A backend based on Node util.debuglog; this is the default. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function instance(options) { - return metadataAccessor('instance', options); +function getNodeBackend() { + return new NodeBackend(); } -exports.instance = instance; -/** - * Obtain metadata for the current GCP project. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} - * - * @example - * ``` - * const projectId: string = await project('project-id'); - * const numericProjectId: number = await project('numeric-project-id'); - * ``` - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function project(options) { - return metadataAccessor('project', options); +class DebugBackend extends DebugLogBackendBase { + constructor(pkg) { + super(); + this.debugPkg = pkg; + } + makeLogger(namespace) { + const debugLogger = this.debugPkg(namespace); + return (fields, ...args) => { + // TODO: `fields` needs to be turned into a string here. + debugLogger(args[0], ...args.slice(1)); + }; + } + setFilters() { + var _a; + const existingFilters = (_a = process.env['NODE_DEBUG']) !== null && _a !== void 0 ? _a : ''; + process.env['NODE_DEBUG'] = `${existingFilters}${existingFilters ? ',' : ''}${this.filters.join(',')}`; + } } -exports.project = project; /** - * Obtain metadata for the current universe. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} + * Creates a "debug" package backend. The user must call require('debug') and pass + * the resulting object to this function. * - * @example * ``` - * const universeDomain: string = await universe('universe_domain'); + * setBackend(getDebugBackend(require('debug'))) * ``` - */ -function universe(options) { - return metadataAccessor('universe', options); -} -exports.universe = universe; -/** - * Retrieve metadata items in parallel. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} * - * @example - * ``` - * const data = await bulk([ - * { - * metadataKey: 'instance', - * }, - * { - * metadataKey: 'project/project-id', - * }, - * ] as const); + * https://www.npmjs.com/package/debug * - * // data.instance; - * // data['project/project-id']; - * ``` + * Note: Google does not explicitly endorse or recommend this package; it's just + * being provided as an option. * - * @param properties The metadata properties to retrieve - * @returns The metadata in `metadatakey:value` format - */ -async function bulk(properties) { - const r = {}; - await Promise.all(properties.map(item => { - return (async () => { - const res = await metadataAccessor(item); - const key = item.metadataKey; - r[key] = res; - })(); - })); - return r; -} -exports.bulk = bulk; -/* - * How many times should we retry detecting GCP environment. + * @returns A backend based on the npm "debug" package. */ -function detectGCPAvailableRetries() { - return process.env.DETECT_GCP_RETRIES - ? Number(process.env.DETECT_GCP_RETRIES) - : 0; +function getDebugBackend(debugPkg) { + return new DebugBackend(debugPkg); } -let cachedIsAvailableResponse; /** - * Determine if the metadata server is currently available. + * This pretty much works like the Node logger, but it outputs structured + * logging JSON matching Google Cloud's ingestion specs. Rather than handling + * its own output, it wraps another backend. The passed backend must be a subclass + * of `DebugLogBackendBase` (any of the backends exposed by this package will work). */ -async function isAvailable() { - if (process.env.METADATA_SERVER_DETECTION) { - const value = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase(); - if (!(value in exports.METADATA_SERVER_DETECTION)) { - throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${value}\`, but it should be \`${Object.keys(exports.METADATA_SERVER_DETECTION).join('`, `')}\`, or unset`); - } - switch (value) { - case 'assume-present': - return true; - case 'none': - return false; - case 'bios-only': - return getGCPResidency(); - case 'ping-only': - // continue, we want to ping the server - } +class StructuredBackend extends DebugLogBackendBase { + constructor(upstream) { + var _a; + super(); + this.upstream = (_a = upstream) !== null && _a !== void 0 ? _a : new NodeBackend(); } - try { - // If a user is instantiating several GCP libraries at the same time, - // this may result in multiple calls to isAvailable(), to detect the - // runtime environment. We use the same promise for each of these calls - // to reduce the network load. - if (cachedIsAvailableResponse === undefined) { - cachedIsAvailableResponse = metadataAccessor('instance', undefined, detectGCPAvailableRetries(), - // If the default HOST_ADDRESS has been overridden, we should not - // make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in - // a non-GCP environment): - !(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST)); - } - await cachedIsAvailableResponse; - return true; + makeLogger(namespace) { + const debugLogger = this.upstream.makeLogger(namespace); + return (fields, ...args) => { + var _a; + const severity = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.INFO; + const json = Object.assign({ + severity, + message: util.format(...args), + }, fields); + const jsonString = JSON.stringify(json); + debugLogger(fields, jsonString); + }; } - catch (e) { - const err = e; - if (process.env.DEBUG_AUTH) { - console.info(err); - } - if (err.type === 'request-timeout') { - // If running in a GCP environment, metadata endpoint should return - // within ms. - return false; - } - if (err.response && err.response.status === 404) { - return false; - } - else { - if (!(err.response && err.response.status === 404) && - // A warning is emitted if we see an unexpected err.code, or err.code - // is not populated: - (!err.code || - ![ - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'ENETUNREACH', - 'ENOENT', - 'ENOTFOUND', - 'ECONNREFUSED', - ].includes(err.code))) { - let code = 'UNKNOWN'; - if (err.code) - code = err.code; - process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning'); - } - // Failure to resolve the metadata service means that it is not available. - return false; - } + setFilters() { + this.upstream.setFilters(); } } -exports.isAvailable = isAvailable; /** - * reset the memoized isAvailable() lookup. + * Creates a "structured logging" backend. This pretty much works like the + * Node logger, but it outputs structured logging JSON matching Google + * Cloud's ingestion specs instead of plain text. + * + * ``` + * setBackend(getStructuredBackend()) + * ``` + * + * @param upstream If you want to use something besides the Node backend to + * write the actual log lines into, pass that here. + * @returns A backend based on Google Cloud structured logging. */ -function resetIsAvailableCache() { - cachedIsAvailableResponse = undefined; +function getStructuredBackend(upstream) { + return new StructuredBackend(upstream); } -exports.resetIsAvailableCache = resetIsAvailableCache; -/** - * A cache for the detected GCP Residency. - */ -exports.gcpResidencyCache = null; /** - * Detects GCP Residency. - * Caches results to reduce costs for subsequent calls. - * - * @see setGCPResidency for setting + * The environment variables that we standardized on, for all ad-hoc logging. */ -function getGCPResidency() { - if (exports.gcpResidencyCache === null) { - setGCPResidency(); - } - return exports.gcpResidencyCache; -} -exports.getGCPResidency = getGCPResidency; +exports.env = { + /** + * Filter wildcards specific to the Node syntax, and similar to the built-in + * utils.debuglog() environment variable. If missing, disables logging. + */ + nodeEnables: 'GOOGLE_SDK_NODE_LOGGING', +}; +// Keep a copy of all namespaced loggers so users can reliably .on() them. +// Note that these cached functions will need to deal with changes in the backend. +const loggerCache = new Map(); +// Our current global backend. This might be: +let cachedBackend = undefined; /** - * Sets the detected GCP Residency. - * Useful for forcing metadata server detection behavior. + * Set the backend to use for our log output. + * - A backend object + * - null to disable logging + * - undefined for "nothing yet", defaults to the Node backend * - * Set `null` to autodetect the environment (default behavior). - * @see getGCPResidency for getting + * @param backend Results from one of the get*Backend() functions. */ -function setGCPResidency(value = null) { - exports.gcpResidencyCache = value !== null ? value : (0, gcp_residency_1.detectGCPResidency)(); +function setBackend(backend) { + cachedBackend = backend; + loggerCache.clear(); } -exports.setGCPResidency = setGCPResidency; /** - * Obtain the timeout for requests to the metadata server. + * Creates a logging function. Multiple calls to this with the same namespace + * will produce the same logger, with the same event emitter hooks. * - * In certain environments and conditions requests can take longer than - * the default timeout to complete. This function will determine the - * appropriate timeout based on the environment. + * Namespaces can be a simple string ("system" name), or a qualified string + * (system:subsystem), which can be used for filtering, or for "system:*". * - * @returns {number} a request timeout duration in milliseconds. + * @param namespace The namespace, a descriptive text string. + * @returns A function you can call that works similar to console.log(). */ -function requestTimeout() { - return getGCPResidency() ? 0 : 3000; +function log(namespace, parent) { + // If the enable flag isn't set, do nothing. + const enablesFlag = process.env[exports.env.nodeEnables]; + if (!enablesFlag) { + return exports.placeholder; + } + // This might happen mostly if the typings are dropped in a user's code, + // or if they're calling from JavaScript. + if (!namespace) { + return exports.placeholder; + } + // Handle sub-loggers. + if (parent) { + namespace = `${parent.instance.namespace}:${namespace}`; + } + // Reuse loggers so things like event sinks are persistent. + const existing = loggerCache.get(namespace); + if (existing) { + return existing.func; + } + // Do we have a backend yet? + if (cachedBackend === null) { + // Explicitly disabled. + return exports.placeholder; + } + else if (cachedBackend === undefined) { + // One hasn't been made yet, so default to Node. + cachedBackend = getNodeBackend(); + } + // The logger is further wrapped so we can handle the backend changing out. + const logger = (() => { + let previousBackend = undefined; + const newLogger = new AdhocDebugLogger(namespace, (fields, ...args) => { + if (previousBackend !== cachedBackend) { + // Did the user pass a custom backend? + if (cachedBackend === null) { + // Explicitly disabled. + return; + } + else if (cachedBackend === undefined) { + // One hasn't been made yet, so default to Node. + cachedBackend = getNodeBackend(); + } + previousBackend = cachedBackend; + } + cachedBackend === null || cachedBackend === void 0 ? void 0 : cachedBackend.log(namespace, fields, ...args); + }); + return newLogger; + })(); + loggerCache.set(namespace, logger); + return logger.func; +} +//# sourceMappingURL=logging-utils.js.map + +/***/ }), + +/***/ 57087: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./gOPD')} */ +module.exports = Object.getOwnPropertyDescriptor; + + +/***/ }), + +/***/ 18501: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** @type {import('.')} */ +var $gOPD = __nccwpck_require__(57087); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } } -exports.requestTimeout = requestTimeout; -__exportStar(__nccwpck_require__(51904), exports); -//# sourceMappingURL=index.js.map + +module.exports = $gOPD; + /***/ }), -/***/ 44627: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 76031: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// Copyright 2012 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthClient = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = exports.DEFAULT_UNIVERSE = void 0; -const events_1 = __nccwpck_require__(82361); -const gaxios_1 = __nccwpck_require__(59555); -const transporters_1 = __nccwpck_require__(72649); -const util_1 = __nccwpck_require__(68905); /** - * The default cloud universe + * Copyright 2018 Google LLC * - * @see {@link AuthJSONOptions.universe_domain} - */ -exports.DEFAULT_UNIVERSE = 'googleapis.com'; -/** - * The default {@link AuthClientOptions.eagerRefreshThresholdMillis} + * Distributed under MIT license. + * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ -exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1000; -class AuthClient extends events_1.EventEmitter { - constructor(opts = {}) { - var _a, _b, _c, _d, _e; - super(); - this.credentials = {}; - this.eagerRefreshThresholdMillis = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS; - this.forceRefreshOnFailure = false; - this.universeDomain = exports.DEFAULT_UNIVERSE; - const options = (0, util_1.originalOrCamelOptions)(opts); - // Shared auth options - this.projectId = (_a = options.get('project_id')) !== null && _a !== void 0 ? _a : null; - this.quotaProjectId = options.get('quota_project_id'); - this.credentials = (_b = options.get('credentials')) !== null && _b !== void 0 ? _b : {}; - this.universeDomain = (_c = options.get('universe_domain')) !== null && _c !== void 0 ? _c : exports.DEFAULT_UNIVERSE; - // Shared client options - this.transporter = (_d = opts.transporter) !== null && _d !== void 0 ? _d : new transporters_1.DefaultTransporter(); - if (opts.transporterOptions) { - this.transporter.defaults = opts.transporterOptions; - } - if (opts.eagerRefreshThresholdMillis) { - this.eagerRefreshThresholdMillis = opts.eagerRefreshThresholdMillis; - } - this.forceRefreshOnFailure = (_e = opts.forceRefreshOnFailure) !== null && _e !== void 0 ? _e : false; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _GoogleToken_instances, _GoogleToken_inFlightRequest, _GoogleToken_getTokenAsync, _GoogleToken_getTokenAsyncInner, _GoogleToken_ensureEmail, _GoogleToken_revokeTokenAsync, _GoogleToken_configure, _GoogleToken_requestToken; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GoogleToken = void 0; +const fs = __nccwpck_require__(57147); +const gaxios_1 = __nccwpck_require__(59555); +const jws = __nccwpck_require__(4636); +const path = __nccwpck_require__(71017); +const util_1 = __nccwpck_require__(73837); +const readFile = fs.readFile + ? (0, util_1.promisify)(fs.readFile) + : async () => { + // if running in the web-browser, fs.readFile may not have been shimmed. + throw new ErrorWithCode('use key rather than keyFile.', 'MISSING_CREDENTIALS'); + }; +const GOOGLE_TOKEN_URL = 'https://www.googleapis.com/oauth2/v4/token'; +const GOOGLE_REVOKE_TOKEN_URL = 'https://accounts.google.com/o/oauth2/revoke?token='; +class ErrorWithCode extends Error { + constructor(message, code) { + super(message); + this.code = code; + } +} +class GoogleToken { + get accessToken() { + return this.rawToken ? this.rawToken.access_token : undefined; + } + get idToken() { + return this.rawToken ? this.rawToken.id_token : undefined; + } + get tokenType() { + return this.rawToken ? this.rawToken.token_type : undefined; + } + get refreshToken() { + return this.rawToken ? this.rawToken.refresh_token : undefined; } /** - * Return the {@link Gaxios `Gaxios`} instance from the {@link AuthClient.transporter}. + * Create a GoogleToken. * - * @expiremental + * @param options Configuration object. */ - get gaxios() { - if (this.transporter instanceof gaxios_1.Gaxios) { - return this.transporter; - } - else if (this.transporter instanceof transporters_1.DefaultTransporter) { - return this.transporter.instance; - } - else if ('instance' in this.transporter && - this.transporter.instance instanceof gaxios_1.Gaxios) { - return this.transporter.instance; - } - return null; + constructor(options) { + _GoogleToken_instances.add(this); + this.transporter = { + request: opts => (0, gaxios_1.request)(opts), + }; + _GoogleToken_inFlightRequest.set(this, void 0); + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, options); } /** - * Sets the auth credentials. + * Returns whether the token has expired. + * + * @return true if the token has expired, false otherwise. */ - setCredentials(credentials) { - this.credentials = credentials; + hasExpired() { + const now = new Date().getTime(); + if (this.rawToken && this.expiresAt) { + return now >= this.expiresAt; + } + else { + return true; + } } /** - * Append additional headers, e.g., x-goog-user-project, shared across the - * classes inheriting AuthClient. This method should be used by any method - * that overrides getRequestMetadataAsync(), which is a shared helper for - * setting request information in both gRPC and HTTP API calls. + * Returns whether the token will expire within eagerRefreshThresholdMillis * - * @param headers object to append additional headers to. + * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. */ - addSharedMetadataHeaders(headers) { - // quota_project_id, stored in application_default_credentials.json, is set in - // the x-goog-user-project header, to indicate an alternate account for - // billing and quota: - if (!headers['x-goog-user-project'] && // don't override a value the user sets. - this.quotaProjectId) { - headers['x-goog-user-project'] = this.quotaProjectId; + isTokenExpiring() { + var _a; + const now = new Date().getTime(); + const eagerRefreshThresholdMillis = (_a = this.eagerRefreshThresholdMillis) !== null && _a !== void 0 ? _a : 0; + if (this.rawToken && this.expiresAt) { + return this.expiresAt <= now + eagerRefreshThresholdMillis; } - return headers; + else { + return true; + } + } + getToken(callback, opts = {}) { + if (typeof callback === 'object') { + opts = callback; + callback = undefined; + } + opts = Object.assign({ + forceRefresh: false, + }, opts); + if (callback) { + const cb = callback; + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts).then(t => cb(null, t), callback); + return; + } + return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts); } /** - * Retry config for Auth-related requests. - * - * @remarks - * - * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} - * config as some downstream APIs would prefer if customers explicitly enable retries, - * such as GCS. + * Given a keyFile, extract the key and client email if available + * @param keyFile Path to a json, pem, or p12 file that contains the key. + * @returns an object with privateKey and clientEmail properties */ - static get RETRY_CONFIG() { - return { - retry: true, + async getCredentials(keyFile) { + const ext = path.extname(keyFile); + switch (ext) { + case '.json': { + const key = await readFile(keyFile, 'utf8'); + const body = JSON.parse(key); + const privateKey = body.private_key; + const clientEmail = body.client_email; + if (!privateKey || !clientEmail) { + throw new ErrorWithCode('private_key and client_email are required.', 'MISSING_CREDENTIALS'); + } + return { privateKey, clientEmail }; + } + case '.der': + case '.crt': + case '.pem': { + const privateKey = await readFile(keyFile, 'utf8'); + return { privateKey }; + } + case '.p12': + case '.pfx': { + throw new ErrorWithCode('*.p12 certificates are not supported after v6.1.2. ' + + 'Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.', 'UNKNOWN_CERTIFICATE_TYPE'); + } + default: + throw new ErrorWithCode('Unknown certificate type. Type is determined based on file extension. ' + + 'Current supported extensions are *.json, and *.pem.', 'UNKNOWN_CERTIFICATE_TYPE'); + } + } + revokeToken(callback) { + if (callback) { + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this).then(() => callback(), callback); + return; + } + return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this); + } +} +exports.GoogleToken = GoogleToken; +_GoogleToken_inFlightRequest = new WeakMap(), _GoogleToken_instances = new WeakSet(), _GoogleToken_getTokenAsync = async function _GoogleToken_getTokenAsync(opts) { + if (__classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f") && !opts.forceRefresh) { + return __classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f"); + } + try { + return await (__classPrivateFieldSet(this, _GoogleToken_inFlightRequest, __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsyncInner).call(this, opts), "f")); + } + finally { + __classPrivateFieldSet(this, _GoogleToken_inFlightRequest, undefined, "f"); + } +}, _GoogleToken_getTokenAsyncInner = async function _GoogleToken_getTokenAsyncInner(opts) { + if (this.isTokenExpiring() === false && opts.forceRefresh === false) { + return Promise.resolve(this.rawToken); + } + if (!this.key && !this.keyFile) { + throw new Error('No key or keyFile set.'); + } + if (!this.key && this.keyFile) { + const creds = await this.getCredentials(this.keyFile); + this.key = creds.privateKey; + this.iss = creds.clientEmail || this.iss; + if (!creds.clientEmail) { + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_ensureEmail).call(this); + } + } + return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_requestToken).call(this); +}, _GoogleToken_ensureEmail = function _GoogleToken_ensureEmail() { + if (!this.iss) { + throw new ErrorWithCode('email is required.', 'MISSING_CREDENTIALS'); + } +}, _GoogleToken_revokeTokenAsync = async function _GoogleToken_revokeTokenAsync() { + if (!this.accessToken) { + throw new Error('No token to revoke.'); + } + const url = GOOGLE_REVOKE_TOKEN_URL + this.accessToken; + await this.transporter.request({ + url, + retry: true, + }); + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, { + email: this.iss, + sub: this.sub, + key: this.key, + keyFile: this.keyFile, + scope: this.scope, + additionalClaims: this.additionalClaims, + }); +}, _GoogleToken_configure = function _GoogleToken_configure(options = {}) { + this.keyFile = options.keyFile; + this.key = options.key; + this.rawToken = undefined; + this.iss = options.email || options.iss; + this.sub = options.sub; + this.additionalClaims = options.additionalClaims; + if (typeof options.scope === 'object') { + this.scope = options.scope.join(' '); + } + else { + this.scope = options.scope; + } + this.eagerRefreshThresholdMillis = options.eagerRefreshThresholdMillis; + if (options.transporter) { + this.transporter = options.transporter; + } +}, _GoogleToken_requestToken = +/** + * Request the token from Google. + */ +async function _GoogleToken_requestToken() { + var _a, _b; + const iat = Math.floor(new Date().getTime() / 1000); + const additionalClaims = this.additionalClaims || {}; + const payload = Object.assign({ + iss: this.iss, + scope: this.scope, + aud: GOOGLE_TOKEN_URL, + exp: iat + 3600, + iat, + sub: this.sub, + }, additionalClaims); + const signedJWT = jws.sign({ + header: { alg: 'RS256' }, + payload, + secret: this.key, + }); + try { + const r = await this.transporter.request({ + method: 'POST', + url: GOOGLE_TOKEN_URL, + data: { + grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', + assertion: signedJWT, + }, + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + responseType: 'json', retryConfig: { - httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], + httpMethodsToRetry: ['POST'], }, - }; + }); + this.rawToken = r.data; + this.expiresAt = + r.data.expires_in === null || r.data.expires_in === undefined + ? undefined + : (iat + r.data.expires_in) * 1000; + return this.rawToken; } -} -exports.AuthClient = AuthClient; + catch (e) { + this.rawToken = undefined; + this.tokenExpires = undefined; + const body = e.response && ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) + ? (_b = e.response) === null || _b === void 0 ? void 0 : _b.data + : {}; + if (body.error) { + const desc = body.error_description + ? `: ${body.error_description}` + : ''; + e.message = `${body.error}${desc}`; + } + throw e; + } +}; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 31621: +/***/ ((module) => { + +"use strict"; + + +module.exports = (flag, argv = process.argv) => { + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf('--'); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); +}; /***/ }), -/***/ 71569: +/***/ 40587: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __nccwpck_require__(57747); + +/** @type {import('.')} */ +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 57747: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./shams')} */ +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + // eslint-disable-next-line no-extra-parens + var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 99038: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var hasSymbols = __nccwpck_require__(57747); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ 62157: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __nccwpck_require__(88334); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); + + +/***/ }), + +/***/ 23764: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// Copyright 2021 Google LLC -// -// 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. -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; }; -var _a, _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsClient = void 0; -const awsrequestsigner_1 = __nccwpck_require__(1754); -const baseexternalclient_1 = __nccwpck_require__(40810); -const defaultawssecuritycredentialssupplier_1 = __nccwpck_require__(89799); -const util_1 = __nccwpck_require__(68905); -/** - * AWS external account client. This is used for AWS workloads, where - * AWS STS GetCallerIdentity serialized signed requests are exchanged for - * GCP access token. - */ -class AwsClient extends baseexternalclient_1.BaseExternalAccountClient { - /** - * Instantiates an AwsClient instance using the provided JSON - * object loaded from an external account credentials file. - * An error is thrown if the credential is not a valid AWS credential. - * @param options The external account options object typically loaded - * from the external account JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - super(options, additionalOptions); - const opts = (0, util_1.originalOrCamelOptions)(options); - const credentialSource = opts.get('credential_source'); - const awsSecurityCredentialsSupplier = opts.get('aws_security_credentials_supplier'); - // Validate credential sourcing configuration. - if (!credentialSource && !awsSecurityCredentialsSupplier) { - throw new Error('A credential source or AWS security credentials supplier must be specified.'); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpProxyAgent = void 0; +const net = __importStar(__nccwpck_require__(41808)); +const tls = __importStar(__nccwpck_require__(24404)); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const events_1 = __nccwpck_require__(82361); +const agent_base_1 = __nccwpck_require__(70694); +const url_1 = __nccwpck_require__(57310); +const debug = (0, debug_1.default)('http-proxy-agent'); +/** + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects + * to the specified "HTTP proxy server" in order to proxy HTTP requests. + */ +class HttpProxyAgent extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug('Creating new HttpProxyAgent instance: %o', this.proxy.href); + // Trim off the brackets from IPv6 addresses + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); + const port = this.proxy.port + ? parseInt(this.proxy.port, 10) + : this.proxy.protocol === 'https:' + ? 443 + : 80; + this.connectOpts = { + ...(opts ? omit(opts, 'headers') : null), + host, + port, + }; + } + addRequest(req, opts) { + req._header = null; + this.setRequestProps(req, opts); + // @ts-expect-error `addRequest()` isn't defined in `@types/node` + super.addRequest(req, opts); + } + setRequestProps(req, opts) { + const { proxy } = this; + const protocol = opts.secureEndpoint ? 'https:' : 'http:'; + const hostname = req.getHeader('host') || 'localhost'; + const base = `${protocol}//${hostname}`; + const url = new url_1.URL(req.path, base); + if (opts.port !== 80) { + url.port = String(opts.port); } - if (credentialSource && awsSecurityCredentialsSupplier) { - throw new Error('Only one of credential source or AWS security credentials supplier can be specified.'); + // Change the `http.ClientRequest` instance's "path" field + // to the absolute path of the URL that will be requested. + req.path = String(url); + // Inject the `Proxy-Authorization` header if necessary. + const headers = typeof this.proxyHeaders === 'function' + ? this.proxyHeaders() + : { ...this.proxyHeaders }; + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; } - if (awsSecurityCredentialsSupplier) { - this.awsSecurityCredentialsSupplier = awsSecurityCredentialsSupplier; - this.regionalCredVerificationUrl = - __classPrivateFieldGet(_a, _a, "f", _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL); - this.credentialSourceType = 'programmatic'; + if (!headers['Proxy-Connection']) { + headers['Proxy-Connection'] = this.keepAlive + ? 'Keep-Alive' + : 'close'; } - else { - const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); - this.environmentId = credentialSourceOpts.get('environment_id'); - // This is only required if the AWS region is not available in the - // AWS_REGION or AWS_DEFAULT_REGION environment variables. - const regionUrl = credentialSourceOpts.get('region_url'); - // This is only required if AWS security credentials are not available in - // environment variables. - const securityCredentialsUrl = credentialSourceOpts.get('url'); - const imdsV2SessionTokenUrl = credentialSourceOpts.get('imdsv2_session_token_url'); - this.awsSecurityCredentialsSupplier = - new defaultawssecuritycredentialssupplier_1.DefaultAwsSecurityCredentialsSupplier({ - regionUrl: regionUrl, - securityCredentialsUrl: securityCredentialsUrl, - imdsV2SessionTokenUrl: imdsV2SessionTokenUrl, - }); - this.regionalCredVerificationUrl = credentialSourceOpts.get('regional_cred_verification_url'); - this.credentialSourceType = 'aws'; - // Data validators. - this.validateEnvironmentId(); + for (const name of Object.keys(headers)) { + const value = headers[name]; + if (value) { + req.setHeader(name, value); + } } - this.awsRequestSigner = null; - this.region = ''; } - validateEnvironmentId() { - var _b; - const match = (_b = this.environmentId) === null || _b === void 0 ? void 0 : _b.match(/^(aws)(\d+)$/); - if (!match || !this.regionalCredVerificationUrl) { - throw new Error('No valid AWS "credential_source" provided'); + async connect(req, opts) { + req._header = null; + if (!req.path.includes('://')) { + this.setRequestProps(req, opts); } - else if (parseInt(match[2], 10) !== 1) { - throw new Error(`aws version "${match[2]}" is not supported in the current build.`); + // At this point, the http ClientRequest's internal `_header` field + // might have already been set. If this is the case then we'll need + // to re-generate the string since we just changed the `req.path`. + let first; + let endOfHeaders; + debug('Regenerating stored HTTP header string for request'); + req._implicitHeader(); + if (req.outputData && req.outputData.length > 0) { + debug('Patching connection write() output buffer with updated header'); + first = req.outputData[0].data; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.outputData[0].data = + req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.outputData[0].data); } - } - /** - * Triggered when an external subject token is needed to be exchanged for a - * GCP access token via GCP STS endpoint. This will call the - * {@link AwsSecurityCredentialsSupplier} to retrieve an AWS region and AWS - * Security Credentials, then use them to create a signed AWS STS request that - * can be exchanged for a GCP access token. - * @return A promise that resolves with the external subject token. - */ - async retrieveSubjectToken() { - // Initialize AWS request signer if not already initialized. - if (!this.awsRequestSigner) { - this.region = await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext); - this.awsRequestSigner = new awsrequestsigner_1.AwsRequestSigner(async () => { - return this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext); - }, this.region); + // Create a socket connection to the proxy server. + let socket; + if (this.proxy.protocol === 'https:') { + debug('Creating `tls.Socket`: %o', this.connectOpts); + socket = tls.connect(this.connectOpts); } - // Generate signed request to AWS STS GetCallerIdentity API. - // Use the required regional endpoint. Otherwise, the request will fail. - const options = await this.awsRequestSigner.getRequestOptions({ - ..._a.RETRY_CONFIG, - url: this.regionalCredVerificationUrl.replace('{region}', this.region), - method: 'POST', - }); - // The GCP STS endpoint expects the headers to be formatted as: - // [ - // {key: 'x-amz-date', value: '...'}, - // {key: 'Authorization', value: '...'}, - // ... - // ] - // And then serialized as: - // encodeURIComponent(JSON.stringify({ - // url: '...', - // method: 'POST', - // headers: [{key: 'x-amz-date', value: '...'}, ...] - // })) - const reformattedHeader = []; - const extendedHeaders = Object.assign({ - // The full, canonical resource name of the workload identity pool - // provider, with or without the HTTPS prefix. - // Including this header as part of the signature is recommended to - // ensure data integrity. - 'x-goog-cloud-target-resource': this.audience, - }, options.headers); - // Reformat header to GCP STS expected format. - for (const key in extendedHeaders) { - reformattedHeader.push({ - key, - value: extendedHeaders[key], - }); + else { + debug('Creating `net.Socket`: %o', this.connectOpts); + socket = net.connect(this.connectOpts); } - // Serialize the reformatted signed request. - return encodeURIComponent(JSON.stringify({ - url: options.url, - method: options.method, - headers: reformattedHeader, - })); + // Wait for the socket's `connect` event, so that this `callback()` + // function throws instead of the `http` request machinery. This is + // important for i.e. `PacProxyAgent` which determines a failed proxy + // connection via the `callback()` function throwing. + await (0, events_1.once)(socket, 'connect'); + return socket; } } -exports.AwsClient = AwsClient; -_a = AwsClient; -_AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL = { value: 'https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15' }; -/** - * @deprecated AWS client no validates the EC2 metadata address. - **/ -AwsClient.AWS_EC2_METADATA_IPV4_ADDRESS = '169.254.169.254'; -/** - * @deprecated AWS client no validates the EC2 metadata address. - **/ -AwsClient.AWS_EC2_METADATA_IPV6_ADDRESS = 'fd00:ec2::254'; - +HttpProxyAgent.protocols = ['http', 'https']; +exports.HttpProxyAgent = HttpProxyAgent; +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=index.js.map /***/ }), -/***/ 1754: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 77219: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// Copyright 2021 Google LLC -// -// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsRequestSigner = void 0; -const crypto_1 = __nccwpck_require__(78043); -/** AWS Signature Version 4 signing algorithm identifier. */ -const AWS_ALGORITHM = 'AWS4-HMAC-SHA256'; -/** - * The termination string for the AWS credential scope value as defined in - * https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html - */ -const AWS_REQUEST_TYPE = 'aws4_request'; +exports.HttpsProxyAgent = void 0; +const net = __importStar(__nccwpck_require__(41808)); +const tls = __importStar(__nccwpck_require__(24404)); +const assert_1 = __importDefault(__nccwpck_require__(39491)); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const agent_base_1 = __nccwpck_require__(70694); +const url_1 = __nccwpck_require__(57310); +const parse_proxy_response_1 = __nccwpck_require__(595); +const debug = (0, debug_1.default)('https-proxy-agent'); +const setServernameFromNonIpHost = (options) => { + if (options.servername === undefined && + options.host && + !net.isIP(options.host)) { + return { + ...options, + servername: options.host, + }; + } + return options; +}; /** - * Implements an AWS API request signer based on the AWS Signature Version 4 - * signing process. - * https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. */ -class AwsRequestSigner { - /** - * Instantiates an AWS API request signer used to send authenticated signed - * requests to AWS APIs based on the AWS Signature Version 4 signing process. - * This also provides a mechanism to generate the signed request without - * sending it. - * @param getCredentials A mechanism to retrieve AWS security credentials - * when needed. - * @param region The AWS region to use. - */ - constructor(getCredentials, region) { - this.getCredentials = getCredentials; - this.region = region; - this.crypto = (0, crypto_1.createCrypto)(); +class HttpsProxyAgent extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.options = { path: undefined }; + this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); + // Trim off the brackets from IPv6 addresses + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); + const port = this.proxy.port + ? parseInt(this.proxy.port, 10) + : this.proxy.protocol === 'https:' + ? 443 + : 80; + this.connectOpts = { + // Attempt to negotiate http/1.1 for proxy servers that support http/2 + ALPNProtocols: ['http/1.1'], + ...(opts ? omit(opts, 'headers') : null), + host, + port, + }; } /** - * Generates the signed request for the provided HTTP request for calling - * an AWS API. This follows the steps described at: - * https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html - * @param amzOptions The AWS request options that need to be signed. - * @return A promise that resolves with the GaxiosOptions containing the - * signed HTTP request parameters. + * Called when the node-core HTTP client library is creating a + * new HTTP request. */ - async getRequestOptions(amzOptions) { - if (!amzOptions.url) { - throw new Error('"url" is required in "amzOptions"'); + async connect(req, opts) { + const { proxy } = this; + if (!opts.host) { + throw new TypeError('No "host" provided'); } - // Stringify JSON requests. This will be set in the request body of the - // generated signed request. - const requestPayloadData = typeof amzOptions.data === 'object' - ? JSON.stringify(amzOptions.data) - : amzOptions.data; - const url = amzOptions.url; - const method = amzOptions.method || 'GET'; - const requestPayload = amzOptions.body || requestPayloadData; - const additionalAmzHeaders = amzOptions.headers; - const awsSecurityCredentials = await this.getCredentials(); - const uri = new URL(url); - const headerMap = await generateAuthenticationHeaderMap({ - crypto: this.crypto, - host: uri.host, - canonicalUri: uri.pathname, - canonicalQuerystring: uri.search.substr(1), - method, - region: this.region, - securityCredentials: awsSecurityCredentials, - requestPayload, - additionalAmzHeaders, - }); - // Append additional optional headers, eg. X-Amz-Target, Content-Type, etc. - const headers = Object.assign( - // Add x-amz-date if available. - headerMap.amzDate ? { 'x-amz-date': headerMap.amzDate } : {}, { - Authorization: headerMap.authorizationHeader, - host: uri.host, - }, additionalAmzHeaders || {}); - if (awsSecurityCredentials.token) { - Object.assign(headers, { - 'x-amz-security-token': awsSecurityCredentials.token, - }); + // Create a socket connection to the proxy server. + let socket; + if (proxy.protocol === 'https:') { + debug('Creating `tls.Socket`: %o', this.connectOpts); + socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); } - const awsSignedReq = { - url, - method: method, - headers, - }; - if (typeof requestPayload !== 'undefined') { - awsSignedReq.body = requestPayload; + else { + debug('Creating `net.Socket`: %o', this.connectOpts); + socket = net.connect(this.connectOpts); } - return awsSignedReq; - } -} -exports.AwsRequestSigner = AwsRequestSigner; -/** - * Creates the HMAC-SHA256 hash of the provided message using the - * provided key. - * - * @param crypto The crypto instance used to facilitate cryptographic - * operations. - * @param key The HMAC-SHA256 key to use. - * @param msg The message to hash. - * @return The computed hash bytes. - */ -async function sign(crypto, key, msg) { - return await crypto.signWithHmacSha256(key, msg); -} -/** - * Calculates the signing key used to calculate the signature for - * AWS Signature Version 4 based on: - * https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html - * - * @param crypto The crypto instance used to facilitate cryptographic - * operations. - * @param key The AWS secret access key. - * @param dateStamp The '%Y%m%d' date format. - * @param region The AWS region. - * @param serviceName The AWS service name, eg. sts. - * @return The signing key bytes. - */ -async function getSigningKey(crypto, key, dateStamp, region, serviceName) { - const kDate = await sign(crypto, `AWS4${key}`, dateStamp); - const kRegion = await sign(crypto, kDate, region); - const kService = await sign(crypto, kRegion, serviceName); - const kSigning = await sign(crypto, kService, 'aws4_request'); - return kSigning; -} -/** - * Generates the authentication header map needed for generating the AWS - * Signature Version 4 signed request. - * - * @param option The options needed to compute the authentication header map. - * @return The AWS authentication header map which constitutes of the following - * components: amz-date, authorization header and canonical query string. - */ -async function generateAuthenticationHeaderMap(options) { - const additionalAmzHeaders = options.additionalAmzHeaders || {}; - const requestPayload = options.requestPayload || ''; - // iam.amazonaws.com host => iam service. - // sts.us-east-2.amazonaws.com => sts service. - const serviceName = options.host.split('.')[0]; - const now = new Date(); - // Format: '%Y%m%dT%H%M%SZ'. - const amzDate = now - .toISOString() - .replace(/[-:]/g, '') - .replace(/\.[0-9]+/, ''); - // Format: '%Y%m%d'. - const dateStamp = now.toISOString().replace(/[-]/g, '').replace(/T.*/, ''); - // Change all additional headers to be lower case. - const reformattedAdditionalAmzHeaders = {}; - Object.keys(additionalAmzHeaders).forEach(key => { - reformattedAdditionalAmzHeaders[key.toLowerCase()] = - additionalAmzHeaders[key]; - }); - // Add AWS token if available. - if (options.securityCredentials.token) { - reformattedAdditionalAmzHeaders['x-amz-security-token'] = - options.securityCredentials.token; + const headers = typeof this.proxyHeaders === 'function' + ? this.proxyHeaders() + : { ...this.proxyHeaders }; + const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; + let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; + } + headers.Host = `${host}:${opts.port}`; + if (!headers['Proxy-Connection']) { + headers['Proxy-Connection'] = this.keepAlive + ? 'Keep-Alive' + : 'close'; + } + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r\n`; + } + const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); + socket.write(`${payload}\r\n`); + const { connect, buffered } = await proxyResponsePromise; + req.emit('proxyConnect', connect); + this.emit('proxyConnect', connect, req); + if (connect.statusCode === 200) { + req.once('socket', resume); + if (opts.secureEndpoint) { + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + return tls.connect({ + ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'), + socket, + }); + } + return socket; + } + // Some other status code that's not 200... need to re-play the HTTP + // header "data" events onto the socket once the HTTP machinery is + // attached so that the node core `http` can parse and handle the + // error status code. + // Close the original socket, and a new "fake" socket is returned + // instead, so that the proxy doesn't get the HTTP request + // written to it (which may contain `Authorization` headers or other + // sensitive data). + // + // See: https://hackerone.com/reports/541502 + socket.destroy(); + const fakeSocket = new net.Socket({ writable: false }); + fakeSocket.readable = true; + // Need to wait for the "socket" event to re-play the "data" events. + req.once('socket', (s) => { + debug('Replaying proxy buffer for failed request'); + (0, assert_1.default)(s.listenerCount('data') > 0); + // Replay the "buffered" Buffer onto the fake `socket`, since at + // this point the HTTP module machinery has been hooked up for + // the user. + s.push(buffered); + s.push(null); + }); + return fakeSocket; } - // Header keys need to be sorted alphabetically. - const amzHeaders = Object.assign({ - host: options.host, - }, - // Previously the date was not fixed with x-amz- and could be provided manually. - // https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/aws4_testsuite/get-header-value-trim.req - reformattedAdditionalAmzHeaders.date ? {} : { 'x-amz-date': amzDate }, reformattedAdditionalAmzHeaders); - let canonicalHeaders = ''; - const signedHeadersList = Object.keys(amzHeaders).sort(); - signedHeadersList.forEach(key => { - canonicalHeaders += `${key}:${amzHeaders[key]}\n`; - }); - const signedHeaders = signedHeadersList.join(';'); - const payloadHash = await options.crypto.sha256DigestHex(requestPayload); - // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html - const canonicalRequest = `${options.method}\n` + - `${options.canonicalUri}\n` + - `${options.canonicalQuerystring}\n` + - `${canonicalHeaders}\n` + - `${signedHeaders}\n` + - `${payloadHash}`; - const credentialScope = `${dateStamp}/${options.region}/${serviceName}/${AWS_REQUEST_TYPE}`; - // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html - const stringToSign = `${AWS_ALGORITHM}\n` + - `${amzDate}\n` + - `${credentialScope}\n` + - (await options.crypto.sha256DigestHex(canonicalRequest)); - // https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html - const signingKey = await getSigningKey(options.crypto, options.securityCredentials.secretAccessKey, dateStamp, options.region, serviceName); - const signature = await sign(options.crypto, signingKey, stringToSign); - // https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html - const authorizationHeader = `${AWS_ALGORITHM} Credential=${options.securityCredentials.accessKeyId}/` + - `${credentialScope}, SignedHeaders=${signedHeaders}, ` + - `Signature=${(0, crypto_1.fromArrayBufferToHex)(signature)}`; - return { - // Do not return x-amz-date if date is available. - amzDate: reformattedAdditionalAmzHeaders.date ? undefined : amzDate, - authorizationHeader, - canonicalQuerystring: options.canonicalQuerystring, - }; } - +HttpsProxyAgent.protocols = ['http', 'https']; +exports.HttpsProxyAgent = HttpsProxyAgent; +function resume(socket) { + socket.resume(); +} +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=index.js.map /***/ }), -/***/ 40810: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 595: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// Copyright 2021 Google LLC -// -// 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. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BaseExternalAccountClient = exports.DEFAULT_UNIVERSE = exports.CLOUD_RESOURCE_MANAGER = exports.EXTERNAL_ACCOUNT_TYPE = exports.EXPIRATION_TIME_OFFSET = void 0; -const stream = __nccwpck_require__(12781); -const authclient_1 = __nccwpck_require__(44627); -const sts = __nccwpck_require__(86308); -const util_1 = __nccwpck_require__(68905); -/** - * The required token exchange grant_type: rfc8693#section-2.1 - */ -const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; -/** - * The requested token exchange requested_token_type: rfc8693#section-2.1 - */ -const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; -/** The default OAuth scope to request when none is provided. */ -const DEFAULT_OAUTH_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; -/** Default impersonated token lifespan in seconds.*/ -const DEFAULT_TOKEN_LIFESPAN = 3600; -/** - * Offset to take into account network delays and server clock skews. - */ -exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; -/** - * The credentials JSON file type for external account clients. - * There are 3 types of JSON configs: - * 1. authorized_user => Google end user credential - * 2. service_account => Google service account credential - * 3. external_Account => non-GCP service (eg. AWS, Azure, K8s) - */ -exports.EXTERNAL_ACCOUNT_TYPE = 'external_account'; -/** - * Cloud resource manager URL used to retrieve project information. - * - * @deprecated use {@link BaseExternalAccountClient.cloudResourceManagerURL} instead - **/ -exports.CLOUD_RESOURCE_MANAGER = 'https://cloudresourcemanager.googleapis.com/v1/projects/'; -/** The workforce audience pattern. */ -const WORKFORCE_AUDIENCE_PATTERN = '//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+'; -const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/token'; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const pkg = __nccwpck_require__(51402); -/** - * For backwards compatibility. - */ -var authclient_2 = __nccwpck_require__(44627); -Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_2.DEFAULT_UNIVERSE; } })); -/** - * Base external account client. This is used to instantiate AuthClients for - * exchanging external account credentials for GCP access token and authorizing - * requests to GCP APIs. - * The base class implements common logic for exchanging various type of - * external credentials for GCP access token. The logic of determining and - * retrieving the external credential based on the environment and - * credential_source will be left for the subclasses. - */ -class BaseExternalAccountClient extends authclient_1.AuthClient { - /** - * Instantiate a BaseExternalAccountClient instance using the provided JSON - * object loaded from an external account credentials file. - * @param options The external account options object typically loaded - * from the external account JSON credential file. The camelCased options - * are aliases for the snake_cased options. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - var _a; - super({ ...options, ...additionalOptions }); - const opts = (0, util_1.originalOrCamelOptions)(options); - const type = opts.get('type'); - if (type && type !== exports.EXTERNAL_ACCOUNT_TYPE) { - throw new Error(`Expected "${exports.EXTERNAL_ACCOUNT_TYPE}" type but ` + - `received "${options.type}"`); - } - const clientId = opts.get('client_id'); - const clientSecret = opts.get('client_secret'); - const tokenUrl = (_a = opts.get('token_url')) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain); - const subjectTokenType = opts.get('subject_token_type'); - const workforcePoolUserProject = opts.get('workforce_pool_user_project'); - const serviceAccountImpersonationUrl = opts.get('service_account_impersonation_url'); - const serviceAccountImpersonation = opts.get('service_account_impersonation'); - const serviceAccountImpersonationLifetime = (0, util_1.originalOrCamelOptions)(serviceAccountImpersonation).get('token_lifetime_seconds'); - this.cloudResourceManagerURL = new URL(opts.get('cloud_resource_manager_url') || - `https://cloudresourcemanager.${this.universeDomain}/v1/projects/`); - if (clientId) { - this.clientAuth = { - confidentialClientType: 'basic', - clientId, - clientSecret, - }; +exports.parseProxyResponse = void 0; +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); +function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + // we need to buffer any HTTP traffic that happens with the proxy before we get + // the CONNECT response, so that if the response is anything other than an "200" + // response code, then we can re-play the "data" events on the socket once the + // HTTP parser is hooked up... + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once('readable', read); } - this.stsCredential = new sts.StsCredentials(tokenUrl, this.clientAuth); - this.scopes = opts.get('scopes') || [DEFAULT_OAUTH_SCOPE]; - this.cachedAccessToken = null; - this.audience = opts.get('audience'); - this.subjectTokenType = subjectTokenType; - this.workforcePoolUserProject = workforcePoolUserProject; - const workforceAudiencePattern = new RegExp(WORKFORCE_AUDIENCE_PATTERN); - if (this.workforcePoolUserProject && - !this.audience.match(workforceAudiencePattern)) { - throw new Error('workforcePoolUserProject should not be set for non-workforce pool ' + - 'credentials.'); + function cleanup() { + socket.removeListener('end', onend); + socket.removeListener('error', onerror); + socket.removeListener('readable', read); } - this.serviceAccountImpersonationUrl = serviceAccountImpersonationUrl; - this.serviceAccountImpersonationLifetime = - serviceAccountImpersonationLifetime; - if (this.serviceAccountImpersonationLifetime) { - this.configLifetimeRequested = true; + function onend() { + cleanup(); + debug('onend'); + reject(new Error('Proxy connection ended before receiving CONNECT response')); } - else { - this.configLifetimeRequested = false; - this.serviceAccountImpersonationLifetime = DEFAULT_TOKEN_LIFESPAN; + function onerror(err) { + cleanup(); + debug('onerror %o', err); + reject(err); } - this.projectNumber = this.getProjectNumber(this.audience); - this.supplierContext = { - audience: this.audience, - subjectTokenType: this.subjectTokenType, - transporter: this.transporter, - }; - } - /** The service account email to be impersonated, if available. */ - getServiceAccountEmail() { - var _a; - if (this.serviceAccountImpersonationUrl) { - if (this.serviceAccountImpersonationUrl.length > 256) { - /** - * Prevents DOS attacks. - * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/84} - **/ - throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`); + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf('\r\n\r\n'); + if (endOfHeaders === -1) { + // keep buffering + debug('have not received end of HTTP headers yet...'); + read(); + return; } - // Parse email from URL. The formal looks as follows: - // https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/name@project-id.iam.gserviceaccount.com:generateAccessToken - const re = /serviceAccounts\/(?[^:]+):generateAccessToken$/; - const result = re.exec(this.serviceAccountImpersonationUrl); - return ((_a = result === null || result === void 0 ? void 0 : result.groups) === null || _a === void 0 ? void 0 : _a.email) || null; + const headerParts = buffered + .slice(0, endOfHeaders) + .toString('ascii') + .split('\r\n'); + const firstLine = headerParts.shift(); + if (!firstLine) { + socket.destroy(); + return reject(new Error('No header received from proxy CONNECT response')); + } + const firstLineParts = firstLine.split(' '); + const statusCode = +firstLineParts[1]; + const statusText = firstLineParts.slice(2).join(' '); + const headers = {}; + for (const header of headerParts) { + if (!header) + continue; + const firstColon = header.indexOf(':'); + if (firstColon === -1) { + socket.destroy(); + return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + } + const key = header.slice(0, firstColon).toLowerCase(); + const value = header.slice(firstColon + 1).trimStart(); + const current = headers[key]; + if (typeof current === 'string') { + headers[key] = [current, value]; + } + else if (Array.isArray(current)) { + current.push(value); + } + else { + headers[key] = value; + } + } + debug('got proxy server response: %o %o', firstLine, headers); + cleanup(); + resolve({ + connect: { + statusCode, + statusText, + headers, + }, + buffered, + }); } - return null; + socket.on('error', onerror); + socket.on('end', onend); + read(); + }); +} +exports.parseProxyResponse = parseProxyResponse; +//# sourceMappingURL=parse-proxy-response.js.map + +/***/ }), + +/***/ 44124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +try { + var util = __nccwpck_require__(73837); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __nccwpck_require__(8544); +} + + +/***/ }), + +/***/ 8544: +/***/ ((module) => { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) } - /** - * Provides a mechanism to inject GCP access tokens directly. - * When the provided credential expires, a new credential, using the - * external account options, is retrieved. - * @param credentials The Credentials object to set on the current client. - */ - setCredentials(credentials) { - super.setCredentials(credentials); - this.cachedAccessToken = credentials; + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} + + +/***/ }), + +/***/ 41554: +/***/ ((module) => { + +"use strict"; + + +const isStream = stream => + stream !== null && + typeof stream === 'object' && + typeof stream.pipe === 'function'; + +isStream.writable = stream => + isStream(stream) && + stream.writable !== false && + typeof stream._write === 'function' && + typeof stream._writableState === 'object'; + +isStream.readable = stream => + isStream(stream) && + stream.readable !== false && + typeof stream._read === 'function' && + typeof stream._readableState === 'object'; + +isStream.duplex = stream => + isStream.writable(stream) && + isStream.readable(stream); + +isStream.transform = stream => + isStream.duplex(stream) && + typeof stream._transform === 'function'; + +module.exports = isStream; + + +/***/ }), + +/***/ 55031: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var json_stringify = (__nccwpck_require__(78574).stringify); +var json_parse = __nccwpck_require__(89099); + +module.exports = function(options) { + return { + parse: json_parse(options), + stringify: json_stringify + } +}; +//create the default method members with no options applied for backwards compatibility +module.exports.parse = json_parse(); +module.exports.stringify = json_stringify; + + +/***/ }), + +/***/ 89099: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var BigNumber = null; + +// regexpxs extracted from +// (c) BSD-3-Clause +// https://github.com/fastify/secure-json-parse/graphs/contributors and https://github.com/hapijs/bourne/graphs/contributors + +const suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/; +const suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/; + +/* + json_parse.js + 2012-06-20 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + This file creates a json_parse function. + During create you can (optionally) specify some behavioural switches + + require('json-bigint')(options) + + The optional options parameter holds switches that drive certain + aspects of the parsing process: + * options.strict = true will warn about duplicate-key usage in the json. + The default (strict = false) will silently ignore those and overwrite + values for keys that are in duplicate use. + + The resulting function follows this signature: + json_parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. + + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. + + Example: + + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. + + myData = json_parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); + + This is a reference implementation. You are free to copy, modify, or + redistribute. + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. +*/ + +/*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode, + hasOwnProperty, message, n, name, prototype, push, r, t, text +*/ + +var json_parse = function (options) { + 'use strict'; + + // This is a function that can parse a JSON text, producing a JavaScript + // data structure. It is a simple, recursive descent parser. It does not use + // eval or regular expressions, so it can be used as a model for implementing + // a JSON parser in other languages. + + // We are defining the function inside of another function to avoid creating + // global variables. + + // Default options one can override by passing options to the parse() + var _options = { + strict: false, // not being strict means do not generate syntax errors for "duplicate key" + storeAsString: false, // toggles whether the values should be stored as BigNumber (default) or a string + alwaysParseAsBig: false, // toggles whether all numbers should be Big + useNativeBigInt: false, // toggles whether to use native BigInt instead of bignumber.js + protoAction: 'error', + constructorAction: 'error', + }; + + // If there are options, then use them to override the default _options + if (options !== undefined && options !== null) { + if (options.strict === true) { + _options.strict = true; } - /** - * @return A promise that resolves with the current GCP access token - * response. If the current credential is expired, a new one is retrieved. - */ - async getAccessToken() { - // If cached access token is unavailable or expired, force refresh. - if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { - await this.refreshAccessTokenAsync(); - } - // Return GCP access token in GetAccessTokenResponse format. - return { - token: this.cachedAccessToken.access_token, - res: this.cachedAccessToken.res, - }; + if (options.storeAsString === true) { + _options.storeAsString = true; } - /** - * The main authentication interface. It takes an optional url which when - * present is the endpoint being accessed, and returns a Promise which - * resolves with authorization header fields. - * - * The result has the form: - * { Authorization: 'Bearer ' } - */ - async getRequestHeaders() { - const accessTokenResponse = await this.getAccessToken(); - const headers = { - Authorization: `Bearer ${accessTokenResponse.token}`, - }; - return this.addSharedMetadataHeaders(headers); + _options.alwaysParseAsBig = + options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false; + _options.useNativeBigInt = + options.useNativeBigInt === true ? options.useNativeBigInt : false; + + if (typeof options.constructorAction !== 'undefined') { + if ( + options.constructorAction === 'error' || + options.constructorAction === 'ignore' || + options.constructorAction === 'preserve' + ) { + _options.constructorAction = options.constructorAction; + } else { + throw new Error( + `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}` + ); + } } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); - } - else { - return this.requestAsync(opts); - } + + if (typeof options.protoAction !== 'undefined') { + if ( + options.protoAction === 'error' || + options.protoAction === 'ignore' || + options.protoAction === 'preserve' + ) { + _options.protoAction = options.protoAction; + } else { + throw new Error( + `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}` + ); + } } - /** - * @return A promise that resolves with the project ID corresponding to the - * current workload identity pool or current workforce pool if - * determinable. For workforce pool credential, it returns the project ID - * corresponding to the workforcePoolUserProject. - * This is introduced to match the current pattern of using the Auth - * library: - * const projectId = await auth.getProjectId(); - * const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`; - * const res = await client.request({ url }); - * The resource may not have permission - * (resourcemanager.projects.get) to call this API or the required - * scopes may not be selected: - * https://cloud.google.com/resource-manager/reference/rest/v1/projects/get#authorization-scopes - */ - async getProjectId() { - const projectNumber = this.projectNumber || this.workforcePoolUserProject; - if (this.projectId) { - // Return previously determined project ID. - return this.projectId; + } + + var at, // The index of the current character + ch, // The current character + escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t', + }, + text, + error = function (m) { + // Call error when something is wrong. + + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text, + }; + }, + next = function (c) { + // If a c parameter is provided, verify that it matches the current character. + + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } + + // Get the next character. When there are no more characters, + // return the empty string. + + ch = text.charAt(at); + at += 1; + return ch; + }, + number = function () { + // Parse a number value. + + var number, + string = ''; + + if (ch === '-') { + string = '-'; + next('-'); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + if (ch === '.') { + string += '.'; + while (next() && ch >= '0' && ch <= '9') { + string += ch; } - else if (projectNumber) { - // Preferable not to use request() to avoid retrial policies. - const headers = await this.getRequestHeaders(); - const response = await this.transporter.request({ - ...BaseExternalAccountClient.RETRY_CONFIG, - headers, - url: `${this.cloudResourceManagerURL.toString()}${projectNumber}`, - responseType: 'json', - }); - this.projectId = response.data.projectId; - return this.projectId; + } + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + if (ch === '-' || ch === '+') { + string += ch; + next(); } - return null; - } - /** - * Authenticates the provided HTTP request, processes it and resolves with the - * returned response. - * @param opts The HTTP request options. - * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. - * @return A promise that resolves with the successful response. - */ - async requestAsync(opts, reAuthRetried = false) { - let response; - try { - const requestHeaders = await this.getRequestHeaders(); - opts.headers = opts.headers || {}; - if (requestHeaders && requestHeaders['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = - requestHeaders['x-goog-user-project']; - } - if (requestHeaders && requestHeaders.Authorization) { - opts.headers.Authorization = requestHeaders.Authorization; - } - response = await this.transporter.request(opts); + while (ch >= '0' && ch <= '9') { + string += ch; + next(); } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - forceRefreshOnFailure is true - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - this.forceRefreshOnFailure) { - await this.refreshAccessTokenAsync(); - return await this.requestAsync(opts, true); + } + number = +string; + if (!isFinite(number)) { + error('Bad number'); + } else { + if (BigNumber == null) BigNumber = __nccwpck_require__(87558); + //if (number > 9007199254740992 || number < -9007199254740992) + // Bignumber has stricter check: everything with length > 15 digits disallowed + if (string.length > 15) + return _options.storeAsString + ? string + : _options.useNativeBigInt + ? BigInt(string) + : new BigNumber(string); + else + return !_options.alwaysParseAsBig + ? number + : _options.useNativeBigInt + ? BigInt(number) + : new BigNumber(number); + } + }, + string = function () { + // Parse a string value. + + var hex, + i, + string = '', + uffff; + + // When parsing for string values, we must look for " and \ characters. + + if (ch === '"') { + var startAt = at; + while (next()) { + if (ch === '"') { + if (at - 1 > startAt) string += text.substring(startAt, at - 1); + next(); + return string; + } + if (ch === '\\') { + if (at - 1 > startAt) string += text.substring(startAt, at - 1); + next(); + if (ch === 'u') { + uffff = 0; + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + if (!isFinite(hex)) { + break; } + uffff = uffff * 16 + hex; + } + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; } - throw e; + startAt = at; + } } - return response; - } - /** - * Forces token refresh, even if unexpired tokens are currently cached. - * External credentials are exchanged for GCP access tokens via the token - * exchange endpoint and other settings provided in the client options - * object. - * If the service_account_impersonation_url is provided, an additional - * step to exchange the external account GCP access token for a service - * account impersonated token is performed. - * @return A promise that resolves with the fresh GCP access tokens. - */ - async refreshAccessTokenAsync() { - // Retrieve the external credential. - const subjectToken = await this.retrieveSubjectToken(); - // Construct the STS credentials options. - const stsCredentialsOptions = { - grantType: STS_GRANT_TYPE, - audience: this.audience, - requestedTokenType: STS_REQUEST_TOKEN_TYPE, - subjectToken, - subjectTokenType: this.subjectTokenType, - // generateAccessToken requires the provided access token to have - // scopes: - // https://www.googleapis.com/auth/iam or - // https://www.googleapis.com/auth/cloud-platform - // The new service account access token scopes will match the user - // provided ones. - scope: this.serviceAccountImpersonationUrl - ? [DEFAULT_OAUTH_SCOPE] - : this.getScopesArray(), - }; - // Exchange the external credentials for a GCP access token. - // Client auth is prioritized over passing the workforcePoolUserProject - // parameter for STS token exchange. - const additionalOptions = !this.clientAuth && this.workforcePoolUserProject - ? { userProject: this.workforcePoolUserProject } - : undefined; - const additionalHeaders = { - 'x-goog-api-client': this.getMetricsHeaderValue(), - }; - const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, additionalHeaders, additionalOptions); - if (this.serviceAccountImpersonationUrl) { - this.cachedAccessToken = await this.getImpersonatedAccessToken(stsResponse.access_token); - } - else if (stsResponse.expires_in) { - // Save response in cached access token. - this.cachedAccessToken = { - access_token: stsResponse.access_token, - expiry_date: new Date().getTime() + stsResponse.expires_in * 1000, - res: stsResponse.res, - }; + } + error('Bad string'); + }, + white = function () { + // Skip whitespace. + + while (ch && ch <= ' ') { + next(); + } + }, + word = function () { + // true, false, or null. + + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + error("Unexpected '" + ch + "'"); + }, + value, // Place holder for the value function. + array = function () { + // Parse an array value. + + var array = []; + + if (ch === '[') { + next('['); + white(); + if (ch === ']') { + next(']'); + return array; // empty array } - else { - // Save response in cached access token. - this.cachedAccessToken = { - access_token: stsResponse.access_token, - res: stsResponse.res, - }; + while (ch) { + array.push(value()); + white(); + if (ch === ']') { + next(']'); + return array; + } + next(','); + white(); } - // Save credentials. - this.credentials = {}; - Object.assign(this.credentials, this.cachedAccessToken); - delete this.credentials.res; - // Trigger tokens event to notify external listeners. - this.emit('tokens', { - refresh_token: null, - expiry_date: this.cachedAccessToken.expiry_date, - access_token: this.cachedAccessToken.access_token, - token_type: 'Bearer', - id_token: null, - }); - // Return the cached access token. - return this.cachedAccessToken; - } - /** - * Returns the workload identity pool project number if it is determinable - * from the audience resource name. - * @param audience The STS audience used to determine the project number. - * @return The project number associated with the workload identity pool, if - * this can be determined from the STS audience field. Otherwise, null is - * returned. - */ - getProjectNumber(audience) { - // STS audience pattern: - // //iam.googleapis.com/projects/$PROJECT_NUMBER/locations/... - const match = audience.match(/\/projects\/([^/]+)/); - if (!match) { - return null; + } + error('Bad array'); + }, + object = function () { + // Parse an object value. + + var key, + object = Object.create(null); + + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object } - return match[1]; - } - /** - * Exchanges an external account GCP access token for a service - * account impersonated access token using iamcredentials - * GenerateAccessToken API. - * @param token The access token to exchange for a service account access - * token. - * @return A promise that resolves with the service account impersonated - * credentials response. - */ - async getImpersonatedAccessToken(token) { - const opts = { - ...BaseExternalAccountClient.RETRY_CONFIG, - url: this.serviceAccountImpersonationUrl, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${token}`, - }, - data: { - scope: this.getScopesArray(), - lifetime: this.serviceAccountImpersonationLifetime + 's', - }, - responseType: 'json', - }; - const response = await this.transporter.request(opts); - const successResponse = response.data; - return { - access_token: successResponse.accessToken, - // Convert from ISO format to timestamp. - expiry_date: new Date(successResponse.expireTime).getTime(), - res: response, - }; - } - /** - * Returns whether the provided credentials are expired or not. - * If there is no expiry time, assumes the token is not expired or expiring. - * @param accessToken The credentials to check for expiration. - * @return Whether the credentials are expired or not. - */ - isExpired(accessToken) { - const now = new Date().getTime(); - return accessToken.expiry_date - ? now >= accessToken.expiry_date - this.eagerRefreshThresholdMillis - : false; - } - /** - * @return The list of scopes for the requested GCP access token. - */ - getScopesArray() { - // Since scopes can be provided as string or array, the type should - // be normalized. - if (typeof this.scopes === 'string') { - return [this.scopes]; + while (ch) { + key = string(); + white(); + next(':'); + if ( + _options.strict === true && + Object.hasOwnProperty.call(object, key) + ) { + error('Duplicate key "' + key + '"'); + } + + if (suspectProtoRx.test(key) === true) { + if (_options.protoAction === 'error') { + error('Object contains forbidden prototype property'); + } else if (_options.protoAction === 'ignore') { + value(); + } else { + object[key] = value(); + } + } else if (suspectConstructorRx.test(key) === true) { + if (_options.constructorAction === 'error') { + error('Object contains forbidden constructor property'); + } else if (_options.constructorAction === 'ignore') { + value(); + } else { + object[key] = value(); + } + } else { + object[key] = value(); + } + + white(); + if (ch === '}') { + next('}'); + return object; + } + next(','); + white(); } - return this.scopes || [DEFAULT_OAUTH_SCOPE]; + } + error('Bad object'); + }; + + value = function () { + // Parse a JSON value. It could be an object, an array, a string, a number, + // or a word. + + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); } - getMetricsHeaderValue() { - const nodeVersion = process.version.replace(/^v/, ''); - const saImpersonation = this.serviceAccountImpersonationUrl !== undefined; - const credentialSourceType = this.credentialSourceType - ? this.credentialSourceType - : 'unknown'; - return `gl-node/${nodeVersion} auth/${pkg.version} google-byoid-sdk source/${credentialSourceType} sa-impersonation/${saImpersonation} config-lifetime/${this.configLifetimeRequested}`; + }; + + // Return the json_parse function. It will have access to all of the above + // functions and variables. + + return function (source, reviver) { + var result; + + text = source + ''; + at = 0; + ch = ' '; + result = value(); + white(); + if (ch) { + error('Syntax error'); } -} -exports.BaseExternalAccountClient = BaseExternalAccountClient; + + // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. + + return typeof reviver === 'function' + ? (function walk(holder, key) { + var k, + v, + value = holder[key]; + if (value && typeof value === 'object') { + Object.keys(value).forEach(function (k) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + }); + } + return reviver.call(holder, key, value); + })({ '': result }, '') + : result; + }; +}; + +module.exports = json_parse; /***/ }), -/***/ 96875: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 78574: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var BigNumber = __nccwpck_require__(87558); -// Copyright 2013 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Compute = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const gcpMetadata = __nccwpck_require__(3563); -const oauth2client_1 = __nccwpck_require__(3936); -class Compute extends oauth2client_1.OAuth2Client { - /** - * Google Compute Engine service account credentials. - * - * Retrieve access token from the metadata server. - * See: https://cloud.google.com/compute/docs/access/authenticate-workloads#applications - */ - constructor(options = {}) { - super(options); - // Start with an expired refresh token, which will automatically be - // refreshed before the first API call is made. - this.credentials = { expiry_date: 1, refresh_token: 'compute-placeholder' }; - this.serviceAccountEmail = options.serviceAccountEmail || 'default'; - this.scopes = Array.isArray(options.scopes) - ? options.scopes - : options.scopes - ? [options.scopes] - : []; - } - /** - * Refreshes the access token. - * @param refreshToken Unused parameter - */ - async refreshTokenNoCache( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - refreshToken) { - const tokenPath = `service-accounts/${this.serviceAccountEmail}/token`; - let data; - try { - const instanceOptions = { - property: tokenPath, - }; - if (this.scopes.length > 0) { - instanceOptions.params = { - scopes: this.scopes.join(','), +/* + json2.js + 2013-05-26 + + Public Domain. + + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + + See http://www.JSON.org/js.html + + + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html + + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. + + + This file creates a global JSON object containing two methods: stringify + and parse. + + JSON.stringify(value, replacer, space) + value any JavaScript value, usually an object or array. + + replacer an optional parameter that determines how object + values are stringified for objects. It can be a + function or an array of strings. + + space an optional parameter that specifies the indentation + of nested structures. If it is omitted, the text will + be packed without extra whitespace. If it is a number, + it will specify the number of spaces to indent at each + level. If it is a string (such as '\t' or ' '), + it contains the characters used to indent at each level. + + This method produces a JSON text from a JavaScript value. + + When an object value is found, if the object contains a toJSON + method, its toJSON method will be called and the result will be + stringified. A toJSON method does not serialize: it returns the + value represented by the name/value pair that should be serialized, + or undefined if nothing should be serialized. The toJSON method + will be passed the key associated with the value, and this will be + bound to the value + + For example, this would serialize Dates as ISO strings. + + Date.prototype.toJSON = function (key) { + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } + + return this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z'; }; - } - data = await gcpMetadata.instance(instanceOptions); - } - catch (e) { - if (e instanceof gaxios_1.GaxiosError) { - e.message = `Could not refresh access token: ${e.message}`; - this.wrapError(e); - } - throw e; - } - const tokens = data; - if (data && data.expires_in) { - tokens.expiry_date = new Date().getTime() + data.expires_in * 1000; - delete tokens.expires_in; - } - this.emit('tokens', tokens); - return { tokens, res: null }; - } - /** - * Fetches an ID token. - * @param targetAudience the audience for the fetched ID token. - */ - async fetchIdToken(targetAudience) { - const idTokenPath = `service-accounts/${this.serviceAccountEmail}/identity` + - `?format=full&audience=${targetAudience}`; - let idToken; - try { - const instanceOptions = { - property: idTokenPath, - }; - idToken = await gcpMetadata.instance(instanceOptions); - } - catch (e) { - if (e instanceof Error) { - e.message = `Could not fetch ID token: ${e.message}`; - } - throw e; - } - return idToken; - } - wrapError(e) { - const res = e.response; - if (res && res.status) { - e.status = res.status; - if (res.status === 403) { - e.message = - 'A Forbidden error was returned while attempting to retrieve an access ' + - 'token for the Compute Engine built-in service account. This may be because the Compute ' + - 'Engine instance does not have the correct permission scopes specified: ' + - e.message; - } - else if (res.status === 404) { - e.message = - 'A Not Found error was returned while attempting to retrieve an access' + - 'token for the Compute Engine built-in service account. This may be because the Compute ' + - 'Engine instance does not have any permission scopes specified: ' + - e.message; - } - } - } -} -exports.Compute = Compute; + You can provide an optional replacer method. It will be passed the + key and value of each member, with this bound to the containing + object. The value that is returned from your method will be + serialized. If your method returns undefined, then the member will + be excluded from the serialization. -/***/ }), + If the replacer parameter is an array of strings, then it will be + used to select the members to be serialized. It filters the results + such that only members with keys listed in the replacer array are + stringified. -/***/ 89799: -/***/ (function(__unused_webpack_module, exports) { + Values that do not have JSON representations, such as undefined or + functions, will not be serialized. Such values in objects will be + dropped; in arrays they will be replaced with null. You can use + a replacer function to replace those with JSON values. + JSON.stringify(undefined) returns undefined. -"use strict"; + The optional space parameter produces a stringification of the + value that is filled with line breaks and indentation to make it + easier to read. -// Copyright 2024 Google LLC -// -// 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. -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _DefaultAwsSecurityCredentialsSupplier_instances, _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DefaultAwsSecurityCredentialsSupplier = void 0; -/** - * Internal AWS security credentials supplier implementation used by {@link AwsClient} - * when a credential source is provided instead of a user defined supplier. - * The logic is summarized as: - * 1. If imdsv2_session_token_url is provided in the credential source, then - * fetch the aws session token and include it in the headers of the - * metadata requests. This is a requirement for IDMSv2 but optional - * for IDMSv1. - * 2. Retrieve AWS region from availability-zone. - * 3a. Check AWS credentials in environment variables. If not found, get - * from security-credentials endpoint. - * 3b. Get AWS credentials from security-credentials endpoint. In order - * to retrieve this, the AWS role needs to be determined by calling - * security-credentials endpoint without any argument. Then the - * credentials can be retrieved via: security-credentials/role_name - * 4. Generate the signed request to AWS STS GetCallerIdentity action. - * 5. Inject x-goog-cloud-target-resource into header and serialize the - * signed request. This will be the subject-token to pass to GCP STS. - */ -class DefaultAwsSecurityCredentialsSupplier { - /** - * Instantiates a new DefaultAwsSecurityCredentialsSupplier using information - * from the credential_source stored in the ADC file. - * @param opts The default aws security credentials supplier options object to - * build the supplier with. - */ - constructor(opts) { - _DefaultAwsSecurityCredentialsSupplier_instances.add(this); - this.regionUrl = opts.regionUrl; - this.securityCredentialsUrl = opts.securityCredentialsUrl; - this.imdsV2SessionTokenUrl = opts.imdsV2SessionTokenUrl; - this.additionalGaxiosOptions = opts.additionalGaxiosOptions; - } - /** - * Returns the active AWS region. This first checks to see if the region - * is available as an environment variable. If it is not, then the supplier - * will call the region URL. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link AwsClient}, contains the requested audience and subject token type - * for the external account identity. - * @return A promise that resolves with the AWS region string. - */ - async getAwsRegion(context) { - // Priority order for region determination: - // AWS_REGION > AWS_DEFAULT_REGION > metadata server. - if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get)) { - return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get); - } - const metadataHeaders = {}; - if (!__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get) && this.imdsV2SessionTokenUrl) { - metadataHeaders['x-aws-ec2-metadata-token'] = - await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); - } - if (!this.regionUrl) { - throw new Error('Unable to determine AWS region due to missing ' + - '"options.credential_source.region_url"'); - } - const opts = { - ...this.additionalGaxiosOptions, - url: this.regionUrl, - method: 'GET', - responseType: 'text', - headers: metadataHeaders, - }; - const response = await context.transporter.request(opts); - // Remove last character. For example, if us-east-2b is returned, - // the region would be us-east-2. - return response.data.substr(0, response.data.length - 1); - } - /** - * Returns AWS security credentials. This first checks to see if the credentials - * is available as environment variables. If it is not, then the supplier - * will call the security credentials URL. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link AwsClient}, contains the requested audience and subject token type - * for the external account identity. - * @return A promise that resolves with the AWS security credentials. - */ - async getAwsSecurityCredentials(context) { - // Check environment variables for permanent credentials first. - // https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html - if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get)) { - return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get); - } - const metadataHeaders = {}; - if (this.imdsV2SessionTokenUrl) { - metadataHeaders['x-aws-ec2-metadata-token'] = - await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); - } - // Since the role on a VM can change, we don't need to cache it. - const roleName = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName).call(this, metadataHeaders, context.transporter); - // Temporary credentials typically last for several hours. - // Expiration is returned in response. - // Consider future optimization of this logic to cache AWS tokens - // until their natural expiration. - const awsCreds = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials).call(this, roleName, metadataHeaders, context.transporter); - return { - accessKeyId: awsCreds.AccessKeyId, - secretAccessKey: awsCreds.SecretAccessKey, - token: awsCreds.Token, - }; - } -} -exports.DefaultAwsSecurityCredentialsSupplier = DefaultAwsSecurityCredentialsSupplier; -_DefaultAwsSecurityCredentialsSupplier_instances = new WeakSet(), _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken = -/** - * @param transporter The transporter to use for requests. - * @return A promise that resolves with the IMDSv2 Session Token. - */ -async function _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken(transporter) { - const opts = { - ...this.additionalGaxiosOptions, - url: this.imdsV2SessionTokenUrl, - method: 'PUT', - responseType: 'text', - headers: { 'x-aws-ec2-metadata-token-ttl-seconds': '300' }, - }; - const response = await transporter.request(opts); - return response.data; -}, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName = -/** - * @param headers The headers to be used in the metadata request. - * @param transporter The transporter to use for requests. - * @return A promise that resolves with the assigned role to the current - * AWS VM. This is needed for calling the security-credentials endpoint. - */ -async function _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName(headers, transporter) { - if (!this.securityCredentialsUrl) { - throw new Error('Unable to determine AWS role name due to missing ' + - '"options.credential_source.url"'); - } - const opts = { - ...this.additionalGaxiosOptions, - url: this.securityCredentialsUrl, - method: 'GET', - responseType: 'text', - headers: headers, - }; - const response = await transporter.request(opts); - return response.data; -}, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials = -/** - * Retrieves the temporary AWS credentials by calling the security-credentials - * endpoint as specified in the `credential_source` object. - * @param roleName The role attached to the current VM. - * @param headers The headers to be used in the metadata request. - * @param transporter The transporter to use for requests. - * @return A promise that resolves with the temporary AWS credentials - * needed for creating the GetCallerIdentity signed request. - */ -async function _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials(roleName, headers, transporter) { - const response = await transporter.request({ - ...this.additionalGaxiosOptions, - url: `${this.securityCredentialsUrl}/${roleName}`, - responseType: 'json', - headers: headers, - }); - return response.data; -}, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get() { - // The AWS region can be provided through AWS_REGION or AWS_DEFAULT_REGION. - // Only one is required. - return (process.env['AWS_REGION'] || process.env['AWS_DEFAULT_REGION'] || null); -}, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get() { - // Both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are required. - if (process.env['AWS_ACCESS_KEY_ID'] && - process.env['AWS_SECRET_ACCESS_KEY']) { - return { - accessKeyId: process.env['AWS_ACCESS_KEY_ID'], - secretAccessKey: process.env['AWS_SECRET_ACCESS_KEY'], - token: process.env['AWS_SESSION_TOKEN'], - }; - } - return null; -}; + If the space parameter is a non-empty string, then that string will + be used for indentation. If the space parameter is a number, then + the indentation will be that many spaces. + + Example: + + text = JSON.stringify(['e', {pluribus: 'unum'}]); + // text is '["e",{"pluribus":"unum"}]' + + + text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); + // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' + + text = JSON.stringify([new Date()], function (key, value) { + return this[key] instanceof Date ? + 'Date(' + this[key] + ')' : value; + }); + // text is '["Date(---current time---)"]' + + + JSON.parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. + + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. + + Example: + + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. + + myData = JSON.parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); + + myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { + var d; + if (typeof value === 'string' && + value.slice(0, 5) === 'Date(' && + value.slice(-1) === ')') { + d = new Date(value.slice(5, -1)); + if (d) { + return d; + } + } + return value; + }); + + + This is a reference implementation. You are free to copy, modify, or + redistribute. +*/ +/*jslint evil: true, regexp: true */ -/***/ }), +/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, + call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, + getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, + lastIndex, length, parse, prototype, push, replace, slice, stringify, + test, toJSON, toString, valueOf +*/ -/***/ 6270: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +// Create a JSON object only if one does not already exist. We create the +// methods in a closure to avoid creating global variables. -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DownscopedClient = exports.EXPIRATION_TIME_OFFSET = exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = void 0; -const stream = __nccwpck_require__(12781); -const authclient_1 = __nccwpck_require__(44627); -const sts = __nccwpck_require__(86308); -/** - * The required token exchange grant_type: rfc8693#section-2.1 - */ -const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; -/** - * The requested token exchange requested_token_type: rfc8693#section-2.1 - */ -const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; -/** - * The requested token exchange subject_token_type: rfc8693#section-2.1 - */ -const STS_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; -/** - * The maximum number of access boundary rules a Credential Access Boundary - * can contain. - */ -exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; -/** - * Offset to take into account network delays and server clock skews. - */ -exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; -/** - * Defines a set of Google credentials that are downscoped from an existing set - * of Google OAuth2 credentials. This is useful to restrict the Identity and - * Access Management (IAM) permissions that a short-lived credential can use. - * The common pattern of usage is to have a token broker with elevated access - * generate these downscoped credentials from higher access source credentials - * and pass the downscoped short-lived access tokens to a token consumer via - * some secure authenticated channel for limited access to Google Cloud Storage - * resources. - */ -class DownscopedClient extends authclient_1.AuthClient { - /** - * Instantiates a downscoped client object using the provided source - * AuthClient and credential access boundary rules. - * To downscope permissions of a source AuthClient, a Credential Access - * Boundary that specifies which resources the new credential can access, as - * well as an upper bound on the permissions that are available on each - * resource, has to be defined. A downscoped client can then be instantiated - * using the source AuthClient and the Credential Access Boundary. - * @param authClient The source AuthClient to be downscoped based on the - * provided Credential Access Boundary rules. - * @param credentialAccessBoundary The Credential Access Boundary which - * contains a list of access boundary rules. Each rule contains information - * on the resource that the rule applies to, the upper bound of the - * permissions that are available on that resource and an optional - * condition to further restrict permissions. - * @param additionalOptions **DEPRECATED, set this in the provided `authClient`.** - * Optional additional behavior customization options. - * @param quotaProjectId **DEPRECATED, set this in the provided `authClient`.** - * Optional quota project id for setting up in the x-goog-user-project header. - */ - constructor(authClient, credentialAccessBoundary, additionalOptions, quotaProjectId) { - super({ ...additionalOptions, quotaProjectId }); - this.authClient = authClient; - this.credentialAccessBoundary = credentialAccessBoundary; - // Check 1-10 Access Boundary Rules are defined within Credential Access - // Boundary. - if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length === 0) { - throw new Error('At least one access boundary rule needs to be defined.'); - } - else if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length > - exports.MAX_ACCESS_BOUNDARY_RULES_COUNT) { - throw new Error('The provided access boundary has more than ' + - `${exports.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`); - } - // Check at least one permission should be defined in each Access Boundary - // Rule. - for (const rule of credentialAccessBoundary.accessBoundary - .accessBoundaryRules) { - if (rule.availablePermissions.length === 0) { - throw new Error('At least one permission should be defined in access boundary rules.'); - } - } - this.stsCredential = new sts.StsCredentials(`https://sts.${this.universeDomain}/v1/token`); - this.cachedDownscopedAccessToken = null; - } - /** - * Provides a mechanism to inject Downscoped access tokens directly. - * The expiry_date field is required to facilitate determination of the token - * expiration which would make it easier for the token consumer to handle. - * @param credentials The Credentials object to set on the current client. - */ - setCredentials(credentials) { - if (!credentials.expiry_date) { - throw new Error('The access token expiry_date field is missing in the provided ' + - 'credentials.'); - } - super.setCredentials(credentials); - this.cachedDownscopedAccessToken = credentials; - } - async getAccessToken() { - // If the cached access token is unavailable or expired, force refresh. - // The Downscoped access token will be returned in - // DownscopedAccessTokenResponse format. - if (!this.cachedDownscopedAccessToken || - this.isExpired(this.cachedDownscopedAccessToken)) { - await this.refreshAccessTokenAsync(); - } - // Return Downscoped access token in DownscopedAccessTokenResponse format. - return { - token: this.cachedDownscopedAccessToken.access_token, - expirationTime: this.cachedDownscopedAccessToken.expiry_date, - res: this.cachedDownscopedAccessToken.res, - }; +var JSON = module.exports; + +(function () { + 'use strict'; + + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; } - /** - * The main authentication interface. It takes an optional url which when - * present is the endpoint being accessed, and returns a Promise which - * resolves with authorization header fields. - * - * The result has the form: - * { Authorization: 'Bearer ' } - */ - async getRequestHeaders() { - const accessTokenResponse = await this.getAccessToken(); - const headers = { - Authorization: `Bearer ${accessTokenResponse.token}`, - }; - return this.addSharedMetadataHeaders(headers); + + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + + + function quote(string) { + +// If the string contains no control characters, no quote characters, and no +// backslash characters, then we can safely slap some quotes around it. +// Otherwise we must also replace the offending characters with safe escape +// sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' + ? c + : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); + + + function str(key, holder) { + +// Produce a string from holder[key]. + + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key], + isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value)); + +// If the value has a toJSON method, call it to obtain a replacement value. + + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); } - else { - return this.requestAsync(opts); + +// If we were called with a replacer function, then call the replacer to +// obtain a replacement value. + + if (typeof rep === 'function') { + value = rep.call(holder, key, value); } - } - /** - * Authenticates the provided HTTP request, processes it and resolves with the - * returned response. - * @param opts The HTTP request options. - * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure - * @return A promise that resolves with the successful response. - */ - async requestAsync(opts, reAuthRetried = false) { - let response; - try { - const requestHeaders = await this.getRequestHeaders(); - opts.headers = opts.headers || {}; - if (requestHeaders && requestHeaders['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = - requestHeaders['x-goog-user-project']; + +// What happens next depends on the value's type. + + switch (typeof value) { + case 'string': + if (isBigNumber) { + return value; + } else { + return quote(value); } - if (requestHeaders && requestHeaders.Authorization) { - opts.headers.Authorization = requestHeaders.Authorization; + + case 'number': + +// JSON numbers must be finite. Encode non-finite numbers as null. + + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + case 'bigint': + +// If the value is a boolean or null, convert it to a string. Note: +// typeof null does not produce 'null'. The case is included here in +// the remote chance that this gets fixed someday. + + return String(value); + +// If the type is 'object', we might be dealing with an object or an array or +// null. + + case 'object': + +// Due to a specification blunder in ECMAScript, typeof null is 'object', +// so watch out for that case. + + if (!value) { + return 'null'; } - response = await this.transporter.request(opts); - } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - forceRefreshOnFailure is true - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - this.forceRefreshOnFailure) { - await this.refreshAccessTokenAsync(); - return await this.requestAsync(opts, true); + +// Make an array to hold the partial results of stringifying this object value. + + gap += indent; + partial = []; + +// Is the value an array? + + if (Object.prototype.toString.apply(value) === '[object Array]') { + +// The value is an array. Stringify every element. Use null as a placeholder +// for non-JSON values. + + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + +// Join all of the elements together, separated with commas, and wrap them in +// brackets. + + v = partial.length === 0 + ? '[]' + : gap + ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' + : '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + +// If the replacer is an array, use it to select the members to be stringified. + + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + if (typeof rep[i] === 'string') { + k = rep[i]; + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } } + } else { + +// Otherwise, iterate through all of the keys in the object. + + Object.keys(value).forEach(function(k) { + var v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + }); } - throw e; + +// Join all of the member texts together, separated with commas, +// and wrap them in braces. + + v = partial.length === 0 + ? '{}' + : gap + ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' + : '{' + partial.join(',') + '}'; + gap = mind; + return v; } - return response; } - /** - * Forces token refresh, even if unexpired tokens are currently cached. - * GCP access tokens are retrieved from authclient object/source credential. - * Then GCP access tokens are exchanged for downscoped access tokens via the - * token exchange endpoint. - * @return A promise that resolves with the fresh downscoped access token. - */ - async refreshAccessTokenAsync() { - var _a; - // Retrieve GCP access token from source credential. - const subjectToken = (await this.authClient.getAccessToken()).token; - // Construct the STS credentials options. - const stsCredentialsOptions = { - grantType: STS_GRANT_TYPE, - requestedTokenType: STS_REQUEST_TOKEN_TYPE, - subjectToken: subjectToken, - subjectTokenType: STS_SUBJECT_TOKEN_TYPE, - }; - // Exchange the source AuthClient access token for a Downscoped access - // token. - const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, undefined, this.credentialAccessBoundary); - /** - * The STS endpoint will only return the expiration time for the downscoped - * access token if the original access token represents a service account. - * The downscoped token's expiration time will always match the source - * credential expiration. When no expires_in is returned, we can copy the - * source credential's expiration time. - */ - const sourceCredExpireDate = ((_a = this.authClient.credentials) === null || _a === void 0 ? void 0 : _a.expiry_date) || null; - const expiryDate = stsResponse.expires_in - ? new Date().getTime() + stsResponse.expires_in * 1000 - : sourceCredExpireDate; - // Save response in cached access token. - this.cachedDownscopedAccessToken = { - access_token: stsResponse.access_token, - expiry_date: expiryDate, - res: stsResponse.res, + +// If the JSON object does not yet have a stringify method, give it one. + + if (typeof JSON.stringify !== 'function') { + JSON.stringify = function (value, replacer, space) { + +// The stringify method takes a value and an optional replacer, and an optional +// space parameter, and returns a JSON text. The replacer can be a function +// that can replace values, or an array of strings that will select the keys. +// A default replacer method can be provided. Use of the space parameter can +// produce text that is more easily readable. + + var i; + gap = ''; + indent = ''; + +// If the space parameter is a number, make an indent string containing that +// many spaces. + + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + +// If the space parameter is a string, it will be used as the indent string. + + } else if (typeof space === 'string') { + indent = space; + } + +// If there is a replacer, it must be a function or an array. +// Otherwise, throw an error. + + rep = replacer; + if (replacer && typeof replacer !== 'function' && + (typeof replacer !== 'object' || + typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + +// Make a fake root object containing our value under the key of ''. +// Return the result of stringifying the value. + + return str('', {'': value}); }; - // Save credentials. - this.credentials = {}; - Object.assign(this.credentials, this.cachedDownscopedAccessToken); - delete this.credentials.res; - // Trigger tokens event to notify external listeners. - this.emit('tokens', { - refresh_token: null, - expiry_date: this.cachedDownscopedAccessToken.expiry_date, - access_token: this.cachedDownscopedAccessToken.access_token, - token_type: 'Bearer', - id_token: null, - }); - // Return the cached access token. - return this.cachedDownscopedAccessToken; - } - /** - * Returns whether the provided credentials are expired or not. - * If there is no expiry time, assumes the token is not expired or expiring. - * @param downscopedAccessToken The credentials to check for expiration. - * @return Whether the credentials are expired or not. - */ - isExpired(downscopedAccessToken) { - const now = new Date().getTime(); - return downscopedAccessToken.expiry_date - ? now >= - downscopedAccessToken.expiry_date - this.eagerRefreshThresholdMillis - : false; } +}()); + + +/***/ }), + +/***/ 96010: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Buffer = (__nccwpck_require__(21867).Buffer); +var crypto = __nccwpck_require__(6113); +var formatEcdsa = __nccwpck_require__(11728); +var util = __nccwpck_require__(73837); + +var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' +var MSG_INVALID_SECRET = 'secret must be a string or buffer'; +var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; +var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; + +var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; +if (supportsKeyObjects) { + MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; + MSG_INVALID_SECRET += 'or a KeyObject'; } -exports.DownscopedClient = DownscopedClient; +function checkIsPublicKey(key) { + if (Buffer.isBuffer(key)) { + return; + } + + if (typeof key === 'string') { + return; + } + + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + + if (typeof key !== 'object') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + + if (typeof key.type !== 'string') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + + if (typeof key.asymmetricKeyType !== 'string') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } -/***/ }), + if (typeof key.export !== 'function') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } +}; -/***/ 21380: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function checkIsPrivateKey(key) { + if (Buffer.isBuffer(key)) { + return; + } -"use strict"; + if (typeof key === 'string') { + return; + } -// Copyright 2018 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = exports.clear = exports.GCPEnv = void 0; -const gcpMetadata = __nccwpck_require__(3563); -var GCPEnv; -(function (GCPEnv) { - GCPEnv["APP_ENGINE"] = "APP_ENGINE"; - GCPEnv["KUBERNETES_ENGINE"] = "KUBERNETES_ENGINE"; - GCPEnv["CLOUD_FUNCTIONS"] = "CLOUD_FUNCTIONS"; - GCPEnv["COMPUTE_ENGINE"] = "COMPUTE_ENGINE"; - GCPEnv["CLOUD_RUN"] = "CLOUD_RUN"; - GCPEnv["NONE"] = "NONE"; -})(GCPEnv || (exports.GCPEnv = GCPEnv = {})); -let envPromise; -function clear() { - envPromise = undefined; + if (typeof key === 'object') { + return; + } + + throw typeError(MSG_INVALID_SIGNER_KEY); +}; + +function checkIsSecretKey(key) { + if (Buffer.isBuffer(key)) { + return; + } + + if (typeof key === 'string') { + return key; + } + + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_SECRET); + } + + if (typeof key !== 'object') { + throw typeError(MSG_INVALID_SECRET); + } + + if (key.type !== 'secret') { + throw typeError(MSG_INVALID_SECRET); + } + + if (typeof key.export !== 'function') { + throw typeError(MSG_INVALID_SECRET); + } } -exports.clear = clear; -async function getEnv() { - if (envPromise) { - return envPromise; - } - envPromise = getEnvMemoized(); - return envPromise; + +function fromBase64(base64) { + return base64 + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); } -exports.getEnv = getEnv; -async function getEnvMemoized() { - let env = GCPEnv.NONE; - if (isAppEngine()) { - env = GCPEnv.APP_ENGINE; - } - else if (isCloudFunction()) { - env = GCPEnv.CLOUD_FUNCTIONS; - } - else if (await isComputeEngine()) { - if (await isKubernetesEngine()) { - env = GCPEnv.KUBERNETES_ENGINE; - } - else if (isCloudRun()) { - env = GCPEnv.CLOUD_RUN; - } - else { - env = GCPEnv.COMPUTE_ENGINE; - } - } - else { - env = GCPEnv.NONE; + +function toBase64(base64url) { + base64url = base64url.toString(); + + var padding = 4 - base64url.length % 4; + if (padding !== 4) { + for (var i = 0; i < padding; ++i) { + base64url += '='; } - return env; + } + + return base64url + .replace(/\-/g, '+') + .replace(/_/g, '/'); } -function isAppEngine() { - return !!(process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME); + +function typeError(template) { + var args = [].slice.call(arguments, 1); + var errMsg = util.format.bind(util, template).apply(null, args); + return new TypeError(errMsg); } -function isCloudFunction() { - return !!(process.env.FUNCTION_NAME || process.env.FUNCTION_TARGET); + +function bufferOrString(obj) { + return Buffer.isBuffer(obj) || typeof obj === 'string'; } -/** - * This check only verifies that the environment is running knative. - * This must be run *after* checking for Kubernetes, otherwise it will - * return a false positive. - */ -function isCloudRun() { - return !!process.env.K_CONFIGURATION; + +function normalizeInput(thing) { + if (!bufferOrString(thing)) + thing = JSON.stringify(thing); + return thing; } -async function isKubernetesEngine() { - try { - await gcpMetadata.instance('attributes/cluster-name'); - return true; - } - catch (e) { - return false; - } + +function createHmacSigner(bits) { + return function sign(thing, secret) { + checkIsSecretKey(secret); + thing = normalizeInput(thing); + var hmac = crypto.createHmac('sha' + bits, secret); + var sig = (hmac.update(thing), hmac.digest('base64')) + return fromBase64(sig); + } } -async function isComputeEngine() { - return gcpMetadata.isAvailable(); + +var bufferEqual; +var timingSafeEqual = 'timingSafeEqual' in crypto ? function timingSafeEqual(a, b) { + if (a.byteLength !== b.byteLength) { + return false; + } + + return crypto.timingSafeEqual(a, b) +} : function timingSafeEqual(a, b) { + if (!bufferEqual) { + bufferEqual = __nccwpck_require__(9239); + } + + return bufferEqual(a, b) } +function createHmacVerifier(bits) { + return function verify(thing, signature, secret) { + var computedSig = createHmacSigner(bits)(thing, secret); + return timingSafeEqual(Buffer.from(signature), Buffer.from(computedSig)); + } +} -/***/ }), +function createKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + // Even though we are specifying "RSA" here, this works with ECDSA + // keys as well. + var signer = crypto.createSign('RSA-SHA' + bits); + var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); + return fromBase64(sig); + } +} -/***/ 8749: -/***/ ((__unused_webpack_module, exports) => { +function createKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto.createVerify('RSA-SHA' + bits); + verifier.update(thing); + return verifier.verify(publicKey, signature, 'base64'); + } +} -"use strict"; +function createPSSKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto.createSign('RSA-SHA' + bits); + var sig = (signer.update(thing), signer.sign({ + key: privateKey, + padding: crypto.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST + }, 'base64')); + return fromBase64(sig); + } +} -// Copyright 2022 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InvalidSubjectTokenError = exports.InvalidMessageFieldError = exports.InvalidCodeFieldError = exports.InvalidTokenTypeFieldError = exports.InvalidExpirationTimeFieldError = exports.InvalidSuccessFieldError = exports.InvalidVersionFieldError = exports.ExecutableResponseError = exports.ExecutableResponse = void 0; -const SAML_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:saml2'; -const OIDC_SUBJECT_TOKEN_TYPE1 = 'urn:ietf:params:oauth:token-type:id_token'; -const OIDC_SUBJECT_TOKEN_TYPE2 = 'urn:ietf:params:oauth:token-type:jwt'; -/** - * Defines the response of a 3rd party executable run by the pluggable auth client. - */ -class ExecutableResponse { - /** - * Instantiates an ExecutableResponse instance using the provided JSON object - * from the output of the executable. - * @param responseJson Response from a 3rd party executable, loaded from a - * run of the executable or a cached output file. - */ - constructor(responseJson) { - // Check that the required fields exist in the json response. - if (!responseJson.version) { - throw new InvalidVersionFieldError("Executable response must contain a 'version' field."); - } - if (responseJson.success === undefined) { - throw new InvalidSuccessFieldError("Executable response must contain a 'success' field."); - } - this.version = responseJson.version; - this.success = responseJson.success; - // Validate required fields for a successful response. - if (this.success) { - this.expirationTime = responseJson.expiration_time; - this.tokenType = responseJson.token_type; - // Validate token type field. - if (this.tokenType !== SAML_SUBJECT_TOKEN_TYPE && - this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE1 && - this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE2) { - throw new InvalidTokenTypeFieldError("Executable response must contain a 'token_type' field when successful " + - `and it must be one of ${OIDC_SUBJECT_TOKEN_TYPE1}, ${OIDC_SUBJECT_TOKEN_TYPE2}, or ${SAML_SUBJECT_TOKEN_TYPE}.`); - } - // Validate subject token. - if (this.tokenType === SAML_SUBJECT_TOKEN_TYPE) { - if (!responseJson.saml_response) { - throw new InvalidSubjectTokenError(`Executable response must contain a 'saml_response' field when token_type=${SAML_SUBJECT_TOKEN_TYPE}.`); - } - this.subjectToken = responseJson.saml_response; - } - else { - if (!responseJson.id_token) { - throw new InvalidSubjectTokenError("Executable response must contain a 'id_token' field when " + - `token_type=${OIDC_SUBJECT_TOKEN_TYPE1} or ${OIDC_SUBJECT_TOKEN_TYPE2}.`); - } - this.subjectToken = responseJson.id_token; - } - } - else { - // Both code and message must be provided for unsuccessful responses. - if (!responseJson.code) { - throw new InvalidCodeFieldError("Executable response must contain a 'code' field when unsuccessful."); - } - if (!responseJson.message) { - throw new InvalidMessageFieldError("Executable response must contain a 'message' field when unsuccessful."); - } - this.errorCode = responseJson.code; - this.errorMessage = responseJson.message; - } - } - /** - * @return A boolean representing if the response has a valid token. Returns - * true when the response was successful and the token is not expired. - */ - isValid() { - return !this.isExpired() && this.success; - } - /** - * @return A boolean representing if the response is expired. Returns true if the - * provided timeout has passed. - */ - isExpired() { - return (this.expirationTime !== undefined && - this.expirationTime < Math.round(Date.now() / 1000)); - } +function createPSSKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto.createVerify('RSA-SHA' + bits); + verifier.update(thing); + return verifier.verify({ + key: publicKey, + padding: crypto.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST + }, signature, 'base64'); + } } -exports.ExecutableResponse = ExecutableResponse; -/** - * An error thrown by the ExecutableResponse class. - */ -class ExecutableResponseError extends Error { - constructor(message) { - super(message); - Object.setPrototypeOf(this, new.target.prototype); - } + +function createECDSASigner(bits) { + var inner = createKeySigner(bits); + return function sign() { + var signature = inner.apply(null, arguments); + signature = formatEcdsa.derToJose(signature, 'ES' + bits); + return signature; + }; } -exports.ExecutableResponseError = ExecutableResponseError; -/** - * An error thrown when the 'version' field in an executable response is missing or invalid. - */ -class InvalidVersionFieldError extends ExecutableResponseError { + +function createECDSAVerifer(bits) { + var inner = createKeyVerifier(bits); + return function verify(thing, signature, publicKey) { + signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); + var result = inner(thing, signature, publicKey); + return result; + }; } -exports.InvalidVersionFieldError = InvalidVersionFieldError; -/** - * An error thrown when the 'success' field in an executable response is missing or invalid. - */ -class InvalidSuccessFieldError extends ExecutableResponseError { + +function createNoneSigner() { + return function sign() { + return ''; + } } -exports.InvalidSuccessFieldError = InvalidSuccessFieldError; -/** - * An error thrown when the 'expiration_time' field in an executable response is missing or invalid. - */ -class InvalidExpirationTimeFieldError extends ExecutableResponseError { + +function createNoneVerifier() { + return function verify(thing, signature) { + return signature === ''; + } } -exports.InvalidExpirationTimeFieldError = InvalidExpirationTimeFieldError; -/** - * An error thrown when the 'token_type' field in an executable response is missing or invalid. - */ -class InvalidTokenTypeFieldError extends ExecutableResponseError { + +module.exports = function jwa(algorithm) { + var signerFactories = { + hs: createHmacSigner, + rs: createKeySigner, + ps: createPSSKeySigner, + es: createECDSASigner, + none: createNoneSigner, + } + var verifierFactories = { + hs: createHmacVerifier, + rs: createKeyVerifier, + ps: createPSSKeyVerifier, + es: createECDSAVerifer, + none: createNoneVerifier, + } + var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); + if (!match) + throw typeError(MSG_INVALID_ALGORITHM, algorithm); + var algo = (match[1] || match[3]).toLowerCase(); + var bits = match[2]; + + return { + sign: signerFactories[algo](bits), + verify: verifierFactories[algo](bits), + } +}; + + +/***/ }), + +/***/ 4636: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +/*global exports*/ +var SignStream = __nccwpck_require__(73334); +var VerifyStream = __nccwpck_require__(5522); + +var ALGORITHMS = [ + 'HS256', 'HS384', 'HS512', + 'RS256', 'RS384', 'RS512', + 'PS256', 'PS384', 'PS512', + 'ES256', 'ES384', 'ES512' +]; + +exports.ALGORITHMS = ALGORITHMS; +exports.sign = SignStream.sign; +exports.verify = VerifyStream.verify; +exports.decode = VerifyStream.decode; +exports.isValid = VerifyStream.isValid; +exports.createSign = function createSign(opts) { + return new SignStream(opts); +}; +exports.createVerify = function createVerify(opts) { + return new VerifyStream(opts); +}; + + +/***/ }), + +/***/ 61868: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*global module, process*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var Stream = __nccwpck_require__(12781); +var util = __nccwpck_require__(73837); + +function DataStream(data) { + this.buffer = null; + this.writable = true; + this.readable = true; + + // No input + if (!data) { + this.buffer = Buffer.alloc(0); + return this; + } + + // Stream + if (typeof data.pipe === 'function') { + this.buffer = Buffer.alloc(0); + data.pipe(this); + return this; + } + + // Buffer or String + // or Object (assumedly a passworded key) + if (data.length || typeof data === 'object') { + this.buffer = data; + this.writable = false; + process.nextTick(function () { + this.emit('end', data); + this.readable = false; + this.emit('close'); + }.bind(this)); + return this; + } + + throw new TypeError('Unexpected data type ('+ typeof data + ')'); +} +util.inherits(DataStream, Stream); + +DataStream.prototype.write = function write(data) { + this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); + this.emit('data', data); +}; + +DataStream.prototype.end = function end(data) { + if (data) + this.write(data); + this.emit('end', data); + this.emit('close'); + this.writable = false; + this.readable = false; +}; + +module.exports = DataStream; + + +/***/ }), + +/***/ 73334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*global module*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var DataStream = __nccwpck_require__(61868); +var jwa = __nccwpck_require__(96010); +var Stream = __nccwpck_require__(12781); +var toString = __nccwpck_require__(65292); +var util = __nccwpck_require__(73837); + +function base64url(string, encoding) { + return Buffer + .from(string, encoding) + .toString('base64') + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); } -exports.InvalidTokenTypeFieldError = InvalidTokenTypeFieldError; -/** - * An error thrown when the 'code' field in an executable response is missing or invalid. - */ -class InvalidCodeFieldError extends ExecutableResponseError { + +function jwsSecuredInput(header, payload, encoding) { + encoding = encoding || 'utf8'; + var encodedHeader = base64url(toString(header), 'binary'); + var encodedPayload = base64url(toString(payload), encoding); + return util.format('%s.%s', encodedHeader, encodedPayload); } -exports.InvalidCodeFieldError = InvalidCodeFieldError; -/** - * An error thrown when the 'message' field in an executable response is missing or invalid. - */ -class InvalidMessageFieldError extends ExecutableResponseError { + +function jwsSign(opts) { + var header = opts.header; + var payload = opts.payload; + var secretOrKey = opts.secret || opts.privateKey; + var encoding = opts.encoding; + var algo = jwa(header.alg); + var securedInput = jwsSecuredInput(header, payload, encoding); + var signature = algo.sign(securedInput, secretOrKey); + return util.format('%s.%s', securedInput, signature); } -exports.InvalidMessageFieldError = InvalidMessageFieldError; -/** - * An error thrown when the subject token in an executable response is missing or invalid. - */ -class InvalidSubjectTokenError extends ExecutableResponseError { + +function SignStream(opts) { + var secret = opts.secret; + secret = secret == null ? opts.privateKey : secret; + secret = secret == null ? opts.key : secret; + if (/^hs/i.test(opts.header.alg) === true && secret == null) { + throw new TypeError('secret must be a string or buffer or a KeyObject') + } + var secretStream = new DataStream(secret); + this.readable = true; + this.header = opts.header; + this.encoding = opts.encoding; + this.secret = this.privateKey = this.key = secretStream; + this.payload = new DataStream(opts.payload); + this.secret.once('close', function () { + if (!this.payload.writable && this.readable) + this.sign(); + }.bind(this)); + + this.payload.once('close', function () { + if (!this.secret.writable && this.readable) + this.sign(); + }.bind(this)); } -exports.InvalidSubjectTokenError = InvalidSubjectTokenError; +util.inherits(SignStream, Stream); + +SignStream.prototype.sign = function sign() { + try { + var signature = jwsSign({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding + }); + this.emit('done', signature); + this.emit('data', signature); + this.emit('end'); + this.readable = false; + return signature; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); + } +}; + +SignStream.sign = jwsSign; + +module.exports = SignStream; /***/ }), -/***/ 38765: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 65292: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +/*global module*/ +var Buffer = (__nccwpck_require__(14300).Buffer); -// Copyright 2023 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExternalAccountAuthorizedUserClient = exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = void 0; -const authclient_1 = __nccwpck_require__(44627); -const oauth2common_1 = __nccwpck_require__(19510); -const gaxios_1 = __nccwpck_require__(59555); -const stream = __nccwpck_require__(12781); -const baseexternalclient_1 = __nccwpck_require__(40810); -/** - * The credentials JSON file type for external account authorized user clients. - */ -exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = 'external_account_authorized_user'; -const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/oauthtoken'; -/** - * Handler for token refresh requests sent to the token_url endpoint for external - * authorized user credentials. - */ -class ExternalAccountAuthorizedUserHandler extends oauth2common_1.OAuthClientAuthHandler { - /** - * Initializes an ExternalAccountAuthorizedUserHandler instance. - * @param url The URL of the token refresh endpoint. - * @param transporter The transporter to use for the refresh request. - * @param clientAuthentication The client authentication credentials to use - * for the refresh request. - */ - constructor(url, transporter, clientAuthentication) { - super(clientAuthentication); - this.url = url; - this.transporter = transporter; - } - /** - * Requests a new access token from the token_url endpoint using the provided - * refresh token. - * @param refreshToken The refresh token to use to generate a new access token. - * @param additionalHeaders Optional additional headers to pass along the - * request. - * @return A promise that resolves with the token refresh response containing - * the requested access token and its expiration time. - */ - async refreshToken(refreshToken, additionalHeaders) { - const values = new URLSearchParams({ - grant_type: 'refresh_token', - refresh_token: refreshToken, - }); - const headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - ...additionalHeaders, - }; - const opts = { - ...ExternalAccountAuthorizedUserHandler.RETRY_CONFIG, - url: this.url, - method: 'POST', - headers, - data: values.toString(), - responseType: 'json', - }; - // Apply OAuth client authentication. - this.applyClientAuthenticationOptions(opts); - try { - const response = await this.transporter.request(opts); - // Successful response. - const tokenRefreshResponse = response.data; - tokenRefreshResponse.res = response; - return tokenRefreshResponse; - } - catch (error) { - // Translate error to OAuthError. - if (error instanceof gaxios_1.GaxiosError && error.response) { - throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, - // Preserve other fields from the original error. - error); - } - // Request could fail before the server responds. - throw error; - } - } -} -/** - * External Account Authorized User Client. This is used for OAuth2 credentials - * sourced using external identities through Workforce Identity Federation. - * Obtaining the initial access and refresh token can be done through the - * Google Cloud CLI. - */ -class ExternalAccountAuthorizedUserClient extends authclient_1.AuthClient { - /** - * Instantiates an ExternalAccountAuthorizedUserClient instances using the - * provided JSON object loaded from a credentials files. - * An error is throws if the credential is not valid. - * @param options The external account authorized user option object typically - * from the external accoutn authorized user JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - var _a; - super({ ...options, ...additionalOptions }); - if (options.universe_domain) { - this.universeDomain = options.universe_domain; - } - this.refreshToken = options.refresh_token; - const clientAuth = { - confidentialClientType: 'basic', - clientId: options.client_id, - clientSecret: options.client_secret, - }; - this.externalAccountAuthorizedUserHandler = - new ExternalAccountAuthorizedUserHandler((_a = options.token_url) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain), this.transporter, clientAuth); - this.cachedAccessToken = null; - this.quotaProjectId = options.quota_project_id; - // As threshold could be zero, - // eagerRefreshThresholdMillis || EXPIRATION_TIME_OFFSET will override the - // zero value. - if (typeof (additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.eagerRefreshThresholdMillis) !== 'number') { - this.eagerRefreshThresholdMillis = baseexternalclient_1.EXPIRATION_TIME_OFFSET; - } - else { - this.eagerRefreshThresholdMillis = additionalOptions - .eagerRefreshThresholdMillis; - } - this.forceRefreshOnFailure = !!(additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.forceRefreshOnFailure); - } - async getAccessToken() { - // If cached access token is unavailable or expired, force refresh. - if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { - await this.refreshAccessTokenAsync(); - } - // Return GCP access token in GetAccessTokenResponse format. - return { - token: this.cachedAccessToken.access_token, - res: this.cachedAccessToken.res, - }; - } - async getRequestHeaders() { - const accessTokenResponse = await this.getAccessToken(); - const headers = { - Authorization: `Bearer ${accessTokenResponse.token}`, - }; - return this.addSharedMetadataHeaders(headers); - } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); - } - else { - return this.requestAsync(opts); - } - } - /** - * Authenticates the provided HTTP request, processes it and resolves with the - * returned response. - * @param opts The HTTP request options. - * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. - * @return A promise that resolves with the successful response. - */ - async requestAsync(opts, reAuthRetried = false) { - let response; - try { - const requestHeaders = await this.getRequestHeaders(); - opts.headers = opts.headers || {}; - if (requestHeaders && requestHeaders['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = - requestHeaders['x-goog-user-project']; - } - if (requestHeaders && requestHeaders.Authorization) { - opts.headers.Authorization = requestHeaders.Authorization; - } - response = await this.transporter.request(opts); - } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - forceRefreshOnFailure is true - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - this.forceRefreshOnFailure) { - await this.refreshAccessTokenAsync(); - return await this.requestAsync(opts, true); - } - } - throw e; - } - return response; - } - /** - * Forces token refresh, even if unexpired tokens are currently cached. - * @return A promise that resolves with the refreshed credential. - */ - async refreshAccessTokenAsync() { - // Refresh the access token using the refresh token. - const refreshResponse = await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken); - this.cachedAccessToken = { - access_token: refreshResponse.access_token, - expiry_date: new Date().getTime() + refreshResponse.expires_in * 1000, - res: refreshResponse.res, - }; - if (refreshResponse.refresh_token !== undefined) { - this.refreshToken = refreshResponse.refresh_token; - } - return this.cachedAccessToken; - } - /** - * Returns whether the provided credentials are expired or not. - * If there is no expiry time, assumes the token is not expired or expiring. - * @param credentials The credentials to check for expiration. - * @return Whether the credentials are expired or not. - */ - isExpired(credentials) { - const now = new Date().getTime(); - return credentials.expiry_date - ? now >= credentials.expiry_date - this.eagerRefreshThresholdMillis - : false; - } -} -exports.ExternalAccountAuthorizedUserClient = ExternalAccountAuthorizedUserClient; +module.exports = function toString(obj) { + if (typeof obj === 'string') + return obj; + if (typeof obj === 'number' || Buffer.isBuffer(obj)) + return obj.toString(); + return JSON.stringify(obj); +}; /***/ }), -/***/ 94381: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 5522: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +/*global module*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var DataStream = __nccwpck_require__(61868); +var jwa = __nccwpck_require__(96010); +var Stream = __nccwpck_require__(12781); +var toString = __nccwpck_require__(65292); +var util = __nccwpck_require__(73837); +var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExternalAccountClient = void 0; -const baseexternalclient_1 = __nccwpck_require__(40810); -const identitypoolclient_1 = __nccwpck_require__(20117); -const awsclient_1 = __nccwpck_require__(71569); -const pluggable_auth_client_1 = __nccwpck_require__(44782); -/** - * Dummy class with no constructor. Developers are expected to use fromJSON. - */ -class ExternalAccountClient { - constructor() { - throw new Error('ExternalAccountClients should be initialized via: ' + - 'ExternalAccountClient.fromJSON(), ' + - 'directly via explicit constructors, eg. ' + - 'new AwsClient(options), new IdentityPoolClient(options), new' + - 'PluggableAuthClientOptions, or via ' + - 'new GoogleAuth(options).getClient()'); - } - /** - * This static method will instantiate the - * corresponding type of external account credential depending on the - * underlying credential source. - * @param options The external account options object typically loaded - * from the external account JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - * @return A BaseExternalAccountClient instance or null if the options - * provided do not correspond to an external account credential. - */ - static fromJSON(options, additionalOptions) { - var _a, _b; - if (options && options.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { - if ((_a = options.credential_source) === null || _a === void 0 ? void 0 : _a.environment_id) { - return new awsclient_1.AwsClient(options, additionalOptions); - } - else if ((_b = options.credential_source) === null || _b === void 0 ? void 0 : _b.executable) { - return new pluggable_auth_client_1.PluggableAuthClient(options, additionalOptions); - } - else { - return new identitypoolclient_1.IdentityPoolClient(options, additionalOptions); - } - } - else { - return null; - } - } +function isObject(thing) { + return Object.prototype.toString.call(thing) === '[object Object]'; } -exports.ExternalAccountClient = ExternalAccountClient; +function safeJsonParse(thing) { + if (isObject(thing)) + return thing; + try { return JSON.parse(thing); } + catch (e) { return undefined; } +} -/***/ }), +function headerFromJWS(jwsSig) { + var encodedHeader = jwsSig.split('.', 1)[0]; + return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); +} -/***/ 27646: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function securedInputFromJWS(jwsSig) { + return jwsSig.split('.', 2).join('.'); +} -"use strict"; +function signatureFromJWS(jwsSig) { + return jwsSig.split('.')[2]; +} -// Copyright 2024 Google LLC -// -// 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. -var _a, _b, _c; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FileSubjectTokenSupplier = void 0; -const util_1 = __nccwpck_require__(73837); -const fs = __nccwpck_require__(57147); -// fs.readfile is undefined in browser karma tests causing -// `npm run browser-test` to fail as test.oauth2.ts imports this file via -// src/index.ts. -// Fallback to void function to avoid promisify throwing a TypeError. -const readFile = (0, util_1.promisify)((_a = fs.readFile) !== null && _a !== void 0 ? _a : (() => { })); -const realpath = (0, util_1.promisify)((_b = fs.realpath) !== null && _b !== void 0 ? _b : (() => { })); -const lstat = (0, util_1.promisify)((_c = fs.lstat) !== null && _c !== void 0 ? _c : (() => { })); -/** - * Internal subject token supplier implementation used when a file location - * is configured in the credential configuration used to build an {@link IdentityPoolClient} - */ -class FileSubjectTokenSupplier { - /** - * Instantiates a new file based subject token supplier. - * @param opts The file subject token supplier options to build the supplier - * with. - */ - constructor(opts) { - this.filePath = opts.filePath; - this.formatType = opts.formatType; - this.subjectTokenFieldName = opts.subjectTokenFieldName; - } - /** - * Returns the subject token stored at the file specified in the constructor. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link IdentityPoolClient}, contains the requested audience and subject - * token type for the external account identity. Not used. - */ - async getSubjectToken(context) { - // Make sure there is a file at the path. lstatSync will throw if there is - // nothing there. - let parsedFilePath = this.filePath; - try { - // Resolve path to actual file in case of symlink. Expect a thrown error - // if not resolvable. - parsedFilePath = await realpath(parsedFilePath); - if (!(await lstat(parsedFilePath)).isFile()) { - throw new Error(); - } - } - catch (err) { - if (err instanceof Error) { - err.message = `The file at ${parsedFilePath} does not exist, or it is not a file. ${err.message}`; - } - throw err; - } - let subjectToken; - const rawText = await readFile(parsedFilePath, { encoding: 'utf8' }); - if (this.formatType === 'text') { - subjectToken = rawText; - } - else if (this.formatType === 'json' && this.subjectTokenFieldName) { - const json = JSON.parse(rawText); - subjectToken = json[this.subjectTokenFieldName]; - } - if (!subjectToken) { - throw new Error('Unable to parse the subject_token from the credential_source file'); - } - return subjectToken; - } +function payloadFromJWS(jwsSig, encoding) { + encoding = encoding || 'utf8'; + var payload = jwsSig.split('.')[1]; + return Buffer.from(payload, 'base64').toString(encoding); } -exports.FileSubjectTokenSupplier = FileSubjectTokenSupplier; +function isValidJws(string) { + return JWS_REGEX.test(string) && !!headerFromJWS(string); +} -/***/ }), +function jwsVerify(jwsSig, algorithm, secretOrKey) { + if (!algorithm) { + var err = new Error("Missing algorithm parameter for jws.verify"); + err.code = "MISSING_ALGORITHM"; + throw err; + } + jwsSig = toString(jwsSig); + var signature = signatureFromJWS(jwsSig); + var securedInput = securedInputFromJWS(jwsSig); + var algo = jwa(algorithm); + return algo.verify(securedInput, signature, secretOrKey); +} -/***/ 20695: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function jwsDecode(jwsSig, opts) { + opts = opts || {}; + jwsSig = toString(jwsSig); -"use strict"; + if (!isValidJws(jwsSig)) + return null; -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GoogleAuth = exports.CLOUD_SDK_CLIENT_ID = void 0; -const child_process_1 = __nccwpck_require__(32081); -const fs = __nccwpck_require__(57147); -const gcpMetadata = __nccwpck_require__(3563); -const os = __nccwpck_require__(22037); -const path = __nccwpck_require__(71017); -const crypto_1 = __nccwpck_require__(78043); -const transporters_1 = __nccwpck_require__(72649); -const computeclient_1 = __nccwpck_require__(96875); -const idtokenclient_1 = __nccwpck_require__(80298); -const envDetect_1 = __nccwpck_require__(21380); -const jwtclient_1 = __nccwpck_require__(13959); -const refreshclient_1 = __nccwpck_require__(98790); -const impersonated_1 = __nccwpck_require__(91103); -const externalclient_1 = __nccwpck_require__(94381); -const baseexternalclient_1 = __nccwpck_require__(40810); -const authclient_1 = __nccwpck_require__(44627); -const externalAccountAuthorizedUserClient_1 = __nccwpck_require__(38765); -const util_1 = __nccwpck_require__(68905); -exports.CLOUD_SDK_CLIENT_ID = '764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com'; -const GoogleAuthExceptionMessages = { - NO_PROJECT_ID_FOUND: 'Unable to detect a Project Id in the current environment. \n' + - 'To learn more about authentication and Google APIs, visit: \n' + - 'https://cloud.google.com/docs/authentication/getting-started', - NO_CREDENTIALS_FOUND: 'Unable to find credentials in current environment. \n' + - 'To learn more about authentication and Google APIs, visit: \n' + - 'https://cloud.google.com/docs/authentication/getting-started', - NO_UNIVERSE_DOMAIN_FOUND: 'Unable to detect a Universe Domain in the current environment.\n' + - 'To learn more about Universe Domain retrieval, visit: \n' + - 'https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys', -}; -class GoogleAuth { - // Note: this properly is only public to satisify unit tests. - // https://github.com/Microsoft/TypeScript/issues/5228 - get isGCE() { - return this.checkIsGCE; - } - /** - * Configuration is resolved in the following order of precedence: - * - {@link GoogleAuthOptions.credentials `credentials`} - * - {@link GoogleAuthOptions.keyFilename `keyFilename`} - * - {@link GoogleAuthOptions.keyFile `keyFile`} - * - * {@link GoogleAuthOptions.clientOptions `clientOptions`} are passed to the - * {@link AuthClient `AuthClient`s}. - * - * @param opts - */ - constructor(opts) { - /** - * Caches a value indicating whether the auth layer is running on Google - * Compute Engine. - * @private - */ - this.checkIsGCE = undefined; - // To save the contents of the JSON credential file - this.jsonContent = null; - this.cachedCredential = null; - this.clientOptions = {}; - opts = opts || {}; - this._cachedProjectId = opts.projectId || null; - this.cachedCredential = opts.authClient || null; - this.keyFilename = opts.keyFilename || opts.keyFile; - this.scopes = opts.scopes; - this.jsonContent = opts.credentials || null; - this.clientOptions = opts.clientOptions || {}; - if (opts.universeDomain) { - this.clientOptions.universeDomain = opts.universeDomain; - } - } - // GAPIC client libraries should always use self-signed JWTs. The following - // variables are set on the JWT client in order to indicate the type of library, - // and sign the JWT with the correct audience and scopes (if not supplied). - setGapicJWTValues(client) { - client.defaultServicePath = this.defaultServicePath; - client.useJWTAccessWithScope = this.useJWTAccessWithScope; - client.defaultScopes = this.defaultScopes; - } - getProjectId(callback) { - if (callback) { - this.getProjectIdAsync().then(r => callback(null, r), callback); - } - else { - return this.getProjectIdAsync(); - } - } - /** - * A temporary method for internal `getProjectId` usages where `null` is - * acceptable. In a future major release, `getProjectId` should return `null` - * (as the `Promise` base signature describes) and this private - * method should be removed. - * - * @returns Promise that resolves with project id (or `null`) - */ - async getProjectIdOptional() { - try { - return await this.getProjectId(); - } - catch (e) { - if (e instanceof Error && - e.message === GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND) { - return null; - } - else { - throw e; - } - } - } - /* - * A private method for finding and caching a projectId. - * - * Supports environments in order of precedence: - * - GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable - * - GOOGLE_APPLICATION_CREDENTIALS JSON file - * - Cloud SDK: `gcloud config config-helper --format json` - * - GCE project ID from metadata server - * - * @returns projectId - */ - async findAndCacheProjectId() { - let projectId = null; - projectId || (projectId = await this.getProductionProjectId()); - projectId || (projectId = await this.getFileProjectId()); - projectId || (projectId = await this.getDefaultServiceProjectId()); - projectId || (projectId = await this.getGCEProjectId()); - projectId || (projectId = await this.getExternalAccountClientProjectId()); - if (projectId) { - this._cachedProjectId = projectId; - return projectId; - } - else { - throw new Error(GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND); - } - } - async getProjectIdAsync() { - if (this._cachedProjectId) { - return this._cachedProjectId; - } - if (!this._findProjectIdPromise) { - this._findProjectIdPromise = this.findAndCacheProjectId(); - } - return this._findProjectIdPromise; - } - /** - * Retrieves a universe domain from the metadata server via - * {@link gcpMetadata.universe}. - * - * @returns a universe domain - */ - async getUniverseDomainFromMetadataServer() { - var _a; - let universeDomain; - try { - universeDomain = await gcpMetadata.universe('universe-domain'); - universeDomain || (universeDomain = authclient_1.DEFAULT_UNIVERSE); - } - catch (e) { - if (e && ((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { - universeDomain = authclient_1.DEFAULT_UNIVERSE; - } - else { - throw e; - } - } - return universeDomain; - } - /** - * Retrieves, caches, and returns the universe domain in the following order - * of precedence: - * - The universe domain in {@link GoogleAuth.clientOptions} - * - An existing or ADC {@link AuthClient}'s universe domain - * - {@link gcpMetadata.universe}, if {@link Compute} client - * - * @returns The universe domain - */ - async getUniverseDomain() { - let universeDomain = (0, util_1.originalOrCamelOptions)(this.clientOptions).get('universe_domain'); - try { - universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = (await this.getClient()).universeDomain); - } - catch (_a) { - // client or ADC is not available - universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = authclient_1.DEFAULT_UNIVERSE); - } - return universeDomain; - } - /** - * @returns Any scopes (user-specified or default scopes specified by the - * client library) that need to be set on the current Auth client. - */ - getAnyScopes() { - return this.scopes || this.defaultScopes; - } - getApplicationDefault(optionsOrCallback = {}, callback) { - let options; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else { - options = optionsOrCallback; - } - if (callback) { - this.getApplicationDefaultAsync(options).then(r => callback(null, r.credential, r.projectId), callback); - } - else { - return this.getApplicationDefaultAsync(options); - } - } - async getApplicationDefaultAsync(options = {}) { - // If we've already got a cached credential, return it. - // This will also preserve one's configured quota project, in case they - // set one directly on the credential previously. - if (this.cachedCredential) { - return await this.prepareAndCacheADC(this.cachedCredential); - } - // Since this is a 'new' ADC to cache we will use the environment variable - // if it's available. We prefer this value over the value from ADC. - const quotaProjectIdOverride = process.env['GOOGLE_CLOUD_QUOTA_PROJECT']; - let credential; - // Check for the existence of a local environment variable pointing to the - // location of the credential file. This is typically used in local - // developer scenarios. - credential = - await this._tryGetApplicationCredentialsFromEnvironmentVariable(options); - if (credential) { - if (credential instanceof jwtclient_1.JWT) { - credential.scopes = this.scopes; - } - else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { - credential.scopes = this.getAnyScopes(); - } - return await this.prepareAndCacheADC(credential, quotaProjectIdOverride); - } - // Look in the well-known credential file location. - credential = - await this._tryGetApplicationCredentialsFromWellKnownFile(options); - if (credential) { - if (credential instanceof jwtclient_1.JWT) { - credential.scopes = this.scopes; - } - else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { - credential.scopes = this.getAnyScopes(); - } - return await this.prepareAndCacheADC(credential, quotaProjectIdOverride); - } - // Determine if we're running on GCE. - if (await this._checkIsGCE()) { - // set universe domain for Compute client - if (!(0, util_1.originalOrCamelOptions)(options).get('universe_domain')) { - options.universeDomain = - await this.getUniverseDomainFromMetadataServer(); - } - options.scopes = this.getAnyScopes(); - return await this.prepareAndCacheADC(new computeclient_1.Compute(options), quotaProjectIdOverride); - } - throw new Error('Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.'); - } - async prepareAndCacheADC(credential, quotaProjectIdOverride) { - const projectId = await this.getProjectIdOptional(); - if (quotaProjectIdOverride) { - credential.quotaProjectId = quotaProjectIdOverride; - } - this.cachedCredential = credential; - return { credential, projectId }; - } - /** - * Determines whether the auth layer is running on Google Compute Engine. - * Checks for GCP Residency, then fallback to checking if metadata server - * is available. - * - * @returns A promise that resolves with the boolean. - * @api private - */ - async _checkIsGCE() { - if (this.checkIsGCE === undefined) { - this.checkIsGCE = - gcpMetadata.getGCPResidency() || (await gcpMetadata.isAvailable()); - } - return this.checkIsGCE; - } - /** - * Attempts to load default credentials from the environment variable path.. - * @returns Promise that resolves with the OAuth2Client or null. - * @api private - */ - async _tryGetApplicationCredentialsFromEnvironmentVariable(options) { - const credentialsPath = process.env['GOOGLE_APPLICATION_CREDENTIALS'] || - process.env['google_application_credentials']; - if (!credentialsPath || credentialsPath.length === 0) { - return null; - } - try { - return this._getApplicationCredentialsFromFilePath(credentialsPath, options); - } - catch (e) { - if (e instanceof Error) { - e.message = `Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${e.message}`; - } - throw e; - } - } - /** - * Attempts to load default credentials from a well-known file location - * @return Promise that resolves with the OAuth2Client or null. - * @api private - */ - async _tryGetApplicationCredentialsFromWellKnownFile(options) { - // First, figure out the location of the file, depending upon the OS type. - let location = null; - if (this._isWindows()) { - // Windows - location = process.env['APPDATA']; - } - else { - // Linux or Mac - const home = process.env['HOME']; - if (home) { - location = path.join(home, '.config'); - } - } - // If we found the root path, expand it. - if (location) { - location = path.join(location, 'gcloud', 'application_default_credentials.json'); - if (!fs.existsSync(location)) { - location = null; - } - } - // The file does not exist. - if (!location) { - return null; - } - // The file seems to exist. Try to use it. - const client = await this._getApplicationCredentialsFromFilePath(location, options); - return client; - } - /** - * Attempts to load default credentials from a file at the given path.. - * @param filePath The path to the file to read. - * @returns Promise that resolves with the OAuth2Client - * @api private - */ - async _getApplicationCredentialsFromFilePath(filePath, options = {}) { - // Make sure the path looks like a string. - if (!filePath || filePath.length === 0) { - throw new Error('The file path is invalid.'); - } - // Make sure there is a file at the path. lstatSync will throw if there is - // nothing there. - try { - // Resolve path to actual file in case of symlink. Expect a thrown error - // if not resolvable. - filePath = fs.realpathSync(filePath); - if (!fs.lstatSync(filePath).isFile()) { - throw new Error(); - } - } - catch (err) { - if (err instanceof Error) { - err.message = `The file at ${filePath} does not exist, or it is not a file. ${err.message}`; - } - throw err; - } - // Now open a read stream on the file, and parse it. - const readStream = fs.createReadStream(filePath); - return this.fromStream(readStream, options); - } - /** - * Create a credentials instance using a given impersonated input options. - * @param json The impersonated input object. - * @returns JWT or UserRefresh Client with data - */ - fromImpersonatedJSON(json) { - var _a, _b, _c, _d, _e; - if (!json) { - throw new Error('Must pass in a JSON object containing an impersonated refresh token'); - } - if (json.type !== impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { - throw new Error(`The incoming JSON object does not have the "${impersonated_1.IMPERSONATED_ACCOUNT_TYPE}" type`); - } - if (!json.source_credentials) { - throw new Error('The incoming JSON object does not contain a source_credentials field'); - } - if (!json.service_account_impersonation_url) { - throw new Error('The incoming JSON object does not contain a service_account_impersonation_url field'); - } - // Create source client for impersonation - const sourceClient = new refreshclient_1.UserRefreshClient(); - sourceClient.fromJSON(json.source_credentials); - if (((_a = json.service_account_impersonation_url) === null || _a === void 0 ? void 0 : _a.length) > 256) { - /** - * Prevents DOS attacks. - * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/85} - **/ - throw new RangeError(`Target principal is too long: ${json.service_account_impersonation_url}`); - } - // Extreact service account from service_account_impersonation_url - const targetPrincipal = (_c = (_b = /(?[^/]+):generateAccessToken$/.exec(json.service_account_impersonation_url)) === null || _b === void 0 ? void 0 : _b.groups) === null || _c === void 0 ? void 0 : _c.target; - if (!targetPrincipal) { - throw new RangeError(`Cannot extract target principal from ${json.service_account_impersonation_url}`); - } - const targetScopes = (_d = this.getAnyScopes()) !== null && _d !== void 0 ? _d : []; - const client = new impersonated_1.Impersonated({ - ...json, - delegates: (_e = json.delegates) !== null && _e !== void 0 ? _e : [], - sourceClient: sourceClient, - targetPrincipal: targetPrincipal, - targetScopes: Array.isArray(targetScopes) ? targetScopes : [targetScopes], - }); - return client; - } - /** - * Create a credentials instance using the given input options. - * @param json The input object. - * @param options The JWT or UserRefresh options for the client - * @returns JWT or UserRefresh Client with data - */ - fromJSON(json, options = {}) { - let client; - // user's preferred universe domain - const preferredUniverseDomain = (0, util_1.originalOrCamelOptions)(options).get('universe_domain'); - if (json.type === refreshclient_1.USER_REFRESH_ACCOUNT_TYPE) { - client = new refreshclient_1.UserRefreshClient(options); - client.fromJSON(json); - } - else if (json.type === impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { - client = this.fromImpersonatedJSON(json); - } - else if (json.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { - client = externalclient_1.ExternalAccountClient.fromJSON(json, options); - client.scopes = this.getAnyScopes(); - } - else if (json.type === externalAccountAuthorizedUserClient_1.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE) { - client = new externalAccountAuthorizedUserClient_1.ExternalAccountAuthorizedUserClient(json, options); - } - else { - options.scopes = this.scopes; - client = new jwtclient_1.JWT(options); - this.setGapicJWTValues(client); - client.fromJSON(json); - } - if (preferredUniverseDomain) { - client.universeDomain = preferredUniverseDomain; - } - return client; - } - /** - * Return a JWT or UserRefreshClient from JavaScript object, caching both the - * object used to instantiate and the client. - * @param json The input object. - * @param options The JWT or UserRefresh options for the client - * @returns JWT or UserRefresh Client with data - */ - _cacheClientFromJSON(json, options) { - const client = this.fromJSON(json, options); - // cache both raw data used to instantiate client and client itself. - this.jsonContent = json; - this.cachedCredential = client; - return client; + var header = headerFromJWS(jwsSig); + + if (!header) + return null; + + var payload = payloadFromJWS(jwsSig); + if (header.typ === 'JWT' || opts.json) + payload = JSON.parse(payload, opts.encoding); + + return { + header: header, + payload: payload, + signature: signatureFromJWS(jwsSig) + }; +} + +function VerifyStream(opts) { + opts = opts || {}; + var secretOrKey = opts.secret; + secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; + secretOrKey = secretOrKey == null ? opts.key : secretOrKey; + if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { + throw new TypeError('secret must be a string or buffer or a KeyObject') + } + var secretStream = new DataStream(secretOrKey); + this.readable = true; + this.algorithm = opts.algorithm; + this.encoding = opts.encoding; + this.secret = this.publicKey = this.key = secretStream; + this.signature = new DataStream(opts.signature); + this.secret.once('close', function () { + if (!this.signature.writable && this.readable) + this.verify(); + }.bind(this)); + + this.signature.once('close', function () { + if (!this.secret.writable && this.readable) + this.verify(); + }.bind(this)); +} +util.inherits(VerifyStream, Stream); +VerifyStream.prototype.verify = function verify() { + try { + var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); + var obj = jwsDecode(this.signature.buffer, this.encoding); + this.emit('done', valid, obj); + this.emit('data', valid); + this.emit('end'); + this.readable = false; + return valid; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); + } +}; + +VerifyStream.decode = jwsDecode; +VerifyStream.isValid = isValidJws; +VerifyStream.verify = jwsVerify; + +module.exports = VerifyStream; + + +/***/ }), + +/***/ 19775: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./abs')} */ +module.exports = Math.abs; + + +/***/ }), + +/***/ 60924: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./floor')} */ +module.exports = Math.floor; + + +/***/ }), + +/***/ 57661: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./isNaN')} */ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + + +/***/ }), + +/***/ 52419: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./max')} */ +module.exports = Math.max; + + +/***/ }), + +/***/ 73373: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./min')} */ +module.exports = Math.min; + + +/***/ }), + +/***/ 78029: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./pow')} */ +module.exports = Math.pow; + + +/***/ }), + +/***/ 59396: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./round')} */ +module.exports = Math.round; + + +/***/ }), + +/***/ 39091: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var $isNaN = __nccwpck_require__(57661); + +/** @type {import('./sign')} */ +module.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : +1; +}; + + +/***/ }), + +/***/ 47426: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = __nccwpck_require__(53765) + + +/***/ }), + +/***/ 43583: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + + + +/** + * Module dependencies. + * @private + */ + +var db = __nccwpck_require__(47426) +var extname = (__nccwpck_require__(71017).extname) + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return } - fromStream(inputStream, optionsOrCallback = {}, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else { - options = optionsOrCallback; - } - if (callback) { - this.fromStreamAsync(inputStream, options).then(r => callback(null, r), callback); - } - else { - return this.fromStreamAsync(inputStream, options); + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue } + } + + // set the extension -> mime + types[extension] = type } - fromStreamAsync(inputStream, options) { - return new Promise((resolve, reject) => { - if (!inputStream) { - throw new Error('Must pass in a stream containing the Google auth settings.'); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('error', reject) - .on('data', chunk => (s += chunk)) - .on('end', () => { - try { - try { - const data = JSON.parse(s); - const r = this._cacheClientFromJSON(data, options); - return resolve(r); - } - catch (err) { - // If we failed parsing this.keyFileName, assume that it - // is a PEM or p12 certificate: - if (!this.keyFilename) - throw err; - const client = new jwtclient_1.JWT({ - ...this.clientOptions, - keyFile: this.keyFilename, - }); - this.cachedCredential = client; - this.setGapicJWTValues(client); - return resolve(client); - } - } - catch (err) { - return reject(err); - } - }); - }); - } - /** - * Create a credentials instance using the given API key string. - * @param apiKey The API key string - * @param options An optional options object. - * @returns A JWT loaded from the key - */ - fromAPIKey(apiKey, options) { - options = options || {}; - const client = new jwtclient_1.JWT(options); - client.fromAPIKey(apiKey); - return client; - } - /** - * Determines whether the current operating system is Windows. - * @api private - */ - _isWindows() { - const sys = os.platform(); - if (sys && sys.length >= 3) { - if (sys.substring(0, 3).toLowerCase() === 'win') { - return true; - } - } - return false; + }) +} + + +/***/ }), + +/***/ 46038: +/***/ ((module) => { + +"use strict"; + + +/** + * @param typeMap [Object] Map of MIME type -> Array[extensions] + * @param ... + */ +function Mime() { + this._types = Object.create(null); + this._extensions = Object.create(null); + + for (let i = 0; i < arguments.length; i++) { + this.define(arguments[i]); + } + + this.define = this.define.bind(this); + this.getType = this.getType.bind(this); + this.getExtension = this.getExtension.bind(this); +} + +/** + * Define mimetype -> extension mappings. Each key is a mime-type that maps + * to an array of extensions associated with the type. The first extension is + * used as the default extension for the type. + * + * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); + * + * If a type declares an extension that has already been defined, an error will + * be thrown. To suppress this error and force the extension to be associated + * with the new type, pass `force`=true. Alternatively, you may prefix the + * extension with "*" to map the type to extension, without mapping the + * extension to the type. + * + * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); + * + * + * @param map (Object) type definitions + * @param force (Boolean) if true, force overriding of existing definitions + */ +Mime.prototype.define = function(typeMap, force) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t) { + return t.toLowerCase(); + }); + type = type.toLowerCase(); + + for (let i = 0; i < extensions.length; i++) { + const ext = extensions[i]; + + // '*' prefix = not the preferred type for this extension. So fixup the + // extension, and skip it. + if (ext[0] === '*') { + continue; + } + + if (!force && (ext in this._types)) { + throw new Error( + 'Attempt to change mapping for "' + ext + + '" extension from "' + this._types[ext] + '" to "' + type + + '". Pass `force=true` to allow this, otherwise remove "' + ext + + '" from the list of extensions for "' + type + '".' + ); + } + + this._types[ext] = type; } - /** - * Run the Google Cloud SDK command that prints the default project ID - */ - async getDefaultServiceProjectId() { - return new Promise(resolve => { - (0, child_process_1.exec)('gcloud config config-helper --format json', (err, stdout) => { - if (!err && stdout) { - try { - const projectId = JSON.parse(stdout).configuration.properties.core.project; - resolve(projectId); - return; - } - catch (e) { - // ignore errors - } - } - resolve(null); - }); - }); + + // Use first extension as default + if (force || !this._extensions[type]) { + const ext = extensions[0]; + this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1); } - /** - * Loads the project id from environment variables. - * @api private - */ - getProductionProjectId() { - return (process.env['GCLOUD_PROJECT'] || - process.env['GOOGLE_CLOUD_PROJECT'] || - process.env['gcloud_project'] || - process.env['google_cloud_project']); + } +}; + +/** + * Lookup a mime type based on extension + */ +Mime.prototype.getType = function(path) { + path = String(path); + let last = path.replace(/^.*[/\\]/, '').toLowerCase(); + let ext = last.replace(/^.*\./, '').toLowerCase(); + + let hasPath = last.length < path.length; + let hasDot = ext.length < last.length - 1; + + return (hasDot || !hasPath) && this._types[ext] || null; +}; + +/** + * Return file extension associated with a mime type + */ +Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; +}; + +module.exports = Mime; + + +/***/ }), + +/***/ 29994: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +let Mime = __nccwpck_require__(46038); +module.exports = new Mime(__nccwpck_require__(13114), __nccwpck_require__(38809)); + + +/***/ }), + +/***/ 38809: +/***/ ((module) => { + +module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; + +/***/ }), + +/***/ 13114: +/***/ ((module) => { + +module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; + +/***/ }), + +/***/ 83973: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __nccwpck_require__(33717) + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} } - /** - * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file. - * @api private - */ - async getFileProjectId() { - if (this.cachedCredential) { - // Try to read the project ID from the cached credentials file - return this.cachedCredential.projectId; - } - // Ensure the projectId is loaded from the keyFile if available. - if (this.keyFilename) { - const creds = await this.getClient(); - if (creds && creds.projectId) { - return creds.projectId; - } - } - // Try to load a credentials file and read its project ID - const r = await this._tryGetApplicationCredentialsFromEnvironmentVariable(); - if (r) { - return r.projectId; - } - else { - return null; - } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + + var options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false } - /** - * Gets the project ID from external account client if available. - */ - async getExternalAccountClientProjectId() { - if (!this.jsonContent || this.jsonContent.type !== baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { - return null; - } - const creds = await this.getClient(); - // Do not suppress the underlying error, as the error could contain helpful - // information for debugging and fixing. This is especially true for - // external account creds as in order to get the project ID, the following - // operations have to succeed: - // 1. Valid credentials file should be supplied. - // 2. Ability to retrieve access tokens from STS token exchange API. - // 3. Ability to exchange for service account impersonated credentials (if - // enabled). - // 4. Ability to get project info using the access token from step 2 or 3. - // Without surfacing the error, it is harder for developers to determine - // which step went wrong. - return await creds.getProjectId(); + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue } - /** - * Gets the Compute Engine project ID if it can be inferred. - */ - async getGCEProjectId() { - try { - const r = await gcpMetadata.project('project-id'); - return r; - } - catch (e) { - // Ignore any errors - return null; + + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue } - } - getCredentials(callback) { - if (callback) { - this.getCredentialsAsync().then(r => callback(null, r), callback); + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue } - else { - return this.getCredentialsAsync(); + + if (!stateChar) { + re += '\\(' + continue } - } - async getCredentialsAsync() { - const client = await this.getClient(); - if (client instanceof impersonated_1.Impersonated) { - return { client_email: client.getTargetPrincipal() }; + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue } - if (client instanceof baseexternalclient_1.BaseExternalAccountClient) { - const serviceAccountEmail = client.getServiceAccountEmail(); - if (serviceAccountEmail) { - return { - client_email: serviceAccountEmail, - universe_domain: client.universeDomain, - }; - } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) } - if (this.jsonContent) { - return { - client_email: this.jsonContent.client_email, - private_key: this.jsonContent.private_key, - universe_domain: this.jsonContent.universe_domain, - }; + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue } - if (await this._checkIsGCE()) { - const [client_email, universe_domain] = await Promise.all([ - gcpMetadata.instance('service-accounts/default/email'), - this.getUniverseDomain(), - ]); - return { client_email, universe_domain }; + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue } - throw new Error(GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND); - } - /** - * Automatically obtain an {@link AuthClient `AuthClient`} based on the - * provided configuration. If no options were passed, use Application - * Default Credentials. - */ - async getClient() { - if (!this.cachedCredential) { - if (this.jsonContent) { - this._cacheClientFromJSON(this.jsonContent, this.clientOptions); - } - else if (this.keyFilename) { - const filePath = path.resolve(this.keyFilename); - const stream = fs.createReadStream(filePath); - await this.fromStreamAsync(stream, this.clientOptions); - } - else { - await this.getApplicationDefaultAsync(this.clientOptions); - } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue } - return this.cachedCredential; - } - /** - * Creates a client which will fetch an ID token for authorization. - * @param targetAudience the audience for the fetched ID token. - * @returns IdTokenClient for making HTTP calls authenticated with ID tokens. - */ - async getIdTokenClient(targetAudience) { - const client = await this.getClient(); - if (!('fetchIdToken' in client)) { - throw new Error('Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.'); + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } - return new idtokenclient_1.IdTokenClient({ targetAudience, idTokenProvider: client }); - } - /** - * Automatically obtain application default credentials, and return - * an access token for making requests. - */ - async getAccessToken() { - const client = await this.getClient(); - return (await client.getAccessToken()).token; - } - /** - * Obtain the HTTP headers that will provide authorization for a given - * request. - */ - async getRequestHeaders(url) { - const client = await this.getClient(); - return client.getRequestHeaders(url); + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') } - /** - * Obtain credentials for a request, then attach the appropriate headers to - * the request options. - * @param opts Axios or Request options on which to attach the headers - */ - async authorizeRequest(opts) { - opts = opts || {}; - const url = opts.url || opts.uri; - const client = await this.getClient(); - const headers = await client.getRequestHeaders(url); - opts.headers = Object.assign(opts.headers || {}, headers); - return opts; + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' } - /** - * Automatically obtain application default credentials, and make an - * HTTP request using the given options. - * @param opts Axios request options for the HTTP request. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - async request(opts) { - const client = await this.getClient(); - return client.request(opts); + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] } - /** - * Determine the compute environment in which the code is running. - */ - getEnv() { - return (0, envDetect_1.getEnv)(); + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate } - /** - * Sign the given data with the current private key, or go out - * to the IAM API to sign it. - * @param data The data to be signed. - * @param endpoint A custom endpoint to use. - * - * @example - * ``` - * sign('data', 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/'); - * ``` - */ - async sign(data, endpoint) { - const client = await this.getClient(); - const universe = await this.getUniverseDomain(); - endpoint = - endpoint || - `https://iamcredentials.${universe}/v1/projects/-/serviceAccounts/`; - if (client instanceof impersonated_1.Impersonated) { - const signed = await client.sign(data); - return signed.signedBlob; - } - const crypto = (0, crypto_1.createCrypto)(); - if (client instanceof jwtclient_1.JWT && client.key) { - const sign = await crypto.sign(client.key, data); - return sign; + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false } - const creds = await this.getCredentials(); - if (!creds.client_email) { - throw new Error('Cannot sign data without `client_email`.'); + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ } - return this.signBlob(crypto, creds.client_email, data, endpoint); + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false } - async signBlob(crypto, emailOrUniqueId, data, endpoint) { - const url = new URL(endpoint + `${emailOrUniqueId}:signBlob`); - const res = await this.request({ - method: 'POST', - url: url.href, - data: { - payload: crypto.encodeBase64StringUtf8(data), - }, - retry: true, - retryConfig: { - httpMethodsToRetry: ['POST'], - }, - }); - return res.data.signedBlob; + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + + +/***/ }), + +/***/ 80900: +/***/ ((module) => { + +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} + + +/***/ }), + +/***/ 80467: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var Stream = _interopDefault(__nccwpck_require__(12781)); +var http = _interopDefault(__nccwpck_require__(13685)); +var Url = _interopDefault(__nccwpck_require__(57310)); +var whatwgUrl = _interopDefault(__nccwpck_require__(28665)); +var https = _interopDefault(__nccwpck_require__(95687)); +var zlib = _interopDefault(__nccwpck_require__(59796)); + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = (__nccwpck_require__(22877).convert); +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +const URL$1 = Url.URL || whatwgUrl.URL; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; + +/** + * isSameProtocol reports whether the two provided URLs use the same protocol. + * + * Both domains must already be in canonical form. + * @param {string|URL} original + * @param {string|URL} destination + */ +const isSameProtocol = function isSameProtocol(destination, original) { + const orig = new URL$1(original).protocol; + const dest = new URL$1(destination).protocol; + + return orig === dest; +}; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + destroyStream(request.body, error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + + if (response && response.body) { + destroyStream(response.body, err); + } + + finalize(); + }); + + fixResponseChunkedTransferBadEnding(req, function (err) { + if (signal && signal.aborted) { + return; + } + + if (response && response.body) { + destroyStream(response.body, err); + } + }); + + /* c8 ignore next 18 */ + if (parseInt(process.version.substring(1)) < 14) { + // Before Node.js 14, pipeline() does not fully support async iterators and does not always + // properly handle when the socket close/end events are out of order. + req.on('socket', function (s) { + s.addListener('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = s.listenerCount('data') > 0; + + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; + + request.on('socket', function (s) { + socket = s; + }); + + request.on('response', function (response) { + const headers = response.headers; + + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // tests for socket presence, as in some situations the + // the 'socket' event is not triggered for the request + // (happens in deno), avoids `TypeError` + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket && socket.listenerCount('data') > 0; + + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); +} + +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } } -exports.GoogleAuth = GoogleAuth; + /** - * Export DefaultTransporter as a static property of the class. + * Redirect code matching + * + * @param Number code Status code + * @return Boolean */ -GoogleAuth.DefaultTransporter = transporters_1.DefaultTransporter; +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports["default"] = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; +exports.AbortError = AbortError; /***/ }), -/***/ 39735: -/***/ ((__unused_webpack_module, exports) => { +/***/ 1223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var wrappy = __nccwpck_require__(62940) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) -// Copyright 2014 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IAMAuth = void 0; -class IAMAuth { - /** - * IAM credentials. - * - * @param selector the iam authority selector - * @param token the token - * @constructor - */ - constructor(selector, token) { - this.selector = selector; - this.token = token; - this.selector = selector; - this.token = token; - } - /** - * Acquire the HTTP headers required to make an authenticated request. - */ - getRequestHeaders() { - return { - 'x-goog-iam-authority-selector': this.selector, - 'x-goog-iam-authorization-token': this.token, - }; - } +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f } -exports.IAMAuth = IAMAuth; /***/ }), -/***/ 20117: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 57684: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IdentityPoolClient = void 0; -const baseexternalclient_1 = __nccwpck_require__(40810); -const util_1 = __nccwpck_require__(68905); -const filesubjecttokensupplier_1 = __nccwpck_require__(27646); -const urlsubjecttokensupplier_1 = __nccwpck_require__(7428); -/** - * Defines the Url-sourced and file-sourced external account clients mainly - * used for K8s and Azure workloads. - */ -class IdentityPoolClient extends baseexternalclient_1.BaseExternalAccountClient { - /** - * Instantiate an IdentityPoolClient instance using the provided JSON - * object loaded from an external account credentials file. - * An error is thrown if the credential is not a valid file-sourced or - * url-sourced credential or a workforce pool user project is provided - * with a non workforce audience. - * @param options The external account options object typically loaded - * from the external account JSON credential file. The camelCased options - * are aliases for the snake_cased options. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - super(options, additionalOptions); - const opts = (0, util_1.originalOrCamelOptions)(options); - const credentialSource = opts.get('credential_source'); - const subjectTokenSupplier = opts.get('subject_token_supplier'); - // Validate credential sourcing configuration. - if (!credentialSource && !subjectTokenSupplier) { - throw new Error('A credential source or subject token supplier must be specified.'); - } - if (credentialSource && subjectTokenSupplier) { - throw new Error('Only one of credential source or subject token supplier can be specified.'); - } - if (subjectTokenSupplier) { - this.subjectTokenSupplier = subjectTokenSupplier; - this.credentialSourceType = 'programmatic'; - } - else { - const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); - const formatOpts = (0, util_1.originalOrCamelOptions)(credentialSourceOpts.get('format')); - // Text is the default format type. - const formatType = formatOpts.get('type') || 'text'; - const formatSubjectTokenFieldName = formatOpts.get('subject_token_field_name'); - if (formatType !== 'json' && formatType !== 'text') { - throw new Error(`Invalid credential_source format "${formatType}"`); - } - if (formatType === 'json' && !formatSubjectTokenFieldName) { - throw new Error('Missing subject_token_field_name for JSON credential_source format'); - } - const file = credentialSourceOpts.get('file'); - const url = credentialSourceOpts.get('url'); - const headers = credentialSourceOpts.get('headers'); - if (file && url) { - throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); - } - else if (file && !url) { - this.credentialSourceType = 'file'; - this.subjectTokenSupplier = new filesubjecttokensupplier_1.FileSubjectTokenSupplier({ - filePath: file, - formatType: formatType, - subjectTokenFieldName: formatSubjectTokenFieldName, - }); - } - else if (!file && url) { - this.credentialSourceType = 'url'; - this.subjectTokenSupplier = new urlsubjecttokensupplier_1.UrlSubjectTokenSupplier({ - url: url, - formatType: formatType, - subjectTokenFieldName: formatSubjectTokenFieldName, - headers: headers, - additionalGaxiosOptions: IdentityPoolClient.RETRY_CONFIG, - }); - } - else { - throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); - } - } - } - /** - * Triggered when a external subject token is needed to be exchanged for a GCP - * access token via GCP STS endpoint. Gets a subject token by calling - * the configured {@link SubjectTokenSupplier} - * @return A promise that resolves with the external subject token. - */ - async retrieveSubjectToken() { - return this.subjectTokenSupplier.getSubjectToken(this.supplierContext); - } -} -exports.IdentityPoolClient = IdentityPoolClient; +const Queue = __nccwpck_require__(15185); +const pLimit = concurrency => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } -/***/ }), + const queue = new Queue(); + let activeCount = 0; -/***/ 80298: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + const next = () => { + activeCount--; -"use strict"; + if (queue.size > 0) { + queue.dequeue()(); + } + }; -// Copyright 2020 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IdTokenClient = void 0; -const oauth2client_1 = __nccwpck_require__(3936); -class IdTokenClient extends oauth2client_1.OAuth2Client { - /** - * Google ID Token client - * - * Retrieve ID token from the metadata server. - * See: https://cloud.google.com/docs/authentication/get-id-token#metadata-server - */ - constructor(options) { - super(options); - this.targetAudience = options.targetAudience; - this.idTokenProvider = options.idTokenProvider; - } - async getRequestMetadataAsync( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - url) { - if (!this.credentials.id_token || - !this.credentials.expiry_date || - this.isTokenExpiring()) { - const idToken = await this.idTokenProvider.fetchIdToken(this.targetAudience); - this.credentials = { - id_token: idToken, - expiry_date: this.getIdTokenExpiryDate(idToken), - }; - } - const headers = { - Authorization: 'Bearer ' + this.credentials.id_token, - }; - return { headers }; - } - getIdTokenExpiryDate(idToken) { - const payloadB64 = idToken.split('.')[1]; - if (payloadB64) { - const payload = JSON.parse(Buffer.from(payloadB64, 'base64').toString('ascii')); - return payload.exp * 1000; - } - } -} -exports.IdTokenClient = IdTokenClient; + const run = async (fn, resolve, ...args) => { + activeCount++; + + const result = (async () => fn(...args))(); + + resolve(result); + + try { + await result; + } catch {} + + next(); + }; + + const enqueue = (fn, resolve, ...args) => { + queue.enqueue(run.bind(null, fn, resolve, ...args)); + + (async () => { + // This function needs to wait until the next microtask before comparing + // `activeCount` to `concurrency`, because `activeCount` is updated asynchronously + // when the run function is dequeued and called. The comparison in the if-statement + // needs to happen asynchronously as well to get an up-to-date value for `activeCount`. + await Promise.resolve(); + + if (activeCount < concurrency && queue.size > 0) { + queue.dequeue()(); + } + })(); + }; + + const generator = (fn, ...args) => new Promise(resolve => { + enqueue(fn, resolve, ...args); + }); + + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.size + }, + clearQueue: { + value: () => { + queue.clear(); + } + } + }); + + return generator; +}; + +module.exports = pLimit; /***/ }), -/***/ 91103: +/***/ 63329: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; + +var parseUrl = (__nccwpck_require__(57310).parse); + +var DEFAULT_PORTS = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443, +}; + +var stringEndsWith = String.prototype.endsWith || function(s) { + return s.length <= this.length && + this.indexOf(s, this.length - s.length) !== -1; +}; + /** - * Copyright 2021 Google LLC - * - * 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 + * @param {string|object} url - The URL, or the result from url.parse. + * @return {string} The URL of the proxy that should handle the request to the + * given URL. If no proxy is set, this will be an empty string. + */ +function getProxyForUrl(url) { + var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { + return ''; // Don't proxy URLs without a valid scheme or host. + } + + proto = proto.split(':', 1)[0]; + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, ''); + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ''; // Don't proxy URLs that match NO_PROXY. + } + + var proxy = + getEnv('npm_config_' + proto + '_proxy') || + getEnv(proto + '_proxy') || + getEnv('npm_config_proxy') || + getEnv('all_proxy'); + if (proxy && proxy.indexOf('://') === -1) { + // Missing scheme in proxy, default to the requested URL's scheme. + proxy = proto + '://' + proxy; + } + return proxy; +} + +/** + * Determines whether a given URL should be proxied. * - * 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. + * @param {string} hostname - The host name of the URL. + * @param {number} port - The effective port of the URL. + * @returns {boolean} Whether the given URL should be proxied. + * @private */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Impersonated = exports.IMPERSONATED_ACCOUNT_TYPE = void 0; -const oauth2client_1 = __nccwpck_require__(3936); -const gaxios_1 = __nccwpck_require__(59555); -exports.IMPERSONATED_ACCOUNT_TYPE = 'impersonated_service_account'; -class Impersonated extends oauth2client_1.OAuth2Client { - /** - * Impersonated service account credentials. - * - * Create a new access token by impersonating another service account. - * - * Impersonated Credentials allowing credentials issued to a user or - * service account to impersonate another. The source project using - * Impersonated Credentials must enable the "IAMCredentials" API. - * Also, the target service account must grant the orginating principal - * the "Service Account Token Creator" IAM role. - * - * @param {object} options - The configuration object. - * @param {object} [options.sourceClient] the source credential used as to - * acquire the impersonated credentials. - * @param {string} [options.targetPrincipal] the service account to - * impersonate. - * @param {string[]} [options.delegates] the chained list of delegates - * required to grant the final access_token. If set, the sequence of - * identities must have "Service Account Token Creator" capability granted to - * the preceding identity. For example, if set to [serviceAccountB, - * serviceAccountC], the sourceCredential must have the Token Creator role on - * serviceAccountB. serviceAccountB must have the Token Creator on - * serviceAccountC. Finally, C must have Token Creator on target_principal. - * If left unset, sourceCredential must have that role on targetPrincipal. - * @param {string[]} [options.targetScopes] scopes to request during the - * authorization grant. - * @param {number} [options.lifetime] number of seconds the delegated - * credential should be valid for up to 3600 seconds by default, or 43,200 - * seconds by extending the token's lifetime, see: - * https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials#sa-credentials-oauth - * @param {string} [options.endpoint] api endpoint override. - */ - constructor(options = {}) { - var _a, _b, _c, _d, _e, _f; - super(options); - // Start with an expired refresh token, which will automatically be - // refreshed before the first API call is made. - this.credentials = { - expiry_date: 1, - refresh_token: 'impersonated-placeholder', - }; - this.sourceClient = (_a = options.sourceClient) !== null && _a !== void 0 ? _a : new oauth2client_1.OAuth2Client(); - this.targetPrincipal = (_b = options.targetPrincipal) !== null && _b !== void 0 ? _b : ''; - this.delegates = (_c = options.delegates) !== null && _c !== void 0 ? _c : []; - this.targetScopes = (_d = options.targetScopes) !== null && _d !== void 0 ? _d : []; - this.lifetime = (_e = options.lifetime) !== null && _e !== void 0 ? _e : 3600; - this.endpoint = (_f = options.endpoint) !== null && _f !== void 0 ? _f : 'https://iamcredentials.googleapis.com'; - } - /** - * Signs some bytes. - * - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob Reference Documentation} - * @param blobToSign String to sign. - * @return denoting the keyyID and signedBlob in base64 string - */ - async sign(blobToSign) { - await this.sourceClient.getAccessToken(); - const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; - const u = `${this.endpoint}/v1/${name}:signBlob`; - const body = { - delegates: this.delegates, - payload: Buffer.from(blobToSign).toString('base64'), - }; - const res = await this.sourceClient.request({ - ...Impersonated.RETRY_CONFIG, - url: u, - data: body, - method: 'POST', - }); - return res.data; +function shouldProxy(hostname, port) { + var NO_PROXY = + (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); + if (!NO_PROXY) { + return true; // Always proxy if NO_PROXY is not set. + } + if (NO_PROXY === '*') { + return false; // Never proxy if wildcard is set. + } + + return NO_PROXY.split(/[,\s]/).every(function(proxy) { + if (!proxy) { + return true; // Skip zero-length hosts. } - /** The service account email to be impersonated. */ - getTargetPrincipal() { - return this.targetPrincipal; + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; // Skip if ports don't match. } - /** - * Refreshes the access token. - */ - async refreshToken() { - var _a, _b, _c, _d, _e, _f; - try { - await this.sourceClient.getAccessToken(); - const name = 'projects/-/serviceAccounts/' + this.targetPrincipal; - const u = `${this.endpoint}/v1/${name}:generateAccessToken`; - const body = { - delegates: this.delegates, - scope: this.targetScopes, - lifetime: this.lifetime + 's', - }; - const res = await this.sourceClient.request({ - ...Impersonated.RETRY_CONFIG, - url: u, - data: body, - method: 'POST', - }); - const tokenResponse = res.data; - this.credentials.access_token = tokenResponse.accessToken; - this.credentials.expiry_date = Date.parse(tokenResponse.expireTime); - return { - tokens: this.credentials, - res, - }; - } - catch (error) { - if (!(error instanceof Error)) - throw error; - let status = 0; - let message = ''; - if (error instanceof gaxios_1.GaxiosError) { - status = (_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.status; - message = (_f = (_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.message; - } - if (status && message) { - error.message = `${status}: unable to impersonate: ${message}`; - throw error; - } - else { - error.message = `unable to impersonate: ${error}`; - throw error; - } - } + + if (!/^[.*]/.test(parsedProxyHostname)) { + // No wildcards, so stop proxying if there is an exact match. + return hostname !== parsedProxyHostname; } - /** - * Generates an OpenID Connect ID token for a service account. - * - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/generateIdToken Reference Documentation} - * - * @param targetAudience the audience for the fetched ID token. - * @param options the for the request - * @return an OpenID Connect ID token - */ - async fetchIdToken(targetAudience, options) { - var _a; - await this.sourceClient.getAccessToken(); - const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; - const u = `${this.endpoint}/v1/${name}:generateIdToken`; - const body = { - delegates: this.delegates, - audience: targetAudience, - includeEmail: (_a = options === null || options === void 0 ? void 0 : options.includeEmail) !== null && _a !== void 0 ? _a : true, - }; - const res = await this.sourceClient.request({ - ...Impersonated.RETRY_CONFIG, - url: u, - data: body, - method: 'POST', - }); - return res.data.token; + + if (parsedProxyHostname.charAt(0) === '*') { + // Remove leading wildcard. + parsedProxyHostname = parsedProxyHostname.slice(1); } + // Stop proxying if the hostname ends with the no_proxy host. + return !stringEndsWith.call(hostname, parsedProxyHostname); + }); } -exports.Impersonated = Impersonated; + +/** + * Get the value for an environment variable. + * + * @param {string} key - The name of the environment variable. + * @return {string} The value of the environment variable. + * @private + */ +function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; +} + +exports.getProxyForUrl = getProxyForUrl; /***/ }), -/***/ 68740: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 67214: +/***/ ((module) => { "use strict"; -// Copyright 2015 Google LLC + +const codes = {}; + +function createErrorType(code, message, Base) { + if (!Base) { + Base = Error + } + + function getMessage (arg1, arg2, arg3) { + if (typeof message === 'string') { + return message + } else { + return message(arg1, arg2, arg3) + } + } + + class NodeError extends Base { + constructor (arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + + codes[code] = NodeError; +} + +// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js +function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; + } + } else { + return `of ${thing} ${String(expected)}`; + } +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith +function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith +function endsWith(str, search, this_len) { + if (this_len === undefined || this_len > str.length) { + this_len = str.length; + } + return str.substring(this_len - search.length, this_len) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes +function includes(str, search, start) { + if (typeof start !== 'number') { + start = 0; + } + + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } +} + +createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"' +}, TypeError); +createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { + // determiner: 'must be' or 'must not be' + let determiner; + if (typeof expected === 'string' && startsWith(expected, 'not ')) { + determiner = 'must not be'; + expected = expected.replace(/^not /, ''); + } else { + determiner = 'must be'; + } + + let msg; + if (endsWith(name, ' argument')) { + // For cases like 'first argument' + msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; + } else { + const type = includes(name, '.') ? 'property' : 'argument'; + msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; + } + + msg += `. Received type ${typeof actual}`; + return msg; +}, TypeError); +createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); +createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { + return 'The ' + name + ' method is not implemented' +}); +createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); +createErrorType('ERR_STREAM_DESTROYED', function (name) { + return 'Cannot call ' + name + ' after a stream was destroyed'; +}); +createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); +createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); +createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); +createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); +createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { + return 'Unknown encoding: ' + arg +}, TypeError); +createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); + +module.exports.q = codes; + + +/***/ }), + +/***/ 41359: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JWTAccess = void 0; -const jws = __nccwpck_require__(4636); -const util_1 = __nccwpck_require__(68905); -const DEFAULT_HEADER = { - alg: 'RS256', - typ: 'JWT', +// 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + + + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; }; -class JWTAccess { - /** - * JWTAccess service account credentials. - * - * Create a new access token by using the credential to create a new JWT token - * that's recognized as the access token. - * - * @param email the service account email address. - * @param key the private key that will be used to sign the token. - * @param keyId the ID of the private key used to sign the token. - */ - constructor(email, key, keyId, eagerRefreshThresholdMillis) { - this.cache = new util_1.LRUCache({ - capacity: 500, - maxAge: 60 * 60 * 1000, - }); - this.email = email; - this.key = key; - this.keyId = keyId; - this.eagerRefreshThresholdMillis = - eagerRefreshThresholdMillis !== null && eagerRefreshThresholdMillis !== void 0 ? eagerRefreshThresholdMillis : 5 * 60 * 1000; - } - /** - * Ensures that we're caching a key appropriately, giving precedence to scopes vs. url - * - * @param url The URI being authorized. - * @param scopes The scope or scopes being authorized - * @returns A string that returns the cached key. - */ - getCachedKey(url, scopes) { - let cacheKey = url; - if (scopes && Array.isArray(scopes) && scopes.length) { - cacheKey = url ? `${url}_${scopes.join('_')}` : `${scopes.join('_')}`; - } - else if (typeof scopes === 'string') { - cacheKey = url ? `${url}_${scopes}` : scopes; - } - if (!cacheKey) { - throw Error('Scopes or url must be provided'); - } - return cacheKey; - } - /** - * Get a non-expired access token, after refreshing if necessary. - * - * @param url The URI being authorized. - * @param additionalClaims An object with a set of additional claims to - * include in the payload. - * @returns An object that includes the authorization header. - */ - getRequestHeaders(url, additionalClaims, scopes) { - // Return cached authorization headers, unless we are within - // eagerRefreshThresholdMillis ms of them expiring: - const key = this.getCachedKey(url, scopes); - const cachedToken = this.cache.get(key); - const now = Date.now(); - if (cachedToken && - cachedToken.expiration - now > this.eagerRefreshThresholdMillis) { - return cachedToken.headers; - } - const iat = Math.floor(Date.now() / 1000); - const exp = JWTAccess.getExpirationTime(iat); - let defaultClaims; - // Turn scopes into space-separated string - if (Array.isArray(scopes)) { - scopes = scopes.join(' '); - } - // If scopes are specified, sign with scopes - if (scopes) { - defaultClaims = { - iss: this.email, - sub: this.email, - scope: scopes, - exp, - iat, - }; - } - else { - defaultClaims = { - iss: this.email, - sub: this.email, - aud: url, - exp, - iat, - }; - } - // if additionalClaims are provided, ensure they do not collide with - // other required claims. - if (additionalClaims) { - for (const claim in defaultClaims) { - if (additionalClaims[claim]) { - throw new Error(`The '${claim}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`); - } - } - } - const header = this.keyId - ? { ...DEFAULT_HEADER, kid: this.keyId } - : DEFAULT_HEADER; - const payload = Object.assign(defaultClaims, additionalClaims); - // Sign the jwt and add it to the cache - const signedJWT = jws.sign({ header, payload, secret: this.key }); - const headers = { Authorization: `Bearer ${signedJWT}` }; - this.cache.set(key, { - expiration: exp * 1000, - headers, - }); - return headers; - } - /** - * Returns an expiration time for the JWT token. - * - * @param iat The issued at time for the JWT. - * @returns An expiration time for the JWT. - */ - static getExpirationTime(iat) { - const exp = iat + 3600; // 3600 seconds = 1 hour - return exp; - } - /** - * Create a JWTAccess credentials instance using the given input options. - * @param json The input object. - */ - fromJSON(json) { - if (!json) { - throw new Error('Must pass in a JSON object containing the service account auth settings.'); - } - if (!json.client_email) { - throw new Error('The incoming JSON object does not contain a client_email field'); - } - if (!json.private_key) { - throw new Error('The incoming JSON object does not contain a private_key field'); - } - // Extract the relevant information from the json key file. - this.email = json.client_email; - this.key = json.private_key; - this.keyId = json.private_key_id; - this.projectId = json.project_id; - } - fromStream(inputStream, callback) { - if (callback) { - this.fromStreamAsync(inputStream).then(() => callback(), callback); - } - else { - return this.fromStreamAsync(inputStream); - } +/**/ + +module.exports = Duplex; +var Readable = __nccwpck_require__(51433); +var Writable = __nccwpck_require__(26993); +__nccwpck_require__(44124)(Duplex, Readable); +{ + // Allow the keys array to be GC'ed. + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + if (options) { + if (options.readable === false) this.readable = false; + if (options.writable === false) this.writable = false; + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once('end', onend); } - fromStreamAsync(inputStream) { - return new Promise((resolve, reject) => { - if (!inputStream) { - reject(new Error('Must pass in a stream containing the service account auth settings.')); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('data', chunk => (s += chunk)) - .on('error', reject) - .on('end', () => { - try { - const data = JSON.parse(s); - this.fromJSON(data); - resolve(); - } - catch (err) { - reject(err); - } - }); - }); + } +} +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); +Object.defineProperty(Duplex.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +Object.defineProperty(Duplex.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); + +// the no-half-open enforcer +function onend() { + // If the writable side ended, then we're ok. + if (this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(onEndNT, this); +} +function onEndNT(self) { + self.end(); +} +Object.defineProperty(Duplex.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; } -} -exports.JWTAccess = JWTAccess; + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); /***/ }), -/***/ 13959: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 81542: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2013 Google LLC +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JWT = void 0; -const gtoken_1 = __nccwpck_require__(76031); -const jwtaccess_1 = __nccwpck_require__(68740); -const oauth2client_1 = __nccwpck_require__(3936); -const authclient_1 = __nccwpck_require__(44627); -class JWT extends oauth2client_1.OAuth2Client { - constructor(optionsOrEmail, keyFile, key, scopes, subject, keyId) { - const opts = optionsOrEmail && typeof optionsOrEmail === 'object' - ? optionsOrEmail - : { email: optionsOrEmail, keyFile, key, keyId, scopes, subject }; - super(opts); - this.email = opts.email; - this.keyFile = opts.keyFile; - this.key = opts.key; - this.keyId = opts.keyId; - this.scopes = opts.scopes; - this.subject = opts.subject; - this.additionalClaims = opts.additionalClaims; - // Start with an expired refresh token, which will automatically be - // refreshed before the first API call is made. - this.credentials = { refresh_token: 'jwt-placeholder', expiry_date: 1 }; - } - /** - * Creates a copy of the credential with the specified scopes. - * @param scopes List of requested scopes or a single scope. - * @return The cloned instance. - */ - createScoped(scopes) { - const jwt = new JWT(this); - jwt.scopes = scopes; - return jwt; - } - /** - * Obtains the metadata to be sent with the request. - * - * @param url the URI being authorized. - */ - async getRequestMetadataAsync(url) { - url = this.defaultServicePath ? `https://${this.defaultServicePath}/` : url; - const useSelfSignedJWT = (!this.hasUserScopes() && url) || - (this.useJWTAccessWithScope && this.hasAnyScopes()) || - this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; - if (this.subject && this.universeDomain !== authclient_1.DEFAULT_UNIVERSE) { - throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${authclient_1.DEFAULT_UNIVERSE}`); - } - if (!this.apiKey && useSelfSignedJWT) { - if (this.additionalClaims && - this.additionalClaims.target_audience) { - const { tokens } = await this.refreshToken(); - return { - headers: this.addSharedMetadataHeaders({ - Authorization: `Bearer ${tokens.id_token}`, - }), - }; - } - else { - // no scopes have been set, but a uri has been provided. Use JWTAccess - // credentials. - if (!this.access) { - this.access = new jwtaccess_1.JWTAccess(this.email, this.key, this.keyId, this.eagerRefreshThresholdMillis); - } - let scopes; - if (this.hasUserScopes()) { - scopes = this.scopes; - } - else if (!url) { - scopes = this.defaultScopes; - } - const useScopes = this.useJWTAccessWithScope || - this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; - const headers = await this.access.getRequestHeaders(url !== null && url !== void 0 ? url : undefined, this.additionalClaims, - // Scopes take precedent over audience for signing, - // so we only provide them if `useJWTAccessWithScope` is on or - // if we are in a non-default universe - useScopes ? scopes : undefined); - return { headers: this.addSharedMetadataHeaders(headers) }; - } - } - else if (this.hasAnyScopes() || this.apiKey) { - return super.getRequestMetadataAsync(url); - } - else { - // If no audience, apiKey, or scopes are provided, we should not attempt - // to populate any headers: - return { headers: {} }; - } - } - /** - * Fetches an ID token. - * @param targetAudience the audience for the fetched ID token. - */ - async fetchIdToken(targetAudience) { - // Create a new gToken for fetching an ID token - const gtoken = new gtoken_1.GoogleToken({ - iss: this.email, - sub: this.subject, - scope: this.scopes || this.defaultScopes, - keyFile: this.keyFile, - key: this.key, - additionalClaims: { target_audience: targetAudience }, - transporter: this.transporter, - }); - await gtoken.getToken({ - forceRefresh: true, - }); - if (!gtoken.idToken) { - throw new Error('Unknown error: Failed to fetch ID token'); - } - return gtoken.idToken; - } - /** - * Determine if there are currently scopes available. - */ - hasUserScopes() { - if (!this.scopes) { - return false; - } - return this.scopes.length > 0; - } - /** - * Are there any default or user scopes defined. - */ - hasAnyScopes() { - if (this.scopes && this.scopes.length > 0) - return true; - if (this.defaultScopes && this.defaultScopes.length > 0) - return true; - return false; - } - authorize(callback) { - if (callback) { - this.authorizeAsync().then(r => callback(null, r), callback); - } - else { - return this.authorizeAsync(); - } - } - async authorizeAsync() { - const result = await this.refreshToken(); - if (!result) { - throw new Error('No result returned'); - } - this.credentials = result.tokens; - this.credentials.refresh_token = 'jwt-placeholder'; - this.key = this.gtoken.key; - this.email = this.gtoken.iss; - return result.tokens; - } - /** - * Refreshes the access token. - * @param refreshToken ignored - * @private - */ - async refreshTokenNoCache( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - refreshToken) { - const gtoken = this.createGToken(); - const token = await gtoken.getToken({ - forceRefresh: this.isTokenExpiring(), - }); - const tokens = { - access_token: token.access_token, - token_type: 'Bearer', - expiry_date: gtoken.expiresAt, - id_token: gtoken.idToken, - }; - this.emit('tokens', tokens); - return { res: null, tokens }; - } - /** - * Create a gToken if it doesn't already exist. - */ - createGToken() { - if (!this.gtoken) { - this.gtoken = new gtoken_1.GoogleToken({ - iss: this.email, - sub: this.subject, - scope: this.scopes || this.defaultScopes, - keyFile: this.keyFile, - key: this.key, - additionalClaims: this.additionalClaims, - transporter: this.transporter, - }); - } - return this.gtoken; - } - /** - * Create a JWT credentials instance using the given input options. - * @param json The input object. - */ - fromJSON(json) { - if (!json) { - throw new Error('Must pass in a JSON object containing the service account auth settings.'); - } - if (!json.client_email) { - throw new Error('The incoming JSON object does not contain a client_email field'); - } - if (!json.private_key) { - throw new Error('The incoming JSON object does not contain a private_key field'); - } - // Extract the relevant information from the json key file. - this.email = json.client_email; - this.key = json.private_key; - this.keyId = json.private_key_id; - this.projectId = json.project_id; - this.quotaProjectId = json.quota_project_id; - this.universeDomain = json.universe_domain || this.universeDomain; - } - fromStream(inputStream, callback) { - if (callback) { - this.fromStreamAsync(inputStream).then(() => callback(), callback); - } - else { - return this.fromStreamAsync(inputStream); - } - } - fromStreamAsync(inputStream) { - return new Promise((resolve, reject) => { - if (!inputStream) { - throw new Error('Must pass in a stream containing the service account auth settings.'); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('error', reject) - .on('data', chunk => (s += chunk)) - .on('end', () => { - try { - const data = JSON.parse(s); - this.fromJSON(data); - resolve(); - } - catch (e) { - reject(e); - } - }); - }); - } - /** - * Creates a JWT credentials instance using an API Key for authentication. - * @param apiKey The API Key in string form. - */ - fromAPIKey(apiKey) { - if (typeof apiKey !== 'string') { - throw new Error('Must provide an API Key string.'); - } - this.apiKey = apiKey; - } - /** - * Using the key or keyFile on the JWT client, obtain an object that contains - * the key and the client email. - */ - async getCredentials() { - if (this.key) { - return { private_key: this.key, client_email: this.email }; - } - else if (this.keyFile) { - const gtoken = this.createGToken(); - const creds = await gtoken.getCredentials(this.keyFile); - return { private_key: creds.privateKey, client_email: creds.clientEmail }; - } - throw new Error('A key or a keyFile must be provided to getCredentials.'); - } -} -exports.JWT = JWT; +// 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; +var Transform = __nccwpck_require__(34415); +__nccwpck_require__(44124)(PassThrough, Transform); +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); +} +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; + /***/ }), -/***/ 74524: -/***/ ((__unused_webpack_module, exports) => { +/***/ 51433: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2014 Google LLC +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LoginTicket = void 0; -class LoginTicket { - /** - * Create a simple class to extract user ID from an ID Token - * - * @param {string} env Envelope of the jwt - * @param {TokenPayload} pay Payload of the jwt - * @constructor - */ - constructor(env, pay) { - this.envelope = env; - this.payload = pay; - } - getEnvelope() { - return this.envelope; - } - getPayload() { - return this.payload; - } - /** - * Create a simple class to extract user ID from an ID Token - * - * @return The user ID - */ - getUserId() { - const payload = this.getPayload(); - if (payload && payload.sub) { - return payload.sub; - } - return null; - } - /** - * Returns attributes from the login ticket. This can contain - * various information about the user session. - * - * @return The envelope and payload - */ - getAttributes() { - return { envelope: this.getEnvelope(), payload: this.getPayload() }; - } +// 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. + + + +module.exports = Readable; + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = (__nccwpck_require__(82361).EventEmitter); +var EElistenerCount = function EElistenerCount(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = __nccwpck_require__(62387); +/**/ + +var Buffer = (__nccwpck_require__(14300).Buffer); +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); } -exports.LoginTicket = LoginTicket; +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ +var debugUtil = __nccwpck_require__(73837); +var debug; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function debug() {}; +} +/**/ + +var BufferList = __nccwpck_require__(52746); +var destroyImpl = __nccwpck_require__(97049); +var _require = __nccwpck_require__(39948), + getHighWaterMark = _require.getHighWaterMark; +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + +// Lazy loaded to improve the startup performance. +var StringDecoder; +var createReadableStreamAsyncIterator; +var from; +__nccwpck_require__(44124)(Readable, Stream); +var errorOrDestroy = destroyImpl.errorOrDestroy; +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} +function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || __nccwpck_require__(41359); + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + // Should close be emitted on destroy. Defaults to true. + this.emitClose = options.emitClose !== false; -/***/ }), + // Should .destroy() be called after 'end' (and potentially 'finish') + this.autoDestroy = !!options.autoDestroy; -/***/ 3936: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // has it been destroyed + this.destroyed = false; -"use strict"; + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OAuth2Client = exports.CertificateFormat = exports.CodeChallengeMethod = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const querystring = __nccwpck_require__(63477); -const stream = __nccwpck_require__(12781); -const formatEcdsa = __nccwpck_require__(11728); -const crypto_1 = __nccwpck_require__(78043); -const authclient_1 = __nccwpck_require__(44627); -const loginticket_1 = __nccwpck_require__(74524); -var CodeChallengeMethod; -(function (CodeChallengeMethod) { - CodeChallengeMethod["Plain"] = "plain"; - CodeChallengeMethod["S256"] = "S256"; -})(CodeChallengeMethod || (exports.CodeChallengeMethod = CodeChallengeMethod = {})); -var CertificateFormat; -(function (CertificateFormat) { - CertificateFormat["PEM"] = "PEM"; - CertificateFormat["JWK"] = "JWK"; -})(CertificateFormat || (exports.CertificateFormat = CertificateFormat = {})); -class OAuth2Client extends authclient_1.AuthClient { - constructor(optionsOrClientId, clientSecret, redirectUri) { - const opts = optionsOrClientId && typeof optionsOrClientId === 'object' - ? optionsOrClientId - : { clientId: optionsOrClientId, clientSecret, redirectUri }; - super(opts); - this.certificateCache = {}; - this.certificateExpiry = null; - this.certificateCacheFormat = CertificateFormat.PEM; - this.refreshTokenPromises = new Map(); - this._clientId = opts.clientId; - this._clientSecret = opts.clientSecret; - this.redirectUri = opts.redirectUri; - this.endpoints = { - tokenInfoUrl: 'https://oauth2.googleapis.com/tokeninfo', - oauth2AuthBaseUrl: 'https://accounts.google.com/o/oauth2/v2/auth', - oauth2TokenUrl: 'https://oauth2.googleapis.com/token', - oauth2RevokeUrl: 'https://oauth2.googleapis.com/revoke', - oauth2FederatedSignonPemCertsUrl: 'https://www.googleapis.com/oauth2/v1/certs', - oauth2FederatedSignonJwkCertsUrl: 'https://www.googleapis.com/oauth2/v3/certs', - oauth2IapPublicKeyUrl: 'https://www.gstatic.com/iap/verify/public_key', - ...opts.endpoints, - }; - this.issuers = opts.issuers || [ - 'accounts.google.com', - 'https://accounts.google.com', - this.universeDomain, - ]; - } - /** - * Generates URL for consent page landing. - * @param opts Options. - * @return URL to consent page. - */ - generateAuthUrl(opts = {}) { - if (opts.code_challenge_method && !opts.code_challenge) { - throw new Error('If a code_challenge_method is provided, code_challenge must be included.'); - } - opts.response_type = opts.response_type || 'code'; - opts.client_id = opts.client_id || this._clientId; - opts.redirect_uri = opts.redirect_uri || this.redirectUri; - // Allow scopes to be passed either as array or a string - if (Array.isArray(opts.scope)) { - opts.scope = opts.scope.join(' '); - } - const rootUrl = this.endpoints.oauth2AuthBaseUrl.toString(); - return (rootUrl + - '?' + - querystring.stringify(opts)); - } - generateCodeVerifier() { - // To make the code compatible with browser SubtleCrypto we need to make - // this method async. - throw new Error('generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.'); - } - /** - * Convenience method to automatically generate a code_verifier, and its - * resulting SHA256. If used, this must be paired with a S256 - * code_challenge_method. - * - * For a full example see: - * https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js - */ - async generateCodeVerifierAsync() { - // base64 encoding uses 6 bits per character, and we want to generate128 - // characters. 6*128/8 = 96. - const crypto = (0, crypto_1.createCrypto)(); - const randomString = crypto.randomBytesBase64(96); - // The valid characters in the code_verifier are [A-Z]/[a-z]/[0-9]/ - // "-"/"."/"_"/"~". Base64 encoded strings are pretty close, so we're just - // swapping out a few chars. - const codeVerifier = randomString - .replace(/\+/g, '~') - .replace(/=/g, '_') - .replace(/\//g, '-'); - // Generate the base64 encoded SHA256 - const unencodedCodeChallenge = await crypto.sha256DigestBase64(codeVerifier); - // We need to use base64UrlEncoding instead of standard base64 - const codeChallenge = unencodedCodeChallenge - .split('=')[0] - .replace(/\+/g, '-') - .replace(/\//g, '_'); - return { codeVerifier, codeChallenge }; - } - getToken(codeOrOptions, callback) { - const options = typeof codeOrOptions === 'string' ? { code: codeOrOptions } : codeOrOptions; - if (callback) { - this.getTokenAsync(options).then(r => callback(null, r.tokens, r.res), e => callback(e, null, e.response)); - } - else { - return this.getTokenAsync(options); - } - } - async getTokenAsync(options) { - const url = this.endpoints.oauth2TokenUrl.toString(); - const values = { - code: options.code, - client_id: options.client_id || this._clientId, - client_secret: this._clientSecret, - redirect_uri: options.redirect_uri || this.redirectUri, - grant_type: 'authorization_code', - code_verifier: options.codeVerifier, - }; - const res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - method: 'POST', - url, - data: querystring.stringify(values), - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - }); - const tokens = res.data; - if (res.data && res.data.expires_in) { - tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; - delete tokens.expires_in; - } - this.emit('tokens', tokens); - return { tokens, res }; - } - /** - * Refreshes the access token. - * @param refresh_token Existing refresh token. - * @private - */ - async refreshToken(refreshToken) { - if (!refreshToken) { - return this.refreshTokenNoCache(refreshToken); - } - // If a request to refresh using the same token has started, - // return the same promise. - if (this.refreshTokenPromises.has(refreshToken)) { - return this.refreshTokenPromises.get(refreshToken); - } - const p = this.refreshTokenNoCache(refreshToken).then(r => { - this.refreshTokenPromises.delete(refreshToken); - return r; - }, e => { - this.refreshTokenPromises.delete(refreshToken); - throw e; - }); - this.refreshTokenPromises.set(refreshToken, p); - return p; - } - async refreshTokenNoCache(refreshToken) { - var _a; - if (!refreshToken) { - throw new Error('No refresh token is set.'); - } - const url = this.endpoints.oauth2TokenUrl.toString(); - const data = { - refresh_token: refreshToken, - client_id: this._clientId, - client_secret: this._clientSecret, - grant_type: 'refresh_token', - }; - let res; - try { - // request for new token - res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - method: 'POST', - url, - data: querystring.stringify(data), - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - }); - } - catch (e) { - if (e instanceof gaxios_1.GaxiosError && - e.message === 'invalid_grant' && - ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) && - /ReAuth/i.test(e.response.data.error_description)) { - e.message = JSON.stringify(e.response.data); - } - throw e; - } - const tokens = res.data; - // TODO: de-duplicate this code from a few spots - if (res.data && res.data.expires_in) { - tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; - delete tokens.expires_in; - } - this.emit('tokens', tokens); - return { tokens, res }; - } - refreshAccessToken(callback) { - if (callback) { - this.refreshAccessTokenAsync().then(r => callback(null, r.credentials, r.res), callback); - } - else { - return this.refreshAccessTokenAsync(); - } - } - async refreshAccessTokenAsync() { - const r = await this.refreshToken(this.credentials.refresh_token); - const tokens = r.tokens; - tokens.refresh_token = this.credentials.refresh_token; - this.credentials = tokens; - return { credentials: this.credentials, res: r.res }; - } - getAccessToken(callback) { - if (callback) { - this.getAccessTokenAsync().then(r => callback(null, r.token, r.res), callback); - } - else { - return this.getAccessTokenAsync(); - } - } - async getAccessTokenAsync() { - const shouldRefresh = !this.credentials.access_token || this.isTokenExpiring(); - if (shouldRefresh) { - if (!this.credentials.refresh_token) { - if (this.refreshHandler) { - const refreshedAccessToken = await this.processAndValidateRefreshHandler(); - if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { - this.setCredentials(refreshedAccessToken); - return { token: this.credentials.access_token }; - } - } - else { - throw new Error('No refresh token or refresh handler callback is set.'); - } - } - const r = await this.refreshAccessTokenAsync(); - if (!r.credentials || (r.credentials && !r.credentials.access_token)) { - throw new Error('Could not refresh access token.'); - } - return { token: r.credentials.access_token, res: r.res }; - } - else { - return { token: this.credentials.access_token }; - } - } - /** - * The main authentication interface. It takes an optional url which when - * present is the endpoint being accessed, and returns a Promise which - * resolves with authorization header fields. - * - * In OAuth2Client, the result has the form: - * { Authorization: 'Bearer ' } - * @param url The optional url being authorized - */ - async getRequestHeaders(url) { - const headers = (await this.getRequestMetadataAsync(url)).headers; - return headers; - } - async getRequestMetadataAsync( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - url) { - const thisCreds = this.credentials; - if (!thisCreds.access_token && - !thisCreds.refresh_token && - !this.apiKey && - !this.refreshHandler) { - throw new Error('No access, refresh token, API key or refresh handler callback is set.'); - } - if (thisCreds.access_token && !this.isTokenExpiring()) { - thisCreds.token_type = thisCreds.token_type || 'Bearer'; - const headers = { - Authorization: thisCreds.token_type + ' ' + thisCreds.access_token, - }; - return { headers: this.addSharedMetadataHeaders(headers) }; - } - // If refreshHandler exists, call processAndValidateRefreshHandler(). - if (this.refreshHandler) { - const refreshedAccessToken = await this.processAndValidateRefreshHandler(); - if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { - this.setCredentials(refreshedAccessToken); - const headers = { - Authorization: 'Bearer ' + this.credentials.access_token, - }; - return { headers: this.addSharedMetadataHeaders(headers) }; - } - } - if (this.apiKey) { - return { headers: { 'X-Goog-Api-Key': this.apiKey } }; - } - let r = null; - let tokens = null; - try { - r = await this.refreshToken(thisCreds.refresh_token); - tokens = r.tokens; - } - catch (err) { - const e = err; - if (e.response && - (e.response.status === 403 || e.response.status === 404)) { - e.message = `Could not refresh access token: ${e.message}`; - } - throw e; - } - const credentials = this.credentials; - credentials.token_type = credentials.token_type || 'Bearer'; - tokens.refresh_token = credentials.refresh_token; - this.credentials = tokens; - const headers = { - Authorization: credentials.token_type + ' ' + tokens.access_token, - }; - return { headers: this.addSharedMetadataHeaders(headers), res: r.res }; - } - /** - * Generates an URL to revoke the given token. - * @param token The existing token to be revoked. - * - * @deprecated use instance method {@link OAuth2Client.getRevokeTokenURL} - */ - static getRevokeTokenUrl(token) { - return new OAuth2Client().getRevokeTokenURL(token).toString(); - } - /** - * Generates a URL to revoke the given token. - * - * @param token The existing token to be revoked. - */ - getRevokeTokenURL(token) { - const url = new URL(this.endpoints.oauth2RevokeUrl); - url.searchParams.append('token', token); - return url; - } - revokeToken(token, callback) { - const opts = { - ...OAuth2Client.RETRY_CONFIG, - url: this.getRevokeTokenURL(token).toString(), - method: 'POST', - }; - if (callback) { - this.transporter - .request(opts) - .then(r => callback(null, r), callback); - } - else { - return this.transporter.request(opts); - } + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} +function Readable(options) { + Duplex = Duplex || __nccwpck_require__(41359); + if (!(this instanceof Readable)) return new Readable(options); + + // Checking for a Stream.Duplex instance is faster here instead of inside + // the ReadableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); + + // legacy + this.readable = true; + if (options) { + if (typeof options.read === 'function') this._read = options.read; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + Stream.call(this); +} +Object.defineProperty(Readable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined) { + return false; } - revokeCredentials(callback) { - if (callback) { - this.revokeCredentialsAsync().then(res => callback(null, res), callback); - } - else { - return this.revokeCredentialsAsync(); - } + return this._readableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; } - async revokeCredentialsAsync() { - const token = this.credentials.access_token; - this.credentials = {}; - if (token) { - return this.revokeToken(token); - } - else { - throw new Error('No access token to revoke.'); - } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); - } - else { - return this.requestAsync(opts); + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug('readableAddChunk', chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); } + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); } - async requestAsync(opts, reAuthRetried = false) { - let r2; - try { - const r = await this.getRequestMetadataAsync(opts.url); - opts.headers = opts.headers || {}; - if (r.headers && r.headers['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = r.headers['x-goog-user-project']; - } - if (r.headers && r.headers.Authorization) { - opts.headers.Authorization = r.headers.Authorization; - } - if (this.apiKey) { - opts.headers['X-Goog-Api-Key'] = this.apiKey; - } - r2 = await this.transporter.request(opts); - } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - An access_token and refresh_token were available, but either no - // expiry_date was available or the forceRefreshOnFailure flag is set. - // The absent expiry_date case can happen when developers stash the - // access_token and refresh_token for later use, but the access_token - // fails on the first try because it's expired. Some developers may - // choose to enable forceRefreshOnFailure to mitigate time-related - // errors. - // Or the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - No refresh_token was available - // - An access_token and a refreshHandler callback were available, but - // either no expiry_date was available or the forceRefreshOnFailure - // flag is set. The access_token fails on the first try because it's - // expired. Some developers may choose to enable forceRefreshOnFailure - // to mitigate time-related errors. - const mayRequireRefresh = this.credentials && - this.credentials.access_token && - this.credentials.refresh_token && - (!this.credentials.expiry_date || this.forceRefreshOnFailure); - const mayRequireRefreshWithNoRefreshToken = this.credentials && - this.credentials.access_token && - !this.credentials.refresh_token && - (!this.credentials.expiry_date || this.forceRefreshOnFailure) && - this.refreshHandler; - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - mayRequireRefresh) { - await this.refreshAccessTokenAsync(); - return this.requestAsync(opts, true); - } - else if (!reAuthRetried && - isAuthErr && - !isReadableStream && - mayRequireRefreshWithNoRefreshToken) { - const refreshedAccessToken = await this.processAndValidateRefreshHandler(); - if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { - this.setCredentials(refreshedAccessToken); - } - return this.requestAsync(opts, true); - } - } - throw e; - } - return r2; + } + + // We can push more data if we are below the highWaterMark. + // Also, if we have no data yet, we can stand some more bytes. + // This is to work around cases where hwm=0, such as the repl. + return !state.ended && (state.length < state.highWaterMark || state.length === 0); +} +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit('data', chunk); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); + } + return er; +} +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + // If setEncoding(null), decoder.encoding equals utf8 + this._readableState.encoding = this._readableState.decoder.encoding; + + // Iterate over current buffer to convert already stored Buffers: + var p = this._readableState.buffer.head; + var content = ''; + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + this._readableState.buffer.clear(); + if (content !== '') this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; +}; + +// Don't raise the hwm > 1GB +var MAX_HWM = 0x40000000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret !== null) this.emit('data', ret); + return ret; +}; +function onEofChunk(stream, state) { + debug('onEofChunk'); + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; } - verifyIdToken(options, callback) { - // This function used to accept two arguments instead of an options object. - // Check the types to help users upgrade with less pain. - // This check can be removed after a 2.0 release. - if (callback && typeof callback !== 'function') { - throw new Error('This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.'); - } - if (callback) { - this.verifyIdTokenAsync(options).then(r => callback(null, r), callback); - } - else { - return this.verifyIdTokenAsync(options); - } + } + state.ended = true; + if (state.sync) { + // if we are sync, wait until next tick to emit the data. + // Otherwise we risk emitting data in the flow() + // the readable code triggers during a read() call + emitReadable(stream); + } else { + // emit 'readable' now to make sure it gets picked up. + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); } - async verifyIdTokenAsync(options) { - if (!options.idToken) { - throw new Error('The verifyIdToken method requires an ID Token'); - } - const response = await this.getFederatedSignonCertsAsync(); - const login = await this.verifySignedJwtWithCertsAsync(options.idToken, response.certs, options.audience, this.issuers, options.maxExpiry); - return login; + } +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + debug('emitReadable', state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } +} +function emitReadable_(stream) { + var state = stream._readableState; + debug('emitReadable_', state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { + stream.emit('readable'); + state.emittedReadable = false; + } + + // The stream needs another readable event if + // 1. It is not flowing, as the flow mechanism will take + // care of it. + // 2. It is not ended. + // 3. It is below the highWaterMark, so we can schedule + // another readable later. + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } +} +function maybeReadMore_(stream, state) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); +}; +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } } - /** - * Obtains information about the provisioned access token. Especially useful - * if you want to check the scopes that were provisioned to a given token. - * - * @param accessToken Required. The Access Token for which you want to get - * user info. - */ - async getTokenInfo(accessToken) { - const { data } = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - method: 'POST', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - Authorization: `Bearer ${accessToken}`, - }, - url: this.endpoints.tokenInfoUrl.toString(), - }); - const info = Object.assign({ - expiry_date: new Date().getTime() + data.expires_in * 1000, - scopes: data.scope.split(' '), - }, data); - delete info.expires_in; - delete info.scope; - return info; + } + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + debug('dest.write', ret); + if (ret === false) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + } + src.pause(); } - getFederatedSignonCerts(callback) { - if (callback) { - this.getFederatedSignonCertsAsync().then(r => callback(null, r.certs, r.res), callback); - } - else { - return this.getFederatedSignonCertsAsync(); - } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + return dest; +}; +function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); } - async getFederatedSignonCertsAsync() { - const nowTime = new Date().getTime(); - const format = (0, crypto_1.hasBrowserCrypto)() - ? CertificateFormat.JWK - : CertificateFormat.PEM; - if (this.certificateExpiry && - nowTime < this.certificateExpiry.getTime() && - this.certificateCacheFormat === format) { - return { certs: this.certificateCache, format }; - } - let res; - let url; - switch (format) { - case CertificateFormat.PEM: - url = this.endpoints.oauth2FederatedSignonPemCertsUrl.toString(); - break; - case CertificateFormat.JWK: - url = this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString(); - break; - default: - throw new Error(`Unsupported certificate format ${format}`); - } - try { - res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - url, - }); - } - catch (e) { - if (e instanceof Error) { - e.message = `Failed to retrieve verification certificates: ${e.message}`; - } - throw e; - } - const cacheControl = res ? res.headers['cache-control'] : undefined; - let cacheAge = -1; - if (cacheControl) { - const pattern = new RegExp('max-age=([0-9]*)'); - const regexResult = pattern.exec(cacheControl); - if (regexResult && regexResult.length === 2) { - // Cache results with max-age (in seconds) - cacheAge = Number(regexResult[1]) * 1000; // milliseconds - } - } - let certificates = {}; - switch (format) { - case CertificateFormat.PEM: - certificates = res.data; - break; - case CertificateFormat.JWK: - for (const key of res.data.keys) { - certificates[key.kid] = key; - } - break; - default: - throw new Error(`Unsupported certificate format ${format}`); - } - const now = new Date(); - this.certificateExpiry = - cacheAge === -1 ? null : new Date(now.getTime() + cacheAge); - this.certificateCache = certificates; - this.certificateCacheFormat = format; - return { certs: certificates, format, res }; + }; +} +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { + hasUnpiped: false + }); + return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit('unpipe', this, unpipeInfo); + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + var state = this._readableState; + if (ev === 'data') { + // update readableListening so that resume() may be a no-op + // a few lines down. This is needed to support once('readable'). + state.readableListening = this.listenerCount('readable') > 0; + + // Try start flowing on next tick if stream isn't explicitly paused + if (state.flowing !== false) this.resume(); + } else if (ev === 'readable') { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug('on readable', state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } } - getIapPublicKeys(callback) { - if (callback) { - this.getIapPublicKeysAsync().then(r => callback(null, r.pubkeys, r.res), callback); - } - else { - return this.getIapPublicKeysAsync(); - } + } + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; +Readable.prototype.removeListener = function (ev, fn) { + var res = Stream.prototype.removeListener.call(this, ev, fn); + if (ev === 'readable') { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +Readable.prototype.removeAllListeners = function (ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === 'readable' || ev === undefined) { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +function updateReadableListening(self) { + var state = self._readableState; + state.readableListening = self.listenerCount('readable') > 0; + if (state.resumeScheduled && !state.paused) { + // flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true; + + // crude way to check if we should resume + } else if (self.listenerCount('data') > 0) { + self.resume(); + } +} +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + // we flow only if there is no one listening + // for readable, but we still have to call + // resume() + state.flowing = !state.readableListening; + resume(this, state); + } + state.paused = false; + return this; +}; +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } +} +function resume_(stream, state) { + debug('resume', state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + this._readableState.paused = true; + return this; +}; +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); } - async getIapPublicKeysAsync() { - let res; - const url = this.endpoints.oauth2IapPublicKeyUrl.toString(); - try { - res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - url, - }); - } - catch (e) { - if (e instanceof Error) { - e.message = `Failed to retrieve verification certificates: ${e.message}`; - } - throw e; - } - return { pubkeys: res.data, res }; + _this.push(null); + }); + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); } - verifySignedJwtWithCerts() { - // To make the code compatible with browser SubtleCrypto we need to make - // this method async. - throw new Error('verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.'); + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); } - /** - * Verify the id token is signed with the correct certificate - * and is from the correct audience. - * @param jwt The jwt to verify (The ID Token in this case). - * @param certs The array of certs to test the jwt against. - * @param requiredAudience The audience to test the jwt against. - * @param issuers The allowed issuers of the jwt (Optional). - * @param maxExpiry The max expiry the certificate can be (Optional). - * @return Returns a promise resolving to LoginTicket on verification. - */ - async verifySignedJwtWithCertsAsync(jwt, certs, requiredAudience, issuers, maxExpiry) { - const crypto = (0, crypto_1.createCrypto)(); - if (!maxExpiry) { - maxExpiry = OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_; - } - const segments = jwt.split('.'); - if (segments.length !== 3) { - throw new Error('Wrong number of segments in token: ' + jwt); - } - const signed = segments[0] + '.' + segments[1]; - let signature = segments[2]; - let envelope; - let payload; - try { - envelope = JSON.parse(crypto.decodeBase64StringUtf8(segments[0])); - } - catch (err) { - if (err instanceof Error) { - err.message = `Can't parse token envelope: ${segments[0]}': ${err.message}`; - } - throw err; - } - if (!envelope) { - throw new Error("Can't parse token envelope: " + segments[0]); - } - try { - payload = JSON.parse(crypto.decodeBase64StringUtf8(segments[1])); - } - catch (err) { - if (err instanceof Error) { - err.message = `Can't parse token payload '${segments[0]}`; - } - throw err; - } - if (!payload) { - throw new Error("Can't parse token payload: " + segments[1]); - } - if (!Object.prototype.hasOwnProperty.call(certs, envelope.kid)) { - // If this is not present, then there's no reason to attempt verification - throw new Error('No pem found for envelope: ' + JSON.stringify(envelope)); - } - const cert = certs[envelope.kid]; - if (envelope.alg === 'ES256') { - signature = formatEcdsa.joseToDer(signature, 'ES256').toString('base64'); - } - const verified = await crypto.verify(cert, signed, signature); - if (!verified) { - throw new Error('Invalid token signature: ' + jwt); - } - if (!payload.iat) { - throw new Error('No issue time in token: ' + JSON.stringify(payload)); - } - if (!payload.exp) { - throw new Error('No expiration time in token: ' + JSON.stringify(payload)); - } - const iat = Number(payload.iat); - if (isNaN(iat)) - throw new Error('iat field using invalid format'); - const exp = Number(payload.exp); - if (isNaN(exp)) - throw new Error('exp field using invalid format'); - const now = new Date().getTime() / 1000; - if (exp >= now + maxExpiry) { - throw new Error('Expiration time too far in future: ' + JSON.stringify(payload)); - } - const earliest = iat - OAuth2Client.CLOCK_SKEW_SECS_; - const latest = exp + OAuth2Client.CLOCK_SKEW_SECS_; - if (now < earliest) { - throw new Error('Token used too early, ' + - now + - ' < ' + - earliest + - ': ' + - JSON.stringify(payload)); - } - if (now > latest) { - throw new Error('Token used too late, ' + - now + - ' > ' + - latest + - ': ' + - JSON.stringify(payload)); - } - if (issuers && issuers.indexOf(payload.iss) < 0) { - throw new Error('Invalid issuer, expected one of [' + - issuers + - '], but got ' + - payload.iss); - } - // Check the audience matches if we have one - if (typeof requiredAudience !== 'undefined' && requiredAudience !== null) { - const aud = payload.aud; - let audVerified = false; - // If the requiredAudience is an array, check if it contains token - // audience - if (requiredAudience.constructor === Array) { - audVerified = requiredAudience.indexOf(aud) > -1; - } - else { - audVerified = aud === requiredAudience; - } - if (!audVerified) { - throw new Error('Wrong recipient, payload audience != requiredAudience'); - } - } - return new loginticket_1.LoginTicket(envelope, payload); + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); } - /** - * Returns a promise that resolves with AccessTokenResponse type if - * refreshHandler is defined. - * If not, nothing is returned. - */ - async processAndValidateRefreshHandler() { - if (this.refreshHandler) { - const accessTokenResponse = await this.refreshHandler(); - if (!accessTokenResponse.access_token) { - throw new Error('No access token is returned by the refreshHandler callback.'); - } - return accessTokenResponse; - } - return; + }; + return this; +}; +if (typeof Symbol === 'function') { + Readable.prototype[Symbol.asyncIterator] = function () { + if (createReadableStreamAsyncIterator === undefined) { + createReadableStreamAsyncIterator = __nccwpck_require__(43306); } - /** - * Returns true if a token is expired or will expire within - * eagerRefreshThresholdMillismilliseconds. - * If there is no expiry time, assumes the token is not expired or expiring. - */ - isTokenExpiring() { - const expiryDate = this.credentials.expiry_date; - return expiryDate - ? expiryDate <= new Date().getTime() + this.eagerRefreshThresholdMillis - : false; + return createReadableStreamAsyncIterator(this); + }; +} +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } +}); +Object.defineProperty(Readable.prototype, 'readableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } +}); +Object.defineProperty(Readable.prototype, 'readableFlowing', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; } + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; +Object.defineProperty(Readable.prototype, 'readableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.length; + } +}); + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = state.buffer.consume(n, state.decoder); + } + return ret; } -exports.OAuth2Client = OAuth2Client; -/** - * @deprecated use instance's {@link OAuth2Client.endpoints} - */ -OAuth2Client.GOOGLE_TOKEN_INFO_URL = 'https://oauth2.googleapis.com/tokeninfo'; -/** - * Clock skew - five minutes in seconds - */ -OAuth2Client.CLOCK_SKEW_SECS_ = 300; -/** - * The default max Token Lifetime is one day in seconds - */ -OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_ = 86400; +function endReadable(stream) { + var state = stream._readableState; + debug('endReadable', state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } +} +function endReadableNT(state, stream) { + debug('endReadableNT', state.endEmitted, state.length); + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the writable side is ready for autoDestroy as well + var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } + } +} +if (typeof Symbol === 'function') { + Readable.from = function (iterable, opts) { + if (from === undefined) { + from = __nccwpck_require__(39082); + } + return from(Readable, iterable, opts); + }; +} +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} /***/ }), -/***/ 19510: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 34415: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -// Copyright 2021 Google LLC +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) // -// 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 +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. // -// http://www.apache.org/licenses/LICENSE-2.0 +// Here's how this works: // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getErrorFromOAuthErrorResponse = exports.OAuthClientAuthHandler = void 0; -const querystring = __nccwpck_require__(63477); -const crypto_1 = __nccwpck_require__(78043); -/** List of HTTP methods that accept request bodies. */ -const METHODS_SUPPORTING_REQUEST_BODY = ['PUT', 'POST', 'PATCH']; -/** - * Abstract class for handling client authentication in OAuth-based - * operations. - * When request-body client authentication is used, only application/json and - * application/x-www-form-urlencoded content types for HTTP methods that support - * request bodies are supported. - */ -class OAuthClientAuthHandler { - /** - * Instantiates an OAuth client authentication handler. - * @param clientAuthentication The client auth credentials. - */ - constructor(clientAuthentication) { - this.clientAuthentication = clientAuthentication; - this.crypto = (0, crypto_1.createCrypto)(); - } - /** - * Applies client authentication on the OAuth request's headers or POST - * body but does not process the request. - * @param opts The GaxiosOptions whose headers or data are to be modified - * depending on the client authentication mechanism to be used. - * @param bearerToken The optional bearer token to use for authentication. - * When this is used, no client authentication credentials are needed. - */ - applyClientAuthenticationOptions(opts, bearerToken) { - // Inject authenticated header. - this.injectAuthenticatedHeaders(opts, bearerToken); - // Inject authenticated request body. - if (!bearerToken) { - this.injectAuthenticatedRequestBody(opts); - } - } - /** - * Applies client authentication on the request's header if either - * basic authentication or bearer token authentication is selected. - * - * @param opts The GaxiosOptions whose headers or data are to be modified - * depending on the client authentication mechanism to be used. - * @param bearerToken The optional bearer token to use for authentication. - * When this is used, no client authentication credentials are needed. - */ - injectAuthenticatedHeaders(opts, bearerToken) { - var _a; - // Bearer token prioritized higher than basic Auth. - if (bearerToken) { - opts.headers = opts.headers || {}; - Object.assign(opts.headers, { - Authorization: `Bearer ${bearerToken}}`, - }); - } - else if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'basic') { - opts.headers = opts.headers || {}; - const clientId = this.clientAuthentication.clientId; - const clientSecret = this.clientAuthentication.clientSecret || ''; - const base64EncodedCreds = this.crypto.encodeBase64StringUtf8(`${clientId}:${clientSecret}`); - Object.assign(opts.headers, { - Authorization: `Basic ${base64EncodedCreds}`, - }); - } - } - /** - * Applies client authentication on the request's body if request-body - * client authentication is selected. - * - * @param opts The GaxiosOptions whose headers or data are to be modified - * depending on the client authentication mechanism to be used. - */ - injectAuthenticatedRequestBody(opts) { - var _a; - if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'request-body') { - const method = (opts.method || 'GET').toUpperCase(); - // Inject authenticated request body. - if (METHODS_SUPPORTING_REQUEST_BODY.indexOf(method) !== -1) { - // Get content-type. - let contentType; - const headers = opts.headers || {}; - for (const key in headers) { - if (key.toLowerCase() === 'content-type' && headers[key]) { - contentType = headers[key].toLowerCase(); - break; - } - } - if (contentType === 'application/x-www-form-urlencoded') { - opts.data = opts.data || ''; - const data = querystring.parse(opts.data); - Object.assign(data, { - client_id: this.clientAuthentication.clientId, - client_secret: this.clientAuthentication.clientSecret || '', - }); - opts.data = querystring.stringify(data); - } - else if (contentType === 'application/json') { - opts.data = opts.data || {}; - Object.assign(opts.data, { - client_id: this.clientAuthentication.clientId, - client_secret: this.clientAuthentication.clientSecret || '', - }); - } - else { - throw new Error(`${contentType} content-types are not supported with ` + - `${this.clientAuthentication.confidentialClientType} ` + - 'client authentication'); - } - } - else { - throw new Error(`${method} HTTP method does not support ` + - `${this.clientAuthentication.confidentialClientType} ` + - 'client authentication'); - } - } - } - /** - * Retry config for Auth-related requests. - * - * @remarks - * - * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} - * config as some downstream APIs would prefer if customers explicitly enable retries, - * such as GCS. - */ - static get RETRY_CONFIG() { - return { - retry: true, - retryConfig: { - httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], - }, - }; - } +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + + + +module.exports = Transform; +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, + ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; +var Duplex = __nccwpck_require__(41359); +__nccwpck_require__(44124)(Transform, Duplex); +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit('error', new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + // single equals check for both `null` and `undefined` + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } } -exports.OAuthClientAuthHandler = OAuthClientAuthHandler; -/** - * Converts an OAuth error response to a native JavaScript Error. - * @param resp The OAuth error response to convert to a native Error object. - * @param err The optional original error. If provided, the error properties - * will be copied to the new error. - * @return The converted native Error object. - */ -function getErrorFromOAuthErrorResponse(resp, err) { - // Error response. - const errorCode = resp.error; - const errorDescription = resp.error_description; - const errorUri = resp.error_uri; - let message = `Error code ${errorCode}`; - if (typeof errorDescription !== 'undefined') { - message += `: ${errorDescription}`; - } - if (typeof errorUri !== 'undefined') { - message += ` - ${errorUri}`; - } - const newError = new Error(message); - // Copy properties from original error to newly generated error. - if (err) { - const keys = Object.keys(err); - if (err.stack) { - // Copy error.stack if available. - keys.push('stack'); - } - keys.forEach(key => { - // Do not overwrite the message field. - if (key !== 'message') { - Object.defineProperty(newError, key, { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - value: err[key], - writable: false, - enumerable: true, - }); - } - }); - } - return newError; +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} +function prefinish() { + var _this = this; + if (typeof this._flush === 'function' && !this._readableState.destroyed) { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); +}; +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; +Transform.prototype._destroy = function (err, cb) { + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + }); +}; +function done(stream, er, data) { + if (er) return stream.emit('error', er); + if (data != null) + // single equals check for both `null` and `undefined` + stream.push(data); + + // TODO(BridgeAR): Write a test for these two error cases + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); +} + +/***/ }), + +/***/ 26993: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + + + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; } -exports.getErrorFromOAuthErrorResponse = getErrorFromOAuthErrorResponse; +/* */ +/**/ +var Duplex; +/**/ -/***/ }), +Writable.WritableState = WritableState; -/***/ 32460: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/**/ +var internalUtil = { + deprecate: __nccwpck_require__(65278) +}; +/**/ -"use strict"; +/**/ +var Stream = __nccwpck_require__(62387); +/**/ -// Copyright 2024 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PassThroughClient = void 0; -const authclient_1 = __nccwpck_require__(44627); -/** - * An AuthClient without any Authentication information. Useful for: - * - Anonymous access - * - Local Emulators - * - Testing Environments - * - */ -class PassThroughClient extends authclient_1.AuthClient { - /** - * Creates a request without any authentication headers or checks. - * - * @remarks - * - * In testing environments it may be useful to change the provided - * {@link AuthClient.transporter} for any desired request overrides/handling. - * - * @param opts - * @returns The response of the request. - */ - async request(opts) { - return this.transporter.request(opts); - } - /** - * A required method of the base class. - * Always will return an empty object. - * - * @returns {} - */ - async getAccessToken() { - return {}; - } - /** - * A required method of the base class. - * Always will return an empty object. - * - * @returns {} - */ - async getRequestHeaders() { - return {}; - } +var Buffer = (__nccwpck_require__(14300).Buffer); +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); } -exports.PassThroughClient = PassThroughClient; -const a = new PassThroughClient(); -a.getAccessToken(); +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} +var destroyImpl = __nccwpck_require__(97049); +var _require = __nccwpck_require__(39948), + getHighWaterMark = _require.getHighWaterMark; +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, + ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, + ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, + ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; +var errorOrDestroy = destroyImpl.errorOrDestroy; +__nccwpck_require__(44124)(Writable, Stream); +function nop() {} +function WritableState(options, stream, isDuplex) { + Duplex = Duplex || __nccwpck_require__(41359); + options = options || {}; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; -/***/ }), + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; -/***/ 44782: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); -"use strict"; + // if _final has been called + this.finalCalled = false; -// Copyright 2022 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PluggableAuthClient = exports.ExecutableError = void 0; -const baseexternalclient_1 = __nccwpck_require__(40810); -const executable_response_1 = __nccwpck_require__(8749); -const pluggable_auth_handler_1 = __nccwpck_require__(18941); -/** - * Error thrown from the executable run by PluggableAuthClient. - */ -class ExecutableError extends Error { - constructor(message, code) { - super(`The executable failed with exit code: ${code} and error message: ${message}.`); - this.code = code; - Object.setPrototypeOf(this, new.target.prototype); - } + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // Should close be emitted on destroy. Defaults to true. + this.emitClose = options.emitClose !== false; + + // Should .destroy() be called after 'finish' (and potentially 'end') + this.autoDestroy = !!options.autoDestroy; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); } -exports.ExecutableError = ExecutableError; -/** - * The default executable timeout when none is provided, in milliseconds. - */ -const DEFAULT_EXECUTABLE_TIMEOUT_MILLIS = 30 * 1000; -/** - * The minimum allowed executable timeout in milliseconds. - */ -const MINIMUM_EXECUTABLE_TIMEOUT_MILLIS = 5 * 1000; -/** - * The maximum allowed executable timeout in milliseconds. - */ -const MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS = 120 * 1000; -/** - * The environment variable to check to see if executable can be run. - * Value must be set to '1' for the executable to run. - */ -const GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES = 'GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES'; -/** - * The maximum currently supported executable version. - */ -const MAXIMUM_EXECUTABLE_VERSION = 1; -/** - * PluggableAuthClient enables the exchange of workload identity pool external credentials for - * Google access tokens by retrieving 3rd party tokens through a user supplied executable. These - * scripts/executables are completely independent of the Google Cloud Auth libraries. These - * credentials plug into ADC and will call the specified executable to retrieve the 3rd party token - * to be exchanged for a Google access token. - * - *

To use these credentials, the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment variable - * must be set to '1'. This is for security reasons. - * - *

Both OIDC and SAML are supported. The executable must adhere to a specific response format - * defined below. - * - *

The executable must print out the 3rd party token to STDOUT in JSON format. When an - * output_file is specified in the credential configuration, the executable must also handle writing the - * JSON response to this file. - * - *

- * OIDC response sample:
- * {
- *   "version": 1,
- *   "success": true,
- *   "token_type": "urn:ietf:params:oauth:token-type:id_token",
- *   "id_token": "HEADER.PAYLOAD.SIGNATURE",
- *   "expiration_time": 1620433341
- * }
- *
- * SAML2 response sample:
- * {
- *   "version": 1,
- *   "success": true,
- *   "token_type": "urn:ietf:params:oauth:token-type:saml2",
- *   "saml_response": "...",
- *   "expiration_time": 1620433341
- * }
- *
- * Error response sample:
- * {
- *   "version": 1,
- *   "success": false,
- *   "code": "401",
- *   "message": "Error message."
- * }
- * 
- * - *

The "expiration_time" field in the JSON response is only required for successful - * responses when an output file was specified in the credential configuration - * - *

The auth libraries will populate certain environment variables that will be accessible by the - * executable, such as: GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE, GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE, - * GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE, GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL, and - * GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE. - * - *

Please see this repositories README for a complete executable request/response specification. - */ -class PluggableAuthClient extends baseexternalclient_1.BaseExternalAccountClient { - /** - * Instantiates a PluggableAuthClient instance using the provided JSON - * object loaded from an external account credentials file. - * An error is thrown if the credential is not a valid pluggable auth credential. - * @param options The external account options object typically loaded from - * the external account JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - super(options, additionalOptions); - if (!options.credential_source.executable) { - throw new Error('No valid Pluggable Auth "credential_source" provided.'); - } - this.command = options.credential_source.executable.command; - if (!this.command) { - throw new Error('No valid Pluggable Auth "credential_source" provided.'); - } - // Check if the provided timeout exists and if it is valid. - if (options.credential_source.executable.timeout_millis === undefined) { - this.timeoutMillis = DEFAULT_EXECUTABLE_TIMEOUT_MILLIS; - } - else { - this.timeoutMillis = options.credential_source.executable.timeout_millis; - if (this.timeoutMillis < MINIMUM_EXECUTABLE_TIMEOUT_MILLIS || - this.timeoutMillis > MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS) { - throw new Error(`Timeout must be between ${MINIMUM_EXECUTABLE_TIMEOUT_MILLIS} and ` + - `${MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS} milliseconds.`); - } - } - this.outputFile = options.credential_source.executable.output_file; - this.handler = new pluggable_auth_handler_1.PluggableAuthHandler({ - command: this.command, - timeoutMillis: this.timeoutMillis, - outputFile: this.outputFile, - }); - this.credentialSourceType = 'executable'; - } - /** - * Triggered when an external subject token is needed to be exchanged for a - * GCP access token via GCP STS endpoint. - * This uses the `options.credential_source` object to figure out how - * to retrieve the token using the current environment. In this case, - * this calls a user provided executable which returns the subject token. - * The logic is summarized as: - * 1. Validated that the executable is allowed to run. The - * GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment must be set to - * 1 for security reasons. - * 2. If an output file is specified by the user, check the file location - * for a response. If the file exists and contains a valid response, - * return the subject token from the file. - * 3. Call the provided executable and return response. - * @return A promise that resolves with the external subject token. - */ - async retrieveSubjectToken() { - // Check if the executable is allowed to run. - if (process.env[GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES] !== '1') { - throw new Error('Pluggable Auth executables need to be explicitly allowed to run by ' + - 'setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment ' + - 'Variable to 1.'); - } - let executableResponse = undefined; - // Try to get cached executable response from output file. - if (this.outputFile) { - executableResponse = await this.handler.retrieveCachedResponse(); - } - // If no response from output file, call the executable. - if (!executableResponse) { - // Set up environment map with required values for the executable. - const envMap = new Map(); - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE', this.audience); - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE', this.subjectTokenType); - // Always set to 0 because interactive mode is not supported. - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE', '0'); - if (this.outputFile) { - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE', this.outputFile); - } - const serviceAccountEmail = this.getServiceAccountEmail(); - if (serviceAccountEmail) { - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL', serviceAccountEmail); - } - executableResponse = - await this.handler.retrieveResponseFromExecutable(envMap); - } - if (executableResponse.version > MAXIMUM_EXECUTABLE_VERSION) { - throw new Error(`Version of executable is not currently supported, maximum supported version is ${MAXIMUM_EXECUTABLE_VERSION}.`); - } - // Check that response was successful. - if (!executableResponse.success) { - throw new ExecutableError(executableResponse.errorMessage, executableResponse.errorCode); - } - // Check that response contains expiration time if output file was specified. - if (this.outputFile) { - if (!executableResponse.expirationTime) { - throw new executable_response_1.InvalidExpirationTimeFieldError('The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.'); - } - } - // Check that response is not expired. - if (executableResponse.isExpired()) { - throw new Error('Executable response is expired.'); - } - // Return subject token from response. - return executableResponse.subjectToken; +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; } + }); +} else { + realHasInstance = function realHasInstance(object) { + return object instanceof this; + }; +} +function Writable(options) { + Duplex = Duplex || __nccwpck_require__(41359); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + + // Checking for a Stream.Duplex instance is faster here instead of inside + // the WritableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); + + // legacy. + this.writable = true; + if (options) { + if (typeof options.write === 'function') this._write = options.write; + if (typeof options.writev === 'function') this._writev = options.writev; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + if (typeof options.final === 'function') this._final = options.final; + } + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); +}; +function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); + // TODO: defer error events consistently everywhere, not just the cb + errorOrDestroy(stream, er); + process.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== 'string' && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); + } + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + return true; } -exports.PluggableAuthClient = PluggableAuthClient; - - -/***/ }), - -/***/ 18941: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== 'function') cb = nop; + if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; +}; +Writable.prototype.cork = function () { + this._writableState.corked++; +}; +Writable.prototype.uncork = function () { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; +Object.defineProperty(Writable.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); -// Copyright 2022 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PluggableAuthHandler = void 0; -const pluggable_auth_client_1 = __nccwpck_require__(44782); -const executable_response_1 = __nccwpck_require__(8749); -const childProcess = __nccwpck_require__(32081); -const fs = __nccwpck_require__(57147); -/** - * A handler used to retrieve 3rd party token responses from user defined - * executables and cached file output for the PluggableAuthClient class. - */ -class PluggableAuthHandler { - /** - * Instantiates a PluggableAuthHandler instance using the provided - * PluggableAuthHandlerOptions object. - */ - constructor(options) { - if (!options.command) { - throw new Error('No command provided.'); - } - this.commandComponents = PluggableAuthHandler.parseCommand(options.command); - this.timeoutMillis = options.timeoutMillis; - if (!this.timeoutMillis) { - throw new Error('No timeoutMillis provided.'); - } - this.outputFile = options.outputFile; +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; } - /** - * Calls user provided executable to get a 3rd party subject token and - * returns the response. - * @param envMap a Map of additional Environment Variables required for - * the executable. - * @return A promise that resolves with the executable response. - */ - retrieveResponseFromExecutable(envMap) { - return new Promise((resolve, reject) => { - // Spawn process to run executable using added environment variables. - const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), { - env: { ...process.env, ...Object.fromEntries(envMap) }, - }); - let output = ''; - // Append stdout to output as executable runs. - child.stdout.on('data', (data) => { - output += data; - }); - // Append stderr as executable runs. - child.stderr.on('data', (err) => { - output += err; - }); - // Set up a timeout to end the child process and throw an error. - const timeout = setTimeout(() => { - // Kill child process and remove listeners so 'close' event doesn't get - // read after child process is killed. - child.removeAllListeners(); - child.kill(); - return reject(new Error('The executable failed to finish within the timeout specified.')); - }, this.timeoutMillis); - child.on('close', (code) => { - // Cancel timeout if executable closes before timeout is reached. - clearTimeout(timeout); - if (code === 0) { - // If the executable completed successfully, try to return the parsed response. - try { - const responseJson = JSON.parse(output); - const response = new executable_response_1.ExecutableResponse(responseJson); - return resolve(response); - } - catch (error) { - if (error instanceof executable_response_1.ExecutableResponseError) { - return reject(error); - } - return reject(new executable_response_1.ExecutableResponseError(`The executable returned an invalid response: ${output}`)); - } - } - else { - return reject(new pluggable_auth_client_1.ExecutableError(output, code.toString())); - } - }); - }); + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; } - /** - * Checks user provided output file for response from previous run of - * executable and return the response if it exists, is formatted correctly, and is not expired. - */ - async retrieveCachedResponse() { - if (!this.outputFile || this.outputFile.length === 0) { - return undefined; - } - let filePath; - try { - filePath = await fs.promises.realpath(this.outputFile); - } - catch (_a) { - // If file path cannot be resolved, return undefined. - return undefined; - } - if (!(await fs.promises.lstat(filePath)).isFile()) { - // If path does not lead to file, return undefined. - return undefined; - } - const responseString = await fs.promises.readFile(filePath, { - encoding: 'utf8', - }); - if (responseString === '') { - return undefined; - } - try { - const responseJson = JSON.parse(responseString); - const response = new executable_response_1.ExecutableResponse(responseJson); - // Check if response is successful and unexpired. - if (response.isValid()) { - return new executable_response_1.ExecutableResponse(responseJson); - } - return undefined; - } - catch (error) { - if (error instanceof executable_response_1.ExecutableResponseError) { - throw error; - } - throw new executable_response_1.ExecutableResponseError(`The output file contained an invalid response: ${responseString}`); - } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; +} +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + process.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); } - /** - * Parses given command string into component array, splitting on spaces unless - * spaces are between quotation marks. - */ - static parseCommand(command) { - // Split the command into components by splitting on spaces, - // unless spaces are contained in quotation marks. - const components = command.match(/(?:[^\s"]+|"[^"]*")+/g); - if (!components) { - throw new Error(`Provided command: "${command}" could not be parsed.`); - } - // Remove quotation marks from the beginning and end of each component if they are present. - for (let i = 0; i < components.length; i++) { - if (components[i][0] === '"' && components[i].slice(-1) === '"') { - components[i] = components[i].slice(1, -1); - } - } - return components; + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); } + } +} +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); } -exports.PluggableAuthHandler = PluggableAuthHandler; - - -/***/ }), -/***/ 98790: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} -"use strict"; +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, '', holder.finish); -// Copyright 2015 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UserRefreshClient = exports.USER_REFRESH_ACCOUNT_TYPE = void 0; -const oauth2client_1 = __nccwpck_require__(3936); -const querystring_1 = __nccwpck_require__(63477); -exports.USER_REFRESH_ACCOUNT_TYPE = 'authorized_user'; -class UserRefreshClient extends oauth2client_1.OAuth2Client { - constructor(optionsOrClientId, clientSecret, refreshToken, eagerRefreshThresholdMillis, forceRefreshOnFailure) { - const opts = optionsOrClientId && typeof optionsOrClientId === 'object' - ? optionsOrClientId - : { - clientId: optionsOrClientId, - clientSecret, - refreshToken, - eagerRefreshThresholdMillis, - forceRefreshOnFailure, - }; - super(opts); - this._refreshToken = opts.refreshToken; - this.credentials.refresh_token = opts.refreshToken; + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); } - /** - * Refreshes the access token. - * @param refreshToken An ignored refreshToken.. - * @param callback Optional callback. - */ - async refreshTokenNoCache( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - refreshToken) { - return super.refreshTokenNoCache(this._refreshToken); + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } } - async fetchIdToken(targetAudience) { - const res = await this.transporter.request({ - ...UserRefreshClient.RETRY_CONFIG, - url: this.endpoints.oauth2TokenUrl, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - method: 'POST', - data: (0, querystring_1.stringify)({ - client_id: this._clientId, - client_secret: this._clientSecret, - grant_type: 'refresh_token', - refresh_token: this._refreshToken, - target_audience: targetAudience, - }), - }); - return res.data.id_token; + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; +} +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); +}; +Writable.prototype._writev = null; +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); + return this; +}; +Object.defineProperty(Writable.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); } - /** - * Create a UserRefreshClient credentials instance using the given input - * options. - * @param json The input object. - */ - fromJSON(json) { - if (!json) { - throw new Error('Must pass in a JSON object containing the user refresh token'); - } - if (json.type !== 'authorized_user') { - throw new Error('The incoming JSON object does not have the "authorized_user" type'); - } - if (!json.client_id) { - throw new Error('The incoming JSON object does not contain a client_id field'); - } - if (!json.client_secret) { - throw new Error('The incoming JSON object does not contain a client_secret field'); - } - if (!json.refresh_token) { - throw new Error('The incoming JSON object does not contain a refresh_token field'); - } - this._clientId = json.client_id; - this._clientSecret = json.client_secret; - this._refreshToken = json.refresh_token; - this.credentials.refresh_token = json.refresh_token; - this.quotaProjectId = json.quota_project_id; - this.universeDomain = json.universe_domain || this.universeDomain; + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function' && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); } - fromStream(inputStream, callback) { - if (callback) { - this.fromStreamAsync(inputStream).then(() => callback(), callback); - } - else { - return this.fromStreamAsync(inputStream); + } +} +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the readable side is ready for autoDestroy as well + var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); } + } } - async fromStreamAsync(inputStream) { - return new Promise((resolve, reject) => { - if (!inputStream) { - return reject(new Error('Must pass in a stream containing the user refresh token.')); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('error', reject) - .on('data', chunk => (s += chunk)) - .on('end', () => { - try { - const data = JSON.parse(s); - this.fromJSON(data); - return resolve(); - } - catch (err) { - return reject(err); - } - }); - }); - } + } + return need; } -exports.UserRefreshClient = UserRefreshClient; - - -/***/ }), - -/***/ 86308: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) process.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StsCredentials = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const querystring = __nccwpck_require__(63477); -const transporters_1 = __nccwpck_require__(72649); -const oauth2common_1 = __nccwpck_require__(19510); -/** - * Implements the OAuth 2.0 token exchange based on - * https://tools.ietf.org/html/rfc8693 - */ -class StsCredentials extends oauth2common_1.OAuthClientAuthHandler { - /** - * Initializes an STS credentials instance. - * @param tokenExchangeEndpoint The token exchange endpoint. - * @param clientAuthentication The client authentication credentials if - * available. - */ - constructor(tokenExchangeEndpoint, clientAuthentication) { - super(clientAuthentication); - this.tokenExchangeEndpoint = tokenExchangeEndpoint; - this.transporter = new transporters_1.DefaultTransporter(); + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; +} +Object.defineProperty(Writable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._writableState === undefined) { + return false; } - /** - * Exchanges the provided token for another type of token based on the - * rfc8693 spec. - * @param stsCredentialsOptions The token exchange options used to populate - * the token exchange request. - * @param additionalHeaders Optional additional headers to pass along the - * request. - * @param options Optional additional GCP-specific non-spec defined options - * to send with the request. - * Example: `&options=${encodeUriComponent(JSON.stringified(options))}` - * @return A promise that resolves with the token exchange response containing - * the requested token and its expiration time. - */ - async exchangeToken(stsCredentialsOptions, additionalHeaders, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - options) { - var _a, _b, _c; - const values = { - grant_type: stsCredentialsOptions.grantType, - resource: stsCredentialsOptions.resource, - audience: stsCredentialsOptions.audience, - scope: (_a = stsCredentialsOptions.scope) === null || _a === void 0 ? void 0 : _a.join(' '), - requested_token_type: stsCredentialsOptions.requestedTokenType, - subject_token: stsCredentialsOptions.subjectToken, - subject_token_type: stsCredentialsOptions.subjectTokenType, - actor_token: (_b = stsCredentialsOptions.actingParty) === null || _b === void 0 ? void 0 : _b.actorToken, - actor_token_type: (_c = stsCredentialsOptions.actingParty) === null || _c === void 0 ? void 0 : _c.actorTokenType, - // Non-standard GCP-specific options. - options: options && JSON.stringify(options), - }; - // Remove undefined fields. - Object.keys(values).forEach(key => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (typeof values[key] === 'undefined') { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - delete values[key]; - } - }); - const headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - }; - // Inject additional STS headers if available. - Object.assign(headers, additionalHeaders || {}); - const opts = { - ...StsCredentials.RETRY_CONFIG, - url: this.tokenExchangeEndpoint.toString(), - method: 'POST', - headers, - data: querystring.stringify(values), - responseType: 'json', - }; - // Apply OAuth client authentication. - this.applyClientAuthenticationOptions(opts); - try { - const response = await this.transporter.request(opts); - // Successful response. - const stsSuccessfulResponse = response.data; - stsSuccessfulResponse.res = response; - return stsSuccessfulResponse; - } - catch (error) { - // Translate error to OAuthError. - if (error instanceof gaxios_1.GaxiosError && error.response) { - throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, - // Preserve other fields from the original error. - error); - } - // Request could fail before the server responds. - throw error; - } + return this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; } -} -exports.StsCredentials = StsCredentials; + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + cb(err); +}; /***/ }), -/***/ 7428: -/***/ ((__unused_webpack_module, exports) => { +/***/ 43306: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright 2024 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UrlSubjectTokenSupplier = void 0; -/** - * Internal subject token supplier implementation used when a URL - * is configured in the credential configuration used to build an {@link IdentityPoolClient} - */ -class UrlSubjectTokenSupplier { - /** - * Instantiates a URL subject token supplier. - * @param opts The URL subject token supplier options to build the supplier with. - */ - constructor(opts) { - this.url = opts.url; - this.formatType = opts.formatType; - this.subjectTokenFieldName = opts.subjectTokenFieldName; - this.headers = opts.headers; - this.additionalGaxiosOptions = opts.additionalGaxiosOptions; - } - /** - * Sends a GET request to the URL provided in the constructor and resolves - * with the returned external subject token. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link IdentityPoolClient}, contains the requested audience and subject - * token type for the external account identity. Not used. - */ - async getSubjectToken(context) { - const opts = { - ...this.additionalGaxiosOptions, - url: this.url, - method: 'GET', - headers: this.headers, - responseType: this.formatType, - }; - let subjectToken; - if (this.formatType === 'text') { - const response = await context.transporter.request(opts); - subjectToken = response.data; - } - else if (this.formatType === 'json' && this.subjectTokenFieldName) { - const response = await context.transporter.request(opts); - subjectToken = response.data[this.subjectTokenFieldName]; - } - if (!subjectToken) { - throw new Error('Unable to parse the subject_token from the credential_source URL'); - } - return subjectToken; + +var _Object$setPrototypeO; +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var finished = __nccwpck_require__(76080); +var kLastResolve = Symbol('lastResolve'); +var kLastReject = Symbol('lastReject'); +var kError = Symbol('error'); +var kEnded = Symbol('ended'); +var kLastPromise = Symbol('lastPromise'); +var kHandlePromise = Symbol('handlePromise'); +var kStream = Symbol('stream'); +function createIterResult(value, done) { + return { + value: value, + done: done + }; +} +function readAndResolve(iter) { + var resolve = iter[kLastResolve]; + if (resolve !== null) { + var data = iter[kStream].read(); + // we defer if data is null + // we can be expecting either 'end' or + // 'error' + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve(createIterResult(data, false)); } + } } -exports.UrlSubjectTokenSupplier = UrlSubjectTokenSupplier; +function onReadable(iter) { + // we wait for the next tick, because it might + // emit an error with process.nextTick + process.nextTick(readAndResolve, iter); +} +function wrapForNext(lastPromise, iter) { + return function (resolve, reject) { + lastPromise.then(function () { + if (iter[kEnded]) { + resolve(createIterResult(undefined, true)); + return; + } + iter[kHandlePromise](resolve, reject); + }, reject); + }; +} +var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); +var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + // if we have detected an error in the meanwhile + // reject straight away + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); + } + if (this[kEnded]) { + return Promise.resolve(createIterResult(undefined, true)); + } + if (this[kStream].destroyed) { + // We need to defer via nextTick because if .destroy(err) is + // called, the error will be emitted via nextTick, and + // we cannot guarantee that there is no error lingering around + // waiting to be emitted. + return new Promise(function (resolve, reject) { + process.nextTick(function () { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve(createIterResult(undefined, true)); + } + }); + }); + } + // if we have multiple next() calls + // we will wait for the previous Promise to finish + // this logic is optimized to support for await loops, + // where next() is only called once at a time + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); + } else { + // fast path needed to support multiple this.push() + // without triggering the next() queue + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); + } + this[kLastPromise] = promise; + return promise; + } +}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { + return this; +}), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + // destroy(err, cb) is a private API + // we can guarantee we have that here, because we control the + // Readable class this is attached to + return new Promise(function (resolve, reject) { + _this2[kStream].destroy(null, function (err) { + if (err) { + reject(err); + return; + } + resolve(createIterResult(undefined, true)); + }); + }); +}), _Object$setPrototypeO), AsyncIteratorPrototype); +var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { + var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve, reject) { + var data = iterator[kStream].read(); + if (data) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(data, false)); + } else { + iterator[kLastResolve] = resolve; + iterator[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator[kLastPromise] = null; + finished(stream, function (err) { + if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { + var reject = iterator[kLastReject]; + // reject if we are waiting for data in the Promise + // returned by next() and store the error + if (reject !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + reject(err); + } + iterator[kError] = err; + return; + } + var resolve = iterator[kLastResolve]; + if (resolve !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(undefined, true)); + } + iterator[kEnded] = true; + }); + stream.on('readable', onReadable.bind(null, iterator)); + return iterator; +}; +module.exports = createReadableStreamAsyncIterator; /***/ }), -/***/ 14693: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 52746: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright 2019 Google LLC -// -// 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. -/* global window */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BrowserCrypto = void 0; -// This file implements crypto functions we need using in-browser -// SubtleCrypto interface `window.crypto.subtle`. -const base64js = __nccwpck_require__(26463); -const crypto_1 = __nccwpck_require__(78043); -class BrowserCrypto { - constructor() { - if (typeof window === 'undefined' || - window.crypto === undefined || - window.crypto.subtle === undefined) { - throw new Error("SubtleCrypto not found. Make sure it's an https:// website."); - } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var _require = __nccwpck_require__(14300), + Buffer = _require.Buffer; +var _require2 = __nccwpck_require__(73837), + inspect = _require2.inspect; +var custom = inspect && inspect.custom || 'inspect'; +function copyBuffer(src, target, offset) { + Buffer.prototype.copy.call(src, target, offset); +} +module.exports = /*#__PURE__*/function () { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; } - async sha256DigestBase64(str) { - // SubtleCrypto digest() method is async, so we must make - // this method async as well. - // To calculate SHA256 digest using SubtleCrypto, we first - // need to convert an input string to an ArrayBuffer: - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const inputBuffer = new TextEncoder().encode(str); - // Result is ArrayBuffer as well. - const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); - return base64js.fromByteArray(new Uint8Array(outputBuffer)); + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; } - randomBytesBase64(count) { - const array = new Uint8Array(count); - window.crypto.getRandomValues(array); - return base64js.fromByteArray(array); + }, { + key: "shift", + value: function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; } - static padBase64(base64) { - // base64js requires padding, so let's add some '=' - while (base64.length % 4 !== 0) { - base64 += '='; - } - return base64; + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; } - async verify(pubkey, data, signature) { - const algo = { - name: 'RSASSA-PKCS1-v1_5', - hash: { name: 'SHA-256' }, - }; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const dataArray = new TextEncoder().encode(data); - const signatureArray = base64js.toByteArray(BrowserCrypto.padBase64(signature)); - const cryptoKey = await window.crypto.subtle.importKey('jwk', pubkey, algo, true, ['verify']); - // SubtleCrypto's verify method is async so we must make - // this method async as well. - const result = await window.crypto.subtle.verify(algo, cryptoKey, signatureArray, dataArray); - return result; + }, { + key: "join", + value: function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) ret += s + p.data; + return ret; } - async sign(privateKey, data) { - const algo = { - name: 'RSASSA-PKCS1-v1_5', - hash: { name: 'SHA-256' }, - }; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const dataArray = new TextEncoder().encode(data); - const cryptoKey = await window.crypto.subtle.importKey('jwk', privateKey, algo, true, ['sign']); - // SubtleCrypto's sign method is async so we must make - // this method async as well. - const result = await window.crypto.subtle.sign(algo, cryptoKey, dataArray); - return base64js.fromByteArray(new Uint8Array(result)); + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; } - decodeBase64StringUtf8(base64) { - const uint8array = base64js.toByteArray(BrowserCrypto.padBase64(base64)); - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const result = new TextDecoder().decode(uint8array); - return result; + + // Consumes a specified amount of bytes or characters from the buffered data. + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + if (n < this.head.data.length) { + // `slice` is the same for buffers and strings. + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + // First chunk is a perfect match. + ret = this.shift(); + } else { + // Result spans more than one buffer. + ret = hasStrings ? this._getString(n) : this._getBuffer(n); + } + return ret; } - encodeBase64StringUtf8(text) { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const uint8array = new TextEncoder().encode(text); - const result = base64js.fromByteArray(uint8array); - return result; + }, { + key: "first", + value: function first() { + return this.head.data; } - /** - * Computes the SHA-256 hash of the provided string. - * @param str The plain text string to hash. - * @return A promise that resolves with the SHA-256 hash of the provided - * string in hexadecimal encoding. - */ - async sha256DigestHex(str) { - // SubtleCrypto digest() method is async, so we must make - // this method async as well. - // To calculate SHA256 digest using SubtleCrypto, we first - // need to convert an input string to an ArrayBuffer: - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const inputBuffer = new TextEncoder().encode(str); - // Result is ArrayBuffer as well. - const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); - return (0, crypto_1.fromArrayBufferToHex)(outputBuffer); + + // Consumes a specified amount of characters from the buffered data. + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; } - /** - * Computes the HMAC hash of a message using the provided crypto key and the - * SHA-256 algorithm. - * @param key The secret crypto key in utf-8 or ArrayBuffer format. - * @param msg The plain text message. - * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer - * format. - */ - async signWithHmacSha256(key, msg) { - // Convert key, if provided in ArrayBuffer format, to string. - const rawKey = typeof key === 'string' - ? key - : String.fromCharCode(...new Uint16Array(key)); - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const enc = new TextEncoder(); - const cryptoKey = await window.crypto.subtle.importKey('raw', enc.encode(rawKey), { - name: 'HMAC', - hash: { - name: 'SHA-256', - }, - }, false, ['sign']); - return window.crypto.subtle.sign('HMAC', cryptoKey, enc.encode(msg)); + + // Consumes a specified amount of bytes from the buffered data. + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; } -} -exports.BrowserCrypto = BrowserCrypto; + // Make sure the linked list only shows the minimal necessary information. + }, { + key: custom, + value: function value(_, options) { + return inspect(this, _objectSpread(_objectSpread({}, options), {}, { + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + })); + } + }]); + return BufferList; +}(); /***/ }), -/***/ 78043: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 97049: +/***/ ((module) => { "use strict"; -// Copyright 2019 Google LLC -// -// 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. -/* global window */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromArrayBufferToHex = exports.hasBrowserCrypto = exports.createCrypto = void 0; -const crypto_1 = __nccwpck_require__(14693); -const crypto_2 = __nccwpck_require__(30757); -function createCrypto() { - if (hasBrowserCrypto()) { - return new crypto_1.BrowserCrypto(); + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } } - return new crypto_2.NodeCrypto(); + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + return this; } -exports.createCrypto = createCrypto; -function hasBrowserCrypto() { - return (typeof window !== 'undefined' && - typeof window.crypto !== 'undefined' && - typeof window.crypto.subtle !== 'undefined'); +function emitErrorAndCloseNT(self, err) { + emitErrorNT(self, err); + emitCloseNT(self); } -exports.hasBrowserCrypto = hasBrowserCrypto; -/** - * Converts an ArrayBuffer to a hexadecimal string. - * @param arrayBuffer The ArrayBuffer to convert to hexadecimal string. - * @return The hexadecimal encoding of the ArrayBuffer. - */ -function fromArrayBufferToHex(arrayBuffer) { - // Convert buffer to byte array. - const byteArray = Array.from(new Uint8Array(arrayBuffer)); - // Convert bytes to hex string. - return byteArray - .map(byte => { - return byte.toString(16).padStart(2, '0'); - }) - .join(''); +function emitCloseNT(self) { + if (self._writableState && !self._writableState.emitClose) return; + if (self._readableState && !self._readableState.emitClose) return; + self.emit('close'); } -exports.fromArrayBufferToHex = fromArrayBufferToHex; +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} +function emitErrorNT(self, err) { + self.emit('error', err); +} +function errorOrDestroy(stream, err) { + // We have tests that rely on errors being emitted + // in the same tick, so changing this is semver major. + // For now when you opt-in to autoDestroy we allow + // the error to be emitted nextTick. In a future + // semver major update we should change the default to this. + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); +} +module.exports = { + destroy: destroy, + undestroy: undestroy, + errorOrDestroy: errorOrDestroy +}; /***/ }), -/***/ 30757: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 76080: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// Ported from https://github.com/mafintosh/end-of-stream with +// permission from the author, Mathias Buus (@mafintosh). -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NodeCrypto = void 0; -const crypto = __nccwpck_require__(6113); -class NodeCrypto { - async sha256DigestBase64(str) { - return crypto.createHash('sha256').update(str).digest('base64'); - } - randomBytesBase64(count) { - return crypto.randomBytes(count).toString('base64'); - } - async verify(pubkey, data, signature) { - const verifier = crypto.createVerify('RSA-SHA256'); - verifier.update(data); - verifier.end(); - return verifier.verify(pubkey, signature, 'base64'); - } - async sign(privateKey, data) { - const signer = crypto.createSign('RSA-SHA256'); - signer.update(data); - signer.end(); - return signer.sign(privateKey, 'base64'); - } - decodeBase64StringUtf8(base64) { - return Buffer.from(base64, 'base64').toString('utf-8'); - } - encodeBase64StringUtf8(text) { - return Buffer.from(text, 'utf-8').toString('base64'); - } - /** - * Computes the SHA-256 hash of the provided string. - * @param str The plain text string to hash. - * @return A promise that resolves with the SHA-256 hash of the provided - * string in hexadecimal encoding. - */ - async sha256DigestHex(str) { - return crypto.createHash('sha256').update(str).digest('hex'); - } - /** - * Computes the HMAC hash of a message using the provided crypto key and the - * SHA-256 algorithm. - * @param key The secret crypto key in utf-8 or ArrayBuffer format. - * @param msg The plain text message. - * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer - * format. - */ - async signWithHmacSha256(key, msg) { - const cryptoKey = typeof key === 'string' ? key : toBuffer(key); - return toArrayBuffer(crypto.createHmac('sha256', cryptoKey).update(msg).digest()); + + +var ERR_STREAM_PREMATURE_CLOSE = (__nccwpck_require__(67214)/* .codes.ERR_STREAM_PREMATURE_CLOSE */ .q.ERR_STREAM_PREMATURE_CLOSE); +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; } + callback.apply(this, args); + }; } -exports.NodeCrypto = NodeCrypto; -/** - * Converts a Node.js Buffer to an ArrayBuffer. - * https://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer - * @param buffer The Buffer input to covert. - * @return The ArrayBuffer representation of the input. - */ -function toArrayBuffer(buffer) { - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); +function noop() {} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; } -/** - * Converts an ArrayBuffer to a Node.js Buffer. - * @param arrayBuffer The ArrayBuffer input to covert. - * @return The Buffer representation of the input. - */ -function toBuffer(arrayBuffer) { - return Buffer.from(arrayBuffer); +function eos(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish() { + if (!stream.writable) onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; + var onerror = function onerror(err) { + callback.call(stream, err); + }; + var onclose = function onclose() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + var onrequest = function onrequest() { + stream.req.on('finish', onfinish); + }; + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest();else stream.on('request', onrequest); + } else if (writable && !stream._writableState) { + // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + return function () { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; } - +module.exports = eos; /***/ }), -/***/ 20810: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 39082: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GoogleAuth = exports.auth = exports.DefaultTransporter = exports.PassThroughClient = exports.PluggableAuthClient = exports.DownscopedClient = exports.BaseExternalAccountClient = exports.ExternalAccountClient = exports.IdentityPoolClient = exports.AwsClient = exports.UserRefreshClient = exports.LoginTicket = exports.OAuth2Client = exports.CodeChallengeMethod = exports.Impersonated = exports.JWT = exports.JWTAccess = exports.IdTokenClient = exports.IAMAuth = exports.GCPEnv = exports.Compute = exports.DEFAULT_UNIVERSE = exports.AuthClient = exports.gaxios = exports.gcpMetadata = void 0; -// Copyright 2017 Google LLC -// -// 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. -const googleauth_1 = __nccwpck_require__(20695); -Object.defineProperty(exports, "GoogleAuth", ({ enumerable: true, get: function () { return googleauth_1.GoogleAuth; } })); -// Export common deps to ensure types/instances are the exact match. Useful -// for consistently configuring the library across versions. -exports.gcpMetadata = __nccwpck_require__(3563); -exports.gaxios = __nccwpck_require__(59555); -var authclient_1 = __nccwpck_require__(44627); -Object.defineProperty(exports, "AuthClient", ({ enumerable: true, get: function () { return authclient_1.AuthClient; } })); -Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_1.DEFAULT_UNIVERSE; } })); -var computeclient_1 = __nccwpck_require__(96875); -Object.defineProperty(exports, "Compute", ({ enumerable: true, get: function () { return computeclient_1.Compute; } })); -var envDetect_1 = __nccwpck_require__(21380); -Object.defineProperty(exports, "GCPEnv", ({ enumerable: true, get: function () { return envDetect_1.GCPEnv; } })); -var iam_1 = __nccwpck_require__(39735); -Object.defineProperty(exports, "IAMAuth", ({ enumerable: true, get: function () { return iam_1.IAMAuth; } })); -var idtokenclient_1 = __nccwpck_require__(80298); -Object.defineProperty(exports, "IdTokenClient", ({ enumerable: true, get: function () { return idtokenclient_1.IdTokenClient; } })); -var jwtaccess_1 = __nccwpck_require__(68740); -Object.defineProperty(exports, "JWTAccess", ({ enumerable: true, get: function () { return jwtaccess_1.JWTAccess; } })); -var jwtclient_1 = __nccwpck_require__(13959); -Object.defineProperty(exports, "JWT", ({ enumerable: true, get: function () { return jwtclient_1.JWT; } })); -var impersonated_1 = __nccwpck_require__(91103); -Object.defineProperty(exports, "Impersonated", ({ enumerable: true, get: function () { return impersonated_1.Impersonated; } })); -var oauth2client_1 = __nccwpck_require__(3936); -Object.defineProperty(exports, "CodeChallengeMethod", ({ enumerable: true, get: function () { return oauth2client_1.CodeChallengeMethod; } })); -Object.defineProperty(exports, "OAuth2Client", ({ enumerable: true, get: function () { return oauth2client_1.OAuth2Client; } })); -var loginticket_1 = __nccwpck_require__(74524); -Object.defineProperty(exports, "LoginTicket", ({ enumerable: true, get: function () { return loginticket_1.LoginTicket; } })); -var refreshclient_1 = __nccwpck_require__(98790); -Object.defineProperty(exports, "UserRefreshClient", ({ enumerable: true, get: function () { return refreshclient_1.UserRefreshClient; } })); -var awsclient_1 = __nccwpck_require__(71569); -Object.defineProperty(exports, "AwsClient", ({ enumerable: true, get: function () { return awsclient_1.AwsClient; } })); -var identitypoolclient_1 = __nccwpck_require__(20117); -Object.defineProperty(exports, "IdentityPoolClient", ({ enumerable: true, get: function () { return identitypoolclient_1.IdentityPoolClient; } })); -var externalclient_1 = __nccwpck_require__(94381); -Object.defineProperty(exports, "ExternalAccountClient", ({ enumerable: true, get: function () { return externalclient_1.ExternalAccountClient; } })); -var baseexternalclient_1 = __nccwpck_require__(40810); -Object.defineProperty(exports, "BaseExternalAccountClient", ({ enumerable: true, get: function () { return baseexternalclient_1.BaseExternalAccountClient; } })); -var downscopedclient_1 = __nccwpck_require__(6270); -Object.defineProperty(exports, "DownscopedClient", ({ enumerable: true, get: function () { return downscopedclient_1.DownscopedClient; } })); -var pluggable_auth_client_1 = __nccwpck_require__(44782); -Object.defineProperty(exports, "PluggableAuthClient", ({ enumerable: true, get: function () { return pluggable_auth_client_1.PluggableAuthClient; } })); -var passthrough_1 = __nccwpck_require__(32460); -Object.defineProperty(exports, "PassThroughClient", ({ enumerable: true, get: function () { return passthrough_1.PassThroughClient; } })); -var transporters_1 = __nccwpck_require__(72649); -Object.defineProperty(exports, "DefaultTransporter", ({ enumerable: true, get: function () { return transporters_1.DefaultTransporter; } })); -const auth = new googleauth_1.GoogleAuth(); -exports.auth = auth; + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var ERR_INVALID_ARG_TYPE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_ARG_TYPE */ .q.ERR_INVALID_ARG_TYPE); +function from(Readable, iterable, opts) { + var iterator; + if (iterable && typeof iterable.next === 'function') { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); + // Reading boolean to protect against _read + // being called before last iteration completion. + var reading = false; + readable._read = function () { + if (!reading) { + reading = true; + next(); + } + }; + function next() { + return _next2.apply(this, arguments); + } + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _yield$iterator$next = yield iterator.next(), + value = _yield$iterator$next.value, + done = _yield$iterator$next.done; + if (done) { + readable.push(null); + } else if (readable.push(yield value)) { + next(); + } else { + reading = false; + } + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + return readable; +} +module.exports = from; /***/ }), -/***/ 16608: -/***/ ((__unused_webpack_module, exports) => { +/***/ 76989: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// Ported from https://github.com/mafintosh/pump with +// permission from the author, Mathias Buus (@mafintosh). -// Copyright 2017 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validate = void 0; -// Accepts an options object passed from the user to the API. In the -// previous version of the API, it referred to a `Request` options object. -// Now it refers to an Axiox Request Config object. This is here to help -// ensure users don't pass invalid options when they upgrade from 0.x to 1.x. -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function validate(options) { - const vpairs = [ - { invalid: 'uri', expected: 'url' }, - { invalid: 'json', expected: 'data' }, - { invalid: 'qs', expected: 'params' }, - ]; - for (const pair of vpairs) { - if (options[pair.invalid]) { - const e = `'${pair.invalid}' is not a valid configuration option. Please use '${pair.expected}' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.`; - throw new Error(e); - } - } + + +var eos; +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + callback.apply(void 0, arguments); + }; } -exports.validate = validate; +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; +function noop(err) { + // Rethrow the error if it exists to avoid swallowing it + if (err) throw err; +} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} +function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on('close', function () { + closed = true; + }); + if (eos === undefined) eos = __nccwpck_require__(76080); + eos(stream, { + readable: reading, + writable: writing + }, function (err) { + if (err) return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function (err) { + if (closed) return; + if (destroyed) return; + destroyed = true; + // request.destroy just do .end - .abort is what we want + if (isRequest(stream)) return stream.abort(); + if (typeof stream.destroy === 'function') return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED('pipe')); + }; +} +function call(fn) { + fn(); +} +function pipe(from, to) { + return from.pipe(to); +} +function popCallback(streams) { + if (!streams.length) return noop; + if (typeof streams[streams.length - 1] !== 'function') return noop; + return streams.pop(); +} +function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS('streams'); + } + var error; + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err; + if (err) destroys.forEach(call); + if (reading) return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); +} +module.exports = pipeline; /***/ }), -/***/ 72649: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 39948: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DefaultTransporter = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const options_1 = __nccwpck_require__(16608); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const pkg = __nccwpck_require__(51402); -const PRODUCT_NAME = 'google-api-nodejs-client'; -class DefaultTransporter { - constructor() { - /** - * A configurable, replacable `Gaxios` instance. - */ - this.instance = new gaxios_1.Gaxios(); - } - /** - * Configures request options before making a request. - * @param opts GaxiosOptions options. - * @return Configured options. - */ - configure(opts = {}) { - opts.headers = opts.headers || {}; - if (typeof window === 'undefined') { - // set transporter user agent if not in browser - const uaValue = opts.headers['User-Agent']; - if (!uaValue) { - opts.headers['User-Agent'] = DefaultTransporter.USER_AGENT; - } - else if (!uaValue.includes(`${PRODUCT_NAME}/`)) { - opts.headers['User-Agent'] = - `${uaValue} ${DefaultTransporter.USER_AGENT}`; - } - // track google-auth-library-nodejs version: - if (!opts.headers['x-goog-api-client']) { - const nodeVersion = process.version.replace(/^v/, ''); - opts.headers['x-goog-api-client'] = `gl-node/${nodeVersion}`; - } - } - return opts; - } - /** - * Makes a request using Gaxios with given options. - * @param opts GaxiosOptions options. - * @param callback optional callback that contains GaxiosResponse object. - * @return GaxiosPromise, assuming no callback is passed. - */ - request(opts) { - // ensure the user isn't passing in request-style options - opts = this.configure(opts); - (0, options_1.validate)(opts); - return this.instance.request(opts).catch(e => { - throw this.processError(e); - }); - } - get defaults() { - return this.instance.defaults; - } - set defaults(opts) { - this.instance.defaults = opts; - } - /** - * Changes the error to include details from the body. - */ - processError(e) { - const res = e.response; - const err = e; - const body = res ? res.data : null; - if (res && body && body.error && res.status !== 200) { - if (typeof body.error === 'string') { - err.message = body.error; - err.status = res.status; - } - else if (Array.isArray(body.error.errors)) { - err.message = body.error.errors - .map((err2) => err2.message) - .join('\n'); - err.code = body.error.code; - err.errors = body.error.errors; - } - else { - err.message = body.error.message; - err.code = body.error.code; - } - } - else if (res && res.status >= 400) { - // Consider all 4xx and 5xx responses errors. - err.message = body; - err.status = res.status; - } - return err; - } + +var ERR_INVALID_OPT_VALUE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_OPT_VALUE */ .q.ERR_INVALID_OPT_VALUE); +function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; } -exports.DefaultTransporter = DefaultTransporter; -/** - * Default user agent. - */ -DefaultTransporter.USER_AGENT = `${PRODUCT_NAME}/${pkg.version}`; +function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : 'highWaterMark'; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + return Math.floor(hwm); + } + // Default value + return state.objectMode ? 16 : 16 * 1024; +} +module.exports = { + getHighWaterMark: getHighWaterMark +}; /***/ }), -/***/ 68905: -/***/ (function(__unused_webpack_module, exports) { +/***/ 62387: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +module.exports = __nccwpck_require__(12781); -// Copyright 2023 Google LLC -// -// 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. -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _LRUCache_instances, _LRUCache_cache, _LRUCache_moveToEnd, _LRUCache_evict; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LRUCache = exports.originalOrCamelOptions = exports.snakeToCamel = void 0; -/** - * Returns the camel case of a provided string. - * - * @remarks - * - * Match any `_` and not `_` pair, then return the uppercase of the not `_` - * character. - * - * @internal - * - * @param str the string to convert - * @returns the camelCase'd string - */ -function snakeToCamel(str) { - return str.replace(/([_][^_])/g, match => match.slice(1).toUpperCase()); -} -exports.snakeToCamel = snakeToCamel; -/** - * Get the value of `obj[key]` or `obj[camelCaseKey]`, with a preference - * for original, non-camelCase key. - * - * @param obj object to lookup a value in - * @returns a `get` function for getting `obj[key || snakeKey]`, if available - */ -function originalOrCamelOptions(obj) { - /** - * - * @param key an index of object, preferably snake_case - * @returns the value `obj[key || snakeKey]`, if available - */ - function get(key) { - var _a; - const o = (obj || {}); - return (_a = o[key]) !== null && _a !== void 0 ? _a : o[snakeToCamel(key)]; - } - return { get }; -} -exports.originalOrCamelOptions = originalOrCamelOptions; -/** - * A simple LRU cache utility. - * Not meant for external usage. - * - * @experimental - * @internal - */ -class LRUCache { - constructor(options) { - _LRUCache_instances.add(this); - /** - * Maps are in order. Thus, the older item is the first item. - * - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map} - */ - _LRUCache_cache.set(this, new Map()); - this.capacity = options.capacity; - this.maxAge = options.maxAge; - } - /** - * Add an item to the cache. - * - * @param key the key to upsert - * @param value the value of the key - */ - set(key, value) { - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, value); - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); - } - /** - * Get an item from the cache. - * - * @param key the key to retrieve - */ - get(key) { - const item = __classPrivateFieldGet(this, _LRUCache_cache, "f").get(key); - if (!item) - return; - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, item.value); - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); - return item.value; - } + +/***/ }), + +/***/ 51642: +/***/ ((module, exports, __nccwpck_require__) => { + +var Stream = __nccwpck_require__(12781); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream.Readable; + Object.assign(module.exports, Stream); + module.exports.Stream = Stream; +} else { + exports = module.exports = __nccwpck_require__(51433); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = __nccwpck_require__(26993); + exports.Duplex = __nccwpck_require__(41359); + exports.Transform = __nccwpck_require__(34415); + exports.PassThrough = __nccwpck_require__(81542); + exports.finished = __nccwpck_require__(76080); + exports.pipeline = __nccwpck_require__(76989); } -exports.LRUCache = LRUCache; -_LRUCache_cache = new WeakMap(), _LRUCache_instances = new WeakSet(), _LRUCache_moveToEnd = function _LRUCache_moveToEnd(key, value) { - __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(key); - __classPrivateFieldGet(this, _LRUCache_cache, "f").set(key, { - value, - lastAccessed: Date.now(), - }); -}, _LRUCache_evict = function _LRUCache_evict() { - const cutoffDate = this.maxAge ? Date.now() - this.maxAge : 0; - /** - * Because we know Maps are in order, this item is both the - * last item in the list (capacity) and oldest (maxAge). - */ - let oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); - while (!oldestItem.done && - (__classPrivateFieldGet(this, _LRUCache_cache, "f").size > this.capacity || // too many - oldestItem.value[1].lastAccessed < cutoffDate) // too old - ) { - __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(oldestItem.value[0]); - oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); - } -}; /***/ }), -/***/ 76031: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 63515: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * Copyright 2018 Google LLC - * - * Distributed under MIT license. - * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT - */ -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var _GoogleToken_instances, _GoogleToken_inFlightRequest, _GoogleToken_getTokenAsync, _GoogleToken_getTokenAsyncInner, _GoogleToken_ensureEmail, _GoogleToken_revokeTokenAsync, _GoogleToken_configure, _GoogleToken_requestToken; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GoogleToken = void 0; -const fs = __nccwpck_require__(57147); -const gaxios_1 = __nccwpck_require__(59555); -const jws = __nccwpck_require__(4636); -const path = __nccwpck_require__(71017); -const util_1 = __nccwpck_require__(73837); -const readFile = fs.readFile - ? (0, util_1.promisify)(fs.readFile) - : async () => { - // if running in the web-browser, fs.readFile may not have been shimmed. - throw new ErrorWithCode('use key rather than keyFile.', 'MISSING_CREDENTIALS'); - }; -const GOOGLE_TOKEN_URL = 'https://www.googleapis.com/oauth2/v4/token'; -const GOOGLE_REVOKE_TOKEN_URL = 'https://accounts.google.com/o/oauth2/revoke?token='; -class ErrorWithCode extends Error { - constructor(message, code) { - super(message); - this.code = code; - } + +const {PassThrough} = __nccwpck_require__(12781); +const extend = __nccwpck_require__(38171); + +let debug = () => {}; +if ( + typeof process !== 'undefined' && + 'env' in process && + typeof process.env === 'object' && + process.env.DEBUG === 'retry-request' +) { + debug = message => { + console.log('retry-request:', message); + }; } -class GoogleToken { - get accessToken() { - return this.rawToken ? this.rawToken.access_token : undefined; - } - get idToken() { - return this.rawToken ? this.rawToken.id_token : undefined; - } - get tokenType() { - return this.rawToken ? this.rawToken.token_type : undefined; - } - get refreshToken() { - return this.rawToken ? this.rawToken.refresh_token : undefined; - } - /** - * Create a GoogleToken. - * - * @param options Configuration object. - */ - constructor(options) { - _GoogleToken_instances.add(this); - this.transporter = { - request: opts => (0, gaxios_1.request)(opts), - }; - _GoogleToken_inFlightRequest.set(this, void 0); - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, options); + +const DEFAULTS = { + objectMode: false, + retries: 2, + + /* + The maximum time to delay in seconds. If retryDelayMultiplier results in a + delay greater than maxRetryDelay, retries should delay by maxRetryDelay + seconds instead. + */ + maxRetryDelay: 64, + + /* + The multiplier by which to increase the delay time between the completion of + failed requests, and the initiation of the subsequent retrying request. + */ + retryDelayMultiplier: 2, + + /* + The length of time to keep retrying in seconds. The last sleep period will + be shortened as necessary, so that the last retry runs at deadline (and not + considerably beyond it). The total time starting from when the initial + request is sent, after which an error will be returned, regardless of the + retrying attempts made meanwhile. + */ + totalTimeout: 600, + + noResponseRetries: 2, + currentRetryAttempt: 0, + shouldRetryFn: function (response) { + const retryRanges = [ + // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes + // 1xx - Retry (Informational, request still processing) + // 2xx - Do not retry (Success) + // 3xx - Do not retry (Redirect) + // 4xx - Do not retry (Client errors) + // 429 - Retry ("Too Many Requests") + // 5xx - Retry (Server errors) + [100, 199], + [429, 429], + [500, 599], + ]; + + const statusCode = response.statusCode; + debug(`Response status: ${statusCode}`); + + let range; + while ((range = retryRanges.shift())) { + if (statusCode >= range[0] && statusCode <= range[1]) { + // Not a successful status or redirect. + return true; + } } - /** - * Returns whether the token has expired. - * - * @return true if the token has expired, false otherwise. - */ - hasExpired() { - const now = new Date().getTime(); - if (this.rawToken && this.expiresAt) { - return now >= this.expiresAt; - } - else { - return true; - } + }, +}; + +function retryRequest(requestOpts, opts, callback) { + if (typeof requestOpts === 'string') { + requestOpts = {url: requestOpts}; + } + + const streamMode = typeof arguments[arguments.length - 1] !== 'function'; + + if (typeof opts === 'function') { + callback = opts; + } + + const manualCurrentRetryAttemptWasSet = + opts && typeof opts.currentRetryAttempt === 'number'; + opts = extend({}, DEFAULTS, opts); + + if (typeof opts.request === 'undefined') { + throw new Error('A request library must be provided to retry-request.'); + } + + let currentRetryAttempt = opts.currentRetryAttempt; + + let numNoResponseAttempts = 0; + let streamResponseHandled = false; + + let retryStream; + let requestStream; + let delayStream; + + let activeRequest; + const retryRequest = { + abort: function () { + if (activeRequest && activeRequest.abort) { + activeRequest.abort(); + } + }, + }; + + if (streamMode) { + retryStream = new PassThrough({objectMode: opts.objectMode}); + retryStream.abort = resetStreams; + } + + const timeOfFirstRequest = Date.now(); + if (currentRetryAttempt > 0) { + retryAfterDelay(currentRetryAttempt); + } else { + makeRequest(); + } + + if (streamMode) { + return retryStream; + } else { + return retryRequest; + } + + function resetStreams() { + delayStream = null; + + if (requestStream) { + requestStream.abort && requestStream.abort(); + requestStream.cancel && requestStream.cancel(); + + if (requestStream.destroy) { + requestStream.destroy(); + } else if (requestStream.end) { + requestStream.end(); + } } - /** - * Returns whether the token will expire within eagerRefreshThresholdMillis - * - * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. - */ - isTokenExpiring() { - var _a; - const now = new Date().getTime(); - const eagerRefreshThresholdMillis = (_a = this.eagerRefreshThresholdMillis) !== null && _a !== void 0 ? _a : 0; - if (this.rawToken && this.expiresAt) { - return this.expiresAt <= now + eagerRefreshThresholdMillis; - } - else { - return true; - } + } + + function makeRequest() { + let finishHandled = false; + currentRetryAttempt++; + debug(`Current retry attempt: ${currentRetryAttempt}`); + + function handleFinish(args = []) { + if (!finishHandled) { + finishHandled = true; + retryStream.emit('complete', ...args); + } } - getToken(callback, opts = {}) { - if (typeof callback === 'object') { - opts = callback; - callback = undefined; - } - opts = Object.assign({ - forceRefresh: false, - }, opts); - if (callback) { - const cb = callback; - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts).then(t => cb(null, t), callback); + + if (streamMode) { + streamResponseHandled = false; + + delayStream = new PassThrough({objectMode: opts.objectMode}); + requestStream = opts.request(requestOpts); + + setImmediate(() => { + retryStream.emit('request'); + }); + + requestStream + // gRPC via google-cloud-node can emit an `error` as well as a `response` + // Whichever it emits, we run with-- we can't run with both. That's what + // is up with the `streamResponseHandled` tracking. + .on('error', err => { + if (streamResponseHandled) { return; - } - return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts); - } - /** - * Given a keyFile, extract the key and client email if available - * @param keyFile Path to a json, pem, or p12 file that contains the key. - * @returns an object with privateKey and clientEmail properties - */ - async getCredentials(keyFile) { - const ext = path.extname(keyFile); - switch (ext) { - case '.json': { - const key = await readFile(keyFile, 'utf8'); - const body = JSON.parse(key); - const privateKey = body.private_key; - const clientEmail = body.client_email; - if (!privateKey || !clientEmail) { - throw new ErrorWithCode('private_key and client_email are required.', 'MISSING_CREDENTIALS'); - } - return { privateKey, clientEmail }; - } - case '.der': - case '.crt': - case '.pem': { - const privateKey = await readFile(keyFile, 'utf8'); - return { privateKey }; - } - case '.p12': - case '.pfx': { - throw new ErrorWithCode('*.p12 certificates are not supported after v6.1.2. ' + - 'Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.', 'UNKNOWN_CERTIFICATE_TYPE'); - } - default: - throw new ErrorWithCode('Unknown certificate type. Type is determined based on file extension. ' + - 'Current supported extensions are *.json, and *.pem.', 'UNKNOWN_CERTIFICATE_TYPE'); - } - } - revokeToken(callback) { - if (callback) { - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this).then(() => callback(), callback); + } + + streamResponseHandled = true; + onResponse(err); + }) + .on('response', (resp, body) => { + if (streamResponseHandled) { return; - } - return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this); - } -} -exports.GoogleToken = GoogleToken; -_GoogleToken_inFlightRequest = new WeakMap(), _GoogleToken_instances = new WeakSet(), _GoogleToken_getTokenAsync = async function _GoogleToken_getTokenAsync(opts) { - if (__classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f") && !opts.forceRefresh) { - return __classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f"); - } - try { - return await (__classPrivateFieldSet(this, _GoogleToken_inFlightRequest, __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsyncInner).call(this, opts), "f")); - } - finally { - __classPrivateFieldSet(this, _GoogleToken_inFlightRequest, undefined, "f"); - } -}, _GoogleToken_getTokenAsyncInner = async function _GoogleToken_getTokenAsyncInner(opts) { - if (this.isTokenExpiring() === false && opts.forceRefresh === false) { - return Promise.resolve(this.rawToken); - } - if (!this.key && !this.keyFile) { - throw new Error('No key or keyFile set.'); - } - if (!this.key && this.keyFile) { - const creds = await this.getCredentials(this.keyFile); - this.key = creds.privateKey; - this.iss = creds.clientEmail || this.iss; - if (!creds.clientEmail) { - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_ensureEmail).call(this); - } - } - return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_requestToken).call(this); -}, _GoogleToken_ensureEmail = function _GoogleToken_ensureEmail() { - if (!this.iss) { - throw new ErrorWithCode('email is required.', 'MISSING_CREDENTIALS'); - } -}, _GoogleToken_revokeTokenAsync = async function _GoogleToken_revokeTokenAsync() { - if (!this.accessToken) { - throw new Error('No token to revoke.'); - } - const url = GOOGLE_REVOKE_TOKEN_URL + this.accessToken; - await this.transporter.request({ - url, - retry: true, - }); - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, { - email: this.iss, - sub: this.sub, - key: this.key, - keyFile: this.keyFile, - scope: this.scope, - additionalClaims: this.additionalClaims, - }); -}, _GoogleToken_configure = function _GoogleToken_configure(options = {}) { - this.keyFile = options.keyFile; - this.key = options.key; - this.rawToken = undefined; - this.iss = options.email || options.iss; - this.sub = options.sub; - this.additionalClaims = options.additionalClaims; - if (typeof options.scope === 'object') { - this.scope = options.scope.join(' '); - } - else { - this.scope = options.scope; + } + + streamResponseHandled = true; + onResponse(null, resp, body); + }) + .on('complete', (...params) => handleFinish(params)) + .on('finish', (...params) => handleFinish(params)); + + requestStream.pipe(delayStream); + } else { + activeRequest = opts.request(requestOpts, onResponse); } - this.eagerRefreshThresholdMillis = options.eagerRefreshThresholdMillis; - if (options.transporter) { - this.transporter = options.transporter; + } + + function retryAfterDelay(currentRetryAttempt) { + if (streamMode) { + resetStreams(); } -}, _GoogleToken_requestToken = -/** - * Request the token from Google. - */ -async function _GoogleToken_requestToken() { - var _a, _b; - const iat = Math.floor(new Date().getTime() / 1000); - const additionalClaims = this.additionalClaims || {}; - const payload = Object.assign({ - iss: this.iss, - scope: this.scope, - aud: GOOGLE_TOKEN_URL, - exp: iat + 3600, - iat, - sub: this.sub, - }, additionalClaims); - const signedJWT = jws.sign({ - header: { alg: 'RS256' }, - payload, - secret: this.key, + + const nextRetryDelay = getNextRetryDelay({ + maxRetryDelay: opts.maxRetryDelay, + retryDelayMultiplier: opts.retryDelayMultiplier, + retryNumber: currentRetryAttempt, + timeOfFirstRequest, + totalTimeout: opts.totalTimeout, }); - try { - const r = await this.transporter.request({ - method: 'POST', - url: GOOGLE_TOKEN_URL, - data: { - grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', - assertion: signedJWT, - }, - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - responseType: 'json', - retryConfig: { - httpMethodsToRetry: ['POST'], - }, - }); - this.rawToken = r.data; - this.expiresAt = - r.data.expires_in === null || r.data.expires_in === undefined - ? undefined - : (iat + r.data.expires_in) * 1000; - return this.rawToken; + debug(`Next retry delay: ${nextRetryDelay}`); + + if (nextRetryDelay <= 0) { + numNoResponseAttempts = opts.noResponseRetries + 1; + return; } - catch (e) { - this.rawToken = undefined; - this.tokenExpires = undefined; - const body = e.response && ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) - ? (_b = e.response) === null || _b === void 0 ? void 0 : _b.data - : {}; - if (body.error) { - const desc = body.error_description - ? `: ${body.error_description}` - : ''; - e.message = `${body.error}${desc}`; + + setTimeout(makeRequest, nextRetryDelay); + } + + function onResponse(err, response, body) { + // An error such as DNS resolution. + if (err) { + numNoResponseAttempts++; + + if (numNoResponseAttempts <= opts.noResponseRetries) { + retryAfterDelay(numNoResponseAttempts); + } else { + if (streamMode) { + retryStream.emit('error', err); + retryStream.end(); + } else { + callback(err, response, body); } - throw e; + } + + return; + } + + // Send the response to see if we should try again. + // NOTE: "currentRetryAttempt" isn't accurate by default, as it counts + // the very first request sent as the first "retry". It is only accurate + // when a user provides their own "currentRetryAttempt" option at + // instantiation. + const adjustedCurrentRetryAttempt = manualCurrentRetryAttemptWasSet + ? currentRetryAttempt + : currentRetryAttempt - 1; + if ( + adjustedCurrentRetryAttempt < opts.retries && + opts.shouldRetryFn(response) + ) { + retryAfterDelay(currentRetryAttempt); + return; } -}; -//# sourceMappingURL=index.js.map -/***/ }), + // No more attempts need to be made, just continue on. + if (streamMode) { + retryStream.emit('response', response); + delayStream.pipe(retryStream); + requestStream.on('error', err => { + retryStream.destroy(err); + }); + } else { + callback(err, response, body); + } + } +} -/***/ 31621: -/***/ ((module) => { +module.exports = retryRequest; -"use strict"; +function getNextRetryDelay(config) { + const { + maxRetryDelay, + retryDelayMultiplier, + retryNumber, + timeOfFirstRequest, + totalTimeout, + } = config; + const maxRetryDelayMs = maxRetryDelay * 1000; + const totalTimeoutMs = totalTimeout * 1000; -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; + const jitter = Math.floor(Math.random() * 1000); + const calculatedNextRetryDelay = + Math.pow(retryDelayMultiplier, retryNumber) * 1000 + jitter; + const maxAllowableDelayMs = + totalTimeoutMs - (Date.now() - timeOfFirstRequest); -/***/ }), + return Math.min( + calculatedNextRetryDelay, + maxAllowableDelayMs, + maxRetryDelayMs + ); +} -/***/ 52589: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +module.exports.defaults = DEFAULTS; +module.exports.getNextRetryDelay = getNextRetryDelay; -"use strict"; -var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i'"&]/g,nonAscii:/[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintable:/[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintableOnly:/[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,extensive:/[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g};var defaultEncodeOptions={mode:"specialChars",level:"all",numeric:"decimal"};function encode(text,_a){var _b=_a===void 0?defaultEncodeOptions:_a,_c=_b.mode,mode=_c===void 0?"specialChars":_c,_d=_b.numeric,numeric=_d===void 0?"decimal":_d,_e=_b.level,level=_e===void 0?"all":_e;if(!text){return""}var encodeRegExp=encodeRegExps[mode];var references=allNamedReferences[level].characters;var isHex=numeric==="hexadecimal";return replaceUsingRegExp(text,encodeRegExp,(function(input){var result=references[input];if(!result){var code=input.length>1?surrogate_pairs_1.getCodePoint(input,0):input.charCodeAt(0);result=(isHex?"&#x"+code.toString(16):"&#"+code)+";"}return result}))}exports.encode=encode;var defaultDecodeOptions={scope:"body",level:"all"};var strict=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;var attribute=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;var baseDecodeRegExps={xml:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.xml},html4:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.html4},html5:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.html5}};var decodeRegExps=__assign(__assign({},baseDecodeRegExps),{all:baseDecodeRegExps.html5});var fromCharCode=String.fromCharCode;var outOfBoundsChar=fromCharCode(65533);var defaultDecodeEntityOptions={level:"all"};function getDecodedEntity(entity,references,isAttribute,isStrict){var decodeResult=entity;var decodeEntityLastChar=entity[entity.length-1];if(isAttribute&&decodeEntityLastChar==="="){decodeResult=entity}else if(isStrict&&decodeEntityLastChar!==";"){decodeResult=entity}else{var decodeResultByReference=references[entity];if(decodeResultByReference){decodeResult=decodeResultByReference}else if(entity[0]==="&"&&entity[1]==="#"){var decodeSecondChar=entity[2];var decodeCode=decodeSecondChar=="x"||decodeSecondChar=="X"?parseInt(entity.substr(3),16):parseInt(entity.substr(2));decodeResult=decodeCode>=1114111?outOfBoundsChar:decodeCode>65535?surrogate_pairs_1.fromCodePoint(decodeCode):fromCharCode(numeric_unicode_map_1.numericUnicodeMap[decodeCode]||decodeCode)}}return decodeResult}function decodeEntity(entity,_a){var _b=(_a===void 0?defaultDecodeEntityOptions:_a).level,level=_b===void 0?"all":_b;if(!entity){return""}return getDecodedEntity(entity,allNamedReferences[level].entities,false,false)}exports.decodeEntity=decodeEntity;function decode(text,_a){var _b=_a===void 0?defaultDecodeOptions:_a,_c=_b.level,level=_c===void 0?"all":_c,_d=_b.scope,scope=_d===void 0?level==="xml"?"strict":"body":_d;if(!text){return""}var decodeRegExp=decodeRegExps[level][scope];var references=allNamedReferences[level].entities;var isAttribute=scope==="attribute";var isStrict=scope==="strict";return replaceUsingRegExp(text,decodeRegExp,(function(entity){return getDecodedEntity(entity,references,isAttribute,isStrict)}))}exports.decode=decode; -//# sourceMappingURL=./index.js.map /***/ }), -/***/ 6068: -/***/ ((__unused_webpack_module, exports) => { +/***/ 71604: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g};exports.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"¥","¥":"¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"­","­":"­","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"À","À":"À","Á":"Á","Á":"Á","Â":"Â","Â":"Â","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","Å":"Å","Å":"Å","Æ":"Æ","Æ":"Æ","Ç":"Ç","Ç":"Ç","È":"È","È":"È","É":"É","É":"É","Ê":"Ê","Ê":"Ê","Ë":"Ë","Ë":"Ë","Ì":"Ì","Ì":"Ì","Í":"Í","Í":"Í","Î":"Î","Î":"Î","Ï":"Ï","Ï":"Ï","Ð":"Ð","Ð":"Ð","Ñ":"Ñ","Ñ":"Ñ","Ò":"Ò","Ò":"Ò","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","Õ":"Õ","Õ":"Õ","Ö":"Ö","Ö":"Ö","×":"×","×":"×","Ø":"Ø","Ø":"Ø","Ù":"Ù","Ù":"Ù","Ú":"Ú","Ú":"Ú","Û":"Û","Û":"Û","Ü":"Ü","Ü":"Ü","Ý":"Ý","Ý":"Ý","Þ":"Þ","Þ":"Þ","ß":"ß","ß":"ß","à":"à","à":"à","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"å","å":"å","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"í","í":"í","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"‌","‍":"‍","‎":"‎","‏":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©","ª":"ª","«":"«","¬":"¬","­":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´","µ":"µ","¶":"¶","·":"·","¸":"¸","¹":"¹","º":"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","×":"×","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","÷":"÷","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ",'"':""","&":"&","<":"<",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"‌","‍":"‍","‎":"‎","‏":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","〈":"⟨","〉":"⟩","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"}},html5:{entities:{"Æ":"Æ","Æ":"Æ","&":"&","&":"&","Á":"Á","Á":"Á","Ă":"Ă","Â":"Â","Â":"Â","А":"А","𝔄":"𝔄","À":"À","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"⁡","Å":"Å","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","ℬ":"ℬ","≎":"≎","Ч":"Ч","©":"©","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","ℭ":"ℭ","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","ⅅ":"ⅅ","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","∯":"∯","¨":"¨","⇓":"⇓","⇐":"⇐","⇔":"⇔","⫤":"⫤","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","⇓":"⇓","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","Ð":"Ð","É":"É","É":"É","Ě":"Ě","Ê":"Ê","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","ℱ":"ℱ","Ѓ":"Ѓ",">":">",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","ℋ":"ℋ","Ħ":"Ħ","≎":"≎","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Í":"Í","Î":"Î","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ì":"Ì","ℑ":"ℑ","Ī":"Ī","ⅈ":"ⅈ","⇒":"⇒","∬":"∬","∫":"∫","⋂":"⋂","⁣":"⁣","⁢":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⇐":"⇐","⇔":"⇔","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","⟸":"⟸","⟺":"⟺","⟹":"⟹","𝕃":"𝕃","↙":"↙","↘":"↘","ℒ":"ℒ","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","ℳ":"ℳ","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"​","​":"​","​":"​","​":"​","≫":"≫","≪":"≪"," ":"\n","𝔑":"𝔑","⁠":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Ø":"Ø","Õ":"Õ","Õ":"Õ","⨷":"⨷","Ö":"Ö","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℌ":"ℌ","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∷":"∷","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",""":'"',""":'"',"𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","ℜ":"ℜ","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","⇒":"⇒","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↓":"↓","←":"←","→":"→","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∋":"∋","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","⋑":"⋑","Þ":"Þ","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц"," ":"\t","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ù":"Ù","Ū":"Ū","_":"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","↑":"↑","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","⇑":"⇑","⇕":"⇕","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","​":"​","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"⁡","𝔞":"𝔞","à":"à","à":"à","ℵ":"ℵ","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","&":"&","&":"&","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∠":"∠","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","Å":"Å","⍼":"⍼","ą":"ą","𝕒":"𝕒","≈":"≈","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","≈":"≈","≊":"≊","å":"å","å":"å","𝒶":"𝒶","*":"*","≈":"≈","≍":"≍","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"∳","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⌅":"⌅","⎵":"⎵","⎶":"⎶","≌":"≌","б":"б","„":"„","∵":"∵","∵":"∵","⦰":"⦰","϶":"϶","ℬ":"ℬ","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","⋂":"⋂","◯":"◯","⋃":"⋃","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⋁":"⋁","⋀":"⋀","⤍":"⤍","⧫":"⧫","▪":"▪","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⊥":"⊥","⊥":"⊥","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","─":"─","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","‵":"‵","˘":"˘","¦":"¦","¦":"¦","𝒷":"𝒷","⁏":"⁏","∽":"∽","⋍":"⋍","\":"\\","⧅":"⧅","⟈":"⟈","•":"•","•":"•","≎":"≎","⪮":"⪮","≏":"≏","≏":"≏","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","ˇ":"ˇ","⩍":"⩍","č":"č","ç":"ç","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"𝔠","ч":"ч","✓":"✓","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","®":"®","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","≗":"≗","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣","♣":"♣",":":":","≔":"≔","≔":"≔",",":",","@":"@","∁":"∁","∘":"∘","∁":"∁","ℂ":"ℂ","≅":"≅","⩭":"⩭","∮":"∮","𝕔":"𝕔","∐":"∐","©":"©","©":"©","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋞":"⋞","⋟":"⋟","⋎":"⋎","⋏":"⋏","¤":"¤","¤":"¤","↶":"↶","↷":"↷","⋎":"⋎","⋏":"⋏","∲":"∲","∱":"∱","⌭":"⌭","⇓":"⇓","⥥":"⥥","†":"†","ℸ":"ℸ","↓":"↓","‐":"‐","⊣":"⊣","⤏":"⤏","˝":"˝","ď":"ď","д":"д","ⅆ":"ⅆ","‡":"‡","⇊":"⇊","⩷":"⩷","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","⇃":"⇃","⇂":"⇂","⋄":"⋄","⋄":"⋄","♦":"♦","♦":"♦","¨":"¨","ϝ":"ϝ","⋲":"⋲","÷":"÷","÷":"÷","÷":"÷","⋇":"⋇","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍","$":"$","𝕕":"𝕕","˙":"˙","≐":"≐","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌆":"⌆","↓":"↓","⇊":"⇊","⇃":"⇃","⇂":"⇂","⤐":"⤐","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","▾":"▾","⇵":"⇵","⥯":"⥯","⦦":"⦦","џ":"џ","⟿":"⟿","⩷":"⩷","≑":"≑","é":"é","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","ê":"ê","≕":"≕","э":"э","ė":"ė","ⅇ":"ⅇ","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅","∅":"∅","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"≖","≕":"≕","≂":"≂","⪖":"⪖","⪕":"⪕","=":"=","≟":"≟","≡":"≡","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","≐":"≐","≂":"≂","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"€","!":"!","∃":"∃","ℰ":"ℰ","ⅇ":"ⅇ","≒":"≒","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi","fj":"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","∀":"∀","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","½":"½","⅓":"⅓","¼":"¼","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","≧":"≧","⪌":"⪌","ǵ":"ǵ","γ":"γ","ϝ":"ϝ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","≥":"≥","⋛":"⋛","≥":"≥","≧":"≧","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","≫":"≫","⋙":"⋙","ℷ":"ℷ","ѓ":"ѓ","≷":"≷","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪊":"⪊","⪈":"⪈","⪈":"⪈","≩":"≩","⋧":"⋧","𝕘":"𝕘","`":"`","ℊ":"ℊ","≳":"≳","⪎":"⪎","⪐":"⪐",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⪆":"⪆","⥸":"⥸","⋗":"⋗","⋛":"⋛","⪌":"⪌","≷":"≷","≳":"≳","≩︀":"≩︀","≩︀":"≩︀","⇔":"⇔"," ":" ","½":"½","ℋ":"ℋ","ъ":"ъ","↔":"↔","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ℏ":"ℏ","ħ":"ħ","⁃":"⁃","‐":"‐","í":"í","í":"í","⁣":"⁣","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"⇔","𝔦":"𝔦","ì":"ì","ì":"ì","ⅈ":"ⅈ","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ℑ":"ℑ","ℐ":"ℐ","ℑ":"ℑ","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","∈":"∈","℅":"℅","∞":"∞","⧝":"⧝","ı":"ı","∫":"∫","⊺":"⊺","ℤ":"ℤ","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"𝒾","∈":"∈","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","∈":"∈","⁢":"⁢","ĩ":"ĩ","і":"і","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⇚":"⇚","⇐":"⇐","⤛":"⤛","⤎":"⤎","≦":"≦","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"ℒ","λ":"λ","⟨":"⟨","⦑":"⦑","⟨":"⟨","⪅":"⪅","«":"«","«":"«","←":"←","⇤":"⇤","⤟":"⤟","⤝":"⤝","↩":"↩","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","⌈":"⌈","{":"{","л":"л","⤶":"⤶","“":"“","„":"„","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","←":"←","↢":"↢","↽":"↽","↼":"↼","⇇":"⇇","↔":"↔","⇆":"⇆","⇋":"⇋","↭":"↭","⋋":"⋋","⋚":"⋚","≤":"≤","≦":"≦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⪅":"⪅","⋖":"⋖","⋚":"⋚","⪋":"⪋","≶":"≶","≲":"≲","⥼":"⥼","⌊":"⌊","𝔩":"𝔩","≶":"≶","⪑":"⪑","↽":"↽","↼":"↼","⥪":"⥪","▄":"▄","љ":"љ","≪":"≪","⇇":"⇇","⌞":"⌞","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","⎰":"⎰","≨":"≨","⪉":"⪉","⪉":"⪉","⪇":"⪇","⪇":"⪇","≨":"≨","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟦":"⟦","⟵":"⟵","⟷":"⟷","⟼":"⟼","⟶":"⟶","↫":"↫","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","_":"_","◊":"◊","◊":"◊","⧫":"⧫","(":"(","⦓":"⦓","⇆":"⇆","⌟":"⌟","⇋":"⇋","⥭":"⥭","‎":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","↰":"↰","≲":"≲","⪍":"⪍","⪏":"⪏","[":"[","‘":"‘","‚":"‚","ł":"ł","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"⋖","⋋":"⋋","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⊴":"⊴","◂":"◂","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","≨︀":"≨︀","∺":"∺","¯":"¯","¯":"¯","♂":"♂","✠":"✠","✠":"✠","↦":"↦","↦":"↦","↧":"↧","↤":"↤","↥":"↥","▮":"▮","⨩":"⨩","м":"м","—":"—","∡":"∡","𝔪":"𝔪","℧":"℧","µ":"µ","µ":"µ","∣":"∣","*":"*","⫰":"⫰","·":"·","·":"·","−":"−","⊟":"⊟","∸":"∸","⨪":"⨪","⫛":"⫛","…":"…","∓":"∓","⊧":"⊧","𝕞":"𝕞","∓":"∓","𝓂":"𝓂","∾":"∾","μ":"μ","⊸":"⊸","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","≫̸":"≫̸","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","≪̸":"≪̸","⇏":"⇏","⊯":"⊯","⊮":"⊮","∇":"∇","ń":"ń","∠⃒":"∠⃒","≉":"≉","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","≉":"≉","♮":"♮","♮":"♮","ℕ":"ℕ"," ":" "," ":" ","≎̸":"≎̸","≏̸":"≏̸","⩃":"⩃","ň":"ň","ņ":"ņ","≇":"≇","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","≠":"≠","⇗":"⇗","⤤":"⤤","↗":"↗","↗":"↗","≐̸":"≐̸","≢":"≢","⤨":"⤨","≂̸":"≂̸","∄":"∄","∄":"∄","𝔫":"𝔫","≧̸":"≧̸","≱":"≱","≱":"≱","≧̸":"≧̸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"≵","≯":"≯","≯":"≯","⇎":"⇎","↮":"↮","⫲":"⫲","∋":"∋","⋼":"⋼","⋺":"⋺","∋":"∋","њ":"њ","⇍":"⇍","≦̸":"≦̸","↚":"↚","‥":"‥","≰":"≰","↚":"↚","↮":"↮","≰":"≰","≦̸":"≦̸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"≮","≴":"≴","≮":"≮","⋪":"⋪","⋬":"⋬","∤":"∤","𝕟":"𝕟","¬":"¬","¬":"¬","∉":"∉","⋹̸":"⋹̸","⋵̸":"⋵̸","∉":"∉","⋷":"⋷","⋶":"⋶","∌":"∌","∌":"∌","⋾":"⋾","⋽":"⋽","∦":"∦","∦":"∦","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","⊀":"⊀","⋠":"⋠","⪯̸":"⪯̸","⊀":"⊀","⪯̸":"⪯̸","⇏":"⇏","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","↛":"↛","⋫":"⋫","⋭":"⋭","⊁":"⊁","⋡":"⋡","⪰̸":"⪰̸","𝓃":"𝓃","∤":"∤","∦":"∦","≁":"≁","≄":"≄","≄":"≄","∤":"∤","∦":"∦","⋢":"⋢","⋣":"⋣","⊄":"⊄","⫅̸":"⫅̸","⊈":"⊈","⊂⃒":"⊂⃒","⊈":"⊈","⫅̸":"⫅̸","⊁":"⊁","⪰̸":"⪰̸","⊅":"⊅","⫆̸":"⫆̸","⊉":"⊉","⊃⃒":"⊃⃒","⊉":"⊉","⫆̸":"⫆̸","≹":"≹","ñ":"ñ","ñ":"ñ","≸":"≸","⋪":"⋪","⋬":"⋬","⋫":"⋫","⋭":"⋭","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","↖":"↖","↖":"↖","⤧":"⤧","Ⓢ":"Ⓢ","ó":"ó","ó":"ó","⊛":"⊛","⊚":"⊚","ô":"ô","ô":"ô","о":"о","⊝":"⊝","ő":"ő","⨸":"⨸","⊙":"⊙","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","ò":"ò","⧁":"⧁","⦵":"⦵","Ω":"Ω","∮":"∮","↺":"↺","⦾":"⦾","⦻":"⦻","‾":"‾","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","⊖":"⊖","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","⊕":"⊕","∨":"∨","↻":"↻","⩝":"⩝","ℴ":"ℴ","ℴ":"ℴ","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ℴ":"ℴ","ø":"ø","ø":"ø","⊘":"⊘","õ":"õ","õ":"õ","⊗":"⊗","⨶":"⨶","ö":"ö","ö":"ö","⌽":"⌽","∥":"∥","¶":"¶","¶":"¶","∥":"∥","⫳":"⫳","⫽":"⫽","∂":"∂","п":"п","%":"%",".":".","‰":"‰","⊥":"⊥","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","ℳ":"ℳ","☎":"☎","π":"π","⋔":"⋔","ϖ":"ϖ","ℏ":"ℏ","ℎ":"ℎ","ℏ":"ℏ","+":"+","⨣":"⨣","⊞":"⊞","⨢":"⨢","∔":"∔","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"⨕","𝕡":"𝕡","£":"£","£":"£","≺":"≺","⪳":"⪳","⪷":"⪷","≼":"≼","⪯":"⪯","≺":"≺","⪷":"⪷","≼":"≼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"⋨","≾":"≾","′":"′","ℙ":"ℙ","⪵":"⪵","⪹":"⪹","⋨":"⋨","∏":"∏","⌮":"⌮","⌒":"⌒","⌓":"⌓","∝":"∝","∝":"∝","≾":"≾","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","⨌":"⨌","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","ℍ":"ℍ","⨖":"⨖","?":"?","≟":"≟",""":'"',""":'"',"⇛":"⇛","⇒":"⇒","⤜":"⤜","⤏":"⤏","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","√":"√","⦳":"⦳","⟩":"⟩","⦒":"⦒","⦥":"⦥","⟩":"⟩","»":"»","»":"»","→":"→","⥵":"⥵","⇥":"⇥","⤠":"⤠","⤳":"⤳","⤞":"⤞","↪":"↪","↬":"↬","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","ℚ":"ℚ","⤍":"⤍","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","⌉":"⌉","}":"}","р":"р","⤷":"⤷","⥩":"⥩","”":"”","”":"”","↳":"↳","ℜ":"ℜ","ℛ":"ℛ","ℜ":"ℜ","ℝ":"ℝ","▭":"▭","®":"®","®":"®","⥽":"⥽","⌋":"⌋","𝔯":"𝔯","⇁":"⇁","⇀":"⇀","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","→":"→","↣":"↣","⇁":"⇁","⇀":"⇀","⇄":"⇄","⇌":"⇌","⇉":"⇉","↝":"↝","⋌":"⋌","˚":"˚","≓":"≓","⇄":"⇄","⇌":"⇌","‏":"‏","⎱":"⎱","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⟧":"⟧","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","⇉":"⇉","›":"›","𝓇":"𝓇","↱":"↱","]":"]","’":"’","’":"’","⋌":"⋌","⋊":"⋊","▹":"▹","⊵":"⊵","▸":"▸","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","‚":"‚","≻":"≻","⪴":"⪴","⪸":"⪸","š":"š","≽":"≽","⪰":"⪰","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","≿":"≿","с":"с","⋅":"⋅","⊡":"⊡","⩦":"⩦","⇘":"⇘","⤥":"⤥","↘":"↘","↘":"↘","§":"§","§":"§",";":";","⤩":"⤩","∖":"∖","∖":"∖","✶":"✶","𝔰":"𝔰","⌢":"⌢","♯":"♯","щ":"щ","ш":"ш","∣":"∣","∥":"∥","­":"­","­":"­","σ":"σ","ς":"ς","ς":"ς","∼":"∼","⩪":"⩪","≃":"≃","≃":"≃","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","←":"←","∖":"∖","⨳":"⨳","⧤":"⧤","∣":"∣","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","♠":"♠","∥":"∥","⊓":"⊓","⊓︀":"⊓︀","⊔":"⊔","⊔︀":"⊔︀","⊏":"⊏","⊑":"⊑","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊐":"⊐","⊒":"⊒","□":"□","□":"□","▪":"▪","▪":"▪","→":"→","𝓈":"𝓈","∖":"∖","⌣":"⌣","⋆":"⋆","☆":"☆","★":"★","ϵ":"ϵ","ϕ":"ϕ","¯":"¯","⊂":"⊂","⫅":"⫅","⪽":"⪽","⊆":"⊆","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⊂":"⊂","⊆":"⊆","⫅":"⫅","⊊":"⊊","⫋":"⫋","⫇":"⫇","⫕":"⫕","⫓":"⫓","≻":"≻","⪸":"⪸","≽":"≽","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"⋩","≿":"≿","∑":"∑","♪":"♪","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"⊃","⫆":"⫆","⪾":"⪾","⫘":"⫘","⊇":"⊇","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⊃":"⊃","⊇":"⊇","⫆":"⫆","⊋":"⊋","⫌":"⫌","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤦":"⤦","↙":"↙","↙":"↙","⤪":"⤪","ß":"ß","ß":"ß","⌖":"⌖","τ":"τ","⎴":"⎴","ť":"ť","ţ":"ţ","т":"т","⃛":"⃛","⌕":"⌕","𝔱":"𝔱","∴":"∴","∴":"∴","θ":"θ","ϑ":"ϑ","ϑ":"ϑ","≈":"≈","∼":"∼"," ":" ","≈":"≈","∼":"∼","þ":"þ","þ":"þ","˜":"˜","×":"×","×":"×","⊠":"⊠","⨱":"⨱","⨰":"⨰","∭":"∭","⤨":"⤨","⊤":"⊤","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","⤩":"⤩","‴":"‴","™":"™","▵":"▵","▿":"▿","◃":"◃","⊴":"⊴","≜":"≜","▹":"▹","⊵":"⊵","◬":"◬","≜":"≜","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","≬":"≬","↞":"↞","↠":"↠","⇑":"⇑","⥣":"⥣","ú":"ú","ú":"ú","↑":"↑","ў":"ў","ŭ":"ŭ","û":"û","û":"û","у":"у","⇅":"⇅","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"𝔲","ù":"ù","ù":"ù","↿":"↿","↾":"↾","▀":"▀","⌜":"⌜","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","¨":"¨","¨":"¨","ų":"ų","𝕦":"𝕦","↑":"↑","↕":"↕","↿":"↿","↾":"↾","⊎":"⊎","υ":"υ","ϒ":"ϒ","υ":"υ","⇈":"⇈","⌝":"⌝","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","▵":"▵","▴":"▴","⇈":"⇈","ü":"ü","ü":"ü","⦧":"⦧","⇕":"⇕","⫨":"⫨","⫩":"⫩","⊨":"⊨","⦜":"⦜","ϵ":"ϵ","ϰ":"ϰ","∅":"∅","ϕ":"ϕ","ϖ":"ϖ","∝":"∝","↕":"↕","ϱ":"ϱ","ς":"ς","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","ϑ":"ϑ","⊲":"⊲","⊳":"⊳","в":"в","⊢":"⊢","∨":"∨","⊻":"⊻","≚":"≚","⋮":"⋮","|":"|","|":"|","𝔳":"𝔳","⊲":"⊲","⊂⃒":"⊂⃒","⊃⃒":"⊃⃒","𝕧":"𝕧","∝":"∝","⊳":"⊳","𝓋":"𝓋","⫋︀":"⫋︀","⊊︀":"⊊︀","⫌︀":"⫌︀","⊋︀":"⊋︀","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","∧":"∧","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","℘":"℘","≀":"≀","≀":"≀","𝓌":"𝓌","⋂":"⋂","◯":"◯","⋃":"⋃","▽":"▽","𝔵":"𝔵","⟺":"⟺","⟷":"⟷","ξ":"ξ","⟸":"⟸","⟵":"⟵","⟼":"⟼","⋻":"⋻","⨀":"⨀","𝕩":"𝕩","⨁":"⨁","⨂":"⨂","⟹":"⟹","⟶":"⟶","𝓍":"𝓍","⨆":"⨆","⨄":"⨄","△":"△","⋁":"⋁","⋀":"⋀","ý":"ý","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"ℨ","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"‍","‌":"‌"},characters:{"Æ":"Æ","&":"&","Á":"Á","Ă":"Ă","Â":"Â","А":"А","𝔄":"𝔄","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"⁡","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","≎":"≎","Ч":"Ч","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","⇓":"⇓","⇐":"⇐","⇔":"⇔","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","É":"É","Ě":"Ě","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","Ѓ":"Ѓ",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","Ħ":"Ħ","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ī":"Ī","ⅈ":"ⅈ","∬":"∬","∫":"∫","⋂":"⋂","⁣":"⁣","⁢":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","𝕃":"𝕃","↙":"↙","↘":"↘","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"​","\n":" ","𝔑":"𝔑","⁠":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Õ":"Õ","⨷":"⨷","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",'"':""","𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","\t":" ","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ū":"Ū",_:"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","а":"а","æ":"æ","𝔞":"𝔞","à":"à","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","⍼":"⍼","ą":"ą","𝕒":"𝕒","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","å":"å","𝒶":"𝒶","*":"*","ã":"ã","ä":"ä","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⎶":"⎶","б":"б","„":"„","⦰":"⦰","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","◯":"◯","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⤍":"⤍","⧫":"⧫","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","¦":"¦","𝒷":"𝒷","⁏":"⁏","\\":"\","⧅":"⧅","⟈":"⟈","•":"•","⪮":"⪮","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","⩍":"⩍","č":"č","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","⦲":"⦲","¢":"¢","𝔠":"𝔠","ч":"ч","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣",":":":",",":",","@":"@","∁":"∁","⩭":"⩭","𝕔":"𝕔","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋎":"⋎","⋏":"⋏","¤":"¤","∱":"∱","⌭":"⌭","⥥":"⥥","†":"†","ℸ":"ℸ","‐":"‐","⤏":"⤏","ď":"ď","д":"д","⇊":"⇊","⩷":"⩷","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","♦":"♦","ϝ":"ϝ","⋲":"⋲","÷":"÷","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍",$:"$","𝕕":"𝕕","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","⦦":"⦦","џ":"џ","⟿":"⟿","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","≕":"≕","э":"э","ė":"ė","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ϵ":"ϵ","=":"=","≟":"≟","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","η":"η","ð":"ð","ë":"ë","€":"€","!":"!","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi",fj:"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","⅓":"⅓","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","⪌":"⪌","ǵ":"ǵ","γ":"γ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","ℷ":"ℷ","ѓ":"ѓ","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪈":"⪈","⋧":"⋧","𝕘":"𝕘","ℊ":"ℊ","⪎":"⪎","⪐":"⪐","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⥸":"⥸","≩︀":"≩︀","ъ":"ъ","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ħ":"ħ","⁃":"⁃","í":"í","î":"î","и":"и","е":"е","¡":"¡","𝔦":"𝔦","ì":"ì","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","℅":"℅","∞":"∞","⧝":"⧝","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","¿":"¿","𝒾":"𝒾","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","ĩ":"ĩ","і":"і","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⤛":"⤛","⤎":"⤎","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","λ":"λ","⦑":"⦑","⪅":"⪅","«":"«","⤟":"⤟","⤝":"⤝","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","л":"л","⤶":"⤶","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","⇇":"⇇","⋋":"⋋","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⋖":"⋖","⥼":"⥼","𝔩":"𝔩","⪑":"⪑","⥪":"⥪","▄":"▄","љ":"љ","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","≨":"≨","⪉":"⪉","⪇":"⪇","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟼":"⟼","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","◊":"◊","(":"(","⦓":"⦓","⥭":"⥭","‎":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","⪍":"⪍","⪏":"⪏","‚":"‚","ł":"ł","⪦":"⪦","⩹":"⩹","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","∺":"∺","¯":"¯","♂":"♂","✠":"✠","▮":"▮","⨩":"⨩","м":"м","—":"—","𝔪":"𝔪","℧":"℧","µ":"µ","⫰":"⫰","−":"−","⨪":"⨪","⫛":"⫛","⊧":"⊧","𝕞":"𝕞","𝓂":"𝓂","μ":"μ","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","⇏":"⇏","⊯":"⊯","⊮":"⊮","ń":"ń","∠⃒":"∠⃒","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","♮":"♮","⩃":"⩃","ň":"ň","ņ":"ņ","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","⇗":"⇗","⤤":"⤤","≐̸":"≐̸","⤨":"⤨","𝔫":"𝔫","↮":"↮","⫲":"⫲","⋼":"⋼","⋺":"⋺","њ":"њ","≦̸":"≦̸","↚":"↚","‥":"‥","𝕟":"𝕟","¬":"¬","⋹̸":"⋹̸","⋵̸":"⋵̸","⋷":"⋷","⋶":"⋶","⋾":"⋾","⋽":"⋽","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","𝓃":"𝓃","⊄":"⊄","⫅̸":"⫅̸","⊅":"⊅","⫆̸":"⫆̸","ñ":"ñ","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","⤧":"⤧","ó":"ó","ô":"ô","о":"о","ő":"ő","⨸":"⨸","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","⧁":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","∨":"∨","⩝":"⩝","ℴ":"ℴ","ª":"ª","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ø":"ø","⊘":"⊘","õ":"õ","⨶":"⨶","ö":"ö","⌽":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽","п":"п","%":"%",".":".","‰":"‰","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","☎":"☎","π":"π","ϖ":"ϖ","ℎ":"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","⨕":"⨕","𝕡":"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","⋨":"⋨","′":"′","⌮":"⌮","⌒":"⌒","⌓":"⌓","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","⨖":"⨖","?":"?","⤜":"⤜","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","⦳":"⦳","⦒":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","⤞":"⤞","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","р":"р","⤷":"⤷","⥩":"⥩","↳":"↳","▭":"▭","⥽":"⥽","𝔯":"𝔯","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","⇉":"⇉","⋌":"⋌","˚":"˚","‏":"‏","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","›":"›","𝓇":"𝓇","⋊":"⋊","▹":"▹","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","⪴":"⪴","⪸":"⪸","š":"š","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","с":"с","⋅":"⋅","⩦":"⩦","⇘":"⇘","§":"§",";":";","⤩":"⤩","✶":"✶","𝔰":"𝔰","♯":"♯","щ":"щ","ш":"ш","­":"­","σ":"σ","ς":"ς","⩪":"⩪","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","⊓︀":"⊓︀","⊔︀":"⊔︀","𝓈":"𝓈","☆":"☆","⊂":"⊂","⫅":"⫅","⪽":"⪽","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⫇":"⫇","⫕":"⫕","⫓":"⫓","♪":"♪","¹":"¹","²":"²","³":"³","⫆":"⫆","⪾":"⪾","⫘":"⫘","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤪":"⤪","ß":"ß","⌖":"⌖","τ":"τ","ť":"ť","ţ":"ţ","т":"т","⌕":"⌕","𝔱":"𝔱","θ":"θ","ϑ":"ϑ","þ":"þ","×":"×","⨱":"⨱","⨰":"⨰","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","‴":"‴","▵":"▵","≜":"≜","◬":"◬","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","⥣":"⥣","ú":"ú","ў":"ў","ŭ":"ŭ","û":"û","у":"у","ű":"ű","⥾":"⥾","𝔲":"𝔲","ù":"ù","▀":"▀","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","ų":"ų","𝕦":"𝕦","υ":"υ","⇈":"⇈","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","ü":"ü","⦧":"⦧","⫨":"⫨","⫩":"⫩","⦜":"⦜","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","в":"в","⊻":"⊻","≚":"≚","⋮":"⋮","𝔳":"𝔳","𝕧":"𝕧","𝓋":"𝓋","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","𝓌":"𝓌","𝔵":"𝔵","ξ":"ξ","⋻":"⋻","𝕩":"𝕩","𝓍":"𝓍","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"‍","‌":"‌"}}}; -//# sourceMappingURL=./named-references.js.map +module.exports = __nccwpck_require__(56244); /***/ }), -/***/ 45439: -/***/ ((__unused_webpack_module, exports) => { +/***/ 56244: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}; -//# sourceMappingURL=./numeric-unicode-map.js.map +var RetryOperation = __nccwpck_require__(45369); -/***/ }), +exports.operation = function(options) { + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && (options.forever || options.retries === Infinity), + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); +}; -/***/ 1454: -/***/ ((__unused_webpack_module, exports) => { +exports.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.fromCodePoint=String.fromCodePoint||function(astralCodePoint){return String.fromCharCode(Math.floor((astralCodePoint-65536)/1024)+55296,(astralCodePoint-65536)%1024+56320)};exports.getCodePoint=String.prototype.codePointAt?function(input,position){return input.codePointAt(position)}:function(input,position){return(input.charCodeAt(position)-55296)*1024+input.charCodeAt(position+1)-56320+65536};exports.highSurrogateFrom=55296;exports.highSurrogateTo=56319; -//# sourceMappingURL=./surrogate-pairs.js.map + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1000, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } -/***/ }), + if (opts.minTimeout > opts.maxTimeout) { + throw new Error('minTimeout is greater than maxTimeout'); + } -/***/ 77492: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(this.createTimeout(i, opts)); + } -"use strict"; + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i, opts)); + } -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const net_1 = __importDefault(__nccwpck_require__(41808)); -const tls_1 = __importDefault(__nccwpck_require__(24404)); -const url_1 = __importDefault(__nccwpck_require__(57310)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const once_1 = __importDefault(__nccwpck_require__(81040)); -const agent_base_1 = __nccwpck_require__(97635); -const debug = (0, debug_1.default)('http-proxy-agent'); -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public - */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('Creating new HttpProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - const parsed = url_1.default.parse(req.path); - if (!parsed.protocol) { - parsed.protocol = 'http:'; - } - if (!parsed.hostname) { - parsed.hostname = opts.hostname || opts.host || null; - } - if (parsed.port == null && typeof opts.port) { - parsed.port = String(opts.port); - } - if (parsed.port === '80') { - // if port is 80, then we can remove the port so that the - // ":80" portion is not on the produced URL - parsed.port = ''; - } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = url_1.default.format(parsed); - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); - } - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - if (req._header) { - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._header = null; - req._implicitHeader(); - if (req.output && req.output.length > 0) { - // Node < 12 - debug('Patching connection write() output buffer with updated header'); - first = req.output[0]; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.output[0] = req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.output); - } - else if (req.outputData && req.outputData.length > 0) { - // Node >= 12 - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - yield (0, once_1.default)(socket, 'connect'); - return socket; - }); - } -} -exports["default"] = HttpProxyAgent; -//# sourceMappingURL=agent.js.map + // sort the array numerically ascending + timeouts.sort(function(a,b) { + return a - b; + }); -/***/ }), + return timeouts; +}; -/***/ 23764: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { +exports.createTimeout = function(attempt, opts) { + var random = (opts.randomize) + ? (Math.random() + 1) + : 1; -"use strict"; + var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; + return timeout; }; -const agent_1 = __importDefault(__nccwpck_require__(77492)); -function createHttpProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpProxyAgent) { - createHttpProxyAgent.HttpProxyAgent = agent_1.default; - createHttpProxyAgent.prototype = agent_1.default.prototype; -})(createHttpProxyAgent || (createHttpProxyAgent = {})); -module.exports = createHttpProxyAgent; -//# sourceMappingURL=index.js.map -/***/ }), +exports.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } -/***/ 97635: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === 'function') { + methods.push(key); + } + } + } -"use strict"; + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + var original = obj[method]; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = __nccwpck_require__(82361); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const promisify_1 = __importDefault(__nccwpck_require__(79965)); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); -} -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } - else if (callback) { - opts = callback; - } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - set defaultPort(v) { - this.explicitDefaultPort = v; - } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - set protocol(v) { - this.explicitProtocol = v; - } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); - } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); - } - } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); + obj[method] = function retryWrapper(original) { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments, 1); + var callback = args.pop(); + + args.push(function(err) { + if (op.retry(err)) { + return; } - destroy() { - debug('Destroying agent %o', this.constructor.name); + if (err) { + arguments[0] = op.mainError(); } - } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map + callback.apply(this, arguments); + }); + + op.attempt(function() { + original.apply(obj, args); + }); + }.bind(obj, original); + obj[method].options = options; + } +}; + /***/ }), -/***/ 79965: -/***/ ((__unused_webpack_module, exports) => { +/***/ 45369: +/***/ ((module) => { -"use strict"; +function RetryOperation(timeouts, options) { + // Compatibility for the old (timeouts, retryForever) signature + if (typeof options === 'boolean') { + options = { forever: options }; + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -function promisify(fn) { - return function (req, opts) { - return new Promise((resolve, reject) => { - fn.call(this, req, opts, (err, rtn) => { - if (err) { - reject(err); - } - else { - resolve(rtn); - } - }); - }); - }; + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + this._timer = null; + + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } } -exports["default"] = promisify; -//# sourceMappingURL=promisify.js.map +module.exports = RetryOperation; -/***/ }), +RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts.slice(0); +} -/***/ 77219: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (this._timer) { + clearTimeout(this._timer); + } -"use strict"; + this._timeouts = []; + this._cachedTimeouts = null; +}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; +RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + + if (!err) { + return false; + } + var currentTime = new Date().getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.push(err); + this._errors.unshift(new Error('RetryOperation timeout occurred')); + return false; + } + + this._errors.push(err); + + var timeout = this._timeouts.shift(); + if (timeout === undefined) { + if (this._cachedTimeouts) { + // retry forever, only keep last error + this._errors.splice(0, this._errors.length - 1); + timeout = this._cachedTimeouts.slice(-1); + } else { + return false; } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; + } + + var self = this; + this._timer = setTimeout(function() { + self._attempts++; + + if (self._operationTimeoutCb) { + self._timeout = setTimeout(function() { + self._operationTimeoutCb(self._attempts); + }, self._operationTimeout); + + if (self._options.unref) { + self._timeout.unref(); + } + } + + self._fn(self._attempts); + }, timeout); + + if (this._options.unref) { + this._timer.unref(); + } + + return true; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpsProxyAgent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const tls = __importStar(__nccwpck_require__(24404)); -const assert_1 = __importDefault(__nccwpck_require__(39491)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const agent_base_1 = __nccwpck_require__(70694); -const url_1 = __nccwpck_require__(57310); -const parse_proxy_response_1 = __nccwpck_require__(595); -const debug = (0, debug_1.default)('https-proxy-agent'); -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.options = { path: undefined }; - this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - // Attempt to negotiate http/1.1 for proxy servers that support http/2 - ALPNProtocols: ['http/1.1'], - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; + +RetryOperation.prototype.attempt = function(fn, timeoutOps) { + this._fn = fn; + + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - */ - async connect(req, opts) { - const { proxy } = this; - if (!opts.host) { - throw new TypeError('No "host" provided'); - } - // Create a socket connection to the proxy server. - let socket; - if (proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - const servername = this.connectOpts.servername || this.connectOpts.host; - socket = tls.connect({ - ...this.connectOpts, - servername: servername && net.isIP(servername) ? undefined : servername, - }); - } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); - } - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; - let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; - } - headers.Host = `${host}:${opts.port}`; - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; - } - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); - socket.write(`${payload}\r\n`); - const { connect, buffered } = await proxyResponsePromise; - req.emit('proxyConnect', connect); - this.emit('proxyConnect', connect, req); - if (connect.statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls.connect({ - ...omit(opts, 'host', 'path', 'port'), - socket, - servername: net.isIP(servername) ? undefined : servername, - }); - } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('Replaying proxy buffer for failed request'); - (0, assert_1.default)(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - return fakeSocket; + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; + } + } + + var self = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self._operationTimeoutCb(); + }, self._operationTimeout); + } + + this._operationStart = new Date().getTime(); + + this._fn(this._attempts); +}; + +RetryOperation.prototype.try = function(fn) { + console.log('Using RetryOperation.try() is deprecated'); + this.attempt(fn); +}; + +RetryOperation.prototype.start = function(fn) { + console.log('Using RetryOperation.start() is deprecated'); + this.attempt(fn); +}; + +RetryOperation.prototype.start = RetryOperation.prototype.try; + +RetryOperation.prototype.errors = function() { + return this._errors; +}; + +RetryOperation.prototype.attempts = function() { + return this._attempts; +}; + +RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message = error.message; + var count = (counts[message] || 0) + 1; + + counts[message] = count; + + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; } + } + + return mainError; +}; + + +/***/ }), + +/***/ 21867: +/***/ ((module, exports, __nccwpck_require__) => { + +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ +/* eslint-disable node/no-deprecated-api */ +var buffer = __nccwpck_require__(14300) +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } } -HttpsProxyAgent.protocols = ['http', 'https']; -exports.HttpsProxyAgent = HttpsProxyAgent; -function resume(socket) { - socket.resume(); +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer } -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) } -//# sourceMappingURL=index.js.map -/***/ }), +SafeBuffer.prototype = Object.create(Buffer.prototype) -/***/ 595: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) -"use strict"; +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseProxyResponse = void 0; -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('readable', read); - } - function onend() { - cleanup(); - debug('onend'); - reject(new Error('Proxy connection ended before receiving CONNECT response')); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const headerParts = buffered - .slice(0, endOfHeaders) - .toString('ascii') - .split('\r\n'); - const firstLine = headerParts.shift(); - if (!firstLine) { - socket.destroy(); - return reject(new Error('No header received from proxy CONNECT response')); - } - const firstLineParts = firstLine.split(' '); - const statusCode = +firstLineParts[1]; - const statusText = firstLineParts.slice(2).join(' '); - const headers = {}; - for (const header of headerParts) { - if (!header) - continue; - const firstColon = header.indexOf(':'); - if (firstColon === -1) { - socket.destroy(); - return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); - } - const key = header.slice(0, firstColon).toLowerCase(); - const value = header.slice(firstColon + 1).trimStart(); - const current = headers[key]; - if (typeof current === 'string') { - headers[key] = [current, value]; - } - else if (Array.isArray(current)) { - current.push(value); - } - else { - headers[key] = value; - } - } - debug('got proxy server response: %o %o', firstLine, headers); - cleanup(); - resolve({ - connect: { - statusCode, - statusText, - headers, - }, - buffered, - }); - } - socket.on('error', onerror); - socket.on('end', onend); - read(); - }); +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) } -exports.parseProxyResponse = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map + /***/ }), -/***/ 44124: +/***/ 91532: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -try { - var util = __nccwpck_require__(73837); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __nccwpck_require__(8544); -} +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } + constructor (comp, options) { + options = parseOptions(options) -/***/ }), + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } -/***/ 8544: -/***/ ((module) => { + comp = comp.trim().split(/\s+/).join(' ') + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version } + + debug('comp', this) } -} + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) -/***/ }), + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } -/***/ 41554: -/***/ ((module) => { + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } -"use strict"; + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + toString () { + return this.value + } -const isStream = stream => - stream !== null && - typeof stream === 'object' && - typeof stream.pipe === 'function'; + test (version) { + debug('Comparator.test', version, this.options.loose) -isStream.writable = stream => - isStream(stream) && - stream.writable !== false && - typeof stream._write === 'function' && - typeof stream._writableState === 'object'; + if (this.semver === ANY || version === ANY) { + return true + } -isStream.readable = stream => - isStream(stream) && - stream.readable !== false && - typeof stream._read === 'function' && - typeof stream._readableState === 'object'; + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } -isStream.duplex = stream => - isStream.writable(stream) && - isStream.readable(stream); + return cmp(version, this.operator, this.semver, this.options) + } -isStream.transform = stream => - isStream.duplex(stream) && - typeof stream._transform === 'function'; + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } -module.exports = isStream; + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + options = parseOptions(options) -/***/ }), + // Special cases where nothing can possibly be lower + if (options.includePrerelease && + (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { + return false + } + if (!options.includePrerelease && + (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { + return false + } -/***/ 55031: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Same direction increasing (> or >=) + if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { + return true + } + // Same direction decreasing (< or <=) + if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { + return true + } + // same SemVer and both sides are inclusive (<= or >=) + if ( + (this.semver.version === comp.semver.version) && + this.operator.includes('=') && comp.operator.includes('=')) { + return true + } + // opposite directions less than + if (cmp(this.semver, '<', comp.semver, options) && + this.operator.startsWith('>') && comp.operator.startsWith('<')) { + return true + } + // opposite directions greater than + if (cmp(this.semver, '>', comp.semver, options) && + this.operator.startsWith('<') && comp.operator.startsWith('>')) { + return true + } + return false + } +} -var json_stringify = (__nccwpck_require__(78574).stringify); -var json_parse = __nccwpck_require__(89099); +module.exports = Comparator -module.exports = function(options) { - return { - parse: json_parse(options), - stringify: json_stringify - } -}; -//create the default method members with no options applied for backwards compatibility -module.exports.parse = json_parse(); -module.exports.stringify = json_stringify; +const parseOptions = __nccwpck_require__(40785) +const { safeRe: re, t } = __nccwpck_require__(9523) +const cmp = __nccwpck_require__(75098) +const debug = __nccwpck_require__(50427) +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) /***/ }), -/***/ 89099: +/***/ 9828: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var BigNumber = null; +const SPACE_CHARACTERS = /\s+/g -// regexpxs extracted from -// (c) BSD-3-Clause -// https://github.com/fastify/secure-json-parse/graphs/contributors and https://github.com/hapijs/bourne/graphs/contributors +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) -const suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/; -const suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/; + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } -/* - json_parse.js - 2012-06-20 + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.formatted = undefined + return this + } - Public Domain. + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. + this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') - This file creates a json_parse function. - During create you can (optionally) specify some behavioural switches + // First, split on || + this.set = this.raw + .split('||') + // map the range to a 2d array of comparators + .map(r => this.parseRange(r.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) - require('json-bigint')(options) + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`) + } - The optional options parameter holds switches that drive certain - aspects of the parsing process: - * options.strict = true will warn about duplicate-key usage in the json. - The default (strict = false) will silently ignore those and overwrite - values for keys that are in duplicate use. + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) { + this.set = [first] + } else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } - The resulting function follows this signature: - json_parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. + this.formatted = undefined + } - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. + get range () { + if (this.formatted === undefined) { + this.formatted = '' + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += '||' + } + const comps = this.set[i] + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += ' ' + } + this.formatted += comps[k].toString().trim() + } + } + } + return this.formatted + } - Example: + format () { + return this.range + } - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. + toString () { + return this.range + } - myData = json_parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); + parseRange (range) { + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = + (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | + (this.options.loose && FLAG_LOOSE) + const memoKey = memoOpts + ':' + range + const cached = cache.get(memoKey) + if (cached) { + return cached + } - This is a reference implementation. You are free to copy, modify, or - redistribute. + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range) - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. -*/ + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + debug('tilde trim', range) -/*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode, - hasOwnProperty, message, n, name, prototype, push, r, t, text -*/ + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + debug('caret trim', range) -var json_parse = function (options) { - 'use strict'; + // At this point, the range is completely trimmed and + // ready to be split into comparators. - // This is a function that can parse a JSON text, producing a JavaScript - // data structure. It is a simple, recursive descent parser. It does not use - // eval or regular expressions, so it can be used as a model for implementing - // a JSON parser in other languages. + let rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) - // We are defining the function inside of another function to avoid creating - // global variables. + if (loose) { + // in loose mode, throw out any that are not valid comparators + rangeList = rangeList.filter(comp => { + debug('loose invalid filter', comp, this.options) + return !!comp.match(re[t.COMPARATORLOOSE]) + }) + } + debug('range list', rangeList) - // Default options one can override by passing options to the parse() - var _options = { - strict: false, // not being strict means do not generate syntax errors for "duplicate key" - storeAsString: false, // toggles whether the values should be stored as BigNumber (default) or a string - alwaysParseAsBig: false, // toggles whether all numbers should be Big - useNativeBigInt: false, // toggles whether to use native BigInt instead of bignumber.js - protoAction: 'error', - constructorAction: 'error', - }; + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const rangeMap = new Map() + const comparators = rangeList.map(comp => new Comparator(comp, this.options)) + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp] + } + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) { + rangeMap.delete('') + } - // If there are options, then use them to override the default _options - if (options !== undefined && options !== null) { - if (options.strict === true) { - _options.strict = true; + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') } - if (options.storeAsString === true) { - _options.storeAsString = true; + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false } - _options.alwaysParseAsBig = - options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false; - _options.useNativeBigInt = - options.useNativeBigInt === true ? options.useNativeBigInt : false; - if (typeof options.constructorAction !== 'undefined') { - if ( - options.constructorAction === 'error' || - options.constructorAction === 'ignore' || - options.constructorAction === 'preserve' - ) { - _options.constructorAction = options.constructorAction; - } else { - throw new Error( - `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}` - ); + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true } } + return false + } +} + +module.exports = Range + +const LRU = __nccwpck_require__(15339) +const cache = new LRU() + +const parseOptions = __nccwpck_require__(40785) +const Comparator = __nccwpck_require__(91532) +const debug = __nccwpck_require__(50427) +const SemVer = __nccwpck_require__(48088) +const { + safeRe: re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace, +} = __nccwpck_require__(9523) +const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(42293) + +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} - if (typeof options.protoAction !== 'undefined') { - if ( - options.protoAction === 'error' || - options.protoAction === 'ignore' || - options.protoAction === 'preserve' - ) { - _options.protoAction = options.protoAction; - } else { - throw new Error( - `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}` - ); - } - } - } +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - var at, // The index of the current character - ch, // The current character - escapee = { - '"': '"', - '\\': '\\', - '/': '/', - b: '\b', - f: '\f', - n: '\n', - r: '\r', - t: '\t', - }, - text, - error = function (m) { - // Call error when something is wrong. +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +// ~0.0.1 --> >=0.0.1 <0.1.0-0 +const replaceTildes = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceTilde(c, options)) + .join(' ') +} - throw { - name: 'SyntaxError', - message: m, - at: at, - text: text, - }; - }, - next = function (c) { - // If a c parameter is provided, verify that it matches the current character. +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret - if (c && c !== ch) { - error("Expected '" + c + "' instead of '" + ch + "'"); - } + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } - // Get the next character. When there are no more characters, - // return the empty string. + debug('tilde return', ret) + return ret + }) +} - ch = text.charAt(at); - at += 1; - return ch; - }, - number = function () { - // Parse a number value. +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +// ^0.0.1 --> >=0.0.1 <0.0.2-0 +// ^0.1.0 --> >=0.1.0 <0.2.0-0 +const replaceCarets = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceCaret(c, options)) + .join(' ') +} - var number, - string = ''; +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret - if (ch === '-') { - string = '-'; - next('-'); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` } - } - number = +string; - if (!isFinite(number)) { - error('Bad number'); } else { - if (BigNumber == null) BigNumber = __nccwpck_require__(87558); - //if (number > 9007199254740992 || number < -9007199254740992) - // Bignumber has stricter check: everything with length > 15 digits disallowed - if (string.length > 15) - return _options.storeAsString - ? string - : _options.useNativeBigInt - ? BigInt(string) - : new BigNumber(string); - else - return !_options.alwaysParseAsBig - ? number - : _options.useNativeBigInt - ? BigInt(number) - : new BigNumber(number); + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` } - }, - string = function () { - // Parse a string value. + } - var hex, - i, - string = '', - uffff; + debug('caret return', ret) + return ret + }) +} - // When parsing for string values, we must look for " and \ characters. +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp + .split(/\s+/) + .map((c) => replaceXRange(c, options)) + .join(' ') +} - if (ch === '"') { - var startAt = at; - while (next()) { - if (ch === '"') { - if (at - 1 > startAt) string += text.substring(startAt, at - 1); - next(); - return string; - } - if (ch === '\\') { - if (at - 1 > startAt) string += text.substring(startAt, at - 1); - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - startAt = at; - } - } - } - error('Bad string'); - }, - white = function () { - // Skip whitespace. +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp - while (ch && ch <= ' ') { - next(); - } - }, - word = function () { - // true, false, or null. + if (gtlt === '=' && anyX) { + gtlt = '' + } - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - } - error("Unexpected '" + ch + "'"); - }, - value, // Place holder for the value function. - array = function () { - // Parse an array value. + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' - var array = []; + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 - if (ch === '[') { - next('['); - white(); - if (ch === ']') { - next(']'); - return array; // empty array + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 } - while (ch) { - array.push(value()); - white(); - if (ch === ']') { - next(']'); - return array; - } - next(','); - white(); + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 } } - error('Bad array'); - }, - object = function () { - // Parse an object value. - - var key, - object = Object.create(null); - if (ch === '{') { - next('{'); - white(); - if (ch === '}') { - next('}'); - return object; // empty object - } - while (ch) { - key = string(); - white(); - next(':'); - if ( - _options.strict === true && - Object.hasOwnProperty.call(object, key) - ) { - error('Duplicate key "' + key + '"'); - } + if (gtlt === '<') { + pr = '-0' + } - if (suspectProtoRx.test(key) === true) { - if (_options.protoAction === 'error') { - error('Object contains forbidden prototype property'); - } else if (_options.protoAction === 'ignore') { - value(); - } else { - object[key] = value(); - } - } else if (suspectConstructorRx.test(key) === true) { - if (_options.constructorAction === 'error') { - error('Object contains forbidden constructor property'); - } else if (_options.constructorAction === 'ignore') { - value(); - } else { - object[key] = value(); - } - } else { - object[key] = value(); - } + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } - white(); - if (ch === '}') { - next('}'); - return object; - } - next(','); - white(); - } - } - error('Bad object'); - }; + debug('xRange return', ret) - value = function () { - // Parse a JSON value. It could be an object, an array, a string, a number, - // or a word. + return ret + }) +} - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - return string(); - case '-': - return number(); - default: - return ch >= '0' && ch <= '9' ? number() : word(); - } - }; +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp + .trim() + .replace(re[t.STAR], '') +} - // Return the json_parse function. It will have access to all of the above - // functions and variables. +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp + .trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} - return function (source, reviver) { - var result; +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +// TODO build? +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } - text = source + ''; - at = 0; - ch = ' '; - result = value(); - white(); - if (ch) { - error('Syntax error'); - } + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } - // If there is a reviver function, we recursively walk the new structure, - // passing each name/value pair to the reviver function for possible - // transformation, starting with a temporary root object that holds the result - // in an empty key. If there is not a reviver function, we simply return the - // result. + return `${from} ${to}`.trim() +} - return typeof reviver === 'function' - ? (function walk(holder, key) { - var k, - v, - value = holder[key]; - if (value && typeof value === 'object') { - Object.keys(value).forEach(function (k) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - }); - } - return reviver.call(holder, key, value); - })({ '': result }, '') - : result; - }; -}; +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } -module.exports = json_parse; + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } -/***/ }), + // Version has a -pre, but it's not one of the ones we like. + return false + } -/***/ 78574: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return true +} -var BigNumber = __nccwpck_require__(87558); -/* - json2.js - 2013-05-26 +/***/ }), - Public Domain. +/***/ 48088: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. +const debug = __nccwpck_require__(50427) +const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(42293) +const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(9523) - See http://www.JSON.org/js.html +const parseOptions = __nccwpck_require__(40785) +const { compareIdentifiers } = __nccwpck_require__(92463) +class SemVer { + constructor (version, options) { + options = parseOptions(options) + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) + } - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - This file creates a global JSON object containing two methods: stringify - and parse. + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } - JSON.stringify(value, replacer, space) - value any JavaScript value, usually an object or array. + this.raw = version - replacer an optional parameter that determines how object - values are stringified for objects. It can be a - function or an array of strings. + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] - space an optional parameter that specifies the indentation - of nested structures. If it is omitted, the text will - be packed without extra whitespace. If it is a number, - it will specify the number of spaces to indent at each - level. If it is a string (such as '\t' or ' '), - it contains the characters used to indent at each level. + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } - This method produces a JSON text from a JavaScript value. + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } - When an object value is found, if the object contains a toJSON - method, its toJSON method will be called and the result will be - stringified. A toJSON method does not serialize: it returns the - value represented by the name/value pair that should be serialized, - or undefined if nothing should be serialized. The toJSON method - will be passed the key associated with the value, and this will be - bound to the value + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } - For example, this would serialize Dates as ISO strings. + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } - Date.prototype.toJSON = function (key) { - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } + this.build = m[5] ? m[5].split('.') : [] + this.format() + } - return this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z'; - }; + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } - You can provide an optional replacer method. It will be passed the - key and value of each member, with this bound to the containing - object. The value that is returned from your method will be - serialized. If your method returns undefined, then the member will - be excluded from the serialization. + toString () { + return this.version + } - If the replacer parameter is an array of strings, then it will be - used to select the members to be serialized. It filters the results - such that only members with keys listed in the replacer array are - stringified. + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } - Values that do not have JSON representations, such as undefined or - functions, will not be serialized. Such values in objects will be - dropped; in arrays they will be replaced with null. You can use - a replacer function to replace those with JSON values. - JSON.stringify(undefined) returns undefined. + if (other.version === this.version) { + return 0 + } - The optional space parameter produces a stringification of the - value that is filled with line breaks and indentation to make it - easier to read. + return this.compareMain(other) || this.comparePre(other) + } - If the space parameter is a non-empty string, then that string will - be used for indentation. If the space parameter is a number, then - the indentation will be that many spaces. + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } - Example: + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } - text = JSON.stringify(['e', {pluribus: 'unum'}]); - // text is '["e",{"pluribus":"unum"}]' + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } - text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); - // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } - text = JSON.stringify([new Date()], function (key, value) { - return this[key] instanceof Date ? - 'Date(' + this[key] + ')' : value; - }); - // text is '["Date(---current time---)"]' + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('build compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } - JSON.parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier, identifierBase) { + if (release.startsWith('pre')) { + if (!identifier && identifierBase === false) { + throw new Error('invalid increment argument: identifier is empty') + } + // Avoid an invalid semver results + if (identifier) { + const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`) + const match = `-${identifier}`.match(r) + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`) + } + } + } - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier, identifierBase) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier, identifierBase) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier, identifierBase) + this.inc('pre', identifier, identifierBase) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier, identifierBase) + } + this.inc('pre', identifier, identifierBase) + break + case 'release': + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`) + } + this.prerelease.length = 0 + break - Example: + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': { + const base = Number(identifierBase) ? 1 : 0 - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. + if (this.prerelease.length === 0) { + this.prerelease = [base] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + if (identifier === this.prerelease.join('.') && identifierBase === false) { + throw new Error('invalid increment argument: identifier already exists') + } + this.prerelease.push(base) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + let prerelease = [identifier, base] + if (identifierBase === false) { + prerelease = [identifier] + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease + } + } else { + this.prerelease = prerelease + } + } + break + } + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.raw = this.format() + if (this.build.length) { + this.raw += `+${this.build.join('.')}` + } + return this + } +} - myData = JSON.parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); +module.exports = SemVer - myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { - var d; - if (typeof value === 'string' && - value.slice(0, 5) === 'Date(' && - value.slice(-1) === ')') { - d = new Date(value.slice(5, -1)); - if (d) { - return d; - } - } - return value; - }); +/***/ }), - This is a reference implementation. You are free to copy, modify, or - redistribute. -*/ +/***/ 48848: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/*jslint evil: true, regexp: true */ +const parse = __nccwpck_require__(75925) +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} +module.exports = clean -/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, - call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, - lastIndex, length, parse, prototype, push, replace, slice, stringify, - test, toJSON, toString, valueOf -*/ +/***/ }), -// Create a JSON object only if one does not already exist. We create the -// methods in a closure to avoid creating global variables. +/***/ 75098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var JSON = module.exports; +const eq = __nccwpck_require__(91898) +const neq = __nccwpck_require__(6017) +const gt = __nccwpck_require__(84123) +const gte = __nccwpck_require__(15522) +const lt = __nccwpck_require__(80194) +const lte = __nccwpck_require__(77520) -(function () { - 'use strict'; +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a === b - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } + case '!==': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a !== b - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; + case '': + case '=': + case '==': + return eq(a, b, loose) + case '!=': + return neq(a, b, loose) - function quote(string) { + case '>': + return gt(a, b, loose) -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. + case '>=': + return gte(a, b, loose) - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' - ? c - : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } + case '<': + return lt(a, b, loose) + case '<=': + return lte(a, b, loose) - function str(key, holder) { + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp -// Produce a string from holder[key]. - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key], - isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value)); +/***/ }), -// If the value has a toJSON method, call it to obtain a replacement value. +/***/ 13466: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } +const SemVer = __nccwpck_require__(48088) +const parse = __nccwpck_require__(75925) +const { safeRe: re, t } = __nccwpck_require__(9523) -// If we were called with a replacer function, then call the replacer to -// obtain a replacement value. +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } + if (typeof version === 'number') { + version = String(version) + } -// What happens next depends on the value's type. + if (typeof version !== 'string') { + return null + } - switch (typeof value) { - case 'string': - if (isBigNumber) { - return value; - } else { - return quote(value); - } + options = options || {} - case 'number': + let match = null + if (!options.rtl) { + match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] + let next + while ((next = coerceRtlRegex.exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + coerceRtlRegex.lastIndex = -1 + } -// JSON numbers must be finite. Encode non-finite numbers as null. + if (match === null) { + return null + } - return isFinite(value) ? String(value) : 'null'; + const major = match[2] + const minor = match[3] || '0' + const patch = match[4] || '0' + const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' + const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' - case 'boolean': - case 'null': - case 'bigint': + return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) +} +module.exports = coerce -// If the value is a boolean or null, convert it to a string. Note: -// typeof null does not produce 'null'. The case is included here in -// the remote chance that this gets fixed someday. - return String(value); +/***/ }), -// If the type is 'object', we might be dealing with an object or an array or -// null. +/***/ 92156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - case 'object': +const SemVer = __nccwpck_require__(48088) +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} +module.exports = compareBuild -// Due to a specification blunder in ECMAScript, typeof null is 'object', -// so watch out for that case. - if (!value) { - return 'null'; - } +/***/ }), -// Make an array to hold the partial results of stringifying this object value. +/***/ 62804: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - gap += indent; - partial = []; +const compare = __nccwpck_require__(44309) +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose -// Is the value an array? - if (Object.prototype.toString.apply(value) === '[object Array]') { +/***/ }), -// The value is an array. Stringify every element. Use null as a placeholder -// for non-JSON values. +/***/ 44309: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } +const SemVer = __nccwpck_require__(48088) +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) -// Join all of the elements together, separated with commas, and wrap them in -// brackets. +module.exports = compare - v = partial.length === 0 - ? '[]' - : gap - ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' - : '[' + partial.join(',') + ']'; - gap = mind; - return v; - } -// If the replacer is an array, use it to select the members to be stringified. +/***/ }), - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - if (typeof rep[i] === 'string') { - k = rep[i]; - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { +/***/ 64297: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// Otherwise, iterate through all of the keys in the object. +const parse = __nccwpck_require__(75925) - Object.keys(value).forEach(function(k) { - var v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - }); - } +const diff = (version1, version2) => { + const v1 = parse(version1, null, true) + const v2 = parse(version2, null, true) + const comparison = v1.compare(v2) -// Join all of the member texts together, separated with commas, -// and wrap them in braces. + if (comparison === 0) { + return null + } - v = partial.length === 0 - ? '{}' - : gap - ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' - : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } + const v1Higher = comparison > 0 + const highVersion = v1Higher ? v1 : v2 + const lowVersion = v1Higher ? v2 : v1 + const highHasPre = !!highVersion.prerelease.length + const lowHasPre = !!lowVersion.prerelease.length -// If the JSON object does not yet have a stringify method, give it one. + if (lowHasPre && !highHasPre) { + // Going from prerelease -> no prerelease requires some special casing - if (typeof JSON.stringify !== 'function') { - JSON.stringify = function (value, replacer, space) { + // If the low version has only a major, then it will always be a major + // Some examples: + // 1.0.0-1 -> 1.0.0 + // 1.0.0-1 -> 1.1.1 + // 1.0.0-1 -> 2.0.0 + if (!lowVersion.patch && !lowVersion.minor) { + return 'major' + } -// The stringify method takes a value and an optional replacer, and an optional -// space parameter, and returns a JSON text. The replacer can be a function -// that can replace values, or an array of strings that will select the keys. -// A default replacer method can be provided. Use of the space parameter can -// produce text that is more easily readable. + // If the main part has no difference + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return 'minor' + } + return 'patch' + } + } - var i; - gap = ''; - indent = ''; + // add the `pre` prefix if we are going to a prerelease version + const prefix = highHasPre ? 'pre' : '' -// If the space parameter is a number, make an indent string containing that -// many spaces. + if (v1.major !== v2.major) { + return prefix + 'major' + } - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } + if (v1.minor !== v2.minor) { + return prefix + 'minor' + } -// If the space parameter is a string, it will be used as the indent string. + if (v1.patch !== v2.patch) { + return prefix + 'patch' + } - } else if (typeof space === 'string') { - indent = space; - } + // high and low are preleases + return 'prerelease' +} -// If there is a replacer, it must be a function or an array. -// Otherwise, throw an error. +module.exports = diff - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } -// Make a fake root object containing our value under the key of ''. -// Return the result of stringifying the value. +/***/ }), - return str('', {'': value}); - }; - } -}()); +/***/ 91898: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq /***/ }), -/***/ 96010: +/***/ 84123: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var bufferEqual = __nccwpck_require__(9239); -var Buffer = (__nccwpck_require__(21867).Buffer); -var crypto = __nccwpck_require__(6113); -var formatEcdsa = __nccwpck_require__(11728); -var util = __nccwpck_require__(73837); +const compare = __nccwpck_require__(44309) +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt -var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' -var MSG_INVALID_SECRET = 'secret must be a string or buffer'; -var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; -var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; -var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; -if (supportsKeyObjects) { - MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; - MSG_INVALID_SECRET += 'or a KeyObject'; -} +/***/ }), -function checkIsPublicKey(key) { - if (Buffer.isBuffer(key)) { - return; - } +/***/ 15522: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (typeof key === 'string') { - return; - } +const compare = __nccwpck_require__(44309) +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } +/***/ }), - if (typeof key.type !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } +/***/ 30900: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (typeof key.asymmetricKeyType !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } +const SemVer = __nccwpck_require__(48088) - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_VERIFIER_KEY); +const inc = (version, release, options, identifier, identifierBase) => { + if (typeof (options) === 'string') { + identifierBase = identifier + identifier = options + options = undefined } -}; -function checkIsPrivateKey(key) { - if (Buffer.isBuffer(key)) { - return; + try { + return new SemVer( + version instanceof SemVer ? version.version : version, + options + ).inc(release, identifier, identifierBase).version + } catch (er) { + return null } +} +module.exports = inc - if (typeof key === 'string') { - return; - } - if (typeof key === 'object') { - return; - } +/***/ }), - throw typeError(MSG_INVALID_SIGNER_KEY); -}; +/***/ 80194: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function checkIsSecretKey(key) { - if (Buffer.isBuffer(key)) { - return; - } +const compare = __nccwpck_require__(44309) +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt - if (typeof key === 'string') { - return key; - } - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_SECRET); - } +/***/ }), - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_SECRET); - } +/***/ 77520: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (key.type !== 'secret') { - throw typeError(MSG_INVALID_SECRET); - } +const compare = __nccwpck_require__(44309) +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_SECRET); - } -} -function fromBase64(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} +/***/ }), -function toBase64(base64url) { - base64url = base64url.toString(); +/***/ 76688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - var padding = 4 - base64url.length % 4; - if (padding !== 4) { - for (var i = 0; i < padding; ++i) { - base64url += '='; - } - } +const SemVer = __nccwpck_require__(48088) +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major - return base64url - .replace(/\-/g, '+') - .replace(/_/g, '/'); -} -function typeError(template) { - var args = [].slice.call(arguments, 1); - var errMsg = util.format.bind(util, template).apply(null, args); - return new TypeError(errMsg); -} +/***/ }), -function bufferOrString(obj) { - return Buffer.isBuffer(obj) || typeof obj === 'string'; -} +/***/ 38447: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function normalizeInput(thing) { - if (!bufferOrString(thing)) - thing = JSON.stringify(thing); - return thing; -} +const SemVer = __nccwpck_require__(48088) +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor -function createHmacSigner(bits) { - return function sign(thing, secret) { - checkIsSecretKey(secret); - thing = normalizeInput(thing); - var hmac = crypto.createHmac('sha' + bits, secret); - var sig = (hmac.update(thing), hmac.digest('base64')) - return fromBase64(sig); - } -} -function createHmacVerifier(bits) { - return function verify(thing, signature, secret) { - var computedSig = createHmacSigner(bits)(thing, secret); - return bufferEqual(Buffer.from(signature), Buffer.from(computedSig)); - } -} +/***/ }), -function createKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - // Even though we are specifying "RSA" here, this works with ECDSA - // keys as well. - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); - return fromBase64(sig); - } -} +/***/ 6017: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function createKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify(publicKey, signature, 'base64'); - } -} +const compare = __nccwpck_require__(44309) +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq -function createPSSKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign({ - key: privateKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, 'base64')); - return fromBase64(sig); - } -} -function createPSSKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify({ - key: publicKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, signature, 'base64'); - } -} +/***/ }), -function createECDSASigner(bits) { - var inner = createKeySigner(bits); - return function sign() { - var signature = inner.apply(null, arguments); - signature = formatEcdsa.derToJose(signature, 'ES' + bits); - return signature; - }; +/***/ 75925: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const parse = (version, options, throwErrors = false) => { + if (version instanceof SemVer) { + return version + } + try { + return new SemVer(version, options) + } catch (er) { + if (!throwErrors) { + return null + } + throw er + } } -function createECDSAVerifer(bits) { - var inner = createKeyVerifier(bits); - return function verify(thing, signature, publicKey) { - signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); - var result = inner(thing, signature, publicKey); - return result; - }; -} +module.exports = parse -function createNoneSigner() { - return function sign() { - return ''; - } -} -function createNoneVerifier() { - return function verify(thing, signature) { - return signature === ''; - } -} +/***/ }), -module.exports = function jwa(algorithm) { - var signerFactories = { - hs: createHmacSigner, - rs: createKeySigner, - ps: createPSSKeySigner, - es: createECDSASigner, - none: createNoneSigner, - } - var verifierFactories = { - hs: createHmacVerifier, - rs: createKeyVerifier, - ps: createPSSKeyVerifier, - es: createECDSAVerifer, - none: createNoneVerifier, - } - var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); - if (!match) - throw typeError(MSG_INVALID_ALGORITHM, algorithm); - var algo = (match[1] || match[3]).toLowerCase(); - var bits = match[2]; +/***/ 42866: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return { - sign: signerFactories[algo](bits), - verify: verifierFactories[algo](bits), - } -}; +const SemVer = __nccwpck_require__(48088) +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch /***/ }), -/***/ 4636: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 24016: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/*global exports*/ -var SignStream = __nccwpck_require__(73334); -var VerifyStream = __nccwpck_require__(5522); +const parse = __nccwpck_require__(75925) +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease -var ALGORITHMS = [ - 'HS256', 'HS384', 'HS512', - 'RS256', 'RS384', 'RS512', - 'PS256', 'PS384', 'PS512', - 'ES256', 'ES384', 'ES512' -]; -exports.ALGORITHMS = ALGORITHMS; -exports.sign = SignStream.sign; -exports.verify = VerifyStream.verify; -exports.decode = VerifyStream.decode; -exports.isValid = VerifyStream.isValid; -exports.createSign = function createSign(opts) { - return new SignStream(opts); -}; -exports.createVerify = function createVerify(opts) { - return new VerifyStream(opts); -}; +/***/ }), + +/***/ 76417: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare /***/ }), -/***/ 61868: +/***/ 8701: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/*global module, process*/ -var Buffer = (__nccwpck_require__(21867).Buffer); -var Stream = __nccwpck_require__(12781); -var util = __nccwpck_require__(73837); +const compareBuild = __nccwpck_require__(92156) +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort -function DataStream(data) { - this.buffer = null; - this.writable = true; - this.readable = true; - // No input - if (!data) { - this.buffer = Buffer.alloc(0); - return this; - } +/***/ }), - // Stream - if (typeof data.pipe === 'function') { - this.buffer = Buffer.alloc(0); - data.pipe(this); - return this; - } +/***/ 6055: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Buffer or String - // or Object (assumedly a passworded key) - if (data.length || typeof data === 'object') { - this.buffer = data; - this.writable = false; - process.nextTick(function () { - this.emit('end', data); - this.readable = false; - this.emit('close'); - }.bind(this)); - return this; +const Range = __nccwpck_require__(9828) +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false } - - throw new TypeError('Unexpected data type ('+ typeof data + ')'); + return range.test(version) } -util.inherits(DataStream, Stream); +module.exports = satisfies -DataStream.prototype.write = function write(data) { - this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); - this.emit('data', data); -}; -DataStream.prototype.end = function end(data) { - if (data) - this.write(data); - this.emit('end', data); - this.emit('close'); - this.writable = false; - this.readable = false; -}; +/***/ }), -module.exports = DataStream; +/***/ 61426: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compareBuild = __nccwpck_require__(92156) +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort /***/ }), -/***/ 73334: +/***/ 19601: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/*global module*/ -var Buffer = (__nccwpck_require__(21867).Buffer); -var DataStream = __nccwpck_require__(61868); -var jwa = __nccwpck_require__(96010); -var Stream = __nccwpck_require__(12781); -var toString = __nccwpck_require__(65292); -var util = __nccwpck_require__(73837); - -function base64url(string, encoding) { - return Buffer - .from(string, encoding) - .toString('base64') - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); +const parse = __nccwpck_require__(75925) +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null } +module.exports = valid -function jwsSecuredInput(header, payload, encoding) { - encoding = encoding || 'utf8'; - var encodedHeader = base64url(toString(header), 'binary'); - var encodedPayload = base64url(toString(payload), encoding); - return util.format('%s.%s', encodedHeader, encodedPayload); -} -function jwsSign(opts) { - var header = opts.header; - var payload = opts.payload; - var secretOrKey = opts.secret || opts.privateKey; - var encoding = opts.encoding; - var algo = jwa(header.alg); - var securedInput = jwsSecuredInput(header, payload, encoding); - var signature = algo.sign(securedInput, secretOrKey); - return util.format('%s.%s', securedInput, signature); -} +/***/ }), -function SignStream(opts) { - var secret = opts.secret||opts.privateKey||opts.key; - var secretStream = new DataStream(secret); - this.readable = true; - this.header = opts.header; - this.encoding = opts.encoding; - this.secret = this.privateKey = this.key = secretStream; - this.payload = new DataStream(opts.payload); - this.secret.once('close', function () { - if (!this.payload.writable && this.readable) - this.sign(); - }.bind(this)); +/***/ 11383: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this.payload.once('close', function () { - if (!this.secret.writable && this.readable) - this.sign(); - }.bind(this)); +// just pre-load all the stuff that index.js lazily exports +const internalRe = __nccwpck_require__(9523) +const constants = __nccwpck_require__(42293) +const SemVer = __nccwpck_require__(48088) +const identifiers = __nccwpck_require__(92463) +const parse = __nccwpck_require__(75925) +const valid = __nccwpck_require__(19601) +const clean = __nccwpck_require__(48848) +const inc = __nccwpck_require__(30900) +const diff = __nccwpck_require__(64297) +const major = __nccwpck_require__(76688) +const minor = __nccwpck_require__(38447) +const patch = __nccwpck_require__(42866) +const prerelease = __nccwpck_require__(24016) +const compare = __nccwpck_require__(44309) +const rcompare = __nccwpck_require__(76417) +const compareLoose = __nccwpck_require__(62804) +const compareBuild = __nccwpck_require__(92156) +const sort = __nccwpck_require__(61426) +const rsort = __nccwpck_require__(8701) +const gt = __nccwpck_require__(84123) +const lt = __nccwpck_require__(80194) +const eq = __nccwpck_require__(91898) +const neq = __nccwpck_require__(6017) +const gte = __nccwpck_require__(15522) +const lte = __nccwpck_require__(77520) +const cmp = __nccwpck_require__(75098) +const coerce = __nccwpck_require__(13466) +const Comparator = __nccwpck_require__(91532) +const Range = __nccwpck_require__(9828) +const satisfies = __nccwpck_require__(6055) +const toComparators = __nccwpck_require__(52706) +const maxSatisfying = __nccwpck_require__(20579) +const minSatisfying = __nccwpck_require__(10832) +const minVersion = __nccwpck_require__(34179) +const validRange = __nccwpck_require__(2098) +const outside = __nccwpck_require__(60420) +const gtr = __nccwpck_require__(9380) +const ltr = __nccwpck_require__(33323) +const intersects = __nccwpck_require__(27008) +const simplifyRange = __nccwpck_require__(75297) +const subset = __nccwpck_require__(7863) +module.exports = { + parse, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers, } -util.inherits(SignStream, Stream); -SignStream.prototype.sign = function sign() { - try { - var signature = jwsSign({ - header: this.header, - payload: this.payload.buffer, - secret: this.secret.buffer, - encoding: this.encoding - }); - this.emit('done', signature); - this.emit('data', signature); - this.emit('end'); - this.readable = false; - return signature; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; -SignStream.sign = jwsSign; +/***/ }), -module.exports = SignStream; +/***/ 42293: +/***/ ((module) => { +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' -/***/ }), +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || +/* istanbul ignore next */ 9007199254740991 -/***/ 65292: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 -/*global module*/ -var Buffer = (__nccwpck_require__(14300).Buffer); +// Max safe length for a build identifier. The max length minus 6 characters for +// the shortest version with a build 0.0.0+BUILD. +const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 -module.exports = function toString(obj) { - if (typeof obj === 'string') - return obj; - if (typeof obj === 'number' || Buffer.isBuffer(obj)) - return obj.toString(); - return JSON.stringify(obj); -}; +const RELEASE_TYPES = [ + 'major', + 'premajor', + 'minor', + 'preminor', + 'patch', + 'prepatch', + 'prerelease', +] + +module.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 0b001, + FLAG_LOOSE: 0b010, +} /***/ }), -/***/ 5522: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 50427: +/***/ ((module) => { -/*global module*/ -var Buffer = (__nccwpck_require__(21867).Buffer); -var DataStream = __nccwpck_require__(61868); -var jwa = __nccwpck_require__(96010); -var Stream = __nccwpck_require__(12781); -var toString = __nccwpck_require__(65292); -var util = __nccwpck_require__(73837); -var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} -function isObject(thing) { - return Object.prototype.toString.call(thing) === '[object Object]'; -} +module.exports = debug -function safeJsonParse(thing) { - if (isObject(thing)) - return thing; - try { return JSON.parse(thing); } - catch (e) { return undefined; } -} -function headerFromJWS(jwsSig) { - var encodedHeader = jwsSig.split('.', 1)[0]; - return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); -} +/***/ }), -function securedInputFromJWS(jwsSig) { - return jwsSig.split('.', 2).join('.'); -} +/***/ 92463: +/***/ ((module) => { -function signatureFromJWS(jwsSig) { - return jwsSig.split('.')[2]; -} +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) -function payloadFromJWS(jwsSig, encoding) { - encoding = encoding || 'utf8'; - var payload = jwsSig.split('.')[1]; - return Buffer.from(payload, 'base64').toString(encoding); -} + if (anum && bnum) { + a = +a + b = +b + } -function isValidJws(string) { - return JWS_REGEX.test(string) && !!headerFromJWS(string); + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 } -function jwsVerify(jwsSig, algorithm, secretOrKey) { - if (!algorithm) { - var err = new Error("Missing algorithm parameter for jws.verify"); - err.code = "MISSING_ALGORITHM"; - throw err; - } - jwsSig = toString(jwsSig); - var signature = signatureFromJWS(jwsSig); - var securedInput = securedInputFromJWS(jwsSig); - var algo = jwa(algorithm); - return algo.verify(securedInput, signature, secretOrKey); +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers, } -function jwsDecode(jwsSig, opts) { - opts = opts || {}; - jwsSig = toString(jwsSig); - if (!isValidJws(jwsSig)) - return null; +/***/ }), - var header = headerFromJWS(jwsSig); +/***/ 15339: +/***/ ((module) => { - if (!header) - return null; +class LRUCache { + constructor () { + this.max = 1000 + this.map = new Map() + } - var payload = payloadFromJWS(jwsSig); - if (header.typ === 'JWT' || opts.json) - payload = JSON.parse(payload, opts.encoding); + get (key) { + const value = this.map.get(key) + if (value === undefined) { + return undefined + } else { + // Remove the key from the map and add it to the end + this.map.delete(key) + this.map.set(key, value) + return value + } + } - return { - header: header, - payload: payload, - signature: signatureFromJWS(jwsSig) - }; -} + delete (key) { + return this.map.delete(key) + } -function VerifyStream(opts) { - opts = opts || {}; - var secretOrKey = opts.secret||opts.publicKey||opts.key; - var secretStream = new DataStream(secretOrKey); - this.readable = true; - this.algorithm = opts.algorithm; - this.encoding = opts.encoding; - this.secret = this.publicKey = this.key = secretStream; - this.signature = new DataStream(opts.signature); - this.secret.once('close', function () { - if (!this.signature.writable && this.readable) - this.verify(); - }.bind(this)); + set (key, value) { + const deleted = this.delete(key) - this.signature.once('close', function () { - if (!this.secret.writable && this.readable) - this.verify(); - }.bind(this)); -} -util.inherits(VerifyStream, Stream); -VerifyStream.prototype.verify = function verify() { - try { - var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); - var obj = jwsDecode(this.signature.buffer, this.encoding); - this.emit('done', valid, obj); - this.emit('data', valid); - this.emit('end'); - this.readable = false; - return valid; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; + if (!deleted && value !== undefined) { + // If cache is full, delete the least recently used item + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value + this.delete(firstKey) + } -VerifyStream.decode = jwsDecode; -VerifyStream.isValid = isValidJws; -VerifyStream.verify = jwsVerify; + this.map.set(key, value) + } -module.exports = VerifyStream; + return this + } +} + +module.exports = LRUCache /***/ }), -/***/ 47426: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 40785: +/***/ ((module) => { -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ +// parse out just the options we care about +const looseOption = Object.freeze({ loose: true }) +const emptyOpts = Object.freeze({ }) +const parseOptions = options => { + if (!options) { + return emptyOpts + } -/** - * Module exports. - */ + if (typeof options !== 'object') { + return looseOption + } -module.exports = __nccwpck_require__(53765) + return options +} +module.exports = parseOptions /***/ }), -/***/ 43583: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 9523: +/***/ ((module, exports, __nccwpck_require__) => { -"use strict"; -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ +const { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH, +} = __nccwpck_require__(42293) +const debug = __nccwpck_require__(50427) +exports = module.exports = {} +// The actual regexps go on exports.re +const re = exports.re = [] +const safeRe = exports.safeRe = [] +const src = exports.src = [] +const safeSrc = exports.safeSrc = [] +const t = exports.t = {} +let R = 0 +const LETTERDASHNUMBER = '[a-zA-Z0-9-]' -/** - * Module dependencies. - * @private - */ +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +const safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] -var db = __nccwpck_require__(47426) -var extname = (__nccwpck_require__(71017).extname) +const makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value + .split(`${token}*`).join(`${token}{0,${max}}`) + .split(`${token}+`).join(`${token}{1,${max}}`) + } + return value +} -/** - * Module variables. - * @private - */ +const createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value) + const index = R++ + debug(name, index, value) + t[name] = index + src[index] = value + safeSrc[index] = safe + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) + safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) +} -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. -/** - * Module exports. - * @public - */ +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '\\d+') -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ +createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } +// ## Main Version +// Three dot-separated numeric identifiers. - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) - if (mime && mime.charset) { - return mime.charset - } +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. - return false -} +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - if (!mime) { - return false - } +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. - return mime -} +createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. - if (!exts || !exts.length) { - return false - } +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) - return exts[0] -} +createToken('FULL', `^${src[t.FULLPLAIN]}$`) -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) +createToken('GTLT', '((?:<|>)?=?)') - if (!extension) { - return false - } +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - return exports.types[extension] || false -} +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) -/** - * Populate the extensions and types maps. - * @private - */ +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCEPLAIN', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) +createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) +createToken('COERCEFULL', src[t.COERCEPLAIN] + + `(?:${src[t.PRERELEASE]})?` + + `(?:${src[t.BUILD]})?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) +createToken('COERCERTLFULL', src[t.COERCEFULL], true) - if (!exts || !exts.length) { - return - } +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') - // mime -> extensions - extensions[type] = exts +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' - // set the extension -> mime - types[extension] = type - } - }) -} +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') /***/ }), -/***/ 46038: -/***/ ((module) => { +/***/ 9380: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +// Determine if version is greater than all the versions possible in the range. +const outside = __nccwpck_require__(60420) +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr -/** - * @param typeMap [Object] Map of MIME type -> Array[extensions] - * @param ... - */ -function Mime() { - this._types = Object.create(null); - this._extensions = Object.create(null); +/***/ }), - for (let i = 0; i < arguments.length; i++) { - this.define(arguments[i]); - } +/***/ 27008: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this.define = this.define.bind(this); - this.getType = this.getType.bind(this); - this.getExtension = this.getExtension.bind(this); +const Range = __nccwpck_require__(9828) +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2, options) } +module.exports = intersects -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * If a type declares an extension that has already been defined, an error will - * be thrown. To suppress this error and force the extension to be associated - * with the new type, pass `force`=true. Alternatively, you may prefix the - * extension with "*" to map the type to extension, without mapping the - * extension to the type. - * - * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); - * - * - * @param map (Object) type definitions - * @param force (Boolean) if true, force overriding of existing definitions - */ -Mime.prototype.define = function(typeMap, force) { - for (let type in typeMap) { - let extensions = typeMap[type].map(function(t) { - return t.toLowerCase(); - }); - type = type.toLowerCase(); - for (let i = 0; i < extensions.length; i++) { - const ext = extensions[i]; +/***/ }), - // '*' prefix = not the preferred type for this extension. So fixup the - // extension, and skip it. - if (ext[0] === '*') { - continue; - } +/***/ 33323: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (!force && (ext in this._types)) { - throw new Error( - 'Attempt to change mapping for "' + ext + - '" extension from "' + this._types[ext] + '" to "' + type + - '". Pass `force=true` to allow this, otherwise remove "' + ext + - '" from the list of extensions for "' + type + '".' - ); - } +const outside = __nccwpck_require__(60420) +// Determine if version is less than all the versions possible in the range +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr - this._types[ext] = type; - } - // Use first extension as default - if (force || !this._extensions[type]) { - const ext = extensions[0]; - this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1); - } - } -}; +/***/ }), -/** - * Lookup a mime type based on extension - */ -Mime.prototype.getType = function(path) { - path = String(path); - let last = path.replace(/^.*[/\\]/, '').toLowerCase(); - let ext = last.replace(/^.*\./, '').toLowerCase(); +/***/ 20579: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - let hasPath = last.length < path.length; - let hasDot = ext.length < last.length - 1; +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) - return (hasDot || !hasPath) && this._types[ext] || null; -}; +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} +module.exports = maxSatisfying -/** - * Return file extension associated with a mime type - */ -Mime.prototype.getExtension = function(type) { - type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; - return type && this._extensions[type.toLowerCase()] || null; -}; -module.exports = Mime; +/***/ }), + +/***/ 10832: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} +module.exports = minSatisfying /***/ }), -/***/ 29994: +/***/ 34179: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; - +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) +const gt = __nccwpck_require__(84123) -let Mime = __nccwpck_require__(46038); -module.exports = new Mime(__nccwpck_require__(13114), __nccwpck_require__(38809)); +const minVersion = (range, loose) => { + range = new Range(range, loose) + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } -/***/ }), + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } -/***/ 38809: -/***/ ((module) => { + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] -module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin + } + } -/***/ }), + if (minver && range.test(minver)) { + return minver + } -/***/ 13114: -/***/ ((module) => { + return null +} +module.exports = minVersion -module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; /***/ }), -/***/ 83973: +/***/ 60420: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __nccwpck_require__(33717) +const SemVer = __nccwpck_require__(48088) +const Comparator = __nccwpck_require__(91532) +const { ANY } = Comparator +const Range = __nccwpck_require__(9828) +const satisfies = __nccwpck_require__(6055) +const gt = __nccwpck_require__(84123) +const lt = __nccwpck_require__(80194) +const lte = __nccwpck_require__(77520) +const gte = __nccwpck_require__(15522) -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } -// * => any number of characters -var star = qmark + '*?' + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') + let high = null + let low = null -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) -// normalizes slashes. -var slashSplit = /\/+/ + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } } + return true } -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } +module.exports = outside - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } +/***/ }), - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } +/***/ 75297: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = __nccwpck_require__(6055) +const compare = __nccwpck_require__(44309) +module.exports = (versions, range, options) => { + const set = [] + let first = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!first) { + first = version + } + } else { + if (prev) { + set.push([first, prev]) + } + prev = null + first = null + } } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) + if (first) { + set.push([first, null]) } - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) + const ranges = [] + for (const [min, max] of set) { + if (min === max) { + ranges.push(min) + } else if (!max && min === v[0]) { + ranges.push('*') + } else if (!max) { + ranges.push(`>=${min}`) + } else if (min === v[0]) { + ranges.push(`<=${max}`) + } else { + ranges.push(`${min} - ${max}`) + } } - - return m + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range } -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch -} -function minimatch (p, pattern, options) { - assertValidPattern(pattern) +/***/ }), - if (!options) options = {} +/***/ 7863: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } +const Range = __nccwpck_require__(9828) +const Comparator = __nccwpck_require__(91532) +const { ANY } = Comparator +const satisfies = __nccwpck_require__(6055) +const compare = __nccwpck_require__(44309) - return new Minimatch(pattern, options).match(p) -} +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` +// +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) +const subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true } - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) { + continue OUTER + } + } + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) { + return false + } } + return true +} - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial +const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] +const minimumVersion = [new Comparator('>=0.0.0')] - // make the set of regexps etc. - this.make() -} +const simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true + } -Minimatch.prototype.debug = function () {} + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease + } else { + sub = minimumVersion + } + } -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true + } else { + dom = minimumVersion + } + } - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') { + gt = higherGT(gt, c, options) + } else if (c.operator === '<' || c.operator === '<=') { + lt = lowerLT(lt, c, options) + } else { + eqSet.add(c.semver) + } } - if (!pattern) { - this.empty = true - return + + if (eqSet.size > 1) { + return null } - // step 1: figure out negation, etc. - this.parseNegate() + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) { + return null + } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { + return null + } + } - // step 2: expand braces - var set = this.globSet = this.braceExpand() + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null + } - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + if (lt && !satisfies(eq, String(lt), options)) { + return null + } - this.debug(this.pattern, set) + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false + } + } - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) + return true + } - this.debug(this.pattern, set) + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) { + return false + } + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { + return false + } + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) { + return false + } + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { + return false + } + } + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false + } + } - this.debug(this.pattern, set) + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false + } - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false + } - this.debug(this.pattern, set) + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) { + return false + } - this.set = set + return true } -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) { + return b } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a } -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) { + return b + } + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a } -Minimatch.prototype.braceExpand = braceExpand +module.exports = subset -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern +/***/ }), - assertValidPattern(pattern) +/***/ 52706: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } +const Range = __nccwpck_require__(9828) - return expand(pattern) -} +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } +module.exports = toComparators - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } -} -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) +/***/ }), - var options = this.options +/***/ 2098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' +const Range = __nccwpck_require__(9828) +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null } - if (pattern === '') return '' +} +module.exports = validRange - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } +/***/ }), - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) +/***/ 79626: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } +"use strict"; - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - } - case '\\': - clearStateChar() - escaping = true - continue +var stubs = __nccwpck_require__(1099) - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) +/* + * StreamEvents can be used 2 ways: + * + * 1: + * function MyStream() { + * require('stream-events').call(this) + * } + * + * 2: + * require('stream-events')(myStream) + */ +function StreamEvents(stream) { + stream = stream || this - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } + var cfg = { + callthrough: true, + calls: 1 + } - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue + stubs(stream, '_read', cfg, stream.emit.bind(stream, 'reading')) + stubs(stream, '_write', cfg, stream.emit.bind(stream, 'writing')) - case '(': - if (inClass) { - re += '(' - continue - } + return stream +} - if (!stateChar) { - re += '\\(' - continue - } +module.exports = StreamEvents - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } +/***/ }), - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue +/***/ 66121: +/***/ ((module) => { - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } +module.exports = shift - clearStateChar() - re += '|' - continue +function shift (stream) { + var rs = stream._readableState + if (!rs) return null + return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs)) +} - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() +function getStateLength (state) { + if (state.buffer.length) { + var idx = state.bufferIndex || 0 + // Since node 6.3.0 state.buffer is a BufferList not an array + if (state.buffer.head) { + return state.buffer.head.data.length + } else if (state.buffer.length - idx > 0 && state.buffer[idx]) { + return state.buffer[idx].length + } + } - if (inClass) { - re += '\\' + c - continue - } + return state.length +} - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } +/***/ }), - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } +/***/ 94841: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // finish up the class. - hasMagic = true - inClass = false - re += c - continue +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. - default: - // swallow any state char that wasn't consumed - clearStateChar() - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - re += c +/**/ - } // switch - } // for +var Buffer = (__nccwpck_require__(21867).Buffer); +/**/ - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; } +}; - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.s = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } +StringDecoder.prototype.end = utf8End; - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; - nlLast += nlAfter +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; } - nlAfter = cleanAfter + return nb; + } + return 0; +} - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe } +} - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} - if (addPatternStart) { - re = patternStart + re - } +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); } + return r; +} - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; } + return buf.toString('base64', i, buf.length - n); +} - regExp._glob = pattern - regExp._src = re +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} - return regExp +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); } -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; } -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp +/***/ }), - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set +/***/ 1099: +/***/ ((module) => { - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options +"use strict"; - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') +module.exports = function stubs(obj, method, cfg, stub) { + if (!obj || !method || !obj[method]) + throw new Error('You must provide an object and a key for an existing method') - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' + if (!stub) { + stub = cfg + cfg = {} + } - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' + stub = stub || function() {} - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp -} + cfg.callthrough = cfg.callthrough || false + cfg.calls = cfg.calls || 0 -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} + var norevert = cfg.calls === 0 -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' + var cached = obj[method].bind(obj) - if (f === '/' && partial) return true + obj[method] = function() { + var args = [].slice.call(arguments) + var returnVal - var options = this.options + if (cfg.callthrough) + returnVal = cached.apply(obj, args) - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') + returnVal = stub.apply(obj, args) || returnVal + + if (!norevert && --cfg.calls === 0) + obj[method] = cached + + return returnVal } +} - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. +/***/ }), - var set = this.set - this.debug(this.pattern, 'set', set) +/***/ 59318: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } +"use strict"; - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } +const os = __nccwpck_require__(22037); +const tty = __nccwpck_require__(76224); +const hasFlag = __nccwpck_require__(31621); - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate +const {env} = process; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false') || + hasFlag('color=never')) { + forceColor = 0; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = 1; } -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options +if ('FORCE_COLOR' in env) { + if (env.FORCE_COLOR === 'true') { + forceColor = 1; + } else if (env.FORCE_COLOR === 'false') { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } +} - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) +function translateLevel(level) { + if (level === 0) { + return false; + } - this.debug('matchOne', file.length, pattern.length) + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] +function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; + } - this.debug(pattern, p, f) + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false) return false + if (hasFlag('color=256')) { + return 2; + } - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) + if (haveStream && !streamIsTTY && forceColor === undefined) { + return 0; + } - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } + const min = forceColor || 0; + + if (env.TERM === 'dumb') { + return min; + } - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] + if (process.platform === 'win32') { + // Windows 10 build 10586 is the first Windows release that supports 256 colors. + // Windows 10 build 14931 is the first release that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + return 1; + } - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } + return min; + } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - /* istanbul ignore if */ - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } + if (env.COLORTERM === 'truecolor') { + return 3; + } - if (!hit) return false - } + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') - } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') + if ('COLORTERM' in env) { + return 1; + } + + return min; } -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); } +module.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) +}; + /***/ }), -/***/ 80900: -/***/ ((module) => { +/***/ 14920: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; /** - * Helpers. + * @license + * Copyright 2020 Google LLC + * + * 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. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TeenyStatistics = exports.TeenyStatisticsWarning = void 0; +/** + * @class TeenyStatisticsWarning + * @extends Error + * @description While an error, is used for emitting warnings when + * meeting certain configured thresholds. + * @see process.emitWarning + */ +class TeenyStatisticsWarning extends Error { + /** + * @param {string} message + */ + constructor(message) { + super(message); + this.threshold = 0; + this.type = ''; + this.value = 0; + this.name = this.constructor.name; + Error.captureStackTrace(this, this.constructor); + } +} +exports.TeenyStatisticsWarning = TeenyStatisticsWarning; +TeenyStatisticsWarning.CONCURRENT_REQUESTS = 'ConcurrentRequestsExceededWarning'; +/** + * @class TeenyStatistics + * @description Maintain various statistics internal to teeny-request. Tracking + * is not automatic and must be instrumented within teeny-request. + */ +class TeenyStatistics { + /** + * @param {TeenyStatisticsOptions} [opts] + */ + constructor(opts) { + /** + * @type {number} + * @private + * @default 0 + */ + this._concurrentRequests = 0; + /** + * @type {boolean} + * @private + * @default false + */ + this._didConcurrentRequestWarn = false; + this._options = TeenyStatistics._prepareOptions(opts); + } + /** + * Returns a copy of the current options. + * @return {TeenyStatisticsOptions} + */ + getOptions() { + return Object.assign({}, this._options); + } + /** + * Change configured statistics options. This will not preserve unspecified + * options that were previously specified, i.e. this is a reset of options. + * @param {TeenyStatisticsOptions} [opts] + * @returns {TeenyStatisticsConfig} The previous options. + * @see _prepareOptions + */ + setOptions(opts) { + const oldOpts = this._options; + this._options = TeenyStatistics._prepareOptions(opts); + return oldOpts; + } + /** + * @readonly + * @return {TeenyStatisticsCounters} + */ + get counters() { + return { + concurrentRequests: this._concurrentRequests, + }; + } + /** + * @description Should call this right before making a request. + */ + requestStarting() { + this._concurrentRequests++; + if (this._options.concurrentRequests > 0 && + this._concurrentRequests >= this._options.concurrentRequests && + !this._didConcurrentRequestWarn) { + this._didConcurrentRequestWarn = true; + const warning = new TeenyStatisticsWarning('Possible excessive concurrent requests detected. ' + + this._concurrentRequests + + ' requests in-flight, which exceeds the configured threshold of ' + + this._options.concurrentRequests + + '. Use the TEENY_REQUEST_WARN_CONCURRENT_REQUESTS environment ' + + 'variable or the concurrentRequests option of teeny-request to ' + + 'increase or disable (0) this warning.'); + warning.type = TeenyStatisticsWarning.CONCURRENT_REQUESTS; + warning.value = this._concurrentRequests; + warning.threshold = this._options.concurrentRequests; + process.emitWarning(warning); + } + } + /** + * @description When using `requestStarting`, call this after the request + * has finished. + */ + requestFinished() { + // TODO negative? + this._concurrentRequests--; + } + /** + * Configuration Precedence: + * 1. Dependency inversion via defined option. + * 2. Global numeric environment variable. + * 3. Built-in default. + * This will not preserve unspecified options previously specified. + * @param {TeenyStatisticsOptions} [opts] + * @returns {TeenyStatisticsOptions} + * @private + */ + static _prepareOptions({ concurrentRequests: diConcurrentRequests, } = {}) { + let concurrentRequests = this.DEFAULT_WARN_CONCURRENT_REQUESTS; + const envConcurrentRequests = Number(process.env.TEENY_REQUEST_WARN_CONCURRENT_REQUESTS); + if (diConcurrentRequests !== undefined) { + concurrentRequests = diConcurrentRequests; + } + else if (!Number.isNaN(envConcurrentRequests)) { + concurrentRequests = envConcurrentRequests; + } + return { concurrentRequests }; + } +} +exports.TeenyStatistics = TeenyStatistics; +/** + * @description A default threshold representing when to warn about excessive + * in-flight/concurrent requests. + * @type {number} + * @static + * @readonly + * @default 5000 */ +TeenyStatistics.DEFAULT_WARN_CONCURRENT_REQUESTS = 5000; +//# sourceMappingURL=TeenyStatistics.js.map -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; +/***/ }), + +/***/ 60446: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; /** - * Parse or format the given `val`. + * @license + * Copyright 2019 Google LLC * - * Options: + * 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 * - * - `long` verbose formatting [false] + * http://www.apache.org/licenses/LICENSE-2.0 * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public + * 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. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAgent = exports.pool = void 0; +const http_1 = __nccwpck_require__(13685); +const https_1 = __nccwpck_require__(95687); +// eslint-disable-next-line node/no-deprecated-api +const url_1 = __nccwpck_require__(57310); +exports.pool = new Map(); +/** + * Determines if a proxy should be considered based on the environment. + * + * @param uri The request uri + * @returns {boolean} + */ +function shouldUseProxyForURI(uri) { + const noProxyEnv = process.env.NO_PROXY || process.env.no_proxy; + if (!noProxyEnv) { + return true; + } + const givenURI = new URL(uri); + for (const noProxyRaw of noProxyEnv.split(',')) { + const noProxy = noProxyRaw.trim(); + if (noProxy === givenURI.origin || noProxy === givenURI.hostname) { + return false; + } + else if (noProxy.startsWith('*.') || noProxy.startsWith('.')) { + const noProxyWildcard = noProxy.replace(/^\*\./, '.'); + if (givenURI.hostname.endsWith(noProxyWildcard)) { + return false; + } + } + } + return true; +} +/** + * Returns a custom request Agent if one is found, otherwise returns undefined + * which will result in the global http(s) Agent being used. + * @private + * @param {string} uri The request uri + * @param {Options} reqOpts The request options + * @returns {HttpAnyAgent|undefined} */ +function getAgent(uri, reqOpts) { + const isHttp = uri.startsWith('http://'); + const proxy = reqOpts.proxy || + process.env.HTTP_PROXY || + process.env.http_proxy || + process.env.HTTPS_PROXY || + process.env.https_proxy; + const poolOptions = Object.assign({}, reqOpts.pool); + const manuallyProvidedProxy = !!reqOpts.proxy; + const shouldUseProxy = manuallyProvidedProxy || shouldUseProxyForURI(uri); + if (proxy && shouldUseProxy) { + // tslint:disable-next-line variable-name + const Agent = isHttp + ? __nccwpck_require__(42049) + : __nccwpck_require__(66202); + const proxyOpts = { ...(0, url_1.parse)(proxy), ...poolOptions }; + return new Agent(proxyOpts); + } + let key = isHttp ? 'http' : 'https'; + if (reqOpts.forever) { + key += ':forever'; + if (!exports.pool.has(key)) { + // tslint:disable-next-line variable-name + const Agent = isHttp ? http_1.Agent : https_1.Agent; + exports.pool.set(key, new Agent({ ...poolOptions, keepAlive: true })); + } + } + return exports.pool.get(key); +} +exports.getAgent = getAgent; +//# sourceMappingURL=agents.js.map -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; +/***/ }), + +/***/ 6886: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; /** - * Parse the given `str` and return milliseconds. + * @license + * Copyright 2018 Google LLC * - * @param {String} str - * @return {Number} - * @api private + * 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. */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.teenyRequest = exports.RequestError = void 0; +const node_fetch_1 = __nccwpck_require__(80467); +const stream_1 = __nccwpck_require__(12781); +const uuid = __nccwpck_require__(17835); +const agents_1 = __nccwpck_require__(60446); +const TeenyStatistics_1 = __nccwpck_require__(14920); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const streamEvents = __nccwpck_require__(79626); +class RequestError extends Error { +} +exports.RequestError = RequestError; +/** + * Convert options from Request to Fetch format + * @private + * @param reqOpts Request options + */ +function requestToFetchOptions(reqOpts) { + const options = { + method: reqOpts.method || 'GET', + ...(reqOpts.timeout && { timeout: reqOpts.timeout }), + ...(typeof reqOpts.gzip === 'boolean' && { compress: reqOpts.gzip }), + }; + if (typeof reqOpts.json === 'object') { + // Add Content-type: application/json header + reqOpts.headers = reqOpts.headers || {}; + reqOpts.headers['Content-Type'] = 'application/json'; + // Set body to JSON representation of value + options.body = JSON.stringify(reqOpts.json); + } + else { + if (Buffer.isBuffer(reqOpts.body)) { + options.body = reqOpts.body; + } + else if (typeof reqOpts.body !== 'string') { + options.body = JSON.stringify(reqOpts.body); + } + else { + options.body = reqOpts.body; + } + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + options.headers = reqOpts.headers; + let uri = (reqOpts.uri || + reqOpts.url); + if (!uri) { + throw new Error('Missing uri or url in reqOpts.'); + } + if (reqOpts.useQuerystring === true || typeof reqOpts.qs === 'object') { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const qs = __nccwpck_require__(63477); + const params = qs.stringify(reqOpts.qs); + uri = uri + '?' + params; + } + options.agent = (0, agents_1.getAgent)(uri, reqOpts); + return { uri, options }; } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private + * Convert a response from `fetch` to `request` format. + * @private + * @param opts The `request` options used to create the request. + * @param res The Fetch response + * @returns A `request` response object */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; +function fetchToRequestResponse(opts, res) { + const request = {}; + request.agent = opts.agent || false; + request.headers = (opts.headers || {}); + request.href = res.url; + // headers need to be converted from a map to an obj + const resHeaders = {}; + res.headers.forEach((value, key) => (resHeaders[key] = value)); + const response = Object.assign(res.body, { + statusCode: res.status, + statusMessage: res.statusText, + request, + body: res.body, + headers: resHeaders, + toJSON: () => ({ headers: resHeaders }), + }); + return response; } - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private + * Create POST body from two parts as multipart/related content-type + * @private + * @param boundary + * @param multipart */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; +function createMultipartStream(boundary, multipart) { + const finale = `--${boundary}--`; + const stream = new stream_1.PassThrough(); + for (const part of multipart) { + const preamble = `--${boundary}\r\nContent-Type: ${part['Content-Type']}\r\n\r\n`; + stream.write(preamble); + if (typeof part.body === 'string') { + stream.write(part.body); + stream.write('\r\n'); + } + else { + part.body.pipe(stream, { end: false }); + part.body.on('end', () => { + stream.write('\r\n'); + stream.write(finale); + stream.end(); + }); + } + } + return stream; } - +function teenyRequest(reqOpts, callback) { + const { uri, options } = requestToFetchOptions(reqOpts); + const multipart = reqOpts.multipart; + if (reqOpts.multipart && multipart.length === 2) { + if (!callback) { + // TODO: add support for multipart uploads through streaming + throw new Error('Multipart without callback is not implemented.'); + } + const boundary = uuid.v4(); + options.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; + options.body = createMultipartStream(boundary, multipart); + // Multipart upload + teenyRequest.stats.requestStarting(); + (0, node_fetch_1.default)(uri, options).then(res => { + teenyRequest.stats.requestFinished(); + const header = res.headers.get('content-type'); + const response = fetchToRequestResponse(options, res); + const body = response.body; + if (header === 'application/json' || + header === 'application/json; charset=utf-8') { + res.json().then(json => { + response.body = json; + callback(null, response, json); + }, (err) => { + callback(err, response, body); + }); + return; + } + res.text().then(text => { + response.body = text; + callback(null, response, text); + }, err => { + callback(err, response, body); + }); + }, err => { + teenyRequest.stats.requestFinished(); + callback(err, null, null); + }); + return; + } + if (callback === undefined) { + // Stream mode + const requestStream = streamEvents(new stream_1.PassThrough()); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let responseStream; + requestStream.once('reading', () => { + if (responseStream) { + (0, stream_1.pipeline)(responseStream, requestStream, () => { }); + } + else { + requestStream.once('response', () => { + (0, stream_1.pipeline)(responseStream, requestStream, () => { }); + }); + } + }); + options.compress = false; + teenyRequest.stats.requestStarting(); + (0, node_fetch_1.default)(uri, options).then(res => { + teenyRequest.stats.requestFinished(); + responseStream = res.body; + responseStream.on('error', (err) => { + requestStream.emit('error', err); + }); + const response = fetchToRequestResponse(options, res); + requestStream.emit('response', response); + }, err => { + teenyRequest.stats.requestFinished(); + requestStream.emit('error', err); + }); + // fetch doesn't supply the raw HTTP stream, instead it + // returns a PassThrough piped from the HTTP response + // stream. + return requestStream; + } + // GET or POST with callback + teenyRequest.stats.requestStarting(); + (0, node_fetch_1.default)(uri, options).then(res => { + teenyRequest.stats.requestFinished(); + const header = res.headers.get('content-type'); + const response = fetchToRequestResponse(options, res); + const body = response.body; + if (header === 'application/json' || + header === 'application/json; charset=utf-8') { + if (response.statusCode === 204) { + // Probably a DELETE + callback(null, response, body); + return; + } + res.json().then(json => { + response.body = json; + callback(null, response, json); + }, err => { + callback(err, response, body); + }); + return; + } + res.text().then(text => { + const response = fetchToRequestResponse(options, res); + response.body = text; + callback(null, response, text); + }, err => { + callback(err, response, body); + }); + }, err => { + teenyRequest.stats.requestFinished(); + callback(err, null, null); + }); + return; +} +exports.teenyRequest = teenyRequest; +teenyRequest.defaults = (defaults) => { + return (reqOpts, callback) => { + const opts = { ...defaults, ...reqOpts }; + if (callback === undefined) { + return teenyRequest(opts); + } + teenyRequest(opts, callback); + }; +}; /** - * Pluralization helper. + * Single instance of an interface for keeping track of things. */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} - +teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(); +teenyRequest.resetStats = () => { + teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(teenyRequest.stats.getOptions()); +}; +//# sourceMappingURL=index.js.map /***/ }), -/***/ 80467: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 76503: +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { "use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const events_1 = __nccwpck_require__(82361); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const promisify_1 = __importDefault(__nccwpck_require__(55947)); +const debug = debug_1.default('agent-base'); +function isAgent(v) { + return Boolean(v) && typeof v.addRequest === 'function'; +} +function isSecureEndpoint() { + const { stack } = new Error(); + if (typeof stack !== 'string') + return false; + return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); +} +function createAgent(callback, opts) { + return new createAgent.Agent(callback, opts); +} +(function (createAgent) { + /** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + * + * @param {Function} callback + * @api public + */ + class Agent extends events_1.EventEmitter { + constructor(callback, _opts) { + super(); + let opts = _opts; + if (typeof callback === 'function') { + this.callback = callback; + } + else if (callback) { + opts = callback; + } + // Timeout for the socket to be returned from the callback + this.timeout = null; + if (opts && typeof opts.timeout === 'number') { + this.timeout = opts.timeout; + } + // These aren't actually used by `agent-base`, but are required + // for the TypeScript definition files in `@types/node` :/ + this.maxFreeSockets = 1; + this.maxSockets = 1; + this.maxTotalSockets = Infinity; + this.sockets = {}; + this.freeSockets = {}; + this.requests = {}; + this.options = {}; + } + get defaultPort() { + if (typeof this.explicitDefaultPort === 'number') { + return this.explicitDefaultPort; + } + return isSecureEndpoint() ? 443 : 80; + } + set defaultPort(v) { + this.explicitDefaultPort = v; + } + get protocol() { + if (typeof this.explicitProtocol === 'string') { + return this.explicitProtocol; + } + return isSecureEndpoint() ? 'https:' : 'http:'; + } + set protocol(v) { + this.explicitProtocol = v; + } + callback(req, opts, fn) { + throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + } + /** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ + addRequest(req, _opts) { + const opts = Object.assign({}, _opts); + if (typeof opts.secureEndpoint !== 'boolean') { + opts.secureEndpoint = isSecureEndpoint(); + } + if (opts.host == null) { + opts.host = 'localhost'; + } + if (opts.port == null) { + opts.port = opts.secureEndpoint ? 443 : 80; + } + if (opts.protocol == null) { + opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; + } + if (opts.host && opts.path) { + // If both a `host` and `path` are specified then it's most + // likely the result of a `url.parse()` call... we need to + // remove the `path` portion so that `net.connect()` doesn't + // attempt to open that as a unix socket file. + delete opts.path; + } + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + // Hint to use "Connection: close" + // XXX: non-documented `http` module API :( + req._last = true; + req.shouldKeepAlive = false; + let timedOut = false; + let timeoutId = null; + const timeoutMs = opts.timeout || this.timeout; + const onerror = (err) => { + if (req._hadError) + return; + req.emit('error', err); + // For Safety. Some additional errors might fire later on + // and we need to make sure we don't double-fire the error event. + req._hadError = true; + }; + const ontimeout = () => { + timeoutId = null; + timedOut = true; + const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); + err.code = 'ETIMEOUT'; + onerror(err); + }; + const callbackError = (err) => { + if (timedOut) + return; + if (timeoutId !== null) { + clearTimeout(timeoutId); + timeoutId = null; + } + onerror(err); + }; + const onsocket = (socket) => { + if (timedOut) + return; + if (timeoutId != null) { + clearTimeout(timeoutId); + timeoutId = null; + } + if (isAgent(socket)) { + // `socket` is actually an `http.Agent` instance, so + // relinquish responsibility for this `req` to the Agent + // from here on + debug('Callback returned another Agent instance %o', socket.constructor.name); + socket.addRequest(req, opts); + return; + } + if (socket) { + socket.once('free', () => { + this.freeSocket(socket, opts); + }); + req.onSocket(socket); + return; + } + const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); + onerror(err); + }; + if (typeof this.callback !== 'function') { + onerror(new Error('`callback` is not defined')); + return; + } + if (!this.promisifiedCallback) { + if (this.callback.length >= 3) { + debug('Converting legacy callback function to promise'); + this.promisifiedCallback = promisify_1.default(this.callback); + } + else { + this.promisifiedCallback = this.callback; + } + } + if (typeof timeoutMs === 'number' && timeoutMs > 0) { + timeoutId = setTimeout(ontimeout, timeoutMs); + } + if ('port' in opts && typeof opts.port !== 'number') { + opts.port = Number(opts.port); + } + try { + debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); + Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); + } + catch (err) { + Promise.reject(err).catch(callbackError); + } + } + freeSocket(socket, opts) { + debug('Freeing socket %o %o', socket.constructor.name, opts); + socket.destroy(); + } + destroy() { + debug('Destroying agent %o', this.constructor.name); + } + } + createAgent.Agent = Agent; + // So that `instanceof` works correctly + createAgent.prototype = createAgent.Agent.prototype; +})(createAgent || (createAgent = {})); +module.exports = createAgent; +//# sourceMappingURL=index.js.map -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var Stream = _interopDefault(__nccwpck_require__(12781)); -var http = _interopDefault(__nccwpck_require__(13685)); -var Url = _interopDefault(__nccwpck_require__(57310)); -var whatwgUrl = _interopDefault(__nccwpck_require__(73323)); -var https = _interopDefault(__nccwpck_require__(95687)); -var zlib = _interopDefault(__nccwpck_require__(59796)); - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); +/***/ }), - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; +/***/ 55947: +/***/ ((__unused_webpack_module, exports) => { - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); +"use strict"; - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +function promisify(fn) { + return function (req, opts) { + return new Promise((resolve, reject) => { + fn.call(this, req, opts, (err, rtn) => { + if (err) { + reject(err); + } + else { + resolve(rtn); + } + }); + }); + }; } +exports["default"] = promisify; +//# sourceMappingURL=promisify.js.map -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); +/***/ }), -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); +/***/ 58949: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const net_1 = __importDefault(__nccwpck_require__(41808)); +const tls_1 = __importDefault(__nccwpck_require__(24404)); +const url_1 = __importDefault(__nccwpck_require__(57310)); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const once_1 = __importDefault(__nccwpck_require__(81040)); +const agent_base_1 = __nccwpck_require__(76503); +const debug = (0, debug_1.default)('http-proxy-agent'); +function isHTTPS(protocol) { + return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +} /** - * Create FetchError instance + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects + * to the specified "HTTP proxy server" in order to proxy HTTP requests. * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError + * @api public */ -function FetchError(message, type, systemError) { - Error.call(this, message); +class HttpProxyAgent extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === 'string') { + opts = url_1.default.parse(_opts); + } + else { + opts = _opts; + } + if (!opts) { + throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + } + debug('Creating new HttpProxyAgent instance: %o', opts); + super(opts); + const proxy = Object.assign({}, opts); + // If `true`, then connect to the proxy server over TLS. + // Defaults to `false`. + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + // Prefer `hostname` over `host`, and set the `port` if needed. + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === 'string') { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + if (proxy.host && proxy.path) { + // If both a `host` and `path` are specified then it's most likely + // the result of a `url.parse()` call... we need to remove the + // `path` portion so that `net.connect()` doesn't attempt to open + // that as a Unix socket file. + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + const parsed = url_1.default.parse(req.path); + if (!parsed.protocol) { + parsed.protocol = 'http:'; + } + if (!parsed.hostname) { + parsed.hostname = opts.hostname || opts.host || null; + } + if (parsed.port == null && typeof opts.port) { + parsed.port = String(opts.port); + } + if (parsed.port === '80') { + // if port is 80, then we can remove the port so that the + // ":80" portion is not on the produced URL + parsed.port = ''; + } + // Change the `http.ClientRequest` instance's "path" field + // to the absolute path of the URL that will be requested. + req.path = url_1.default.format(parsed); + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.auth) { + req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); + } + // Create a socket connection to the proxy server. + let socket; + if (secureProxy) { + debug('Creating `tls.Socket`: %o', proxy); + socket = tls_1.default.connect(proxy); + } + else { + debug('Creating `net.Socket`: %o', proxy); + socket = net_1.default.connect(proxy); + } + // At this point, the http ClientRequest's internal `_header` field + // might have already been set. If this is the case then we'll need + // to re-generate the string since we just changed the `req.path`. + if (req._header) { + let first; + let endOfHeaders; + debug('Regenerating stored HTTP header string for request'); + req._header = null; + req._implicitHeader(); + if (req.output && req.output.length > 0) { + // Node < 12 + debug('Patching connection write() output buffer with updated header'); + first = req.output[0]; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.output[0] = req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.output); + } + else if (req.outputData && req.outputData.length > 0) { + // Node >= 12 + debug('Patching connection write() output buffer with updated header'); + first = req.outputData[0].data; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.outputData[0].data = + req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.outputData[0].data); + } + } + // Wait for the socket's `connect` event, so that this `callback()` + // function throws instead of the `http` request machinery. This is + // important for i.e. `PacProxyAgent` which determines a failed proxy + // connection via the `callback()` function throwing. + yield (0, once_1.default)(socket, 'connect'); + return socket; + }); + } +} +exports["default"] = HttpProxyAgent; +//# sourceMappingURL=agent.js.map - this.message = message; - this.type = type; +/***/ }), - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } +/***/ 42049: +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} +"use strict"; -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const agent_1 = __importDefault(__nccwpck_require__(58949)); +function createHttpProxyAgent(opts) { + return new agent_1.default(opts); +} +(function (createHttpProxyAgent) { + createHttpProxyAgent.HttpProxyAgent = agent_1.default; + createHttpProxyAgent.prototype = agent_1.default.prototype; +})(createHttpProxyAgent || (createHttpProxyAgent = {})); +module.exports = createHttpProxyAgent; +//# sourceMappingURL=index.js.map -let convert; -try { - convert = (__nccwpck_require__(22877).convert); -} catch (e) {} +/***/ }), -const INTERNALS = Symbol('Body internals'); +/***/ 98455: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const net_1 = __importDefault(__nccwpck_require__(41808)); +const tls_1 = __importDefault(__nccwpck_require__(24404)); +const url_1 = __importDefault(__nccwpck_require__(57310)); +const assert_1 = __importDefault(__nccwpck_require__(39491)); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const agent_base_1 = __nccwpck_require__(76503); +const parse_proxy_response_1 = __importDefault(__nccwpck_require__(94037)); +const debug = debug_1.default('https-proxy-agent:agent'); /** - * Body mixin + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. * - * Ref: https://fetch.spec.whatwg.org/#body + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + * + * @api public */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, +class HttpsProxyAgent extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === 'string') { + opts = url_1.default.parse(_opts); + } + else { + opts = _opts; + } + if (!opts) { + throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + } + debug('creating new HttpsProxyAgent instance: %o', opts); + super(opts); + const proxy = Object.assign({}, opts); + // If `true`, then connect to the proxy server over TLS. + // Defaults to `false`. + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + // Prefer `hostname` over `host`, and set the `port` if needed. + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === 'string') { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + // ALPN is supported by Node.js >= v5. + // attempt to negotiate http/1.1 for proxy servers that support http/2 + if (this.secureProxy && !('ALPNProtocols' in proxy)) { + proxy.ALPNProtocols = ['http 1.1']; + } + if (proxy.host && proxy.path) { + // If both a `host` and `path` are specified then it's most likely + // the result of a `url.parse()` call... we need to remove the + // `path` portion so that `net.connect()` doesn't attempt to open + // that as a Unix socket file. + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + // Create a socket connection to the proxy server. + let socket; + if (secureProxy) { + debug('Creating `tls.Socket`: %o', proxy); + socket = tls_1.default.connect(proxy); + } + else { + debug('Creating `net.Socket`: %o', proxy); + socket = net_1.default.connect(proxy); + } + const headers = Object.assign({}, proxy.headers); + const hostname = `${opts.host}:${opts.port}`; + let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.auth) { + headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; + } + // The `Host` header should only include the port + // number when it is not the default port. + let { host, port, secureEndpoint } = opts; + if (!isDefaultPort(port, secureEndpoint)) { + host += `:${port}`; + } + headers.Host = host; + headers.Connection = 'close'; + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r\n`; + } + const proxyResponsePromise = parse_proxy_response_1.default(socket); + socket.write(`${payload}\r\n`); + const { statusCode, buffered } = yield proxyResponsePromise; + if (statusCode === 200) { + req.once('socket', resume); + if (opts.secureEndpoint) { + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + const servername = opts.servername || opts.host; + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, + servername })); + } + return socket; + } + // Some other status code that's not 200... need to re-play the HTTP + // header "data" events onto the socket once the HTTP machinery is + // attached so that the node core `http` can parse and handle the + // error status code. + // Close the original socket, and a new "fake" socket is returned + // instead, so that the proxy doesn't get the HTTP request + // written to it (which may contain `Authorization` headers or other + // sensitive data). + // + // See: https://hackerone.com/reports/541502 + socket.destroy(); + const fakeSocket = new net_1.default.Socket({ writable: false }); + fakeSocket.readable = true; + // Need to wait for the "socket" event to re-play the "data" events. + req.once('socket', (s) => { + debug('replaying proxy buffer for failed request'); + assert_1.default(s.listenerCount('data') > 0); + // Replay the "buffered" Buffer onto the fake `socket`, since at + // this point the HTTP module machinery has been hooked up for + // the user. + s.push(buffered); + s.push(null); + }); + return fakeSocket; + }); + } +} +exports["default"] = HttpsProxyAgent; +function resume(socket) { + socket.resume(); +} +function isDefaultPort(port, secure) { + return Boolean((!secure && port === 80) || (secure && port === 443)); +} +function isHTTPS(protocol) { + return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +} +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=agent.js.map - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; +/***/ }), - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; +/***/ 66202: +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); +"use strict"; -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; +const agent_1 = __importDefault(__nccwpck_require__(98455)); +function createHttpsProxyAgent(opts) { + return new agent_1.default(opts); +} +(function (createHttpsProxyAgent) { + createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; + createHttpsProxyAgent.prototype = agent_1.default.prototype; +})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); +module.exports = createHttpsProxyAgent; +//# sourceMappingURL=index.js.map -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); +/***/ }), - body.on('end', function () { - if (abort) { - return; - } +/***/ 94037: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - clearTimeout(resTimeout); +"use strict"; - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); +function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + // we need to buffer any HTTP traffic that happens with the proxy before we get + // the CONNECT response, so that if the response is anything other than an "200" + // response code, then we can re-play the "data" events on the socket once the + // HTTP parser is hooked up... + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once('readable', read); + } + function cleanup() { + socket.removeListener('end', onend); + socket.removeListener('error', onerror); + socket.removeListener('close', onclose); + socket.removeListener('readable', read); + } + function onclose(err) { + debug('onclose had error %o', err); + } + function onend() { + debug('onend'); + } + function onerror(err) { + cleanup(); + debug('onerror %o', err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf('\r\n\r\n'); + if (endOfHeaders === -1) { + // keep buffering + debug('have not received end of HTTP headers yet...'); + read(); + return; + } + const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); + const statusCode = +firstLine.split(' ')[1]; + debug('got proxy server response: %o', firstLine); + resolve({ + statusCode, + buffered + }); + } + socket.on('error', onerror); + socket.on('close', onclose); + socket.on('end', onend); + read(); + }); } +exports["default"] = parseProxyResponse; +//# sourceMappingURL=parse-proxy-response.js.map -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); +/***/ }), - // html5 - if (!res && str) { - res = / { - // html4 - if (!res && str) { - res = / { +"use strict"; - if (body === null) { - // body is null - return 0; - } else if (isBlob(body)) { - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === 'function') { - // detect form data input from form-data module - if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x - body.hasKnownLength && body.hasKnownLength()) { - // 2.x - return body.getLengthSync(); - } - return null; - } else { - // body is stream - return null; - } -} -/** - * Write a Body to a Node.js WritableStream (e.g. http.Request) object. - * - * @param Body instance Instance of Body - * @return Void - */ -function writeToStream(dest, instance) { - const body = instance.body; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - if (body === null) { - // body is null - dest.end(); - } else if (isBlob(body)) { - body.stream().pipe(dest); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - body.pipe(dest); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); } -// expose Promise -Body.Promise = global.Promise; +var _default = md5; +exports["default"] = _default; -/** - * headers.js - * - * Headers class offers convenient helpers - */ +/***/ }), -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; -const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; +/***/ 54974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function validateName(name) { - name = `${name}`; - if (invalidTokenRegex.test(name) || name === '') { - throw new TypeError(`${name} is not a legal HTTP header name`); - } -} +"use strict"; -function validateValue(value) { - value = `${value}`; - if (invalidHeaderCharRegex.test(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); - } -} -/** - * Find the key in the map object given a header name. - * - * Returns undefined if not found. - * - * @param String name Header name - * @return String|Undefined - */ -function find(map, name) { - name = name.toLowerCase(); - for (const key in map) { - if (key.toLowerCase() === name) { - return key; - } - } - return undefined; -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - this[MAP] = Object.create(null); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); +var _default = { + randomUUID: _crypto.default.randomUUID +}; +exports["default"] = _default; - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } +/***/ }), - return; - } +/***/ 65879: +/***/ ((__unused_webpack_module, exports) => { - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } +"use strict"; - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } +/***/ }), - return this[MAP][key].join(', '); - } +/***/ 50893: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; +"use strict"; - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } +var _validate = _interopRequireDefault(__nccwpck_require__(34875)); - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; } -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); +var _default = parse; +exports["default"] = _default; -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); +/***/ }), -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; +/***/ 47658: +/***/ ((__unused_webpack_module, exports) => { - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} +"use strict"; -const INTERNAL = Symbol('internal'); -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } +/***/ }), - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; +/***/ 82042: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } +"use strict"; - this[INTERNAL].index = index + 1; - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - return obj; +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); } -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; +/***/ }), + +/***/ 26723: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); } -const INTERNALS$1 = Symbol('Response internals'); +var _default = sha1; +exports["default"] = _default; -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; +/***/ }), + +/***/ 5802: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +exports.unsafeStringify = unsafeStringify; + +var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +const byteToHex = []; - Body.call(this, body, opts); +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} - const status = opts.status || 200; - const headers = new Headers(opts.headers); +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } - get url() { - return this[INTERNALS$1].url || ''; - } + return uuid; +} - get status() { - return this[INTERNALS$1].status; - } +var _default = stringify; +exports["default"] = _default; - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } +/***/ }), - get redirected() { - return this[INTERNALS$1].counter > 0; - } +/***/ 70618: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - get statusText() { - return this[INTERNALS$1].statusText; - } +"use strict"; - get headers() { - return this[INTERNALS$1].headers; - } - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -Body.mixIn(Response.prototype); +var _rng = _interopRequireDefault(__nccwpck_require__(82042)); -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); +var _stringify = __nccwpck_require__(5802); -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -const INTERNALS$2 = Symbol('Request internals'); -const URL = Url.URL || whatwgUrl.URL; +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; +let _clockseq; // Previous uuid creation time -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - let parsedURL; - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - const headers = new Headers(init.headers || input.headers || {}); + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; + msecs += 12219292800000; // `time_low` - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` - get method() { - return this[INTERNALS$2].method; - } + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - get headers() { - return this[INTERNALS$2].headers; - } + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - get redirect() { - return this[INTERNALS$2].redirect; - } + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - get signal() { - return this[INTERNALS$2].signal; - } + b[i++] = clockseq & 0xff; // `node` - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.unsafeStringify)(b); } -Body.mixIn(Request.prototype); +var _default = v1; +exports["default"] = _default; -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); +/***/ }), -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); +/***/ 36888: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); +"use strict"; - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } +var _v = _interopRequireDefault(__nccwpck_require__(8392)); - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } +var _md = _interopRequireDefault(__nccwpck_require__(9576)); - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } +/***/ }), - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } +/***/ 8392: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js +"use strict"; - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.URL = exports.DNS = void 0; +exports["default"] = v35; -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); +var _stringify = __nccwpck_require__(5802); - this.type = 'aborted'; - this.message = message; +var _parse = _interopRequireDefault(__nccwpck_require__(50893)); - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; } -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; -const URL$1 = Url.URL || whatwgUrl.URL; +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; + if (typeof value === 'string') { + value = stringToBytes(value); + } -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); -}; + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; - return orig === dest; -}; + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } + return buf; + } - Body.Promise = fetch.Promise; + return (0, _stringify.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support - let response = null; - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} - if (signal && signal.aborted) { - abort(); - return; - } +/***/ }), - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; +/***/ 91186: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // send request - const req = send(options); - let reqTimeout; +"use strict"; - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } +var _native = _interopRequireDefault(__nccwpck_require__(54974)); - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); +var _rng = _interopRequireDefault(__nccwpck_require__(82042)); - if (response && response.body) { - destroyStream(response.body, err); - } +var _stringify = __nccwpck_require__(5802); - finalize(); - }); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); + } - if (response && response.body) { - destroyStream(response.body, err); - } - }); + options = options || {}; - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } - req.on('response', function (res) { - clearTimeout(reqTimeout); + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - const headers = createHeadersLenient(res.headers); + if (buf) { + offset = offset || 0; - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } + return buf; + } - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } + return (0, _stringify.unsafeStringify)(rnds); +} - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } +var _default = v4; +exports["default"] = _default; - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; +/***/ }), - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } +/***/ 92385: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } +"use strict"; - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); +var _v = _interopRequireDefault(__nccwpck_require__(8392)); - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; +var _sha = _interopRequireDefault(__nccwpck_require__(26723)); - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // HTTP-network fetch step 12.1.1.4: handle content codings +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } +/***/ }), - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; +/***/ 34875: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } +"use strict"; - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); - return; - } - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); +var _regex = _interopRequireDefault(__nccwpck_require__(47658)); - writeToStream(req, request); - }); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); } -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; - request.on('socket', function (s) { - socket = s; - }); +var _default = validate; +exports["default"] = _default; - request.on('response', function (response) { - const headers = response.headers; +/***/ }), - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // tests for socket presence, as in some situations the - // the 'socket' event is not triggered for the request - // (happens in deno), avoids `TypeError` - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket && socket.listenerCount('data') > 0; +/***/ 40694: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} +"use strict"; -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -// expose Promise -fetch.Promise = global.Promise; +var _validate = _interopRequireDefault(__nccwpck_require__(34875)); -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; -exports.AbortError = AbortError; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.slice(14, 15), 16); +} +var _default = version; +exports["default"] = _default; /***/ }), -/***/ 42299: +/***/ 84256: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; var punycode = __nccwpck_require__(85477); -var mappingTable = __nccwpck_require__(1907); +var mappingTable = __nccwpck_require__(72020); var PROCESSING_OPTIONS = { TRANSITIONAL: 0, @@ -68008,35509 +50757,40666 @@ module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; /***/ }), -/***/ 15871: +/***/ 4351: /***/ ((module) => { -"use strict"; - - -var conversions = {}; -module.exports = conversions; +/****************************************************************************** +Copyright (c) Microsoft Corporation. -function sign(x) { - return x < 0 ? -1 : 1; -} +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. -function evenRound(x) { - // Round x to the nearest integer, choosing the even integer if it lies halfway between two. - if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) - return Math.floor(x); - } else { - return Math.round(x); +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +var __rewriteRelativeImportExtension; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); } -} - -function createNumberConversion(bitLength, typeOpts) { - if (!typeOpts.unsigned) { - --bitLength; + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); - const upperBound = Math.pow(2, bitLength) - 1; + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); - const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; - return function(V, opts) { - if (!opts) opts = {}; + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; - let x = +V; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - if (opts.enforceRange) { - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite number"); + __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); } - - x = sign(x) * Math.floor(Math.abs(x)); - if (x < lowerBound || x > upperBound) { - throw new TypeError("Argument is not in byte range"); + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; - return x; + __runInitializers = function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); } + return useValue ? value : void 0; + }; - if (!isNaN(x) && opts.clamp) { - x = evenRound(x); + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - if (x < lowerBound) x = lowerBound; - if (x > upperBound) x = upperBound; - return x; - } + __setFunctionName = function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; - if (!Number.isFinite(x) || x === 0) { - return 0; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } + }; - x = sign(x) * Math.floor(Math.abs(x)); - x = x % moduloVal; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - if (!typeOpts.unsigned && x >= moduloBound) { - return x - moduloVal; - } else if (typeOpts.unsigned) { - if (x < 0) { - x += moduloVal; - } else if (x === -0) { // don't return negative zero - return 0; - } + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); - return x; - } -} + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -conversions["void"] = function () { - return undefined; -}; + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -conversions["boolean"] = function (val) { - return !!val; -}; + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -conversions["byte"] = createNumberConversion(8, { unsigned: false }); -conversions["octet"] = createNumberConversion(8, { unsigned: true }); + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; -conversions["short"] = createNumberConversion(16, { unsigned: false }); -conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; -conversions["long"] = createNumberConversion(32, { unsigned: false }); -conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); -conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; -conversions["double"] = function (V) { - const x = +V; + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite floating-point value"); - } + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; - return x; -}; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -conversions["unrestricted double"] = function (V) { - const x = +V; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - if (isNaN(x)) { - throw new TypeError("Argument is NaN"); - } + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; - return x; -}; + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; -// not quite valid, but good enough for JS -conversions["float"] = conversions["double"]; -conversions["unrestricted float"] = conversions["unrestricted double"]; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -conversions["DOMString"] = function (V, opts) { - if (!opts) opts = {}; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - if (opts.treatNullAsEmptyString && V === null) { - return ""; - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - return String(V); -}; + __classPrivateFieldIn = function (state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; -conversions["ByteString"] = function (V, opts) { - const x = String(V); - let c = undefined; - for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { - if (c > 255) { - throw new TypeError("Argument is not a valid bytestring"); + __addDisposableResource = function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); } - } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - return x; -}; + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; -conversions["USVString"] = function (V) { - const S = String(V); - const n = S.length; - const U = []; - for (let i = 0; i < n; ++i) { - const c = S.charCodeAt(i); - if (c < 0xD800 || c > 0xDFFF) { - U.push(String.fromCodePoint(c)); - } else if (0xDC00 <= c && c <= 0xDFFF) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - if (i === n - 1) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - const d = S.charCodeAt(i + 1); - if (0xDC00 <= d && d <= 0xDFFF) { - const a = c & 0x3FF; - const b = d & 0x3FF; - U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); - ++i; - } else { - U.push(String.fromCodePoint(0xFFFD)); + __disposeResources = function (env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); } } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; } - } - - return U.join(''); -}; - -conversions["Date"] = function (V, opts) { - if (!(V instanceof Date)) { - throw new TypeError("Argument is not a Date object"); - } - if (isNaN(V)) { - return undefined; - } + return next(); + }; - return V; -}; + __rewriteRelativeImportExtension = function (path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; + }; -conversions["RegExp"] = function (V, opts) { - if (!(V instanceof RegExp)) { - V = new RegExp(V); - } + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__esDecorate", __esDecorate); + exporter("__runInitializers", __runInitializers); + exporter("__propKey", __propKey); + exporter("__setFunctionName", __setFunctionName); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); + exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); +}); - return V; -}; +0 && (0); /***/ }), -/***/ 58262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 74294: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const usm = __nccwpck_require__(40033); +module.exports = __nccwpck_require__(54219); -exports.implementation = class URLImpl { - constructor(constructorArgs) { - const url = constructorArgs[0]; - const base = constructorArgs[1]; - let parsedBase = null; - if (base !== undefined) { - parsedBase = usm.basicURLParse(base); - if (parsedBase === "failure") { - throw new TypeError("Invalid base URL"); - } - } +/***/ }), - const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); - } +/***/ 54219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this._url = parsedURL; +"use strict"; - // TODO: query stuff - } - get href() { - return usm.serializeURL(this._url); - } +var net = __nccwpck_require__(41808); +var tls = __nccwpck_require__(24404); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var events = __nccwpck_require__(82361); +var assert = __nccwpck_require__(39491); +var util = __nccwpck_require__(73837); - set href(v) { - const parsedURL = usm.basicURLParse(v); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); - } - this._url = parsedURL; - } +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; - get origin() { - return usm.serializeURLOrigin(this._url); - } - get protocol() { - return this._url.scheme + ":"; - } +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} - set protocol(v) { - usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); - } +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} - get username() { - return this._url.username; - } +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} - set username(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} - usm.setTheUsername(this._url, v); - } - get password() { - return this._url.password; - } +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; - set password(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); - usm.setThePassword(this._url, v); +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; } - get host() { - const url = this._url; + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); - if (url.host === null) { - return ""; + function onFree() { + self.emit('free', socket, options); } - if (url.port === null) { - return usm.serializeHost(url.host); + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); } + }); +}; - return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); - } +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); - set host(v) { - if (this._url.cannotBeABaseURL) { - return; + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port } - - usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; } - - get hostname() { - if (this._url.host === null) { - return ""; - } - - return usm.serializeHost(this._url.host); + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); } - set hostname(v) { - if (this._url.cannotBeABaseURL) { - return; - } + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); - usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; } - get port() { - if (this._url.port === null) { - return ""; - } - - return usm.serializeInteger(this._url.port); + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); } - set port(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); return; } - - if (v === "") { - this._url.port = null; - } else { - usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); } - get pathname() { - if (this._url.cannotBeABaseURL) { - return this._url.path[0]; - } - - if (this._url.path.length === 0) { - return ""; - } + function onError(cause) { + connectReq.removeAllListeners(); - return "/" + this._url.path.join("/"); + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); } +}; - set pathname(v) { - if (this._url.cannotBeABaseURL) { - return; - } - - this._url.path = []; - usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; } + this.sockets.splice(pos, 1); - get search() { - if (this._url.query === null || this._url.query === "") { - return ""; - } - - return "?" + this._url.query; + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); } +}; - set search(v) { - // TODO: query stuff +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); - const url = this._url; + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} - if (v === "") { - url.query = null; - return; - } - const input = v[0] === "?" ? v.substring(1) : v; - url.query = ""; - usm.basicURLParse(input, { url, stateOverride: "query" }); +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; } + return host; // for v0.11 or later +} - get hash() { - if (this._url.fragment === null || this._url.fragment === "") { - return ""; +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } } - - return "#" + this._url.fragment; } + return target; +} - set hash(v) { - if (v === "") { - this._url.fragment = null; - return; - } - - const input = v[0] === "#" ? v.substring(1) : v; - this._url.fragment = ""; - usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); - } - toJSON() { - return this.href; +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); } -}; +} else { + debug = function() {}; +} +exports.debug = debug; // for test /***/ }), -/***/ 80653: +/***/ 41773: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const conversions = __nccwpck_require__(15871); -const utils = __nccwpck_require__(60276); -const Impl = __nccwpck_require__(58262); - -const impl = utils.implSymbol; - -function URL(url) { - if (!this || this[impl] || !(this instanceof URL)) { - throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); - } - if (arguments.length < 1) { - throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); - } - const args = []; - for (let i = 0; i < arguments.length && i < 2; ++i) { - args[i] = arguments[i]; - } - args[0] = conversions["USVString"](args[0]); - if (args[1] !== undefined) { - args[1] = conversions["USVString"](args[1]); - } +const Client = __nccwpck_require__(33598) +const Dispatcher = __nccwpck_require__(60412) +const errors = __nccwpck_require__(48045) +const Pool = __nccwpck_require__(4634) +const BalancedPool = __nccwpck_require__(37931) +const Agent = __nccwpck_require__(7890) +const util = __nccwpck_require__(83983) +const { InvalidArgumentError } = errors +const api = __nccwpck_require__(44059) +const buildConnector = __nccwpck_require__(82067) +const MockClient = __nccwpck_require__(58687) +const MockAgent = __nccwpck_require__(66771) +const MockPool = __nccwpck_require__(26193) +const mockErrors = __nccwpck_require__(50888) +const ProxyAgent = __nccwpck_require__(97858) +const RetryHandler = __nccwpck_require__(82286) +const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(21892) +const DecoratorHandler = __nccwpck_require__(46930) +const RedirectHandler = __nccwpck_require__(72860) +const createRedirectInterceptor = __nccwpck_require__(38861) - module.exports.setup(this, args); +let hasCrypto +try { + __nccwpck_require__(6113) + hasCrypto = true +} catch { + hasCrypto = false } -URL.prototype.toJSON = function toJSON() { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - const args = []; - for (let i = 0; i < arguments.length && i < 0; ++i) { - args[i] = arguments[i]; - } - return this[impl].toJSON.apply(this[impl], args); -}; -Object.defineProperty(URL.prototype, "href", { - get() { - return this[impl].href; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].href = V; - }, - enumerable: true, - configurable: true -}); - -URL.prototype.toString = function () { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - return this.href; -}; - -Object.defineProperty(URL.prototype, "origin", { - get() { - return this[impl].origin; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "protocol", { - get() { - return this[impl].protocol; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].protocol = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "username", { - get() { - return this[impl].username; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].username = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "password", { - get() { - return this[impl].password; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].password = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "host", { - get() { - return this[impl].host; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].host = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "hostname", { - get() { - return this[impl].hostname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hostname = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "port", { - get() { - return this[impl].port; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].port = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "pathname", { - get() { - return this[impl].pathname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].pathname = V; - }, - enumerable: true, - configurable: true -}); +Object.assign(Dispatcher.prototype, api) -Object.defineProperty(URL.prototype, "search", { - get() { - return this[impl].search; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].search = V; - }, - enumerable: true, - configurable: true -}); +module.exports.Dispatcher = Dispatcher +module.exports.Client = Client +module.exports.Pool = Pool +module.exports.BalancedPool = BalancedPool +module.exports.Agent = Agent +module.exports.ProxyAgent = ProxyAgent +module.exports.RetryHandler = RetryHandler -Object.defineProperty(URL.prototype, "hash", { - get() { - return this[impl].hash; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hash = V; - }, - enumerable: true, - configurable: true -}); +module.exports.DecoratorHandler = DecoratorHandler +module.exports.RedirectHandler = RedirectHandler +module.exports.createRedirectInterceptor = createRedirectInterceptor +module.exports.buildConnector = buildConnector +module.exports.errors = errors -module.exports = { - is(obj) { - return !!obj && obj[impl] instanceof Impl.implementation; - }, - create(constructorArgs, privateData) { - let obj = Object.create(URL.prototype); - this.setup(obj, constructorArgs, privateData); - return obj; - }, - setup(obj, constructorArgs, privateData) { - if (!privateData) privateData = {}; - privateData.wrapper = obj; +function makeDispatcher (fn) { + return (url, opts, handler) => { + if (typeof opts === 'function') { + handler = opts + opts = null + } - obj[impl] = new Impl.implementation(constructorArgs, privateData); - obj[impl][utils.wrapperSymbol] = obj; - }, - interface: URL, - expose: { - Window: { URL: URL }, - Worker: { URL: URL } - } -}; + if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { + throw new InvalidArgumentError('invalid url') + } + if (opts != null && typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + if (opts && opts.path != null) { + if (typeof opts.path !== 'string') { + throw new InvalidArgumentError('invalid opts.path') + } -/***/ }), + let path = opts.path + if (!opts.path.startsWith('/')) { + path = `/${path}` + } -/***/ 73323: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + url = new URL(util.parseOrigin(url).origin + path) + } else { + if (!opts) { + opts = typeof url === 'object' ? url : {} + } -"use strict"; + url = util.parseURL(url) + } + const { agent, dispatcher = getGlobalDispatcher() } = opts -exports.URL = __nccwpck_require__(80653)["interface"]; -exports.serializeURL = __nccwpck_require__(40033).serializeURL; -exports.serializeURLOrigin = __nccwpck_require__(40033).serializeURLOrigin; -exports.basicURLParse = __nccwpck_require__(40033).basicURLParse; -exports.setTheUsername = __nccwpck_require__(40033).setTheUsername; -exports.setThePassword = __nccwpck_require__(40033).setThePassword; -exports.serializeHost = __nccwpck_require__(40033).serializeHost; -exports.serializeInteger = __nccwpck_require__(40033).serializeInteger; -exports.parseURL = __nccwpck_require__(40033).parseURL; + if (agent) { + throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') + } + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? 'PUT' : 'GET') + }, handler) + } +} -/***/ }), +module.exports.setGlobalDispatcher = setGlobalDispatcher +module.exports.getGlobalDispatcher = getGlobalDispatcher -/***/ 40033: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { + let fetchImpl = null + module.exports.fetch = async function fetch (resource) { + if (!fetchImpl) { + fetchImpl = (__nccwpck_require__(74881).fetch) + } -"use strict"; + try { + return await fetchImpl(...arguments) + } catch (err) { + if (typeof err === 'object') { + Error.captureStackTrace(err, this) + } -const punycode = __nccwpck_require__(85477); -const tr46 = __nccwpck_require__(42299); + throw err + } + } + module.exports.Headers = __nccwpck_require__(10554).Headers + module.exports.Response = __nccwpck_require__(27823).Response + module.exports.Request = __nccwpck_require__(48359).Request + module.exports.FormData = __nccwpck_require__(72015).FormData + module.exports.File = __nccwpck_require__(78511).File + module.exports.FileReader = __nccwpck_require__(1446).FileReader -const specialSchemes = { - ftp: 21, - file: null, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; + const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(71246) -const failure = Symbol("failure"); + module.exports.setGlobalOrigin = setGlobalOrigin + module.exports.getGlobalOrigin = getGlobalOrigin -function countSymbols(str) { - return punycode.ucs2.decode(str).length; -} + const { CacheStorage } = __nccwpck_require__(37907) + const { kConstruct } = __nccwpck_require__(29174) -function at(input, idx) { - const c = input[idx]; - return isNaN(c) ? undefined : String.fromCodePoint(c); + // Cache & CacheStorage are tightly coupled with fetch. Even if it may run + // in an older version of Node, it doesn't have any use without fetch. + module.exports.caches = new CacheStorage(kConstruct) } -function isASCIIDigit(c) { - return c >= 0x30 && c <= 0x39; -} +if (util.nodeMajor >= 16) { + const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(41724) -function isASCIIAlpha(c) { - return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); -} + module.exports.deleteCookie = deleteCookie + module.exports.getCookies = getCookies + module.exports.getSetCookies = getSetCookies + module.exports.setCookie = setCookie -function isASCIIAlphanumeric(c) { - return isASCIIAlpha(c) || isASCIIDigit(c); -} + const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) -function isASCIIHex(c) { - return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); + module.exports.parseMIMEType = parseMIMEType + module.exports.serializeAMimeType = serializeAMimeType } -function isSingleDot(buffer) { - return buffer === "." || buffer.toLowerCase() === "%2e"; -} +if (util.nodeMajor >= 18 && hasCrypto) { + const { WebSocket } = __nccwpck_require__(54284) -function isDoubleDot(buffer) { - buffer = buffer.toLowerCase(); - return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; + module.exports.WebSocket = WebSocket } -function isWindowsDriveLetterCodePoints(cp1, cp2) { - return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); -} +module.exports.request = makeDispatcher(api.request) +module.exports.stream = makeDispatcher(api.stream) +module.exports.pipeline = makeDispatcher(api.pipeline) +module.exports.connect = makeDispatcher(api.connect) +module.exports.upgrade = makeDispatcher(api.upgrade) -function isWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); -} +module.exports.MockClient = MockClient +module.exports.MockPool = MockPool +module.exports.MockAgent = MockAgent +module.exports.mockErrors = mockErrors -function isNormalizedWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; -} -function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; -} +/***/ }), -function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; -} +/***/ 7890: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function isSpecialScheme(scheme) { - return specialSchemes[scheme] !== undefined; -} +"use strict"; -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} -function defaultPort(scheme) { - return specialSchemes[scheme]; -} +const { InvalidArgumentError } = __nccwpck_require__(48045) +const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(72785) +const DispatcherBase = __nccwpck_require__(74839) +const Pool = __nccwpck_require__(4634) +const Client = __nccwpck_require__(33598) +const util = __nccwpck_require__(83983) +const createRedirectInterceptor = __nccwpck_require__(38861) +const { WeakRef, FinalizationRegistry } = __nccwpck_require__(56436)() -function percentEncode(c) { - let hex = c.toString(16).toUpperCase(); - if (hex.length === 1) { - hex = "0" + hex; - } +const kOnConnect = Symbol('onConnect') +const kOnDisconnect = Symbol('onDisconnect') +const kOnConnectionError = Symbol('onConnectionError') +const kMaxRedirections = Symbol('maxRedirections') +const kOnDrain = Symbol('onDrain') +const kFactory = Symbol('factory') +const kFinalizer = Symbol('finalizer') +const kOptions = Symbol('options') - return "%" + hex; +function defaultFactory (origin, opts) { + return opts && opts.connections === 1 + ? new Client(origin, opts) + : new Pool(origin, opts) } -function utf8PercentEncode(c) { - const buf = new Buffer(c); - - let str = ""; +class Agent extends DispatcherBase { + constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + super() - for (let i = 0; i < buf.length; ++i) { - str += percentEncode(buf[i]); - } + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } - return str; -} + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') + } -function utf8PercentDecode(str) { - const input = new Buffer(str); - const output = []; - for (let i = 0; i < input.length; ++i) { - if (input[i] !== 37) { - output.push(input[i]); - } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { - output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); - i += 2; - } else { - output.push(input[i]); + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { + throw new InvalidArgumentError('maxRedirections must be a positive number') } - } - return new Buffer(output).toString(); -} -function isC0ControlPercentEncode(c) { - return c <= 0x1F || c > 0x7E; -} + if (connect && typeof connect !== 'function') { + connect = { ...connect } + } -const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); -function isPathPercentEncode(c) { - return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); -} + this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) + ? options.interceptors.Agent + : [createRedirectInterceptor({ maxRedirections })] -const extraUserinfoPercentEncodeSet = - new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); -function isUserinfoPercentEncode(c) { - return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); -} + this[kOptions] = { ...util.deepClone(options), connect } + this[kOptions].interceptors = options.interceptors + ? { ...options.interceptors } + : undefined + this[kMaxRedirections] = maxRedirections + this[kFactory] = factory + this[kClients] = new Map() + this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => { + const ref = this[kClients].get(key) + if (ref !== undefined && ref.deref() === undefined) { + this[kClients].delete(key) + } + }) -function percentEncodeChar(c, encodeSetPredicate) { - const cStr = String.fromCodePoint(c); + const agent = this - if (encodeSetPredicate(c)) { - return utf8PercentEncode(cStr); - } + this[kOnDrain] = (origin, targets) => { + agent.emit('drain', origin, [agent, ...targets]) + } - return cStr; -} + this[kOnConnect] = (origin, targets) => { + agent.emit('connect', origin, [agent, ...targets]) + } -function parseIPv4Number(input) { - let R = 10; + this[kOnDisconnect] = (origin, targets, err) => { + agent.emit('disconnect', origin, [agent, ...targets], err) + } - if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { - input = input.substring(2); - R = 16; - } else if (input.length >= 2 && input.charAt(0) === "0") { - input = input.substring(1); - R = 8; + this[kOnConnectionError] = (origin, targets, err) => { + agent.emit('connectionError', origin, [agent, ...targets], err) + } } - if (input === "") { - return 0; + get [kRunning] () { + let ret = 0 + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore next: gc is undeterministic */ + if (client) { + ret += client[kRunning] + } + } + return ret } - const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); - if (regex.test(input)) { - return failure; - } + [kDispatch] (opts, handler) { + let key + if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { + key = String(opts.origin) + } else { + throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') + } - return parseInt(input, R); -} + const ref = this[kClients].get(key) -function parseIPv4(input) { - const parts = input.split("."); - if (parts[parts.length - 1] === "") { - if (parts.length > 1) { - parts.pop(); + let dispatcher = ref ? ref.deref() : null + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]) + .on('drain', this[kOnDrain]) + .on('connect', this[kOnConnect]) + .on('disconnect', this[kOnDisconnect]) + .on('connectionError', this[kOnConnectionError]) + + this[kClients].set(key, new WeakRef(dispatcher)) + this[kFinalizer].register(dispatcher, key) } - } - if (parts.length > 4) { - return input; + return dispatcher.dispatch(opts, handler) } - const numbers = []; - for (const part of parts) { - if (part === "") { - return input; - } - const n = parseIPv4Number(part); - if (n === failure) { - return input; + async [kClose] () { + const closePromises = [] + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore else: gc is undeterministic */ + if (client) { + closePromises.push(client.close()) + } } - numbers.push(n); + await Promise.all(closePromises) } - for (let i = 0; i < numbers.length - 1; ++i) { - if (numbers[i] > 255) { - return failure; + async [kDestroy] (err) { + const destroyPromises = [] + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore else: gc is undeterministic */ + if (client) { + destroyPromises.push(client.destroy(err)) + } } + + await Promise.all(destroyPromises) } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - return failure; +} + +module.exports = Agent + + +/***/ }), + +/***/ 7032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { addAbortListener } = __nccwpck_require__(83983) +const { RequestAbortedError } = __nccwpck_require__(48045) + +const kListener = Symbol('kListener') +const kSignal = Symbol('kSignal') + +function abort (self) { + if (self.abort) { + self.abort() + } else { + self.onError(new RequestAbortedError()) } +} - let ipv4 = numbers.pop(); - let counter = 0; +function addSignal (self, signal) { + self[kSignal] = null + self[kListener] = null - for (const n of numbers) { - ipv4 += n * Math.pow(256, 3 - counter); - ++counter; + if (!signal) { + return } - return ipv4; + if (signal.aborted) { + abort(self) + return + } + + self[kSignal] = signal + self[kListener] = () => { + abort(self) + } + + addAbortListener(self[kSignal], self[kListener]) } -function serializeIPv4(address) { - let output = ""; - let n = address; +function removeSignal (self) { + if (!self[kSignal]) { + return + } - for (let i = 1; i <= 4; ++i) { - output = String(n % 256) + output; - if (i !== 4) { - output = "." + output; - } - n = Math.floor(n / 256); + if ('removeEventListener' in self[kSignal]) { + self[kSignal].removeEventListener('abort', self[kListener]) + } else { + self[kSignal].removeListener('abort', self[kListener]) } - return output; + self[kSignal] = null + self[kListener] = null } -function parseIPv6(input) { - const address = [0, 0, 0, 0, 0, 0, 0, 0]; - let pieceIndex = 0; - let compress = null; - let pointer = 0; +module.exports = { + addSignal, + removeSignal +} - input = punycode.ucs2.decode(input); - if (input[pointer] === 58) { - if (input[pointer + 1] !== 58) { - return failure; - } +/***/ }), - pointer += 2; - ++pieceIndex; - compress = pieceIndex; - } +/***/ 29744: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - while (pointer < input.length) { - if (pieceIndex === 8) { - return failure; - } +"use strict"; - if (input[pointer] === 58) { - if (compress !== null) { - return failure; - } - ++pointer; - ++pieceIndex; - compress = pieceIndex; - continue; - } - let value = 0; - let length = 0; +const { AsyncResource } = __nccwpck_require__(50852) +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { addSignal, removeSignal } = __nccwpck_require__(7032) - while (length < 4 && isASCIIHex(input[pointer])) { - value = value * 0x10 + parseInt(at(input, pointer), 16); - ++pointer; - ++length; +class ConnectHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') } - if (input[pointer] === 46) { - if (length === 0) { - return failure; - } + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } - pointer -= length; + const { signal, opaque, responseHeaders } = opts - if (pieceIndex > 6) { - return failure; - } + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } - let numbersSeen = 0; + super('UNDICI_CONNECT') - while (input[pointer] !== undefined) { - let ipv4Piece = null; + this.opaque = opaque || null + this.responseHeaders = responseHeaders || null + this.callback = callback + this.abort = null - if (numbersSeen > 0) { - if (input[pointer] === 46 && numbersSeen < 4) { - ++pointer; - } else { - return failure; - } - } + addSignal(this, signal) + } - if (!isASCIIDigit(input[pointer])) { - return failure; - } + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } - while (isASCIIDigit(input[pointer])) { - const number = parseInt(at(input, pointer)); - if (ipv4Piece === null) { - ipv4Piece = number; - } else if (ipv4Piece === 0) { - return failure; - } else { - ipv4Piece = ipv4Piece * 10 + number; - } - if (ipv4Piece > 255) { - return failure; - } - ++pointer; - } + this.abort = abort + this.context = context + } - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; + onHeaders () { + throw new SocketError('bad connect', null) + } - ++numbersSeen; + onUpgrade (statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this - if (numbersSeen === 2 || numbersSeen === 4) { - ++pieceIndex; - } - } + removeSignal(this) - if (numbersSeen !== 4) { - return failure; - } + this.callback = null - break; - } else if (input[pointer] === 58) { - ++pointer; - if (input[pointer] === undefined) { - return failure; - } - } else if (input[pointer] !== undefined) { - return failure; + let headers = rawHeaders + // Indicates is an HTTP2Session + if (headers != null) { + headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) } - address[pieceIndex] = value; - ++pieceIndex; + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }) } - if (compress !== null) { - let swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; - address[pieceIndex] = temp; - --pieceIndex; - --swaps; + onError (err) { + const { callback, opaque } = this + + removeSignal(this) + + if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) } - } else if (compress === null && pieceIndex !== 8) { - return failure; } - - return address; } -function serializeIPv6(address) { - let output = ""; - const seqResult = findLongestZeroSequence(address); - const compress = seqResult.idx; - let ignore0 = false; +function connect (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } - for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { - if (ignore0 && address[pieceIndex] === 0) { - continue; - } else if (ignore0) { - ignore0 = false; + try { + const connectHandler = new ConnectHandler(opts, callback) + this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) + } catch (err) { + if (typeof callback !== 'function') { + throw err } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} - if (compress === pieceIndex) { - const separator = pieceIndex === 0 ? "::" : ":"; - output += separator; - ignore0 = true; - continue; - } +module.exports = connect - output += address[pieceIndex].toString(16); - if (pieceIndex !== 7) { - output += ":"; - } - } +/***/ }), - return output; -} +/***/ 28752: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function parseHost(input, isSpecialArg) { - if (input[0] === "[") { - if (input[input.length - 1] !== "]") { - return failure; - } +"use strict"; - return parseIPv6(input.substring(1, input.length - 1)); - } - if (!isSpecialArg) { - return parseOpaqueHost(input); - } +const { + Readable, + Duplex, + PassThrough +} = __nccwpck_require__(12781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) +const assert = __nccwpck_require__(39491) - const domain = utf8PercentDecode(input); - const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); - if (asciiDomain === null) { - return failure; - } +const kResume = Symbol('resume') - if (containsForbiddenHostCodePoint(asciiDomain)) { - return failure; - } +class PipelineRequest extends Readable { + constructor () { + super({ autoDestroy: true }) - const ipv4Host = parseIPv4(asciiDomain); - if (typeof ipv4Host === "number" || ipv4Host === failure) { - return ipv4Host; + this[kResume] = null } - return asciiDomain; -} + _read () { + const { [kResume]: resume } = this -function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { - return failure; + if (resume) { + this[kResume] = null + resume() + } } - let output = ""; - const decoded = punycode.ucs2.decode(input); - for (let i = 0; i < decoded.length; ++i) { - output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + _destroy (err, callback) { + this._read() + + callback(err) } - return output; } -function findLongestZeroSequence(arr) { - let maxIdx = null; - let maxLen = 1; // only find elements > 1 - let currStart = null; - let currLen = 0; +class PipelineResponse extends Readable { + constructor (resume) { + super({ autoDestroy: true }) + this[kResume] = resume + } - for (let i = 0; i < arr.length; ++i) { - if (arr[i] !== 0) { - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } + _read () { + this[kResume]() + } - currStart = null; - currLen = 0; - } else { - if (currStart === null) { - currStart = i; - } - ++currLen; + _destroy (err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() } - } - // if trailing zeros - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; + callback(err) } - - return { - idx: maxIdx, - len: maxLen - }; } -function serializeHost(host) { - if (typeof host === "number") { - return serializeIPv4(host); - } +class PipelineHandler extends AsyncResource { + constructor (opts, handler) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } - // IPv6 serializer - if (host instanceof Array) { - return "[" + serializeIPv6(host) + "]"; - } + if (typeof handler !== 'function') { + throw new InvalidArgumentError('invalid handler') + } - return host; -} + const { signal, method, opaque, onInfo, responseHeaders } = opts -function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); -} + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } -function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); -} + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } -function shortenPath(url) { - const path = url.path; - if (path.length === 0) { - return; - } - if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { - return; - } + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } - path.pop(); -} + super('UNDICI_PIPELINE') -function includesCredentials(url) { - return url.username !== "" || url.password !== ""; -} + this.opaque = opaque || null + this.responseHeaders = responseHeaders || null + this.handler = handler + this.abort = null + this.context = null + this.onInfo = onInfo || null -function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; -} + this.req = new PipelineRequest().on('error', util.nop) -function isNormalizedWindowsDriveLetter(string) { - return /^[A-Za-z]:$/.test(string); -} + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this -function URLStateMachine(input, base, encodingOverride, url, stateOverride) { - this.pointer = 0; - this.input = input; - this.base = base || null; - this.encodingOverride = encodingOverride || "utf-8"; - this.stateOverride = stateOverride; - this.url = url; - this.failure = false; - this.parseError = false; + if (body && body.resume) { + body.resume() + } + }, + write: (chunk, encoding, callback) => { + const { req } = this - if (!this.url) { - this.url = { - scheme: "", - username: "", - password: "", - host: null, - port: null, - path: [], - query: null, - fragment: null, + if (req.push(chunk, encoding) || req._readableState.destroyed) { + callback() + } else { + req[kResume] = callback + } + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this - cannotBeABaseURL: false - }; + if (!err && !ret._readableState.endEmitted) { + err = new RequestAbortedError() + } - const res = trimControlChars(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - } + if (abort && err) { + abort() + } - const res = trimTabAndNewline(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; + util.destroy(body, err) + util.destroy(req, err) + util.destroy(res, err) - this.state = stateOverride || "scheme start"; + removeSignal(this) - this.buffer = ""; - this.atFlag = false; - this.arrFlag = false; - this.passwordTokenSeenFlag = false; + callback(err) + } + }).on('prefinish', () => { + const { req } = this - this.input = punycode.ucs2.decode(this.input); + // Node < 15 does not call _final in same tick. + req.push(null) + }) - for (; this.pointer <= this.input.length; ++this.pointer) { - const c = this.input[this.pointer]; - const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); + this.res = null - // exec state machine - const ret = this["parse " + this.state](c, cStr); - if (!ret) { - break; // terminate algorithm - } else if (ret === failure) { - this.failure = true; - break; - } + addSignal(this, signal) } -} -URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { - if (isASCIIAlpha(c)) { - this.buffer += cStr.toLowerCase(); - this.state = "scheme"; - } else if (!this.stateOverride) { - this.state = "no scheme"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } + onConnect (abort, context) { + const { ret, res } = this - return true; -}; + assert(!res, 'pipeline cannot be retried') -URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { - if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { - this.buffer += cStr.toLowerCase(); - } else if (c === 58) { - if (this.stateOverride) { - if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { - return false; - } + if (ret.destroyed) { + throw new RequestAbortedError() + } - if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { - return false; - } + this.abort = abort + this.context = context + } - if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { - return false; - } + onHeaders (statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this - if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { - return false; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + this.onInfo({ statusCode, headers }) } + return } - this.url.scheme = this.buffer; - this.buffer = ""; - if (this.stateOverride) { - return false; + + this.res = new PipelineResponse(resume) + + let body + try { + this.handler = null + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }) + } catch (err) { + this.res.on('error', util.nop) + throw err } - if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { - this.parseError = true; - } - this.state = "file"; - } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { - this.state = "special relative or authority"; - } else if (isSpecial(this.url)) { - this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === 47) { - this.state = "path or authority"; - ++this.pointer; - } else { - this.url.cannotBeABaseURL = true; - this.url.path.push(""); - this.state = "cannot-be-a-base-URL path"; + + if (!body || typeof body.on !== 'function') { + throw new InvalidReturnValueError('expected Readable') } - } else if (!this.stateOverride) { - this.buffer = ""; - this.state = "no scheme"; - this.pointer = -1; - } else { - this.parseError = true; - return failure; - } - return true; -}; + body + .on('data', (chunk) => { + const { ret, body } = this -URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { - if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { - return failure; - } else if (this.base.cannotBeABaseURL && c === 35) { - this.url.scheme = this.base.scheme; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.url.cannotBeABaseURL = true; - this.state = "fragment"; - } else if (this.base.scheme === "file") { - this.state = "file"; - --this.pointer; - } else { - this.state = "relative"; - --this.pointer; - } + if (!ret.push(chunk) && body.pause) { + body.pause() + } + }) + .on('error', (err) => { + const { ret } = this - return true; -}; + util.destroy(ret, err) + }) + .on('end', () => { + const { ret } = this -URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "relative"; - --this.pointer; - } + ret.push(null) + }) + .on('close', () => { + const { ret } = this - return true; -}; + if (!ret._readableState.ended) { + util.destroy(ret, new RequestAbortedError()) + } + }) -URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { - if (c === 47) { - this.state = "authority"; - } else { - this.state = "path"; - --this.pointer; + this.body = body + } + + onData (chunk) { + const { res } = this + return res.push(chunk) } - return true; -}; + onComplete (trailers) { + const { res } = this + res.push(null) + } -URLStateMachine.prototype["parse relative"] = function parseRelative(c) { - this.url.scheme = this.base.scheme; - if (isNaN(c)) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 47) { - this.state = "relative slash"; - } else if (c === 63) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else if (isSpecial(this.url) && c === 92) { - this.parseError = true; - this.state = "relative slash"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(0, this.base.path.length - 1); + onError (err) { + const { ret } = this + this.handler = null + util.destroy(ret, err) + } +} - this.state = "path"; - --this.pointer; +function pipeline (opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler) + this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) + return pipelineHandler.ret + } catch (err) { + return new PassThrough().destroy(err) } +} - return true; -}; +module.exports = pipeline -URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { - if (isSpecial(this.url) && (c === 47 || c === 92)) { - if (c === 92) { - this.parseError = true; - } - this.state = "special authority ignore slashes"; - } else if (c === 47) { - this.state = "authority"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.state = "path"; - --this.pointer; - } - return true; -}; +/***/ }), -URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "special authority ignore slashes"; - --this.pointer; - } +/***/ 55448: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return true; -}; +"use strict"; -URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { - if (c !== 47 && c !== 92) { - this.state = "authority"; - --this.pointer; - } else { - this.parseError = true; - } - return true; -}; +const Readable = __nccwpck_require__(73858) +const { + InvalidArgumentError, + RequestAbortedError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) -URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { - if (c === 64) { - this.parseError = true; - if (this.atFlag) { - this.buffer = "%40" + this.buffer; +class RequestHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') } - this.atFlag = true; - // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars - const len = countSymbols(this.buffer); - for (let pointer = 0; pointer < len; ++pointer) { - const codePoint = this.buffer.codePointAt(pointer); + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - if (codePoint === 58 && !this.passwordTokenSeenFlag) { - this.passwordTokenSeenFlag = true; - continue; + try { + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') } - const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); - if (this.passwordTokenSeenFlag) { - this.url.password += encodedCodePoints; - } else { - this.url.username += encodedCodePoints; + + if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { + throw new InvalidArgumentError('invalid highWaterMark') } - } - this.buffer = ""; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - if (this.atFlag && this.buffer === "") { - this.parseError = true; - return failure; - } - this.pointer -= countSymbols(this.buffer) + 1; - this.buffer = ""; - this.state = "host"; - } else { - this.buffer += cStr; - } - return true; -}; + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } -URLStateMachine.prototype["parse hostname"] = -URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { - if (this.stateOverride && this.url.scheme === "file") { - --this.pointer; - this.state = "file host"; - } else if (c === 58 && !this.arrFlag) { - if (this.buffer === "") { - this.parseError = true; - return failure; - } + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } - this.url.host = host; - this.buffer = ""; - this.state = "port"; - if (this.stateOverride === "hostname") { - return false; - } - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - --this.pointer; - if (isSpecial(this.url) && this.buffer === "") { - this.parseError = true; - return failure; - } else if (this.stateOverride && this.buffer === "" && - (includesCredentials(this.url) || this.url.port !== null)) { - this.parseError = true; - return false; + super('UNDICI_REQUEST') + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on('error', util.nop), err) + } + throw err } - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.callback = callback + this.res = null + this.abort = null + this.body = body + this.trailers = {} + this.context = null + this.onInfo = onInfo || null + this.throwOnError = throwOnError + this.highWaterMark = highWaterMark - this.url.host = host; - this.buffer = ""; - this.state = "path start"; - if (this.stateOverride) { - return false; - } - } else { - if (c === 91) { - this.arrFlag = true; - } else if (c === 93) { - this.arrFlag = false; + if (util.isStream(body)) { + body.on('error', (err) => { + this.onError(err) + }) } - this.buffer += cStr; - } - return true; -}; + addSignal(this, signal) + } -URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { - if (isASCIIDigit(c)) { - this.buffer += cStr; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92) || - this.stateOverride) { - if (this.buffer !== "") { - const port = parseInt(this.buffer); - if (port > Math.pow(2, 16) - 1) { - this.parseError = true; - return failure; - } - this.url.port = port === defaultPort(this.url.scheme) ? null : port; - this.buffer = ""; - } - if (this.stateOverride) { - return false; + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() } - this.state = "path start"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - return true; -}; + this.abort = abort + this.context = context + } -const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this -URLStateMachine.prototype["parse file"] = function parseFile(c) { - this.url.scheme = "file"; + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file slash"; - } else if (this.base !== null && this.base.scheme === "file") { - if (isNaN(c)) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 63) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else { - if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points - !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || - (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points - !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - shortenPath(this.url); - } else { - this.parseError = true; + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }) } - - this.state = "path"; - --this.pointer; + return } - } else { - this.state = "path"; - --this.pointer; - } - return true; -}; + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + const body = new Readable({ resume, abort, contentType, highWaterMark }) -URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file host"; - } else { - if (this.base !== null && this.base.scheme === "file") { - if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { - this.url.path.push(this.base.path[0]); + this.callback = null + this.res = body + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope(getResolveErrorBodyCallback, null, + { callback, body, contentType, statusCode, statusMessage, headers } + ) } else { - this.url.host = this.base.host; + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body, + context + }) } } - this.state = "path"; - --this.pointer; } - return true; -}; + onData (chunk) { + const { res } = this + return res.push(chunk) + } -URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { - if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { - --this.pointer; - if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { - this.parseError = true; - this.state = "path"; - } else if (this.buffer === "") { - this.url.host = ""; - if (this.stateOverride) { - return false; - } - this.state = "path start"; - } else { - let host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - if (host === "localhost") { - host = ""; - } - this.url.host = host; + onComplete (trailers) { + const { res } = this - if (this.stateOverride) { - return false; - } + removeSignal(this) - this.buffer = ""; - this.state = "path start"; - } - } else { - this.buffer += cStr; + util.parseHeaders(trailers, this.trailers) + + res.push(null) } - return true; -}; + onError (err) { + const { res, callback, body, opaque } = this -URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { - if (isSpecial(this.url)) { - if (c === 92) { - this.parseError = true; + removeSignal(this) + + if (callback) { + // TODO: Does this need queueMicrotask? + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) } - this.state = "path"; - if (c !== 47 && c !== 92) { - --this.pointer; + if (res) { + this.res = null + // Ensure all queued handlers are invoked before destroying res. + queueMicrotask(() => { + util.destroy(res, err) + }) } - } else if (!this.stateOverride && c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (!this.stateOverride && c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else if (c !== undefined) { - this.state = "path"; - if (c !== 47) { - --this.pointer; + + if (body) { + this.body = null + util.destroy(body, err) } } +} - return true; -}; +function request (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } -URLStateMachine.prototype["parse path"] = function parsePath(c) { - if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || - (!this.stateOverride && (c === 63 || c === 35))) { - if (isSpecial(this.url) && c === 92) { - this.parseError = true; + try { + this.dispatch(opts, new RequestHandler(opts, callback)) + } catch (err) { + if (typeof callback !== 'function') { + throw err } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} - if (isDoubleDot(this.buffer)) { - shortenPath(this.url); - if (c !== 47 && !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } - } else if (isSingleDot(this.buffer) && c !== 47 && - !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } else if (!isSingleDot(this.buffer)) { - if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { - if (this.url.host !== "" && this.url.host !== null) { - this.parseError = true; - this.url.host = ""; - } - this.buffer = this.buffer[0] + ":"; - } - this.url.path.push(this.buffer); - } - this.buffer = ""; - if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { - while (this.url.path.length > 1 && this.url.path[0] === "") { - this.parseError = true; - this.url.path.shift(); - } - } - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. +module.exports = request +module.exports.RequestHandler = RequestHandler + + +/***/ }), + +/***/ 75395: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { finished, PassThrough } = __nccwpck_require__(12781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; +class StreamHandler extends AsyncResource { + constructor (opts, factory, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') } - this.buffer += percentEncodeChar(c, isPathPercentEncode); - } - - return true; -}; + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts -URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else { - // TODO: Add: not a URL code point - if (!isNaN(c) && c !== 37) { - this.parseError = true; - } + try { + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } + if (typeof factory !== 'function') { + throw new InvalidArgumentError('invalid factory') + } - if (!isNaN(c)) { - this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); - } - } + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } - return true; -}; + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } -URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { - if (isNaN(c) || (!this.stateOverride && c === 35)) { - if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { - this.encodingOverride = "utf-8"; - } + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } - const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || - buffer[i] === 0x3C || buffer[i] === 0x3E) { - this.url.query += percentEncode(buffer[i]); - } else { - this.url.query += String.fromCodePoint(buffer[i]); + super('UNDICI_STREAM') + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on('error', util.nop), err) } + throw err } - this.buffer = ""; - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.factory = factory + this.callback = callback + this.res = null + this.abort = null + this.context = null + this.trailers = null + this.body = body + this.onInfo = onInfo || null + this.throwOnError = throwOnError || false + + if (util.isStream(body)) { + body.on('error', (err) => { + this.onError(err) + }) } - this.buffer += cStr; + addSignal(this, signal) } - return true; -}; - -URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() } - this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); + this.abort = abort + this.context = context } - return true; -}; + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this -function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { - output += "//"; + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }) } - output += "@"; + return } - output += serializeHost(url.host); + this.factory = null - if (url.port !== null) { - output += ":" + url.port; - } - } else if (url.host === null && url.scheme === "file") { - output += "//"; - } + let res - if (url.cannotBeABaseURL) { - output += url.path[0]; - } else { - for (const string of url.path) { - output += "/" + string; + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + res = new PassThrough() + + this.callback = null + this.runInAsyncScope(getResolveErrorBodyCallback, null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ) + } else { + if (factory === null) { + return + } + + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }) + + if ( + !res || + typeof res.write !== 'function' || + typeof res.end !== 'function' || + typeof res.on !== 'function' + ) { + throw new InvalidReturnValueError('expected Writable') + } + + // TODO: Avoid finished. It registers an unnecessary amount of listeners. + finished(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this + + this.res = null + if (err || !res.readable) { + util.destroy(res, err) + } + + this.callback = null + this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) + + if (err) { + abort() + } + }) } - } - if (url.query !== null) { - output += "?" + url.query; + res.on('drain', resume) + + this.res = res + + const needDrain = res.writableNeedDrain !== undefined + ? res.writableNeedDrain + : res._writableState && res._writableState.needDrain + + return needDrain !== true } - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; + onData (chunk) { + const { res } = this + + return res ? res.write(chunk) : true } - return output; -} + onComplete (trailers) { + const { res } = this -function serializeOrigin(tuple) { - let result = tuple.scheme + "://"; - result += serializeHost(tuple.host); + removeSignal(this) - if (tuple.port !== null) { - result += ":" + tuple.port; + if (!res) { + return + } + + this.trailers = util.parseHeaders(trailers) + + res.end() } - return result; -} + onError (err) { + const { res, callback, opaque, body } = this -module.exports.serializeURL = serializeURL; + removeSignal(this) -module.exports.serializeURLOrigin = function (url) { - // https://url.spec.whatwg.org/#concept-url-origin - switch (url.scheme) { - case "blob": - try { - return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); - } catch (e) { - // serializing an opaque origin returns "null" - return "null"; - } - case "ftp": - case "gopher": - case "http": - case "https": - case "ws": - case "wss": - return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port - }); - case "file": - // spec says "exercise to the reader", chrome says "file://" - return "file://"; - default: - // serializing an opaque origin returns "null" - return "null"; + this.factory = null + + if (res) { + this.res = null + util.destroy(res, err) + } else if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + + if (body) { + this.body = null + util.destroy(body, err) + } } -}; +} -module.exports.basicURLParse = function (input, options) { - if (options === undefined) { - options = {}; +function stream (opts, factory, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) } - const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); - if (usm.failure) { - return "failure"; + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) } +} - return usm.url; -}; +module.exports = stream -module.exports.setTheUsername = function (url, username) { - url.username = ""; - const decoded = punycode.ucs2.decode(username); - for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; -module.exports.setThePassword = function (url, password) { - url.password = ""; - const decoded = punycode.ucs2.decode(password); - for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; +/***/ }), -module.exports.serializeHost = serializeHost; +/***/ 36923: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; +"use strict"; -module.exports.serializeInteger = function (integer) { - return String(integer); -}; -module.exports.parseURL = function (input, options) { - if (options === undefined) { - options = {}; - } +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) +const { AsyncResource } = __nccwpck_require__(50852) +const util = __nccwpck_require__(83983) +const { addSignal, removeSignal } = __nccwpck_require__(7032) +const assert = __nccwpck_require__(39491) - // We don't handle blobs, so this just delegates: - return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); -}; +class UpgradeHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } -/***/ }), + const { signal, opaque, responseHeaders } = opts -/***/ 60276: -/***/ ((module) => { + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } -"use strict"; + super('UNDICI_UPGRADE') + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.callback = callback + this.abort = null + this.context = null -module.exports.mixin = function mixin(target, source) { - const keys = Object.getOwnPropertyNames(source); - for (let i = 0; i < keys.length; ++i) { - Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); + addSignal(this, signal) } -}; - -module.exports.wrapperSymbol = Symbol("wrapper"); -module.exports.implSymbol = Symbol("impl"); -module.exports.wrapperForImpl = function (impl) { - return impl[module.exports.wrapperSymbol]; -}; + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } -module.exports.implForWrapper = function (wrapper) { - return wrapper[module.exports.implSymbol]; -}; + this.abort = abort + this.context = null + } + onHeaders () { + throw new SocketError('bad upgrade', null) + } + onUpgrade (statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this -/***/ }), + assert.strictEqual(statusCode, 101) -/***/ 1223: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + removeSignal(this) -var wrappy = __nccwpck_require__(62940) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) + this.callback = null + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }) + } -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) + onError (err) { + const { callback, opaque } = this - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) + removeSignal(this) -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) + if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } } - f.called = false - return f } -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) +function upgrade (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } + + try { + const upgradeHandler = new UpgradeHandler(opts, callback) + this.dispatch({ + ...opts, + method: opts.method || 'GET', + upgrade: opts.protocol || 'Websocket' + }, upgradeHandler) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f } +module.exports = upgrade + /***/ }), -/***/ 57684: +/***/ 44059: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Queue = __nccwpck_require__(15185); -const pLimit = concurrency => { - if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { - throw new TypeError('Expected `concurrency` to be a number from 1 and up'); - } +module.exports.request = __nccwpck_require__(55448) +module.exports.stream = __nccwpck_require__(75395) +module.exports.pipeline = __nccwpck_require__(28752) +module.exports.upgrade = __nccwpck_require__(36923) +module.exports.connect = __nccwpck_require__(29744) - const queue = new Queue(); - let activeCount = 0; - const next = () => { - activeCount--; +/***/ }), - if (queue.size > 0) { - queue.dequeue()(); - } - }; +/***/ 73858: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - const run = async (fn, resolve, ...args) => { - activeCount++; +"use strict"; +// Ported from https://github.com/nodejs/undici/pull/907 - const result = (async () => fn(...args))(); - resolve(result); - try { - await result; - } catch {} +const assert = __nccwpck_require__(39491) +const { Readable } = __nccwpck_require__(12781) +const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(83983) + +let Blob + +const kConsume = Symbol('kConsume') +const kReading = Symbol('kReading') +const kBody = Symbol('kBody') +const kAbort = Symbol('abort') +const kContentType = Symbol('kContentType') - next(); - }; +const noop = () => {} - const enqueue = (fn, resolve, ...args) => { - queue.enqueue(run.bind(null, fn, resolve, ...args)); +module.exports = class BodyReadable extends Readable { + constructor ({ + resume, + abort, + contentType = '', + highWaterMark = 64 * 1024 // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }) - (async () => { - // This function needs to wait until the next microtask before comparing - // `activeCount` to `concurrency`, because `activeCount` is updated asynchronously - // when the run function is dequeued and called. The comparison in the if-statement - // needs to happen asynchronously as well to get an up-to-date value for `activeCount`. - await Promise.resolve(); + this._readableState.dataEmitted = false - if (activeCount < concurrency && queue.size > 0) { - queue.dequeue()(); - } - })(); - }; + this[kAbort] = abort + this[kConsume] = null + this[kBody] = null + this[kContentType] = contentType - const generator = (fn, ...args) => new Promise(resolve => { - enqueue(fn, resolve, ...args); - }); + // Is stream being consumed through Readable API? + // This is an optimization so that we avoid checking + // for 'data' and 'readable' listeners in the hot path + // inside push(). + this[kReading] = false + } - Object.defineProperties(generator, { - activeCount: { - get: () => activeCount - }, - pendingCount: { - get: () => queue.size - }, - clearQueue: { - value: () => { - queue.clear(); - } - } - }); + destroy (err) { + if (this.destroyed) { + // Node < 16 + return this + } - return generator; -}; + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() + } -module.exports = pLimit; + if (err) { + this[kAbort]() + } + return super.destroy(err) + } -/***/ }), + emit (ev, ...args) { + if (ev === 'data') { + // Node < 16.7 + this._readableState.dataEmitted = true + } else if (ev === 'error') { + // Node < 16 + this._readableState.errorEmitted = true + } + return super.emit(ev, ...args) + } -/***/ 63329: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + on (ev, ...args) { + if (ev === 'data' || ev === 'readable') { + this[kReading] = true + } + return super.on(ev, ...args) + } -"use strict"; + addListener (ev, ...args) { + return this.on(ev, ...args) + } + off (ev, ...args) { + const ret = super.off(ev, ...args) + if (ev === 'data' || ev === 'readable') { + this[kReading] = ( + this.listenerCount('data') > 0 || + this.listenerCount('readable') > 0 + ) + } + return ret + } -var parseUrl = (__nccwpck_require__(57310).parse); + removeListener (ev, ...args) { + return this.off(ev, ...args) + } -var DEFAULT_PORTS = { - ftp: 21, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443, -}; + push (chunk) { + if (this[kConsume] && chunk !== null && this.readableLength === 0) { + consumePush(this[kConsume], chunk) + return this[kReading] ? super.push(chunk) : true + } + return super.push(chunk) + } -var stringEndsWith = String.prototype.endsWith || function(s) { - return s.length <= this.length && - this.indexOf(s, this.length - s.length) !== -1; -}; + // https://fetch.spec.whatwg.org/#dom-body-text + async text () { + return consume(this, 'text') + } -/** - * @param {string|object} url - The URL, or the result from url.parse. - * @return {string} The URL of the proxy that should handle the request to the - * given URL. If no proxy is set, this will be an empty string. - */ -function getProxyForUrl(url) { - var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; - var proto = parsedUrl.protocol; - var hostname = parsedUrl.host; - var port = parsedUrl.port; - if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { - return ''; // Don't proxy URLs without a valid scheme or host. + // https://fetch.spec.whatwg.org/#dom-body-json + async json () { + return consume(this, 'json') } - proto = proto.split(':', 1)[0]; - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, ''); - port = parseInt(port) || DEFAULT_PORTS[proto] || 0; - if (!shouldProxy(hostname, port)) { - return ''; // Don't proxy URLs that match NO_PROXY. + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob () { + return consume(this, 'blob') } - var proxy = - getEnv('npm_config_' + proto + '_proxy') || - getEnv(proto + '_proxy') || - getEnv('npm_config_proxy') || - getEnv('all_proxy'); - if (proxy && proxy.indexOf('://') === -1) { - // Missing scheme in proxy, default to the requested URL's scheme. - proxy = proto + '://' + proxy; + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer () { + return consume(this, 'arrayBuffer') } - return proxy; -} -/** - * Determines whether a given URL should be proxied. - * - * @param {string} hostname - The host name of the URL. - * @param {number} port - The effective port of the URL. - * @returns {boolean} Whether the given URL should be proxied. - * @private - */ -function shouldProxy(hostname, port) { - var NO_PROXY = - (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); - if (!NO_PROXY) { - return true; // Always proxy if NO_PROXY is not set. + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData () { + // TODO: Implement. + throw new NotSupportedError() } - if (NO_PROXY === '*') { - return false; // Never proxy if wildcard is set. + + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed () { + return util.isDisturbed(this) } - return NO_PROXY.split(/[,\s]/).every(function(proxy) { - if (!proxy) { - return true; // Skip zero-length hosts. - } - var parsedProxy = proxy.match(/^(.+):(\d+)$/); - var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; - var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; - if (parsedProxyPort && parsedProxyPort !== port) { - return true; // Skip if ports don't match. + // https://fetch.spec.whatwg.org/#dom-body-body + get body () { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this) + if (this[kConsume]) { + // TODO: Is this the best way to force a lock? + this[kBody].getReader() // Ensure stream is locked. + assert(this[kBody].locked) + } } + return this[kBody] + } - if (!/^[.*]/.test(parsedProxyHostname)) { - // No wildcards, so stop proxying if there is an exact match. - return hostname !== parsedProxyHostname; + dump (opts) { + let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 + const signal = opts && opts.signal + + if (signal) { + try { + if (typeof signal !== 'object' || !('aborted' in signal)) { + throw new InvalidArgumentError('signal must be an AbortSignal') + } + util.throwIfAborted(signal) + } catch (err) { + return Promise.reject(err) + } } - if (parsedProxyHostname.charAt(0) === '*') { - // Remove leading wildcard. - parsedProxyHostname = parsedProxyHostname.slice(1); + if (this.closed) { + return Promise.resolve(null) } - // Stop proxying if the hostname ends with the no_proxy host. - return !stringEndsWith.call(hostname, parsedProxyHostname); - }); -} -/** - * Get the value for an environment variable. - * - * @param {string} key - The name of the environment variable. - * @return {string} The value of the environment variable. - * @private - */ -function getEnv(key) { - return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; + return new Promise((resolve, reject) => { + const signalListenerCleanup = signal + ? util.addAbortListener(signal, () => { + this.destroy() + }) + : noop + + this + .on('close', function () { + signalListenerCleanup() + if (signal && signal.aborted) { + reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) + } else { + resolve(null) + } + }) + .on('error', noop) + .on('data', function (chunk) { + limit -= chunk.length + if (limit <= 0) { + this.destroy() + } + }) + .resume() + }) + } } -exports.getProxyForUrl = getProxyForUrl; +// https://streams.spec.whatwg.org/#readablestream-locked +function isLocked (self) { + // Consume is an implicit lock. + return (self[kBody] && self[kBody].locked === true) || self[kConsume] +} +// https://fetch.spec.whatwg.org/#body-unusable +function isUnusable (self) { + return util.isDisturbed(self) || isLocked(self) +} -/***/ }), +async function consume (stream, type) { + if (isUnusable(stream)) { + throw new TypeError('unusable') + } -/***/ 67214: -/***/ ((module) => { + assert(!stream[kConsume]) -"use strict"; + return new Promise((resolve, reject) => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + } + stream + .on('error', function (err) { + consumeFinish(this[kConsume], err) + }) + .on('close', function () { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()) + } + }) -const codes = {}; + process.nextTick(consumeStart, stream[kConsume]) + }) +} -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error +function consumeStart (consume) { + if (consume.body === null) { + return } - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) - } + const { _readableState: state } = consume.stream + + for (const chunk of state.buffer) { + consumePush(consume, chunk) } - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } + if (state.endEmitted) { + consumeEnd(this[kConsume]) + } else { + consume.stream.on('end', function () { + consumeEnd(this[kConsume]) + }) } - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; + consume.stream.resume() - codes[code] = NodeError; + while (consume.stream.read() != null) { + // Loop + } } -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; +function consumeEnd (consume) { + const { type, body, resolve, stream, length } = consume + + try { + if (type === 'text') { + resolve(toUSVString(Buffer.concat(body))) + } else if (type === 'json') { + resolve(JSON.parse(Buffer.concat(body))) + } else if (type === 'arrayBuffer') { + const dst = new Uint8Array(length) + + let pos = 0 + for (const buf of body) { + dst.set(buf, pos) + pos += buf.byteLength + } + + resolve(dst.buffer) + } else if (type === 'blob') { + if (!Blob) { + Blob = (__nccwpck_require__(14300).Blob) + } + resolve(new Blob(body, { type: stream[kContentType] })) } - } else { - return `of ${thing} ${String(expected)}`; - } -} -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + consumeFinish(consume) + } catch (err) { + stream.destroy(err) + } } -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; +function consumePush (consume, chunk) { + consume.length += chunk.length + consume.body.push(chunk) } -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; +function consumeFinish (consume, err) { + if (consume.body === null) { + return } - if (start + search.length > str.length) { - return false; + if (err) { + consume.reject(err) } else { - return str.indexOf(search, start) !== -1; + consume.resolve() } + + consume.type = null + consume.stream = null + consume.resolve = null + consume.reject = null + consume.length = 0 + consume.body = null } -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; + +/***/ }), + +/***/ 77474: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(39491) +const { + ResponseStatusCodeError +} = __nccwpck_require__(48045) +const { toUSVString } = __nccwpck_require__(83983) + +async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert(body) + + let chunks = [] + let limit = 0 + + for await (const chunk of body) { + chunks.push(chunk) + limit += chunk.length + if (limit > 128 * 1024) { + chunks = null + break + } } - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; + if (statusCode === 204 || !contentType || !chunks) { + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) + return } - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); + try { + if (contentType.startsWith('application/json')) { + const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } + + if (contentType.startsWith('text/')) { + const payload = toUSVString(Buffer.concat(chunks)) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } + } catch (err) { + // Process in a fallback if error + } + + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) +} -module.exports.q = codes; +module.exports = { getResolveErrorBodyCallback } /***/ }), -/***/ 41359: +/***/ 37931: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. +const { + BalancedPoolMissingUpstreamError, + InvalidArgumentError +} = __nccwpck_require__(48045) +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher +} = __nccwpck_require__(73198) +const Pool = __nccwpck_require__(4634) +const { kUrl, kInterceptors } = __nccwpck_require__(72785) +const { parseOrigin } = __nccwpck_require__(83983) +const kFactory = Symbol('factory') -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; -/**/ +const kOptions = Symbol('options') +const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') +const kCurrentWeight = Symbol('kCurrentWeight') +const kIndex = Symbol('kIndex') +const kWeight = Symbol('kWeight') +const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') +const kErrorPenalty = Symbol('kErrorPenalty') -module.exports = Duplex; -var Readable = __nccwpck_require__(51433); -var Writable = __nccwpck_require__(32094); -__nccwpck_require__(44124)(Duplex, Readable); -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } +function getGreatestCommonDivisor (a, b) { + if (b === 0) return a + return getGreatestCommonDivisor(b, a % b) } -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } - } + +function defaultFactory (origin, opts) { + return new Pool(origin, opts) } -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); -// the no-half-open enforcer -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; +class BalancedPool extends PoolBase { + constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super() - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(onEndNT, this); -} -function onEndNT(self) { - self.end(); -} -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; + this[kOptions] = opts + this[kIndex] = -1 + this[kCurrentWeight] = 0 + + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 + this[kErrorPenalty] = this[kOptions].errorPenalty || 15 + + if (!Array.isArray(upstreams)) { + upstreams = [upstreams] } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; + + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') } - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; + this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) + ? opts.interceptors.BalancedPool + : [] + this[kFactory] = factory + + for (const upstream of upstreams) { + this.addUpstream(upstream) + } + this._updateBalancedPoolStats() } -}); -/***/ }), + addUpstream (upstream) { + const upstreamOrigin = parseOrigin(upstream).origin -/***/ 81542: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (this[kClients].find((pool) => ( + pool[kUrl].origin === upstreamOrigin && + pool.closed !== true && + pool.destroyed !== true + ))) { + return this + } + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + this[kAddClient](pool) + pool.on('connect', () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) + }) -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. + pool.on('connectionError', () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) + this._updateBalancedPoolStats() + }) + pool.on('disconnect', (...args) => { + const err = args[2] + if (err && err.code === 'UND_ERR_SOCKET') { + // decrease the weight of the pool. + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) + this._updateBalancedPoolStats() + } + }) + for (const client of this[kClients]) { + client[kWeight] = this[kMaxWeightPerServer] + } -module.exports = PassThrough; -var Transform = __nccwpck_require__(34415); -__nccwpck_require__(44124)(PassThrough, Transform); -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; + this._updateBalancedPoolStats() -/***/ }), + return this + } -/***/ 51433: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + _updateBalancedPoolStats () { + this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0) + } -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + removeUpstream (upstream) { + const upstreamOrigin = parseOrigin(upstream).origin + const pool = this[kClients].find((pool) => ( + pool[kUrl].origin === upstreamOrigin && + pool.closed !== true && + pool.destroyed !== true + )) + if (pool) { + this[kRemoveClient](pool) + } -module.exports = Readable; + return this + } -/**/ -var Duplex; -/**/ + get upstreams () { + return this[kClients] + .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) + .map((p) => p[kUrl].origin) + } -Readable.ReadableState = ReadableState; + [kGetDispatcher] () { + // We validate that pools is greater than 0, + // otherwise we would have to wait until an upstream + // is added, which might never happen. + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError() + } -/**/ -var EE = (__nccwpck_require__(82361).EventEmitter); -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ + const dispatcher = this[kClients].find(dispatcher => ( + !dispatcher[kNeedDrain] && + dispatcher.closed !== true && + dispatcher.destroyed !== true + )) -/**/ -var Stream = __nccwpck_require__(62387); -/**/ + if (!dispatcher) { + return + } -var Buffer = (__nccwpck_require__(14300).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} + const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) -/**/ -var debugUtil = __nccwpck_require__(73837); -var debug; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ + if (allClientsBusy) { + return + } -var BufferList = __nccwpck_require__(52746); -var destroyImpl = __nccwpck_require__(97049); -var _require = __nccwpck_require__(39948), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + let counter = 0 -// Lazy loaded to improve the startup performance. -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; -__nccwpck_require__(44124)(Readable, Stream); -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(41359); - options = options || {}; + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length + const pool = this[kClients][this[kIndex]] - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + // find pool index with the largest weight + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { + maxWeightIndex = this[kIndex] + } - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + // decrease the current weight every `this[kClients].length`. + if (this[kIndex] === 0) { + // Set the current weight to the next lower weight. + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); + if (this[kCurrentWeight] <= 0) { + this[kCurrentWeight] = this[kMaxWeightPerServer] + } + } + if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { + return pool + } + } - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] + this[kIndex] = maxWeightIndex + return this[kClients][maxWeightIndex] + } +} - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; +module.exports = BalancedPool - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; +/***/ }), - // Should .destroy() be called after 'end' (and potentially 'finish') - this.autoDestroy = !!options.autoDestroy; +/***/ 66101: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // has it been destroyed - this.destroyed = false; +"use strict"; - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; +const { kConstruct } = __nccwpck_require__(29174) +const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(82396) +const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(83983) +const { kHeadersList } = __nccwpck_require__(72785) +const { webidl } = __nccwpck_require__(21744) +const { Response, cloneResponse } = __nccwpck_require__(27823) +const { Request } = __nccwpck_require__(48359) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) +const { fetching } = __nccwpck_require__(74881) +const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(52538) +const assert = __nccwpck_require__(39491) +const { getGlobalDispatcher } = __nccwpck_require__(21892) - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} -function Readable(options) { - Duplex = Duplex || __nccwpck_require__(41359); - if (!(this instanceof Readable)) return new Readable(options); +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ - // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ - // legacy - this.readable = true; - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - Stream.call(this); -} -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; +class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList + + constructor () { + if (arguments[0] !== kConstruct) { + webidl.illegalConstructor() } - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; + this.#relevantRequestResponseList = arguments[1] } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; + async match (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) + + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + const p = await this.matchAll(request, options) + + if (p.length === 0) { + return } - } else { - skipChunkCheck = true; + + return p[0] } - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); + async matchAll (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) + + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + // 1. + let r = null + + // 2. + if (request !== undefined) { + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] } + } else if (typeof request === 'string') { + // 2.2.1 + r = new Request(request)[kState] } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); } - } - // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); - } - return er; -} -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; + // 5. + // 5.1 + const responses = [] -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; - // If setEncoding(null), decoder.encoding equals utf8 - this._readableState.encoding = this._readableState.decoder.encoding; + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) - // Iterate over current buffer to convert already stored Buffers: - var p = this._readableState.buffer.head; - var content = ''; - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - this._readableState.buffer.clear(); - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; + // 5.3.2 + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]) + } + } -// Don't raise the hwm > 1GB -var MAX_HWM = 0x40000000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} + // 5.4 + // We don't implement CORs so we don't need to loop over the responses, yay! -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} + // 5.5.1 + const responseList = [] -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; + // 5.5.2 + for (const response of responses) { + // 5.5.2.1 + const responseObject = new Response(response.body?.source ?? null) + const body = responseObject[kState].body + responseObject[kState] = response + responseObject[kState].body = body + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - n = howMuchToRead(n, state); + responseList.push(responseObject) + } - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; + // 6. + return Object.freeze(responseList) } - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. + async add (request) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); + request = webidl.converters.RequestInfo(request) - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } + // 1. + const requests = [request] - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; + // 2. + const responseArrayPromise = this.addAll(requests) - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - if (ret !== null) this.emit('data', ret); - return ret; -}; -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } + // 3. + return await responseArrayPromise } - state.ended = true; - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); + + async addAll (requests) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) + + requests = webidl.converters['sequence'](requests) + + // 1. + const responsePromises = [] + + // 2. + const requestList = [] + + // 3. + for (const request of requests) { + if (typeof request === 'string') { + continue + } + + // 3.1 + const r = request[kState] + + // 3.2 + if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme when method is not GET.' + }) + } } - } -} -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } + // 4. + /** @type {ReturnType[]} */ + const fetchControllers = [] - // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} + // 5. + for (const request of requests) { + // 5.1 + const r = new Request(request)[kState] -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - } - state.readingMore = false; -} + // 5.2 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme.' + }) + } + + // 5.4 + r.initiator = 'fetch' + r.destination = 'subresource' + + // 5.5 + requestList.push(r) + + // 5.6 + const responsePromise = createDeferredPromise() + + // 5.7 + fetchControllers.push(fetching({ + request: r, + dispatcher: getGlobalDispatcher(), + processResponse (response) { + // 1. + if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Received an invalid status code or the request failed.' + })) + } else if (response.headersList.contains('vary')) { // 2. + // 2.1 + const fieldValues = getFieldValues(response.headersList.get('vary')) + + // 2.2 + for (const fieldValue of fieldValues) { + // 2.2.1 + if (fieldValue === '*') { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'invalid vary field value' + })) + + for (const controller of fetchControllers) { + controller.abort() + } + + return + } + } + } + }, + processResponseEndOfBody (response) { + // 1. + if (response.aborted) { + responsePromise.reject(new DOMException('aborted', 'AbortError')) + return + } + + // 2. + responsePromise.resolve(response) + } + })) -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } + // 5.8 + responsePromises.push(responsePromise.promise) } - } - function onend() { - debug('onend'); - dest.end(); - } - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; + // 6. + const p = Promise.all(responsePromises) - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - src.pause(); - } - } + // 7. + const responses = await p - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } + // 7.1 + const operations = [] - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); + // 7.2 + let index = 0 - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } + // 7.3 + for (const response of responses) { + // 7.3.1 + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 7.3.2 + request: requestList[index], // 7.3.3 + response // 7.3.4 + } - // tell the dest that it's being piped to - dest.emit('pipe', src); + operations.push(operation) // 7.3.5 - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - return dest; -}; -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); + index++ // 7.3.6 } - }; -} -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; + // 7.5 + const cacheJobPromise = createDeferredPromise() - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; + // 7.6.1 + let errorData = null - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } + // 7.6.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } - // slow case. multiple pipe destinations. + // 7.6.3 + queueMicrotask(() => { + // 7.6.3.1 + if (errorData === null) { + cacheJobPromise.resolve(undefined) + } else { + // 7.6.3.2 + cacheJobPromise.reject(errorData) + } + }) - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - return this; + // 7.7 + return cacheJobPromise.promise } - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; + async put (request, response) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; + request = webidl.converters.RequestInfo(request) + response = webidl.converters.Response(response) - // Try start flowing on next tick if stream isn't explicitly paused - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } + // 1. + let innerRequest = null + + // 2. + if (request instanceof Request) { + innerRequest = request[kState] + } else { // 3. + innerRequest = new Request(request)[kState] } - } - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; - // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} + // 4. + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Expected an http/s scheme when method is not GET' + }) + } -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - state.flowing = !state.readableListening; - resume(this, state); - } - state.paused = false; - return this; -}; -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} -function resume_(stream, state) { - debug('resume', state.reading); - if (!state.reading) { - stream.read(0); - } - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - this._readableState.paused = true; - return this; -}; -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null); -} + // 5. + const innerResponse = response[kState] -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); + // 6. + if (innerResponse.status === 206) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got 206 status' + }) } - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); + // 7. + if (innerResponse.headersList.contains('vary')) { + // 7.1. + const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) + + // 7.2. + for (const fieldValue of fieldValues) { + // 7.2.1 + if (fieldValue === '*') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got * vary field value' + }) + } + } } - }); - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); + // 8. + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Response body is locked or disturbed' + }) } - } - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } + // 9. + const clonedResponse = cloneResponse(innerResponse) - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); + // 10. + const bodyReadPromise = createDeferredPromise() + + // 11. + if (innerResponse.body != null) { + // 11.1 + const stream = innerResponse.body.stream + + // 11.2 + const reader = stream.getReader() + + // 11.3 + readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) + } else { + bodyReadPromise.resolve(undefined) } - }; - return this; -}; -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = __nccwpck_require__(43306); + + // 12. + /** @type {CacheBatchOperation[]} */ + const operations = [] + + // 13. + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 14. + request: innerRequest, // 15. + response: clonedResponse // 16. } - return createReadableStreamAsyncIterator(this); - }; -} -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; + + // 17. + operations.push(operation) + + // 19. + const bytes = await bodyReadPromise.promise + + if (clonedResponse.body != null) { + clonedResponse.body.source = bytes } - } -}); -// exposed for testing purposes only. -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; + // 19.1 + const cacheJobPromise = createDeferredPromise() + + // 19.2.1 + let errorData = null + + // 19.2.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + // 19.2.3 + queueMicrotask(() => { + // 19.2.3.1 + if (errorData === null) { + cacheJobPromise.resolve() + } else { // 19.2.3.2 + cacheJobPromise.reject(errorData) + } + }) + + return cacheJobPromise.promise } -}); -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); + async delete (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + /** + * @type {Request} + */ + let r = null + + if (request instanceof Request) { + r = request[kState] + + if (r.method !== 'GET' && !options.ignoreMethod) { + return false } + } else { + assert(typeof request === 'string') + + r = new Request(request)[kState] } - } -} -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = __nccwpck_require__(39082); - } - return from(Readable, iterable, opts); - }; -} -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} -/***/ }), + /** @type {CacheBatchOperation[]} */ + const operations = [] -/***/ 34415: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** @type {CacheBatchOperation} */ + const operation = { + type: 'delete', + request: r, + options + } -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + operations.push(operation) -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. + const cacheJobPromise = createDeferredPromise() + let errorData = null + let requestResponses + try { + requestResponses = this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } -module.exports = Transform; -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; -var Duplex = __nccwpck_require__(41359); -__nccwpck_require__(44124)(Transform, Duplex); -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); - } - ts.writechunk = null; - ts.writecb = null; - if (data != null) - // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(!!requestResponses?.length) + } else { + cacheJobPromise.reject(errorData) + } + }) + + return cacheJobPromise.promise } -} -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {readonly Request[]} + */ + async keys (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; - } + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} -function prefinish() { - var _this = this; - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; + // 1. + let r = null -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; + // 2. + if (request !== undefined) { + // 2.1 + if (request instanceof Request) { + // 2.1.1 + r = request[kState] -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) - // single equals check for both `null` and `undefined` - stream.push(data); + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { // 2.2 + r = new Request(request)[kState] + } + } - // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); -} + // 4. + const promise = createDeferredPromise() -/***/ }), + // 5. + // 5.1 + const requests = [] -/***/ 32094: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + // 5.2.1.1 + requests.push(requestResponse[0]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + // 5.3.2 + for (const requestResponse of requestResponses) { + // 5.3.2.1 + requests.push(requestResponse[0]) + } + } -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. + // 5.4 + queueMicrotask(() => { + // 5.4.1 + const requestList = [] + + // 5.4.2 + for (const request of requests) { + const requestObject = new Request('https://a') + requestObject[kState] = request + requestObject[kHeaders][kHeadersList] = request.headersList + requestObject[kHeaders][kGuard] = 'immutable' + requestObject[kRealm] = request.client + // 5.4.2.1 + requestList.push(requestObject) + } + // 5.4.3 + promise.resolve(Object.freeze(requestList)) + }) -module.exports = Writable; + return promise.promise + } -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations (operations) { + // 1. + const cache = this.#relevantRequestResponseList -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ + // 2. + const backupCache = [...cache] -/**/ -var Duplex; -/**/ + // 3. + const addedItems = [] -Writable.WritableState = WritableState; + // 4.1 + const resultList = [] -/**/ -var internalUtil = { - deprecate: __nccwpck_require__(65278) -}; -/**/ + try { + // 4.2 + for (const operation of operations) { + // 4.2.1 + if (operation.type !== 'delete' && operation.type !== 'put') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'operation type does not match "delete" or "put"' + }) + } -/**/ -var Stream = __nccwpck_require__(62387); -/**/ + // 4.2.2 + if (operation.type === 'delete' && operation.response != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'delete operation should not have an associated response' + }) + } -var Buffer = (__nccwpck_require__(14300).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -var destroyImpl = __nccwpck_require__(97049); -var _require = __nccwpck_require__(39948), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; -var errorOrDestroy = destroyImpl.errorOrDestroy; -__nccwpck_require__(44124)(Writable, Stream); -function nop() {} -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(41359); - options = options || {}; + // 4.2.3 + if (this.#queryCache(operation.request, operation.options, addedItems).length) { + throw new DOMException('???', 'InvalidStateError') + } + + // 4.2.4 + let requestResponses + + // 4.2.5 + if (operation.type === 'delete') { + // 4.2.5.1 + requestResponses = this.#queryCache(operation.request, operation.options) + + // TODO: the spec is wrong, this is needed to pass WPTs + if (requestResponses.length === 0) { + return [] + } + + // 4.2.5.2 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) + + // 4.2.5.2.1 + cache.splice(idx, 1) + } + } else if (operation.type === 'put') { // 4.2.6 + // 4.2.6.1 + if (operation.response == null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'put operation should have an associated response' + }) + } - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + // 4.2.6.2 + const r = operation.request - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + // 4.2.6.3 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'expected http or https scheme' + }) + } - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); + // 4.2.6.4 + if (r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'not get method' + }) + } - // if _final has been called - this.finalCalled = false; + // 4.2.6.5 + if (operation.options != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'options must not be defined' + }) + } - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; + // 4.2.6.6 + requestResponses = this.#queryCache(operation.request) - // has it been destroyed - this.destroyed = false; + // 4.2.6.7 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; + // 4.2.6.7.1 + cache.splice(idx, 1) + } - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; + // 4.2.6.8 + cache.push([operation.request, operation.response]) - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; + // 4.2.6.10 + addedItems.push([operation.request, operation.response]) + } - // a flag to see when we're in the middle of a write. - this.writing = false; + // 4.2.7 + resultList.push([operation.request, operation.response]) + } - // when true all writes will be buffered until .uncork() call - this.corked = 0; + // 4.3 + return resultList + } catch (e) { // 5. + // 5.1 + this.#relevantRequestResponseList.length = 0 - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; + // 5.2 + this.#relevantRequestResponseList = backupCache - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; + // 5.3 + throw e + } + } - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache (requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = [] - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; + const storage = targetStorage ?? this.#relevantRequestResponseList - // the amount that is being written when _write is called. - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { + resultList.push(requestResponse) + } + } - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; + return resultList + } - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem (requestQuery, request, response = null, options) { + // if (options?.ignoreMethod === false && request.method === 'GET') { + // return false + // } - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; + const queryURL = new URL(requestQuery.url) - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; + const cachedURL = new URL(request.url) - // Should .destroy() be called after 'finish' (and potentially 'end') - this.autoDestroy = !!options.autoDestroy; + if (options?.ignoreSearch) { + cachedURL.search = '' - // count buffered requests - this.bufferedRequestCount = 0; + queryURL.search = '' + } - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); + if (!urlEquals(queryURL, cachedURL, true)) { + return false + } -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; + if ( + response == null || + options?.ignoreVary || + !response.headersList.contains('vary') + ) { + return true } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} -function Writable(options) { - Duplex = Duplex || __nccwpck_require__(41359); - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. + const fieldValues = getFieldValues(response.headersList.get('vary')) - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. + for (const fieldValue of fieldValues) { + if (fieldValue === '*') { + return false + } - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); + const requestValue = request.headersList.get(fieldValue) + const queryValue = requestQuery.headersList.get(fieldValue) - // legacy. - this.writable = true; - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; + // If one has the header and the other doesn't, or one has + // a different value than the other, return false + if (requestValue !== queryValue) { + return false + } + } + + return true } - Stream.call(this); } -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); - // TODO: defer error events consistently everywhere, not just the cb - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} +Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: 'Cache', + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var er; - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - return true; -} -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; -Writable.prototype.cork = function () { - this._writableState.corked++; -}; -Writable.prototype.uncork = function () { - var state = this._writableState; - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); +const cacheQueryOptionConverters = [ + { + key: 'ignoreSearch', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'ignoreMethod', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'ignoreVary', + converter: webidl.converters.boolean, + defaultValue: false } -}); -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); +] + +webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) + +webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ + ...cacheQueryOptionConverters, + { + key: 'cacheName', + converter: webidl.converters.DOMString } - return chunk; +]) + +webidl.converters.Response = webidl.interfaceConverter(Response) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.RequestInfo +) + +module.exports = { + Cache } -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; + +/***/ }), + +/***/ 37907: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { kConstruct } = __nccwpck_require__(29174) +const { Cache } = __nccwpck_require__(66101) +const { webidl } = __nccwpck_require__(21744) +const { kEnumerableProperty } = __nccwpck_require__(83983) + +class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) + + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1.1 + // 2.2 + return this.#caches.has(cacheName) } -} -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1 + if (this.#caches.has(cacheName)) { + // await caches.open('v1') !== await caches.open('v1') + + // 2.1.1 + const cache = this.#caches.get(cacheName) + + // 2.1.1.1 + return new Cache(kConstruct, cache) } - if (entry === null) state.lastBufferedRequest = null; - } - state.bufferedRequest = entry; - state.bufferProcessing = false; -} -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; -Writable.prototype._writev = null; -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; + + // 2.2 + const cache = [] + + // 2.3 + this.#caches.set(cacheName, cache) + + // 2.4 + return new Cache(kConstruct, cache) } - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) + + cacheName = webidl.converters.DOMString(cacheName) + + return this.#caches.delete(cacheName) } - // ignore unnecessary end() calls. - if (!state.ending) endWritable(this, state, cb); - return this; -}; -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {string[]} + */ + async keys () { + webidl.brandCheck(this, CacheStorage) + + // 2.1 + const keys = this.#caches.keys() + + // 2.2 + return [...keys] } -}); -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - errorOrDestroy(stream, err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); + +Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: 'CacheStorage', + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) + +module.exports = { + CacheStorage } -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } + + +/***/ }), + +/***/ 29174: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +module.exports = { + kConstruct: (__nccwpck_require__(72785).kConstruct) } -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } - } - return need; + + +/***/ }), + +/***/ 82396: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const assert = __nccwpck_require__(39491) +const { URLSerializer } = __nccwpck_require__(685) +const { isValidHeaderName } = __nccwpck_require__(52538) + +/** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ +function urlEquals (A, B, excludeFragment = false) { + const serializedA = URLSerializer(A, excludeFragment) + + const serializedB = URLSerializer(B, excludeFragment) + + return serializedA === serializedB } -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); + +/** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ +function fieldValues (header) { + assert(header !== null) + + const values = [] + + for (let value of header.split(',')) { + value = value.trim() + + if (!value.length) { + continue + } else if (!isValidHeaderName(value)) { + continue + } + + values.push(value) } - state.ended = true; - stream.writable = false; + + return values } -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - // reuse the free corkReq. - state.corkedRequestsFree.next = corkReq; +module.exports = { + urlEquals, + fieldValues } -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; /***/ }), -/***/ 43306: +/***/ 33598: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// @ts-check -var _Object$setPrototypeO; -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var finished = __nccwpck_require__(76080); -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); -function createIterResult(value, done) { - return { - value: value, - done: done - }; + +/* global WebAssembly */ + +const assert = __nccwpck_require__(39491) +const net = __nccwpck_require__(41808) +const http = __nccwpck_require__(13685) +const { pipeline } = __nccwpck_require__(12781) +const util = __nccwpck_require__(83983) +const timers = __nccwpck_require__(29459) +const Request = __nccwpck_require__(62905) +const DispatcherBase = __nccwpck_require__(74839) +const { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + InvalidArgumentError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError, + ClientDestroyedError +} = __nccwpck_require__(48045) +const buildConnector = __nccwpck_require__(82067) +const { + kUrl, + kReset, + kServerName, + kClient, + kBusy, + kParser, + kConnect, + kBlocking, + kResuming, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kHTTPConnVersion, + // HTTP2 + kHost, + kHTTP2Session, + kHTTP2SessionState, + kHTTP2BuildRequest, + kHTTP2CopyHeaders, + kHTTP1BuildRequest +} = __nccwpck_require__(72785) + +/** @type {import('http2')} */ +let http2 +try { + http2 = __nccwpck_require__(85158) +} catch { + // @ts-ignore + http2 = { constants: {} } } -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - if (resolve !== null) { - var data = iter[kStream].read(); - // we defer if data is null - // we can be expecting either 'end' or - // 'error' - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); + +const { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS + } +} = http2 + +// Experimental +let h2ExperimentalWarned = false + +const FastBuffer = Buffer[Symbol.species] + +const kClosedResolve = Symbol('kClosedResolve') + +const channels = {} + +try { + const diagnosticsChannel = __nccwpck_require__(67643) + channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') + channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') + channels.connectError = diagnosticsChannel.channel('undici:client:connectError') + channels.connected = diagnosticsChannel.channel('undici:client:connected') +} catch { + channels.sendHeaders = { hasSubscribers: false } + channels.beforeConnect = { hasSubscribers: false } + channels.connectError = { hasSubscribers: false } + channels.connected = { hasSubscribers: false } +} + +/** + * @type {import('../types/client').default} + */ +class Client extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../types/client').Client.Options} options + */ + constructor (url, { + interceptors, + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls, + strictContentLength, + maxCachedSessions, + maxRedirections, + connect, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + allowH2, + maxConcurrentStreams + } = {}) { + super() + + if (keepAlive !== undefined) { + throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') } - } -} -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - next: function next() { - var _this = this; - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - if (error !== null) { - return Promise.reject(error); + + if (socketTimeout !== undefined) { + throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') } - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); + + if (requestTimeout !== undefined) { + throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') } - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); + + if (idleTimeout !== undefined) { + throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') } - // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - var lastPromise = this[kLastPromise]; - var promise; - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - promise = new Promise(this[kHandlePromise]); + if (maxKeepAliveTimeout !== undefined) { + throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') } - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; - // reject if we are waiting for data in the Promise - // returned by next() and store the error - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - iterator[kError] = err; - return; + + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { + throw new InvalidArgumentError('invalid maxHeaderSize') } - var resolve = iterator[kLastResolve]; - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); + + if (socketPath != null && typeof socketPath !== 'string') { + throw new InvalidArgumentError('invalid socketPath') } - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; -module.exports = createReadableStreamAsyncIterator; -/***/ }), + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError('invalid connectTimeout') + } -/***/ 52746: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError('invalid keepAliveTimeout') + } -"use strict"; + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError('invalid keepAliveMaxTimeout') + } + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') + } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var _require = __nccwpck_require__(14300), - Buffer = _require.Buffer; -var _require2 = __nccwpck_require__(73837), - inspect = _require2.inspect; -var custom = inspect && inspect.custom || 'inspect'; -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} -module.exports = /*#__PURE__*/function () { - function BufferList() { - _classCallCheck(this, BufferList); - this.head = null; - this.tail = null; - this.length = 0; - } - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; + + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; + + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') } - }, { - key: "clear", - value: function clear() { - this.head = this.tail = null; - this.length = 0; + + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError('maxRedirections must be a positive number') } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) ret += s + p.data; - return ret; + + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; + + if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError('localAddress must be valid string IP address') } - // Consumes a specified amount of bytes or characters from the buffered data. - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret; - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); - } - return ret; + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError('maxResponseSize must be a positive number') } - }, { - key: "first", - value: function first() { - return this.head.data; + + if ( + autoSelectFamilyAttemptTimeout != null && + (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) + ) { + throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') } - // Consumes a specified amount of characters from the buffered data. - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; + // h2 + if (allowH2 != null && typeof allowH2 !== 'boolean') { + throw new InvalidArgumentError('allowH2 must be a valid boolean value') } - // Consumes a specified amount of bytes from the buffered data. - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') } - // Make sure the linked list only shows the minimal necessary information. - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread(_objectSpread({}, options), {}, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); + if (typeof connect !== 'function') { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) } - }]); - return BufferList; -}(); -/***/ }), + this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) + ? interceptors.Client + : [createRedirectInterceptor({ maxRedirections })] + this[kUrl] = util.parseOrigin(url) + this[kConnector] = connect + this[kSocket] = null + this[kPipelining] = pipelining != null ? pipelining : 1 + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] + this[kServerName] = null + this[kLocalAddress] = localAddress != null ? localAddress : null + this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength + this[kMaxRedirections] = maxRedirections + this[kMaxRequests] = maxRequestsPerClient + this[kClosedResolve] = null + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 + this[kHTTPConnVersion] = 'h1' -/***/ 97049: -/***/ ((module) => { + // HTTP/2 + this[kHTTP2Session] = null + this[kHTTP2SessionState] = !allowH2 + ? null + : { + // streams: null, // Fixed queue of streams - For future support of `push` + openStreams: 0, // Keep track of them to decide wether or not unref the session + maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server + } + this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` + + // kQueue is built up of 3 sections separated by + // the kRunningIdx and kPendingIdx indices. + // | complete | running | pending | + // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length + // kRunningIdx points to the first running element. + // kPendingIdx points to the first pending element. + // This implements a fast queue with an amortized + // time of O(1). + + this[kQueue] = [] + this[kRunningIdx] = 0 + this[kPendingIdx] = 0 + } + + get pipelining () { + return this[kPipelining] + } + + set pipelining (value) { + this[kPipelining] = value + resume(this, true) + } + + get [kPending] () { + return this[kQueue].length - this[kPendingIdx] + } + + get [kRunning] () { + return this[kPendingIdx] - this[kRunningIdx] + } + + get [kSize] () { + return this[kQueue].length - this[kRunningIdx] + } + + get [kConnected] () { + return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed + } + + get [kBusy] () { + const socket = this[kSocket] + return ( + (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) || + (this[kSize] >= (this[kPipelining] || 1)) || + this[kPending] > 0 + ) + } + + /* istanbul ignore: only used for test */ + [kConnect] (cb) { + connect(this) + this.once('connect', cb) + } + + [kDispatch] (opts, handler) { + const origin = opts.origin || this[kUrl].origin + + const request = this[kHTTPConnVersion] === 'h2' + ? Request[kHTTP2BuildRequest](origin, opts, handler) + : Request[kHTTP1BuildRequest](origin, opts, handler) + + this[kQueue].push(request) + if (this[kResuming]) { + // Do nothing. + } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + // Wait a tick in case stream/iterator is ended in the same tick. + this[kResuming] = 1 + process.nextTick(resume, this) + } else { + resume(this, true) + } -"use strict"; + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2 + } + return this[kNeedDrain] < 2 + } -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); + async [kClose] () { + // TODO: for H2 we need to gracefully flush the remaining enqueued + // request and close each stream. + return new Promise((resolve) => { + if (!this[kSize]) { + resolve(null) + } else { + this[kClosedResolve] = resolve } - } - return this; + }) } - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks + async [kDestroy] (err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) + } - if (this._readableState) { - this._readableState.destroyed = true; - } + const callback = () => { + if (this[kClosedResolve]) { + // TODO (fix): Should we error here with ClientDestroyedError? + this[kClosedResolve]() + this[kClosedResolve] = null + } + resolve() + } - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); + if (this[kHTTP2Session] != null) { + util.destroy(this[kHTTP2Session], err) + this[kHTTP2Session] = null + this[kHTTP2SessionState] = null + } + + if (!this[kSocket]) { + queueMicrotask(callback) } else { - process.nextTick(emitCloseNT, _this); + util.destroy(this[kSocket].on('close', callback), err) } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - return this; -} -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; + + resume(this) + }) } } -function emitErrorNT(self, err) { - self.emit('error', err); -} -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); +function onHttp2SessionError (err) { + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + this[kSocket][kError] = err + + onError(this[kClient], err) } -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; -/***/ }), +function onHttp2FrameError (type, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) -/***/ 76080: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (id === 0) { + this[kSocket][kError] = err + onError(this[kClient], err) + } +} -"use strict"; -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). +function onHttp2SessionEnd () { + util.destroy(this, new SocketError('other side closed')) + util.destroy(this[kSocket], new SocketError('other side closed')) +} +function onHTTP2GoAway (code) { + const client = this[kClient] + const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) + client[kSocket] = null + client[kHTTP2Session] = null + if (client.destroyed) { + assert(this[kPending] === 0) -var ERR_STREAM_PREMATURE_CLOSE = (__nccwpck_require__(67214)/* .codes.ERR_STREAM_PREMATURE_CLOSE */ .q.ERR_STREAM_PREMATURE_CLOSE); -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - callback.apply(this, args); - }; -} -function noop() {} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - var writableEnded = stream._writableState && stream._writableState.finished; - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - var readableEnded = stream._readableState && stream._readableState.endEmitted; - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - var onerror = function onerror(err) { - callback.call(stream, err); - }; - var onclose = function onclose() { - var err; - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) } - }; - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); + } else if (client[kRunning] > 0) { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null + + errorRequest(client, request, err) } - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -} -module.exports = eos; -/***/ }), + client[kPendingIdx] = client[kRunningIdx] -/***/ 39082: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + assert(client[kRunning] === 0) -"use strict"; + client.emit('disconnect', + client[kUrl], + [client], + err + ) + resume(client) +} -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var ERR_INVALID_ARG_TYPE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_ARG_TYPE */ .q.ERR_INVALID_ARG_TYPE); -function from(Readable, iterable, opts) { - var iterator; - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); - // Reading boolean to protect against _read - // being called before last iteration completion. - var reading = false; - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - function next() { - return _next2.apply(this, arguments); +const constants = __nccwpck_require__(30953) +const createRedirectInterceptor = __nccwpck_require__(38861) +const EMPTY_BUF = Buffer.alloc(0) + +async function lazyllhttp () { + const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(61145) : undefined + + let mod + try { + mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(95627), 'base64')) + } catch (e) { + /* istanbul ignore next */ + + // We could check if the error was caused by the simd option not + // being enabled, but the occurring of this other error + // * https://github.com/emscripten-core/emscripten/issues/11495 + // got me to remove that check to avoid breaking Node 12. + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(61145), 'base64')) } - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _yield$iterator$next = yield iterator.next(), - value = _yield$iterator$next.value, - done = _yield$iterator$next.done; - if (done) { - readable.push(null); - } else if (readable.push(yield value)) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); + + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ + + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0 + }, + wasm_on_status: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_message_begin: (p) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onMessageBegin() || 0 + }, + wasm_on_header_field: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_header_value: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 + }, + wasm_on_body: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_message_complete: (p) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onMessageComplete() || 0 } - }); - return _next2.apply(this, arguments); - } - return readable; -} -module.exports = from; + /* eslint-enable camelcase */ + } + }) +} -/***/ }), +let llhttpInstance = null +let llhttpPromise = lazyllhttp() +llhttpPromise.catch() -/***/ 76989: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +let currentParser = null +let currentBufferRef = null +let currentBufferSize = 0 +let currentBufferPtr = null -"use strict"; -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). +const TIMEOUT_HEADERS = 1 +const TIMEOUT_BODY = 2 +const TIMEOUT_IDLE = 3 +class Parser { + constructor (client, socket, { exports }) { + assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) + this.llhttp = exports + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) + this.client = client + this.socket = socket + this.timeout = null + this.timeoutValue = null + this.timeoutType = null + this.statusCode = null + this.statusText = '' + this.upgrade = false + this.headers = [] + this.headersSize = 0 + this.headersMaxSize = client[kMaxHeadersSize] + this.shouldKeepAlive = false + this.paused = false + this.resume = this.resume.bind(this) -var eos; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = __nccwpck_require__(76080); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; + this.bytesRead = 0 - // request.destroy just do .end - .abort is what we want - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} -function call(fn) { - fn(); -} -function pipe(from, to) { - return from.pipe(to); -} -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; + this.keepAlive = '' + this.contentLength = '' + this.connection = '' + this.maxResponseSize = client[kMaxResponseSize] } - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); + + setTimeout (value, type) { + this.timeoutType = type + if (value !== this.timeoutValue) { + timers.clearTimeout(this.timeout) + if (value) { + this.timeout = timers.setTimeout(onParserTimeout, value, this) + // istanbul ignore else: only for jest + if (this.timeout.unref) { + this.timeout.unref() + } + } else { + this.timeout = null + } + this.timeoutValue = value + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } + } } - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); -} -module.exports = pipeline; -/***/ }), + resume () { + if (this.socket.destroyed || !this.paused) { + return + } + + assert(this.ptr != null) + assert(currentParser == null) -/***/ 39948: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + this.llhttp.llhttp_resume(this.ptr) -"use strict"; + assert(this.timeoutType === TIMEOUT_BODY) + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } + } + this.paused = false + this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. + this.readMore() + } -var ERR_INVALID_OPT_VALUE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_OPT_VALUE */ .q.ERR_INVALID_OPT_VALUE); -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -} -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); + readMore () { + while (!this.paused && this.ptr) { + const chunk = this.socket.read() + if (chunk === null) { + break + } + this.execute(chunk) } - return Math.floor(hwm); } - // Default value - return state.objectMode ? 16 : 16 * 1024; -} -module.exports = { - getHighWaterMark: getHighWaterMark -}; + execute (data) { + assert(this.ptr != null) + assert(currentParser == null) + assert(!this.paused) -/***/ }), + const { socket, llhttp } = this -/***/ 62387: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (data.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr) + } + currentBufferSize = Math.ceil(data.length / 4096) * 4096 + currentBufferPtr = llhttp.malloc(currentBufferSize) + } -module.exports = __nccwpck_require__(12781); + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) + // Call `execute` on the wasm parser. + // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, + // and finally the length of bytes to parse. + // The return value is an error code or `constants.ERROR.OK`. + try { + let ret -/***/ }), + try { + currentBufferRef = data + currentParser = this + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) + /* eslint-disable-next-line no-useless-catch */ + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err + } finally { + currentParser = null + currentBufferRef = null + } -/***/ 51642: -/***/ ((module, exports, __nccwpck_require__) => { + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr -var Stream = __nccwpck_require__(12781); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = __nccwpck_require__(51433); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = __nccwpck_require__(32094); - exports.Duplex = __nccwpck_require__(41359); - exports.Transform = __nccwpck_require__(34415); - exports.PassThrough = __nccwpck_require__(81542); - exports.finished = __nccwpck_require__(76080); - exports.pipeline = __nccwpck_require__(76989); -} + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data.slice(offset)) + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true + socket.unshift(data.slice(offset)) + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr) + let message = '' + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) + message = + 'Response does not match the HTTP/1.1 protocol (' + + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + + ')' + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) + } + } catch (err) { + util.destroy(socket, err) + } + } + destroy () { + assert(this.ptr != null) + assert(currentParser == null) -/***/ }), + this.llhttp.llhttp_free(this.ptr) + this.ptr = null -/***/ 63515: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + timers.clearTimeout(this.timeout) + this.timeout = null + this.timeoutValue = null + this.timeoutType = null -"use strict"; + this.paused = false + } + onStatus (buf) { + this.statusText = buf.toString() + } -const {PassThrough} = __nccwpck_require__(12781); -const extend = __nccwpck_require__(38171); + onMessageBegin () { + const { socket, client } = this -let debug = () => {}; -if ( - typeof process !== 'undefined' && - 'env' in process && - typeof process.env === 'object' && - process.env.DEBUG === 'retry-request' -) { - debug = message => { - console.log('retry-request:', message); - }; -} + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) { + return -1 + } -const DEFAULTS = { - objectMode: false, - retries: 2, + const request = client[kQueue][client[kRunningIdx]] + if (!request) { + return -1 + } + } - /* - The maximum time to delay in seconds. If retryDelayMultiplier results in a - delay greater than maxRetryDelay, retries should delay by maxRetryDelay - seconds instead. - */ - maxRetryDelay: 64, + onHeaderField (buf) { + const len = this.headers.length - /* - The multiplier by which to increase the delay time between the completion of - failed requests, and the initiation of the subsequent retrying request. - */ - retryDelayMultiplier: 2, + if ((len & 1) === 0) { + this.headers.push(buf) + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) + } - /* - The length of time to keep retrying in seconds. The last sleep period will - be shortened as necessary, so that the last retry runs at deadline (and not - considerably beyond it). The total time starting from when the initial - request is sent, after which an error will be returned, regardless of the - retrying attempts made meanwhile. - */ - totalTimeout: 600, + this.trackHeader(buf.length) + } - noResponseRetries: 2, - currentRetryAttempt: 0, - shouldRetryFn: function (response) { - const retryRanges = [ - // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes - // 1xx - Retry (Informational, request still processing) - // 2xx - Do not retry (Success) - // 3xx - Do not retry (Redirect) - // 4xx - Do not retry (Client errors) - // 429 - Retry ("Too Many Requests") - // 5xx - Retry (Server errors) - [100, 199], - [429, 429], - [500, 599], - ]; + onHeaderValue (buf) { + let len = this.headers.length - const statusCode = response.statusCode; - debug(`Response status: ${statusCode}`); + if ((len & 1) === 1) { + this.headers.push(buf) + len += 1 + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) + } - let range; - while ((range = retryRanges.shift())) { - if (statusCode >= range[0] && statusCode <= range[1]) { - // Not a successful status or redirect. - return true; - } + const key = this.headers[len - 2] + if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') { + this.keepAlive += buf.toString() + } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') { + this.connection += buf.toString() + } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') { + this.contentLength += buf.toString() } - }, -}; -function retryRequest(requestOpts, opts, callback) { - if (typeof requestOpts === 'string') { - requestOpts = {url: requestOpts}; + this.trackHeader(buf.length) } - const streamMode = typeof arguments[arguments.length - 1] !== 'function'; - - if (typeof opts === 'function') { - callback = opts; + trackHeader (len) { + this.headersSize += len + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()) + } } - const manualCurrentRetryAttemptWasSet = - opts && typeof opts.currentRetryAttempt === 'number'; - opts = extend({}, DEFAULTS, opts); - - if (typeof opts.request === 'undefined') { - throw new Error('A request library must be provided to retry-request.'); - } + onUpgrade (head) { + const { upgrade, client, socket, headers, statusCode } = this - let currentRetryAttempt = opts.currentRetryAttempt; + assert(upgrade) - let numNoResponseAttempts = 0; - let streamResponseHandled = false; + const request = client[kQueue][client[kRunningIdx]] + assert(request) - let retryStream; - let requestStream; - let delayStream; + assert(!socket.destroyed) + assert(socket === client[kSocket]) + assert(!this.paused) + assert(request.upgrade || request.method === 'CONNECT') - let activeRequest; - const retryRequest = { - abort: function () { - if (activeRequest && activeRequest.abort) { - activeRequest.abort(); - } - }, - }; + this.statusCode = null + this.statusText = '' + this.shouldKeepAlive = null - if (streamMode) { - retryStream = new PassThrough({objectMode: opts.objectMode}); - retryStream.abort = resetStreams; - } + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 - const timeOfFirstRequest = Date.now(); - if (currentRetryAttempt > 0) { - retryAfterDelay(currentRetryAttempt); - } else { - makeRequest(); - } + socket.unshift(head) - if (streamMode) { - return retryStream; - } else { - return retryRequest; - } + socket[kParser].destroy() + socket[kParser] = null - function resetStreams() { - delayStream = null; + socket[kClient] = null + socket[kError] = null + socket + .removeListener('error', onSocketError) + .removeListener('readable', onSocketReadable) + .removeListener('end', onSocketEnd) + .removeListener('close', onSocketClose) - if (requestStream) { - requestStream.abort && requestStream.abort(); - requestStream.cancel && requestStream.cancel(); + client[kSocket] = null + client[kQueue][client[kRunningIdx]++] = null + client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - if (requestStream.destroy) { - requestStream.destroy(); - } else if (requestStream.end) { - requestStream.end(); - } + try { + request.onUpgrade(statusCode, headers, socket) + } catch (err) { + util.destroy(socket, err) } + + resume(client) } - function makeRequest() { - let finishHandled = false; - currentRetryAttempt++; - debug(`Current retry attempt: ${currentRetryAttempt}`); + onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this - function handleFinish(args = []) { - if (!finishHandled) { - finishHandled = true; - retryStream.emit('complete', ...args); - } + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) { + return -1 } - if (streamMode) { - streamResponseHandled = false; + const request = client[kQueue][client[kRunningIdx]] - delayStream = new PassThrough({objectMode: opts.objectMode}); - requestStream = opts.request(requestOpts); + /* istanbul ignore next: difficult to make a test case for */ + if (!request) { + return -1 + } - setImmediate(() => { - retryStream.emit('request'); - }); + assert(!this.upgrade) + assert(this.statusCode < 200) - requestStream - // gRPC via google-cloud-node can emit an `error` as well as a `response` - // Whichever it emits, we run with-- we can't run with both. That's what - // is up with the `streamResponseHandled` tracking. - .on('error', err => { - if (streamResponseHandled) { - return; - } + if (statusCode === 100) { + util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) + return -1 + } - streamResponseHandled = true; - onResponse(err); - }) - .on('response', (resp, body) => { - if (streamResponseHandled) { - return; - } + /* this can only happen if server is misbehaving */ + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) + return -1 + } - streamResponseHandled = true; - onResponse(null, resp, body); - }) - .on('complete', (...params) => handleFinish(params)) - .on('finish', (...params) => handleFinish(params)); + assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) - requestStream.pipe(delayStream); - } else { - activeRequest = opts.request(requestOpts, onResponse); - } - } + this.statusCode = statusCode + this.shouldKeepAlive = ( + shouldKeepAlive || + // Override llhttp value which does not allow keepAlive for HEAD. + (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') + ) - function retryAfterDelay(currentRetryAttempt) { - if (streamMode) { - resetStreams(); + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null + ? request.bodyTimeout + : client[kBodyTimeout] + this.setTimeout(bodyTimeout, TIMEOUT_BODY) + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } } - const nextRetryDelay = getNextRetryDelay({ - maxRetryDelay: opts.maxRetryDelay, - retryDelayMultiplier: opts.retryDelayMultiplier, - retryNumber: currentRetryAttempt, - timeOfFirstRequest, - totalTimeout: opts.totalTimeout, - }); - debug(`Next retry delay: ${nextRetryDelay}`); + if (request.method === 'CONNECT') { + assert(client[kRunning] === 1) + this.upgrade = true + return 2 + } - if (nextRetryDelay <= 0) { - numNoResponseAttempts = opts.noResponseRetries + 1; - return; + if (upgrade) { + assert(client[kRunning] === 1) + this.upgrade = true + return 2 } - setTimeout(makeRequest, nextRetryDelay); - } + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 - function onResponse(err, response, body) { - // An error such as DNS resolution. - if (err) { - numNoResponseAttempts++; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - if (numNoResponseAttempts <= opts.noResponseRetries) { - retryAfterDelay(numNoResponseAttempts); - } else { - if (streamMode) { - retryStream.emit('error', err); - retryStream.end(); + if (keepAliveTimeout != null) { + const timeout = Math.min( + keepAliveTimeout - client[kKeepAliveTimeoutThreshold], + client[kKeepAliveMaxTimeout] + ) + if (timeout <= 0) { + socket[kReset] = true } else { - callback(err, response, body); + client[kKeepAliveTimeoutValue] = timeout } + } else { + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] } + } else { + // Stop more requests from being dispatched. + socket[kReset] = true + } - return; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false + + if (request.aborted) { + return -1 } - // Send the response to see if we should try again. - // NOTE: "currentRetryAttempt" isn't accurate by default, as it counts - // the very first request sent as the first "retry". It is only accurate - // when a user provides their own "currentRetryAttempt" option at - // instantiation. - const adjustedCurrentRetryAttempt = manualCurrentRetryAttemptWasSet - ? currentRetryAttempt - : currentRetryAttempt - 1; - if ( - adjustedCurrentRetryAttempt < opts.retries && - opts.shouldRetryFn(response) - ) { - retryAfterDelay(currentRetryAttempt); - return; + if (request.method === 'HEAD') { + return 1 + } + + if (statusCode < 200) { + return 1 + } + + if (socket[kBlocking]) { + socket[kBlocking] = false + resume(client) + } + + return pause ? constants.ERROR.PAUSED : 0 + } + + onBody (buf) { + const { client, socket, statusCode, maxResponseSize } = this + + if (socket.destroyed) { + return -1 + } + + const request = client[kQueue][client[kRunningIdx]] + assert(request) + + assert.strictEqual(this.timeoutType, TIMEOUT_BODY) + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } } - // No more attempts need to be made, just continue on. - if (streamMode) { - retryStream.emit('response', response); - delayStream.pipe(retryStream); - requestStream.on('error', err => { - retryStream.destroy(err); - }); - } else { - callback(err, response, body); + assert(statusCode >= 200) + + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()) + return -1 } - } -} -module.exports = retryRequest; + this.bytesRead += buf.length -function getNextRetryDelay(config) { - const { - maxRetryDelay, - retryDelayMultiplier, - retryNumber, - timeOfFirstRequest, - totalTimeout, - } = config; + if (request.onData(buf) === false) { + return constants.ERROR.PAUSED + } + } - const maxRetryDelayMs = maxRetryDelay * 1000; - const totalTimeoutMs = totalTimeout * 1000; + onMessageComplete () { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - const jitter = Math.floor(Math.random() * 1000); - const calculatedNextRetryDelay = - Math.pow(retryDelayMultiplier, retryNumber) * 1000 + jitter; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1 + } - const maxAllowableDelayMs = - totalTimeoutMs - (Date.now() - timeOfFirstRequest); + if (upgrade) { + return + } - return Math.min( - calculatedNextRetryDelay, - maxAllowableDelayMs, - maxRetryDelayMs - ); -} + const request = client[kQueue][client[kRunningIdx]] + assert(request) -module.exports.defaults = DEFAULTS; -module.exports.getNextRetryDelay = getNextRetryDelay; + assert(statusCode >= 100) + this.statusCode = null + this.statusText = '' + this.bytesRead = 0 + this.contentLength = '' + this.keepAlive = '' + this.connection = '' -/***/ }), + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 -/***/ 71604: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (statusCode < 200) { + return + } -module.exports = __nccwpck_require__(56244); + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()) + return -1 + } -/***/ }), + request.onComplete(headers) -/***/ 56244: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + client[kQueue][client[kRunningIdx]++] = null -var RetryOperation = __nccwpck_require__(45369); + if (socket[kWriting]) { + assert.strictEqual(client[kRunning], 0) + // Response completed before request. + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (socket[kReset] && client[kRunning] === 0) { + // Destroy socket once all requests have completed. + // The request at the tail of the pipeline is the one + // that requested reset and no further requests should + // have been queued since then. + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (client[kPipelining] === 1) { + // We must wait a full event loop cycle to reuse this socket to make sure + // that non-spec compliant servers are not closing the connection even if they + // said they won't. + setImmediate(resume, client) + } else { + resume(client) + } + } +} -exports.operation = function(options) { - var timeouts = exports.timeouts(options); - return new RetryOperation(timeouts, { - forever: options && (options.forever || options.retries === Infinity), - unref: options && options.unref, - maxRetryTime: options && options.maxRetryTime - }); -}; +function onParserTimeout (parser) { + const { socket, timeoutType, client } = parser -exports.timeouts = function(options) { - if (options instanceof Array) { - return [].concat(options); + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert(!parser.paused, 'cannot be paused while waiting for headers') + util.destroy(socket, new HeadersTimeoutError()) + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!parser.paused) { + util.destroy(socket, new BodyTimeoutError()) + } + } else if (timeoutType === TIMEOUT_IDLE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) + util.destroy(socket, new InformationalError('socket idle timeout')) } +} - var opts = { - retries: 10, - factor: 2, - minTimeout: 1 * 1000, - maxTimeout: Infinity, - randomize: false - }; - for (var key in options) { - opts[key] = options[key]; +function onSocketReadable () { + const { [kParser]: parser } = this + if (parser) { + parser.readMore() } +} - if (opts.minTimeout > opts.maxTimeout) { - throw new Error('minTimeout is greater than maxTimeout'); - } +function onSocketError (err) { + const { [kClient]: client, [kParser]: parser } = this - var timeouts = []; - for (var i = 0; i < opts.retries; i++) { - timeouts.push(this.createTimeout(i, opts)); - } + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - if (options && options.forever && !timeouts.length) { - timeouts.push(this.createTimeout(i, opts)); + if (client[kHTTPConnVersion] !== 'h2') { + // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded + // to the user. + if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so for as a valid response. + parser.onMessageComplete() + return + } } - // sort the array numerically ascending - timeouts.sort(function(a,b) { - return a - b; - }); - - return timeouts; -}; + this[kError] = err -exports.createTimeout = function(attempt, opts) { - var random = (opts.randomize) - ? (Math.random() + 1) - : 1; + onError(this[kClient], err) +} - var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt)); - timeout = Math.min(timeout, opts.maxTimeout); +function onError (client, err) { + if ( + client[kRunning] === 0 && + err.code !== 'UND_ERR_INFO' && + err.code !== 'UND_ERR_SOCKET' + ) { + // Error is not caused by running request and not a recoverable + // socket error. - return timeout; -}; + assert(client[kPendingIdx] === client[kRunningIdx]) -exports.wrap = function(obj, options, methods) { - if (options instanceof Array) { - methods = options; - options = null; + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + assert(client[kSize] === 0) } +} - if (!methods) { - methods = []; - for (var key in obj) { - if (typeof obj[key] === 'function') { - methods.push(key); - } +function onSocketEnd () { + const { [kParser]: parser, [kClient]: client } = this + + if (client[kHTTPConnVersion] !== 'h2') { + if (parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + return } } - for (var i = 0; i < methods.length; i++) { - var method = methods[i]; - var original = obj[method]; + util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) +} - obj[method] = function retryWrapper(original) { - var op = exports.operation(options); - var args = Array.prototype.slice.call(arguments, 1); - var callback = args.pop(); +function onSocketClose () { + const { [kClient]: client, [kParser]: parser } = this - args.push(function(err) { - if (op.retry(err)) { - return; - } - if (err) { - arguments[0] = op.mainError(); - } - callback.apply(this, arguments); - }); + if (client[kHTTPConnVersion] === 'h1' && parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + } - op.attempt(function() { - original.apply(obj, args); - }); - }.bind(obj, original); - obj[method].options = options; + this[kParser].destroy() + this[kParser] = null } -}; + const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) -/***/ }), + client[kSocket] = null -/***/ 45369: -/***/ ((module) => { + if (client.destroyed) { + assert(client[kPending] === 0) -function RetryOperation(timeouts, options) { - // Compatibility for the old (timeouts, retryForever) signature - if (typeof options === 'boolean') { - options = { forever: options }; + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null + + errorRequest(client, request, err) } - this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); - this._timeouts = timeouts; - this._options = options || {}; - this._maxRetryTime = options && options.maxRetryTime || Infinity; - this._fn = null; - this._errors = []; - this._attempts = 1; - this._operationTimeout = null; - this._operationTimeoutCb = null; - this._timeout = null; - this._operationStart = null; - this._timer = null; + client[kPendingIdx] = client[kRunningIdx] - if (this._options.forever) { - this._cachedTimeouts = this._timeouts.slice(0); - } -} -module.exports = RetryOperation; + assert(client[kRunning] === 0) -RetryOperation.prototype.reset = function() { - this._attempts = 1; - this._timeouts = this._originalTimeouts.slice(0); + client.emit('disconnect', client[kUrl], [client], err) + + resume(client) } -RetryOperation.prototype.stop = function() { - if (this._timeout) { - clearTimeout(this._timeout); - } - if (this._timer) { - clearTimeout(this._timer); - } +async function connect (client) { + assert(!client[kConnecting]) + assert(!client[kSocket]) - this._timeouts = []; - this._cachedTimeouts = null; -}; + let { host, hostname, protocol, port } = client[kUrl] -RetryOperation.prototype.retry = function(err) { - if (this._timeout) { - clearTimeout(this._timeout); - } + // Resolve ipv6 + if (hostname[0] === '[') { + const idx = hostname.indexOf(']') - if (!err) { - return false; + assert(idx !== -1) + const ip = hostname.substring(1, idx) + + assert(net.isIP(ip)) + hostname = ip } - var currentTime = new Date().getTime(); - if (err && currentTime - this._operationStart >= this._maxRetryTime) { - this._errors.push(err); - this._errors.unshift(new Error('RetryOperation timeout occurred')); - return false; + + client[kConnecting] = true + + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }) } - this._errors.push(err); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) { + reject(err) + } else { + resolve(socket) + } + }) + }) - var timeout = this._timeouts.shift(); - if (timeout === undefined) { - if (this._cachedTimeouts) { - // retry forever, only keep last error - this._errors.splice(0, this._errors.length - 1); - timeout = this._cachedTimeouts.slice(-1); - } else { - return false; + if (client.destroyed) { + util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) + return } - } - var self = this; - this._timer = setTimeout(function() { - self._attempts++; + client[kConnecting] = false - if (self._operationTimeoutCb) { - self._timeout = setTimeout(function() { - self._operationTimeoutCb(self._attempts); - }, self._operationTimeout); + assert(socket) - if (self._options.unref) { - self._timeout.unref(); + const isH2 = socket.alpnProtocol === 'h2' + if (isH2) { + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true + process.emitWarning('H2 support is experimental, expect them to change at any time.', { + code: 'UNDICI-H2' + }) + } + + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams + }) + + client[kHTTPConnVersion] = 'h2' + session[kClient] = client + session[kSocket] = socket + session.on('error', onHttp2SessionError) + session.on('frameError', onHttp2FrameError) + session.on('end', onHttp2SessionEnd) + session.on('goaway', onHTTP2GoAway) + session.on('close', onSocketClose) + session.unref() + + client[kHTTP2Session] = session + socket[kHTTP2Session] = session + } else { + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise + llhttpPromise = null } + + socket[kNoRef] = false + socket[kWriting] = false + socket[kReset] = false + socket[kBlocking] = false + socket[kParser] = new Parser(client, socket, llhttpInstance) } - self._fn(self._attempts); - }, timeout); + socket[kCounter] = 0 + socket[kMaxRequests] = client[kMaxRequests] + socket[kClient] = client + socket[kError] = null - if (this._options.unref) { - this._timer.unref(); - } + socket + .on('error', onSocketError) + .on('readable', onSocketReadable) + .on('end', onSocketEnd) + .on('close', onSocketClose) - return true; -}; + client[kSocket] = socket -RetryOperation.prototype.attempt = function(fn, timeoutOps) { - this._fn = fn; + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }) + } + client.emit('connect', client[kUrl], [client]) + } catch (err) { + if (client.destroyed) { + return + } - if (timeoutOps) { - if (timeoutOps.timeout) { - this._operationTimeout = timeoutOps.timeout; + client[kConnecting] = false + + if (channels.connectError.hasSubscribers) { + channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }) } - if (timeoutOps.cb) { - this._operationTimeoutCb = timeoutOps.cb; + + if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { + assert(client[kRunning] === 0) + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++] + errorRequest(client, request, err) + } + } else { + onError(client, err) } + + client.emit('connectionError', client[kUrl], [client], err) } - var self = this; - if (this._operationTimeoutCb) { - this._timeout = setTimeout(function() { - self._operationTimeoutCb(); - }, self._operationTimeout); + resume(client) +} + +function emitDrain (client) { + client[kNeedDrain] = 0 + client.emit('drain', client[kUrl], [client]) +} + +function resume (client, sync) { + if (client[kResuming] === 2) { + return } - this._operationStart = new Date().getTime(); - - this._fn(this._attempts); -}; + client[kResuming] = 2 -RetryOperation.prototype.try = function(fn) { - console.log('Using RetryOperation.try() is deprecated'); - this.attempt(fn); -}; + _resume(client, sync) + client[kResuming] = 0 -RetryOperation.prototype.start = function(fn) { - console.log('Using RetryOperation.start() is deprecated'); - this.attempt(fn); -}; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]) + client[kPendingIdx] -= client[kRunningIdx] + client[kRunningIdx] = 0 + } +} -RetryOperation.prototype.start = RetryOperation.prototype.try; +function _resume (client, sync) { + while (true) { + if (client.destroyed) { + assert(client[kPending] === 0) + return + } -RetryOperation.prototype.errors = function() { - return this._errors; -}; + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve]() + client[kClosedResolve] = null + return + } -RetryOperation.prototype.attempts = function() { - return this._attempts; -}; + const socket = client[kSocket] -RetryOperation.prototype.mainError = function() { - if (this._errors.length === 0) { - return null; - } + if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref() + socket[kNoRef] = true + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref() + socket[kNoRef] = false + } - var counts = {}; - var mainError = null; - var mainErrorCount = 0; + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE) + } + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]] + const headersTimeout = request.headersTimeout != null + ? request.headersTimeout + : client[kHeadersTimeout] + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) + } + } + } - for (var i = 0; i < this._errors.length; i++) { - var error = this._errors[i]; - var message = error.message; - var count = (counts[message] || 0) + 1; + if (client[kBusy]) { + client[kNeedDrain] = 2 + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1 + process.nextTick(emitDrain, client) + } else { + emitDrain(client) + } + continue + } - counts[message] = count; + if (client[kPending] === 0) { + return + } - if (count >= mainErrorCount) { - mainError = error; - mainErrorCount = count; + if (client[kRunning] >= (client[kPipelining] || 1)) { + return } - } - return mainError; -}; + const request = client[kQueue][client[kPendingIdx]] + if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) { + return + } -/***/ }), + client[kServerName] = request.servername -/***/ 21867: -/***/ ((module, exports, __nccwpck_require__) => { + if (socket && socket.servername !== request.servername) { + util.destroy(socket, new InformationalError('servername changed')) + return + } + } -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = __nccwpck_require__(14300) -var Buffer = buffer.Buffer + if (client[kConnecting]) { + return + } -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} + if (!socket && !client[kHTTP2Session]) { + connect(client) + return + } -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} + if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return + } -SafeBuffer.prototype = Object.create(Buffer.prototype) + if (client[kRunning] > 0 && !request.idempotent) { + // Non-idempotent request cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return + } -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) + if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { + // Don't dispatch an upgrade until all preceding requests have completed. + // A misbehaving server might upgrade the connection before all pipelined + // request has completed. + return + } -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && + (util.isStream(request.body) || util.isAsyncIterable(request.body))) { + // Request with stream or iterator body can error while other requests + // are inflight and indirectly error those as well. + // Ensure this doesn't happen by waiting for inflight + // to complete before dispatching. -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) + // Request with stream or iterator body cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return + } + + if (!request.aborted && write(client, request)) { + client[kPendingIdx]++ } else { - buf.fill(fill) + client[kQueue].splice(client[kPendingIdx], 1) } - } else { - buf.fill(0) } - return buf } -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function shouldSendContentLength (method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' } -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') +function write (client, request) { + if (client[kHTTPConnVersion] === 'h2') { + writeH2(client, client[kHTTP2Session], request) + return } - return buffer.SlowBuffer(size) -} - -/***/ }), + const { body, method, path, host, upgrade, headers, blocking, reset } = request -/***/ 91532: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. - constructor (comp, options) { - options = parseOptions(options) + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) + const bodyLength = util.bodyLength(body) - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } + let contentLength = bodyLength - debug('comp', this) + if (contentLength === null) { + contentLength = request.contentLength } - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) + if (contentLength === 0 && !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } + contentLength = null + } - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false } - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } + process.emitWarning(new RequestContentLengthMismatchError()) } - toString () { - return this.value - } + const socket = client[kSocket] - test (version) { - debug('Comparator.test', version, this.options.loose) + try { + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } - if (this.semver === ANY || version === ANY) { - return true - } + errorRequest(client, request, err || new RequestAbortedError()) - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } + util.destroy(socket, new InformationalError('aborted')) + }) + } catch (err) { + errorRequest(client, request, err) + } - return cmp(version, this.operator, this.semver, this.options) + if (request.aborted) { + return false } - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } + if (method === 'HEAD') { + // https://github.com/mcollina/undici/issues/258 + // Close after a HEAD request to interop with misbehaving servers + // that may send a body in the response. - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } + socket[kReset] = true + } - options = parseOptions(options) + if (upgrade || method === 'CONNECT') { + // On CONNECT or upgrade, block pipeline from dispatching further + // requests on this connection. - // Special cases where nothing can possibly be lower - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false - } + socket[kReset] = true + } - // Same direction increasing (> or >=) - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - // Same direction decreasing (< or <=) - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - // same SemVer and both sides are inclusive (<= or >=) - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - // opposite directions less than - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - // opposite directions greater than - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true - } - return false + if (reset != null) { + socket[kReset] = reset } -} -module.exports = Comparator + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true + } -const parseOptions = __nccwpck_require__(40785) -const { safeRe: re, t } = __nccwpck_require__(9523) -const cmp = __nccwpck_require__(75098) -const debug = __nccwpck_require__(50427) -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) + if (blocking) { + socket[kBlocking] = true + } + let header = `${method} ${path} HTTP/1.1\r\n` -/***/ }), + if (typeof host === 'string') { + header += `host: ${host}\r\n` + } else { + header += client[kHostHeader] + } -/***/ 9828: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (upgrade) { + header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` + } else if (client[kPipelining] && !socket[kReset]) { + header += 'connection: keep-alive\r\n' + } else { + header += 'connection: close\r\n' + } -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) + if (headers) { + header += headers + } - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }) + } - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.format() - return this + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') + } else { + assert(contentLength === null, 'no body must not have content length') + socket.write(`${header}\r\n`, 'latin1') } + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range - .trim() - .split(/\s+/) - .join(' ') + socket.cork() + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + socket.write(body) + socket.uncork() + request.onBodySent(body) + request.onRequestSent() + if (!expectsPayload) { + socket[kReset] = true + } + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) + } else { + writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }) + } + } else if (util.isStream(body)) { + writeStream({ body, client, request, socket, contentLength, header, expectsPayload }) + } else if (util.isIterable(body)) { + writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }) + } else { + assert(false) + } - // First, split on || - this.set = this.raw - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) + return true +} - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } +function writeH2 (client, session, request) { + const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } + let headers + if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) + else headers = reqHeaders - this.format() + if (upgrade) { + errorRequest(client, request, new Error('Upgrade not supported for H2')) + return false } - format () { - this.range = this.set - .map((comps) => comps.join(' ').trim()) - .join('||') - .trim() - return this.range + try { + // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } + + errorRequest(client, request, err || new RequestAbortedError()) + }) + } catch (err) { + errorRequest(client, request, err) } - toString () { - return this.range + if (request.aborted) { + return false } - parseRange (range) { - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE) - const memoKey = memoOpts + ':' + range - const cached = cache.get(memoKey) - if (cached) { - return cached + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream + const h2State = client[kHTTP2SessionState] + + headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] + headers[HTTP2_HEADER_METHOD] = method + + if (method === 'CONNECT') { + session.ref() + // we are already connected, streams are pending, first request + // will create a new stream. We trigger a request to create the stream and wait until + // `ready` event is triggered + // We disabled endStream to allow the user to write to the stream + stream = session.request(headers, { endStream: false, signal }) + + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + } else { + stream.once('ready', () => { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + }) } - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) session.unref() + }) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) + return true + } - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - debug('tilde trim', range) + // https://tools.ietf.org/html/rfc7540#section-8.3 + // :path and :scheme headers must be omited when sending CONNECT - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - debug('caret trim', range) + headers[HTTP2_HEADER_PATH] = path + headers[HTTP2_HEADER_SCHEME] = 'https' - // At this point, the range is completely trimmed and - // ready to be split into comparators. + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) - } - debug('range list', rangeList) + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') - } + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result + let contentLength = util.bodyLength(body) + + if (contentLength == null) { + contentLength = request.contentLength } - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } + if (contentLength === 0 || !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) + contentLength = null } - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) return false } - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false + process.emitWarning(new RequestContentLengthMismatchError()) } -} - -module.exports = Range -const LRU = __nccwpck_require__(81196) -const cache = new LRU({ max: 1000 }) - -const parseOptions = __nccwpck_require__(40785) -const Comparator = __nccwpck_require__(91532) -const debug = __nccwpck_require__(50427) -const SemVer = __nccwpck_require__(48088) -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = __nccwpck_require__(9523) -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(42293) + if (contentLength != null) { + assert(body, 'no body must not have content length') + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` + } -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' + session.ref() -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() + const shouldEndStream = method === 'GET' || method === 'HEAD' + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = '100-continue' + stream = session.request(headers, { endStream: shouldEndStream, signal }) - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) + stream.once('continue', writeBodyH2) + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal }) - - testComparator = remainingComparators.pop() + writeBodyH2() } - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} + // Increment counter as we have new several streams open + ++h2State.openStreams -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + stream.once('response', headers => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { + stream.pause() + } + }) -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret + stream.once('end', () => { + request.onComplete([]) + }) - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` + stream.on('data', (chunk) => { + if (request.onData(chunk) === false) { + stream.pause() } + }) - debug('tilde return', ret) - return ret + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) { + session.unref() + } }) -} -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} + stream.once('error', function (err) { + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret + stream.once('frameError', (type, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + errorRequest(client, request, err) - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) } - - debug('caret return', ret) - return ret }) -} -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') -} + // stream.on('aborted', () => { + // // TODO(HTTP/2): Support aborted + // }) -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp + // stream.on('timeout', () => { + // // TODO(HTTP/2): Support timeout + // }) - if (gtlt === '=' && anyX) { - gtlt = '' - } + // stream.on('push', headers => { + // // TODO(HTTP/2): Suppor push + // }) - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' + // stream.on('trailers', headers => { + // // TODO(HTTP/2): Support trailers + // }) - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' + return true + + function writeBodyH2 () { + /* istanbul ignore else: assertion */ + if (!body) { + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') + stream.cork() + stream.write(body) + stream.uncork() + stream.end() + request.onBodySent(body) + request.onRequestSent() + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ + client, + request, + contentLength, + h2stream: stream, + expectsPayload, + body: body.stream(), + socket: client[kSocket], + header: '' + }) } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 + writeBlob({ + body, + client, + request, + contentLength, + expectsPayload, + h2stream: stream, + header: '', + socket: client[kSocket] + }) } - p = 0 + } else if (util.isStream(body)) { + writeStream({ + body, + client, + request, + contentLength, + expectsPayload, + socket: client[kSocket], + h2stream: stream, + header: '' + }) + } else if (util.isIterable(body)) { + writeIterable({ + body, + client, + request, + contentLength, + expectsPayload, + header: '', + h2stream: stream, + socket: client[kSocket] + }) + } else { + assert(false) + } + } +} - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 +function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') + + if (client[kHTTPConnVersion] === 'h2') { + // For HTTP/2, is enough to pipe the stream + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(body, err) + util.destroy(h2stream, err) } else { - m = +m + 1 + request.onRequestSent() } } + ) - if (gtlt === '<') { - pr = '-0' - } + pipe.on('data', onPipeData) + pipe.once('end', () => { + pipe.removeListener('data', onPipeData) + util.destroy(pipe) + }) - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` + function onPipeData (chunk) { + request.onBodySent(chunk) } - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` + return } - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } + let finished = false - return `${from} ${to}`.trim() -} + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false + const onData = function (chunk) { + if (finished) { + return } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } + try { + if (!writer.write(chunk) && this.pause) { + this.pause() } + } catch (err) { + util.destroy(this, err) } - - // Version has a -pre, but it's not one of the ones we like. - return false } + const onDrain = function () { + if (finished) { + return + } - return true -} - + if (body.resume) { + body.resume() + } + } + const onAbort = function () { + if (finished) { + return + } + const err = new RequestAbortedError() + queueMicrotask(() => onFinished(err)) + } + const onFinished = function (err) { + if (finished) { + return + } -/***/ }), + finished = true -/***/ 48088: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) -const debug = __nccwpck_require__(50427) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(42293) -const { safeRe: re, t } = __nccwpck_require__(9523) + socket + .off('drain', onDrain) + .off('error', onFinished) -const parseOptions = __nccwpck_require__(40785) -const { compareIdentifiers } = __nccwpck_require__(92463) -class SemVer { - constructor (version, options) { - options = parseOptions(options) + body + .removeListener('data', onData) + .removeListener('end', onFinished) + .removeListener('error', onFinished) + .removeListener('close', onAbort) - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version + if (!err) { + try { + writer.end() + } catch (er) { + err = er } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) } - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + writer.destroy(err) - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) + if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { + util.destroy(body, err) + } else { + util.destroy(body) } + } - this.raw = version + body + .on('data', onData) + .on('end', onFinished) + .on('error', onFinished) + .on('close', onAbort) - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] + if (body.resume) { + body.resume() + } - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } + socket + .on('drain', onDrain) + .on('error', onFinished) +} - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } +async function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength === body.size, 'blob body must have content length') - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') + const isH2 = client[kHTTPConnVersion] === 'h2' + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError() } - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] + const buffer = Buffer.from(await body.arrayBuffer()) + + if (isH2) { + h2stream.cork() + h2stream.write(buffer) + h2stream.uncork() } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) + socket.cork() + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + socket.write(buffer) + socket.uncork() } - this.build = m[5] ? m[5].split('.') : [] - this.format() - } + request.onBodySent(buffer) + request.onRequestSent() - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` + if (!expectsPayload) { + socket[kReset] = true } - return this.version - } - toString () { - return this.version + resume(client) + } catch (err) { + util.destroy(isH2 ? h2stream : socket, err) } +} - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } +async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - if (other.version === this.version) { - return 0 + let callback = null + function onDrain () { + if (callback) { + const cb = callback + callback = null + cb() } - - return this.compareMain(other) || this.comparePre(other) } - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } + const waitForDrain = () => new Promise((resolve, reject) => { + assert(callback === null) - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) + if (socket[kError]) { + reject(socket[kError]) + } else { + callback = resolve } + }) - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } + if (client[kHTTPConnVersion] === 'h2') { + h2stream + .on('close', onDrain) + .on('drain', onDrain) - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) + const res = h2stream.write(chunk) + request.onBodySent(chunk) + if (!res) { + await waitForDrain() + } + } + } catch (err) { + h2stream.destroy(err) + } finally { + request.onRequestSent() + h2stream.end() + h2stream + .off('close', onDrain) + .off('drain', onDrain) } - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) + return } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier, identifierBase) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier, identifierBase) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) - } - this.inc('pre', identifier, identifierBase) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 + socket + .on('close', onDrain) + .on('drain', onDrain) - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } - if (this.prerelease.length === 0) { - this.prerelease = [base] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease - } - } else { - this.prerelease = prerelease - } - } - break + if (!writer.write(chunk)) { + await waitForDrain() } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` } - return this + + writer.end() + } catch (err) { + writer.destroy(err) + } finally { + socket + .off('close', onDrain) + .off('drain', onDrain) } } -module.exports = SemVer +class AsyncWriter { + constructor ({ socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket + this.request = request + this.contentLength = contentLength + this.client = client + this.bytesWritten = 0 + this.expectsPayload = expectsPayload + this.header = header + socket[kWriting] = true + } -/***/ }), + write (chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this -/***/ 48848: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (socket[kError]) { + throw socket[kError] + } -const parse = __nccwpck_require__(75925) -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean + if (socket.destroyed) { + return false + } + const len = Buffer.byteLength(chunk) + if (!len) { + return true + } -/***/ }), + // We should defer writing chunks. + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError() + } -/***/ 75098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + process.emitWarning(new RequestContentLengthMismatchError()) + } -const eq = __nccwpck_require__(91898) -const neq = __nccwpck_require__(6017) -const gt = __nccwpck_require__(84123) -const gte = __nccwpck_require__(15522) -const lt = __nccwpck_require__(80194) -const lte = __nccwpck_require__(77520) + socket.cork() -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version + if (bytesWritten === 0) { + if (!expectsPayload) { + socket[kReset] = true } - return a === b - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') + } else { + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') } - return a !== b + } - case '': - case '=': - case '==': - return eq(a, b, loose) + if (contentLength === null) { + socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') + } - case '!=': - return neq(a, b, loose) + this.bytesWritten += len - case '>': - return gt(a, b, loose) + const ret = socket.write(chunk) - case '>=': - return gte(a, b, loose) + socket.uncork() - case '<': - return lt(a, b, loose) + request.onBodySent(chunk) - case '<=': - return lte(a, b, loose) + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh() + } + } + } - default: - throw new TypeError(`Invalid operator: ${op}`) + return ret } -} -module.exports = cmp + end () { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this + request.onRequestSent() -/***/ }), - -/***/ 13466: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + socket[kWriting] = false -const SemVer = __nccwpck_require__(48088) -const parse = __nccwpck_require__(75925) -const { safeRe: re, t } = __nccwpck_require__(9523) + if (socket[kError]) { + throw socket[kError] + } -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } + if (socket.destroyed) { + return + } - if (typeof version === 'number') { - version = String(version) - } + if (bytesWritten === 0) { + if (expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD send a Content-Length in a request message when + // no Transfer-Encoding is sent and the request method defines a meaning + // for an enclosed payload body. - if (typeof version !== 'string') { - return null - } + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') + } else { + socket.write(`${header}\r\n`, 'latin1') + } + } else if (contentLength === null) { + socket.write('\r\n0\r\n\r\n', 'latin1') + } - options = options || {} + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError() + } else { + process.emitWarning(new RequestContentLengthMismatchError()) + } + } - let match = null - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] - let next - while ((next = coerceRtlRegex.exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh() } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length } - // leave it in a clean state - coerceRtlRegex.lastIndex = -1 - } - if (match === null) { - return null + resume(client) } - const major = match[2] - const minor = match[3] || '0' - const patch = match[4] || '0' - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' - const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' - - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) -} -module.exports = coerce - - -/***/ }), + destroy (err) { + const { socket, client } = this -/***/ 92156: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + socket[kWriting] = false -const SemVer = __nccwpck_require__(48088) -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) + if (err) { + assert(client[kRunning] <= 1, 'pipeline should only contain this request') + util.destroy(socket, err) + } + } } -module.exports = compareBuild +function errorRequest (client, request, err) { + try { + request.onError(err) + assert(request.aborted) + } catch (err) { + client.emit('error', err) + } +} -/***/ }), - -/***/ 62804: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(44309) -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose +module.exports = Client /***/ }), -/***/ 44309: +/***/ 56436: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const SemVer = __nccwpck_require__(48088) -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare - - -/***/ }), +"use strict"; -/***/ 64297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const parse = __nccwpck_require__(75925) +/* istanbul ignore file: only for Node 12 */ -const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) +const { kConnected, kSize } = __nccwpck_require__(72785) - if (comparison === 0) { - return null +class CompatWeakRef { + constructor (value) { + this.value = value } - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length - - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing - - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' - } + deref () { + return this.value[kConnected] === 0 && this.value[kSize] === 0 + ? undefined + : this.value + } +} - // Otherwise it can be determined by checking the high version +class CompatFinalizer { + constructor (finalizer) { + this.finalizer = finalizer + } - if (highVersion.patch) { - // anything higher than a patch bump would result in the wrong version - return 'patch' + register (dispatcher, key) { + if (dispatcher.on) { + dispatcher.on('disconnect', () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { + this.finalizer(key) + } + }) } + } +} - if (highVersion.minor) { - // anything higher than a minor bump would result in the wrong version - return 'minor' +module.exports = function () { + // FIXME: remove workaround when the Node bug is fixed + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer } - - // bumping major/minor/patch all have same result - return 'major' } - - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' - - if (v1.major !== v2.major) { - return prefix + 'major' + return { + WeakRef: global.WeakRef || CompatWeakRef, + FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer } +} - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } +/***/ }), - // high and low are preleases - return 'prerelease' -} +/***/ 20663: +/***/ ((module) => { -module.exports = diff +"use strict"; -/***/ }), +// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size +const maxAttributeValueSize = 1024 -/***/ 91898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size +const maxNameValuePairSize = 4096 -const compare = __nccwpck_require__(44309) -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq +module.exports = { + maxAttributeValueSize, + maxNameValuePairSize +} /***/ }), -/***/ 84123: +/***/ 41724: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const compare = __nccwpck_require__(44309) -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt +"use strict"; -/***/ }), +const { parseSetCookie } = __nccwpck_require__(24408) +const { stringify } = __nccwpck_require__(43121) +const { webidl } = __nccwpck_require__(21744) +const { Headers } = __nccwpck_require__(10554) -/***/ 15522: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ -const compare = __nccwpck_require__(44309) -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte +/** + * @param {Headers} headers + * @returns {Record} + */ +function getCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' }) + webidl.brandCheck(headers, Headers, { strict: false }) -/***/ }), + const cookie = headers.get('cookie') + const out = {} -/***/ 30900: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (!cookie) { + return out + } -const SemVer = __nccwpck_require__(48088) + for (const piece of cookie.split(';')) { + const [name, ...value] = piece.split('=') -const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier - identifier = options - options = undefined + out[name.trim()] = value.join('=') } - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } + return out } -module.exports = inc +/** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ +function deleteCookie (headers, name, attributes) { + webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) -/***/ }), + webidl.brandCheck(headers, Headers, { strict: false }) -/***/ 80194: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + name = webidl.converters.DOMString(name) + attributes = webidl.converters.DeleteCookieAttributes(attributes) -const compare = __nccwpck_require__(44309) -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt + // Matches behavior of + // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 + setCookie(headers, { + name, + value: '', + expires: new Date(0), + ...attributes + }) +} +/** + * @param {Headers} headers + * @returns {Cookie[]} + */ +function getSetCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) -/***/ }), + webidl.brandCheck(headers, Headers, { strict: false }) -/***/ 77520: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const cookies = headers.getSetCookie() -const compare = __nccwpck_require__(44309) -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte + if (!cookies) { + return [] + } + return cookies.map((pair) => parseSetCookie(pair)) +} -/***/ }), +/** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ +function setCookie (headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) -/***/ 76688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + webidl.brandCheck(headers, Headers, { strict: false }) -const SemVer = __nccwpck_require__(48088) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major + cookie = webidl.converters.Cookie(cookie) + const str = stringify(cookie) -/***/ }), + if (str) { + headers.append('Set-Cookie', stringify(cookie)) + } +} -/***/ 38447: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null + } +]) + +webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: 'name' + }, + { + converter: webidl.converters.DOMString, + key: 'value' + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === 'number') { + return webidl.converters['unsigned long long'](value) + } + + return new Date(value) + }), + key: 'expires', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters['long long']), + key: 'maxAge', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'secure', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'httpOnly', + defaultValue: null + }, + { + converter: webidl.converters.USVString, + key: 'sameSite', + allowedValues: ['Strict', 'Lax', 'None'] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: 'unparsed', + defaultValue: [] + } +]) -const SemVer = __nccwpck_require__(48088) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor +module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie +} /***/ }), -/***/ 6017: +/***/ 24408: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const compare = __nccwpck_require__(44309) -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq - +"use strict"; -/***/ }), -/***/ 75925: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(20663) +const { isCTLExcludingHtab } = __nccwpck_require__(43121) +const { collectASequenceOfCodePointsFast } = __nccwpck_require__(685) +const assert = __nccwpck_require__(39491) -const SemVer = __nccwpck_require__(48088) -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null - } - throw er +/** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ +function parseSetCookie (header) { + // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F + // character (CTL characters excluding HTAB): Abort these steps and + // ignore the set-cookie-string entirely. + if (isCTLExcludingHtab(header)) { + return null } -} - -module.exports = parse + let nameValuePair = '' + let unparsedAttributes = '' + let name = '' + let value = '' -/***/ }), + // 2. If the set-cookie-string contains a %x3B (";") character: + if (header.includes(';')) { + // 1. The name-value-pair string consists of the characters up to, + // but not including, the first %x3B (";"), and the unparsed- + // attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question). + const position = { position: 0 } -/***/ 42866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + nameValuePair = collectASequenceOfCodePointsFast(';', header, position) + unparsedAttributes = header.slice(position.position) + } else { + // Otherwise: -const SemVer = __nccwpck_require__(48088) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch + // 1. The name-value-pair string consists of all the characters + // contained in the set-cookie-string, and the unparsed- + // attributes is the empty string. + nameValuePair = header + } + // 3. If the name-value-pair string lacks a %x3D ("=") character, then + // the name string is empty, and the value string is the value of + // name-value-pair. + if (!nameValuePair.includes('=')) { + value = nameValuePair + } else { + // Otherwise, the name string consists of the characters up to, but + // not including, the first %x3D ("=") character, and the (possibly + // empty) value string consists of the characters after the first + // %x3D ("=") character. + const position = { position: 0 } + name = collectASequenceOfCodePointsFast( + '=', + nameValuePair, + position + ) + value = nameValuePair.slice(position.position + 1) + } -/***/ }), + // 4. Remove any leading or trailing WSP characters from the name + // string and the value string. + name = name.trim() + value = value.trim() -/***/ 24016: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 5. If the sum of the lengths of the name string and the value string + // is more than 4096 octets, abort these steps and ignore the set- + // cookie-string entirely. + if (name.length + value.length > maxNameValuePairSize) { + return null + } -const parse = __nccwpck_require__(75925) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null + // 6. The cookie-name is the name string, and the cookie-value is the + // value string. + return { + name, value, ...parseUnparsedAttributes(unparsedAttributes) + } } -module.exports = prerelease - -/***/ }), - -/***/ 76417: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ +function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { + // 1. If the unparsed-attributes string is empty, skip the rest of + // these steps. + if (unparsedAttributes.length === 0) { + return cookieAttributeList + } -const compare = __nccwpck_require__(44309) -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare + // 2. Discard the first character of the unparsed-attributes (which + // will be a %x3B (";") character). + assert(unparsedAttributes[0] === ';') + unparsedAttributes = unparsedAttributes.slice(1) + let cookieAv = '' -/***/ }), + // 3. If the remaining unparsed-attributes contains a %x3B (";") + // character: + if (unparsedAttributes.includes(';')) { + // 1. Consume the characters of the unparsed-attributes up to, but + // not including, the first %x3B (";") character. + cookieAv = collectASequenceOfCodePointsFast( + ';', + unparsedAttributes, + { position: 0 } + ) + unparsedAttributes = unparsedAttributes.slice(cookieAv.length) + } else { + // Otherwise: -/***/ 8701: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 1. Consume the remainder of the unparsed-attributes. + cookieAv = unparsedAttributes + unparsedAttributes = '' + } -const compareBuild = __nccwpck_require__(92156) -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort + // Let the cookie-av string be the characters consumed in this step. + let attributeName = '' + let attributeValue = '' -/***/ }), + // 4. If the cookie-av string contains a %x3D ("=") character: + if (cookieAv.includes('=')) { + // 1. The (possibly empty) attribute-name string consists of the + // characters up to, but not including, the first %x3D ("=") + // character, and the (possibly empty) attribute-value string + // consists of the characters after the first %x3D ("=") + // character. + const position = { position: 0 } -/***/ 6055: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + attributeName = collectASequenceOfCodePointsFast( + '=', + cookieAv, + position + ) + attributeValue = cookieAv.slice(position.position + 1) + } else { + // Otherwise: -const Range = __nccwpck_require__(9828) -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false + // 1. The attribute-name string consists of the entire cookie-av + // string, and the attribute-value string is empty. + attributeName = cookieAv } - return range.test(version) -} -module.exports = satisfies - - -/***/ }), -/***/ 61426: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compareBuild = __nccwpck_require__(92156) -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort + // 5. Remove any leading or trailing WSP characters from the attribute- + // name string and the attribute-value string. + attributeName = attributeName.trim() + attributeValue = attributeValue.trim() + // 6. If the attribute-value is longer than 1024 octets, ignore the + // cookie-av string and return to Step 1 of this algorithm. + if (attributeValue.length > maxAttributeValueSize) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } -/***/ }), + // 7. Process the attribute-name and attribute-value according to the + // requirements in the following subsections. (Notice that + // attributes with unrecognized attribute-names are ignored.) + const attributeNameLowercase = attributeName.toLowerCase() -/***/ 19601: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 + // If the attribute-name case-insensitively matches the string + // "Expires", the user agent MUST process the cookie-av as follows. + if (attributeNameLowercase === 'expires') { + // 1. Let the expiry-time be the result of parsing the attribute-value + // as cookie-date (see Section 5.1.1). + const expiryTime = new Date(attributeValue) -const parse = __nccwpck_require__(75925) -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid + // 2. If the attribute-value failed to parse as a cookie date, ignore + // the cookie-av. + cookieAttributeList.expires = expiryTime + } else if (attributeNameLowercase === 'max-age') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 + // If the attribute-name case-insensitively matches the string "Max- + // Age", the user agent MUST process the cookie-av as follows. -/***/ }), + // 1. If the first character of the attribute-value is not a DIGIT or a + // "-" character, ignore the cookie-av. + const charCode = attributeValue.charCodeAt(0) -/***/ 11383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } -// just pre-load all the stuff that index.js lazily exports -const internalRe = __nccwpck_require__(9523) -const constants = __nccwpck_require__(42293) -const SemVer = __nccwpck_require__(48088) -const identifiers = __nccwpck_require__(92463) -const parse = __nccwpck_require__(75925) -const valid = __nccwpck_require__(19601) -const clean = __nccwpck_require__(48848) -const inc = __nccwpck_require__(30900) -const diff = __nccwpck_require__(64297) -const major = __nccwpck_require__(76688) -const minor = __nccwpck_require__(38447) -const patch = __nccwpck_require__(42866) -const prerelease = __nccwpck_require__(24016) -const compare = __nccwpck_require__(44309) -const rcompare = __nccwpck_require__(76417) -const compareLoose = __nccwpck_require__(62804) -const compareBuild = __nccwpck_require__(92156) -const sort = __nccwpck_require__(61426) -const rsort = __nccwpck_require__(8701) -const gt = __nccwpck_require__(84123) -const lt = __nccwpck_require__(80194) -const eq = __nccwpck_require__(91898) -const neq = __nccwpck_require__(6017) -const gte = __nccwpck_require__(15522) -const lte = __nccwpck_require__(77520) -const cmp = __nccwpck_require__(75098) -const coerce = __nccwpck_require__(13466) -const Comparator = __nccwpck_require__(91532) -const Range = __nccwpck_require__(9828) -const satisfies = __nccwpck_require__(6055) -const toComparators = __nccwpck_require__(52706) -const maxSatisfying = __nccwpck_require__(20579) -const minSatisfying = __nccwpck_require__(10832) -const minVersion = __nccwpck_require__(34179) -const validRange = __nccwpck_require__(2098) -const outside = __nccwpck_require__(60420) -const gtr = __nccwpck_require__(9380) -const ltr = __nccwpck_require__(33323) -const intersects = __nccwpck_require__(27008) -const simplifyRange = __nccwpck_require__(75297) -const subset = __nccwpck_require__(7863) -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} + // 2. If the remainder of attribute-value contains a non-DIGIT + // character, ignore the cookie-av. + if (!/^\d+$/.test(attributeValue)) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + // 3. Let delta-seconds be the attribute-value converted to an integer. + const deltaSeconds = Number(attributeValue) -/***/ }), + // 4. Let cookie-age-limit be the maximum age of the cookie (which + // SHOULD be 400 days or less, see Section 4.1.2.2). -/***/ 42293: -/***/ ((module) => { + // 5. Set delta-seconds to the smaller of its present value and cookie- + // age-limit. + // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' + // 6. If delta-seconds is less than or equal to zero (0), let expiry- + // time be the earliest representable date and time. Otherwise, let + // the expiry-time be the current date and time plus delta-seconds + // seconds. + // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 + // 7. Append an attribute to the cookie-attribute-list with an + // attribute-name of Max-Age and an attribute-value of expiry-time. + cookieAttributeList.maxAge = deltaSeconds + } else if (attributeNameLowercase === 'domain') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 + // If the attribute-name case-insensitively matches the string "Domain", + // the user agent MUST process the cookie-av as follows. -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 + // 1. Let cookie-domain be the attribute-value. + let cookieDomain = attributeValue -// Max safe length for a build identifier. The max length minus 6 characters for -// the shortest version with a build 0.0.0+BUILD. -const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be + // cookie-domain without its leading %x2E ("."). + if (cookieDomain[0] === '.') { + cookieDomain = cookieDomain.slice(1) + } -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] + // 3. Convert the cookie-domain to lower case. + cookieDomain = cookieDomain.toLowerCase() -module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, -} + // 4. Append an attribute to the cookie-attribute-list with an + // attribute-name of Domain and an attribute-value of cookie-domain. + cookieAttributeList.domain = cookieDomain + } else if (attributeNameLowercase === 'path') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 + // If the attribute-name case-insensitively matches the string "Path", + // the user agent MUST process the cookie-av as follows. + // 1. If the attribute-value is empty or if the first character of the + // attribute-value is not %x2F ("/"): + let cookiePath = '' + if (attributeValue.length === 0 || attributeValue[0] !== '/') { + // 1. Let cookie-path be the default-path. + cookiePath = '/' + } else { + // Otherwise: -/***/ }), + // 1. Let cookie-path be the attribute-value. + cookiePath = attributeValue + } -/***/ 50427: -/***/ ((module) => { + // 2. Append an attribute to the cookie-attribute-list with an + // attribute-name of Path and an attribute-value of cookie-path. + cookieAttributeList.path = cookiePath + } else if (attributeNameLowercase === 'secure') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 + // If the attribute-name case-insensitively matches the string "Secure", + // the user agent MUST append an attribute to the cookie-attribute-list + // with an attribute-name of Secure and an empty attribute-value. -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} + cookieAttributeList.secure = true + } else if (attributeNameLowercase === 'httponly') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 + // If the attribute-name case-insensitively matches the string + // "HttpOnly", the user agent MUST append an attribute to the cookie- + // attribute-list with an attribute-name of HttpOnly and an empty + // attribute-value. -module.exports = debug + cookieAttributeList.httpOnly = true + } else if (attributeNameLowercase === 'samesite') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 + // If the attribute-name case-insensitively matches the string + // "SameSite", the user agent MUST process the cookie-av as follows: + // 1. Let enforcement be "Default". + let enforcement = 'Default' -/***/ }), + const attributeValueLowercase = attributeValue.toLowerCase() + // 2. If cookie-av's attribute-value is a case-insensitive match for + // "None", set enforcement to "None". + if (attributeValueLowercase.includes('none')) { + enforcement = 'None' + } -/***/ 92463: -/***/ ((module) => { + // 3. If cookie-av's attribute-value is a case-insensitive match for + // "Strict", set enforcement to "Strict". + if (attributeValueLowercase.includes('strict')) { + enforcement = 'Strict' + } -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) + // 4. If cookie-av's attribute-value is a case-insensitive match for + // "Lax", set enforcement to "Lax". + if (attributeValueLowercase.includes('lax')) { + enforcement = 'Lax' + } - if (anum && bnum) { - a = +a - b = +b + // 5. Append an attribute to the cookie-attribute-list with an + // attribute-name of "SameSite" and an attribute-value of + // enforcement. + cookieAttributeList.sameSite = enforcement + } else { + cookieAttributeList.unparsed ??= [] + + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) } - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 + // 8. Return to Step 1 of this algorithm. + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) } -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - module.exports = { - compareIdentifiers, - rcompareIdentifiers, + parseSetCookie, + parseUnparsedAttributes } /***/ }), -/***/ 40785: +/***/ 43121: /***/ ((module) => { -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts - } +"use strict"; - if (typeof options !== 'object') { - return looseOption - } - return options -} -module.exports = parseOptions +/** + * @param {string} value + * @returns {boolean} + */ +function isCTLExcludingHtab (value) { + if (value.length === 0) { + return false + } + for (const char of value) { + const code = char.charCodeAt(0) -/***/ }), + if ( + (code >= 0x00 || code <= 0x08) || + (code >= 0x0A || code <= 0x1F) || + code === 0x7F + ) { + return false + } + } +} -/***/ 9523: -/***/ ((module, exports, __nccwpck_require__) => { +/** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ +function validateCookieName (name) { + for (const char of name) { + const code = char.charCodeAt(0) -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = __nccwpck_require__(42293) -const debug = __nccwpck_require__(50427) -exports = module.exports = {} + if ( + (code <= 0x20 || code > 0x7F) || + char === '(' || + char === ')' || + char === '>' || + char === '<' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' + ) { + throw new Error('Invalid cookie name') + } + } +} -// The actual regexps go on exports.re -const re = exports.re = [] -const safeRe = exports.safeRe = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 +/** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ +function validateCookieValue (value) { + for (const char of value) { + const code = char.charCodeAt(0) -const LETTERDASHNUMBER = '[a-zA-Z0-9-]' + if ( + code < 0x21 || // exclude CTLs (0-31) + code === 0x22 || + code === 0x2C || + code === 0x3B || + code === 0x5C || + code > 0x7E // non-ascii + ) { + throw new Error('Invalid header value') + } + } +} -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] +/** + * path-value = + * @param {string} path + */ +function validateCookiePath (path) { + for (const char of path) { + const code = char.charCodeAt(0) -const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`) + if (code < 0x21 || char === ';') { + throw new Error('Invalid cookie path') + } } - return value } -const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value) - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) +/** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ +function validateCookieDomain (domain) { + if ( + domain.startsWith('-') || + domain.endsWith('.') || + domain.endsWith('-') + ) { + throw new Error('Invalid cookie domain') + } } -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '\\d+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) - -// ## Main Version -// Three dot-separated numeric identifiers. +/** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. + GMT = %x47.4D.54 ; "GMT", case-sensitive -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ +function toIMFDate (date) { + if (typeof date === 'number') { + date = new Date(date) + } -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. + const days = [ + 'Sun', 'Mon', 'Tue', 'Wed', + 'Thu', 'Fri', 'Sat' + ] -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + const months = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' + ] -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + const dayName = days[date.getUTCDay()] + const day = date.getUTCDate().toString().padStart(2, '0') + const month = months[date.getUTCMonth()] + const year = date.getUTCFullYear() + const hour = date.getUTCHours().toString().padStart(2, '0') + const minute = date.getUTCMinutes().toString().padStart(2, '0') + const second = date.getUTCSeconds().toString().padStart(2, '0') -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. + return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT` +} -createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) +/** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ +function validateCookieMaxAge (maxAge) { + if (maxAge < 0) { + throw new Error('Invalid cookie max-age') + } +} -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. +/** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ +function stringify (cookie) { + if (cookie.name.length === 0) { + return null + } -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + validateCookieName(cookie.name) + validateCookieValue(cookie.value) -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. + const out = [`${cookie.name}=${cookie.value}`] -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 + if (cookie.name.startsWith('__Secure-')) { + cookie.secure = true + } -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) + if (cookie.name.startsWith('__Host-')) { + cookie.secure = true + cookie.domain = null + cookie.path = '/' + } -createToken('FULL', `^${src[t.FULLPLAIN]}$`) + if (cookie.secure) { + out.push('Secure') + } -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) + if (cookie.httpOnly) { + out.push('HttpOnly') + } -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + if (typeof cookie.maxAge === 'number') { + validateCookieMaxAge(cookie.maxAge) + out.push(`Max-Age=${cookie.maxAge}`) + } -createToken('GTLT', '((?:<|>)?=?)') + if (cookie.domain) { + validateCookieDomain(cookie.domain) + out.push(`Domain=${cookie.domain}`) + } -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + if (cookie.path) { + validateCookiePath(cookie.path) + out.push(`Path=${cookie.path}`) + } -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) + if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { + out.push(`Expires=${toIMFDate(cookie.expires)}`) + } -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) + if (cookie.sameSite) { + out.push(`SameSite=${cookie.sameSite}`) + } -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + for (const part of cookie.unparsed) { + if (!part.includes('=')) { + throw new Error('Invalid unparsed') + } -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCEPLAIN', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) -createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) -createToken('COERCEFULL', src[t.COERCEPLAIN] + - `(?:${src[t.PRERELEASE]})?` + - `(?:${src[t.BUILD]})?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) -createToken('COERCERTLFULL', src[t.COERCEFULL], true) + const [key, ...value] = part.split('=') -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') + out.push(`${key.trim()}=${value.join('=')}`) + } -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' + return out.join('; ') +} -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) +module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify +} -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' +/***/ }), -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) +/***/ 82067: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) +"use strict"; -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) +const net = __nccwpck_require__(41808) +const assert = __nccwpck_require__(39491) +const util = __nccwpck_require__(83983) +const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(48045) -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) +let tls // include tls conditionally since it is not always available -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') +// TODO: session re-use does not wait for the first +// connection to resolve the session and might therefore +// resolve the same servername multiple times even when +// re-use is enabled. +let SessionCache +// FIXME: remove workaround when the Node bug is fixed +// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 +if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { + SessionCache = class WeakSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return + } -/***/ }), + const ref = this._sessionCache.get(key) + if (ref !== undefined && ref.deref() === undefined) { + this._sessionCache.delete(key) + } + }) + } -/***/ 81196: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + get (sessionKey) { + const ref = this._sessionCache.get(sessionKey) + return ref ? ref.deref() : null + } -"use strict"; + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return + } + this._sessionCache.set(sessionKey, new WeakRef(session)) + this._sessionRegistry.register(session, sessionKey) + } + } +} else { + SessionCache = class SimpleSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + } -// A linked list to keep track of recently-used-ness -const Yallist = __nccwpck_require__(70220) + get (sessionKey) { + return this._sessionCache.get(sessionKey) + } -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return + } -const naiveLength = () => 1 + if (this._sessionCache.size >= this._maxCachedSessions) { + // remove the oldest session + const { value: oldestKey } = this._sessionCache.keys().next() + this._sessionCache.delete(oldestKey) + } -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } + this._sessionCache.set(sessionKey, session) + } + } +} - if (!options) - options = {} +function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { + throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') + } - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity + const options = { path: socketPath, ...opts } + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) + timeout = timeout == null ? 10e3 : timeout + allowH2 = allowH2 != null ? allowH2 : false + return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket + if (protocol === 'https:') { + if (!tls) { + tls = __nccwpck_require__(24404) + } + servername = servername || options.servername || util.getServerName(host) || null - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() - } + const sessionKey = servername || hostname + const session = sessionCache.get(sessionKey) || null - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') + assert(sessionKey) - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] - } + socket = tls.connect({ + highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... + ...options, + servername, + session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], + socket: httpSocket, // upgrade socket connection + port: port || 443, + host: hostname + }) - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] - } + socket + .on('session', function (session) { + // TODO (fix): Can a session become invalid once established? Don't think so? + sessionCache.set(sessionKey, session) + }) + } else { + assert(!httpSocket, 'httpSocket can only be sent on TLS update') + socket = net.connect({ + highWaterMark: 64 * 1024, // Same as nodejs fs streams. + ...options, + localAddress, + port: port || 80, + host: hostname + }) + } - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') + // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay + socket.setKeepAlive(true, keepAliveInitialDelay) + } - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } + const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength + socket + .setNoDelay(true) + .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { + cancelTimeout() - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length + if (callback) { + const cb = callback + callback = null + cb(null, this) + } }) - } - trim(this) - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } + .on('error', function (err) { + cancelTimeout() - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } + if (callback) { + const cb = callback + callback = null + cb(err) + } + }) - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } + return socket } +} - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next - } +function setupTimeout (onConnectTimeout, timeout) { + if (!timeout) { + return () => {} } - keys () { - return this[LRU_LIST].toArray().map(k => k.key) + let s1 = null + let s2 = null + const timeoutId = setTimeout(() => { + // setImmediate is added to make sure that we priotorise socket error events over timeouts + s1 = setImmediate(() => { + if (process.platform === 'win32') { + // Windows needs an extra setImmediate probably due to implementation differences in the socket logic + s2 = setImmediate(() => onConnectTimeout()) + } else { + onConnectTimeout() + } + }) + }, timeout) + return () => { + clearTimeout(timeoutId) + clearImmediate(s1) + clearImmediate(s2) } +} - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } +function onConnectTimeout (socket) { + util.destroy(socket, new ConnectTimeoutError()) +} - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } +module.exports = buildConnector - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } +/***/ }), - dumpLru () { - return this[LRU_LIST] - } +/***/ 14462: +/***/ ((module) => { - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] +"use strict"; - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) +/** @type {Record} */ +const headerNameLowerCasedRecord = {} + +// https://developer.mozilla.org/docs/Web/HTTP/Headers +const wellknownHeaderNames = [ + 'Accept', + 'Accept-Encoding', + 'Accept-Language', + 'Accept-Ranges', + 'Access-Control-Allow-Credentials', + 'Access-Control-Allow-Headers', + 'Access-Control-Allow-Methods', + 'Access-Control-Allow-Origin', + 'Access-Control-Expose-Headers', + 'Access-Control-Max-Age', + 'Access-Control-Request-Headers', + 'Access-Control-Request-Method', + 'Age', + 'Allow', + 'Alt-Svc', + 'Alt-Used', + 'Authorization', + 'Cache-Control', + 'Clear-Site-Data', + 'Connection', + 'Content-Disposition', + 'Content-Encoding', + 'Content-Language', + 'Content-Length', + 'Content-Location', + 'Content-Range', + 'Content-Security-Policy', + 'Content-Security-Policy-Report-Only', + 'Content-Type', + 'Cookie', + 'Cross-Origin-Embedder-Policy', + 'Cross-Origin-Opener-Policy', + 'Cross-Origin-Resource-Policy', + 'Date', + 'Device-Memory', + 'Downlink', + 'ECT', + 'ETag', + 'Expect', + 'Expect-CT', + 'Expires', + 'Forwarded', + 'From', + 'Host', + 'If-Match', + 'If-Modified-Since', + 'If-None-Match', + 'If-Range', + 'If-Unmodified-Since', + 'Keep-Alive', + 'Last-Modified', + 'Link', + 'Location', + 'Max-Forwards', + 'Origin', + 'Permissions-Policy', + 'Pragma', + 'Proxy-Authenticate', + 'Proxy-Authorization', + 'RTT', + 'Range', + 'Referer', + 'Referrer-Policy', + 'Refresh', + 'Retry-After', + 'Sec-WebSocket-Accept', + 'Sec-WebSocket-Extensions', + 'Sec-WebSocket-Key', + 'Sec-WebSocket-Protocol', + 'Sec-WebSocket-Version', + 'Server', + 'Server-Timing', + 'Service-Worker-Allowed', + 'Service-Worker-Navigation-Preload', + 'Set-Cookie', + 'SourceMap', + 'Strict-Transport-Security', + 'Supports-Loading-Mode', + 'TE', + 'Timing-Allow-Origin', + 'Trailer', + 'Transfer-Encoding', + 'Upgrade', + 'Upgrade-Insecure-Requests', + 'User-Agent', + 'Vary', + 'Via', + 'WWW-Authenticate', + 'X-Content-Type-Options', + 'X-DNS-Prefetch-Control', + 'X-Frame-Options', + 'X-Permitted-Cross-Domain-Policies', + 'X-Powered-By', + 'X-Requested-With', + 'X-XSS-Protection' +] - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } +for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i] + const lowerCasedKey = key.toLowerCase() + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = + lowerCasedKey +} - const node = this[CACHE].get(key) - const item = node.value +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(headerNameLowerCasedRecord, null) - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } +module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord +} - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - const hit = new Entry(key, value, len, now, maxAge) +/***/ }), - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value) +/***/ 48045: +/***/ ((module) => { - return false - } +"use strict"; - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true - } - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) +class UndiciError extends Error { + constructor (message) { + super(message) + this.name = 'UndiciError' + this.code = 'UND_ERR' } +} - get (key) { - return get(this, key, true) +class ConnectTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ConnectTimeoutError) + this.name = 'ConnectTimeoutError' + this.message = message || 'Connect Timeout Error' + this.code = 'UND_ERR_CONNECT_TIMEOUT' } +} - peek (key) { - return get(this, key, false) +class HeadersTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersTimeoutError) + this.name = 'HeadersTimeoutError' + this.message = message || 'Headers Timeout Error' + this.code = 'UND_ERR_HEADERS_TIMEOUT' } +} - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null - - del(this, node) - return node.value +class HeadersOverflowError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersOverflowError) + this.name = 'HeadersOverflowError' + this.message = message || 'Headers Overflow Error' + this.code = 'UND_ERR_HEADERS_OVERFLOW' } +} - del (key) { - del(this, this[CACHE].get(key)) +class BodyTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, BodyTimeoutError) + this.name = 'BodyTimeoutError' + this.message = message || 'Body Timeout Error' + this.code = 'UND_ERR_BODY_TIMEOUT' } +} - load (arr) { - // reset the cache - this.reset() - - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const expiresAt = hit.e || 0 - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v) - else { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } +class ResponseStatusCodeError extends UndiciError { + constructor (message, statusCode, headers, body) { + super(message) + Error.captureStackTrace(this, ResponseStatusCodeError) + this.name = 'ResponseStatusCodeError' + this.message = message || 'Response Status Code Error' + this.code = 'UND_ERR_RESPONSE_STATUS_CODE' + this.body = body + this.status = statusCode + this.statusCode = statusCode + this.headers = headers } +} - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) +class InvalidArgumentError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidArgumentError) + this.name = 'InvalidArgumentError' + this.message = message || 'Invalid Argument Error' + this.code = 'UND_ERR_INVALID_ARG' } } -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value +class InvalidReturnValueError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidReturnValueError) + this.name = 'InvalidReturnValueError' + this.message = message || 'Invalid Return Value Error' + this.code = 'UND_ERR_INVALID_RETURN_VALUE' } } -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) +class RequestAbortedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestAbortedError) + this.name = 'AbortError' + this.message = message || 'Request aborted' + this.code = 'UND_ERR_ABORTED' + } } -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } +class InformationalError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InformationalError) + this.name = 'InformationalError' + this.message = message || 'Request information' + this.code = 'UND_ERR_INFO' } } -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) +class RequestContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestContentLengthMismatchError) + this.name = 'RequestContentLengthMismatchError' + this.message = message || 'Request body length does not match content-length header' + this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' + } +} - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) +class ResponseContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseContentLengthMismatchError) + this.name = 'ResponseContentLengthMismatchError' + this.message = message || 'Response body length does not match content-length header' + this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' } } -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 +class ClientDestroyedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientDestroyedError) + this.name = 'ClientDestroyedError' + this.message = message || 'The client is destroyed' + this.code = 'UND_ERR_DESTROYED' } } -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined +class ClientClosedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientClosedError) + this.name = 'ClientClosedError' + this.message = message || 'The client is closed' + this.code = 'UND_ERR_CLOSED' } - if (hit) - fn.call(thisp, hit.value, hit.key, self) } -module.exports = LRUCache +class SocketError extends UndiciError { + constructor (message, socket) { + super(message) + Error.captureStackTrace(this, SocketError) + this.name = 'SocketError' + this.message = message || 'Socket error' + this.code = 'UND_ERR_SOCKET' + this.socket = socket + } +} +class NotSupportedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'NotSupportedError' + this.message = message || 'Not supported error' + this.code = 'UND_ERR_NOT_SUPPORTED' + } +} -/***/ }), +class BalancedPoolMissingUpstreamError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'MissingUpstreamError' + this.message = message || 'No upstream has been added to the BalancedPool' + this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' + } +} -/***/ 45327: -/***/ ((module) => { +class HTTPParserError extends Error { + constructor (message, code, data) { + super(message) + Error.captureStackTrace(this, HTTPParserError) + this.name = 'HTTPParserError' + this.code = code ? `HPE_${code}` : undefined + this.data = data ? data.toString() : undefined + } +} -"use strict"; +class ResponseExceededMaxSizeError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseExceededMaxSizeError) + this.name = 'ResponseExceededMaxSizeError' + this.message = message || 'Response content exceeded max size' + this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } +} -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } +class RequestRetryError extends UndiciError { + constructor (message, code, { headers, data }) { + super(message) + Error.captureStackTrace(this, RequestRetryError) + this.name = 'RequestRetryError' + this.message = message || 'Request retry error' + this.code = 'UND_ERR_REQ_RETRY' + this.statusCode = code + this.data = data + this.headers = headers } } +module.exports = { + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError +} + /***/ }), -/***/ 70220: +/***/ 62905: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -module.exports = Yallist - -Yallist.Node = Node -Yallist.create = Yallist - -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() - } - - self.tail = null - self.head = null - self.length = 0 - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) - } - } +const { + InvalidArgumentError, + NotSupportedError +} = __nccwpck_require__(48045) +const assert = __nccwpck_require__(39491) +const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(72785) +const util = __nccwpck_require__(83983) - return self -} +// tokenRegExp and headerCharRegex have been lifted from +// https://github.com/nodejs/node/blob/main/lib/_http_common.js -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') - } +/** + * Verifies that the given val is a valid HTTP token + * per the rules defined in RFC 7230 + * See https://tools.ietf.org/html/rfc7230#section-3.2.6 + */ +const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/ - var next = node.next - var prev = node.prev +/** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ +const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - if (next) { - next.prev = prev - } +// Verifies that a given path is valid does not contain control chars \x00 to \x20 +const invalidPathRegex = /[^\u0021-\u00ff]/ - if (prev) { - prev.next = next - } +const kHandler = Symbol('handler') - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev - } +const channels = {} - node.list.length-- - node.next = null - node.prev = null - node.list = null +let extractBody - return next +try { + const diagnosticsChannel = __nccwpck_require__(67643) + channels.create = diagnosticsChannel.channel('undici:request:create') + channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') + channels.headers = diagnosticsChannel.channel('undici:request:headers') + channels.trailers = diagnosticsChannel.channel('undici:request:trailers') + channels.error = diagnosticsChannel.channel('undici:request:error') +} catch { + channels.create = { hasSubscribers: false } + channels.bodySent = { hasSubscribers: false } + channels.headers = { hasSubscribers: false } + channels.trailers = { hasSubscribers: false } + channels.error = { hasSubscribers: false } } -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } +class Request { + constructor (origin, { + path, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue + }, handler) { + if (typeof path !== 'string') { + throw new InvalidArgumentError('path must be a string') + } else if ( + path[0] !== '/' && + !(path.startsWith('http://') || path.startsWith('https://')) && + method !== 'CONNECT' + ) { + throw new InvalidArgumentError('path must be an absolute URL or start with a slash') + } else if (invalidPathRegex.exec(path) !== null) { + throw new InvalidArgumentError('invalid request path') + } - if (node.list) { - node.list.removeNode(node) - } + if (typeof method !== 'string') { + throw new InvalidArgumentError('method must be a string') + } else if (tokenRegExp.exec(method) === null) { + throw new InvalidArgumentError('invalid request method') + } - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node - } + if (upgrade && typeof upgrade !== 'string') { + throw new InvalidArgumentError('upgrade must be a string') + } - this.head = node - if (!this.tail) { - this.tail = node - } - this.length++ -} + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError('invalid headersTimeout') + } -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError('invalid bodyTimeout') + } - if (node.list) { - node.list.removeNode(node) - } + if (reset != null && typeof reset !== 'boolean') { + throw new InvalidArgumentError('invalid reset') + } - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node - } + if (expectContinue != null && typeof expectContinue !== 'boolean') { + throw new InvalidArgumentError('invalid expectContinue') + } - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} + this.headersTimeout = headersTimeout -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) - } - return this.length -} + this.bodyTimeout = bodyTimeout -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) - } - return this.length -} + this.throwOnError = throwOnError === true -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } + this.method = method - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res -} + this.abort = null -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } + if (body == null) { + this.body = null + } else if (util.isStream(body)) { + this.body = body - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null - } - this.length-- - return res -} + const rState = this.body._readableState + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy () { + util.destroy(this) + } + this.body.on('end', this.endHandler) + } -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } -} + this.errorHandler = err => { + if (this.abort) { + this.abort(err) + } else { + this.error = err + } + } + this.body.on('error', this.errorHandler) + } else if (util.isBuffer(body)) { + this.body = body.byteLength ? body : null + } else if (ArrayBuffer.isView(body)) { + this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null + } else if (body instanceof ArrayBuffer) { + this.body = body.byteLength ? Buffer.from(body) : null + } else if (typeof body === 'string') { + this.body = body.length ? Buffer.from(body) : null + } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { + this.body = body + } else { + throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') + } -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } -} + this.completed = false -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } -} + this.aborted = false -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value - } -} + this.upgrade = upgrade || null -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next - } - return res -} + this.path = query ? util.buildURL(path, query) : path -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res -} + this.origin = origin -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } + this.idempotent = idempotent == null + ? method === 'HEAD' || method === 'GET' + : idempotent - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } + this.blocking = blocking == null ? false : blocking - return acc -} + this.reset = reset == null ? null : reset -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } + this.host = null - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } + this.contentLength = null - return acc -} + this.contentType = null -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} + this.headers = '' -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} + // Only for H2 + this.expectContinue = expectContinue != null ? expectContinue : false -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret -} + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError('headers array must be even') + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(this, headers[i], headers[i + 1]) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(this, key, headers[key]) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') + } -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} + if (util.isFormDataLike(this.body)) { + if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { + throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') + } -Yallist.prototype.splice = function (start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1 - } - if (start < 0) { - start = this.length + start; - } + if (!extractBody) { + extractBody = (__nccwpck_require__(41472).extractBody) + } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next - } + const [bodyStream, contentType] = extractBody(body) + if (this.contentType == null) { + this.contentType = contentType + this.headers += `content-type: ${contentType}\r\n` + } + this.body = bodyStream.stream + this.contentLength = bodyStream.length + } else if (util.isBlobLike(body) && this.contentType == null && body.type) { + this.contentType = body.type + this.headers += `content-type: ${body.type}\r\n` + } - var ret = [] - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value) - walker = this.removeNode(walker) - } - if (walker === null) { - walker = this.tail - } + util.validateHandler(handler, method, upgrade) - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev - } + this.servername = util.getServerName(this.host) - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]) - } - return ret; -} + this[kHandler] = handler -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }) + } } - this.head = tail - this.tail = head - return this -} -function insert (self, node, value) { - var inserted = node === self.head ? - new Node(value, null, node, self) : - new Node(value, node, node.next, self) - - if (inserted.next === null) { - self.tail = inserted - } - if (inserted.prev === null) { - self.head = inserted + onBodySent (chunk) { + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk) + } catch (err) { + this.abort(err) + } + } } - self.length++ - - return inserted -} + onRequestSent () { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }) + } -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent() + } catch (err) { + this.abort(err) + } + } } - self.length++ -} -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} + onConnect (abort) { + assert(!this.aborted) + assert(!this.completed) -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) + if (this.error) { + abort(this.error) + } else { + this.abort = abort + return this[kHandler].onConnect(abort) + } } - this.list = list - this.value = value + onHeaders (statusCode, headers, resume, statusText) { + assert(!this.aborted) + assert(!this.completed) - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null - } + if (channels.headers.hasSubscribers) { + channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) + } - if (next) { - next.prev = this - this.next = next - } else { - this.next = null + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText) + } catch (err) { + this.abort(err) + } } -} - -try { - // add if support for Symbol.iterator is present - __nccwpck_require__(45327)(Yallist) -} catch (er) {} + onData (chunk) { + assert(!this.aborted) + assert(!this.completed) -/***/ }), - -/***/ 9380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + try { + return this[kHandler].onData(chunk) + } catch (err) { + this.abort(err) + return false + } + } -// Determine if version is greater than all the versions possible in the range. -const outside = __nccwpck_require__(60420) -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr + onUpgrade (statusCode, headers, socket) { + assert(!this.aborted) + assert(!this.completed) + return this[kHandler].onUpgrade(statusCode, headers, socket) + } -/***/ }), + onComplete (trailers) { + this.onFinally() -/***/ 27008: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + assert(!this.aborted) -const Range = __nccwpck_require__(9828) -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects + this.completed = true + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }) + } + try { + return this[kHandler].onComplete(trailers) + } catch (err) { + // TODO (fix): This might be a bad idea? + this.onError(err) + } + } -/***/ }), + onError (error) { + this.onFinally() -/***/ 33323: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }) + } -const outside = __nccwpck_require__(60420) -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr + if (this.aborted) { + return + } + this.aborted = true + return this[kHandler].onError(error) + } -/***/ }), + onFinally () { + if (this.errorHandler) { + this.body.off('error', this.errorHandler) + this.errorHandler = null + } -/***/ 20579: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (this.endHandler) { + this.body.off('end', this.endHandler) + this.endHandler = null + } + } -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) + // TODO: adjust to support H2 + addHeader (key, value) { + processHeader(this, key, value) + return this + } -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null + static [kHTTP1BuildRequest] (origin, opts, handler) { + // TODO: Migrate header parsing here, to make Requests + // HTTP agnostic + return new Request(origin, opts, handler) } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying + static [kHTTP2BuildRequest] (origin, opts, handler) { + const headers = opts.headers + opts = { ...opts, headers: null } -/***/ }), + const request = new Request(origin, opts, handler) -/***/ 10832: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + request.headers = {} -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError('headers array must be even') + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(request, headers[i], headers[i + 1], true) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(request, key, headers[key], true) } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') } - }) - return min -} -module.exports = minSatisfying + return request + } -/***/ }), + static [kHTTP2CopyHeaders] (raw) { + const rawHeaders = raw.split('\r\n') + const headers = {} -/***/ 34179: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + for (const header of rawHeaders) { + const [key, value] = header.split(': ') -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) -const gt = __nccwpck_require__(84123) + if (value == null || value.length === 0) continue -const minVersion = (range, loose) => { - range = new Range(range, loose) + if (headers[key]) headers[key] += `,${value}` + else headers[key] = value + } - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver + return headers } +} - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver +function processHeaderValue (key, val, skipAppend) { + if (val && typeof val === 'object') { + throw new InvalidArgumentError(`invalid ${key} header`) } - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin - } - } + val = val != null ? `${val}` : '' - if (minver && range.test(minver)) { - return minver + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) } - return null + return skipAppend ? val : `${key}: ${val}\r\n` } -module.exports = minVersion - - -/***/ }), - -/***/ 60420: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(48088) -const Comparator = __nccwpck_require__(91532) -const { ANY } = Comparator -const Range = __nccwpck_require__(9828) -const satisfies = __nccwpck_require__(6055) -const gt = __nccwpck_require__(84123) -const lt = __nccwpck_require__(80194) -const lte = __nccwpck_require__(77520) -const gte = __nccwpck_require__(15522) - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false +function processHeader (request, key, val, skipAppend = false) { + if (val && (typeof val === 'object' && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`) + } else if (val === undefined) { + return } - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator + if ( + request.host === null && + key.length === 4 && + key.toLowerCase() === 'host' + ) { + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + // Consumed by Client + request.host = val + } else if ( + request.contentLength === null && + key.length === 14 && + key.toLowerCase() === 'content-length' + ) { + request.contentLength = parseInt(val, 10) + if (!Number.isFinite(request.contentLength)) { + throw new InvalidArgumentError('invalid content-length header') + } + } else if ( + request.contentType === null && + key.length === 12 && + key.toLowerCase() === 'content-type' + ) { + request.contentType = val + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) + } else if ( + key.length === 17 && + key.toLowerCase() === 'transfer-encoding' + ) { + throw new InvalidArgumentError('invalid transfer-encoding header') + } else if ( + key.length === 10 && + key.toLowerCase() === 'connection' + ) { + const value = typeof val === 'string' ? val.toLowerCase() : null + if (value !== 'close' && value !== 'keep-alive') { + throw new InvalidArgumentError('invalid connection header') + } else if (value === 'close') { + request.reset = true + } + } else if ( + key.length === 10 && + key.toLowerCase() === 'keep-alive' + ) { + throw new InvalidArgumentError('invalid keep-alive header') + } else if ( + key.length === 7 && + key.toLowerCase() === 'upgrade' + ) { + throw new InvalidArgumentError('invalid upgrade header') + } else if ( + key.length === 6 && + key.toLowerCase() === 'expect' + ) { + throw new NotSupportedError('expect header not supported') + } else if (tokenRegExp.exec(key) === null) { + throw new InvalidArgumentError('invalid header key') + } else { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (skipAppend) { + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` + else request.headers[key] = processHeaderValue(key, val[i], skipAppend) + } else { + request.headers += processHeaderValue(key, val[i]) + } } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false + } else { + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) } } - return true } -module.exports = outside +module.exports = Request /***/ }), -/***/ 75297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = __nccwpck_require__(6055) -const compare = __nccwpck_require__(44309) -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null - } - } - if (first) { - set.push([first, null]) - } +/***/ 72785: +/***/ ((module) => { - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range +module.exports = { + kClose: Symbol('close'), + kDestroy: Symbol('destroy'), + kDispatch: Symbol('dispatch'), + kUrl: Symbol('url'), + kWriting: Symbol('writing'), + kResuming: Symbol('resuming'), + kQueue: Symbol('queue'), + kConnect: Symbol('connect'), + kConnecting: Symbol('connecting'), + kHeadersList: Symbol('headers list'), + kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), + kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), + kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), + kKeepAliveTimeoutValue: Symbol('keep alive timeout'), + kKeepAlive: Symbol('keep alive'), + kHeadersTimeout: Symbol('headers timeout'), + kBodyTimeout: Symbol('body timeout'), + kServerName: Symbol('server name'), + kLocalAddress: Symbol('local address'), + kHost: Symbol('host'), + kNoRef: Symbol('no ref'), + kBodyUsed: Symbol('used'), + kRunning: Symbol('running'), + kBlocking: Symbol('blocking'), + kPending: Symbol('pending'), + kSize: Symbol('size'), + kBusy: Symbol('busy'), + kQueued: Symbol('queued'), + kFree: Symbol('free'), + kConnected: Symbol('connected'), + kClosed: Symbol('closed'), + kNeedDrain: Symbol('need drain'), + kReset: Symbol('reset'), + kDestroyed: Symbol.for('nodejs.stream.destroyed'), + kMaxHeadersSize: Symbol('max headers size'), + kRunningIdx: Symbol('running index'), + kPendingIdx: Symbol('pending index'), + kError: Symbol('error'), + kClients: Symbol('clients'), + kClient: Symbol('client'), + kParser: Symbol('parser'), + kOnDestroyed: Symbol('destroy callbacks'), + kPipelining: Symbol('pipelining'), + kSocket: Symbol('socket'), + kHostHeader: Symbol('host header'), + kConnector: Symbol('connector'), + kStrictContentLength: Symbol('strict content length'), + kMaxRedirections: Symbol('maxRedirections'), + kMaxRequests: Symbol('maxRequestsPerClient'), + kProxy: Symbol('proxy agent options'), + kCounter: Symbol('socket request counter'), + kInterceptors: Symbol('dispatch interceptors'), + kMaxResponseSize: Symbol('max response size'), + kHTTP2Session: Symbol('http2Session'), + kHTTP2SessionState: Symbol('http2Session state'), + kHTTP2BuildRequest: Symbol('http2 build request'), + kHTTP1BuildRequest: Symbol('http1 build request'), + kHTTP2CopyHeaders: Symbol('http2 copy headers'), + kHTTPConnVersion: Symbol('http connection version'), + kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), + kConstruct: Symbol('constructable') } /***/ }), -/***/ 7863: +/***/ 83983: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const Range = __nccwpck_require__(9828) -const Comparator = __nccwpck_require__(91532) -const { ANY } = Comparator -const satisfies = __nccwpck_require__(6055) -const compare = __nccwpck_require__(44309) +"use strict"; -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } +const assert = __nccwpck_require__(39491) +const { kDestroyed, kBodyUsed } = __nccwpck_require__(72785) +const { IncomingMessage } = __nccwpck_require__(13685) +const stream = __nccwpck_require__(12781) +const net = __nccwpck_require__(41808) +const { InvalidArgumentError } = __nccwpck_require__(48045) +const { Blob } = __nccwpck_require__(14300) +const nodeUtil = __nccwpck_require__(73837) +const { stringify } = __nccwpck_require__(63477) +const { headerNameLowerCasedRecord } = __nccwpck_require__(14462) - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false +const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER - } - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true +function nop () {} + +function isStream (obj) { + return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' } -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] +// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) +function isBlobLike (object) { + return (Blob && object instanceof Blob) || ( + object && + typeof object === 'object' && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + /^(Blob|File)$/.test(object[Symbol.toStringTag]) + ) +} -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true +function buildURL (url, queryParams) { + if (url.includes('?') || url.includes('#')) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".') } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease - } else { - sub = minimumVersion - } + const stringified = stringify(queryParams) + + if (stringified) { + url += '?' + stringified } - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion + return url +} + +function parseURL (url) { + if (typeof url === 'string') { + url = new URL(url) + + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } + + return url } - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } + if (!url || typeof url !== 'object') { + throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') } - if (eqSet.size > 1) { - return null + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null + if (!(url instanceof URL)) { + if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { + throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') } - } - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null + if (url.path != null && typeof url.path !== 'string') { + throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') } - if (lt && !satisfies(eq, String(lt), options)) { - return null + if (url.pathname != null && typeof url.pathname !== 'string') { + throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') } - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } + if (url.hostname != null && typeof url.hostname !== 'string') { + throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') } - return true - } + if (url.origin != null && typeof url.origin !== 'string') { + throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') + } - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } + const port = url.port != null + ? url.port + : (url.protocol === 'https:' ? 443 : 80) + let origin = url.origin != null + ? url.origin + : `${url.protocol}//${url.hostname}:${port}` + let path = url.path != null + ? url.path + : `${url.pathname || ''}${url.search || ''}` - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } + if (origin.endsWith('/')) { + origin = origin.substring(0, origin.length - 1) } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false + + if (path && !path.startsWith('/')) { + path = `/${path}` } + // new URL(path, origin) is unsafe when `path` contains an absolute URL + // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: + // If first parameter is a relative URL, second param is required, and will be used as the base URL. + // If first parameter is an absolute URL, a given second param will be ignored. + url = new URL(origin + path) } - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } + return url +} - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } +function parseOrigin (url) { + url = parseURL(url) - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false + if (url.pathname !== '/' || url.search || url.hash) { + throw new InvalidArgumentError('invalid url') } - return true + return url } -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} +function getHostname (host) { + if (host[0] === '[') { + const idx = host.indexOf(']') -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b + assert(idx !== -1) + return host.substring(1, idx) } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset - - -/***/ }), - -/***/ 52706: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(9828) - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) -module.exports = toComparators - - -/***/ }), + const idx = host.indexOf(':') + if (idx === -1) return host -/***/ 2098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return host.substring(0, idx) +} -const Range = __nccwpck_require__(9828) -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { +// IP addresses are not valid server names per RFC6066 +// > Currently, the only server names supported are DNS hostnames +function getServerName (host) { + if (!host) { return null } -} -module.exports = validRange - - -/***/ }), - -/***/ 79626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var stubs = __nccwpck_require__(1099) - -/* - * StreamEvents can be used 2 ways: - * - * 1: - * function MyStream() { - * require('stream-events').call(this) - * } - * - * 2: - * require('stream-events')(myStream) - */ -function StreamEvents(stream) { - stream = stream || this - var cfg = { - callthrough: true, - calls: 1 + assert.strictEqual(typeof host, 'string') + + const servername = getHostname(host) + if (net.isIP(servername)) { + return '' } - stubs(stream, '_read', cfg, stream.emit.bind(stream, 'reading')) - stubs(stream, '_write', cfg, stream.emit.bind(stream, 'writing')) + return servername +} - return stream +function deepClone (obj) { + return JSON.parse(JSON.stringify(obj)) } -module.exports = StreamEvents +function isAsyncIterable (obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') +} +function isIterable (obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) +} -/***/ }), +function bodyLength (body) { + if (body == null) { + return 0 + } else if (isStream(body)) { + const state = body._readableState + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) + ? state.length + : null + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null + } else if (isBuffer(body)) { + return body.byteLength + } -/***/ 66121: -/***/ ((module) => { + return null +} -module.exports = shift +function isDestroyed (stream) { + return !stream || !!(stream.destroyed || stream[kDestroyed]) +} -function shift (stream) { - var rs = stream._readableState - if (!rs) return null - return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs)) +function isReadableAborted (stream) { + const state = stream && stream._readableState + return isDestroyed(stream) && state && !state.endEmitted } -function getStateLength (state) { - if (state.buffer.length) { - var idx = state.bufferIndex || 0 - // Since node 6.3.0 state.buffer is a BufferList not an array - if (state.buffer.head) { - return state.buffer.head.data.length - } else if (state.buffer.length - idx > 0 && state.buffer[idx]) { - return state.buffer[idx].length +function destroy (stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) { + return + } + + if (typeof stream.destroy === 'function') { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { + // See: https://github.com/nodejs/node/pull/38505/files + stream.socket = null } + + stream.destroy(err) + } else if (err) { + process.nextTick((stream, err) => { + stream.emit('error', err) + }, stream, err) } - return state.length + if (stream.destroyed !== true) { + stream[kDestroyed] = true + } } +const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ +function parseKeepAliveTimeout (val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) + return m ? parseInt(m[1], 10) * 1000 : null +} -/***/ }), +/** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ +function headerNameToString (value) { + return headerNameLowerCasedRecord[value] || value.toLowerCase() +} -/***/ 94841: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function parseHeaders (headers, obj = {}) { + // For H2 support + if (!Array.isArray(headers)) return headers -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + for (let i = 0; i < headers.length; i += 2) { + const key = headers[i].toString().toLowerCase() + let val = obj[key] + + if (!val) { + if (Array.isArray(headers[i + 1])) { + obj[key] = headers[i + 1].map(x => x.toString('utf8')) + } else { + obj[key] = headers[i + 1].toString('utf8') + } + } else { + if (!Array.isArray(val)) { + val = [val] + obj[key] = val + } + val.push(headers[i + 1].toString('utf8')) + } + } + // See https://github.com/nodejs/node/pull/46528 + if ('content-length' in obj && 'content-disposition' in obj) { + obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') + } + return obj +} -/**/ +function parseRawHeaders (headers) { + const ret = [] + let hasContentLength = false + let contentDispositionIdx = -1 -var Buffer = (__nccwpck_require__(21867).Buffer); -/**/ + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0].toString() + const val = headers[n + 1].toString('utf8') -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; + if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) { + ret.push(key, val) + hasContentLength = true + } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { + contentDispositionIdx = ret.push(key, val) - 1 + } else { + ret.push(key, val) + } } -}; -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } + // See https://github.com/nodejs/node/pull/46528 + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') } -}; -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; + return ret } -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.s = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); +function isBuffer (buffer) { + // See, https://github.com/mcollina/undici/pull/319 + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) } -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; +function validateHandler (handler, method, upgrade) { + if (!handler || typeof handler !== 'object') { + throw new InvalidArgumentError('handler must be an object') } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); + if (typeof handler.onConnect !== 'function') { + throw new InvalidArgumentError('invalid onConnect method') } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; + if (typeof handler.onError !== 'function') { + throw new InvalidArgumentError('invalid onError method') } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; + + if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { + throw new InvalidArgumentError('invalid onBodySent method') } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + + if (upgrade || method === 'CONNECT') { + if (typeof handler.onUpgrade !== 'function') { + throw new InvalidArgumentError('invalid onUpgrade method') + } + } else { + if (typeof handler.onHeaders !== 'function') { + throw new InvalidArgumentError('invalid onHeaders method') } - return nb; - } - return 0; -} -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; + if (typeof handler.onData !== 'function') { + throw new InvalidArgumentError('invalid onData method') } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } + + if (typeof handler.onComplete !== 'function') { + throw new InvalidArgumentError('invalid onComplete method') } } } -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; +// A body is disturbed if it has been read from and it cannot +// be re-used without losing state or data. +function isDisturbed (body) { + return !!(body && ( + stream.isDisturbed + ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? + : body[kBodyUsed] || + body.readableDidRead || + (body._readableState && body._readableState.dataEmitted) || + isReadableAborted(body) + )) } -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); +function isErrored (body) { + return !!(body && ( + stream.isErrored + ? stream.isErrored(body) + : /state: 'errored'/.test(nodeUtil.inspect(body) + ))) } -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; +function isReadable (body) { + return !!(body && ( + stream.isReadable + ? stream.isReadable(body) + : /state: 'readable'/.test(nodeUtil.inspect(body) + ))) } -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; +function getSocketInfo (socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); } -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); +async function * convertIterableToBuffer (iterable) { + for await (const chunk of iterable) { + yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) } - return r; } -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; +let ReadableStream +function ReadableStreamFrom (iterable) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} - -/***/ }), - -/***/ 14526: -/***/ ((module) => { - -const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; -const numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; -// const octRegex = /0x[a-z0-9]+/; -// const binRegex = /0x[a-z0-9]+/; + if (ReadableStream.from) { + return ReadableStream.from(convertIterableToBuffer(iterable)) + } -//polyfill -if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; -} -if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; + let iterator + return new ReadableStream( + { + async start () { + iterator = iterable[Symbol.asyncIterator]() + }, + async pull (controller) { + const { done, value } = await iterator.next() + if (done) { + queueMicrotask(() => { + controller.close() + }) + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) + controller.enqueue(new Uint8Array(buf)) + } + return controller.desiredSize > 0 + }, + async cancel (reason) { + await iterator.return() + } + }, + 0 + ) } - -const consider = { - hex : true, - leadingZeros: true, - decimalPoint: "\.", - eNotation: true - //skipLike: /regex/ -}; - -function toNumber(str, options = {}){ - // const options = Object.assign({}, consider); - // if(opt.leadingZeros === false){ - // options.leadingZeros = false; - // }else if(opt.hex === false){ - // options.hex = false; - // } - - options = Object.assign({}, consider, options ); - if(!str || typeof str !== "string" ) return str; - - let trimmedStr = str.trim(); - // if(trimmedStr === "0.0") return 0; - // else if(trimmedStr === "+0.0") return 0; - // else if(trimmedStr === "-0.0") return -0; - - if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - // } else if (options.parseOct && octRegex.test(str)) { - // return Number.parseInt(val, 8); - // }else if (options.parseBin && binRegex.test(str)) { - // return Number.parseInt(val, 2); - }else{ - //separate negative sign, leading zeros, and rest number - const match = numRegex.exec(trimmedStr); - if(match){ - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros - //trim ending zeros for floating number - - const eNotation = match[4] || match[6]; - if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str; //-0123 - else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str; //0123 - else{//no leading zeros or leading zeros are allowed - const num = Number(trimmedStr); - const numStr = "" + num; - if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation - if(options.eNotation) return num; - else return str; - }else if(eNotation){ //given number has enotation - if(options.eNotation) return num; - else return str; - }else if(trimmedStr.indexOf(".") !== -1){ //floating number - // const decimalPart = match[5].substr(1); - // const intPart = trimmedStr.substr(0,trimmedStr.indexOf(".")); - - - // const p = numStr.indexOf("."); - // const givenIntPart = numStr.substr(0,p); - // const givenDecPart = numStr.substr(p+1); - if(numStr === "0" && (numTrimmedByZeros === "") ) return num; //0.0 - else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000 - else if( sign && numStr === "-"+numTrimmedByZeros) return num; - else return str; - } - - if(leadingZeros){ - // if(numTrimmedByZeros === numStr){ - // if(options.leadingZeros) return num; - // else return str; - // }else return str; - if(numTrimmedByZeros === numStr) return num; - else if(sign+numTrimmedByZeros === numStr) return num; - else return str; - } - - if(trimmedStr === numStr) return num; - else if(trimmedStr === sign+numStr) return num; - // else{ - // //number with +/- sign - // trimmedStr.test(/[-+][0-9]); - - // } - return str; - } - // else if(!eNotation && trimmedStr && trimmedStr !== Number(trimmedStr) ) return str; - - }else{ //non-numeric string - return str; - } - } +// The chunk should be a FormData instance and contains +// all the required methods. +function isFormDataLike (object) { + return ( + object && + typeof object === 'object' && + typeof object.append === 'function' && + typeof object.delete === 'function' && + typeof object.get === 'function' && + typeof object.getAll === 'function' && + typeof object.has === 'function' && + typeof object.set === 'function' && + object[Symbol.toStringTag] === 'FormData' + ) } -/** - * - * @param {string} numStr without leading zeros - * @returns - */ -function trimZeros(numStr){ - if(numStr && numStr.indexOf(".") !== -1){//float - numStr = numStr.replace(/0+$/, ""); //remove ending zeros - if(numStr === ".") numStr = "0"; - else if(numStr[0] === ".") numStr = "0"+numStr; - else if(numStr[numStr.length-1] === ".") numStr = numStr.substr(0,numStr.length-1); - return numStr; +function throwIfAborted (signal) { + if (!signal) { return } + if (typeof signal.throwIfAborted === 'function') { + signal.throwIfAborted() + } else { + if (signal.aborted) { + // DOMException not available < v17.0.0 + const err = new Error('The operation was aborted') + err.name = 'AbortError' + throw err } - return numStr; + } } -module.exports = toNumber - - -/***/ }), - -/***/ 1099: -/***/ ((module) => { - -"use strict"; - - -module.exports = function stubs(obj, method, cfg, stub) { - if (!obj || !method || !obj[method]) - throw new Error('You must provide an object and a key for an existing method') - if (!stub) { - stub = cfg - cfg = {} +function addAbortListener (signal, listener) { + if ('addEventListener' in signal) { + signal.addEventListener('abort', listener, { once: true }) + return () => signal.removeEventListener('abort', listener) } + signal.addListener('abort', listener) + return () => signal.removeListener('abort', listener) +} - stub = stub || function() {} - - cfg.callthrough = cfg.callthrough || false - cfg.calls = cfg.calls || 0 - - var norevert = cfg.calls === 0 +const hasToWellFormed = !!String.prototype.toWellFormed - var cached = obj[method].bind(obj) +/** + * @param {string} val + */ +function toUSVString (val) { + if (hasToWellFormed) { + return `${val}`.toWellFormed() + } else if (nodeUtil.toUSVString) { + return nodeUtil.toUSVString(val) + } - obj[method] = function() { - var args = [].slice.call(arguments) - var returnVal + return `${val}` +} - if (cfg.callthrough) - returnVal = cached.apply(obj, args) +// Parsed accordingly to RFC 9110 +// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +function parseRangeHeader (range) { + if (range == null || range === '') return { start: 0, end: null, size: null } - returnVal = stub.apply(obj, args) || returnVal + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null + return m + ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } + : null +} - if (!norevert && --cfg.calls === 0) - obj[method] = cached +const kEnumerableProperty = Object.create(null) +kEnumerableProperty.enumerable = true - return returnVal - } +module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isReadableAborted, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + throwIfAborted, + addAbortListener, + parseRangeHeader, + nodeMajor, + nodeMinor, + nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), + safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] } /***/ }), -/***/ 59318: +/***/ 74839: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const os = __nccwpck_require__(22037); -const tty = __nccwpck_require__(76224); -const hasFlag = __nccwpck_require__(31621); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } +const Dispatcher = __nccwpck_require__(60412) +const { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError +} = __nccwpck_require__(48045) +const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(72785) - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } +const kDestroyed = Symbol('destroyed') +const kClosed = Symbol('closed') +const kOnDestroyed = Symbol('onDestroyed') +const kOnClosed = Symbol('onClosed') +const kInterceptedDispatch = Symbol('Intercepted Dispatch') - if (hasFlag('color=256')) { - return 2; - } +class DispatcherBase extends Dispatcher { + constructor () { + super() - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } + this[kDestroyed] = false + this[kOnDestroyed] = null + this[kClosed] = false + this[kOnClosed] = [] + } - const min = forceColor || 0; + get destroyed () { + return this[kDestroyed] + } - if (env.TERM === 'dumb') { - return min; - } + get closed () { + return this[kClosed] + } - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } + get interceptors () { + return this[kInterceptors] + } - return 1; - } + set interceptors (newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) { + const interceptor = this[kInterceptors][i] + if (typeof interceptor !== 'function') { + throw new InvalidArgumentError('interceptor must be an function') + } + } + } - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } + this[kInterceptors] = newInterceptors + } - return min; - } + close (callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } - if (env.COLORTERM === 'truecolor') { - return 3; - } + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)) + return + } - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback) + } else { + queueMicrotask(() => callback(null, null)) + } + return + } - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } + this[kClosed] = true + this[kOnClosed].push(callback) - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } + const onClosed = () => { + const callbacks = this[kOnClosed] + this[kOnClosed] = null + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null) + } + } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } + // Should not error. + this[kClose]() + .then(() => this.destroy()) + .then(() => { + queueMicrotask(onClosed) + }) + } - if ('COLORTERM' in env) { - return 1; - } + destroy (err, callback) { + if (typeof err === 'function') { + callback = err + err = null + } - return min; -} + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) + }) + }) + } -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; + if (this[kDestroyed]) { + if (this[kOnDestroyed]) { + this[kOnDestroyed].push(callback) + } else { + queueMicrotask(() => callback(null, null)) + } + return + } + if (!err) { + err = new ClientDestroyedError() + } -/***/ }), + this[kDestroyed] = true + this[kOnDestroyed] = this[kOnDestroyed] || [] + this[kOnDestroyed].push(callback) -/***/ 14920: -/***/ ((__unused_webpack_module, exports) => { + const onDestroyed = () => { + const callbacks = this[kOnDestroyed] + this[kOnDestroyed] = null + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null) + } + } -"use strict"; + // Should not error. + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed) + }) + } -/** - * @license - * Copyright 2020 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TeenyStatistics = exports.TeenyStatisticsWarning = void 0; -/** - * @class TeenyStatisticsWarning - * @extends Error - * @description While an error, is used for emitting warnings when - * meeting certain configured thresholds. - * @see process.emitWarning - */ -class TeenyStatisticsWarning extends Error { - /** - * @param {string} message - */ - constructor(message) { - super(message); - this.threshold = 0; - this.type = ''; - this.value = 0; - this.name = this.constructor.name; - Error.captureStackTrace(this, this.constructor); - } -} -exports.TeenyStatisticsWarning = TeenyStatisticsWarning; -TeenyStatisticsWarning.CONCURRENT_REQUESTS = 'ConcurrentRequestsExceededWarning'; -/** - * @class TeenyStatistics - * @description Maintain various statistics internal to teeny-request. Tracking - * is not automatic and must be instrumented within teeny-request. - */ -class TeenyStatistics { - /** - * @param {TeenyStatisticsOptions} [opts] - */ - constructor(opts) { - /** - * @type {number} - * @private - * @default 0 - */ - this._concurrentRequests = 0; - /** - * @type {boolean} - * @private - * @default false - */ - this._didConcurrentRequestWarn = false; - this._options = TeenyStatistics._prepareOptions(opts); - } - /** - * Returns a copy of the current options. - * @return {TeenyStatisticsOptions} - */ - getOptions() { - return Object.assign({}, this._options); - } - /** - * Change configured statistics options. This will not preserve unspecified - * options that were previously specified, i.e. this is a reset of options. - * @param {TeenyStatisticsOptions} [opts] - * @returns {TeenyStatisticsConfig} The previous options. - * @see _prepareOptions - */ - setOptions(opts) { - const oldOpts = this._options; - this._options = TeenyStatistics._prepareOptions(opts); - return oldOpts; - } - /** - * @readonly - * @return {TeenyStatisticsCounters} - */ - get counters() { - return { - concurrentRequests: this._concurrentRequests, - }; - } - /** - * @description Should call this right before making a request. - */ - requestStarting() { - this._concurrentRequests++; - if (this._options.concurrentRequests > 0 && - this._concurrentRequests >= this._options.concurrentRequests && - !this._didConcurrentRequestWarn) { - this._didConcurrentRequestWarn = true; - const warning = new TeenyStatisticsWarning('Possible excessive concurrent requests detected. ' + - this._concurrentRequests + - ' requests in-flight, which exceeds the configured threshold of ' + - this._options.concurrentRequests + - '. Use the TEENY_REQUEST_WARN_CONCURRENT_REQUESTS environment ' + - 'variable or the concurrentRequests option of teeny-request to ' + - 'increase or disable (0) this warning.'); - warning.type = TeenyStatisticsWarning.CONCURRENT_REQUESTS; - warning.value = this._concurrentRequests; - warning.threshold = this._options.concurrentRequests; - process.emitWarning(warning); - } + [kInterceptedDispatch] (opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch] + return this[kDispatch](opts, handler) } - /** - * @description When using `requestStarting`, call this after the request - * has finished. - */ - requestFinished() { - // TODO negative? - this._concurrentRequests--; + + let dispatch = this[kDispatch].bind(this) + for (let i = this[kInterceptors].length - 1; i >= 0; i--) { + dispatch = this[kInterceptors][i](dispatch) } - /** - * Configuration Precedence: - * 1. Dependency inversion via defined option. - * 2. Global numeric environment variable. - * 3. Built-in default. - * This will not preserve unspecified options previously specified. - * @param {TeenyStatisticsOptions} [opts] - * @returns {TeenyStatisticsOptions} - * @private - */ - static _prepareOptions({ concurrentRequests: diConcurrentRequests, } = {}) { - let concurrentRequests = this.DEFAULT_WARN_CONCURRENT_REQUESTS; - const envConcurrentRequests = Number(process.env.TEENY_REQUEST_WARN_CONCURRENT_REQUESTS); - if (diConcurrentRequests !== undefined) { - concurrentRequests = diConcurrentRequests; - } - else if (!Number.isNaN(envConcurrentRequests)) { - concurrentRequests = envConcurrentRequests; - } - return { concurrentRequests }; + this[kInterceptedDispatch] = dispatch + return dispatch(opts, handler) + } + + dispatch (opts, handler) { + if (!handler || typeof handler !== 'object') { + throw new InvalidArgumentError('handler must be an object') + } + + try { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('opts must be an object.') + } + + if (this[kDestroyed] || this[kOnDestroyed]) { + throw new ClientDestroyedError() + } + + if (this[kClosed]) { + throw new ClientClosedError() + } + + return this[kInterceptedDispatch](opts, handler) + } catch (err) { + if (typeof handler.onError !== 'function') { + throw new InvalidArgumentError('invalid onError method') + } + + handler.onError(err) + + return false } + } } -exports.TeenyStatistics = TeenyStatistics; -/** - * @description A default threshold representing when to warn about excessive - * in-flight/concurrent requests. - * @type {number} - * @static - * @readonly - * @default 5000 - */ -TeenyStatistics.DEFAULT_WARN_CONCURRENT_REQUESTS = 5000; -//# sourceMappingURL=TeenyStatistics.js.map + +module.exports = DispatcherBase + /***/ }), -/***/ 60446: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 60412: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * @license - * Copyright 2019 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAgent = exports.pool = void 0; -const http_1 = __nccwpck_require__(13685); -const https_1 = __nccwpck_require__(95687); -// eslint-disable-next-line node/no-deprecated-api -const url_1 = __nccwpck_require__(57310); -exports.pool = new Map(); -/** - * Determines if a proxy should be considered based on the environment. - * - * @param uri The request uri - * @returns {boolean} - */ -function shouldUseProxyForURI(uri) { - const noProxyEnv = process.env.NO_PROXY || process.env.no_proxy; - if (!noProxyEnv) { - return true; - } - const givenURI = new URL(uri); - for (const noProxyRaw of noProxyEnv.split(',')) { - const noProxy = noProxyRaw.trim(); - if (noProxy === givenURI.origin || noProxy === givenURI.hostname) { - return false; - } - else if (noProxy.startsWith('*.') || noProxy.startsWith('.')) { - const noProxyWildcard = noProxy.replace(/^\*\./, '.'); - if (givenURI.hostname.endsWith(noProxyWildcard)) { - return false; - } - } - } - return true; -} -/** - * Returns a custom request Agent if one is found, otherwise returns undefined - * which will result in the global http(s) Agent being used. - * @private - * @param {string} uri The request uri - * @param {Options} reqOpts The request options - * @returns {HttpAnyAgent|undefined} - */ -function getAgent(uri, reqOpts) { - const isHttp = uri.startsWith('http://'); - const proxy = reqOpts.proxy || - process.env.HTTP_PROXY || - process.env.http_proxy || - process.env.HTTPS_PROXY || - process.env.https_proxy; - const poolOptions = Object.assign({}, reqOpts.pool); - const manuallyProvidedProxy = !!reqOpts.proxy; - const shouldUseProxy = manuallyProvidedProxy || shouldUseProxyForURI(uri); - if (proxy && shouldUseProxy) { - // tslint:disable-next-line variable-name - const Agent = isHttp - ? __nccwpck_require__(23764) - : __nccwpck_require__(66202); - const proxyOpts = { ...(0, url_1.parse)(proxy), ...poolOptions }; - return new Agent(proxyOpts); - } - let key = isHttp ? 'http' : 'https'; - if (reqOpts.forever) { - key += ':forever'; - if (!exports.pool.has(key)) { - // tslint:disable-next-line variable-name - const Agent = isHttp ? http_1.Agent : https_1.Agent; - exports.pool.set(key, new Agent({ ...poolOptions, keepAlive: true })); - } - } - return exports.pool.get(key); + +const EventEmitter = __nccwpck_require__(82361) + +class Dispatcher extends EventEmitter { + dispatch () { + throw new Error('not implemented') + } + + close () { + throw new Error('not implemented') + } + + destroy () { + throw new Error('not implemented') + } } -exports.getAgent = getAgent; -//# sourceMappingURL=agents.js.map + +module.exports = Dispatcher + /***/ }), -/***/ 6886: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 41472: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * @license - * Copyright 2018 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.teenyRequest = exports.RequestError = void 0; -const node_fetch_1 = __nccwpck_require__(80467); -const stream_1 = __nccwpck_require__(12781); -const uuid = __nccwpck_require__(17835); -const agents_1 = __nccwpck_require__(60446); -const TeenyStatistics_1 = __nccwpck_require__(14920); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const streamEvents = __nccwpck_require__(79626); -class RequestError extends Error { + +const Busboy = __nccwpck_require__(50727) +const util = __nccwpck_require__(83983) +const { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody +} = __nccwpck_require__(52538) +const { FormData } = __nccwpck_require__(72015) +const { kState } = __nccwpck_require__(15861) +const { webidl } = __nccwpck_require__(21744) +const { DOMException, structuredClone } = __nccwpck_require__(41037) +const { Blob, File: NativeFile } = __nccwpck_require__(14300) +const { kBodyUsed } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { isErrored } = __nccwpck_require__(83983) +const { isUint8Array, isArrayBuffer } = __nccwpck_require__(29830) +const { File: UndiciFile } = __nccwpck_require__(78511) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) + +let random +try { + const crypto = __nccwpck_require__(6005) + random = (max) => crypto.randomInt(0, max) +} catch { + random = (max) => Math.floor(Math.random(max)) } -exports.RequestError = RequestError; -/** - * Convert options from Request to Fetch format - * @private - * @param reqOpts Request options - */ -function requestToFetchOptions(reqOpts) { - const options = { - method: reqOpts.method || 'GET', - ...(reqOpts.timeout && { timeout: reqOpts.timeout }), - ...(typeof reqOpts.gzip === 'boolean' && { compress: reqOpts.gzip }), - }; - if (typeof reqOpts.json === 'object') { - // Add Content-type: application/json header - reqOpts.headers = reqOpts.headers || {}; - reqOpts.headers['Content-Type'] = 'application/json'; - // Set body to JSON representation of value - options.body = JSON.stringify(reqOpts.json); - } - else { - if (Buffer.isBuffer(reqOpts.body)) { - options.body = reqOpts.body; - } - else if (typeof reqOpts.body !== 'string') { - options.body = JSON.stringify(reqOpts.body); - } - else { - options.body = reqOpts.body; + +let ReadableStream = globalThis.ReadableStream + +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile +const textEncoder = new TextEncoder() +const textDecoder = new TextDecoder() + +// https://fetch.spec.whatwg.org/#concept-bodyinit-extract +function extractBody (object, keepalive = false) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + + // 1. Let stream be null. + let stream = null + + // 2. If object is a ReadableStream object, then set stream to object. + if (object instanceof ReadableStream) { + stream = object + } else if (isBlobLike(object)) { + // 3. Otherwise, if object is a Blob object, set stream to the + // result of running object’s get stream. + stream = object.stream() + } else { + // 4. Otherwise, set stream to a new ReadableStream object, and set + // up stream. + stream = new ReadableStream({ + async pull (controller) { + controller.enqueue( + typeof source === 'string' ? textEncoder.encode(source) : source + ) + queueMicrotask(() => readableStreamClose(controller)) + }, + start () {}, + type: undefined + }) + } + + // 5. Assert: stream is a ReadableStream object. + assert(isReadableStreamLike(stream)) + + // 6. Let action be null. + let action = null + + // 7. Let source be null. + let source = null + + // 8. Let length be null. + let length = null + + // 9. Let type be null. + let type = null + + // 10. Switch on object: + if (typeof object === 'string') { + // Set source to the UTF-8 encoding of object. + // Note: setting source to a Uint8Array here breaks some mocking assumptions. + source = object + + // Set type to `text/plain;charset=UTF-8`. + type = 'text/plain;charset=UTF-8' + } else if (object instanceof URLSearchParams) { + // URLSearchParams + + // spec says to run application/x-www-form-urlencoded on body.list + // this is implemented in Node.js as apart of an URLSearchParams instance toString method + // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 + // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 + + // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. + source = object.toString() + + // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. + type = 'application/x-www-form-urlencoded;charset=UTF-8' + } else if (isArrayBuffer(object)) { + // BufferSource/ArrayBuffer + + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.slice()) + } else if (ArrayBuffer.isView(object)) { + // BufferSource/ArrayBufferView + + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) + } else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` + const prefix = `--${boundary}\r\nContent-Disposition: form-data` + + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => + str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') + + // Set action to this step: run the multipart/form-data + // encoding algorithm, with object’s entry list and UTF-8. + // - This ensures that the body is immutable and can't be changed afterwords + // - That the content-length is calculated in advance. + // - And that all parts are pre-encoded and ready to be sent. + + const blobParts = [] + const rn = new Uint8Array([13, 10]) // '\r\n' + length = 0 + let hasUnknownSizeValue = false + + for (const [name, value] of object) { + if (typeof value === 'string') { + const chunk = textEncoder.encode(prefix + + `; name="${escape(normalizeLinefeeds(name))}"` + + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) + blobParts.push(chunk) + length += chunk.byteLength + } else { + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + + (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + + `Content-Type: ${ + value.type || 'application/octet-stream' + }\r\n\r\n`) + blobParts.push(chunk, value, rn) + if (typeof value.size === 'number') { + length += chunk.byteLength + value.size + rn.byteLength + } else { + hasUnknownSizeValue = true } + } } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - options.headers = reqOpts.headers; - let uri = (reqOpts.uri || - reqOpts.url); - if (!uri) { - throw new Error('Missing uri or url in reqOpts.'); - } - if (reqOpts.useQuerystring === true || typeof reqOpts.qs === 'object') { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const qs = __nccwpck_require__(63477); - const params = qs.stringify(reqOpts.qs); - uri = uri + '?' + params; - } - options.agent = (0, agents_1.getAgent)(uri, reqOpts); - return { uri, options }; -} -/** - * Convert a response from `fetch` to `request` format. - * @private - * @param opts The `request` options used to create the request. - * @param res The Fetch response - * @returns A `request` response object - */ -function fetchToRequestResponse(opts, res) { - const request = {}; - request.agent = opts.agent || false; - request.headers = (opts.headers || {}); - request.href = res.url; - // headers need to be converted from a map to an obj - const resHeaders = {}; - res.headers.forEach((value, key) => (resHeaders[key] = value)); - const response = Object.assign(res.body, { - statusCode: res.status, - statusMessage: res.statusText, - request, - body: res.body, - headers: resHeaders, - toJSON: () => ({ headers: resHeaders }), - }); - return response; -} -/** - * Create POST body from two parts as multipart/related content-type - * @private - * @param boundary - * @param multipart - */ -function createMultipartStream(boundary, multipart) { - const finale = `--${boundary}--`; - const stream = new stream_1.PassThrough(); - for (const part of multipart) { - const preamble = `--${boundary}\r\nContent-Type: ${part['Content-Type']}\r\n\r\n`; - stream.write(preamble); - if (typeof part.body === 'string') { - stream.write(part.body); - stream.write('\r\n'); - } - else { - part.body.pipe(stream, { end: false }); - part.body.on('end', () => { - stream.write('\r\n'); - stream.write(finale); - stream.end(); - }); - } + + const chunk = textEncoder.encode(`--${boundary}--`) + blobParts.push(chunk) + length += chunk.byteLength + if (hasUnknownSizeValue) { + length = null } - return stream; -} -function teenyRequest(reqOpts, callback) { - const { uri, options } = requestToFetchOptions(reqOpts); - const multipart = reqOpts.multipart; - if (reqOpts.multipart && multipart.length === 2) { - if (!callback) { - // TODO: add support for multipart uploads through streaming - throw new Error('Multipart without callback is not implemented.'); + + // Set source to object. + source = object + + action = async function * () { + for (const part of blobParts) { + if (part.stream) { + yield * part.stream() + } else { + yield part } - const boundary = uuid.v4(); - options.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; - options.body = createMultipartStream(boundary, multipart); - // Multipart upload - teenyRequest.stats.requestStarting(); - (0, node_fetch_1.default)(uri, options).then(res => { - teenyRequest.stats.requestFinished(); - const header = res.headers.get('content-type'); - const response = fetchToRequestResponse(options, res); - const body = response.body; - if (header === 'application/json' || - header === 'application/json; charset=utf-8') { - res.json().then(json => { - response.body = json; - callback(null, response, json); - }, (err) => { - callback(err, response, body); - }); - return; - } - res.text().then(text => { - response.body = text; - callback(null, response, text); - }, err => { - callback(err, response, body); - }); - }, err => { - teenyRequest.stats.requestFinished(); - callback(err, null, null); - }); - return; + } } - if (callback === undefined) { - // Stream mode - const requestStream = streamEvents(new stream_1.PassThrough()); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let responseStream; - requestStream.once('reading', () => { - if (responseStream) { - (0, stream_1.pipeline)(responseStream, requestStream, () => { }); - } - else { - requestStream.once('response', () => { - (0, stream_1.pipeline)(responseStream, requestStream, () => { }); - }); - } - }); - options.compress = false; - teenyRequest.stats.requestStarting(); - (0, node_fetch_1.default)(uri, options).then(res => { - teenyRequest.stats.requestFinished(); - responseStream = res.body; - responseStream.on('error', (err) => { - requestStream.emit('error', err); - }); - const response = fetchToRequestResponse(options, res); - requestStream.emit('response', response); - }, err => { - teenyRequest.stats.requestFinished(); - requestStream.emit('error', err); - }); - // fetch doesn't supply the raw HTTP stream, instead it - // returns a PassThrough piped from the HTTP response - // stream. - return requestStream; + + // Set type to `multipart/form-data; boundary=`, + // followed by the multipart/form-data boundary string generated + // by the multipart/form-data encoding algorithm. + type = 'multipart/form-data; boundary=' + boundary + } else if (isBlobLike(object)) { + // Blob + + // Set source to object. + source = object + + // Set length to object’s size. + length = object.size + + // If object’s type attribute is not the empty byte sequence, set + // type to its value. + if (object.type) { + type = object.type } - // GET or POST with callback - teenyRequest.stats.requestStarting(); - (0, node_fetch_1.default)(uri, options).then(res => { - teenyRequest.stats.requestFinished(); - const header = res.headers.get('content-type'); - const response = fetchToRequestResponse(options, res); - const body = response.body; - if (header === 'application/json' || - header === 'application/json; charset=utf-8') { - if (response.statusCode === 204) { - // Probably a DELETE - callback(null, response, body); - return; - } - res.json().then(json => { - response.body = json; - callback(null, response, json); - }, err => { - callback(err, response, body); - }); - return; + } else if (typeof object[Symbol.asyncIterator] === 'function') { + // If keepalive is true, then throw a TypeError. + if (keepalive) { + throw new TypeError('keepalive') + } + + // If object is disturbed or locked, then throw a TypeError. + if (util.isDisturbed(object) || object.locked) { + throw new TypeError( + 'Response body object should not be disturbed or locked' + ) + } + + stream = + object instanceof ReadableStream ? object : ReadableStreamFrom(object) + } + + // 11. If source is a byte sequence, then set action to a + // step that returns source and length to source’s length. + if (typeof source === 'string' || util.isBuffer(source)) { + length = Buffer.byteLength(source) + } + + // 12. If action is non-null, then run these steps in in parallel: + if (action != null) { + // Run action. + let iterator + stream = new ReadableStream({ + async start () { + iterator = action(object)[Symbol.asyncIterator]() + }, + async pull (controller) { + const { value, done } = await iterator.next() + if (done) { + // When running action is done, close stream. + queueMicrotask(() => { + controller.close() + }) + } else { + // Whenever one or more bytes are available and stream is not errored, + // enqueue a Uint8Array wrapping an ArrayBuffer containing the available + // bytes into stream. + if (!isErrored(stream)) { + controller.enqueue(new Uint8Array(value)) + } } - res.text().then(text => { - const response = fetchToRequestResponse(options, res); - response.body = text; - callback(null, response, text); - }, err => { - callback(err, response, body); - }); - }, err => { - teenyRequest.stats.requestFinished(); - callback(err, null, null); - }); - return; + return controller.desiredSize > 0 + }, + async cancel (reason) { + await iterator.return() + }, + type: undefined + }) + } + + // 13. Let body be a body whose stream is stream, source is source, + // and length is length. + const body = { stream, source, length } + + // 14. Return (body, type). + return [body, type] } -exports.teenyRequest = teenyRequest; -teenyRequest.defaults = (defaults) => { - return (reqOpts, callback) => { - const opts = { ...defaults, ...reqOpts }; - if (callback === undefined) { - return teenyRequest(opts); - } - teenyRequest(opts, callback); - }; -}; -/** - * Single instance of an interface for keeping track of things. - */ -teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(); -teenyRequest.resetStats = () => { - teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(teenyRequest.stats.getOptions()); -}; -//# sourceMappingURL=index.js.map -/***/ }), +// https://fetch.spec.whatwg.org/#bodyinit-safely-extract +function safelyExtractBody (object, keepalive = false) { + if (!ReadableStream) { + // istanbul ignore next + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } -/***/ 76503: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + // To safely extract a body and a `Content-Type` value from + // a byte sequence or BodyInit object object, run these steps: -"use strict"; + // 1. If object is a ReadableStream object, then: + if (object instanceof ReadableStream) { + // Assert: object is neither disturbed nor locked. + // istanbul ignore next + assert(!util.isDisturbed(object), 'The body has already been consumed.') + // istanbul ignore next + assert(!object.locked, 'The stream is locked.') + } -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = __nccwpck_require__(82361); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const promisify_1 = __importDefault(__nccwpck_require__(55947)); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; + // 2. Return the results of extracting object. + return extractBody(object, keepalive) } -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); + +function cloneBody (body) { + // To clone a body body, run these steps: + + // https://fetch.spec.whatwg.org/#concept-body-clone + + // 1. Let « out1, out2 » be the result of teeing body’s stream. + const [out1, out2] = body.stream.tee() + const out2Clone = structuredClone(out2, { transfer: [out2] }) + // This, for whatever reasons, unrefs out2Clone which allows + // the process to exit by itself. + const [, finalClone] = out2Clone.tee() + + // 2. Set body’s stream to out1. + body.stream = out1 + + // 3. Return a body whose stream is out2 and other members are copied from body. + return { + stream: finalClone, + length: body.length, + source: body.source + } } -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); + +async function * consumeBody (body) { + if (body) { + if (isUint8Array(body)) { + yield body + } else { + const stream = body.stream + + if (util.isDisturbed(stream)) { + throw new TypeError('The body has already been consumed.') + } + + if (stream.locked) { + throw new TypeError('The stream is locked.') + } + + // Compat. + stream[kBodyUsed] = true + + yield * stream + } + } } -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } - else if (callback) { - opts = callback; - } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - set defaultPort(v) { - this.explicitDefaultPort = v; - } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - set protocol(v) { - this.explicitProtocol = v; + +function throwIfAborted (state) { + if (state.aborted) { + throw new DOMException('The operation was aborted.', 'AbortError') + } +} + +function bodyMixinMethods (instance) { + const methods = { + blob () { + // The blob() method steps are to return the result of + // running consume body with this and the following step + // given a byte sequence bytes: return a Blob whose + // contents are bytes and whose type attribute is this’s + // MIME type. + return specConsumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this) + + if (mimeType === 'failure') { + mimeType = '' + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType) } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + + // Return a Blob whose contents are bytes and type attribute + // is mimeType. + return new Blob([bytes], { type: mimeType }) + }, instance) + }, + + arrayBuffer () { + // The arrayBuffer() method steps are to return the result + // of running consume body with this and the following step + // given a byte sequence bytes: return a new ArrayBuffer + // whose contents are bytes. + return specConsumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer + }, instance) + }, + + text () { + // The text() method steps are to return the result of running + // consume body with this and UTF-8 decode. + return specConsumeBody(this, utf8DecodeBytes, instance) + }, + + json () { + // The json() method steps are to return the result of running + // consume body with this and parse JSON from bytes. + return specConsumeBody(this, parseJSONFromBytes, instance) + }, + + async formData () { + webidl.brandCheck(this, instance) + + throwIfAborted(this[kState]) + + const contentType = this.headers.get('Content-Type') + + // If mimeType’s essence is "multipart/form-data", then: + if (/multipart\/form-data/.test(contentType)) { + const headers = {} + for (const [key, value] of this.headers) headers[key.toLowerCase()] = value + + const responseFormData = new FormData() + + let busboy + + try { + busboy = new Busboy({ + headers, + preservePath: true + }) + } catch (err) { + throw new DOMException(`${err}`, 'AbortError') } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); + + busboy.on('field', (name, value) => { + responseFormData.append(name, value) + }) + busboy.on('file', (name, value, filename, encoding, mimeType) => { + const chunks = [] + + if (encoding === 'base64' || encoding.toLowerCase() === 'base64') { + let base64chunk = '' + + value.on('data', (chunk) => { + base64chunk += chunk.toString().replace(/[\r\n]/gm, '') + + const end = base64chunk.length - base64chunk.length % 4 + chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64')) + + base64chunk = base64chunk.slice(end) + }) + value.on('end', () => { + chunks.push(Buffer.from(base64chunk, 'base64')) + responseFormData.append(name, new File(chunks, filename, { type: mimeType })) + }) + } else { + value.on('data', (chunk) => { + chunks.push(chunk) + }) + value.on('end', () => { + responseFormData.append(name, new File(chunks, filename, { type: mimeType })) + }) + } + }) + + const busboyResolve = new Promise((resolve, reject) => { + busboy.on('finish', resolve) + busboy.on('error', (err) => reject(new TypeError(err))) + }) + + if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk) + busboy.end() + await busboyResolve + + return responseFormData + } else if (/application\/x-www-form-urlencoded/.test(contentType)) { + // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then: + + // 1. Let entries be the result of parsing bytes. + let entries + try { + let text = '' + // application/x-www-form-urlencoded parser will keep the BOM. + // https://url.spec.whatwg.org/#concept-urlencoded-parser + // Note that streaming decoder is stateful and cannot be reused + const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) + + for await (const chunk of consumeBody(this[kState].body)) { + if (!isUint8Array(chunk)) { + throw new TypeError('Expected Uint8Array chunk') } + text += streamingDecoder.decode(chunk, { stream: true }) + } + text += streamingDecoder.decode() + entries = new URLSearchParams(text) + } catch (err) { + // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. + // 2. If entries is failure, then throw a TypeError. + throw Object.assign(new TypeError(), { cause: err }) } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - destroy() { - debug('Destroying agent %o', this.constructor.name); + + // 3. Return a new FormData object whose entries are entries. + const formData = new FormData() + for (const [name, value] of entries) { + formData.append(name, value) } + return formData + } else { + // Wait a tick before checking if the request has been aborted. + // Otherwise, a TypeError can be thrown when an AbortError should. + await Promise.resolve() + + throwIfAborted(this[kState]) + + // Otherwise, throw a TypeError. + throw webidl.errors.exception({ + header: `${instance.name}.formData`, + message: 'Could not parse content as FormData.' + }) + } } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map + } + + return methods +} + +function mixinBody (prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)) +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ +async function specConsumeBody (object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance) + + throwIfAborted(object[kState]) + + // 1. If object is unusable, then return a promise rejected + // with a TypeError. + if (bodyUnusable(object[kState].body)) { + throw new TypeError('Body is unusable') + } + + // 2. Let promise be a new promise. + const promise = createDeferredPromise() + + // 3. Let errorSteps given error be to reject promise with error. + const errorSteps = (error) => promise.reject(error) + + // 4. Let successSteps given a byte sequence data be to resolve + // promise with the result of running convertBytesToJSValue + // with data. If that threw an exception, then run errorSteps + // with that exception. + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)) + } catch (e) { + errorSteps(e) + } + } + + // 5. If object’s body is null, then run successSteps with an + // empty byte sequence. + if (object[kState].body == null) { + successSteps(new Uint8Array()) + return promise.promise + } + + // 6. Otherwise, fully read object’s body given successSteps, + // errorSteps, and object’s relevant global object. + await fullyReadBody(object[kState].body, successSteps, errorSteps) + + // 7. Return promise. + return promise.promise +} + +// https://fetch.spec.whatwg.org/#body-unusable +function bodyUnusable (body) { + // An object including the Body interface mixin is + // said to be unusable if its body is non-null and + // its body’s stream is disturbed or locked. + return body != null && (body.stream.locked || util.isDisturbed(body.stream)) +} + +/** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ +function utf8DecodeBytes (buffer) { + if (buffer.length === 0) { + return '' + } + + // 1. Let buffer be the result of peeking three bytes from + // ioQueue, converted to a byte sequence. + + // 2. If buffer is 0xEF 0xBB 0xBF, then read three + // bytes from ioQueue. (Do nothing with those bytes.) + if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { + buffer = buffer.subarray(3) + } + + // 3. Process a queue with an instance of UTF-8’s + // decoder, ioQueue, output, and "replacement". + const output = textDecoder.decode(buffer) + + // 4. Return output. + return output +} + +/** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ +function parseJSONFromBytes (bytes) { + return JSON.parse(utf8DecodeBytes(bytes)) +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} object + */ +function bodyMimeType (object) { + const { headersList } = object[kState] + const contentType = headersList.get('content-type') + + if (contentType === null) { + return 'failure' + } + + return parseMIMEType(contentType) +} + +module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody +} + /***/ }), -/***/ 55947: -/***/ ((__unused_webpack_module, exports) => { +/***/ 41037: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -function promisify(fn) { - return function (req, opts) { - return new Promise((resolve, reject) => { - fn.call(this, req, opts, (err, rtn) => { - if (err) { - reject(err); - } - else { - resolve(rtn); - } - }); - }); - }; + +const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(71267) + +const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] +const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) + +const nullBodyStatus = [101, 204, 205, 304] + +const redirectStatus = [301, 302, 303, 307, 308] +const redirectStatusSet = new Set(redirectStatus) + +// https://fetch.spec.whatwg.org/#block-bad-port +const badPorts = [ + '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', + '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', + '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', + '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', + '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', + '10080' +] + +const badPortsSet = new Set(badPorts) + +// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies +const referrerPolicy = [ + '', + 'no-referrer', + 'no-referrer-when-downgrade', + 'same-origin', + 'origin', + 'strict-origin', + 'origin-when-cross-origin', + 'strict-origin-when-cross-origin', + 'unsafe-url' +] +const referrerPolicySet = new Set(referrerPolicy) + +const requestRedirect = ['follow', 'manual', 'error'] + +const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] +const safeMethodsSet = new Set(safeMethods) + +const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors'] + +const requestCredentials = ['omit', 'same-origin', 'include'] + +const requestCache = [ + 'default', + 'no-store', + 'reload', + 'no-cache', + 'force-cache', + 'only-if-cached' +] + +// https://fetch.spec.whatwg.org/#request-body-header-name +const requestBodyHeader = [ + 'content-encoding', + 'content-language', + 'content-location', + 'content-type', + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + 'content-length' +] + +// https://fetch.spec.whatwg.org/#enumdef-requestduplex +const requestDuplex = [ + 'half' +] + +// http://fetch.spec.whatwg.org/#forbidden-method +const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK'] +const forbiddenMethodsSet = new Set(forbiddenMethods) + +const subresource = [ + 'audio', + 'audioworklet', + 'font', + 'image', + 'manifest', + 'paintworklet', + 'script', + 'style', + 'track', + 'video', + 'xslt', + '' +] +const subresourceSet = new Set(subresource) + +/** @type {globalThis['DOMException']} */ +const DOMException = globalThis.DOMException ?? (() => { + // DOMException was only made a global in Node v17.0.0, + // but fetch supports >= v16.8. + try { + atob('~') + } catch (err) { + return Object.getPrototypeOf(err).constructor + } +})() + +let channel + +/** @type {globalThis['structuredClone']} */ +const structuredClone = + globalThis.structuredClone ?? + // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js + // structuredClone was added in v17.0.0, but fetch supports v16.8 + function structuredClone (value, options = undefined) { + if (arguments.length === 0) { + throw new TypeError('missing argument') + } + + if (!channel) { + channel = new MessageChannel() + } + channel.port1.unref() + channel.port2.unref() + channel.port1.postMessage(value, options?.transfer) + return receiveMessageOnPort(channel.port2).message + } + +module.exports = { + DOMException, + structuredClone, + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet } -exports["default"] = promisify; -//# sourceMappingURL=promisify.js.map + /***/ }), -/***/ 98455: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 685: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const assert = __nccwpck_require__(39491) +const { atob } = __nccwpck_require__(14300) +const { isomorphicDecode } = __nccwpck_require__(52538) + +const encoder = new TextEncoder() -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const net_1 = __importDefault(__nccwpck_require__(41808)); -const tls_1 = __importDefault(__nccwpck_require__(24404)); -const url_1 = __importDefault(__nccwpck_require__(57310)); -const assert_1 = __importDefault(__nccwpck_require__(39491)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const agent_base_1 = __nccwpck_require__(76503); -const parse_proxy_response_1 = __importDefault(__nccwpck_require__(94037)); -const debug = debug_1.default('https-proxy-agent:agent'); /** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - * - * @api public + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('creating new HttpsProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - // ALPN is supported by Node.js >= v5. - // attempt to negotiate http/1.1 for proxy servers that support http/2 - if (this.secureProxy && !('ALPNProtocols' in proxy)) { - proxy.ALPNProtocols = ['http 1.1']; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - const headers = Object.assign({}, proxy.headers); - const hostname = `${opts.host}:${opts.port}`; - let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; - } - // The `Host` header should only include the port - // number when it is not the default port. - let { host, port, secureEndpoint } = opts; - if (!isDefaultPort(port, secureEndpoint)) { - host += `:${port}`; - } - headers.Host = host; - headers.Connection = 'close'; - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = parse_proxy_response_1.default(socket); - socket.write(`${payload}\r\n`); - const { statusCode, buffered } = yield proxyResponsePromise; - if (statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, - servername })); - } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net_1.default.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('replaying proxy buffer for failed request'); - assert_1.default(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - return fakeSocket; - }); +const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/ +const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line +/** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ +const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line + +// https://fetch.spec.whatwg.org/#data-url-processor +/** @param {URL} dataURL */ +function dataURLProcessor (dataURL) { + // 1. Assert: dataURL’s scheme is "data". + assert(dataURL.protocol === 'data:') + + // 2. Let input be the result of running the URL + // serializer on dataURL with exclude fragment + // set to true. + let input = URLSerializer(dataURL, true) + + // 3. Remove the leading "data:" string from input. + input = input.slice(5) + + // 4. Let position point at the start of input. + const position = { position: 0 } + + // 5. Let mimeType be the result of collecting a + // sequence of code points that are not equal + // to U+002C (,), given position. + let mimeType = collectASequenceOfCodePointsFast( + ',', + input, + position + ) + + // 6. Strip leading and trailing ASCII whitespace + // from mimeType. + // Undici implementation note: we need to store the + // length because if the mimetype has spaces removed, + // the wrong amount will be sliced from the input in + // step #9 + const mimeTypeLength = mimeType.length + mimeType = removeASCIIWhitespace(mimeType, true, true) + + // 7. If position is past the end of input, then + // return failure + if (position.position >= input.length) { + return 'failure' + } + + // 8. Advance position by 1. + position.position++ + + // 9. Let encodedBody be the remainder of input. + const encodedBody = input.slice(mimeTypeLength + 1) + + // 10. Let body be the percent-decoding of encodedBody. + let body = stringPercentDecode(encodedBody) + + // 11. If mimeType ends with U+003B (;), followed by + // zero or more U+0020 SPACE, followed by an ASCII + // case-insensitive match for "base64", then: + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + // 1. Let stringBody be the isomorphic decode of body. + const stringBody = isomorphicDecode(body) + + // 2. Set body to the forgiving-base64 decode of + // stringBody. + body = forgivingBase64(stringBody) + + // 3. If body is failure, then return failure. + if (body === 'failure') { + return 'failure' } + + // 4. Remove the last 6 code points from mimeType. + mimeType = mimeType.slice(0, -6) + + // 5. Remove trailing U+0020 SPACE code points from mimeType, + // if any. + mimeType = mimeType.replace(/(\u0020)+$/, '') + + // 6. Remove the last U+003B (;) code point from mimeType. + mimeType = mimeType.slice(0, -1) + } + + // 12. If mimeType starts with U+003B (;), then prepend + // "text/plain" to mimeType. + if (mimeType.startsWith(';')) { + mimeType = 'text/plain' + mimeType + } + + // 13. Let mimeTypeRecord be the result of parsing + // mimeType. + let mimeTypeRecord = parseMIMEType(mimeType) + + // 14. If mimeTypeRecord is failure, then set + // mimeTypeRecord to text/plain;charset=US-ASCII. + if (mimeTypeRecord === 'failure') { + mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') + } + + // 15. Return a new data: URL struct whose MIME + // type is mimeTypeRecord and body is body. + // https://fetch.spec.whatwg.org/#data-url-struct + return { mimeType: mimeTypeRecord, body } } -exports["default"] = HttpsProxyAgent; -function resume(socket) { - socket.resume(); -} -function isDefaultPort(port, secure) { - return Boolean((!secure && port === 80) || (secure && port === 443)); -} -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; -} -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; + +// https://url.spec.whatwg.org/#concept-url-serializer +/** + * @param {URL} url + * @param {boolean} excludeFragment + */ +function URLSerializer (url, excludeFragment = false) { + if (!excludeFragment) { + return url.href + } + + const href = url.href + const hashLength = url.hash.length + + return hashLength === 0 ? href : href.substring(0, href.length - hashLength) } -//# sourceMappingURL=agent.js.map -/***/ }), +// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points +/** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePoints (condition, input, position) { + // 1. Let result be the empty string. + let result = '' -/***/ 66202: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + // 2. While position doesn’t point past the end of input and the + // code point at position within input meets the condition condition: + while (position.position < input.length && condition(input[position.position])) { + // 1. Append that code point to the end of result. + result += input[position.position] -"use strict"; + // 2. Advance position by 1. + position.position++ + } -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(__nccwpck_require__(98455)); -function createHttpsProxyAgent(opts) { - return new agent_1.default(opts); + // 3. Return result. + return result } -(function (createHttpsProxyAgent) { - createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; - createHttpsProxyAgent.prototype = agent_1.default.prototype; -})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); -module.exports = createHttpsProxyAgent; -//# sourceMappingURL=index.js.map -/***/ }), +/** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePointsFast (char, input, position) { + const idx = input.indexOf(char, position.position) + const start = position.position -/***/ 94037: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + if (idx === -1) { + position.position = input.length + return input.slice(start) + } -"use strict"; + position.position = idx + return input.slice(start, position.position) +} -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('close', onclose); - socket.removeListener('readable', read); - } - function onclose(err) { - debug('onclose had error %o', err); - } - function onend() { - debug('onend'); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); - const statusCode = +firstLine.split(' ')[1]; - debug('got proxy server response: %o', firstLine); - resolve({ - statusCode, - buffered - }); - } - socket.on('error', onerror); - socket.on('close', onclose); - socket.on('end', onend); - read(); - }); +// https://url.spec.whatwg.org/#string-percent-decode +/** @param {string} input */ +function stringPercentDecode (input) { + // 1. Let bytes be the UTF-8 encoding of input. + const bytes = encoder.encode(input) + + // 2. Return the percent-decoding of bytes. + return percentDecode(bytes) } -exports["default"] = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map -/***/ }), +// https://url.spec.whatwg.org/#percent-decode +/** @param {Uint8Array} input */ +function percentDecode (input) { + // 1. Let output be an empty byte sequence. + /** @type {number[]} */ + const output = [] -/***/ 17835: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 2. For each byte byte in input: + for (let i = 0; i < input.length; i++) { + const byte = input[i] -"use strict"; + // 1. If byte is not 0x25 (%), then append byte to output. + if (byte !== 0x25) { + output.push(byte) + // 2. Otherwise, if byte is 0x25 (%) and the next two bytes + // after byte in input are not in the ranges + // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), + // and 0x61 (a) to 0x66 (f), all inclusive, append byte + // to output. + } else if ( + byte === 0x25 && + !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2])) + ) { + output.push(0x25) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; + // 3. Otherwise: + } else { + // 1. Let bytePoint be the two bytes after byte in input, + // decoded, and then interpreted as hexadecimal number. + const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]) + const bytePoint = Number.parseInt(nextTwoBytes, 16) + + // 2. Append a byte whose value is bytePoint to output. + output.push(bytePoint) + + // 3. Skip the next two bytes in input. + i += 2 + } } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; + + // 3. Return output. + return Uint8Array.from(output) +} + +// https://mimesniff.spec.whatwg.org/#parse-a-mime-type +/** @param {string} input */ +function parseMIMEType (input) { + // 1. Remove any leading and trailing HTTP whitespace + // from input. + input = removeHTTPWhitespace(input, true, true) + + // 2. Let position be a position variable for input, + // initially pointing at the start of input. + const position = { position: 0 } + + // 3. Let type be the result of collecting a sequence + // of code points that are not U+002F (/) from + // input, given position. + const type = collectASequenceOfCodePointsFast( + '/', + input, + position + ) + + // 4. If type is the empty string or does not solely + // contain HTTP token code points, then return failure. + // https://mimesniff.spec.whatwg.org/#http-token-code-point + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { + return 'failure' } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; + + // 5. If position is past the end of input, then return + // failure + if (position.position > input.length) { + return 'failure' } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; + + // 6. Advance position by 1. (This skips past U+002F (/).) + position.position++ + + // 7. Let subtype be the result of collecting a sequence of + // code points that are not U+003B (;) from input, given + // position. + let subtype = collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 8. Remove any trailing HTTP whitespace from subtype. + subtype = removeHTTPWhitespace(subtype, false, true) + + // 9. If subtype is the empty string or does not solely + // contain HTTP token code points, then return failure. + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return 'failure' } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; + + const typeLowercase = type.toLowerCase() + const subtypeLowercase = subtype.toLowerCase() + + // 10. Let mimeType be a new MIME type record whose type + // is type, in ASCII lowercase, and subtype is subtype, + // in ASCII lowercase. + // https://mimesniff.spec.whatwg.org/#mime-type + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; + + // 11. While position is not past the end of input: + while (position.position < input.length) { + // 1. Advance position by 1. (This skips past U+003B (;).) + position.position++ + + // 2. Collect a sequence of code points that are HTTP + // whitespace from input given position. + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + char => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ) + + // 3. Let parameterName be the result of collecting a + // sequence of code points that are not U+003B (;) + // or U+003D (=) from input, given position. + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ';' && char !== '=', + input, + position + ) + + // 4. Set parameterName to parameterName, in ASCII + // lowercase. + parameterName = parameterName.toLowerCase() + + // 5. If position is not past the end of input, then: + if (position.position < input.length) { + // 1. If the code point at position within input is + // U+003B (;), then continue. + if (input[position.position] === ';') { + continue + } + + // 2. Advance position by 1. (This skips past U+003D (=).) + position.position++ + } + + // 6. If position is past the end of input, then break. + if (position.position > input.length) { + break + } + + // 7. Let parameterValue be null. + let parameterValue = null + + // 8. If the code point at position within input is + // U+0022 ("), then: + if (input[position.position] === '"') { + // 1. Set parameterValue to the result of collecting + // an HTTP quoted string from input, given position + // and the extract-value flag. + parameterValue = collectAnHTTPQuotedString(input, position, true) + + // 2. Collect a sequence of code points that are not + // U+003B (;) from input, given position. + collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 9. Otherwise: + } else { + // 1. Set parameterValue to the result of collecting + // a sequence of code points that are not U+003B (;) + // from input, given position. + parameterValue = collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 2. Remove any trailing HTTP whitespace from parameterValue. + parameterValue = removeHTTPWhitespace(parameterValue, false, true) + + // 3. If parameterValue is the empty string, then continue. + if (parameterValue.length === 0) { + continue + } + } + + // 10. If all of the following are true + // - parameterName is not the empty string + // - parameterName solely contains HTTP token code points + // - parameterValue solely contains HTTP quoted-string token code points + // - mimeType’s parameters[parameterName] does not exist + // then set mimeType’s parameters[parameterName] to parameterValue. + if ( + parameterName.length !== 0 && + HTTP_TOKEN_CODEPOINTS.test(parameterName) && + (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && + !mimeType.parameters.has(parameterName) + ) { + mimeType.parameters.set(parameterName, parameterValue) + } } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; + + // 12. Return mimeType. + return mimeType +} + +// https://infra.spec.whatwg.org/#forgiving-base64-decode +/** @param {string} data */ +function forgivingBase64 (data) { + // 1. Remove all ASCII whitespace from data. + data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line + + // 2. If data’s code point length divides by 4 leaving + // no remainder, then: + if (data.length % 4 === 0) { + // 1. If data ends with one or two U+003D (=) code points, + // then remove them from data. + data = data.replace(/=?=$/, '') } -})); -var _v = _interopRequireDefault(__nccwpck_require__(70618)); + // 3. If data’s code point length divides by 4 leaving + // a remainder of 1, then return failure. + if (data.length % 4 === 1) { + return 'failure' + } -var _v2 = _interopRequireDefault(__nccwpck_require__(36888)); + // 4. If data contains a code point that is not one of + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // then return failure. + if (/[^+/0-9A-Za-z]/.test(data)) { + return 'failure' + } -var _v3 = _interopRequireDefault(__nccwpck_require__(91186)); + const binary = atob(data) + const bytes = new Uint8Array(binary.length) -var _v4 = _interopRequireDefault(__nccwpck_require__(92385)); + for (let byte = 0; byte < binary.length; byte++) { + bytes[byte] = binary.charCodeAt(byte) + } -var _nil = _interopRequireDefault(__nccwpck_require__(65879)); + return bytes +} -var _version = _interopRequireDefault(__nccwpck_require__(40694)); +// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string +// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string +/** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ +function collectAnHTTPQuotedString (input, position, extractValue) { + // 1. Let positionStart be position. + const positionStart = position.position -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + // 2. Let value be the empty string. + let value = '' -var _stringify = _interopRequireDefault(__nccwpck_require__(5802)); + // 3. Assert: the code point at position within input + // is U+0022 ("). + assert(input[position.position] === '"') -var _parse = _interopRequireDefault(__nccwpck_require__(50893)); + // 4. Advance position by 1. + position.position++ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 5. While true: + while (true) { + // 1. Append the result of collecting a sequence of code points + // that are not U+0022 (") or U+005C (\) from input, given + // position, to value. + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== '\\', + input, + position + ) -/***/ }), + // 2. If position is past the end of input, then break. + if (position.position >= input.length) { + break + } -/***/ 9576: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 3. Let quoteOrBackslash be the code point at position within + // input. + const quoteOrBackslash = input[position.position] -"use strict"; + // 4. Advance position by 1. + position.position++ + // 5. If quoteOrBackslash is U+005C (\), then: + if (quoteOrBackslash === '\\') { + // 1. If position is past the end of input, then append + // U+005C (\) to value and break. + if (position.position >= input.length) { + value += '\\' + break + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 2. Append the code point at position within input to value. + value += input[position.position] -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // 3. Advance position by 1. + position.position++ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 6. Otherwise: + } else { + // 1. Assert: quoteOrBackslash is U+0022 ("). + assert(quoteOrBackslash === '"') -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); + // 2. Break. + break + } } - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 54974: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 6. If the extract-value flag is set, then return value. + if (extractValue) { + return value + } -"use strict"; + // 7. Return the code points from positionStart to position, + // inclusive, within input. + return input.slice(positionStart, position.position) +} +/** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +function serializeAMimeType (mimeType) { + assert(mimeType !== 'failure') + const { parameters, essence } = mimeType -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 1. Let serialization be the concatenation of mimeType’s + // type, U+002F (/), and mimeType’s subtype. + let serialization = essence -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // 2. For each name → value of mimeType’s parameters: + for (let [name, value] of parameters.entries()) { + // 1. Append U+003B (;) to serialization. + serialization += ';' -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 2. Append name to serialization. + serialization += name -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; + // 3. Append U+003D (=) to serialization. + serialization += '=' -/***/ }), + // 4. If value does not solely contain HTTP token code + // points or value is the empty string, then: + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + // 1. Precede each occurence of U+0022 (") or + // U+005C (\) in value with U+005C (\). + value = value.replace(/(\\|")/g, '\\$1') -/***/ 65879: -/***/ ((__unused_webpack_module, exports) => { + // 2. Prepend U+0022 (") to value. + value = '"' + value -"use strict"; + // 3. Append U+0022 (") to value. + value += '"' + } + // 5. Append value to serialization. + serialization += value + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; + // 3. Return serialization. + return serialization +} -/***/ }), +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} char + */ +function isHTTPWhiteSpace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === ' ' +} -/***/ 50893: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + */ +function removeHTTPWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 -"use strict"; + if (leading) { + for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); + } + if (trailing) { + for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + return str.slice(lead, trail + 1) +} -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); +/** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {string} char + */ +function isASCIIWhitespace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' ' +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + */ +function removeASCIIWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); + if (leading) { + for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); } - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ + if (trailing) { + for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); + } - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + return str.slice(lead, trail + 1) +} - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; +module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType } -var _default = parse; -exports["default"] = _default; /***/ }), -/***/ 47658: -/***/ ((__unused_webpack_module, exports) => { +/***/ 78511: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 82042: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const { Blob, File: NativeFile } = __nccwpck_require__(14300) +const { types } = __nccwpck_require__(73837) +const { kState } = __nccwpck_require__(15861) +const { isBlobLike } = __nccwpck_require__(52538) +const { webidl } = __nccwpck_require__(21744) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) +const { kEnumerableProperty } = __nccwpck_require__(83983) +const encoder = new TextEncoder() -"use strict"; +class File extends Blob { + constructor (fileBits, fileName, options = {}) { + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: + webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) + fileBits = webidl.converters['sequence'](fileBits) + fileName = webidl.converters.USVString(fileName) + options = webidl.converters.FilePropertyBag(options) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + // Note: Blob handles this for us -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // 2. Let n be the fileName argument to the constructor. + const n = fileName -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // 2. Convert every character in t to ASCII lowercase. + let t = options.type + let d -let poolPtr = rnds8Pool.length; + // eslint-disable-next-line no-labels + substep: { + if (t) { + t = parseMIMEType(t) -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); + if (t === 'failure') { + t = '' + // eslint-disable-next-line no-labels + break substep + } - poolPtr = 0; - } + t = serializeAMimeType(t).toLowerCase() + } - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + d = options.lastModified + } -/***/ }), + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. -/***/ 26723: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + super(processBlobParts(fileBits, options), { type: t }) + this[kState] = { + name: n, + lastModified: d, + type: t + } + } -"use strict"; + get name () { + webidl.brandCheck(this, File) + return this[kState].name + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + get lastModified () { + webidl.brandCheck(this, File) -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + return this[kState].lastModified + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + get type () { + webidl.brandCheck(this, File) -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); + return this[kState].type } - - return _crypto.default.createHash('sha1').update(bytes).digest(); } -var _default = sha1; -exports["default"] = _default; - -/***/ }), +class FileLike { + constructor (blobLike, fileName, options = {}) { + // TODO: argument idl type check -/***/ 5802: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: -"use strict"; + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + // 2. Let n be the fileName argument to the constructor. + const n = fileName -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // TODO + const t = options.type -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 2. Convert every character in t to ASCII lowercase. + // TODO -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + const d = options.lastModified ?? Date.now() -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + } + } -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields + stream (...args) { + webidl.brandCheck(this, FileLike) - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); + return this[kState].blobLike.stream(...args) } - return uuid; -} + arrayBuffer (...args) { + webidl.brandCheck(this, FileLike) -var _default = stringify; -exports["default"] = _default; + return this[kState].blobLike.arrayBuffer(...args) + } -/***/ }), + slice (...args) { + webidl.brandCheck(this, FileLike) -/***/ 70618: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + return this[kState].blobLike.slice(...args) + } -"use strict"; + text (...args) { + webidl.brandCheck(this, FileLike) + return this[kState].blobLike.text(...args) + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + get size () { + webidl.brandCheck(this, FileLike) -var _rng = _interopRequireDefault(__nccwpck_require__(82042)); + return this[kState].blobLike.size + } -var _stringify = __nccwpck_require__(5802); + get type () { + webidl.brandCheck(this, FileLike) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + return this[kState].blobLike.type + } -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; + get name () { + webidl.brandCheck(this, FileLike) -let _clockseq; // Previous uuid creation time + return this[kState].name + } + + get lastModified () { + webidl.brandCheck(this, FileLike) + return this[kState].lastModified + } -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + get [Symbol.toStringTag] () { + return 'File' + } +} -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 +Object.defineProperties(File.prototype, { + [Symbol.toStringTag]: { + value: 'File', + configurable: true + }, + name: kEnumerableProperty, + lastModified: kEnumerableProperty +}) - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); +webidl.converters.Blob = webidl.interfaceConverter(Blob) - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; +webidl.converters.BlobPart = function (V, opts) { + if (webidl.util.Type(V) === 'Object') { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + if ( + ArrayBuffer.isView(V) || + types.isAnyArrayBuffer(V) + ) { + return webidl.converters.BufferSource(V, opts) } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + } + return webidl.converters.USVString(V, opts) +} - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.BlobPart +) - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) +// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag +webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ + { + key: 'lastModified', + converter: webidl.converters['long long'], + get defaultValue () { + return Date.now() + } + }, + { + key: 'type', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'endings', + converter: (value) => { + value = webidl.converters.DOMString(value) + value = value.toLowerCase() - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + if (value !== 'native') { + value = 'transparent' + } - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval + return value + }, + defaultValue: 'transparent' + } +]) +/** + * @see https://www.w3.org/TR/FileAPI/#process-blob-parts + * @param {(NodeJS.TypedArray|Blob|string)[]} parts + * @param {{ type: string, endings: string }} options + */ +function processBlobParts (parts, options) { + // 1. Let bytes be an empty sequence of bytes. + /** @type {NodeJS.TypedArray[]} */ + const bytes = [] - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested + // 2. For each element in parts: + for (const element of parts) { + // 1. If element is a USVString, run the following substeps: + if (typeof element === 'string') { + // 1. Let s be element. + let s = element + // 2. If the endings member of options is "native", set s + // to the result of converting line endings to native + // of element. + if (options.endings === 'native') { + s = convertLineEndingsNative(s) + } - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + // 3. Append the result of UTF-8 encoding s to bytes. + bytes.push(encoder.encode(s)) + } else if ( + types.isAnyArrayBuffer(element) || + types.isTypedArray(element) + ) { + // 2. If element is a BufferSource, get a copy of the + // bytes held by the buffer source, and append those + // bytes to bytes. + if (!element.buffer) { // ArrayBuffer + bytes.push(new Uint8Array(element)) + } else { + bytes.push( + new Uint8Array(element.buffer, element.byteOffset, element.byteLength) + ) + } + } else if (isBlobLike(element)) { + // 3. If element is a Blob, append the bytes it represents + // to bytes. + bytes.push(element) + } } - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + // 3. Return bytes. + return bytes +} - msecs += 12219292800000; // `time_low` +/** + * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native + * @param {string} s + */ +function convertLineEndingsNative (s) { + // 1. Let native line ending be be the code point U+000A LF. + let nativeLineEnding = '\n' - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` + // 2. If the underlying platform’s conventions are to + // represent newlines as a carriage return and line feed + // sequence, set native line ending to the code point + // U+000D CR followed by the code point U+000A LF. + if (process.platform === 'win32') { + nativeLineEnding = '\r\n' + } - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` + return s.replace(/\r?\n/g, nativeLineEnding) +} - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version +// If this function is moved to ./util.js, some tools (such as +// rollup) will warn about circular dependencies. See: +// https://github.com/nodejs/undici/issues/1629 +function isFileLike (object) { + return ( + (NativeFile && object instanceof NativeFile) || + object instanceof File || ( + object && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + object[Symbol.toStringTag] === 'File' + ) + ) +} - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) +module.exports = { File, FileLike, isFileLike } - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - b[i++] = clockseq & 0xff; // `node` +/***/ }), - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } +/***/ 72015: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return buf || (0, _stringify.unsafeStringify)(b); -} +"use strict"; -var _default = v1; -exports["default"] = _default; -/***/ }), +const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(52538) +const { kState } = __nccwpck_require__(15861) +const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(78511) +const { webidl } = __nccwpck_require__(21744) +const { Blob, File: NativeFile } = __nccwpck_require__(14300) -/***/ 36888: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile -"use strict"; +// https://xhr.spec.whatwg.org/#formdata +class FormData { + constructor (form) { + if (form !== undefined) { + throw webidl.errors.conversionFailed({ + prefix: 'FormData constructor', + argument: 'Argument 1', + types: ['undefined'] + }) + } + this[kState] = [] + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + append (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) -var _v = _interopRequireDefault(__nccwpck_require__(8392)); + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) -var _md = _interopRequireDefault(__nccwpck_require__(9576)); + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + ) + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 1. Let value be value if given; otherwise blobValue. -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? webidl.converters.USVString(filename) + : undefined -/***/ }), + // 2. Let entry be the result of creating an entry with + // name, value, and filename if given. + const entry = makeEntry(name, value, filename) -/***/ 8392: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 3. Append entry to this’s entry list. + this[kState].push(entry) + } -"use strict"; + delete (name) { + webidl.brandCheck(this, FormData) + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; + name = webidl.converters.USVString(name) -var _stringify = __nccwpck_require__(5802); + // The delete(name) method steps are to remove all entries whose name + // is name from this’s entry list. + this[kState] = this[kState].filter(entry => entry.name !== name) + } -var _parse = _interopRequireDefault(__nccwpck_require__(50893)); + get (name) { + webidl.brandCheck(this, FormData) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape + name = webidl.converters.USVString(name) - const bytes = []; + // 1. If there is no entry whose name is name in this’s entry list, + // then return null. + const idx = this[kState].findIndex((entry) => entry.name === name) + if (idx === -1) { + return null + } - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); + // 2. Return the value of the first entry whose name is name from + // this’s entry list. + return this[kState][idx].value } - return bytes; -} + getAll (name) { + webidl.brandCheck(this, FormData) -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; + name = webidl.converters.USVString(name) - if (typeof value === 'string') { - value = stringToBytes(value); - } + // 1. If there is no entry whose name is name in this’s entry list, + // then return the empty list. + // 2. Return the values of all entries whose name is name, in order, + // from this’s entry list. + return this[kState] + .filter((entry) => entry.name === name) + .map((entry) => entry.value) + } - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } + has (name) { + webidl.brandCheck(this, FormData) - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) + name = webidl.converters.USVString(name) - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; + // The has(name) method steps are to return true if there is an entry + // whose name is name in this’s entry list; otherwise false. + return this[kState].findIndex((entry) => entry.name === name) !== -1 + } - if (buf) { - offset = offset || 0; + set (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) - return buf; + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" + ) } - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) + // The set(name, value) and set(name, blobValue, filename) method steps + // are: + // 1. Let value be value if given; otherwise blobValue. - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? toUSVString(filename) + : undefined + // 2. Let entry be the result of creating an entry with name, value, and + // filename if given. + const entry = makeEntry(name, value, filename) - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} + // 3. If there are entries in this’s entry list whose name is name, then + // replace the first such entry with entry and remove the others. + const idx = this[kState].findIndex((entry) => entry.name === name) + if (idx !== -1) { + this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ] + } else { + // 4. Otherwise, append entry to this’s entry list. + this[kState].push(entry) + } + } -/***/ }), + entries () { + webidl.brandCheck(this, FormData) -/***/ 91186: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key+value' + ) + } -"use strict"; + keys () { + webidl.brandCheck(this, FormData) + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key' + ) + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + values () { + webidl.brandCheck(this, FormData) -var _native = _interopRequireDefault(__nccwpck_require__(54974)); + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'value' + ) + } -var _rng = _interopRequireDefault(__nccwpck_require__(82042)); + /** + * @param {(value: string, key: string, self: FormData) => void} callbackFn + * @param {unknown} thisArg + */ + forEach (callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, FormData) -var _stringify = __nccwpck_require__(5802); + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' }) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (typeof callbackFn !== 'function') { + throw new TypeError( + "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'." + ) + } -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); + for (const [key, value] of this) { + callbackFn.apply(thisArg, [value, key, this]) + } } +} - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` +FormData.prototype[Symbol.iterator] = FormData.prototype.entries +Object.defineProperties(FormData.prototype, { + [Symbol.toStringTag]: { + value: 'FormData', + configurable: true + } +}) - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided +/** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ +function makeEntry (name, value, filename) { + // 1. Set name to the result of converting name into a scalar value string. + // "To convert a string into a scalar value string, replace any surrogates + // with U+FFFD." + // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end + name = Buffer.from(name).toString('utf8') - if (buf) { - offset = offset || 0; + // 2. If value is a string, then set value to the result of converting + // value into a scalar value string. + if (typeof value === 'string') { + value = Buffer.from(value).toString('utf8') + } else { + // 3. Otherwise: - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; + // 1. If value is not a File object, then set value to a new File object, + // representing the same bytes, whose name attribute value is "blob" + if (!isFileLike(value)) { + value = value instanceof Blob + ? new File([value], 'blob', { type: value.type }) + : new FileLike(value, 'blob', { type: value.type }) } - return buf; + // 2. If filename is given, then set value to a new File object, + // representing the same bytes, whose name attribute is filename. + if (filename !== undefined) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + } + + value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile + ? new File([value], filename, options) + : new FileLike(value, filename, options) + } } - return (0, _stringify.unsafeStringify)(rnds); + // 4. Return an entry whose name is name and whose value is value. + return { name, value } } -var _default = v4; -exports["default"] = _default; +module.exports = { FormData } + /***/ }), -/***/ 92385: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 71246: +/***/ ((module) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +// In case of breaking changes, increase the version +// number to avoid conflicts. +const globalOrigin = Symbol.for('undici.globalOrigin.1') + +function getGlobalOrigin () { + return globalThis[globalOrigin] +} + +function setGlobalOrigin (newOrigin) { + if (newOrigin === undefined) { + Object.defineProperty(globalThis, globalOrigin, { + value: undefined, + writable: true, + enumerable: false, + configurable: false + }) + + return + } + + const parsedURL = new URL(newOrigin) -var _v = _interopRequireDefault(__nccwpck_require__(8392)); + if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { + throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) + } -var _sha = _interopRequireDefault(__nccwpck_require__(26723)); + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }) +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +module.exports = { + getGlobalOrigin, + setGlobalOrigin +} -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; /***/ }), -/***/ 34875: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 10554: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// https://github.com/Ethan-Arrowood/undici-fetch -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _regex = _interopRequireDefault(__nccwpck_require__(47658)); +const { kHeadersList, kConstruct } = __nccwpck_require__(72785) +const { kGuard } = __nccwpck_require__(15861) +const { kEnumerableProperty } = __nccwpck_require__(83983) +const { + makeIterator, + isValidHeaderName, + isValidHeaderValue +} = __nccwpck_require__(52538) +const util = __nccwpck_require__(73837) +const { webidl } = __nccwpck_require__(21744) +const assert = __nccwpck_require__(39491) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const kHeadersMap = Symbol('headers map') +const kHeadersSortedMap = Symbol('headers map sorted') -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); +/** + * @param {number} code + */ +function isHTTPWhiteSpaceCharCode (code) { + return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 } -var _default = validate; -exports["default"] = _default; +/** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ +function headerValueNormalize (potentialValue) { + // To normalize a byte sequence potentialValue, remove + // any leading and trailing HTTP whitespace bytes from + // potentialValue. + let i = 0; let j = potentialValue.length -/***/ }), + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i -/***/ 40694: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) +} -"use strict"; +function fill (headers, object) { + // To fill a Headers object headers with a given object object, run these steps: + // 1. If object is a sequence, then for each header in object: + // Note: webidl conversion to array has already been done. + if (Array.isArray(object)) { + for (let i = 0; i < object.length; ++i) { + const header = object[i] + // 1. If header does not contain exactly two items, then throw a TypeError. + if (header.length !== 2) { + throw webidl.errors.exception({ + header: 'Headers constructor', + message: `expected name/value pair to be length 2, found ${header.length}.` + }) + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 2. Append (header’s first item, header’s second item) to headers. + appendHeader(headers, header[0], header[1]) + } + } else if (typeof object === 'object' && object !== null) { + // Note: null should throw -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + // 2. Otherwise, object is a record, then for each key → value in object, + // append (key, value) to headers + const keys = Object.keys(object) + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]) + } + } else { + throw webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: ['sequence>', 'record'] + }) + } +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ +function appendHeader (headers, name, value) { + // 1. Normalize value. + value = headerValueNormalize(value) -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value, + type: 'header value' + }) } - return parseInt(uuid.slice(14, 15), 16); -} - -var _default = version; -exports["default"] = _default; + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // Note: undici does not implement forbidden header names + if (headers[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (headers[kGuard] === 'request-no-cors') { + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO + } -/***/ }), + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. -/***/ 4351: -/***/ ((module) => { + // 7. Append (name, value) to headers’s header list. + return headers[kHeadersList].append(name, value) -/****************************************************************************** -Copyright (c) Microsoft Corporation. + // 8. If headers’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from headers +} -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. +class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -var __rewriteRelativeImportExtension; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + constructor (init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]) + this[kHeadersSortedMap] = init[kHeadersSortedMap] + this.cookies = init.cookies === null ? null : [...init.cookies] + } else { + this[kHeadersMap] = new Map(init) + this[kHeadersSortedMap] = null } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + } - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; + // https://fetch.spec.whatwg.org/#header-list-contains + contains (name) { + // A header list list contains a header name name if list + // contains a header whose name is a byte-case-insensitive + // match for name. + name = name.toLowerCase() - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; + return this[kHeadersMap].has(name) + } - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; + clear () { + this[kHeadersMap].clear() + this[kHeadersSortedMap] = null + this.cookies = null + } - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; + // https://fetch.spec.whatwg.org/#concept-header-list-append + append (name, value) { + this[kHeadersSortedMap] = null - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; + // 1. If list contains name, then set name to the first such + // header’s name. + const lowercaseName = name.toLowerCase() + const exists = this[kHeadersMap].get(lowercaseName) - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; + // 2. Append (name, value) to list. + if (exists) { + const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }) + } else { + this[kHeadersMap].set(lowercaseName, { name, value }) + } - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; + if (lowercaseName === 'set-cookie') { + this.cookies ??= [] + this.cookies.push(value) + } + } - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; + // https://fetch.spec.whatwg.org/#concept-header-list-set + set (name, value) { + this[kHeadersSortedMap] = null + const lowercaseName = name.toLowerCase() - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; + if (lowercaseName === 'set-cookie') { + this.cookies = [value] + } - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; + // 1. If list contains name, then set the value of + // the first such header to value and remove the + // others. + // 2. Otherwise, append header (name, value) to list. + this[kHeadersMap].set(lowercaseName, { name, value }) + } - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + // https://fetch.spec.whatwg.org/#concept-header-list-delete + delete (name) { + this[kHeadersSortedMap] = null - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; + name = name.toLowerCase() - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; + if (name === 'set-cookie') { + this.cookies = null + } - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); + this[kHeadersMap].delete(name) + } - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; + // https://fetch.spec.whatwg.org/#concept-header-list-get + get (name) { + const value = this[kHeadersMap].get(name.toLowerCase()) - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; + // 1. If list does not contain name, then return null. + // 2. Return the values of all headers in list whose name + // is a byte-case-insensitive match for name, + // separated from each other by 0x2C 0x20, in order. + return value === undefined ? null : value.value + } - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; + * [Symbol.iterator] () { + // use the lowercased name + for (const [name, { value }] of this[kHeadersMap]) { + yield [name, value] + } + } - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; + get entries () { + const headers = {} - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; + if (this[kHeadersMap].size) { + for (const { name, value } of this[kHeadersMap].values()) { + headers[name] = value + } + } + + return headers + } +} - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; +// https://fetch.spec.whatwg.org/#headers-class +class Headers { + constructor (init = undefined) { + if (init === kConstruct) { + return + } + this[kHeadersList] = new HeadersList() - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; + // The new Headers(init) constructor steps are: - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } - }; + // 1. Set this’s guard to "none". + this[kGuard] = 'none' - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; + // 2. If init is given, then fill this with init. + if (init !== undefined) { + init = webidl.converters.HeadersInit(init) + fill(this, init) + } + } - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; + // https://fetch.spec.whatwg.org/#dom-headers-append + append (name, value) { + webidl.brandCheck(this, Headers) - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; + return appendHeader(this, name, value) + } - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete (name) { + webidl.brandCheck(this, Headers) - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; + name = webidl.converters.ByteString(name) - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.delete', + value: name, + type: 'header name' + }) + } - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; + // 2. If this’s guard is "immutable", then throw a TypeError. + // 3. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 4. Otherwise, if this’s guard is "request-no-cors", name + // is not a no-CORS-safelisted request-header name, and + // name is not a privileged no-CORS request-header name, + // return. + // 5. Otherwise, if this’s guard is "response" and name is + // a forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO + } - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; + // 6. If this’s header list does not contain name, then + // return. + if (!this[kHeadersList].contains(name)) { + return + } - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); - }; + // 7. Delete name from this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this. + this[kHeadersList].delete(name) + } - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; + // https://fetch.spec.whatwg.org/#dom-headers-get + get (name) { + webidl.brandCheck(this, Headers) - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) -0 && (0); + name = webidl.converters.ByteString(name) + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.get', + value: name, + type: 'header name' + }) + } -/***/ }), + // 2. Return the result of getting name from this’s header + // list. + return this[kHeadersList].get(name) + } -/***/ 74294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // https://fetch.spec.whatwg.org/#dom-headers-has + has (name) { + webidl.brandCheck(this, Headers) -module.exports = __nccwpck_require__(54219); + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) + name = webidl.converters.ByteString(name) -/***/ }), + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.has', + value: name, + type: 'header name' + }) + } -/***/ 54219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 2. Return true if this’s header list contains name; + // otherwise false. + return this[kHeadersList].contains(name) + } -"use strict"; + // https://fetch.spec.whatwg.org/#dom-headers-set + set (name, value) { + webidl.brandCheck(this, Headers) + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) -var net = __nccwpck_require__(41808); -var tls = __nccwpck_require__(24404); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var events = __nccwpck_require__(82361); -var assert = __nccwpck_require__(39491); -var util = __nccwpck_require__(73837); + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) + // 1. Normalize value. + value = headerValueNormalize(value) -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value, + type: 'header value' + }) + } + // 3. If this’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if this’s guard is "request-no-cors" and + // name/value is not a no-CORS-safelisted request-header, + // return. + // 6. Otherwise, if this’s guard is "response" and name is a + // forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO + } -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} + // 7. Set (name, value) in this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this + this[kHeadersList].set(name, value) + } -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie () { + webidl.brandCheck(this, Headers) -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} + // 1. If this’s header list does not contain `Set-Cookie`, then return « ». + // 2. Return the values of all headers in this’s header list whose name is + // a byte-case-insensitive match for `Set-Cookie`, in order. -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} + const list = this[kHeadersList].cookies + if (list) { + return [...list] + } -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; + return [] + } - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + get [kHeadersSortedMap] () { + if (this[kHeadersList][kHeadersSortedMap]) { + return this[kHeadersList][kHeadersSortedMap] } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + // 1. Let headers be an empty list of headers with the key being the name + // and value the value. + const headers = [] - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } + // 2. Let names be the result of convert header names to a sorted-lowercase + // set with all the names of the headers in list. + const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) + const cookies = this[kHeadersList].cookies - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); + // 3. For each name of names: + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i] + // 1. If name is `set-cookie`, then: + if (name === 'set-cookie') { + // 1. Let values be a list of all values of headers in list whose name + // is a byte-case-insensitive match for name, in order. - function onFree() { - self.emit('free', socket, options); - } + // 2. For each value of values: + // 1. Append (name, value) to headers. + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]) + } + } else { + // 2. Otherwise: - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; + // 1. Let value be the result of getting name from list. -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); + // 2. Assert: value is non-null. + assert(value !== null) - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port + // 3. Append (name, value) to headers. + headers.push([name, value]) + } } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } + this[kHeadersList][kHeadersSortedMap] = headers - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); + // 4. Return headers. + return headers } - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); + keys () { + webidl.brandCheck(this, Headers) - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key') } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); + + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key' + ) } - function onError(cause) { - connectReq.removeAllListeners(); + values () { + webidl.brandCheck(this, Headers) - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'value') + } -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'value' + ) } - this.sockets.splice(pos, 1); - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); + entries () { + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key+value') + } + + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key+value' + ) } -}; -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); + /** + * @param {(value: string, key: string, self: Headers) => void} callbackFn + * @param {unknown} thisArg + */ + forEach (callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, Headers) - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' }) + if (typeof callbackFn !== 'function') { + throw new TypeError( + "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'." + ) + } -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; + for (const [key, value] of this) { + callbackFn.apply(thisArg, [value, key, this]) + } } - return host; // for v0.11 or later -} -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } + [Symbol.for('nodejs.util.inspect.custom')] () { + webidl.brandCheck(this, Headers) + + return this[kHeadersList] } - return target; } +Headers.prototype[Symbol.iterator] = Headers.prototype.entries -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); +Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + keys: kEnumerableProperty, + values: kEnumerableProperty, + entries: kEnumerableProperty, + forEach: kEnumerableProperty, + [Symbol.iterator]: { enumerable: false }, + [Symbol.toStringTag]: { + value: 'Headers', + configurable: true + }, + [util.inspect.custom]: { + enumerable: false + } +}) + +webidl.converters.HeadersInit = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (V[Symbol.iterator]) { + return webidl.converters['sequence>'](V) } - console.error.apply(console, args); + + return webidl.converters['record'](V) } -} else { - debug = function() {}; + + throw webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: ['sequence>', 'record'] + }) +} + +module.exports = { + fill, + Headers, + HeadersList } -exports.debug = debug; // for test /***/ }), -/***/ 41773: +/***/ 74881: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// https://github.com/Ethan-Arrowood/undici-fetch -const Client = __nccwpck_require__(33598) -const Dispatcher = __nccwpck_require__(60412) -const errors = __nccwpck_require__(48045) -const Pool = __nccwpck_require__(4634) -const BalancedPool = __nccwpck_require__(37931) -const Agent = __nccwpck_require__(7890) -const util = __nccwpck_require__(83983) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(44059) -const buildConnector = __nccwpck_require__(82067) -const MockClient = __nccwpck_require__(58687) -const MockAgent = __nccwpck_require__(66771) -const MockPool = __nccwpck_require__(26193) -const mockErrors = __nccwpck_require__(50888) -const ProxyAgent = __nccwpck_require__(97858) -const RetryHandler = __nccwpck_require__(82286) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(21892) -const DecoratorHandler = __nccwpck_require__(46930) -const RedirectHandler = __nccwpck_require__(72860) -const createRedirectInterceptor = __nccwpck_require__(38861) - -let hasCrypto -try { - __nccwpck_require__(6113) - hasCrypto = true -} catch { - hasCrypto = false -} -Object.assign(Dispatcher.prototype, api) +const { + Response, + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse +} = __nccwpck_require__(27823) +const { Headers } = __nccwpck_require__(10554) +const { Request, makeRequest } = __nccwpck_require__(48359) +const zlib = __nccwpck_require__(59796) +const { + bytesMatch, + makePolicyContainer, + clonePolicyContainer, + requestBadPort, + TAOCheck, + appendRequestOriginHeader, + responseLocationURL, + requestCurrentURL, + setRequestReferrerPolicyOnRedirect, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + createOpaqueTimingInfo, + appendFetchMetadata, + corsCheck, + crossOriginResourcePolicyCheck, + determineRequestsReferrer, + coarsenedSharedCurrentTime, + createDeferredPromise, + isBlobLike, + sameOrigin, + isCancelled, + isAborted, + isErrorLike, + fullyReadBody, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlIsHttpHttpsScheme, + urlHasHttpsScheme +} = __nccwpck_require__(52538) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) +const assert = __nccwpck_require__(39491) +const { safelyExtractBody } = __nccwpck_require__(41472) +const { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet, + DOMException +} = __nccwpck_require__(41037) +const { kHeadersList } = __nccwpck_require__(72785) +const EE = __nccwpck_require__(82361) +const { Readable, pipeline } = __nccwpck_require__(12781) +const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(83983) +const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(685) +const { TransformStream } = __nccwpck_require__(35356) +const { getGlobalDispatcher } = __nccwpck_require__(21892) +const { webidl } = __nccwpck_require__(21744) +const { STATUS_CODES } = __nccwpck_require__(13685) +const GET_OR_HEAD = ['GET', 'HEAD'] -module.exports.Dispatcher = Dispatcher -module.exports.Client = Client -module.exports.Pool = Pool -module.exports.BalancedPool = BalancedPool -module.exports.Agent = Agent -module.exports.ProxyAgent = ProxyAgent -module.exports.RetryHandler = RetryHandler +/** @type {import('buffer').resolveObjectURL} */ +let resolveObjectURL +let ReadableStream = globalThis.ReadableStream -module.exports.DecoratorHandler = DecoratorHandler -module.exports.RedirectHandler = RedirectHandler -module.exports.createRedirectInterceptor = createRedirectInterceptor +class Fetch extends EE { + constructor (dispatcher) { + super() -module.exports.buildConnector = buildConnector -module.exports.errors = errors + this.dispatcher = dispatcher + this.connection = null + this.dump = false + this.state = 'ongoing' + // 2 terminated listeners get added per request, + // but only 1 gets removed. If there are 20 redirects, + // 21 listeners will be added. + // See https://github.com/nodejs/undici/issues/1711 + // TODO (fix): Find and fix root cause for leaked listener. + this.setMaxListeners(21) + } -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null + terminate (reason) { + if (this.state !== 'ongoing') { + return } - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') + this.state = 'terminated' + this.connection?.destroy(reason) + this.emit('terminated', reason) + } + + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort (error) { + if (this.state !== 'ongoing') { + return } - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') + // 1. Set controller’s state to "aborted". + this.state = 'aborted' + + // 2. Let fallbackError be an "AbortError" DOMException. + // 3. Set error to fallbackError if it is not given. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') } - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } + // 4. Let serializedError be StructuredSerialize(error). + // If that threw an exception, catch it, and let + // serializedError be StructuredSerialize(fallbackError). - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } + // 5. Set controller’s serialized abort reason to serializedError. + this.serializedAbortReason = error - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } + this.connection?.destroy(error) + this.emit('terminated', error) + } +} - url = util.parseURL(url) - } +// https://fetch.spec.whatwg.org/#fetch-method +function fetch (input, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) - const { agent, dispatcher = getGlobalDispatcher() } = opts + // 1. Let p be a new promise. + const p = createDeferredPromise() - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') - } + // 2. Let requestObject be the result of invoking the initial value of + // Request as constructor with input and init as arguments. If this throws + // an exception, reject p with it and return p. + let requestObject - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) + try { + requestObject = new Request(input, init) + } catch (e) { + p.reject(e) + return p.promise } -} -module.exports.setGlobalDispatcher = setGlobalDispatcher -module.exports.getGlobalDispatcher = getGlobalDispatcher + // 3. Let request be requestObject’s request. + const request = requestObject[kState] -if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { - let fetchImpl = null - module.exports.fetch = async function fetch (resource) { - if (!fetchImpl) { - fetchImpl = (__nccwpck_require__(74881).fetch) - } + // 4. If requestObject’s signal’s aborted flag is set, then: + if (requestObject.signal.aborted) { + // 1. Abort the fetch() call with p, request, null, and + // requestObject’s signal’s abort reason. + abortFetch(p, request, null, requestObject.signal.reason) - try { - return await fetchImpl(...arguments) - } catch (err) { - if (typeof err === 'object') { - Error.captureStackTrace(err, this) - } + // 2. Return p. + return p.promise + } - throw err - } + // 5. Let globalObject be request’s client’s global object. + const globalObject = request.client.globalObject + + // 6. If globalObject is a ServiceWorkerGlobalScope object, then set + // request’s service-workers mode to "none". + if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { + request.serviceWorkers = 'none' } - module.exports.Headers = __nccwpck_require__(10554).Headers - module.exports.Response = __nccwpck_require__(27823).Response - module.exports.Request = __nccwpck_require__(48359).Request - module.exports.FormData = __nccwpck_require__(72015).FormData - module.exports.File = __nccwpck_require__(78511).File - module.exports.FileReader = __nccwpck_require__(1446).FileReader - const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(71246) + // 7. Let responseObject be null. + let responseObject = null - module.exports.setGlobalOrigin = setGlobalOrigin - module.exports.getGlobalOrigin = getGlobalOrigin + // 8. Let relevantRealm be this’s relevant Realm. + const relevantRealm = null - const { CacheStorage } = __nccwpck_require__(37907) - const { kConstruct } = __nccwpck_require__(29174) + // 9. Let locallyAborted be false. + let locallyAborted = false - // Cache & CacheStorage are tightly coupled with fetch. Even if it may run - // in an older version of Node, it doesn't have any use without fetch. - module.exports.caches = new CacheStorage(kConstruct) -} + // 10. Let controller be null. + let controller = null -if (util.nodeMajor >= 16) { - const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(41724) + // 11. Add the following abort steps to requestObject’s signal: + addAbortListener( + requestObject.signal, + () => { + // 1. Set locallyAborted to true. + locallyAborted = true - module.exports.deleteCookie = deleteCookie - module.exports.getCookies = getCookies - module.exports.getSetCookies = getSetCookies - module.exports.setCookie = setCookie + // 2. Assert: controller is non-null. + assert(controller != null) - const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) + // 3. Abort controller with requestObject’s signal’s abort reason. + controller.abort(requestObject.signal.reason) - module.exports.parseMIMEType = parseMIMEType - module.exports.serializeAMimeType = serializeAMimeType -} + // 4. Abort the fetch() call with p, request, responseObject, + // and requestObject’s signal’s abort reason. + abortFetch(p, request, responseObject, requestObject.signal.reason) + } + ) -if (util.nodeMajor >= 18 && hasCrypto) { - const { WebSocket } = __nccwpck_require__(54284) + // 12. Let handleFetchDone given response response be to finalize and + // report timing with response, globalObject, and "fetch". + const handleFetchDone = (response) => + finalizeAndReportTiming(response, 'fetch') - module.exports.WebSocket = WebSocket + // 13. Set controller to the result of calling fetch given request, + // with processResponseEndOfBody set to handleFetchDone, and processResponse + // given response being these substeps: + + const processResponse = (response) => { + // 1. If locallyAborted is true, terminate these substeps. + if (locallyAborted) { + return Promise.resolve() + } + + // 2. If response’s aborted flag is set, then: + if (response.aborted) { + // 1. Let deserializedError be the result of deserialize a serialized + // abort reason given controller’s serialized abort reason and + // relevantRealm. + + // 2. Abort the fetch() call with p, request, responseObject, and + // deserializedError. + + abortFetch(p, request, responseObject, controller.serializedAbortReason) + return Promise.resolve() + } + + // 3. If response is a network error, then reject p with a TypeError + // and terminate these substeps. + if (response.type === 'error') { + p.reject( + Object.assign(new TypeError('fetch failed'), { cause: response.error }) + ) + return Promise.resolve() + } + + // 4. Set responseObject to the result of creating a Response object, + // given response, "immutable", and relevantRealm. + responseObject = new Response() + responseObject[kState] = response + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + + // 5. Resolve p with responseObject. + p.resolve(responseObject) + } + + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici + }) + + // 14. Return p. + return p.promise } -module.exports.request = makeDispatcher(api.request) -module.exports.stream = makeDispatcher(api.stream) -module.exports.pipeline = makeDispatcher(api.pipeline) -module.exports.connect = makeDispatcher(api.connect) -module.exports.upgrade = makeDispatcher(api.upgrade) +// https://fetch.spec.whatwg.org/#finalize-and-report-timing +function finalizeAndReportTiming (response, initiatorType = 'other') { + // 1. If response is an aborted network error, then return. + if (response.type === 'error' && response.aborted) { + return + } + + // 2. If response’s URL list is null or empty, then return. + if (!response.urlList?.length) { + return + } -module.exports.MockClient = MockClient -module.exports.MockPool = MockPool -module.exports.MockAgent = MockAgent -module.exports.mockErrors = mockErrors + // 3. Let originalURL be response’s URL list[0]. + const originalURL = response.urlList[0] + // 4. Let timingInfo be response’s timing info. + let timingInfo = response.timingInfo -/***/ }), + // 5. Let cacheState be response’s cache state. + let cacheState = response.cacheState -/***/ 7890: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. + if (!urlIsHttpHttpsScheme(originalURL)) { + return + } -"use strict"; + // 7. If timingInfo is null, then return. + if (timingInfo === null) { + return + } + // 8. If response’s timing allow passed flag is not set, then: + if (!response.timingAllowPassed) { + // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. + timingInfo = createOpaqueTimingInfo({ + startTime: timingInfo.startTime + }) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(72785) -const DispatcherBase = __nccwpck_require__(74839) -const Pool = __nccwpck_require__(4634) -const Client = __nccwpck_require__(33598) -const util = __nccwpck_require__(83983) -const createRedirectInterceptor = __nccwpck_require__(38861) -const { WeakRef, FinalizationRegistry } = __nccwpck_require__(56436)() + // 2. Set cacheState to the empty string. + cacheState = '' + } -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kFinalizer = Symbol('finalizer') -const kOptions = Symbol('options') + // 9. Set timingInfo’s end time to the coarsened shared current time + // given global’s relevant settings object’s cross-origin isolated + // capability. + // TODO: given global’s relevant settings object’s cross-origin isolated + // capability? + timingInfo.endTime = coarsenedSharedCurrentTime() -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) + // 10. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo + + // 11. Mark resource timing for timingInfo, originalURL, initiatorType, + // global, and cacheState. + markResourceTiming( + timingInfo, + originalURL, + initiatorType, + globalThis, + cacheState + ) } -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super() +// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing +function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { + if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { + performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) + } +} - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } +// https://fetch.spec.whatwg.org/#abort-fetch +function abortFetch (p, request, responseObject, error) { + // Note: AbortSignal.reason was added in node v17.2.0 + // which would give us an undefined error to reject with. + // Remove this once node v16 is no longer supported. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } + // 1. Reject promise with error. + p.reject(error) - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } + // 2. If request’s body is not null and is readable, then cancel request’s + // body with error. + if (request.body != null && isReadable(request.body?.stream)) { + request.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return + } + throw err + }) + } - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } + // 3. If responseObject is null, then return. + if (responseObject == null) { + return + } - this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] + // 4. Let response be responseObject’s response. + const response = responseObject[kState] - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => { - const ref = this[kClients].get(key) - if (ref !== undefined && ref.deref() === undefined) { - this[kClients].delete(key) + // 5. If response’s body is not null and is readable, then error response’s + // body with error. + if (response.body != null && isReadable(response.body?.stream)) { + response.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return } + throw err }) + } +} - const agent = this +// https://fetch.spec.whatwg.org/#fetching +function fetching ({ + request, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher // undici +}) { + // 1. Let taskDestination be null. + let taskDestination = null - this[kOnDrain] = (origin, targets) => { - agent.emit('drain', origin, [agent, ...targets]) - } + // 2. Let crossOriginIsolatedCapability be false. + let crossOriginIsolatedCapability = false - this[kOnConnect] = (origin, targets) => { - agent.emit('connect', origin, [agent, ...targets]) - } + // 3. If request’s client is non-null, then: + if (request.client != null) { + // 1. Set taskDestination to request’s client’s global object. + taskDestination = request.client.globalObject - this[kOnDisconnect] = (origin, targets, err) => { - agent.emit('disconnect', origin, [agent, ...targets], err) - } + // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin + // isolated capability. + crossOriginIsolatedCapability = + request.client.crossOriginIsolatedCapability + } - this[kOnConnectionError] = (origin, targets, err) => { - agent.emit('connectionError', origin, [agent, ...targets], err) - } + // 4. If useParallelQueue is true, then set taskDestination to the result of + // starting a new parallel queue. + // TODO + + // 5. Let timingInfo be a new fetch timing info whose start time and + // post-redirect start time are the coarsened shared current time given + // crossOriginIsolatedCapability. + const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) + const timingInfo = createOpaqueTimingInfo({ + startTime: currenTime + }) + + // 6. Let fetchParams be a new fetch params whose + // request is request, + // timing info is timingInfo, + // process request body chunk length is processRequestBodyChunkLength, + // process request end-of-body is processRequestEndOfBody, + // process response is processResponse, + // process response consume body is processResponseConsumeBody, + // process response end-of-body is processResponseEndOfBody, + // task destination is taskDestination, + // and cross-origin isolated capability is crossOriginIsolatedCapability. + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability } - get [kRunning] () { - let ret = 0 - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore next: gc is undeterministic */ - if (client) { - ret += client[kRunning] - } - } - return ret + // 7. If request’s body is a byte sequence, then set request’s body to + // request’s body as a body. + // NOTE: Since fetching is only called from fetch, body should already be + // extracted. + assert(!request.body || request.body.stream) + + // 8. If request’s window is "client", then set request’s window to request’s + // client, if request’s client’s global object is a Window object; otherwise + // "no-window". + if (request.window === 'client') { + // TODO: What if request.client is null? + request.window = + request.client?.globalObject?.constructor?.name === 'Window' + ? request.client + : 'no-window' } - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) + // 9. If request’s origin is "client", then set request’s origin to request’s + // client’s origin. + if (request.origin === 'client') { + // TODO: What if request.client is null? + request.origin = request.client?.origin + } + + // 10. If all of the following conditions are true: + // TODO + + // 11. If request’s policy container is "client", then: + if (request.policyContainer === 'client') { + // 1. If request’s client is non-null, then set request’s policy + // container to a clone of request’s client’s policy container. [HTML] + if (request.client != null) { + request.policyContainer = clonePolicyContainer( + request.client.policyContainer + ) } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') + // 2. Otherwise, set request’s policy container to a new policy + // container. + request.policyContainer = makePolicyContainer() } + } - const ref = this[kClients].get(key) + // 12. If request’s header list does not contain `Accept`, then: + if (!request.headersList.contains('accept')) { + // 1. Let value be `*/*`. + const value = '*/*' - let dispatcher = ref ? ref.deref() : null - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) + // 2. A user agent should set value to the first matching statement, if + // any, switching on request’s destination: + // "document" + // "frame" + // "iframe" + // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` + // "image" + // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` + // "style" + // `text/css,*/*;q=0.1` + // TODO - this[kClients].set(key, new WeakRef(dispatcher)) - this[kFinalizer].register(dispatcher, key) - } + // 3. Append `Accept`/value to request’s header list. + request.headersList.append('accept', value) + } - return dispatcher.dispatch(opts, handler) + // 13. If request’s header list does not contain `Accept-Language`, then + // user agents should append `Accept-Language`/an appropriate value to + // request’s header list. + if (!request.headersList.contains('accept-language')) { + request.headersList.append('accept-language', '*') } - async [kClose] () { - const closePromises = [] - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore else: gc is undeterministic */ - if (client) { - closePromises.push(client.close()) - } - } + // 14. If request’s priority is null, then use request’s initiator and + // destination appropriately in setting request’s priority to a + // user-agent-defined object. + if (request.priority === null) { + // TODO + } - await Promise.all(closePromises) + // 15. If request is a subresource request, then: + if (subresourceSet.has(request.destination)) { + // TODO } - async [kDestroy] (err) { - const destroyPromises = [] - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore else: gc is undeterministic */ - if (client) { - destroyPromises.push(client.destroy(err)) - } - } + // 16. Run main fetch given fetchParams. + mainFetch(fetchParams) + .catch(err => { + fetchParams.controller.terminate(err) + }) - await Promise.all(destroyPromises) - } + // 17. Return fetchParam's controller + return fetchParams.controller } -module.exports = Agent - +// https://fetch.spec.whatwg.org/#concept-main-fetch +async function mainFetch (fetchParams, recursive = false) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request -/***/ }), + // 2. Let response be null. + let response = null -/***/ 7032: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 3. If request’s local-URLs-only flag is set and request’s current URL is + // not local, then set response to a network error. + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { + response = makeNetworkError('local URLs only') + } -const { addAbortListener } = __nccwpck_require__(83983) -const { RequestAbortedError } = __nccwpck_require__(48045) + // 4. Run report Content Security Policy violations for request. + // TODO -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') + // 5. Upgrade request to a potentially trustworthy URL, if appropriate. + tryUpgradeRequestToAPotentiallyTrustworthyURL(request) -function abort (self) { - if (self.abort) { - self.abort() - } else { - self.onError(new RequestAbortedError()) + // 6. If should request be blocked due to a bad port, should fetching request + // be blocked as mixed content, or should request be blocked by Content + // Security Policy returns blocked, then set response to a network error. + if (requestBadPort(request) === 'blocked') { + response = makeNetworkError('bad port') } -} - -function addSignal (self, signal) { - self[kSignal] = null - self[kListener] = null + // TODO: should fetching request be blocked as mixed content? + // TODO: should request be blocked by Content Security Policy? - if (!signal) { - return + // 7. If request’s referrer policy is the empty string, then set request’s + // referrer policy to request’s policy container’s referrer policy. + if (request.referrerPolicy === '') { + request.referrerPolicy = request.policyContainer.referrerPolicy } - if (signal.aborted) { - abort(self) - return + // 8. If request’s referrer is not "no-referrer", then set request’s + // referrer to the result of invoking determine request’s referrer. + if (request.referrer !== 'no-referrer') { + request.referrer = determineRequestsReferrer(request) } - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } + // 9. Set request’s current URL’s scheme to "https" if all of the following + // conditions are true: + // - request’s current URL’s scheme is "http" + // - request’s current URL’s host is a domain + // - Matching request’s current URL’s host per Known HSTS Host Domain Name + // Matching results in either a superdomain match with an asserted + // includeSubDomains directive or a congruent match (with or without an + // asserted includeSubDomains directive). [HSTS] + // TODO - addAbortListener(self[kSignal], self[kListener]) -} + // 10. If recursive is false, then run the remaining steps in parallel. + // TODO -function removeSignal (self) { - if (!self[kSignal]) { - return - } + // 11. If response is null, then set response to the result of running + // the steps corresponding to the first matching statement: + if (response === null) { + response = await (async () => { + const currentURL = requestCurrentURL(request) - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } + if ( + // - request’s current URL’s origin is same origin with request’s origin, + // and request’s response tainting is "basic" + (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || + // request’s current URL’s scheme is "data" + (currentURL.protocol === 'data:') || + // - request’s mode is "navigate" or "websocket" + (request.mode === 'navigate' || request.mode === 'websocket') + ) { + // 1. Set request’s response tainting to "basic". + request.responseTainting = 'basic' - self[kSignal] = null - self[kListener] = null -} + // 2. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } -module.exports = { - addSignal, - removeSignal -} + // request’s mode is "same-origin" + if (request.mode === 'same-origin') { + // 1. Return a network error. + return makeNetworkError('request mode cannot be "same-origin"') + } + // request’s mode is "no-cors" + if (request.mode === 'no-cors') { + // 1. If request’s redirect mode is not "follow", then return a network + // error. + if (request.redirect !== 'follow') { + return makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ) + } -/***/ }), + // 2. Set request’s response tainting to "opaque". + request.responseTainting = 'opaque' -/***/ 29744: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 3. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } -"use strict"; + // request’s current URL’s scheme is not an HTTP(S) scheme + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { + // Return a network error. + return makeNetworkError('URL scheme must be a HTTP(S) scheme') + } + + // - request’s use-CORS-preflight flag is set + // - request’s unsafe-request flag is set and either request’s method is + // not a CORS-safelisted method or CORS-unsafe request-header names with + // request’s header list is not empty + // 1. Set request’s response tainting to "cors". + // 2. Let corsWithPreflightResponse be the result of running HTTP fetch + // given fetchParams and true. + // 3. If corsWithPreflightResponse is a network error, then clear cache + // entries using request. + // 4. Return corsWithPreflightResponse. + // TODO + // Otherwise + // 1. Set request’s response tainting to "cors". + request.responseTainting = 'cors' -const { AsyncResource } = __nccwpck_require__(50852) -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { addSignal, removeSignal } = __nccwpck_require__(7032) + // 2. Return the result of running HTTP fetch given fetchParams. + return await httpFetch(fetchParams) + })() + } -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } + // 12. If recursive is true, then return response. + if (recursive) { + return response + } - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') + // 13. If response is not a network error and response is not a filtered + // response, then: + if (response.status !== 0 && !response.internalResponse) { + // If request’s response tainting is "cors", then: + if (request.responseTainting === 'cors') { + // 1. Let headerNames be the result of extracting header list values + // given `Access-Control-Expose-Headers` and response’s header list. + // TODO + // 2. If request’s credentials mode is not "include" and headerNames + // contains `*`, then set response’s CORS-exposed header-name list to + // all unique header names in response’s header list. + // TODO + // 3. Otherwise, if headerNames is not null or failure, then set + // response’s CORS-exposed header-name list to headerNames. + // TODO } - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (request.responseTainting === 'basic') { + response = filterResponse(response, 'basic') + } else if (request.responseTainting === 'cors') { + response = filterResponse(response, 'cors') + } else if (request.responseTainting === 'opaque') { + response = filterResponse(response, 'opaque') + } else { + assert(false) } + } - super('UNDICI_CONNECT') + // 14. Let internalResponse be response, if response is a network error, + // and response’s internal response otherwise. + let internalResponse = + response.status === 0 ? response : response.internalResponse - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null + // 15. If internalResponse’s URL list is empty, then set it to a clone of + // request’s URL list. + if (internalResponse.urlList.length === 0) { + internalResponse.urlList.push(...request.urlList) + } - addSignal(this, signal) + // 16. If request’s timing allow failed flag is unset, then set + // internalResponse’s timing allow passed flag. + if (!request.timingAllowFailed) { + response.timingAllowPassed = true } - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } + // 17. If response is not a network error and any of the following returns + // blocked + // - should internalResponse to request be blocked as mixed content + // - should internalResponse to request be blocked by Content Security Policy + // - should internalResponse to request be blocked due to its MIME type + // - should internalResponse to request be blocked due to nosniff + // TODO - this.abort = abort - this.context = context + // 18. If response’s type is "opaque", internalResponse’s status is 206, + // internalResponse’s range-requested flag is set, and request’s header + // list does not contain `Range`, then set response and internalResponse + // to a network error. + if ( + response.type === 'opaque' && + internalResponse.status === 206 && + internalResponse.rangeRequested && + !request.headers.contains('range') + ) { + response = internalResponse = makeNetworkError() } - onHeaders () { - throw new SocketError('bad connect', null) + // 19. If response is not a network error and either request’s method is + // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, + // set internalResponse’s body to null and disregard any enqueuing toward + // it (if any). + if ( + response.status !== 0 && + (request.method === 'HEAD' || + request.method === 'CONNECT' || + nullBodyStatus.includes(internalResponse.status)) + ) { + internalResponse.body = null + fetchParams.controller.dump = true } - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null + // 20. If request’s integrity metadata is not the empty string, then: + if (request.integrity) { + // 1. Let processBodyError be this step: run fetch finale given fetchParams + // and a network error. + const processBodyError = (reason) => + fetchFinale(fetchParams, makeNetworkError(reason)) - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + // 2. If request’s response tainting is "opaque", or response’s body is null, + // then run processBodyError and abort these steps. + if (request.responseTainting === 'opaque' || response.body == null) { + processBodyError(response.error) + return } - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this + // 3. Let processBody given bytes be these steps: + const processBody = (bytes) => { + // 1. If bytes do not match request’s integrity metadata, + // then run processBodyError and abort these steps. [SRI] + if (!bytesMatch(bytes, request.integrity)) { + processBodyError('integrity mismatch') + return + } - removeSignal(this) + // 2. Set response’s body to bytes as a body. + response.body = safelyExtractBody(bytes)[0] - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) + // 3. Run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) + // 4. Fully read response’s body given processBody and processBodyError. + await fullyReadBody(response.body, processBody, processBodyError) + } else { + // 21. Otherwise, run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) } } -module.exports = connect - +// https://fetch.spec.whatwg.org/#concept-scheme-fetch +// given a fetch params fetchParams +function schemeFetch (fetchParams) { + // Note: since the connection is destroyed on redirect, which sets fetchParams to a + // cancelled state, we do not want this condition to trigger *unless* there have been + // no redirects. See https://github.com/nodejs/undici/issues/1776 + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { + return Promise.resolve(makeAppropriateNetworkError(fetchParams)) + } -/***/ }), + // 2. Let request be fetchParams’s request. + const { request } = fetchParams -/***/ 28752: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const { protocol: scheme } = requestCurrentURL(request) -"use strict"; + // 3. Switch on request’s current URL’s scheme and run the associated steps: + switch (scheme) { + case 'about:': { + // If request’s current URL’s path is the string "blank", then return a new response + // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », + // and body is the empty byte sequence as a body. + // Otherwise, return a network error. + return Promise.resolve(makeNetworkError('about scheme is not supported')) + } + case 'blob:': { + if (!resolveObjectURL) { + resolveObjectURL = (__nccwpck_require__(14300).resolveObjectURL) + } -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(12781) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { AsyncResource } = __nccwpck_require__(50852) -const { addSignal, removeSignal } = __nccwpck_require__(7032) -const assert = __nccwpck_require__(39491) + // 1. Let blobURLEntry be request’s current URL’s blob URL entry. + const blobURLEntry = requestCurrentURL(request) -const kResume = Symbol('resume') + // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 + // Buffer.resolveObjectURL does not ignore URL queries. + if (blobURLEntry.search.length !== 0) { + return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) + } -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) + const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) - this[kResume] = null - } + // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s + // object is not a Blob object, then return a network error. + if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { + return Promise.resolve(makeNetworkError('invalid method')) + } - _read () { - const { [kResume]: resume } = this + // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. + const bodyWithType = safelyExtractBody(blobURLEntryObject) - if (resume) { - this[kResume] = null - resume() - } - } + // 4. Let body be bodyWithType’s body. + const body = bodyWithType[0] - _destroy (err, callback) { - this._read() + // 5. Let length be body’s length, serialized and isomorphic encoded. + const length = isomorphicEncode(`${body.length}`) - callback(err) - } -} + // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. + const type = bodyWithType[1] ?? '' -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } + // 7. Return a new response whose status message is `OK`, header list is + // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. + const response = makeResponse({ + statusText: 'OK', + headersList: [ + ['content-length', { name: 'Content-Length', value: length }], + ['content-type', { name: 'Content-Type', value: type }] + ] + }) - _read () { - this[kResume]() - } + response.body = body - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() + return Promise.resolve(response) } + case 'data:': { + // 1. Let dataURLStruct be the result of running the + // data: URL processor on request’s current URL. + const currentURL = requestCurrentURL(request) + const dataURLStruct = dataURLProcessor(currentURL) - callback(err) - } -} + // 2. If dataURLStruct is failure, then return a + // network error. + if (dataURLStruct === 'failure') { + return Promise.resolve(makeNetworkError('failed to fetch the data URL')) + } -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } + // 3. Let mimeType be dataURLStruct’s MIME type, serialized. + const mimeType = serializeAMimeType(dataURLStruct.mimeType) - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') + // 4. Return a response whose status message is `OK`, + // header list is « (`Content-Type`, mimeType) », + // and body is dataURLStruct’s body as a body. + return Promise.resolve(makeResponse({ + statusText: 'OK', + headersList: [ + ['content-type', { name: 'Content-Type', value: mimeType }] + ], + body: safelyExtractBody(dataURLStruct.body)[0] + })) } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + case 'file:': { + // For now, unfortunate as it is, file URLs are left as an exercise for the reader. + // When in doubt, return a network error. + return Promise.resolve(makeNetworkError('not implemented... yet...')) } + case 'http:': + case 'https:': { + // Return the result of running HTTP fetch given fetchParams. - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') + return httpFetch(fetchParams) + .catch((err) => makeNetworkError(err)) } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') + default: { + return Promise.resolve(makeNetworkError('unknown scheme')) } + } +} - super('UNDICI_PIPELINE') +// https://fetch.spec.whatwg.org/#finalize-response +function finalizeResponse (fetchParams, response) { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null + // 2, If fetchParams’s process response done is not null, then queue a fetch + // task to run fetchParams’s process response done given response, with + // fetchParams’s task destination. + if (fetchParams.processResponseDone != null) { + queueMicrotask(() => fetchParams.processResponseDone(response)) + } +} - this.req = new PipelineRequest().on('error', util.nop) +// https://fetch.spec.whatwg.org/#fetch-finale +function fetchFinale (fetchParams, response) { + // 1. If response is a network error, then: + if (response.type === 'error') { + // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». + response.urlList = [fetchParams.request.urlList[0]] - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this + // 2. Set response’s timing info to the result of creating an opaque timing + // info for fetchParams’s timing info. + response.timingInfo = createOpaqueTimingInfo({ + startTime: fetchParams.timingInfo.startTime + }) + } - if (body && body.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this + // 2. Let processResponseEndOfBody be the following steps: + const processResponseEndOfBody = () => { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this + // If fetchParams’s process response end-of-body is not null, + // then queue a fetch task to run fetchParams’s process response + // end-of-body given response with fetchParams’s task destination. + if (fetchParams.processResponseEndOfBody != null) { + queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) + } + } - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } + // 3. If fetchParams’s process response is non-null, then queue a fetch task + // to run fetchParams’s process response given response, with fetchParams’s + // task destination. + if (fetchParams.processResponse != null) { + queueMicrotask(() => fetchParams.processResponse(response)) + } - if (abort && err) { - abort() - } + // 4. If response’s body is null, then run processResponseEndOfBody. + if (response.body == null) { + processResponseEndOfBody() + } else { + // 5. Otherwise: - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) + // 1. Let transformStream be a new a TransformStream. - removeSignal(this) + // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, + // enqueues chunk in transformStream. + const identityTransformAlgorithm = (chunk, controller) => { + controller.enqueue(chunk) + } - callback(err) + // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm + // and flushAlgorithm set to processResponseEndOfBody. + const transformStream = new TransformStream({ + start () {}, + transform: identityTransformAlgorithm, + flush: processResponseEndOfBody + }, { + size () { + return 1 + } + }, { + size () { + return 1 } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) }) - this.res = null - - addSignal(this, signal) + // 4. Set response’s body to the result of piping response’s body through transformStream. + response.body = { stream: response.body.stream.pipeThrough(transformStream) } } - onConnect (abort, context) { - const { ret, res } = this + // 6. If fetchParams’s process response consume body is non-null, then: + if (fetchParams.processResponseConsumeBody != null) { + // 1. Let processBody given nullOrBytes be this step: run fetchParams’s + // process response consume body given response and nullOrBytes. + const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes) - assert(!res, 'pipeline cannot be retried') + // 2. Let processBodyError be this step: run fetchParams’s process + // response consume body given response and failure. + const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure) - if (ret.destroyed) { - throw new RequestAbortedError() + // 3. If response’s body is null, then queue a fetch task to run processBody + // given null, with fetchParams’s task destination. + if (response.body == null) { + queueMicrotask(() => processBody(null)) + } else { + // 4. Otherwise, fully read response’s body given processBody, processBodyError, + // and fetchParams’s task destination. + return fullyReadBody(response.body, processBody, processBodyError) } - - this.abort = abort - this.context = context + return Promise.resolve() } +} - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) +// https://fetch.spec.whatwg.org/#http-fetch +async function httpFetch (fetchParams) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } + // 2. Let response be null. + let response = null - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } + // 3. Let actualResponse be null. + let actualResponse = null - body - .on('data', (chunk) => { - const { ret, body } = this + // 4. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this + // 5. If request’s service-workers mode is "all", then: + if (request.serviceWorkers === 'all') { + // TODO + } - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this + // 6. If response is null, then: + if (response === null) { + // 1. If makeCORSPreflight is true and one of these conditions is true: + // TODO - ret.push(null) - }) - .on('close', () => { - const { ret } = this + // 2. If request’s redirect mode is "follow", then set request’s + // service-workers mode to "none". + if (request.redirect === 'follow') { + request.serviceWorkers = 'none' + } - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) + // 3. Set response and actualResponse to the result of running + // HTTP-network-or-cache fetch given fetchParams. + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - this.body = body - } + // 4. If request’s response tainting is "cors" and a CORS check + // for request and response returns failure, then return a network error. + if ( + request.responseTainting === 'cors' && + corsCheck(request, response) === 'failure' + ) { + return makeNetworkError('cors failure') + } - onData (chunk) { - const { res } = this - return res.push(chunk) + // 5. If the TAO check for request and response returns failure, then set + // request’s timing allow failed flag. + if (TAOCheck(request, response) === 'failure') { + request.timingAllowFailed = true + } } - onComplete (trailers) { - const { res } = this - res.push(null) + // 7. If either request’s response tainting or response’s type + // is "opaque", and the cross-origin resource policy check with + // request’s origin, request’s client, request’s destination, + // and actualResponse returns blocked, then return a network error. + if ( + (request.responseTainting === 'opaque' || response.type === 'opaque') && + crossOriginResourcePolicyCheck( + request.origin, + request.client, + request.destination, + actualResponse + ) === 'blocked' + ) { + return makeNetworkError('blocked') } - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} + // 8. If actualResponse’s status is a redirect status, then: + if (redirectStatusSet.has(actualResponse.status)) { + // 1. If actualResponse’s status is not 303, request’s body is not null, + // and the connection uses HTTP/2, then user agents may, and are even + // encouraged to, transmit an RST_STREAM frame. + // See, https://github.com/whatwg/fetch/issues/1288 + if (request.redirect !== 'manual') { + fetchParams.controller.connection.destroy() + } -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) + // 2. Switch on request’s redirect mode: + if (request.redirect === 'error') { + // Set response to a network error. + response = makeNetworkError('unexpected redirect') + } else if (request.redirect === 'manual') { + // Set response to an opaque-redirect filtered response whose internal + // response is actualResponse. + // NOTE(spec): On the web this would return an `opaqueredirect` response, + // but that doesn't make sense server side. + // See https://github.com/nodejs/undici/issues/1193. + response = actualResponse + } else if (request.redirect === 'follow') { + // Set response to the result of running HTTP-redirect fetch given + // fetchParams and response. + response = await httpRedirectFetch(fetchParams, response) + } else { + assert(false) + } } -} - -module.exports = pipeline + // 9. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo -/***/ }), + // 10. Return response. + return response +} -/***/ 55448: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// https://fetch.spec.whatwg.org/#http-redirect-fetch +function httpRedirectFetch (fetchParams, response) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request -"use strict"; + // 2. Let actualResponse be response, if response is not a filtered response, + // and response’s internal response otherwise. + const actualResponse = response.internalResponse + ? response.internalResponse + : response + // 3. Let locationURL be actualResponse’s location URL given request’s current + // URL’s fragment. + let locationURL -const Readable = __nccwpck_require__(73858) -const { - InvalidArgumentError, - RequestAbortedError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) -const { AsyncResource } = __nccwpck_require__(50852) -const { addSignal, removeSignal } = __nccwpck_require__(7032) + try { + locationURL = responseLocationURL( + actualResponse, + requestCurrentURL(request).hash + ) -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') + // 4. If locationURL is null, then return response. + if (locationURL == null) { + return response } + } catch (err) { + // 5. If locationURL is failure, then return a network error. + return Promise.resolve(makeNetworkError(err)) + } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts + // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network + // error. + if (!urlIsHttpHttpsScheme(locationURL)) { + return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) + } - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } + // 7. If request’s redirect count is 20, then return a network error. + if (request.redirectCount === 20) { + return Promise.resolve(makeNetworkError('redirect count exceeded')) + } - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } + // 8. Increase request’s redirect count by 1. + request.redirectCount += 1 - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } + // 9. If request’s mode is "cors", locationURL includes credentials, and + // request’s origin is not same origin with locationURL’s origin, then return + // a network error. + if ( + request.mode === 'cors' && + (locationURL.username || locationURL.password) && + !sameOrigin(request, locationURL) + ) { + return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) + } - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } + // 10. If request’s response tainting is "cors" and locationURL includes + // credentials, then return a network error. + if ( + request.responseTainting === 'cors' && + (locationURL.username || locationURL.password) + ) { + return Promise.resolve(makeNetworkError( + 'URL cannot contain credentials for request mode "cors"' + )) + } - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } + // 11. If actualResponse’s status is not 303, request’s body is non-null, + // and request’s body’s source is null, then return a network error. + if ( + actualResponse.status !== 303 && + request.body != null && + request.body.source == null + ) { + return Promise.resolve(makeNetworkError()) + } - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err + // 12. If one of the following is true + // - actualResponse’s status is 301 or 302 and request’s method is `POST` + // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` + if ( + ([301, 302].includes(actualResponse.status) && request.method === 'POST') || + (actualResponse.status === 303 && + !GET_OR_HEAD.includes(request.method)) + ) { + // then: + // 1. Set request’s method to `GET` and request’s body to null. + request.method = 'GET' + request.body = null + + // 2. For each headerName of request-body-header name, delete headerName from + // request’s header list. + for (const headerName of requestBodyHeader) { + request.headersList.delete(headerName) } + } - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark + // 13. If request’s current URL’s origin is not same origin with locationURL’s + // origin, then for each headerName of CORS non-wildcard request-header name, + // delete headerName from request’s header list. + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name + request.headersList.delete('authorization') - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } + // https://fetch.spec.whatwg.org/#authentication-entries + request.headersList.delete('proxy-authorization', true) - addSignal(this, signal) + // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. + request.headersList.delete('cookie') + request.headersList.delete('host') } - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } - - this.abort = abort - this.context = context + // 14. If request’s body is non-null, then set request’s body to the first return + // value of safely extracting request’s body’s source. + if (request.body != null) { + assert(request.body.source != null) + request.body = safelyExtractBody(request.body.source)[0] } - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this + // 15. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + // 16. Set timingInfo’s redirect end time and post-redirect start time to the + // coarsened shared current time given fetchParams’s cross-origin isolated + // capability. + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = + coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } + // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s + // redirect start time to timingInfo’s start time. + if (timingInfo.redirectStartTime === 0) { + timingInfo.redirectStartTime = timingInfo.startTime + } - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const body = new Readable({ resume, abort, contentType, highWaterMark }) + // 18. Append locationURL to request’s URL list. + request.urlList.push(locationURL) - this.callback = null - this.res = body - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body, - context - }) - } - } - } + // 19. Invoke set request’s referrer policy on redirect on request and + // actualResponse. + setRequestReferrerPolicyOnRedirect(request, actualResponse) - onData (chunk) { - const { res } = this - return res.push(chunk) - } + // 20. Return the result of running main fetch given fetchParams and true. + return mainFetch(fetchParams, true) +} - onComplete (trailers) { - const { res } = this +// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch +async function httpNetworkOrCacheFetch ( + fetchParams, + isAuthenticationFetch = false, + isNewConnectionFetch = false +) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request - removeSignal(this) + // 2. Let httpFetchParams be null. + let httpFetchParams = null - util.parseHeaders(trailers, this.trailers) + // 3. Let httpRequest be null. + let httpRequest = null - res.push(null) - } + // 4. Let response be null. + let response = null - onError (err) { - const { res, callback, body, opaque } = this + // 5. Let storedResponse be null. + // TODO: cache - removeSignal(this) + // 6. Let httpCache be null. + const httpCache = null - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } + // 7. Let the revalidatingFlag be unset. + const revalidatingFlag = false - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } + // 8. Run these steps, but abort when the ongoing fetch is terminated: - if (body) { - this.body = null - util.destroy(body, err) - } - } -} + // 1. If request’s window is "no-window" and request’s redirect mode is + // "error", then set httpFetchParams to fetchParams and httpRequest to + // request. + if (request.window === 'no-window' && request.redirect === 'error') { + httpFetchParams = fetchParams + httpRequest = request + } else { + // Otherwise: -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } + // 1. Set httpRequest to a clone of request. + httpRequest = makeRequest(request) - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) + // 2. Set httpFetchParams to a copy of fetchParams. + httpFetchParams = { ...fetchParams } + + // 3. Set httpFetchParams’s request to httpRequest. + httpFetchParams.request = httpRequest } -} -module.exports = request -module.exports.RequestHandler = RequestHandler + // 3. Let includeCredentials be true if one of + const includeCredentials = + request.credentials === 'include' || + (request.credentials === 'same-origin' && + request.responseTainting === 'basic') + // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s + // body is non-null; otherwise null. + const contentLength = httpRequest.body ? httpRequest.body.length : null -/***/ }), + // 5. Let contentLengthHeaderValue be null. + let contentLengthHeaderValue = null -/***/ 75395: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or + // `PUT`, then set contentLengthHeaderValue to `0`. + if ( + httpRequest.body == null && + ['POST', 'PUT'].includes(httpRequest.method) + ) { + contentLengthHeaderValue = '0' + } -"use strict"; + // 7. If contentLength is non-null, then set contentLengthHeaderValue to + // contentLength, serialized and isomorphic encoded. + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) + } + // 8. If contentLengthHeaderValue is non-null, then append + // `Content-Length`/contentLengthHeaderValue to httpRequest’s header + // list. + if (contentLengthHeaderValue != null) { + httpRequest.headersList.append('content-length', contentLengthHeaderValue) + } -const { finished, PassThrough } = __nccwpck_require__(12781) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) -const { AsyncResource } = __nccwpck_require__(50852) -const { addSignal, removeSignal } = __nccwpck_require__(7032) + // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, + // contentLengthHeaderValue) to httpRequest’s header list. -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } + // 10. If contentLength is non-null and httpRequest’s keepalive is true, + // then: + if (contentLength != null && httpRequest.keepalive) { + // NOTE: keepalive is a noop outside of browser context. + } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts + // 11. If httpRequest’s referrer is a URL, then append + // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, + // to httpRequest’s header list. + if (httpRequest.referrer instanceof URL) { + httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href)) + } - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } + // 12. Append a request `Origin` header for httpRequest. + appendRequestOriginHeader(httpRequest) - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } + // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] + appendFetchMetadata(httpRequest) - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } + // 14. If httpRequest’s header list does not contain `User-Agent`, then + // user agents should append `User-Agent`/default `User-Agent` value to + // httpRequest’s header list. + if (!httpRequest.headersList.contains('user-agent')) { + httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') + } - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } + // 15. If httpRequest’s cache mode is "default" and httpRequest’s header + // list contains `If-Modified-Since`, `If-None-Match`, + // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set + // httpRequest’s cache mode to "no-store". + if ( + httpRequest.cache === 'default' && + (httpRequest.headersList.contains('if-modified-since') || + httpRequest.headersList.contains('if-none-match') || + httpRequest.headersList.contains('if-unmodified-since') || + httpRequest.headersList.contains('if-match') || + httpRequest.headersList.contains('if-range')) + ) { + httpRequest.cache = 'no-store' + } - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } + // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent + // no-cache cache-control header modification flag is unset, and + // httpRequest’s header list does not contain `Cache-Control`, then append + // `Cache-Control`/`max-age=0` to httpRequest’s header list. + if ( + httpRequest.cache === 'no-cache' && + !httpRequest.preventNoCacheCacheControlHeaderModification && + !httpRequest.headersList.contains('cache-control') + ) { + httpRequest.headersList.append('cache-control', 'max-age=0') + } - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err + // 17. If httpRequest’s cache mode is "no-store" or "reload", then: + if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { + // 1. If httpRequest’s header list does not contain `Pragma`, then append + // `Pragma`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('pragma')) { + httpRequest.headersList.append('pragma', 'no-cache') } - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false - - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) + // 2. If httpRequest’s header list does not contain `Cache-Control`, + // then append `Cache-Control`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('cache-control')) { + httpRequest.headersList.append('cache-control', 'no-cache') } + } - addSignal(this, signal) + // 18. If httpRequest’s header list contains `Range`, then append + // `Accept-Encoding`/`identity` to httpRequest’s header list. + if (httpRequest.headersList.contains('range')) { + httpRequest.headersList.append('accept-encoding', 'identity') } - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() + // 19. Modify httpRequest’s header list per HTTP. Do not append a given + // header if httpRequest’s header list contains that header’s name. + // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 + if (!httpRequest.headersList.contains('accept-encoding')) { + if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { + httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate') + } else { + httpRequest.headersList.append('accept-encoding', 'gzip, deflate') } - - this.abort = abort - this.context = context } - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } + httpRequest.headersList.delete('host') - this.factory = null + // 20. If includeCredentials is true, then: + if (includeCredentials) { + // 1. If the user agent is not configured to block cookies for httpRequest + // (see section 7 of [COOKIES]), then: + // TODO: credentials + // 2. If httpRequest’s header list does not contain `Authorization`, then: + // TODO: credentials + } - let res + // 21. If there’s a proxy-authentication entry, use it as appropriate. + // TODO: proxy-authentication - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() + // 22. Set httpCache to the result of determining the HTTP cache + // partition, given httpRequest. + // TODO: cache - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } + // 23. If httpCache is null, then set httpRequest’s cache mode to + // "no-store". + if (httpCache == null) { + httpRequest.cache = 'no-store' + } - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) + // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", + // then: + if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') { + // TODO: cache + } - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } + // 9. If aborted, then return the appropriate network error for fetchParams. + // TODO - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this + // 10. If response is null, then: + if (response == null) { + // 1. If httpRequest’s cache mode is "only-if-cached", then return a + // network error. + if (httpRequest.mode === 'only-if-cached') { + return makeNetworkError('only if cached') + } - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } + // 2. Let forwardResponse be the result of running HTTP-network fetch + // given httpFetchParams, includeCredentials, and isNewConnectionFetch. + const forwardResponse = await httpNetworkFetch( + httpFetchParams, + includeCredentials, + isNewConnectionFetch + ) - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) + // 3. If httpRequest’s method is unsafe and forwardResponse’s status is + // in the range 200 to 399, inclusive, invalidate appropriate stored + // responses in httpCache, as per the "Invalidation" chapter of HTTP + // Caching, and set storedResponse to null. [HTTP-CACHING] + if ( + !safeMethodsSet.has(httpRequest.method) && + forwardResponse.status >= 200 && + forwardResponse.status <= 399 + ) { + // TODO: cache + } - if (err) { - abort() - } - }) + // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, + // then: + if (revalidatingFlag && forwardResponse.status === 304) { + // TODO: cache } - res.on('drain', resume) + // 5. If response is null, then: + if (response == null) { + // 1. Set response to forwardResponse. + response = forwardResponse - this.res = res + // 2. Store httpRequest and forwardResponse in httpCache, as per the + // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] + // TODO: cache + } + } - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState && res._writableState.needDrain + // 11. Set response’s URL list to a clone of httpRequest’s URL list. + response.urlList = [...httpRequest.urlList] - return needDrain !== true + // 12. If httpRequest’s header list contains `Range`, then set response’s + // range-requested flag. + if (httpRequest.headersList.contains('range')) { + response.rangeRequested = true } - onData (chunk) { - const { res } = this + // 13. Set response’s request-includes-credentials to includeCredentials. + response.requestIncludesCredentials = includeCredentials - return res ? res.write(chunk) : true - } + // 14. If response’s status is 401, httpRequest’s response tainting is not + // "cors", includeCredentials is true, and request’s window is an environment + // settings object, then: + // TODO - onComplete (trailers) { - const { res } = this + // 15. If response’s status is 407, then: + if (response.status === 407) { + // 1. If request’s window is "no-window", then return a network error. + if (request.window === 'no-window') { + return makeNetworkError() + } - removeSignal(this) + // 2. ??? - if (!res) { - return + // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) } - this.trailers = util.parseHeaders(trailers) + // 4. Prompt the end user as appropriate in request’s window and store + // the result as a proxy-authentication entry. [HTTP-AUTH] + // TODO: Invoke some kind of callback? - res.end() + // 5. Set response to the result of running HTTP-network-or-cache fetch given + // fetchParams. + // TODO + return makeNetworkError('proxy authentication required') } - onError (err) { - const { res, callback, opaque, body } = this + // 16. If all of the following are true + if ( + // response’s status is 421 + response.status === 421 && + // isNewConnectionFetch is false + !isNewConnectionFetch && + // request’s body is null, or request’s body is non-null and request’s body’s source is non-null + (request.body == null || request.body.source != null) + ) { + // then: - removeSignal(this) + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) + } - this.factory = null + // 2. Set response to the result of running HTTP-network-or-cache + // fetch given fetchParams, isAuthenticationFetch, and true. - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } + // TODO (spec): The spec doesn't specify this but we need to cancel + // the active response before we can start a new one. + // https://github.com/whatwg/fetch/issues/1293 + fetchParams.controller.connection.destroy() - if (body) { - this.body = null - util.destroy(body, err) - } + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true + ) } -} -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) + // 17. If isAuthenticationFetch is true, then create an authentication entry + if (isAuthenticationFetch) { + // TODO } - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err + // 18. Return response. + return response +} + +// https://fetch.spec.whatwg.org/#http-network-fetch +async function httpNetworkFetch ( + fetchParams, + includeCredentials = false, + forceNewConnection = false +) { + assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) + + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy (err) { + if (!this.destroyed) { + this.destroyed = true + this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) + } } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) } -} -module.exports = stream + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + // 2. Let response be null. + let response = null -/***/ }), + // 3. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo -/***/ 36923: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 4. Let httpCache be the result of determining the HTTP cache partition, + // given request. + // TODO: cache + const httpCache = null -"use strict"; + // 5. If httpCache is null, then set request’s cache mode to "no-store". + if (httpCache == null) { + request.cache = 'no-store' + } + // 6. Let networkPartitionKey be the result of determining the network + // partition key given request. + // TODO -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) -const { AsyncResource } = __nccwpck_require__(50852) -const util = __nccwpck_require__(83983) -const { addSignal, removeSignal } = __nccwpck_require__(7032) -const assert = __nccwpck_require__(39491) + // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise + // "no". + const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } + // 8. Switch on request’s mode: + if (request.mode === 'websocket') { + // Let connection be the result of obtaining a WebSocket connection, + // given request’s current URL. + // TODO + } else { + // Let connection be the result of obtaining a connection, given + // networkPartitionKey, request’s current URL’s origin, + // includeCredentials, and forceNewConnection. + // TODO + } - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } + // 9. Run these steps, but abort when the ongoing fetch is terminated: - const { signal, opaque, responseHeaders } = opts + // 1. If connection is failure, then return a network error. - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } + // 2. Set timingInfo’s final connection timing info to the result of + // calling clamp and coarsen connection timing info with connection’s + // timing info, timingInfo’s post-redirect start time, and fetchParams’s + // cross-origin isolated capability. - super('UNDICI_UPGRADE') + // 3. If connection is not an HTTP/2 connection, request’s body is non-null, + // and request’s body’s source is null, then append (`Transfer-Encoding`, + // `chunked`) to request’s header list. - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null + // 4. Set timingInfo’s final network-request start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated + // capability. - addSignal(this, signal) - } + // 5. Set response to the result of making an HTTP request over connection + // using request with the following caveats: - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } + // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] + // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - this.abort = abort - this.context = null - } + // - If request’s body is non-null, and request’s body’s source is null, + // then the user agent may have a buffer of up to 64 kibibytes and store + // a part of request’s body in that buffer. If the user agent reads from + // request’s body beyond that buffer’s size and the user agent needs to + // resend request, then instead return a network error. - onHeaders () { - throw new SocketError('bad upgrade', null) - } + // - Set timingInfo’s final network-response start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated capability, + // immediately after the user agent’s HTTP parser receives the first byte + // of the response (e.g., frame header bytes for HTTP/2 or response status + // line for HTTP/1.x). - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this + // - Wait until all the headers are transmitted. - assert.strictEqual(statusCode, 101) + // - Any responses whose status is in the range 100 to 199, inclusive, + // and is not 101, are to be ignored, except for the purposes of setting + // timingInfo’s final network-response start time above. - removeSignal(this) + // - If request’s header list contains `Transfer-Encoding`/`chunked` and + // response is transferred via HTTP/1.0 or older, then return a network + // error. - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } + // - If the HTTP request results in a TLS client certificate dialog, then: - onError (err) { - const { callback, opaque } = this + // 1. If request’s window is an environment settings object, make the + // dialog available in request’s window. - removeSignal(this) + // 2. Otherwise, return a network error. - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) + // To transmit request’s body body, run these steps: + let requestBody = null + // 1. If body is null and fetchParams’s process request end-of-body is + // non-null, then queue a fetch task given fetchParams’s process request + // end-of-body and fetchParams’s task destination. + if (request.body == null && fetchParams.processRequestEndOfBody) { + queueMicrotask(() => fetchParams.processRequestEndOfBody()) + } else if (request.body != null) { + // 2. Otherwise, if body is non-null: + + // 1. Let processBodyChunk given bytes be these steps: + const processBodyChunk = async function * (bytes) { + // 1. If the ongoing fetch is terminated, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. Run this step in parallel: transmit bytes. + yield bytes + + // 3. If fetchParams’s process request body is non-null, then run + // fetchParams’s process request body given bytes’s length. + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) } - } -} -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } + // 2. Let processEndOfBody be these steps: + const processEndOfBody = () => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err + // 2. If fetchParams’s process request end-of-body is non-null, + // then run fetchParams’s process request end-of-body. + if (fetchParams.processRequestEndOfBody) { + fetchParams.processRequestEndOfBody() + } } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) + + // 3. Let processBodyError given e be these steps: + const processBodyError = (e) => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. + if (e.name === 'AbortError') { + fetchParams.controller.abort() + } else { + fetchParams.controller.terminate(e) + } + } + + // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, + // processBodyError, and fetchParams’s task destination. + requestBody = (async function * () { + try { + for await (const bytes of request.body.stream) { + yield * processBodyChunk(bytes) + } + processEndOfBody() + } catch (err) { + processBodyError(err) + } + })() } -} - -module.exports = upgrade + try { + // socket is only provided for websockets + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) -/***/ }), + if (socket) { + response = makeResponse({ status, statusText, headersList, socket }) + } else { + const iterator = body[Symbol.asyncIterator]() + fetchParams.controller.next = () => iterator.next() -/***/ 44059: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + response = makeResponse({ status, statusText, headersList }) + } + } catch (err) { + // 10. If aborted, then: + if (err.name === 'AbortError') { + // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. + fetchParams.controller.connection.destroy() -"use strict"; + // 2. Return the appropriate network error for fetchParams. + return makeAppropriateNetworkError(fetchParams, err) + } + return makeNetworkError(err) + } -module.exports.request = __nccwpck_require__(55448) -module.exports.stream = __nccwpck_require__(75395) -module.exports.pipeline = __nccwpck_require__(28752) -module.exports.upgrade = __nccwpck_require__(36923) -module.exports.connect = __nccwpck_require__(29744) + // 11. Let pullAlgorithm be an action that resumes the ongoing fetch + // if it is suspended. + const pullAlgorithm = () => { + fetchParams.controller.resume() + } + // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s + // controller with reason, given reason. + const cancelAlgorithm = (reason) => { + fetchParams.controller.abort(reason) + } -/***/ }), + // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by + // the user agent. + // TODO -/***/ 73858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object + // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. + // TODO -"use strict"; -// Ported from https://github.com/nodejs/undici/pull/907 + // 15. Let stream be a new ReadableStream. + // 16. Set up stream with pullAlgorithm set to pullAlgorithm, + // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to + // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + const stream = new ReadableStream( + { + async start (controller) { + fetchParams.controller.controller = controller + }, + async pull (controller) { + await pullAlgorithm(controller) + }, + async cancel (reason) { + await cancelAlgorithm(reason) + } + }, + { + highWaterMark: 0, + size () { + return 1 + } + } + ) + // 17. Run these steps, but abort when the ongoing fetch is terminated: -const assert = __nccwpck_require__(39491) -const { Readable } = __nccwpck_require__(12781) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(83983) + // 1. Set response’s body to a new body whose stream is stream. + response.body = { stream } -let Blob + // 2. If response is not a network error and request’s cache mode is + // not "no-store", then update response in httpCache for request. + // TODO -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('abort') -const kContentType = Symbol('kContentType') + // 3. If includeCredentials is true and the user agent is not configured + // to block cookies for request (see section 7 of [COOKIES]), then run the + // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on + // the value of each header whose name is a byte-case-insensitive match for + // `Set-Cookie` in response’s header list, if any, and request’s current URL. + // TODO -const noop = () => {} + // 18. If aborted, then: + // TODO -module.exports = class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) + // 19. Run these steps in parallel: - this._readableState.dataEmitted = false + // 1. Run these steps, but abort when fetchParams is canceled: + fetchParams.controller.on('terminated', onAborted) + fetchParams.controller.resume = async () => { + // 1. While true + while (true) { + // 1-3. See onData... - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType + // 4. Set bytes to the result of handling content codings given + // codings and bytes. + let bytes + let isFailure + try { + const { done, value } = await fetchParams.controller.next() - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false - } + if (isAborted(fetchParams)) { + break + } - destroy (err) { - if (this.destroyed) { - // Node < 16 - return this - } + bytes = done ? undefined : value + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { + // zlib doesn't like empty streams. + bytes = undefined + } else { + bytes = err - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } + // err may be propagated from the result of calling readablestream.cancel, + // which might not be an error. https://github.com/nodejs/undici/issues/2009 + isFailure = true + } + } - if (err) { - this[kAbort]() - } + if (bytes === undefined) { + // 2. Otherwise, if the bytes transmission for response’s message + // body is done normally and stream is readable, then close + // stream, finalize response for fetchParams and response, and + // abort these in-parallel steps. + readableStreamClose(fetchParams.controller.controller) - return super.destroy(err) - } + finalizeResponse(fetchParams, response) - emit (ev, ...args) { - if (ev === 'data') { - // Node < 16.7 - this._readableState.dataEmitted = true - } else if (ev === 'error') { - // Node < 16 - this._readableState.errorEmitted = true - } - return super.emit(ev, ...args) - } + return + } - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true - } - return super.on(ev, ...args) - } + // 5. Increase timingInfo’s decoded body size by bytes’s length. + timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - addListener (ev, ...args) { - return this.on(ev, ...args) - } + // 6. If bytes is failure, then terminate fetchParams’s controller. + if (isFailure) { + fetchParams.controller.terminate(bytes) + return + } - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } + // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes + // into stream. + fetchParams.controller.controller.enqueue(new Uint8Array(bytes)) - removeListener (ev, ...args) { - return this.off(ev, ...args) - } + // 8. If stream is errored, then terminate the ongoing fetch. + if (isErrored(stream)) { + fetchParams.controller.terminate() + return + } - push (chunk) { - if (this[kConsume] && chunk !== null && this.readableLength === 0) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true + // 9. If stream doesn’t need more data ask the user agent to suspend + // the ongoing fetch. + if (!fetchParams.controller.controller.desiredSize) { + return + } } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') } - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } + // 2. If aborted, then: + function onAborted (reason) { + // 2. If fetchParams is aborted, then: + if (isAborted(fetchParams)) { + // 1. Set response’s aborted flag. + response.aborted = true - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) + // 2. If stream is readable, then error stream with the result of + // deserialize a serialized abort reason given fetchParams’s + // controller’s serialized abort reason and an + // implementation-defined realm. + if (isReadable(stream)) { + fetchParams.controller.controller.error( + fetchParams.controller.serializedAbortReason + ) + } + } else { + // 3. Otherwise, if stream is readable, error stream with a TypeError. + if (isReadable(stream)) { + fetchParams.controller.controller.error(new TypeError('terminated', { + cause: isErrorLike(reason) ? reason : undefined + })) } } - return this[kBody] + + // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. + // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. + fetchParams.controller.connection.destroy() } - dump (opts) { - let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 - const signal = opts && opts.signal + // 20. Return response. + return response - if (signal) { - try { - if (typeof signal !== 'object' || !('aborted' in signal)) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - util.throwIfAborted(signal) - } catch (err) { - return Promise.reject(err) - } - } + async function dispatch ({ body }) { + const url = requestCurrentURL(request) + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher - if (this.closed) { - return Promise.resolve(null) - } + return new Promise((resolve, reject) => agent.dispatch( + { + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === 'websocket' ? 'websocket' : undefined + }, + { + body: null, + abort: null, - return new Promise((resolve, reject) => { - const signalListenerCleanup = signal - ? util.addAbortListener(signal, () => { - this.destroy() - }) - : noop + onConnect (abort) { + // TODO (fix): Do we need connection here? + const { connection } = fetchParams.controller - this - .on('close', function () { - signalListenerCleanup() - if (signal && signal.aborted) { - reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) + if (connection.destroyed) { + abort(new DOMException('The operation was aborted.', 'AbortError')) } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() + fetchParams.controller.on('terminated', abort) + this.abort = connection.abort = abort } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} + }, -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} + onHeaders (status, headersList, resume, statusText) { + if (status < 200) { + return + } -async function consume (stream, type) { - if (isUnusable(stream)) { - throw new TypeError('unusable') - } + let codings = [] + let location = '' - assert(!stream[kConsume]) + const headers = new Headers() - return new Promise((resolve, reject) => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } + // For H2, the headers are a plain JS object + // We distinguish between them and iterate accordingly + if (Array.isArray(headersList)) { + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()) + } else if (key.toLowerCase() === 'location') { + location = val + } - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) + headers[kHeadersList].append(key, val) + } + } else { + const keys = Object.keys(headersList) + for (const key of keys) { + const val = headersList[key] + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse() + } else if (key.toLowerCase() === 'location') { + location = val + } - process.nextTick(consumeStart, stream[kConsume]) - }) -} + headers[kHeadersList].append(key, val) + } + } -function consumeStart (consume) { - if (consume.body === null) { - return - } + this.body = new Readable({ read: resume }) - const { _readableState: state } = consume.stream + const decoders = [] - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } + const willFollow = request.redirect === 'follow' && + location && + redirectStatusSet.has(status) - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding + if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { + for (const coding of codings) { + // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 + if (coding === 'x-gzip' || coding === 'gzip') { + decoders.push(zlib.createGunzip({ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })) + } else if (coding === 'deflate') { + decoders.push(zlib.createInflate()) + } else if (coding === 'br') { + decoders.push(zlib.createBrotliDecompress()) + } else { + decoders.length = 0 + break + } + } + } - consume.stream.resume() + resolve({ + status, + statusText, + headersList: headers[kHeadersList], + body: decoders.length + ? pipeline(this.body, ...decoders, () => { }) + : this.body.on('error', () => {}) + }) - while (consume.stream.read() != null) { - // Loop - } -} + return true + }, -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume + onData (chunk) { + if (fetchParams.controller.dump) { + return + } - try { - if (type === 'text') { - resolve(toUSVString(Buffer.concat(body))) - } else if (type === 'json') { - resolve(JSON.parse(Buffer.concat(body))) - } else if (type === 'arrayBuffer') { - const dst = new Uint8Array(length) + // 1. If one or more bytes have been transmitted from response’s + // message body, then: - let pos = 0 - for (const buf of body) { - dst.set(buf, pos) - pos += buf.byteLength - } + // 1. Let bytes be the transmitted bytes. + const bytes = chunk - resolve(dst.buffer) - } else if (type === 'blob') { - if (!Blob) { - Blob = (__nccwpck_require__(14300).Blob) - } - resolve(new Blob(body, { type: stream[kContentType] })) - } + // 2. Let codings be the result of extracting header list values + // given `Content-Encoding` and response’s header list. + // See pullAlgorithm. - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} + // 3. Increase timingInfo’s encoded body size by bytes’s length. + timingInfo.encodedBodySize += bytes.byteLength -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} + // 4. See pullAlgorithm... -function consumeFinish (consume, err) { - if (consume.body === null) { - return - } + return this.body.push(bytes) + }, - if (err) { - consume.reject(err) - } else { - consume.resolve() - } + onComplete () { + if (this.abort) { + fetchParams.controller.off('terminated', this.abort) + } - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} + fetchParams.controller.ended = true + this.body.push(null) + }, -/***/ }), + onError (error) { + if (this.abort) { + fetchParams.controller.off('terminated', this.abort) + } -/***/ 77474: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + this.body?.destroy(error) -const assert = __nccwpck_require__(39491) -const { - ResponseStatusCodeError -} = __nccwpck_require__(48045) -const { toUSVString } = __nccwpck_require__(83983) + fetchParams.controller.terminate(error) -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) + reject(error) + }, - let chunks = [] - let limit = 0 + onUpgrade (status, headersList, socket) { + if (status !== 101) { + return + } - for await (const chunk of body) { - chunks.push(chunk) - limit += chunk.length - if (limit > 128 * 1024) { - chunks = null - break - } - } + const headers = new Headers() - if (statusCode === 204 || !contentType || !chunks) { - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) - return - } + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') - try { - if (contentType.startsWith('application/json')) { - const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return - } + headers[kHeadersList].append(key, val) + } - if (contentType.startsWith('text/')) { - const payload = toUSVString(Buffer.concat(chunks)) - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return - } - } catch (err) { - // Process in a fallback if error - } + resolve({ + status, + statusText: STATUS_CODES[status], + headersList: headers[kHeadersList], + socket + }) - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) + return true + } + } + )) + } } -module.exports = { getResolveErrorBodyCallback } +module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming +} /***/ }), -/***/ 37931: +/***/ 48359: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +/* globals AbortController */ + +const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(41472) +const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(10554) +const { FinalizationRegistry } = __nccwpck_require__(56436)() +const util = __nccwpck_require__(83983) const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(48045) + isValidHTTPToken, + sameOrigin, + normalizeMethod, + makePolicyContainer, + normalizeMethodRecord +} = __nccwpck_require__(52538) const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(73198) -const Pool = __nccwpck_require__(4634) -const { kUrl, kInterceptors } = __nccwpck_require__(72785) -const { parseOrigin } = __nccwpck_require__(83983) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -function getGreatestCommonDivisor (a, b) { - if (b === 0) return a - return getGreatestCommonDivisor(b, a % b) -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex +} = __nccwpck_require__(41037) +const { kEnumerableProperty } = util +const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(15861) +const { webidl } = __nccwpck_require__(21744) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { URLSerializer } = __nccwpck_require__(685) +const { kHeadersList, kConstruct } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(82361) -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() +let TransformStream = globalThis.TransformStream - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 +const kAbortController = Symbol('abortController') - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 +const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener('abort', abort) +}) - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] +// https://fetch.spec.whatwg.org/#request-class +class Request { + // https://fetch.spec.whatwg.org/#dom-request + constructor (input, init = {}) { + if (input === kConstruct) { + return } - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) - this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory + input = webidl.converters.RequestInfo(input) + init = webidl.converters.RequestInit(init) - for (const upstream of upstreams) { - this.addUpstream(upstream) + // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object + this[kRealm] = { + settingsObject: { + baseUrl: getGlobalOrigin(), + get origin () { + return this.baseUrl?.origin + }, + policyContainer: makePolicyContainer() + } } - this._updateBalancedPoolStats() - } - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin + // 1. Let request be null. + let request = null - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) + // 2. Let fallbackMode be null. + let fallbackMode = null - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) + // 3. Let baseURL be this’s relevant settings object’s API base URL. + const baseUrl = this[kRealm].settingsObject.baseUrl - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - }) + // 4. Let signal be null. + let signal = null - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() + // 5. If input is a string, then: + if (typeof input === 'string') { + // 1. Let parsedURL be the result of parsing input with baseURL. + // 2. If parsedURL is failure, then throw a TypeError. + let parsedURL + try { + parsedURL = new URL(input, baseUrl) + } catch (err) { + throw new TypeError('Failed to parse URL from ' + input, { cause: err }) } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - this._updateBalancedPoolStats() + // 3. If parsedURL includes credentials, then throw a TypeError. + if (parsedURL.username || parsedURL.password) { + throw new TypeError( + 'Request cannot be constructed from a URL that includes credentials: ' + + input + ) + } - return this - } + // 4. Set request to a new request whose URL is parsedURL. + request = makeRequest({ urlList: [parsedURL] }) - _updateBalancedPoolStats () { - this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0) - } + // 5. Set fallbackMode to "cors". + fallbackMode = 'cors' + } else { + // 6. Otherwise: - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin + // 7. Assert: input is a Request object. + assert(input instanceof Request) - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) + // 8. Set request to input’s request. + request = input[kState] - if (pool) { - this[kRemoveClient](pool) + // 9. Set signal to input’s signal. + signal = input[kSignal] } - return this - } + // 7. Let origin be this’s relevant settings object’s origin. + const origin = this[kRealm].settingsObject.origin - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } + // 8. Let window be "client". + let window = 'client' - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() + // 9. If request’s window is an environment settings object and its origin + // is same origin with origin, then set window to request’s window. + if ( + request.window?.constructor?.name === 'EnvironmentSettingsObject' && + sameOrigin(request.window, origin) + ) { + window = request.window } - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return + // 10. If init["window"] exists and is non-null, then throw a TypeError. + if (init.window != null) { + throw new TypeError(`'window' option '${window}' must be null`) } - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return + // 11. If init["window"] exists, then set window to "no-window". + if ('window' in init) { + window = 'no-window' } - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) + // 12. Set request to a new request with the following properties: + request = makeRequest({ + // URL request’s URL. + // undici implementation note: this is set as the first item in request's urlList in makeRequest + // method request’s method. + method: request.method, + // header list A copy of request’s header list. + // undici implementation note: headersList is cloned in makeRequest + headersList: request.headersList, + // unsafe-request flag Set. + unsafeRequest: request.unsafeRequest, + // client This’s relevant settings object. + client: this[kRealm].settingsObject, + // window window. + window, + // priority request’s priority. + priority: request.priority, + // origin request’s origin. The propagation of the origin is only significant for navigation requests + // being handled by a service worker. In this scenario a request can have an origin that is different + // from the current client. + origin: request.origin, + // referrer request’s referrer. + referrer: request.referrer, + // referrer policy request’s referrer policy. + referrerPolicy: request.referrerPolicy, + // mode request’s mode. + mode: request.mode, + // credentials mode request’s credentials mode. + credentials: request.credentials, + // cache mode request’s cache mode. + cache: request.cache, + // redirect mode request’s redirect mode. + redirect: request.redirect, + // integrity metadata request’s integrity metadata. + integrity: request.integrity, + // keepalive request’s keepalive. + keepalive: request.keepalive, + // reload-navigation flag request’s reload-navigation flag. + reloadNavigation: request.reloadNavigation, + // history-navigation flag request’s history-navigation flag. + historyNavigation: request.historyNavigation, + // URL list A clone of request’s URL list. + urlList: [...request.urlList] + }) - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] + const initHasKey = Object.keys(init).length !== 0 - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] + // 13. If init is not empty, then: + if (initHasKey) { + // 1. If request’s mode is "navigate", then set it to "same-origin". + if (request.mode === 'navigate') { + request.mode = 'same-origin' } - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] + // 2. Unset request’s reload-navigation flag. + request.reloadNavigation = false - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } + // 3. Unset request’s history-navigation flag. + request.historyNavigation = false - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} + // 4. Set request’s origin to "client". + request.origin = 'client' -module.exports = BalancedPool + // 5. Set request’s referrer to "client" + request.referrer = 'client' + // 6. Set request’s referrer policy to the empty string. + request.referrerPolicy = '' -/***/ }), + // 7. Set request’s URL to request’s current URL. + request.url = request.urlList[request.urlList.length - 1] -/***/ 66101: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 8. Set request’s URL list to « request’s URL ». + request.urlList = [request.url] + } -"use strict"; + // 14. If init["referrer"] exists, then: + if (init.referrer !== undefined) { + // 1. Let referrer be init["referrer"]. + const referrer = init.referrer + // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". + if (referrer === '') { + request.referrer = 'no-referrer' + } else { + // 1. Let parsedReferrer be the result of parsing referrer with + // baseURL. + // 2. If parsedReferrer is failure, then throw a TypeError. + let parsedReferrer + try { + parsedReferrer = new URL(referrer, baseUrl) + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) + } -const { kConstruct } = __nccwpck_require__(29174) -const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(82396) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(83983) -const { kHeadersList } = __nccwpck_require__(72785) -const { webidl } = __nccwpck_require__(21744) -const { Response, cloneResponse } = __nccwpck_require__(27823) -const { Request } = __nccwpck_require__(48359) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) -const { fetching } = __nccwpck_require__(74881) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(52538) -const assert = __nccwpck_require__(39491) -const { getGlobalDispatcher } = __nccwpck_require__(21892) + // 3. If one of the following is true + // - parsedReferrer’s scheme is "about" and path is the string "client" + // - parsedReferrer’s origin is not same origin with origin + // then set request’s referrer to "client". + if ( + (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || + (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) + ) { + request.referrer = 'client' + } else { + // 4. Otherwise, set request’s referrer to parsedReferrer. + request.referrer = parsedReferrer + } + } + } -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ + // 15. If init["referrerPolicy"] exists, then set request’s referrer policy + // to it. + if (init.referrerPolicy !== undefined) { + request.referrerPolicy = init.referrerPolicy + } + + // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. + let mode + if (init.mode !== undefined) { + mode = init.mode + } else { + mode = fallbackMode + } -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList - */ + // 17. If mode is "navigate", then throw a TypeError. + if (mode === 'navigate') { + throw webidl.errors.exception({ + header: 'Request constructor', + message: 'invalid request mode navigate.' + }) + } -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList + // 18. If mode is non-null, set request’s mode to mode. + if (mode != null) { + request.mode = mode + } - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() + // 19. If init["credentials"] exists, then set request’s credentials mode + // to it. + if (init.credentials !== undefined) { + request.credentials = init.credentials } - this.#relevantRequestResponseList = arguments[1] - } + // 18. If init["cache"] exists, then set request’s cache mode to it. + if (init.cache !== undefined) { + request.cache = init.cache + } - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) + // 21. If request’s cache mode is "only-if-cached" and request’s mode is + // not "same-origin", then throw a TypeError. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { + throw new TypeError( + "'only-if-cached' can be set only with 'same-origin' mode" + ) + } - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) + // 22. If init["redirect"] exists, then set request’s redirect mode to it. + if (init.redirect !== undefined) { + request.redirect = init.redirect + } - const p = await this.matchAll(request, options) + // 23. If init["integrity"] exists, then set request’s integrity metadata to it. + if (init.integrity != null) { + request.integrity = String(init.integrity) + } - if (p.length === 0) { - return + // 24. If init["keepalive"] exists, then set request’s keepalive to it. + if (init.keepalive !== undefined) { + request.keepalive = Boolean(init.keepalive) } - return p[0] - } + // 25. If init["method"] exists, then: + if (init.method !== undefined) { + // 1. Let method be init["method"]. + let method = init.method - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) + // 2. If method is not a method or method is a forbidden method, then + // throw a TypeError. + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`) + } - if (request !== undefined) request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) + if (forbiddenMethodsSet.has(method.toUpperCase())) { + throw new TypeError(`'${method}' HTTP method is unsupported.`) + } - // 1. - let r = null + // 3. Normalize method. + method = normalizeMethodRecord[method] ?? normalizeMethod(method) - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] + // 4. Set request’s method to method. + request.method = method + } - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } + // 26. If init["signal"] exists, then set signal to it. + if (init.signal !== undefined) { + signal = init.signal } - // 5. - // 5.1 - const responses = [] + // 27. Set this’s request to request. + this[kState] = request - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) + // 28. Set this’s signal to a new AbortSignal object with this’s relevant + // Realm. + // TODO: could this be simplified with AbortSignal.any + // (https://dom.spec.whatwg.org/#dom-abortsignal-any) + const ac = new AbortController() + this[kSignal] = ac.signal + this[kSignal][kRealm] = this[kRealm] - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) + // 29. If signal is not null, then make this’s signal follow signal. + if (signal != null) { + if ( + !signal || + typeof signal.aborted !== 'boolean' || + typeof signal.addEventListener !== 'function' + ) { + throw new TypeError( + "Failed to construct 'Request': member signal is not of type AbortSignal." + ) } - } - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! + if (signal.aborted) { + ac.abort(signal.reason) + } else { + // Keep a strong ref to ac while request object + // is alive. This is needed to prevent AbortController + // from being prematurely garbage collected. + // See, https://github.com/nodejs/undici/issues/1926. + this[kAbortController] = ac - // 5.5.1 - const responseList = [] + const acRef = new WeakRef(ac) + const abort = function () { + const ac = acRef.deref() + if (ac !== undefined) { + ac.abort(this.reason) + } + } - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = new Response(response.body?.source ?? null) - const body = responseObject[kState].body - responseObject[kState] = response - responseObject[kState].body = body - responseObject[kHeaders][kHeadersList] = response.headersList - responseObject[kHeaders][kGuard] = 'immutable' + // Third-party AbortControllers may not work with these. + // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. + try { + // If the max amount of listeners is equal to the default, increase it + // This is only available in node >= v19.9.0 + if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(100, signal) + } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { + setMaxListeners(100, signal) + } + } catch {} - responseList.push(responseObject) + util.addAbortListener(signal, abort) + requestFinalizer.register(ac, { signal, abort }) + } } - // 6. - return Object.freeze(responseList) - } + // 30. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is request’s header list and guard is + // "request". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kHeadersList] = request.headersList + this[kHeaders][kGuard] = 'request' + this[kHeaders][kRealm] = this[kRealm] - async add (request) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) + // 31. If this’s request’s mode is "no-cors", then: + if (mode === 'no-cors') { + // 1. If this’s request’s method is not a CORS-safelisted method, + // then throw a TypeError. + if (!corsSafeListedMethodsSet.has(request.method)) { + throw new TypeError( + `'${request.method} is unsupported in no-cors mode.` + ) + } - request = webidl.converters.RequestInfo(request) + // 2. Set this’s headers’s guard to "request-no-cors". + this[kHeaders][kGuard] = 'request-no-cors' + } - // 1. - const requests = [request] + // 32. If init is not empty, then: + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = this[kHeaders][kHeadersList] + // 1. Let headers be a copy of this’s headers and its associated header + // list. + // 2. If init["headers"] exists, then set headers to init["headers"]. + const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - // 2. - const responseArrayPromise = this.addAll(requests) + // 3. Empty this’s headers’s header list. + headersList.clear() - // 3. - return await responseArrayPromise - } + // 4. If headers is a Headers object, then for each header in its header + // list, append header’s name/header’s value to this’s headers. + if (headers instanceof HeadersList) { + for (const [key, val] of headers) { + headersList.append(key, val) + } + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies + } else { + // 5. Otherwise, fill this’s headers with headers. + fillHeaders(this[kHeaders], headers) + } + } - async addAll (requests) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) + // 33. Let inputBody be input’s request’s body if input is a Request + // object; otherwise null. + const inputBody = input instanceof Request ? input[kState].body : null - requests = webidl.converters['sequence'](requests) + // 34. If either init["body"] exists and is non-null or inputBody is + // non-null, and request’s method is `GET` or `HEAD`, then throw a + // TypeError. + if ( + (init.body != null || inputBody != null) && + (request.method === 'GET' || request.method === 'HEAD') + ) { + throw new TypeError('Request with GET/HEAD method cannot have body.') + } - // 1. - const responsePromises = [] + // 35. Let initBody be null. + let initBody = null - // 2. - const requestList = [] + // 36. If init["body"] exists and is non-null, then: + if (init.body != null) { + // 1. Let Content-Type be null. + // 2. Set initBody and Content-Type to the result of extracting + // init["body"], with keepalive set to request’s keepalive. + const [extractedBody, contentType] = extractBody( + init.body, + request.keepalive + ) + initBody = extractedBody - // 3. - for (const request of requests) { - if (typeof request === 'string') { - continue + // 3, If Content-Type is non-null and this’s headers’s header list does + // not contain `Content-Type`, then append `Content-Type`/Content-Type to + // this’s headers. + if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) { + this[kHeaders].append('content-type', contentType) } + } - // 3.1 - const r = request[kState] + // 37. Let inputOrInitBody be initBody if it is non-null; otherwise + // inputBody. + const inputOrInitBody = initBody ?? inputBody - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Expected http/s scheme when method is not GET.' - }) + // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is + // null, then: + if (inputOrInitBody != null && inputOrInitBody.source == null) { + // 1. If initBody is non-null and init["duplex"] does not exist, + // then throw a TypeError. + if (initBody != null && init.duplex == null) { + throw new TypeError('RequestInit: duplex option is required when sending a body.') + } + + // 2. If this’s request’s mode is neither "same-origin" nor "cors", + // then throw a TypeError. + if (request.mode !== 'same-origin' && request.mode !== 'cors') { + throw new TypeError( + 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' + ) } + + // 3. Set this’s request’s use-CORS-preflight flag. + request.useCORSPreflightFlag = true } - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] + // 39. Let finalBody be inputOrInitBody. + let finalBody = inputOrInitBody - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] + // 40. If initBody is null and inputBody is non-null, then: + if (initBody == null && inputBody != null) { + // 1. If input is unusable, then throw a TypeError. + if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { + throw new TypeError( + 'Cannot construct a Request with a Request object that has already been used.' + ) + } - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Expected http/s scheme.' - }) + // 2. Set finalBody to the result of creating a proxy for inputBody. + if (!TransformStream) { + TransformStream = (__nccwpck_require__(35356).TransformStream) } - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' + // https://streams.spec.whatwg.org/#readablestream-create-a-proxy + const identityTransform = new TransformStream() + inputBody.stream.pipeThrough(identityTransform) + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + } + } - // 5.5 - requestList.push(r) + // 41. Set this’s request’s body to finalBody. + this[kState].body = finalBody + } - // 5.6 - const responsePromise = createDeferredPromise() + // Returns request’s HTTP method, which is "GET" by default. + get method () { + webidl.brandCheck(this, Request) - // 5.7 - fetchControllers.push(fetching({ - request: r, - dispatcher: getGlobalDispatcher(), - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) + // The method getter steps are to return this’s request’s method. + return this[kState].method + } - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) + // Returns the URL of request as a string. + get url () { + webidl.brandCheck(this, Request) - for (const controller of fetchControllers) { - controller.abort() - } + // The url getter steps are to return this’s request’s URL, serialized. + return URLSerializer(this[kState].url) + } - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } + // Returns a Headers object consisting of the headers associated with request. + // Note that headers added in the network layer by the user agent will not + // be accounted for in this object, e.g., the "Host" header. + get headers () { + webidl.brandCheck(this, Request) - // 2. - responsePromise.resolve(response) - } - })) + // The headers getter steps are to return this’s headers. + return this[kHeaders] + } - // 5.8 - responsePromises.push(responsePromise.promise) - } + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination () { + webidl.brandCheck(this, Request) - // 6. - const p = Promise.all(responsePromises) + // The destination getter are to return this’s request’s destination. + return this[kState].destination + } - // 7. - const responses = await p + // Returns the referrer of request. Its value can be a same-origin URL if + // explicitly set in init, the empty string to indicate no referrer, and + // "about:client" when defaulting to the global’s default. This is used + // during fetching to determine the value of the `Referer` header of the + // request being made. + get referrer () { + webidl.brandCheck(this, Request) - // 7.1 - const operations = [] + // 1. If this’s request’s referrer is "no-referrer", then return the + // empty string. + if (this[kState].referrer === 'no-referrer') { + return '' + } - // 7.2 - let index = 0 + // 2. If this’s request’s referrer is "client", then return + // "about:client". + if (this[kState].referrer === 'client') { + return 'about:client' + } - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } + // Return this’s request’s referrer, serialized. + return this[kState].referrer.toString() + } - operations.push(operation) // 7.3.5 + // Returns the referrer policy associated with request. + // This is used during fetching to compute the value of the request’s + // referrer. + get referrerPolicy () { + webidl.brandCheck(this, Request) - index++ // 7.3.6 - } + // The referrerPolicy getter steps are to return this’s request’s referrer policy. + return this[kState].referrerPolicy + } - // 7.5 - const cacheJobPromise = createDeferredPromise() + // Returns the mode associated with request, which is a string indicating + // whether the request will use CORS, or will be restricted to same-origin + // URLs. + get mode () { + webidl.brandCheck(this, Request) - // 7.6.1 - let errorData = null + // The mode getter steps are to return this’s request’s mode. + return this[kState].mode + } - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } + // Returns the credentials mode associated with request, + // which is a string indicating whether credentials will be sent with the + // request always, never, or only when sent to a same-origin URL. + get credentials () { + // The credentials getter steps are to return this’s request’s credentials mode. + return this[kState].credentials + } - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) + // Returns the cache mode associated with request, + // which is a string indicating how the request will + // interact with the browser’s cache when fetching. + get cache () { + webidl.brandCheck(this, Request) - // 7.7 - return cacheJobPromise.promise + // The cache getter steps are to return this’s request’s cache mode. + return this[kState].cache } - async put (request, response) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) + // Returns the redirect mode associated with request, + // which is a string indicating how redirects for the + // request will be handled during fetching. A request + // will follow redirects by default. + get redirect () { + webidl.brandCheck(this, Request) - request = webidl.converters.RequestInfo(request) - response = webidl.converters.Response(response) + // The redirect getter steps are to return this’s request’s redirect mode. + return this[kState].redirect + } - // 1. - let innerRequest = null + // Returns request’s subresource integrity metadata, which is a + // cryptographic hash of the resource being fetched. Its value + // consists of multiple hashes separated by whitespace. [SRI] + get integrity () { + webidl.brandCheck(this, Request) - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } + // The integrity getter steps are to return this’s request’s integrity + // metadata. + return this[kState].integrity + } - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Expected an http/s scheme when method is not GET' - }) - } + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive () { + webidl.brandCheck(this, Request) - // 5. - const innerResponse = response[kState] + // The keepalive getter steps are to return this’s request’s keepalive. + return this[kState].keepalive + } - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Got 206 status' - }) - } + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation () { + webidl.brandCheck(this, Request) - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) + // The isReloadNavigation getter steps are to return true if this’s + // request’s reload-navigation flag is set; otherwise false. + return this[kState].reloadNavigation + } - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Got * vary field value' - }) - } - } - } + // Returns a boolean indicating whether or not request is for a history + // navigation (a.k.a. back-foward navigation). + get isHistoryNavigation () { + webidl.brandCheck(this, Request) - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Response body is locked or disturbed' - }) - } + // The isHistoryNavigation getter steps are to return true if this’s request’s + // history-navigation flag is set; otherwise false. + return this[kState].historyNavigation + } - // 9. - const clonedResponse = cloneResponse(innerResponse) + // Returns the signal associated with request, which is an AbortSignal + // object indicating whether or not request has been aborted, and its + // abort event handler. + get signal () { + webidl.brandCheck(this, Request) - // 10. - const bodyReadPromise = createDeferredPromise() + // The signal getter steps are to return this’s signal. + return this[kSignal] + } - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream + get body () { + webidl.brandCheck(this, Request) - // 11.2 - const reader = stream.getReader() + return this[kState].body ? this[kState].body.stream : null + } - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } + get bodyUsed () { + webidl.brandCheck(this, Request) - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } + get duplex () { + webidl.brandCheck(this, Request) - // 17. - operations.push(operation) + return 'half' + } - // 19. - const bytes = await bodyReadPromise.promise + // Returns a clone of request. + clone () { + webidl.brandCheck(this, Request) - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || this.body?.locked) { + throw new TypeError('unusable') } - // 19.1 - const cacheJobPromise = createDeferredPromise() + // 2. Let clonedRequest be the result of cloning this’s request. + const clonedRequest = cloneRequest(this[kState]) - // 19.2.1 - let errorData = null + // 3. Let clonedRequestObject be the result of creating a Request object, + // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. + const clonedRequestObject = new Request(kConstruct) + clonedRequestObject[kState] = clonedRequest + clonedRequestObject[kRealm] = this[kRealm] + clonedRequestObject[kHeaders] = new Headers(kConstruct) + clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList + clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e + // 4. Make clonedRequestObject’s signal follow this’s signal. + const ac = new AbortController() + if (this.signal.aborted) { + ac.abort(this.signal.reason) + } else { + util.addAbortListener( + this.signal, + () => { + ac.abort(this.signal.reason) + } + ) } + clonedRequestObject[kSignal] = ac.signal - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise + // 4. Return clonedRequestObject. + return clonedRequestObject } +} - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) - - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) +mixinBody(Request) - /** - * @type {Request} - */ - let r = null +function makeRequest (init) { + // https://fetch.spec.whatwg.org/#requests + const request = { + method: 'GET', + localURLsOnly: false, + unsafeRequest: false, + body: null, + client: null, + reservedClient: null, + replacesClientId: '', + window: 'client', + keepalive: false, + serviceWorkers: 'all', + initiator: '', + destination: '', + priority: null, + origin: 'client', + policyContainer: 'client', + referrer: 'client', + referrerPolicy: '', + mode: 'no-cors', + useCORSPreflightFlag: false, + credentials: 'same-origin', + useCredentials: false, + cache: 'default', + redirect: 'follow', + integrity: '', + cryptoGraphicsNonceMetadata: '', + parserMetadata: '', + reloadNavigation: false, + historyNavigation: false, + userActivation: false, + taintedOrigin: false, + redirectCount: 0, + responseTainting: 'basic', + preventNoCacheCacheControlHeaderModification: false, + done: false, + timingAllowFailed: false, + ...init, + headersList: init.headersList + ? new HeadersList(init.headersList) + : new HeadersList() + } + request.url = request.urlList[0] + return request +} - if (request instanceof Request) { - r = request[kState] +// https://fetch.spec.whatwg.org/#concept-request-clone +function cloneRequest (request) { + // To clone a request request, run these steps: - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') + // 1. Let newRequest be a copy of request, except for its body. + const newRequest = makeRequest({ ...request, body: null }) - r = new Request(request)[kState] - } + // 2. If request’s body is non-null, set newRequest’s body to the + // result of cloning request’s body. + if (request.body != null) { + newRequest.body = cloneBody(request.body) + } - /** @type {CacheBatchOperation[]} */ - const operations = [] + // 3. Return newRequest. + return newRequest +} - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } +Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Request', + configurable: true + } +}) - operations.push(operation) +webidl.converters.Request = webidl.interfaceConverter( + Request +) - const cacheJobPromise = createDeferredPromise() +// https://fetch.spec.whatwg.org/#requestinfo +webidl.converters.RequestInfo = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) + } - let errorData = null - let requestResponses + if (V instanceof Request) { + return webidl.converters.Request(V) + } - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e - } + return webidl.converters.USVString(V) +} - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) +webidl.converters.AbortSignal = webidl.interfaceConverter( + AbortSignal +) - return cacheJobPromise.promise +// https://fetch.spec.whatwg.org/#requestinit +webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: 'method', + converter: webidl.converters.ByteString + }, + { + key: 'headers', + converter: webidl.converters.HeadersInit + }, + { + key: 'body', + converter: webidl.nullableConverter( + webidl.converters.BodyInit + ) + }, + { + key: 'referrer', + converter: webidl.converters.USVString + }, + { + key: 'referrerPolicy', + converter: webidl.converters.DOMString, + // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy + allowedValues: referrerPolicy + }, + { + key: 'mode', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#concept-request-mode + allowedValues: requestMode + }, + { + key: 'credentials', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcredentials + allowedValues: requestCredentials + }, + { + key: 'cache', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcache + allowedValues: requestCache + }, + { + key: 'redirect', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestredirect + allowedValues: requestRedirect + }, + { + key: 'integrity', + converter: webidl.converters.DOMString + }, + { + key: 'keepalive', + converter: webidl.converters.boolean + }, + { + key: 'signal', + converter: webidl.nullableConverter( + (signal) => webidl.converters.AbortSignal( + signal, + { strict: false } + ) + ) + }, + { + key: 'window', + converter: webidl.converters.any + }, + { + key: 'duplex', + converter: webidl.converters.DOMString, + allowedValues: requestDuplex } +]) - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {readonly Request[]} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) +module.exports = { Request, makeRequest } - if (request !== undefined) request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) - // 1. - let r = null +/***/ }), - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] +/***/ 27823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } +"use strict"; - // 4. - const promise = createDeferredPromise() - // 5. - // 5.1 - const requests = [] +const { Headers, HeadersList, fill } = __nccwpck_require__(10554) +const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(41472) +const util = __nccwpck_require__(83983) +const { kEnumerableProperty } = util +const { + isValidReasonPhrase, + isCancelled, + isAborted, + isBlobLike, + serializeJavascriptValueToJSONString, + isErrorLike, + isomorphicEncode +} = __nccwpck_require__(52538) +const { + redirectStatusSet, + nullBodyStatus, + DOMException +} = __nccwpck_require__(41037) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) +const { webidl } = __nccwpck_require__(21744) +const { FormData } = __nccwpck_require__(72015) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { URLSerializer } = __nccwpck_require__(685) +const { kHeadersList, kConstruct } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { types } = __nccwpck_require__(73837) - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) +const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(35356).ReadableStream) +const textEncoder = new TextEncoder('utf-8') + +// https://fetch.spec.whatwg.org/#response-class +class Response { + // Creates network error Response. + static error () { + // TODO + const relevantRealm = { settingsObject: {} } + + // The static error() method steps are to return the result of creating a + // Response object, given a new network error, "immutable", and this’s + // relevant Realm. + const responseObject = new Response() + responseObject[kState] = makeNetworkError() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + return responseObject + } - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } + // https://fetch.spec.whatwg.org/#dom-response-json + static json (data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) + + if (init !== null) { + init = webidl.converters.ResponseInit(init) } - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] + // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. + const bytes = textEncoder.encode( + serializeJavascriptValueToJSONString(data) + ) - // 5.4.2 - for (const request of requests) { - const requestObject = new Request('https://a') - requestObject[kState] = request - requestObject[kHeaders][kHeadersList] = request.headersList - requestObject[kHeaders][kGuard] = 'immutable' - requestObject[kRealm] = request.client + // 2. Let body be the result of extracting bytes. + const body = extractBody(bytes) - // 5.4.2.1 - requestList.push(requestObject) - } + // 3. Let responseObject be the result of creating a Response object, given a new response, + // "response", and this’s relevant Realm. + const relevantRealm = { settingsObject: {} } + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'response' + responseObject[kHeaders][kRealm] = relevantRealm - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) + // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). + initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - return promise.promise + // 5. Return responseObject. + return responseObject } - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList - - // 2. - const backupCache = [...cache] + // Creates a redirect Response that redirects to url with status status. + static redirect (url, status = 302) { + const relevantRealm = { settingsObject: {} } - // 3. - const addedItems = [] + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) - // 4.1 - const resultList = [] + url = webidl.converters.USVString(url) + status = webidl.converters['unsigned short'](status) + // 1. Let parsedURL be the result of parsing url with current settings + // object’s API base URL. + // 2. If parsedURL is failure, then throw a TypeError. + // TODO: base-URL? + let parsedURL try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } + parsedURL = new URL(url, getGlobalOrigin()) + } catch (err) { + throw Object.assign(new TypeError('Failed to parse URL from ' + url), { + cause: err + }) + } - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } + // 3. If status is not a redirect status, then throw a RangeError. + if (!redirectStatusSet.has(status)) { + throw new RangeError('Invalid status code ' + status) + } - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } + // 4. Let responseObject be the result of creating a Response object, + // given a new response, "immutable", and this’s relevant Realm. + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm - // 4.2.4 - let requestResponses + // 5. Set responseObject’s response’s status to status. + responseObject[kState].status = status - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) + // 6. Let value be parsedURL, serialized and isomorphic encoded. + const value = isomorphicEncode(URLSerializer(parsedURL)) - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } + // 7. Append `Location`/value to responseObject’s response’s header list. + responseObject[kState].headersList.append('location', value) - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) + // 8. Return responseObject. + return responseObject + } - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } + // https://fetch.spec.whatwg.org/#dom-response + constructor (body = null, init = {}) { + if (body !== null) { + body = webidl.converters.BodyInit(body) + } - // 4.2.6.2 - const r = operation.request + init = webidl.converters.ResponseInit(init) - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } + // TODO + this[kRealm] = { settingsObject: {} } - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } + // 1. Set this’s response to a new response. + this[kState] = makeResponse({}) - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } + // 2. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is this’s response’s header list and guard + // is "response". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kGuard] = 'response' + this[kHeaders][kHeadersList] = this[kState].headersList + this[kHeaders][kRealm] = this[kRealm] - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) + // 3. Let bodyWithType be null. + let bodyWithType = null - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) + // 4. If body is non-null, then set bodyWithType to the result of extracting body. + if (body != null) { + const [extractedBody, type] = extractBody(body) + bodyWithType = { body: extractedBody, type } + } - // 4.2.6.7.1 - cache.splice(idx, 1) - } + // 5. Perform initialize a response given this, init, and bodyWithType. + initializeResponse(this, init, bodyWithType) + } - // 4.2.6.8 - cache.push([operation.request, operation.response]) + // Returns response’s type, e.g., "cors". + get type () { + webidl.brandCheck(this, Response) - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) - } + // The type getter steps are to return this’s response’s type. + return this[kState].type + } - // 4.2.7 - resultList.push([operation.request, operation.response]) - } + // Returns response’s URL, if it has one; otherwise the empty string. + get url () { + webidl.brandCheck(this, Response) - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 + const urlList = this[kState].urlList - // 5.2 - this.#relevantRequestResponseList = backupCache + // The url getter steps are to return the empty string if this’s + // response’s URL is null; otherwise this’s response’s URL, + // serialized with exclude fragment set to true. + const url = urlList[urlList.length - 1] ?? null - // 5.3 - throw e + if (url === null) { + return '' } + + return URLSerializer(url, true) } - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] + // Returns whether response was obtained through a redirect. + get redirected () { + webidl.brandCheck(this, Response) - const storage = targetStorage ?? this.#relevantRequestResponseList + // The redirected getter steps are to return true if this’s response’s URL + // list has more than one item; otherwise false. + return this[kState].urlList.length > 1 + } - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } + // Returns response’s status. + get status () { + webidl.brandCheck(this, Response) - return resultList + // The status getter steps are to return this’s response’s status. + return this[kState].status } - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } + // Returns whether response’s status is an ok status. + get ok () { + webidl.brandCheck(this, Response) - const queryURL = new URL(requestQuery.url) + // The ok getter steps are to return true if this’s response’s status is an + // ok status; otherwise false. + return this[kState].status >= 200 && this[kState].status <= 299 + } - const cachedURL = new URL(request.url) + // Returns response’s status message. + get statusText () { + webidl.brandCheck(this, Response) - if (options?.ignoreSearch) { - cachedURL.search = '' + // The statusText getter steps are to return this’s response’s status + // message. + return this[kState].statusText + } - queryURL.search = '' - } + // Returns response’s headers as Headers. + get headers () { + webidl.brandCheck(this, Response) - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } + // The headers getter steps are to return this’s headers. + return this[kHeaders] + } - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } + get body () { + webidl.brandCheck(this, Response) - const fieldValues = getFieldValues(response.headersList.get('vary')) + return this[kState].body ? this[kState].body.stream : null + } - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } + get bodyUsed () { + webidl.brandCheck(this, Response) - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false - } + // Returns a clone of response. + clone () { + webidl.brandCheck(this, Response) + + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || (this.body && this.body.locked)) { + throw webidl.errors.exception({ + header: 'Response.clone', + message: 'Body has already been consumed.' + }) } - return true + // 2. Let clonedResponse be the result of cloning this’s response. + const clonedResponse = cloneResponse(this[kState]) + + // 3. Return the result of creating a Response object, given + // clonedResponse, this’s headers’s guard, and this’s relevant Realm. + const clonedResponseObject = new Response() + clonedResponseObject[kState] = clonedResponse + clonedResponseObject[kRealm] = this[kRealm] + clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList + clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm] + + return clonedResponseObject } } -Object.defineProperties(Cache.prototype, { +mixinBody(Response) + +Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, [Symbol.toStringTag]: { - value: 'Cache', + value: 'Response', configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty + } }) -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: false - } -] +Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty +}) -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) +// https://fetch.spec.whatwg.org/#concept-response-clone +function cloneResponse (response) { + // To clone a response response, run these steps: -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString + // 1. If response is a filtered response, then return a new identical + // filtered response whose internal response is a clone of response’s + // internal response. + if (response.internalResponse) { + return filterResponse( + cloneResponse(response.internalResponse), + response.type + ) } -]) -webidl.converters.Response = webidl.interfaceConverter(Response) + // 2. Let newResponse be a copy of response, except for its body. + const newResponse = makeResponse({ ...response, body: null }) -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) + // 3. If response’s body is non-null, then set newResponse’s body to the + // result of cloning response’s body. + if (response.body != null) { + newResponse.body = cloneBody(response.body) + } -module.exports = { - Cache + // 4. Return newResponse. + return newResponse } +function makeResponse (init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: 'default', + status: 200, + timingInfo: null, + cacheState: '', + statusText: '', + ...init, + headersList: init.headersList + ? new HeadersList(init.headersList) + : new HeadersList(), + urlList: init.urlList ? [...init.urlList] : [] + } +} -/***/ }), - -/***/ 37907: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +function makeNetworkError (reason) { + const isError = isErrorLike(reason) + return makeResponse({ + type: 'error', + status: 0, + error: isError + ? reason + : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === 'AbortError' + }) +} -"use strict"; +function makeFilteredResponse (response, state) { + state = { + internalResponse: response, + ...state + } + return new Proxy(response, { + get (target, p) { + return p in state ? state[p] : target[p] + }, + set (target, p, value) { + assert(!(p in state)) + target[p] = value + return true + } + }) +} -const { kConstruct } = __nccwpck_require__(29174) -const { Cache } = __nccwpck_require__(66101) -const { webidl } = __nccwpck_require__(21744) -const { kEnumerableProperty } = __nccwpck_require__(83983) +// https://fetch.spec.whatwg.org/#concept-filtered-response +function filterResponse (response, type) { + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (type === 'basic') { + // A basic filtered response is a filtered response whose type is "basic" + // and header list excludes any headers in internal response’s header list + // whose name is a forbidden response-header name. -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map 599)) { + throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') + } - if (response !== undefined) { - return response - } - } + // 2. If init["statusText"] does not match the reason-phrase token production, + // then throw a TypeError. + if ('statusText' in init && init.statusText != null) { + // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: + // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) + if (!isValidReasonPhrase(String(init.statusText))) { + throw new TypeError('Invalid statusText') } } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-has - * @param {string} cacheName - * @returns {Promise} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) + // 3. Set response’s response’s status to init["status"]. + if ('status' in init && init.status != null) { + response[kState].status = init.status + } - cacheName = webidl.converters.DOMString(cacheName) + // 4. Set response’s response’s status message to init["statusText"]. + if ('statusText' in init && init.statusText != null) { + response[kState].statusText = init.statusText + } - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) + // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. + if ('headers' in init && init.headers != null) { + fill(response[kHeaders], init.headers) } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) + // 6. If body was given, then: + if (body) { + // 1. If response's status is a null body status, then throw a TypeError. + if (nullBodyStatus.includes(response.status)) { + throw webidl.errors.exception({ + header: 'Response constructor', + message: 'Invalid response status code ' + response.status + }) + } - cacheName = webidl.converters.DOMString(cacheName) + // 2. Set response's body to body's body. + response[kState].body = body.body - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') + // 3. If body's type is non-null and response's header list does not contain + // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. + if (body.type != null && !response[kState].headersList.contains('Content-Type')) { + response[kState].headersList.append('content-type', body.type) + } + } +} - // 2.1.1 - const cache = this.#caches.get(cacheName) +webidl.converters.ReadableStream = webidl.interfaceConverter( + ReadableStream +) - // 2.1.1.1 - return new Cache(kConstruct, cache) - } +webidl.converters.FormData = webidl.interfaceConverter( + FormData +) - // 2.2 - const cache = [] +webidl.converters.URLSearchParams = webidl.interfaceConverter( + URLSearchParams +) - // 2.3 - this.#caches.set(cacheName, cache) +// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit +webidl.converters.XMLHttpRequestBodyInit = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) + } - // 2.4 - return new Cache(kConstruct, cache) + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) + if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { + return webidl.converters.BufferSource(V) + } - cacheName = webidl.converters.DOMString(cacheName) + if (util.isFormDataLike(V)) { + return webidl.converters.FormData(V, { strict: false }) + } - return this.#caches.delete(cacheName) + if (V instanceof URLSearchParams) { + return webidl.converters.URLSearchParams(V) } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {string[]} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) + return webidl.converters.DOMString(V) +} - // 2.1 - const keys = this.#caches.keys() +// https://fetch.spec.whatwg.org/#bodyinit +webidl.converters.BodyInit = function (V) { + if (V instanceof ReadableStream) { + return webidl.converters.ReadableStream(V) + } - // 2.2 - return [...keys] + // Note: the spec doesn't include async iterables, + // this is an undici extension. + if (V?.[Symbol.asyncIterator]) { + return V } + + return webidl.converters.XMLHttpRequestBodyInit(V) } -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true +webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: 'status', + converter: webidl.converters['unsigned short'], + defaultValue: 200 }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) + { + key: 'statusText', + converter: webidl.converters.ByteString, + defaultValue: '' + }, + { + key: 'headers', + converter: webidl.converters.HeadersInit + } +]) module.exports = { - CacheStorage + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse } /***/ }), -/***/ 29174: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 15861: +/***/ ((module) => { "use strict"; module.exports = { - kConstruct: (__nccwpck_require__(72785).kConstruct) + kUrl: Symbol('url'), + kHeaders: Symbol('headers'), + kSignal: Symbol('signal'), + kState: Symbol('state'), + kGuard: Symbol('guard'), + kRealm: Symbol('realm') } /***/ }), -/***/ 82396: +/***/ 52538: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(41037) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { performance } = __nccwpck_require__(4074) +const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(83983) const assert = __nccwpck_require__(39491) -const { URLSerializer } = __nccwpck_require__(685) -const { isValidHeaderName } = __nccwpck_require__(52538) +const { isUint8Array } = __nccwpck_require__(29830) -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) +let supportedHashes = [] - const serializedB = URLSerializer(B, excludeFragment) +// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable +/** @type {import('crypto')|undefined} */ +let crypto - return serializedA === serializedB +try { + crypto = __nccwpck_require__(6113) + const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) +/* c8 ignore next 3 */ +} catch { } -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function fieldValues (header) { - assert(header !== null) +function responseURL (response) { + // https://fetch.spec.whatwg.org/#responses + // A response has an associated URL. It is a pointer to the last URL + // in response’s URL list and null if response’s URL list is empty. + const urlList = response.urlList + const length = urlList.length + return length === 0 ? null : urlList[length - 1].toString() +} - const values = [] +// https://fetch.spec.whatwg.org/#concept-response-location-url +function responseLocationURL (response, requestFragment) { + // 1. If response’s status is not a redirect status, then return null. + if (!redirectStatusSet.has(response.status)) { + return null + } - for (let value of header.split(',')) { - value = value.trim() + // 2. Let location be the result of extracting header list values given + // `Location` and response’s header list. + let location = response.headersList.get('location') - if (!value.length) { - continue - } else if (!isValidHeaderName(value)) { - continue - } + // 3. If location is a header value, then set location to the result of + // parsing location with response’s URL. + if (location !== null && isValidHeaderValue(location)) { + location = new URL(location, responseURL(response)) + } - values.push(value) + // 4. If location is a URL whose fragment is null, then set location’s + // fragment to requestFragment. + if (location && !location.hash) { + location.hash = requestFragment } - return values + // 5. Return location. + return location } -module.exports = { - urlEquals, - fieldValues +/** @returns {URL} */ +function requestCurrentURL (request) { + return request.urlList[request.urlList.length - 1] } +function requestBadPort (request) { + // 1. Let url be request’s current URL. + const url = requestCurrentURL(request) -/***/ }), - -/***/ 33598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// @ts-check - + // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, + // then return blocked. + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return 'blocked' + } + // 3. Return allowed. + return 'allowed' +} -/* global WebAssembly */ +function isErrorLike (object) { + return object instanceof Error || ( + object?.constructor?.name === 'Error' || + object?.constructor?.name === 'DOMException' + ) +} -const assert = __nccwpck_require__(39491) -const net = __nccwpck_require__(41808) -const http = __nccwpck_require__(13685) -const { pipeline } = __nccwpck_require__(12781) -const util = __nccwpck_require__(83983) -const timers = __nccwpck_require__(29459) -const Request = __nccwpck_require__(62905) -const DispatcherBase = __nccwpck_require__(74839) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - InvalidArgumentError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError, - ClientDestroyedError -} = __nccwpck_require__(48045) -const buildConnector = __nccwpck_require__(82067) -const { - kUrl, - kReset, - kServerName, - kClient, - kBusy, - kParser, - kConnect, - kBlocking, - kResuming, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kHTTPConnVersion, - // HTTP2 - kHost, - kHTTP2Session, - kHTTP2SessionState, - kHTTP2BuildRequest, - kHTTP2CopyHeaders, - kHTTP1BuildRequest -} = __nccwpck_require__(72785) +// Check whether |statusText| is a ByteString and +// matches the Reason-Phrase token production. +// RFC 2616: https://tools.ietf.org/html/rfc2616 +// RFC 7230: https://tools.ietf.org/html/rfc7230 +// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" +// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 +function isValidReasonPhrase (statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i) + if ( + !( + ( + c === 0x09 || // HTAB + (c >= 0x20 && c <= 0x7e) || // SP / VCHAR + (c >= 0x80 && c <= 0xff) + ) // obs-text + ) + ) { + return false + } + } + return true +} -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(85158) -} catch { - // @ts-ignore - http2 = { constants: {} } +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ +function isTokenCharCode (c) { + switch (c) { + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e + } } -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS +/** + * @param {string} characters + */ +function isValidHTTPToken (characters) { + if (characters.length === 0) { + return false + } + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false + } } -} = http2 - -// Experimental -let h2ExperimentalWarned = false - -const FastBuffer = Buffer[Symbol.species] - -const kClosedResolve = Symbol('kClosedResolve') - -const channels = {} + return true +} -try { - const diagnosticsChannel = __nccwpck_require__(67643) - channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') - channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') - channels.connectError = diagnosticsChannel.channel('undici:client:connectError') - channels.connected = diagnosticsChannel.channel('undici:client:connected') -} catch { - channels.sendHeaders = { hasSubscribers: false } - channels.beforeConnect = { hasSubscribers: false } - channels.connectError = { hasSubscribers: false } - channels.connected = { hasSubscribers: false } +/** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ +function isValidHeaderName (potentialValue) { + return isValidHTTPToken(potentialValue) } /** - * @type {import('../types/client').default} + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../types/client').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - allowH2, - maxConcurrentStreams - } = {}) { - super() +function isValidHeaderValue (potentialValue) { + // - Has no leading or trailing HTTP tab or space bytes. + // - Contains no 0x00 (NUL) or HTTP newline bytes. + if ( + potentialValue.startsWith('\t') || + potentialValue.startsWith(' ') || + potentialValue.endsWith('\t') || + potentialValue.endsWith(' ') + ) { + return false + } - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } + if ( + potentialValue.includes('\0') || + potentialValue.includes('\r') || + potentialValue.includes('\n') + ) { + return false + } - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } + return true +} - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } +// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect +function setRequestReferrerPolicyOnRedirect (request, actualResponse) { + // Given a request request and a response actualResponse, this algorithm + // updates request’s referrer policy according to the Referrer-Policy + // header (if any) in actualResponse. - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } + // 1. Let policy be the result of executing § 8.1 Parse a referrer policy + // from a Referrer-Policy header on actualResponse. - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } + // 8.1 Parse a referrer policy from a Referrer-Policy header + // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. + const { headersList } = actualResponse + // 2. Let policy be the empty string. + // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. + // 4. Return policy. + const policyHeader = (headersList.get('referrer-policy') ?? '').split(',') - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') + // Note: As the referrer-policy can contain multiple policies + // separated by comma, we need to loop through all of them + // and pick the first valid one. + // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy + let policy = '' + if (policyHeader.length > 0) { + // The right-most policy takes precedence. + // The left-most policy is the fallback. + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim() + if (referrerPolicyTokens.has(token)) { + policy = token + break + } } + } - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } + // 2. If policy is not the empty string, then set request’s referrer policy to policy. + if (policy !== '') { + request.referrerPolicy = policy + } +} - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } +// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check +function crossOriginResourcePolicyCheck () { + // TODO + return 'allowed' +} - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } +// https://fetch.spec.whatwg.org/#concept-cors-check +function corsCheck () { + // TODO + return 'success' +} - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } +// https://fetch.spec.whatwg.org/#concept-tao-check +function TAOCheck () { + // TODO + return 'success' +} - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } +function appendFetchMetadata (httpRequest) { + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header + // TODO - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } + // 1. Assert: r’s url is a potentially trustworthy URL. + // TODO - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } + // 2. Let header be a Structured Header whose value is a token. + let header = null - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } + // 3. Set header’s value to r’s mode. + header = httpRequest.mode - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } + // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. + httpRequest.headersList.set('sec-fetch-mode', header) - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header + // TODO - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header + // TODO +} - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } +// https://fetch.spec.whatwg.org/#append-a-request-origin-header +function appendRequestOriginHeader (request) { + // 1. Let serializedOrigin be the result of byte-serializing a request origin with request. + let serializedOrigin = request.origin - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') + // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. + if (request.responseTainting === 'cors' || request.mode === 'websocket') { + if (serializedOrigin) { + request.headersList.append('origin', serializedOrigin) } - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') + // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: + } else if (request.method !== 'GET' && request.method !== 'HEAD') { + // 1. Switch on request’s referrer policy: + switch (request.referrerPolicy) { + case 'no-referrer': + // Set serializedOrigin to `null`. + serializedOrigin = null + break + case 'no-referrer-when-downgrade': + case 'strict-origin': + case 'strict-origin-when-cross-origin': + // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { + serializedOrigin = null + } + break + case 'same-origin': + // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`. + if (!sameOrigin(request, requestCurrentURL(request))) { + serializedOrigin = null + } + break + default: + // Do nothing. } - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) + if (serializedOrigin) { + // 2. Append (`Origin`, serializedOrigin) to request’s header list. + request.headersList.append('origin', serializedOrigin) } - - this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) - ? interceptors.Client - : [createRedirectInterceptor({ maxRedirections })] - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kSocket] = null - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kHTTPConnVersion] = 'h1' - - // HTTP/2 - this[kHTTP2Session] = null - this[kHTTP2SessionState] = !allowH2 - ? null - : { - // streams: null, // Fixed queue of streams - For future support of `push` - openStreams: 0, // Keep track of them to decide wether or not unref the session - maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - } - this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` - - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). - - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - } - - get pipelining () { - return this[kPipelining] } +} - set pipelining (value) { - this[kPipelining] = value - resume(this, true) - } +function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { + // TODO + return performance.now() +} - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] +// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info +function createOpaqueTimingInfo (timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null } +} - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] +// https://html.spec.whatwg.org/multipage/origin.html#policy-container +function makePolicyContainer () { + // Note: the fetch spec doesn't make use of embedder policy or CSP list + return { + referrerPolicy: 'strict-origin-when-cross-origin' } +} - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] +// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container +function clonePolicyContainer (policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy } +} - get [kConnected] () { - return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed - } +// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer +function determineRequestsReferrer (request) { + // 1. Let policy be request's referrer policy. + const policy = request.referrerPolicy - get [kBusy] () { - const socket = this[kSocket] - return ( - (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) || - (this[kSize] >= (this[kPipelining] || 1)) || - this[kPending] > 0 - ) - } + // Note: policy cannot (shouldn't) be null or an empty string. + assert(policy) - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } + // 2. Let environment be request’s client. - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin + let referrerSource = null - const request = this[kHTTPConnVersion] === 'h2' - ? Request[kHTTP2BuildRequest](origin, opts, handler) - : Request[kHTTP1BuildRequest](origin, opts, handler) + // 3. Switch on request’s referrer: + if (request.referrer === 'client') { + // Note: node isn't a browser and doesn't implement document/iframes, + // so we bypass this step and replace it with our own. - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - process.nextTick(resume, this) - } else { - resume(this, true) - } + const globalOrigin = getGlobalOrigin() - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 + if (!globalOrigin || globalOrigin.origin === 'null') { + return 'no-referrer' } - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (!this[kSize]) { - resolve(null) - } else { - this[kClosedResolve] = resolve - } - }) + // note: we need to clone it as it's mutated + referrerSource = new URL(globalOrigin) + } else if (request.referrer instanceof URL) { + // Let referrerSource be request’s referrer. + referrerSource = request.referrer } - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve() - } - - if (this[kHTTP2Session] != null) { - util.destroy(this[kHTTP2Session], err) - this[kHTTP2Session] = null - this[kHTTP2SessionState] = null - } + // 4. Let request’s referrerURL be the result of stripping referrerSource for + // use as a referrer. + let referrerURL = stripURLForReferrer(referrerSource) - if (!this[kSocket]) { - queueMicrotask(callback) - } else { - util.destroy(this[kSocket].on('close', callback), err) - } + // 5. Let referrerOrigin be the result of stripping referrerSource for use as + // a referrer, with the origin-only flag set to true. + const referrerOrigin = stripURLForReferrer(referrerSource, true) - resume(this) - }) + // 6. If the result of serializing referrerURL is a string whose length is + // greater than 4096, set referrerURL to referrerOrigin. + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - - onError(this[kClient], err) -} - -function onHttp2FrameError (type, code, id) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - if (id === 0) { - this[kSocket][kError] = err - onError(this[kClient], err) - } -} + const areSameOrigin = sameOrigin(request, referrerURL) + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && + !isURLPotentiallyTrustworthy(request.url) -function onHttp2SessionEnd () { - util.destroy(this, new SocketError('other side closed')) - util.destroy(this[kSocket], new SocketError('other side closed')) -} + // 8. Execute the switch statements corresponding to the value of policy: + switch (policy) { + case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) + case 'unsafe-url': return referrerURL + case 'same-origin': + return areSameOrigin ? referrerOrigin : 'no-referrer' + case 'origin-when-cross-origin': + return areSameOrigin ? referrerURL : referrerOrigin + case 'strict-origin-when-cross-origin': { + const currentURL = requestCurrentURL(request) -function onHTTP2GoAway (code) { - const client = this[kClient] - const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) - client[kSocket] = null - client[kHTTP2Session] = null + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL + } - if (client.destroyed) { - assert(this[kPending] === 0) + // 2. If referrerURL is a potentially trustworthy URL and request’s + // current URL is not a potentially trustworthy URL, then return no + // referrer. + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return 'no-referrer' + } - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(this, request, err) + // 3. Return referrerOrigin. + return referrerOrigin } - } else if (client[kRunning] > 0) { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null + case 'strict-origin': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + case 'no-referrer-when-downgrade': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ - errorRequest(client, request, err) + default: // eslint-disable-line + return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin } +} - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) +/** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ +function stripURLForReferrer (url, originOnly) { + // 1. Assert: url is a URL. + assert(url instanceof URL) - client.emit('disconnect', - client[kUrl], - [client], - err - ) + // 2. If url’s scheme is a local scheme, then return no referrer. + if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { + return 'no-referrer' + } - resume(client) -} + // 3. Set url’s username to the empty string. + url.username = '' -const constants = __nccwpck_require__(30953) -const createRedirectInterceptor = __nccwpck_require__(38861) -const EMPTY_BUF = Buffer.alloc(0) + // 4. Set url’s password to the empty string. + url.password = '' -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(61145) : undefined + // 5. Set url’s fragment to null. + url.hash = '' - let mod - try { - mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(95627), 'base64')) - } catch (e) { - /* istanbul ignore next */ + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 1. Set url’s path to « the empty string ». + url.pathname = '' - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(61145), 'base64')) + // 2. Set url’s query to null. + url.search = '' } - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ - - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) + // 7. Return url. + return url } -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() +function isURLPotentiallyTrustworthy (url) { + if (!(url instanceof URL)) { + return false + } -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null + // If child of about, return true + if (url.href === 'about:blank' || url.href === 'about:srcdoc') { + return true + } -const TIMEOUT_HEADERS = 1 -const TIMEOUT_BODY = 2 -const TIMEOUT_IDLE = 3 + // If scheme is data, return true + if (url.protocol === 'data:') return true -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) + // If file, return true + if (url.protocol === 'file:') return true - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) + return isOriginPotentiallyTrustworthy(url.origin) - this.bytesRead = 0 + function isOriginPotentiallyTrustworthy (origin) { + // If origin is explicitly null, return false + if (origin == null || origin === 'null') return false - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } + const originAsURL = new URL(origin) - setTimeout (value, type) { - this.timeoutType = type - if (value !== this.timeoutValue) { - timers.clearTimeout(this.timeout) - if (value) { - this.timeout = timers.setTimeout(onParserTimeout, value, this) - // istanbul ignore else: only for jest - if (this.timeout.unref) { - this.timeout.unref() - } - } else { - this.timeout = null - } - this.timeoutValue = value - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } + // If secure, return true + if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { + return true } - } - resume () { - if (this.socket.destroyed || !this.paused) { - return + // If localhost or variants, return true + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || + (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || + (originAsURL.hostname.endsWith('.localhost'))) { + return true } - assert(this.ptr != null) - assert(currentParser == null) + // If any other, return false + return false + } +} - this.llhttp.llhttp_resume(this.ptr) +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ +function bytesMatch (bytes, metadataList) { + // If node is not built with OpenSSL support, we cannot check + // a request's integrity, so allow it by default (the spec will + // allow requests if an invalid hash is given, as precedence). + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === undefined) { + return true + } - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } + // 1. Let parsedMetadata be the result of parsing metadataList. + const parsedMetadata = parseMetadata(metadataList) - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() + // 2. If parsedMetadata is no metadata, return true. + if (parsedMetadata === 'no metadata') { + return true } - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } + // 3. If response is not eligible for integrity validation, return false. + // TODO + + // 4. If parsedMetadata is the empty set, return true. + if (parsedMetadata.length === 0) { + return true } - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) + // 5. Let metadata be the result of getting the strongest + // metadata from parsedMetadata. + const strongest = getStrongestMetadata(parsedMetadata) + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) - const { socket, llhttp } = this + // 6. For each item in metadata: + for (const item of metadata) { + // 1. Let algorithm be the alg component of item. + const algorithm = item.algo - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) - } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } + // 2. Let expectedValue be the val component of item. + const expectedValue = item.hash - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) + // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e + // "be liberal with padding". This is annoying, and it's not even in the spec. - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret + // 3. Let actualValue be the result of applying algorithm to bytes. + let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') - try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ - } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null + if (actualValue[actualValue.length - 1] === '=') { + if (actualValue[actualValue.length - 2] === '=') { + actualValue = actualValue.slice(0, -2) + } else { + actualValue = actualValue.slice(0, -1) } + } - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) - } - } catch (err) { - util.destroy(socket, err) + // 4. If actualValue is a case-sensitive match for expectedValue, + // return true. + if (compareBase64Mixed(actualValue, expectedValue)) { + return true } } - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null + // 7. Return false. + return false +} - timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null +// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options +// https://www.w3.org/TR/CSP2/#source-list-syntax +// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 +const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - this.paused = false - } +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ +function parseMetadata (metadata) { + // 1. Let result be the empty set. + /** @type {{ algo: string, hash: string }[]} */ + const result = [] - onStatus (buf) { - this.statusText = buf.toString() - } + // 2. Let empty be equal to true. + let empty = true - onMessageBegin () { - const { socket, client } = this + // 3. For each token returned by splitting metadata on spaces: + for (const token of metadata.split(' ')) { + // 1. Set empty to false. + empty = false - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } + // 2. Parse token as a hash-with-options. + const parsedToken = parseHashWithOptions.exec(token) - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 + // 3. If token does not parse, continue to the next token. + if ( + parsedToken === null || + parsedToken.groups === undefined || + parsedToken.groups.algo === undefined + ) { + // Note: Chromium blocks the request at this point, but Firefox + // gives a warning that an invalid integrity was given. The + // correct behavior is to ignore these, and subsequently not + // check the integrity of the resource. + continue } - } - onHeaderField (buf) { - const len = this.headers.length + // 4. Let algorithm be the hash-algo component of token. + const algorithm = parsedToken.groups.algo.toLowerCase() - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) + // 5. If algorithm is a hash function recognized by the user + // agent, add the parsed token to result. + if (supportedHashes.includes(algorithm)) { + result.push(parsedToken.groups) } + } - this.trackHeader(buf.length) + // 4. Return no metadata if empty is true, otherwise return result. + if (empty === true) { + return 'no metadata' } - onHeaderValue (buf) { - let len = this.headers.length + return result +} - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } +/** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ +function getStrongestMetadata (metadataList) { + // Let algorithm be the algo component of the first item in metadataList. + // Can be sha256 + let algorithm = metadataList[0].algo + // If the algorithm is sha512, then it is the strongest + // and we can return immediately + if (algorithm[3] === '5') { + return algorithm + } - const key = this.headers[len - 2] - if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') { - this.connection += buf.toString() - } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') { - this.contentLength += buf.toString() + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i] + // If the algorithm is sha512, then it is the strongest + // and we can break the loop immediately + if (metadata.algo[3] === '5') { + algorithm = 'sha512' + break + // If the algorithm is sha384, then a potential sha256 or sha384 is ignored + } else if (algorithm[3] === '3') { + continue + // algorithm is sha256, check if algorithm is sha384 and if so, set it as + // the strongest + } else if (metadata.algo[3] === '3') { + algorithm = 'sha384' } + } + return algorithm +} - this.trackHeader(buf.length) +function filterMetadataListByAlgorithm (metadataList, algorithm) { + if (metadataList.length === 1) { + return metadataList } - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) + let pos = 0 + for (let i = 0; i < metadataList.length; ++i) { + if (metadataList[i].algo === algorithm) { + metadataList[pos++] = metadataList[i] } } - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) + metadataList.length = pos - assert(!socket.destroyed) - assert(socket === client[kSocket]) - assert(!this.paused) - assert(request.upgrade || request.method === 'CONNECT') + return metadataList +} - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null +/** + * Compares two base64 strings, allowing for base64url + * in the second string. + * +* @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ +function compareBase64Mixed (actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) { + return false + } + for (let i = 0; i < actualValue.length; ++i) { + if (actualValue[i] !== expectedValue[i]) { + if ( + (actualValue[i] === '+' && expectedValue[i] === '-') || + (actualValue[i] === '/' && expectedValue[i] === '_') + ) { + continue + } + return false + } + } - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 + return true +} - socket.unshift(head) +// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request +function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { + // TODO +} - socket[kParser].destroy() - socket[kParser] = null +/** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ +function sameOrigin (A, B) { + // 1. If A and B are the same opaque origin, then return true. + if (A.origin === B.origin && A.origin === 'null') { + return true + } - socket[kClient] = null - socket[kError] = null - socket - .removeListener('error', onSocketError) - .removeListener('readable', onSocketReadable) - .removeListener('end', onSocketEnd) - .removeListener('close', onSocketClose) + // 2. If A and B are both tuple origins and their schemes, + // hosts, and port are identical, then return true. + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true + } - client[kSocket] = null - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) + // 3. Return false. + return false +} - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } +function createDeferredPromise () { + let res + let rej + const promise = new Promise((resolve, reject) => { + res = resolve + rej = reject + }) - resume(client) - } + return { promise, resolve: res, reject: rej } +} - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this +function isAborted (fetchParams) { + return fetchParams.controller.state === 'aborted' +} - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } +function isCancelled (fetchParams) { + return fetchParams.controller.state === 'aborted' || + fetchParams.controller.state === 'terminated' +} - const request = client[kQueue][client[kRunningIdx]] +const normalizeMethodRecord = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizeMethodRecord, null) - assert(!this.upgrade) - assert(this.statusCode < 200) +/** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ +function normalizeMethod (method) { + return normalizeMethodRecord[method.toLowerCase()] ?? method +} - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } +// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string +function serializeJavascriptValueToJSONString (value) { + // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). + const result = JSON.stringify(value) - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 - } + // 2. If result is undefined, then throw a TypeError. + if (result === undefined) { + throw new TypeError('Value is not JSON serializable') + } - assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) + // 3. Assert: result is a string. + assert(typeof result === 'string') - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) + // 4. Return result. + return result +} - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } +// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object +const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } +/** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {() => unknown[]} iterator + * @param {string} name name of the instance + * @param {'key'|'value'|'key+value'} kind + */ +function makeIterator (iterator, name, kind) { + const object = { + index: 0, + kind, + target: iterator + } - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } + const i = { + next () { + // 1. Let interface be the interface for which the iterator prototype object exists. - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 + // 2. Let thisValue be the this value. - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null + // 3. Let object be ? ToObject(thisValue). - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] + // 4. If object is a platform object, then perform a security + // check, passing: + + // 5. If object is not a default iterator object for interface, + // then throw a TypeError. + if (Object.getPrototypeOf(this) !== i) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.` ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false + // 6. Let index be object’s index. + // 7. Let kind be object’s kind. + // 8. Let values be object’s target's value pairs to iterate over. + const { index, kind, target } = object + const values = target() - if (request.aborted) { - return -1 - } + // 9. Let len be the length of values. + const len = values.length - if (request.method === 'HEAD') { - return 1 - } + // 10. If index is greater than or equal to len, then return + // CreateIterResultObject(undefined, true). + if (index >= len) { + return { value: undefined, done: true } + } - if (statusCode < 200) { - return 1 - } + // 11. Let pair be the entry in values at index index. + const pair = values[index] - if (socket[kBlocking]) { - socket[kBlocking] = false - resume(client) - } + // 12. Set object’s index to index + 1. + object.index = index + 1 - return pause ? constants.ERROR.PAUSED : 0 + // 13. Return the iterator result for pair and kind. + return iteratorResult(pair, kind) + }, + // The class string of an iterator prototype object for a given interface is the + // result of concatenating the identifier of the interface and the string " Iterator". + [Symbol.toStringTag]: `${name} Iterator` } - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 - } + // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%. + Object.setPrototypeOf(i, esIteratorPrototype) + // esIteratorPrototype needs to be the prototype of i + // which is the prototype of an empty object. Yes, it's confusing. + return Object.setPrototypeOf({}, i) +} - const request = client[kQueue][client[kRunningIdx]] - assert(request) +// https://webidl.spec.whatwg.org/#iterator-result +function iteratorResult (pair, kind) { + let result - assert.strictEqual(this.timeoutType, TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } + // 1. Let result be a value determined by the value of kind: + switch (kind) { + case 'key': { + // 1. Let idlKey be pair’s key. + // 2. Let key be the result of converting idlKey to an + // ECMAScript value. + // 3. result is key. + result = pair[0] + break } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 + case 'value': { + // 1. Let idlValue be pair’s value. + // 2. Let value be the result of converting idlValue to + // an ECMAScript value. + // 3. result is value. + result = pair[1] + break } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED + case 'key+value': { + // 1. Let idlKey be pair’s key. + // 2. Let idlValue be pair’s value. + // 3. Let key be the result of converting idlKey to an + // ECMAScript value. + // 4. Let value be the result of converting idlValue to + // an ECMAScript value. + // 5. Let array be ! ArrayCreate(2). + // 6. Call ! CreateDataProperty(array, "0", key). + // 7. Call ! CreateDataProperty(array, "1", value). + // 8. result is array. + result = pair + break } } - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this + // 2. Return CreateIterResultObject(result, false). + return { value: result, done: false } +} - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } +/** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ +async function fullyReadBody (body, processBody, processBodyError) { + // 1. If taskDestination is null, then set taskDestination to + // the result of starting a new parallel queue. - if (upgrade) { - return - } + // 2. Let successSteps given a byte sequence bytes be to queue a + // fetch task to run processBody given bytes, with taskDestination. + const successSteps = processBody - const request = client[kQueue][client[kRunningIdx]] - assert(request) + // 3. Let errorSteps be to queue a fetch task to run processBodyError, + // with taskDestination. + const errorSteps = processBodyError - assert(statusCode >= 100) + // 4. Let reader be the result of getting a reader for body’s stream. + // If that threw an exception, then run errorSteps with that + // exception and return. + let reader - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' + try { + reader = body.stream.getReader() + } catch (e) { + errorSteps(e) + return + } - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 + // 5. Read all bytes from reader, given successSteps and errorSteps. + try { + const result = await readAllBytes(reader) + successSteps(result) + } catch (e) { + errorSteps(e) + } +} - if (statusCode < 200) { - return - } +/** @type {ReadableStream} */ +let ReadableStream = globalThis.ReadableStream - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } +function isReadableStreamLike (stream) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } - request.onComplete(headers) + return stream instanceof ReadableStream || ( + stream[Symbol.toStringTag] === 'ReadableStream' && + typeof stream.tee === 'function' + ) +} - client[kQueue][client[kRunningIdx]++] = null +const MAXIMUM_ARGUMENT_LENGTH = 65535 - if (socket[kWriting]) { - assert.strictEqual(client[kRunning], 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(resume, client) - } else { - resume(client) - } +/** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {number[]|Uint8Array} input + */ +function isomorphicDecode (input) { + // 1. To isomorphic decode a byte sequence input, return a string whose code point + // length is equal to input’s length and whose code points have the same values + // as the values of input’s bytes, in the same order. + + if (input.length < MAXIMUM_ARGUMENT_LENGTH) { + return String.fromCharCode(...input) } -} -function onParserTimeout (parser) { - const { socket, timeoutType, client } = parser + return input.reduce((previous, current) => previous + String.fromCharCode(current), '') +} - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!parser.paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!parser.paused) { - util.destroy(socket, new BodyTimeoutError()) +/** + * @param {ReadableStreamController} controller + */ +function readableStreamClose (controller) { + try { + controller.close() + } catch (err) { + // TODO: add comment explaining why this error occurs. + if (!err.message.includes('Controller is already closed')) { + throw err } - } else if (timeoutType === TIMEOUT_IDLE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) } } -function onSocketReadable () { - const { [kParser]: parser } = this - if (parser) { - parser.readMore() +/** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ +function isomorphicEncode (input) { + // 1. Assert: input contains no code points greater than U+00FF. + for (let i = 0; i < input.length; i++) { + assert(input.charCodeAt(i) <= 0xFF) } + + // 2. Return a byte sequence whose length is equal to input’s code + // point length and whose bytes have the same values as the + // values of input’s code points, in the same order + return input } -function onSocketError (err) { - const { [kClient]: client, [kParser]: parser } = this +/** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ +async function readAllBytes (reader) { + const bytes = [] + let byteLength = 0 - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + while (true) { + const { done, value: chunk } = await reader.read() - if (client[kHTTPConnVersion] !== 'h2') { - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return + if (done) { + // 1. Call successSteps with bytes. + return Buffer.concat(bytes, byteLength) } - } - this[kError] = err + // 1. If chunk is not a Uint8Array object, call failureSteps + // with a TypeError and abort these steps. + if (!isUint8Array(chunk)) { + throw new TypeError('Received non-Uint8Array chunk') + } - onError(this[kClient], err) + // 2. Append the bytes represented by chunk to bytes. + bytes.push(chunk) + byteLength += chunk.length + + // 3. Read-loop given reader, bytes, successSteps, and failureSteps. + } } -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. +/** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ +function urlIsLocal (url) { + assert('protocol' in url) // ensure it's a url object - assert(client[kPendingIdx] === client[kRunningIdx]) + const protocol = url.protocol - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(client, request, err) - } - assert(client[kSize] === 0) + return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' +} + +/** + * @param {string|URL} url + */ +function urlHasHttpsScheme (url) { + if (typeof url === 'string') { + return url.startsWith('https:') } + + return url.protocol === 'https:' } -function onSocketEnd () { - const { [kParser]: parser, [kClient]: client } = this +/** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ +function urlIsHttpHttpsScheme (url) { + assert('protocol' in url) // ensure it's a url object - if (client[kHTTPConnVersion] !== 'h2') { - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - } + const protocol = url.protocol - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) + return protocol === 'http:' || protocol === 'https:' +} + +/** + * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. + */ +const hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)) + +module.exports = { + isAborted, + isCancelled, + createDeferredPromise, + ReadableStreamFrom, + toUSVString, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + makeIterator, + isValidHeaderName, + isValidHeaderValue, + hasOwn, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + isomorphicDecode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + normalizeMethodRecord, + parseMetadata } -function onSocketClose () { - const { [kClient]: client, [kParser]: parser } = this - - if (client[kHTTPConnVersion] === 'h1' && parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - } - - this[kParser].destroy() - this[kParser] = null - } - - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) - - client[kSocket] = null - if (client.destroyed) { - assert(client[kPending] === 0) +/***/ }), - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(client, request, err) - } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null +/***/ 21744: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - errorRequest(client, request, err) - } +"use strict"; - client[kPendingIdx] = client[kRunningIdx] - assert(client[kRunning] === 0) +const { types } = __nccwpck_require__(73837) +const { hasOwn, toUSVString } = __nccwpck_require__(52538) - client.emit('disconnect', client[kUrl], [client], err) +/** @type {import('../../types/webidl').Webidl} */ +const webidl = {} +webidl.converters = {} +webidl.util = {} +webidl.errors = {} - resume(client) +webidl.errors.exception = function (message) { + return new TypeError(`${message.header}: ${message.message}`) } -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kSocket]) - - let { host, hostname, protocol, port } = client[kUrl] +webidl.errors.conversionFailed = function (context) { + const plural = context.types.length === 1 ? '' : ' one of' + const message = + `${context.argument} could not be converted to` + + `${plural}: ${context.types.join(', ')}.` - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') + return webidl.errors.exception({ + header: context.prefix, + message + }) +} - assert(idx !== -1) - const ip = hostname.substring(1, idx) +webidl.errors.invalidArgument = function (context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }) +} - assert(net.isIP(ip)) - hostname = ip +// https://webidl.spec.whatwg.org/#implements +webidl.brandCheck = function (V, I, opts = undefined) { + if (opts?.strict !== false && !(V instanceof I)) { + throw new TypeError('Illegal invocation') + } else { + return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] } +} - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] +webidl.argumentLengthCheck = function ({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? 's' : ''} required, ` + + `but${length ? ' only' : ''} ${length} found.`, + ...ctx }) } +} - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) +webidl.illegalConstructor = function () { + throw webidl.errors.exception({ + header: 'TypeError', + message: 'Illegal constructor' + }) +} - if (client.destroyed) { - util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) - return - } +// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values +webidl.util.Type = function (V) { + switch (typeof V) { + case 'undefined': return 'Undefined' + case 'boolean': return 'Boolean' + case 'string': return 'String' + case 'symbol': return 'Symbol' + case 'number': return 'Number' + case 'bigint': return 'BigInt' + case 'function': + case 'object': { + if (V === null) { + return 'Null' + } - client[kConnecting] = false + return 'Object' + } + } +} - assert(socket) +// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint +webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { + let upperBound + let lowerBound - const isH2 = socket.alpnProtocol === 'h2' - if (isH2) { - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } + // 1. If bitLength is 64, then: + if (bitLength === 64) { + // 1. Let upperBound be 2^53 − 1. + upperBound = Math.pow(2, 53) - 1 - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams - }) + // 2. If signedness is "unsigned", then let lowerBound be 0. + if (signedness === 'unsigned') { + lowerBound = 0 + } else { + // 3. Otherwise let lowerBound be −2^53 + 1. + lowerBound = Math.pow(-2, 53) + 1 + } + } else if (signedness === 'unsigned') { + // 2. Otherwise, if signedness is "unsigned", then: - client[kHTTPConnVersion] = 'h2' - session[kClient] = client - session[kSocket] = socket - session.on('error', onHttp2SessionError) - session.on('frameError', onHttp2FrameError) - session.on('end', onHttp2SessionEnd) - session.on('goaway', onHTTP2GoAway) - session.on('close', onSocketClose) - session.unref() + // 1. Let lowerBound be 0. + lowerBound = 0 - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - } else { - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } + // 2. Let upperBound be 2^bitLength − 1. + upperBound = Math.pow(2, bitLength) - 1 + } else { + // 3. Otherwise: - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - } + // 1. Let lowerBound be -2^bitLength − 1. + lowerBound = Math.pow(-2, bitLength) - 1 - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null + // 2. Let upperBound be 2^bitLength − 1 − 1. + upperBound = Math.pow(2, bitLength - 1) - 1 + } - socket - .on('error', onSocketError) - .on('readable', onSocketReadable) - .on('end', onSocketEnd) - .on('close', onSocketClose) + // 4. Let x be ? ToNumber(V). + let x = Number(V) - client[kSocket] = socket + // 5. If x is −0, then set x to +0. + if (x === 0) { + x = 0 + } - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket + // 6. If the conversion is to an IDL type associated + // with the [EnforceRange] extended attribute, then: + if (opts.enforceRange === true) { + // 1. If x is NaN, +∞, or −∞, then throw a TypeError. + if ( + Number.isNaN(x) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Could not convert ${V} to an integer.` }) } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return - } - client[kConnecting] = false + // 2. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err + // 3. If x < lowerBound or x > upperBound, then + // throw a TypeError. + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` }) } - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - errorRequest(client, request, err) - } + // 4. Return x. + return x + } + + // 7. If x is not NaN and the conversion is to an IDL + // type associated with the [Clamp] extended + // attribute, then: + if (!Number.isNaN(x) && opts.clamp === true) { + // 1. Set x to min(max(x, lowerBound), upperBound). + x = Math.min(Math.max(x, lowerBound), upperBound) + + // 2. Round x to the nearest integer, choosing the + // even integer if it lies halfway between two, + // and choosing +0 rather than −0. + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x) } else { - onError(client, err) + x = Math.ceil(x) } - client.emit('connectionError', client[kUrl], [client], err) + // 3. Return x. + return x } - resume(client) -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return + // 8. If x is NaN, +0, +∞, or −∞, then return +0. + if ( + Number.isNaN(x) || + (x === 0 && Object.is(0, x)) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + return 0 } - client[kResuming] = 2 + // 9. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) - _resume(client, sync) - client[kResuming] = 0 + // 10. Set x to x modulo 2^bitLength. + x = x % Math.pow(2, bitLength) - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 + // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, + // then return x − 2^bitLength. + if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength) } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return - } + // 12. Otherwise, return x. + return x +} - const socket = client[kSocket] +// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart +webidl.util.IntegerPart = function (n) { + // 1. Let r be floor(abs(n)). + const r = Math.floor(Math.abs(n)) - if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } + // 2. If n < 0, then return -1 × r. + if (n < 0) { + return -1 * r + } - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } - } + // 3. Otherwise, return r. + return r +} - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - process.nextTick(emitDrain, client) - } else { - emitDrain(client) - } - continue +// https://webidl.spec.whatwg.org/#es-sequence +webidl.sequenceConverter = function (converter) { + return (V) => { + // 1. If Type(V) is not Object, throw a TypeError. + if (webidl.util.Type(V) !== 'Object') { + throw webidl.errors.exception({ + header: 'Sequence', + message: `Value of type ${webidl.util.Type(V)} is not an Object.` + }) } - if (client[kPending] === 0) { - return - } + // 2. Let method be ? GetMethod(V, @@iterator). + /** @type {Generator} */ + const method = V?.[Symbol.iterator]?.() + const seq = [] - if (client[kRunning] >= (client[kPipelining] || 1)) { - return + // 3. If method is undefined, throw a TypeError. + if ( + method === undefined || + typeof method.next !== 'function' + ) { + throw webidl.errors.exception({ + header: 'Sequence', + message: 'Object is not an iterator.' + }) } - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } - - client[kServerName] = request.servername + // https://webidl.spec.whatwg.org/#create-sequence-from-iterable + while (true) { + const { done, value } = method.next() - if (socket && socket.servername !== request.servername) { - util.destroy(socket, new InformationalError('servername changed')) - return + if (done) { + break } - } - - if (client[kConnecting]) { - return - } - - if (!socket && !client[kHTTP2Session]) { - connect(client) - return - } - - if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return - } - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return - } - - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return + seq.push(converter(value)) } - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. - - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return - } + return seq + } +} - if (!request.aborted && write(client, request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) +// https://webidl.spec.whatwg.org/#es-to-record +webidl.recordConverter = function (keyConverter, valueConverter) { + return (O) => { + // 1. If Type(O) is not Object, throw a TypeError. + if (webidl.util.Type(O) !== 'Object') { + throw webidl.errors.exception({ + header: 'Record', + message: `Value of type ${webidl.util.Type(O)} is not an Object.` + }) } - } -} -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} + // 2. Let result be a new empty instance of record. + const result = {} -function write (client, request) { - if (client[kHTTPConnVersion] === 'h2') { - writeH2(client, client[kHTTP2Session], request) - return - } + if (!types.isProxy(O)) { + // Object.keys only returns enumerable properties + const keys = Object.keys(O) - const { body, method, path, host, upgrade, headers, blocking, reset } = request + for (const key of keys) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) + // 5. Return result. + return result + } - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) - } + // 3. Let keys be ? O.[[OwnPropertyKeys]](). + const keys = Reflect.ownKeys(O) - const bodyLength = util.bodyLength(body) + // 4. For each key of keys. + for (const key of keys) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const desc = Reflect.getOwnPropertyDescriptor(O, key) - let contentLength = bodyLength + // 2. If desc is not undefined and desc.[[Enumerable]] is true: + if (desc?.enumerable) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) - if (contentLength === null) { - contentLength = request.contentLength - } + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } + } - contentLength = null + // 5. Return result. + return result } +} - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request, new RequestContentLengthMismatchError()) - return false +webidl.interfaceConverter = function (i) { + return (V, opts = {}) => { + if (opts.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: i.name, + message: `Expected ${V} to be an instance of ${i.name}.` + }) } - process.emitWarning(new RequestContentLengthMismatchError()) + return V } +} - const socket = client[kSocket] +webidl.dictionaryConverter = function (converters) { + return (dictionary) => { + const type = webidl.util.Type(dictionary) + const dict = {} - try { - request.onConnect((err) => { - if (request.aborted || request.completed) { - return + if (type === 'Null' || type === 'Undefined') { + return dict + } else if (type !== 'Object') { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }) + } + + for (const options of converters) { + const { key, defaultValue, required, converter } = options + + if (required === true) { + if (!hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `Missing required key "${key}".` + }) + } } - errorRequest(client, request, err || new RequestAbortedError()) + let value = dictionary[key] + const hasDefault = hasOwn(options, 'defaultValue') - util.destroy(socket, new InformationalError('aborted')) - }) - } catch (err) { - errorRequest(client, request, err) - } + // Only use defaultValue if value is undefined and + // a defaultValue options was provided. + if (hasDefault && value !== null) { + value = value ?? defaultValue + } - if (request.aborted) { - return false - } + // A key can be optional and have no default value. + // When this happens, do not perform a conversion, + // and do not assign the key a value. + if (required || hasDefault || value !== undefined) { + value = converter(value) - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. + if ( + options.allowedValues && + !options.allowedValues.includes(value) + ) { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` + }) + } - socket[kReset] = true + dict[key] = value + } + } + + return dict } +} - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. +webidl.nullableConverter = function (converter) { + return (V) => { + if (V === null) { + return V + } - socket[kReset] = true + return converter(V) } +} - if (reset != null) { - socket[kReset] = reset +// https://webidl.spec.whatwg.org/#es-DOMString +webidl.converters.DOMString = function (V, opts = {}) { + // 1. If V is null and the conversion is to an IDL type + // associated with the [LegacyNullToEmptyString] + // extended attribute, then return the DOMString value + // that represents the empty string. + if (V === null && opts.legacyNullToEmptyString) { + return '' } - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true + // 2. Let x be ? ToString(V). + if (typeof V === 'symbol') { + throw new TypeError('Could not convert argument of type symbol to string.') } - if (blocking) { - socket[kBlocking] = true - } + // 3. Return the IDL DOMString value that represents the + // same sequence of code units as the one the + // ECMAScript String value x represents. + return String(V) +} - let header = `${method} ${path} HTTP/1.1\r\n` +// https://webidl.spec.whatwg.org/#es-ByteString +webidl.converters.ByteString = function (V) { + // 1. Let x be ? ToString(V). + // Note: DOMString converter perform ? ToString(V) + const x = webidl.converters.DOMString(V) - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] + // 2. If the value of any element of x is greater than + // 255, then throw a TypeError. + for (let index = 0; index < x.length; index++) { + if (x.charCodeAt(index) > 255) { + throw new TypeError( + 'Cannot convert argument to a ByteString because the character at ' + + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` + ) + } } - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } + // 3. Return an IDL ByteString value whose length is the + // length of x, and where the value of each element is + // the value of the corresponding element of x. + return x +} - if (headers) { - header += headers - } +// https://webidl.spec.whatwg.org/#es-USVString +webidl.converters.USVString = toUSVString - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } +// https://webidl.spec.whatwg.org/#es-boolean +webidl.converters.boolean = function (V) { + // 1. Let x be the result of computing ToBoolean(V). + const x = Boolean(V) - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - request.onRequestSent() - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') + // 2. Return the IDL boolean value that is the one that represents + // the same truth value as the ECMAScript Boolean value x. + return x +} - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - request.onRequestSent() - if (!expectsPayload) { - socket[kReset] = true - } - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) - } else { - writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }) - } - } else if (util.isStream(body)) { - writeStream({ body, client, request, socket, contentLength, header, expectsPayload }) - } else if (util.isIterable(body)) { - writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }) - } else { - assert(false) - } +// https://webidl.spec.whatwg.org/#es-any +webidl.converters.any = function (V) { + return V +} - return true +// https://webidl.spec.whatwg.org/#es-long-long +webidl.converters['long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "signed"). + const x = webidl.util.ConvertToInt(V, 64, 'signed') + + // 2. Return the IDL long long value that represents + // the same numeric value as x. + return x } -function writeH2 (client, session, request) { - const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request +// https://webidl.spec.whatwg.org/#es-unsigned-long-long +webidl.converters['unsigned long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). + const x = webidl.util.ConvertToInt(V, 64, 'unsigned') - let headers - if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) - else headers = reqHeaders + // 2. Return the IDL unsigned long long value that + // represents the same numeric value as x. + return x +} - if (upgrade) { - errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } +// https://webidl.spec.whatwg.org/#es-unsigned-long +webidl.converters['unsigned long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). + const x = webidl.util.ConvertToInt(V, 32, 'unsigned') - try { - // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? - request.onConnect((err) => { - if (request.aborted || request.completed) { - return - } + // 2. Return the IDL unsigned long value that + // represents the same numeric value as x. + return x +} - errorRequest(client, request, err || new RequestAbortedError()) +// https://webidl.spec.whatwg.org/#es-unsigned-short +webidl.converters['unsigned short'] = function (V, opts) { + // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). + const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts) + + // 2. Return the IDL unsigned short value that represents + // the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#idl-ArrayBuffer +webidl.converters.ArrayBuffer = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have an + // [[ArrayBufferData]] internal slot, then throw a + // TypeError. + // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances + // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances + if ( + webidl.util.Type(V) !== 'Object' || + !types.isAnyArrayBuffer(V) + ) { + throw webidl.errors.conversionFailed({ + prefix: `${V}`, + argument: `${V}`, + types: ['ArrayBuffer'] }) - } catch (err) { - errorRequest(client, request, err) } - if (request.aborted) { - return false + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V) is true, then throw a + // TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) } - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - const h2State = client[kHTTP2SessionState] - - headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] - headers[HTTP2_HEADER_METHOD] = method + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V) is true, then throw a + // TypeError. + // Note: resizable ArrayBuffers are currently a proposal. - if (method === 'CONNECT') { - session.ref() - // we are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) + // 4. Return the IDL ArrayBuffer value that is a + // reference to the same object as V. + return V +} - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - }) - } +webidl.converters.TypedArray = function (V, T, opts = {}) { + // 1. Let T be the IDL type V is being converted to. - stream.once('close', () => { - h2State.openStreams -= 1 - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) session.unref() + // 2. If Type(V) is not Object, or V does not have a + // [[TypedArrayName]] internal slot with a value + // equal to T’s name, then throw a TypeError. + if ( + webidl.util.Type(V) !== 'Object' || + !types.isTypedArray(V) || + V.constructor.name !== T.name + ) { + throw webidl.errors.conversionFailed({ + prefix: `${T.name}`, + argument: `${V}`, + types: [T.name] }) + } - return true + // 3. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) } - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omited when sending CONNECT + // 4. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable array buffers are currently a proposal - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' + // 5. Return the IDL value of type T that is a reference + // to the same object as V. + return V +} - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 +webidl.converters.DataView = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have a + // [[DataView]] internal slot, then throw a TypeError. + if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: 'DataView', + message: 'Object is not a DataView.' + }) + } - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, + // then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) + } - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable ArrayBuffers are currently a proposal - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) + // 4. Return the IDL DataView value that is a reference + // to the same object as V. + return V +} + +// https://webidl.spec.whatwg.org/#BufferSource +webidl.converters.BufferSource = function (V, opts = {}) { + if (types.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, opts) } - let contentLength = util.bodyLength(body) + if (types.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor) + } - if (contentLength == null) { - contentLength = request.contentLength + if (types.isDataView(V)) { + return webidl.converters.DataView(V, opts) } - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. + throw new TypeError(`Could not convert ${V} to a BufferSource.`) +} + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.ByteString +) + +webidl.converters['sequence>'] = webidl.sequenceConverter( + webidl.converters['sequence'] +) + +webidl.converters['record'] = webidl.recordConverter( + webidl.converters.ByteString, + webidl.converters.ByteString +) + +module.exports = { + webidl +} - contentLength = null - } - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } +/***/ }), - process.emitWarning(new RequestContentLengthMismatchError()) - } +/***/ 84854: +/***/ ((module) => { - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` - } +"use strict"; - session.ref() - const shouldEndStream = method === 'GET' || method === 'HEAD' - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) +/** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ +function getEncoding (label) { + if (!label) { + return 'failure' + } - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() + // 1. Remove any leading and trailing ASCII whitespace from label. + // 2. If label is an ASCII case-insensitive match for any of the + // labels listed in the table below, then return the + // corresponding encoding; otherwise return failure. + switch (label.trim().toLowerCase()) { + case 'unicode-1-1-utf-8': + case 'unicode11utf8': + case 'unicode20utf8': + case 'utf-8': + case 'utf8': + case 'x-unicode20utf8': + return 'UTF-8' + case '866': + case 'cp866': + case 'csibm866': + case 'ibm866': + return 'IBM866' + case 'csisolatin2': + case 'iso-8859-2': + case 'iso-ir-101': + case 'iso8859-2': + case 'iso88592': + case 'iso_8859-2': + case 'iso_8859-2:1987': + case 'l2': + case 'latin2': + return 'ISO-8859-2' + case 'csisolatin3': + case 'iso-8859-3': + case 'iso-ir-109': + case 'iso8859-3': + case 'iso88593': + case 'iso_8859-3': + case 'iso_8859-3:1988': + case 'l3': + case 'latin3': + return 'ISO-8859-3' + case 'csisolatin4': + case 'iso-8859-4': + case 'iso-ir-110': + case 'iso8859-4': + case 'iso88594': + case 'iso_8859-4': + case 'iso_8859-4:1988': + case 'l4': + case 'latin4': + return 'ISO-8859-4' + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso-8859-5': + case 'iso-ir-144': + case 'iso8859-5': + case 'iso88595': + case 'iso_8859-5': + case 'iso_8859-5:1988': + return 'ISO-8859-5' + case 'arabic': + case 'asmo-708': + case 'csiso88596e': + case 'csiso88596i': + case 'csisolatinarabic': + case 'ecma-114': + case 'iso-8859-6': + case 'iso-8859-6-e': + case 'iso-8859-6-i': + case 'iso-ir-127': + case 'iso8859-6': + case 'iso88596': + case 'iso_8859-6': + case 'iso_8859-6:1987': + return 'ISO-8859-6' + case 'csisolatingreek': + case 'ecma-118': + case 'elot_928': + case 'greek': + case 'greek8': + case 'iso-8859-7': + case 'iso-ir-126': + case 'iso8859-7': + case 'iso88597': + case 'iso_8859-7': + case 'iso_8859-7:1987': + case 'sun_eu_greek': + return 'ISO-8859-7' + case 'csiso88598e': + case 'csisolatinhebrew': + case 'hebrew': + case 'iso-8859-8': + case 'iso-8859-8-e': + case 'iso-ir-138': + case 'iso8859-8': + case 'iso88598': + case 'iso_8859-8': + case 'iso_8859-8:1988': + case 'visual': + return 'ISO-8859-8' + case 'csiso88598i': + case 'iso-8859-8-i': + case 'logical': + return 'ISO-8859-8-I' + case 'csisolatin6': + case 'iso-8859-10': + case 'iso-ir-157': + case 'iso8859-10': + case 'iso885910': + case 'l6': + case 'latin6': + return 'ISO-8859-10' + case 'iso-8859-13': + case 'iso8859-13': + case 'iso885913': + return 'ISO-8859-13' + case 'iso-8859-14': + case 'iso8859-14': + case 'iso885914': + return 'ISO-8859-14' + case 'csisolatin9': + case 'iso-8859-15': + case 'iso8859-15': + case 'iso885915': + case 'iso_8859-15': + case 'l9': + return 'ISO-8859-15' + case 'iso-8859-16': + return 'ISO-8859-16' + case 'cskoi8r': + case 'koi': + case 'koi8': + case 'koi8-r': + case 'koi8_r': + return 'KOI8-R' + case 'koi8-ru': + case 'koi8-u': + return 'KOI8-U' + case 'csmacintosh': + case 'mac': + case 'macintosh': + case 'x-mac-roman': + return 'macintosh' + case 'iso-8859-11': + case 'iso8859-11': + case 'iso885911': + case 'tis-620': + case 'windows-874': + return 'windows-874' + case 'cp1250': + case 'windows-1250': + case 'x-cp1250': + return 'windows-1250' + case 'cp1251': + case 'windows-1251': + case 'x-cp1251': + return 'windows-1251' + case 'ansi_x3.4-1968': + case 'ascii': + case 'cp1252': + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso-8859-1': + case 'iso-ir-100': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'iso_8859-1:1987': + case 'l1': + case 'latin1': + case 'us-ascii': + case 'windows-1252': + case 'x-cp1252': + return 'windows-1252' + case 'cp1253': + case 'windows-1253': + case 'x-cp1253': + return 'windows-1253' + case 'cp1254': + case 'csisolatin5': + case 'iso-8859-9': + case 'iso-ir-148': + case 'iso8859-9': + case 'iso88599': + case 'iso_8859-9': + case 'iso_8859-9:1989': + case 'l5': + case 'latin5': + case 'windows-1254': + case 'x-cp1254': + return 'windows-1254' + case 'cp1255': + case 'windows-1255': + case 'x-cp1255': + return 'windows-1255' + case 'cp1256': + case 'windows-1256': + case 'x-cp1256': + return 'windows-1256' + case 'cp1257': + case 'windows-1257': + case 'x-cp1257': + return 'windows-1257' + case 'cp1258': + case 'windows-1258': + case 'x-cp1258': + return 'windows-1258' + case 'x-mac-cyrillic': + case 'x-mac-ukrainian': + return 'x-mac-cyrillic' + case 'chinese': + case 'csgb2312': + case 'csiso58gb231280': + case 'gb2312': + case 'gb_2312': + case 'gb_2312-80': + case 'gbk': + case 'iso-ir-58': + case 'x-gbk': + return 'GBK' + case 'gb18030': + return 'gb18030' + case 'big5': + case 'big5-hkscs': + case 'cn-big5': + case 'csbig5': + case 'x-x-big5': + return 'Big5' + case 'cseucpkdfmtjapanese': + case 'euc-jp': + case 'x-euc-jp': + return 'EUC-JP' + case 'csiso2022jp': + case 'iso-2022-jp': + return 'ISO-2022-JP' + case 'csshiftjis': + case 'ms932': + case 'ms_kanji': + case 'shift-jis': + case 'shift_jis': + case 'sjis': + case 'windows-31j': + case 'x-sjis': + return 'Shift_JIS' + case 'cseuckr': + case 'csksc56011987': + case 'euc-kr': + case 'iso-ir-149': + case 'korean': + case 'ks_c_5601-1987': + case 'ks_c_5601-1989': + case 'ksc5601': + case 'ksc_5601': + case 'windows-949': + return 'EUC-KR' + case 'csiso2022kr': + case 'hz-gb-2312': + case 'iso-2022-cn': + case 'iso-2022-cn-ext': + case 'iso-2022-kr': + case 'replacement': + return 'replacement' + case 'unicodefffe': + case 'utf-16be': + return 'UTF-16BE' + case 'csunicode': + case 'iso-10646-ucs-2': + case 'ucs-2': + case 'unicode': + case 'unicodefeff': + case 'utf-16': + case 'utf-16le': + return 'UTF-16LE' + case 'x-user-defined': + return 'x-user-defined' + default: return 'failure' } +} - // Increment counter as we have new several streams open - ++h2State.openStreams +module.exports = { + getEncoding +} - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { - stream.pause() - } - }) +/***/ }), - stream.once('end', () => { - request.onComplete([]) - }) +/***/ 1446: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) +"use strict"; - stream.once('close', () => { - h2State.openStreams -= 1 - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) { - session.unref() - } - }) - stream.once('error', function (err) { - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.destroy(stream, err) - } - }) +const { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} = __nccwpck_require__(87530) +const { + kState, + kError, + kResult, + kEvents, + kAborted +} = __nccwpck_require__(29054) +const { webidl } = __nccwpck_require__(21744) +const { kEnumerableProperty } = __nccwpck_require__(83983) - stream.once('frameError', (type, code) => { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - errorRequest(client, request, err) +class FileReader extends EventTarget { + constructor () { + super() - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.destroy(stream, err) + this[kState] = 'empty' + this[kResult] = null + this[kError] = null + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null } - }) + } - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer (blob) { + webidl.brandCheck(this, FileReader) - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' }) - // stream.on('push', headers => { - // // TODO(HTTP/2): Suppor push - // }) + blob = webidl.converters.Blob(blob, { strict: false }) - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) + // The readAsArrayBuffer(blob) method, when invoked, + // must initiate a read operation for blob with ArrayBuffer. + readOperation(this, blob, 'ArrayBuffer') + } - return true + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString (blob) { + webidl.brandCheck(this, FileReader) - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body) { - request.onRequestSent() - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - stream.cork() - stream.write(body) - stream.uncork() - stream.end() - request.onBodySent(body) - request.onRequestSent() - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable({ - client, - request, - contentLength, - h2stream: stream, - expectsPayload, - body: body.stream(), - socket: client[kSocket], - header: '' - }) - } else { - writeBlob({ - body, - client, - request, - contentLength, - expectsPayload, - h2stream: stream, - header: '', - socket: client[kSocket] - }) - } - } else if (util.isStream(body)) { - writeStream({ - body, - client, - request, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: '' - }) - } else if (util.isIterable(body)) { - writeIterable({ - body, - client, - request, - contentLength, - expectsPayload, - header: '', - h2stream: stream, - socket: client[kSocket] - }) - } else { - assert(false) - } - } -} + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' }) -function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') + blob = webidl.converters.Blob(blob, { strict: false }) - if (client[kHTTPConnVersion] === 'h2') { - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(body, err) - util.destroy(h2stream, err) - } else { - request.onRequestSent() - } - } - ) + // The readAsBinaryString(blob) method, when invoked, + // must initiate a read operation for blob with BinaryString. + readOperation(this, blob, 'BinaryString') + } - pipe.on('data', onPipeData) - pipe.once('end', () => { - pipe.removeListener('data', onPipeData) - util.destroy(pipe) - }) + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText (blob, encoding = undefined) { + webidl.brandCheck(this, FileReader) - function onPipeData (chunk) { - request.onBodySent(chunk) + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + if (encoding !== undefined) { + encoding = webidl.converters.DOMString(encoding) } - return + // The readAsText(blob, encoding) method, when invoked, + // must initiate a read operation for blob with Text and encoding. + readOperation(this, blob, 'Text', encoding) } - let finished = false + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL (blob) { + webidl.brandCheck(this, FileReader) - const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' }) - const onData = function (chunk) { - if (finished) { - return - } + blob = webidl.converters.Blob(blob, { strict: false }) - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } + // The readAsDataURL(blob) method, when invoked, must + // initiate a read operation for blob with DataURL. + readOperation(this, blob, 'DataURL') } - const onDrain = function () { - if (finished) { - return - } - if (body.resume) { - body.resume() - } - } - const onAbort = function () { - if (finished) { - return - } - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - const onFinished = function (err) { - if (finished) { + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort () { + // 1. If this's state is "empty" or if this's state is + // "done" set this's result to null and terminate + // this algorithm. + if (this[kState] === 'empty' || this[kState] === 'done') { + this[kResult] = null return } - finished = true + // 2. If this's state is "loading" set this's state to + // "done" and set this's result to null. + if (this[kState] === 'loading') { + this[kState] = 'done' + this[kResult] = null + } - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) + // 3. If there are any tasks from this on the file reading + // task source in an affiliated task queue, then remove + // those tasks from that task queue. + this[kAborted] = true - socket - .off('drain', onDrain) - .off('error', onFinished) + // 4. Terminate the algorithm for the read method being processed. + // TODO - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('error', onFinished) - .removeListener('close', onAbort) + // 5. Fire a progress event called abort at this. + fireAProgressEvent('abort', this) - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } + // 6. If this's state is not "loading", fire a progress + // event called loadend at this. + if (this[kState] !== 'loading') { + fireAProgressEvent('loadend', this) } + } - writer.destroy(err) + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState () { + webidl.brandCheck(this, FileReader) - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.destroy(body) + switch (this[kState]) { + case 'empty': return this.EMPTY + case 'loading': return this.LOADING + case 'done': return this.DONE } } - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onAbort) + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result () { + webidl.brandCheck(this, FileReader) - if (body.resume) { - body.resume() + // The result attribute’s getter, when invoked, must return + // this's result. + return this[kResult] } - socket - .on('drain', onDrain) - .on('error', onFinished) -} + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error () { + webidl.brandCheck(this, FileReader) -async function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength === body.size, 'blob body must have content length') + // The error attribute’s getter, when invoked, must return + // this's error. + return this[kError] + } - const isH2 = client[kHTTPConnVersion] === 'h2' - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() - } + get onloadend () { + webidl.brandCheck(this, FileReader) - const buffer = Buffer.from(await body.arrayBuffer()) + return this[kEvents].loadend + } - if (isH2) { - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() + set onloadend (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].loadend) { + this.removeEventListener('loadend', this[kEvents].loadend) + } + + if (typeof fn === 'function') { + this[kEvents].loadend = fn + this.addEventListener('loadend', fn) } else { - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() + this[kEvents].loadend = null } + } - request.onBodySent(buffer) - request.onRequestSent() + get onerror () { + webidl.brandCheck(this, FileReader) - if (!expectsPayload) { - socket[kReset] = true + return this[kEvents].error + } + + set onerror (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].error) { + this.removeEventListener('error', this[kEvents].error) } - resume(client) - } catch (err) { - util.destroy(isH2 ? h2stream : socket, err) + if (typeof fn === 'function') { + this[kEvents].error = fn + this.addEventListener('error', fn) + } else { + this[kEvents].error = null + } } -} -async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') + get onloadstart () { + webidl.brandCheck(this, FileReader) - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } + return this[kEvents].loadstart } - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) + set onloadstart (fn) { + webidl.brandCheck(this, FileReader) - if (socket[kError]) { - reject(socket[kError]) + if (this[kEvents].loadstart) { + this.removeEventListener('loadstart', this[kEvents].loadstart) + } + + if (typeof fn === 'function') { + this[kEvents].loadstart = fn + this.addEventListener('loadstart', fn) } else { - callback = resolve + this[kEvents].loadstart = null } - }) + } - if (client[kHTTPConnVersion] === 'h2') { - h2stream - .on('close', onDrain) - .on('drain', onDrain) + get onprogress () { + webidl.brandCheck(this, FileReader) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } + return this[kEvents].progress + } - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - } catch (err) { - h2stream.destroy(err) - } finally { - request.onRequestSent() - h2stream.end() - h2stream - .off('close', onDrain) - .off('drain', onDrain) + set onprogress (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].progress) { + this.removeEventListener('progress', this[kEvents].progress) } - return + if (typeof fn === 'function') { + this[kEvents].progress = fn + this.addEventListener('progress', fn) + } else { + this[kEvents].progress = null + } } - socket - .on('close', onDrain) - .on('drain', onDrain) + get onload () { + webidl.brandCheck(this, FileReader) - const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } + return this[kEvents].load + } - if (!writer.write(chunk)) { - await waitForDrain() - } + set onload (fn) { + webidl.brandCheck(this, FileReader) + + if (this[kEvents].load) { + this.removeEventListener('load', this[kEvents].load) } - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) + if (typeof fn === 'function') { + this[kEvents].load = fn + this.addEventListener('load', fn) + } else { + this[kEvents].load = null + } } -} -class AsyncWriter { - constructor ({ socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header + get onabort () { + webidl.brandCheck(this, FileReader) - socket[kWriting] = true + return this[kEvents].abort } - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this + set onabort (fn) { + webidl.brandCheck(this, FileReader) - if (socket[kError]) { - throw socket[kError] + if (this[kEvents].abort) { + this.removeEventListener('abort', this[kEvents].abort) } - if (socket.destroyed) { - return false + if (typeof fn === 'function') { + this[kEvents].abort = fn + this.addEventListener('abort', fn) + } else { + this[kEvents].abort = null } + } +} - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } +// https://w3c.github.io/FileAPI/#dom-filereader-empty +FileReader.EMPTY = FileReader.prototype.EMPTY = 0 +// https://w3c.github.io/FileAPI/#dom-filereader-loading +FileReader.LOADING = FileReader.prototype.LOADING = 1 +// https://w3c.github.io/FileAPI/#dom-filereader-done +FileReader.DONE = FileReader.prototype.DONE = 2 - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } +Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'FileReader', + writable: false, + enumerable: false, + configurable: true + } +}) - process.emitWarning(new RequestContentLengthMismatchError()) - } +Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors +}) - socket.cork() +module.exports = { + FileReader +} - if (bytesWritten === 0) { - if (!expectsPayload) { - socket[kReset] = true - } - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } +/***/ }), - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } +/***/ 55504: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this.bytesWritten += len +"use strict"; - const ret = socket.write(chunk) - socket.uncork() +const { webidl } = __nccwpck_require__(21744) - request.onBodySent(chunk) +const kState = Symbol('ProgressEvent state') - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - } +/** + * @see https://xhr.spec.whatwg.org/#progressevent + */ +class ProgressEvent extends Event { + constructor (type, eventInitDict = {}) { + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - return ret + super(type, eventInitDict) + + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + } } - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() + get lengthComputable () { + webidl.brandCheck(this, ProgressEvent) - socket[kWriting] = false + return this[kState].lengthComputable + } - if (socket[kError]) { - throw socket[kError] - } + get loaded () { + webidl.brandCheck(this, ProgressEvent) - if (socket.destroyed) { - return - } + return this[kState].loaded + } - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. + get total () { + webidl.brandCheck(this, ProgressEvent) - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') - } + return this[kState].total + } +} - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } +webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: 'lengthComputable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'loaded', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'total', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false + } +]) + +module.exports = { + ProgressEvent +} - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } - resume(client) - } +/***/ }), - destroy (err) { - const { socket, client } = this +/***/ 29054: +/***/ ((module) => { - socket[kWriting] = false +"use strict"; - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - util.destroy(socket, err) - } - } -} -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } +module.exports = { + kState: Symbol('FileReader state'), + kResult: Symbol('FileReader result'), + kError: Symbol('FileReader error'), + kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), + kEvents: Symbol('FileReader events'), + kAborted: Symbol('FileReader aborted') } -module.exports = Client - /***/ }), -/***/ 56436: +/***/ 87530: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/* istanbul ignore file: only for Node 12 */ +const { + kState, + kError, + kResult, + kAborted, + kLastProgressEventFired +} = __nccwpck_require__(29054) +const { ProgressEvent } = __nccwpck_require__(55504) +const { getEncoding } = __nccwpck_require__(84854) +const { DOMException } = __nccwpck_require__(41037) +const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(685) +const { types } = __nccwpck_require__(73837) +const { StringDecoder } = __nccwpck_require__(71576) +const { btoa } = __nccwpck_require__(14300) -const { kConnected, kSize } = __nccwpck_require__(72785) +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} -class CompatWeakRef { - constructor (value) { - this.value = value +/** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ +function readOperation (fr, blob, type, encodingName) { + // 1. If fr’s state is "loading", throw an InvalidStateError + // DOMException. + if (fr[kState] === 'loading') { + throw new DOMException('Invalid state', 'InvalidStateError') } - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} + // 2. Set fr’s state to "loading". + fr[kState] = 'loading' -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } + // 3. Set fr’s result to null. + fr[kResult] = null - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } -} + // 4. Set fr’s error to null. + fr[kError] = null -module.exports = function () { - // FIXME: remove workaround when the Node bug is fixed - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE) { - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } - return { - WeakRef: global.WeakRef || CompatWeakRef, - FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer - } -} + // 5. Let stream be the result of calling get stream on blob. + /** @type {import('stream/web').ReadableStream} */ + const stream = blob.stream() + // 6. Let reader be the result of getting a reader from stream. + const reader = stream.getReader() -/***/ }), + // 7. Let bytes be an empty byte sequence. + /** @type {Uint8Array[]} */ + const bytes = [] -/***/ 20663: -/***/ ((module) => { + // 8. Let chunkPromise be the result of reading a chunk from + // stream with reader. + let chunkPromise = reader.read() -"use strict"; + // 9. Let isFirstChunk be true. + let isFirstChunk = true + // 10. In parallel, while true: + // Note: "In parallel" just means non-blocking + // Note 2: readOperation itself cannot be async as double + // reading the body would then reject the promise, instead + // of throwing an error. + ;(async () => { + while (!fr[kAborted]) { + // 1. Wait for chunkPromise to be fulfilled or rejected. + try { + const { done, value } = await chunkPromise -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 + // 2. If chunkPromise is fulfilled, and isFirstChunk is + // true, queue a task to fire a progress event called + // loadstart at fr. + if (isFirstChunk && !fr[kAborted]) { + queueMicrotask(() => { + fireAProgressEvent('loadstart', fr) + }) + } -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 + // 3. Set isFirstChunk to false. + isFirstChunk = false -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} + // 4. If chunkPromise is fulfilled with an object whose + // done property is false and whose value property is + // a Uint8Array object, run these steps: + if (!done && types.isUint8Array(value)) { + // 1. Let bs be the byte sequence represented by the + // Uint8Array object. + // 2. Append bs to bytes. + bytes.push(value) -/***/ }), + // 3. If roughly 50ms have passed since these steps + // were last invoked, queue a task to fire a + // progress event called progress at fr. + if ( + ( + fr[kLastProgressEventFired] === undefined || + Date.now() - fr[kLastProgressEventFired] >= 50 + ) && + !fr[kAborted] + ) { + fr[kLastProgressEventFired] = Date.now() + queueMicrotask(() => { + fireAProgressEvent('progress', fr) + }) + } -/***/ 41724: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 4. Set chunkPromise to the result of reading a + // chunk from stream with reader. + chunkPromise = reader.read() + } else if (done) { + // 5. Otherwise, if chunkPromise is fulfilled with an + // object whose done property is true, queue a task + // to run the following steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' -"use strict"; + // 2. Let result be the result of package data given + // bytes, type, blob’s type, and encodingName. + try { + const result = packageData(bytes, type, blob.type, encodingName) + // 4. Else: -const { parseSetCookie } = __nccwpck_require__(24408) -const { stringify, getHeadersList } = __nccwpck_require__(43121) -const { webidl } = __nccwpck_require__(21744) -const { Headers } = __nccwpck_require__(10554) + if (fr[kAborted]) { + return + } -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ + // 1. Set fr’s result to result. + fr[kResult] = result -/** - * @param {Headers} headers - * @returns {Record} - */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' }) + // 2. Fire a progress event called load at the fr. + fireAProgressEvent('load', fr) + } catch (error) { + // 3. If package data threw an exception error: - webidl.brandCheck(headers, Headers, { strict: false }) + // 1. Set fr’s error to error. + fr[kError] = error - const cookie = headers.get('cookie') - const out = {} + // 2. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + } - if (!cookie) { - return out - } + // 5. If fr’s state is not "loading", fire a progress + // event called loadend at the fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') + break + } + } catch (error) { + if (fr[kAborted]) { + return + } - out[name.trim()] = value.join('=') - } + // 6. Otherwise, if chunkPromise is rejected with an + // error error, queue a task to run the following + // steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' - return out -} + // 2. Set fr’s error to error. + fr[kError] = error -/** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} - */ -function deleteCookie (headers, name, attributes) { - webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) + // 3. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) - webidl.brandCheck(headers, Headers, { strict: false }) + // 4. If fr’s state is not "loading", fire a progress + // event called loadend at fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) - name = webidl.converters.DOMString(name) - attributes = webidl.converters.DeleteCookieAttributes(attributes) + break + } + } + })() +} - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes +/** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ +function fireAProgressEvent (e, reader) { + // The progress event e does not bubble. e.bubbles must be false + // The progress event e is NOT cancelable. e.cancelable must be false + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false }) + + reader.dispatchEvent(event) } /** - * @param {Headers} headers - * @returns {Cookie[]} + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) +function packageData (bytes, type, mimeType, encodingName) { + // 1. A Blob has an associated package data algorithm, given + // bytes, a type, a optional mimeType, and a optional + // encodingName, which switches on type and runs the + // associated steps: - webidl.brandCheck(headers, Headers, { strict: false }) + switch (type) { + case 'DataURL': { + // 1. Return bytes as a DataURL [RFC2397] subject to + // the considerations below: + // * Use mimeType as part of the Data URL if it is + // available in keeping with the Data URL + // specification [RFC2397]. + // * If mimeType is not available return a Data URL + // without a media-type. [RFC2397]. - const cookies = getHeadersList(headers).cookies + // https://datatracker.ietf.org/doc/html/rfc2397#section-3 + // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data + // mediatype := [ type "/" subtype ] *( ";" parameter ) + // data := *urlchar + // parameter := attribute "=" value + let dataURL = 'data:' - if (!cookies) { - return [] - } + const parsed = parseMIMEType(mimeType || 'application/octet-stream') - // In older versions of undici, cookies is a list of name:value. - return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) -} + if (parsed !== 'failure') { + dataURL += serializeAMimeType(parsed) + } -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) + dataURL += ';base64,' - webidl.brandCheck(headers, Headers, { strict: false }) + const decoder = new StringDecoder('latin1') - cookie = webidl.converters.Cookie(cookie) + for (const chunk of bytes) { + dataURL += btoa(decoder.write(chunk)) + } - const str = stringify(cookie) + dataURL += btoa(decoder.end()) - if (str) { - headers.append('Set-Cookie', stringify(cookie)) - } -} + return dataURL + } + case 'Text': { + // 1. Let encoding be failure + let encoding = 'failure' -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: null - } -]) + // 2. If the encodingName is present, set encoding to the + // result of getting an encoding from encodingName. + if (encodingName) { + encoding = getEncoding(encodingName) + } -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) + // 3. If encoding is failure, and mimeType is present: + if (encoding === 'failure' && mimeType) { + // 1. Let type be the result of parse a MIME type + // given mimeType. + const type = parseMIMEType(mimeType) + + // 2. If type is not failure, set encoding to the result + // of getting an encoding from type’s parameters["charset"]. + if (type !== 'failure') { + encoding = getEncoding(type.parameters.get('charset')) + } } - return new Date(value) - }), - key: 'expires', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: [] - } -]) + // 4. If encoding is failure, then set encoding to UTF-8. + if (encoding === 'failure') { + encoding = 'UTF-8' + } -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie + // 5. Decode bytes using fallback encoding encoding, and + // return the result. + return decode(bytes, encoding) + } + case 'ArrayBuffer': { + // Return a new ArrayBuffer whose contents are bytes. + const sequence = combineByteSequences(bytes) + + return sequence.buffer + } + case 'BinaryString': { + // Return bytes as a binary string, in which every byte + // is represented by a code unit of equal value [0..255]. + let binaryString = '' + + const decoder = new StringDecoder('latin1') + + for (const chunk of bytes) { + binaryString += decoder.write(chunk) + } + + binaryString += decoder.end() + + return binaryString + } + } } +/** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ +function decode (ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue) + + // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. + const BOMEncoding = BOMSniffing(bytes) + + let slice = 0 + + // 2. If BOMEncoding is non-null: + if (BOMEncoding !== null) { + // 1. Set encoding to BOMEncoding. + encoding = BOMEncoding + + // 2. Read three bytes from ioQueue, if BOMEncoding is + // UTF-8; otherwise read two bytes. + // (Do nothing with those bytes.) + slice = BOMEncoding === 'UTF-8' ? 3 : 2 + } + + // 3. Process a queue with an instance of encoding’s + // decoder, ioQueue, output, and "replacement". -/***/ }), + // 4. Return output. -/***/ 24408: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const sliced = bytes.slice(slice) + return new TextDecoder(encoding).decode(sliced) +} -"use strict"; +/** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ +function BOMSniffing (ioQueue) { + // 1. Let BOM be the result of peeking 3 bytes from ioQueue, + // converted to a byte sequence. + const [a, b, c] = ioQueue + // 2. For each of the rows in the table below, starting with + // the first one and going down, if BOM starts with the + // bytes given in the first column, then return the + // encoding given in the cell in the second column of that + // row. Otherwise, return null. + if (a === 0xEF && b === 0xBB && c === 0xBF) { + return 'UTF-8' + } else if (a === 0xFE && b === 0xFF) { + return 'UTF-16BE' + } else if (a === 0xFF && b === 0xFE) { + return 'UTF-16LE' + } -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(20663) -const { isCTLExcludingHtab } = __nccwpck_require__(43121) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(685) -const assert = __nccwpck_require__(39491) + return null +} /** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned + * @param {Uint8Array[]} sequences */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } +function combineByteSequences (sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength + }, 0) - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' + let offset = 0 - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } + return sequences.reduce((a, b) => { + a.set(b, offset) + offset += b.byteLength + return a + }, new Uint8Array(size)) +} - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: +module.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header - } - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } +/***/ }), - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() +/***/ 21892: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } +"use strict"; - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } + +// We include a version number for the Dispatcher API. In case of breaking changes, +// this version number must be increased to avoid conflicts. +const globalDispatcher = Symbol.for('undici.globalDispatcher.1') +const { InvalidArgumentError } = __nccwpck_require__(48045) +const Agent = __nccwpck_require__(7890) + +if (getGlobalDispatcher() === undefined) { + setGlobalDispatcher(new Agent()) } -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList +function setGlobalDispatcher (agent) { + if (!agent || typeof agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument agent must implement Agent') } + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }) +} - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) +function getGlobalDispatcher () { + return globalThis[globalDispatcher] +} - let cookieAv = '' +module.exports = { + setGlobalDispatcher, + getGlobalDispatcher +} - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } +/***/ }), - // Let the cookie-av string be the characters consumed in this step. +/***/ 46930: +/***/ ((module) => { - let attributeName = '' - let attributeValue = '' +"use strict"; - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: +module.exports = class DecoratorHandler { + constructor (handler) { + this.handler = handler + } - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv + onConnect (...args) { + return this.handler.onConnect(...args) } - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() + onError (...args) { + return this.handler.onError(...args) + } - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + onUpgrade (...args) { + return this.handler.onUpgrade(...args) } - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() + onHeaders (...args) { + return this.handler.onHeaders(...args) + } - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) + onData (...args) { + return this.handler.onData(...args) + } - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. + onComplete (...args) { + return this.handler.onComplete(...args) + } - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. + onBodySent (...args) { + return this.handler.onBodySent(...args) + } +} - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } +/***/ }), - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } +/***/ 72860: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) +"use strict"; - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) +const util = __nccwpck_require__(83983) +const { kBodyUsed } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { InvalidArgumentError } = __nccwpck_require__(48045) +const EE = __nccwpck_require__(82361) - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds +const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. +const kBody = Symbol('body') - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue +class BodyAsyncIterable { + constructor (body) { + this[kBody] = body + this[kBodyUsed] = false + } - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) + async * [Symbol.asyncIterator] () { + assert(!this[kBodyUsed], 'disturbed') + this[kBodyUsed] = true + yield * this[kBody] + } +} + +class RedirectHandler { + constructor (dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError('maxRedirections must be a positive number') } - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() + util.validateHandler(handler, opts.method, opts.upgrade) - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. + this.dispatch = dispatch + this.location = null + this.abort = null + this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy + this.maxRedirections = maxRedirections + this.handler = handler + this.history = [] - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: + if (util.isStream(this.opts.body)) { + // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp + // so that it can be dispatched again? + // TODO (fix): Do we need 100-expect support to provide a way to do this properly? + if (util.bodyLength(this.opts.body) === 0) { + this.opts.body + .on('data', function () { + assert(false) + }) + } - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue + if (typeof this.opts.body.readableDidRead !== 'boolean') { + this.opts.body[kBodyUsed] = false + EE.prototype.on.call(this.opts.body, 'data', function () { + this[kBodyUsed] = true + }) + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { + // TODO (fix): We can't access ReadableStream internal state + // to determine whether or not it has been disturbed. This is just + // a workaround. + this.opts.body = new BodyAsyncIterable(this.opts.body) + } else if ( + this.opts.body && + typeof this.opts.body !== 'string' && + !ArrayBuffer.isView(this.opts.body) && + util.isIterable(this.opts.body) + ) { + // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + this.opts.body = new BodyAsyncIterable(this.opts.body) } + } - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. + onConnect (abort) { + this.abort = abort + this.handler.onConnect(abort, { history: this.history }) + } - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. + onUpgrade (statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket) + } - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: + onError (error) { + this.handler.onError(error) + } - // 1. Let enforcement be "Default". - let enforcement = 'Default' + onHeaders (statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) + ? null + : parseLocation(statusCode, headers) - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)) } - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' + if (!this.location) { + return this.handler.onHeaders(statusCode, headers, resume, statusText) } - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) + const path = search ? `${pathname}${search}` : pathname - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] + // Remove headers referring to the original URL. + // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. + // https://tools.ietf.org/html/rfc7231#section-6.4 + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) + this.opts.path = path + this.opts.origin = origin + this.opts.maxRedirections = 0 + this.opts.query = null - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) + // https://tools.ietf.org/html/rfc7231#section-6.4.4 + // In case of HTTP 303, always replace method to be either HEAD or GET + if (statusCode === 303 && this.opts.method !== 'HEAD') { + this.opts.method = 'GET' + this.opts.body = null + } } - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 43121: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + onData (chunk) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 -"use strict"; + TLDR: undici always ignores 3xx response bodies. + Redirection is used to serve the requested resource from another URL, so it is assumes that + no body is generated (and thus can be ignored). Even though generating a body is not prohibited. -const assert = __nccwpck_require__(39491) -const { kHeadersList } = __nccwpck_require__(72785) + For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually + (which means it's optional and not mandated) contain just an hyperlink to the value of + the Location response header, so the body can be ignored safely. -function isCTLExcludingHtab (value) { - if (value.length === 0) { - return false + For status 300, which is "Multiple Choices", the spec mentions both generating a Location + response header AND a response body with the other possible location to follow. + Since the spec explicitily chooses not to specify a format for such body and leave it to + servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. + */ + } else { + return this.handler.onData(chunk) + } } - for (const char of value) { - const code = char.charCodeAt(0) + onComplete (trailers) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 - if ( - (code >= 0x00 || code <= 0x08) || - (code >= 0x0A || code <= 0x1F) || - code === 0x7F - ) { - return false - } - } -} + TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections + and neither are useful if present. + + See comment on onData method above for more detailed informations. + */ -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (const char of name) { - const code = char.charCodeAt(0) + this.location = null + this.abort = null - if ( - (code <= 0x20 || code > 0x7F) || - char === '(' || - char === ')' || - char === '>' || - char === '<' || - char === '@' || - char === ',' || - char === ';' || - char === ':' || - char === '\\' || - char === '"' || - char === '/' || - char === '[' || - char === ']' || - char === '?' || - char === '=' || - char === '{' || - char === '}' - ) { - throw new Error('Invalid cookie name') + this.dispatch(this.opts, this) + } else { + this.handler.onComplete(trailers) } } -} - -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - for (const char of value) { - const code = char.charCodeAt(0) - if ( - code < 0x21 || // exclude CTLs (0-31) - code === 0x22 || - code === 0x2C || - code === 0x3B || - code === 0x5C || - code > 0x7E // non-ascii - ) { - throw new Error('Invalid header value') + onBodySent (chunk) { + if (this.handler.onBodySent) { + this.handler.onBodySent(chunk) } } } -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (const char of path) { - const code = char.charCodeAt(0) +function parseLocation (statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) { + return null + } - if (code < 0x21 || char === ';') { - throw new Error('Invalid cookie path') + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].toString().toLowerCase() === 'location') { + return headers[i + 1] } } } -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') - ) { - throw new Error('Invalid cookie domain') +// https://tools.ietf.org/html/rfc7231#section-6.4.4 +function shouldRemoveHeader (header, removeContent, unknownOrigin) { + if (header.length === 4) { + return util.headerNameToString(header) === 'host' + } + if (removeContent && util.headerNameToString(header).startsWith('content-')) { + return true + } + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header) + return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' } + return false } -/** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 - - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT +// https://tools.ietf.org/html/rfc7231#section-6.4 +function cleanRequestHeaders (headers, removeContent, unknownOrigin) { + const ret = [] + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { + ret.push(headers[i], headers[i + 1]) + } + } + } else if (headers && typeof headers === 'object') { + for (const key of Object.keys(headers)) { + if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, headers[key]) + } + } + } else { + assert(headers == null, 'headers must be an object or an array') + } + return ret +} - GMT = %x47.4D.54 ; "GMT", case-sensitive +module.exports = RedirectHandler - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) - } +/***/ }), - const days = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' - ] +/***/ 82286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - const months = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' - ] +const assert = __nccwpck_require__(39491) - const dayName = days[date.getUTCDay()] - const day = date.getUTCDate().toString().padStart(2, '0') - const month = months[date.getUTCMonth()] - const year = date.getUTCFullYear() - const hour = date.getUTCHours().toString().padStart(2, '0') - const minute = date.getUTCMinutes().toString().padStart(2, '0') - const second = date.getUTCSeconds().toString().padStart(2, '0') +const { kRetryHandlerDefaultRetry } = __nccwpck_require__(72785) +const { RequestRetryError } = __nccwpck_require__(48045) +const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(83983) - return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT` -} +function calculateRetryAfterHeader (retryAfter) { + const current = Date.now() + const diff = new Date(retryAfter).getTime() - current -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') - } + return diff } -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - validateCookieValue(cookie.value) - - const out = [`${cookie.name}=${cookie.value}`] +class RetryHandler { + constructor (opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes + } = retryOptions ?? {} - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } + this.dispatch = handlers.dispatch + this.handler = handlers.handler + this.opts = dispatchOpts + this.abort = null + this.aborted = false + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1000, // 30s, + timeout: minTimeout ?? 500, // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + errorCodes: errorCodes ?? [ + 'ECONNRESET', + 'ECONNREFUSED', + 'ENOTFOUND', + 'ENETDOWN', + 'ENETUNREACH', + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'EPIPE' + ] + } - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' - } + this.retryCount = 0 + this.start = 0 + this.end = null + this.etag = null + this.resume = null - if (cookie.secure) { - out.push('Secure') + // Handle possible onConnect duplication + this.handler.onConnect(reason => { + this.aborted = true + if (this.abort) { + this.abort(reason) + } else { + this.reason = reason + } + }) } - if (cookie.httpOnly) { - out.push('HttpOnly') + onRequestSent () { + if (this.handler.onRequestSent) { + this.handler.onRequestSent() + } } - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) + onUpgrade (statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket) + } } - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) + onConnect (abort) { + if (this.aborted) { + abort(this.reason) + } else { + this.abort = abort + } } - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) + onBodySent (chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk) } - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) - } + static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { + const { statusCode, code, headers } = err + const { method, retryOptions } = opts + const { + maxRetries, + timeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions + let { counter, currentTimeout } = state - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) - } + currentTimeout = + currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') + // Any code that is not a Undici's originated and allowed to retry + if ( + code && + code !== 'UND_ERR_REQ_RETRY' && + code !== 'UND_ERR_SOCKET' && + !errorCodes.includes(code) + ) { + cb(err) + return } - const [key, ...value] = part.split('=') + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err) + return + } - out.push(`${key.trim()}=${value.join('=')}`) - } + // If a set of status code are provided and the current status code is not in the list + if ( + statusCode != null && + Array.isArray(statusCodes) && + !statusCodes.includes(statusCode) + ) { + cb(err) + return + } - return out.join('; ') -} + // If we reached the max number of retries + if (counter > maxRetries) { + cb(err) + return + } -let kHeadersListNode + let retryAfterHeader = headers != null && headers['retry-after'] + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader) + retryAfterHeader = isNaN(retryAfterHeader) + ? calculateRetryAfterHeader(retryAfterHeader) + : retryAfterHeader * 1e3 // Retry-After is in seconds + } -function getHeadersList (headers) { - if (headers[kHeadersList]) { - return headers[kHeadersList] - } + const retryTimeout = + retryAfterHeader > 0 + ? Math.min(retryAfterHeader, maxTimeout) + : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) - if (!kHeadersListNode) { - kHeadersListNode = Object.getOwnPropertySymbols(headers).find( - (symbol) => symbol.description === 'headers list' - ) + state.currentTimeout = retryTimeout - assert(kHeadersListNode, 'Headers cannot be parsed') + setTimeout(() => cb(null), retryTimeout) } - const headersList = headers[kHeadersListNode] - assert(headersList) + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders) - return headersList -} + this.retryCount += 1 -module.exports = { - isCTLExcludingHtab, - stringify, - getHeadersList -} + if (statusCode >= 300) { + this.abort( + new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null -/***/ }), + if (statusCode !== 206) { + return true + } -/***/ 82067: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const contentRange = parseRangeHeader(headers['content-range']) + // If no content range + if (!contentRange) { + this.abort( + new RequestRetryError('Content-Range mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } -"use strict"; + // Let's start with a weak etag check + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError('ETag mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + const { start, size, end = size } = contentRange -const net = __nccwpck_require__(41808) -const assert = __nccwpck_require__(39491) -const util = __nccwpck_require__(83983) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(48045) + assert(this.start === start, 'content-range mismatch') + assert(this.end == null || this.end === end, 'content-range mismatch') -let tls // include tls conditionally since it is not always available + this.resume = resume + return true + } -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = parseRangeHeader(headers['content-range']) -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) } - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } + const { start, size, end = size } = range - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } + assert( + start != null && Number.isFinite(start) && this.start !== start, + 'content-range mismatch' + ) + assert(Number.isFinite(start)) + assert( + end != null && Number.isFinite(end) && this.end !== end, + 'invalid content-length' + ) - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return + this.start = start + this.end = end } - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers['content-length'] + this.end = contentLength != null ? Number(contentLength) : null } - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } + assert(Number.isFinite(this.start)) + assert( + this.end == null || Number.isFinite(this.end), + 'invalid content-length' + ) - this._sessionCache.set(sessionKey, session) + this.resume = resume + this.etag = headers.etag != null ? headers.etag : null + + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) } - } -} -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } + const err = new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(24404) - } - servername = servername || options.servername || util.getServerName(host) || null + this.abort(err) - const sessionKey = servername || hostname - const session = sessionCache.get(sessionKey) || null + return false + } - assert(sessionKey) + onData (chunk) { + this.start += chunk.length - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port: port || 443, - host: hostname - }) + return this.handler.onData(chunk) + } - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port: port || 80, - host: hostname - }) - } + onComplete (rawTrailers) { + this.retryCount = 0 + return this.handler.onComplete(rawTrailers) + } - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) + onError (err) { + if (this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) } - const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - cancelTimeout() + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + onRetry.bind(this) + ) - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - cancelTimeout() + function onRetry (err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } - if (callback) { - const cb = callback - callback = null - cb(err) + if (this.start !== 0) { + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + range: `bytes=${this.start}-${this.end ?? ''}` + } } - }) - - return socket - } -} - -function setupTimeout (onConnectTimeout, timeout) { - if (!timeout) { - return () => {} - } + } - let s1 = null - let s2 = null - const timeoutId = setTimeout(() => { - // setImmediate is added to make sure that we priotorise socket error events over timeouts - s1 = setImmediate(() => { - if (process.platform === 'win32') { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout()) - } else { - onConnectTimeout() + try { + this.dispatch(this.opts, this) + } catch (err) { + this.handler.onError(err) } - }) - }, timeout) - return () => { - clearTimeout(timeoutId) - clearImmediate(s1) - clearImmediate(s2) + } } } -function onConnectTimeout (socket) { - util.destroy(socket, new ConnectTimeoutError()) -} - -module.exports = buildConnector +module.exports = RetryHandler /***/ }), -/***/ 48045: -/***/ ((module) => { +/***/ 38861: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } -} +const RedirectHandler = __nccwpck_require__(72860) -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ConnectTimeoutError) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } -} +function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept (opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, HeadersTimeoutError) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } -} + if (!maxRedirections) { + return dispatch(opts, handler) + } -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, HeadersOverflowError) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) + opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. + return dispatch(opts, redirectHandler) + } } } -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, BodyTimeoutError) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } -} +module.exports = createRedirectInterceptor -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - Error.captureStackTrace(this, ResponseStatusCodeError) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } -} -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InvalidArgumentError) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } -} +/***/ }), -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InvalidReturnValueError) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } -} +/***/ 30953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -class RequestAbortedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, RequestAbortedError) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; +const utils_1 = __nccwpck_require__(41891); +// C headers +var ERROR; +(function (ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; +})(ERROR = exports.ERROR || (exports.ERROR = {})); +var TYPE; +(function (TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; +})(TYPE = exports.TYPE || (exports.TYPE = {})); +var FLAGS; +(function (FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + // 1 << 8 is unused + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; +})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); +var LENIENT_FLAGS; +(function (LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; +})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); +var METHODS; +(function (METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + /* pathological */ + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + /* WebDAV */ + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + /* subversion */ + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + /* upnp */ + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + /* RFC-5789 */ + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + /* CalDAV */ + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + /* RFC-2068, section 19.6.1.2 */ + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + /* icecast */ + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + /* RFC-7540, section 11.6 */ + METHODS[METHODS["PRI"] = 34] = "PRI"; + /* RFC-2326 RTSP */ + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + /* RAOP */ + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; +})(METHODS = exports.METHODS || (exports.METHODS = {})); +exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS['M-SEARCH'], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + METHODS.SOURCE, +]; +exports.METHODS_ICE = [ + METHODS.SOURCE, +]; +exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + // For AirPlay + METHODS.GET, + METHODS.POST, +]; +exports.METHOD_MAP = utils_1.enumToMap(METHODS); +exports.H_METHOD_MAP = {}; +Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) { + exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + } +}); +var FINISH; +(function (FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; +})(FINISH = exports.FINISH || (exports.FINISH = {})); +exports.ALPHA = []; +for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { + // Upper case + exports.ALPHA.push(String.fromCharCode(i)); + // Lower case + exports.ALPHA.push(String.fromCharCode(i + 0x20)); +} +exports.NUM_MAP = { + 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, + 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, +}; +exports.HEX_MAP = { + 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, + 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, + A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, + a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, +}; +exports.NUM = [ + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', +]; +exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); +exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; +exports.USERINFO_CHARS = exports.ALPHANUM + .concat(exports.MARK) + .concat(['%', ';', ':', '&', '=', '+', '$', ',']); +// TODO(indutny): use RFC +exports.STRICT_URL_CHAR = [ + '!', '"', '$', '%', '&', '\'', + '(', ')', '*', '+', ',', '-', '.', '/', + ':', ';', '<', '=', '>', + '@', '[', '\\', ']', '^', '_', + '`', + '{', '|', '}', '~', +].concat(exports.ALPHANUM); +exports.URL_CHAR = exports.STRICT_URL_CHAR + .concat(['\t', '\f']); +// All characters with 0x80 bit set to 1 +for (let i = 0x80; i <= 0xff; i++) { + exports.URL_CHAR.push(i); +} +exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); +/* Tokens as defined by rfc 2616. Also lowercases them. + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + */ +exports.STRICT_TOKEN = [ + '!', '#', '$', '%', '&', '\'', + '*', '+', '-', '.', + '^', '_', '`', + '|', '~', +].concat(exports.ALPHANUM); +exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); +/* + * Verify that a char is a valid visible (printable) US-ASCII + * character or %x80-FF + */ +exports.HEADER_CHARS = ['\t']; +for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports.HEADER_CHARS.push(i); + } } +// ',' = \x44 +exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); +exports.MAJOR = exports.NUM_MAP; +exports.MINOR = exports.MAJOR; +var HEADER_STATE; +(function (HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; +})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); +exports.SPECIAL_HEADERS = { + 'connection': HEADER_STATE.CONNECTION, + 'content-length': HEADER_STATE.CONTENT_LENGTH, + 'proxy-connection': HEADER_STATE.CONNECTION, + 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, + 'upgrade': HEADER_STATE.UPGRADE, +}; +//# sourceMappingURL=constants.js.map -class InformationalError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InformationalError) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } -} +/***/ }), -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, RequestContentLengthMismatchError) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } -} +/***/ 61145: +/***/ ((module) => { -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ResponseContentLengthMismatchError) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } -} +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ClientDestroyedError) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } -} -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ClientClosedError) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } -} +/***/ }), -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - Error.captureStackTrace(this, SocketError) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } -} +/***/ 95627: +/***/ ((module) => { -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, NotSupportedError) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } -} +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, NotSupportedError) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } -} -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - Error.captureStackTrace(this, HTTPParserError) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } -} +/***/ }), -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ResponseExceededMaxSizeError) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } -} +/***/ 41891: +/***/ ((__unused_webpack_module, exports) => { -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - Error.captureStackTrace(this, RequestRetryError) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } -} +"use strict"; -module.exports = { - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.enumToMap = void 0; +function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === 'number') { + res[key] = value; + } + }); + return res; } - +exports.enumToMap = enumToMap; +//# sourceMappingURL=utils.js.map /***/ }), -/***/ 62905: +/***/ 66771: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +const { kClients } = __nccwpck_require__(72785) +const Agent = __nccwpck_require__(7890) const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(48045) -const assert = __nccwpck_require__(39491) -const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(72785) -const util = __nccwpck_require__(83983) - -// tokenRegExp and headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js - -/** - * Verifies that the given val is a valid HTTP token - * per the rules defined in RFC 7230 - * See https://tools.ietf.org/html/rfc7230#section-3.2.6 - */ -const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/ - -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -const channels = {} + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory +} = __nccwpck_require__(24347) +const MockClient = __nccwpck_require__(58687) +const MockPool = __nccwpck_require__(26193) +const { matchValue, buildMockOptions } = __nccwpck_require__(79323) +const { InvalidArgumentError, UndiciError } = __nccwpck_require__(48045) +const Dispatcher = __nccwpck_require__(60412) +const Pluralizer = __nccwpck_require__(78891) +const PendingInterceptorsFormatter = __nccwpck_require__(86823) -let extractBody +class FakeWeakRef { + constructor (value) { + this.value = value + } -try { - const diagnosticsChannel = __nccwpck_require__(67643) - channels.create = diagnosticsChannel.channel('undici:request:create') - channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') - channels.headers = diagnosticsChannel.channel('undici:request:headers') - channels.trailers = diagnosticsChannel.channel('undici:request:trailers') - channels.error = diagnosticsChannel.channel('undici:request:error') -} catch { - channels.create = { hasSubscribers: false } - channels.bodySent = { hasSubscribers: false } - channels.headers = { hasSubscribers: false } - channels.trailers = { hasSubscribers: false } - channels.error = { hasSubscribers: false } + deref () { + return this.value + } } -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.exec(path) !== null) { - throw new InvalidArgumentError('invalid request path') - } - - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (tokenRegExp.exec(method) === null) { - throw new InvalidArgumentError('invalid request method') - } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') - } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') - } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') - } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') - } - - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (util.isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - util.destroy(this) - } - this.body.on('end', this.endHandler) - } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (util.isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') - } - - this.completed = false - - this.aborted = false - - this.upgrade = upgrade || null - - this.path = query ? util.buildURL(path, query) : path - - this.origin = origin - - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - - this.blocking = blocking == null ? false : blocking - - this.reset = reset == null ? null : reset - - this.host = null - - this.contentLength = null - - this.contentType = null - - this.headers = '' - - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - processHeader(this, key, headers[key]) - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - if (util.isFormDataLike(this.body)) { - if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { - throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') - } +class MockAgent extends Dispatcher { + constructor (opts) { + super(opts) - if (!extractBody) { - extractBody = (__nccwpck_require__(41472).extractBody) - } + this[kNetConnect] = true + this[kIsMockActive] = true - const [bodyStream, contentType] = extractBody(body) - if (this.contentType == null) { - this.contentType = contentType - this.headers += `content-type: ${contentType}\r\n` - } - this.body = bodyStream.stream - this.contentLength = bodyStream.length - } else if (util.isBlobLike(body) && this.contentType == null && body.type) { - this.contentType = body.type - this.headers += `content-type: ${body.type}\r\n` + // Instantiate Agent and encapsulate + if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') } + const agent = opts && opts.agent ? opts.agent : new Agent(opts) + this[kAgent] = agent - util.validateHandler(handler, method, upgrade) - - this.servername = util.getServerName(this.host) + this[kClients] = agent[kClients] + this[kOptions] = buildMockOptions(opts) + } - this[kHandler] = handler + get (origin) { + let dispatcher = this[kMockAgentGet](origin) - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) + if (!dispatcher) { + dispatcher = this[kFactory](origin) + this[kMockAgentSet](origin, dispatcher) } + return dispatcher } - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } + dispatch (opts, handler) { + // Call MockAgent.get to perform additional setup before dispatching as normal + this.get(opts.origin) + return this[kAgent].dispatch(opts, handler) } - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } - - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } + async close () { + await this[kAgent].close() + this[kClients].clear() } - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } + deactivate () { + this[kIsMockActive] = false } - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } + activate () { + this[kIsMockActive] = true } - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false + enableNetConnect (matcher) { + if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { + if (Array.isArray(this[kNetConnect])) { + this[kNetConnect].push(matcher) + } else { + this[kNetConnect] = [matcher] + } + } else if (typeof matcher === 'undefined') { + this[kNetConnect] = true + } else { + throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') } } - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) + disableNetConnect () { + this[kNetConnect] = false + } - return this[kHandler].onUpgrade(statusCode, headers, socket) + // This is required to bypass issues caused by using global symbols - see: + // https://github.com/nodejs/undici/issues/1447 + get isMockActive () { + return this[kIsMockActive] } - onComplete (trailers) { - this.onFinally() + [kMockAgentSet] (origin, dispatcher) { + this[kClients].set(origin, new FakeWeakRef(dispatcher)) + } - assert(!this.aborted) + [kFactory] (origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]) + return this[kOptions] && this[kOptions].connections === 1 + ? new MockClient(origin, mockOptions) + : new MockPool(origin, mockOptions) + } - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) + [kMockAgentGet] (origin) { + // First check if we can immediately find it + const ref = this[kClients].get(origin) + if (ref) { + return ref.deref() } - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) + // If the origin is not a string create a dummy parent pool and return to user + if (typeof origin !== 'string') { + const dispatcher = this[kFactory]('http://localhost:9999') + this[kMockAgentSet](origin, dispatcher) + return dispatcher } - } - - onError (error) { - this.onFinally() - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) + // If we match, create a pool and assign the same dispatches + for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { + const nonExplicitDispatcher = nonExplicitRef.deref() + if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin) + this[kMockAgentSet](origin, dispatcher) + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] + return dispatcher + } } + } - if (this.aborted) { - return - } - this.aborted = true + [kGetNetConnect] () { + return this[kNetConnect] + } - return this[kHandler].onError(error) + pendingInterceptors () { + const mockAgentClients = this[kClients] + + return Array.from(mockAgentClients.entries()) + .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin }))) + .filter(({ pending }) => pending) } - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } + assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors() - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null + if (pending.length === 0) { + return } - } - // TODO: adjust to support H2 - addHeader (key, value) { - processHeader(this, key, value) - return this - } + const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - static [kHTTP1BuildRequest] (origin, opts, handler) { - // TODO: Migrate header parsing here, to make Requests - // HTTP agnostic - return new Request(origin, opts, handler) + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: + +${pendingInterceptorsFormatter.format(pending)} +`.trim()) } +} - static [kHTTP2BuildRequest] (origin, opts, handler) { - const headers = opts.headers - opts = { ...opts, headers: null } +module.exports = MockAgent - const request = new Request(origin, opts, handler) - request.headers = {} +/***/ }), - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(request, headers[i], headers[i + 1], true) - } - } else if (headers && typeof headers === 'object') { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - processHeader(request, key, headers[key], true) - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } +/***/ 58687: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return request - } +"use strict"; - static [kHTTP2CopyHeaders] (raw) { - const rawHeaders = raw.split('\r\n') - const headers = {} - for (const header of rawHeaders) { - const [key, value] = header.split(': ') +const { promisify } = __nccwpck_require__(73837) +const Client = __nccwpck_require__(33598) +const { buildMockDispatch } = __nccwpck_require__(79323) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(24347) +const { MockInterceptor } = __nccwpck_require__(90410) +const Symbols = __nccwpck_require__(72785) +const { InvalidArgumentError } = __nccwpck_require__(48045) - if (value == null || value.length === 0) continue +/** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ +class MockClient extends Client { + constructor (origin, opts) { + super(origin, opts) - if (headers[key]) headers[key] += `,${value}` - else headers[key] = value + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') } - return headers - } -} + this[kMockAgent] = opts.agent + this[kOrigin] = origin + this[kDispatches] = [] + this[kConnected] = 1 + this[kOriginalDispatch] = this.dispatch + this[kOriginalClose] = this.close.bind(this) -function processHeaderValue (key, val, skipAppend) { - if (val && typeof val === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) + this.dispatch = buildMockDispatch.call(this) + this.close = this[kClose] } - val = val != null ? `${val}` : '' - - if (headerCharRegex.exec(val) !== null) { - throw new InvalidArgumentError(`invalid ${key} header`) + get [Symbols.kConnected] () { + return this[kConnected] } - return skipAppend ? val : `${key}: ${val}\r\n` -} - -function processHeader (request, key, val, skipAppend = false) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept (opts) { + return new MockInterceptor(opts, this[kDispatches]) } - if ( - request.host === null && - key.length === 4 && - key.toLowerCase() === 'host' - ) { - if (headerCharRegex.exec(val) !== null) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - // Consumed by Client - request.host = val - } else if ( - request.contentLength === null && - key.length === 14 && - key.toLowerCase() === 'content-length' - ) { - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') - } - } else if ( - request.contentType === null && - key.length === 12 && - key.toLowerCase() === 'content-type' - ) { - request.contentType = val - if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) - else request.headers += processHeaderValue(key, val) - } else if ( - key.length === 17 && - key.toLowerCase() === 'transfer-encoding' - ) { - throw new InvalidArgumentError('invalid transfer-encoding header') - } else if ( - key.length === 10 && - key.toLowerCase() === 'connection' - ) { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } else if (value === 'close') { - request.reset = true - } - } else if ( - key.length === 10 && - key.toLowerCase() === 'keep-alive' - ) { - throw new InvalidArgumentError('invalid keep-alive header') - } else if ( - key.length === 7 && - key.toLowerCase() === 'upgrade' - ) { - throw new InvalidArgumentError('invalid upgrade header') - } else if ( - key.length === 6 && - key.toLowerCase() === 'expect' - ) { - throw new NotSupportedError('expect header not supported') - } else if (tokenRegExp.exec(key) === null) { - throw new InvalidArgumentError('invalid header key') - } else { - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` - else request.headers[key] = processHeaderValue(key, val[i], skipAppend) - } else { - request.headers += processHeaderValue(key, val[i]) - } - } - } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) - else request.headers += processHeaderValue(key, val) - } + async [kClose] () { + await promisify(this[kOriginalClose])() + this[kConnected] = 0 + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) } } -module.exports = Request +module.exports = MockClient /***/ }), -/***/ 72785: -/***/ ((module) => { +/***/ 50888: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { UndiciError } = __nccwpck_require__(48045) + +class MockNotMatchedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, MockNotMatchedError) + this.name = 'MockNotMatchedError' + this.message = message || 'The request does not match any registered mock dispatches' + this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' + } +} module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kHeadersList: Symbol('headers list'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kHTTP2BuildRequest: Symbol('http2 build request'), - kHTTP1BuildRequest: Symbol('http1 build request'), - kHTTP2CopyHeaders: Symbol('http2 copy headers'), - kHTTPConnVersion: Symbol('http connection version'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable') + MockNotMatchedError } /***/ }), -/***/ 83983: +/***/ 90410: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const assert = __nccwpck_require__(39491) -const { kDestroyed, kBodyUsed } = __nccwpck_require__(72785) -const { IncomingMessage } = __nccwpck_require__(13685) -const stream = __nccwpck_require__(12781) -const net = __nccwpck_require__(41808) +const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(79323) +const { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch +} = __nccwpck_require__(24347) const { InvalidArgumentError } = __nccwpck_require__(48045) -const { Blob } = __nccwpck_require__(14300) -const nodeUtil = __nccwpck_require__(73837) -const { stringify } = __nccwpck_require__(63477) +const { buildURL } = __nccwpck_require__(83983) -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) +/** + * Defines the scope API for an interceptor reply + */ +class MockScope { + constructor (mockDispatch) { + this[kMockDispatch] = mockDispatch + } -function nop () {} + /** + * Delay a reply by a set amount in ms. + */ + delay (waitInMs) { + if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { + throw new InvalidArgumentError('waitInMs must be a valid integer > 0') + } -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} + this[kMockDispatch].delay = waitInMs + return this + } -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - return (Blob && object instanceof Blob) || ( - object && - typeof object === 'object' && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - /^(Blob|File)$/.test(object[Symbol.toStringTag]) - ) + /** + * For a defined reply, never mark as consumed. + */ + persist () { + this[kMockDispatch].persist = true + return this + } + + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times (repeatTimes) { + if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { + throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') + } + + this[kMockDispatch].times = repeatTimes + return this + } } -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } +/** + * Defines an interceptor for a Mock + */ +class MockInterceptor { + constructor (opts, mockDispatches) { + if (typeof opts !== 'object') { + throw new InvalidArgumentError('opts must be an object') + } + if (typeof opts.path === 'undefined') { + throw new InvalidArgumentError('opts.path must be defined') + } + if (typeof opts.method === 'undefined') { + opts.method = 'GET' + } + // See https://github.com/nodejs/undici/issues/1245 + // As per RFC 3986, clients are not supposed to send URI + // fragments to servers when they retrieve a document, + if (typeof opts.path === 'string') { + if (opts.query) { + opts.path = buildURL(opts.path, opts.query) + } else { + // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 + const parsedURL = new URL(opts.path, 'data://') + opts.path = parsedURL.pathname + parsedURL.search + } + } + if (typeof opts.method === 'string') { + opts.method = opts.method.toUpperCase() + } + + this[kDispatchKey] = buildKey(opts) + this[kDispatches] = mockDispatches + this[kDefaultHeaders] = {} + this[kDefaultTrailers] = {} + this[kContentLength] = false + } + + createMockScopeDispatchData (statusCode, data, responseOptions = {}) { + const responseData = getResponseData(data) + const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} + const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } + const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } + + return { statusCode, data, headers, trailers } + } + + validateReplyParameters (statusCode, data, responseOptions) { + if (typeof statusCode === 'undefined') { + throw new InvalidArgumentError('statusCode must be defined') + } + if (typeof data === 'undefined') { + throw new InvalidArgumentError('data must be defined') + } + if (typeof responseOptions !== 'object') { + throw new InvalidArgumentError('responseOptions must be an object') + } + } + + /** + * Mock an undici request with a defined reply. + */ + reply (replyData) { + // Values of reply aren't available right now as they + // can only be available when the reply callback is invoked. + if (typeof replyData === 'function') { + // We'll first wrap the provided callback in another function, + // this function will properly resolve the data from the callback + // when invoked. + const wrappedDefaultsCallback = (opts) => { + // Our reply options callback contains the parameter for statusCode, data and options. + const resolvedData = replyData(opts) + + // Check if it is in the right format + if (typeof resolvedData !== 'object') { + throw new InvalidArgumentError('reply options callback must return an object') + } + + const { statusCode, data = '', responseOptions = {} } = resolvedData + this.validateReplyParameters(statusCode, data, responseOptions) + // Since the values can be obtained immediately we return them + // from this higher order function that will be resolved later. + return { + ...this.createMockScopeDispatchData(statusCode, data, responseOptions) + } + } + + // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) + return new MockScope(newMockDispatch) + } - const stringified = stringify(queryParams) + // We can have either one or three parameters, if we get here, + // we should have 1-3 parameters. So we spread the arguments of + // this function to obtain the parameters, since replyData will always + // just be the statusCode. + const [statusCode, data = '', responseOptions = {}] = [...arguments] + this.validateReplyParameters(statusCode, data, responseOptions) - if (stringified) { - url += '?' + stringified + // Send in-already provided data like usual + const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) + return new MockScope(newMockDispatch) } - return url -} + /** + * Mock an undici request with a defined error. + */ + replyWithError (error) { + if (typeof error === 'undefined') { + throw new InvalidArgumentError('error must be defined') + } -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) + return new MockScope(newMockDispatch) + } - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders (headers) { + if (typeof headers === 'undefined') { + throw new InvalidArgumentError('headers must be defined') } - return url + this[kDefaultHeaders] = headers + return this } - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers (trailers) { + if (typeof trailers === 'undefined') { + throw new InvalidArgumentError('trailers must be defined') + } + + this[kDefaultTrailers] = trailers + return this } - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength () { + this[kContentLength] = true + return this } +} - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } +module.exports.MockInterceptor = MockInterceptor +module.exports.MockScope = MockScope - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } +/***/ }), - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } +/***/ 26193: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') - } +"use strict"; - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol}//${url.hostname}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - if (origin.endsWith('/')) { - origin = origin.substring(0, origin.length - 1) - } +const { promisify } = __nccwpck_require__(73837) +const Pool = __nccwpck_require__(4634) +const { buildMockDispatch } = __nccwpck_require__(79323) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(24347) +const { MockInterceptor } = __nccwpck_require__(90410) +const Symbols = __nccwpck_require__(72785) +const { InvalidArgumentError } = __nccwpck_require__(48045) - if (path && !path.startsWith('/')) { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - url = new URL(origin + path) - } +/** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ +class MockPool extends Pool { + constructor (origin, opts) { + super(origin, opts) - return url -} + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') + } -function parseOrigin (url) { - url = parseURL(url) + this[kMockAgent] = opts.agent + this[kOrigin] = origin + this[kDispatches] = [] + this[kConnected] = 1 + this[kOriginalDispatch] = this.dispatch + this[kOriginalClose] = this.close.bind(this) - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') + this.dispatch = buildMockDispatch.call(this) + this.close = this[kClose] } - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) + get [Symbols.kConnected] () { + return this[kConnected] } - const idx = host.indexOf(':') - if (idx === -1) return host + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept (opts) { + return new MockInterceptor(opts, this[kDispatches]) + } - return host.substring(0, idx) + async [kClose] () { + await promisify(this[kOriginalClose])() + this[kConnected] = 0 + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) + } } -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null - } +module.exports = MockPool - assert.strictEqual(typeof host, 'string') - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } +/***/ }), - return servername -} +/***/ 24347: +/***/ ((module) => { -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} +"use strict"; -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) +module.exports = { + kAgent: Symbol('agent'), + kOptions: Symbol('options'), + kFactory: Symbol('factory'), + kDispatches: Symbol('dispatches'), + kDispatchKey: Symbol('dispatch key'), + kDefaultHeaders: Symbol('default headers'), + kDefaultTrailers: Symbol('default trailers'), + kContentLength: Symbol('content length'), + kMockAgent: Symbol('mock agent'), + kMockAgentSet: Symbol('mock agent set'), + kMockAgentGet: Symbol('mock agent get'), + kMockDispatch: Symbol('mock dispatch'), + kClose: Symbol('close'), + kOriginalClose: Symbol('original agent close'), + kOrigin: Symbol('origin'), + kIsMockActive: Symbol('is mock active'), + kNetConnect: Symbol('net connect'), + kGetNetConnect: Symbol('get net connect'), + kConnected: Symbol('connected') } -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} -function isDestroyed (stream) { - return !stream || !!(stream.destroyed || stream[kDestroyed]) -} +/***/ }), -function isReadableAborted (stream) { - const state = stream && stream._readableState - return isDestroyed(stream) && state && !state.endEmitted -} +/***/ 79323: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } +"use strict"; - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null - } - stream.destroy(err) - } else if (err) { - process.nextTick((stream, err) => { - stream.emit('error', err) - }, stream, err) +const { MockNotMatchedError } = __nccwpck_require__(50888) +const { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect +} = __nccwpck_require__(24347) +const { buildURL, nop } = __nccwpck_require__(83983) +const { STATUS_CODES } = __nccwpck_require__(13685) +const { + types: { + isPromise } +} = __nccwpck_require__(73837) - if (stream.destroyed !== true) { - stream[kDestroyed] = true +function matchValue (match, value) { + if (typeof match === 'string') { + return match === value } + if (match instanceof RegExp) { + return match.test(value) + } + if (typeof match === 'function') { + return match(value) === true + } + return false } -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null +function lowerCaseEntries (headers) { + return Object.fromEntries( + Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue] + }) + ) } -function parseHeaders (headers, obj = {}) { - // For H2 support - if (!Array.isArray(headers)) return headers - - for (let i = 0; i < headers.length; i += 2) { - const key = headers[i].toString().toLowerCase() - let val = obj[key] - - if (!val) { - if (Array.isArray(headers[i + 1])) { - obj[key] = headers[i + 1].map(x => x.toString('utf8')) - } else { - obj[key] = headers[i + 1].toString('utf8') - } - } else { - if (!Array.isArray(val)) { - val = [val] - obj[key] = val +/** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ +function getHeaderByName (headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { + return headers[i + 1] } - val.push(headers[i + 1].toString('utf8')) } - } - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') + return undefined + } else if (typeof headers.get === 'function') { + return headers.get(key) + } else { + return lowerCaseEntries(headers)[key.toLocaleLowerCase()] } +} - return obj +/** @param {string[]} headers */ +function buildHeadersFromArray (headers) { // fetch HeadersList + const clone = headers.slice() + const entries = [] + for (let index = 0; index < clone.length; index += 2) { + entries.push([clone[index], clone[index + 1]]) + } + return Object.fromEntries(entries) } -function parseRawHeaders (headers) { - const ret = [] - let hasContentLength = false - let contentDispositionIdx = -1 +function matchHeaders (mockDispatch, headers) { + if (typeof mockDispatch.headers === 'function') { + if (Array.isArray(headers)) { // fetch HeadersList + headers = buildHeadersFromArray(headers) + } + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) + } + if (typeof mockDispatch.headers === 'undefined') { + return true + } + if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { + return false + } - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0].toString() - const val = headers[n + 1].toString('utf8') + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { + const headerValue = getHeaderByName(headers, matchHeaderName) - if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - ret.push(key, val) - hasContentLength = true - } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = ret.push(key, val) - 1 - } else { - ret.push(key, val) + if (!matchValue(matchHeaderValue, headerValue)) { + return false } } + return true +} - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') +function safeUrl (path) { + if (typeof path !== 'string') { + return path } - return ret + const pathSegments = path.split('?') + + if (pathSegments.length !== 2) { + return path + } + + const qp = new URLSearchParams(pathSegments.pop()) + qp.sort() + return [...pathSegments, qp.toString()].join('?') } -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) +function matchKey (mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path) + const methodMatch = matchValue(mockDispatch.method, method) + const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true + const headersMatch = matchHeaders(mockDispatch, headers) + return pathMatch && methodMatch && bodyMatch && headersMatch } -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') +function getResponseData (data) { + if (Buffer.isBuffer(data)) { + return data + } else if (typeof data === 'object') { + return JSON.stringify(data) + } else { + return data.toString() } +} - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } +function getMockDispatch (mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path + const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') + // Match path + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) } - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') + // Match method + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`) } - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') - } + // Match body + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`) + } - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') - } + // Match headers + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`) } -} -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - return !!(body && ( - stream.isDisturbed - ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? - : body[kBodyUsed] || - body.readableDidRead || - (body._readableState && body._readableState.dataEmitted) || - isReadableAborted(body) - )) + return matchedMockDispatches[0] } -function isErrored (body) { - return !!(body && ( - stream.isErrored - ? stream.isErrored(body) - : /state: 'errored'/.test(nodeUtil.inspect(body) - ))) +function addMockDispatch (mockDispatches, key, data) { + const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } + const replyData = typeof data === 'function' ? { callback: data } : { ...data } + const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } + mockDispatches.push(newMockDispatch) + return newMockDispatch } -function isReadable (body) { - return !!(body && ( - stream.isReadable - ? stream.isReadable(body) - : /state: 'readable'/.test(nodeUtil.inspect(body) - ))) +function deleteMockDispatch (mockDispatches, key) { + const index = mockDispatches.findIndex(dispatch => { + if (!dispatch.consumed) { + return false + } + return matchKey(dispatch, key) + }) + if (index !== -1) { + mockDispatches.splice(index, 1) + } } -function getSocketInfo (socket) { +function buildKey (opts) { + const { path, method, body, headers, query } = opts return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead + path, + method, + body, + headers, + query } } -async function * convertIterableToBuffer (iterable) { - for await (const chunk of iterable) { - yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) - } +function generateKeyValues (data) { + return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ + ...keyValuePairs, + Buffer.from(`${key}`), + Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`) + ], []) } -let ReadableStream -function ReadableStreamFrom (iterable) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) +/** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ +function getStatusText (statusCode) { + return STATUS_CODES[statusCode] || 'unknown' +} + +async function getResponse (body) { + const buffers = [] + for await (const data of body) { + buffers.push(data) } + return Buffer.concat(buffers).toString('utf8') +} - if (ReadableStream.from) { - return ReadableStream.from(convertIterableToBuffer(iterable)) +/** + * Mock dispatch function used to simulate undici dispatches + */ +function mockDispatch (opts, handler) { + // Get mock dispatch from built key + const key = buildKey(opts) + const mockDispatch = getMockDispatch(this[kDispatches], key) + + mockDispatch.timesInvoked++ + + // Here's where we resolve a callback if a callback is present for the dispatch data. + if (mockDispatch.data.callback) { + mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } } - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - controller.enqueue(new Uint8Array(buf)) - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - } - }, - 0 - ) -} + // Parse mockDispatch data + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch + const { timesInvoked, times } = mockDispatch -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} + // If it's used up and not persistent, mark as consumed + mockDispatch.consumed = !persist && timesInvoked >= times + mockDispatch.pending = timesInvoked < times -function throwIfAborted (signal) { - if (!signal) { return } - if (typeof signal.throwIfAborted === 'function') { - signal.throwIfAborted() - } else { - if (signal.aborted) { - // DOMException not available < v17.0.0 - const err = new Error('The operation was aborted') - err.name = 'AbortError' - throw err - } + // If specified, trigger dispatch error + if (error !== null) { + deleteMockDispatch(this[kDispatches], key) + handler.onError(error) + return true } -} -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) + // Handle the request with a delay if necessary + if (typeof delay === 'number' && delay > 0) { + setTimeout(() => { + handleReply(this[kDispatches]) + }, delay) + } else { + handleReply(this[kDispatches]) } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} -const hasToWellFormed = !!String.prototype.toWellFormed + function handleReply (mockDispatches, _data = data) { + // fetch's HeadersList is a 1D string array + const optsHeaders = Array.isArray(opts.headers) + ? buildHeadersFromArray(opts.headers) + : opts.headers + const body = typeof _data === 'function' + ? _data({ ...opts, headers: optsHeaders }) + : _data -/** - * @param {string} val - */ -function toUSVString (val) { - if (hasToWellFormed) { - return `${val}`.toWellFormed() - } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val) + // util.types.isPromise is likely needed for jest. + if (isPromise(body)) { + // If handleReply is asynchronous, throwing an error + // in the callback will reject the promise, rather than + // synchronously throw the error, which breaks some tests. + // Rather, we wait for the callback to resolve if it is a + // promise, and then re-run handleReply with the new body. + body.then((newData) => handleReply(mockDispatches, newData)) + return + } + + const responseData = getResponseData(body) + const responseHeaders = generateKeyValues(headers) + const responseTrailers = generateKeyValues(trailers) + + handler.abort = nop + handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)) + handler.onData(Buffer.from(responseData)) + handler.onComplete(responseTrailers) + deleteMockDispatch(mockDispatches, key) } - return `${val}` + function resume () {} + + return true } -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } +function buildMockDispatch () { + const agent = this[kMockAgent] + const origin = this[kOrigin] + const originalDispatch = this[kOriginalDispatch] - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null + return function dispatch (opts, handler) { + if (agent.isMockActive) { + try { + mockDispatch.call(this, opts, handler) + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect]() + if (netConnect === false) { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) + } + if (checkNetConnect(netConnect, origin)) { + originalDispatch.call(this, opts, handler) + } else { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) + } + } else { + throw error + } } - : null + } else { + originalDispatch.call(this, opts, handler) + } + } } -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true +function checkNetConnect (netConnect, origin) { + const url = new URL(origin) + if (netConnect === true) { + return true + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + return true + } + return false +} + +function buildMockOptions (opts) { + if (opts) { + const { agent, ...mockOptions } = opts + return mockOptions + } +} module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isReadableAborted, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - throwIfAborted, - addAbortListener, - parseRangeHeader, - nodeMajor, - nodeMinor, - nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName } /***/ }), -/***/ 74839: +/***/ 86823: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Dispatcher = __nccwpck_require__(60412) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(48045) -const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(72785) - -const kDestroyed = Symbol('destroyed') -const kClosed = Symbol('closed') -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') - -class DispatcherBase extends Dispatcher { - constructor () { - super() +const { Transform } = __nccwpck_require__(12781) +const { Console } = __nccwpck_require__(96206) - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - } +/** + * Gets the output of `console.table(…)` as a string. + */ +module.exports = class PendingInterceptorsFormatter { + constructor ({ disableColors } = {}) { + this.transform = new Transform({ + transform (chunk, _enc, cb) { + cb(null, chunk) + } + }) - get destroyed () { - return this[kDestroyed] + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { + colors: !disableColors && !process.env.CI + } + }) } - get closed () { - return this[kClosed] - } + format (pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map( + ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + 'Status code': statusCode, + Persistent: persist ? '✅' : '❌', + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })) - get interceptors () { - return this[kInterceptors] + this.logger.table(withPrettyHeaders) + return this.transform.read().toString() } +} - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - - this[kInterceptors] = newInterceptors - } - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } +/***/ }), - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } +/***/ 78891: +/***/ ((module) => { - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } +"use strict"; - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } - this[kClosed] = true - this[kOnClosed].push(callback) +const singulars = { + pronoun: 'it', + is: 'is', + was: 'was', + this: 'this' +} - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } +const plurals = { + pronoun: 'they', + is: 'are', + was: 'were', + this: 'these' +} - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) +module.exports = class Pluralizer { + constructor (singular, plural) { + this.singular = singular + this.plural = plural } - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } + pluralize (count) { + const one = count === 1 + const keys = one ? singulars : plurals + const noun = one ? this.singular : this.plural + return { ...keys, count, noun } + } +} - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } +/***/ }), - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } +/***/ 68266: +/***/ ((module) => { - if (!err) { - err = new ClientDestroyedError() - } +"use strict"; +/* eslint-disable */ - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } +// Extracted from node/lib/internal/fixed_queue.js - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } +// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. +const kSize = 2048; +const kMask = kSize - 1; - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) +// The FixedQueue is implemented as a singly-linked list of fixed-size +// circular buffers. It looks something like this: +// +// head tail +// | | +// v v +// +-----------+ <-----\ +-----------+ <------\ +-----------+ +// | [null] | \----- | next | \------- | next | +// +-----------+ +-----------+ +-----------+ +// | item | <-- bottom | item | <-- bottom | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | bottom --> | item | +// | item | | item | | item | +// | ... | | ... | | ... | +// | item | | item | | item | +// | item | | item | | item | +// | [empty] | <-- top | item | | item | +// | [empty] | | item | | item | +// | [empty] | | [empty] | <-- top top --> | [empty] | +// +-----------+ +-----------+ +-----------+ +// +// Or, if there is only one circular buffer, it looks something +// like either of these: +// +// head tail head tail +// | | | | +// v v v v +// +-----------+ +-----------+ +// | [null] | | [null] | +// +-----------+ +-----------+ +// | [empty] | | item | +// | [empty] | | item | +// | item | <-- bottom top --> | [empty] | +// | item | | [empty] | +// | [empty] | <-- top bottom --> | item | +// | [empty] | | item | +// +-----------+ +-----------+ +// +// Adding a value means moving `top` forward by one, removing means +// moving `bottom` forward by one. After reaching the end, the queue +// wraps around. +// +// When `top === bottom` the current queue is empty and when +// `top + 1 === bottom` it's full. This wastes a single space of storage +// but allows much quicker checks. + +class FixedCircularBuffer { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; } - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } + isEmpty() { + return this.top === this.bottom; + } - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } + isFull() { + return ((this.top + 1) & kMask) === this.bottom; + } - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } + push(data) { + this.list[this.top] = data; + this.top = (this.top + 1) & kMask; + } - if (this[kClosed]) { - throw new ClientClosedError() - } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === undefined) + return null; + this.list[this.bottom] = undefined; + this.bottom = (this.bottom + 1) & kMask; + return nextItem; + } +} - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } +module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } - handler.onError(err) + isEmpty() { + return this.head.isEmpty(); + } - return false + push(data) { + if (this.head.isFull()) { + // Head is full: Creates a new queue, sets the old queue's `.next` to it, + // and sets it as the new main queue. + this.head = this.head.next = new FixedCircularBuffer(); } + this.head.push(data); } -} -module.exports = DispatcherBase + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + // If there is another queue, it forms the new tail. + this.tail = tail.next; + } + return next; + } +}; /***/ }), -/***/ 60412: +/***/ 73198: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const EventEmitter = __nccwpck_require__(82361) +const DispatcherBase = __nccwpck_require__(74839) +const FixedQueue = __nccwpck_require__(68266) +const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(72785) +const PoolStats = __nccwpck_require__(39689) -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } +const kClients = Symbol('clients') +const kNeedDrain = Symbol('needDrain') +const kQueue = Symbol('queue') +const kClosedResolve = Symbol('closed resolve') +const kOnDrain = Symbol('onDrain') +const kOnConnect = Symbol('onConnect') +const kOnDisconnect = Symbol('onDisconnect') +const kOnConnectionError = Symbol('onConnectionError') +const kGetDispatcher = Symbol('get dispatcher') +const kAddClient = Symbol('add client') +const kRemoveClient = Symbol('remove client') +const kStats = Symbol('stats') - close () { - throw new Error('not implemented') - } +class PoolBase extends DispatcherBase { + constructor () { + super() - destroy () { - throw new Error('not implemented') - } -} + this[kQueue] = new FixedQueue() + this[kClients] = [] + this[kQueued] = 0 -module.exports = Dispatcher + const pool = this + + this[kOnDrain] = function onDrain (origin, targets) { + const queue = pool[kQueue] + let needDrain = false -/***/ }), + while (!needDrain) { + const item = queue.shift() + if (!item) { + break + } + pool[kQueued]-- + needDrain = !this.dispatch(item.opts, item.handler) + } -/***/ 41472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + this[kNeedDrain] = needDrain -"use strict"; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false + pool.emit('drain', origin, [pool, ...targets]) + } + if (pool[kClosedResolve] && queue.isEmpty()) { + Promise + .all(pool[kClients].map(c => c.close())) + .then(pool[kClosedResolve]) + } + } -const Busboy = __nccwpck_require__(50727) -const util = __nccwpck_require__(83983) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody -} = __nccwpck_require__(52538) -const { FormData } = __nccwpck_require__(72015) -const { kState } = __nccwpck_require__(15861) -const { webidl } = __nccwpck_require__(21744) -const { DOMException, structuredClone } = __nccwpck_require__(41037) -const { Blob, File: NativeFile } = __nccwpck_require__(14300) -const { kBodyUsed } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { isErrored } = __nccwpck_require__(83983) -const { isUint8Array, isArrayBuffer } = __nccwpck_require__(29830) -const { File: UndiciFile } = __nccwpck_require__(78511) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) + this[kOnConnect] = (origin, targets) => { + pool.emit('connect', origin, [pool, ...targets]) + } -let ReadableStream = globalThis.ReadableStream + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit('disconnect', origin, [pool, ...targets], err) + } -/** @type {globalThis['File']} */ -const File = NativeFile ?? UndiciFile -const textEncoder = new TextEncoder() -const textDecoder = new TextDecoder() + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit('connectionError', origin, [pool, ...targets], err) + } -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) + this[kStats] = new PoolStats(this) } - // 1. Let stream be null. - let stream = null + get [kBusy] () { + return this[kNeedDrain] + } - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream. - stream = new ReadableStream({ - async pull (controller) { - controller.enqueue( - typeof source === 'string' ? textEncoder.encode(source) : source - ) - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: undefined - }) + get [kConnected] () { + return this[kClients].filter(client => client[kConnected]).length } - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) + get [kFree] () { + return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length + } - // 6. Let action be null. - let action = null + get [kPending] () { + let ret = this[kQueued] + for (const { [kPending]: pending } of this[kClients]) { + ret += pending + } + return ret + } - // 7. Let source be null. - let source = null + get [kRunning] () { + let ret = 0 + for (const { [kRunning]: running } of this[kClients]) { + ret += running + } + return ret + } - // 8. Let length be null. - let length = null + get [kSize] () { + let ret = this[kQueued] + for (const { [kSize]: size } of this[kClients]) { + ret += size + } + return ret + } - // 9. Let type be null. - let type = null + get stats () { + return this[kStats] + } - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object + async [kClose] () { + if (this[kQueue].isEmpty()) { + return Promise.all(this[kClients].map(c => c.close())) + } else { + return new Promise((resolve) => { + this[kClosedResolve] = resolve + }) + } + } - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams + async [kDestroy] (err) { + while (true) { + const item = this[kQueue].shift() + if (!item) { + break + } + item.handler.onError(err) + } - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 + return Promise.all(this[kClients].map(c => c.destroy(err))) + } - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() + [kDispatch] (opts, handler) { + const dispatcher = this[kGetDispatcher]() - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer + if (!dispatcher) { + this[kNeedDrain] = true + this[kQueue].push({ opts, handler }) + this[kQueued]++ + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true + this[kNeedDrain] = !this[kGetDispatcher]() + } - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView + return !this[kNeedDrain] + } - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` + [kAddClient] (client) { + client + .on('drain', this[kOnDrain]) + .on('connect', this[kOnConnect]) + .on('disconnect', this[kOnDisconnect]) + .on('connectionError', this[kOnConnectionError]) - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') + this[kClients].push(client) - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. + if (this[kNeedDrain]) { + process.nextTick(() => { + if (this[kNeedDrain]) { + this[kOnDrain](client[kUrl], [this, client]) + } + }) + } - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false + return this + } - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } + [kRemoveClient] (client) { + client.close(() => { + const idx = this[kClients].indexOf(client) + if (idx !== -1) { + this[kClients].splice(idx, 1) } - } + }) - const chunk = textEncoder.encode(`--${boundary}--`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null - } + this[kNeedDrain] = this[kClients].some(dispatcher => ( + !dispatcher[kNeedDrain] && + dispatcher.closed !== true && + dispatcher.destroyed !== true + )) + } +} - // Set source to object. - source = object +module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher +} - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } - } - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = 'multipart/form-data; boundary=' + boundary - } else if (isBlobLike(object)) { - // Blob +/***/ }), - // Set source to object. - source = object +/***/ 39689: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // Set length to object’s size. - length = object.size +const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(72785) +const kPool = Symbol('pool') - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') - } +class PoolStats { + constructor (pool) { + this[kPool] = pool + } - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } + get connected () { + return this[kPool][kConnected] + } - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) + get free () { + return this[kPool][kFree] } - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) + get pending () { + return this[kPool][kPending] } - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - }) - } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - controller.enqueue(new Uint8Array(value)) - } - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: undefined - }) + get queued () { + return this[kPool][kQueued] } - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } + get running () { + return this[kPool][kRunning] + } - // 14. Return (body, type). - return [body, type] + get size () { + return this[kPool][kSize] + } } -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - if (!ReadableStream) { - // istanbul ignore next - ReadableStream = (__nccwpck_require__(35356).ReadableStream) - } +module.exports = PoolStats - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } +/***/ }), + +/***/ 4634: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher +} = __nccwpck_require__(73198) +const Client = __nccwpck_require__(33598) +const { + InvalidArgumentError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { kUrl, kInterceptors } = __nccwpck_require__(72785) +const buildConnector = __nccwpck_require__(82067) - // 2. Return the results of extracting object. - return extractBody(object, keepalive) +const kOptions = Symbol('options') +const kConnections = Symbol('connections') +const kFactory = Symbol('factory') + +function defaultFactory (origin, opts) { + return new Client(origin, opts) } -function cloneBody (body) { - // To clone a body body, run these steps: +class Pool extends PoolBase { + constructor (origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + ...options + } = {}) { + super() - // https://fetch.spec.whatwg.org/#concept-body-clone + if (connections != null && (!Number.isFinite(connections) || connections < 0)) { + throw new InvalidArgumentError('invalid connections') + } - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - const out2Clone = structuredClone(out2, { transfer: [out2] }) - // This, for whatever reasons, unrefs out2Clone which allows - // the process to exit by itself. - const [, finalClone] = out2Clone.tee() + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } - // 2. Set body’s stream to out1. - body.stream = out1 + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') + } - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: finalClone, - length: body.length, - source: body.source - } -} + if (typeof connect !== 'function') { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) + } -async function * consumeBody (body) { - if (body) { - if (isUint8Array(body)) { - yield body - } else { - const stream = body.stream + this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) + ? options.interceptors.Pool + : [] + this[kConnections] = connections || null + this[kUrl] = util.parseOrigin(origin) + this[kOptions] = { ...util.deepClone(options), connect, allowH2 } + this[kOptions].interceptors = options.interceptors + ? { ...options.interceptors } + : undefined + this[kFactory] = factory - if (util.isDisturbed(stream)) { - throw new TypeError('The body has already been consumed.') + this.on('connectionError', (origin, targets, error) => { + // If a connection error occurs, we remove the client from the pool, + // and emit a connectionError event. They will not be re-used. + // Fixes https://github.com/nodejs/undici/issues/3895 + for (const target of targets) { + // Do not use kRemoveClient here, as it will close the client, + // but the client cannot be closed in this state. + const idx = this[kClients].indexOf(target) + if (idx !== -1) { + this[kClients].splice(idx, 1) + } } + }) + } - if (stream.locked) { - throw new TypeError('The stream is locked.') - } + [kGetDispatcher] () { + let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) - // Compat. - stream[kBodyUsed] = true + if (dispatcher) { + return dispatcher + } - yield * stream + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + dispatcher = this[kFactory](this[kUrl], this[kOptions]) + this[kAddClient](dispatcher) } - } -} -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') + return dispatcher } } -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return specConsumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) +module.exports = Pool - if (mimeType === 'failure') { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, +/***/ }), - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return specConsumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, +/***/ 97858: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return specConsumeBody(this, utf8DecodeBytes, instance) - }, +"use strict"; - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return specConsumeBody(this, parseJSONFromBytes, instance) - }, - async formData () { - webidl.brandCheck(this, instance) +const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(72785) +const { URL } = __nccwpck_require__(57310) +const Agent = __nccwpck_require__(7890) +const Pool = __nccwpck_require__(4634) +const DispatcherBase = __nccwpck_require__(74839) +const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(48045) +const buildConnector = __nccwpck_require__(82067) - throwIfAborted(this[kState]) +const kAgent = Symbol('proxy agent') +const kClient = Symbol('proxy client') +const kProxyHeaders = Symbol('proxy headers') +const kRequestTls = Symbol('request tls settings') +const kProxyTls = Symbol('proxy tls settings') +const kConnectEndpoint = Symbol('connect endpoint function') - const contentType = this.headers.get('Content-Type') +function defaultProtocolPort (protocol) { + return protocol === 'https:' ? 443 : 80 +} - // If mimeType’s essence is "multipart/form-data", then: - if (/multipart\/form-data/.test(contentType)) { - const headers = {} - for (const [key, value] of this.headers) headers[key.toLowerCase()] = value +function buildProxyOptions (opts) { + if (typeof opts === 'string') { + opts = { uri: opts } + } - const responseFormData = new FormData() + if (!opts || !opts.uri) { + throw new InvalidArgumentError('Proxy opts.uri is mandatory') + } - let busboy + return { + uri: opts.uri, + protocol: opts.protocol || 'https' + } +} - try { - busboy = new Busboy({ - headers, - preservePath: true - }) - } catch (err) { - throw new DOMException(`${err}`, 'AbortError') - } +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} - busboy.on('field', (name, value) => { - responseFormData.append(name, value) - }) - busboy.on('file', (name, value, filename, encoding, mimeType) => { - const chunks = [] +class ProxyAgent extends DispatcherBase { + constructor (opts) { + super(opts) + this[kProxy] = buildProxyOptions(opts) + this[kAgent] = new Agent(opts) + this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) + ? opts.interceptors.ProxyAgent + : [] - if (encoding === 'base64' || encoding.toLowerCase() === 'base64') { - let base64chunk = '' + if (typeof opts === 'string') { + opts = { uri: opts } + } - value.on('data', (chunk) => { - base64chunk += chunk.toString().replace(/[\r\n]/gm, '') + if (!opts || !opts.uri) { + throw new InvalidArgumentError('Proxy opts.uri is mandatory') + } - const end = base64chunk.length - base64chunk.length % 4 - chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64')) + const { clientFactory = defaultFactory } = opts - base64chunk = base64chunk.slice(end) - }) - value.on('end', () => { - chunks.push(Buffer.from(base64chunk, 'base64')) - responseFormData.append(name, new File(chunks, filename, { type: mimeType })) - }) - } else { - value.on('data', (chunk) => { - chunks.push(chunk) - }) - value.on('end', () => { - responseFormData.append(name, new File(chunks, filename, { type: mimeType })) - }) - } - }) + if (typeof clientFactory !== 'function') { + throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') + } - const busboyResolve = new Promise((resolve, reject) => { - busboy.on('finish', resolve) - busboy.on('error', (err) => reject(new TypeError(err))) - }) + this[kRequestTls] = opts.requestTls + this[kProxyTls] = opts.proxyTls + this[kProxyHeaders] = opts.headers || {} - if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk) - busboy.end() - await busboyResolve + const resolvedUrl = new URL(opts.uri) + const { origin, port, host, username, password } = resolvedUrl - return responseFormData - } else if (/application\/x-www-form-urlencoded/.test(contentType)) { - // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then: + if (opts.auth && opts.token) { + throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') + } else if (opts.auth) { + /* @deprecated in favour of opts.token */ + this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` + } else if (opts.token) { + this[kProxyHeaders]['proxy-authorization'] = opts.token + } else if (username && password) { + this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` + } - // 1. Let entries be the result of parsing bytes. - let entries + const connect = buildConnector({ ...opts.proxyTls }) + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) + this[kClient] = clientFactory(resolvedUrl, { connect }) + this[kAgent] = new Agent({ + ...opts, + connect: async (opts, callback) => { + let requestedHost = opts.host + if (!opts.port) { + requestedHost += `:${defaultProtocolPort(opts.protocol)}` + } try { - let text = '' - // application/x-www-form-urlencoded parser will keep the BOM. - // https://url.spec.whatwg.org/#concept-urlencoded-parser - // Note that streaming decoder is stateful and cannot be reused - const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) - - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError('Expected Uint8Array chunk') + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedHost, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host } - text += streamingDecoder.decode(chunk, { stream: true }) + }) + if (statusCode !== 200) { + socket.on('error', () => {}).destroy() + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) } - text += streamingDecoder.decode() - entries = new URLSearchParams(text) + if (opts.protocol !== 'https:') { + callback(null, socket) + return + } + let servername + if (this[kRequestTls]) { + servername = this[kRequestTls].servername + } else { + servername = opts.servername + } + this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) } catch (err) { - // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. - // 2. If entries is failure, then throw a TypeError. - throw Object.assign(new TypeError(), { cause: err }) - } - - // 3. Return a new FormData object whose entries are entries. - const formData = new FormData() - for (const [name, value] of entries) { - formData.append(name, value) + callback(err) } - return formData - } else { - // Wait a tick before checking if the request has been aborted. - // Otherwise, a TypeError can be thrown when an AbortError should. - await Promise.resolve() - - throwIfAborted(this[kState]) - - // Otherwise, throw a TypeError. - throw webidl.errors.exception({ - header: `${instance.name}.formData`, - message: 'Could not parse content as FormData.' - }) } - } + }) } - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function specConsumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - throwIfAborted(object[kState]) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object[kState].body)) { - throw new TypeError('Body is unusable') + dispatch (opts, handler) { + const { host } = new URL(opts.origin) + const headers = buildHeaders(opts.headers) + throwIfProxyAuthIsSent(headers) + return this[kAgent].dispatch( + { + ...opts, + headers: { + ...headers, + host + } + }, + handler + ) } - // 2. Let promise be a new promise. - const promise = createDeferredPromise() - - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) - - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) - } + async [kClose] () { + await this[kAgent].close() + await this[kClient].close() } - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(new Uint8Array()) - return promise.promise + async [kDestroy] () { + await this[kAgent].destroy() + await this[kClient].destroy() } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (body) { - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) } /** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer + * @param {string[] | Record} headers + * @returns {Record} */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' - } +function buildHeaders (headers) { + // When using undici.fetch, the headers list is stored + // as an array. + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {} - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. + for (let i = 0; i < headers.length; i += 2) { + headersPair[headers[i]] = headers[i + 1] + } - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) + return headersPair } - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) + return headers } /** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} object + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons */ -function bodyMimeType (object) { - const { headersList } = object[kState] - const contentType = headersList.get('content-type') - - if (contentType === null) { - return 'failure' - } - - return parseMIMEType(contentType) -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody -} - - -/***/ }), - -/***/ 41037: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(71267) - -const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = [101, 204, 205, 304] - -const redirectStatus = [301, 302, 303, 307, 308] -const redirectStatusSet = new Set(redirectStatus) - -// https://fetch.spec.whatwg.org/#block-bad-port -const badPorts = [ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', - '10080' -] +function throwIfProxyAuthIsSent (headers) { + const existProxyAuth = headers && Object.keys(headers) + .find((key) => key.toLowerCase() === 'proxy-authorization') + if (existProxyAuth) { + throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') + } +} -const badPortsSet = new Set(badPorts) +module.exports = ProxyAgent -// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies -const referrerPolicy = [ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -] -const referrerPolicySet = new Set(referrerPolicy) -const requestRedirect = ['follow', 'manual', 'error'] +/***/ }), -const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] -const safeMethodsSet = new Set(safeMethods) +/***/ 29459: +/***/ ((module) => { -const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors'] +"use strict"; -const requestCredentials = ['omit', 'same-origin', 'include'] -const requestCache = [ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -] +let fastNow = Date.now() +let fastNowTimeout -// https://fetch.spec.whatwg.org/#request-body-header-name -const requestBodyHeader = [ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -] +const fastTimers = [] -// https://fetch.spec.whatwg.org/#enumdef-requestduplex -const requestDuplex = [ - 'half' -] +function onTimeout () { + fastNow = Date.now() -// http://fetch.spec.whatwg.org/#forbidden-method -const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK'] -const forbiddenMethodsSet = new Set(forbiddenMethods) + let len = fastTimers.length + let idx = 0 + while (idx < len) { + const timer = fastTimers[idx] -const subresource = [ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -] -const subresourceSet = new Set(subresource) + if (timer.state === 0) { + timer.state = fastNow + timer.delay + } else if (timer.state > 0 && fastNow >= timer.state) { + timer.state = -1 + timer.callback(timer.opaque) + } -/** @type {globalThis['DOMException']} */ -const DOMException = globalThis.DOMException ?? (() => { - // DOMException was only made a global in Node v17.0.0, - // but fetch supports >= v16.8. - try { - atob('~') - } catch (err) { - return Object.getPrototypeOf(err).constructor + if (timer.state === -1) { + timer.state = -2 + if (idx !== len - 1) { + fastTimers[idx] = fastTimers.pop() + } else { + fastTimers.pop() + } + len -= 1 + } else { + idx += 1 + } } -})() -let channel + if (fastTimers.length > 0) { + refreshTimeout() + } +} -/** @type {globalThis['structuredClone']} */ -const structuredClone = - globalThis.structuredClone ?? - // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js - // structuredClone was added in v17.0.0, but fetch supports v16.8 - function structuredClone (value, options = undefined) { - if (arguments.length === 0) { - throw new TypeError('missing argument') +function refreshTimeout () { + if (fastNowTimeout && fastNowTimeout.refresh) { + fastNowTimeout.refresh() + } else { + clearTimeout(fastNowTimeout) + fastNowTimeout = setTimeout(onTimeout, 1e3) + if (fastNowTimeout.unref) { + fastNowTimeout.unref() } + } +} - if (!channel) { - channel = new MessageChannel() +class Timeout { + constructor (callback, delay, opaque) { + this.callback = callback + this.delay = delay + this.opaque = opaque + + // -2 not in timer list + // -1 in timer list but inactive + // 0 in timer list waiting for time + // > 0 in timer list waiting for time to expire + this.state = -2 + + this.refresh() + } + + refresh () { + if (this.state === -2) { + fastTimers.push(this) + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout() + } } - channel.port1.unref() - channel.port2.unref() - channel.port1.postMessage(value, options?.transfer) - return receiveMessageOnPort(channel.port2).message + + this.state = 0 + } + + clear () { + this.state = -1 } +} module.exports = { - DOMException, - structuredClone, - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet + setTimeout (callback, delay, opaque) { + return delay < 1e3 + ? setTimeout(callback, delay, opaque) + : new Timeout(callback, delay, opaque) + }, + clearTimeout (timeout) { + if (timeout instanceof Timeout) { + timeout.clear() + } else { + clearTimeout(timeout) + } + } } /***/ }), -/***/ 685: +/***/ 35354: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const assert = __nccwpck_require__(39491) -const { atob } = __nccwpck_require__(14300) -const { isomorphicDecode } = __nccwpck_require__(52538) +"use strict"; -const encoder = new TextEncoder() + +const diagnosticsChannel = __nccwpck_require__(67643) +const { uid, states } = __nccwpck_require__(19188) +const { + kReadyState, + kSentClose, + kByteParser, + kReceivedClose +} = __nccwpck_require__(37578) +const { fireEvent, failWebsocketConnection } = __nccwpck_require__(25515) +const { CloseEvent } = __nccwpck_require__(52611) +const { makeRequest } = __nccwpck_require__(48359) +const { fetching } = __nccwpck_require__(74881) +const { Headers } = __nccwpck_require__(10554) +const { getGlobalDispatcher } = __nccwpck_require__(21892) +const { kHeadersList } = __nccwpck_require__(72785) + +const channels = {} +channels.open = diagnosticsChannel.channel('undici:websocket:open') +channels.close = diagnosticsChannel.channel('undici:websocket:close') +channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') + +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} catch { + +} /** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any) => void} onEstablish + * @param {Partial} options */ -const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line +function establishWebSocketConnection (url, protocols, ws, onEstablish, options) { + // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s + // scheme is "ws", and to "https" otherwise. + const requestURL = url -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') + requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) + // 2. Let request be a new request, whose URL is requestURL, client is client, + // service-workers mode is "none", referrer is "no-referrer", mode is + // "websocket", credentials mode is "include", cache mode is "no-store" , + // and redirect mode is "error". + const request = makeRequest({ + urlList: [requestURL], + serviceWorkers: 'none', + referrer: 'no-referrer', + mode: 'websocket', + credentials: 'include', + cache: 'no-store', + redirect: 'error' + }) - // 3. Remove the leading "data:" string from input. - input = input.slice(5) + // Note: undici extension, allow setting custom headers. + if (options.headers) { + const headersList = new Headers(options.headers)[kHeadersList] - // 4. Let position point at the start of input. - const position = { position: 0 } + request.headersList = headersList + } - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) + // 3. Append (`Upgrade`, `websocket`) to request’s header list. + // 4. Append (`Connection`, `Upgrade`) to request’s header list. + // Note: both of these are handled by undici currently. + // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) + // 5. Let keyValue be a nonce consisting of a randomly selected + // 16-byte value that has been forgiving-base64-encoded and + // isomorphic encoded. + const keyValue = crypto.randomBytes(16).toString('base64') - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' + // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s + // header list. + request.headersList.append('sec-websocket-key', keyValue) + + // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s + // header list. + request.headersList.append('sec-websocket-version', '13') + + // 8. For each protocol in protocols, combine + // (`Sec-WebSocket-Protocol`, protocol) in request’s header + // list. + for (const protocol of protocols) { + request.headersList.append('sec-websocket-protocol', protocol) } - // 8. Advance position by 1. - position.position++ + // 9. Let permessageDeflate be a user-agent defined + // "permessage-deflate" extension header value. + // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 + // TODO: enable once permessage-deflate is supported + const permessageDeflate = '' // 'permessage-deflate; 15' - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) + // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to + // request’s header list. + // request.headersList.append('sec-websocket-extensions', permessageDeflate) - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) + // 11. Fetch request with useParallelQueue set to true, and + // processResponse given response being these steps: + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher ?? getGlobalDispatcher(), + processResponse (response) { + // 1. If response is a network error or its status is not 101, + // fail the WebSocket connection. + if (response.type === 'error' || response.status !== 101) { + failWebsocketConnection(ws, 'Received network error or non-101 status code.') + return + } - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) + // 2. If protocols is not the empty list and extracting header + // list values given `Sec-WebSocket-Protocol` and response’s + // header list results in null, failure, or the empty byte + // sequence, then fail the WebSocket connection. + if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Server did not respond with sent protocols.') + return + } - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) + // 3. Follow the requirements stated step 2 to step 6, inclusive, + // of the last set of steps in section 4.1 of The WebSocket + // Protocol to validate response. This either results in fail + // the WebSocket connection or the WebSocket connection is + // established. - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } + // 2. If the response lacks an |Upgrade| header field or the |Upgrade| + // header field contains a value that is not an ASCII case- + // insensitive match for the value "websocket", the client MUST + // _Fail the WebSocket Connection_. + if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { + failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') + return + } - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) + // 3. If the response lacks a |Connection| header field or the + // |Connection| header field doesn't contain a token that is an + // ASCII case-insensitive match for the value "Upgrade", the client + // MUST _Fail the WebSocket Connection_. + if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { + failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') + return + } - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') + // 4. If the response lacks a |Sec-WebSocket-Accept| header field or + // the |Sec-WebSocket-Accept| contains a value other than the + // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- + // Key| (as a string, not base64-decoded) with the string "258EAFA5- + // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and + // trailing whitespace, the client MUST _Fail the WebSocket + // Connection_. + const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') + const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') + if (secWSAccept !== digest) { + failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') + return + } - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } + // 5. If the response includes a |Sec-WebSocket-Extensions| header + // field and this header field indicates the use of an extension + // that was not present in the client's handshake (the server has + // indicated an extension not requested by the client), the client + // MUST _Fail the WebSocket Connection_. (The parsing of this + // header field to determine which extensions are requested is + // discussed in Section 9.1.) + const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } + if (secExtension !== null && secExtension !== permessageDeflate) { + failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') + return + } - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) + // 6. If the response includes a |Sec-WebSocket-Protocol| header field + // and this header field indicates the use of a subprotocol that was + // not present in the client's handshake (the server has indicated a + // subprotocol not requested by the client), the client MUST _Fail + // the WebSocket Connection_. + const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } + if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') + return + } - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } + response.socket.on('data', onSocketData) + response.socket.on('close', onSocketClose) + response.socket.on('error', onSocketError) + + if (channels.open.hasSubscribers) { + channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }) + } + + onEstablish(response) + } + }) + + return controller } -// https://url.spec.whatwg.org/#concept-url-serializer /** - * @param {URL} url - * @param {boolean} excludeFragment + * @param {Buffer} chunk */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href +function onSocketData (chunk) { + if (!this.ws[kByteParser].write(chunk)) { + this.pause() } +} - const href = url.href - const hashLength = url.hash.length +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ +function onSocketClose () { + const { ws } = this + + // If the TCP connection was closed after the + // WebSocket closing handshake was completed, the WebSocket connection + // is said to have been closed _cleanly_. + const wasClean = ws[kSentClose] && ws[kReceivedClose] + + let code = 1005 + let reason = '' + + const result = ws[kByteParser].closingInfo + + if (result) { + code = result.code ?? 1005 + reason = result.reason + } else if (!ws[kSentClose]) { + // If _The WebSocket + // Connection is Closed_ and no Close control frame was received by the + // endpoint (such as could occur if the underlying transport connection + // is lost), _The WebSocket Connection Close Code_ is considered to be + // 1006. + code = 1006 + } - return hashLength === 0 ? href : href.substring(0, href.length - hashLength) -} + // 1. Change the ready state to CLOSED (3). + ws[kReadyState] = states.CLOSED -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' + // 2. If the user agent was required to fail the WebSocket + // connection, or if the WebSocket connection was closed + // after being flagged as full, fire an event named error + // at the WebSocket object. + // TODO - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] + // 3. Fire an event named close at the WebSocket object, + // using CloseEvent, with the wasClean attribute + // initialized to true if the connection closed cleanly + // and false otherwise, the code attribute initialized to + // the WebSocket connection close code, and the reason + // attribute initialized to the result of applying UTF-8 + // decode without BOM to the WebSocket connection close + // reason. + fireEvent('close', ws, CloseEvent, { + wasClean, code, reason + }) - // 2. Advance position by 1. - position.position++ + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: ws, + code, + reason + }) } - - // 3. Return result. - return result } -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position +function onSocketError (error) { + const { ws } = this - if (idx === -1) { - position.position = input.length - return input.slice(start) + ws[kReadyState] = states.CLOSING + + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(error) } - position.position = idx - return input.slice(start, position.position) + this.destroy() } -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) +module.exports = { + establishWebSocketConnection } -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - // 1. Let output be an empty byte sequence. - /** @type {number[]} */ - const output = [] - - // 2. For each byte byte in input: - for (let i = 0; i < input.length; i++) { - const byte = input[i] - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output.push(byte) +/***/ }), - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2])) - ) { - output.push(0x25) +/***/ 19188: +/***/ ((module) => { - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]) - const bytePoint = Number.parseInt(nextTwoBytes, 16) +"use strict"; - // 2. Append a byte whose value is bytePoint to output. - output.push(bytePoint) - // 3. Skip the next two bytes in input. - i += 2 - } - } +// This is a Globally Unique Identifier unique used +// to validate that the endpoint accepts websocket +// connections. +// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 +const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - // 3. Return output. - return Uint8Array.from(output) +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false } -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) +const states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 +} - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } +const opcodes = { + CONTINUATION: 0x0, + TEXT: 0x1, + BINARY: 0x2, + CLOSE: 0x8, + PING: 0x9, + PONG: 0xA +} - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) +const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } +const parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 +} - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' - } +const emptyBuffer = Buffer.allocUnsafe(0) - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ +module.exports = { + uid, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer +} - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) +/***/ }), - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' - } +/***/ 52611: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() +"use strict"; - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` - } - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ +const { webidl } = __nccwpck_require__(21744) +const { kEnumerableProperty } = __nccwpck_require__(83983) +const { MessagePort } = __nccwpck_require__(71267) - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) +/** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ +class MessageEvent extends Event { + #eventInit - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.MessageEventInit(eventInitDict) - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } + super(type, eventInitDict) - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ - } + this.#eventInit = eventInitDict + } - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break - } + get data () { + webidl.brandCheck(this, MessageEvent) - // 7. Let parameterValue be null. - let parameterValue = null + return this.#eventInit.data + } - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) + get origin () { + webidl.brandCheck(this, MessageEvent) - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) + return this.#eventInit.origin + } - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) + get lastEventId () { + webidl.brandCheck(this, MessageEvent) - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) + return this.#eventInit.lastEventId + } - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } + get source () { + webidl.brandCheck(this, MessageEvent) - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) - } + return this.#eventInit.source } - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line + get ports () { + webidl.brandCheck(this, MessageEvent) - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (data.length % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - data = data.replace(/=?=$/, '') - } + if (!Object.isFrozen(this.#eventInit.ports)) { + Object.freeze(this.#eventInit.ports) + } - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (data.length % 4 === 1) { - return 'failure' + return this.#eventInit.ports } - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data)) { - return 'failure' - } + initMessageEvent ( + type, + bubbles = false, + cancelable = false, + data = null, + origin = '', + lastEventId = '', + source = null, + ports = [] + ) { + webidl.brandCheck(this, MessageEvent) - const binary = atob(data) - const bytes = new Uint8Array(binary.length) + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' }) - for (let byte = 0; byte < binary.length; byte++) { - bytes[byte] = binary.charCodeAt(byte) + return new MessageEvent(type, { + bubbles, cancelable, data, origin, lastEventId, source, ports + }) } - - return bytes } -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string /** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position - - // 2. Let value be the empty string. - let value = '' - - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') - - // 4. Advance position by 1. - position.position++ - - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) +class CloseEvent extends Event { + #eventInit - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - // 4. Advance position by 1. - position.position++ + super(type, eventInitDict) - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } + this.#eventInit = eventInitDict + } - // 2. Append the code point at position within input to value. - value += input[position.position] + get wasClean () { + webidl.brandCheck(this, CloseEvent) - // 3. Advance position by 1. - position.position++ + return this.#eventInit.wasClean + } - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') + get code () { + webidl.brandCheck(this, CloseEvent) - // 2. Break. - break - } + return this.#eventInit.code } - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value - } + get reason () { + webidl.brandCheck(this, CloseEvent) - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) + return this.#eventInit.reason + } } -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' +// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface +class ErrorEvent extends Event { + #eventInit - // 2. Append name to serialization. - serialization += name + constructor (type, eventInitDict) { + webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) - // 3. Append U+003D (=) to serialization. - serialization += '=' + super(type, eventInitDict) - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - // 2. Prepend U+0022 (") to value. - value = '"' + value + this.#eventInit = eventInitDict + } - // 3. Append U+0022 (") to value. - value += '"' - } + get message () { + webidl.brandCheck(this, ErrorEvent) - // 5. Append value to serialization. - serialization += value + return this.#eventInit.message } - // 3. Return serialization. - return serialization -} + get filename () { + webidl.brandCheck(this, ErrorEvent) -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} char - */ -function isHTTPWhiteSpace (char) { - return char === '\r' || char === '\n' || char === '\t' || char === ' ' -} + return this.#eventInit.filename + } -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - let lead = 0 - let trail = str.length - 1 + get lineno () { + webidl.brandCheck(this, ErrorEvent) - if (leading) { - for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); + return this.#eventInit.lineno } - if (trailing) { - for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); + get colno () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.colno } - return str.slice(lead, trail + 1) -} + get error () { + webidl.brandCheck(this, ErrorEvent) -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {string} char - */ -function isASCIIWhitespace (char) { - return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' ' + return this.#eventInit.error + } } -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - let lead = 0 - let trail = str.length - 1 +Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: 'MessageEvent', + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty +}) - if (leading) { - for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); +Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: 'CloseEvent', + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty +}) + +Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: 'ErrorEvent', + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty +}) + +webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.MessagePort +) + +const eventInit = [ + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false } +] - if (trailing) { - for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); +webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'data', + converter: webidl.converters.any, + defaultValue: null + }, + { + key: 'origin', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lastEventId', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'source', + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: null + }, + { + key: 'ports', + converter: webidl.converters['sequence'], + get defaultValue () { + return [] + } } +]) - return str.slice(lead, trail + 1) -} +webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'wasClean', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'code', + converter: webidl.converters['unsigned short'], + defaultValue: 0 + }, + { + key: 'reason', + converter: webidl.converters.USVString, + defaultValue: '' + } +]) + +webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'message', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'filename', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lineno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'colno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'error', + converter: webidl.converters.any + } +]) module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType + MessageEvent, + CloseEvent, + ErrorEvent } /***/ }), -/***/ 78511: +/***/ 25444: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { Blob, File: NativeFile } = __nccwpck_require__(14300) -const { types } = __nccwpck_require__(73837) -const { kState } = __nccwpck_require__(15861) -const { isBlobLike } = __nccwpck_require__(52538) -const { webidl } = __nccwpck_require__(21744) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const encoder = new TextEncoder() +const { maxUnsigned16Bit } = __nccwpck_require__(19188) -class File extends Blob { - constructor (fileBits, fileName, options = {}) { - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} catch { - fileBits = webidl.converters['sequence'](fileBits) - fileName = webidl.converters.USVString(fileName) - options = webidl.converters.FilePropertyBag(options) +} - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - // Note: Blob handles this for us +class WebsocketFrameSend { + /** + * @param {Buffer|undefined} data + */ + constructor (data) { + this.frameData = data + this.maskKey = crypto.randomBytes(4) + } - // 2. Let n be the fileName argument to the constructor. - const n = fileName + createFrame (opcode) { + const bodyLength = this.frameData?.byteLength ?? 0 - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: + /** @type {number} */ + let payloadLength = bodyLength // 0-125 + let offset = 6 - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // 2. Convert every character in t to ASCII lowercase. - let t = options.type - let d + if (bodyLength > maxUnsigned16Bit) { + offset += 8 // payload length is next 8 bytes + payloadLength = 127 + } else if (bodyLength > 125) { + offset += 2 // payload length is next 2 bytes + payloadLength = 126 + } - // eslint-disable-next-line no-labels - substep: { - if (t) { - t = parseMIMEType(t) + const buffer = Buffer.allocUnsafe(bodyLength + offset) - if (t === 'failure') { - t = '' - // eslint-disable-next-line no-labels - break substep - } + // Clear first 2 bytes, everything else is overwritten + buffer[0] = buffer[1] = 0 + buffer[0] |= 0x80 // FIN + buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - t = serializeAMimeType(t).toLowerCase() - } + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = this.maskKey[0] + buffer[offset - 3] = this.maskKey[1] + buffer[offset - 2] = this.maskKey[2] + buffer[offset - 1] = this.maskKey[3] - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - d = options.lastModified + buffer[1] = payloadLength + + if (payloadLength === 126) { + buffer.writeUInt16BE(bodyLength, 2) + } else if (payloadLength === 127) { + // Clear extended payload length + buffer[2] = buffer[3] = 0 + buffer.writeUIntBE(bodyLength, 4, 6) } - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. + buffer[1] |= 0x80 // MASK - super(processBlobParts(fileBits, options), { type: t }) - this[kState] = { - name: n, - lastModified: d, - type: t + // mask body + for (let i = 0; i < bodyLength; i++) { + buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] } - } - - get name () { - webidl.brandCheck(this, File) - return this[kState].name + return buffer } +} - get lastModified () { - webidl.brandCheck(this, File) +module.exports = { + WebsocketFrameSend +} - return this[kState].lastModified - } - get type () { - webidl.brandCheck(this, File) +/***/ }), - return this[kState].type - } -} +/***/ 11688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check +"use strict"; - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. +const { Writable } = __nccwpck_require__(12781) +const diagnosticsChannel = __nccwpck_require__(67643) +const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(19188) +const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(37578) +const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(25515) +const { WebsocketFrameSend } = __nccwpck_require__(25444) - // 2. Let n be the fileName argument to the constructor. - const n = fileName +// This code was influenced by ws released under the MIT license. +// Copyright (c) 2011 Einar Otto Stangvik +// Copyright (c) 2013 Arnout Kazemier and contributors +// Copyright (c) 2016 Luigi Pinca and contributors - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: +const channels = {} +channels.ping = diagnosticsChannel.channel('undici:websocket:ping') +channels.pong = diagnosticsChannel.channel('undici:websocket:pong') - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type +class ByteParser extends Writable { + #buffers = [] + #byteOffset = 0 - // 2. Convert every character in t to ASCII lowercase. - // TODO + #state = parserStates.INFO - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() + #info = {} + #fragments = [] - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. + constructor (ws) { + super() - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d - } + this.ws = ws } - stream (...args) { - webidl.brandCheck(this, FileLike) + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write (chunk, _, callback) { + this.#buffers.push(chunk) + this.#byteOffset += chunk.length - return this[kState].blobLike.stream(...args) + this.run(callback) } - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run (callback) { + while (true) { + if (this.#state === parserStates.INFO) { + // If there aren't enough bytes to parse the payload length, etc. + if (this.#byteOffset < 2) { + return callback() + } - return this[kState].blobLike.arrayBuffer(...args) - } + const buffer = this.consume(2) - slice (...args) { - webidl.brandCheck(this, FileLike) + this.#info.fin = (buffer[0] & 0x80) !== 0 + this.#info.opcode = buffer[0] & 0x0F - return this[kState].blobLike.slice(...args) - } + // If we receive a fragmented message, we use the type of the first + // frame to parse the full message as binary/text, when it's terminated + this.#info.originalOpcode ??= this.#info.opcode - text (...args) { - webidl.brandCheck(this, FileLike) + this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION - return this[kState].blobLike.text(...args) - } + if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { + // Only text and binary frames can be fragmented + failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') + return + } + + const payloadLength = buffer[1] & 0x7F + + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength + this.#state = parserStates.READ_DATA + } else if (payloadLength === 126) { + this.#state = parserStates.PAYLOADLENGTH_16 + } else if (payloadLength === 127) { + this.#state = parserStates.PAYLOADLENGTH_64 + } + + if (this.#info.fragmented && payloadLength > 125) { + // A fragmented frame can't be fragmented itself + failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') + return + } else if ( + (this.#info.opcode === opcodes.PING || + this.#info.opcode === opcodes.PONG || + this.#info.opcode === opcodes.CLOSE) && + payloadLength > 125 + ) { + // Control frames can have a payload length of 125 bytes MAX + failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') + return + } else if (this.#info.opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') + return + } + + const body = this.consume(payloadLength) + + this.#info.closeInfo = this.parseCloseBody(false, body) + + if (!this.ws[kSentClose]) { + // If an endpoint receives a Close frame and did not previously send a + // Close frame, the endpoint MUST send a Close frame in response. (When + // sending a Close frame in response, the endpoint typically echos the + // status code it received.) + const body = Buffer.allocUnsafe(2) + body.writeUInt16BE(this.#info.closeInfo.code, 0) + const closeFrame = new WebsocketFrameSend(body) + + this.ws[kResponse].socket.write( + closeFrame.createFrame(opcodes.CLOSE), + (err) => { + if (!err) { + this.ws[kSentClose] = true + } + } + ) + } + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this.ws[kReadyState] = states.CLOSING + this.ws[kReceivedClose] = true + + this.end() + + return + } else if (this.#info.opcode === opcodes.PING) { + // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in + // response, unless it already received a Close frame. + // A Pong frame sent in response to a Ping frame must have identical + // "Application data" - get size () { - webidl.brandCheck(this, FileLike) + const body = this.consume(payloadLength) - return this[kState].blobLike.size - } + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body) - get type () { - webidl.brandCheck(this, FileLike) + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - return this[kState].blobLike.type - } + if (channels.ping.hasSubscribers) { + channels.ping.publish({ + payload: body + }) + } + } - get name () { - webidl.brandCheck(this, FileLike) + this.#state = parserStates.INFO - return this[kState].name - } + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } else if (this.#info.opcode === opcodes.PONG) { + // A Pong frame MAY be sent unsolicited. This serves as a + // unidirectional heartbeat. A response to an unsolicited Pong frame is + // not expected. - get lastModified () { - webidl.brandCheck(this, FileLike) + const body = this.consume(payloadLength) - return this[kState].lastModified - } + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body + }) + } - get [Symbol.toStringTag] () { - return 'File' - } -} + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) { + return callback() + } -Object.defineProperties(File.prototype, { - [Symbol.toStringTag]: { - value: 'File', - configurable: true - }, - name: kEnumerableProperty, - lastModified: kEnumerableProperty -}) + const buffer = this.consume(2) -webidl.converters.Blob = webidl.interfaceConverter(Blob) + this.#info.payloadLength = buffer.readUInt16BE(0) + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) { + return callback() + } -webidl.converters.BlobPart = function (V, opts) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } + const buffer = this.consume(8) + const upper = buffer.readUInt32BE(0) - if ( - ArrayBuffer.isView(V) || - types.isAnyArrayBuffer(V) - ) { - return webidl.converters.BufferSource(V, opts) - } - } + // 2^31 is the maxinimum bytes an arraybuffer can contain + // on 32-bit systems. Although, on 64-bit systems, this is + // 2^53-1 bytes. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') + return + } - return webidl.converters.USVString(V, opts) -} + const lower = buffer.readUInt32BE(4) -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.BlobPart -) + this.#info.payloadLength = (upper << 8) + lower + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) { + // If there is still more data in this chunk that needs to be read + return callback() + } else if (this.#byteOffset >= this.#info.payloadLength) { + // If the server sent multiple frames in a single chunk -// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag -webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ - { - key: 'lastModified', - converter: webidl.converters['long long'], - get defaultValue () { - return Date.now() - } - }, - { - key: 'type', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'endings', - converter: (value) => { - value = webidl.converters.DOMString(value) - value = value.toLowerCase() + const body = this.consume(this.#info.payloadLength) - if (value !== 'native') { - value = 'transparent' - } + this.#fragments.push(body) - return value - }, - defaultValue: 'transparent' - } -]) + // If the frame is unfragmented, or a fragmented frame was terminated, + // a message was received + if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) { + const fullMessage = Buffer.concat(this.#fragments) -/** - * @see https://www.w3.org/TR/FileAPI/#process-blob-parts - * @param {(NodeJS.TypedArray|Blob|string)[]} parts - * @param {{ type: string, endings: string }} options - */ -function processBlobParts (parts, options) { - // 1. Let bytes be an empty sequence of bytes. - /** @type {NodeJS.TypedArray[]} */ - const bytes = [] + websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage) - // 2. For each element in parts: - for (const element of parts) { - // 1. If element is a USVString, run the following substeps: - if (typeof element === 'string') { - // 1. Let s be element. - let s = element + this.#info = {} + this.#fragments.length = 0 + } - // 2. If the endings member of options is "native", set s - // to the result of converting line endings to native - // of element. - if (options.endings === 'native') { - s = convertLineEndingsNative(s) + this.#state = parserStates.INFO + } } - // 3. Append the result of UTF-8 encoding s to bytes. - bytes.push(encoder.encode(s)) - } else if ( - types.isAnyArrayBuffer(element) || - types.isTypedArray(element) - ) { - // 2. If element is a BufferSource, get a copy of the - // bytes held by the buffer source, and append those - // bytes to bytes. - if (!element.buffer) { // ArrayBuffer - bytes.push(new Uint8Array(element)) + if (this.#byteOffset > 0) { + continue } else { - bytes.push( - new Uint8Array(element.buffer, element.byteOffset, element.byteLength) - ) + callback() + break } - } else if (isBlobLike(element)) { - // 3. If element is a Blob, append the bytes it represents - // to bytes. - bytes.push(element) } } - // 3. Return bytes. - return bytes -} - -/** - * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native - * @param {string} s - */ -function convertLineEndingsNative (s) { - // 1. Let native line ending be be the code point U+000A LF. - let nativeLineEnding = '\n' - - // 2. If the underlying platform’s conventions are to - // represent newlines as a carriage return and line feed - // sequence, set native line ending to the code point - // U+000D CR followed by the code point U+000A LF. - if (process.platform === 'win32') { - nativeLineEnding = '\r\n' - } - - return s.replace(/\r?\n/g, nativeLineEnding) -} - -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (NativeFile && object instanceof NativeFile) || - object instanceof File || ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { File, FileLike, isFileLike } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer|null} + */ + consume (n) { + if (n > this.#byteOffset) { + return null + } else if (n === 0) { + return emptyBuffer + } + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length + return this.#buffers.shift() + } -/***/ }), + const buffer = Buffer.allocUnsafe(n) + let offset = 0 -/***/ 72015: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + while (offset !== n) { + const next = this.#buffers[0] + const { length } = next -"use strict"; + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset) + break + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset) + this.#buffers[0] = next.subarray(n - offset) + break + } else { + buffer.set(this.#buffers.shift(), offset) + offset += next.length + } + } + this.#byteOffset -= n -const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(52538) -const { kState } = __nccwpck_require__(15861) -const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(78511) -const { webidl } = __nccwpck_require__(21744) -const { Blob, File: NativeFile } = __nccwpck_require__(14300) + return buffer + } -/** @type {globalThis['File']} */ -const File = NativeFile ?? UndiciFile + parseCloseBody (onlyCode, data) { + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + /** @type {number|undefined} */ + let code -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) + if (data.length >= 2) { + // _The WebSocket Connection Close Code_ is + // defined as the status code (Section 7.4) contained in the first Close + // control frame received by the application + code = data.readUInt16BE(0) } - this[kState] = [] - } + if (onlyCode) { + if (!isValidStatusCode(code)) { + return null + } - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) + return { code } + } - webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 + /** @type {Buffer} */ + let reason = data.subarray(2) - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) + // Remove BOM + if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { + reason = reason.subarray(3) } - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name) - value = isBlobLike(value) - ? webidl.converters.Blob(value, { strict: false }) - : webidl.converters.USVString(value) - filename = arguments.length === 3 - ? webidl.converters.USVString(filename) - : undefined + if (code !== undefined && !isValidStatusCode(code)) { + return null + } - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) + try { + // TODO: optimize this + reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) + } catch { + return null + } - // 3. Append entry to this’s entry list. - this[kState].push(entry) + return { code, reason } } - delete (name) { - webidl.brandCheck(this, FormData) + get closingInfo () { + return this.#info.closeInfo + } +} - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) +module.exports = { + ByteParser +} - name = webidl.converters.USVString(name) - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } +/***/ }), - get (name) { - webidl.brandCheck(this, FormData) +/***/ 37578: +/***/ ((module) => { - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) +"use strict"; - name = webidl.converters.USVString(name) - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null - } +module.exports = { + kWebSocketURL: Symbol('url'), + kReadyState: Symbol('ready state'), + kController: Symbol('controller'), + kResponse: Symbol('response'), + kBinaryType: Symbol('binary type'), + kSentClose: Symbol('sent close'), + kReceivedClose: Symbol('received close'), + kByteParser: Symbol('byte parser') +} - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - getAll (name) { - webidl.brandCheck(this, FormData) +/***/ }), - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) +/***/ 25515: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - name = webidl.converters.USVString(name) +"use strict"; - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) - } - has (name) { - webidl.brandCheck(this, FormData) +const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(37578) +const { states, opcodes } = __nccwpck_require__(19188) +const { MessageEvent, ErrorEvent } = __nccwpck_require__(52611) - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) +/* globals Blob */ - name = webidl.converters.USVString(name) +/** + * @param {import('./websocket').WebSocket} ws + */ +function isEstablished (ws) { + // If the server's response is validated as provided for above, it is + // said that _The WebSocket Connection is Established_ and that the + // WebSocket Connection is in the OPEN state. + return ws[kReadyState] === states.OPEN +} - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 - } +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosing (ws) { + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + return ws[kReadyState] === states.CLOSING +} - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosed (ws) { + return ws[kReadyState] === states.CLOSED +} - webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) +/** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {EventInit | undefined} eventInitDict + */ +function fireEvent (e, target, eventConstructor = Event, eventInitDict) { + // 1. If eventConstructor is not given, then let eventConstructor be Event. - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } + // 2. Let event be the result of creating an event given eventConstructor, + // in the relevant realm of target. + // 3. Initialize event’s type attribute to e. + const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap - // The set(name, value) and set(name, blobValue, filename) method steps - // are: + // 4. Initialize any other IDL attributes of event as described in the + // invocation of this algorithm. - // 1. Let value be value if given; otherwise blobValue. + // 5. Return the result of dispatching event at target, with legacy target + // override flag set if set. + target.dispatchEvent(event) +} - name = webidl.converters.USVString(name) - value = isBlobLike(value) - ? webidl.converters.Blob(value, { strict: false }) - : webidl.converters.USVString(value) - filename = arguments.length === 3 - ? toUSVString(filename) - : undefined +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ +function websocketMessageReceived (ws, type, data) { + // 1. If ready state is not OPEN (1), then return. + if (ws[kReadyState] !== states.OPEN) { + return + } - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) + // 2. Let dataForEvent be determined by switching on type and binary type: + let dataForEvent - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] + if (type === opcodes.TEXT) { + // -> type indicates that the data is Text + // a new DOMString containing data + try { + dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data) + } catch { + failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') + return + } + } else if (type === opcodes.BINARY) { + if (ws[kBinaryType] === 'blob') { + // -> type indicates that the data is Binary and binary type is "blob" + // a new Blob object, created in the relevant Realm of the WebSocket + // object, that represents data as its raw data + dataForEvent = new Blob([data]) } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) + // -> type indicates that the data is Binary and binary type is "arraybuffer" + // a new ArrayBuffer object, created in the relevant Realm of the + // WebSocket object, whose contents are data + dataForEvent = new Uint8Array(data).buffer } } - entries () { - webidl.brandCheck(this, FormData) + // 3. Fire an event named message at the WebSocket object, using MessageEvent, + // with the origin attribute initialized to the serialization of the WebSocket + // object’s url's origin, and the data attribute initialized to dataForEvent. + fireEvent('message', ws, MessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }) +} - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'key+value' - ) +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ +function isValidSubprotocol (protocol) { + // If present, this value indicates one + // or more comma-separated subprotocol the client wishes to speak, + // ordered by preference. The elements that comprise this value + // MUST be non-empty strings with characters in the range U+0021 to + // U+007E not including separator characters as defined in + // [RFC2616] and MUST all be unique strings. + if (protocol.length === 0) { + return false } - keys () { - webidl.brandCheck(this, FormData) + for (const char of protocol) { + const code = char.charCodeAt(0) - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'key' - ) + if ( + code < 0x21 || + code > 0x7E || + char === '(' || + char === ')' || + char === '<' || + char === '>' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' || + code === 32 || // SP + code === 9 // HT + ) { + return false + } } - values () { - webidl.brandCheck(this, FormData) + return true +} - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'value' +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ +function isValidStatusCode (code) { + if (code >= 1000 && code < 1015) { + return ( + code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006 // "MUST NOT be set as a status code" ) } - /** - * @param {(value: string, key: string, self: FormData) => void} callbackFn - * @param {unknown} thisArg - */ - forEach (callbackFn, thisArg = globalThis) { - webidl.brandCheck(this, FormData) + return code >= 3000 && code <= 4999 +} - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' }) +/** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ +function failWebsocketConnection (ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws - if (typeof callbackFn !== 'function') { - throw new TypeError( - "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'." - ) - } + controller.abort() - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]) - } + if (response?.socket && !response.socket.destroyed) { + response.socket.destroy() } -} - -FormData.prototype[Symbol.iterator] = FormData.prototype.entries -Object.defineProperties(FormData.prototype, { - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true + if (reason) { + fireEvent('error', ws, ErrorEvent, { + error: new Error(reason) + }) } -}) +} -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // "To convert a string into a scalar value string, replace any surrogates - // with U+FFFD." - // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end - name = Buffer.from(name).toString('utf8') +module.exports = { + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived +} - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - value = Buffer.from(value).toString('utf8') - } else { - // 3. Otherwise: - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } +/***/ }), - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } +/***/ 54284: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } - } +"use strict"; - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} -module.exports = { FormData } +const { webidl } = __nccwpck_require__(21744) +const { DOMException } = __nccwpck_require__(41037) +const { URLSerializer } = __nccwpck_require__(685) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(19188) +const { + kWebSocketURL, + kReadyState, + kController, + kBinaryType, + kResponse, + kSentClose, + kByteParser +} = __nccwpck_require__(37578) +const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(25515) +const { establishWebSocketConnection } = __nccwpck_require__(35354) +const { WebsocketFrameSend } = __nccwpck_require__(25444) +const { ByteParser } = __nccwpck_require__(11688) +const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(83983) +const { getGlobalDispatcher } = __nccwpck_require__(21892) +const { types } = __nccwpck_require__(73837) +let experimentalWarned = false -/***/ }), +// https://websockets.spec.whatwg.org/#interface-definition +class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null + } -/***/ 71246: -/***/ ((module) => { + #bufferedAmount = 0 + #protocol = '' + #extensions = '' -"use strict"; + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor (url, protocols = []) { + super() + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' }) -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') + if (!experimentalWarned) { + experimentalWarned = true + process.emitWarning('WebSockets are experimental, expect them to change at any time.', { + code: 'UNDICI-WS' + }) + } -function getGlobalOrigin () { - return globalThis[globalOrigin] -} + const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols) -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) + url = webidl.converters.USVString(url) + protocols = options.protocols - return - } + // 1. Let baseURL be this's relevant settings object's API base URL. + const baseURL = getGlobalOrigin() - const parsedURL = new URL(newOrigin) + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. + let urlRecord - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } + try { + urlRecord = new URL(url, baseURL) + } catch (e) { + // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, 'SyntaxError') + } - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} + // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". + if (urlRecord.protocol === 'http:') { + urlRecord.protocol = 'ws:' + } else if (urlRecord.protocol === 'https:') { + // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". + urlRecord.protocol = 'wss:' + } -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} + // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. + if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { + throw new DOMException( + `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, + 'SyntaxError' + ) + } + // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" + // DOMException. + if (urlRecord.hash || urlRecord.href.endsWith('#')) { + throw new DOMException('Got fragment', 'SyntaxError') + } -/***/ }), + // 8. If protocols is a string, set protocols to a sequence consisting + // of just that string. + if (typeof protocols === 'string') { + protocols = [protocols] + } -/***/ 10554: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 9. If any of the values in protocols occur more than once or otherwise + // fail to match the requirements for elements that comprise the value + // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket + // protocol, then throw a "SyntaxError" DOMException. + if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + } -"use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch + if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + } + // 10. Set this's url to urlRecord. + this[kWebSocketURL] = new URL(urlRecord.href) + // 11. Let client be this's relevant settings object. -const { kHeadersList, kConstruct } = __nccwpck_require__(72785) -const { kGuard } = __nccwpck_require__(15861) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { - makeIterator, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(52538) -const { webidl } = __nccwpck_require__(21744) -const assert = __nccwpck_require__(39491) + // 12. Run this step in parallel: -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') + // 1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this[kController] = establishWebSocketConnection( + urlRecord, + protocols, + this, + (response) => this.#onConnectionEstablished(response), + options + ) -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} + // Each WebSocket object has an associated ready state, which is a + // number representing the state of the connection. Initially it must + // be CONNECTING (0). + this[kReadyState] = WebSocket.CONNECTING -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length + // The extensions attribute must initially return the empty string. - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i + // The protocol attribute must initially return the empty string. - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} + // Each WebSocket object has an associated binary type, which is a + // BinaryType. Initially it must be "blob". + this[kBinaryType] = 'blob' + } -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close (code = undefined, reason = undefined) { + webidl.brandCheck(this, WebSocket) - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } + if (code !== undefined) { + code = webidl.converters['unsigned short'](code, { clamp: true }) + } - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) + if (reason !== undefined) { + reason = webidl.converters.USVString(reason) } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) + // 1. If code is present, but is neither an integer equal to 1000 nor an + // integer in the range 3000 to 4999, inclusive, throw an + // "InvalidAccessError" DOMException. + if (code !== undefined) { + if (code !== 1000 && (code < 3000 || code > 4999)) { + throw new DOMException('invalid code', 'InvalidAccessError') + } } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) + let reasonByteLength = 0 - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } + // 2. If reason is present, then run these substeps: + if (reason !== undefined) { + // 1. Let reasonBytes be the result of encoding reason. + // 2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + reasonByteLength = Buffer.byteLength(reason) - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // Note: undici does not implement forbidden header names - if (headers[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (headers[kGuard] === 'request-no-cors') { - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - } + if (reasonByteLength > 123) { + throw new DOMException( + `Reason must be less than 123 bytes; received ${reasonByteLength}`, + 'SyntaxError' + ) + } + } - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. + // 3. Run the first matching steps from the following list: + if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { + // If this's ready state is CLOSING (2) or CLOSED (3) + // Do nothing. + } else if (!isEstablished(this)) { + // If the WebSocket connection is not yet established + // Fail the WebSocket connection and set this's ready state + // to CLOSING (2). + failWebsocketConnection(this, 'Connection was closed before it was established.') + this[kReadyState] = WebSocket.CLOSING + } else if (!isClosing(this)) { + // If the WebSocket closing handshake has not yet been started + // Start the WebSocket closing handshake and set this's ready + // state to CLOSING (2). + // - If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // - If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + // - If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. - // 7. Append (name, value) to headers’s header list. - return headers[kHeadersList].append(name, value) + const frame = new WebsocketFrameSend() + + // If neither code nor reason is present, the WebSocket Close + // message must not have a body. + + // If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + if (code !== undefined && reason === undefined) { + frame.frameData = Buffer.allocUnsafe(2) + frame.frameData.writeUInt16BE(code, 0) + } else if (code !== undefined && reason !== undefined) { + // If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) + frame.frameData.writeUInt16BE(code, 0) + // the body MAY contain UTF-8-encoded data with value /reason/ + frame.frameData.write(reason, 2, 'utf-8') + } else { + frame.frameData = emptyBuffer + } - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null + socket.write(frame.createFrame(opcodes.CLOSE), (err) => { + if (!err) { + this[kSentClose] = true + } + }) - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this[kReadyState] = states.CLOSING } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null + // Otherwise + // Set this's ready state to CLOSING (2). + this[kReadyState] = WebSocket.CLOSING } } - // https://fetch.spec.whatwg.org/#header-list-contains - contains (name) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - name = name.toLowerCase() + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send (data) { + webidl.brandCheck(this, WebSocket) - return this[kHeadersMap].has(name) - } + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' }) - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } + data = webidl.converters.WebSocketSendData(data) - // https://fetch.spec.whatwg.org/#concept-header-list-append - append (name, value) { - this[kHeadersSortedMap] = null + // 1. If this's ready state is CONNECTING, then throw an + // "InvalidStateError" DOMException. + if (this[kReadyState] === WebSocket.CONNECTING) { + throw new DOMException('Sent before connected.', 'InvalidStateError') + } - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) + // 2. Run the appropriate set of steps from the following list: + // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 + // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) + if (!isEstablished(this) || isClosing(this)) { + return } - if (lowercaseName === 'set-cookie') { - this.cookies ??= [] - this.cookies.push(value) - } - } + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket - // https://fetch.spec.whatwg.org/#concept-header-list-set - set (name, value) { - this[kHeadersSortedMap] = null - const lowercaseName = name.toLowerCase() + // If data is a string + if (typeof data === 'string') { + // If the WebSocket connection is established and the WebSocket + // closing handshake has not yet started, then the user agent + // must send a WebSocket Message comprised of the data argument + // using a text frame opcode; if the data cannot be sent, e.g. + // because it would need to be buffered but the buffer is full, + // the user agent must flag the WebSocket as full and then close + // the WebSocket connection. Any invocation of this method with a + // string argument that does not throw an exception must increase + // the bufferedAmount attribute by the number of bytes needed to + // express the argument as UTF-8. - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.TEXT) - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (types.isArrayBuffer(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need + // to be buffered but the buffer is full, the user agent must flag + // the WebSocket as full and then close the WebSocket connection. + // The data to be sent is the data stored in the buffer described + // by the ArrayBuffer object. Any invocation of this method with an + // ArrayBuffer argument that does not throw an exception must + // increase the bufferedAmount attribute by the length of the + // ArrayBuffer in bytes. - // https://fetch.spec.whatwg.org/#concept-header-list-delete - delete (name) { - this[kHeadersSortedMap] = null + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.BINARY) - name = name.toLowerCase() + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (ArrayBuffer.isView(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The + // data to be sent is the data stored in the section of the buffer + // described by the ArrayBuffer object that data references. Any + // invocation of this method with this kind of argument that does + // not throw an exception must increase the bufferedAmount attribute + // by the length of data’s buffer in bytes. - if (name === 'set-cookie') { - this.cookies = null - } + const ab = Buffer.from(data, data.byteOffset, data.byteLength) - this[kHeadersMap].delete(name) - } + const frame = new WebsocketFrameSend(ab) + const buffer = frame.createFrame(opcodes.BINARY) - // https://fetch.spec.whatwg.org/#concept-header-list-get - get (name) { - const value = this[kHeadersMap].get(name.toLowerCase()) + this.#bufferedAmount += ab.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= ab.byteLength + }) + } else if (isBlobLike(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The data + // to be sent is the raw data represented by the Blob object. Any + // invocation of this method with a Blob argument that does not throw + // an exception must increase the bufferedAmount attribute by the size + // of the Blob object’s raw data, in bytes. - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return value === undefined ? null : value.value - } + const frame = new WebsocketFrameSend() - * [Symbol.iterator] () { - // use the lowercased name - for (const [name, { value }] of this[kHeadersMap]) { - yield [name, value] + data.arrayBuffer().then((ab) => { + const value = Buffer.from(ab) + frame.frameData = value + const buffer = frame.createFrame(opcodes.BINARY) + + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + }) } } - get entries () { - const headers = {} - - if (this[kHeadersMap].size) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } - } + get readyState () { + webidl.brandCheck(this, WebSocket) - return headers + // The readyState getter steps are to return this's ready state. + return this[kReadyState] } -} -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - constructor (init = undefined) { - if (init === kConstruct) { - return - } - this[kHeadersList] = new HeadersList() + get bufferedAmount () { + webidl.brandCheck(this, WebSocket) - // The new Headers(init) constructor steps are: + return this.#bufferedAmount + } - // 1. Set this’s guard to "none". - this[kGuard] = 'none' + get url () { + webidl.brandCheck(this, WebSocket) - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init) - fill(this, init) - } + // The url getter steps are to return this's url, serialized. + return URLSerializer(this[kWebSocketURL]) } - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) + get extensions () { + webidl.brandCheck(this, WebSocket) - webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) + return this.#extensions + } - name = webidl.converters.ByteString(name) - value = webidl.converters.ByteString(value) + get protocol () { + webidl.brandCheck(this, WebSocket) - return appendHeader(this, name, value) + return this.#protocol } - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) + get onopen () { + webidl.brandCheck(this, WebSocket) - name = webidl.converters.ByteString(name) + return this.#events.open + } - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } + set onopen (fn) { + webidl.brandCheck(this, WebSocket) - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // TODO + if (this.#events.open) { + this.removeEventListener('open', this.#events.open) } - // 6. If this’s header list does not contain name, then - // return. - if (!this[kHeadersList].contains(name)) { - return + if (typeof fn === 'function') { + this.#events.open = fn + this.addEventListener('open', fn) + } else { + this.#events.open = null } - - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this[kHeadersList].delete(name) } - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) + get onerror () { + webidl.brandCheck(this, WebSocket) - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) + return this.#events.error + } - name = webidl.converters.ByteString(name) + set onerror (fn) { + webidl.brandCheck(this, WebSocket) - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.get', - value: name, - type: 'header name' - }) + if (this.#events.error) { + this.removeEventListener('error', this.#events.error) } - // 2. Return the result of getting name from this’s header - // list. - return this[kHeadersList].get(name) + if (typeof fn === 'function') { + this.#events.error = fn + this.addEventListener('error', fn) + } else { + this.#events.error = null + } } - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) + get onclose () { + webidl.brandCheck(this, WebSocket) - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) + return this.#events.close + } - name = webidl.converters.ByteString(name) + set onclose (fn) { + webidl.brandCheck(this, WebSocket) - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.has', - value: name, - type: 'header name' - }) + if (this.#events.close) { + this.removeEventListener('close', this.#events.close) } - // 2. Return true if this’s header list contains name; - // otherwise false. - return this[kHeadersList].contains(name) + if (typeof fn === 'function') { + this.#events.close = fn + this.addEventListener('close', fn) + } else { + this.#events.close = null + } } - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) + get onmessage () { + webidl.brandCheck(this, WebSocket) - name = webidl.converters.ByteString(name) - value = webidl.converters.ByteString(value) + return this.#events.message + } - // 1. Normalize value. - value = headerValueNormalize(value) + set onmessage (fn) { + webidl.brandCheck(this, WebSocket) - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.set', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.set', - value, - type: 'header value' - }) + if (this.#events.message) { + this.removeEventListener('message', this.#events.message) } - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // TODO + if (typeof fn === 'function') { + this.#events.message = fn + this.addEventListener('message', fn) + } else { + this.#events.message = null } - - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this[kHeadersList].set(name, value) } - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) + get binaryType () { + webidl.brandCheck(this, WebSocket) - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. + return this[kBinaryType] + } - const list = this[kHeadersList].cookies + set binaryType (type) { + webidl.brandCheck(this, WebSocket) - if (list) { - return [...list] + if (type !== 'blob' && type !== 'arraybuffer') { + this[kBinaryType] = 'blob' + } else { + this[kBinaryType] = type } - - return [] } - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this[kHeadersList][kHeadersSortedMap]) { - return this[kHeadersList][kHeadersSortedMap] - } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished (response) { + // processResponse is called when the "response’s header list has been received and initialized." + // once this happens, the connection is open + this[kResponse] = response - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] + const parser = new ByteParser(this) + parser.on('drain', function onParserDrain () { + this.ws[kResponse].socket.resume() + }) - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) - const cookies = this[kHeadersList].cookies + response.socket.ws = this + this[kByteParser] = parser - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const [name, value] = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. + // 1. Change the ready state to OPEN (1). + this[kReadyState] = states.OPEN - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) - } - } else { - // 2. Otherwise: + // 2. Change the extensions attribute’s value to the extensions in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 + const extensions = response.headersList.get('sec-websocket-extensions') - // 1. Let value be the result of getting name from list. + if (extensions !== null) { + this.#extensions = extensions + } - // 2. Assert: value is non-null. - assert(value !== null) + // 3. Change the protocol attribute’s value to the subprotocol in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 + const protocol = response.headersList.get('sec-websocket-protocol') - // 3. Append (name, value) to headers. - headers.push([name, value]) - } + if (protocol !== null) { + this.#protocol = protocol } - this[kHeadersList][kHeadersSortedMap] = headers + // 4. Fire an event named open at the WebSocket object. + fireEvent('open', this) + } +} - // 4. Return headers. - return headers +// https://websockets.spec.whatwg.org/#dom-websocket-connecting +WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING +// https://websockets.spec.whatwg.org/#dom-websocket-open +WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN +// https://websockets.spec.whatwg.org/#dom-websocket-closing +WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING +// https://websockets.spec.whatwg.org/#dom-websocket-closed +WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED + +Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'WebSocket', + writable: false, + enumerable: false, + configurable: true } +}) - keys () { - webidl.brandCheck(this, Headers) +Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors +}) - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key') - } +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.DOMString +) - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'key' - ) +webidl.converters['DOMString or sequence'] = function (V) { + if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { + return webidl.converters['sequence'](V) } - values () { - webidl.brandCheck(this, Headers) + return webidl.converters.DOMString(V) +} - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'value') +// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 +webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: 'protocols', + converter: webidl.converters['DOMString or sequence'], + get defaultValue () { + return [] + } + }, + { + key: 'dispatcher', + converter: (V) => V, + get defaultValue () { + return getGlobalDispatcher() } + }, + { + key: 'headers', + converter: webidl.nullableConverter(webidl.converters.HeadersInit) + } +]) - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'value' - ) +webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { + if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { + return webidl.converters.WebSocketInit(V) } - entries () { - webidl.brandCheck(this, Headers) + return { protocols: webidl.converters['DOMString or sequence'](V) } +} - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key+value') +webidl.converters.WebSocketSendData = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) } - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'key+value' - ) + if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { + return webidl.converters.BufferSource(V) + } } - /** - * @param {(value: string, key: string, self: Headers) => void} callbackFn - * @param {unknown} thisArg - */ - forEach (callbackFn, thisArg = globalThis) { - webidl.brandCheck(this, Headers) + return webidl.converters.USVString(V) +} - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' }) +module.exports = { + WebSocket +} - if (typeof callbackFn !== 'function') { - throw new TypeError( - "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'." - ) - } - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]) - } - } +/***/ }), - [Symbol.for('nodejs.util.inspect.custom')] () { - webidl.brandCheck(this, Headers) +/***/ 45030: +/***/ ((__unused_webpack_module, exports) => { - return this[kHeadersList] - } -} +"use strict"; -Headers.prototype[Symbol.iterator] = Headers.prototype.entries -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - keys: kEnumerableProperty, - values: kEnumerableProperty, - entries: kEnumerableProperty, - forEach: kEnumerableProperty, - [Symbol.iterator]: { enumerable: false }, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - } -}) +Object.defineProperty(exports, "__esModule", ({ value: true })); -webidl.converters.HeadersInit = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (V[Symbol.iterator]) { - return webidl.converters['sequence>'](V) - } +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } - return webidl.converters['record'](V) + if (typeof process === "object" && process.version !== undefined) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; } - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) + return ""; } -module.exports = { - fill, - Headers, - HeadersList -} +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map /***/ }), -/***/ 74881: +/***/ 65278: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch - +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ -const { - Response, - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse -} = __nccwpck_require__(27823) -const { Headers } = __nccwpck_require__(10554) -const { Request, makeRequest } = __nccwpck_require__(48359) -const zlib = __nccwpck_require__(59796) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme -} = __nccwpck_require__(52538) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) -const assert = __nccwpck_require__(39491) -const { safelyExtractBody } = __nccwpck_require__(41472) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet, - DOMException -} = __nccwpck_require__(41037) -const { kHeadersList } = __nccwpck_require__(72785) -const EE = __nccwpck_require__(82361) -const { Readable, pipeline } = __nccwpck_require__(12781) -const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(83983) -const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(685) -const { TransformStream } = __nccwpck_require__(35356) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { webidl } = __nccwpck_require__(21744) -const { STATUS_CODES } = __nccwpck_require__(13685) -const GET_OR_HEAD = ['GET', 'HEAD'] +module.exports = __nccwpck_require__(73837).deprecate; -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL -let ReadableStream = globalThis.ReadableStream -class Fetch extends EE { - constructor (dispatcher) { - super() +/***/ }), - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - // 2 terminated listeners get added per request, - // but only 1 gets removed. If there are 20 redirects, - // 21 listeners will be added. - // See https://github.com/nodejs/undici/issues/1711 - // TODO (fix): Find and fix root cause for leaked listener. - this.setMaxListeners(21) - } +/***/ 2155: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - terminate (reason) { - if (this.state !== 'ongoing') { - return - } +var v1 = __nccwpck_require__(18749); +var v4 = __nccwpck_require__(80824); - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } +module.exports = uuid; - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } +/***/ }), - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). +/***/ 92707: +/***/ ((module) => { - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} - this.connection?.destroy(error) - this.emit('terminated', error) - } +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); } -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) +module.exports = bytesToUuid; - // 1. Let p be a new promise. - const p = createDeferredPromise() - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject +/***/ }), - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } +/***/ 15859: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 3. Let request be requestObject’s request. - const request = requestObject[kState] +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) +var crypto = __nccwpck_require__(6113); - // 2. Return p. - return p.promise - } +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } +/***/ }), - // 7. Let responseObject be null. - let responseObject = null +/***/ 18749: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 8. Let relevantRealm be this’s relevant Realm. - const relevantRealm = null +var rng = __nccwpck_require__(15859); +var bytesToUuid = __nccwpck_require__(92707); - // 9. Let locallyAborted be false. - let locallyAborted = false +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html - // 10. Let controller be null. - let controller = null +var _nodeId; +var _clockseq; - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; - // 2. Assert: controller is non-null. - assert(controller != null) +// See https://github.com/uuidjs/uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, responseObject, requestObject.signal.reason) + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; } - ) + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - const handleFetchDone = (response) => - finalizeAndReportTiming(response, 'fetch') + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return Promise.resolve() - } + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return Promise.resolve() - } + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject( - Object.assign(new TypeError('fetch failed'), { cause: response.error }) - ) - return Promise.resolve() - } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new Response() - responseObject[kState] = response - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kHeadersList] = response.headersList - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; - // 5. Resolve p with responseObject. - p.resolve(responseObject) + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; } - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici - }) - - // 14. Return p. - return p.promise + return buf ? buf : bytesToUuid(b); } -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } +module.exports = v1; - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] +/***/ }), - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo +/***/ 80824: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState +var rng = __nccwpck_require__(15859); +var bytesToUuid = __nccwpck_require__(92707); - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } +function v4(options, buf, offset) { + var i = buf && offset || 0; - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; } + options = options || {}; - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) + var rnds = options.random || (options.rng || rng)(); - // 2. Set cacheState to the empty string. - cacheState = '' + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } } - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() + return buf || bytesToUuid(rnds); +} - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo +module.exports = v4; - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL, - initiatorType, - globalThis, - cacheState - ) -} -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { - if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { - performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) - } -} +/***/ }), -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // Note: AbortSignal.reason was added in node v17.2.0 - // which would give us an undefined error to reject with. - // Remove this once node v16 is no longer supported. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } +/***/ 54886: +/***/ ((module) => { - // 1. Reject promise with error. - p.reject(error) +"use strict"; - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } +var conversions = {}; +module.exports = conversions; - // 4. Let response be responseObject’s response. - const response = responseObject[kState] +function sign(x) { + return x < 0 ? -1 : 1; +} - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } +function evenRound(x) { + // Round x to the nearest integer, choosing the even integer if it lies halfway between two. + if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) + return Math.floor(x); + } else { + return Math.round(x); + } } -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher // undici -}) { - // 1. Let taskDestination be null. - let taskDestination = null +function createNumberConversion(bitLength, typeOpts) { + if (!typeOpts.unsigned) { + --bitLength; + } + const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); + const upperBound = Math.pow(2, bitLength) - 1; - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false + const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); + const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject + return function(V, opts) { + if (!opts) opts = {}; - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } + let x = +V; - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO + if (opts.enforceRange) { + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite number"); + } - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currenTime - }) + x = sign(x) * Math.floor(Math.abs(x)); + if (x < lowerBound || x > upperBound) { + throw new TypeError("Argument is not in byte range"); + } - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } + return x; + } - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) + if (!isNaN(x) && opts.clamp) { + x = evenRound(x); - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } + if (x < lowerBound) x = lowerBound; + if (x > upperBound) x = upperBound; + return x; + } - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - // TODO: What if request.client is null? - request.origin = request.client?.origin - } + if (!Number.isFinite(x) || x === 0) { + return 0; + } - // 10. If all of the following conditions are true: - // TODO + x = sign(x) * Math.floor(Math.abs(x)); + x = x % moduloVal; - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() + if (!typeOpts.unsigned && x >= moduloBound) { + return x - moduloVal; + } else if (typeOpts.unsigned) { + if (x < 0) { + x += moduloVal; + } else if (x === -0) { // don't return negative zero + return 0; + } + } + + return x; } - } +} - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept')) { - // 1. Let value be `*/*`. - const value = '*/*' +conversions["void"] = function () { + return undefined; +}; - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO +conversions["boolean"] = function (val) { + return !!val; +}; - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value) - } +conversions["byte"] = createNumberConversion(8, { unsigned: false }); +conversions["octet"] = createNumberConversion(8, { unsigned: true }); - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language')) { - request.headersList.append('accept-language', '*') - } +conversions["short"] = createNumberConversion(16, { unsigned: false }); +conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } +conversions["long"] = createNumberConversion(32, { unsigned: false }); +conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } +conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); +conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) +conversions["double"] = function (V) { + const x = +V; - // 17. Return fetchParam's controller - return fetchParams.controller -} + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite floating-point value"); + } -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request + return x; +}; - // 2. Let response be null. - let response = null +conversions["unrestricted double"] = function (V) { + const x = +V; - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } + if (isNaN(x)) { + throw new TypeError("Argument is NaN"); + } - // 4. Run report Content Security Policy violations for request. - // TODO + return x; +}; - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) +// not quite valid, but good enough for JS +conversions["float"] = conversions["double"]; +conversions["unrestricted float"] = conversions["unrestricted double"]; - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? +conversions["DOMString"] = function (V, opts) { + if (!opts) opts = {}; - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } + if (opts.treatNullAsEmptyString && V === null) { + return ""; + } - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } + return String(V); +}; - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO +conversions["ByteString"] = function (V, opts) { + const x = String(V); + let c = undefined; + for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { + if (c > 255) { + throw new TypeError("Argument is not a valid bytestring"); + } + } - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO + return x; +}; - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) +conversions["USVString"] = function (V) { + const S = String(V); + const n = S.length; + const U = []; + for (let i = 0; i < n; ++i) { + const c = S.charCodeAt(i); + if (c < 0xD800 || c > 0xDFFF) { + U.push(String.fromCodePoint(c)); + } else if (0xDC00 <= c && c <= 0xDFFF) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + if (i === n - 1) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + const d = S.charCodeAt(i + 1); + if (0xDC00 <= d && d <= 0xDFFF) { + const a = c & 0x3FF; + const b = d & 0x3FF; + U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); + ++i; + } else { + U.push(String.fromCodePoint(0xFFFD)); + } + } + } + } - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' + return U.join(''); +}; - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } +conversions["Date"] = function (V, opts) { + if (!(V instanceof Date)) { + throw new TypeError("Argument is not a Date object"); + } + if (isNaN(V)) { + return undefined; + } - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } + return V; +}; - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } +conversions["RegExp"] = function (V, opts) { + if (!(V instanceof RegExp)) { + V = new RegExp(V); + } - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' + return V; +}; - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') +/***/ }), + +/***/ 97537: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +const usm = __nccwpck_require__(2158); + +exports.implementation = class URLImpl { + constructor(constructorArgs) { + const url = constructorArgs[0]; + const base = constructorArgs[1]; + + let parsedBase = null; + if (base !== undefined) { + parsedBase = usm.basicURLParse(base); + if (parsedBase === "failure") { + throw new TypeError("Invalid base URL"); } + } - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO + const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); + } - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' + this._url = parsedURL; - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() + // TODO: query stuff } - // 12. If recursive is true, then return response. - if (recursive) { - return response + get href() { + return usm.serializeURL(this._url); } - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO + set href(v) { + const parsedURL = usm.basicURLParse(v); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); } - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } + this._url = parsedURL; } - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) + get origin() { + return usm.serializeURLOrigin(this._url); } - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true + get protocol() { + return this._url.scheme + ":"; } - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO + set protocol(v) { + usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); + } - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range') - ) { - response = internalResponse = makeNetworkError() + get username() { + return this._url.username; } - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true + set username(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } + + usm.setTheUsername(this._url, v); } - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) + get password() { + return this._url.password; + } - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return + set password(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; } - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } + usm.setThePassword(this._url, v); + } - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] + get host() { + const url = this._url; - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) + if (url.host === null) { + return ""; } - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} + if (url.port === null) { + return usm.serializeHost(url.host); + } -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) + return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); } - // 2. Let request be fetchParams’s request. - const { request } = fetchParams + set host(v) { + if (this._url.cannotBeABaseURL) { + return; + } - const { protocol: scheme } = requestCurrentURL(request) + usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); + } - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. + get hostname() { + if (this._url.host === null) { + return ""; + } - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) + return usm.serializeHost(this._url.host); + } + + set hostname(v) { + if (this._url.cannotBeABaseURL) { + return; } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(14300).resolveObjectURL) - } - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) + usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); + } - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } + get port() { + if (this._url.port === null) { + return ""; + } - const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) + return usm.serializeInteger(this._url.port); + } - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { - return Promise.resolve(makeNetworkError('invalid method')) - } + set port(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } - // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. - const bodyWithType = safelyExtractBody(blobURLEntryObject) + if (v === "") { + this._url.port = null; + } else { + usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); + } + } - // 4. Let body be bodyWithType’s body. - const body = bodyWithType[0] + get pathname() { + if (this._url.cannotBeABaseURL) { + return this._url.path[0]; + } - // 5. Let length be body’s length, serialized and isomorphic encoded. - const length = isomorphicEncode(`${body.length}`) + if (this._url.path.length === 0) { + return ""; + } - // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. - const type = bodyWithType[1] ?? '' + return "/" + this._url.path.join("/"); + } - // 7. Return a new response whose status message is `OK`, header list is - // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. - const response = makeResponse({ - statusText: 'OK', - headersList: [ - ['content-length', { name: 'Content-Length', value: length }], - ['content-type', { name: 'Content-Type', value: type }] - ] - }) + set pathname(v) { + if (this._url.cannotBeABaseURL) { + return; + } - response.body = body + this._url.path = []; + usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); + } - return Promise.resolve(response) + get search() { + if (this._url.query === null || this._url.query === "") { + return ""; } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } + return "?" + this._url.query; + } - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) + set search(v) { + // TODO: query stuff - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. + const url = this._url; - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) + if (v === "") { + url.query = null; + return; } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) + + const input = v[0] === "?" ? v.substring(1) : v; + url.query = ""; + usm.basicURLParse(input, { url, stateOverride: "query" }); + } + + get hash() { + if (this._url.fragment === null || this._url.fragment === "") { + return ""; } + + return "#" + this._url.fragment; } -} -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true + set hash(v) { + if (v === "") { + this._url.fragment = null; + return; + } - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) + const input = v[0] === "#" ? v.substring(1) : v; + this._url.fragment = ""; + usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); } -} -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. If response is a network error, then: - if (response.type === 'error') { - // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». - response.urlList = [fetchParams.request.urlList[0]] + toJSON() { + return this.href; + } +}; - // 2. Set response’s timing info to the result of creating an opaque timing - // info for fetchParams’s timing info. - response.timingInfo = createOpaqueTimingInfo({ - startTime: fetchParams.timingInfo.startTime - }) + +/***/ }), + +/***/ 63394: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const conversions = __nccwpck_require__(54886); +const utils = __nccwpck_require__(83185); +const Impl = __nccwpck_require__(97537); + +const impl = utils.implSymbol; + +function URL(url) { + if (!this || this[impl] || !(this instanceof URL)) { + throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); + } + if (arguments.length < 1) { + throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); + } + const args = []; + for (let i = 0; i < arguments.length && i < 2; ++i) { + args[i] = arguments[i]; + } + args[0] = conversions["USVString"](args[0]); + if (args[1] !== undefined) { + args[1] = conversions["USVString"](args[1]); } - // 2. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true + module.exports.setup(this, args); +} - // If fetchParams’s process response end-of-body is not null, - // then queue a fetch task to run fetchParams’s process response - // end-of-body given response with fetchParams’s task destination. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } +URL.prototype.toJSON = function toJSON() { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + const args = []; + for (let i = 0; i < arguments.length && i < 0; ++i) { + args[i] = arguments[i]; } + return this[impl].toJSON.apply(this[impl], args); +}; +Object.defineProperty(URL.prototype, "href", { + get() { + return this[impl].href; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].href = V; + }, + enumerable: true, + configurable: true +}); - // 3. If fetchParams’s process response is non-null, then queue a fetch task - // to run fetchParams’s process response given response, with fetchParams’s - // task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => fetchParams.processResponse(response)) +URL.prototype.toString = function () { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); } + return this.href; +}; - // 4. If response’s body is null, then run processResponseEndOfBody. - if (response.body == null) { - processResponseEndOfBody() - } else { - // 5. Otherwise: +Object.defineProperty(URL.prototype, "origin", { + get() { + return this[impl].origin; + }, + enumerable: true, + configurable: true +}); - // 1. Let transformStream be a new a TransformStream. +Object.defineProperty(URL.prototype, "protocol", { + get() { + return this[impl].protocol; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].protocol = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "username", { + get() { + return this[impl].username; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].username = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "password", { + get() { + return this[impl].password; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].password = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "host", { + get() { + return this[impl].host; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].host = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "hostname", { + get() { + return this[impl].hostname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hostname = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "port", { + get() { + return this[impl].port; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].port = V; + }, + enumerable: true, + configurable: true +}); - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, - // enqueues chunk in transformStream. - const identityTransformAlgorithm = (chunk, controller) => { - controller.enqueue(chunk) - } +Object.defineProperty(URL.prototype, "pathname", { + get() { + return this[impl].pathname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].pathname = V; + }, + enumerable: true, + configurable: true +}); - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm - // and flushAlgorithm set to processResponseEndOfBody. - const transformStream = new TransformStream({ - start () {}, - transform: identityTransformAlgorithm, - flush: processResponseEndOfBody - }, { - size () { - return 1 - } - }, { - size () { - return 1 - } - }) +Object.defineProperty(URL.prototype, "search", { + get() { + return this[impl].search; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].search = V; + }, + enumerable: true, + configurable: true +}); - // 4. Set response’s body to the result of piping response’s body through transformStream. - response.body = { stream: response.body.stream.pipeThrough(transformStream) } - } +Object.defineProperty(URL.prototype, "hash", { + get() { + return this[impl].hash; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hash = V; + }, + enumerable: true, + configurable: true +}); - // 6. If fetchParams’s process response consume body is non-null, then: - if (fetchParams.processResponseConsumeBody != null) { - // 1. Let processBody given nullOrBytes be this step: run fetchParams’s - // process response consume body given response and nullOrBytes. - const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes) - // 2. Let processBodyError be this step: run fetchParams’s process - // response consume body given response and failure. - const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure) +module.exports = { + is(obj) { + return !!obj && obj[impl] instanceof Impl.implementation; + }, + create(constructorArgs, privateData) { + let obj = Object.create(URL.prototype); + this.setup(obj, constructorArgs, privateData); + return obj; + }, + setup(obj, constructorArgs, privateData) { + if (!privateData) privateData = {}; + privateData.wrapper = obj; - // 3. If response’s body is null, then queue a fetch task to run processBody - // given null, with fetchParams’s task destination. - if (response.body == null) { - queueMicrotask(() => processBody(null)) - } else { - // 4. Otherwise, fully read response’s body given processBody, processBodyError, - // and fetchParams’s task destination. - return fullyReadBody(response.body, processBody, processBodyError) - } - return Promise.resolve() + obj[impl] = new Impl.implementation(constructorArgs, privateData); + obj[impl][utils.wrapperSymbol] = obj; + }, + interface: URL, + expose: { + Window: { URL: URL }, + Worker: { URL: URL } } -} +}; -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - // 2. Let response be null. - let response = null - // 3. Let actualResponse be null. - let actualResponse = null +/***/ }), - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo +/***/ 28665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO - } +"use strict"; - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } +exports.URL = __nccwpck_require__(63394)["interface"]; +exports.serializeURL = __nccwpck_require__(2158).serializeURL; +exports.serializeURLOrigin = __nccwpck_require__(2158).serializeURLOrigin; +exports.basicURLParse = __nccwpck_require__(2158).basicURLParse; +exports.setTheUsername = __nccwpck_require__(2158).setTheUsername; +exports.setThePassword = __nccwpck_require__(2158).setThePassword; +exports.serializeHost = __nccwpck_require__(2158).serializeHost; +exports.serializeInteger = __nccwpck_require__(2158).serializeInteger; +exports.parseURL = __nccwpck_require__(2158).parseURL; - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } +/***/ }), - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } +/***/ 2158: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } +"use strict"; - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy() - } +const punycode = __nccwpck_require__(85477); +const tr46 = __nccwpck_require__(84256); - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) - } else { - assert(false) - } - } +const specialSchemes = { + ftp: 21, + file: null, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo +const failure = Symbol("failure"); - // 10. Return response. - return response +function countSymbols(str) { + return punycode.ucs2.decode(str).length; } -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request +function at(input, idx) { + const c = input[idx]; + return isNaN(c) ? undefined : String.fromCodePoint(c); +} - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response +function isASCIIDigit(c) { + return c >= 0x30 && c <= 0x39; +} - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL +function isASCIIAlpha(c) { + return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); +} - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) +function isASCIIAlphanumeric(c) { + return isASCIIAlpha(c) || isASCIIDigit(c); +} - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response - } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } +function isASCIIHex(c) { + return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); +} - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) - } +function isSingleDot(buffer) { + return buffer === "." || buffer.toLowerCase() === "%2e"; +} - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } +function isDoubleDot(buffer) { + buffer = buffer.toLowerCase(); + return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; +} - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 +function isWindowsDriveLetterCodePoints(cp1, cp2) { + return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); +} - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } +function isWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); +} - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } +function isNormalizedWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; +} - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } +function containsForbiddenHostCodePoint(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; +} - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null +function containsForbiddenHostCodePointExcludingPercent(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; +} - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } +function isSpecialScheme(scheme) { + return specialSchemes[scheme] !== undefined; +} - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization') +function isSpecial(url) { + return isSpecialScheme(url.scheme); +} - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) +function defaultPort(scheme) { + return specialSchemes[scheme]; +} - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie') - request.headersList.delete('host') +function percentEncode(c) { + let hex = c.toString(16).toUpperCase(); + if (hex.length === 1) { + hex = "0" + hex; } - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] - } + return "%" + hex; +} - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo +function utf8PercentEncode(c) { + const buf = new Buffer(c); - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) + let str = ""; - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime + for (let i = 0; i < buf.length; ++i) { + str += percentEncode(buf[i]); } - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) + return str; } -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null - - // 3. Let httpRequest be null. - let httpRequest = null +function utf8PercentDecode(str) { + const input = new Buffer(str); + const output = []; + for (let i = 0; i < input.length; ++i) { + if (input[i] !== 37) { + output.push(input[i]); + } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { + output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); + i += 2; + } else { + output.push(input[i]); + } + } + return new Buffer(output).toString(); +} - // 4. Let response be null. - let response = null +function isC0ControlPercentEncode(c) { + return c <= 0x1F || c > 0x7E; +} - // 5. Let storedResponse be null. - // TODO: cache +const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); +function isPathPercentEncode(c) { + return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); +} - // 6. Let httpCache be null. - const httpCache = null +const extraUserinfoPercentEncodeSet = + new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); +function isUserinfoPercentEncode(c) { + return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); +} - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false +function percentEncodeChar(c, encodeSetPredicate) { + const cStr = String.fromCodePoint(c); - // 8. Run these steps, but abort when the ongoing fetch is terminated: + if (encodeSetPredicate(c)) { + return utf8PercentEncode(cStr); + } - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: + return cStr; +} - // 1. Set httpRequest to a clone of request. - httpRequest = makeRequest(request) +function parseIPv4Number(input) { + let R = 10; - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } + if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { + input = input.substring(2); + R = 16; + } else if (input.length >= 2 && input.charAt(0) === "0") { + input = input.substring(1); + R = 8; + } - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest + if (input === "") { + return 0; } - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') + const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); + if (regex.test(input)) { + return failure; + } - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null + return parseInt(input, R); +} - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null +function parseIPv4(input) { + const parts = input.split("."); + if (parts[parts.length - 1] === "") { + if (parts.length > 1) { + parts.pop(); + } + } - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' + if (parts.length > 4) { + return input; } - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) + const numbers = []; + for (const part of parts) { + if (part === "") { + return input; + } + const n = parseIPv4Number(part); + if (n === failure) { + return input; + } + + numbers.push(n); } - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue) + for (let i = 0; i < numbers.length - 1; ++i) { + if (numbers[i] > 255) { + return failure; + } + } + if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { + return failure; } - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. + let ipv4 = numbers.pop(); + let counter = 0; - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. + for (const n of numbers) { + ipv4 += n * Math.pow(256, 3 - counter); + ++counter; } - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href)) + return ipv4; +} + +function serializeIPv4(address) { + let output = ""; + let n = address; + + for (let i = 1; i <= 4; ++i) { + output = String(n % 256) + output; + if (i !== 4) { + output = "." + output; + } + n = Math.floor(n / 256); } - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) + return output; +} - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) +function parseIPv6(input) { + const address = [0, 0, 0, 0, 0, 0, 0, 0]; + let pieceIndex = 0; + let compress = null; + let pointer = 0; - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent')) { - httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') - } + input = punycode.ucs2.decode(input); - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since') || - httpRequest.headersList.contains('if-none-match') || - httpRequest.headersList.contains('if-unmodified-since') || - httpRequest.headersList.contains('if-match') || - httpRequest.headersList.contains('if-range')) - ) { - httpRequest.cache = 'no-store' - } + if (input[pointer] === 58) { + if (input[pointer + 1] !== 58) { + return failure; + } - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control') - ) { - httpRequest.headersList.append('cache-control', 'max-age=0') + pointer += 2; + ++pieceIndex; + compress = pieceIndex; } - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma')) { - httpRequest.headersList.append('pragma', 'no-cache') + while (pointer < input.length) { + if (pieceIndex === 8) { + return failure; } - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control')) { - httpRequest.headersList.append('cache-control', 'no-cache') + if (input[pointer] === 58) { + if (compress !== null) { + return failure; + } + ++pointer; + ++pieceIndex; + compress = pieceIndex; + continue; } - } - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range')) { - httpRequest.headersList.append('accept-encoding', 'identity') - } + let value = 0; + let length = 0; - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding')) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate') - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate') + while (length < 4 && isASCIIHex(input[pointer])) { + value = value * 0x10 + parseInt(at(input, pointer), 16); + ++pointer; + ++length; } - } - httpRequest.headersList.delete('host') + if (input[pointer] === 46) { + if (length === 0) { + return failure; + } - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } + pointer -= length; - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication + if (pieceIndex > 6) { + return failure; + } - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache + let numbersSeen = 0; - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } + while (input[pointer] !== undefined) { + let ipv4Piece = null; - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') { - // TODO: cache - } + if (numbersSeen > 0) { + if (input[pointer] === 46 && numbersSeen < 4) { + ++pointer; + } else { + return failure; + } + } - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO + if (!isASCIIDigit(input[pointer])) { + return failure; + } - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.mode === 'only-if-cached') { - return makeNetworkError('only if cached') - } + while (isASCIIDigit(input[pointer])) { + const number = parseInt(at(input, pointer)); + if (ipv4Piece === null) { + ipv4Piece = number; + } else if (ipv4Piece === 0) { + return failure; + } else { + ipv4Piece = ipv4Piece * 10 + number; + } + if (ipv4Piece > 255) { + return failure; + } + ++pointer; + } - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) + address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } + ++numbersSeen; - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache - } + if (numbersSeen === 2 || numbersSeen === 4) { + ++pieceIndex; + } + } - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse + if (numbersSeen !== 4) { + return failure; + } - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache + break; + } else if (input[pointer] === 58) { + ++pointer; + if (input[pointer] === undefined) { + return failure; + } + } else if (input[pointer] !== undefined) { + return failure; } - } - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] + address[pieceIndex] = value; + ++pieceIndex; + } - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range')) { - response.rangeRequested = true + if (compress !== null) { + let swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex !== 0 && swaps > 0) { + const temp = address[compress + swaps - 1]; + address[compress + swaps - 1] = address[pieceIndex]; + address[pieceIndex] = temp; + --pieceIndex; + --swaps; + } + } else if (compress === null && pieceIndex !== 8) { + return failure; } - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials + return address; +} - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO +function serializeIPv6(address) { + let output = ""; + const seqResult = findLongestZeroSequence(address); + const compress = seqResult.idx; + let ignore0 = false; - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() + for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { + if (ignore0 && address[pieceIndex] === 0) { + continue; + } else if (ignore0) { + ignore0 = false; } - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) + if (compress === pieceIndex) { + const separator = pieceIndex === 0 ? "::" : ":"; + output += separator; + ignore0 = true; + continue; } - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? + output += address[pieceIndex].toString(16); - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') + if (pieceIndex !== 7) { + output += ":"; + } } - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: + return output; +} - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) +function parseHost(input, isSpecialArg) { + if (input[0] === "[") { + if (input[input.length - 1] !== "]") { + return failure; } - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. + return parseIPv6(input.substring(1, input.length - 1)); + } - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() + if (!isSpecialArg) { + return parseOpaqueHost(input); + } - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) + const domain = utf8PercentDecode(input); + const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); + if (asciiDomain === null) { + return failure; } - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO + if (containsForbiddenHostCodePoint(asciiDomain)) { + return failure; } - // 18. Return response. - return response -} + const ipv4Host = parseIPv4(asciiDomain); + if (typeof ipv4Host === "number" || ipv4Host === failure) { + return ipv4Host; + } -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) + return asciiDomain; +} - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err) { - if (!this.destroyed) { - this.destroyed = true - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } +function parseOpaqueHost(input) { + if (containsForbiddenHostCodePointExcludingPercent(input)) { + return failure; } - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null + let output = ""; + const decoded = punycode.ucs2.decode(input); + for (let i = 0; i < decoded.length; ++i) { + output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + } + return output; +} - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo +function findLongestZeroSequence(arr) { + let maxIdx = null; + let maxLen = 1; // only find elements > 1 + let currStart = null; + let currLen = 0; - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null + for (let i = 0; i < arr.length; ++i) { + if (arr[i] !== 0) { + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' + currStart = null; + currLen = 0; + } else { + if (currStart === null) { + currStart = i; + } + ++currLen; + } } - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO + // if trailing zeros + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars + return { + idx: maxIdx, + len: maxLen + }; +} - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO +function serializeHost(host) { + if (typeof host === "number") { + return serializeIPv4(host); } - // 9. Run these steps, but abort when the ongoing fetch is terminated: + // IPv6 serializer + if (host instanceof Array) { + return "[" + serializeIPv6(host) + "]"; + } - // 1. If connection is failure, then return a network error. + return host; +} - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. +function trimControlChars(url) { + return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); +} - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. +function trimTabAndNewline(url) { + return url.replace(/\u0009|\u000A|\u000D/g, ""); +} - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. +function shortenPath(url) { + const path = url.path; + if (path.length === 0) { + return; + } + if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { + return; + } - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: + path.pop(); +} - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] +function includesCredentials(url) { + return url.username !== "" || url.password !== ""; +} - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. +function cannotHaveAUsernamePasswordPort(url) { + return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; +} - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). +function isNormalizedWindowsDriveLetter(string) { + return /^[A-Za-z]:$/.test(string); +} - // - Wait until all the headers are transmitted. +function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + this.pointer = 0; + this.input = input; + this.base = base || null; + this.encodingOverride = encodingOverride || "utf-8"; + this.stateOverride = stateOverride; + this.url = url; + this.failure = false; + this.parseError = false; - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. + if (!this.url) { + this.url = { + scheme: "", + username: "", + password: "", + host: null, + port: null, + path: [], + query: null, + fragment: null, - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. + cannotBeABaseURL: false + }; - // - If the HTTP request results in a TLS client certificate dialog, then: + const res = trimControlChars(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + } - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. + const res = trimTabAndNewline(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; - // 2. Otherwise, return a network error. + this.state = stateOverride || "scheme start"; - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: + this.buffer = ""; + this.atFlag = false; + this.arrFlag = false; + this.passwordTokenSeenFlag = false; - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } + this.input = punycode.ucs2.decode(this.input); - // 2. Run this step in parallel: transmit bytes. - yield bytes + for (; this.pointer <= this.input.length; ++this.pointer) { + const c = this.input[this.pointer]; + const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) + // exec state machine + const ret = this["parse " + this.state](c, cStr); + if (!ret) { + break; // terminate algorithm + } else if (ret === failure) { + this.failure = true; + break; } + } +} - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return +URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { + if (isASCIIAlpha(c)) { + this.buffer += cStr.toLowerCase(); + this.state = "scheme"; + } else if (!this.stateOverride) { + this.state = "no scheme"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { + if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { + this.buffer += cStr.toLowerCase(); + } else if (c === 58) { + if (this.stateOverride) { + if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { + return false; } - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() + if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { + return false; } - } - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return + if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { + return false; } - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) + if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { + return false; } } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) - } - processEndOfBody() - } catch (err) { - processBodyError(err) + this.url.scheme = this.buffer; + this.buffer = ""; + if (this.stateOverride) { + return false; + } + if (this.url.scheme === "file") { + if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { + this.parseError = true; } - })() + this.state = "file"; + } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { + this.state = "special relative or authority"; + } else if (isSpecial(this.url)) { + this.state = "special authority slashes"; + } else if (this.input[this.pointer + 1] === 47) { + this.state = "path or authority"; + ++this.pointer; + } else { + this.url.cannotBeABaseURL = true; + this.url.path.push(""); + this.state = "cannot-be-a-base-URL path"; + } + } else if (!this.stateOverride) { + this.buffer = ""; + this.state = "no scheme"; + this.pointer = -1; + } else { + this.parseError = true; + return failure; } - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) + return true; +}; - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() +URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { + if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { + return failure; + } else if (this.base.cannotBeABaseURL && c === 35) { + this.url.scheme = this.base.scheme; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.url.cannotBeABaseURL = true; + this.state = "fragment"; + } else if (this.base.scheme === "file") { + this.state = "file"; + --this.pointer; + } else { + this.state = "relative"; + --this.pointer; + } - response = makeResponse({ status, statusText, headersList }) - } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() + return true; +}; - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) - } +URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "relative"; + --this.pointer; + } - return makeNetworkError(err) + return true; +}; + +URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { + if (c === 47) { + this.state = "authority"; + } else { + this.state = "path"; + --this.pointer; } - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = () => { - fetchParams.controller.resume() + return true; +}; + +URLStateMachine.prototype["parse relative"] = function parseRelative(c) { + this.url.scheme = this.base.scheme; + if (isNaN(c)) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 47) { + this.state = "relative slash"; + } else if (c === 63) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else if (isSpecial(this.url) && c === 92) { + this.parseError = true; + this.state = "relative slash"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(0, this.base.path.length - 1); + + this.state = "path"; + --this.pointer; } - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - fetchParams.controller.abort(reason) + return true; +}; + +URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { + if (isSpecial(this.url) && (c === 47 || c === 92)) { + if (c === 92) { + this.parseError = true; + } + this.state = "special authority ignore slashes"; + } else if (c === 47) { + this.state = "authority"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.state = "path"; + --this.pointer; } - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO + return true; +}; - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO +URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "special authority ignore slashes"; + --this.pointer; + } - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to - // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) + return true; +}; + +URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { + if (c !== 47 && c !== 92) { + this.state = "authority"; + --this.pointer; + } else { + this.parseError = true; } - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) + return true; +}; + +URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { + if (c === 64) { + this.parseError = true; + if (this.atFlag) { + this.buffer = "%40" + this.buffer; + } + this.atFlag = true; + + // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars + const len = countSymbols(this.buffer); + for (let pointer = 0; pointer < len; ++pointer) { + const codePoint = this.buffer.codePointAt(pointer); + + if (codePoint === 58 && !this.passwordTokenSeenFlag) { + this.passwordTokenSeenFlag = true; + continue; } - }, - { - highWaterMark: 0, - size () { - return 1 + const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); + if (this.passwordTokenSeenFlag) { + this.url.password += encodedCodePoints; + } else { + this.url.username += encodedCodePoints; } } - ) + this.buffer = ""; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + if (this.atFlag && this.buffer === "") { + this.parseError = true; + return failure; + } + this.pointer -= countSymbols(this.buffer) + 1; + this.buffer = ""; + this.state = "host"; + } else { + this.buffer += cStr; + } - // 17. Run these steps, but abort when the ongoing fetch is terminated: + return true; +}; - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream } +URLStateMachine.prototype["parse hostname"] = +URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { + if (this.stateOverride && this.url.scheme === "file") { + --this.pointer; + this.state = "file host"; + } else if (c === 58 && !this.arrFlag) { + if (this.buffer === "") { + this.parseError = true; + return failure; + } - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO + this.url.host = host; + this.buffer = ""; + this.state = "port"; + if (this.stateOverride === "hostname") { + return false; + } + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + --this.pointer; + if (isSpecial(this.url) && this.buffer === "") { + this.parseError = true; + return failure; + } else if (this.stateOverride && this.buffer === "" && + (includesCredentials(this.url) || this.url.port !== null)) { + this.parseError = true; + return false; + } - // 18. If aborted, then: - // TODO + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } - // 19. Run these steps in parallel: + this.url.host = host; + this.buffer = ""; + this.state = "path start"; + if (this.stateOverride) { + return false; + } + } else { + if (c === 91) { + this.arrFlag = true; + } else if (c === 93) { + this.arrFlag = false; + } + this.buffer += cStr; + } - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... + return true; +}; - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() +URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { + if (isASCIIDigit(c)) { + this.buffer += cStr; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92) || + this.stateOverride) { + if (this.buffer !== "") { + const port = parseInt(this.buffer); + if (port > Math.pow(2, 16) - 1) { + this.parseError = true; + return failure; + } + this.url.port = port === defaultPort(this.url.scheme) ? null : port; + this.buffer = ""; + } + if (this.stateOverride) { + return false; + } + this.state = "path start"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } - if (isAborted(fetchParams)) { - break - } + return true; +}; - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err +const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } +URLStateMachine.prototype["parse file"] = function parseFile(c) { + this.url.scheme = "file"; + + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file slash"; + } else if (this.base !== null && this.base.scheme === "file") { + if (isNaN(c)) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 63) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else { + if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points + !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || + (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points + !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + shortenPath(this.url); + } else { + this.parseError = true; } - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) + this.state = "path"; + --this.pointer; + } + } else { + this.state = "path"; + --this.pointer; + } - finalizeResponse(fetchParams, response) + return true; +}; - return +URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file host"; + } else { + if (this.base !== null && this.base.scheme === "file") { + if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { + this.url.path.push(this.base.path[0]); + } else { + this.url.host = this.base.host; } + } + this.state = "path"; + --this.pointer; + } - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 + return true; +}; - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return +URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { + if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { + --this.pointer; + if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { + this.parseError = true; + this.state = "path"; + } else if (this.buffer === "") { + this.url.host = ""; + if (this.stateOverride) { + return false; } - - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - fetchParams.controller.controller.enqueue(new Uint8Array(bytes)) - - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return + this.state = "path start"; + } else { + let host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + if (host === "localhost") { + host = ""; } + this.url.host = host; - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (!fetchParams.controller.controller.desiredSize) { - return + if (this.stateOverride) { + return false; } + + this.buffer = ""; + this.state = "path start"; } + } else { + this.buffer += cStr; } - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true + return true; +}; - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } +URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { + if (isSpecial(this.url)) { + if (c === 92) { + this.parseError = true; } + this.state = "path"; - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() + if (c !== 47 && c !== 92) { + --this.pointer; + } + } else if (!this.stateOverride && c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (!this.stateOverride && c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else if (c !== undefined) { + this.state = "path"; + if (c !== 47) { + --this.pointer; + } } - // 20. Return response. - return response + return true; +}; - async function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher +URLStateMachine.prototype["parse path"] = function parsePath(c) { + if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || + (!this.stateOverride && (c === 63 || c === 35))) { + if (isSpecial(this.url) && c === 92) { + this.parseError = true; + } - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, + if (isDoubleDot(this.buffer)) { + shortenPath(this.url); + if (c !== 47 && !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } + } else if (isSingleDot(this.buffer) && c !== 47 && + !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } else if (!isSingleDot(this.buffer)) { + if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { + if (this.url.host !== "" && this.url.host !== null) { + this.parseError = true; + this.url.host = ""; + } + this.buffer = this.buffer[0] + ":"; + } + this.url.path.push(this.buffer); + } + this.buffer = ""; + if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { + while (this.url.path.length > 1 && this.url.path[0] === "") { + this.parseError = true; + this.url.path.shift(); + } + } + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - }, + this.buffer += percentEncodeChar(c, isPathPercentEncode); + } - onHeaders (status, headersList, resume, statusText) { - if (status < 200) { - return - } + return true; +}; - let codings = [] - let location = '' +URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else { + // TODO: Add: not a URL code point + if (!isNaN(c) && c !== 37) { + this.parseError = true; + } - const headers = new Headers() + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } - // For H2, the headers are a plain JS object - // We distinguish between them and iterate accordingly - if (Array.isArray(headersList)) { - for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString('latin1') - const val = headersList[n + 1].toString('latin1') - if (key.toLowerCase() === 'content-encoding') { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - // "All content-coding values are case-insensitive..." - codings = val.toLowerCase().split(',').map((x) => x.trim()) - } else if (key.toLowerCase() === 'location') { - location = val - } + if (!isNaN(c)) { + this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); + } + } - headers[kHeadersList].append(key, val) - } - } else { - const keys = Object.keys(headersList) - for (const key of keys) { - const val = headersList[key] - if (key.toLowerCase() === 'content-encoding') { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - // "All content-coding values are case-insensitive..." - codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse() - } else if (key.toLowerCase() === 'location') { - location = val - } + return true; +}; - headers[kHeadersList].append(key, val) - } - } +URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { + if (isNaN(c) || (!this.stateOverride && c === 35)) { + if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { + this.encodingOverride = "utf-8"; + } - this.body = new Readable({ read: resume }) + const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || + buffer[i] === 0x3C || buffer[i] === 0x3E) { + this.url.query += percentEncode(buffer[i]); + } else { + this.url.query += String.fromCodePoint(buffer[i]); + } + } - const decoders = [] + this.buffer = ""; + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } - const willFollow = request.redirect === 'follow' && - location && - redirectStatusSet.has(status) + this.buffer += cStr; + } - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - for (const coding of codings) { - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(zlib.createInflate()) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress()) - } else { - decoders.length = 0 - break - } - } - } + return true; +}; - resolve({ - status, - statusText, - headersList: headers[kHeadersList], - body: decoders.length - ? pipeline(this.body, ...decoders, () => { }) - : this.body.on('error', () => {}) - }) +URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { + if (isNaN(c)) { // do nothing + } else if (c === 0x0) { + this.parseError = true; + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } - return true - }, + this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); + } - onData (chunk) { - if (fetchParams.controller.dump) { - return - } + return true; +}; - // 1. If one or more bytes have been transmitted from response’s - // message body, then: +function serializeURL(url, excludeFragment) { + let output = url.scheme + ":"; + if (url.host !== null) { + output += "//"; - // 1. Let bytes be the transmitted bytes. - const bytes = chunk + if (url.username !== "" || url.password !== "") { + output += url.username; + if (url.password !== "") { + output += ":" + url.password; + } + output += "@"; + } - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. + output += serializeHost(url.host); - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength + if (url.port !== null) { + output += ":" + url.port; + } + } else if (url.host === null && url.scheme === "file") { + output += "//"; + } - // 4. See pullAlgorithm... + if (url.cannotBeABaseURL) { + output += url.path[0]; + } else { + for (const string of url.path) { + output += "/" + string; + } + } - return this.body.push(bytes) - }, + if (url.query !== null) { + output += "?" + url.query; + } - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } + if (!excludeFragment && url.fragment !== null) { + output += "#" + url.fragment; + } - fetchParams.controller.ended = true + return output; +} - this.body.push(null) - }, +function serializeOrigin(tuple) { + let result = tuple.scheme + "://"; + result += serializeHost(tuple.host); - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } + if (tuple.port !== null) { + result += ":" + tuple.port; + } - this.body?.destroy(error) + return result; +} - fetchParams.controller.terminate(error) +module.exports.serializeURL = serializeURL; - reject(error) - }, +module.exports.serializeURLOrigin = function (url) { + // https://url.spec.whatwg.org/#concept-url-origin + switch (url.scheme) { + case "blob": + try { + return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); + } catch (e) { + // serializing an opaque origin returns "null" + return "null"; + } + case "ftp": + case "gopher": + case "http": + case "https": + case "ws": + case "wss": + return serializeOrigin({ + scheme: url.scheme, + host: url.host, + port: url.port + }); + case "file": + // spec says "exercise to the reader", chrome says "file://" + return "file://"; + default: + // serializing an opaque origin returns "null" + return "null"; + } +}; - onUpgrade (status, headersList, socket) { - if (status !== 101) { - return - } +module.exports.basicURLParse = function (input, options) { + if (options === undefined) { + options = {}; + } - const headers = new Headers() + const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); + if (usm.failure) { + return "failure"; + } - for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString('latin1') - const val = headersList[n + 1].toString('latin1') + return usm.url; +}; - headers[kHeadersList].append(key, val) - } +module.exports.setTheUsername = function (url, username) { + url.username = ""; + const decoded = punycode.ucs2.decode(username); + for (let i = 0; i < decoded.length; ++i) { + url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.setThePassword = function (url, password) { + url.password = ""; + const decoded = punycode.ucs2.decode(password); + for (let i = 0; i < decoded.length; ++i) { + url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.serializeHost = serializeHost; - resolve({ - status, - statusText: STATUS_CODES[status], - headersList: headers[kHeadersList], - socket - }) +module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; - return true - } - } - )) +module.exports.serializeInteger = function (integer) { + return String(integer); +}; + +module.exports.parseURL = function (input, options) { + if (options === undefined) { + options = {}; } -} -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} + // We don't handle blobs, so this just delegates: + return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); +}; /***/ }), -/***/ 48359: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 83185: +/***/ ((module) => { "use strict"; -/* globals AbortController */ +module.exports.mixin = function mixin(target, source) { + const keys = Object.getOwnPropertyNames(source); + for (let i = 0; i < keys.length; ++i) { + Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); + } +}; -const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(41472) -const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(10554) -const { FinalizationRegistry } = __nccwpck_require__(56436)() -const util = __nccwpck_require__(83983) -const { - isValidHTTPToken, - sameOrigin, - normalizeMethod, - makePolicyContainer, - normalizeMethodRecord -} = __nccwpck_require__(52538) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(41037) -const { kEnumerableProperty } = util -const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(15861) -const { webidl } = __nccwpck_require__(21744) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { URLSerializer } = __nccwpck_require__(685) -const { kHeadersList, kConstruct } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(82361) - -let TransformStream = globalThis.TransformStream +module.exports.wrapperSymbol = Symbol("wrapper"); +module.exports.implSymbol = Symbol("impl"); -const kAbortController = Symbol('abortController') +module.exports.wrapperForImpl = function (impl) { + return impl[module.exports.wrapperSymbol]; +}; -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) +module.exports.implForWrapper = function (wrapper) { + return wrapper[module.exports.implSymbol]; +}; -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - if (input === kConstruct) { - return - } - webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) - input = webidl.converters.RequestInfo(input) - init = webidl.converters.RequestInit(init) +/***/ }), - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - this[kRealm] = { - settingsObject: { - baseUrl: getGlobalOrigin(), - get origin () { - return this.baseUrl?.origin - }, - policyContainer: makePolicyContainer() - } - } +/***/ 62940: +/***/ ((module) => { - // 1. Let request be null. - let request = null +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) - // 2. Let fallbackMode be null. - let fallbackMode = null + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = this[kRealm].settingsObject.baseUrl + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) - // 4. Let signal be null. - let signal = null + return wrapper - // 5. If input is a string, then: - if (typeof input === 'string') { - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) +/***/ }), - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - // 6. Otherwise: +/***/ 15185: +/***/ ((module) => { - // 7. Assert: input is a Request object. - assert(input instanceof Request) +class Node { + /// value; + /// next; - // 8. Set request to input’s request. - request = input[kState] + constructor(value) { + this.value = value; - // 9. Set signal to input’s signal. - signal = input[kSignal] - } + // TODO: Remove this when targeting Node.js 12. + this.next = undefined; + } +} - // 7. Let origin be this’s relevant settings object’s origin. - const origin = this[kRealm].settingsObject.origin +class Queue { + // TODO: Use private class fields when targeting Node.js 12. + // #_head; + // #_tail; + // #_size; - // 8. Let window be "client". - let window = 'client' + constructor() { + this.clear(); + } - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window - } + enqueue(value) { + const node = new Node(value); - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) - } + if (this._head) { + this._tail.next = node; + this._tail = node; + } else { + this._head = node; + this._tail = node; + } - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' - } + this._size++; + } - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: this[kRealm].settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) + dequeue() { + const current = this._head; + if (!current) { + return; + } - const initHasKey = Object.keys(init).length !== 0 + this._head = this._head.next; + this._size--; + return current.value; + } - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } + clear() { + this._head = undefined; + this._tail = undefined; + this._size = 0; + } - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false + get size() { + return this._size; + } - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false + * [Symbol.iterator]() { + let current = this._head; - // 4. Set request’s origin to "client". - request.origin = 'client' + while (current) { + yield current.value; + current = current.next; + } + } +} - // 5. Set request’s referrer to "client" - request.referrer = 'client' +module.exports = Queue; - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] +/***/ }), - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] - } +/***/ 64810: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer +"use strict"; - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) +/** + * @fileoverview this file provides methods handling dependency cache + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.save = exports.restore = void 0; +const path_1 = __nccwpck_require__(71017); +const os_1 = __importDefault(__nccwpck_require__(22037)); +const cache = __importStar(__nccwpck_require__(27799)); +const core = __importStar(__nccwpck_require__(42186)); +const glob = __importStar(__nccwpck_require__(28090)); +const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'; +const CACHE_MATCHED_KEY = 'cache-matched-key'; +const CACHE_KEY_PREFIX = 'setup-java'; +const supportedPackageManager = [ + { + id: 'maven', + path: [(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository')], + // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven + pattern: ['**/pom.xml'] + }, + { + id: 'gradle', + path: [ + (0, path_1.join)(os_1.default.homedir(), '.gradle', 'caches'), + (0, path_1.join)(os_1.default.homedir(), '.gradle', 'wrapper') + ], + // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle + pattern: [ + '**/*.gradle*', + '**/gradle-wrapper.properties', + 'buildSrc/**/Versions.kt', + 'buildSrc/**/Dependencies.kt', + 'gradle/*.versions.toml', + '**/versions.properties' + ] + }, + { + id: 'sbt', + path: [ + (0, path_1.join)(os_1.default.homedir(), '.ivy2', 'cache'), + (0, path_1.join)(os_1.default.homedir(), '.sbt'), + getCoursierCachePath(), + // Some files should not be cached to avoid resolution problems. + // In particular the resolution of snapshots (ideological gap between maven/ivy). + '!' + (0, path_1.join)(os_1.default.homedir(), '.sbt', '*.lock'), + '!' + (0, path_1.join)(os_1.default.homedir(), '**', 'ivydata-*.properties') + ], + pattern: [ + '**/*.sbt', + '**/project/build.properties', + '**/project/**.scala', + '**/project/**.sbt' + ] + } +]; +function getCoursierCachePath() { + if (os_1.default.type() === 'Linux') + return (0, path_1.join)(os_1.default.homedir(), '.cache', 'coursier'); + if (os_1.default.type() === 'Darwin') + return (0, path_1.join)(os_1.default.homedir(), 'Library', 'Caches', 'Coursier'); + return (0, path_1.join)(os_1.default.homedir(), 'AppData', 'Local', 'Coursier', 'Cache'); +} +function findPackageManager(id) { + const packageManager = supportedPackageManager.find(packageManager => packageManager.id === id); + if (packageManager === undefined) { + throw new Error(`unknown package manager specified: ${id}`); + } + return packageManager; +} +/** + * A function that generates a cache key to use. + * Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"". + * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key} + */ +function computeCacheKey(packageManager, cacheDependencyPath) { + return __awaiter(this, void 0, void 0, function* () { + const pattern = cacheDependencyPath + ? cacheDependencyPath.trim().split('\n') + : packageManager.pattern; + const fileHash = yield glob.hashFiles(pattern.join('\n')); + if (!fileHash) { + throw new Error(`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`); } - - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer + return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-${packageManager.id}-${fileHash}`; + }); +} +/** + * Restore the dependency cache + * @param id ID of the package manager, should be "maven" or "gradle" + * @param cacheDependencyPath The path to a dependency file + */ +function restore(id, cacheDependencyPath) { + return __awaiter(this, void 0, void 0, function* () { + const packageManager = findPackageManager(id); + const primaryKey = yield computeCacheKey(packageManager, cacheDependencyPath); + core.debug(`primary key is ${primaryKey}`); + core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey); + // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269) + const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey); + if (matchedKey) { + core.saveState(CACHE_MATCHED_KEY, matchedKey); + core.setOutput('cache-hit', matchedKey === primaryKey); + core.info(`Cache restored from key: ${matchedKey}`); + } + else { + core.setOutput('cache-hit', false); + core.info(`${packageManager.id} cache is not found`); + } + }); +} +exports.restore = restore; +/** + * Save the dependency cache + * @param id ID of the package manager, should be "maven" or "gradle" + */ +function save(id) { + return __awaiter(this, void 0, void 0, function* () { + const packageManager = findPackageManager(id); + const matchedKey = core.getState(CACHE_MATCHED_KEY); + // Inputs are re-evaluated before the post action, so we want the original key used for restore + const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY); + if (!primaryKey) { + core.warning('Error retrieving key from state.'); + return; + } + else if (matchedKey === primaryKey) { + // no change in target directories + core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); + return; + } + try { + yield cache.saveCache(packageManager.path, primaryKey); + core.info(`Cache saved with the key: ${primaryKey}`); } - } - } - - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy + catch (error) { + const err = error; + if (err.name === cache.ReserveCacheError.name) { + core.info(err.message); + } + else { + if (isProbablyGradleDaemonProblem(packageManager, err)) { + core.warning('Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'); + } + throw error; + } + } + }); +} +exports.save = save; +/** + * @param packageManager the specified package manager by user + * @param error the error thrown by the saveCache + * @returns true if the given error seems related to the {@link https://github.com/actions/cache/issues/454|running Gradle Daemon issue}. + * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} + */ +function isProbablyGradleDaemonProblem(packageManager, error) { + if (packageManager.id !== 'gradle' || + process.env['RUNNER_OS'] !== 'Windows') { + return false; } + const message = error.message || ''; + return message.startsWith('Tar failed with error: '); +} - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode - } else { - mode = fallbackMode - } - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } +/***/ }), - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } +/***/ 85823: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } +"use strict"; - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.run = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const gpg = __importStar(__nccwpck_require__(23759)); +const constants = __importStar(__nccwpck_require__(69042)); +const util_1 = __nccwpck_require__(92629); +const cache_1 = __nccwpck_require__(64810); +function removePrivateKeyFromKeychain() { + return __awaiter(this, void 0, void 0, function* () { + if (core.getInput(constants.INPUT_GPG_PRIVATE_KEY, { required: false })) { + core.info('Removing private key from keychain'); + try { + const keyFingerprint = core.getState(constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT); + yield gpg.deleteKey(keyFingerprint); + } + catch (error) { + core.setFailed(`Failed to remove private key due to: ${error.message}`); + } + } + }); +} +/** + * Check given input and run a save process for the specified package manager + * @returns Promise that will be resolved when the save process finishes + */ +function saveCache() { + return __awaiter(this, void 0, void 0, function* () { + const jobStatus = (0, util_1.isJobStatusSuccess)(); + const cache = core.getInput(constants.INPUT_CACHE); + return jobStatus && cache ? (0, cache_1.save)(cache) : Promise.resolve(); + }); +} +/** + * The save process is best-effort, and it should not make the workflow fail + * even though this process throws an error. + * @param promise the promise to ignore error from + * @returns Promise that will ignore error reported by the given promise + */ +function ignoreError(promise) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise(resolve => { + promise + .catch(error => { + core.warning(error); + resolve(void 0); + }) + .then(resolve); + }); + }); +} +function run() { + return __awaiter(this, void 0, void 0, function* () { + yield removePrivateKeyFromKeychain(); + yield ignoreError(saveCache()); + }); +} +exports.run = run; +if (require.main === require.cache[eval('__filename')]) { + run(); +} +else { + // https://nodejs.org/api/modules.html#modules_accessing_the_main_module + core.info('the script is loaded as a module, so skipping the execution'); +} - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) - } - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } +/***/ }), - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) - } +/***/ 69042: +/***/ ((__unused_webpack_module, exports) => { - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) - } +"use strict"; - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE_DEPENDENCY_PATH = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; +exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home'; +exports.INPUT_JAVA_VERSION = 'java-version'; +exports.INPUT_JAVA_VERSION_FILE = 'java-version-file'; +exports.INPUT_ARCHITECTURE = 'architecture'; +exports.INPUT_JAVA_PACKAGE = 'java-package'; +exports.INPUT_DISTRIBUTION = 'distribution'; +exports.INPUT_JDK_FILE = 'jdkFile'; +exports.INPUT_CHECK_LATEST = 'check-latest'; +exports.INPUT_SERVER_ID = 'server-id'; +exports.INPUT_SERVER_USERNAME = 'server-username'; +exports.INPUT_SERVER_PASSWORD = 'server-password'; +exports.INPUT_SETTINGS_PATH = 'settings-path'; +exports.INPUT_OVERWRITE_SETTINGS = 'overwrite-settings'; +exports.INPUT_GPG_PRIVATE_KEY = 'gpg-private-key'; +exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; +exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; +exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; +exports.INPUT_CACHE = 'cache'; +exports.INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path'; +exports.INPUT_JOB_STATUS = 'job-status'; +exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; +exports.M2_DIR = '.m2'; +exports.MVN_SETTINGS_FILE = 'settings.xml'; +exports.MVN_TOOLCHAINS_FILE = 'toolchains.xml'; +exports.INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id'; +exports.INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor'; +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto']; - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } - if (forbiddenMethodsSet.has(method.toUpperCase())) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) - } +/***/ }), - // 3. Normalize method. - method = normalizeMethodRecord[method] ?? normalizeMethod(method) +/***/ 23759: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 4. Set request’s method to method. - request.method = method - } +"use strict"; - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteKey = exports.importKey = exports.PRIVATE_KEY_FILE = void 0; +const fs = __importStar(__nccwpck_require__(57147)); +const path = __importStar(__nccwpck_require__(71017)); +const io = __importStar(__nccwpck_require__(47351)); +const exec = __importStar(__nccwpck_require__(71514)); +const util = __importStar(__nccwpck_require__(92629)); +exports.PRIVATE_KEY_FILE = path.join(util.getTempDir(), 'private-key.asc'); +const PRIVATE_KEY_FINGERPRINT_REGEX = /\w{40}/; +function importKey(privateKey) { + return __awaiter(this, void 0, void 0, function* () { + fs.writeFileSync(exports.PRIVATE_KEY_FILE, privateKey, { + encoding: 'utf-8', + flag: 'w' + }); + let output = ''; + const options = { + silent: true, + listeners: { + stdout: (data) => { + output += data.toString(); + } + } + }; + yield exec.exec('gpg', [ + '--batch', + '--import-options', + 'import-show', + '--import', + exports.PRIVATE_KEY_FILE + ], options); + yield io.rmRF(exports.PRIVATE_KEY_FILE); + const match = output.match(PRIVATE_KEY_FINGERPRINT_REGEX); + return match && match[0]; + }); +} +exports.importKey = importKey; +function deleteKey(keyFingerprint) { + return __awaiter(this, void 0, void 0, function* () { + yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], { + silent: true + }); + }); +} +exports.deleteKey = deleteKey; - // 27. Set this’s request to request. - this[kState] = request - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - this[kSignal][kRealm] = this[kRealm] +/***/ }), - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } +/***/ 92629: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac +"use strict"; - const acRef = new WeakRef(ac) - const abort = function () { - const ac = acRef.deref() - if (ac !== undefined) { - ac.abort(this.reason) - } +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.renameWinArchive = exports.getGitHubHttpHeaders = exports.convertVersionToSemver = exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; +const os_1 = __importDefault(__nccwpck_require__(22037)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const fs = __importStar(__nccwpck_require__(57147)); +const semver = __importStar(__nccwpck_require__(11383)); +const cache = __importStar(__nccwpck_require__(27799)); +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const constants_1 = __nccwpck_require__(69042); +function getTempDir() { + const tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); + return tempDirectory; +} +exports.getTempDir = getTempDir; +function getBooleanInput(inputName, defaultValue = false) { + return ((core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'); +} +exports.getBooleanInput = getBooleanInput; +function getVersionFromToolcachePath(toolPath) { + if (toolPath) { + return path_1.default.basename(path_1.default.dirname(toolPath)); + } + return toolPath; +} +exports.getVersionFromToolcachePath = getVersionFromToolcachePath; +function extractJdkFile(toolPath, extension) { + return __awaiter(this, void 0, void 0, function* () { + if (!extension) { + extension = toolPath.endsWith('.tar.gz') + ? 'tar.gz' + : path_1.default.extname(toolPath); + if (extension.startsWith('.')) { + extension = extension.substring(1); + } + } + switch (extension) { + case 'tar.gz': + case 'tar': + return yield tc.extractTar(toolPath); + case 'zip': + return yield tc.extractZip(toolPath); + default: + return yield tc.extract7z(toolPath); + } + }); +} +exports.extractJdkFile = extractJdkFile; +function getDownloadArchiveExtension() { + return process.platform === 'win32' ? 'zip' : 'tar.gz'; +} +exports.getDownloadArchiveExtension = getDownloadArchiveExtension; +function isVersionSatisfies(range, version) { + var _a; + if (semver.valid(range)) { + // if full version with build digit is provided as a range (such as '1.2.3+4') + // we should check for exact equal via compareBuild + // since semver.satisfies doesn't handle 4th digit + const semRange = semver.parse(range); + if (semRange && ((_a = semRange.build) === null || _a === void 0 ? void 0 : _a.length) > 0) { + return semver.compareBuild(range, version) === 0; } - - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(100, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(100, signal) - } - } catch {} - - util.addAbortListener(signal, abort) - requestFinalizer.register(ac, { signal, abort }) - } } - - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - this[kHeaders][kHeadersList] = request.headersList - this[kHeaders][kGuard] = 'request' - this[kHeaders][kRealm] = this[kRealm] - - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) - } - - // 2. Set this’s headers’s guard to "request-no-cors". - this[kHeaders][kGuard] = 'request-no-cors' + return semver.satisfies(version, range); +} +exports.isVersionSatisfies = isVersionSatisfies; +function getToolcachePath(toolName, version, architecture) { + var _a; + const toolcacheRoot = (_a = process.env['RUNNER_TOOL_CACHE']) !== null && _a !== void 0 ? _a : ''; + const fullPath = path_1.default.join(toolcacheRoot, toolName, version, architecture); + if (fs.existsSync(fullPath)) { + return fullPath; + } + return null; +} +exports.getToolcachePath = getToolcachePath; +function isJobStatusSuccess() { + const jobStatus = core.getInput(constants_1.INPUT_JOB_STATUS); + return jobStatus === 'success'; +} +exports.isJobStatusSuccess = isJobStatusSuccess; +function isGhes() { + const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); + const hostname = ghUrl.hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === 'GITHUB.COM'; + const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM'); + const isLocalHost = hostname.endsWith('.LOCALHOST'); + return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; +} +exports.isGhes = isGhes; +function isCacheFeatureAvailable() { + if (cache.isFeatureAvailable()) { + return true; + } + if (isGhes()) { + core.warning('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); + return false; } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = this[kHeaders][kHeadersList] - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - - // 3. Empty this’s headers’s header list. - headersList.clear() - - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const [key, val] of headers) { - headersList.append(key, val) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) - } + core.warning('The runner was not able to contact the cache service. Caching will be skipped'); + return false; +} +exports.isCacheFeatureAvailable = isCacheFeatureAvailable; +function getVersionFromFileContent(content, distributionName, versionFile) { + var _a, _b, _c, _d, _e; + let javaVersionRegExp; + function getFileName(versionFile) { + return path_1.default.basename(versionFile); } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null - - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') + const versionFileName = getFileName(versionFile); + if (versionFileName == '.tool-versions') { + javaVersionRegExp = + /^java\s+(?:\S*-)?(?\d+(?:\.\d+)*([+_.-](?:openj9[-._]?\d[\w.-]*|java\d+|jre[-_\w]*|OpenJDK\d+[\w_.-]*|[a-z0-9]+))*)/im; } - - // 35. Let initBody be null. - let initBody = null - - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody - - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) { - this[kHeaders].append('content-type', contentType) - } + else if (versionFileName == '.sdkmanrc') { + javaVersionRegExp = /^java\s*=\s*(?[^-]+)/m; } - - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody - - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } - - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } - - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true + else { + javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; } - - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody - - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - if (!TransformStream) { - TransformStream = (__nccwpck_require__(35356).TransformStream) - } - - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } + const capturedVersion = ((_b = (_a = content.match(javaVersionRegExp)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.version) + ? (_d = (_c = content.match(javaVersionRegExp)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.version + : ''; + core.debug(`Parsed version '${capturedVersion}' from file '${versionFileName}'`); + if (!capturedVersion) { + return null; } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' + const tentativeVersion = avoidOldNotation(capturedVersion); + const rawVersion = tentativeVersion.split('-')[0]; + let version = semver.validRange(rawVersion) + ? tentativeVersion + : semver.coerce(tentativeVersion); + core.debug(`Range version from file is '${version}'`); + if (!version) { + return null; } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' + if (constants_1.DISTRIBUTIONS_ONLY_MAJOR_VERSION.includes(distributionName)) { + const coerceVersion = (_e = semver.coerce(version)) !== null && _e !== void 0 ? _e : version; + version = semver.major(coerceVersion).toString(); } + return version.toString(); +} +exports.getVersionFromFileContent = getVersionFromFileContent; +// By convention, action expects version 8 in the format `8.*` instead of `1.8` +function avoidOldNotation(content) { + return content.startsWith('1.') ? content.substring(2) : content; +} +function convertVersionToSemver(version) { + // Some distributions may use semver-like notation (12.10.2.1, 12.10.2.1.1) + const versionArray = Array.isArray(version) ? version : version.split('.'); + const mainVersion = versionArray.slice(0, 3).join('.'); + if (versionArray.length > 3) { + return `${mainVersion}+${versionArray.slice(3).join('.')}`; + } + return mainVersion; +} +exports.convertVersionToSemver = convertVersionToSemver; +function getGitHubHttpHeaders() { + const resolvedToken = core.getInput('token') || process.env.GITHUB_TOKEN; + const auth = !resolvedToken ? undefined : `token ${resolvedToken}`; + const headers = { + accept: 'application/vnd.github.VERSION.raw' + }; + if (auth) { + headers.authorization = auth; + } + return headers; +} +exports.getGitHubHttpHeaders = getGitHubHttpHeaders; +// Rename archive to add extension because after downloading +// archive does not contain extension type and it leads to some issues +// on Windows runners without PowerShell Core. +// +// For default PowerShell Windows it should contain extension type to unpack it. +function renameWinArchive(javaArchivePath) { + const javaArchivePathRenamed = `${javaArchivePath}.zip`; + fs.renameSync(javaArchivePath, javaArchivePathRenamed); + return javaArchivePathRenamed; +} +exports.renameWinArchive = renameWinArchive; - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } +/***/ }), - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) +/***/ 22877: +/***/ ((module) => { - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } +module.exports = eval("require")("encoding"); - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } +/***/ }), - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) +/***/ 39491: +/***/ ((module) => { - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } +"use strict"; +module.exports = require("assert"); - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) +/***/ }), - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } +/***/ 50852: +/***/ ((module) => { - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) +"use strict"; +module.exports = require("async_hooks"); - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } +/***/ }), - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-foward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) +/***/ 14300: +/***/ ((module) => { - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } +"use strict"; +module.exports = require("buffer"); - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) +/***/ }), - // The signal getter steps are to return this’s signal. - return this[kSignal] - } +/***/ 32081: +/***/ ((module) => { - get body () { - webidl.brandCheck(this, Request) +"use strict"; +module.exports = require("child_process"); - return this[kState].body ? this[kState].body.stream : null - } +/***/ }), - get bodyUsed () { - webidl.brandCheck(this, Request) +/***/ 96206: +/***/ ((module) => { - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } +"use strict"; +module.exports = require("console"); - get duplex () { - webidl.brandCheck(this, Request) +/***/ }), - return 'half' - } +/***/ 6113: +/***/ ((module) => { - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) +"use strict"; +module.exports = require("crypto"); - // 1. If this is unusable, then throw a TypeError. - if (this.bodyUsed || this.body?.locked) { - throw new TypeError('unusable') - } +/***/ }), - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) +/***/ 67643: +/***/ ((module) => { - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - const clonedRequestObject = new Request(kConstruct) - clonedRequestObject[kState] = clonedRequest - clonedRequestObject[kRealm] = this[kRealm] - clonedRequestObject[kHeaders] = new Headers(kConstruct) - clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList - clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] - clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] +"use strict"; +module.exports = require("diagnostics_channel"); - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - util.addAbortListener( - this.signal, - () => { - ac.abort(this.signal.reason) - } - ) - } - clonedRequestObject[kSignal] = ac.signal +/***/ }), - // 4. Return clonedRequestObject. - return clonedRequestObject - } -} +/***/ 82361: +/***/ ((module) => { -mixinBody(Request) +"use strict"; +module.exports = require("events"); -function makeRequest (init) { - // https://fetch.spec.whatwg.org/#requests - const request = { - method: 'GET', - localURLsOnly: false, - unsafeRequest: false, - body: null, - client: null, - reservedClient: null, - replacesClientId: '', - window: 'client', - keepalive: false, - serviceWorkers: 'all', - initiator: '', - destination: '', - priority: null, - origin: 'client', - policyContainer: 'client', - referrer: 'client', - referrerPolicy: '', - mode: 'no-cors', - useCORSPreflightFlag: false, - credentials: 'same-origin', - useCredentials: false, - cache: 'default', - redirect: 'follow', - integrity: '', - cryptoGraphicsNonceMetadata: '', - parserMetadata: '', - reloadNavigation: false, - historyNavigation: false, - userActivation: false, - taintedOrigin: false, - redirectCount: 0, - responseTainting: 'basic', - preventNoCacheCacheControlHeaderModification: false, - done: false, - timingAllowFailed: false, - ...init, - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() - } - request.url = request.urlList[0] - return request -} +/***/ }), -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: +/***/ 57147: +/***/ ((module) => { - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) +"use strict"; +module.exports = require("fs"); - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(request.body) - } +/***/ }), - // 3. Return newRequest. - return newRequest -} +/***/ 13685: +/***/ ((module) => { -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) +"use strict"; +module.exports = require("http"); -webidl.converters.Request = webidl.interfaceConverter( - Request -) +/***/ }), -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) - } +/***/ 85158: +/***/ ((module) => { - if (V instanceof Request) { - return webidl.converters.Request(V) - } +"use strict"; +module.exports = require("http2"); - return webidl.converters.USVString(V) -} +/***/ }), -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) +/***/ 95687: +/***/ ((module) => { -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - } -]) +"use strict"; +module.exports = require("https"); -module.exports = { Request, makeRequest } +/***/ }), + +/***/ 41808: +/***/ ((module) => { +"use strict"; +module.exports = require("net"); /***/ }), -/***/ 27823: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 72254: +/***/ ((module) => { "use strict"; +module.exports = require("node:buffer"); +/***/ }), -const { Headers, HeadersList, fill } = __nccwpck_require__(10554) -const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(41472) -const util = __nccwpck_require__(83983) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode -} = __nccwpck_require__(52538) -const { - redirectStatusSet, - nullBodyStatus, - DOMException -} = __nccwpck_require__(41037) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) -const { webidl } = __nccwpck_require__(21744) -const { FormData } = __nccwpck_require__(72015) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { URLSerializer } = __nccwpck_require__(685) -const { kHeadersList, kConstruct } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { types } = __nccwpck_require__(73837) +/***/ 6005: +/***/ ((module) => { -const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(35356).ReadableStream) -const textEncoder = new TextEncoder('utf-8') +"use strict"; +module.exports = require("node:crypto"); -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // TODO - const relevantRealm = { settingsObject: {} } +/***/ }), - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = new Response() - responseObject[kState] = makeNetworkError() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm - return responseObject - } +/***/ 15673: +/***/ ((module) => { - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) +"use strict"; +module.exports = require("node:events"); - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } +/***/ }), - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) +/***/ 87561: +/***/ ((module) => { - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) +"use strict"; +module.exports = require("node:fs"); - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const relevantRealm = { settingsObject: {} } - const responseObject = new Response() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kGuard] = 'response' - responseObject[kHeaders][kRealm] = relevantRealm +/***/ }), - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) +/***/ 88849: +/***/ ((module) => { - // 5. Return responseObject. - return responseObject - } +"use strict"; +module.exports = require("node:http"); - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - const relevantRealm = { settingsObject: {} } +/***/ }), - webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) +/***/ 22286: +/***/ ((module) => { - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) +"use strict"; +module.exports = require("node:https"); - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, getGlobalOrigin()) - } catch (err) { - throw Object.assign(new TypeError('Failed to parse URL from ' + url), { - cause: err - }) - } +/***/ }), - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError('Invalid status code ' + status) - } +/***/ 70612: +/***/ ((module) => { - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = new Response() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm +"use strict"; +module.exports = require("node:os"); - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status +/***/ }), - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) +/***/ 97742: +/***/ ((module) => { - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value) +"use strict"; +module.exports = require("node:process"); - // 8. Return responseObject. - return responseObject - } +/***/ }), - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - if (body !== null) { - body = webidl.converters.BodyInit(body) - } +/***/ 84492: +/***/ ((module) => { - init = webidl.converters.ResponseInit(init) +"use strict"; +module.exports = require("node:stream"); - // TODO - this[kRealm] = { settingsObject: {} } +/***/ }), - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) +/***/ 47261: +/***/ ((module) => { - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - this[kHeaders][kGuard] = 'response' - this[kHeaders][kHeadersList] = this[kState].headersList - this[kHeaders][kRealm] = this[kRealm] +"use strict"; +module.exports = require("node:util"); - // 3. Let bodyWithType be null. - let bodyWithType = null +/***/ }), - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } +/***/ 65628: +/***/ ((module) => { - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } +"use strict"; +module.exports = require("node:zlib"); - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) +/***/ }), - // The type getter steps are to return this’s response’s type. - return this[kState].type - } +/***/ 22037: +/***/ ((module) => { - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) +"use strict"; +module.exports = require("os"); - const urlList = this[kState].urlList +/***/ }), - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null +/***/ 71017: +/***/ ((module) => { - if (url === null) { - return '' - } +"use strict"; +module.exports = require("path"); - return URLSerializer(url, true) - } +/***/ }), - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) +/***/ 4074: +/***/ ((module) => { - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 - } +"use strict"; +module.exports = require("perf_hooks"); - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) +/***/ }), - // The status getter steps are to return this’s response’s status. - return this[kState].status - } +/***/ 85477: +/***/ ((module) => { - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) +"use strict"; +module.exports = require("punycode"); - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } +/***/ }), - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) +/***/ 63477: +/***/ ((module) => { - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } +"use strict"; +module.exports = require("querystring"); - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) +/***/ }), - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } +/***/ 12781: +/***/ ((module) => { - get body () { - webidl.brandCheck(this, Response) +"use strict"; +module.exports = require("stream"); - return this[kState].body ? this[kState].body.stream : null - } +/***/ }), - get bodyUsed () { - webidl.brandCheck(this, Response) +/***/ 35356: +/***/ ((module) => { - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } +"use strict"; +module.exports = require("stream/web"); - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) +/***/ }), - // 1. If this is unusable, then throw a TypeError. - if (this.bodyUsed || (this.body && this.body.locked)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) - } +/***/ 71576: +/***/ ((module) => { - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) +"use strict"; +module.exports = require("string_decoder"); - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - const clonedResponseObject = new Response() - clonedResponseObject[kState] = clonedResponse - clonedResponseObject[kRealm] = this[kRealm] - clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList - clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard] - clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm] +/***/ }), - return clonedResponseObject - } -} +/***/ 39512: +/***/ ((module) => { -mixinBody(Response) +"use strict"; +module.exports = require("timers"); -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) +/***/ }), -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) +/***/ 24404: +/***/ ((module) => { -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: +"use strict"; +module.exports = require("tls"); - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } +/***/ }), - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) +/***/ 76224: +/***/ ((module) => { - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(response.body) - } +"use strict"; +module.exports = require("tty"); - // 4. Return newResponse. - return newResponse -} +/***/ }), -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList(), - urlList: init.urlList ? [...init.urlList] : [] - } -} +/***/ 57310: +/***/ ((module) => { -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} +"use strict"; +module.exports = require("url"); -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state - } +/***/ }), - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} +/***/ 73837: +/***/ ((module) => { + +"use strict"; +module.exports = require("util"); -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. +/***/ }), - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. +/***/ 29830: +/***/ ((module) => { - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. +"use strict"; +module.exports = require("util/types"); - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. +/***/ }), - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} +/***/ 71267: +/***/ ((module) => { -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) +"use strict"; +module.exports = require("worker_threads"); - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} +/***/ }), -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') - } +/***/ 59796: +/***/ ((module) => { - // 2. If init["statusText"] does not match the reason-phrase token production, - // then throw a TypeError. - if ('statusText' in init && init.statusText != null) { - // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: - // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError('Invalid statusText') - } - } +"use strict"; +module.exports = require("zlib"); - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } +/***/ }), - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } +/***/ 31875: +/***/ ((__unused_webpack_module, exports) => { - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) - } +"use strict"; - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: 'Invalid response status code ' + response.status - }) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureKeyCredential = void 0; +/** + * A static-key-based credential that supports updating + * the underlying key value. + */ +class AzureKeyCredential { + _key; + /** + * The value of the key to be used in authentication + */ + get key() { + return this._key; + } + /** + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key - The initial value of the key to use in authentication + */ + constructor(key) { + if (!key) { + throw new Error("key must be a non-empty string"); + } + this._key = key; + } + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey - The new key value to be used + */ + update(newKey) { + this._key = newKey; } +} +exports.AzureKeyCredential = AzureKeyCredential; +//# sourceMappingURL=azureKeyCredential.js.map - // 2. Set response's body to body's body. - response[kState].body = body.body +/***/ }), - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('Content-Type')) { - response[kState].headersList.append('content-type', body.type) +/***/ 51377: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureNamedKeyCredential = void 0; +exports.isNamedKeyCredential = isNamedKeyCredential; +const core_util_1 = __nccwpck_require__(80637); +/** + * A static name/key-based credential that supports updating + * the underlying name and key values. + */ +class AzureNamedKeyCredential { + _key; + _name; + /** + * The value of the key to be used in authentication. + */ + get key() { + return this._key; } - } + /** + * The value of the name to be used in authentication. + */ + get name() { + return this._name; + } + /** + * Create an instance of an AzureNamedKeyCredential for use + * with a service client. + * + * @param name - The initial value of the name to use in authentication. + * @param key - The initial value of the key to use in authentication. + */ + constructor(name, key) { + if (!name || !key) { + throw new TypeError("name and key must be non-empty strings"); + } + this._name = name; + this._key = key; + } + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newName - The new name value to be used. + * @param newKey - The new key value to be used. + */ + update(newName, newKey) { + if (!newName || !newKey) { + throw new TypeError("newName and newKey must be non-empty strings"); + } + this._name = newName; + this._key = newKey; + } +} +exports.AzureNamedKeyCredential = AzureNamedKeyCredential; +/** + * Tests an object to determine whether it implements NamedKeyCredential. + * + * @param credential - The assumed NamedKeyCredential to be tested. + */ +function isNamedKeyCredential(credential) { + return ((0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && + typeof credential.key === "string" && + typeof credential.name === "string"); } +//# sourceMappingURL=azureNamedKeyCredential.js.map -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) +/***/ }), -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) +/***/ 27182: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) +"use strict"; -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureSASCredential = void 0; +exports.isSASCredential = isSASCredential; +const core_util_1 = __nccwpck_require__(80637); +/** + * A static-signature-based credential that supports updating + * the underlying signature value. + */ +class AzureSASCredential { + _signature; + /** + * The value of the shared access signature to be used in authentication + */ + get signature() { + return this._signature; + } + /** + * Create an instance of an AzureSASCredential for use + * with a service client. + * + * @param signature - The initial value of the shared access signature to use in authentication + */ + constructor(signature) { + if (!signature) { + throw new Error("shared access signature must be a non-empty string"); + } + this._signature = signature; + } + /** + * Change the value of the signature. + * + * Updates will take effect upon the next request after + * updating the signature value. + * + * @param newSignature - The new shared access signature value to be used + */ + update(newSignature) { + if (!newSignature) { + throw new Error("shared access signature must be a non-empty string"); + } + this._signature = newSignature; + } +} +exports.AzureSASCredential = AzureSASCredential; +/** + * Tests an object to determine whether it implements SASCredential. + * + * @param credential - The assumed SASCredential to be tested. + */ +function isSASCredential(credential) { + return ((0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"); +} +//# sourceMappingURL=azureSASCredential.js.map - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } +/***/ }), - if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { - return webidl.converters.BufferSource(V) - } +/***/ 98834: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, { strict: false }) - } +"use strict"; - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0; +var azureKeyCredential_js_1 = __nccwpck_require__(31875); +Object.defineProperty(exports, "AzureKeyCredential", ({ enumerable: true, get: function () { return azureKeyCredential_js_1.AzureKeyCredential; } })); +var keyCredential_js_1 = __nccwpck_require__(59122); +Object.defineProperty(exports, "isKeyCredential", ({ enumerable: true, get: function () { return keyCredential_js_1.isKeyCredential; } })); +var azureNamedKeyCredential_js_1 = __nccwpck_require__(51377); +Object.defineProperty(exports, "AzureNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; } })); +Object.defineProperty(exports, "isNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.isNamedKeyCredential; } })); +var azureSASCredential_js_1 = __nccwpck_require__(27182); +Object.defineProperty(exports, "AzureSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.AzureSASCredential; } })); +Object.defineProperty(exports, "isSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.isSASCredential; } })); +var tokenCredential_js_1 = __nccwpck_require__(39162); +Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: function () { return tokenCredential_js_1.isTokenCredential; } })); +//# sourceMappingURL=index.js.map - return webidl.converters.DOMString(V) -} +/***/ }), -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V) - } +/***/ 59122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } +"use strict"; - return webidl.converters.XMLHttpRequestBodyInit(V) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isKeyCredential = isKeyCredential; +const core_util_1 = __nccwpck_require__(80637); +/** + * Tests an object to determine whether it implements KeyCredential. + * + * @param credential - The assumed KeyCredential to be tested. + */ +function isKeyCredential(credential) { + return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; } +//# sourceMappingURL=keyCredential.js.map -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) +/***/ }), -module.exports = { - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse -} +/***/ 39162: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isBearerToken = isBearerToken; +exports.isPopToken = isPopToken; +exports.isTokenCredential = isTokenCredential; +/** + * @internal + * @param accessToken - Access token + * @returns Whether a token is bearer type or not + */ +function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; +} +/** + * @internal + * @param accessToken - Access token + * @returns Whether a token is Pop token or not + */ +function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; +} +/** + * Tests an object to determine whether it implements TokenCredential. + * + * @param credential - The assumed TokenCredential to be tested. + */ +function isTokenCredential(credential) { + // Check for an object with a 'getToken' function and possibly with + // a 'signRequest' function. We do this check to make sure that + // a ServiceClientCredentials implementor (like TokenClientCredentials + // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if + // it doesn't actually implement TokenCredential also. + const castCredential = credential; + return (castCredential && + typeof castCredential.getToken === "function" && + (castCredential.signRequest === undefined || castCredential.getToken.length > 0)); +} +//# sourceMappingURL=tokenCredential.js.map /***/ }), -/***/ 15861: -/***/ ((module) => { +/***/ 94873: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kGuard: Symbol('guard'), - kRealm: Symbol('realm') +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseCAEChallenge = parseCAEChallenge; +exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; +const log_js_1 = __nccwpck_require__(53776); +const base64_js_1 = __nccwpck_require__(23442); +/** + * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. + * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. + * + * @internal + */ +function parseCAEChallenge(challenges) { + const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); + return bearerChallenges.map((challenge) => { + const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); + const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); + // Key-value pairs to plain object: + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); + }); +} +/** + * This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges: + * [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation). + * + * Call the `bearerTokenAuthenticationPolicy` with the following options: + * + * ```ts snippet:AuthorizeRequestOnClaimChallenge + * import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; + * import { authorizeRequestOnClaimChallenge } from "@azure/core-client"; + * + * const policy = bearerTokenAuthenticationPolicy({ + * challengeCallbacks: { + * authorizeRequestOnChallenge: authorizeRequestOnClaimChallenge, + * }, + * scopes: ["https://service/.default"], + * }); + * ``` + * + * Once provided, the `bearerTokenAuthenticationPolicy` policy will internally handle Continuous Access Evaluation (CAE) challenges. + * When it can't complete a challenge it will return the 401 (unauthorized) response from ARM. + * + * Example challenge with claims: + * + * ``` + * Bearer authorization_uri="https://login.windows-ppe.net/", error="invalid_token", + * error_description="User session has been revoked", + * claims="eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbHVlIjoiMTYwMzc0MjgwMCJ9fX0=" + * ``` + */ +async function authorizeRequestOnClaimChallenge(onChallengeOptions) { + const { scopes, response } = onChallengeOptions; + const logger = onChallengeOptions.logger || log_js_1.logger; + const challenge = response.headers.get("WWW-Authenticate"); + if (!challenge) { + logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const challenges = parseCAEChallenge(challenge) || []; + const parsedChallenge = challenges.find((x) => x.claims); + if (!parsedChallenge) { + logger.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { + claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims), + }); + if (!accessToken) { + return false; + } + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } - +//# sourceMappingURL=authorizeRequestOnClaimChallenge.js.map /***/ }), -/***/ 52538: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 16576: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(41037) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { performance } = __nccwpck_require__(4074) -const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(83983) -const assert = __nccwpck_require__(39491) -const { isUint8Array } = __nccwpck_require__(29830) - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')|undefined} */ -let crypto - -try { - crypto = __nccwpck_require__(6113) -} catch { - -} - -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} - -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null - } - - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location') - - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - location = new URL(location, responseURL(response)) - } - - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } - - // 5. Return location. - return location -} - -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.authorizeRequestOnTenantChallenge = void 0; +/** + * A set of constants used internally when processing requests. + */ +const Constants = { + DefaultScope: "/.default", + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + */ + AUTHORIZATION: "authorization", + }, +}; +function isUuid(text) { + return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(text); } - -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false +/** + * Defines a callback to handle auth challenge for Storage APIs. + * This implements the bearer challenge process described here: https://learn.microsoft.com/rest/api/storageservices/authorize-with-azure-active-directory#bearer-challenge + * Handling has specific features for storage that departs to the general AAD challenge docs. + **/ +const authorizeRequestOnTenantChallenge = async (challengeOptions) => { + const requestOptions = requestToOptions(challengeOptions.request); + const challenge = getChallenge(challengeOptions.response); + if (challenge) { + const challengeInfo = parseChallenge(challenge); + const challengeScopes = buildScopes(challengeOptions, challengeInfo); + const tenantId = extractTenantId(challengeInfo); + if (!tenantId) { + return false; + } + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId, + }); + if (!accessToken) { + return false; + } + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } - } - return true + return false; +}; +exports.authorizeRequestOnTenantChallenge = authorizeRequestOnTenantChallenge; +/** + * Extracts the tenant id from the challenge information + * The tenant id is contained in the authorization_uri as the first + * path part. + */ +function extractTenantId(challengeInfo) { + const parsedAuthUri = new URL(challengeInfo.authorization_uri); + const pathSegments = parsedAuthUri.pathname.split("/"); + const tenantId = pathSegments[1]; + if (tenantId && isUuid(tenantId)) { + return tenantId; + } + return undefined; } - /** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c + * Builds the authentication scopes based on the information that comes in the + * challenge information. Scopes url is present in the resource_id, if it is empty + * we keep using the original scopes. */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } +function buildScopes(challengeOptions, challengeInfo) { + if (!challengeInfo.resource_id) { + return challengeOptions.scopes; + } + const challengeScopes = new URL(challengeInfo.resource_id); + challengeScopes.pathname = Constants.DefaultScope; + let scope = challengeScopes.toString(); + if (scope === "https://disk.azure.com/.default") { + // the extra slash is required by the service + scope = "https://disk.azure.com//.default"; + } + return [scope]; } - /** - * @param {string} characters + * We will retrieve the challenge only if the response status code was 401, + * and if the response contained the header "WWW-Authenticate" with a non-empty value. */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false +function getChallenge(response) { + const challenge = response.headers.get("WWW-Authenticate"); + if (response.status === 401 && challenge) { + return challenge; } - } - return true + return; } - /** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue + * Converts: `Bearer a="b" c="d"`. + * Into: `[ { a: 'b', c: 'd' }]`. + * + * @internal */ -function isValidHeaderName (potentialValue) { - return isValidHTTPToken(potentialValue) +function parseChallenge(challenge) { + const bearerChallenge = challenge.slice("Bearer ".length); + const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); + const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); + // Key-value pairs to plain object: + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); } - /** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue + * Extracts the options form a Pipeline Request for later re-use */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - if ( - potentialValue.startsWith('\t') || - potentialValue.startsWith(' ') || - potentialValue.endsWith('\t') || - potentialValue.endsWith(' ') - ) { - return false - } - - if ( - potentialValue.includes('\0') || - potentialValue.includes('\r') || - potentialValue.includes('\n') - ) { - return false - } - - return true +function requestToOptions(request) { + return { + abortSignal: request.abortSignal, + requestOptions: { + timeout: request.timeout, + }, + tracingOptions: request.tracingOptions, + }; } +//# sourceMappingURL=authorizeRequestOnTenantChallenge.js.map -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. +/***/ }), - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy') ?? '').split(',') +/***/ 23442: +/***/ ((__unused_webpack_module, exports) => { - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } - } +"use strict"; - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.encodeString = encodeString; +exports.encodeByteArray = encodeByteArray; +exports.decodeString = decodeString; +exports.decodeStringToString = decodeStringToString; +/** + * Encodes a string in base64 format. + * @param value - the string to encode + * @internal + */ +function encodeString(value) { + return Buffer.from(value).toString("base64"); } - -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' +/** + * Encodes a byte array in base64 format. + * @param value - the Uint8Aray to encode + * @internal + */ +function encodeByteArray(value) { + const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); } - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' +/** + * Decodes a base64 string into a byte array. + * @param value - the base64 string to decode + * @internal + */ +function decodeString(value) { + return Buffer.from(value, "base64"); } - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' +/** + * Decodes a base64 string into a string. + * @param value - the base64 string to decode + * @internal + */ +function decodeStringToString(value) { + return Buffer.from(value, "base64").toString(); } +//# sourceMappingURL=base64.js.map -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - - // 2. Let header be a Structured Header whose value is a token. - let header = null - - // 3. Set header’s value to r’s mode. - header = httpRequest.mode +/***/ }), - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header) +/***/ 25315: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO +"use strict"; - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializationPolicyName = void 0; +exports.deserializationPolicy = deserializationPolicy; +const interfaces_js_1 = __nccwpck_require__(8153); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const serializer_js_1 = __nccwpck_require__(63566); +const operationHelpers_js_1 = __nccwpck_require__(62074); +const defaultJsonContentTypes = ["application/json", "text/json"]; +const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; +/** + * The programmatic identifier of the deserializationPolicy. + */ +exports.deserializationPolicyName = "deserializationPolicy"; +/** + * This policy handles parsing out responses according to OperationSpecs on the request. + */ +function deserializationPolicy(options = {}) { + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; + const parseXML = options.parseXML; + const serializerOptions = options.serializerOptions; + const updatedOptions = { + xml: { + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + }; + return { + name: exports.deserializationPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML); + }, + }; } - -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin with request. - let serializedOrigin = request.origin - - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - if (serializedOrigin) { - request.headersList.append('origin', serializedOrigin) +function getOperationResponseMap(parsedResponse) { + let result; + const request = parsedResponse.request; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const operationSpec = operationInfo?.operationSpec; + if (operationSpec) { + if (!operationInfo?.operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } + else { + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); + } } - - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null + return result; +} +function shouldDeserializeResponse(parsedResponse) { + const request = parsedResponse.request; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const shouldDeserialize = operationInfo?.shouldDeserialize; + let result; + if (shouldDeserialize === undefined) { + result = true; + } + else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } + else { + result = shouldDeserialize(parsedResponse); + } + return result; +} +async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) { + const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML); + if (!shouldDeserializeResponse(parsedResponse)) { + return parsedResponse; + } + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); + const operationSpec = operationInfo?.operationSpec; + if (!operationSpec || !operationSpec.responses) { + return parsedResponse; + } + const responseSpec = getOperationResponseMap(parsedResponse); + const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); + if (error) { + throw error; + } + else if (shouldReturnResponse) { + return parsedResponse; + } + // An operation response spec does exist for current status code, so + // use it to deserialize the response. + if (responseSpec) { + if (responseSpec.bodyMapper) { + let valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { + valueToDeserialize = + typeof valueToDeserialize === "object" + ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] + : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); + } + catch (deserializeError) { + const restError = new core_rest_pipeline_1.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse, + }); + throw restError; + } } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null + else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true }); } - break - default: - // Do nothing. - } - - if (serializedOrigin) { - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin) } - } -} - -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - // TODO - return performance.now() + return parsedResponse; } - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null - } +function isOperationSpecEmpty(operationSpec) { + const expectedStatusCodes = Object.keys(operationSpec.responses); + return (expectedStatusCodes.length === 0 || + (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); } - -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' - } +function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { + const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; + const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) + ? isSuccessByStatus + : !!responseSpec; + if (isExpectedStatusCode) { + if (responseSpec) { + if (!responseSpec.isError) { + return { error: null, shouldReturnResponse: false }; + } + } + else { + return { error: null, shouldReturnResponse: false }; + } + } + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) + ? `Unexpected status code: ${parsedResponse.status}` + : parsedResponse.bodyAsText; + const error = new core_rest_pipeline_1.RestError(initialErrorMessage, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse, + }); + // If the item failed but there's no error spec or default spec to deserialize the error, + // and the parsed body doesn't look like an error object, + // we should fail so we just throw the parsed response + if (!errorResponseSpec && + !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { + throw error; + } + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; + try { + // If error response has a body, try to deserialize it using default body mapper. + // Then try to extract error code & message from it + if (parsedResponse.parsedBody) { + const parsedBody = parsedResponse.parsedBody; + let deserializedError; + if (defaultBodyMapper) { + let valueToDeserialize = parsedBody; + if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { + valueToDeserialize = []; + const elementName = defaultBodyMapper.xmlElementName; + if (typeof parsedBody === "object" && elementName) { + valueToDeserialize = parsedBody[elementName]; + } + } + deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options); + } + const internalError = parsedBody.error || deserializedError || parsedBody; + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + if (defaultBodyMapper) { + error.response.parsedBody = deserializedError; + } + } + // If error response has headers, try to deserialize it using default header mapper + if (parsedResponse.headers && defaultHeadersMapper) { + error.response.parsedHeaders = + operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); + } + } + catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; + } + return { error, shouldReturnResponse: false }; } - -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } +async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && + operationResponse.bodyAsText) { + const text = operationResponse.bodyAsText; + const contentType = operationResponse.headers.get("Content-Type") || ""; + const contentComponents = !contentType + ? [] + : contentType.split(";").map((component) => component.toLowerCase()); + try { + if (contentComponents.length === 0 || + contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { + operationResponse.parsedBody = JSON.parse(text); + return operationResponse; + } + else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { + if (!parseXML) { + throw new Error("Parsing XML not supported."); + } + const body = await parseXML(text, opts.xml); + operationResponse.parsedBody = body; + return operationResponse; + } + } + catch (err) { + const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; + const errCode = err.code || core_rest_pipeline_1.RestError.PARSE_ERROR; + const e = new core_rest_pipeline_1.RestError(msg, { + code: errCode, + statusCode: operationResponse.status, + request: operationResponse.request, + response: operationResponse, + }); + throw e; + } + } + return operationResponse; } +//# sourceMappingURL=deserializationPolicy.js.map -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy - - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - - // 2. Let environment be request’s client. - - let referrerSource = null +/***/ }), - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. +/***/ 30308: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const globalOrigin = getGlobalOrigin() +"use strict"; - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +let cachedHttpClient; +function getCachedDefaultHttpClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } + return cachedHttpClient; +} +//# sourceMappingURL=httpClientCache.js.map - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) +/***/ }), - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) +/***/ 7611: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } +"use strict"; - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.authorizeRequestOnTenantChallenge = exports.authorizeRequestOnClaimChallenge = exports.serializationPolicyName = exports.serializationPolicy = exports.deserializationPolicyName = exports.deserializationPolicy = exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.createClientPipeline = exports.ServiceClient = exports.MapperTypeNames = exports.createSerializer = void 0; +var serializer_js_1 = __nccwpck_require__(63566); +Object.defineProperty(exports, "createSerializer", ({ enumerable: true, get: function () { return serializer_js_1.createSerializer; } })); +Object.defineProperty(exports, "MapperTypeNames", ({ enumerable: true, get: function () { return serializer_js_1.MapperTypeNames; } })); +var serviceClient_js_1 = __nccwpck_require__(28927); +Object.defineProperty(exports, "ServiceClient", ({ enumerable: true, get: function () { return serviceClient_js_1.ServiceClient; } })); +var pipeline_js_1 = __nccwpck_require__(33924); +Object.defineProperty(exports, "createClientPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createClientPipeline; } })); +var interfaces_js_1 = __nccwpck_require__(8153); +Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_ATTRKEY; } })); +Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_CHARKEY; } })); +var deserializationPolicy_js_1 = __nccwpck_require__(25315); +Object.defineProperty(exports, "deserializationPolicy", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicy; } })); +Object.defineProperty(exports, "deserializationPolicyName", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicyName; } })); +var serializationPolicy_js_1 = __nccwpck_require__(96625); +Object.defineProperty(exports, "serializationPolicy", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicy; } })); +Object.defineProperty(exports, "serializationPolicyName", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicyName; } })); +var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(94873); +Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } })); +var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(16576); +Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } })); +//# sourceMappingURL=index.js.map - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) +/***/ }), - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL - } +/***/ 41459: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } +"use strict"; - // 3. Return referrerOrigin. - return referrerOrigin +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; +exports.getPathStringFromParameter = getPathStringFromParameter; +const serializer_js_1 = __nccwpck_require__(63566); +/** + * Gets the list of status codes for streaming responses. + * @internal + */ +function getStreamingResponseStatusCodes(operationSpec) { + const result = new Set(); + for (const statusCode in operationSpec.responses) { + const operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && + operationResponse.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Stream) { + result.add(Number(statusCode)); + } } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } + return result; } - /** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter - The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + * @internal */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } - - // 3. Set url’s username to the empty string. - url.username = '' - - // 4. Set url’s password to the empty string. - url.password = '' +function getPathStringFromParameter(parameter) { + const { parameterPath, mapper } = parameter; + let result; + if (typeof parameterPath === "string") { + result = parameterPath; + } + else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } + else { + result = mapper.serializedName; + } + return result; +} +//# sourceMappingURL=interfaceHelpers.js.map - // 5. Set url’s fragment to null. - url.hash = '' +/***/ }), - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' +/***/ 8153: +/***/ ((__unused_webpack_module, exports) => { - // 2. Set url’s query to null. - url.search = '' - } +"use strict"; - // 7. Return url. - return url -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; +/** + * Default key used to access the XML attributes. + */ +exports.XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +exports.XML_CHARKEY = "_"; +//# sourceMappingURL=interfaces.js.map -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false - } +/***/ }), - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true - } +/***/ 53776: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // If scheme is data, return true - if (url.protocol === 'data:') return true +"use strict"; - // If file, return true - if (url.protocol === 'file:') return true +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); +exports.logger = (0, logger_1.createClientLogger)("core-client"); +//# sourceMappingURL=log.js.map - return isOriginPotentiallyTrustworthy(url.origin) +/***/ }), - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false +/***/ 62074: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const originAsURL = new URL(origin) +"use strict"; - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; +exports.getOperationRequestInfo = getOperationRequestInfo; +const state_js_1 = __nccwpck_require__(35429); +/** + * @internal + * Retrieves the value to use for a given operation argument + * @param operationArguments - The arguments passed from the generated client + * @param parameter - The parameter description + * @param fallbackObject - If something isn't found in the arguments bag, look here. + * Generally used to look at the service client properties. + */ +function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { + let parameterPath = parameter.parameterPath; + const parameterMapper = parameter.mapper; + let value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; } - - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } + else { + let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound && fallbackObject) { + propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); + } + let useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = + parameterMapper.required || + (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } + } } - - // If any other, return false - return false - } + else { + if (parameterMapper.required) { + value = {}; + } + for (const propertyName in parameterPath) { + const propertyMapper = parameterMapper.type.modelProperties[propertyName]; + const propertyPath = parameterPath[propertyName]; + const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { + parameterPath: propertyPath, + mapper: propertyMapper, + }, fallbackObject); + if (propertyValue !== undefined) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; + } + } + } + return value; +} +function getPropertyFromParameterPath(parent, parameterPath) { + const result = { propertyFound: false }; + let i = 0; + for (; i < parameterPath.length; ++i) { + const parameterPathPart = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent && parameterPathPart in parent) { + parent = parent[parameterPathPart]; + } + else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; +} +const originalRequestSymbol = Symbol.for("@azure/core-client original request"); +function hasOriginalRequest(request) { + return originalRequestSymbol in request; +} +function getOperationRequestInfo(request) { + if (hasOriginalRequest(request)) { + return getOperationRequestInfo(request[originalRequestSymbol]); + } + let info = state_js_1.state.operationRequestMap.get(request); + if (!info) { + info = {}; + state_js_1.state.operationRequestMap.set(request, info); + } + return info; } +//# sourceMappingURL=operationHelpers.js.map -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - - // 3. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } +/***/ }), - // 4. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo)) - // get the strongest algorithm - const strongest = list[0].algo - // get all entries that use the strongest algorithm; ignore weaker - const metadata = list.filter((item) => item.algo === strongest) +/***/ 33924: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 5. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo +"use strict"; - // 2. Let expectedValue be the val component of item. - let expectedValue = item.hash +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createClientPipeline = createClientPipeline; +const deserializationPolicy_js_1 = __nccwpck_require__(25315); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const serializationPolicy_js_1 = __nccwpck_require__(96625); +/** + * Creates a new Pipeline for use with a Service Client. + * Adds in deserializationPolicy by default. + * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential. + * @param options - Options to customize the created pipeline. + */ +function createClientPipeline(options = {}) { + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); + if (options.credentialOptions) { + pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential: options.credentialOptions.credential, + scopes: options.credentialOptions.credentialScopes, + })); + } + pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); + pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { + phase: "Deserialize", + }); + return pipeline; +} +//# sourceMappingURL=pipeline.js.map - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. +/***/ }), - if (expectedValue.endsWith('==')) { - expectedValue = expectedValue.slice(0, -2) - } +/***/ 96625: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') +"use strict"; - if (actualValue.endsWith('==')) { - actualValue = actualValue.slice(0, -2) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializationPolicyName = void 0; +exports.serializationPolicy = serializationPolicy; +exports.serializeHeaders = serializeHeaders; +exports.serializeRequestBody = serializeRequestBody; +const interfaces_js_1 = __nccwpck_require__(8153); +const operationHelpers_js_1 = __nccwpck_require__(62074); +const serializer_js_1 = __nccwpck_require__(63566); +const interfaceHelpers_js_1 = __nccwpck_require__(41459); +/** + * The programmatic identifier of the serializationPolicy. + */ +exports.serializationPolicyName = "serializationPolicy"; +/** + * This policy handles assembling the request body and headers using + * an OperationSpec and OperationArguments on the request. + */ +function serializationPolicy(options = {}) { + const stringifyXML = options.stringifyXML; + return { + name: exports.serializationPolicyName, + async sendRequest(request, next) { + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; + if (operationSpec && operationArguments) { + serializeHeaders(request, operationArguments, operationSpec); + serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); + } + return next(request); + }, + }; +} +/** + * @internal + */ +function serializeHeaders(request, operationArguments, operationSpec) { + if (operationSpec.headerParameters) { + for (const headerParameter of operationSpec.headerParameters) { + let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); + if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter)); + const headerCollectionPrefix = headerParameter.mapper + .headerCollectionPrefix; + if (headerCollectionPrefix) { + for (const key of Object.keys(headerValue)) { + request.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } + else { + request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter), headerValue); + } + } + } } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (actualValue === expectedValue) { - return true + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; + if (customHeaders) { + for (const customHeaderName of Object.keys(customHeaders)) { + request.headers.set(customHeaderName, customHeaders[customHeaderName]); + } } - - let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url') - - if (actualBase64URL.endsWith('==')) { - actualBase64URL = actualBase64URL.slice(0, -2) +} +/** + * @internal + */ +function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () { + throw new Error("XML serialization unsupported!"); +}) { + const serializerOptions = operationArguments.options?.serializerOptions; + const updatedOptions = { + xml: { + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + }; + const xmlCharKey = updatedOptions.xml.xmlCharKey; + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + request.body = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); + const bodyMapper = operationSpec.requestBody.mapper; + const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable, } = bodyMapper; + const typeName = bodyMapper.type.name; + try { + if ((request.body !== undefined && request.body !== null) || + (nullable && request.body === null) || + required) { + const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); + request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); + const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; + if (operationSpec.isXML) { + const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; + const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); + if (typeName === serializer_js_1.MapperTypeNames.Sequence) { + request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); + } + else if (!isStream) { + request.body = stringifyXML(value, { + rootName: xmlName || serializedName, + xmlCharKey, + }); + } + } + else if (typeName === serializer_js_1.MapperTypeNames.String && + (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { + // the String serializer has validated that request body is a string + // so just send the string. + return; + } + else if (!isStream) { + request.body = JSON.stringify(request.body); + } + } + } + catch (error) { + throw new Error(`Error "${error.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, " ")}.`); + } } - - if (actualBase64URL === expectedValue) { - return true + else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + request.formData = {}; + for (const formDataParameter of operationSpec.formDataParameters) { + const formDataParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); + if (formDataParameterValue !== undefined && formDataParameterValue !== null) { + const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter); + request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter), updatedOptions); + } + } } - } - - // 6. Return false. - return false } - -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i - /** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata + * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - - // 2. Let empty be equal to true. - let empty = true +function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { + // Composite and Sequence schemas already got their root namespace set during serialization + // We just need to add xmlns to the other schema types + if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { + const result = {}; + result[options.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; + return result; + } + return serializedValue; +} +function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { + if (!Array.isArray(obj)) { + obj = [obj]; + } + if (!xmlNamespaceKey || !xmlNamespace) { + return { [elementName]: obj }; + } + const result = { [elementName]: obj }; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; + return result; +} +//# sourceMappingURL=serializationPolicy.js.map - const supportedHashes = crypto.getHashes() +/***/ }), - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false +/***/ 63566: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) +"use strict"; - // 3. If token does not parse, continue to the next token. - if (parsedToken === null || parsedToken.groups === undefined) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MapperTypeNames = void 0; +exports.createSerializer = createSerializer; +const tslib_1 = __nccwpck_require__(4351); +const base64 = tslib_1.__importStar(__nccwpck_require__(23442)); +const interfaces_js_1 = __nccwpck_require__(8153); +const utils_js_1 = __nccwpck_require__(25363); +class SerializerImpl { + modelMappers; + isXML; + constructor(modelMappers = {}, isXML = false) { + this.modelMappers = modelMappers; + this.isXML = isXML; } - - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo - - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm.toLowerCase())) { - result.push(parsedToken.groups) + /** + * @deprecated Removing the constraints validation on client side. + */ + validateConstraints(mapper, value, objectName) { + const failValidation = (constraintName, constraintValue) => { + throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); + }; + if (mapper.constraints && value !== undefined && value !== null) { + const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints; + if (ExclusiveMaximum !== undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum !== undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum !== undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum !== undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems !== undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength !== undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems !== undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength !== undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf !== undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if (typeof value !== "string" || value.match(pattern) === null) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && + value.some((item, i, ar) => ar.indexOf(item) !== i)) { + failValidation("UniqueItems", UniqueItems); + } + } + } + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param object - A valid Javascript object to be serialized + * + * @param objectName - Name of the serialized object + * + * @param options - additional options to serialization + * + * @returns A valid serialized Javascript object + */ + serialize(mapper, object, objectName, options = { xml: {} }) { + const updatedOptions = { + xml: { + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + }; + let payload = {}; + const mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/i) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + const { required, nullable } = mapper; + if (required && nullable && object === undefined) { + throw new Error(`${objectName} cannot be undefined.`); + } + if (required && !nullable && (object === undefined || object === null)) { + throw new Error(`${objectName} cannot be null or undefined.`); + } + if (!required && nullable === false && object === null) { + throw new Error(`${objectName} cannot be null.`); + } + if (object === undefined || object === null) { + payload = object; + } + else { + if (mapperType.match(/^any$/i) !== null) { + payload = object; + } + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } + else if (mapperType.match(/^Enum$/i) !== null) { + const enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = serializeByteArrayType(objectName, object); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = serializeBase64UrlType(objectName, object); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Composite$/i) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + } + return payload; + } + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param responseBody - A valid Javascript entity to be deserialized + * + * @param objectName - Name of the deserialized object + * + * @param options - Controls behavior of XML parser and builder. + * + * @returns A valid deserialized Javascript object + */ + deserialize(mapper, responseBody, objectName, options = { xml: {} }) { + const updatedOptions = { + xml: { + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false, + }; + if (responseBody === undefined || responseBody === null) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + let payload; + const mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/i) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); + } + else { + if (this.isXML) { + const xmlCharKey = updatedOptions.xml.xmlCharKey; + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, + * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. + */ + if (responseBody[interfaces_js_1.XML_ATTRKEY] !== undefined && responseBody[xmlCharKey] !== undefined) { + responseBody = responseBody[xmlCharKey]; + } + } + if (mapperType.match(/^Number$/i) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } + else if (mapperType.match(/^Boolean$/i) !== null) { + if (responseBody === "true") { + payload = true; + } + else if (responseBody === "false") { + payload = false; + } + else { + payload = responseBody; + } + } + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { + payload = responseBody; + } + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { + payload = new Date(responseBody); + } + else if (mapperType.match(/^UnixTime$/i) !== null) { + payload = unixTimeToDate(responseBody); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = base64.decodeString(responseBody); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = base64UrlToByteArray(responseBody); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); + } + } + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + return payload; } - } - - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } - - return result -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO } - /** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B + * Method that creates and returns a Serializer. + * @param modelMappers - Known models to map + * @param isXML - If XML should be supported */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } - - // 3. Return false. - return false -} - -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } +function createSerializer(modelMappers = {}, isXML = false) { + return new SerializerImpl(modelMappers, isXML); } - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' +function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); } - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' +function bufferToBase64Url(buffer) { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); + } + // Uint8Array to Base64. + const str = base64.encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); } - -const normalizeMethodRecord = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' +function base64UrlToByteArray(str) { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/-/g, "+").replace(/_/g, "/"); + // Base64 to Uint8Array. + return base64.decodeString(str); } - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizeMethodRecord, null) - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizeMethodRecord[method.toLowerCase()] ?? method +function splitSerializeName(prop) { + const classes = []; + let partialclass = ""; + if (prop) { + const subwords = prop.split("."); + for (const item of subwords) { + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + return classes; } - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) - - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - - // 3. Assert: result is a string. - assert(typeof result === 'string') - - // 4. Return result. - return result +function dateToUnixTime(d) { + if (!d) { + return undefined; + } + if (typeof d.valueOf() === "string") { + d = new Date(d); + } + return Math.floor(d.getTime() / 1000); } - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) - -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {() => unknown[]} iterator - * @param {string} name name of the instance - * @param {'key'|'value'|'key+value'} kind - */ -function makeIterator (iterator, name, kind) { - const object = { - index: 0, - kind, - target: iterator - } - - const i = { - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - - // 2. Let thisValue be the this value. - - // 3. Let object be ? ToObject(thisValue). - - // 4. If object is a platform object, then perform a security - // check, passing: - - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (Object.getPrototypeOf(this) !== i) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const { index, kind, target } = object - const values = target() - - // 9. Let len be the length of values. - const len = values.length - - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { value: undefined, done: true } - } - - // 11. Let pair be the entry in values at index index. - const pair = values[index] - - // 12. Set object’s index to index + 1. - object.index = index + 1 - - // 13. Return the iterator result for pair and kind. - return iteratorResult(pair, kind) - }, - // The class string of an iterator prototype object for a given interface is the - // result of concatenating the identifier of the interface and the string " Iterator". - [Symbol.toStringTag]: `${name} Iterator` - } - - // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%. - Object.setPrototypeOf(i, esIteratorPrototype) - // esIteratorPrototype needs to be the prototype of i - // which is the prototype of an empty object. Yes, it's confusing. - return Object.setPrototypeOf({}, i) +function unixTimeToDate(n) { + if (!n) { + return undefined; + } + return new Date(n * 1000); } - -// https://webidl.spec.whatwg.org/#iterator-result -function iteratorResult (pair, kind) { - let result - - // 1. Let result be a value determined by the value of kind: - switch (kind) { - case 'key': { - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = pair[0] - break +function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/i) !== null) { + if (typeof value !== "number") { + throw new Error(`${objectName} with value ${value} must be of type number.`); + } + } + else if (typeName.match(/^String$/i) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(`${objectName} with value "${value}" must be of type string.`); + } + } + else if (typeName.match(/^Uuid$/i) !== null) { + if (!(typeof value.valueOf() === "string" && (0, utils_js_1.isValidUuid)(value))) { + throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); + } + } + else if (typeName.match(/^Boolean$/i) !== null) { + if (typeof value !== "boolean") { + throw new Error(`${objectName} with value ${value} must be of type boolean.`); + } + } + else if (typeName.match(/^Stream$/i) !== null) { + const objectType = typeof value; + if (objectType !== "string" && + typeof value.pipe !== "function" && // NodeJS.ReadableStream + typeof value.tee !== "function" && // browser ReadableStream + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + // File objects count as a type of Blob, so we want to use instanceof explicitly + !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && + objectType !== "function") { + throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); + } + } } - case 'value': { - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = pair[1] - break + return value; +} +function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); } - case 'key+value': { - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = pair - break + const isPresent = allowedValues.some((item) => { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); } - } - - // 2. Return CreateIterResultObject(result, false). - return { value: result, done: false } -} - -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. - - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError - - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader - - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } - - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - const result = await readAllBytes(reader) - successSteps(result) - } catch (e) { - errorSteps(e) - } + return value; } - -/** @type {ReadableStream} */ -let ReadableStream = globalThis.ReadableStream - -function isReadableStreamLike (stream) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) - } - - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) +function serializeByteArrayType(objectName, value) { + if (value !== undefined && value !== null) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); + } + value = base64.encodeByteArray(value); + } + return value; } - -const MAXIMUM_ARGUMENT_LENGTH = 65535 - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {number[]|Uint8Array} input - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - - if (input.length < MAXIMUM_ARGUMENT_LENGTH) { - return String.fromCharCode(...input) - } - - return input.reduce((previous, current) => previous + String.fromCharCode(current), '') +function serializeBase64UrlType(objectName, value) { + if (value !== undefined && value !== null) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); + } + value = bufferToBase64Url(value); + } + return value; } - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed')) { - throw err +function serializeDateTypes(typeName, value, objectName) { + if (value !== undefined && value !== null) { + if (typeName.match(/^Date$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = + value instanceof Date + ? value.toISOString().substring(0, 10) + : new Date(value).toISOString().substring(0, 10); + } + else if (typeName.match(/^DateTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); + } + else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); + } + value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); + } + else if (typeName.match(/^UnixTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` + + `for it to be serialized in UnixTime/Epoch format.`); + } + value = dateToUnixTime(value); + } + else if (typeName.match(/^TimeSpan$/i) !== null) { + if (!(0, utils_js_1.isDuration)(value)) { + throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); + } + } } - } + return value; } - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - for (let i = 0; i < input.length; i++) { - assert(input.charCodeAt(i) <= 0xFF) - } - - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input +function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { + if (!Array.isArray(object)) { + throw new Error(`${objectName} must be of type Array.`); + } + let elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error(`element" metadata for an Array must be defined in the ` + + `mapper and it must of type "object" in ${objectName}.`); + } + // Quirk: Composite mappers referenced by `element` might + // not have *all* properties declared (like uberParent), + // so let's try to look up the full definition by name. + if (elementType.type.name === "Composite" && elementType.type.className) { + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; + } + const tempArray = []; + for (let i = 0; i < object.length; i++) { + const serializedValue = serializer.serialize(elementType, object[i], objectName, options); + if (isXml && elementType.xmlNamespace) { + const xmlnsKey = elementType.xmlNamespacePrefix + ? `xmlns:${elementType.xmlNamespacePrefix}` + : "xmlns"; + if (elementType.type.name === "Composite") { + tempArray[i] = { ...serializedValue }; + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + } + else { + tempArray[i] = {}; + tempArray[i][options.xml.xmlCharKey] = serializedValue; + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + } + } + else { + tempArray[i] = serializedValue; + } + } + return tempArray; } - -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { done, value: chunk } = await reader.read() - - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) +function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { + if (typeof object !== "object") { + throw new Error(`${objectName} must be of type object.`); } - - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') + const valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the ` + + `mapper and it must of type "object" in ${objectName}.`); + } + const tempDictionary = {}; + for (const key of Object.keys(object)) { + const serializedValue = serializer.serialize(valueType, object[key], objectName, options); + // If the element needs an XML namespace we need to add it within the $ property + tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); } - - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length - - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' + // Add the namespace to the root element if needed + if (isXml && mapper.xmlNamespace) { + const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; + const result = tempDictionary; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; + return result; + } + return tempDictionary; } - /** - * @param {string|URL} url + * Resolves the additionalProperties property from a referenced mapper + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve + * @param objectName - name of the object being serialized */ -function urlHasHttpsScheme (url) { - if (typeof url === 'string') { - return url.startsWith('https:') - } - - return url.protocol === 'https:' +function resolveAdditionalProperties(serializer, mapper, objectName) { + const additionalProperties = mapper.type.additionalProperties; + if (!additionalProperties && mapper.type.className) { + const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + return modelMapper?.type.additionalProperties; + } + return additionalProperties; } - /** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url + * Finds the mapper referenced by className + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve + * @param objectName - name of the object being serialized */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object - - const protocol = url.protocol - - return protocol === 'http:' || protocol === 'https:' +function resolveReferencedMapper(serializer, mapper, objectName) { + const className = mapper.type.className; + if (!className) { + throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, undefined, 2)}".`); + } + return serializer.modelMappers[className]; } - /** - * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. + * Resolves a composite mapper's modelProperties. + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve */ -const hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)) - -module.exports = { - isAborted, - isCancelled, - createDeferredPromise, - ReadableStreamFrom, - toUSVString, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - makeIterator, - isValidHeaderName, - isValidHeaderValue, - hasOwn, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - isomorphicDecode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - normalizeMethodRecord +function resolveModelProperties(serializer, mapper, objectName) { + let modelProps = mapper.type.modelProperties; + if (!modelProps) { + const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + if (!modelMapper) { + throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); + } + modelProps = modelMapper?.type.modelProperties; + if (!modelProps) { + throw new Error(`modelProperties cannot be null or undefined in the ` + + `mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); + } + } + return modelProps; } - - -/***/ }), - -/***/ 21744: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { types } = __nccwpck_require__(73837) -const { hasOwn, toUSVString } = __nccwpck_require__(52538) - -/** @type {import('../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) +function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object !== undefined && object !== null) { + const payload = {}; + const modelProps = resolveModelProperties(serializer, mapper, objectName); + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + let propName; + let parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } + else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } + else { + const paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (const pathName of paths) { + const childObject = parentObject[pathName]; + if ((childObject === undefined || childObject === null) && + ((object[key] !== undefined && object[key] !== null) || + propertyMapper.defaultValue !== undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + if (parentObject !== undefined && parentObject !== null) { + if (isXml && mapper.xmlNamespace) { + const xmlnsKey = mapper.xmlNamespacePrefix + ? `xmlns:${mapper.xmlNamespacePrefix}` + : "xmlns"; + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace, + }; + } + const propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + let toSerialize = object[key]; + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && + polymorphicDiscriminator.clientName === key && + (toSerialize === undefined || toSerialize === null)) { + toSerialize = mapper.serializedName; + } + const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); + if (serializedValue !== undefined && propName !== undefined && propName !== null) { + const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); + if (isXml && propertyMapper.xmlIsAttribute) { + // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject[interfaces_js_1.XML_ATTRKEY] = parentObject[interfaces_js_1.XML_ATTRKEY] || {}; + parentObject[interfaces_js_1.XML_ATTRKEY][propName] = serializedValue; + } + else if (isXml && propertyMapper.xmlIsWrapped) { + parentObject[propName] = { [propertyMapper.xmlElementName]: value }; + } + else { + parentObject[propName] = value; + } + } + } + } + const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); + if (additionalPropertiesMapper) { + const propNames = Object.keys(modelProps); + for (const clientPropName in object) { + const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); + } + } + } + return payload; + } + return object; } - -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` - - return webidl.errors.exception({ - header: context.prefix, - message - }) +function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { + if (!isXml || !propertyMapper.xmlNamespace) { + return serializedValue; + } + const xmlnsKey = propertyMapper.xmlNamespacePrefix + ? `xmlns:${propertyMapper.xmlNamespacePrefix}` + : "xmlns"; + const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; + if (["Composite"].includes(propertyMapper.type.name)) { + if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { + return serializedValue; + } + else { + const result = { ...serializedValue }; + result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; + return result; + } + } + const result = {}; + result[options.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; + return result; } - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) +function isSpecialXmlProperty(propertyName, options) { + return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts = undefined) { - if (opts?.strict !== false && !(V instanceof I)) { - throw new TypeError('Illegal invocation') - } else { - return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] - } +function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + } + const modelProps = resolveModelProperties(serializer, mapper, objectName); + let instance = {}; + const handledPropertyNames = []; + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + const paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + const { serializedName, xmlName, xmlElementName } = propertyMapper; + let propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + const dictionary = {}; + for (const headerKey of Object.keys(responseBody)) { + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } + else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1.XML_ATTRKEY]) { + instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1.XML_ATTRKEY][xmlName], propertyObjectName, options); + } + else if (propertyMapper.xmlIsMsText) { + if (responseBody[xmlCharKey] !== undefined) { + instance[key] = responseBody[xmlCharKey]; + } + else if (typeof responseBody === "string") { + // The special case where xml parser parses "content" into JSON of + // `{ name: "content"}` instead of `{ name: { "_": "content" }}` + instance[key] = responseBody; + } + } + else { + const propertyName = xmlElementName || xmlName || serializedName; + if (propertyMapper.xmlIsWrapped) { + /* a list of wrapped by + For the xml example below + + ... + ... + + the responseBody has + { + Cors: { + CorsRule: [{...}, {...}] + } + } + xmlName is "Cors" and xmlElementName is"CorsRule". + */ + const wrapped = responseBody[xmlName]; + const elementList = wrapped?.[xmlElementName] ?? []; + instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); + handledPropertyNames.push(xmlName); + } + else { + const property = responseBody[propertyName]; + instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); + handledPropertyNames.push(propertyName); + } + } + } + else { + // deserialize the property if it is present in the provided responseBody instance + let propertyInstance; + let res = responseBody; + // traversing the object step by step. + let steps = 0; + for (const item of paths) { + if (!res) + break; + steps++; + res = res[item]; + } + // only accept null when reaching the last position of object otherwise it would be undefined + if (res === null && steps < paths.length) { + res = undefined; + } + propertyInstance = res; + const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && + key === polymorphicDiscriminator.clientName && + (propertyInstance === undefined || propertyInstance === null)) { + propertyInstance = mapper.serializedName; + } + let serializedValue; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + // Copy over any properties that have already been added into the instance, where they do + // not exist on the newly de-serialized array + for (const [k, v] of Object.entries(instance)) { + if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) { + arrayInstance[k] = v; + } + } + instance = arrayInstance; + } + else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + instance[key] = serializedValue; + } + } + } + const additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + const isAdditionalProperty = (responsePropName) => { + for (const clientPropName in modelProps) { + const paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (const responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); + } + } + } + else if (responseBody && !options.ignoreUnknownProperties) { + for (const key of Object.keys(responseBody)) { + if (instance[key] === undefined && + !handledPropertyNames.includes(key) && + !isSpecialXmlProperty(key, options)) { + instance[key] = responseBody[key]; + } + } + } + return instance; } - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - ...ctx - }) - } +function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { + /* jshint validthis: true */ + const value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the ` + + `mapper and it must of type "object" in ${objectName}`); + } + if (responseBody) { + const tempDictionary = {}; + for (const key of Object.keys(responseBody)) { + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); + } + return tempDictionary; + } + return responseBody; } - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) +function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { + let element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error(`element" metadata for an Array must be defined in the ` + + `mapper and it must of type "object" in ${objectName}`); + } + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + // Quirk: Composite mappers referenced by `element` might + // not have *all* properties declared (like uberParent), + // so let's try to look up the full definition by name. + if (element.type.name === "Composite" && element.type.className) { + element = serializer.modelMappers[element.type.className] ?? element; + } + const tempArray = []; + for (let i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options); + } + return tempArray; + } + return responseBody; } - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } - - return 'Object' +function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { + const typeNamesToCheck = [typeName]; + while (typeNamesToCheck.length) { + const currentName = typeNamesToCheck.shift(); + const indexDiscriminator = discriminatorValue === currentName + ? discriminatorValue + : currentName + "." + discriminatorValue; + if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) { + return discriminators[indexDiscriminator]; + } + else { + for (const [name, mapper] of Object.entries(discriminators)) { + if (name.startsWith(currentName + ".") && + mapper.type.uberParent === currentName && + mapper.type.className) { + typeNamesToCheck.push(mapper.type.className); + } + } + } } - } + return undefined; } - -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { - let upperBound - let lowerBound - - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 - - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 +function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName) { + // The serializedName might have \\, which we just want to ignore + if (polymorphicPropertyName === "serializedName") { + discriminatorName = discriminatorName.replace(/\\/gi, ""); + } + const discriminatorValue = object[discriminatorName]; + const typeName = mapper.type.uberParent ?? mapper.type.className; + if (typeof discriminatorValue === "string" && typeName) { + const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - - // 1. Let lowerBound be 0. - lowerBound = 0 - - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: - - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 + return mapper; +} +function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return (mapper.type.polymorphicDiscriminator || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.className)); +} +function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return (typeName && + serializer.modelMappers[typeName] && + serializer.modelMappers[typeName].type.polymorphicDiscriminator); +} +/** + * Known types of Mappers + */ +exports.MapperTypeNames = { + Base64Url: "Base64Url", + Boolean: "Boolean", + ByteArray: "ByteArray", + Composite: "Composite", + Date: "Date", + DateTime: "DateTime", + DateTimeRfc1123: "DateTimeRfc1123", + Dictionary: "Dictionary", + Enum: "Enum", + Number: "Number", + Object: "Object", + Sequence: "Sequence", + String: "String", + Stream: "Stream", + TimeSpan: "TimeSpan", + UnixTime: "UnixTime", +}; +//# sourceMappingURL=serializer.js.map - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } +/***/ }), - // 4. Let x be ? ToNumber(V). - let x = Number(V) +/***/ 28927: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 - } +"use strict"; - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${V} to an integer.` - }) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceClient = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const pipeline_js_1 = __nccwpck_require__(33924); +const utils_js_1 = __nccwpck_require__(25363); +const httpClientCache_js_1 = __nccwpck_require__(30308); +const operationHelpers_js_1 = __nccwpck_require__(62074); +const urlHelpers_js_1 = __nccwpck_require__(98258); +const interfaceHelpers_js_1 = __nccwpck_require__(41459); +const log_js_1 = __nccwpck_require__(53776); +/** + * Initializes a new instance of the ServiceClient. + */ +class ServiceClient { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; + /** + * The ServiceClient constructor + * @param options - The service client options that govern the behavior of the client. + */ + constructor(options = {}) { + this._requestContentType = options.requestContentType; + this._endpoint = options.endpoint ?? options.baseUri; + if (options.baseUri) { + log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); + } + this._allowInsecureConnection = options.allowInsecureConnection; + this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); + this.pipeline = options.pipeline || createDefaultPipeline(options); + if (options.additionalPolicies?.length) { + for (const { policy, position } of options.additionalPolicies) { + // Sign happens after Retry and is commonly needed to occur + // before policies that intercept post-retry. + const afterPhase = position === "perRetry" ? "Sign" : undefined; + this.pipeline.addPolicy(policy, { + afterPhase, + }); + } + } } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) + /** + * Send the provided httpRequest. + */ + async sendRequest(request) { + return this.pipeline.sendRequest(this._httpClient, request); } - - // 4. Return x. - return x - } - - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) - - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @typeParam T - The typed result of the request, based on the OperationSpec. + * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. + * @param operationSpec - The OperationSpec to use to populate the httpRequest. + */ + async sendOperationRequest(operationArguments, operationSpec) { + const endpoint = operationSpec.baseUrl || this._endpoint; + if (!endpoint) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); + } + // Templatized URLs sometimes reference properties on the ServiceClient child class, + // so we have to pass `this` below in order to search these properties if they're + // not part of OperationArguments + const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const request = (0, core_rest_pipeline_1.createPipelineRequest)({ + url, + }); + request.method = operationSpec.httpMethod; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + operationInfo.operationSpec = operationSpec; + operationInfo.operationArguments = operationArguments; + const contentType = operationSpec.contentType || this._requestContentType; + if (contentType && operationSpec.requestBody) { + request.headers.set("Content-Type", contentType); + } + const options = operationArguments.options; + if (options) { + const requestOptions = options.requestOptions; + if (requestOptions) { + if (requestOptions.timeout) { + request.timeout = requestOptions.timeout; + } + if (requestOptions.onUploadProgress) { + request.onUploadProgress = requestOptions.onUploadProgress; + } + if (requestOptions.onDownloadProgress) { + request.onDownloadProgress = requestOptions.onDownloadProgress; + } + if (requestOptions.shouldDeserialize !== undefined) { + operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; + } + if (requestOptions.allowInsecureConnection) { + request.allowInsecureConnection = true; + } + } + if (options.abortSignal) { + request.abortSignal = options.abortSignal; + } + if (options.tracingOptions) { + request.tracingOptions = options.tracingOptions; + } + } + if (this._allowInsecureConnection) { + request.allowInsecureConnection = true; + } + if (request.streamResponseStatusCodes === undefined) { + request.streamResponseStatusCodes = (0, interfaceHelpers_js_1.getStreamingResponseStatusCodes)(operationSpec); + } + try { + const rawResponse = await this.sendRequest(request); + const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); + if (options?.onResponse) { + options.onResponse(rawResponse, flatResponse); + } + return flatResponse; + } + catch (error) { + if (typeof error === "object" && error?.response) { + const rawResponse = error.response; + const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); + error.details = flatResponse; + if (options?.onResponse) { + options.onResponse(rawResponse, flatResponse, error); + } + } + throw error; + } } - - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 - } - - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) - - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) - } - - // 12. Otherwise, return x. - return x } - -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) - - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r - } - - // 3. Otherwise, return r. - return r +exports.ServiceClient = ServiceClient; +function createDefaultPipeline(options) { + const credentialScopes = getCredentialScopes(options); + const credentialOptions = options.credential && credentialScopes + ? { credentialScopes, credential: options.credential } + : undefined; + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions, + }); } - -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: 'Sequence', - message: `Value of type ${webidl.util.Type(V)} is not an Object.` - }) +function getCredentialScopes(options) { + if (options.credentialScopes) { + return options.credentialScopes; } - - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = V?.[Symbol.iterator]?.() - const seq = [] - - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: 'Sequence', - message: 'Object is not an iterator.' - }) + if (options.endpoint) { + return `${options.endpoint}/.default`; } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break - } - - seq.push(converter(value)) + if (options.baseUri) { + return `${options.baseUri}/.default`; } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: 'Record', - message: `Value of type ${webidl.util.Type(O)} is not an Object.` - }) + if (options.credential && !options.credentialScopes) { + throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); } + return undefined; +} +//# sourceMappingURL=serviceClient.js.map - // 2. Let result be a new empty instance of record. - const result = {} - - if (!types.isProxy(O)) { - // Object.keys only returns enumerable properties - const keys = Object.keys(O) - - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key) - - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key]) +/***/ }), - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } +/***/ 35429: +/***/ ((__unused_webpack_module, exports) => { - // 5. Return result. - return result - } +"use strict"; - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.state = void 0; +/** + * Holds the singleton operationRequestMap, to be shared across CJS and ESM imports. + */ +exports.state = { + operationRequestMap: new WeakMap(), +}; +//# sourceMappingURL=state-cjs.cjs.map - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) +/***/ }), - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key) +/***/ 98258: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key]) +"use strict"; - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRequestUrl = getRequestUrl; +exports.appendQueryParams = appendQueryParams; +const operationHelpers_js_1 = __nccwpck_require__(62074); +const interfaceHelpers_js_1 = __nccwpck_require__(41459); +const CollectionFormatToDelimiterMap = { + CSV: ",", + SSV: " ", + Multi: "Multi", + TSV: "\t", + Pipes: "|", +}; +function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { + const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); + let isAbsolutePath = false; + let requestUrl = replaceAll(baseUri, urlReplacements); + if (operationSpec.path) { + let path = replaceAll(operationSpec.path, urlReplacements); + // QUIRK: sometimes we get a path component like /{nextLink} + // which may be a fully formed URL with a leading /. In that case, we should + // remove the leading / + if (operationSpec.path === "/{nextLink}" && path.startsWith("/")) { + path = path.substring(1); + } + // QUIRK: sometimes we get a path component like {nextLink} + // which may be a fully formed URL. In that case, we should + // ignore the baseUri. + if (isAbsoluteUrl(path)) { + requestUrl = path; + isAbsolutePath = true; + } + else { + requestUrl = appendPath(requestUrl, path); + } + } + const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); + /** + * Notice that this call sets the `noOverwrite` parameter to true if the `requestUrl` + * is an absolute path. This ensures that existing query parameter values in `requestUrl` + * do not get overwritten. On the other hand when `requestUrl` is not absolute path, it + * is still being built so there is nothing to overwrite. + */ + requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); + return requestUrl; +} +function replaceAll(input, replacements) { + let result = input; + for (const [searchValue, replaceValue] of replacements) { + result = result.split(searchValue).join(replaceValue); + } + return result; +} +function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { + const result = new Map(); + if (operationSpec.urlParameters?.length) { + for (const urlParameter of operationSpec.urlParameters) { + let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); + const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); + } + result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); + } + } + return result; +} +function isAbsoluteUrl(url) { + return url.includes("://"); +} +function appendPath(url, pathToAppend) { + if (!pathToAppend) { + return url; } - - // 5. Return result. - return result - } + const parsedUrl = new URL(url); + let newPath = parsedUrl.pathname; + if (!newPath.endsWith("/")) { + newPath = `${newPath}/`; + } + if (pathToAppend.startsWith("/")) { + pathToAppend = pathToAppend.substring(1); + } + const searchStart = pathToAppend.indexOf("?"); + if (searchStart !== -1) { + const path = pathToAppend.substring(0, searchStart); + const search = pathToAppend.substring(searchStart + 1); + newPath = newPath + path; + if (search) { + parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; + } + } + else { + newPath = newPath + pathToAppend; + } + parsedUrl.pathname = newPath; + return parsedUrl.toString(); } - -webidl.interfaceConverter = function (i) { - return (V, opts = {}) => { - if (opts.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: i.name, - message: `Expected ${V} to be an instance of ${i.name}.` - }) +function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { + const result = new Map(); + const sequenceParams = new Set(); + if (operationSpec.queryParameters?.length) { + for (const queryParameter of operationSpec.queryParameters) { + if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { + sequenceParams.add(queryParameter.mapper.serializedName); + } + let queryParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); + if ((queryParameterValue !== undefined && queryParameterValue !== null) || + queryParameter.mapper.required) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter)); + const delimiter = queryParameter.collectionFormat + ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] + : ""; + if (Array.isArray(queryParameterValue)) { + // replace null and undefined + queryParameterValue = queryParameterValue.map((item) => { + if (item === null || item === undefined) { + return ""; + } + return item; + }); + } + if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) { + continue; + } + else if (Array.isArray(queryParameterValue) && + (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) { + queryParameterValue = queryParameterValue.join(delimiter); + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + queryParameterValue = queryParameterValue.map((item) => { + return encodeURIComponent(item); + }); + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + // Join pipes and CSV *after* encoding, or the server will be upset. + if (Array.isArray(queryParameterValue) && + (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) { + queryParameterValue = queryParameterValue.join(delimiter); + } + result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter), queryParameterValue); + } + } } - - return V - } + return { + queryParams: result, + sequenceParams, + }; } - -webidl.dictionaryConverter = function (converters) { - return (dictionary) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) +function simpleParseQueryParams(queryString) { + const result = new Map(); + if (!queryString || queryString[0] !== "?") { + return result; } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `Missing required key "${key}".` - }) + // remove the leading ? + queryString = queryString.slice(1); + const pairs = queryString.split("&"); + for (const pair of pairs) { + const [name, value] = pair.split("=", 2); + const existingValue = result.get(name); + if (existingValue) { + if (Array.isArray(existingValue)) { + existingValue.push(value); + } + else { + result.set(name, [existingValue, value]); + } } - } - - let value = dictionary[key] - const hasDefault = hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value = value ?? defaultValue - } - - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value) - - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) + else { + result.set(name, value); } - - dict[key] = value - } } - - return dict - } + return result; } - -webidl.nullableConverter = function (converter) { - return (V) => { - if (V === null) { - return V +/** @internal */ +function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + if (queryParams.size === 0) { + return url; } - - return converter(V) - } + const parsedUrl = new URL(url); + // QUIRK: parsedUrl.searchParams will have their name/value pairs decoded, which + // can change their meaning to the server, such as in the case of a SAS signature. + // To avoid accidentally un-encoding a query param, we parse the key/values ourselves + const combinedParams = simpleParseQueryParams(parsedUrl.search); + for (const [name, value] of queryParams) { + const existingValue = combinedParams.get(name); + if (Array.isArray(existingValue)) { + if (Array.isArray(value)) { + existingValue.push(...value); + const valueSet = new Set(existingValue); + combinedParams.set(name, Array.from(valueSet)); + } + else { + existingValue.push(value); + } + } + else if (existingValue) { + if (Array.isArray(value)) { + value.unshift(existingValue); + } + else if (sequenceParams.has(name)) { + combinedParams.set(name, [existingValue, value]); + } + if (!noOverwrite) { + combinedParams.set(name, value); + } + } + else { + combinedParams.set(name, value); + } + } + const searchPieces = []; + for (const [name, value] of combinedParams) { + if (typeof value === "string") { + searchPieces.push(`${name}=${value}`); + } + else if (Array.isArray(value)) { + // QUIRK: If we get an array of values, include multiple key/value pairs + for (const subValue of value) { + searchPieces.push(`${name}=${subValue}`); + } + } + else { + searchPieces.push(`${name}=${value}`); + } + } + // QUIRK: we have to set search manually as searchParams will encode comma when it shouldn't. + parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return parsedUrl.toString(); } +//# sourceMappingURL=urlHelpers.js.map -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, opts = {}) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts.legacyNullToEmptyString) { - return '' - } - - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw new TypeError('Could not convert argument of type symbol to string.') - } - - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) -} +/***/ }), -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V) +/***/ 25363: +/***/ ((__unused_webpack_module, exports) => { - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } - } +"use strict"; - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isPrimitiveBody = isPrimitiveBody; +exports.isDuration = isDuration; +exports.isValidUuid = isValidUuid; +exports.flattenResponse = flattenResponse; +/** + * A type guard for a primitive response body. + * @param value - Value to test + * + * @internal + */ +function isPrimitiveBody(value, mapperTypeName) { + return (mapperTypeName !== "Composite" && + mapperTypeName !== "Dictionary" && + (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean" || + mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== + null || + value === undefined || + value === null)); } - -// https://webidl.spec.whatwg.org/#es-USVString -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) - - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x +const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +/** + * Returns true if the given string is in ISO 8601 format. + * @param value - The value to be validated for ISO 8601 duration format. + * @internal + */ +function isDuration(value) { + return validateISODuration.test(value); } - -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V +const validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; +/** + * Returns true if the provided uuid is valid. + * + * @param uuid - The uuid that needs to be validated. + * + * @internal + */ +function isValidUuid(uuid) { + return validUuidRegex.test(uuid); } - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed') - - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x +/** + * Maps the response as follows: + * - wraps the response body if needed (typically if its type is primitive). + * - returns null if the combination of the headers and the body is empty. + * - otherwise, returns the combination of the headers and the body. + * + * @param responseObject - a representation of the parsed response + * @returns the response that will be returned to the user which can be null and/or wrapped + * + * @internal + */ +function handleNullableResponseAndWrappableBody(responseObject) { + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body, + }; + if (responseObject.hasNullableType && + Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { + return responseObject.shouldWrapBody ? { body: null } : null; + } + else { + return responseObject.shouldWrapBody + ? { + ...responseObject.headers, + body: responseObject.body, + } + : combinedHeadersAndBody; + } } - -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned') - - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x +/** + * Take a `FullOperationResponse` and turn it into a flat + * response object to hand back to the consumer. + * @param fullResponse - The processed response from the operation request + * @param responseSpec - The response map from the OperationSpec + * + * @internal + */ +function flattenResponse(fullResponse, responseSpec) { + const parsedHeaders = fullResponse.parsedHeaders; + // head methods never have a body, but we return a boolean set to body property + // to indicate presence/absence of the resource + if (fullResponse.request.method === "HEAD") { + return { + ...parsedHeaders, + body: fullResponse.parsedBody, + }; + } + const bodyMapper = responseSpec && responseSpec.bodyMapper; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; + /** If the body is asked for, we look at the expected body type to handle it */ + if (expectedBodyTypeName === "Stream") { + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody, + }; + } + const modelProperties = (expectedBodyTypeName === "Composite" && + bodyMapper.type.modelProperties) || + {}; + const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); + if (expectedBodyTypeName === "Sequence" || isPageableResponse) { + const arrayResponse = fullResponse.parsedBody ?? []; + for (const key of Object.keys(modelProperties)) { + if (modelProperties[key].serializedName) { + arrayResponse[key] = fullResponse.parsedBody?.[key]; + } + } + if (parsedHeaders) { + for (const key of Object.keys(parsedHeaders)) { + arrayResponse[key] = parsedHeaders[key]; + } + } + return isNullable && + !fullResponse.parsedBody && + !parsedHeaders && + Object.getOwnPropertyNames(modelProperties).length === 0 + ? null + : arrayResponse; + } + return handleNullableResponseAndWrappableBody({ + body: fullResponse.parsedBody, + headers: parsedHeaders, + hasNullableType: isNullable, + shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName), + }); } +//# sourceMappingURL=utils.js.map -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned') +/***/ }), - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} +/***/ 35064: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts) +"use strict"; - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtendedServiceClient = void 0; +const disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_client_1 = __nccwpck_require__(7611); +const response_js_1 = __nccwpck_require__(49283); +/** + * Client to provide compatability between core V1 & V2. + */ +class ExtendedServiceClient extends core_client_1.ServiceClient { + constructor(options) { + super(options); + if (options.keepAliveOptions?.enable === false && + !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); + } + if (options.redirectOptions?.handleRedirects === false) { + this.pipeline.removePolicy({ + name: core_rest_pipeline_1.redirectPolicyName, + }); + } + } + /** + * Compatible send operation request function. + * + * @param operationArguments - Operation arguments + * @param operationSpec - Operation Spec + * @returns + */ + async sendOperationRequest(operationArguments, operationSpec) { + const userProvidedCallBack = operationArguments?.options?.onResponse; + let lastResponse; + function onResponse(rawResponse, flatResponse, error) { + lastResponse = rawResponse; + if (userProvidedCallBack) { + userProvidedCallBack(rawResponse, flatResponse, error); + } + } + operationArguments.options = { + ...operationArguments.options, + onResponse, + }; + const result = await super.sendOperationRequest(operationArguments, operationSpec); + if (lastResponse) { + Object.defineProperty(result, "_response", { + value: (0, response_js_1.toCompatResponse)(lastResponse), + }); + } + return result; + } } +exports.ExtendedServiceClient = ExtendedServiceClient; +//# sourceMappingURL=extendedClient.js.map -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, opts = {}) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix: `${V}`, - argument: `${V}`, - types: ['ArrayBuffer'] - }) - } +/***/ }), - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } +/***/ 23256: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - // Note: resizable ArrayBuffers are currently a proposal. +"use strict"; - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.convertHttpClient = convertHttpClient; +const response_js_1 = __nccwpck_require__(49283); +const util_js_1 = __nccwpck_require__(43732); +/** + * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. + * @param requestPolicyClient - A HttpClient compatible with core-http + * @returns A HttpClient compatible with core-rest-pipeline + */ +function convertHttpClient(requestPolicyClient) { + return { + sendRequest: async (request) => { + const response = await requestPolicyClient.sendRequest((0, util_js_1.toWebResourceLike)(request, { createProxy: true })); + return (0, response_js_1.toPipelineResponse)(response); + }, + }; } +//# sourceMappingURL=httpClientAdapter.js.map -webidl.converters.TypedArray = function (V, T, opts = {}) { - // 1. Let T be the IDL type V is being converted to. +/***/ }), - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix: `${T.name}`, - argument: `${V}`, - types: [T.name] - }) - } +/***/ 25083: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } +"use strict"; - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - // Note: resizable array buffers are currently a proposal +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlivePolicyName = exports.HttpPipelineLogLevel = exports.createRequestPolicyFactoryPolicy = exports.requestPolicyFactoryPolicyName = exports.ExtendedServiceClient = void 0; +/** + * A Shim Library that provides compatibility between Core V1 & V2 Packages. + * + * @packageDocumentation + */ +var extendedClient_js_1 = __nccwpck_require__(35064); +Object.defineProperty(exports, "ExtendedServiceClient", ({ enumerable: true, get: function () { return extendedClient_js_1.ExtendedServiceClient; } })); +var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(98241); +Object.defineProperty(exports, "requestPolicyFactoryPolicyName", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; } })); +Object.defineProperty(exports, "createRequestPolicyFactoryPolicy", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; } })); +Object.defineProperty(exports, "HttpPipelineLogLevel", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; } })); +var disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); +Object.defineProperty(exports, "disableKeepAlivePolicyName", ({ enumerable: true, get: function () { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } })); +var httpClientAdapter_js_1 = __nccwpck_require__(23256); +Object.defineProperty(exports, "convertHttpClient", ({ enumerable: true, get: function () { return httpClientAdapter_js_1.convertHttpClient; } })); +var util_js_1 = __nccwpck_require__(43732); +Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: function () { return util_js_1.toHttpHeadersLike; } })); +//# sourceMappingURL=index.js.map - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V +/***/ }), + +/***/ 75840: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.disableKeepAlivePolicyName = void 0; +exports.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; +exports.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; +exports.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; +function createDisableKeepAlivePolicy() { + return { + name: exports.disableKeepAlivePolicyName, + async sendRequest(request, next) { + request.disableKeepAlive = true; + return next(request); + }, + }; +} +/** + * @internal + */ +function pipelineContainsDisableKeepAlivePolicy(pipeline) { + return pipeline.getOrderedPolicies().some((policy) => policy.name === exports.disableKeepAlivePolicyName); } +//# sourceMappingURL=disableKeepAlivePolicy.js.map -webidl.converters.DataView = function (V, opts = {}) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: 'DataView', - message: 'Object is not a DataView.' - }) - } +/***/ }), - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } +/***/ 98241: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - // Note: resizable ArrayBuffers are currently a proposal +"use strict"; - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.requestPolicyFactoryPolicyName = exports.HttpPipelineLogLevel = void 0; +exports.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; +const util_js_1 = __nccwpck_require__(43732); +const response_js_1 = __nccwpck_require__(49283); +/** + * An enum for compatibility with RequestPolicy + */ +var HttpPipelineLogLevel; +(function (HttpPipelineLogLevel) { + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; +})(HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); +const mockRequestPolicyOptions = { + log(_logLevel, _message) { + /* do nothing */ + }, + shouldLog(_logLevel) { + return false; + }, +}; +/** + * The name of the RequestPolicyFactoryPolicy + */ +exports.requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; +/** + * A policy that wraps policies written for core-http. + * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline + */ +function createRequestPolicyFactoryPolicy(factories) { + const orderedFactories = factories.slice().reverse(); + return { + name: exports.requestPolicyFactoryPolicyName, + async sendRequest(request, next) { + let httpPipeline = { + async sendRequest(httpRequest) { + const response = await next((0, util_js_1.toPipelineRequest)(httpRequest)); + return (0, response_js_1.toCompatResponse)(response, { createProxy: true }); + }, + }; + for (const factory of orderedFactories) { + httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); + } + const webResourceLike = (0, util_js_1.toWebResourceLike)(request, { createProxy: true }); + const response = await httpPipeline.sendRequest(webResourceLike); + return (0, response_js_1.toPipelineResponse)(response); + }, + }; } +//# sourceMappingURL=requestPolicyFactoryPolicy.js.map -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, opts = {}) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, opts) - } +/***/ }), - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor) - } +/***/ 49283: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (types.isDataView(V)) { - return webidl.converters.DataView(V, opts) - } +"use strict"; - throw new TypeError(`Could not convert ${V} to a BufferSource.`) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCompatResponse = toCompatResponse; +exports.toPipelineResponse = toPipelineResponse; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const util_js_1 = __nccwpck_require__(43732); +const originalResponse = Symbol("Original FullOperationResponse"); +/** + * A helper to convert response objects from the new pipeline back to the old one. + * @param response - A response object from core-client. + * @returns A response compatible with `HttpOperationResponse` from core-http. + */ +function toCompatResponse(response, options) { + let request = (0, util_js_1.toWebResourceLike)(response.request); + let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); + if (options?.createProxy) { + return new Proxy(response, { + get(target, prop, receiver) { + if (prop === "headers") { + return headers; + } + else if (prop === "request") { + return request; + } + else if (prop === originalResponse) { + return response; + } + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "headers") { + headers = value; + } + else if (prop === "request") { + request = value; + } + return Reflect.set(target, prop, value, receiver); + }, + }); + } + else { + return { + ...response, + request, + headers, + }; + } +} +/** + * A helper to convert back to a PipelineResponse + * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http. + */ +function toPipelineResponse(compatResponse) { + const extendedCompatResponse = compatResponse; + const response = extendedCompatResponse[originalResponse]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); + if (response) { + response.headers = headers; + return response; + } + else { + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request), + }; + } } +//# sourceMappingURL=response.js.map -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) +/***/ }), -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) +/***/ 43732: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) +"use strict"; -module.exports = { - webidl +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpHeaders = void 0; +exports.toPipelineRequest = toPipelineRequest; +exports.toWebResourceLike = toWebResourceLike; +exports.toHttpHeadersLike = toHttpHeadersLike; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +// We use a custom symbol to cache a reference to the original request without +// exposing it on the public interface. +const originalRequestSymbol = Symbol("Original PipelineRequest"); +// Symbol.for() will return the same symbol if it's already been created +// This particular one is used in core-client to handle the case of when a request is +// cloned but we need to retrieve the OperationSpec and OperationArguments from the +// original request. +const originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); +function toPipelineRequest(webResource, options = {}) { + const compatWebResource = webResource; + const request = compatWebResource[originalRequestSymbol]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); + if (request) { + request.headers = headers; + return request; + } + else { + const newRequest = (0, core_rest_pipeline_1.createPipelineRequest)({ + url: webResource.url, + method: webResource.method, + headers, + withCredentials: webResource.withCredentials, + timeout: webResource.timeout, + requestId: webResource.requestId, + abortSignal: webResource.abortSignal, + body: webResource.body, + formData: webResource.formData, + disableKeepAlive: !!webResource.keepAlive, + onDownloadProgress: webResource.onDownloadProgress, + onUploadProgress: webResource.onUploadProgress, + proxySettings: webResource.proxySettings, + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides, + }); + if (options.originalRequest) { + newRequest[originalClientRequestSymbol] = + options.originalRequest; + } + return newRequest; + } +} +function toWebResourceLike(request, options) { + const originalRequest = options?.originalRequest ?? request; + const webResource = { + url: request.url, + method: request.method, + headers: toHttpHeadersLike(request.headers), + withCredentials: request.withCredentials, + timeout: request.timeout, + requestId: request.headers.get("x-ms-client-request-id") || request.requestId, + abortSignal: request.abortSignal, + body: request.body, + formData: request.formData, + keepAlive: !!request.disableKeepAlive, + onDownloadProgress: request.onDownloadProgress, + onUploadProgress: request.onUploadProgress, + proxySettings: request.proxySettings, + streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, + clone() { + throw new Error("Cannot clone a non-proxied WebResourceLike"); + }, + prepare() { + throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); + }, + validateRequestProperties() { + /** do nothing */ + }, + }; + if (options?.createProxy) { + return new Proxy(webResource, { + get(target, prop, receiver) { + if (prop === originalRequestSymbol) { + return request; + } + else if (prop === "clone") { + return () => { + return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { + createProxy: true, + originalRequest, + }); + }; + } + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "keepAlive") { + request.disableKeepAlive = !value; + } + const passThroughProps = [ + "url", + "method", + "withCredentials", + "timeout", + "requestId", + "abortSignal", + "body", + "formData", + "onDownloadProgress", + "onUploadProgress", + "proxySettings", + "streamResponseStatusCodes", + "agent", + "requestOverrides", + ]; + if (typeof prop === "string" && passThroughProps.includes(prop)) { + request[prop] = value; + } + return Reflect.set(target, prop, value, receiver); + }, + }); + } + else { + return webResource; + } +} +/** + * Converts HttpHeaders from core-rest-pipeline to look like + * HttpHeaders from core-http. + * @param headers - HttpHeaders from core-rest-pipeline + * @returns HttpHeaders as they looked in core-http + */ +function toHttpHeadersLike(headers) { + return new HttpHeaders(headers.toJSON({ preserveCase: true })); +} +/** + * A collection of HttpHeaders that can be sent with a HTTP request. + */ +function getHeaderKey(headerName) { + return headerName.toLowerCase(); +} +/** + * A collection of HTTP header key/value pairs. + */ +class HttpHeaders { + _headersMap; + constructor(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (const headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName - The name of the header to set. This value is case-insensitive. + * @param headerValue - The value of the header to set. + */ + set(headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { + name: headerName, + value: headerValue.toString(), + }; + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName - The name of the header. + */ + get(headerName) { + const header = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + } + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName - The name of the header to remove. + */ + remove(headerName) { + const result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + } + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders() { + return this.toJson({ preserveCase: true }); + } + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray() { + const headers = []; + for (const headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + } + /** + * Get the header names that are contained in this collection. + */ + headerNames() { + const headerNames = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + } + /** + * Get the header values that are contained in this collection. + */ + headerValues() { + const headerValues = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJson(options = {}) { + const result = {}; + if (options.preserveCase) { + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[header.name] = header.value; + } + } + else { + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[getHeaderKey(header.name)] = header.value; + } + } + return result; + } + /** + * Get the string representation of this HTTP header collection. + */ + toString() { + return JSON.stringify(this.toJson({ preserveCase: true })); + } + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone() { + const resultPreservingCasing = {}; + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + resultPreservingCasing[header.name] = header.value; + } + return new HttpHeaders(resultPreservingCasing); + } } - +exports.HttpHeaders = HttpHeaders; +//# sourceMappingURL=util.js.map /***/ }), -/***/ 84854: -/***/ ((module) => { +/***/ 57759: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } - - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pollHttpOperation = exports.isOperationError = exports.getResourceLocation = exports.getOperationStatus = exports.getOperationLocation = exports.initHttpOperation = exports.getStatusFromInitialResponse = exports.getErrorFromResponse = exports.parseRetryAfter = exports.inferLroMode = void 0; +const operation_js_1 = __nccwpck_require__(70281); +const logger_js_1 = __nccwpck_require__(28121); +function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; +} +function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; +} +function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; +} +function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; +} +function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return undefined; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } + } + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return undefined; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } +} +function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== undefined) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig, + }), + }; + } + else if (location !== undefined) { + return { + mode: "ResourceLocation", + operationLocation: location, + }; + } + else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath, + }; + } + else { + return undefined; + } +} +exports.inferLroMode = inferLroMode; +function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== undefined) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case undefined: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } +} +function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); +} +function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); +} +function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } + else if (statusCode < 300) { + return "succeeded"; + } + else { + return "failed"; + } +} +function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== undefined) { + // Retry-After header value is either in HTTP date format, or in seconds + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) + ? calculatePollingIntervalFromDate(new Date(retryAfter)) + : retryAfterInSeconds * 1000; + } + return undefined; +} +exports.parseRetryAfter = parseRetryAfter; +function getErrorFromResponse(response) { + const error = accessBodyProperty(response, "error"); + if (!error) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error.code || !error.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error; +} +exports.getErrorFromResponse = getErrorFromResponse; +function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor(new Date().getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return undefined; +} +function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case undefined: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === undefined ? "succeeded" : status; } - -module.exports = { - getEncoding +exports.getStatusFromInitialResponse = getStatusFromInitialResponse; +/** + * Initiates the long-running operation. + */ +async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig, + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); + }, + stateProxy, + processResult: processResult + ? ({ flatResponse }, state) => processResult(flatResponse, state) + : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult, + }); } - +exports.initHttpOperation = initHttpOperation; +function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse), + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return undefined; + } + } +} +exports.getOperationLocation = getOperationLocation; +function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } +} +exports.getOperationStatus = getOperationStatus; +function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; +} +function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; + } + return state.config.resourceLocation; +} +exports.getResourceLocation = getResourceLocation; +function isOperationError(e) { + return e.name === "RestError"; +} +exports.isOperationError = isOperationError; +/** Polls the long-running operation. */ +async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult + ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) + : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult, + }); +} +exports.pollHttpOperation = pollHttpOperation; +//# sourceMappingURL=operation.js.map /***/ }), -/***/ 1446: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 78412: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpPoller = void 0; +const operation_js_1 = __nccwpck_require__(57759); +const poller_js_1 = __nccwpck_require__(76713); +/** + * Creates a poller that can be used to poll a long-running operation. + * @param lro - Description of the long-running operation + * @param options - options to configure the poller + * @returns an initialized poller + */ +async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful, + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig, + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); + }, + poll: lro.sendPollRequest, + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult + ? ({ flatResponse }, state) => processResult(flatResponse, state) + : ({ flatResponse }) => flatResponse, + }); +} +exports.createHttpPoller = createHttpPoller; +//# sourceMappingURL=poller.js.map -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(87530) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(29054) -const { webidl } = __nccwpck_require__(21744) -const { kEnumerableProperty } = __nccwpck_require__(83983) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null - } - } - - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' }) - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' }) - - blob = webidl.converters.Blob(blob, { strict: false }) +/***/ }), - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } +/***/ 90334: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) +"use strict"; - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpPoller = void 0; +const tslib_1 = __nccwpck_require__(4351); +var poller_js_1 = __nccwpck_require__(78412); +Object.defineProperty(exports, "createHttpPoller", ({ enumerable: true, get: function () { return poller_js_1.createHttpPoller; } })); +/** + * This can be uncommented to expose the protocol-agnostic poller + */ +// export { +// BuildCreatePollerOptions, +// Operation, +// CreatePollerOptions, +// OperationConfig, +// RestorableOperationState, +// } from "./poller/models"; +// export { buildCreatePoller } from "./poller/poller"; +/** legacy */ +tslib_1.__exportStar(__nccwpck_require__(52260), exports); +tslib_1.__exportStar(__nccwpck_require__(17270), exports); +tslib_1.__exportStar(__nccwpck_require__(93586), exports); +//# sourceMappingURL=index.js.map - blob = webidl.converters.Blob(blob, { strict: false }) +/***/ }), - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding) - } +/***/ 52260: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } +"use strict"; - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LroEngine = void 0; +var lroEngine_js_1 = __nccwpck_require__(35780); +Object.defineProperty(exports, "LroEngine", ({ enumerable: true, get: function () { return lroEngine_js_1.LroEngine; } })); +//# sourceMappingURL=index.js.map - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' }) +/***/ }), - blob = webidl.converters.Blob(blob, { strict: false }) +/***/ 35780: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') - } +"use strict"; - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LroEngine = void 0; +const operation_js_1 = __nccwpck_require__(77954); +const constants_js_1 = __nccwpck_require__(53846); +const poller_js_1 = __nccwpck_require__(17270); +const operation_js_2 = __nccwpck_require__(70281); +/** + * The LRO Engine, a class that performs polling. + */ +class LroEngine extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState, } = options || {}; + const state = resumeFrom + ? (0, operation_js_2.deserializeState)(resumeFrom) + : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs: intervalInMs }; + operation.setPollerConfig(this.config); } - - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); } +} +exports.LroEngine = LroEngine; +//# sourceMappingURL=lroEngine.js.map - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) +/***/ }), - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } - } +/***/ 77954: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) +"use strict"; - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GenericPollOperation = void 0; +const operation_js_1 = __nccwpck_require__(57759); +const logger_js_1 = __nccwpck_require__(28121); +const createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => (state.isCancelled = true), + setError: (state, error) => (state.error = error), + setResult: (state, result) => (state.result = result), + setRunning: (state) => (state.isStarted = true), + setSucceeded: (state) => (state.isCompleted = true), + setFailed: () => { + /** empty body */ + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error), +}); +class GenericPollOperation { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; } - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] - } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend - } - - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), (await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult, + }))); + } + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === undefined) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState + ? (state, { rawResponse }) => updateState(state, rawResponse) + : undefined, + isDone: isDone + ? ({ flatResponse }, state) => isDone(flatResponse, state) + : undefined, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult, + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; } - } - - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state, + }); } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) +} +exports.GenericPollOperation = GenericPollOperation; +//# sourceMappingURL=operation.js.map - return this[kEvents].loadstart - } +/***/ }), - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) +/***/ 93586: +/***/ ((__unused_webpack_module, exports) => { - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } +"use strict"; - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null - } - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=pollOperation.js.map - get onprogress () { - webidl.brandCheck(this, FileReader) +/***/ }), - return this[kEvents].progress - } +/***/ 17270: +/***/ ((__unused_webpack_module, exports) => { - set onprogress (fn) { - webidl.brandCheck(this, FileReader) +"use strict"; - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Poller = exports.PollerCancelledError = exports.PollerStoppedError = void 0; +/** + * When a poller is manually stopped through the `stopPolling` method, + * the poller will be rejected with an instance of the PollerStoppedError. + */ +class PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, PollerStoppedError.prototype); } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null +} +exports.PollerStoppedError = PollerStoppedError; +/** + * When the operation is cancelled, the poller will be rejected with an instance + * of the PollerCancelledError. + */ +class PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, PollerCancelledError.prototype); } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) +} +exports.PollerCancelledError = PollerCancelledError; +/** + * A class that represents the definition of a program that polls through consecutive requests + * until it reaches a state of completion. + * + * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. + * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. + * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * + * ```ts + * const poller = new MyPoller(); + * + * // Polling just once: + * await poller.poll(); + * + * // We can try to cancel the request here, by calling: + * // + * // await poller.cancelOperation(); + * // + * + * // Getting the final result: + * const result = await poller.pollUntilDone(); + * ``` + * + * The Poller is defined by two types, a type representing the state of the poller, which + * must include a basic set of properties from `PollOperationState`, + * and a return type defined by `TResult`, which can be anything. + * + * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having + * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * + * ```ts + * class Client { + * public async makePoller: PollerLike { + * const poller = new MyPoller({}); + * // It might be preferred to return the poller after the first request is made, + * // so that some information can be obtained right away. + * await poller.poll(); + * return poller; + * } + * } + * + * const poller: PollerLike = myClient.makePoller(); + * ``` + * + * A poller can be created through its constructor, then it can be polled until it's completed. + * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. + * At any point in time, the intermediate forms of the result type can be requested without delay. + * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * + * ```ts + * const poller = myClient.makePoller(); + * const state: MyOperationState = poller.getOperationState(); + * + * // The intermediate result can be obtained at any time. + * const result: MyResult | undefined = poller.getResult(); + * + * // The final result can only be obtained after the poller finishes. + * const result: MyResult = await poller.pollUntilDone(); + * ``` + * + */ +// eslint-disable-next-line no-use-before-define +class Poller { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + /** controls whether to throw an error if the operation failed or was canceled. */ + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown. + // The above warning would get thrown if `poller.poll` is called, it returns an error, + // and pullUntilDone did not have a .catch or await try/catch on it's return value. + this.promise.catch(() => { + /* intentionally blank */ + }); } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this), + }); + } + this.processUpdatedState(); } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } + } + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); + } + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = undefined; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; + } + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error = new PollerCancelledError("Operation was canceled"); + this.reject(error); + throw error; + } + } + if (this.isDone() && this.resolve) { + // If the poller has finished polling, this means we now have a result. + // However, it can be the case that TResult is instantiated to void, so + // we are not expecting a result anyway. To assert that we might not + // have a result eventually after finishing polling, we cast the result + // to TResult. + this.resolve(this.getResult()); + } + } + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + // This is needed because the state could have been updated by + // `cancelOperation`, e.g. the operation is canceled or an error occurred. + this.processUpdatedState(); + return this.promise; + } + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; + } + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); + } + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } + } + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; + } + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } + else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; + } + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader } - +exports.Poller = Poller; +//# sourceMappingURL=poller.js.map /***/ }), -/***/ 55504: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 28121: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { webidl } = __nccwpck_require__(21744) - -const kState = Symbol('ProgressEvent state') - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); /** - * @see https://xhr.spec.whatwg.org/#progressevent + * The `@azure/logger` configuration for this package. + * @internal */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total - } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: false - } -]) - -module.exports = { - ProgressEvent -} - +exports.logger = (0, logger_1.createClientLogger)("core-lro"); +//# sourceMappingURL=logger.js.map /***/ }), -/***/ 29054: -/***/ ((module) => { +/***/ 53846: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') -} - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.terminalStates = exports.POLL_INTERVAL_IN_MS = void 0; +/** + * The default time interval to wait before sending the next polling request. + */ +exports.POLL_INTERVAL_IN_MS = 2000; +/** + * The closed set of terminal states. + */ +exports.terminalStates = ["succeeded", "canceled", "failed"]; +//# sourceMappingURL=constants.js.map /***/ }), -/***/ 87530: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 70281: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(29054) -const { ProgressEvent } = __nccwpck_require__(55504) -const { getEncoding } = __nccwpck_require__(84854) -const { DOMException } = __nccwpck_require__(41037) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(685) -const { types } = __nccwpck_require__(73837) -const { StringDecoder } = __nccwpck_require__(71576) -const { btoa } = __nccwpck_require__(14300) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pollOperation = exports.initOperation = exports.deserializeState = void 0; +const logger_js_1 = __nccwpck_require__(28121); +const constants_js_1 = __nccwpck_require__(53846); /** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName + * Deserializes the state */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) +function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } + catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } +} +exports.deserializeState = deserializeState; +function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error) => { + if (isOperationError(error)) { + stateProxy.setError(state, error); + stateProxy.setFailed(state); } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) - }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) + throw error; + }; +} +function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; +} +function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message, + }; +} +function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; } - }) - - break + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; } - } catch (error) { - if (fr[kAborted]) { - return + case "canceled": { + stateProxy.setCanceled(state); + break; } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } } - })() + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || + (isDone === undefined && + ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status))) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult, + })); + } } - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) +function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; } - /** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName + * Initiates the long-running operation. */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL - } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) +async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation, + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; +} +exports.initOperation = initOperation; +async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError, + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status:\n\tPolling from: ${state.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== undefined) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status, + }; } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer + return { response, status }; +} +/** Polls the long-running operation. */ +async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult, } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== undefined) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options, + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult, + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== undefined) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } + else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') +} +exports.pollOperation = pollOperation; +//# sourceMappingURL=operation.js.map - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } +/***/ }), - binaryString += decoder.end() +/***/ 76713: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return binaryString - } - } -} +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildCreatePoller = void 0; +const operation_js_1 = __nccwpck_require__(70281); +const constants_js_1 = __nccwpck_require__(53846); +const core_util_1 = __nccwpck_require__(80637); +const createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => (state.status = "canceled"), + setError: (state, error) => (state.error = error), + setResult: (state, result) => (state.result = result), + setRunning: (state) => (state.status = "running"), + setSucceeded: (state) => (state.status = "succeeded"), + setFailed: (state) => (state.status = "failed"), + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded", +}); /** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding + * Returns a poller factory. */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) +function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful, } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom, } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback + ? (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() + : undefined; + const state = restoreFrom + ? (0, operation_js_1.deserializeState)(restoreFrom) + : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful, + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === undefined, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state, + }), + onProgress: (callback) => { + const s = Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + // In the future we can use AbortSignal.any() instead + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } + else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } + finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } + else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = undefined; + }))), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } + else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful, + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + }, + }; + return poller; + }; +} +exports.buildCreatePoller = buildCreatePoller; +//# sourceMappingURL=poller.js.map - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) +/***/ }), - let slice = 0 +/***/ 43171: +/***/ ((__unused_webpack_module, exports) => { - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding +"use strict"; - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "1.22.2"; +exports.DEFAULT_RETRY_POLICY_COUNT = 3; +//# sourceMappingURL=constants.js.map - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". +/***/ }), - // 4. Return output. +/***/ 81060: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineFromOptions = createPipelineFromOptions; +const logPolicy_js_1 = __nccwpck_require__(46821); +const pipeline_js_1 = __nccwpck_require__(83906); +const redirectPolicy_js_1 = __nccwpck_require__(98526); +const userAgentPolicy_js_1 = __nccwpck_require__(88935); +const multipartPolicy_js_1 = __nccwpck_require__(19042); +const decompressResponsePolicy_js_1 = __nccwpck_require__(57618); +const defaultRetryPolicy_js_1 = __nccwpck_require__(48549); +const formDataPolicy_js_1 = __nccwpck_require__(16501); +const core_util_1 = __nccwpck_require__(80637); +const proxyPolicy_js_1 = __nccwpck_require__(94761); +const setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); +const agentPolicy_js_1 = __nccwpck_require__(15093); +const tlsPolicy_js_1 = __nccwpck_require__(88446); +const tracingPolicy_js_1 = __nccwpck_require__(80606); +const wrapAbortSignalLikePolicy_js_1 = __nccwpck_require__(48753); /** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue + * Create a new pipeline with a default set of customizable policies. + * @param options - Options to configure a custom pipeline. */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null +function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); + // The multipart policy is added after policies with no phase, so that + // policies can be added between it and formDataPolicy to modify + // properties (e.g., making the boundary constant in recorded tests). + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { + afterPhase: "Retry", + }); + if (core_util_1.isNodeLike) { + // Both XHR and Fetch expect to handle redirects automatically, + // so only include this policy when we're in Node. + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; } +//# sourceMappingURL=createPipelineFromOptions.js.map -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) +/***/ }), - let offset = 0 +/***/ 88609: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} +"use strict"; -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultHttpClient = createDefaultHttpClient; +const ts_http_runtime_1 = __nccwpck_require__(83335); +const wrapAbortSignal_js_1 = __nccwpck_require__(7188); +/** + * Create the correct HttpClient for the current environment. + */ +function createDefaultHttpClient() { + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + // we wrap any AbortSignalLike here since the TypeSpec runtime expects a native AbortSignal. + // 99% of the time, this should be a no-op since a native AbortSignal is passed in. + const { abortSignal, cleanup } = request.abortSignal + ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) + : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } + finally { + cleanup?.(); + } + }, + }; } - +//# sourceMappingURL=defaultHttpClient.js.map /***/ }), -/***/ 21892: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 60118: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(48045) -const Agent = __nccwpck_require__(7890) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpHeaders = createHttpHeaders; +const ts_http_runtime_1 = __nccwpck_require__(83335); +/** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders - A simple object representing initial headers + */ +function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } +//# sourceMappingURL=httpHeaders.js.map -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} +/***/ }), -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} +/***/ 29146: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createFileFromStream = exports.createFile = exports.agentPolicyName = exports.agentPolicy = exports.auxiliaryAuthenticationHeaderPolicyName = exports.auxiliaryAuthenticationHeaderPolicy = exports.ndJsonPolicyName = exports.ndJsonPolicy = exports.bearerTokenAuthenticationPolicyName = exports.bearerTokenAuthenticationPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.userAgentPolicyName = exports.userAgentPolicy = exports.defaultRetryPolicy = exports.tracingPolicyName = exports.tracingPolicy = exports.retryPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.setClientRequestIdPolicyName = exports.setClientRequestIdPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.isRestError = exports.RestError = exports.createPipelineRequest = exports.createHttpHeaders = exports.createDefaultHttpClient = exports.createPipelineFromOptions = exports.createEmptyPipeline = void 0; +var pipeline_js_1 = __nccwpck_require__(83906); +Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); +var createPipelineFromOptions_js_1 = __nccwpck_require__(81060); +Object.defineProperty(exports, "createPipelineFromOptions", ({ enumerable: true, get: function () { return createPipelineFromOptions_js_1.createPipelineFromOptions; } })); +var defaultHttpClient_js_1 = __nccwpck_require__(88609); +Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); +var httpHeaders_js_1 = __nccwpck_require__(60118); +Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); +var pipelineRequest_js_1 = __nccwpck_require__(93536); +Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); +var restError_js_1 = __nccwpck_require__(61036); +Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); +Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); +var decompressResponsePolicy_js_1 = __nccwpck_require__(57618); +Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); +Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(1598); +Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); +Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); +var setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); +Object.defineProperty(exports, "setClientRequestIdPolicy", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; } })); +Object.defineProperty(exports, "setClientRequestIdPolicyName", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } })); +var logPolicy_js_1 = __nccwpck_require__(46821); +Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); +Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); +var multipartPolicy_js_1 = __nccwpck_require__(19042); +Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); +Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); +var proxyPolicy_js_1 = __nccwpck_require__(94761); +Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); +Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); +Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); +var redirectPolicy_js_1 = __nccwpck_require__(98526); +Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); +Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(72470); +Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); +Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(54802); +Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); +Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); +var retryPolicy_js_1 = __nccwpck_require__(39700); +Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); +var tracingPolicy_js_1 = __nccwpck_require__(80606); +Object.defineProperty(exports, "tracingPolicy", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicy; } })); +Object.defineProperty(exports, "tracingPolicyName", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicyName; } })); +var defaultRetryPolicy_js_1 = __nccwpck_require__(48549); +Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); +var userAgentPolicy_js_1 = __nccwpck_require__(88935); +Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); +Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); +var tlsPolicy_js_1 = __nccwpck_require__(88446); +Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); +Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); +var formDataPolicy_js_1 = __nccwpck_require__(16501); +Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); +Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); +var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(11319); +Object.defineProperty(exports, "bearerTokenAuthenticationPolicy", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; } })); +Object.defineProperty(exports, "bearerTokenAuthenticationPolicyName", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; } })); +var ndJsonPolicy_js_1 = __nccwpck_require__(82032); +Object.defineProperty(exports, "ndJsonPolicy", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicy; } })); +Object.defineProperty(exports, "ndJsonPolicyName", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicyName; } })); +var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(21760); +Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicy", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; } })); +Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicyName", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } })); +var agentPolicy_js_1 = __nccwpck_require__(15093); +Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); +Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); +var file_js_1 = __nccwpck_require__(3224); +Object.defineProperty(exports, "createFile", ({ enumerable: true, get: function () { return file_js_1.createFile; } })); +Object.defineProperty(exports, "createFileFromStream", ({ enumerable: true, get: function () { return file_js_1.createFileFromStream; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 46930: -/***/ ((module) => { +/***/ 30648: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); +exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); +//# sourceMappingURL=log.js.map -module.exports = class DecoratorHandler { - constructor (handler) { - this.handler = handler - } - - onConnect (...args) { - return this.handler.onConnect(...args) - } - - onError (...args) { - return this.handler.onError(...args) - } - - onUpgrade (...args) { - return this.handler.onUpgrade(...args) - } - - onHeaders (...args) { - return this.handler.onHeaders(...args) - } +/***/ }), - onData (...args) { - return this.handler.onData(...args) - } +/***/ 83906: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - onComplete (...args) { - return this.handler.onComplete(...args) - } +"use strict"; - onBodySent (...args) { - return this.handler.onBodySent(...args) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createEmptyPipeline = createEmptyPipeline; +const ts_http_runtime_1 = __nccwpck_require__(83335); +/** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ +function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); } - +//# sourceMappingURL=pipeline.js.map /***/ }), -/***/ 72860: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 93536: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const util = __nccwpck_require__(83983) -const { kBodyUsed } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const EE = __nccwpck_require__(82361) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineRequest = createPipelineRequest; +const ts_http_runtime_1 = __nccwpck_require__(83335); +/** + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options - The options to create the request with. + */ +function createPipelineRequest(options) { + // Cast required due to difference between ts-http-runtime requiring AbortSignal while core-rest-pipeline allows + // the more generic AbortSignalLike. The wrapAbortSignalLike pipeline policy will take care of ensuring that any AbortSignalLike in the request + // is converted into a true AbortSignal. + return (0, ts_http_runtime_1.createPipelineRequest)(options); } +//# sourceMappingURL=pipelineRequest.js.map -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) - } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } +/***/ }), - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) +/***/ 15093: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) - } +"use strict"; - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.agentPolicyName = void 0; +exports.agentPolicy = agentPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the Agent Policy + */ +exports.agentPolicyName = policies_1.agentPolicyName; +/** + * Gets a pipeline policy that sets http.agent + */ +function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); +} +//# sourceMappingURL=agentPolicy.js.map - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname +/***/ }), - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null +/***/ 21760: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null - } - } +"use strict"; - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.auxiliaryAuthenticationHeaderPolicyName = void 0; +exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; +const tokenCycler_js_1 = __nccwpck_require__(50601); +const log_js_1 = __nccwpck_require__(30648); +/** + * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. + */ +exports.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; +const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; +async function sendAuthorizeRequest(options) { + const { scopes, getAccessToken, request } = options; + const getTokenOptions = { + abortSignal: request.abortSignal, + tracingOptions: request.tracingOptions, + }; + return (await getAccessToken(scopes, getTokenOptions))?.token ?? ""; +} +/** + * A policy for external tokens to `x-ms-authorization-auxiliary` header. + * This header will be used when creating a cross-tenant application we may need to handle authentication requests + * for resources that are in different tenants. + * You could see [ARM docs](https://learn.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works + */ +function auxiliaryAuthenticationHeaderPolicy(options) { + const { credentials, scopes } = options; + const logger = options.logger || log_js_1.logger; + const tokenCyclerMap = new WeakMap(); + return { + name: exports.auxiliaryAuthenticationHeaderPolicyName, + async sendRequest(request, next) { + if (!request.url.toLowerCase().startsWith("https://")) { + throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); + } + if (!credentials || credentials.length === 0) { + logger.info(`${exports.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); + return next(request); + } + const tokenPromises = []; + for (const credential of credentials) { + let getAccessToken = tokenCyclerMap.get(credential); + if (!getAccessToken) { + getAccessToken = (0, tokenCycler_js_1.createTokenCycler)(credential); + tokenCyclerMap.set(credential, getAccessToken); + } + tokenPromises.push(sendAuthorizeRequest({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + getAccessToken, + logger, + })); + } + const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); + if (auxiliaryTokens.length === 0) { + logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); + return next(request); + } + request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); + return next(request); + }, + }; +} +//# sourceMappingURL=auxiliaryAuthenticationHeaderPolicy.js.map - TLDR: undici always ignores 3xx response bodies. +/***/ }), - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. +/***/ 11319: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. +"use strict"; - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitily chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.bearerTokenAuthenticationPolicyName = void 0; +exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; +exports.parseChallenges = parseChallenges; +const tokenCycler_js_1 = __nccwpck_require__(50601); +const log_js_1 = __nccwpck_require__(30648); +const restError_js_1 = __nccwpck_require__(61036); +/** + * The programmatic identifier of the bearerTokenAuthenticationPolicy. + */ +exports.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; +/** + * Try to send the given request. + * + * When a response is received, returns a tuple of the response received and, if the response was received + * inside a thrown RestError, the RestError that was thrown. + * + * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it + * will be rethrown. + */ +async function trySendRequest(request, next) { + try { + return [await next(request), undefined]; } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed informations. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) + catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; + } + else { + throw e; + } } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) +} +/** + * Default authorize request handler + */ +async function defaultAuthorizeRequest(options) { + const { scopes, getAccessToken, request } = options; + // Enable CAE true by default + const getTokenOptions = { + abortSignal: request.abortSignal, + tracingOptions: request.tracingOptions, + enableCae: true, + }; + const accessToken = await getAccessToken(scopes, getTokenOptions); + if (accessToken) { + options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); } - } } - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toString().toLowerCase() === 'location') { - return headers[i + 1] +/** + * We will retrieve the challenge only if the response status code was 401, + * and if the response contained the header "WWW-Authenticate" with a non-empty value. + */ +function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); +} +/** + * Re-authorize the request for CAE challenge. + * The response containing the challenge is `options.response`. + * If this method returns true, the underlying request will be sent once again. + */ +async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims, + }); + if (!accessToken) { + return false; } - } + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; } - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - return ( - (header.length === 4 && header.toString().toLowerCase() === 'host') || - (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) || - (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') || - (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') - ) +/** + * A policy that can request a token from a TokenCredential implementation and + * then apply it to the Authorization header of a request as a Bearer token. + */ +function bearerTokenAuthenticationPolicy(options) { + const { credential, scopes, challengeCallbacks } = options; + const logger = options.logger || log_js_1.logger; + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks), + }; + // This function encapsulates the entire process of reliably retrieving the token + // The options are left out of the public API until there's demand to configure this. + // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions` + // in order to pass through the `options` object. + const getAccessToken = credential + ? (0, tokenCycler_js_1.createTokenCycler)(credential /* , options */) + : () => Promise.resolve(null); + return { + name: exports.bearerTokenAuthenticationPolicyName, + /** + * If there's no challenge parameter: + * - It will try to retrieve the token using the cache, or the credential's getToken. + * - Then it will try the next policy with or without the retrieved token. + * + * It uses the challenge parameters to: + * - Skip a first attempt to get the token from the credential if there's no cached token, + * since it expects the token to be retrievable only after the challenge. + * - Prepare the outgoing request if the `prepareRequest` method has been provided. + * - Send an initial request to receive the challenge if it fails. + * - Process a challenge if the response contains it. + * - Retrieve a token with the challenge information, then re-send the request. + */ + async sendRequest(request, next) { + if (!request.url.toLowerCase().startsWith("https://")) { + throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); + } + await callbacks.authorizeRequest({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + getAccessToken, + logger, + }); + let response; + let error; + let shouldSendRequest; + [response, error] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + // Handle CAE by default when receive CAE claim + if (claims) { + let parsedClaim; + // Return the response immediately if claims is not a valid base64 encoded string + try { + parsedClaim = atob(claims); + } + catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger, + }, parsedClaim); + // Send updated request and handle response for RestError + if (shouldSendRequest) { + [response, error] = await trySendRequest(request, next); + } + } + else if (callbacks.authorizeRequestOnChallenge) { + // Handle custom challenges when client provides custom callback + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger, + }); + // Send updated request and handle response for RestError + if (shouldSendRequest) { + [response, error] = await trySendRequest(request, next); + } + // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } + catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger, + }, parsedClaim); + // Send updated request and handle response for RestError + if (shouldSendRequest) { + [response, error] = await trySendRequest(request, next); + } + } + } + } + } + if (error) { + throw error; + } + else { + return response; + } + }, + }; } - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } +/** + * Converts: `Bearer a="b", c="d", Pop e="f", g="h"`. + * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`. + * + * @internal + */ +function parseChallenges(challenges) { + // Challenge regex seperates the string to individual challenges with different schemes in the format `Scheme a="b", c=d` + // The challenge regex captures parameteres with either quotes values or unquoted values + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + // Parameter regex captures the claims group removed from the scheme in the format `a="b"` and `c="d"` + // CAE challenge always have quoted parameters. For more reference, https://learn.microsoft.com/entra/identity-platform/claims-challenge + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + // Iterate over each challenge match + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + // Iterate over each parameter match + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } + return parsedChallenges; +} +/** + * Parse a pipeline response and look for a CAE challenge with "Bearer" scheme + * Return the value in the header without parsing the challenge + * @internal + */ +function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret + // Find all challenges present in the header + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; } - -module.exports = RedirectHandler - +//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map /***/ }), -/***/ 82286: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(39491) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(72785) -const { RequestRetryError } = __nccwpck_require__(48045) -const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(83983) +/***/ 57618: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - const diff = new Date(retryAfter).getTime() - current +"use strict"; - return diff +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decompressResponsePolicyName = void 0; +exports.decompressResponsePolicy = decompressResponsePolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the decompressResponsePolicy. + */ +exports.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; +/** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); } +//# sourceMappingURL=decompressResponsePolicy.js.map -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = dispatchOpts - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - timeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE' - ] - } - - this.retryCount = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() - } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort - } - } +/***/ }), - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } +/***/ 48549: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - timeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - let { counter, currentTimeout } = state +"use strict"; - currentTimeout = - currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRetryPolicyName = void 0; +exports.defaultRetryPolicy = defaultRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the {@link defaultRetryPolicy} + */ +exports.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; +/** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + */ +function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); +} +//# sourceMappingURL=defaultRetryPolicy.js.map - // Any code that is not a Undici's originated and allowed to retry - if ( - code && - code !== 'UND_ERR_REQ_RETRY' && - code !== 'UND_ERR_SOCKET' && - !errorCodes.includes(code) - ) { - cb(err) - return - } +/***/ }), - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return - } +/***/ 1598: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return - } +"use strict"; - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryPolicyName = void 0; +exports.exponentialRetryPolicy = exponentialRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the exponentialRetryPolicy. + */ +exports.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; +/** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @param options - Options that configure retry logic. + */ +function exponentialRetryPolicy(options = {}) { + return (0, policies_1.exponentialRetryPolicy)(options); +} +//# sourceMappingURL=exponentialRetryPolicy.js.map - let retryAfterHeader = headers != null && headers['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds - } +/***/ }), - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) +/***/ 16501: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - state.currentTimeout = retryTimeout +"use strict"; - setTimeout(() => cb(null), retryTimeout) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formDataPolicyName = void 0; +exports.formDataPolicy = formDataPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the formDataPolicy. + */ +exports.formDataPolicyName = policies_1.formDataPolicyName; +/** + * A policy that encodes FormData on the request into the body. + */ +function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); +} +//# sourceMappingURL=formDataPolicy.js.map - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) +/***/ }), - this.retryCount += 1 +/***/ 46821: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (statusCode >= 300) { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } +"use strict"; - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logPolicyName = void 0; +exports.logPolicy = logPolicy; +const log_js_1 = __nccwpck_require__(30648); +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the logPolicy. + */ +exports.logPolicyName = policies_1.logPolicyName; +/** + * A policy that logs all requests and responses. + * @param options - Options to configure logPolicy. + */ +function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options, + }); +} +//# sourceMappingURL=logPolicy.js.map - if (statusCode !== 206) { - return true - } +/***/ }), - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } +/***/ 19042: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } +"use strict"; - const { start, size, end = size } = contentRange +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.multipartPolicyName = void 0; +exports.multipartPolicy = multipartPolicy; +const policies_1 = __nccwpck_require__(81914); +const file_js_1 = __nccwpck_require__(3224); +/** + * Name of multipart policy + */ +exports.multipartPolicyName = policies_1.multipartPolicyName; +/** + * Pipeline policy for multipart requests + */ +function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } + } + return tspPolicy.sendRequest(request, next); + }, + }; +} +//# sourceMappingURL=multipartPolicy.js.map - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') +/***/ }), - this.resume = resume - return true - } +/***/ 82032: +/***/ ((__unused_webpack_module, exports) => { - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) +"use strict"; - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ndJsonPolicyName = void 0; +exports.ndJsonPolicy = ndJsonPolicy; +/** + * The programmatic identifier of the ndJsonPolicy. + */ +exports.ndJsonPolicyName = "ndJsonPolicy"; +/** + * ndJsonPolicy is a policy used to control keep alive settings for every request. + */ +function ndJsonPolicy() { + return { + name: exports.ndJsonPolicyName, + async sendRequest(request, next) { + // There currently isn't a good way to bypass the serializer + if (typeof request.body === "string" && request.body.startsWith("[")) { + const body = JSON.parse(request.body); + if (Array.isArray(body)) { + request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); + } + } + return next(request); + }, + }; +} +//# sourceMappingURL=ndJsonPolicy.js.map - const { start, size, end = size } = range +/***/ }), - assert( - start != null && Number.isFinite(start) && this.start !== start, - 'content-range mismatch' - ) - assert(Number.isFinite(start)) - assert( - end != null && Number.isFinite(end) && this.end !== end, - 'invalid content-length' - ) +/***/ 94761: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this.start = start - this.end = end - } +"use strict"; - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) : null - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.proxyPolicyName = void 0; +exports.getDefaultProxySettings = getDefaultProxySettings; +exports.proxyPolicy = proxyPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the proxyPolicy. + */ +exports.proxyPolicyName = policies_1.proxyPolicyName; +/** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl - The url of the proxy to use. May contain authentication information. + * @deprecated - Internally this method is no longer necessary when setting proxy information. + */ +function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); +} +/** + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings - ProxySettings to use on each request. + * @param options - additional settings, for example, custom NO_PROXY patterns + */ +function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); +} +//# sourceMappingURL=proxyPolicy.js.map - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) +/***/ }), - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null +/***/ 98526: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } +"use strict"; - const err = new RequestRetryError('Request failed', statusCode, { - headers, - count: this.retryCount - }) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.redirectPolicyName = void 0; +exports.redirectPolicy = redirectPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the redirectPolicy. + */ +exports.redirectPolicyName = policies_1.redirectPolicyName; +/** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. + */ +function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); +} +//# sourceMappingURL=redirectPolicy.js.map - this.abort(err) +/***/ }), - return false - } +/***/ 39700: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - onData (chunk) { - this.start += chunk.length +"use strict"; - return this.handler.onData(chunk) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retryPolicy = retryPolicy; +const logger_1 = __nccwpck_require__(89497); +const constants_js_1 = __nccwpck_require__(43171); +const policies_1 = __nccwpck_require__(81914); +const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); +/** + * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + */ +function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + // Cast is required since the TSP runtime retry strategy type is slightly different + // very deep down (using real AbortSignal vs. AbortSignalLike in RestError). + // In practice the difference doesn't actually matter. + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options, + }); +} +//# sourceMappingURL=retryPolicy.js.map - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } +/***/ }), - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } +/***/ 93860: +/***/ ((__unused_webpack_module, exports) => { - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) +"use strict"; - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setClientRequestIdPolicyName = void 0; +exports.setClientRequestIdPolicy = setClientRequestIdPolicy; +/** + * The programmatic identifier of the setClientRequestIdPolicy. + */ +exports.setClientRequestIdPolicyName = "setClientRequestIdPolicy"; +/** + * Each PipelineRequest gets a unique id upon creation. + * This policy passes that unique id along via an HTTP header to enable better + * telemetry and tracing. + * @param requestIdHeaderName - The name of the header to pass the request ID to. + */ +function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { + return { + name: exports.setClientRequestIdPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(requestIdHeaderName)) { + request.headers.set(requestIdHeaderName, request.requestId); + } + return next(request); + }, + }; +} +//# sourceMappingURL=setClientRequestIdPolicy.js.map - if (this.start !== 0) { - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - range: `bytes=${this.start}-${this.end ?? ''}` - } - } - } +/***/ }), - try { - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} +/***/ 72470: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = RetryHandler +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.systemErrorRetryPolicyName = void 0; +exports.systemErrorRetryPolicy = systemErrorRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the {@link systemErrorRetryPolicy} + */ +exports.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; +/** + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @param options - Options that customize the policy. + */ +function systemErrorRetryPolicy(options = {}) { + return (0, policies_1.systemErrorRetryPolicy)(options); +} +//# sourceMappingURL=systemErrorRetryPolicy.js.map /***/ }), -/***/ 38861: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 54802: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.throttlingRetryPolicyName = void 0; +exports.throttlingRetryPolicy = throttlingRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the {@link throttlingRetryPolicy} + */ +exports.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; +/** + * A policy that retries when the server sends a 429 response with a Retry-After header. + * + * To learn more, please refer to + * https://learn.microsoft.com/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + * + * @param options - Options that configure retry logic. + */ +function throttlingRetryPolicy(options = {}) { + return (0, policies_1.throttlingRetryPolicy)(options); +} +//# sourceMappingURL=throttlingRetryPolicy.js.map -const RedirectHandler = __nccwpck_require__(72860) +/***/ }), -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts +/***/ 88446: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (!maxRedirections) { - return dispatch(opts, handler) - } +"use strict"; - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.tlsPolicyName = void 0; +exports.tlsPolicy = tlsPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the TLS Policy + */ +exports.tlsPolicyName = policies_1.tlsPolicyName; +/** + * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. + */ +function tlsPolicy(tlsSettings) { + return (0, policies_1.tlsPolicy)(tlsSettings); } - -module.exports = createRedirectInterceptor - +//# sourceMappingURL=tlsPolicy.js.map /***/ }), -/***/ 30953: +/***/ 80606: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(41891); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; +exports.tracingPolicyName = void 0; +exports.tracingPolicy = tracingPolicy; +const core_tracing_1 = __nccwpck_require__(19363); +const constants_js_1 = __nccwpck_require__(43171); +const userAgent_js_1 = __nccwpck_require__(96158); +const log_js_1 = __nccwpck_require__(30648); +const core_util_1 = __nccwpck_require__(80637); +const restError_js_1 = __nccwpck_require__(61036); +const util_1 = __nccwpck_require__(68152); +/** + * The programmatic identifier of the tracingPolicy. + */ +exports.tracingPolicyName = "tracingPolicy"; +/** + * A simple policy to create OpenTelemetry Spans for each request made by the pipeline + * that has SpanOptions with a parent. + * Requests made without a parent Span will not be recorded. + * @param options - Options to configure the telemetry logged by the tracing policy. + */ +function tracingPolicy(options = {}) { + const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + const sanitizer = new util_1.Sanitizer({ + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, + }); + const tracingClient = tryCreateTracingClient(); + return { + name: exports.tracingPolicyName, + async sendRequest(request, next) { + if (!tracingClient) { + return next(request); + } + const userAgent = await userAgentPromise; + const spanAttributes = { + "http.url": sanitizer.sanitizeUrl(request.url), + "http.method": request.method, + "http.user_agent": userAgent, + requestId: request.requestId, + }; + if (userAgent) { + spanAttributes["http.user_agent"] = userAgent; + } + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; + if (!span || !tracingContext) { + return next(request); + } + try { + const response = await tracingClient.withContext(tracingContext, next, request); + tryProcessResponse(span, response); + return response; + } + catch (err) { + tryProcessError(span, err); + throw err; + } + }, + }; +} +function tryCreateTracingClient() { + try { + return (0, core_tracing_1.createTracingClient)({ + namespace: "", + packageName: "@azure/core-rest-pipeline", + packageVersion: constants_js_1.SDK_VERSION, + }); + } + catch (e) { + log_js_1.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1.getErrorMessage)(e)}`); + return undefined; } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); } -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); +function tryCreateSpan(tracingClient, request, spanAttributes) { + try { + // As per spec, we do not need to differentiate between HTTP and HTTPS in span name. + const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { + spanKind: "client", + spanAttributes, + }); + // If the span is not recording, don't do any more work. + if (!span.isRecording()) { + span.end(); + return undefined; + } + // set headers + const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); + for (const [key, value] of Object.entries(headers)) { + request.headers.set(key, value); + } + return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; + } + catch (e) { + log_js_1.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + return undefined; + } +} +function tryProcessError(span, error) { + try { + span.setStatus({ + status: "error", + error: (0, core_util_1.isError)(error) ? error : undefined, + }); + if ((0, restError_js_1.isRestError)(error) && error.statusCode) { + span.setAttribute("http.status_code", error.statusCode); + } + span.end(); + } + catch (e) { + log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + } } -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); +function tryProcessResponse(span, response) { + try { + span.setAttribute("http.status_code", response.status); + const serviceRequestId = response.headers.get("x-ms-request-id"); + if (serviceRequestId) { + span.setAttribute("serviceRequestId", serviceRequestId); + } + // Per semantic conventions, only set the status to error if the status code is 4xx or 5xx. + // Otherwise, the status MUST remain unset. + // https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status + if (response.status >= 400) { + span.setStatus({ + status: "error", + }); + } + span.end(); + } + catch (e) { + log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); } } -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map +//# sourceMappingURL=tracingPolicy.js.map /***/ }), -/***/ 61145: -/***/ ((module) => { +/***/ 88935: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userAgentPolicyName = void 0; +exports.userAgentPolicy = userAgentPolicy; +const userAgent_js_1 = __nccwpck_require__(96158); +const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); +/** + * The programmatic identifier of the userAgentPolicy. + */ +exports.userAgentPolicyName = "userAgentPolicy"; +/** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options - Options to customize the user agent value. + */ +function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + }, + }; +} +//# sourceMappingURL=userAgentPolicy.js.map /***/ }), -/***/ 95627: -/***/ ((module) => { +/***/ 48753: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wrapAbortSignalLikePolicyName = void 0; +exports.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; +const wrapAbortSignal_js_1 = __nccwpck_require__(7188); +exports.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; +/** + * Policy that ensure that any AbortSignalLike is wrapped in a native AbortSignal for processing by the pipeline. + * Since the ts-http-runtime expects a native AbortSignal, this policy is used to ensure that any AbortSignalLike is wrapped in a native AbortSignal. + * + * @returns - created policy + */ +function wrapAbortSignalLikePolicy() { + return { + name: exports.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); + } + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); + } + finally { + cleanup?.(); + } + }, + }; +} +//# sourceMappingURL=wrapAbortSignalLikePolicy.js.map /***/ }), -/***/ 41891: -/***/ ((__unused_webpack_module, exports) => { +/***/ 61036: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; - } - }); - return res; +exports.RestError = void 0; +exports.isRestError = isRestError; +const ts_http_runtime_1 = __nccwpck_require__(83335); +/** + * A custom error type for failed pipeline requests. + */ +// eslint-disable-next-line @typescript-eslint/no-redeclare +exports.RestError = ts_http_runtime_1.RestError; +/** + * Typeguard for RestError + * @param e - Something caught by a catch clause. + */ +function isRestError(e) { + return (0, ts_http_runtime_1.isRestError)(e); } -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map +//# sourceMappingURL=restError.js.map /***/ }), -/***/ 66771: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 3224: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { kClients } = __nccwpck_require__(72785) -const Agent = __nccwpck_require__(7890) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(24347) -const MockClient = __nccwpck_require__(58687) -const MockPool = __nccwpck_require__(26193) -const { matchValue, buildMockOptions } = __nccwpck_require__(79323) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(48045) -const Dispatcher = __nccwpck_require__(60412) -const Pluralizer = __nccwpck_require__(78891) -const PendingInterceptorsFormatter = __nccwpck_require__(86823) - -class FakeWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hasRawContent = hasRawContent; +exports.getRawContent = getRawContent; +exports.createFileFromStream = createFileFromStream; +exports.createFile = createFile; +const core_util_1 = __nccwpck_require__(80637); +function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); } - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') +const unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + }, +}; +/** + * Private symbol used as key on objects created using createFile containing the + * original source of the file object. + * + * This is used in Node to access the original Node stream without using Blob#stream, which + * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and + * Readable#to/fromWeb in Node versions we support: + * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14) + * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6) + * + * Once these versions are no longer supported, we may be able to stop doing this. + * + * @internal + */ +const rawContent = Symbol("rawContent"); +/** + * Type guard to check if a given object is a blob-like object with a raw content property. + */ +function hasRawContent(x) { + return typeof x[rawContent] === "function"; +} +/** + * Extract the raw content from a given blob-like object. If the input was created using createFile + * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. + * For true instances of Blob and File, returns the actual blob. + * + * @internal + */ +function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); } - const agent = opts && opts.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) + else { + return blob; } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } +} +/** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function to: + * - Create a File object for use in RequestBodyType.formData in environments where the + * global File object is unavailable. + * - Create a File-like object from a readable stream without reading the stream into memory. + * + * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is + * passed in a request's form data map, the stream will not be read into memory + * and instead will be streamed when the request is made. In the event of a retry, the + * stream needs to be read again, so this callback SHOULD return a fresh stream if possible. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ +function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? new Date().getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream, + }; +} +/** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable. + * + * @param content - the content of the file as a Uint8Array in memory. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ +function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? new Date().getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content, + }; + } + else { + return new File([toArrayBuffer(content)], name, options); + } +} +function toArrayBuffer(source) { + if ("resize" in source.buffer) { + // ArrayBuffer + return source; + } + // SharedArrayBuffer + return source.map((x) => x); +} +//# sourceMappingURL=file.js.map - async close () { - await this[kAgent].close() - this[kClients].clear() - } +/***/ }), - deactivate () { - this[kIsMockActive] = false - } +/***/ 50601: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - activate () { - this[kIsMockActive] = true - } +"use strict"; - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_CYCLER_OPTIONS = void 0; +exports.createTokenCycler = createTokenCycler; +const core_util_1 = __nccwpck_require__(80637); +// Default options for the cycler if none are provided +exports.DEFAULT_CYCLER_OPTIONS = { + forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires + retryIntervalInMs: 3000, // Allow refresh attempts every 3s + refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry +}; +/** + * Converts an an unreliable access token getter (which may resolve with null) + * into an AccessTokenGetter by retrying the unreliable getter in a regular + * interval. + * + * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null. + * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts. + * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception. + * @returns - A promise that, if it resolves, will resolve with an access token. + */ +async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { + // This wrapper handles exceptions gracefully as long as we haven't exceeded + // the timeout. + async function tryGetAccessToken() { + if (Date.now() < refreshTimeout) { + try { + return await getAccessToken(); + } + catch { + return null; + } + } + else { + const finalToken = await getAccessToken(); + // Timeout is up, so throw if it's still null + if (finalToken === null) { + throw new Error("Failed to refresh access token."); + } + return finalToken; + } } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, new FakeWeakRef(dispatcher)) - } + let token = await tryGetAccessToken(); + while (token === null) { + await (0, core_util_1.delay)(retryIntervalInMs); + token = await tryGetAccessToken(); + } + return token; +} +/** + * Creates a token cycler from a credential, scopes, and optional settings. + * + * A token cycler represents a way to reliably retrieve a valid access token + * from a TokenCredential. It will handle initializing the token, refreshing it + * when it nears expiration, and synchronizes refresh attempts to avoid + * concurrency hazards. + * + * @param credential - the underlying TokenCredential that provides the access + * token + * @param tokenCyclerOptions - optionally override default settings for the cycler + * + * @returns - a function that reliably produces a valid access token + */ +function createTokenCycler(credential, tokenCyclerOptions) { + let refreshWorker = null; + let token = null; + let tenantId; + const options = { + ...exports.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions, + }; + /** + * This little holder defines several predicates that we use to construct + * the rules of refreshing the token. + */ + const cycler = { + /** + * Produces true if a refresh job is currently in progress. + */ + get isRefreshing() { + return refreshWorker !== null; + }, + /** + * Produces true if the cycler SHOULD refresh (we are within the refresh + * window and not already refreshing) + */ + get shouldRefresh() { + if (cycler.isRefreshing) { + return false; + } + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { + return true; + } + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); + }, + /** + * Produces true if the cycler MUST refresh (null or nearly-expired + * token). + */ + get mustRefresh() { + return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()); + }, + }; + /** + * Starts a refresh job or returns the existing job if one is already + * running. + */ + function refresh(scopes, getTokenOptions) { + if (!cycler.isRefreshing) { + // We bind `scopes` here to avoid passing it around a lot + const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); + // Take advantage of promise chaining to insert an assignment to `token` + // before the refresh can be considered done. + refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, + // If we don't have a token, then we should timeout immediately + token?.expiresOnTimestamp ?? Date.now()) + .then((_token) => { + refreshWorker = null; + token = _token; + tenantId = getTokenOptions.tenantId; + return token; + }) + .catch((reason) => { + // We also should reset the refresher if we enter a failed state. All + // existing awaiters will throw, but subsequent requests will start a + // new retry chain. + refreshWorker = null; + token = null; + tenantId = undefined; + throw reason; + }); + } + return refreshWorker; + } + return async (scopes, tokenOptions) => { + // + // Simple rules: + // - If we MUST refresh, then return the refresh task, blocking + // the pipeline until a token is available. + // - If we SHOULD refresh, then run refresh but don't return it + // (we can still use the cached token). + // - Return the token, since it's fine if we didn't return in + // step 1. + // + const hasClaimChallenge = Boolean(tokenOptions.claims); + const tenantIdChanged = tenantId !== tokenOptions.tenantId; + if (hasClaimChallenge) { + // If we've received a claim, we know the existing token isn't valid + // We want to clear it so that that refresh worker won't use the old expiration time as a timeout + token = null; + } + // If the tenantId passed in token options is different to the one we have + // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to + // refresh the token with the new tenantId or token. + const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; + if (mustRefresh) { + return refresh(scopes, tokenOptions); + } + if (cycler.shouldRefresh) { + refresh(scopes, tokenOptions); + } + return token; + }; +} +//# sourceMappingURL=tokenCycler.js.map - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } +/***/ }), - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const ref = this[kClients].get(origin) - if (ref) { - return ref.deref() - } +/***/ 96158: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher - } +"use strict"; - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { - const nonExplicitDispatcher = nonExplicitRef.deref() - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUserAgentHeaderName = getUserAgentHeaderName; +exports.getUserAgentValue = getUserAgentValue; +const userAgentPlatform_js_1 = __nccwpck_require__(15316); +const constants_js_1 = __nccwpck_require__(43171); +function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } + return parts.join(" "); +} +/** + * @internal + */ +function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); +} +/** + * @internal + */ +async function getUserAgentValue(prefix) { + const runtimeInfo = new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; +} +//# sourceMappingURL=userAgent.js.map - pendingInterceptors () { - const mockAgentClients = this[kClients] +/***/ }), - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } +/***/ 15316: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() +"use strict"; - if (pending.length === 0) { - return +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHeaderName = getHeaderName; +exports.setPlatformSpecificData = setPlatformSpecificData; +const tslib_1 = __nccwpck_require__(4351); +const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(70612)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(97742)); +/** + * @internal + */ +function getHeaderName() { + return "User-Agent"; +} +/** + * @internal + */ +async function setPlatformSpecificData(map) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map.set("Bun", `${versions.bun} (${osInfo})`); + } + else if (versions.deno) { + map.set("Deno", `${versions.deno} (${osInfo})`); + } + else if (versions.node) { + map.set("Node", `${versions.node} (${osInfo})`); + } } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } } - -module.exports = MockAgent - +//# sourceMappingURL=userAgentPlatform.js.map /***/ }), -/***/ 58687: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 7188: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -const { promisify } = __nccwpck_require__(73837) -const Client = __nccwpck_require__(33598) -const { buildMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(24347) -const { MockInterceptor } = __nccwpck_require__(90410) -const Symbols = __nccwpck_require__(72785) -const { InvalidArgumentError } = __nccwpck_require__(48045) - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wrapAbortSignalLike = wrapAbortSignalLike; /** - * MockClient provides an API that extends the Client to influence the mockDispatches. + * Creates a native AbortSignal which reflects the state of the provided AbortSignalLike. + * If the AbortSignalLike is already a native AbortSignal, it is returned as is. + * @param abortSignalLike - The AbortSignalLike to wrap. + * @returns - An object containing the native AbortSignal and an optional cleanup function. The cleanup function should be called when the AbortSignal is no longer needed. */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') +function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; + } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; +} +//# sourceMappingURL=wrapAbortSignal.js.map - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } +/***/ }), - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} +/***/ 19363: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = MockClient +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createTracingClient = exports.useInstrumenter = void 0; +var instrumenter_js_1 = __nccwpck_require__(63418); +Object.defineProperty(exports, "useInstrumenter", ({ enumerable: true, get: function () { return instrumenter_js_1.useInstrumenter; } })); +var tracingClient_js_1 = __nccwpck_require__(69254); +Object.defineProperty(exports, "createTracingClient", ({ enumerable: true, get: function () { return tracingClient_js_1.createTracingClient; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 50888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 63418: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { UndiciError } = __nccwpck_require__(48045) - -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultTracingSpan = createDefaultTracingSpan; +exports.createDefaultInstrumenter = createDefaultInstrumenter; +exports.useInstrumenter = useInstrumenter; +exports.getInstrumenter = getInstrumenter; +const tracingContext_js_1 = __nccwpck_require__(18110); +const state_js_1 = __nccwpck_require__(81241); +function createDefaultTracingSpan() { + return { + end: () => { + // noop + }, + isRecording: () => false, + recordException: () => { + // noop + }, + setAttribute: () => { + // noop + }, + setStatus: () => { + // noop + }, + addEvent: () => { + // noop + }, + }; } - -module.exports = { - MockNotMatchedError +function createDefaultInstrumenter() { + return { + createRequestHeaders: () => { + return {}; + }, + parseTraceparentHeader: () => { + return undefined; + }, + startSpan: (_name, spanOptions) => { + return { + span: createDefaultTracingSpan(), + tracingContext: (0, tracingContext_js_1.createTracingContext)({ parentContext: spanOptions.tracingContext }), + }; + }, + withContext(_context, callback, ...callbackArgs) { + return callback(...callbackArgs); + }, + }; } - +/** + * Extends the Azure SDK with support for a given instrumenter implementation. + * + * @param instrumenter - The instrumenter implementation to use. + */ +function useInstrumenter(instrumenter) { + state_js_1.state.instrumenterImplementation = instrumenter; +} +/** + * Gets the currently set instrumenter, a No-Op instrumenter by default. + * + * @returns The currently set instrumenter + */ +function getInstrumenter() { + if (!state_js_1.state.instrumenterImplementation) { + state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); + } + return state_js_1.state.instrumenterImplementation; +} +//# sourceMappingURL=instrumenter.js.map /***/ }), -/***/ 90410: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 81241: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(24347) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { buildURL } = __nccwpck_require__(83983) - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.state = void 0; /** - * Defines the scope API for an interceptor reply + * @internal + * + * Holds the singleton instrumenter, to be shared across CJS and ESM imports. */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } - - this[kMockDispatch].delay = waitInMs - return this - } +exports.state = { + instrumenterImplementation: undefined, +}; +//# sourceMappingURL=state-cjs.cjs.map - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } +/***/ }), - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') - } +/***/ 69254: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this[kMockDispatch].times = repeatTimes - return this - } -} +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createTracingClient = createTracingClient; +const instrumenter_js_1 = __nccwpck_require__(63418); +const tracingContext_js_1 = __nccwpck_require__(18110); /** - * Defines an interceptor for a Mock + * Creates a new tracing client. + * + * @param options - Options used to configure the tracing client. + * @returns - An instance of {@link TracingClient}. */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') +function createTracingClient(options) { + const { namespace, packageName, packageVersion } = options; + function startSpan(name, operationOptions, spanOptions) { + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName: packageName, + packageVersion: packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext, + }); + let tracingContext = startSpanResult.tracingContext; + const span = startSpanResult.span; + if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { + tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); + } + span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); + const updatedOptions = Object.assign({}, operationOptions, { + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext }, + }); + return { + span, + updatedOptions, + }; } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') + async function withSpan(name, operationOptions, callback, spanOptions) { + const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); + try { + const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); + span.setStatus({ status: "success" }); + return result; + } + catch (err) { + span.setStatus({ status: "error", error: err }); + throw err; + } + finally { + span.end(); + } } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' + function withContext(context, callback, ...callbackArgs) { + return (0, instrumenter_js_1.getInstrumenter)().withContext(context, callback, ...callbackArgs); } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } + /** + * Parses a traceparent header value into a span identifier. + * + * @param traceparentHeader - The traceparent header to parse. + * @returns An implementation-specific identifier for the span. + */ + function parseTraceparentHeader(traceparentHeader) { + return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() + /** + * Creates a set of request headers to propagate tracing information to a backend. + * + * @param tracingContext - The context containing the span to serialize. + * @returns The set of headers to add to a request. + */ + function createRequestHeaders(tracingContext) { + return (0, instrumenter_js_1.getInstrumenter)().createRequestHeaders(tracingContext); } + return { + startSpan, + withSpan, + withContext, + parseTraceparentHeader, + createRequestHeaders, + }; +} +//# sourceMappingURL=tracingClient.js.map - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } +/***/ }), - createMockScopeDispatchData (statusCode, data, responseOptions = {}) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } +/***/ 18110: +/***/ ((__unused_webpack_module, exports) => { - return { statusCode, data, headers, trailers } - } +"use strict"; - validateReplyParameters (statusCode, data, responseOptions) { - if (typeof statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TracingContextImpl = exports.knownContextKeys = void 0; +exports.createTracingContext = createTracingContext; +/** @internal */ +exports.knownContextKeys = { + span: Symbol.for("@azure/core-tracing span"), + namespace: Symbol.for("@azure/core-tracing namespace"), +}; +/** + * Creates a new {@link TracingContext} with the given options. + * @param options - A set of known keys that may be set on the context. + * @returns A new {@link TracingContext} with the given options. + * + * @internal + */ +function createTracingContext(options = {}) { + let context = new TracingContextImpl(options.parentContext); + if (options.span) { + context = context.setValue(exports.knownContextKeys.span, options.span); } - if (typeof data === 'undefined') { - throw new InvalidArgumentError('data must be defined') + if (options.namespace) { + context = context.setValue(exports.knownContextKeys.namespace, options.namespace); } - if (typeof responseOptions !== 'object') { - throw new InvalidArgumentError('responseOptions must be an object') + return context; +} +/** @internal */ +class TracingContextImpl { + _contextMap; + constructor(initialContext) { + this._contextMap = + initialContext instanceof TracingContextImpl + ? new Map(initialContext._contextMap) + : new Map(); } - } + setValue(key, value) { + const newContext = new TracingContextImpl(this); + newContext._contextMap.set(key, value); + return newContext; + } + getValue(key) { + return this._contextMap.get(key); + } + deleteValue(key) { + const newContext = new TracingContextImpl(this); + newContext._contextMap.delete(key); + return newContext; + } +} +exports.TracingContextImpl = TracingContextImpl; +//# sourceMappingURL=tracingContext.js.map - /** - * Mock an undici request with a defined reply. - */ - reply (replyData) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyData === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyData(opts) +/***/ }), - // Check if it is in the right format - if (typeof resolvedData !== 'object') { - throw new InvalidArgumentError('reply options callback must return an object') - } +/***/ 87205: +/***/ ((__unused_webpack_module, exports) => { - const { statusCode, data = '', responseOptions = {} } = resolvedData - this.validateReplyParameters(statusCode, data, responseOptions) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(statusCode, data, responseOptions) - } - } +"use strict"; - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cancelablePromiseRace = cancelablePromiseRace; +/** + * promise.race() wrapper that aborts rest of promises as soon as the first promise settles. + */ +async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const [statusCode, data = '', responseOptions = {}] = [...arguments] - this.validateReplyParameters(statusCode, data, responseOptions) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') + finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); } +} +//# sourceMappingURL=aborterUtils.js.map - this[kDefaultHeaders] = headers - return this - } +/***/ }), - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') - } +/***/ 12376: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this[kDefaultTrailers] = trailers - return this - } +"use strict"; - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createAbortablePromise = createAbortablePromise; +const abort_controller_1 = __nccwpck_require__(54812); +/** + * Creates an abortable promise. + * @param buildPromise - A function that takes the resolve and reject functions as parameters. + * @param options - The options for the abortable promise. + * @returns A promise that can be aborted. + */ +function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); + } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } + catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); } - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - +//# sourceMappingURL=createAbortablePromise.js.map /***/ }), -/***/ 26193: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 19259: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { promisify } = __nccwpck_require__(73837) -const Pool = __nccwpck_require__(4634) -const { buildMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(24347) -const { MockInterceptor } = __nccwpck_require__(90410) -const Symbols = __nccwpck_require__(72785) -const { InvalidArgumentError } = __nccwpck_require__(48045) - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.delay = delay; +exports.calculateRetryDelay = calculateRetryDelay; +const createAbortablePromise_js_1 = __nccwpck_require__(12376); +const util_1 = __nccwpck_require__(68152); +const StandardAbortMessage = "The delay was aborted."; /** - * MockPool provides an API that extends the Pool to influence the mockDispatches. + * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. + * @param timeInMs - The number of milliseconds to be delayed. + * @param options - The options for delay - currently abort options + * @returns Promise that is resolved after timeInMs */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) +function delay(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { + token = setTimeout(resolve, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage, + }); +} +/** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * @param retryAttempt - The current retry attempt number. + * @param config - The exponential retry configuration. + * @returns An object containing the calculated retry delay. + */ +function calculateRetryDelay(retryAttempt, config) { + // Exponentially increase the delay each time + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + // Don't let the delay exceed the maximum + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + // Allow the final value to have some "jitter" (within 50% of the delay size) so + // that retries across multiple clients don't occur simultaneously. + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; +} +//# sourceMappingURL=delay.js.map - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } +/***/ }), - get [Symbols.kConnected] () { - return this[kConnected] - } +/***/ 46734: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } +"use strict"; - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getErrorMessage = getErrorMessage; +const util_1 = __nccwpck_require__(68152); +/** + * Given what is thought to be an error object, return the message if possible. + * If the message is missing, returns a stringified version of the input. + * @param e - Something thrown from a try block + * @returns The error message or a string of the input + */ +function getErrorMessage(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } + else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } + else { + stringified = String(e); + } + } + catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } } - -module.exports = MockPool - +//# sourceMappingURL=error.js.map /***/ }), -/***/ 24347: -/***/ ((module) => { +/***/ 80637: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isWebWorker = exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isDeno = exports.isBun = exports.isBrowser = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.getErrorMessage = exports.delay = exports.createAbortablePromise = exports.cancelablePromiseRace = void 0; +exports.calculateRetryDelay = calculateRetryDelay; +exports.computeSha256Hash = computeSha256Hash; +exports.computeSha256Hmac = computeSha256Hmac; +exports.getRandomIntegerInclusive = getRandomIntegerInclusive; +exports.isError = isError; +exports.isObject = isObject; +exports.randomUUID = randomUUID; +exports.uint8ArrayToString = uint8ArrayToString; +exports.stringToUint8Array = stringToUint8Array; +const tslib_1 = __nccwpck_require__(4351); +const tspRuntime = tslib_1.__importStar(__nccwpck_require__(68152)); +var aborterUtils_js_1 = __nccwpck_require__(87205); +Object.defineProperty(exports, "cancelablePromiseRace", ({ enumerable: true, get: function () { return aborterUtils_js_1.cancelablePromiseRace; } })); +var createAbortablePromise_js_1 = __nccwpck_require__(12376); +Object.defineProperty(exports, "createAbortablePromise", ({ enumerable: true, get: function () { return createAbortablePromise_js_1.createAbortablePromise; } })); +var delay_js_1 = __nccwpck_require__(19259); +Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); +var error_js_1 = __nccwpck_require__(46734); +Object.defineProperty(exports, "getErrorMessage", ({ enumerable: true, get: function () { return error_js_1.getErrorMessage; } })); +var typeGuards_js_1 = __nccwpck_require__(1187); +Object.defineProperty(exports, "isDefined", ({ enumerable: true, get: function () { return typeGuards_js_1.isDefined; } })); +Object.defineProperty(exports, "isObjectWithProperties", ({ enumerable: true, get: function () { return typeGuards_js_1.isObjectWithProperties; } })); +Object.defineProperty(exports, "objectHasProperty", ({ enumerable: true, get: function () { return typeGuards_js_1.objectHasProperty; } })); +/** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * + * @param retryAttempt - The current retry attempt number. + * + * @param config - The exponential retry configuration. + * + * @returns An object containing the calculated retry delay. + */ +function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); } - +/** + * Generates a SHA-256 hash. + * + * @param content - The data to be included in the hash. + * + * @param encoding - The textual encoding to use for the returned hash. + */ +function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); +} +/** + * Generates a SHA-256 HMAC signature. + * + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * + * @param stringToSign - The data to be signed. + * + * @param encoding - The textual encoding to use for the returned HMAC digest. + */ +function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); +} +/** + * Returns a random integer value between a lower and upper bound, inclusive of both bounds. Note that this uses Math.random and isn't secure. If you need to use this for any kind of security purpose, find a better source of random. + * + * @param min - The smallest integer value allowed. + * + * @param max - The largest integer value allowed. + */ +function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); +} +/** + * Typeguard for an error object shape (has name and message) + * + * @param e - Something caught by a catch clause. + */ +function isError(e) { + return tspRuntime.isError(e); +} +/** + * Helper to determine when an input is a generic JS object. + * + * @returns true when input is an object type that is not null, Array, RegExp, or Date. + */ +function isObject(input) { + return tspRuntime.isObject(input); +} +/** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ +function randomUUID() { + return tspRuntime.randomUUID(); +} +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +exports.isBrowser = tspRuntime.isBrowser; +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +exports.isBun = tspRuntime.isBun; +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +exports.isDeno = tspRuntime.isDeno; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + * + * @deprecated + * + * Use `isNodeLike` instead. + */ +exports.isNode = tspRuntime.isNodeLike; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ +exports.isNodeLike = tspRuntime.isNodeLike; +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +exports.isNodeRuntime = tspRuntime.isNodeRuntime; +/** + * A constant that indicates whether the environment the code is running is in React-Native. + */ +exports.isReactNative = tspRuntime.isReactNative; +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +exports.isWebWorker = tspRuntime.isWebWorker; +/** + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string + */ +function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); +} +/** + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array + */ +function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); +} +//# sourceMappingURL=index.js.map /***/ }), -/***/ 79323: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 1187: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isDefined = isDefined; +exports.isObjectWithProperties = isObjectWithProperties; +exports.objectHasProperty = objectHasProperty; +/** + * Helper TypeGuard that checks if something is defined or not. + * @param thing - Anything + */ +function isDefined(thing) { + return typeof thing !== "undefined" && thing !== null; +} +/** + * Helper TypeGuard that checks if the input is an object with the specified properties. + * @param thing - Anything. + * @param properties - The name of the properties that should appear in the object. + */ +function isObjectWithProperties(thing, properties) { + if (!isDefined(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; + } + } + return true; +} +/** + * Helper TypeGuard that checks if the input is an object with the specified property. + * @param thing - Any object. + * @param property - The name of the property that should appear in the object. + */ +function objectHasProperty(thing, property) { + return (isDefined(thing) && typeof thing === "object" && property in thing); +} +//# sourceMappingURL=typeGuards.js.map -const { MockNotMatchedError } = __nccwpck_require__(50888) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(24347) -const { buildURL, nop } = __nccwpck_require__(83983) -const { STATUS_CODES } = __nccwpck_require__(13685) -const { - types: { - isPromise - } -} = __nccwpck_require__(73837) +/***/ }), -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} +/***/ 42118: +/***/ ((__unused_webpack_module, exports) => { -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AbortError = void 0; /** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } } +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} +/***/ }), -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } +/***/ 54812: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) +"use strict"; - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AbortError = void 0; +var AbortError_js_1 = __nccwpck_require__(42118); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +//# sourceMappingURL=index.js.map -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } +/***/ }), - const pathSegments = path.split('?') +/***/ 17309: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (pathSegments.length !== 2) { - return path - } +"use strict"; - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.parseXML = exports.stringifyXML = void 0; +var xml_js_1 = __nccwpck_require__(39170); +Object.defineProperty(exports, "stringifyXML", ({ enumerable: true, get: function () { return xml_js_1.stringifyXML; } })); +Object.defineProperty(exports, "parseXML", ({ enumerable: true, get: function () { return xml_js_1.parseXML; } })); +var xml_common_js_1 = __nccwpck_require__(62060); +Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_ATTRKEY; } })); +Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_CHARKEY; } })); +//# sourceMappingURL=index.js.map -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} +/***/ }), -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} +/***/ 62060: +/***/ ((__unused_webpack_module, exports) => { -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath +"use strict"; - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; +/** + * Default key used to access the XML attributes. + */ +exports.XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +exports.XML_CHARKEY = "_"; +//# sourceMappingURL=xml.common.js.map - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`) - } +/***/ }), - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`) - } +/***/ 39170: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`) - } +"use strict"; - return matchedMockDispatches[0] +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.stringifyXML = stringifyXML; +exports.parseXML = parseXML; +const fast_xml_parser_1 = __nccwpck_require__(74577); +const xml_common_js_1 = __nccwpck_require__(62060); +function getCommonOptions(options) { + var _a; + return { + attributesGroupName: xml_common_js_1.XML_ATTRKEY, + textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, + ignoreAttributes: false, + suppressBooleanAttributes: false, + }; } - -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch +function getSerializerOptions(options = {}) { + var _a, _b; + return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); } - -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false +function getParserOptions(options = {}) { + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); +} +/** + * Converts given JSON object to XML string + * @param obj - JSON object to be converted into XML string + * @param opts - Options that govern the XML building of given JSON object + * `rootName` indicates the name of the root element in the resulting XML + */ +function stringifyXML(obj, opts = {}) { + const parserOptions = getSerializerOptions(opts); + const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); + const node = { [parserOptions.rootNodeName]: obj }; + const xmlData = j2x.build(node); + return `${xmlData}`.replace(/\n/g, ""); +} +/** + * Converts given XML string into JSON + * @param str - String containing the XML content to be parsed into JSON + * @param opts - Options that govern the parsing of given xml string + * `includeRoot` indicates whether the root element is to be included or not in the output + */ +async function parseXML(str, opts = {}) { + if (!str) { + throw new Error("Document is empty"); } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } + const validation = fast_xml_parser_1.XMLValidator.validate(str); + if (validation !== true) { + throw validation; + } + const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); + const parsedXml = parser.parse(str); + // Remove the node. + // This is a change in behavior on fxp v4. Issue #424 + if (parsedXml["?xml"]) { + delete parsedXml["?xml"]; + } + if (!opts.includeRoot) { + for (const key of Object.keys(parsedXml)) { + const value = parsedXml[key]; + return typeof value === "object" ? Object.assign({}, value) : value; + } + } + return parsedXml; } +//# sourceMappingURL=xml.js.map -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} +/***/ }), -function generateKeyValues (data) { - return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ - ...keyValuePairs, - Buffer.from(`${key}`), - Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`) - ], []) -} +/***/ 89497: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureLogger = void 0; +exports.setLogLevel = setLogLevel; +exports.getLogLevel = getLogLevel; +exports.createClientLogger = createClientLogger; +const logger_1 = __nccwpck_require__(46244); +const context = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure", +}); /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode + * The AzureLogger provides a mechanism for overriding where logs are output to. + * By default, logs are sent to stderr. + * Override the `log` method to redirect logs to another location. */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' +exports.AzureLogger = context.logger; +/** + * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. + * @param level - The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +function setLogLevel(level) { + context.setLogLevel(level); } - -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') +/** + * Retrieves the currently specified log level. + */ +function getLogLevel() { + return context.getLogLevel(); } - /** - * Mock dispatch function used to simulate undici dispatches + * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. + * @param namespace - The name of the SDK package. + * @hidden */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) +function createClientLogger(namespace) { + return context.createClientLogger(namespace); +} +//# sourceMappingURL=index.js.map - mockDispatch.timesInvoked++ +/***/ }), - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } +/***/ 1227: +/***/ ((__unused_webpack_module, exports) => { - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch +"use strict"; - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=BatchResponse.js.map - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } +/***/ }), - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } +/***/ 58259: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data +"use strict"; - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BatchResponseParser = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_http_compat_1 = __nccwpck_require__(25083); +const constants_js_1 = __nccwpck_require__(81865); +const BatchUtils_js_1 = __nccwpck_require__(4982); +const log_js_1 = __nccwpck_require__(53282); +const HTTP_HEADER_DELIMITER = ": "; +const SPACE_DELIMITER = " "; +const NOT_FOUND = -1; +/** + * Util class for parsing batch response. + */ +class BatchResponseParser { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; + constructor(batchResponse, subRequests) { + if (!batchResponse || !batchResponse.contentType) { + // In special case(reported), server may return invalid content-type which could not be parsed. + throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); + } + if (!subRequests || subRequests.size === 0) { + // This should be prevent during coding. + throw new RangeError("Invalid state: subRequests is not provided or size is 0."); + } + this.batchResponse = batchResponse; + this.subRequests = subRequests; + this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; + this.batchResponseEnding = `--${this.responseBatchBoundary}--`; } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.abort = nop - handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData(Buffer.from(responseData)) - handler.onComplete(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } - - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response + async parseBatchResponse() { + // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse + // sub request's response. + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { + throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); + } + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); + const subResponses = responseBodyAsText + .split(this.batchResponseEnding)[0] // string after ending is useless + .split(this.perResponsePrefix) + .slice(1); // string before first response boundary is useless + const subResponseCount = subResponses.length; + // Defensive coding in case of potential error parsing. + // Note: subResponseCount == 1 is special case where sub request is invalid. + // We try to prevent such cases through early validation, e.g. validate sub request count >= 1. + // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user. + if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { + throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); + } + const deserializedSubResponses = new Array(subResponseCount); + let subResponsesSucceededCount = 0; + let subResponsesFailedCount = 0; + // Parse sub subResponses. + for (let index = 0; index < subResponseCount; index++) { + const subResponse = subResponses[index]; + const deserializedSubResponse = {}; + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); + let subRespHeaderStartFound = false; + let subRespHeaderEndFound = false; + let subRespFailed = false; + let contentId = NOT_FOUND; + for (const responseLine of responseLines) { + if (!subRespHeaderStartFound) { + // Convention line to indicate content ID + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { + contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); + } + // Http version line with status code indicates the start of sub request's response. + // Example: HTTP/1.1 202 Accepted + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { + subRespHeaderStartFound = true; + const tokens = responseLine.split(SPACE_DELIMITER); + deserializedSubResponse.status = parseInt(tokens[1]); + deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); + } + continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: * + } + if (responseLine.trim() === "") { + // Sub response's header start line already found, and the first empty line indicates header end line found. + if (!subRespHeaderEndFound) { + subRespHeaderEndFound = true; + } + continue; // Skip empty line + } + // Note: when code reach here, it indicates subRespHeaderStartFound == true + if (!subRespHeaderEndFound) { + if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) { + // Defensive coding to prevent from missing valuable lines. + throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); + } + // Parse headers of sub response. + const tokens = responseLine.split(HTTP_HEADER_DELIMITER); + deserializedSubResponse.headers.set(tokens[0], tokens[1]); + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { + deserializedSubResponse.errorCode = tokens[1]; + subRespFailed = true; + } + } + else { + // Assemble body of sub response. + if (!deserializedSubResponse.bodyAsText) { + deserializedSubResponse.bodyAsText = ""; + } + deserializedSubResponse.bodyAsText += responseLine; + } + } // Inner for end + // The response will contain the Content-ID header for each corresponding subrequest response to use for tracking. + // The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it + // to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that + // unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose. + if (contentId !== NOT_FOUND && + Number.isInteger(contentId) && + contentId >= 0 && + contentId < this.subRequests.size && + deserializedSubResponses[contentId] === undefined) { + deserializedSubResponse._request = this.subRequests.get(contentId); + deserializedSubResponses[contentId] = deserializedSubResponse; + } + else { + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + } + if (subRespFailed) { + subResponsesFailedCount++; + } + else { + subResponsesSucceededCount++; + } } - } - } else { - originalDispatch.call(this, opts, handler) + return { + subResponses: deserializedSubResponses, + subResponsesSucceededCount: subResponsesSucceededCount, + subResponsesFailedCount: subResponsesFailedCount, + }; } - } -} - -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} - -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName } - +exports.BatchResponseParser = BatchResponseParser; +//# sourceMappingURL=BatchResponseParser.js.map /***/ }), -/***/ 86823: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 4982: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { Transform } = __nccwpck_require__(12781) -const { Console } = __nccwpck_require__(96206) - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? '✅' : '❌', - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getBodyAsText = getBodyAsText; +exports.utf8ByteLength = utf8ByteLength; +const utils_js_1 = __nccwpck_require__(85157); +const constants_js_1 = __nccwpck_require__(81865); +async function getBodyAsText(batchResponse) { + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + // Slice the buffer to trim the empty ending. + buffer = buffer.slice(0, responseLength); + return buffer.toString(); } - +function utf8ByteLength(str) { + return Buffer.byteLength(str); +} +//# sourceMappingURL=BatchUtils.js.map /***/ }), -/***/ 78891: -/***/ ((module) => { +/***/ 73689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobBatch = void 0; +const core_util_1 = __nccwpck_require__(80637); +const core_auth_1 = __nccwpck_require__(98834); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_2 = __nccwpck_require__(80637); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const Clients_js_1 = __nccwpck_require__(54437); +const Mutex_js_1 = __nccwpck_require__(25300); +const Pipeline_js_1 = __nccwpck_require__(33781); +const utils_common_js_1 = __nccwpck_require__(16673); +const core_xml_1 = __nccwpck_require__(17309); +const constants_js_1 = __nccwpck_require__(81865); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const tracing_js_1 = __nccwpck_require__(53683); +const core_client_1 = __nccwpck_require__(7611); +const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(93846); +/** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + */ +class BlobBatch { + batchRequest; + batch = "batch"; + batchType; + constructor() { + this.batchRequest = new InnerBatchRequest(); + } + /** + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 + */ + getMultiPartContentType() { + return this.batchRequest.getMultipartContentType(); + } + /** + * Get assembled HTTP request body for sub requests. + */ + getHttpRequestBody() { + return this.batchRequest.getHttpRequestBody(); + } + /** + * Get sub requests that are added into the batch request. + */ + getSubRequests() { + return this.batchRequest.getSubRequests(); + } + async addSubRequestInternal(subRequest, assembleSubRequestFunc) { + await Mutex_js_1.Mutex.lock(this.batch); + try { + this.batchRequest.preAddSubRequest(subRequest); + await assembleSubRequestFunc(); + this.batchRequest.postAddSubRequest(subRequest); + } + finally { + await Mutex_js_1.Mutex.unlock(this.batch); + } + } + setBatchType(batchType) { + if (!this.batchType) { + this.batchType = batchType; + } + if (this.batchType !== batchType) { + throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); + } + } + async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { + let url; + let credential; + if (typeof urlOrBlobClient === "string" && + ((core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrOptions; + } + else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + options = credentialOrOptions; + } + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + } + if (!options) { + options = {}; + } + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("delete"); + await this.addSubRequestInternal({ + url: url, + credential: credential, + }, async () => { + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + }); + }); + } + async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { + let url; + let credential; + let tier; + if (typeof urlOrBlobClient === "string" && + ((core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrTier; + tier = tierOrOptions; + } + else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + tier = credentialOrTier; + options = tierOrOptions; + } + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); + } + if (!options) { + options = {}; + } + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("setAccessTier"); + await this.addSubRequestInternal({ + url: url, + credential: credential, + }, async () => { + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); + }); + }); + } } - -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' +exports.BlobBatch = BlobBatch; +/** + * Inner batch request class which is responsible for assembling and serializing sub requests. + * See https://learn.microsoft.com/rest/api/storageservices/blob-batch#request-body for how requests are assembled. + */ +class InnerBatchRequest { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; + constructor() { + this.operationCount = 0; + this.body = ""; + const tempGuid = (0, core_util_1.randomUUID)(); + // batch_{batchid} + this.boundary = `batch_${tempGuid}`; + // --batch_{batchid} + // Content-Type: application/http + // Content-Transfer-Encoding: binary + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + // multipart/mixed; boundary=batch_{batchid} + this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; + // --batch_{batchid}-- + this.batchRequestEnding = `--${this.boundary}--`; + this.subRequests = new Map(); + } + /** + * Create pipeline to assemble sub requests. The idea here is to use existing + * credential and serialization/deserialization components, with additional policies to + * filter unnecessary headers, assemble sub requests into request's body + * and intercept request from going to wire. + * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + createPipeline(credential) { + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + xmlCharKey: "#", + }, + }, + }), { phase: "Serialize" }); + // Use batch header filter policy to exclude unnecessary headers + corePipeline.addPolicy(batchHeaderFilterPolicy()); + // Use batch assemble policy to assemble request and intercept request from going to wire + corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential, + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge }, + }), { phase: "Sign" }); + } + else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ + accountName: credential.accountName, + accountKey: credential.accountKey, + }), { phase: "Sign" }); + } + const pipeline = new Pipeline_js_1.Pipeline([]); + // attach the v2 pipeline to this one + pipeline._credential = credential; + pipeline._corePipeline = corePipeline; + return pipeline; + } + appendSubRequestToBody(request) { + // Start to assemble sub request + this.body += [ + this.subRequestPrefix, // sub request constant prefix + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID + "", // empty line after sub request's content ID + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}`, // sub request start line with method + ].join(constants_js_1.HTTP_LINE_ENDING); + for (const [name, value] of request.headers) { + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; + } + this.body += constants_js_1.HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line + // No body to assemble for current batch request support + // End to assemble sub request + } + preAddSubRequest(subRequest) { + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); + } + // Fast fail if url for sub request is invalid + const path = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path || path === "") { + throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); + } + } + postAddSubRequest(subRequest) { + this.subRequests.set(this.operationCount, subRequest); + this.operationCount++; + } + // Return the http request body with assembling the ending line to the sub request body. + getHttpRequestBody() { + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; + } + getMultipartContentType() { + return this.multipartContentType; + } + getSubRequests() { + return this.subRequests; + } } - -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } - - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } +function batchRequestAssemblePolicy(batchRequest) { + return { + name: "batchRequestAssemblePolicy", + async sendRequest(request) { + batchRequest.appendSubRequestToBody(request); + return { + request, + status: 200, + headers: (0, core_rest_pipeline_1.createHttpHeaders)(), + }; + }, + }; } - +function batchHeaderFilterPolicy() { + return { + name: "batchHeaderFilterPolicy", + async sendRequest(request, next) { + let xMsHeaderName = ""; + for (const [name] of request.headers) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { + xMsHeaderName = name; + } + } + if (xMsHeaderName !== "") { + request.headers.delete(xMsHeaderName); // The subrequests should not have the x-ms-version header. + } + return next(request); + }, + }; +} +//# sourceMappingURL=BlobBatch.js.map /***/ }), -/***/ 68266: -/***/ ((module) => { +/***/ 71861: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -/* eslint-disable */ - - - -// Extracted from node/lib/internal/fixed_queue.js - -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; - -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. - -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } - - isEmpty() { - return this.head.isEmpty(); - } - - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobBatchClient = void 0; +const BatchResponseParser_js_1 = __nccwpck_require__(58259); +const BatchUtils_js_1 = __nccwpck_require__(4982); +const BlobBatch_js_1 = __nccwpck_require__(73689); +const tracing_js_1 = __nccwpck_require__(53683); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const StorageContextClient_js_1 = __nccwpck_require__(50557); +const Pipeline_js_1 = __nccwpck_require__(33781); +const utils_common_js_1 = __nccwpck_require__(16673); +/** + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + */ +class BlobBatchClient { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + let pipeline; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { + pipeline = credentialOrPipeline; + } + else if (!credentialOrPipeline) { + // no credential provided + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); + } + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path = (0, utils_common_js_1.getURLPath)(url); + if (path && path !== "/") { + // Container scoped. + this.serviceOrContainerContext = storageClientContext.container; + } + else { + this.serviceOrContainerContext = storageClientContext.service; + } } - this.head.push(data); - } - - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; + /** + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. + */ + createBatch() { + return new BlobBatch_js_1.BlobBatch(); + } + async deleteBlobs(urlsOrBlobClients, credentialOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + const batch = new BlobBatch_js_1.BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) { + if (typeof urlOrBlobClient === "string") { + await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); + } + else { + await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); + } + } + return this.submitBatch(batch); + } + async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + const batch = new BlobBatch_js_1.BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) { + if (typeof urlOrBlobClient === "string") { + await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); + } + else { + await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); + } + } + return this.submitBatch(batch); } - return next; - } -}; - + /** + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @param batchRequest - A set of Delete or SetTier operations. + * @param options - + */ + async submitBatch(batchRequest, options = {}) { + if (!batchRequest || batchRequest.getSubRequests().size === 0) { + throw new RangeError("Batch request should contain one or more sub requests."); + } + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + const batchRequestBody = batchRequest.getHttpRequestBody(); + // ServiceSubmitBatchResponseModel and ContainerSubmitBatchResponse are compatible for now. + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions, + })); + // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202). + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const responseSummary = await batchResponseParser.parseBatchResponse(); + const res = { + _response: rawBatchResponse._response, + contentType: rawBatchResponse.contentType, + errorCode: rawBatchResponse.errorCode, + requestId: rawBatchResponse.requestId, + clientRequestId: rawBatchResponse.clientRequestId, + version: rawBatchResponse.version, + subResponses: responseSummary.subResponses, + subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, + subResponsesFailedCount: responseSummary.subResponsesFailedCount, + }; + return res; + }); + } +} +exports.BlobBatchClient = BlobBatchClient; +//# sourceMappingURL=BlobBatchClient.js.map /***/ }), -/***/ 73198: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 88710: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const DispatcherBase = __nccwpck_require__(74839) -const FixedQueue = __nccwpck_require__(68266) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(72785) -const PoolStats = __nccwpck_require__(39689) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor () { - super() - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobDownloadResponse = void 0; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const core_util_1 = __nccwpck_require__(80637); +const RetriableReadableStream_js_1 = __nccwpck_require__(88251); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will + * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot + * trigger retries defined in pipeline retry policy.) + * + * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js + * Readable stream. + */ +class BlobDownloadResponse { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + */ + get acceptRanges() { + return this.originalResponse.acceptRanges; } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + */ + get cacheControl() { + return this.originalResponse.cacheControl; } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + */ + get contentDisposition() { + return this.originalResponse.contentDisposition; } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + */ + get contentEncoding() { + return this.originalResponse.contentEncoding; } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + */ + get contentLanguage() { + return this.originalResponse.contentLanguage; } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + */ + get blobSequenceNumber() { + return this.originalResponse.blobSequenceNumber; } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + */ + get blobType() { + return this.originalResponse.blobType; } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - return Promise.all(this[kClients].map(c => c.close())) - } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve - }) + /** + * The number of bytes present in the + * response body. + * + * @readonly + */ + get contentLength() { + return this.originalResponse.contentLength; } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + */ + get contentMD5() { + return this.originalResponse.contentMD5; } - - return Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + */ + get contentRange() { + return this.originalResponse.contentRange; } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - process.nextTick(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) - } - }) + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + */ + get contentType() { + return this.originalResponse.contentType; + } + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + */ + get copyCompletedOn() { + return this.originalResponse.copyCompletedOn; + } + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + */ + get copyId() { + return this.originalResponse.copyId; + } + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + */ + get copyProgress() { + return this.originalResponse.copyProgress; + } + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + */ + get copySource() { + return this.originalResponse.copySource; + } + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + */ + get copyStatus() { + return this.originalResponse.copyStatus; + } + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + */ + get copyStatusDescription() { + return this.originalResponse.copyStatusDescription; + } + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + */ + get leaseDuration() { + return this.originalResponse.leaseDuration; + } + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + */ + get leaseState() { + return this.originalResponse.leaseState; + } + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + */ + get leaseStatus() { + return this.originalResponse.leaseStatus; + } + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + */ + get date() { + return this.originalResponse.date; + } + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + */ + get blobCommittedBlockCount() { + return this.originalResponse.blobCommittedBlockCount; + } + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + */ + get etag() { + return this.originalResponse.etag; + } + /** + * The number of tags associated with the blob + * + * @readonly + */ + get tagCount() { + return this.originalResponse.tagCount; + } + /** + * The error code. + * + * @readonly + */ + get errorCode() { + return this.originalResponse.errorCode; + } + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + */ + get isServerEncrypted() { + return this.originalResponse.isServerEncrypted; + } + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + */ + get blobContentMD5() { + return this.originalResponse.blobContentMD5; + } + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + */ + get lastModified() { + return this.originalResponse.lastModified; + } + /** + * Returns the UTC date and time generated by the service that indicates the time at which the blob was + * last read or written to. + * + * @readonly + */ + get lastAccessed() { + return this.originalResponse.lastAccessed; + } + /** + * Returns the date and time the blob was created. + * + * @readonly + */ + get createdOn() { + return this.originalResponse.createdOn; } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 39689: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(72785) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 4634: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(73198) -const Client = __nccwpck_require__(33598) -const { - InvalidArgumentError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { kUrl, kInterceptors } = __nccwpck_require__(72785) -const buildConnector = __nccwpck_require__(82067) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - super() - - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + */ + get metadata() { + return this.originalResponse.metadata; } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + */ + get requestId() { + return this.originalResponse.requestId; } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + */ + get clientRequestId() { + return this.originalResponse.clientRequestId; } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) + /** + * Indicates the version of the Blob service used + * to execute the request. + * + * @readonly + */ + get version() { + return this.originalResponse.version; } - - this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - } - - [kGetDispatcher] () { - let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) - - if (dispatcher) { - return dispatcher + /** + * Indicates the versionId of the downloaded blob version. + * + * @readonly + */ + get versionId() { + return this.originalResponse.versionId; } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) + /** + * Indicates whether version of this blob is a current version. + * + * @readonly + */ + get isCurrentVersion() { + return this.originalResponse.isCurrentVersion; } - - return dispatcher - } -} - -module.exports = Pool - - -/***/ }), - -/***/ 97858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(72785) -const { URL } = __nccwpck_require__(57310) -const Agent = __nccwpck_require__(7890) -const Pool = __nccwpck_require__(4634) -const DispatcherBase = __nccwpck_require__(74839) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(48045) -const buildConnector = __nccwpck_require__(82067) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} - -function buildProxyOptions (opts) { - if (typeof opts === 'string') { - opts = { uri: opts } - } - - if (!opts || !opts.uri) { - throw new InvalidArgumentError('Proxy opts.uri is mandatory') - } - - return { - uri: opts.uri, - protocol: opts.protocol || 'https' - } -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super(opts) - this[kProxy] = buildProxyOptions(opts) - this[kAgent] = new Agent(opts) - this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] - - if (typeof opts === 'string') { - opts = { uri: opts } + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + */ + get encryptionKeySha256() { + return this.originalResponse.encryptionKeySha256; } - - if (!opts || !opts.uri) { - throw new InvalidArgumentError('Proxy opts.uri is mandatory') + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + get contentCrc64() { + return this.originalResponse.contentCrc64; } - - const { clientFactory = defaultFactory } = opts - - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') + /** + * Object Replication Policy Id of the destination blob. + * + * @readonly + */ + get objectReplicationDestinationPolicyId() { + return this.originalResponse.objectReplicationDestinationPolicyId; } - - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - - const resolvedUrl = new URL(opts.uri) - const { origin, port, host, username, password } = resolvedUrl - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @readonly + */ + get objectReplicationSourceProperties() { + return this.originalResponse.objectReplicationSourceProperties; } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - this[kClient] = clientFactory(resolvedUrl, { connect }) - this[kAgent] = new Agent({ - ...opts, - connect: async (opts, callback) => { - let requestedHost = opts.host - if (!opts.port) { - requestedHost += `:${defaultProtocolPort(opts.protocol)}` - } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedHost, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host - } - }) - if (statusCode !== 200) { - socket.on('error', () => {}).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - callback(err) - } - } - }) - } - - dispatch (opts, handler) { - const { host } = new URL(opts.origin) - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - return this[kAgent].dispatch( - { - ...opts, - headers: { - ...headers, - host - } - }, - handler - ) - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] + /** + * If this blob has been sealed. + * + * @readonly + */ + get isSealed() { + return this.originalResponse.isSealed; } - - return headersPair - } - - return headers -} - -/** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons - */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 29459: -/***/ ((module) => { - -"use strict"; - - -let fastNow = Date.now() -let fastNowTimeout - -const fastTimers = [] - -function onTimeout () { - fastNow = Date.now() - - let len = fastTimers.length - let idx = 0 - while (idx < len) { - const timer = fastTimers[idx] - - if (timer.state === 0) { - timer.state = fastNow + timer.delay - } else if (timer.state > 0 && fastNow >= timer.state) { - timer.state = -1 - timer.callback(timer.opaque) + /** + * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. + * + * @readonly + */ + get immutabilityPolicyExpiresOn() { + return this.originalResponse.immutabilityPolicyExpiresOn; } - - if (timer.state === -1) { - timer.state = -2 - if (idx !== len - 1) { - fastTimers[idx] = fastTimers.pop() - } else { - fastTimers.pop() - } - len -= 1 - } else { - idx += 1 + /** + * Indicates immutability policy mode. + * + * @readonly + */ + get immutabilityPolicyMode() { + return this.originalResponse.immutabilityPolicyMode; + } + /** + * Indicates if a legal hold is present on the blob. + * + * @readonly + */ + get legalHold() { + return this.originalResponse.legalHold; + } + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + */ + get contentAsBlob() { + return this.originalResponse.blobBody; } - } - - if (fastTimers.length > 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - if (fastNowTimeout && fastNowTimeout.refresh) { - fastNowTimeout.refresh() - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTimeout, 1e3) - if (fastNowTimeout.unref) { - fastNowTimeout.unref() + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will automatically retry when internal read stream unexpected ends. + * + * @readonly + */ + get readableStreamBody() { + return core_util_1.isNodeLike ? this.blobDownloadStream : undefined; } - } -} - -class Timeout { - constructor (callback, delay, opaque) { - this.callback = callback - this.delay = delay - this.opaque = opaque - - // -2 not in timer list - // -1 in timer list but inactive - // 0 in timer list waiting for time - // > 0 in timer list waiting for time to expire - this.state = -2 - - this.refresh() - } - - refresh () { - if (this.state === -2) { - fastTimers.push(this) - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } + /** + * The HTTP response. + */ + get _response() { + return this.originalResponse._response; } - - this.state = 0 - } - - clear () { - this.state = -1 - } -} - -module.exports = { - setTimeout (callback, delay, opaque) { - return delay < 1e3 - ? setTimeout(callback, delay, opaque) - : new Timeout(callback, delay, opaque) - }, - clearTimeout (timeout) { - if (timeout instanceof Timeout) { - timeout.clear() - } else { - clearTimeout(timeout) + originalResponse; + blobDownloadStream; + /** + * Creates an instance of BlobDownloadResponse. + * + * @param originalResponse - + * @param getter - + * @param offset - + * @param count - + * @param options - + */ + constructor(originalResponse, getter, offset, count, options = {}) { + this.originalResponse = originalResponse; + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); } - } } - +exports.BlobDownloadResponse = BlobDownloadResponse; +//# sourceMappingURL=BlobDownloadResponse.js.map /***/ }), -/***/ 35354: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 20106: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const diagnosticsChannel = __nccwpck_require__(67643) -const { uid, states } = __nccwpck_require__(19188) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose -} = __nccwpck_require__(37578) -const { fireEvent, failWebsocketConnection } = __nccwpck_require__(25515) -const { CloseEvent } = __nccwpck_require__(52611) -const { makeRequest } = __nccwpck_require__(48359) -const { fetching } = __nccwpck_require__(74881) -const { Headers } = __nccwpck_require__(10554) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { kHeadersList } = __nccwpck_require__(72785) - -const channels = {} -channels.open = diagnosticsChannel.channel('undici:websocket:open') -channels.close = diagnosticsChannel.channel('undici:websocket:close') -channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(6113) -} catch { - -} - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobLeaseClient = void 0; +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); +const tracing_js_1 = __nccwpck_require__(53683); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any) => void} onEstablish - * @param {Partial} options + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. */ -function establishWebSocketConnection (url, protocols, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = new Headers(options.headers)[kHeadersList] - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - // TODO: enable once permessage-deflate is supported - const permessageDeflate = '' // 'permessage-deflate; 15' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - // request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher ?? getGlobalDispatcher(), - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - - if (secExtension !== null && secExtension !== permessageDeflate) { - failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') - return - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response) +class BlobLeaseClient { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; + /** + * Gets the lease Id. + * + * @readonly + */ + get leaseId() { + return this._leaseId; + } + /** + * Gets the url. + * + * @readonly + */ + get url() { + return this._url; + } + /** + * Creates an instance of BlobLeaseClient. + * @param client - The client to make the lease operation requests. + * @param leaseId - Initial proposed lease id. + */ + constructor(client, leaseId) { + const clientContext = client.storageClientContext; + this._url = client.url; + if (client.name === undefined) { + this._isContainer = true; + this._containerOrBlobOperation = clientContext.container; + } + else { + this._isContainer = false; + this._containerOrBlobOperation = clientContext.blob; + } + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); + } + this._leaseId = leaseId; + } + /** + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param duration - Must be between 15 to 60 seconds, or infinite (-1) + * @param options - option to configure lease management operations. + * @returns Response data for acquire lease operation. + */ + async acquireLease(duration, options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ + abortSignal: options.abortSignal, + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + proposedLeaseId: this._leaseId, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * To change the ID of the lease. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param proposedLeaseId - the proposed new lease Id. + * @param options - option to configure lease management operations. + * @returns Response data for change lease operation. + */ + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + this._leaseId = proposedLeaseId; + return response; + }); + } + /** + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param options - option to configure lease management operations. + * @returns Response data for release lease operation. + */ + async releaseLease(options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * To renew the lease. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param options - Optional option to configure lease management operations. + * @returns Response data for renew lease operation. + */ + async renewLease(options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { + return this._containerOrBlobOperation.renewLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + }); + }); + } + /** + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param breakPeriod - Break period + * @param options - Optional options to configure lease management operations. + * @returns Response data for break lease operation. + */ + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); + } + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { + const operationOptions = { + abortSignal: options.abortSignal, + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + }; + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); + }); } - }) - - return controller -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kSentClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - fireEvent('close', ws, CloseEvent, { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection -} - - -/***/ }), - -/***/ 19188: -/***/ ((module) => { - -"use strict"; - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -module.exports = { - uid, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer } - +exports.BlobLeaseClient = BlobLeaseClient; +//# sourceMappingURL=BlobLeaseClient.js.map /***/ }), -/***/ 52611: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 83751: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { webidl } = __nccwpck_require__(21744) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { MessagePort } = __nccwpck_require__(71267) - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobQueryResponse = void 0; +const core_util_1 = __nccwpck_require__(80637); +const BlobQuickQueryStream_js_1 = __nccwpck_require__(59028); /** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will + * parse avro data returned by blob query. */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.MessageEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) +class BlobQueryResponse { + /** + * Indicates that the service supports + * requests for partial file content. + * + * @readonly + */ + get acceptRanges() { + return this.originalResponse.acceptRanges; + } + /** + * Returns if it was previously specified + * for the file. + * + * @readonly + */ + get cacheControl() { + return this.originalResponse.cacheControl; + } + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + */ + get contentDisposition() { + return this.originalResponse.contentDisposition; + } + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + */ + get contentEncoding() { + return this.originalResponse.contentEncoding; + } + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + */ + get contentLanguage() { + return this.originalResponse.contentLanguage; + } + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + */ + get blobSequenceNumber() { + return this.originalResponse.blobSequenceNumber; + } + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + */ + get blobType() { + return this.originalResponse.blobType; + } + /** + * The number of bytes present in the + * response body. + * + * @readonly + */ + get contentLength() { + return this.originalResponse.contentLength; + } + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + */ + get contentMD5() { + return this.originalResponse.contentMD5; + } + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + */ + get contentRange() { + return this.originalResponse.contentRange; + } + /** + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly + */ + get contentType() { + return this.originalResponse.contentType; + } + /** + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly + */ + get copyCompletedOn() { + return undefined; + } + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + */ + get copyId() { + return this.originalResponse.copyId; + } + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + */ + get copyProgress() { + return this.originalResponse.copyProgress; + } + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + */ + get copySource() { + return this.originalResponse.copySource; + } + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + */ + get copyStatus() { + return this.originalResponse.copyStatus; + } + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + */ + get copyStatusDescription() { + return this.originalResponse.copyStatusDescription; + } + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + */ + get leaseDuration() { + return this.originalResponse.leaseDuration; + } + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + */ + get leaseState() { + return this.originalResponse.leaseState; + } + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + */ + get leaseStatus() { + return this.originalResponse.leaseStatus; + } + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + */ + get date() { + return this.originalResponse.date; + } + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + */ + get blobCommittedBlockCount() { + return this.originalResponse.blobCommittedBlockCount; + } + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + */ + get etag() { + return this.originalResponse.etag; + } + /** + * The error code. + * + * @readonly + */ + get errorCode() { + return this.originalResponse.errorCode; + } + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + */ + get isServerEncrypted() { + return this.originalResponse.isServerEncrypted; + } + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + */ + get blobContentMD5() { + return this.originalResponse.blobContentMD5; + } + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + */ + get lastModified() { + return this.originalResponse.lastModified; + } + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + */ + get metadata() { + return this.originalResponse.metadata; + } + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + */ + get requestId() { + return this.originalResponse.requestId; + } + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + */ + get clientRequestId() { + return this.originalResponse.clientRequestId; + } + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + */ + get version() { + return this.originalResponse.version; + } + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + */ + get encryptionKeySha256() { + return this.originalResponse.encryptionKeySha256; + } + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + get contentCrc64() { + return this.originalResponse.contentCrc64; + } + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + */ + get blobBody() { + return undefined; + } + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will parse avor data returned by blob query. + * + * @readonly + */ + get readableStreamBody() { + return core_util_1.isNodeLike ? this.blobDownloadStream : undefined; + } + /** + * The HTTP response. + */ + get _response() { + return this.originalResponse._response; + } + originalResponse; + blobDownloadStream; + /** + * Creates an instance of BlobQueryResponse. + * + * @param originalResponse - + * @param options - + */ + constructor(originalResponse, options = {}) { + this.originalResponse = originalResponse; + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' }) - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } -} - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) - - super(type, eventInitDict) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } } +exports.BlobQueryResponse = BlobQueryResponse; +//# sourceMappingURL=BlobQueryResponse.js.map -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) +/***/ }), -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) +/***/ 12679: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: false - } -] +"use strict"; -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - get defaultValue () { - return [] +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobServiceClient = void 0; +const core_auth_1 = __nccwpck_require__(98834); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const Pipeline_js_1 = __nccwpck_require__(33781); +const ContainerClient_js_1 = __nccwpck_require__(63750); +const utils_common_js_1 = __nccwpck_require__(16673); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const utils_common_js_2 = __nccwpck_require__(16673); +const tracing_js_1 = __nccwpck_require__(53683); +const BlobBatchClient_js_1 = __nccwpck_require__(71861); +const StorageClient_js_1 = __nccwpck_require__(39484); +const AccountSASPermissions_js_1 = __nccwpck_require__(70793); +const AccountSASSignatureValues_js_1 = __nccwpck_require__(72763); +const AccountSASServices_js_1 = __nccwpck_require__(34606); +/** + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. + */ +class BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param options - Optional. Options to configure the HTTP pipeline. + */ + static fromConnectionString(connectionString, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + options = options || {}; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + return new BlobServiceClient(extractedCreds.url, pipeline); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + constructor(url, credentialOrPipeline, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + let pipeline; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { + pipeline = credentialOrPipeline; + } + else if ((core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); + } + else { + // The second parameter is undefined. Use anonymous credential + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + super(url, pipeline); + this.serviceContext = this.storageClientContext.service; + } + /** + * Creates a {@link ContainerClient} object + * + * @param containerName - A container name + * @returns A new ContainerClient object for the given container name. + * + * Example usage: + * + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + getContainerClient(containerName) { + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); + } + /** + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container + * + * @param containerName - Name of the container to create. + * @param options - Options to configure Container Create operation. + * @returns Container creation response and the corresponding container client. + */ + async createContainer(containerName, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(containerName); + const containerCreateResponse = await containerClient.create(updatedOptions); + return { + containerClient, + containerCreateResponse, + }; + }); + } + /** + * Deletes a Blob container. + * + * @param containerName - Name of the container to delete. + * @param options - Options to configure Container Delete operation. + * @returns Container deletion response. + */ + async deleteContainer(containerName, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(containerName); + return containerClient.delete(updatedOptions); + }); + } + /** + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param deletedContainerName - Name of the previously deleted container. + * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. + * @param options - Options to configure Container Restore operation. + * @returns Container deletion response. + */ + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); + // Hack to access a protected member. + const containerContext = containerClient["storageClientContext"].container; + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, + tracingOptions: updatedOptions.tracingOptions, + })); + return { containerClient, containerUndeleteResponse }; + }); + } + /** + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties + * + * @param options - Options to the Service Get Properties operation. + * @returns Response data for the Service Get Properties operation. + */ + async getProperties(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties + * + * @param properties - + * @param options - Options to the Service Set Properties operation. + * @returns Response data for the Service Set Properties operation. + */ + async setProperties(properties, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats + * + * @param options - Options to the Service Get Statistics operation. + * @returns Response data for the Service Get Statistics operation. + */ + async getStatistics(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Returns a list of the containers under the specified account. + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to the Service List Container Segment operation. + * @returns Response data for the Service List Container Segment operation. + */ + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: response._response, // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }), + }; + return wrappedResponse; + }); + } + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === undefined) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } + } + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } + } + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties + * + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Use iter.next() to iterate the blobs + * i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Use paging with a marker + * i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + // AsyncIterableIterator to iterate over blobs + const listSegmentOptions = { + ...options, + }; + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions, + }); + }, + }; + } + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list containers operation. + */ + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === undefined) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = + listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); + } + } + /** + * Returns an AsyncIterableIterator for Container Items + * + * @param options - Options to list containers operation. + */ + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; + } + } + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * + * // Use iter.next() to iterate the containers + * i = 1; + * const iter = blobServiceClient.listContainers(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Use paging with a marker + * i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param options - Options to list containers. + * @returns An asyncIterableIterator that supports paging. + */ + listContainers(options = {}) { + if (options.prefix === "") { + options.prefix = undefined; + } + const include = []; + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSystem) { + include.push("system"); + } + // AsyncIterableIterator to iterate over containers + const listSegmentOptions = { + ...options, + ...(include.length > 0 ? { include } : {}), + }; + const iter = this.listItems(listSegmentOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions, + }); + }, + }; + } + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key + * + * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time + * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time + */ + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false), + }, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + const userDelegationKey = { + signedObjectId: response.signedObjectId, + signedTenantId: response.signedTenantId, + signedStartsOn: new Date(response.signedStartsOn), + signedExpiresOn: new Date(response.signedExpiresOn), + signedService: response.signedService, + signedVersion: response.signedVersion, + value: response.value, + }; + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey, + }; + return res; + }); + } + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this service. + */ + getBlobBatchClient() { + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); + } + /** + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + } + if (expiresOn === undefined) { + const now = new Date(); + expiresOn = new Date(now.getTime() + 3600 * 1000); + } + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ + permissions, + expiresOn, + resourceTypes, + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options, + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); + } + /** + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + } + if (expiresOn === undefined) { + const now = new Date(); + expiresOn = new Date(now.getTime() + 3600 * 1000); + } + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ + permissions, + expiresOn, + resourceTypes, + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options, + }, this.credential).stringToSign; } - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent } - +exports.BlobServiceClient = BlobServiceClient; +//# sourceMappingURL=BlobServiceClient.js.map /***/ }), -/***/ 25444: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 54437: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { maxUnsigned16Bit } = __nccwpck_require__(19188) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(6113) -} catch { - -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - this.maskKey = crypto.randomBytes(4) - } - - createFrame (opcode) { - const bodyLength = this.frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PageBlobClient = exports.BlockBlobClient = exports.AppendBlobClient = exports.BlobClient = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_auth_1 = __nccwpck_require__(98834); +const core_util_1 = __nccwpck_require__(80637); +const core_util_2 = __nccwpck_require__(80637); +const BlobDownloadResponse_js_1 = __nccwpck_require__(88710); +const BlobQueryResponse_js_1 = __nccwpck_require__(83751); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const models_js_1 = __nccwpck_require__(64526); +const PageBlobRangeResponse_js_1 = __nccwpck_require__(12526); +const Pipeline_js_1 = __nccwpck_require__(33781); +const BlobStartCopyFromUrlPoller_js_1 = __nccwpck_require__(9846); +const Range_js_1 = __nccwpck_require__(84573); +const StorageClient_js_1 = __nccwpck_require__(39484); +const Batch_js_1 = __nccwpck_require__(93996); +const storage_common_1 = __nccwpck_require__(83667); +const constants_js_1 = __nccwpck_require__(81865); +const tracing_js_1 = __nccwpck_require__(53683); +const utils_common_js_1 = __nccwpck_require__(16673); +const utils_js_1 = __nccwpck_require__(85157); +const BlobSASSignatureValues_js_1 = __nccwpck_require__(48921); +const BlobLeaseClient_js_1 = __nccwpck_require__(20106); +/** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + */ +class BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; + /** + * The name of the blob. + */ + get name() { + return this._name; + } + /** + * The name of the storage container the blob is associated with. + */ + get containerName() { + return this._containerName; + } + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + options = options || {}; + let pipeline; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { + options = blobNameOrOptions; + } + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + super(url, pipeline); + ({ blobName: this._name, containerName: this._containerName } = + this.getBlobAndContainerNamesFromUrl()); + this.blobContext = this.storageClientContext.blob; + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); + } + /** + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp + */ + withSnapshot(snapshot) { + return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + } + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param versionId - The versionId. + * @returns A new BlobClient object pointing to the version of this blob. + */ + withVersion(versionId) { + return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline); + } + /** + * Creates a AppendBlobClient object. + * + */ + getAppendBlobClient() { + return new AppendBlobClient(this.url, this.pipeline); + } + /** + * Creates a BlockBlobClient object. + * + */ + getBlockBlobClient() { + return new BlockBlobClient(this.url, this.pipeline); + } + /** + * Creates a PageBlobClient object. + * + */ + getPageBlobClient() { + return new PageBlobClient(this.url, this.pipeline); + } + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob + * + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Optional options to Blob Download operation. + * + * + * Example usage (Node.js): + * + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); + * } + * ``` + * + * Example usage (browser): + * + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * ``` + */ + async download(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onDownloadProgress: core_util_1.isNodeLike ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream + }, + range: offset === 0 && !count ? undefined : (0, Range_js_1.rangeToString)({ offset, count }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedRes = { + ...res, + _response: res._response, // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules), + }; + // Return browser response immediately + if (!core_util_1.isNodeLike) { + return wrappedRes; + } + // We support retrying when download stream unexpected ends in Node.js runtime + // Following code shouldn't be bundled into browser build, however some + // bundlers may try to bundle following code and "FileReadResponse.ts". + // In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts" + // The config is in package.json "browser" field + if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) { + // TODO: Default value or make it a required parameter? + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + } + if (res.contentLength === undefined) { + throw new RangeError(`File download response doesn't contain valid content length header`); + } + if (!res.etag) { + throw new RangeError(`File download response doesn't contain valid etag header`); + } + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { + const updatedDownloadOptions = { + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ifMatch: options.conditions.ifMatch || res.etag, + ifModifiedSince: options.conditions.ifModifiedSince, + ifNoneMatch: options.conditions.ifNoneMatch, + ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ + count: offset + res.contentLength - start, + offset: start, + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + }; + // Debug purpose only + // console.log( + // `Read from internal stream, range: ${ + // updatedOptions.range + // }, options: ${JSON.stringify(updatedOptions)}` + // ); + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions, + })).readableStreamBody; + }, offset, res.contentLength, { + maxRetryRequests: options.maxRetryRequests, + onProgress: options.onProgress, + }); + }); + } + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param options - options to Exists operation. + */ + async exists(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + try { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + await this.getProperties({ + abortSignal: options.abortSignal, + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + }); + return true; + } + catch (e) { + if (e.statusCode === 404) { + // Expected exception when checking blob existence + return false; + } + else if (e.statusCode === 409 && + (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || + e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { + // Expected exception when checking blob existence + return true; + } + throw e; + } + }); } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = this.maskKey[0] - buffer[offset - 3] = this.maskKey[1] - buffer[offset - 2] = this.maskKey[2] - buffer[offset - 1] = this.maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Optional options to Get Properties operation. + */ + async getProperties(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + })); + return { + ...res, + _response: res._response, // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules), + }; + }); } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; i++) { - buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob + * + * @param options - Optional options to Blob Delete operation. + */ + async delete(options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ + abortSignal: options.abortSignal, + deleteSnapshots: options.deleteSnapshots, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 11688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Writable } = __nccwpck_require__(12781) -const diagnosticsChannel = __nccwpck_require__(67643) -const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(19188) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(37578) -const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(25515) -const { WebsocketFrameSend } = __nccwpck_require__(25444) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -const channels = {} -channels.ping = diagnosticsChannel.channel('undici:websocket:ping') -channels.pong = diagnosticsChannel.channel('undici:websocket:pong') - -class ByteParser extends Writable { - #buffers = [] - #byteOffset = 0 - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - constructor (ws) { - super() - - this.ws = ws - } - - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - - this.run(callback) - } - - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (true) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.fin = (buffer[0] & 0x80) !== 0 - this.#info.opcode = buffer[0] & 0x0F - - // If we receive a fragmented message, we use the type of the first - // frame to parse the full message as binary/text, when it's terminated - this.#info.originalOpcode ??= this.#info.opcode - - this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION - - if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return - } - - const payloadLength = buffer[1] & 0x7F - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (this.#info.fragmented && payloadLength > 125) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } else if ( - (this.#info.opcode === opcodes.PING || - this.#info.opcode === opcodes.PONG || - this.#info.opcode === opcodes.CLOSE) && - payloadLength > 125 - ) { - // Control frames can have a payload length of 125 bytes MAX - failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') - return - } else if (this.#info.opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return - } - - const body = this.consume(payloadLength) - - this.#info.closeInfo = this.parseCloseBody(false, body) - - if (!this.ws[kSentClose]) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - const body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = true + /** + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob + * + * @param options - Optional options to Blob Delete operation. + */ + async deleteIfExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { + try { + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - this.end() - - return - } else if (this.#info.opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - const body = this.consume(payloadLength) - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) + throw e; } - } - - this.#state = parserStates.INFO - - if (this.#byteOffset > 0) { - continue - } else { - callback() - return - } - } else if (this.#info.opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - const body = this.consume(payloadLength) - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - - if (this.#byteOffset > 0) { - continue - } else { - callback() - return - } + }); + } + /** + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob + * + * @param options - Optional options to Blob Undelete operation. + */ + async undelete(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets system properties on the blob. + * + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param blobHTTPHeaders - If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * A common header to set is `blobContentType` + * enabling the browser to provide functionality + * based on file type. + * @param options - Optional options to Blob Set HTTP Headers operation. + */ + async setHTTPHeaders(blobHTTPHeaders, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ + abortSignal: options.abortSignal, + blobHttpHeaders: blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. + * + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata + * + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Optional options to Set Metadata operation. + */ + async setMetadata(metadata, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param tags - + * @param options - + */ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + tags: (0, utils_common_js_1.toBlobTags)(tags), + })); + }); + } + /** + * Gets the tags associated with the underlying blob. + * + * @param options - + */ + async getTags(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: response._response, // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {}, + }; + return wrappedResponse; + }); + } + /** + * Get a {@link BlobLeaseClient} that manages leases on the blob. + * + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the blob. + */ + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); + } + /** + * Creates a read-only snapshot of a blob. + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob + * + * @param options - Optional options to the Blob Create Snapshot operation. + */ + async createSnapshot(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob + * + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); + * } + * const manualResult = manualCopyPoller.getResult(); + * + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * }, + * }); + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); + * + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress + * }); + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); + * + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); + * // cancel operation after starting it. + * try { + * await cancelCopyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); + * } + * } + * ``` + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. + */ + async beginCopyFromURL(copySource, options = {}) { + const client = { + abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), + getProperties: (...args) => this.getProperties(...args), + startCopyFromURL: (...args) => this.startCopyFromURL(...args), + }; + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ + blobClient: client, + copySource, + intervalInMs: options.intervalInMs, + onProgress: options.onProgress, + resumeFrom: options.resumeFrom, + startCopyFromURLOptions: options, + }); + // Trigger the startCopyFromURL call by calling poll. + // Any errors from this method should be surfaced to the user. + await poller.poll(); + return poller; + } + /** + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob + * + * @param copyId - Id of the Copy From URL operation. + * @param options - Optional options to the Blob Abort Copy From URL operation. + */ + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url + * + * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param options - + */ + async syncCopyFromURL(copySource, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { + abortSignal: options.abortSignal, + metadata: options.metadata, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + }, + sourceContentMD5: options.sourceContentMD5, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + encryptionScope: options.encryptionScope, + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier + * + * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param options - Optional options to the Blob Set Tier operation. + */ + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + rehydratePriority: options.rehydratePriority, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + async downloadToBuffer(param1, param2, param3, param4 = {}) { + let buffer; + let offset = 0; + let count = 0; + let options = param4; + if (param1 instanceof Buffer) { + buffer = param1; + offset = param2 || 0; + count = typeof param3 === "number" ? param3 : 0; } - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() + else { + offset = typeof param1 === "number" ? param1 : 0; + count = typeof param2 === "number" ? param2 : 0; + options = param3 || {}; } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() + let blockSize = options.blockSize ?? 0; + if (blockSize < 0) { + throw new RangeError("blockSize option must be >= 0"); } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - - // 2^31 is the maxinimum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return + if (blockSize === 0) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; } - - const lower = buffer.readUInt32BE(4) - - this.#info.payloadLength = (upper << 8) + lower - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - // If there is still more data in this chunk that needs to be read - return callback() - } else if (this.#byteOffset >= this.#info.payloadLength) { - // If the server sent multiple frames in a single chunk - - const body = this.consume(this.#info.payloadLength) - - this.#fragments.push(body) - - // If the frame is unfragmented, or a fragmented frame was terminated, - // a message was received - if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) { - const fullMessage = Buffer.concat(this.#fragments) - - websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage) - - this.#info = {} - this.#fragments.length = 0 - } - - this.#state = parserStates.INFO + if (offset < 0) { + throw new RangeError("offset option must be >= 0"); } - } - - if (this.#byteOffset > 0) { - continue - } else { - callback() - break - } + if (count && count <= 0) { + throw new RangeError("count option must be greater than 0"); + } + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + // Customer doesn't specify length, get it + if (!count) { + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions, + }); + count = response.contentLength - offset; + if (count < 0) { + throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); + } + } + // Allocate the buffer of size = count if the buffer is not provided + if (!buffer) { + try { + buffer = Buffer.alloc(count); + } + catch (error) { + throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`); + } + } + if (buffer.length < count) { + throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); + } + let transferProgress = 0; + const batch = new Batch_js_1.Batch(options.concurrency); + for (let off = offset; off < offset + count; off = off + blockSize) { + batch.addOperation(async () => { + // Exclusive chunk end position + let chunkEnd = offset + count; + if (off + blockSize < chunkEnd) { + chunkEnd = off + blockSize; + } + const response = await this.download(off, chunkEnd - off, { + abortSignal: options.abortSignal, + conditions: options.conditions, + maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + }); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); + // Update progress after block is downloaded, in case of block trying + // Could provide finer grained progress updating inside HTTP requests, + // only if convenience layer download try is enabled + transferProgress += chunkEnd - off; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress }); + } + }); + } + await batch.do(); + return buffer; + }); } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer|null} - */ - consume (n) { - if (n > this.#byteOffset) { - return null - } else if (n === 0) { - return emptyBuffer + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * + * @param filePath - + * @param offset - From which position of the block blob to download. + * @param count - How much data to be downloaded. Will download to the end when passing undefined. + * @param options - Options to Blob download options. + * @returns The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. + */ + async downloadToFile(filePath, offset = 0, count, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions, + }); + if (response.readableStreamBody) { + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); + } + // The stream is no longer accessible so setting it to undefined. + response.blobDownloadStream = undefined; + return response; + }); } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() + getBlobAndContainerNamesFromUrl() { + let containerName; + let blobName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob` + // http://localhost:10001/devstoreaccount1/containername/blob + const parsedUrl = new URL(this.url); + if (parsedUrl.host.split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername/blob". + // .getPath() -> /containername/blob + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob + // .getPath() -> /devstoreaccount1/containername/blob + const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); + containerName = pathComponents[2]; + blobName = pathComponents[4]; + } + else { + // "https://customdomain.com/containername/blob". + // .getPath() -> /containername/blob + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + // decode the encoded blobName, containerName - to get all the special characters that might be present in them + containerName = decodeURIComponent(containerName); + blobName = decodeURIComponent(blobName); + // Azure Storage Server will replace "\" with "/" in the blob names + // doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName + blobName = blobName.replace(/\\/g, "/"); + if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return { blobName, containerName }; + } + catch (error) { + throw new Error("Unable to extract blobName and containerName with provided information."); + } } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. + */ + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions.tagConditions, + }, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + rehydratePriority: options.rehydratePriority, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + sealBlob: options.sealBlob, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - this.#byteOffset -= n - - return buffer - } - - parseCloseBody (onlyCode, data) { - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code - - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } - - if (onlyCode) { - if (!isValidStatusCode(code)) { - return null - } - - return { code } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + generateSasStringToSign(options) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, this.credential).stringToSign; } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, userDelegationKey, this.accountName).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } - - if (code !== undefined && !isValidStatusCode(code)) { - return null + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, userDelegationKey, this.accountName).stringToSign; } - - try { - // TODO: optimize this - reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) - } catch { - return null + /** + * Delete the immutablility policy on the blob. + * + * @param options - Optional options to delete immutability policy on the blob. + */ + async deleteImmutabilityPolicy(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - return { code, reason } - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 37578: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') -} - - -/***/ }), - -/***/ 25515: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(37578) -const { states, opcodes } = __nccwpck_require__(19188) -const { MessageEvent, ErrorEvent } = __nccwpck_require__(52611) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {EventInit | undefined} eventInitDict - */ -function fireEvent (e, target, eventConstructor = Event, eventInitDict) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. - - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap - - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. - - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data - */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return + /** + * Set immutability policy on the blob. + * + * @param options - Optional options to set immutability policy on the blob. + */ + async setImmutabilityPolicy(immutabilityPolicy, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ + immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, + immutabilityPolicyMode: immutabilityPolicy.policyMode, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = new Uint8Array(data).buffer + /** + * Set legal hold on the blob. + * + * @param options - Optional options to set legal hold on the blob. + */ + async setLegalHold(legalHoldEnabled, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, MessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol - */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } - - for (const char of protocol) { - const code = char.charCodeAt(0) - - if ( - code < 0x21 || - code > 0x7E || - char === '(' || - char === ')' || - char === '<' || - char === '>' || - char === '@' || - char === ',' || - char === ';' || - char === ':' || - char === '\\' || - char === '"' || - char === '/' || - char === '[' || - char === ']' || - char === '?' || - char === '=' || - char === '{' || - char === '}' || - code === 32 || // SP - code === 9 // HT - ) { - return false + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - return true } - +exports.BlobClient = BlobClient; /** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code + * AppendBlobClient defines a set of operations applicable to append blobs. */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 +class AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString; + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + // The second parameter is undefined. Use anonymous credential. + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + super(url, pipeline); + this.appendBlobContext = this.storageClientContext.appendBlob; + } + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot) { + return new AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + } + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param options - Options to the Append Block Create operation. + * + * + * Example usage: + * + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); + * await appendBlobClient.create(); + * ``` + */ + async create(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param options - + */ + async createIfNotExists(options = {}) { + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { + try { + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions, + })); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + throw e; + } + }); + } + /** + * Seals the append blob, making it read only. + * + * @param options - + */ + async seal(options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Commits a new block of data to the end of the existing append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/append-block + * + * @param body - Data to be appended. + * @param contentLength - Length of the body in bytes. + * @param options - Options to the Append Block operation. + * + * + * Example usage: + * + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const content = "Hello World!"; + * + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); + * + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); + * await existingAppendBlobClient.appendBlock(content, content.length); + * ``` + */ + async appendBlock(body, contentLength, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onUploadProgress: options.onProgress, + }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url + * + * @param sourceURL - + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param sourceOffset - Offset in source to be appended + * @param count - Number of bytes to be appended as a block + * @param options - + */ + async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + abortSignal: options.abortSignal, + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + appendPositionAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } } - +exports.AppendBlobClient = AppendBlobClient; /** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason + * BlockBlobClient defines a set of operations applicable to block blobs. */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - fireEvent('error', ws, ErrorEvent, { - error: new Error(reason) - }) - } -} - -module.exports = { - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived -} - - -/***/ }), - -/***/ 54284: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { webidl } = __nccwpck_require__(21744) -const { DOMException } = __nccwpck_require__(41037) -const { URLSerializer } = __nccwpck_require__(685) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(19188) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(37578) -const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(25515) -const { establishWebSocketConnection } = __nccwpck_require__(35354) -const { WebsocketFrameSend } = __nccwpck_require__(25444) -const { ByteParser } = __nccwpck_require__(11688) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(83983) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { types } = __nccwpck_require__(73837) - -let experimentalWarned = false - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' }) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('WebSockets are experimental, expect them to change at any time.', { - code: 'UNDICI-WS' - }) - } - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols) - - url = webidl.converters.USVString(url) - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = getGlobalOrigin() - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') - } - - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' +class BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { + options = blobNameOrOptions; + } + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + super(url, pipeline); + this.blockBlobContext = this.storageClientContext.blockBlob; + this._blobContext = this.storageClientContext.blob; } - - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) + /** + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot) { + return new BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); } - - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { + * return new Promise((resolve, reject) => { + * const chunks: Buffer[] = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param query - + * @param options - + */ + async query(query, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { + throw new Error("This operation currently is only supported in Node.js."); + } + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ + abortSignal: options.abortSignal, + queryRequest: { + queryType: "SQL", + expression: query, + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration), + }, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + })); + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { + abortSignal: options.abortSignal, + onProgress: options.onProgress, + onError: options.onError, + }); + }); } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. + * + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to the Block Blob Upload operation. + * @returns Response data for the Block Blob Upload operation. + * + * Example usage: + * + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + async upload(body, contentLength, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onUploadProgress: options.onProgress, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + /** + * Creates a new Block Blob where the contents of the blob are read from a given URL. + * This API is supported beginning with the 2020-04-08 version. Partial updates + * are not supported with Put Blob from URL; the content of an existing blob is overwritten with + * the content of the new blob. To perform partial updates to a block blob’s contents using a + * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. + * + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Optional parameters. + */ + async syncUploadFromURL(sourceURL, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block + * + * @param blockId - A 64-byte value that is base64-encoded + * @param body - Data to upload to the staging area. + * @param contentLength - Number of bytes to upload. + * @param options - Options to the Block Blob Stage Block operation. + * @returns Response data for the Block Blob Stage Block operation. + */ + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + requestOptions: { + onUploadProgress: options.onProgress, + }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) - - // 11. Let client be this's relevant settings object. - - // 12. Run this step in parallel: - - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - this, - (response) => this.#onConnectionEstablished(response), - options - ) - - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING - - // The extensions attribute must initially return the empty string. - - // The protocol attribute must initially return the empty string. - - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, { clamp: true }) + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url + * + * @param blockId - A 64-byte value that is base64-encoded + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Options to the Block Blob Stage Block From URL operation. + * @returns Response data for the Block Blob Stage Block From URL operation. + */ + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + sourceRange: offset === 0 && !count ? undefined : (0, Range_js_1.rangeToString)({ offset, count }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason) + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list + * + * @param blocks - Array of 64-byte value that is base64-encoded + * @param options - Options to the Block Blob Commit Block List operation. + * @returns Response data for the Block Blob Commit Block List operation. + */ + async commitBlockList(blocks, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } + /** + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list + * + * @param listType - Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param options - Options to the Block Blob Get Block List operation. + * @returns Response data for the Block Blob Get Block List operation. + */ + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + if (!res.committedBlocks) { + res.committedBlocks = []; + } + if (!res.uncommittedBlocks) { + res.uncommittedBlocks = []; + } + return res; + }); } - - let reasonByteLength = 0 - - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) - - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } + // High level functions + /** + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. + * + * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param options - + */ + async uploadData(data, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; + if (data instanceof Buffer) { + buffer = data; + } + else if (data instanceof ArrayBuffer) { + buffer = Buffer.from(data); + } + else { + data = data; + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); + } + else { + const browserBlob = new Blob([data]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); + } + }); } - - // 3. Run the first matching steps from the following list: - if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(this)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(this, 'Connection was closed before it was established.') - this[kReadyState] = WebSocket.CLOSING - } else if (!isClosing(this)) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE), (err) => { - if (!err) { - this[kSentClose] = true - } - }) - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - this[kReadyState] = WebSocket.CLOSING + /** + * ONLY AVAILABLE IN BROWSERS. + * + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. + * + * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. + * + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. + * + * @deprecated Use {@link uploadData} instead. + * + * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView + * @param options - Options to upload browser data. + * @returns Response data for the Blob Upload operation. + */ + async uploadBrowserData(browserData, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + const browserBlob = new Blob([browserData]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); + }); } - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' }) - - data = webidl.converters.WebSocketSendData(data) - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (this[kReadyState] === WebSocket.CONNECTING) { - throw new DOMException('Sent before connected.', 'InvalidStateError') + /** + * + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. + * + * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @param bodyFactory - + * @param size - size of the data to upload. + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadSeekableInternal(bodyFactory, size, options = {}) { + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); + } + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); + } + if (blockSize === 0) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`${size} is too larger to upload to a block blob.`); + } + if (size > maxSingleShotSize) { + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + } + } + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; + } + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + if (size <= maxSingleShotSize) { + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); + } + const numBlocks = Math.floor((size - 1) / blockSize) + 1; + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` + + `the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); + } + const blockList = []; + const blockIDPrefix = (0, core_util_2.randomUUID)(); + let transferProgress = 0; + const batch = new Batch_js_1.Batch(options.concurrency); + for (let i = 0; i < numBlocks; i++) { + batch.addOperation(async () => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); + const start = blockSize * i; + const end = i === numBlocks - 1 ? size : start + blockSize; + const contentLength = end - start; + blockList.push(blockID); + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { + abortSignal: options.abortSignal, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + }); + // Update progress after block is successfully uploaded to server, in case of block trying + // TODO: Hook with convenience layer progress event in finer level + transferProgress += contentLength; + if (options.onProgress) { + options.onProgress({ + loadedBytes: transferProgress, + }); + } + }); + } + await batch.do(); + return this.commitBlockList(blockList, updatedOptions); + }); } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a local file in blocks to a block blob. + * + * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. + * + * @param filePath - Full path of local file + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadFile(filePath, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; + return this.uploadSeekableInternal((offset, count) => { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { + autoClose: true, + end: count ? offset + count - 1 : Infinity, + start: offset, + }); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions, + }); + }); } - - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const value = Buffer.from(data) - const frame = new WebsocketFrameSend(value) - const buffer = frame.createFrame(opcodes.TEXT) - - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - const value = Buffer.from(data) - const frame = new WebsocketFrameSend(value) - const buffer = frame.createFrame(opcodes.BINARY) - - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. - - const ab = Buffer.from(data, data.byteOffset, data.byteLength) - - const frame = new WebsocketFrameSend(ab) - const buffer = frame.createFrame(opcodes.BINARY) - - this.#bufferedAmount += ab.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= ab.byteLength - }) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. - - const frame = new WebsocketFrameSend() - - data.arrayBuffer().then((ab) => { - const value = Buffer.from(ab) - frame.frameData = value - const buffer = frame.createFrame(opcodes.BINARY) - - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - }) + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a Node.js Readable stream into block blob. + * + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * + * @param stream - Node.js Readable stream + * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param options - Options to Upload Stream to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; + } + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + let blockNum = 0; + const blockIDPrefix = (0, core_util_2.randomUUID)(); + let transferProgress = 0; + const blockList = []; + const scheduler = new storage_common_1.BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); + blockList.push(blockID); + blockNum++; + await this.stageBlock(blockID, body, length, { + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + }); + // Update progress after block is successfully uploaded to server, in case of block trying + transferProgress += length; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress }); + } + }, + // concurrency should set a smaller value than maxConcurrency, which is helpful to + // reduce the possibility when a outgoing handler waits for stream data, in + // this situation, outgoing handlers are blocked. + // Outgoing queue shouldn't be empty. + Math.ceil((maxConcurrency / 4) * 3)); + await scheduler.do(); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) +} +exports.BlockBlobClient = BlockBlobClient; +/** + * PageBlobClient defines a set of operations applicable to page blobs. + */ +class PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + super(url, pipeline); + this.pageBlobContext = this.storageClientContext.pageBlob; } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null + /** + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot) { + return new PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param size - size of the page blob. + * @param options - Options to the Page Blob Create operation. + * @returns Response data for the Page Blob Create operation. + */ + async create(size, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + blobSequenceNumber: options.blobSequenceNumber, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param size - size of the page blob. + * @param options - + */ + async createIfNotExists(size, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { + try { + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + throw e; + } + }); } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) + /** + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page + * + * @param body - Data to upload + * @param offset - Offset of destination page blob + * @param count - Content length of the body, also number of bytes to be uploaded + * @param options - Options to the Page Blob Upload Pages operation. + * @returns Response data for the Page Blob Upload Pages operation. + */ + async uploadPages(body, offset, count, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onUploadProgress: options.onProgress, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + sequenceNumberAccessConditions: options.conditions, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null + /** + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url + * + * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param destOffset - Offset of destination page blob + * @param count - Number of bytes to be uploaded from source page blob + * @param options - + */ + async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { + abortSignal: options.abortSignal, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + sequenceNumberAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) + /** + * Frees the specified pages from the page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page + * + * @param offset - Starting byte position of the pages to clear. + * @param count - Number of bytes to clear. + * @param options - Options to the Page Blob Clear Pages operation. + * @returns Response data for the Page Blob Clear Pages operation. + */ + async clearPages(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + sequenceNumberAccessConditions: options.conditions, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns Response data for the Page Blob Get Ranges operation. + */ + async getPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + tracingOptions: updatedOptions.tracingOptions, + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); + }); } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type + /** + * getPageRangesSegment returns a single segment of page ranges starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to PageBlob Get Page Ranges Segment operation. + */ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker: marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response) { - // processResponse is called when the "response’s header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const parser = new ByteParser(this) - parser.on('drain', function onParserDrain () { - this.ws[kResponse].socket.resume() - }) - - response.socket.ws = this - this[kByteParser] = parser - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions + /** + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param marker - A string value that identifies the portion of + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get + * items. The marker value is opaque to the client. + * @param options - Options to List Page Ranges operation. + */ + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === undefined) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol + /** + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to List Page Ranges operation. + */ + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V) -} - -// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - get defaultValue () { - return [] + /** + * Returns an async iterable iterator to list of page ranges for a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * .byPage() returns an async iterable iterator to list of page ranges for a page blob. + * + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax + * let i = 1; + * for await (const pageRange of pageBlobClient.listPageRanges()) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * ``` + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns An asyncIterableIterator that supports paging. + */ + listPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + // AsyncIterableIterator to iterate over blobs + const iter = this.listPageRangeItems(offset, count, options); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options, + }); + }, + }; } - }, - { - key: 'dispatcher', - converter: (V) => V, - get defaultValue () { - return getGlobalDispatcher() + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. + */ + async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + prevsnapshot: prevSnapshot, + range: (0, Range_js_1.rangeToString)({ offset, count }), + tracingOptions: updatedOptions.tracingOptions, + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); + }); } - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) + /** + * getPageRangesDiffSegment returns a single segment of page ranges starting from the + * specified Marker for difference between previous snapshot and the target page blob. + * Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesDiffSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions, + }, + prevsnapshot: prevSnapshotOrUrl, + range: (0, Range_js_1.rangeToString)({ + offset: offset, + count: count, + }), + marker: marker, + maxPageSize: options?.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { - return webidl.converters.BufferSource(V) + /** + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} + * + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get + * items. The marker value is opaque to the client. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === undefined) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } - } - - return webidl.converters.USVString(V) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 45030: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - - if (typeof process === "object" && process.version !== undefined) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - - return ""; -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 65278: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = __nccwpck_require__(73837).deprecate; - - -/***/ }), - -/***/ 2155: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var v1 = __nccwpck_require__(18749); -var v4 = __nccwpck_require__(80824); - -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; - - -/***/ }), - -/***/ 92707: -/***/ ((module) => { - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([ - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]] - ]).join(''); -} - -module.exports = bytesToUuid; - - -/***/ }), - -/***/ 15859: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. - -var crypto = __nccwpck_require__(6113); - -module.exports = function nodeRNG() { - return crypto.randomBytes(16); -}; - - -/***/ }), - -/***/ 18749: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -var _nodeId; -var _clockseq; - -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; - -// See https://github.com/uuidjs/uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - - // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - var seedBytes = rng(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] - ]; + /** + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } + } + /** + * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax + * let i = 1; + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * ``` + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns An asyncIterableIterator that supports paging. + */ + listPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + // AsyncIterableIterator to iterate over blobs + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options, + }); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options, + }); + }, + }; } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. + */ + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), + tracingOptions: updatedOptions.tracingOptions, + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); + }); + } + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param size - Target size + * @param options - Options to the Page Blob Resize operation. + * @returns Response data for the Page Blob Resize operation. + */ + async resize(size, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets a page blob's sequence number. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. + * @param sequenceNumber - Required if sequenceNumberAction is max or update + * @param options - Options to the Page Blob Update Sequence Number operation. + * @returns Response data for the Page Blob Update Sequence Number operation. + */ + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { + abortSignal: options.abortSignal, + blobSequenceNumber: sequenceNumber, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots + * + * @param copySource - Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Options to the Page Blob Copy Incremental operation. + * @returns Response data for the Page Blob Copy Incremental operation. + */ + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf ? buf : bytesToUuid(b); } - -module.exports = v1; - +exports.PageBlobClient = PageBlobClient; +//# sourceMappingURL=Clients.js.map /***/ }), -/***/ 80824: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); +/***/ 63750: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; +"use strict"; - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ContainerClient = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const core_auth_1 = __nccwpck_require__(98834); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const Pipeline_js_1 = __nccwpck_require__(33781); +const StorageClient_js_1 = __nccwpck_require__(39484); +const tracing_js_1 = __nccwpck_require__(53683); +const utils_common_js_1 = __nccwpck_require__(16673); +const BlobSASSignatureValues_js_1 = __nccwpck_require__(48921); +const BlobLeaseClient_js_1 = __nccwpck_require__(20106); +const Clients_js_1 = __nccwpck_require__(54437); +const BlobBatchClient_js_1 = __nccwpck_require__(71861); +/** + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. + */ +class ContainerClient extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; + /** + * The name of the container. + */ + get containerName() { + return this._containerName; + } + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName parameter"); + } + super(url, pipeline); + this._containerName = this.getContainerNameFromUrl(); + this.containerContext = this.storageClientContext.container; + } + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://learn.microsoft.com/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * + * @param options - Options to Container Create operation. + * + * + * Example usage: + * + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` + */ + async create(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); + }); + } + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://learn.microsoft.com/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * + * @param options - + */ + async createIfNotExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { + try { + const res = await this.create(updatedOptions); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + else { + throw e; + } + } + }); + } + /** + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param options - + */ + async exists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + try { + await this.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + }); + return true; + } + catch (e) { + if (e.statusCode === 404) { + return false; + } + throw e; + } + }); + } + /** + * Creates a {@link BlobClient} + * + * @param blobName - A blob name + * @returns A new BlobClient object for the given blob name. + */ + getBlobClient(blobName) { + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Creates an {@link AppendBlobClient} + * + * @param blobName - An append blob name + */ + getAppendBlobClient(blobName) { + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Creates a {@link BlockBlobClient} + * + * @param blobName - A block blob name + * + * + * Example usage: + * + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + getBlockBlobClient(blobName) { + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Creates a {@link PageBlobClient} + * + * @param blobName - A page blob name + */ + getPageBlobClient(blobName) { + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Options to Container Get Properties operation. + */ + async getProperties(options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container + * + * @param options - Options to Container Delete operation. + */ + async delete(options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container + * + * @param options - Options to Container Delete operation. + */ + async deleteIfExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { + try { + const res = await this.delete(updatedOptions); + return { + succeeded: true, + ...res, + _response: res._response, + }; + } + catch (e) { + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + throw e; + } + }); + } + /** + * Sets one or more user-defined name-value pairs for the specified container. + * + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata + * + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Options to Container Set Metadata operation. + */ + async setMetadata(metadata, options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + if (options.conditions.ifUnmodifiedSince) { + throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl + * + * @param options - Options to Container Get Access Policy operation. + */ + async getAccessPolicy(options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + const res = { + _response: response._response, + blobPublicAccess: response.blobPublicAccess, + date: response.date, + etag: response.etag, + errorCode: response.errorCode, + lastModified: response.lastModified, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + signedIdentifiers: [], + version: response.version, + }; + for (const identifier of response) { + let accessPolicy = undefined; + if (identifier.accessPolicy) { + accessPolicy = { + permissions: identifier.accessPolicy.permissions, + }; + if (identifier.accessPolicy.expiresOn) { + accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); + } + if (identifier.accessPolicy.startsOn) { + accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); + } + } + res.signedIdentifiers.push({ + accessPolicy, + id: identifier.id, + }); + } + return res; + }); + } + /** + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. + * + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl + * + * @param access - The level of public access to data in the container. + * @param containerAcl - Array of elements each having a unique Id and details of the access policy. + * @param options - Options to Container Set Access Policy operation. + */ + async setAccessPolicy(access, containerAcl, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + const acl = []; + for (const identifier of containerAcl || []) { + acl.push({ + accessPolicy: { + expiresOn: identifier.accessPolicy.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) + : "", + permissions: identifier.accessPolicy.permissions, + startsOn: identifier.accessPolicy.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) + : "", + }, + id: identifier.id, + }); + } + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ + abortSignal: options.abortSignal, + access, + containerAcl: acl, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - return buf || bytesToUuid(rnds); -} - -module.exports = v4; - - -/***/ }), - -/***/ 62940: -/***/ ((module) => { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] + /** + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the container. + */ + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param blobName - Name of the block blob to create or update. + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to configure the Block Blob Upload operation. + * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. + */ + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + const blockBlobClient = this.getBlockBlobClient(blobName); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); + return { + blockBlobClient, + response, + }; + }); } - return ret - } -} - - -/***/ }), - -/***/ 15185: -/***/ ((module) => { - -class Node { - /// value; - /// next; - - constructor(value) { - this.value = value; - - // TODO: Remove this when targeting Node.js 12. - this.next = undefined; - } -} - -class Queue { - // TODO: Use private class fields when targeting Node.js 12. - // #_head; - // #_tail; - // #_size; - - constructor() { - this.clear(); - } - - enqueue(value) { - const node = new Node(value); - - if (this._head) { - this._tail.next = node; - this._tail = node; - } else { - this._head = node; - this._tail = node; - } - - this._size++; - } - - dequeue() { - const current = this._head; - if (!current) { - return; - } - - this._head = this._head.next; - this._size--; - return current.value; - } - - clear() { - this._head = undefined; - this._tail = undefined; - this._size = 0; - } - - get size() { - return this._size; - } - - * [Symbol.iterator]() { - let current = this._head; - - while (current) { - yield current.value; - current = current.next; - } - } -} - -module.exports = Queue; - - -/***/ }), - -/***/ 64810: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/** - * @fileoverview this file provides methods handling dependency cache - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob + * + * @param blobName - + * @param options - Options to Blob Delete operation. + * @returns Block blob deletion response data. + */ + async deleteBlob(blobName, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + let blobClient = this.getBlobClient(blobName); + if (options.versionId) { + blobClient = blobClient.withVersion(options.versionId); + } + return blobClient.delete(updatedOptions); + }); } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.save = exports.restore = void 0; -const path_1 = __nccwpck_require__(71017); -const os_1 = __importDefault(__nccwpck_require__(22037)); -const cache = __importStar(__nccwpck_require__(27799)); -const core = __importStar(__nccwpck_require__(42186)); -const glob = __importStar(__nccwpck_require__(28090)); -const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'; -const CACHE_MATCHED_KEY = 'cache-matched-key'; -const CACHE_KEY_PREFIX = 'setup-java'; -const supportedPackageManager = [ - { - id: 'maven', - path: [(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository')], - // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven - pattern: ['**/pom.xml'] - }, - { - id: 'gradle', - path: [ - (0, path_1.join)(os_1.default.homedir(), '.gradle', 'caches'), - (0, path_1.join)(os_1.default.homedir(), '.gradle', 'wrapper') - ], - // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle - pattern: [ - '**/*.gradle*', - '**/gradle-wrapper.properties', - 'buildSrc/**/Versions.kt', - 'buildSrc/**/Dependencies.kt', - 'gradle/*.versions.toml', - '**/versions.properties' - ] - }, - { - id: 'sbt', - path: [ - (0, path_1.join)(os_1.default.homedir(), '.ivy2', 'cache'), - (0, path_1.join)(os_1.default.homedir(), '.sbt'), - getCoursierCachePath(), - // Some files should not be cached to avoid resolution problems. - // In particular the resolution of snapshots (ideological gap between maven/ivy). - '!' + (0, path_1.join)(os_1.default.homedir(), '.sbt', '*.lock'), - '!' + (0, path_1.join)(os_1.default.homedir(), '**', 'ivydata-*.properties') - ], - pattern: [ - '**/*.sbt', - '**/project/build.properties', - '**/project/**.scala', - '**/project/**.sbt' - ] + /** + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Flat Segment operation. + */ + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody), + }, // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata), + }; + return blobItem; + }), + }, + }; + return wrappedResponse; + }); } -]; -function getCoursierCachePath() { - if (os_1.default.type() === 'Linux') - return (0, path_1.join)(os_1.default.homedir(), '.cache', 'coursier'); - if (os_1.default.type() === 'Darwin') - return (0, path_1.join)(os_1.default.homedir(), 'Library', 'Caches', 'Coursier'); - return (0, path_1.join)(os_1.default.homedir(), 'AppData', 'Local', 'Coursier', 'Cache'); -} -function findPackageManager(id) { - const packageManager = supportedPackageManager.find(packageManager => packageManager.id === id); - if (packageManager === undefined) { - throw new Error(`unknown package manager specified: ${id}`); + /** + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Hierarchy Segment operation. + */ + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody), + }, // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata), + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name), + }; + return blobPrefix; + }), + }, + }; + return wrappedResponse; + }); } - return packageManager; -} -/** - * A function that generates a cache key to use. - * Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"". - * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key} - */ -function computeCacheKey(packageManager, cacheDependencyPath) { - return __awaiter(this, void 0, void 0, function* () { - const pattern = cacheDependencyPath - ? cacheDependencyPath.trim().split('\n') - : packageManager.pattern; - const fileHash = yield glob.hashFiles(pattern.join('\n')); - if (!fileHash) { - throw new Error(`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`); + /** + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. + */ + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === undefined) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } + } + /** + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @param options - Options to list blobs operation. + */ + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } + } + /** + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param options - Options to list blobs. + * @returns An asyncIterableIterator that supports paging. + */ + listBlobsFlat(options = {}) { + const include = []; + if (options.includeCopy) { + include.push("copy"); + } + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSnapshots) { + include.push("snapshots"); + } + if (options.includeVersions) { + include.push("versions"); + } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); + } + if (options.includeTags) { + include.push("tags"); + } + if (options.includeDeletedWithVersions) { + include.push("deletedwithversions"); + } + if (options.includeImmutabilityPolicy) { + include.push("immutabilitypolicy"); + } + if (options.includeLegalHold) { + include.push("legalhold"); + } + if (options.prefix === "") { + options.prefix = undefined; + } + const updatedOptions = { + ...options, + ...(include.length > 0 ? { include: include } : {}), + }; + // AsyncIterableIterator to iterate over blobs + const iter = this.listItems(updatedOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions, + }); + }, + }; + } + /** + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. + */ + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === undefined) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } + } + /** + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. + */ + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix, + }; + } + } + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } + } + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. + */ + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { + throw new RangeError("delimiter should contain one or more characters"); } - return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`; - }); -} -/** - * Restore the dependency cache - * @param id ID of the package manager, should be "maven" or "gradle" - * @param cacheDependencyPath The path to a dependency file - */ -function restore(id, cacheDependencyPath) { - return __awaiter(this, void 0, void 0, function* () { - const packageManager = findPackageManager(id); - const primaryKey = yield computeCacheKey(packageManager, cacheDependencyPath); - core.debug(`primary key is ${primaryKey}`); - core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey); - // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269) - const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey); - if (matchedKey) { - core.saveState(CACHE_MATCHED_KEY, matchedKey); - core.setOutput('cache-hit', matchedKey === primaryKey); - core.info(`Cache restored from key: ${matchedKey}`); + const include = []; + if (options.includeCopy) { + include.push("copy"); } - else { - core.setOutput('cache-hit', false); - core.info(`${packageManager.id} cache is not found`); + if (options.includeDeleted) { + include.push("deleted"); } - }); -} -exports.restore = restore; -/** - * Save the dependency cache - * @param id ID of the package manager, should be "maven" or "gradle" - */ -function save(id) { - return __awaiter(this, void 0, void 0, function* () { - const packageManager = findPackageManager(id); - const matchedKey = core.getState(CACHE_MATCHED_KEY); - // Inputs are re-evaluated before the post action, so we want the original key used for restore - const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY); - if (!primaryKey) { - core.warning('Error retrieving key from state.'); - return; + if (options.includeMetadata) { + include.push("metadata"); } - else if (matchedKey === primaryKey) { - // no change in target directories - core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); - return; + if (options.includeSnapshots) { + include.push("snapshots"); } - try { - yield cache.saveCache(packageManager.path, primaryKey); - core.info(`Cache saved with the key: ${primaryKey}`); + if (options.includeVersions) { + include.push("versions"); } - catch (error) { - const err = error; - if (err.name === cache.ReserveCacheError.name) { - core.info(err.message); - } - else { - if (isProbablyGradleDaemonProblem(packageManager, err)) { - core.warning('Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'); - } - throw error; - } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); } - }); -} -exports.save = save; -/** - * @param packageManager the specified package manager by user - * @param error the error thrown by the saveCache - * @returns true if the given error seems related to the {@link https://github.com/actions/cache/issues/454|running Gradle Daemon issue}. - * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} - */ -function isProbablyGradleDaemonProblem(packageManager, error) { - if (packageManager.id !== 'gradle' || - process.env['RUNNER_OS'] !== 'Windows') { - return false; - } - const message = error.message || ''; - return message.startsWith('Tar failed with error: '); -} - - -/***/ }), - -/***/ 85823: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.run = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const gpg = __importStar(__nccwpck_require__(23759)); -const constants = __importStar(__nccwpck_require__(69042)); -const util_1 = __nccwpck_require__(92629); -const cache_1 = __nccwpck_require__(64810); -function removePrivateKeyFromKeychain() { - return __awaiter(this, void 0, void 0, function* () { - if (core.getInput(constants.INPUT_GPG_PRIVATE_KEY, { required: false })) { - core.info('Removing private key from keychain'); - try { - const keyFingerprint = core.getState(constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT); - yield gpg.deleteKey(keyFingerprint); - } - catch (error) { - core.setFailed(`Failed to remove private key due to: ${error.message}`); - } + if (options.includeTags) { + include.push("tags"); } - }); -} -/** - * Check given input and run a save process for the specified package manager - * @returns Promise that will be resolved when the save process finishes - */ -function saveCache() { - return __awaiter(this, void 0, void 0, function* () { - const jobStatus = (0, util_1.isJobStatusSuccess)(); - const cache = core.getInput(constants.INPUT_CACHE); - return jobStatus && cache ? (0, cache_1.save)(cache) : Promise.resolve(); - }); -} -/** - * The save process is best-effort, and it should not make the workflow fail - * even though this process throws an error. - * @param promise the promise to ignore error from - * @returns Promise that will ignore error reported by the given promise - */ -function ignoreError(promise) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise(resolve => { - promise - .catch(error => { - core.warning(error); - resolve(void 0); - }) - .then(resolve); - }); - }); -} -function run() { - return __awaiter(this, void 0, void 0, function* () { - yield removePrivateKeyFromKeychain(); - yield ignoreError(saveCache()); - }); -} -exports.run = run; -if (require.main === require.cache[eval('__filename')]) { - run(); -} -else { - // https://nodejs.org/api/modules.html#modules_accessing_the_main_module - core.info('the script is loaded as a module, so skipping the execution'); -} - - -/***/ }), - -/***/ 69042: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE_DEPENDENCY_PATH = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; -exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home'; -exports.INPUT_JAVA_VERSION = 'java-version'; -exports.INPUT_JAVA_VERSION_FILE = 'java-version-file'; -exports.INPUT_ARCHITECTURE = 'architecture'; -exports.INPUT_JAVA_PACKAGE = 'java-package'; -exports.INPUT_DISTRIBUTION = 'distribution'; -exports.INPUT_JDK_FILE = 'jdkFile'; -exports.INPUT_CHECK_LATEST = 'check-latest'; -exports.INPUT_SERVER_ID = 'server-id'; -exports.INPUT_SERVER_USERNAME = 'server-username'; -exports.INPUT_SERVER_PASSWORD = 'server-password'; -exports.INPUT_SETTINGS_PATH = 'settings-path'; -exports.INPUT_OVERWRITE_SETTINGS = 'overwrite-settings'; -exports.INPUT_GPG_PRIVATE_KEY = 'gpg-private-key'; -exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; -exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; -exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; -exports.INPUT_CACHE = 'cache'; -exports.INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path'; -exports.INPUT_JOB_STATUS = 'job-status'; -exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; -exports.M2_DIR = '.m2'; -exports.MVN_SETTINGS_FILE = 'settings.xml'; -exports.MVN_TOOLCHAINS_FILE = 'toolchains.xml'; -exports.INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id'; -exports.INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor'; -exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto']; - - -/***/ }), - -/***/ 23759: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deleteKey = exports.importKey = exports.PRIVATE_KEY_FILE = void 0; -const fs = __importStar(__nccwpck_require__(57147)); -const path = __importStar(__nccwpck_require__(71017)); -const io = __importStar(__nccwpck_require__(47351)); -const exec = __importStar(__nccwpck_require__(71514)); -const util = __importStar(__nccwpck_require__(92629)); -exports.PRIVATE_KEY_FILE = path.join(util.getTempDir(), 'private-key.asc'); -const PRIVATE_KEY_FINGERPRINT_REGEX = /\w{40}/; -function importKey(privateKey) { - return __awaiter(this, void 0, void 0, function* () { - fs.writeFileSync(exports.PRIVATE_KEY_FILE, privateKey, { - encoding: 'utf-8', - flag: 'w' - }); - let output = ''; - const options = { - silent: true, - listeners: { - stdout: (data) => { - output += data.toString(); - } - } - }; - yield exec.exec('gpg', [ - '--batch', - '--import-options', - 'import-show', - '--import', - exports.PRIVATE_KEY_FILE - ], options); - yield io.rmRF(exports.PRIVATE_KEY_FILE); - const match = output.match(PRIVATE_KEY_FINGERPRINT_REGEX); - return match && match[0]; - }); -} -exports.importKey = importKey; -function deleteKey(keyFingerprint) { - return __awaiter(this, void 0, void 0, function* () { - yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], { - silent: true - }); - }); -} -exports.deleteKey = deleteKey; - - -/***/ }), - -/***/ 92629: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getGitHubHttpHeaders = exports.convertVersionToSemver = exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; -const os_1 = __importDefault(__nccwpck_require__(22037)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const fs = __importStar(__nccwpck_require__(57147)); -const semver = __importStar(__nccwpck_require__(11383)); -const cache = __importStar(__nccwpck_require__(27799)); -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const constants_1 = __nccwpck_require__(69042); -function getTempDir() { - const tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); - return tempDirectory; -} -exports.getTempDir = getTempDir; -function getBooleanInput(inputName, defaultValue = false) { - return ((core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'); -} -exports.getBooleanInput = getBooleanInput; -function getVersionFromToolcachePath(toolPath) { - if (toolPath) { - return path_1.default.basename(path_1.default.dirname(toolPath)); - } - return toolPath; -} -exports.getVersionFromToolcachePath = getVersionFromToolcachePath; -function extractJdkFile(toolPath, extension) { - return __awaiter(this, void 0, void 0, function* () { - if (!extension) { - extension = toolPath.endsWith('.tar.gz') - ? 'tar.gz' - : path_1.default.extname(toolPath); - if (extension.startsWith('.')) { - extension = extension.substring(1); - } + if (options.includeDeletedWithVersions) { + include.push("deletedwithversions"); } - switch (extension) { - case 'tar.gz': - case 'tar': - return yield tc.extractTar(toolPath); - case 'zip': - return yield tc.extractZip(toolPath); - default: - return yield tc.extract7z(toolPath); + if (options.includeImmutabilityPolicy) { + include.push("immutabilitypolicy"); } - }); -} -exports.extractJdkFile = extractJdkFile; -function getDownloadArchiveExtension() { - return process.platform === 'win32' ? 'zip' : 'tar.gz'; -} -exports.getDownloadArchiveExtension = getDownloadArchiveExtension; -function isVersionSatisfies(range, version) { - var _a; - if (semver.valid(range)) { - // if full version with build digit is provided as a range (such as '1.2.3+4') - // we should check for exact equal via compareBuild - // since semver.satisfies doesn't handle 4th digit - const semRange = semver.parse(range); - if (semRange && ((_a = semRange.build) === null || _a === void 0 ? void 0 : _a.length) > 0) { - return semver.compareBuild(range, version) === 0; + if (options.includeLegalHold) { + include.push("legalhold"); } + if (options.prefix === "") { + options.prefix = undefined; + } + const updatedOptions = { + ...options, + ...(include.length > 0 ? { include: include } : {}), + }; + // AsyncIterableIterator to iterate over blob prefixes and blobs + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); + return { + /** + * The next method, part of the iteration protocol + */ + async next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions, + }); + }, + }; } - return semver.satisfies(version, range); -} -exports.isVersionSatisfies = isVersionSatisfies; -function getToolcachePath(toolName, version, architecture) { - var _a; - const toolcacheRoot = (_a = process.env['RUNNER_TOOL_CACHE']) !== null && _a !== void 0 ? _a : ''; - const fullPath = path_1.default.join(toolcacheRoot, toolName, version, architecture); - if (fs.existsSync(fullPath)) { - return fullPath; - } - return null; -} -exports.getToolcachePath = getToolcachePath; -function isJobStatusSuccess() { - const jobStatus = core.getInput(constants_1.INPUT_JOB_STATUS); - return jobStatus === 'success'; -} -exports.isJobStatusSuccess = isJobStatusSuccess; -function isGhes() { - const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); - return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'; -} -exports.isGhes = isGhes; -function isCacheFeatureAvailable() { - if (cache.isFeatureAvailable()) { - return true; + /** + * The Filter Blobs operation enables callers to list blobs in the container whose tags + * match a given search expression. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: response._response, // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }), + }; + return wrappedResponse; + }); } - if (isGhes()) { - core.warning('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); - return false; + /** + * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === undefined) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } - core.warning('The runner was not able to contact the cache service. Caching will be skipped'); - return false; -} -exports.isCacheFeatureAvailable = isCacheFeatureAvailable; -function getVersionFromFileContent(content, distributionName, versionFile) { - var _a, _b, _c, _d, _e; - let javaVersionRegExp; - function getFileName(versionFile) { - return path_1.default.basename(versionFile); + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } - const versionFileName = getFileName(versionFile); - if (versionFileName == '.tool-versions') { - javaVersionRegExp = - /^(java\s+)(?:\S*-)?v?(?(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m; + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified container. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + // AsyncIterableIterator to iterate over blobs + const listSegmentOptions = { + ...options, + }; + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions, + }); + }, + }; } - else { - javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - const fileContent = ((_b = (_a = content.match(javaVersionRegExp)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.version) - ? (_d = (_c = content.match(javaVersionRegExp)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.version - : ''; - if (!fileContent) { - return null; + getContainerNameFromUrl() { + let containerName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername` + // http://localhost:10001/devstoreaccount1/containername + const parsedUrl = new URL(this.url); + if (parsedUrl.hostname.split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername". + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.pathname.split("/")[1]; + } + else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername + // .getPath() -> /devstoreaccount1/containername + containerName = parsedUrl.pathname.split("/")[2]; + } + else { + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.pathname.split("/")[1]; + } + // decode the encoded containerName - to get all the special characters that might be present in it + containerName = decodeURIComponent(containerName); + if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return containerName; + } + catch (error) { + throw new Error("Unable to extract containerName with provided information."); + } } - core.debug(`Version from file '${fileContent}'`); - const tentativeVersion = avoidOldNotation(fileContent); - const rawVersion = tentativeVersion.split('-')[0]; - let version = semver.validRange(rawVersion) - ? tentativeVersion - : semver.coerce(tentativeVersion); - core.debug(`Range version from file is '${version}'`); - if (!version) { - return null; + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options, + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } - if (constants_1.DISTRIBUTIONS_ONLY_MAJOR_VERSION.includes(distributionName)) { - const coerceVersion = (_e = semver.coerce(version)) !== null && _e !== void 0 ? _e : version; - version = semver.major(coerceVersion).toString(); + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + generateSasStringToSign(options) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options, + }, this.credential).stringToSign; } - return version.toString(); -} -exports.getVersionFromFileContent = getVersionFromFileContent; -// By convention, action expects version 8 in the format `8.*` instead of `1.8` -function avoidOldNotation(content) { - return content.startsWith('1.') ? content.substring(2) : content; -} -function convertVersionToSemver(version) { - // Some distributions may use semver-like notation (12.10.2.1, 12.10.2.1.1) - const versionArray = Array.isArray(version) ? version : version.split('.'); - const mainVersion = versionArray.slice(0, 3).join('.'); - if (versionArray.length > 3) { - return `${mainVersion}+${versionArray.slice(3).join('.')}`; + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options, + }, userDelegationKey, this.accountName).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } - return mainVersion; -} -exports.convertVersionToSemver = convertVersionToSemver; -function getGitHubHttpHeaders() { - const token = core.getInput('token'); - const auth = !token ? undefined : `token ${token}`; - const headers = { - accept: 'application/vnd.github.VERSION.raw' - }; - if (auth) { - headers.authorization = auth; + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options, + }, userDelegationKey, this.accountName).stringToSign; } - return headers; -} -exports.getGitHubHttpHeaders = getGitHubHttpHeaders; - - -/***/ }), - -/***/ 22877: -/***/ ((module) => { - -module.exports = eval("require")("encoding"); - - -/***/ }), - -/***/ 39491: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert"); - -/***/ }), - -/***/ 50852: -/***/ ((module) => { - -"use strict"; -module.exports = require("async_hooks"); - -/***/ }), - -/***/ 14300: -/***/ ((module) => { - -"use strict"; -module.exports = require("buffer"); - -/***/ }), - -/***/ 32081: -/***/ ((module) => { - -"use strict"; -module.exports = require("child_process"); - -/***/ }), - -/***/ 96206: -/***/ ((module) => { - -"use strict"; -module.exports = require("console"); - -/***/ }), - -/***/ 6113: -/***/ ((module) => { - -"use strict"; -module.exports = require("crypto"); - -/***/ }), - -/***/ 67643: -/***/ ((module) => { - -"use strict"; -module.exports = require("diagnostics_channel"); - -/***/ }), - -/***/ 82361: -/***/ ((module) => { - -"use strict"; -module.exports = require("events"); - -/***/ }), - -/***/ 57147: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs"); - -/***/ }), - -/***/ 13685: -/***/ ((module) => { - -"use strict"; -module.exports = require("http"); - -/***/ }), - -/***/ 85158: -/***/ ((module) => { - -"use strict"; -module.exports = require("http2"); - -/***/ }), - -/***/ 95687: -/***/ ((module) => { - -"use strict"; -module.exports = require("https"); - -/***/ }), - -/***/ 41808: -/***/ ((module) => { - -"use strict"; -module.exports = require("net"); - -/***/ }), - -/***/ 15673: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:events"); - -/***/ }), - -/***/ 88849: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:http"); - -/***/ }), - -/***/ 22286: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:https"); - -/***/ }), - -/***/ 70612: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:os"); - -/***/ }), - -/***/ 97742: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:process"); - -/***/ }), - -/***/ 84492: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:stream"); - -/***/ }), - -/***/ 47261: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:util"); - -/***/ }), - -/***/ 65628: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:zlib"); - -/***/ }), - -/***/ 22037: -/***/ ((module) => { - -"use strict"; -module.exports = require("os"); + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this container. + */ + getBlobBatchClient() { + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); + } +} +exports.ContainerClient = ContainerClient; +//# sourceMappingURL=ContainerClient.js.map /***/ }), -/***/ 71017: -/***/ ((module) => { +/***/ 12526: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = require("path"); - -/***/ }), - -/***/ 4074: -/***/ ((module) => { -"use strict"; -module.exports = require("perf_hooks"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.rangeResponseFromModel = rangeResponseFromModel; +/** + * Function that converts PageRange and ClearRange to a common Range object. + * PageRange and ClearRange have start and end while Range offset and count + * this function normalizes to Range. + * @param response - Model PageBlob Range response + */ +function rangeResponseFromModel(response) { + const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start, + })); + const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start, + })); + return { + ...response, + pageRange, + clearRange, + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange, + }, + }, + }; +} +//# sourceMappingURL=PageBlobRangeResponse.js.map /***/ }), -/***/ 85477: -/***/ ((module) => { +/***/ 33781: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("punycode"); - -/***/ }), - -/***/ 63477: -/***/ ((module) => { -"use strict"; -module.exports = require("querystring"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Pipeline = exports.StorageOAuthScopes = void 0; +exports.isPipelineLike = isPipelineLike; +exports.newPipeline = newPipeline; +exports.getCoreClientOptions = getCoreClientOptions; +exports.getCredentialFromPipeline = getCredentialFromPipeline; +const core_http_compat_1 = __nccwpck_require__(25083); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_client_1 = __nccwpck_require__(7611); +const core_xml_1 = __nccwpck_require__(17309); +const core_auth_1 = __nccwpck_require__(98834); +const log_js_1 = __nccwpck_require__(53282); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(98637); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const constants_js_1 = __nccwpck_require__(81865); +Object.defineProperty(exports, "StorageOAuthScopes", ({ enumerable: true, get: function () { return constants_js_1.StorageOAuthScopes; } })); +const storage_common_1 = __nccwpck_require__(83667); +const StorageBrowserPolicyV2_js_1 = __nccwpck_require__(29090); +const StorageRetryPolicyV2_js_1 = __nccwpck_require__(68031); +const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(93846); +const StorageBrowserPolicyFactory_js_1 = __nccwpck_require__(86562); +const StorageCorrectContentLengthPolicy_js_1 = __nccwpck_require__(73623); +/** + * A helper to decide if a given argument satisfies the Pipeline contract + * @param pipeline - An argument that may be a Pipeline + * @returns true when the argument satisfies the Pipeline contract + */ +function isPipelineLike(pipeline) { + if (!pipeline || typeof pipeline !== "object") { + return false; + } + const castPipeline = pipeline; + return (Array.isArray(castPipeline.factories) && + typeof castPipeline.options === "object" && + typeof castPipeline.toServiceClientOptions === "function"); +} +/** + * A Pipeline class containing HTTP request policies. + * You can create a default Pipeline by calling {@link newPipeline}. + * Or you can create a Pipeline with your own policies by the constructor of Pipeline. + * + * Refer to {@link newPipeline} and provided policies before implementing your + * customized Pipeline. + */ +class Pipeline { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; + /** + * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. + * + * @param factories - + * @param options - + */ + constructor(factories, options = {}) { + this.factories = factories; + this.options = options; + } + /** + * Transfer Pipeline object to ServiceClientOptions object which is required by + * ServiceClient constructor. + * + * @returns The ServiceClientOptions object from this Pipeline. + */ + toServiceClientOptions() { + return { + httpClient: this.options.httpClient, + requestPolicyFactories: this.factories, + }; + } +} +exports.Pipeline = Pipeline; +/** + * Creates a new Pipeline object with Credential provided. + * + * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param pipelineOptions - Optional. Options. + * @returns A new Pipeline object. + */ +function newPipeline(credential, pipelineOptions = {}) { + if (!credential) { + credential = new AnonymousCredential_js_1.AnonymousCredential(); + } + const pipeline = new Pipeline([], pipelineOptions); + pipeline._credential = credential; + return pipeline; +} +function processDownlevelPipeline(pipeline) { + const knownFactoryFunctions = [ + isAnonymousCredential, + isStorageSharedKeyCredential, + isCoreHttpBearerTokenFactory, + isStorageBrowserPolicyFactory, + isStorageRetryPolicyFactory, + isStorageTelemetryPolicyFactory, + isCoreHttpPolicyFactory, + ]; + if (pipeline.factories.length) { + const novelFactories = pipeline.factories.filter((factory) => { + return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); + }); + if (novelFactories.length) { + const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); + // if there are any left over, wrap in a requestPolicyFactoryPolicy + return { + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), + afterRetry: hasInjector, + }; + } + } + return undefined; +} +function getCoreClientOptions(pipeline) { + const { httpClient: v1Client, ...restOptions } = pipeline.options; + let httpClient = pipeline._coreHttpClient; + if (!httpClient) { + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); + pipeline._coreHttpClient = httpClient; + } + let corePipeline = pipeline._corePipeline; + if (!corePipeline) { + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; + const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix + ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info, + }, + userAgentOptions: { + userAgentPrefix, + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#", + }, + }, + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#", + }, + }, + }, + }); + corePipeline.removePolicy({ phase: "Retry" }); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); + const downlevelResults = processDownlevelPipeline(pipeline); + if (downlevelResults) { + corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : undefined); + } + const credential = getCredentialFromPipeline(pipeline); + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential, + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge }, + }), { phase: "Sign" }); + } + else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ + accountName: credential.accountName, + accountKey: credential.accountKey, + }), { phase: "Sign" }); + } + pipeline._corePipeline = corePipeline; + } + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline, + }; +} +function getCredentialFromPipeline(pipeline) { + // see if we squirreled one away on the type itself + if (pipeline._credential) { + return pipeline._credential; + } + // if it came from another package, loop over the factories and look for one like before + let credential = new AnonymousCredential_js_1.AnonymousCredential(); + for (const factory of pipeline.factories) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { + // Only works if the factory has been attached a "credential" property. + // We do that in newPipeline() when using TokenCredential. + credential = factory.credential; + } + else if (isStorageSharedKeyCredential(factory)) { + return factory; + } + } + return credential; +} +function isStorageSharedKeyCredential(factory) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + return true; + } + return factory.constructor.name === "StorageSharedKeyCredential"; +} +function isAnonymousCredential(factory) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { + return true; + } + return factory.constructor.name === "AnonymousCredential"; +} +function isCoreHttpBearerTokenFactory(factory) { + return (0, core_auth_1.isTokenCredential)(factory.credential); +} +function isStorageBrowserPolicyFactory(factory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { + return true; + } + return factory.constructor.name === "StorageBrowserPolicyFactory"; +} +function isStorageRetryPolicyFactory(factory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { + return true; + } + return factory.constructor.name === "StorageRetryPolicyFactory"; +} +function isStorageTelemetryPolicyFactory(factory) { + return factory.constructor.name === "TelemetryPolicyFactory"; +} +function isInjectorPolicyFactory(factory) { + return factory.constructor.name === "InjectorPolicyFactory"; +} +function isCoreHttpPolicyFactory(factory) { + const knownPolicies = [ + "GenerateClientRequestIdPolicy", + "TracingPolicy", + "LogPolicy", + "ProxyPolicy", + "DisableResponseDecompressionPolicy", + "KeepAlivePolicy", + "DeserializationPolicy", + ]; + const mockHttpClient = { + sendRequest: async (request) => { + return { + request, + headers: request.headers.clone(), + status: 500, + }; + }, + }; + const mockRequestPolicyOptions = { + log(_logLevel, _message) { + /* do nothing */ + }, + shouldLog(_logLevel) { + return false; + }, + }; + const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions); + const policyName = policyInstance.constructor.name; + // bundlers sometimes add a custom suffix to the class name to make it unique + return knownPolicies.some((knownPolicyName) => { + return policyName.startsWith(knownPolicyName); + }); +} +//# sourceMappingURL=Pipeline.js.map /***/ }), -/***/ 12781: -/***/ ((module) => { +/***/ 84573: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = require("stream"); - -/***/ }), -/***/ 35356: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream/web"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.rangeToString = rangeToString; +/** + * Generate a range string. For example: + * + * "bytes=255-" or "bytes=0-511" + * + * @param iRange - + */ +function rangeToString(iRange) { + if (iRange.offset < 0) { + throw new RangeError(`Range.offset cannot be smaller than 0.`); + } + if (iRange.count && iRange.count <= 0) { + throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); + } + return iRange.count + ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` + : `bytes=${iRange.offset}-`; +} +//# sourceMappingURL=Range.js.map /***/ }), -/***/ 71576: -/***/ ((module) => { +/***/ 86562: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("string_decoder"); - -/***/ }), -/***/ 39512: -/***/ ((module) => { - -"use strict"; -module.exports = require("timers"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0; +const StorageBrowserPolicy_js_1 = __nccwpck_require__(6602); +Object.defineProperty(exports, "StorageBrowserPolicy", ({ enumerable: true, get: function () { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } })); +/** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + */ +class StorageBrowserPolicyFactory { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } +} +exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; +//# sourceMappingURL=StorageBrowserPolicyFactory.js.map /***/ }), -/***/ 24404: -/***/ ((module) => { +/***/ 39484: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("tls"); - -/***/ }), -/***/ 76224: -/***/ ((module) => { - -"use strict"; -module.exports = require("tty"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageClient = void 0; +const StorageContextClient_js_1 = __nccwpck_require__(50557); +const Pipeline_js_1 = __nccwpck_require__(33781); +const utils_common_js_1 = __nccwpck_require__(16673); +/** + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. + */ +class StorageClient { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; + /** + * Creates an instance of StorageClient. + * @param url - url to resource + * @param pipeline - request policy pipeline. + */ + constructor(url, pipeline) { + // URL should be encoded and only once, protocol layer shouldn't encode URL again + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); + this.pipeline = pipeline; + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); + // Override protocol layer's default content-type + const storageClientContext = this.storageClientContext; + storageClientContext.requestContentType = undefined; + } +} +exports.StorageClient = StorageClient; +//# sourceMappingURL=StorageClient.js.map /***/ }), -/***/ 57310: -/***/ ((module) => { +/***/ 50557: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("url"); - -/***/ }), - -/***/ 73837: -/***/ ((module) => { -"use strict"; -module.exports = require("util"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageContextClient = void 0; +const index_js_1 = __nccwpck_require__(57955); +/** + * @internal + */ +class StorageContextClient extends index_js_1.StorageClient { + async sendOperationRequest(operationArguments, operationSpec) { + const operationSpecToSend = { ...operationSpec }; + if (operationSpecToSend.path === "/{containerName}" || + operationSpecToSend.path === "/{containerName}/{blob}") { + operationSpecToSend.path = ""; + } + return super.sendOperationRequest(operationArguments, operationSpecToSend); + } +} +exports.StorageContextClient = StorageContextClient; +//# sourceMappingURL=StorageContextClient.js.map /***/ }), -/***/ 29830: -/***/ ((module) => { +/***/ 98637: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("util/types"); - -/***/ }), -/***/ 71267: -/***/ ((module) => { - -"use strict"; -module.exports = require("worker_threads"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0; +const StorageRetryPolicy_js_1 = __nccwpck_require__(34419); +Object.defineProperty(exports, "StorageRetryPolicy", ({ enumerable: true, get: function () { return StorageRetryPolicy_js_1.StorageRetryPolicy; } })); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(51772); +Object.defineProperty(exports, "StorageRetryPolicyType", ({ enumerable: true, get: function () { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } })); +/** + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. + */ +class StorageRetryPolicyFactory { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } +} +exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; +//# sourceMappingURL=StorageRetryPolicyFactory.js.map /***/ }), -/***/ 59796: -/***/ ((module) => { +/***/ 42803: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("zlib"); + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AnonymousCredential = void 0; +const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(51870); +const Credential_js_1 = __nccwpck_require__(35778); +/** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + */ +class AnonymousCredential extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } +} +exports.AnonymousCredential = AnonymousCredential; +//# sourceMappingURL=AnonymousCredential.js.map /***/ }), -/***/ 31875: +/***/ 35778: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -103518,48 +91424,28 @@ module.exports = require("zlib"); // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureKeyCredential = void 0; +exports.Credential = void 0; /** - * A static-key-based credential that supports updating - * the underlying key value. + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. */ -class AzureKeyCredential { - /** - * The value of the key to be used in authentication - */ - get key() { - return this._key; - } - /** - * Create an instance of an AzureKeyCredential for use - * with a service client. - * - * @param key - The initial value of the key to use in authentication - */ - constructor(key) { - if (!key) { - throw new Error("key must be a non-empty string"); - } - this._key = key; - } +class Credential { /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. + * Creates a RequestPolicy object. * - * @param newKey - The new key value to be used + * @param _nextPolicy - + * @param _options - */ - update(newKey) { - this._key = newKey; + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); } } -exports.AzureKeyCredential = AzureKeyCredential; -//# sourceMappingURL=azureKeyCredential.js.map +exports.Credential = Credential; +//# sourceMappingURL=Credential.js.map /***/ }), -/***/ 51377: +/***/ 59155: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103567,73 +91453,58 @@ exports.AzureKeyCredential = AzureKeyCredential; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureNamedKeyCredential = void 0; -exports.isNamedKeyCredential = isNamedKeyCredential; -const core_util_1 = __nccwpck_require__(80637); +exports.StorageSharedKeyCredential = void 0; +const node_crypto_1 = __nccwpck_require__(6005); +const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(66776); +const Credential_js_1 = __nccwpck_require__(35778); /** - * A static name/key-based credential that supports updating - * the underlying name and key values. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. */ -class AzureNamedKeyCredential { +class StorageSharedKeyCredential extends Credential_js_1.Credential { /** - * The value of the key to be used in authentication. + * Azure Storage account name; readonly. */ - get key() { - return this._key; - } + accountName; /** - * The value of the name to be used in authentication. + * Azure Storage account key; readonly. */ - get name() { - return this._name; + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); } /** - * Create an instance of an AzureNamedKeyCredential for use - * with a service client. + * Creates a StorageSharedKeyCredentialPolicy object. * - * @param name - The initial value of the name to use in authentication. - * @param key - The initial value of the key to use in authentication. + * @param nextPolicy - + * @param options - */ - constructor(name, key) { - if (!name || !key) { - throw new TypeError("name and key must be non-empty strings"); - } - this._name = name; - this._key = key; + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); } /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. + * Generates a hash signature for an HTTP request or for a SAS. * - * @param newName - The new name value to be used. - * @param newKey - The new key value to be used. + * @param stringToSign - */ - update(newName, newKey) { - if (!newName || !newKey) { - throw new TypeError("newName and newKey must be non-empty strings"); - } - this._name = newName; - this._key = newKey; + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } } -exports.AzureNamedKeyCredential = AzureNamedKeyCredential; -/** - * Tests an object to determine whether it implements NamedKeyCredential. - * - * @param credential - The assumed NamedKeyCredential to be tested. - */ -function isNamedKeyCredential(credential) { - return ((0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && - typeof credential.key === "string" && - typeof credential.name === "string"); -} -//# sourceMappingURL=azureNamedKeyCredential.js.map +exports.StorageSharedKeyCredential = StorageSharedKeyCredential; +//# sourceMappingURL=StorageSharedKeyCredential.js.map /***/ }), -/***/ 27182: +/***/ 50822: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103641,2195 +91512,14156 @@ function isNamedKeyCredential(credential) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureSASCredential = void 0; -exports.isSASCredential = isSASCredential; -const core_util_1 = __nccwpck_require__(80637); +exports.UserDelegationKeyCredential = void 0; +const node_crypto_1 = __nccwpck_require__(6005); /** - * A static-signature-based credential that supports updating - * the underlying signature value. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * UserDelegationKeyCredential is only used for generation of user delegation SAS. + * @see https://learn.microsoft.com/rest/api/storageservices/create-user-delegation-sas */ -class AzureSASCredential { +class UserDelegationKeyCredential { /** - * The value of the shared access signature to be used in authentication + * Azure Storage account name; readonly. */ - get signature() { - return this._signature; - } + accountName; /** - * Create an instance of an AzureSASCredential for use - * with a service client. - * - * @param signature - The initial value of the shared access signature to use in authentication + * Azure Storage user delegation key; readonly. */ - constructor(signature) { - if (!signature) { - throw new Error("shared access signature must be a non-empty string"); - } - this._signature = signature; + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; + /** + * Creates an instance of UserDelegationKeyCredential. + * @param accountName - + * @param userDelegationKey - + */ + constructor(accountName, userDelegationKey) { + this.accountName = accountName; + this.userDelegationKey = userDelegationKey; + this.key = Buffer.from(userDelegationKey.value, "base64"); } /** - * Change the value of the signature. - * - * Updates will take effect upon the next request after - * updating the signature value. + * Generates a hash signature for an HTTP request or for a SAS. * - * @param newSignature - The new shared access signature value to be used + * @param stringToSign - */ - update(newSignature) { - if (!newSignature) { - throw new Error("shared access signature must be a non-empty string"); - } - this._signature = newSignature; + computeHMACSHA256(stringToSign) { + // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); } } -exports.AzureSASCredential = AzureSASCredential; -/** - * Tests an object to determine whether it implements SASCredential. - * - * @param credential - The assumed SASCredential to be tested. - */ -function isSASCredential(credential) { - return ((0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"); -} -//# sourceMappingURL=azureSASCredential.js.map +exports.UserDelegationKeyCredential = UserDelegationKeyCredential; +//# sourceMappingURL=UserDelegationKeyCredential.js.map /***/ }), -/***/ 98834: +/***/ 57955: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0; -var azureKeyCredential_js_1 = __nccwpck_require__(31875); -Object.defineProperty(exports, "AzureKeyCredential", ({ enumerable: true, get: function () { return azureKeyCredential_js_1.AzureKeyCredential; } })); -var keyCredential_js_1 = __nccwpck_require__(59122); -Object.defineProperty(exports, "isKeyCredential", ({ enumerable: true, get: function () { return keyCredential_js_1.isKeyCredential; } })); -var azureNamedKeyCredential_js_1 = __nccwpck_require__(51377); -Object.defineProperty(exports, "AzureNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; } })); -Object.defineProperty(exports, "isNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.isNamedKeyCredential; } })); -var azureSASCredential_js_1 = __nccwpck_require__(27182); -Object.defineProperty(exports, "AzureSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.AzureSASCredential; } })); -Object.defineProperty(exports, "isSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.isSASCredential; } })); -var tokenCredential_js_1 = __nccwpck_require__(39162); -Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: function () { return tokenCredential_js_1.isTokenCredential; } })); +exports.StorageClient = void 0; +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(73758), exports); +var storageClient_js_1 = __nccwpck_require__(50166); +Object.defineProperty(exports, "StorageClient", ({ enumerable: true, get: function () { return storageClient_js_1.StorageClient; } })); +tslib_1.__exportStar(__nccwpck_require__(68529), exports); //# sourceMappingURL=index.js.map /***/ }), -/***/ 59122: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 73758: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isKeyCredential = isKeyCredential; -const core_util_1 = __nccwpck_require__(80637); -/** - * Tests an object to determine whether it implements KeyCredential. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * - * @param credential - The assumed KeyCredential to be tested. + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -function isKeyCredential(credential) { - return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; -} -//# sourceMappingURL=keyCredential.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.KnownStorageErrorCode = exports.KnownBlobExpiryOptions = exports.KnownFileShareTokenIntent = exports.KnownEncryptionAlgorithmType = void 0; +/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ +var KnownEncryptionAlgorithmType; +(function (KnownEncryptionAlgorithmType) { + /** AES256 */ + KnownEncryptionAlgorithmType["AES256"] = "AES256"; +})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); +/** Known values of {@link FileShareTokenIntent} that the service accepts. */ +var KnownFileShareTokenIntent; +(function (KnownFileShareTokenIntent) { + /** Backup */ + KnownFileShareTokenIntent["Backup"] = "backup"; +})(KnownFileShareTokenIntent || (exports.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); +/** Known values of {@link BlobExpiryOptions} that the service accepts. */ +var KnownBlobExpiryOptions; +(function (KnownBlobExpiryOptions) { + /** NeverExpire */ + KnownBlobExpiryOptions["NeverExpire"] = "NeverExpire"; + /** RelativeToCreation */ + KnownBlobExpiryOptions["RelativeToCreation"] = "RelativeToCreation"; + /** RelativeToNow */ + KnownBlobExpiryOptions["RelativeToNow"] = "RelativeToNow"; + /** Absolute */ + KnownBlobExpiryOptions["Absolute"] = "Absolute"; +})(KnownBlobExpiryOptions || (exports.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); +/** Known values of {@link StorageErrorCode} that the service accepts. */ +var KnownStorageErrorCode; +(function (KnownStorageErrorCode) { + /** AccountAlreadyExists */ + KnownStorageErrorCode["AccountAlreadyExists"] = "AccountAlreadyExists"; + /** AccountBeingCreated */ + KnownStorageErrorCode["AccountBeingCreated"] = "AccountBeingCreated"; + /** AccountIsDisabled */ + KnownStorageErrorCode["AccountIsDisabled"] = "AccountIsDisabled"; + /** AuthenticationFailed */ + KnownStorageErrorCode["AuthenticationFailed"] = "AuthenticationFailed"; + /** AuthorizationFailure */ + KnownStorageErrorCode["AuthorizationFailure"] = "AuthorizationFailure"; + /** ConditionHeadersNotSupported */ + KnownStorageErrorCode["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + /** ConditionNotMet */ + KnownStorageErrorCode["ConditionNotMet"] = "ConditionNotMet"; + /** EmptyMetadataKey */ + KnownStorageErrorCode["EmptyMetadataKey"] = "EmptyMetadataKey"; + /** InsufficientAccountPermissions */ + KnownStorageErrorCode["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + /** InternalError */ + KnownStorageErrorCode["InternalError"] = "InternalError"; + /** InvalidAuthenticationInfo */ + KnownStorageErrorCode["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + /** InvalidHeaderValue */ + KnownStorageErrorCode["InvalidHeaderValue"] = "InvalidHeaderValue"; + /** InvalidHttpVerb */ + KnownStorageErrorCode["InvalidHttpVerb"] = "InvalidHttpVerb"; + /** InvalidInput */ + KnownStorageErrorCode["InvalidInput"] = "InvalidInput"; + /** InvalidMd5 */ + KnownStorageErrorCode["InvalidMd5"] = "InvalidMd5"; + /** InvalidMetadata */ + KnownStorageErrorCode["InvalidMetadata"] = "InvalidMetadata"; + /** InvalidQueryParameterValue */ + KnownStorageErrorCode["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + /** InvalidRange */ + KnownStorageErrorCode["InvalidRange"] = "InvalidRange"; + /** InvalidResourceName */ + KnownStorageErrorCode["InvalidResourceName"] = "InvalidResourceName"; + /** InvalidUri */ + KnownStorageErrorCode["InvalidUri"] = "InvalidUri"; + /** InvalidXmlDocument */ + KnownStorageErrorCode["InvalidXmlDocument"] = "InvalidXmlDocument"; + /** InvalidXmlNodeValue */ + KnownStorageErrorCode["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + /** Md5Mismatch */ + KnownStorageErrorCode["Md5Mismatch"] = "Md5Mismatch"; + /** MetadataTooLarge */ + KnownStorageErrorCode["MetadataTooLarge"] = "MetadataTooLarge"; + /** MissingContentLengthHeader */ + KnownStorageErrorCode["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + /** MissingRequiredQueryParameter */ + KnownStorageErrorCode["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + /** MissingRequiredHeader */ + KnownStorageErrorCode["MissingRequiredHeader"] = "MissingRequiredHeader"; + /** MissingRequiredXmlNode */ + KnownStorageErrorCode["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + /** MultipleConditionHeadersNotSupported */ + KnownStorageErrorCode["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + /** OperationTimedOut */ + KnownStorageErrorCode["OperationTimedOut"] = "OperationTimedOut"; + /** OutOfRangeInput */ + KnownStorageErrorCode["OutOfRangeInput"] = "OutOfRangeInput"; + /** OutOfRangeQueryParameterValue */ + KnownStorageErrorCode["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + /** RequestBodyTooLarge */ + KnownStorageErrorCode["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + /** ResourceTypeMismatch */ + KnownStorageErrorCode["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + /** RequestUrlFailedToParse */ + KnownStorageErrorCode["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + /** ResourceAlreadyExists */ + KnownStorageErrorCode["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + /** ResourceNotFound */ + KnownStorageErrorCode["ResourceNotFound"] = "ResourceNotFound"; + /** ServerBusy */ + KnownStorageErrorCode["ServerBusy"] = "ServerBusy"; + /** UnsupportedHeader */ + KnownStorageErrorCode["UnsupportedHeader"] = "UnsupportedHeader"; + /** UnsupportedXmlNode */ + KnownStorageErrorCode["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + /** UnsupportedQueryParameter */ + KnownStorageErrorCode["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + /** UnsupportedHttpVerb */ + KnownStorageErrorCode["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + /** AppendPositionConditionNotMet */ + KnownStorageErrorCode["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + /** BlobAlreadyExists */ + KnownStorageErrorCode["BlobAlreadyExists"] = "BlobAlreadyExists"; + /** BlobImmutableDueToPolicy */ + KnownStorageErrorCode["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + /** BlobNotFound */ + KnownStorageErrorCode["BlobNotFound"] = "BlobNotFound"; + /** BlobOverwritten */ + KnownStorageErrorCode["BlobOverwritten"] = "BlobOverwritten"; + /** BlobTierInadequateForContentLength */ + KnownStorageErrorCode["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + /** BlobUsesCustomerSpecifiedEncryption */ + KnownStorageErrorCode["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + /** BlockCountExceedsLimit */ + KnownStorageErrorCode["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + /** BlockListTooLong */ + KnownStorageErrorCode["BlockListTooLong"] = "BlockListTooLong"; + /** CannotChangeToLowerTier */ + KnownStorageErrorCode["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + /** CannotVerifyCopySource */ + KnownStorageErrorCode["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + /** ContainerAlreadyExists */ + KnownStorageErrorCode["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + /** ContainerBeingDeleted */ + KnownStorageErrorCode["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + /** ContainerDisabled */ + KnownStorageErrorCode["ContainerDisabled"] = "ContainerDisabled"; + /** ContainerNotFound */ + KnownStorageErrorCode["ContainerNotFound"] = "ContainerNotFound"; + /** ContentLengthLargerThanTierLimit */ + KnownStorageErrorCode["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + /** CopyAcrossAccountsNotSupported */ + KnownStorageErrorCode["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + /** CopyIdMismatch */ + KnownStorageErrorCode["CopyIdMismatch"] = "CopyIdMismatch"; + /** FeatureVersionMismatch */ + KnownStorageErrorCode["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + /** IncrementalCopyBlobMismatch */ + KnownStorageErrorCode["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + /** IncrementalCopyOfEarlierVersionSnapshotNotAllowed */ + KnownStorageErrorCode["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + /** IncrementalCopySourceMustBeSnapshot */ + KnownStorageErrorCode["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + /** InfiniteLeaseDurationRequired */ + KnownStorageErrorCode["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + /** InvalidBlobOrBlock */ + KnownStorageErrorCode["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + /** InvalidBlobTier */ + KnownStorageErrorCode["InvalidBlobTier"] = "InvalidBlobTier"; + /** InvalidBlobType */ + KnownStorageErrorCode["InvalidBlobType"] = "InvalidBlobType"; + /** InvalidBlockId */ + KnownStorageErrorCode["InvalidBlockId"] = "InvalidBlockId"; + /** InvalidBlockList */ + KnownStorageErrorCode["InvalidBlockList"] = "InvalidBlockList"; + /** InvalidOperation */ + KnownStorageErrorCode["InvalidOperation"] = "InvalidOperation"; + /** InvalidPageRange */ + KnownStorageErrorCode["InvalidPageRange"] = "InvalidPageRange"; + /** InvalidSourceBlobType */ + KnownStorageErrorCode["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + /** InvalidSourceBlobUrl */ + KnownStorageErrorCode["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + /** InvalidVersionForPageBlobOperation */ + KnownStorageErrorCode["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + /** LeaseAlreadyPresent */ + KnownStorageErrorCode["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + /** LeaseAlreadyBroken */ + KnownStorageErrorCode["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + /** LeaseIdMismatchWithBlobOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + /** LeaseIdMismatchWithContainerOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + /** LeaseIdMismatchWithLeaseOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + /** LeaseIdMissing */ + KnownStorageErrorCode["LeaseIdMissing"] = "LeaseIdMissing"; + /** LeaseIsBreakingAndCannotBeAcquired */ + KnownStorageErrorCode["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + /** LeaseIsBreakingAndCannotBeChanged */ + KnownStorageErrorCode["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + /** LeaseIsBrokenAndCannotBeRenewed */ + KnownStorageErrorCode["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + /** LeaseLost */ + KnownStorageErrorCode["LeaseLost"] = "LeaseLost"; + /** LeaseNotPresentWithBlobOperation */ + KnownStorageErrorCode["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + /** LeaseNotPresentWithContainerOperation */ + KnownStorageErrorCode["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + /** LeaseNotPresentWithLeaseOperation */ + KnownStorageErrorCode["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + /** MaxBlobSizeConditionNotMet */ + KnownStorageErrorCode["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + /** NoAuthenticationInformation */ + KnownStorageErrorCode["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + /** NoPendingCopyOperation */ + KnownStorageErrorCode["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + /** OperationNotAllowedOnIncrementalCopyBlob */ + KnownStorageErrorCode["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + /** PendingCopyOperation */ + KnownStorageErrorCode["PendingCopyOperation"] = "PendingCopyOperation"; + /** PreviousSnapshotCannotBeNewer */ + KnownStorageErrorCode["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + /** PreviousSnapshotNotFound */ + KnownStorageErrorCode["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + /** PreviousSnapshotOperationNotSupported */ + KnownStorageErrorCode["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + /** SequenceNumberConditionNotMet */ + KnownStorageErrorCode["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + /** SequenceNumberIncrementTooLarge */ + KnownStorageErrorCode["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + /** SnapshotCountExceeded */ + KnownStorageErrorCode["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + /** SnapshotOperationRateExceeded */ + KnownStorageErrorCode["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + /** SnapshotsPresent */ + KnownStorageErrorCode["SnapshotsPresent"] = "SnapshotsPresent"; + /** SourceConditionNotMet */ + KnownStorageErrorCode["SourceConditionNotMet"] = "SourceConditionNotMet"; + /** SystemInUse */ + KnownStorageErrorCode["SystemInUse"] = "SystemInUse"; + /** TargetConditionNotMet */ + KnownStorageErrorCode["TargetConditionNotMet"] = "TargetConditionNotMet"; + /** UnauthorizedBlobOverwrite */ + KnownStorageErrorCode["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + /** BlobBeingRehydrated */ + KnownStorageErrorCode["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + /** BlobArchived */ + KnownStorageErrorCode["BlobArchived"] = "BlobArchived"; + /** BlobNotArchived */ + KnownStorageErrorCode["BlobNotArchived"] = "BlobNotArchived"; + /** AuthorizationSourceIPMismatch */ + KnownStorageErrorCode["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + /** AuthorizationProtocolMismatch */ + KnownStorageErrorCode["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + /** AuthorizationPermissionMismatch */ + KnownStorageErrorCode["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + /** AuthorizationServiceMismatch */ + KnownStorageErrorCode["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + /** AuthorizationResourceTypeMismatch */ + KnownStorageErrorCode["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + /** BlobAccessTierNotSupportedForAccountType */ + KnownStorageErrorCode["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; +})(KnownStorageErrorCode || (exports.KnownStorageErrorCode = KnownStorageErrorCode = {})); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 39162: +/***/ 52486: /***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBearerToken = isBearerToken; -exports.isPopToken = isPopToken; -exports.isTokenCredential = isTokenCredential; -/** - * @internal - * @param accessToken - Access token - * @returns Whether a token is bearer type or not - */ -function isBearerToken(accessToken) { - return !accessToken.tokenType || accessToken.tokenType === "Bearer"; -} -/** - * @internal - * @param accessToken - Access token - * @returns Whether a token is Pop token or not - */ -function isPopToken(accessToken) { - return accessToken.tokenType === "pop"; -} -/** - * Tests an object to determine whether it implements TokenCredential. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * - * @param credential - The assumed TokenCredential to be tested. + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -function isTokenCredential(credential) { - // Check for an object with a 'getToken' function and possibly with - // a 'signRequest' function. We do this check to make sure that - // a ServiceClientCredentials implementor (like TokenClientCredentials - // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if - // it doesn't actually implement TokenCredential also. - const castCredential = credential; - return (castCredential && - typeof castCredential.getToken === "function" && - (castCredential.signRequest === undefined || castCredential.getToken.length > 0)); -} -//# sourceMappingURL=tokenCredential.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceGetUserDelegationKeyHeaders = exports.ServiceListContainersSegmentExceptionHeaders = exports.ServiceListContainersSegmentHeaders = exports.ServiceGetStatisticsExceptionHeaders = exports.ServiceGetStatisticsHeaders = exports.ServiceGetPropertiesExceptionHeaders = exports.ServiceGetPropertiesHeaders = exports.ServiceSetPropertiesExceptionHeaders = exports.ServiceSetPropertiesHeaders = exports.ArrowField = exports.ArrowConfiguration = exports.JsonTextConfiguration = exports.DelimitedTextConfiguration = exports.QueryFormat = exports.QuerySerialization = exports.QueryRequest = exports.ClearRange = exports.PageRange = exports.PageList = exports.Block = exports.BlockList = exports.BlockLookupList = exports.BlobPrefix = exports.BlobHierarchyListSegment = exports.ListBlobsHierarchySegmentResponse = exports.BlobPropertiesInternal = exports.BlobName = exports.BlobItemInternal = exports.BlobFlatListSegment = exports.ListBlobsFlatSegmentResponse = exports.AccessPolicy = exports.SignedIdentifier = exports.BlobTag = exports.BlobTags = exports.FilterBlobItem = exports.FilterBlobSegment = exports.UserDelegationKey = exports.KeyInfo = exports.ContainerProperties = exports.ContainerItem = exports.ListContainersSegmentResponse = exports.GeoReplication = exports.BlobServiceStatistics = exports.StorageError = exports.StaticWebsite = exports.CorsRule = exports.Metrics = exports.RetentionPolicy = exports.Logging = exports.BlobServiceProperties = void 0; +exports.BlobUndeleteHeaders = exports.BlobDeleteExceptionHeaders = exports.BlobDeleteHeaders = exports.BlobGetPropertiesExceptionHeaders = exports.BlobGetPropertiesHeaders = exports.BlobDownloadExceptionHeaders = exports.BlobDownloadHeaders = exports.ContainerGetAccountInfoExceptionHeaders = exports.ContainerGetAccountInfoHeaders = exports.ContainerListBlobHierarchySegmentExceptionHeaders = exports.ContainerListBlobHierarchySegmentHeaders = exports.ContainerListBlobFlatSegmentExceptionHeaders = exports.ContainerListBlobFlatSegmentHeaders = exports.ContainerChangeLeaseExceptionHeaders = exports.ContainerChangeLeaseHeaders = exports.ContainerBreakLeaseExceptionHeaders = exports.ContainerBreakLeaseHeaders = exports.ContainerRenewLeaseExceptionHeaders = exports.ContainerRenewLeaseHeaders = exports.ContainerReleaseLeaseExceptionHeaders = exports.ContainerReleaseLeaseHeaders = exports.ContainerAcquireLeaseExceptionHeaders = exports.ContainerAcquireLeaseHeaders = exports.ContainerFilterBlobsExceptionHeaders = exports.ContainerFilterBlobsHeaders = exports.ContainerSubmitBatchExceptionHeaders = exports.ContainerSubmitBatchHeaders = exports.ContainerRenameExceptionHeaders = exports.ContainerRenameHeaders = exports.ContainerRestoreExceptionHeaders = exports.ContainerRestoreHeaders = exports.ContainerSetAccessPolicyExceptionHeaders = exports.ContainerSetAccessPolicyHeaders = exports.ContainerGetAccessPolicyExceptionHeaders = exports.ContainerGetAccessPolicyHeaders = exports.ContainerSetMetadataExceptionHeaders = exports.ContainerSetMetadataHeaders = exports.ContainerDeleteExceptionHeaders = exports.ContainerDeleteHeaders = exports.ContainerGetPropertiesExceptionHeaders = exports.ContainerGetPropertiesHeaders = exports.ContainerCreateExceptionHeaders = exports.ContainerCreateHeaders = exports.ServiceFilterBlobsExceptionHeaders = exports.ServiceFilterBlobsHeaders = exports.ServiceSubmitBatchExceptionHeaders = exports.ServiceSubmitBatchHeaders = exports.ServiceGetAccountInfoExceptionHeaders = exports.ServiceGetAccountInfoHeaders = exports.ServiceGetUserDelegationKeyExceptionHeaders = void 0; +exports.PageBlobGetPageRangesHeaders = exports.PageBlobUploadPagesFromURLExceptionHeaders = exports.PageBlobUploadPagesFromURLHeaders = exports.PageBlobClearPagesExceptionHeaders = exports.PageBlobClearPagesHeaders = exports.PageBlobUploadPagesExceptionHeaders = exports.PageBlobUploadPagesHeaders = exports.PageBlobCreateExceptionHeaders = exports.PageBlobCreateHeaders = exports.BlobSetTagsExceptionHeaders = exports.BlobSetTagsHeaders = exports.BlobGetTagsExceptionHeaders = exports.BlobGetTagsHeaders = exports.BlobQueryExceptionHeaders = exports.BlobQueryHeaders = exports.BlobGetAccountInfoExceptionHeaders = exports.BlobGetAccountInfoHeaders = exports.BlobSetTierExceptionHeaders = exports.BlobSetTierHeaders = exports.BlobAbortCopyFromURLExceptionHeaders = exports.BlobAbortCopyFromURLHeaders = exports.BlobCopyFromURLExceptionHeaders = exports.BlobCopyFromURLHeaders = exports.BlobStartCopyFromURLExceptionHeaders = exports.BlobStartCopyFromURLHeaders = exports.BlobCreateSnapshotExceptionHeaders = exports.BlobCreateSnapshotHeaders = exports.BlobBreakLeaseExceptionHeaders = exports.BlobBreakLeaseHeaders = exports.BlobChangeLeaseExceptionHeaders = exports.BlobChangeLeaseHeaders = exports.BlobRenewLeaseExceptionHeaders = exports.BlobRenewLeaseHeaders = exports.BlobReleaseLeaseExceptionHeaders = exports.BlobReleaseLeaseHeaders = exports.BlobAcquireLeaseExceptionHeaders = exports.BlobAcquireLeaseHeaders = exports.BlobSetMetadataExceptionHeaders = exports.BlobSetMetadataHeaders = exports.BlobSetLegalHoldExceptionHeaders = exports.BlobSetLegalHoldHeaders = exports.BlobDeleteImmutabilityPolicyExceptionHeaders = exports.BlobDeleteImmutabilityPolicyHeaders = exports.BlobSetImmutabilityPolicyExceptionHeaders = exports.BlobSetImmutabilityPolicyHeaders = exports.BlobSetHttpHeadersExceptionHeaders = exports.BlobSetHttpHeadersHeaders = exports.BlobSetExpiryExceptionHeaders = exports.BlobSetExpiryHeaders = exports.BlobUndeleteExceptionHeaders = void 0; +exports.BlockBlobGetBlockListExceptionHeaders = exports.BlockBlobGetBlockListHeaders = exports.BlockBlobCommitBlockListExceptionHeaders = exports.BlockBlobCommitBlockListHeaders = exports.BlockBlobStageBlockFromURLExceptionHeaders = exports.BlockBlobStageBlockFromURLHeaders = exports.BlockBlobStageBlockExceptionHeaders = exports.BlockBlobStageBlockHeaders = exports.BlockBlobPutBlobFromUrlExceptionHeaders = exports.BlockBlobPutBlobFromUrlHeaders = exports.BlockBlobUploadExceptionHeaders = exports.BlockBlobUploadHeaders = exports.AppendBlobSealExceptionHeaders = exports.AppendBlobSealHeaders = exports.AppendBlobAppendBlockFromUrlExceptionHeaders = exports.AppendBlobAppendBlockFromUrlHeaders = exports.AppendBlobAppendBlockExceptionHeaders = exports.AppendBlobAppendBlockHeaders = exports.AppendBlobCreateExceptionHeaders = exports.AppendBlobCreateHeaders = exports.PageBlobCopyIncrementalExceptionHeaders = exports.PageBlobCopyIncrementalHeaders = exports.PageBlobUpdateSequenceNumberExceptionHeaders = exports.PageBlobUpdateSequenceNumberHeaders = exports.PageBlobResizeExceptionHeaders = exports.PageBlobResizeHeaders = exports.PageBlobGetPageRangesDiffExceptionHeaders = exports.PageBlobGetPageRangesDiffHeaders = exports.PageBlobGetPageRangesExceptionHeaders = void 0; +exports.BlobServiceProperties = { + serializedName: "BlobServiceProperties", + xmlName: "StorageServiceProperties", + type: { + name: "Composite", + className: "BlobServiceProperties", + modelProperties: { + blobAnalyticsLogging: { + serializedName: "Logging", + xmlName: "Logging", + type: { + name: "Composite", + className: "Logging", + }, + }, + hourMetrics: { + serializedName: "HourMetrics", + xmlName: "HourMetrics", + type: { + name: "Composite", + className: "Metrics", + }, + }, + minuteMetrics: { + serializedName: "MinuteMetrics", + xmlName: "MinuteMetrics", + type: { + name: "Composite", + className: "Metrics", + }, + }, + cors: { + serializedName: "Cors", + xmlName: "Cors", + xmlIsWrapped: true, + xmlElementName: "CorsRule", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsRule", + }, + }, + }, + }, + defaultServiceVersion: { + serializedName: "DefaultServiceVersion", + xmlName: "DefaultServiceVersion", + type: { + name: "String", + }, + }, + deleteRetentionPolicy: { + serializedName: "DeleteRetentionPolicy", + xmlName: "DeleteRetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + }, + }, + staticWebsite: { + serializedName: "StaticWebsite", + xmlName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + }, + }, + }, + }, +}; +exports.Logging = { + serializedName: "Logging", + type: { + name: "Composite", + className: "Logging", + modelProperties: { + version: { + serializedName: "Version", + required: true, + xmlName: "Version", + type: { + name: "String", + }, + }, + deleteProperty: { + serializedName: "Delete", + required: true, + xmlName: "Delete", + type: { + name: "Boolean", + }, + }, + read: { + serializedName: "Read", + required: true, + xmlName: "Read", + type: { + name: "Boolean", + }, + }, + write: { + serializedName: "Write", + required: true, + xmlName: "Write", + type: { + name: "Boolean", + }, + }, + retentionPolicy: { + serializedName: "RetentionPolicy", + xmlName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + }, + }, + }, + }, +}; +exports.RetentionPolicy = { + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + modelProperties: { + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { + name: "Boolean", + }, + }, + days: { + constraints: { + InclusiveMinimum: 1, + }, + serializedName: "Days", + xmlName: "Days", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.Metrics = { + serializedName: "Metrics", + type: { + name: "Composite", + className: "Metrics", + modelProperties: { + version: { + serializedName: "Version", + xmlName: "Version", + type: { + name: "String", + }, + }, + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { + name: "Boolean", + }, + }, + includeAPIs: { + serializedName: "IncludeAPIs", + xmlName: "IncludeAPIs", + type: { + name: "Boolean", + }, + }, + retentionPolicy: { + serializedName: "RetentionPolicy", + xmlName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + }, + }, + }, + }, +}; +exports.CorsRule = { + serializedName: "CorsRule", + type: { + name: "Composite", + className: "CorsRule", + modelProperties: { + allowedOrigins: { + serializedName: "AllowedOrigins", + required: true, + xmlName: "AllowedOrigins", + type: { + name: "String", + }, + }, + allowedMethods: { + serializedName: "AllowedMethods", + required: true, + xmlName: "AllowedMethods", + type: { + name: "String", + }, + }, + allowedHeaders: { + serializedName: "AllowedHeaders", + required: true, + xmlName: "AllowedHeaders", + type: { + name: "String", + }, + }, + exposedHeaders: { + serializedName: "ExposedHeaders", + required: true, + xmlName: "ExposedHeaders", + type: { + name: "String", + }, + }, + maxAgeInSeconds: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "MaxAgeInSeconds", + required: true, + xmlName: "MaxAgeInSeconds", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.StaticWebsite = { + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + modelProperties: { + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { + name: "Boolean", + }, + }, + indexDocument: { + serializedName: "IndexDocument", + xmlName: "IndexDocument", + type: { + name: "String", + }, + }, + errorDocument404Path: { + serializedName: "ErrorDocument404Path", + xmlName: "ErrorDocument404Path", + type: { + name: "String", + }, + }, + defaultIndexDocumentPath: { + serializedName: "DefaultIndexDocumentPath", + xmlName: "DefaultIndexDocumentPath", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.StorageError = { + serializedName: "StorageError", + type: { + name: "Composite", + className: "StorageError", + modelProperties: { + message: { + serializedName: "Message", + xmlName: "Message", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number", + }, + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String", + }, + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String", + }, + }, + code: { + serializedName: "Code", + xmlName: "Code", + type: { + name: "String", + }, + }, + authenticationErrorDetail: { + serializedName: "AuthenticationErrorDetail", + xmlName: "AuthenticationErrorDetail", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobServiceStatistics = { + serializedName: "BlobServiceStatistics", + xmlName: "StorageServiceStats", + type: { + name: "Composite", + className: "BlobServiceStatistics", + modelProperties: { + geoReplication: { + serializedName: "GeoReplication", + xmlName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication", + }, + }, + }, + }, +}; +exports.GeoReplication = { + serializedName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication", + modelProperties: { + status: { + serializedName: "Status", + required: true, + xmlName: "Status", + type: { + name: "Enum", + allowedValues: ["live", "bootstrap", "unavailable"], + }, + }, + lastSyncOn: { + serializedName: "LastSyncTime", + required: true, + xmlName: "LastSyncTime", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ListContainersSegmentResponse = { + serializedName: "ListContainersSegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListContainersSegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { + name: "String", + }, + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { + name: "String", + }, + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { + name: "Number", + }, + }, + containerItems: { + serializedName: "ContainerItems", + required: true, + xmlName: "Containers", + xmlIsWrapped: true, + xmlElementName: "Container", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerItem", + }, + }, + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerItem = { + serializedName: "ContainerItem", + xmlName: "Container", + type: { + name: "Composite", + className: "ContainerItem", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { + name: "String", + }, + }, + deleted: { + serializedName: "Deleted", + xmlName: "Deleted", + type: { + name: "Boolean", + }, + }, + version: { + serializedName: "Version", + xmlName: "Version", + type: { + name: "String", + }, + }, + properties: { + serializedName: "Properties", + xmlName: "Properties", + type: { + name: "Composite", + className: "ContainerProperties", + }, + }, + metadata: { + serializedName: "Metadata", + xmlName: "Metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; +exports.ContainerProperties = { + serializedName: "ContainerProperties", + type: { + name: "Composite", + className: "ContainerProperties", + modelProperties: { + lastModified: { + serializedName: "Last-Modified", + required: true, + xmlName: "Last-Modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "Etag", + required: true, + xmlName: "Etag", + type: { + name: "String", + }, + }, + leaseStatus: { + serializedName: "LeaseStatus", + xmlName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + leaseState: { + serializedName: "LeaseState", + xmlName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseDuration: { + serializedName: "LeaseDuration", + xmlName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + publicAccess: { + serializedName: "PublicAccess", + xmlName: "PublicAccess", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, + hasImmutabilityPolicy: { + serializedName: "HasImmutabilityPolicy", + xmlName: "HasImmutabilityPolicy", + type: { + name: "Boolean", + }, + }, + hasLegalHold: { + serializedName: "HasLegalHold", + xmlName: "HasLegalHold", + type: { + name: "Boolean", + }, + }, + defaultEncryptionScope: { + serializedName: "DefaultEncryptionScope", + xmlName: "DefaultEncryptionScope", + type: { + name: "String", + }, + }, + preventEncryptionScopeOverride: { + serializedName: "DenyEncryptionScopeOverride", + xmlName: "DenyEncryptionScopeOverride", + type: { + name: "Boolean", + }, + }, + deletedOn: { + serializedName: "DeletedTime", + xmlName: "DeletedTime", + type: { + name: "DateTimeRfc1123", + }, + }, + remainingRetentionDays: { + serializedName: "RemainingRetentionDays", + xmlName: "RemainingRetentionDays", + type: { + name: "Number", + }, + }, + isImmutableStorageWithVersioningEnabled: { + serializedName: "ImmutableStorageWithVersioningEnabled", + xmlName: "ImmutableStorageWithVersioningEnabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.KeyInfo = { + serializedName: "KeyInfo", + type: { + name: "Composite", + className: "KeyInfo", + modelProperties: { + startsOn: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { + name: "String", + }, + }, + expiresOn: { + serializedName: "Expiry", + required: true, + xmlName: "Expiry", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.UserDelegationKey = { + serializedName: "UserDelegationKey", + type: { + name: "Composite", + className: "UserDelegationKey", + modelProperties: { + signedObjectId: { + serializedName: "SignedOid", + required: true, + xmlName: "SignedOid", + type: { + name: "String", + }, + }, + signedTenantId: { + serializedName: "SignedTid", + required: true, + xmlName: "SignedTid", + type: { + name: "String", + }, + }, + signedStartsOn: { + serializedName: "SignedStart", + required: true, + xmlName: "SignedStart", + type: { + name: "String", + }, + }, + signedExpiresOn: { + serializedName: "SignedExpiry", + required: true, + xmlName: "SignedExpiry", + type: { + name: "String", + }, + }, + signedService: { + serializedName: "SignedService", + required: true, + xmlName: "SignedService", + type: { + name: "String", + }, + }, + signedVersion: { + serializedName: "SignedVersion", + required: true, + xmlName: "SignedVersion", + type: { + name: "String", + }, + }, + value: { + serializedName: "Value", + required: true, + xmlName: "Value", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.FilterBlobSegment = { + serializedName: "FilterBlobSegment", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "FilterBlobSegment", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + where: { + serializedName: "Where", + required: true, + xmlName: "Where", + type: { + name: "String", + }, + }, + blobs: { + serializedName: "Blobs", + required: true, + xmlName: "Blobs", + xmlIsWrapped: true, + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterBlobItem", + }, + }, + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.FilterBlobItem = { + serializedName: "FilterBlobItem", + xmlName: "Blob", + type: { + name: "Composite", + className: "FilterBlobItem", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { + name: "String", + }, + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + type: { + name: "String", + }, + }, + tags: { + serializedName: "Tags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags", + }, + }, + }, + }, +}; +exports.BlobTags = { + serializedName: "BlobTags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags", + modelProperties: { + blobTagSet: { + serializedName: "BlobTagSet", + required: true, + xmlName: "TagSet", + xmlIsWrapped: true, + xmlElementName: "Tag", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobTag", + }, + }, + }, + }, + }, + }, +}; +exports.BlobTag = { + serializedName: "BlobTag", + xmlName: "Tag", + type: { + name: "Composite", + className: "BlobTag", + modelProperties: { + key: { + serializedName: "Key", + required: true, + xmlName: "Key", + type: { + name: "String", + }, + }, + value: { + serializedName: "Value", + required: true, + xmlName: "Value", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.SignedIdentifier = { + serializedName: "SignedIdentifier", + xmlName: "SignedIdentifier", + type: { + name: "Composite", + className: "SignedIdentifier", + modelProperties: { + id: { + serializedName: "Id", + required: true, + xmlName: "Id", + type: { + name: "String", + }, + }, + accessPolicy: { + serializedName: "AccessPolicy", + xmlName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy", + }, + }, + }, + }, +}; +exports.AccessPolicy = { + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy", + modelProperties: { + startsOn: { + serializedName: "Start", + xmlName: "Start", + type: { + name: "String", + }, + }, + expiresOn: { + serializedName: "Expiry", + xmlName: "Expiry", + type: { + name: "String", + }, + }, + permissions: { + serializedName: "Permission", + xmlName: "Permission", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ListBlobsFlatSegmentResponse = { + serializedName: "ListBlobsFlatSegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListBlobsFlatSegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { + name: "String", + }, + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { + name: "String", + }, + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { + name: "Number", + }, + }, + segment: { + serializedName: "Segment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobFlatListSegment", + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobFlatListSegment = { + serializedName: "BlobFlatListSegment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobFlatListSegment", + modelProperties: { + blobItems: { + serializedName: "BlobItems", + required: true, + xmlName: "BlobItems", + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal", + }, + }, + }, + }, + }, + }, +}; +exports.BlobItemInternal = { + serializedName: "BlobItemInternal", + xmlName: "Blob", + type: { + name: "Composite", + className: "BlobItemInternal", + modelProperties: { + name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "Composite", + className: "BlobName", + }, + }, + deleted: { + serializedName: "Deleted", + required: true, + xmlName: "Deleted", + type: { + name: "Boolean", + }, + }, + snapshot: { + serializedName: "Snapshot", + required: true, + xmlName: "Snapshot", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "VersionId", + xmlName: "VersionId", + type: { + name: "String", + }, + }, + isCurrentVersion: { + serializedName: "IsCurrentVersion", + xmlName: "IsCurrentVersion", + type: { + name: "Boolean", + }, + }, + properties: { + serializedName: "Properties", + xmlName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal", + }, + }, + metadata: { + serializedName: "Metadata", + xmlName: "Metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + blobTags: { + serializedName: "BlobTags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags", + }, + }, + objectReplicationMetadata: { + serializedName: "ObjectReplicationMetadata", + xmlName: "OrMetadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + hasVersionsOnly: { + serializedName: "HasVersionsOnly", + xmlName: "HasVersionsOnly", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.BlobName = { + serializedName: "BlobName", + type: { + name: "Composite", + className: "BlobName", + modelProperties: { + encoded: { + serializedName: "Encoded", + xmlName: "Encoded", + xmlIsAttribute: true, + type: { + name: "Boolean", + }, + }, + content: { + serializedName: "content", + xmlName: "content", + xmlIsMsText: true, + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobPropertiesInternal = { + serializedName: "BlobPropertiesInternal", + xmlName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal", + modelProperties: { + createdOn: { + serializedName: "Creation-Time", + xmlName: "Creation-Time", + type: { + name: "DateTimeRfc1123", + }, + }, + lastModified: { + serializedName: "Last-Modified", + required: true, + xmlName: "Last-Modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "Etag", + required: true, + xmlName: "Etag", + type: { + name: "String", + }, + }, + contentLength: { + serializedName: "Content-Length", + xmlName: "Content-Length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "Content-Type", + xmlName: "Content-Type", + type: { + name: "String", + }, + }, + contentEncoding: { + serializedName: "Content-Encoding", + xmlName: "Content-Encoding", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "Content-Language", + xmlName: "Content-Language", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "Content-MD5", + xmlName: "Content-MD5", + type: { + name: "ByteArray", + }, + }, + contentDisposition: { + serializedName: "Content-Disposition", + xmlName: "Content-Disposition", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "Cache-Control", + xmlName: "Cache-Control", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + blobType: { + serializedName: "BlobType", + xmlName: "BlobType", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + leaseStatus: { + serializedName: "LeaseStatus", + xmlName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + leaseState: { + serializedName: "LeaseState", + xmlName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseDuration: { + serializedName: "LeaseDuration", + xmlName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + copyId: { + serializedName: "CopyId", + xmlName: "CopyId", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "CopyStatus", + xmlName: "CopyStatus", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + copySource: { + serializedName: "CopySource", + xmlName: "CopySource", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "CopyProgress", + xmlName: "CopyProgress", + type: { + name: "String", + }, + }, + copyCompletedOn: { + serializedName: "CopyCompletionTime", + xmlName: "CopyCompletionTime", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "CopyStatusDescription", + xmlName: "CopyStatusDescription", + type: { + name: "String", + }, + }, + serverEncrypted: { + serializedName: "ServerEncrypted", + xmlName: "ServerEncrypted", + type: { + name: "Boolean", + }, + }, + incrementalCopy: { + serializedName: "IncrementalCopy", + xmlName: "IncrementalCopy", + type: { + name: "Boolean", + }, + }, + destinationSnapshot: { + serializedName: "DestinationSnapshot", + xmlName: "DestinationSnapshot", + type: { + name: "String", + }, + }, + deletedOn: { + serializedName: "DeletedTime", + xmlName: "DeletedTime", + type: { + name: "DateTimeRfc1123", + }, + }, + remainingRetentionDays: { + serializedName: "RemainingRetentionDays", + xmlName: "RemainingRetentionDays", + type: { + name: "Number", + }, + }, + accessTier: { + serializedName: "AccessTier", + xmlName: "AccessTier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold", + ], + }, + }, + accessTierInferred: { + serializedName: "AccessTierInferred", + xmlName: "AccessTierInferred", + type: { + name: "Boolean", + }, + }, + archiveStatus: { + serializedName: "ArchiveStatus", + xmlName: "ArchiveStatus", + type: { + name: "Enum", + allowedValues: [ + "rehydrate-pending-to-hot", + "rehydrate-pending-to-cool", + "rehydrate-pending-to-cold", + ], + }, + }, + customerProvidedKeySha256: { + serializedName: "CustomerProvidedKeySha256", + xmlName: "CustomerProvidedKeySha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "EncryptionScope", + xmlName: "EncryptionScope", + type: { + name: "String", + }, + }, + accessTierChangedOn: { + serializedName: "AccessTierChangeTime", + xmlName: "AccessTierChangeTime", + type: { + name: "DateTimeRfc1123", + }, + }, + tagCount: { + serializedName: "TagCount", + xmlName: "TagCount", + type: { + name: "Number", + }, + }, + expiresOn: { + serializedName: "Expiry-Time", + xmlName: "Expiry-Time", + type: { + name: "DateTimeRfc1123", + }, + }, + isSealed: { + serializedName: "Sealed", + xmlName: "Sealed", + type: { + name: "Boolean", + }, + }, + rehydratePriority: { + serializedName: "RehydratePriority", + xmlName: "RehydratePriority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"], + }, + }, + lastAccessedOn: { + serializedName: "LastAccessTime", + xmlName: "LastAccessTime", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiresOn: { + serializedName: "ImmutabilityPolicyUntilDate", + xmlName: "ImmutabilityPolicyUntilDate", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "ImmutabilityPolicyMode", + xmlName: "ImmutabilityPolicyMode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + legalHold: { + serializedName: "LegalHold", + xmlName: "LegalHold", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.ListBlobsHierarchySegmentResponse = { + serializedName: "ListBlobsHierarchySegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListBlobsHierarchySegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { + name: "String", + }, + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { + name: "String", + }, + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { + name: "Number", + }, + }, + delimiter: { + serializedName: "Delimiter", + xmlName: "Delimiter", + type: { + name: "String", + }, + }, + segment: { + serializedName: "Segment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobHierarchyListSegment", + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobHierarchyListSegment = { + serializedName: "BlobHierarchyListSegment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobHierarchyListSegment", + modelProperties: { + blobPrefixes: { + serializedName: "BlobPrefixes", + xmlName: "BlobPrefixes", + xmlElementName: "BlobPrefix", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobPrefix", + }, + }, + }, + }, + blobItems: { + serializedName: "BlobItems", + required: true, + xmlName: "BlobItems", + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal", + }, + }, + }, + }, + }, + }, +}; +exports.BlobPrefix = { + serializedName: "BlobPrefix", + type: { + name: "Composite", + className: "BlobPrefix", + modelProperties: { + name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "Composite", + className: "BlobName", + }, + }, + }, + }, +}; +exports.BlockLookupList = { + serializedName: "BlockLookupList", + xmlName: "BlockList", + type: { + name: "Composite", + className: "BlockLookupList", + modelProperties: { + committed: { + serializedName: "Committed", + xmlName: "Committed", + xmlElementName: "Committed", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + uncommitted: { + serializedName: "Uncommitted", + xmlName: "Uncommitted", + xmlElementName: "Uncommitted", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + latest: { + serializedName: "Latest", + xmlName: "Latest", + xmlElementName: "Latest", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; +exports.BlockList = { + serializedName: "BlockList", + type: { + name: "Composite", + className: "BlockList", + modelProperties: { + committedBlocks: { + serializedName: "CommittedBlocks", + xmlName: "CommittedBlocks", + xmlIsWrapped: true, + xmlElementName: "Block", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block", + }, + }, + }, + }, + uncommittedBlocks: { + serializedName: "UncommittedBlocks", + xmlName: "UncommittedBlocks", + xmlIsWrapped: true, + xmlElementName: "Block", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block", + }, + }, + }, + }, + }, + }, +}; +exports.Block = { + serializedName: "Block", + type: { + name: "Composite", + className: "Block", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { + name: "String", + }, + }, + size: { + serializedName: "Size", + required: true, + xmlName: "Size", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.PageList = { + serializedName: "PageList", + type: { + name: "Composite", + className: "PageList", + modelProperties: { + pageRange: { + serializedName: "PageRange", + xmlName: "PageRange", + xmlElementName: "PageRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PageRange", + }, + }, + }, + }, + clearRange: { + serializedName: "ClearRange", + xmlName: "ClearRange", + xmlElementName: "ClearRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClearRange", + }, + }, + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageRange = { + serializedName: "PageRange", + xmlName: "PageRange", + type: { + name: "Composite", + className: "PageRange", + modelProperties: { + start: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { + name: "Number", + }, + }, + end: { + serializedName: "End", + required: true, + xmlName: "End", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.ClearRange = { + serializedName: "ClearRange", + xmlName: "ClearRange", + type: { + name: "Composite", + className: "ClearRange", + modelProperties: { + start: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { + name: "Number", + }, + }, + end: { + serializedName: "End", + required: true, + xmlName: "End", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.QueryRequest = { + serializedName: "QueryRequest", + xmlName: "QueryRequest", + type: { + name: "Composite", + className: "QueryRequest", + modelProperties: { + queryType: { + serializedName: "QueryType", + required: true, + xmlName: "QueryType", + type: { + name: "String", + }, + }, + expression: { + serializedName: "Expression", + required: true, + xmlName: "Expression", + type: { + name: "String", + }, + }, + inputSerialization: { + serializedName: "InputSerialization", + xmlName: "InputSerialization", + type: { + name: "Composite", + className: "QuerySerialization", + }, + }, + outputSerialization: { + serializedName: "OutputSerialization", + xmlName: "OutputSerialization", + type: { + name: "Composite", + className: "QuerySerialization", + }, + }, + }, + }, +}; +exports.QuerySerialization = { + serializedName: "QuerySerialization", + type: { + name: "Composite", + className: "QuerySerialization", + modelProperties: { + format: { + serializedName: "Format", + xmlName: "Format", + type: { + name: "Composite", + className: "QueryFormat", + }, + }, + }, + }, +}; +exports.QueryFormat = { + serializedName: "QueryFormat", + type: { + name: "Composite", + className: "QueryFormat", + modelProperties: { + type: { + serializedName: "Type", + required: true, + xmlName: "Type", + type: { + name: "Enum", + allowedValues: ["delimited", "json", "arrow", "parquet"], + }, + }, + delimitedTextConfiguration: { + serializedName: "DelimitedTextConfiguration", + xmlName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + }, + }, + jsonTextConfiguration: { + serializedName: "JsonTextConfiguration", + xmlName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + }, + }, + arrowConfiguration: { + serializedName: "ArrowConfiguration", + xmlName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration", + }, + }, + parquetTextConfiguration: { + serializedName: "ParquetTextConfiguration", + xmlName: "ParquetTextConfiguration", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; +exports.DelimitedTextConfiguration = { + serializedName: "DelimitedTextConfiguration", + xmlName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + modelProperties: { + columnSeparator: { + serializedName: "ColumnSeparator", + xmlName: "ColumnSeparator", + type: { + name: "String", + }, + }, + fieldQuote: { + serializedName: "FieldQuote", + xmlName: "FieldQuote", + type: { + name: "String", + }, + }, + recordSeparator: { + serializedName: "RecordSeparator", + xmlName: "RecordSeparator", + type: { + name: "String", + }, + }, + escapeChar: { + serializedName: "EscapeChar", + xmlName: "EscapeChar", + type: { + name: "String", + }, + }, + headersPresent: { + serializedName: "HeadersPresent", + xmlName: "HasHeaders", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.JsonTextConfiguration = { + serializedName: "JsonTextConfiguration", + xmlName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + modelProperties: { + recordSeparator: { + serializedName: "RecordSeparator", + xmlName: "RecordSeparator", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ArrowConfiguration = { + serializedName: "ArrowConfiguration", + xmlName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration", + modelProperties: { + schema: { + serializedName: "Schema", + required: true, + xmlName: "Schema", + xmlIsWrapped: true, + xmlElementName: "Field", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArrowField", + }, + }, + }, + }, + }, + }, +}; +exports.ArrowField = { + serializedName: "ArrowField", + xmlName: "Field", + type: { + name: "Composite", + className: "ArrowField", + modelProperties: { + type: { + serializedName: "Type", + required: true, + xmlName: "Type", + type: { + name: "String", + }, + }, + name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "String", + }, + }, + precision: { + serializedName: "Precision", + xmlName: "Precision", + type: { + name: "Number", + }, + }, + scale: { + serializedName: "Scale", + xmlName: "Scale", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.ServiceSetPropertiesHeaders = { + serializedName: "Service_setPropertiesHeaders", + type: { + name: "Composite", + className: "ServiceSetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceSetPropertiesExceptionHeaders = { + serializedName: "Service_setPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ServiceSetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetPropertiesHeaders = { + serializedName: "Service_getPropertiesHeaders", + type: { + name: "Composite", + className: "ServiceGetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetPropertiesExceptionHeaders = { + serializedName: "Service_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetStatisticsHeaders = { + serializedName: "Service_getStatisticsHeaders", + type: { + name: "Composite", + className: "ServiceGetStatisticsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetStatisticsExceptionHeaders = { + serializedName: "Service_getStatisticsExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetStatisticsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceListContainersSegmentHeaders = { + serializedName: "Service_listContainersSegmentHeaders", + type: { + name: "Composite", + className: "ServiceListContainersSegmentHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceListContainersSegmentExceptionHeaders = { + serializedName: "Service_listContainersSegmentExceptionHeaders", + type: { + name: "Composite", + className: "ServiceListContainersSegmentExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetUserDelegationKeyHeaders = { + serializedName: "Service_getUserDelegationKeyHeaders", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetUserDelegationKeyExceptionHeaders = { + serializedName: "Service_getUserDelegationKeyExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetAccountInfoHeaders = { + serializedName: "Service_getAccountInfoHeaders", + type: { + name: "Composite", + className: "ServiceGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + ], + }, + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage", + ], + }, + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetAccountInfoExceptionHeaders = { + serializedName: "Service_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetAccountInfoExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceSubmitBatchHeaders = { + serializedName: "Service_submitBatchHeaders", + type: { + name: "Composite", + className: "ServiceSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceSubmitBatchExceptionHeaders = { + serializedName: "Service_submitBatchExceptionHeaders", + type: { + name: "Composite", + className: "ServiceSubmitBatchExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceFilterBlobsHeaders = { + serializedName: "Service_filterBlobsHeaders", + type: { + name: "Composite", + className: "ServiceFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceFilterBlobsExceptionHeaders = { + serializedName: "Service_filterBlobsExceptionHeaders", + type: { + name: "Composite", + className: "ServiceFilterBlobsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerCreateHeaders = { + serializedName: "Container_createHeaders", + type: { + name: "Composite", + className: "ContainerCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerCreateExceptionHeaders = { + serializedName: "Container_createExceptionHeaders", + type: { + name: "Composite", + className: "ContainerCreateExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetPropertiesHeaders = { + serializedName: "Container_getPropertiesHeaders", + type: { + name: "Composite", + className: "ContainerGetPropertiesHeaders", + modelProperties: { + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, + hasImmutabilityPolicy: { + serializedName: "x-ms-has-immutability-policy", + xmlName: "x-ms-has-immutability-policy", + type: { + name: "Boolean", + }, + }, + hasLegalHold: { + serializedName: "x-ms-has-legal-hold", + xmlName: "x-ms-has-legal-hold", + type: { + name: "Boolean", + }, + }, + defaultEncryptionScope: { + serializedName: "x-ms-default-encryption-scope", + xmlName: "x-ms-default-encryption-scope", + type: { + name: "String", + }, + }, + denyEncryptionScopeOverride: { + serializedName: "x-ms-deny-encryption-scope-override", + xmlName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean", + }, + }, + isImmutableStorageWithVersioningEnabled: { + serializedName: "x-ms-immutable-storage-with-versioning-enabled", + xmlName: "x-ms-immutable-storage-with-versioning-enabled", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetPropertiesExceptionHeaders = { + serializedName: "Container_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerDeleteHeaders = { + serializedName: "Container_deleteHeaders", + type: { + name: "Composite", + className: "ContainerDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerDeleteExceptionHeaders = { + serializedName: "Container_deleteExceptionHeaders", + type: { + name: "Composite", + className: "ContainerDeleteExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetMetadataHeaders = { + serializedName: "Container_setMetadataHeaders", + type: { + name: "Composite", + className: "ContainerSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetMetadataExceptionHeaders = { + serializedName: "Container_setMetadataExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSetMetadataExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetAccessPolicyHeaders = { + serializedName: "Container_getAccessPolicyHeaders", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyHeaders", + modelProperties: { + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetAccessPolicyExceptionHeaders = { + serializedName: "Container_getAccessPolicyExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetAccessPolicyHeaders = { + serializedName: "Container_setAccessPolicyHeaders", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetAccessPolicyExceptionHeaders = { + serializedName: "Container_setAccessPolicyExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRestoreHeaders = { + serializedName: "Container_restoreHeaders", + type: { + name: "Composite", + className: "ContainerRestoreHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRestoreExceptionHeaders = { + serializedName: "Container_restoreExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRestoreExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRenameHeaders = { + serializedName: "Container_renameHeaders", + type: { + name: "Composite", + className: "ContainerRenameHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRenameExceptionHeaders = { + serializedName: "Container_renameExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRenameExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSubmitBatchHeaders = { + serializedName: "Container_submitBatchHeaders", + type: { + name: "Composite", + className: "ContainerSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSubmitBatchExceptionHeaders = { + serializedName: "Container_submitBatchExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSubmitBatchExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerFilterBlobsHeaders = { + serializedName: "Container_filterBlobsHeaders", + type: { + name: "Composite", + className: "ContainerFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerFilterBlobsExceptionHeaders = { + serializedName: "Container_filterBlobsExceptionHeaders", + type: { + name: "Composite", + className: "ContainerFilterBlobsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerAcquireLeaseHeaders = { + serializedName: "Container_acquireLeaseHeaders", + type: { + name: "Composite", + className: "ContainerAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerAcquireLeaseExceptionHeaders = { + serializedName: "Container_acquireLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerAcquireLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerReleaseLeaseHeaders = { + serializedName: "Container_releaseLeaseHeaders", + type: { + name: "Composite", + className: "ContainerReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerReleaseLeaseExceptionHeaders = { + serializedName: "Container_releaseLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerReleaseLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRenewLeaseHeaders = { + serializedName: "Container_renewLeaseHeaders", + type: { + name: "Composite", + className: "ContainerRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerRenewLeaseExceptionHeaders = { + serializedName: "Container_renewLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRenewLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerBreakLeaseHeaders = { + serializedName: "Container_breakLeaseHeaders", + type: { + name: "Composite", + className: "ContainerBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseTime: { + serializedName: "x-ms-lease-time", + xmlName: "x-ms-lease-time", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerBreakLeaseExceptionHeaders = { + serializedName: "Container_breakLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerBreakLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerChangeLeaseHeaders = { + serializedName: "Container_changeLeaseHeaders", + type: { + name: "Composite", + className: "ContainerChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerChangeLeaseExceptionHeaders = { + serializedName: "Container_changeLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerChangeLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobFlatSegmentHeaders = { + serializedName: "Container_listBlobFlatSegmentHeaders", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobFlatSegmentExceptionHeaders = { + serializedName: "Container_listBlobFlatSegmentExceptionHeaders", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobHierarchySegmentHeaders = { + serializedName: "Container_listBlobHierarchySegmentHeaders", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobHierarchySegmentExceptionHeaders = { + serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetAccountInfoHeaders = { + serializedName: "Container_getAccountInfoHeaders", + type: { + name: "Composite", + className: "ContainerGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + ], + }, + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage", + ], + }, + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.ContainerGetAccountInfoExceptionHeaders = { + serializedName: "Container_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetAccountInfoExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDownloadHeaders = { + serializedName: "Blob_downloadHeaders", + type: { + name: "Composite", + className: "BlobDownloadHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + createdOn: { + serializedName: "x-ms-creation-time", + xmlName: "x-ms-creation-time", + type: { + name: "DateTimeRfc1123", + }, + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + xmlName: "x-ms-or-policy-id", + type: { + name: "String", + }, + }, + objectReplicationRules: { + serializedName: "x-ms-or", + headerCollectionPrefix: "x-ms-or-", + xmlName: "x-ms-or", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + contentRange: { + serializedName: "content-range", + xmlName: "content-range", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { + name: "String", + }, + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { + name: "String", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { + name: "String", + }, + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + xmlName: "x-ms-is-current-version", + type: { + name: "Boolean", + }, + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { + name: "ByteArray", + }, + }, + tagCount: { + serializedName: "x-ms-tag-count", + xmlName: "x-ms-tag-count", + type: { + name: "Number", + }, + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { + name: "Boolean", + }, + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + xmlName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiresOn: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + }, + }, +}; +exports.BlobDownloadExceptionHeaders = { + serializedName: "Blob_downloadExceptionHeaders", + type: { + name: "Composite", + className: "BlobDownloadExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetPropertiesHeaders = { + serializedName: "Blob_getPropertiesHeaders", + type: { + name: "Composite", + className: "BlobGetPropertiesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + createdOn: { + serializedName: "x-ms-creation-time", + xmlName: "x-ms-creation-time", + type: { + name: "DateTimeRfc1123", + }, + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + xmlName: "x-ms-or-policy-id", + type: { + name: "String", + }, + }, + objectReplicationRules: { + serializedName: "x-ms-or", + headerCollectionPrefix: "x-ms-or-", + xmlName: "x-ms-or", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { + name: "String", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { + name: "String", + }, + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + isIncrementalCopy: { + serializedName: "x-ms-incremental-copy", + xmlName: "x-ms-incremental-copy", + type: { + name: "Boolean", + }, + }, + destinationSnapshot: { + serializedName: "x-ms-copy-destination-snapshot", + xmlName: "x-ms-copy-destination-snapshot", + type: { + name: "String", + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { + name: "String", + }, + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { + name: "String", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + accessTier: { + serializedName: "x-ms-access-tier", + xmlName: "x-ms-access-tier", + type: { + name: "String", + }, + }, + accessTierInferred: { + serializedName: "x-ms-access-tier-inferred", + xmlName: "x-ms-access-tier-inferred", + type: { + name: "Boolean", + }, + }, + archiveStatus: { + serializedName: "x-ms-archive-status", + xmlName: "x-ms-archive-status", + type: { + name: "String", + }, + }, + accessTierChangedOn: { + serializedName: "x-ms-access-tier-change-time", + xmlName: "x-ms-access-tier-change-time", + type: { + name: "DateTimeRfc1123", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + xmlName: "x-ms-is-current-version", + type: { + name: "Boolean", + }, + }, + tagCount: { + serializedName: "x-ms-tag-count", + xmlName: "x-ms-tag-count", + type: { + name: "Number", + }, + }, + expiresOn: { + serializedName: "x-ms-expiry-time", + xmlName: "x-ms-expiry-time", + type: { + name: "DateTimeRfc1123", + }, + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { + name: "Boolean", + }, + }, + rehydratePriority: { + serializedName: "x-ms-rehydrate-priority", + xmlName: "x-ms-rehydrate-priority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"], + }, + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + xmlName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiresOn: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetPropertiesExceptionHeaders = { + serializedName: "Blob_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDeleteHeaders = { + serializedName: "Blob_deleteHeaders", + type: { + name: "Composite", + className: "BlobDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDeleteExceptionHeaders = { + serializedName: "Blob_deleteExceptionHeaders", + type: { + name: "Composite", + className: "BlobDeleteExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobUndeleteHeaders = { + serializedName: "Blob_undeleteHeaders", + type: { + name: "Composite", + className: "BlobUndeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobUndeleteExceptionHeaders = { + serializedName: "Blob_undeleteExceptionHeaders", + type: { + name: "Composite", + className: "BlobUndeleteExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetExpiryHeaders = { + serializedName: "Blob_setExpiryHeaders", + type: { + name: "Composite", + className: "BlobSetExpiryHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobSetExpiryExceptionHeaders = { + serializedName: "Blob_setExpiryExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetExpiryExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetHttpHeadersHeaders = { + serializedName: "Blob_setHttpHeadersHeaders", + type: { + name: "Composite", + className: "BlobSetHttpHeadersHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetHttpHeadersExceptionHeaders = { + serializedName: "Blob_setHttpHeadersExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetHttpHeadersExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetImmutabilityPolicyHeaders = { + serializedName: "Blob_setImmutabilityPolicyHeaders", + type: { + name: "Composite", + className: "BlobSetImmutabilityPolicyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiry: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + }, + }, +}; +exports.BlobSetImmutabilityPolicyExceptionHeaders = { + serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetImmutabilityPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDeleteImmutabilityPolicyHeaders = { + serializedName: "Blob_deleteImmutabilityPolicyHeaders", + type: { + name: "Composite", + className: "BlobDeleteImmutabilityPolicyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobDeleteImmutabilityPolicyExceptionHeaders = { + serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", + type: { + name: "Composite", + className: "BlobDeleteImmutabilityPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetLegalHoldHeaders = { + serializedName: "Blob_setLegalHoldHeaders", + type: { + name: "Composite", + className: "BlobSetLegalHoldHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.BlobSetLegalHoldExceptionHeaders = { + serializedName: "Blob_setLegalHoldExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetLegalHoldExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetMetadataHeaders = { + serializedName: "Blob_setMetadataHeaders", + type: { + name: "Composite", + className: "BlobSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetMetadataExceptionHeaders = { + serializedName: "Blob_setMetadataExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetMetadataExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobAcquireLeaseHeaders = { + serializedName: "Blob_acquireLeaseHeaders", + type: { + name: "Composite", + className: "BlobAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobAcquireLeaseExceptionHeaders = { + serializedName: "Blob_acquireLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobAcquireLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobReleaseLeaseHeaders = { + serializedName: "Blob_releaseLeaseHeaders", + type: { + name: "Composite", + className: "BlobReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobReleaseLeaseExceptionHeaders = { + serializedName: "Blob_releaseLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobReleaseLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobRenewLeaseHeaders = { + serializedName: "Blob_renewLeaseHeaders", + type: { + name: "Composite", + className: "BlobRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobRenewLeaseExceptionHeaders = { + serializedName: "Blob_renewLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobRenewLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobChangeLeaseHeaders = { + serializedName: "Blob_changeLeaseHeaders", + type: { + name: "Composite", + className: "BlobChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobChangeLeaseExceptionHeaders = { + serializedName: "Blob_changeLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobChangeLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobBreakLeaseHeaders = { + serializedName: "Blob_breakLeaseHeaders", + type: { + name: "Composite", + className: "BlobBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseTime: { + serializedName: "x-ms-lease-time", + xmlName: "x-ms-lease-time", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobBreakLeaseExceptionHeaders = { + serializedName: "Blob_breakLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobBreakLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobCreateSnapshotHeaders = { + serializedName: "Blob_createSnapshotHeaders", + type: { + name: "Composite", + className: "BlobCreateSnapshotHeaders", + modelProperties: { + snapshot: { + serializedName: "x-ms-snapshot", + xmlName: "x-ms-snapshot", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobCreateSnapshotExceptionHeaders = { + serializedName: "Blob_createSnapshotExceptionHeaders", + type: { + name: "Composite", + className: "BlobCreateSnapshotExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobStartCopyFromURLHeaders = { + serializedName: "Blob_startCopyFromURLHeaders", + type: { + name: "Composite", + className: "BlobStartCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobStartCopyFromURLExceptionHeaders = { + serializedName: "Blob_startCopyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobStartCopyFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlobCopyFromURLHeaders = { + serializedName: "Blob_copyFromURLHeaders", + type: { + name: "Composite", + className: "BlobCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyStatus: { + defaultValue: "success", + isConstant: true, + serializedName: "x-ms-copy-status", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobCopyFromURLExceptionHeaders = { + serializedName: "Blob_copyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobCopyFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlobAbortCopyFromURLHeaders = { + serializedName: "Blob_abortCopyFromURLHeaders", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobAbortCopyFromURLExceptionHeaders = { + serializedName: "Blob_abortCopyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTierHeaders = { + serializedName: "Blob_setTierHeaders", + type: { + name: "Composite", + className: "BlobSetTierHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTierExceptionHeaders = { + serializedName: "Blob_setTierExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetTierExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetAccountInfoHeaders = { + serializedName: "Blob_getAccountInfoHeaders", + type: { + name: "Composite", + className: "BlobGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + ], + }, + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage", + ], + }, + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.BlobGetAccountInfoExceptionHeaders = { + serializedName: "Blob_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetAccountInfoExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobQueryHeaders = { + serializedName: "Blob_queryHeaders", + type: { + name: "Composite", + className: "BlobQueryHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + contentRange: { + serializedName: "content-range", + xmlName: "content-range", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { + name: "String", + }, + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + copyCompletionTime: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { + name: "String", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { + name: "String", + }, + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { + name: "ByteArray", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + }, + }, +}; +exports.BlobQueryExceptionHeaders = { + serializedName: "Blob_queryExceptionHeaders", + type: { + name: "Composite", + className: "BlobQueryExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetTagsHeaders = { + serializedName: "Blob_getTagsHeaders", + type: { + name: "Composite", + className: "BlobGetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetTagsExceptionHeaders = { + serializedName: "Blob_getTagsExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetTagsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTagsHeaders = { + serializedName: "Blob_setTagsHeaders", + type: { + name: "Composite", + className: "BlobSetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTagsExceptionHeaders = { + serializedName: "Blob_setTagsExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetTagsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCreateHeaders = { + serializedName: "PageBlob_createHeaders", + type: { + name: "Composite", + className: "PageBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCreateExceptionHeaders = { + serializedName: "PageBlob_createExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobCreateExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesHeaders = { + serializedName: "PageBlob_uploadPagesHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesExceptionHeaders = { + serializedName: "PageBlob_uploadPagesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobClearPagesHeaders = { + serializedName: "PageBlob_clearPagesHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobClearPagesExceptionHeaders = { + serializedName: "PageBlob_clearPagesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesFromURLHeaders = { + serializedName: "PageBlob_uploadPagesFromURLHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesFromURLExceptionHeaders = { + serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesHeaders = { + serializedName: "PageBlob_getPageRangesHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesExceptionHeaders = { + serializedName: "PageBlob_getPageRangesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesDiffHeaders = { + serializedName: "PageBlob_getPageRangesDiffHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesDiffExceptionHeaders = { + serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobResizeHeaders = { + serializedName: "PageBlob_resizeHeaders", + type: { + name: "Composite", + className: "PageBlobResizeHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobResizeExceptionHeaders = { + serializedName: "PageBlob_resizeExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobResizeExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUpdateSequenceNumberHeaders = { + serializedName: "PageBlob_updateSequenceNumberHeaders", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUpdateSequenceNumberExceptionHeaders = { + serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCopyIncrementalHeaders = { + serializedName: "PageBlob_copyIncrementalHeaders", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCopyIncrementalExceptionHeaders = { + serializedName: "PageBlob_copyIncrementalExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobCreateHeaders = { + serializedName: "AppendBlob_createHeaders", + type: { + name: "Composite", + className: "AppendBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobCreateExceptionHeaders = { + serializedName: "AppendBlob_createExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobCreateExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockHeaders = { + serializedName: "AppendBlob_appendBlockHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + xmlName: "x-ms-blob-append-offset", + type: { + name: "String", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockExceptionHeaders = { + serializedName: "AppendBlob_appendBlockExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockFromUrlHeaders = { + serializedName: "AppendBlob_appendBlockFromUrlHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + xmlName: "x-ms-blob-append-offset", + type: { + name: "String", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockFromUrlExceptionHeaders = { + serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.AppendBlobSealHeaders = { + serializedName: "AppendBlob_sealHeaders", + type: { + name: "Composite", + className: "AppendBlobSealHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.AppendBlobSealExceptionHeaders = { + serializedName: "AppendBlob_sealExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobSealExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobUploadHeaders = { + serializedName: "BlockBlob_uploadHeaders", + type: { + name: "Composite", + className: "BlockBlobUploadHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobUploadExceptionHeaders = { + serializedName: "BlockBlob_uploadExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobUploadExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobPutBlobFromUrlHeaders = { + serializedName: "BlockBlob_putBlobFromUrlHeaders", + type: { + name: "Composite", + className: "BlockBlobPutBlobFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobPutBlobFromUrlExceptionHeaders = { + serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobPutBlobFromUrlExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockHeaders = { + serializedName: "BlockBlob_stageBlockHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockExceptionHeaders = { + serializedName: "BlockBlob_stageBlockExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockFromURLHeaders = { + serializedName: "BlockBlob_stageBlockFromURLHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockFromURLExceptionHeaders = { + serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlockBlobCommitBlockListHeaders = { + serializedName: "BlockBlob_commitBlockListHeaders", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobCommitBlockListExceptionHeaders = { + serializedName: "BlockBlob_commitBlockListExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobGetBlockListHeaders = { + serializedName: "BlockBlob_getBlockListHeaders", + type: { + name: "Composite", + className: "BlockBlobGetBlockListHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobGetBlockListExceptionHeaders = { + serializedName: "BlockBlob_getBlockListExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobGetBlockListExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +//# sourceMappingURL=mappers.js.map /***/ }), -/***/ 94873: +/***/ 54142: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseCAEChallenge = parseCAEChallenge; -exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; -const log_js_1 = __nccwpck_require__(53776); -const base64_js_1 = __nccwpck_require__(23442); -/** - * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. - * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. - * - * @internal - */ -function parseCAEChallenge(challenges) { - const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); - return bearerChallenges.map((challenge) => { - const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); - const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - // Key-value pairs to plain object: - return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {}); - }); -} -/** - * This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges: - * [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation). - * - * Call the `bearerTokenAuthenticationPolicy` with the following options: - * - * ```ts snippet:AuthorizeRequestOnClaimChallenge - * import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; - * import { authorizeRequestOnClaimChallenge } from "@azure/core-client"; - * - * const policy = bearerTokenAuthenticationPolicy({ - * challengeCallbacks: { - * authorizeRequestOnChallenge: authorizeRequestOnClaimChallenge, - * }, - * scopes: ["https://service/.default"], - * }); - * ``` - * - * Once provided, the `bearerTokenAuthenticationPolicy` policy will internally handle Continuous Access Evaluation (CAE) challenges. - * When it can't complete a challenge it will return the 401 (unauthorized) response from ARM. - * - * Example challenge with claims: +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * - * ``` - * Bearer authorization_uri="https://login.windows-ppe.net/", error="invalid_token", - * error_description="User session has been revoked", - * claims="eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbHVlIjoiMTYwMzc0MjgwMCJ9fX0=" - * ``` + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -async function authorizeRequestOnClaimChallenge(onChallengeOptions) { - var _a; - const { scopes, response } = onChallengeOptions; - const logger = onChallengeOptions.logger || log_js_1.logger; - const challenge = response.headers.get("WWW-Authenticate"); - if (!challenge) { - logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); - return false; - } - const challenges = parseCAEChallenge(challenge) || []; - const parsedChallenge = challenges.find((x) => x.claims); - if (!parsedChallenge) { - logger.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); - return false; - } - const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { - claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims), - }); - if (!accessToken) { - return false; - } - onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); - return true; -} -//# sourceMappingURL=authorizeRequestOnClaimChallenge.js.map - -/***/ }), - -/***/ 16576: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.authorizeRequestOnTenantChallenge = void 0; -/** - * A set of constants used internally when processing requests. - */ -const Constants = { - DefaultScope: "/.default", - /** - * Defines constants for use with HTTP headers. - */ - HeaderConstants: { - /** - * The Authorization header. - */ - AUTHORIZATION: "authorization", +exports.action3 = exports.action2 = exports.leaseId1 = exports.action1 = exports.proposedLeaseId = exports.duration = exports.action = exports.comp10 = exports.sourceLeaseId = exports.sourceContainerName = exports.comp9 = exports.deletedContainerVersion = exports.deletedContainerName = exports.comp8 = exports.containerAcl = exports.comp7 = exports.comp6 = exports.ifUnmodifiedSince = exports.ifModifiedSince = exports.leaseId = exports.preventEncryptionScopeOverride = exports.defaultEncryptionScope = exports.access = exports.metadata = exports.restype2 = exports.where = exports.comp5 = exports.multipartContentType = exports.contentLength = exports.comp4 = exports.body = exports.restype1 = exports.comp3 = exports.keyInfo = exports.include = exports.maxPageSize = exports.marker = exports.prefix = exports.comp2 = exports.comp1 = exports.accept1 = exports.requestId = exports.version = exports.timeoutInSeconds = exports.comp = exports.restype = exports.url = exports.accept = exports.blobServiceProperties = exports.contentType = void 0; +exports.fileRequestIntent = exports.copySourceTags = exports.copySourceAuthorization = exports.sourceContentMD5 = exports.xMsRequiresSync = exports.legalHold1 = exports.sealBlob = exports.blobTagsString = exports.copySource = exports.sourceIfTags = exports.sourceIfNoneMatch = exports.sourceIfMatch = exports.sourceIfUnmodifiedSince = exports.sourceIfModifiedSince = exports.rehydratePriority = exports.tier = exports.comp14 = exports.encryptionScope = exports.legalHold = exports.comp13 = exports.immutabilityPolicyMode = exports.immutabilityPolicyExpiry = exports.comp12 = exports.blobContentDisposition = exports.blobContentLanguage = exports.blobContentEncoding = exports.blobContentMD5 = exports.blobContentType = exports.blobCacheControl = exports.expiresOn = exports.expiryOptions = exports.comp11 = exports.blobDeleteType = exports.deleteSnapshots = exports.ifTags = exports.ifNoneMatch = exports.ifMatch = exports.encryptionAlgorithm = exports.encryptionKeySha256 = exports.encryptionKey = exports.rangeGetContentCRC64 = exports.rangeGetContentMD5 = exports.range = exports.versionId = exports.snapshot = exports.delimiter = exports.include1 = exports.proposedLeaseId1 = exports.action4 = exports.breakPeriod = void 0; +exports.listType = exports.comp25 = exports.blocks = exports.blockId = exports.comp24 = exports.copySourceBlobProperties = exports.blobType2 = exports.comp23 = exports.sourceRange1 = exports.appendPosition = exports.maxSize = exports.comp22 = exports.blobType1 = exports.comp21 = exports.sequenceNumberAction = exports.prevSnapshotUrl = exports.prevsnapshot = exports.comp20 = exports.range1 = exports.sourceContentCrc64 = exports.sourceRange = exports.sourceUrl = exports.pageWrite1 = exports.ifSequenceNumberEqualTo = exports.ifSequenceNumberLessThan = exports.ifSequenceNumberLessThanOrEqualTo = exports.pageWrite = exports.comp19 = exports.accept2 = exports.body1 = exports.contentType1 = exports.blobSequenceNumber = exports.blobContentLength = exports.blobType = exports.transactionalContentCrc64 = exports.transactionalContentMD5 = exports.tags = exports.comp18 = exports.comp17 = exports.queryRequest = exports.tier1 = exports.comp16 = exports.copyId = exports.copyActionAbortConstant = exports.comp15 = void 0; +const mappers_js_1 = __nccwpck_require__(52486); +exports.contentType = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String", + }, + }, +}; +exports.blobServiceProperties = { + parameterPath: "blobServiceProperties", + mapper: mappers_js_1.BlobServiceProperties, +}; +exports.accept = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String", + }, + }, +}; +exports.url = { + parameterPath: "url", + mapper: { + serializedName: "url", + required: true, + xmlName: "url", + type: { + name: "String", + }, + }, + skipEncoding: true, +}; +exports.restype = { + parameterPath: "restype", + mapper: { + defaultValue: "service", + isConstant: true, + serializedName: "restype", + type: { + name: "String", + }, + }, +}; +exports.comp = { + parameterPath: "comp", + mapper: { + defaultValue: "properties", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.timeoutInSeconds = { + parameterPath: ["options", "timeoutInSeconds"], + mapper: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "timeout", + xmlName: "timeout", + type: { + name: "Number", + }, + }, +}; +exports.version = { + parameterPath: "version", + mapper: { + defaultValue: "2025-11-05", + isConstant: true, + serializedName: "x-ms-version", + type: { + name: "String", + }, + }, +}; +exports.requestId = { + parameterPath: ["options", "requestId"], + mapper: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, +}; +exports.accept1 = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String", + }, + }, +}; +exports.comp1 = { + parameterPath: "comp", + mapper: { + defaultValue: "stats", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.comp2 = { + parameterPath: "comp", + mapper: { + defaultValue: "list", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.prefix = { + parameterPath: ["options", "prefix"], + mapper: { + serializedName: "prefix", + xmlName: "prefix", + type: { + name: "String", + }, + }, +}; +exports.marker = { + parameterPath: ["options", "marker"], + mapper: { + serializedName: "marker", + xmlName: "marker", + type: { + name: "String", + }, + }, +}; +exports.maxPageSize = { + parameterPath: ["options", "maxPageSize"], + mapper: { + constraints: { + InclusiveMinimum: 1, + }, + serializedName: "maxresults", + xmlName: "maxresults", + type: { + name: "Number", + }, + }, +}; +exports.include = { + parameterPath: ["options", "include"], + mapper: { + serializedName: "include", + xmlName: "include", + xmlElementName: "ListContainersIncludeType", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: ["metadata", "deleted", "system"], + }, + }, + }, + }, + collectionFormat: "CSV", +}; +exports.keyInfo = { + parameterPath: "keyInfo", + mapper: mappers_js_1.KeyInfo, +}; +exports.comp3 = { + parameterPath: "comp", + mapper: { + defaultValue: "userdelegationkey", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.restype1 = { + parameterPath: "restype", + mapper: { + defaultValue: "account", + isConstant: true, + serializedName: "restype", + type: { + name: "String", + }, + }, +}; +exports.body = { + parameterPath: "body", + mapper: { + serializedName: "body", + required: true, + xmlName: "body", + type: { + name: "Stream", + }, + }, +}; +exports.comp4 = { + parameterPath: "comp", + mapper: { + defaultValue: "batch", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.contentLength = { + parameterPath: "contentLength", + mapper: { + serializedName: "Content-Length", + required: true, + xmlName: "Content-Length", + type: { + name: "Number", + }, + }, +}; +exports.multipartContentType = { + parameterPath: "multipartContentType", + mapper: { + serializedName: "Content-Type", + required: true, + xmlName: "Content-Type", + type: { + name: "String", + }, + }, +}; +exports.comp5 = { + parameterPath: "comp", + mapper: { + defaultValue: "blobs", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.where = { + parameterPath: ["options", "where"], + mapper: { + serializedName: "where", + xmlName: "where", + type: { + name: "String", + }, + }, +}; +exports.restype2 = { + parameterPath: "restype", + mapper: { + defaultValue: "container", + isConstant: true, + serializedName: "restype", + type: { + name: "String", + }, + }, +}; +exports.metadata = { + parameterPath: ["options", "metadata"], + mapper: { + serializedName: "x-ms-meta", + xmlName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, +}; +exports.access = { + parameterPath: ["options", "access"], + mapper: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, +}; +exports.defaultEncryptionScope = { + parameterPath: [ + "options", + "containerEncryptionScope", + "defaultEncryptionScope", + ], + mapper: { + serializedName: "x-ms-default-encryption-scope", + xmlName: "x-ms-default-encryption-scope", + type: { + name: "String", + }, + }, +}; +exports.preventEncryptionScopeOverride = { + parameterPath: [ + "options", + "containerEncryptionScope", + "preventEncryptionScopeOverride", + ], + mapper: { + serializedName: "x-ms-deny-encryption-scope-override", + xmlName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean", + }, + }, +}; +exports.leaseId = { + parameterPath: ["options", "leaseAccessConditions", "leaseId"], + mapper: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, +}; +exports.ifModifiedSince = { + parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], + mapper: { + serializedName: "If-Modified-Since", + xmlName: "If-Modified-Since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.ifUnmodifiedSince = { + parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], + mapper: { + serializedName: "If-Unmodified-Since", + xmlName: "If-Unmodified-Since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.comp6 = { + parameterPath: "comp", + mapper: { + defaultValue: "metadata", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.comp7 = { + parameterPath: "comp", + mapper: { + defaultValue: "acl", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.containerAcl = { + parameterPath: ["options", "containerAcl"], + mapper: { + serializedName: "containerAcl", + xmlName: "SignedIdentifiers", + xmlIsWrapped: true, + xmlElementName: "SignedIdentifier", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignedIdentifier", + }, + }, + }, + }, +}; +exports.comp8 = { + parameterPath: "comp", + mapper: { + defaultValue: "undelete", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.deletedContainerName = { + parameterPath: ["options", "deletedContainerName"], + mapper: { + serializedName: "x-ms-deleted-container-name", + xmlName: "x-ms-deleted-container-name", + type: { + name: "String", + }, + }, +}; +exports.deletedContainerVersion = { + parameterPath: ["options", "deletedContainerVersion"], + mapper: { + serializedName: "x-ms-deleted-container-version", + xmlName: "x-ms-deleted-container-version", + type: { + name: "String", + }, + }, +}; +exports.comp9 = { + parameterPath: "comp", + mapper: { + defaultValue: "rename", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.sourceContainerName = { + parameterPath: "sourceContainerName", + mapper: { + serializedName: "x-ms-source-container-name", + required: true, + xmlName: "x-ms-source-container-name", + type: { + name: "String", + }, + }, +}; +exports.sourceLeaseId = { + parameterPath: ["options", "sourceLeaseId"], + mapper: { + serializedName: "x-ms-source-lease-id", + xmlName: "x-ms-source-lease-id", + type: { + name: "String", + }, + }, +}; +exports.comp10 = { + parameterPath: "comp", + mapper: { + defaultValue: "lease", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.action = { + parameterPath: "action", + mapper: { + defaultValue: "acquire", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.duration = { + parameterPath: ["options", "duration"], + mapper: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Number", + }, + }, +}; +exports.proposedLeaseId = { + parameterPath: ["options", "proposedLeaseId"], + mapper: { + serializedName: "x-ms-proposed-lease-id", + xmlName: "x-ms-proposed-lease-id", + type: { + name: "String", + }, + }, +}; +exports.action1 = { + parameterPath: "action", + mapper: { + defaultValue: "release", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.leaseId1 = { + parameterPath: "leaseId", + mapper: { + serializedName: "x-ms-lease-id", + required: true, + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, +}; +exports.action2 = { + parameterPath: "action", + mapper: { + defaultValue: "renew", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.action3 = { + parameterPath: "action", + mapper: { + defaultValue: "break", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.breakPeriod = { + parameterPath: ["options", "breakPeriod"], + mapper: { + serializedName: "x-ms-lease-break-period", + xmlName: "x-ms-lease-break-period", + type: { + name: "Number", + }, + }, +}; +exports.action4 = { + parameterPath: "action", + mapper: { + defaultValue: "change", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.proposedLeaseId1 = { + parameterPath: "proposedLeaseId", + mapper: { + serializedName: "x-ms-proposed-lease-id", + required: true, + xmlName: "x-ms-proposed-lease-id", + type: { + name: "String", + }, + }, +}; +exports.include1 = { + parameterPath: ["options", "include"], + mapper: { + serializedName: "include", + xmlName: "include", + xmlElementName: "ListBlobsIncludeItem", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "copy", + "deleted", + "metadata", + "snapshots", + "uncommittedblobs", + "versions", + "tags", + "immutabilitypolicy", + "legalhold", + "deletedwithversions", + ], + }, + }, + }, + }, + collectionFormat: "CSV", +}; +exports.delimiter = { + parameterPath: "delimiter", + mapper: { + serializedName: "delimiter", + required: true, + xmlName: "delimiter", + type: { + name: "String", + }, + }, +}; +exports.snapshot = { + parameterPath: ["options", "snapshot"], + mapper: { + serializedName: "snapshot", + xmlName: "snapshot", + type: { + name: "String", + }, + }, +}; +exports.versionId = { + parameterPath: ["options", "versionId"], + mapper: { + serializedName: "versionid", + xmlName: "versionid", + type: { + name: "String", + }, + }, +}; +exports.range = { + parameterPath: ["options", "range"], + mapper: { + serializedName: "x-ms-range", + xmlName: "x-ms-range", + type: { + name: "String", + }, + }, +}; +exports.rangeGetContentMD5 = { + parameterPath: ["options", "rangeGetContentMD5"], + mapper: { + serializedName: "x-ms-range-get-content-md5", + xmlName: "x-ms-range-get-content-md5", + type: { + name: "Boolean", + }, + }, +}; +exports.rangeGetContentCRC64 = { + parameterPath: ["options", "rangeGetContentCRC64"], + mapper: { + serializedName: "x-ms-range-get-content-crc64", + xmlName: "x-ms-range-get-content-crc64", + type: { + name: "Boolean", + }, + }, +}; +exports.encryptionKey = { + parameterPath: ["options", "cpkInfo", "encryptionKey"], + mapper: { + serializedName: "x-ms-encryption-key", + xmlName: "x-ms-encryption-key", + type: { + name: "String", + }, + }, +}; +exports.encryptionKeySha256 = { + parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], + mapper: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, +}; +exports.encryptionAlgorithm = { + parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], + mapper: { + serializedName: "x-ms-encryption-algorithm", + xmlName: "x-ms-encryption-algorithm", + type: { + name: "String", + }, + }, +}; +exports.ifMatch = { + parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], + mapper: { + serializedName: "If-Match", + xmlName: "If-Match", + type: { + name: "String", + }, + }, +}; +exports.ifNoneMatch = { + parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], + mapper: { + serializedName: "If-None-Match", + xmlName: "If-None-Match", + type: { + name: "String", + }, + }, +}; +exports.ifTags = { + parameterPath: ["options", "modifiedAccessConditions", "ifTags"], + mapper: { + serializedName: "x-ms-if-tags", + xmlName: "x-ms-if-tags", + type: { + name: "String", + }, + }, +}; +exports.deleteSnapshots = { + parameterPath: ["options", "deleteSnapshots"], + mapper: { + serializedName: "x-ms-delete-snapshots", + xmlName: "x-ms-delete-snapshots", + type: { + name: "Enum", + allowedValues: ["include", "only"], + }, + }, +}; +exports.blobDeleteType = { + parameterPath: ["options", "blobDeleteType"], + mapper: { + serializedName: "deletetype", + xmlName: "deletetype", + type: { + name: "String", + }, + }, +}; +exports.comp11 = { + parameterPath: "comp", + mapper: { + defaultValue: "expiry", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.expiryOptions = { + parameterPath: "expiryOptions", + mapper: { + serializedName: "x-ms-expiry-option", + required: true, + xmlName: "x-ms-expiry-option", + type: { + name: "String", + }, + }, +}; +exports.expiresOn = { + parameterPath: ["options", "expiresOn"], + mapper: { + serializedName: "x-ms-expiry-time", + xmlName: "x-ms-expiry-time", + type: { + name: "String", + }, + }, +}; +exports.blobCacheControl = { + parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], + mapper: { + serializedName: "x-ms-blob-cache-control", + xmlName: "x-ms-blob-cache-control", + type: { + name: "String", + }, + }, +}; +exports.blobContentType = { + parameterPath: ["options", "blobHttpHeaders", "blobContentType"], + mapper: { + serializedName: "x-ms-blob-content-type", + xmlName: "x-ms-blob-content-type", + type: { + name: "String", + }, + }, +}; +exports.blobContentMD5 = { + parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], + mapper: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { + name: "ByteArray", + }, + }, +}; +exports.blobContentEncoding = { + parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], + mapper: { + serializedName: "x-ms-blob-content-encoding", + xmlName: "x-ms-blob-content-encoding", + type: { + name: "String", + }, + }, +}; +exports.blobContentLanguage = { + parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], + mapper: { + serializedName: "x-ms-blob-content-language", + xmlName: "x-ms-blob-content-language", + type: { + name: "String", + }, + }, +}; +exports.blobContentDisposition = { + parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], + mapper: { + serializedName: "x-ms-blob-content-disposition", + xmlName: "x-ms-blob-content-disposition", + type: { + name: "String", + }, + }, +}; +exports.comp12 = { + parameterPath: "comp", + mapper: { + defaultValue: "immutabilityPolicies", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.immutabilityPolicyExpiry = { + parameterPath: ["options", "immutabilityPolicyExpiry"], + mapper: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.immutabilityPolicyMode = { + parameterPath: ["options", "immutabilityPolicyMode"], + mapper: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, +}; +exports.comp13 = { + parameterPath: "comp", + mapper: { + defaultValue: "legalhold", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.legalHold = { + parameterPath: "legalHold", + mapper: { + serializedName: "x-ms-legal-hold", + required: true, + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, +}; +exports.encryptionScope = { + parameterPath: ["options", "encryptionScope"], + mapper: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, +}; +exports.comp14 = { + parameterPath: "comp", + mapper: { + defaultValue: "snapshot", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.tier = { + parameterPath: ["options", "tier"], + mapper: { + serializedName: "x-ms-access-tier", + xmlName: "x-ms-access-tier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold", + ], + }, + }, +}; +exports.rehydratePriority = { + parameterPath: ["options", "rehydratePriority"], + mapper: { + serializedName: "x-ms-rehydrate-priority", + xmlName: "x-ms-rehydrate-priority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"], + }, + }, +}; +exports.sourceIfModifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfModifiedSince", + ], + mapper: { + serializedName: "x-ms-source-if-modified-since", + xmlName: "x-ms-source-if-modified-since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.sourceIfUnmodifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfUnmodifiedSince", + ], + mapper: { + serializedName: "x-ms-source-if-unmodified-since", + xmlName: "x-ms-source-if-unmodified-since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.sourceIfMatch = { + parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], + mapper: { + serializedName: "x-ms-source-if-match", + xmlName: "x-ms-source-if-match", + type: { + name: "String", + }, + }, +}; +exports.sourceIfNoneMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfNoneMatch", + ], + mapper: { + serializedName: "x-ms-source-if-none-match", + xmlName: "x-ms-source-if-none-match", + type: { + name: "String", + }, + }, +}; +exports.sourceIfTags = { + parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], + mapper: { + serializedName: "x-ms-source-if-tags", + xmlName: "x-ms-source-if-tags", + type: { + name: "String", + }, + }, +}; +exports.copySource = { + parameterPath: "copySource", + mapper: { + serializedName: "x-ms-copy-source", + required: true, + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, +}; +exports.blobTagsString = { + parameterPath: ["options", "blobTagsString"], + mapper: { + serializedName: "x-ms-tags", + xmlName: "x-ms-tags", + type: { + name: "String", + }, + }, +}; +exports.sealBlob = { + parameterPath: ["options", "sealBlob"], + mapper: { + serializedName: "x-ms-seal-blob", + xmlName: "x-ms-seal-blob", + type: { + name: "Boolean", + }, + }, +}; +exports.legalHold1 = { + parameterPath: ["options", "legalHold"], + mapper: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, +}; +exports.xMsRequiresSync = { + parameterPath: "xMsRequiresSync", + mapper: { + defaultValue: "true", + isConstant: true, + serializedName: "x-ms-requires-sync", + type: { + name: "String", + }, + }, +}; +exports.sourceContentMD5 = { + parameterPath: ["options", "sourceContentMD5"], + mapper: { + serializedName: "x-ms-source-content-md5", + xmlName: "x-ms-source-content-md5", + type: { + name: "ByteArray", + }, + }, +}; +exports.copySourceAuthorization = { + parameterPath: ["options", "copySourceAuthorization"], + mapper: { + serializedName: "x-ms-copy-source-authorization", + xmlName: "x-ms-copy-source-authorization", + type: { + name: "String", + }, + }, +}; +exports.copySourceTags = { + parameterPath: ["options", "copySourceTags"], + mapper: { + serializedName: "x-ms-copy-source-tag-option", + xmlName: "x-ms-copy-source-tag-option", + type: { + name: "Enum", + allowedValues: ["REPLACE", "COPY"], + }, + }, +}; +exports.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String", + }, + }, +}; +exports.comp15 = { + parameterPath: "comp", + mapper: { + defaultValue: "copy", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.copyActionAbortConstant = { + parameterPath: "copyActionAbortConstant", + mapper: { + defaultValue: "abort", + isConstant: true, + serializedName: "x-ms-copy-action", + type: { + name: "String", + }, + }, +}; +exports.copyId = { + parameterPath: "copyId", + mapper: { + serializedName: "copyid", + required: true, + xmlName: "copyid", + type: { + name: "String", + }, + }, +}; +exports.comp16 = { + parameterPath: "comp", + mapper: { + defaultValue: "tier", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.tier1 = { + parameterPath: "tier", + mapper: { + serializedName: "x-ms-access-tier", + required: true, + xmlName: "x-ms-access-tier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold", + ], + }, + }, +}; +exports.queryRequest = { + parameterPath: ["options", "queryRequest"], + mapper: mappers_js_1.QueryRequest, +}; +exports.comp17 = { + parameterPath: "comp", + mapper: { + defaultValue: "query", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.comp18 = { + parameterPath: "comp", + mapper: { + defaultValue: "tags", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.tags = { + parameterPath: ["options", "tags"], + mapper: mappers_js_1.BlobTags, +}; +exports.transactionalContentMD5 = { + parameterPath: ["options", "transactionalContentMD5"], + mapper: { + serializedName: "Content-MD5", + xmlName: "Content-MD5", + type: { + name: "ByteArray", + }, + }, +}; +exports.transactionalContentCrc64 = { + parameterPath: ["options", "transactionalContentCrc64"], + mapper: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, +}; +exports.blobType = { + parameterPath: "blobType", + mapper: { + defaultValue: "PageBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { + name: "String", + }, + }, +}; +exports.blobContentLength = { + parameterPath: "blobContentLength", + mapper: { + serializedName: "x-ms-blob-content-length", + required: true, + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, +}; +exports.blobSequenceNumber = { + parameterPath: ["options", "blobSequenceNumber"], + mapper: { + defaultValue: 0, + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, +}; +exports.contentType1 = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/octet-stream", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String", + }, + }, +}; +exports.body1 = { + parameterPath: "body", + mapper: { + serializedName: "body", + required: true, + xmlName: "body", + type: { + name: "Stream", + }, + }, +}; +exports.accept2 = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String", + }, + }, +}; +exports.comp19 = { + parameterPath: "comp", + mapper: { + defaultValue: "page", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.pageWrite = { + parameterPath: "pageWrite", + mapper: { + defaultValue: "update", + isConstant: true, + serializedName: "x-ms-page-write", + type: { + name: "String", + }, + }, +}; +exports.ifSequenceNumberLessThanOrEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThanOrEqualTo", + ], + mapper: { + serializedName: "x-ms-if-sequence-number-le", + xmlName: "x-ms-if-sequence-number-le", + type: { + name: "Number", + }, + }, +}; +exports.ifSequenceNumberLessThan = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThan", + ], + mapper: { + serializedName: "x-ms-if-sequence-number-lt", + xmlName: "x-ms-if-sequence-number-lt", + type: { + name: "Number", + }, + }, +}; +exports.ifSequenceNumberEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberEqualTo", + ], + mapper: { + serializedName: "x-ms-if-sequence-number-eq", + xmlName: "x-ms-if-sequence-number-eq", + type: { + name: "Number", + }, + }, +}; +exports.pageWrite1 = { + parameterPath: "pageWrite", + mapper: { + defaultValue: "clear", + isConstant: true, + serializedName: "x-ms-page-write", + type: { + name: "String", + }, + }, +}; +exports.sourceUrl = { + parameterPath: "sourceUrl", + mapper: { + serializedName: "x-ms-copy-source", + required: true, + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, +}; +exports.sourceRange = { + parameterPath: "sourceRange", + mapper: { + serializedName: "x-ms-source-range", + required: true, + xmlName: "x-ms-source-range", + type: { + name: "String", + }, + }, +}; +exports.sourceContentCrc64 = { + parameterPath: ["options", "sourceContentCrc64"], + mapper: { + serializedName: "x-ms-source-content-crc64", + xmlName: "x-ms-source-content-crc64", + type: { + name: "ByteArray", + }, + }, +}; +exports.range1 = { + parameterPath: "range", + mapper: { + serializedName: "x-ms-range", + required: true, + xmlName: "x-ms-range", + type: { + name: "String", + }, + }, +}; +exports.comp20 = { + parameterPath: "comp", + mapper: { + defaultValue: "pagelist", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.prevsnapshot = { + parameterPath: ["options", "prevsnapshot"], + mapper: { + serializedName: "prevsnapshot", + xmlName: "prevsnapshot", + type: { + name: "String", + }, + }, +}; +exports.prevSnapshotUrl = { + parameterPath: ["options", "prevSnapshotUrl"], + mapper: { + serializedName: "x-ms-previous-snapshot-url", + xmlName: "x-ms-previous-snapshot-url", + type: { + name: "String", + }, + }, +}; +exports.sequenceNumberAction = { + parameterPath: "sequenceNumberAction", + mapper: { + serializedName: "x-ms-sequence-number-action", + required: true, + xmlName: "x-ms-sequence-number-action", + type: { + name: "Enum", + allowedValues: ["max", "update", "increment"], + }, }, }; -function isUuid(text) { - return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(text); -} -/** - * Defines a callback to handle auth challenge for Storage APIs. - * This implements the bearer challenge process described here: https://learn.microsoft.com/rest/api/storageservices/authorize-with-azure-active-directory#bearer-challenge - * Handling has specific features for storage that departs to the general AAD challenge docs. - **/ -const authorizeRequestOnTenantChallenge = async (challengeOptions) => { - var _a; - const requestOptions = requestToOptions(challengeOptions.request); - const challenge = getChallenge(challengeOptions.response); - if (challenge) { - const challengeInfo = parseChallenge(challenge); - const challengeScopes = buildScopes(challengeOptions, challengeInfo); - const tenantId = extractTenantId(challengeInfo); - if (!tenantId) { - return false; - } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); - if (!accessToken) { - return false; - } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); - return true; - } - return false; +exports.comp21 = { + parameterPath: "comp", + mapper: { + defaultValue: "incrementalcopy", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, }; -exports.authorizeRequestOnTenantChallenge = authorizeRequestOnTenantChallenge; -/** - * Extracts the tenant id from the challenge information - * The tenant id is contained in the authorization_uri as the first - * path part. - */ -function extractTenantId(challengeInfo) { - const parsedAuthUri = new URL(challengeInfo.authorization_uri); - const pathSegments = parsedAuthUri.pathname.split("/"); - const tenantId = pathSegments[1]; - if (tenantId && isUuid(tenantId)) { - return tenantId; - } - return undefined; -} -/** - * Builds the authentication scopes based on the information that comes in the - * challenge information. Scopes url is present in the resource_id, if it is empty - * we keep using the original scopes. - */ -function buildScopes(challengeOptions, challengeInfo) { - if (!challengeInfo.resource_id) { - return challengeOptions.scopes; - } - const challengeScopes = new URL(challengeInfo.resource_id); - challengeScopes.pathname = Constants.DefaultScope; - let scope = challengeScopes.toString(); - if (scope === "https://disk.azure.com/.default") { - // the extra slash is required by the service - scope = "https://disk.azure.com//.default"; - } - return [scope]; -} -/** - * We will retrieve the challenge only if the response status code was 401, - * and if the response contained the header "WWW-Authenticate" with a non-empty value. - */ -function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; - } - return; -} -/** - * Converts: `Bearer a="b" c="d"`. - * Into: `[ { a: 'b', c: 'd' }]`. - * - * @internal - */ -function parseChallenge(challenge) { - const bearerChallenge = challenge.slice("Bearer ".length); - const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); - const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - // Key-value pairs to plain object: - return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {}); -} -/** - * Extracts the options form a Pipeline Request for later re-use - */ -function requestToOptions(request) { - return { - abortSignal: request.abortSignal, - requestOptions: { - timeout: request.timeout, +exports.blobType1 = { + parameterPath: "blobType", + mapper: { + defaultValue: "AppendBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { + name: "String", }, - tracingOptions: request.tracingOptions, - }; -} -//# sourceMappingURL=authorizeRequestOnTenantChallenge.js.map - -/***/ }), - -/***/ 23442: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.encodeString = encodeString; -exports.encodeByteArray = encodeByteArray; -exports.decodeString = decodeString; -exports.decodeStringToString = decodeStringToString; -/** - * Encodes a string in base64 format. - * @param value - the string to encode - * @internal - */ -function encodeString(value) { - return Buffer.from(value).toString("base64"); -} -/** - * Encodes a byte array in base64 format. - * @param value - the Uint8Aray to encode - * @internal - */ -function encodeByteArray(value) { - const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); - return bufferValue.toString("base64"); -} -/** - * Decodes a base64 string into a byte array. - * @param value - the base64 string to decode - * @internal - */ -function decodeString(value) { - return Buffer.from(value, "base64"); -} -/** - * Decodes a base64 string into a string. - * @param value - the base64 string to decode - * @internal - */ -function decodeStringToString(value) { - return Buffer.from(value, "base64").toString(); -} -//# sourceMappingURL=base64.js.map - -/***/ }), - -/***/ 25315: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deserializationPolicyName = void 0; -exports.deserializationPolicy = deserializationPolicy; -const interfaces_js_1 = __nccwpck_require__(8153); -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const serializer_js_1 = __nccwpck_require__(63566); -const operationHelpers_js_1 = __nccwpck_require__(62074); -const defaultJsonContentTypes = ["application/json", "text/json"]; -const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; -/** - * The programmatic identifier of the deserializationPolicy. - */ -exports.deserializationPolicyName = "deserializationPolicy"; -/** - * This policy handles parsing out responses according to OperationSpecs on the request. - */ -function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; - const parseXML = options.parseXML; - const serializerOptions = options.serializerOptions; - const updatedOptions = { - xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY, + }, +}; +exports.comp22 = { + parameterPath: "comp", + mapper: { + defaultValue: "appendblock", + isConstant: true, + serializedName: "comp", + type: { + name: "String", }, - }; - return { - name: exports.deserializationPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML); + }, +}; +exports.maxSize = { + parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], + mapper: { + serializedName: "x-ms-blob-condition-maxsize", + xmlName: "x-ms-blob-condition-maxsize", + type: { + name: "Number", }, - }; -} -function getOperationResponseMap(parsedResponse) { - let result; - const request = parsedResponse.request; - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { - result = operationSpec.responses[parsedResponse.status]; - } - else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); - } - } - return result; -} -function shouldDeserializeResponse(parsedResponse) { - const request = parsedResponse.request; - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; - let result; - if (shouldDeserialize === undefined) { - result = true; - } - else if (typeof shouldDeserialize === "boolean") { - result = shouldDeserialize; - } - else { - result = shouldDeserialize(parsedResponse); - } - return result; -} -async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) { - const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML); - if (!shouldDeserializeResponse(parsedResponse)) { - return parsedResponse; - } - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - if (!operationSpec || !operationSpec.responses) { - return parsedResponse; - } - const responseSpec = getOperationResponseMap(parsedResponse); - const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); - if (error) { - throw error; - } - else if (shouldReturnResponse) { - return parsedResponse; - } - // An operation response spec does exist for current status code, so - // use it to deserialize the response. - if (responseSpec) { - if (responseSpec.bodyMapper) { - let valueToDeserialize = parsedResponse.parsedBody; - if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { - valueToDeserialize = - typeof valueToDeserialize === "object" - ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] - : []; - } - try { - parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); - } - catch (deserializeError) { - const restError = new core_rest_pipeline_1.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { - statusCode: parsedResponse.status, - request: parsedResponse.request, - response: parsedResponse, - }); - throw restError; - } - } - else if (operationSpec.httpMethod === "HEAD") { - // head methods never have a body, but we return a boolean to indicate presence/absence of the resource - parsedResponse.parsedBody = response.status >= 200 && response.status < 300; - } - if (responseSpec.headersMapper) { - parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true }); - } - } - return parsedResponse; -} -function isOperationSpecEmpty(operationSpec) { - const expectedStatusCodes = Object.keys(operationSpec.responses); - return (expectedStatusCodes.length === 0 || - (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); -} -function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a, _b, _c, _d, _e; - const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; - const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) - ? isSuccessByStatus - : !!responseSpec; - if (isExpectedStatusCode) { - if (responseSpec) { - if (!responseSpec.isError) { - return { error: null, shouldReturnResponse: false }; - } - } - else { - return { error: null, shouldReturnResponse: false }; - } - } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) - ? `Unexpected status code: ${parsedResponse.status}` - : parsedResponse.bodyAsText; - const error = new core_rest_pipeline_1.RestError(initialErrorMessage, { - statusCode: parsedResponse.status, - request: parsedResponse.request, - response: parsedResponse, - }); - // If the item failed but there's no error spec or default spec to deserialize the error, - // and the parsed body doesn't look like an error object, - // we should fail so we just throw the parsed response - if (!errorResponseSpec && - !(((_c = (_b = parsedResponse.parsedBody) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.code) && ((_e = (_d = parsedResponse.parsedBody) === null || _d === void 0 ? void 0 : _d.error) === null || _e === void 0 ? void 0 : _e.message))) { - throw error; - } - const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; - try { - // If error response has a body, try to deserialize it using default body mapper. - // Then try to extract error code & message from it - if (parsedResponse.parsedBody) { - const parsedBody = parsedResponse.parsedBody; - let deserializedError; - if (defaultBodyMapper) { - let valueToDeserialize = parsedBody; - if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { - valueToDeserialize = []; - const elementName = defaultBodyMapper.xmlElementName; - if (typeof parsedBody === "object" && elementName) { - valueToDeserialize = parsedBody[elementName]; - } - } - deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options); - } - const internalError = parsedBody.error || deserializedError || parsedBody; - error.code = internalError.code; - if (internalError.message) { - error.message = internalError.message; - } - if (defaultBodyMapper) { - error.response.parsedBody = deserializedError; - } - } - // If error response has headers, try to deserialize it using default header mapper - if (parsedResponse.headers && defaultHeadersMapper) { - error.response.parsedHeaders = - operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); - } - } - catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; - } - return { error, shouldReturnResponse: false }; -} -async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && - operationResponse.bodyAsText) { - const text = operationResponse.bodyAsText; - const contentType = operationResponse.headers.get("Content-Type") || ""; - const contentComponents = !contentType - ? [] - : contentType.split(";").map((component) => component.toLowerCase()); - try { - if (contentComponents.length === 0 || - contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { - operationResponse.parsedBody = JSON.parse(text); - return operationResponse; - } - else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { - if (!parseXML) { - throw new Error("Parsing XML not supported."); - } - const body = await parseXML(text, opts.xml); - operationResponse.parsedBody = body; - return operationResponse; - } - } - catch (err) { - const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; - const errCode = err.code || core_rest_pipeline_1.RestError.PARSE_ERROR; - const e = new core_rest_pipeline_1.RestError(msg, { - code: errCode, - statusCode: operationResponse.status, - request: operationResponse.request, - response: operationResponse, - }); - throw e; - } - } - return operationResponse; -} -//# sourceMappingURL=deserializationPolicy.js.map - -/***/ }), - -/***/ 30308: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -let cachedHttpClient; -function getCachedDefaultHttpClient() { - if (!cachedHttpClient) { - cachedHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); - } - return cachedHttpClient; -} -//# sourceMappingURL=httpClientCache.js.map - -/***/ }), - -/***/ 7611: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.authorizeRequestOnTenantChallenge = exports.authorizeRequestOnClaimChallenge = exports.serializationPolicyName = exports.serializationPolicy = exports.deserializationPolicyName = exports.deserializationPolicy = exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.createClientPipeline = exports.ServiceClient = exports.MapperTypeNames = exports.createSerializer = void 0; -var serializer_js_1 = __nccwpck_require__(63566); -Object.defineProperty(exports, "createSerializer", ({ enumerable: true, get: function () { return serializer_js_1.createSerializer; } })); -Object.defineProperty(exports, "MapperTypeNames", ({ enumerable: true, get: function () { return serializer_js_1.MapperTypeNames; } })); -var serviceClient_js_1 = __nccwpck_require__(28927); -Object.defineProperty(exports, "ServiceClient", ({ enumerable: true, get: function () { return serviceClient_js_1.ServiceClient; } })); -var pipeline_js_1 = __nccwpck_require__(33924); -Object.defineProperty(exports, "createClientPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createClientPipeline; } })); -var interfaces_js_1 = __nccwpck_require__(8153); -Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_ATTRKEY; } })); -Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_CHARKEY; } })); -var deserializationPolicy_js_1 = __nccwpck_require__(25315); -Object.defineProperty(exports, "deserializationPolicy", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicy; } })); -Object.defineProperty(exports, "deserializationPolicyName", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicyName; } })); -var serializationPolicy_js_1 = __nccwpck_require__(96625); -Object.defineProperty(exports, "serializationPolicy", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicy; } })); -Object.defineProperty(exports, "serializationPolicyName", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicyName; } })); -var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(94873); -Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } })); -var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(16576); -Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } })); -//# sourceMappingURL=index.js.map + }, +}; +exports.appendPosition = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "appendPosition", + ], + mapper: { + serializedName: "x-ms-blob-condition-appendpos", + xmlName: "x-ms-blob-condition-appendpos", + type: { + name: "Number", + }, + }, +}; +exports.sourceRange1 = { + parameterPath: ["options", "sourceRange"], + mapper: { + serializedName: "x-ms-source-range", + xmlName: "x-ms-source-range", + type: { + name: "String", + }, + }, +}; +exports.comp23 = { + parameterPath: "comp", + mapper: { + defaultValue: "seal", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.blobType2 = { + parameterPath: "blobType", + mapper: { + defaultValue: "BlockBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { + name: "String", + }, + }, +}; +exports.copySourceBlobProperties = { + parameterPath: ["options", "copySourceBlobProperties"], + mapper: { + serializedName: "x-ms-copy-source-blob-properties", + xmlName: "x-ms-copy-source-blob-properties", + type: { + name: "Boolean", + }, + }, +}; +exports.comp24 = { + parameterPath: "comp", + mapper: { + defaultValue: "block", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.blockId = { + parameterPath: "blockId", + mapper: { + serializedName: "blockid", + required: true, + xmlName: "blockid", + type: { + name: "String", + }, + }, +}; +exports.blocks = { + parameterPath: "blocks", + mapper: mappers_js_1.BlockLookupList, +}; +exports.comp25 = { + parameterPath: "comp", + mapper: { + defaultValue: "blocklist", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.listType = { + parameterPath: "listType", + mapper: { + defaultValue: "committed", + serializedName: "blocklisttype", + required: true, + xmlName: "blocklisttype", + type: { + name: "Enum", + allowedValues: ["committed", "uncommitted", "all"], + }, + }, +}; +//# sourceMappingURL=parameters.js.map /***/ }), -/***/ 41459: +/***/ 80313: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; -exports.getPathStringFromParameter = getPathStringFromParameter; -const serializer_js_1 = __nccwpck_require__(63566); -/** - * Gets the list of status codes for streaming responses. - * @internal +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -function getStreamingResponseStatusCodes(operationSpec) { - const result = new Set(); - for (const statusCode in operationSpec.responses) { - const operationResponse = operationSpec.responses[statusCode]; - if (operationResponse.bodyMapper && - operationResponse.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Stream) { - result.add(Number(statusCode)); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AppendBlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing AppendBlob operations. */ +class AppendBlobImpl { + client; + /** + * Initialize a new instance of the class AppendBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - return result; -} -/** - * Get the path to this parameter's value as a dotted string (a.b.c). - * @param parameter - The parameter to get the path string for. - * @returns The path to this parameter's value as a dotted string. - * @internal - */ -function getPathStringFromParameter(parameter) { - const { parameterPath, mapper } = parameter; - let result; - if (typeof parameterPath === "string") { - result = parameterPath; + /** + * The Create Append Blob operation creates a new append blob. + * @param contentLength The length of the request. + * @param options The options parameters. + */ + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } - else if (Array.isArray(parameterPath)) { - result = parameterPath.join("."); + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The + * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to + * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } - else { - result = mapper.serializedName; + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where + * the contents are read from a source url. The Append Block operation is permitted only if the blob + * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version + * 2015-02-21 version or later. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param options The options parameters. + */ + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); + } + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version + * 2019-12-12 version or later. + * @param options The options parameters. + */ + seal(options) { + return this.client.sendOperationRequest({ options }, sealOperationSpec); } - return result; } -//# sourceMappingURL=interfaceHelpers.js.map - -/***/ }), - -/***/ 8153: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; -/** - * Default key used to access the XML attributes. - */ -exports.XML_ATTRKEY = "$"; -/** - * Default key used to access the XML value content. - */ -exports.XML_CHARKEY = "_"; -//# sourceMappingURL=interfaces.js.map - -/***/ }), - -/***/ 53776: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logger = void 0; -const logger_1 = __nccwpck_require__(89497); -exports.logger = (0, logger_1.createClientLogger)("core-client"); -//# sourceMappingURL=log.js.map +exports.AppendBlobImpl = AppendBlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const createOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.AppendBlobCreateHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const appendBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.AppendBlobAppendBlockHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const appendBlockFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const sealOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.AppendBlobSealHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=appendBlob.js.map /***/ }), -/***/ 62074: +/***/ 8296: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; -exports.getOperationRequestInfo = getOperationRequestInfo; -const state_js_1 = __nccwpck_require__(35429); -/** - * @internal - * Retrieves the value to use for a given operation argument - * @param operationArguments - The arguments passed from the generated client - * @param parameter - The parameter description - * @param fallbackObject - If something isn't found in the arguments bag, look here. - * Generally used to look at the service client properties. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { - let parameterPath = parameter.parameterPath; - const parameterMapper = parameter.mapper; - let value; - if (typeof parameterPath === "string") { - parameterPath = [parameterPath]; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing Blob operations. */ +class BlobImpl { + client; + /** + * Initialize a new instance of the class Blob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - if (Array.isArray(parameterPath)) { - if (parameterPath.length > 0) { - if (parameterMapper.isConstant) { - value = parameterMapper.defaultValue; - } - else { - let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); - if (!propertySearchResult.propertyFound && fallbackObject) { - propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); - } - let useDefaultValue = false; - if (!propertySearchResult.propertyFound) { - useDefaultValue = - parameterMapper.required || - (parameterPath[0] === "options" && parameterPath.length === 2); - } - value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; - } - } + /** + * The Download operation reads or downloads a blob from the system, including its metadata and + * properties. You can also call Download to read a snapshot. + * @param options The options parameters. + */ + download(options) { + return this.client.sendOperationRequest({ options }, downloadOperationSpec); } - else { - if (parameterMapper.required) { - value = {}; - } - for (const propertyName in parameterPath) { - const propertyMapper = parameterMapper.type.modelProperties[propertyName]; - const propertyPath = parameterPath[propertyName]; - const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { - parameterPath: propertyPath, - mapper: propertyMapper, - }, fallbackObject); - if (propertyValue !== undefined) { - if (!value) { - value = {}; - } - value[propertyName] = propertyValue; - } - } + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system + * properties for the blob. It does not return the content of the blob. + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } - return value; -} -function getPropertyFromParameterPath(parent, parameterPath) { - const result = { propertyFound: false }; - let i = 0; - for (; i < parameterPath.length; ++i) { - const parameterPathPart = parameterPath[i]; - // Make sure to check inherited properties too, so don't use hasOwnProperty(). - if (parent && parameterPathPart in parent) { - parent = parent[parameterPathPart]; - } - else { - break; - } + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is + * permanently removed from the storage account. If the storage account's soft delete feature is + * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible + * immediately. However, the blob service retains the blob or snapshot for the number of days specified + * by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is + * permanently removed from the storage account. Note that you continue to be charged for the + * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the + * "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You + * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a + * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 + * (ResourceNotFound). + * @param options The options parameters. + */ + delete(options) { + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } - if (i === parameterPath.length) { - result.propertyValue = parent; - result.propertyFound = true; + /** + * Undelete a blob that was previously soft deleted + * @param options The options parameters. + */ + undelete(options) { + return this.client.sendOperationRequest({ options }, undeleteOperationSpec); } - return result; -} -const originalRequestSymbol = Symbol.for("@azure/core-client original request"); -function hasOriginalRequest(request) { - return originalRequestSymbol in request; -} -function getOperationRequestInfo(request) { - if (hasOriginalRequest(request)) { - return getOperationRequestInfo(request[originalRequestSymbol]); + /** + * Sets the time a blob will expire and be deleted. + * @param expiryOptions Required. Indicates mode of the expiry time + * @param options The options parameters. + */ + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); + } + /** + * The Set HTTP Headers operation sets system properties on the blob + * @param options The options parameters. + */ + setHttpHeaders(options) { + return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec); + } + /** + * The Set Immutability Policy operation sets the immutability policy on the blob + * @param options The options parameters. + */ + setImmutabilityPolicy(options) { + return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec); + } + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob + * @param options The options parameters. + */ + deleteImmutabilityPolicy(options) { + return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec); + } + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param options The options parameters. + */ + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); + } + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more + * name-value pairs + * @param options The options parameters. + */ + setMetadata(options) { + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param options The options parameters. + */ + acquireLease(options) { + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 + * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor + * (String) for a list of valid GUID string formats. + * @param options The options parameters. + */ + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); + } + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param options The options parameters. + */ + breakLease(options) { + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); + } + /** + * The Create Snapshot operation creates a read-only snapshot of a blob + * @param options The options parameters. + */ + createSnapshot(options) { + return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec); + } + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); + } + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return + * a response until the copy is complete. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); + } + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination + * blob with zero length and full metadata. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob + * operation. + * @param options The options parameters. + */ + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); + } + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant storage only). A + * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block + * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's + * ETag. + * @param tier Indicates the tier to be set on the blob. + * @param options The options parameters. + */ + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); + } + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); + } + /** + * The Query operation enables users to select/project on blob data by providing simple query + * expressions. + * @param options The options parameters. + */ + query(options) { + return this.client.sendOperationRequest({ options }, queryOperationSpec); } - let info = state_js_1.state.operationRequestMap.get(request); - if (!info) { - info = {}; - state_js_1.state.operationRequestMap.set(request, info); + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * @param options The options parameters. + */ + getTags(options) { + return this.client.sendOperationRequest({ options }, getTagsOperationSpec); } - return info; -} -//# sourceMappingURL=operationHelpers.js.map - -/***/ }), - -/***/ 33924: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createClientPipeline = createClientPipeline; -const deserializationPolicy_js_1 = __nccwpck_require__(25315); -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const serializationPolicy_js_1 = __nccwpck_require__(96625); -/** - * Creates a new Pipeline for use with a Service Client. - * Adds in deserializationPolicy by default. - * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential. - * @param options - Options to customize the created pipeline. - */ -function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); - if (options.credentialOptions) { - pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ - credential: options.credentialOptions.credential, - scopes: options.credentialOptions.credentialScopes, - })); + /** + * The Set Tags operation enables users to set tags on a blob. + * @param options The options parameters. + */ + setTags(options) { + return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } - pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); - pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { - phase: "Deserialize", - }); - return pipeline; } -//# sourceMappingURL=pipeline.js.map +exports.BlobImpl = BlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const downloadOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobDownloadHeaders, + }, + 206: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobDownloadHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getPropertiesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.BlobGetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const deleteOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "DELETE", + responses: { + 202: { + headersMapper: Mappers.BlobDeleteHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots, + ], + isXML: true, + serializer: xmlSerializer, +}; +const undeleteOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobUndeleteHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setExpiryOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetExpiryHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setHttpHeadersOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetHttpHeadersHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders, + }, + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setImmutabilityPolicyOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + ], + isXML: true, + serializer: xmlSerializer, +}; +const deleteImmutabilityPolicyOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setLegalHoldOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetLegalHoldHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setMetadataOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetMetadataHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + ], + isXML: true, + serializer: xmlSerializer, +}; +const acquireLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlobAcquireLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const releaseLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobReleaseLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const renewLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobRenewLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const changeLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobChangeLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const breakLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.BlobBreakLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const createSnapshotOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlobCreateSnapshotHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + ], + isXML: true, + serializer: xmlSerializer, +}; +const startCopyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.BlobStartCopyFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const copyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.BlobCopyFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + ], + isXML: true, + serializer: xmlSerializer, +}; +const abortCopyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 204: { + headersMapper: Mappers.BlobAbortCopyFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setTierOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetTierHeaders, + }, + 202: { + headersMapper: Mappers.BlobSetTierHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getAccountInfoOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.BlobGetAccountInfoHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const queryOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobQueryHeaders, + }, + 206: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobQueryHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders, + }, + }, + requestBody: Parameters.queryRequest, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getTagsOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setTagsOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 204: { + headersMapper: Mappers.BlobSetTagsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders, + }, + }, + requestBody: Parameters.tags, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +//# sourceMappingURL=blob.js.map /***/ }), -/***/ 96625: +/***/ 48652: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serializationPolicyName = void 0; -exports.serializationPolicy = serializationPolicy; -exports.serializeHeaders = serializeHeaders; -exports.serializeRequestBody = serializeRequestBody; -const interfaces_js_1 = __nccwpck_require__(8153); -const operationHelpers_js_1 = __nccwpck_require__(62074); -const serializer_js_1 = __nccwpck_require__(63566); -const interfaceHelpers_js_1 = __nccwpck_require__(41459); -/** - * The programmatic identifier of the serializationPolicy. - */ -exports.serializationPolicyName = "serializationPolicy"; -/** - * This policy handles assembling the request body and headers using - * an OperationSpec and OperationArguments on the request. - */ -function serializationPolicy(options = {}) { - const stringifyXML = options.stringifyXML; - return { - name: exports.serializationPolicyName, - async sendRequest(request, next) { - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; - if (operationSpec && operationArguments) { - serializeHeaders(request, operationArguments, operationSpec); - serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); - } - return next(request); - }, - }; -} -/** - * @internal +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; - if (operationSpec.headerParameters) { - for (const headerParameter of operationSpec.headerParameters) { - let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); - if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) { - headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter)); - const headerCollectionPrefix = headerParameter.mapper - .headerCollectionPrefix; - if (headerCollectionPrefix) { - for (const key of Object.keys(headerValue)) { - request.headers.set(headerCollectionPrefix + key, headerValue[key]); - } - } - else { - request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter), headerValue); - } - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlockBlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing BlockBlob operations. */ +class BlockBlobImpl { + client; + /** + * Initialize a new instance of the class BlockBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; - if (customHeaders) { - for (const customHeaderName of Object.keys(customHeaders)) { - request.headers.set(customHeaderName, customHeaders[customHeaderName]); - } + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing + * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put + * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a + * partial update of the content of a block blob, use the Put Block List operation. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); } -} -/** - * @internal - */ -function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () { - throw new Error("XML serialization unsupported!"); -}) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; - const updatedOptions = { - xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY, - }, - }; - const xmlCharKey = updatedOptions.xml.xmlCharKey; - if (operationSpec.requestBody && operationSpec.requestBody.mapper) { - request.body = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); - const bodyMapper = operationSpec.requestBody.mapper; - const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable, } = bodyMapper; - const typeName = bodyMapper.type.name; - try { - if ((request.body !== undefined && request.body !== null) || - (nullable && request.body === null) || - required) { - const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); - request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); - const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; - if (operationSpec.isXML) { - const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; - const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); - if (typeName === serializer_js_1.MapperTypeNames.Sequence) { - request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); - } - else if (!isStream) { - request.body = stringifyXML(value, { - rootName: xmlName || serializedName, - xmlCharKey, - }); - } - } - else if (typeName === serializer_js_1.MapperTypeNames.String && - (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { - // the String serializer has validated that request body is a string - // so just send the string. - return; - } - else if (!isStream) { - request.body = JSON.stringify(request.body); - } - } - } - catch (error) { - throw new Error(`Error "${error.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, " ")}.`); - } + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read + * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are + * not supported with Put Blob from URL; the content of an existing blob is overwritten with the + * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, + * use the Put Block from URL API in conjunction with Put Block List. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); } - else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { - request.formData = {}; - for (const formDataParameter of operationSpec.formDataParameters) { - const formDataParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); - if (formDataParameterValue !== undefined && formDataParameterValue !== null) { - const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter); - request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter), updatedOptions); - } - } + /** + * The Stage Block operation creates a new block to be committed as part of a blob + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); } -} -/** - * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself - */ -function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { - // Composite and Sequence schemas already got their root namespace set during serialization - // We just need to add xmlns to the other schema types - if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { - const result = {}; - result[options.xml.xmlCharKey] = serializedValue; - result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; - return result; + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents + * are read from a URL. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param options The options parameters. + */ + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); } - return serializedValue; -} -function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { - if (!Array.isArray(obj)) { - obj = [obj]; + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the + * blob. In order to be written as part of a blob, a block must have been successfully written to the + * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading + * only those blocks that have changed, then committing the new and existing blocks together. You can + * do this by specifying whether to commit a block from the committed block list or from the + * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list + * it may belong to. + * @param blocks Blob Blocks. + * @param options The options parameters. + */ + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); } - if (!xmlNamespaceKey || !xmlNamespace) { - return { [elementName]: obj }; + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block + * blob + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted + * blocks, or both lists together. + * @param options The options parameters. + */ + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } - const result = { [elementName]: obj }; - result[interfaces_js_1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; - return result; } -//# sourceMappingURL=serializationPolicy.js.map +exports.BlockBlobImpl = BlockBlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const uploadOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobUploadHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const putBlobFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties, + ], + isXML: true, + serializer: xmlSerializer, +}; +const stageBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobStageBlockHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const stageBlockFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const commitBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobCommitBlockListHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders, + }, + }, + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=blockBlob.js.map /***/ }), -/***/ 63566: +/***/ 3269: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MapperTypeNames = void 0; -exports.createSerializer = createSerializer; +exports.ContainerImpl = void 0; const tslib_1 = __nccwpck_require__(4351); -const base64 = tslib_1.__importStar(__nccwpck_require__(23442)); -const interfaces_js_1 = __nccwpck_require__(8153); -const utils_js_1 = __nccwpck_require__(25363); -class SerializerImpl { - constructor(modelMappers = {}, isXML = false) { - this.modelMappers = modelMappers; - this.isXML = isXML; - } +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing Container operations. */ +class ContainerImpl { + client; /** - * @deprecated Removing the constraints validation on client side. + * Initialize a new instance of the class Container class. + * @param client Reference to the service client */ - validateConstraints(mapper, value, objectName) { - const failValidation = (constraintName, constraintValue) => { - throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); - }; - if (mapper.constraints && value !== undefined && value !== null) { - const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints; - if (ExclusiveMaximum !== undefined && value >= ExclusiveMaximum) { - failValidation("ExclusiveMaximum", ExclusiveMaximum); - } - if (ExclusiveMinimum !== undefined && value <= ExclusiveMinimum) { - failValidation("ExclusiveMinimum", ExclusiveMinimum); - } - if (InclusiveMaximum !== undefined && value > InclusiveMaximum) { - failValidation("InclusiveMaximum", InclusiveMaximum); - } - if (InclusiveMinimum !== undefined && value < InclusiveMinimum) { - failValidation("InclusiveMinimum", InclusiveMinimum); - } - if (MaxItems !== undefined && value.length > MaxItems) { - failValidation("MaxItems", MaxItems); - } - if (MaxLength !== undefined && value.length > MaxLength) { - failValidation("MaxLength", MaxLength); - } - if (MinItems !== undefined && value.length < MinItems) { - failValidation("MinItems", MinItems); - } - if (MinLength !== undefined && value.length < MinLength) { - failValidation("MinLength", MinLength); - } - if (MultipleOf !== undefined && value % MultipleOf !== 0) { - failValidation("MultipleOf", MultipleOf); - } - if (Pattern) { - const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; - if (typeof value !== "string" || value.match(pattern) === null) { - failValidation("Pattern", Pattern); - } - } - if (UniqueItems && - value.some((item, i, ar) => ar.indexOf(item) !== i)) { - failValidation("UniqueItems", UniqueItems); - } - } + constructor(client) { + this.client = client; } /** - * Serialize the given object based on its metadata defined in the mapper - * - * @param mapper - The mapper which defines the metadata of the serializable object - * - * @param object - A valid Javascript object to be serialized - * - * @param objectName - Name of the serialized object - * - * @param options - additional options to serialization - * - * @returns A valid serialized Javascript object + * creates a new container under the specified account. If the container with the same name already + * exists, the operation fails + * @param options The options parameters. */ - serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; - const updatedOptions = { - xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, - }, - }; - let payload = {}; - const mapperType = mapper.type.name; - if (!objectName) { - objectName = mapper.serializedName; - } - if (mapperType.match(/^Sequence$/i) !== null) { - payload = []; - } - if (mapper.isConstant) { - object = mapper.defaultValue; - } - // This table of allowed values should help explain - // the mapper.required and mapper.nullable properties. - // X means "neither undefined or null are allowed". - // || required - // || true | false - // nullable || ========================== - // true || null | undefined/null - // false || X | undefined - // undefined || X | undefined/null - const { required, nullable } = mapper; - if (required && nullable && object === undefined) { - throw new Error(`${objectName} cannot be undefined.`); - } - if (required && !nullable && (object === undefined || object === null)) { - throw new Error(`${objectName} cannot be null or undefined.`); - } - if (!required && nullable === false && object === null) { - throw new Error(`${objectName} cannot be null.`); - } - if (object === undefined || object === null) { - payload = object; - } - else { - if (mapperType.match(/^any$/i) !== null) { - payload = object; - } - else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { - payload = serializeBasicTypes(mapperType, objectName, object); - } - else if (mapperType.match(/^Enum$/i) !== null) { - const enumMapper = mapper; - payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); - } - else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { - payload = serializeDateTypes(mapperType, object, objectName); - } - else if (mapperType.match(/^ByteArray$/i) !== null) { - payload = serializeByteArrayType(objectName, object); - } - else if (mapperType.match(/^Base64Url$/i) !== null) { - payload = serializeBase64UrlType(objectName, object); - } - else if (mapperType.match(/^Sequence$/i) !== null) { - payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } - else if (mapperType.match(/^Dictionary$/i) !== null) { - payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } - else if (mapperType.match(/^Composite$/i) !== null) { - payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } - } - return payload; + create(options) { + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** - * Deserialize the given object based on its metadata defined in the mapper - * - * @param mapper - The mapper which defines the metadata of the serializable object - * - * @param responseBody - A valid Javascript entity to be deserialized - * - * @param objectName - Name of the deserialized object - * - * @param options - Controls behavior of XML parser and builder. - * - * @returns A valid deserialized Javascript object + * returns all user-defined metadata and system properties for the specified container. The data + * returned does not include the container's list of blobs + * @param options The options parameters. */ - deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; - const updatedOptions = { - xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, - }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false, - }; - if (responseBody === undefined || responseBody === null) { - if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { - // Edge case for empty XML non-wrapped lists. xml2js can't distinguish - // between the list being empty versus being missing, - // so let's do the more user-friendly thing and return an empty list. - responseBody = []; - } - // specifically check for undefined as default value can be a falsey value `0, "", false, null` - if (mapper.defaultValue !== undefined) { - responseBody = mapper.defaultValue; - } - return responseBody; - } - let payload; - const mapperType = mapper.type.name; - if (!objectName) { - objectName = mapper.serializedName; - } - if (mapperType.match(/^Composite$/i) !== null) { - payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); - } - else { - if (this.isXML) { - const xmlCharKey = updatedOptions.xml.xmlCharKey; - /** - * If the mapper specifies this as a non-composite type value but the responseBody contains - * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, - * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. - */ - if (responseBody[interfaces_js_1.XML_ATTRKEY] !== undefined && responseBody[xmlCharKey] !== undefined) { - responseBody = responseBody[xmlCharKey]; - } - } - if (mapperType.match(/^Number$/i) !== null) { - payload = parseFloat(responseBody); - if (isNaN(payload)) { - payload = responseBody; - } - } - else if (mapperType.match(/^Boolean$/i) !== null) { - if (responseBody === "true") { - payload = true; - } - else if (responseBody === "false") { - payload = false; - } - else { - payload = responseBody; - } - } - else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { - payload = responseBody; - } - else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { - payload = new Date(responseBody); - } - else if (mapperType.match(/^UnixTime$/i) !== null) { - payload = unixTimeToDate(responseBody); - } - else if (mapperType.match(/^ByteArray$/i) !== null) { - payload = base64.decodeString(responseBody); - } - else if (mapperType.match(/^Base64Url$/i) !== null) { - payload = base64UrlToByteArray(responseBody); - } - else if (mapperType.match(/^Sequence$/i) !== null) { - payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); - } - else if (mapperType.match(/^Dictionary$/i) !== null) { - payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); - } - } - if (mapper.isConstant) { - payload = mapper.defaultValue; - } - return payload; + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } -} -/** - * Method that creates and returns a Serializer. - * @param modelMappers - Known models to map - * @param isXML - If XML should be supported - */ -function createSerializer(modelMappers = {}, isXML = false) { - return new SerializerImpl(modelMappers, isXML); -} -function trimEnd(str, ch) { - let len = str.length; - while (len - 1 >= 0 && str[len - 1] === ch) { - --len; + /** + * operation marks the specified container for deletion. The container and any blobs contained within + * it are later deleted during garbage collection + * @param options The options parameters. + */ + delete(options) { + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } - return str.substr(0, len); -} -function bufferToBase64Url(buffer) { - if (!buffer) { - return undefined; + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * @param options The options parameters. + */ + setMetadata(options) { + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } - if (!(buffer instanceof Uint8Array)) { - throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); + /** + * gets the permissions for the specified container. The permissions indicate whether container data + * may be accessed publicly. + * @param options The options parameters. + */ + getAccessPolicy(options) { + return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec); } - // Uint8Array to Base64. - const str = base64.encodeByteArray(buffer); - // Base64 to Base64Url. - return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); -} -function base64UrlToByteArray(str) { - if (!str) { - return undefined; + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a + * container may be accessed publicly. + * @param options The options parameters. + */ + setAccessPolicy(options) { + return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec); } - if (str && typeof str.valueOf() !== "string") { - throw new Error("Please provide an input of type string for converting to Uint8Array"); + /** + * Restores a previously-deleted container. + * @param options The options parameters. + */ + restore(options) { + return this.client.sendOperationRequest({ options }, restoreOperationSpec); } - // Base64Url to Base64. - str = str.replace(/-/g, "+").replace(/_/g, "/"); - // Base64 to Uint8Array. - return base64.decodeString(str); -} -function splitSerializeName(prop) { - const classes = []; - let partialclass = ""; - if (prop) { - const subwords = prop.split("."); - for (const item of subwords) { - if (item.charAt(item.length - 1) === "\\") { - partialclass += item.substr(0, item.length - 1) + "."; - } - else { - partialclass += item; - classes.push(partialclass); - partialclass = ""; - } - } + /** + * Renames an existing container. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param options The options parameters. + */ + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } - return classes; -} -function dateToUnixTime(d) { - if (!d) { - return undefined; + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch + * boundary. Example header value: multipart/mixed; boundary=batch_ + * @param body Initial data + * @param options The options parameters. + */ + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } - if (typeof d.valueOf() === "string") { - d = new Date(d); + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given + * search expression. Filter blobs searches within the given container. + * @param options The options parameters. + */ + filterBlobs(options) { + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } - return Math.floor(d.getTime() / 1000); -} -function unixTimeToDate(n) { - if (!n) { - return undefined; + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param options The options parameters. + */ + acquireLease(options) { + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } - return new Date(n * 1000); -} -function serializeBasicTypes(typeName, objectName, value) { - if (value !== null && value !== undefined) { - if (typeName.match(/^Number$/i) !== null) { - if (typeof value !== "number") { - throw new Error(`${objectName} with value ${value} must be of type number.`); - } - } - else if (typeName.match(/^String$/i) !== null) { - if (typeof value.valueOf() !== "string") { - throw new Error(`${objectName} with value "${value}" must be of type string.`); - } - } - else if (typeName.match(/^Uuid$/i) !== null) { - if (!(typeof value.valueOf() === "string" && (0, utils_js_1.isValidUuid)(value))) { - throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); - } - } - else if (typeName.match(/^Boolean$/i) !== null) { - if (typeof value !== "boolean") { - throw new Error(`${objectName} with value ${value} must be of type boolean.`); - } - } - else if (typeName.match(/^Stream$/i) !== null) { - const objectType = typeof value; - if (objectType !== "string" && - typeof value.pipe !== "function" && // NodeJS.ReadableStream - typeof value.tee !== "function" && // browser ReadableStream - !(value instanceof ArrayBuffer) && - !ArrayBuffer.isView(value) && - // File objects count as a type of Blob, so we want to use instanceof explicitly - !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && - objectType !== "function") { - throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); - } - } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } - return value; -} -function serializeEnumType(objectName, allowedValues, value) { - if (!allowedValues) { - throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } - const isPresent = allowedValues.some((item) => { - if (typeof item.valueOf() === "string") { - return item.toLowerCase() === value.toLowerCase(); - } - return item === value; - }); - if (!isPresent) { - throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param options The options parameters. + */ + breakLease(options) { + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } - return value; -} -function serializeByteArrayType(objectName, value) { - if (value !== undefined && value !== null) { - if (!(value instanceof Uint8Array)) { - throw new Error(`${objectName} must be of type Uint8Array.`); - } - value = base64.encodeByteArray(value); + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 + * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor + * (String) for a list of valid GUID string formats. + * @param options The options parameters. + */ + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } - return value; -} -function serializeBase64UrlType(objectName, value) { - if (value !== undefined && value !== null) { - if (!(value instanceof Uint8Array)) { - throw new Error(`${objectName} must be of type Uint8Array.`); - } - value = bufferToBase64Url(value); + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param options The options parameters. + */ + listBlobFlatSegment(options) { + return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec); } - return value; -} -function serializeDateTypes(typeName, value, objectName) { - if (value !== undefined && value !== null) { - if (typeName.match(/^Date$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); - } - value = - value instanceof Date - ? value.toISOString().substring(0, 10) - : new Date(value).toISOString().substring(0, 10); - } - else if (typeName.match(/^DateTime$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); - } - value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); - } - else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); - } - value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); - } - else if (typeName.match(/^UnixTime$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` + - `for it to be serialized in UnixTime/Epoch format.`); - } - value = dateToUnixTime(value); - } - else if (typeName.match(/^TimeSpan$/i) !== null) { - if (!(0, utils_js_1.isDuration)(value)) { - throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); - } - } + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix + * element in the response body that acts as a placeholder for all blobs whose names begin with the + * same substring up to the appearance of the delimiter character. The delimiter may be a single + * character or a string. + * @param options The options parameters. + */ + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); } - return value; -} -function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; - if (!Array.isArray(object)) { - throw new Error(`${objectName} must be of type Array.`); + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } - let elementType = mapper.type.element; - if (!elementType || typeof elementType !== "object") { - throw new Error(`element" metadata for an Array must be defined in the ` + - `mapper and it must of type "object" in ${objectName}.`); +} +exports.ContainerImpl = ContainerImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const createOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.ContainerCreateHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getPropertiesOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.ContainerGetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const deleteOperationSpec = { + path: "/{containerName}", + httpMethod: "DELETE", + responses: { + 202: { + headersMapper: Mappers.ContainerDeleteHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setMetadataOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerSetMetadataHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getAccessPolicyOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { name: "Composite", className: "SignedIdentifier" }, + }, + }, + serializedName: "SignedIdentifiers", + xmlName: "SignedIdentifiers", + xmlIsWrapped: true, + xmlElementName: "SignedIdentifier", + }, + headersMapper: Mappers.ContainerGetAccessPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setAccessPolicyOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerSetAccessPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders, + }, + }, + requestBody: Parameters.containerAcl, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const restoreOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.ContainerRestoreHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion, + ], + isXML: true, + serializer: xmlSerializer, +}; +const renameOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerRenameHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const submitBatchOperationSpec = { + path: "/{containerName}", + httpMethod: "POST", + responses: { + 202: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.ContainerSubmitBatchHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders, + }, + }, + requestBody: Parameters.body, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const filterBlobsOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const acquireLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.ContainerAcquireLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const releaseLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerReleaseLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const renewLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerRenewLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + ], + isXML: true, + serializer: xmlSerializer, +}; +const breakLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.ContainerBreakLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + ], + isXML: true, + serializer: xmlSerializer, +}; +const changeLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerChangeLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const listBlobFlatSegmentOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const listBlobHierarchySegmentOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getAccountInfoOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.ContainerGetAccountInfoHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=container.js.map + +/***/ }), + +/***/ 13759: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(1746), exports); +tslib_1.__exportStar(__nccwpck_require__(3269), exports); +tslib_1.__exportStar(__nccwpck_require__(8296), exports); +tslib_1.__exportStar(__nccwpck_require__(69477), exports); +tslib_1.__exportStar(__nccwpck_require__(80313), exports); +tslib_1.__exportStar(__nccwpck_require__(48652), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 69477: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PageBlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing PageBlob operations. */ +class PageBlobImpl { + client; + /** + * Initialize a new instance of the class PageBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - // Quirk: Composite mappers referenced by `element` might - // not have *all* properties declared (like uberParent), - // so let's try to look up the full definition by name. - if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; + /** + * The Create operation creates a new page blob. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. + * @param options The options parameters. + */ + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); } - const tempArray = []; - for (let i = 0; i < object.length; i++) { - const serializedValue = serializer.serialize(elementType, object[i], objectName, options); - if (isXml && elementType.xmlNamespace) { - const xmlnsKey = elementType.xmlNamespacePrefix - ? `xmlns:${elementType.xmlNamespacePrefix}` - : "xmlns"; - if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); - tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; - } - else { - tempArray[i] = {}; - tempArray[i][options.xml.xmlCharKey] = serializedValue; - tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; - } - } - else { - tempArray[i] = serializedValue; - } + /** + * The Upload Pages operation writes a range of pages to a page blob + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); } - return tempArray; -} -function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { - if (typeof object !== "object") { - throw new Error(`${objectName} must be of type object.`); + /** + * The Clear Pages operation clears a set of pages from a page blob + * @param contentLength The length of the request. + * @param options The options parameters. + */ + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); } - const valueType = mapper.type.value; - if (!valueType || typeof valueType !== "object") { - throw new Error(`"value" metadata for a Dictionary must be defined in the ` + - `mapper and it must of type "object" in ${objectName}.`); + /** + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a + * URL + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should + * match the ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 + * aligned and range-end is required. + * @param options The options parameters. + */ + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); } - const tempDictionary = {}; - for (const key of Object.keys(object)) { - const serializedValue = serializer.serialize(valueType, object[key], objectName, options); - // If the element needs an XML namespace we need to add it within the $ property - tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a + * page blob + * @param options The options parameters. + */ + getPageRanges(options) { + return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); } - // Add the namespace to the root element if needed - if (isXml && mapper.xmlNamespace) { - const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - const result = tempDictionary; - result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; - return result; + /** + * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot. + * @param options The options parameters. + */ + getPageRangesDiff(options) { + return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); } - return tempDictionary; -} -/** - * Resolves the additionalProperties property from a referenced mapper - * @param serializer - the serializer containing the entire set of mappers - * @param mapper - the composite mapper to resolve - * @param objectName - name of the object being serialized - */ -function resolveAdditionalProperties(serializer, mapper, objectName) { - const additionalProperties = mapper.type.additionalProperties; - if (!additionalProperties && mapper.type.className) { - const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; + /** + * Resize the Blob + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. + * @param options The options parameters. + */ + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); } - return additionalProperties; -} -/** - * Finds the mapper referenced by className - * @param serializer - the serializer containing the entire set of mappers - * @param mapper - the composite mapper to resolve - * @param objectName - name of the object being serialized - */ -function resolveReferencedMapper(serializer, mapper, objectName) { - const className = mapper.type.className; - if (!className) { - throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, undefined, 2)}".`); + /** + * Update the sequence number of the blob + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. + * This property applies to page blobs only. This property indicates how the service should modify the + * blob's sequence number + * @param options The options parameters. + */ + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); } - return serializer.modelMappers[className]; -} -/** - * Resolves a composite mapper's modelProperties. - * @param serializer - the serializer containing the entire set of mappers - * @param mapper - the composite mapper to resolve - */ -function resolveModelProperties(serializer, mapper, objectName) { - let modelProps = mapper.type.modelProperties; - if (!modelProps) { - const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - if (!modelMapper) { - throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); - } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; - if (!modelProps) { - throw new Error(`modelProperties cannot be null or undefined in the ` + - `mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); - } + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. + * The snapshot is copied such that only the differential changes between the previously copied + * snapshot are transferred to the destination. The copied snapshots are complete copies of the + * original snapshot and can be read or copied from as usual. This API is supported since REST version + * 2016-05-31. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); } - return modelProps; } -function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { - if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { - mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); - } - if (object !== undefined && object !== null) { - const payload = {}; - const modelProps = resolveModelProperties(serializer, mapper, objectName); - for (const key of Object.keys(modelProps)) { - const propertyMapper = modelProps[key]; - if (propertyMapper.readOnly) { - continue; - } - let propName; - let parentObject = payload; - if (serializer.isXML) { - if (propertyMapper.xmlIsWrapped) { - propName = propertyMapper.xmlName; - } - else { - propName = propertyMapper.xmlElementName || propertyMapper.xmlName; - } - } - else { - const paths = splitSerializeName(propertyMapper.serializedName); - propName = paths.pop(); - for (const pathName of paths) { - const childObject = parentObject[pathName]; - if ((childObject === undefined || childObject === null) && - ((object[key] !== undefined && object[key] !== null) || - propertyMapper.defaultValue !== undefined)) { - parentObject[pathName] = {}; - } - parentObject = parentObject[pathName]; - } - } - if (parentObject !== undefined && parentObject !== null) { - if (isXml && mapper.xmlNamespace) { - const xmlnsKey = mapper.xmlNamespacePrefix - ? `xmlns:${mapper.xmlNamespacePrefix}` - : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); - } - const propertyObjectName = propertyMapper.serializedName !== "" - ? objectName + "." + propertyMapper.serializedName - : objectName; - let toSerialize = object[key]; - const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); - if (polymorphicDiscriminator && - polymorphicDiscriminator.clientName === key && - (toSerialize === undefined || toSerialize === null)) { - toSerialize = mapper.serializedName; - } - const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); - if (serializedValue !== undefined && propName !== undefined && propName !== null) { - const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); - if (isXml && propertyMapper.xmlIsAttribute) { - // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js. - // This keeps things simple while preventing name collision - // with names in user documents. - parentObject[interfaces_js_1.XML_ATTRKEY] = parentObject[interfaces_js_1.XML_ATTRKEY] || {}; - parentObject[interfaces_js_1.XML_ATTRKEY][propName] = serializedValue; - } - else if (isXml && propertyMapper.xmlIsWrapped) { - parentObject[propName] = { [propertyMapper.xmlElementName]: value }; - } - else { - parentObject[propName] = value; - } - } - } - } - const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); - if (additionalPropertiesMapper) { - const propNames = Object.keys(modelProps); - for (const clientPropName in object) { - const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); - if (isAdditionalProperty) { - payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); - } - } - } - return payload; +exports.PageBlobImpl = PageBlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const createOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobCreateHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber, + ], + isXML: true, + serializer: xmlSerializer, +}; +const uploadPagesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobUploadPagesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const clearPagesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobClearPagesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const uploadPagesFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getPageRangesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getPageRangesDiffOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl, + ], + isXML: true, + serializer: xmlSerializer, +}; +const resizeOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.PageBlobResizeHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders, + }, + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength, + ], + isXML: true, + serializer: xmlSerializer, +}; +const updateSequenceNumberOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders, + }, + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction, + ], + isXML: true, + serializer: xmlSerializer, +}; +const copyIncrementalOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.PageBlobCopyIncrementalHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=pageBlob.js.map + +/***/ }), + +/***/ 1746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing Service operations. */ +class ServiceImpl { + client; + /** + * Initialize a new instance of the class Service class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - return object; -} -function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { - if (!isXml || !propertyMapper.xmlNamespace) { - return serializedValue; + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage + * Analytics and CORS (Cross-Origin Resource Sharing) rules + * @param blobServiceProperties The StorageService properties. + * @param options The options parameters. + */ + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); } - const xmlnsKey = propertyMapper.xmlNamespacePrefix - ? `xmlns:${propertyMapper.xmlNamespacePrefix}` - : "xmlns"; - const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; - if (["Composite"].includes(propertyMapper.type.name)) { - if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { - return serializedValue; - } - else { - const result = Object.assign({}, serializedValue); - result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; - return result; - } + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics + * and CORS (Cross-Origin Resource Sharing) rules. + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } - const result = {}; - result[options.xml.xmlCharKey] = serializedValue; - result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; - return result; -} -function isSpecialXmlProperty(propertyName, options) { - return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); -} -function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; - if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { - mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the + * secondary location endpoint when read-access geo-redundant replication is enabled for the storage + * account. + * @param options The options parameters. + */ + getStatistics(options) { + return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec); } - const modelProps = resolveModelProperties(serializer, mapper, objectName); - let instance = {}; - const handledPropertyNames = []; - for (const key of Object.keys(modelProps)) { - const propertyMapper = modelProps[key]; - const paths = splitSerializeName(modelProps[key].serializedName); - handledPropertyNames.push(paths[0]); - const { serializedName, xmlName, xmlElementName } = propertyMapper; - let propertyObjectName = objectName; - if (serializedName !== "" && serializedName !== undefined) { - propertyObjectName = objectName + "." + serializedName; - } - const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; - if (headerCollectionPrefix) { - const dictionary = {}; - for (const headerKey of Object.keys(responseBody)) { - if (headerKey.startsWith(headerCollectionPrefix)) { - dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); - } - handledPropertyNames.push(headerKey); - } - instance[key] = dictionary; - } - else if (serializer.isXML) { - if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1.XML_ATTRKEY]) { - instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1.XML_ATTRKEY][xmlName], propertyObjectName, options); - } - else if (propertyMapper.xmlIsMsText) { - if (responseBody[xmlCharKey] !== undefined) { - instance[key] = responseBody[xmlCharKey]; - } - else if (typeof responseBody === "string") { - // The special case where xml parser parses "content" into JSON of - // `{ name: "content"}` instead of `{ name: { "_": "content" }}` - instance[key] = responseBody; - } - } - else { - const propertyName = xmlElementName || xmlName || serializedName; - if (propertyMapper.xmlIsWrapped) { - /* a list of wrapped by - For the xml example below - - ... - ... - - the responseBody has - { - Cors: { - CorsRule: [{...}, {...}] - } - } - xmlName is "Cors" and xmlElementName is"CorsRule". - */ - const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; - instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); - handledPropertyNames.push(xmlName); - } - else { - const property = responseBody[propertyName]; - instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); - handledPropertyNames.push(propertyName); - } - } - } - else { - // deserialize the property if it is present in the provided responseBody instance - let propertyInstance; - let res = responseBody; - // traversing the object step by step. - let steps = 0; - for (const item of paths) { - if (!res) - break; - steps++; - res = res[item]; - } - // only accept null when reaching the last position of object otherwise it would be undefined - if (res === null && steps < paths.length) { - res = undefined; - } - propertyInstance = res; - const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; - // checking that the model property name (key)(ex: "fishtype") and the - // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") - // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") - // is a better approach. The generator is not consistent with escaping '\.' in the - // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator - // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, - // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and - // the transformation of model property name (ex: "fishtype") is done consistently. - // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. - if (polymorphicDiscriminator && - key === polymorphicDiscriminator.clientName && - (propertyInstance === undefined || propertyInstance === null)) { - propertyInstance = mapper.serializedName; - } - let serializedValue; - // paging - if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { - propertyInstance = responseBody[key]; - const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); - // Copy over any properties that have already been added into the instance, where they do - // not exist on the newly de-serialized array - for (const [k, v] of Object.entries(instance)) { - if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) { - arrayInstance[k] = v; - } - } - instance = arrayInstance; - } - else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { - serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); - instance[key] = serializedValue; - } - } + /** + * The List Containers Segment operation returns a list of the containers under the specified account + * @param options The options parameters. + */ + listContainersSegment(options) { + return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec); } - const additionalPropertiesMapper = mapper.type.additionalProperties; - if (additionalPropertiesMapper) { - const isAdditionalProperty = (responsePropName) => { - for (const clientPropName in modelProps) { - const paths = splitSerializeName(modelProps[clientPropName].serializedName); - if (paths[0] === responsePropName) { - return false; - } - } - return true; + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * @param keyInfo Key information + * @param options The options parameters. + */ + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); + } + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); + } + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch + * boundary. Example header value: multipart/mixed; boundary=batch_ + * @param body Initial data + * @param options The options parameters. + */ + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); + } + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a + * given search expression. Filter blobs searches across all containers within a storage account but + * can be scoped within the expression to a single container. + * @param options The options parameters. + */ + filterBlobs(options) { + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); + } +} +exports.ServiceImpl = ServiceImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const setPropertiesOperationSpec = { + path: "/", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.ServiceSetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders, + }, + }, + requestBody: Parameters.blobServiceProperties, + queryParameters: [ + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getPropertiesOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getStatisticsOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const listContainersSegmentOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getUserDelegationKeyOperationSpec = { + path: "/", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders, + }, + }, + requestBody: Parameters.keyInfo, + queryParameters: [ + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getAccountInfoOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.ServiceGetAccountInfoHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const submitBatchOperationSpec = { + path: "/", + httpMethod: "POST", + responses: { + 202: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.ServiceSubmitBatchHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders, + }, + }, + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const filterBlobsOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=service.js.map + +/***/ }), + +/***/ 24763: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=appendBlob.js.map + +/***/ }), + +/***/ 57427: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=blob.js.map + +/***/ }), + +/***/ 56945: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=blockBlob.js.map + +/***/ }), + +/***/ 43634: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=container.js.map + +/***/ }), + +/***/ 68529: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(75650), exports); +tslib_1.__exportStar(__nccwpck_require__(43634), exports); +tslib_1.__exportStar(__nccwpck_require__(57427), exports); +tslib_1.__exportStar(__nccwpck_require__(76425), exports); +tslib_1.__exportStar(__nccwpck_require__(24763), exports); +tslib_1.__exportStar(__nccwpck_require__(56945), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 76425: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=pageBlob.js.map + +/***/ }), + +/***/ 75650: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=service.js.map + +/***/ }), + +/***/ 50166: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageClient = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreHttpCompat = tslib_1.__importStar(__nccwpck_require__(25083)); +const index_js_1 = __nccwpck_require__(13759); +class StorageClient extends coreHttpCompat.ExtendedServiceClient { + url; + version; + /** + * Initializes a new instance of the StorageClient class. + * @param url The URL of the service account, container, or blob that is the target of the desired + * operation. + * @param options The parameter options + */ + constructor(url, options) { + if (url === undefined) { + throw new Error("'url' cannot be null"); + } + // Initializing default values for options + if (!options) { + options = {}; + } + const defaults = { + requestContentType: "application/json; charset=utf-8", }; - for (const responsePropName in responseBody) { - if (isAdditionalProperty(responsePropName)) { - instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); - } + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; + const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix, + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}", + }; + super(optionsWithDefaults); + // Parameter assignments + this.url = url; + // Assigning values to Constant parameters + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); + } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; +} +exports.StorageClient = StorageClient; +//# sourceMappingURL=storageClient.js.map + +/***/ }), + +/***/ 39241: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.KnownEncryptionAlgorithmType = void 0; +/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ +var KnownEncryptionAlgorithmType; +(function (KnownEncryptionAlgorithmType) { + KnownEncryptionAlgorithmType["AES256"] = "AES256"; +})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); +//# sourceMappingURL=generatedModels.js.map + +/***/ }), + +/***/ 37168: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = exports.RestError = exports.BaseRequestPolicy = exports.StorageOAuthScopes = exports.newPipeline = exports.isPipelineLike = exports.Pipeline = exports.getBlobServiceAccountAudience = exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTier = exports.generateBlobSASQueryParameters = exports.generateAccountSASQueryParameters = void 0; +const tslib_1 = __nccwpck_require__(4351); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return core_rest_pipeline_1.RestError; } })); +tslib_1.__exportStar(__nccwpck_require__(12679), exports); +tslib_1.__exportStar(__nccwpck_require__(54437), exports); +tslib_1.__exportStar(__nccwpck_require__(63750), exports); +tslib_1.__exportStar(__nccwpck_require__(20106), exports); +tslib_1.__exportStar(__nccwpck_require__(70793), exports); +tslib_1.__exportStar(__nccwpck_require__(70790), exports); +tslib_1.__exportStar(__nccwpck_require__(34606), exports); +var AccountSASSignatureValues_js_1 = __nccwpck_require__(72763); +Object.defineProperty(exports, "generateAccountSASQueryParameters", ({ enumerable: true, get: function () { return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; } })); +tslib_1.__exportStar(__nccwpck_require__(73689), exports); +tslib_1.__exportStar(__nccwpck_require__(71861), exports); +tslib_1.__exportStar(__nccwpck_require__(1227), exports); +tslib_1.__exportStar(__nccwpck_require__(87393), exports); +var BlobSASSignatureValues_js_1 = __nccwpck_require__(48921); +Object.defineProperty(exports, "generateBlobSASQueryParameters", ({ enumerable: true, get: function () { return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; } })); +tslib_1.__exportStar(__nccwpck_require__(86562), exports); +tslib_1.__exportStar(__nccwpck_require__(27579), exports); +tslib_1.__exportStar(__nccwpck_require__(42803), exports); +tslib_1.__exportStar(__nccwpck_require__(35778), exports); +tslib_1.__exportStar(__nccwpck_require__(59155), exports); +var models_js_1 = __nccwpck_require__(64526); +Object.defineProperty(exports, "BlockBlobTier", ({ enumerable: true, get: function () { return models_js_1.BlockBlobTier; } })); +Object.defineProperty(exports, "PremiumPageBlobTier", ({ enumerable: true, get: function () { return models_js_1.PremiumPageBlobTier; } })); +Object.defineProperty(exports, "StorageBlobAudience", ({ enumerable: true, get: function () { return models_js_1.StorageBlobAudience; } })); +Object.defineProperty(exports, "getBlobServiceAccountAudience", ({ enumerable: true, get: function () { return models_js_1.getBlobServiceAccountAudience; } })); +var Pipeline_js_1 = __nccwpck_require__(33781); +Object.defineProperty(exports, "Pipeline", ({ enumerable: true, get: function () { return Pipeline_js_1.Pipeline; } })); +Object.defineProperty(exports, "isPipelineLike", ({ enumerable: true, get: function () { return Pipeline_js_1.isPipelineLike; } })); +Object.defineProperty(exports, "newPipeline", ({ enumerable: true, get: function () { return Pipeline_js_1.newPipeline; } })); +Object.defineProperty(exports, "StorageOAuthScopes", ({ enumerable: true, get: function () { return Pipeline_js_1.StorageOAuthScopes; } })); +tslib_1.__exportStar(__nccwpck_require__(98637), exports); +var RequestPolicy_js_1 = __nccwpck_require__(33847); +Object.defineProperty(exports, "BaseRequestPolicy", ({ enumerable: true, get: function () { return RequestPolicy_js_1.BaseRequestPolicy; } })); +tslib_1.__exportStar(__nccwpck_require__(51870), exports); +tslib_1.__exportStar(__nccwpck_require__(15513), exports); +tslib_1.__exportStar(__nccwpck_require__(98637), exports); +tslib_1.__exportStar(__nccwpck_require__(66776), exports); +tslib_1.__exportStar(__nccwpck_require__(21969), exports); +tslib_1.__exportStar(__nccwpck_require__(39241), exports); +var log_js_1 = __nccwpck_require__(53282); +Object.defineProperty(exports, "logger", ({ enumerable: true, get: function () { return log_js_1.logger; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 583: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AVRO_SCHEMA_KEY = exports.AVRO_CODEC_KEY = exports.AVRO_INIT_BYTES = exports.AVRO_SYNC_MARKER_SIZE = void 0; +exports.AVRO_SYNC_MARKER_SIZE = 16; +exports.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); +exports.AVRO_CODEC_KEY = "avro.codec"; +exports.AVRO_SCHEMA_KEY = "avro.schema"; +//# sourceMappingURL=AvroConstants.js.map + +/***/ }), + +/***/ 58119: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AvroType = exports.AvroParser = void 0; +class AvroParser { + /** + * Reads a fixed number of bytes from the stream. + * + * @param stream - + * @param length - + * @param options - + */ + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); + if (bytes.length !== length) { + throw new Error("Hit stream end."); } + return bytes; } - else if (responseBody && !options.ignoreUnknownProperties) { - for (const key of Object.keys(responseBody)) { - if (instance[key] === undefined && - !handledPropertyNames.includes(key) && - !isSpecialXmlProperty(key, options)) { - instance[key] = responseBody[key]; + /** + * Reads a single byte from the stream. + * + * @param stream - + * @param options - + */ + static async readByte(stream, options = {}) { + const buf = await AvroParser.readFixedBytes(stream, 1, options); + return buf[0]; + } + // int and long are stored in variable-length zig-zag coding. + // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt + // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types + static async readZigZagLong(stream, options = {}) { + let zigZagEncoded = 0; + let significanceInBit = 0; + let byte, haveMoreByte, significanceInFloat; + do { + byte = await AvroParser.readByte(stream, options); + haveMoreByte = byte & 0x80; + zigZagEncoded |= (byte & 0x7f) << significanceInBit; + significanceInBit += 7; + } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers + if (haveMoreByte) { + // Switch to float arithmetic + // eslint-disable-next-line no-self-assign + zigZagEncoded = zigZagEncoded; + significanceInFloat = 268435456; // 2 ** 28. + do { + byte = await AvroParser.readByte(stream, options); + zigZagEncoded += (byte & 0x7f) * significanceInFloat; + significanceInFloat *= 128; // 2 ** 7 + } while (byte & 0x80); + const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; + if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) { + throw new Error("Integer overflow."); } + return res; } + return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1); } - return instance; -} -function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { - /* jshint validthis: true */ - const value = mapper.type.value; - if (!value || typeof value !== "object") { - throw new Error(`"value" metadata for a Dictionary must be defined in the ` + - `mapper and it must of type "object" in ${objectName}`); + static async readLong(stream, options = {}) { + return AvroParser.readZigZagLong(stream, options); } - if (responseBody) { - const tempDictionary = {}; - for (const key of Object.keys(responseBody)) { - tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); - } - return tempDictionary; + static async readInt(stream, options = {}) { + return AvroParser.readZigZagLong(stream, options); } - return responseBody; -} -function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; - let element = mapper.type.element; - if (!element || typeof element !== "object") { - throw new Error(`element" metadata for an Array must be defined in the ` + - `mapper and it must of type "object" in ${objectName}`); + static async readNull() { + return null; } - if (responseBody) { - if (!Array.isArray(responseBody)) { - // xml2js will interpret a single element array as just the element, so force it to be an array - responseBody = [responseBody]; + static async readBoolean(stream, options = {}) { + const b = await AvroParser.readByte(stream, options); + if (b === 1) { + return true; } - // Quirk: Composite mappers referenced by `element` might - // not have *all* properties declared (like uberParent), - // so let's try to look up the full definition by name. - if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + else if (b === 0) { + return false; } - const tempArray = []; - for (let i = 0; i < responseBody.length; i++) { - tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options); + else { + throw new Error("Byte was not a boolean."); } - return tempArray; } - return responseBody; -} -function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { - const typeNamesToCheck = [typeName]; - while (typeNamesToCheck.length) { - const currentName = typeNamesToCheck.shift(); - const indexDiscriminator = discriminatorValue === currentName - ? discriminatorValue - : currentName + "." + discriminatorValue; - if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) { - return discriminators[indexDiscriminator]; + static async readFloat(stream, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream, 4, options); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat32(0, true); // littleEndian = true + } + static async readDouble(stream, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream, 8, options); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat64(0, true); // littleEndian = true + } + static async readBytes(stream, options = {}) { + const size = await AvroParser.readLong(stream, options); + if (size < 0) { + throw new Error("Bytes size was negative."); } - else { - for (const [name, mapper] of Object.entries(discriminators)) { - if (name.startsWith(currentName + ".") && - mapper.type.uberParent === currentName && - mapper.type.className) { - typeNamesToCheck.push(mapper.type.className); - } - } + return stream.read(size, { abortSignal: options.abortSignal }); + } + static async readString(stream, options = {}) { + const u8arr = await AvroParser.readBytes(stream, options); + const utf8decoder = new TextDecoder(); + return utf8decoder.decode(u8arr); + } + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await AvroParser.readString(stream, options); + // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter. + const value = await readItemMethod(stream, options); + return { key, value }; + } + static async readMap(stream, readItemMethod, options = {}) { + const readPairMethod = (s, opts = {}) => { + return AvroParser.readMapPair(s, readItemMethod, opts); + }; + const pairs = await AvroParser.readArray(stream, readPairMethod, options); + const dict = {}; + for (const pair of pairs) { + dict[pair.key] = pair.value; } + return dict; } - return undefined; -} -function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; - const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); - if (polymorphicDiscriminator) { - let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; - if (discriminatorName) { - // The serializedName might have \\, which we just want to ignore - if (polymorphicPropertyName === "serializedName") { - discriminatorName = discriminatorName.replace(/\\/gi, ""); + static async readArray(stream, readItemMethod, options = {}) { + const items = []; + for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) { + if (count < 0) { + // Ignore block sizes + await AvroParser.readLong(stream, options); + count = -count; } - const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; - if (typeof discriminatorValue === "string" && typeName) { - const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); - if (polymorphicMapper) { - mapper = polymorphicMapper; - } + while (count--) { + const item = await readItemMethod(stream, options); + items.push(item); } } + return items; } - return mapper; -} -function getPolymorphicDiscriminatorRecursively(serializer, mapper) { - return (mapper.type.polymorphicDiscriminator || - getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || - getPolymorphicDiscriminatorSafely(serializer, mapper.type.className)); -} -function getPolymorphicDiscriminatorSafely(serializer, typeName) { - return (typeName && - serializer.modelMappers[typeName] && - serializer.modelMappers[typeName].type.polymorphicDiscriminator); } -/** - * Known types of Mappers - */ -exports.MapperTypeNames = { - Base64Url: "Base64Url", - Boolean: "Boolean", - ByteArray: "ByteArray", - Composite: "Composite", - Date: "Date", - DateTime: "DateTime", - DateTimeRfc1123: "DateTimeRfc1123", - Dictionary: "Dictionary", - Enum: "Enum", - Number: "Number", - Object: "Object", - Sequence: "Sequence", - String: "String", - Stream: "Stream", - TimeSpan: "TimeSpan", - UnixTime: "UnixTime", -}; -//# sourceMappingURL=serializer.js.map - -/***/ }), - -/***/ 28927: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServiceClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const pipeline_js_1 = __nccwpck_require__(33924); -const utils_js_1 = __nccwpck_require__(25363); -const httpClientCache_js_1 = __nccwpck_require__(30308); -const operationHelpers_js_1 = __nccwpck_require__(62074); -const urlHelpers_js_1 = __nccwpck_require__(98258); -const interfaceHelpers_js_1 = __nccwpck_require__(41459); -const log_js_1 = __nccwpck_require__(53776); -/** - * Initializes a new instance of the ServiceClient. - */ -class ServiceClient { +exports.AvroParser = AvroParser; +var AvroComplex; +(function (AvroComplex) { + AvroComplex["RECORD"] = "record"; + AvroComplex["ENUM"] = "enum"; + AvroComplex["ARRAY"] = "array"; + AvroComplex["MAP"] = "map"; + AvroComplex["UNION"] = "union"; + AvroComplex["FIXED"] = "fixed"; +})(AvroComplex || (AvroComplex = {})); +var AvroPrimitive; +(function (AvroPrimitive) { + AvroPrimitive["NULL"] = "null"; + AvroPrimitive["BOOLEAN"] = "boolean"; + AvroPrimitive["INT"] = "int"; + AvroPrimitive["LONG"] = "long"; + AvroPrimitive["FLOAT"] = "float"; + AvroPrimitive["DOUBLE"] = "double"; + AvroPrimitive["BYTES"] = "bytes"; + AvroPrimitive["STRING"] = "string"; +})(AvroPrimitive || (AvroPrimitive = {})); +class AvroType { /** - * The ServiceClient constructor - * @param options - The service client options that govern the behavior of the client. + * Determines the AvroType from the Avro Schema. */ - constructor(options = {}) { - var _a, _b; - this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; - if (options.baseUri) { - log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + static fromSchema(schema) { + if (typeof schema === "string") { + return AvroType.fromStringSchema(schema); } - this._allowInsecureConnection = options.allowInsecureConnection; - this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); - this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { - for (const { policy, position } of options.additionalPolicies) { - // Sign happens after Retry and is commonly needed to occur - // before policies that intercept post-retry. - const afterPhase = position === "perRetry" ? "Sign" : undefined; - this.pipeline.addPolicy(policy, { - afterPhase, - }); - } + else if (Array.isArray(schema)) { + return AvroType.fromArraySchema(schema); + } + else { + return AvroType.fromObjectSchema(schema); } } - /** - * Send the provided httpRequest. - */ - async sendRequest(request) { - return this.pipeline.sendRequest(this._httpClient, request); + static fromStringSchema(schema) { + switch (schema) { + case AvroPrimitive.NULL: + case AvroPrimitive.BOOLEAN: + case AvroPrimitive.INT: + case AvroPrimitive.LONG: + case AvroPrimitive.FLOAT: + case AvroPrimitive.DOUBLE: + case AvroPrimitive.BYTES: + case AvroPrimitive.STRING: + return new AvroPrimitiveType(schema); + default: + throw new Error(`Unexpected Avro type ${schema}`); + } } - /** - * Send an HTTP request that is populated using the provided OperationSpec. - * @typeParam T - The typed result of the request, based on the OperationSpec. - * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. - * @param operationSpec - The OperationSpec to use to populate the httpRequest. - */ - async sendOperationRequest(operationArguments, operationSpec) { - const endpoint = operationSpec.baseUrl || this._endpoint; - if (!endpoint) { - throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); + static fromArraySchema(schema) { + return new AvroUnionType(schema.map(AvroType.fromSchema)); + } + static fromObjectSchema(schema) { + const type = schema.type; + // Primitives can be defined as strings or objects + try { + return AvroType.fromStringSchema(type); } - // Templatized URLs sometimes reference properties on the ServiceClient child class, - // so we have to pass `this` below in order to search these properties if they're - // not part of OperationArguments - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); - const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url, - }); - request.method = operationSpec.httpMethod; - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - operationInfo.operationSpec = operationSpec; - operationInfo.operationArguments = operationArguments; - const contentType = operationSpec.contentType || this._requestContentType; - if (contentType && operationSpec.requestBody) { - request.headers.set("Content-Type", contentType); + catch { + // no-op } - const options = operationArguments.options; - if (options) { - const requestOptions = options.requestOptions; - if (requestOptions) { - if (requestOptions.timeout) { - request.timeout = requestOptions.timeout; + switch (type) { + case AvroComplex.RECORD: + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); } - if (requestOptions.onUploadProgress) { - request.onUploadProgress = requestOptions.onUploadProgress; + if (!schema.name) { + throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); } - if (requestOptions.onDownloadProgress) { - request.onDownloadProgress = requestOptions.onDownloadProgress; + // eslint-disable-next-line no-case-declarations + const fields = {}; + if (!schema.fields) { + throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); } - if (requestOptions.shouldDeserialize !== undefined) { - operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; + for (const field of schema.fields) { + fields[field.name] = AvroType.fromSchema(field.type); } - if (requestOptions.allowInsecureConnection) { - request.allowInsecureConnection = true; + return new AvroRecordType(fields, schema.name); + case AvroComplex.ENUM: + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); } - } - if (options.abortSignal) { - request.abortSignal = options.abortSignal; - } - if (options.tracingOptions) { - request.tracingOptions = options.tracingOptions; - } - } - if (this._allowInsecureConnection) { - request.allowInsecureConnection = true; - } - if (request.streamResponseStatusCodes === undefined) { - request.streamResponseStatusCodes = (0, interfaceHelpers_js_1.getStreamingResponseStatusCodes)(operationSpec); - } - try { - const rawResponse = await this.sendRequest(request); - const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { - options.onResponse(rawResponse, flatResponse); - } - return flatResponse; - } - catch (error) { - if (typeof error === "object" && (error === null || error === void 0 ? void 0 : error.response)) { - const rawResponse = error.response; - const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); - error.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { - options.onResponse(rawResponse, flatResponse, error); + if (!schema.symbols) { + throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); } - } - throw error; + return new AvroEnumType(schema.symbols); + case AvroComplex.MAP: + if (!schema.values) { + throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); + } + return new AvroMapType(AvroType.fromSchema(schema.values)); + case AvroComplex.ARRAY: // Unused today + case AvroComplex.FIXED: // Unused today + default: + throw new Error(`Unexpected Avro type ${type} in ${schema}`); + } + } +} +exports.AvroType = AvroType; +class AvroPrimitiveType extends AvroType { + _primitive; + constructor(primitive) { + super(); + this._primitive = primitive; + } + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + read(stream, options = {}) { + switch (this._primitive) { + case AvroPrimitive.NULL: + return AvroParser.readNull(); + case AvroPrimitive.BOOLEAN: + return AvroParser.readBoolean(stream, options); + case AvroPrimitive.INT: + return AvroParser.readInt(stream, options); + case AvroPrimitive.LONG: + return AvroParser.readLong(stream, options); + case AvroPrimitive.FLOAT: + return AvroParser.readFloat(stream, options); + case AvroPrimitive.DOUBLE: + return AvroParser.readDouble(stream, options); + case AvroPrimitive.BYTES: + return AvroParser.readBytes(stream, options); + case AvroPrimitive.STRING: + return AvroParser.readString(stream, options); + default: + throw new Error("Unknown Avro Primitive"); } } } -exports.ServiceClient = ServiceClient; -function createDefaultPipeline(options) { - const credentialScopes = getCredentialScopes(options); - const credentialOptions = options.credential && credentialScopes - ? { credentialScopes, credential: options.credential } - : undefined; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); +class AvroEnumType extends AvroType { + _symbols; + constructor(symbols) { + super(); + this._symbols = symbols; + } + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); + return this._symbols[value]; + } } -function getCredentialScopes(options) { - if (options.credentialScopes) { - return options.credentialScopes; +class AvroUnionType extends AvroType { + _types; + constructor(types) { + super(); + this._types = types; } - if (options.endpoint) { - return `${options.endpoint}/.default`; + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } - if (options.baseUri) { - return `${options.baseUri}/.default`; +} +class AvroMapType extends AvroType { + _itemType; + constructor(itemType) { + super(); + this._itemType = itemType; } - if (options.credential && !options.credentialScopes) { - throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + read(stream, options = {}) { + const readItemMethod = (s, opts) => { + return this._itemType.read(s, opts); + }; + return AvroParser.readMap(stream, readItemMethod, options); } - return undefined; } -//# sourceMappingURL=serviceClient.js.map +class AvroRecordType extends AvroType { + _name; + _fields; + constructor(fields, name) { + super(); + this._fields = fields; + this._name = name; + } + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + async read(stream, options = {}) { + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + const record = {}; + record["$schema"] = this._name; + for (const key in this._fields) { + if (Object.prototype.hasOwnProperty.call(this._fields, key)) { + record[key] = await this._fields[key].read(stream, options); + } + } + return record; + } +} +//# sourceMappingURL=AvroParser.js.map /***/ }), -/***/ 35429: +/***/ 15192: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -105837,18 +105669,15 @@ function getCredentialScopes(options) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.state = void 0; -/** - * Holds the singleton operationRequestMap, to be shared across CJS and ESM imports. - */ -exports.state = { - operationRequestMap: new WeakMap(), -}; -//# sourceMappingURL=state-cjs.cjs.map +exports.AvroReadable = void 0; +class AvroReadable { +} +exports.AvroReadable = AvroReadable; +//# sourceMappingURL=AvroReadable.js.map /***/ }), -/***/ 98258: +/***/ 53027: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -105856,373 +105685,676 @@ exports.state = { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRequestUrl = getRequestUrl; -exports.appendQueryParams = appendQueryParams; -const operationHelpers_js_1 = __nccwpck_require__(62074); -const interfaceHelpers_js_1 = __nccwpck_require__(41459); -const CollectionFormatToDelimiterMap = { - CSV: ",", - SSV: " ", - Multi: "Multi", - TSV: "\t", - Pipes: "|", -}; -function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { - const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); - let isAbsolutePath = false; - let requestUrl = replaceAll(baseUri, urlReplacements); - if (operationSpec.path) { - let path = replaceAll(operationSpec.path, urlReplacements); - // QUIRK: sometimes we get a path component like /{nextLink} - // which may be a fully formed URL with a leading /. In that case, we should - // remove the leading / - if (operationSpec.path === "/{nextLink}" && path.startsWith("/")) { - path = path.substring(1); - } - // QUIRK: sometimes we get a path component like {nextLink} - // which may be a fully formed URL. In that case, we should - // ignore the baseUri. - if (isAbsoluteUrl(path)) { - requestUrl = path; - isAbsolutePath = true; - } - else { - requestUrl = appendPath(requestUrl, path); +exports.AvroReadableFromStream = void 0; +const AvroReadable_js_1 = __nccwpck_require__(15192); +const abort_controller_1 = __nccwpck_require__(1753); +const buffer_1 = __nccwpck_require__(14300); +const ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); +class AvroReadableFromStream extends AvroReadable_js_1.AvroReadable { + _position; + _readable; + toUint8Array(data) { + if (typeof data === "string") { + return buffer_1.Buffer.from(data); } + return data; } - const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); - /** - * Notice that this call sets the `noOverwrite` parameter to true if the `requestUrl` - * is an absolute path. This ensures that existing query parameter values in `requestUrl` - * do not get overwritten. On the other hand when `requestUrl` is not absolute path, it - * is still being built so there is nothing to overwrite. - */ - requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); - return requestUrl; -} -function replaceAll(input, replacements) { - let result = input; - for (const [searchValue, replaceValue] of replacements) { - result = result.split(searchValue).join(replaceValue); + constructor(readable) { + super(); + this._readable = readable; + this._position = 0; } - return result; -} -function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; - const result = new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { - for (const urlParameter of operationSpec.urlParameters) { - let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); - const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); - urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); - if (!urlParameter.skipEncoding) { - urlParameterValue = encodeURIComponent(urlParameterValue); - } - result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); + get position() { + return this._position; + } + async read(size, options = {}) { + if (options.abortSignal?.aborted) { + throw ABORT_ERROR; + } + if (size < 0) { + throw new Error(`size parameter should be positive: ${size}`); + } + if (size === 0) { + return new Uint8Array(); + } + if (!this._readable.readable) { + throw new Error("Stream no longer readable."); + } + // See if there is already enough data. + const chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + // chunk.length maybe less than desired size if the stream ends. + return this.toUint8Array(chunk); + } + else { + // register callback to wait for enough data to read + return new Promise((resolve, reject) => { + /* eslint-disable @typescript-eslint/no-use-before-define */ + const cleanUp = () => { + this._readable.removeListener("readable", readableCallback); + this._readable.removeListener("error", rejectCallback); + this._readable.removeListener("end", rejectCallback); + this._readable.removeListener("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.removeEventListener("abort", abortHandler); + } + }; + const readableCallback = () => { + const callbackChunk = this._readable.read(size); + if (callbackChunk) { + this._position += callbackChunk.length; + cleanUp(); + // callbackChunk.length maybe less than desired size if the stream ends. + resolve(this.toUint8Array(callbackChunk)); + } + }; + const rejectCallback = () => { + cleanUp(); + reject(); + }; + const abortHandler = () => { + cleanUp(); + reject(ABORT_ERROR); + }; + this._readable.on("readable", readableCallback); + this._readable.once("error", rejectCallback); + this._readable.once("end", rejectCallback); + this._readable.once("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.addEventListener("abort", abortHandler); + } + /* eslint-enable @typescript-eslint/no-use-before-define */ + }); } } - return result; -} -function isAbsoluteUrl(url) { - return url.includes("://"); } -function appendPath(url, pathToAppend) { - if (!pathToAppend) { - return url; +exports.AvroReadableFromStream = AvroReadableFromStream; +//# sourceMappingURL=AvroReadableFromStream.js.map + +/***/ }), + +/***/ 64331: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AvroReader = void 0; +// TODO: Do a review of non-interfaces +/* eslint-disable @azure/azure-sdk/ts-use-interface-parameters */ +const AvroConstants_js_1 = __nccwpck_require__(583); +const AvroParser_js_1 = __nccwpck_require__(58119); +const utils_common_js_1 = __nccwpck_require__(32617); +class AvroReader { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; + get blockOffset() { + return this._blockOffset; } - const parsedUrl = new URL(url); - let newPath = parsedUrl.pathname; - if (!newPath.endsWith("/")) { - newPath = `${newPath}/`; + _objectIndex; + get objectIndex() { + return this._objectIndex; } - if (pathToAppend.startsWith("/")) { - pathToAppend = pathToAppend.substring(1); + _initialized; + constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { + this._dataStream = dataStream; + this._headerStream = headerStream || dataStream; + this._initialized = false; + this._blockOffset = currentBlockOffset || 0; + this._objectIndex = indexWithinCurrentBlock || 0; + this._initialBlockOffset = currentBlockOffset || 0; } - const searchStart = pathToAppend.indexOf("?"); - if (searchStart !== -1) { - const path = pathToAppend.substring(0, searchStart); - const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path; - if (search) { - parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; + async initialize(options = {}) { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { + abortSignal: options.abortSignal, + }); + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { + throw new Error("Stream is not an Avro file."); + } + // File metadata is written as if defined by the following map schema: + // { "type": "map", "values": "bytes"} + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { + abortSignal: options.abortSignal, + }); + // Validate codec + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; + if (!(codec === undefined || codec === null || codec === "null")) { + throw new Error("Codecs are not supported"); + } + // The 16-byte, randomly-generated sync marker for this file. + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal, + }); + // Parse the schema + const schema = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema); + if (this._blockOffset === 0) { + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + } + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal, + }); + // skip block length + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + this._initialized = true; + if (this._objectIndex && this._objectIndex > 0) { + for (let i = 0; i < this._objectIndex; i++) { + await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); + this._itemsRemainingInBlock--; + } } } - else { - newPath = newPath + pathToAppend; + hasNext() { + return !this._initialized || this._itemsRemainingInBlock > 0; } - parsedUrl.pathname = newPath; - return parsedUrl.toString(); -} -function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; - const result = new Map(); - const sequenceParams = new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { - for (const queryParameter of operationSpec.queryParameters) { - if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { - sequenceParams.add(queryParameter.mapper.serializedName); - } - let queryParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); - if ((queryParameterValue !== undefined && queryParameterValue !== null) || - queryParameter.mapper.required) { - queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter)); - const delimiter = queryParameter.collectionFormat - ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] - : ""; - if (Array.isArray(queryParameterValue)) { - // replace null and undefined - queryParameterValue = queryParameterValue.map((item) => { - if (item === null || item === undefined) { - return ""; - } - return item; - }); - } - if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) { - continue; + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); + } + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal, + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal, + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); } - else if (Array.isArray(queryParameterValue) && - (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) { - queryParameterValue = queryParameterValue.join(delimiter); + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal, + }); } - if (!queryParameter.skipEncoding) { - if (Array.isArray(queryParameterValue)) { - queryParameterValue = queryParameterValue.map((item) => { - return encodeURIComponent(item); - }); - } - else { - queryParameterValue = encodeURIComponent(queryParameterValue); - } + catch { + // We hit the end of the stream. + this._itemsRemainingInBlock = 0; } - // Join pipes and CSV *after* encoding, or the server will be upset. - if (Array.isArray(queryParameterValue) && - (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) { - queryParameterValue = queryParameterValue.join(delimiter); + if (this._itemsRemainingInBlock > 0) { + // Ignore block size + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter), queryParameterValue); } + yield result; } } - return { - queryParams: result, - sequenceParams, - }; } -function simpleParseQueryParams(queryString) { - const result = new Map(); - if (!queryString || queryString[0] !== "?") { - return result; - } - // remove the leading ? - queryString = queryString.slice(1); - const pairs = queryString.split("&"); - for (const pair of pairs) { - const [name, value] = pair.split("=", 2); - const existingValue = result.get(name); - if (existingValue) { - if (Array.isArray(existingValue)) { - existingValue.push(value); - } - else { - result.set(name, [existingValue, value]); - } - } - else { - result.set(name, value); - } +exports.AvroReader = AvroReader; +//# sourceMappingURL=AvroReader.js.map + +/***/ }), + +/***/ 94382: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AvroReadableFromStream = exports.AvroReadable = exports.AvroReader = void 0; +var AvroReader_js_1 = __nccwpck_require__(64331); +Object.defineProperty(exports, "AvroReader", ({ enumerable: true, get: function () { return AvroReader_js_1.AvroReader; } })); +var AvroReadable_js_1 = __nccwpck_require__(15192); +Object.defineProperty(exports, "AvroReadable", ({ enumerable: true, get: function () { return AvroReadable_js_1.AvroReadable; } })); +var AvroReadableFromStream_js_1 = __nccwpck_require__(53027); +Object.defineProperty(exports, "AvroReadableFromStream", ({ enumerable: true, get: function () { return AvroReadableFromStream_js_1.AvroReadableFromStream; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 32617: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.arraysEqual = arraysEqual; +function arraysEqual(a, b) { + if (a === b) + return true; + if (a == null || b == null) + return false; + if (a.length !== b.length) + return false; + for (let i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) + return false; } - return result; + return true; } -/** @internal */ -function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { - if (queryParams.size === 0) { - return url; - } - const parsedUrl = new URL(url); - // QUIRK: parsedUrl.searchParams will have their name/value pairs decoded, which - // can change their meaning to the server, such as in the case of a SAS signature. - // To avoid accidentally un-encoding a query param, we parse the key/values ourselves - const combinedParams = simpleParseQueryParams(parsedUrl.search); - for (const [name, value] of queryParams) { - const existingValue = combinedParams.get(name); - if (Array.isArray(existingValue)) { - if (Array.isArray(value)) { - existingValue.push(...value); - const valueSet = new Set(existingValue); - combinedParams.set(name, Array.from(valueSet)); - } - else { - existingValue.push(value); - } - } - else if (existingValue) { - if (Array.isArray(value)) { - value.unshift(existingValue); - } - else if (sequenceParams.has(name)) { - combinedParams.set(name, [existingValue, value]); - } - if (!noOverwrite) { - combinedParams.set(name, value); - } - } - else { - combinedParams.set(name, value); - } +//# sourceMappingURL=utils.common.js.map + +/***/ }), + +/***/ 53282: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); +/** + * The `@azure/logger` configuration for this package. + */ +exports.logger = (0, logger_1.createClientLogger)("storage-blob"); +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 64526: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTier = void 0; +exports.toAccessTier = toAccessTier; +exports.ensureCpkIfSpecified = ensureCpkIfSpecified; +exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; +const constants_js_1 = __nccwpck_require__(81865); +/** + * Represents the access tier on a blob. + * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} + */ +var BlockBlobTier; +(function (BlockBlobTier) { + /** + * Optimized for storing data that is accessed frequently. + */ + BlockBlobTier["Hot"] = "Hot"; + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + BlockBlobTier["Cool"] = "Cool"; + /** + * Optimized for storing data that is rarely accessed. + */ + BlockBlobTier["Cold"] = "Cold"; + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + BlockBlobTier["Archive"] = "Archive"; +})(BlockBlobTier || (exports.BlockBlobTier = BlockBlobTier = {})); +/** + * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. + * Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} + * for detailed information on the corresponding IOPS and throughput per PageBlobTier. + */ +var PremiumPageBlobTier; +(function (PremiumPageBlobTier) { + /** + * P4 Tier. + */ + PremiumPageBlobTier["P4"] = "P4"; + /** + * P6 Tier. + */ + PremiumPageBlobTier["P6"] = "P6"; + /** + * P10 Tier. + */ + PremiumPageBlobTier["P10"] = "P10"; + /** + * P15 Tier. + */ + PremiumPageBlobTier["P15"] = "P15"; + /** + * P20 Tier. + */ + PremiumPageBlobTier["P20"] = "P20"; + /** + * P30 Tier. + */ + PremiumPageBlobTier["P30"] = "P30"; + /** + * P40 Tier. + */ + PremiumPageBlobTier["P40"] = "P40"; + /** + * P50 Tier. + */ + PremiumPageBlobTier["P50"] = "P50"; + /** + * P60 Tier. + */ + PremiumPageBlobTier["P60"] = "P60"; + /** + * P70 Tier. + */ + PremiumPageBlobTier["P70"] = "P70"; + /** + * P80 Tier. + */ + PremiumPageBlobTier["P80"] = "P80"; +})(PremiumPageBlobTier || (exports.PremiumPageBlobTier = PremiumPageBlobTier = {})); +function toAccessTier(tier) { + if (tier === undefined) { + return undefined; } - const searchPieces = []; - for (const [name, value] of combinedParams) { - if (typeof value === "string") { - searchPieces.push(`${name}=${value}`); - } - else if (Array.isArray(value)) { - // QUIRK: If we get an array of values, include multiple key/value pairs - for (const subValue of value) { - searchPieces.push(`${name}=${subValue}`); - } - } - else { - searchPieces.push(`${name}=${value}`); - } + return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service). +} +function ensureCpkIfSpecified(cpk, isHttps) { + if (cpk && !isHttps) { + throw new RangeError("Customer-provided encryption key must be used over HTTPS."); + } + if (cpk && !cpk.encryptionAlgorithm) { + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } - // QUIRK: we have to set search manually as searchParams will encode comma when it shouldn't. - parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; - return parsedUrl.toString(); } -//# sourceMappingURL=urlHelpers.js.map +/** + * Defines the known cloud audiences for Storage. + */ +var StorageBlobAudience; +(function (StorageBlobAudience) { + /** + * The OAuth scope to use to retrieve an AAD token for Azure Storage. + */ + StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + /** + * The OAuth scope to use to retrieve an AAD token for Azure Disk. + */ + StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; +})(StorageBlobAudience || (exports.StorageBlobAudience = StorageBlobAudience = {})); +/** + * + * To get OAuth audience for a storage account for blob service. + */ +function getBlobServiceAccountAudience(storageAccountName) { + return `https://${storageAccountName}.blob.core.windows.net/.default`; +} +//# sourceMappingURL=models.js.map /***/ }), -/***/ 25363: -/***/ ((__unused_webpack_module, exports) => { +/***/ 51870: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPrimitiveBody = isPrimitiveBody; -exports.isDuration = isDuration; -exports.isValidUuid = isValidUuid; -exports.flattenResponse = flattenResponse; +exports.AnonymousCredentialPolicy = void 0; +const CredentialPolicy_js_1 = __nccwpck_require__(15513); /** - * A type guard for a primitive response body. - * @param value - Value to test - * - * @internal + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). */ -function isPrimitiveBody(value, mapperTypeName) { - return (mapperTypeName !== "Composite" && - mapperTypeName !== "Dictionary" && - (typeof value === "string" || - typeof value === "number" || - typeof value === "boolean" || - (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== - null || - value === undefined || - value === null)); +class AnonymousCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } } -const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; +//# sourceMappingURL=AnonymousCredentialPolicy.js.map + +/***/ }), + +/***/ 15513: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CredentialPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(33847); /** - * Returns true if the given string is in ISO 8601 format. - * @param value - The value to be validated for ISO 8601 duration format. - * @internal + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. */ -function isDuration(value) { - return validateISODuration.test(value); +class CredentialPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + // Child classes must override this method with request signing. This method + // will be executed in sendRequest(). + return request; + } } -const validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; +exports.CredentialPolicy = CredentialPolicy; +//# sourceMappingURL=CredentialPolicy.js.map + +/***/ }), + +/***/ 33847: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BaseRequestPolicy = void 0; /** - * Returns true if the provided uuid is valid. - * - * @param uuid - The uuid that needs to be validated. - * - * @internal + * The base class from which all request policies derive. */ -function isValidUuid(uuid) { - return validUuidRegex.test(uuid); +class BaseRequestPolicy { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor( + /** + * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline. + */ + _nextPolicy, + /** + * The options that can be passed to a given request policy. + */ + _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } } +exports.BaseRequestPolicy = BaseRequestPolicy; +//# sourceMappingURL=RequestPolicy.js.map + +/***/ }), + +/***/ 6602: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageBrowserPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(33847); +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * Maps the response as follows: - * - wraps the response body if needed (typically if its type is primitive). - * - returns null if the combination of the headers and the body is empty. - * - otherwise, returns the combination of the headers and the body. + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: * - * @param responseObject - a representation of the parsed response - * @returns the response that will be returned to the user which can be null and/or wrapped + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. * - * @internal + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning */ -function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); - if (responseObject.hasNullableType && - Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { - return responseObject.shouldWrapBody ? { body: null } : null; +class StorageBrowserPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); } - else { - return responseObject.shouldWrapBody - ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); + } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); + } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); } } +exports.StorageBrowserPolicy = StorageBrowserPolicy; +//# sourceMappingURL=StorageBrowserPolicy.js.map + +/***/ }), + +/***/ 29090: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.storageBrowserPolicyName = void 0; +exports.storageBrowserPolicy = storageBrowserPolicy; +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * Take a `FullOperationResponse` and turn it into a flat - * response object to hand back to the consumer. - * @param fullResponse - The processed response from the operation request - * @param responseSpec - The response map from the OperationSpec - * - * @internal + * The programmatic identifier of the StorageBrowserPolicy. */ -function flattenResponse(fullResponse, responseSpec) { - var _a, _b; - const parsedHeaders = fullResponse.parsedHeaders; - // head methods never have a body, but we return a boolean set to body property - // to indicate presence/absence of the resource - if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); - } - const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; - /** If the body is asked for, we look at the expected body type to handle it */ - if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); - } - const modelProperties = (expectedBodyTypeName === "Composite" && - bodyMapper.type.modelProperties) || - {}; - const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); - if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; - for (const key of Object.keys(modelProperties)) { - if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; +exports.storageBrowserPolicyName = "storageBrowserPolicy"; +/** + * storageBrowserPolicy is a policy used to prevent browsers from caching requests + * and to remove cookies and explicit content-length headers. + */ +function storageBrowserPolicy() { + return { + name: exports.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); } - } - if (parsedHeaders) { - for (const key of Object.keys(parsedHeaders)) { - arrayResponse[key] = parsedHeaders[key]; + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + }, + }; +} +//# sourceMappingURL=StorageBrowserPolicyV2.js.map + +/***/ }), + +/***/ 73623: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.storageCorrectContentLengthPolicyName = void 0; +exports.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; +const constants_js_1 = __nccwpck_require__(81865); +/** + * The programmatic identifier of the storageCorrectContentLengthPolicy. + */ +exports.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; +/** + * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. + */ +function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } - return isNullable && - !fullResponse.parsedBody && - !parsedHeaders && - Object.getOwnPropertyNames(modelProperties).length === 0 - ? null - : arrayResponse; } - return handleNullableResponseAndWrappableBody({ - body: fullResponse.parsedBody, - headers: parsedHeaders, - hasNullableType: isNullable, - shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName), - }); + return { + name: exports.storageCorrectContentLengthPolicyName, + async sendRequest(request, next) { + correctContentLength(request); + return next(request); + }, + }; } -//# sourceMappingURL=utils.js.map +//# sourceMappingURL=StorageCorrectContentLengthPolicy.js.map /***/ }), -/***/ 35064: +/***/ 34419: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -106230,119 +106362,230 @@ function flattenResponse(fullResponse, responseSpec) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExtendedServiceClient = void 0; -const disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const core_client_1 = __nccwpck_require__(7611); -const response_js_1 = __nccwpck_require__(49283); +exports.StorageRetryPolicy = void 0; +exports.NewRetryPolicyFactory = NewRetryPolicyFactory; +const abort_controller_1 = __nccwpck_require__(1753); +const RequestPolicy_js_1 = __nccwpck_require__(33847); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const log_js_1 = __nccwpck_require__(53282); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(51772); /** - * Client to provide compatability between core V1 & V2. + * A factory method used to generated a RetryPolicy factory. + * + * @param retryOptions - */ -class ExtendedServiceClient extends core_client_1.ServiceClient { - constructor(options) { - var _a, _b; - super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && - !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { - this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); +function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + }, + }; +} +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy +}; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); +/** + * Retry policy with exponential retry and linear retry implemented. + */ +class StorageRetryPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + // Initialize retry options + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType + ? retryOptions.retryPolicyType + : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 + ? Math.floor(retryOptions.maxTries) + : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 + ? retryOptions.tryTimeoutInMs + : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 + ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) + : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost + ? retryOptions.secondaryHost + : DEFAULT_RETRY_OPTIONS.secondaryHost, + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || + !this.retryOptions.secondaryHost || + !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || + attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { - this.pipeline.removePolicy({ - name: core_rest_pipeline_1.redirectPolicyName, - }); + // Set the server-side timeout query parameter "timeout=[seconds]" + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); + } + catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); } /** - * Compatible send operation request function. + * Decide whether to retry according to last HTTP response and retry counters. * - * @param operationArguments - Operation arguments - * @param operationSpec - Operation Spec - * @returns + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - */ - async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; - let lastResponse; - function onResponse(rawResponse, flatResponse, error) { - lastResponse = rawResponse; - if (userProvidedCallBack) { - userProvidedCallBack(rawResponse, flatResponse, error); + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions + .maxTries}, no further try.`); + return false; + } + // Handle network failures, you may need to customize the list when you implement + // your own http client + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || + err.message.toUpperCase().includes(retriableError) || + (err.code && err.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; } } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); - const result = await super.sendOperationRequest(operationArguments, operationSpec); - if (lastResponse) { - Object.defineProperty(result, "_response", { - value: (0, response_js_1.toCompatResponse)(lastResponse), - }); + else { + delayTimeInMs = Math.random() * 1000; } - return result; + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } } -exports.ExtendedServiceClient = ExtendedServiceClient; -//# sourceMappingURL=extendedClient.js.map - -/***/ }), - -/***/ 23256: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertHttpClient = convertHttpClient; -const response_js_1 = __nccwpck_require__(49283); -const util_js_1 = __nccwpck_require__(43732); -/** - * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. - * @param requestPolicyClient - A HttpClient compatible with core-http - * @returns A HttpClient compatible with core-rest-pipeline - */ -function convertHttpClient(requestPolicyClient) { - return { - sendRequest: async (request) => { - const response = await requestPolicyClient.sendRequest((0, util_js_1.toWebResourceLike)(request, { createProxy: true })); - return (0, response_js_1.toPipelineResponse)(response); - }, - }; -} -//# sourceMappingURL=httpClientAdapter.js.map - -/***/ }), - -/***/ 25083: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlivePolicyName = exports.HttpPipelineLogLevel = exports.createRequestPolicyFactoryPolicy = exports.requestPolicyFactoryPolicyName = exports.ExtendedServiceClient = void 0; -/** - * A Shim Library that provides compatibility between Core V1 & V2 Packages. - * - * @packageDocumentation - */ -var extendedClient_js_1 = __nccwpck_require__(35064); -Object.defineProperty(exports, "ExtendedServiceClient", ({ enumerable: true, get: function () { return extendedClient_js_1.ExtendedServiceClient; } })); -var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(98241); -Object.defineProperty(exports, "requestPolicyFactoryPolicyName", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; } })); -Object.defineProperty(exports, "createRequestPolicyFactoryPolicy", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; } })); -Object.defineProperty(exports, "HttpPipelineLogLevel", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; } })); -var disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); -Object.defineProperty(exports, "disableKeepAlivePolicyName", ({ enumerable: true, get: function () { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } })); -var httpClientAdapter_js_1 = __nccwpck_require__(23256); -Object.defineProperty(exports, "convertHttpClient", ({ enumerable: true, get: function () { return httpClientAdapter_js_1.convertHttpClient; } })); -var util_js_1 = __nccwpck_require__(43732); -Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: function () { return util_js_1.toHttpHeadersLike; } })); -//# sourceMappingURL=index.js.map +exports.StorageRetryPolicy = StorageRetryPolicy; +//# sourceMappingURL=StorageRetryPolicy.js.map /***/ }), -/***/ 75840: +/***/ 51772: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -106350,30 +106593,26 @@ Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: fu // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.disableKeepAlivePolicyName = void 0; -exports.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; -exports.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; -exports.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; -function createDisableKeepAlivePolicy() { - return { - name: exports.disableKeepAlivePolicyName, - async sendRequest(request, next) { - request.disableKeepAlive = true; - return next(request); - }, - }; -} +exports.StorageRetryPolicyType = void 0; /** - * @internal + * RetryPolicy types. */ -function pipelineContainsDisableKeepAlivePolicy(pipeline) { - return pipeline.getOrderedPolicies().some((policy) => policy.name === exports.disableKeepAlivePolicyName); -} -//# sourceMappingURL=disableKeepAlivePolicy.js.map +var StorageRetryPolicyType; +(function (StorageRetryPolicyType) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; +})(StorageRetryPolicyType || (exports.StorageRetryPolicyType = StorageRetryPolicyType = {})); +//# sourceMappingURL=StorageRetryPolicyType.js.map /***/ }), -/***/ 98241: +/***/ 68031: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -106381,132 +106620,174 @@ function pipelineContainsDisableKeepAlivePolicy(pipeline) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.requestPolicyFactoryPolicyName = exports.HttpPipelineLogLevel = void 0; -exports.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; -const util_js_1 = __nccwpck_require__(43732); -const response_js_1 = __nccwpck_require__(49283); +exports.storageRetryPolicyName = void 0; +exports.storageRetryPolicy = storageRetryPolicy; +const abort_controller_1 = __nccwpck_require__(1753); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(98637); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const log_js_1 = __nccwpck_require__(53282); /** - * An enum for compatibility with RequestPolicy + * Name of the {@link storageRetryPolicy} */ -var HttpPipelineLogLevel; -(function (HttpPipelineLogLevel) { - HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; - HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; - HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; - HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; -})(HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); -const mockRequestPolicyOptions = { - log(_logLevel, _message) { - /* do nothing */ - }, - shouldLog(_logLevel) { - return false; - }, +exports.storageRetryPolicyName = "storageRetryPolicy"; +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy }; +const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", +]; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); /** - * The name of the RequestPolicyFactoryPolicy - */ -exports.requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; -/** - * A policy that wraps policies written for core-http. - * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline + * Retry policy with exponential retry and linear retry implemented. */ -function createRequestPolicyFactoryPolicy(factories) { - const orderedFactories = factories.slice().reverse(); +function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error, }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error) { + for (const retriableError of retriableErrors) { + if (error.name.toUpperCase().includes(retriableError) || + error.message.toUpperCase().includes(retriableError) || + (error.code && error.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error?.code === "PARSE_ERROR" && + error?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || error) { + const statusCode = response?.status ?? error?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } + else { + delayTimeInMs = Math.random() * 1000; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } return { - name: exports.requestPolicyFactoryPolicyName, + name: exports.storageRetryPolicyName, async sendRequest(request, next) { - let httpPipeline = { - async sendRequest(httpRequest) { - const response = await next((0, util_js_1.toPipelineRequest)(httpRequest)); - return (0, response_js_1.toCompatResponse)(response, { createProxy: true }); - }, - }; - for (const factory of orderedFactories) { - httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); + // Set the server-side timeout query parameter "timeout=[seconds]" + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000))); } - const webResourceLike = (0, util_js_1.toWebResourceLike)(request, { createProxy: true }); - const response = await httpPipeline.sendRequest(webResourceLike); - return (0, response_js_1.toPipelineResponse)(response); - }, - }; -} -//# sourceMappingURL=requestPolicyFactoryPolicy.js.map - -/***/ }), - -/***/ 49283: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCompatResponse = toCompatResponse; -exports.toPipelineResponse = toPipelineResponse; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const util_js_1 = __nccwpck_require__(43732); -const originalResponse = Symbol("Original FullOperationResponse"); -/** - * A helper to convert response objects from the new pipeline back to the old one. - * @param response - A response object from core-client. - * @returns A response compatible with `HttpOperationResponse` from core-http. - */ -function toCompatResponse(response, options) { - let request = (0, util_js_1.toWebResourceLike)(response.request); - let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { - return new Proxy(response, { - get(target, prop, receiver) { - if (prop === "headers") { - return headers; - } - else if (prop === "request") { - return request; - } - else if (prop === originalResponse) { - return response; + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : undefined; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || + !secondaryUrl || + !["GET", "HEAD", "OPTIONS"].includes(request.method) || + attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = undefined; + error = undefined; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); } - return Reflect.get(target, prop, receiver); - }, - set(target, prop, value, receiver) { - if (prop === "headers") { - headers = value; + catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error = e; + } + else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } } - else if (prop === "request") { - request = value; + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); } - return Reflect.set(target, prop, value, receiver); - }, - }); - } - else { - return Object.assign(Object.assign({}, response), { request, - headers }); - } -} -/** - * A helper to convert back to a PipelineResponse - * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http. - */ -function toPipelineResponse(compatResponse) { - const extendedCompatResponse = compatResponse; - const response = extendedCompatResponse[originalResponse]; - const headers = (0, core_rest_pipeline_1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); - if (response) { - response.headers = headers; - return response; - } - else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); - } + attempt++; + } + if (response) { + return response; + } + throw error ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + }, + }; } -//# sourceMappingURL=response.js.map +//# sourceMappingURL=StorageRetryPolicyV2.js.map /***/ }), -/***/ 43732: +/***/ 66776: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -106514,1632 +106795,2433 @@ function toPipelineResponse(compatResponse) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpHeaders = void 0; -exports.toPipelineRequest = toPipelineRequest; -exports.toWebResourceLike = toWebResourceLike; -exports.toHttpHeadersLike = toHttpHeadersLike; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -// We use a custom symbol to cache a reference to the original request without -// exposing it on the public interface. -const originalRequestSymbol = Symbol("Original PipelineRequest"); -// Symbol.for() will return the same symbol if it's already been created -// This particular one is used in core-client to handle the case of when a request is -// cloned but we need to retrieve the OperationSpec and OperationArguments from the -// original request. -const originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); -function toPipelineRequest(webResource, options = {}) { - const compatWebResource = webResource; - const request = compatWebResource[originalRequestSymbol]; - const headers = (0, core_rest_pipeline_1.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); - if (request) { - request.headers = headers; - return request; - } - else { - const newRequest = (0, core_rest_pipeline_1.createPipelineRequest)({ - url: webResource.url, - method: webResource.method, - headers, - withCredentials: webResource.withCredentials, - timeout: webResource.timeout, - requestId: webResource.requestId, - abortSignal: webResource.abortSignal, - body: webResource.body, - formData: webResource.formData, - disableKeepAlive: !!webResource.keepAlive, - onDownloadProgress: webResource.onDownloadProgress, - onUploadProgress: webResource.onUploadProgress, - proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes, - agent: webResource.agent, - }); - if (options.originalRequest) { - newRequest[originalClientRequestSymbol] = - options.originalRequest; - } - return newRequest; - } -} -function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; - const webResource = { - url: request.url, - method: request.method, - headers: toHttpHeadersLike(request.headers), - withCredentials: request.withCredentials, - timeout: request.timeout, - requestId: request.headers.get("x-ms-client-request-id") || request.requestId, - abortSignal: request.abortSignal, - body: request.body, - formData: request.formData, - keepAlive: !!request.disableKeepAlive, - onDownloadProgress: request.onDownloadProgress, - onUploadProgress: request.onUploadProgress, - proxySettings: request.proxySettings, - streamResponseStatusCodes: request.streamResponseStatusCodes, - agent: request.agent, - clone() { - throw new Error("Cannot clone a non-proxied WebResourceLike"); - }, - prepare() { - throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); - }, - validateRequestProperties() { - /** do nothing */ - }, - }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { - return new Proxy(webResource, { - get(target, prop, receiver) { - if (prop === originalRequestSymbol) { - return request; - } - else if (prop === "clone") { - return () => { - return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { - createProxy: true, - originalRequest, - }); - }; - } - return Reflect.get(target, prop, receiver); - }, - set(target, prop, value, receiver) { - if (prop === "keepAlive") { - request.disableKeepAlive = !value; - } - const passThroughProps = [ - "url", - "method", - "withCredentials", - "timeout", - "requestId", - "abortSignal", - "body", - "formData", - "onDownloadProgress", - "onUploadProgress", - "proxySettings", - "streamResponseStatusCodes", - "agent", - ]; - if (typeof prop === "string" && passThroughProps.includes(prop)) { - request[prop] = value; - } - return Reflect.set(target, prop, value, receiver); - }, - }); - } - else { - return webResource; - } -} -/** - * Converts HttpHeaders from core-rest-pipeline to look like - * HttpHeaders from core-http. - * @param headers - HttpHeaders from core-rest-pipeline - * @returns HttpHeaders as they looked in core-http - */ -function toHttpHeadersLike(headers) { - return new HttpHeaders(headers.toJSON({ preserveCase: true })); -} -/** - * A collection of HttpHeaders that can be sent with a HTTP request. - */ -function getHeaderKey(headerName) { - return headerName.toLowerCase(); -} +exports.StorageSharedKeyCredentialPolicy = void 0; +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const CredentialPolicy_js_1 = __nccwpck_require__(15513); +const SharedKeyComparator_js_1 = __nccwpck_require__(35867); /** - * A collection of HTTP header key/value pairs. + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. */ -class HttpHeaders { - constructor(rawHeaders) { - this._headersMap = {}; - if (rawHeaders) { - for (const headerName in rawHeaders) { - this.set(headerName, rawHeaders[headerName]); - } - } - } - /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param headerName - The name of the header to set. This value is case-insensitive. - * @param headerValue - The value of the header to set. - */ - set(headerName, headerValue) { - this._headersMap[getHeaderKey(headerName)] = { - name: headerName, - value: headerValue.toString(), - }; - } - /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param headerName - The name of the header. - */ - get(headerName) { - const header = this._headersMap[getHeaderKey(headerName)]; - return !header ? undefined : header.value; - } - /** - * Get whether or not this header collection contains a header entry for the provided header name. - */ - contains(headerName) { - return !!this._headersMap[getHeaderKey(headerName)]; - } - /** - * Remove the header with the provided headerName. Return whether or not the header existed and - * was removed. - * @param headerName - The name of the header to remove. - */ - remove(headerName) { - const result = this.contains(headerName); - delete this._headersMap[getHeaderKey(headerName)]; - return result; - } - /** - * Get the headers that are contained this collection as an object. - */ - rawHeaders() { - return this.toJson({ preserveCase: true }); - } +class StorageSharedKeyCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { /** - * Get the headers that are contained in this collection as an array. - */ - headersArray() { - const headers = []; - for (const headerKey in this._headersMap) { - headers.push(this._headersMap[headerKey]); - } - return headers; - } + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; /** - * Get the header names that are contained in this collection. + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - */ - headerNames() { - const headerNames = []; - const headers = this.headersArray(); - for (let i = 0; i < headers.length; ++i) { - headerNames.push(headers[i].name); - } - return headerNames; + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; } /** - * Get the header values that are contained in this collection. + * Signs request. + * + * @param request - */ - headerValues() { - const headerValues = []; - const headers = this.headersArray(); - for (let i = 0; i < headers.length; ++i) { - headerValues.push(headers[i].value); + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || request.body !== undefined) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } - return headerValues; + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + this.getCanonicalizedHeadersString(request) + + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + return request; } /** - * Get the JSON object representation of this HTTP header collection. + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - */ - toJson(options = {}) { - const result = {}; - if (options.preserveCase) { - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - result[header.name] = header.value; - } + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; } - else { - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - result[getHeaderKey(header.name)] = header.value; - } + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; } - return result; + return value; } /** - * Get the string representation of this HTTP header collection. + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - */ - toString() { - return JSON.stringify(this.toJson({ preserveCase: true })); + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; } /** - * Create a deep clone/copy of this HttpHeaders collection. + * Retrieves the webResource canonicalized resource string. + * + * @param request - */ - clone() { - const resultPreservingCasing = {}; - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - resultPreservingCasing[header.name] = header.value; + getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } } - return new HttpHeaders(resultPreservingCasing); + return canonicalizedResourceString; } } -exports.HttpHeaders = HttpHeaders; -//# sourceMappingURL=util.js.map +exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; +//# sourceMappingURL=StorageSharedKeyCredentialPolicy.js.map /***/ }), -/***/ 57759: +/***/ 93846: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pollHttpOperation = exports.isOperationError = exports.getResourceLocation = exports.getOperationStatus = exports.getOperationLocation = exports.initHttpOperation = exports.getStatusFromInitialResponse = exports.getErrorFromResponse = exports.parseRetryAfter = exports.inferLroMode = void 0; -const operation_js_1 = __nccwpck_require__(70281); -const logger_js_1 = __nccwpck_require__(28121); -function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; -} -function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; -} -function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; -} -function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; -} -function findResourceLocation(inputs) { - var _a; - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return undefined; +exports.storageSharedKeyCredentialPolicyName = void 0; +exports.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; +const node_crypto_1 = __nccwpck_require__(6005); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const SharedKeyComparator_js_1 = __nccwpck_require__(35867); +/** + * The programmatic identifier of the storageSharedKeyCredentialPolicy. + */ +exports.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; +/** + * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. + */ +function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } - case "PATCH": { - return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + getCanonicalizedHeadersString(request) + + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey) + .update(stringToSign, "utf8") + .digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + */ + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; } - default: { - return getDefault(); + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; } + return value; } - function getDefault() { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return undefined; + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + */ + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); } - case "original-uri": { - return requestPath; + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; } - case "location": - default: { - return location; + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } + return canonicalizedResourceString; } + return { + name: exports.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + }, + }; } -function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== undefined) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig, - }), - }; - } - else if (location !== undefined) { - return { - mode: "ResourceLocation", - operationLocation: location, - }; - } - else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath, - }; - } - else { - return undefined; - } -} -exports.inferLroMode = inferLroMode; -function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== undefined) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case undefined: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; +//# sourceMappingURL=StorageSharedKeyCredentialPolicyV2.js.map + +/***/ }), + +/***/ 9846: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobBeginCopyFromUrlPoller = void 0; +const core_util_1 = __nccwpck_require__(80637); +const core_lro_1 = __nccwpck_require__(90334); +/** + * This is the poller returned by {@link BlobClient.beginCopyFromURL}. + * This can not be instantiated directly outside of this package. + * + * @hidden + */ +class BlobBeginCopyFromUrlPoller extends core_lro_1.Poller { + intervalInMs; + constructor(options) { + const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options; + let state; + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; } + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, + blobClient, + copySource, + startCopyFromURLOptions, + }); + super(operation); + if (typeof onProgress === "function") { + this.onProgress(onProgress); + } + this.intervalInMs = intervalInMs; } -} -function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); -} -function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); -} -function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } - else if (statusCode < 300) { - return "succeeded"; - } - else { - return "failed"; - } -} -function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== undefined) { - // Retry-After header value is either in HTTP date format, or in seconds - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) - ? calculatePollingIntervalFromDate(new Date(retryAfter)) - : retryAfterInSeconds * 1000; - } - return undefined; -} -exports.parseRetryAfter = parseRetryAfter; -function getErrorFromResponse(response) { - const error = accessBodyProperty(response, "error"); - if (!error) { - logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error.code || !error.message) { - logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; + delay() { + return (0, core_util_1.delay)(this.intervalInMs); } - return error; } -exports.getErrorFromResponse = getErrorFromResponse; -function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor(new Date().getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; +exports.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ +const cancel = async function cancel(options = {}) { + const state = this.state; + const { copyId } = state; + if (state.isCompleted) { + return makeBlobBeginCopyFromURLPollOperation(state); } - return undefined; -} -function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case undefined: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } + if (!copyId) { + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); } - const status = helper(); - return status === "running" && operationLocation === undefined ? "succeeded" : status; -} -exports.getStatusFromInitialResponse = getStatusFromInitialResponse; + // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call + await state.blobClient.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal, + }); + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); +}; /** - * Initiates the long-running operation. + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden */ -async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return (0, operation_js_1.initOperation)({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig, - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); - }, - stateProxy, - processResult: processResult - ? ({ flatResponse }, state) => processResult(flatResponse, state) - : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult, - }); -} -exports.initHttpOperation = initHttpOperation; -function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse), - }); +const update = async function update(options = {}) { + const state = this.state; + const { blobClient, copySource, startCopyFromURLOptions } = state; + if (!state.isStarted) { + state.isStarted = true; + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); + // copyId is needed to abort + state.copyId = result.copyId; + if (result.copyStatus === "success") { + state.result = result; + state.isCompleted = true; } - case "ResourceLocation": { - return getLocationHeader(rawResponse); + } + else if (!state.isCompleted) { + try { + const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal }); + const { copyStatus, copyProgress } = result; + const prevCopyProgress = state.copyProgress; + if (copyProgress) { + state.copyProgress = copyProgress; + } + if (copyStatus === "pending" && + copyProgress !== prevCopyProgress && + typeof options.fireProgress === "function") { + // trigger in setTimeout, or swallow error? + options.fireProgress(state); + } + else if (copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + else if (copyStatus === "failed") { + state.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); + state.isCompleted = true; + } } - case "Body": - default: { - return undefined; + catch (err) { + state.error = err; + state.isCompleted = true; } } -} -exports.getOperationLocation = getOperationLocation; -function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); - } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); - } - case "Body": { - return getProvisioningState(rawResponse); + return makeBlobBeginCopyFromURLPollOperation(state); +}; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ +const toString = function toString() { + return JSON.stringify({ state: this.state }, (key, value) => { + // remove blobClient from serialized state since a client can't be hydrated from this info. + if (key === "blobClient") { + return undefined; } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } -} -exports.getOperationStatus = getOperationStatus; -function accessBodyProperty({ flatResponse, rawResponse }, prop) { - var _a, _b; - return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; -} -function getResourceLocation(res, state) { - const loc = accessBodyProperty(res, "resourceLocation"); - if (loc && typeof loc === "string") { - state.config.resourceLocation = loc; - } - return state.config.resourceLocation; -} -exports.getResourceLocation = getResourceLocation; -function isOperationError(e) { - return e.name === "RestError"; -} -exports.isOperationError = isOperationError; -/** Polls the long-running operation. */ -async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs; - return (0, operation_js_1.pollOperation)({ - state, - stateProxy, - setDelay, - processResult: processResult - ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) - : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult, + return value; }); +}; +/** + * Creates a poll operation given the provided state. + * @hidden + */ +function makeBlobBeginCopyFromURLPollOperation(state) { + return { + state: { ...state }, + cancel, + toString, + update, + }; } -exports.pollHttpOperation = pollHttpOperation; -//# sourceMappingURL=operation.js.map +//# sourceMappingURL=BlobStartCopyFromUrlPoller.js.map /***/ }), -/***/ 78412: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 70793: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpPoller = void 0; -const operation_js_1 = __nccwpck_require__(57759); -const poller_js_1 = __nccwpck_require__(76713); +exports.AccountSASPermissions = void 0; /** - * Creates a poller that can be used to poll a long-running operation. - * @param lro - Description of the long-running operation - * @param options - options to configure the poller - * @returns an initialized poller + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. */ -async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {}; - return (0, poller_js_1.buildCreatePoller)({ - getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, - getStatusFromPollResponse: operation_js_1.getOperationStatus, - isOperationError: operation_js_1.isOperationError, - getOperationLocation: operation_js_1.getOperationLocation, - getResourceLocation: operation_js_1.getResourceLocation, - getPollingInterval: operation_js_1.parseRetryAfter, - getError: operation_js_1.getErrorFromResponse, - resolveOnUnsuccessful, - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = (0, operation_js_1.inferLroMode)({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig, - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); - }, - poll: lro.sendPollRequest, - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult - ? ({ flatResponse }, state) => processResult(flatResponse, state) - : ({ flatResponse }) => flatResponse, - }); +class AccountSASPermissions { + /** + * Parse initializes the AccountSASPermissions fields from a string. + * + * @param permissions - + */ + static parse(permissions) { + const accountSASPermissions = new AccountSASPermissions(); + for (const c of permissions) { + switch (c) { + case "r": + accountSASPermissions.read = true; + break; + case "w": + accountSASPermissions.write = true; + break; + case "d": + accountSASPermissions.delete = true; + break; + case "x": + accountSASPermissions.deleteVersion = true; + break; + case "l": + accountSASPermissions.list = true; + break; + case "a": + accountSASPermissions.add = true; + break; + case "c": + accountSASPermissions.create = true; + break; + case "u": + accountSASPermissions.update = true; + break; + case "p": + accountSASPermissions.process = true; + break; + case "t": + accountSASPermissions.tag = true; + break; + case "f": + accountSASPermissions.filter = true; + break; + case "i": + accountSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + accountSASPermissions.permanentDelete = true; + break; + default: + throw new RangeError(`Invalid permission character: ${c}`); + } + } + return accountSASPermissions; + } + /** + * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - + */ + static from(permissionLike) { + const accountSASPermissions = new AccountSASPermissions(); + if (permissionLike.read) { + accountSASPermissions.read = true; + } + if (permissionLike.write) { + accountSASPermissions.write = true; + } + if (permissionLike.delete) { + accountSASPermissions.delete = true; + } + if (permissionLike.deleteVersion) { + accountSASPermissions.deleteVersion = true; + } + if (permissionLike.filter) { + accountSASPermissions.filter = true; + } + if (permissionLike.tag) { + accountSASPermissions.tag = true; + } + if (permissionLike.list) { + accountSASPermissions.list = true; + } + if (permissionLike.add) { + accountSASPermissions.add = true; + } + if (permissionLike.create) { + accountSASPermissions.create = true; + } + if (permissionLike.update) { + accountSASPermissions.update = true; + } + if (permissionLike.process) { + accountSASPermissions.process = true; + } + if (permissionLike.setImmutabilityPolicy) { + accountSASPermissions.setImmutabilityPolicy = true; + } + if (permissionLike.permanentDelete) { + accountSASPermissions.permanentDelete = true; + } + return accountSASPermissions; + } + /** + * Permission to read resources and list queues and tables granted. + */ + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + */ + toString() { + // The order of the characters should be as specified here to ensure correctness: + // https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + // Use a string array instead of string concatenating += operator for performance + const permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.filter) { + permissions.push("f"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.list) { + permissions.push("l"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.update) { + permissions.push("u"); + } + if (this.process) { + permissions.push("p"); + } + if (this.setImmutabilityPolicy) { + permissions.push("i"); + } + if (this.permanentDelete) { + permissions.push("y"); + } + return permissions.join(""); + } } -exports.createHttpPoller = createHttpPoller; -//# sourceMappingURL=poller.js.map +exports.AccountSASPermissions = AccountSASPermissions; +//# sourceMappingURL=AccountSASPermissions.js.map /***/ }), -/***/ 90334: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 70790: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpPoller = void 0; -const tslib_1 = __nccwpck_require__(4351); -var poller_js_1 = __nccwpck_require__(78412); -Object.defineProperty(exports, "createHttpPoller", ({ enumerable: true, get: function () { return poller_js_1.createHttpPoller; } })); +exports.AccountSASResourceTypes = void 0; /** - * This can be uncommented to expose the protocol-agnostic poller + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. */ -// export { -// BuildCreatePollerOptions, -// Operation, -// CreatePollerOptions, -// OperationConfig, -// RestorableOperationState, -// } from "./poller/models"; -// export { buildCreatePoller } from "./poller/poller"; -/** legacy */ -tslib_1.__exportStar(__nccwpck_require__(52260), exports); -tslib_1.__exportStar(__nccwpck_require__(17270), exports); -tslib_1.__exportStar(__nccwpck_require__(93586), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 52260: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LroEngine = void 0; -var lroEngine_js_1 = __nccwpck_require__(35780); -Object.defineProperty(exports, "LroEngine", ({ enumerable: true, get: function () { return lroEngine_js_1.LroEngine; } })); -//# sourceMappingURL=index.js.map +class AccountSASResourceTypes { + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @param resourceTypes - + */ + static parse(resourceTypes) { + const accountSASResourceTypes = new AccountSASResourceTypes(); + for (const c of resourceTypes) { + switch (c) { + case "s": + accountSASResourceTypes.service = true; + break; + case "c": + accountSASResourceTypes.container = true; + break; + case "o": + accountSASResourceTypes.object = true; + break; + default: + throw new RangeError(`Invalid resource type: ${c}`); + } + } + return accountSASResourceTypes; + } + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; + /** + * Converts the given resource types to a string. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + */ + toString() { + const resourceTypes = []; + if (this.service) { + resourceTypes.push("s"); + } + if (this.container) { + resourceTypes.push("c"); + } + if (this.object) { + resourceTypes.push("o"); + } + return resourceTypes.join(""); + } +} +exports.AccountSASResourceTypes = AccountSASResourceTypes; +//# sourceMappingURL=AccountSASResourceTypes.js.map /***/ }), -/***/ 35780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 34606: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LroEngine = void 0; -const operation_js_1 = __nccwpck_require__(77954); -const constants_js_1 = __nccwpck_require__(53846); -const poller_js_1 = __nccwpck_require__(17270); -const operation_js_2 = __nccwpck_require__(70281); +exports.AccountSASServices = void 0; /** - * The LRO Engine, a class that performs polling. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. */ -class LroEngine extends poller_js_1.Poller { - constructor(lro, options) { - const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState, } = options || {}; - const state = resumeFrom - ? (0, operation_js_2.deserializeState)(resumeFrom) - : {}; - const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs: intervalInMs }; - operation.setPollerConfig(this.config); +class AccountSASServices { + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @param services - + */ + static parse(services) { + const accountSASServices = new AccountSASServices(); + for (const c of services) { + switch (c) { + case "b": + accountSASServices.blob = true; + break; + case "f": + accountSASServices.file = true; + break; + case "q": + accountSASServices.queue = true; + break; + case "t": + accountSASServices.table = true; + break; + default: + throw new RangeError(`Invalid service character: ${c}`); + } + } + return accountSASServices; } /** - * The method used by the poller to wait before attempting to update its operation. + * Permission to access blob resources granted. */ - delay() { - return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; + /** + * Converts the given services to a string. + * + */ + toString() { + const services = []; + if (this.blob) { + services.push("b"); + } + if (this.table) { + services.push("t"); + } + if (this.queue) { + services.push("q"); + } + if (this.file) { + services.push("f"); + } + return services.join(""); } } -exports.LroEngine = LroEngine; -//# sourceMappingURL=lroEngine.js.map +exports.AccountSASServices = AccountSASServices; +//# sourceMappingURL=AccountSASServices.js.map /***/ }), -/***/ 77954: +/***/ 72763: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GenericPollOperation = void 0; -const operation_js_1 = __nccwpck_require__(57759); -const logger_js_1 = __nccwpck_require__(28121); -const createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => (state.isCancelled = true), - setError: (state, error) => (state.error = error), - setResult: (state, result) => (state.result = result), - setRunning: (state) => (state.isStarted = true), - setSucceeded: (state) => (state.isCompleted = true), - setFailed: () => { - /** empty body */ - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error), -}); -class GenericPollOperation { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; +exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; +exports.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; +const AccountSASPermissions_js_1 = __nccwpck_require__(70793); +const AccountSASResourceTypes_js_1 = __nccwpck_require__(70790); +const AccountSASServices_js_1 = __nccwpck_require__(34606); +const SasIPRange_js_1 = __nccwpck_require__(80914); +const SASQueryParameters_js_1 = __nccwpck_require__(21969); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + * @param accountSASSignatureValues - + * @param sharedKeyCredential - + */ +function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { + return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) + .sasQueryParameters; +} +function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { + const version = accountSASSignatureValues.version + ? accountSASSignatureValues.version + : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.setImmutabilityPolicy && + version < "2020-08-04") { + throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), (await (0, operation_js_1.initHttpOperation)({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult, - }))); - } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === undefined) { - await (0, operation_js_1.pollHttpOperation)({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState - ? (state, { rawResponse }) => updateState(state, rawResponse) - : undefined, - isDone: isDone - ? ({ flatResponse }, state) => isDone(flatResponse, state) - : undefined, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult, - }); - } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.permanentDelete && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); } - async cancel() { - logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state, - }); + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.filter && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + } + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { + throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + let stringToSign; + if (version >= "2020-12-06") { + stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) + : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", + "", // Account SAS requires an additional newline character + ].join("\n"); + } + else { + stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) + : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + "", // Account SAS requires an additional newline character + ].join("\n"); + } + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope), + stringToSign: stringToSign, + }; } -exports.GenericPollOperation = GenericPollOperation; -//# sourceMappingURL=operation.js.map +//# sourceMappingURL=AccountSASSignatureValues.js.map /***/ }), -/***/ 93586: +/***/ 87393: /***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=pollOperation.js.map +exports.BlobSASPermissions = void 0; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ +class BlobSASPermissions { + /** + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @param permissions - + */ + static parse(permissions) { + const blobSASPermissions = new BlobSASPermissions(); + for (const char of permissions) { + switch (char) { + case "r": + blobSASPermissions.read = true; + break; + case "a": + blobSASPermissions.add = true; + break; + case "c": + blobSASPermissions.create = true; + break; + case "w": + blobSASPermissions.write = true; + break; + case "d": + blobSASPermissions.delete = true; + break; + case "x": + blobSASPermissions.deleteVersion = true; + break; + case "t": + blobSASPermissions.tag = true; + break; + case "m": + blobSASPermissions.move = true; + break; + case "e": + blobSASPermissions.execute = true; + break; + case "i": + blobSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + blobSASPermissions.permanentDelete = true; + break; + default: + throw new RangeError(`Invalid permission: ${char}`); + } + } + return blobSASPermissions; + } + /** + * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - + */ + static from(permissionLike) { + const blobSASPermissions = new BlobSASPermissions(); + if (permissionLike.read) { + blobSASPermissions.read = true; + } + if (permissionLike.add) { + blobSASPermissions.add = true; + } + if (permissionLike.create) { + blobSASPermissions.create = true; + } + if (permissionLike.write) { + blobSASPermissions.write = true; + } + if (permissionLike.delete) { + blobSASPermissions.delete = true; + } + if (permissionLike.deleteVersion) { + blobSASPermissions.deleteVersion = true; + } + if (permissionLike.tag) { + blobSASPermissions.tag = true; + } + if (permissionLike.move) { + blobSASPermissions.move = true; + } + if (permissionLike.execute) { + blobSASPermissions.execute = true; + } + if (permissionLike.setImmutabilityPolicy) { + blobSASPermissions.setImmutabilityPolicy = true; + } + if (permissionLike.permanentDelete) { + blobSASPermissions.permanentDelete = true; + } + return blobSASPermissions; + } + /** + * Specifies Read access granted. + */ + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns A string which represents the BlobSASPermissions + */ + toString() { + const permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); + } + if (this.execute) { + permissions.push("e"); + } + if (this.setImmutabilityPolicy) { + permissions.push("i"); + } + if (this.permanentDelete) { + permissions.push("y"); + } + return permissions.join(""); + } +} +exports.BlobSASPermissions = BlobSASPermissions; +//# sourceMappingURL=BlobSASPermissions.js.map /***/ }), -/***/ 17270: -/***/ ((__unused_webpack_module, exports) => { +/***/ 48921: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Poller = exports.PollerCancelledError = exports.PollerStoppedError = void 0; +exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; +exports.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const BlobSASPermissions_js_1 = __nccwpck_require__(87393); +const ContainerSASPermissions_js_1 = __nccwpck_require__(27579); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const UserDelegationKeyCredential_js_1 = __nccwpck_require__(50822); +const SasIPRange_js_1 = __nccwpck_require__(80914); +const SASQueryParameters_js_1 = __nccwpck_require__(21969); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; +} +function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential + ? sharedKeyCredentialOrUserDelegationKey + : undefined; + let userDelegationKeyCredential; + if (sharedKeyCredential === undefined && accountName !== undefined) { + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); + } + if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { + throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); + } + // Version 2020-12-06 adds support for encryptionscope in SAS. + if (version >= "2020-12-06") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); + } + else { + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); + } + else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); + } + } + } + // Version 2019-12-12 adds support for the blob tags permission. + // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. + // https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string + if (version >= "2018-11-09") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); + } + else { + // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId. + if (version >= "2020-02-10") { + return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); + } + else { + return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); + } + } + } + if (version >= "2015-04-05") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); + } + else { + throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); + } + } + throw new RangeError("'version' must be >= '2015-04-05'."); +} /** - * When a poller is manually stopped through the `stopPolling` method, - * the poller will be rejected with an instance of the PollerStoppedError. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - */ -class PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, PollerStoppedError.prototype); +function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + if (blobSASSignatureValues.blobName) { + resource = "b"; + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign: stringToSign, + }; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ +function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign: stringToSign, + }; } -exports.PollerStoppedError = PollerStoppedError; /** - * When the operation is cancelled, the poller will be rejected with an instance - * of the PollerCancelledError. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - */ -class PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, PollerCancelledError.prototype); +function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope), + stringToSign: stringToSign, + }; } -exports.PollerCancelledError = PollerCancelledError; /** - * A class that represents the definition of a program that polls through consecutive requests - * until it reaches a state of completion. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. * - * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. - * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. - * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * Creates an instance of SASQueryParameters. * - * ```ts - * const poller = new MyPoller(); + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. * - * // Polling just once: - * await poller.poll(); + * WARNING: identifier will be ignored, permissions and expiresOn are required. * - * // We can try to cancel the request here, by calling: - * // - * // await poller.cancelOperation(); - * // + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ +function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + stringToSign: stringToSign, + }; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. * - * // Getting the final result: - * const result = await poller.pollUntilDone(); - * ``` + * Creates an instance of SASQueryParameters. * - * The Poller is defined by two types, a type representing the state of the poller, which - * must include a basic set of properties from `PollOperationState`, - * and a return type defined by `TResult`, which can be anything. + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. * - * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having - * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * WARNING: identifier will be ignored, permissions and expiresOn are required. * - * ```ts - * class Client { - * public async makePoller: PollerLike { - * const poller = new MyPoller({}); - * // It might be preferred to return the poller after the first request is made, - * // so that some information can be obtained right away. - * await poller.poll(); - * return poller; - * } - * } + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ +function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, // agentObjectId + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + stringToSign: stringToSign, + }; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. * - * const poller: PollerLike = myClient.makePoller(); - * ``` + * Creates an instance of SASQueryParameters. * - * A poller can be created through its constructor, then it can be polled until it's completed. - * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. - * At any point in time, the intermediate forms of the result type can be requested without delay. - * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. * - * ```ts - * const poller = myClient.makePoller(); - * const state: MyOperationState = poller.getOperationState(); + * WARNING: identifier will be ignored, permissions and expiresOn are required. * - * // The intermediate result can be obtained at any time. - * const result: MyResult | undefined = poller.getResult(); + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - + */ +function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, // agentObjectId + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign: stringToSign, + }; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. * - * // The final result can only be obtained after the poller finishes. - * const result: MyResult = await poller.pollUntilDone(); - * ``` + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - */ -// eslint-disable-next-line no-use-before-define -class Poller { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - /** controls whether to throw an error if the operation failed or was canceled. */ - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve, reject) => { - this.resolve = resolve; - this.reject = reject; - }); - // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown. - // The above warning would get thrown if `poller.poll` is called, it returns an error, - // and pullUntilDone did not have a .catch or await try/catch on it's return value. - this.promise.catch(() => { - /* intentionally blank */ - }); +function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, // agentObjectId + blobSASSignatureValues.correlationId, + undefined, // SignedKeyDelegatedUserTenantId, will be added in a future release. + undefined, // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign: stringToSign, + }; +} +function getCanonicalName(accountName, containerName, blobName) { + // Container: "/blob/account/containerName" + // Blob: "/blob/account/containerName/blobName" + const elements = [`/blob/${accountName}/${containerName}`]; + if (blobName) { + elements.push(`/${blobName}`); + } + return elements.join(""); +} +function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { + throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { + throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); + } + if (blobSASSignatureValues.versionId && version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); + } + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { + throw RangeError("Must provide 'blobName' when providing 'versionId'."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.setImmutabilityPolicy && + version < "2020-08-04") { + throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); - } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.permanentDelete && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this), - }); - } - this.processUpdatedState(); + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); + } + if (version < "2020-02-10" && + blobSASSignatureValues.permissions && + (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); + } + if (version < "2021-04-10" && + blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.filterByTags) { + throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); + } + if (version < "2020-02-10" && + (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); + } + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { + throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } + blobSASSignatureValues.version = version; + return blobSASSignatureValues; +} +//# sourceMappingURL=BlobSASSignatureValues.js.map + +/***/ }), + +/***/ 27579: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ContainerSASPermissions = void 0; +/** + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ +class ContainerSASPermissions { /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. * - * @param state - The current operation state. + * @param permissions - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); + static parse(permissions) { + const containerSASPermissions = new ContainerSASPermissions(); + for (const char of permissions) { + switch (char) { + case "r": + containerSASPermissions.read = true; + break; + case "a": + containerSASPermissions.add = true; + break; + case "c": + containerSASPermissions.create = true; + break; + case "w": + containerSASPermissions.write = true; + break; + case "d": + containerSASPermissions.delete = true; + break; + case "l": + containerSASPermissions.list = true; + break; + case "t": + containerSASPermissions.tag = true; + break; + case "x": + containerSASPermissions.deleteVersion = true; + break; + case "m": + containerSASPermissions.move = true; + break; + case "e": + containerSASPermissions.execute = true; + break; + case "i": + containerSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + containerSASPermissions.permanentDelete = true; + break; + case "f": + containerSASPermissions.filterByTags = true; + break; + default: + throw new RangeError(`Invalid permission ${char}`); + } } + return containerSASPermissions; } /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. * - * @param options - Optional properties passed to the operation's update method. + * @param permissionLike - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = undefined; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + static from(permissionLike) { + const containerSASPermissions = new ContainerSASPermissions(); + if (permissionLike.read) { + containerSASPermissions.read = true; } - return this.pollOncePromise; - } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } + if (permissionLike.add) { + containerSASPermissions.add = true; } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error = new PollerCancelledError("Operation was canceled"); - this.reject(error); - throw error; - } + if (permissionLike.create) { + containerSASPermissions.create = true; } - if (this.isDone() && this.resolve) { - // If the poller has finished polling, this means we now have a result. - // However, it can be the case that TResult is instantiated to void, so - // we are not expecting a result anyway. To assert that we might not - // have a result eventually after finishing polling, we cast the result - // to TResult. - this.resolve(this.getResult()); + if (permissionLike.write) { + containerSASPermissions.write = true; + } + if (permissionLike.delete) { + containerSASPermissions.delete = true; } + if (permissionLike.list) { + containerSASPermissions.list = true; + } + if (permissionLike.deleteVersion) { + containerSASPermissions.deleteVersion = true; + } + if (permissionLike.tag) { + containerSASPermissions.tag = true; + } + if (permissionLike.move) { + containerSASPermissions.move = true; + } + if (permissionLike.execute) { + containerSASPermissions.execute = true; + } + if (permissionLike.setImmutabilityPolicy) { + containerSASPermissions.setImmutabilityPolicy = true; + } + if (permissionLike.permanentDelete) { + containerSASPermissions.permanentDelete = true; + } + if (permissionLike.filterByTags) { + containerSASPermissions.filterByTags = true; + } + return containerSASPermissions; } /** - * Returns a promise that will resolve once the underlying operation is completed. + * Specifies Read access granted. */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); - } - // This is needed because the state could have been updated by - // `cancelOperation`, e.g. the operation is canceled or an error occurred. - this.processUpdatedState(); - return this.promise; - } + read = false; /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. + * Specifies Add access granted. */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } + add = false; /** - * Returns true if the poller has finished polling. + * Specifies Create access granted. */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); - } + create = false; /** - * Stops the poller from continuing to poll. + * Specifies Write access granted. */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } - } - } + write = false; /** - * Returns true if the poller is stopped. + * Specifies Delete access granted. */ - isStopped() { - return this.stopped; - } + delete = false; /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. + * Specifies Delete version access granted. */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); - } - else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); - } - return this.cancelPromise; - } + deleteVersion = false; /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. + * Specifies List access granted. */ - getOperationState() { - return this.operation.state; - } + list = false; /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. + * Specfies Tag access granted. */ - getResult() { - const state = this.operation.state; - return state.result; - } + tag = false; /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. + * Specifies Move access granted. */ - toString() { - return this.operation.toString(); - } -} -exports.Poller = Poller; -//# sourceMappingURL=poller.js.map - -/***/ }), - -/***/ 28121: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logger = void 0; -const logger_1 = __nccwpck_require__(89497); -/** - * The `@azure/logger` configuration for this package. - * @internal - */ -exports.logger = (0, logger_1.createClientLogger)("core-lro"); -//# sourceMappingURL=logger.js.map - -/***/ }), - -/***/ 53846: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.terminalStates = exports.POLL_INTERVAL_IN_MS = void 0; -/** - * The default time interval to wait before sending the next polling request. - */ -exports.POLL_INTERVAL_IN_MS = 2000; -/** - * The closed set of terminal states. - */ -exports.terminalStates = ["succeeded", "canceled", "failed"]; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 70281: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pollOperation = exports.initOperation = exports.deserializeState = void 0; -const logger_js_1 = __nccwpck_require__(28121); -const constants_js_1 = __nccwpck_require__(53846); -/** - * Deserializes the state - */ -function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; - } - catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); - } -} -exports.deserializeState = deserializeState; -function setStateError(inputs) { - const { state, stateProxy, isOperationError } = inputs; - return (error) => { - if (isOperationError(error)) { - stateProxy.setError(state, error); - stateProxy.setFailed(state); - } - throw error; - }; -} -function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; - } - return message + " " + innerMessage; -} -function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } - return { - code, - message, - }; -} -function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger_js_1.logger.warning(errStr); - break; - } - case "canceled": { - stateProxy.setCanceled(state); - break; - } - } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || - (isDone === undefined && - ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status))) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult, - })); - } -} -function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; -} -/** - * Initiates the long-running operation. - */ -async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation, - }; - logger_js_1.logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; -} -exports.initOperation = initOperation; -async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError, - })); - const status = getOperationStatus(response, state); - logger_js_1.logger.verbose(`LRO: Status:\n\tPolling from: ${state.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation(response, state); - if (resourceLocation !== undefined) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), - status, - }; + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + */ + toString() { + const permissions = []; + if (this.read) { + permissions.push("r"); } - } - return { response, status }; -} -/** Polls the long-running operation. */ -async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult, } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== undefined) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus, - state, - stateProxy, - operationLocation, - getResourceLocation, - isOperationError, - options, - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult, - }); - if (!constants_js_1.terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); - if (location !== undefined) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } - else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + if (this.add) { + permissions.push("a"); } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.list) { + permissions.push("l"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); + } + if (this.execute) { + permissions.push("e"); + } + if (this.setImmutabilityPolicy) { + permissions.push("i"); + } + if (this.permanentDelete) { + permissions.push("y"); + } + if (this.filterByTags) { + permissions.push("f"); + } + return permissions.join(""); } } -exports.pollOperation = pollOperation; -//# sourceMappingURL=operation.js.map +exports.ContainerSASPermissions = ContainerSASPermissions; +//# sourceMappingURL=ContainerSASPermissions.js.map /***/ }), -/***/ 76713: +/***/ 21969: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.buildCreatePoller = void 0; -const operation_js_1 = __nccwpck_require__(70281); -const constants_js_1 = __nccwpck_require__(53846); -const core_util_1 = __nccwpck_require__(80637); -const createStateProxy = () => ({ +exports.SASQueryParameters = exports.SASProtocol = void 0; +const SasIPRange_js_1 = __nccwpck_require__(80914); +const utils_common_js_1 = __nccwpck_require__(16673); +/** + * Protocols for generated SAS. + */ +var SASProtocol; +(function (SASProtocol) { /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. + * Protocol that allows HTTPS only */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => (state.status = "canceled"), - setError: (state, error) => (state.error = error), - setResult: (state, result) => (state.result = result), - setRunning: (state) => (state.status = "running"), - setSucceeded: (state) => (state.status = "succeeded"), - setFailed: (state) => (state.status = "failed"), - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded", -}); + SASProtocol["Https"] = "https"; + /** + * Protocol that allows both HTTPS and HTTP + */ + SASProtocol["HttpsAndHttp"] = "https,http"; +})(SASProtocol || (exports.SASProtocol = SASProtocol = {})); /** - * Returns a poller factory. + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. */ -function buildCreatePoller(inputs) { - const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful, } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom, } = options || {}; - const stateProxy = createStateProxy(); - const withOperationLocation = withOperationLocationCallback - ? (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() - : undefined; - const state = restoreFrom - ? (0, operation_js_1.deserializeState)(restoreFrom) - : await (0, operation_js_1.initOperation)({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful, - }); - let resultPromise; - const abortController = new AbortController(); - const handlers = new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === undefined, - stopPolling: () => { - abortController.abort(); - }, - toString: () => JSON.stringify({ - state, - }), - onProgress: (callback) => { - const s = Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - // In the future we can use AbortSignal.any() instead - function abortListener() { - abortController.abort(); - } - const abortSignal = abortController.signal; - if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { - abortController.abort(); - } - else if (!abortSignal.aborted) { - inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); - } - try { - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - } - finally { - inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } - else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = undefined; - }))), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } - else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await (0, operation_js_1.pollOperation)({ - poll, - state, - stateProxy, - getOperationLocation, - isOperationError, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful, - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - }, - }; - return poller; - }; +class SASQueryParameters { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; + /** + * Optional. IP range allowed for this SAS. + * + * @readonly + */ + get ipRange() { + if (this.ipRangeInner) { + return { + end: this.ipRangeInner.end, + start: this.ipRangeInner.start, + }; + } + return undefined; + } + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; + this.signature = signature; + if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { + // SASQueryParametersOptions + this.permissions = permissionsOrOptions.permissions; + this.services = permissionsOrOptions.services; + this.resourceTypes = permissionsOrOptions.resourceTypes; + this.protocol = permissionsOrOptions.protocol; + this.startsOn = permissionsOrOptions.startsOn; + this.expiresOn = permissionsOrOptions.expiresOn; + this.ipRangeInner = permissionsOrOptions.ipRange; + this.identifier = permissionsOrOptions.identifier; + this.encryptionScope = permissionsOrOptions.encryptionScope; + this.resource = permissionsOrOptions.resource; + this.cacheControl = permissionsOrOptions.cacheControl; + this.contentDisposition = permissionsOrOptions.contentDisposition; + this.contentEncoding = permissionsOrOptions.contentEncoding; + this.contentLanguage = permissionsOrOptions.contentLanguage; + this.contentType = permissionsOrOptions.contentType; + if (permissionsOrOptions.userDelegationKey) { + this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; + this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; + this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; + this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; + this.signedService = permissionsOrOptions.userDelegationKey.signedService; + this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; + this.correlationId = permissionsOrOptions.correlationId; + } + } + else { + this.services = services; + this.resourceTypes = resourceTypes; + this.expiresOn = expiresOn; + this.permissions = permissionsOrOptions; + this.protocol = protocol; + this.startsOn = startsOn; + this.ipRangeInner = ipRange; + this.encryptionScope = encryptionScope; + this.identifier = identifier; + this.resource = resource; + this.cacheControl = cacheControl; + this.contentDisposition = contentDisposition; + this.contentEncoding = contentEncoding; + this.contentLanguage = contentLanguage; + this.contentType = contentType; + if (userDelegationKey) { + this.signedOid = userDelegationKey.signedObjectId; + this.signedTenantId = userDelegationKey.signedTenantId; + this.signedStartsOn = userDelegationKey.signedStartsOn; + this.signedExpiresOn = userDelegationKey.signedExpiresOn; + this.signedService = userDelegationKey.signedService; + this.signedVersion = userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; + this.correlationId = correlationId; + } + } + } + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + */ + toString() { + const params = [ + "sv", + "ss", + "srt", + "spr", + "st", + "se", + "sip", + "si", + "ses", + "skoid", // Signed object ID + "sktid", // Signed tenant ID + "skt", // Signed key start time + "ske", // Signed key expiry time + "sks", // Signed key service + "skv", // Signed key version + "sr", + "sp", + "sig", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "saoid", + "scid", + ]; + const queries = []; + for (const param of params) { + switch (param) { + case "sv": + this.tryAppendQueryParameter(queries, param, this.version); + break; + case "ss": + this.tryAppendQueryParameter(queries, param, this.services); + break; + case "srt": + this.tryAppendQueryParameter(queries, param, this.resourceTypes); + break; + case "spr": + this.tryAppendQueryParameter(queries, param, this.protocol); + break; + case "st": + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : undefined); + break; + case "se": + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : undefined); + break; + case "sip": + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : undefined); + break; + case "si": + this.tryAppendQueryParameter(queries, param, this.identifier); + break; + case "ses": + this.tryAppendQueryParameter(queries, param, this.encryptionScope); + break; + case "skoid": // Signed object ID + this.tryAppendQueryParameter(queries, param, this.signedOid); + break; + case "sktid": // Signed tenant ID + this.tryAppendQueryParameter(queries, param, this.signedTenantId); + break; + case "skt": // Signed key start time + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : undefined); + break; + case "ske": // Signed key expiry time + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : undefined); + break; + case "sks": // Signed key service + this.tryAppendQueryParameter(queries, param, this.signedService); + break; + case "skv": // Signed key version + this.tryAppendQueryParameter(queries, param, this.signedVersion); + break; + case "sr": + this.tryAppendQueryParameter(queries, param, this.resource); + break; + case "sp": + this.tryAppendQueryParameter(queries, param, this.permissions); + break; + case "sig": + this.tryAppendQueryParameter(queries, param, this.signature); + break; + case "rscc": + this.tryAppendQueryParameter(queries, param, this.cacheControl); + break; + case "rscd": + this.tryAppendQueryParameter(queries, param, this.contentDisposition); + break; + case "rsce": + this.tryAppendQueryParameter(queries, param, this.contentEncoding); + break; + case "rscl": + this.tryAppendQueryParameter(queries, param, this.contentLanguage); + break; + case "rsct": + this.tryAppendQueryParameter(queries, param, this.contentType); + break; + case "saoid": + this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); + break; + case "scid": + this.tryAppendQueryParameter(queries, param, this.correlationId); + break; + } + } + return queries.join("&"); + } + /** + * A private helper method used to filter and append query key/value pairs into an array. + * + * @param queries - + * @param key - + * @param value - + */ + tryAppendQueryParameter(queries, key, value) { + if (!value) { + return; + } + key = encodeURIComponent(key); + value = encodeURIComponent(value); + if (key.length > 0 && value.length > 0) { + queries.push(`${key}=${value}`); + } + } } -exports.buildCreatePoller = buildCreatePoller; -//# sourceMappingURL=poller.js.map +exports.SASQueryParameters = SASQueryParameters; +//# sourceMappingURL=SASQueryParameters.js.map /***/ }), -/***/ 43171: +/***/ 80914: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -108147,14 +109229,22 @@ exports.buildCreatePoller = buildCreatePoller; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; -exports.SDK_VERSION = "1.19.1"; -exports.DEFAULT_RETRY_POLICY_COUNT = 3; -//# sourceMappingURL=constants.js.map +exports.ipRangeToString = ipRangeToString; +/** + * Generate SasIPRange format string. For example: + * + * "8.8.8.8" or "1.1.1.1-255.255.255.255" + * + * @param ipRange - + */ +function ipRangeToString(ipRange) { + return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; +} +//# sourceMappingURL=SasIPRange.js.map /***/ }), -/***/ 81060: +/***/ 93996: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -108162,62 +109252,140 @@ exports.DEFAULT_RETRY_POLICY_COUNT = 3; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createPipelineFromOptions = createPipelineFromOptions; -const logPolicy_js_1 = __nccwpck_require__(46821); -const pipeline_js_1 = __nccwpck_require__(83906); -const redirectPolicy_js_1 = __nccwpck_require__(98526); -const userAgentPolicy_js_1 = __nccwpck_require__(88935); -const multipartPolicy_js_1 = __nccwpck_require__(19042); -const decompressResponsePolicy_js_1 = __nccwpck_require__(57618); -const defaultRetryPolicy_js_1 = __nccwpck_require__(48549); -const formDataPolicy_js_1 = __nccwpck_require__(16501); -const core_util_1 = __nccwpck_require__(80637); -const proxyPolicy_js_1 = __nccwpck_require__(94761); -const setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); -const agentPolicy_js_1 = __nccwpck_require__(15093); -const tlsPolicy_js_1 = __nccwpck_require__(88446); -const tracingPolicy_js_1 = __nccwpck_require__(80606); +exports.Batch = void 0; +// In browser, during webpack or browserify bundling, this module will be replaced by 'events' +// https://github.com/Gozala/events +const events_1 = __nccwpck_require__(82361); /** - * Create a new pipeline with a default set of customizable policies. - * @param options - Options to configure a custom pipeline. + * States for Batch. */ -function createPipelineFromOptions(options) { - var _a; - const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); - if (core_util_1.isNodeLike) { - if (options.agent) { - pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); +var BatchStates; +(function (BatchStates) { + BatchStates[BatchStates["Good"] = 0] = "Good"; + BatchStates[BatchStates["Error"] = 1] = "Error"; +})(BatchStates || (BatchStates = {})); +/** + * Batch provides basic parallel execution with concurrency limits. + * Will stop execute left operations when one of the executed operation throws an error. + * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. + */ +class Batch { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; + /** + * Creates an instance of Batch. + * @param concurrency - + */ + constructor(concurrency = 5) { + if (concurrency < 1) { + throw new RangeError("concurrency must be larger than 0"); } - if (options.tlsOptions) { - pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + this.concurrency = concurrency; + this.emitter = new events_1.EventEmitter(); + } + /** + * Add a operation into queue. + * + * @param operation - + */ + addOperation(operation) { + this.operations.push(async () => { + try { + this.actives++; + await operation(); + this.actives--; + this.completed++; + this.parallelExecute(); + } + catch (error) { + this.emitter.emit("error", error); + } + }); + } + /** + * Start execute operations in the queue. + * + */ + async do() { + if (this.operations.length === 0) { + return Promise.resolve(); } - pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); - pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + this.parallelExecute(); + return new Promise((resolve, reject) => { + this.emitter.on("finish", resolve); + this.emitter.on("error", (error) => { + this.state = BatchStates.Error; + reject(error); + }); + }); } - pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); - pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); - // The multipart policy is added after policies with no phase, so that - // policies can be added between it and formDataPolicy to modify - // properties (e.g., making the boundary constant in recorded tests). - pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); - pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { - afterPhase: "Retry", - }); - if (core_util_1.isNodeLike) { - // Both XHR and Fetch expect to handle redirects automatically, - // so only include this policy when we're in Node. - pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + /** + * Get next operation to be executed. Return null when reaching ends. + * + */ + nextOperation() { + if (this.offset < this.operations.length) { + return this.operations[this.offset++]; + } + return null; + } + /** + * Start execute operations. One one the most important difference between + * this method with do() is that do() wraps as an sync method. + * + */ + parallelExecute() { + if (this.state === BatchStates.Error) { + return; + } + if (this.completed >= this.operations.length) { + this.emitter.emit("finish"); + return; + } + while (this.actives < this.concurrency) { + const operation = this.nextOperation(); + if (operation) { + operation(); + } + else { + return; + } + } } - pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); - return pipeline; } -//# sourceMappingURL=createPipelineFromOptions.js.map +exports.Batch = Batch; +//# sourceMappingURL=Batch.js.map /***/ }), -/***/ 88609: +/***/ 59028: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -108225,19 +109393,126 @@ function createPipelineFromOptions(options) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDefaultHttpClient = createDefaultHttpClient; -const nodeHttpClient_js_1 = __nccwpck_require__(49463); +exports.BlobQuickQueryStream = void 0; +const node_stream_1 = __nccwpck_require__(84492); +const index_js_1 = __nccwpck_require__(94382); /** - * Create the correct HttpClient for the current environment. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. */ -function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); +class BlobQuickQueryStream extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; + /** + * Creates an instance of BlobQuickQueryStream. + * + * @param source - The current ReadableStream returned from getter + * @param options - + */ + constructor(source, options = {}) { + super(); + this.source = source; + this.onProgress = options.onProgress; + this.onError = options.onError; + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); + this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); + } + _read() { + if (this.avroPaused) { + this.readInternal().catch((err) => { + this.emit("error", err); + }); + } + } + async readInternal() { + this.avroPaused = false; + let avroNext; + do { + avroNext = await this.avroIter.next(); + if (avroNext.done) { + break; + } + const obj = avroNext.value; + const schema = obj.$schema; + if (typeof schema !== "string") { + throw Error("Missing schema in avro record."); + } + switch (schema) { + case "com.microsoft.azure.storage.queryBlobContents.resultData": + { + const data = obj.data; + if (data instanceof Uint8Array === false) { + throw Error("Invalid data in avro result record."); + } + if (!this.push(Buffer.from(data))) { + this.avroPaused = true; + } + } + break; + case "com.microsoft.azure.storage.queryBlobContents.progress": + { + const bytesScanned = obj.bytesScanned; + if (typeof bytesScanned !== "number") { + throw Error("Invalid bytesScanned in avro progress record."); + } + if (this.onProgress) { + this.onProgress({ loadedBytes: bytesScanned }); + } + } + break; + case "com.microsoft.azure.storage.queryBlobContents.end": + if (this.onProgress) { + const totalBytes = obj.totalBytes; + if (typeof totalBytes !== "number") { + throw Error("Invalid totalBytes in avro end record."); + } + this.onProgress({ loadedBytes: totalBytes }); + } + this.push(null); + break; + case "com.microsoft.azure.storage.queryBlobContents.error": + if (this.onError) { + const fatal = obj.fatal; + if (typeof fatal !== "boolean") { + throw Error("Invalid fatal in avro error record."); + } + const name = obj.name; + if (typeof name !== "string") { + throw Error("Invalid name in avro error record."); + } + const description = obj.description; + if (typeof description !== "string") { + throw Error("Invalid description in avro error record."); + } + const position = obj.position; + if (typeof position !== "number") { + throw Error("Invalid position in avro error record."); + } + this.onError({ + position, + name, + isFatal: fatal, + description, + }); + } + break; + default: + throw Error(`Unknown schema ${schema} in avro progress record.`); + } + } while (!avroNext.done && !this.avroPaused); + } } -//# sourceMappingURL=defaultHttpClient.js.map +exports.BlobQuickQueryStream = BlobQuickQueryStream; +//# sourceMappingURL=BlobQuickQueryStream.js.map /***/ }), -/***/ 60118: +/***/ 25300: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -108245,183 +109520,532 @@ function createDefaultHttpClient() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpHeaders = createHttpHeaders; -function normalizeName(name) { - return name.toLowerCase(); -} -function* headerIterator(map) { - for (const entry of map.values()) { - yield [entry.name, entry.value]; +exports.Mutex = void 0; +var MutexLockStatus; +(function (MutexLockStatus) { + MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED"; + MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED"; +})(MutexLockStatus || (MutexLockStatus = {})); +/** + * An async mutex lock. + */ +class Mutex { + /** + * Lock for a specific key. If the lock has been acquired by another customer, then + * will wait until getting the lock. + * + * @param key - lock key + */ + static async lock(key) { + return new Promise((resolve) => { + if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + } + else { + this.onUnlockEvent(key, () => { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + }); + } + }); + } + /** + * Unlock a key. + * + * @param key - + */ + static async unlock(key) { + return new Promise((resolve) => { + if (this.keys[key] === MutexLockStatus.LOCKED) { + this.emitUnlockEvent(key); + } + delete this.keys[key]; + resolve(); + }); + } + static keys = {}; + static listeners = {}; + static onUnlockEvent(key, handler) { + if (this.listeners[key] === undefined) { + this.listeners[key] = [handler]; + } + else { + this.listeners[key].push(handler); + } + } + static emitUnlockEvent(key) { + if (this.listeners[key] !== undefined && this.listeners[key].length > 0) { + const handler = this.listeners[key].shift(); + setImmediate(() => { + handler.call(this); + }); + } } } -class HttpHeadersImpl { - constructor(rawHeaders) { - this._headersMap = new Map(); - if (rawHeaders) { - for (const headerName of Object.keys(rawHeaders)) { - this.set(headerName, rawHeaders[headerName]); +exports.Mutex = Mutex; +//# sourceMappingURL=Mutex.js.map + +/***/ }), + +/***/ 88251: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RetriableReadableStream = void 0; +const abort_controller_1 = __nccwpck_require__(1753); +const node_stream_1 = __nccwpck_require__(84492); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. + */ +class RetriableReadableStream extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; + /** + * Creates an instance of RetriableReadableStream. + * + * @param source - The current ReadableStream returned from getter + * @param getter - A method calling downloading request returning + * a new ReadableStream from specified offset + * @param offset - Offset position in original data source to read + * @param count - How much data in original data source to read + * @param options - + */ + constructor(source, getter, offset, count, options = {}) { + super({ highWaterMark: options.highWaterMark }); + this.getter = getter; + this.source = source; + this.start = offset; + this.offset = offset; + this.end = offset + count - 1; + this.maxRetryRequests = + options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; + this.onProgress = options.onProgress; + this.options = options; + this.setSourceEventHandlers(); + } + _read() { + this.source.resume(); + } + setSourceEventHandlers() { + this.source.on("data", this.sourceDataHandler); + this.source.on("end", this.sourceErrorOrEndHandler); + this.source.on("error", this.sourceErrorOrEndHandler); + // needed for Node14 + this.source.on("aborted", this.sourceAbortedHandler); + } + removeSourceEventHandlers() { + this.source.removeListener("data", this.sourceDataHandler); + this.source.removeListener("end", this.sourceErrorOrEndHandler); + this.source.removeListener("error", this.sourceErrorOrEndHandler); + this.source.removeListener("aborted", this.sourceAbortedHandler); + } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = undefined; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; + } + // console.log( + // `Offset: ${this.offset}, Received ${data.length} from internal stream` + // ); + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); + } + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + // console.log( + // `Source stream emits end or error, offset: ${ + // this.offset + // }, dest end : ${this.end}` + // ); + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } + else if (this.offset <= this.end) { + // console.log( + // `retries: ${this.retries}, max retries: ${this.maxRetries}` + // ); + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset) + .then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }) + .catch((error) => { + this.destroy(error); + }); + } + else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); } } - } - /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param name - The name of the header to set. This value is case-insensitive. - * @param value - The value of the header to set. - */ - set(name, value) { - this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); - } - /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param name - The name of the header. This value is case-insensitive. - */ - get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; - } - /** - * Get whether or not this header collection contains a header entry for the provided header name. - * @param name - The name of the header to set. This value is case-insensitive. - */ - has(name) { - return this._headersMap.has(normalizeName(name)); - } - /** - * Remove the header with the provided headerName. - * @param name - The name of the header to remove. - */ - delete(name) { - this._headersMap.delete(normalizeName(name)); - } - /** - * Get the JSON object representation of this HTTP header collection. - */ - toJSON(options = {}) { - const result = {}; - if (options.preserveCase) { - for (const entry of this._headersMap.values()) { - result[entry.name] = entry.value; - } + else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; + _destroy(error, callback) { + // remove listener from source and release source + this.removeSourceEventHandlers(); + this.source.destroy(); + callback(error === null ? undefined : error); + } +} +exports.RetriableReadableStream = RetriableReadableStream; +//# sourceMappingURL=RetriableReadableStream.js.map + +/***/ }), + +/***/ 35867: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.compareHeader = compareHeader; +/* + * We need to imitate .Net culture-aware sorting, which is used in storage service. + * Below tables contain sort-keys for en-US culture. + */ +const table_lv0 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721, + 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e, + 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a, + 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89, + 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748, + 0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, + 0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c, + 0x0, 0x750, 0x0, +]); +const table_lv2 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +const table_lv4 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; +} +function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1; + if (weight1 === 0x1 && weight2 === 0x1) { + i = 0; + j = 0; + ++curr_level; + } + else if (weight1 === weight2) { + ++i; + ++j; + } + else if (weight1 === 0) { + ++i; + } + else if (weight2 === 0) { + ++j; } else { - for (const [normalizedName, entry] of this._headersMap) { - result[normalizedName] = entry.value; - } + return weight1 < weight2; } - return result; - } - /** - * Get the string representation of this HTTP header collection. - */ - toString() { - return JSON.stringify(this.toJSON({ preserveCase: true })); - } - /** - * Iterate over tuples of header [name, value] pairs. - */ - [Symbol.iterator]() { - return headerIterator(this._headersMap); } + return false; } -/** - * Creates an object that satisfies the `HttpHeaders` interface. - * @param rawHeaders - A simple object representing initial headers - */ -function createHttpHeaders(rawHeaders) { - return new HttpHeadersImpl(rawHeaders); -} -//# sourceMappingURL=httpHeaders.js.map +//# sourceMappingURL=SharedKeyComparator.js.map /***/ }), -/***/ 29146: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 81865: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileFromStream = exports.createFile = exports.agentPolicyName = exports.agentPolicy = exports.auxiliaryAuthenticationHeaderPolicyName = exports.auxiliaryAuthenticationHeaderPolicy = exports.ndJsonPolicyName = exports.ndJsonPolicy = exports.bearerTokenAuthenticationPolicyName = exports.bearerTokenAuthenticationPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.userAgentPolicyName = exports.userAgentPolicy = exports.defaultRetryPolicy = exports.tracingPolicyName = exports.tracingPolicy = exports.retryPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.setClientRequestIdPolicyName = exports.setClientRequestIdPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.isRestError = exports.RestError = exports.createPipelineRequest = exports.createHttpHeaders = exports.createDefaultHttpClient = exports.createPipelineFromOptions = exports.createEmptyPipeline = void 0; -var pipeline_js_1 = __nccwpck_require__(83906); -Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); -var createPipelineFromOptions_js_1 = __nccwpck_require__(81060); -Object.defineProperty(exports, "createPipelineFromOptions", ({ enumerable: true, get: function () { return createPipelineFromOptions_js_1.createPipelineFromOptions; } })); -var defaultHttpClient_js_1 = __nccwpck_require__(88609); -Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); -var httpHeaders_js_1 = __nccwpck_require__(60118); -Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); -var pipelineRequest_js_1 = __nccwpck_require__(93536); -Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); -var restError_js_1 = __nccwpck_require__(61036); -Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); -Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); -var decompressResponsePolicy_js_1 = __nccwpck_require__(57618); -Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); -Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); -var exponentialRetryPolicy_js_1 = __nccwpck_require__(1598); -Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); -Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); -var setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); -Object.defineProperty(exports, "setClientRequestIdPolicy", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; } })); -Object.defineProperty(exports, "setClientRequestIdPolicyName", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } })); -var logPolicy_js_1 = __nccwpck_require__(46821); -Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); -Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); -var multipartPolicy_js_1 = __nccwpck_require__(19042); -Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); -Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); -var proxyPolicy_js_1 = __nccwpck_require__(94761); -Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); -Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); -Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); -var redirectPolicy_js_1 = __nccwpck_require__(98526); -Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); -Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); -var systemErrorRetryPolicy_js_1 = __nccwpck_require__(72470); -Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); -Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); -var throttlingRetryPolicy_js_1 = __nccwpck_require__(54802); -Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); -Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); -var retryPolicy_js_1 = __nccwpck_require__(39700); -Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); -var tracingPolicy_js_1 = __nccwpck_require__(80606); -Object.defineProperty(exports, "tracingPolicy", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicy; } })); -Object.defineProperty(exports, "tracingPolicyName", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicyName; } })); -var defaultRetryPolicy_js_1 = __nccwpck_require__(48549); -Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); -var userAgentPolicy_js_1 = __nccwpck_require__(88935); -Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); -Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); -var tlsPolicy_js_1 = __nccwpck_require__(88446); -Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); -Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); -var formDataPolicy_js_1 = __nccwpck_require__(16501); -Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); -Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); -var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(11319); -Object.defineProperty(exports, "bearerTokenAuthenticationPolicy", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; } })); -Object.defineProperty(exports, "bearerTokenAuthenticationPolicyName", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; } })); -var ndJsonPolicy_js_1 = __nccwpck_require__(82032); -Object.defineProperty(exports, "ndJsonPolicy", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicy; } })); -Object.defineProperty(exports, "ndJsonPolicyName", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicyName; } })); -var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(68152); -Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicy", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; } })); -Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicyName", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } })); -var agentPolicy_js_1 = __nccwpck_require__(15093); -Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); -Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); -var file_js_1 = __nccwpck_require__(3224); -Object.defineProperty(exports, "createFile", ({ enumerable: true, get: function () { return file_js_1.createFile; } })); -Object.defineProperty(exports, "createFileFromStream", ({ enumerable: true, get: function () { return file_js_1.createFileFromStream; } })); -//# sourceMappingURL=index.js.map +exports.PathStylePorts = exports.BlobDoesNotUseCustomerSpecifiedEncryption = exports.BlobUsesCustomerSpecifiedEncryptionMsg = exports.StorageBlobLoggingAllowedQueryParameters = exports.StorageBlobLoggingAllowedHeaderNames = exports.DevelopmentConnectionString = exports.EncryptionAlgorithmAES25 = exports.HTTP_VERSION_1_1 = exports.HTTP_LINE_ENDING = exports.BATCH_MAX_PAYLOAD_IN_BYTES = exports.BATCH_MAX_REQUEST = exports.SIZE_1_MB = exports.ETagAny = exports.ETagNone = exports.HeaderConstants = exports.HTTPURLConnection = exports.URLConstants = exports.StorageOAuthScopes = exports.REQUEST_TIMEOUT = exports.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports.BLOCK_BLOB_MAX_BLOCKS = exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports.SERVICE_VERSION = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "12.29.1"; +exports.SERVICE_VERSION = "2025-11-05"; +exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB +exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB +exports.BLOCK_BLOB_MAX_BLOCKS = 50000; +exports.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB +exports.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB +exports.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; +exports.REQUEST_TIMEOUT = 100 * 1000; // In ms +/** + * The OAuth scope to use with Azure Storage. + */ +exports.StorageOAuthScopes = "https://storage.azure.com/.default"; +exports.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout", + }, +}; +exports.HTTPURLConnection = { + HTTP_ACCEPTED: 202, + HTTP_CONFLICT: 409, + HTTP_NOT_FOUND: 404, + HTTP_PRECON_FAILED: 412, + HTTP_RANGE_NOT_SATISFIABLE: 416, +}; +exports.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code", +}; +exports.ETagNone = ""; +exports.ETagAny = "*"; +exports.SIZE_1_MB = 1 * 1024 * 1024; +exports.BATCH_MAX_REQUEST = 256; +exports.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports.SIZE_1_MB; +exports.HTTP_LINE_ENDING = "\r\n"; +exports.HTTP_VERSION_1_1 = "HTTP/1.1"; +exports.EncryptionAlgorithmAES25 = "AES256"; +exports.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; +exports.StorageBlobLoggingAllowedHeaderNames = [ + "Access-Control-Allow-Origin", + "Cache-Control", + "Content-Length", + "Content-Type", + "Date", + "Request-Id", + "traceparent", + "Transfer-Encoding", + "User-Agent", + "x-ms-client-request-id", + "x-ms-date", + "x-ms-error-code", + "x-ms-request-id", + "x-ms-return-client-request-id", + "x-ms-version", + "Accept-Ranges", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-MD5", + "Content-Range", + "ETag", + "Last-Modified", + "Server", + "Vary", + "x-ms-content-crc64", + "x-ms-copy-action", + "x-ms-copy-completion-time", + "x-ms-copy-id", + "x-ms-copy-progress", + "x-ms-copy-status", + "x-ms-has-immutability-policy", + "x-ms-has-legal-hold", + "x-ms-lease-state", + "x-ms-lease-status", + "x-ms-range", + "x-ms-request-server-encrypted", + "x-ms-server-encrypted", + "x-ms-snapshot", + "x-ms-source-range", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "x-ms-access-tier", + "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", + "x-ms-account-kind", + "x-ms-archive-status", + "x-ms-blob-append-offset", + "x-ms-blob-cache-control", + "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", + "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", + "x-ms-blob-content-language", + "x-ms-blob-content-length", + "x-ms-blob-content-md5", + "x-ms-blob-content-type", + "x-ms-blob-public-access", + "x-ms-blob-sequence-number", + "x-ms-blob-type", + "x-ms-copy-destination-snapshot", + "x-ms-creation-time", + "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", + "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", + "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", + "x-ms-incremental-copy", + "x-ms-lease-action", + "x-ms-lease-break-period", + "x-ms-lease-duration", + "x-ms-lease-id", + "x-ms-lease-time", + "x-ms-page-write", + "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", + "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", + "x-ms-sku-name", + "x-ms-source-content-md5", + "x-ms-source-if-match", + "x-ms-source-if-modified-since", + "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", + "x-ms-tag-count", + "x-ms-encryption-key-sha256", + "x-ms-copy-source-error-code", + "x-ms-copy-source-status-code", + "x-ms-if-tags", + "x-ms-source-if-tags", +]; +exports.StorageBlobLoggingAllowedQueryParameters = [ + "comp", + "maxresults", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "se", + "si", + "sip", + "sp", + "spr", + "sr", + "srt", + "ss", + "st", + "sv", + "include", + "marker", + "prefix", + "copyid", + "restype", + "blockid", + "blocklisttype", + "delimiter", + "prevsnapshot", + "ske", + "skoid", + "sks", + "skt", + "sktid", + "skv", + "snapshot", +]; +exports.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; +exports.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; +/// List of ports used for path style addressing. +/// Path style addressing means that storage account is put in URI's Path segment in instead of in host. +exports.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104", +]; +//# sourceMappingURL=constants.js.map /***/ }), -/***/ 30648: +/***/ 53683: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -108429,14 +110053,23 @@ Object.defineProperty(exports, "createFileFromStream", ({ enumerable: true, get: // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logger = void 0; -const logger_1 = __nccwpck_require__(89497); -exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); -//# sourceMappingURL=log.js.map +exports.tracingClient = void 0; +const core_tracing_1 = __nccwpck_require__(19363); +const constants_js_1 = __nccwpck_require__(81865); +/** + * Creates a span using the global tracer. + * @internal + */ +exports.tracingClient = (0, core_tracing_1.createTracingClient)({ + packageName: "@azure/storage-blob", + packageVersion: constants_js_1.SDK_VERSION, + namespace: "Microsoft.Storage", +}); +//# sourceMappingURL=tracing.js.map /***/ }), -/***/ 49463: +/***/ 16673: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -108444,631 +110077,813 @@ exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getBodyLength = getBodyLength; -exports.createNodeHttpClient = createNodeHttpClient; -const tslib_1 = __nccwpck_require__(4351); -const http = tslib_1.__importStar(__nccwpck_require__(88849)); -const https = tslib_1.__importStar(__nccwpck_require__(22286)); -const zlib = tslib_1.__importStar(__nccwpck_require__(65628)); -const node_stream_1 = __nccwpck_require__(84492); -const abort_controller_1 = __nccwpck_require__(11514); -const httpHeaders_js_1 = __nccwpck_require__(60118); -const restError_js_1 = __nccwpck_require__(61036); -const log_js_1 = __nccwpck_require__(30648); -const sanitizer_js_1 = __nccwpck_require__(34472); -const DEFAULT_TLS_SETTINGS = {}; -function isReadableStream(body) { - return body && typeof body.pipe === "function"; -} -function isStreamComplete(stream) { - if (stream.readable === false) { - return Promise.resolve(); - } - return new Promise((resolve) => { - const handler = () => { - resolve(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); -} -function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; -} -class ReportTransform extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } - catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } -} +exports.escapeURLPath = escapeURLPath; +exports.getValueInConnString = getValueInConnString; +exports.extractConnectionStringParts = extractConnectionStringParts; +exports.appendToURLPath = appendToURLPath; +exports.setURLParameter = setURLParameter; +exports.getURLParameter = getURLParameter; +exports.setURLHost = setURLHost; +exports.getURLPath = getURLPath; +exports.getURLScheme = getURLScheme; +exports.getURLPathAndQuery = getURLPathAndQuery; +exports.getURLQueries = getURLQueries; +exports.appendToURLQuery = appendToURLQuery; +exports.truncatedISO8061Date = truncatedISO8061Date; +exports.base64encode = base64encode; +exports.base64decode = base64decode; +exports.generateBlockID = generateBlockID; +exports.delay = delay; +exports.padStart = padStart; +exports.sanitizeURL = sanitizeURL; +exports.sanitizeHeaders = sanitizeHeaders; +exports.iEqual = iEqual; +exports.getAccountNameFromUrl = getAccountNameFromUrl; +exports.isIpEndpointStyle = isIpEndpointStyle; +exports.toBlobTagsString = toBlobTagsString; +exports.toBlobTags = toBlobTags; +exports.toTags = toTags; +exports.toQuerySerialization = toQuerySerialization; +exports.parseObjectReplicationRecord = parseObjectReplicationRecord; +exports.attachCredential = attachCredential; +exports.httpAuthorizationToString = httpAuthorizationToString; +exports.BlobNameToString = BlobNameToString; +exports.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; +exports.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; +exports.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; +exports.EscapePath = EscapePath; +exports.assertResponse = assertResponse; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); /** - * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. - * @internal - */ -class NodeHttpClient { - constructor() { - this.cachedHttpsAgents = new WeakMap(); - } - /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. - */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted. Request has already been canceled."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - let timeoutId; - if (request.timeout > 0) { - timeoutId = setTimeout(() => { - const sanitizer = new sanitizer_js_1.Sanitizer(); - log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } - } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } - else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - if (timeoutId !== undefined) { - clearTimeout(timeoutId); - } - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request, - }; - // Responses to HEAD must not have a body. - // If they do return a body, that body must be ignored. - if (request.method === "HEAD") { - // call resume() and not destroy() to avoid closing the socket - // and losing keep alive - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @param url - + */ +function escapeURLPath(url) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path || "/"; + path = escape(path); + urlParsed.pathname = path; + return urlParsed.toString(); +} +function getProxyUriFromDevConnString(connectionString) { + // Development Connection String + // https://learn.microsoft.com/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || - ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status))) { - response.readableStreamBody = responseStream; + } + } + return proxyUri; +} +function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; +} +/** + * Extracts the parts of an Azure Storage account connection string. + * + * @param connectionString - Connection string. + * @returns String key value pairs of the storage account's url and credentials. + */ +function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + // Development connection string + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + // Matching BlobEndpoint in the Account connection string + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + // Slicing off '/' at the end if exists + // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && + connectionString.search("AccountKey=") !== -1) { + // Account connection string + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + // Get account name and key + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + // BlobEndpoint is not present in the Account connection string + // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); } - else { - response.bodyAsText = await streamToText(responseStream); + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); } - return response; + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; } - finally { - // clean up event listener - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]) - .then(() => { - var _a; - // eslint-disable-next-line promise/always-return - if (abortListener) { - (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); - } - }) - .catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); } - } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (isInsecure && !request.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); + else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); } - const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); - const options = { - agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }), + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri, }; - return new Promise((resolve, reject) => { - const req = isInsecure ? http.request(options, resolve) : https.request(options, resolve); - req.once("error", (err) => { - var _a; - reject(new restError_js_1.RestError(err.message, { code: (_a = err.code) !== null && _a !== void 0 ? _a : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); - }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); - req.destroy(abortError); - reject(abortError); - }); - if (body && isReadableStream(body)) { - body.pipe(req); - } - else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } - else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); - } - else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); - } - } - else { - // streams don't like "undefined" being passed as data - req.end(); - } - }); } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - // Handle Insecure requests first - if (isInsecure) { - if (disableKeepAlive) { - // keepAlive:false is the default so we don't need a custom Agent - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - // If there is no cached agent create a new one and cache it. - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; + else { + // SAS connection string + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + // if accountName is empty, try to read it from BlobEndpoint + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); } - else { - if (disableKeepAlive && !request.tlsSettings) { - // When there are no tlsSettings and keepAlive is false - // we don't need a custom agent - return https.globalAgent; - } - // We use the tlsSettings to index cached clients - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - // Get the cached agent or create a new one with the - // provided values for keepAlive and tlsSettings - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } + else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + // client constructors assume accountSas does *not* start with ? + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } -function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); +/** + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. + * + * @param text - + */ +function escape(text) { + return encodeURIComponent(text) + .replace(/%2F/g, "/") // Don't escape for "/" + .replace(/'/g, "%27") // Escape for "'" + .replace(/\+/g, "%20") + .replace(/%25/g, "%"); // Revert encoded "%" +} +/** + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". + * + * @param url - Source URL string + * @param name - String to be appended to URL + * @returns An updated URL string + */ +function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name; + urlParsed.pathname = path; + return urlParsed.toString(); +} +/** + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. + * + * @param url - Source URL string + * @param name - Parameter name + * @param value - Parameter value + * @returns An updated URL string + */ +function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : undefined; + // mutating searchParams will change the encoding, so we have to do this ourselves + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); } } - else if (value) { - headers.set(header, value); - } } - return headers; + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); } -function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; +/** + * Get URL parameter by name. + * + * @param url - + * @param name - + */ +function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? undefined; +} +/** + * Set URL host. + * + * @param url - Source URL string + * @param host - New host string + * @returns An updated URL string + */ +function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); +} +/** + * Get URL path from an URL string. + * + * @param url - Source URL string + */ +function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; } - else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; + catch (e) { + return undefined; } - return stream; } -function streamToText(stream) { +/** + * Get URL scheme from an URL string. + * + * @param url - Source URL string + */ +function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } + catch (e) { + return undefined; + } +} +/** + * Get URL path and query from an URL string. + * + * @param url - Source URL string + */ +function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?' + } + return `${pathString}${queryString}`; +} +/** + * Get URL query key value pairs from an URL string. + * + * @param url - + */ +function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; +} +/** + * Append a string to URL query. + * + * @param url - Source URL string. + * @param queryParts - String to be appended to the URL query. + * @returns An updated URL string. + */ +function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } + else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); +} +/** + * Rounds a date off to seconds. + * + * @param date - + * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns Date string in ISO8061 format, with or without 7 milliseconds component + */ +function truncatedISO8061Date(date, withMilliseconds = true) { + // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" + const dateString = date.toISOString(); + return withMilliseconds + ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" + : dateString.substring(0, dateString.length - 5) + "Z"; +} +/** + * Base64 encode. + * + * @param content - + */ +function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); +} +/** + * Base64 decode. + * + * @param encodedString - + */ +function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); +} +/** + * Generate a 64 bytes base64 block ID string. + * + * @param blockIndex - + */ +function generateBlockID(blockIDPrefix, blockIndex) { + // To generate a 64 bytes base64 string, source string should be 48 + const maxSourceStringLength = 48; + // A blob can have a maximum of 100,000 uncommitted blocks at any given time + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); + } + const res = blockIDPrefix + + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); +} +/** + * Delay specified time interval. + * + * @param timeInMs - + * @param aborter - + * @param abortError - + */ +async function delay(timeInMs, aborter, abortError) { return new Promise((resolve, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); - } - else { - buffer.push(Buffer.from(chunk)); - } - }); - stream.on("end", () => { - resolve(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); + /* eslint-disable-next-line prefer-const */ + let timeout; + const abortHandler = () => { + if (timeout !== undefined) { + clearTimeout(timeout); } - else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR, - })); + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== undefined) { + aborter.removeEventListener("abort", abortHandler); } - }); + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== undefined) { + aborter.addEventListener("abort", abortHandler); + } }); } -/** @internal */ -function getBodyLength(body) { - if (!body) { - return 0; - } - else if (Buffer.isBuffer(body)) { - return body.length; +/** + * String.prototype.padStart() + * + * @param currentString - + * @param targetLength - + * @param padString - + */ +function padStart(currentString, targetLength, padString = " ") { + // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); } - else if (isReadableStream(body)) { - return null; + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; } - else if (isArrayBuffer(body)) { - return body.byteLength; + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; } - else if (typeof body === "string") { - return Buffer.from(body).length; +} +function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); } - else { - return null; + return safeURL; +} +function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } + else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } + else { + headers.set(name, value); + } } + return headers; } /** - * Create a new HttpClient instance for the NodeJS environment. - * @internal + * If two strings are equal when compared case insensitive. + * + * @param str1 - + * @param str2 - */ -function createNodeHttpClient() { - return new NodeHttpClient(); +function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } -//# sourceMappingURL=nodeHttpClient.js.map - -/***/ }), - -/***/ 83906: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createEmptyPipeline = createEmptyPipeline; -const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); /** - * A private implementation of Pipeline. - * Do not export this class from the package. - * @internal + * Extracts account name from the url + * @param url - url to extract the account name from + * @returns with the account name */ -class HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = undefined; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); +function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + accountName = parsedUrl.hostname.split(".")[0]; } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ + // .getPath() -> /devstoreaccount1/ + accountName = parsedUrl.pathname.split("/")[1]; } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + else { + // Custom domain case: "https://customdomain.com/containername/blob". + accountName = ""; } - this._policies.push({ - policy, - options, - }); - this._orderedPolicies = undefined; + return accountName; } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if ((options.name && policyDescriptor.policy.name === options.name) || - (options.phase && policyDescriptor.options.phase === options.phase)) { - removedPolicies.push(policyDescriptor.policy); - return false; - } - else { - return true; - } - }); - this._orderedPolicies = undefined; - return removedPolicies; + catch (error) { + throw new Error("Unable to extract accountName with provided information."); } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); +} +function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. + // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part. + // Case 3: Ipv4, use broad regex which just check if host contains Ipv4. + // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html. + return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || + (Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port))); +} +/** + * Convert Tags to encoded string. + * + * @param tags - + */ +function toBlobTagsString(tags) { + if (tags === undefined) { + return undefined; } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); + const tagPairs = []; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; + tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); } - return this._orderedPolicies; } - clone() { - return new HttpPipeline(this._policies); + return tagPairs.join("&"); +} +/** + * Convert Tags type to BlobTags. + * + * @param tags - + */ +function toBlobTags(tags) { + if (tags === undefined) { + return undefined; } - static create() { - return new HttpPipeline(); + const res = { + blobTagSet: [], + }; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; + res.blobTagSet.push({ + key, + value, + }); + } } - orderPolicies() { - /** - * The goal of this method is to reliably order pipeline policies - * based on their declared requirements when they were added. - * - * Order is first determined by phase: - * - * 1. Serialize Phase - * 2. Policies not in a phase - * 3. Deserialize Phase - * 4. Retry Phase - * 5. Sign Phase - * - * Within each phase, policies are executed in the order - * they were added unless they were specified to execute - * before/after other policies or after a particular phase. - * - * To determine the final order, we will walk the policy list - * in phase order multiple times until all dependencies are - * satisfied. - * - * `afterPolicies` are the set of policies that must be - * executed before a given policy. This requirement is - * considered satisfied when each of the listed policies - * have been scheduled. - * - * `beforePolicies` are the set of policies that must be - * executed after a given policy. Since this dependency - * can be expressed by converting it into a equivalent - * `afterPolicies` declarations, they are normalized - * into that form for simplicity. - * - * An `afterPhase` dependency is considered satisfied when all - * policies in that phase have scheduled. - * - */ - const result = []; - // Track all policies we know about. - const policyMap = new Map(); - function createPhase(name) { + return res; +} +/** + * Covert BlobTags to Tags type. + * + * @param tags - + */ +function toTags(tags) { + if (tags === undefined) { + return undefined; + } + const res = {}; + for (const blobTag of tags.blobTagSet) { + res[blobTag.key] = blobTag.value; + } + return res; +} +/** + * Convert BlobQueryTextConfiguration to QuerySerialization type. + * + * @param textConfiguration - + */ +function toQuerySerialization(textConfiguration) { + if (textConfiguration === undefined) { + return undefined; + } + switch (textConfiguration.kind) { + case "csv": return { - name, - policies: new Set(), - hasRun: false, - hasAfterPolicies: false, + format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator || ",", + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders || false, + }, + }, }; - } - // Track policies for each phase. - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - // a list of phases in order - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - // Small helper function to map phase name to each Phase - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } - else if (phase === "Serialize") { - return serializePhase; - } - else if (phase === "Deserialize") { - return deserializePhase; - } - else if (phase === "Sign") { - return signPhase; - } - else { - return noPhase; - } - } - // First walk each policy and create a node to track metadata. - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: new Set(), - dependants: new Set(), + case "json": + return { + format: { + type: "json", + jsonTextConfiguration: { + recordSeparator: textConfiguration.recordSeparator, + }, + }, }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); + case "arrow": + return { + format: { + type: "arrow", + arrowConfiguration: { + schema: textConfiguration.schema, + }, + }, + }; + case "parquet": + return { + format: { + type: "parquet", + }, + }; + default: + throw Error("Invalid BlobQueryTextConfiguration."); + } +} +function parseObjectReplicationRecord(objectReplicationRecord) { + if (!objectReplicationRecord) { + return undefined; + } + if ("policy-id" in objectReplicationRecord) { + // If the dictionary contains a key with policy id, we are not required to do any parsing since + // the policy id should already be stored in the ObjectReplicationDestinationPolicyId. + return undefined; + } + const orProperties = []; + for (const key in objectReplicationRecord) { + const ids = key.split("_"); + const policyPrefix = "or-"; + if (ids[0].startsWith(policyPrefix)) { + ids[0] = ids[0].substring(policyPrefix.length); } - // Now that each policy has a node, connect dependency references. - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - // Linking in both directions helps later - // when we want to notify dependants. - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - // To execute before another node, make it - // depend on the current node. - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } + const rule = { + ruleId: ids[1], + replicationStatus: objectReplicationRecord[key], + }; + const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); + if (policyIndex > -1) { + orProperties[policyIndex].rules.push(rule); } - function walkPhase(phase) { - phase.hasRun = true; - // Sets iterate in insertion order - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - // If this node is waiting on a phase to complete, - // we need to skip it for now. - // Even if the phase is empty, we should wait for it - // to be walked to avoid re-ordering policies. - continue; - } - if (node.dependsOn.size === 0) { - // If there's nothing else we're waiting for, we can - // add this policy to the result list. - result.push(node.policy); - // Notify anything that depends on this policy that - // the policy has been scheduled. - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); - } - } + else { + orProperties.push({ + policyId: ids[0], + rules: [rule], + }); } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - // if the phase isn't complete - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - // Try running noPhase to see if that unblocks this phase next tick. - // This can happen if a phase that happens before noPhase - // is waiting on a noPhase policy to complete. - walkPhase(noPhase); - } - // Don't proceed to the next phase until this phase finishes. - return; - } - if (phase.hasAfterPolicies) { - // Run any policies unblocked by this phase - walkPhase(noPhase); - } - } + } + return orProperties; +} +/** + * Attach a TokenCredential to an object. + * + * @param thing - + * @param credential - + */ +function attachCredential(thing, credential) { + thing.credential = credential; + return thing; +} +function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; +} +function BlobNameToString(name) { + if (name.encoded) { + return decodeURIComponent(name.content); + } + else { + return name.content; + } +} +function ConvertInternalResponseOfListBlobFlat(internalResponse) { + return { + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name), + }; + return blobItem; + }), + }, + }; +} +function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name), + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name), + }; + return blobItem; + }), + }, + }; +} +function* ExtractPageRangeInfoItems(getPageRangesSegment) { + let pageRange = []; + let clearRange = []; + if (getPageRangesSegment.pageRange) + pageRange = getPageRangesSegment.pageRange; + if (getPageRangesSegment.clearRange) + clearRange = getPageRangesSegment.clearRange; + let pageRangeIndex = 0; + let clearRangeIndex = 0; + while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) { + if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false, + }; + ++pageRangeIndex; } - // Iterate until we've put every node in the result list. - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - // Keep walking each phase in order until we can order every node. - walkPhases(); - // The result list *should* get at least one larger each time - // after the first full pass. - // Otherwise, we're going to loop forever. - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } + else { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true, + }; + ++clearRangeIndex; } - return result; + } + for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false, + }; + } + for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true, + }; } } /** - * Creates a totally empty pipeline. - * Useful for testing or creating a custom one. + * Escape the blobName but keep path separator ('/'). */ -function createEmptyPipeline() { - return HttpPipeline.create(); +function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); +} +/** + * A typesafe helper for ensuring that a given response object has + * the original _response attached. + * @param response - A response object from calling a client operation + * @returns The same object, but with known _response property + */ +function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); } -//# sourceMappingURL=pipeline.js.map +//# sourceMappingURL=utils.common.js.map /***/ }), -/***/ 93536: +/***/ 85157: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109076,154 +110891,199 @@ function createEmptyPipeline() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createPipelineRequest = createPipelineRequest; -const httpHeaders_js_1 = __nccwpck_require__(60118); -const core_util_1 = __nccwpck_require__(80637); -class PipelineRequestImpl { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - this.agent = options.agent; - this.tlsSettings = options.tlsSettings; - } +exports.fsCreateReadStream = exports.fsStat = void 0; +exports.streamToBuffer = streamToBuffer; +exports.streamToBuffer2 = streamToBuffer2; +exports.streamToBuffer3 = streamToBuffer3; +exports.readStreamToLocalFile = readStreamToLocalFile; +const tslib_1 = __nccwpck_require__(4351); +const node_fs_1 = tslib_1.__importDefault(__nccwpck_require__(87561)); +const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(47261)); +const constants_js_1 = __nccwpck_require__(81865); +/** + * Reads a readable stream into buffer. Fill the buffer from offset to end. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param offset - From which position in the buffer to be filled, inclusive + * @param end - To which position in the buffer to be filled, exclusive + * @param encoding - Encoding of the Readable stream + */ +async function streamToBuffer(stream, buffer, offset, end, encoding) { + let pos = 0; // Position in stream + const count = end - offset; // Total amount of data needed in stream + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { + if (pos >= count) { + clearTimeout(timeout); + resolve(); + return; + } + let chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + // How much data needed in this chunk + const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + }); + stream.on("end", () => { + clearTimeout(timeout); + if (pos < count) { + reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); + } + resolve(); + }); + stream.on("error", (msg) => { + clearTimeout(timeout); + reject(msg); + }); + }); } /** - * Creates a new pipeline request with the given options. - * This method is to allow for the easy setting of default values and not required. - * @param options - The options to create the request with. + * Reads a readable stream into buffer entirely. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param encoding - Encoding of the Readable stream + * @returns with the count of bytes read. + * @throws `RangeError` If buffer size is not big enough. */ -function createPipelineRequest(options) { - return new PipelineRequestImpl(options); +async function streamToBuffer2(stream, buffer, encoding) { + let pos = 0; // Position in stream + const bufferSize = buffer.length; + return new Promise((resolve, reject) => { + stream.on("readable", () => { + let chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + if (pos + chunk.length > bufferSize) { + reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); + return; + } + buffer.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }); + stream.on("end", () => { + resolve(pos); + }); + stream.on("error", reject); + }); } -//# sourceMappingURL=pipelineRequest.js.map +/** + * Reads a readable stream into a buffer. + * + * @param stream - A Node.js Readable stream + * @param encoding - Encoding of the Readable stream + * @returns with the count of bytes read. + */ +async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. + * + * @param rs - The read stream. + * @param file - Destination file path. + */ +async function readStreamToLocalFile(rs, file) { + return new Promise((resolve, reject) => { + const ws = node_fs_1.default.createWriteStream(file); + rs.on("error", (err) => { + reject(err); + }); + ws.on("error", (err) => { + reject(err); + }); + ws.on("close", resolve); + rs.pipe(ws); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Promisified version of fs.stat(). + */ +exports.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); +exports.fsCreateReadStream = node_fs_1.default.createReadStream; +//# sourceMappingURL=utils.js.map /***/ }), -/***/ 15093: +/***/ 58412: /***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.agentPolicyName = void 0; -exports.agentPolicy = agentPolicy; -/** - * Name of the Agent Policy - */ -exports.agentPolicyName = "agentPolicy"; +exports.AbortError = void 0; /** - * Gets a pipeline policy that sets http.agent + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` */ -function agentPolicy(agent) { - return { - name: exports.agentPolicyName, - sendRequest: async (req, next) => { - // Users may define an agent on the request, honor it over the client level one - if (!req.agent) { - req.agent = agent; - } - return next(req); - }, - }; +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } } -//# sourceMappingURL=agentPolicy.js.map +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map /***/ }), -/***/ 68152: +/***/ 1753: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.auxiliaryAuthenticationHeaderPolicyName = void 0; -exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; -const tokenCycler_js_1 = __nccwpck_require__(50601); -const log_js_1 = __nccwpck_require__(30648); -/** - * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. - */ -exports.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; -const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; -async function sendAuthorizeRequest(options) { - var _a, _b; - const { scopes, getAccessToken, request } = options; - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - }; - return (_b = (_a = (await getAccessToken(scopes, getTokenOptions))) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; -} -/** - * A policy for external tokens to `x-ms-authorization-auxiliary` header. - * This header will be used when creating a cross-tenant application we may need to handle authentication requests - * for resources that are in different tenants. - * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works - */ -function auxiliaryAuthenticationHeaderPolicy(options) { - const { credentials, scopes } = options; - const logger = options.logger || log_js_1.logger; - const tokenCyclerMap = new WeakMap(); - return { - name: exports.auxiliaryAuthenticationHeaderPolicyName, - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); - } - if (!credentials || credentials.length === 0) { - logger.info(`${exports.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); - return next(request); - } - const tokenPromises = []; - for (const credential of credentials) { - let getAccessToken = tokenCyclerMap.get(credential); - if (!getAccessToken) { - getAccessToken = (0, tokenCycler_js_1.createTokenCycler)(credential); - tokenCyclerMap.set(credential, getAccessToken); - } - tokenPromises.push(sendAuthorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger, - })); - } - const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); - if (auxiliaryTokens.length === 0) { - logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); - return next(request); - } - request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); - return next(request); - }, - }; -} -//# sourceMappingURL=auxiliaryAuthenticationHeaderPolicy.js.map +exports.AbortError = void 0; +var AbortError_js_1 = __nccwpck_require__(58412); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 11319: +/***/ 80974: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109231,283 +111091,396 @@ function auxiliaryAuthenticationHeaderPolicy(options) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.bearerTokenAuthenticationPolicyName = void 0; -exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; -exports.parseChallenges = parseChallenges; -const tokenCycler_js_1 = __nccwpck_require__(50601); -const log_js_1 = __nccwpck_require__(30648); -const restError_js_1 = __nccwpck_require__(61036); -/** - * The programmatic identifier of the bearerTokenAuthenticationPolicy. - */ -exports.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; +exports.BufferScheduler = void 0; +const events_1 = __nccwpck_require__(82361); +const PooledBuffer_js_1 = __nccwpck_require__(39474); /** - * Try to send the given request. + * This class accepts a Node.js Readable stream as input, and keeps reading data + * from the stream into the internal buffer structure, until it reaches maxBuffers. + * Every available buffer will try to trigger outgoingHandler. * - * When a response is received, returns a tuple of the response received and, if the response was received - * inside a thrown RestError, the RestError that was thrown. + * The internal buffer structure includes an incoming buffer array, and a outgoing + * buffer array. The incoming buffer array includes the "empty" buffers can be filled + * with new incoming data. The outgoing array includes the filled buffers to be + * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. * - * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it - * will be rethrown. + * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING + * + * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers + * + * PERFORMANCE IMPROVEMENT TIPS: + * 1. Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * 2. concurrency should set a smaller value than maxBuffers, which is helpful to + * reduce the possibility when a outgoing handler waits for the stream data. + * in this situation, outgoing handlers are blocked. + * Outgoing queue shouldn't be empty. */ -async function trySendRequest(request, next) { - try { - return [await next(request), undefined]; - } - catch (e) { - if ((0, restError_js_1.isRestError)(e) && e.response) { - return [e.response, e]; +class BufferScheduler { + /** + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. + */ + bufferSize; + /** + * How many buffers can be created or maintained. + */ + maxBuffers; + /** + * A Node.js Readable stream. + */ + readable; + /** + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. + */ + outgoingHandler; + /** + * An internal event emitter. + */ + emitter = new events_1.EventEmitter(); + /** + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) + */ + concurrency; + /** + * An internal offset marker to track data offset in bytes of next outgoingHandler. + */ + offset = 0; + /** + * An internal marker to track whether stream is end. + */ + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); } - else { - throw e; + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); + } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; } -} -/** - * Default authorize request handler - */ -async function defaultAuthorizeRequest(options) { - const { scopes, getAccessToken, request } = options; - // Enable CAE true by default - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - enableCae: true, - }; - const accessToken = await getAccessToken(scopes, getTokenOptions); - if (accessToken) { - options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); - } -} -/** - * We will retrieve the challenge only if the response status code was 401, - * and if the response contained the header "WWW-Authenticate" with a non-empty value. - */ -function isChallengeResponse(response) { - return response.status === 401 && response.headers.has("WWW-Authenticate"); -} -/** - * Re-authorize the request for CAE challenge. - * The response containing the challenge is `options.response`. - * If this method returns true, the underlying request will be sent once again. - */ -async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { - var _a; - const { scopes } = onChallengeOptions; - const accessToken = await onChallengeOptions.getAccessToken(scopes, { - enableCae: true, - claims: caeClaims, - }); - if (!accessToken) { - return false; - } - onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); - return true; -} -/** - * A policy that can request a token from a TokenCredential implementation and - * then apply it to the Authorization header of a request as a Bearer token. - */ -function bearerTokenAuthenticationPolicy(options) { - var _a, _b, _c; - const { credential, scopes, challengeCallbacks } = options; - const logger = options.logger || log_js_1.logger; - const callbacks = { - authorizeRequest: (_b = (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a === void 0 ? void 0 : _a.bind(challengeCallbacks)) !== null && _b !== void 0 ? _b : defaultAuthorizeRequest, - authorizeRequestOnChallenge: (_c = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c === void 0 ? void 0 : _c.bind(challengeCallbacks), - }; - // This function encapsulates the entire process of reliably retrieving the token - // The options are left out of the public API until there's demand to configure this. - // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions` - // in order to pass through the `options` object. - const getAccessToken = credential - ? (0, tokenCycler_js_1.createTokenCycler)(credential /* , options */) - : () => Promise.resolve(null); - return { - name: exports.bearerTokenAuthenticationPolicyName, - /** - * If there's no challenge parameter: - * - It will try to retrieve the token using the cache, or the credential's getToken. - * - Then it will try the next policy with or without the retrieved token. - * - * It uses the challenge parameters to: - * - Skip a first attempt to get the token from the credential if there's no cached token, - * since it expects the token to be retrievable only after the challenge. - * - Prepare the outgoing request if the `prepareRequest` method has been provided. - * - Send an initial request to receive the challenge if it fails. - * - Process a challenge if the response contains it. - * - Retrieve a token with the challenge information, then re-send the request. - */ - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); - } - await callbacks.authorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger, + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { + return new Promise((resolve, reject) => { + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } }); - let response; - let error; - let shouldSendRequest; - [response, error] = await trySendRequest(request, next); - if (isChallengeResponse(response)) { - let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); - // Handle CAE by default when receive CAE claim - if (claims) { - let parsedClaim; - // Return the response immediately if claims is not a valid base64 encoded string - try { - parsedClaim = atob(claims); - } - catch (e) { - logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); - return response; - } - shouldSendRequest = await authorizeRequestOnCaeChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - response, - request, - getAccessToken, - logger, - }, parsedClaim); - // Send updated request and handle response for RestError - if (shouldSendRequest) { - [response, error] = await trySendRequest(request, next); - } + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); + }); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); + }); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; } - else if (callbacks.authorizeRequestOnChallenge) { - // Handle custom challenges when client provides custom callback - shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger, - }); - // Send updated request and handle response for RestError - if (shouldSendRequest) { - [response, error] = await trySendRequest(request, next); + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset) + .then(resolve) + .catch(reject); } - // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this - if (isChallengeResponse(response)) { - claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); - if (claims) { - let parsedClaim; - try { - parsedClaim = atob(claims); - } - catch (e) { - logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); - return response; - } - shouldSendRequest = await authorizeRequestOnCaeChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - response, - request, - getAccessToken, - logger, - }, parsedClaim); - // Send updated request and handle response for RestError - if (shouldSendRequest) { - [response, error] = await trySendRequest(request, next); - } - } + else if (this.unresolvedLength >= this.bufferSize) { + return; + } + else { + resolve(); } } - } - if (error) { - throw error; + }); + }); + } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; + } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); + } + else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); + } + this.unresolvedLength -= buffer.size; + return buffer; + } + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); } else { - return response; + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } + else { + // No available buffer, wait for buffer returned + return false; + } } - }, - }; -} -/** - * Converts: `Bearer a="b", c="d", Pop e="f", g="h"`. - * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`. - * - * @internal - */ -function parseChallenges(challenges) { - // Challenge regex seperates the string to individual challenges with different schemes in the format `Scheme a="b", c=d` - // The challenge regex captures parameteres with either quotes values or unquoted values - const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; - // Parameter regex captures the claims group removed from the scheme in the format `a="b"` and `c="d"` - // CAE challenge always have quoted parameters. For more reference, https://learn.microsoft.com/entra/identity-platform/claims-challenge - const paramRegex = /(\w+)="([^"]*)"/g; - const parsedChallenges = []; - let match; - // Iterate over each challenge match - while ((match = challengeRegex.exec(challenges)) !== null) { - const scheme = match[1]; - const paramsString = match[2]; - const params = {}; - let paramMatch; - // Iterate over each parameter match - while ((paramMatch = paramRegex.exec(paramsString)) !== null) { - params[paramMatch[1]] = paramMatch[2]; + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); } - parsedChallenges.push({ scheme, params }); + return true; } - return parsedChallenges; -} -/** - * Parse a pipeline response and look for a CAE challenge with "Bearer" scheme - * Return the value in the header without parsing the challenge - * @internal - */ -function getCaeChallengeClaims(challenges) { - var _a; - if (!challenges) { - return; + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; + } + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); + } + } while (buffer); + } + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } + catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); + } + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } } - // Find all challenges present in the header - const parsedChallenges = parseChallenges(challenges); - return (_a = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) === null || _a === void 0 ? void 0 : _a.params.claims; } -//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map +exports.BufferScheduler = BufferScheduler; +//# sourceMappingURL=BufferScheduler.js.map /***/ }), -/***/ 57618: -/***/ ((__unused_webpack_module, exports) => { +/***/ 82202: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decompressResponsePolicyName = void 0; -exports.decompressResponsePolicy = decompressResponsePolicy; -/** - * The programmatic identifier of the decompressResponsePolicy. - */ -exports.decompressResponsePolicyName = "decompressResponsePolicy"; +exports.BuffersStream = void 0; +const node_stream_1 = __nccwpck_require__(84492); /** - * A policy to enable response decompression according to Accept-Encoding header - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + * This class generates a readable stream from the data in an array of buffers. */ -function decompressResponsePolicy() { - return { - name: exports.decompressResponsePolicyName, - async sendRequest(request, next) { - // HEAD requests have no body - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); +class BuffersStream extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + // check byteLength is no larger than buffers[] total length + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; + } + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); + } + } + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); + } + if (!size) { + size = this.readableHighWaterMark; + } + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + // The last buffer may be longer than the data it contains. + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + // chunkSize = size - i + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; } - return next(request); - }, - }; + else { + // chunkSize = remaining + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + // this.buffers[this.bufferIndex] used up, shift to next one + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; + } + else { + this.byteOffsetInCurrentBuffer = end; + } + this.pushedBytesLength += remaining; + i += remaining; + } + } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); + } + else if (outBuffers.length === 1) { + this.push(outBuffers[0]); + } + } } -//# sourceMappingURL=decompressResponsePolicy.js.map +exports.BuffersStream = BuffersStream; +//# sourceMappingURL=BuffersStream.js.map /***/ }), -/***/ 48549: +/***/ 39474: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109515,36 +111488,106 @@ function decompressResponsePolicy() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultRetryPolicyName = void 0; -exports.defaultRetryPolicy = defaultRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(843); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(66645); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); +exports.PooledBuffer = void 0; +const tslib_1 = __nccwpck_require__(4351); +const BuffersStream_js_1 = __nccwpck_require__(82202); +const node_buffer_1 = tslib_1.__importDefault(__nccwpck_require__(72254)); /** - * Name of the {@link defaultRetryPolicy} + * maxBufferLength is max size of each buffer in the pooled buffers. */ -exports.defaultRetryPolicyName = "defaultRetryPolicy"; +const maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; /** - * A policy that retries according to three strategies: - * - When the server sends a 429 response with a Retry-After header. - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + * This class provides a buffer container which conceptually has no hard size limit. + * It accepts a capacity, an array of input buffers and the total length of input data. + * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers + * into the internal "buffer" serially with respect to the total length. + * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream + * assembled from all the data in the internal "buffer". */ -function defaultRetryPolicy(options = {}) { - var _a; - return { - name: exports.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; +class PooledBuffer { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + // allocate + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + // clear copied from source buffers + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } } -//# sourceMappingURL=defaultRetryPolicy.js.map +exports.PooledBuffer = PooledBuffer; +//# sourceMappingURL=PooledBuffer.js.map /***/ }), -/***/ 1598: +/***/ 83269: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109552,32 +111595,29 @@ function defaultRetryPolicy(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.exponentialRetryPolicyName = void 0; -exports.exponentialRetryPolicy = exponentialRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(843); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); -/** - * The programmatic identifier of the exponentialRetryPolicy. - */ -exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; +exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0; +const StorageBrowserPolicy_js_1 = __nccwpck_require__(69277); +Object.defineProperty(exports, "StorageBrowserPolicy", ({ enumerable: true, get: function () { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } })); /** - * A policy that attempts to retry requests while introducing an exponentially increasing delay. - * @param options - Options that configure retry logic. + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. */ -function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }); +class StorageBrowserPolicyFactory { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } } -//# sourceMappingURL=exponentialRetryPolicy.js.map +exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; +//# sourceMappingURL=StorageBrowserPolicyFactory.js.map /***/ }), -/***/ 16501: +/***/ 26508: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109585,106 +111625,60 @@ function exponentialRetryPolicy(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.formDataPolicyName = void 0; -exports.formDataPolicy = formDataPolicy; -const core_util_1 = __nccwpck_require__(80637); -const httpHeaders_js_1 = __nccwpck_require__(60118); +exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0; +const StorageRetryPolicy_js_1 = __nccwpck_require__(1114); +Object.defineProperty(exports, "StorageRetryPolicy", ({ enumerable: true, get: function () { return StorageRetryPolicy_js_1.StorageRetryPolicy; } })); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(21483); +Object.defineProperty(exports, "StorageRetryPolicyType", ({ enumerable: true, get: function () { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } })); /** - * The programmatic identifier of the formDataPolicy. + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. */ -exports.formDataPolicyName = "formDataPolicy"; -function formDataToFormDataMap(formData) { - var _a; - const formDataMap = {}; - for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : (formDataMap[key] = []); - formDataMap[key].push(value); +class StorageRetryPolicyFactory { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; } - return formDataMap; -} -/** - * A policy that encodes FormData on the request into the body. - */ -function formDataPolicy() { - return { - name: exports.formDataPolicyName, - async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { - request.formData = formDataToFormDataMap(request.body); - request.body = undefined; - } - if (request.formData) { - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { - request.body = wwwFormUrlEncode(request.formData); - } - else { - await prepareFormData(request.formData, request); - } - request.formData = undefined; - } - return next(request); - }, - }; -} -function wwwFormUrlEncode(formData) { - const urlSearchParams = new URLSearchParams(); - for (const [key, value] of Object.entries(formData)) { - if (Array.isArray(value)) { - for (const subValue of value) { - urlSearchParams.append(key, subValue.toString()); - } - } - else { - urlSearchParams.append(key, value.toString()); - } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); } - return urlSearchParams.toString(); } -async function prepareFormData(formData, request) { - // validate content type (multipart/form-data) - const contentType = request.headers.get("Content-Type"); - if (contentType && !contentType.startsWith("multipart/form-data")) { - // content type is specified and is not multipart/form-data. Exit. - return; - } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); - // set body to MultipartRequestBody using content from FormDataMap - const parts = []; - for (const [fieldName, values] of Object.entries(formData)) { - for (const value of Array.isArray(values) ? values : [values]) { - if (typeof value === "string") { - parts.push({ - headers: (0, httpHeaders_js_1.createHttpHeaders)({ - "Content-Disposition": `form-data; name="${fieldName}"`, - }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8"), - }); - } - else if (value === undefined || value === null || typeof value !== "object") { - throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); - } - else { - // using || instead of ?? here since if value.name is empty we should create a file name - const fileName = value.name || "blob"; - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); - // again, || is used since an empty value.type means the content type is unset - headers.set("Content-Type", value.type || "application/octet-stream"); - parts.push({ - headers, - body: value, - }); - } - } +exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; +//# sourceMappingURL=StorageRetryPolicyFactory.js.map + +/***/ }), + +/***/ 92599: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +let _defaultHttpClient; +function getCachedDefaultHttpClient() { + if (!_defaultHttpClient) { + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } - request.multipartBody = { parts }; + return _defaultHttpClient; } -//# sourceMappingURL=formDataPolicy.js.map +//# sourceMappingURL=cache.js.map /***/ }), -/***/ 46821: +/***/ 17662: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109692,44 +111686,61 @@ async function prepareFormData(formData, request) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logPolicyName = void 0; -exports.logPolicy = logPolicy; -const log_js_1 = __nccwpck_require__(30648); -const sanitizer_js_1 = __nccwpck_require__(34472); +exports.AnonymousCredential = void 0; +const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(85969); +const Credential_js_1 = __nccwpck_require__(34936); /** - * The programmatic identifier of the logPolicy. + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). */ -exports.logPolicyName = "logPolicy"; +class AnonymousCredential extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } +} +exports.AnonymousCredential = AnonymousCredential; +//# sourceMappingURL=AnonymousCredential.js.map + +/***/ }), + +/***/ 34936: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Credential = void 0; /** - * A policy that logs all requests and responses. - * @param options - Options to configure logPolicy. + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. */ -function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, - }); - return { - name: exports.logPolicyName, - async sendRequest(request, next) { - if (!logger.enabled) { - return next(request); - } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; - }, - }; +class Credential { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); + } } -//# sourceMappingURL=logPolicy.js.map +exports.Credential = Credential; +//# sourceMappingURL=Credential.js.map /***/ }), -/***/ 19042: +/***/ 92782: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109737,157 +111748,143 @@ function logPolicy(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.multipartPolicyName = void 0; -exports.multipartPolicy = multipartPolicy; -const core_util_1 = __nccwpck_require__(80637); -const concat_js_1 = __nccwpck_require__(80107); -const typeGuards_js_1 = __nccwpck_require__(58520); -function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; -} -function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r\n`; - } - return result; -} -function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } - else if ((0, typeGuards_js_1.isBlob)(source)) { - // if was created using createFile then -1 means we have an unknown size - return source.size === -1 ? undefined : source.size; - } - else { - return undefined; - } -} -function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === undefined) { - return undefined; - } - else { - total += partLength; - } - } - return total; -} -async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r\n--${boundary}`, "utf-8"), - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8"), - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); -} +exports.StorageSharedKeyCredential = void 0; +const node_crypto_1 = __nccwpck_require__(6005); +const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(40755); +const Credential_js_1 = __nccwpck_require__(34936); /** - * Name of multipart policy + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. */ -exports.multipartPolicyName = "multipartPolicy"; -const maxBoundaryLength = 70; -const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); -function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); +class StorageSharedKeyCredential extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); } } -/** - * Pipeline policy for multipart requests - */ -function multipartPolicy() { - return { - name: exports.multipartPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary); - if (boundary) { - assertValidBoundary(boundary); - } - else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = undefined; - return next(request); - }, - }; -} -//# sourceMappingURL=multipartPolicy.js.map +exports.StorageSharedKeyCredential = StorageSharedKeyCredential; +//# sourceMappingURL=StorageSharedKeyCredential.js.map /***/ }), -/***/ 82032: -/***/ ((__unused_webpack_module, exports) => { +/***/ 83667: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ndJsonPolicyName = void 0; -exports.ndJsonPolicy = ndJsonPolicy; +exports.BaseRequestPolicy = exports.getCachedDefaultHttpClient = void 0; +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(80974), exports); +var cache_js_1 = __nccwpck_require__(92599); +Object.defineProperty(exports, "getCachedDefaultHttpClient", ({ enumerable: true, get: function () { return cache_js_1.getCachedDefaultHttpClient; } })); +tslib_1.__exportStar(__nccwpck_require__(83269), exports); +tslib_1.__exportStar(__nccwpck_require__(17662), exports); +tslib_1.__exportStar(__nccwpck_require__(34936), exports); +tslib_1.__exportStar(__nccwpck_require__(92782), exports); +tslib_1.__exportStar(__nccwpck_require__(26508), exports); +var RequestPolicy_js_1 = __nccwpck_require__(76584); +Object.defineProperty(exports, "BaseRequestPolicy", ({ enumerable: true, get: function () { return RequestPolicy_js_1.BaseRequestPolicy; } })); +tslib_1.__exportStar(__nccwpck_require__(85969), exports); +tslib_1.__exportStar(__nccwpck_require__(13615), exports); +tslib_1.__exportStar(__nccwpck_require__(69277), exports); +tslib_1.__exportStar(__nccwpck_require__(89782), exports); +tslib_1.__exportStar(__nccwpck_require__(37740), exports); +tslib_1.__exportStar(__nccwpck_require__(21483), exports); +tslib_1.__exportStar(__nccwpck_require__(1114), exports); +tslib_1.__exportStar(__nccwpck_require__(3353), exports); +tslib_1.__exportStar(__nccwpck_require__(40755), exports); +tslib_1.__exportStar(__nccwpck_require__(89020), exports); +tslib_1.__exportStar(__nccwpck_require__(26508), exports); +tslib_1.__exportStar(__nccwpck_require__(72426), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 89818: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); /** - * The programmatic identifier of the ndJsonPolicy. + * The `@azure/logger` configuration for this package. */ -exports.ndJsonPolicyName = "ndJsonPolicy"; +exports.logger = (0, logger_1.createClientLogger)("storage-common"); +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 85969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AnonymousCredentialPolicy = void 0; +const CredentialPolicy_js_1 = __nccwpck_require__(13615); /** - * ndJsonPolicy is a policy used to control keep alive settings for every request. + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). */ -function ndJsonPolicy() { - return { - name: exports.ndJsonPolicyName, - async sendRequest(request, next) { - // There currently isn't a good way to bypass the serializer - if (typeof request.body === "string" && request.body.startsWith("[")) { - const body = JSON.parse(request.body); - if (Array.isArray(body)) { - request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); - } - } - return next(request); - }, - }; +class AnonymousCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } } -//# sourceMappingURL=ndJsonPolicy.js.map +exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; +//# sourceMappingURL=AnonymousCredentialPolicy.js.map /***/ }), -/***/ 94761: +/***/ 13615: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -109895,266 +111892,192 @@ function ndJsonPolicy() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalNoProxyList = exports.proxyPolicyName = void 0; -exports.loadNoProxy = loadNoProxy; -exports.getDefaultProxySettings = getDefaultProxySettings; -exports.proxyPolicy = proxyPolicy; -const https_proxy_agent_1 = __nccwpck_require__(77219); -const http_proxy_agent_1 = __nccwpck_require__(4654); -const log_js_1 = __nccwpck_require__(30648); -const HTTPS_PROXY = "HTTPS_PROXY"; -const HTTP_PROXY = "HTTP_PROXY"; -const ALL_PROXY = "ALL_PROXY"; -const NO_PROXY = "NO_PROXY"; -/** - * The programmatic identifier of the proxyPolicy. - */ -exports.proxyPolicyName = "proxyPolicy"; +exports.CredentialPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(76584); /** - * Stores the patterns specified in NO_PROXY environment variable. - * @internal + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. */ -exports.globalNoProxyList = []; -let noProxyListLoaded = false; -/** A cache of whether a host should bypass the proxy. */ -const globalBypassedMap = new Map(); -function getEnvironmentValue(name) { - if (process.env[name]) { - return process.env[name]; - } - else if (process.env[name.toLowerCase()]) { - return process.env[name.toLowerCase()]; +class CredentialPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); } - return undefined; -} -function loadEnvironmentProxyValue() { - if (!process) { - return undefined; + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + // Child classes must override this method with request signing. This method + // will be executed in sendRequest(). + return request; } - const httpsProxy = getEnvironmentValue(HTTPS_PROXY); - const allProxy = getEnvironmentValue(ALL_PROXY); - const httpProxy = getEnvironmentValue(HTTP_PROXY); - return httpsProxy || allProxy || httpProxy; } +exports.CredentialPolicy = CredentialPolicy; +//# sourceMappingURL=CredentialPolicy.js.map + +/***/ }), + +/***/ 76584: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BaseRequestPolicy = void 0; /** - * Check whether the host of a given `uri` matches any pattern in the no proxy list. - * If there's a match, any request sent to the same host shouldn't have the proxy settings set. - * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 + * The base class from which all request policies derive. */ -function isBypassed(uri, noProxyList, bypassedMap) { - if (noProxyList.length === 0) { - return false; - } - const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { - return bypassedMap.get(host); - } - let isBypassedFlag = false; - for (const pattern of noProxyList) { - if (pattern[0] === ".") { - // This should match either domain it self or any subdomain or host - // .foo.com will match foo.com it self or *.foo.com - if (host.endsWith(pattern)) { - isBypassedFlag = true; - } - else { - if (host.length === pattern.length - 1 && host === pattern.slice(1)) { - isBypassedFlag = true; - } - } - } - else { - if (host === pattern) { - isBypassedFlag = true; - } - } +class BaseRequestPolicy { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor( + /** + * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline. + */ + _nextPolicy, + /** + * The options that can be passed to a given request policy. + */ + _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); - return isBypassedFlag; -} -function loadNoProxy() { - const noProxy = getEnvironmentValue(NO_PROXY); - noProxyListLoaded = true; - if (noProxy) { - return noProxy - .split(",") - .map((item) => item.trim()) - .filter((item) => item.length); + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); } - return []; -} -/** - * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. - * If no argument is given, it attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - * @param proxyUrl - The url of the proxy to use. May contain authentication information. - * @deprecated - Internally this method is no longer necessary when setting proxy information. - */ -function getDefaultProxySettings(proxyUrl) { - if (!proxyUrl) { - proxyUrl = loadEnvironmentProxyValue(); - if (!proxyUrl) { - return undefined; - } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); } - const parsedUrl = new URL(proxyUrl); - const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; - return { - host: schema + parsedUrl.hostname, - port: Number.parseInt(parsedUrl.port || "80"), - username: parsedUrl.username, - password: parsedUrl.password, - }; } +exports.BaseRequestPolicy = BaseRequestPolicy; +//# sourceMappingURL=RequestPolicy.js.map + +/***/ }), + +/***/ 69277: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageBrowserPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(76584); +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); /** - * This method attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning */ -function getDefaultProxySettingsInternal() { - const envProxy = loadEnvironmentProxyValue(); - return envProxy ? new URL(envProxy) : undefined; -} -function getUrlFromProxySettings(settings) { - let parsedProxyUrl; - try { - parsedProxyUrl = new URL(settings.host); - } - catch (_a) { - throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); - } - parsedProxyUrl.port = String(settings.port); - if (settings.username) { - parsedProxyUrl.username = settings.username; - } - if (settings.password) { - parsedProxyUrl.password = settings.password; - } - return parsedProxyUrl; -} -function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { - // Custom Agent should take precedence so if one is present - // we should skip to avoid overwriting it. - if (request.agent) { - return; - } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (request.tlsSettings) { - log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); +class StorageBrowserPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); } - const headers = request.headers.toJSON(); - if (isInsecure) { - if (!cachedAgents.httpProxyAgent) { - cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); } - request.agent = cachedAgents.httpProxyAgent; - } - else { - if (!cachedAgents.httpsProxyAgent) { - cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); } - request.agent = cachedAgents.httpsProxyAgent; - } -} -/** - * A policy that allows one to apply proxy settings to all requests. - * If not passed static settings, they will be retrieved from the HTTPS_PROXY - * or HTTP_PROXY environment variables. - * @param proxySettings - ProxySettings to use on each request. - * @param options - additional settings, for example, custom NO_PROXY patterns - */ -function proxyPolicy(proxySettings, options) { - if (!noProxyListLoaded) { - exports.globalNoProxyList.push(...loadNoProxy()); + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); } - const defaultProxy = proxySettings - ? getUrlFromProxySettings(proxySettings) - : getDefaultProxySettingsInternal(); - const cachedAgents = {}; - return { - name: exports.proxyPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.proxySettings && - defaultProxy && - !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) { - setProxyAgentOnRequest(request, cachedAgents, defaultProxy); - } - else if (request.proxySettings) { - setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); - } - return next(request); - }, - }; } -//# sourceMappingURL=proxyPolicy.js.map +exports.StorageBrowserPolicy = StorageBrowserPolicy; +//# sourceMappingURL=StorageBrowserPolicy.js.map /***/ }), -/***/ 98526: -/***/ ((__unused_webpack_module, exports) => { +/***/ 89782: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.redirectPolicyName = void 0; -exports.redirectPolicy = redirectPolicy; -/** - * The programmatic identifier of the redirectPolicy. - */ -exports.redirectPolicyName = "redirectPolicy"; +exports.storageBrowserPolicyName = void 0; +exports.storageBrowserPolicy = storageBrowserPolicy; +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); /** - * Methods that are allowed to follow redirects 301 and 302 + * The programmatic identifier of the StorageBrowserPolicy. */ -const allowedRedirect = ["GET", "HEAD"]; +exports.storageBrowserPolicyName = "storageBrowserPolicy"; /** - * A policy to follow Location headers from the server in order - * to support server-side redirection. - * In the browser, this policy is not used. - * @param options - Options to control policy behavior. + * storageBrowserPolicy is a policy used to prevent browsers from caching requests + * and to remove cookies and explicit content-length headers. */ -function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; +function storageBrowserPolicy() { return { - name: exports.redirectPolicyName, + name: exports.storageBrowserPolicyName, async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); }, }; } -async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - const { request, status, headers } = response; - const locationHeader = headers.get("location"); - if (locationHeader && - (status === 300 || - (status === 301 && allowedRedirect.includes(request.method)) || - (status === 302 && allowedRedirect.includes(request.method)) || - (status === 303 && request.method === "POST") || - status === 307) && - currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); - // POST request with Status code 303 should be converted into a - // redirected GET request if the redirect url is present in the location header - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; -} -//# sourceMappingURL=redirectPolicy.js.map +//# sourceMappingURL=StorageBrowserPolicyV2.js.map /***/ }), -/***/ 39700: +/***/ 37740: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -110162,114 +112085,37 @@ async function handleRedirect(next, response, maxRetries, currentRetries = 0) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryPolicy = retryPolicy; -const helpers_js_1 = __nccwpck_require__(21333); -const logger_1 = __nccwpck_require__(89497); -const abort_controller_1 = __nccwpck_require__(11514); -const constants_js_1 = __nccwpck_require__(43171); -const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); +exports.storageCorrectContentLengthPolicyName = void 0; +exports.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; +const constants_js_1 = __nccwpck_require__(77807); /** - * The programmatic identifier of the retryPolicy. + * The programmatic identifier of the storageCorrectContentLengthPolicy. */ -const retryPolicyName = "retryPolicy"; +exports.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; /** - * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. */ -function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; +function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } return { - name: retryPolicyName, + name: exports.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { - var _a, _b; - let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; - response = undefined; - responseError = undefined; - try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); - response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); - } - catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - // RestErrors are valid targets for the retry strategies. - // If none of the retry strategies can work with them, they will be thrown later in this policy. - // If the received error is not a RestError, it is immediately thrown. - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } - else if (response) { - return response; - } - else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError, - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; - } - } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } - // If all the retries skip and there's no response, - // we're still in the retry loop, so a new request will be sent - // until `maxRetries` is reached. - } + correctContentLength(request); + return next(request); }, }; } -//# sourceMappingURL=retryPolicy.js.map +//# sourceMappingURL=StorageCorrectContentLengthPolicy.js.map /***/ }), -/***/ 93860: +/***/ 72426: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -110277,34 +112123,44 @@ function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.setClientRequestIdPolicyName = void 0; -exports.setClientRequestIdPolicy = setClientRequestIdPolicy; +exports.storageRequestFailureDetailsParserPolicyName = void 0; +exports.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; /** - * The programmatic identifier of the setClientRequestIdPolicy. + * The programmatic identifier of the StorageRequestFailureDetailsParserPolicy. */ -exports.setClientRequestIdPolicyName = "setClientRequestIdPolicy"; +exports.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; /** - * Each PipelineRequest gets a unique id upon creation. - * This policy passes that unique id along via an HTTP header to enable better - * telemetry and tracing. - * @param requestIdHeaderName - The name of the header to pass the request ID to. + * StorageRequestFailureDetailsParserPolicy */ -function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { +function storageRequestFailureDetailsParserPolicy() { return { - name: exports.setClientRequestIdPolicyName, + name: exports.storageRequestFailureDetailsParserPolicyName, async sendRequest(request, next) { - if (!request.headers.has(requestIdHeaderName)) { - request.headers.set(requestIdHeaderName, request.requestId); + try { + const response = await next(request); + return response; + } + catch (err) { + if (typeof err === "object" && + err !== null && + err.response && + err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && + err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = + "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } + } + throw err; } - return next(request); }, }; } -//# sourceMappingURL=setClientRequestIdPolicy.js.map +//# sourceMappingURL=StorageRequestFailureDetailsParserPolicy.js.map /***/ }), -/***/ 72470: +/***/ 1114: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -110312,110 +112168,432 @@ function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id" // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.systemErrorRetryPolicyName = void 0; -exports.systemErrorRetryPolicy = systemErrorRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(843); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); -/** - * Name of the {@link systemErrorRetryPolicy} - */ -exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; +exports.StorageRetryPolicy = void 0; +exports.NewRetryPolicyFactory = NewRetryPolicyFactory; +const abort_controller_1 = __nccwpck_require__(31514); +const RequestPolicy_js_1 = __nccwpck_require__(76584); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const log_js_1 = __nccwpck_require__(89818); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(21483); /** - * A retry policy that specifically seeks to handle errors in the - * underlying transport layer (e.g. DNS lookup failures) rather than - * retryable error codes from the server itself. - * @param options - Options that customize the policy. + * A factory method used to generated a RetryPolicy factory. + * + * @param retryOptions - */ -function systemErrorRetryPolicy(options = {}) { - var _a; +function NewRetryPolicyFactory(retryOptions) { return { - name: exports.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + }, }; } -//# sourceMappingURL=systemErrorRetryPolicy.js.map +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy +}; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); +/** + * Retry policy with exponential retry and linear retry implemented. + */ +class StorageRetryPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + // Initialize retry options + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType + ? retryOptions.retryPolicyType + : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 + ? Math.floor(retryOptions.maxTries) + : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 + ? retryOptions.tryTimeoutInMs + : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 + ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) + : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost + ? retryOptions.secondaryHost + : DEFAULT_RETRY_OPTIONS.secondaryHost, + }; + } + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); + } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || + !this.retryOptions.secondaryHost || + !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || + attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + // Set the server-side timeout query parameter "timeout=[seconds]" + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; + } + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); + } + catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions + .maxTries}, no further try.`); + return false; + } + // Handle network failures, you may need to customize the list when you implement + // your own http client + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || + err.message.toUpperCase().includes(retriableError) || + (err.code && err.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + } + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + return false; + } + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } + } + else { + delayTimeInMs = Math.random() * 1000; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); + } +} +exports.StorageRetryPolicy = StorageRetryPolicy; +//# sourceMappingURL=StorageRetryPolicy.js.map /***/ }), -/***/ 54802: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 21483: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.throttlingRetryPolicyName = void 0; -exports.throttlingRetryPolicy = throttlingRetryPolicy; -const throttlingRetryStrategy_js_1 = __nccwpck_require__(66645); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); -/** - * Name of the {@link throttlingRetryPolicy} - */ -exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; +exports.StorageRetryPolicyType = void 0; /** - * A policy that retries when the server sends a 429 response with a Retry-After header. - * - * To learn more, please refer to - * https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors - * - * @param options - Options that configure retry logic. + * RetryPolicy types. */ -function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; -} -//# sourceMappingURL=throttlingRetryPolicy.js.map +var StorageRetryPolicyType; +(function (StorageRetryPolicyType) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; +})(StorageRetryPolicyType || (exports.StorageRetryPolicyType = StorageRetryPolicyType = {})); +//# sourceMappingURL=StorageRetryPolicyType.js.map /***/ }), -/***/ 88446: -/***/ ((__unused_webpack_module, exports) => { +/***/ 3353: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.tlsPolicyName = void 0; -exports.tlsPolicy = tlsPolicy; +exports.storageRetryPolicyName = void 0; +exports.storageRetryPolicy = storageRetryPolicy; +const abort_controller_1 = __nccwpck_require__(31514); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(26508); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const log_js_1 = __nccwpck_require__(89818); /** - * Name of the TLS Policy + * Name of the {@link storageRetryPolicy} */ -exports.tlsPolicyName = "tlsPolicy"; +exports.storageRetryPolicyName = "storageRetryPolicy"; +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy +}; +const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", +]; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); /** - * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. + * Retry policy with exponential retry and linear retry implemented. */ -function tlsPolicy(tlsSettings) { +function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error, }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error) { + for (const retriableError of retriableErrors) { + if (error.name.toUpperCase().includes(retriableError) || + error.message.toUpperCase().includes(retriableError) || + (error.code && error.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error?.code === "PARSE_ERROR" && + error?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || error) { + const statusCode = response?.status ?? error?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } + else { + delayTimeInMs = Math.random() * 1000; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } return { - name: exports.tlsPolicyName, - sendRequest: async (req, next) => { - // Users may define a request tlsSettings, honor those over the client level one - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; + name: exports.storageRetryPolicyName, + async sendRequest(request, next) { + // Set the server-side timeout query parameter "timeout=[seconds]" + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : undefined; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || + !secondaryUrl || + !["GET", "HEAD", "OPTIONS"].includes(request.method) || + attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = undefined; + error = undefined; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); + } + catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error = e; + } + else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } + } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; } - return next(req); + if (response) { + return response; + } + throw error ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); }, }; } -//# sourceMappingURL=tlsPolicy.js.map +//# sourceMappingURL=StorageRetryPolicyV2.js.map /***/ }), -/***/ 80606: +/***/ 40755: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -110423,142 +112601,155 @@ function tlsPolicy(tlsSettings) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.tracingPolicyName = void 0; -exports.tracingPolicy = tracingPolicy; -const core_tracing_1 = __nccwpck_require__(19363); -const constants_js_1 = __nccwpck_require__(43171); -const userAgent_js_1 = __nccwpck_require__(96158); -const log_js_1 = __nccwpck_require__(30648); -const core_util_1 = __nccwpck_require__(80637); -const restError_js_1 = __nccwpck_require__(61036); -const sanitizer_js_1 = __nccwpck_require__(34472); -/** - * The programmatic identifier of the tracingPolicy. - */ -exports.tracingPolicyName = "tracingPolicy"; +exports.StorageSharedKeyCredentialPolicy = void 0; +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const CredentialPolicy_js_1 = __nccwpck_require__(13615); +const SharedKeyComparator_js_1 = __nccwpck_require__(4482); /** - * A simple policy to create OpenTelemetry Spans for each request made by the pipeline - * that has SpanOptions with a parent. - * Requests made without a parent Span will not be recorded. - * @param options - Options to configure the telemetry logged by the tracing policy. + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. */ -function tracingPolicy(options = {}) { - const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, - }); - const tracingClient = tryCreateTracingClient(); - return { - name: exports.tracingPolicyName, - async sendRequest(request, next) { - var _a; - if (!tracingClient) { - return next(request); - } - const userAgent = await userAgentPromise; - const spanAttributes = { - "http.url": sanitizer.sanitizeUrl(request.url), - "http.method": request.method, - "http.user_agent": userAgent, - requestId: request.requestId, - }; - if (userAgent) { - spanAttributes["http.user_agent"] = userAgent; - } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; - if (!span || !tracingContext) { - return next(request); - } - try { - const response = await tracingClient.withContext(tracingContext, next, request); - tryProcessResponse(span, response); - return response; - } - catch (err) { - tryProcessError(span, err); - throw err; - } - }, - }; -} -function tryCreateTracingClient() { - try { - return (0, core_tracing_1.createTracingClient)({ - namespace: "", - packageName: "@azure/core-rest-pipeline", - packageVersion: constants_js_1.SDK_VERSION, - }); +class StorageSharedKeyCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; } - catch (e) { - log_js_1.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1.getErrorMessage)(e)}`); - return undefined; + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || request.body !== undefined) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + this.getCanonicalizedHeadersString(request) + + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + return request; } -} -function tryCreateSpan(tracingClient, request, spanAttributes) { - try { - // As per spec, we do not need to differentiate between HTTP and HTTPS in span name. - const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { - spanKind: "client", - spanAttributes, - }); - // If the span is not recording, don't do any more work. - if (!span.isRecording()) { - span.end(); - return undefined; + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; } - // set headers - const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); - for (const [key, value] of Object.entries(headers)) { - request.headers.set(key, value); + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; } - return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; - } - catch (e) { - log_js_1.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); - return undefined; + return value; } -} -function tryProcessError(span, error) { - try { - span.setStatus({ - status: "error", - error: (0, core_util_1.isError)(error) ? error : undefined, + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); }); - if ((0, restError_js_1.isRestError)(error) && error.statusCode) { - span.setAttribute("http.status_code", error.statusCode); - } - span.end(); - } - catch (e) { - log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; } -} -function tryProcessResponse(span, response) { - try { - span.setAttribute("http.status_code", response.status); - const serviceRequestId = response.headers.get("x-ms-request-id"); - if (serviceRequestId) { - span.setAttribute("serviceRequestId", serviceRequestId); - } - // Per semantic conventions, only set the status to error if the status code is 4xx or 5xx. - // Otherwise, the status MUST remain unset. - // https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status - if (response.status >= 400) { - span.setStatus({ - status: "error", - }); + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } } - span.end(); - } - catch (e) { - log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + return canonicalizedResourceString; } } -//# sourceMappingURL=tracingPolicy.js.map +exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; +//# sourceMappingURL=StorageSharedKeyCredentialPolicy.js.map /***/ }), -/***/ 88935: +/***/ 89020: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -110566,102 +112757,299 @@ function tryProcessResponse(span, response) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.userAgentPolicyName = void 0; -exports.userAgentPolicy = userAgentPolicy; -const userAgent_js_1 = __nccwpck_require__(96158); -const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); +exports.storageSharedKeyCredentialPolicyName = void 0; +exports.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; +const node_crypto_1 = __nccwpck_require__(6005); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const SharedKeyComparator_js_1 = __nccwpck_require__(4482); /** - * The programmatic identifier of the userAgentPolicy. + * The programmatic identifier of the storageSharedKeyCredentialPolicy. */ -exports.userAgentPolicyName = "userAgentPolicy"; +exports.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; /** - * A policy that sets the User-Agent header (or equivalent) to reflect - * the library version. - * @param options - Options to customize the user agent value. + * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. */ -function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); +function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + getCanonicalizedHeadersString(request) + + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey) + .update(stringToSign, "utf8") + .digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + */ + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + */ + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } return { - name: exports.userAgentPolicyName, + name: exports.storageSharedKeyCredentialPolicyName, async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } + signRequest(request); return next(request); }, }; } -//# sourceMappingURL=userAgentPolicy.js.map +//# sourceMappingURL=StorageSharedKeyCredentialPolicyV2.js.map /***/ }), -/***/ 61036: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 4482: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RestError = void 0; -exports.isRestError = isRestError; -const core_util_1 = __nccwpck_require__(80637); -const inspect_js_1 = __nccwpck_require__(33106); -const sanitizer_js_1 = __nccwpck_require__(34472); -const errorSanitizer = new sanitizer_js_1.Sanitizer(); -/** - * A custom error type for failed pipeline requests. +exports.compareHeader = compareHeader; +/* + * We need to imitate .Net culture-aware sorting, which is used in storage service. + * Below tables contain sort-keys for en-US culture. */ -class RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - // The request and response may contain sensitive information in the headers or body. - // To help prevent this sensitive information being accidentally logged, the request and response - // properties are marked as non-enumerable here. This prevents them showing up in the output of - // JSON.stringify and console.log. - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, RestError.prototype); - } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - // Extract non-enumerable properties and add them back. This is OK since in this output the request and - // response get sanitized. - return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; - } +const table_lv0 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721, + 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e, + 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a, + 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89, + 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748, + 0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, + 0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c, + 0x0, 0x750, 0x0, +]); +const table_lv2 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +const table_lv4 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; } -exports.RestError = RestError; -/** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. - */ -RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; -/** - * This means that parsing the response from the server failed. - * It may have been malformed. - */ -RestError.PARSE_ERROR = "PARSE_ERROR"; -/** - * Typeguard for RestError - * @param e - Something caught by a catch clause. - */ -function isRestError(e) { - if (e instanceof RestError) { - return true; +function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1; + if (weight1 === 0x1 && weight2 === 0x1) { + i = 0; + j = 0; + ++curr_level; + } + else if (weight1 === weight2) { + ++i; + ++j; + } + else if (weight1 === 0) { + ++i; + } + else if (weight2 === 0) { + ++j; + } + else { + return weight1 < weight2; + } } - return (0, core_util_1.isError)(e) && e.name === "RestError"; + return false; } -//# sourceMappingURL=restError.js.map +//# sourceMappingURL=SharedKeyComparator.js.map + +/***/ }), + +/***/ 77807: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PathStylePorts = exports.DevelopmentConnectionString = exports.HeaderConstants = exports.URLConstants = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "1.0.0"; +exports.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout", + }, +}; +exports.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code", +}; +exports.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; +/// List of ports used for path style addressing. +/// Path style addressing means that storage account is put in URI's Path segment in instead of in host. +exports.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104", +]; +//# sourceMappingURL=constants.js.map /***/ }), -/***/ 843: +/***/ 61876: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -110669,888 +113057,579 @@ function isRestError(e) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.exponentialRetryStrategy = exponentialRetryStrategy; -exports.isExponentialRetryResponse = isExponentialRetryResponse; -exports.isSystemError = isSystemError; +exports.escapeURLPath = escapeURLPath; +exports.getValueInConnString = getValueInConnString; +exports.extractConnectionStringParts = extractConnectionStringParts; +exports.appendToURLPath = appendToURLPath; +exports.setURLParameter = setURLParameter; +exports.getURLParameter = getURLParameter; +exports.setURLHost = setURLHost; +exports.getURLPath = getURLPath; +exports.getURLScheme = getURLScheme; +exports.getURLPathAndQuery = getURLPathAndQuery; +exports.getURLQueries = getURLQueries; +exports.appendToURLQuery = appendToURLQuery; +exports.truncatedISO8061Date = truncatedISO8061Date; +exports.base64encode = base64encode; +exports.base64decode = base64decode; +exports.generateBlockID = generateBlockID; +exports.delay = delay; +exports.padStart = padStart; +exports.sanitizeURL = sanitizeURL; +exports.sanitizeHeaders = sanitizeHeaders; +exports.iEqual = iEqual; +exports.getAccountNameFromUrl = getAccountNameFromUrl; +exports.isIpEndpointStyle = isIpEndpointStyle; +exports.attachCredential = attachCredential; +exports.httpAuthorizationToString = httpAuthorizationToString; +exports.EscapePath = EscapePath; +exports.assertResponse = assertResponse; +const core_rest_pipeline_1 = __nccwpck_require__(29146); const core_util_1 = __nccwpck_require__(80637); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(66645); -// intervals are in milliseconds -const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; -const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; +const constants_js_1 = __nccwpck_require__(77807); /** - * A retry strategy that retries with an exponentially increasing delay in these two cases: - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @param url - */ -function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; +function escapeURLPath(url) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path || "/"; + path = escape(path); + urlParsed.pathname = path; + return urlParsed.toString(); +} +function getProxyUriFromDevConnString(connectionString) { + // Development Connection String + // https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; } - return (0, core_util_1.calculateRetryDelay)(retryCount, { - retryDelayInMs: retryInterval, - maxRetryDelayInMs: maxRetryInterval, - }); - }, - }; + } + } + return proxyUri; } -/** - * A response is a retry response if it has status codes: - * - 408, or - * - Greater or equal than 500, except for 501 and 505. - */ -function isExponentialRetryResponse(response) { - return Boolean(response && - response.status !== undefined && - (response.status >= 500 || response.status === 408) && - response.status !== 501 && - response.status !== 505); +function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; } /** - * Determines whether an error from a pipeline response was triggered in the network layer. + * Extracts the parts of an Azure Storage account connection string. + * + * @param connectionString - Connection string. + * @returns String key value pairs of the storage account's url and credentials. */ -function isSystemError(err) { - if (!err) { - return false; +function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + // Development connection string + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + // Matching BlobEndpoint in the Account connection string + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + // Slicing off '/' at the end if exists + // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && + connectionString.search("AccountKey=") !== -1) { + // Account connection string + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + // Get account name and key + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + // BlobEndpoint is not present in the Account connection string + // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } + else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri, + }; + } + else { + // SAS connection string + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + // if accountName is empty, try to read it from BlobEndpoint + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } + else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + // client constructors assume accountSas does *not* start with ? + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } - return (err.code === "ETIMEDOUT" || - err.code === "ESOCKETTIMEDOUT" || - err.code === "ECONNREFUSED" || - err.code === "ECONNRESET" || - err.code === "ENOENT" || - err.code === "ENOTFOUND"); } -//# sourceMappingURL=exponentialRetryStrategy.js.map - -/***/ }), - -/***/ 66645: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isThrottlingRetryResponse = isThrottlingRetryResponse; -exports.throttlingRetryStrategy = throttlingRetryStrategy; -const helpers_js_1 = __nccwpck_require__(21333); /** - * The header that comes back from Azure services representing - * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. + * + * @param text - */ -const RetryAfterHeader = "Retry-After"; +function escape(text) { + return encodeURIComponent(text) + .replace(/%2F/g, "/") // Don't escape for "/" + .replace(/'/g, "%27") // Escape for "'" + .replace(/\+/g, "%20") + .replace(/%25/g, "%"); // Revert encoded "%" +} /** - * The headers that come back from Azure services representing - * the amount of time (minimum) to wait to retry. + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". * - * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds - * "Retry-After" : seconds or timestamp + * @param url - Source URL string + * @param name - String to be appended to URL + * @returns An updated URL string */ -const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; +function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name; + urlParsed.pathname = path; + return urlParsed.toString(); +} /** - * A response is a throttling retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. - * - * Returns the `retryAfterInMs` value if the response is a throttling retry response. - * If not throttling retry response, returns `undefined`. + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. * - * @internal + * @param url - Source URL string + * @param name - Parameter name + * @param value - Parameter value + * @returns An updated URL string */ -function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return undefined; - try { - // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - // "Retry-After" header ==> seconds - // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds - const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; - return retryAfterValue * multiplyingFactor; // in milli-seconds +function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : undefined; + // mutating searchParams will change the encoding, so we have to do this ourselves + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); } } - // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) - return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - // negative diff would mean a date in the past, so retry asap with 0 milliseconds - return Number.isFinite(diff) ? Math.max(0, diff) : undefined; } - catch (_a) { - return undefined; + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); } /** - * A response is a retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + * Get URL parameter by name. + * + * @param url - + * @param name - */ -function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); -} -function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; - } - return { - retryAfterInMs, - }; - }, - }; -} -//# sourceMappingURL=throttlingRetryStrategy.js.map - -/***/ }), - -/***/ 80107: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.concat = concat; -const tslib_1 = __nccwpck_require__(4351); -const node_stream_1 = __nccwpck_require__(84492); -const typeGuards_js_1 = __nccwpck_require__(58520); -const file_js_1 = __nccwpck_require__(3224); -function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); - } - } - finally { - reader.releaseLock(); - } - }); +function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? undefined; } -function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); - } +/** + * Set URL host. + * + * @param url - Source URL string + * @param host - New host string + * @returns An updated URL string + */ +function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); } -function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); +/** + * Get URL path from an URL string. + * + * @param url - Source URL string + */ +function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; } - else { - return stream; + catch (e) { + return undefined; } } -function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } - else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); +/** + * Get URL scheme from an URL string. + * + * @param url - Source URL string + */ +function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } - else { - return ensureNodeStream(source); + catch (e) { + return undefined; } } /** - * Utility function that concatenates a set of binary inputs into one combined output. - * - * @param sources - array of sources for the concatenation - * @returns - in Node, a (() =\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs. - * In browser, returns a `Blob` representing all the concatenated inputs. + * Get URL path and query from an URL string. * - * @internal + * @param url - Source URL string */ -async function concat(sources) { - return function () { - const streams = sources.map((x) => (typeof x === "function" ? x() : x)).map(toStream); - return node_stream_1.Readable.from((function () { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } - finally { if (e_1) throw e_1.error; } - } - } - }); - })()); - }; +function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?' + } + return `${pathString}${queryString}`; } -//# sourceMappingURL=concat.js.map - -/***/ }), - -/***/ 3224: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRawContent = getRawContent; -exports.createFileFromStream = createFileFromStream; -exports.createFile = createFile; -const core_util_1 = __nccwpck_require__(80637); -const typeGuards_js_1 = __nccwpck_require__(58520); -const unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - bytes: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - }, -}; /** - * Private symbol used as key on objects created using createFile containing the - * original source of the file object. - * - * This is used in Node to access the original Node stream without using Blob#stream, which - * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and - * Readable#to/fromWeb in Node versions we support: - * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14) - * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6) - * - * Once these versions are no longer supported, we may be able to stop doing this. + * Get URL query key value pairs from an URL string. * - * @internal + * @param url - */ -const rawContent = Symbol("rawContent"); -function hasRawContent(x) { - return typeof x[rawContent] === "function"; +function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; } /** - * Extract the raw content from a given blob-like object. If the input was created using createFile - * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. - * For true instances of Blob and File, returns the blob's content as a Web ReadableStream. + * Append a string to URL query. * - * @internal + * @param url - Source URL string. + * @param queryParts - String to be appended to the URL query. + * @returns An updated URL string. */ -function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); +function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; } else { - return blob.stream(); + query = queryParts; } + urlParsed.search = query; + return urlParsed.toString(); } /** - * Create an object that implements the File interface. This object is intended to be - * passed into RequestBodyType.formData, and is not guaranteed to work as expected in - * other situations. - * - * Use this function to: - * - Create a File object for use in RequestBodyType.formData in environments where the - * global File object is unavailable. - * - Create a File-like object from a readable stream without reading the stream into memory. + * Rounds a date off to seconds. * - * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is - * passed in a request's form data map, the stream will not be read into memory - * and instead will be streamed when the request is made. In the event of a retry, the - * stream needs to be read again, so this callback SHOULD return a fresh stream if possible. - * @param name - the name of the file. - * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + * @param date - + * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns Date string in ISO8061 format, with or without 7 milliseconds component */ -function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); +function truncatedISO8061Date(date, withMilliseconds = true) { + // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" + const dateString = date.toISOString(); + return withMilliseconds + ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" + : dateString.substring(0, dateString.length - 5) + "Z"; } /** - * Create an object that implements the File interface. This object is intended to be - * passed into RequestBodyType.formData, and is not guaranteed to work as expected in - * other situations. - * - * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable. + * Base64 encode. * - * @param content - the content of the file as a Uint8Array in memory. - * @param name - the name of the file. - * @param options - optional metadata about the file, e.g. file name, file size, MIME type. - */ -function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); - } - else { - return new File([content], name, options); - } -} -//# sourceMappingURL=file.js.map - -/***/ }), - -/***/ 21333: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.delay = delay; -exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; -const abort_controller_1 = __nccwpck_require__(11514); -const StandardAbortMessage = "The operation was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. - * @param delayInMs - The number of milliseconds to be delayed. - * @param value - The value to be resolved with after a timeout of t milliseconds. - * @param options - The options for delay - currently abort options - * - abortSignal - The abortSignal associated with containing operation. - * - abortErrorMsg - The abort error message associated with containing operation. - * @returns Resolved promise + * @param content - */ -function delay(delayInMs, value, options) { - return new Promise((resolve, reject) => { - let timer = undefined; - let onAborted = undefined; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); - } - timer = setTimeout(() => { - removeListeners(); - resolve(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); - } - }); +function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); } /** - * @internal - * @returns the parsed value or undefined if the parsed value is invalid. + * Base64 decode. + * + * @param encodedString - */ -function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; +function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); } -//# sourceMappingURL=helpers.js.map - -/***/ }), - -/***/ 33106: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.custom = void 0; -const node_util_1 = __nccwpck_require__(47261); -exports.custom = node_util_1.inspect.custom; -//# sourceMappingURL=inspect.js.map - -/***/ }), - -/***/ 34472: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Sanitizer = void 0; -const core_util_1 = __nccwpck_require__(80637); -const RedactedString = "REDACTED"; -// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts -const defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate", -]; -const defaultAllowedQueryParameters = ["api-version"]; /** - * @internal + * Generate a 64 bytes base64 block ID string. + * + * @param blockIndex - */ -class Sanitizer { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = new Set(); - return JSON.stringify(obj, (key, value) => { - // Ensure Errors include their interesting non-enumerable members - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } - else if (key === "url") { - return this.sanitizeUrl(value); - } - else if (key === "query") { - return this.sanitizeQuery(value); - } - else if (key === "body") { - // Don't log the request body - return undefined; - } - else if (key === "response") { - // Don't log response again - return undefined; - } - else if (key === "operationSpec") { - // When using sendOperationRequest, the request carries a massive - // field with the autorest spec. No need to log it. - return undefined; - } - else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } - else { - sanitized[key] = RedactedString; - } - } - return sanitized; - } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } - else { - sanitized[k] = RedactedString; - } - } - return sanitized; +function generateBlockID(blockIDPrefix, blockIndex) { + // To generate a 64 bytes base64 string, source string should be 48 + const maxSourceStringLength = 48; + // A blob can have a maximum of 100,000 uncommitted blocks at any given time + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); } + const res = blockIDPrefix + + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); } -exports.Sanitizer = Sanitizer; -//# sourceMappingURL=sanitizer.js.map - -/***/ }), - -/***/ 50601: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_CYCLER_OPTIONS = void 0; -exports.createTokenCycler = createTokenCycler; -const helpers_js_1 = __nccwpck_require__(21333); -// Default options for the cycler if none are provided -exports.DEFAULT_CYCLER_OPTIONS = { - forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires - retryIntervalInMs: 3000, // Allow refresh attempts every 3s - refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry -}; /** - * Converts an an unreliable access token getter (which may resolve with null) - * into an AccessTokenGetter by retrying the unreliable getter in a regular - * interval. + * Delay specified time interval. * - * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null. - * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts. - * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception. - * @returns - A promise that, if it resolves, will resolve with an access token. + * @param timeInMs - + * @param aborter - + * @param abortError - */ -async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { - // This wrapper handles exceptions gracefully as long as we haven't exceeded - // the timeout. - async function tryGetAccessToken() { - if (Date.now() < refreshTimeout) { - try { - return await getAccessToken(); - } - catch (_a) { - return null; +async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + /* eslint-disable-next-line prefer-const */ + let timeout; + const abortHandler = () => { + if (timeout !== undefined) { + clearTimeout(timeout); } - } - else { - const finalToken = await getAccessToken(); - // Timeout is up, so throw if it's still null - if (finalToken === null) { - throw new Error("Failed to refresh access token."); + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== undefined) { + aborter.removeEventListener("abort", abortHandler); } - return finalToken; + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== undefined) { + aborter.addEventListener("abort", abortHandler); } - } - let token = await tryGetAccessToken(); - while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); - token = await tryGetAccessToken(); - } - return token; + }); } /** - * Creates a token cycler from a credential, scopes, and optional settings. - * - * A token cycler represents a way to reliably retrieve a valid access token - * from a TokenCredential. It will handle initializing the token, refreshing it - * when it nears expiration, and synchronizes refresh attempts to avoid - * concurrency hazards. - * - * @param credential - the underlying TokenCredential that provides the access - * token - * @param tokenCyclerOptions - optionally override default settings for the cycler + * String.prototype.padStart() * - * @returns - a function that reliably produces a valid access token + * @param currentString - + * @param targetLength - + * @param padString - */ -function createTokenCycler(credential, tokenCyclerOptions) { - let refreshWorker = null; - let token = null; - let tenantId; - const options = Object.assign(Object.assign({}, exports.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); - /** - * This little holder defines several predicates that we use to construct - * the rules of refreshing the token. - */ - const cycler = { - /** - * Produces true if a refresh job is currently in progress. - */ - get isRefreshing() { - return refreshWorker !== null; - }, - /** - * Produces true if the cycler SHOULD refresh (we are within the refresh - * window and not already refreshing) - */ - get shouldRefresh() { - var _a; - if (cycler.isRefreshing) { - return false; - } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { - return true; - } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); - }, - /** - * Produces true if the cycler MUST refresh (null or nearly-expired - * token). - */ - get mustRefresh() { - return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()); - }, - }; - /** - * Starts a refresh job or returns the existing job if one is already - * running. - */ - function refresh(scopes, getTokenOptions) { - var _a; - if (!cycler.isRefreshing) { - // We bind `scopes` here to avoid passing it around a lot - const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); - // Take advantage of promise chaining to insert an assignment to `token` - // before the refresh can be considered done. - refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, - // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now()) - .then((_token) => { - refreshWorker = null; - token = _token; - tenantId = getTokenOptions.tenantId; - return token; - }) - .catch((reason) => { - // We also should reset the refresher if we enter a failed state. All - // existing awaiters will throw, but subsequent requests will start a - // new retry chain. - refreshWorker = null; - token = null; - tenantId = undefined; - throw reason; - }); - } - return refreshWorker; +function padStart(currentString, targetLength, padString = " ") { + // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); + } + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; + } + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; } - return async (scopes, tokenOptions) => { - // - // Simple rules: - // - If we MUST refresh, then return the refresh task, blocking - // the pipeline until a token is available. - // - If we SHOULD refresh, then run refresh but don't return it - // (we can still use the cached token). - // - Return the token, since it's fine if we didn't return in - // step 1. - // - const hasClaimChallenge = Boolean(tokenOptions.claims); - const tenantIdChanged = tenantId !== tokenOptions.tenantId; - if (hasClaimChallenge) { - // If we've received a claim, we know the existing token isn't valid - // We want to clear it so that that refresh worker won't use the old expiration time as a timeout - token = null; - } - // If the tenantId passed in token options is different to the one we have - // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to - // refresh the token with the new tenantId or token. - const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; - if (mustRefresh) { - return refresh(scopes, tokenOptions); - } - if (cycler.shouldRefresh) { - refresh(scopes, tokenOptions); - } - return token; - }; -} -//# sourceMappingURL=tokenCycler.js.map - -/***/ }), - -/***/ 58520: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isNodeReadableStream = isNodeReadableStream; -exports.isWebReadableStream = isWebReadableStream; -exports.isReadableStream = isReadableStream; -exports.isBlob = isBlob; -function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); -} -function isWebReadableStream(x) { - return Boolean(x && - typeof x.getReader === "function" && - typeof x.tee === "function"); -} -function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); } -function isBlob(x) { - return typeof x.stream === "function"; +function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); + } + return safeURL; } -//# sourceMappingURL=typeGuards.js.map - -/***/ }), - -/***/ 96158: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getUserAgentHeaderName = getUserAgentHeaderName; -exports.getUserAgentValue = getUserAgentValue; -const userAgentPlatform_js_1 = __nccwpck_require__(15316); -const constants_js_1 = __nccwpck_require__(43171); -function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); +function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } + else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } + else { + headers.set(name, value); + } } - return parts.join(" "); + return headers; } /** - * @internal + * If two strings are equal when compared case insensitive. + * + * @param str1 - + * @param str2 - */ -function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); +function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } /** - * @internal + * Extracts account name from the url + * @param url - url to extract the account name from + * @returns with the account name */ -async function getUserAgentValue(prefix) { - const runtimeInfo = new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; +function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + accountName = parsedUrl.hostname.split(".")[0]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ + // .getPath() -> /devstoreaccount1/ + accountName = parsedUrl.pathname.split("/")[1]; + } + else { + // Custom domain case: "https://customdomain.com/containername/blob". + accountName = ""; + } + return accountName; + } + catch (error) { + throw new Error("Unable to extract accountName with provided information."); + } +} +function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. + // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part. + // Case 3: Ipv4, use broad regex which just check if host contains Ipv4. + // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html. + return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || + (Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port))); } -//# sourceMappingURL=userAgent.js.map - -/***/ }), - -/***/ 15316: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHeaderName = getHeaderName; -exports.setPlatformSpecificData = setPlatformSpecificData; -const tslib_1 = __nccwpck_require__(4351); -const os = tslib_1.__importStar(__nccwpck_require__(70612)); -const process = tslib_1.__importStar(__nccwpck_require__(97742)); /** - * @internal + * Attach a TokenCredential to an object. + * + * @param thing - + * @param credential - */ -function getHeaderName() { - return "User-Agent"; +function attachCredential(thing, credential) { + thing.credential = credential; + return thing; +} +function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; } /** - * @internal + * Escape the blobName but keep path separator ('/'). */ -async function setPlatformSpecificData(map) { - if (process && process.versions) { - const versions = process.versions; - if (versions.bun) { - map.set("Bun", versions.bun); - } - else if (versions.deno) { - map.set("Deno", versions.deno); - } - else if (versions.node) { - map.set("Node", versions.node); - } +function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); } - map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); + return split.join("/"); } -//# sourceMappingURL=userAgentPlatform.js.map +/** + * A typesafe helper for ensuring that a given response object has + * the original _response attached. + * @param response - A response object from calling a client operation + * @returns The same object, but with known _response property + */ +function assertResponse(response) { + if (`_response` in response) { + return response; + } + throw new TypeError(`Unexpected response object ${response}`); +} +//# sourceMappingURL=utils.common.js.map /***/ }), -/***/ 59390: +/***/ 81577: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -111588,7 +113667,7 @@ exports.AbortError = AbortError; /***/ }), -/***/ 11514: +/***/ 31514: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -111597,3558 +113676,6051 @@ exports.AbortError = AbortError; // Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AbortError = void 0; -var AbortError_js_1 = __nccwpck_require__(59390); +var AbortError_js_1 = __nccwpck_require__(81577); Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); //# sourceMappingURL=index.js.map /***/ }), -/***/ 19363: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 92960: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createTracingClient = exports.useInstrumenter = void 0; -var instrumenter_js_1 = __nccwpck_require__(63418); -Object.defineProperty(exports, "useInstrumenter", ({ enumerable: true, get: function () { return instrumenter_js_1.useInstrumenter; } })); -var tracingClient_js_1 = __nccwpck_require__(69254); -Object.defineProperty(exports, "createTracingClient", ({ enumerable: true, get: function () { return tracingClient_js_1.createTracingClient; } })); -//# sourceMappingURL=index.js.map + +const WritableStream = (__nccwpck_require__(84492).Writable) +const inherits = (__nccwpck_require__(47261).inherits) + +const StreamSearch = __nccwpck_require__(51142) + +const PartStream = __nccwpck_require__(81620) +const HeaderParser = __nccwpck_require__(92032) + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.call(this, cfg) + + if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } + + if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } + + this._headerFirst = cfg.headerFirst + + this._dashes = 0 + this._parts = 0 + this._finished = false + this._realFinish = false + this._isPreamble = true + this._justMatched = false + this._firstWrite = true + this._inHeader = true + this._part = undefined + this._cb = undefined + this._ignoreData = false + this._partOpts = { highWaterMark: cfg.partHwm } + this._pause = false + + const self = this + this._hparser = new HeaderParser(cfg) + this._hparser.on('header', function (header) { + self._inHeader = false + self._part.emit('header', header) + }) +} +inherits(Dicer, WritableStream) + +Dicer.prototype.emit = function (ev) { + if (ev === 'finish' && !this._realFinish) { + if (!this._finished) { + const self = this + process.nextTick(function () { + self.emit('error', new Error('Unexpected end of multipart data')) + if (self._part && !self._ignoreData) { + const type = (self._isPreamble ? 'Preamble' : 'Part') + self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) + self._part.push(null) + process.nextTick(function () { + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + return + } + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + } + } else { WritableStream.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() } + } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } +} + +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} + +Dicer.prototype.setBoundary = function (boundary) { + const self = this + this._bparser = new StreamSearch('\r\n--' + boundary) + this._bparser.on('info', function (isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end) + }) +} + +Dicer.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} + +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } + } + if (this._dashes === 2) { + if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + if (self._parts === 0) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } + } + if (this._dashes) { return } + } + if (this._justMatched) { this._justMatched = false } + if (!this._part) { + this._part = new PartStream(this._partOpts) + this._part._read = function (n) { + self._unpause() + } + if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() } + if (!this._isPreamble) { this._inHeader = true } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { shouldWriteMore = this._part.push(buf) } + shouldWriteMore = this._part.push(data.slice(start, end)) + if (!shouldWriteMore) { this._pause = true } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { this._hparser.push(buf) } + r = this._hparser.push(data.slice(start, end)) + if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + } + } + if (isMatch) { + this._hparser.reset() + if (this._isPreamble) { this._isPreamble = false } else { + if (start !== end) { + ++this._parts + this._part.on('end', function () { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } else { + self._unpause() + } + } + }) + } + } + this._part.push(null) + this._part = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } +} + +Dicer.prototype._unpause = function () { + if (!this._pause) { return } + + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} + +module.exports = Dicer + /***/ }), -/***/ 63418: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 92032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDefaultTracingSpan = createDefaultTracingSpan; -exports.createDefaultInstrumenter = createDefaultInstrumenter; -exports.useInstrumenter = useInstrumenter; -exports.getInstrumenter = getInstrumenter; -const tracingContext_js_1 = __nccwpck_require__(18110); -const state_js_1 = __nccwpck_require__(81241); -function createDefaultTracingSpan() { - return { - end: () => { - // noop - }, - isRecording: () => false, - recordException: () => { - // noop - }, - setAttribute: () => { - // noop - }, - setStatus: () => { - // noop - }, - addEvent: () => { - // noop - }, - }; + +const EventEmitter = (__nccwpck_require__(15673).EventEmitter) +const inherits = (__nccwpck_require__(47261).inherits) +const getLimit = __nccwpck_require__(21467) + +const StreamSearch = __nccwpck_require__(51142) + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) + } + if (isMatch) { self._finish() } + }) } -function createDefaultInstrumenter() { - return { - createRequestHeaders: () => { - return {}; - }, - parseTraceparentHeader: () => { - return undefined; - }, - startSpan: (_name, spanOptions) => { - return { - span: createDefaultTracingSpan(), - tracingContext: (0, tracingContext_js_1.createTracingContext)({ parentContext: spanOptions.tracingContext }), - }; - }, - withContext(_context, callback, ...callbackArgs) { - return callback(...callbackArgs); - }, - }; +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } } -/** - * Extends the Azure SDK with support for a given instrumenter implementation. - * - * @param instrumenter - The instrumenter implementation to use. - */ -function useInstrumenter(instrumenter) { - state_js_1.state.instrumenterImplementation = instrumenter; + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() } -/** - * Gets the currently set instrumenter, a No-Op instrumenter by default. - * - * @returns The currently set instrumenter - */ -function getInstrumenter() { - if (!state_js_1.state.instrumenterImplementation) { - state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); + +HeaderParser.prototype._finish = function () { + if (this.buffer) { this._parseHeader() } + this.ss.matches = this.ss.maxMatches + const header = this.header + this.header = {} + this.buffer = '' + this.finished = true + this.nread = this.npairs = 0 + this.maxed = false + this.emit('header', header) +} + +HeaderParser.prototype._parseHeader = function () { + if (this.npairs === this.maxHeaderPairs) { return } + + const lines = this.buffer.split(RE_CRLF) + const len = lines.length + let m, h + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } } - return state_js_1.state.instrumenterImplementation; + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return + } + m = RE_HDR.exec(lines[i]) + h = m[1].toLowerCase() + this.header[h] = this.header[h] || [] + this.header[h].push((m[2] || '')) + if (++this.npairs === this.maxHeaderPairs) { break } + } } -//# sourceMappingURL=instrumenter.js.map + +module.exports = HeaderParser + /***/ }), -/***/ 81241: -/***/ ((__unused_webpack_module, exports) => { +/***/ 81620: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.state = void 0; -/** - * @internal - * - * Holds the singleton instrumenter, to be shared across CJS and ESM imports. - */ -exports.state = { - instrumenterImplementation: undefined, -}; -//# sourceMappingURL=state-cjs.cjs.map -/***/ }), +const inherits = (__nccwpck_require__(47261).inherits) +const ReadableStream = (__nccwpck_require__(84492).Readable) -/***/ 69254: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) -"use strict"; +PartStream.prototype._read = function (n) {} + +module.exports = PartStream -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createTracingClient = createTracingClient; -const instrumenter_js_1 = __nccwpck_require__(63418); -const tracingContext_js_1 = __nccwpck_require__(18110); -/** - * Creates a new tracing client. - * - * @param options - Options used to configure the tracing client. - * @returns - An instance of {@link TracingClient}. - */ -function createTracingClient(options) { - const { namespace, packageName, packageVersion } = options; - function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); - let tracingContext = startSpanResult.tracingContext; - const span = startSpanResult.span; - if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { - tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); - } - span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); - const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }), - }); - return { - span, - updatedOptions, - }; - } - async function withSpan(name, operationOptions, callback, spanOptions) { - const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); - try { - const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); - span.setStatus({ status: "success" }); - return result; - } - catch (err) { - span.setStatus({ status: "error", error: err }); - throw err; - } - finally { - span.end(); - } - } - function withContext(context, callback, ...callbackArgs) { - return (0, instrumenter_js_1.getInstrumenter)().withContext(context, callback, ...callbackArgs); - } - /** - * Parses a traceparent header value into a span identifier. - * - * @param traceparentHeader - The traceparent header to parse. - * @returns An implementation-specific identifier for the span. - */ - function parseTraceparentHeader(traceparentHeader) { - return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); - } - /** - * Creates a set of request headers to propagate tracing information to a backend. - * - * @param tracingContext - The context containing the span to serialize. - * @returns The set of headers to add to a request. - */ - function createRequestHeaders(tracingContext) { - return (0, instrumenter_js_1.getInstrumenter)().createRequestHeaders(tracingContext); - } - return { - startSpan, - withSpan, - withContext, - parseTraceparentHeader, - createRequestHeaders, - }; -} -//# sourceMappingURL=tracingClient.js.map /***/ }), -/***/ 18110: -/***/ ((__unused_webpack_module, exports) => { +/***/ 51142: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracingContextImpl = exports.knownContextKeys = void 0; -exports.createTracingContext = createTracingContext; -/** @internal */ -exports.knownContextKeys = { - span: Symbol.for("@azure/core-tracing span"), - namespace: Symbol.for("@azure/core-tracing namespace"), -}; + /** - * Creates a new {@link TracingContext} with the given options. - * @param options - A set of known keys that may be set on the context. - * @returns A new {@link TracingContext} with the given options. + * Copyright Brian White. All rights reserved. * - * @internal + * @see https://github.com/mscdex/streamsearch + * + * 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. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool */ -function createTracingContext(options = {}) { - let context = new TracingContextImpl(options.parentContext); - if (options.span) { - context = context.setValue(exports.knownContextKeys.span, options.span); - } - if (options.namespace) { - context = context.setValue(exports.knownContextKeys.namespace, options.namespace); - } - return context; +const EventEmitter = (__nccwpck_require__(15673).EventEmitter) +const inherits = (__nccwpck_require__(47261).inherits) + +function SBMH (needle) { + if (typeof needle === 'string') { + needle = Buffer.from(needle) + } + + if (!Buffer.isBuffer(needle)) { + throw new TypeError('The needle has to be a String or a Buffer.') + } + + const needleLength = needle.length + + if (needleLength === 0) { + throw new Error('The needle cannot be an empty String/Buffer.') + } + + if (needleLength > 256) { + throw new Error('The needle cannot have a length bigger than 256.') + } + + this.maxMatches = Infinity + this.matches = 0 + + this._occ = new Array(256) + .fill(needleLength) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 + + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } } -/** @internal */ -class TracingContextImpl { - constructor(initialContext) { - this._contextMap = - initialContext instanceof TracingContextImpl - ? new Map(initialContext._contextMap) - : new Map(); - } - setValue(key, value) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.set(key, value); - return newContext; - } - getValue(key) { - return this._contextMap.get(key); - } - deleteValue(key) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.delete(key); - return newContext; - } +inherits(SBMH, EventEmitter) + +SBMH.prototype.reset = function () { + this._lookbehind_size = 0 + this.matches = 0 + this._bufpos = 0 } -exports.TracingContextImpl = TracingContextImpl; -//# sourceMappingURL=tracingContext.js.map -/***/ }), +SBMH.prototype.push = function (chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, 'binary') + } + const chlen = chunk.length + this._bufpos = pos || 0 + let r + while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } + return r +} -/***/ 87205: -/***/ ((__unused_webpack_module, exports) => { +SBMH.prototype._sbmh_feed = function (data) { + const len = data.length + const needle = this._needle + const needleLength = needle.length + const lastNeedleChar = needle[needleLength - 1] -"use strict"; + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.cancelablePromiseRace = cancelablePromiseRace; -/** - * promise.race() wrapper that aborts rest of promises as soon as the first promise settles. - */ -async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1) + + if ( + ch === lastNeedleChar && + this._sbmh_memcmp(data, pos, needleLength - 1) + ) { + this._lookbehind_size = 0 + ++this.matches + this.emit('info', true) + + return (this._bufpos = pos + needleLength) + } + pos += this._occ[ch] } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } } - finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); + + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + this.emit('info', false, this._lookbehind, 0, bytesToCutOff) + } + + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, + this._lookbehind_size - bytesToCutOff) + this._lookbehind_size -= bytesToCutOff + + data.copy(this._lookbehind, this._lookbehind_size) + this._lookbehind_size += len + + this._bufpos = len + return len } -} -//# sourceMappingURL=aborterUtils.js.map + } -/***/ }), + pos += (pos >= 0) * this._bufpos -/***/ 9972: -/***/ ((__unused_webpack_module, exports) => { + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos) + ++this.matches + if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } -"use strict"; + return (this._bufpos = pos + needleLength) + } else { + pos = len - needleLength + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uint8ArrayToString = uint8ArrayToString; -exports.stringToUint8Array = stringToUint8Array; -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + while ( + pos < len && + ( + data[pos] !== needle[0] || + ( + (Buffer.compare( + data.subarray(pos, pos + len - pos), + needle.subarray(0, len - pos) + ) !== 0) + ) + ) + ) { + ++pos + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)) + this._lookbehind_size = len - pos + } + + // Everything until pos is guaranteed not to contain needle data. + if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } + + this._bufpos = len + return len } -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -function stringToUint8Array(value, format) { - return Buffer.from(value, format); + +SBMH.prototype._sbmh_lookup_char = function (data, pos) { + return (pos < 0) + ? this._lookbehind[this._lookbehind_size + pos] + : data[pos] } -//# sourceMappingURL=bytesEncoding.js.map + +SBMH.prototype._sbmh_memcmp = function (data, pos, len) { + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH + /***/ }), -/***/ 97980: -/***/ ((__unused_webpack_module, exports) => { +/***/ 50727: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var _a, _b, _c, _d; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isReactNative = exports.isNodeRuntime = exports.isNode = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; -/** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -// eslint-disable-next-line @azure/azure-sdk/ts-no-window -exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Web Worker. - */ -exports.isWebWorker = typeof self === "object" && - typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && - (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || - ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || - ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -exports.isDeno = typeof Deno !== "undefined" && - typeof Deno.version !== "undefined" && - typeof Deno.version.deno !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Node.js compatible environment. - */ -exports.isNodeLike = typeof globalThis.process !== "undefined" && - Boolean(globalThis.process.version) && - Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); -/** - * A constant that indicates whether the environment the code is running is a Node.js compatible environment. - * @deprecated Use `isNodeLike` instead. - */ -exports.isNode = exports.isNodeLike; -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -exports.isNodeRuntime = exports.isNodeLike && !exports.isBun && !exports.isDeno; -/** - * A constant that indicates whether the environment the code is running is in React-Native. - */ -// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js -exports.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; -//# sourceMappingURL=checkEnvironment.js.map -/***/ }), +const WritableStream = (__nccwpck_require__(84492).Writable) +const { inherits } = __nccwpck_require__(47261) +const Dicer = __nccwpck_require__(92960) + +const MultipartParser = __nccwpck_require__(32183) +const UrlencodedParser = __nccwpck_require__(78306) +const parseParams = __nccwpck_require__(31854) + +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(opts) } + + if (typeof opts !== 'object') { + throw new TypeError('Busboy expected an options-Object.') + } + if (typeof opts.headers !== 'object') { + throw new TypeError('Busboy expected an options-Object with headers-attribute.') + } + if (typeof opts.headers['content-type'] !== 'string') { + throw new TypeError('Missing Content-Type-header.') + } + + const { + headers, + ...streamOptions + } = opts + + this.opts = { + autoDestroy: false, + ...streamOptions + } + WritableStream.call(this, this.opts) + + this._done = false + this._parser = this.getParserByHeaders(headers) + this._finished = false +} +inherits(Busboy, WritableStream) + +Busboy.prototype.emit = function (ev) { + if (ev === 'finish') { + if (!this._done) { + this._parser?.end() + return + } else if (this._finished) { + return + } + this._finished = true + } + WritableStream.prototype.emit.apply(this, arguments) +} + +Busboy.prototype.getParserByHeaders = function (headers) { + const parsed = parseParams(headers['content-type']) -/***/ 12376: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + } -"use strict"; + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg) + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg) + } + throw new Error('Unsupported Content-Type.') +} -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createAbortablePromise = createAbortablePromise; -const abort_controller_1 = __nccwpck_require__(54812); -/** - * Creates an abortable promise. - * @param buildPromise - A function that takes the resolve and reject functions as parameters. - * @param options - The options for the abortable promise. - * @returns A promise that can be aborted. - */ -function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } - catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); +Busboy.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) } -//# sourceMappingURL=createAbortablePromise.js.map + +module.exports = Busboy +module.exports["default"] = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer + /***/ }), -/***/ 19259: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 32183: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.delay = delay; -exports.calculateRetryDelay = calculateRetryDelay; -const createAbortablePromise_js_1 = __nccwpck_require__(12376); -const random_js_1 = __nccwpck_require__(93710); -const StandardAbortMessage = "The delay was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. - * @param timeInMs - The number of milliseconds to be delayed. - * @param options - The options for delay - currently abort options - * @returns Promise that is resolved after timeInMs - */ -function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { - token = setTimeout(resolve, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage, - }); -} -/** - * Calculates the delay interval for retry attempts using exponential delay with jitter. - * @param retryAttempt - The current retry attempt number. - * @param config - The exponential retry configuration. - * @returns An object containing the calculated retry delay. - */ -function calculateRetryDelay(retryAttempt, config) { - // Exponentially increase the delay each time - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - // Don't let the delay exceed the maximum - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - // Allow the final value to have some "jitter" (within 50% of the delay size) so - // that retries across multiple clients don't occur simultaneously. - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; -} -//# sourceMappingURL=delay.js.map -/***/ }), +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams -/***/ 46734: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const { Readable } = __nccwpck_require__(84492) +const { inherits } = __nccwpck_require__(47261) -"use strict"; +const Dicer = __nccwpck_require__(92960) -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isError = isError; -exports.getErrorMessage = getErrorMessage; -const object_js_1 = __nccwpck_require__(56538); -/** - * Typeguard for an error object shape (has name and message) - * @param e - Something caught by a catch clause. - */ -function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; - } - return false; -} -/** - * Given what is thought to be an error object, return the message if possible. - * If the message is missing, returns a stringified version of the input. - * @param e - Something thrown from a try block - * @returns The error message or a string of the input - */ -function getErrorMessage(e) { - if (isError(e)) { - return e.message; +const parseParams = __nccwpck_require__(31854) +const decodeText = __nccwpck_require__(84619) +const basename = __nccwpck_require__(48647) +const getLimit = __nccwpck_require__(21467) + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break } - else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } - else { - stringified = String(e); - } - } - catch (err) { - stringified = "[unable to stringify input]"; - } - return `Unknown error ${stringified}`; + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() } -} -//# sourceMappingURL=error.js.map + } -/***/ }), + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } -/***/ 80637: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) -"use strict"; + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stringToUint8Array = exports.uint8ArrayToString = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isBun = exports.isBrowser = exports.randomUUID = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.computeSha256Hmac = exports.computeSha256Hash = exports.getErrorMessage = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.createAbortablePromise = exports.cancelablePromiseRace = exports.calculateRetryDelay = exports.delay = void 0; -var delay_js_1 = __nccwpck_require__(19259); -Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); -Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); -var aborterUtils_js_1 = __nccwpck_require__(87205); -Object.defineProperty(exports, "cancelablePromiseRace", ({ enumerable: true, get: function () { return aborterUtils_js_1.cancelablePromiseRace; } })); -var createAbortablePromise_js_1 = __nccwpck_require__(12376); -Object.defineProperty(exports, "createAbortablePromise", ({ enumerable: true, get: function () { return createAbortablePromise_js_1.createAbortablePromise; } })); -var random_js_1 = __nccwpck_require__(93710); -Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); -var object_js_1 = __nccwpck_require__(56538); -Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); -var error_js_1 = __nccwpck_require__(46734); -Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); -Object.defineProperty(exports, "getErrorMessage", ({ enumerable: true, get: function () { return error_js_1.getErrorMessage; } })); -var sha256_js_1 = __nccwpck_require__(94793); -Object.defineProperty(exports, "computeSha256Hash", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hash; } })); -Object.defineProperty(exports, "computeSha256Hmac", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hmac; } })); -var typeGuards_js_1 = __nccwpck_require__(1187); -Object.defineProperty(exports, "isDefined", ({ enumerable: true, get: function () { return typeGuards_js_1.isDefined; } })); -Object.defineProperty(exports, "isObjectWithProperties", ({ enumerable: true, get: function () { return typeGuards_js_1.isObjectWithProperties; } })); -Object.defineProperty(exports, "objectHasProperty", ({ enumerable: true, get: function () { return typeGuards_js_1.objectHasProperty; } })); -var uuidUtils_js_1 = __nccwpck_require__(17658); -Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); -var checkEnvironment_js_1 = __nccwpck_require__(97980); -Object.defineProperty(exports, "isBrowser", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBrowser; } })); -Object.defineProperty(exports, "isBun", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBun; } })); -Object.defineProperty(exports, "isNode", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNode; } })); -Object.defineProperty(exports, "isNodeLike", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeLike; } })); -Object.defineProperty(exports, "isNodeRuntime", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeRuntime; } })); -Object.defineProperty(exports, "isDeno", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isDeno; } })); -Object.defineProperty(exports, "isReactNative", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isReactNative; } })); -Object.defineProperty(exports, "isWebWorker", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isWebWorker; } })); -var bytesEncoding_js_1 = __nccwpck_require__(9972); -Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); -Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); -//# sourceMappingURL=index.js.map + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy -/***/ }), + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } -/***/ 56538: -/***/ ((__unused_webpack_module, exports) => { + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + cb() + } + }).on('part', function onPart (part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener('part', onPart) + self.parser.on('part', skipPart) + boy.hitPartsLimit = true + boy.emit('partsLimit') + return skipPart(part) + } -"use strict"; + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next part + if (curField) { + const field = curField + field.emit('end') + field.removeAllListeners('end') + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isObject = isObject; -/** - * Helper to determine when an input is a generic JS object. - * @returns true when input is an object type that is not null, Array, RegExp, or Date. - */ -function isObject(input) { - return (typeof input === "object" && - input !== null && - !Array.isArray(input) && - !(input instanceof RegExp) && - !(input instanceof Date)); -} -//# sourceMappingURL=object.js.map + part.on('header', function (header) { + let contype + let fieldname + let parsed + let charset + let encoding + let filename + let nsize = 0 -/***/ }), + if (header['content-type']) { + parsed = parseParams(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break + } + } + } + } -/***/ 93710: -/***/ ((__unused_webpack_module, exports) => { + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } -"use strict"; + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1] + if (!preservePath) { filename = basename(filename) } + } + } + } else { return skipPart(part) } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRandomIntegerInclusive = getRandomIntegerInclusive; -/** - * Returns a random integer value between a lower and upper bound, - * inclusive of both bounds. - * Note that this uses Math.random and isn't secure. If you need to use - * this for any kind of security purpose, find a better source of random. - * @param min - The smallest integer value allowed. - * @param max - The largest integer value allowed. - */ -function getRandomIntegerInclusive(min, max) { - // Make sure inputs are integers. - min = Math.ceil(min); - max = Math.floor(max); - // Pick a random offset from zero to the size of the range. - // Since Math.random() can never return 1, we have to make the range one larger - // in order to be inclusive of the maximum value after we take the floor. - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; -} -//# sourceMappingURL=random.js.map + if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } -/***/ }), + let onData, + onEnd -/***/ 94793: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (isPartAFile(fieldname, contype, filename)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } -"use strict"; + ++nfiles -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.computeSha256Hmac = computeSha256Hmac; -exports.computeSha256Hash = computeSha256Hash; -const crypto_1 = __nccwpck_require__(6113); -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); -} -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); -} -//# sourceMappingURL=sha256.js.map + if (!boy._events.file) { + self.parser._ignore() + return + } -/***/ }), + ++nends + const file = new FileStream(fileOpts) + curFile = file + file.on('end', function () { + --nends + self._pause = false + checkFinished() + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + } + boy.emit('file', fieldname, file, filename, encoding, contype) -/***/ 1187: -/***/ ((__unused_webpack_module, exports) => { + onData = function (data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length + if (extralen > 0) { file.push(data.slice(0, extralen)) } + file.truncated = true + file.bytesRead = fileSizeLimit + part.removeAllListeners('data') + file.emit('limit') + return + } else if (!file.push(data)) { self._pause = true } -"use strict"; + file.bytesRead = nsize + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isDefined = isDefined; -exports.isObjectWithProperties = isObjectWithProperties; -exports.objectHasProperty = objectHasProperty; -/** - * Helper TypeGuard that checks if something is defined or not. - * @param thing - Anything - */ -function isDefined(thing) { - return typeof thing !== "undefined" && thing !== null; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified properties. - * @param thing - Anything. - * @param properties - The name of the properties that should appear in the object. - */ -function isObjectWithProperties(thing, properties) { - if (!isDefined(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; + onEnd = function () { + curFile = undefined + file.push(null) + } + } else { + // non-file field + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true + boy.emit('fieldsLimit') + } + return skipPart(part) + } + + ++nfields + ++nends + let buffer = '' + let truncated = false + curField = part + + onData = function (data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = (fieldSizeLimit - (nsize - data.length)) + buffer += data.toString('binary', 0, extralen) + truncated = true + part.removeAllListeners('data') + } else { buffer += data.toString('binary') } } - } - return true; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified property. - * @param thing - Any object. - * @param property - The name of the property that should appear in the object. - */ -function objectHasProperty(thing, property) { - return (isDefined(thing) && typeof thing === "object" && property in thing); -} -//# sourceMappingURL=typeGuards.js.map -/***/ }), + onEnd = function () { + curField = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } -/***/ 17658: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + part._readableState.sync = false -"use strict"; + part.on('data', onData) + part.on('end', onEnd) + }).on('error', function (err) { + if (curFile) { curFile.emit('error', err) } + }) + }).on('error', function (err) { + boy.emit('error', err) + }).on('finish', function () { + finished = true + checkFinished() + }) +} -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.randomUUID = randomUUID; -const crypto_1 = __nccwpck_require__(6113); -// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+. -const uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" - ? globalThis.crypto.randomUUID.bind(globalThis.crypto) - : crypto_1.randomUUID; -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -function randomUUID() { - return uuidFunction(); +Multipart.prototype.write = function (chunk, cb) { + const r = this.parser.write(chunk) + if (r && !this._pause) { + cb() + } else { + this._needDrain = !r + this._cb = cb + } } -//# sourceMappingURL=uuidUtils.js.map -/***/ }), +Multipart.prototype.end = function () { + const self = this -/***/ 42118: -/***/ ((__unused_webpack_module, exports) => { + if (self.parser.writable) { + self.parser.end() + } else if (!self._boy._done) { + process.nextTick(function () { + self._boy._done = true + self._boy.emit('finish') + }) + } +} -"use strict"; +function skipPart (part) { + part.resume() +} -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -class AbortError extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } +function FileStream (opts) { + Readable.call(this, opts) + + this.bytesRead = 0 + + this.truncated = false } -exports.AbortError = AbortError; -//# sourceMappingURL=AbortError.js.map -/***/ }), +inherits(FileStream, Readable) -/***/ 54812: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +FileStream.prototype._read = function (n) {} -"use strict"; +module.exports = Multipart -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -var AbortError_js_1 = __nccwpck_require__(42118); -Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); -//# sourceMappingURL=index.js.map /***/ }), -/***/ 17309: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 78306: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.parseXML = exports.stringifyXML = void 0; -var xml_js_1 = __nccwpck_require__(39170); -Object.defineProperty(exports, "stringifyXML", ({ enumerable: true, get: function () { return xml_js_1.stringifyXML; } })); -Object.defineProperty(exports, "parseXML", ({ enumerable: true, get: function () { return xml_js_1.parseXML; } })); -var xml_common_js_1 = __nccwpck_require__(62060); -Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_ATTRKEY; } })); -Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_CHARKEY; } })); -//# sourceMappingURL=index.js.map - -/***/ }), -/***/ 62060: -/***/ ((__unused_webpack_module, exports) => { +const Decoder = __nccwpck_require__(27100) +const decodeText = __nccwpck_require__(84619) +const getLimit = __nccwpck_require__(21467) -"use strict"; +const RE_CHARSET = /^charset$/i -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; -/** - * Default key used to access the XML attributes. - */ -exports.XML_ATTRKEY = "$"; -/** - * Default key used to access the XML value content. - */ -exports.XML_CHARKEY = "_"; -//# sourceMappingURL=xml.common.js.map +UrlEncoded.detect = /^application\/x-www-form-urlencoded/i +function UrlEncoded (boy, cfg) { + const limits = cfg.limits + const parsedConType = cfg.parsedConType + this.boy = boy -/***/ }), + this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) + this.fieldsLimit = getLimit(limits, 'fields', Infinity) -/***/ 39170: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + let charset + for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } -"use strict"; + if (charset === undefined) { charset = cfg.defCharset || 'utf8' } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stringifyXML = stringifyXML; -exports.parseXML = parseXML; -const fast_xml_parser_1 = __nccwpck_require__(95430); -const xml_common_js_1 = __nccwpck_require__(62060); -function getCommonOptions(options) { - var _a; - return { - attributesGroupName: xml_common_js_1.XML_ATTRKEY, - textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, - ignoreAttributes: false, - suppressBooleanAttributes: false, - }; -} -function getSerializerOptions(options = {}) { - var _a, _b; - return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); -} -function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); -} -/** - * Converts given JSON object to XML string - * @param obj - JSON object to be converted into XML string - * @param opts - Options that govern the XML building of given JSON object - * `rootName` indicates the name of the root element in the resulting XML - */ -function stringifyXML(obj, opts = {}) { - const parserOptions = getSerializerOptions(opts); - const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); - const node = { [parserOptions.rootNodeName]: obj }; - const xmlData = j2x.build(node); - return `${xmlData}`.replace(/\n/g, ""); + this.decoder = new Decoder() + this.charset = charset + this._fields = 0 + this._state = 'key' + this._checkingBytes = true + this._bytesKey = 0 + this._bytesVal = 0 + this._key = '' + this._val = '' + this._keyTrunc = false + this._valTrunc = false + this._hitLimit = false } -/** - * Converts given XML string into JSON - * @param str - String containing the XML content to be parsed into JSON - * @param opts - Options that govern the parsing of given xml string - * `includeRoot` indicates whether the root element is to be included or not in the output - */ -async function parseXML(str, opts = {}) { - if (!str) { - throw new Error("Document is empty"); - } - const validation = fast_xml_parser_1.XMLValidator.validate(str); - if (validation !== true) { - throw validation; - } - const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); - const parsedXml = parser.parse(str); - // Remove the node. - // This is a change in behavior on fxp v4. Issue #424 - if (parsedXml["?xml"]) { - delete parsedXml["?xml"]; + +UrlEncoded.prototype.write = function (data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true + this.boy.emit('fieldsLimit') } - if (!opts.includeRoot) { - for (const key of Object.keys(parsedXml)) { - const value = parsedXml[key]; - return typeof value === "object" ? Object.assign({}, value) : value; + return cb() + } + + let idxeq; let idxamp; let i; let p = 0; const len = data.length + + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break } - } - return parsedXml; -} -//# sourceMappingURL=xml.js.map + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } -/***/ }), + if (idxeq !== undefined) { + // key with assignment + if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } + this._state = 'val' -/***/ 80162: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + this._hitLimit = false + this._checkingBytes = true + this._val = '' + this._bytesVal = 0 + this._valTrunc = false + this.decoder.reset() -"use strict"; + p = idxeq + 1 + } else if (idxamp !== undefined) { + // key with no assignment + ++this._fields + let key; const keyTrunc = this._keyTrunc + if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -const log_js_1 = __nccwpck_require__(18898); -const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; -let enabledString; -let enabledNamespaces = []; -let skippedNamespaces = []; -const debuggers = []; -if (debugEnvVariable) { - enable(debugEnvVariable); -} -const debugObj = Object.assign((namespace) => { - return createDebugger(namespace); -}, { - enable, - enabled, - disable, - log: log_js_1.log, -}); -function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } - else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } -} -function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + if (key.length) { + this.boy.emit('field', decodeText(key, 'binary', this.charset), + '', + keyTrunc, + false) } - } - return false; -} -function disable() { - const result = enabledString || ""; - enable(""); - return result; -} -function createDebugger(namespace) { - const newDebugger = Object.assign(debug, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend, - }); - function debug(...args) { - if (!newDebugger.enabled) { - return; + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; -} -function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; -} -function extend(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; -} -exports["default"] = debugObj; -//# sourceMappingURL=debug.js.map - -/***/ }), + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } -/***/ 89497: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (idxamp !== undefined) { + ++this._fields + if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + this._state = 'key' -"use strict"; + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureLogger = void 0; -exports.setLogLevel = setLogLevel; -exports.getLogLevel = getLogLevel; -exports.createClientLogger = createClientLogger; -const tslib_1 = __nccwpck_require__(4351); -const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(80162)); -const registeredLoggers = new Set(); -const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; -let azureLogLevel; -/** - * The AzureLogger provides a mechanism for overriding where logs are output to. - * By default, logs are sent to stderr. - * Override the `log` method to redirect logs to another location. - */ -exports.AzureLogger = (0, debug_js_1.default)("azure"); -exports.AzureLogger.log = (...args) => { - debug_js_1.default.log(...args); -}; -const AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; -if (logLevelFromEnv) { - // avoid calling setLogLevel because we don't want a mis-set environment variable to crash - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } - else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } -} -/** - * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. - * @param level - The log level to enable for logging. - * Options from most verbose to least verbose are: - * - verbose - * - info - * - warning - * - error - */ -function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces.push(logger.namespace); + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._valTrunc = true } + } else { + if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } + p = len + } } - debug_js_1.default.enable(enabledNamespaces.join(",")); -} -/** - * Retrieves the currently specified log level. - */ -function getLogLevel() { - return azureLogLevel; -} -const levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100, -}; -/** - * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. - * @param namespace - The name of the SDK package. - * @hidden - */ -function createClientLogger(namespace) { - const clientRootLogger = exports.AzureLogger.extend(namespace); - patchLogMethod(exports.AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose"), - }; -} -function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; -} -function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level, - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces = debug_js_1.default.disable(); - debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; -} -function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); -} -function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); + } + cb() } -//# sourceMappingURL=index.js.map -/***/ }), +UrlEncoded.prototype.end = function () { + if (this.boy._done) { return } -/***/ 18898: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (this._state === 'key' && this._key.length > 0) { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + '', + this._keyTrunc, + false) + } else if (this._state === 'val') { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + } + this.boy._done = true + this.boy.emit('finish') +} -"use strict"; +module.exports = UrlEncoded -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.log = log; -const tslib_1 = __nccwpck_require__(4351); -const node_os_1 = __nccwpck_require__(70612); -const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(47261)); -const process = tslib_1.__importStar(__nccwpck_require__(97742)); -function log(message, ...args) { - process.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); -} -//# sourceMappingURL=log.js.map /***/ }), -/***/ 58412: -/***/ ((__unused_webpack_module, exports) => { +/***/ 27100: +/***/ ((module) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -class AbortError extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } -} -exports.AbortError = AbortError; -//# sourceMappingURL=AbortError.js.map -/***/ }), +const RE_PLUS = /\+/g -/***/ 1753: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const HEX = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +] -"use strict"; +function Decoder () { + this.buffer = undefined +} +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined + } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p + } + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res +} +Decoder.prototype.reset = function () { + this.buffer = undefined +} + +module.exports = Decoder -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -var AbortError_js_1 = __nccwpck_require__(58412); -Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); -//# sourceMappingURL=index.js.map /***/ }), -/***/ 92960: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 48647: +/***/ ((module) => { "use strict"; -const WritableStream = (__nccwpck_require__(84492).Writable) -const inherits = (__nccwpck_require__(47261).inherits) - -const StreamSearch = __nccwpck_require__(51142) - -const PartStream = __nccwpck_require__(81620) -const HeaderParser = __nccwpck_require__(92032) - -const DASH = 45 -const B_ONEDASH = Buffer.from('-') -const B_CRLF = Buffer.from('\r\n') -const EMPTY_FN = function () {} +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) + } + } + return (path === '..' || path === '.' ? '' : path) +} -function Dicer (cfg) { - if (!(this instanceof Dicer)) { return new Dicer(cfg) } - WritableStream.call(this, cfg) - if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } +/***/ }), - if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } +/***/ 84619: +/***/ (function(module) { - this._headerFirst = cfg.headerFirst +"use strict"; - this._dashes = 0 - this._parts = 0 - this._finished = false - this._realFinish = false - this._isPreamble = true - this._justMatched = false - this._firstWrite = true - this._inHeader = true - this._part = undefined - this._cb = undefined - this._ignoreData = false - this._partOpts = { highWaterMark: cfg.partHwm } - this._pause = false - const self = this - this._hparser = new HeaderParser(cfg) - this._hparser.on('header', function (header) { - self._inHeader = false - self._part.emit('header', header) - }) -} -inherits(Dicer, WritableStream) +// Node has always utf-8 +const utf8Decoder = new TextDecoder('utf-8') +const textDecoders = new Map([ + ['utf-8', utf8Decoder], + ['utf8', utf8Decoder] +]) -Dicer.prototype.emit = function (ev) { - if (ev === 'finish' && !this._realFinish) { - if (!this._finished) { - const self = this - process.nextTick(function () { - self.emit('error', new Error('Unexpected end of multipart data')) - if (self._part && !self._ignoreData) { - const type = (self._isPreamble ? 'Preamble' : 'Part') - self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) - self._part.push(null) - process.nextTick(function () { - self._realFinish = true - self.emit('finish') - self._realFinish = false - }) - return +function getDecoder (charset) { + let lc + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8 + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1 + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le + case 'base64': + return decoders.base64 + default: + if (lc === undefined) { + lc = true + charset = charset.toLowerCase() + continue } - self._realFinish = true - self.emit('finish') - self._realFinish = false - }) - } - } else { WritableStream.prototype.emit.apply(this, arguments) } -} - -Dicer.prototype._write = function (data, encoding, cb) { - // ignore unexpected data (e.g. extra trailer data after finished) - if (!this._hparser && !this._bparser) { return cb() } - - if (this._headerFirst && this._isPreamble) { - if (!this._part) { - this._part = new PartStream(this._partOpts) - if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() } + return decoders.other.bind(charset) } - const r = this._hparser.push(data) - if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } - } - - // allows for "easier" testing - if (this._firstWrite) { - this._bparser.push(B_CRLF) - this._firstWrite = false } - - this._bparser.push(data) - - if (this._pause) { this._cb = cb } else { cb() } } -Dicer.prototype.reset = function () { - this._part = undefined - this._bparser = undefined - this._hparser = undefined -} - -Dicer.prototype.setBoundary = function (boundary) { - const self = this - this._bparser = new StreamSearch('\r\n--' + boundary) - this._bparser.on('info', function (isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end) - }) -} +const decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.utf8Slice(0, data.length) + }, -Dicer.prototype._ignore = function () { - if (this._part && !this._ignoreData) { - this._ignoreData = true - this._part.on('error', EMPTY_FN) - // we must perform some kind of read on the stream even though we are - // ignoring the data, otherwise node's Readable stream will not emit 'end' - // after pushing null to the stream - this._part.resume() - } -} + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + return data + } + return data.latin1Slice(0, data.length) + }, -Dicer.prototype._oninfo = function (isMatch, data, start, end) { - let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.ucs2Slice(0, data.length) + }, - if (!this._part && this._justMatched && data) { - while (this._dashes < 2 && (start + i) < end) { - if (data[start + i] === DASH) { - ++i - ++this._dashes - } else { - if (this._dashes) { buf = B_ONEDASH } - this._dashes = 0 - break - } + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return '' } - if (this._dashes === 2) { - if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) } - this.reset() - this._finished = true - // no more parts will be added - if (self._parts === 0) { - self._realFinish = true - self.emit('finish') - self._realFinish = false - } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) } - if (this._dashes) { return } - } - if (this._justMatched) { this._justMatched = false } - if (!this._part) { - this._part = new PartStream(this._partOpts) - this._part._read = function (n) { - self._unpause() + return data.base64Slice(0, data.length) + }, + + other: (data, sourceEncoding) => { + if (data.length === 0) { + return '' } - if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() } - if (!this._isPreamble) { this._inHeader = true } - } - if (data && start < end && !this._ignoreData) { - if (this._isPreamble || !this._inHeader) { - if (buf) { shouldWriteMore = this._part.push(buf) } - shouldWriteMore = this._part.push(data.slice(start, end)) - if (!shouldWriteMore) { this._pause = true } - } else if (!this._isPreamble && this._inHeader) { - if (buf) { this._hparser.push(buf) } - r = this._hparser.push(data.slice(start, end)) - if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) } - } - if (isMatch) { - this._hparser.reset() - if (this._isPreamble) { this._isPreamble = false } else { - if (start !== end) { - ++this._parts - this._part.on('end', function () { - if (--self._parts === 0) { - if (self._finished) { - self._realFinish = true - self.emit('finish') - self._realFinish = false - } else { - self._unpause() - } - } - }) - } + + if (textDecoders.has(this.toString())) { + try { + return textDecoders.get(this).decode(data) + } catch (e) { } } - this._part.push(null) - this._part = undefined - this._ignoreData = false - this._justMatched = true - this._dashes = 0 + return typeof data === 'string' + ? data + : data.toString() } } -Dicer.prototype._unpause = function () { - if (!this._pause) { return } - - this._pause = false - if (this._cb) { - const cb = this._cb - this._cb = undefined - cb() +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) } + return text } -module.exports = Dicer +module.exports = decodeText /***/ }), -/***/ 92032: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 21467: +/***/ ((module) => { "use strict"; -const EventEmitter = (__nccwpck_require__(15673).EventEmitter) -const inherits = (__nccwpck_require__(47261).inherits) -const getLimit = __nccwpck_require__(21467) +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + limits[name] === null + ) { return defaultLimit } -const StreamSearch = __nccwpck_require__(51142) + if ( + typeof limits[name] !== 'number' || + isNaN(limits[name]) + ) { throw new TypeError('Limit ' + name + ' is not a valid number') } -const B_DCRLF = Buffer.from('\r\n\r\n') -const RE_CRLF = /\r\n/g -const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + return limits[name] +} -function HeaderParser (cfg) { - EventEmitter.call(this) - cfg = cfg || {} - const self = this - this.nread = 0 - this.maxed = false - this.npairs = 0 - this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) - this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) - this.buffer = '' - this.header = {} - this.finished = false - this.ss = new StreamSearch(B_DCRLF) - this.ss.on('info', function (isMatch, data, start, end) { - if (data && !self.maxed) { - if (self.nread + end - start >= self.maxHeaderSize) { - end = self.maxHeaderSize - self.nread + start - self.nread = self.maxHeaderSize - self.maxed = true - } else { self.nread += (end - start) } +/***/ }), - self.buffer += data.toString('binary', start, end) - } - if (isMatch) { self._finish() } - }) -} -inherits(HeaderParser, EventEmitter) +/***/ 31854: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -HeaderParser.prototype.push = function (data) { - const r = this.ss.push(data) - if (this.finished) { return r } -} +"use strict"; +/* eslint-disable object-property-newline */ -HeaderParser.prototype.reset = function () { - this.finished = false - this.buffer = '' - this.header = {} - this.ss.reset() + +const decodeText = __nccwpck_require__(84619) + +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g + +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' } -HeaderParser.prototype._finish = function () { - if (this.buffer) { this._parseHeader() } - this.ss.matches = this.ss.maxMatches - const header = this.header - this.header = {} - this.buffer = '' - this.finished = true - this.nread = this.npairs = 0 - this.maxed = false - this.emit('header', header) +function encodedReplacer (match) { + return EncodedLookup[match] } -HeaderParser.prototype._parseHeader = function () { - if (this.npairs === this.maxHeaderPairs) { return } +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 - const lines = this.buffer.split(RE_CRLF) - const len = lines.length - let m, h +function parseParams (str) { + const res = [] + let state = STATE_KEY + let charset = '' + let inquote = false + let escaping = false + let p = 0 + let tmp = '' + const len = str.length for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (lines[i].length === 0) { continue } - if (lines[i][0] === '\t' || lines[i][0] === ' ') { - // folded header content - // RFC2822 says to just remove the CRLF and not the whitespace following - // it, so we follow the RFC and include the leading whitespace ... - if (h) { - this.header[h][this.header[h].length - 1] += lines[i] + const char = str[i] + if (char === '\\' && inquote) { + if (escaping) { escaping = false } else { + escaping = true continue } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false + state = STATE_KEY + } else { inquote = true } + continue + } else { escaping = false } + } else { + if (escaping && inquote) { tmp += '\\' } + escaping = false + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG + charset = tmp.substring(1) + } else { state = STATE_VALUE } + tmp = '' + continue + } else if (state === STATE_KEY && + (char === '*' || char === '=') && + res.length) { + state = char === '*' + ? STATE_CHARSET + : STATE_VALUE + res[p] = [tmp, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = STATE_KEY + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } } - - const posColon = lines[i].indexOf(':') - if ( - posColon === -1 || - posColon === 0 - ) { - return - } - m = RE_HDR.exec(lines[i]) - h = m[1].toLowerCase() - this.header[h] = this.header[h] || [] - this.header[h].push((m[2] || '')) - if (++this.npairs === this.maxHeaderPairs) { break } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') } -} - -module.exports = HeaderParser - - -/***/ }), - -/***/ 81620: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const inherits = (__nccwpck_require__(47261).inherits) -const ReadableStream = (__nccwpck_require__(84492).Readable) + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } -function PartStream (opts) { - ReadableStream.call(this, opts) + return res } -inherits(PartStream, ReadableStream) - -PartStream.prototype._read = function (n) {} -module.exports = PartStream +module.exports = parseParams /***/ }), -/***/ 51142: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 22989: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AclRoleAccessorMethods = exports.Acl = void 0; +const promisify_1 = __nccwpck_require__(19203); /** - * Copyright Brian White. All rights reserved. + * Attach functionality to a {@link Storage.acl} instance. This will add an + * object for each role group (owners, readers, and writers), with each object + * containing methods to add or delete a type of entity. * - * @see https://github.com/mscdex/streamsearch + * As an example, here are a few methods that are created. * - * 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: + * myBucket.acl.readers.deleteGroup('groupId', function(err) {}); * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * myBucket.acl.owners.addUser('email@example.com', function(err, acl) {}); * - * 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. + * myBucket.acl.writers.addDomain('example.com', function(err, acl) {}); + * + * @private + */ +class AclRoleAccessorMethods { + constructor() { + this.owners = {}; + this.readers = {}; + this.writers = {}; + /** + * An object of convenience methods to add or delete owner ACL permissions + * for a given entity. + * + * The supported methods include: + * + * - `myFile.acl.owners.addAllAuthenticatedUsers` + * - `myFile.acl.owners.deleteAllAuthenticatedUsers` + * - `myFile.acl.owners.addAllUsers` + * - `myFile.acl.owners.deleteAllUsers` + * - `myFile.acl.owners.addDomain` + * - `myFile.acl.owners.deleteDomain` + * - `myFile.acl.owners.addGroup` + * - `myFile.acl.owners.deleteGroup` + * - `myFile.acl.owners.addProject` + * - `myFile.acl.owners.deleteProject` + * - `myFile.acl.owners.addUser` + * - `myFile.acl.owners.deleteUser` + * + * @name Acl#owners + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * //- + * // Add a user as an owner of a file. + * //- + * const myBucket = gcs.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * myFile.acl.owners.addUser('email@example.com', function(err, aclObject) + * {}); + * + * //- + * // For reference, the above command is the same as running the following. + * //- + * myFile.acl.add({ + * entity: 'user-email@example.com', + * role: gcs.acl.OWNER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.owners.addUser('email@example.com').then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + this.owners = {}; + /** + * An object of convenience methods to add or delete reader ACL permissions + * for a given entity. + * + * The supported methods include: + * + * - `myFile.acl.readers.addAllAuthenticatedUsers` + * - `myFile.acl.readers.deleteAllAuthenticatedUsers` + * - `myFile.acl.readers.addAllUsers` + * - `myFile.acl.readers.deleteAllUsers` + * - `myFile.acl.readers.addDomain` + * - `myFile.acl.readers.deleteDomain` + * - `myFile.acl.readers.addGroup` + * - `myFile.acl.readers.deleteGroup` + * - `myFile.acl.readers.addProject` + * - `myFile.acl.readers.deleteProject` + * - `myFile.acl.readers.addUser` + * - `myFile.acl.readers.deleteUser` + * + * @name Acl#readers + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * //- + * // Add a user as a reader of a file. + * //- + * myFile.acl.readers.addUser('email@example.com', function(err, aclObject) + * {}); + * + * //- + * // For reference, the above command is the same as running the following. + * //- + * myFile.acl.add({ + * entity: 'user-email@example.com', + * role: gcs.acl.READER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.readers.addUser('email@example.com').then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + this.readers = {}; + /** + * An object of convenience methods to add or delete writer ACL permissions + * for a given entity. + * + * The supported methods include: + * + * - `myFile.acl.writers.addAllAuthenticatedUsers` + * - `myFile.acl.writers.deleteAllAuthenticatedUsers` + * - `myFile.acl.writers.addAllUsers` + * - `myFile.acl.writers.deleteAllUsers` + * - `myFile.acl.writers.addDomain` + * - `myFile.acl.writers.deleteDomain` + * - `myFile.acl.writers.addGroup` + * - `myFile.acl.writers.deleteGroup` + * - `myFile.acl.writers.addProject` + * - `myFile.acl.writers.deleteProject` + * - `myFile.acl.writers.addUser` + * - `myFile.acl.writers.deleteUser` + * + * @name Acl#writers + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * //- + * // Add a user as a writer of a file. + * //- + * myFile.acl.writers.addUser('email@example.com', function(err, aclObject) + * {}); + * + * //- + * // For reference, the above command is the same as running the following. + * //- + * myFile.acl.add({ + * entity: 'user-email@example.com', + * role: gcs.acl.WRITER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.writers.addUser('email@example.com').then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + this.writers = {}; + AclRoleAccessorMethods.roles.forEach(this._assignAccessMethods.bind(this)); + } + _assignAccessMethods(role) { + const accessMethods = AclRoleAccessorMethods.accessMethods; + const entities = AclRoleAccessorMethods.entities; + const roleGroup = role.toLowerCase() + 's'; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this[roleGroup] = entities.reduce((acc, entity) => { + const isPrefix = entity.charAt(entity.length - 1) === '-'; + accessMethods.forEach(accessMethod => { + let method = accessMethod + entity[0].toUpperCase() + entity.substring(1); + if (isPrefix) { + method = method.replace('-', ''); + } + // Wrap the parent accessor method (e.g. `add` or `delete`) to avoid the + // more complex API of specifying an `entity` and `role`. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + acc[method] = (entityId, options, callback) => { + let apiEntity; + if (typeof options === 'function') { + callback = options; + options = {}; + } + if (isPrefix) { + apiEntity = entity + entityId; + } + else { + // If the entity is not a prefix, it is a special entity group + // that does not require further details. The accessor methods + // only accept a callback. + apiEntity = entity; + callback = entityId; + } + options = Object.assign({ + entity: apiEntity, + role, + }, options); + const args = [options]; + if (typeof callback === 'function') { + args.push(callback); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return this[accessMethod].apply(this, args); + }; + }); + return acc; + }, {}); + } +} +exports.AclRoleAccessorMethods = AclRoleAccessorMethods; +AclRoleAccessorMethods.accessMethods = ['add', 'delete']; +AclRoleAccessorMethods.entities = [ + // Special entity groups that do not require further specification. + 'allAuthenticatedUsers', + 'allUsers', + // Entity groups that require specification, e.g. `user-email@example.com`. + 'domain-', + 'group-', + 'project-', + 'user-', +]; +AclRoleAccessorMethods.roles = ['OWNER', 'READER', 'WRITER']; +/** + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. + * + * An ACL consists of one or more entries, where each entry grants permissions + * to an entity. Permissions define the actions that can be performed against an + * object or bucket (for example, `READ` or `WRITE`); the entity defines who the + * permission applies to (for example, a specific user or group of users). + * + * Where an `entity` value is accepted, we follow the format the Cloud Storage + * API expects. + * + * Refer to + * https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls + * for the most up-to-date values. + * + * - `user-userId` + * - `user-email` + * - `group-groupId` + * - `group-email` + * - `domain-domain` + * - `project-team-projectId` + * - `allUsers` + * - `allAuthenticatedUsers` + * + * Examples: + * + * - The user "liz@example.com" would be `user-liz@example.com`. + * - The group "example@googlegroups.com" would be + * `group-example@googlegroups.com`. + * - To refer to all members of the Google Apps for Business domain + * "example.com", the entity would be `domain-example.com`. + * + * For more detailed information, see + * {@link http://goo.gl/6qBBPO| About Access Control Lists}. * - * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + * @constructor Acl + * @mixin + * @param {object} options Configuration options. */ -const EventEmitter = (__nccwpck_require__(15673).EventEmitter) -const inherits = (__nccwpck_require__(47261).inherits) - -function SBMH (needle) { - if (typeof needle === 'string') { - needle = Buffer.from(needle) - } - - if (!Buffer.isBuffer(needle)) { - throw new TypeError('The needle has to be a String or a Buffer.') - } - - const needleLength = needle.length - - if (needleLength === 0) { - throw new Error('The needle cannot be an empty String/Buffer.') - } - - if (needleLength > 256) { - throw new Error('The needle cannot have a length bigger than 256.') - } - - this.maxMatches = Infinity - this.matches = 0 - - this._occ = new Array(256) - .fill(needleLength) // Initialize occurrence table. - this._lookbehind_size = 0 - this._needle = needle - this._bufpos = 0 - - this._lookbehind = Buffer.alloc(needleLength) - - // Populate occurrence table with analysis of the needle, - // ignoring last letter. - for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var - this._occ[needle[i]] = needleLength - 1 - i - } -} -inherits(SBMH, EventEmitter) - -SBMH.prototype.reset = function () { - this._lookbehind_size = 0 - this.matches = 0 - this._bufpos = 0 -} - -SBMH.prototype.push = function (chunk, pos) { - if (!Buffer.isBuffer(chunk)) { - chunk = Buffer.from(chunk, 'binary') - } - const chlen = chunk.length - this._bufpos = pos || 0 - let r - while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } - return r -} - -SBMH.prototype._sbmh_feed = function (data) { - const len = data.length - const needle = this._needle - const needleLength = needle.length - const lastNeedleChar = needle[needleLength - 1] - - // Positive: points to a position in `data` - // pos == 3 points to data[3] - // Negative: points to a position in the lookbehind buffer - // pos == -2 points to lookbehind[lookbehind_size - 2] - let pos = -this._lookbehind_size - let ch - - if (pos < 0) { - // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool - // search with character lookup code that considers both the - // lookbehind buffer and the current round's haystack data. - // - // Loop until - // there is a match. - // or until - // we've moved past the position that requires the - // lookbehind buffer. In this case we switch to the - // optimized loop. - // or until - // the character to look at lies outside the haystack. - while (pos < 0 && pos <= len - needleLength) { - ch = this._sbmh_lookup_char(data, pos + needleLength - 1) - - if ( - ch === lastNeedleChar && - this._sbmh_memcmp(data, pos, needleLength - 1) - ) { - this._lookbehind_size = 0 - ++this.matches - this.emit('info', true) - - return (this._bufpos = pos + needleLength) - } - pos += this._occ[ch] +class Acl extends AclRoleAccessorMethods { + constructor(options) { + super(); + this.pathPrefix = options.pathPrefix; + this.request_ = options.request; } - - // No match. - - if (pos < 0) { - // There's too few data for Boyer-Moore-Horspool to run, - // so let's use a different algorithm to skip as much as - // we can. - // Forward pos until - // the trailing part of lookbehind + data - // looks like the beginning of the needle - // or until - // pos == 0 - while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + /** + * @typedef {array} AddAclResponse + * @property {object} 0 The Acl Objects. + * @property {object} 1 The full API response. + */ + /** + * @callback AddAclCallback + * @param {?Error} err Request error, if any. + * @param {object} acl The Acl Objects. + * @param {object} apiResponse The full API response. + */ + /** + * Add access controls on a {@link Bucket} or {@link File}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert| BucketAccessControls: insert API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} + * + * @param {object} options Configuration options. + * @param {string} options.entity Whose permissions will be added. + * @param {string} options.role Permissions allowed for the defined entity. + * See {@link https://cloud.google.com/storage/docs/access-control Access + * Control}. + * @param {number} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {AddAclCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * const options = { + * entity: 'user-useremail@example.com', + * role: gcs.acl.OWNER_ROLE + * }; + * + * myBucket.acl.add(options, function(err, aclObject, apiResponse) {}); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * // Here is how you would grant ownership permissions to a user on a + * specific + * // revision of a file. + * //- + * myFile.acl.add({ + * entity: 'user-useremail@example.com', + * role: gcs.acl.OWNER_ROLE, + * generation: 1 + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_add_file_owner + * Example of adding an owner to a file: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_owner + * Example of adding an owner to a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_default_owner + * Example of adding a default owner to a bucket: + */ + add(options, callback) { + const query = {}; + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + this.request({ + method: 'POST', + uri: '', + qs: query, + maxRetries: 0, //explicitly set this value since this is a non-idempotent function + json: { + entity: options.entity, + role: options.role.toUpperCase(), + }, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + callback(null, this.makeAclObject_(resp), resp); + }); + } + /** + * @typedef {array} RemoveAclResponse + * @property {object} 0 The full API response. + */ + /** + * @callback RemoveAclCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Delete access controls on a {@link Bucket} or {@link File}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete| BucketAccessControls: delete API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete| ObjectAccessControls: delete API Documentation} + * + * @param {object} options Configuration object. + * @param {string} options.entity Whose permissions will be revoked. + * @param {int} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {RemoveAclCallback} callback The callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * myBucket.acl.delete({ + * entity: 'user-useremail@example.com' + * }, function(err, apiResponse) {}); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * //- + * myFile.acl.delete({ + * entity: 'user-useremail@example.com', + * generation: 1 + * }, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_owner + * Example of removing an owner from a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_default_owner + * Example of removing a default owner from a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_file_owner + * Example of removing an owner from a bucket: + */ + delete(options, callback) { + const query = {}; + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + this.request({ + method: 'DELETE', + uri: '/' + encodeURIComponent(options.entity), + qs: query, + }, (err, resp) => { + callback(err, resp); + }); + } + /** + * @typedef {array} GetAclResponse + * @property {object|object[]} 0 Single or array of Acl Objects. + * @property {object} 1 The full API response. + */ + /** + * @callback GetAclCallback + * @param {?Error} err Request error, if any. + * @param {object|object[]} acl Single or array of Acl Objects. + * @param {object} apiResponse The full API response. + */ + /** + * Get access controls on a {@link Bucket} or {@link File}. If + * an entity is omitted, you will receive an array of all applicable access + * controls. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get| BucketAccessControls: get API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get| ObjectAccessControls: get API Documentation} + * + * @param {object|function} [options] Configuration options. If you want to + * receive a list of all access controls, pass the callback function as + * the only argument. + * @param {string} options.entity Whose permissions will be fetched. + * @param {number} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetAclCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * myBucket.acl.get({ + * entity: 'user-useremail@example.com' + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // Get all access controls. + * //- + * myBucket.acl.get(function(err, aclObjects, apiResponse) { + * // aclObjects = [ + * // { + * // entity: 'user-useremail@example.com', + * // role: 'owner' + * // } + * // ] + * }); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * //- + * myFile.acl.get({ + * entity: 'user-useremail@example.com', + * generation: 1 + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.acl.get().then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_print_file_acl + * Example of printing a file's ACL: + * + * @example include:samples/acl.js + * region_tag:storage_print_file_acl_for_user + * Example of printing a file's ACL for a specific user: + * + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl + * Example of printing a bucket's ACL: + * + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl_for_user + * Example of printing a bucket's ACL for a specific user: + */ + get(optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : null; + const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + let path = ''; + const query = {}; + if (options) { + path = '/' + encodeURIComponent(options.entity); + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + } + this.request({ + uri: path, + qs: query, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + let results; + if (resp.items) { + results = resp.items.map(this.makeAclObject_); + } + else { + results = this.makeAclObject_(resp); + } + callback(null, results, resp); + }); + } + /** + * @typedef {array} UpdateAclResponse + * @property {object} 0 The updated Acl Objects. + * @property {object} 1 The full API response. + */ + /** + * @callback UpdateAclCallback + * @param {?Error} err Request error, if any. + * @param {object} acl The updated Acl Objects. + * @param {object} apiResponse The full API response. + */ + /** + * Update access controls on a {@link Bucket} or {@link File}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update| BucketAccessControls: update API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update| ObjectAccessControls: update API Documentation} + * + * @param {object} options Configuration options. + * @param {string} options.entity Whose permissions will be updated. + * @param {string} options.role Permissions allowed for the defined entity. + * See {@link Storage.acl}. + * @param {number} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {UpdateAclCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * const options = { + * entity: 'user-useremail@example.com', + * role: gcs.acl.WRITER_ROLE + * }; + * + * myBucket.acl.update(options, function(err, aclObject, apiResponse) {}); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * //- + * myFile.acl.update({ + * entity: 'user-useremail@example.com', + * role: gcs.acl.WRITER_ROLE, + * generation: 1 + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.update(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + update(options, callback) { + const query = {}; + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + this.request({ + method: 'PUT', + uri: '/' + encodeURIComponent(options.entity), + qs: query, + json: { + role: options.role.toUpperCase(), + }, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + callback(null, this.makeAclObject_(resp), resp); + }); + } + /** + * Transform API responses to a consistent object format. + * + * @private + */ + makeAclObject_(accessControlObject) { + const obj = { + entity: accessControlObject.entity, + role: accessControlObject.role, + }; + if (accessControlObject.projectTeam) { + obj.projectTeam = accessControlObject.projectTeam; + } + return obj; } - - if (pos >= 0) { - // Discard lookbehind buffer. - this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) - this._lookbehind_size = 0 - } else { - // Cut off part of the lookbehind buffer that has - // been processed and append the entire haystack - // into it. - const bytesToCutOff = this._lookbehind_size + pos - if (bytesToCutOff > 0) { - // The cut off data is guaranteed not to contain the needle. - this.emit('info', false, this._lookbehind, 0, bytesToCutOff) - } - - this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, - this._lookbehind_size - bytesToCutOff) - this._lookbehind_size -= bytesToCutOff - - data.copy(this._lookbehind, this._lookbehind_size) - this._lookbehind_size += len - - this._bufpos = len - return len + /** + * Patch requests up to the bucket's request object. + * + * @private + * + * @param {string} method Action. + * @param {string} path Request path. + * @param {*} query Request query object. + * @param {*} body Request body contents. + * @param {function} callback Callback function. + */ + request(reqOpts, callback) { + reqOpts.uri = this.pathPrefix + reqOpts.uri; + this.request_(reqOpts, callback); } - } - - pos += (pos >= 0) * this._bufpos - - // Lookbehind buffer is now empty. We only need to check if the - // needle is in the haystack. - if (data.indexOf(needle, pos) !== -1) { - pos = data.indexOf(needle, pos) - ++this.matches - if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } - - return (this._bufpos = pos + needleLength) - } else { - pos = len - needleLength - } - - // There was no match. If there's trailing haystack data that we cannot - // match yet using the Boyer-Moore-Horspool algorithm (because the trailing - // data is less than the needle size) then match using a modified - // algorithm that starts matching from the beginning instead of the end. - // Whatever trailing data is left after running this algorithm is added to - // the lookbehind buffer. - while ( - pos < len && - ( - data[pos] !== needle[0] || - ( - (Buffer.compare( - data.subarray(pos, pos + len - pos), - needle.subarray(0, len - pos) - ) !== 0) - ) - ) - ) { - ++pos - } - if (pos < len) { - data.copy(this._lookbehind, 0, pos, pos + (len - pos)) - this._lookbehind_size = len - pos - } - - // Everything until pos is guaranteed not to contain needle data. - if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } - - this._bufpos = len - return len -} - -SBMH.prototype._sbmh_lookup_char = function (data, pos) { - return (pos < 0) - ? this._lookbehind[this._lookbehind_size + pos] - : data[pos] -} - -SBMH.prototype._sbmh_memcmp = function (data, pos, len) { - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } - } - return true } - -module.exports = SBMH +exports.Acl = Acl; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Acl, { + exclude: ['request'], +}); /***/ }), -/***/ 50727: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 23973: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const WritableStream = (__nccwpck_require__(84492).Writable) -const { inherits } = __nccwpck_require__(47261) -const Dicer = __nccwpck_require__(92960) - -const MultipartParser = __nccwpck_require__(32183) -const UrlencodedParser = __nccwpck_require__(78306) -const parseParams = __nccwpck_require__(31854) - -function Busboy (opts) { - if (!(this instanceof Busboy)) { return new Busboy(opts) } - - if (typeof opts !== 'object') { - throw new TypeError('Busboy expected an options-Object.') - } - if (typeof opts.headers !== 'object') { - throw new TypeError('Busboy expected an options-Object with headers-attribute.') - } - if (typeof opts.headers['content-type'] !== 'string') { - throw new TypeError('Missing Content-Type-header.') - } - - const { - headers, - ...streamOptions - } = opts - - this.opts = { - autoDestroy: false, - ...streamOptions - } - WritableStream.call(this, this.opts) - - this._done = false - this._parser = this.getParserByHeaders(headers) - this._finished = false -} -inherits(Busboy, WritableStream) - -Busboy.prototype.emit = function (ev) { - if (ev === 'finish') { - if (!this._done) { - this._parser?.end() - return - } else if (this._finished) { - return +// Copyright 2019 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Bucket = exports.BucketExceptionMessages = exports.AvailableServiceObjectMethods = exports.BucketActionToHTTPMethod = void 0; +const index_js_1 = __nccwpck_require__(4052); +const paginator_1 = __nccwpck_require__(46412); +const promisify_1 = __nccwpck_require__(19203); +const fs = __importStar(__nccwpck_require__(57147)); +const mime_1 = __importDefault(__nccwpck_require__(29994)); +const path = __importStar(__nccwpck_require__(71017)); +const p_limit_1 = __importDefault(__nccwpck_require__(57684)); +const util_1 = __nccwpck_require__(73837); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +const util_js_1 = __nccwpck_require__(59258); +const acl_js_1 = __nccwpck_require__(22989); +const file_js_1 = __nccwpck_require__(4713); +const iam_js_1 = __nccwpck_require__(80352); +const notification_js_1 = __nccwpck_require__(21178); +const storage_js_1 = __nccwpck_require__(33030); +const signer_js_1 = __nccwpck_require__(59019); +const stream_1 = __nccwpck_require__(12781); +const url_1 = __nccwpck_require__(57310); +var BucketActionToHTTPMethod; +(function (BucketActionToHTTPMethod) { + BucketActionToHTTPMethod["list"] = "GET"; +})(BucketActionToHTTPMethod || (exports.BucketActionToHTTPMethod = BucketActionToHTTPMethod = {})); +var AvailableServiceObjectMethods; +(function (AvailableServiceObjectMethods) { + AvailableServiceObjectMethods[AvailableServiceObjectMethods["setMetadata"] = 0] = "setMetadata"; + AvailableServiceObjectMethods[AvailableServiceObjectMethods["delete"] = 1] = "delete"; +})(AvailableServiceObjectMethods || (exports.AvailableServiceObjectMethods = AvailableServiceObjectMethods = {})); +var BucketExceptionMessages; +(function (BucketExceptionMessages) { + BucketExceptionMessages["PROVIDE_SOURCE_FILE"] = "You must provide at least one source file."; + BucketExceptionMessages["DESTINATION_FILE_NOT_SPECIFIED"] = "A destination file must be specified."; + BucketExceptionMessages["CHANNEL_ID_REQUIRED"] = "An ID is required to create a channel."; + BucketExceptionMessages["TOPIC_NAME_REQUIRED"] = "A valid topic name is required."; + BucketExceptionMessages["CONFIGURATION_OBJECT_PREFIX_REQUIRED"] = "A configuration object with a prefix is required."; + BucketExceptionMessages["SPECIFY_FILE_NAME"] = "A file name must be specified."; + BucketExceptionMessages["METAGENERATION_NOT_PROVIDED"] = "A metageneration must be provided."; + BucketExceptionMessages["SUPPLY_NOTIFICATION_ID"] = "You must supply a notification ID."; +})(BucketExceptionMessages || (exports.BucketExceptionMessages = BucketExceptionMessages = {})); +/** + * @callback Crc32cGeneratorToStringCallback + * A method returning the CRC32C as a base64-encoded string. + * + * @returns {string} + * + * @example + * Hashing the string 'data' should return 'rth90Q==' + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.toString(); // 'rth90Q==' + * ``` + **/ +/** + * @callback Crc32cGeneratorValidateCallback + * A method validating a base64-encoded CRC32C string. + * + * @param {string} [value] base64-encoded CRC32C string to validate + * @returns {boolean} + * + * @example + * Should return `true` if the value matches, `false` otherwise + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.validate('DkjKuA=='); // false + * crc32c.validate('rth90Q=='); // true + * ``` + **/ +/** + * @callback Crc32cGeneratorUpdateCallback + * A method for passing `Buffer`s for CRC32C generation. + * + * @param {Buffer} [data] data to update CRC32C value with + * @returns {undefined} + * + * @example + * Hashing buffers from 'some ' and 'text\n' + * + * ```js + * const buffer1 = Buffer.from('some '); + * crc32c.update(buffer1); + * + * const buffer2 = Buffer.from('text\n'); + * crc32c.update(buffer2); + * + * crc32c.toString(); // 'DkjKuA==' + * ``` + **/ +/** + * @typedef {object} CRC32CValidator + * @property {Crc32cGeneratorToStringCallback} + * @property {Crc32cGeneratorValidateCallback} + * @property {Crc32cGeneratorUpdateCallback} + */ +/** + * A function that generates a CRC32C Validator. Defaults to {@link CRC32C} + * + * @name Bucket#crc32cGenerator + * @type {CRC32CValidator} + */ +/** + * Get and set IAM policies for your bucket. + * + * @name Bucket#iam + * @mixes Iam + * + * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} + * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} + * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Get the IAM policy for your bucket. + * //- + * bucket.iam.getPolicy(function(err, policy) { + * console.log(policy); + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.iam.getPolicy().then(function(data) { + * const policy = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/iam.js + * region_tag:storage_view_bucket_iam_members + * Example of retrieving a bucket's IAM policy: + * + * @example include:samples/iam.js + * region_tag:storage_add_bucket_iam_member + * Example of adding to a bucket's IAM policy: + * + * @example include:samples/iam.js + * region_tag:storage_remove_bucket_iam_member + * Example of removing from a bucket's IAM policy: + */ +/** + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. + * + * An ACL consists of one or more entries, where each entry grants permissions + * to an entity. Permissions define the actions that can be performed against + * an object or bucket (for example, `READ` or `WRITE`); the entity defines + * who the permission applies to (for example, a specific user or group of + * users). + * + * The `acl` object on a Bucket instance provides methods to get you a list of + * the ACLs defined on your bucket, as well as set, update, and delete them. + * + * Buckets also have + * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} + * for all created files. Default ACLs specify permissions that all new + * objects added to the bucket will inherit by default. You can add, delete, + * get, and update entities and permissions for these as well with + * {@link Bucket#acl.default}. + * + * See {@link http://goo.gl/6qBBPO| About Access Control Lists} + * See {@link https://cloud.google.com/storage/docs/access-control/lists#default| Default ACLs} + * + * @name Bucket#acl + * @mixes Acl + * @property {Acl} default Cloud Storage Buckets have + * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} + * for all created files. You can add, delete, get, and update entities and + * permissions for these as well. The method signatures and examples are all + * the same, after only prefixing the method call with `default`. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * + * //- + * // Make a bucket's contents publicly readable. + * //- + * const myBucket = storage.bucket('my-bucket'); + * + * const options = { + * entity: 'allUsers', + * role: storage.acl.READER_ROLE + * }; + * + * myBucket.acl.add(options, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl + * Example of printing a bucket's ACL: + * + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl_for_user + * Example of printing a bucket's ACL for a specific user: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_owner + * Example of adding an owner to a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_owner + * Example of removing an owner from a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_default_owner + * Example of adding a default owner to a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_default_owner + * Example of removing a default owner from a bucket: + */ +/** + * The API-formatted resource description of the bucket. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name Bucket#metadata + * @type {object} + */ +/** + * The bucket's name. + * @name Bucket#name + * @type {string} + */ +/** + * Get {@link File} objects for the files currently in the bucket as a + * readable object stream. + * + * @method Bucket#getFilesStream + * @param {GetFilesOptions} [query] Query object for listing files. + * @returns {ReadableStream} A readable stream that emits {@link File} instances. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getFilesStream() + * .on('error', console.error) + * .on('data', function(file) { + * // file is a File object. + * }) + * .on('end', function() { + * // All files retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * bucket.getFilesStream() + * .on('data', function(file) { + * this.end(); + * }); + * + * //- + * // If you're filtering files with a delimiter, you should use + * // {@link Bucket#getFiles} and set `autoPaginate: false` in order to + * // preserve the `apiResponse` argument. + * //- + * const prefixes = []; + * + * function callback(err, files, nextQuery, apiResponse) { + * prefixes = prefixes.concat(apiResponse.prefixes); + * + * if (nextQuery) { + * bucket.getFiles(nextQuery, callback); + * } else { + * // prefixes = The finished array of prefixes. + * } + * } + * + * bucket.getFiles({ + * autoPaginate: false, + * delimiter: '/' + * }, callback); + * ``` + */ +/** + * Create a Bucket object to interact with a Cloud Storage bucket. + * + * @class + * @hideconstructor + * + * @param {Storage} storage A {@link Storage} instance. + * @param {string} name The name of the bucket. + * @param {object} [options] Configuration object. + * @param {string} [options.userProject] User project. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * ``` + */ +class Bucket extends index_js_1.ServiceObject { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + getFilesStream(query) { + // placeholder body, overwritten in constructor + return new stream_1.Readable(); } - this._finished = true - } - WritableStream.prototype.emit.apply(this, arguments) -} - -Busboy.prototype.getParserByHeaders = function (headers) { - const parsed = parseParams(headers['content-type']) - - const cfg = { - defCharset: this.opts.defCharset, - fileHwm: this.opts.fileHwm, - headers, - highWaterMark: this.opts.highWaterMark, - isPartAFile: this.opts.isPartAFile, - limits: this.opts.limits, - parsedConType: parsed, - preservePath: this.opts.preservePath - } - - if (MultipartParser.detect.test(parsed[0])) { - return new MultipartParser(this, cfg) - } - if (UrlencodedParser.detect.test(parsed[0])) { - return new UrlencodedParser(this, cfg) - } - throw new Error('Unsupported Content-Type.') -} - -Busboy.prototype._write = function (chunk, encoding, cb) { - this._parser.write(chunk, cb) -} - -module.exports = Busboy -module.exports["default"] = Busboy -module.exports.Busboy = Busboy - -module.exports.Dicer = Dicer - - -/***/ }), - -/***/ 32183: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// TODO: -// * support 1 nested multipart level -// (see second multipart example here: -// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) -// * support limits.fieldNameSize -// -- this will require modifications to utils.parseParams - -const { Readable } = __nccwpck_require__(84492) -const { inherits } = __nccwpck_require__(47261) - -const Dicer = __nccwpck_require__(92960) - -const parseParams = __nccwpck_require__(31854) -const decodeText = __nccwpck_require__(84619) -const basename = __nccwpck_require__(48647) -const getLimit = __nccwpck_require__(21467) - -const RE_BOUNDARY = /^boundary$/i -const RE_FIELD = /^form-data$/i -const RE_CHARSET = /^charset$/i -const RE_FILENAME = /^filename$/i -const RE_NAME = /^name$/i - -Multipart.detect = /^multipart\/form-data/i -function Multipart (boy, cfg) { - let i - let len - const self = this - let boundary - const limits = cfg.limits - const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) - const parsedConType = cfg.parsedConType || [] - const defCharset = cfg.defCharset || 'utf8' - const preservePath = cfg.preservePath - const fileOpts = { highWaterMark: cfg.fileHwm } - - for (i = 0, len = parsedConType.length; i < len; ++i) { - if (Array.isArray(parsedConType[i]) && - RE_BOUNDARY.test(parsedConType[i][0])) { - boundary = parsedConType[i][1] - break + constructor(storage, name, options) { + var _a, _b, _c, _d; + options = options || {}; + // Allow for "gs://"-style input, and strip any trailing slashes. + name = name.replace(/^gs:\/\//, '').replace(/\/+$/, ''); + const requestQueryObject = {}; + if ((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { + requestQueryObject.ifGenerationMatch = + options.preconditionOpts.ifGenerationMatch; + } + if ((_b = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { + requestQueryObject.ifGenerationNotMatch = + options.preconditionOpts.ifGenerationNotMatch; + } + if ((_c = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { + requestQueryObject.ifMetagenerationMatch = + options.preconditionOpts.ifMetagenerationMatch; + } + if ((_d = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { + requestQueryObject.ifMetagenerationNotMatch = + options.preconditionOpts.ifMetagenerationNotMatch; + } + const userProject = options.userProject; + if (typeof userProject === 'string') { + requestQueryObject.userProject = userProject; + } + const methods = { + /** + * Create a bucket. + * + * @method Bucket#create + * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. + * @param {CreateBucketCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * bucket.create(function(err, bucket, apiResponse) { + * if (!err) { + * // The bucket was created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.create().then(function(data) { + * const bucket = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + create: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * IamDeleteBucketOptions Configuration options. + * @property {boolean} [ignoreNotFound = false] Ignore an error if + * the bucket does not exist. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} DeleteBucketResponse + * @property {object} 0 The full API response. + */ + /** + * @callback DeleteBucketCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Delete the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/delete| Buckets: delete API Documentation} + * + * @method Bucket#delete + * @param {DeleteBucketOptions} [options] Configuration options. + * @param {boolean} [options.ignoreNotFound = false] Ignore an error if + * the bucket does not exist. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {DeleteBucketCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * bucket.delete(function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/buckets.js + * region_tag:storage_delete_bucket + * Another example: + */ + delete: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {object} BucketExistsOptions Configuration options for Bucket#exists(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} BucketExistsResponse + * @property {boolean} 0 Whether the {@link Bucket} exists. + */ + /** + * @callback BucketExistsCallback + * @param {?Error} err Request error, if any. + * @param {boolean} exists Whether the {@link Bucket} exists. + */ + /** + * Check if the bucket exists. + * + * @method Bucket#exists + * @param {BucketExistsOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {BucketExistsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.exists(function(err, exists) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.exists().then(function(data) { + * const exists = data[0]; + * }); + * ``` + */ + exists: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {object} [GetBucketOptions] Configuration options for Bucket#get() + * @property {boolean} [autoCreate] Automatically create the object if + * it does not exist. Default: `false` + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} GetBucketResponse + * @property {Bucket} 0 The {@link Bucket}. + * @property {object} 1 The full API response. + */ + /** + * @callback GetBucketCallback + * @param {?Error} err Request error, if any. + * @param {Bucket} bucket The {@link Bucket}. + * @param {object} apiResponse The full API response. + */ + /** + * Get a bucket if it exists. + * + * You may optionally use this to "get or create" an object by providing + * an object with `autoCreate` set to `true`. Any extra configuration that + * is normally required for the `create` method must be contained within + * this object as well. + * + * @method Bucket#get + * @param {GetBucketOptions} [options] Configuration options. + * @param {boolean} [options.autoCreate] Automatically create the object if + * it does not exist. Default: `false` + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetBucketCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.get(function(err, bucket, apiResponse) { + * // `bucket.metadata` has been populated. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.get().then(function(data) { + * const bucket = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + get: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {array} GetBucketMetadataResponse + * @property {object} 0 The bucket metadata. + * @property {object} 1 The full API response. + */ + /** + * @callback GetBucketMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The bucket metadata. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {object} GetBucketMetadataOptions Configuration options for Bucket#getMetadata(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Get the bucket's metadata. + * + * To set metadata, see {@link Bucket#setMetadata}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/get| Buckets: get API Documentation} + * + * @method Bucket#getMetadata + * @param {GetBucketMetadataOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getMetadata().then(function(data) { + * const metadata = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/requesterPays.js + * region_tag:storage_get_requester_pays_status + * Example of retrieving the requester pays status of a bucket: + */ + getMetadata: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {object} SetBucketMetadataOptions Configuration options for Bucket#setMetadata(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} SetBucketMetadataResponse + * @property {object} apiResponse The full API response. + */ + /** + * @callback SetBucketMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The bucket metadata. + */ + /** + * Set the bucket's metadata. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @method Bucket#setMetadata + * @param {object} metadata The metadata you wish to set. + * @param {SetBucketMetadataOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Set website metadata field on the bucket. + * //- + * const metadata = { + * website: { + * mainPageSuffix: 'http://example.com', + * notFoundPage: 'http://example.com/404.html' + * } + * }; + * + * bucket.setMetadata(metadata, function(err, apiResponse) {}); + * + * //- + * // Enable versioning for your bucket. + * //- + * bucket.setMetadata({ + * versioning: { + * enabled: true + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Enable KMS encryption for objects within this bucket. + * //- + * bucket.setMetadata({ + * encryption: { + * defaultKmsKeyName: 'projects/grape-spaceship-123/...' + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Set the default event-based hold value for new objects in this + * // bucket. + * //- + * bucket.setMetadata({ + * defaultEventBasedHold: true + * }, function(err, apiResponse) {}); + * + * //- + * // Remove object lifecycle rules. + * //- + * bucket.setMetadata({ + * lifecycle: null + * }, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setMetadata(metadata).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + setMetadata: { + reqOpts: { + qs: requestQueryObject, + }, + }, + }; + super({ + parent: storage, + baseUrl: '/b', + id: name, + createMethod: storage.createBucket.bind(storage), + methods, + }); + /** + * Indicates whether this Bucket object is a placeholder for an item + * that the API failed to retrieve (unreachable) due to partial failure. + * Consumers must check this flag before accessing other properties. + */ + this.unreachable = false; + this.name = name; + this.storage = storage; + this.userProject = options.userProject; + this.acl = new acl_js_1.Acl({ + request: this.request.bind(this), + pathPrefix: '/acl', + }); + this.acl.default = new acl_js_1.Acl({ + request: this.request.bind(this), + pathPrefix: '/defaultObjectAcl', + }); + this.crc32cGenerator = + options.crc32cGenerator || this.storage.crc32cGenerator; + this.iam = new iam_js_1.Iam(this); + this.getFilesStream = paginator_1.paginator.streamify('getFiles'); + this.instanceRetryValue = storage.retryOptions.autoRetry; + this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts; + } + /** + * The bucket's Cloud Storage URI (`gs://`) + * + * @example + * ```ts + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * + * // `gs://my-bucket` + * const href = bucket.cloudStorageURI.href; + * ``` + */ + get cloudStorageURI() { + const uri = new url_1.URL('gs://'); + uri.host = this.name; + return uri; } - } - - function checkFinished () { - if (nends === 0 && finished && !boy._done) { - finished = false - self.end() + /** + * @typedef {object} AddLifecycleRuleOptions Configuration options for Bucket#addLifecycleRule(). + * @property {boolean} [append=true] The new rules will be appended to any + * pre-existing rules. + */ + /** + * + * @typedef {object} LifecycleRule The new lifecycle rule to be added to objects + * in this bucket. + * @property {string|object} action The action to be taken upon matching of + * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. + * **Note**: For configuring a raw-formatted rule object to be passed as `action` + * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. + * @property {object} condition Condition a bucket must meet before the + * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. + * @property {string} [storageClass] When using the `setStorageClass` + * action, provide this option to dictate which storage class the object + * should update to. Please see + * [SetStorageClass option documentation]{@link https://cloud.google.com/storage/docs/lifecycle#setstorageclass} for supported transitions. + */ + /** + * Add an object lifecycle management rule to the bucket. + * + * By default, an Object Lifecycle Management rule provided to this method + * will be included to the existing policy. To replace all existing rules, + * supply the `options` argument, setting `append` to `false`. + * + * To add multiple rules, pass a list to the `rule` parameter. Calling this + * function multiple times asynchronously does not guarantee that all rules + * are added correctly. + * + * See {@link https://cloud.google.com/storage/docs/lifecycle| Object Lifecycle Management} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @param {LifecycleRule|LifecycleRule[]} rule The new lifecycle rule or rules to be added to objects + * in this bucket. + * @param {string|object} rule.action The action to be taken upon matching of + * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. + * **Note**: For configuring a raw-formatted rule object to be passed as `action` + * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. + * @param {object} rule.condition Condition a bucket must meet before the + * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. + * @param {string} [rule.storageClass] When using the `setStorageClass` + * action, provide this option to dictate which storage class the object + * should update to. + * @param {AddLifecycleRuleOptions} [options] Configuration object. + * @param {boolean} [options.append=true] Append the new rule to the existing + * policy. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Automatically have an object deleted from this bucket once it is 3 years + * // of age. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * age: 365 * 3 // Specified in days. + * } + * }, function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * const lifecycleRules = bucket.metadata.lifecycle.rule; + * + * // Iterate over the Object Lifecycle Management rules on this bucket. + * lifecycleRules.forEach(lifecycleRule => {}); + * }); + * + * //- + * // By default, the rule you provide will be added to the existing policy. + * // Optionally, you can disable this behavior to replace all of the + * // pre-existing rules. + * //- + * const options = { + * append: false + * }; + * + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * age: 365 * 3 // Specified in days. + * } + * }, options, function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * // All rules have been replaced with the new "delete" rule. + * + * // Iterate over the Object Lifecycle Management rules on this bucket. + * lifecycleRules.forEach(lifecycleRule => {}); + * }); + * + * //- + * // For objects created before 2018, "downgrade" the storage class. + * //- + * bucket.addLifecycleRule({ + * action: 'setStorageClass', + * storageClass: 'COLDLINE', + * condition: { + * createdBefore: new Date('2018') + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete objects created before 2016 which have the Coldline storage + * // class. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * matchesStorageClass: [ + * 'COLDLINE' + * ], + * createdBefore: new Date('2016') + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete object that has a noncurrent timestamp that is at least 100 days. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * daysSinceNoncurrentTime: 100 + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete object that has a noncurrent timestamp before 2020-01-01. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * noncurrentTimeBefore: new Date('2020-01-01') + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete object that has a customTime that is at least 100 days. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * daysSinceCustomTime: 100 + * } + * }, function(err, apiResponse) ()); + * + * //- + * // Delete object that has a customTime before 2020-01-01. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * customTimeBefore: new Date('2020-01-01') + * } + * }, function(err, apiResponse) {}); + * ``` + */ + addLifecycleRule(rule, optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + options = options || {}; + const rules = Array.isArray(rule) ? rule : [rule]; + for (const curRule of rules) { + if (curRule.condition.createdBefore instanceof Date) { + curRule.condition.createdBefore = curRule.condition.createdBefore + .toISOString() + .replace(/T.+$/, ''); + } + if (curRule.condition.customTimeBefore instanceof Date) { + curRule.condition.customTimeBefore = curRule.condition.customTimeBefore + .toISOString() + .replace(/T.+$/, ''); + } + if (curRule.condition.noncurrentTimeBefore instanceof Date) { + curRule.condition.noncurrentTimeBefore = + curRule.condition.noncurrentTimeBefore + .toISOString() + .replace(/T.+$/, ''); + } + } + if (options.append === false) { + this.setMetadata({ lifecycle: { rule: rules } }, options, callback); + return; + } + // The default behavior appends the previously-defined lifecycle rules with + // the new ones just passed in by the user. + this.getMetadata((err, metadata) => { + var _a, _b; + if (err) { + callback(err); + return; + } + const currentLifecycleRules = Array.isArray((_a = metadata.lifecycle) === null || _a === void 0 ? void 0 : _a.rule) + ? (_b = metadata.lifecycle) === null || _b === void 0 ? void 0 : _b.rule + : []; + this.setMetadata({ + lifecycle: { rule: currentLifecycleRules.concat(rules) }, + }, options, callback); + }); } - } - - if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } - - const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) - const filesLimit = getLimit(limits, 'files', Infinity) - const fieldsLimit = getLimit(limits, 'fields', Infinity) - const partsLimit = getLimit(limits, 'parts', Infinity) - const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) - const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) - - let nfiles = 0 - let nfields = 0 - let nends = 0 - let curFile - let curField - let finished = false - - this._needDrain = false - this._pause = false - this._cb = undefined - this._nparts = 0 - this._boy = boy - - const parserCfg = { - boundary, - maxHeaderPairs: headerPairsLimit, - maxHeaderSize: headerSizeLimit, - partHwm: fileOpts.highWaterMark, - highWaterMark: cfg.highWaterMark - } - - this.parser = new Dicer(parserCfg) - this.parser.on('drain', function () { - self._needDrain = false - if (self._cb && !self._pause) { - const cb = self._cb - self._cb = undefined - cb() + /** + * @typedef {object} CombineOptions + * @property {string} [kmsKeyName] Resource name of the Cloud KMS key, of + * the form + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, + * that will be used to encrypt the object. Overwrites the object + * metadata's `kms_key_name` value, if any. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @callback CombineCallback + * @param {?Error} err Request error, if any. + * @param {File} newFile The new {@link File}. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {array} CombineResponse + * @property {File} 0 The new {@link File}. + * @property {object} 1 The full API response. + */ + /** + * Combine multiple files into one new file. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/compose| Objects: compose API Documentation} + * + * @throws {Error} if a non-array is provided as sources argument. + * @throws {Error} if no sources are provided. + * @throws {Error} if no destination is provided. + * + * @param {string[]|File[]} sources The source files that will be + * combined. + * @param {string|File} destination The file you would like the + * source files combined into. + * @param {CombineOptions} [options] Configuration options. + * @param {string} [options.kmsKeyName] Resource name of the Cloud KMS key, of + * the form + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, + * that will be used to encrypt the object. Overwrites the object + * metadata's `kms_key_name` value, if any. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + + * @param {CombineCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const logBucket = storage.bucket('log-bucket'); + * + * const sources = [ + * logBucket.file('2013-logs.txt'), + * logBucket.file('2014-logs.txt') + * ]; + * + * const allLogs = logBucket.file('all-logs.txt'); + * + * logBucket.combine(sources, allLogs, function(err, newFile, apiResponse) { + * // newFile === allLogs + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * logBucket.combine(sources, allLogs).then(function(data) { + * const newFile = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + combine(sources, destination, optionsOrCallback, callback) { + var _a; + if (!Array.isArray(sources) || sources.length === 0) { + throw new Error(BucketExceptionMessages.PROVIDE_SOURCE_FILE); + } + if (!destination) { + throw new Error(BucketExceptionMessages.DESTINATION_FILE_NOT_SPECIFIED); + } + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, // Not relevant but param is required + AvailableServiceObjectMethods.setMetadata, // Same as above + options); + const convertToFile = (file) => { + if (file instanceof file_js_1.File) { + return file; + } + return this.file(file); + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sources = sources.map(convertToFile); + const destinationFile = convertToFile(destination); + callback = callback || index_js_1.util.noop; + if (!destinationFile.metadata.contentType) { + const destinationContentType = mime_1.default.getType(destinationFile.name) || undefined; + if (destinationContentType) { + destinationFile.metadata.contentType = destinationContentType; + } + } + let maxRetries = this.storage.retryOptions.maxRetries; + if ((((_a = destinationFile === null || destinationFile === void 0 ? void 0 : destinationFile.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === + undefined && + options.ifGenerationMatch === undefined && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + maxRetries = 0; + } + if (options.ifGenerationMatch === undefined) { + Object.assign(options, destinationFile.instancePreconditionOpts, options); + } + // Make the request from the destination File object. + destinationFile.request({ + method: 'POST', + uri: '/compose', + maxRetries, + json: { + destination: { + contentType: destinationFile.metadata.contentType, + contentEncoding: destinationFile.metadata.contentEncoding, + }, + sourceObjects: sources.map(source => { + const sourceObject = { + name: source.name, + }; + if (source.metadata && source.metadata.generation) { + sourceObject.generation = parseInt(source.metadata.generation.toString()); + } + return sourceObject; + }), + }, + qs: options, + }, (err, resp) => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + if (err) { + callback(err, null, resp); + return; + } + callback(null, destinationFile, resp); + }); + } + /** + * See a {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll request body}. + * + * @typedef {object} CreateChannelConfig + * @property {string} address The address where notifications are + * delivered for this channel. + * @property {string} [delimiter] Returns results in a directory-like mode. + * @property {number} [maxResults] Maximum number of `items` plus `prefixes` + * to return in a single page of responses. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @property {string} [prefix] Filter results to objects whose names begin + * with this prefix. + * @property {string} [projection=noAcl] Set of properties to return. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {boolean} [versions=false] If `true`, lists all versions of an object + * as distinct results. + */ + /** + * @typedef {object} CreateChannelOptions + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} CreateChannelResponse + * @property {Channel} 0 The new {@link Channel}. + * @property {object} 1 The full API response. + */ + /** + * @callback CreateChannelCallback + * @param {?Error} err Request error, if any. + * @param {Channel} channel The new {@link Channel}. + * @param {object} apiResponse The full API response. + */ + /** + * Create a channel that will be notified when objects in this bucket changes. + * + * @throws {Error} If an ID is not provided. + * @throws {Error} If an address is not provided. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll API Documentation} + * + * @param {string} id The ID of the channel to create. + * @param {CreateChannelConfig} config Configuration for creating channel. + * @param {string} config.address The address where notifications are + * delivered for this channel. + * @param {string} [config.delimiter] Returns results in a directory-like mode. + * @param {number} [config.maxResults] Maximum number of `items` plus `prefixes` + * to return in a single page of responses. + * @param {string} [config.pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @param {string} [config.prefix] Filter results to objects whose names begin + * with this prefix. + * @param {string} [config.projection=noAcl] Set of properties to return. + * @param {string} [config.userProject] The ID of the project which will be + * billed for the request. + * @param {boolean} [config.versions=false] If `true`, lists all versions of an object + * as distinct results. + * @param {CreateChannelOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {CreateChannelCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * const id = 'new-channel-id'; + * + * const config = { + * address: 'https://...' + * }; + * + * bucket.createChannel(id, config, function(err, channel, apiResponse) { + * if (!err) { + * // Channel created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.createChannel(id, config).then(function(data) { + * const channel = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + createChannel(id, config, optionsOrCallback, callback) { + if (typeof id !== 'string') { + throw new Error(BucketExceptionMessages.CHANNEL_ID_REQUIRED); + } + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.request({ + method: 'POST', + uri: '/o/watch', + json: Object.assign({ + id, + type: 'web_hook', + }, config), + qs: options, + }, (err, apiResponse) => { + if (err) { + callback(err, null, apiResponse); + return; + } + const resourceId = apiResponse.resourceId; + const channel = this.storage.channel(id, resourceId); + channel.metadata = apiResponse; + callback(null, channel, apiResponse); + }); } - }).on('part', function onPart (part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener('part', onPart) - self.parser.on('part', skipPart) - boy.hitPartsLimit = true - boy.emit('partsLimit') - return skipPart(part) + /** + * Metadata to set for the Notification. + * + * @typedef {object} CreateNotificationOptions + * @property {object} [customAttributes] An optional list of additional + * attributes to attach to each Cloud PubSub message published for this + * notification subscription. + * @property {string[]} [eventTypes] If present, only send notifications about + * listed event types. If empty, sent notifications for all event types. + * @property {string} [objectNamePrefix] If present, only apply this + * notification configuration to object names that begin with this prefix. + * @property {string} [payloadFormat] The desired content of the Payload. + * Defaults to `JSON_API_V1`. + * + * Acceptable values are: + * - `JSON_API_V1` + * + * - `NONE` + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @callback CreateNotificationCallback + * @param {?Error} err Request error, if any. + * @param {Notification} notification The new {@link Notification}. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {array} CreateNotificationResponse + * @property {Notification} 0 The new {@link Notification}. + * @property {object} 1 The full API response. + */ + /** + * Creates a notification subscription for the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} + * + * @param {Topic|string} topic The Cloud PubSub topic to which this + * subscription publishes. If the project ID is omitted, the current + * project ID will be used. + * + * Acceptable formats are: + * - `projects/grape-spaceship-123/topics/my-topic` + * + * - `my-topic` + * @param {CreateNotificationOptions} [options] Metadata to set for the + * notification. + * @param {object} [options.customAttributes] An optional list of additional + * attributes to attach to each Cloud PubSub message published for this + * notification subscription. + * @param {string[]} [options.eventTypes] If present, only send notifications about + * listed event types. If empty, sent notifications for all event types. + * @param {string} [options.objectNamePrefix] If present, only apply this + * notification configuration to object names that begin with this prefix. + * @param {string} [options.payloadFormat] The desired content of the Payload. + * Defaults to `JSON_API_V1`. + * + * Acceptable values are: + * - `JSON_API_V1` + * + * - `NONE` + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {CreateNotificationCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a valid topic is not provided. + * @see Notification#create + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const callback = function(err, notification, apiResponse) { + * if (!err) { + * // The notification was created successfully. + * } + * }; + * + * myBucket.createNotification('my-topic', callback); + * + * //- + * // Configure the notification by providing Notification metadata. + * //- + * const metadata = { + * objectNamePrefix: 'prefix-' + * }; + * + * myBucket.createNotification('my-topic', metadata, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.createNotification('my-topic').then(function(data) { + * const notification = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/createNotification.js + * region_tag:storage_create_bucket_notifications + * Another example: + */ + createNotification(topic, optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + const topicIsObject = topic !== null && typeof topic === 'object'; + if (topicIsObject && index_js_1.util.isCustomType(topic, 'pubsub/topic')) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + topic = topic.name; + } + if (typeof topic !== 'string') { + throw new Error(BucketExceptionMessages.TOPIC_NAME_REQUIRED); + } + const body = Object.assign({ topic }, options); + if (body.topic.indexOf('projects') !== 0) { + body.topic = 'projects/{{projectId}}/topics/' + body.topic; + } + body.topic = `//pubsub.${this.storage.universeDomain}/` + body.topic; + if (!body.payloadFormat) { + body.payloadFormat = 'JSON_API_V1'; + } + const query = {}; + if (body.userProject) { + query.userProject = body.userProject; + delete body.userProject; + } + this.request({ + method: 'POST', + uri: '/notificationConfigs', + json: (0, util_js_1.convertObjKeysToSnakeCase)(body), + qs: query, + maxRetries: 0, //explicitly set this value since this is a non-idempotent function + }, (err, apiResponse) => { + if (err) { + callback(err, null, apiResponse); + return; + } + const notification = this.notification(apiResponse.id); + notification.metadata = apiResponse; + callback(null, notification, apiResponse); + }); } - - // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let - // us emit 'end' early since we know the part has ended if we are already - // seeing the next part - if (curField) { - const field = curField - field.emit('end') - field.removeAllListeners('end') + /** + * @typedef {object} DeleteFilesOptions Query object. See {@link Bucket#getFiles} + * for all of the supported properties. + * @property {boolean} [force] Suppress errors until all files have been + * processed. + */ + /** + * @callback DeleteFilesCallback + * @param {?Error|?Error[]} err Request error, if any, or array of errors from + * files that were not able to be deleted. + * @param {object} [apiResponse] The full API response. + */ + /** + * Iterate over the bucket's files, calling `file.delete()` on each. + * + * This is not an atomic request. A delete attempt will be + * made for each file individually. Any one can fail, in which case only a + * portion of the files you intended to be deleted would have. + * + * Operations are performed in parallel, up to 10 at once. The first error + * breaks the loop and will execute the provided callback with it. Specify + * `{ force: true }` to suppress the errors until all files have had a chance + * to be processed. + * + * File preconditions cannot be passed to this function. It will not retry unless + * the idempotency strategy is set to retry always. + * + * The `query` object passed as the first argument will also be passed to + * {@link Bucket#getFiles}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} + * + * @param {DeleteFilesOptions} [query] Query object. See {@link Bucket#getFiles} + * @param {boolean} [query.force] Suppress errors until all files have been + * processed. + * @param {DeleteFilesCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Delete all of the files in the bucket. + * //- + * bucket.deleteFiles(function(err) {}); + * + * //- + * // By default, if a file cannot be deleted, this method will stop deleting + * // files from your bucket. You can override this setting with `force: + * // true`. + * //- + * bucket.deleteFiles({ + * force: true + * }, function(errors) { + * // `errors`: + * // Array of errors if any occurred, otherwise null. + * }); + * + * //- + * // The first argument to this method acts as a query to + * // {@link Bucket#getFiles}. As an example, you can delete files + * // which match a prefix. + * //- + * bucket.deleteFiles({ + * prefix: 'images/' + * }, function(err) { + * if (!err) { + * // All files in the `images` directory have been deleted. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.deleteFiles().then(function() {}); + * ``` + */ + deleteFiles(queryOrCallback, callback) { + let query = {}; + if (typeof queryOrCallback === 'function') { + callback = queryOrCallback; + } + else if (queryOrCallback) { + query = queryOrCallback; + } + const MAX_PARALLEL_LIMIT = 10; + const MAX_QUEUE_SIZE = 1000; + const errors = []; + const deleteFile = (file) => { + return file.delete(query).catch(err => { + if (!query.force) { + throw err; + } + errors.push(err); + }); + }; + (async () => { + try { + let promises = []; + const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); + const filesStream = this.getFilesStream(query); + for await (const curFile of filesStream) { + if (promises.length >= MAX_QUEUE_SIZE) { + await Promise.all(promises); + promises = []; + } + promises.push(limit(() => deleteFile(curFile)).catch(e => { + filesStream.destroy(); + throw e; + })); + } + await Promise.all(promises); + callback(errors.length > 0 ? errors : null); + } + catch (e) { + callback(e); + return; + } + })(); } - - part.on('header', function (header) { - let contype - let fieldname - let parsed - let charset - let encoding - let filename - let nsize = 0 - - if (header['content-type']) { - parsed = parseParams(header['content-type'][0]) - if (parsed[0]) { - contype = parsed[0].toLowerCase() - for (i = 0, len = parsed.length; i < len; ++i) { - if (RE_CHARSET.test(parsed[i][0])) { - charset = parsed[i][1].toLowerCase() - break + /** + * @deprecated + * @typedef {array} DeleteLabelsResponse + * @property {object} 0 The full API response. + */ + /** + * @deprecated + * @callback DeleteLabelsCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata Bucket's metadata. + */ + /** + * @deprecated Use setMetadata directly + * Delete one or more labels from this bucket. + * + * @param {string|string[]} [labels] The labels to delete. If no labels are + * provided, all of the labels are removed. + * @param {DeleteLabelsCallback} [callback] Callback function. + * @param {DeleteLabelsOptions} [options] Options, including precondition options + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Delete all of the labels from this bucket. + * //- + * bucket.deleteLabels(function(err, apiResponse) {}); + * + * //- + * // Delete a single label. + * //- + * bucket.deleteLabels('labelone', function(err, apiResponse) {}); + * + * //- + * // Delete a specific set of labels. + * //- + * bucket.deleteLabels([ + * 'labelone', + * 'labeltwo' + * ], function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.deleteLabels().then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + deleteLabels(labelsOrCallbackOrOptions, optionsOrCallback, callback) { + let labels = new Array(); + let options = {}; + if (typeof labelsOrCallbackOrOptions === 'function') { + callback = labelsOrCallbackOrOptions; + } + else if (typeof labelsOrCallbackOrOptions === 'string') { + labels = [labelsOrCallbackOrOptions]; + } + else if (Array.isArray(labelsOrCallbackOrOptions)) { + labels = labelsOrCallbackOrOptions; + } + else if (labelsOrCallbackOrOptions) { + options = labelsOrCallbackOrOptions; + } + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + const deleteLabels = (labels) => { + const nullLabelMap = labels.reduce((nullLabelMap, labelKey) => { + nullLabelMap[labelKey] = null; + return nullLabelMap; + }, {}); + if ((options === null || options === void 0 ? void 0 : options.ifMetagenerationMatch) !== undefined) { + this.setLabels(nullLabelMap, options, callback); } - } + else { + this.setLabels(nullLabelMap, callback); + } + }; + if (labels.length === 0) { + this.getLabels((err, labels) => { + if (err) { + callback(err); + return; + } + deleteLabels(Object.keys(labels)); + }); } - } - - if (contype === undefined) { contype = 'text/plain' } - if (charset === undefined) { charset = defCharset } - - if (header['content-disposition']) { - parsed = parseParams(header['content-disposition'][0]) - if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } - for (i = 0, len = parsed.length; i < len; ++i) { - if (RE_NAME.test(parsed[i][0])) { - fieldname = parsed[i][1] - } else if (RE_FILENAME.test(parsed[i][0])) { - filename = parsed[i][1] - if (!preservePath) { filename = basename(filename) } - } + else { + deleteLabels(labels); } - } else { return skipPart(part) } - - if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } - - let onData, - onEnd - - if (isPartAFile(fieldname, contype, filename)) { - // file/binary field - if (nfiles === filesLimit) { - if (!boy.hitFilesLimit) { - boy.hitFilesLimit = true - boy.emit('filesLimit') - } - return skipPart(part) + } + /** + * @typedef {array} DisableRequesterPaysResponse + * @property {object} 0 The full API response. + */ + /** + * @callback DisableRequesterPaysCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + *

+ * Early Access Testers Only + *

+ * This feature is not yet widely-available. + *

+ *
+ * + * Disable `requesterPays` functionality from this bucket. + * + * @param {DisableRequesterPaysCallback} [callback] Callback function. + * @param {DisableRequesterPaysOptions} [options] Options, including precondition options + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.disableRequesterPays(function(err, apiResponse) { + * if (!err) { + * // requesterPays functionality disabled successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.disableRequesterPays().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/requesterPays.js + * region_tag:storage_disable_requester_pays + * Example of disabling requester pays: + */ + disableRequesterPays(optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; } - - ++nfiles - - if (!boy._events.file) { - self.parser._ignore() - return + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.setMetadata({ + billing: { + requesterPays: false, + }, + }, options, callback); + } + /** + * Configuration object for enabling logging. + * + * @typedef {object} EnableLoggingOptions + * @property {string|Bucket} [bucket] The bucket for the log entries. By + * default, the current bucket is used. + * @property {string} prefix A unique prefix for log object names. + */ + /** + * Enable logging functionality for this bucket. This will make two API + * requests, first to grant Cloud Storage WRITE permission to the bucket, then + * to set the appropriate configuration on the Bucket's metadata. + * + * @param {EnableLoggingOptions} config Configuration options. + * @param {string|Bucket} [config.bucket] The bucket for the log entries. By + * default, the current bucket is used. + * @param {string} config.prefix A unique prefix for log object names. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * const config = { + * prefix: 'log' + * }; + * + * bucket.enableLogging(config, function(err, apiResponse) { + * if (!err) { + * // Logging functionality enabled successfully. + * } + * }); + * + * ``` + * @example + * Optionally, provide a destination bucket. + * ``` + * const config = { + * prefix: 'log', + * bucket: 'destination-bucket' + * }; + * + * bucket.enableLogging(config, function(err, apiResponse) {}); + * ``` + * + * @example + * If the callback is omitted, we'll return a Promise. + * ``` + * bucket.enableLogging(config).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + enableLogging(config, callback) { + if (!config || + typeof config === 'function' || + typeof config.prefix === 'undefined') { + throw new Error(BucketExceptionMessages.CONFIGURATION_OBJECT_PREFIX_REQUIRED); } - - ++nends - const file = new FileStream(fileOpts) - curFile = file - file.on('end', function () { - --nends - self._pause = false - checkFinished() - if (self._cb && !self._needDrain) { - const cb = self._cb - self._cb = undefined - cb() - } - }) - file._read = function (n) { - if (!self._pause) { return } - self._pause = false - if (self._cb && !self._needDrain) { - const cb = self._cb - self._cb = undefined - cb() - } + let logBucket = this.id; + if (config.bucket && config.bucket instanceof Bucket) { + logBucket = config.bucket.id; } - boy.emit('file', fieldname, file, filename, encoding, contype) - - onData = function (data) { - if ((nsize += data.length) > fileSizeLimit) { - const extralen = fileSizeLimit - nsize + data.length - if (extralen > 0) { file.push(data.slice(0, extralen)) } - file.truncated = true - file.bytesRead = fileSizeLimit - part.removeAllListeners('data') - file.emit('limit') - return - } else if (!file.push(data)) { self._pause = true } - - file.bytesRead = nsize + else if (config.bucket && typeof config.bucket === 'string') { + logBucket = config.bucket; } - - onEnd = function () { - curFile = undefined - file.push(null) + const options = {}; + if (config === null || config === void 0 ? void 0 : config.ifMetagenerationMatch) { + options.ifMetagenerationMatch = config.ifMetagenerationMatch; } - } else { - // non-file field - if (nfields === fieldsLimit) { - if (!boy.hitFieldsLimit) { - boy.hitFieldsLimit = true - boy.emit('fieldsLimit') - } - return skipPart(part) + if (config === null || config === void 0 ? void 0 : config.ifMetagenerationNotMatch) { + options.ifMetagenerationNotMatch = config.ifMetagenerationNotMatch; } - - ++nfields - ++nends - let buffer = '' - let truncated = false - curField = part - - onData = function (data) { - if ((nsize += data.length) > fieldSizeLimit) { - const extralen = (fieldSizeLimit - (nsize - data.length)) - buffer += data.toString('binary', 0, extralen) - truncated = true - part.removeAllListeners('data') - } else { buffer += data.toString('binary') } + (async () => { + try { + const [policy] = await this.iam.getPolicy(); + policy.bindings.push({ + members: ['group:cloud-storage-analytics@google.com'], + role: 'roles/storage.objectCreator', + }); + await this.iam.setPolicy(policy); + this.setMetadata({ + logging: { + logBucket, + logObjectPrefix: config.prefix, + }, + }, options, callback); + } + catch (e) { + callback(e); + return; + } + })(); + } + /** + * @typedef {array} EnableRequesterPaysResponse + * @property {object} 0 The full API response. + */ + /** + * @callback EnableRequesterPaysCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + *
+ * Early Access Testers Only + *

+ * This feature is not yet widely-available. + *

+ *
+ * + * Enable `requesterPays` functionality for this bucket. This enables you, the + * bucket owner, to have the requesting user assume the charges for the access + * to your bucket and its contents. + * + * @param {EnableRequesterPaysCallback | EnableRequesterPaysOptions} [optionsOrCallback] + * Callback function or precondition options. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.enableRequesterPays(function(err, apiResponse) { + * if (!err) { + * // requesterPays functionality enabled successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.enableRequesterPays().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/requesterPays.js + * region_tag:storage_enable_requester_pays + * Example of enabling requester pays: + */ + enableRequesterPays(optionsOrCallback, cb) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + cb = optionsOrCallback; } - - onEnd = function () { - curField = undefined - if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } - boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) - --nends - checkFinished() + else if (optionsOrCallback) { + options = optionsOrCallback; } - } - - /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become - broken. Streams2/streams3 is a huge black box of confusion, but - somehow overriding the sync state seems to fix things again (and still - seems to work for previous node versions). - */ - part._readableState.sync = false - - part.on('data', onData) - part.on('end', onEnd) - }).on('error', function (err) { - if (curFile) { curFile.emit('error', err) } - }) - }).on('error', function (err) { - boy.emit('error', err) - }).on('finish', function () { - finished = true - checkFinished() - }) -} - -Multipart.prototype.write = function (chunk, cb) { - const r = this.parser.write(chunk) - if (r && !this._pause) { - cb() - } else { - this._needDrain = !r - this._cb = cb - } -} - -Multipart.prototype.end = function () { - const self = this - - if (self.parser.writable) { - self.parser.end() - } else if (!self._boy._done) { - process.nextTick(function () { - self._boy._done = true - self._boy.emit('finish') - }) - } -} - -function skipPart (part) { - part.resume() -} - -function FileStream (opts) { - Readable.call(this, opts) - - this.bytesRead = 0 - - this.truncated = false -} - -inherits(FileStream, Readable) - -FileStream.prototype._read = function (n) {} - -module.exports = Multipart - - -/***/ }), - -/***/ 78306: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Decoder = __nccwpck_require__(27100) -const decodeText = __nccwpck_require__(84619) -const getLimit = __nccwpck_require__(21467) - -const RE_CHARSET = /^charset$/i - -UrlEncoded.detect = /^application\/x-www-form-urlencoded/i -function UrlEncoded (boy, cfg) { - const limits = cfg.limits - const parsedConType = cfg.parsedConType - this.boy = boy - - this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) - this.fieldsLimit = getLimit(limits, 'fields', Infinity) - - let charset - for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var - if (Array.isArray(parsedConType[i]) && - RE_CHARSET.test(parsedConType[i][0])) { - charset = parsedConType[i][1].toLowerCase() - break + this.setMetadata({ + billing: { + requesterPays: true, + }, + }, options, cb); } - } - - if (charset === undefined) { charset = cfg.defCharset || 'utf8' } - - this.decoder = new Decoder() - this.charset = charset - this._fields = 0 - this._state = 'key' - this._checkingBytes = true - this._bytesKey = 0 - this._bytesVal = 0 - this._key = '' - this._val = '' - this._keyTrunc = false - this._valTrunc = false - this._hitLimit = false -} - -UrlEncoded.prototype.write = function (data, cb) { - if (this._fields === this.fieldsLimit) { - if (!this.boy.hitFieldsLimit) { - this.boy.hitFieldsLimit = true - this.boy.emit('fieldsLimit') + /** + * Create a {@link File} object. See {@link File} to see how to handle + * the different use cases you may have. + * + * @param {string} name The name of the file in this bucket. + * @param {FileOptions} [options] Configuration options. + * @param {string|number} [options.generation] Only use a specific revision of + * this file. + * @param {string} [options.encryptionKey] A custom encryption key. See + * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. + * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will + * be used to encrypt the object. Must be in the format: + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. + * KMS key ring must use the same location as the bucket. + * @param {string} [options.userProject] The ID of the project which will be + * billed for all requests made from File object. + * @returns {File} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * const file = bucket.file('my-existing-file.png'); + * ``` + */ + file(name, options) { + if (!name) { + throw Error(BucketExceptionMessages.SPECIFY_FILE_NAME); + } + return new file_js_1.File(this, name, options); } - return cb() - } - - let idxeq; let idxamp; let i; let p = 0; const len = data.length - - while (p < len) { - if (this._state === 'key') { - idxeq = idxamp = undefined - for (i = p; i < len; ++i) { - if (!this._checkingBytes) { ++p } - if (data[i] === 0x3D/* = */) { - idxeq = i - break - } else if (data[i] === 0x26/* & */) { - idxamp = i - break + /** + * @typedef {array} GetFilesResponse + * @property {File[]} 0 Array of {@link File} instances. + * @param {object} nextQuery 1 A query object to receive more results. + * @param {object} apiResponse 2 The full API response. + */ + /** + * @callback GetFilesCallback + * @param {?Error} err Request error, if any. + * @param {File[]} files Array of {@link File} instances. + * @param {object} nextQuery A query object to receive more results. + * @param {object} apiResponse The full API response. + */ + /** + * Query object for listing files. + * + * @typedef {object} GetFilesOptions + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {string} [delimiter] Results will contain only objects whose + * names, aside from the prefix, do not contain delimiter. Objects whose + * names, aside from the prefix, contain delimiter will have their name + * truncated after the delimiter, returned in `apiResponse.prefixes`. + * Duplicate prefixes are omitted. + * @property {string} [endOffset] Filter results to objects whose names are + * lexicographically before endOffset. If startOffset is also set, the objects + * listed have names between startOffset (inclusive) and endOffset (exclusive). + * @property {boolean} [includeFoldersAsPrefixes] If true, includes folders and + * managed folders in the set of prefixes returned by the query. Only applicable if + * delimiter is set to / and autoPaginate is set to false. + * See: https://cloud.google.com/storage/docs/managed-folders + * @property {boolean} [includeTrailingDelimiter] If true, objects that end in + * exactly one instance of delimiter have their metadata included in items[] + * in addition to the relevant part of the object name appearing in prefixes[]. + * @property {string} [prefix] Filter results to objects whose names begin + * with this prefix. + * @property {string} [matchGlob] A glob pattern used to filter results, + * for example foo*bar + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return per call. + * Note: By default will handle pagination automatically + * if more than 1 page worth of results are requested per call. + * When `autoPaginate` is set to `false` the smaller of `maxResults` + * or 1 page of results will be returned per call. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @property {boolean} [softDeleted] If true, only soft-deleted object versions will be + * listed as distinct results in order of generation number. Note `soft_deleted` and + * `versions` cannot be set to true simultaneously. + * @property {string} [startOffset] Filter results to objects whose names are + * lexicographically equal to or after startOffset. If endOffset is also set, + * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {boolean} [versions] If true, returns File objects scoped to + * their versions. + */ + /** + * Get {@link File} objects for the files currently in the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/list| Objects: list API Documentation} + * + * @param {GetFilesOptions} [query] Query object for listing files. + * @param {boolean} [query.autoPaginate=true] Have pagination handled + * automatically. + * @param {string} [query.delimiter] Results will contain only objects whose + * names, aside from the prefix, do not contain delimiter. Objects whose + * names, aside from the prefix, contain delimiter will have their name + * truncated after the delimiter, returned in `apiResponse.prefixes`. + * Duplicate prefixes are omitted. + * @param {string} [query.endOffset] Filter results to objects whose names are + * lexicographically before endOffset. If startOffset is also set, the objects + * listed have names between startOffset (inclusive) and endOffset (exclusive). + * @param {boolean} [query.includeFoldersAsPrefixes] If true, includes folders and + * managed folders in the set of prefixes returned by the query. Only applicable if + * delimiter is set to / and autoPaginate is set to false. + * See: https://cloud.google.com/storage/docs/managed-folders + * @param {boolean} [query.includeTrailingDelimiter] If true, objects that end in + * exactly one instance of delimiter have their metadata included in items[] + * in addition to the relevant part of the object name appearing in prefixes[]. + * @param {string} [query.prefix] Filter results to objects whose names begin + * with this prefix. + * @param {number} [query.maxApiCalls] Maximum number of API calls to make. + * @param {number} [query.maxResults] Maximum number of items plus prefixes to + * return per call. + * Note: By default will handle pagination automatically + * if more than 1 page worth of results are requested per call. + * When `autoPaginate` is set to `false` the smaller of `maxResults` + * or 1 page of results will be returned per call. + * @param {string} [query.pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @param {boolean} [query.softDeleted] If true, only soft-deleted object versions will be + * listed as distinct results in order of generation number. Note `soft_deleted` and + * `versions` cannot be set to true simultaneously. + * @param {string} [query.startOffset] Filter results to objects whose names are + * lexicographically equal to or after startOffset. If endOffset is also set, + * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). + * @param {string} [query.userProject] The ID of the project which will be + * billed for the request. + * @param {boolean} [query.versions] If true, returns File objects scoped to + * their versions. + * @param {GetFilesCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getFiles(function(err, files) { + * if (!err) { + * // files is an array of File objects. + * } + * }); + * + * //- + * // If your bucket has versioning enabled, you can get all of your files + * // scoped to their generation. + * //- + * bucket.getFiles({ + * versions: true + * }, function(err, files) { + * // Each file is scoped to its generation. + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * const callback = function(err, files, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * bucket.getFiles(nextQuery, callback); + * } + * + * // The `metadata` property is populated for you with the metadata at the + * // time of fetching. + * files[0].metadata; + * + * // However, in cases where you are concerned the metadata could have + * // changed, use the `getMetadata` method. + * files[0].getMetadata(function(err, metadata) {}); + * }; + * + * bucket.getFiles({ + * autoPaginate: false + * }, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getFiles().then(function(data) { + * const files = data[0]; + * }); + * + * ``` + * @example + *
Simulating a File System

With `autoPaginate: false`, it's possible to iterate over files which incorporate a common structure using a delimiter.

Consider the following remote objects:

  1. "a"
  2. "a/b/c/d"
  3. "b/d/e"

Using a delimiter of `/` will return a single file, "a".

`apiResponse.prefixes` will return the "sub-directories" that were found:

  1. "a/"
  2. "b/"
+ * ``` + * bucket.getFiles({ + * autoPaginate: false, + * delimiter: '/' + * }, function(err, files, nextQuery, apiResponse) { + * // files = [ + * // {File} // File object for file "a" + * // ] + * + * // apiResponse.prefixes = [ + * // 'a/', + * // 'b/' + * // ] + * }); + * ``` + * + * @example + * Using prefixes, it's now possible to simulate a file system with follow-up requests. + * ``` + * bucket.getFiles({ + * autoPaginate: false, + * delimiter: '/', + * prefix: 'a/' + * }, function(err, files, nextQuery, apiResponse) { + * // No files found within "directory" a. + * // files = [] + * + * // However, a "sub-directory" was found. + * // This prefix can be used to continue traversing the "file system". + * // apiResponse.prefixes = [ + * // 'a/b/' + * // ] + * }); + * ``` + * + * @example include:samples/files.js + * region_tag:storage_list_files + * Another example: + * + * @example include:samples/files.js + * region_tag:storage_list_files_with_prefix + * Example of listing files, filtered by a prefix: + */ + getFiles(queryOrCallback, callback) { + let query = typeof queryOrCallback === 'object' ? queryOrCallback : {}; + if (!callback) { + callback = queryOrCallback; } - if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { - this._hitLimit = true - break - } else if (this._checkingBytes) { ++this._bytesKey } - } - - if (idxeq !== undefined) { - // key with assignment - if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } - this._state = 'val' - - this._hitLimit = false - this._checkingBytes = true - this._val = '' - this._bytesVal = 0 - this._valTrunc = false - this.decoder.reset() - - p = idxeq + 1 - } else if (idxamp !== undefined) { - // key with no assignment - ++this._fields - let key; const keyTrunc = this._keyTrunc - if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } - - this._hitLimit = false - this._checkingBytes = true - this._key = '' - this._bytesKey = 0 - this._keyTrunc = false - this.decoder.reset() - - if (key.length) { - this.boy.emit('field', decodeText(key, 'binary', this.charset), - '', - keyTrunc, - false) + query = Object.assign({}, query); + if (query.fields && + query.autoPaginate && + !query.fields.includes('nextPageToken')) { + query.fields = `${query.fields},nextPageToken`; } - - p = idxamp + 1 - if (this._fields === this.fieldsLimit) { return cb() } - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } - p = i - if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false - this._keyTrunc = true + this.request({ + uri: '/o', + qs: query, + }, (err, resp) => { + if (err) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback(err, null, null, resp); + return; + } + const itemsArray = resp.items ? resp.items : []; + const files = itemsArray.map((file) => { + const options = {}; + if (query.fields) { + const fileInstance = file; + return fileInstance; + } + if (query.versions) { + options.generation = file.generation; + } + if (file.kmsKeyName) { + options.kmsKeyName = file.kmsKeyName; + } + const fileInstance = this.file(file.name, options); + fileInstance.metadata = file; + return fileInstance; + }); + let nextQuery = null; + if (resp.nextPageToken) { + nextQuery = Object.assign({}, query, { + pageToken: resp.nextPageToken, + }); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback(null, files, nextQuery, resp); + }); + } + /** + * @deprecated + * @typedef {object} GetLabelsOptions Configuration options for Bucket#getLabels(). + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @deprecated + * @typedef {array} GetLabelsResponse + * @property {object} 0 Object of labels currently set on this bucket. + */ + /** + * @deprecated + * @callback GetLabelsCallback + * @param {?Error} err Request error, if any. + * @param {object} labels Object of labels currently set on this bucket. + */ + /** + * @deprecated Use getMetadata directly. + * Get the labels currently set on this bucket. + * + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetLabelsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getLabels(function(err, labels) { + * if (err) { + * // Error handling omitted. + * } + * + * // labels = { + * // label: 'labelValue', + * // ... + * // } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getLabels().then(function(data) { + * const labels = data[0]; + * }); + * ``` + */ + getLabels(optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; } - } else { - if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } - p = len - } - } else { - idxamp = undefined - for (i = p; i < len; ++i) { - if (!this._checkingBytes) { ++p } - if (data[i] === 0x26/* & */) { - idxamp = i - break + else if (optionsOrCallback) { + options = optionsOrCallback; } - if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { - this._hitLimit = true - break - } else if (this._checkingBytes) { ++this._bytesVal } - } - - if (idxamp !== undefined) { - ++this._fields - if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - decodeText(this._val, 'binary', this.charset), - this._keyTrunc, - this._valTrunc) - this._state = 'key' - - this._hitLimit = false - this._checkingBytes = true - this._key = '' - this._bytesKey = 0 - this._keyTrunc = false - this.decoder.reset() - - p = idxamp + 1 - if (this._fields === this.fieldsLimit) { return cb() } - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } - p = i - if ((this._val === '' && this.fieldSizeLimit === 0) || - (this._bytesVal = this._val.length) === this.fieldSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false - this._valTrunc = true + this.getMetadata(options, (err, metadata) => { + if (err) { + callback(err, null); + return; + } + callback(null, (metadata === null || metadata === void 0 ? void 0 : metadata.labels) || {}); + }); + } + /** + * @typedef {object} GetNotificationsOptions Configuration options for Bucket#getNotification(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @callback GetNotificationsCallback + * @param {?Error} err Request error, if any. + * @param {Notification[]} notifications Array of {@link Notification} + * instances. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {array} GetNotificationsResponse + * @property {Notification[]} 0 Array of {@link Notification} instances. + * @property {object} 1 The full API response. + */ + /** + * Retrieves a list of notification subscriptions for a given bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/list| Notifications: list} + * + * @param {GetNotificationsOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetNotificationsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * + * bucket.getNotifications(function(err, notifications, apiResponse) { + * if (!err) { + * // notifications is an array of Notification objects. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getNotifications().then(function(data) { + * const notifications = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/listNotifications.js + * region_tag:storage_list_bucket_notifications + * Another example: + */ + getNotifications(optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; } - } else { - if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } - p = len - } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.request({ + uri: '/notificationConfigs', + qs: options, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + const itemsArray = resp.items ? resp.items : []; + const notifications = itemsArray.map((notification) => { + const notificationInstance = this.notification(notification.id); + notificationInstance.metadata = notification; + return notificationInstance; + }); + callback(null, notifications, resp); + }); } - } - cb() -} - -UrlEncoded.prototype.end = function () { - if (this.boy._done) { return } - - if (this._state === 'key' && this._key.length > 0) { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - '', - this._keyTrunc, - false) - } else if (this._state === 'val') { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - decodeText(this._val, 'binary', this.charset), - this._keyTrunc, - this._valTrunc) - } - this.boy._done = true - this.boy.emit('finish') -} - -module.exports = UrlEncoded - - -/***/ }), - -/***/ 27100: -/***/ ((module) => { - -"use strict"; - - -const RE_PLUS = /\+/g - -const HEX = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -] - -function Decoder () { - this.buffer = undefined -} -Decoder.prototype.write = function (str) { - // Replace '+' with ' ' before decoding - str = str.replace(RE_PLUS, ' ') - let res = '' - let i = 0; let p = 0; const len = str.length - for (; i < len; ++i) { - if (this.buffer !== undefined) { - if (!HEX[str.charCodeAt(i)]) { - res += '%' + this.buffer - this.buffer = undefined - --i // retry character - } else { - this.buffer += str[i] - ++p - if (this.buffer.length === 2) { - res += String.fromCharCode(parseInt(this.buffer, 16)) - this.buffer = undefined + /** + * @typedef {array} GetSignedUrlResponse + * @property {object} 0 The signed URL. + */ + /** + * @callback GetSignedUrlCallback + * @param {?Error} err Request error, if any. + * @param {object} url The signed URL. + */ + /** + * @typedef {object} GetBucketSignedUrlConfig + * @property {string} action Only listing objects within a bucket (HTTP: GET) is supported for bucket-level signed URLs. + * @property {*} expires A timestamp when this link will expire. Any value + * given is passed to `new Date()`. + * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. + * @property {string} [version='v2'] The signing version to use, either + * 'v2' or 'v4'. + * @property {boolean} [virtualHostedStyle=false] Use virtual hosted-style + * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style + * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. + * Currently defaults to `false` for path-style, although this may change in a + * future major-version release. + * @property {string} [cname] The cname for this bucket, i.e., + * "https://cdn.example.com". + * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} + * @property {object} [extensionHeaders] If these headers are used, the + * server will check to make sure that the client provides matching + * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} + * for the requirements of this feature, most notably: + * - The header name must be prefixed with `x-goog-` + * - The header name must be all lowercase + * + * Note: Multi-valued header passed as an array in the extensionHeaders + * object is converted into a string, delimited by `,` with + * no space. Requests made using the signed URL will need to + * delimit multi-valued headers using a single `,` as well, or + * else the server will report a mismatched signature. + * @property {object} [queryParams] Additional query parameters to include + * in the signed URL. + */ + /** + * Get a signed URL to allow limited time access to a bucket. + * + * In Google Cloud Platform environments, such as Cloud Functions and App + * Engine, you usually don't provide a `keyFilename` or `credentials` during + * instantiation. In those environments, we call the + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} + * to create a signed URL. That API requires either the + * `https://www.googleapis.com/auth/iam` or + * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are + * enabled. + * + * See {@link https://cloud.google.com/storage/docs/access-control/signed-urls| Signed URLs Reference} + * + * @throws {Error} if an expiration timestamp from the past is given. + * + * @param {GetBucketSignedUrlConfig} config Configuration object. + * @param {string} config.action Currently only supports "list" (HTTP: GET). + * @param {*} config.expires A timestamp when this link will expire. Any value + * given is passed to `new Date()`. + * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. + * @param {string} [config.version='v2'] The signing version to use, either + * 'v2' or 'v4'. + * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style + * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style + * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. + * Currently defaults to `false` for path-style, although this may change in a + * future major-version release. + * @param {string} [config.cname] The cname for this bucket, i.e., + * "https://cdn.example.com". + * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} + * @param {object} [config.extensionHeaders] If these headers are used, the + * server will check to make sure that the client provides matching + * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} + * for the requirements of this feature, most notably: + * - The header name must be prefixed with `x-goog-` + * - The header name must be all lowercase + * + * Note: Multi-valued header passed as an array in the extensionHeaders + * object is converted into a string, delimited by `,` with + * no space. Requests made using the signed URL will need to + * delimit multi-valued headers using a single `,` as well, or + * else the server will report a mismatched signature. + * @property {object} [config.queryParams] Additional query parameters to include + * in the signed URL. + * @param {GetSignedUrlCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * //- + * // Generate a URL that allows temporary access to list files in a bucket. + * //- + * const request = require('request'); + * + * const config = { + * action: 'list', + * expires: '03-17-2025' + * }; + * + * bucket.getSignedUrl(config, function(err, url) { + * if (err) { + * console.error(err); + * return; + * } + * + * // The bucket is now available to be listed from this URL. + * request(url, function(err, resp) { + * // resp.statusCode = 200 + * }); + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getSignedUrl(config).then(function(data) { + * const url = data[0]; + * }); + * ``` + */ + getSignedUrl(cfg, callback) { + const method = BucketActionToHTTPMethod[cfg.action]; + const signConfig = { + method, + expires: cfg.expires, + version: cfg.version, + cname: cfg.cname, + extensionHeaders: cfg.extensionHeaders || {}, + queryParams: cfg.queryParams || {}, + host: cfg.host, + signingEndpoint: cfg.signingEndpoint, + }; + if (!this.signer) { + this.signer = new signer_js_1.URLSigner(this.storage.authClient, this, undefined, this.storage); } - } - } else if (str[i] === '%') { - if (i > p) { - res += str.substring(p, i) - p = i - } - this.buffer = '' - ++p - } - } - if (p < len && this.buffer === undefined) { res += str.substring(p) } - return res -} -Decoder.prototype.reset = function () { - this.buffer = undefined -} - -module.exports = Decoder - - -/***/ }), - -/***/ 48647: -/***/ ((module) => { - -"use strict"; - - -module.exports = function basename (path) { - if (typeof path !== 'string') { return '' } - for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var - switch (path.charCodeAt(i)) { - case 0x2F: // '/' - case 0x5C: // '\' - path = path.slice(i + 1) - return (path === '..' || path === '.' ? '' : path) + this.signer + .getSignedUrl(signConfig) + .then(signedUrl => callback(null, signedUrl), callback); } - } - return (path === '..' || path === '.' ? '' : path) -} - - -/***/ }), - -/***/ 84619: -/***/ (function(module) { - -"use strict"; - - -// Node has always utf-8 -const utf8Decoder = new TextDecoder('utf-8') -const textDecoders = new Map([ - ['utf-8', utf8Decoder], - ['utf8', utf8Decoder] -]) - -function getDecoder (charset) { - let lc - while (true) { - switch (charset) { - case 'utf-8': - case 'utf8': - return decoders.utf8 - case 'latin1': - case 'ascii': // TODO: Make these a separate, strict decoder? - case 'us-ascii': - case 'iso-8859-1': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'windows-1252': - case 'iso_8859-1:1987': - case 'cp1252': - case 'x-cp1252': - return decoders.latin1 - case 'utf16le': - case 'utf-16le': - case 'ucs2': - case 'ucs-2': - return decoders.utf16le - case 'base64': - return decoders.base64 - default: - if (lc === undefined) { - lc = true - charset = charset.toLowerCase() - continue + /** + * @callback BucketLockCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Lock a previously-defined retention policy. This will prevent changes to + * the policy. + * + * @throws {Error} if a metageneration is not provided. + * + * @param {number|string} metageneration The bucket's metageneration. This is + * accessible from calling {@link File#getMetadata}. + * @param {BucketLockCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * const metageneration = 2; + * + * bucket.lock(metageneration, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.lock(metageneration).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + lock(metageneration, callback) { + const metatype = typeof metageneration; + if (metatype !== 'number' && metatype !== 'string') { + throw new Error(BucketExceptionMessages.METAGENERATION_NOT_PROVIDED); } - return decoders.other.bind(charset) - } - } -} - -const decoders = { - utf8: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) - } - return data.utf8Slice(0, data.length) - }, - - latin1: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - return data - } - return data.latin1Slice(0, data.length) - }, - - utf16le: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) + this.request({ + method: 'POST', + uri: '/lockRetentionPolicy', + qs: { + ifMetagenerationMatch: metageneration, + }, + }, callback); } - return data.ucs2Slice(0, data.length) - }, - - base64: (data, sourceEncoding) => { - if (data.length === 0) { - return '' + /** + * @typedef {object} RestoreOptions Options for Bucket#restore(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/restore#resource| Object resource}. + * @param {number} [generation] If present, selects a specific revision of this object. + * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'. + */ + /** + * Restores a soft-deleted bucket + * @param {RestoreOptions} options Restore options. + * @returns {Promise} + */ + async restore(options) { + const [bucket] = await this.request({ + method: 'POST', + uri: '/restore', + qs: options, + }); + return bucket; } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) + /** + * @typedef {array} MakeBucketPrivateResponse + * @property {File[]} 0 List of files made private. + */ + /** + * @callback MakeBucketPrivateCallback + * @param {?Error} err Request error, if any. + * @param {File[]} files List of files made private. + */ + /** + * @typedef {object} MakeBucketPrivateOptions + * @property {boolean} [includeFiles=false] Make each file in the bucket + * private. + * @property {Metadata} [metadata] Define custom metadata properties to define + * along with the operation. + * @property {boolean} [force] Queue errors occurred while making files + * private until all files have been processed. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Make the bucket listing private. + * + * You may also choose to make the contents of the bucket private by + * specifying `includeFiles: true`. This will automatically run + * {@link File#makePrivate} for every file in the bucket. + * + * When specifying `includeFiles: true`, use `force: true` to delay execution + * of your callback until all files have been processed. By default, the + * callback is executed after the first error. Use `force` to queue such + * errors until all files have been processed, after which they will be + * returned as an array as the first argument to your callback. + * + * NOTE: This may cause the process to be long-running and use a high number + * of requests. Use with caution. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @param {MakeBucketPrivateOptions} [options] Configuration options. + * @param {boolean} [options.includeFiles=false] Make each file in the bucket + * private. + * @param {Metadata} [options.metadata] Define custom metadata properties to define + * along with the operation. + * @param {boolean} [options.force] Queue errors occurred while making files + * private until all files have been processed. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {MakeBucketPrivateCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Make the bucket private. + * //- + * bucket.makePrivate(function(err) {}); + * + * //- + * // Make the bucket and its contents private. + * //- + * const opts = { + * includeFiles: true + * }; + * + * bucket.makePrivate(opts, function(err, files) { + * // `err`: + * // The first error to occur, otherwise null. + * // + * // `files`: + * // Array of files successfully made private in the bucket. + * }); + * + * //- + * // Make the bucket and its contents private, using force to suppress errors + * // until all files have been processed. + * //- + * const opts = { + * includeFiles: true, + * force: true + * }; + * + * bucket.makePrivate(opts, function(errors, files) { + * // `errors`: + * // Array of errors if any occurred, otherwise null. + * // + * // `files`: + * // Array of files successfully made private in the bucket. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.makePrivate(opts).then(function(data) { + * const files = data[0]; + * }); + * ``` + */ + makePrivate(optionsOrCallback, callback) { + var _a, _b, _c, _d; + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + options.private = true; + const query = { + predefinedAcl: 'projectPrivate', + }; + if (options.userProject) { + query.userProject = options.userProject; + } + if ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { + query.ifGenerationMatch = options.preconditionOpts.ifGenerationMatch; + } + if ((_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { + query.ifGenerationNotMatch = + options.preconditionOpts.ifGenerationNotMatch; + } + if ((_c = options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { + query.ifMetagenerationMatch = + options.preconditionOpts.ifMetagenerationMatch; + } + if ((_d = options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { + query.ifMetagenerationNotMatch = + options.preconditionOpts.ifMetagenerationNotMatch; + } + // You aren't allowed to set both predefinedAcl & acl properties on a bucket + // so acl must explicitly be nullified. + const metadata = { ...options.metadata, acl: null }; + this.setMetadata(metadata, query, (err) => { + if (err) { + callback(err); + } + const internalCall = () => { + if (options.includeFiles) { + return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, options); + } + return Promise.resolve([]); + }; + internalCall() + .then(files => callback(null, files)) + .catch(callback); + }); } - return data.base64Slice(0, data.length) - }, - - other: (data, sourceEncoding) => { - if (data.length === 0) { - return '' + /** + * @typedef {object} MakeBucketPublicOptions + * @property {boolean} [includeFiles=false] Make each file in the bucket + * private. + * @property {boolean} [force] Queue errors occurred while making files + * private until all files have been processed. + */ + /** + * @callback MakeBucketPublicCallback + * @param {?Error} err Request error, if any. + * @param {File[]} files List of files made public. + */ + /** + * @typedef {array} MakeBucketPublicResponse + * @property {File[]} 0 List of files made public. + */ + /** + * Make the bucket publicly readable. + * + * You may also choose to make the contents of the bucket publicly readable by + * specifying `includeFiles: true`. This will automatically run + * {@link File#makePublic} for every file in the bucket. + * + * When specifying `includeFiles: true`, use `force: true` to delay execution + * of your callback until all files have been processed. By default, the + * callback is executed after the first error. Use `force` to queue such + * errors until all files have been processed, after which they will be + * returned as an array as the first argument to your callback. + * + * NOTE: This may cause the process to be long-running and use a high number + * of requests. Use with caution. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @param {MakeBucketPublicOptions} [options] Configuration options. + * @param {boolean} [options.includeFiles=false] Make each file in the bucket + * private. + * @param {boolean} [options.force] Queue errors occurred while making files + * private until all files have been processed. + * @param {MakeBucketPublicCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Make the bucket publicly readable. + * //- + * bucket.makePublic(function(err) {}); + * + * //- + * // Make the bucket and its contents publicly readable. + * //- + * const opts = { + * includeFiles: true + * }; + * + * bucket.makePublic(opts, function(err, files) { + * // `err`: + * // The first error to occur, otherwise null. + * // + * // `files`: + * // Array of files successfully made public in the bucket. + * }); + * + * //- + * // Make the bucket and its contents publicly readable, using force to + * // suppress errors until all files have been processed. + * //- + * const opts = { + * includeFiles: true, + * force: true + * }; + * + * bucket.makePublic(opts, function(errors, files) { + * // `errors`: + * // Array of errors if any occurred, otherwise null. + * // + * // `files`: + * // Array of files successfully made public in the bucket. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.makePublic(opts).then(function(data) { + * const files = data[0]; + * }); + * ``` + */ + makePublic(optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + const req = { public: true, ...options }; + this.acl + .add({ + entity: 'allUsers', + role: 'READER', + }) + .then(() => { + return this.acl.default.add({ + entity: 'allUsers', + role: 'READER', + }); + }) + .then(() => { + if (req.includeFiles) { + return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, req); + } + return []; + }) + .then(files => callback(null, files), callback); } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) + /** + * Get a reference to a Cloud Pub/Sub Notification. + * + * @param {string} id ID of notification. + * @returns {Notification} + * @see Notification + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const notification = bucket.notification('1'); + * ``` + */ + notification(id) { + if (!id) { + throw new Error(BucketExceptionMessages.SUPPLY_NOTIFICATION_ID); + } + return new notification_js_1.Notification(this, id); } - - if (textDecoders.has(this.toString())) { - try { - return textDecoders.get(this).decode(data) - } catch (e) { } + /** + * Remove an already-existing retention policy from this bucket, if it is not + * locked. + * + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @param {SetBucketMetadataOptions} [options] Options, including precondition options + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * bucket.removeRetentionPeriod(function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.removeRetentionPeriod().then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + removeRetentionPeriod(optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + this.setMetadata({ + retentionPolicy: null, + }, options, callback); } - return typeof data === 'string' - ? data - : data.toString() - } -} - -function decodeText (text, sourceEncoding, destEncoding) { - if (text) { - return getDecoder(destEncoding)(text, sourceEncoding) - } - return text -} - -module.exports = decodeText - - -/***/ }), - -/***/ 21467: -/***/ ((module) => { - -"use strict"; - - -module.exports = function getLimit (limits, name, defaultLimit) { - if ( - !limits || - limits[name] === undefined || - limits[name] === null - ) { return defaultLimit } - - if ( - typeof limits[name] !== 'number' || - isNaN(limits[name]) - ) { throw new TypeError('Limit ' + name + ' is not a valid number') } - - return limits[name] -} - - -/***/ }), - -/***/ 31854: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint-disable object-property-newline */ - - -const decodeText = __nccwpck_require__(84619) - -const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g - -const EncodedLookup = { - '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', - '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', - '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', - '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', - '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', - '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', - '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', - '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', - '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', - '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', - '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', - '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', - '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', - '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', - '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', - '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', - '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', - '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', - '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', - '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', - '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', - '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', - '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', - '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', - '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', - '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', - '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', - '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', - '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', - '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', - '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', - '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', - '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', - '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', - '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', - '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', - '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', - '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', - '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', - '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', - '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', - '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', - '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', - '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', - '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', - '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', - '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', - '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', - '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', - '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', - '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', - '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', - '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', - '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', - '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', - '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', - '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', - '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', - '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', - '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', - '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', - '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', - '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', - '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', - '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', - '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', - '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', - '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', - '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', - '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', - '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', - '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', - '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', - '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', - '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', - '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', - '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', - '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', - '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', - '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', - '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', - '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', - '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', - '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', - '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', - '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', - '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', - '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', - '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', - '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', - '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', - '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', - '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', - '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', - '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', - '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', - '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' -} - -function encodedReplacer (match) { - return EncodedLookup[match] -} - -const STATE_KEY = 0 -const STATE_VALUE = 1 -const STATE_CHARSET = 2 -const STATE_LANG = 3 - -function parseParams (str) { - const res = [] - let state = STATE_KEY - let charset = '' - let inquote = false - let escaping = false - let p = 0 - let tmp = '' - const len = str.length - - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - const char = str[i] - if (char === '\\' && inquote) { - if (escaping) { escaping = false } else { - escaping = true - continue - } - } else if (char === '"') { - if (!escaping) { - if (inquote) { - inquote = false - state = STATE_KEY - } else { inquote = true } - continue - } else { escaping = false } - } else { - if (escaping && inquote) { tmp += '\\' } - escaping = false - if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { - if (state === STATE_CHARSET) { - state = STATE_LANG - charset = tmp.substring(1) - } else { state = STATE_VALUE } - tmp = '' - continue - } else if (state === STATE_KEY && - (char === '*' || char === '=') && - res.length) { - state = char === '*' - ? STATE_CHARSET - : STATE_VALUE - res[p] = [tmp, undefined] - tmp = '' - continue - } else if (!inquote && char === ';') { - state = STATE_KEY - if (charset) { - if (tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } - charset = '' - } else if (tmp.length) { - tmp = decodeText(tmp, 'binary', 'utf8') + /** + * Makes request and applies userProject query parameter if necessary. + * + * @private + * + * @param {object} reqOpts - The request options. + * @param {function} callback - The callback function. + */ + request(reqOpts, callback) { + if (this.userProject && (!reqOpts.qs || !reqOpts.qs.userProject)) { + reqOpts.qs = { ...reqOpts.qs, userProject: this.userProject }; } - if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } - tmp = '' - ++p - continue - } else if (!inquote && (char === ' ' || char === '\t')) { continue } + return super.request(reqOpts, callback); } - tmp += char - } - if (charset && tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } else if (tmp) { - tmp = decodeText(tmp, 'binary', 'utf8') - } - - if (res[p] === undefined) { - if (tmp) { res[p] = tmp } - } else { res[p][1] = tmp } - - return res -} - -module.exports = parseParams - - -/***/ }), - -/***/ 22989: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AclRoleAccessorMethods = exports.Acl = void 0; -const promisify_1 = __nccwpck_require__(19203); -/** - * Attach functionality to a {@link Storage.acl} instance. This will add an - * object for each role group (owners, readers, and writers), with each object - * containing methods to add or delete a type of entity. - * - * As an example, here are a few methods that are created. - * - * myBucket.acl.readers.deleteGroup('groupId', function(err) {}); - * - * myBucket.acl.owners.addUser('email@example.com', function(err, acl) {}); - * - * myBucket.acl.writers.addDomain('example.com', function(err, acl) {}); - * - * @private - */ -class AclRoleAccessorMethods { - constructor() { - this.owners = {}; - this.readers = {}; - this.writers = {}; - /** - * An object of convenience methods to add or delete owner ACL permissions - * for a given entity. - * - * The supported methods include: - * - * - `myFile.acl.owners.addAllAuthenticatedUsers` - * - `myFile.acl.owners.deleteAllAuthenticatedUsers` - * - `myFile.acl.owners.addAllUsers` - * - `myFile.acl.owners.deleteAllUsers` - * - `myFile.acl.owners.addDomain` - * - `myFile.acl.owners.deleteDomain` - * - `myFile.acl.owners.addGroup` - * - `myFile.acl.owners.deleteGroup` - * - `myFile.acl.owners.addProject` - * - `myFile.acl.owners.deleteProject` - * - `myFile.acl.owners.addUser` - * - `myFile.acl.owners.deleteUser` - * - * @name Acl#owners - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * //- - * // Add a user as an owner of a file. - * //- - * const myBucket = gcs.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * myFile.acl.owners.addUser('email@example.com', function(err, aclObject) - * {}); - * - * //- - * // For reference, the above command is the same as running the following. - * //- - * myFile.acl.add({ - * entity: 'user-email@example.com', - * role: gcs.acl.OWNER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myFile.acl.owners.addUser('email@example.com').then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - this.owners = {}; - /** - * An object of convenience methods to add or delete reader ACL permissions - * for a given entity. - * - * The supported methods include: - * - * - `myFile.acl.readers.addAllAuthenticatedUsers` - * - `myFile.acl.readers.deleteAllAuthenticatedUsers` - * - `myFile.acl.readers.addAllUsers` - * - `myFile.acl.readers.deleteAllUsers` - * - `myFile.acl.readers.addDomain` - * - `myFile.acl.readers.deleteDomain` - * - `myFile.acl.readers.addGroup` - * - `myFile.acl.readers.deleteGroup` - * - `myFile.acl.readers.addProject` - * - `myFile.acl.readers.deleteProject` - * - `myFile.acl.readers.addUser` - * - `myFile.acl.readers.deleteUser` - * - * @name Acl#readers - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * //- - * // Add a user as a reader of a file. - * //- - * myFile.acl.readers.addUser('email@example.com', function(err, aclObject) - * {}); - * - * //- - * // For reference, the above command is the same as running the following. - * //- - * myFile.acl.add({ - * entity: 'user-email@example.com', - * role: gcs.acl.READER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myFile.acl.readers.addUser('email@example.com').then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - this.readers = {}; - /** - * An object of convenience methods to add or delete writer ACL permissions - * for a given entity. - * - * The supported methods include: - * - * - `myFile.acl.writers.addAllAuthenticatedUsers` - * - `myFile.acl.writers.deleteAllAuthenticatedUsers` - * - `myFile.acl.writers.addAllUsers` - * - `myFile.acl.writers.deleteAllUsers` - * - `myFile.acl.writers.addDomain` - * - `myFile.acl.writers.deleteDomain` - * - `myFile.acl.writers.addGroup` - * - `myFile.acl.writers.deleteGroup` - * - `myFile.acl.writers.addProject` - * - `myFile.acl.writers.deleteProject` - * - `myFile.acl.writers.addUser` - * - `myFile.acl.writers.deleteUser` - * - * @name Acl#writers - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * //- - * // Add a user as a writer of a file. - * //- - * myFile.acl.writers.addUser('email@example.com', function(err, aclObject) - * {}); - * - * //- - * // For reference, the above command is the same as running the following. - * //- - * myFile.acl.add({ - * entity: 'user-email@example.com', - * role: gcs.acl.WRITER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myFile.acl.writers.addUser('email@example.com').then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - this.writers = {}; - AclRoleAccessorMethods.roles.forEach(this._assignAccessMethods.bind(this)); + /** + * @deprecated + * @typedef {array} SetLabelsResponse + * @property {object} 0 The bucket metadata. + */ + /** + * @deprecated + * @callback SetLabelsCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The bucket metadata. + */ + /** + * @deprecated + * @typedef {object} SetLabelsOptions Configuration options for Bucket#setLabels(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @deprecated Use setMetadata directly. + * Set labels on the bucket. + * + * This makes an underlying call to {@link Bucket#setMetadata}, which + * is a PATCH request. This means an individual label can be overwritten, but + * unmentioned labels will not be touched. + * + * @param {object} labels Labels to set on the bucket. + * @param {SetLabelsOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {SetLabelsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * const labels = { + * labelone: 'labelonevalue', + * labeltwo: 'labeltwovalue' + * }; + * + * bucket.setLabels(labels, function(err, metadata) { + * if (!err) { + * // Labels set successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setLabels(labels).then(function(data) { + * const metadata = data[0]; + * }); + * ``` + */ + setLabels(labels, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + callback = callback || index_js_1.util.noop; + this.setMetadata({ labels }, options, callback); } - _assignAccessMethods(role) { - const accessMethods = AclRoleAccessorMethods.accessMethods; - const entities = AclRoleAccessorMethods.entities; - const roleGroup = role.toLowerCase() + 's'; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this[roleGroup] = entities.reduce((acc, entity) => { - const isPrefix = entity.charAt(entity.length - 1) === '-'; - accessMethods.forEach(accessMethod => { - let method = accessMethod + entity[0].toUpperCase() + entity.substring(1); - if (isPrefix) { - method = method.replace('-', ''); - } - // Wrap the parent accessor method (e.g. `add` or `delete`) to avoid the - // more complex API of specifying an `entity` and `role`. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - acc[method] = (entityId, options, callback) => { - let apiEntity; - if (typeof options === 'function') { - callback = options; - options = {}; - } - if (isPrefix) { - apiEntity = entity + entityId; - } - else { - // If the entity is not a prefix, it is a special entity group - // that does not require further details. The accessor methods - // only accept a callback. - apiEntity = entity; - callback = entityId; - } - options = Object.assign({ - entity: apiEntity, - role, - }, options); - const args = [options]; - if (typeof callback === 'function') { - args.push(callback); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return this[accessMethod].apply(this, args); - }; - }); - return acc; - }, {}); + setMetadata(metadata, optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, AvailableServiceObjectMethods.setMetadata, options); + super + .setMetadata(metadata, options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + }); } -} -exports.AclRoleAccessorMethods = AclRoleAccessorMethods; -AclRoleAccessorMethods.accessMethods = ['add', 'delete']; -AclRoleAccessorMethods.entities = [ - // Special entity groups that do not require further specification. - 'allAuthenticatedUsers', - 'allUsers', - // Entity groups that require specification, e.g. `user-email@example.com`. - 'domain-', - 'group-', - 'project-', - 'user-', -]; -AclRoleAccessorMethods.roles = ['OWNER', 'READER', 'WRITER']; -/** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * An ACL consists of one or more entries, where each entry grants permissions - * to an entity. Permissions define the actions that can be performed against an - * object or bucket (for example, `READ` or `WRITE`); the entity defines who the - * permission applies to (for example, a specific user or group of users). - * - * Where an `entity` value is accepted, we follow the format the Cloud Storage - * API expects. - * - * Refer to - * https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls - * for the most up-to-date values. - * - * - `user-userId` - * - `user-email` - * - `group-groupId` - * - `group-email` - * - `domain-domain` - * - `project-team-projectId` - * - `allUsers` - * - `allAuthenticatedUsers` - * - * Examples: - * - * - The user "liz@example.com" would be `user-liz@example.com`. - * - The group "example@googlegroups.com" would be - * `group-example@googlegroups.com`. - * - To refer to all members of the Google Apps for Business domain - * "example.com", the entity would be `domain-example.com`. - * - * For more detailed information, see - * {@link http://goo.gl/6qBBPO| About Access Control Lists}. - * - * @constructor Acl - * @mixin - * @param {object} options Configuration options. - */ -class Acl extends AclRoleAccessorMethods { - constructor(options) { - super(); - this.pathPrefix = options.pathPrefix; - this.request_ = options.request; + /** + * Lock all objects contained in the bucket, based on their creation time. Any + * attempt to overwrite or delete objects younger than the retention period + * will result in a `PERMISSION_DENIED` error. + * + * An unlocked retention policy can be modified or removed from the bucket via + * {@link File#removeRetentionPeriod} and {@link File#setRetentionPeriod}. A + * locked retention policy cannot be removed or shortened in duration for the + * lifetime of the bucket. Attempting to remove or decrease period of a locked + * retention policy will result in a `PERMISSION_DENIED` error. You can still + * increase the policy. + * + * @param {*} duration In seconds, the minimum retention time for all objects + * contained in this bucket. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @param {SetBucketMetadataCallback} [options] Options, including precondition options. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * const DURATION_SECONDS = 15780000; // 6 months. + * + * //- + * // Lock the objects in this bucket for 6 months. + * //- + * bucket.setRetentionPeriod(DURATION_SECONDS, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setRetentionPeriod(DURATION_SECONDS).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + setRetentionPeriod(duration, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + this.setMetadata({ + retentionPolicy: { + retentionPeriod: duration.toString(), + }, + }, options, callback); } /** - * @typedef {array} AddAclResponse - * @property {object} 0 The Acl Objects. + * + * @typedef {object} Cors + * @property {number} [maxAgeSeconds] The number of seconds the browser is + * allowed to make requests before it must repeat the preflight request. + * @property {string[]} [method] HTTP method allowed for cross origin resource + * sharing with this bucket. + * @property {string[]} [origin] an origin allowed for cross origin resource + * sharing with this bucket. + * @property {string[]} [responseHeader] A header allowed for cross origin + * resource sharing with this bucket. + */ + /** + * This can be used to set the CORS configuration on the bucket. + * + * The configuration will be overwritten with the value passed into this. + * + * @param {Cors[]} corsConfiguration The new CORS configuration to set + * @param {number} [corsConfiguration.maxAgeSeconds] The number of seconds the browser is + * allowed to make requests before it must repeat the preflight request. + * @param {string[]} [corsConfiguration.method] HTTP method allowed for cross origin resource + * sharing with this bucket. + * @param {string[]} [corsConfiguration.origin] an origin allowed for cross origin resource + * sharing with this bucket. + * @param {string[]} [corsConfiguration.responseHeader] A header allowed for cross origin + * resource sharing with this bucket. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @param {SetBucketMetadataOptions} [options] Options, including precondition options. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * const corsConfiguration = [{maxAgeSeconds: 3600}]; // 1 hour + * bucket.setCorsConfiguration(corsConfiguration); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setCorsConfiguration(corsConfiguration).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + setCorsConfiguration(corsConfiguration, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + this.setMetadata({ + cors: corsConfiguration, + }, options, callback); + } + /** + * @typedef {object} SetBucketStorageClassOptions + * @property {string} [userProject] - The ID of the project which will be + * billed for the request. + */ + /** + * @callback SetBucketStorageClassCallback + * @param {?Error} err Request error, if any. + */ + /** + * Set the default storage class for new files in this bucket. + * + * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} + * + * @param {string} storageClass The new storage class. (`standard`, + * `nearline`, `coldline`, or `archive`). + * **Note:** The storage classes `multi_regional`, `regional`, and + * `durable_reduced_availability` are now legacy and will be deprecated in + * the future. + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] - The ID of the project which will be + * billed for the request. + * @param {SetStorageClassCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.setStorageClass('nearline', function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * // The storage class was updated successfully. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setStorageClass('nearline').then(function() {}); + * ``` + */ + setStorageClass(storageClass, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + // In case we get input like `storageClass`, convert to `storage_class`. + storageClass = storageClass + .replace(/-/g, '_') + .replace(/([a-z])([A-Z])/g, (_, low, up) => { + return low + '_' + up; + }) + .toUpperCase(); + this.setMetadata({ storageClass }, options, callback); + } + /** + * Set a user project to be billed for all requests made from this Bucket + * object and any files referenced from this Bucket object. + * + * @param {string} userProject The user project. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.setUserProject('grape-spaceship-123'); + * ``` + */ + setUserProject(userProject) { + this.userProject = userProject; + const methods = [ + 'create', + 'delete', + 'exists', + 'get', + 'getMetadata', + 'setMetadata', + ]; + methods.forEach(method => { + const methodConfig = this.methods[method]; + if (typeof methodConfig === 'object') { + if (typeof methodConfig.reqOpts === 'object') { + Object.assign(methodConfig.reqOpts.qs, { userProject }); + } + else { + methodConfig.reqOpts = { + qs: { userProject }, + }; + } + } + }); + } + /** + * @typedef {object} UploadOptions Configuration options for Bucket#upload(). + * @property {string|File} [destination] The place to save + * your file. If given a string, the file will be uploaded to the bucket + * using the string as a filename. When given a File object, your local + * file will be uploaded to the File object's bucket and under the File + * object's name. Lastly, when this argument is omitted, the file is uploaded + * to your bucket using the name of the local file. + * @property {string} [encryptionKey] A custom encryption key. See + * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. + * @property {boolean} [gzip] Automatically gzip the file. This will set + * `options.metadata.contentEncoding` to `gzip`. + * @property {string} [kmsKeyName] The name of the Cloud KMS key that will + * be used to encrypt the object. Must be in the format: + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. + * @property {object} [metadata] See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. + * @property {string} [offset] The starting byte of the upload stream, for + * resuming an interrupted upload. Defaults to 0. + * @property {string} [predefinedAcl] Apply a predefined set of access + * controls to this object. + * + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @property {boolean} [private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @property {boolean} [public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @property {boolean} [resumable=true] Resumable uploads are automatically + * enabled and must be shut off explicitly by setting to false. + * @property {number} [timeout=60000] Set the HTTP request timeout in + * milliseconds. This option is not available for resumable uploads. + * Default: `60000` + * @property {string} [uri] The URI for an already-created resumable + * upload. See {@link File#createResumableUpload}. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string|boolean} [validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with an + * MD5 checksum for maximum reliability. CRC32c will provide better + * performance with less reliability. You may also choose to skip + * validation completely, however this is **not recommended**. + */ + /** + * @typedef {array} UploadResponse + * @property {object} 0 The uploaded {@link File}. * @property {object} 1 The full API response. */ /** - * @callback AddAclCallback + * @callback UploadCallback * @param {?Error} err Request error, if any. - * @param {object} acl The Acl Objects. + * @param {object} file The uploaded {@link File}. * @param {object} apiResponse The full API response. */ /** - * Add access controls on a {@link Bucket} or {@link File}. + * Upload a file to the bucket. This is a convenience method that wraps + * {@link File#createWriteStream}. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert| BucketAccessControls: insert API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} + * Resumable uploads are enabled by default * - * @param {object} options Configuration options. - * @param {string} options.entity Whose permissions will be added. - * @param {string} options.role Permissions allowed for the defined entity. - * See {@link https://cloud.google.com/storage/docs/access-control Access - * Control}. - * @param {number} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). + * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#uploads| Upload Options (Simple or Resumable)} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert| Objects: insert API Documentation} + * + * @param {string} pathString The fully qualified path to the file you + * wish to upload to your bucket. + * @param {UploadOptions} [options] Configuration options. + * @param {string|File} [options.destination] The place to save + * your file. If given a string, the file will be uploaded to the bucket + * using the string as a filename. When given a File object, your local + * file will be uploaded to the File object's bucket and under the File + * object's name. Lastly, when this argument is omitted, the file is uploaded + * to your bucket using the name of the local file. + * @param {string} [options.encryptionKey] A custom encryption key. See + * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. + * @param {boolean} [options.gzip] Automatically gzip the file. This will set + * `options.metadata.contentEncoding` to `gzip`. + * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will + * be used to encrypt the object. Must be in the format: + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. + * @param {object} [options.metadata] See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. + * @param {string} [options.offset] The starting byte of the upload stream, for + * resuming an interrupted upload. Defaults to 0. + * @param {string} [options.predefinedAcl] Apply a predefined set of access + * controls to this object. + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @param {boolean} [options.private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @param {boolean} [options.public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @param {boolean} [options.resumable=true] Resumable uploads are automatically + * enabled and must be shut off explicitly by setting to false. + * @param {number} [options.timeout=60000] Set the HTTP request timeout in + * milliseconds. This option is not available for resumable uploads. + * Default: `60000` + * @param {string} [options.uri] The URI for an already-created resumable + * upload. See {@link File#createResumableUpload}. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {AddAclCallback} [callback] Callback function. - * @returns {Promise} + * @param {string|boolean} [options.validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with an + * MD5 checksum for maximum reliability. CRC32c will provide better + * performance with less reliability. You may also choose to skip + * validation completely, however this is **not recommended**. + * @param {UploadCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); + * //- + * // Upload a file from a local path. + * //- + * bucket.upload('/local/path/image.png', function(err, file, apiResponse) { + * // Your bucket now contains: + * // - "image.png" (with the contents of `/local/path/image.png') * - * const options = { - * entity: 'user-useremail@example.com', - * role: gcs.acl.OWNER_ROLE - * }; + * // `file` is an instance of a File object that refers to your new file. + * }); * - * myBucket.acl.add(options, function(err, aclObject, apiResponse) {}); * * //- - * // For file ACL operations, you can also specify a `generation` property. - * // Here is how you would grant ownership permissions to a user on a - * specific - * // revision of a file. + * // It's not always that easy. You will likely want to specify the filename + * // used when your new file lands in your bucket. + * // + * // You may also want to set metadata or customize other options. * //- - * myFile.acl.add({ - * entity: 'user-useremail@example.com', - * role: gcs.acl.OWNER_ROLE, - * generation: 1 - * }, function(err, aclObject, apiResponse) {}); + * const options = { + * destination: 'new-image.png', + * validation: 'crc32c', + * metadata: { + * metadata: { + * event: 'Fall trip to the zoo' + * } + * } + * }; + * + * bucket.upload('local-image.png', options, function(err, file) { + * // Your bucket now contains: + * // - "new-image.png" (with the contents of `local-image.png') + * + * // `file` is an instance of a File object that refers to your new file. + * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // You can also have a file gzip'd on the fly. * //- - * myBucket.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; + * bucket.upload('index.html', { gzip: true }, function(err, file) { + * // Your bucket now contains: + * // - "index.html" (automatically compressed with gzip) + * + * // Downloading the file with `file.download` will automatically decode + * the + * // file. * }); * - * ``` - * @example include:samples/acl.js - * region_tag:storage_add_file_owner - * Example of adding an owner to a file: + * //- + * // You may also re-use a File object, {File}, that references + * // the file you wish to create or overwrite. + * //- + * const options = { + * destination: bucket.file('existing-file.png'), + * resumable: false + * }; * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_owner - * Example of adding an owner to a bucket: + * bucket.upload('local-img.png', options, function(err, newFile) { + * // Your bucket now contains: + * // - "existing-file.png" (with the contents of `local-img.png') * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_default_owner - * Example of adding a default owner to a bucket: - */ - add(options, callback) { - const query = {}; - if (options.generation) { - query.generation = options.generation; - } - if (options.userProject) { - query.userProject = options.userProject; - } - this.request({ - method: 'POST', - uri: '', - qs: query, - maxRetries: 0, //explicitly set this value since this is a non-idempotent function - json: { - entity: options.entity, - role: options.role.toUpperCase(), - }, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - callback(null, this.makeAclObject_(resp), resp); - }); - } - /** - * @typedef {array} RemoveAclResponse - * @property {object} 0 The full API response. - */ - /** - * @callback RemoveAclCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Delete access controls on a {@link Bucket} or {@link File}. + * // Note: + * // The `newFile` parameter is equal to `file`. + * }); * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete| BucketAccessControls: delete API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete| ObjectAccessControls: delete API Documentation} + * //- + * // To use + * // + * // Customer-supplied Encryption Keys, provide the `encryptionKey` + * option. + * //- + * const crypto = require('crypto'); + * const encryptionKey = crypto.randomBytes(32); * - * @param {object} options Configuration object. - * @param {string} options.entity Whose permissions will be revoked. - * @param {int} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {RemoveAclCallback} callback The callback function. - * @returns {Promise} + * bucket.upload('img.png', { + * encryptionKey: encryptionKey + * }, function(err, newFile) { + * // `img.png` was uploaded with your custom encryption key. * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); + * // `newFile` is already configured to use the encryption key when making + * // operations on the remote object. * - * myBucket.acl.delete({ - * entity: 'user-useremail@example.com' - * }, function(err, apiResponse) {}); + * // However, to use your encryption key later, you must create a `File` + * // instance with the `key` supplied: + * const file = bucket.file('img.png', { + * encryptionKey: encryptionKey + * }); * - * //- - * // For file ACL operations, you can also specify a `generation` property. - * //- - * myFile.acl.delete({ - * entity: 'user-useremail@example.com', - * generation: 1 - * }, function(err, apiResponse) {}); + * // Or with `file#setEncryptionKey`: + * const file = bucket.file('img.png'); + * file.setEncryptionKey(encryptionKey); + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * myFile.acl.delete().then(function(data) { - * const apiResponse = data[0]; + * bucket.upload('local-image.png').then(function(data) { + * const file = data[0]; * }); * - * ``` - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_owner - * Example of removing an owner from a bucket: + * To upload a file from a URL, use {@link File#createWriteStream}. * - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_default_owner - * Example of removing a default owner from a bucket: + * ``` + * @example include:samples/files.js + * region_tag:storage_upload_file + * Another example: * - * @example include:samples/acl.js - * region_tag:storage_remove_file_owner - * Example of removing an owner from a bucket: + * @example include:samples/encryption.js + * region_tag:storage_upload_encrypted_file + * Example of uploading an encrypted file: */ - delete(options, callback) { - const query = {}; - if (options.generation) { - query.generation = options.generation; + upload(pathString, optionsOrCallback, callback) { + var _a, _b; + const upload = (numberOfRetries) => { + const returnValue = (0, async_retry_1.default)(async (bail) => { + await new Promise((resolve, reject) => { + var _a, _b; + if (numberOfRetries === 0 && + ((_b = (_a = newFile === null || newFile === void 0 ? void 0 : newFile.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry)) { + newFile.storage.retryOptions.autoRetry = false; + } + const writable = newFile.createWriteStream(options); + if (options.onUploadProgress) { + writable.on('progress', options.onUploadProgress); + } + fs.createReadStream(pathString) + .on('error', bail) + .pipe(writable) + .on('error', err => { + if (this.storage.retryOptions.autoRetry && + this.storage.retryOptions.retryableErrorFn(err)) { + return reject(err); + } + else { + return bail(err); + } + }) + .on('finish', () => { + return resolve(); + }); + }); + }, { + retries: numberOfRetries, + factor: this.storage.retryOptions.retryDelayMultiplier, + maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds + maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds + }); + if (!callback) { + return returnValue; + } + else { + return returnValue + .then(() => { + if (callback) { + return callback(null, newFile, newFile.metadata); + } + }) + .catch(callback); + } + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (global['GCLOUD_SANDBOX_ENV']) { + return; } - if (options.userProject) { - query.userProject = options.userProject; + let options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + options = Object.assign({ + metadata: {}, + }, options); + // Do not retry if precondition option ifGenerationMatch is not set + // because this is a file operation + let maxRetries = this.storage.retryOptions.maxRetries; + if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && + ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + maxRetries = 0; } - this.request({ - method: 'DELETE', - uri: '/' + encodeURIComponent(options.entity), - qs: query, - }, (err, resp) => { - callback(err, resp); - }); + let newFile; + if (options.destination instanceof file_js_1.File) { + newFile = options.destination; + } + else if (options.destination !== null && + typeof options.destination === 'string') { + // Use the string as the name of the file. + newFile = this.file(options.destination, { + encryptionKey: options.encryptionKey, + kmsKeyName: options.kmsKeyName, + preconditionOpts: this.instancePreconditionOpts, + }); + } + else { + // Resort to using the name of the incoming file. + const destination = path.basename(pathString); + newFile = this.file(destination, { + encryptionKey: options.encryptionKey, + kmsKeyName: options.kmsKeyName, + preconditionOpts: this.instancePreconditionOpts, + }); + } + upload(maxRetries); } /** - * @typedef {array} GetAclResponse - * @property {object|object[]} 0 Single or array of Acl Objects. - * @property {object} 1 The full API response. + * @private + * + * @typedef {object} MakeAllFilesPublicPrivateOptions + * @property {boolean} [force] Suppress errors until all files have been + * processed. + * @property {boolean} [private] Make files private. + * @property {boolean} [public] Make files public. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. */ /** - * @callback GetAclCallback + * @private + * + * @callback SetBucketMetadataCallback * @param {?Error} err Request error, if any. - * @param {object|object[]} acl Single or array of Acl Objects. - * @param {object} apiResponse The full API response. + * @param {File[]} files Files that were updated. */ /** - * Get access controls on a {@link Bucket} or {@link File}. If - * an entity is omitted, you will receive an array of all applicable access - * controls. + * @typedef {array} MakeAllFilesPublicPrivateResponse + * @property {File[]} 0 List of files affected. + */ + /** + * Iterate over all of a bucket's files, calling `file.makePublic()` (public) + * or `file.makePrivate()` (private) on each. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get| BucketAccessControls: get API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get| ObjectAccessControls: get API Documentation} + * Operations are performed in parallel, up to 10 at once. The first error + * breaks the loop, and will execute the provided callback with it. Specify + * `{ force: true }` to suppress the errors. * - * @param {object|function} [options] Configuration options. If you want to - * receive a list of all access controls, pass the callback function as - * the only argument. - * @param {string} options.entity Whose permissions will be fetched. - * @param {number} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). + * @private + * + * @param {MakeAllFilesPublicPrivateOptions} [options] Configuration options. + * @param {boolean} [options.force] Suppress errors until all files have been + * processed. + * @param {boolean} [options.private] Make files private. + * @param {boolean} [options.public] Make files public. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {GetAclCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * myBucket.acl.get({ - * entity: 'user-useremail@example.com' - * }, function(err, aclObject, apiResponse) {}); - * - * //- - * // Get all access controls. - * //- - * myBucket.acl.get(function(err, aclObjects, apiResponse) { - * // aclObjects = [ - * // { - * // entity: 'user-useremail@example.com', - * // role: 'owner' - * // } - * // ] - * }); - * - * //- - * // For file ACL operations, you can also specify a `generation` property. - * //- - * myFile.acl.get({ - * entity: 'user-useremail@example.com', - * generation: 1 - * }, function(err, aclObject, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myBucket.acl.get().then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/acl.js - * region_tag:storage_print_file_acl - * Example of printing a file's ACL: - * - * @example include:samples/acl.js - * region_tag:storage_print_file_acl_for_user - * Example of printing a file's ACL for a specific user: - * - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl - * Example of printing a bucket's ACL: + + * @param {MakeAllFilesPublicPrivateCallback} callback Callback function. * - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl_for_user - * Example of printing a bucket's ACL for a specific user: + * @return {Promise} */ - get(optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : null; - const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - let path = ''; - const query = {}; - if (options) { - path = '/' + encodeURIComponent(options.entity); - if (options.generation) { - query.generation = options.generation; + makeAllFilesPublicPrivate_(optionsOrCallback, callback) { + const MAX_PARALLEL_LIMIT = 10; + const errors = []; + const updatedFiles = []; + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + const processFile = async (file) => { + try { + await (options.public ? file.makePublic() : file.makePrivate(options)); + updatedFiles.push(file); } - if (options.userProject) { - query.userProject = options.userProject; + catch (e) { + if (!options.force) { + throw e; + } + errors.push(e); } + }; + this.getFiles(options) + .then(([files]) => { + const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); + const promises = files.map(file => { + return limit(() => processFile(file)); + }); + return Promise.all(promises); + }) + .then(() => callback(errors.length > 0 ? errors : null, updatedFiles), err => callback(err, updatedFiles)); + } + getId() { + return this.id; + } + disableAutoRetryConditionallyIdempotent_( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + coreOpts, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + methodType, localPreconditionOptions) { + var _a, _b; + if (typeof coreOpts === 'object' && + ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch) === undefined && + (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && + (methodType === AvailableServiceObjectMethods.setMetadata || + methodType === AvailableServiceObjectMethods.delete) && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) { + this.storage.retryOptions.autoRetry = false; } - this.request({ - uri: path, - qs: query, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - let results; - if (resp.items) { - results = resp.items.map(this.makeAclObject_); - } - else { - results = this.makeAclObject_(resp); - } - callback(null, results, resp); - }); + else if (this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + this.storage.retryOptions.autoRetry = false; + } + } +} +exports.Bucket = Bucket; +/*! Developer Documentation + * + * These methods can be auto-paginated. + */ +paginator_1.paginator.extend(Bucket, 'getFiles'); +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Bucket, { + exclude: ['cloudStorageURI', 'request', 'file', 'notification', 'restore'], +}); + + +/***/ }), + +/***/ 62665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Channel = void 0; +const index_js_1 = __nccwpck_require__(4052); +const promisify_1 = __nccwpck_require__(19203); +/** + * Create a channel object to interact with a Cloud Storage channel. + * + * See {@link https://cloud.google.com/storage/docs/object-change-notification| Object Change Notification} + * + * @class + * + * @param {string} id The ID of the channel. + * @param {string} resourceId The resource ID of the channel. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const channel = storage.channel('id', 'resource-id'); + * ``` + */ +class Channel extends index_js_1.ServiceObject { + constructor(storage, id, resourceId) { + const config = { + parent: storage, + baseUrl: '/channels', + // An ID shouldn't be included in the API requests. + // RE: + // https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1145 + id: '', + methods: { + // Only need `request`. + }, + }; + super(config); + this.metadata.id = id; + this.metadata.resourceId = resourceId; } /** - * @typedef {array} UpdateAclResponse - * @property {object} 0 The updated Acl Objects. - * @property {object} 1 The full API response. + * @typedef {array} StopResponse + * @property {object} 0 The full API response. */ /** - * @callback UpdateAclCallback + * @callback StopCallback * @param {?Error} err Request error, if any. - * @param {object} acl The updated Acl Objects. * @param {object} apiResponse The full API response. */ /** - * Update access controls on a {@link Bucket} or {@link File}. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update| BucketAccessControls: update API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update| ObjectAccessControls: update API Documentation} + * Stop this channel. * - * @param {object} options Configuration options. - * @param {string} options.entity Whose permissions will be updated. - * @param {string} options.role Permissions allowed for the defined entity. - * See {@link Storage.acl}. - * @param {number} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {UpdateAclCallback} [callback] Callback function. - * @returns {Promise} + * @param {StopCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * const options = { - * entity: 'user-useremail@example.com', - * role: gcs.acl.WRITER_ROLE - * }; - * - * myBucket.acl.update(options, function(err, aclObject, apiResponse) {}); - * - * //- - * // For file ACL operations, you can also specify a `generation` property. - * //- - * myFile.acl.update({ - * entity: 'user-useremail@example.com', - * role: gcs.acl.WRITER_ROLE, - * generation: 1 - * }, function(err, aclObject, apiResponse) {}); + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const channel = storage.channel('id', 'resource-id'); + * channel.stop(function(err, apiResponse) { + * if (!err) { + * // Channel stopped successfully. + * } + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * myFile.acl.update(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; + * channel.stop().then(function(data) { + * const apiResponse = data[0]; * }); * ``` */ - update(options, callback) { - const query = {}; - if (options.generation) { - query.generation = options.generation; - } - if (options.userProject) { - query.userProject = options.userProject; - } + stop(callback) { + callback = callback || index_js_1.util.noop; this.request({ - method: 'PUT', - uri: '/' + encodeURIComponent(options.entity), - qs: query, - json: { - role: options.role.toUpperCase(), - }, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - callback(null, this.makeAclObject_(resp), resp); + method: 'POST', + uri: '/stop', + json: this.metadata, + }, (err, apiResponse) => { + callback(err, apiResponse); }); } - /** - * Transform API responses to a consistent object format. - * - * @private - */ - makeAclObject_(accessControlObject) { - const obj = { - entity: accessControlObject.entity, - role: accessControlObject.role, - }; - if (accessControlObject.projectTeam) { - obj.projectTeam = accessControlObject.projectTeam; - } - return obj; - } - /** - * Patch requests up to the bucket's request object. - * - * @private - * - * @param {string} method Action. - * @param {string} path Request path. - * @param {*} query Request query object. - * @param {*} body Request body contents. - * @param {function} callback Callback function. - */ - request(reqOpts, callback) { - reqOpts.uri = this.pathPrefix + reqOpts.uri; - this.request_(reqOpts, callback); - } } -exports.Acl = Acl; +exports.Channel = Channel; /*! Developer Documentation * * All async methods (except for streams) will return a Promise in the event * that a callback is omitted. */ -(0, promisify_1.promisifyAll)(Acl, { - exclude: ['request'], -}); +(0, promisify_1.promisifyAll)(Channel); /***/ }), -/***/ 23973: +/***/ 55810: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// Copyright 2019 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -115161,2258 +119733,2468 @@ exports.Acl = Acl; // 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Bucket = exports.BucketExceptionMessages = exports.AvailableServiceObjectMethods = exports.BucketActionToHTTPMethod = void 0; -const index_js_1 = __nccwpck_require__(4052); -const paginator_1 = __nccwpck_require__(46412); -const promisify_1 = __nccwpck_require__(19203); -const fs = __importStar(__nccwpck_require__(57147)); -const mime_1 = __importDefault(__nccwpck_require__(29994)); -const path = __importStar(__nccwpck_require__(71017)); -const p_limit_1 = __importDefault(__nccwpck_require__(57684)); -const util_1 = __nccwpck_require__(73837); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -const util_js_1 = __nccwpck_require__(59258); -const acl_js_1 = __nccwpck_require__(22989); -const file_js_1 = __nccwpck_require__(4713); -const iam_js_1 = __nccwpck_require__(80352); -const notification_js_1 = __nccwpck_require__(21178); -const storage_js_1 = __nccwpck_require__(33030); -const signer_js_1 = __nccwpck_require__(59019); -const stream_1 = __nccwpck_require__(12781); -const url_1 = __nccwpck_require__(57310); -var BucketActionToHTTPMethod; -(function (BucketActionToHTTPMethod) { - BucketActionToHTTPMethod["list"] = "GET"; -})(BucketActionToHTTPMethod || (exports.BucketActionToHTTPMethod = BucketActionToHTTPMethod = {})); -var AvailableServiceObjectMethods; -(function (AvailableServiceObjectMethods) { - AvailableServiceObjectMethods[AvailableServiceObjectMethods["setMetadata"] = 0] = "setMetadata"; - AvailableServiceObjectMethods[AvailableServiceObjectMethods["delete"] = 1] = "delete"; -})(AvailableServiceObjectMethods || (exports.AvailableServiceObjectMethods = AvailableServiceObjectMethods = {})); -var BucketExceptionMessages; -(function (BucketExceptionMessages) { - BucketExceptionMessages["PROVIDE_SOURCE_FILE"] = "You must provide at least one source file."; - BucketExceptionMessages["DESTINATION_FILE_NOT_SPECIFIED"] = "A destination file must be specified."; - BucketExceptionMessages["CHANNEL_ID_REQUIRED"] = "An ID is required to create a channel."; - BucketExceptionMessages["TOPIC_NAME_REQUIRED"] = "A valid topic name is required."; - BucketExceptionMessages["CONFIGURATION_OBJECT_PREFIX_REQUIRED"] = "A configuration object with a prefix is required."; - BucketExceptionMessages["SPECIFY_FILE_NAME"] = "A file name must be specified."; - BucketExceptionMessages["METAGENERATION_NOT_PROVIDED"] = "A metageneration must be provided."; - BucketExceptionMessages["SUPPLY_NOTIFICATION_ID"] = "You must supply a notification ID."; -})(BucketExceptionMessages || (exports.BucketExceptionMessages = BucketExceptionMessages = {})); -/** - * @callback Crc32cGeneratorToStringCallback - * A method returning the CRC32C as a base64-encoded string. - * - * @returns {string} - * - * @example - * Hashing the string 'data' should return 'rth90Q==' - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.toString(); // 'rth90Q==' - * ``` - **/ -/** - * @callback Crc32cGeneratorValidateCallback - * A method validating a base64-encoded CRC32C string. - * - * @param {string} [value] base64-encoded CRC32C string to validate - * @returns {boolean} - * - * @example - * Should return `true` if the value matches, `false` otherwise - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.validate('DkjKuA=='); // false - * crc32c.validate('rth90Q=='); // true - * ``` - **/ -/** - * @callback Crc32cGeneratorUpdateCallback - * A method for passing `Buffer`s for CRC32C generation. - * - * @param {Buffer} [data] data to update CRC32C value with - * @returns {undefined} - * - * @example - * Hashing buffers from 'some ' and 'text\n' - * - * ```js - * const buffer1 = Buffer.from('some '); - * crc32c.update(buffer1); - * - * const buffer2 = Buffer.from('text\n'); - * crc32c.update(buffer2); - * - * crc32c.toString(); // 'DkjKuA==' - * ``` - **/ -/** - * @typedef {object} CRC32CValidator - * @property {Crc32cGeneratorToStringCallback} - * @property {Crc32cGeneratorValidateCallback} - * @property {Crc32cGeneratorUpdateCallback} - */ -/** - * A function that generates a CRC32C Validator. Defaults to {@link CRC32C} - * - * @name Bucket#crc32cGenerator - * @type {CRC32CValidator} - */ -/** - * Get and set IAM policies for your bucket. - * - * @name Bucket#iam - * @mixes Iam - * - * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} - * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} - * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Get the IAM policy for your bucket. - * //- - * bucket.iam.getPolicy(function(err, policy) { - * console.log(policy); - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.iam.getPolicy().then(function(data) { - * const policy = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/iam.js - * region_tag:storage_view_bucket_iam_members - * Example of retrieving a bucket's IAM policy: - * - * @example include:samples/iam.js - * region_tag:storage_add_bucket_iam_member - * Example of adding to a bucket's IAM policy: - * - * @example include:samples/iam.js - * region_tag:storage_remove_bucket_iam_member - * Example of removing from a bucket's IAM policy: - */ -/** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * An ACL consists of one or more entries, where each entry grants permissions - * to an entity. Permissions define the actions that can be performed against - * an object or bucket (for example, `READ` or `WRITE`); the entity defines - * who the permission applies to (for example, a specific user or group of - * users). - * - * The `acl` object on a Bucket instance provides methods to get you a list of - * the ACLs defined on your bucket, as well as set, update, and delete them. - * - * Buckets also have - * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} - * for all created files. Default ACLs specify permissions that all new - * objects added to the bucket will inherit by default. You can add, delete, - * get, and update entities and permissions for these as well with - * {@link Bucket#acl.default}. - * - * See {@link http://goo.gl/6qBBPO| About Access Control Lists} - * See {@link https://cloud.google.com/storage/docs/access-control/lists#default| Default ACLs} - * - * @name Bucket#acl - * @mixes Acl - * @property {Acl} default Cloud Storage Buckets have - * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} - * for all created files. You can add, delete, get, and update entities and - * permissions for these as well. The method signatures and examples are all - * the same, after only prefixing the method call with `default`. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Make a bucket's contents publicly readable. - * //- - * const myBucket = storage.bucket('my-bucket'); - * - * const options = { - * entity: 'allUsers', - * role: storage.acl.READER_ROLE - * }; - * - * myBucket.acl.add(options, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myBucket.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl - * Example of printing a bucket's ACL: - * - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl_for_user - * Example of printing a bucket's ACL for a specific user: - * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_owner - * Example of adding an owner to a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_owner - * Example of removing an owner from a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_default_owner - * Example of adding a default owner to a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_default_owner - * Example of removing a default owner from a bucket: - */ -/** - * The API-formatted resource description of the bucket. - * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. - * - * @name Bucket#metadata - * @type {object} - */ -/** - * The bucket's name. - * @name Bucket#name - * @type {string} - */ -/** - * Get {@link File} objects for the files currently in the bucket as a - * readable object stream. - * - * @method Bucket#getFilesStream - * @param {GetFilesOptions} [query] Query object for listing files. - * @returns {ReadableStream} A readable stream that emits {@link File} instances. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * bucket.getFilesStream() - * .on('error', console.error) - * .on('data', function(file) { - * // file is a File object. - * }) - * .on('end', function() { - * // All files retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * bucket.getFilesStream() - * .on('data', function(file) { - * this.end(); - * }); - * - * //- - * // If you're filtering files with a delimiter, you should use - * // {@link Bucket#getFiles} and set `autoPaginate: false` in order to - * // preserve the `apiResponse` argument. - * //- - * const prefixes = []; - * - * function callback(err, files, nextQuery, apiResponse) { - * prefixes = prefixes.concat(apiResponse.prefixes); - * - * if (nextQuery) { - * bucket.getFiles(nextQuery, callback); - * } else { - * // prefixes = The finished array of prefixes. - * } - * } - * - * bucket.getFiles({ - * autoPaginate: false, - * delimiter: '/' - * }, callback); - * ``` - */ -/** - * Create a Bucket object to interact with a Cloud Storage bucket. - * - * @class - * @hideconstructor - * - * @param {Storage} storage A {@link Storage} instance. - * @param {string} name The name of the bucket. - * @param {object} [options] Configuration object. - * @param {string} [options.userProject] User project. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * ``` +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _CRC32C_crc32c; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CRC32C_EXTENSION_TABLE = exports.CRC32C_EXTENSIONS = exports.CRC32C_EXCEPTION_MESSAGES = exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = exports.CRC32C = void 0; +const fs_1 = __nccwpck_require__(57147); +/** + * Ported from {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc#L16-L59 github.com/google/crc32c} */ -class Bucket extends index_js_1.ServiceObject { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getFilesStream(query) { - // placeholder body, overwritten in constructor - return new stream_1.Readable(); +const CRC32C_EXTENSIONS = [ + 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, + 0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, + 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c, + 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, + 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc, + 0xbc267848, 0x4e4dfb4b, 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, + 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, 0xaa64d611, 0x580f5512, + 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, + 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad, + 0x1642ae59, 0xe4292d5a, 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, + 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, 0x417b1dbc, 0xb3109ebf, + 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, + 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f, + 0xed03a29b, 0x1f682198, 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, + 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, 0xdbfc821c, 0x2997011f, + 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, + 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e, + 0x4767748a, 0xb50cf789, 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, + 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, 0x7198540d, 0x83f3d70e, + 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, + 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de, + 0xdde0eb2a, 0x2f8b6829, 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, + 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, 0x082f63b7, 0xfa44e0b4, + 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, + 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b, + 0xb4091bff, 0x466298fc, 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, + 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, 0xa24bb5a6, 0x502036a5, + 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, + 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975, + 0x0e330a81, 0xfc588982, 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, + 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, 0x38cc2a06, 0xcaa7a905, + 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, + 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8, + 0xe52cc12c, 0x1747422f, 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, + 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, 0xd3d3e1ab, 0x21b862a8, + 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, + 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78, + 0x7fab5e8c, 0x8dc0dd8f, 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, + 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, 0x69e9f0d5, 0x9b8273d6, + 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, + 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69, + 0xd5cf889d, 0x27a40b9e, 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, + 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351, +]; +exports.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; +const CRC32C_EXTENSION_TABLE = new Int32Array(CRC32C_EXTENSIONS); +exports.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; +const CRC32C_DEFAULT_VALIDATOR_GENERATOR = () => new CRC32C(); +exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = CRC32C_DEFAULT_VALIDATOR_GENERATOR; +const CRC32C_EXCEPTION_MESSAGES = { + INVALID_INIT_BASE64_RANGE: (l) => `base64-encoded data expected to equal 4 bytes, not ${l}`, + INVALID_INIT_BUFFER_LENGTH: (l) => `Buffer expected to equal 4 bytes, not ${l}`, + INVALID_INIT_INTEGER: (l) => `Number expected to be a safe, unsigned 32-bit integer, not ${l}`, +}; +exports.CRC32C_EXCEPTION_MESSAGES = CRC32C_EXCEPTION_MESSAGES; +class CRC32C { + /** + * Constructs a new `CRC32C` object. + * + * Reconstruction is recommended via the `CRC32C.from` static method. + * + * @param initialValue An initial CRC32C value - a signed 32-bit integer. + */ + constructor(initialValue = 0) { + /** Current CRC32C value */ + _CRC32C_crc32c.set(this, 0); + __classPrivateFieldSet(this, _CRC32C_crc32c, initialValue, "f"); } - constructor(storage, name, options) { - var _a, _b, _c, _d; - options = options || {}; - // Allow for "gs://"-style input, and strip any trailing slashes. - name = name.replace(/^gs:\/\//, '').replace(/\/+$/, ''); - const requestQueryObject = {}; - if ((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { - requestQueryObject.ifGenerationMatch = - options.preconditionOpts.ifGenerationMatch; + /** + * Calculates a CRC32C from a provided buffer. + * + * Implementation inspired from: + * - {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc github.com/google/crc32c} + * - {@link https://github.com/googleapis/python-crc32c/blob/a595e758c08df445a99c3bf132ee8e80a3ec4308/src/google_crc32c/python.py github.com/googleapis/python-crc32c} + * - {@link https://github.com/googleapis/java-storage/pull/1376/files github.com/googleapis/java-storage} + * + * @param data The `Buffer` to generate the CRC32C from + */ + update(data) { + let current = __classPrivateFieldGet(this, _CRC32C_crc32c, "f") ^ 0xffffffff; + for (const d of data) { + const tablePoly = CRC32C.CRC32C_EXTENSION_TABLE[(d ^ current) & 0xff]; + current = tablePoly ^ (current >>> 8); } - if ((_b = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { - requestQueryObject.ifGenerationNotMatch = - options.preconditionOpts.ifGenerationNotMatch; + __classPrivateFieldSet(this, _CRC32C_crc32c, current ^ 0xffffffff, "f"); + } + /** + * Validates a provided input to the current CRC32C value. + * + * @param input A Buffer, `CRC32C`-compatible object, base64-encoded data (string), or signed 32-bit integer + */ + validate(input) { + if (typeof input === 'number') { + return input === __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); } - if ((_c = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { - requestQueryObject.ifMetagenerationMatch = - options.preconditionOpts.ifMetagenerationMatch; + else if (typeof input === 'string') { + return input === this.toString(); } - if ((_d = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { - requestQueryObject.ifMetagenerationNotMatch = - options.preconditionOpts.ifMetagenerationNotMatch; + else if (Buffer.isBuffer(input)) { + return Buffer.compare(input, this.toBuffer()) === 0; } - const userProject = options.userProject; - if (typeof userProject === 'string') { - requestQueryObject.userProject = userProject; + else { + // `CRC32C`-like object + return input.toString() === this.toString(); } - const methods = { - /** - * Create a bucket. - * - * @method Bucket#create - * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. - * @param {CreateBucketCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * bucket.create(function(err, bucket, apiResponse) { - * if (!err) { - * // The bucket was created successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.create().then(function(data) { - * const bucket = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - create: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * IamDeleteBucketOptions Configuration options. - * @property {boolean} [ignoreNotFound = false] Ignore an error if - * the bucket does not exist. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} DeleteBucketResponse - * @property {object} 0 The full API response. - */ - /** - * @callback DeleteBucketCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Delete the bucket. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/delete| Buckets: delete API Documentation} - * - * @method Bucket#delete - * @param {DeleteBucketOptions} [options] Configuration options. - * @param {boolean} [options.ignoreNotFound = false] Ignore an error if - * the bucket does not exist. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {DeleteBucketCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * bucket.delete(function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.delete().then(function(data) { - * const apiResponse = data[0]; - * }); - * - * ``` - * @example include:samples/buckets.js - * region_tag:storage_delete_bucket - * Another example: - */ - delete: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {object} BucketExistsOptions Configuration options for Bucket#exists(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} BucketExistsResponse - * @property {boolean} 0 Whether the {@link Bucket} exists. - */ - /** - * @callback BucketExistsCallback - * @param {?Error} err Request error, if any. - * @param {boolean} exists Whether the {@link Bucket} exists. - */ - /** - * Check if the bucket exists. - * - * @method Bucket#exists - * @param {BucketExistsOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {BucketExistsCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * bucket.exists(function(err, exists) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.exists().then(function(data) { - * const exists = data[0]; - * }); - * ``` - */ - exists: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {object} [GetBucketOptions] Configuration options for Bucket#get() - * @property {boolean} [autoCreate] Automatically create the object if - * it does not exist. Default: `false` - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} GetBucketResponse - * @property {Bucket} 0 The {@link Bucket}. - * @property {object} 1 The full API response. - */ - /** - * @callback GetBucketCallback - * @param {?Error} err Request error, if any. - * @param {Bucket} bucket The {@link Bucket}. - * @param {object} apiResponse The full API response. - */ - /** - * Get a bucket if it exists. - * - * You may optionally use this to "get or create" an object by providing - * an object with `autoCreate` set to `true`. Any extra configuration that - * is normally required for the `create` method must be contained within - * this object as well. - * - * @method Bucket#get - * @param {GetBucketOptions} [options] Configuration options. - * @param {boolean} [options.autoCreate] Automatically create the object if - * it does not exist. Default: `false` - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetBucketCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * bucket.get(function(err, bucket, apiResponse) { - * // `bucket.metadata` has been populated. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.get().then(function(data) { - * const bucket = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - get: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {array} GetBucketMetadataResponse - * @property {object} 0 The bucket metadata. - * @property {object} 1 The full API response. - */ - /** - * @callback GetBucketMetadataCallback - * @param {?Error} err Request error, if any. - * @param {object} metadata The bucket metadata. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {object} GetBucketMetadataOptions Configuration options for Bucket#getMetadata(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * Get the bucket's metadata. - * - * To set metadata, see {@link Bucket#setMetadata}. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/get| Buckets: get API Documentation} - * - * @method Bucket#getMetadata - * @param {GetBucketMetadataOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * bucket.getMetadata(function(err, metadata, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.getMetadata().then(function(data) { - * const metadata = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/requesterPays.js - * region_tag:storage_get_requester_pays_status - * Example of retrieving the requester pays status of a bucket: - */ - getMetadata: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {object} SetBucketMetadataOptions Configuration options for Bucket#setMetadata(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} SetBucketMetadataResponse - * @property {object} apiResponse The full API response. - */ - /** - * @callback SetBucketMetadataCallback - * @param {?Error} err Request error, if any. - * @param {object} metadata The bucket metadata. - */ - /** - * Set the bucket's metadata. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} - * - * @method Bucket#setMetadata - * @param {object} metadata The metadata you wish to set. - * @param {SetBucketMetadataOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Set website metadata field on the bucket. - * //- - * const metadata = { - * website: { - * mainPageSuffix: 'http://example.com', - * notFoundPage: 'http://example.com/404.html' - * } - * }; - * - * bucket.setMetadata(metadata, function(err, apiResponse) {}); - * - * //- - * // Enable versioning for your bucket. - * //- - * bucket.setMetadata({ - * versioning: { - * enabled: true - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Enable KMS encryption for objects within this bucket. - * //- - * bucket.setMetadata({ - * encryption: { - * defaultKmsKeyName: 'projects/grape-spaceship-123/...' - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Set the default event-based hold value for new objects in this - * // bucket. - * //- - * bucket.setMetadata({ - * defaultEventBasedHold: true - * }, function(err, apiResponse) {}); - * - * //- - * // Remove object lifecycle rules. - * //- - * bucket.setMetadata({ - * lifecycle: null - * }, function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.setMetadata(metadata).then(function(data) { - * const apiResponse = data[0]; - * }); - * ``` - */ - setMetadata: { - reqOpts: { - qs: requestQueryObject, - }, - }, - }; - super({ - parent: storage, - baseUrl: '/b', - id: name, - createMethod: storage.createBucket.bind(storage), - methods, - }); - this.name = name; - this.storage = storage; - this.userProject = options.userProject; - this.acl = new acl_js_1.Acl({ - request: this.request.bind(this), - pathPrefix: '/acl', - }); - this.acl.default = new acl_js_1.Acl({ - request: this.request.bind(this), - pathPrefix: '/defaultObjectAcl', - }); - this.crc32cGenerator = - options.crc32cGenerator || this.storage.crc32cGenerator; - this.iam = new iam_js_1.Iam(this); - this.getFilesStream = paginator_1.paginator.streamify('getFiles'); - this.instanceRetryValue = storage.retryOptions.autoRetry; - this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts; } /** - * The bucket's Cloud Storage URI (`gs://`) + * Returns a `Buffer` representation of the CRC32C value + */ + toBuffer() { + const buffer = Buffer.alloc(4); + buffer.writeInt32BE(__classPrivateFieldGet(this, _CRC32C_crc32c, "f")); + return buffer; + } + /** + * Returns a JSON-compatible, base64-encoded representation of the CRC32C value. + * + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify `JSON#stringify`} + */ + toJSON() { + return this.toString(); + } + /** + * Returns a base64-encoded representation of the CRC32C value. * - * @example - * ```ts - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString `Object#toString`} + */ + toString() { + return this.toBuffer().toString('base64'); + } + /** + * Returns the `number` representation of the CRC32C value as a signed 32-bit integer * - * // `gs://my-bucket` - * const href = bucket.cloudStorageURI.href; - * ``` + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf `Object#valueOf`} */ - get cloudStorageURI() { - const uri = new url_1.URL('gs://'); - uri.host = this.name; - return uri; + valueOf() { + return __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); } /** - * @typedef {object} AddLifecycleRuleOptions Configuration options for Bucket#addLifecycleRule(). - * @property {boolean} [append=true] The new rules will be appended to any - * pre-existing rules. + * Generates a `CRC32C` from a compatible buffer format. + * + * @param value 4-byte `ArrayBufferView`/`Buffer`/`TypedArray` */ + static fromBuffer(value) { + let buffer; + if (Buffer.isBuffer(value)) { + buffer = value; + } + else if ('buffer' in value) { + // `ArrayBufferView` + buffer = Buffer.from(value.buffer); + } + else { + // `ArrayBuffer` + buffer = Buffer.from(value); + } + if (buffer.byteLength !== 4) { + throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BUFFER_LENGTH(buffer.byteLength)); + } + return new CRC32C(buffer.readInt32BE()); + } + static async fromFile(file) { + const crc32c = new CRC32C(); + await new Promise((resolve, reject) => { + (0, fs_1.createReadStream)(file) + .on('data', (d) => { + if (typeof d === 'string') { + crc32c.update(Buffer.from(d)); + } + else { + crc32c.update(d); + } + }) + .on('end', () => resolve()) + .on('error', reject); + }); + return crc32c; + } /** + * Generates a `CRC32C` from 4-byte base64-encoded data (string). * - * @typedef {object} LifecycleRule The new lifecycle rule to be added to objects - * in this bucket. - * @property {string|object} action The action to be taken upon matching of - * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. - * **Note**: For configuring a raw-formatted rule object to be passed as `action` - * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. - * @property {object} condition Condition a bucket must meet before the - * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. - * @property {string} [storageClass] When using the `setStorageClass` - * action, provide this option to dictate which storage class the object - * should update to. Please see - * [SetStorageClass option documentation]{@link https://cloud.google.com/storage/docs/lifecycle#setstorageclass} for supported transitions. + * @param value 4-byte base64-encoded data (string) */ + static fromString(value) { + const buffer = Buffer.from(value, 'base64'); + if (buffer.byteLength !== 4) { + throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BASE64_RANGE(buffer.byteLength)); + } + return this.fromBuffer(buffer); + } /** - * Add an object lifecycle management rule to the bucket. + * Generates a `CRC32C` from a safe, unsigned 32-bit integer. * - * By default, an Object Lifecycle Management rule provided to this method - * will be included to the existing policy. To replace all existing rules, - * supply the `options` argument, setting `append` to `false`. + * @param value an unsigned 32-bit integer + */ + static fromNumber(value) { + if (!Number.isSafeInteger(value) || value > 2 ** 32 || value < -(2 ** 32)) { + throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_INTEGER(value)); + } + return new CRC32C(value); + } + /** + * Generates a `CRC32C` from a variety of compatable types. + * Note: strings are treated as input, not as file paths to read from. * - * To add multiple rules, pass a list to the `rule` parameter. Calling this - * function multiple times asynchronously does not guarantee that all rules - * are added correctly. + * @param value A number, 4-byte `ArrayBufferView`/`Buffer`/`TypedArray`, or 4-byte base64-encoded data (string) + */ + static from(value) { + if (typeof value === 'number') { + return this.fromNumber(value); + } + else if (typeof value === 'string') { + return this.fromString(value); + } + else if ('byteLength' in value) { + // `ArrayBuffer` | `Buffer` | `ArrayBufferView` + return this.fromBuffer(value); + } + else { + // `CRC32CValidator`/`CRC32C`-like + return this.fromString(value.toString()); + } + } +} +exports.CRC32C = CRC32C; +_CRC32C_crc32c = new WeakMap(); +CRC32C.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; +CRC32C.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; + + +/***/ }), + +/***/ 4713: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _File_instances, _File_validateIntegrity; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.File = exports.FileExceptionMessages = exports.RequestError = exports.STORAGE_POST_POLICY_BASE_URL = exports.ActionToHTTPMethod = void 0; +const index_js_1 = __nccwpck_require__(4052); +const promisify_1 = __nccwpck_require__(19203); +const crypto = __importStar(__nccwpck_require__(6113)); +const fs = __importStar(__nccwpck_require__(57147)); +const mime_1 = __importDefault(__nccwpck_require__(29994)); +const resumableUpload = __importStar(__nccwpck_require__(42851)); +const stream_1 = __nccwpck_require__(12781); +const zlib = __importStar(__nccwpck_require__(59796)); +const storage_js_1 = __nccwpck_require__(33030); +const bucket_js_1 = __nccwpck_require__(23973); +const acl_js_1 = __nccwpck_require__(22989); +const signer_js_1 = __nccwpck_require__(59019); +const util_js_1 = __nccwpck_require__(38064); +const duplexify_1 = __importDefault(__nccwpck_require__(76599)); +const util_js_2 = __nccwpck_require__(59258); +const crc32c_js_1 = __nccwpck_require__(55810); +const hash_stream_validator_js_1 = __nccwpck_require__(40725); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +var ActionToHTTPMethod; +(function (ActionToHTTPMethod) { + ActionToHTTPMethod["read"] = "GET"; + ActionToHTTPMethod["write"] = "PUT"; + ActionToHTTPMethod["delete"] = "DELETE"; + ActionToHTTPMethod["resumable"] = "POST"; +})(ActionToHTTPMethod || (exports.ActionToHTTPMethod = ActionToHTTPMethod = {})); +/** + * @deprecated - no longer used + */ +exports.STORAGE_POST_POLICY_BASE_URL = 'https://storage.googleapis.com'; +/** + * @private + */ +const GS_URL_REGEXP = /^gs:\/\/([a-z0-9_.-]+)\/(.+)$/; +/** + * @private + * This regex will match compressible content types. These are primarily text/*, +json, +text, +xml content types. + * This was based off of mime-db and may periodically need to be updated if new compressible content types become + * standards. + */ +const COMPRESSIBLE_MIME_REGEX = new RegExp([ + /^text\/|application\/ecmascript|application\/javascript|application\/json/, + /|application\/postscript|application\/rtf|application\/toml|application\/vnd.dart/, + /|application\/vnd.ms-fontobject|application\/wasm|application\/x-httpd-php|application\/x-ns-proxy-autoconfig/, + /|application\/x-sh(?!ockwave-flash)|application\/x-tar|application\/x-virtualbox-hdd|application\/x-virtualbox-ova|application\/x-virtualbox-ovf/, + /|^application\/x-virtualbox-vbox$|application\/x-virtualbox-vdi|application\/x-virtualbox-vhd|application\/x-virtualbox-vmdk/, + /|application\/xml|application\/xml-dtd|font\/otf|font\/ttf|image\/bmp|image\/vnd.adobe.photoshop|image\/vnd.microsoft.icon/, + /|image\/vnd.ms-dds|image\/x-icon|image\/x-ms-bmp|message\/rfc822|model\/gltf-binary|\+json|\+text|\+xml|\+yaml/, +] + .map(r => r.source) + .join(''), 'i'); +class RequestError extends Error { +} +exports.RequestError = RequestError; +const SEVEN_DAYS = 7 * 24 * 60 * 60; +const GS_UTIL_URL_REGEX = /(gs):\/\/([a-z0-9_.-]+)\/(.+)/g; +const HTTPS_PUBLIC_URL_REGEX = /(https):\/\/(storage\.googleapis\.com)\/([a-z0-9_.-]+)\/(.+)/g; +var FileExceptionMessages; +(function (FileExceptionMessages) { + FileExceptionMessages["EXPIRATION_TIME_NA"] = "An expiration time is not available."; + FileExceptionMessages["DESTINATION_NO_NAME"] = "Destination file should have a name."; + FileExceptionMessages["INVALID_VALIDATION_FILE_RANGE"] = "Cannot use validation with file ranges (start/end)."; + FileExceptionMessages["MD5_NOT_AVAILABLE"] = "MD5 verification was specified, but is not available for the requested object. MD5 is not available for composite objects."; + FileExceptionMessages["EQUALS_CONDITION_TWO_ELEMENTS"] = "Equals condition must be an array of 2 elements."; + FileExceptionMessages["STARTS_WITH_TWO_ELEMENTS"] = "StartsWith condition must be an array of 2 elements."; + FileExceptionMessages["CONTENT_LENGTH_RANGE_MIN_MAX"] = "ContentLengthRange must have numeric min & max fields."; + FileExceptionMessages["DOWNLOAD_MISMATCH"] = "The downloaded data did not match the data from the server. To be sure the content is the same, you should download the file again."; + FileExceptionMessages["UPLOAD_MISMATCH_DELETE_FAIL"] = "The uploaded data did not match the data from the server.\n As a precaution, we attempted to delete the file, but it was not successful.\n To be sure the content is the same, you should try removing the file manually,\n then uploading the file again.\n \n\nThe delete attempt failed with this message:\n\n "; + FileExceptionMessages["UPLOAD_MISMATCH"] = "The uploaded data did not match the data from the server.\n As a precaution, the file has been deleted.\n To be sure the content is the same, you should try uploading the file again."; + FileExceptionMessages["MD5_RESUMED_UPLOAD"] = "MD5 cannot be used with a continued resumable upload as MD5 cannot be extended from an existing value"; + FileExceptionMessages["MISSING_RESUME_CRC32C_FINAL_UPLOAD"] = "The CRC32C is missing for the final portion of a resumed upload, which is required for validation. Please provide `resumeCRC32C` if validation is required, or disable `validation`."; +})(FileExceptionMessages || (exports.FileExceptionMessages = FileExceptionMessages = {})); +/** + * A File object is created from your {@link Bucket} object using + * {@link Bucket#file}. + * + * @class + */ +class File extends index_js_1.ServiceObject { + /** + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. * - * See {@link https://cloud.google.com/storage/docs/lifecycle| Object Lifecycle Management} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * An ACL consists of one or more entries, where each entry grants permissions + * to an entity. Permissions define the actions that can be performed against + * an object or bucket (for example, `READ` or `WRITE`); the entity defines + * who the permission applies to (for example, a specific user or group of + * users). * - * @param {LifecycleRule|LifecycleRule[]} rule The new lifecycle rule or rules to be added to objects - * in this bucket. - * @param {string|object} rule.action The action to be taken upon matching of - * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. - * **Note**: For configuring a raw-formatted rule object to be passed as `action` - * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. - * @param {object} rule.condition Condition a bucket must meet before the - * action occurson the bucket. Refer to followitn supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. - * @param {string} [rule.storageClass] When using the `setStorageClass` - * action, provide this option to dictate which storage class the object - * should update to. - * @param {AddLifecycleRuleOptions} [options] Configuration object. - * @param {boolean} [options.append=true] Append the new rule to the existing - * policy. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} + * The `acl` object on a File instance provides methods to get you a list of + * the ACLs defined on your bucket, as well as set, update, and delete them. + * + * See {@link http://goo.gl/6qBBPO| About Access Control lists} + * + * @name File#acl + * @mixes Acl * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Automatically have an object deleted from this bucket once it is 3 years - * // of age. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * age: 365 * 3 // Specified in days. - * } - * }, function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } - * - * const lifecycleRules = bucket.metadata.lifecycle.rule; - * - * // Iterate over the Object Lifecycle Management rules on this bucket. - * lifecycleRules.forEach(lifecycleRule => {}); - * }); + * const myBucket = storage.bucket('my-bucket'); * + * const file = myBucket.file('my-file'); * //- - * // By default, the rule you provide will be added to the existing policy. - * // Optionally, you can disable this behavior to replace all of the - * // pre-existing rules. + * // Make a file publicly readable. * //- * const options = { - * append: false + * entity: 'allUsers', + * role: storage.acl.READER_ROLE * }; * - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * age: 365 * 3 // Specified in days. - * } - * }, options, function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } - * - * // All rules have been replaced with the new "delete" rule. - * - * // Iterate over the Object Lifecycle Management rules on this bucket. - * lifecycleRules.forEach(lifecycleRule => {}); - * }); - * - * //- - * // For objects created before 2018, "downgrade" the storage class. - * //- - * bucket.addLifecycleRule({ - * action: 'setStorageClass', - * storageClass: 'COLDLINE', - * condition: { - * createdBefore: new Date('2018') - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete objects created before 2016 which have the Coldline storage - * // class. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * matchesStorageClass: [ - * 'COLDLINE' - * ], - * createdBefore: new Date('2016') - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete object that has a noncurrent timestamp that is at least 100 days. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * daysSinceNoncurrentTime: 100 - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete object that has a noncurrent timestamp before 2020-01-01. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * noncurrentTimeBefore: new Date('2020-01-01') - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete object that has a customTime that is at least 100 days. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * daysSinceCustomTime: 100 - * } - * }, function(err, apiResponse) ()); + * file.acl.add(options, function(err, aclObject) {}); * * //- - * // Delete object that has a customTime before 2020-01-01. + * // If the callback is omitted, we'll return a Promise. * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * customTimeBefore: new Date('2020-01-01') - * } - * }, function(err, apiResponse) {}); + * file.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); * ``` */ - addLifecycleRule(rule, optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - options = options || {}; - const rules = Array.isArray(rule) ? rule : [rule]; - for (const curRule of rules) { - if (curRule.condition.createdBefore instanceof Date) { - curRule.condition.createdBefore = curRule.condition.createdBefore - .toISOString() - .replace(/T.+$/, ''); - } - if (curRule.condition.customTimeBefore instanceof Date) { - curRule.condition.customTimeBefore = curRule.condition.customTimeBefore - .toISOString() - .replace(/T.+$/, ''); - } - if (curRule.condition.noncurrentTimeBefore instanceof Date) { - curRule.condition.noncurrentTimeBefore = - curRule.condition.noncurrentTimeBefore - .toISOString() - .replace(/T.+$/, ''); - } - } - if (options.append === false) { - this.setMetadata({ lifecycle: { rule: rules } }, options, callback); - return; - } - // The default behavior appends the previously-defined lifecycle rules with - // the new ones just passed in by the user. - this.getMetadata((err, metadata) => { - var _a, _b; - if (err) { - callback(err); - return; - } - const currentLifecycleRules = Array.isArray((_a = metadata.lifecycle) === null || _a === void 0 ? void 0 : _a.rule) - ? (_b = metadata.lifecycle) === null || _b === void 0 ? void 0 : _b.rule - : []; - this.setMetadata({ - lifecycle: { rule: currentLifecycleRules.concat(rules) }, - }, options, callback); - }); - } - /** - * @typedef {object} CombineOptions - * @property {string} [kmsKeyName] Resource name of the Cloud KMS key, of - * the form - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, - * that will be used to encrypt the object. Overwrites the object - * metadata's `kms_key_name` value, if any. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ /** - * @callback CombineCallback - * @param {?Error} err Request error, if any. - * @param {File} newFile The new {@link File}. - * @param {object} apiResponse The full API response. + * The API-formatted resource description of the file. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name File#metadata + * @type {object} */ /** - * @typedef {array} CombineResponse - * @property {File} 0 The new {@link File}. - * @property {object} 1 The full API response. + * The file's name. + * @name File#name + * @type {string} */ /** - * Combine multiple files into one new file. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/compose| Objects: compose API Documentation} - * - * @throws {Error} if a non-array is provided as sources argument. - * @throws {Error} if no sources are provided. - * @throws {Error} if no destination is provided. + * @callback Crc32cGeneratorToStringCallback + * A method returning the CRC32C as a base64-encoded string. * - * @param {string[]|File[]} sources The source files that will be - * combined. - * @param {string|File} destination The file you would like the - * source files combined into. - * @param {CombineOptions} [options] Configuration options. - * @param {string} [options.kmsKeyName] Resource name of the Cloud KMS key, of - * the form - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, - * that will be used to encrypt the object. Overwrites the object - * metadata's `kms_key_name` value, if any. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - - * @param {CombineCallback} [callback] Callback function. - * @returns {Promise} + * @returns {string} * * @example - * ``` - * const logBucket = storage.bucket('log-bucket'); + * Hashing the string 'data' should return 'rth90Q==' * - * const sources = [ - * logBucket.file('2013-logs.txt'), - * logBucket.file('2014-logs.txt') - * ]; + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.toString(); // 'rth90Q==' + * ``` + **/ + /** + * @callback Crc32cGeneratorValidateCallback + * A method validating a base64-encoded CRC32C string. * - * const allLogs = logBucket.file('all-logs.txt'); + * @param {string} [value] base64-encoded CRC32C string to validate + * @returns {boolean} * - * logBucket.combine(sources, allLogs, function(err, newFile, apiResponse) { - * // newFile === allLogs - * }); + * @example + * Should return `true` if the value matches, `false` otherwise * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * logBucket.combine(sources, allLogs).then(function(data) { - * const newFile = data[0]; - * const apiResponse = data[1]; - * }); + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.validate('DkjKuA=='); // false + * crc32c.validate('rth90Q=='); // true * ``` - */ - combine(sources, destination, optionsOrCallback, callback) { - var _a; - if (!Array.isArray(sources) || sources.length === 0) { - throw new Error(BucketExceptionMessages.PROVIDE_SOURCE_FILE); - } - if (!destination) { - throw new Error(BucketExceptionMessages.DESTINATION_FILE_NOT_SPECIFIED); - } - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, // Not relevant but param is required - AvailableServiceObjectMethods.setMetadata, // Same as above - options); - const convertToFile = (file) => { - if (file instanceof file_js_1.File) { - return file; - } - return this.file(file); - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sources = sources.map(convertToFile); - const destinationFile = convertToFile(destination); - callback = callback || index_js_1.util.noop; - if (!destinationFile.metadata.contentType) { - const destinationContentType = mime_1.default.getType(destinationFile.name) || undefined; - if (destinationContentType) { - destinationFile.metadata.contentType = destinationContentType; - } - } - let maxRetries = this.storage.retryOptions.maxRetries; - if ((((_a = destinationFile === null || destinationFile === void 0 ? void 0 : destinationFile.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === - undefined && - options.ifGenerationMatch === undefined && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - maxRetries = 0; - } - if (options.ifGenerationMatch === undefined) { - Object.assign(options, destinationFile.instancePreconditionOpts, options); - } - // Make the request from the destination File object. - destinationFile.request({ - method: 'POST', - uri: '/compose', - maxRetries, - json: { - destination: { - contentType: destinationFile.metadata.contentType, - contentEncoding: destinationFile.metadata.contentEncoding, - }, - sourceObjects: sources.map(source => { - const sourceObject = { - name: source.name, - }; - if (source.metadata && source.metadata.generation) { - sourceObject.generation = parseInt(source.metadata.generation.toString()); - } - return sourceObject; - }), - }, - qs: options, - }, (err, resp) => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - if (err) { - callback(err, null, resp); - return; - } - callback(null, destinationFile, resp); - }); - } + **/ /** - * See a {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll request body}. + * @callback Crc32cGeneratorUpdateCallback + * A method for passing `Buffer`s for CRC32C generation. * - * @typedef {object} CreateChannelConfig - * @property {string} address The address where notifications are - * delivered for this channel. - * @property {string} [delimiter] Returns results in a directory-like mode. - * @property {number} [maxResults] Maximum number of `items` plus `prefixes` - * to return in a single page of responses. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @property {string} [prefix] Filter results to objects whose names begin - * with this prefix. - * @property {string} [projection=noAcl] Set of properties to return. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {boolean} [versions=false] If `true`, lists all versions of an object - * as distinct results. - */ + * @param {Buffer} [data] data to update CRC32C value with + * @returns {undefined} + * + * @example + * Hashing buffers from 'some ' and 'text\n' + * + * ```js + * const buffer1 = Buffer.from('some '); + * crc32c.update(buffer1); + * + * const buffer2 = Buffer.from('text\n'); + * crc32c.update(buffer2); + * + * crc32c.toString(); // 'DkjKuA==' + * ``` + **/ /** - * @typedef {object} CreateChannelOptions - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * @typedef {object} CRC32CValidator + * @property {Crc32cGeneratorToStringCallback} + * @property {Crc32cGeneratorValidateCallback} + * @property {Crc32cGeneratorUpdateCallback} */ /** - * @typedef {array} CreateChannelResponse - * @property {Channel} 0 The new {@link Channel}. - * @property {object} 1 The full API response. + * @callback Crc32cGeneratorCallback + * @returns {CRC32CValidator} */ /** - * @callback CreateChannelCallback - * @param {?Error} err Request error, if any. - * @param {Channel} channel The new {@link Channel}. - * @param {object} apiResponse The full API response. + * @typedef {object} FileOptions Options passed to the File constructor. + * @property {string} [encryptionKey] A custom encryption key. + * @property {number} [generation] Generation to scope the file to. + * @property {string} [kmsKeyName] Cloud KMS Key used to encrypt this + * object, if the object is encrypted by such a key. Limited availability; + * usable only by enabled projects. + * @property {string} [userProject] The ID of the project which will be + * billed for all requests made from File object. + * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} */ /** - * Create a channel that will be notified when objects in this bucket changes. - * - * @throws {Error} If an ID is not provided. - * @throws {Error} If an address is not provided. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll API Documentation} - * - * @param {string} id The ID of the channel to create. - * @param {CreateChannelConfig} config Configuration for creating channel. - * @param {string} config.address The address where notifications are - * delivered for this channel. - * @param {string} [config.delimiter] Returns results in a directory-like mode. - * @param {number} [config.maxResults] Maximum number of `items` plus `prefixes` - * to return in a single page of responses. - * @param {string} [config.pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @param {string} [config.prefix] Filter results to objects whose names begin - * with this prefix. - * @param {string} [config.projection=noAcl] Set of properties to return. - * @param {string} [config.userProject] The ID of the project which will be - * billed for the request. - * @param {boolean} [config.versions=false] If `true`, lists all versions of an object - * as distinct results. - * @param {CreateChannelOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {CreateChannelCallback} [callback] Callback function. - * @returns {Promise} + * Constructs a file object. * + * @param {Bucket} bucket The Bucket instance this file is + * attached to. + * @param {string} name The name of the remote file. + * @param {FileOptions} [options] Configuration options. * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const id = 'new-channel-id'; - * - * const config = { - * address: 'https://...' - * }; - * - * bucket.createChannel(id, config, function(err, channel, apiResponse) { - * if (!err) { - * // Channel created successfully. - * } - * }); + * const myBucket = storage.bucket('my-bucket'); * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.createChannel(id, config).then(function(data) { - * const channel = data[0]; - * const apiResponse = data[1]; - * }); + * const file = myBucket.file('my-file'); * ``` */ - createChannel(id, config, optionsOrCallback, callback) { - if (typeof id !== 'string') { - throw new Error(BucketExceptionMessages.CHANNEL_ID_REQUIRED); + constructor(bucket, name, options = {}) { + var _a, _b; + const requestQueryObject = {}; + let generation; + if (options.generation !== null) { + if (typeof options.generation === 'string') { + generation = Number(options.generation); + } + else { + generation = options.generation; + } + if (!isNaN(generation)) { + requestQueryObject.generation = generation; + } } - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + Object.assign(requestQueryObject, options.preconditionOpts); + const userProject = options.userProject || bucket.userProject; + if (typeof userProject === 'string') { + requestQueryObject.userProject = userProject; + } + const methods = { + /** + * @typedef {array} DeleteFileResponse + * @property {object} 0 The full API response. + */ + /** + * @callback DeleteFileCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Delete the file. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} + * + * @method File#delete + * @param {object} [options] Configuration options. + * @param {boolean} [options.ignoreNotFound = false] Ignore an error if + * the file does not exist. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {DeleteFileCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * file.delete(function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/files.js + * region_tag:storage_delete_file + * Another example: + */ + delete: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {array} FileExistsResponse + * @property {boolean} 0 Whether the {@link File} exists. + */ + /** + * @callback FileExistsCallback + * @param {?Error} err Request error, if any. + * @param {boolean} exists Whether the {@link File} exists. + */ + /** + * Check if the file exists. + * + * @method File#exists + * @param {options} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {FileExistsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * + * file.exists(function(err, exists) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.exists().then(function(data) { + * const exists = data[0]; + * }); + * ``` + */ + exists: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {array} GetFileResponse + * @property {File} 0 The {@link File}. + * @property {object} 1 The full API response. + */ + /** + * @callback GetFileCallback + * @param {?Error} err Request error, if any. + * @param {File} file The {@link File}. + * @param {object} apiResponse The full API response. + */ + /** + * Get a file object and its metadata if it exists. + * + * @method File#get + * @param {options} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {number} [options.generation] The generation number to get + * @param {string} [options.restoreToken] If this is a soft-deleted object in an HNS-enabled bucket, returns the restore token which will + * be necessary to restore it if there's a name conflict with another object. + * @param {boolean} [options.softDeleted] If true, returns the soft-deleted object. + Object `generation` is required if `softDeleted` is set to True. + * @param {GetFileCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * + * file.get(function(err, file, apiResponse) { + * // file.metadata` has been populated. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.get().then(function(data) { + * const file = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + get: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {array} GetFileMetadataResponse + * @property {object} 0 The {@link File} metadata. + * @property {object} 1 The full API response. + */ + /** + * @callback GetFileMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The {@link File} metadata. + * @param {object} apiResponse The full API response. + */ + /** + * Get the file's metadata. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/get| Objects: get API Documentation} + * + * @method File#getMetadata + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetFileMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * + * file.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.getMetadata().then(function(data) { + * const metadata = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/files.js + * region_tag:storage_get_metadata + * Another example: + */ + getMetadata: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {object} SetFileMetadataOptions Configuration options for File#setMetadata(). + * @param {string} [userProject] The ID of the project which will be billed for the request. + */ + /** + * @callback SetFileMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {array} SetFileMetadataResponse + * @property {object} 0 The full API response. + */ + /** + * Merge the given metadata with the current remote file's metadata. This + * will set metadata if it was previously unset or update previously set + * metadata. To unset previously set metadata, set its value to null. + * + * You can set custom key/value pairs in the metadata key of the given + * object, however the other properties outside of this object must adhere + * to the {@link https://goo.gl/BOnnCK| official API documentation}. + * + * + * See the examples below for more information. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} + * + * @method File#setMetadata + * @param {object} [metadata] The metadata you wish to update. + * @param {SetFileMetadataOptions} [options] Configuration options. + * @param {SetFileMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * + * const metadata = { + * contentType: 'application/x-font-ttf', + * metadata: { + * my: 'custom', + * properties: 'go here' + * } + * }; + * + * file.setMetadata(metadata, function(err, apiResponse) {}); + * + * // Assuming current metadata = { hello: 'world', unsetMe: 'will do' } + * file.setMetadata({ + * metadata: { + * abc: '123', // will be set. + * unsetMe: null, // will be unset (deleted). + * hello: 'goodbye' // will be updated from 'world' to 'goodbye'. + * } + * }, function(err, apiResponse) { + * // metadata should now be { abc: '123', hello: 'goodbye' } + * }); + * + * //- + * // Set a temporary hold on this file from its bucket's retention period + * // configuration. + * // + * file.setMetadata({ + * temporaryHold: true + * }, function(err, apiResponse) {}); + * + * //- + * // Alternatively, you may set a temporary hold. This will follow the + * // same behavior as an event-based hold, with the exception that the + * // bucket's retention policy will not renew for this file from the time + * // the hold is released. + * //- + * file.setMetadata({ + * eventBasedHold: true + * }, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.setMetadata(metadata).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + setMetadata: { + reqOpts: { + qs: requestQueryObject, + }, + }, + }; + super({ + parent: bucket, + baseUrl: '/o', + id: encodeURIComponent(name), + methods, + }); + _File_instances.add(this); + this.bucket = bucket; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this.storage = bucket.parent; + // @TODO Can this duplicate code from above be avoided? + if (options.generation !== null) { + let generation; + if (typeof options.generation === 'string') { + generation = Number(options.generation); + } + else { + generation = options.generation; + } + if (!isNaN(generation)) { + this.generation = generation; + } } - else if (optionsOrCallback) { - options = optionsOrCallback; + this.kmsKeyName = options.kmsKeyName; + this.userProject = userProject; + this.name = name; + if (options.encryptionKey) { + this.setEncryptionKey(options.encryptionKey); } - this.request({ - method: 'POST', - uri: '/o/watch', - json: Object.assign({ - id, - type: 'web_hook', - }, config), - qs: options, - }, (err, apiResponse) => { - if (err) { - callback(err, null, apiResponse); - return; - } - const resourceId = apiResponse.resourceId; - const channel = this.storage.channel(id, resourceId); - channel.metadata = apiResponse; - callback(null, channel, apiResponse); + this.acl = new acl_js_1.Acl({ + request: this.request.bind(this), + pathPrefix: '/acl', }); + this.crc32cGenerator = + options.crc32cGenerator || this.bucket.crc32cGenerator; + this.instanceRetryValue = (_b = (_a = this.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry; + this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts; } /** - * Metadata to set for the Notification. - * - * @typedef {object} CreateNotificationOptions - * @property {object} [customAttributes] An optional list of additional - * attributes to attach to each Cloud PubSub message published for this - * notification subscription. - * @property {string[]} [eventTypes] If present, only send notifications about - * listed event types. If empty, sent notifications for all event types. - * @property {string} [objectNamePrefix] If present, only apply this - * notification configuration to object names that begin with this prefix. - * @property {string} [payloadFormat] The desired content of the Payload. - * Defaults to `JSON_API_V1`. - * - * Acceptable values are: - * - `JSON_API_V1` - * - * - `NONE` - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @callback CreateNotificationCallback - * @param {?Error} err Request error, if any. - * @param {Notification} notification The new {@link Notification}. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} CreateNotificationResponse - * @property {Notification} 0 The new {@link Notification}. - * @property {object} 1 The full API response. - */ - /** - * Creates a notification subscription for the bucket. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} - * - * @param {Topic|string} topic The Cloud PubSub topic to which this - * subscription publishes. If the project ID is omitted, the current - * project ID will be used. - * - * Acceptable formats are: - * - `projects/grape-spaceship-123/topics/my-topic` - * - * - `my-topic` - * @param {CreateNotificationOptions} [options] Metadata to set for the - * notification. - * @param {object} [options.customAttributes] An optional list of additional - * attributes to attach to each Cloud PubSub message published for this - * notification subscription. - * @param {string[]} [options.eventTypes] If present, only send notifications about - * listed event types. If empty, sent notifications for all event types. - * @param {string} [options.objectNamePrefix] If present, only apply this - * notification configuration to object names that begin with this prefix. - * @param {string} [options.payloadFormat] The desired content of the Payload. - * Defaults to `JSON_API_V1`. - * - * Acceptable values are: - * - `JSON_API_V1` - * - * - `NONE` - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {CreateNotificationCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} If a valid topic is not provided. - * @see Notification#create + * The object's Cloud Storage URI (`gs://`) * * @example - * ``` + * ```ts * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const callback = function(err, notification, apiResponse) { - * if (!err) { - * // The notification was created successfully. - * } - * }; - * - * myBucket.createNotification('my-topic', callback); - * - * //- - * // Configure the nofiication by providing Notification metadata. - * //- - * const metadata = { - * objectNamePrefix: 'prefix-' - * }; - * - * myBucket.createNotification('my-topic', metadata, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myBucket.createNotification('my-topic').then(function(data) { - * const notification = data[0]; - * const apiResponse = data[1]; - * }); + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('image.png'); * + * // `gs://my-bucket/image.png` + * const href = file.cloudStorageURI.href; * ``` - * @example include:samples/createNotification.js - * region_tag:storage_create_bucket_notifications - * Another example: */ - createNotification(topic, optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - const topicIsObject = topic !== null && typeof topic === 'object'; - if (topicIsObject && index_js_1.util.isCustomType(topic, 'pubsub/topic')) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - topic = topic.name; - } - if (typeof topic !== 'string') { - throw new Error(BucketExceptionMessages.TOPIC_NAME_REQUIRED); - } - const body = Object.assign({ topic }, options); - if (body.topic.indexOf('projects') !== 0) { - body.topic = 'projects/{{projectId}}/topics/' + body.topic; - } - body.topic = `//pubsub.${this.storage.universeDomain}/` + body.topic; - if (!body.payloadFormat) { - body.payloadFormat = 'JSON_API_V1'; - } - const query = {}; - if (body.userProject) { - query.userProject = body.userProject; - delete body.userProject; - } - this.request({ - method: 'POST', - uri: '/notificationConfigs', - json: (0, util_js_1.convertObjKeysToSnakeCase)(body), - qs: query, - maxRetries: 0, //explicitly set this value since this is a non-idempotent function - }, (err, apiResponse) => { - if (err) { - callback(err, null, apiResponse); - return; - } - const notification = this.notification(apiResponse.id); - notification.metadata = apiResponse; - callback(null, notification, apiResponse); - }); + get cloudStorageURI() { + const uri = this.bucket.cloudStorageURI; + uri.pathname = this.name; + return uri; } /** - * @typedef {object} DeleteFilesOptions Query object. See {@link Bucket#getFiles} - * for all of the supported properties. - * @property {boolean} [force] Suppress errors until all files have been - * processed. - */ - /** - * @callback DeleteFilesCallback - * @param {?Error|?Error[]} err Request error, if any, or array of errors from - * files that were not able to be deleted. - * @param {object} [apiResponse] The full API response. - */ - /** - * Iterate over the bucket's files, calling `file.delete()` on each. - * - * This is not an atomic request. A delete attempt will be - * made for each file individually. Any one can fail, in which case only a - * portion of the files you intended to be deleted would have. - * - * Operations are performed in parallel, up to 10 at once. The first error - * breaks the loop and will execute the provided callback with it. Specify - * `{ force: true }` to suppress the errors until all files have had a chance - * to be processed. - * - * File preconditions cannot be passed to this function. It will not retry unless - * the idempotency strategy is set to retry always. - * - * The `query` object passed as the first argument will also be passed to - * {@link Bucket#getFiles}. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} - * - * @param {DeleteFilesOptions} [query] Query object. See {@link Bucket#getFiles} - * @param {boolean} [query.force] Suppress errors until all files have been - * processed. - * @param {DeleteFilesCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Delete all of the files in the bucket. - * //- - * bucket.deleteFiles(function(err) {}); - * - * //- - * // By default, if a file cannot be deleted, this method will stop deleting - * // files from your bucket. You can override this setting with `force: - * // true`. - * //- - * bucket.deleteFiles({ - * force: true - * }, function(errors) { - * // `errors`: - * // Array of errors if any occurred, otherwise null. - * }); - * - * //- - * // The first argument to this method acts as a query to - * // {@link Bucket#getFiles}. As an example, you can delete files - * // which match a prefix. - * //- - * bucket.deleteFiles({ - * prefix: 'images/' - * }, function(err) { - * if (!err) { - * // All files in the `images` directory have been deleted. - * } - * }); + * A helper method for determining if a request should be retried based on preconditions. + * This should only be used for methods where the idempotency is determined by + * `ifGenerationMatch` + * @private * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.deleteFiles().then(function() {}); - * ``` + * A request should not be retried under the following conditions: + * - if precondition option `ifGenerationMatch` is not set OR + * - if `idempotencyStrategy` is set to `RetryNever` */ - deleteFiles(queryOrCallback, callback) { - let query = {}; - if (typeof queryOrCallback === 'function') { - callback = queryOrCallback; - } - else if (queryOrCallback) { - query = queryOrCallback; - } - const MAX_PARALLEL_LIMIT = 10; - const MAX_QUEUE_SIZE = 1000; - const errors = []; - const deleteFile = (file) => { - return file.delete(query).catch(err => { - if (!query.force) { - throw err; - } - errors.push(err); - }); - }; - (async () => { - try { - let promises = []; - const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); - const filesStream = this.getFilesStream(query); - for await (const curFile of filesStream) { - if (promises.length >= MAX_QUEUE_SIZE) { - await Promise.all(promises); - promises = []; - } - promises.push(limit(() => deleteFile(curFile)).catch(e => { - filesStream.destroy(); - throw e; - })); - } - await Promise.all(promises); - callback(errors.length > 0 ? errors : null); - } - catch (e) { - callback(e); - return; - } - })(); + shouldRetryBasedOnPreconditionAndIdempotencyStrat(options) { + var _a; + return !(((options === null || options === void 0 ? void 0 : options.ifGenerationMatch) === undefined && + ((_a = this.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever); } /** - * @deprecated - * @typedef {array} DeleteLabelsResponse - * @property {object} 0 The full API response. + * @typedef {array} CopyResponse + * @property {File} 0 The copied {@link File}. + * @property {object} 1 The full API response. */ /** - * @deprecated - * @callback DeleteLabelsCallback + * @callback CopyCallback * @param {?Error} err Request error, if any. - * @param {object} metadata Bucket's metadata. + * @param {File} copiedFile The copied {@link File}. + * @param {object} apiResponse The full API response. */ /** - * @deprecated Use setMetadata directly - * Delete one or more labels from this bucket. + * @typedef {object} CopyOptions Configuration options for File#copy(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @property {string} [cacheControl] The cacheControl setting for the new file. + * @property {string} [contentEncoding] The contentEncoding setting for the new file. + * @property {string} [contentType] The contentType setting for the new file. + * @property {string} [destinationKmsKeyName] Resource name of the Cloud + * KMS key, of the form + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, + * that will be used to encrypt the object. Overwrites the object + * metadata's `kms_key_name` value, if any. + * @property {Metadata} [metadata] Metadata to specify on the copied file. + * @property {string} [predefinedAcl] Set the ACL for the new file. + * @property {string} [token] A previously-returned `rewriteToken` from an + * unfinished rewrite request. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Copy this file to another file. By default, this will copy the file to the + * same bucket, but you can choose to copy it to another Bucket by providing + * a Bucket or File object or a URL starting with "gs://". + * The generation of the file will not be preserved. * - * @param {string|string[]} [labels] The labels to delete. If no labels are - * provided, all of the labels are removed. - * @param {DeleteLabelsCallback} [callback] Callback function. - * @param {DeleteLabelsOptions} [options] Options, including precondition options - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite| Objects: rewrite API Documentation} + * + * @throws {Error} If the destination file is not provided. + * + * @param {string|Bucket|File} destination Destination file. + * @param {CopyOptions} [options] Configuration options. See an + * @param {CopyCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); * * //- - * // Delete all of the labels from this bucket. + * // You can pass in a variety of types for the destination. + * // + * // For all of the below examples, assume we are working with the following + * // Bucket and File objects. * //- - * bucket.deleteLabels(function(err, apiResponse) {}); + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); * * //- - * // Delete a single label. + * // If you pass in a string for the destination, the file is copied to its + * // current bucket, under the new name provided. * //- - * bucket.deleteLabels('labelone', function(err, apiResponse) {}); + * file.copy('my-image-copy.png', function(err, copiedFile, apiResponse) { + * // `my-bucket` now contains: + * // - "my-image.png" + * // - "my-image-copy.png" * - * //- - * // Delete a specific set of labels. - * //- - * bucket.deleteLabels([ - * 'labelone', - * 'labeltwo' - * ], function(err, apiResponse) {}); + * // `copiedFile` is an instance of a File object that refers to your new + * // file. + * }); * * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.deleteLabels().then(function(data) { - * const apiResponse = data[0]; - * }); - * ``` - */ - deleteLabels(labelsOrCallbackOrOptions, optionsOrCallback, callback) { - let labels = new Array(); - let options = {}; - if (typeof labelsOrCallbackOrOptions === 'function') { - callback = labelsOrCallbackOrOptions; - } - else if (typeof labelsOrCallbackOrOptions === 'string') { - labels = [labelsOrCallbackOrOptions]; - } - else if (Array.isArray(labelsOrCallbackOrOptions)) { - labels = labelsOrCallbackOrOptions; - } - else if (labelsOrCallbackOrOptions) { - options = labelsOrCallbackOrOptions; - } - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - const deleteLabels = (labels) => { - const nullLabelMap = labels.reduce((nullLabelMap, labelKey) => { - nullLabelMap[labelKey] = null; - return nullLabelMap; - }, {}); - if ((options === null || options === void 0 ? void 0 : options.ifMetagenerationMatch) !== undefined) { - this.setLabels(nullLabelMap, options, callback); - } - else { - this.setLabels(nullLabelMap, callback); - } - }; - if (labels.length === 0) { - this.getLabels((err, labels) => { - if (err) { - callback(err); - return; - } - deleteLabels(Object.keys(labels)); - }); - } - else { - deleteLabels(labels); - } - } - /** - * @typedef {array} DisableRequesterPaysResponse - * @property {object} 0 The full API response. - */ - /** - * @callback DisableRequesterPaysCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - *
- * Early Access Testers Only - *

- * This feature is not yet widely-available. - *

- *
+ * // If you pass in a string starting with "gs://" for the destination, the + * // file is copied to the other bucket and under the new name provided. + * //- + * const newLocation = 'gs://another-bucket/my-image-copy.png'; + * file.copy(newLocation, function(err, copiedFile, apiResponse) { + * // `my-bucket` still contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image-copy.png" * - * Disable `requesterPays` functionality from this bucket. + * // `copiedFile` is an instance of a File object that refers to your new + * // file. + * }); * - * @param {DisableRequesterPaysCallback} [callback] Callback function. - * @param {DisableRequesterPaysOptions} [options] Options, including precondition options - * @returns {Promise} + * //- + * // If you pass in a Bucket object, the file will be copied to that bucket + * // using the same name. + * //- + * const anotherBucket = storage.bucket('another-bucket'); + * file.copy(anotherBucket, function(err, copiedFile, apiResponse) { + * // `my-bucket` still contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image.png" * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * // `copiedFile` is an instance of a File object that refers to your new + * // file. + * }); * - * bucket.disableRequesterPays(function(err, apiResponse) { - * if (!err) { - * // requesterPays functionality disabled successfully. - * } + * //- + * // If you pass in a File object, you have complete control over the new + * // bucket and filename. + * //- + * const anotherFile = anotherBucket.file('my-awesome-image.png'); + * file.copy(anotherFile, function(err, copiedFile, apiResponse) { + * // `my-bucket` still contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-awesome-image.png" + * + * // Note: + * // The `copiedFile` parameter is equal to `anotherFile`. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.disableRequesterPays().then(function(data) { - * const apiResponse = data[0]; + * file.copy(newLocation).then(function(data) { + * const newFile = data[0]; + * const apiResponse = data[1]; * }); * * ``` - * @example include:samples/requesterPays.js - * region_tag:storage_disable_requester_pays - * Example of disabling requester pays: + * @example include:samples/files.js + * region_tag:storage_copy_file + * Another example: */ - disableRequesterPays(optionsOrCallback, callback) { + copy(destination, optionsOrCallback, callback) { + var _a, _b; + const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME); + if (!destination) { + throw noDestinationError; + } let options = {}; if (typeof optionsOrCallback === 'function') { callback = optionsOrCallback; } else if (optionsOrCallback) { - options = optionsOrCallback; + options = { ...optionsOrCallback }; } - this.setMetadata({ - billing: { - requesterPays: false, - }, - }, options, callback); + callback = callback || index_js_1.util.noop; + let destBucket; + let destName; + let newFile; + if (typeof destination === 'string') { + const parsedDestination = GS_URL_REGEXP.exec(destination); + if (parsedDestination !== null && parsedDestination.length === 3) { + destBucket = this.storage.bucket(parsedDestination[1]); + destName = parsedDestination[2]; + } + else { + destBucket = this.bucket; + destName = destination; + } + } + else if (destination instanceof bucket_js_1.Bucket) { + destBucket = destination; + destName = this.name; + } + else if (destination instanceof File) { + destBucket = destination.bucket; + destName = destination.name; + newFile = destination; + } + else { + throw noDestinationError; + } + const query = {}; + if (this.generation !== undefined) { + query.sourceGeneration = this.generation; + } + if (options.token !== undefined) { + query.rewriteToken = options.token; + } + if (options.userProject !== undefined) { + query.userProject = options.userProject; + delete options.userProject; + } + if (options.predefinedAcl !== undefined) { + query.destinationPredefinedAcl = options.predefinedAcl; + delete options.predefinedAcl; + } + newFile = newFile || destBucket.file(destName); + const headers = {}; + if (this.encryptionKey !== undefined) { + headers['x-goog-copy-source-encryption-algorithm'] = 'AES256'; + headers['x-goog-copy-source-encryption-key'] = this.encryptionKeyBase64; + headers['x-goog-copy-source-encryption-key-sha256'] = + this.encryptionKeyHash; + } + if (newFile.encryptionKey !== undefined) { + this.setEncryptionKey(newFile.encryptionKey); + } + else if (options.destinationKmsKeyName !== undefined) { + query.destinationKmsKeyName = options.destinationKmsKeyName; + delete options.destinationKmsKeyName; + } + else if (newFile.kmsKeyName !== undefined) { + query.destinationKmsKeyName = newFile.kmsKeyName; + } + if (query.destinationKmsKeyName) { + this.kmsKeyName = query.destinationKmsKeyName; + const keyIndex = this.interceptors.indexOf(this.encryptionKeyInterceptor); + if (keyIndex > -1) { + this.interceptors.splice(keyIndex, 1); + } + } + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { + this.storage.retryOptions.autoRetry = false; + } + if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) { + query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch; + delete options.preconditionOpts; + } + this.request({ + method: 'POST', + uri: `/rewriteTo/b/${destBucket.name}/o/${encodeURIComponent(newFile.name)}`, + qs: query, + json: options, + headers, + }, (err, resp) => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + if (err) { + callback(err, null, resp); + return; + } + if (resp.rewriteToken) { + const options = { + token: resp.rewriteToken, + }; + if (query.userProject) { + options.userProject = query.userProject; + } + if (query.destinationKmsKeyName) { + options.destinationKmsKeyName = query.destinationKmsKeyName; + } + this.copy(newFile, options, callback); + return; + } + callback(null, newFile, resp); + }); } /** - * Configuration object for enabling logging. - * - * @typedef {object} EnableLoggingOptions - * @property {string|Bucket} [bucket] The bucket for the log entries. By - * default, the current bucket is used. - * @property {string} prefix A unique prefix for log object names. + * @typedef {object} CreateReadStreamOptions Configuration options for File#createReadStream. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string|boolean} [validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with a + * CRC32c checksum. You may use MD5 if preferred, but that hash is not + * supported for composite objects. An error will be raised if MD5 is + * specified but is not available. You may also choose to skip validation + * completely, however this is **not recommended**. + * @property {number} [start] A byte offset to begin the file's download + * from. Default is 0. NOTE: Byte ranges are inclusive; that is, + * `options.start = 0` and `options.end = 999` represent the first 1000 + * bytes in a file or object. NOTE: when specifying a byte range, data + * integrity is not available. + * @property {number} [end] A byte offset to stop reading the file at. + * NOTE: Byte ranges are inclusive; that is, `options.start = 0` and + * `options.end = 999` represent the first 1000 bytes in a file or object. + * NOTE: when specifying a byte range, data integrity is not available. + * @property {boolean} [decompress=true] Disable auto decompression of the + * received data. By default this option is set to `true`. + * Applicable in cases where the data was uploaded with + * `gzip: true` option. See {@link File#createWriteStream}. */ /** - * Enable logging functionality for this bucket. This will make two API - * requests, first to grant Cloud Storage WRITE permission to the bucket, then - * to set the appropriate configuration on the Bucket's metadata. + * Create a readable stream to read the contents of the remote file. It can be + * piped to a writable stream or listened to for 'data' events to read a + * file's contents. * - * @param {EnableLoggingOptions} config Configuration options. - * @param {string|Bucket} [config.bucket] The bucket for the log entries. By - * default, the current bucket is used. - * @param {string} config.prefix A unique prefix for log object names. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} + * In the unlikely event there is a mismatch between what you downloaded and + * the version in your Bucket, your error handler will receive an error with + * code "CONTENT_DOWNLOAD_MISMATCH". If you receive this error, the best + * recourse is to try downloading the file again. + * + * NOTE: Readable streams will emit the `end` event when the file is fully + * downloaded. + * + * @param {CreateReadStreamOptions} [options] Configuration options. + * @returns {ReadableStream} * * @example * ``` + * //- + * //

Downloading a File

+ * // + * // The example below demonstrates how we can reference a remote file, then + * // pipe its contents to a local file. This is effectively creating a local + * // backup of your remote data. + * //- * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * const config = { - * prefix: 'log' - * }; + * const bucket = storage.bucket('my-bucket'); * - * bucket.enableLogging(config, function(err, apiResponse) { - * if (!err) { - * // Logging functionality enabled successfully. - * } - * }); + * const fs = require('fs'); + * const remoteFile = bucket.file('image.png'); + * const localFilename = '/Users/stephen/Photos/image.png'; * - * ``` - * @example - * Optionally, provide a destination bucket. - * ``` - * const config = { - * prefix: 'log', - * bucket: 'destination-bucket' - * }; + * remoteFile.createReadStream() + * .on('error', function(err) {}) + * .on('response', function(response) { + * // Server connected and responded with the specified status and headers. + * }) + * .on('end', function() { + * // The file is fully downloaded. + * }) + * .pipe(fs.createWriteStream(localFilename)); * - * bucket.enableLogging(config, function(err, apiResponse) {}); - * ``` + * //- + * // To limit the downloaded data to only a byte range, pass an options + * // object. + * //- + * const logFile = myBucket.file('access_log'); + * logFile.createReadStream({ + * start: 10000, + * end: 20000 + * }) + * .on('error', function(err) {}) + * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); * - * @example - * If the callback is omitted, we'll return a Promise. - * ``` - * bucket.enableLogging(config).then(function(data) { - * const apiResponse = data[0]; - * }); + * //- + * // To read a tail byte range, specify only `options.end` as a negative + * // number. + * //- + * const logFile = myBucket.file('access_log'); + * logFile.createReadStream({ + * end: -100 + * }) + * .on('error', function(err) {}) + * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); * ``` */ - enableLogging(config, callback) { - if (!config || - typeof config === 'function' || - typeof config.prefix === 'undefined') { - throw new Error(BucketExceptionMessages.CONFIGURATION_OBJECT_PREFIX_REQUIRED); - } - let logBucket = this.id; - if (config.bucket && config.bucket instanceof Bucket) { - logBucket = config.bucket.id; - } - else if (config.bucket && typeof config.bucket === 'string') { - logBucket = config.bucket; + createReadStream(options = {}) { + options = Object.assign({ decompress: true }, options); + const rangeRequest = typeof options.start === 'number' || typeof options.end === 'number'; + const tailRequest = options.end < 0; + let validateStream = undefined; + let request = undefined; + const throughStream = new util_js_2.PassThroughShim(); + let crc32c = true; + let md5 = false; + if (typeof options.validation === 'string') { + const value = options.validation.toLowerCase().trim(); + crc32c = value === 'crc32c'; + md5 = value === 'md5'; } - const options = {}; - if (config === null || config === void 0 ? void 0 : config.ifMetagenerationMatch) { - options.ifMetagenerationMatch = config.ifMetagenerationMatch; + else if (options.validation === false) { + crc32c = false; } - if (config === null || config === void 0 ? void 0 : config.ifMetagenerationNotMatch) { - options.ifMetagenerationNotMatch = config.ifMetagenerationNotMatch; + const shouldRunValidation = !rangeRequest && (crc32c || md5); + if (rangeRequest) { + if (typeof options.validation === 'string' || + options.validation === true) { + throw new Error(FileExceptionMessages.INVALID_VALIDATION_FILE_RANGE); + } + // Range requests can't receive data integrity checks. + crc32c = false; + md5 = false; } - (async () => { - try { - const [policy] = await this.iam.getPolicy(); - policy.bindings.push({ - members: ['group:cloud-storage-analytics@google.com'], - role: 'roles/storage.objectCreator', + const onComplete = (err) => { + if (err) { + // There is an issue with node-fetch 2.x that if the stream errors the underlying socket connection is not closed. + // This causes a memory leak, so cleanup the sockets manually here by destroying the agent. + if (request === null || request === void 0 ? void 0 : request.agent) { + request.agent.destroy(); + } + throughStream.destroy(err); + } + }; + // We listen to the response event from the request stream so that we + // can... + // + // 1) Intercept any data from going to the user if an error occurred. + // 2) Calculate the hashes from the http.IncomingMessage response + // stream, + // which will return the bytes from the source without decompressing + // gzip'd content. We then send it through decompressed, if + // applicable, to the user. + const onResponse = (err, _body, rawResponseStream) => { + if (err) { + // Get error message from the body. + this.getBufferFromReadable(rawResponseStream).then(body => { + err.message = body.toString('utf8'); + throughStream.destroy(err); }); - await this.iam.setPolicy(policy); - this.setMetadata({ - logging: { - logBucket, - logObjectPrefix: config.prefix, - }, - }, options, callback); + return; } - catch (e) { - callback(e); + request = rawResponseStream.request; + const headers = rawResponseStream.toJSON().headers; + const isCompressed = headers['content-encoding'] === 'gzip'; + const hashes = {}; + // The object is safe to validate if: + // 1. It was stored gzip and returned to us gzip OR + // 2. It was never stored as gzip + const safeToValidate = (headers['x-goog-stored-content-encoding'] === 'gzip' && + isCompressed) || + headers['x-goog-stored-content-encoding'] === 'identity'; + const transformStreams = []; + if (shouldRunValidation) { + // The x-goog-hash header should be set with a crc32c and md5 hash. + // ex: headers['x-goog-hash'] = 'crc32c=xxxx,md5=xxxx' + if (typeof headers['x-goog-hash'] === 'string') { + headers['x-goog-hash'] + .split(',') + .forEach((hashKeyValPair) => { + const delimiterIndex = hashKeyValPair.indexOf('='); + const hashType = hashKeyValPair.substring(0, delimiterIndex); + const hashValue = hashKeyValPair.substring(delimiterIndex + 1); + hashes[hashType] = hashValue; + }); + } + validateStream = new hash_stream_validator_js_1.HashStreamValidator({ + crc32c, + md5, + crc32cGenerator: this.crc32cGenerator, + crc32cExpected: hashes.crc32c, + md5Expected: hashes.md5, + }); + } + if (md5 && !hashes.md5) { + const hashError = new RequestError(FileExceptionMessages.MD5_NOT_AVAILABLE); + hashError.code = 'MD5_NOT_AVAILABLE'; + throughStream.destroy(hashError); return; } - })(); + if (safeToValidate && shouldRunValidation && validateStream) { + transformStreams.push(validateStream); + } + if (isCompressed && options.decompress) { + transformStreams.push(zlib.createGunzip()); + } + (0, stream_1.pipeline)(rawResponseStream, ...transformStreams, throughStream, onComplete); + }; + // Authenticate the request, then pipe the remote API request to the stream + // returned to the user. + const makeRequest = () => { + const query = { alt: 'media' }; + if (this.generation) { + query.generation = this.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + const headers = { + 'Accept-Encoding': 'gzip', + 'Cache-Control': 'no-store', + }; + if (rangeRequest) { + const start = typeof options.start === 'number' ? options.start : '0'; + const end = typeof options.end === 'number' ? options.end : ''; + headers.Range = `bytes=${tailRequest ? end : `${start}-${end}`}`; + } + const reqOpts = { + uri: '', + headers, + qs: query, + }; + if (options[util_js_1.GCCL_GCS_CMD_KEY]) { + reqOpts[util_js_1.GCCL_GCS_CMD_KEY] = options[util_js_1.GCCL_GCS_CMD_KEY]; + } + this.requestStream(reqOpts) + .on('error', err => { + throughStream.destroy(err); + }) + .on('response', res => { + throughStream.emit('response', res); + index_js_1.util.handleResp(null, res, null, onResponse); + }) + .resume(); + }; + throughStream.on('reading', makeRequest); + return throughStream; } /** - * @typedef {array} EnableRequesterPaysResponse - * @property {object} 0 The full API response. + * @callback CreateResumableUploadCallback + * @param {?Error} err Request error, if any. + * @param {string} uri The resumable upload's unique session URI. */ /** - * @callback EnableRequesterPaysCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. + * @typedef {array} CreateResumableUploadResponse + * @property {string} 0 The resumable upload's unique session URI. */ /** - *
- * Early Access Testers Only - *

- * This feature is not yet widely-available. - *

- *
+ * @typedef {object} CreateResumableUploadOptions + * @property {object} [metadata] Metadata to set on the file. + * @property {number} [offset] The starting byte of the upload stream for resuming an interrupted upload. + * @property {string} [origin] Origin header to set for the upload. + * @property {string} [predefinedAcl] Apply a predefined set of access + * controls to this object. + * + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @property {boolean} [private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @property {boolean} [public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string} [chunkSize] Create a separate request per chunk. This + * value is in bytes and should be a multiple of 256 KiB (2^18). + * {@link https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload| We recommend using at least 8 MiB for the chunk size.} + */ + /** + * Create a unique resumable upload session URI. This is the first step when + * performing a resumable upload. * - * Enable `requesterPays` functionality for this bucket. This enables you, the - * bucket owner, to have the requesting user assume the charges for the access - * to your bucket and its contents. + * See the {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} + * for more on how the entire process works. * - * @param {EnableRequesterPaysCallback | EnableRequesterPaysOptions} [optionsOrCallback] - * Callback function or precondition options. - * @returns {Promise} + *

Note

+ * + * If you are just looking to perform a resumable upload without worrying + * about any of the details, see {@link File#createWriteStream}. Resumable + * uploads are performed by default. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} + * + * @param {CreateResumableUploadOptions} [options] Configuration options. + * @param {CreateResumableUploadCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.enableRequesterPays(function(err, apiResponse) { + * const file = myBucket.file('my-file'); + * file.createResumableUpload(function(err, uri) { * if (!err) { - * // requesterPays functionality enabled successfully. + * // `uri` can be used to PUT data to. * } * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.enableRequesterPays().then(function(data) { - * const apiResponse = data[0]; + * file.createResumableUpload().then(function(data) { + * const uri = data[0]; * }); - * * ``` - * @example include:samples/requesterPays.js - * region_tag:storage_enable_requester_pays - * Example of enabling requester pays: */ - enableRequesterPays(optionsOrCallback, cb) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - cb = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; + createResumableUpload(optionsOrCallback, callback) { + var _a, _b; + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + const retryOptions = this.storage.retryOptions; + if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && + ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + retryOptions.autoRetry = false; } - this.setMetadata({ - billing: { - requesterPays: true, - }, - }, options, cb); + resumableUpload.createURI({ + authClient: this.storage.authClient, + apiEndpoint: this.storage.apiEndpoint, + bucket: this.bucket.name, + customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), + file: this.name, + generation: this.generation, + key: this.encryptionKey, + kmsKeyName: this.kmsKeyName, + metadata: options.metadata, + offset: options.offset, + origin: options.origin, + predefinedAcl: options.predefinedAcl, + private: options.private, + public: options.public, + userProject: options.userProject || this.userProject, + retryOptions: retryOptions, + params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, + universeDomain: this.bucket.storage.universeDomain, + useAuthWithCustomEndpoint: this.storage.useAuthWithCustomEndpoint, + [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], + }, callback); + this.storage.retryOptions.autoRetry = this.instanceRetryValue; } /** - * Create a {@link File} object. See {@link File} to see how to handle - * the different use cases you may have. + * @typedef {object} CreateWriteStreamOptions Configuration options for File#createWriteStream(). + * @property {string} [contentType] Alias for + * `options.metadata.contentType`. If set to `auto`, the file name is used + * to determine the contentType. + * @property {string|boolean} [gzip] If true, automatically gzip the file. + * If set to `auto`, the contentType is used to determine if the file + * should be gzipped. This will set `options.metadata.contentEncoding` to + * `gzip` if necessary. + * @property {object} [metadata] See the examples below or + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body} + * for more details. + * @property {number} [offset] The starting byte of the upload stream, for + * resuming an interrupted upload. Defaults to 0. + * @property {string} [predefinedAcl] Apply a predefined set of access + * controls to this object. * - * @param {string} name The name of the file in this bucket. - * @param {FileOptions} [options] Configuration options. - * @param {string|number} [options.generation] Only use a specific revision of - * this file. - * @param {string} [options.encryptionKey] A custom encryption key. See - * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. - * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will - * be used to encrypt the object. Must be in the format: - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. - * KMS key ring must use the same location as the bucket. - * @param {string} [options.userProject] The ID of the project which will be - * billed for all requests made from File object. - * @returns {File} + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @property {boolean} [private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @property {boolean} [public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @property {boolean} [resumable] Force a resumable upload. NOTE: When + * working with streams, the file format and size is unknown until it's + * completely consumed. Because of this, it's best for you to be explicit + * for what makes sense given your input. + * @property {number} [timeout=60000] Set the HTTP request timeout in + * milliseconds. This option is not available for resumable uploads. + * Default: `60000` + * @property {string} [uri] The URI for an already-created resumable + * upload. See {@link File#createResumableUpload}. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string|boolean} [validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with a + * CRC32c checksum. You may use MD5 if preferred, but that hash is not + * supported for composite objects. An error will be raised if MD5 is + * specified but is not available. You may also choose to skip validation + * completely, however this is **not recommended**. In addition to specifying + * validation type, providing `metadata.crc32c` or `metadata.md5Hash` will + * cause the server to perform validation in addition to client validation. + * NOTE: Validation is automatically skipped for objects that were + * uploaded using the `gzip` option and have already compressed content. + */ + /** + * Create a writable stream to overwrite the contents of the file in your + * bucket. + * + * A File object can also be used to create files for the first time. + * + * Resumable uploads are automatically enabled and must be shut off explicitly + * by setting `options.resumable` to `false`. + * + * + *

+ * There is some overhead when using a resumable upload that can cause + * noticeable performance degradation while uploading a series of small + * files. When uploading files less than 10MB, it is recommended that the + * resumable feature is disabled. + *

+ * + * NOTE: Writable streams will emit the `finish` event when the file is fully + * uploaded. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload Upload Options (Simple or Resumable)} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert Objects: insert API Documentation} + * + * @param {CreateWriteStreamOptions} [options] Configuration options. + * @returns {WritableStream} * * @example * ``` + * const fs = require('fs'); * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const file = bucket.file('my-existing-file.png'); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * + * //- + * //

Uploading a File

+ * // + * // Now, consider a case where we want to upload a file to your bucket. You + * // have the option of using {@link Bucket#upload}, but that is just + * // a convenience method which will do the following. + * //- + * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') + * .pipe(file.createWriteStream()) + * .on('error', function(err) {}) + * .on('finish', function() { + * // The file upload is complete. + * }); + * + * //- + * //

Uploading a File with gzip compression

+ * //- + * fs.createReadStream('/Users/stephen/site/index.html') + * .pipe(file.createWriteStream({ gzip: true })) + * .on('error', function(err) {}) + * .on('finish', function() { + * // The file upload is complete. + * }); + * + * //- + * // Downloading the file with `createReadStream` will automatically decode + * // the file. + * //- + * + * //- + * //

Uploading a File with Metadata

+ * // + * // One last case you may run into is when you want to upload a file to your + * // bucket and set its metadata at the same time. Like above, you can use + * // {@link Bucket#upload} to do this, which is just a wrapper around + * // the following. + * //- + * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') + * .pipe(file.createWriteStream({ + * metadata: { + * contentType: 'image/jpeg', + * metadata: { + * custom: 'metadata' + * } + * } + * })) + * .on('error', function(err) {}) + * .on('finish', function() { + * // The file upload is complete. + * }); * ``` - */ - file(name, options) { - if (!name) { - throw Error(BucketExceptionMessages.SPECIFY_FILE_NAME); - } - return new file_js_1.File(this, name, options); - } - /** - * @typedef {array} GetFilesResponse - * @property {File[]} 0 Array of {@link File} instances. - * @param {object} nextQuery 1 A query object to receive more results. - * @param {object} apiResponse 2 The full API response. - */ - /** - * @callback GetFilesCallback - * @param {?Error} err Request error, if any. - * @param {File[]} files Array of {@link File} instances. - * @param {object} nextQuery A query object to receive more results. - * @param {object} apiResponse The full API response. - */ - /** - * Query object for listing files. * - * @typedef {object} GetFilesOptions - * @property {boolean} [autoPaginate=true] Have pagination handled - * automatically. - * @property {string} [delimiter] Results will contain only objects whose - * names, aside from the prefix, do not contain delimiter. Objects whose - * names, aside from the prefix, contain delimiter will have their name - * truncated after the delimiter, returned in `apiResponse.prefixes`. - * Duplicate prefixes are omitted. - * @property {string} [endOffset] Filter results to objects whose names are - * lexicographically before endOffset. If startOffset is also set, the objects - * listed have names between startOffset (inclusive) and endOffset (exclusive). - * @property {boolean} [includeFoldersAsPrefixes] If true, includes folders and - * managed folders in the set of prefixes returned by the query. Only applicable if - * delimiter is set to / and autoPaginate is set to false. - * See: https://cloud.google.com/storage/docs/managed-folders - * @property {boolean} [includeTrailingDelimiter] If true, objects that end in - * exactly one instance of delimiter have their metadata included in items[] - * in addition to the relevant part of the object name appearing in prefixes[]. - * @property {string} [prefix] Filter results to objects whose names begin - * with this prefix. - * @property {string} [matchGlob] A glob pattern used to filter results, - * for example foo*bar - * @property {number} [maxApiCalls] Maximum number of API calls to make. - * @property {number} [maxResults] Maximum number of items plus prefixes to - * return per call. - * Note: By default will handle pagination automatically - * if more than 1 page worth of results are requested per call. - * When `autoPaginate` is set to `false` the smaller of `maxResults` - * or 1 page of results will be returned per call. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @property {boolean} [softDeleted] If true, only soft-deleted object versions will be - * listed as distinct results in order of generation number. Note `soft_deleted` and - * `versions` cannot be set to true simultaneously. - * @property {string} [startOffset] Filter results to objects whose names are - * lexicographically equal to or after startOffset. If endOffset is also set, - * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {boolean} [versions] If true, returns File objects scoped to - * their versions. - */ - /** - * Get {@link File} objects for the files currently in the bucket. + * //- + * //

Continuing a Resumable Upload

+ * // + * // One can capture a `uri` from a resumable upload to reuse later. + * // Additionally, for validation, one can also capture and pass `crc32c`. + * //- + * let uri: string | undefined = undefined; + * let resumeCRC32C: string | undefined = undefined; * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/list| Objects: list API Documentation} + * fs.createWriteStream() + * .on('uri', link => {uri = link}) + * .on('crc32', crc32c => {resumeCRC32C = crc32c}); * - * @param {GetFilesOptions} [query] Query object for listing files. - * @param {boolean} [query.autoPaginate=true] Have pagination handled - * automatically. - * @param {string} [query.delimiter] Results will contain only objects whose - * names, aside from the prefix, do not contain delimiter. Objects whose - * names, aside from the prefix, contain delimiter will have their name - * truncated after the delimiter, returned in `apiResponse.prefixes`. - * Duplicate prefixes are omitted. - * @param {string} [query.endOffset] Filter results to objects whose names are - * lexicographically before endOffset. If startOffset is also set, the objects - * listed have names between startOffset (inclusive) and endOffset (exclusive). - * @param {boolean} [query.includeFoldersAsPrefixes] If true, includes folders and - * managed folders in the set of prefixes returned by the query. Only applicable if - * delimiter is set to / and autoPaginate is set to false. - * See: https://cloud.google.com/storage/docs/managed-folders - * @param {boolean} [query.includeTrailingDelimiter] If true, objects that end in - * exactly one instance of delimiter have their metadata included in items[] - * in addition to the relevant part of the object name appearing in prefixes[]. - * @param {string} [query.prefix] Filter results to objects whose names begin - * with this prefix. - * @param {number} [query.maxApiCalls] Maximum number of API calls to make. - * @param {number} [query.maxResults] Maximum number of items plus prefixes to - * return per call. - * Note: By default will handle pagination automatically - * if more than 1 page worth of results are requested per call. - * When `autoPaginate` is set to `false` the smaller of `maxResults` - * or 1 page of results will be returned per call. - * @param {string} [query.pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @param {boolean} [query.softDeleted] If true, only soft-deleted object versions will be - * listed as distinct results in order of generation number. Note `soft_deleted` and - * `versions` cannot be set to true simultaneously. - * @param {string} [query.startOffset] Filter results to objects whose names are - * lexicographically equal to or after startOffset. If endOffset is also set, - * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). - * @param {string} [query.userProject] The ID of the project which will be + * // later... + * fs.createWriteStream({uri, resumeCRC32C}); + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + createWriteStream(options = {}) { + var _a; + (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); + if (options.contentType) { + options.metadata.contentType = options.contentType; + } + if (!options.metadata.contentType || + options.metadata.contentType === 'auto') { + const detectedContentType = mime_1.default.getType(this.name); + if (detectedContentType) { + options.metadata.contentType = detectedContentType; + } + } + let gzip = options.gzip; + if (gzip === 'auto') { + gzip = COMPRESSIBLE_MIME_REGEX.test(options.metadata.contentType || ''); + } + if (gzip) { + options.metadata.contentEncoding = 'gzip'; + } + let crc32c = true; + let md5 = false; + if (typeof options.validation === 'string') { + options.validation = options.validation.toLowerCase(); + crc32c = options.validation === 'crc32c'; + md5 = options.validation === 'md5'; + } + else if (options.validation === false) { + crc32c = false; + md5 = false; + } + if (options.offset) { + if (md5) { + throw new RangeError(FileExceptionMessages.MD5_RESUMED_UPLOAD); + } + if (crc32c && !options.isPartialUpload && !options.resumeCRC32C) { + throw new RangeError(FileExceptionMessages.MISSING_RESUME_CRC32C_FINAL_UPLOAD); + } + } + /** + * A callback for determining when the underlying pipeline is complete. + * It's possible the pipeline callback could error before the write stream + * calls `final` so by default this will destroy the write stream unless the + * write stream sets this callback via its `final` handler. + * @param error An optional error + */ + let pipelineCallback = error => { + writeStream.destroy(error || undefined); + }; + // A stream for consumer to write to + const writeStream = new stream_1.Writable({ + final(cb) { + // Set the pipeline callback to this callback so the pipeline's results + // can be populated to the consumer + pipelineCallback = cb; + emitStream.end(); + }, + write(chunk, encoding, cb) { + emitStream.write(chunk, encoding, cb); + }, + }); + // If the write stream, which is returned to the caller, catches an error we need to make sure that + // at least one of the streams in the pipeline below gets notified so that they + // all get cleaned up / destroyed. + writeStream.once('error', e => { + emitStream.destroy(e); + }); + // If the write stream is closed, cleanup the pipeline below by calling destroy on one of the streams. + writeStream.once('close', () => { + emitStream.destroy(); + }); + const transformStreams = []; + if (gzip) { + transformStreams.push(zlib.createGzip()); + } + const emitStream = new util_js_2.PassThroughShim(); + // If `writeStream` is destroyed before the `writing` event, `emitStream` will not have any listeners. This prevents an unhandled error. + const noop = () => { }; + emitStream.on('error', noop); + let hashCalculatingStream = null; + if (crc32c || md5) { + const crc32cInstance = options.resumeCRC32C + ? crc32c_js_1.CRC32C.from(options.resumeCRC32C) + : undefined; + hashCalculatingStream = new hash_stream_validator_js_1.HashStreamValidator({ + crc32c, + crc32cInstance, + md5, + crc32cGenerator: this.crc32cGenerator, + updateHashesOnly: true, + }); + transformStreams.push(hashCalculatingStream); + } + const fileWriteStream = (0, duplexify_1.default)(); + let fileWriteStreamMetadataReceived = false; + // Handing off emitted events to users + emitStream.on('reading', () => writeStream.emit('reading')); + emitStream.on('writing', () => writeStream.emit('writing')); + fileWriteStream.on('uri', evt => writeStream.emit('uri', evt)); + fileWriteStream.on('progress', evt => writeStream.emit('progress', evt)); + fileWriteStream.on('response', resp => writeStream.emit('response', resp)); + fileWriteStream.once('metadata', () => { + fileWriteStreamMetadataReceived = true; + }); + writeStream.once('writing', () => { + if (options.resumable === false) { + this.startSimpleUpload_(fileWriteStream, options); + } + else { + this.startResumableUpload_(fileWriteStream, options); + } + // remove temporary noop listener as we now create a pipeline that handles the errors + emitStream.removeListener('error', noop); + (0, stream_1.pipeline)(emitStream, ...transformStreams, fileWriteStream, async (e) => { + if (e) { + return pipelineCallback(e); + } + // If this is a partial upload, we don't expect final metadata yet. + if (options.isPartialUpload) { + // Emit CRC32c for this completed chunk if hash validation is active. + if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) { + writeStream.emit('crc32c', hashCalculatingStream.crc32c); + } + // Resolve the pipeline for this *partial chunk*. + return pipelineCallback(); + } + // We want to make sure we've received the metadata from the server in order + // to properly validate the object's integrity. Depending on the type of upload, + // the stream could close before the response is returned. + if (!fileWriteStreamMetadataReceived) { + try { + await new Promise((resolve, reject) => { + fileWriteStream.once('metadata', resolve); + fileWriteStream.once('error', reject); + }); + } + catch (e) { + return pipelineCallback(e); + } + } + // Emit the local CRC32C value for future validation, if validation is enabled. + if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) { + writeStream.emit('crc32c', hashCalculatingStream.crc32c); + } + try { + // Metadata may not be ready if the upload is a partial upload, + // nothing to validate yet. + const metadataNotReady = options.isPartialUpload && !this.metadata; + if (hashCalculatingStream && !metadataNotReady) { + await __classPrivateFieldGet(this, _File_instances, "m", _File_validateIntegrity).call(this, hashCalculatingStream, { + crc32c, + md5, + }); + } + pipelineCallback(); + } + catch (e) { + pipelineCallback(e); + } + }); + }); + return writeStream; + } + delete(optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.disableAutoRetryConditionallyIdempotent_(this.methods.delete, bucket_js_1.AvailableServiceObjectMethods.delete, options); + super + .delete(options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + }); + } + /** + * @typedef {array} DownloadResponse + * @property [0] The contents of a File. + */ + /** + * @callback DownloadCallback + * @param err Request error, if any. + * @param contents The contents of a File. + */ + /** + * Convenience method to download a file into memory or to a local + * destination. + * + * @param {object} [options] Configuration options. The arguments match those + * passed to {@link File#createReadStream}. + * @param {string} [options.destination] Local file path to write the file's + * contents to. + * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {boolean} [query.versions] If true, returns File objects scoped to - * their versions. - * @param {GetFilesCallback} [callback] Callback function. - * @returns {Promise} + * @param {DownloadCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.getFiles(function(err, files) { - * if (!err) { - * // files is an array of File objects. - * } - * }); + * const file = myBucket.file('my-file'); * * //- - * // If your bucket has versioning enabled, you can get all of your files - * // scoped to their generation. + * // Download a file into memory. The contents will be available as the + * second + * // argument in the demonstration below, `contents`. * //- - * bucket.getFiles({ - * versions: true - * }, function(err, files) { - * // Each file is scoped to its generation. - * }); + * file.download(function(err, contents) {}); * * //- - * // To control how many API requests are made and page through the results - * // manually, set `autoPaginate` to `false`. + * // Download a file to a local destination. * //- - * const callback = function(err, files, nextQuery, apiResponse) { - * if (nextQuery) { - * // More results exist. - * bucket.getFiles(nextQuery, callback); - * } - * - * // The `metadata` property is populated for you with the metadata at the - * // time of fetching. - * files[0].metadata; - * - * // However, in cases where you are concerned the metadata could have - * // changed, use the `getMetadata` method. - * files[0].getMetadata(function(err, metadata) {}); - * }; - * - * bucket.getFiles({ - * autoPaginate: false - * }, callback); + * file.download({ + * destination: '/Users/me/Desktop/file-backup.txt' + * }, function(err) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getFiles().then(function(data) { - * const files = data[0]; + * file.download().then(function(data) { + * const contents = data[0]; * }); * * ``` + * @example include:samples/files.js + * region_tag:storage_download_file + * Another example: + * + * @example include:samples/encryption.js + * region_tag:storage_download_encrypted_file + * Example of downloading an encrypted file: + * + * @example include:samples/requesterPays.js + * region_tag:storage_download_file_requester_pays + * Example of downloading a file where the requester pays: + */ + download(optionsOrCallback, cb) { + let options; + if (typeof optionsOrCallback === 'function') { + cb = optionsOrCallback; + options = {}; + } + else { + options = Object.assign({}, optionsOrCallback); + } + let called = false; + const callback = ((...args) => { + if (!called) + cb(...args); + called = true; + }); + const destination = options.destination; + delete options.destination; + if (options.encryptionKey) { + this.setEncryptionKey(options.encryptionKey); + delete options.encryptionKey; + } + const fileStream = this.createReadStream(options); + let receivedData = false; + if (destination) { + fileStream + .on('error', callback) + .once('data', data => { + receivedData = true; + // We know that the file exists the server - now we can truncate/write to a file + const writable = fs.createWriteStream(destination); + writable.write(data); + fileStream + .pipe(writable) + .on('error', (err) => { + callback(err, Buffer.from('')); + }) + .on('finish', () => { + callback(null, data); + }); + }) + .on('end', () => { + // In the case of an empty file no data will be received before the end event fires + if (!receivedData) { + const data = Buffer.alloc(0); + try { + fs.writeFileSync(destination, data); + callback(null, data); + } + catch (e) { + callback(e, data); + } + } + }); + } + else { + this.getBufferFromReadable(fileStream) + .then(contents => callback === null || callback === void 0 ? void 0 : callback(null, contents)) + .catch(callback); + } + } + /** + * The Storage API allows you to use a custom key for server-side encryption. + * + * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} + * + * @param {string|buffer} encryptionKey An AES-256 encryption key. + * @returns {File} + * * @example - *
Simulating a File System

With `autoPaginate: false`, it's possible to iterate over files which incorporate a common structure using a delimiter.

Consider the following remote objects:

  1. "a"
  2. "a/b/c/d"
  3. "b/d/e"

Using a delimiter of `/` will return a single file, "a".

`apiResponse.prefixes` will return the "sub-directories" that were found:

  1. "a/"
  2. "b/"
* ``` - * bucket.getFiles({ - * autoPaginate: false, - * delimiter: '/' - * }, function(err, files, nextQuery, apiResponse) { - * // files = [ - * // {File} // File object for file "a" - * // ] + * const crypto = require('crypto'); + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); * - * // apiResponse.prefixes = [ - * // 'a/', - * // 'b/' - * // ] + * const encryptionKey = crypto.randomBytes(32); + * + * const fileWithCustomEncryption = myBucket.file('my-file'); + * fileWithCustomEncryption.setEncryptionKey(encryptionKey); + * + * const fileWithoutCustomEncryption = myBucket.file('my-file'); + * + * fileWithCustomEncryption.save('data', function(err) { + * // Try to download with the File object that hasn't had + * // `setEncryptionKey()` called: + * fileWithoutCustomEncryption.download(function(err) { + * // We will receive an error: + * // err.message === 'Bad Request' + * + * // Try again with the File object we called `setEncryptionKey()` on: + * fileWithCustomEncryption.download(function(err, contents) { + * // contents.toString() === 'data' + * }); + * }); * }); + * * ``` + * @example include:samples/encryption.js + * region_tag:storage_upload_encrypted_file + * Example of uploading an encrypted file: + * + * @example include:samples/encryption.js + * region_tag:storage_download_encrypted_file + * Example of downloading an encrypted file: + */ + setEncryptionKey(encryptionKey) { + this.encryptionKey = encryptionKey; + this.encryptionKeyBase64 = Buffer.from(encryptionKey).toString('base64'); + this.encryptionKeyHash = crypto + .createHash('sha256') + // eslint-disable-next-line @typescript-eslint/no-explicit-any + .update(this.encryptionKeyBase64, 'base64') + .digest('base64'); + this.encryptionKeyInterceptor = { + request: reqOpts => { + reqOpts.headers = reqOpts.headers || {}; + reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; + reqOpts.headers['x-goog-encryption-key'] = this.encryptionKeyBase64; + reqOpts.headers['x-goog-encryption-key-sha256'] = + this.encryptionKeyHash; + return reqOpts; + }, + }; + this.interceptors.push(this.encryptionKeyInterceptor); + return this; + } + /** + * Gets a reference to a Cloud Storage {@link File} file from the provided URL in string format. + * @param {string} publicUrlOrGsUrl the URL as a string. Must be of the format gs://bucket/file + * or https://storage.googleapis.com/bucket/file. + * @param {Storage} storageInstance an instance of a Storage object. + * @param {FileOptions} [options] Configuration options + * @returns {File} + */ + static from(publicUrlOrGsUrl, storageInstance, options) { + const gsMatches = [...publicUrlOrGsUrl.matchAll(GS_UTIL_URL_REGEX)]; + const httpsMatches = [...publicUrlOrGsUrl.matchAll(HTTPS_PUBLIC_URL_REGEX)]; + if (gsMatches.length > 0) { + const bucket = new bucket_js_1.Bucket(storageInstance, gsMatches[0][2]); + return new File(bucket, gsMatches[0][3], options); + } + else if (httpsMatches.length > 0) { + const bucket = new bucket_js_1.Bucket(storageInstance, httpsMatches[0][3]); + return new File(bucket, httpsMatches[0][4], options); + } + else { + throw new Error('URL string must be of format gs://bucket/file or https://storage.googleapis.com/bucket/file'); + } + } + get(optionsOrCallback, cb) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + super + .get(options) + .then(resp => cb(null, ...resp)) + .catch(cb); + } + /** + * @typedef {array} GetExpirationDateResponse + * @property {date} 0 A Date object representing the earliest time this file's + * retention policy will expire. + */ + /** + * @callback GetExpirationDateCallback + * @param {?Error} err Request error, if any. + * @param {date} expirationDate A Date object representing the earliest time + * this file's retention policy will expire. + */ + /** + * If this bucket has a retention policy defined, use this method to get a + * Date object representing the earliest time this file will expire. + * + * @param {GetExpirationDateCallback} [callback] Callback function. + * @returns {Promise} * * @example - * Using prefixes, it's now possible to simulate a file system with follow-up requests. * ``` - * bucket.getFiles({ - * autoPaginate: false, - * delimiter: '/', - * prefix: 'a/' - * }, function(err, files, nextQuery, apiResponse) { - * // No files found within "directory" a. - * // files = [] + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); * - * // However, a "sub-directory" was found. - * // This prefix can be used to continue traversing the "file system". - * // apiResponse.prefixes = [ - * // 'a/b/' - * // ] + * const file = myBucket.file('my-file'); + * + * file.getExpirationDate(function(err, expirationDate) { + * // expirationDate is a Date object. * }); * ``` - * - * @example include:samples/files.js - * region_tag:storage_list_files - * Another example: - * - * @example include:samples/files.js - * region_tag:storage_list_files_with_prefix - * Example of listing files, filtered by a prefix: */ - getFiles(queryOrCallback, callback) { - let query = typeof queryOrCallback === 'object' ? queryOrCallback : {}; - if (!callback) { - callback = queryOrCallback; - } - query = Object.assign({}, query); - this.request({ - uri: '/o', - qs: query, - }, (err, resp) => { + getExpirationDate(callback) { + this.getMetadata((err, metadata, apiResponse) => { if (err) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback(err, null, null, resp); + callback(err, null, apiResponse); return; } - const itemsArray = resp.items ? resp.items : []; - const files = itemsArray.map((file) => { - const options = {}; - if (query.versions) { - options.generation = file.generation; - } - if (file.kmsKeyName) { - options.kmsKeyName = file.kmsKeyName; - } - const fileInstance = this.file(file.name, options); - fileInstance.metadata = file; - return fileInstance; - }); - let nextQuery = null; - if (resp.nextPageToken) { - nextQuery = Object.assign({}, query, { - pageToken: resp.nextPageToken, - }); + if (!metadata.retentionExpirationTime) { + const error = new Error(FileExceptionMessages.EXPIRATION_TIME_NA); + callback(error, null, apiResponse); + return; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback(null, files, nextQuery, resp); + callback(null, new Date(metadata.retentionExpirationTime), apiResponse); }); } /** - * @deprecated - * @typedef {object} GetLabelsOptions Configuration options for Bucket#getLabels(). - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @deprecated - * @typedef {array} GetLabelsResponse - * @property {object} 0 Object of labels currently set on this bucket. + * @typedef {array} GenerateSignedPostPolicyV2Response + * @property {object} 0 The document policy. */ /** - * @deprecated - * @callback GetLabelsCallback + * @callback GenerateSignedPostPolicyV2Callback * @param {?Error} err Request error, if any. - * @param {object} labels Object of labels currently set on this bucket. + * @param {object} policy The document policy. */ /** - * @deprecated Use getMetadata directly. - * Get the labels currently set on this bucket. + * Get a signed policy document to allow a user to upload data with a POST + * request. * - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetLabelsCallback} [callback] Callback function. - * @returns {Promise} + * In Google Cloud Platform environments, such as Cloud Functions and App + * Engine, you usually don't provide a `keyFilename` or `credentials` during + * instantiation. In those environments, we call the + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} + * to create a signed policy. That API requires either the + * `https://www.googleapis.com/auth/iam` or + * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are + * enabled. + * + * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-v2| POST Object with the V2 signing process} + * + * @throws {Error} If an expiration timestamp from the past is given. + * @throws {Error} If options.equals has an array with less or more than two + * members. + * @throws {Error} If options.startsWith has an array with less or more than two + * members. + * + * @param {object} options Configuration options. + * @param {array|array[]} [options.equals] Array of request parameters and + * their expected value (e.g. [['$', '']]). Values are + * translated into equality constraints in the conditions field of the + * policy document (e.g. ['eq', '$', '']). If only one + * equality condition is to be specified, options.equals can be a one- + * dimensional array (e.g. ['$', '']). + * @param {*} options.expires - A timestamp when this policy will expire. Any + * value given is passed to `new Date()`. + * @param {array|array[]} [options.startsWith] Array of request parameters and + * their expected prefixes (e.g. [['$', '']). Values are + * translated into starts-with constraints in the conditions field of the + * policy document (e.g. ['starts-with', '$', '']). If only + * one prefix condition is to be specified, options.startsWith can be a + * one- dimensional array (e.g. ['$', '']). + * @param {string} [options.acl] ACL for the object from possibly predefined + * ACLs. + * @param {string} [options.successRedirect] The URL to which the user client + * is redirected if the upload is successful. + * @param {string} [options.successStatus] - The status of the Google Storage + * response if the upload is successful (must be string). + * @param {object} [options.contentLengthRange] + * @param {number} [options.contentLengthRange.min] Minimum value for the + * request's content length. + * @param {number} [options.contentLengthRange.max] Maximum value for the + * request's content length. + * @param {GenerateSignedPostPolicyV2Callback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.getLabels(function(err, labels) { - * if (err) { - * // Error handling omitted. + * const file = myBucket.file('my-file'); + * const options = { + * equals: ['$Content-Type', 'image/jpeg'], + * expires: '10-25-2022', + * contentLengthRange: { + * min: 0, + * max: 1024 * } + * }; * - * // labels = { - * // label: 'labelValue', - * // ... - * // } + * file.generateSignedPostPolicyV2(options, function(err, policy) { + * // policy.string: the policy document in plain text. + * // policy.base64: the policy document in base64. + * // policy.signature: the policy signature in base64. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getLabels().then(function(data) { - * const labels = data[0]; + * file.generateSignedPostPolicyV2(options).then(function(data) { + * const policy = data[0]; * }); * ``` */ - getLabels(optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + generateSignedPostPolicyV2(optionsOrCallback, cb) { + const args = (0, util_js_2.normalize)(optionsOrCallback, cb); + let options = args.options; + const callback = args.callback; + const expires = new Date(options.expires); + if (isNaN(expires.getTime())) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); } - else if (optionsOrCallback) { - options = optionsOrCallback; + if (expires.valueOf() < Date.now()) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); } - this.getMetadata(options, (err, metadata) => { - if (err) { - callback(err, null); - return; + options = Object.assign({}, options); + const conditions = [ + ['eq', '$key', this.name], + { + bucket: this.bucket.name, + }, + ]; + if (Array.isArray(options.equals)) { + if (!Array.isArray(options.equals[0])) { + options.equals = [options.equals]; } - callback(null, (metadata === null || metadata === void 0 ? void 0 : metadata.labels) || {}); + options.equals.forEach(condition => { + if (!Array.isArray(condition) || condition.length !== 2) { + throw new Error(FileExceptionMessages.EQUALS_CONDITION_TWO_ELEMENTS); + } + conditions.push(['eq', condition[0], condition[1]]); + }); + } + if (Array.isArray(options.startsWith)) { + if (!Array.isArray(options.startsWith[0])) { + options.startsWith = [options.startsWith]; + } + options.startsWith.forEach(condition => { + if (!Array.isArray(condition) || condition.length !== 2) { + throw new Error(FileExceptionMessages.STARTS_WITH_TWO_ELEMENTS); + } + conditions.push(['starts-with', condition[0], condition[1]]); + }); + } + if (options.acl) { + conditions.push({ + acl: options.acl, + }); + } + if (options.successRedirect) { + conditions.push({ + success_action_redirect: options.successRedirect, + }); + } + if (options.successStatus) { + conditions.push({ + success_action_status: options.successStatus, + }); + } + if (options.contentLengthRange) { + const min = options.contentLengthRange.min; + const max = options.contentLengthRange.max; + if (typeof min !== 'number' || typeof max !== 'number') { + throw new Error(FileExceptionMessages.CONTENT_LENGTH_RANGE_MIN_MAX); + } + conditions.push(['content-length-range', min, max]); + } + const policy = { + expiration: expires.toISOString(), + conditions, + }; + const policyString = JSON.stringify(policy); + const policyBase64 = Buffer.from(policyString).toString('base64'); + this.storage.authClient.sign(policyBase64, options.signingEndpoint).then(signature => { + callback(null, { + string: policyString, + base64: policyBase64, + signature, + }); + }, err => { + callback(new signer_js_1.SigningError(err.message)); }); } /** - * @typedef {object} GetNotificationsOptions Configuration options for Bucket#getNotification(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * @typedef {object} SignedPostPolicyV4Output + * @property {string} url The request URL. + * @property {object} fields The form fields to include in the POST request. */ /** - * @callback GetNotificationsCallback - * @param {?Error} err Request error, if any. - * @param {Notification[]} notifications Array of {@link Notification} - * instances. - * @param {object} apiResponse The full API response. + * @typedef {array} GenerateSignedPostPolicyV4Response + * @property {SignedPostPolicyV4Output} 0 An object containing the request URL and form fields. */ /** - * @typedef {array} GetNotificationsResponse - * @property {Notification[]} 0 Array of {@link Notification} instances. - * @property {object} 1 The full API response. + * @callback GenerateSignedPostPolicyV4Callback + * @param {?Error} err Request error, if any. + * @param {SignedPostPolicyV4Output} output An object containing the request URL and form fields. */ /** - * Retrieves a list of notification subscriptions for a given bucket. + * Get a v4 signed policy document to allow a user to upload data with a POST + * request. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/list| Notifications: list} + * In Google Cloud Platform environments, such as Cloud Functions and App + * Engine, you usually don't provide a `keyFilename` or `credentials` during + * instantiation. In those environments, we call the + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} + * to create a signed policy. That API requires either the + * `https://www.googleapis.com/auth/iam` or + * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are + * enabled. * - * @param {GetNotificationsOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetNotificationsCallback} [callback] Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument| Policy Document Reference} + * + * @param {object} options Configuration options. + * @param {Date|number|string} options.expires - A timestamp when this policy will expire. Any + * value given is passed to `new Date()`. + * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style + * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style + * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. + * Currently defaults to `false` for path-style, although this may change in a + * future major-version release. + * @param {string} [config.bucketBoundHostname] The bucket-bound hostname to return in + * the result, e.g. "https://cdn.example.com". + * @param {object} [config.fields] [Form fields]{@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument} + * to include in the signed policy. Any fields with key beginning with 'x-ignore-' + * will not be included in the policy to be signed. + * @param {object[]} [config.conditions] [Conditions]{@link https://cloud.google.com/storage/docs/authentication/signatures#policy-document} + * to include in the signed policy. All fields given in `config.fields` are + * automatically included in the conditions array, adding the same entry + * in both `fields` and `conditions` will result in duplicate entries. + * + * @param {GenerateSignedPostPolicyV4Callback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.getNotifications(function(err, notifications, apiResponse) { - * if (!err) { - * // notifications is an array of Notification objects. + * const file = myBucket.file('my-file'); + * const options = { + * expires: '10-25-2022', + * conditions: [ + * ['eq', '$Content-Type', 'image/jpeg'], + * ['content-length-range', 0, 1024], + * ], + * fields: { + * acl: 'public-read', + * 'x-goog-meta-foo': 'bar', + * 'x-ignore-mykey': 'data' * } + * }; + * + * file.generateSignedPostPolicyV4(options, function(err, response) { + * // response.url The request URL + * // response.fields The form fields (including the signature) to include + * // to be used to upload objects by HTML forms. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getNotifications().then(function(data) { - * const notifications = data[0]; - * const apiResponse = data[1]; + * file.generateSignedPostPolicyV4(options).then(function(data) { + * const response = data[0]; + * // response.url The request URL + * // response.fields The form fields (including the signature) to include + * // to be used to upload objects by HTML forms. * }); - * * ``` - * @example include:samples/listNotifications.js - * region_tag:storage_list_bucket_notifications - * Another example: */ - getNotifications(optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + generateSignedPostPolicyV4(optionsOrCallback, cb) { + const args = (0, util_js_2.normalize)(optionsOrCallback, cb); + let options = args.options; + const callback = args.callback; + const expires = new Date(options.expires); + if (isNaN(expires.getTime())) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); } - else if (optionsOrCallback) { - options = optionsOrCallback; + if (expires.valueOf() < Date.now()) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); } - this.request({ - uri: '/notificationConfigs', - qs: options, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - const itemsArray = resp.items ? resp.items : []; - const notifications = itemsArray.map((notification) => { - const notificationInstance = this.notification(notification.id); - notificationInstance.metadata = notification; - return notificationInstance; + if (expires.valueOf() - Date.now() > SEVEN_DAYS * 1000) { + throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); + } + options = Object.assign({}, options); + let fields = Object.assign({}, options.fields); + const now = new Date(); + const nowISO = (0, util_js_2.formatAsUTCISO)(now, true); + const todayISO = (0, util_js_2.formatAsUTCISO)(now); + const sign = async () => { + const { client_email } = await this.storage.authClient.getCredentials(); + const credential = `${client_email}/${todayISO}/auto/storage/goog4_request`; + fields = { + ...fields, + bucket: this.bucket.name, + key: this.name, + 'x-goog-date': nowISO, + 'x-goog-credential': credential, + 'x-goog-algorithm': 'GOOG4-RSA-SHA256', + }; + const conditions = options.conditions || []; + Object.entries(fields).forEach(([key, value]) => { + if (!key.startsWith('x-ignore-')) { + conditions.push({ [key]: value }); + } }); - callback(null, notifications, resp); - }); + delete fields.bucket; + const expiration = (0, util_js_2.formatAsUTCISO)(expires, true, '-', ':'); + const policy = { + conditions, + expiration, + }; + const policyString = (0, util_js_2.unicodeJSONStringify)(policy); + const policyBase64 = Buffer.from(policyString).toString('base64'); + try { + const signature = await this.storage.authClient.sign(policyBase64, options.signingEndpoint); + const signatureHex = Buffer.from(signature, 'base64').toString('hex'); + const universe = this.parent.storage.universeDomain; + fields['policy'] = policyBase64; + fields['x-goog-signature'] = signatureHex; + let url; + if (this.storage.customEndpoint) { + url = this.storage.apiEndpoint; + } + else if (options.virtualHostedStyle) { + url = `https://${this.bucket.name}.storage.${universe}/`; + } + else if (options.bucketBoundHostname) { + url = `${options.bucketBoundHostname}/`; + } + else { + url = `https://storage.${universe}/${this.bucket.name}/`; + } + return { + url, + fields, + }; + } + catch (err) { + throw new signer_js_1.SigningError(err.message); + } + }; + sign().then(res => callback(null, res), callback); } /** * @typedef {array} GetSignedUrlResponse @@ -117424,39 +122206,7 @@ class Bucket extends index_js_1.ServiceObject { * @param {object} url The signed URL. */ /** - * @typedef {object} GetBucketSignedUrlConfig - * @property {string} action Only listing objects within a bucket (HTTP: GET) is supported for bucket-level signed URLs. - * @property {*} expires A timestamp when this link will expire. Any value - * given is passed to `new Date()`. - * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. - * @property {string} [version='v2'] The signing version to use, either - * 'v2' or 'v4'. - * @property {boolean} [virtualHostedStyle=false] Use virtual hosted-style - * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style - * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instaed of path-style URL. - * Currently defaults to `false` for path-style, although this may change in a - * future major-version release. - * @property {string} [cname] The cname for this bucket, i.e., - * "https://cdn.example.com". - * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} - * @property {object} [extensionHeaders] If these headers are used, the - * server will check to make sure that the client provides matching - * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} - * for the requirements of this feature, most notably: - * - The header name must be prefixed with `x-goog-` - * - The header name must be all lowercase - * - * Note: Multi-valued header passed as an array in the extensionHeaders - * object is converted into a string, delimited by `,` with - * no space. Requests made using the signed URL will need to - * delimit multi-valued headers using a single `,` as well, or - * else the server will report a mismatched signature. - * @property {object} [queryParams] Additional query parameters to include - * in the signed URL. - */ - /** - * Get a signed URL to allow limited time access to a bucket. + * Get a signed URL to allow limited time access to the file. * * In Google Cloud Platform environments, such as Cloud Functions and App * Engine, you usually don't provide a `keyFilename` or `credentials` during @@ -117471,22 +122221,33 @@ class Bucket extends index_js_1.ServiceObject { * * @throws {Error} if an expiration timestamp from the past is given. * - * @param {GetBucketSignedUrlConfig} config Configuration object. - * @param {string} config.action Currently only supports "list" (HTTP: GET). + * @param {object} config Configuration object. + * @param {string} config.action "read" (HTTP: GET), "write" (HTTP: PUT), or + * "delete" (HTTP: DELETE), "resumable" (HTTP: POST). + * When using "resumable", the header `X-Goog-Resumable: start` has + * to be sent when making a request with the signed URL. * @param {*} config.expires A timestamp when this link will expire. Any value * given is passed to `new Date()`. * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. + * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} * @param {string} [config.version='v2'] The signing version to use, either * 'v2' or 'v4'. * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style - * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style - * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instaed of path-style URL. + * URLs (e.g. 'https://mybucket.storage.googleapis.com/...') instead of path-style + * (e.g. 'https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. * Currently defaults to `false` for path-style, although this may change in a * future major-version release. * @param {string} [config.cname] The cname for this bucket, i.e., * "https://cdn.example.com". - * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} + * @param {string} [config.contentMd5] The MD5 digest value in base64. Just like + * if you provide this, the client must provide this HTTP header with this same + * value in its request, so to if this parameter is not provided here, + * the client must not provide any value for this HTTP header in its request. + * @param {string} [config.contentType] Just like if you provide this, the client + * must provide this HTTP header with this same value in its request, so to if + * this parameter is not provided here, the client must not provide any value + * for this HTTP header in its request. * @param {object} [config.extensionHeaders] If these headers are used, the * server will check to make sure that the client provides matching * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} @@ -117499,8 +122260,19 @@ class Bucket extends index_js_1.ServiceObject { * no space. Requests made using the signed URL will need to * delimit multi-valued headers using a single `,` as well, or * else the server will report a mismatched signature. - * @property {object} [config.queryParams] Additional query parameters to include + * @param {object} [config.queryParams] Additional query parameters to include * in the signed URL. + * @param {string} [config.promptSaveAs] The filename to prompt the user to + * save the file as when the signed url is accessed. This is ignored if + * `config.responseDisposition` is set. + * @param {string} [config.responseDisposition] The + * {@link http://goo.gl/yMWxQV| response-content-disposition parameter} of the + * signed url. + * @param {*} [config.accessibleAt=Date.now()] A timestamp when this link became usable. Any value + * given is passed to `new Date()`. + * Note: Use for 'v4' only. + * @param {string} [config.responseType] The response-content-type parameter + * of the signed url. * @param {GetSignedUrlCallback} [callback] Callback function. * @returns {Promise} * @@ -117510,1284 +122282,1318 @@ class Bucket extends index_js_1.ServiceObject { * const storage = new Storage(); * const myBucket = storage.bucket('my-bucket'); * + * const file = myBucket.file('my-file'); + * * //- - * // Generate a URL that allows temporary access to list files in a bucket. + * // Generate a URL that allows temporary access to download your file. * //- * const request = require('request'); * * const config = { - * action: 'list', - * expires: '03-17-2025' + * action: 'read', + * expires: '03-17-2025', * }; * - * bucket.getSignedUrl(config, function(err, url) { + * file.getSignedUrl(config, function(err, url) { * if (err) { * console.error(err); * return; * } * - * // The bucket is now available to be listed from this URL. + * // The file is now available to read from this URL. + * request(url, function(err, resp) { + * // resp.statusCode = 200 + * }); + * }); + * + * //- + * // Generate a URL that allows temporary access to download your file. + * // Access will begin at accessibleAt and end at expires. + * //- + * const request = require('request'); + * + * const config = { + * action: 'read', + * expires: '03-17-2025', + * accessibleAt: '03-13-2025' + * }; + * + * file.getSignedUrl(config, function(err, url) { + * if (err) { + * console.error(err); + * return; + * } + * + * // The file will be available to read from this URL from 03-13-2025 to 03-17-2025. * request(url, function(err, resp) { * // resp.statusCode = 200 * }); * }); * * //- + * // Generate a URL to allow write permissions. This means anyone with this + * URL + * // can send a POST request with new data that will overwrite the file. + * //- + * file.getSignedUrl({ + * action: 'write', + * expires: '03-17-2025' + * }, function(err, url) { + * if (err) { + * console.error(err); + * return; + * } + * + * // The file is now available to be written to. + * const writeStream = request.put(url); + * writeStream.end('New data'); + * + * writeStream.on('complete', function(resp) { + * // Confirm the new content was saved. + * file.download(function(err, fileContents) { + * console.log('Contents:', fileContents.toString()); + * // Contents: New data + * }); + * }); + * }); + * + * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getSignedUrl(config).then(function(data) { + * file.getSignedUrl(config).then(function(data) { * const url = data[0]; * }); + * * ``` + * @example include:samples/files.js + * region_tag:storage_generate_signed_url + * Another example: */ getSignedUrl(cfg, callback) { - const method = BucketActionToHTTPMethod[cfg.action]; + const method = ActionToHTTPMethod[cfg.action]; + const extensionHeaders = (0, util_js_2.objectKeyToLowercase)(cfg.extensionHeaders || {}); + if (cfg.action === 'resumable') { + extensionHeaders['x-goog-resumable'] = 'start'; + } + const queryParams = Object.assign({}, cfg.queryParams); + if (typeof cfg.responseType === 'string') { + queryParams['response-content-type'] = cfg.responseType; + } + if (typeof cfg.promptSaveAs === 'string') { + queryParams['response-content-disposition'] = + 'attachment; filename="' + cfg.promptSaveAs + '"'; + } + if (typeof cfg.responseDisposition === 'string') { + queryParams['response-content-disposition'] = cfg.responseDisposition; + } + if (this.generation) { + queryParams['generation'] = this.generation.toString(); + } const signConfig = { method, expires: cfg.expires, - version: cfg.version, - cname: cfg.cname, - extensionHeaders: cfg.extensionHeaders || {}, - queryParams: cfg.queryParams || {}, + accessibleAt: cfg.accessibleAt, + extensionHeaders, + queryParams, + contentMd5: cfg.contentMd5, + contentType: cfg.contentType, host: cfg.host, - signingEndpoint: cfg.signingEndpoint, }; + if (cfg.cname) { + signConfig.cname = cfg.cname; + } + if (cfg.version) { + signConfig.version = cfg.version; + } + if (cfg.virtualHostedStyle) { + signConfig.virtualHostedStyle = cfg.virtualHostedStyle; + } if (!this.signer) { - this.signer = new signer_js_1.URLSigner(this.storage.authClient, this, undefined, this.storage); + this.signer = new signer_js_1.URLSigner(this.storage.authClient, this.bucket, this, this.storage); } this.signer .getSignedUrl(signConfig) .then(signedUrl => callback(null, signedUrl), callback); } /** - * @callback BucketLockCallback + * @callback IsPublicCallback * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. + * @param {boolean} resp Whether file is public or not. */ /** - * Lock a previously-defined retention policy. This will prevent changes to - * the policy. - * - * @throws {Error} if a metageneration is not provided. + * @typedef {array} IsPublicResponse + * @property {boolean} 0 Whether file is public or not. + */ + /** + * Check whether this file is public or not by sending + * a HEAD request without credentials. + * No errors from the server indicates that the current + * file is public. + * A 403-Forbidden error {@link https://cloud.google.com/storage/docs/json_api/v1/status-codes#403_Forbidden} + * indicates that file is private. + * Any other non 403 error is propagated to user. * - * @param {number|string} metageneration The bucket's metageneration. This is - * accesssible from calling {@link File#getMetadata}. - * @param {BucketLockCallback} [callback] Callback function. - * @returns {Promise} + * @param {IsPublicCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` - * const storage = require('@google-cloud/storage')(); - * const bucket = storage.bucket('albums'); - * - * const metageneration = 2; + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.lock(metageneration, function(err, apiResponse) {}); + * const file = myBucket.file('my-file'); * * //- + * // Check whether the file is publicly accessible. + * //- + * file.isPublic(function(err, resp) { + * if (err) { + * console.error(err); + * return; + * } + * console.log(`the file ${file.id} is public: ${resp}`) ; + * }) + * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.lock(metageneration).then(function(data) { - * const apiResponse = data[0]; + * file.isPublic().then(function(data) { + * const resp = data[0]; * }); * ``` */ - lock(metageneration, callback) { - const metatype = typeof metageneration; - if (metatype !== 'number' && metatype !== 'string') { - throw new Error(BucketExceptionMessages.METAGENERATION_NOT_PROVIDED); - } - this.request({ - method: 'POST', - uri: '/lockRetentionPolicy', - qs: { - ifMetagenerationMatch: metageneration, - }, - }, callback); + isPublic(callback) { + var _a; + // Build any custom headers based on the defined interceptors on the parent + // storage object and this object + const storageInterceptors = ((_a = this.storage) === null || _a === void 0 ? void 0 : _a.interceptors) || []; + const fileInterceptors = this.interceptors || []; + const allInterceptors = storageInterceptors.concat(fileInterceptors); + const headers = allInterceptors.reduce((acc, curInterceptor) => { + const currentHeaders = curInterceptor.request({ + uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, + }); + Object.assign(acc, currentHeaders.headers); + return acc; + }, {}); + index_js_1.util.makeRequest({ + method: 'GET', + uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, + headers, + }, { + retryOptions: this.storage.retryOptions, + }, (err) => { + if (err) { + const apiError = err; + if (apiError.code === 403) { + callback(null, false); + } + else { + callback(err); + } + } + else { + callback(null, true); + } + }); } /** - * @typedef {array} MakeBucketPrivateResponse - * @property {File[]} 0 List of files made private. + * @typedef {object} MakeFilePrivateOptions Configuration options for File#makePrivate(). + * @property {Metadata} [metadata] Define custom metadata properties to define + * along with the operation. + * @property {boolean} [strict] If true, set the file to be private to + * only the owner user. Otherwise, it will be private to the project. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. */ /** - * @callback MakeBucketPrivateCallback + * @callback MakeFilePrivateCallback * @param {?Error} err Request error, if any. - * @param {File[]} files List of files made private. + * @param {object} apiResponse The full API response. */ /** - * @typedef {object} MakeBucketPrivateOptions - * @property {boolean} [includeFiles=false] Make each file in the bucket - * private. - * @property {Metadata} [metadata] Define custom metadata properties to define - * along with the operation. - * @property {boolean} [force] Queue errors occurred while making files - * private until all files have been processed. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * @typedef {array} MakeFilePrivateResponse + * @property {object} 0 The full API response. */ /** - * Make the bucket listing private. - * - * You may also choose to make the contents of the bucket private by - * specifying `includeFiles: true`. This will automatically run - * {@link File#makePrivate} for every file in the bucket. - * - * When specifying `includeFiles: true`, use `force: true` to delay execution - * of your callback until all files have been processed. By default, the - * callback is executed after the first error. Use `force` to queue such - * errors until all files have been processed, after which they will be - * returned as an array as the first argument to your callback. - * - * NOTE: This may cause the process to be long-running and use a high number - * of requests. Use with caution. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * Make a file private to the project and remove all other permissions. + * Set `options.strict` to true to make the file private to only the owner. * - * @param {MakeBucketPrivateOptions} [options] Configuration options. - * @param {boolean} [options.includeFiles=false] Make each file in the bucket - * private. - * @param {Metadata} [options.metadata] Define custom metadata properties to define - * along with the operation. - * @param {boolean} [options.force] Queue errors occurred while making files - * private until all files have been processed. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {MakeBucketPrivateCallback} [callback] Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} + * + * @param {MakeFilePrivateOptions} [options] Configuration options. + * @param {MakeFilePrivateCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * //- - * // Make the bucket private. - * //- - * bucket.makePrivate(function(err) {}); + * const file = myBucket.file('my-file'); * * //- - * // Make the bucket and its contents private. + * // Set the file private so only project maintainers can see and modify it. * //- - * const opts = { - * includeFiles: true - * }; - * - * bucket.makePrivate(opts, function(err, files) { - * // `err`: - * // The first error to occur, otherwise null. - * // - * // `files`: - * // Array of files successfully made private in the bucket. - * }); + * file.makePrivate(function(err) {}); * * //- - * // Make the bucket and its contents private, using force to suppress errors - * // until all files have been processed. + * // Set the file private so only the owner can see and modify it. * //- - * const opts = { - * includeFiles: true, - * force: true - * }; - * - * bucket.makePrivate(opts, function(errors, files) { - * // `errors`: - * // Array of errors if any occurred, otherwise null. - * // - * // `files`: - * // Array of files successfully made private in the bucket. - * }); + * file.makePrivate({ strict: true }, function(err) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.makePrivate(opts).then(function(data) { - * const files = data[0]; + * file.makePrivate().then(function(data) { + * const apiResponse = data[0]; * }); * ``` */ makePrivate(optionsOrCallback, callback) { - var _a, _b, _c, _d; + var _a, _b; const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - options.private = true; const query = { - predefinedAcl: 'projectPrivate', + predefinedAcl: options.strict ? 'private' : 'projectPrivate', + // eslint-disable-next-line @typescript-eslint/no-explicit-any }; - if (options.userProject) { - query.userProject = options.userProject; - } - if ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { - query.ifGenerationMatch = options.preconditionOpts.ifGenerationMatch; - } - if ((_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { - query.ifGenerationNotMatch = - options.preconditionOpts.ifGenerationNotMatch; - } - if ((_c = options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { + if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifMetagenerationMatch) !== undefined) { query.ifMetagenerationMatch = - options.preconditionOpts.ifMetagenerationMatch; + (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch; + delete options.preconditionOpts; } - if ((_d = options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { - query.ifMetagenerationNotMatch = - options.preconditionOpts.ifMetagenerationNotMatch; + if (options.userProject) { + query.userProject = options.userProject; } - // You aren't allowed to set both predefinedAcl & acl properties on a bucket - // so acl must explicitly be nullified. + // You aren't allowed to set both predefinedAcl & acl properties on a file, + // so acl must explicitly be nullified, destroying all previous acls on the + // file. const metadata = { ...options.metadata, acl: null }; - this.setMetadata(metadata, query, (err) => { - if (err) { - callback(err); - } - const internalCall = () => { - if (options.includeFiles) { - return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, options); - } - return Promise.resolve([]); - }; - internalCall() - .then(files => callback(null, files)) - .catch(callback); - }); + this.setMetadata(metadata, query, callback); } /** - * @typedef {object} MakeBucketPublicOptions - * @property {boolean} [includeFiles=false] Make each file in the bucket - * private. - * @property {boolean} [force] Queue errors occurred while making files - * private until all files have been processed. + * @typedef {array} MakeFilePublicResponse + * @property {object} 0 The full API response. */ /** - * @callback MakeBucketPublicCallback + * @callback MakeFilePublicCallback * @param {?Error} err Request error, if any. - * @param {File[]} files List of files made public. - */ - /** - * @typedef {array} MakeBucketPublicResponse - * @property {File[]} 0 List of files made public. + * @param {object} apiResponse The full API response. */ /** - * Make the bucket publicly readable. - * - * You may also choose to make the contents of the bucket publicly readable by - * specifying `includeFiles: true`. This will automatically run - * {@link File#makePublic} for every file in the bucket. - * - * When specifying `includeFiles: true`, use `force: true` to delay execution - * of your callback until all files have been processed. By default, the - * callback is executed after the first error. Use `force` to queue such - * errors until all files have been processed, after which they will be - * returned as an array as the first argument to your callback. - * - * NOTE: This may cause the process to be long-running and use a high number - * of requests. Use with caution. + * Set a file to be publicly readable and maintain all previous permissions. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} * - * @param {MakeBucketPublicOptions} [options] Configuration options. - * @param {boolean} [options.includeFiles=false] Make each file in the bucket - * private. - * @param {boolean} [options.force] Queue errors occurred while making files - * private until all files have been processed. - * @param {MakeBucketPublicCallback} [callback] Callback function. - * @returns {Promise} + * @param {MakeFilePublicCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Make the bucket publicly readable. - * //- - * bucket.makePublic(function(err) {}); - * - * //- - * // Make the bucket and its contents publicly readable. - * //- - * const opts = { - * includeFiles: true - * }; - * - * bucket.makePublic(opts, function(err, files) { - * // `err`: - * // The first error to occur, otherwise null. - * // - * // `files`: - * // Array of files successfully made public in the bucket. - * }); + * const myBucket = storage.bucket('my-bucket'); * - * //- - * // Make the bucket and its contents publicly readable, using force to - * // suppress errors until all files have been processed. - * //- - * const opts = { - * includeFiles: true, - * force: true - * }; + * const file = myBucket.file('my-file'); * - * bucket.makePublic(opts, function(errors, files) { - * // `errors`: - * // Array of errors if any occurred, otherwise null. - * // - * // `files`: - * // Array of files successfully made public in the bucket. - * }); + * file.makePublic(function(err, apiResponse) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.makePublic(opts).then(function(data) { - * const files = data[0]; + * file.makePublic().then(function(data) { + * const apiResponse = data[0]; * }); + * * ``` + * @example include:samples/files.js + * region_tag:storage_make_public + * Another example: */ - makePublic(optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const req = { public: true, ...options }; - this.acl - .add({ + makePublic(callback) { + callback = callback || index_js_1.util.noop; + this.acl.add({ entity: 'allUsers', role: 'READER', - }) - .then(() => { - return this.acl.default.add({ - entity: 'allUsers', - role: 'READER', - }); - }) - .then(() => { - if (req.includeFiles) { - return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, req); - } - return []; - }) - .then(files => callback(null, files), callback); + }, (err, acl, resp) => { + callback(err, resp); + }); } /** - * Get a reference to a Cloud Pub/Sub Notification. + * The public URL of this File + * Use {@link File#makePublic} to enable anonymous access via the returned URL. * - * @param {string} id ID of notification. - * @returns {Notification} - * @see Notification + * @returns {string} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const notification = bucket.notification('1'); - * ``` - */ - notification(id) { - if (!id) { - throw new Error(BucketExceptionMessages.SUPPLY_NOTIFICATION_ID); - } - return new notification_js_1.Notification(this, id); - } - /** - * Remove an already-existing retention policy from this bucket, if it is not - * locked. - * - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @param {SetBucketMetadataOptions} [options] Options, including precondition options - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); * const bucket = storage.bucket('albums'); + * const file = bucket.file('my-file'); * - * bucket.removeRetentionPeriod(function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.removeRetentionPeriod().then(function(data) { - * const apiResponse = data[0]; - * }); + * // publicUrl will be "https://storage.googleapis.com/albums/my-file" + * const publicUrl = file.publicUrl(); * ``` */ - removeRetentionPeriod(optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - this.setMetadata({ - retentionPolicy: null, - }, options, callback); - } - /** - * Makes request and applies userProject query parameter if necessary. - * - * @private - * - * @param {object} reqOpts - The request options. - * @param {function} callback - The callback function. - */ - request(reqOpts, callback) { - if (this.userProject && (!reqOpts.qs || !reqOpts.qs.userProject)) { - reqOpts.qs = { ...reqOpts.qs, userProject: this.userProject }; - } - return super.request(reqOpts, callback); + publicUrl() { + return `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`; } /** - * @deprecated - * @typedef {array} SetLabelsResponse - * @property {object} 0 The bucket metadata. + * @typedef {array} MoveFileAtomicResponse + * @property {File} 0 The moved {@link File}. + * @property {object} 1 The full API response. */ /** - * @deprecated - * @callback SetLabelsCallback + * @callback MoveFileAtomicCallback * @param {?Error} err Request error, if any. - * @param {object} metadata The bucket metadata. + * @param {File} movedFile The moved {@link File}. + * @param {object} apiResponse The full API response. */ /** - * @deprecated - * @typedef {object} SetLabelsOptions Configuration options for Bucket#setLabels(). + * @typedef {object} MoveFileAtomicOptions Configuration options for File#moveFileAtomic(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. * @property {string} [userProject] The ID of the project which will be * billed for the request. + * @property {object} [preconditionOpts] Precondition options. + * @property {number} [preconditionOpts.ifGenerationMatch] Makes the operation conditional on whether the object's current generation matches the given value. */ /** - * @deprecated Use setMetadata directly. - * Set labels on the bucket. + * Move this file within the same bucket. + * The source object must exist and be a live object. + * The source and destination object IDs must be different. + * Overwriting the destination object is allowed by default, but can be prevented + * using preconditions. + * If the destination path includes non-existent parent folders, they will be created. * - * This makes an underlying call to {@link Bucket#setMetadata}, which - * is a PATCH request. This means an individual label can be overwritten, but - * unmentioned labels will not be touched. + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/move| Objects: move API Documentation} * - * @param {object} labels Labels to set on the bucket. - * @param {SetLabelsOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {SetLabelsCallback} [callback] Callback function. - * @returns {Promise} + * @throws {Error} If the destination file is not provided. + * + * @param {string|File} destination Destination file name or File object within the same bucket.. + * @param {MoveFileAtomicOptions} [options] Configuration options. See an + * @param {MoveFileAtomicCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); * - * const labels = { - * labelone: 'labelonevalue', - * labeltwo: 'labeltwovalue' - * }; + * //- + * // Assume 'my-bucket' is a bucket. + * //- + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); * - * bucket.setLabels(labels, function(err, metadata) { - * if (!err) { - * // Labels set successfully. - * } + * //- + * // If you pass in a string for the destination, the file is copied to its + * // current bucket, under the new name provided. + * //- + * file.moveFileAtomic('moved-image.png', function(err, movedFile, apiResponse) { + * // `my-bucket` now contains: + * // - "moved-image.png" + * + * // `movedFile` is an instance of a File object that refers to your new + * // file. + * }); + * + * //- + * // Move the file to a subdirectory, creating parent folders if necessary. + * //- + * file.moveFileAtomic('new-folder/subfolder/moved-image.png', function(err, movedFile, apiResponse) { + * // `my-bucket` now contains: + * // - "new-folder/subfolder/moved-image.png" + * }); + * + * //- + * // Prevent overwriting an existing destination object using preconditions. + * //- + * file.moveFileAtomic('existing-destination.png', { + * preconditionOpts: { + * ifGenerationMatch: 0 // Fails if the destination object exists. + * } + * }, function(err, movedFile, apiResponse) { + * if (err) { + * // Handle the error (e.g., the destination object already exists). + * } else { + * // Move successful. + * } * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.setLabels(labels).then(function(data) { - * const metadata = data[0]; + * file.moveFileAtomic('moved-image.png).then(function(data) { + * const newFile = data[0]; + * const apiResponse = data[1]; * }); + * * ``` + * @example include:samples/files.js + * region_tag:storage_move_file + * Another example: */ - setLabels(labels, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + moveFileAtomic(destination, optionsOrCallback, callback) { + var _a, _b; + const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME); + if (!destination) { + throw noDestinationError; + } + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = { ...optionsOrCallback }; + } callback = callback || index_js_1.util.noop; - this.setMetadata({ labels }, options, callback); - } - setMetadata(metadata, optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, AvailableServiceObjectMethods.setMetadata, options); - super - .setMetadata(metadata, options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { + let destName; + let newFile; + if (typeof destination === 'string') { + const parsedDestination = GS_URL_REGEXP.exec(destination); + if (parsedDestination !== null && parsedDestination.length === 3) { + destName = parsedDestination[2]; + } + else { + destName = destination; + } + } + else if (destination instanceof File) { + destName = destination.name; + newFile = destination; + } + else { + throw noDestinationError; + } + newFile = newFile || this.bucket.file(destName); + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { + this.storage.retryOptions.autoRetry = false; + } + const query = {}; + if (options.userProject !== undefined) { + query.userProject = options.userProject; + delete options.userProject; + } + if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) { + query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch; + delete options.preconditionOpts; + } + this.request({ + method: 'POST', + uri: `/moveTo/o/${encodeURIComponent(newFile.name)}`, + qs: query, + json: options, + }, (err, resp) => { this.storage.retryOptions.autoRetry = this.instanceRetryValue; + if (err) { + callback(err, null, resp); + return; + } + callback(null, newFile, resp); }); } /** - * Lock all objects contained in the bucket, based on their creation time. Any - * attempt to overwrite or delete objects younger than the retention period - * will result in a `PERMISSION_DENIED` error. + * @typedef {array} MoveResponse + * @property {File} 0 The destination File. + * @property {object} 1 The full API response. + */ + /** + * @callback MoveCallback + * @param {?Error} err Request error, if any. + * @param {?File} destinationFile The destination File. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {object} MoveOptions Configuration options for File#move(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Move this file to another location. By default, this will rename the file + * and keep it in the same bucket, but you can choose to move it to another + * Bucket by providing a Bucket or File object or a URL beginning with + * "gs://". * - * An unlocked retention policy can be modified or removed from the bucket via - * {@link File#removeRetentionPeriod} and {@link File#setRetentionPeriod}. A - * locked retention policy cannot be removed or shortened in duration for the - * lifetime of the bucket. Attempting to remove or decrease period of a locked - * retention policy will result in a `PERMISSION_DENIED` error. You can still - * increase the policy. + * **Warning**: + * There is currently no atomic `move` method in the Cloud Storage API, + * so this method is a composition of {@link File#copy} (to the new + * location) and {@link File#delete} (from the old location). While + * unlikely, it is possible that an error returned to your callback could be + * triggered from either one of these API calls failing, which could leave a + * duplicate file lingering. The error message will indicate what operation + * has failed. * - * @param {*} duration In seconds, the minimum retention time for all objects - * contained in this bucket. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @param {SetBucketMetadataCallback} [options] Options, including precondition options. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/copy| Objects: copy API Documentation} + * + * @throws {Error} If the destination file is not provided. + * + * @param {string|Bucket|File} destination Destination file. + * @param {MoveCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` - * const storage = require('@google-cloud/storage')(); - * const bucket = storage.bucket('albums'); - * - * const DURATION_SECONDS = 15780000; // 6 months. + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * //- + * // You can pass in a variety of types for the destination. + * // + * // For all of the below examples, assume we are working with the following + * // Bucket and File objects. + * //- + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); * * //- - * // Lock the objects in this bucket for 6 months. + * // If you pass in a string for the destination, the file is moved to its + * // current bucket, under the new name provided. * //- - * bucket.setRetentionPeriod(DURATION_SECONDS, function(err, apiResponse) {}); + * file.move('my-image-new.png', function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // but contains instead: + * // - "my-image-new.png" + * + * // `destinationFile` is an instance of a File object that refers to your + * // new file. + * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // If you pass in a string starting with "gs://" for the destination, the + * // file is copied to the other bucket and under the new name provided. * //- - * bucket.setRetentionPeriod(DURATION_SECONDS).then(function(data) { - * const apiResponse = data[0]; + * const newLocation = 'gs://another-bucket/my-image-new.png'; + * file.move(newLocation, function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image-new.png" + * + * // `destinationFile` is an instance of a File object that refers to your + * // new file. * }); - * ``` - */ - setRetentionPeriod(duration, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - this.setMetadata({ - retentionPolicy: { - retentionPeriod: duration.toString(), - }, - }, options, callback); - } - /** * - * @typedef {object} Cors - * @property {number} [maxAgeSeconds] The number of seconds the browser is - * allowed to make requests before it must repeat the preflight request. - * @property {string[]} [method] HTTP method allowed for cross origin resource - * sharing with this bucket. - * @property {string[]} [origin] an origin allowed for cross origin resource - * sharing with this bucket. - * @property {string[]} [responseHeader] A header allowed for cross origin - * resource sharing with this bucket. - */ - /** - * This can be used to set the CORS configuration on the bucket. + * //- + * // If you pass in a Bucket object, the file will be moved to that bucket + * // using the same name. + * //- + * const anotherBucket = gcs.bucket('another-bucket'); + * + * file.move(anotherBucket, function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image.png" * - * The configuration will be overwritten with the value passed into this. + * // `destinationFile` is an instance of a File object that refers to your + * // new file. + * }); * - * @param {Cors[]} corsConfiguration The new CORS configuration to set - * @param {number} [corsConfiguration.maxAgeSeconds] The number of seconds the browser is - * allowed to make requests before it must repeat the preflight request. - * @param {string[]} [corsConfiguration.method] HTTP method allowed for cross origin resource - * sharing with this bucket. - * @param {string[]} [corsConfiguration.origin] an origin allowed for cross origin resource - * sharing with this bucket. - * @param {string[]} [corsConfiguration.responseHeader] A header allowed for cross origin - * resource sharing with this bucket. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @param {SetBucketMetadataOptions} [options] Options, including precondition options. - * @returns {Promise} + * //- + * // If you pass in a File object, you have complete control over the new + * // bucket and filename. + * //- + * const anotherFile = anotherBucket.file('my-awesome-image.png'); * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const bucket = storage.bucket('albums'); + * file.move(anotherFile, function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-awesome-image.png" * - * const corsConfiguration = [{maxAgeSeconds: 3600}]; // 1 hour - * bucket.setCorsConfiguration(corsConfiguration); + * // Note: + * // The `destinationFile` parameter is equal to `anotherFile`. + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.setCorsConfiguration(corsConfiguration).then(function(data) { - * const apiResponse = data[0]; + * file.move('my-image-new.png').then(function(data) { + * const destinationFile = data[0]; + * const apiResponse = data[1]; * }); + * * ``` + * @example include:samples/files.js + * region_tag:storage_move_file + * Another example: */ - setCorsConfiguration(corsConfiguration, optionsOrCallback, callback) { + move(destination, optionsOrCallback, callback) { const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - this.setMetadata({ - cors: corsConfiguration, - }, options, callback); + callback = callback || index_js_1.util.noop; + this.copy(destination, options, (err, destinationFile, copyApiResponse) => { + if (err) { + err.message = 'file#copy failed with an error - ' + err.message; + callback(err, null, copyApiResponse); + return; + } + if (this.name !== destinationFile.name || + this.bucket.name !== destinationFile.bucket.name) { + this.delete(options, (err, apiResponse) => { + if (err) { + err.message = 'file#delete failed with an error - ' + err.message; + callback(err, destinationFile, apiResponse); + return; + } + callback(null, destinationFile, copyApiResponse); + }); + } + else { + callback(null, destinationFile, copyApiResponse); + } + }); } /** - * @typedef {object} SetBucketStorageClassOptions - * @property {string} [userProject] - The ID of the project which will be - * billed for the request. + * @typedef {array} RenameResponse + * @property {File} 0 The destination File. + * @property {object} 1 The full API response. */ /** - * @callback SetBucketStorageClassCallback + * @callback RenameCallback * @param {?Error} err Request error, if any. + * @param {?File} destinationFile The destination File. + * @param {object} apiResponse The full API response. */ /** - * Set the default storage class for new files in this bucket. + * @typedef {object} RenameOptions Configuration options for File#move(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Rename this file. * - * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} + * **Warning**: + * There is currently no atomic `rename` method in the Cloud Storage API, + * so this method is an alias of {@link File#move}, which in turn is a + * composition of {@link File#copy} (to the new location) and + * {@link File#delete} (from the old location). While + * unlikely, it is possible that an error returned to your callback could be + * triggered from either one of these API calls failing, which could leave a + * duplicate file lingering. The error message will indicate what operation + * has failed. * - * @param {string} storageClass The new storage class. (`standard`, - * `nearline`, `coldline`, or `archive`). - * **Note:** The storage classes `multi_regional`, `regional`, and - * `durable_reduced_availability` are now legacy and will be deprecated in - * the future. - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] - The ID of the project which will be - * billed for the request. - * @param {SetStorageClassCallback} [callback] Callback function. - * @returns {Promise} + * @param {string|File} destinationFile Destination file. + * @param {RenameCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); * - * bucket.setStorageClass('nearline', function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } + * //- + * // You can pass in a string or a File object. + * // + * // For all of the below examples, assume we are working with the following + * // Bucket and File objects. + * //- * - * // The storage class was updated successfully. + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); + * + * //- + * // You can pass in a string for the destinationFile. + * //- + * file.rename('renamed-image.png', function(err, renamedFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // but contains instead: + * // - "renamed-image.png" + * + * // `renamedFile` is an instance of a File object that refers to your + * // renamed file. + * }); + * + * //- + * // You can pass in a File object. + * //- + * const anotherFile = anotherBucket.file('my-awesome-image.png'); + * + * file.rename(anotherFile, function(err, renamedFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * + * // Note: + * // The `renamedFile` parameter is equal to `anotherFile`. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.setStorageClass('nearline').then(function() {}); + * file.rename('my-renamed-image.png').then(function(data) { + * const renamedFile = data[0]; + * const apiResponse = data[1]; + * }); * ``` */ - setStorageClass(storageClass, optionsOrCallback, callback) { + rename(destinationFile, optionsOrCallback, callback) { const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - // In case we get input like `storageClass`, convert to `storage_class`. - storageClass = storageClass - .replace(/-/g, '_') - .replace(/([a-z])([A-Z])/g, (_, low, up) => { - return low + '_' + up; - }) - .toUpperCase(); - this.setMetadata({ storageClass }, options, callback); + callback = callback || index_js_1.util.noop; + this.move(destinationFile, options, callback); } /** - * Set a user project to be billed for all requests made from this Bucket - * object and any files referenced from this Bucket object. - * - * @param {string} userProject The user project. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * bucket.setUserProject('grape-spaceship-123'); - * ``` + * @typedef {object} RestoreOptions Options for File#restore(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + * @param {number} [generation] If present, selects a specific revision of this object. + * @param {string} [restoreToken] Returns an option that must be specified when getting a soft-deleted object from an HNS-enabled + * bucket that has a naming and generation conflict with another object in the same bucket. + * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'. + * @param {string | number} [ifGenerationMatch] Request proceeds if the generation of the target resource + * matches the value used in the precondition. + * If the values don't match, the request fails with a 412 Precondition Failed response. + * @param {string | number} [ifGenerationNotMatch] Request proceeds if the generation of the target resource does + * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. + * @param {string | number} [ifMetagenerationMatch] Request proceeds if the meta-generation of the target resource + * matches the value used in the precondition. + * If the values don't match, the request fails with a 412 Precondition Failed response. + * @param {string | number} [ifMetagenerationNotMatch] Request proceeds if the meta-generation of the target resource does + * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. */ - setUserProject(userProject) { - this.userProject = userProject; - const methods = [ - 'create', - 'delete', - 'exists', - 'get', - 'getMetadata', - 'setMetadata', - ]; - methods.forEach(method => { - const methodConfig = this.methods[method]; - if (typeof methodConfig === 'object') { - if (typeof methodConfig.reqOpts === 'object') { - Object.assign(methodConfig.reqOpts.qs, { userProject }); - } - else { - methodConfig.reqOpts = { - qs: { userProject }, - }; - } - } + /** + * Restores a soft-deleted file + * @param {RestoreOptions} options Restore options. + * @returns {Promise} + */ + async restore(options) { + const [file] = await this.request({ + method: 'POST', + uri: '/restore', + qs: options, }); + return file; } /** - * @typedef {object} UploadOptions Configuration options for Bucket#upload(). - * @property {string|File} [destination] The place to save - * your file. If given a string, the file will be uploaded to the bucket - * using the string as a filename. When given a File object, your local - * file will be uploaded to the File object's bucket and under the File - * object's name. Lastly, when this argument is omitted, the file is uploaded - * to your bucket using the name of the local file. - * @property {string} [encryptionKey] A custom encryption key. See - * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. - * @property {boolean} [gzip] Automatically gzip the file. This will set - * `options.metadata.contentEncoding` to `gzip`. - * @property {string} [kmsKeyName] The name of the Cloud KMS key that will - * be used to encrypt the object. Must be in the format: - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. - * @property {object} [metadata] See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. - * @property {string} [offset] The starting byte of the upload stream, for - * resuming an interrupted upload. Defaults to 0. - * @property {string} [predefinedAcl] Apply a predefined set of access - * controls to this object. - * - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. + * Makes request and applies userProject query parameter if necessary. * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. + * @private * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. + * @param {object} reqOpts - The request options. + * @param {function} callback - The callback function. + */ + request(reqOpts, callback) { + return this.parent.request.call(this, reqOpts, callback); + } + /** + * @callback RotateEncryptionKeyCallback + * @extends CopyCallback + */ + /** + * @typedef RotateEncryptionKeyResponse + * @extends CopyResponse + */ + /** + * @param {string|buffer|object} RotateEncryptionKeyOptions Configuration options + * for File#rotateEncryptionKey(). + * If a string or Buffer is provided, it is interpreted as an AES-256, + * customer-supplied encryption key. If you'd like to use a Cloud KMS key + * name, you must specify an options object with the property name: + * `kmsKeyName`. + * @param {string|buffer} [options.encryptionKey] An AES-256 encryption key. + * @param {string} [options.kmsKeyName] A Cloud KMS key name. + */ + /** + * This method allows you to update the encryption key associated with this + * file. * - * - **`private`** - Object owner gets `OWNER` access. + * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. + * @param {RotateEncryptionKeyOptions} [options] - Configuration options. + * @param {RotateEncryptionKeyCallback} [callback] + * @returns {Promise} * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @property {boolean} [private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @property {boolean} [public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @property {boolean} [resumable=true] Resumable uploads are automatically - * enabled and must be shut off explicitly by setting to false. - * @property {number} [timeout=60000] Set the HTTP request timeout in - * milliseconds. This option is not available for resumable uploads. - * Default: `60000` - * @property {string} [uri] The URI for an already-created resumable - * upload. See {@link File#createResumableUpload}. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string|boolean} [validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with an - * MD5 checksum for maximum reliability. CRC32c will provide better - * performance with less reliability. You may also choose to skip - * validation completely, however this is **not recommended**. + * @example include:samples/encryption.js + * region_tag:storage_rotate_encryption_key + * Example of rotating the encryption key for this file: */ + rotateEncryptionKey(optionsOrCallback, callback) { + var _a; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + let options = {}; + if (typeof optionsOrCallback === 'string' || + optionsOrCallback instanceof Buffer) { + options = { + encryptionKey: optionsOrCallback, + }; + } + else if (typeof optionsOrCallback === 'object') { + options = optionsOrCallback; + } + const newFile = this.bucket.file(this.id, options); + const copyOptions = ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined + ? { preconditionOpts: options.preconditionOpts } + : {}; + this.copy(newFile, copyOptions, callback); + } /** - * @typedef {array} UploadResponse - * @property {object} 0 The uploaded {@link File}. - * @property {object} 1 The full API response. + * @typedef {object} SaveOptions + * @extends CreateWriteStreamOptions */ /** - * @callback UploadCallback + * @callback SaveCallback * @param {?Error} err Request error, if any. - * @param {object} file The uploaded {@link File}. - * @param {object} apiResponse The full API response. */ /** - * Upload a file to the bucket. This is a convenience method that wraps - * {@link File#createWriteStream}. - * - * Resumable uploads are enabled by default - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#uploads| Upload Options (Simple or Resumable)} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert| Objects: insert API Documentation} - * - * @param {string} pathString The fully qualified path to the file you - * wish to upload to your bucket. - * @param {UploadOptions} [options] Configuration options. - * @param {string|File} [options.destination] The place to save - * your file. If given a string, the file will be uploaded to the bucket - * using the string as a filename. When given a File object, your local - * file will be uploaded to the File object's bucket and under the File - * object's name. Lastly, when this argument is omitted, the file is uploaded - * to your bucket using the name of the local file. - * @param {string} [options.encryptionKey] A custom encryption key. See - * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. - * @param {boolean} [options.gzip] Automatically gzip the file. This will set - * `options.metadata.contentEncoding` to `gzip`. - * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will - * be used to encrypt the object. Must be in the format: - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. - * @param {object} [options.metadata] See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. - * @param {string} [options.offset] The starting byte of the upload stream, for - * resuming an interrupted upload. Defaults to 0. - * @param {string} [options.predefinedAcl] Apply a predefined set of access - * controls to this object. - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. - * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. - * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. - * - * - **`private`** - Object owner gets `OWNER` access. - * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. - * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @param {boolean} [options.private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @param {boolean} [options.public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @param {boolean} [options.resumable=true] Resumable uploads are automatically - * enabled and must be shut off explicitly by setting to false. - * @param {number} [options.timeout=60000] Set the HTTP request timeout in - * milliseconds. This option is not available for resumable uploads. - * Default: `60000` - * @param {string} [options.uri] The URI for an already-created resumable - * upload. See {@link File#createResumableUpload}. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {string|boolean} [options.validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with an - * MD5 checksum for maximum reliability. CRC32c will provide better - * performance with less reliability. You may also choose to skip - * validation completely, however this is **not recommended**. - * @param {UploadCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Upload a file from a local path. - * //- - * bucket.upload('/local/path/image.png', function(err, file, apiResponse) { - * // Your bucket now contains: - * // - "image.png" (with the contents of `/local/path/image.png') - * - * // `file` is an instance of a File object that refers to your new file. - * }); - * - * - * //- - * // It's not always that easy. You will likely want to specify the filename - * // used when your new file lands in your bucket. - * // - * // You may also want to set metadata or customize other options. - * //- - * const options = { - * destination: 'new-image.png', - * validation: 'crc32c', - * metadata: { - * metadata: { - * event: 'Fall trip to the zoo' - * } - * } - * }; - * - * bucket.upload('local-image.png', options, function(err, file) { - * // Your bucket now contains: - * // - "new-image.png" (with the contents of `local-image.png') - * - * // `file` is an instance of a File object that refers to your new file. - * }); - * - * //- - * // You can also have a file gzip'd on the fly. - * //- - * bucket.upload('index.html', { gzip: true }, function(err, file) { - * // Your bucket now contains: - * // - "index.html" (automatically compressed with gzip) - * - * // Downloading the file with `file.download` will automatically decode - * the - * // file. - * }); - * - * //- - * // You may also re-use a File object, {File}, that references - * // the file you wish to create or overwrite. - * //- - * const options = { - * destination: bucket.file('existing-file.png'), - * resumable: false - * }; - * - * bucket.upload('local-img.png', options, function(err, newFile) { - * // Your bucket now contains: - * // - "existing-file.png" (with the contents of `local-img.png') - * - * // Note: - * // The `newFile` parameter is equal to `file`. - * }); + * Write strings or buffers to a file. * - * //- - * // To use - * // - * // Customer-supplied Encryption Keys, provide the `encryptionKey` - * option. - * //- - * const crypto = require('crypto'); - * const encryptionKey = crypto.randomBytes(32); + * *This is a convenience method which wraps {@link File#createWriteStream}.* + * To upload arbitrary data to a file, please use {@link File#createWriteStream} directly. * - * bucket.upload('img.png', { - * encryptionKey: encryptionKey - * }, function(err, newFile) { - * // `img.png` was uploaded with your custom encryption key. + * Resumable uploads are automatically enabled and must be shut off explicitly + * by setting `options.resumable` to `false`. * - * // `newFile` is already configured to use the encryption key when making - * // operations on the remote object. + * Multipart uploads with retryable error codes will be retried 3 times with exponential backoff. * - * // However, to use your encryption key later, you must create a `File` - * // instance with the `key` supplied: - * const file = bucket.file('img.png', { - * encryptionKey: encryptionKey - * }); + *

+ * There is some overhead when using a resumable upload that can cause + * noticeable performance degradation while uploading a series of small + * files. When uploading files less than 10MB, it is recommended that the + * resumable feature is disabled. + *

* - * // Or with `file#setEncryptionKey`: - * const file = bucket.file('img.png'); - * file.setEncryptionKey(encryptionKey); + * @param {SaveData} data The data to write to a file. + * @param {SaveOptions} [options] See {@link File#createWriteStream}'s `options` + * parameter. + * @param {SaveCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * const contents = 'This is the contents of the file.'; + * + * file.save(contents, function(err) { + * if (!err) { + * // File written successfully. + * } * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.upload('local-image.png').then(function(data) { - * const file = data[0]; - * }); - * - * To upload a file from a URL, use {@link File#createWriteStream}. - * + * file.save(contents).then(function() {}); * ``` - * @example include:samples/files.js - * region_tag:storage_upload_file - * Another example: - * - * @example include:samples/encryption.js - * region_tag:storage_upload_encrypted_file - * Example of uploading an encrypted file: */ - upload(pathString, optionsOrCallback, callback) { - var _a, _b; - const upload = (numberOfRetries) => { - const returnValue = (0, async_retry_1.default)(async (bail) => { - await new Promise((resolve, reject) => { - var _a, _b; - if (numberOfRetries === 0 && - ((_b = (_a = newFile === null || newFile === void 0 ? void 0 : newFile.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry)) { - newFile.storage.retryOptions.autoRetry = false; - } - const writable = newFile.createWriteStream(options); - if (options.onUploadProgress) { - writable.on('progress', options.onUploadProgress); - } - fs.createReadStream(pathString) - .on('error', bail) - .pipe(writable) - .on('error', err => { - if (this.storage.retryOptions.autoRetry && - this.storage.retryOptions.retryableErrorFn(err)) { - return reject(err); - } - else { - return bail(err); - } - }) - .on('finish', () => { - return resolve(); - }); - }); - }, { - retries: numberOfRetries, - factor: this.storage.retryOptions.retryDelayMultiplier, - maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds - maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds - }); - if (!callback) { - return returnValue; - } - else { - return returnValue - .then(() => { - if (callback) { - return callback(null, newFile, newFile.metadata); - } - }) - .catch(callback); - } - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (global['GCLOUD_SANDBOX_ENV']) { - return; - } - let options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + save(data, optionsOrCallback, callback) { + // tslint:enable:no-any callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - options = Object.assign({ - metadata: {}, - }, options); - // Do not retry if precondition option ifGenerationMatch is not set - // because this is a file operation + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; let maxRetries = this.storage.retryOptions.maxRetries; - if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && - ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { maxRetries = 0; } - let newFile; - if (options.destination instanceof file_js_1.File) { - newFile = options.destination; - } - else if (options.destination !== null && - typeof options.destination === 'string') { - // Use the string as the name of the file. - newFile = this.file(options.destination, { - encryptionKey: options.encryptionKey, - kmsKeyName: options.kmsKeyName, - preconditionOpts: this.instancePreconditionOpts, + const returnValue = (0, async_retry_1.default)(async (bail) => { + return new Promise((resolve, reject) => { + if (maxRetries === 0) { + this.storage.retryOptions.autoRetry = false; + } + const writable = this.createWriteStream(options); + if (options.onUploadProgress) { + writable.on('progress', options.onUploadProgress); + } + const handleError = (err) => { + if (this.storage.retryOptions.autoRetry && + this.storage.retryOptions.retryableErrorFn(err)) { + return reject(err); + } + return bail(err); + }; + if (typeof data === 'string' || + Buffer.isBuffer(data) || + data instanceof Uint8Array) { + writable + .on('error', handleError) + .on('finish', () => resolve()) + .end(data); + } + else { + (0, stream_1.pipeline)(data, writable, err => { + if (err) { + if (typeof data !== 'function') { + // Only PipelineSourceFunction can be retried. Async-iterables + // and Readable streams can only be consumed once. + return bail(err); + } + handleError(err); + } + else { + resolve(); + } + }); + } }); + }, { + retries: maxRetries, + factor: this.storage.retryOptions.retryDelayMultiplier, + maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds + maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds + }); + if (!callback) { + return returnValue; } else { - // Resort to using the name of the incoming file. - const destination = path.basename(pathString); - newFile = this.file(destination, { - encryptionKey: options.encryptionKey, - kmsKeyName: options.kmsKeyName, - preconditionOpts: this.instancePreconditionOpts, - }); + return returnValue + .then(() => { + if (callback) { + return callback(); + } + }) + .catch(callback); } - upload(maxRetries); + } + setMetadata(metadata, optionsOrCallback, cb) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, bucket_js_1.AvailableServiceObjectMethods.setMetadata, options); + super + .setMetadata(metadata, options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + }); } /** - * @private - * - * @typedef {object} MakeAllFilesPublicPrivateOptions - * @property {boolean} [force] Suppress errors until all files have been - * processed. - * @property {boolean} [private] Make files private. - * @property {boolean} [public] Make files public. + * @typedef {array} SetStorageClassResponse + * @property {object} 0 The full API response. + */ + /** + * @typedef {object} SetStorageClassOptions Configuration options for File#setStorageClass(). * @property {string} [userProject] The ID of the project which will be * billed for the request. */ /** - * @private - * - * @callback SetBucketMetadataCallback + * @callback SetStorageClassCallback * @param {?Error} err Request error, if any. - * @param {File[]} files Files that were updated. - */ - /** - * @typedef {array} MakeAllFilesPublicPrivateResponse - * @property {File[]} 0 List of files affected. + * @param {object} apiResponse The full API response. */ /** - * Iterate over all of a bucket's files, calling `file.makePublic()` (public) - * or `file.makePrivate()` (private) on each. - * - * Operations are performed in parallel, up to 10 at once. The first error - * breaks the loop, and will execute the provided callback with it. Specify - * `{ force: true }` to suppress the errors. + * Set the storage class for this file. * - * @private + * See {@link https://cloud.google.com/storage/docs/per-object-storage-class| Per-Object Storage Class} + * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} * - * @param {MakeAllFilesPublicPrivateOptions} [options] Configuration options. - * @param {boolean} [options.force] Suppress errors until all files have been - * processed. - * @param {boolean} [options.private] Make files private. - * @param {boolean} [options.public] Make files public. + * @param {string} storageClass The new storage class. (`standard`, + * `nearline`, `coldline`, or `archive`) + * **Note:** The storage classes `multi_regional` and `regional` + * are now legacy and will be deprecated in the future. + * @param {SetStorageClassOptions} [options] Configuration options. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - - * @param {MakeAllFilesPublicPrivateCallback} callback Callback function. + * @param {SetStorageClassCallback} [callback] Callback function. + * @returns {Promise} * - * @return {Promise} + * @example + * ``` + * file.setStorageClass('nearline', function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * // The storage class was updated successfully. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.setStorageClass('nearline').then(function() {}); + * ``` */ - makeAllFilesPublicPrivate_(optionsOrCallback, callback) { - const MAX_PARALLEL_LIMIT = 10; - const errors = []; - const updatedFiles = []; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + setStorageClass(storageClass, optionsOrCallback, callback) { callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const processFile = async (file) => { - try { - await (options.public ? file.makePublic() : file.makePrivate(options)); - updatedFiles.push(file); - } - catch (e) { - if (!options.force) { - throw e; - } - errors.push(e); - } - }; - this.getFiles(options) - .then(([files]) => { - const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); - const promises = files.map(file => { - return limit(() => processFile(file)); - }); - return Promise.all(promises); - }) - .then(() => callback(errors.length > 0 ? errors : null, updatedFiles), err => callback(err, updatedFiles)); - } - getId() { - return this.id; - } - disableAutoRetryConditionallyIdempotent_( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - coreOpts, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - methodType, localPreconditionOptions) { - var _a, _b; - if (typeof coreOpts === 'object' && - ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch) === undefined && - (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && - (methodType === AvailableServiceObjectMethods.setMetadata || - methodType === AvailableServiceObjectMethods.delete) && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) { - this.storage.retryOptions.autoRetry = false; - } - else if (this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - this.storage.retryOptions.autoRetry = false; - } - } -} -exports.Bucket = Bucket; -/*! Developer Documentation - * - * These methods can be auto-paginated. - */ -paginator_1.paginator.extend(Bucket, 'getFiles'); -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(Bucket, { - exclude: ['cloudStorageURI', 'request', 'file', 'notification'], -}); - - -/***/ }), - -/***/ 62665: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Channel = void 0; -const index_js_1 = __nccwpck_require__(4052); -const promisify_1 = __nccwpck_require__(19203); -/** - * Create a channel object to interact with a Cloud Storage channel. - * - * See {@link https://cloud.google.com/storage/docs/object-change-notification| Object Change Notification} - * - * @class - * - * @param {string} id The ID of the channel. - * @param {string} resourceId The resource ID of the channel. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const channel = storage.channel('id', 'resource-id'); - * ``` - */ -class Channel extends index_js_1.ServiceObject { - constructor(storage, id, resourceId) { - const config = { - parent: storage, - baseUrl: '/channels', - // An ID shouldn't be included in the API requests. - // RE: - // https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1145 - id: '', - methods: { - // Only need `request`. - }, + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const req = { + ...options, + // In case we get input like `storageClass`, convert to `storage_class`. + storageClass: storageClass + .replace(/-/g, '_') + .replace(/([a-z])([A-Z])/g, (_, low, up) => { + return low + '_' + up; + }) + .toUpperCase(), }; - super(config); - this.metadata.id = id; - this.metadata.resourceId = resourceId; + this.copy(this, req, (err, file, apiResponse) => { + if (err) { + callback(err, apiResponse); + return; + } + this.metadata = file.metadata; + callback(null, apiResponse); + }); } /** - * @typedef {array} StopResponse - * @property {object} 0 The full API response. - */ - /** - * @callback StopCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Stop this channel. + * Set a user project to be billed for all requests made from this File + * object. * - * @param {StopCallback} [callback] Callback function. - * @returns {Promise} + * @param {string} userProject The user project. * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const channel = storage.channel('id', 'resource-id'); - * channel.stop(function(err, apiResponse) { - * if (!err) { - * // Channel stopped successfully. - * } - * }); + * const bucket = storage.bucket('albums'); + * const file = bucket.file('my-file'); + * + * file.setUserProject('grape-spaceship-123'); + * ``` + */ + setUserProject(userProject) { + this.bucket.setUserProject.call(this, userProject); + } + /** + * This creates a resumable-upload upload stream. + * + * @param {Duplexify} stream - Duplexify stream of data to pipe to the file. + * @param {object=} options - Configuration object. + * + * @private + */ + startResumableUpload_(dup, options = {}) { + var _a; + (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); + const retryOptions = this.storage.retryOptions; + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options.preconditionOpts)) { + retryOptions.autoRetry = false; + } + const cfg = { + authClient: this.storage.authClient, + apiEndpoint: this.storage.apiEndpoint, + bucket: this.bucket.name, + customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), + file: this.name, + generation: this.generation, + isPartialUpload: options.isPartialUpload, + key: this.encryptionKey, + kmsKeyName: this.kmsKeyName, + metadata: options.metadata, + offset: options.offset, + predefinedAcl: options.predefinedAcl, + private: options.private, + public: options.public, + uri: options.uri, + userProject: options.userProject || this.userProject, + retryOptions: { ...retryOptions }, + params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, + chunkSize: options === null || options === void 0 ? void 0 : options.chunkSize, + highWaterMark: options === null || options === void 0 ? void 0 : options.highWaterMark, + universeDomain: this.bucket.storage.universeDomain, + [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], + }; + let uploadStream; + try { + uploadStream = resumableUpload.upload(cfg); + } + catch (error) { + dup.destroy(error); + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + return; + } + uploadStream + .on('response', resp => { + dup.emit('response', resp); + }) + .on('uri', uri => { + dup.emit('uri', uri); + }) + .on('metadata', metadata => { + this.metadata = metadata; + dup.emit('metadata'); + }) + .on('finish', () => { + dup.emit('complete'); + }) + .on('progress', evt => dup.emit('progress', evt)); + dup.setWritable(uploadStream); + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + } + /** + * Takes a readable stream and pipes it to a remote file. Unlike + * `startResumableUpload_`, which uses the resumable upload technique, this + * method uses a simple upload (all or nothing). + * + * @param {Duplexify} dup - Duplexify stream of data to pipe to the file. + * @param {object=} options - Configuration object. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * channel.stop().then(function(data) { - * const apiResponse = data[0]; - * }); - * ``` + * @private */ - stop(callback) { - callback = callback || index_js_1.util.noop; - this.request({ - method: 'POST', - uri: '/stop', - json: this.metadata, - }, (err, apiResponse) => { - callback(err, apiResponse); + startSimpleUpload_(dup, options = {}) { + var _a; + (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); + const apiEndpoint = this.storage.apiEndpoint; + const bucketName = this.bucket.name; + const uri = `${apiEndpoint}/upload/storage/v1/b/${bucketName}/o`; + const reqOpts = { + qs: { + name: this.name, + }, + uri: uri, + [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], + }; + if (this.generation !== undefined) { + reqOpts.qs.ifGenerationMatch = this.generation; + } + if (this.kmsKeyName !== undefined) { + reqOpts.qs.kmsKeyName = this.kmsKeyName; + } + if (typeof options.timeout === 'number') { + reqOpts.timeout = options.timeout; + } + if (options.userProject || this.userProject) { + reqOpts.qs.userProject = options.userProject || this.userProject; + } + if (options.predefinedAcl) { + reqOpts.qs.predefinedAcl = options.predefinedAcl; + } + else if (options.private) { + reqOpts.qs.predefinedAcl = 'private'; + } + else if (options.public) { + reqOpts.qs.predefinedAcl = 'publicRead'; + } + Object.assign(reqOpts.qs, this.instancePreconditionOpts, options.preconditionOpts); + index_js_1.util.makeWritableStream(dup, { + makeAuthenticatedRequest: (reqOpts) => { + this.request(reqOpts, (err, body, resp) => { + if (err) { + dup.destroy(err); + return; + } + this.metadata = body; + dup.emit('metadata', body); + dup.emit('response', resp); + dup.emit('complete'); + }); + }, + metadata: options.metadata, + request: reqOpts, }); } + disableAutoRetryConditionallyIdempotent_( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + coreOpts, methodType, localPreconditionOptions) { + var _a, _b, _c, _d; + if ((typeof coreOpts === 'object' && + ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && + (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifGenerationMatch) === undefined && + methodType === bucket_js_1.AvailableServiceObjectMethods.delete && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + this.storage.retryOptions.autoRetry = false; + } + if ((typeof coreOpts === 'object' && + ((_d = (_c = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _c === void 0 ? void 0 : _c.qs) === null || _d === void 0 ? void 0 : _d.ifMetagenerationMatch) === undefined && + (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && + methodType === bucket_js_1.AvailableServiceObjectMethods.setMetadata && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + this.storage.retryOptions.autoRetry = false; + } + } + async getBufferFromReadable(readable) { + const buf = []; + for await (const chunk of readable) { + buf.push(chunk); + } + return Buffer.concat(buf); + } } -exports.Channel = Channel; +exports.File = File; +_File_instances = new WeakSet(), _File_validateIntegrity = +/** + * + * @param hashCalculatingStream + * @param verify + * @returns {boolean} Returns `true` if valid, throws with error otherwise + */ +async function _File_validateIntegrity(hashCalculatingStream, verify = {}) { + const metadata = this.metadata; + // If we're doing validation, assume the worst + let dataMismatch = !!(verify.crc32c || verify.md5); + if (verify.crc32c && metadata.crc32c) { + dataMismatch = !hashCalculatingStream.test('crc32c', metadata.crc32c); + } + if (verify.md5 && metadata.md5Hash) { + dataMismatch = !hashCalculatingStream.test('md5', metadata.md5Hash); + } + if (dataMismatch) { + const errors = []; + let code = ''; + let message = ''; + try { + await this.delete(); + if (verify.md5 && !metadata.md5Hash) { + code = 'MD5_NOT_AVAILABLE'; + message = FileExceptionMessages.MD5_NOT_AVAILABLE; + } + else { + code = 'FILE_NO_UPLOAD'; + message = FileExceptionMessages.UPLOAD_MISMATCH; + } + } + catch (e) { + const error = e; + code = 'FILE_NO_UPLOAD_DELETE'; + message = `${FileExceptionMessages.UPLOAD_MISMATCH_DELETE_FAIL}${error.message}`; + errors.push(error); + } + const error = new RequestError(message); + error.code = code; + error.errors = errors; + throw error; + } + return true; +}; /*! Developer Documentation * * All async methods (except for streams) will return a Promise in the event * that a callback is omitted. */ -(0, promisify_1.promisifyAll)(Channel); +(0, promisify_1.promisifyAll)(File, { + exclude: [ + 'cloudStorageURI', + 'publicUrl', + 'request', + 'save', + 'setEncryptionKey', + 'shouldRetryBasedOnPreconditionAndIdempotencyStrat', + 'getBufferFromReadable', + 'restore', + ], +}); /***/ }), -/***/ 55810: +/***/ 40725: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -118816,241 +123622,114 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function ( if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; -var _CRC32C_crc32c; +var _HashStreamValidator_crc32cHash, _HashStreamValidator_md5Hash, _HashStreamValidator_md5Digest; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CRC32C_EXTENSION_TABLE = exports.CRC32C_EXTENSIONS = exports.CRC32C_EXCEPTION_MESSAGES = exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = exports.CRC32C = void 0; -const fs_1 = __nccwpck_require__(57147); -/** - * Ported from {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc#L16-L59 github.com/google/crc32c} - */ -const CRC32C_EXTENSIONS = [ - 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, - 0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, - 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c, - 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, - 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc, - 0xbc267848, 0x4e4dfb4b, 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, - 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, 0xaa64d611, 0x580f5512, - 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, - 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad, - 0x1642ae59, 0xe4292d5a, 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, - 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, 0x417b1dbc, 0xb3109ebf, - 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, - 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f, - 0xed03a29b, 0x1f682198, 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, - 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, 0xdbfc821c, 0x2997011f, - 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, - 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e, - 0x4767748a, 0xb50cf789, 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, - 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, 0x7198540d, 0x83f3d70e, - 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, - 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de, - 0xdde0eb2a, 0x2f8b6829, 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, - 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, 0x082f63b7, 0xfa44e0b4, - 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, - 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b, - 0xb4091bff, 0x466298fc, 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, - 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, 0xa24bb5a6, 0x502036a5, - 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, - 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975, - 0x0e330a81, 0xfc588982, 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, - 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, 0x38cc2a06, 0xcaa7a905, - 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, - 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8, - 0xe52cc12c, 0x1747422f, 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, - 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, 0xd3d3e1ab, 0x21b862a8, - 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, - 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78, - 0x7fab5e8c, 0x8dc0dd8f, 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, - 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, 0x69e9f0d5, 0x9b8273d6, - 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, - 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69, - 0xd5cf889d, 0x27a40b9e, 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, - 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351, -]; -exports.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; -const CRC32C_EXTENSION_TABLE = new Int32Array(CRC32C_EXTENSIONS); -exports.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; -const CRC32C_DEFAULT_VALIDATOR_GENERATOR = () => new CRC32C(); -exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = CRC32C_DEFAULT_VALIDATOR_GENERATOR; -const CRC32C_EXCEPTION_MESSAGES = { - INVALID_INIT_BASE64_RANGE: (l) => `base64-encoded data expected to equal 4 bytes, not ${l}`, - INVALID_INIT_BUFFER_LENGTH: (l) => `Buffer expected to equal 4 bytes, not ${l}`, - INVALID_INIT_INTEGER: (l) => `Number expected to be a safe, unsigned 32-bit integer, not ${l}`, -}; -exports.CRC32C_EXCEPTION_MESSAGES = CRC32C_EXCEPTION_MESSAGES; -class CRC32C { - /** - * Constructs a new `CRC32C` object. - * - * Reconstruction is recommended via the `CRC32C.from` static method. - * - * @param initialValue An initial CRC32C value - a signed 32-bit integer. - */ - constructor(initialValue = 0) { - /** Current CRC32C value */ - _CRC32C_crc32c.set(this, 0); - __classPrivateFieldSet(this, _CRC32C_crc32c, initialValue, "f"); - } - /** - * Calculates a CRC32C from a provided buffer. - * - * Implementation inspired from: - * - {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc github.com/google/crc32c} - * - {@link https://github.com/googleapis/python-crc32c/blob/a595e758c08df445a99c3bf132ee8e80a3ec4308/src/google_crc32c/python.py github.com/googleapis/python-crc32c} - * - {@link https://github.com/googleapis/java-storage/pull/1376/files github.com/googleapis/java-storage} - * - * @param data The `Buffer` to generate the CRC32C from - */ - update(data) { - let current = __classPrivateFieldGet(this, _CRC32C_crc32c, "f") ^ 0xffffffff; - for (const d of data) { - const tablePoly = CRC32C.CRC32C_EXTENSION_TABLE[(d ^ current) & 0xff]; - current = tablePoly ^ (current >>> 8); - } - __classPrivateFieldSet(this, _CRC32C_crc32c, current ^ 0xffffffff, "f"); - } - /** - * Validates a provided input to the current CRC32C value. - * - * @param input A Buffer, `CRC32C`-compatible object, base64-encoded data (string), or signed 32-bit integer - */ - validate(input) { - if (typeof input === 'number') { - return input === __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); - } - else if (typeof input === 'string') { - return input === this.toString(); - } - else if (Buffer.isBuffer(input)) { - return Buffer.compare(input, this.toBuffer()) === 0; +exports.HashStreamValidator = void 0; +const crypto_1 = __nccwpck_require__(6113); +const stream_1 = __nccwpck_require__(12781); +const crc32c_js_1 = __nccwpck_require__(55810); +const file_js_1 = __nccwpck_require__(4713); +class HashStreamValidator extends stream_1.Transform { + constructor(options = {}) { + super(); + this.updateHashesOnly = false; + _HashStreamValidator_crc32cHash.set(this, undefined); + _HashStreamValidator_md5Hash.set(this, undefined); + _HashStreamValidator_md5Digest.set(this, ''); + this.crc32cEnabled = !!options.crc32c; + this.md5Enabled = !!options.md5; + this.updateHashesOnly = !!options.updateHashesOnly; + this.crc32cExpected = options.crc32cExpected; + this.md5Expected = options.md5Expected; + if (this.crc32cEnabled) { + if (options.crc32cInstance) { + __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, options.crc32cInstance, "f"); + } + else { + const crc32cGenerator = options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; + __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, crc32cGenerator(), "f"); + } } - else { - // `CRC32C`-like object - return input.toString() === this.toString(); + if (this.md5Enabled) { + __classPrivateFieldSet(this, _HashStreamValidator_md5Hash, (0, crypto_1.createHash)('md5'), "f"); } } /** - * Returns a `Buffer` representation of the CRC32C value - */ - toBuffer() { - const buffer = Buffer.alloc(4); - buffer.writeInt32BE(__classPrivateFieldGet(this, _CRC32C_crc32c, "f")); - return buffer; - } - /** - * Returns a JSON-compatible, base64-encoded representation of the CRC32C value. - * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify `JSON#stringify`} - */ - toJSON() { - return this.toString(); - } - /** - * Returns a base64-encoded representation of the CRC32C value. - * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString `Object#toString`} - */ - toString() { - return this.toBuffer().toString('base64'); - } - /** - * Returns the `number` representation of the CRC32C value as a signed 32-bit integer - * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf `Object#valueOf`} + * Return the current CRC32C value, if available. */ - valueOf() { - return __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); + get crc32c() { + var _a; + return (_a = __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) === null || _a === void 0 ? void 0 : _a.toString(); } /** - * Generates a `CRC32C` from a compatible buffer format. - * - * @param value 4-byte `ArrayBufferView`/`Buffer`/`TypedArray` + * Return the calculated MD5 value, if available. */ - static fromBuffer(value) { - let buffer; - if (Buffer.isBuffer(value)) { - buffer = value; + get md5Digest() { + if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f") && !__classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f")) { + __classPrivateFieldSet(this, _HashStreamValidator_md5Digest, __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").digest('base64'), "f"); } - else if ('buffer' in value) { - // `ArrayBufferView` - buffer = Buffer.from(value.buffer); + return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f"); + } + _flush(callback) { + // Triggers the getter logic to finalize and cache the MD5 digest + this.md5Digest; + if (this.updateHashesOnly) { + callback(); + return; } - else { - // `ArrayBuffer` - buffer = Buffer.from(value); + // If we're doing validation, assume the worst-- a data integrity + // mismatch. If not, these tests won't be performed, and we can assume + // the best. + // We must check if the server decompressed the data on serve because hash + // validation is not possible in this case. + let failed = this.crc32cEnabled || this.md5Enabled; + if (this.crc32cEnabled && this.crc32cExpected) { + failed = !this.test('crc32c', this.crc32cExpected); } - if (buffer.byteLength !== 4) { - throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BUFFER_LENGTH(buffer.byteLength)); + if (this.md5Enabled && this.md5Expected) { + failed = !this.test('md5', this.md5Expected); } - return new CRC32C(buffer.readInt32BE()); - } - static async fromFile(file) { - const crc32c = new CRC32C(); - await new Promise((resolve, reject) => { - (0, fs_1.createReadStream)(file) - .on('data', (d) => crc32c.update(d)) - .on('end', resolve) - .on('error', reject); - }); - return crc32c; - } - /** - * Generates a `CRC32C` from 4-byte base64-encoded data (string). - * - * @param value 4-byte base64-encoded data (string) - */ - static fromString(value) { - const buffer = Buffer.from(value, 'base64'); - if (buffer.byteLength !== 4) { - throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BASE64_RANGE(buffer.byteLength)); + if (failed) { + const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); + mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; + callback(mismatchError); } - return this.fromBuffer(buffer); - } - /** - * Generates a `CRC32C` from a safe, unsigned 32-bit integer. - * - * @param value an unsigned 32-bit integer - */ - static fromNumber(value) { - if (!Number.isSafeInteger(value) || value > 2 ** 32 || value < -(2 ** 32)) { - throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_INTEGER(value)); + else { + callback(); } - return new CRC32C(value); } - /** - * Generates a `CRC32C` from a variety of compatable types. - * Note: strings are treated as input, not as file paths to read from. - * - * @param value A number, 4-byte `ArrayBufferView`/`Buffer`/`TypedArray`, or 4-byte base64-encoded data (string) - */ - static from(value) { - if (typeof value === 'number') { - return this.fromNumber(value); + _transform(chunk, encoding, callback) { + this.push(chunk, encoding); + try { + if (__classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) + __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").update(chunk); + if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) + __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").update(chunk); + callback(); } - else if (typeof value === 'string') { - return this.fromString(value); + catch (e) { + callback(e); } - else if ('byteLength' in value) { - // `ArrayBuffer` | `Buffer` | `ArrayBufferView` - return this.fromBuffer(value); + } + test(hash, sum) { + const check = Buffer.isBuffer(sum) ? sum.toString('base64') : sum; + if (hash === 'crc32c' && __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) { + return __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").validate(check); } - else { - // `CRC32CValidator`/`CRC32C`-like - return this.fromString(value.toString()); + if (hash === 'md5' && __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) { + return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f") === check; } + return false; } } -exports.CRC32C = CRC32C; -_CRC32C_crc32c = new WeakMap(); -CRC32C.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; -CRC32C.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; +exports.HashStreamValidator = HashStreamValidator; +_HashStreamValidator_crc32cHash = new WeakMap(), _HashStreamValidator_md5Hash = new WeakMap(), _HashStreamValidator_md5Digest = new WeakMap(); /***/ }), -/***/ 4713: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 64654: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -119067,3401 +123746,3296 @@ CRC32C.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; // 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _File_instances, _File_validateIntegrity; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.File = exports.FileExceptionMessages = exports.RequestError = exports.STORAGE_POST_POLICY_BASE_URL = exports.ActionToHTTPMethod = void 0; -const index_js_1 = __nccwpck_require__(4052); -const promisify_1 = __nccwpck_require__(19203); -const crypto = __importStar(__nccwpck_require__(6113)); -const fs = __importStar(__nccwpck_require__(57147)); -const mime_1 = __importDefault(__nccwpck_require__(29994)); -const resumableUpload = __importStar(__nccwpck_require__(42851)); -const stream_1 = __nccwpck_require__(12781); -const zlib = __importStar(__nccwpck_require__(59796)); -const storage_js_1 = __nccwpck_require__(33030); -const bucket_js_1 = __nccwpck_require__(23973); -const acl_js_1 = __nccwpck_require__(22989); -const signer_js_1 = __nccwpck_require__(59019); -const util_js_1 = __nccwpck_require__(38064); -const duplexify_1 = __importDefault(__nccwpck_require__(76599)); -const util_js_2 = __nccwpck_require__(59258); -const crc32c_js_1 = __nccwpck_require__(55810); -const hash_stream_validator_js_1 = __nccwpck_require__(40725); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -var ActionToHTTPMethod; -(function (ActionToHTTPMethod) { - ActionToHTTPMethod["read"] = "GET"; - ActionToHTTPMethod["write"] = "PUT"; - ActionToHTTPMethod["delete"] = "DELETE"; - ActionToHTTPMethod["resumable"] = "POST"; -})(ActionToHTTPMethod || (exports.ActionToHTTPMethod = ActionToHTTPMethod = {})); -/** - * @deprecated - no longer used - */ -exports.STORAGE_POST_POLICY_BASE_URL = 'https://storage.googleapis.com'; -/** - * @private - */ -const GS_URL_REGEXP = /^gs:\/\/([a-z0-9_.-]+)\/(.+)$/; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HmacKey = void 0; +const index_js_1 = __nccwpck_require__(4052); +const storage_js_1 = __nccwpck_require__(33030); +const promisify_1 = __nccwpck_require__(19203); /** - * @private - * This regex will match compressible content types. These are primarily text/*, +json, +text, +xml content types. - * This was based off of mime-db and may periodically need to be updated if new compressible content types become - * standards. + * The API-formatted resource description of the HMAC key. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name HmacKey#metadata + * @type {object} */ -const COMPRESSIBLE_MIME_REGEX = new RegExp([ - /^text\/|application\/ecmascript|application\/javascript|application\/json/, - /|application\/postscript|application\/rtf|application\/toml|application\/vnd.dart/, - /|application\/vnd.ms-fontobject|application\/wasm|application\/x-httpd-php|application\/x-ns-proxy-autoconfig/, - /|application\/x-sh(?!ockwave-flash)|application\/x-tar|application\/x-virtualbox-hdd|application\/x-virtualbox-ova|application\/x-virtualbox-ovf/, - /|^application\/x-virtualbox-vbox$|application\/x-virtualbox-vdi|application\/x-virtualbox-vhd|application\/x-virtualbox-vmdk/, - /|application\/xml|application\/xml-dtd|font\/otf|font\/ttf|image\/bmp|image\/vnd.adobe.photoshop|image\/vnd.microsoft.icon/, - /|image\/vnd.ms-dds|image\/x-icon|image\/x-ms-bmp|message\/rfc822|model\/gltf-binary|\+json|\+text|\+xml|\+yaml/, -] - .map(r => r.source) - .join(''), 'i'); -class RequestError extends Error { -} -exports.RequestError = RequestError; -const SEVEN_DAYS = 7 * 24 * 60 * 60; -const GS_UTIL_URL_REGEX = /(gs):\/\/([a-z0-9_.-]+)\/(.+)/g; -const HTTPS_PUBLIC_URL_REGEX = /(https):\/\/(storage\.googleapis\.com)\/([a-z0-9_.-]+)\/(.+)/g; -var FileExceptionMessages; -(function (FileExceptionMessages) { - FileExceptionMessages["EXPIRATION_TIME_NA"] = "An expiration time is not available."; - FileExceptionMessages["DESTINATION_NO_NAME"] = "Destination file should have a name."; - FileExceptionMessages["INVALID_VALIDATION_FILE_RANGE"] = "Cannot use validation with file ranges (start/end)."; - FileExceptionMessages["MD5_NOT_AVAILABLE"] = "MD5 verification was specified, but is not available for the requested object. MD5 is not available for composite objects."; - FileExceptionMessages["EQUALS_CONDITION_TWO_ELEMENTS"] = "Equals condition must be an array of 2 elements."; - FileExceptionMessages["STARTS_WITH_TWO_ELEMENTS"] = "StartsWith condition must be an array of 2 elements."; - FileExceptionMessages["CONTENT_LENGTH_RANGE_MIN_MAX"] = "ContentLengthRange must have numeric min & max fields."; - FileExceptionMessages["DOWNLOAD_MISMATCH"] = "The downloaded data did not match the data from the server. To be sure the content is the same, you should download the file again."; - FileExceptionMessages["UPLOAD_MISMATCH_DELETE_FAIL"] = "The uploaded data did not match the data from the server.\n As a precaution, we attempted to delete the file, but it was not successful.\n To be sure the content is the same, you should try removing the file manually,\n then uploading the file again.\n \n\nThe delete attempt failed with this message:\n\n "; - FileExceptionMessages["UPLOAD_MISMATCH"] = "The uploaded data did not match the data from the server.\n As a precaution, the file has been deleted.\n To be sure the content is the same, you should try uploading the file again."; - FileExceptionMessages["MD5_RESUMED_UPLOAD"] = "MD5 cannot be used with a continued resumable upload as MD5 cannot be extended from an existing value"; - FileExceptionMessages["MISSING_RESUME_CRC32C_FINAL_UPLOAD"] = "The CRC32C is missing for the final portion of a resumed upload, which is required for validation. Please provide `resumeCRC32C` if validation is required, or disable `validation`."; -})(FileExceptionMessages || (exports.FileExceptionMessages = FileExceptionMessages = {})); /** - * A File object is created from your {@link Bucket} object using - * {@link Bucket#file}. + * An HmacKey object contains metadata of an HMAC key created from a + * service account through the {@link Storage} client using + * {@link Storage#createHmacKey}. + * + * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} * * @class */ -class File extends index_js_1.ServiceObject { - /** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * An ACL consists of one or more entries, where each entry grants permissions - * to an entity. Permissions define the actions that can be performed against - * an object or bucket (for example, `READ` or `WRITE`); the entity defines - * who the permission applies to (for example, a specific user or group of - * users). - * - * The `acl` object on a File instance provides methods to get you a list of - * the ACLs defined on your bucket, as well as set, update, and delete them. - * - * See {@link http://goo.gl/6qBBPO| About Access Control lists} - * - * @name File#acl - * @mixes Acl - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * //- - * // Make a file publicly readable. - * //- - * const options = { - * entity: 'allUsers', - * role: storage.acl.READER_ROLE - * }; - * - * file.acl.add(options, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - /** - * The API-formatted resource description of the file. - * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. - * - * @name File#metadata - * @type {object} - */ +class HmacKey extends index_js_1.ServiceObject { /** - * The file's name. - * @name File#name - * @type {string} + * @typedef {object} HmacKeyOptions + * @property {string} [projectId] The project ID of the project that owns + * the service account of the requested HMAC key. If not provided, + * the project ID used to instantiate the Storage client will be used. */ /** - * @callback Crc32cGeneratorToStringCallback - * A method returning the CRC32C as a base64-encoded string. - * - * @returns {string} - * - * @example - * Hashing the string 'data' should return 'rth90Q==' - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.toString(); // 'rth90Q==' - * ``` - **/ - /** - * @callback Crc32cGeneratorValidateCallback - * A method validating a base64-encoded CRC32C string. - * - * @param {string} [value] base64-encoded CRC32C string to validate - * @returns {boolean} - * - * @example - * Should return `true` if the value matches, `false` otherwise - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.validate('DkjKuA=='); // false - * crc32c.validate('rth90Q=='); // true - * ``` - **/ - /** - * @callback Crc32cGeneratorUpdateCallback - * A method for passing `Buffer`s for CRC32C generation. - * - * @param {Buffer} [data] data to update CRC32C value with - * @returns {undefined} - * - * @example - * Hashing buffers from 'some ' and 'text\n' - * - * ```js - * const buffer1 = Buffer.from('some '); - * crc32c.update(buffer1); - * - * const buffer2 = Buffer.from('text\n'); - * crc32c.update(buffer2); + * Constructs an HmacKey object. * - * crc32c.toString(); // 'DkjKuA==' - * ``` - **/ - /** - * @typedef {object} CRC32CValidator - * @property {Crc32cGeneratorToStringCallback} - * @property {Crc32cGeneratorValidateCallback} - * @property {Crc32cGeneratorUpdateCallback} - */ - /** - * @callback Crc32cGeneratorCallback - * @returns {CRC32CValidator} - */ - /** - * @typedef {object} FileOptions Options passed to the File constructor. - * @property {string} [encryptionKey] A custom encryption key. - * @property {number} [generation] Generation to scope the file to. - * @property {string} [kmsKeyName] Cloud KMS Key used to encrypt this - * object, if the object is encrypted by such a key. Limited availability; - * usable only by enabled projects. - * @property {string} [userProject] The ID of the project which will be - * billed for all requests made from File object. - * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} - */ - /** - * Constructs a file object. + * Note: this only create a local reference to an HMAC key, to create + * an HMAC key, use {@link Storage#createHmacKey}. * - * @param {Bucket} bucket The Bucket instance this file is + * @param {Storage} storage The Storage instance this HMAC key is * attached to. - * @param {string} name The name of the remote file. - * @param {FileOptions} [options] Configuration options. + * @param {string} accessId The unique accessId for this HMAC key. + * @param {HmacKeyOptions} options Constructor configurations. * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); + * const hmacKey = storage.hmacKey('access-id'); * ``` */ - constructor(bucket, name, options = {}) { - var _a, _b; - const requestQueryObject = {}; - let generation; - if (options.generation !== null) { - if (typeof options.generation === 'string') { - generation = Number(options.generation); - } - else { - generation = options.generation; - } - if (!isNaN(generation)) { - requestQueryObject.generation = generation; - } - } - Object.assign(requestQueryObject, options.preconditionOpts); - const userProject = options.userProject || bucket.userProject; - if (typeof userProject === 'string') { - requestQueryObject.userProject = userProject; - } + constructor(storage, accessId, options) { const methods = { /** - * @typedef {array} DeleteFileResponse + * @typedef {object} DeleteHmacKeyOptions + * @property {string} [userProject] This parameter is currently ignored. + */ + /** + * @typedef {array} DeleteHmacKeyResponse * @property {object} 0 The full API response. */ /** - * @callback DeleteFileCallback + * @callback DeleteHmacKeyCallback * @param {?Error} err Request error, if any. * @param {object} apiResponse The full API response. */ /** - * Delete the file. + * Deletes an HMAC key. + * Key state must be set to `INACTIVE` prior to deletion. + * Caution: HMAC keys cannot be recovered once you delete them. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} + * The authenticated user must have `storage.hmacKeys.delete` permission for the project in which the key exists. * - * @method File#delete - * @param {object} [options] Configuration options. - * @param {boolean} [options.ignoreNotFound = false] Ignore an error if - * the file does not exist. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {DeleteFileCallback} [callback] Callback function. - * @returns {Promise} + * @method HmacKey#delete + * @param {DeleteHmacKeyOptions} [options] Configuration options. + * @param {DeleteHmacKeyCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * file.delete(function(err, apiResponse) {}); * * //- - * // If the callback is omitted, we'll return a Promise. + * // Delete HMAC key after making the key inactive. * //- - * file.delete().then(function(data) { - * const apiResponse = data[0]; - * }); + * const hmacKey = storage.hmacKey('ACCESS_ID'); + * hmacKey.setMetadata({state: 'INACTIVE'}, (err, hmacKeyMetadata) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * hmacKey.delete((err) => { + * if (err) { + * console.error(err); + * return; + * } + * // The HMAC key is deleted. + * }); + * }); * + * //- + * // If the callback is omitted, a promise is returned. + * //- + * const hmacKey = storage.hmacKey('ACCESS_ID'); + * hmacKey + * .setMetadata({state: 'INACTIVE'}) + * .then(() => { + * return hmacKey.delete(); + * }); * ``` - * @example include:samples/files.js - * region_tag:storage_delete_file - * Another example: - */ - delete: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {array} FileExistsResponse - * @property {boolean} 0 Whether the {@link File} exists. */ + delete: true, /** - * @callback FileExistsCallback + * @callback GetHmacKeyCallback * @param {?Error} err Request error, if any. - * @param {boolean} exists Whether the {@link File} exists. - */ - /** - * Check if the file exists. - * - * @method File#exists - * @param {options} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {FileExistsCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * file.exists(function(err, exists) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.exists().then(function(data) { - * const exists = data[0]; - * }); - * ``` + * @param {HmacKey} hmacKey this {@link HmacKey} instance. + * @param {object} apiResponse The full API response. */ - exists: { - reqOpts: { - qs: requestQueryObject, - }, - }, /** - * @typedef {array} GetFileResponse - * @property {File} 0 The {@link File}. + * @typedef {array} GetHmacKeyResponse + * @property {HmacKey} 0 This {@link HmacKey} instance. * @property {object} 1 The full API response. */ /** - * @callback GetFileCallback - * @param {?Error} err Request error, if any. - * @param {File} file The {@link File}. - * @param {object} apiResponse The full API response. + * @typedef {object} GetHmacKeyOptions + * @property {string} [userProject] This parameter is currently ignored. */ /** - * Get a file object and its metadata if it exists. + * Retrieves and populate an HMAC key's metadata, and return + * this {@link HmacKey} instance. * - * @method File#get - * @param {options} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {number} [options.generation] The generation number to get - * @param {boolean} [options.softDeleted] If true, returns the soft-deleted object. - Object `generation` is required if `softDeleted` is set to True. - * @param {GetFileCallback} [callback] Callback function. - * @returns {Promise} + * HmacKey.get() does not give the HMAC key secret, as + * it is only returned on creation. + * + * The authenticated user must have `storage.hmacKeys.get` permission + * for the project in which the key exists. + * + * @method HmacKey#get + * @param {GetHmacKeyOptions} [options] Configuration options. + * @param {GetHmacKeyCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); * - * const file = myBucket.file('my-file'); - * - * file.get(function(err, file, apiResponse) { - * // file.metadata` has been populated. - * }); + * //- + * // Get the HmacKey's Metadata. + * //- + * storage.hmacKey('ACCESS_ID') + * .get((err, hmacKey) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * // do something with the returned HmacKey object. + * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // If the callback is omitted, a promise is returned. * //- - * file.get().then(function(data) { - * const file = data[0]; - * const apiResponse = data[1]; - * }); + * storage.hmacKey('ACCESS_ID') + * .get() + * .then((data) => { + * const hmacKey = data[0]; + * }); * ``` */ - get: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {array} GetFileMetadataResponse - * @property {object} 0 The {@link File} metadata. - * @property {object} 1 The full API response. - */ + get: true, /** - * @callback GetFileMetadataCallback - * @param {?Error} err Request error, if any. - * @param {object} metadata The {@link File} metadata. - * @param {object} apiResponse The full API response. + * @typedef {object} GetHmacKeyMetadataOptions + * @property {string} [userProject] This parameter is currently ignored. */ /** - * Get the file's metadata. + * Retrieves and populate an HMAC key's metadata, and return + * the HMAC key's metadata as an object. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/get| Objects: get API Documentation} + * HmacKey.getMetadata() does not give the HMAC key secret, as + * it is only returned on creation. * - * @method File#getMetadata - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetFileMetadataCallback} [callback] Callback function. - * @returns {Promise} + * The authenticated user must have `storage.hmacKeys.get` permission + * for the project in which the key exists. + * + * @method HmacKey#getMetadata + * @param {GetHmacKeyMetadataOptions} [options] Configuration options. + * @param {HmacKeyMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * file.getMetadata(function(err, metadata, apiResponse) {}); * * //- - * // If the callback is omitted, we'll return a Promise. + * // Get the HmacKey's metadata and populate to the metadata property. * //- - * file.getMetadata().then(function(data) { - * const metadata = data[0]; - * const apiResponse = data[1]; - * }); + * storage.hmacKey('ACCESS_ID') + * .getMetadata((err, hmacKeyMetadata) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * console.log(hmacKeyMetadata); + * }); * + * //- + * // If the callback is omitted, a promise is returned. + * //- + * storage.hmacKey('ACCESS_ID') + * .getMetadata() + * .then((data) => { + * const hmacKeyMetadata = data[0]; + * console.log(hmacKeyMetadata); + * }); * ``` - * @example include:samples/files.js - * region_tag:storage_get_metadata - * Another example: */ - getMetadata: { - reqOpts: { - qs: requestQueryObject, - }, - }, + getMetadata: true, /** - * @typedef {object} SetFileMetadataOptions Configuration options for File#setMetadata(). - * @param {string} [userProject] The ID of the project which will be billed for the request. + * @typedef {object} SetHmacKeyMetadata Subset of {@link HmacKeyMetadata} to update. + * @property {string} state New state of the HmacKey. Either 'ACTIVE' or 'INACTIVE'. + * @property {string} [etag] Include an etag from a previous get HMAC key request + * to perform safe read-modify-write. */ /** - * @callback SetFileMetadataCallback + * @typedef {object} SetHmacKeyMetadataOptions + * @property {string} [userProject] This parameter is currently ignored. + */ + /** + * @callback HmacKeyMetadataCallback * @param {?Error} err Request error, if any. + * @param {HmacKeyMetadata} metadata The updated {@link HmacKeyMetadata} object. * @param {object} apiResponse The full API response. */ /** - * @typedef {array} SetFileMetadataResponse - * @property {object} 0 The full API response. + * @typedef {array} HmacKeyMetadataResponse + * @property {HmacKeyMetadata} 0 The updated {@link HmacKeyMetadata} object. + * @property {object} 1 The full API response. */ /** - * Merge the given metadata with the current remote file's metadata. This - * will set metadata if it was previously unset or update previously set - * metadata. To unset previously set metadata, set its value to null. - * - * You can set custom key/value pairs in the metadata key of the given - * object, however the other properties outside of this object must adhere - * to the {@link https://goo.gl/BOnnCK| official API documentation}. - * - * - * See the examples below for more information. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} + * Updates the state of an HMAC key. See {@link SetHmacKeyMetadata} for + * valid states. * - * @method File#setMetadata - * @param {object} [metadata] The metadata you wish to update. - * @param {SetFileMetadataOptions} [options] Configuration options. - * @param {SetFileMetadataCallback} [callback] Callback function. - * @returns {Promise} + * @method HmacKey#setMetadata + * @param {SetHmacKeyMetadata} metadata The new metadata. + * @param {SetHmacKeyMetadataOptions} [options] Configuration options. + * @param {HmacKeyMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); * * const metadata = { - * contentType: 'application/x-font-ttf', - * metadata: { - * my: 'custom', - * properties: 'go here' - * } + * state: 'INACTIVE', * }; * - * file.setMetadata(metadata, function(err, apiResponse) {}); - * - * // Assuming current metadata = { hello: 'world', unsetMe: 'will do' } - * file.setMetadata({ - * metadata: { - * abc: '123', // will be set. - * unsetMe: null, // will be unset (deleted). - * hello: 'goodbye' // will be updated from 'world' to 'goodbye'. - * } - * }, function(err, apiResponse) { - * // metadata should now be { abc: '123', hello: 'goodbye' } - * }); - * - * //- - * // Set a temporary hold on this file from its bucket's retention period - * // configuration. - * // - * file.setMetadata({ - * temporaryHold: true - * }, function(err, apiResponse) {}); - * - * //- - * // Alternatively, you may set a temporary hold. This will follow the - * // same behavior as an event-based hold, with the exception that the - * // bucket's retention policy will not renew for this file from the time - * // the hold is released. - * //- - * file.setMetadata({ - * eventBasedHold: true - * }, function(err, apiResponse) {}); + * storage.hmacKey('ACCESS_ID') + * .setMetadata(metadata, (err, hmacKeyMetadata) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * console.log(hmacKeyMetadata); + * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // If the callback is omitted, a promise is returned. * //- - * file.setMetadata(metadata).then(function(data) { - * const apiResponse = data[0]; - * }); + * storage.hmacKey('ACCESS_ID') + * .setMetadata(metadata) + * .then((data) => { + * const hmacKeyMetadata = data[0]; + * console.log(hmacKeyMetadata); + * }); * ``` */ setMetadata: { reqOpts: { - qs: requestQueryObject, + method: 'PUT', }, }, }; + const projectId = (options && options.projectId) || storage.projectId; super({ - parent: bucket, - baseUrl: '/o', - id: encodeURIComponent(name), + parent: storage, + id: accessId, + baseUrl: `/projects/${projectId}/hmacKeys`, methods, }); - _File_instances.add(this); - this.bucket = bucket; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this.storage = bucket.parent; - // @TODO Can this duplicate code from above be avoided? - if (options.generation !== null) { - let generation; - if (typeof options.generation === 'string') { - generation = Number(options.generation); - } - else { - generation = options.generation; - } - if (!isNaN(generation)) { - this.generation = generation; - } - } - this.kmsKeyName = options.kmsKeyName; - this.userProject = userProject; - this.name = name; - if (options.encryptionKey) { - this.setEncryptionKey(options.encryptionKey); + this.storage = storage; + this.instanceRetryValue = storage.retryOptions.autoRetry; + } + setMetadata(metadata, optionsOrCallback, cb) { + // ETag preconditions are not currently supported. Retries should be disabled if the idempotency strategy is not set to RetryAlways + if (this.storage.retryOptions.idempotencyStrategy !== + storage_js_1.IdempotencyStrategy.RetryAlways) { + this.storage.retryOptions.autoRetry = false; } - this.acl = new acl_js_1.Acl({ - request: this.request.bind(this), - pathPrefix: '/acl', + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + super + .setMetadata(metadata, options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; }); - this.crc32cGenerator = - options.crc32cGenerator || this.bucket.crc32cGenerator; - this.instanceRetryValue = (_b = (_a = this.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry; - this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts; } - /** - * The object's Cloud Storage URI (`gs://`) - * - * @example - * ```ts - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('image.png'); - * - * // `gs://my-bucket/image.png` - * const href = file.cloudStorageURI.href; - * ``` - */ - get cloudStorageURI() { - const uri = this.bucket.cloudStorageURI; - uri.pathname = this.name; - return uri; +} +exports.HmacKey = HmacKey; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(HmacKey); + + +/***/ }), + +/***/ 80352: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Iam = exports.IAMExceptionMessages = void 0; +const promisify_1 = __nccwpck_require__(19203); +const util_js_1 = __nccwpck_require__(59258); +var IAMExceptionMessages; +(function (IAMExceptionMessages) { + IAMExceptionMessages["POLICY_OBJECT_REQUIRED"] = "A policy object is required."; + IAMExceptionMessages["PERMISSIONS_REQUIRED"] = "Permissions are required."; +})(IAMExceptionMessages || (exports.IAMExceptionMessages = IAMExceptionMessages = {})); +/** + * Get and set IAM policies for your Cloud Storage bucket. + * + * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} + * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} + * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} + * + * @constructor Iam + * + * @param {Bucket} bucket The parent instance. + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * // bucket.iam + * ``` + */ +class Iam { + constructor(bucket) { + this.request_ = bucket.request.bind(bucket); + this.resourceId_ = 'buckets/' + bucket.getId(); } /** - * A helper method for determining if a request should be retried based on preconditions. - * This should only be used for methods where the idempotency is determined by - * `ifGenerationMatch` - * @private - * - * A request should not be retried under the following conditions: - * - if precondition option `ifGenerationMatch` is not set OR - * - if `idempotencyStrategy` is set to `RetryNever` + * @typedef {object} GetPolicyOptions Requested options for IAM#getPolicy(). + * @property {number} [requestedPolicyVersion] The version of IAM policies to + * request. If a policy with a condition is requested without setting + * this, the server will return an error. This must be set to a value + * of 3 to retrieve IAM policies containing conditions. This is to + * prevent client code that isn't aware of IAM conditions from + * interpreting and modifying policies incorrectly. The service might + * return a policy with version lower than the one that was requested, + * based on the feature syntax in the policy fetched. + * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} + * @property {string} [userProject] The ID of the project which will be + * billed for the request. */ - shouldRetryBasedOnPreconditionAndIdempotencyStrat(options) { - var _a; - return !(((options === null || options === void 0 ? void 0 : options.ifGenerationMatch) === undefined && - ((_a = this.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever); - } /** - * @typedef {array} CopyResponse - * @property {File} 0 The copied {@link File}. + * @typedef {array} GetPolicyResponse + * @property {Policy} 0 The policy. * @property {object} 1 The full API response. */ /** - * @callback CopyCallback - * @param {?Error} err Request error, if any. - * @param {File} copiedFile The copied {@link File}. - * @param {object} apiResponse The full API response. + * @typedef {object} Policy + * @property {PolicyBinding[]} policy.bindings Bindings associate members with roles. + * @property {string} [policy.etag] Etags are used to perform a read-modify-write. + * @property {number} [policy.version] The syntax schema version of the Policy. + * To set an IAM policy with conditional binding, this field must be set to + * 3 or greater. + * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} */ /** - * @typedef {object} CopyOptions Configuration options for File#copy(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @property {string} [cacheControl] The cacheControl setting for the new file. - * @property {string} [contentEncoding] The contentEncoding setting for the new file. - * @property {string} [contentType] The contentType setting for the new file. - * @property {string} [destinationKmsKeyName] Resource name of the Cloud - * KMS key, of the form - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, - * that will be used to encrypt the object. Overwrites the object - * metadata's `kms_key_name` value, if any. - * @property {Metadata} [metadata] Metadata to specify on the copied file. - * @property {string} [predefinedAcl] Set the ACL for the new file. - * @property {string} [token] A previously-returned `rewriteToken` from an - * unfinished rewrite request. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * @typedef {object} PolicyBinding + * @property {string} role Role that is assigned to members. + * @property {string[]} members Specifies the identities requesting access for the bucket. + * @property {Expr} [condition] The condition that is associated with this binding. */ /** - * Copy this file to another file. By default, this will copy the file to the - * same bucket, but you can choose to copy it to another Bucket by providing - * a Bucket or File object or a URL starting with "gs://". - * The generation of the file will not be preserved. + * @typedef {object} Expr + * @property {string} [title] An optional title for the expression, i.e. a + * short string describing its purpose. This can be used e.g. in UIs + * which allow to enter the expression. + * @property {string} [description] An optional description of the + * expression. This is a longer text which describes the expression, + * e.g. when hovered over it in a UI. + * @property {string} expression Textual representation of an expression in + * Common Expression Language syntax. The application context of the + * containing message determines which well-known feature set of CEL + * is supported.The condition that is associated with this binding. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite| Objects: rewrite API Documentation} + * @see [Condition] https://cloud.google.com/storage/docs/access-control/iam#conditions + */ + /** + * Get the IAM policy. * - * @throws {Error} If the destination file is not provided. + * @param {GetPolicyOptions} [options] Request options. + * @param {GetPolicyCallback} [callback] Callback function. + * @returns {Promise} * - * @param {string|Bucket|File} destination Destination file. - * @param {CopyOptions} [options] Configuration options. See an - * @param {CopyCallback} [callback] Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/getIamPolicy| Buckets: setIamPolicy API Documentation} * * @example * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // You can pass in a variety of types for the destination. - * // - * // For all of the below examples, assume we are working with the following - * // Bucket and File objects. - * //- - * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('my-image.png'); - * - * //- - * // If you pass in a string for the destination, the file is copied to its - * // current bucket, under the new name provided. - * //- - * file.copy('my-image-copy.png', function(err, copiedFile, apiResponse) { - * // `my-bucket` now contains: - * // - "my-image.png" - * // - "my-image-copy.png" - * - * // `copiedFile` is an instance of a File object that refers to your new - * // file. - * }); - * - * //- - * // If you pass in a string starting with "gs://" for the destination, the - * // file is copied to the other bucket and under the new name provided. - * //- - * const newLocation = 'gs://another-bucket/my-image-copy.png'; - * file.copy(newLocation, function(err, copiedFile, apiResponse) { - * // `my-bucket` still contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image-copy.png" - * - * // `copiedFile` is an instance of a File object that refers to your new - * // file. - * }); - * - * //- - * // If you pass in a Bucket object, the file will be copied to that bucket - * // using the same name. - * //- - * const anotherBucket = storage.bucket('another-bucket'); - * file.copy(anotherBucket, function(err, copiedFile, apiResponse) { - * // `my-bucket` still contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image.png" - * - * // `copiedFile` is an instance of a File object that refers to your new - * // file. - * }); - * - * //- - * // If you pass in a File object, you have complete control over the new - * // bucket and filename. - * //- - * const anotherFile = anotherBucket.file('my-awesome-image.png'); - * file.copy(anotherFile, function(err, copiedFile, apiResponse) { - * // `my-bucket` still contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-awesome-image.png" - * - * // Note: - * // The `copiedFile` parameter is equal to `anotherFile`. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.copy(newLocation).then(function(data) { - * const newFile = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/files.js - * region_tag:storage_copy_file - * Another example: - */ - copy(destination, optionsOrCallback, callback) { - var _a, _b; - const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME); - if (!destination) { - throw noDestinationError; - } - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = { ...optionsOrCallback }; - } - callback = callback || index_js_1.util.noop; - let destBucket; - let destName; - let newFile; - if (typeof destination === 'string') { - const parsedDestination = GS_URL_REGEXP.exec(destination); - if (parsedDestination !== null && parsedDestination.length === 3) { - destBucket = this.storage.bucket(parsedDestination[1]); - destName = parsedDestination[2]; - } - else { - destBucket = this.bucket; - destName = destination; - } - } - else if (destination instanceof bucket_js_1.Bucket) { - destBucket = destination; - destName = this.name; - } - else if (destination instanceof File) { - destBucket = destination.bucket; - destName = destination.name; - newFile = destination; - } - else { - throw noDestinationError; - } - const query = {}; - if (this.generation !== undefined) { - query.sourceGeneration = this.generation; - } - if (options.token !== undefined) { - query.rewriteToken = options.token; - } - if (options.userProject !== undefined) { - query.userProject = options.userProject; - delete options.userProject; - } - if (options.predefinedAcl !== undefined) { - query.destinationPredefinedAcl = options.predefinedAcl; - delete options.predefinedAcl; - } - newFile = newFile || destBucket.file(destName); - const headers = {}; - if (this.encryptionKey !== undefined) { - headers['x-goog-copy-source-encryption-algorithm'] = 'AES256'; - headers['x-goog-copy-source-encryption-key'] = this.encryptionKeyBase64; - headers['x-goog-copy-source-encryption-key-sha256'] = - this.encryptionKeyHash; - } - if (newFile.encryptionKey !== undefined) { - this.setEncryptionKey(newFile.encryptionKey); - } - else if (options.destinationKmsKeyName !== undefined) { - query.destinationKmsKeyName = options.destinationKmsKeyName; - delete options.destinationKmsKeyName; - } - else if (newFile.kmsKeyName !== undefined) { - query.destinationKmsKeyName = newFile.kmsKeyName; - } - if (query.destinationKmsKeyName) { - this.kmsKeyName = query.destinationKmsKeyName; - const keyIndex = this.interceptors.indexOf(this.encryptionKeyInterceptor); - if (keyIndex > -1) { - this.interceptors.splice(keyIndex, 1); - } - } - if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { - this.storage.retryOptions.autoRetry = false; - } - if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) { - query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch; - delete options.preconditionOpts; - } - this.request({ - method: 'POST', - uri: `/rewriteTo/b/${destBucket.name}/o/${encodeURIComponent(newFile.name)}`, - qs: query, - json: options, - headers, - }, (err, resp) => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - if (err) { - callback(err, null, resp); - return; - } - if (resp.rewriteToken) { - const options = { - token: resp.rewriteToken, - }; - if (query.userProject) { - options.userProject = query.userProject; - } - if (query.destinationKmsKeyName) { - options.destinationKmsKeyName = query.destinationKmsKeyName; - } - this.copy(newFile, options, callback); - return; - } - callback(null, newFile, resp); - }); - } - /** - * @typedef {object} CreateReadStreamOptions Configuration options for File#createReadStream. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string|boolean} [validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with a - * CRC32c checksum. You may use MD5 if preferred, but that hash is not - * supported for composite objects. An error will be raised if MD5 is - * specified but is not available. You may also choose to skip validation - * completely, however this is **not recommended**. - * @property {number} [start] A byte offset to begin the file's download - * from. Default is 0. NOTE: Byte ranges are inclusive; that is, - * `options.start = 0` and `options.end = 999` represent the first 1000 - * bytes in a file or object. NOTE: when specifying a byte range, data - * integrity is not available. - * @property {number} [end] A byte offset to stop reading the file at. - * NOTE: Byte ranges are inclusive; that is, `options.start = 0` and - * `options.end = 999` represent the first 1000 bytes in a file or object. - * NOTE: when specifying a byte range, data integrity is not available. - * @property {boolean} [decompress=true] Disable auto decompression of the - * received data. By default this option is set to `true`. - * Applicable in cases where the data was uploaded with - * `gzip: true` option. See {@link File#createWriteStream}. + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * + * bucket.iam.getPolicy( + * {requestedPolicyVersion: 3}, + * function(err, policy, apiResponse) { + * + * }, + * ); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.iam.getPolicy({requestedPolicyVersion: 3}) + * .then(function(data) { + * const policy = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/iam.js + * region_tag:storage_view_bucket_iam_members + * Example of retrieving a bucket's IAM policy: */ + getPolicy(optionsOrCallback, callback) { + const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); + const qs = {}; + if (options.userProject) { + qs.userProject = options.userProject; + } + if (options.requestedPolicyVersion !== null && + options.requestedPolicyVersion !== undefined) { + qs.optionsRequestedPolicyVersion = options.requestedPolicyVersion; + } + this.request_({ + uri: '/iam', + qs, + }, cb); + } /** - * Create a readable stream to read the contents of the remote file. It can be - * piped to a writable stream or listened to for 'data' events to read a - * file's contents. + * Set the IAM policy. * - * In the unlikely event there is a mismatch between what you downloaded and - * the version in your Bucket, your error handler will receive an error with - * code "CONTENT_DOWNLOAD_MISMATCH". If you receive this error, the best - * recourse is to try downloading the file again. + * @throws {Error} If no policy is provided. * - * NOTE: Readable streams will emit the `end` event when the file is fully - * downloaded. + * @param {Policy} policy The policy. + * @param {SetPolicyOptions} [options] Configuration options. + * @param {SetPolicyCallback} callback Callback function. + * @returns {Promise} * - * @param {CreateReadStreamOptions} [options] Configuration options. - * @returns {ReadableStream} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy| Buckets: setIamPolicy API Documentation} + * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} * * @example * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * + * const myPolicy = { + * bindings: [ + * { + * role: 'roles/storage.admin', + * members: + * ['serviceAccount:myotherproject@appspot.gserviceaccount.com'] + * } + * ] + * }; + * + * bucket.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {}); + * * //- - * //

Downloading a File

- * // - * // The example below demonstrates how we can reference a remote file, then - * // pipe its contents to a local file. This is effectively creating a local - * // backup of your remote data. + * // If the callback is omitted, we'll return a Promise. * //- + * bucket.iam.setPolicy(myPolicy).then(function(data) { + * const policy = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/iam.js + * region_tag:storage_add_bucket_iam_member + * Example of adding to a bucket's IAM policy: + * + * @example include:samples/iam.js + * region_tag:storage_remove_bucket_iam_member + * Example of removing from a bucket's IAM policy: + */ + setPolicy(policy, optionsOrCallback, callback) { + if (policy === null || typeof policy !== 'object') { + throw new Error(IAMExceptionMessages.POLICY_OBJECT_REQUIRED); + } + const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); + let maxRetries; + if (policy.etag === undefined) { + maxRetries = 0; + } + this.request_({ + method: 'PUT', + uri: '/iam', + maxRetries, + json: Object.assign({ + resourceId: this.resourceId_, + }, policy), + qs: options, + }, cb); + } + /** + * Test a set of permissions for a resource. + * + * @throws {Error} If permissions are not provided. + * + * @param {string|string[]} permissions The permission(s) to test for. + * @param {TestIamPermissionsOptions} [options] Configuration object. + * @param {TestIamPermissionsCallback} [callback] Callback function. + * @returns {Promise} + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/testIamPermissions| Buckets: testIamPermissions API Documentation} + * + * @example + * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); * const bucket = storage.bucket('my-bucket'); * - * const fs = require('fs'); - * const remoteFile = bucket.file('image.png'); - * const localFilename = '/Users/stephen/Photos/image.png'; + * //- + * // Test a single permission. + * //- + * const test = 'storage.buckets.delete'; * - * remoteFile.createReadStream() - * .on('error', function(err) {}) - * .on('response', function(response) { - * // Server connected and responded with the specified status and headers. - * }) - * .on('end', function() { - * // The file is fully downloaded. - * }) - * .pipe(fs.createWriteStream(localFilename)); + * bucket.iam.testPermissions(test, function(err, permissions, apiResponse) { + * console.log(permissions); + * // { + * // "storage.buckets.delete": true + * // } + * }); * * //- - * // To limit the downloaded data to only a byte range, pass an options - * // object. + * // Test several permissions at once. * //- - * const logFile = myBucket.file('access_log'); - * logFile.createReadStream({ - * start: 10000, - * end: 20000 - * }) - * .on('error', function(err) {}) - * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); + * const tests = [ + * 'storage.buckets.delete', + * 'storage.buckets.get' + * ]; + * + * bucket.iam.testPermissions(tests, function(err, permissions) { + * console.log(permissions); + * // { + * // "storage.buckets.delete": false, + * // "storage.buckets.get": true + * // } + * }); * * //- - * // To read a tail byte range, specify only `options.end` as a negative - * // number. + * // If the callback is omitted, we'll return a Promise. * //- - * const logFile = myBucket.file('access_log'); - * logFile.createReadStream({ - * end: -100 - * }) - * .on('error', function(err) {}) - * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); + * bucket.iam.testPermissions(test).then(function(data) { + * const permissions = data[0]; + * const apiResponse = data[1]; + * }); * ``` */ - createReadStream(options = {}) { - options = Object.assign({ decompress: true }, options); - const rangeRequest = typeof options.start === 'number' || typeof options.end === 'number'; - const tailRequest = options.end < 0; - let validateStream = undefined; - let request = undefined; - const throughStream = new util_js_2.PassThroughShim(); - let crc32c = true; - let md5 = false; - if (typeof options.validation === 'string') { - const value = options.validation.toLowerCase().trim(); - crc32c = value === 'crc32c'; - md5 = value === 'md5'; + testPermissions(permissions, optionsOrCallback, callback) { + if (!Array.isArray(permissions) && typeof permissions !== 'string') { + throw new Error(IAMExceptionMessages.PERMISSIONS_REQUIRED); } - else if (options.validation === false) { - crc32c = false; + const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); + const permissionsArray = Array.isArray(permissions) + ? permissions + : [permissions]; + const req = Object.assign({ + permissions: permissionsArray, + }, options); + this.request_({ + uri: '/iam/testPermissions', + qs: req, + useQuerystring: true, + }, (err, resp) => { + if (err) { + cb(err, null, resp); + return; + } + const availablePermissions = Array.isArray(resp.permissions) + ? resp.permissions + : []; + const permissionsHash = permissionsArray.reduce((acc, permission) => { + acc[permission] = availablePermissions.indexOf(permission) > -1; + return acc; + }, {}); + cb(null, permissionsHash, resp); + }); + } +} +exports.Iam = Iam; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Iam); + + +/***/ }), + +/***/ 27577: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Notification = exports.Iam = exports.HmacKey = exports.File = exports.Channel = exports.Bucket = exports.Storage = exports.RETRYABLE_ERR_FN_DEFAULT = exports.IdempotencyStrategy = exports.ApiError = void 0; +/** + * The `@google-cloud/storage` package has a single named export which is the + * {@link Storage} (ES6) class, which should be instantiated with `new`. + * + * See {@link Storage} and {@link ClientConfig} for client methods and + * configuration options. + * + * @module {Storage} @google-cloud/storage + * @alias nodejs-storage + * + * @example + * Install the client library with npm: + * ``` + * npm install --save @google-cloud/storage + * ``` + * + * @example + * Import the client library + * ``` + * const {Storage} = require('@google-cloud/storage'); + * ``` + * + * @example + * Create a client that uses Application + * Default Credentials (ADC): + * ``` + * const storage = new Storage(); + * ``` + * + * @example + * Create a client with explicit + * credentials: + * ``` + * const storage = new Storage({ projectId: + * 'your-project-id', keyFilename: '/path/to/keyfile.json' + * }); + * ``` + * + * @example include:samples/quickstart.js + * region_tag:storage_quickstart + * Full quickstart example: + */ +var index_js_1 = __nccwpck_require__(4052); +Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return index_js_1.ApiError; } })); +var storage_js_1 = __nccwpck_require__(33030); +Object.defineProperty(exports, "IdempotencyStrategy", ({ enumerable: true, get: function () { return storage_js_1.IdempotencyStrategy; } })); +Object.defineProperty(exports, "RETRYABLE_ERR_FN_DEFAULT", ({ enumerable: true, get: function () { return storage_js_1.RETRYABLE_ERR_FN_DEFAULT; } })); +Object.defineProperty(exports, "Storage", ({ enumerable: true, get: function () { return storage_js_1.Storage; } })); +var bucket_js_1 = __nccwpck_require__(23973); +Object.defineProperty(exports, "Bucket", ({ enumerable: true, get: function () { return bucket_js_1.Bucket; } })); +__exportStar(__nccwpck_require__(55810), exports); +var channel_js_1 = __nccwpck_require__(62665); +Object.defineProperty(exports, "Channel", ({ enumerable: true, get: function () { return channel_js_1.Channel; } })); +var file_js_1 = __nccwpck_require__(4713); +Object.defineProperty(exports, "File", ({ enumerable: true, get: function () { return file_js_1.File; } })); +__exportStar(__nccwpck_require__(40725), exports); +var hmacKey_js_1 = __nccwpck_require__(64654); +Object.defineProperty(exports, "HmacKey", ({ enumerable: true, get: function () { return hmacKey_js_1.HmacKey; } })); +var iam_js_1 = __nccwpck_require__(80352); +Object.defineProperty(exports, "Iam", ({ enumerable: true, get: function () { return iam_js_1.Iam; } })); +var notification_js_1 = __nccwpck_require__(21178); +Object.defineProperty(exports, "Notification", ({ enumerable: true, get: function () { return notification_js_1.Notification; } })); +__exportStar(__nccwpck_require__(45594), exports); + + +/***/ }), + +/***/ 4052: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.util = exports.ApiError = exports.ServiceObject = exports.Service = void 0; +var service_js_1 = __nccwpck_require__(17370); +Object.defineProperty(exports, "Service", ({ enumerable: true, get: function () { return service_js_1.Service; } })); +var service_object_js_1 = __nccwpck_require__(73409); +Object.defineProperty(exports, "ServiceObject", ({ enumerable: true, get: function () { return service_object_js_1.ServiceObject; } })); +var util_js_1 = __nccwpck_require__(38064); +Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return util_js_1.ApiError; } })); +Object.defineProperty(exports, "util", ({ enumerable: true, get: function () { return util_js_1.util; } })); + + +/***/ }), + +/***/ 73409: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceObject = void 0; +/*! + * Copyright 2022 Google LLC. All Rights Reserved. + * + * 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. + */ +const promisify_1 = __nccwpck_require__(19203); +const events_1 = __nccwpck_require__(82361); +const util_js_1 = __nccwpck_require__(38064); +/** + * ServiceObject is a base class, meant to be inherited from by a "service + * object," like a BigQuery dataset or Storage bucket. + * + * Most of the time, these objects share common functionality; they can be + * created or deleted, and you can get or set their metadata. + * + * By inheriting from this class, a service object will be extended with these + * shared behaviors. Note that any method can be overridden when the service + * object requires specific behavior. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +class ServiceObject extends events_1.EventEmitter { + /* + * @constructor + * @alias module:common/service-object + * + * @private + * + * @param {object} config - Configuration object. + * @param {string} config.baseUrl - The base URL to make API requests to. + * @param {string} config.createMethod - The method which creates this object. + * @param {string=} config.id - The identifier of the object. For example, the + * name of a Storage bucket or Pub/Sub topic. + * @param {object=} config.methods - A map of each method name that should be inherited. + * @param {object} config.methods[].reqOpts - Default request options for this + * particular method. A common use case is when `setMetadata` requires a + * `PUT` method to override the default `PATCH`. + * @param {object} config.parent - The parent service instance. For example, an + * instance of Storage if the object is Bucket. + */ + constructor(config) { + super(); + this.metadata = {}; + this.baseUrl = config.baseUrl; + this.parent = config.parent; // Parent class. + this.id = config.id; // Name or ID (e.g. dataset ID, bucket name, etc). + this.createMethod = config.createMethod; + this.methods = config.methods || {}; + this.interceptors = []; + this.projectId = config.projectId; + if (config.methods) { + // This filters the ServiceObject instance (e.g. a "File") to only have + // the configured methods. We make a couple of exceptions for core- + // functionality ("request()" and "getRequestInterceptors()") + Object.getOwnPropertyNames(ServiceObject.prototype) + .filter(methodName => { + return ( + // All ServiceObjects need `request` and `getRequestInterceptors`. + // clang-format off + !/^request/.test(methodName) && + !/^getRequestInterceptors/.test(methodName) && + // clang-format on + // The ServiceObject didn't redefine the method. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this[methodName] === + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ServiceObject.prototype[methodName] && + // This method isn't wanted. + !config.methods[methodName]); + }) + .forEach(methodName => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this[methodName] = undefined; + }); } - const shouldRunValidation = !rangeRequest && (crc32c || md5); - if (rangeRequest) { - if (typeof options.validation === 'string' || - options.validation === true) { - throw new Error(FileExceptionMessages.INVALID_VALIDATION_FILE_RANGE); + } + create(optionsOrCallback, callback) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + const args = [this.id]; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + if (typeof optionsOrCallback === 'object') { + args.push(optionsOrCallback); + } + // Wrap the callback to return *this* instance of the object, not the + // newly-created one. + // tslint: disable-next-line no-any + function onCreate(...args) { + const [err, instance] = args; + if (!err) { + self.metadata = instance.metadata; + if (self.id && instance.metadata) { + self.id = instance.metadata.id; + } + args[1] = self; // replace the created `instance` with this one. } - // Range requests can't receive data integrity checks. - crc32c = false; - md5 = false; + callback(...args); } - const onComplete = (err) => { + args.push(onCreate); + // eslint-disable-next-line prefer-spread + this.createMethod.apply(null, args); + } + delete(optionsOrCallback, cb) { + var _a; + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const ignoreNotFound = options.ignoreNotFound; + delete options.ignoreNotFound; + const methodConfig = (typeof this.methods.delete === 'object' && this.methods.delete) || {}; + const reqOpts = { + method: 'DELETE', + uri: '', + ...methodConfig.reqOpts, + qs: { + ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, + ...options, + }, + }; + // The `request` method may have been overridden to hold any special + // behavior. Ensure we call the original `request` method. + ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { + if (err) { + if (err.code === 404 && ignoreNotFound) { + err = null; + } + } + callback(err, res); + }); + } + exists(optionsOrCallback, cb) { + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + this.get(options, err => { if (err) { - // There is an issue with node-fetch 2.x that if the stream errors the underlying socket connection is not closed. - // This causes a memory leak, so cleanup the sockets manually here by destroying the agent. - if (request === null || request === void 0 ? void 0 : request.agent) { - request.agent.destroy(); + if (err.code === 404) { + callback(null, false); } - throughStream.destroy(err); + else { + callback(err); + } + return; } - }; - // We listen to the response event from the request stream so that we - // can... - // - // 1) Intercept any data from going to the user if an error occurred. - // 2) Calculate the hashes from the http.IncomingMessage response - // stream, - // which will return the bytes from the source without decompressing - // gzip'd content. We then send it through decompressed, if - // applicable, to the user. - const onResponse = (err, _body, rawResponseStream) => { + callback(null, true); + }); + } + get(optionsOrCallback, cb) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + const [opts, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const options = Object.assign({}, opts); + const autoCreate = options.autoCreate && typeof this.create === 'function'; + delete options.autoCreate; + function onCreate(err, instance, apiResponse) { if (err) { - // Get error message from the body. - this.getBufferFromReadable(rawResponseStream).then(body => { - err.message = body.toString('utf8'); - throughStream.destroy(err); - }); + if (err.code === 409) { + self.get(options, callback); + return; + } + callback(err, null, apiResponse); return; } - request = rawResponseStream.request; - const headers = rawResponseStream.toJSON().headers; - const isCompressed = headers['content-encoding'] === 'gzip'; - const hashes = {}; - // The object is safe to validate if: - // 1. It was stored gzip and returned to us gzip OR - // 2. It was never stored as gzip - const safeToValidate = (headers['x-goog-stored-content-encoding'] === 'gzip' && - isCompressed) || - headers['x-goog-stored-content-encoding'] === 'identity'; - const transformStreams = []; - if (shouldRunValidation) { - // The x-goog-hash header should be set with a crc32c and md5 hash. - // ex: headers['x-goog-hash'] = 'crc32c=xxxx,md5=xxxx' - if (typeof headers['x-goog-hash'] === 'string') { - headers['x-goog-hash'] - .split(',') - .forEach((hashKeyValPair) => { - const delimiterIndex = hashKeyValPair.indexOf('='); - const hashType = hashKeyValPair.substring(0, delimiterIndex); - const hashValue = hashKeyValPair.substring(delimiterIndex + 1); - hashes[hashType] = hashValue; - }); + callback(null, instance, apiResponse); + } + this.getMetadata(options, (err, metadata) => { + if (err) { + if (err.code === 404 && autoCreate) { + const args = []; + if (Object.keys(options).length > 0) { + args.push(options); + } + args.push(onCreate); + self.create(...args); + return; } - validateStream = new hash_stream_validator_js_1.HashStreamValidator({ - crc32c, - md5, - crc32cGenerator: this.crc32cGenerator, - crc32cExpected: hashes.crc32c, - md5Expected: hashes.md5, - }); - } - if (md5 && !hashes.md5) { - const hashError = new RequestError(FileExceptionMessages.MD5_NOT_AVAILABLE); - hashError.code = 'MD5_NOT_AVAILABLE'; - throughStream.destroy(hashError); + callback(err, null, metadata); return; } - if (safeToValidate && shouldRunValidation && validateStream) { - transformStreams.push(validateStream); - } - if (isCompressed && options.decompress) { - transformStreams.push(zlib.createGunzip()); - } - (0, stream_1.pipeline)(rawResponseStream, ...transformStreams, throughStream, onComplete); - }; - // Authenticate the request, then pipe the remote API request to the stream - // returned to the user. - const makeRequest = () => { - const query = { alt: 'media' }; - if (this.generation) { - query.generation = this.generation; - } - if (options.userProject) { - query.userProject = options.userProject; - } - const headers = { - 'Accept-Encoding': 'gzip', - 'Cache-Control': 'no-store', - }; - if (rangeRequest) { - const start = typeof options.start === 'number' ? options.start : '0'; - const end = typeof options.end === 'number' ? options.end : ''; - headers.Range = `bytes=${tailRequest ? end : `${start}-${end}`}`; - } - const reqOpts = { - uri: '', - headers, - qs: query, - }; - if (options[util_js_1.GCCL_GCS_CMD_KEY]) { - reqOpts[util_js_1.GCCL_GCS_CMD_KEY] = options[util_js_1.GCCL_GCS_CMD_KEY]; - } - this.requestStream(reqOpts) - .on('error', err => { - throughStream.destroy(err); - }) - .on('response', res => { - throughStream.emit('response', res); - index_js_1.util.handleResp(null, res, null, onResponse); - }) - .resume(); + callback(null, self, metadata); + }); + } + getMetadata(optionsOrCallback, cb) { + var _a; + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const methodConfig = (typeof this.methods.getMetadata === 'object' && + this.methods.getMetadata) || + {}; + const reqOpts = { + uri: '', + ...methodConfig.reqOpts, + qs: { + ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, + ...options, + }, }; - throughStream.on('reading', makeRequest); - return throughStream; + // The `request` method may have been overridden to hold any special + // behavior. Ensure we call the original `request` method. + ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { + this.metadata = body; + callback(err, this.metadata, res); + }); } /** - * @callback CreateResumableUploadCallback - * @param {?Error} err Request error, if any. - * @param {string} uri The resumable upload's unique session URI. - */ - /** - * @typedef {array} CreateResumableUploadResponse - * @property {string} 0 The resumable upload's unique session URI. - */ - /** - * @typedef {object} CreateResumableUploadOptions - * @property {object} [metadata] Metadata to set on the file. - * @property {number} [offset] The starting byte of the upload stream for resuming an interrupted upload. - * @property {string} [origin] Origin header to set for the upload. - * @property {string} [predefinedAcl] Apply a predefined set of access - * controls to this object. - * - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. - * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. - * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. - * - * - **`private`** - Object owner gets `OWNER` access. - * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. - * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @property {boolean} [private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @property {boolean} [public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string} [chunkSize] Create a separate request per chunk. This - * value is in bytes and should be a multiple of 256 KiB (2^18). - * {@link https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload| We recommend using at least 8 MiB for the chunk size.} - */ - /** - * Create a unique resumable upload session URI. This is the first step when - * performing a resumable upload. - * - * See the {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} - * for more on how the entire process works. - * - *

Note

- * - * If you are just looking to perform a resumable upload without worrying - * about any of the details, see {@link File#createWriteStream}. Resumable - * uploads are performed by default. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} - * - * @param {CreateResumableUploadOptions} [options] Configuration options. - * @param {CreateResumableUploadCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * file.createResumableUpload(function(err, uri) { - * if (!err) { - * // `uri` can be used to PUT data to. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.createResumableUpload().then(function(data) { - * const uri = data[0]; - * }); - * ``` + * Return the user's custom request interceptors. */ - createResumableUpload(optionsOrCallback, callback) { + getRequestInterceptors() { + // Interceptors should be returned in the order they were assigned. + const localInterceptors = this.interceptors + .filter(interceptor => typeof interceptor.request === 'function') + .map(interceptor => interceptor.request); + return this.parent.getRequestInterceptors().concat(localInterceptors); + } + setMetadata(metadata, optionsOrCallback, cb) { var _a, _b; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const retryOptions = this.storage.retryOptions; - if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && - ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - retryOptions.autoRetry = false; + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const methodConfig = (typeof this.methods.setMetadata === 'object' && + this.methods.setMetadata) || + {}; + const reqOpts = { + method: 'PATCH', + uri: '', + ...methodConfig.reqOpts, + json: { + ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.json, + ...metadata, + }, + qs: { + ...(_b = methodConfig.reqOpts) === null || _b === void 0 ? void 0 : _b.qs, + ...options, + }, + }; + // The `request` method may have been overridden to hold any special + // behavior. Ensure we call the original `request` method. + ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { + this.metadata = body; + callback(err, this.metadata, res); + }); + } + request_(reqOpts, callback) { + reqOpts = { ...reqOpts }; + if (this.projectId) { + reqOpts.projectId = this.projectId; } - resumableUpload.createURI({ - authClient: this.storage.authClient, - apiEndpoint: this.storage.apiEndpoint, - bucket: this.bucket.name, - customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), - file: this.name, - generation: this.generation, - key: this.encryptionKey, - kmsKeyName: this.kmsKeyName, - metadata: options.metadata, - offset: options.offset, - origin: options.origin, - predefinedAcl: options.predefinedAcl, - private: options.private, - public: options.public, - userProject: options.userProject || this.userProject, - retryOptions: retryOptions, - params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, - universeDomain: this.bucket.storage.universeDomain, - [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], - }, callback); - this.storage.retryOptions.autoRetry = this.instanceRetryValue; + const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; + const uriComponents = [this.baseUrl, this.id || '', reqOpts.uri]; + if (isAbsoluteUrl) { + uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); + } + reqOpts.uri = uriComponents + .filter(x => x.trim()) // Limit to non-empty strings. + .map(uriComponent => { + const trimSlashesRegex = /^\/*|\/*$/g; + return uriComponent.replace(trimSlashesRegex, ''); + }) + .join('/'); + const childInterceptors = Array.isArray(reqOpts.interceptors_) + ? reqOpts.interceptors_ + : []; + const localInterceptors = [].slice.call(this.interceptors); + reqOpts.interceptors_ = childInterceptors.concat(localInterceptors); + if (reqOpts.shouldReturnStream) { + return this.parent.requestStream(reqOpts); + } + this.parent.request(reqOpts, callback); + } + request(reqOpts, callback) { + this.request_(reqOpts, callback); } /** - * @typedef {object} CreateWriteStreamOptions Configuration options for File#createWriteStream(). - * @property {string} [contentType] Alias for - * `options.metadata.contentType`. If set to `auto`, the file name is used - * to determine the contentType. - * @property {string|boolean} [gzip] If true, automatically gzip the file. - * If set to `auto`, the contentType is used to determine if the file - * should be gzipped. This will set `options.metadata.contentEncoding` to - * `gzip` if necessary. - * @property {object} [metadata] See the examples below or - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body} - * for more details. - * @property {number} [offset] The starting byte of the upload stream, for - * resuming an interrupted upload. Defaults to 0. - * @property {string} [predefinedAcl] Apply a predefined set of access - * controls to this object. - * - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. - * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. - * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. - * - * - **`private`** - Object owner gets `OWNER` access. - * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. + * Make an authenticated API request. * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @property {boolean} [private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @property {boolean} [public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @property {boolean} [resumable] Force a resumable upload. NOTE: When - * working with streams, the file format and size is unknown until it's - * completely consumed. Because of this, it's best for you to be explicit - * for what makes sense given your input. - * @property {number} [timeout=60000] Set the HTTP request timeout in - * milliseconds. This option is not available for resumable uploads. - * Default: `60000` - * @property {string} [uri] The URI for an already-created resumable - * upload. See {@link File#createResumableUpload}. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string|boolean} [validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with a - * CRC32c checksum. You may use MD5 if preferred, but that hash is not - * supported for composite objects. An error will be raised if MD5 is - * specified but is not available. You may also choose to skip validation - * completely, however this is **not recommended**. In addition to specifying - * validation type, providing `metadata.crc32c` or `metadata.md5Hash` will - * cause the server to perform validation in addition to client validation. - * NOTE: Validation is automatically skipped for objects that were - * uploaded using the `gzip` option and have already compressed content. + * @param {object} reqOpts - Request options that are passed to `request`. + * @param {string} reqOpts.uri - A URI relative to the baseUrl. */ - /** - * Create a writable stream to overwrite the contents of the file in your - * bucket. - * - * A File object can also be used to create files for the first time. - * - * Resumable uploads are automatically enabled and must be shut off explicitly - * by setting `options.resumable` to `false`. - * - * - *

- * There is some overhead when using a resumable upload that can cause - * noticeable performance degradation while uploading a series of small - * files. When uploading files less than 10MB, it is recommended that the - * resumable feature is disabled. - *

- * - * NOTE: Writable streams will emit the `finish` event when the file is fully - * uploaded. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload Upload Options (Simple or Resumable)} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert Objects: insert API Documentation} - * - * @param {CreateWriteStreamOptions} [options] Configuration options. - * @returns {WritableStream} - * - * @example - * ``` - * const fs = require('fs'); - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * //

Uploading a File

- * // - * // Now, consider a case where we want to upload a file to your bucket. You - * // have the option of using {@link Bucket#upload}, but that is just - * // a convenience method which will do the following. - * //- - * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') - * .pipe(file.createWriteStream()) - * .on('error', function(err) {}) - * .on('finish', function() { - * // The file upload is complete. - * }); - * - * //- - * //

Uploading a File with gzip compression

- * //- - * fs.createReadStream('/Users/stephen/site/index.html') - * .pipe(file.createWriteStream({ gzip: true })) - * .on('error', function(err) {}) - * .on('finish', function() { - * // The file upload is complete. - * }); - * - * //- - * // Downloading the file with `createReadStream` will automatically decode - * // the file. - * //- - * - * //- - * //

Uploading a File with Metadata

- * // - * // One last case you may run into is when you want to upload a file to your - * // bucket and set its metadata at the same time. Like above, you can use - * // {@link Bucket#upload} to do this, which is just a wrapper around - * // the following. - * //- - * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') - * .pipe(file.createWriteStream({ - * metadata: { - * contentType: 'image/jpeg', - * metadata: { - * custom: 'metadata' - * } - * } - * })) - * .on('error', function(err) {}) - * .on('finish', function() { - * // The file upload is complete. - * }); - * ``` + requestStream(reqOpts) { + const opts = { ...reqOpts, shouldReturnStream: true }; + return this.request_(opts); + } +} +exports.ServiceObject = ServiceObject; +(0, promisify_1.promisifyAll)(ServiceObject, { exclude: ['getRequestInterceptors'] }); + + +/***/ }), + +/***/ 17370: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Service = exports.DEFAULT_PROJECT_ID_TOKEN = void 0; +/*! + * Copyright 2022 Google LLC. All Rights Reserved. + * + * 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. + */ +const google_auth_library_1 = __nccwpck_require__(20810); +const uuid = __importStar(__nccwpck_require__(44458)); +const util_js_1 = __nccwpck_require__(38064); +const util_js_2 = __nccwpck_require__(59258); +exports.DEFAULT_PROJECT_ID_TOKEN = '{{projectId}}'; +class Service { + /** + * Service is a base class, meant to be inherited from by a "service," like + * BigQuery or Storage. * - * //- - * //

Continuing a Resumable Upload

- * // - * // One can capture a `uri` from a resumable upload to reuse later. - * // Additionally, for validation, one can also capture and pass `crc32c`. - * //- - * let uri: string | undefined = undefined; - * let resumeCRC32C: string | undefined = undefined; + * This handles making authenticated requests by exposing a `makeReq_` + * function. * - * fs.createWriteStream() - * .on('uri', link => {uri = link}) - * .on('crc32', crc32c => {resumeCRC32C = crc32c}); + * @constructor + * @alias module:common/service * - * // later... - * fs.createWriteStream({uri, resumeCRC32C}); + * @param {object} config - Configuration object. + * @param {string} config.baseUrl - The base URL to make API requests to. + * @param {string[]} config.scopes - The scopes required for the request. + * @param {object=} options - [Configuration object](#/docs). */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - createWriteStream(options = {}) { - var _a; - (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); - if (options.contentType) { - options.metadata.contentType = options.contentType; - } - if (!options.metadata.contentType || - options.metadata.contentType === 'auto') { - const detectedContentType = mime_1.default.getType(this.name); - if (detectedContentType) { - options.metadata.contentType = detectedContentType; - } - } - let gzip = options.gzip; - if (gzip === 'auto') { - gzip = COMPRESSIBLE_MIME_REGEX.test(options.metadata.contentType || ''); - } - if (gzip) { - options.metadata.contentEncoding = 'gzip'; + constructor(config, options = {}) { + this.baseUrl = config.baseUrl; + this.apiEndpoint = config.apiEndpoint; + this.timeout = options.timeout; + this.globalInterceptors = Array.isArray(options.interceptors_) + ? options.interceptors_ + : []; + this.interceptors = []; + this.packageJson = config.packageJson; + this.projectId = options.projectId || exports.DEFAULT_PROJECT_ID_TOKEN; + this.projectIdRequired = config.projectIdRequired !== false; + this.providedUserAgent = options.userAgent; + this.universeDomain = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; + this.customEndpoint = config.customEndpoint || false; + this.useAuthWithCustomEndpoint = config.useAuthWithCustomEndpoint; + this.makeAuthenticatedRequest = util_js_1.util.makeAuthenticatedRequestFactory({ + ...config, + projectIdRequired: this.projectIdRequired, + projectId: this.projectId, + authClient: options.authClient || config.authClient, + credentials: options.credentials, + keyFile: options.keyFilename, + email: options.email, + clientOptions: { + universeDomain: options.universeDomain, + ...options.clientOptions, + }, + }); + this.authClient = this.makeAuthenticatedRequest.authClient; + const isCloudFunctionEnv = !!process.env.FUNCTION_NAME; + if (isCloudFunctionEnv) { + this.interceptors.push({ + request(reqOpts) { + reqOpts.forever = false; + return reqOpts; + }, + }); } - let crc32c = true; - let md5 = false; - if (typeof options.validation === 'string') { - options.validation = options.validation.toLowerCase(); - crc32c = options.validation === 'crc32c'; - md5 = options.validation === 'md5'; + } + /** + * Return the user's custom request interceptors. + */ + getRequestInterceptors() { + // Interceptors should be returned in the order they were assigned. + return [].slice + .call(this.globalInterceptors) + .concat(this.interceptors) + .filter(interceptor => typeof interceptor.request === 'function') + .map(interceptor => interceptor.request); + } + getProjectId(callback) { + if (!callback) { + return this.getProjectIdAsync(); } - else if (options.validation === false) { - crc32c = false; - md5 = false; + this.getProjectIdAsync().then(p => callback(null, p), callback); + } + async getProjectIdAsync() { + const projectId = await this.authClient.getProjectId(); + if (this.projectId === exports.DEFAULT_PROJECT_ID_TOKEN && projectId) { + this.projectId = projectId; } - if (options.offset) { - if (md5) { - throw new RangeError(FileExceptionMessages.MD5_RESUMED_UPLOAD); + return this.projectId; + } + request_(reqOpts, callback) { + reqOpts = { ...reqOpts, timeout: this.timeout }; + const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; + const uriComponents = [this.baseUrl]; + if (this.projectIdRequired) { + if (reqOpts.projectId) { + uriComponents.push('projects'); + uriComponents.push(reqOpts.projectId); } - if (crc32c && !options.isPartialUpload && !options.resumeCRC32C) { - throw new RangeError(FileExceptionMessages.MISSING_RESUME_CRC32C_FINAL_UPLOAD); + else { + uriComponents.push('projects'); + uriComponents.push(this.projectId); } } - /** - * A callback for determining when the underlying pipeline is complete. - * It's possible the pipeline callback could error before the write stream - * calls `final` so by default this will destroy the write stream unless the - * write stream sets this callback via its `final` handler. - * @param error An optional error - */ - let pipelineCallback = error => { - writeStream.destroy(error || undefined); - }; - // A stream for consumer to write to - const writeStream = new stream_1.Writable({ - final(cb) { - // Set the pipeline callback to this callback so the pipeline's results - // can be populated to the consumer - pipelineCallback = cb; - emitStream.end(); - }, - write(chunk, encoding, cb) { - emitStream.write(chunk, encoding, cb); - }, - }); - // If the write stream, which is returned to the caller, catches an error we need to make sure that - // at least one of the streams in the pipeline below gets notified so that they - // all get cleaned up / destroyed. - writeStream.once('error', e => { - emitStream.destroy(e); - }); - // If the write stream is closed, cleanup the pipeline below by calling destroy on one of the streams. - writeStream.once('close', () => { - emitStream.destroy(); - }); - const transformStreams = []; - if (gzip) { - transformStreams.push(zlib.createGzip()); - } - const emitStream = new util_js_2.PassThroughShim(); - let hashCalculatingStream = null; - if (crc32c || md5) { - const crc32cInstance = options.resumeCRC32C - ? crc32c_js_1.CRC32C.from(options.resumeCRC32C) - : undefined; - hashCalculatingStream = new hash_stream_validator_js_1.HashStreamValidator({ - crc32c, - crc32cInstance, - md5, - crc32cGenerator: this.crc32cGenerator, - updateHashesOnly: true, - }); - transformStreams.push(hashCalculatingStream); + uriComponents.push(reqOpts.uri); + if (isAbsoluteUrl) { + uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); } - const fileWriteStream = (0, duplexify_1.default)(); - let fileWriteStreamMetadataReceived = false; - // Handing off emitted events to users - emitStream.on('reading', () => writeStream.emit('reading')); - emitStream.on('writing', () => writeStream.emit('writing')); - fileWriteStream.on('uri', evt => writeStream.emit('uri', evt)); - fileWriteStream.on('progress', evt => writeStream.emit('progress', evt)); - fileWriteStream.on('response', resp => writeStream.emit('response', resp)); - fileWriteStream.once('metadata', () => { - fileWriteStreamMetadataReceived = true; - }); - writeStream.once('writing', () => { - if (options.resumable === false) { - this.startSimpleUpload_(fileWriteStream, options); - } - else { - this.startResumableUpload_(fileWriteStream, options); + reqOpts.uri = uriComponents + .map(uriComponent => { + const trimSlashesRegex = /^\/*|\/*$/g; + return uriComponent.replace(trimSlashesRegex, ''); + }) + .join('/') + // Some URIs have colon separators. + // Bad: https://.../projects/:list + // Good: https://.../projects:list + .replace(/\/:/g, ':'); + const requestInterceptors = this.getRequestInterceptors(); + const interceptorArray = Array.isArray(reqOpts.interceptors_) + ? reqOpts.interceptors_ + : []; + interceptorArray.forEach(interceptor => { + if (typeof interceptor.request === 'function') { + requestInterceptors.push(interceptor.request); } - (0, stream_1.pipeline)(emitStream, ...transformStreams, fileWriteStream, async (e) => { - if (e) { - return pipelineCallback(e); - } - // We want to make sure we've received the metadata from the server in order - // to properly validate the object's integrity. Depending on the type of upload, - // the stream could close before the response is returned. - if (!fileWriteStreamMetadataReceived) { - try { - await new Promise((resolve, reject) => { - fileWriteStream.once('metadata', resolve); - fileWriteStream.once('error', reject); - }); - } - catch (e) { - return pipelineCallback(e); - } - } - // Emit the local CRC32C value for future validation, if validation is enabled. - if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) { - writeStream.emit('crc32c', hashCalculatingStream.crc32c); - } - try { - // Metadata may not be ready if the upload is a partial upload, - // nothing to validate yet. - const metadataNotReady = options.isPartialUpload && !this.metadata; - if (hashCalculatingStream && !metadataNotReady) { - await __classPrivateFieldGet(this, _File_instances, "m", _File_validateIntegrity).call(this, hashCalculatingStream, { - crc32c, - md5, - }); - } - pipelineCallback(); - } - catch (e) { - pipelineCallback(e); - } - }); }); - return writeStream; - } - delete(optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.disableAutoRetryConditionallyIdempotent_(this.methods.delete, bucket_js_1.AvailableServiceObjectMethods.delete, options); - super - .delete(options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; + requestInterceptors.forEach(requestInterceptor => { + reqOpts = requestInterceptor(reqOpts); }); + delete reqOpts.interceptors_; + const pkg = this.packageJson; + let userAgent = (0, util_js_2.getUserAgentString)(); + if (this.providedUserAgent) { + userAgent = `${this.providedUserAgent} ${userAgent}`; + } + reqOpts.headers = { + ...reqOpts.headers, + 'User-Agent': userAgent, + 'x-goog-api-client': `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${pkg.version}-${(0, util_js_2.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, + }; + if (reqOpts[util_js_1.GCCL_GCS_CMD_KEY]) { + reqOpts.headers['x-goog-api-client'] += + ` gccl-gcs-cmd/${reqOpts[util_js_1.GCCL_GCS_CMD_KEY]}`; + } + if (reqOpts.shouldReturnStream) { + return this.makeAuthenticatedRequest(reqOpts); + } + else { + this.makeAuthenticatedRequest(reqOpts, callback); + } } /** - * @typedef {array} DownloadResponse - * @property [0] The contents of a File. - */ - /** - * @callback DownloadCallback - * @param err Request error, if any. - * @param contents The contents of a File. + * Make an authenticated API request. + * + * @param {object} reqOpts - Request options that are passed to `request`. + * @param {string} reqOpts.uri - A URI relative to the baseUrl. + * @param {function} callback - The callback function passed to `request`. */ + request(reqOpts, callback) { + Service.prototype.request_.call(this, reqOpts, callback); + } /** - * Convenience method to download a file into memory or to a local - * destination. - * - * @param {object} [options] Configuration options. The arguments match those - * passed to {@link File#createReadStream}. - * @param {string} [options.destination] Local file path to write the file's - * contents to. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {DownloadCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Download a file into memory. The contents will be available as the - * second - * // argument in the demonstration below, `contents`. - * //- - * file.download(function(err, contents) {}); - * - * //- - * // Download a file to a local destination. - * //- - * file.download({ - * destination: '/Users/me/Desktop/file-backup.txt' - * }, function(err) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.download().then(function(data) { - * const contents = data[0]; - * }); + * Make an authenticated API request. * - * ``` - * @example include:samples/files.js - * region_tag:storage_download_file - * Another example: + * @param {object} reqOpts - Request options that are passed to `request`. + * @param {string} reqOpts.uri - A URI relative to the baseUrl. + */ + requestStream(reqOpts) { + const opts = { ...reqOpts, shouldReturnStream: true }; + return Service.prototype.request_.call(this, opts); + } +} +exports.Service = Service; + + +/***/ }), + +/***/ 38064: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/*! + * Copyright 2022 Google LLC. All Rights Reserved. + * + * 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. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.util = exports.Util = exports.PartialFailureError = exports.ApiError = exports.GCCL_GCS_CMD_KEY = void 0; +/*! + * @module common/util + */ +const projectify_1 = __nccwpck_require__(3497); +const htmlEntities = __importStar(__nccwpck_require__(1263)); +const google_auth_library_1 = __nccwpck_require__(20810); +const retry_request_1 = __importDefault(__nccwpck_require__(63515)); +const stream_1 = __nccwpck_require__(12781); +const teeny_request_1 = __nccwpck_require__(6886); +const uuid = __importStar(__nccwpck_require__(44458)); +const service_js_1 = __nccwpck_require__(17370); +const util_js_1 = __nccwpck_require__(59258); +const duplexify_1 = __importDefault(__nccwpck_require__(76599)); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const package_json_helper_cjs_1 = __nccwpck_require__(28568); +const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); +/** + * A unique symbol for providing a `gccl-gcs-cmd` value + * for the `X-Goog-API-Client` header. + * + * E.g. the `V` in `X-Goog-API-Client: gccl-gcs-cmd/V` + **/ +exports.GCCL_GCS_CMD_KEY = Symbol.for('GCCL_GCS_CMD'); +const requestDefaults = { + timeout: 60000, + gzip: true, + forever: true, + pool: { + maxSockets: Infinity, + }, +}; +/** + * Default behavior: Automatically retry retriable server errors. + * + * @const {boolean} + * @private + */ +const AUTO_RETRY_DEFAULT = true; +/** + * Default behavior: Only attempt to retry retriable errors 3 times. + * + * @const {number} + * @private + */ +const MAX_RETRY_DEFAULT = 3; +/** + * Custom error type for API errors. + * + * @param {object} errorBody - Error object. + */ +class ApiError extends Error { + constructor(errorBodyOrMessage) { + super(); + if (typeof errorBodyOrMessage !== 'object') { + this.message = errorBodyOrMessage || ''; + return; + } + const errorBody = errorBodyOrMessage; + this.code = errorBody.code; + this.errors = errorBody.errors; + this.response = errorBody.response; + try { + this.errors = JSON.parse(this.response.body).error.errors; + } + catch (e) { + this.errors = errorBody.errors; + } + this.message = ApiError.createMultiErrorMessage(errorBody, this.errors); + Error.captureStackTrace(this); + } + /** + * Pieces together an error message by combining all unique error messages + * returned from a single GoogleError * - * @example include:samples/encryption.js - * region_tag:storage_download_encrypted_file - * Example of downloading an encrypted file: + * @private * - * @example include:samples/requesterPays.js - * region_tag:storage_download_file_requester_pays - * Example of downloading a file where the requester pays: + * @param {GoogleErrorBody} err The original error. + * @param {GoogleInnerError[]} [errors] Inner errors, if any. + * @returns {string} */ - download(optionsOrCallback, cb) { - let options; - if (typeof optionsOrCallback === 'function') { - cb = optionsOrCallback; - options = {}; + static createMultiErrorMessage(err, errors) { + const messages = new Set(); + if (err.message) { + messages.add(err.message); } - else { - options = optionsOrCallback; + if (errors && errors.length) { + errors.forEach(({ message }) => messages.add(message)); } - let called = false; - const callback = ((...args) => { - if (!called) - cb(...args); - called = true; - }); - const destination = options.destination; - delete options.destination; - const fileStream = this.createReadStream(options); - let receivedData = false; - if (destination) { - fileStream - .on('error', callback) - .once('data', data => { - receivedData = true; - // We know that the file exists the server - now we can truncate/write to a file - const writable = fs.createWriteStream(destination); - writable.write(data); - fileStream - .pipe(writable) - .on('error', callback) - .on('finish', callback); - }) - .on('end', () => { - // In the case of an empty file no data will be received before the end event fires - if (!receivedData) { - const data = Buffer.alloc(0); - try { - fs.writeFileSync(destination, data); - callback(null, data); - } - catch (e) { - callback(e, data); - } - } - }); + else if (err.response && err.response.body) { + messages.add(htmlEntities.decode(err.response.body.toString())); } - else { - this.getBufferFromReadable(fileStream) - .then(contents => callback === null || callback === void 0 ? void 0 : callback(null, contents)) - .catch(callback); + else if (!err.message) { + messages.add('A failure occurred during this request.'); + } + let messageArr = Array.from(messages); + if (messageArr.length > 1) { + messageArr = messageArr.map((message, i) => ` ${i + 1}. ${message}`); + messageArr.unshift('Multiple errors occurred during the request. Please see the `errors` array for complete details.\n'); + messageArr.push('\n'); } + return messageArr.join('\n'); + } +} +exports.ApiError = ApiError; +/** + * Custom error type for partial errors returned from the API. + * + * @param {object} b - Error object. + */ +class PartialFailureError extends Error { + constructor(b) { + super(); + const errorObject = b; + this.errors = errorObject.errors; + this.name = 'PartialFailureError'; + this.response = errorObject.response; + this.message = ApiError.createMultiErrorMessage(errorObject, this.errors); + } +} +exports.PartialFailureError = PartialFailureError; +class Util { + constructor() { + this.ApiError = ApiError; + this.PartialFailureError = PartialFailureError; } /** - * The Storage API allows you to use a custom key for server-side encryption. - * - * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} - * - * @param {string|buffer} encryptionKey An AES-256 encryption key. - * @returns {File} + * No op. * * @example - * ``` - * const crypto = require('crypto'); - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const encryptionKey = crypto.randomBytes(32); - * - * const fileWithCustomEncryption = myBucket.file('my-file'); - * fileWithCustomEncryption.setEncryptionKey(encryptionKey); - * - * const fileWithoutCustomEncryption = myBucket.file('my-file'); - * - * fileWithCustomEncryption.save('data', function(err) { - * // Try to download with the File object that hasn't had - * // `setEncryptionKey()` called: - * fileWithoutCustomEncryption.download(function(err) { - * // We will receive an error: - * // err.message === 'Bad Request' - * - * // Try again with the File object we called `setEncryptionKey()` on: - * fileWithCustomEncryption.download(function(err, contents) { - * // contents.toString() === 'data' - * }); - * }); - * }); - * - * ``` - * @example include:samples/encryption.js - * region_tag:storage_upload_encrypted_file - * Example of uploading an encrypted file: - * - * @example include:samples/encryption.js - * region_tag:storage_download_encrypted_file - * Example of downloading an encrypted file: + * function doSomething(callback) { + * callback = callback || noop; + * } */ - setEncryptionKey(encryptionKey) { - this.encryptionKey = encryptionKey; - this.encryptionKeyBase64 = Buffer.from(encryptionKey).toString('base64'); - this.encryptionKeyHash = crypto - .createHash('sha256') - // eslint-disable-next-line @typescript-eslint/no-explicit-any - .update(this.encryptionKeyBase64, 'base64') - .digest('base64'); - this.encryptionKeyInterceptor = { - request: reqOpts => { - reqOpts.headers = reqOpts.headers || {}; - reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; - reqOpts.headers['x-goog-encryption-key'] = this.encryptionKeyBase64; - reqOpts.headers['x-goog-encryption-key-sha256'] = - this.encryptionKeyHash; - return reqOpts; - }, - }; - this.interceptors.push(this.encryptionKeyInterceptor); - return this; - } + noop() { } /** - * Gets a reference to a Cloud Storage {@link File} file from the provided URL in string format. - * @param {string} publicUrlOrGsUrl the URL as a string. Must be of the format gs://bucket/file - * or https://storage.googleapis.com/bucket/file. - * @param {Storage} storageInstance an instance of a Storage object. - * @param {FileOptions} [options] Configuration options - * @returns {File} + * Uniformly process an API response. + * + * @param {*} err - Error value. + * @param {*} resp - Response value. + * @param {*} body - Body value. + * @param {function} callback - The callback function. */ - static from(publicUrlOrGsUrl, storageInstance, options) { - const gsMatches = [...publicUrlOrGsUrl.matchAll(GS_UTIL_URL_REGEX)]; - const httpsMatches = [...publicUrlOrGsUrl.matchAll(HTTPS_PUBLIC_URL_REGEX)]; - if (gsMatches.length > 0) { - const bucket = new bucket_js_1.Bucket(storageInstance, gsMatches[0][2]); - return new File(bucket, gsMatches[0][3], options); - } - else if (httpsMatches.length > 0) { - const bucket = new bucket_js_1.Bucket(storageInstance, httpsMatches[0][3]); - return new File(bucket, httpsMatches[0][4], options); + handleResp(err, resp, body, callback) { + callback = callback || util.noop; + const parsedResp = { + err: err || null, + ...(resp && util.parseHttpRespMessage(resp)), + ...(body && util.parseHttpRespBody(body)), + }; + // Assign the parsed body to resp.body, even if { json: false } was passed + // as a request option. + // We assume that nobody uses the previously unparsed value of resp.body. + if (!parsedResp.err && resp && typeof parsedResp.body === 'object') { + parsedResp.resp.body = parsedResp.body; } - else { - throw new Error('URL string must be of format gs://bucket/file or https://storage.googleapis.com/bucket/file'); + if (parsedResp.err && resp) { + parsedResp.err.response = resp; } + callback(parsedResp.err, parsedResp.body, parsedResp.resp); } - get(optionsOrCallback, cb) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - super - .get(options) - .then(resp => cb(null, ...resp)) - .catch(cb); - } - /** - * @typedef {array} GetExpirationDateResponse - * @property {date} 0 A Date object representing the earliest time this file's - * retention policy will expire. - */ /** - * @callback GetExpirationDateCallback - * @param {?Error} err Request error, if any. - * @param {date} expirationDate A Date object representing the earliest time - * this file's retention policy will expire. + * Sniff an incoming HTTP response message for errors. + * + * @param {object} httpRespMessage - An incoming HTTP response message from `request`. + * @return {object} parsedHttpRespMessage - The parsed response. + * @param {?error} parsedHttpRespMessage.err - An error detected. + * @param {object} parsedHttpRespMessage.resp - The original response object. */ + parseHttpRespMessage(httpRespMessage) { + const parsedHttpRespMessage = { + resp: httpRespMessage, + }; + if (httpRespMessage.statusCode < 200 || httpRespMessage.statusCode > 299) { + // Unknown error. Format according to ApiError standard. + parsedHttpRespMessage.err = new ApiError({ + errors: new Array(), + code: httpRespMessage.statusCode, + message: httpRespMessage.statusMessage, + response: httpRespMessage, + }); + } + return parsedHttpRespMessage; + } /** - * If this bucket has a retention policy defined, use this method to get a - * Date object representing the earliest time this file will expire. - * - * @param {GetExpirationDateCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); + * Parse the response body from an HTTP request. * - * file.getExpirationDate(function(err, expirationDate) { - * // expirationDate is a Date object. - * }); - * ``` + * @param {object} body - The response body. + * @return {object} parsedHttpRespMessage - The parsed response. + * @param {?error} parsedHttpRespMessage.err - An error detected. + * @param {object} parsedHttpRespMessage.body - The original body value provided + * will try to be JSON.parse'd. If it's successful, the parsed value will + * be returned here, otherwise the original value and an error will be returned. */ - getExpirationDate(callback) { - this.getMetadata((err, metadata, apiResponse) => { - if (err) { - callback(err, null, apiResponse); - return; + parseHttpRespBody(body) { + const parsedHttpRespBody = { + body, + }; + if (typeof body === 'string') { + try { + parsedHttpRespBody.body = JSON.parse(body); } - if (!metadata.retentionExpirationTime) { - const error = new Error(FileExceptionMessages.EXPIRATION_TIME_NA); - callback(error, null, apiResponse); - return; + catch (err) { + parsedHttpRespBody.body = body; } - callback(null, new Date(metadata.retentionExpirationTime), apiResponse); - }); + } + if (parsedHttpRespBody.body && parsedHttpRespBody.body.error) { + // Error from JSON API. + parsedHttpRespBody.err = new ApiError(parsedHttpRespBody.body.error); + } + return parsedHttpRespBody; } /** - * @typedef {array} GenerateSignedPostPolicyV2Response - * @property {object} 0 The document policy. - */ - /** - * @callback GenerateSignedPostPolicyV2Callback - * @param {?Error} err Request error, if any. - * @param {object} policy The document policy. - */ - /** - * Get a signed policy document to allow a user to upload data with a POST - * request. - * - * In Google Cloud Platform environments, such as Cloud Functions and App - * Engine, you usually don't provide a `keyFilename` or `credentials` during - * instantiation. In those environments, we call the - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} - * to create a signed policy. That API requires either the - * `https://www.googleapis.com/auth/iam` or - * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are - * enabled. - * - * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-v2| POST Object with the V2 signing process} - * - * @throws {Error} If an expiration timestamp from the past is given. - * @throws {Error} If options.equals has an array with less or more than two - * members. - * @throws {Error} If options.startsWith has an array with less or more than two - * members. - * - * @param {object} options Configuration options. - * @param {array|array[]} [options.equals] Array of request parameters and - * their expected value (e.g. [['$', '']]). Values are - * translated into equality constraints in the conditions field of the - * policy document (e.g. ['eq', '$', '']). If only one - * equality condition is to be specified, options.equals can be a one- - * dimensional array (e.g. ['$', '']). - * @param {*} options.expires - A timestamp when this policy will expire. Any - * value given is passed to `new Date()`. - * @param {array|array[]} [options.startsWith] Array of request parameters and - * their expected prefixes (e.g. [['$', '']). Values are - * translated into starts-with constraints in the conditions field of the - * policy document (e.g. ['starts-with', '$', '']). If only - * one prefix condition is to be specified, options.startsWith can be a - * one- dimensional array (e.g. ['$', '']). - * @param {string} [options.acl] ACL for the object from possibly predefined - * ACLs. - * @param {string} [options.successRedirect] The URL to which the user client - * is redirected if the upload is successful. - * @param {string} [options.successStatus] - The status of the Google Storage - * response if the upload is successful (must be string). - * @param {object} [options.contentLengthRange] - * @param {number} [options.contentLengthRange.min] Minimum value for the - * request's content length. - * @param {number} [options.contentLengthRange.max] Maximum value for the - * request's content length. - * @param {GenerateSignedPostPolicyV2Callback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * const options = { - * equals: ['$Content-Type', 'image/jpeg'], - * expires: '10-25-2022', - * contentLengthRange: { - * min: 0, - * max: 1024 - * } - * }; - * - * file.generateSignedPostPolicyV2(options, function(err, policy) { - * // policy.string: the policy document in plain text. - * // policy.base64: the policy document in base64. - * // policy.signature: the policy signature in base64. - * }); + * Take a Duplexify stream, fetch an authenticated connection header, and + * create an outgoing writable stream. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.generateSignedPostPolicyV2(options).then(function(data) { - * const policy = data[0]; - * }); - * ``` + * @param {Duplexify} dup - Duplexify stream. + * @param {object} options - Configuration object. + * @param {module:common/connection} options.connection - A connection instance used to get a token with and send the request through. + * @param {object} options.metadata - Metadata to send at the head of the request. + * @param {object} options.request - Request object, in the format of a standard Node.js http.request() object. + * @param {string=} options.request.method - Default: "POST". + * @param {string=} options.request.qs.uploadType - Default: "multipart". + * @param {string=} options.streamContentType - Default: "application/octet-stream". + * @param {function} onComplete - Callback, executed after the writable Request stream has completed. */ - generateSignedPostPolicyV2(optionsOrCallback, cb) { - const args = (0, util_js_2.normalize)(optionsOrCallback, cb); - let options = args.options; - const callback = args.callback; - const expires = new Date(options.expires); - if (isNaN(expires.getTime())) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); - } - if (expires.valueOf() < Date.now()) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); - } - options = Object.assign({}, options); - const conditions = [ - ['eq', '$key', this.name], - { - bucket: this.bucket.name, + makeWritableStream(dup, options, onComplete) { + var _a; + onComplete = onComplete || util.noop; + const writeStream = new ProgressStream(); + writeStream.on('progress', evt => dup.emit('progress', evt)); + dup.setWritable(writeStream); + const defaultReqOpts = { + method: 'POST', + qs: { + uploadType: 'multipart', }, - ]; - if (Array.isArray(options.equals)) { - if (!Array.isArray(options.equals[0])) { - options.equals = [options.equals]; - } - options.equals.forEach(condition => { - if (!Array.isArray(condition) || condition.length !== 2) { - throw new Error(FileExceptionMessages.EQUALS_CONDITION_TWO_ELEMENTS); - } - conditions.push(['eq', condition[0], condition[1]]); - }); - } - if (Array.isArray(options.startsWith)) { - if (!Array.isArray(options.startsWith[0])) { - options.startsWith = [options.startsWith]; - } - options.startsWith.forEach(condition => { - if (!Array.isArray(condition) || condition.length !== 2) { - throw new Error(FileExceptionMessages.STARTS_WITH_TWO_ELEMENTS); - } - conditions.push(['starts-with', condition[0], condition[1]]); - }); - } - if (options.acl) { - conditions.push({ - acl: options.acl, - }); - } - if (options.successRedirect) { - conditions.push({ - success_action_redirect: options.successRedirect, - }); - } - if (options.successStatus) { - conditions.push({ - success_action_status: options.successStatus, - }); - } - if (options.contentLengthRange) { - const min = options.contentLengthRange.min; - const max = options.contentLengthRange.max; - if (typeof min !== 'number' || typeof max !== 'number') { - throw new Error(FileExceptionMessages.CONTENT_LENGTH_RANGE_MIN_MAX); - } - conditions.push(['content-length-range', min, max]); - } - const policy = { - expiration: expires.toISOString(), - conditions, + timeout: 0, + maxRetries: 0, }; - const policyString = JSON.stringify(policy); - const policyBase64 = Buffer.from(policyString).toString('base64'); - this.storage.authClient.sign(policyBase64, options.signingEndpoint).then(signature => { - callback(null, { - string: policyString, - base64: policyBase64, - signature, - }); - }, err => { - callback(new signer_js_1.SigningError(err.message)); + const metadata = options.metadata || {}; + const reqOpts = { + ...defaultReqOpts, + ...options.request, + qs: { + ...defaultReqOpts.qs, + ...(_a = options.request) === null || _a === void 0 ? void 0 : _a.qs, + }, + multipart: [ + { + 'Content-Type': 'application/json', + body: JSON.stringify(metadata), + }, + { + 'Content-Type': metadata.contentType || 'application/octet-stream', + body: writeStream, + }, + ], + }; + options.makeAuthenticatedRequest(reqOpts, { + onAuthenticated(err, authenticatedReqOpts) { + if (err) { + dup.destroy(err); + return; + } + requestDefaults.headers = util._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); + const request = teeny_request_1.teenyRequest.defaults(requestDefaults); + request(authenticatedReqOpts, (err, resp, body) => { + util.handleResp(err, resp, body, (err, data) => { + if (err) { + dup.destroy(err); + return; + } + dup.emit('response', resp); + onComplete(data); + }); + }); + }, }); } /** - * @typedef {object} SignedPostPolicyV4Output - * @property {string} url The request URL. - * @property {object} fields The form fields to include in the POST request. - */ - /** - * @typedef {array} GenerateSignedPostPolicyV4Response - * @property {SignedPostPolicyV4Output} 0 An object containing the request URL and form fields. - */ - /** - * @callback GenerateSignedPostPolicyV4Callback - * @param {?Error} err Request error, if any. - * @param {SignedPostPolicyV4Output} output An object containing the request URL and form fields. + * Returns true if the API request should be retried, given the error that was + * given the first time the request was attempted. This is used for rate limit + * related errors as well as intermittent server errors. + * + * @param {error} err - The API error to check if it is appropriate to retry. + * @return {boolean} True if the API request should be retried, false otherwise. */ + shouldRetryRequest(err) { + if (err) { + if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { + return true; + } + if (err.errors) { + for (const e of err.errors) { + const reason = e.reason; + if (reason === 'rateLimitExceeded') { + return true; + } + if (reason === 'userRateLimitExceeded') { + return true; + } + if (reason && reason.includes('EAI_AGAIN')) { + return true; + } + } + } + } + return false; + } /** - * Get a v4 signed policy document to allow a user to upload data with a POST - * request. - * - * In Google Cloud Platform environments, such as Cloud Functions and App - * Engine, you usually don't provide a `keyFilename` or `credentials` during - * instantiation. In those environments, we call the - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} - * to create a signed policy. That API requires either the - * `https://www.googleapis.com/auth/iam` or - * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are - * enabled. - * - * See {@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument| Policy Document Reference} - * - * @param {object} options Configuration options. - * @param {Date|number|string} options.expires - A timestamp when this policy will expire. Any - * value given is passed to `new Date()`. - * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style - * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style - * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instead of path-style URL. - * Currently defaults to `false` for path-style, although this may change in a - * future major-version release. - * @param {string} [config.bucketBoundHostname] The bucket-bound hostname to return in - * the result, e.g. "https://cdn.example.com". - * @param {object} [config.fields] [Form fields]{@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument} - * to include in the signed policy. Any fields with key beginning with 'x-ignore-' - * will not be included in the policy to be signed. - * @param {object[]} [config.conditions] [Conditions]{@link https://cloud.google.com/storage/docs/authentication/signatures#policy-document} - * to include in the signed policy. All fields given in `config.fields` are - * automatically included in the conditions array, adding the same entry - * in both `fields` and `conditions` will result in duplicate entries. - * - * @param {GenerateSignedPostPolicyV4Callback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * const options = { - * expires: '10-25-2022', - * conditions: [ - * ['eq', '$Content-Type', 'image/jpeg'], - * ['content-length-range', 0, 1024], - * ], - * fields: { - * acl: 'public-read', - * 'x-goog-meta-foo': 'bar', - * 'x-ignore-mykey': 'data' - * } - * }; - * - * file.generateSignedPostPolicyV4(options, function(err, response) { - * // response.url The request URL - * // response.fields The form fields (including the signature) to include - * // to be used to upload objects by HTML forms. - * }); + * Get a function for making authenticated requests. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.generateSignedPostPolicyV4(options).then(function(data) { - * const response = data[0]; - * // response.url The request URL - * // response.fields The form fields (including the signature) to include - * // to be used to upload objects by HTML forms. - * }); - * ``` + * @param {object} config - Configuration object. + * @param {boolean=} config.autoRetry - Automatically retry requests if the + * response is related to rate limits or certain intermittent server + * errors. We will exponentially backoff subsequent requests by default. + * (default: true) + * @param {object=} config.credentials - Credentials object. + * @param {boolean=} config.customEndpoint - If true, just return the provided request options. Default: false. + * @param {boolean=} config.useAuthWithCustomEndpoint - If true, will authenticate when using a custom endpoint. Default: false. + * @param {string=} config.email - Account email address, required for PEM/P12 usage. + * @param {number=} config.maxRetries - Maximum number of automatic retries attempted before returning the error. (default: 3) + * @param {string=} config.keyFile - Path to a .json, .pem, or .p12 keyfile. + * @param {array} config.scopes - Array of scopes required for the API. */ - generateSignedPostPolicyV4(optionsOrCallback, cb) { - const args = (0, util_js_2.normalize)(optionsOrCallback, cb); - let options = args.options; - const callback = args.callback; - const expires = new Date(options.expires); - if (isNaN(expires.getTime())) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); + makeAuthenticatedRequestFactory(config) { + const googleAutoAuthConfig = { ...config }; + if (googleAutoAuthConfig.projectId === service_js_1.DEFAULT_PROJECT_ID_TOKEN) { + delete googleAutoAuthConfig.projectId; } - if (expires.valueOf() < Date.now()) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); + let authClient; + if (googleAutoAuthConfig.authClient instanceof google_auth_library_1.GoogleAuth) { + // Use an existing `GoogleAuth` + authClient = googleAutoAuthConfig.authClient; } - if (expires.valueOf() - Date.now() > SEVEN_DAYS * 1000) { - throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); + else { + // Pass an `AuthClient` & `clientOptions` to `GoogleAuth`, if available + authClient = new google_auth_library_1.GoogleAuth({ + ...googleAutoAuthConfig, + authClient: googleAutoAuthConfig.authClient, + clientOptions: googleAutoAuthConfig.clientOptions, + }); } - options = Object.assign({}, options); - let fields = Object.assign({}, options.fields); - const now = new Date(); - const nowISO = (0, util_js_2.formatAsUTCISO)(now, true); - const todayISO = (0, util_js_2.formatAsUTCISO)(now); - const sign = async () => { - const { client_email } = await this.storage.authClient.getCredentials(); - const credential = `${client_email}/${todayISO}/auto/storage/goog4_request`; - fields = { - ...fields, - bucket: this.bucket.name, - key: this.name, - 'x-goog-date': nowISO, - 'x-goog-credential': credential, - 'x-goog-algorithm': 'GOOG4-RSA-SHA256', - }; - const conditions = options.conditions || []; - Object.entries(fields).forEach(([key, value]) => { - if (!key.startsWith('x-ignore-')) { - conditions.push({ [key]: value }); + function makeAuthenticatedRequest(reqOpts, optionsOrCallback) { + let stream; + let projectId; + const reqConfig = { ...config }; + let activeRequest_; + if (!optionsOrCallback) { + stream = (0, duplexify_1.default)(); + reqConfig.stream = stream; + } + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : undefined; + const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : undefined; + async function setProjectId() { + projectId = await authClient.getProjectId(); + } + const onAuthenticated = async (err, authenticatedReqOpts) => { + const authLibraryError = err; + const autoAuthFailed = err && + typeof err.message === 'string' && + err.message.indexOf('Could not load the default credentials') > -1; + if (autoAuthFailed) { + // Even though authentication failed, the API might not actually + // care. + authenticatedReqOpts = reqOpts; } - }); - delete fields.bucket; - const expiration = (0, util_js_2.formatAsUTCISO)(expires, true, '-', ':'); - const policy = { - conditions, - expiration, - }; - const policyString = (0, util_js_2.unicodeJSONStringify)(policy); - const policyBase64 = Buffer.from(policyString).toString('base64'); - try { - const signature = await this.storage.authClient.sign(policyBase64, options.signingEndpoint); - const signatureHex = Buffer.from(signature, 'base64').toString('hex'); - const universe = this.parent.storage.universeDomain; - fields['policy'] = policyBase64; - fields['x-goog-signature'] = signatureHex; - let url; - if (this.storage.customEndpoint) { - url = this.storage.apiEndpoint; + if (!err || autoAuthFailed) { + try { + // Try with existing `projectId` value + authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); + err = null; + } + catch (e) { + if (e instanceof projectify_1.MissingProjectIdError) { + // A `projectId` was required, but we don't have one. + try { + // Attempt to get the `projectId` + await setProjectId(); + authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); + err = null; + } + catch (e) { + // Re-use the "Could not load the default credentials error" if + // auto auth failed. + err = err || e; + } + } + else { + // Some other error unrelated to missing `projectId` + err = err || e; + } + } } - else if (options.virtualHostedStyle) { - url = `https://${this.bucket.name}.storage.${universe}/`; + if (err) { + if (stream) { + stream.destroy(err); + } + else { + const fn = options && options.onAuthenticated + ? options.onAuthenticated + : callback; + fn(err); + } + return; } - else if (options.bucketBoundHostname) { - url = `${options.bucketBoundHostname}/`; + if (options && options.onAuthenticated) { + options.onAuthenticated(null, authenticatedReqOpts); } else { - url = `https://storage.${universe}/${this.bucket.name}/`; + activeRequest_ = util.makeRequest(authenticatedReqOpts, reqConfig, (apiResponseError, ...params) => { + if (apiResponseError && + apiResponseError.code === 401 && + authLibraryError) { + // Re-use the "Could not load the default credentials error" if + // the API request failed due to missing credentials. + apiResponseError = authLibraryError; + } + callback(apiResponseError, ...params); + }); } - return { - url, - fields, - }; - } - catch (err) { - throw new signer_js_1.SigningError(err.message); + }; + const prepareRequest = async () => { + try { + const getProjectId = async () => { + if (config.projectId && + config.projectId !== service_js_1.DEFAULT_PROJECT_ID_TOKEN) { + // The user provided a project ID. We don't need to check with the + // auth client, it could be incorrect. + return config.projectId; + } + if (config.projectIdRequired === false) { + // A projectId is not required. Return the default. + return service_js_1.DEFAULT_PROJECT_ID_TOKEN; + } + return setProjectId(); + }; + const authorizeRequest = async () => { + if (reqConfig.customEndpoint && + !reqConfig.useAuthWithCustomEndpoint) { + // Using a custom API override. Do not use `google-auth-library` for + // authentication. (ex: connecting to a local Datastore server) + return reqOpts; + } + else { + return authClient.authorizeRequest(reqOpts); + } + }; + const [_projectId, authorizedReqOpts] = await Promise.all([ + getProjectId(), + authorizeRequest(), + ]); + if (_projectId) { + projectId = _projectId; + } + return onAuthenticated(null, authorizedReqOpts); + } + catch (e) { + return onAuthenticated(e); + } + }; + prepareRequest(); + if (stream) { + return stream; } - }; - sign().then(res => callback(null, res), callback); - } - /** - * @typedef {array} GetSignedUrlResponse - * @property {object} 0 The signed URL. - */ - /** - * @callback GetSignedUrlCallback - * @param {?Error} err Request error, if any. - * @param {object} url The signed URL. - */ - /** - * Get a signed URL to allow limited time access to the file. - * - * In Google Cloud Platform environments, such as Cloud Functions and App - * Engine, you usually don't provide a `keyFilename` or `credentials` during - * instantiation. In those environments, we call the - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} - * to create a signed URL. That API requires either the - * `https://www.googleapis.com/auth/iam` or - * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are - * enabled. - * - * See {@link https://cloud.google.com/storage/docs/access-control/signed-urls| Signed URLs Reference} - * - * @throws {Error} if an expiration timestamp from the past is given. - * - * @param {object} config Configuration object. - * @param {string} config.action "read" (HTTP: GET), "write" (HTTP: PUT), or - * "delete" (HTTP: DELETE), "resumable" (HTTP: POST). - * When using "resumable", the header `X-Goog-Resumable: start` has - * to be sent when making a request with the signed URL. - * @param {*} config.expires A timestamp when this link will expire. Any value - * given is passed to `new Date()`. - * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. - * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} - * @param {string} [config.version='v2'] The signing version to use, either - * 'v2' or 'v4'. - * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style - * URLs (e.g. 'https://mybucket.storage.googleapis.com/...') instead of path-style - * (e.g. 'https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instaed of path-style URL. - * Currently defaults to `false` for path-style, although this may change in a - * future major-version release. - * @param {string} [config.cname] The cname for this bucket, i.e., - * "https://cdn.example.com". - * @param {string} [config.contentMd5] The MD5 digest value in base64. Just like - * if you provide this, the client must provide this HTTP header with this same - * value in its request, so to if this parameter is not provided here, - * the client must not provide any value for this HTTP header in its request. - * @param {string} [config.contentType] Just like if you provide this, the client - * must provide this HTTP header with this same value in its request, so to if - * this parameter is not provided here, the client must not provide any value - * for this HTTP header in its request. - * @param {object} [config.extensionHeaders] If these headers are used, the - * server will check to make sure that the client provides matching - * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} - * for the requirements of this feature, most notably: - * - The header name must be prefixed with `x-goog-` - * - The header name must be all lowercase - * - * Note: Multi-valued header passed as an array in the extensionHeaders - * object is converted into a string, delimited by `,` with - * no space. Requests made using the signed URL will need to - * delimit multi-valued headers using a single `,` as well, or - * else the server will report a mismatched signature. - * @param {object} [config.queryParams] Additional query parameters to include - * in the signed URL. - * @param {string} [config.promptSaveAs] The filename to prompt the user to - * save the file as when the signed url is accessed. This is ignored if - * `config.responseDisposition` is set. - * @param {string} [config.responseDisposition] The - * {@link http://goo.gl/yMWxQV| response-content-disposition parameter} of the - * signed url. - * @param {*} [config.accessibleAt=Date.now()] A timestamp when this link became usable. Any value - * given is passed to `new Date()`. - * Note: Use for 'v4' only. - * @param {string} [config.responseType] The response-content-type parameter - * of the signed url. - * @param {GetSignedUrlCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Generate a URL that allows temporary access to download your file. - * //- - * const request = require('request'); - * - * const config = { - * action: 'read', - * expires: '03-17-2025', - * }; - * - * file.getSignedUrl(config, function(err, url) { - * if (err) { - * console.error(err); - * return; - * } - * - * // The file is now available to read from this URL. - * request(url, function(err, resp) { - * // resp.statusCode = 200 - * }); - * }); - * - * //- - * // Generate a URL that allows temporary access to download your file. - * // Access will begin at accessibleAt and end at expires. - * //- - * const request = require('request'); - * - * const config = { - * action: 'read', - * expires: '03-17-2025', - * accessibleAt: '03-13-2025' - * }; - * - * file.getSignedUrl(config, function(err, url) { - * if (err) { - * console.error(err); - * return; - * } - * - * // The file will be available to read from this URL from 03-13-2025 to 03-17-2025. - * request(url, function(err, resp) { - * // resp.statusCode = 200 - * }); - * }); - * - * //- - * // Generate a URL to allow write permissions. This means anyone with this - * URL - * // can send a POST request with new data that will overwrite the file. - * //- - * file.getSignedUrl({ - * action: 'write', - * expires: '03-17-2025' - * }, function(err, url) { - * if (err) { - * console.error(err); - * return; - * } - * - * // The file is now available to be written to. - * const writeStream = request.put(url); - * writeStream.end('New data'); - * - * writeStream.on('complete', function(resp) { - * // Confirm the new content was saved. - * file.download(function(err, fileContents) { - * console.log('Contents:', fileContents.toString()); - * // Contents: New data - * }); - * }); - * }); + return { + abort() { + setImmediate(() => { + if (activeRequest_) { + activeRequest_.abort(); + activeRequest_ = null; + } + }); + }, + }; + } + const mar = makeAuthenticatedRequest; + mar.getCredentials = authClient.getCredentials.bind(authClient); + mar.authClient = authClient; + return mar; + } + /** + * Make a request through the `retryRequest` module with built-in error + * handling and exponential back off. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.getSignedUrl(config).then(function(data) { - * const url = data[0]; - * }); + * @param {object} reqOpts - Request options in the format `request` expects. + * @param {object=} config - Configuration object. + * @param {boolean=} config.autoRetry - Automatically retry requests if the + * response is related to rate limits or certain intermittent server + * errors. We will exponentially backoff subsequent requests by default. + * (default: true) + * @param {number=} config.maxRetries - Maximum number of automatic retries + * attempted before returning the error. (default: 3) + * @param {object=} config.request - HTTP module for request calls. + * @param {function} callback - The callback function. + */ + makeRequest(reqOpts, config, callback) { + var _a, _b, _c, _d, _e; + let autoRetryValue = AUTO_RETRY_DEFAULT; + if (config.autoRetry !== undefined) { + autoRetryValue = config.autoRetry; + } + else if (((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined) { + autoRetryValue = config.retryOptions.autoRetry; + } + let maxRetryValue = MAX_RETRY_DEFAULT; + if (config.maxRetries !== undefined) { + maxRetryValue = config.maxRetries; + } + else if (((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.maxRetries) !== undefined) { + maxRetryValue = config.retryOptions.maxRetries; + } + requestDefaults.headers = this._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); + const options = { + request: teeny_request_1.teenyRequest.defaults(requestDefaults), + retries: autoRetryValue !== false ? maxRetryValue : 0, + noResponseRetries: autoRetryValue !== false ? maxRetryValue : 0, + shouldRetryFn(httpRespMessage) { + var _a, _b; + const err = util.parseHttpRespMessage(httpRespMessage).err; + if ((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.retryableErrorFn) { + return err && ((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.retryableErrorFn(err)); + } + return err && util.shouldRetryRequest(err); + }, + maxRetryDelay: (_c = config.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetryDelay, + retryDelayMultiplier: (_d = config.retryOptions) === null || _d === void 0 ? void 0 : _d.retryDelayMultiplier, + totalTimeout: (_e = config.retryOptions) === null || _e === void 0 ? void 0 : _e.totalTimeout, + }; + if (typeof reqOpts.maxRetries === 'number') { + options.retries = reqOpts.maxRetries; + options.noResponseRetries = reqOpts.maxRetries; + } + if (!config.stream) { + return (0, retry_request_1.default)(reqOpts, options, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (err, response, body) => { + util.handleResp(err, response, body, callback); + }); + } + const dup = config.stream; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let requestStream; + const isGetRequest = (reqOpts.method || 'GET').toUpperCase() === 'GET'; + if (isGetRequest) { + requestStream = (0, retry_request_1.default)(reqOpts, options); + dup.setReadable(requestStream); + } + else { + // Streaming writable HTTP requests cannot be retried. + requestStream = options.request(reqOpts); + dup.setWritable(requestStream); + } + // Replay the Request events back to the stream. + requestStream + .on('error', dup.destroy.bind(dup)) + .on('response', dup.emit.bind(dup, 'response')) + .on('complete', dup.emit.bind(dup, 'complete')); + dup.abort = requestStream.abort; + return dup; + } + /** + * Decorate the options about to be made in a request. * - * ``` - * @example include:samples/files.js - * region_tag:storage_generate_signed_url - * Another example: + * @param {object} reqOpts - The options to be passed to `request`. + * @param {string} projectId - The project ID. + * @return {object} reqOpts - The decorated reqOpts. */ - getSignedUrl(cfg, callback) { - const method = ActionToHTTPMethod[cfg.action]; - const extensionHeaders = (0, util_js_2.objectKeyToLowercase)(cfg.extensionHeaders || {}); - if (cfg.action === 'resumable') { - extensionHeaders['x-goog-resumable'] = 'start'; + decorateRequest(reqOpts, projectId) { + delete reqOpts.autoPaginate; + delete reqOpts.autoPaginateVal; + delete reqOpts.objectMode; + if (reqOpts.qs !== null && typeof reqOpts.qs === 'object') { + delete reqOpts.qs.autoPaginate; + delete reqOpts.qs.autoPaginateVal; + reqOpts.qs = (0, projectify_1.replaceProjectIdToken)(reqOpts.qs, projectId); } - const queryParams = Object.assign({}, cfg.queryParams); - if (typeof cfg.responseType === 'string') { - queryParams['response-content-type'] = cfg.responseType; + if (Array.isArray(reqOpts.multipart)) { + reqOpts.multipart = reqOpts.multipart.map(part => { + return (0, projectify_1.replaceProjectIdToken)(part, projectId); + }); } - if (typeof cfg.promptSaveAs === 'string') { - queryParams['response-content-disposition'] = - 'attachment; filename="' + cfg.promptSaveAs + '"'; + if (reqOpts.json !== null && typeof reqOpts.json === 'object') { + delete reqOpts.json.autoPaginate; + delete reqOpts.json.autoPaginateVal; + reqOpts.json = (0, projectify_1.replaceProjectIdToken)(reqOpts.json, projectId); } - if (typeof cfg.responseDisposition === 'string') { - queryParams['response-content-disposition'] = cfg.responseDisposition; + reqOpts.uri = (0, projectify_1.replaceProjectIdToken)(reqOpts.uri, projectId); + return reqOpts; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + isCustomType(unknown, module) { + function getConstructorName(obj) { + return obj.constructor && obj.constructor.name.toLowerCase(); + } + const moduleNameParts = module.split('/'); + const parentModuleName = moduleNameParts[0] && moduleNameParts[0].toLowerCase(); + const subModuleName = moduleNameParts[1] && moduleNameParts[1].toLowerCase(); + if (subModuleName && getConstructorName(unknown) !== subModuleName) { + return false; + } + let walkingModule = unknown; + // eslint-disable-next-line no-constant-condition + while (true) { + if (getConstructorName(walkingModule) === parentModuleName) { + return true; + } + walkingModule = walkingModule.parent; + if (!walkingModule) { + return false; + } + } + } + /** + * Given two parameters, figure out if this is either: + * - Just a callback function + * - An options object, and then a callback function + * @param optionsOrCallback An options object or callback. + * @param cb A potentially undefined callback. + */ + maybeOptionsOrCallback(optionsOrCallback, cb) { + return typeof optionsOrCallback === 'function' + ? [{}, optionsOrCallback] + : [optionsOrCallback, cb]; + } + _getDefaultHeaders(gcclGcsCmd) { + const headers = { + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, + }; + if (gcclGcsCmd) { + headers['x-goog-api-client'] += ` gccl-gcs-cmd/${gcclGcsCmd}`; + } + return headers; + } +} +exports.Util = Util; +/** + * Basic Passthrough Stream that records the number of bytes read + * every time the cursor is moved. + */ +class ProgressStream extends stream_1.Transform { + constructor() { + super(...arguments); + this.bytesRead = 0; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _transform(chunk, encoding, callback) { + this.bytesRead += chunk.length; + this.emit('progress', { bytesWritten: this.bytesRead, contentLength: '*' }); + this.push(chunk); + callback(); + } +} +const util = new Util(); +exports.util = util; + + +/***/ }), + +/***/ 21178: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Notification = void 0; +const index_js_1 = __nccwpck_require__(4052); +const promisify_1 = __nccwpck_require__(19203); +/** + * The API-formatted resource description of the notification. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name Notification#metadata + * @type {object} + */ +/** + * A Notification object is created from your {@link Bucket} object using + * {@link Bucket#notification}. Use it to interact with Cloud Pub/Sub + * notifications. + * + * See {@link https://cloud.google.com/storage/docs/pubsub-notifications| Cloud Pub/Sub Notifications for Google Cloud Storage} + * + * @class + * @hideconstructor + * + * @param {Bucket} bucket The bucket instance this notification is attached to. + * @param {string} id The ID of the notification. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const notification = myBucket.notification('1'); + * ``` + */ +class Notification extends index_js_1.ServiceObject { + constructor(bucket, id) { + const requestQueryObject = {}; + const methods = { + /** + * Creates a notification subscription for the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} + * @method Notification#create + * + * @param {Topic|string} topic The Cloud PubSub topic to which this + * subscription publishes. If the project ID is omitted, the current + * project ID will be used. + * + * Acceptable formats are: + * - `projects/grape-spaceship-123/topics/my-topic` + * + * - `my-topic` + * @param {CreateNotificationRequest} [options] Metadata to set for + * the notification. + * @param {CreateNotificationCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a valid topic is not provided. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.create(function(err, notification, apiResponse) { + * if (!err) { + * // The notification was created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.create().then(function(data) { + * const notification = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + create: true, + /** + * @typedef {array} DeleteNotificationResponse + * @property {object} 0 The full API response. + */ + /** + * Permanently deletes a notification subscription. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/delete| Notifications: delete API Documentation} + * + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {DeleteNotificationCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.delete(function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/deleteNotification.js + * region_tag:storage_delete_bucket_notification + * Another example: + */ + delete: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * Get a notification and its metadata if it exists. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} + * + * @param {object} [options] Configuration options. + * See {@link Bucket#createNotification} for create options. + * @param {boolean} [options.autoCreate] Automatically create the object if + * it does not exist. Default: `false`. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetNotificationCallback} [callback] Callback function. + * @return {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.get(function(err, notification, apiResponse) { + * // `notification.metadata` has been populated. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.get().then(function(data) { + * const notification = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + get: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * Get the notification's metadata. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} + * + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetNotificationMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.getMetadata().then(function(data) { + * const metadata = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/getMetadataNotifications.js + * region_tag:storage_print_pubsub_bucket_notification + * Another example: + */ + getMetadata: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {array} NotificationExistsResponse + * @property {boolean} 0 Whether the notification exists or not. + */ + /** + * @callback NotificationExistsCallback + * @param {?Error} err Request error, if any. + * @param {boolean} exists Whether the notification exists or not. + */ + /** + * Check if the notification exists. + * + * @method Notification#exists + * @param {NotificationExistsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.exists(function(err, exists) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.exists().then(function(data) { + * const exists = data[0]; + * }); + * ``` + */ + exists: true, + }; + super({ + parent: bucket, + baseUrl: '/notificationConfigs', + id: id.toString(), + createMethod: bucket.createNotification.bind(bucket), + methods, + }); + } +} +exports.Notification = Notification; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Notification); + + +/***/ }), + +/***/ 42851: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2022 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _Upload_instances, _Upload_hashValidator, _Upload_clientCrc32c, _Upload_clientMd5Hash, _Upload_gcclGcsCmd, _Upload_resetLocalBuffersCache, _Upload_addLocalBufferCache, _Upload_validateChecksum, _Upload_applyChecksumHeaders; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Upload = exports.PROTOCOL_REGEX = void 0; +exports.upload = upload; +exports.createURI = createURI; +exports.checkUploadStatus = checkUploadStatus; +const abort_controller_1 = __importDefault(__nccwpck_require__(61659)); +const crypto_1 = __nccwpck_require__(6113); +const gaxios = __importStar(__nccwpck_require__(59555)); +const google_auth_library_1 = __nccwpck_require__(20810); +const stream_1 = __nccwpck_require__(12781); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +const uuid = __importStar(__nccwpck_require__(44458)); +const util_js_1 = __nccwpck_require__(59258); +const util_js_2 = __nccwpck_require__(38064); +const file_js_1 = __nccwpck_require__(4713); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const package_json_helper_cjs_1 = __nccwpck_require__(28568); +const hash_stream_validator_js_1 = __nccwpck_require__(40725); +const NOT_FOUND_STATUS_CODE = 404; +const RESUMABLE_INCOMPLETE_STATUS_CODE = 308; +const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); +exports.PROTOCOL_REGEX = /^(\w*):\/\//; +class Upload extends stream_1.Writable { + constructor(cfg) { + var _a; + super(cfg); + _Upload_instances.add(this); + this.numBytesWritten = 0; + this.numRetries = 0; + this.currentInvocationId = { + checkUploadStatus: uuid.v4(), + chunk: uuid.v4(), + uri: uuid.v4(), + }; + /** + * A cache of buffers written to this instance, ready for consuming + */ + this.writeBuffers = []; + this.numChunksReadInRequest = 0; + _Upload_hashValidator.set(this, void 0); + _Upload_clientCrc32c.set(this, void 0); + _Upload_clientMd5Hash.set(this, void 0); + /** + * An array of buffers used for caching the most recent upload chunk. + * We should not assume that the server received all bytes sent in the request. + * - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + */ + this.localWriteCache = []; + this.localWriteCacheByteLength = 0; + this.upstreamEnded = false; + _Upload_gcclGcsCmd.set(this, void 0); + cfg = cfg || {}; + if (!cfg.bucket || !cfg.file) { + throw new Error('A bucket and file name are required'); } - if (this.generation) { - queryParams['generation'] = this.generation.toString(); + if (cfg.offset && !cfg.uri) { + throw new RangeError('Cannot provide an `offset` without providing a `uri`'); } - const signConfig = { - method, - expires: cfg.expires, - accessibleAt: cfg.accessibleAt, - extensionHeaders, - queryParams, - contentMd5: cfg.contentMd5, - contentType: cfg.contentType, - host: cfg.host, - }; - if (cfg.cname) { - signConfig.cname = cfg.cname; + if (cfg.isPartialUpload && !cfg.chunkSize) { + throw new RangeError('Cannot set `isPartialUpload` without providing a `chunkSize`'); } - if (cfg.version) { - signConfig.version = cfg.version; + cfg.authConfig = cfg.authConfig || {}; + cfg.authConfig.scopes = [ + 'https://www.googleapis.com/auth/devstorage.full_control', + ]; + this.authClient = cfg.authClient || new google_auth_library_1.GoogleAuth(cfg.authConfig); + const universe = cfg.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; + this.apiEndpoint = `https://storage.${universe}`; + if (cfg.apiEndpoint && cfg.apiEndpoint !== this.apiEndpoint) { + this.apiEndpoint = this.sanitizeEndpoint(cfg.apiEndpoint); + const hostname = new URL(this.apiEndpoint).hostname; + // check if it is a domain of a known universe + const isDomain = hostname === universe; + const isDefaultUniverseDomain = hostname === google_auth_library_1.DEFAULT_UNIVERSE; + // check if it is a subdomain of a known universe + // by checking a last (universe's length + 1) of a hostname + const isSubDomainOfUniverse = hostname.slice(-(universe.length + 1)) === `.${universe}`; + const isSubDomainOfDefaultUniverse = hostname.slice(-(google_auth_library_1.DEFAULT_UNIVERSE.length + 1)) === + `.${google_auth_library_1.DEFAULT_UNIVERSE}`; + if (!isDomain && + !isDefaultUniverseDomain && + !isSubDomainOfUniverse && + !isSubDomainOfDefaultUniverse) { + // Check if we should use auth with custom endpoint + if (cfg.useAuthWithCustomEndpoint !== true) { + // Only bypass auth if explicitly not requested + this.authClient = gaxios; + } + // Otherwise keep the authenticated client + } } - if (cfg.virtualHostedStyle) { - signConfig.virtualHostedStyle = cfg.virtualHostedStyle; + this.baseURI = `${this.apiEndpoint}/upload/storage/v1/b`; + this.bucket = cfg.bucket; + const cacheKeyElements = [cfg.bucket, cfg.file]; + if (typeof cfg.generation === 'number') { + cacheKeyElements.push(`${cfg.generation}`); } - if (!this.signer) { - this.signer = new signer_js_1.URLSigner(this.storage.authClient, this.bucket, this, this.storage); + this.cacheKey = cacheKeyElements.join('/'); + this.customRequestOptions = cfg.customRequestOptions || {}; + this.file = cfg.file; + this.generation = cfg.generation; + this.kmsKeyName = cfg.kmsKeyName; + this.metadata = cfg.metadata || {}; + this.offset = cfg.offset; + this.origin = cfg.origin; + this.params = cfg.params || {}; + this.userProject = cfg.userProject; + this.chunkSize = cfg.chunkSize; + this.retryOptions = cfg.retryOptions; + this.isPartialUpload = (_a = cfg.isPartialUpload) !== null && _a !== void 0 ? _a : false; + __classPrivateFieldSet(this, _Upload_clientCrc32c, cfg.clientCrc32c, "f"); + __classPrivateFieldSet(this, _Upload_clientMd5Hash, cfg.clientMd5Hash, "f"); + const calculateCrc32c = !cfg.clientCrc32c && cfg.crc32c; + const calculateMd5 = !cfg.clientMd5Hash && cfg.md5; + if (calculateCrc32c || calculateMd5) { + __classPrivateFieldSet(this, _Upload_hashValidator, new hash_stream_validator_js_1.HashStreamValidator({ + crc32c: calculateCrc32c, + md5: calculateMd5, + updateHashesOnly: true, + }), "f"); } - this.signer - .getSignedUrl(signConfig) - .then(signedUrl => callback(null, signedUrl), callback); - } - /** - * @callback IsPublicCallback - * @param {?Error} err Request error, if any. - * @param {boolean} resp Whether file is public or not. - */ - /** - * @typedef {array} IsPublicResponse - * @property {boolean} 0 Whether file is public or not. - */ - /** - * Check whether this file is public or not by sending - * a HEAD request without credentials. - * No errors from the server indicates that the current - * file is public. - * A 403-Forbidden error {@link https://cloud.google.com/storage/docs/json_api/v1/status-codes#403_Forbidden} - * indicates that file is private. - * Any other non 403 error is propagated to user. - * - * @param {IsPublicCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Check whether the file is publicly accessible. - * //- - * file.isPublic(function(err, resp) { - * if (err) { - * console.error(err); - * return; - * } - * console.log(`the file ${file.id} is public: ${resp}`) ; - * }) - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.isPublic().then(function(data) { - * const resp = data[0]; - * }); - * ``` - */ - isPublic(callback) { - var _a; - // Build any custom headers based on the defined interceptors on the parent - // storage object and this object - const storageInterceptors = ((_a = this.storage) === null || _a === void 0 ? void 0 : _a.interceptors) || []; - const fileInterceptors = this.interceptors || []; - const allInterceptors = storageInterceptors.concat(fileInterceptors); - const headers = allInterceptors.reduce((acc, curInterceptor) => { - const currentHeaders = curInterceptor.request({ - uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, - }); - Object.assign(acc, currentHeaders.headers); - return acc; - }, {}); - index_js_1.util.makeRequest({ - method: 'GET', - uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, - headers, - }, { - retryOptions: this.storage.retryOptions, - }, (err) => { - if (err) { - const apiError = err; - if (apiError.code === 403) { - callback(null, false); - } - else { - callback(err); - } + if (cfg.key) { + if (typeof cfg.key === 'string') { + const base64Key = Buffer.from(cfg.key).toString('base64'); + this.encryption = { + key: base64Key, + hash: (0, crypto_1.createHash)('sha256').update(cfg.key).digest('base64'), + }; } else { - callback(null, true); + const base64Key = cfg.key.toString('base64'); + this.encryption = { + key: base64Key, + hash: (0, crypto_1.createHash)('sha256').update(cfg.key).digest('base64'), + }; } - }); - } - /** - * @typedef {object} MakeFilePrivateOptions Configuration options for File#makePrivate(). - * @property {Metadata} [metadata] Define custom metadata properties to define - * along with the operation. - * @property {boolean} [strict] If true, set the file to be private to - * only the owner user. Otherwise, it will be private to the project. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @callback MakeFilePrivateCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} MakeFilePrivateResponse - * @property {object} 0 The full API response. - */ - /** - * Make a file private to the project and remove all other permissions. - * Set `options.strict` to true to make the file private to only the owner. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} - * - * @param {MakeFilePrivateOptions} [options] Configuration options. - * @param {MakeFilePrivateCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Set the file private so only project maintainers can see and modify it. - * //- - * file.makePrivate(function(err) {}); - * - * //- - * // Set the file private so only the owner can see and modify it. - * //- - * file.makePrivate({ strict: true }, function(err) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.makePrivate().then(function(data) { - * const apiResponse = data[0]; - * }); - * ``` - */ - makePrivate(optionsOrCallback, callback) { - var _a, _b; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const query = { - predefinedAcl: options.strict ? 'private' : 'projectPrivate', - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; - if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifMetagenerationMatch) !== undefined) { - query.ifMetagenerationMatch = - (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch; - delete options.preconditionOpts; - } - if (options.userProject) { - query.userProject = options.userProject; - } - // You aren't allowed to set both predefinedAcl & acl properties on a file, - // so acl must explicitly be nullified, destroying all previous acls on the - // file. - const metadata = { ...options.metadata, acl: null }; - this.setMetadata(metadata, query, callback); - } - /** - * @typedef {array} MakeFilePublicResponse - * @property {object} 0 The full API response. - */ - /** - * @callback MakeFilePublicCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Set a file to be publicly readable and maintain all previous permissions. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} - * - * @param {MakeFilePublicCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * file.makePublic(function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.makePublic().then(function(data) { - * const apiResponse = data[0]; - * }); - * - * ``` - * @example include:samples/files.js - * region_tag:storage_make_public - * Another example: - */ - makePublic(callback) { - callback = callback || index_js_1.util.noop; - this.acl.add({ - entity: 'allUsers', - role: 'READER', - }, (err, acl, resp) => { - callback(err, resp); - }); - } - /** - * The public URL of this File - * Use {@link File#makePublic} to enable anonymous access via the returned URL. - * - * @returns {string} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const file = bucket.file('my-file'); - * - * // publicUrl will be "https://storage.googleapis.com/albums/my-file" - * const publicUrl = file.publicUrl(); - * ``` - */ - publicUrl() { - return `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`; - } - /** - * @typedef {array} MoveResponse - * @property {File} 0 The destination File. - * @property {object} 1 The full API response. - */ - /** - * @callback MoveCallback - * @param {?Error} err Request error, if any. - * @param {?File} destinationFile The destination File. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {object} MoveOptions Configuration options for File#move(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * Move this file to another location. By default, this will rename the file - * and keep it in the same bucket, but you can choose to move it to another - * Bucket by providing a Bucket or File object or a URL beginning with - * "gs://". - * - * **Warning**: - * There is currently no atomic `move` method in the Cloud Storage API, - * so this method is a composition of {@link File#copy} (to the new - * location) and {@link File#delete} (from the old location). While - * unlikely, it is possible that an error returned to your callback could be - * triggered from either one of these API calls failing, which could leave a - * duplicate file lingering. The error message will indicate what operation - * has failed. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/copy| Objects: copy API Documentation} - * - * @throws {Error} If the destination file is not provided. - * - * @param {string|Bucket|File} destination Destination file. - * @param {MoveCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * //- - * // You can pass in a variety of types for the destination. - * // - * // For all of the below examples, assume we are working with the following - * // Bucket and File objects. - * //- - * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('my-image.png'); - * - * //- - * // If you pass in a string for the destination, the file is moved to its - * // current bucket, under the new name provided. - * //- - * file.move('my-image-new.png', function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // but contains instead: - * // - "my-image-new.png" - * - * // `destinationFile` is an instance of a File object that refers to your - * // new file. - * }); - * - * //- - * // If you pass in a string starting with "gs://" for the destination, the - * // file is copied to the other bucket and under the new name provided. - * //- - * const newLocation = 'gs://another-bucket/my-image-new.png'; - * file.move(newLocation, function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image-new.png" - * - * // `destinationFile` is an instance of a File object that refers to your - * // new file. - * }); - * - * //- - * // If you pass in a Bucket object, the file will be moved to that bucket - * // using the same name. - * //- - * const anotherBucket = gcs.bucket('another-bucket'); - * - * file.move(anotherBucket, function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image.png" - * - * // `destinationFile` is an instance of a File object that refers to your - * // new file. - * }); - * - * //- - * // If you pass in a File object, you have complete control over the new - * // bucket and filename. - * //- - * const anotherFile = anotherBucket.file('my-awesome-image.png'); - * - * file.move(anotherFile, function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-awesome-image.png" - * - * // Note: - * // The `destinationFile` parameter is equal to `anotherFile`. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.move('my-image-new.png').then(function(data) { - * const destinationFile = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/files.js - * region_tag:storage_move_file - * Another example: - */ - move(destination, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - callback = callback || index_js_1.util.noop; - this.copy(destination, options, (err, destinationFile, copyApiResponse) => { - if (err) { - err.message = 'file#copy failed with an error - ' + err.message; - callback(err, null, copyApiResponse); - return; + } + this.predefinedAcl = cfg.predefinedAcl; + if (cfg.private) + this.predefinedAcl = 'private'; + if (cfg.public) + this.predefinedAcl = 'publicRead'; + const autoRetry = cfg.retryOptions.autoRetry; + this.uriProvidedManually = !!cfg.uri; + this.uri = cfg.uri; + if (this.offset) { + // we're resuming an incomplete upload + this.numBytesWritten = this.offset; + } + this.numRetries = 0; // counter for number of retries currently executed + if (!autoRetry) { + cfg.retryOptions.maxRetries = 0; + } + this.timeOfFirstRequest = Date.now(); + const contentLength = cfg.metadata + ? Number(cfg.metadata.contentLength) + : NaN; + this.contentLength = isNaN(contentLength) ? '*' : contentLength; + __classPrivateFieldSet(this, _Upload_gcclGcsCmd, cfg[util_js_2.GCCL_GCS_CMD_KEY], "f"); + this.once('writing', () => { + if (this.uri) { + this.continueUploading(); } - if (this.name !== destinationFile.name || - this.bucket.name !== destinationFile.bucket.name) { - this.delete(options, (err, apiResponse) => { + else { + this.createURI(err => { if (err) { - err.message = 'file#delete failed with an error - ' + err.message; - callback(err, destinationFile, apiResponse); - return; + return this.destroy(err); } - callback(null, destinationFile, copyApiResponse); + this.startUploading(); + return; }); } - else { - callback(null, destinationFile, copyApiResponse); - } }); } /** - * @typedef {array} RenameResponse - * @property {File} 0 The destination File. - * @property {object} 1 The full API response. - */ - /** - * @callback RenameCallback - * @param {?Error} err Request error, if any. - * @param {?File} destinationFile The destination File. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {object} RenameOptions Configuration options for File#move(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * Rename this file. - * - * **Warning**: - * There is currently no atomic `rename` method in the Cloud Storage API, - * so this method is an alias of {@link File#move}, which in turn is a - * composition of {@link File#copy} (to the new location) and - * {@link File#delete} (from the old location). While - * unlikely, it is possible that an error returned to your callback could be - * triggered from either one of these API calls failing, which could leave a - * duplicate file lingering. The error message will indicate what operation - * has failed. - * - * @param {string|File} destinationFile Destination file. - * @param {RenameCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // You can pass in a string or a File object. - * // - * // For all of the below examples, assume we are working with the following - * // Bucket and File objects. - * //- - * - * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('my-image.png'); - * - * //- - * // You can pass in a string for the destinationFile. - * //- - * file.rename('renamed-image.png', function(err, renamedFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // but contains instead: - * // - "renamed-image.png" - * - * // `renamedFile` is an instance of a File object that refers to your - * // renamed file. - * }); - * - * //- - * // You can pass in a File object. - * //- - * const anotherFile = anotherBucket.file('my-awesome-image.png'); - * - * file.rename(anotherFile, function(err, renamedFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * - * // Note: - * // The `renamedFile` parameter is equal to `anotherFile`. - * }); + * Prevent 'finish' event until the upload has succeeded. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.rename('my-renamed-image.png').then(function(data) { - * const renamedFile = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - rename(destinationFile, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - callback = callback || index_js_1.util.noop; - this.move(destinationFile, options, callback); - } - /** - * @typedef {object} RestoreOptions Options for File#restore(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - * @param {number} [generation] If present, selects a specific revision of this object. - * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'. - * @param {string | number} [ifGenerationMatch] Request proceeds if the generation of the target resource - * matches the value used in the precondition. - * If the values don't match, the request fails with a 412 Precondition Failed response. - * @param {string | number} [ifGenerationNotMatch] Request proceeds if the generation of the target resource does - * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. - * @param {string | number} [ifMetagenerationMatch] Request proceeds if the meta-generation of the target resource - * matches the value used in the precondition. - * If the values don't match, the request fails with a 412 Precondition Failed response. - * @param {string | number} [ifMetagenerationNotMatch] Request proceeds if the meta-generation of the target resource does - * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. - */ - /** - * Restores a soft-deleted file - * @param {RestoreOptions} options Restore options. - * @returns {Promise} + * @param fireFinishEvent The finish callback */ - async restore(options) { - const [file] = await this.request({ - method: 'POST', - uri: '/restore', - qs: options, + _final(fireFinishEvent = () => { }) { + this.upstreamEnded = true; + this.once('uploadFinished', fireFinishEvent); + process.nextTick(() => { + this.emit('upstreamFinished'); + // it's possible `_write` may not be called - namely for empty object uploads + this.emit('writing'); }); - return file; - } - /** - * Makes request and applies userProject query parameter if necessary. - * - * @private - * - * @param {object} reqOpts - The request options. - * @param {function} callback - The callback function. - */ - request(reqOpts, callback) { - return this.parent.request.call(this, reqOpts, callback); } /** - * @callback RotateEncryptionKeyCallback - * @extends CopyCallback - */ - /** - * @typedef RotateEncryptionKeyResponse - * @extends CopyResponse - */ - /** - * @param {string|buffer|object} RotateEncryptionKeyOptions Configuration options - * for File#rotateEncryptionKey(). - * If a string or Buffer is provided, it is interpreted as an AES-256, - * customer-supplied encryption key. If you'd like to use a Cloud KMS key - * name, you must specify an options object with the property name: - * `kmsKeyName`. - * @param {string|buffer} [options.encryptionKey] An AES-256 encryption key. - * @param {string} [options.kmsKeyName] A Cloud KMS key name. - */ - /** - * This method allows you to update the encryption key associated with this - * file. - * - * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} - * - * @param {RotateEncryptionKeyOptions} [options] - Configuration options. - * @param {RotateEncryptionKeyCallback} [callback] - * @returns {Promise} + * Handles incoming data from upstream * - * @example include:samples/encryption.js - * region_tag:storage_rotate_encryption_key - * Example of rotating the encryption key for this file: + * @param chunk The chunk to append to the buffer + * @param encoding The encoding of the chunk + * @param readCallback A callback for when the buffer has been read downstream */ - rotateEncryptionKey(optionsOrCallback, callback) { - var _a; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - let options = {}; - if (typeof optionsOrCallback === 'string' || - optionsOrCallback instanceof Buffer) { - options = { - encryptionKey: optionsOrCallback, - }; - } - else if (typeof optionsOrCallback === 'object') { - options = optionsOrCallback; + _write(chunk, encoding, readCallback = () => { }) { + // Backwards-compatible event + this.emit('writing'); + const bufferChunk = typeof chunk === 'string' ? Buffer.from(chunk, encoding) : chunk; + if (__classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + try { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").write(bufferChunk); + } + catch (e) { + this.destroy(e); + return; + } } - const newFile = this.bucket.file(this.id, options); - const copyOptions = ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined - ? { preconditionOpts: options.preconditionOpts } - : {}; - this.copy(newFile, copyOptions, callback); + this.writeBuffers.push(bufferChunk); + this.once('readFromChunkBuffer', readCallback); + process.nextTick(() => this.emit('wroteToChunkBuffer')); } /** - * @typedef {object} SaveOptions - * @extends CreateWriteStreamOptions - */ - /** - * @callback SaveCallback - * @param {?Error} err Request error, if any. - */ - /** - * Write strings or buffers to a file. - * - * *This is a convenience method which wraps {@link File#createWriteStream}.* - * To upload arbitrary data to a file, please use {@link File#createWriteStream} directly. - * - * Resumable uploads are automatically enabled and must be shut off explicitly - * by setting `options.resumable` to `false`. - * - * Multipart uploads with retryable error codes will be retried 3 times with exponential backoff. - * - *

- * There is some overhead when using a resumable upload that can cause - * noticeable performance degradation while uploading a series of small - * files. When uploading files less than 10MB, it is recommended that the - * resumable feature is disabled. - *

- * - * @param {SaveData} data The data to write to a file. - * @param {SaveOptions} [options] See {@link File#createWriteStream}'s `options` - * parameter. - * @param {SaveCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * const contents = 'This is the contents of the file.'; - * - * file.save(contents, function(err) { - * if (!err) { - * // File written successfully. - * } - * }); + * Prepends the local buffer to write buffer and resets it. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.save(contents).then(function() {}); - * ``` + * @param keepLastBytes number of bytes to keep from the end of the local buffer. */ - save(data, optionsOrCallback, callback) { - // tslint:enable:no-any - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - let maxRetries = this.storage.retryOptions.maxRetries; - if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { - maxRetries = 0; - } - const returnValue = (0, async_retry_1.default)(async (bail) => { - return new Promise((resolve, reject) => { - if (maxRetries === 0) { - this.storage.retryOptions.autoRetry = false; - } - const writable = this.createWriteStream(options); - if (options.onUploadProgress) { - writable.on('progress', options.onUploadProgress); - } - const handleError = (err) => { - if (this.storage.retryOptions.autoRetry && - this.storage.retryOptions.retryableErrorFn(err)) { - return reject(err); - } - return bail(err); - }; - if (typeof data === 'string' || Buffer.isBuffer(data)) { - writable - .on('error', handleError) - .on('finish', () => resolve()) - .end(data); - } - else { - (0, stream_1.pipeline)(data, writable, err => { - if (err) { - if (typeof data !== 'function') { - // Only PipelineSourceFunction can be retried. Async-iterables - // and Readable streams can only be consumed once. - return bail(err); - } - handleError(err); - } - else { - resolve(); - } - }); + prependLocalBufferToUpstream(keepLastBytes) { + // Typically, the upstream write buffers should be smaller than the local + // cache, so we can save time by setting the local cache as the new + // upstream write buffer array and appending the old array to it + let initialBuffers = []; + if (keepLastBytes) { + // we only want the last X bytes + let bytesKept = 0; + while (keepLastBytes > bytesKept) { + // load backwards because we want the last X bytes + // note: `localWriteCacheByteLength` is reset below + let buf = this.localWriteCache.pop(); + if (!buf) + break; + bytesKept += buf.byteLength; + if (bytesKept > keepLastBytes) { + // we have gone over the amount desired, let's keep the last X bytes + // of this buffer + const diff = bytesKept - keepLastBytes; + buf = buf.subarray(diff); + bytesKept -= diff; } - }); - }, { - retries: maxRetries, - factor: this.storage.retryOptions.retryDelayMultiplier, - maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds - maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds - }); - if (!callback) { - return returnValue; + initialBuffers.unshift(buf); + } } else { - return returnValue - .then(() => { - if (callback) { - return callback(); - } - }) - .catch(callback); + // we're keeping all of the local cache, simply use it as the initial buffer + initialBuffers = this.localWriteCache; } - } - setMetadata(metadata, optionsOrCallback, cb) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, bucket_js_1.AvailableServiceObjectMethods.setMetadata, options); - super - .setMetadata(metadata, options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - }); + // Append the old upstream to the new + const append = this.writeBuffers; + this.writeBuffers = initialBuffers; + for (const buf of append) { + this.writeBuffers.push(buf); + } + // reset last buffers sent + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); } /** - * @typedef {array} SetStorageClassResponse - * @property {object} 0 The full API response. - */ - /** - * @typedef {object} SetStorageClassOptions Configuration options for File#setStorageClass(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @callback SetStorageClassCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. + * Retrieves data from upstream's buffer. + * + * @param limit The maximum amount to return from the buffer. */ + *pullFromChunkBuffer(limit) { + while (limit) { + const buf = this.writeBuffers.shift(); + if (!buf) + break; + let bufToYield = buf; + if (buf.byteLength > limit) { + bufToYield = buf.subarray(0, limit); + this.writeBuffers.unshift(buf.subarray(limit)); + limit = 0; + } + else { + limit -= buf.byteLength; + } + yield bufToYield; + // Notify upstream we've read from the buffer and we're able to consume + // more. It can also potentially send more data down as we're currently + // iterating. + this.emit('readFromChunkBuffer'); + } + } /** - * Set the storage class for this file. - * - * See {@link https://cloud.google.com/storage/docs/per-object-storage-class| Per-Object Storage Class} - * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} - * - * @param {string} storageClass The new storage class. (`standard`, - * `nearline`, `coldline`, or `archive`) - * **Note:** The storage classes `multi_regional` and `regional` - * are now legacy and will be deprecated in the future. - * @param {SetStorageClassOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {SetStorageClassCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * file.setStorageClass('nearline', function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } - * - * // The storage class was updated successfully. - * }); + * A handler for determining if data is ready to be read from upstream. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.setStorageClass('nearline').then(function() {}); - * ``` + * @returns If there will be more chunks to read in the future */ - setStorageClass(storageClass, optionsOrCallback, callback) { - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const req = { - ...options, - // In case we get input like `storageClass`, convert to `storage_class`. - storageClass: storageClass - .replace(/-/g, '_') - .replace(/([a-z])([A-Z])/g, (_, low, up) => { - return low + '_' + up; - }) - .toUpperCase(), - }; - this.copy(this, req, (err, file, apiResponse) => { - if (err) { - callback(err, apiResponse); - return; + async waitForNextChunk() { + const willBeMoreChunks = await new Promise(resolve => { + // There's data available - it should be digested + if (this.writeBuffers.length) { + return resolve(true); } - this.metadata = file.metadata; - callback(null, apiResponse); + // The upstream writable ended, we shouldn't expect any more data. + if (this.upstreamEnded) { + return resolve(false); + } + // Nothing immediate seems to be determined. We need to prepare some + // listeners to determine next steps... + const wroteToChunkBufferCallback = () => { + removeListeners(); + return resolve(true); + }; + const upstreamFinishedCallback = () => { + removeListeners(); + // this should be the last chunk, if there's anything there + if (this.writeBuffers.length) + return resolve(true); + return resolve(false); + }; + // Remove listeners when we're ready to callback. + const removeListeners = () => { + this.removeListener('wroteToChunkBuffer', wroteToChunkBufferCallback); + this.removeListener('upstreamFinished', upstreamFinishedCallback); + }; + // If there's data recently written it should be digested + this.once('wroteToChunkBuffer', wroteToChunkBufferCallback); + // If the upstream finishes let's see if there's anything to grab + this.once('upstreamFinished', upstreamFinishedCallback); }); + return willBeMoreChunks; } /** - * Set a user project to be billed for all requests made from this File - * object. - * - * @param {string} userProject The user project. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const file = bucket.file('my-file'); + * Reads data from upstream up to the provided `limit`. + * Ends when the limit has reached or no data is expected to be pushed from upstream. * - * file.setUserProject('grape-spaceship-123'); - * ``` + * @param limit The most amount of data this iterator should return. `Infinity` by default. */ - setUserProject(userProject) { - this.bucket.setUserProject.call(this, userProject); + async *upstreamIterator(limit = Infinity) { + // read from upstream chunk buffer + while (limit && (await this.waitForNextChunk())) { + // read until end or limit has been reached + for (const chunk of this.pullFromChunkBuffer(limit)) { + limit -= chunk.byteLength; + yield chunk; + } + } } - /** - * This creates a resumable-upload upload stream. - * - * @param {Duplexify} stream - Duplexify stream of data to pipe to the file. - * @param {object=} options - Configuration object. - * - * @private - */ - startResumableUpload_(dup, options = {}) { - var _a; - (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); - const retryOptions = this.storage.retryOptions; - if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options.preconditionOpts)) { - retryOptions.autoRetry = false; + createURI(callback) { + if (!callback) { + return this.createURIAsync(); } - const uploadStream = resumableUpload.upload({ - authClient: this.storage.authClient, - apiEndpoint: this.storage.apiEndpoint, - bucket: this.bucket.name, - customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), - file: this.name, - generation: this.generation, - isPartialUpload: options.isPartialUpload, - key: this.encryptionKey, - kmsKeyName: this.kmsKeyName, - metadata: options.metadata, - offset: options.offset, - predefinedAcl: options.predefinedAcl, - private: options.private, - public: options.public, - uri: options.uri, - userProject: options.userProject || this.userProject, - retryOptions: { ...retryOptions }, - params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, - chunkSize: options === null || options === void 0 ? void 0 : options.chunkSize, - highWaterMark: options === null || options === void 0 ? void 0 : options.highWaterMark, - universeDomain: this.bucket.storage.universeDomain, - [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], - }); - uploadStream - .on('response', resp => { - dup.emit('response', resp); - }) - .on('uri', uri => { - dup.emit('uri', uri); - }) - .on('metadata', metadata => { - this.metadata = metadata; - dup.emit('metadata'); - }) - .on('finish', () => { - dup.emit('complete'); - }) - .on('progress', evt => dup.emit('progress', evt)); - dup.setWritable(uploadStream); - this.storage.retryOptions.autoRetry = this.instanceRetryValue; + this.createURIAsync().then(r => callback(null, r), callback); } - /** - * Takes a readable stream and pipes it to a remote file. Unlike - * `startResumableUpload_`, which uses the resumable upload technique, this - * method uses a simple upload (all or nothing). - * - * @param {Duplexify} dup - Duplexify stream of data to pipe to the file. - * @param {object=} options - Configuration object. - * - * @private - */ - startSimpleUpload_(dup, options = {}) { - var _a; - (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); - const apiEndpoint = this.storage.apiEndpoint; - const bucketName = this.bucket.name; - const uri = `${apiEndpoint}/upload/storage/v1/b/${bucketName}/o`; + async createURIAsync() { + const metadata = { ...this.metadata }; + const headers = {}; + // Delete content length and content type from metadata if they exist. + // These are headers and should not be sent as part of the metadata. + if (metadata.contentLength) { + headers['X-Upload-Content-Length'] = metadata.contentLength.toString(); + delete metadata.contentLength; + } + if (metadata.contentType) { + headers['X-Upload-Content-Type'] = metadata.contentType; + delete metadata.contentType; + } + let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.uri}`; + if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { + googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + } + // Check if headers already exist before creating new ones const reqOpts = { - qs: { - name: this.name, + method: 'POST', + url: [this.baseURI, this.bucket, 'o'].join('/'), + params: Object.assign({ + name: this.file, + uploadType: 'resumable', + }, this.params), + data: metadata, + headers: { + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': googAPIClient, + ...headers, }, - uri: uri, - [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], }; - if (this.generation !== undefined) { - reqOpts.qs.ifGenerationMatch = this.generation; + if (metadata.contentLength) { + reqOpts.headers['X-Upload-Content-Length'] = + metadata.contentLength.toString(); } - if (this.kmsKeyName !== undefined) { - reqOpts.qs.kmsKeyName = this.kmsKeyName; + if (metadata.contentType) { + reqOpts.headers['X-Upload-Content-Type'] = metadata.contentType; } - if (typeof options.timeout === 'number') { - reqOpts.timeout = options.timeout; + if (typeof this.generation !== 'undefined') { + reqOpts.params.ifGenerationMatch = this.generation; } - if (options.userProject || this.userProject) { - reqOpts.qs.userProject = options.userProject || this.userProject; + if (this.kmsKeyName) { + reqOpts.params.kmsKeyName = this.kmsKeyName; } - if (options.predefinedAcl) { - reqOpts.qs.predefinedAcl = options.predefinedAcl; + if (this.predefinedAcl) { + reqOpts.params.predefinedAcl = this.predefinedAcl; } - else if (options.private) { - reqOpts.qs.predefinedAcl = 'private'; + if (this.origin) { + reqOpts.headers.Origin = this.origin; } - else if (options.public) { - reqOpts.qs.predefinedAcl = 'publicRead'; + const uri = await (0, async_retry_1.default)(async (bail) => { + var _a, _b, _c; + try { + const res = await this.makeRequest(reqOpts); + // We have successfully got a URI we can now create a new invocation id + this.currentInvocationId.uri = uuid.v4(); + return res.headers.location; + } + catch (err) { + const e = err; + const apiError = { + code: (_a = e.response) === null || _a === void 0 ? void 0 : _a.status, + name: (_b = e.response) === null || _b === void 0 ? void 0 : _b.statusText, + message: (_c = e.response) === null || _c === void 0 ? void 0 : _c.statusText, + errors: [ + { + reason: e.code, + }, + ], + }; + if (this.retryOptions.maxRetries > 0 && + this.retryOptions.retryableErrorFn(apiError)) { + throw e; + } + else { + return bail(e); + } + } + }, { + retries: this.retryOptions.maxRetries, + factor: this.retryOptions.retryDelayMultiplier, + maxTimeout: this.retryOptions.maxRetryDelay * 1000, //convert to milliseconds + maxRetryTime: this.retryOptions.totalTimeout * 1000, //convert to milliseconds + }); + this.uri = uri; + this.offset = 0; + // emit the newly generated URI for future reuse, if necessary. + this.emit('uri', uri); + return uri; + } + async continueUploading() { + var _a; + (_a = this.offset) !== null && _a !== void 0 ? _a : (await this.getAndSetOffset()); + return this.startUploading(); + } + async startUploading() { + const multiChunkMode = !!this.chunkSize; + let responseReceived = false; + this.numChunksReadInRequest = 0; + if (!this.offset) { + this.offset = 0; } - Object.assign(reqOpts.qs, this.instancePreconditionOpts, options.preconditionOpts); - index_js_1.util.makeWritableStream(dup, { - makeAuthenticatedRequest: (reqOpts) => { - this.request(reqOpts, (err, body, resp) => { - if (err) { - dup.destroy(err); - return; + // Check if the offset (server) is too far behind the current stream + if (this.offset < this.numBytesWritten) { + const delta = this.numBytesWritten - this.offset; + const message = `The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${delta} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`; + this.emit('error', new RangeError(message)); + return; + } + // Check if we should 'fast-forward' to the relevant data to upload + if (this.numBytesWritten < this.offset) { + // 'fast-forward' to the byte where we need to upload. + // only push data from the byte after the one we left off on + const fastForwardBytes = this.offset - this.numBytesWritten; + for await (const _chunk of this.upstreamIterator(fastForwardBytes)) { + _chunk; // discard the data up until the point we want + } + this.numBytesWritten = this.offset; + } + let expectedUploadSize = undefined; + // Set `expectedUploadSize` to `contentLength - this.numBytesWritten`, if available + if (typeof this.contentLength === 'number') { + expectedUploadSize = this.contentLength - this.numBytesWritten; + } + // `expectedUploadSize` should be no more than the `chunkSize`. + // It's possible this is the last chunk request for a multiple + // chunk upload, thus smaller than the chunk size. + if (this.chunkSize) { + expectedUploadSize = expectedUploadSize + ? Math.min(this.chunkSize, expectedUploadSize) + : this.chunkSize; + } + // A queue for the upstream data + const upstreamQueue = this.upstreamIterator(expectedUploadSize); + // The primary read stream for this request. This stream retrieves no more + // than the exact requested amount from upstream. + const requestStream = new stream_1.Readable({ + read: async () => { + // Don't attempt to retrieve data upstream if we already have a response + if (responseReceived) + requestStream.push(null); + const result = await upstreamQueue.next(); + if (result.value) { + this.numChunksReadInRequest++; + if (multiChunkMode) { + // save ever buffer used in the request in multi-chunk mode + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); } - this.metadata = body; - dup.emit('metadata', body); - dup.emit('response', resp); - dup.emit('complete'); - }); + else { + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); + } + this.numBytesWritten += result.value.byteLength; + this.emit('progress', { + bytesWritten: this.numBytesWritten, + contentLength: this.contentLength, + }); + requestStream.push(result.value); + } + if (result.done) { + requestStream.push(null); + } }, - metadata: options.metadata, - request: reqOpts, }); + let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.chunk}`; + if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { + googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + } + const headers = { + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': googAPIClient, + }; + // If using multiple chunk upload, set appropriate header + if (multiChunkMode) { + // We need to know how much data is available upstream to set the `Content-Range` header. + // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + for await (const chunk of this.upstreamIterator(expectedUploadSize)) { + // This will conveniently track and keep the size of the buffers. + // We will reach either the expected upload size or the remainder of the stream. + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, chunk); + } + // This is the sum from the `#addLocalBufferCache` calls + const bytesToUpload = this.localWriteCacheByteLength; + // Important: we want to know if the upstream has ended and the queue is empty before + // unshifting data back into the queue. This way we will know if this is the last request or not. + const isLastChunkOfUpload = !(await this.waitForNextChunk()); + if (isLastChunkOfUpload && __classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").end(); + } + // Important: put the data back in the queue for the actual upload + this.prependLocalBufferToUpstream(); + let totalObjectSize = this.contentLength; + if (typeof this.contentLength !== 'number' && + isLastChunkOfUpload && + !this.isPartialUpload) { + // Let's let the server know this is the last chunk of the object since we didn't set it before. + totalObjectSize = bytesToUpload + this.numBytesWritten; + } + // `- 1` as the ending byte is inclusive in the request. + const endingByte = bytesToUpload + this.numBytesWritten - 1; + // `Content-Length` for multiple chunk uploads is the size of the chunk, + // not the overall object + headers['Content-Length'] = bytesToUpload; + headers['Content-Range'] = + `bytes ${this.offset}-${endingByte}/${totalObjectSize}`; + // Apply X-Goog-Hash header ONLY on the final chunk (WriteObject call) + if (isLastChunkOfUpload) { + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_applyChecksumHeaders).call(this, headers); + } + } + else { + headers['Content-Range'] = `bytes ${this.offset}-*/${this.contentLength}`; + if (__classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").end(); + } + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_applyChecksumHeaders).call(this, headers); + } + const reqOpts = { + method: 'PUT', + url: this.uri, + headers, + body: requestStream, + }; + try { + const resp = await this.makeRequestStream(reqOpts); + if (resp) { + responseReceived = true; + await this.responseHandler(resp); + } + } + catch (e) { + const err = e; + if (this.retryOptions.retryableErrorFn(err)) { + this.attemptDelayedRetry({ + status: NaN, + data: err, + }); + return; + } + this.destroy(err); + } } - disableAutoRetryConditionallyIdempotent_( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - coreOpts, methodType, localPreconditionOptions) { - var _a, _b, _c, _d; - if ((typeof coreOpts === 'object' && - ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && - (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifGenerationMatch) === undefined && - methodType === bucket_js_1.AvailableServiceObjectMethods.delete && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - this.storage.retryOptions.autoRetry = false; + // Process the API response to look for errors that came in + // the response body. + async responseHandler(resp) { + var _a, _b; + if (resp.data.error) { + this.destroy(resp.data.error); + return; } - if ((typeof coreOpts === 'object' && - ((_d = (_c = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _c === void 0 ? void 0 : _c.qs) === null || _d === void 0 ? void 0 : _d.ifMetagenerationMatch) === undefined && - (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && - methodType === bucket_js_1.AvailableServiceObjectMethods.setMetadata && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - this.storage.retryOptions.autoRetry = false; + // At this point we can safely create a new id for the chunk + this.currentInvocationId.chunk = uuid.v4(); + const moreDataToUpload = await this.waitForNextChunk(); + const shouldContinueWithNextMultiChunkRequest = this.chunkSize && + resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && + resp.headers.range && + moreDataToUpload; + /** + * This is true when we're expecting to upload more data in a future request, + * yet the upstream for the upload session has been exhausted. + */ + const shouldContinueUploadInAnotherRequest = this.isPartialUpload && + resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && + !moreDataToUpload; + if (shouldContinueWithNextMultiChunkRequest) { + // Use the upper value in this header to determine where to start the next chunk. + // We should not assume that the server received all bytes sent in the request. + // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + const range = resp.headers.range; + this.offset = Number(range.split('-')[1]) + 1; + // We should not assume that the server received all bytes sent in the request. + // - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + const missingBytes = this.numBytesWritten - this.offset; + if (missingBytes) { + // As multi-chunk uploads send one chunk per request and pulls one + // chunk into the pipeline, prepending the missing bytes back should + // be fine for the next request. + this.prependLocalBufferToUpstream(missingBytes); + this.numBytesWritten -= missingBytes; + } + else { + // No bytes missing - no need to keep the local cache + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); + } + // continue uploading next chunk + this.continueUploading(); + } + else if (!this.isSuccessfulResponse(resp.status) && + !shouldContinueUploadInAnotherRequest) { + const err = new Error('Upload failed'); + err.code = resp.status; + err.name = 'Upload failed'; + if (resp === null || resp === void 0 ? void 0 : resp.data) { + err.errors = [resp === null || resp === void 0 ? void 0 : resp.data]; + } + this.destroy(err); + } + else if (this.isSuccessfulResponse(resp.status)) { + const serverCrc32c = resp.data.crc32c; + const serverMd5 = resp.data.md5Hash; + if (__classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").end(); + } + const clientCrc32cToValidate = ((_a = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _a === void 0 ? void 0 : _a.crc32c) || __classPrivateFieldGet(this, _Upload_clientCrc32c, "f"); + const clientMd5HashToValidate = ((_b = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _b === void 0 ? void 0 : _b.md5Digest) || __classPrivateFieldGet(this, _Upload_clientMd5Hash, "f"); + if (__classPrivateFieldGet(this, _Upload_instances, "m", _Upload_validateChecksum).call(this, clientCrc32cToValidate, serverCrc32c, 'CRC32C') || + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_validateChecksum).call(this, clientMd5HashToValidate, serverMd5, 'MD5')) { + return; + } + // no need to keep the cache + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); + if (resp && resp.data) { + resp.data.size = Number(resp.data.size); + } + this.emit('metadata', resp.data); + // Allow the object (Upload) to continue naturally so the user's + // "finish" event fires. + this.emit('uploadFinished'); + } + else { + // Handles the case where shouldContinueUploadInAnotherRequest is true + // and the response is not successful (e.g., 308 for a partial upload). + // This is the expected behavior for partial uploads that have finished their chunk. + this.emit('uploadFinished'); + } + } + /** + * Check the status of an existing resumable upload. + * + * @param cfg A configuration to use. `uri` is required. + * @returns the current upload status + */ + async checkUploadStatus(config = {}) { + let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.checkUploadStatus}`; + if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { + googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + } + const opts = { + method: 'PUT', + url: this.uri, + headers: { + 'Content-Length': 0, + 'Content-Range': 'bytes */*', + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': googAPIClient, + }, + }; + try { + const resp = await this.makeRequest(opts); + // Successfully got the offset we can now create a new offset invocation id + this.currentInvocationId.checkUploadStatus = uuid.v4(); + return resp; + } + catch (e) { + if (config.retry === false || + !(e instanceof Error) || + !this.retryOptions.retryableErrorFn(e)) { + throw e; + } + const retryDelay = this.getRetryDelay(); + if (retryDelay <= 0) { + throw e; + } + await new Promise(res => setTimeout(res, retryDelay)); + return this.checkUploadStatus(config); + } + } + async getAndSetOffset() { + try { + // we want to handle retries in this method. + const resp = await this.checkUploadStatus({ retry: false }); + if (resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE) { + if (typeof resp.headers.range === 'string') { + this.offset = Number(resp.headers.range.split('-')[1]) + 1; + return; + } + } + this.offset = 0; + } + catch (e) { + const err = e; + if (this.retryOptions.retryableErrorFn(err)) { + this.attemptDelayedRetry({ + status: NaN, + data: err, + }); + return; + } + this.destroy(err); } } - async getBufferFromReadable(readable) { - const buf = []; - for await (const chunk of readable) { - buf.push(chunk); + async makeRequest(reqOpts) { + if (this.encryption) { + reqOpts.headers = reqOpts.headers || {}; + reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; + reqOpts.headers['x-goog-encryption-key'] = this.encryption.key.toString(); + reqOpts.headers['x-goog-encryption-key-sha256'] = + this.encryption.hash.toString(); } - return Buffer.concat(buf); + if (this.userProject) { + reqOpts.params = reqOpts.params || {}; + reqOpts.params.userProject = this.userProject; + } + // Let gaxios know we will handle a 308 error code ourselves. + reqOpts.validateStatus = (status) => { + return (this.isSuccessfulResponse(status) || + status === RESUMABLE_INCOMPLETE_STATUS_CODE); + }; + const combinedReqOpts = { + ...this.customRequestOptions, + ...reqOpts, + headers: { + ...this.customRequestOptions.headers, + ...reqOpts.headers, + }, + }; + const res = await this.authClient.request(combinedReqOpts); + if (res.data && res.data.error) { + throw res.data.error; + } + return res; } -} -exports.File = File; -_File_instances = new WeakSet(), _File_validateIntegrity = -/** - * - * @param hashCalculatingStream - * @param verify - * @returns {boolean} Returns `true` if valid, throws with error otherwise - */ -async function _File_validateIntegrity(hashCalculatingStream, verify = {}) { - const metadata = this.metadata; - // If we're doing validation, assume the worst - let dataMismatch = !!(verify.crc32c || verify.md5); - if (verify.crc32c && metadata.crc32c) { - dataMismatch = !hashCalculatingStream.test('crc32c', metadata.crc32c); + async makeRequestStream(reqOpts) { + const controller = new abort_controller_1.default(); + const errorCallback = () => controller.abort(); + this.once('error', errorCallback); + if (this.userProject) { + reqOpts.params = reqOpts.params || {}; + reqOpts.params.userProject = this.userProject; + } + reqOpts.signal = controller.signal; + reqOpts.validateStatus = () => true; + const combinedReqOpts = { + ...this.customRequestOptions, + ...reqOpts, + headers: { + ...this.customRequestOptions.headers, + ...reqOpts.headers, + }, + }; + const res = await this.authClient.request(combinedReqOpts); + const successfulRequest = this.onResponse(res); + this.removeListener('error', errorCallback); + return successfulRequest ? res : null; } - if (verify.md5 && metadata.md5Hash) { - dataMismatch = !hashCalculatingStream.test('md5', metadata.md5Hash); + /** + * @return {bool} is the request good? + */ + onResponse(resp) { + if (resp.status !== 200 && + this.retryOptions.retryableErrorFn({ + code: resp.status, + message: resp.statusText, + name: resp.statusText, + })) { + this.attemptDelayedRetry(resp); + return false; + } + this.emit('response', resp); + return true; } - if (dataMismatch) { - const errors = []; - let code = ''; - let message = ''; - try { - await this.delete(); - if (verify.md5 && !metadata.md5Hash) { - code = 'MD5_NOT_AVAILABLE'; - message = FileExceptionMessages.MD5_NOT_AVAILABLE; + /** + * @param resp GaxiosResponse object from previous attempt + */ + attemptDelayedRetry(resp) { + if (this.numRetries < this.retryOptions.maxRetries) { + if (resp.status === NOT_FOUND_STATUS_CODE && + this.numChunksReadInRequest === 0) { + this.startUploading(); } else { - code = 'FILE_NO_UPLOAD'; - message = FileExceptionMessages.UPLOAD_MISMATCH; + const retryDelay = this.getRetryDelay(); + if (retryDelay <= 0) { + this.destroy(new Error(`Retry total time limit exceeded - ${JSON.stringify(resp.data)}`)); + return; + } + // Unshift the local cache back in case it's needed for the next request. + this.numBytesWritten -= this.localWriteCacheByteLength; + this.prependLocalBufferToUpstream(); + // We don't know how much data has been received by the server. + // `continueUploading` will recheck the offset via `getAndSetOffset`. + // If `offset` < `numberBytesReceived` then we will raise a RangeError + // as we've streamed too much data that has been missed - this should + // not be the case for multi-chunk uploads as `lastChunkSent` is the + // body of the entire request. + this.offset = undefined; + setTimeout(this.continueUploading.bind(this), retryDelay); } + this.numRetries++; } - catch (e) { - const error = e; - code = 'FILE_NO_UPLOAD_DELETE'; - message = `${FileExceptionMessages.UPLOAD_MISMATCH_DELETE_FAIL}${error.message}`; - errors.push(error); + else { + this.destroy(new Error(`Retry limit exceeded - ${JSON.stringify(resp.data)}`)); } - const error = new RequestError(message); - error.code = code; - error.errors = errors; - throw error; } - return true; + /** + * The amount of time to wait before retrying the request, in milliseconds. + * If negative, do not retry. + * + * @returns the amount of time to wait, in milliseconds. + */ + getRetryDelay() { + const randomMs = Math.round(Math.random() * 1000); + const waitTime = Math.pow(this.retryOptions.retryDelayMultiplier, this.numRetries) * + 1000 + + randomMs; + const maxAllowableDelayMs = this.retryOptions.totalTimeout * 1000 - + (Date.now() - this.timeOfFirstRequest); + const maxRetryDelayMs = this.retryOptions.maxRetryDelay * 1000; + return Math.min(waitTime, maxRetryDelayMs, maxAllowableDelayMs); + } + /* + * Prepare user-defined API endpoint for compatibility with our API. + */ + sanitizeEndpoint(url) { + if (!exports.PROTOCOL_REGEX.test(url)) { + url = `https://${url}`; + } + return url.replace(/\/+$/, ''); // Remove trailing slashes + } + /** + * Check if a given status code is 2xx + * + * @param status The status code to check + * @returns if the status is 2xx + */ + isSuccessfulResponse(status) { + return status >= 200 && status < 300; + } +} +exports.Upload = Upload; +_Upload_hashValidator = new WeakMap(), _Upload_clientCrc32c = new WeakMap(), _Upload_clientMd5Hash = new WeakMap(), _Upload_gcclGcsCmd = new WeakMap(), _Upload_instances = new WeakSet(), _Upload_resetLocalBuffersCache = function _Upload_resetLocalBuffersCache() { + this.localWriteCache = []; + this.localWriteCacheByteLength = 0; +}, _Upload_addLocalBufferCache = function _Upload_addLocalBufferCache(buf) { + this.localWriteCache.push(buf); + this.localWriteCacheByteLength += buf.byteLength; +}, _Upload_validateChecksum = function _Upload_validateChecksum(clientHash, serverHash, hashType) { + // Only validate if both client and server hashes are present. + if (clientHash && serverHash) { + if (clientHash !== serverHash) { + const detailMessage = `${hashType} checksum mismatch. Client calculated: ${clientHash}, Server returned: ${serverHash}`; + const detailError = new Error(detailMessage); + const error = new file_js_1.RequestError(file_js_1.FileExceptionMessages.UPLOAD_MISMATCH); + error.code = 'FILE_NO_UPLOAD'; + error.errors = [detailError]; + this.destroy(error); + return true; + } + } + return false; +}, _Upload_applyChecksumHeaders = function _Upload_applyChecksumHeaders(headers) { + var _a, _b; + const checksums = []; + if ((_a = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _a === void 0 ? void 0 : _a.crc32cEnabled) { + checksums.push(`crc32c=${__classPrivateFieldGet(this, _Upload_hashValidator, "f").crc32c}`); + } + else if (__classPrivateFieldGet(this, _Upload_clientCrc32c, "f")) { + checksums.push(`crc32c=${__classPrivateFieldGet(this, _Upload_clientCrc32c, "f")}`); + } + if ((_b = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _b === void 0 ? void 0 : _b.md5Enabled) { + checksums.push(`md5=${__classPrivateFieldGet(this, _Upload_hashValidator, "f").md5Digest}`); + } + else if (__classPrivateFieldGet(this, _Upload_clientMd5Hash, "f")) { + checksums.push(`md5=${__classPrivateFieldGet(this, _Upload_clientMd5Hash, "f")}`); + } + if (checksums.length > 0) { + headers['X-Goog-Hash'] = checksums.join(','); + } }; -/*! Developer Documentation +function upload(cfg) { + return new Upload(cfg); +} +function createURI(cfg, callback) { + const up = new Upload(cfg); + if (!callback) { + return up.createURI(); + } + up.createURI().then(r => callback(null, r), callback); +} +/** + * Check the status of an existing resumable upload. * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. + * @param cfg A configuration to use. `uri` is required. + * @returns the current upload status */ -(0, promisify_1.promisifyAll)(File, { - exclude: [ - 'cloudStorageURI', - 'publicUrl', - 'request', - 'save', - 'setEncryptionKey', - 'shouldRetryBasedOnPreconditionAndIdempotencyStrat', - 'getBufferFromReadable', - 'restore', - ], -}); +function checkUploadStatus(cfg) { + const up = new Upload(cfg); + return up.checkUploadStatus(); +} /***/ }), -/***/ 40725: +/***/ 59019: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// Copyright 2022 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -122474,116 +127048,334 @@ async function _File_validateIntegrity(hashCalculatingStream, verify = {}) { // 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. -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _HashStreamValidator_crc32cHash, _HashStreamValidator_md5Hash, _HashStreamValidator_md5Digest; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HashStreamValidator = void 0; -const crypto_1 = __nccwpck_require__(6113); -const stream_1 = __nccwpck_require__(12781); -const crc32c_js_1 = __nccwpck_require__(55810); -const file_js_1 = __nccwpck_require__(4713); -class HashStreamValidator extends stream_1.Transform { - constructor(options = {}) { - super(); - this.updateHashesOnly = false; - _HashStreamValidator_crc32cHash.set(this, undefined); - _HashStreamValidator_md5Hash.set(this, undefined); - _HashStreamValidator_md5Digest.set(this, ''); - this.crc32cEnabled = !!options.crc32c; - this.md5Enabled = !!options.md5; - this.updateHashesOnly = !!options.updateHashesOnly; - this.crc32cExpected = options.crc32cExpected; - this.md5Expected = options.md5Expected; - if (this.crc32cEnabled) { - if (options.crc32cInstance) { - __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, options.crc32cInstance, "f"); +exports.SigningError = exports.URLSigner = exports.PATH_STYLED_HOST = exports.SignerExceptionMessages = void 0; +const crypto = __importStar(__nccwpck_require__(6113)); +const url = __importStar(__nccwpck_require__(57310)); +const storage_js_1 = __nccwpck_require__(33030); +const util_js_1 = __nccwpck_require__(59258); +var SignerExceptionMessages; +(function (SignerExceptionMessages) { + SignerExceptionMessages["ACCESSIBLE_DATE_INVALID"] = "The accessible at date provided was invalid."; + SignerExceptionMessages["EXPIRATION_BEFORE_ACCESSIBLE_DATE"] = "An expiration date cannot be before accessible date."; + SignerExceptionMessages["X_GOOG_CONTENT_SHA256"] = "The header X-Goog-Content-SHA256 must be a hexadecimal string."; +})(SignerExceptionMessages || (exports.SignerExceptionMessages = SignerExceptionMessages = {})); +/* + * Default signing version for getSignedUrl is 'v2'. + */ +const DEFAULT_SIGNING_VERSION = 'v2'; +const SEVEN_DAYS = 7 * 24 * 60 * 60; +/** + * @const {string} + * @deprecated - unused + */ +exports.PATH_STYLED_HOST = 'https://storage.googleapis.com'; +class URLSigner { + constructor(auth, bucket, file, + /** + * A {@link Storage} object. + * + * @privateRemarks + * + * Technically this is a required field, however it would be a breaking change to + * move it before optional properties. In the next major we should refactor the + * constructor of this class to only accept a config object. + */ + storage = new storage_js_1.Storage()) { + this.auth = auth; + this.bucket = bucket; + this.file = file; + this.storage = storage; + } + getSignedUrl(cfg) { + const expiresInSeconds = this.parseExpires(cfg.expires); + const method = cfg.method; + const accessibleAtInSeconds = this.parseAccessibleAt(cfg.accessibleAt); + if (expiresInSeconds < accessibleAtInSeconds) { + throw new Error(SignerExceptionMessages.EXPIRATION_BEFORE_ACCESSIBLE_DATE); + } + let customHost; + // Default style is `path`. + const isVirtualHostedStyle = cfg.virtualHostedStyle || false; + if (cfg.cname) { + customHost = cfg.cname; + } + else if (isVirtualHostedStyle) { + customHost = `https://${this.bucket.name}.storage.${this.storage.universeDomain}`; + } + const secondsToMilliseconds = 1000; + const config = Object.assign({}, cfg, { + method, + expiration: expiresInSeconds, + accessibleAt: new Date(secondsToMilliseconds * accessibleAtInSeconds), + bucket: this.bucket.name, + file: this.file ? (0, util_js_1.encodeURI)(this.file.name, false) : undefined, + }); + if (customHost) { + config.cname = customHost; + } + const version = cfg.version || DEFAULT_SIGNING_VERSION; + let promise; + if (version === 'v2') { + promise = this.getSignedUrlV2(config); + } + else if (version === 'v4') { + promise = this.getSignedUrlV4(config); + } + else { + throw new Error(`Invalid signed URL version: ${version}. Supported versions are 'v2' and 'v4'.`); + } + return promise.then(query => { + var _a; + query = Object.assign(query, cfg.queryParams); + const signedUrl = new url.URL(((_a = cfg.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); + signedUrl.pathname = this.getResourcePath(!!config.cname, this.bucket.name, config.file); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + signedUrl.search = (0, util_js_1.qsStringify)(query); + return signedUrl.href; + }); + } + getSignedUrlV2(config) { + const canonicalHeadersString = this.getCanonicalHeaders(config.extensionHeaders || {}); + const resourcePath = this.getResourcePath(false, config.bucket, config.file); + const blobToSign = [ + config.method, + config.contentMd5 || '', + config.contentType || '', + config.expiration, + canonicalHeadersString + resourcePath, + ].join('\n'); + const sign = async () => { + var _a; + const auth = this.auth; + try { + const signature = await auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); + const credentials = await auth.getCredentials(); + return { + GoogleAccessId: credentials.client_email, + Expires: config.expiration, + Signature: signature, + }; } - else { - const crc32cGenerator = options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; - __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, crc32cGenerator(), "f"); + catch (err) { + const error = err; + const signingErr = new SigningError(error.message); + signingErr.stack = error.stack; + throw signingErr; } + }; + return sign(); + } + getSignedUrlV4(config) { + var _a; + config.accessibleAt = config.accessibleAt + ? config.accessibleAt + : new Date(); + const millisecondsToSeconds = 1.0 / 1000.0; + const expiresPeriodInSeconds = config.expiration - config.accessibleAt.valueOf() * millisecondsToSeconds; + // v4 limit expiration to be 7 days maximum + if (expiresPeriodInSeconds > SEVEN_DAYS) { + throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); } - if (this.md5Enabled) { - __classPrivateFieldSet(this, _HashStreamValidator_md5Hash, (0, crypto_1.createHash)('md5'), "f"); + const extensionHeaders = Object.assign({}, config.extensionHeaders); + const fqdn = new url.URL(((_a = config.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); + extensionHeaders.host = fqdn.hostname; + if (config.contentMd5) { + extensionHeaders['content-md5'] = config.contentMd5; + } + if (config.contentType) { + extensionHeaders['content-type'] = config.contentType; + } + let contentSha256; + const sha256Header = extensionHeaders['x-goog-content-sha256']; + if (sha256Header) { + if (typeof sha256Header !== 'string' || + !/[A-Fa-f0-9]{40}/.test(sha256Header)) { + throw new Error(SignerExceptionMessages.X_GOOG_CONTENT_SHA256); + } + contentSha256 = sha256Header; } + const signedHeaders = Object.keys(extensionHeaders) + .map(header => header.toLowerCase()) + .sort() + .join(';'); + const extensionHeadersString = this.getCanonicalHeaders(extensionHeaders); + const datestamp = (0, util_js_1.formatAsUTCISO)(config.accessibleAt); + const credentialScope = `${datestamp}/auto/storage/goog4_request`; + const sign = async () => { + var _a; + const credentials = await this.auth.getCredentials(); + const credential = `${credentials.client_email}/${credentialScope}`; + const dateISO = (0, util_js_1.formatAsUTCISO)(config.accessibleAt ? config.accessibleAt : new Date(), true); + const queryParams = { + 'X-Goog-Algorithm': 'GOOG4-RSA-SHA256', + 'X-Goog-Credential': credential, + 'X-Goog-Date': dateISO, + 'X-Goog-Expires': expiresPeriodInSeconds.toString(10), + 'X-Goog-SignedHeaders': signedHeaders, + ...(config.queryParams || {}), + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const canonicalQueryParams = this.getCanonicalQueryParams(queryParams); + const canonicalRequest = this.getCanonicalRequest(config.method, this.getResourcePath(!!config.cname, config.bucket, config.file), canonicalQueryParams, extensionHeadersString, signedHeaders, contentSha256); + const hash = crypto + .createHash('sha256') + .update(canonicalRequest) + .digest('hex'); + const blobToSign = [ + 'GOOG4-RSA-SHA256', + dateISO, + credentialScope, + hash, + ].join('\n'); + try { + const signature = await this.auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); + const signatureHex = Buffer.from(signature, 'base64').toString('hex'); + const signedQuery = Object.assign({}, queryParams, { + 'X-Goog-Signature': signatureHex, + }); + return signedQuery; + } + catch (err) { + const error = err; + const signingErr = new SigningError(error.message); + signingErr.stack = error.stack; + throw signingErr; + } + }; + return sign(); + } + /** + * Create canonical headers for signing v4 url. + * + * The canonical headers for v4-signing a request demands header names are + * first lowercased, followed by sorting the header names. + * Then, construct the canonical headers part of the request: + * + ":" + Trim() + "\n" + * .. + * + ":" + Trim() + "\n" + * + * @param headers + * @private + */ + getCanonicalHeaders(headers) { + // Sort headers by their lowercased names + const sortedHeaders = (0, util_js_1.objectEntries)(headers) + // Convert header names to lowercase + .map(([headerName, value]) => [ + headerName.toLowerCase(), + value, + ]) + .sort((a, b) => a[0].localeCompare(b[0])); + return sortedHeaders + .filter(([, value]) => value !== undefined) + .map(([headerName, value]) => { + // - Convert Array (multi-valued header) into string, delimited by + // ',' (no space). + // - Trim leading and trailing spaces. + // - Convert sequential (2+) spaces into a single space + const canonicalValue = `${value}`.trim().replace(/\s{2,}/g, ' '); + return `${headerName}:${canonicalValue}\n`; + }) + .join(''); } - /** - * Return the current CRC32C value, if available. - */ - get crc32c() { - var _a; - return (_a = __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) === null || _a === void 0 ? void 0 : _a.toString(); + getCanonicalRequest(method, path, query, headers, signedHeaders, contentSha256) { + return [ + method, + path, + query, + headers, + signedHeaders, + contentSha256 || 'UNSIGNED-PAYLOAD', + ].join('\n'); } - _flush(callback) { - if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) { - __classPrivateFieldSet(this, _HashStreamValidator_md5Digest, __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").digest('base64'), "f"); - } - if (this.updateHashesOnly) { - callback(); - return; - } - // If we're doing validation, assume the worst-- a data integrity - // mismatch. If not, these tests won't be performed, and we can assume - // the best. - // We must check if the server decompressed the data on serve because hash - // validation is not possible in this case. - let failed = this.crc32cEnabled || this.md5Enabled; - if (this.crc32cEnabled && this.crc32cExpected) { - failed = !this.test('crc32c', this.crc32cExpected); - } - if (this.md5Enabled && this.md5Expected) { - failed = !this.test('md5', this.md5Expected); + getCanonicalQueryParams(query) { + return (0, util_js_1.objectEntries)(query) + .map(([key, value]) => [(0, util_js_1.encodeURI)(key, true), (0, util_js_1.encodeURI)(value, true)]) + .sort((a, b) => (a[0] < b[0] ? -1 : 1)) + .map(([key, value]) => `${key}=${value}`) + .join('&'); + } + getResourcePath(cname, bucket, file) { + if (cname) { + return '/' + (file || ''); } - if (failed) { - const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); - mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; - callback(mismatchError); + else if (file) { + return `/${bucket}/${file}`; } else { - callback(); + return `/${bucket}`; } } - _transform(chunk, encoding, callback) { - this.push(chunk, encoding); - try { - if (__classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) - __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").update(chunk); - if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) - __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").update(chunk); - callback(); + parseExpires(expires, current = new Date()) { + const expiresInMSeconds = new Date(expires).valueOf(); + if (isNaN(expiresInMSeconds)) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); } - catch (e) { - callback(e); + if (expiresInMSeconds < current.valueOf()) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); } + return Math.floor(expiresInMSeconds / 1000); // The API expects seconds. } - test(hash, sum) { - const check = Buffer.isBuffer(sum) ? sum.toString('base64') : sum; - if (hash === 'crc32c' && __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) { - return __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").validate(check); - } - if (hash === 'md5' && __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) { - return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f") === check; + parseAccessibleAt(accessibleAt) { + const accessibleAtInMSeconds = new Date(accessibleAt || new Date()).valueOf(); + if (isNaN(accessibleAtInMSeconds)) { + throw new Error(SignerExceptionMessages.ACCESSIBLE_DATE_INVALID); } - return false; + return Math.floor(accessibleAtInMSeconds / 1000); // The API expects seconds. } } -exports.HashStreamValidator = HashStreamValidator; -_HashStreamValidator_crc32cHash = new WeakMap(), _HashStreamValidator_md5Hash = new WeakMap(), _HashStreamValidator_md5Digest = new WeakMap(); +exports.URLSigner = URLSigner; +/** + * Custom error type for errors related to getting signed errors and policies. + * + * @private + */ +class SigningError extends Error { + constructor() { + super(...arguments); + this.name = 'SigningError'; + } +} +exports.SigningError = SigningError; /***/ }), -/***/ 64654: +/***/ 33030: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -122602,1282 +127394,1171 @@ _HashStreamValidator_crc32cHash = new WeakMap(), _HashStreamValidator_md5Hash = // See the License for the specific language governing permissions and // limitations under the License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HmacKey = void 0; +exports.Storage = exports.RETRYABLE_ERR_FN_DEFAULT = exports.MAX_RETRY_DELAY_DEFAULT = exports.TOTAL_TIMEOUT_DEFAULT = exports.RETRY_DELAY_MULTIPLIER_DEFAULT = exports.MAX_RETRY_DEFAULT = exports.AUTO_RETRY_DEFAULT = exports.PROTOCOL_REGEX = exports.StorageExceptionMessages = exports.ExceptionMessages = exports.IdempotencyStrategy = void 0; const index_js_1 = __nccwpck_require__(4052); -const storage_js_1 = __nccwpck_require__(33030); +const paginator_1 = __nccwpck_require__(46412); const promisify_1 = __nccwpck_require__(19203); +const stream_1 = __nccwpck_require__(12781); +const bucket_js_1 = __nccwpck_require__(23973); +const channel_js_1 = __nccwpck_require__(62665); +const file_js_1 = __nccwpck_require__(4713); +const util_js_1 = __nccwpck_require__(59258); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const package_json_helper_cjs_1 = __nccwpck_require__(28568); +const hmacKey_js_1 = __nccwpck_require__(64654); +const crc32c_js_1 = __nccwpck_require__(55810); +const google_auth_library_1 = __nccwpck_require__(20810); +var IdempotencyStrategy; +(function (IdempotencyStrategy) { + IdempotencyStrategy[IdempotencyStrategy["RetryAlways"] = 0] = "RetryAlways"; + IdempotencyStrategy[IdempotencyStrategy["RetryConditional"] = 1] = "RetryConditional"; + IdempotencyStrategy[IdempotencyStrategy["RetryNever"] = 2] = "RetryNever"; +})(IdempotencyStrategy || (exports.IdempotencyStrategy = IdempotencyStrategy = {})); +var ExceptionMessages; +(function (ExceptionMessages) { + ExceptionMessages["EXPIRATION_DATE_INVALID"] = "The expiration date provided was invalid."; + ExceptionMessages["EXPIRATION_DATE_PAST"] = "An expiration date cannot be in the past."; +})(ExceptionMessages || (exports.ExceptionMessages = ExceptionMessages = {})); +var StorageExceptionMessages; +(function (StorageExceptionMessages) { + StorageExceptionMessages["BUCKET_NAME_REQUIRED"] = "A bucket name is needed to use Cloud Storage."; + StorageExceptionMessages["BUCKET_NAME_REQUIRED_CREATE"] = "A name is required to create a bucket."; + StorageExceptionMessages["HMAC_SERVICE_ACCOUNT"] = "The first argument must be a service account email to create an HMAC key."; + StorageExceptionMessages["HMAC_ACCESS_ID"] = "An access ID is needed to create an HmacKey object."; +})(StorageExceptionMessages || (exports.StorageExceptionMessages = StorageExceptionMessages = {})); +exports.PROTOCOL_REGEX = /^(\w*):\/\//; /** - * The API-formatted resource description of the HMAC key. + * Default behavior: Automatically retry retriable server errors. * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. + * @const {boolean} + */ +exports.AUTO_RETRY_DEFAULT = true; +/** + * Default behavior: Only attempt to retry retriable errors 3 times. * - * @name HmacKey#metadata - * @type {object} + * @const {number} */ +exports.MAX_RETRY_DEFAULT = 3; /** - * An HmacKey object contains metadata of an HMAC key created from a - * service account through the {@link Storage} client using - * {@link Storage#createHmacKey}. + * Default behavior: Wait twice as long as previous retry before retrying. * - * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} + * @const {number} + */ +exports.RETRY_DELAY_MULTIPLIER_DEFAULT = 2; +/** + * Default behavior: If the operation doesn't succeed after 600 seconds, + * stop retrying. * - * @class + * @const {number} */ -class HmacKey extends index_js_1.ServiceObject { - /** - * @typedef {object} HmacKeyOptions - * @property {string} [projectId] The project ID of the project that owns - * the service account of the requested HMAC key. If not provided, - * the project ID used to instantiate the Storage client will be used. - */ - /** - * Constructs an HmacKey object. - * - * Note: this only create a local reference to an HMAC key, to create - * an HMAC key, use {@link Storage#createHmacKey}. - * - * @param {Storage} storage The Storage instance this HMAC key is - * attached to. - * @param {string} accessId The unique accessId for this HMAC key. - * @param {HmacKeyOptions} options Constructor configurations. - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const hmacKey = storage.hmacKey('access-id'); - * ``` - */ - constructor(storage, accessId, options) { - const methods = { - /** - * @typedef {object} DeleteHmacKeyOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * @typedef {array} DeleteHmacKeyResponse - * @property {object} 0 The full API response. - */ - /** - * @callback DeleteHmacKeyCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Deletes an HMAC key. - * Key state must be set to `INACTIVE` prior to deletion. - * Caution: HMAC keys cannot be recovered once you delete them. - * - * The authenticated user must have `storage.hmacKeys.delete` permission for the project in which the key exists. - * - * @method HmacKey#delete - * @param {DeleteHmacKeyOptions} [options] Configuration options. - * @param {DeleteHmacKeyCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Delete HMAC key after making the key inactive. - * //- - * const hmacKey = storage.hmacKey('ACCESS_ID'); - * hmacKey.setMetadata({state: 'INACTIVE'}, (err, hmacKeyMetadata) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * hmacKey.delete((err) => { - * if (err) { - * console.error(err); - * return; - * } - * // The HMAC key is deleted. - * }); - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * const hmacKey = storage.hmacKey('ACCESS_ID'); - * hmacKey - * .setMetadata({state: 'INACTIVE'}) - * .then(() => { - * return hmacKey.delete(); - * }); - * ``` - */ - delete: true, - /** - * @callback GetHmacKeyCallback - * @param {?Error} err Request error, if any. - * @param {HmacKey} hmacKey this {@link HmacKey} instance. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} GetHmacKeyResponse - * @property {HmacKey} 0 This {@link HmacKey} instance. - * @property {object} 1 The full API response. - */ - /** - * @typedef {object} GetHmacKeyOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * Retrieves and populate an HMAC key's metadata, and return - * this {@link HmacKey} instance. - * - * HmacKey.get() does not give the HMAC key secret, as - * it is only returned on creation. - * - * The authenticated user must have `storage.hmacKeys.get` permission - * for the project in which the key exists. - * - * @method HmacKey#get - * @param {GetHmacKeyOptions} [options] Configuration options. - * @param {GetHmacKeyCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Get the HmacKey's Metadata. - * //- - * storage.hmacKey('ACCESS_ID') - * .get((err, hmacKey) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * // do something with the returned HmacKey object. - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * storage.hmacKey('ACCESS_ID') - * .get() - * .then((data) => { - * const hmacKey = data[0]; - * }); - * ``` - */ - get: true, - /** - * @typedef {object} GetHmacKeyMetadataOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * Retrieves and populate an HMAC key's metadata, and return - * the HMAC key's metadata as an object. - * - * HmacKey.getMetadata() does not give the HMAC key secret, as - * it is only returned on creation. - * - * The authenticated user must have `storage.hmacKeys.get` permission - * for the project in which the key exists. - * - * @method HmacKey#getMetadata - * @param {GetHmacKeyMetadataOptions} [options] Configuration options. - * @param {HmacKeyMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Get the HmacKey's metadata and populate to the metadata property. - * //- - * storage.hmacKey('ACCESS_ID') - * .getMetadata((err, hmacKeyMetadata) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * console.log(hmacKeyMetadata); - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * storage.hmacKey('ACCESS_ID') - * .getMetadata() - * .then((data) => { - * const hmacKeyMetadata = data[0]; - * console.log(hmacKeyMetadata); - * }); - * ``` - */ - getMetadata: true, - /** - * @typedef {object} SetHmacKeyMetadata Subset of {@link HmacKeyMetadata} to update. - * @property {string} state New state of the HmacKey. Either 'ACTIVE' or 'INACTIVE'. - * @property {string} [etag] Include an etag from a previous get HMAC key request - * to perform safe read-modify-write. - */ - /** - * @typedef {object} SetHmacKeyMetadataOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * @callback HmacKeyMetadataCallback - * @param {?Error} err Request error, if any. - * @param {HmacKeyMetadata} metadata The updated {@link HmacKeyMetadata} object. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} HmacKeyMetadataResponse - * @property {HmacKeyMetadata} 0 The updated {@link HmacKeyMetadata} object. - * @property {object} 1 The full API response. - */ - /** - * Updates the state of an HMAC key. See {@link SetHmacKeyMetadata} for - * valid states. - * - * @method HmacKey#setMetadata - * @param {SetHmacKeyMetadata} metadata The new metadata. - * @param {SetHmacKeyMetadataOptions} [options] Configuration options. - * @param {HmacKeyMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * const metadata = { - * state: 'INACTIVE', - * }; - * - * storage.hmacKey('ACCESS_ID') - * .setMetadata(metadata, (err, hmacKeyMetadata) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * console.log(hmacKeyMetadata); - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * storage.hmacKey('ACCESS_ID') - * .setMetadata(metadata) - * .then((data) => { - * const hmacKeyMetadata = data[0]; - * console.log(hmacKeyMetadata); - * }); - * ``` - */ - setMetadata: { - reqOpts: { - method: 'PUT', - }, - }, - }; - const projectId = (options && options.projectId) || storage.projectId; - super({ - parent: storage, - id: accessId, - baseUrl: `/projects/${projectId}/hmacKeys`, - methods, - }); - this.storage = storage; - this.instanceRetryValue = storage.retryOptions.autoRetry; - } - setMetadata(metadata, optionsOrCallback, cb) { - // ETag preconditions are not currently supported. Retries should be disabled if the idempotency strategy is not set to RetryAlways - if (this.storage.retryOptions.idempotencyStrategy !== - storage_js_1.IdempotencyStrategy.RetryAlways) { - this.storage.retryOptions.autoRetry = false; +exports.TOTAL_TIMEOUT_DEFAULT = 600; +/** + * Default behavior: Wait no more than 64 seconds between retries. + * + * @const {number} + */ +exports.MAX_RETRY_DELAY_DEFAULT = 64; +/** + * Default behavior: Retry conditionally idempotent operations if correct preconditions are set. + * + * @const {enum} + * @private + */ +const IDEMPOTENCY_STRATEGY_DEFAULT = IdempotencyStrategy.RetryConditional; +/** + * Returns true if the API request should be retried, given the error that was + * given the first time the request was attempted. + * @const + * @param {error} err - The API error to check if it is appropriate to retry. + * @return {boolean} True if the API request should be retried, false otherwise. + */ +const RETRYABLE_ERR_FN_DEFAULT = function (err) { + var _a; + const isConnectionProblem = (reason) => { + return (reason.includes('eai_again') || // DNS lookup error + reason === 'econnreset' || + reason === 'unexpected connection closure' || + reason === 'epipe' || + reason === 'socket connection timeout'); + }; + if (err) { + if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { + return true; + } + if (typeof err.code === 'string') { + if (['408', '429', '500', '502', '503', '504'].indexOf(err.code) !== -1) { + return true; + } + const reason = err.code.toLowerCase(); + if (isConnectionProblem(reason)) { + return true; + } + } + if (err.errors) { + for (const e of err.errors) { + const reason = (_a = e === null || e === void 0 ? void 0 : e.reason) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase(); + if (reason && isConnectionProblem(reason)) { + return true; + } + } } - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - super - .setMetadata(metadata, options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - }); } -} -exports.HmacKey = HmacKey; + return false; +}; +exports.RETRYABLE_ERR_FN_DEFAULT = RETRYABLE_ERR_FN_DEFAULT; /*! Developer Documentation * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. + * Invoke this method to create a new Storage object bound with pre-determined + * configuration options. For each object that can be created (e.g., a bucket), + * there is an equivalent static and instance method. While they are classes, + * they can be instantiated without use of the `new` keyword. */ -(0, promisify_1.promisifyAll)(HmacKey); - - -/***/ }), - -/***/ 80352: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Iam = exports.IAMExceptionMessages = void 0; -const promisify_1 = __nccwpck_require__(19203); -const util_js_1 = __nccwpck_require__(59258); -var IAMExceptionMessages; -(function (IAMExceptionMessages) { - IAMExceptionMessages["POLICY_OBJECT_REQUIRED"] = "A policy object is required."; - IAMExceptionMessages["PERMISSIONS_REQUIRED"] = "Permissions are required."; -})(IAMExceptionMessages || (exports.IAMExceptionMessages = IAMExceptionMessages = {})); /** - * Get and set IAM policies for your Cloud Storage bucket. + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. * - * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} - * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} - * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} + * This object provides constants to refer to the three permission levels that + * can be granted to an entity: * - * @constructor Iam + * - `gcs.acl.OWNER_ROLE` - ("OWNER") + * - `gcs.acl.READER_ROLE` - ("READER") + * - `gcs.acl.WRITER_ROLE` - ("WRITER") + * + * See {@link https://cloud.google.com/storage/docs/access-control/lists| About Access Control Lists} + * + * @name Storage#acl + * @type {object} + * @property {string} OWNER_ROLE + * @property {string} READER_ROLE + * @property {string} WRITER_ROLE * - * @param {Bucket} bucket The parent instance. * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * // bucket.iam + * const albums = storage.bucket('albums'); + * + * //- + * // Make all of the files currently in a bucket publicly readable. + * //- + * const options = { + * entity: 'allUsers', + * role: storage.acl.READER_ROLE + * }; + * + * albums.acl.add(options, function(err, aclObject) {}); + * + * //- + * // Make any new objects added to a bucket publicly readable. + * //- + * albums.acl.default.add(options, function(err, aclObject) {}); + * + * //- + * // Grant a user ownership permissions to a bucket. + * //- + * albums.acl.add({ + * entity: 'user-useremail@example.com', + * role: storage.acl.OWNER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * albums.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); * ``` */ -class Iam { - constructor(bucket) { - this.request_ = bucket.request.bind(bucket); - this.resourceId_ = 'buckets/' + bucket.getId(); +/** + * Get {@link Bucket} objects for all of the buckets in your project as + * a readable object stream. + * + * @method Storage#getBucketsStream + * @param {GetBucketsRequest} [query] Query object for listing buckets. + * @returns {ReadableStream} A readable stream that emits {@link Bucket} + * instances. + * + * @example + * ``` + * storage.getBucketsStream() + * .on('error', console.error) + * .on('data', function(bucket) { + * // bucket is a Bucket object. + * }) + * .on('end', function() { + * // All buckets retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * storage.getBucketsStream() + * .on('data', function(bucket) { + * this.end(); + * }); + * ``` + */ +/** + * Get {@link HmacKey} objects for all of the HMAC keys in the project in a + * readable object stream. + * + * @method Storage#getHmacKeysStream + * @param {GetHmacKeysOptions} [options] Configuration options. + * @returns {ReadableStream} A readable stream that emits {@link HmacKey} + * instances. + * + * @example + * ``` + * storage.getHmacKeysStream() + * .on('error', console.error) + * .on('data', function(hmacKey) { + * // hmacKey is an HmacKey object. + * }) + * .on('end', function() { + * // All HmacKey retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * storage.getHmacKeysStream() + * .on('data', function(bucket) { + * this.end(); + * }); + * ``` + */ +/** + *

ACLs

+ * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share files with other users + * and allow other users to access your buckets and files. + * + * To learn more about ACLs, read this overview on + * {@link https://cloud.google.com/storage/docs/access-control| Access Control}. + * + * See {@link https://cloud.google.com/storage/docs/overview| Cloud Storage overview} + * See {@link https://cloud.google.com/storage/docs/access-control| Access Control} + * + * @class + */ +class Storage extends index_js_1.Service { + getBucketsStream() { + // placeholder body, overwritten in constructor + return new stream_1.Readable(); + } + getHmacKeysStream() { + // placeholder body, overwritten in constructor + return new stream_1.Readable(); } /** - * @typedef {object} GetPolicyOptions Requested options for IAM#getPolicy(). - * @property {number} [requestedPolicyVersion] The version of IAM policies to - * request. If a policy with a condition is requested without setting - * this, the server will return an error. This must be set to a value - * of 3 to retrieve IAM policies containing conditions. This is to - * prevent client code that isn't aware of IAM conditions from - * interpreting and modifying policies incorrectly. The service might - * return a policy with version lower than the one that was requested, - * based on the feature syntax in the policy fetched. - * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ + * @callback Crc32cGeneratorToStringCallback + * A method returning the CRC32C as a base64-encoded string. + * + * @returns {string} + * + * @example + * Hashing the string 'data' should return 'rth90Q==' + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.toString(); // 'rth90Q==' + * ``` + **/ /** - * @typedef {array} GetPolicyResponse - * @property {Policy} 0 The policy. - * @property {object} 1 The full API response. - */ + * @callback Crc32cGeneratorValidateCallback + * A method validating a base64-encoded CRC32C string. + * + * @param {string} [value] base64-encoded CRC32C string to validate + * @returns {boolean} + * + * @example + * Should return `true` if the value matches, `false` otherwise + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.validate('DkjKuA=='); // false + * crc32c.validate('rth90Q=='); // true + * ``` + **/ /** - * @typedef {object} Policy - * @property {PolicyBinding[]} policy.bindings Bindings associate members with roles. - * @property {string} [policy.etag] Etags are used to perform a read-modify-write. - * @property {number} [policy.version] The syntax schema version of the Policy. - * To set an IAM policy with conditional binding, this field must be set to - * 3 or greater. - * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} + * @callback Crc32cGeneratorUpdateCallback + * A method for passing `Buffer`s for CRC32C generation. + * + * @param {Buffer} [data] data to update CRC32C value with + * @returns {undefined} + * + * @example + * Hashing buffers from 'some ' and 'text\n' + * + * ```js + * const buffer1 = Buffer.from('some '); + * crc32c.update(buffer1); + * + * const buffer2 = Buffer.from('text\n'); + * crc32c.update(buffer2); + * + * crc32c.toString(); // 'DkjKuA==' + * ``` + **/ + /** + * @typedef {object} CRC32CValidator + * @property {Crc32cGeneratorToStringCallback} + * @property {Crc32cGeneratorValidateCallback} + * @property {Crc32cGeneratorUpdateCallback} */ /** - * @typedef {object} PolicyBinding - * @property {string} role Role that is assigned to members. - * @property {string[]} members Specifies the identities requesting access for the bucket. - * @property {Expr} [condition] The condition that is associated with this binding. + * @callback Crc32cGeneratorCallback + * @returns {CRC32CValidator} */ /** - * @typedef {object} Expr - * @property {string} [title] An optional title for the expression, i.e. a - * short string describing its purpose. This can be used e.g. in UIs - * which allow to enter the expression. - * @property {string} [description] An optional description of the - * expression. This is a longer text which describes the expression, - * e.g. when hovered over it in a UI. - * @property {string} expression Textual representation of an expression in - * Common Expression Language syntax. The application context of the - * containing message determines which well-known feature set of CEL - * is supported.The condition that is associated with this binding. - * - * @see [Condition] https://cloud.google.com/storage/docs/access-control/iam#conditions + * @typedef {object} StorageOptions + * @property {string} [projectId] The project ID from the Google Developer's + * Console, e.g. 'grape-spaceship-123'. We will also check the environment + * variable `GCLOUD_PROJECT` for your project ID. If your app is running + * in an environment which supports {@link + * https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application + * Application Default Credentials}, your project ID will be detected + * automatically. + * @property {string} [keyFilename] Full path to the a .json, .pem, or .p12 key + * downloaded from the Google Developers Console. If you provide a path to + * a JSON file, the `projectId` option above is not necessary. NOTE: .pem and + * .p12 require you to specify the `email` option as well. + * @property {string} [email] Account email address. Required when using a .pem + * or .p12 keyFilename. + * @property {object} [credentials] Credentials object. + * @property {string} [credentials.client_email] + * @property {string} [credentials.private_key] + * @property {object} [retryOptions] Options for customizing retries. Retriable server errors + * will be retried with exponential delay between them dictated by the formula + * max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout + * has been reached. Retries will only happen if autoRetry is set to true. + * @property {boolean} [retryOptions.autoRetry=true] Automatically retry requests if the + * response is related to rate limits or certain intermittent server + * errors. We will exponentially backoff subsequent requests by default. + * @property {number} [retryOptions.retryDelayMultiplier = 2] the multiplier by which to + * increase the delay time between the completion of failed requests, and the + * initiation of the subsequent retrying request. + * @property {number} [retryOptions.totalTimeout = 600] The total time, starting from + * when the initial request is sent, after which an error will + * be returned, regardless of the retrying attempts made meanwhile. + * @property {number} [retryOptions.maxRetryDelay = 64] The maximum delay time between requests. + * When this value is reached, ``retryDelayMultiplier`` will no longer be used to + * increase delay time. + * @property {number} [retryOptions.maxRetries=3] Maximum number of automatic retries + * attempted before returning the error. + * @property {function} [retryOptions.retryableErrorFn] Function that returns true if a given + * error should be retried and false otherwise. + * @property {enum} [retryOptions.idempotencyStrategy=IdempotencyStrategy.RetryConditional] Enumeration + * controls how conditionally idempotent operations are retried. Possible values are: RetryAlways - + * will respect other retry settings and attempt to retry conditionally idempotent operations. RetryConditional - + * will retry conditionally idempotent operations if the correct preconditions are set. RetryNever - never + * retry a conditionally idempotent operation. + * @property {string} [userAgent] The value to be prepended to the User-Agent + * header in API requests. + * @property {object} [authClient] `AuthClient` or `GoogleAuth` client to reuse instead of creating a new one. + * @property {number} [timeout] The amount of time in milliseconds to wait per http request before timing out. + * @property {object[]} [interceptors_] Array of custom request interceptors to be returned in the order they were assigned. + * @property {string} [apiEndpoint = storage.google.com] The API endpoint of the service used to make requests. + * @property {boolean} [useAuthWithCustomEndpoint = false] Controls whether or not to use authentication when using a custom endpoint. + * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} */ /** - * Get the IAM policy. - * - * @param {GetPolicyOptions} [options] Request options. - * @param {GetPolicyCallback} [callback] Callback function. - * @returns {Promise} - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/getIamPolicy| Buckets: setIamPolicy API Documentation} + * Constructs the Storage client. * * @example + * Create a client that uses Application Default Credentials + * (ADC) * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); + * ``` * - * bucket.iam.getPolicy( - * {requestedPolicyVersion: 3}, - * function(err, policy, apiResponse) { + * @example + * Create a client with explicit credentials + * ``` + * const storage = new Storage({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json' + * }); + * ``` * - * }, - * ); + * @example + * Create a client with credentials passed + * by value as a JavaScript object + * ``` + * const storage = new Storage({ + * projectId: 'your-project-id', + * credentials: { + * type: 'service_account', + * project_id: 'xxxxxxx', + * private_key_id: 'xxxx', + * private_key:'-----BEGIN PRIVATE KEY-----xxxxxxx\n-----END PRIVATE KEY-----\n', + * client_email: 'xxxx', + * client_id: 'xxx', + * auth_uri: 'https://accounts.google.com/o/oauth2/auth', + * token_uri: 'https://oauth2.googleapis.com/token', + * auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + * client_x509_cert_url: 'xxx', + * } + * }); + * ``` * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.iam.getPolicy({requestedPolicyVersion: 3}) - * .then(function(data) { - * const policy = data[0]; - * const apiResponse = data[1]; - * }); + * @example + * Create a client with credentials passed + * by loading a JSON file directly from disk + * ``` + * const storage = new Storage({ + * projectId: 'your-project-id', + * credentials: require('/path/to-keyfile.json') + * }); + * ``` * + * @example + * Create a client with an `AuthClient` (e.g. `DownscopedClient`) * ``` - * @example include:samples/iam.js - * region_tag:storage_view_bucket_iam_members - * Example of retrieving a bucket's IAM policy: + * const {DownscopedClient} = require('google-auth-library'); + * const authClient = new DownscopedClient({...}); + * + * const storage = new Storage({authClient}); + * ``` + * + * Additional samples: + * - https://github.com/googleapis/google-auth-library-nodejs#sample-usage-1 + * - https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/downscopedclient.js + * + * @param {StorageOptions} [options] Configuration options. */ - getPolicy(optionsOrCallback, callback) { - const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); - const qs = {}; - if (options.userProject) { - qs.userProject = options.userProject; + constructor(options = {}) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; + const universe = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; + let apiEndpoint = `https://storage.${universe}`; + let customEndpoint = false; + // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. + const EMULATOR_HOST = process.env.STORAGE_EMULATOR_HOST; + if (typeof EMULATOR_HOST === 'string') { + apiEndpoint = Storage.sanitizeEndpoint(EMULATOR_HOST); + customEndpoint = true; } - if (options.requestedPolicyVersion !== null && - options.requestedPolicyVersion !== undefined) { - qs.optionsRequestedPolicyVersion = options.requestedPolicyVersion; + if (options.apiEndpoint && options.apiEndpoint !== apiEndpoint) { + apiEndpoint = Storage.sanitizeEndpoint(options.apiEndpoint); + customEndpoint = true; } - this.request_({ - uri: '/iam', - qs, - }, cb); + options = Object.assign({}, options, { apiEndpoint }); + // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. + const baseUrl = EMULATOR_HOST || `${options.apiEndpoint}/storage/v1`; + const config = { + apiEndpoint: options.apiEndpoint, + retryOptions: { + autoRetry: ((_a = options.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined + ? (_b = options.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry + : exports.AUTO_RETRY_DEFAULT, + maxRetries: ((_c = options.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetries) + ? (_d = options.retryOptions) === null || _d === void 0 ? void 0 : _d.maxRetries + : exports.MAX_RETRY_DEFAULT, + retryDelayMultiplier: ((_e = options.retryOptions) === null || _e === void 0 ? void 0 : _e.retryDelayMultiplier) + ? (_f = options.retryOptions) === null || _f === void 0 ? void 0 : _f.retryDelayMultiplier + : exports.RETRY_DELAY_MULTIPLIER_DEFAULT, + totalTimeout: ((_g = options.retryOptions) === null || _g === void 0 ? void 0 : _g.totalTimeout) + ? (_h = options.retryOptions) === null || _h === void 0 ? void 0 : _h.totalTimeout + : exports.TOTAL_TIMEOUT_DEFAULT, + maxRetryDelay: ((_j = options.retryOptions) === null || _j === void 0 ? void 0 : _j.maxRetryDelay) + ? (_k = options.retryOptions) === null || _k === void 0 ? void 0 : _k.maxRetryDelay + : exports.MAX_RETRY_DELAY_DEFAULT, + retryableErrorFn: ((_l = options.retryOptions) === null || _l === void 0 ? void 0 : _l.retryableErrorFn) + ? (_m = options.retryOptions) === null || _m === void 0 ? void 0 : _m.retryableErrorFn + : exports.RETRYABLE_ERR_FN_DEFAULT, + idempotencyStrategy: ((_o = options.retryOptions) === null || _o === void 0 ? void 0 : _o.idempotencyStrategy) !== undefined + ? (_p = options.retryOptions) === null || _p === void 0 ? void 0 : _p.idempotencyStrategy + : IDEMPOTENCY_STRATEGY_DEFAULT, + }, + baseUrl, + customEndpoint, + useAuthWithCustomEndpoint: options === null || options === void 0 ? void 0 : options.useAuthWithCustomEndpoint, + projectIdRequired: false, + scopes: [ + 'https://www.googleapis.com/auth/iam', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/devstorage.full_control', + ], + packageJson: (0, package_json_helper_cjs_1.getPackageJSON)(), + }; + super(config, options); + /** + * Reference to {@link Storage.acl}. + * + * @name Storage#acl + * @see Storage.acl + */ + this.acl = Storage.acl; + this.crc32cGenerator = + options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; + this.retryOptions = config.retryOptions; + this.getBucketsStream = paginator_1.paginator.streamify('getBuckets'); + this.getHmacKeysStream = paginator_1.paginator.streamify('getHmacKeys'); + } + static sanitizeEndpoint(url) { + if (!exports.PROTOCOL_REGEX.test(url)) { + url = `https://${url}`; + } + return url.replace(/\/+$/, ''); // Remove trailing slashes } /** - * Set the IAM policy. + * Get a reference to a Cloud Storage bucket. * - * @throws {Error} If no policy is provided. + * @param {string} name Name of the bucket. + * @param {object} [options] Configuration object. + * @param {string} [options.kmsKeyName] A Cloud KMS key that will be used to + * encrypt objects inserted into this bucket, if no encryption method is + * specified. + * @param {string} [options.userProject] User project to be billed for all + * requests made from this Bucket object. + * @returns {Bucket} + * @see Bucket * - * @param {Policy} policy The policy. - * @param {SetPolicyOptions} [options] Configuration options. - * @param {SetPolicyCallback} callback Callback function. - * @returns {Promise} + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const albums = storage.bucket('albums'); + * const photos = storage.bucket('photos'); + * ``` + */ + bucket(name, options) { + if (!name) { + throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED); + } + return new bucket_js_1.Bucket(this, name, options); + } + /** + * Reference a channel to receive notifications about changes to your bucket. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy| Buckets: setIamPolicy API Documentation} - * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} + * @param {string} id The ID of the channel. + * @param {string} resourceId The resource ID of the channel. + * @returns {Channel} + * @see Channel * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * - * const myPolicy = { - * bindings: [ - * { - * role: 'roles/storage.admin', - * members: - * ['serviceAccount:myotherproject@appspot.gserviceaccount.com'] - * } - * ] - * }; - * - * bucket.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.iam.setPolicy(myPolicy).then(function(data) { - * const policy = data[0]; - * const apiResponse = data[1]; - * }); - * + * const channel = storage.channel('id', 'resource-id'); * ``` - * @example include:samples/iam.js - * region_tag:storage_add_bucket_iam_member - * Example of adding to a bucket's IAM policy: - * - * @example include:samples/iam.js - * region_tag:storage_remove_bucket_iam_member - * Example of removing from a bucket's IAM policy: */ - setPolicy(policy, optionsOrCallback, callback) { - if (policy === null || typeof policy !== 'object') { - throw new Error(IAMExceptionMessages.POLICY_OBJECT_REQUIRED); - } - const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); - let maxRetries; - if (policy.etag === undefined) { - maxRetries = 0; - } - this.request_({ - method: 'PUT', - uri: '/iam', - maxRetries, - json: Object.assign({ - resourceId: this.resourceId_, - }, policy), - qs: options, - }, cb); + channel(id, resourceId) { + return new channel_js_1.Channel(this, id, resourceId); } /** - * Test a set of permissions for a resource. + * @typedef {array} CreateBucketResponse + * @property {Bucket} 0 The new {@link Bucket}. + * @property {object} 1 The full API response. + */ + /** + * @callback CreateBucketCallback + * @param {?Error} err Request error, if any. + * @param {Bucket} bucket The new {@link Bucket}. + * @param {object} apiResponse The full API response. + */ + /** + * Metadata to set for the bucket. * - * @throws {Error} If permissions are not provided. + * @typedef {object} CreateBucketRequest + * @property {boolean} [archive=false] Specify the storage class as Archive. + * @property {object} [autoclass.enabled=false] Specify whether Autoclass is + * enabled for the bucket. + * @property {object} [autoclass.terminalStorageClass='NEARLINE'] The storage class that objects in an Autoclass bucket eventually transition to if + * they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE. + * @property {boolean} [coldline=false] Specify the storage class as Coldline. + * @property {Cors[]} [cors=[]] Specify the CORS configuration to use. + * @property {CustomPlacementConfig} [customPlacementConfig={}] Specify the bucket's regions for dual-region buckets. + * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. + * @property {boolean} [dra=false] Specify the storage class as Durable Reduced + * Availability. + * @property {boolean} [enableObjectRetention=false] Specify whether or not object retention should be enabled on this bucket. + * @property {object} [hierarchicalNamespace.enabled=false] Specify whether or not to enable hierarchical namespace on this bucket. + * @property {string} [location] Specify the bucket's location. If specifying + * a dual-region, the `customPlacementConfig` property should be set in conjunction. + * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. + * @property {boolean} [multiRegional=false] Specify the storage class as + * Multi-Regional. + * @property {boolean} [nearline=false] Specify the storage class as Nearline. + * @property {boolean} [regional=false] Specify the storage class as Regional. + * @property {boolean} [requesterPays=false] Force the use of the User Project metadata field to assign operational + * costs when an operation is made on a Bucket and its objects. + * @property {string} [rpo] For dual-region buckets, controls whether turbo + * replication is enabled (`ASYNC_TURBO`) or disabled (`DEFAULT`). + * @property {boolean} [standard=true] Specify the storage class as Standard. + * @property {string} [storageClass] The new storage class. (`standard`, + * `nearline`, `coldline`, or `archive`). + * **Note:** The storage classes `multi_regional`, `regional`, and + * `durable_reduced_availability` are now legacy and will be deprecated in + * the future. + * @property {Versioning} [versioning=undefined] Specify the versioning status. + * @property {string} [userProject] The ID of the project which will be billed + * for the request. + */ + /** + * Create a bucket. * - * @param {string|string[]} permissions The permission(s) to test for. - * @param {TestIamPermissionsOptions} [options] Configuration object. - * @param {TestIamPermissionsCallback} [callback] Callback function. - * @returns {Promise} + * Cloud Storage uses a flat namespace, so you can't create a bucket with + * a name that is already in use. For more information, see + * {@link https://cloud.google.com/storage/docs/bucketnaming.html#requirements| Bucket Naming Guidelines}. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/testIamPermissions| Buckets: testIamPermissions API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert| Buckets: insert API Documentation} + * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} + * + * @param {string} name Name of the bucket to create. + * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. + * @param {CreateBucketCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a name is not provided. + * @see Bucket#create * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); + * const callback = function(err, bucket, apiResponse) { + * // `bucket` is a Bucket object. + * }; + * + * storage.createBucket('new-bucket', callback); * * //- - * // Test a single permission. + * // Create a bucket in a specific location and region. See the + * // Official JSON API docs for complete details on the `location` + * option. + * // * //- - * const test = 'storage.buckets.delete'; + * const metadata = { + * location: 'US-CENTRAL1', + * regional: true + * }; * - * bucket.iam.testPermissions(test, function(err, permissions, apiResponse) { - * console.log(permissions); - * // { - * // "storage.buckets.delete": true - * // } - * }); + * storage.createBucket('new-bucket', metadata, callback); * * //- - * // Test several permissions at once. + * // Create a bucket with a retention policy of 6 months. * //- - * const tests = [ - * 'storage.buckets.delete', - * 'storage.buckets.get' - * ]; + * const metadata = { + * retentionPolicy: { + * retentionPeriod: 15780000 // 6 months in seconds. + * } + * }; * - * bucket.iam.testPermissions(tests, function(err, permissions) { - * console.log(permissions); - * // { - * // "storage.buckets.delete": false, - * // "storage.buckets.get": true - * // } - * }); + * storage.createBucket('new-bucket', metadata, callback); + * + * //- + * // Enable versioning on a new bucket. + * //- + * const metadata = { + * versioning: { + * enabled: true + * } + * }; + * + * storage.createBucket('new-bucket', metadata, callback); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.iam.testPermissions(test).then(function(data) { - * const permissions = data[0]; + * storage.createBucket('new-bucket').then(function(data) { + * const bucket = data[0]; * const apiResponse = data[1]; * }); - * ``` - */ - testPermissions(permissions, optionsOrCallback, callback) { - if (!Array.isArray(permissions) && typeof permissions !== 'string') { - throw new Error(IAMExceptionMessages.PERMISSIONS_REQUIRED); - } - const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); - const permissionsArray = Array.isArray(permissions) - ? permissions - : [permissions]; - const req = Object.assign({ - permissions: permissionsArray, - }, options); - this.request_({ - uri: '/iam/testPermissions', - qs: req, - useQuerystring: true, - }, (err, resp) => { - if (err) { - cb(err, null, resp); - return; - } - const availablePermissions = Array.isArray(resp.permissions) - ? resp.permissions - : []; - const permissionsHash = permissionsArray.reduce((acc, permission) => { - acc[permission] = availablePermissions.indexOf(permission) > -1; - return acc; - }, {}); - cb(null, permissionsHash, resp); - }); - } -} -exports.Iam = Iam; -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(Iam); - - -/***/ }), - -/***/ 27577: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Notification = exports.Iam = exports.HmacKey = exports.File = exports.Channel = exports.Bucket = exports.Storage = exports.IdempotencyStrategy = exports.ApiError = void 0; -/** - * The `@google-cloud/storage` package has a single named export which is the - * {@link Storage} (ES6) class, which should be instantiated with `new`. - * - * See {@link Storage} and {@link ClientConfig} for client methods and - * configuration options. - * - * @module {Storage} @google-cloud/storage - * @alias nodejs-storage - * - * @example - * Install the client library with npm: - * ``` - * npm install --save @google-cloud/storage - * ``` - * - * @example - * Import the client library - * ``` - * const {Storage} = require('@google-cloud/storage'); - * ``` - * - * @example - * Create a client that uses Application - * Default Credentials (ADC): - * ``` - * const storage = new Storage(); - * ``` - * - * @example - * Create a client with explicit - * credentials: - * ``` - * const storage = new Storage({ projectId: - * 'your-project-id', keyFilename: '/path/to/keyfile.json' - * }); - * ``` - * - * @example include:samples/quickstart.js - * region_tag:storage_quickstart - * Full quickstart example: - */ -var index_js_1 = __nccwpck_require__(4052); -Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return index_js_1.ApiError; } })); -var storage_js_1 = __nccwpck_require__(33030); -Object.defineProperty(exports, "IdempotencyStrategy", ({ enumerable: true, get: function () { return storage_js_1.IdempotencyStrategy; } })); -Object.defineProperty(exports, "Storage", ({ enumerable: true, get: function () { return storage_js_1.Storage; } })); -var bucket_js_1 = __nccwpck_require__(23973); -Object.defineProperty(exports, "Bucket", ({ enumerable: true, get: function () { return bucket_js_1.Bucket; } })); -__exportStar(__nccwpck_require__(55810), exports); -var channel_js_1 = __nccwpck_require__(62665); -Object.defineProperty(exports, "Channel", ({ enumerable: true, get: function () { return channel_js_1.Channel; } })); -var file_js_1 = __nccwpck_require__(4713); -Object.defineProperty(exports, "File", ({ enumerable: true, get: function () { return file_js_1.File; } })); -__exportStar(__nccwpck_require__(40725), exports); -var hmacKey_js_1 = __nccwpck_require__(64654); -Object.defineProperty(exports, "HmacKey", ({ enumerable: true, get: function () { return hmacKey_js_1.HmacKey; } })); -var iam_js_1 = __nccwpck_require__(80352); -Object.defineProperty(exports, "Iam", ({ enumerable: true, get: function () { return iam_js_1.Iam; } })); -var notification_js_1 = __nccwpck_require__(21178); -Object.defineProperty(exports, "Notification", ({ enumerable: true, get: function () { return notification_js_1.Notification; } })); -__exportStar(__nccwpck_require__(45594), exports); - - -/***/ }), - -/***/ 4052: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.util = exports.ApiError = exports.ServiceObject = exports.Service = void 0; -var service_js_1 = __nccwpck_require__(17370); -Object.defineProperty(exports, "Service", ({ enumerable: true, get: function () { return service_js_1.Service; } })); -var service_object_js_1 = __nccwpck_require__(73409); -Object.defineProperty(exports, "ServiceObject", ({ enumerable: true, get: function () { return service_object_js_1.ServiceObject; } })); -var util_js_1 = __nccwpck_require__(38064); -Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return util_js_1.ApiError; } })); -Object.defineProperty(exports, "util", ({ enumerable: true, get: function () { return util_js_1.util; } })); - - -/***/ }), - -/***/ 73409: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServiceObject = void 0; -/*! - * Copyright 2022 Google LLC. All Rights Reserved. - * - * 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. - */ -const promisify_1 = __nccwpck_require__(19203); -const events_1 = __nccwpck_require__(82361); -const util_js_1 = __nccwpck_require__(38064); -/** - * ServiceObject is a base class, meant to be inherited from by a "service - * object," like a BigQuery dataset or Storage bucket. - * - * Most of the time, these objects share common functionality; they can be - * created or deleted, and you can get or set their metadata. - * - * By inheriting from this class, a service object will be extended with these - * shared behaviors. Note that any method can be overridden when the service - * object requires specific behavior. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -class ServiceObject extends events_1.EventEmitter { - /* - * @constructor - * @alias module:common/service-object - * - * @private * - * @param {object} config - Configuration object. - * @param {string} config.baseUrl - The base URL to make API requests to. - * @param {string} config.createMethod - The method which creates this object. - * @param {string=} config.id - The identifier of the object. For example, the - * name of a Storage bucket or Pub/Sub topic. - * @param {object=} config.methods - A map of each method name that should be inherited. - * @param {object} config.methods[].reqOpts - Default request options for this - * particular method. A common use case is when `setMetadata` requires a - * `PUT` method to override the default `PATCH`. - * @param {object} config.parent - The parent service instance. For example, an - * instance of Storage if the object is Bucket. + * ``` + * @example include:samples/buckets.js + * region_tag:storage_create_bucket + * Another example: */ - constructor(config) { - super(); - this.metadata = {}; - this.baseUrl = config.baseUrl; - this.parent = config.parent; // Parent class. - this.id = config.id; // Name or ID (e.g. dataset ID, bucket name, etc). - this.createMethod = config.createMethod; - this.methods = config.methods || {}; - this.interceptors = []; - this.projectId = config.projectId; - if (config.methods) { - // This filters the ServiceObject instance (e.g. a "File") to only have - // the configured methods. We make a couple of exceptions for core- - // functionality ("request()" and "getRequestInterceptors()") - Object.getOwnPropertyNames(ServiceObject.prototype) - .filter(methodName => { - return ( - // All ServiceObjects need `request` and `getRequestInterceptors`. - // clang-format off - !/^request/.test(methodName) && - !/^getRequestInterceptors/.test(methodName) && - // clang-format on - // The ServiceObject didn't redefine the method. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this[methodName] === - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ServiceObject.prototype[methodName] && - // This method isn't wanted. - !config.methods[methodName]); - }) - .forEach(methodName => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this[methodName] = undefined; - }); - } - } - create(optionsOrCallback, callback) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - const args = [this.id]; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + createBucket(name, metadataOrCallback, callback) { + if (!name) { + throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED_CREATE); } - if (typeof optionsOrCallback === 'object') { - args.push(optionsOrCallback); + let metadata; + if (!callback) { + callback = metadataOrCallback; + metadata = {}; } - // Wrap the callback to return *this* instance of the object, not the - // newly-created one. - // tslint: disable-next-line no-any - function onCreate(...args) { - const [err, instance] = args; - if (!err) { - self.metadata = instance.metadata; - if (self.id && instance.metadata) { - self.id = instance.metadata.id; - } - args[1] = self; // replace the created `instance` with this one. - } - callback(...args); + else { + metadata = metadataOrCallback; } - args.push(onCreate); - // eslint-disable-next-line prefer-spread - this.createMethod.apply(null, args); - } - delete(optionsOrCallback, cb) { - var _a; - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const ignoreNotFound = options.ignoreNotFound; - delete options.ignoreNotFound; - const methodConfig = (typeof this.methods.delete === 'object' && this.methods.delete) || {}; - const reqOpts = { - method: 'DELETE', - uri: '', - ...methodConfig.reqOpts, - qs: { - ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, - ...options, - }, + const body = { + ...metadata, + name, }; - // The `request` method may have been overridden to hold any special - // behavior. Ensure we call the original `request` method. - ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { - if (err) { - if (err.code === 404 && ignoreNotFound) { - err = null; + const storageClasses = { + archive: 'ARCHIVE', + coldline: 'COLDLINE', + dra: 'DURABLE_REDUCED_AVAILABILITY', + multiRegional: 'MULTI_REGIONAL', + nearline: 'NEARLINE', + regional: 'REGIONAL', + standard: 'STANDARD', + }; + const storageClassKeys = Object.keys(storageClasses); + for (const storageClass of storageClassKeys) { + if (body[storageClass]) { + if (metadata.storageClass && metadata.storageClass !== storageClass) { + throw new Error(`Both \`${storageClass}\` and \`storageClass\` were provided.`); } + body.storageClass = storageClasses[storageClass]; + delete body[storageClass]; } - callback(err, res); - }); - } - exists(optionsOrCallback, cb) { - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - this.get(options, err => { + } + if (body.requesterPays) { + body.billing = { + requesterPays: body.requesterPays, + }; + delete body.requesterPays; + } + const query = { + project: this.projectId, + }; + if (body.userProject) { + query.userProject = body.userProject; + delete body.userProject; + } + if (body.enableObjectRetention) { + query.enableObjectRetention = body.enableObjectRetention; + delete body.enableObjectRetention; + } + if (body.predefinedAcl) { + query.predefinedAcl = body.predefinedAcl; + delete body.predefinedAcl; + } + if (body.predefinedDefaultObjectAcl) { + query.predefinedDefaultObjectAcl = body.predefinedDefaultObjectAcl; + delete body.predefinedDefaultObjectAcl; + } + if (body.projection) { + query.projection = body.projection; + delete body.projection; + } + this.request({ + method: 'POST', + uri: '/b', + qs: query, + json: body, + }, (err, resp) => { if (err) { - if (err.code === 404) { - callback(null, false); - } - else { - callback(err); - } + callback(err, null, resp); return; } - callback(null, true); + const bucket = this.bucket(name); + bucket.metadata = resp; + callback(null, bucket, resp); }); } - get(optionsOrCallback, cb) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - const [opts, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const options = Object.assign({}, opts); - const autoCreate = options.autoCreate && typeof this.create === 'function'; - delete options.autoCreate; - function onCreate(err, instance, apiResponse) { - if (err) { - if (err.code === 409) { - self.get(options, callback); - return; - } - callback(err, null, apiResponse); - return; - } - callback(null, instance, apiResponse); + /** + * @typedef {object} CreateHmacKeyOptions + * @property {string} [projectId] The project ID of the project that owns + * the service account of the requested HMAC key. If not provided, + * the project ID used to instantiate the Storage client will be used. + * @property {string} [userProject] This parameter is currently ignored. + */ + /** + * @typedef {object} HmacKeyMetadata + * @property {string} accessId The access id identifies which HMAC key was + * used to sign a request when authenticating with HMAC. + * @property {string} etag Used to perform a read-modify-write of the key. + * @property {string} id The resource name of the HMAC key. + * @property {string} projectId The project ID. + * @property {string} serviceAccountEmail The service account's email this + * HMAC key is created for. + * @property {string} state The state of this HMAC key. One of "ACTIVE", + * "INACTIVE" or "DELETED". + * @property {string} timeCreated The creation time of the HMAC key in + * RFC 3339 format. + * @property {string} [updated] The time this HMAC key was last updated in + * RFC 3339 format. + */ + /** + * @typedef {array} CreateHmacKeyResponse + * @property {HmacKey} 0 The HmacKey instance created from API response. + * @property {string} 1 The HMAC key's secret used to access the XML API. + * @property {object} 3 The raw API response. + */ + /** + * @callback CreateHmacKeyCallback Callback function. + * @param {?Error} err Request error, if any. + * @param {HmacKey} hmacKey The HmacKey instance created from API response. + * @param {string} secret The HMAC key's secret used to access the XML API. + * @param {object} apiResponse The raw API response. + */ + /** + * Create an HMAC key associated with an service account to authenticate + * requests to the Cloud Storage XML API. + * + * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} + * + * @param {string} serviceAccountEmail The service account's email address + * with which the HMAC key is created for. + * @param {CreateHmacKeyCallback} [callback] Callback function. + * @return {Promise} + * + * @example + * ``` + * const {Storage} = require('google-cloud/storage'); + * const storage = new Storage(); + * + * // Replace with your service account's email address + * const serviceAccountEmail = + * 'my-service-account@appspot.gserviceaccount.com'; + * + * storage.createHmacKey(serviceAccountEmail, function(err, hmacKey, secret) { + * if (!err) { + * // Securely store the secret for use with the XML API. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * storage.createHmacKey(serviceAccountEmail) + * .then((response) => { + * const hmacKey = response[0]; + * const secret = response[1]; + * // Securely store the secret for use with the XML API. + * }); + * ``` + */ + createHmacKey(serviceAccountEmail, optionsOrCb, cb) { + if (typeof serviceAccountEmail !== 'string') { + throw new Error(StorageExceptionMessages.HMAC_SERVICE_ACCOUNT); } - this.getMetadata(options, (err, metadata) => { + const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); + const query = Object.assign({}, options, { serviceAccountEmail }); + const projectId = query.projectId || this.projectId; + delete query.projectId; + this.request({ + method: 'POST', + uri: `/projects/${projectId}/hmacKeys`, + qs: query, + maxRetries: 0, //explicitly set this value since this is a non-idempotent function + }, (err, resp) => { if (err) { - if (err.code === 404 && autoCreate) { - const args = []; - if (Object.keys(options).length > 0) { - args.push(options); - } - args.push(onCreate); - self.create(...args); - return; - } - callback(err, null, metadata); + callback(err, null, null, resp); return; } - callback(null, self, metadata); - }); - } - getMetadata(optionsOrCallback, cb) { - var _a; - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const methodConfig = (typeof this.methods.getMetadata === 'object' && - this.methods.getMetadata) || - {}; - const reqOpts = { - uri: '', - ...methodConfig.reqOpts, - qs: { - ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, - ...options, - }, - }; - // The `request` method may have been overridden to hold any special - // behavior. Ensure we call the original `request` method. - ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { - this.metadata = body; - callback(err, this.metadata, res); + const metadata = resp.metadata; + const hmacKey = this.hmacKey(metadata.accessId, { + projectId: metadata.projectId, + }); + hmacKey.metadata = resp.metadata; + callback(null, hmacKey, resp.secret, resp); }); } /** - * Return the user's custom request interceptors. + * Query object for listing buckets. + * + * @typedef {object} GetBucketsRequest + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return per call. + * Note: By default will handle pagination automatically + * if more than 1 page worth of results are requested per call. + * When `autoPaginate` is set to `false` the smaller of `maxResults` + * or 1 page of results will be returned per call. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @property {string} [userProject] The ID of the project which will be billed + * for the request. + * @param {boolean} [softDeleted] If true, returns the soft-deleted object. + * Object `generation` is required if `softDeleted` is set to True. */ - getRequestInterceptors() { - // Interceptors should be returned in the order they were assigned. - const localInterceptors = this.interceptors - .filter(interceptor => typeof interceptor.request === 'function') - .map(interceptor => interceptor.request); - return this.parent.getRequestInterceptors().concat(localInterceptors); - } - setMetadata(metadata, optionsOrCallback, cb) { - var _a, _b; - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const methodConfig = (typeof this.methods.setMetadata === 'object' && - this.methods.setMetadata) || - {}; - const reqOpts = { - method: 'PATCH', - uri: '', - ...methodConfig.reqOpts, - json: { - ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.json, - ...metadata, - }, - qs: { - ...(_b = methodConfig.reqOpts) === null || _b === void 0 ? void 0 : _b.qs, - ...options, - }, - }; - // The `request` method may have been overridden to hold any special - // behavior. Ensure we call the original `request` method. - ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { - this.metadata = body; - callback(err, this.metadata, res); - }); - } - request_(reqOpts, callback) { - reqOpts = { ...reqOpts }; - if (this.projectId) { - reqOpts.projectId = this.projectId; - } - const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; - const uriComponents = [this.baseUrl, this.id || '', reqOpts.uri]; - if (isAbsoluteUrl) { - uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); - } - reqOpts.uri = uriComponents - .filter(x => x.trim()) // Limit to non-empty strings. - .map(uriComponent => { - const trimSlashesRegex = /^\/*|\/*$/g; - return uriComponent.replace(trimSlashesRegex, ''); - }) - .join('/'); - const childInterceptors = Array.isArray(reqOpts.interceptors_) - ? reqOpts.interceptors_ - : []; - const localInterceptors = [].slice.call(this.interceptors); - reqOpts.interceptors_ = childInterceptors.concat(localInterceptors); - if (reqOpts.shouldReturnStream) { - return this.parent.requestStream(reqOpts); - } - this.parent.request(reqOpts, callback); - } - request(reqOpts, callback) { - this.request_(reqOpts, callback); - } /** - * Make an authenticated API request. - * - * @param {object} reqOpts - Request options that are passed to `request`. - * @param {string} reqOpts.uri - A URI relative to the baseUrl. + * @typedef {array} GetBucketsResponse + * @property {Bucket[]} 0 Array of {@link Bucket} instances. + * @property {object} 1 nextQuery A query object to receive more results. + * @property {object} 2 The full API response. */ - requestStream(reqOpts) { - const opts = { ...reqOpts, shouldReturnStream: true }; - return this.request_(opts); - } -} -exports.ServiceObject = ServiceObject; -(0, promisify_1.promisifyAll)(ServiceObject, { exclude: ['getRequestInterceptors'] }); - - -/***/ }), - -/***/ 17370: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Service = exports.DEFAULT_PROJECT_ID_TOKEN = void 0; -/*! - * Copyright 2022 Google LLC. All Rights Reserved. - * - * 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. - */ -const google_auth_library_1 = __nccwpck_require__(20810); -const uuid = __importStar(__nccwpck_require__(44458)); -const util_js_1 = __nccwpck_require__(38064); -const util_js_2 = __nccwpck_require__(59258); -exports.DEFAULT_PROJECT_ID_TOKEN = '{{projectId}}'; -class Service { /** - * Service is a base class, meant to be inherited from by a "service," like - * BigQuery or Storage. + * @callback GetBucketsCallback + * @param {?Error} err Request error, if any. + * @param {Bucket[]} buckets Array of {@link Bucket} instances. + * @param {object} nextQuery A query object to receive more results. + * @param {object} apiResponse The full API response. + */ + /** + * Get Bucket objects for all of the buckets in your project. * - * This handles making authenticated requests by exposing a `makeReq_` - * function. + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list| Buckets: list API Documentation} * - * @constructor - * @alias module:common/service + * @param {GetBucketsRequest} [query] Query object for listing buckets. + * @param {GetBucketsCallback} [callback] Callback function. + * @returns {Promise} * - * @param {object} config - Configuration object. - * @param {string} config.baseUrl - The base URL to make API requests to. - * @param {string[]} config.scopes - The scopes required for the request. - * @param {object=} options - [Configuration object](#/docs). - */ - constructor(config, options = {}) { - this.baseUrl = config.baseUrl; - this.apiEndpoint = config.apiEndpoint; - this.timeout = options.timeout; - this.globalInterceptors = Array.isArray(options.interceptors_) - ? options.interceptors_ - : []; - this.interceptors = []; - this.packageJson = config.packageJson; - this.projectId = options.projectId || exports.DEFAULT_PROJECT_ID_TOKEN; - this.projectIdRequired = config.projectIdRequired !== false; - this.providedUserAgent = options.userAgent; - this.universeDomain = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; - this.customEndpoint = config.customEndpoint || false; - this.makeAuthenticatedRequest = util_js_1.util.makeAuthenticatedRequestFactory({ - ...config, - projectIdRequired: this.projectIdRequired, - projectId: this.projectId, - authClient: options.authClient || config.authClient, - credentials: options.credentials, - keyFile: options.keyFilename, - email: options.email, - clientOptions: { - universeDomain: options.universeDomain, - ...options.clientOptions, - }, - }); - this.authClient = this.makeAuthenticatedRequest.authClient; - const isCloudFunctionEnv = !!process.env.FUNCTION_NAME; - if (isCloudFunctionEnv) { - this.interceptors.push({ - request(reqOpts) { - reqOpts.forever = false; - return reqOpts; - }, - }); - } - } - /** - * Return the user's custom request interceptors. + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * storage.getBuckets(function(err, buckets) { + * if (!err) { + * // buckets is an array of Bucket objects. + * } + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * const callback = function(err, buckets, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * storage.getBuckets(nextQuery, callback); + * } + * + * // The `metadata` property is populated for you with the metadata at the + * // time of fetching. + * buckets[0].metadata; + * + * // However, in cases where you are concerned the metadata could have + * // changed, use the `getMetadata` method. + * buckets[0].getMetadata(function(err, metadata, apiResponse) {}); + * }; + * + * storage.getBuckets({ + * autoPaginate: false + * }, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * storage.getBuckets().then(function(data) { + * const buckets = data[0]; + * }); + * + * ``` + * @example include:samples/buckets.js + * region_tag:storage_list_buckets + * Another example: */ - getRequestInterceptors() { - // Interceptors should be returned in the order they were assigned. - return [].slice - .call(this.globalInterceptors) - .concat(this.interceptors) - .filter(interceptor => typeof interceptor.request === 'function') - .map(interceptor => interceptor.request); - } - getProjectId(callback) { - if (!callback) { - return this.getProjectIdAsync(); - } - this.getProjectIdAsync().then(p => callback(null, p), callback); - } - async getProjectIdAsync() { - const projectId = await this.authClient.getProjectId(); - if (this.projectId === exports.DEFAULT_PROJECT_ID_TOKEN && projectId) { - this.projectId = projectId; - } - return this.projectId; - } - request_(reqOpts, callback) { - reqOpts = { ...reqOpts, timeout: this.timeout }; - const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; - const uriComponents = [this.baseUrl]; - if (this.projectIdRequired) { - if (reqOpts.projectId) { - uriComponents.push('projects'); - uriComponents.push(reqOpts.projectId); - } - else { - uriComponents.push('projects'); - uriComponents.push(this.projectId); - } - } - uriComponents.push(reqOpts.uri); - if (isAbsoluteUrl) { - uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); - } - reqOpts.uri = uriComponents - .map(uriComponent => { - const trimSlashesRegex = /^\/*|\/*$/g; - return uriComponent.replace(trimSlashesRegex, ''); - }) - .join('/') - // Some URIs have colon separators. - // Bad: https://.../projects/:list - // Good: https://.../projects:list - .replace(/\/:/g, ':'); - const requestInterceptors = this.getRequestInterceptors(); - const interceptorArray = Array.isArray(reqOpts.interceptors_) - ? reqOpts.interceptors_ - : []; - interceptorArray.forEach(interceptor => { - if (typeof interceptor.request === 'function') { - requestInterceptors.push(interceptor.request); + getBuckets(optionsOrCallback, cb) { + const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); + options.project = options.project || this.projectId; + this.request({ + uri: '/b', + qs: options, + }, (err, resp) => { + if (err) { + callback(err, null, null, resp); + return; + } + const itemsArray = resp.items ? resp.items : []; + const unreachableArray = resp.unreachable ? resp.unreachable : []; + const buckets = itemsArray.map((bucket) => { + const bucketInstance = this.bucket(bucket.id); + bucketInstance.metadata = bucket; + return bucketInstance; + }); + if (unreachableArray.length > 0) { + unreachableArray.forEach((fullPath) => { + const name = fullPath.split('/').pop(); + if (name) { + const placeholder = this.bucket(name); + placeholder.unreachable = true; + placeholder.metadata = {}; + buckets.push(placeholder); + } + }); } + const nextQuery = resp.nextPageToken + ? Object.assign({}, options, { pageToken: resp.nextPageToken }) + : null; + callback(null, buckets, nextQuery, resp); }); - requestInterceptors.forEach(requestInterceptor => { - reqOpts = requestInterceptor(reqOpts); + } + getHmacKeys(optionsOrCb, cb) { + const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); + const query = Object.assign({}, options); + const projectId = query.projectId || this.projectId; + delete query.projectId; + this.request({ + uri: `/projects/${projectId}/hmacKeys`, + qs: query, + }, (err, resp) => { + if (err) { + callback(err, null, null, resp); + return; + } + const itemsArray = resp.items ? resp.items : []; + const hmacKeys = itemsArray.map((hmacKey) => { + const hmacKeyInstance = this.hmacKey(hmacKey.accessId, { + projectId: hmacKey.projectId, + }); + hmacKeyInstance.metadata = hmacKey; + return hmacKeyInstance; + }); + const nextQuery = resp.nextPageToken + ? Object.assign({}, options, { pageToken: resp.nextPageToken }) + : null; + callback(null, hmacKeys, nextQuery, resp); }); - delete reqOpts.interceptors_; - const pkg = this.packageJson; - let userAgent = (0, util_js_2.getUserAgentString)(); - if (this.providedUserAgent) { - userAgent = `${this.providedUserAgent} ${userAgent}`; - } - reqOpts.headers = { - ...reqOpts.headers, - 'User-Agent': userAgent, - 'x-goog-api-client': `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${pkg.version}-${(0, util_js_2.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, - }; - if (reqOpts[util_js_1.GCCL_GCS_CMD_KEY]) { - reqOpts.headers['x-goog-api-client'] += - ` gccl-gcs-cmd/${reqOpts[util_js_1.GCCL_GCS_CMD_KEY]}`; - } - if (reqOpts.shouldReturnStream) { - return this.makeAuthenticatedRequest(reqOpts); - } - else { - this.makeAuthenticatedRequest(reqOpts, callback); - } } /** - * Make an authenticated API request. + * @typedef {array} GetServiceAccountResponse + * @property {object} 0 The service account resource. + * @property {object} 1 The full + * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. + */ + /** + * @callback GetServiceAccountCallback + * @param {?Error} err Request error, if any. + * @param {object} serviceAccount The serviceAccount resource. + * @param {string} serviceAccount.emailAddress The service account email + * address. + * @param {object} apiResponse The full + * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. + */ + /** + * Get the email address of this project's Google Cloud Storage service + * account. * - * @param {object} reqOpts - Request options that are passed to `request`. - * @param {string} reqOpts.uri - A URI relative to the baseUrl. - * @param {function} callback - The callback function passed to `request`. + * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount/get| Projects.serviceAccount: get API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| Projects.serviceAccount Resource} + * + * @param {object} [options] Configuration object. + * @param {string} [options.userProject] User project to be billed for this + * request. + * @param {GetServiceAccountCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * + * storage.getServiceAccount(function(err, serviceAccount, apiResponse) { + * if (!err) { + * const serviceAccountEmail = serviceAccount.emailAddress; + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * storage.getServiceAccount().then(function(data) { + * const serviceAccountEmail = data[0].emailAddress; + * const apiResponse = data[1]; + * }); + * ``` */ - request(reqOpts, callback) { - Service.prototype.request_.call(this, reqOpts, callback); + getServiceAccount(optionsOrCallback, cb) { + const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); + this.request({ + uri: `/projects/${this.projectId}/serviceAccount`, + qs: options, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + const camelCaseResponse = {}; + for (const prop in resp) { + // eslint-disable-next-line no-prototype-builtins + if (resp.hasOwnProperty(prop)) { + const camelCaseProp = prop.replace(/_(\w)/g, (_, match) => match.toUpperCase()); + camelCaseResponse[camelCaseProp] = resp[prop]; + } + } + callback(null, camelCaseResponse, resp); + }); } /** - * Make an authenticated API request. + * Get a reference to an HmacKey object. + * Note: this does not fetch the HMAC key's metadata. Use HmacKey#get() to + * retrieve and populate the metadata. * - * @param {object} reqOpts - Request options that are passed to `request`. - * @param {string} reqOpts.uri - A URI relative to the baseUrl. + * To get a reference to an HMAC key that's not created for a service + * account in the same project used to instantiate the Storage client, + * supply the project's ID as `projectId` in the `options` argument. + * + * @param {string} accessId The HMAC key's access ID. + * @param {HmacKeyOptions} options HmacKey constructor options. + * @returns {HmacKey} + * @see HmacKey + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const hmacKey = storage.hmacKey('ACCESS_ID'); + * ``` */ - requestStream(reqOpts) { - const opts = { ...reqOpts, shouldReturnStream: true }; - return Service.prototype.request_.call(this, opts); + hmacKey(accessId, options) { + if (!accessId) { + throw new Error(StorageExceptionMessages.HMAC_ACCESS_ID); + } + return new hmacKey_js_1.HmacKey(this, accessId, options); } } -exports.Service = Service; +exports.Storage = Storage; +/** + * {@link Bucket} class. + * + * @name Storage.Bucket + * @see Bucket + * @type {Constructor} + */ +Storage.Bucket = bucket_js_1.Bucket; +/** + * {@link Channel} class. + * + * @name Storage.Channel + * @see Channel + * @type {Constructor} + */ +Storage.Channel = channel_js_1.Channel; +/** + * {@link File} class. + * + * @name Storage.File + * @see File + * @type {Constructor} + */ +Storage.File = file_js_1.File; +/** + * {@link HmacKey} class. + * + * @name Storage.HmacKey + * @see HmacKey + * @type {Constructor} + */ +Storage.HmacKey = hmacKey_js_1.HmacKey; +Storage.acl = { + OWNER_ROLE: 'OWNER', + READER_ROLE: 'READER', + WRITER_ROLE: 'WRITER', +}; +/*! Developer Documentation + * + * These methods can be auto-paginated. + */ +paginator_1.paginator.extend(Storage, ['getBuckets', 'getHmacKeys']); +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Storage, { + exclude: ['bucket', 'channel', 'hmacKey'], +}); /***/ }), -/***/ 38064: +/***/ 45594: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -123913,958 +128594,679 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var _XMLMultiPartUploadHelper_instances, _XMLMultiPartUploadHelper_setGoogApiClientHeaders, _XMLMultiPartUploadHelper_handleErrorResponse; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.util = exports.Util = exports.PartialFailureError = exports.ApiError = exports.GCCL_GCS_CMD_KEY = void 0; -/*! - * @module common/util - */ -const projectify_1 = __nccwpck_require__(3497); -const htmlEntities = __importStar(__nccwpck_require__(52589)); +exports.TransferManager = exports.MultiPartUploadError = void 0; +const file_js_1 = __nccwpck_require__(4713); +const p_limit_1 = __importDefault(__nccwpck_require__(57684)); +const path = __importStar(__nccwpck_require__(71017)); +const fs_1 = __nccwpck_require__(57147); +const crc32c_js_1 = __nccwpck_require__(55810); const google_auth_library_1 = __nccwpck_require__(20810); -const retry_request_1 = __importDefault(__nccwpck_require__(63515)); -const stream_1 = __nccwpck_require__(12781); -const teeny_request_1 = __nccwpck_require__(6886); -const uuid = __importStar(__nccwpck_require__(44458)); -const service_js_1 = __nccwpck_require__(17370); -const util_js_1 = __nccwpck_require__(59258); -const duplexify_1 = __importDefault(__nccwpck_require__(76599)); +const fast_xml_parser_1 = __nccwpck_require__(74577); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +const crypto_1 = __nccwpck_require__(6113); +const util_js_1 = __nccwpck_require__(38064); +const util_js_2 = __nccwpck_require__(59258); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const package_json_helper_cjs_1 = __nccwpck_require__(28568); const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); /** - * A unique symbol for providing a `gccl-gcs-cmd` value - * for the `X-Goog-API-Client` header. + * Default number of concurrently executing promises to use when calling uploadManyFiles. * - * E.g. the `V` in `X-Goog-API-Client: gccl-gcs-cmd/V` - **/ -exports.GCCL_GCS_CMD_KEY = Symbol.for('GCCL_GCS_CMD'); -const requestDefaults = { - timeout: 60000, - gzip: true, - forever: true, - pool: { - maxSockets: Infinity, - }, -}; + */ +const DEFAULT_PARALLEL_UPLOAD_LIMIT = 5; /** - * Default behavior: Automatically retry retriable server errors. + * Default number of concurrently executing promises to use when calling downloadManyFiles. * - * @const {boolean} - * @private */ -const AUTO_RETRY_DEFAULT = true; +const DEFAULT_PARALLEL_DOWNLOAD_LIMIT = 5; /** - * Default behavior: Only attempt to retry retriable errors 3 times. + * Default number of concurrently executing promises to use when calling downloadFileInChunks. * - * @const {number} - * @private */ -const MAX_RETRY_DEFAULT = 3; +const DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT = 5; /** - * Custom error type for API errors. + * The minimum size threshold in bytes at which to apply a chunked download strategy when calling downloadFileInChunks. * - * @param {object} errorBody - Error object. */ -class ApiError extends Error { - constructor(errorBodyOrMessage) { - super(); - if (typeof errorBodyOrMessage !== 'object') { - this.message = errorBodyOrMessage || ''; - return; - } - const errorBody = errorBodyOrMessage; - this.code = errorBody.code; - this.errors = errorBody.errors; - this.response = errorBody.response; - try { - this.errors = JSON.parse(this.response.body).error.errors; - } - catch (e) { - this.errors = errorBody.errors; - } - this.message = ApiError.createMultiErrorMessage(errorBody, this.errors); - Error.captureStackTrace(this); - } - /** - * Pieces together an error message by combining all unique error messages - * returned from a single GoogleError - * - * @private - * - * @param {GoogleErrorBody} err The original error. - * @param {GoogleInnerError[]} [errors] Inner errors, if any. - * @returns {string} - */ - static createMultiErrorMessage(err, errors) { - const messages = new Set(); - if (err.message) { - messages.add(err.message); - } - if (errors && errors.length) { - errors.forEach(({ message }) => messages.add(message)); - } - else if (err.response && err.response.body) { - messages.add(htmlEntities.decode(err.response.body.toString())); - } - else if (!err.message) { - messages.add('A failure occurred during this request.'); - } - let messageArr = Array.from(messages); - if (messageArr.length > 1) { - messageArr = messageArr.map((message, i) => ` ${i + 1}. ${message}`); - messageArr.unshift('Multiple errors occurred during the request. Please see the `errors` array for complete details.\n'); - messageArr.push('\n'); - } - return messageArr.join('\n'); - } -} -exports.ApiError = ApiError; +const DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD = 32 * 1024 * 1024; /** - * Custom error type for partial errors returned from the API. + * The chunk size in bytes to use when calling downloadFileInChunks. * - * @param {object} b - Error object. */ -class PartialFailureError extends Error { - constructor(b) { - super(); - const errorObject = b; - this.errors = errorObject.errors; - this.name = 'PartialFailureError'; - this.response = errorObject.response; - this.message = ApiError.createMultiErrorMessage(errorObject, this.errors); +const DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +/** + * The chunk size in bytes to use when calling uploadFileInChunks. + * + */ +const UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +/** + * Default number of concurrently executing promises to use when calling uploadFileInChunks. + * + */ +const DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT = 5; +const EMPTY_REGEX = '(?:)'; +/** + * The `gccl-gcs-cmd` value for the `X-Goog-API-Client` header. + * Example: `gccl-gcs-cmd/tm.upload_many` + * + * @see {@link GCCL_GCS_CMD}. + * @see {@link GCCL_GCS_CMD_KEY}. + */ +const GCCL_GCS_CMD_FEATURE = { + UPLOAD_MANY: 'tm.upload_many', + DOWNLOAD_MANY: 'tm.download_many', + UPLOAD_SHARDED: 'tm.upload_sharded', + DOWNLOAD_SHARDED: 'tm.download_sharded', +}; +const defaultMultiPartGenerator = (bucket, fileName, uploadId, partsMap) => { + return new XMLMultiPartUploadHelper(bucket, fileName, uploadId, partsMap); +}; +class MultiPartUploadError extends Error { + constructor(message, uploadId, partsMap) { + super(message); + this.uploadId = uploadId; + this.partsMap = partsMap; } } -exports.PartialFailureError = PartialFailureError; -class Util { - constructor() { - this.ApiError = ApiError; - this.PartialFailureError = PartialFailureError; - } - /** - * No op. - * - * @example - * function doSomething(callback) { - * callback = callback || noop; - * } - */ - noop() { } - /** - * Uniformly process an API response. - * - * @param {*} err - Error value. - * @param {*} resp - Response value. - * @param {*} body - Body value. - * @param {function} callback - The callback function. - */ - handleResp(err, resp, body, callback) { - callback = callback || util.noop; - const parsedResp = { - err: err || null, - ...(resp && util.parseHttpRespMessage(resp)), - ...(body && util.parseHttpRespBody(body)), - }; - // Assign the parsed body to resp.body, even if { json: false } was passed - // as a request option. - // We assume that nobody uses the previously unparsed value of resp.body. - if (!parsedResp.err && resp && typeof parsedResp.body === 'object') { - parsedResp.resp.body = parsedResp.body; - } - if (parsedResp.err && resp) { - parsedResp.err.response = resp; - } - callback(parsedResp.err, parsedResp.body, parsedResp.resp); - } - /** - * Sniff an incoming HTTP response message for errors. - * - * @param {object} httpRespMessage - An incoming HTTP response message from `request`. - * @return {object} parsedHttpRespMessage - The parsed response. - * @param {?error} parsedHttpRespMessage.err - An error detected. - * @param {object} parsedHttpRespMessage.resp - The original response object. - */ - parseHttpRespMessage(httpRespMessage) { - const parsedHttpRespMessage = { - resp: httpRespMessage, +exports.MultiPartUploadError = MultiPartUploadError; +/** + * Class representing an implementation of MPU in the XML API. This class is not meant for public usage. + * + * @private + * + */ +class XMLMultiPartUploadHelper { + constructor(bucket, fileName, uploadId, partsMap) { + _XMLMultiPartUploadHelper_instances.add(this); + this.authClient = bucket.storage.authClient || new google_auth_library_1.GoogleAuth(); + this.uploadId = uploadId || ''; + this.bucket = bucket; + this.fileName = fileName; + this.baseUrl = `https://${bucket.name}.${new URL(this.bucket.storage.apiEndpoint).hostname}/${fileName}`; + this.xmlBuilder = new fast_xml_parser_1.XMLBuilder({ arrayNodeName: 'Part' }); + this.xmlParser = new fast_xml_parser_1.XMLParser(); + this.partsMap = partsMap || new Map(); + this.retryOptions = { + retries: this.bucket.storage.retryOptions.maxRetries, + factor: this.bucket.storage.retryOptions.retryDelayMultiplier, + maxTimeout: this.bucket.storage.retryOptions.maxRetryDelay * 1000, + maxRetryTime: this.bucket.storage.retryOptions.totalTimeout * 1000, }; - if (httpRespMessage.statusCode < 200 || httpRespMessage.statusCode > 299) { - // Unknown error. Format according to ApiError standard. - parsedHttpRespMessage.err = new ApiError({ - errors: new Array(), - code: httpRespMessage.statusCode, - message: httpRespMessage.statusMessage, - response: httpRespMessage, - }); - } - return parsedHttpRespMessage; } /** - * Parse the response body from an HTTP request. + * Initiates a multipart upload (MPU) to the XML API and stores the resultant upload id. * - * @param {object} body - The response body. - * @return {object} parsedHttpRespMessage - The parsed response. - * @param {?error} parsedHttpRespMessage.err - An error detected. - * @param {object} parsedHttpRespMessage.body - The original body value provided - * will try to be JSON.parse'd. If it's successful, the parsed value will - * be returned here, otherwise the original value and an error will be returned. + * @returns {Promise} */ - parseHttpRespBody(body) { - const parsedHttpRespBody = { - body, - }; - if (typeof body === 'string') { + async initiateUpload(headers = {}) { + const url = `${this.baseUrl}?uploads`; + return (0, async_retry_1.default)(async (bail) => { try { - parsedHttpRespBody.body = JSON.parse(body); - } - catch (err) { - parsedHttpRespBody.body = body; + const res = await this.authClient.request({ + headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this, headers), + method: 'POST', + url, + }); + if (res.data && res.data.error) { + throw res.data.error; + } + const parsedXML = this.xmlParser.parse(res.data); + this.uploadId = parsedXML.InitiateMultipartUploadResult.UploadId; } - } - if (parsedHttpRespBody.body && parsedHttpRespBody.body.error) { - // Error from JSON API. - parsedHttpRespBody.err = new ApiError(parsedHttpRespBody.body.error); - } - return parsedHttpRespBody; + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + } + }, this.retryOptions); } /** - * Take a Duplexify stream, fetch an authenticated connection header, and - * create an outgoing writable stream. + * Uploads the provided chunk of data to the XML API using the previously created upload id. * - * @param {Duplexify} dup - Duplexify stream. - * @param {object} options - Configuration object. - * @param {module:common/connection} options.connection - A connection instance used to get a token with and send the request through. - * @param {object} options.metadata - Metadata to send at the head of the request. - * @param {object} options.request - Request object, in the format of a standard Node.js http.request() object. - * @param {string=} options.request.method - Default: "POST". - * @param {string=} options.request.qs.uploadType - Default: "multipart". - * @param {string=} options.streamContentType - Default: "application/octet-stream". - * @param {function} onComplete - Callback, executed after the writable Request stream has completed. + * @param {number} partNumber the sequence number of this chunk. + * @param {Buffer} chunk the chunk of data to be uploaded. + * @param {string | false} validation whether or not to include the md5 hash in the headers to cause the server + * to validate the chunk was not corrupted. + * @returns {Promise} */ - makeWritableStream(dup, options, onComplete) { - var _a; - onComplete = onComplete || util.noop; - const writeStream = new ProgressStream(); - writeStream.on('progress', evt => dup.emit('progress', evt)); - dup.setWritable(writeStream); - const defaultReqOpts = { - method: 'POST', - qs: { - uploadType: 'multipart', - }, - timeout: 0, - maxRetries: 0, - }; - const metadata = options.metadata || {}; - const reqOpts = { - ...defaultReqOpts, - ...options.request, - qs: { - ...defaultReqOpts.qs, - ...(_a = options.request) === null || _a === void 0 ? void 0 : _a.qs, - }, - multipart: [ - { - 'Content-Type': 'application/json', - body: JSON.stringify(metadata), - }, - { - 'Content-Type': metadata.contentType || 'application/octet-stream', - body: writeStream, - }, - ], - }; - options.makeAuthenticatedRequest(reqOpts, { - onAuthenticated(err, authenticatedReqOpts) { - if (err) { - dup.destroy(err); - return; - } - requestDefaults.headers = util._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); - const request = teeny_request_1.teenyRequest.defaults(requestDefaults); - request(authenticatedReqOpts, (err, resp, body) => { - util.handleResp(err, resp, body, (err, data) => { - if (err) { - dup.destroy(err); - return; - } - dup.emit('response', resp); - onComplete(data); - }); + async uploadPart(partNumber, chunk, validation) { + const url = `${this.baseUrl}?partNumber=${partNumber}&uploadId=${this.uploadId}`; + let headers = __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this); + if (validation === 'md5') { + const hash = (0, crypto_1.createHash)('md5').update(chunk).digest('base64'); + headers = { + 'Content-MD5': hash, + }; + } + return (0, async_retry_1.default)(async (bail) => { + try { + const res = await this.authClient.request({ + url, + method: 'PUT', + body: chunk, + headers, }); - }, - }); + if (res.data && res.data.error) { + throw res.data.error; + } + this.partsMap.set(partNumber, res.headers['etag']); + } + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + } + }, this.retryOptions); } /** - * Returns true if the API request should be retried, given the error that was - * given the first time the request was attempted. This is used for rate limit - * related errors as well as intermittent server errors. + * Sends the final request of the MPU to tell GCS the upload is now complete. * - * @param {error} err - The API error to check if it is appropriate to retry. - * @return {boolean} True if the API request should be retried, false otherwise. + * @returns {Promise} */ - shouldRetryRequest(err) { - if (err) { - if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { - return true; - } - if (err.errors) { - for (const e of err.errors) { - const reason = e.reason; - if (reason === 'rateLimitExceeded') { - return true; - } - if (reason === 'userRateLimitExceeded') { - return true; - } - if (reason && reason.includes('EAI_AGAIN')) { - return true; - } + async completeUpload() { + const url = `${this.baseUrl}?uploadId=${this.uploadId}`; + const sortedMap = new Map([...this.partsMap.entries()].sort((a, b) => a[0] - b[0])); + const parts = []; + for (const entry of sortedMap.entries()) { + parts.push({ PartNumber: entry[0], ETag: entry[1] }); + } + const body = `${this.xmlBuilder.build(parts)}`; + return (0, async_retry_1.default)(async (bail) => { + try { + const res = await this.authClient.request({ + headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this), + url, + method: 'POST', + body, + }); + if (res.data && res.data.error) { + throw res.data.error; } + return res; } - } - return false; + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + return; + } + }, this.retryOptions); } /** - * Get a function for making authenticated requests. + * Aborts an multipart upload that is in progress. Once aborted, any parts in the process of being uploaded fail, + * and future requests using the upload ID fail. * - * @param {object} config - Configuration object. - * @param {boolean=} config.autoRetry - Automatically retry requests if the - * response is related to rate limits or certain intermittent server - * errors. We will exponentially backoff subsequent requests by default. - * (default: true) - * @param {object=} config.credentials - Credentials object. - * @param {boolean=} config.customEndpoint - If true, just return the provided request options. Default: false. - * @param {boolean=} config.useAuthWithCustomEndpoint - If true, will authenticate when using a custom endpoint. Default: false. - * @param {string=} config.email - Account email address, required for PEM/P12 usage. - * @param {number=} config.maxRetries - Maximum number of automatic retries attempted before returning the error. (default: 3) - * @param {string=} config.keyFile - Path to a .json, .pem, or .p12 keyfile. - * @param {array} config.scopes - Array of scopes required for the API. + * @returns {Promise} */ - makeAuthenticatedRequestFactory(config) { - const googleAutoAuthConfig = { ...config }; - if (googleAutoAuthConfig.projectId === service_js_1.DEFAULT_PROJECT_ID_TOKEN) { - delete googleAutoAuthConfig.projectId; - } - let authClient; - if (googleAutoAuthConfig.authClient instanceof google_auth_library_1.GoogleAuth) { - // Use an existing `GoogleAuth` - authClient = googleAutoAuthConfig.authClient; - } - else { - // Pass an `AuthClient` & `clientOptions` to `GoogleAuth`, if available - authClient = new google_auth_library_1.GoogleAuth({ - ...googleAutoAuthConfig, - authClient: googleAutoAuthConfig.authClient, - clientOptions: googleAutoAuthConfig.clientOptions, - }); - } - function makeAuthenticatedRequest(reqOpts, optionsOrCallback) { - let stream; - let projectId; - const reqConfig = { ...config }; - let activeRequest_; - if (!optionsOrCallback) { - stream = (0, duplexify_1.default)(); - reqConfig.stream = stream; + async abortUpload() { + const url = `${this.baseUrl}?uploadId=${this.uploadId}`; + return (0, async_retry_1.default)(async (bail) => { + try { + const res = await this.authClient.request({ + url, + method: 'DELETE', + }); + if (res.data && res.data.error) { + throw res.data.error; + } } - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : undefined; - const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : undefined; - async function setProjectId() { - projectId = await authClient.getProjectId(); + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + return; } - const onAuthenticated = async (err, authenticatedReqOpts) => { - const authLibraryError = err; - const autoAuthFailed = err && - typeof err.message === 'string' && - err.message.indexOf('Could not load the default credentials') > -1; - if (autoAuthFailed) { - // Even though authentication failed, the API might not actually - // care. - authenticatedReqOpts = reqOpts; - } - if (!err || autoAuthFailed) { - try { - // Try with existing `projectId` value - authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); - err = null; - } - catch (e) { - if (e instanceof projectify_1.MissingProjectIdError) { - // A `projectId` was required, but we don't have one. - try { - // Attempt to get the `projectId` - await setProjectId(); - authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); - err = null; - } - catch (e) { - // Re-use the "Could not load the default credentials error" if - // auto auth failed. - err = err || e; - } - } - else { - // Some other error unrelated to missing `projectId` - err = err || e; - } - } - } - if (err) { - if (stream) { - stream.destroy(err); - } - else { - const fn = options && options.onAuthenticated - ? options.onAuthenticated - : callback; - fn(err); - } - return; - } - if (options && options.onAuthenticated) { - options.onAuthenticated(null, authenticatedReqOpts); - } - else { - activeRequest_ = util.makeRequest(authenticatedReqOpts, reqConfig, (apiResponseError, ...params) => { - if (apiResponseError && - apiResponseError.code === 401 && - authLibraryError) { - // Re-use the "Could not load the default credentials error" if - // the API request failed due to missing credentials. - apiResponseError = authLibraryError; - } - callback(apiResponseError, ...params); - }); - } - }; - const prepareRequest = async () => { - try { - const getProjectId = async () => { - if (config.projectId && - config.projectId !== service_js_1.DEFAULT_PROJECT_ID_TOKEN) { - // The user provided a project ID. We don't need to check with the - // auth client, it could be incorrect. - return config.projectId; - } - if (config.projectIdRequired === false) { - // A projectId is not required. Return the default. - return service_js_1.DEFAULT_PROJECT_ID_TOKEN; - } - return setProjectId(); - }; - const authorizeRequest = async () => { - if (reqConfig.customEndpoint && - !reqConfig.useAuthWithCustomEndpoint) { - // Using a custom API override. Do not use `google-auth-library` for - // authentication. (ex: connecting to a local Datastore server) - return reqOpts; - } - else { - return authClient.authorizeRequest(reqOpts); - } - }; - const [_projectId, authorizedReqOpts] = await Promise.all([ - getProjectId(), - authorizeRequest(), - ]); - if (_projectId) { - projectId = _projectId; - } - return onAuthenticated(null, authorizedReqOpts); - } - catch (e) { - return onAuthenticated(e); - } - }; - prepareRequest(); - if (stream) { - return stream; + }, this.retryOptions); + } +} +_XMLMultiPartUploadHelper_instances = new WeakSet(), _XMLMultiPartUploadHelper_setGoogApiClientHeaders = function _XMLMultiPartUploadHelper_setGoogApiClientHeaders(headers = {}) { + let headerFound = false; + let userAgentFound = false; + for (const [key, value] of Object.entries(headers)) { + if (key.toLocaleLowerCase().trim() === 'x-goog-api-client') { + headerFound = true; + // Prepend command feature to value, if not already there + if (!value.includes(GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED)) { + headers[key] = + `${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; } - return { - abort() { - setImmediate(() => { - if (activeRequest_) { - activeRequest_.abort(); - activeRequest_ = null; - } - }); - }, - }; } - const mar = makeAuthenticatedRequest; - mar.getCredentials = authClient.getCredentials.bind(authClient); - mar.authClient = authClient; - return mar; + else if (key.toLocaleLowerCase().trim() === 'user-agent') { + userAgentFound = true; + } + } + // If the header isn't present, add it + if (!headerFound) { + headers['x-goog-api-client'] = `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${packageJson.version} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; + } + // If the User-Agent isn't present, add it + if (!userAgentFound) { + headers['User-Agent'] = (0, util_js_2.getUserAgentString)(); + } + return headers; +}, _XMLMultiPartUploadHelper_handleErrorResponse = function _XMLMultiPartUploadHelper_handleErrorResponse(err, bail) { + if (this.bucket.storage.retryOptions.autoRetry && + this.bucket.storage.retryOptions.retryableErrorFn(err)) { + throw err; + } + else { + bail(err); + } +}; +/** + * Create a TransferManager object to perform parallel transfer operations on a Cloud Storage bucket. + * + * @class + * @hideconstructor + * + * @param {Bucket} bucket A {@link Bucket} instance + * + */ +class TransferManager { + constructor(bucket) { + this.bucket = bucket; } /** - * Make a request through the `retryRequest` module with built-in error - * handling and exponential back off. + * @typedef {object} UploadManyFilesOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when uploading the files. + * @property {Function} [customDestinationBuilder] A function that will take the current path of a local file + * and return a string representing a custom path to be used to upload the file to GCS. + * @property {boolean} [skipIfExists] Do not upload the file if it already exists in + * the bucket. This will set the precondition ifGenerationMatch = 0. + * @property {string} [prefix] A prefix to append to all of the uploaded files. + * @property {object} [passthroughOptions] {@link UploadOptions} Options to be passed through + * to each individual upload operation. * - * @param {object} reqOpts - Request options in the format `request` expects. - * @param {object=} config - Configuration object. - * @param {boolean=} config.autoRetry - Automatically retry requests if the - * response is related to rate limits or certain intermittent server - * errors. We will exponentially backoff subsequent requests by default. - * (default: true) - * @param {number=} config.maxRetries - Maximum number of automatic retries - * attempted before returning the error. (default: 3) - * @param {object=} config.request - HTTP module for request calls. - * @param {function} callback - The callback function. */ - makeRequest(reqOpts, config, callback) { - var _a, _b, _c, _d, _e; - let autoRetryValue = AUTO_RETRY_DEFAULT; - if (config.autoRetry !== undefined) { - autoRetryValue = config.autoRetry; - } - else if (((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined) { - autoRetryValue = config.retryOptions.autoRetry; - } - let maxRetryValue = MAX_RETRY_DEFAULT; - if (config.maxRetries !== undefined) { - maxRetryValue = config.maxRetries; - } - else if (((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.maxRetries) !== undefined) { - maxRetryValue = config.retryOptions.maxRetries; - } - requestDefaults.headers = this._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); - const options = { - request: teeny_request_1.teenyRequest.defaults(requestDefaults), - retries: autoRetryValue !== false ? maxRetryValue : 0, - noResponseRetries: autoRetryValue !== false ? maxRetryValue : 0, - shouldRetryFn(httpRespMessage) { - var _a, _b; - const err = util.parseHttpRespMessage(httpRespMessage).err; - if ((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.retryableErrorFn) { - return err && ((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.retryableErrorFn(err)); - } - return err && util.shouldRetryRequest(err); - }, - maxRetryDelay: (_c = config.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetryDelay, - retryDelayMultiplier: (_d = config.retryOptions) === null || _d === void 0 ? void 0 : _d.retryDelayMultiplier, - totalTimeout: (_e = config.retryOptions) === null || _e === void 0 ? void 0 : _e.totalTimeout, - }; - if (typeof reqOpts.maxRetries === 'number') { - options.retries = reqOpts.maxRetries; - options.noResponseRetries = reqOpts.maxRetries; + /** + * Upload multiple files in parallel to the bucket. This is a convenience method + * that utilizes {@link Bucket#upload} to perform the upload. + * + * @param {array | string} [filePathsOrDirectory] An array of fully qualified paths to the files or a directory name. + * If a directory name is provided, the directory will be recursively walked and all files will be added to the upload list. + * to be uploaded to the bucket + * @param {UploadManyFilesOptions} [options] Configuration options. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Upload multiple files in parallel. + * //- + * const response = await transferManager.uploadManyFiles(['/local/path/file1.txt, 'local/path/file2.txt']); + * // Your bucket now contains: + * // - "local/path/file1.txt" (with the contents of '/local/path/file1.txt') + * // - "local/path/file2.txt" (with the contents of '/local/path/file2.txt') + * const response = await transferManager.uploadManyFiles('/local/directory'); + * // Your bucket will now contain all files contained in '/local/directory' maintaining the subdirectory structure. + * ``` + * + */ + async uploadManyFiles(filePathsOrDirectory, options = {}) { + var _a; + if (options.skipIfExists && ((_a = options.passthroughOptions) === null || _a === void 0 ? void 0 : _a.preconditionOpts)) { + options.passthroughOptions.preconditionOpts.ifGenerationMatch = 0; } - if (!config.stream) { - return (0, retry_request_1.default)(reqOpts, options, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (err, response, body) => { - util.handleResp(err, response, body, callback); - }); + else if (options.skipIfExists && + options.passthroughOptions === undefined) { + options.passthroughOptions = { + preconditionOpts: { + ifGenerationMatch: 0, + }, + }; } - const dup = config.stream; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let requestStream; - const isGetRequest = (reqOpts.method || 'GET').toUpperCase() === 'GET'; - if (isGetRequest) { - requestStream = (0, retry_request_1.default)(reqOpts, options); - dup.setReadable(requestStream); + const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_UPLOAD_LIMIT); + const promises = []; + let allPaths = []; + if (!Array.isArray(filePathsOrDirectory)) { + for await (const curPath of this.getPathsFromDirectory(filePathsOrDirectory)) { + allPaths.push(curPath); + } } else { - // Streaming writable HTTP requests cannot be retried. - requestStream = options.request(reqOpts); - dup.setWritable(requestStream); + allPaths = filePathsOrDirectory; + } + for (const filePath of allPaths) { + const stat = await fs_1.promises.lstat(filePath); + if (stat.isDirectory()) { + continue; + } + const passThroughOptionsCopy = { + ...options.passthroughOptions, + [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.UPLOAD_MANY, + }; + passThroughOptionsCopy.destination = options.customDestinationBuilder + ? options.customDestinationBuilder(filePath, options) + : filePath.split(path.sep).join(path.posix.sep); + if (options.prefix) { + passThroughOptionsCopy.destination = path.posix.join(...options.prefix.split(path.sep), passThroughOptionsCopy.destination); + } + promises.push(limit(() => this.bucket.upload(filePath, passThroughOptionsCopy))); } - // Replay the Request events back to the stream. - requestStream - .on('error', dup.destroy.bind(dup)) - .on('response', dup.emit.bind(dup, 'response')) - .on('complete', dup.emit.bind(dup, 'complete')); - dup.abort = requestStream.abort; - return dup; + return Promise.all(promises); } /** - * Decorate the options about to be made in a request. + * @typedef {object} DownloadManyFilesOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when downloading the files. + * @property {string} [prefix] A prefix to append to all of the downloaded files. + * @property {string} [stripPrefix] A prefix to remove from all of the downloaded files. + * @property {object} [passthroughOptions] {@link DownloadOptions} Options to be passed through + * to each individual download operation. + * @property {boolean} [skipIfExists] Do not download the file if it already exists in + * the destination. * - * @param {object} reqOpts - The options to be passed to `request`. - * @param {string} projectId - The project ID. - * @return {object} reqOpts - The decorated reqOpts. */ - decorateRequest(reqOpts, projectId) { - delete reqOpts.autoPaginate; - delete reqOpts.autoPaginateVal; - delete reqOpts.objectMode; - if (reqOpts.qs !== null && typeof reqOpts.qs === 'object') { - delete reqOpts.qs.autoPaginate; - delete reqOpts.qs.autoPaginateVal; - reqOpts.qs = (0, projectify_1.replaceProjectIdToken)(reqOpts.qs, projectId); - } - if (Array.isArray(reqOpts.multipart)) { - reqOpts.multipart = reqOpts.multipart.map(part => { - return (0, projectify_1.replaceProjectIdToken)(part, projectId); + /** + * Download multiple files in parallel to the local filesystem. This is a convenience method + * that utilizes {@link File#download} to perform the download. + * + * @param {array | string} [filesOrFolder] An array of file name strings or file objects to be downloaded. If + * a string is provided this will be treated as a GCS prefix and all files with that prefix will be downloaded. + * @param {DownloadManyFilesOptions} [options] Configuration options. Setting options.prefix or options.stripPrefix + * or options.passthroughOptions.destination will cause the downloaded files to be written to the file system + * instead of being returned as a buffer. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Download multiple files in parallel. + * //- + * const response = await transferManager.downloadManyFiles(['file1.txt', 'file2.txt']); + * // The following files have been downloaded: + * // - "file1.txt" (with the contents from my-bucket.file1.txt) + * // - "file2.txt" (with the contents from my-bucket.file2.txt) + * const response = await transferManager.downloadManyFiles([bucket.File('file1.txt'), bucket.File('file2.txt')]); + * // The following files have been downloaded: + * // - "file1.txt" (with the contents from my-bucket.file1.txt) + * // - "file2.txt" (with the contents from my-bucket.file2.txt) + * const response = await transferManager.downloadManyFiles('test-folder'); + * // All files with GCS prefix of 'test-folder' have been downloaded. + * ``` + * + */ + async downloadManyFiles(filesOrFolder, options = {}) { + const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_DOWNLOAD_LIMIT); + const promises = []; + let files = []; + if (!Array.isArray(filesOrFolder)) { + const directoryFiles = await this.bucket.getFiles({ + prefix: filesOrFolder, }); + files = directoryFiles[0]; } - if (reqOpts.json !== null && typeof reqOpts.json === 'object') { - delete reqOpts.json.autoPaginate; - delete reqOpts.json.autoPaginateVal; - reqOpts.json = (0, projectify_1.replaceProjectIdToken)(reqOpts.json, projectId); - } - reqOpts.uri = (0, projectify_1.replaceProjectIdToken)(reqOpts.uri, projectId); - return reqOpts; - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - isCustomType(unknown, module) { - function getConstructorName(obj) { - return obj.constructor && obj.constructor.name.toLowerCase(); - } - const moduleNameParts = module.split('/'); - const parentModuleName = moduleNameParts[0] && moduleNameParts[0].toLowerCase(); - const subModuleName = moduleNameParts[1] && moduleNameParts[1].toLowerCase(); - if (subModuleName && getConstructorName(unknown) !== subModuleName) { - return false; + else { + files = filesOrFolder.map(curFile => { + if (typeof curFile === 'string') { + return this.bucket.file(curFile); + } + return curFile; + }); } - let walkingModule = unknown; - // eslint-disable-next-line no-constant-condition - while (true) { - if (getConstructorName(walkingModule) === parentModuleName) { - return true; + const stripRegexString = options.stripPrefix + ? `^${options.stripPrefix}` + : EMPTY_REGEX; + const regex = new RegExp(stripRegexString, 'g'); + for (const file of files) { + const passThroughOptionsCopy = { + ...options.passthroughOptions, + [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_MANY, + }; + if (options.prefix || passThroughOptionsCopy.destination) { + passThroughOptionsCopy.destination = path.join(options.prefix || '', passThroughOptionsCopy.destination || '', file.name); } - walkingModule = walkingModule.parent; - if (!walkingModule) { - return false; + if (options.stripPrefix) { + passThroughOptionsCopy.destination = file.name.replace(regex, ''); + } + if (options.skipIfExists && + (0, fs_1.existsSync)(passThroughOptionsCopy.destination || '')) { + continue; } + promises.push(limit(async () => { + const destination = passThroughOptionsCopy.destination; + if (destination && destination.endsWith(path.sep)) { + await fs_1.promises.mkdir(destination, { recursive: true }); + return Promise.resolve([ + Buffer.alloc(0), + ]); + } + return file.download(passThroughOptionsCopy); + })); } + return Promise.all(promises); } /** - * Given two parameters, figure out if this is either: - * - Just a callback function - * - An options object, and then a callback function - * @param optionsOrCallback An options object or callback. - * @param cb A potentially undefined callback. + * @typedef {object} DownloadFileInChunksOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when downloading the file. + * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be downloaded. + * @property {string | boolean} [validation] Whether or not to perform a CRC32C validation check when download is complete. + * @property {boolean} [noReturnData] Whether or not to return the downloaded data. A `true` value here would be useful for files with a size that will not fit into memory. + * */ - maybeOptionsOrCallback(optionsOrCallback, cb) { - return typeof optionsOrCallback === 'function' - ? [{}, optionsOrCallback] - : [optionsOrCallback, cb]; - } - _getDefaultHeaders(gcclGcsCmd) { - const headers = { - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, - }; - if (gcclGcsCmd) { - headers['x-goog-api-client'] += ` gccl-gcs-cmd/${gcclGcsCmd}`; + /** + * Download a large file in chunks utilizing parallel download operations. This is a convenience method + * that utilizes {@link File#download} to perform the download. + * + * @param {File | string} fileOrName {@link File} to download. + * @param {DownloadFileInChunksOptions} [options] Configuration options. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Download a large file in chunks utilizing parallel operations. + * //- + * const response = await transferManager.downloadFileInChunks(bucket.file('large-file.txt'); + * // Your local directory now contains: + * // - "large-file.txt" (with the contents from my-bucket.large-file.txt) + * ``` + * + */ + async downloadFileInChunks(fileOrName, options = {}) { + let chunkSize = options.chunkSizeBytes || DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; + let limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT); + const noReturnData = Boolean(options.noReturnData); + const promises = []; + const file = typeof fileOrName === 'string' + ? this.bucket.file(fileOrName) + : fileOrName; + const fileInfo = await file.get(); + const size = parseInt(fileInfo[0].metadata.size.toString()); + // If the file size does not meet the threshold download it as a single chunk. + if (size < DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD) { + limit = (0, p_limit_1.default)(1); + chunkSize = size; } - return headers; - } -} -exports.Util = Util; -/** - * Basic Passthrough Stream that records the number of bytes read - * every time the cursor is moved. - */ -class ProgressStream extends stream_1.Transform { - constructor() { - super(...arguments); - this.bytesRead = 0; - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - _transform(chunk, encoding, callback) { - this.bytesRead += chunk.length; - this.emit('progress', { bytesWritten: this.bytesRead, contentLength: '*' }); - this.push(chunk); - callback(); - } -} -const util = new Util(); -exports.util = util; - - -/***/ }), - -/***/ 21178: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Notification = void 0; -const index_js_1 = __nccwpck_require__(4052); -const promisify_1 = __nccwpck_require__(19203); -/** - * The API-formatted resource description of the notification. - * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. - * - * @name Notification#metadata - * @type {object} - */ -/** - * A Notification object is created from your {@link Bucket} object using - * {@link Bucket#notification}. Use it to interact with Cloud Pub/Sub - * notifications. - * - * See {@link https://cloud.google.com/storage/docs/pubsub-notifications| Cloud Pub/Sub Notifications for Google Cloud Storage} - * - * @class - * @hideconstructor - * - * @param {Bucket} bucket The bucket instance this notification is attached to. - * @param {string} id The ID of the notification. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const notification = myBucket.notification('1'); - * ``` - */ -class Notification extends index_js_1.ServiceObject { - constructor(bucket, id) { - const requestQueryObject = {}; - const methods = { - /** - * Creates a notification subscription for the bucket. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} - * @method Notification#create - * - * @param {Topic|string} topic The Cloud PubSub topic to which this - * subscription publishes. If the project ID is omitted, the current - * project ID will be used. - * - * Acceptable formats are: - * - `projects/grape-spaceship-123/topics/my-topic` - * - * - `my-topic` - * @param {CreateNotificationRequest} [options] Metadata to set for - * the notification. - * @param {CreateNotificationCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} If a valid topic is not provided. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.create(function(err, notification, apiResponse) { - * if (!err) { - * // The notification was created successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.create().then(function(data) { - * const notification = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - create: true, - /** - * @typedef {array} DeleteNotificationResponse - * @property {object} 0 The full API response. - */ - /** - * Permanently deletes a notification subscription. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/delete| Notifications: delete API Documentation} - * - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {DeleteNotificationCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.delete(function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.delete().then(function(data) { - * const apiResponse = data[0]; - * }); - * - * ``` - * @example include:samples/deleteNotification.js - * region_tag:storage_delete_bucket_notification - * Another example: - */ - delete: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * Get a notification and its metadata if it exists. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} - * - * @param {object} [options] Configuration options. - * See {@link Bucket#createNotification} for create options. - * @param {boolean} [options.autoCreate] Automatically create the object if - * it does not exist. Default: `false`. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetNotificationCallback} [callback] Callback function. - * @return {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.get(function(err, notification, apiResponse) { - * // `notification.metadata` has been populated. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.get().then(function(data) { - * const notification = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - get: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * Get the notification's metadata. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} - * - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetNotificationMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.getMetadata(function(err, metadata, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.getMetadata().then(function(data) { - * const metadata = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/getMetadataNotifications.js - * region_tag:storage_print_pubsub_bucket_notification - * Another example: - */ - getMetadata: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {array} NotificationExistsResponse - * @property {boolean} 0 Whether the notification exists or not. - */ - /** - * @callback NotificationExistsCallback - * @param {?Error} err Request error, if any. - * @param {boolean} exists Whether the notification exists or not. - */ - /** - * Check if the notification exists. - * - * @method Notification#exists - * @param {NotificationExistsCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.exists(function(err, exists) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.exists().then(function(data) { - * const exists = data[0]; - * }); - * ``` - */ - exists: true, - }; - super({ - parent: bucket, - baseUrl: '/notificationConfigs', - id: id.toString(), - createMethod: bucket.createNotification.bind(bucket), - methods, + let start = 0; + const filePath = options.destination || path.basename(file.name); + const fileToWrite = await fs_1.promises.open(filePath, 'w'); + while (start < size) { + const chunkStart = start; + let chunkEnd = start + chunkSize - 1; + chunkEnd = chunkEnd > size ? size : chunkEnd; + promises.push(limit(async () => { + const resp = await file.download({ + start: chunkStart, + end: chunkEnd, + [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_SHARDED, + }); + const result = await fileToWrite.write(resp[0], 0, resp[0].length, chunkStart); + if (noReturnData) + return; + return result.buffer; + })); + start += chunkSize; + } + let chunks; + try { + chunks = await Promise.all(promises); + } + finally { + await fileToWrite.close(); + } + if (options.validation === 'crc32c' && fileInfo[0].metadata.crc32c) { + const downloadedCrc32C = await crc32c_js_1.CRC32C.fromFile(filePath); + if (!downloadedCrc32C.validate(fileInfo[0].metadata.crc32c)) { + const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); + mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; + throw mismatchError; + } + } + if (noReturnData) + return; + return [Buffer.concat(chunks, size)]; + } + /** + * @typedef {object} UploadFileInChunksOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when uploading the file. + * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be uploaded. + * @property {string} [uploadName] Name of the file when saving to GCS. If omitted the name is taken from the file path. + * @property {number} [maxQueueSize] The number of chunks to be uploaded to hold in memory concurrently. If not specified + * defaults to the specified concurrency limit. + * @property {string} [uploadId] If specified attempts to resume a previous upload. + * @property {Map} [partsMap] If specified alongside uploadId, attempts to resume a previous upload from the last chunk + * specified in partsMap + * @property {object} [headers] headers to be sent when initiating the multipart upload. + * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-multipart#request_headers| Request Headers: Initiate a Multipart Upload} + * @property {boolean} [autoAbortFailure] boolean to indicate if an in progress upload session will be automatically aborted upon failure. If not set, + * failures will be automatically aborted. + * + */ + /** + * Upload a large file in chunks utilizing parallel upload operations. If the upload fails, an uploadId and + * map containing all the successfully uploaded parts will be returned to the caller. These arguments can be used to + * resume the upload. + * + * @param {string} [filePath] The path of the file to be uploaded + * @param {UploadFileInChunksOptions} [options] Configuration options. + * @param {MultiPartHelperGenerator} [generator] A function that will return a type that implements the MPU interface. Most users will not need to use this. + * @returns {Promise} If successful a promise resolving to void, otherwise a error containing the message, uploadId, and parts map. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Upload a large file in chunks utilizing parallel operations. + * //- + * const response = await transferManager.uploadFileInChunks('large-file.txt'); + * // Your bucket now contains: + * // - "large-file.txt" + * ``` + * + * + */ + async uploadFileInChunks(filePath, options = {}, generator = defaultMultiPartGenerator) { + const chunkSize = options.chunkSizeBytes || UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; + const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT); + const maxQueueSize = options.maxQueueSize || + options.concurrencyLimit || + DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT; + const fileName = options.uploadName || path.basename(filePath); + const mpuHelper = generator(this.bucket, fileName, options.uploadId, options.partsMap); + let partNumber = 1; + let promises = []; + try { + if (options.uploadId === undefined) { + await mpuHelper.initiateUpload(options.headers); + } + const startOrResumptionByte = mpuHelper.partsMap.size * chunkSize; + const readStream = (0, fs_1.createReadStream)(filePath, { + highWaterMark: chunkSize, + start: startOrResumptionByte, + }); + // p-limit only limits the number of running promises. We do not want to hold an entire + // large file in memory at once so promises acts a queue that will hold only maxQueueSize in memory. + for await (const curChunk of readStream) { + if (promises.length >= maxQueueSize) { + await Promise.all(promises); + promises = []; + } + promises.push(limit(() => mpuHelper.uploadPart(partNumber++, curChunk, options.validation))); + } + await Promise.all(promises); + return await mpuHelper.completeUpload(); + } + catch (e) { + if ((options.autoAbortFailure === undefined || options.autoAbortFailure) && + mpuHelper.uploadId) { + try { + await mpuHelper.abortUpload(); + return; + } + catch (e) { + throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); + } + } + throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); + } + } + async *getPathsFromDirectory(directory) { + const filesAndSubdirectories = await fs_1.promises.readdir(directory, { + withFileTypes: true, }); + for (const curFileOrDirectory of filesAndSubdirectories) { + const fullPath = path.join(directory, curFileOrDirectory.name); + curFileOrDirectory.isDirectory() + ? yield* this.getPathsFromDirectory(fullPath) + : yield fullPath; + } } } -exports.Notification = Notification; -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(Notification); +exports.TransferManager = TransferManager; /***/ }), -/***/ 42851: +/***/ 59258: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// Copyright 2022 Google LLC + +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -124877,3548 +129279,4905 @@ exports.Notification = Notification; // 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; +var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { + enumerable: true, + get: function () { + return m[k]; + } + }; + } + Object.defineProperty(o, k2, desc); +} : function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; }); -var __importStar = (this && this.__importStar) || function (mod) { +var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); +} : function (o, v) { + o["default"] = v; +}); +var __importStar = this && this.__importStar || function () { + var ownKeys = function (o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _Upload_instances, _Upload_gcclGcsCmd, _Upload_resetLocalBuffersCache, _Upload_addLocalBufferCache; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkUploadStatus = exports.createURI = exports.upload = exports.Upload = exports.PROTOCOL_REGEX = void 0; -const abort_controller_1 = __importDefault(__nccwpck_require__(61659)); -const crypto_1 = __nccwpck_require__(6113); -const gaxios = __importStar(__nccwpck_require__(59555)); -const google_auth_library_1 = __nccwpck_require__(20810); + }; +}(); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PassThroughShim = void 0; +exports.normalize = normalize; +exports.objectEntries = objectEntries; +exports.fixedEncodeURIComponent = fixedEncodeURIComponent; +exports.encodeURI = encodeURI; +exports.qsStringify = qsStringify; +exports.objectKeyToLowercase = objectKeyToLowercase; +exports.unicodeJSONStringify = unicodeJSONStringify; +exports.convertObjKeysToSnakeCase = convertObjKeysToSnakeCase; +exports.formatAsUTCISO = formatAsUTCISO; +exports.getRuntimeTrackingString = getRuntimeTrackingString; +exports.getUserAgentString = getUserAgentString; +exports.getDirName = getDirName; +exports.getModuleFormat = getModuleFormat; +const path = __importStar(__nccwpck_require__(71017)); +const querystring = __importStar(__nccwpck_require__(63477)); const stream_1 = __nccwpck_require__(12781); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -const uuid = __importStar(__nccwpck_require__(44458)); -const util_js_1 = __nccwpck_require__(59258); -const util_js_2 = __nccwpck_require__(38064); +const url = __importStar(__nccwpck_require__(57310)); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const package_json_helper_cjs_1 = __nccwpck_require__(28568); -const NOT_FOUND_STATUS_CODE = 404; -const RESUMABLE_INCOMPLETE_STATUS_CODE = 308; -const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); -exports.PROTOCOL_REGEX = /^(\w*):\/\//; -class Upload extends stream_1.Writable { - constructor(cfg) { - var _a; - super(cfg); - _Upload_instances.add(this); - this.numBytesWritten = 0; - this.numRetries = 0; - this.currentInvocationId = { - checkUploadStatus: uuid.v4(), - chunk: uuid.v4(), - uri: uuid.v4(), - }; - /** - * A cache of buffers written to this instance, ready for consuming - */ - this.writeBuffers = []; - this.numChunksReadInRequest = 0; - /** - * An array of buffers used for caching the most recent upload chunk. - * We should not assume that the server received all bytes sent in the request. - * - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - */ - this.localWriteCache = []; - this.localWriteCacheByteLength = 0; - this.upstreamEnded = false; - _Upload_gcclGcsCmd.set(this, void 0); - cfg = cfg || {}; - if (!cfg.bucket || !cfg.file) { - throw new Error('A bucket and file name are required'); - } - if (cfg.offset && !cfg.uri) { - throw new RangeError('Cannot provide an `offset` without providing a `uri`'); - } - if (cfg.isPartialUpload && !cfg.chunkSize) { - throw new RangeError('Cannot set `isPartialUpload` without providing a `chunkSize`'); - } - cfg.authConfig = cfg.authConfig || {}; - cfg.authConfig.scopes = [ - 'https://www.googleapis.com/auth/devstorage.full_control', - ]; - this.authClient = cfg.authClient || new google_auth_library_1.GoogleAuth(cfg.authConfig); - const universe = cfg.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; - this.apiEndpoint = `https://storage.${universe}`; - if (cfg.apiEndpoint && cfg.apiEndpoint !== this.apiEndpoint) { - this.apiEndpoint = this.sanitizeEndpoint(cfg.apiEndpoint); - const hostname = new URL(this.apiEndpoint).hostname; - // check if it is a domain of a known universe - const isDomain = hostname === universe; - const isDefaultUniverseDomain = hostname === google_auth_library_1.DEFAULT_UNIVERSE; - // check if it is a subdomain of a known universe - // by checking a last (universe's length + 1) of a hostname - const isSubDomainOfUniverse = hostname.slice(-(universe.length + 1)) === `.${universe}`; - const isSubDomainOfDefaultUniverse = hostname.slice(-(google_auth_library_1.DEFAULT_UNIVERSE.length + 1)) === - `.${google_auth_library_1.DEFAULT_UNIVERSE}`; - if (!isDomain && - !isDefaultUniverseDomain && - !isSubDomainOfUniverse && - !isSubDomainOfDefaultUniverse) { - // a custom, non-universe domain, - // use gaxios - this.authClient = gaxios; +// Done to avoid a problem with mangling of identifiers when using esModuleInterop +const fileURLToPath = url.fileURLToPath; +const isEsm = false; +function normalize(optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + return { + options, + callback + }; +} +/** + * Flatten an object into an Array of arrays, [[key, value], ..]. + * Implements Object.entries() for Node.js <8 + * @internal + */ +function objectEntries(obj) { + return Object.keys(obj).map(key => [key, obj[key]]); +} +/** + * Encode `str` with encodeURIComponent, plus these + * reserved characters: `! * ' ( )`. + * + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent| MDN: fixedEncodeURIComponent} + * + * @param {string} str The URI component to encode. + * @return {string} The encoded string. + */ +function fixedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase()); +} +/** + * URI encode `uri` for generating signed URLs, using fixedEncodeURIComponent. + * + * Encode every byte except `A-Z a-Z 0-9 ~ - . _`. + * + * @param {string} uri The URI to encode. + * @param [boolean=false] encodeSlash If `true`, the "/" character is not encoded. + * @return {string} The encoded string. + */ +function encodeURI(uri, encodeSlash) { + // Split the string by `/`, and conditionally rejoin them with either + // %2F if encodeSlash is `true`, or '/' if `false`. + return uri.split('/').map(fixedEncodeURIComponent).join(encodeSlash ? '%2F' : '/'); +} +/** + * Serialize an object to a URL query string using util.encodeURI(uri, true). + * @param {string} url The object to serialize. + * @return {string} Serialized string. + */ +function qsStringify(qs) { + return querystring.stringify(qs, '&', '=', { + encodeURIComponent: component => encodeURI(component, true) + }); +} +function objectKeyToLowercase(object) { + const newObj = {}; + for (let key of Object.keys(object)) { + const value = object[key]; + key = key.toLowerCase(); + newObj[key] = value; + } + return newObj; +} +/** + * JSON encode str, with unicode \u+ representation. + * @param {object} obj The object to encode. + * @return {string} Serialized string. + */ +function unicodeJSONStringify(obj) { + return JSON.stringify(obj).replace(/[\u0080-\uFFFF]/g, char => '\\u' + ('0000' + char.charCodeAt(0).toString(16)).slice(-4)); +} +/** + * Converts the given objects keys to snake_case + * @param {object} obj object to convert keys to snake case. + * @returns {object} object with keys converted to snake case. + */ +function convertObjKeysToSnakeCase(obj) { + if (obj instanceof Date || obj instanceof RegExp) { + return obj; + } + if (Array.isArray(obj)) { + return obj.map(convertObjKeysToSnakeCase); + } + if (obj instanceof Object) { + return Object.keys(obj).reduce((acc, cur) => { + const s = cur[0].toLocaleLowerCase() + cur.slice(1).replace(/([A-Z]+)/g, (match, p1) => { + return `_${p1.toLowerCase()}`; + }); + acc[s] = convertObjKeysToSnakeCase(obj[cur]); + return acc; + }, Object()); + } + return obj; +} +/** + * Formats the provided date object as a UTC ISO string. + * @param {Date} dateTimeToFormat date object to be formatted. + * @param {boolean} includeTime flag to include hours, minutes, seconds in output. + * @param {string} dateDelimiter delimiter between date components. + * @param {string} timeDelimiter delimiter between time components. + * @returns {string} UTC ISO format of provided date object. + */ +function formatAsUTCISO(dateTimeToFormat, includeTime = false, dateDelimiter = '', timeDelimiter = '') { + const year = dateTimeToFormat.getUTCFullYear(); + const month = dateTimeToFormat.getUTCMonth() + 1; + const day = dateTimeToFormat.getUTCDate(); + const hour = dateTimeToFormat.getUTCHours(); + const minute = dateTimeToFormat.getUTCMinutes(); + const second = dateTimeToFormat.getUTCSeconds(); + let resultString = `${year.toString().padStart(4, '0')}${dateDelimiter}${month.toString().padStart(2, '0')}${dateDelimiter}${day.toString().padStart(2, '0')}`; + if (includeTime) { + resultString = `${resultString}T${hour.toString().padStart(2, '0')}${timeDelimiter}${minute.toString().padStart(2, '0')}${timeDelimiter}${second.toString().padStart(2, '0')}Z`; + } + return resultString; +} +/** + * Examines the runtime environment and returns the appropriate tracking string. + * @returns {string} metrics tracking string based on the current runtime environment. + */ +function getRuntimeTrackingString() { + if ( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + globalThis.Deno && + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + globalThis.Deno.version && + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + globalThis.Deno.version.deno) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + return `gl-deno/${globalThis.Deno.version.deno}`; + } else { + return `gl-node/${process.versions.node}`; + } +} +/** + * Looks at package.json and creates the user-agent string to be applied to request headers. + * @returns {string} user agent string. + */ +function getUserAgentString() { + const pkg = (0, package_json_helper_cjs_1.getPackageJSON)(); + const hyphenatedPackageName = pkg.name.replace('@google-cloud', 'gcloud-node') // For legacy purposes. + .replace('/', '-'); // For UA spec-compliance purposes. + return hyphenatedPackageName + '/' + pkg.version; +} +function getDirName() { + let dirToUse = ''; + try { + dirToUse = __dirname; + } catch (e) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + dirToUse = __dirname; + } + return dirToUse; +} +function getModuleFormat() { + return isEsm ? 'ESM' : 'CJS'; +} +class PassThroughShim extends stream_1.PassThrough { + constructor() { + super(...arguments); + this.shouldEmitReading = true; + this.shouldEmitWriting = true; + } + _read(size) { + if (this.shouldEmitReading) { + this.emit('reading'); + this.shouldEmitReading = false; + } + super._read(size); + } + _write(chunk, encoding, callback) { + if (this.shouldEmitWriting) { + this.emit('writing'); + this.shouldEmitWriting = false; + } + // Per the nodejs documentation, callback must be invoked on the next tick + process.nextTick(() => { + super._write(chunk, encoding, callback); + }); + } + _final(callback) { + // If the stream is empty (i.e. empty file) final will be invoked before _read / _write + // and we should still emit the proper events. + if (this.shouldEmitReading) { + this.emit('reading'); + this.shouldEmitReading = false; + } + if (this.shouldEmitWriting) { + this.emit('writing'); + this.shouldEmitWriting = false; + } + callback(null); + } +} +exports.PassThroughShim = PassThroughShim; + + +/***/ }), + +/***/ 72033: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AbortError = void 0; +/** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts snippet:ReadmeSampleAbortError + * import { AbortError } from "@typespec/ts-http-runtime"; + * + * async function doAsyncWork(options: { abortSignal: AbortSignal }): Promise { + * if (options.abortSignal.aborted) { + * throw new AbortError(); + * } + * + * // do async work + * } + * + * const controller = new AbortController(); + * controller.abort(); + * + * try { + * doAsyncWork({ abortSignal: controller.signal }); + * } catch (e) { + * if (e instanceof Error && e.name === "AbortError") { + * // handle abort error here. + * } + * } + * ``` + */ +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } +} +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map + +/***/ }), + +/***/ 5630: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isOAuth2TokenCredential = isOAuth2TokenCredential; +exports.isBearerTokenCredential = isBearerTokenCredential; +exports.isBasicCredential = isBasicCredential; +exports.isApiKeyCredential = isApiKeyCredential; +/** + * Type guard to check if a credential is an OAuth2 token credential. + */ +function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; +} +/** + * Type guard to check if a credential is a Bearer token credential. + */ +function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; +} +/** + * Type guard to check if a credential is a Basic auth credential. + */ +function isBasicCredential(credential) { + return "username" in credential && "password" in credential; +} +/** + * Type guard to check if a credential is an API key credential. + */ +function isApiKeyCredential(credential) { + return "key" in credential; +} +//# sourceMappingURL=credentials.js.map + +/***/ }), + +/***/ 38018: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=oauth2Flows.js.map + +/***/ }), + +/***/ 65546: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=schemes.js.map + +/***/ }), + +/***/ 51648: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiVersionPolicyName = void 0; +exports.apiVersionPolicy = apiVersionPolicy; +exports.apiVersionPolicyName = "ApiVersionPolicy"; +/** + * Creates a policy that sets the apiVersion as a query parameter on every request + * @param options - Client options + * @returns Pipeline policy that sets the apiVersion as a query parameter on every request + */ +function apiVersionPolicy(options) { + return { + name: exports.apiVersionPolicyName, + sendRequest: (req, next) => { + // Use the apiVesion defined in request url directly + // Append one if there is no apiVesion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; } + return next(req); + }, + }; +} +//# sourceMappingURL=apiVersionPolicy.js.map + +/***/ }), + +/***/ 11687: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultPipeline = createDefaultPipeline; +exports.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; +const defaultHttpClient_js_1 = __nccwpck_require__(42917); +const createPipelineFromOptions_js_1 = __nccwpck_require__(97239); +const apiVersionPolicy_js_1 = __nccwpck_require__(51648); +const credentials_js_1 = __nccwpck_require__(5630); +const apiKeyAuthenticationPolicy_js_1 = __nccwpck_require__(7937); +const basicAuthenticationPolicy_js_1 = __nccwpck_require__(10068); +const bearerAuthenticationPolicy_js_1 = __nccwpck_require__(73054); +const oauth2AuthenticationPolicy_js_1 = __nccwpck_require__(71305); +let cachedHttpClient; +/** + * Creates a default rest pipeline to re-use accross Rest Level Clients + */ +function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.baseURI = `${this.apiEndpoint}/upload/storage/v1/b`; - this.bucket = cfg.bucket; - const cacheKeyElements = [cfg.bucket, cfg.file]; - if (typeof cfg.generation === 'number') { - cacheKeyElements.push(`${cfg.generation}`); - } - this.cacheKey = cacheKeyElements.join('/'); - this.customRequestOptions = cfg.customRequestOptions || {}; - this.file = cfg.file; - this.generation = cfg.generation; - this.kmsKeyName = cfg.kmsKeyName; - this.metadata = cfg.metadata || {}; - this.offset = cfg.offset; - this.origin = cfg.origin; - this.params = cfg.params || {}; - this.userProject = cfg.userProject; - this.chunkSize = cfg.chunkSize; - this.retryOptions = cfg.retryOptions; - this.isPartialUpload = (_a = cfg.isPartialUpload) !== null && _a !== void 0 ? _a : false; - if (cfg.key) { - const base64Key = Buffer.from(cfg.key).toString('base64'); - this.encryption = { - key: base64Key, - hash: (0, crypto_1.createHash)('sha256').update(cfg.key).digest('base64'), - }; + else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.predefinedAcl = cfg.predefinedAcl; - if (cfg.private) - this.predefinedAcl = 'private'; - if (cfg.public) - this.predefinedAcl = 'publicRead'; - const autoRetry = cfg.retryOptions.autoRetry; - this.uriProvidedManually = !!cfg.uri; - this.uri = cfg.uri; - if (this.offset) { - // we're resuming an incomplete upload - this.numBytesWritten = this.offset; + else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.numRetries = 0; // counter for number of retries currently executed - if (!autoRetry) { - cfg.retryOptions.maxRetries = 0; + else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.timeOfFirstRequest = Date.now(); - const contentLength = cfg.metadata - ? Number(cfg.metadata.contentLength) - : NaN; - this.contentLength = isNaN(contentLength) ? '*' : contentLength; - __classPrivateFieldSet(this, _Upload_gcclGcsCmd, cfg[util_js_2.GCCL_GCS_CMD_KEY], "f"); - this.once('writing', () => { - if (this.uri) { - this.continueUploading(); - } - else { - this.createURI(err => { - if (err) { - return this.destroy(err); - } - this.startUploading(); - return; - }); - } - }); - } - /** - * Prevent 'finish' event until the upload has succeeded. - * - * @param fireFinishEvent The finish callback - */ - _final(fireFinishEvent = () => { }) { - this.upstreamEnded = true; - this.once('uploadFinished', fireFinishEvent); - process.nextTick(() => { - this.emit('upstreamFinished'); - // it's possible `_write` may not be called - namely for empty object uploads - this.emit('writing'); - }); } - /** - * Handles incoming data from upstream - * - * @param chunk The chunk to append to the buffer - * @param encoding The encoding of the chunk - * @param readCallback A callback for when the buffer has been read downstream - */ - _write(chunk, encoding, readCallback = () => { }) { - // Backwards-compatible event - this.emit('writing'); - this.writeBuffers.push(typeof chunk === 'string' ? Buffer.from(chunk, encoding) : chunk); - this.once('readFromChunkBuffer', readCallback); - process.nextTick(() => this.emit('wroteToChunkBuffer')); + return pipeline; +} +function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); } - /** - * Prepends the local buffer to write buffer and resets it. - * - * @param keepLastBytes number of bytes to keep from the end of the local buffer. - */ - prependLocalBufferToUpstream(keepLastBytes) { - // Typically, the upstream write buffers should be smaller than the local - // cache, so we can save time by setting the local cache as the new - // upstream write buffer array and appending the old array to it - let initialBuffers = []; - if (keepLastBytes) { - // we only want the last X bytes - let bytesKept = 0; - while (keepLastBytes > bytesKept) { - // load backwards because we want the last X bytes - // note: `localWriteCacheByteLength` is reset below - let buf = this.localWriteCache.pop(); - if (!buf) - break; - bytesKept += buf.byteLength; - if (bytesKept > keepLastBytes) { - // we have gone over the amount desired, let's keep the last X bytes - // of this buffer - const diff = bytesKept - keepLastBytes; - buf = buf.subarray(diff); - bytesKept -= diff; - } - initialBuffers.unshift(buf); - } - } - else { - // we're keeping all of the local cache, simply use it as the initial buffer - initialBuffers = this.localWriteCache; - } - // Append the old upstream to the new - const append = this.writeBuffers; - this.writeBuffers = initialBuffers; - for (const buf of append) { - this.writeBuffers.push(buf); + return cachedHttpClient; +} +//# sourceMappingURL=clientHelpers.js.map + +/***/ }), + +/***/ 15714: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getClient = getClient; +const clientHelpers_js_1 = __nccwpck_require__(11687); +const sendRequest_js_1 = __nccwpck_require__(87891); +const urlHelpers_js_1 = __nccwpck_require__(91752); +const checkEnvironment_js_1 = __nccwpck_require__(94121); +/** + * Creates a client with a default pipeline + * @param endpoint - Base endpoint for the client + * @param credentials - Credentials to authenticate the requests + * @param options - Client options + */ +function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + // Sign happens after Retry and is commonly needed to occur + // before policies that intercept post-retry. + const afterPhase = position === "perRetry" ? "Sign" : undefined; + pipeline.addPolicy(policy, { + afterPhase, + }); } - // reset last buffers sent - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); } - /** - * Retrieves data from upstream's buffer. - * - * @param limit The maximum amount to return from the buffer. - */ - *pullFromChunkBuffer(limit) { - while (limit) { - const buf = this.writeBuffers.shift(); - if (!buf) - break; - let bufToYield = buf; - if (buf.byteLength > limit) { - bufToYield = buf.subarray(0, limit); - this.writeBuffers.unshift(buf.subarray(limit)); - limit = 0; + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline, + }; +} +function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function (onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); } else { - limit -= buf.byteLength; - } - yield bufToYield; - // Notify upstream we've read from the buffer and we're able to consume - // more. It can also potentially send more data down as we're currently - // iterating. - this.emit('readFromChunkBuffer'); - } - } - /** - * A handler for determining if data is ready to be read from upstream. - * - * @returns If there will be more chunks to read in the future - */ - async waitForNextChunk() { - const willBeMoreChunks = await new Promise(resolve => { - // There's data available - it should be digested - if (this.writeBuffers.length) { - return resolve(true); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } - // The upstream writable ended, we shouldn't expect any more data. - if (this.upstreamEnded) { - return resolve(false); + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } - // Nothing immediate seems to be determined. We need to prepare some - // listeners to determine next steps... - const wroteToChunkBufferCallback = () => { - removeListeners(); - return resolve(true); - }; - const upstreamFinishedCallback = () => { - removeListeners(); - // this should be the last chunk, if there's anything there - if (this.writeBuffers.length) - return resolve(true); - return resolve(false); - }; - // Remove listeners when we're ready to callback. - const removeListeners = () => { - this.removeListener('wroteToChunkBuffer', wroteToChunkBufferCallback); - this.removeListener('upstreamFinished', upstreamFinishedCallback); - }; - // If there's data recently written it should be digested - this.once('wroteToChunkBuffer', wroteToChunkBufferCallback); - // If the upstream finishes let's see if there's anything to grab - this.once('upstreamFinished', upstreamFinishedCallback); - }); - return willBeMoreChunks; - } - /** - * Reads data from upstream up to the provided `limit`. - * Ends when the limit has reached or no data is expected to be pushed from upstream. - * - * @param limit The most amount of data this iterator should return. `Infinity` by default. - */ - async *upstreamIterator(limit = Infinity) { - // read from upstream chunk buffer - while (limit && (await this.waitForNextChunk())) { - // read until end or limit has been reached - for (const chunk of this.pullFromChunkBuffer(limit)) { - limit -= chunk.byteLength; - yield chunk; + else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); } + }, + }; +} +//# sourceMappingURL=getClient.js.map + +/***/ }), + +/***/ 56985: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildBodyPart = buildBodyPart; +exports.buildMultipartBody = buildMultipartBody; +const restError_js_1 = __nccwpck_require__(42858); +const httpHeaders_js_1 = __nccwpck_require__(66816); +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const typeGuards_js_1 = __nccwpck_require__(61580); +/** + * Get value of a header in the part descriptor ignoring case + */ +function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; } } - createURI(callback) { - if (!callback) { - return this.createURIAsync(); - } - this.createURIAsync().then(r => callback(null, r), callback); + return undefined; +} +function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; } - async createURIAsync() { - const metadata = { ...this.metadata }; - const headers = {}; - // Delete content length and content type from metadata if they exist. - // These are headers and should not be sent as part of the metadata. - if (metadata.contentLength) { - headers['X-Upload-Content-Length'] = metadata.contentLength.toString(); - delete metadata.contentLength; - } - if (metadata.contentType) { - headers['X-Upload-Content-Type'] = metadata.contentType; - delete metadata.contentType; + // Special value of null means content type is to be omitted + if (descriptor.contentType === null) { + return undefined; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === undefined) { + return undefined; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + // arbitrary non-text object -> generic JSON content type by default. We will try to JSON.stringify the body. + return "application/json"; +} +/** + * Enclose value in quotes and escape special characters, for use in the Content-Disposition header + */ +function escapeDispositionField(value) { + return JSON.stringify(value); +} +function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === undefined && + descriptor.name === undefined && + descriptor.filename === undefined) { + return undefined; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = undefined; + if (descriptor.filename) { + filename = descriptor.filename; + } + else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; } - let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.uri}`; - if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { - googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; +} +function normalizeBody(body, contentType) { + if (body === undefined) { + // zero-length body + return new Uint8Array([]); + } + // binary and primitives should go straight on the wire regardless of content type + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + // stringify objects for JSON-ish content types e.g. application/json, application/merge-patch+json, application/vnd.oci.manifest.v1+json, application.json; charset=UTF-8 + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); +} +function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body, + }; +} +function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; +} +//# sourceMappingURL=multipart.js.map + +/***/ }), + +/***/ 16857: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.operationOptionsToRequestParameters = operationOptionsToRequestParameters; +/** + * Helper function to convert OperationOptions to RequestParameters + * @param options - the options that are used by Modular layer to send the request + * @returns the result of the conversion in RequestParameters of RLC layer + */ +function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse, + }; +} +//# sourceMappingURL=operationOptionHelpers.js.map + +/***/ }), + +/***/ 24193: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createRestError = createRestError; +const restError_js_1 = __nccwpck_require__(42858); +const httpHeaders_js_1 = __nccwpck_require__(66816); +function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" + ? messageOrResponse + : (internalError?.message ?? `Unexpected status code: ${resp.status}`); + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp), + }); +} +function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1, + }; +} +function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? undefined : status; +} +//# sourceMappingURL=restError.js.map + +/***/ }), + +/***/ 87891: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sendRequest = sendRequest; +const restError_js_1 = __nccwpck_require__(42858); +const httpHeaders_js_1 = __nccwpck_require__(66816); +const pipelineRequest_js_1 = __nccwpck_require__(47983); +const clientHelpers_js_1 = __nccwpck_require__(11687); +const typeGuards_js_1 = __nccwpck_require__(61580); +const multipart_js_1 = __nccwpck_require__(56985); +/** + * Helper function to send request used by the client + * @param method - method to use to send the request + * @param url - url to send the request to + * @param pipeline - pipeline with the policies to run when sending the request + * @param options - request options + * @param customHttpClient - a custom HttpClient to use when making the request + * @returns returns and HttpResponse + */ +async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== undefined ? undefined : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); } - // Check if headers already exist before creating new ones - const reqOpts = { - method: 'POST', - url: [this.baseURI, this.bucket, 'o'].join('/'), - params: Object.assign({ - name: this.file, - uploadType: 'resumable', - }, this.params), - data: metadata, - headers: { - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': googAPIClient, - ...headers, - }, + return { + request, + headers, + status: `${response.status}`, + body, }; - if (metadata.contentLength) { - reqOpts.headers['X-Upload-Content-Length'] = - metadata.contentLength.toString(); - } - if (metadata.contentType) { - reqOpts.headers['X-Upload-Content-Type'] = metadata.contentType; - } - if (typeof this.generation !== 'undefined') { - reqOpts.params.ifGenerationMatch = this.generation; - } - if (this.kmsKeyName) { - reqOpts.params.kmsKeyName = this.kmsKeyName; - } - if (this.predefinedAcl) { - reqOpts.params.predefinedAcl = this.predefinedAcl; - } - if (this.origin) { - reqOpts.headers.Origin = this.origin; + } + catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + // UNBRANDED DIFFERENCE: onResponse callback does not have a second __legacyError property + options?.onResponse({ ...response, request, rawHeaders }, e); } - const uri = await (0, async_retry_1.default)(async (bail) => { - var _a, _b, _c; - try { - const res = await this.makeRequest(reqOpts); - // We have successfully got a URI we can now create a new invocation id - this.currentInvocationId.uri = uuid.v4(); - return res.headers.location; - } - catch (err) { - const e = err; - const apiError = { - code: (_a = e.response) === null || _a === void 0 ? void 0 : _a.status, - name: (_b = e.response) === null || _b === void 0 ? void 0 : _b.statusText, - message: (_c = e.response) === null || _c === void 0 ? void 0 : _c.statusText, - errors: [ - { - reason: e.code, - }, - ], - }; - if (this.retryOptions.maxRetries > 0 && - this.retryOptions.retryableErrorFn(apiError)) { - throw e; - } - else { - return bail(e); - } - } - }, { - retries: this.retryOptions.maxRetries, - factor: this.retryOptions.retryDelayMultiplier, - maxTimeout: this.retryOptions.maxRetryDelay * 1000, //convert to milliseconds - maxRetryTime: this.retryOptions.totalTimeout * 1000, //convert to milliseconds - }); - this.uri = uri; - this.offset = 0; - // emit the newly generated URI for future reuse, if necessary. - this.emit('uri', uri); - return uri; + throw e; } - async continueUploading() { - var _a; - (_a = this.offset) !== null && _a !== void 0 ? _a : (await this.getAndSetOffset()); - return this.startUploading(); +} +/** + * Function to determine the request content type + * @param options - request options InternalRequestParameters + * @returns returns the content-type + */ +function getRequestContentType(options = {}) { + return (options.contentType ?? + options.headers?.["content-type"] ?? + getContentType(options.body)); +} +/** + * Function to determine the content-type of a body + * this is used if an explicit content-type is not provided + * @param body - body in the request + * @returns returns the content-type + */ +function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; } - async startUploading() { - const multiChunkMode = !!this.chunkSize; - let responseReceived = false; - this.numChunksReadInRequest = 0; - if (!this.offset) { - this.offset = 0; + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; } - // Check if the offset (server) is too far behind the current stream - if (this.offset < this.numBytesWritten) { - const delta = this.numBytesWritten - this.offset; - const message = `The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${delta} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`; - this.emit('error', new RangeError(message)); - return; + catch (error) { + // If we fail to parse the body, it is not json + return undefined; } - // Check if we should 'fast-forward' to the relevant data to upload - if (this.numBytesWritten < this.offset) { - // 'fast-forward' to the byte where we need to upload. - // only push data from the byte after the one we left off on - const fastForwardBytes = this.offset - this.numBytesWritten; - for await (const _chunk of this.upstreamIterator(fastForwardBytes)) { - _chunk; // discard the data up until the point we want + } + // By default return json + return "application/json"; +} +function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== undefined || multipartBody !== undefined; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...(options.headers ? options.headers : {}), + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...(hasContent && + requestContentType && { + "content-type": requestContentType, + }), + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream + ? new Set([Number.POSITIVE_INFINITY]) + : undefined, + }); +} +/** + * Prepares the body before sending the request + */ +function getRequestBody(body, contentType = "") { + if (body === undefined) { + return { body: undefined }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; } - this.numBytesWritten = this.offset; + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; + } + return { body: JSON.stringify(body) }; + } +} +/** + * Prepares the response body + */ +function getResponseBody(response) { + // Set the default response type + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); + } + // Default to "application/json" and fallback to string; + try { + return bodyToParse ? JSON.parse(bodyToParse) : undefined; + } + catch (error) { + // If we were supposed to get a JSON object and failed to + // parse, throw a parse error + if (firstType === "application/json") { + throw createParseError(response, error); + } + // We are not sure how to handle the response so we return it as + // plain text. + return String(bodyToParse); + } +} +function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response: response, + }); +} +//# sourceMappingURL=sendRequest.js.map + +/***/ }), + +/***/ 91752: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildRequestUrl = buildRequestUrl; +exports.buildBaseUrl = buildBaseUrl; +exports.replaceAll = replaceAll; +function isQueryParameterWithOptions(x) { + const value = x.value; + return (value !== undefined && value.toString !== undefined && typeof value.toString === "function"); +} +/** + * Builds the request url, filling in query and path parameters + * @param endpoint - base url which can be a template url + * @param routePath - path to append to the endpoint + * @param pathParameters - values of the path parameters + * @param options - request parameters including query parameters + * @returns a full url with path and query parameters + */ +function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return (url + .toString() + // Remove double forward slashes + .replace(/([^:]\/)\/+/g, "$1")); +} +function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } + else if (style === "spaceDelimited") { + separator = "%20"; + } + else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } + else if (typeof param === "object" && param.toString === Object.prototype.toString) { + // If the parameter is an object without a custom toString implementation (e.g. a Date), + // then we should deconstruct the object into an array [key1, value1, key2, value2, ...]. + paramValues = Object.entries(param).flat(); + } + else { + paramValues = [param]; + } + const value = paramValues + .map((p) => { + if (p === null || p === undefined) { + return ""; } - let expectedUploadSize = undefined; - // Set `expectedUploadSize` to `contentLength - this.numBytesWritten`, if available - if (typeof this.contentLength === 'number') { - expectedUploadSize = this.contentLength - this.numBytesWritten; + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); } - // `expectedUploadSize` should be no more than the `chunkSize`. - // It's possible this is the last chunk request for a multiple - // chunk upload, thus smaller than the chunk size. - if (this.chunkSize) { - expectedUploadSize = expectedUploadSize - ? Math.min(this.chunkSize, expectedUploadSize) - : this.chunkSize; + const rawValue = p.toISOString !== undefined ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }) + .join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; +} +function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === undefined || param === null) { + continue; } - // A queue for the upstream data - const upstreamQueue = this.upstreamIterator(expectedUploadSize); - // The primary read stream for this request. This stream retrieves no more - // than the exact requested amount from upstream. - const requestStream = new stream_1.Readable({ - read: async () => { - // Don't attempt to retrieve data upstream if we already have a response - if (responseReceived) - requestStream.push(null); - const result = await upstreamQueue.next(); - if (result.value) { - this.numChunksReadInRequest++; - if (multiChunkMode) { - // save ever buffer used in the request in multi-chunk mode - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); - } - else { - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); - } - this.numBytesWritten += result.value.byteLength; - this.emit('progress', { - bytesWritten: this.numBytesWritten, - contentLength: this.contentLength, - }); - requestStream.push(result.value); + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? (param.explode ?? false) : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); } - if (result.done) { - requestStream.push(null); + } + else if (typeof rawValue === "object") { + // For object explode, the name of the query parameter is ignored and we use the object key instead + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); } - }, - }); - let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.chunk}`; - if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { - googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; - } - const headers = { - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': googAPIClient, - }; - // If using multiple chunk upload, set appropriate header - if (multiChunkMode) { - // We need to know how much data is available upstream to set the `Content-Range` header. - // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - for await (const chunk of this.upstreamIterator(expectedUploadSize)) { - // This will conveniently track and keep the size of the buffers. - // We will reach either the expected upload size or the remainder of the stream. - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, chunk); } - // This is the sum from the `#addLocalBufferCache` calls - const bytesToUpload = this.localWriteCacheByteLength; - // Important: we want to know if the upstream has ended and the queue is empty before - // unshifting data back into the queue. This way we will know if this is the last request or not. - const isLastChunkOfUpload = !(await this.waitForNextChunk()); - // Important: put the data back in the queue for the actual upload - this.prependLocalBufferToUpstream(); - let totalObjectSize = this.contentLength; - if (typeof this.contentLength !== 'number' && - isLastChunkOfUpload && - !this.isPartialUpload) { - // Let's let the server know this is the last chunk of the object since we didn't set it before. - totalObjectSize = bytesToUpload + this.numBytesWritten; + else { + // Explode doesn't really make sense for primitives + throw new Error("explode can only be set to true for objects and arrays"); } - // `- 1` as the ending byte is inclusive in the request. - const endingByte = bytesToUpload + this.numBytesWritten - 1; - // `Content-Length` for multiple chunk uploads is the size of the chunk, - // not the overall object - headers['Content-Length'] = bytesToUpload; - headers['Content-Range'] = - `bytes ${this.offset}-${endingByte}/${totalObjectSize}`; } else { - headers['Content-Range'] = `bytes ${this.offset}-*/${this.contentLength}`; + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); } - const reqOpts = { - method: 'PUT', - url: this.uri, - headers, - body: requestStream, - }; - try { - const resp = await this.makeRequestStream(reqOpts); - if (resp) { - responseReceived = true; - await this.responseHandler(resp); - } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); +} +function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === undefined || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); } - catch (e) { - const err = e; - if (this.retryOptions.retryableErrorFn(err)) { - this.attemptDelayedRetry({ - status: NaN, - data: err, - }); - return; - } - this.destroy(err); + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); } + let value = param.toISOString !== undefined ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); + } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; } - // Process the API response to look for errors that came in - // the response body. - async responseHandler(resp) { - if (resp.data.error) { - this.destroy(resp.data.error); - return; + return endpoint; +} +function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); } - // At this point we can safely create a new id for the chunk - this.currentInvocationId.chunk = uuid.v4(); - const moreDataToUpload = await this.waitForNextChunk(); - const shouldContinueWithNextMultiChunkRequest = this.chunkSize && - resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && - resp.headers.range && - moreDataToUpload; - /** - * This is true when we're expecting to upload more data in a future request, - * yet the upstream for the upload session has been exhausted. - */ - const shouldContinueUploadInAnotherRequest = this.isPartialUpload && - resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && - !moreDataToUpload; - if (shouldContinueWithNextMultiChunkRequest) { - // Use the upper value in this header to determine where to start the next chunk. - // We should not assume that the server received all bytes sent in the request. - // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - const range = resp.headers.range; - this.offset = Number(range.split('-')[1]) + 1; - // We should not assume that the server received all bytes sent in the request. - // - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - const missingBytes = this.numBytesWritten - this.offset; - if (missingBytes) { - // As multi-chunk uploads send one chunk per request and pulls one - // chunk into the pipeline, prepending the missing bytes back should - // be fine for the next request. - this.prependLocalBufferToUpstream(missingBytes); - this.numBytesWritten -= missingBytes; - } - else { - // No bytes missing - no need to keep the local cache - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; +} +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param value - The value to search and replace in. + * @param searchValue - The value to search for in the value argument. + * @param replaceValue - The value to replace searchValue with in the value argument. + * @returns The value where each instance of searchValue was replaced with replacedValue. + */ +function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} +//# sourceMappingURL=urlHelpers.js.map + +/***/ }), + +/***/ 58463: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "0.3.2"; +exports.DEFAULT_RETRY_POLICY_COUNT = 3; +//# sourceMappingURL=constants.js.map + +/***/ }), + +/***/ 97239: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineFromOptions = createPipelineFromOptions; +const logPolicy_js_1 = __nccwpck_require__(71610); +const pipeline_js_1 = __nccwpck_require__(34744); +const redirectPolicy_js_1 = __nccwpck_require__(45125); +const userAgentPolicy_js_1 = __nccwpck_require__(35402); +const decompressResponsePolicy_js_1 = __nccwpck_require__(74162); +const defaultRetryPolicy_js_1 = __nccwpck_require__(20297); +const formDataPolicy_js_1 = __nccwpck_require__(51393); +const checkEnvironment_js_1 = __nccwpck_require__(94121); +const proxyPolicy_js_1 = __nccwpck_require__(57954); +const agentPolicy_js_1 = __nccwpck_require__(73398); +const tlsPolicy_js_1 = __nccwpck_require__(24655); +const multipartPolicy_js_1 = __nccwpck_require__(95316); +/** + * Create a new pipeline with a default set of customizable policies. + * @param options - Options to configure a custom pipeline. + */ +function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + // The multipart policy is added after policies with no phase, so that + // policies can be added between it and formDataPolicy to modify + // properties (e.g., making the boundary constant in recorded tests). + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + // Both XHR and Fetch expect to handle redirects automatically, + // so only include this policy when we're in Node. + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; +} +//# sourceMappingURL=createPipelineFromOptions.js.map + +/***/ }), + +/***/ 42917: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultHttpClient = createDefaultHttpClient; +const nodeHttpClient_js_1 = __nccwpck_require__(63098); +/** + * Create the correct HttpClient for the current environment. + */ +function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); +} +//# sourceMappingURL=defaultHttpClient.js.map + +/***/ }), + +/***/ 66816: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpHeaders = createHttpHeaders; +function normalizeName(name) { + return name.toLowerCase(); +} +function* headerIterator(map) { + for (const entry of map.values()) { + yield [entry.name, entry.value]; + } +} +class HttpHeadersImpl { + _headersMap; + constructor(rawHeaders) { + this._headersMap = new Map(); + if (rawHeaders) { + for (const headerName of Object.keys(rawHeaders)) { + this.set(headerName, rawHeaders[headerName]); } - // continue uploading next chunk - this.continueUploading(); } - else if (!this.isSuccessfulResponse(resp.status) && - !shouldContinueUploadInAnotherRequest) { - const err = new Error('Upload failed'); - err.code = resp.status; - err.name = 'Upload failed'; - if (resp === null || resp === void 0 ? void 0 : resp.data) { - err.errors = [resp === null || resp === void 0 ? void 0 : resp.data]; + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param name - The name of the header to set. This value is case-insensitive. + * @param value - The value of the header to set. + */ + set(name, value) { + this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param name - The name of the header. This value is case-insensitive. + */ + get(name) { + return this._headersMap.get(normalizeName(name))?.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + * @param name - The name of the header to set. This value is case-insensitive. + */ + has(name) { + return this._headersMap.has(normalizeName(name)); + } + /** + * Remove the header with the provided headerName. + * @param name - The name of the header to remove. + */ + delete(name) { + this._headersMap.delete(normalizeName(name)); + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJSON(options = {}) { + const result = {}; + if (options.preserveCase) { + for (const entry of this._headersMap.values()) { + result[entry.name] = entry.value; } - this.destroy(err); } else { - // no need to keep the cache - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); - if (resp && resp.data) { - resp.data.size = Number(resp.data.size); + for (const [normalizedName, entry] of this._headersMap) { + result[normalizedName] = entry.value; } - this.emit('metadata', resp.data); - // Allow the object (Upload) to continue naturally so the user's - // "finish" event fires. - this.emit('uploadFinished'); } + return result; } /** - * Check the status of an existing resumable upload. - * - * @param cfg A configuration to use. `uri` is required. - * @returns the current upload status + * Get the string representation of this HTTP header collection. */ - async checkUploadStatus(config = {}) { - let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.checkUploadStatus}`; - if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { - googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + toString() { + return JSON.stringify(this.toJSON({ preserveCase: true })); + } + /** + * Iterate over tuples of header [name, value] pairs. + */ + [Symbol.iterator]() { + return headerIterator(this._headersMap); + } +} +/** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders - A simple object representing initial headers + */ +function createHttpHeaders(rawHeaders) { + return new HttpHeadersImpl(rawHeaders); +} +//# sourceMappingURL=httpHeaders.js.map + +/***/ }), + +/***/ 83335: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createRestError = exports.operationOptionsToRequestParameters = exports.getClient = exports.createDefaultHttpClient = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isRestError = exports.RestError = exports.createEmptyPipeline = exports.createPipelineRequest = exports.createHttpHeaders = exports.TypeSpecRuntimeLogger = exports.setLogLevel = exports.getLogLevel = exports.createClientLogger = exports.AbortError = void 0; +const tslib_1 = __nccwpck_require__(4351); +var AbortError_js_1 = __nccwpck_require__(72033); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +var logger_js_1 = __nccwpck_require__(36720); +Object.defineProperty(exports, "createClientLogger", ({ enumerable: true, get: function () { return logger_js_1.createClientLogger; } })); +Object.defineProperty(exports, "getLogLevel", ({ enumerable: true, get: function () { return logger_js_1.getLogLevel; } })); +Object.defineProperty(exports, "setLogLevel", ({ enumerable: true, get: function () { return logger_js_1.setLogLevel; } })); +Object.defineProperty(exports, "TypeSpecRuntimeLogger", ({ enumerable: true, get: function () { return logger_js_1.TypeSpecRuntimeLogger; } })); +var httpHeaders_js_1 = __nccwpck_require__(66816); +Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); +tslib_1.__exportStar(__nccwpck_require__(65546), exports); +tslib_1.__exportStar(__nccwpck_require__(38018), exports); +var pipelineRequest_js_1 = __nccwpck_require__(47983); +Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); +var pipeline_js_1 = __nccwpck_require__(34744); +Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); +var restError_js_1 = __nccwpck_require__(42858); +Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); +Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); +var bytesEncoding_js_1 = __nccwpck_require__(88943); +Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); +Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); +var defaultHttpClient_js_1 = __nccwpck_require__(42917); +Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); +var getClient_js_1 = __nccwpck_require__(15714); +Object.defineProperty(exports, "getClient", ({ enumerable: true, get: function () { return getClient_js_1.getClient; } })); +var operationOptionHelpers_js_1 = __nccwpck_require__(16857); +Object.defineProperty(exports, "operationOptionsToRequestParameters", ({ enumerable: true, get: function () { return operationOptionHelpers_js_1.operationOptionsToRequestParameters; } })); +var restError_js_2 = __nccwpck_require__(24193); +Object.defineProperty(exports, "createRestError", ({ enumerable: true, get: function () { return restError_js_2.createRestError; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 85930: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_js_1 = __nccwpck_require__(36720); +exports.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 34907: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const log_js_1 = __nccwpck_require__(57792); +const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; +let enabledString; +let enabledNamespaces = []; +let skippedNamespaces = []; +const debuggers = []; +if (debugEnvVariable) { + enable(debugEnvVariable); +} +const debugObj = Object.assign((namespace) => { + return createDebugger(namespace); +}, { + enable, + enabled, + disable, + log: log_js_1.log, +}); +function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); } - const opts = { - method: 'PUT', - url: this.uri, - headers: { - 'Content-Length': 0, - 'Content-Range': 'bytes */*', - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': googAPIClient, - }, - }; - try { - const resp = await this.makeRequest(opts); - // Successfully got the offset we can now create a new offset invocation id - this.currentInvocationId.checkUploadStatus = uuid.v4(); - return resp; + else { + enabledNamespaces.push(ns); } - catch (e) { - if (config.retry === false || - !(e instanceof Error) || - !this.retryOptions.retryableErrorFn(e)) { - throw e; - } - const retryDelay = this.getRetryDelay(); - if (retryDelay <= 0) { - throw e; - } - await new Promise(res => setTimeout(res, retryDelay)); - return this.checkUploadStatus(config); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } +} +function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; + } + } + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; } } - async getAndSetOffset() { - try { - // we want to handle retries in this method. - const resp = await this.checkUploadStatus({ retry: false }); - if (resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE) { - if (typeof resp.headers.range === 'string') { - this.offset = Number(resp.headers.range.split('-')[1]) + 1; - return; + return false; +} +/** + * Given a namespace, check if it matches a pattern. + * Patterns only have a single wildcard character which is *. + * The behavior of * is that it matches zero or more other characters. + */ +function namespaceMatches(namespace, patternToMatch) { + // simple case, no pattern matching required + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + // normalize successive * if needed + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } + else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + // if wildcard is the last character, it will match the remaining namespace string + return true; + } + // now we let the wildcard eat characters until we match the next literal in the pattern + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + // reached the end of the namespace without a match + if (namespaceIndex === namespaceLength) { + return false; } } - this.offset = 0; + // now that we have a match, let's try to continue on + // however, it's possible we could find a later match + // so keep a reference in case we have to backtrack + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; } - catch (e) { - const err = e; - if (this.retryOptions.retryableErrorFn(err)) { - this.attemptDelayedRetry({ - status: NaN, - data: err, - }); - return; + else if (pattern[patternIndex] === namespace[namespaceIndex]) { + // simple case: literal pattern matches so keep going + patternIndex++; + namespaceIndex++; + } + else if (lastWildcard >= 0) { + // special case: we don't have a literal match, but there is a previous wildcard + // which we can backtrack to and try having the wildcard eat the match instead + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + // we've reached the end of the namespace without a match + if (namespaceIndex === namespaceLength) { + return false; } - this.destroy(err); - } - } - async makeRequest(reqOpts) { - if (this.encryption) { - reqOpts.headers = reqOpts.headers || {}; - reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; - reqOpts.headers['x-goog-encryption-key'] = this.encryption.key.toString(); - reqOpts.headers['x-goog-encryption-key-sha256'] = - this.encryption.hash.toString(); - } - if (this.userProject) { - reqOpts.params = reqOpts.params || {}; - reqOpts.params.userProject = this.userProject; + // similar to the previous logic, let's keep going until we find the next literal match + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; } - // Let gaxios know we will handle a 308 error code ourselves. - reqOpts.validateStatus = (status) => { - return (this.isSuccessfulResponse(status) || - status === RESUMABLE_INCOMPLETE_STATUS_CODE); - }; - const combinedReqOpts = { - ...this.customRequestOptions, - ...reqOpts, - headers: { - ...this.customRequestOptions.headers, - ...reqOpts.headers, - }, - }; - const res = await this.authClient.request(combinedReqOpts); - if (res.data && res.data.error) { - throw res.data.error; + else { + return false; } - return res; } - async makeRequestStream(reqOpts) { - const controller = new abort_controller_1.default(); - const errorCallback = () => controller.abort(); - this.once('error', errorCallback); - if (this.userProject) { - reqOpts.params = reqOpts.params || {}; - reqOpts.params.userProject = this.userProject; + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + // this is to detect the case of an unneeded final wildcard + // e.g. the pattern `ab*` should match the string `ab` + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); +} +function disable() { + const result = enabledString || ""; + enable(""); + return result; +} +function createDebugger(namespace) { + const newDebugger = Object.assign(debug, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend, + }); + function debug(...args) { + if (!newDebugger.enabled) { + return; } - reqOpts.signal = controller.signal; - reqOpts.validateStatus = () => true; - const combinedReqOpts = { - ...this.customRequestOptions, - ...reqOpts, - headers: { - ...this.customRequestOptions.headers, - ...reqOpts.headers, - }, - }; - const res = await this.authClient.request(combinedReqOpts); - const successfulRequest = this.onResponse(res); - this.removeListener('error', errorCallback); - return successfulRequest ? res : null; - } - /** - * @return {bool} is the request good? - */ - onResponse(resp) { - if (resp.status !== 200 && - this.retryOptions.retryableErrorFn({ - code: resp.status, - message: resp.statusText, - name: resp.statusText, - })) { - this.attemptDelayedRetry(resp); - return false; + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; } - this.emit('response', resp); + newDebugger.log(...args); + } + debuggers.push(newDebugger); + return newDebugger; +} +function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); return true; } - /** - * @param resp GaxiosResponse object from previous attempt - */ - attemptDelayedRetry(resp) { - if (this.numRetries < this.retryOptions.maxRetries) { - if (resp.status === NOT_FOUND_STATUS_CODE && - this.numChunksReadInRequest === 0) { - this.startUploading(); - } - else { - const retryDelay = this.getRetryDelay(); - if (retryDelay <= 0) { - this.destroy(new Error(`Retry total time limit exceeded - ${resp.data}`)); - return; - } - // Unshift the local cache back in case it's needed for the next request. - this.numBytesWritten -= this.localWriteCacheByteLength; - this.prependLocalBufferToUpstream(); - // We don't know how much data has been received by the server. - // `continueUploading` will recheck the offset via `getAndSetOffset`. - // If `offset` < `numberBytesReceived` then we will raise a RangeError - // as we've streamed too much data that has been missed - this should - // not be the case for multi-chunk uploads as `lastChunkSent` is the - // body of the entire request. - this.offset = undefined; - setTimeout(this.continueUploading.bind(this), retryDelay); + return false; +} +function extend(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; +} +exports["default"] = debugObj; +//# sourceMappingURL=debug.js.map + +/***/ }), + +/***/ 46244: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createLoggerContext = void 0; +var logger_js_1 = __nccwpck_require__(36720); +Object.defineProperty(exports, "createLoggerContext", ({ enumerable: true, get: function () { return logger_js_1.createLoggerContext; } })); +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 57792: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.log = log; +const tslib_1 = __nccwpck_require__(4351); +const node_os_1 = __nccwpck_require__(70612); +const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(47261)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(97742)); +function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); +} +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 36720: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TypeSpecRuntimeLogger = void 0; +exports.createLoggerContext = createLoggerContext; +exports.setLogLevel = setLogLevel; +exports.getLogLevel = getLogLevel; +exports.createClientLogger = createClientLogger; +const tslib_1 = __nccwpck_require__(4351); +const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(34907)); +const TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; +const levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100, +}; +function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; +} +function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); +} +/** + * Creates a logger context base on the provided options. + * @param options - The options for creating a logger context. + * @returns The logger context. + */ +function createLoggerContext(options) { + const registeredLoggers = new Set(); + const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName]) || + undefined; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } - this.numRetries++; + } + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + // avoid calling setLogLevel because we don't want a mis-set environment variable to crash + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); } else { - this.destroy(new Error('Retry limit exceeded - ' + resp.data)); + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); } } - /** - * The amount of time to wait before retrying the request, in milliseconds. - * If negative, do not retry. - * - * @returns the amount of time to wait, in milliseconds. - */ - getRetryDelay() { - const randomMs = Math.round(Math.random() * 1000); - const waitTime = Math.pow(this.retryOptions.retryDelayMultiplier, this.numRetries) * - 1000 + - randomMs; - const maxAllowableDelayMs = this.retryOptions.totalTimeout * 1000 - - (Date.now() - this.timeOfFirstRequest); - const maxRetryDelayMs = this.retryOptions.maxRetryDelay * 1000; - return Math.min(waitTime, maxRetryDelayMs, maxAllowableDelayMs); + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); } - /* - * Prepare user-defined API endpoint for compatibility with our API. - */ - sanitizeEndpoint(url) { - if (!exports.PROTOCOL_REGEX.test(url)) { - url = `https://${url}`; + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level, + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); } - return url.replace(/\/+$/, ''); // Remove trailing slashes + registeredLoggers.add(logger); + return logger; } - /** - * Check if a given status code is 2xx - * - * @param status The status code to check - * @returns if the status is 2xx - */ - isSuccessfulResponse(status) { - return status >= 200 && status < 300; + function contextGetLogLevel() { + return logLevel; + } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose"), + }; } + return { + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger, + }; } -exports.Upload = Upload; -_Upload_gcclGcsCmd = new WeakMap(), _Upload_instances = new WeakSet(), _Upload_resetLocalBuffersCache = function _Upload_resetLocalBuffersCache() { - this.localWriteCache = []; - this.localWriteCacheByteLength = 0; -}, _Upload_addLocalBufferCache = function _Upload_addLocalBufferCache(buf) { - this.localWriteCache.push(buf); - this.localWriteCacheByteLength += buf.byteLength; -}; -function upload(cfg) { - return new Upload(cfg); +const context = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime", +}); +/** + * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. + * @param level - The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +// eslint-disable-next-line @typescript-eslint/no-redeclare +exports.TypeSpecRuntimeLogger = context.logger; +/** + * Retrieves the currently specified log level. + */ +function setLogLevel(logLevel) { + context.setLogLevel(logLevel); } -exports.upload = upload; -function createURI(cfg, callback) { - const up = new Upload(cfg); - if (!callback) { - return up.createURI(); - } - up.createURI().then(r => callback(null, r), callback); +/** + * Retrieves the currently specified log level. + */ +function getLogLevel() { + return context.getLogLevel(); } -exports.createURI = createURI; /** - * Check the status of an existing resumable upload. - * - * @param cfg A configuration to use. `uri` is required. - * @returns the current upload status + * Creates a logger for use by the SDKs that inherits from `TypeSpecRuntimeLogger`. + * @param namespace - The name of the SDK package. + * @hidden */ -function checkUploadStatus(cfg) { - const up = new Upload(cfg); - return up.checkUploadStatus(); +function createClientLogger(namespace) { + return context.createClientLogger(namespace); } -exports.checkUploadStatus = checkUploadStatus; - +//# sourceMappingURL=logger.js.map /***/ }), -/***/ 59019: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 63098: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2020 Google LLC -// -// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SigningError = exports.URLSigner = exports.PATH_STYLED_HOST = exports.SignerExceptionMessages = void 0; -const crypto = __importStar(__nccwpck_require__(6113)); -const url = __importStar(__nccwpck_require__(57310)); -const storage_js_1 = __nccwpck_require__(33030); -const util_js_1 = __nccwpck_require__(59258); -var SignerExceptionMessages; -(function (SignerExceptionMessages) { - SignerExceptionMessages["ACCESSIBLE_DATE_INVALID"] = "The accessible at date provided was invalid."; - SignerExceptionMessages["EXPIRATION_BEFORE_ACCESSIBLE_DATE"] = "An expiration date cannot be before accessible date."; - SignerExceptionMessages["X_GOOG_CONTENT_SHA256"] = "The header X-Goog-Content-SHA256 must be a hexadecimal string."; -})(SignerExceptionMessages || (exports.SignerExceptionMessages = SignerExceptionMessages = {})); -/* - * Default signing version for getSignedUrl is 'v2'. - */ -const DEFAULT_SIGNING_VERSION = 'v2'; -const SEVEN_DAYS = 7 * 24 * 60 * 60; +exports.getBodyLength = getBodyLength; +exports.createNodeHttpClient = createNodeHttpClient; +const tslib_1 = __nccwpck_require__(4351); +const node_http_1 = tslib_1.__importDefault(__nccwpck_require__(88849)); +const node_https_1 = tslib_1.__importDefault(__nccwpck_require__(22286)); +const node_zlib_1 = tslib_1.__importDefault(__nccwpck_require__(65628)); +const node_stream_1 = __nccwpck_require__(84492); +const AbortError_js_1 = __nccwpck_require__(72033); +const httpHeaders_js_1 = __nccwpck_require__(66816); +const restError_js_1 = __nccwpck_require__(42858); +const log_js_1 = __nccwpck_require__(85930); +const sanitizer_js_1 = __nccwpck_require__(61416); +const DEFAULT_TLS_SETTINGS = {}; +function isReadableStream(body) { + return body && typeof body.pipe === "function"; +} +function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve) => { + const handler = () => { + resolve(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); +} +function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; +} +class ReportTransform extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } + catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } +} /** - * @const {string} - * @deprecated - unused + * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. + * @internal */ -exports.PATH_STYLED_HOST = 'https://storage.googleapis.com'; -class URLSigner { - constructor(auth, bucket, file, +class NodeHttpClient { + cachedHttpAgent; + cachedHttpsAgents = new WeakMap(); /** - * A {@link Storage} object. - * - * @privateRemarks - * - * Technically this is a required field, however it would be a breaking change to - * move it before optional properties. In the next major we should refactor the - * constructor of this class to only accept a config object. + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. */ - storage = new storage_js_1.Storage()) { - this.auth = auth; - this.bucket = bucket; - this.file = file; - this.storage = storage; - } - getSignedUrl(cfg) { - const expiresInSeconds = this.parseExpires(cfg.expires); - const method = cfg.method; - const accessibleAtInSeconds = this.parseAccessibleAt(cfg.accessibleAt); - if (expiresInSeconds < accessibleAtInSeconds) { - throw new Error(SignerExceptionMessages.EXPIRATION_BEFORE_ACCESSIBLE_DATE); - } - let customHost; - // Default style is `path`. - const isVirtualHostedStyle = cfg.virtualHostedStyle || false; - if (cfg.cname) { - customHost = cfg.cname; + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); } - else if (isVirtualHostedStyle) { - customHost = `https://${this.bucket.name}.storage.${this.storage.universeDomain}`; + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); } - const secondsToMilliseconds = 1000; - const config = Object.assign({}, cfg, { - method, - expiration: expiresInSeconds, - accessibleAt: new Date(secondsToMilliseconds * accessibleAtInSeconds), - bucket: this.bucket.name, - file: this.file ? (0, util_js_1.encodeURI)(this.file.name, false) : undefined, - }); - if (customHost) { - config.cname = customHost; + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } } - const version = cfg.version || DEFAULT_SIGNING_VERSION; - let promise; - if (version === 'v2') { - promise = this.getSignedUrlV2(config); + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } + else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== undefined) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request, + }; + // Responses to HEAD must not have a body. + // If they do return a body, that body must be ignored. + if (request.method === "HEAD") { + // call resume() and not destroy() to avoid closing the socket + // and losing keep alive + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || + request.streamResponseStatusCodes?.has(response.status)) { + response.readableStreamBody = responseStream; + } + else { + response.bodyAsText = await streamToText(responseStream); + } + return response; } - else if (version === 'v4') { - promise = this.getSignedUrlV4(config); + finally { + // clean up event listener + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]) + .then(() => { + // eslint-disable-next-line promise/always-return + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }) + .catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } } - else { - throw new Error(`Invalid signed URL version: ${version}. Supported versions are 'v2' and 'v4'.`); + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } - return promise.then(query => { - var _a; - query = Object.assign(query, cfg.queryParams); - const signedUrl = new url.URL(((_a = cfg.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); - signedUrl.pathname = this.getResourcePath(!!config.cname, this.bucket.name, config.file); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - signedUrl.search = (0, util_js_1.qsStringify)(query); - return signedUrl.href; + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides, + }; + return new Promise((resolve, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve) : node_https_1.default.request(options, resolve); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } + else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } + else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } + else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } + else { + // streams don't like "undefined" being passed as data + req.end(); + } }); } - getSignedUrlV2(config) { - const canonicalHeadersString = this.getCanonicalHeaders(config.extensionHeaders || {}); - const resourcePath = this.getResourcePath(false, config.bucket, config.file); - const blobToSign = [ - config.method, - config.contentMd5 || '', - config.contentType || '', - config.expiration, - canonicalHeadersString + resourcePath, - ].join('\n'); - const sign = async () => { - var _a; - const auth = this.auth; - try { - const signature = await auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); - const credentials = await auth.getCredentials(); - return { - GoogleAccessId: credentials.client_email, - Expires: config.expiration, - Signature: signature, - }; + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + // Handle Insecure requests first + if (isInsecure) { + if (disableKeepAlive) { + // keepAlive:false is the default so we don't need a custom Agent + return node_http_1.default.globalAgent; } - catch (err) { - const error = err; - const signingErr = new SigningError(error.message); - signingErr.stack = error.stack; - throw signingErr; + if (!this.cachedHttpAgent) { + // If there is no cached agent create a new one and cache it. + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); } - }; - return sign(); - } - getSignedUrlV4(config) { - var _a; - config.accessibleAt = config.accessibleAt - ? config.accessibleAt - : new Date(); - const millisecondsToSeconds = 1.0 / 1000.0; - const expiresPeriodInSeconds = config.expiration - config.accessibleAt.valueOf() * millisecondsToSeconds; - // v4 limit expiration to be 7 days maximum - if (expiresPeriodInSeconds > SEVEN_DAYS) { - throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); - } - const extensionHeaders = Object.assign({}, config.extensionHeaders); - const fqdn = new url.URL(((_a = config.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); - extensionHeaders.host = fqdn.hostname; - if (config.contentMd5) { - extensionHeaders['content-md5'] = config.contentMd5; + return this.cachedHttpAgent; } - if (config.contentType) { - extensionHeaders['content-type'] = config.contentType; + else { + if (disableKeepAlive && !request.tlsSettings) { + // When there are no tlsSettings and keepAlive is false + // we don't need a custom agent + return node_https_1.default.globalAgent; + } + // We use the tlsSettings to index cached clients + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + // Get the cached agent or create a new one with the + // provided values for keepAlive and tlsSettings + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings, + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; } - let contentSha256; - const sha256Header = extensionHeaders['x-goog-content-sha256']; - if (sha256Header) { - if (typeof sha256Header !== 'string' || - !/[A-Fa-f0-9]{40}/.test(sha256Header)) { - throw new Error(SignerExceptionMessages.X_GOOG_CONTENT_SHA256); + } +} +function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); } - contentSha256 = sha256Header; } - const signedHeaders = Object.keys(extensionHeaders) - .map(header => header.toLowerCase()) - .sort() - .join(';'); - const extensionHeadersString = this.getCanonicalHeaders(extensionHeaders); - const datestamp = (0, util_js_1.formatAsUTCISO)(config.accessibleAt); - const credentialScope = `${datestamp}/auto/storage/goog4_request`; - const sign = async () => { - var _a; - const credentials = await this.auth.getCredentials(); - const credential = `${credentials.client_email}/${credentialScope}`; - const dateISO = (0, util_js_1.formatAsUTCISO)(config.accessibleAt ? config.accessibleAt : new Date(), true); - const queryParams = { - 'X-Goog-Algorithm': 'GOOG4-RSA-SHA256', - 'X-Goog-Credential': credential, - 'X-Goog-Date': dateISO, - 'X-Goog-Expires': expiresPeriodInSeconds.toString(10), - 'X-Goog-SignedHeaders': signedHeaders, - ...(config.queryParams || {}), - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const canonicalQueryParams = this.getCanonicalQueryParams(queryParams); - const canonicalRequest = this.getCanonicalRequest(config.method, this.getResourcePath(!!config.cname, config.bucket, config.file), canonicalQueryParams, extensionHeadersString, signedHeaders, contentSha256); - const hash = crypto - .createHash('sha256') - .update(canonicalRequest) - .digest('hex'); - const blobToSign = [ - 'GOOG4-RSA-SHA256', - dateISO, - credentialScope, - hash, - ].join('\n'); - try { - const signature = await this.auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); - const signatureHex = Buffer.from(signature, 'base64').toString('hex'); - const signedQuery = Object.assign({}, queryParams, { - 'X-Goog-Signature': signatureHex, - }); - return signedQuery; + else if (value) { + headers.set(header, value); + } + } + return headers; +} +function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } + else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; +} +function streamToText(stream) { + return new Promise((resolve, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); } - catch (err) { - const error = err; - const signingErr = new SigningError(error.message); - signingErr.stack = error.stack; - throw signingErr; + else { + buffer.push(Buffer.from(chunk)); } - }; - return sign(); - } - /** - * Create canonical headers for signing v4 url. - * - * The canonical headers for v4-signing a request demands header names are - * first lowercased, followed by sorting the header names. - * Then, construct the canonical headers part of the request: - * + ":" + Trim() + "\n" - * .. - * + ":" + Trim() + "\n" - * - * @param headers - * @private - */ - getCanonicalHeaders(headers) { - // Sort headers by their lowercased names - const sortedHeaders = (0, util_js_1.objectEntries)(headers) - // Convert header names to lowercase - .map(([headerName, value]) => [ - headerName.toLowerCase(), - value, - ]) - .sort((a, b) => a[0].localeCompare(b[0])); - return sortedHeaders - .filter(([, value]) => value !== undefined) - .map(([headerName, value]) => { - // - Convert Array (multi-valued header) into string, delimited by - // ',' (no space). - // - Trim leading and trailing spaces. - // - Convert sequential (2+) spaces into a single space - const canonicalValue = `${value}`.trim().replace(/\s{2,}/g, ' '); - return `${headerName}:${canonicalValue}\n`; - }) - .join(''); + }); + stream.on("end", () => { + resolve(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } + else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR, + })); + } + }); + }); +} +/** @internal */ +function getBodyLength(body) { + if (!body) { + return 0; } - getCanonicalRequest(method, path, query, headers, signedHeaders, contentSha256) { - return [ - method, - path, - query, - headers, - signedHeaders, - contentSha256 || 'UNSIGNED-PAYLOAD', - ].join('\n'); + else if (Buffer.isBuffer(body)) { + return body.length; } - getCanonicalQueryParams(query) { - return (0, util_js_1.objectEntries)(query) - .map(([key, value]) => [(0, util_js_1.encodeURI)(key, true), (0, util_js_1.encodeURI)(value, true)]) - .sort((a, b) => (a[0] < b[0] ? -1 : 1)) - .map(([key, value]) => `${key}=${value}`) - .join('&'); + else if (isReadableStream(body)) { + return null; } - getResourcePath(cname, bucket, file) { - if (cname) { - return '/' + (file || ''); - } - else if (file) { - return `/${bucket}/${file}`; - } - else { - return `/${bucket}`; - } + else if (isArrayBuffer(body)) { + return body.byteLength; } - parseExpires(expires, current = new Date()) { - const expiresInMSeconds = new Date(expires).valueOf(); - if (isNaN(expiresInMSeconds)) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); - } - if (expiresInMSeconds < current.valueOf()) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); - } - return Math.floor(expiresInMSeconds / 1000); // The API expects seconds. + else if (typeof body === "string") { + return Buffer.from(body).length; } - parseAccessibleAt(accessibleAt) { - const accessibleAtInMSeconds = new Date(accessibleAt || new Date()).valueOf(); - if (isNaN(accessibleAtInMSeconds)) { - throw new Error(SignerExceptionMessages.ACCESSIBLE_DATE_INVALID); - } - return Math.floor(accessibleAtInMSeconds / 1000); // The API expects seconds. + else { + return null; } } -exports.URLSigner = URLSigner; /** - * Custom error type for errors related to getting signed errors and policies. - * - * @private + * Create a new HttpClient instance for the NodeJS environment. + * @internal */ -class SigningError extends Error { - constructor() { - super(...arguments); - this.name = 'SigningError'; - } +function createNodeHttpClient() { + return new NodeHttpClient(); } -exports.SigningError = SigningError; - +//# sourceMappingURL=nodeHttpClient.js.map /***/ }), -/***/ 33030: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 34744: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright 2019 Google LLC -// -// 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. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Storage = exports.RETRYABLE_ERR_FN_DEFAULT = exports.MAX_RETRY_DELAY_DEFAULT = exports.TOTAL_TIMEOUT_DEFAULT = exports.RETRY_DELAY_MULTIPLIER_DEFAULT = exports.MAX_RETRY_DEFAULT = exports.AUTO_RETRY_DEFAULT = exports.PROTOCOL_REGEX = exports.StorageExceptionMessages = exports.ExceptionMessages = exports.IdempotencyStrategy = void 0; -const index_js_1 = __nccwpck_require__(4052); -const paginator_1 = __nccwpck_require__(46412); -const promisify_1 = __nccwpck_require__(19203); -const stream_1 = __nccwpck_require__(12781); -const bucket_js_1 = __nccwpck_require__(23973); -const channel_js_1 = __nccwpck_require__(62665); -const file_js_1 = __nccwpck_require__(4713); -const util_js_1 = __nccwpck_require__(59258); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_helper_cjs_1 = __nccwpck_require__(28568); -const hmacKey_js_1 = __nccwpck_require__(64654); -const crc32c_js_1 = __nccwpck_require__(55810); -const google_auth_library_1 = __nccwpck_require__(20810); -var IdempotencyStrategy; -(function (IdempotencyStrategy) { - IdempotencyStrategy[IdempotencyStrategy["RetryAlways"] = 0] = "RetryAlways"; - IdempotencyStrategy[IdempotencyStrategy["RetryConditional"] = 1] = "RetryConditional"; - IdempotencyStrategy[IdempotencyStrategy["RetryNever"] = 2] = "RetryNever"; -})(IdempotencyStrategy || (exports.IdempotencyStrategy = IdempotencyStrategy = {})); -var ExceptionMessages; -(function (ExceptionMessages) { - ExceptionMessages["EXPIRATION_DATE_INVALID"] = "The expiration date provided was invalid."; - ExceptionMessages["EXPIRATION_DATE_PAST"] = "An expiration date cannot be in the past."; -})(ExceptionMessages || (exports.ExceptionMessages = ExceptionMessages = {})); -var StorageExceptionMessages; -(function (StorageExceptionMessages) { - StorageExceptionMessages["BUCKET_NAME_REQUIRED"] = "A bucket name is needed to use Cloud Storage."; - StorageExceptionMessages["BUCKET_NAME_REQUIRED_CREATE"] = "A name is required to create a bucket."; - StorageExceptionMessages["HMAC_SERVICE_ACCOUNT"] = "The first argument must be a service account email to create an HMAC key."; - StorageExceptionMessages["HMAC_ACCESS_ID"] = "An access ID is needed to create an HmacKey object."; -})(StorageExceptionMessages || (exports.StorageExceptionMessages = StorageExceptionMessages = {})); -exports.PROTOCOL_REGEX = /^(\w*):\/\//; -/** - * Default behavior: Automatically retry retriable server errors. - * - * @const {boolean} - */ -exports.AUTO_RETRY_DEFAULT = true; -/** - * Default behavior: Only attempt to retry retriable errors 3 times. - * - * @const {number} - */ -exports.MAX_RETRY_DEFAULT = 3; -/** - * Default behavior: Wait twice as long as previous retry before retrying. - * - * @const {number} - */ -exports.RETRY_DELAY_MULTIPLIER_DEFAULT = 2; -/** - * Default behavior: If the operation doesn't succeed after 600 seconds, - * stop retrying. - * - * @const {number} - */ -exports.TOTAL_TIMEOUT_DEFAULT = 600; -/** - * Default behavior: Wait no more than 64 seconds between retries. - * - * @const {number} - */ -exports.MAX_RETRY_DELAY_DEFAULT = 64; -/** - * Default behavior: Retry conditionally idempotent operations if correct preconditions are set. - * - * @const {enum} - * @private - */ -const IDEMPOTENCY_STRATEGY_DEFAULT = IdempotencyStrategy.RetryConditional; +exports.createEmptyPipeline = createEmptyPipeline; +const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); /** - * Returns true if the API request should be retried, given the error that was - * given the first time the request was attempted. - * @const - * @param {error} err - The API error to check if it is appropriate to retry. - * @return {boolean} True if the API request should be retried, false otherwise. + * A private implementation of Pipeline. + * Do not export this class from the package. + * @internal */ -const RETRYABLE_ERR_FN_DEFAULT = function (err) { - var _a; - const isConnectionProblem = (reason) => { - return (reason.includes('eai_again') || // DNS lookup error - reason === 'econnreset' || - reason === 'unexpected connection closure' || - reason === 'epipe' || - reason === 'socket connection timeout'); - }; - if (err) { - if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { - return true; +class HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = undefined; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); } - if (typeof err.code === 'string') { - if (['408', '429', '500', '502', '503', '504'].indexOf(err.code) !== -1) { - return true; + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options, + }); + this._orderedPolicies = undefined; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if ((options.name && policyDescriptor.policy.name === options.name) || + (options.phase && policyDescriptor.options.phase === options.phase)) { + removedPolicies.push(policyDescriptor.policy); + return false; } - const reason = err.code.toLowerCase(); - if (isConnectionProblem(reason)) { + else { return true; } + }); + this._orderedPolicies = undefined; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); } - if (err.errors) { - for (const e of err.errors) { - const reason = (_a = e === null || e === void 0 ? void 0 : e.reason) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase(); - if (reason && isConnectionProblem(reason)) { - return true; - } - } - } + return this._orderedPolicies; } - return false; -}; -exports.RETRYABLE_ERR_FN_DEFAULT = RETRYABLE_ERR_FN_DEFAULT; -/*! Developer Documentation - * - * Invoke this method to create a new Storage object bound with pre-determined - * configuration options. For each object that can be created (e.g., a bucket), - * there is an equivalent static and instance method. While they are classes, - * they can be instantiated without use of the `new` keyword. - */ -/** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * This object provides constants to refer to the three permission levels that - * can be granted to an entity: - * - * - `gcs.acl.OWNER_ROLE` - ("OWNER") - * - `gcs.acl.READER_ROLE` - ("READER") - * - `gcs.acl.WRITER_ROLE` - ("WRITER") - * - * See {@link https://cloud.google.com/storage/docs/access-control/lists| About Access Control Lists} - * - * @name Storage#acl - * @type {object} - * @property {string} OWNER_ROLE - * @property {string} READER_ROLE - * @property {string} WRITER_ROLE - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const albums = storage.bucket('albums'); - * - * //- - * // Make all of the files currently in a bucket publicly readable. - * //- - * const options = { - * entity: 'allUsers', - * role: storage.acl.READER_ROLE - * }; - * - * albums.acl.add(options, function(err, aclObject) {}); - * - * //- - * // Make any new objects added to a bucket publicly readable. - * //- - * albums.acl.default.add(options, function(err, aclObject) {}); - * - * //- - * // Grant a user ownership permissions to a bucket. - * //- - * albums.acl.add({ - * entity: 'user-useremail@example.com', - * role: storage.acl.OWNER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * albums.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ -/** - * Get {@link Bucket} objects for all of the buckets in your project as - * a readable object stream. - * - * @method Storage#getBucketsStream - * @param {GetBucketsRequest} [query] Query object for listing buckets. - * @returns {ReadableStream} A readable stream that emits {@link Bucket} - * instances. - * - * @example - * ``` - * storage.getBucketsStream() - * .on('error', console.error) - * .on('data', function(bucket) { - * // bucket is a Bucket object. - * }) - * .on('end', function() { - * // All buckets retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * storage.getBucketsStream() - * .on('data', function(bucket) { - * this.end(); - * }); - * ``` - */ -/** - * Get {@link HmacKey} objects for all of the HMAC keys in the project in a - * readable object stream. - * - * @method Storage#getHmacKeysStream - * @param {GetHmacKeysOptions} [options] Configuration options. - * @returns {ReadableStream} A readable stream that emits {@link HmacKey} - * instances. - * - * @example - * ``` - * storage.getHmacKeysStream() - * .on('error', console.error) - * .on('data', function(hmacKey) { - * // hmacKey is an HmacKey object. - * }) - * .on('end', function() { - * // All HmacKey retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * storage.getHmacKeysStream() - * .on('data', function(bucket) { - * this.end(); - * }); - * ``` - */ -/** - *

ACLs

- * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share files with other users - * and allow other users to access your buckets and files. - * - * To learn more about ACLs, read this overview on - * {@link https://cloud.google.com/storage/docs/access-control| Access Control}. - * - * See {@link https://cloud.google.com/storage/docs/overview| Cloud Storage overview} - * See {@link https://cloud.google.com/storage/docs/access-control| Access Control} - * - * @class - */ -class Storage extends index_js_1.Service { - getBucketsStream() { - // placeholder body, overwritten in constructor - return new stream_1.Readable(); + clone() { + return new HttpPipeline(this._policies); } - getHmacKeysStream() { - // placeholder body, overwritten in constructor - return new stream_1.Readable(); + static create() { + return new HttpPipeline(); } - /** - * @callback Crc32cGeneratorToStringCallback - * A method returning the CRC32C as a base64-encoded string. - * - * @returns {string} - * - * @example - * Hashing the string 'data' should return 'rth90Q==' - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.toString(); // 'rth90Q==' - * ``` - **/ - /** - * @callback Crc32cGeneratorValidateCallback - * A method validating a base64-encoded CRC32C string. - * - * @param {string} [value] base64-encoded CRC32C string to validate - * @returns {boolean} - * - * @example - * Should return `true` if the value matches, `false` otherwise - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.validate('DkjKuA=='); // false - * crc32c.validate('rth90Q=='); // true - * ``` - **/ - /** - * @callback Crc32cGeneratorUpdateCallback - * A method for passing `Buffer`s for CRC32C generation. - * - * @param {Buffer} [data] data to update CRC32C value with - * @returns {undefined} - * - * @example - * Hashing buffers from 'some ' and 'text\n' - * - * ```js - * const buffer1 = Buffer.from('some '); - * crc32c.update(buffer1); - * - * const buffer2 = Buffer.from('text\n'); - * crc32c.update(buffer2); - * - * crc32c.toString(); // 'DkjKuA==' - * ``` - **/ - /** - * @typedef {object} CRC32CValidator - * @property {Crc32cGeneratorToStringCallback} - * @property {Crc32cGeneratorValidateCallback} - * @property {Crc32cGeneratorUpdateCallback} - */ - /** - * @callback Crc32cGeneratorCallback - * @returns {CRC32CValidator} - */ - /** - * @typedef {object} StorageOptions - * @property {string} [projectId] The project ID from the Google Developer's - * Console, e.g. 'grape-spaceship-123'. We will also check the environment - * variable `GCLOUD_PROJECT` for your project ID. If your app is running - * in an environment which supports {@link - * https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application - * Application Default Credentials}, your project ID will be detected - * automatically. - * @property {string} [keyFilename] Full path to the a .json, .pem, or .p12 key - * downloaded from the Google Developers Console. If you provide a path to - * a JSON file, the `projectId` option above is not necessary. NOTE: .pem and - * .p12 require you to specify the `email` option as well. - * @property {string} [email] Account email address. Required when using a .pem - * or .p12 keyFilename. - * @property {object} [credentials] Credentials object. - * @property {string} [credentials.client_email] - * @property {string} [credentials.private_key] - * @property {object} [retryOptions] Options for customizing retries. Retriable server errors - * will be retried with exponential delay between them dictated by the formula - * max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout - * has been reached. Retries will only happen if autoRetry is set to true. - * @property {boolean} [retryOptions.autoRetry=true] Automatically retry requests if the - * response is related to rate limits or certain intermittent server - * errors. We will exponentially backoff subsequent requests by default. - * @property {number} [retryOptions.retryDelayMultiplier = 2] the multiplier by which to - * increase the delay time between the completion of failed requests, and the - * initiation of the subsequent retrying request. - * @property {number} [retryOptions.totalTimeout = 600] The total time, starting from - * when the initial request is sent, after which an error will - * be returned, regardless of the retrying attempts made meanwhile. - * @property {number} [retryOptions.maxRetryDelay = 64] The maximum delay time between requests. - * When this value is reached, ``retryDelayMultiplier`` will no longer be used to - * increase delay time. - * @property {number} [retryOptions.maxRetries=3] Maximum number of automatic retries - * attempted before returning the error. - * @property {function} [retryOptions.retryableErrorFn] Function that returns true if a given - * error should be retried and false otherwise. - * @property {enum} [retryOptions.idempotencyStrategy=IdempotencyStrategy.RetryConditional] Enumeration - * controls how conditionally idempotent operations are retried. Possible values are: RetryAlways - - * will respect other retry settings and attempt to retry conditionally idempotent operations. RetryConditional - - * will retry conditionally idempotent operations if the correct preconditions are set. RetryNever - never - * retry a conditionally idempotent operation. - * @property {string} [userAgent] The value to be prepended to the User-Agent - * header in API requests. - * @property {object} [authClient] `AuthClient` or `GoogleAuth` client to reuse instead of creating a new one. - * @property {number} [timeout] The amount of time in milliseconds to wait per http request before timing out. - * @property {object[]} [interceptors_] Array of custom request interceptors to be returned in the order they were assigned. - * @property {string} [apiEndpoint = storage.google.com] The API endpoint of the service used to make requests. - * @property {boolean} [useAuthWithCustomEndpoint = false] Controls whether or not to use authentication when using a custom endpoint. - * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} - */ - /** - * Constructs the Storage client. - * - * @example - * Create a client that uses Application Default Credentials - * (ADC) - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * ``` - * - * @example - * Create a client with explicit credentials - * ``` - * const storage = new Storage({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json' - * }); - * ``` - * - * @example - * Create a client with credentials passed - * by value as a JavaScript object - * ``` - * const storage = new Storage({ - * projectId: 'your-project-id', - * credentials: { - * type: 'service_account', - * project_id: 'xxxxxxx', - * private_key_id: 'xxxx', - * private_key:'-----BEGIN PRIVATE KEY-----xxxxxxx\n-----END PRIVATE KEY-----\n', - * client_email: 'xxxx', - * client_id: 'xxx', - * auth_uri: 'https://accounts.google.com/o/oauth2/auth', - * token_uri: 'https://oauth2.googleapis.com/token', - * auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', - * client_x509_cert_url: 'xxx', - * } - * }); - * ``` - * - * @example - * Create a client with credentials passed - * by loading a JSON file directly from disk - * ``` - * const storage = new Storage({ - * projectId: 'your-project-id', - * credentials: require('/path/to-keyfile.json') - * }); - * ``` - * - * @example - * Create a client with an `AuthClient` (e.g. `DownscopedClient`) - * ``` - * const {DownscopedClient} = require('google-auth-library'); - * const authClient = new DownscopedClient({...}); - * - * const storage = new Storage({authClient}); - * ``` - * - * Additional samples: - * - https://github.com/googleapis/google-auth-library-nodejs#sample-usage-1 - * - https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/downscopedclient.js - * - * @param {StorageOptions} [options] Configuration options. - */ - constructor(options = {}) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; - const universe = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; - let apiEndpoint = `https://storage.${universe}`; - let customEndpoint = false; - // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. - const EMULATOR_HOST = process.env.STORAGE_EMULATOR_HOST; - if (typeof EMULATOR_HOST === 'string') { - apiEndpoint = Storage.sanitizeEndpoint(EMULATOR_HOST); - customEndpoint = true; + orderPolicies() { + /** + * The goal of this method is to reliably order pipeline policies + * based on their declared requirements when they were added. + * + * Order is first determined by phase: + * + * 1. Serialize Phase + * 2. Policies not in a phase + * 3. Deserialize Phase + * 4. Retry Phase + * 5. Sign Phase + * + * Within each phase, policies are executed in the order + * they were added unless they were specified to execute + * before/after other policies or after a particular phase. + * + * To determine the final order, we will walk the policy list + * in phase order multiple times until all dependencies are + * satisfied. + * + * `afterPolicies` are the set of policies that must be + * executed before a given policy. This requirement is + * considered satisfied when each of the listed policies + * have been scheduled. + * + * `beforePolicies` are the set of policies that must be + * executed after a given policy. Since this dependency + * can be expressed by converting it into a equivalent + * `afterPolicies` declarations, they are normalized + * into that form for simplicity. + * + * An `afterPhase` dependency is considered satisfied when all + * policies in that phase have scheduled. + * + */ + const result = []; + // Track all policies we know about. + const policyMap = new Map(); + function createPhase(name) { + return { + name, + policies: new Set(), + hasRun: false, + hasAfterPolicies: false, + }; + } + // Track policies for each phase. + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + // a list of phases in order + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + // Small helper function to map phase name to each Phase + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } + else if (phase === "Serialize") { + return serializePhase; + } + else if (phase === "Deserialize") { + return deserializePhase; + } + else if (phase === "Sign") { + return signPhase; + } + else { + return noPhase; + } + } + // First walk each policy and create a node to track metadata. + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: new Set(), + dependants: new Set(), + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + // Now that each policy has a node, connect dependency references. + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + // Linking in both directions helps later + // when we want to notify dependants. + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + // To execute before another node, make it + // depend on the current node. + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + // Sets iterate in insertion order + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + // If this node is waiting on a phase to complete, + // we need to skip it for now. + // Even if the phase is empty, we should wait for it + // to be walked to avoid re-ordering policies. + continue; + } + if (node.dependsOn.size === 0) { + // If there's nothing else we're waiting for, we can + // add this policy to the result list. + result.push(node.policy); + // Notify anything that depends on this policy that + // the policy has been scheduled. + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } } - if (options.apiEndpoint && options.apiEndpoint !== apiEndpoint) { - apiEndpoint = Storage.sanitizeEndpoint(options.apiEndpoint); - customEndpoint = true; + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + // if the phase isn't complete + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + // Try running noPhase to see if that unblocks this phase next tick. + // This can happen if a phase that happens before noPhase + // is waiting on a noPhase policy to complete. + walkPhase(noPhase); + } + // Don't proceed to the next phase until this phase finishes. + return; + } + if (phase.hasAfterPolicies) { + // Run any policies unblocked by this phase + walkPhase(noPhase); + } + } } - options = Object.assign({}, options, { apiEndpoint }); - // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. - const baseUrl = EMULATOR_HOST || `${options.apiEndpoint}/storage/v1`; - const config = { - apiEndpoint: options.apiEndpoint, - retryOptions: { - autoRetry: ((_a = options.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined - ? (_b = options.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry - : exports.AUTO_RETRY_DEFAULT, - maxRetries: ((_c = options.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetries) - ? (_d = options.retryOptions) === null || _d === void 0 ? void 0 : _d.maxRetries - : exports.MAX_RETRY_DEFAULT, - retryDelayMultiplier: ((_e = options.retryOptions) === null || _e === void 0 ? void 0 : _e.retryDelayMultiplier) - ? (_f = options.retryOptions) === null || _f === void 0 ? void 0 : _f.retryDelayMultiplier - : exports.RETRY_DELAY_MULTIPLIER_DEFAULT, - totalTimeout: ((_g = options.retryOptions) === null || _g === void 0 ? void 0 : _g.totalTimeout) - ? (_h = options.retryOptions) === null || _h === void 0 ? void 0 : _h.totalTimeout - : exports.TOTAL_TIMEOUT_DEFAULT, - maxRetryDelay: ((_j = options.retryOptions) === null || _j === void 0 ? void 0 : _j.maxRetryDelay) - ? (_k = options.retryOptions) === null || _k === void 0 ? void 0 : _k.maxRetryDelay - : exports.MAX_RETRY_DELAY_DEFAULT, - retryableErrorFn: ((_l = options.retryOptions) === null || _l === void 0 ? void 0 : _l.retryableErrorFn) - ? (_m = options.retryOptions) === null || _m === void 0 ? void 0 : _m.retryableErrorFn - : exports.RETRYABLE_ERR_FN_DEFAULT, - idempotencyStrategy: ((_o = options.retryOptions) === null || _o === void 0 ? void 0 : _o.idempotencyStrategy) !== undefined - ? (_p = options.retryOptions) === null || _p === void 0 ? void 0 : _p.idempotencyStrategy - : IDEMPOTENCY_STRATEGY_DEFAULT, - }, - baseUrl, - customEndpoint, - useAuthWithCustomEndpoint: options === null || options === void 0 ? void 0 : options.useAuthWithCustomEndpoint, - projectIdRequired: false, - scopes: [ - 'https://www.googleapis.com/auth/iam', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/devstorage.full_control', - ], - packageJson: (0, package_json_helper_cjs_1.getPackageJSON)(), - }; - super(config, options); - /** - * Reference to {@link Storage.acl}. - * - * @name Storage#acl - * @see Storage.acl - */ - this.acl = Storage.acl; - this.crc32cGenerator = - options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; - this.retryOptions = config.retryOptions; - this.getBucketsStream = paginator_1.paginator.streamify('getBuckets'); - this.getHmacKeysStream = paginator_1.paginator.streamify('getHmacKeys'); - } - static sanitizeEndpoint(url) { - if (!exports.PROTOCOL_REGEX.test(url)) { - url = `https://${url}`; + // Iterate until we've put every node in the result list. + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + // Keep walking each phase in order until we can order every node. + walkPhases(); + // The result list *should* get at least one larger each time + // after the first full pass. + // Otherwise, we're going to loop forever. + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } } - return url.replace(/\/+$/, ''); // Remove trailing slashes + return result; } - /** - * Get a reference to a Cloud Storage bucket. - * - * @param {string} name Name of the bucket. - * @param {object} [options] Configuration object. - * @param {string} [options.kmsKeyName] A Cloud KMS key that will be used to - * encrypt objects inserted into this bucket, if no encryption method is - * specified. - * @param {string} [options.userProject] User project to be billed for all - * requests made from this Bucket object. - * @returns {Bucket} - * @see Bucket - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const albums = storage.bucket('albums'); - * const photos = storage.bucket('photos'); - * ``` - */ - bucket(name, options) { - if (!name) { - throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED); +} +/** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ +function createEmptyPipeline() { + return HttpPipeline.create(); +} +//# sourceMappingURL=pipeline.js.map + +/***/ }), + +/***/ 47983: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineRequest = createPipelineRequest; +const httpHeaders_js_1 = __nccwpck_require__(66816); +const uuidUtils_js_1 = __nccwpck_require__(2339); +class PipelineRequestImpl { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; + } +} +/** + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options - The options to create the request with. + */ +function createPipelineRequest(options) { + return new PipelineRequestImpl(options); +} +//# sourceMappingURL=pipelineRequest.js.map + +/***/ }), + +/***/ 73398: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.agentPolicyName = void 0; +exports.agentPolicy = agentPolicy; +/** + * Name of the Agent Policy + */ +exports.agentPolicyName = "agentPolicy"; +/** + * Gets a pipeline policy that sets http.agent + */ +function agentPolicy(agent) { + return { + name: exports.agentPolicyName, + sendRequest: async (req, next) => { + // Users may define an agent on the request, honor it over the client level one + if (!req.agent) { + req.agent = agent; + } + return next(req); + }, + }; +} +//# sourceMappingURL=agentPolicy.js.map + +/***/ }), + +/***/ 7937: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiKeyAuthenticationPolicyName = void 0; +exports.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the API Key Authentication Policy + */ +exports.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds API key authentication to requests + */ +function apiKeyAuthenticationPolicy(options) { + return { + name: exports.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + // Skip adding authentication header if no API key authentication scheme is found + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + }, + }; +} +//# sourceMappingURL=apiKeyAuthenticationPolicy.js.map + +/***/ }), + +/***/ 10068: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.basicAuthenticationPolicyName = void 0; +exports.basicAuthenticationPolicy = basicAuthenticationPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the Basic Authentication Policy + */ +exports.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds basic authentication to requests + */ +function basicAuthenticationPolicy(options) { + return { + name: exports.basicAuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + // Skip adding authentication header if no basic authentication scheme is found + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + }, + }; +} +//# sourceMappingURL=basicAuthenticationPolicy.js.map + +/***/ }), + +/***/ 73054: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.bearerAuthenticationPolicyName = void 0; +exports.bearerAuthenticationPolicy = bearerAuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the Bearer Authentication Policy + */ +exports.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds bearer token authentication to requests + */ +function bearerAuthenticationPolicy(options) { + return { + name: exports.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + // Skip adding authentication header if no bearer authentication scheme is found + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal, + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + }, + }; +} +//# sourceMappingURL=bearerAuthenticationPolicy.js.map + +/***/ }), + +/***/ 4212: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ensureSecureConnection = ensureSecureConnection; +const log_js_1 = __nccwpck_require__(85930); +// Ensure the warining is only emitted once +let insecureConnectionWarningEmmitted = false; +/** + * Checks if the request is allowed to be sent over an insecure connection. + * + * A request is allowed to be sent over an insecure connection when: + * - The `allowInsecureConnection` option is set to `true`. + * - The request has the `allowInsecureConnection` property set to `true`. + * - The request is being sent to `localhost` or `127.0.0.1` + */ +function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; } - return new bucket_js_1.Bucket(this, name, options); } - /** - * Reference a channel to receive notifications about changes to your bucket. - * - * @param {string} id The ID of the channel. - * @param {string} resourceId The resource ID of the channel. - * @returns {Channel} - * @see Channel - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const channel = storage.channel('id', 'resource-id'); - * ``` - */ - channel(id, resourceId) { - return new channel_js_1.Channel(this, id, resourceId); + return false; +} +/** + * Logs a warning about sending a token over an insecure connection. + * + * This function will emit a node warning once, but log the warning every time. + */ +function emitInsecureConnectionWarning() { + const warning = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning); } - /** - * @typedef {array} CreateBucketResponse - * @property {Bucket} 0 The new {@link Bucket}. - * @property {object} 1 The full API response. - */ - /** - * @callback CreateBucketCallback - * @param {?Error} err Request error, if any. - * @param {Bucket} bucket The new {@link Bucket}. - * @param {object} apiResponse The full API response. - */ - /** - * Metadata to set for the bucket. - * - * @typedef {object} CreateBucketRequest - * @property {boolean} [archive=false] Specify the storage class as Archive. - * @property {object} [autoclass.enabled=false] Specify whether Autoclass is - * enabled for the bucket. - * @property {object} [autoclass.terminalStorageClass='NEARLINE'] The storage class that objects in an Autoclass bucket eventually transition to if - * they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE. - * @property {boolean} [coldline=false] Specify the storage class as Coldline. - * @property {Cors[]} [cors=[]] Specify the CORS configuration to use. - * @property {CustomPlacementConfig} [customPlacementConfig={}] Specify the bucket's regions for dual-region buckets. - * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. - * @property {boolean} [dra=false] Specify the storage class as Durable Reduced - * Availability. - * @property {boolean} [enableObjectRetention=false] Specifiy whether or not object retention should be enabled on this bucket. - * @property {object} [hierarchicalNamespace.enabled=false] Specify whether or not to enable hierarchical namespace on this bucket. - * @property {string} [location] Specify the bucket's location. If specifying - * a dual-region, the `customPlacementConfig` property should be set in conjunction. - * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. - * @property {boolean} [multiRegional=false] Specify the storage class as - * Multi-Regional. - * @property {boolean} [nearline=false] Specify the storage class as Nearline. - * @property {boolean} [regional=false] Specify the storage class as Regional. - * @property {boolean} [requesterPays=false] **Early Access Testers Only** - * Force the use of the User Project metadata field to assign operational - * costs when an operation is made on a Bucket and its objects. - * @property {string} [rpo] For dual-region buckets, controls whether turbo - * replication is enabled (`ASYNC_TURBO`) or disabled (`DEFAULT`). - * @property {boolean} [standard=true] Specify the storage class as Standard. - * @property {string} [storageClass] The new storage class. (`standard`, - * `nearline`, `coldline`, or `archive`). - * **Note:** The storage classes `multi_regional`, `regional`, and - * `durable_reduced_availability` are now legacy and will be deprecated in - * the future. - * @property {Versioning} [versioning=undefined] Specify the versioning status. - * @property {string} [userProject] The ID of the project which will be billed - * for the request. - */ - /** - * Create a bucket. - * - * Cloud Storage uses a flat namespace, so you can't create a bucket with - * a name that is already in use. For more information, see - * {@link https://cloud.google.com/storage/docs/bucketnaming.html#requirements| Bucket Naming Guidelines}. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert| Buckets: insert API Documentation} - * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} - * - * @param {string} name Name of the bucket to create. - * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. - * @param {CreateBucketCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} If a name is not provided. - * @see Bucket#create - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const callback = function(err, bucket, apiResponse) { - * // `bucket` is a Bucket object. - * }; - * - * storage.createBucket('new-bucket', callback); - * - * //- - * // Create a bucket in a specific location and region. See the - * // Official JSON API docs for complete details on the `location` - * option. - * // - * //- - * const metadata = { - * location: 'US-CENTRAL1', - * regional: true - * }; - * - * storage.createBucket('new-bucket', metadata, callback); - * - * //- - * // Create a bucket with a retention policy of 6 months. - * //- - * const metadata = { - * retentionPolicy: { - * retentionPeriod: 15780000 // 6 months in seconds. - * } - * }; - * - * storage.createBucket('new-bucket', metadata, callback); - * - * //- - * // Enable versioning on a new bucket. - * //- - * const metadata = { - * versioning: { - * enabled: true - * } - * }; - * - * storage.createBucket('new-bucket', metadata, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.createBucket('new-bucket').then(function(data) { - * const bucket = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/buckets.js - * region_tag:storage_create_bucket - * Another example: - */ - createBucket(name, metadataOrCallback, callback) { - if (!name) { - throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED_CREATE); - } - let metadata; - if (!callback) { - callback = metadataOrCallback; - metadata = {}; +} +/** + * Ensures that authentication is only allowed over HTTPS unless explicitly allowed. + * Throws an error if the connection is not secure and not explicitly allowed. + */ +function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); } else { - metadata = metadataOrCallback; + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); } - const body = { - ...metadata, - name, - }; - const storageClasses = { - archive: 'ARCHIVE', - coldline: 'COLDLINE', - dra: 'DURABLE_REDUCED_AVAILABILITY', - multiRegional: 'MULTI_REGIONAL', - nearline: 'NEARLINE', - regional: 'REGIONAL', - standard: 'STANDARD', - }; - const storageClassKeys = Object.keys(storageClasses); - for (const storageClass of storageClassKeys) { - if (body[storageClass]) { - if (metadata.storageClass && metadata.storageClass !== storageClass) { - throw new Error(`Both \`${storageClass}\` and \`storageClass\` were provided.`); + } +} +//# sourceMappingURL=checkInsecureConnection.js.map + +/***/ }), + +/***/ 71305: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.oauth2AuthenticationPolicyName = void 0; +exports.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the OAuth2 Authentication Policy + */ +exports.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; +/** + * Gets a pipeline policy that adds authorization header from OAuth2 schemes + */ +function oauth2AuthenticationPolicy(options) { + return { + name: exports.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + // Skip adding authentication header if no OAuth2 authentication scheme is found + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal, + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + }, + }; +} +//# sourceMappingURL=oauth2AuthenticationPolicy.js.map + +/***/ }), + +/***/ 74162: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decompressResponsePolicyName = void 0; +exports.decompressResponsePolicy = decompressResponsePolicy; +/** + * The programmatic identifier of the decompressResponsePolicy. + */ +exports.decompressResponsePolicyName = "decompressResponsePolicy"; +/** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +function decompressResponsePolicy() { + return { + name: exports.decompressResponsePolicyName, + async sendRequest(request, next) { + // HEAD requests have no body + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + }, + }; +} +//# sourceMappingURL=decompressResponsePolicy.js.map + +/***/ }), + +/***/ 20297: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRetryPolicyName = void 0; +exports.defaultRetryPolicy = defaultRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(12283); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(90483); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); +/** + * Name of the {@link defaultRetryPolicy} + */ +exports.defaultRetryPolicyName = "defaultRetryPolicy"; +/** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + */ +function defaultRetryPolicy(options = {}) { + return { + name: exports.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }).sendRequest, + }; +} +//# sourceMappingURL=defaultRetryPolicy.js.map + +/***/ }), + +/***/ 46313: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryPolicyName = void 0; +exports.exponentialRetryPolicy = exponentialRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(12283); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); +/** + * The programmatic identifier of the exponentialRetryPolicy. + */ +exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; +/** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @param options - Options that configure retry logic. + */ +function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true, + }), + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }); +} +//# sourceMappingURL=exponentialRetryPolicy.js.map + +/***/ }), + +/***/ 51393: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formDataPolicyName = void 0; +exports.formDataPolicy = formDataPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const checkEnvironment_js_1 = __nccwpck_require__(94121); +const httpHeaders_js_1 = __nccwpck_require__(66816); +/** + * The programmatic identifier of the formDataPolicy. + */ +exports.formDataPolicyName = "formDataPolicy"; +function formDataToFormDataMap(formData) { + const formDataMap = {}; + for (const [key, value] of formData.entries()) { + formDataMap[key] ??= []; + formDataMap[key].push(value); + } + return formDataMap; +} +/** + * A policy that encodes FormData on the request into the body. + */ +function formDataPolicy() { + return { + name: exports.formDataPolicyName, + async sendRequest(request, next) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + request.formData = formDataToFormDataMap(request.body); + request.body = undefined; + } + if (request.formData) { + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { + request.body = wwwFormUrlEncode(request.formData); } - body.storageClass = storageClasses[storageClass]; - delete body[storageClass]; + else { + await prepareFormData(request.formData, request); + } + request.formData = undefined; + } + return next(request); + }, + }; +} +function wwwFormUrlEncode(formData) { + const urlSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(formData)) { + if (Array.isArray(value)) { + for (const subValue of value) { + urlSearchParams.append(key, subValue.toString()); } } - if (body.requesterPays) { - body.billing = { - requesterPays: body.requesterPays, - }; - delete body.requesterPays; - } - const query = { - project: this.projectId, - }; - if (body.userProject) { - query.userProject = body.userProject; - delete body.userProject; - } - if (body.enableObjectRetention) { - query.enableObjectRetention = body.enableObjectRetention; - delete body.enableObjectRetention; + else { + urlSearchParams.append(key, value.toString()); } - this.request({ - method: 'POST', - uri: '/b', - qs: query, - json: body, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - const bucket = this.bucket(name); - bucket.metadata = resp; - callback(null, bucket, resp); - }); } - /** - * @typedef {object} CreateHmacKeyOptions - * @property {string} [projectId] The project ID of the project that owns - * the service account of the requested HMAC key. If not provided, - * the project ID used to instantiate the Storage client will be used. - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * @typedef {object} HmacKeyMetadata - * @property {string} accessId The access id identifies which HMAC key was - * used to sign a request when authenticating with HMAC. - * @property {string} etag Used to perform a read-modify-write of the key. - * @property {string} id The resource name of the HMAC key. - * @property {string} projectId The project ID. - * @property {string} serviceAccountEmail The service account's email this - * HMAC key is created for. - * @property {string} state The state of this HMAC key. One of "ACTIVE", - * "INACTIVE" or "DELETED". - * @property {string} timeCreated The creation time of the HMAC key in - * RFC 3339 format. - * @property {string} [updated] The time this HMAC key was last updated in - * RFC 3339 format. - */ - /** - * @typedef {array} CreateHmacKeyResponse - * @property {HmacKey} 0 The HmacKey instance created from API response. - * @property {string} 1 The HMAC key's secret used to access the XML API. - * @property {object} 3 The raw API response. - */ - /** - * @callback CreateHmacKeyCallback Callback function. - * @param {?Error} err Request error, if any. - * @param {HmacKey} hmacKey The HmacKey instance created from API response. - * @param {string} secret The HMAC key's secret used to access the XML API. - * @param {object} apiResponse The raw API response. - */ - /** - * Create an HMAC key associated with an service account to authenticate - * requests to the Cloud Storage XML API. - * - * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} - * - * @param {string} serviceAccountEmail The service account's email address - * with which the HMAC key is created for. - * @param {CreateHmacKeyCallback} [callback] Callback function. - * @return {Promise} - * - * @example - * ``` - * const {Storage} = require('google-cloud/storage'); - * const storage = new Storage(); - * - * // Replace with your service account's email address - * const serviceAccountEmail = - * 'my-service-account@appspot.gserviceaccount.com'; - * - * storage.createHmacKey(serviceAccountEmail, function(err, hmacKey, secret) { - * if (!err) { - * // Securely store the secret for use with the XML API. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.createHmacKey(serviceAccountEmail) - * .then((response) => { - * const hmacKey = response[0]; - * const secret = response[1]; - * // Securely store the secret for use with the XML API. - * }); - * ``` - */ - createHmacKey(serviceAccountEmail, optionsOrCb, cb) { - if (typeof serviceAccountEmail !== 'string') { - throw new Error(StorageExceptionMessages.HMAC_SERVICE_ACCOUNT); - } - const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); - const query = Object.assign({}, options, { serviceAccountEmail }); - const projectId = query.projectId || this.projectId; - delete query.projectId; - this.request({ - method: 'POST', - uri: `/projects/${projectId}/hmacKeys`, - qs: query, - maxRetries: 0, //explicitly set this value since this is a non-idempotent function - }, (err, resp) => { - if (err) { - callback(err, null, null, resp); - return; + return urlSearchParams.toString(); +} +async function prepareFormData(formData, request) { + // validate content type (multipart/form-data) + const contentType = request.headers.get("Content-Type"); + if (contentType && !contentType.startsWith("multipart/form-data")) { + // content type is specified and is not multipart/form-data. Exit. + return; + } + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); + // set body to MultipartRequestBody using content from FormDataMap + const parts = []; + for (const [fieldName, values] of Object.entries(formData)) { + for (const value of Array.isArray(values) ? values : [values]) { + if (typeof value === "string") { + parts.push({ + headers: (0, httpHeaders_js_1.createHttpHeaders)({ + "Content-Disposition": `form-data; name="${fieldName}"`, + }), + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8"), + }); } - const metadata = resp.metadata; - const hmacKey = this.hmacKey(metadata.accessId, { - projectId: metadata.projectId, - }); - hmacKey.metadata = resp.metadata; - callback(null, hmacKey, resp.secret, resp); - }); + else if (value === undefined || value === null || typeof value !== "object") { + throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); + } + else { + // using || instead of ?? here since if value.name is empty we should create a file name + const fileName = value.name || "blob"; + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); + // again, || is used since an empty value.type means the content type is unset + headers.set("Content-Type", value.type || "application/octet-stream"); + parts.push({ + headers, + body: value, + }); + } + } } - /** - * Query object for listing buckets. - * - * @typedef {object} GetBucketsRequest - * @property {boolean} [autoPaginate=true] Have pagination handled - * automatically. - * @property {number} [maxApiCalls] Maximum number of API calls to make. - * @property {number} [maxResults] Maximum number of items plus prefixes to - * return per call. - * Note: By default will handle pagination automatically - * if more than 1 page worth of results are requested per call. - * When `autoPaginate` is set to `false` the smaller of `maxResults` - * or 1 page of results will be returned per call. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @property {string} [userProject] The ID of the project which will be billed - * for the request. - */ - /** - * @typedef {array} GetBucketsResponse - * @property {Bucket[]} 0 Array of {@link Bucket} instances. - * @property {object} 1 nextQuery A query object to receive more results. - * @property {object} 2 The full API response. - */ - /** - * @callback GetBucketsCallback - * @param {?Error} err Request error, if any. - * @param {Bucket[]} buckets Array of {@link Bucket} instances. - * @param {object} nextQuery A query object to receive more results. - * @param {object} apiResponse The full API response. - */ - /** - * Get Bucket objects for all of the buckets in your project. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list| Buckets: list API Documentation} - * - * @param {GetBucketsRequest} [query] Query object for listing buckets. - * @param {GetBucketsCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * storage.getBuckets(function(err, buckets) { - * if (!err) { - * // buckets is an array of Bucket objects. - * } - * }); - * - * //- - * // To control how many API requests are made and page through the results - * // manually, set `autoPaginate` to `false`. - * //- - * const callback = function(err, buckets, nextQuery, apiResponse) { - * if (nextQuery) { - * // More results exist. - * storage.getBuckets(nextQuery, callback); - * } - * - * // The `metadata` property is populated for you with the metadata at the - * // time of fetching. - * buckets[0].metadata; - * - * // However, in cases where you are concerned the metadata could have - * // changed, use the `getMetadata` method. - * buckets[0].getMetadata(function(err, metadata, apiResponse) {}); - * }; - * - * storage.getBuckets({ - * autoPaginate: false - * }, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.getBuckets().then(function(data) { - * const buckets = data[0]; - * }); - * - * ``` - * @example include:samples/buckets.js - * region_tag:storage_list_buckets - * Another example: - */ - getBuckets(optionsOrCallback, cb) { - const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); - options.project = options.project || this.projectId; - this.request({ - uri: '/b', - qs: options, - }, (err, resp) => { - if (err) { - callback(err, null, null, resp); - return; + request.multipartBody = { parts }; +} +//# sourceMappingURL=formDataPolicy.js.map + +/***/ }), + +/***/ 81914: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userAgentPolicyName = exports.userAgentPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.retryPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.defaultRetryPolicyName = exports.defaultRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.agentPolicyName = exports.agentPolicy = void 0; +var agentPolicy_js_1 = __nccwpck_require__(73398); +Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); +Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); +var decompressResponsePolicy_js_1 = __nccwpck_require__(74162); +Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); +Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); +var defaultRetryPolicy_js_1 = __nccwpck_require__(20297); +Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); +Object.defineProperty(exports, "defaultRetryPolicyName", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicyName; } })); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(46313); +Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); +Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); +var retryPolicy_js_1 = __nccwpck_require__(27729); +Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(32738); +Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); +Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(92337); +Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); +Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); +var formDataPolicy_js_1 = __nccwpck_require__(51393); +Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); +Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); +var logPolicy_js_1 = __nccwpck_require__(71610); +Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); +Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); +var multipartPolicy_js_1 = __nccwpck_require__(95316); +Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); +Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); +var proxyPolicy_js_1 = __nccwpck_require__(57954); +Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); +Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); +Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); +var redirectPolicy_js_1 = __nccwpck_require__(45125); +Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); +Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); +var tlsPolicy_js_1 = __nccwpck_require__(24655); +Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); +Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); +var userAgentPolicy_js_1 = __nccwpck_require__(35402); +Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); +Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 71610: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logPolicyName = void 0; +exports.logPolicy = logPolicy; +const log_js_1 = __nccwpck_require__(85930); +const sanitizer_js_1 = __nccwpck_require__(61416); +/** + * The programmatic identifier of the logPolicy. + */ +exports.logPolicyName = "logPolicy"; +/** + * A policy that logs all requests and responses. + * @param options - Options to configure logPolicy. + */ +function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, + }); + return { + name: exports.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); } - const itemsArray = resp.items ? resp.items : []; - const buckets = itemsArray.map((bucket) => { - const bucketInstance = this.bucket(bucket.id); - bucketInstance.metadata = bucket; - return bucketInstance; - }); - const nextQuery = resp.nextPageToken - ? Object.assign({}, options, { pageToken: resp.nextPageToken }) - : null; - callback(null, buckets, nextQuery, resp); - }); + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + }, + }; +} +//# sourceMappingURL=logPolicy.js.map + +/***/ }), + +/***/ 95316: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.multipartPolicyName = void 0; +exports.multipartPolicy = multipartPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const typeGuards_js_1 = __nccwpck_require__(61580); +const uuidUtils_js_1 = __nccwpck_require__(2339); +const concat_js_1 = __nccwpck_require__(96494); +function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; +} +function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r\n`; + } + return result; +} +function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } + else if ((0, typeGuards_js_1.isBlob)(source)) { + // if was created using createFile then -1 means we have an unknown size + return source.size === -1 ? undefined : source.size; + } + else { + return undefined; + } +} +function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === undefined) { + return undefined; + } + else { + total += partLength; + } } - getHmacKeys(optionsOrCb, cb) { - const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); - const query = Object.assign({}, options); - const projectId = query.projectId || this.projectId; - delete query.projectId; - this.request({ - uri: `/projects/${projectId}/hmacKeys`, - qs: query, - }, (err, resp) => { - if (err) { - callback(err, null, null, resp); - return; + return total; +} +async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r\n--${boundary}`, "utf-8"), + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8"), + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); + } + request.body = await (0, concat_js_1.concat)(sources); +} +/** + * Name of multipart policy + */ +exports.multipartPolicyName = "multipartPolicy"; +const maxBoundaryLength = 70; +const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); +function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } +} +/** + * Pipeline policy for multipart requests + */ +function multipartPolicy() { + return { + name: exports.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); } - const itemsArray = resp.items ? resp.items : []; - const hmacKeys = itemsArray.map((hmacKey) => { - const hmacKeyInstance = this.hmacKey(hmacKey.accessId, { - projectId: hmacKey.projectId, - }); - hmacKeyInstance.metadata = hmacKey; - return hmacKeyInstance; - }); - const nextQuery = resp.nextPageToken - ? Object.assign({}, options, { pageToken: resp.nextPageToken }) - : null; - callback(null, hmacKeys, nextQuery, resp); - }); + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } + else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = undefined; + return next(request); + }, + }; +} +//# sourceMappingURL=multipartPolicy.js.map + +/***/ }), + +/***/ 57954: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.globalNoProxyList = exports.proxyPolicyName = void 0; +exports.loadNoProxy = loadNoProxy; +exports.getDefaultProxySettings = getDefaultProxySettings; +exports.proxyPolicy = proxyPolicy; +const https_proxy_agent_1 = __nccwpck_require__(77219); +const http_proxy_agent_1 = __nccwpck_require__(23764); +const log_js_1 = __nccwpck_require__(85930); +const HTTPS_PROXY = "HTTPS_PROXY"; +const HTTP_PROXY = "HTTP_PROXY"; +const ALL_PROXY = "ALL_PROXY"; +const NO_PROXY = "NO_PROXY"; +/** + * The programmatic identifier of the proxyPolicy. + */ +exports.proxyPolicyName = "proxyPolicy"; +/** + * Stores the patterns specified in NO_PROXY environment variable. + * @internal + */ +exports.globalNoProxyList = []; +let noProxyListLoaded = false; +/** A cache of whether a host should bypass the proxy. */ +const globalBypassedMap = new Map(); +function getEnvironmentValue(name) { + if (process.env[name]) { + return process.env[name]; } - /** - * @typedef {array} GetServiceAccountResponse - * @property {object} 0 The service account resource. - * @property {object} 1 The full - * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. - */ - /** - * @callback GetServiceAccountCallback - * @param {?Error} err Request error, if any. - * @param {object} serviceAccount The serviceAccount resource. - * @param {string} serviceAccount.emailAddress The service account email - * address. - * @param {object} apiResponse The full - * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. - */ - /** - * Get the email address of this project's Google Cloud Storage service - * account. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount/get| Projects.serviceAccount: get API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| Projects.serviceAccount Resource} - * - * @param {object} [options] Configuration object. - * @param {string} [options.userProject] User project to be billed for this - * request. - * @param {GetServiceAccountCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * storage.getServiceAccount(function(err, serviceAccount, apiResponse) { - * if (!err) { - * const serviceAccountEmail = serviceAccount.emailAddress; - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.getServiceAccount().then(function(data) { - * const serviceAccountEmail = data[0].emailAddress; - * const apiResponse = data[1]; - * }); - * ``` - */ - getServiceAccount(optionsOrCallback, cb) { - const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); - this.request({ - uri: `/projects/${this.projectId}/serviceAccount`, - qs: options, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; + else if (process.env[name.toLowerCase()]) { + return process.env[name.toLowerCase()]; + } + return undefined; +} +function loadEnvironmentProxyValue() { + if (!process) { + return undefined; + } + const httpsProxy = getEnvironmentValue(HTTPS_PROXY); + const allProxy = getEnvironmentValue(ALL_PROXY); + const httpProxy = getEnvironmentValue(HTTP_PROXY); + return httpsProxy || allProxy || httpProxy; +} +/** + * Check whether the host of a given `uri` matches any pattern in the no proxy list. + * If there's a match, any request sent to the same host shouldn't have the proxy settings set. + * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 + */ +function isBypassed(uri, noProxyList, bypassedMap) { + if (noProxyList.length === 0) { + return false; + } + const host = new URL(uri).hostname; + if (bypassedMap?.has(host)) { + return bypassedMap.get(host); + } + let isBypassedFlag = false; + for (const pattern of noProxyList) { + if (pattern[0] === ".") { + // This should match either domain it self or any subdomain or host + // .foo.com will match foo.com it self or *.foo.com + if (host.endsWith(pattern)) { + isBypassedFlag = true; } - const camelCaseResponse = {}; - for (const prop in resp) { - // eslint-disable-next-line no-prototype-builtins - if (resp.hasOwnProperty(prop)) { - const camelCaseProp = prop.replace(/_(\w)/g, (_, match) => match.toUpperCase()); - camelCaseResponse[camelCaseProp] = resp[prop]; + else { + if (host.length === pattern.length - 1 && host === pattern.slice(1)) { + isBypassedFlag = true; } } - callback(null, camelCaseResponse, resp); - }); + } + else { + if (host === pattern) { + isBypassedFlag = true; + } + } } - /** - * Get a reference to an HmacKey object. - * Note: this does not fetch the HMAC key's metadata. Use HmacKey#get() to - * retrieve and populate the metadata. - * - * To get a reference to an HMAC key that's not created for a service - * account in the same project used to instantiate the Storage client, - * supply the project's ID as `projectId` in the `options` argument. - * - * @param {string} accessId The HMAC key's access ID. - * @param {HmacKeyOptions} options HmacKey constructor options. - * @returns {HmacKey} - * @see HmacKey - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const hmacKey = storage.hmacKey('ACCESS_ID'); - * ``` - */ - hmacKey(accessId, options) { - if (!accessId) { - throw new Error(StorageExceptionMessages.HMAC_ACCESS_ID); + bypassedMap?.set(host, isBypassedFlag); + return isBypassedFlag; +} +function loadNoProxy() { + const noProxy = getEnvironmentValue(NO_PROXY); + noProxyListLoaded = true; + if (noProxy) { + return noProxy + .split(",") + .map((item) => item.trim()) + .filter((item) => item.length); + } + return []; +} +/** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl - The url of the proxy to use. May contain authentication information. + * @deprecated - Internally this method is no longer necessary when setting proxy information. + */ +function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; } - return new hmacKey_js_1.HmacKey(this, accessId, options); } + const parsedUrl = new URL(proxyUrl); + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + return { + host: schema + parsedUrl.hostname, + port: Number.parseInt(parsedUrl.port || "80"), + username: parsedUrl.username, + password: parsedUrl.password, + }; +} +/** + * This method attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + */ +function getDefaultProxySettingsInternal() { + const envProxy = loadEnvironmentProxyValue(); + return envProxy ? new URL(envProxy) : undefined; +} +function getUrlFromProxySettings(settings) { + let parsedProxyUrl; + try { + parsedProxyUrl = new URL(settings.host); + } + catch { + throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); + } + parsedProxyUrl.port = String(settings.port); + if (settings.username) { + parsedProxyUrl.username = settings.username; + } + if (settings.password) { + parsedProxyUrl.password = settings.password; + } + return parsedProxyUrl; +} +function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { + // Custom Agent should take precedence so if one is present + // we should skip to avoid overwriting it. + if (request.agent) { + return; + } + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (request.tlsSettings) { + log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + } + const headers = request.headers.toJSON(); + if (isInsecure) { + if (!cachedAgents.httpProxyAgent) { + cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); + } + request.agent = cachedAgents.httpProxyAgent; + } + else { + if (!cachedAgents.httpsProxyAgent) { + cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); + } + request.agent = cachedAgents.httpsProxyAgent; + } +} +/** + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings - ProxySettings to use on each request. + * @param options - additional settings, for example, custom NO_PROXY patterns + */ +function proxyPolicy(proxySettings, options) { + if (!noProxyListLoaded) { + exports.globalNoProxyList.push(...loadNoProxy()); + } + const defaultProxy = proxySettings + ? getUrlFromProxySettings(proxySettings) + : getDefaultProxySettingsInternal(); + const cachedAgents = {}; + return { + name: exports.proxyPolicyName, + async sendRequest(request, next) { + if (!request.proxySettings && + defaultProxy && + !isBypassed(request.url, options?.customNoProxyList ?? exports.globalNoProxyList, options?.customNoProxyList ? undefined : globalBypassedMap)) { + setProxyAgentOnRequest(request, cachedAgents, defaultProxy); + } + else if (request.proxySettings) { + setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); + } + return next(request); + }, + }; +} +//# sourceMappingURL=proxyPolicy.js.map + +/***/ }), + +/***/ 45125: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.redirectPolicyName = void 0; +exports.redirectPolicy = redirectPolicy; +/** + * The programmatic identifier of the redirectPolicy. + */ +exports.redirectPolicyName = "redirectPolicy"; +/** + * Methods that are allowed to follow redirects 301 and 302 + */ +const allowedRedirect = ["GET", "HEAD"]; +/** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. + */ +function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + }, + }; +} +async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + const { request, status, headers } = response; + const locationHeader = headers.get("location"); + if (locationHeader && + (status === 300 || + (status === 301 && allowedRedirect.includes(request.method)) || + (status === 302 && allowedRedirect.includes(request.method)) || + (status === 303 && request.method === "POST") || + status === 307) && + currentRetries < maxRetries) { + const url = new URL(locationHeader, request.url); + request.url = url.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; +} +//# sourceMappingURL=redirectPolicy.js.map + +/***/ }), + +/***/ 27729: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retryPolicy = retryPolicy; +const helpers_js_1 = __nccwpck_require__(59842); +const AbortError_js_1 = __nccwpck_require__(72033); +const logger_js_1 = __nccwpck_require__(36720); +const constants_js_1 = __nccwpck_require__(58463); +const retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); +/** + * The programmatic identifier of the retryPolicy. + */ +const retryPolicyName = "retryPolicy"; +/** + * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + */ +function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = undefined; + responseError = undefined; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } + catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + // RestErrors are valid targets for the retry strategies. + // If none of the retry strategies can work with them, they will be thrown later in this policy. + // If the received error is not a RestError, it is immediately thrown. + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } + else if (response) { + return response; + } + else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError, + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + // If all the retries skip and there's no response, + // we're still in the retry loop, so a new request will be sent + // until `maxRetries` is reached. + } + }, + }; } -exports.Storage = Storage; -/** - * {@link Bucket} class. - * - * @name Storage.Bucket - * @see Bucket - * @type {Constructor} - */ -Storage.Bucket = bucket_js_1.Bucket; -/** - * {@link Channel} class. - * - * @name Storage.Channel - * @see Channel - * @type {Constructor} - */ -Storage.Channel = channel_js_1.Channel; -/** - * {@link File} class. - * - * @name Storage.File - * @see File - * @type {Constructor} - */ -Storage.File = file_js_1.File; -/** - * {@link HmacKey} class. - * - * @name Storage.HmacKey - * @see HmacKey - * @type {Constructor} - */ -Storage.HmacKey = hmacKey_js_1.HmacKey; -Storage.acl = { - OWNER_ROLE: 'OWNER', - READER_ROLE: 'READER', - WRITER_ROLE: 'WRITER', -}; -/*! Developer Documentation - * - * These methods can be auto-paginated. - */ -paginator_1.paginator.extend(Storage, ['getBuckets', 'getHmacKeys']); -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(Storage, { - exclude: ['bucket', 'channel', 'hmacKey'], -}); - +//# sourceMappingURL=retryPolicy.js.map /***/ }), -/***/ 45594: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 32738: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -/*! - * Copyright 2022 Google LLC. All Rights Reserved. - * - * 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. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _XMLMultiPartUploadHelper_instances, _XMLMultiPartUploadHelper_setGoogApiClientHeaders, _XMLMultiPartUploadHelper_handleErrorResponse; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TransferManager = exports.MultiPartUploadError = void 0; -const file_js_1 = __nccwpck_require__(4713); -const p_limit_1 = __importDefault(__nccwpck_require__(57684)); -const path = __importStar(__nccwpck_require__(71017)); -const fs_1 = __nccwpck_require__(57147); -const crc32c_js_1 = __nccwpck_require__(55810); -const google_auth_library_1 = __nccwpck_require__(20810); -const fast_xml_parser_1 = __nccwpck_require__(12603); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -const crypto_1 = __nccwpck_require__(6113); -const util_js_1 = __nccwpck_require__(38064); -const util_js_2 = __nccwpck_require__(59258); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_helper_cjs_1 = __nccwpck_require__(28568); -const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); -/** - * Default number of concurrently executing promises to use when calling uploadManyFiles. - * - */ -const DEFAULT_PARALLEL_UPLOAD_LIMIT = 5; -/** - * Default number of concurrently executing promises to use when calling downloadManyFiles. - * - */ -const DEFAULT_PARALLEL_DOWNLOAD_LIMIT = 5; -/** - * Default number of concurrently executing promises to use when calling downloadFileInChunks. - * - */ -const DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT = 5; +exports.systemErrorRetryPolicyName = void 0; +exports.systemErrorRetryPolicy = systemErrorRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(12283); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); /** - * The minimum size threshold in bytes at which to apply a chunked download strategy when calling downloadFileInChunks. - * + * Name of the {@link systemErrorRetryPolicy} */ -const DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD = 32 * 1024 * 1024; +exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; /** - * The chunk size in bytes to use when calling downloadFileInChunks. - * + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @param options - Options that customize the policy. */ -const DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +function systemErrorRetryPolicy(options = {}) { + return { + name: exports.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true, + }), + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }).sendRequest, + }; +} +//# sourceMappingURL=systemErrorRetryPolicy.js.map + +/***/ }), + +/***/ 92337: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.throttlingRetryPolicyName = void 0; +exports.throttlingRetryPolicy = throttlingRetryPolicy; +const throttlingRetryStrategy_js_1 = __nccwpck_require__(90483); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); /** - * The chunk size in bytes to use when calling uploadFileInChunks. - * + * Name of the {@link throttlingRetryPolicy} */ -const UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; /** - * Default number of concurrently executing promises to use when calling uploadFileInChunks. + * A policy that retries when the server sends a 429 response with a Retry-After header. * - */ -const DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT = 5; -const EMPTY_REGEX = '(?:)'; -/** - * The `gccl-gcs-cmd` value for the `X-Goog-API-Client` header. - * Example: `gccl-gcs-cmd/tm.upload_many` + * To learn more, please refer to + * https://learn.microsoft.com/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors * - * @see {@link GCCL_GCS_CMD}. - * @see {@link GCCL_GCS_CMD_KEY}. + * @param options - Options that configure retry logic. */ -const GCCL_GCS_CMD_FEATURE = { - UPLOAD_MANY: 'tm.upload_many', - DOWNLOAD_MANY: 'tm.download_many', - UPLOAD_SHARDED: 'tm.upload_sharded', - DOWNLOAD_SHARDED: 'tm.download_sharded', -}; -const defaultMultiPartGenerator = (bucket, fileName, uploadId, partsMap) => { - return new XMLMultiPartUploadHelper(bucket, fileName, uploadId, partsMap); -}; -class MultiPartUploadError extends Error { - constructor(message, uploadId, partsMap) { - super(message); - this.uploadId = uploadId; - this.partsMap = partsMap; - } +function throttlingRetryPolicy(options = {}) { + return { + name: exports.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }).sendRequest, + }; } -exports.MultiPartUploadError = MultiPartUploadError; +//# sourceMappingURL=throttlingRetryPolicy.js.map + +/***/ }), + +/***/ 24655: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.tlsPolicyName = void 0; +exports.tlsPolicy = tlsPolicy; /** - * Class representing an implementation of MPU in the XML API. This class is not meant for public usage. - * - * @private - * + * Name of the TLS Policy */ -class XMLMultiPartUploadHelper { - constructor(bucket, fileName, uploadId, partsMap) { - _XMLMultiPartUploadHelper_instances.add(this); - this.authClient = bucket.storage.authClient || new google_auth_library_1.GoogleAuth(); - this.uploadId = uploadId || ''; - this.bucket = bucket; - this.fileName = fileName; - this.baseUrl = `https://${bucket.name}.${new URL(this.bucket.storage.apiEndpoint).hostname}/${fileName}`; - this.xmlBuilder = new fast_xml_parser_1.XMLBuilder({ arrayNodeName: 'Part' }); - this.xmlParser = new fast_xml_parser_1.XMLParser(); - this.partsMap = partsMap || new Map(); - this.retryOptions = { - retries: this.bucket.storage.retryOptions.maxRetries, - factor: this.bucket.storage.retryOptions.retryDelayMultiplier, - maxTimeout: this.bucket.storage.retryOptions.maxRetryDelay * 1000, - maxRetryTime: this.bucket.storage.retryOptions.totalTimeout * 1000, - }; - } - /** - * Initiates a multipart upload (MPU) to the XML API and stores the resultant upload id. - * - * @returns {Promise} - */ - async initiateUpload(headers = {}) { - const url = `${this.baseUrl}?uploads`; - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this, headers), - method: 'POST', - url, - }); - if (res.data && res.data.error) { - throw res.data.error; - } - const parsedXML = this.xmlParser.parse(res.data); - this.uploadId = parsedXML.InitiateMultipartUploadResult.UploadId; - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - } - }, this.retryOptions); - } - /** - * Uploads the provided chunk of data to the XML API using the previously created upload id. - * - * @param {number} partNumber the sequence number of this chunk. - * @param {Buffer} chunk the chunk of data to be uploaded. - * @param {string | false} validation whether or not to include the md5 hash in the headers to cause the server - * to validate the chunk was not corrupted. - * @returns {Promise} - */ - async uploadPart(partNumber, chunk, validation) { - const url = `${this.baseUrl}?partNumber=${partNumber}&uploadId=${this.uploadId}`; - let headers = __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this); - if (validation === 'md5') { - const hash = (0, crypto_1.createHash)('md5').update(chunk).digest('base64'); - headers = { - 'Content-MD5': hash, - }; - } - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - url, - method: 'PUT', - body: chunk, - headers, - }); - if (res.data && res.data.error) { - throw res.data.error; - } - this.partsMap.set(partNumber, res.headers['etag']); - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - } - }, this.retryOptions); - } - /** - * Sends the final request of the MPU to tell GCS the upload is now complete. - * - * @returns {Promise} - */ - async completeUpload() { - const url = `${this.baseUrl}?uploadId=${this.uploadId}`; - const sortedMap = new Map([...this.partsMap.entries()].sort((a, b) => a[0] - b[0])); - const parts = []; - for (const entry of sortedMap.entries()) { - parts.push({ PartNumber: entry[0], ETag: entry[1] }); - } - const body = `${this.xmlBuilder.build(parts)}`; - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this), - url, - method: 'POST', - body, - }); - if (res.data && res.data.error) { - throw res.data.error; - } - return res; - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - return; - } - }, this.retryOptions); - } - /** - * Aborts an multipart upload that is in progress. Once aborted, any parts in the process of being uploaded fail, - * and future requests using the upload ID fail. - * - * @returns {Promise} - */ - async abortUpload() { - const url = `${this.baseUrl}?uploadId=${this.uploadId}`; - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - url, - method: 'DELETE', - }); - if (res.data && res.data.error) { - throw res.data.error; - } - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - return; - } - }, this.retryOptions); - } -} -_XMLMultiPartUploadHelper_instances = new WeakSet(), _XMLMultiPartUploadHelper_setGoogApiClientHeaders = function _XMLMultiPartUploadHelper_setGoogApiClientHeaders(headers = {}) { - let headerFound = false; - let userAgentFound = false; - for (const [key, value] of Object.entries(headers)) { - if (key.toLocaleLowerCase().trim() === 'x-goog-api-client') { - headerFound = true; - // Prepend command feature to value, if not already there - if (!value.includes(GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED)) { - headers[key] = - `${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; - } - } - else if (key.toLocaleLowerCase().trim() === 'user-agent') { - userAgentFound = true; - } - } - // If the header isn't present, add it - if (!headerFound) { - headers['x-goog-api-client'] = `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${packageJson.version} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; - } - // If the User-Agent isn't present, add it - if (!userAgentFound) { - headers['User-Agent'] = (0, util_js_2.getUserAgentString)(); - } - return headers; -}, _XMLMultiPartUploadHelper_handleErrorResponse = function _XMLMultiPartUploadHelper_handleErrorResponse(err, bail) { - if (this.bucket.storage.retryOptions.autoRetry && - this.bucket.storage.retryOptions.retryableErrorFn(err)) { - throw err; - } - else { - bail(err); - } -}; +exports.tlsPolicyName = "tlsPolicy"; /** - * Create a TransferManager object to perform parallel transfer operations on a Cloud Storage bucket. - * - * @class - * @hideconstructor - * - * @param {Bucket} bucket A {@link Bucket} instance - * + * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. */ -class TransferManager { - constructor(bucket) { - this.bucket = bucket; - } - /** - * @typedef {object} UploadManyFilesOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when uploading the files. - * @property {boolean} [skipIfExists] Do not upload the file if it already exists in - * the bucket. This will set the precondition ifGenerationMatch = 0. - * @property {string} [prefix] A prefix to append to all of the uploaded files. - * @property {object} [passthroughOptions] {@link UploadOptions} Options to be passed through - * to each individual upload operation. - * - */ - /** - * Upload multiple files in parallel to the bucket. This is a convenience method - * that utilizes {@link Bucket#upload} to perform the upload. - * - * @param {array | string} [filePathsOrDirectory] An array of fully qualified paths to the files or a directory name. - * If a directory name is provided, the directory will be recursively walked and all files will be added to the upload list. - * to be uploaded to the bucket - * @param {UploadManyFilesOptions} [options] Configuration options. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Upload multiple files in parallel. - * //- - * const response = await transferManager.uploadManyFiles(['/local/path/file1.txt, 'local/path/file2.txt']); - * // Your bucket now contains: - * // - "local/path/file1.txt" (with the contents of '/local/path/file1.txt') - * // - "local/path/file2.txt" (with the contents of '/local/path/file2.txt') - * const response = await transferManager.uploadManyFiles('/local/directory'); - * // Your bucket will now contain all files contained in '/local/directory' maintaining the subdirectory structure. - * ``` - * - */ - async uploadManyFiles(filePathsOrDirectory, options = {}) { - var _a; - if (options.skipIfExists && ((_a = options.passthroughOptions) === null || _a === void 0 ? void 0 : _a.preconditionOpts)) { - options.passthroughOptions.preconditionOpts.ifGenerationMatch = 0; - } - else if (options.skipIfExists && - options.passthroughOptions === undefined) { - options.passthroughOptions = { - preconditionOpts: { - ifGenerationMatch: 0, - }, - }; - } - const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_UPLOAD_LIMIT); - const promises = []; - let allPaths = []; - if (!Array.isArray(filePathsOrDirectory)) { - for await (const curPath of this.getPathsFromDirectory(filePathsOrDirectory)) { - allPaths.push(curPath); - } - } - else { - allPaths = filePathsOrDirectory; - } - for (const filePath of allPaths) { - const stat = await fs_1.promises.lstat(filePath); - if (stat.isDirectory()) { - continue; - } - const passThroughOptionsCopy = { - ...options.passthroughOptions, - [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.UPLOAD_MANY, - }; - passThroughOptionsCopy.destination = filePath - .split(path.sep) - .join(path.posix.sep); - if (options.prefix) { - passThroughOptionsCopy.destination = path.posix.join(...options.prefix.split(path.sep), passThroughOptionsCopy.destination); +function tlsPolicy(tlsSettings) { + return { + name: exports.tlsPolicyName, + sendRequest: async (req, next) => { + // Users may define a request tlsSettings, honor those over the client level one + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; } - promises.push(limit(() => this.bucket.upload(filePath, passThroughOptionsCopy))); - } - return Promise.all(promises); - } + return next(req); + }, + }; +} +//# sourceMappingURL=tlsPolicy.js.map + +/***/ }), + +/***/ 35402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userAgentPolicyName = void 0; +exports.userAgentPolicy = userAgentPolicy; +const userAgent_js_1 = __nccwpck_require__(8192); +const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); +/** + * The programmatic identifier of the userAgentPolicy. + */ +exports.userAgentPolicyName = "userAgentPolicy"; +/** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options - Options to customize the user agent value. + */ +function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); + } + return next(request); + }, + }; +} +//# sourceMappingURL=userAgentPolicy.js.map + +/***/ }), + +/***/ 42858: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RestError = void 0; +exports.isRestError = isRestError; +const error_js_1 = __nccwpck_require__(13742); +const inspect_js_1 = __nccwpck_require__(52728); +const sanitizer_js_1 = __nccwpck_require__(61416); +const errorSanitizer = new sanitizer_js_1.Sanitizer(); +/** + * A custom error type for failed pipeline requests. + */ +class RestError extends Error { /** - * @typedef {object} DownloadManyFilesOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when downloading the files. - * @property {string} [prefix] A prefix to append to all of the downloaded files. - * @property {string} [stripPrefix] A prefix to remove from all of the downloaded files. - * @property {object} [passthroughOptions] {@link DownloadOptions} Options to be passed through - * to each individual download operation. - * + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. */ + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; /** - * Download multiple files in parallel to the local filesystem. This is a convenience method - * that utilizes {@link File#download} to perform the download. - * - * @param {array | string} [filesOrFolder] An array of file name strings or file objects to be downloaded. If - * a string is provided this will be treated as a GCS prefix and all files with that prefix will be downloaded. - * @param {DownloadManyFilesOptions} [options] Configuration options. Setting options.prefix or options.stripPrefix - * or options.passthroughOptions.destination will cause the downloaded files to be written to the file system - * instead of being returned as a buffer. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Download multiple files in parallel. - * //- - * const response = await transferManager.downloadManyFiles(['file1.txt', 'file2.txt']); - * // The following files have been downloaded: - * // - "file1.txt" (with the contents from my-bucket.file1.txt) - * // - "file2.txt" (with the contents from my-bucket.file2.txt) - * const response = await transferManager.downloadManyFiles([bucket.File('file1.txt'), bucket.File('file2.txt')]); - * // The following files have been downloaded: - * // - "file1.txt" (with the contents from my-bucket.file1.txt) - * // - "file2.txt" (with the contents from my-bucket.file2.txt) - * const response = await transferManager.downloadManyFiles('test-folder'); - * // All files with GCS prefix of 'test-folder' have been downloaded. - * ``` - * + * This means that parsing the response from the server failed. + * It may have been malformed. */ - async downloadManyFiles(filesOrFolder, options = {}) { - const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_DOWNLOAD_LIMIT); - const promises = []; - let files = []; - if (!Array.isArray(filesOrFolder)) { - const directoryFiles = await this.bucket.getFiles({ - prefix: filesOrFolder, - }); - files = directoryFiles[0]; - } - else { - files = filesOrFolder.map(curFile => { - if (typeof curFile === 'string') { - return this.bucket.file(curFile); - } - return curFile; - }); - } - const stripRegexString = options.stripPrefix - ? `^${options.stripPrefix}` - : EMPTY_REGEX; - const regex = new RegExp(stripRegexString, 'g'); - for (const file of files) { - const passThroughOptionsCopy = { - ...options.passthroughOptions, - [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_MANY, - }; - if (options.prefix || passThroughOptionsCopy.destination) { - passThroughOptionsCopy.destination = path.join(options.prefix || '', passThroughOptionsCopy.destination || '', file.name); - } - if (options.stripPrefix) { - passThroughOptionsCopy.destination = file.name.replace(regex, ''); - } - promises.push(limit(async () => { - const destination = passThroughOptionsCopy.destination; - if (destination && destination.endsWith(path.sep)) { - await fs_1.promises.mkdir(destination, { recursive: true }); - return Promise.resolve([ - Buffer.alloc(0), - ]); - } - return file.download(passThroughOptionsCopy); - })); - } - return Promise.all(promises); - } + static PARSE_ERROR = "PARSE_ERROR"; /** - * @typedef {object} DownloadFileInChunksOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when downloading the file. - * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be downloaded. - * @property {string | boolean} [validation] Whether or not to perform a CRC32C validation check when download is complete. - * @property {boolean} [noReturnData] Whether or not to return the downloaded data. A `true` value here would be useful for files with a size that will not fit into memory. - * + * The code of the error itself (use statics on RestError if possible.) */ + code; /** - * Download a large file in chunks utilizing parallel download operations. This is a convenience method - * that utilizes {@link File#download} to perform the download. - * - * @param {File | string} fileOrName {@link File} to download. - * @param {DownloadFileInChunksOptions} [options] Configuration options. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Download a large file in chunks utilizing parallel operations. - * //- - * const response = await transferManager.downloadFileInChunks(bucket.file('large-file.txt'); - * // Your local directory now contains: - * // - "large-file.txt" (with the contents from my-bucket.large-file.txt) - * ``` - * + * The HTTP status code of the request (if applicable.) */ - async downloadFileInChunks(fileOrName, options = {}) { - let chunkSize = options.chunkSizeBytes || DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; - let limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT); - const noReturnData = Boolean(options.noReturnData); - const promises = []; - const file = typeof fileOrName === 'string' - ? this.bucket.file(fileOrName) - : fileOrName; - const fileInfo = await file.get(); - const size = parseInt(fileInfo[0].metadata.size.toString()); - // If the file size does not meet the threshold download it as a single chunk. - if (size < DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD) { - limit = (0, p_limit_1.default)(1); - chunkSize = size; - } - let start = 0; - const filePath = options.destination || path.basename(file.name); - const fileToWrite = await fs_1.promises.open(filePath, 'w'); - while (start < size) { - const chunkStart = start; - let chunkEnd = start + chunkSize - 1; - chunkEnd = chunkEnd > size ? size : chunkEnd; - promises.push(limit(async () => { - const resp = await file.download({ - start: chunkStart, - end: chunkEnd, - [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_SHARDED, - }); - const result = await fileToWrite.write(resp[0], 0, resp[0].length, chunkStart); - if (noReturnData) - return; - return result.buffer; - })); - start += chunkSize; - } - let chunks; - try { - chunks = await Promise.all(promises); - } - finally { - await fileToWrite.close(); - } - if (options.validation === 'crc32c' && fileInfo[0].metadata.crc32c) { - const downloadedCrc32C = await crc32c_js_1.CRC32C.fromFile(filePath); - if (!downloadedCrc32C.validate(fileInfo[0].metadata.crc32c)) { - const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); - mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; - throw mismatchError; - } - } - if (noReturnData) - return; - return [Buffer.concat(chunks, size)]; - } + statusCode; /** - * @typedef {object} UploadFileInChunksOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when uploading the file. - * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be uploaded. - * @property {string} [uploadName] Name of the file when saving to GCS. If ommitted the name is taken from the file path. - * @property {number} [maxQueueSize] The number of chunks to be uploaded to hold in memory concurrently. If not specified - * defaults to the specified concurrency limit. - * @property {string} [uploadId] If specified attempts to resume a previous upload. - * @property {Map} [partsMap] If specified alongside uploadId, attempts to resume a previous upload from the last chunk - * specified in partsMap - * @property {object} [headers] headers to be sent when initiating the multipart upload. - * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-multipart#request_headers| Request Headers: Initiate a Multipart Upload} - * @property {boolean} [autoAbortFailure] boolean to indicate if an in progress upload session will be automatically aborted upon failure. If not set, - * failures will be automatically aborted. - * + * The request that was made. + * This property is non-enumerable. */ + request; /** - * Upload a large file in chunks utilizing parallel upload opertions. If the upload fails, an uploadId and - * map containing all the successfully uploaded parts will be returned to the caller. These arguments can be used to - * resume the upload. - * - * @param {string} [filePath] The path of the file to be uploaded - * @param {UploadFileInChunksOptions} [options] Configuration options. - * @param {MultiPartHelperGenerator} [generator] A function that will return a type that implements the MPU interface. Most users will not need to use this. - * @returns {Promise} If successful a promise resolving to void, otherwise a error containing the message, uploadid, and parts map. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Upload a large file in chunks utilizing parallel operations. - * //- - * const response = await transferManager.uploadFileInChunks('large-file.txt'); - * // Your bucket now contains: - * // - "large-file.txt" - * ``` - * - * + * The response received (if any.) + * This property is non-enumerable. */ - async uploadFileInChunks(filePath, options = {}, generator = defaultMultiPartGenerator) { - const chunkSize = options.chunkSizeBytes || UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; - const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT); - const maxQueueSize = options.maxQueueSize || - options.concurrencyLimit || - DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT; - const fileName = options.uploadName || path.basename(filePath); - const mpuHelper = generator(this.bucket, fileName, options.uploadId, options.partsMap); - let partNumber = 1; - let promises = []; - try { - if (options.uploadId === undefined) { - await mpuHelper.initiateUpload(options.headers); + response; + /** + * Bonus property set by the throw site. + */ + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + // The request and response may contain sensitive information in the headers or body. + // To help prevent this sensitive information being accidentally logged, the request and response + // properties are marked as non-enumerable here. This prevents them showing up in the output of + // JSON.stringify and console.log. + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + // Only include useful agent information in the request for logging, as the full agent object + // may contain large binary data. + const agent = this.request?.agent + ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets, } - const startOrResumptionByte = mpuHelper.partsMap.size * chunkSize; - const readStream = (0, fs_1.createReadStream)(filePath, { - highWaterMark: chunkSize, - start: startOrResumptionByte, - }); - // p-limit only limits the number of running promises. We do not want to hold an entire - // large file in memory at once so promises acts a queue that will hold only maxQueueSize in memory. - for await (const curChunk of readStream) { - if (promises.length >= maxQueueSize) { - await Promise.all(promises); - promises = []; - } - promises.push(limit(() => mpuHelper.uploadPart(partNumber++, curChunk, options.validation))); + : undefined; + // Logging method for util.inspect in Node + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + // Extract non-enumerable properties and add them back. This is OK since in this output the request and + // response get sanitized. + return `RestError: ${this.message} \n ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response, + })}`; + }, + enumerable: false, + }); + Object.setPrototypeOf(this, RestError.prototype); + } +} +exports.RestError = RestError; +/** + * Typeguard for RestError + * @param e - Something caught by a catch clause. + */ +function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; +} +//# sourceMappingURL=restError.js.map + +/***/ }), + +/***/ 12283: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryStrategy = exponentialRetryStrategy; +exports.isExponentialRetryResponse = isExponentialRetryResponse; +exports.isSystemError = isSystemError; +const delay_js_1 = __nccwpck_require__(34591); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(90483); +// intervals are in milliseconds +const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; +const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; +/** + * A retry strategy that retries with an exponentially increasing delay in these two cases: + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). + */ +function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; } - await Promise.all(promises); - return await mpuHelper.completeUpload(); - } - catch (e) { - if ((options.autoAbortFailure === undefined || options.autoAbortFailure) && - mpuHelper.uploadId) { - try { - await mpuHelper.abortUpload(); - return; - } - catch (e) { - throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); - } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; } - throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); - } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval, + }); + }, + }; +} +/** + * A response is a retry response if it has status codes: + * - 408, or + * - Greater or equal than 500, except for 501 and 505. + */ +function isExponentialRetryResponse(response) { + return Boolean(response && + response.status !== undefined && + (response.status >= 500 || response.status === 408) && + response.status !== 501 && + response.status !== 505); +} +/** + * Determines whether an error from a pipeline response was triggered in the network layer. + */ +function isSystemError(err) { + if (!err) { + return false; } - async *getPathsFromDirectory(directory) { - const filesAndSubdirectories = await fs_1.promises.readdir(directory, { - withFileTypes: true, - }); - for (const curFileOrDirectory of filesAndSubdirectories) { - const fullPath = path.join(directory, curFileOrDirectory.name); - curFileOrDirectory.isDirectory() - ? yield* this.getPathsFromDirectory(fullPath) - : yield fullPath; + return (err.code === "ETIMEDOUT" || + err.code === "ESOCKETTIMEDOUT" || + err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || + err.code === "ENOENT" || + err.code === "ENOTFOUND"); +} +//# sourceMappingURL=exponentialRetryStrategy.js.map + +/***/ }), + +/***/ 90483: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isThrottlingRetryResponse = isThrottlingRetryResponse; +exports.throttlingRetryStrategy = throttlingRetryStrategy; +const helpers_js_1 = __nccwpck_require__(59842); +/** + * The header that comes back from services representing + * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). + */ +const RetryAfterHeader = "Retry-After"; +/** + * The headers that come back from services representing + * the amount of time (minimum) to wait to retry. + * + * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds + * "Retry-After" : seconds or timestamp + */ +const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; +/** + * A response is a throttling retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + * + * Returns the `retryAfterInMs` value if the response is a throttling retry response. + * If not throttling retry response, returns `undefined`. + * + * @internal + */ +function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return undefined; + try { + // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + // "Retry-After" header ==> seconds + // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds + const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; + return retryAfterValue * multiplyingFactor; // in milli-seconds + } } + // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + // negative diff would mean a date in the past, so retry asap with 0 milliseconds + return Number.isFinite(diff) ? Math.max(0, diff) : undefined; + } + catch { + return undefined; } } -exports.TransferManager = TransferManager; - +/** + * A response is a retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + */ +function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); +} +function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs, + }; + }, + }; +} +//# sourceMappingURL=throttlingRetryStrategy.js.map + +/***/ }), + +/***/ 88943: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.uint8ArrayToString = uint8ArrayToString; +exports.stringToUint8Array = stringToUint8Array; +/** + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string + */ +function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); +} +/** + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array + */ +function stringToUint8Array(value, format) { + return Buffer.from(value, format); +} +//# sourceMappingURL=bytesEncoding.js.map /***/ }), -/***/ 59258: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 94121: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +// eslint-disable-next-line @azure/azure-sdk/ts-no-window +exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +exports.isWebWorker = typeof self === "object" && + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +exports.isDeno = typeof Deno !== "undefined" && + typeof Deno.version !== "undefined" && + typeof Deno.version.deno !== "undefined"; +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ +exports.isNodeLike = typeof globalThis.process !== "undefined" && + Boolean(globalThis.process.version) && + Boolean(globalThis.process.versions?.node); +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +exports.isNodeRuntime = exports.isNodeLike && !exports.isBun && !exports.isDeno; +/** + * A constant that indicates whether the environment the code is running is in React-Native. + */ +// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js +exports.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; +//# sourceMappingURL=checkEnvironment.js.map -// Copyright 2019 Google LLC -// -// 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. -var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function () { - return m[k]; - } - }; - } - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; -}); -var __importStar = this && this.__importStar || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.PassThroughShim = exports.getModuleFormat = exports.getDirName = exports.getUserAgentString = exports.getRuntimeTrackingString = exports.formatAsUTCISO = exports.convertObjKeysToSnakeCase = exports.unicodeJSONStringify = exports.objectKeyToLowercase = exports.qsStringify = exports.encodeURI = exports.fixedEncodeURIComponent = exports.objectEntries = exports.normalize = void 0; -const path = __importStar(__nccwpck_require__(71017)); -const querystring = __importStar(__nccwpck_require__(63477)); +/***/ }), + +/***/ 96494: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.concat = concat; const stream_1 = __nccwpck_require__(12781); -const url = __importStar(__nccwpck_require__(57310)); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_helper_cjs_1 = __nccwpck_require__(28568); -// Done to avoid a problem with mangling of identifiers when using esModuleInterop -const fileURLToPath = url.fileURLToPath; -const isEsm = false; -function normalize(optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - return { - options, - callback - }; +const typeGuards_js_1 = __nccwpck_require__(61580); +async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } + finally { + reader.releaseLock(); + } } -exports.normalize = normalize; -/** - * Flatten an object into an Array of arrays, [[key, value], ..]. - * Implements Object.entries() for Node.js <8 - * @internal - */ -function objectEntries(obj) { - return Object.keys(obj).map(key => [key, obj[key]]); +function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } +} +function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); + } + else { + return stream; + } +} +function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); + } + else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } + else { + return ensureNodeStream(source); + } } -exports.objectEntries = objectEntries; /** - * Encode `str` with encodeURIComponent, plus these - * reserved characters: `! * ' ( )`. + * Utility function that concatenates a set of binary inputs into one combined output. * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent| MDN: fixedEncodeURIComponent} + * @param sources - array of sources for the concatenation + * @returns - in Node, a (() =\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs. + * In browser, returns a `Blob` representing all the concatenated inputs. * - * @param {string} str The URI component to encode. - * @return {string} The encoded string. + * @internal */ -function fixedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase()); +async function concat(sources) { + return function () { + const streams = sources.map((x) => (typeof x === "function" ? x() : x)).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; } -exports.fixedEncodeURIComponent = fixedEncodeURIComponent; +//# sourceMappingURL=concat.js.map + +/***/ }), + +/***/ 34591: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.calculateRetryDelay = calculateRetryDelay; +const random_js_1 = __nccwpck_require__(25042); /** - * URI encode `uri` for generating signed URLs, using fixedEncodeURIComponent. - * - * Encode every byte except `A-Z a-Z 0-9 ~ - . _`. - * - * @param {string} uri The URI to encode. - * @param [boolean=false] encodeSlash If `true`, the "/" character is not encoded. - * @return {string} The encoded string. + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * @param retryAttempt - The current retry attempt number. + * @param config - The exponential retry configuration. + * @returns An object containing the calculated retry delay. */ -function encodeURI(uri, encodeSlash) { - // Split the string by `/`, and conditionally rejoin them with either - // %2F if encodeSlash is `true`, or '/' if `false`. - return uri.split('/').map(fixedEncodeURIComponent).join(encodeSlash ? '%2F' : '/'); +function calculateRetryDelay(retryAttempt, config) { + // Exponentially increase the delay each time + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + // Don't let the delay exceed the maximum + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + // Allow the final value to have some "jitter" (within 50% of the delay size) so + // that retries across multiple clients don't occur simultaneously. + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; } -exports.encodeURI = encodeURI; +//# sourceMappingURL=delay.js.map + +/***/ }), + +/***/ 13742: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isError = isError; +const object_js_1 = __nccwpck_require__(7088); /** - * Serialize an object to a URL query string using util.encodeURI(uri, true). - * @param {string} url The object to serialize. - * @return {string} Serialized string. + * Typeguard for an error object shape (has name and message) + * @param e - Something caught by a catch clause. */ -function qsStringify(qs) { - return querystring.stringify(qs, '&', '=', { - encodeURIComponent: component => encodeURI(component, true) - }); -} -exports.qsStringify = qsStringify; -function objectKeyToLowercase(object) { - const newObj = {}; - for (let key of Object.keys(object)) { - const value = object[key]; - key = key.toLowerCase(); - newObj[key] = value; - } - return newObj; +function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; } -exports.objectKeyToLowercase = objectKeyToLowercase; +//# sourceMappingURL=error.js.map + +/***/ }), + +/***/ 59842: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.delay = delay; +exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; +const AbortError_js_1 = __nccwpck_require__(72033); +const StandardAbortMessage = "The operation was aborted."; /** - * JSON encode str, with unicode \u+ representation. - * @param {object} obj The object to encode. - * @return {string} Serialized string. + * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. + * @param delayInMs - The number of milliseconds to be delayed. + * @param value - The value to be resolved with after a timeout of t milliseconds. + * @param options - The options for delay - currently abort options + * - abortSignal - The abortSignal associated with containing operation. + * - abortErrorMsg - The abort error message associated with containing operation. + * @returns Resolved promise */ -function unicodeJSONStringify(obj) { - return JSON.stringify(obj).replace(/[\u0080-\uFFFF]/g, char => '\\u' + ('0000' + char.charCodeAt(0).toString(16)).slice(-4)); +function delay(delayInMs, value, options) { + return new Promise((resolve, reject) => { + let timer = undefined; + let onAborted = undefined; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); } -exports.unicodeJSONStringify = unicodeJSONStringify; /** - * Converts the given objects keys to snake_case - * @param {object} obj object to convert keys to snake case. - * @returns {object} object with keys converted to snake case. + * @internal + * @returns the parsed value or undefined if the parsed value is invalid. */ -function convertObjKeysToSnakeCase(obj) { - if (obj instanceof Date || obj instanceof RegExp) { - return obj; - } - if (Array.isArray(obj)) { - return obj.map(convertObjKeysToSnakeCase); - } - if (obj instanceof Object) { - return Object.keys(obj).reduce((acc, cur) => { - const s = cur[0].toLocaleLowerCase() + cur.slice(1).replace(/([A-Z]+)/g, (match, p1) => { - return `_${p1.toLowerCase()}`; - }); - acc[s] = convertObjKeysToSnakeCase(obj[cur]); - return acc; - }, Object()); - } - return obj; +function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; } -exports.convertObjKeysToSnakeCase = convertObjKeysToSnakeCase; +//# sourceMappingURL=helpers.js.map + +/***/ }), + +/***/ 52728: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.custom = void 0; +const node_util_1 = __nccwpck_require__(47261); +exports.custom = node_util_1.inspect.custom; +//# sourceMappingURL=inspect.js.map + +/***/ }), + +/***/ 68152: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Sanitizer = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isBrowser = exports.randomUUID = exports.computeSha256Hmac = exports.computeSha256Hash = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.calculateRetryDelay = void 0; +var delay_js_1 = __nccwpck_require__(34591); +Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); +var random_js_1 = __nccwpck_require__(25042); +Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); +var object_js_1 = __nccwpck_require__(7088); +Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); +var error_js_1 = __nccwpck_require__(13742); +Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); +var sha256_js_1 = __nccwpck_require__(70017); +Object.defineProperty(exports, "computeSha256Hash", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hash; } })); +Object.defineProperty(exports, "computeSha256Hmac", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hmac; } })); +var uuidUtils_js_1 = __nccwpck_require__(2339); +Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); +var checkEnvironment_js_1 = __nccwpck_require__(94121); +Object.defineProperty(exports, "isBrowser", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBrowser; } })); +Object.defineProperty(exports, "isBun", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBun; } })); +Object.defineProperty(exports, "isNodeLike", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeLike; } })); +Object.defineProperty(exports, "isNodeRuntime", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeRuntime; } })); +Object.defineProperty(exports, "isDeno", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isDeno; } })); +Object.defineProperty(exports, "isReactNative", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isReactNative; } })); +Object.defineProperty(exports, "isWebWorker", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isWebWorker; } })); +var bytesEncoding_js_1 = __nccwpck_require__(88943); +Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); +Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); +var sanitizer_js_1 = __nccwpck_require__(61416); +Object.defineProperty(exports, "Sanitizer", ({ enumerable: true, get: function () { return sanitizer_js_1.Sanitizer; } })); +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 7088: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isObject = isObject; /** - * Formats the provided date object as a UTC ISO string. - * @param {Date} dateTimeToFormat date object to be formatted. - * @param {boolean} includeTime flag to include hours, minutes, seconds in output. - * @param {string} dateDelimiter delimiter between date components. - * @param {string} timeDelimiter delimiter between time components. - * @returns {string} UTC ISO format of provided date obect. + * Helper to determine when an input is a generic JS object. + * @returns true when input is an object type that is not null, Array, RegExp, or Date. */ -function formatAsUTCISO(dateTimeToFormat, includeTime = false, dateDelimiter = '', timeDelimiter = '') { - const year = dateTimeToFormat.getUTCFullYear(); - const month = dateTimeToFormat.getUTCMonth() + 1; - const day = dateTimeToFormat.getUTCDate(); - const hour = dateTimeToFormat.getUTCHours(); - const minute = dateTimeToFormat.getUTCMinutes(); - const second = dateTimeToFormat.getUTCSeconds(); - let resultString = `${year.toString().padStart(4, '0')}${dateDelimiter}${month.toString().padStart(2, '0')}${dateDelimiter}${day.toString().padStart(2, '0')}`; - if (includeTime) { - resultString = `${resultString}T${hour.toString().padStart(2, '0')}${timeDelimiter}${minute.toString().padStart(2, '0')}${timeDelimiter}${second.toString().padStart(2, '0')}Z`; - } - return resultString; +function isObject(input) { + return (typeof input === "object" && + input !== null && + !Array.isArray(input) && + !(input instanceof RegExp) && + !(input instanceof Date)); } -exports.formatAsUTCISO = formatAsUTCISO; +//# sourceMappingURL=object.js.map + +/***/ }), + +/***/ 25042: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRandomIntegerInclusive = getRandomIntegerInclusive; /** - * Examines the runtime environment and returns the appropriate tracking string. - * @returns {string} metrics tracking string based on the current runtime environment. + * Returns a random integer value between a lower and upper bound, + * inclusive of both bounds. + * Note that this uses Math.random and isn't secure. If you need to use + * this for any kind of security purpose, find a better source of random. + * @param min - The smallest integer value allowed. + * @param max - The largest integer value allowed. */ -function getRuntimeTrackingString() { - if ( - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - globalThis.Deno && - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - globalThis.Deno.version && - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - globalThis.Deno.version.deno) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - return `gl-deno/${globalThis.Deno.version.deno}`; - } else { - return `gl-node/${process.versions.node}`; - } +function getRandomIntegerInclusive(min, max) { + // Make sure inputs are integers. + min = Math.ceil(min); + max = Math.floor(max); + // Pick a random offset from zero to the size of the range. + // Since Math.random() can never return 1, we have to make the range one larger + // in order to be inclusive of the maximum value after we take the floor. + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; } -exports.getRuntimeTrackingString = getRuntimeTrackingString; +//# sourceMappingURL=random.js.map + +/***/ }), + +/***/ 61416: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Sanitizer = void 0; +const object_js_1 = __nccwpck_require__(7088); +const RedactedString = "REDACTED"; +// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts +const defaultAllowedHeaderNames = [ + "x-ms-client-request-id", + "x-ms-return-client-request-id", + "x-ms-useragent", + "x-ms-correlation-request-id", + "x-ms-request-id", + "client-request-id", + "ms-cv", + "return-client-request-id", + "traceparent", + "Access-Control-Allow-Credentials", + "Access-Control-Allow-Headers", + "Access-Control-Allow-Methods", + "Access-Control-Allow-Origin", + "Access-Control-Expose-Headers", + "Access-Control-Max-Age", + "Access-Control-Request-Headers", + "Access-Control-Request-Method", + "Origin", + "Accept", + "Accept-Encoding", + "Cache-Control", + "Connection", + "Content-Length", + "Content-Type", + "Date", + "ETag", + "Expires", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "Last-Modified", + "Pragma", + "Request-Id", + "Retry-After", + "Server", + "Transfer-Encoding", + "User-Agent", + "WWW-Authenticate", +]; +const defaultAllowedQueryParameters = ["api-version"]; /** - * Looks at package.json and creates the user-agent string to be applied to request headers. - * @returns {string} user agent string. + * A utility class to sanitize objects for logging. */ -function getUserAgentString() { - const pkg = (0, package_json_helper_cjs_1.getPackageJSON)(); - const hyphenatedPackageName = pkg.name.replace('@google-cloud', 'gcloud-node') // For legacy purposes. - .replace('/', '-'); // For UA spec-compliance purposes. - return hyphenatedPackageName + '/' + pkg.version; -} -exports.getUserAgentString = getUserAgentString; -function getDirName() { - let dirToUse = ''; - try { - dirToUse = __dirname; - } catch (e) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - dirToUse = __dirname; - } - return dirToUse; -} -exports.getDirName = getDirName; -function getModuleFormat() { - return isEsm ? 'ESM' : 'CJS'; -} -exports.getModuleFormat = getModuleFormat; -class PassThroughShim extends stream_1.PassThrough { - constructor() { - super(...arguments); - this.shouldEmitReading = true; - this.shouldEmitWriting = true; - } - _read(size) { - if (this.shouldEmitReading) { - this.emit('reading'); - this.shouldEmitReading = false; +class Sanitizer { + allowedHeaderNames; + allowedQueryParameters; + constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { + allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); + allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); + this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); } - super._read(size); - } - _write(chunk, encoding, callback) { - if (this.shouldEmitWriting) { - this.emit('writing'); - this.shouldEmitWriting = false; + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = new Set(); + return JSON.stringify(obj, (key, value) => { + // Ensure Errors include their interesting non-enumerable members + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message, + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } + else if (key === "url") { + return this.sanitizeUrl(value); + } + else if (key === "query") { + return this.sanitizeQuery(value); + } + else if (key === "body") { + // Don't log the request body + return undefined; + } + else if (key === "response") { + // Don't log response again + return undefined; + } + else if (key === "operationSpec") { + // When using sendOperationRequest, the request carries a massive + // field with the autorest spec. No need to log it. + return undefined; + } + else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); } - // Per the nodejs documention, callback must be invoked on the next tick - process.nextTick(() => { - super._write(chunk, encoding, callback); - }); - } - _final(callback) { - // If the stream is empty (i.e. empty file) final will be invoked before _read / _write - // and we should still emit the proper events. - if (this.shouldEmitReading) { - this.emit('reading'); - this.shouldEmitReading = false; + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); } - if (this.shouldEmitWriting) { - this.emit('writing'); - this.shouldEmitWriting = false; + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } + else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } + else { + sanitized[k] = RedactedString; + } + } + return sanitized; } - callback(null); - } } -exports.PassThroughShim = PassThroughShim; - +exports.Sanitizer = Sanitizer; +//# sourceMappingURL=sanitizer.js.map /***/ }), -/***/ 95430: -/***/ ((module) => { - -/* - * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -/******/ (() => { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ +/***/ 70017: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/***/ "./node_modules/strnum/strnum.js": -/*!***************************************!*\ - !*** ./node_modules/strnum/strnum.js ***! - \***************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ toNumber)\n/* harmony export */ });\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)([0-9]*(\\.[0-9]*)?)$/;\n// const octRegex = /^0x[a-z0-9]+/;\n// const binRegex = /0x[a-z0-9]+/;\n\n \nconst consider = {\n hex : true,\n // oct: false,\n leadingZeros: true,\n decimalPoint: \"\\.\",\n eNotation: true,\n //skipLike: /regex/\n};\n\nfunction toNumber(str, options = {}){\n options = Object.assign({}, consider, options );\n if(!str || typeof str !== \"string\" ) return str;\n \n let trimmedStr = str.trim();\n \n if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str;\n else if(str===\"0\") return 0;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return parse_int(trimmedStr, 16);\n // }else if (options.oct && octRegex.test(str)) {\n // return Number.parseInt(val, 8);\n }else if (trimmedStr.search(/[eE]/)!== -1) { //eNotation\n const notation = trimmedStr.match(/^([-\\+])?(0*)([0-9]*(\\.[0-9]*)?[eE][-\\+]?[0-9]+)$/); \n // +00.123 => [ , '+', '00', '.123', ..\n if(notation){\n // console.log(notation)\n if(options.leadingZeros){ //accept with leading zeros\n trimmedStr = (notation[1] || \"\") + notation[3];\n }else{\n if(notation[2] === \"0\" && notation[3][0]=== \".\"){ //valid number\n }else{\n return str;\n }\n }\n return options.eNotation ? Number(trimmedStr) : str;\n }else{\n return str;\n }\n // }else if (options.parseBin && binRegex.test(str)) {\n // return Number.parseInt(val, 2);\n }else{\n //separate negative sign, leading zeros, and rest number\n const match = numRegex.exec(trimmedStr);\n // +00.123 => [ , '+', '00', '.123', ..\n if(match){\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros\n //trim ending zeros for floating number\n \n if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str; //-0123\n else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str; //0123\n else if(options.leadingZeros && leadingZeros===str) return 0; //00\n \n else{//no leading zeros or leading zeros are allowed\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n\n if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation\n if(options.eNotation) return num;\n else return str;\n }else if(trimmedStr.indexOf(\".\") !== -1){ //floating number\n if(numStr === \"0\" && (numTrimmedByZeros === \"\") ) return num; //0.0\n else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000\n else if( sign && numStr === \"-\"+numTrimmedByZeros) return num;\n else return str;\n }\n \n if(leadingZeros){\n return (numTrimmedByZeros === numStr) || (sign+numTrimmedByZeros === numStr) ? num : str\n }else {\n return (trimmedStr === numStr) || (trimmedStr === sign+numStr) ? num : str\n }\n }\n }else{ //non-numeric string\n return str;\n }\n }\n}\n\n/**\n * \n * @param {string} numStr without leading zeros\n * @returns \n */\nfunction trimZeros(numStr){\n if(numStr && numStr.indexOf(\".\") !== -1){//float\n numStr = numStr.replace(/0+$/, \"\"); //remove ending zeros\n if(numStr === \".\") numStr = \"0\";\n else if(numStr[0] === \".\") numStr = \"0\"+numStr;\n else if(numStr[numStr.length-1] === \".\") numStr = numStr.substr(0,numStr.length-1);\n return numStr;\n }\n return numStr;\n}\n\nfunction parse_int(numStr, base){\n //polyfill\n if(parseInt) return parseInt(numStr, base);\n else if(Number.parseInt) return Number.parseInt(numStr, base);\n else if(window && window.parseInt) return window.parseInt(numStr, base);\n else throw new Error(\"parseInt, Number.parseInt, window.parseInt are not supported\")\n}\n\n//# sourceURL=webpack://fast-xml-parser/./node_modules/strnum/strnum.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.computeSha256Hmac = computeSha256Hmac; +exports.computeSha256Hash = computeSha256Hash; +const node_crypto_1 = __nccwpck_require__(6005); +/** + * Generates a SHA-256 HMAC signature. + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * @param stringToSign - The data to be signed. + * @param encoding - The textual encoding to use for the returned HMAC digest. + */ +async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); +} +/** + * Generates a SHA-256 hash. + * @param content - The data to be included in the hash. + * @param encoding - The textual encoding to use for the returned hash. + */ +async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); +} +//# sourceMappingURL=sha256.js.map /***/ }), -/***/ "./src/fxp.js": -/*!********************!*\ - !*** ./src/fxp.js ***! - \********************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ XMLBuilder: () => (/* reexport safe */ _xmlbuilder_json2xml_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ XMLParser: () => (/* reexport safe */ _xmlparser_XMLParser_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ XMLValidator: () => (/* binding */ XMLValidator)\n/* harmony export */ });\n/* harmony import */ var _validator_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./validator.js */ \"./src/validator.js\");\n/* harmony import */ var _xmlparser_XMLParser_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ./xmlparser/XMLParser.js */ \"./src/xmlparser/XMLParser.js\");\n/* harmony import */ var _xmlbuilder_json2xml_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(/*! ./xmlbuilder/json2xml.js */ \"./src/xmlbuilder/json2xml.js\");\n\n\n\n\n\n\nconst XMLValidator = {\n validate: _validator_js__WEBPACK_IMPORTED_MODULE_0__.validate\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/fxp.js?"); - -/***/ }), +/***/ 61580: +/***/ ((__unused_webpack_module, exports) => { -/***/ "./src/ignoreAttributes.js": -/*!*********************************!*\ - !*** ./src/ignoreAttributes.js ***! - \*********************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ getIgnoreAttributesFn)\n/* harmony export */ });\nfunction getIgnoreAttributesFn(ignoreAttributes) {\n if (typeof ignoreAttributes === 'function') {\n return ignoreAttributes\n }\n if (Array.isArray(ignoreAttributes)) {\n return (attrName) => {\n for (const pattern of ignoreAttributes) {\n if (typeof pattern === 'string' && attrName === pattern) {\n return true\n }\n if (pattern instanceof RegExp && pattern.test(attrName)) {\n return true\n }\n }\n }\n }\n return () => false\n}\n\n//# sourceURL=webpack://fast-xml-parser/./src/ignoreAttributes.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isNodeReadableStream = isNodeReadableStream; +exports.isWebReadableStream = isWebReadableStream; +exports.isBinaryBody = isBinaryBody; +exports.isReadableStream = isReadableStream; +exports.isBlob = isBlob; +function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); +} +function isWebReadableStream(x) { + return Boolean(x && + typeof x.getReader === "function" && + typeof x.tee === "function"); +} +function isBinaryBody(body) { + return (body !== undefined && + (body instanceof Uint8Array || + isReadableStream(body) || + typeof body === "function" || + body instanceof Blob)); +} +function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); +} +function isBlob(x) { + return typeof x.stream === "function"; +} +//# sourceMappingURL=typeGuards.js.map /***/ }), -/***/ "./src/util.js": -/*!*********************!*\ - !*** ./src/util.js ***! - \*********************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ getAllMatches: () => (/* binding */ getAllMatches),\n/* harmony export */ getValue: () => (/* binding */ getValue),\n/* harmony export */ isEmptyObject: () => (/* binding */ isEmptyObject),\n/* harmony export */ isExist: () => (/* binding */ isExist),\n/* harmony export */ isName: () => (/* binding */ isName),\n/* harmony export */ merge: () => (/* binding */ merge),\n/* harmony export */ nameRegexp: () => (/* binding */ nameRegexp)\n/* harmony export */ });\n\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*';\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nfunction getAllMatches(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n}\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n}\n\nfunction isExist(v) {\n return typeof v !== 'undefined';\n}\n\nfunction isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nfunction merge(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n}\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nfunction getValue(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n}\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\n//# sourceURL=webpack://fast-xml-parser/./src/util.js?"); - -/***/ }), +/***/ 8192: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/***/ "./src/validator.js": -/*!**************************!*\ - !*** ./src/validator.js ***! - \**************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ validate: () => (/* binding */ validate)\n/* harmony export */ });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./util.js */ \"./src/util.js\");\n\n\n\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n unpairedTags: []\n};\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nfunction validate(xmlData, options) {\n options = Object.assign({}, defaultOptions, options);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/()/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n \n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\"+tagName+\"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\"+tagName+\"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\"+otg.tagName+\"' (opened in line \"+openPos.line+\", col \"+openPos.col+\") instead of closing tag '\"+tagName+\"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else if(options.unpairedTags.indexOf(tagName) !== -1){\n //don't push into stack\n } else {\n tags.push({tagName, tagStartPos});\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }else{\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject('InvalidXml', \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if ( isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n }else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\"+tags[0].tagName+\"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n }else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '')+\n \"' found.\", {line: 1, col: 1});\n }\n\n return true;\n};\n\nfunction isWhiteSpace(char){\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n}\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.getAllMatches)(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isName)(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isName)(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/validator.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUserAgentHeaderName = getUserAgentHeaderName; +exports.getUserAgentValue = getUserAgentValue; +const userAgentPlatform_js_1 = __nccwpck_require__(76576); +const constants_js_1 = __nccwpck_require__(58463); +function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); +} +/** + * @internal + */ +function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); +} +/** + * @internal + */ +async function getUserAgentValue(prefix) { + const runtimeInfo = new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; +} +//# sourceMappingURL=userAgent.js.map /***/ }), -/***/ "./src/xmlbuilder/json2xml.js": -/*!************************************!*\ - !*** ./src/xmlbuilder/json2xml.js ***! - \************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Builder)\n/* harmony export */ });\n/* harmony import */ var _orderedJs2Xml_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./orderedJs2Xml.js */ \"./src/xmlbuilder/orderedJs2Xml.js\");\n/* harmony import */ var _ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ../ignoreAttributes.js */ \"./src/ignoreAttributes.js\");\n\n//parse Empty Node as self closing node\n\n\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.ignoreAttributesFn = (0,_ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.options.ignoreAttributes)\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return (0,_orderedJs2Xml_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0, []).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level, ajPath) {\n let attrStr = '';\n let val = '';\n const jPath = ajPath.join('.')\n for (let key in jObj) {\n if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node only if it is not an attribute\n if (this.isAttribute(key)) {\n val += '';\n }\n } else if (jObj[key] === null) {\n // null attribute should be ignored by the attribute list, but should not cause the tag closing\n if (this.isAttribute(key)) {\n val += '';\n } else if (key === this.options.cdataPropName) {\n val += '';\n } else if (key[0] === '?') {\n val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n }\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr && !this.ignoreAttributesFn(attr, jPath)) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n } else if (!attr) {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if(this.options.oneListGroup){\n const result = this.j2x(item, level + 1, ajPath.concat(key));\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr\n }\n }else{\n listTagVal += this.processTextOrObjNode(item, key, level, ajPath)\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n }\n if(this.options.oneListGroup){\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level, ajPath)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nBuilder.prototype.buildAttrPairStr = function(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level, ajPath) {\n const result = this.j2x(object, level + 1, ajPath.concat(key));\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function(val, key, attrStr, level) {\n if(val === \"\"){\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n }else{\n\n let tagEndExp = '' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n }\n}\n\nBuilder.prototype.closeTag = function(key){\n let closeTag = \"\";\n if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(!this.options.suppressUnpairedNode) closeTag = \"/\"\n }else if(this.options.suppressEmptyNode){ //empty\n closeTag = \"/\";\n }else{\n closeTag = `>` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if(key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; \n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === ''){\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n ' 0 && this.options.processEntities){\n for (let i=0; i { -/***/ "./src/xmlbuilder/orderedJs2Xml.js": -/*!*****************************************!*\ - !*** ./src/xmlbuilder/orderedJs2Xml.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ toXml)\n/* harmony export */ });\nconst EOL = \"\\n\";\n\n/**\n * \n * @param {array} jArray \n * @param {any} options \n * @returns \n */\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\n\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if(tagName === undefined) continue;\n\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n\n return xmlStr;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(!obj.hasOwnProperty(key)) continue;\n if (key !== \":@\") return key;\n }\n}\n\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if(!attrMap.hasOwnProperty(attr)) continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlbuilder/orderedJs2Xml.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHeaderName = getHeaderName; +exports.setPlatformSpecificData = setPlatformSpecificData; +const tslib_1 = __nccwpck_require__(4351); +const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(70612)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(97742)); +/** + * @internal + */ +function getHeaderName() { + return "User-Agent"; +} +/** + * @internal + */ +async function setPlatformSpecificData(map) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map.set("Bun", `${versions.bun} (${osInfo})`); + } + else if (versions.deno) { + map.set("Deno", `${versions.deno} (${osInfo})`); + } + else if (versions.node) { + map.set("Node", `${versions.node} (${osInfo})`); + } + } +} +//# sourceMappingURL=userAgentPlatform.js.map /***/ }), -/***/ "./src/xmlparser/DocTypeReader.js": -/*!****************************************!*\ - !*** ./src/xmlparser/DocTypeReader.js ***! - \****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ readDocType)\n/* harmony export */ });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ../util.js */ \"./src/util.js\");\n\n\n//TODO: handle comments\nfunction readDocType(xmlData, i){\n \n const entities = {};\n if( xmlData[i + 3] === 'O' &&\n xmlData[i + 4] === 'C' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'Y' &&\n xmlData[i + 7] === 'P' &&\n xmlData[i + 8] === 'E')\n { \n i = i+9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for(;i') { //Read tag content\n if(comment){\n if( xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\"){\n comment = false;\n angleBracketsCount--;\n }\n }else{\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n }else if( xmlData[i] === '['){\n hasBody = true;\n }else{\n exp += xmlData[i];\n }\n }\n if(angleBracketsCount !== 0){\n throw new Error(`Unclosed DOCTYPE`);\n }\n }else{\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return {entities, i};\n}\n\nfunction readEntityExp(xmlData,i){\n //External entities are not supported\n // \n\n //Parameter entities are not supported\n // \n\n //Internal entities are supported\n // \n \n //read EntityName\n let entityName = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"' ); i++) {\n // if(xmlData[i] === \" \") continue;\n // else \n entityName += xmlData[i];\n }\n entityName = entityName.trim();\n if(entityName.indexOf(\" \") !== -1) throw new Error(\"External entites are not supported\");\n\n //read Entity Value\n const startChar = xmlData[i++];\n let val = \"\"\n for (; i < xmlData.length && xmlData[i] !== startChar ; i++) {\n val += xmlData[i];\n }\n return [entityName, val, i];\n}\n\nfunction isComment(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === '-' &&\n xmlData[i+3] === '-') return true\n return false\n}\nfunction isEntity(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'N' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'I' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'Y') return true\n return false\n}\nfunction isElement(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'L' &&\n xmlData[i+4] === 'E' &&\n xmlData[i+5] === 'M' &&\n xmlData[i+6] === 'E' &&\n xmlData[i+7] === 'N' &&\n xmlData[i+8] === 'T') return true\n return false\n}\n\nfunction isAttlist(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'A' &&\n xmlData[i+3] === 'T' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'L' &&\n xmlData[i+6] === 'I' &&\n xmlData[i+7] === 'S' &&\n xmlData[i+8] === 'T') return true\n return false\n}\nfunction isNotation(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'N' &&\n xmlData[i+3] === 'O' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'A' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'I' &&\n xmlData[i+8] === 'O' &&\n xmlData[i+9] === 'N') return true\n return false\n}\n\nfunction validateEntityName(name){\n if ((0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isName)(name))\n\treturn name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/DocTypeReader.js?"); - -/***/ }), +/***/ 2339: +/***/ ((__unused_webpack_module, exports) => { -/***/ "./src/xmlparser/OptionsBuilder.js": -/*!*****************************************!*\ - !*** ./src/xmlparser/OptionsBuilder.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ buildOptions: () => (/* binding */ buildOptions),\n/* harmony export */ defaultOptions: () => (/* binding */ defaultOptions)\n/* harmony export */ });\n\nconst defaultOptions = {\n preserveOrder: false,\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n removeNSPrefix: false, // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val) {\n return val;\n },\n attributeValueProcessor: function(attrName, val) {\n return val;\n },\n stopNodes: [], //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs){\n return tagName\n },\n // skipEmptyListItem: false\n};\n \nconst buildOptions = function(options) {\n return Object.assign({}, defaultOptions, options);\n};\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/OptionsBuilder.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.randomUUID = randomUUID; +/** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ +function randomUUID() { + return crypto.randomUUID(); +} +//# sourceMappingURL=uuidUtils.js.map /***/ }), -/***/ "./src/xmlparser/OrderedObjParser.js": -/*!*******************************************!*\ - !*** ./src/xmlparser/OrderedObjParser.js ***! - \*******************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ OrderedObjParser)\n/* harmony export */ });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ../util.js */ \"./src/util.js\");\n/* harmony import */ var _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ./xmlNode.js */ \"./src/xmlparser/xmlNode.js\");\n/* harmony import */ var _DocTypeReader_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(/*! ./DocTypeReader.js */ \"./src/xmlparser/DocTypeReader.js\");\n/* harmony import */ var strnum__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(/*! strnum */ \"./node_modules/strnum/strnum.js\");\n/* harmony import */ var _ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(/*! ../ignoreAttributes.js */ \"./src/ignoreAttributes.js\");\n\n///@ts-check\n\n\n\n\n\n\n\n// const regx =\n// '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n// .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\nclass OrderedObjParser{\n constructor(options){\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\" : { regex: /&(apos|#39|#x27);/g, val : \"'\"},\n \"gt\" : { regex: /&(gt|#62|#x3E);/g, val : \">\"},\n \"lt\" : { regex: /&(lt|#60|#x3C);/g, val : \"<\"},\n \"quot\" : { regex: /&(quot|#34|#x22);/g, val : \"\\\"\"},\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : \"&\"};\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\" : { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\" : { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\" : { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\" : { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\" : { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\" : { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\" : { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCodePoint(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCodePoint(Number.parseInt(str, 16)) },\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n this.ignoreAttributesFn = (0,_ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.options.ignoreAttributes)\n }\n\n}\n\nfunction addExternalEntities(externalEntities){\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\"+ent+\";\",\"g\"),\n val : externalEntities[ent]\n }\n }\n}\n\n/**\n * @param {string} val\n * @param {string} tagName\n * @param {string} jPath\n * @param {boolean} dontTrim\n * @param {boolean} hasAttributes\n * @param {boolean} isLeafNode\n * @param {boolean} escapeEntities\n */\nfunction parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val !== undefined) {\n if (this.options.trimValues && !dontTrim) {\n val = val.trim();\n }\n if(val.length > 0){\n if(!escapeEntities) val = this.replaceEntitiesValue(val);\n \n const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);\n if(newval === null || newval === undefined){\n //don't parse\n return val;\n }else if(typeof newval !== typeof val || newval !== val){\n //overwrite\n return newval;\n }else if(this.options.trimValues){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n const trimmedVal = val.trim();\n if(trimmedVal === val){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n return val;\n }\n }\n }\n }\n}\n\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])([\\\\s\\\\S]*?)\\\\3)?', 'gm');\n\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (this.options.ignoreAttributes !== true && typeof attrStr === 'string') {\n // attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.getAllMatches)(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n if (this.ignoreAttributesFn(attrName, jPath)) {\n continue\n }\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if(aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== undefined) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if(newVal === null || newVal === undefined){\n //don't parse\n attrs[aName] = oldVal;\n }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){\n //overwrite\n attrs[aName] = newVal;\n }else{\n //parse\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs\n }\n}\n\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\"); //TODO: remove this line\n const xmlObj = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for(let i=0; i< xmlData.length; i++){//for each char in XML data\n const ch = xmlData[i];\n if(ch === '<'){\n // const nextIndex = i+1;\n // const _2ndChar = xmlData[nextIndex];\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(this.options.removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n if(currentNode){\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n\n //check if last tag of nested tag was unpaired tag\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\")+1);\n if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0\n if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){\n propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1)\n this.tagsNodeStack.pop();\n }else{\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n\n currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n\n let tagData = readTagExp(xmlData,i, false, \"?>\");\n if(!tagData) throw new Error(\"Pi Tag is not closed.\");\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if( (this.options.ignoreDeclaration && tagData.tagName === \"?xml\") || this.options.ignorePiTags){\n\n }else{\n \n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n \n if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n\n }\n\n\n i = tagData.closeIndex + 1;\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n const endIndex = findClosingIndex(xmlData, \"-->\", i+4, \"Comment is not closed.\")\n if(this.options.commentPropName){\n const comment = xmlData.substring(i + 4, endIndex - 2);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]);\n }\n i = endIndex;\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const result = (0,_DocTypeReader_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if(val == undefined) val = \"\";\n\n //cdata should be set even if it is 0 length string\n if(this.options.cdataPropName){\n currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);\n }else{\n currentNode.add(this.options.textNodeName, val);\n }\n \n i = closeIndex + 2;\n }else {//Opening tag\n let result = readTagExp(xmlData,i, this.options.removeNSPrefix);\n let tagName= result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n \n //save text as child node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n //when nested tag is found\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n\n //check if last tag was unpaired tag\n const lastTag = currentNode;\n if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if(tagName !== xmlObj.tagname){\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n //self-closing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n }\n //unpaired tag\n else if(this.options.unpairedTags.indexOf(tagName) !== -1){\n \n i = result.closeIndex;\n }\n //normal tag\n else{\n //read until closing tag is found\n const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if(!result) throw new Error(`Unexpected end of ${rawTagName}`);\n i = result.i;\n tagContent = result.tagContent;\n }\n\n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if(tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n \n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n \n this.addChild(currentNode, childNode, jPath)\n }else{\n //selfClosing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n \n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n }\n //opening tag\n else{\n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]( tagName);\n this.tagsNodeStack.push(currentNode);\n \n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n}\n\nfunction addChild(currentNode, childNode, jPath){\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"])\n if(result === false){\n }else if(typeof result === \"string\"){\n childNode.tagname = result\n currentNode.addChild(childNode);\n }else{\n currentNode.addChild(childNode);\n }\n}\n\nconst replaceEntitiesValue = function(val){\n\n if(this.options.processEntities){\n for(let entityName in this.docTypeEntities){\n const entity = this.docTypeEntities[entityName];\n val = val.replace( entity.regx, entity.val);\n }\n for(let entityName in this.lastEntities){\n const entity = this.lastEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n if(this.options.htmlEntities){\n for(let entityName in this.htmlEntities){\n const entity = this.htmlEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n }\n val = val.replace( this.ampEntity.regex, this.ampEntity.val);\n }\n return val;\n}\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) { //store previously collected data as textNode\n if(isLeafNode === undefined) isLeafNode = currentNode.child.length === 0\n \n textData = this.parseTextData(textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode);\n\n if (textData !== undefined && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\n\n//TODO: use jPath to simplify the logic\n/**\n * \n * @param {string[]} stopNodes \n * @param {string} jPath\n * @param {string} currentTagName \n */\nfunction isItStopNode(stopNodes, jPath, currentTagName){\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;\n }\n return false;\n}\n\n/**\n * Returns the tag Expression and where it is ending handling single-double quotes situation\n * @param {string} xmlData \n * @param {number} i starting index\n * @returns \n */\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\"){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if(closingChar[1]){\n if(xmlData[index + 1] === closingChar[1]){\n return {\n data: tagExp,\n index: index\n }\n }\n }else{\n return {\n data: tagExp,\n index: index\n }\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nfunction readTagExp(xmlData,i, removeNSPrefix, closingChar = \">\"){\n const result = tagExpWithClosingIndex(xmlData, i+1, closingChar);\n if(!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if(separatorIndex !== -1){//separate tag name and attributes expression\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n\n const rawTagName = tagName;\n if(removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n return {\n tagName: tagName,\n tagExp: tagExp,\n closeIndex: closeIndex,\n attrExpPresent: attrExpPresent,\n rawTagName: rawTagName,\n }\n}\n/**\n * find paired tag for a stop node\n * @param {string} xmlData \n * @param {string} tagName \n * @param {number} i \n */\nfunction readStopNodeData(xmlData, tagName, i){\n const startIndex = i;\n // Starting at 1 since we already have an open tag\n let openTagCount = 1;\n\n for (; i < xmlData.length; i++) {\n if( xmlData[i] === \"<\"){ \n if (xmlData[i+1] === \"/\") {//close tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i+2,closeIndex).trim();\n if(closeTagName === tagName){\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i : closeIndex\n }\n }\n }\n i=closeIndex;\n } else if(xmlData[i+1] === '?') { \n const closeIndex = findClosingIndex(xmlData, \"?>\", i+1, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 3) === '!--') { \n const closeIndex = findClosingIndex(xmlData, \"-->\", i+3, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 2) === '![') { \n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i=closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, '>')\n\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== \"/\") {\n openTagCount++;\n }\n i=tagData.closeIndex;\n }\n }\n }\n }//end for loop\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if(newval === 'true' ) return true;\n else if(newval === 'false' ) return false;\n else return (0,strnum__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(val, options);\n } else {\n if ((0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isExist)(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/OrderedObjParser.js?"); - -/***/ }), +/***/ 1263: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -/***/ "./src/xmlparser/XMLParser.js": -/*!************************************!*\ - !*** ./src/xmlparser/XMLParser.js ***! - \************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ XMLParser)\n/* harmony export */ });\n/* harmony import */ var _OptionsBuilder_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./OptionsBuilder.js */ \"./src/xmlparser/OptionsBuilder.js\");\n/* harmony import */ var _OrderedObjParser_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ./OrderedObjParser.js */ \"./src/xmlparser/OrderedObjParser.js\");\n/* harmony import */ var _node2json_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(/*! ./node2json.js */ \"./src/xmlparser/node2json.js\");\n/* harmony import */ var _validator_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(/*! ../validator.js */ \"./src/validator.js\");\n\n\n\n\n\nclass XMLParser{\n \n constructor(options){\n this.externalEntities = {};\n this.options = (0,_OptionsBuilder_js__WEBPACK_IMPORTED_MODULE_0__.buildOptions)(options);\n \n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData,validationOption){\n if(typeof xmlData === \"string\"){\n }else if( xmlData.toString){\n xmlData = xmlData.toString();\n }else{\n throw new Error(\"XML data is accepted in String or Bytes[] form.\")\n }\n if( validationOption){\n if(validationOption === true) validationOption = {}; //validate with default options\n \n const result = (0,_validator_js__WEBPACK_IMPORTED_MODULE_3__.validate)(xmlData, validationOption);\n if (result !== true) {\n throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` )\n }\n }\n const orderedObjParser = new _OrderedObjParser_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if(this.options.preserveOrder || orderedResult === undefined) return orderedResult;\n else return (0,_node2json_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(orderedResult, this.options);\n }\n\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value){\n if(value.indexOf(\"&\") !== -1){\n throw new Error(\"Entity value can't have '&'\")\n }else if(key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1){\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\")\n }else if(value === \"&\"){\n throw new Error(\"An entity with value '&' is not permitted\");\n }else{\n this.externalEntities[key] = value;\n }\n }\n}\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/XMLParser.js?"); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.encode = encode; +exports.decodeEntity = decodeEntity; +exports.decode = decode; +var named_references_js_1 = __nccwpck_require__(15197); +var numeric_unicode_map_js_1 = __nccwpck_require__(24690); +var surrogate_pairs_js_1 = __nccwpck_require__(77955); +var allNamedReferences = __assign(__assign({}, named_references_js_1.namedReferences), { all: named_references_js_1.namedReferences.html5 }); +var encodeRegExps = { + specialChars: /[<>'"&]/g, + nonAscii: /[<>'"&\u0080-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, + nonAsciiPrintable: /[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, + nonAsciiPrintableOnly: /[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, + extensive: /[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g +}; +var defaultEncodeOptions = { + mode: 'specialChars', + level: 'all', + numeric: 'decimal' +}; +/** Encodes all the necessary (specified by `level`) characters in the text */ +function encode(text, _a) { + var _b = _a === void 0 ? defaultEncodeOptions : _a, _c = _b.mode, mode = _c === void 0 ? 'specialChars' : _c, _d = _b.numeric, numeric = _d === void 0 ? 'decimal' : _d, _e = _b.level, level = _e === void 0 ? 'all' : _e; + if (!text) { + return ''; + } + var encodeRegExp = encodeRegExps[mode]; + var references = allNamedReferences[level].characters; + var isHex = numeric === 'hexadecimal'; + return String.prototype.replace.call(text, encodeRegExp, function (input) { + var result = references[input]; + if (!result) { + var code = input.length > 1 ? (0, surrogate_pairs_js_1.getCodePoint)(input, 0) : input.charCodeAt(0); + result = (isHex ? '&#x' + code.toString(16) : '&#' + code) + ';'; + } + return result; + }); +} +var defaultDecodeOptions = { + scope: 'body', + level: 'all' +}; +var strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g; +var attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g; +var baseDecodeRegExps = { + xml: { + strict: strict, + attribute: attribute, + body: named_references_js_1.bodyRegExps.xml + }, + html4: { + strict: strict, + attribute: attribute, + body: named_references_js_1.bodyRegExps.html4 + }, + html5: { + strict: strict, + attribute: attribute, + body: named_references_js_1.bodyRegExps.html5 + } +}; +var decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 }); +var fromCharCode = String.fromCharCode; +var outOfBoundsChar = fromCharCode(65533); +var defaultDecodeEntityOptions = { + level: 'all' +}; +function getDecodedEntity(entity, references, isAttribute, isStrict) { + var decodeResult = entity; + var decodeEntityLastChar = entity[entity.length - 1]; + if (isAttribute && decodeEntityLastChar === '=') { + decodeResult = entity; + } + else if (isStrict && decodeEntityLastChar !== ';') { + decodeResult = entity; + } + else { + var decodeResultByReference = references[entity]; + if (decodeResultByReference) { + decodeResult = decodeResultByReference; + } + else if (entity[0] === '&' && entity[1] === '#') { + var decodeSecondChar = entity[2]; + var decodeCode = decodeSecondChar == 'x' || decodeSecondChar == 'X' + ? parseInt(entity.substr(3), 16) + : parseInt(entity.substr(2)); + decodeResult = + decodeCode >= 0x10ffff + ? outOfBoundsChar + : decodeCode > 65535 + ? (0, surrogate_pairs_js_1.fromCodePoint)(decodeCode) + : fromCharCode(numeric_unicode_map_js_1.numericUnicodeMap[decodeCode] || decodeCode); + } + } + return decodeResult; +} +/** Decodes a single entity */ +function decodeEntity(entity, _a) { + var _b = _a === void 0 ? defaultDecodeEntityOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c; + if (!entity) { + return ''; + } + return getDecodedEntity(entity, allNamedReferences[level].entities, false, false); +} +/** Decodes all entities in the text */ +function decode(text, _a) { + var _b = _a === void 0 ? defaultDecodeOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c, _d = _b.scope, scope = _d === void 0 ? level === 'xml' ? 'strict' : 'body' : _d; + if (!text) { + return ''; + } + var decodeRegExp = decodeRegExps[level][scope]; + var references = allNamedReferences[level].entities; + var isAttribute = scope === 'attribute'; + var isStrict = scope === 'strict'; + return text.replace(decodeRegExp, function (entity) { return getDecodedEntity(entity, references, isAttribute, isStrict); }); +} +//# sourceMappingURL=index.js.map /***/ }), -/***/ "./src/xmlparser/node2json.js": -/*!************************************!*\ - !*** ./src/xmlparser/node2json.js ***! - \************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 15197: +/***/ (function(__unused_webpack_module, exports) { -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ prettify)\n/* harmony export */ });\n\n\n/**\n * \n * @param {array} node \n * @param {any} options \n * @returns \n */\nfunction prettify(node, options){\n return compress( node, options);\n}\n\n/**\n * \n * @param {array} arr \n * @param {object} options \n * @param {string} jPath \n * @returns object\n */\nfunction compress(arr, options, jPath){\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName(tagObj);\n let newJpath = \"\";\n if(jPath === undefined) newJpath = property;\n else newJpath = jPath + \".\" + property;\n\n if(property === options.textNodeName){\n if(text === undefined) text = tagObj[property];\n else text += \"\" + tagObj[property];\n }else if(property === undefined){\n continue;\n }else if(tagObj[property]){\n \n let val = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val, options);\n\n if(tagObj[\":@\"]){\n assignAttributes( val, tagObj[\":@\"], newJpath, options);\n }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){\n val = val[options.textNodeName];\n }else if(Object.keys(val).length === 0){\n if(options.alwaysCreateTextNode) val[options.textNodeName] = \"\";\n else val = \"\";\n }\n\n if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) {\n if(!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [ compressedObj[property] ];\n }\n compressedObj[property].push(val);\n }else{\n //TODO: if a node is not an array, then check if it should be an array\n //also determine if it is a leaf node\n if (options.isArray(property, newJpath, isLeaf )) {\n compressedObj[property] = [val];\n }else{\n compressedObj[property] = val;\n }\n }\n }\n \n }\n // if(text && text.length > 0) compressedObj[options.textNodeName] = text;\n if(typeof text === \"string\"){\n if(text.length > 0) compressedObj[options.textNodeName] = text;\n }else if(text !== undefined) compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\n\nfunction propName(obj){\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(key !== \":@\") return key;\n }\n}\n\nfunction assignAttributes(obj, attrMap, jpath, options){\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [ attrMap[atrrName] ];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\n\nfunction isLeafTag(obj, options){\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n \n if (propCount === 0) {\n return true;\n }\n\n if (\n propCount === 1 &&\n (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)\n ) {\n return true;\n }\n\n return false;\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/node2json.js?"); +"use strict"; -/***/ }), +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.namedReferences = exports.bodyRegExps = void 0; +// This file is autogenerated by tools/process-named-references.ts +var pairDivider = "~"; +var blockDivider = "~~"; +function generateNamedReferences(input, prev) { + var entities = {}; + var characters = {}; + var blocks = input.split(blockDivider); + var isOptionalBlock = false; + for (var i = 0; blocks.length > i; i++) { + var entries = blocks[i].split(pairDivider); + for (var j = 0; j < entries.length; j += 2) { + var entity = entries[j]; + var character = entries[j + 1]; + var fullEntity = '&' + entity + ';'; + entities[fullEntity] = character; + if (isOptionalBlock) { + entities['&' + entity] = character; + } + characters[character] = fullEntity; + } + isOptionalBlock = true; + } + return prev ? + { entities: __assign(__assign({}, entities), prev.entities), characters: __assign(__assign({}, characters), prev.characters) } : + { entities: entities, characters: characters }; +} +exports.bodyRegExps = { + xml: /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g, + html4: /∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g, + html5: /·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g +}; +exports.namedReferences = {}; +exports.namedReferences.xml = generateNamedReferences("lt~<~gt~>~quot~\"~apos~'~amp~&"); +exports.namedReferences.html4 = generateNamedReferences("apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~‌~zwj~‍~lrm~‎~rlm~‏~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~­~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~\"~amp~&~lt~<~gt~>"); +exports.namedReferences.html5 = generateNamedReferences("Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~⁡~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~⁣~InvisibleTimes~⁢~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~​~NegativeThickSpace~​~NegativeThinSpace~​~NegativeVeryThinSpace~​~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~⁠~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~\t~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~  ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~​~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~⁡~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~⁣~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~⁢~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~\"~REG~®", exports.namedReferences['html4']); +//# sourceMappingURL=named-references.js.map + +/***/ }), + +/***/ 24690: +/***/ ((__unused_webpack_module, exports) => { -/***/ "./src/xmlparser/xmlNode.js": -/*!**********************************!*\ - !*** ./src/xmlparser/xmlNode.js ***! - \**********************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ XmlNode)\n/* harmony export */ });\n\n\nclass XmlNode{\n constructor(tagname) {\n this.tagname = tagname;\n this.child = []; //nested tags, text, cdata, comments in order\n this[\":@\"] = {}; //attributes map\n }\n add(key,val){\n // this.child.push( {name : key, val: val, isCdata: isCdata });\n if(key === \"__proto__\") key = \"#__proto__\";\n this.child.push( {[key]: val });\n }\n addChild(node) {\n if(node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if(node[\":@\"] && Object.keys(node[\":@\"]).length > 0){\n this.child.push( { [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n }else{\n this.child.push( { [node.tagname]: node.child });\n }\n }\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/xmlNode.js?"); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.numericUnicodeMap = void 0; +exports.numericUnicodeMap = { + 0: 65533, + 128: 8364, + 130: 8218, + 131: 402, + 132: 8222, + 133: 8230, + 134: 8224, + 135: 8225, + 136: 710, + 137: 8240, + 138: 352, + 139: 8249, + 140: 338, + 142: 381, + 145: 8216, + 146: 8217, + 147: 8220, + 148: 8221, + 149: 8226, + 150: 8211, + 151: 8212, + 152: 732, + 153: 8482, + 154: 353, + 155: 8250, + 156: 339, + 158: 382, + 159: 376 +}; +//# sourceMappingURL=numeric-unicode-map.js.map + +/***/ }), + +/***/ 77955: +/***/ ((__unused_webpack_module, exports) => { -/***/ }) +"use strict"; -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nested_webpack_require_83014__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_83014__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nested_webpack_require_83014__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nested_webpack_require_83014__.o(definition, key) && !__nested_webpack_require_83014__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nested_webpack_require_83014__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nested_webpack_require_83014__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module can't be inlined because the eval devtool is used. -/******/ var __webpack_exports__ = __nested_webpack_require_83014__("./src/fxp.js"); -/******/ module.exports = __webpack_exports__; -/******/ -/******/ })() -; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.highSurrogateTo = exports.highSurrogateFrom = exports.getCodePoint = exports.fromCodePoint = void 0; +exports.fromCodePoint = String.fromCodePoint || + function (astralCodePoint) { + return String.fromCharCode(Math.floor((astralCodePoint - 0x10000) / 0x400) + 0xd800, ((astralCodePoint - 0x10000) % 0x400) + 0xdc00); + }; +// @ts-expect-error - String.prototype.codePointAt might not exist in older node versions +exports.getCodePoint = String.prototype.codePointAt + ? function (input, position) { + return input.codePointAt(position); + } + : function (input, position) { + return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000; + }; +exports.highSurrogateFrom = 0xd800; +exports.highSurrogateTo = 0xdbff; +//# sourceMappingURL=surrogate-pairs.js.map /***/ }), @@ -128454,14 +134213,16 @@ exports.getPackageJSON = getPackageJSON; /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Axios v1.7.2 Copyright (c) 2024 Matt Zabriskie and contributors +/*! Axios v1.13.6 Copyright (c) 2026 Matt Zabriskie and contributors */ const FormData$1 = __nccwpck_require__(91403); +const crypto = __nccwpck_require__(6113); const url = __nccwpck_require__(57310); const proxyFromEnv = __nccwpck_require__(63329); const http = __nccwpck_require__(13685); const https = __nccwpck_require__(95687); +const http2 = __nccwpck_require__(85158); const util = __nccwpck_require__(73837); const followRedirects = __nccwpck_require__(67707); const zlib = __nccwpck_require__(59796); @@ -128471,14 +134232,24 @@ const events = __nccwpck_require__(82361); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1); +const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto); const url__default = /*#__PURE__*/_interopDefaultLegacy(url); +const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv); const http__default = /*#__PURE__*/_interopDefaultLegacy(http); const https__default = /*#__PURE__*/_interopDefaultLegacy(https); +const http2__default = /*#__PURE__*/_interopDefaultLegacy(http2); const util__default = /*#__PURE__*/_interopDefaultLegacy(util); const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects); const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib); const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream); +/** + * Create a bound version of a function with a specified `this` context + * + * @param {Function} fn - The function to bind + * @param {*} thisArg - The value to be passed as the `this` parameter + * @returns {Function} A new function that will call the original function with the specified `this` context + */ function bind(fn, thisArg) { return function wrap() { return fn.apply(thisArg, arguments); @@ -128487,29 +134258,30 @@ function bind(fn, thisArg) { // utils is a library of generic helper functions non-specific to axios -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; +const { toString } = Object.prototype; +const { getPrototypeOf } = Object; +const { iterator, toStringTag } = Symbol; -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +const kindOf = ((cache) => (thing) => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(Object.create(null)); const kindOfTest = (type) => { type = type.toLowerCase(); - return (thing) => kindOf(thing) === type + return (thing) => kindOf(thing) === type; }; -const typeOfTest = type => thing => typeof thing === type; +const typeOfTest = (type) => (thing) => typeof thing === type; /** - * Determine if a value is an Array + * Determine if a value is a non-null object * * @param {Object} val The value to test * * @returns {boolean} True if value is an Array, otherwise false */ -const {isArray} = Array; +const { isArray } = Array; /** * Determine if a value is undefined @@ -128528,8 +134300,14 @@ const isUndefined = typeOfTest('undefined'); * @returns {boolean} True if value is a Buffer, otherwise false */ function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); + return ( + val !== null && + !isUndefined(val) && + val.constructor !== null && + !isUndefined(val.constructor) && + isFunction$1(val.constructor.isBuffer) && + val.constructor.isBuffer(val) + ); } /** @@ -128541,7 +134319,6 @@ function isBuffer(val) { */ const isArrayBuffer = kindOfTest('ArrayBuffer'); - /** * Determine if a value is a view on an ArrayBuffer * @@ -128551,10 +134328,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer'); */ function isArrayBufferView(val) { let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { result = ArrayBuffer.isView(val); } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); + result = val && val.buffer && isArrayBuffer(val.buffer); } return result; } @@ -128574,7 +134351,7 @@ const isString = typeOfTest('string'); * @param {*} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ -const isFunction = typeOfTest('function'); +const isFunction$1 = typeOfTest('function'); /** * Determine if a value is a Number @@ -128600,7 +134377,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object'; * @param {*} thing The value to test * @returns {boolean} True if value is a Boolean, otherwise false */ -const isBoolean = thing => thing === true || thing === false; +const isBoolean = (thing) => thing === true || thing === false; /** * Determine if a value is a plain Object @@ -128615,7 +134392,34 @@ const isPlainObject = (val) => { } const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(toStringTag in val) && + !(iterator in val) + ); +}; + +/** + * Determine if a value is an empty object (safely handles Buffers) + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an empty object, otherwise false + */ +const isEmptyObject = (val) => { + // Early return for non-objects or Buffers to prevent RangeError + if (!isObject(val) || isBuffer(val)) { + return false; + } + + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + // Fallback for any other objects that might cause RangeError with Object.keys() + return false; + } }; /** @@ -128636,6 +134440,31 @@ const isDate = kindOfTest('Date'); */ const isFile = kindOfTest('File'); +/** + * Determine if a value is a React Native Blob + * React Native "blob": an object with a `uri` attribute. Optionally, it can + * also have a `name` and `type` attribute to specify filename and content type + * + * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 + * + * @param {*} value The value to test + * + * @returns {boolean} True if value is a React Native Blob, otherwise false + */ +const isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== 'undefined'); +}; + +/** + * Determine if environment is React Native + * ReactNative `FormData` has a non-standard `getParts()` method + * + * @param {*} formData The formData to test + * + * @returns {boolean} True if environment is React Native, otherwise false + */ +const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined'; + /** * Determine if a value is a Blob * @@ -128661,7 +134490,7 @@ const isFileList = kindOfTest('FileList'); * * @returns {boolean} True if value is a Stream, otherwise false */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); +const isStream = (val) => isObject(val) && isFunction$1(val.pipe); /** * Determine if a value is a FormData @@ -128670,17 +134499,28 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe); * * @returns {boolean} True if value is an FormData, otherwise false */ +function getGlobal() { + if (typeof globalThis !== 'undefined') return globalThis; + if (typeof self !== 'undefined') return self; + if (typeof window !== 'undefined') return window; + if (typeof global !== 'undefined') return global; + return {}; +} + +const G = getGlobal(); +const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; + const isFormData = (thing) => { let kind; return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( + (FormDataCtor && thing instanceof FormDataCtor) || ( + isFunction$1(thing.append) && ( (kind = kindOf(thing)) === 'formdata' || // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') + (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]') ) ) - ) + ); }; /** @@ -128692,7 +134532,12 @@ const isFormData = (thing) => { */ const isURLSearchParams = kindOfTest('URLSearchParams'); -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); +const [isReadableStream, isRequest, isResponse, isHeaders] = [ + 'ReadableStream', + 'Request', + 'Response', + 'Headers', +].map(kindOfTest); /** * Trim excess whitespace off the beginning and end of a string @@ -128701,9 +134546,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', * * @returns {String} The String freed of excess whitespace */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - +const trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); +}; /** * Iterate over an Array or an Object invoking a function for each item. * @@ -128713,13 +134558,14 @@ const trim = (str) => str.trim ? * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * - * @param {Object|Array} obj The object to iterate + * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item * - * @param {Boolean} [allOwnKeys = false] + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys = false] * @returns {any} */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { +function forEach(obj, fn, { allOwnKeys = false } = {}) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; @@ -128740,6 +134586,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) { fn.call(null, obj[i], i, obj); } } else { + // Buffer check + if (isBuffer(obj)) { + return; + } + // Iterate over object keys const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); const len = keys.length; @@ -128752,7 +134603,19 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) { } } +/** + * Finds a key in an object, case-insensitive, returning the actual key name. + * Returns null if the object is a Buffer or if no match is found. + * + * @param {Object} obj - The object to search. + * @param {string} key - The key to find (case-insensitive). + * @returns {?string} The actual key name if found, otherwise null. + */ function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); const keys = Object.keys(obj); let i = keys.length; @@ -128768,8 +134631,8 @@ function findKey(obj, key) { const _global = (() => { /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) + if (typeof globalThis !== 'undefined') return globalThis; + return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; })(); const isContextDefined = (context) => !isUndefined(context) && context !== _global; @@ -128784,7 +134647,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob * Example: * * ```js - * var result = merge({foo: 123}, {foo: 456}); + * const result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * @@ -128793,17 +134656,22 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; + const { caseless, skipUndefined } = (isContextDefined(this) && this) || {}; const result = {}; const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; + // Skip dangerous property names to prevent prototype pollution + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return; + } + + const targetKey = (caseless && findKey(result, key)) || key; if (isPlainObject(result[targetKey]) && isPlainObject(val)) { result[targetKey] = merge(result[targetKey], val); } else if (isPlainObject(val)) { result[targetKey] = merge({}, val); } else if (isArray(val)) { result[targetKey] = val.slice(); - } else { + } else if (!skipUndefined || !isUndefined(val)) { result[targetKey] = val; } }; @@ -128821,17 +134689,32 @@ function merge(/* obj1, obj2, obj3, ... */) { * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * - * @param {Boolean} [allOwnKeys] + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys] * @returns {Object} The resulting value of object a */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); +const extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction$1(val)) { + Object.defineProperty(a, key, { + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true, + }); + } else { + Object.defineProperty(a, key, { + value: val, + writable: true, + enumerable: true, + configurable: true, + }); + } + }, + { allOwnKeys } + ); return a; }; @@ -128843,7 +134726,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => { * @returns {string} content value without BOM */ const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { + if (content.charCodeAt(0) === 0xfeff) { content = content.slice(1); } return content; @@ -128860,9 +134743,14 @@ const stripBOM = (content) => { */ const inherits = (constructor, superConstructor, props, descriptors) => { constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; + Object.defineProperty(constructor.prototype, 'constructor', { + value: constructor, + writable: true, + enumerable: false, + configurable: true, + }); Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype + value: superConstructor.prototype, }); props && Object.assign(constructor.prototype, props); }; @@ -128921,7 +134809,6 @@ const endsWith = (str, searchString, position) => { return lastIndex !== -1 && lastIndex === position; }; - /** * Returns new array from array like object or null if failed * @@ -128950,9 +134837,9 @@ const toArray = (thing) => { * @returns {Array} */ // eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { +const isTypedArray = ((TypedArray) => { // eslint-disable-next-line func-names - return thing => { + return (thing) => { return TypedArray && thing instanceof TypedArray; }; })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); @@ -128966,13 +134853,13 @@ const isTypedArray = (TypedArray => { * @returns {void} */ const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; + const generator = obj && obj[iterator]; - const iterator = generator.call(obj); + const _iterator = generator.call(obj); let result; - while ((result = iterator.next()) && !result.done) { + while ((result = _iterator.next()) && !result.done) { const pair = result.value; fn.call(obj, pair[0], pair[1]); } @@ -129000,16 +134887,18 @@ const matchAll = (regExp, str) => { /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ const isHTMLForm = kindOfTest('HTMLFormElement'); -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); +const toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); }; /* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); +const hasOwnProperty = ( + ({ hasOwnProperty }) => + (obj, prop) => + hasOwnProperty.call(obj, prop) +)(Object.prototype); /** * Determine if a value is a RegExp object @@ -129042,13 +134931,13 @@ const reduceDescriptors = (obj, reducer) => { const freezeMethods = (obj) => { reduceDescriptors(obj, (descriptor, name) => { // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { + if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { return false; } const value = obj[name]; - if (!isFunction(value)) return; + if (!isFunction$1(value)) return; descriptor.enumerable = false; @@ -129059,17 +134948,25 @@ const freezeMethods = (obj) => { if (!descriptor.set) { descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); + throw Error("Can not rewrite read-only method '" + name + "'"); }; } }); }; +/** + * Converts an array or a delimited string into an object set with values as keys and true as values. + * Useful for fast membership checks. + * + * @param {Array|string} arrayOrString - The array or string to convert. + * @param {string} delimiter - The delimiter to use if input is a string. + * @returns {Object} An object with keys from the array or string, values set to true. + */ const toObjectSet = (arrayOrString, delimiter) => { const obj = {}; const define = (arr) => { - arr.forEach(value => { + arr.forEach((value) => { obj[value] = true; }); }; @@ -129082,27 +134979,7 @@ const toObjectSet = (arrayOrString, delimiter) => { const noop = () => {}; const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -}; - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - while (size--) { - str += alphabet[Math.random() * length|0]; - } - - return str; + return value != null && Number.isFinite((value = +value)) ? value : defaultValue; }; /** @@ -129113,20 +134990,35 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { * @returns {boolean} */ function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); + return !!( + thing && + isFunction$1(thing.append) && + thing[toStringTag] === 'FormData' && + thing[iterator] + ); } +/** + * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. + * + * @param {Object} obj - The object to convert. + * @returns {Object} The JSON-compatible object. + */ const toJSONObject = (obj) => { const stack = new Array(10); const visit = (source, i) => { - if (isObject(source)) { if (stack.indexOf(source) >= 0) { return; } - if(!('toJSON' in source)) { + //Buffer check + if (isBuffer(source)) { + return source; + } + + if (!('toJSON' in source)) { stack[i] = source; const target = isArray(source) ? [] : {}; @@ -129147,10 +135039,76 @@ const toJSONObject = (obj) => { return visit(obj, 0); }; +/** + * Determines if a value is an async function. + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is an async function, otherwise false. + */ const isAsyncFn = kindOfTest('AsyncFunction'); +/** + * Determines if a value is thenable (has then and catch methods). + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is thenable, otherwise false. + */ const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); + thing && + (isObject(thing) || isFunction$1(thing)) && + isFunction$1(thing.then) && + isFunction$1(thing.catch); + +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +/** + * Provides a cross-platform setImmediate implementation. + * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. + * + * @param {boolean} setImmediateSupported - Whether setImmediate is supported. + * @param {boolean} postMessageSupported - Whether postMessage is supported. + * @returns {Function} A function to schedule a callback asynchronously. + */ +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + + return postMessageSupported + ? ((token, callbacks) => { + _global.addEventListener( + 'message', + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, '*'); + }; + })(`axios@${Math.random()}`, []) + : (cb) => setTimeout(cb); +})(typeof setImmediate === 'function', isFunction$1(_global.postMessage)); + +/** + * Schedules a microtask or asynchronous callback as soon as possible. + * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. + * + * @type {Function} + */ +const asap = + typeof queueMicrotask !== 'undefined' + ? queueMicrotask.bind(_global) + : (typeof process !== 'undefined' && process.nextTick) || _setImmediate; + +// ********************* + +const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]); const utils$1 = { isArray, @@ -129163,6 +135121,7 @@ const utils$1 = { isBoolean, isObject, isPlainObject, + isEmptyObject, isReadableStream, isRequest, isResponse, @@ -129170,9 +135129,11 @@ const utils$1 = { isUndefined, isDate, isFile, + isReactNativeBlob, + isReactNative, isBlob, isRegExp, - isFunction, + isFunction: isFunction$1, isStream, isURLSearchParams, isTypedArray, @@ -129202,44 +135163,66 @@ const utils$1 = { findKey, global: _global, isContextDefined, - ALPHABET, - generateString, isSpecCompliantForm, toJSONObject, isAsyncFn, - isThenable + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, }; -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); +class AxiosError extends Error { + static from(error, code, config, request, response, customProps) { + const axiosError = new AxiosError(error.message, code || error.code, config, request, response); + axiosError.cause = error; + axiosError.name = error.name; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; + // Preserve status from the original error if not already set from response + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + + customProps && Object.assign(axiosError, customProps); + return axiosError; } - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - response && (this.response = response); -} + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + + // Make message enumerable to maintain backward compatibility + // The native Error constructor sets message as non-enumerable, + // but axios < v1.13.3 had it as enumerable + Object.defineProperty(this, 'message', { + value: message, + enumerable: true, + writable: true, + configurable: true + }); + + this.name = 'AxiosError'; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } -utils$1.inherits(AxiosError, Error, { - toJSON: function toJSON() { + toJSON() { return { // Standard message: this.message, @@ -129255,55 +135238,26 @@ utils$1.inherits(AxiosError, Error, { // Axios config: utils$1.toJSONObject(this.config), code: this.code, - status: this.response && this.response.status ? this.response.status : null + status: this.status, }; } -}); - -const prototype$1 = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype$1, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype$1); - - utils$1.toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; +} - customProps && Object.assign(axiosError, customProps); +// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. +AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; +AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; +AxiosError.ECONNABORTED = 'ECONNABORTED'; +AxiosError.ETIMEDOUT = 'ETIMEDOUT'; +AxiosError.ERR_NETWORK = 'ERR_NETWORK'; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; +AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED'; +AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; +AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; +AxiosError.ERR_CANCELED = 'ERR_CANCELED'; +AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; +AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL'; - return axiosError; -}; +const AxiosError$1 = AxiosError; /** * Determines if the given thing is a array or js object. @@ -129338,11 +135292,14 @@ function removeBrackets(key) { */ function renderKey(path, key, dots) { if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); + return path + .concat(key) + .map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }) + .join(dots ? '.' : ''); } /** @@ -129392,21 +135349,26 @@ function toFormData(obj, formData, options) { formData = formData || new (FormData__default["default"] || FormData)(); // eslint-disable-next-line no-param-reassign - options = utils$1.toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !utils$1.isUndefined(source[option]); - }); + options = utils$1.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false, + }, + false, + function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !utils$1.isUndefined(source[option]); + } + ); const metaTokens = options.metaTokens; // eslint-disable-next-line no-use-before-define const visitor = options.visitor || defaultVisitor; const dots = options.dots; const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; + const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob); const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); if (!utils$1.isFunction(visitor)) { @@ -129420,8 +135382,12 @@ function toFormData(obj, formData, options) { return value.toISOString(); } + if (utils$1.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils$1.isBlob(value)) { - throw new AxiosError('Blob is not supported. Use a Buffer instead.'); + throw new AxiosError$1('Blob is not supported. Use a Buffer instead.'); } if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { @@ -129444,6 +135410,11 @@ function toFormData(obj, formData, options) { function defaultVisitor(value, key, path) { let arr = value; + if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === 'object') { if (utils$1.endsWith(key, '{}')) { // eslint-disable-next-line no-param-reassign @@ -129452,17 +135423,22 @@ function toFormData(obj, formData, options) { value = JSON.stringify(value); } else if ( (utils$1.isArray(value) && isFlatArray(value)) || - ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)) - )) { + ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) + ) { // eslint-disable-next-line no-param-reassign key = removeBrackets(key); arr.forEach(function each(el, index) { - !(utils$1.isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); + !(utils$1.isUndefined(el) || el === null) && + formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true + ? renderKey([key], index, dots) + : indexes === null + ? key + : key + '[]', + convertValue(el) + ); }); return false; } @@ -129482,7 +135458,7 @@ function toFormData(obj, formData, options) { const exposedHelpers = Object.assign(predicates, { defaultVisitor, convertValue, - isVisitable + isVisitable, }); function build(value, path) { @@ -129495,9 +135471,9 @@ function toFormData(obj, formData, options) { stack.push(value); utils$1.forEach(value, function each(el, key) { - const result = !(utils$1.isUndefined(el) || el === null) && visitor.call( - formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers - ); + const result = + !(utils$1.isUndefined(el) || el === null) && + visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); if (result === true) { build(el, path ? path.concat(key) : [key]); @@ -129532,7 +135508,7 @@ function encode$1(str) { ')': '%29', '~': '%7E', '%20': '+', - '%00': '\x00' + '%00': '\x00', }; return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { return charMap[match]; @@ -129560,13 +135536,17 @@ prototype.append = function append(name, value) { }; prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode$1); - } : encode$1; + const _encode = encoder + ? function (value) { + return encoder.call(this, value, encode$1); + } + : encode$1; - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); + return this._pairs + .map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '') + .join('&'); }; /** @@ -129578,13 +135558,11 @@ prototype.toString = function toString(encoder) { * @returns {string} The encoded value. */ function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); + return encodeURIComponent(val) + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(/%20/g, '+'); } /** @@ -129592,32 +135570,37 @@ function encode(val) { * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended - * @param {?object} options + * @param {?(object|Function)} options * * @returns {string} The formatted url */ function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ if (!params) { return url; } - - const _encode = options && options.encode || encode; - const serializeFn = options && options.serialize; + const _encode = (options && options.encode) || encode; + + const _options = utils$1.isFunction(options) + ? { + serialize: options, + } + : options; + + const serializeFn = _options && _options.serialize; let serializedParams; if (serializeFn) { - serializedParams = serializeFn(params, options); + serializedParams = serializeFn(params, _options); } else { - serializedParams = utils$1.isURLSearchParams(params) ? - params.toString() : - new AxiosURLSearchParams(params, options).toString(_encode); + serializedParams = utils$1.isURLSearchParams(params) + ? params.toString() + : new AxiosURLSearchParams(params, _options).toString(_encode); } if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); + const hashmarkIndex = url.indexOf('#'); if (hashmarkIndex !== -1) { url = url.slice(0, hashmarkIndex); @@ -129638,6 +135621,7 @@ class InterceptorManager { * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen * * @return {Number} An ID used to remove interceptor later */ @@ -129646,7 +135630,7 @@ class InterceptorManager { fulfilled, rejected, synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null + runWhen: options ? options.runWhen : null, }); return this.handlers.length - 1; } @@ -129656,7 +135640,7 @@ class InterceptorManager { * * @param {Number} id The ID that was returned by `use` * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + * @returns {void} */ eject(id) { if (this.handlers[id]) { @@ -129699,23 +135683,50 @@ const InterceptorManager$1 = InterceptorManager; const transitionalDefaults = { silentJSONParsing: true, forcedJSONParsing: true, - clarifyTimeoutError: false + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, }; const URLSearchParams = url__default["default"].URLSearchParams; +const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; + +const DIGIT = '0123456789'; + +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT, +}; + +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const { length } = alphabet; + const randomValues = new Uint32Array(size); + crypto__default["default"].randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; + } + + return str; +}; + const platform$1 = { isNode: true, classes: { URLSearchParams, FormData: FormData__default["default"], - Blob: typeof Blob !== 'undefined' && Blob || null + Blob: (typeof Blob !== 'undefined' && Blob) || null, }, - protocols: [ 'http', 'https', 'file', 'data' ] + ALPHABET, + generateString, + protocols: ['http', 'https', 'file', 'data'], }; const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; +const _navigator = (typeof navigator === 'object' && navigator) || undefined; + /** * Determine if we're running in a standard browser environment * @@ -129733,10 +135744,9 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde * * @returns {boolean} */ -const hasStandardBrowserEnv = ( - (product) => { - return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0 - })(typeof navigator !== 'undefined' && navigator.product); +const hasStandardBrowserEnv = + hasBrowserEnv && + (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); /** * Determine if we're running in a standard browser webWorker environment @@ -129756,32 +135766,34 @@ const hasStandardBrowserWebWorkerEnv = (() => { ); })(); -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; +const origin = (hasBrowserEnv && window.location.href) || 'http://localhost'; const utils = /*#__PURE__*/Object.freeze({ __proto__: null, hasBrowserEnv: hasBrowserEnv, hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, hasStandardBrowserEnv: hasStandardBrowserEnv, + navigator: _navigator, origin: origin }); const platform = { ...utils, - ...platform$1 + ...platform$1, }; function toURLEncodedForm(data, options) { - return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { + return toFormData(data, new platform.classes.URLSearchParams(), { + visitor: function (value, key, path, helpers) { if (platform.isNode && utils$1.isBuffer(value)) { this.append(key, value.toString('base64')); return false; } return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); + }, + ...options, + }); } /** @@ -129796,7 +135808,7 @@ function parsePropPath(name) { // foo.x.y.z // foo-x-y-z // foo x y z - return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => { + return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => { return match[0] === '[]' ? '' : match[1] || match[0]; }); } @@ -129900,96 +135912,107 @@ function stringifySafely(rawValue, parser, encoder) { } const defaults = { - transitional: transitionalDefaults, adapter: ['xhr', 'http', 'fetch'], - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = utils$1.isObject(data); + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils$1.isObject(data); - if (isObjectPayload && utils$1.isHTMLForm(data)) { - data = new FormData(data); - } + if (isObjectPayload && utils$1.isHTMLForm(data)) { + data = new FormData(data); + } - const isFormData = utils$1.isFormData(data); + const isFormData = utils$1.isFormData(data); - if (isFormData) { - return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; - } + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + } - if (utils$1.isArrayBuffer(data) || - utils$1.isBuffer(data) || - utils$1.isStream(data) || - utils$1.isFile(data) || - utils$1.isBlob(data) || - utils$1.isReadableStream(data) - ) { - return data; - } - if (utils$1.isArrayBufferView(data)) { - return data.buffer; - } - if (utils$1.isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } + if ( + utils$1.isArrayBuffer(data) || + utils$1.isBuffer(data) || + utils$1.isStream(data) || + utils$1.isFile(data) || + utils$1.isBlob(data) || + utils$1.isReadableStream(data) + ) { + return data; + } + if (utils$1.isArrayBufferView(data)) { + return data.buffer; + } + if (utils$1.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } - let isFileList; + let isFileList; - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return toURLEncodedForm(data, this.formSerializer).toString(); - } + if (isObjectPayload) { + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } - if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; + if ( + (isFileList = utils$1.isFileList(data)) || + contentType.indexOf('multipart/form-data') > -1 + ) { + const _FormData = this.env && this.env.FormData; - return toFormData( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); + return toFormData( + isFileList ? { 'files[]': data } : data, + _FormData && new _FormData(), + this.formSerializer + ); + } } - } - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } - return data; - }], + return data; + }, + ], - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; + transformResponse: [ + function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === 'json'; - if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { - return data; - } + if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { + return data; + } - if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; + if ( + data && + utils$1.isString(data) && + ((forcedJSONParsing && !this.responseType) || JSONRequested) + ) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); + try { + return JSON.parse(data, this.parseReviver); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; } - throw e; } } - } - return data; - }], + return data; + }, + ], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a @@ -130005,7 +136028,7 @@ const defaults = { env: { FormData: platform.classes.FormData, - Blob: platform.classes.Blob + Blob: platform.classes.Blob, }, validateStatus: function validateStatus(status) { @@ -130014,10 +136037,10 @@ const defaults = { headers: { common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': undefined, + }, + }, }; utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { @@ -130029,10 +136052,23 @@ const defaults$1 = defaults; // RawAxiosHeaders whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers const ignoreDuplicateOf = utils$1.toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' + 'age', + 'authorization', + 'content-length', + 'content-type', + 'etag', + 'expires', + 'from', + 'host', + 'if-modified-since', + 'if-unmodified-since', + 'last-modified', + 'location', + 'max-forwards', + 'proxy-authorization', + 'referer', + 'retry-after', + 'user-agent', ]); /** @@ -130049,31 +136085,32 @@ const ignoreDuplicateOf = utils$1.toObjectSet([ * * @returns {Object} Headers parsed into an object */ -const parseHeaders = rawHeaders => { +const parseHeaders = (rawHeaders) => { const parsed = {}; let key; let val; let i; - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); + rawHeaders && + rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); + if (key === 'set-cookie') { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } } else { - parsed[key] = [val]; + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); + }); return parsed; }; @@ -130127,8 +136164,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { } function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return header + .trim() + .toLowerCase() + .replace(/([a-z\d])(\w*)/g, (w, char, str) => { return char.toUpperCase() + str; }); } @@ -130136,12 +136175,12 @@ function formatHeader(header) { function buildAccessors(obj, header) { const accessorName = utils$1.toCamelCase(' ' + header); - ['get', 'set', 'has'].forEach(methodName => { + ['get', 'set', 'has'].forEach((methodName) => { Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { + value: function (arg1, arg2, arg3) { return this[methodName].call(this, header, arg1, arg2, arg3); }, - configurable: true + configurable: true, }); }); } @@ -130163,7 +136202,12 @@ class AxiosHeaders { const key = utils$1.findKey(self, lHeader); - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { + if ( + !key || + self[key] === undefined || + _rewrite === true || + (_rewrite === undefined && self[key] !== false) + ) { self[key || _header] = normalizeValue(_value); } } @@ -130173,12 +136217,25 @@ class AxiosHeaders { if (utils$1.isPlainObject(header) || header instanceof this.constructor) { setHeaders(header, valueOrRewrite); - } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { setHeaders(parseHeaders(header), valueOrRewrite); - } else if (utils$1.isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); + } else if (utils$1.isObject(header) && utils$1.isIterable(header)) { + let obj = {}, + dest, + key; + for (const entry of header) { + if (!utils$1.isArray(entry)) { + throw TypeError('Object iterator must return a key-value pair'); + } + + obj[(key = entry[0])] = (dest = obj[key]) + ? utils$1.isArray(dest) + ? [...dest, entry[1]] + : [dest, entry[1]] + : entry[1]; } + + setHeaders(obj, valueOrRewrite); } else { header != null && setHeader(valueOrRewrite, header, rewrite); } @@ -130222,7 +136279,11 @@ class AxiosHeaders { if (header) { const key = utils$1.findKey(this, header); - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + return !!( + key && + this[key] !== undefined && + (!matcher || matchHeaderValue(this, this[key], key, matcher)) + ); } return false; @@ -130262,7 +136323,7 @@ class AxiosHeaders { while (i--) { const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { delete this[key]; deleted = true; } @@ -130306,7 +136367,9 @@ class AxiosHeaders { const obj = Object.create(null); utils$1.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); + value != null && + value !== false && + (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); }); return obj; @@ -130317,7 +136380,13 @@ class AxiosHeaders { } toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + return Object.entries(this.toJSON()) + .map(([header, value]) => header + ': ' + value) + .join('\n'); + } + + getSetCookie() { + return this.get('set-cookie') || []; } get [Symbol.toStringTag]() { @@ -130337,9 +136406,12 @@ class AxiosHeaders { } static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); + const internals = + (this[$internals] = + this[$internals] = + { + accessors: {}, + }); const accessors = internals.accessors; const prototype = this.prototype; @@ -130359,17 +136431,24 @@ class AxiosHeaders { } } -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); +AxiosHeaders.accessor([ + 'Content-Type', + 'Content-Length', + 'Accept', + 'Accept-Encoding', + 'User-Agent', + 'Authorization', +]); // reserved names hotfix -utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { +utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` return { get: () => value, set(headerValue) { this[mapped] = headerValue; - } - } + }, + }; }); utils$1.freezeMethods(AxiosHeaders); @@ -130403,24 +136482,24 @@ function isCancel(value) { return !!(value && value.__CANCEL__); } -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); - this.name = 'CanceledError'; +class CanceledError extends AxiosError$1 { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request); + this.name = 'CanceledError'; + this.__CANCEL__ = true; + } } -utils$1.inherits(CanceledError, AxiosError, { - __CANCEL__: true -}); +const CanceledError$1 = CanceledError; /** * Resolve or reject a Promise based on response status. @@ -130436,13 +136515,17 @@ function settle(resolve, reject, response) { if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { - reject(new AxiosError( - 'Request failed with status code ' + response.status, - [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); + reject( + new AxiosError$1( + 'Request failed with status code ' + response.status, + [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][ + Math.floor(response.status / 100) - 4 + ], + response.config, + response.request, + response + ) + ); } } @@ -130457,6 +136540,10 @@ function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. + if (typeof url !== 'string') { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); } @@ -130484,18 +136571,19 @@ function combineURLs(baseURL, relativeURL) { * * @returns {string} The combined full path */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } -const VERSION = "1.7.2"; +const VERSION = "1.13.6"; function parseProtocol(url) { const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; + return (match && match[1]) || ''; } const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; @@ -130511,7 +136599,7 @@ const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; * @returns {Buffer|Blob} */ function fromDataURI(uri, asBlob, options) { - const _Blob = options && options.Blob || platform.classes.Blob; + const _Blob = (options && options.Blob) || platform.classes.Blob; const protocol = parseProtocol(uri); if (asBlob === undefined && _Blob) { @@ -130524,7 +136612,7 @@ function fromDataURI(uri, asBlob, options) { const match = DATA_URL_PATTERN.exec(uri); if (!match) { - throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); + throw new AxiosError$1('Invalid URL', AxiosError$1.ERR_INVALID_URL); } const mime = match[1]; @@ -130534,127 +136622,44 @@ function fromDataURI(uri, asBlob, options) { if (asBlob) { if (!_Blob) { - throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + throw new AxiosError$1('Blob is not supported', AxiosError$1.ERR_NOT_SUPPORT); } - return new _Blob([buffer], {type: mime}); + return new _Blob([buffer], { type: mime }); } return buffer; } - throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); -} - -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - const threshold = 1000 / freq; - let timer = null; - return function throttled() { - const force = this === true; - - const now = Date.now(); - if (force || now - timestamp > threshold) { - if (timer) { - clearTimeout(timer); - timer = null; - } - timestamp = now; - return fn.apply(null, arguments); - } - if (!timer) { - timer = setTimeout(() => { - timer = null; - timestamp = Date.now(); - return fn.apply(null, arguments); - }, threshold - (now - timestamp)); - } - }; -} - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; + throw new AxiosError$1('Unsupported protocol ' + protocol, AxiosError$1.ERR_NOT_SUPPORT); } const kInternals = Symbol('internals'); -class AxiosTransformStream extends stream__default["default"].Transform{ +class AxiosTransformStream extends stream__default["default"].Transform { constructor(options) { - options = utils$1.toFlatObject(options, { - maxRate: 0, - chunkSize: 64 * 1024, - minChunkSize: 100, - timeWindow: 500, - ticksRate: 2, - samplesCount: 15 - }, null, (prop, source) => { - return !utils$1.isUndefined(source[prop]); - }); + options = utils$1.toFlatObject( + options, + { + maxRate: 0, + chunkSize: 64 * 1024, + minChunkSize: 100, + timeWindow: 500, + ticksRate: 2, + samplesCount: 15, + }, + null, + (prop, source) => { + return !utils$1.isUndefined(source[prop]); + } + ); super({ - readableHighWaterMark: options.chunkSize + readableHighWaterMark: options.chunkSize, }); - const self = this; - - const internals = this[kInternals] = { - length: options.length, + const internals = (this[kInternals] = { timeWindow: options.timeWindow, - ticksRate: options.ticksRate, chunkSize: options.chunkSize, maxRate: options.maxRate, minChunkSize: options.minChunkSize, @@ -130663,51 +136668,16 @@ class AxiosTransformStream extends stream__default["default"].Transform{ notifiedBytesLoaded: 0, ts: Date.now(), bytes: 0, - onReadCallback: null - }; - - const _speedometer = speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow); + onReadCallback: null, + }); - this.on('newListener', event => { + this.on('newListener', (event) => { if (event === 'progress') { if (!internals.isCaptured) { internals.isCaptured = true; } } - }); - - let bytesNotified = 0; - - internals.updateProgress = throttle(function throttledHandler() { - const totalBytes = internals.length; - const bytesTransferred = internals.bytesSeen; - const progressBytes = bytesTransferred - bytesNotified; - if (!progressBytes || self.destroyed) return; - - const rate = _speedometer(progressBytes); - - bytesNotified = bytesTransferred; - - process.nextTick(() => { - self.emit('progress', { - loaded: bytesTransferred, - total: totalBytes, - progress: totalBytes ? (bytesTransferred / totalBytes) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && totalBytes && bytesTransferred <= totalBytes ? - (totalBytes - bytesTransferred) / rate : undefined, - lengthComputable: totalBytes != null - }); - }); - }, internals.ticksRate); - - const onFinish = () => { - internals.updateProgress.call(true); - }; - - this.once('end', onFinish); - this.once('error', onFinish); + }); } _read(size) { @@ -130721,7 +136691,6 @@ class AxiosTransformStream extends stream__default["default"].Transform{ } _transform(chunk, encoding, callback) { - const self = this; const internals = this[kInternals]; const maxRate = internals.maxRate; @@ -130730,19 +136699,20 @@ class AxiosTransformStream extends stream__default["default"].Transform{ const timeWindow = internals.timeWindow; const divider = 1000 / timeWindow; - const bytesThreshold = (maxRate / divider); - const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; + const bytesThreshold = maxRate / divider; + const minChunkSize = + internals.minChunkSize !== false + ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) + : 0; - function pushChunk(_chunk, _callback) { + const pushChunk = (_chunk, _callback) => { const bytes = Buffer.byteLength(_chunk); internals.bytesSeen += bytes; internals.bytes += bytes; - if (internals.isCaptured) { - internals.updateProgress(); - } + internals.isCaptured && this.emit('progress', internals.bytesSeen); - if (self.push(_chunk)) { + if (this.push(_chunk)) { process.nextTick(_callback); } else { internals.onReadCallback = () => { @@ -130750,7 +136720,7 @@ class AxiosTransformStream extends stream__default["default"].Transform{ process.nextTick(_callback); }; } - } + }; const transformChunk = (_chunk, _callback) => { const chunkSize = Buffer.byteLength(_chunk); @@ -130762,7 +136732,7 @@ class AxiosTransformStream extends stream__default["default"].Transform{ if (maxRate) { const now = Date.now(); - if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) { + if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { internals.ts = now; bytesLeft = bytesThreshold - internals.bytes; internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; @@ -130785,14 +136755,19 @@ class AxiosTransformStream extends stream__default["default"].Transform{ } } - if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) { + if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) { chunkRemainder = _chunk.subarray(maxChunkSize); _chunk = _chunk.subarray(0, maxChunkSize); } - pushChunk(_chunk, chunkRemainder ? () => { - process.nextTick(_callback, null, chunkRemainder); - } : _callback); + pushChunk( + _chunk, + chunkRemainder + ? () => { + process.nextTick(_callback, null, chunkRemainder); + } + : _callback + ); }; transformChunk(chunk, function transformNextChunk(err, _chunk) { @@ -130807,16 +136782,11 @@ class AxiosTransformStream extends stream__default["default"].Transform{ } }); } - - setLength(length) { - this[kInternals].length = +length; - return this; - } } const AxiosTransformStream$1 = AxiosTransformStream; -const {asyncIterator} = Symbol; +const { asyncIterator } = Symbol; const readBlob = async function* (blob) { if (blob.stream) { @@ -130832,9 +136802,9 @@ const readBlob = async function* (blob) { const readBlob$1 = readBlob; -const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_'; +const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; -const textEncoder = new util.TextEncoder(); +const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder(); const CRLF = '\r\n'; const CRLF_BYTES = textEncoder.encode(CRLF); @@ -130842,7 +136812,7 @@ const CRLF_BYTES_COUNT = 2; class FormDataPart { constructor(name, value) { - const {escapeName} = this.constructor; + const { escapeName } = this.constructor; const isStringValue = utils$1.isString(value); let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${ @@ -130852,7 +136822,7 @@ class FormDataPart { if (isStringValue) { value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); } else { - headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`; + headers += `Content-Type: ${value.type || 'application/octet-stream'}${CRLF}`; } this.headers = textEncoder.encode(headers + CRLF); @@ -130865,12 +136835,12 @@ class FormDataPart { this.value = value; } - async *encode(){ + async *encode() { yield this.headers; - const {value} = this; + const { value } = this; - if(utils$1.isTypedArray(value)) { + if (utils$1.isTypedArray(value)) { yield value; } else { yield* readBlob$1(value); @@ -130880,11 +136850,15 @@ class FormDataPart { } static escapeName(name) { - return String(name).replace(/[\r\n"]/g, (match) => ({ - '\r' : '%0D', - '\n' : '%0A', - '"' : '%22', - }[match])); + return String(name).replace( + /[\r\n"]/g, + (match) => + ({ + '\r': '%0D', + '\n': '%0A', + '"': '%22', + })[match] + ); } } @@ -130892,19 +136866,19 @@ const formDataToStream = (form, headersHandler, options) => { const { tag = 'form-data-boundary', size = 25, - boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET) + boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET), } = options || {}; - if(!utils$1.isFormData(form)) { + if (!utils$1.isFormData(form)) { throw TypeError('FormData instance required'); } if (boundary.length < 1 || boundary.length > 70) { - throw Error('boundary must be 10-70 characters long') + throw Error('boundary must be 10-70 characters long'); } const boundaryBytes = textEncoder.encode('--' + boundary + CRLF); - const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF); + const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF); let contentLength = footerBytes.byteLength; const parts = Array.from(form.entries()).map(([name, value]) => { @@ -130918,7 +136892,7 @@ const formDataToStream = (form, headersHandler, options) => { contentLength = utils$1.toFiniteNumber(contentLength); const computedHeaders = { - 'Content-Type': `multipart/form-data; boundary=${boundary}` + 'Content-Type': `multipart/form-data; boundary=${boundary}`, }; if (Number.isFinite(contentLength)) { @@ -130927,14 +136901,16 @@ const formDataToStream = (form, headersHandler, options) => { headersHandler && headersHandler(computedHeaders); - return stream.Readable.from((async function *() { - for(const part of parts) { - yield boundaryBytes; - yield* part.encode(); - } + return stream.Readable.from( + (async function* () { + for (const part of parts) { + yield boundaryBytes; + yield* part.encode(); + } - yield footerBytes; - })()); + yield footerBytes; + })() + ); }; const formDataToStream$1 = formDataToStream; @@ -130950,10 +136926,11 @@ class ZlibHeaderTransformStream extends stream__default["default"].Transform { this._transform = this.__transform; // Add Default Compression headers if no zlib headers are present - if (chunk[0] !== 120) { // Hex: 78 + if (chunk[0] !== 120) { + // Hex: 78 const header = Buffer.alloc(2); header[0] = 120; // Hex: 78 - header[1] = 156; // Hex: 9C + header[1] = 156; // Hex: 9C this.push(header, encoding); } } @@ -130965,40 +136942,367 @@ class ZlibHeaderTransformStream extends stream__default["default"].Transform { const ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream; const callbackify = (fn, reducer) => { - return utils$1.isAsyncFn(fn) ? function (...args) { - const cb = args.pop(); - fn.apply(this, args).then((value) => { - try { - reducer ? cb(null, ...reducer(value)) : cb(null, value); - } catch (err) { - cb(err); + return utils$1.isAsyncFn(fn) + ? function (...args) { + const cb = args.pop(); + fn.apply(this, args).then((value) => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); } - }, cb); - } : fn; + : fn; }; const callbackify$1 = callbackify; +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round((bytesCount * 1000) / passed) : undefined; + }; +} + +/** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Function} + */ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }; + + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + + const flush = () => lastArgs && invoke(lastArgs); + + return [throttled, flush]; +} + +const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + + return throttle((e) => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + + bytesNotified = loaded; + + const data = { + loaded, + total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total && inRange ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true, + }; + + listener(data); + }, freq); +}; + +const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + + return [ + (loaded) => + throttled[0]({ + lengthComputable, + total, + loaded, + }), + throttled[1], + ]; +}; + +const asyncDecorator = + (fn) => + (...args) => + utils$1.asap(() => fn(...args)); + +/** + * Estimate decoded byte length of a data:// URL *without* allocating large buffers. + * - For base64: compute exact decoded size using length and padding; + * handle %XX at the character-count level (no string allocation). + * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound. + * + * @param {string} url + * @returns {number} + */ +function estimateDataURLDecodedBytes(url) { + if (!url || typeof url !== 'string') return 0; + if (!url.startsWith('data:')) return 0; + + const comma = url.indexOf(','); + if (comma < 0) return 0; + + const meta = url.slice(5, comma); + const body = url.slice(comma + 1); + const isBase64 = /;base64/i.test(meta); + + if (isBase64) { + let effectiveLen = body.length; + const len = body.length; // cache length + + for (let i = 0; i < len; i++) { + if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) { + const a = body.charCodeAt(i + 1); + const b = body.charCodeAt(i + 2); + const isHex = + ((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) && + ((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102)); + + if (isHex) { + effectiveLen -= 2; + i += 2; + } + } + } + + let pad = 0; + let idx = len - 1; + + const tailIsPct3D = (j) => + j >= 2 && + body.charCodeAt(j - 2) === 37 && // '%' + body.charCodeAt(j - 1) === 51 && // '3' + (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd' + + if (idx >= 0) { + if (body.charCodeAt(idx) === 61 /* '=' */) { + pad++; + idx--; + } else if (tailIsPct3D(idx)) { + pad++; + idx -= 3; + } + } + + if (pad === 1 && idx >= 0) { + if (body.charCodeAt(idx) === 61 /* '=' */) { + pad++; + } else if (tailIsPct3D(idx)) { + pad++; + } + } + + const groups = Math.floor(effectiveLen / 4); + const bytes = groups * 3 - (pad || 0); + return bytes > 0 ? bytes : 0; + } + + return Buffer.byteLength(body, 'utf8'); +} + const zlibOptions = { flush: zlib__default["default"].constants.Z_SYNC_FLUSH, - finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH + finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH, }; const brotliOptions = { flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH + finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH, }; const isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress); -const {http: httpFollow, https: httpsFollow} = followRedirects__default["default"]; +const { http: httpFollow, https: httpsFollow } = followRedirects__default["default"]; const isHttps = /https:?/; -const supportedProtocols = platform.protocols.map(protocol => { +const supportedProtocols = platform.protocols.map((protocol) => { return protocol + ':'; }); +const flushOnFinish = (stream, [throttled, flush]) => { + stream.on('end', flush).on('error', flush); + + return throttled; +}; + +class Http2Sessions { + constructor() { + this.sessions = Object.create(null); + } + + getSession(authority, options) { + options = Object.assign( + { + sessionTimeout: 1000, + }, + options + ); + + let authoritySessions = this.sessions[authority]; + + if (authoritySessions) { + let len = authoritySessions.length; + + for (let i = 0; i < len; i++) { + const [sessionHandle, sessionOptions] = authoritySessions[i]; + if ( + !sessionHandle.destroyed && + !sessionHandle.closed && + util__default["default"].isDeepStrictEqual(sessionOptions, options) + ) { + return sessionHandle; + } + } + } + + const session = http2__default["default"].connect(authority, options); + + let removed; + + const removeSession = () => { + if (removed) { + return; + } + + removed = true; + + let entries = authoritySessions, + len = entries.length, + i = len; + + while (i--) { + if (entries[i][0] === session) { + if (len === 1) { + delete this.sessions[authority]; + } else { + entries.splice(i, 1); + } + return; + } + } + }; + + const originalRequestFn = session.request; + + const { sessionTimeout } = options; + + if (sessionTimeout != null) { + let timer; + let streamsCount = 0; + + session.request = function () { + const stream = originalRequestFn.apply(this, arguments); + + streamsCount++; + + if (timer) { + clearTimeout(timer); + timer = null; + } + + stream.once('close', () => { + if (!--streamsCount) { + timer = setTimeout(() => { + timer = null; + removeSession(); + }, sessionTimeout); + } + }); + + return stream; + }; + } + + session.once('close', removeSession); + + let entry = [session, options]; + + authoritySessions + ? authoritySessions.push(entry) + : (authoritySessions = this.sessions[authority] = [entry]); + + return session; + } +} + +const http2Sessions = new Http2Sessions(); + /** * If the proxy or config beforeRedirects functions are defined, call them with the options * object. @@ -131028,7 +137332,7 @@ function dispatchBeforeRedirect(options, responseDetails) { function setProxy(options, configProxy, location) { let proxy = configProxy; if (!proxy && proxy !== false) { - const proxyUrl = proxyFromEnv.getProxyForUrl(location); + const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location); if (proxyUrl) { proxy = new URL(proxyUrl); } @@ -131041,12 +137345,16 @@ function setProxy(options, configProxy, location) { if (proxy.auth) { // Support proxy auth object form - if (proxy.auth.username || proxy.auth.password) { + const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password); + + if (validProxyAuth) { proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || ''); + } else if (typeof proxy.auth === 'object') { + throw new AxiosError$1('Invalid proxy authorization', AxiosError$1.ERR_BAD_OPTION, { proxy }); } - const base64 = Buffer - .from(proxy.auth, 'utf8') - .toString('base64'); + + const base64 = Buffer.from(proxy.auth, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; } @@ -131069,7 +137377,8 @@ function setProxy(options, configProxy, location) { }; } -const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process'; +const isHttpAdapterSupported = + typeof process !== 'undefined' && utils$1.kindOf(process) === 'process'; // temporary hotfix @@ -131095,678 +137404,753 @@ const wrapAsync = (asyncExecutor) => { }; asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject); - }) + }); }; -const resolveFamily = ({address, family}) => { +const resolveFamily = ({ address, family }) => { if (!utils$1.isString(address)) { throw TypeError('address must be a string'); } - return ({ + return { address, - family: family || (address.indexOf('.') < 0 ? 6 : 4) - }); + family: family || (address.indexOf('.') < 0 ? 6 : 4), + }; }; -const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family}); - -/*eslint consistent-return:0*/ -const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) { - return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let {data, lookup, family} = config; - const {responseType, responseEncoding} = config; - const method = config.method.toUpperCase(); - let isDone; - let rejected = false; - let req; - - if (lookup) { - const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]); - // hotfix to support opt.all option which is required for node 20.x - lookup = (hostname, opt, cb) => { - _lookup(hostname, opt, (err, arg0, arg1) => { - if (err) { - return cb(err); - } - - const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; +const buildAddressEntry = (address, family) => + resolveFamily(utils$1.isObject(address) ? address : { address, family }); - opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); - }); - }; - } +const http2Transport = { + request(options, cb) { + const authority = + options.protocol + + '//' + + options.hostname + + ':' + + (options.port || (options.protocol === 'https:' ? 443 : 80)); - // temporary internal emitter until the AxiosRequest class will be implemented - const emitter = new events.EventEmitter(); + const { http2Options, headers } = options; - const onFinished = () => { - if (config.cancelToken) { - config.cancelToken.unsubscribe(abort); - } + const session = http2Sessions.getSession(authority, http2Options); - if (config.signal) { - config.signal.removeEventListener('abort', abort); - } + const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = + http2__default["default"].constants; - emitter.removeAllListeners(); + const http2Headers = { + [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''), + [HTTP2_HEADER_METHOD]: options.method, + [HTTP2_HEADER_PATH]: options.path, }; - onDone((value, isRejected) => { - isDone = true; - if (isRejected) { - rejected = true; - onFinished(); - } + utils$1.forEach(headers, (header, name) => { + name.charAt(0) !== ':' && (http2Headers[name] = header); }); - function abort(reason) { - emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason); - } + const req = session.request(http2Headers); - emitter.once('abort', reject); + req.once('response', (responseHeaders) => { + const response = req; //duplex - if (config.cancelToken || config.signal) { - config.cancelToken && config.cancelToken.subscribe(abort); - if (config.signal) { - config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); - } - } + responseHeaders = Object.assign({}, responseHeaders); - // Parse url - const fullPath = buildFullPath(config.baseURL, config.url); - const parsed = new URL(fullPath, 'http://localhost'); - const protocol = parsed.protocol || supportedProtocols[0]; + const status = responseHeaders[HTTP2_HEADER_STATUS]; - if (protocol === 'data:') { - let convertedData; + delete responseHeaders[HTTP2_HEADER_STATUS]; - if (method !== 'GET') { - return settle(resolve, reject, { - status: 405, - statusText: 'method not allowed', - headers: {}, - config - }); - } + response.headers = responseHeaders; - try { - convertedData = fromDataURI(config.url, responseType === 'blob', { - Blob: config.env && config.env.Blob - }); - } catch (err) { - throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config); - } + response.statusCode = +status; - if (responseType === 'text') { - convertedData = convertedData.toString(responseEncoding); + cb(response); + }); - if (!responseEncoding || responseEncoding === 'utf8') { - convertedData = utils$1.stripBOM(convertedData); - } - } else if (responseType === 'stream') { - convertedData = stream__default["default"].Readable.from(convertedData); - } + return req; + }, +}; - return settle(resolve, reject, { - data: convertedData, - status: 200, - statusText: 'OK', - headers: new AxiosHeaders$1(), - config - }); - } +/*eslint consistent-return:0*/ +const httpAdapter = isHttpAdapterSupported && + function httpAdapter(config) { + return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { + let { data, lookup, family, httpVersion = 1, http2Options } = config; + const { responseType, responseEncoding } = config; + const method = config.method.toUpperCase(); + let isDone; + let rejected = false; + let req; - if (supportedProtocols.indexOf(protocol) === -1) { - return reject(new AxiosError( - 'Unsupported protocol ' + protocol, - AxiosError.ERR_BAD_REQUEST, - config - )); - } + httpVersion = +httpVersion; + + if (Number.isNaN(httpVersion)) { + throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`); + } - const headers = AxiosHeaders$1.from(config.headers).normalize(); + if (httpVersion !== 1 && httpVersion !== 2) { + throw TypeError(`Unsupported protocol version '${httpVersion}'`); + } - // Set User-Agent (required by some servers) - // See https://github.com/axios/axios/issues/69 - // User-Agent is specified; handle case where no UA header is desired - // Only set header if it hasn't been set in config - headers.set('User-Agent', 'axios/' + VERSION, false); + const isHttp2 = httpVersion === 2; - const onDownloadProgress = config.onDownloadProgress; - const onUploadProgress = config.onUploadProgress; - const maxRate = config.maxRate; - let maxUploadRate = undefined; - let maxDownloadRate = undefined; + if (lookup) { + const _lookup = callbackify$1(lookup, (value) => (utils$1.isArray(value) ? value : [value])); + // hotfix to support opt.all option which is required for node 20.x + lookup = (hostname, opt, cb) => { + _lookup(hostname, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } - // support for spec compliant FormData objects - if (utils$1.isSpecCompliantForm(data)) { - const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); + const addresses = utils$1.isArray(arg0) + ? arg0.map((addr) => buildAddressEntry(addr)) + : [buildAddressEntry(arg0, arg1)]; - data = formDataToStream$1(data, (formHeaders) => { - headers.set(formHeaders); - }, { - tag: `axios-${VERSION}-boundary`, - boundary: userBoundary && userBoundary[1] || undefined - }); - // support for https://www.npmjs.com/package/form-data api - } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) { - headers.set(data.getHeaders()); + opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); + }); + }; + } - if (!headers.hasContentLength()) { + const abortEmitter = new events.EventEmitter(); + + function abort(reason) { try { - const knownLength = await util__default["default"].promisify(data.getLength).call(data); - Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); - /*eslint no-empty:0*/ - } catch (e) { + abortEmitter.emit( + 'abort', + !reason || reason.type ? new CanceledError$1(null, config, req) : reason + ); + } catch (err) { + console.warn('emit error', err); } } - } else if (utils$1.isBlob(data)) { - data.size && headers.setContentType(data.type || 'application/octet-stream'); - headers.setContentLength(data.size || 0); - data = stream__default["default"].Readable.from(readBlob$1(data)); - } else if (data && !utils$1.isStream(data)) { - if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils$1.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(new AxiosError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - // Add Content-Length header if data exists - headers.setContentLength(data.length, false); + abortEmitter.once('abort', reject); - if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { - return reject(new AxiosError( - 'Request body larger than maxBodyLength limit', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - } + const onFinished = () => { + if (config.cancelToken) { + config.cancelToken.unsubscribe(abort); + } - const contentLength = utils$1.toFiniteNumber(headers.getContentLength()); + if (config.signal) { + config.signal.removeEventListener('abort', abort); + } - if (utils$1.isArray(maxRate)) { - maxUploadRate = maxRate[0]; - maxDownloadRate = maxRate[1]; - } else { - maxUploadRate = maxDownloadRate = maxRate; - } + abortEmitter.removeAllListeners(); + }; - if (data && (onUploadProgress || maxUploadRate)) { - if (!utils$1.isStream(data)) { - data = stream__default["default"].Readable.from(data, {objectMode: false}); + if (config.cancelToken || config.signal) { + config.cancelToken && config.cancelToken.subscribe(abort); + if (config.signal) { + config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); + } } - data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({ - length: contentLength, - maxRate: utils$1.toFiniteNumber(maxUploadRate) - })], utils$1.noop); + onDone((response, isRejected) => { + isDone = true; - onUploadProgress && data.on('progress', progress => { - onUploadProgress(Object.assign(progress, { - upload: true - })); - }); - } + if (isRejected) { + rejected = true; + onFinished(); + return; + } - // HTTP basic authentication - let auth = undefined; - if (config.auth) { - const username = config.auth.username || ''; - const password = config.auth.password || ''; - auth = username + ':' + password; - } + const { data } = response; - if (!auth && parsed.username) { - const urlUsername = parsed.username; - const urlPassword = parsed.password; - auth = urlUsername + ':' + urlPassword; - } + if (data instanceof stream__default["default"].Readable || data instanceof stream__default["default"].Duplex) { + const offListeners = stream__default["default"].finished(data, () => { + offListeners(); + onFinished(); + }); + } else { + onFinished(); + } + }); - auth && headers.delete('authorization'); + // Parse url + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); + const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined); + const protocol = parsed.protocol || supportedProtocols[0]; + + if (protocol === 'data:') { + // Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set. + if (config.maxContentLength > -1) { + // Use the exact string passed to fromDataURI (config.url); fall back to fullPath if needed. + const dataUrl = String(config.url || fullPath || ''); + const estimated = estimateDataURLDecodedBytes(dataUrl); + + if (estimated > config.maxContentLength) { + return reject( + new AxiosError$1( + 'maxContentLength size of ' + config.maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config + ) + ); + } + } - let path; + let convertedData; - try { - path = buildURL( - parsed.pathname + parsed.search, - config.params, - config.paramsSerializer - ).replace(/^\?/, ''); - } catch (err) { - const customErr = new Error(err.message); - customErr.config = config; - customErr.url = config.url; - customErr.exists = true; - return reject(customErr); - } + if (method !== 'GET') { + return settle(resolve, reject, { + status: 405, + statusText: 'method not allowed', + headers: {}, + config, + }); + } - headers.set( - 'Accept-Encoding', - 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false - ); + try { + convertedData = fromDataURI(config.url, responseType === 'blob', { + Blob: config.env && config.env.Blob, + }); + } catch (err) { + throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config); + } - const options = { - path, - method: method, - headers: headers.toJSON(), - agents: { http: config.httpAgent, https: config.httpsAgent }, - auth, - protocol, - family, - beforeRedirect: dispatchBeforeRedirect, - beforeRedirects: {} - }; + if (responseType === 'text') { + convertedData = convertedData.toString(responseEncoding); - // cacheable-lookup integration hotfix - !utils$1.isUndefined(lookup) && (options.lookup = lookup); + if (!responseEncoding || responseEncoding === 'utf8') { + convertedData = utils$1.stripBOM(convertedData); + } + } else if (responseType === 'stream') { + convertedData = stream__default["default"].Readable.from(convertedData); + } - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname; - options.port = parsed.port; - setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); - } - - let transport; - const isHttpsRequest = isHttps.test(options.protocol); - options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsRequest ? https__default["default"] : http__default["default"]; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; + return settle(resolve, reject, { + data: convertedData, + status: 200, + statusText: 'OK', + headers: new AxiosHeaders$1(), + config, + }); } - if (config.beforeRedirect) { - options.beforeRedirects.config = config.beforeRedirect; + + if (supportedProtocols.indexOf(protocol) === -1) { + return reject( + new AxiosError$1('Unsupported protocol ' + protocol, AxiosError$1.ERR_BAD_REQUEST, config) + ); } - transport = isHttpsRequest ? httpsFollow : httpFollow; - } - if (config.maxBodyLength > -1) { - options.maxBodyLength = config.maxBodyLength; - } else { - // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited - options.maxBodyLength = Infinity; - } + const headers = AxiosHeaders$1.from(config.headers).normalize(); - if (config.insecureHTTPParser) { - options.insecureHTTPParser = config.insecureHTTPParser; - } + // Set User-Agent (required by some servers) + // See https://github.com/axios/axios/issues/69 + // User-Agent is specified; handle case where no UA header is desired + // Only set header if it hasn't been set in config + headers.set('User-Agent', 'axios/' + VERSION, false); - // Create the request - req = transport.request(options, function handleResponse(res) { - if (req.destroyed) return; + const { onUploadProgress, onDownloadProgress } = config; + const maxRate = config.maxRate; + let maxUploadRate = undefined; + let maxDownloadRate = undefined; - const streams = [res]; + // support for spec compliant FormData objects + if (utils$1.isSpecCompliantForm(data)) { + const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); - const responseLength = +res.headers['content-length']; + data = formDataToStream$1( + data, + (formHeaders) => { + headers.set(formHeaders); + }, + { + tag: `axios-${VERSION}-boundary`, + boundary: (userBoundary && userBoundary[1]) || undefined, + } + ); + // support for https://www.npmjs.com/package/form-data api + } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) { + headers.set(data.getHeaders()); - if (onDownloadProgress) { - const transformStream = new AxiosTransformStream$1({ - length: utils$1.toFiniteNumber(responseLength), - maxRate: utils$1.toFiniteNumber(maxDownloadRate) - }); + if (!headers.hasContentLength()) { + try { + const knownLength = await util__default["default"].promisify(data.getLength).call(data); + Number.isFinite(knownLength) && + knownLength >= 0 && + headers.setContentLength(knownLength); + /*eslint no-empty:0*/ + } catch (e) {} + } + } else if (utils$1.isBlob(data) || utils$1.isFile(data)) { + data.size && headers.setContentType(data.type || 'application/octet-stream'); + headers.setContentLength(data.size || 0); + data = stream__default["default"].Readable.from(readBlob$1(data)); + } else if (data && !utils$1.isStream(data)) { + if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils$1.isString(data)) { + data = Buffer.from(data, 'utf-8'); + } else { + return reject( + new AxiosError$1( + 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', + AxiosError$1.ERR_BAD_REQUEST, + config + ) + ); + } - onDownloadProgress && transformStream.on('progress', progress => { - onDownloadProgress(Object.assign(progress, { - download: true - })); - }); + // Add Content-Length header if data exists + headers.setContentLength(data.length, false); - streams.push(transformStream); + if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { + return reject( + new AxiosError$1( + 'Request body larger than maxBodyLength limit', + AxiosError$1.ERR_BAD_REQUEST, + config + ) + ); + } } - // decompress the response body transparently if required - let responseStream = res; + const contentLength = utils$1.toFiniteNumber(headers.getContentLength()); - // return the last request in case of redirects - const lastRequest = res.req || req; + if (utils$1.isArray(maxRate)) { + maxUploadRate = maxRate[0]; + maxDownloadRate = maxRate[1]; + } else { + maxUploadRate = maxDownloadRate = maxRate; + } - // if decompress disabled we should not decompress - if (config.decompress !== false && res.headers['content-encoding']) { - // if no content, but headers still say that it is encoded, - // remove the header not confuse downstream operations - if (method === 'HEAD' || res.statusCode === 204) { - delete res.headers['content-encoding']; + if (data && (onUploadProgress || maxUploadRate)) { + if (!utils$1.isStream(data)) { + data = stream__default["default"].Readable.from(data, { objectMode: false }); } - switch ((res.headers['content-encoding'] || '').toLowerCase()) { - /*eslint default-case:0*/ - case 'gzip': - case 'x-gzip': - case 'compress': - case 'x-compress': - // add the unzipper to the body stream processing pipeline - streams.push(zlib__default["default"].createUnzip(zlibOptions)); + data = stream__default["default"].pipeline( + [ + data, + new AxiosTransformStream$1({ + maxRate: utils$1.toFiniteNumber(maxUploadRate), + }), + ], + utils$1.noop + ); - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'deflate': - streams.push(new ZlibHeaderTransformStream$1()); + onUploadProgress && + data.on( + 'progress', + flushOnFinish( + data, + progressEventDecorator( + contentLength, + progressEventReducer(asyncDecorator(onUploadProgress), false, 3) + ) + ) + ); + } - // add the unzipper to the body stream processing pipeline - streams.push(zlib__default["default"].createUnzip(zlibOptions)); + // HTTP basic authentication + let auth = undefined; + if (config.auth) { + const username = config.auth.username || ''; + const password = config.auth.password || ''; + auth = username + ':' + password; + } - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'br': - if (isBrotliSupported) { - streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions)); - delete res.headers['content-encoding']; - } - } + if (!auth && parsed.username) { + const urlUsername = parsed.username; + const urlPassword = parsed.password; + auth = urlUsername + ':' + urlPassword; } - responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0]; + auth && headers.delete('authorization'); - const offListeners = stream__default["default"].finished(responseStream, () => { - offListeners(); - onFinished(); - }); + let path; - const response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: new AxiosHeaders$1(res.headers), - config, - request: lastRequest + try { + path = buildURL( + parsed.pathname + parsed.search, + config.params, + config.paramsSerializer + ).replace(/^\?/, ''); + } catch (err) { + const customErr = new Error(err.message); + customErr.config = config; + customErr.url = config.url; + customErr.exists = true; + return reject(customErr); + } + + headers.set( + 'Accept-Encoding', + 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), + false + ); + + const options = { + path, + method: method, + headers: headers.toJSON(), + agents: { http: config.httpAgent, https: config.httpsAgent }, + auth, + protocol, + family, + beforeRedirect: dispatchBeforeRedirect, + beforeRedirects: {}, + http2Options, }; - if (responseType === 'stream') { - response.data = responseStream; - settle(resolve, reject, response); + // cacheable-lookup integration hotfix + !utils$1.isUndefined(lookup) && (options.lookup = lookup); + + if (config.socketPath) { + options.socketPath = config.socketPath; } else { - const responseBuffer = []; - let totalResponseBytes = 0; + options.hostname = parsed.hostname.startsWith('[') + ? parsed.hostname.slice(1, -1) + : parsed.hostname; + options.port = parsed.port; + setProxy( + options, + config.proxy, + protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path + ); + } - responseStream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - totalResponseBytes += chunk.length; + let transport; + const isHttpsRequest = isHttps.test(options.protocol); + options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { - // stream.destroy() emit aborted event before calling reject() on Node.js v16 - rejected = true; - responseStream.destroy(); - reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); + if (isHttp2) { + transport = http2Transport; + } else { + if (config.transport) { + transport = config.transport; + } else if (config.maxRedirects === 0) { + transport = isHttpsRequest ? https__default["default"] : http__default["default"]; + } else { + if (config.maxRedirects) { + options.maxRedirects = config.maxRedirects; } - }); - - responseStream.on('aborted', function handlerStreamAborted() { - if (rejected) { - return; + if (config.beforeRedirect) { + options.beforeRedirects.config = config.beforeRedirect; } + transport = isHttpsRequest ? httpsFollow : httpFollow; + } + } - const err = new AxiosError( - 'maxContentLength size of ' + config.maxContentLength + ' exceeded', - AxiosError.ERR_BAD_RESPONSE, - config, - lastRequest - ); - responseStream.destroy(err); - reject(err); - }); - - responseStream.on('error', function handleStreamError(err) { - if (req.destroyed) return; - reject(AxiosError.from(err, null, config, lastRequest)); - }); - - responseStream.on('end', function handleStreamEnd() { - try { - let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); - if (responseType !== 'arraybuffer') { - responseData = responseData.toString(responseEncoding); - if (!responseEncoding || responseEncoding === 'utf8') { - responseData = utils$1.stripBOM(responseData); - } - } - response.data = responseData; - } catch (err) { - return reject(AxiosError.from(err, null, config, response.request, response)); - } - settle(resolve, reject, response); - }); + if (config.maxBodyLength > -1) { + options.maxBodyLength = config.maxBodyLength; + } else { + // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited + options.maxBodyLength = Infinity; } - emitter.once('abort', err => { - if (!responseStream.destroyed) { - responseStream.emit('error', err); - responseStream.destroy(); - } - }); - }); + if (config.insecureHTTPParser) { + options.insecureHTTPParser = config.insecureHTTPParser; + } - emitter.once('abort', err => { - reject(err); - req.destroy(err); - }); + // Create the request + req = transport.request(options, function handleResponse(res) { + if (req.destroyed) return; - // Handle errors - req.on('error', function handleRequestError(err) { - // @todo remove - // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return; - reject(AxiosError.from(err, null, config, req)); - }); + const streams = [res]; - // set tcp keep alive to prevent drop connection by peer - req.on('socket', function handleRequestSocket(socket) { - // default interval of sending ack packet is 1 minute - socket.setKeepAlive(true, 1000 * 60); - }); + const responseLength = utils$1.toFiniteNumber(res.headers['content-length']); - // Handle request timeout - if (config.timeout) { - // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. - const timeout = parseInt(config.timeout, 10); + if (onDownloadProgress || maxDownloadRate) { + const transformStream = new AxiosTransformStream$1({ + maxRate: utils$1.toFiniteNumber(maxDownloadRate), + }); - if (Number.isNaN(timeout)) { - reject(new AxiosError( - 'error trying to parse `config.timeout` to int', - AxiosError.ERR_BAD_OPTION_VALUE, - config, - req - )); + onDownloadProgress && + transformStream.on( + 'progress', + flushOnFinish( + transformStream, + progressEventDecorator( + responseLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true, 3) + ) + ) + ); - return; - } + streams.push(transformStream); + } - // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. - // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. - // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. - // And then these socket which be hang up will devouring CPU little by little. - // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. - req.setTimeout(timeout, function handleRequestTimeout() { - if (isDone) return; - let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = config.transitional || transitionalDefaults; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config, - req - )); - abort(); - }); - } + // decompress the response body transparently if required + let responseStream = res; + // return the last request in case of redirects + const lastRequest = res.req || req; - // Send the request - if (utils$1.isStream(data)) { - let ended = false; - let errored = false; + // if decompress disabled we should not decompress + if (config.decompress !== false && res.headers['content-encoding']) { + // if no content, but headers still say that it is encoded, + // remove the header not confuse downstream operations + if (method === 'HEAD' || res.statusCode === 204) { + delete res.headers['content-encoding']; + } - data.on('end', () => { - ended = true; - }); + switch ((res.headers['content-encoding'] || '').toLowerCase()) { + /*eslint default-case:0*/ + case 'gzip': + case 'x-gzip': + case 'compress': + case 'x-compress': + // add the unzipper to the body stream processing pipeline + streams.push(zlib__default["default"].createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'deflate': + streams.push(new ZlibHeaderTransformStream$1()); - data.once('error', err => { - errored = true; - req.destroy(err); - }); + // add the unzipper to the body stream processing pipeline + streams.push(zlib__default["default"].createUnzip(zlibOptions)); - data.on('close', () => { - if (!ended && !errored) { - abort(new CanceledError('Request stream has been aborted', config, req)); + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'br': + if (isBrotliSupported) { + streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions)); + delete res.headers['content-encoding']; + } + } } - }); - data.pipe(req); - } else { - req.end(data); - } - }); -}; + responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0]; -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = speedometer(50, 250); + const response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: new AxiosHeaders$1(res.headers), + config, + request: lastRequest, + }; - return throttle(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; + if (responseType === 'stream') { + response.data = responseStream; + settle(resolve, reject, response); + } else { + const responseBuffer = []; + let totalResponseBytes = 0; + + responseStream.on('data', function handleStreamData(chunk) { + responseBuffer.push(chunk); + totalResponseBytes += chunk.length; + + // make sure the content length is not over the maxContentLength if specified + if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { + // stream.destroy() emit aborted event before calling reject() on Node.js v16 + rejected = true; + responseStream.destroy(); + abort( + new AxiosError$1( + 'maxContentLength size of ' + config.maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config, + lastRequest + ) + ); + } + }); - bytesNotified = loaded; + responseStream.on('aborted', function handlerStreamAborted() { + if (rejected) { + return; + } - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null - }; + const err = new AxiosError$1( + 'stream has been aborted', + AxiosError$1.ERR_BAD_RESPONSE, + config, + lastRequest + ); + responseStream.destroy(err); + reject(err); + }); - data[isDownloadStream ? 'download' : 'upload'] = true; + responseStream.on('error', function handleStreamError(err) { + if (req.destroyed) return; + reject(AxiosError$1.from(err, null, config, lastRequest)); + }); - listener(data); - }, freq); -}; + responseStream.on('end', function handleStreamEnd() { + try { + let responseData = + responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); + if (responseType !== 'arraybuffer') { + responseData = responseData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === 'utf8') { + responseData = utils$1.stripBOM(responseData); + } + } + response.data = responseData; + } catch (err) { + return reject(AxiosError$1.from(err, null, config, response.request, response)); + } + settle(resolve, reject, response); + }); + } -const isURLSameOrigin = platform.hasStandardBrowserEnv ? + abortEmitter.once('abort', (err) => { + if (!responseStream.destroyed) { + responseStream.emit('error', err); + responseStream.destroy(); + } + }); + }); -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = /(msie|trident)/i.test(navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; + abortEmitter.once('abort', (err) => { + if (req.close) { + req.close(); + } else { + req.destroy(err); + } + }); - /** - * Parse a URL to discover its components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; + // Handle errors + req.on('error', function handleRequestError(err) { + reject(AxiosError$1.from(err, null, config, req)); + }); - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } + // set tcp keep alive to prevent drop connection by peer + req.on('socket', function handleRequestSocket(socket) { + // default interval of sending ack packet is 1 minute + socket.setKeepAlive(true, 1000 * 60); + }); - urlParsingNode.setAttribute('href', href); + // Handle request timeout + if (config.timeout) { + // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. + const timeout = parseInt(config.timeout, 10); + + if (Number.isNaN(timeout)) { + abort( + new AxiosError$1( + 'error trying to parse `config.timeout` to int', + AxiosError$1.ERR_BAD_OPTION_VALUE, + config, + req + ) + ); - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } + return; + } - originURL = resolveURL(window.location.href); + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. + // And then these socket which be hang up will devouring CPU little by little. + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. + req.setTimeout(timeout, function handleRequestTimeout() { + if (isDone) return; + let timeoutErrorMessage = config.timeout + ? 'timeout of ' + config.timeout + 'ms exceeded' + : 'timeout exceeded'; + const transitional = config.transitional || transitionalDefaults; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + abort( + new AxiosError$1( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, + config, + req + ) + ); + }); + } else { + // explicitly reset the socket timeout value for a possible `keep-alive` request + req.setTimeout(0); + } - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : + // Send the request + if (utils$1.isStream(data)) { + let ended = false; + let errored = false; - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })(); + data.on('end', () => { + ended = true; + }); -const cookies = platform.hasStandardBrowserEnv ? + data.once('error', (err) => { + errored = true; + req.destroy(err); + }); - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; + data.on('close', () => { + if (!ended && !errored) { + abort(new CanceledError$1('Request stream has been aborted', config, req)); + } + }); - utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); + data.pipe(req); + } else { + data && req.write(data); + req.end(); + } + }); + }; - utils$1.isString(path) && cookie.push('path=' + path); +const isURLSameOrigin = platform.hasStandardBrowserEnv + ? ((origin, isMSIE) => (url) => { + url = new URL(url, platform.origin); - utils$1.isString(domain) && cookie.push('domain=' + domain); + return ( + origin.protocol === url.protocol && + origin.host === url.host && + (isMSIE || origin.port === url.port) + ); + })( + new URL(platform.origin), + platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent) + ) + : () => true; - secure === true && cookie.push('secure'); +const cookies = platform.hasStandardBrowserEnv + ? // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === 'undefined') return; - document.cookie = cookie.join('; '); - }, + const cookie = [`${name}=${encodeURIComponent(value)}`]; - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, + if (utils$1.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils$1.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils$1.isString(domain)) { + cookie.push(`domain=${domain}`); + } + if (secure === true) { + cookie.push('secure'); + } + if (utils$1.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } + document.cookie = cookie.join('; '); + }, - : + read(name) { + if (typeof document === 'undefined') return null; + const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)')); + return match ? decodeURIComponent(match[1]) : null; + }, - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }; + remove(name) { + this.write(name, '', Date.now() - 86400000, '/'); + }, + } + : // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + remove() {}, + }; -const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing; +const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing); /** * Config-specific merge-function which creates a new config-object @@ -131782,9 +138166,9 @@ function mergeConfig(config1, config2) { config2 = config2 || {}; const config = {}; - function getMergedValue(target, source, caseless) { + function getMergedValue(target, source, prop, caseless) { if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { - return utils$1.merge.call({caseless}, target, source); + return utils$1.merge.call({ caseless }, target, source); } else if (utils$1.isPlainObject(source)) { return utils$1.merge({}, source); } else if (utils$1.isArray(source)) { @@ -131793,12 +138177,11 @@ function mergeConfig(config1, config2) { return source; } - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, caseless) { + function mergeDeepProperties(a, b, prop, caseless) { if (!utils$1.isUndefined(b)) { - return getMergedValue(a, b, caseless); + return getMergedValue(a, b, prop, caseless); } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a, caseless); + return getMergedValue(undefined, a, prop, caseless); } } @@ -131856,11 +138239,13 @@ function mergeConfig(config1, config2) { socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + headers: (a, b, prop) => + mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true), }; - utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; + utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) { + if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return; + const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; const configValue = merge(config1[prop], config2[prop], prop); (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); }); @@ -131871,28 +138256,42 @@ function mergeConfig(config1, config2) { const resolveConfig = (config) => { const newConfig = mergeConfig({}, config); - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; + let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; newConfig.headers = headers = AxiosHeaders$1.from(headers); - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); + newConfig.url = buildURL( + buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), + config.params, + config.paramsSerializer + ); // HTTP basic authentication if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) + headers.set( + 'Authorization', + 'Basic ' + + btoa( + (auth.username || '') + + ':' + + (auth.password ? unescape(encodeURIComponent(auth.password)) : '') + ) ); } - let contentType; - if (utils$1.isFormData(data)) { if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); + headers.setContentType(undefined); // browser handles it + } else if (utils$1.isFunction(data.getHeaders)) { + // Node.js FormData (like form-data package) + const formHeaders = data.getHeaders(); + // Only set safe headers to avoid overwriting security headers + const allowedHeaders = ['content-type', 'content-length']; + Object.entries(formHeaders).forEach(([key, val]) => { + if (allowedHeaders.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); } } @@ -131918,224 +138317,265 @@ const resolveConfig = (config) => { const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; -const xhrAdapter = isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = resolveConfig(config); - let requestData = _config.data; - const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); - let {responseType} = _config; - let onCanceled; - function done() { - if (_config.cancelToken) { - _config.cancelToken.unsubscribe(onCanceled); - } - - if (_config.signal) { - _config.signal.removeEventListener('abort', onCanceled); - } - } - - let request = new XMLHttpRequest(); +const xhrAdapter = isXHRAdapterSupported && + function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig(config); + let requestData = _config.data; + const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; - request.open(_config.method.toUpperCase(), _config.url, true); + function done() { + flushUpload && flushUpload(); // flush events + flushDownload && flushDownload(); // flush events - // Set the request timeout in MS - request.timeout = _config.timeout; + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - function onloadend() { - if (!request) { - return; + _config.signal && _config.signal.removeEventListener('abort', onCanceled); } - // Prepare the response - const responseHeaders = AxiosHeaders$1.from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); + let request = new XMLHttpRequest(); - // Clean up request - request = null; - } + request.open(_config.method.toUpperCase(), _config.url, true); - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } + // Set the request timeout in MS + request.timeout = _config.timeout; - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + function onloadend() { + if (!request) { return; } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } + // Prepare the response + const responseHeaders = AxiosHeaders$1.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = + !responseType || responseType === 'text' || responseType === 'json' + ? request.responseText + : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request, + }; - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; + settle( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response + ); + + // Clean up request + request = null; } - reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, _config, request)); + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } - // Clean up request - request = null; - }; + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if ( + request.status === 0 && + !(request.responseURL && request.responseURL.indexOf('file:') === 0) + ) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, _config, request)); + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } - // Clean up request - request = null; - }; + reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request)); - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || transitionalDefaults; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - _config, - request)); - - // Clean up request - request = null; - }; + // Clean up request + request = null; + }; - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); + // Handle low level network errors + request.onerror = function handleError(event) { + // Browsers deliver a ProgressEvent in XHR onerror + // (message may be empty; when present, surface it) + // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event + const msg = event && event.message ? event.message : 'Network Error'; + const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request); + // attach the underlying event for consumers who want details + err.event = event || null; + reject(err); + request = null; + }; - // Add headers to the request - if ('setRequestHeader' in request) { - utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = _config.timeout + ? 'timeout of ' + _config.timeout + 'ms exceeded' + : 'timeout exceeded'; + const transitional = _config.transitional || transitionalDefaults; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError$1( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, + config, + request + ) + ); - // Add withCredentials to request if needed - if (!utils$1.isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } + // Clean up request + request = null; + }; - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); - // Handle progress if needed - if (typeof _config.onDownloadProgress === 'function') { - request.addEventListener('progress', progressEventReducer(_config.onDownloadProgress, true)); - } + // Add headers to the request + if ('setRequestHeader' in request) { + utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); + } - // Not all browsers support upload events - if (typeof _config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', progressEventReducer(_config.onUploadProgress)); - } + // Add withCredentials to request if needed + if (!utils$1.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; - } - reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); - request.abort(); - request = null; - }; + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); + // Handle progress if needed + if (onDownloadProgress) { + [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + request.addEventListener('progress', downloadThrottled); } - } - const protocol = parseProtocol(_config.url); + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); - if (protocol && platform.protocols.indexOf(protocol) === -1) { - reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); - return; - } + request.upload.addEventListener('progress', uploadThrottled); + request.upload.addEventListener('loadend', flushUpload); + } - // Send the request - request.send(requestData || null); - }); -}; + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = (cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel); + request.abort(); + request = null; + }; -const composeSignals = (signals, timeout) => { - let controller = new AbortController(); + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted + ? onCanceled() + : _config.signal.addEventListener('abort', onCanceled); + } + } - let aborted; + const protocol = parseProtocol(_config.url); - const onabort = function (cancel) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = cancel instanceof Error ? cancel : this.reason; - controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); - } + if (protocol && platform.protocols.indexOf(protocol) === -1) { + reject( + new AxiosError$1( + 'Unsupported protocol ' + protocol + ':', + AxiosError$1.ERR_BAD_REQUEST, + config + ) + ); + return; + } + + // Send the request + request.send(requestData || null); + }); }; - let timer = timeout && setTimeout(() => { - onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT)); - }, timeout); +const composeSignals = (signals, timeout) => { + const { length } = (signals = signals ? signals.filter(Boolean) : []); + + if (timeout || length) { + let controller = new AbortController(); + + let aborted; + + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError$1 + ? err + : new CanceledError$1(err instanceof Error ? err.message : err) + ); + } + }; - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal && - (signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort)); - }); - signals = null; - } - }; + let timer = + timeout && + setTimeout(() => { + timer = null; + onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT)); + }, timeout); + + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal) => { + signal.unsubscribe + ? signal.unsubscribe(onabort) + : signal.removeEventListener('abort', onabort); + }); + signals = null; + } + }; - signals.forEach((signal) => signal && signal.addEventListener && signal.addEventListener('abort', onabort)); + signals.forEach((signal) => signal.addEventListener('abort', onabort)); - const {signal} = controller; + const { signal } = controller; - signal.unsubscribe = unsubscribe; + signal.unsubscribe = () => utils$1.asap(unsubscribe); - return [signal, () => { - timer && clearTimeout(timer); - timer = null; - }]; + return signal; + } }; const composeSignals$1 = composeSignals; @@ -132158,330 +138598,520 @@ const streamChunk = function* (chunk, chunkSize) { } }; -const readBytes = async function* (iterable, chunkSize, encode) { - for await (const chunk of iterable) { - yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize); +const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); } }; -const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => { - const iterator = readBytes(stream, chunkSize, encode); - - let bytes = 0; - - return new ReadableStream({ - type: 'bytes', - - async pull(controller) { - const {done, value} = await iterator.next(); +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (;;) { + const { done, value } = await reader.read(); if (done) { - controller.close(); - onFinish(); - return; + break; } - - let len = value.byteLength; - onProgress && onProgress(bytes += len); - controller.enqueue(new Uint8Array(value)); - }, - cancel(reason) { - onFinish(reason); - return iterator.return(); + yield value; } - }, { - highWaterMark: 2 - }) + } finally { + await reader.cancel(); + } }; -const fetchProgressDecorator = (total, fn) => { - const lengthComputable = total != null; - return (loaded) => setTimeout(() => fn({ - lengthComputable, - total, - loaded - })); -}; +const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); + return new ReadableStream( + { + async pull(controller) { + try { + const { done, value } = await iterator.next(); -const supportsRequestStream = isReadableStreamSupported && (() => { - let duplexAccessed = false; + if (done) { + _onFinish(); + controller.close(); + return; + } - const hasContentType = new Request(platform.origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; + let len = value.byteLength; + if (onProgress) { + let loadedBytes = (bytes += len); + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + }, }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -})(); + { + highWaterMark: 2, + } + ); +}; const DEFAULT_CHUNK_SIZE = 64 * 1024; -const supportsResponseStream = isReadableStreamSupported && !!(()=> { - try { - return utils$1.isReadableStream(new Response('').body); - } catch(err) { - // return undefined - } -})(); +const { isFunction } = utils$1; -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; +const globalFetchAPI = (({ Request, Response }) => ({ + Request, + Response, +}))(utils$1.global); -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); - }); - }); -})(new Response)); +const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils$1.global; -const getBodyLength = async (body) => { - if (body == null) { - return 0; +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; } +}; - if(utils$1.isBlob(body)) { - return body.size; - } +const factory = (env) => { + env = utils$1.merge.call( + { + skipUndefined: true, + }, + globalFetchAPI, + env + ); - if(utils$1.isSpecCompliantForm(body)) { - return (await new Request(body).arrayBuffer()).byteLength; - } + const { fetch: envFetch, Request, Response } = env; + const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; + const isRequestSupported = isFunction(Request); + const isResponseSupported = isFunction(Response); - if(utils$1.isArrayBufferView(body)) { - return body.byteLength; + if (!isFetchSupported) { + return false; } - if(utils$1.isURLSearchParams(body)) { - body = body + ''; - } + const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1); - if(utils$1.isString(body)) { - return (await encodeText(body)).byteLength; - } -}; + const encodeText = + isFetchSupported && + (typeof TextEncoder$1 === 'function' + ? ( + (encoder) => (str) => + encoder.encode(str) + )(new TextEncoder$1()) + : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); -const resolveBodyLength = async (headers, body) => { - const length = utils$1.toFiniteNumber(headers.getContentLength()); + const supportsRequestStream = + isRequestSupported && + isReadableStreamSupported && + test(() => { + let duplexAccessed = false; - return length == null ? getBodyLength(body) : length; -}; + const hasContentType = new Request(platform.origin, { + body: new ReadableStream$1(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + }, + }).headers.has('Content-Type'); -const fetchAdapter = isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = resolveConfig(config); + return duplexAccessed && !hasContentType; + }); - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + const supportsResponseStream = + isResponseSupported && + isReadableStreamSupported && + test(() => utils$1.isReadableStream(new Response('').body)); - let [composedSignal, stopTimeout] = (signal || cancelToken || timeout) ? - composeSignals$1([signal, cancelToken], timeout) : []; + const resolvers = { + stream: supportsResponseStream && ((res) => res.body), + }; - let finished, request; + isFetchSupported && + (() => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => { + !resolvers[type] && + (resolvers[type] = (res, config) => { + let method = res && res[type]; - const onFinish = () => { - !finished && setTimeout(() => { - composedSignal && composedSignal.unsubscribe(); - }); + if (method) { + return method.call(res); + } - finished = true; - }; + throw new AxiosError$1( + `Response type '${type}' is not supported`, + AxiosError$1.ERR_NOT_SUPPORT, + config + ); + }); + }); + })(); - let requestContentLength; + const getBodyLength = async (body) => { + if (body == null) { + return 0; + } - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { + if (utils$1.isBlob(body)) { + return body.size; + } + + if (utils$1.isSpecCompliantForm(body)) { + const _request = new Request(platform.origin, { method: 'POST', - body: data, - duplex: "half" + body, }); + return (await _request.arrayBuffer()).byteLength; + } - let contentTypeHeader; - - if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader); - } + if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { + return body.byteLength; + } - if (_request.body) { - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator( - requestContentLength, - progressEventReducer(onUploadProgress) - ), null, encodeText); - } + if (utils$1.isURLSearchParams(body)) { + body = body + ''; } - if (!utils$1.isString(withCredentials)) { - withCredentials = withCredentials ? 'cors' : 'omit'; + if (utils$1.isString(body)) { + return (await encodeText(body)).byteLength; } + }; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - withCredentials - }); + const resolveBodyLength = async (headers, body) => { + const length = utils$1.toFiniteNumber(headers.getContentLength()); + + return length == null ? getBodyLength(body) : length; + }; + + return async (config) => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions, + } = resolveConfig(config); - let response = await fetch(request); + let _fetch = envFetch || fetch; - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) { - const options = {}; + let composedSignal = composeSignals$1( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + + let request = null; - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; + const unsubscribe = + composedSignal && + composedSignal.unsubscribe && + (() => { + composedSignal.unsubscribe(); }); - const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); + let requestContentLength; - response = new Response( - trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator( - responseContentLength, - progressEventReducer(onDownloadProgress, true) - ), isStreamResponse && onFinish, encodeText), - options - ); - } + try { + if ( + onUploadProgress && + supportsRequestStream && + method !== 'get' && + method !== 'head' && + (requestContentLength = await resolveBodyLength(headers, data)) !== 0 + ) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: 'half', + }); + + let contentTypeHeader; - responseType = responseType || 'text'; + if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { + headers.setContentType(contentTypeHeader); + } + + if (_request.body) { + const [onProgress, flush] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); + } + } + + if (!utils$1.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; + + const resolvedOptions = { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: 'half', + credentials: isCredentialsSupported ? withCredentials : undefined, + }; - let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); + request = isRequestSupported && new Request(url, resolvedOptions); - !isStreamResponse && onFinish(); + let response = await (isRequestSupported + ? _fetch(request, fetchOptions) + : _fetch(url, resolvedOptions)); + + const isStreamResponse = + supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + + if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { + const options = {}; + + ['status', 'statusText', 'headers'].forEach((prop) => { + options[prop] = response[prop]; + }); + + const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); + + const [onProgress, flush] = + (onDownloadProgress && + progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + )) || + []; + + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + + responseType = responseType || 'text'; + + let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text']( + response, + config + ); - stopTimeout && stopTimeout(); + !isStreamResponse && unsubscribe && unsubscribe(); - return await new Promise((resolve, reject) => { - settle(resolve, reject, { - data: responseData, - headers: AxiosHeaders$1.from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders$1.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request, + }); }); - }) - } catch (err) { - onFinish(); + } catch (err) { + unsubscribe && unsubscribe(); - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) + if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError$1( + 'Network Error', + AxiosError$1.ERR_NETWORK, + config, + request, + err && err.response + ), + { + cause: err.cause || err, + } + ); + } + + throw AxiosError$1.from(err, err && err.code, config, request, err && err.response); } + }; +}; + +const seedCache = new Map(); - throw AxiosError.from(err, err && err.code, config, request); +const getFetch = (config) => { + let env = (config && config.env) || {}; + const { fetch, Request, Response } = env; + const seeds = [Request, Response, fetch]; + + let len = seeds.length, + i = len, + seed, + target, + map = seedCache; + + while (i--) { + seed = seeds[i]; + target = map.get(seed); + + target === undefined && map.set(seed, (target = i ? new Map() : factory(env))); + + map = target; } -}); + return target; +}; + +getFetch(); + +/** + * Known adapters mapping. + * Provides environment-specific adapters for Axios: + * - `http` for Node.js + * - `xhr` for browsers + * - `fetch` for fetch API-based requests + * + * @type {Object} + */ const knownAdapters = { http: httpAdapter, xhr: xhrAdapter, - fetch: fetchAdapter + fetch: { + get: getFetch, + }, }; +// Assign adapter names for easier debugging and identification utils$1.forEach(knownAdapters, (fn, value) => { if (fn) { try { - Object.defineProperty(fn, 'name', {value}); + Object.defineProperty(fn, 'name', { value }); } catch (e) { // eslint-disable-next-line no-empty } - Object.defineProperty(fn, 'adapterName', {value}); + Object.defineProperty(fn, 'adapterName', { value }); } }); +/** + * Render a rejection reason string for unknown or unsupported adapters + * + * @param {string} reason + * @returns {string} + */ const renderReason = (reason) => `- ${reason}`; -const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false; - -const adapters = { - getAdapter: (adapters) => { - adapters = utils$1.isArray(adapters) ? adapters : [adapters]; +/** + * Check if the adapter is resolved (function, null, or false) + * + * @param {Function|null|false} adapter + * @returns {boolean} + */ +const isResolvedHandle = (adapter) => + utils$1.isFunction(adapter) || adapter === null || adapter === false; - const {length} = adapters; - let nameOrAdapter; - let adapter; +/** + * Get the first suitable adapter from the provided list. + * Tries each adapter in order until a supported one is found. + * Throws an AxiosError if no adapter is suitable. + * + * @param {Array|string|Function} adapters - Adapter(s) by name or function. + * @param {Object} config - Axios request configuration + * @throws {AxiosError} If no suitable adapter is available + * @returns {Function} The resolved adapter function + */ +function getAdapter(adapters, config) { + adapters = utils$1.isArray(adapters) ? adapters : [adapters]; - const rejectedReasons = {}; + const { length } = adapters; + let nameOrAdapter; + let adapter; - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; + const rejectedReasons = {}; - adapter = nameOrAdapter; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + adapter = nameOrAdapter; - if (adapter === undefined) { - throw new AxiosError(`Unknown adapter '${id}'`); - } - } + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - if (adapter) { - break; + if (adapter === undefined) { + throw new AxiosError$1(`Unknown adapter '${id}'`); } + } - rejectedReasons[id || '#' + i] = adapter; + if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) { + break; } - if (!adapter) { + rejectedReasons[id || '#' + i] = adapter; + } - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => + `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; + let s = length + ? reasons.length > 1 + ? 'since :\n' + reasons.map(renderReason).join('\n') + : ' ' + renderReason(reasons[0]) + : 'as no adapter specified'; - throw new AxiosError( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } + throw new AxiosError$1( + `There is no suitable adapter to dispatch the request ` + s, + 'ERR_NOT_SUPPORT' + ); + } - return adapter; - }, - adapters: knownAdapters + return adapter; +} + +/** + * Exports Axios adapters and utility to resolve an adapter + */ +const adapters = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters, }; /** @@ -132497,7 +139127,7 @@ function throwIfCancellationRequested(config) { } if (config.signal && config.signal.aborted) { - throw new CanceledError(null, config); + throw new CanceledError$1(null, config); } } @@ -132514,47 +139144,43 @@ function dispatchRequest(config) { config.headers = AxiosHeaders$1.from(config.headers); // Transform request data - config.data = transformData.call( - config, - config.transformRequest - ); + config.data = transformData.call(config, config.transformRequest); if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { config.headers.setContentType('application/x-www-form-urlencoded', false); } - const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter); + const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config); - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); + return adapter(config).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config); - // Transform response data - response.data = transformData.call( - config, - config.transformResponse, - response - ); + // Transform response data + response.data = transformData.call(config, config.transformResponse, response); - response.headers = AxiosHeaders$1.from(response.headers); + response.headers = AxiosHeaders$1.from(response.headers); - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = AxiosHeaders$1.from(reason.response.headers); + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders$1.from(reason.response.headers); + } } - } - return Promise.reject(reason); - }); + return Promise.reject(reason); + } + ); } const validators$1 = {}; @@ -132579,15 +139205,23 @@ const deprecatedWarnings = {}; */ validators$1.transitional = function transitional(validator, version, message) { function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + return ( + '[Axios v' + + VERSION + + "] Transitional option '" + + opt + + "'" + + desc + + (message ? '. ' + message : '') + ); } // eslint-disable-next-line func-names return (value, opt, opts) => { if (validator === false) { - throw new AxiosError( + throw new AxiosError$1( formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - AxiosError.ERR_DEPRECATED + AxiosError$1.ERR_DEPRECATED ); } @@ -132606,6 +139240,14 @@ validators$1.transitional = function transitional(validator, version, message) { }; }; +validators$1.spelling = function spelling(correctSpelling) { + return (value, opt) => { + // eslint-disable-next-line no-console + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; + /** * Assert object's properties type * @@ -132618,7 +139260,7 @@ validators$1.transitional = function transitional(validator, version, message) { function assertOptions(options, schema, allowUnknown) { if (typeof options !== 'object') { - throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); + throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE); } const keys = Object.keys(options); let i = keys.length; @@ -132629,19 +139271,22 @@ function assertOptions(options, schema, allowUnknown) { const value = options[opt]; const result = value === undefined || validator(value, opt, options); if (result !== true) { - throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); + throw new AxiosError$1( + 'option ' + opt + ' must be ' + result, + AxiosError$1.ERR_BAD_OPTION_VALUE + ); } continue; } if (allowUnknown !== true) { - throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); + throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION); } } } const validator = { assertOptions, - validators: validators$1 + validators: validators$1, }; const validators = validator.validators; @@ -132655,10 +139300,10 @@ const validators = validator.validators; */ class Axios { constructor(instanceConfig) { - this.defaults = instanceConfig; + this.defaults = instanceConfig || {}; this.interceptors = { request: new InterceptorManager$1(), - response: new InterceptorManager$1() + response: new InterceptorManager$1(), }; } @@ -132675,9 +139320,9 @@ class Axios { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { - let dummy; + let dummy = {}; - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); + Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); // slice off the Error: ... line const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; @@ -132709,44 +139354,64 @@ class Axios { config = mergeConfig(this.defaults, config); - const {transitional, paramsSerializer, headers} = config; + const { transitional, paramsSerializer, headers } = config; if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); + validator.assertOptions( + transitional, + { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean), + legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), + }, + false + ); } if (paramsSerializer != null) { if (utils$1.isFunction(paramsSerializer)) { config.paramsSerializer = { - serialize: paramsSerializer + serialize: paramsSerializer, }; } else { - validator.assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); + validator.assertOptions( + paramsSerializer, + { + encode: validators.function, + serialize: validators.function, + }, + true + ); } } + // Set config.allowAbsoluteUrls + if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + + validator.assertOptions( + config, + { + baseUrl: validators.spelling('baseURL'), + withXsrfToken: validators.spelling('withXSRFToken'), + }, + true + ); + // Set config.method config.method = (config.method || this.defaults.method || 'get').toLowerCase(); // Flatten headers - let contextHeaders = headers && utils$1.merge( - headers.common, - headers[config.method] - ); + let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]); - headers && utils$1.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { + headers && + utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => { delete headers[method]; - } - ); + }); config.headers = AxiosHeaders$1.concat(contextHeaders, headers); @@ -132760,7 +139425,15 @@ class Axios { synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + const transitional = config.transitional || transitionalDefaults; + const legacyInterceptorReqResOrdering = + transitional && transitional.legacyInterceptorReqResOrdering; + + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } }); const responseInterceptorChain = []; @@ -132774,8 +139447,8 @@ class Axios { if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); len = chain.length; promise = Promise.resolve(config); @@ -132791,8 +139464,6 @@ class Axios { let newConfig = config; - i = 0; - while (i < len) { const onFulfilled = requestInterceptorChain[i++]; const onRejected = requestInterceptorChain[i++]; @@ -132822,7 +139493,7 @@ class Axios { getUri(config) { config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } } @@ -132830,12 +139501,14 @@ class Axios { // Provide aliases for supported request methods utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method, - url, - data: (config || {}).data - })); + Axios.prototype[method] = function (url, config) { + return this.request( + mergeConfig(config || {}, { + method, + url, + data: (config || {}).data, + }) + ); }; }); @@ -132844,14 +139517,18 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) function generateHTTPMethod(isForm) { return function httpMethod(url, data, config) { - return this.request(mergeConfig(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); + return this.request( + mergeConfig(config || {}, { + method, + headers: isForm + ? { + 'Content-Type': 'multipart/form-data', + } + : {}, + url, + data, + }) + ); }; } @@ -132884,7 +139561,7 @@ class CancelToken { const token = this; // eslint-disable-next-line func-names - this.promise.then(cancel => { + this.promise.then((cancel) => { if (!token._listeners) return; let i = token._listeners.length; @@ -132896,10 +139573,10 @@ class CancelToken { }); // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { + this.promise.then = (onfulfilled) => { let _resolve; // eslint-disable-next-line func-names - const promise = new Promise(resolve => { + const promise = new Promise((resolve) => { token.subscribe(resolve); _resolve = resolve; }).then(onfulfilled); @@ -132917,7 +139594,7 @@ class CancelToken { return; } - token.reason = new CanceledError(message, config, request); + token.reason = new CanceledError$1(message, config, request); resolvePromise(token.reason); }); } @@ -132962,6 +139639,20 @@ class CancelToken { } } + toAbortSignal() { + const controller = new AbortController(); + + const abort = (err) => { + controller.abort(err); + }; + + this.subscribe(abort); + + controller.signal.unsubscribe = () => this.unsubscribe(abort); + + return controller.signal; + } + /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. @@ -132973,7 +139664,7 @@ class CancelToken { }); return { token, - cancel + cancel, }; } } @@ -132987,7 +139678,7 @@ const CancelToken$1 = CancelToken; * * ```js * function f(x, y, z) {} - * var args = [1, 2, 3]; + * const args = [1, 2, 3]; * f.apply(null, args); * ``` * @@ -133015,7 +139706,7 @@ function spread(callback) { * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false */ function isAxiosError(payload) { - return utils$1.isObject(payload) && (payload.isAxiosError === true); + return utils$1.isObject(payload) && payload.isAxiosError === true; } const HttpStatusCode = { @@ -133082,6 +139773,12 @@ const HttpStatusCode = { LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526, }; Object.entries(HttpStatusCode).forEach(([key, value]) => { @@ -133102,10 +139799,10 @@ function createInstance(defaultConfig) { const instance = bind(Axios$1.prototype.request, context); // Copy axios.prototype to instance - utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true}); + utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true }); // Copy context to instance - utils$1.extend(instance, context, null, {allOwnKeys: true}); + utils$1.extend(instance, context, null, { allOwnKeys: true }); // Factory for creating new instances instance.create = function create(instanceConfig) { @@ -133122,14 +139819,14 @@ const axios = createInstance(defaults$1); axios.Axios = Axios$1; // Expose Cancel & CancelToken -axios.CanceledError = CanceledError; +axios.CanceledError = CanceledError$1; axios.CancelToken = CancelToken$1; axios.isCancel = isCancel; axios.VERSION = VERSION; axios.toFormData = toFormData; // Expose AxiosError class -axios.AxiosError = AxiosError; +axios.AxiosError = AxiosError$1; // alias for CanceledError for backward compatibility axios.Cancel = axios.CanceledError; @@ -133149,7 +139846,7 @@ axios.mergeConfig = mergeConfig; axios.AxiosHeaders = AxiosHeaders$1; -axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); +axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); axios.getAdapter = adapters.getAdapter; @@ -133161,13 +139858,20 @@ module.exports = axios; //# sourceMappingURL=axios.cjs.map +/***/ }), + +/***/ 74577: +/***/ ((module) => { + +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>$t,XMLParser:()=>gt,XMLValidator:()=>It});const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const i=[];let n=e.exec(t);for(;n;){const s=[];s.startIndex=e.lastIndex-n[0].length;const r=n.length;for(let t=0;t"!==t[r]&&" "!==t[r]&&"\t"!==t[r]&&"\n"!==t[r]&&"\r"!==t[r];r++)h+=t[r];if(h=h.trim(),"/"===h[h.length-1]&&(h=h.substring(0,h.length-1),r--),!y(h)){let e;return e=0===h.trim().length?"Invalid space after '<'.":"Tag '"+h+"' is an invalid name.",b("InvalidTag",e,w(t,r))}const l=g(t,r);if(!1===l)return b("InvalidAttr","Attributes for '"+h+"' have open quote.",w(t,r));let d=l.value;if(r=l.index,"/"===d[d.length-1]){const i=r-d.length;d=d.substring(0,d.length-1);const s=x(d,e);if(!0!==s)return b(s.err.code,s.err.msg,w(t,i+s.err.line));n=!0}else if(a){if(!l.tagClosed)return b("InvalidTag","Closing tag '"+h+"' doesn't have proper closing.",w(t,r));if(d.trim().length>0)return b("InvalidTag","Closing tag '"+h+"' can't have attributes or invalid starting.",w(t,o));if(0===i.length)return b("InvalidTag","Closing tag '"+h+"' has not been opened.",w(t,o));{const e=i.pop();if(h!==e.tagName){let i=w(t,e.tagStartPos);return b("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+h+"'.",w(t,o))}0==i.length&&(s=!0)}}else{const a=x(d,e);if(!0!==a)return b(a.err.code,a.err.msg,w(t,r-d.length+a.err.line));if(!0===s)return b("InvalidXml","Multiple possible root nodes found.",w(t,r));-1!==e.unpairedTags.indexOf(h)||i.push({tagName:h,tagStartPos:o}),n=!0}for(r++;r0)||b("InvalidXml","Invalid '"+JSON.stringify(i.map(t=>t.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):b("InvalidXml","Start tag expected.",1)}function p(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const i=e;for(;e5&&"xml"===n)return b("InvalidXml","XML declaration allowed only at the start of the document.",w(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function c(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}const d='"',f="'";function g(t,e){let i="",n="",s=!1;for(;e"===t[e]&&""===n){s=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:s}}const m=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function x(t,e){const i=s(t,m),n={};for(let t=0;to.includes(t)?"__"+t:t,P={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:T};function S(t,e){if("string"!=typeof t)return;const i=t.toLowerCase();if(o.some(t=>i===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a.some(t=>i===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function A(t){return"boolean"==typeof t?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:"object"==typeof t&&null!==t?{enabled:!1!==t.enabled,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??100),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:A(!0)}const O=function(t){const e=Object.assign({},P,t),i=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(const{value:t,name:e}of i)t&&S(t,e);return null===e.onDangerousProperty&&(e.onDangerousProperty=T),e.processEntities=A(e.processEntities),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),e};let C;C="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class ${constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][C]={startIndex:e})}static getMetaDataSymbol(){return C}}class I{constructor(t){this.suppressValidationErr=!t,this.options=t}readDocType(t,e){const i=Object.create(null);let n=0;if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let s=1,r=!1,o=!1,a="";for(;e"===t[e]){if(o?"-"===t[e-1]&&"-"===t[e-2]&&(o=!1,s--):s--,0===s)break}else"["===t[e]?r=!0:a+=t[e];else{if(r&&M(t,"!ENTITY",e)){let s,r;if(e+=7,[s,r,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===r.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const t=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i[s]={regx:RegExp(`&${t};`,"g"),val:r},n++}}else if(r&&M(t,"!ELEMENT",e)){e+=8;const{index:i}=this.readElementExp(t,e+1);e=i}else if(r&&M(t,"!ATTLIST",e))e+=8;else if(r&&M(t,"!NOTATION",e)){e+=9;const{index:i}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=i}else{if(!M(t,"!--",e))throw new Error("Invalid DOCTYPE");o=!0}s++,a=""}if(0!==s)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}}readEntityExp(t,e){const i=e=j(t,e);for(;ethis.options.maxEntitySize)throw new Error(`Entity "${n}" size (${s.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,s,--e]}readNotationExp(t,e){const i=e=j(t,e);for(;e{for(;e0&&(this.path[this.path.length-1].values=void 0);const n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);const s=this.siblingStacks[n],r=i?`${i}:${t}`:t,o=s.get(r)||0;let a=0;for(const t of s.values())a+=t;s.set(r,o+1);const h={tag:t,position:a,counter:o};null!=i&&(h.namespace=i),null!=e&&(h.values=e),this.path.push(h)}pop(){if(0===this.path.length)return;const t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0===this.path.length)return;const e=this.path[this.path.length-1];return e.values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const i=t||this.separator;return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i)}toArray(){return this.path.map(t=>t.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e=0&&e>=0;){const n=t[i];if("deep-wildcard"===n.type){if(i--,i<0)return!0;const n=t[i];let s=!1;for(let t=e;t>=0;t--){const r=t===this.path.length-1;if(this._matchSegment(n,this.path[t],r)){e=t-1,i--,s=!0;break}}if(!s)return!1}else{const t=e===this.path.length-1;if(!this._matchSegment(n,this.path[e],t))return!1;e--,i--}}return i<0}_matchSegment(t,e,i){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!i)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue){const i=e.values[t.attrName];if(String(i)!==String(t.attrValue))return!1}}if(void 0!==t.position){if(!i)return!1;const n=e.counter??0;if("first"===t.position&&0!==n)return!1;if("odd"===t.position&&n%2!=1)return!1;if("even"===t.position&&n%2!=0)return!1;if("nth"===t.position&&n!==t.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t))}readOnly(){return new Proxy(this,{get(t,e,i){if(L.has(e))return()=>{throw new TypeError(`Cannot call '${e}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};const n=Reflect.get(t,e,i);return"path"===e||"siblingStacks"===e?Object.freeze(Array.isArray(n)?n.map(t=>t instanceof Map?Object.freeze(new Map(t)):Object.freeze({...t})):n):"function"==typeof n?n.bind(t):n},set(t,e){throw new TypeError(`Cannot set property '${String(e)}' on a read-only Matcher.`)},deleteProperty(t,e){throw new TypeError(`Cannot delete property '${String(e)}' from a read-only Matcher.`)}})}}class R{constructor(t,e={}){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let i=0,n="";for(;i0){const i=t.substring(0,e);if("xmlns"!==i)return i}}class W{constructor(t){var e;if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>rt(e,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>rt(e,16,"&#x")}},this.addExternalEntities=Y,this.parseXml=J,this.parseTextData=z,this.resolveNameSpace=X,this.buildAttributesMap=Z,this.isItStopNode=tt,this.replaceEntitiesValue=Q,this.readStopNodeData=nt,this.saveTextToParentTag=H,this.addChild=K,this.ignoreAttributesFn="function"==typeof(e=this.options.ignoreAttributes)?e:Array.isArray(e)?t=>{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new G,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let t=0;t0)){o||(t=this.replaceEntitiesValue(t,e,i));const n=this.options.jPath?i.toString():i,a=this.options.tagValueProcessor(e,t,n,s,r);return null==a?t:typeof a!=typeof t||a!==t?a:this.options.trimValues||t.trim()===t?st(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function X(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const q=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Z(t,e,i){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,q),r=n.length,o={},a={};for(let t=0;t0&&"object"==typeof e&&e.updateCurrent&&e.updateCurrent(a);for(let t=0;t",r,"Closing Tag is not closed.");let s=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}s=ot(this.options.transformTagName,s,"",this.options).tagName,i&&(n=this.saveTextToParentTag(n,i,this.readonlyMatcher));const o=this.matcher.getCurrentTag();if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: `);o&&-1!==this.options.unpairedTags.indexOf(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,i=this.tagsNodeStack.pop(),n="",r=e}else if("?"===t[r+1]){let e=it(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,this.readonlyMatcher),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new $(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,this.matcher,e.tagName)),this.addChild(i,t,this.readonlyMatcher,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=et(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(r+4,e-2);n=this.saveTextToParentTag(n,i,this.readonlyMatcher),i.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}r=e}else if("!D"===t.substr(r+1,2)){const e=s.readDocType(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=et(t,"]]>",r,"CDATA is not closed.")-2,s=t.substring(r+9,e);n=this.saveTextToParentTag(n,i,this.readonlyMatcher);let o=this.parseTextData(s,i.tagname,this.readonlyMatcher,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):i.add(this.options.textNodeName,o),r=e+2}else{let s=it(t,r,this.options.removeNSPrefix);if(!s){const e=t.substring(Math.max(0,r-50),Math.min(t.length,r+50));throw new Error(`readTagExp returned undefined at position ${r}. Context: "${e}"`)}let o=s.tagName;const a=s.rawTagName;let h=s.tagExp,l=s.attrExpPresent,p=s.closeIndex;if(({tagName:o,tagExp:h}=ot(this.options.transformTagName,o,h,this.options)),this.options.strictReservedNames&&(o===this.options.commentPropName||o===this.options.cdataPropName||o===this.options.textNodeName||o===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${o}`);i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,this.readonlyMatcher,!1));const u=i;u&&-1!==this.options.unpairedTags.indexOf(u.tagname)&&(i=this.tagsNodeStack.pop(),this.matcher.pop());let c=!1;h.length>0&&h.lastIndexOf("/")===h.length-1&&(c=!0,"/"===o[o.length-1]?(o=o.substr(0,o.length-1),h=o):h=h.substr(0,h.length-1),l=o!==h);let d,f=null,g={};d=B(a),o!==e.tagname&&this.matcher.push(o,{},d),o!==h&&l&&(f=this.buildAttributesMap(h,this.matcher,o),f&&(g=U(f,this.options))),o!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));const m=r;if(this.isCurrentNodeStopNode){let e="";if(c)r=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(o))r=s.closeIndex;else{const i=this.readStopNodeData(t,a,p+1);if(!i)throw new Error(`Unexpected end of ${a}`);r=i.i,e=i.tagContent}const n=new $(o);f&&(n[":@"]=f),n.add(this.options.textNodeName,e),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(i,n,this.readonlyMatcher,m)}else{if(c){({tagName:o,tagExp:h}=ot(this.options.transformTagName,o,h,this.options));const t=new $(o);f&&(t[":@"]=f),this.addChild(i,t,this.readonlyMatcher,m),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(-1!==this.options.unpairedTags.indexOf(o)){const t=new $(o);f&&(t[":@"]=f),this.addChild(i,t,this.readonlyMatcher,m),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=s.closeIndex;continue}{const t=new $(o);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(i),f&&(t[":@"]=f),this.addChild(i,t,this.readonlyMatcher,m),i=t}}n="",r=p}}else n+=t[r];return e.child};function K(t,e,i,n){this.options.captureMetaData||(n=void 0);const s=this.options.jPath?i.toString():i,r=this.options.updateTag(e.tagname,s,e[":@"]);!1===r||("string"==typeof r?(e.tagname=r,t.addChild(e,n)):t.addChild(e,n))}function Q(t,e,i){const n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){const s=this.options.jPath?i.toString():i;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return t}if(n.tagFilter){const s=this.options.jPath?i.toString():i;if(!n.tagFilter(e,s))return t}for(const e of Object.keys(this.docTypeEntities)){const i=this.docTypeEntities[e],s=t.match(i.regx);if(s){if(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const e=t.length;if(t=t.replace(i.regx,i.val),n.maxExpandedLength&&(this.currentExpandedLength+=t.length-e,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}for(const e of Object.keys(this.lastEntities)){const i=this.lastEntities[e],s=t.match(i.regex);if(s&&(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);t=t.replace(i.regex,i.val)}if(-1===t.indexOf("&"))return t;if(this.options.htmlEntities)for(const e of Object.keys(this.htmlEntities)){const i=this.htmlEntities[e],s=t.match(i.regex);if(s&&(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);t=t.replace(i.regex,i.val)}return t.replace(this.ampEntity.regex,this.ampEntity.val)}function H(t,e,i,n){return t&&(void 0===n&&(n=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function tt(t,e){if(!t||0===t.length)return!1;for(let i=0;i"){let n,s="";for(let r=e;r",i,`${e} is not closed`);if(t.substring(i+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(n,i),i:r};i=r}else if("?"===t[i+1])i=et(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=et(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=et(t,"]]>",i,"StopNode is not closed.")-2;else{const n=it(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,i=n.closeIndex)}}function st(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},k,e),!t||"string"!=typeof t)return t;let i=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if("0"===t)return 0;if(e.hex&&D.test(i))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(i);if(isFinite(i)){if(i.includes("e")||i.includes("E"))return function(t,e,i){if(!i.eNotation)return t;const n=e.match(F);if(n){let s=n[1]||"";const r=-1===n[3].indexOf("e")?"E":"e",o=n[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:(1!==o.length||!n[3].startsWith(`.${r}`)&&n[3][0]!==r)&&o.length>0?i.leadingZeros&&!a?(e=(n[1]||"")+n[3],Number(e)):t:Number(e)}return t}(t,i,e);{const s=V.exec(i);if(s){const r=s[1]||"",o=s[2];let a=(n=s[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n):n;const h=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!h))return t;{const n=Number(i),s=String(n);if(0===n)return n;if(-1!==s.search(/[eE]/))return e.eNotation?n:t;if(-1!==i.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?n:t;let h=o?a:i;return o?h===s||r+h===s?n:t:h===s||h===r+s?n:t}}return t}}var n;return function(t,e,i){const n=e===1/0;switch(i.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return t}}(t,Number(i),e)}(t,i)}return void 0!==t?t:""}function rt(t,e,i){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):i+t+";"}function ot(t,e,i,n){if(t){const n=t(e);i===e&&(i=n),e=n}return{tagName:e=at(e,n),tagExp:i}}function at(t,e){if(a.includes(t))throw new Error(`[SECURITY] Invalid name: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);return o.includes(t)?e.onDangerousProperty(t):t}const ht=$.getMetaDataSymbol();function lt(t,e){if(!t||"object"!=typeof t)return{};if(!e)return t;const i={};for(const n in t)n.startsWith(e)?i[n.substring(e.length)]=t[n]:i[n]=t[n];return i}function pt(t,e,i,n){return ut(t,e,i,n)}function ut(t,e,i,n){let s;const r={};for(let o=0;o0&&(r[e.textNodeName]=s):void 0!==s&&(r[e.textNodeName]=s),r}function ct(t){const e=Object.keys(t);for(let t=0;t0&&(i="\n");const n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let t=0;te.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(null!=t){let i=t.toString();return i=Tt(i,e),i}return""}for(let a=0;a`,o=!1,n.pop();continue}if(l===e.commentPropName){r+=i+`\x3c!--${h[l][0][e.textNodeName]}--\x3e`,o=!0,n.pop();continue}if("?"===l[0]){const t=wt(h[":@"],e,u),s="?xml"===l?"":i;let a=h[l][0][e.textNodeName];a=0!==a.length?" "+a:"",r+=s+`<${l}${a}${t}?>`,o=!0,n.pop();continue}let c=i;""!==c&&(c+=e.indentBy);const d=i+`<${l}${wt(h[":@"],e,u)}`;let f;f=u?bt(h[l],e):xt(h[l],e,c,n,s),-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=d+">":r+=d+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?r+=d+`>${f}${i}`:(r+=d+">",f&&""!==i&&(f.includes("/>")||f.includes("`):r+=d+"/>",o=!0,n.pop()}return r}function Nt(t,e){if(!t||e.ignoreAttributes)return null;const i={};let n=!1;for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s]=t[s],n=!0);return n?i:null}function bt(t,e){if(!Array.isArray(t))return null!=t?t.toString():"";let i="";for(let n=0;n${n}`:i+=`<${r}${t}/>`}}}return i}function Et(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=t[n];!0===s&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return i}function yt(t){const e=Object.keys(t);for(let i=0;i0&&e.processEntities)for(let i=0;i","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function St(t){if(this.options=Object.assign({},Pt,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let t=0;t{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ct),this.processTextOrObjNode=At,this.options.format?(this.indentate=Ot,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function At(t,e,i,n){const s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){const s=this.buildRawContent(t),r=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(s,e,r,i)}const r=this.j2x(t,i+1,n);return n.pop(),void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,i,n):this.buildObjectNode(r.val,e,r.attrStr,i)}function Ot(t){return this.options.indentBy.repeat(t)}function Ct(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}St.prototype.build=function(t){if(this.options.preserveOrder)return mt(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});const e=new G;return this.j2x(t,0,e).val}},St.prototype.j2x=function(t,e,i){let n="",s="";if(this.options.maxNestedTags&&i.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const r=this.options.jPath?i.toString():i,o=this.checkStopNode(i);for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a))if(void 0===t[a])this.isAttribute(a)&&(s+="");else if(null===t[a])this.isAttribute(a)||a===this.options.cdataPropName?s+="":"?"===a[0]?s+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)s+=this.buildTextValNode(t[a],a,"",e,i);else if("object"!=typeof t[a]){const h=this.isAttribute(a);if(h&&!this.ignoreAttributesFn(h,r))n+=this.buildAttrPairStr(h,""+t[a],o);else if(!h)if(a===this.options.textNodeName){let e=this.options.tagValueProcessor(a,""+t[a]);s+=this.replaceEntitiesValue(e)}else{i.push(a);const n=this.checkStopNode(i);if(i.pop(),n){const i=""+t[a];s+=""===i?this.indentate(e)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(e)+"<"+a+">"+i+""+t+"${t}`;else if("object"==typeof t&&null!==t){const n=this.buildRawContent(t),s=this.buildAttributesForStopNode(t);e+=""===n?`<${i}${s}/>`:`<${i}${s}>${n}`}}else if("object"==typeof n&&null!==n){const t=this.buildRawContent(n),s=this.buildAttributesForStopNode(n);e+=""===t?`<${i}${s}/>`:`<${i}${s}>${t}`}else e+=`<${i}>${n}`}return e},St.prototype.buildAttributesForStopNode=function(t){if(!t||"object"!=typeof t)return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const i=t[this.options.attributesGroupName];for(let t in i){if(!Object.prototype.hasOwnProperty.call(i,t))continue;const n=t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t,s=i[t];!0===s&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+s+'"'}}else for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const n=this.isAttribute(i);if(n){const s=t[i];!0===s&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+s+'"'}}return e},St.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let s=""+t+s}},St.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+s+"0&&this.options.processEntities)for(let e=0;e { "use strict"; -module.exports = JSON.parse('{"name":"@google-cloud/storage","description":"Cloud Storage Client Library for Node.js","version":"7.11.1","license":"Apache-2.0","author":"Google Inc.","engines":{"node":">=14"},"repository":"googleapis/nodejs-storage","main":"./build/cjs/src/index.js","types":"./build/cjs/src/index.d.ts","type":"module","exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"files":["build/cjs/src","build/cjs/package.json","!build/cjs/src/**/*.map","build/esm/src","!build/esm/src/**/*.map"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google storage","storage"],"scripts":{"all-test":"npm test && npm run system-test && npm run samples-test","benchwrapper":"node bin/benchwrapper.js","check":"gts check","clean":"rm -rf build/","compile:cjs":"tsc -p ./tsconfig.cjs.json","compile:esm":"tsc -p .","compile":"npm run compile:cjs && npm run compile:esm","conformance-test":"mocha --parallel build/cjs/conformance-test/ --require build/cjs/conformance-test/globalHooks.js","docs-test":"linkinator docs","docs":"jsdoc -c .jsdoc.json","fix":"gts fix","lint":"gts check","postcompile":"cp ./src/package-json-helper.cjs ./build/cjs/src && cp ./src/package-json-helper.cjs ./build/esm/src","postcompile:cjs":"babel --plugins gapic-tools/build/src/replaceImportMetaUrl,gapic-tools/build/src/toggleESMFlagVariable build/cjs/src/util.js -o build/cjs/src/util.js && cp internal-tooling/helpers/package.cjs.json build/cjs/package.json","precompile":"rm -rf build/","preconformance-test":"npm run compile:cjs -- --sourceMap","predocs-test":"npm run docs","predocs":"npm run compile:cjs -- --sourceMap","prelint":"cd samples; npm link ../; npm install","prepare":"npm run compile","presystem-test:esm":"npm run compile:esm","presystem-test":"npm run compile -- --sourceMap","pretest":"npm run compile -- --sourceMap","samples-test":"npm link && cd samples/ && npm link ../ && npm test && cd ../","system-test:esm":"mocha build/esm/system-test --timeout 600000 --exit","system-test":"mocha build/cjs/system-test --timeout 600000 --exit","test":"c8 mocha build/cjs/test"},"dependencies":{"@google-cloud/paginator":"^5.0.0","@google-cloud/projectify":"^4.0.0","@google-cloud/promisify":"^4.0.0","abort-controller":"^3.0.0","async-retry":"^1.3.3","duplexify":"^4.1.3","fast-xml-parser":"^4.3.0","gaxios":"^6.0.2","google-auth-library":"^9.6.3","html-entities":"^2.5.2","mime":"^3.0.0","p-limit":"^3.0.1","retry-request":"^7.0.0","teeny-request":"^9.0.0","uuid":"^8.0.0"},"devDependencies":{"@babel/cli":"^7.22.10","@babel/core":"^7.22.11","@google-cloud/pubsub":"^4.0.0","@grpc/grpc-js":"^1.0.3","@grpc/proto-loader":"^0.7.0","@types/async-retry":"^1.4.3","@types/duplexify":"^3.6.4","@types/mime":"^3.0.0","@types/mocha":"^9.1.1","@types/mockery":"^1.4.29","@types/node":"^20.4.4","@types/node-fetch":"^2.1.3","@types/proxyquire":"^1.3.28","@types/request":"^2.48.4","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^8.0.0","@types/yargs":"^17.0.10","c8":"^9.0.0","form-data":"^4.0.0","gapic-tools":"^0.4.0","gts":"^5.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^3.0.0","jsdoc-region-tag":"^3.0.0","linkinator":"^4.0.0","mocha":"^9.2.2","mockery":"^2.1.0","nock":"~13.5.0","node-fetch":"^2.6.7","pack-n-play":"^2.0.0","proxyquire":"^2.1.3","sinon":"^17.0.0","tmp":"^0.2.0","typescript":"^5.1.6","yargs":"^17.3.1"}}'); +module.exports = JSON.parse('{"name":"@google-cloud/storage","description":"Cloud Storage Client Library for Node.js","version":"7.19.0","license":"Apache-2.0","author":"Google Inc.","engines":{"node":">=14"},"repository":"googleapis/nodejs-storage","main":"./build/cjs/src/index.js","types":"./build/cjs/src/index.d.ts","type":"module","exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"files":["build/cjs/src","build/cjs/package.json","!build/cjs/src/**/*.map","build/esm/src","!build/esm/src/**/*.map"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google storage","storage"],"scripts":{"all-test":"npm test && npm run system-test && npm run samples-test","benchwrapper":"node bin/benchwrapper.js","check":"gts check","clean":"rm -rf build/","compile:cjs":"tsc -p ./tsconfig.cjs.json","compile:esm":"tsc -p .","compile":"npm run compile:cjs && npm run compile:esm","conformance-test":"mocha --parallel build/cjs/conformance-test/ --require build/cjs/conformance-test/globalHooks.js","docs-test":"linkinator docs","docs":"jsdoc -c .jsdoc.json","fix":"gts fix","lint":"gts check","postcompile":"cp ./src/package-json-helper.cjs ./build/cjs/src && cp ./src/package-json-helper.cjs ./build/esm/src","postcompile:cjs":"babel --plugins gapic-tools/build/src/replaceImportMetaUrl,gapic-tools/build/src/toggleESMFlagVariable build/cjs/src/util.js -o build/cjs/src/util.js && cp internal-tooling/helpers/package.cjs.json build/cjs/package.json","precompile":"rm -rf build/","preconformance-test":"npm run compile:cjs -- --sourceMap","predocs-test":"npm run docs","predocs":"npm run compile:cjs -- --sourceMap","prelint":"cd samples; npm link ../; npm install","prepare":"npm run compile","presystem-test:esm":"npm run compile:esm","presystem-test":"npm run compile -- --sourceMap","pretest":"npm run compile -- --sourceMap","samples-test":"npm link && cd samples/ && npm link ../ && npm test && cd ../","system-test:esm":"mocha build/esm/system-test --timeout 600000 --exit","system-test":"mocha build/cjs/system-test --timeout 600000 --exit","test":"c8 mocha build/cjs/test"},"dependencies":{"@google-cloud/paginator":"^5.0.0","@google-cloud/projectify":"^4.0.0","@google-cloud/promisify":"<4.1.0","abort-controller":"^3.0.0","async-retry":"^1.3.3","duplexify":"^4.1.3","fast-xml-parser":"^5.3.4","gaxios":"^6.0.2","google-auth-library":"^9.6.3","html-entities":"^2.5.2","mime":"^3.0.0","p-limit":"^3.0.1","retry-request":"^7.0.0","teeny-request":"^9.0.0","uuid":"^8.0.0"},"devDependencies":{"@babel/cli":"^7.22.10","@babel/core":"^7.22.11","@google-cloud/pubsub":"^4.0.0","@grpc/grpc-js":"^1.0.3","@grpc/proto-loader":"^0.8.0","@types/async-retry":"^1.4.3","@types/duplexify":"^3.6.4","@types/mime":"^3.0.0","@types/mocha":"^9.1.1","@types/mockery":"^1.4.29","@types/node":"^24.0.0","@types/node-fetch":"^2.1.3","@types/proxyquire":"^1.3.28","@types/request":"^2.48.4","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^8.0.0","@types/yargs":"^17.0.10","c8":"^9.0.0","form-data":"^4.0.4","gapic-tools":"^0.4.0","gts":"^5.0.0","jsdoc":"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0","linkinator":"^3.0.0","mocha":"^9.2.2","mockery":"^2.1.0","nock":"~13.5.0","node-fetch":"^2.6.7","pack-n-play":"^2.0.0","proxyquire":"^2.1.3","sinon":"^18.0.0","nise":"6.0.0","path-to-regexp":"6.3.0","tmp":"^0.2.0","typescript":"^5.1.6","yargs":"^17.3.1"}}'); /***/ }), @@ -133175,7 +139879,7 @@ module.exports = JSON.parse('{"name":"@google-cloud/storage","description":"Clou /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"gaxios","version":"6.6.0","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/src/index.js","types":"build/src/index.d.ts","files":["build/src"],"scripts":{"lint":"gts check","test":"c8 mocha build/test","presystem-test":"npm run compile","system-test":"mocha build/system-test --timeout 80000","compile":"tsc -p .","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"compodoc src/","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean","precompile":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=14"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@compodoc/compodoc":"1.1.21","@types/cors":"^2.8.6","@types/express":"^4.16.1","@types/extend":"^3.0.1","@types/mocha":"^9.0.0","@types/multiparty":"0.0.36","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.0.0","@types/node-fetch":"^2.5.7","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^9.0.0","abort-controller":"^3.0.0","assert":"^2.0.0","browserify":"^17.0.0","c8":"^8.0.0","cors":"^2.8.5","execa":"^5.0.0","express":"^4.16.4","form-data":"^4.0.0","gts":"^5.0.0","is-docker":"^2.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","linkinator":"^4.0.0","mocha":"^8.0.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","puppeteer":"^21.0.0","sinon":"^17.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.35.0","webpack-cli":"^4.0.0"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","is-stream":"^2.0.0","node-fetch":"^2.6.9","uuid":"^9.0.1"}}'); +module.exports = JSON.parse('{"name":"gaxios","version":"6.7.1","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/src/index.js","types":"build/src/index.d.ts","files":["build/src"],"scripts":{"lint":"gts check","test":"c8 mocha build/test","presystem-test":"npm run compile","system-test":"mocha build/system-test --timeout 80000","compile":"tsc -p .","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"compodoc src/","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean","precompile":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=14"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@compodoc/compodoc":"1.1.19","@types/cors":"^2.8.6","@types/express":"^4.16.1","@types/extend":"^3.0.1","@types/mocha":"^9.0.0","@types/multiparty":"0.0.36","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.0.0","@types/node-fetch":"^2.5.7","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^10.0.0","abort-controller":"^3.0.0","assert":"^2.0.0","browserify":"^17.0.0","c8":"^8.0.0","cheerio":"1.0.0-rc.10","cors":"^2.8.5","execa":"^5.0.0","express":"^4.16.4","form-data":"^4.0.0","gts":"^5.0.0","is-docker":"^2.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","linkinator":"^3.0.0","mocha":"^8.0.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","puppeteer":"^19.0.0","sinon":"^18.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.35.0","webpack-cli":"^4.0.0"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","is-stream":"^2.0.0","node-fetch":"^2.6.9","uuid":"^9.0.1"}}'); /***/ }), @@ -133183,7 +139887,7 @@ module.exports = JSON.parse('{"name":"gaxios","version":"6.6.0","description":"A /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"google-auth-library","version":"9.10.0","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=14"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^6.1.1","gcp-metadata":"^6.1.0","gtoken":"^7.0.0","jws":"^4.0.0"},"devDependencies":{"@compodoc/compodoc":"1.1.23","@types/base64-js":"^1.2.5","@types/chai":"^4.1.7","@types/jws":"^3.1.0","@types/mocha":"^9.0.0","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.4.2","@types/sinon":"^10.0.0","assert-rejects":"^1.0.0","c8":"^8.0.0","chai":"^4.2.0","codecov":"^3.0.2","execa":"^5.0.0","gts":"^5.0.0","is-docker":"^2.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","keypair":"^1.0.4","linkinator":"^4.0.0","mocha":"^9.2.2","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","puppeteer":"^21.0.0","sinon":"^15.0.0","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"compodoc src/","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install","precompile":"gts clean"},"license":"Apache-2.0"}'); +module.exports = JSON.parse('{"name":"google-auth-library","version":"9.15.1","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=14"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^6.1.1","gcp-metadata":"^6.1.0","gtoken":"^7.0.0","jws":"^4.0.0"},"devDependencies":{"@types/base64-js":"^1.2.5","@types/chai":"^4.1.7","@types/jws":"^3.1.0","@types/mocha":"^9.0.0","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.4.2","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0","c8":"^8.0.0","chai":"^4.2.0","cheerio":"1.0.0-rc.12","codecov":"^3.0.2","engine.io":"6.6.2","gts":"^5.0.0","is-docker":"^2.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^3.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","keypair":"^1.0.4","linkinator":"^4.0.0","mocha":"^9.2.2","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","pdfmake":"0.2.12","puppeteer":"^21.0.0","sinon":"^18.0.0","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"jsdoc -c .jsdoc.json","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install","precompile":"gts clean"},"license":"Apache-2.0"}'); /***/ }), @@ -133195,7 +139899,7 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":" /***/ }), -/***/ 1907: +/***/ 72020: /***/ ((module) => { "use strict"; diff --git a/dist/setup/index.js b/dist/setup/index.js index 06616bc94..20283f41b 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -436,7 +436,7 @@ const requestUtils_1 = __nccwpck_require__(13981); const storage_1 = __nccwpck_require__(27577); const uploadUtils_1 = __nccwpck_require__(1786); const google_auth_library_1 = __nccwpck_require__(20810); -const storage_blob_1 = __nccwpck_require__(84100); +const storage_blob_1 = __nccwpck_require__(37168); const versionSalt = '1.0'; function getCacheApiUrl(resource) { var _a; @@ -5131,7 +5131,11 @@ function coerce (version, options) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5144,7 +5148,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5206,13 +5210,13 @@ class Command { } } function escapeData(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') @@ -5230,7 +5234,11 @@ function escapeProperty(s) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5243,7 +5251,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5257,7 +5265,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; const command_1 = __nccwpck_require__(87351); const file_command_1 = __nccwpck_require__(717); const utils_1 = __nccwpck_require__(5278); @@ -5277,7 +5285,7 @@ var ExitCode; * A code indicating that the action was a failure */ ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +})(ExitCode || (exports.ExitCode = ExitCode = {})); //----------------------------------------------------------------------- // Variables //----------------------------------------------------------------------- @@ -5288,13 +5296,13 @@ var ExitCode; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); + return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val)); } - command_1.issueCommand('set-env', { name }, convertedVal); + (0, command_1.issueCommand)('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; /** @@ -5302,7 +5310,7 @@ exports.exportVariable = exportVariable; * @param secret value of the secret */ function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); + (0, command_1.issueCommand)('add-mask', {}, secret); } exports.setSecret = setSecret; /** @@ -5312,10 +5320,10 @@ exports.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env['GITHUB_PATH'] || ''; if (filePath) { - file_command_1.issueFileCommand('PATH', inputPath); + (0, file_command_1.issueFileCommand)('PATH', inputPath); } else { - command_1.issueCommand('add-path', {}, inputPath); + (0, command_1.issueCommand)('add-path', {}, inputPath); } process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } @@ -5390,10 +5398,10 @@ exports.getBooleanInput = getBooleanInput; function setOutput(name, value) { const filePath = process.env['GITHUB_OUTPUT'] || ''; if (filePath) { - return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value)); } process.stdout.write(os.EOL); - command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); + (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value)); } exports.setOutput = setOutput; /** @@ -5402,7 +5410,7 @@ exports.setOutput = setOutput; * */ function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); + (0, command_1.issue)('echo', enabled ? 'on' : 'off'); } exports.setCommandEcho = setCommandEcho; //----------------------------------------------------------------------- @@ -5433,7 +5441,7 @@ exports.isDebug = isDebug; * @param message debug message */ function debug(message) { - command_1.issueCommand('debug', {}, message); + (0, command_1.issueCommand)('debug', {}, message); } exports.debug = debug; /** @@ -5442,7 +5450,7 @@ exports.debug = debug; * @param properties optional properties to add to the annotation. */ function error(message, properties = {}) { - command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.error = error; /** @@ -5451,7 +5459,7 @@ exports.error = error; * @param properties optional properties to add to the annotation. */ function warning(message, properties = {}) { - command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning; /** @@ -5460,7 +5468,7 @@ exports.warning = warning; * @param properties optional properties to add to the annotation. */ function notice(message, properties = {}) { - command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); + (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.notice = notice; /** @@ -5479,14 +5487,14 @@ exports.info = info; * @param name The name of the output group */ function startGroup(name) { - command_1.issue('group', name); + (0, command_1.issue)('group', name); } exports.startGroup = startGroup; /** * End an output group. */ function endGroup() { - command_1.issue('endgroup'); + (0, command_1.issue)('endgroup'); } exports.endGroup = endGroup; /** @@ -5524,9 +5532,9 @@ exports.group = group; function saveState(name, value) { const filePath = process.env['GITHUB_STATE'] || ''; if (filePath) { - return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value)); } - command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); + (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value)); } exports.saveState = saveState; /** @@ -5562,6 +5570,10 @@ var path_utils_1 = __nccwpck_require__(2981); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +/** + * Platform utilities exports + */ +exports.platform = __importStar(__nccwpck_require__(85243)); //# sourceMappingURL=core.js.map /***/ }), @@ -5574,7 +5586,11 @@ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: funct // For internal use, subject to change. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5587,7 +5603,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5595,9 +5611,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ +const crypto = __importStar(__nccwpck_require__(6113)); const fs = __importStar(__nccwpck_require__(57147)); const os = __importStar(__nccwpck_require__(22037)); -const uuid_1 = __nccwpck_require__(78974); const utils_1 = __nccwpck_require__(5278); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; @@ -5607,14 +5623,14 @@ function issueFileCommand(command, message) { if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { encoding: 'utf8' }); } exports.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_1.toCommandValue(value); + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); // These should realistically never happen, but just in case someone finds a // way to exploit uuid generation let's not allow keys or values that contain // the delimiter. @@ -5699,9 +5715,9 @@ class OidcClient { const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } - core_1.debug(`ID token url is ${id_token_url}`); + (0, core_1.debug)(`ID token url is ${id_token_url}`); const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); + (0, core_1.setSecret)(id_token); return id_token; } catch (error) { @@ -5722,7 +5738,11 @@ exports.OidcClient = OidcClient; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -5735,7 +5755,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -5780,6 +5800,107 @@ exports.toPlatformPath = toPlatformPath; /***/ }), +/***/ 85243: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; +const os_1 = __importDefault(__nccwpck_require__(22037)); +const exec = __importStar(__nccwpck_require__(71514)); +const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; +}); +const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; + return { + name, + version + }; +}); +const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { + silent: true + }); + const [name, version] = stdout.trim().split('\n'); + return { + name, + version + }; +}); +exports.platform = os_1.default.platform(); +exports.arch = os_1.default.arch(); +exports.isWindows = exports.platform === 'win32'; +exports.isMacOS = exports.platform === 'darwin'; +exports.isLinux = exports.platform === 'linux'; +function getDetails() { + return __awaiter(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, (yield (exports.isWindows + ? getWindowsInfo() + : exports.isMacOS + ? getMacOsInfo() + : getLinuxInfo()))), { platform: exports.platform, + arch: exports.arch, + isWindows: exports.isWindows, + isMacOS: exports.isMacOS, + isLinux: exports.isLinux }); + }); +} +exports.getDetails = getDetails; +//# sourceMappingURL=platform.js.map + +/***/ }), + /***/ 81327: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -6117,652 +6238,6 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 78974: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(81595)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(26993)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(51472)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(16217)); - -var _nil = _interopRequireDefault(__nccwpck_require__(32381)); - -var _version = _interopRequireDefault(__nccwpck_require__(40427)); - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 5842: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 32381: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 26385: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 86230: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 9784: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 38844: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 61458: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 81595: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 26993: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(65920)); - -var _md = _interopRequireDefault(__nccwpck_require__(5842)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 65920: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -var _parse = _interopRequireDefault(__nccwpck_require__(26385)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 51472: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(61458)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 16217: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(65920)); - -var _sha = _interopRequireDefault(__nccwpck_require__(38844)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 92609: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(86230)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 40427: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(92609)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - /***/ 71514: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -7530,6 +7005,7 @@ class Context { this.action = process.env.GITHUB_ACTION; this.actor = process.env.GITHUB_ACTOR; this.job = process.env.GITHUB_JOB; + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; @@ -7796,7 +7272,7 @@ function hashFiles(patterns, currentWorkspace = '', options, verbose = false) { followSymbolicLinks = options.followSymbolicLinks; } const globber = yield create(patterns, { followSymbolicLinks }); - return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } exports.hashFiles = hashFiles; @@ -7811,7 +7287,11 @@ exports.hashFiles = hashFiles; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -7824,7 +7304,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -7839,7 +7319,8 @@ function getOptions(copy) { followSymbolicLinks: true, implicitDescendants: true, matchDirectories: true, - omitBrokenSymbolicLinks: true + omitBrokenSymbolicLinks: true, + excludeHiddenFiles: false }; if (copy) { if (typeof copy.followSymbolicLinks === 'boolean') { @@ -7858,6 +7339,10 @@ function getOptions(copy) { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } + if (typeof copy.excludeHiddenFiles === 'boolean') { + result.excludeHiddenFiles = copy.excludeHiddenFiles; + core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + } } return result; } @@ -7873,7 +7358,11 @@ exports.getOptions = getOptions; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -7886,7 +7375,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -7940,19 +7429,21 @@ class DefaultGlobber { return this.searchPaths.slice(); } glob() { - var e_1, _a; + var _a, e_1, _b, _c; return __awaiter(this, void 0, void 0, function* () { const result = []; try { - for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) { - const itemPath = _c.value; + for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { + _c = _f.value; + _d = false; + const itemPath = _c; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); } finally { if (e_1) throw e_1.error; } } @@ -8010,6 +7501,10 @@ class DefaultGlobber { if (!stats) { continue; } + // Hidden file or directory? + if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) { + continue; + } // Directory if (stats.isDirectory()) { // Matched @@ -8115,7 +7610,11 @@ exports.DefaultGlobber = DefaultGlobber; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8128,7 +7627,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8157,19 +7656,21 @@ const stream = __importStar(__nccwpck_require__(12781)); const util = __importStar(__nccwpck_require__(73837)); const path = __importStar(__nccwpck_require__(71017)); function hashFiles(globber, currentWorkspace, verbose = false) { - var e_1, _a; - var _b; + var _a, e_1, _b, _c; + var _d; return __awaiter(this, void 0, void 0, function* () { const writeDelegate = verbose ? core.info : core.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace - : (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); + : (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash('sha256'); let count = 0; try { - for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { - const file = _d.value; + for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; writeDelegate(file); if (!file.startsWith(`${githubWorkspace}${path.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); @@ -8192,7 +7693,7 @@ function hashFiles(globber, currentWorkspace, verbose = false) { catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); } finally { if (e_1) throw e_1.error; } } @@ -8232,7 +7733,7 @@ var MatchKind; MatchKind[MatchKind["File"] = 2] = "File"; /** Matched */ MatchKind[MatchKind["All"] = 3] = "All"; -})(MatchKind = exports.MatchKind || (exports.MatchKind = {})); +})(MatchKind || (exports.MatchKind = MatchKind = {})); //# sourceMappingURL=internal-match-kind.js.map /***/ }), @@ -8244,7 +7745,11 @@ var MatchKind; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8257,7 +7762,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8307,8 +7812,8 @@ exports.dirname = dirname; * or `C:` are expanded based on the current working directory. */ function ensureAbsoluteRoot(root, itemPath) { - assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); - assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); + (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); // Already rooted if (hasAbsoluteRoot(itemPath)) { return itemPath; @@ -8318,7 +7823,7 @@ function ensureAbsoluteRoot(root, itemPath) { // Check for itemPath like C: or C:foo if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); // Drive letter matches cwd? Expand to cwd if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { // Drive only, e.g. C: @@ -8343,11 +7848,11 @@ function ensureAbsoluteRoot(root, itemPath) { // Check for itemPath like \ or \foo else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); - assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); + (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } - assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); + (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); // Otherwise ensure root ends with a separator if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) { // Intentionally empty @@ -8364,7 +7869,7 @@ exports.ensureAbsoluteRoot = ensureAbsoluteRoot; * `\\hello\share` and `C:\hello` (and using alternate separator). */ function hasAbsoluteRoot(itemPath) { - assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); // Normalize separators itemPath = normalizeSeparators(itemPath); // Windows @@ -8381,7 +7886,7 @@ exports.hasAbsoluteRoot = hasAbsoluteRoot; * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator). */ function hasRoot(itemPath) { - assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`); // Normalize separators itemPath = normalizeSeparators(itemPath); // Windows @@ -8449,7 +7954,11 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8462,7 +7971,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8487,7 +7996,7 @@ class Path { this.segments = []; // String if (typeof itemPath === 'string') { - assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); + (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); // Normalize slashes and trim unnecessary trailing slash itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); // Not rooted @@ -8514,24 +8023,24 @@ class Path { // Array else { // Must not be empty - assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); + (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); // Each segment for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; // Must not be empty - assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); + (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`); // Normalize slashes segment = pathHelper.normalizeSeparators(itemPath[i]); // Root segment if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); - assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); + (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } // All other segments else { // Must not contain slash - assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -8569,7 +8078,11 @@ exports.Path = Path; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8582,7 +8095,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8670,7 +8183,11 @@ exports.partialMatch = partialMatch; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -8683,7 +8200,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -8715,9 +8232,9 @@ class Pattern { else { // Convert to pattern segments = segments || []; - assert_1.default(segments.length, `Parameter 'segments' must not empty`); + (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`); const root = Pattern.getLiteral(segments[0]); - assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); + (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; @@ -8811,13 +8328,13 @@ class Pattern { */ static fixupPattern(pattern, homedir) { // Empty - assert_1.default(pattern, 'pattern cannot be empty'); + (0, assert_1.default)(pattern, 'pattern cannot be empty'); // Must not contain `.` segment, unless first segment // Must not contain `..` segment const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x)); - assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); + (0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r - assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); + (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); // Normalize slashes pattern = pathHelper.normalizeSeparators(pattern); // Replace leading `.` segment @@ -8827,8 +8344,8 @@ class Pattern { // Replace leading `~` segment else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) { homedir = homedir || os.homedir(); - assert_1.default(homedir, 'Unable to determine HOME directory'); - assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); + (0, assert_1.default)(homedir, 'Unable to determine HOME directory'); + (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); pattern = Pattern.globEscape(homedir) + pattern.substr(1); } // Replace relative drive root, e.g. pattern is C: or C:foo @@ -12835,27553 +12352,2409 @@ function coerce (version, options) { /***/ }), -/***/ 4654: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 46412: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +/*! + * Copyright 2015 Google Inc. All Rights Reserved. + * + * 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. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpProxyAgent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const tls = __importStar(__nccwpck_require__(24404)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const events_1 = __nccwpck_require__(82361); -const agent_base_1 = __nccwpck_require__(70694); -const url_1 = __nccwpck_require__(57310); -const debug = (0, debug_1.default)('http-proxy-agent'); -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. +exports.ResourceStream = exports.paginator = exports.Paginator = void 0; +/*! + * @module common/paginator */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpProxyAgent instance: %o', this.proxy.href); - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; +const arrify = __nccwpck_require__(61546); +const extend = __nccwpck_require__(38171); +const resource_stream_1 = __nccwpck_require__(72199); +Object.defineProperty(exports, "ResourceStream", ({ enumerable: true, get: function () { return resource_stream_1.ResourceStream; } })); +/*! Developer Documentation + * + * paginator is used to auto-paginate `nextQuery` methods as well as + * streamifying them. + * + * Before: + * + * search.query('done=true', function(err, results, nextQuery) { + * search.query(nextQuery, function(err, results, nextQuery) {}); + * }); + * + * After: + * + * search.query('done=true', function(err, results) {}); + * + * Methods to extend should be written to accept callbacks and return a + * `nextQuery`. + */ +class Paginator { + /** + * Cache the original method, then overwrite it on the Class's prototype. + * + * @param {function} Class - The parent class of the methods to extend. + * @param {string|string[]} methodNames - Name(s) of the methods to extend. + */ + // tslint:disable-next-line:variable-name + extend(Class, methodNames) { + methodNames = arrify(methodNames); + methodNames.forEach(methodName => { + const originalMethod = Class.prototype[methodName]; + // map the original method to a private member + Class.prototype[methodName + '_'] = originalMethod; + // overwrite the original to auto-paginate + /* eslint-disable @typescript-eslint/no-explicit-any */ + Class.prototype[methodName] = function (...args) { + const parsedArguments = paginator.parseArguments_(args); + return paginator.run_(parsedArguments, originalMethod.bind(this)); + }; + }); } - addRequest(req, opts) { - req._header = null; - this.setRequestProps(req, opts); - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - super.addRequest(req, opts); + /** + * Wraps paginated API calls in a readable object stream. + * + * This method simply calls the nextQuery recursively, emitting results to a + * stream. The stream ends when `nextQuery` is null. + * + * `maxResults` will act as a cap for how many results are fetched and emitted + * to the stream. + * + * @param {string} methodName - Name of the method to streamify. + * @return {function} - Wrapped function. + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ + streamify(methodName) { + return function ( + /* eslint-disable @typescript-eslint/no-explicit-any */ + ...args) { + const parsedArguments = paginator.parseArguments_(args); + const originalMethod = this[methodName + '_'] || this[methodName]; + return paginator.runAsStream_(parsedArguments, originalMethod.bind(this)); + }; } - setRequestProps(req, opts) { - const { proxy } = this; - const protocol = opts.secureEndpoint ? 'https:' : 'http:'; - const hostname = req.getHeader('host') || 'localhost'; - const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); - if (opts.port !== 80) { - url.port = String(opts.port); + /** + * Parse a pseudo-array `arguments` for a query and callback. + * + * @param {array} args - The original `arguments` pseduo-array that the original + * method received. + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ + parseArguments_(args) { + let query; + let autoPaginate = true; + let maxApiCalls = -1; + let maxResults = -1; + let callback; + const firstArgument = args[0]; + const lastArgument = args[args.length - 1]; + if (typeof firstArgument === 'function') { + callback = firstArgument; } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = String(url); - // Inject the `Proxy-Authorization` header if necessary. - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; + else { + query = firstArgument; } - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; + if (typeof lastArgument === 'function') { + callback = lastArgument; } - for (const name of Object.keys(headers)) { - const value = headers[name]; - if (value) { - req.setHeader(name, value); + if (typeof query === 'object') { + query = extend(true, {}, query); + // Check if the user only asked for a certain amount of results. + if (query.maxResults && typeof query.maxResults === 'number') { + // `maxResults` is used API-wide. + maxResults = query.maxResults; + } + else if (typeof query.pageSize === 'number') { + // `pageSize` is Pub/Sub's `maxResults`. + maxResults = query.pageSize; + } + if (query.maxApiCalls && typeof query.maxApiCalls === 'number') { + maxApiCalls = query.maxApiCalls; + delete query.maxApiCalls; + } + // maxResults is the user specified limit. + if (maxResults !== -1 || query.autoPaginate === false) { + autoPaginate = false; } } + const parsedArguments = { + query: query || {}, + autoPaginate, + maxApiCalls, + maxResults, + callback, + }; + parsedArguments.streamOptions = extend(true, {}, parsedArguments.query); + delete parsedArguments.streamOptions.autoPaginate; + delete parsedArguments.streamOptions.maxResults; + delete parsedArguments.streamOptions.pageSize; + return parsedArguments; } - async connect(req, opts) { - req._header = null; - if (!req.path.includes('://')) { - this.setRequestProps(req, opts); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._implicitHeader(); - if (req.outputData && req.outputData.length > 0) { - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - // Create a socket connection to the proxy server. - let socket; - if (this.proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - socket = tls.connect(this.connectOpts); + /** + * This simply checks to see if `autoPaginate` is set or not, if it's true + * then we buffer all results, otherwise simply call the original method. + * + * @param {array} parsedArguments - Parsed arguments from the original method + * call. + * @param {object=|string=} parsedArguments.query - Query object. This is most + * commonly an object, but to make the API more simple, it can also be a + * string in some places. + * @param {function=} parsedArguments.callback - Callback function. + * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. + * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. + * @param {number} parsedArguments.maxResults - Maximum results to return. + * @param {function} originalMethod - The cached method that accepts a callback + * and returns `nextQuery` to receive more results. + */ + run_(parsedArguments, originalMethod) { + const query = parsedArguments.query; + const callback = parsedArguments.callback; + if (!parsedArguments.autoPaginate) { + return originalMethod(query, callback); } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); + const results = new Array(); + let otherArgs = []; + const promise = new Promise((resolve, reject) => { + const stream = paginator.runAsStream_(parsedArguments, originalMethod); + stream + .on('error', reject) + .on('data', (data) => results.push(data)) + .on('end', () => { + otherArgs = stream._otherArgs || []; + resolve(results); + }); + }); + if (!callback) { + return promise.then(results => [results, query, ...otherArgs]); } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - await (0, events_1.once)(socket, 'connect'); - return socket; + promise.then(results => callback(null, results, query, ...otherArgs), (err) => callback(err)); } -} -HttpProxyAgent.protocols = ['http', 'https']; -exports.HttpProxyAgent = HttpProxyAgent; -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } + /** + * This method simply calls the nextQuery recursively, emitting results to a + * stream. The stream ends when `nextQuery` is null. + * + * `maxResults` will act as a cap for how many results are fetched and emitted + * to the stream. + * + * @param {object=|string=} parsedArguments.query - Query object. This is most + * commonly an object, but to make the API more simple, it can also be a + * string in some places. + * @param {function=} parsedArguments.callback - Callback function. + * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. + * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. + * @param {number} parsedArguments.maxResults - Maximum results to return. + * @param {function} originalMethod - The cached method that accepts a callback + * and returns `nextQuery` to receive more results. + * @return {stream} - Readable object stream. + */ + /* eslint-disable @typescript-eslint/no-explicit-any */ + runAsStream_(parsedArguments, originalMethod) { + return new resource_stream_1.ResourceStream(parsedArguments, originalMethod); } - return ret; } +exports.Paginator = Paginator; +const paginator = new Paginator(); +exports.paginator = paginator; //# sourceMappingURL=index.js.map /***/ }), -/***/ 84100: +/***/ 72199: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var coreRestPipeline = __nccwpck_require__(29146); -var tslib = __nccwpck_require__(4351); -var coreAuth = __nccwpck_require__(98834); -var coreUtil = __nccwpck_require__(80637); -var coreHttpCompat = __nccwpck_require__(25083); -var coreClient = __nccwpck_require__(7611); -var coreXml = __nccwpck_require__(17309); -var logger$1 = __nccwpck_require__(89497); -var abortController = __nccwpck_require__(1753); -var crypto = __nccwpck_require__(6113); -var coreTracing = __nccwpck_require__(19363); -var stream = __nccwpck_require__(12781); -var coreLro = __nccwpck_require__(90334); -var events = __nccwpck_require__(82361); -var fs = __nccwpck_require__(57147); -var util = __nccwpck_require__(73837); -var buffer = __nccwpck_require__(14300); - -function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n.default = e; - return Object.freeze(n); -} - -var coreHttpCompat__namespace = /*#__PURE__*/_interopNamespaceDefault(coreHttpCompat); -var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient); -var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs); -var util__namespace = /*#__PURE__*/_interopNamespaceDefault(util); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The `@azure/logger` configuration for this package. - */ -const logger = logger$1.createClientLogger("storage-blob"); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The base class from which all request policies derive. +/*! + * Copyright 2019 Google Inc. All Rights Reserved. + * + * 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. */ -class BaseRequestPolicy { - /** - * The main method to implement that manipulates a request/response. - */ - constructor( - /** - * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline. - */ - _nextPolicy, - /** - * The options that can be passed to a given request policy. - */ - _options) { - this._nextPolicy = _nextPolicy; - this._options = _options; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ResourceStream = void 0; +const stream_1 = __nccwpck_require__(12781); +class ResourceStream extends stream_1.Transform { + constructor(args, requestFn) { + const options = Object.assign({ objectMode: true }, args.streamOptions); + super(options); + this._ended = false; + this._maxApiCalls = args.maxApiCalls === -1 ? Infinity : args.maxApiCalls; + this._nextQuery = args.query; + this._reading = false; + this._requestFn = requestFn; + this._requestsMade = 0; + this._resultsToSend = args.maxResults === -1 ? Infinity : args.maxResults; + this._otherArgs = []; } - /** - * Get whether or not a log with the provided log level should be logged. - * @param logLevel - The log level of the log that will be logged. - * @returns Whether or not a log with the provided log level should be logged. - */ - shouldLog(logLevel) { - return this._options.shouldLog(logLevel); + /* eslint-disable @typescript-eslint/no-explicit-any */ + end(...args) { + this._ended = true; + return super.end(...args); } - /** - * Attempt to log the provided message to the provided logger. If no logger was provided or if - * the log level does not meat the logger's threshold, then nothing will be logged. - * @param logLevel - The log level of this log. - * @param message - The message of this log. - */ - log(logLevel, message) { - this._options.log(logLevel, message); + _read() { + if (this._reading) { + return; + } + this._reading = true; + // Wrap in a try/catch to catch input linting errors, e.g. + // an invalid BigQuery query. These errors are thrown in an + // async fashion, which makes them un-catchable by the user. + try { + this._requestFn(this._nextQuery, (err, results, nextQuery, ...otherArgs) => { + if (err) { + this.destroy(err); + return; + } + this._otherArgs = otherArgs; + this._nextQuery = nextQuery; + if (this._resultsToSend !== Infinity) { + results = results.splice(0, this._resultsToSend); + this._resultsToSend -= results.length; + } + let more = true; + for (const result of results) { + if (this._ended) { + break; + } + more = this.push(result); + } + const isFinished = !this._nextQuery || this._resultsToSend < 1; + const madeMaxCalls = ++this._requestsMade >= this._maxApiCalls; + if (isFinished || madeMaxCalls) { + this.end(); + } + if (more && !this._ended) { + setImmediate(() => this._read()); + } + this._reading = false; + }); + } + catch (e) { + this.destroy(e); + } } } +exports.ResourceStream = ResourceStream; +//# sourceMappingURL=resource-stream.js.map -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const SDK_VERSION = "12.27.0"; -const SERVICE_VERSION = "2025-05-05"; -const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB -const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB -const BLOCK_BLOB_MAX_BLOCKS = 50000; -const DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB -const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB -const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; -const REQUEST_TIMEOUT = 100 * 1000; // In ms -/** - * The OAuth scope to use with Azure Storage. - */ -const StorageOAuthScopes = "https://storage.azure.com/.default"; -const URLConstants = { - Parameters: { - FORCE_BROWSER_NO_CACHE: "_", - SNAPSHOT: "snapshot", - VERSIONID: "versionid", - TIMEOUT: "timeout", - }, -}; -const HTTPURLConnection = { - HTTP_ACCEPTED: 202}; -const HeaderConstants = { - AUTHORIZATION: "Authorization", - CONTENT_ENCODING: "Content-Encoding", - CONTENT_ID: "Content-ID", - CONTENT_LANGUAGE: "Content-Language", - CONTENT_LENGTH: "Content-Length", - CONTENT_MD5: "Content-Md5", - CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", - CONTENT_TYPE: "Content-Type", - COOKIE: "Cookie", - DATE: "date", - IF_MATCH: "if-match", - IF_MODIFIED_SINCE: "if-modified-since", - IF_NONE_MATCH: "if-none-match", - IF_UNMODIFIED_SINCE: "if-unmodified-since", - PREFIX_FOR_STORAGE: "x-ms-", - RANGE: "Range", - X_MS_DATE: "x-ms-date", - X_MS_ERROR_CODE: "x-ms-error-code", - X_MS_VERSION: "x-ms-version"}; -const ETagNone = ""; -const ETagAny = "*"; -const SIZE_1_MB = 1 * 1024 * 1024; -const BATCH_MAX_REQUEST = 256; -const BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB; -const HTTP_LINE_ENDING = "\r\n"; -const HTTP_VERSION_1_1 = "HTTP/1.1"; -const EncryptionAlgorithmAES25 = "AES256"; -const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; -const StorageBlobLoggingAllowedHeaderNames = [ - "Access-Control-Allow-Origin", - "Cache-Control", - "Content-Length", - "Content-Type", - "Date", - "Request-Id", - "traceparent", - "Transfer-Encoding", - "User-Agent", - "x-ms-client-request-id", - "x-ms-date", - "x-ms-error-code", - "x-ms-request-id", - "x-ms-return-client-request-id", - "x-ms-version", - "Accept-Ranges", - "Content-Disposition", - "Content-Encoding", - "Content-Language", - "Content-MD5", - "Content-Range", - "ETag", - "Last-Modified", - "Server", - "Vary", - "x-ms-content-crc64", - "x-ms-copy-action", - "x-ms-copy-completion-time", - "x-ms-copy-id", - "x-ms-copy-progress", - "x-ms-copy-status", - "x-ms-has-immutability-policy", - "x-ms-has-legal-hold", - "x-ms-lease-state", - "x-ms-lease-status", - "x-ms-range", - "x-ms-request-server-encrypted", - "x-ms-server-encrypted", - "x-ms-snapshot", - "x-ms-source-range", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "x-ms-access-tier", - "x-ms-access-tier-change-time", - "x-ms-access-tier-inferred", - "x-ms-account-kind", - "x-ms-archive-status", - "x-ms-blob-append-offset", - "x-ms-blob-cache-control", - "x-ms-blob-committed-block-count", - "x-ms-blob-condition-appendpos", - "x-ms-blob-condition-maxsize", - "x-ms-blob-content-disposition", - "x-ms-blob-content-encoding", - "x-ms-blob-content-language", - "x-ms-blob-content-length", - "x-ms-blob-content-md5", - "x-ms-blob-content-type", - "x-ms-blob-public-access", - "x-ms-blob-sequence-number", - "x-ms-blob-type", - "x-ms-copy-destination-snapshot", - "x-ms-creation-time", - "x-ms-default-encryption-scope", - "x-ms-delete-snapshots", - "x-ms-delete-type-permanent", - "x-ms-deny-encryption-scope-override", - "x-ms-encryption-algorithm", - "x-ms-if-sequence-number-eq", - "x-ms-if-sequence-number-le", - "x-ms-if-sequence-number-lt", - "x-ms-incremental-copy", - "x-ms-lease-action", - "x-ms-lease-break-period", - "x-ms-lease-duration", - "x-ms-lease-id", - "x-ms-lease-time", - "x-ms-page-write", - "x-ms-proposed-lease-id", - "x-ms-range-get-content-md5", - "x-ms-rehydrate-priority", - "x-ms-sequence-number-action", - "x-ms-sku-name", - "x-ms-source-content-md5", - "x-ms-source-if-match", - "x-ms-source-if-modified-since", - "x-ms-source-if-none-match", - "x-ms-source-if-unmodified-since", - "x-ms-tag-count", - "x-ms-encryption-key-sha256", - "x-ms-copy-source-error-code", - "x-ms-copy-source-status-code", - "x-ms-if-tags", - "x-ms-source-if-tags", -]; -const StorageBlobLoggingAllowedQueryParameters = [ - "comp", - "maxresults", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "se", - "si", - "sip", - "sp", - "spr", - "sr", - "srt", - "ss", - "st", - "sv", - "include", - "marker", - "prefix", - "copyid", - "restype", - "blockid", - "blocklisttype", - "delimiter", - "prevsnapshot", - "ske", - "skoid", - "sks", - "skt", - "sktid", - "skv", - "snapshot", -]; -const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; -const BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; -/// List of ports used for path style addressing. -/// Path style addressing means that storage account is put in URI's Path segment in instead of in host. -const PathStylePorts = [ - "10000", - "10001", - "10002", - "10003", - "10004", - "10100", - "10101", - "10102", - "10103", - "10104", - "11000", - "11001", - "11002", - "11003", - "11004", - "11100", - "11101", - "11102", - "11103", - "11104", -]; +/***/ }), -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +/***/ 3497: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MissingProjectIdError = exports.replaceProjectIdToken = void 0; +const stream_1 = __nccwpck_require__(12781); +// Copyright 2014 Google LLC +// +// 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. /** - * Reserved URL characters must be properly escaped for Storage services like Blob or File. - * - * ## URL encode and escape strategy for JS SDKs - * - * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. - * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL - * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. - * - * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. - * - * This is what legacy V2 SDK does, simple and works for most of the cases. - * - When customer URL string is "http://account.blob.core.windows.net/con/b:", - * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", - * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. - * - * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is - * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. - * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. - * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. - * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: - * - * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. - * - * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. - * - When customer URL string is "http://account.blob.core.windows.net/con/b:", - * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", - * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. - * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", - * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. - * - * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string - * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. - * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. - * And following URL strings are invalid: - * - "http://account.blob.core.windows.net/con/b%" - * - "http://account.blob.core.windows.net/con/b%2" - * - "http://account.blob.core.windows.net/con/b%G" - * - * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. - * - * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` - * - * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * Populate the `{{projectId}}` placeholder. * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * @throws {Error} If a projectId is required, but one is not provided. * - * @param url - + * @param {*} - Any input value that may contain a placeholder. Arrays and objects will be looped. + * @param {string} projectId - A projectId. If not provided + * @return {*} - The original argument with all placeholders populated. */ -function escapeURLPath(url) { - const urlParsed = new URL(url); - let path = urlParsed.pathname; - path = path || "/"; - path = escape(path); - urlParsed.pathname = path; - return urlParsed.toString(); -} -function getProxyUriFromDevConnString(connectionString) { - // Development Connection String - // https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key - let proxyUri = ""; - if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { - // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri - const matchCredentials = connectionString.split(";"); - for (const element of matchCredentials) { - if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { - proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function replaceProjectIdToken(value, projectId) { + if (Array.isArray(value)) { + value = value.map(v => replaceProjectIdToken(v, projectId)); + } + if (value !== null && + typeof value === 'object' && + !(value instanceof Buffer) && + !(value instanceof stream_1.Stream) && + typeof value.hasOwnProperty === 'function') { + for (const opt in value) { + // eslint-disable-next-line no-prototype-builtins + if (value.hasOwnProperty(opt)) { + value[opt] = replaceProjectIdToken(value[opt], projectId); } } } - return proxyUri; -} -function getValueInConnString(connectionString, argument) { - const elements = connectionString.split(";"); - for (const element of elements) { - if (element.trim().startsWith(argument)) { - return element.trim().match(argument + "=(.*)")[1]; + if (typeof value === 'string' && + value.indexOf('{{projectId}}') > -1) { + if (!projectId || projectId === '{{projectId}}') { + throw new MissingProjectIdError(); } + value = value.replace(/{{projectId}}/g, projectId); } - return ""; + return value; } +exports.replaceProjectIdToken = replaceProjectIdToken; /** - * Extracts the parts of an Azure Storage account connection string. + * Custom error type for missing project ID errors. + */ +class MissingProjectIdError extends Error { + constructor() { + super(...arguments); + this.message = `Sorry, we cannot connect to Cloud Services without a project + ID. You may specify one with an environment variable named + "GOOGLE_CLOUD_PROJECT".`.replace(/ +/g, ' '); + } +} +exports.MissingProjectIdError = MissingProjectIdError; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 19203: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* eslint-disable prefer-rest-params */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.callbackifyAll = exports.callbackify = exports.promisifyAll = exports.promisify = void 0; +/** + * Wraps a callback style function to conditionally return a promise. * - * @param connectionString - Connection string. - * @returns String key value pairs of the storage account's url and credentials. + * @param {function} originalMethod - The method to promisify. + * @param {object=} options - Promise options. + * @param {boolean} options.singular - Resolve the promise with single arg instead of an array. + * @return {function} wrapped */ -function extractConnectionStringParts(connectionString) { - let proxyUri = ""; - if (connectionString.startsWith("UseDevelopmentStorage=true")) { - // Development connection string - proxyUri = getProxyUriFromDevConnString(connectionString); - connectionString = DevelopmentConnectionString; +function promisify(originalMethod, options) { + if (originalMethod.promisified_) { + return originalMethod; } - // Matching BlobEndpoint in the Account connection string - let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); - // Slicing off '/' at the end if exists - // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) - blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; - if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && - connectionString.search("AccountKey=") !== -1) { - // Account connection string - let defaultEndpointsProtocol = ""; - let accountName = ""; - let accountKey = Buffer.from("accountKey", "base64"); - let endpointSuffix = ""; - // Get account name and key - accountName = getValueInConnString(connectionString, "AccountName"); - accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); - if (!blobEndpoint) { - // BlobEndpoint is not present in the Account connection string - // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` - defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); - const protocol = defaultEndpointsProtocol.toLowerCase(); - if (protocol !== "https" && protocol !== "http") { - throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + options = options || {}; + const slice = Array.prototype.slice; + // tslint:disable-next-line:no-any + const wrapper = function () { + let last; + for (last = arguments.length - 1; last >= 0; last--) { + const arg = arguments[last]; + if (typeof arg === 'undefined') { + continue; // skip trailing undefined. } - endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); - if (!endpointSuffix) { - throw new Error("Invalid EndpointSuffix in the provided Connection String"); + if (typeof arg !== 'function') { + break; // non-callback last argument found. } - blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; - } - if (!accountName) { - throw new Error("Invalid AccountName in the provided Connection String"); - } - else if (accountKey.length === 0) { - throw new Error("Invalid AccountKey in the provided Connection String"); - } - return { - kind: "AccountConnString", - url: blobEndpoint, - accountName, - accountKey, - proxyUri, - }; - } - else { - // SAS connection string - let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); - let accountName = getValueInConnString(connectionString, "AccountName"); - // if accountName is empty, try to read it from BlobEndpoint - if (!accountName) { - accountName = getAccountNameFromUrl(blobEndpoint); - } - if (!blobEndpoint) { - throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); - } - else if (!accountSas) { - throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + return originalMethod.apply(this, arguments); } - // client constructors assume accountSas does *not* start with ? - if (accountSas.startsWith("?")) { - accountSas = accountSas.substring(1); + // peel trailing undefined. + const args = slice.call(arguments, 0, last + 1); + // tslint:disable-next-line:variable-name + let PromiseCtor = Promise; + // Because dedupe will likely create a single install of + // @google-cloud/common to be shared amongst all modules, we need to + // localize it at the Service level. + if (this && this.Promise) { + PromiseCtor = this.Promise; } - return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; - } -} -/** - * Internal escape method implemented Strategy Two mentioned in escapeURL() description. - * - * @param text - - */ -function escape(text) { - return encodeURIComponent(text) - .replace(/%2F/g, "/") // Don't escape for "/" - .replace(/'/g, "%27") // Escape for "'" - .replace(/\+/g, "%20") - .replace(/%25/g, "%"); // Revert encoded "%" + return new PromiseCtor((resolve, reject) => { + // tslint:disable-next-line:no-any + args.push((...args) => { + const callbackArgs = slice.call(args); + const err = callbackArgs.shift(); + if (err) { + return reject(err); + } + if (options.singular && callbackArgs.length === 1) { + resolve(callbackArgs[0]); + } + else { + resolve(callbackArgs); + } + }); + originalMethod.apply(this, args); + }); + }; + wrapper.promisified_ = true; + return wrapper; } +exports.promisify = promisify; /** - * Append a string to URL path. Will remove duplicated "/" in front of the string - * when URL path ends with a "/". + * Promisifies certain Class methods. This will not promisify private or + * streaming methods. * - * @param url - Source URL string - * @param name - String to be appended to URL - * @returns An updated URL string + * @param {module:common/service} Class - Service class. + * @param {object=} options - Configuration object. */ -function appendToURLPath(url, name) { - const urlParsed = new URL(url); - let path = urlParsed.pathname; - path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name; - urlParsed.pathname = path; - return urlParsed.toString(); -} -/** - * Set URL parameter name and value. If name exists in URL parameters, old value - * will be replaced by name key. If not provide value, the parameter will be deleted. - * - * @param url - Source URL string - * @param name - Parameter name - * @param value - Parameter value - * @returns An updated URL string - */ -function setURLParameter(url, name, value) { - const urlParsed = new URL(url); - const encodedName = encodeURIComponent(name); - const encodedValue = value ? encodeURIComponent(value) : undefined; - // mutating searchParams will change the encoding, so we have to do this ourselves - const searchString = urlParsed.search === "" ? "?" : urlParsed.search; - const searchPieces = []; - for (const pair of searchString.slice(1).split("&")) { - if (pair) { - const [key] = pair.split("=", 2); - if (key !== encodedName) { - searchPieces.push(pair); - } +// tslint:disable-next-line:variable-name +function promisifyAll(Class, options) { + const exclude = (options && options.exclude) || []; + const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); + const methods = ownPropertyNames.filter(methodName => { + // clang-format off + return (!exclude.includes(methodName) && + typeof Class.prototype[methodName] === 'function' && // is it a function? + !/(^_|(Stream|_)|promise$)|^constructor$/.test(methodName) // is it promisable? + ); + // clang-format on + }); + methods.forEach(methodName => { + const originalMethod = Class.prototype[methodName]; + if (!originalMethod.promisified_) { + Class.prototype[methodName] = exports.promisify(originalMethod, options); } - } - if (encodedValue) { - searchPieces.push(`${encodedName}=${encodedValue}`); - } - urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; - return urlParsed.toString(); -} -/** - * Get URL parameter by name. - * - * @param url - - * @param name - - */ -function getURLParameter(url, name) { - var _a; - const urlParsed = new URL(url); - return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : undefined; -} -/** - * Set URL host. - * - * @param url - Source URL string - * @param host - New host string - * @returns An updated URL string - */ -function setURLHost(url, host) { - const urlParsed = new URL(url); - urlParsed.hostname = host; - return urlParsed.toString(); -} -/** - * Get URL path from an URL string. - * - * @param url - Source URL string - */ -function getURLPath(url) { - try { - const urlParsed = new URL(url); - return urlParsed.pathname; - } - catch (e) { - return undefined; - } -} -/** - * Get URL scheme from an URL string. - * - * @param url - Source URL string - */ -function getURLScheme(url) { - try { - const urlParsed = new URL(url); - return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; - } - catch (e) { - return undefined; - } -} -/** - * Get URL path and query from an URL string. - * - * @param url - Source URL string - */ -function getURLPathAndQuery(url) { - const urlParsed = new URL(url); - const pathString = urlParsed.pathname; - if (!pathString) { - throw new RangeError("Invalid url without valid path."); - } - let queryString = urlParsed.search || ""; - queryString = queryString.trim(); - if (queryString !== "") { - queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?' - } - return `${pathString}${queryString}`; -} -/** - * Get URL query key value pairs from an URL string. - * - * @param url - - */ -function getURLQueries(url) { - let queryString = new URL(url).search; - if (!queryString) { - return {}; - } - queryString = queryString.trim(); - queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; - let querySubStrings = queryString.split("&"); - querySubStrings = querySubStrings.filter((value) => { - const indexOfEqual = value.indexOf("="); - const lastIndexOfEqual = value.lastIndexOf("="); - return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); }); - const queries = {}; - for (const querySubString of querySubStrings) { - const splitResults = querySubString.split("="); - const key = splitResults[0]; - const value = splitResults[1]; - queries[key] = value; - } - return queries; -} -/** - * Append a string to URL query. - * - * @param url - Source URL string. - * @param queryParts - String to be appended to the URL query. - * @returns An updated URL string. - */ -function appendToURLQuery(url, queryParts) { - const urlParsed = new URL(url); - let query = urlParsed.search; - if (query) { - query += "&" + queryParts; - } - else { - query = queryParts; - } - urlParsed.search = query; - return urlParsed.toString(); -} -/** - * Rounds a date off to seconds. - * - * @param date - - * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; - * If false, YYYY-MM-DDThh:mm:ssZ will be returned. - * @returns Date string in ISO8061 format, with or without 7 milliseconds component - */ -function truncatedISO8061Date(date, withMilliseconds = true) { - // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" - const dateString = date.toISOString(); - return withMilliseconds - ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" - : dateString.substring(0, dateString.length - 5) + "Z"; -} -/** - * Base64 encode. - * - * @param content - - */ -function base64encode(content) { - return !coreUtil.isNode ? btoa(content) : Buffer.from(content).toString("base64"); } +exports.promisifyAll = promisifyAll; /** - * Generate a 64 bytes base64 block ID string. + * Wraps a promisy type function to conditionally call a callback function. * - * @param blockIndex - + * @param {function} originalMethod - The method to callbackify. + * @param {object=} options - Callback options. + * @param {boolean} options.singular - Pass to the callback a single arg instead of an array. + * @return {function} wrapped */ -function generateBlockID(blockIDPrefix, blockIndex) { - // To generate a 64 bytes base64 string, source string should be 48 - const maxSourceStringLength = 48; - // A blob can have a maximum of 100,000 uncommitted blocks at any given time - const maxBlockIndexLength = 6; - const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; - if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { - blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); +function callbackify(originalMethod) { + if (originalMethod.callbackified_) { + return originalMethod; } - const res = blockIDPrefix + - padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); - return base64encode(res); + // tslint:disable-next-line:no-any + const wrapper = function () { + if (typeof arguments[arguments.length - 1] !== 'function') { + return originalMethod.apply(this, arguments); + } + const cb = Array.prototype.pop.call(arguments); + originalMethod.apply(this, arguments).then( + // tslint:disable-next-line:no-any + (res) => { + res = Array.isArray(res) ? res : [res]; + cb(null, ...res); + }, (err) => cb(err)); + }; + wrapper.callbackified_ = true; + return wrapper; } +exports.callbackify = callbackify; /** - * Delay specified time interval. + * Callbackifies certain Class methods. This will not callbackify private or + * streaming methods. * - * @param timeInMs - - * @param aborter - - * @param abortError - + * @param {module:common/service} Class - Service class. + * @param {object=} options - Configuration object. */ -async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve, reject) => { - /* eslint-disable-next-line prefer-const */ - let timeout; - const abortHandler = () => { - if (timeout !== undefined) { - clearTimeout(timeout); - } - reject(abortError); - }; - const resolveHandler = () => { - if (aborter !== undefined) { - aborter.removeEventListener("abort", abortHandler); - } - resolve(); - }; - timeout = setTimeout(resolveHandler, timeInMs); - if (aborter !== undefined) { - aborter.addEventListener("abort", abortHandler); +function callbackifyAll( +// tslint:disable-next-line:variable-name +Class, options) { + const exclude = (options && options.exclude) || []; + const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); + const methods = ownPropertyNames.filter(methodName => { + // clang-format off + return (!exclude.includes(methodName) && + typeof Class.prototype[methodName] === 'function' && // is it a function? + !/^_|(Stream|_)|^constructor$/.test(methodName) // is it callbackifyable? + ); + // clang-format on + }); + methods.forEach(methodName => { + const originalMethod = Class.prototype[methodName]; + if (!originalMethod.callbackified_) { + Class.prototype[methodName] = exports.callbackify(originalMethod); } }); } -/** - * String.prototype.padStart() - * - * @param currentString - - * @param targetLength - - * @param padString - - */ -function padStart(currentString, targetLength, padString = " ") { - // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes - if (String.prototype.padStart) { - return currentString.padStart(targetLength, padString); - } - padString = padString || " "; - if (currentString.length > targetLength) { - return currentString; - } - else { - targetLength = targetLength - currentString.length; - if (targetLength > padString.length) { - padString += padString.repeat(targetLength / padString.length); - } - return padString.slice(0, targetLength) + currentString; - } +exports.callbackifyAll = callbackifyAll; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 44458: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); + +var _v = _interopRequireDefault(__nccwpck_require__(33542)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(29411)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(83424)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(64051)); + +var _nil = _interopRequireDefault(__nccwpck_require__(46570)); + +var _version = _interopRequireDefault(__nccwpck_require__(35611)); + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +var _parse = _interopRequireDefault(__nccwpck_require__(99645)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ 84953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); } -/** - * If two strings are equal when compared case insensitive. - * - * @param str1 - - * @param str2 - - */ -function iEqual(str1, str2) { - return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +/***/ 46570: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 99645: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; } -/** - * Extracts account name from the url - * @param url - url to extract the account name from - * @returns with the account name - */ -function getAccountNameFromUrl(url) { - const parsedUrl = new URL(url); - let accountName; - try { - if (parsedUrl.hostname.split(".")[1] === "blob") { - // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; - accountName = parsedUrl.hostname.split(".")[0]; - } - else if (isIpEndpointStyle(parsedUrl)) { - // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ - // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ - // .getPath() -> /devstoreaccount1/ - accountName = parsedUrl.pathname.split("/")[1]; - } - else { - // Custom domain case: "https://customdomain.com/containername/blob". - accountName = ""; - } - return accountName; - } - catch (error) { - throw new Error("Unable to extract accountName with provided information."); - } + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 94323: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 91430: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); } -function isIpEndpointStyle(parsedUrl) { - const host = parsedUrl.host; - // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. - // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part. - // Case 3: Ipv4, use broad regex which just check if host contains Ipv4. - // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html. - return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || - (Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port))); + +/***/ }), + +/***/ 77416: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); } + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +/***/ 32122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + /** - * Convert Tags to encoded string. - * - * @param tags - + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ -function toBlobTagsString(tags) { - if (tags === undefined) { - return undefined; - } - const tagPairs = []; - for (const key in tags) { - if (Object.prototype.hasOwnProperty.call(tags, key)) { - const value = tags[key]; - tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); - } - } - return tagPairs.join("&"); +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); } -/** - * Convert Tags type to BlobTags. - * - * @param tags - - */ -function toBlobTags(tags) { - if (tags === undefined) { - return undefined; - } - const res = { - blobTagSet: [], - }; - for (const key in tags) { - if (Object.prototype.hasOwnProperty.call(tags, key)) { - const value = tags[key]; - res.blobTagSet.push({ - key, - value, - }); - } - } - return res; + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; } -/** - * Covert BlobTags to Tags type. - * - * @param tags - - */ -function toTags(tags) { - if (tags === undefined) { - return undefined; + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 33542: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(91430)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } - const res = {}; - for (const blobTag of tags.blobTagSet) { - res[blobTag.key] = blobTag.value; + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; } - return res; + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); } -/** - * Convert BlobQueryTextConfiguration to QuerySerialization type. - * - * @param textConfiguration - - */ -function toQuerySerialization(textConfiguration) { - if (textConfiguration === undefined) { - return undefined; - } - switch (textConfiguration.kind) { - case "csv": - return { - format: { - type: "delimited", - delimitedTextConfiguration: { - columnSeparator: textConfiguration.columnSeparator || ",", - fieldQuote: textConfiguration.fieldQuote || "", - recordSeparator: textConfiguration.recordSeparator, - escapeChar: textConfiguration.escapeCharacter || "", - headersPresent: textConfiguration.hasHeaders || false, - }, - }, - }; - case "json": - return { - format: { - type: "json", - jsonTextConfiguration: { - recordSeparator: textConfiguration.recordSeparator, - }, - }, - }; - case "arrow": - return { - format: { - type: "arrow", - arrowConfiguration: { - schema: textConfiguration.schema, - }, - }, - }; - case "parquet": - return { - format: { - type: "parquet", - }, - }; - default: - throw Error("Invalid BlobQueryTextConfiguration."); - } + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 29411: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(74624)); + +var _md = _interopRequireDefault(__nccwpck_require__(84953)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 74624: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +var _parse = _interopRequireDefault(__nccwpck_require__(99645)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; } -function parseObjectReplicationRecord(objectReplicationRecord) { - if (!objectReplicationRecord) { - return undefined; + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); } - if ("policy-id" in objectReplicationRecord) { - // If the dictionary contains a key with policy id, we are not required to do any parsing since - // the policy id should already be stored in the ObjectReplicationDestinationPolicyId. - return undefined; + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); } - const orProperties = []; - for (const key in objectReplicationRecord) { - const ids = key.split("_"); - const policyPrefix = "or-"; - if (ids[0].startsWith(policyPrefix)) { - ids[0] = ids[0].substring(policyPrefix.length); - } - const rule = { - ruleId: ids[1], - replicationStatus: objectReplicationRecord[key], - }; - const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); - if (policyIndex > -1) { - orProperties[policyIndex].rules.push(rule); - } - else { - orProperties.push({ - policyId: ids[0], - rules: [rule], - }); - } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; } - return orProperties; -} -function httpAuthorizationToString(httpAuthorization) { - return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; } -function BlobNameToString(name) { - if (name.encoded) { - return decodeURIComponent(name.content); - } - else { - return name.content; + +/***/ }), + +/***/ 83424: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(91430)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } + + return buf; + } + + return (0, _stringify.default)(rnds); } -function ConvertInternalResponseOfListBlobFlat(internalResponse) { - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }), - } }); -} -function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { - var _a; - return Object.assign(Object.assign({}, internalResponse), { segment: { - blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }), - blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { - const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) }); - return blobItem; - }), - } }); -} -function* ExtractPageRangeInfoItems(getPageRangesSegment) { - let pageRange = []; - let clearRange = []; - if (getPageRangesSegment.pageRange) - pageRange = getPageRangesSegment.pageRange; - if (getPageRangesSegment.clearRange) - clearRange = getPageRangesSegment.clearRange; - let pageRangeIndex = 0; - let clearRangeIndex = 0; - while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) { - if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { - yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false, - }; - ++pageRangeIndex; - } - else { - yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true, - }; - ++clearRangeIndex; - } - } - for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) { - yield { - start: pageRange[pageRangeIndex].start, - end: pageRange[pageRangeIndex].end, - isClear: false, - }; - } - for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) { - yield { - start: clearRange[clearRangeIndex].start, - end: clearRange[clearRangeIndex].end, - isClear: true, - }; - } -} -/** - * Escape the blobName but keep path separator ('/'). - */ -function EscapePath(blobName) { - const split = blobName.split("/"); - for (let i = 0; i < split.length; i++) { - split[i] = encodeURIComponent(split[i]); - } - return split.join("/"); + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +/***/ 64051: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(74624)); + +var _sha = _interopRequireDefault(__nccwpck_require__(77416)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +/***/ 20937: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(94323)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); } -/** - * A typesafe helper for ensuring that a given response object has - * the original _response attached. - * @param response - A response object from calling a client operation - * @returns The same object, but with known _response property - */ -function assertResponse(response) { - if (`_response` in response) { - return response; - } - throw new TypeError(`Unexpected response object ${response}`); + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +/***/ 35611: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(20937)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * RetryPolicy types. - */ -exports.StorageRetryPolicyType = void 0; -(function (StorageRetryPolicyType) { - /** - * Exponential retry. Retry time delay grows exponentially. - */ - StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - /** - * Linear retry. Retry time delay grows linearly. - */ - StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; -})(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {})); -// Default values of StorageRetryOptions -const DEFAULT_RETRY_OPTIONS$1 = { - maxRetryDelayInMs: 120 * 1000, - maxTries: 4, - retryDelayInMs: 4 * 1000, - retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL, - secondaryHost: "", - tryTimeoutInMs: undefined, // Use server side default timeout strategy +var _default = version; +exports["default"] = _default; + +/***/ }), + +/***/ 40334: +/***/ ((module) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -const RETRY_ABORT_ERROR$1 = new abortController.AbortError("The operation was aborted."); -/** - * Retry policy with exponential retry and linear retry implemented. - */ -class StorageRetryPolicy extends BaseRequestPolicy { - /** - * Creates an instance of RetryPolicy. - * - * @param nextPolicy - - * @param options - - * @param retryOptions - - */ - constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS$1) { - super(nextPolicy, options); - // Initialize retry options - this.retryOptions = { - retryPolicyType: retryOptions.retryPolicyType - ? retryOptions.retryPolicyType - : DEFAULT_RETRY_OPTIONS$1.retryPolicyType, - maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 - ? Math.floor(retryOptions.maxTries) - : DEFAULT_RETRY_OPTIONS$1.maxTries, - tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 - ? retryOptions.tryTimeoutInMs - : DEFAULT_RETRY_OPTIONS$1.tryTimeoutInMs, - retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 - ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs - ? retryOptions.maxRetryDelayInMs - : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs) - : DEFAULT_RETRY_OPTIONS$1.retryDelayInMs, - maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 - ? retryOptions.maxRetryDelayInMs - : DEFAULT_RETRY_OPTIONS$1.maxRetryDelayInMs, - secondaryHost: retryOptions.secondaryHost - ? retryOptions.secondaryHost - : DEFAULT_RETRY_OPTIONS$1.secondaryHost, - }; - } - /** - * Sends request. - * - * @param request - - */ - async sendRequest(request) { - return this.attemptSendRequest(request, false, 1); - } - /** - * Decide and perform next retry. Won't mutate request parameter. - * - * @param request - - * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then - * the resource was not found. This may be due to replication delay. So, in this - * case, we'll never try the secondary again for this operation. - * @param attempt - How many retries has been attempted to performed, starting from 1, which includes - * the attempt will be performed by this method call. - */ - async attemptSendRequest(request, secondaryHas404, attempt) { - const newRequest = request.clone(); - const isPrimaryRetry = secondaryHas404 || - !this.retryOptions.secondaryHost || - !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || - attempt % 2 === 1; - if (!isPrimaryRetry) { - newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost); - } - // Set the server-side timeout query parameter "timeout=[seconds]" - if (this.retryOptions.tryTimeoutInMs) { - newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); - } - let response; - try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); - response = await this._nextPolicy.sendRequest(newRequest); - if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { - return response; - } - secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); - } - catch (err) { - logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); - if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { - throw err; - } - } - await this.delay(isPrimaryRetry, attempt, request.abortSignal); - return this.attemptSendRequest(request, secondaryHas404, ++attempt); - } - /** - * Decide whether to retry according to last HTTP response and retry counters. - * - * @param isPrimaryRetry - - * @param attempt - - * @param response - - * @param err - - */ - shouldRetry(isPrimaryRetry, attempt, response, err) { - if (attempt >= this.retryOptions.maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions - .maxTries}, no further try.`); - return false; - } - // Handle network failures, you may need to customize the list when you implement - // your own http client - const retriableErrors = [ - "ETIMEDOUT", - "ESOCKETTIMEDOUT", - "ECONNREFUSED", - "ECONNRESET", - "ENOENT", - "ENOTFOUND", - "TIMEOUT", - "EPIPE", - "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js - ]; - if (err) { - for (const retriableError of retriableErrors) { - if (err.name.toUpperCase().includes(retriableError) || - err.message.toUpperCase().includes(retriableError) || - (err.code && err.code.toString().toUpperCase() === retriableError)) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); - return true; - } - } - } - // If attempt was against the secondary & it returned a StatusNotFound (404), then - // the resource was not found. This may be due to replication delay. So, in this - // case, we'll never try the secondary again for this operation. - if (response || err) { - const statusCode = response ? response.status : err ? err.statusCode : 0; - if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); - return true; - } - // Server internal error or server timeout - if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); - return true; - } - } - // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. - // if (response) { - // // Retry select Copy Source Error Codes. - // if (response?.status >= 400) { - // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); - // if (copySourceError !== undefined) { - // switch (copySourceError) { - // case "InternalError": - // case "OperationTimedOut": - // case "ServerBusy": - // return true; - // } - // } - // } - // } - if ((err === null || err === void 0 ? void 0 : err.code) === "PARSE_ERROR" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); - return true; - } - return false; - } - /** - * Delay a calculated time between retries. - * - * @param isPrimaryRetry - - * @param attempt - - * @param abortSignal - - */ - async delay(isPrimaryRetry, attempt, abortSignal) { - let delayTimeInMs = 0; - if (isPrimaryRetry) { - switch (this.retryOptions.retryPolicyType) { - case exports.StorageRetryPolicyType.EXPONENTIAL: - delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); - break; - case exports.StorageRetryPolicyType.FIXED: - delayTimeInMs = this.retryOptions.retryDelayInMs; - break; - } - } - else { - delayTimeInMs = Math.random() * 1000; - } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR$1); - } +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + createTokenAuth: () => createTokenAuth +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/auth.js +var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +var REGEX_IS_INSTALLATION = /^ghs_/; +var REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. - */ -class StorageRetryPolicyFactory { - /** - * Creates an instance of StorageRetryPolicyFactory. - * @param retryOptions - - */ - constructor(retryOptions) { - this.retryOptions = retryOptions; - } - /** - * Creates a StorageRetryPolicy object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageRetryPolicy(nextPolicy, options, this.retryOptions); - } +// pkg/dist-src/with-authorization-prefix.js +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Credential policy used to sign HTTP(S) requests before sending. This is an - * abstract class. - */ -class CredentialPolicy extends BaseRequestPolicy { - /** - * Sends out request. - * - * @param request - - */ - sendRequest(request) { - return this._nextPolicy.sendRequest(this.signRequest(request)); - } - /** - * Child classes must implement this method with request signing. This method - * will be executed in {@link sendRequest}. - * - * @param request - - */ - signRequest(request) { - // Child classes must override this method with request signing. This method - // will be executed in sendRequest(). - return request; - } +// pkg/dist-src/hook.js +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/* - * We need to imitate .Net culture-aware sorting, which is used in storage service. - * Below tables contain sort-keys for en-US culture. - */ -const table_lv0 = new Uint32Array([ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721, - 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e, - 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a, - 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89, - 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748, - 0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, - 0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c, - 0x0, 0x750, 0x0, -]); -const table_lv2 = new Uint32Array([ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, - 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, - 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, -]); -const table_lv4 = new Uint32Array([ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, -]); -function compareHeader(lhs, rhs) { - if (isLessThan(lhs, rhs)) - return -1; - return 1; +// pkg/dist-src/index.js +var createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 76762: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var index_exports = {}; +__export(index_exports, { + Octokit: () => Octokit +}); +module.exports = __toCommonJS(index_exports); +var import_universal_user_agent = __nccwpck_require__(45030); +var import_before_after_hook = __nccwpck_require__(83682); +var import_request = __nccwpck_require__(36234); +var import_graphql = __nccwpck_require__(88467); +var import_auth_token = __nccwpck_require__(40334); + +// pkg/dist-src/version.js +var VERSION = "5.2.2"; + +// pkg/dist-src/index.js +var noop = () => { +}; +var consoleWarn = console.warn.bind(console); +var consoleError = console.error.bind(console); +function createLogger(logger = {}) { + if (typeof logger.debug !== "function") { + logger.debug = noop; + } + if (typeof logger.info !== "function") { + logger.info = noop; + } + if (typeof logger.warn !== "function") { + logger.warn = consoleWarn; + } + if (typeof logger.error !== "function") { + logger.error = consoleError; + } + return logger; } -function isLessThan(lhs, rhs) { - const tables = [table_lv0, table_lv2, table_lv4]; - let curr_level = 0; - let i = 0; - let j = 0; - while (curr_level < tables.length) { - if (curr_level === tables.length - 1 && i !== j) { - return i > j; - } - const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1; - const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1; - if (weight1 === 0x1 && weight2 === 0x1) { - i = 0; - j = 0; - ++curr_level; - } - else if (weight1 === weight2) { - ++i; - ++j; - } - else if (weight1 === 0) { - ++i; - } - else if (weight2 === 0) { - ++j; - } - else { - return weight1 < weight2; +var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var Octokit = class { + static { + this.VERSION = VERSION; + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; } + super( + Object.assign( + {}, + defaults, + options, + options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; + } + static { + this.plugins = []; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; + return NewOctokit; + } + constructor(options = {}) { + const hook = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; } - return false; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. - */ -class StorageSharedKeyCredentialPolicy extends CredentialPolicy { - /** - * Creates an instance of StorageSharedKeyCredentialPolicy. - * @param nextPolicy - - * @param options - - * @param factory - - */ - constructor(nextPolicy, options, factory) { - super(nextPolicy, options); - this.factory = factory; - } - /** - * Signs request. - * - * @param request - - */ - signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); - if (request.body && - (typeof request.body === "string" || request.body !== undefined) && - request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); - } - const stringToSign = [ - request.method.toUpperCase(), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - this.getHeaderValueToSign(request, HeaderConstants.DATE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - this.getHeaderValueToSign(request, HeaderConstants.RANGE), - ].join("\n") + - "\n" + - this.getCanonicalizedHeadersString(request) + - this.getCanonicalizedResourceString(request); - const signature = this.factory.computeHMACSHA256(stringToSign); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); - // console.log(`[URL]:${request.url}`); - // console.log(`[HEADERS]:${request.headers.toString()}`); - // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); - // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); - return request; + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; } - /** - * Retrieve header value according to shared key sign rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - * - * @param request - - * @param headerName - - */ - getHeaderValueToSign(request, headerName) { - const value = request.headers.get(headerName); - if (!value) { - return ""; - } - // When using version 2015-02-21 or later, if Content-Length is zero, then - // set the Content-Length part of the StringToSign to an empty string. - // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { - return ""; - } - return value; + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; } - /** - * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: - * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. - * 2. Convert each HTTP header name to lowercase. - * 3. Sort the headers lexicographically by header name, in ascending order. - * Each header may appear only once in the string. - * 4. Replace any linear whitespace in the header value with a single space. - * 5. Trim any whitespace around the colon in the header. - * 6. Finally, append a new-line character to each canonicalized header in the resulting list. - * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. - * - * @param request - - */ - getCanonicalizedHeadersString(request) { - let headersArray = request.headers.headersArray().filter((value) => { - return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE); - }); - headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); - }); - // Remove duplicate headers - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { - return false; - } - return true; - }); - let canonicalizedHeadersStringToSign = ""; - headersArray.forEach((header) => { - canonicalizedHeadersStringToSign += `${header.name - .toLowerCase() - .trimRight()}:${header.value.trimLeft()}\n`; + this.request = import_request.request.defaults(requestDefaults); + this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); + this.log = createLogger(options.log); + this.hook = hook; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" }); - return canonicalizedHeadersStringToSign; + } else { + const auth = (0, import_auth_token.createTokenAuth)(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; } - /** - * Retrieves the webResource canonicalized resource string. - * - * @param request - - */ - getCanonicalizedResourceString(request) { - const path = getURLPath(request.url) || "/"; - let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path}`; - const queries = getURLQueries(request.url); - const lowercaseQueries = {}; - if (queries) { - const queryKeys = []; - for (const key in queries) { - if (Object.prototype.hasOwnProperty.call(queries, key)) { - const lowercaseKey = key.toLowerCase(); - lowercaseQueries[lowercaseKey] = queries[key]; - queryKeys.push(lowercaseKey); - } - } - queryKeys.sort(); - for (const key of queryKeys) { - canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; - } - } - return canonicalizedResourceString; + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); } + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 59440: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + endpoint: () => endpoint +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "9.0.6"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + +// pkg/dist-src/util/lowercase-keys.js +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Credential is an abstract class for Azure Storage HTTP requests signing. This - * class will host an credentialPolicyCreator factory which generates CredentialPolicy. - */ -class Credential { - /** - * Creates a RequestPolicy object. - * - * @param _nextPolicy - - * @param _options - - */ - create(_nextPolicy, _options) { - throw new Error("Method should be implemented in children classes."); - } +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * StorageSharedKeyCredential for account key authorization of Azure Storage service. - */ -class StorageSharedKeyCredential extends Credential { - /** - * Creates an instance of StorageSharedKeyCredential. - * @param accountName - - * @param accountKey - - */ - constructor(accountName, accountKey) { - super(); - this.accountName = accountName; - this.accountKey = Buffer.from(accountKey, "base64"); - } - /** - * Creates a StorageSharedKeyCredentialPolicy object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this); - } - /** - * Generates a hash signature for an HTTP request or for a SAS. - * - * @param stringToSign - - */ - computeHMACSHA256(stringToSign) { - return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); +// pkg/dist-src/util/merge-deep.js +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); } + }); + return result; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources - * or for use with Shared Access Signatures (SAS). - */ -class AnonymousCredentialPolicy extends CredentialPolicy { - /** - * Creates an instance of AnonymousCredentialPolicy. - * @param nextPolicy - - * @param options - - */ - // The base class has a protected constructor. Adding a public one to enable constructing of this class. - /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ - constructor(nextPolicy, options) { - super(nextPolicy, options); +// pkg/dist-src/util/remove-undefined-properties.js +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; } + } + return obj; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * AnonymousCredential provides a credentialPolicyCreator member used to create - * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with - * HTTP(S) requests that read public resources or for use with Shared Access - * Signatures (SAS). - */ -class AnonymousCredential extends Credential { - /** - * Creates an {@link AnonymousCredentialPolicy} object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new AnonymousCredentialPolicy(nextPolicy, options); +// pkg/dist-src/merge.js +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -let _defaultHttpClient; -function getCachedDefaultHttpClient() { - if (!_defaultHttpClient) { - _defaultHttpClient = coreRestPipeline.createDefaultHttpClient(); +// pkg/dist-src/util/add-query-parameters.js +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } - return _defaultHttpClient; + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The programmatic identifier of the StorageBrowserPolicy. - */ -const storageBrowserPolicyName = "storageBrowserPolicy"; -/** - * storageBrowserPolicy is a policy used to prevent browsers from caching requests - * and to remove cookies and explicit content-length headers. - */ -function storageBrowserPolicy() { - return { - name: storageBrowserPolicyName, - async sendRequest(request, next) { - if (coreUtil.isNode) { - return next(request); - } - if (request.method === "GET" || request.method === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - } - request.headers.delete(HeaderConstants.COOKIE); - // According to XHR standards, content-length should be fully controlled by browsers - request.headers.delete(HeaderConstants.CONTENT_LENGTH); - return next(request); - }, - }; +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^{}}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Name of the {@link storageRetryPolicy} - */ -const storageRetryPolicyName = "storageRetryPolicy"; -/** - * RetryPolicy types. - */ -var StorageRetryPolicyType; -(function (StorageRetryPolicyType) { - /** - * Exponential retry. Retry time delay grows exponentially. - */ - StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; - /** - * Linear retry. Retry time delay grows linearly. - */ - StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; -})(StorageRetryPolicyType || (StorageRetryPolicyType = {})); -// Default values of StorageRetryOptions -const DEFAULT_RETRY_OPTIONS = { - maxRetryDelayInMs: 120 * 1000, - maxTries: 4, - retryDelayInMs: 4 * 1000, - retryPolicyType: StorageRetryPolicyType.EXPONENTIAL, - secondaryHost: "", - tryTimeoutInMs: undefined, // Use server side default timeout strategy -}; -const retriableErrors = [ - "ETIMEDOUT", - "ESOCKETTIMEDOUT", - "ECONNREFUSED", - "ECONNRESET", - "ENOENT", - "ENOTFOUND", - "TIMEOUT", - "EPIPE", - "REQUEST_SEND_ERROR", -]; -const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted."); -/** - * Retry policy with exponential retry and linear retry implemented. - */ -function storageRetryPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f; - const retryPolicyType = (_a = options.retryPolicyType) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_OPTIONS.retryPolicyType; - const maxTries = (_b = options.maxTries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_OPTIONS.maxTries; - const retryDelayInMs = (_c = options.retryDelayInMs) !== null && _c !== void 0 ? _c : DEFAULT_RETRY_OPTIONS.retryDelayInMs; - const maxRetryDelayInMs = (_d = options.maxRetryDelayInMs) !== null && _d !== void 0 ? _d : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; - const secondaryHost = (_e = options.secondaryHost) !== null && _e !== void 0 ? _e : DEFAULT_RETRY_OPTIONS.secondaryHost; - const tryTimeoutInMs = (_f = options.tryTimeoutInMs) !== null && _f !== void 0 ? _f : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; - function shouldRetry({ isPrimaryRetry, attempt, response, error, }) { - var _a, _b; - if (attempt >= maxTries) { - logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); - return false; - } - if (error) { - for (const retriableError of retriableErrors) { - if (error.name.toUpperCase().includes(retriableError) || - error.message.toUpperCase().includes(retriableError) || - (error.code && error.code.toString().toUpperCase() === retriableError)) { - logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); - return true; - } - } - if ((error === null || error === void 0 ? void 0 : error.code) === "PARSE_ERROR" && - (error === null || error === void 0 ? void 0 : error.message.startsWith(`Error "Error: Unclosed root tag`))) { - logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); - return true; - } - } - // If attempt was against the secondary & it returned a StatusNotFound (404), then - // the resource was not found. This may be due to replication delay. So, in this - // case, we'll never try the secondary again for this operation. - if (response || error) { - const statusCode = (_b = (_a = response === null || response === void 0 ? void 0 : response.status) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.statusCode) !== null && _b !== void 0 ? _b : 0; - if (!isPrimaryRetry && statusCode === 404) { - logger.info(`RetryPolicy: Secondary access with 404, will retry.`); - return true; - } - // Server internal error or server timeout - if (statusCode === 503 || statusCode === 500) { - logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); - return true; - } - } - // [Copy source error code] Feature is pending on service side, skip retry on copy source error for now. - // if (response) { - // // Retry select Copy Source Error Codes. - // if (response?.status >= 400) { - // const copySourceError = response.headers.get(HeaderConstants.X_MS_CopySourceErrorCode); - // if (copySourceError !== undefined) { - // switch (copySourceError) { - // case "InternalError": - // case "OperationTimedOut": - // case "ServerBusy": - // return true; - // } - // } - // } - // } - return false; - } - function calculateDelay(isPrimaryRetry, attempt) { - let delayTimeInMs = 0; - if (isPrimaryRetry) { - switch (retryPolicyType) { - case StorageRetryPolicyType.EXPONENTIAL: - delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); - break; - case StorageRetryPolicyType.FIXED: - delayTimeInMs = retryDelayInMs; - break; - } - } - else { - delayTimeInMs = Math.random() * 1000; - } - logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); - return delayTimeInMs; +// pkg/dist-src/util/omit.js +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; } - return { - name: storageRetryPolicyName, - async sendRequest(request, next) { - // Set the server-side timeout query parameter "timeout=[seconds]" - if (tryTimeoutInMs) { - request.url = setURLParameter(request.url, URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000))); - } - const primaryUrl = request.url; - const secondaryUrl = secondaryHost ? setURLHost(request.url, secondaryHost) : undefined; - let secondaryHas404 = false; - let attempt = 1; - let retryAgain = true; - let response; - let error; - while (retryAgain) { - const isPrimaryRetry = secondaryHas404 || - !secondaryUrl || - !["GET", "HEAD", "OPTIONS"].includes(request.method) || - attempt % 2 === 1; - request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; - response = undefined; - error = undefined; - try { - logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); - response = await next(request); - secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); - } - catch (e) { - if (coreRestPipeline.isRestError(e)) { - logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); - error = e; - } - else { - logger.error(`RetryPolicy: Caught error, message: ${coreUtil.getErrorMessage(e)}`); - throw e; - } - } - retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); - if (retryAgain) { - await delay(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); - } - attempt++; - } - if (response) { - return response; - } - throw error !== null && error !== void 0 ? error : new coreRestPipeline.RestError("RetryPolicy failed without known error."); - }, - }; + } + return result; } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The programmatic identifier of the storageSharedKeyCredentialPolicy. - */ -const storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; -/** - * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. - */ -function storageSharedKeyCredentialPolicy(options) { - function signRequest(request) { - request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString()); - if (request.body && - (typeof request.body === "string" || Buffer.isBuffer(request.body)) && - request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); - } - const stringToSign = [ - request.method.toUpperCase(), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE), - getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING), - getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH), - getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5), - getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE), - getHeaderValueToSign(request, HeaderConstants.DATE), - getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.IF_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH), - getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE), - getHeaderValueToSign(request, HeaderConstants.RANGE), - ].join("\n") + - "\n" + - getCanonicalizedHeadersString(request) + - getCanonicalizedResourceString(request); - const signature = crypto.createHmac("sha256", options.accountKey) - .update(stringToSign, "utf8") - .digest("base64"); - request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); - // console.log(`[URL]:${request.url}`); - // console.log(`[HEADERS]:${request.headers.toString()}`); - // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); - // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); +// pkg/dist-src/util/url-template.js +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); } - /** - * Retrieve header value according to shared key sign rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - */ - function getHeaderValueToSign(request, headerName) { - const value = request.headers.get(headerName); - if (!value) { - return ""; + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); } - // When using version 2015-02-21 or later, if Content-Length is zero, then - // set the Content-Length part of the StringToSign to an empty string. - // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key - if (headerName === HeaderConstants.CONTENT_LENGTH && value === "0") { - return ""; + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); } - return value; + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } } - /** - * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: - * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. - * 2. Convert each HTTP header name to lowercase. - * 3. Sort the headers lexicographically by header name, in ascending order. - * Each header may appear only once in the string. - * 4. Replace any linear whitespace in the header value with a single space. - * 5. Trim any whitespace around the colon in the header. - * 6. Finally, append a new-line character to each canonicalized header in the resulting list. - * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. - * - */ - function getCanonicalizedHeadersString(request) { - let headersArray = []; - for (const [name, value] of request.headers) { - if (name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE)) { - headersArray.push({ name, value }); - } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); } - headersArray.sort((a, b) => { - return compareHeader(a.name.toLowerCase(), b.name.toLowerCase()); - }); - // Remove duplicate headers - headersArray = headersArray.filter((value, index, array) => { - if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { - return false; - } - return true; - }); - let canonicalizedHeadersStringToSign = ""; - headersArray.forEach((header) => { - canonicalizedHeadersStringToSign += `${header.name - .toLowerCase() - .trimRight()}:${header.value.trimLeft()}\n`; + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); }); - return canonicalizedHeadersStringToSign; - } - function getCanonicalizedResourceString(request) { - const path = getURLPath(request.url) || "/"; - let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path}`; - const queries = getURLQueries(request.url); - const lowercaseQueries = {}; - if (queries) { - const queryKeys = []; - for (const key in queries) { - if (Object.prototype.hasOwnProperty.call(queries, key)) { - const lowercaseKey = key.toLowerCase(); - lowercaseQueries[lowercaseKey] = queries[key]; - queryKeys.push(lowercaseKey); - } - } - queryKeys.sort(); - for (const key of queryKeys) { - canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; - } + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); } - return canonicalizedResourceString; + } else { + return encodeReserved(literal); + } } - return { - name: storageSharedKeyCredentialPolicyName, - async sendRequest(request, next) { - signRequest(request); - return next(request); - }, - }; + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: - * - * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. - * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL - * thus avoid the browser cache. - * - * 2. Remove cookie header for security - * - * 3. Remove content-length header to avoid browsers warning - */ -class StorageBrowserPolicy extends BaseRequestPolicy { - /** - * Creates an instance of StorageBrowserPolicy. - * @param nextPolicy - - * @param options - - */ - // The base class has a protected constructor. Adding a public one to enable constructing of this class. - /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ - constructor(nextPolicy, options) { - super(nextPolicy, options); +// pkg/dist-src/parse.js +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); } - /** - * Sends out request. - * - * @param request - - */ - async sendRequest(request) { - if (coreUtil.isNode) { - return this._nextPolicy.sendRequest(request); - } - if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { - request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); - } - request.headers.remove(HeaderConstants.COOKIE); - // According to XHR standards, content-length should be fully controlled by browsers - request.headers.remove(HeaderConstants.CONTENT_LENGTH); - return this._nextPolicy.sendRequest(request); + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/(? { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } + } + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. - */ -class StorageBrowserPolicyFactory { - /** - * Creates a StorageBrowserPolicyFactory object. - * - * @param nextPolicy - - * @param options - - */ - create(nextPolicy, options) { - return new StorageBrowserPolicy(nextPolicy, options); - } +// pkg/dist-src/endpoint-with-defaults.js +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * The programmatic identifier of the storageCorrectContentLengthPolicy. - */ -const storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; -/** - * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. - */ -function storageCorrectContentLengthPolicy() { - function correctContentLength(request) { - if (request.body && - (typeof request.body === "string" || Buffer.isBuffer(request.body)) && - request.body.length > 0) { - request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); - } - } - return { - name: storageCorrectContentLengthPolicyName, - async sendRequest(request, next) { - correctContentLength(request); - return next(request); - }, - }; +// pkg/dist-src/with-defaults.js +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A helper to decide if a given argument satisfies the Pipeline contract - * @param pipeline - An argument that may be a Pipeline - * @returns true when the argument satisfies the Pipeline contract - */ -function isPipelineLike(pipeline) { - if (!pipeline || typeof pipeline !== "object") { - return false; - } - const castPipeline = pipeline; - return (Array.isArray(castPipeline.factories) && - typeof castPipeline.options === "object" && - typeof castPipeline.toServiceClientOptions === "function"); +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 88467: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var index_exports = {}; +__export(index_exports, { + GraphqlResponseError: () => GraphqlResponseError, + graphql: () => graphql2, + withCustomRequest: () => withCustomRequest +}); +module.exports = __toCommonJS(index_exports); +var import_request3 = __nccwpck_require__(36234); +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "7.1.1"; + +// pkg/dist-src/with-defaults.js +var import_request2 = __nccwpck_require__(36234); + +// pkg/dist-src/graphql.js +var import_request = __nccwpck_require__(36234); + +// pkg/dist-src/error.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); } -/** - * A Pipeline class containing HTTP request policies. - * You can create a default Pipeline by calling {@link newPipeline}. - * Or you can create a Pipeline with your own policies by the constructor of Pipeline. - * - * Refer to {@link newPipeline} and provided policies before implementing your - * customized Pipeline. - */ -class Pipeline { - /** - * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. - * - * @param factories - - * @param options - - */ - constructor(factories, options = {}) { - this.factories = factories; - this.options = options; +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } - /** - * Transfer Pipeline object to ServiceClientOptions object which is required by - * ServiceClient constructor. - * - * @returns The ServiceClientOptions object from this Pipeline. - */ - toServiceClientOptions() { - return { - httpClient: this.options.httpClient, - requestPolicyFactories: this.factories, - }; + } +}; + +// pkg/dist-src/graphql.js +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); } -} -/** - * Creates a new Pipeline object with Credential provided. - * - * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. - * @param pipelineOptions - Optional. Options. - * @returns A new Pipeline object. - */ -function newPipeline(credential, pipelineOptions = {}) { - if (!credential) { - credential = new AnonymousCredential(); + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); } - const pipeline = new Pipeline([], pipelineOptions); - pipeline._credential = credential; - return pipeline; -} -function processDownlevelPipeline(pipeline) { - const knownFactoryFunctions = [ - isAnonymousCredential, - isStorageSharedKeyCredential, - isCoreHttpBearerTokenFactory, - isStorageBrowserPolicyFactory, - isStorageRetryPolicyFactory, - isStorageTelemetryPolicyFactory, - isCoreHttpPolicyFactory, - ]; - if (pipeline.factories.length) { - const novelFactories = pipeline.factories.filter((factory) => { - return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); - }); - if (novelFactories.length) { - const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); - // if there are any left over, wrap in a requestPolicyFactoryPolicy - return { - wrappedPolicies: coreHttpCompat.createRequestPolicyFactoryPolicy(novelFactories), - afterRetry: hasInjector, - }; - } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; } - return undefined; -} -function getCoreClientOptions(pipeline) { - var _a; - const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = tslib.__rest(_b, ["httpClient"]); - let httpClient = pipeline._coreHttpClient; - if (!httpClient) { - httpClient = v1Client ? coreHttpCompat.convertHttpClient(v1Client) : getCachedDefaultHttpClient(); - pipeline._coreHttpClient = httpClient; + if (!result.variables) { + result.variables = {}; } - let corePipeline = pipeline._corePipeline; - if (!corePipeline) { - const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`; - const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix - ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - corePipeline = coreClient.createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: { - additionalAllowedHeaderNames: StorageBlobLoggingAllowedHeaderNames, - additionalAllowedQueryParameters: StorageBlobLoggingAllowedQueryParameters, - logger: logger.info, - }, userAgentOptions: { - userAgentPrefix, - }, serializationOptions: { - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#", - }, - }, - }, deserializationOptions: { - parseXML: coreXml.parseXML, - serializerOptions: { - xml: { - // Use customized XML char key of "#" so we can deserialize metadata - // with "_" key - xmlCharKey: "#", - }, - }, - } })); - corePipeline.removePolicy({ phase: "Retry" }); - corePipeline.removePolicy({ name: coreRestPipeline.decompressResponsePolicyName }); - corePipeline.addPolicy(storageCorrectContentLengthPolicy()); - corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" }); - corePipeline.addPolicy(storageBrowserPolicy()); - const downlevelResults = processDownlevelPipeline(pipeline); - if (downlevelResults) { - corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : undefined); - } - const credential = getCredentialFromPipeline(pipeline); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential, - scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge }, - }), { phase: "Sign" }); - } - else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ - accountName: credential.accountName, - accountKey: credential.accountKey, - }), { phase: "Sign" }); - } - pipeline._corePipeline = corePipeline; + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); } - return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline }); + return response.data.data; + }); } -function getCredentialFromPipeline(pipeline) { - // see if we squirreled one away on the type itself - if (pipeline._credential) { - return pipeline._credential; - } - // if it came from another package, loop over the factories and look for one like before - let credential = new AnonymousCredential(); - for (const factory of pipeline.factories) { - if (coreAuth.isTokenCredential(factory.credential)) { - // Only works if the factory has been attached a "credential" property. - // We do that in newPipeline() when using TokenCredential. - credential = factory.credential; - } - else if (isStorageSharedKeyCredential(factory)) { - return factory; - } - } - return credential; + +// pkg/dist-src/with-defaults.js +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); } -function isStorageSharedKeyCredential(factory) { - if (factory instanceof StorageSharedKeyCredential) { - return true; - } - return factory.constructor.name === "StorageSharedKeyCredential"; + +// pkg/dist-src/index.js +var graphql2 = withDefaults(import_request3.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); } -function isAnonymousCredential(factory) { - if (factory instanceof AnonymousCredential) { - return true; - } - return factory.constructor.name === "AnonymousCredential"; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 64193: +/***/ ((module) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + composePaginateRest: () => composePaginateRest, + isPaginatingEndpoint: () => isPaginatingEndpoint, + paginateRest: () => paginateRest, + paginatingEndpoints: () => paginatingEndpoints +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "9.2.2"; + +// pkg/dist-src/normalize-paginated-list-response.js +function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) + return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; } -function isCoreHttpBearerTokenFactory(factory) { - return coreAuth.isTokenCredential(factory.credential); + +// pkg/dist-src/iterator.js +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^<>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } + } + }) + }; } -function isStorageBrowserPolicyFactory(factory) { - if (factory instanceof StorageBrowserPolicyFactory) { - return true; - } - return factory.constructor.name === "StorageBrowserPolicyFactory"; + +// pkg/dist-src/paginate.js +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); } -function isStorageRetryPolicyFactory(factory) { - if (factory instanceof StorageRetryPolicyFactory) { - return true; +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) { + return results; } - return factory.constructor.name === "StorageRetryPolicyFactory"; -} -function isStorageTelemetryPolicyFactory(factory) { - return factory.constructor.name === "TelemetryPolicyFactory"; -} -function isInjectorPolicyFactory(factory) { - return factory.constructor.name === "InjectorPolicyFactory"; -} -function isCoreHttpPolicyFactory(factory) { - const knownPolicies = [ - "GenerateClientRequestIdPolicy", - "TracingPolicy", - "LogPolicy", - "ProxyPolicy", - "DisableResponseDecompressionPolicy", - "KeepAlivePolicy", - "DeserializationPolicy", - ]; - const mockHttpClient = { - sendRequest: async (request) => { - return { - request, - headers: request.headers.clone(), - status: 500, - }; - }, - }; - const mockRequestPolicyOptions = { - log(_logLevel, _message) { - /* do nothing */ - }, - shouldLog(_logLevel) { - return false; - }, - }; - const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions); - const policyName = policyInstance.constructor.name; - // bundlers sometimes add a custom suffix to the class name to make it unique - return knownPolicies.some((knownPolicyName) => { - return policyName.startsWith(knownPolicyName); - }); + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator2, mapFn); + }); } -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -const BlobServiceProperties = { - serializedName: "BlobServiceProperties", - xmlName: "StorageServiceProperties", - type: { - name: "Composite", - className: "BlobServiceProperties", - modelProperties: { - blobAnalyticsLogging: { - serializedName: "Logging", - xmlName: "Logging", - type: { - name: "Composite", - className: "Logging", - }, - }, - hourMetrics: { - serializedName: "HourMetrics", - xmlName: "HourMetrics", - type: { - name: "Composite", - className: "Metrics", - }, - }, - minuteMetrics: { - serializedName: "MinuteMetrics", - xmlName: "MinuteMetrics", - type: { - name: "Composite", - className: "Metrics", - }, - }, - cors: { - serializedName: "Cors", - xmlName: "Cors", - xmlIsWrapped: true, - xmlElementName: "CorsRule", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CorsRule", - }, - }, - }, - }, - defaultServiceVersion: { - serializedName: "DefaultServiceVersion", - xmlName: "DefaultServiceVersion", - type: { - name: "String", - }, - }, - deleteRetentionPolicy: { - serializedName: "DeleteRetentionPolicy", - xmlName: "DeleteRetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - }, - }, - staticWebsite: { - serializedName: "StaticWebsite", - xmlName: "StaticWebsite", - type: { - name: "Composite", - className: "StaticWebsite", - }, - }, - }, - }, -}; -const Logging = { - serializedName: "Logging", - type: { - name: "Composite", - className: "Logging", - modelProperties: { - version: { - serializedName: "Version", - required: true, - xmlName: "Version", - type: { - name: "String", - }, - }, - deleteProperty: { - serializedName: "Delete", - required: true, - xmlName: "Delete", - type: { - name: "Boolean", - }, - }, - read: { - serializedName: "Read", - required: true, - xmlName: "Read", - type: { - name: "Boolean", - }, - }, - write: { - serializedName: "Write", - required: true, - xmlName: "Write", - type: { - name: "Boolean", - }, - }, - retentionPolicy: { - serializedName: "RetentionPolicy", - xmlName: "RetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - }, - }, - }, - }, -}; -const RetentionPolicy = { - serializedName: "RetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - modelProperties: { - enabled: { - serializedName: "Enabled", - required: true, - xmlName: "Enabled", - type: { - name: "Boolean", - }, - }, - days: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "Days", - xmlName: "Days", - type: { - name: "Number", - }, - }, - }, - }, -}; -const Metrics = { - serializedName: "Metrics", - type: { - name: "Composite", - className: "Metrics", - modelProperties: { - version: { - serializedName: "Version", - xmlName: "Version", - type: { - name: "String", - }, - }, - enabled: { - serializedName: "Enabled", - required: true, - xmlName: "Enabled", - type: { - name: "Boolean", - }, - }, - includeAPIs: { - serializedName: "IncludeAPIs", - xmlName: "IncludeAPIs", - type: { - name: "Boolean", - }, - }, - retentionPolicy: { - serializedName: "RetentionPolicy", - xmlName: "RetentionPolicy", - type: { - name: "Composite", - className: "RetentionPolicy", - }, - }, - }, - }, -}; -const CorsRule = { - serializedName: "CorsRule", - type: { - name: "Composite", - className: "CorsRule", - modelProperties: { - allowedOrigins: { - serializedName: "AllowedOrigins", - required: true, - xmlName: "AllowedOrigins", - type: { - name: "String", - }, - }, - allowedMethods: { - serializedName: "AllowedMethods", - required: true, - xmlName: "AllowedMethods", - type: { - name: "String", - }, - }, - allowedHeaders: { - serializedName: "AllowedHeaders", - required: true, - xmlName: "AllowedHeaders", - type: { - name: "String", - }, - }, - exposedHeaders: { - serializedName: "ExposedHeaders", - required: true, - xmlName: "ExposedHeaders", - type: { - name: "String", - }, - }, - maxAgeInSeconds: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "MaxAgeInSeconds", - required: true, - xmlName: "MaxAgeInSeconds", - type: { - name: "Number", - }, - }, - }, - }, -}; -const StaticWebsite = { - serializedName: "StaticWebsite", - type: { - name: "Composite", - className: "StaticWebsite", - modelProperties: { - enabled: { - serializedName: "Enabled", - required: true, - xmlName: "Enabled", - type: { - name: "Boolean", - }, - }, - indexDocument: { - serializedName: "IndexDocument", - xmlName: "IndexDocument", - type: { - name: "String", - }, - }, - errorDocument404Path: { - serializedName: "ErrorDocument404Path", - xmlName: "ErrorDocument404Path", - type: { - name: "String", - }, - }, - defaultIndexDocumentPath: { - serializedName: "DefaultIndexDocumentPath", - xmlName: "DefaultIndexDocumentPath", - type: { - name: "String", - }, - }, - }, - }, -}; -const StorageError = { - serializedName: "StorageError", - type: { - name: "Composite", - className: "StorageError", - modelProperties: { - message: { - serializedName: "Message", - xmlName: "Message", - type: { - name: "String", - }, - }, - code: { - serializedName: "Code", - xmlName: "Code", - type: { - name: "String", - }, - }, - authenticationErrorDetail: { - serializedName: "AuthenticationErrorDetail", - xmlName: "AuthenticationErrorDetail", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobServiceStatistics = { - serializedName: "BlobServiceStatistics", - xmlName: "StorageServiceStats", - type: { - name: "Composite", - className: "BlobServiceStatistics", - modelProperties: { - geoReplication: { - serializedName: "GeoReplication", - xmlName: "GeoReplication", - type: { - name: "Composite", - className: "GeoReplication", - }, - }, - }, - }, -}; -const GeoReplication = { - serializedName: "GeoReplication", - type: { - name: "Composite", - className: "GeoReplication", - modelProperties: { - status: { - serializedName: "Status", - required: true, - xmlName: "Status", - type: { - name: "Enum", - allowedValues: ["live", "bootstrap", "unavailable"], - }, - }, - lastSyncOn: { - serializedName: "LastSyncTime", - required: true, - xmlName: "LastSyncTime", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ListContainersSegmentResponse = { - serializedName: "ListContainersSegmentResponse", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "ListContainersSegmentResponse", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - prefix: { - serializedName: "Prefix", - xmlName: "Prefix", - type: { - name: "String", - }, - }, - marker: { - serializedName: "Marker", - xmlName: "Marker", - type: { - name: "String", - }, - }, - maxPageSize: { - serializedName: "MaxResults", - xmlName: "MaxResults", - type: { - name: "Number", - }, - }, - containerItems: { - serializedName: "ContainerItems", - required: true, - xmlName: "Containers", - xmlIsWrapped: true, - xmlElementName: "Container", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerItem", - }, - }, - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerItem = { - serializedName: "ContainerItem", - xmlName: "Container", - type: { - name: "Composite", - className: "ContainerItem", - modelProperties: { - name: { - serializedName: "Name", - required: true, - xmlName: "Name", - type: { - name: "String", - }, - }, - deleted: { - serializedName: "Deleted", - xmlName: "Deleted", - type: { - name: "Boolean", - }, - }, - version: { - serializedName: "Version", - xmlName: "Version", - type: { - name: "String", - }, - }, - properties: { - serializedName: "Properties", - xmlName: "Properties", - type: { - name: "Composite", - className: "ContainerProperties", - }, - }, - metadata: { - serializedName: "Metadata", - xmlName: "Metadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; -const ContainerProperties = { - serializedName: "ContainerProperties", - type: { - name: "Composite", - className: "ContainerProperties", - modelProperties: { - lastModified: { - serializedName: "Last-Modified", - required: true, - xmlName: "Last-Modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "Etag", - required: true, - xmlName: "Etag", - type: { - name: "String", - }, - }, - leaseStatus: { - serializedName: "LeaseStatus", - xmlName: "LeaseStatus", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - leaseState: { - serializedName: "LeaseState", - xmlName: "LeaseState", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseDuration: { - serializedName: "LeaseDuration", - xmlName: "LeaseDuration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - publicAccess: { - serializedName: "PublicAccess", - xmlName: "PublicAccess", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, - hasImmutabilityPolicy: { - serializedName: "HasImmutabilityPolicy", - xmlName: "HasImmutabilityPolicy", - type: { - name: "Boolean", - }, - }, - hasLegalHold: { - serializedName: "HasLegalHold", - xmlName: "HasLegalHold", - type: { - name: "Boolean", - }, - }, - defaultEncryptionScope: { - serializedName: "DefaultEncryptionScope", - xmlName: "DefaultEncryptionScope", - type: { - name: "String", - }, - }, - preventEncryptionScopeOverride: { - serializedName: "DenyEncryptionScopeOverride", - xmlName: "DenyEncryptionScopeOverride", - type: { - name: "Boolean", - }, - }, - deletedOn: { - serializedName: "DeletedTime", - xmlName: "DeletedTime", - type: { - name: "DateTimeRfc1123", - }, - }, - remainingRetentionDays: { - serializedName: "RemainingRetentionDays", - xmlName: "RemainingRetentionDays", - type: { - name: "Number", - }, - }, - isImmutableStorageWithVersioningEnabled: { - serializedName: "ImmutableStorageWithVersioningEnabled", - xmlName: "ImmutableStorageWithVersioningEnabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const KeyInfo = { - serializedName: "KeyInfo", - type: { - name: "Composite", - className: "KeyInfo", - modelProperties: { - startsOn: { - serializedName: "Start", - required: true, - xmlName: "Start", - type: { - name: "String", - }, - }, - expiresOn: { - serializedName: "Expiry", - required: true, - xmlName: "Expiry", - type: { - name: "String", - }, - }, - }, - }, -}; -const UserDelegationKey = { - serializedName: "UserDelegationKey", - type: { - name: "Composite", - className: "UserDelegationKey", - modelProperties: { - signedObjectId: { - serializedName: "SignedOid", - required: true, - xmlName: "SignedOid", - type: { - name: "String", - }, - }, - signedTenantId: { - serializedName: "SignedTid", - required: true, - xmlName: "SignedTid", - type: { - name: "String", - }, - }, - signedStartsOn: { - serializedName: "SignedStart", - required: true, - xmlName: "SignedStart", - type: { - name: "String", - }, - }, - signedExpiresOn: { - serializedName: "SignedExpiry", - required: true, - xmlName: "SignedExpiry", - type: { - name: "String", - }, - }, - signedService: { - serializedName: "SignedService", - required: true, - xmlName: "SignedService", - type: { - name: "String", - }, - }, - signedVersion: { - serializedName: "SignedVersion", - required: true, - xmlName: "SignedVersion", - type: { - name: "String", - }, - }, - value: { - serializedName: "Value", - required: true, - xmlName: "Value", - type: { - name: "String", - }, - }, - }, - }, -}; -const FilterBlobSegment = { - serializedName: "FilterBlobSegment", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "FilterBlobSegment", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - where: { - serializedName: "Where", - required: true, - xmlName: "Where", - type: { - name: "String", - }, - }, - blobs: { - serializedName: "Blobs", - required: true, - xmlName: "Blobs", - xmlIsWrapped: true, - xmlElementName: "Blob", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FilterBlobItem", - }, - }, - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const FilterBlobItem = { - serializedName: "FilterBlobItem", - xmlName: "Blob", - type: { - name: "Composite", - className: "FilterBlobItem", - modelProperties: { - name: { - serializedName: "Name", - required: true, - xmlName: "Name", - type: { - name: "String", - }, - }, - containerName: { - serializedName: "ContainerName", - required: true, - xmlName: "ContainerName", - type: { - name: "String", - }, - }, - tags: { - serializedName: "Tags", - xmlName: "Tags", - type: { - name: "Composite", - className: "BlobTags", - }, - }, - }, - }, -}; -const BlobTags = { - serializedName: "BlobTags", - xmlName: "Tags", - type: { - name: "Composite", - className: "BlobTags", - modelProperties: { - blobTagSet: { - serializedName: "BlobTagSet", - required: true, - xmlName: "TagSet", - xmlIsWrapped: true, - xmlElementName: "Tag", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobTag", - }, - }, - }, - }, - }, - }, +// pkg/dist-src/compose-paginate.js +var composePaginateRest = Object.assign(paginate, { + iterator +}); + +// pkg/dist-src/generated/paginating-endpoints.js +var paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/organization-roles/{role_id}/teams", + "GET /orgs/{org}/organization-roles/{role_id}/users", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", + "GET /repos/{owner}/{repo}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /repositories/{repository_id}/environments/{environment_name}/variables", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" +]; + +// pkg/dist-src/paginating-endpoints.js +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} + +// pkg/dist-src/index.js +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 83044: +/***/ ((module) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -const BlobTag = { - serializedName: "BlobTag", - xmlName: "Tag", - type: { - name: "Composite", - className: "BlobTag", - modelProperties: { - key: { - serializedName: "Key", - required: true, - xmlName: "Key", - type: { - name: "String", - }, - }, - value: { - serializedName: "Value", - required: true, - xmlName: "Value", - type: { - name: "String", - }, - }, - }, - }, -}; -const SignedIdentifier = { - serializedName: "SignedIdentifier", - xmlName: "SignedIdentifier", - type: { - name: "Composite", - className: "SignedIdentifier", - modelProperties: { - id: { - serializedName: "Id", - required: true, - xmlName: "Id", - type: { - name: "String", - }, - }, - accessPolicy: { - serializedName: "AccessPolicy", - xmlName: "AccessPolicy", - type: { - name: "Composite", - className: "AccessPolicy", - }, - }, - }, - }, -}; -const AccessPolicy = { - serializedName: "AccessPolicy", - type: { - name: "Composite", - className: "AccessPolicy", - modelProperties: { - startsOn: { - serializedName: "Start", - xmlName: "Start", - type: { - name: "String", - }, - }, - expiresOn: { - serializedName: "Expiry", - xmlName: "Expiry", - type: { - name: "String", - }, - }, - permissions: { - serializedName: "Permission", - xmlName: "Permission", - type: { - name: "String", - }, - }, - }, - }, -}; -const ListBlobsFlatSegmentResponse = { - serializedName: "ListBlobsFlatSegmentResponse", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "ListBlobsFlatSegmentResponse", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - containerName: { - serializedName: "ContainerName", - required: true, - xmlName: "ContainerName", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - prefix: { - serializedName: "Prefix", - xmlName: "Prefix", - type: { - name: "String", - }, - }, - marker: { - serializedName: "Marker", - xmlName: "Marker", - type: { - name: "String", - }, - }, - maxPageSize: { - serializedName: "MaxResults", - xmlName: "MaxResults", - type: { - name: "Number", - }, - }, - segment: { - serializedName: "Segment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobFlatListSegment", - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobFlatListSegment = { - serializedName: "BlobFlatListSegment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobFlatListSegment", - modelProperties: { - blobItems: { - serializedName: "BlobItems", - required: true, - xmlName: "BlobItems", - xmlElementName: "Blob", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobItemInternal", - }, - }, - }, - }, - }, - }, -}; -const BlobItemInternal = { - serializedName: "BlobItemInternal", - xmlName: "Blob", - type: { - name: "Composite", - className: "BlobItemInternal", - modelProperties: { - name: { - serializedName: "Name", - xmlName: "Name", - type: { - name: "Composite", - className: "BlobName", - }, - }, - deleted: { - serializedName: "Deleted", - required: true, - xmlName: "Deleted", - type: { - name: "Boolean", - }, - }, - snapshot: { - serializedName: "Snapshot", - required: true, - xmlName: "Snapshot", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "VersionId", - xmlName: "VersionId", - type: { - name: "String", - }, - }, - isCurrentVersion: { - serializedName: "IsCurrentVersion", - xmlName: "IsCurrentVersion", - type: { - name: "Boolean", - }, - }, - properties: { - serializedName: "Properties", - xmlName: "Properties", - type: { - name: "Composite", - className: "BlobPropertiesInternal", - }, - }, - metadata: { - serializedName: "Metadata", - xmlName: "Metadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - blobTags: { - serializedName: "BlobTags", - xmlName: "Tags", - type: { - name: "Composite", - className: "BlobTags", - }, - }, - objectReplicationMetadata: { - serializedName: "ObjectReplicationMetadata", - xmlName: "OrMetadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - hasVersionsOnly: { - serializedName: "HasVersionsOnly", - xmlName: "HasVersionsOnly", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const BlobName = { - serializedName: "BlobName", - type: { - name: "Composite", - className: "BlobName", - modelProperties: { - encoded: { - serializedName: "Encoded", - xmlName: "Encoded", - xmlIsAttribute: true, - type: { - name: "Boolean", - }, - }, - content: { - serializedName: "content", - xmlName: "content", - xmlIsMsText: true, - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobPropertiesInternal = { - serializedName: "BlobPropertiesInternal", - xmlName: "Properties", - type: { - name: "Composite", - className: "BlobPropertiesInternal", - modelProperties: { - createdOn: { - serializedName: "Creation-Time", - xmlName: "Creation-Time", - type: { - name: "DateTimeRfc1123", - }, - }, - lastModified: { - serializedName: "Last-Modified", - required: true, - xmlName: "Last-Modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "Etag", - required: true, - xmlName: "Etag", - type: { - name: "String", - }, - }, - contentLength: { - serializedName: "Content-Length", - xmlName: "Content-Length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "Content-Type", - xmlName: "Content-Type", - type: { - name: "String", - }, - }, - contentEncoding: { - serializedName: "Content-Encoding", - xmlName: "Content-Encoding", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "Content-Language", - xmlName: "Content-Language", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "Content-MD5", - xmlName: "Content-MD5", - type: { - name: "ByteArray", - }, - }, - contentDisposition: { - serializedName: "Content-Disposition", - xmlName: "Content-Disposition", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "Cache-Control", - xmlName: "Cache-Control", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - blobType: { - serializedName: "BlobType", - xmlName: "BlobType", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - leaseStatus: { - serializedName: "LeaseStatus", - xmlName: "LeaseStatus", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - leaseState: { - serializedName: "LeaseState", - xmlName: "LeaseState", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseDuration: { - serializedName: "LeaseDuration", - xmlName: "LeaseDuration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - copyId: { - serializedName: "CopyId", - xmlName: "CopyId", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "CopyStatus", - xmlName: "CopyStatus", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - copySource: { - serializedName: "CopySource", - xmlName: "CopySource", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "CopyProgress", - xmlName: "CopyProgress", - type: { - name: "String", - }, - }, - copyCompletedOn: { - serializedName: "CopyCompletionTime", - xmlName: "CopyCompletionTime", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "CopyStatusDescription", - xmlName: "CopyStatusDescription", - type: { - name: "String", - }, - }, - serverEncrypted: { - serializedName: "ServerEncrypted", - xmlName: "ServerEncrypted", - type: { - name: "Boolean", - }, - }, - incrementalCopy: { - serializedName: "IncrementalCopy", - xmlName: "IncrementalCopy", - type: { - name: "Boolean", - }, - }, - destinationSnapshot: { - serializedName: "DestinationSnapshot", - xmlName: "DestinationSnapshot", - type: { - name: "String", - }, - }, - deletedOn: { - serializedName: "DeletedTime", - xmlName: "DeletedTime", - type: { - name: "DateTimeRfc1123", - }, - }, - remainingRetentionDays: { - serializedName: "RemainingRetentionDays", - xmlName: "RemainingRetentionDays", - type: { - name: "Number", - }, - }, - accessTier: { - serializedName: "AccessTier", - xmlName: "AccessTier", - type: { - name: "Enum", - allowedValues: [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - ], - }, - }, - accessTierInferred: { - serializedName: "AccessTierInferred", - xmlName: "AccessTierInferred", - type: { - name: "Boolean", - }, - }, - archiveStatus: { - serializedName: "ArchiveStatus", - xmlName: "ArchiveStatus", - type: { - name: "Enum", - allowedValues: [ - "rehydrate-pending-to-hot", - "rehydrate-pending-to-cool", - "rehydrate-pending-to-cold", - ], - }, - }, - customerProvidedKeySha256: { - serializedName: "CustomerProvidedKeySha256", - xmlName: "CustomerProvidedKeySha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "EncryptionScope", - xmlName: "EncryptionScope", - type: { - name: "String", - }, - }, - accessTierChangedOn: { - serializedName: "AccessTierChangeTime", - xmlName: "AccessTierChangeTime", - type: { - name: "DateTimeRfc1123", - }, - }, - tagCount: { - serializedName: "TagCount", - xmlName: "TagCount", - type: { - name: "Number", - }, - }, - expiresOn: { - serializedName: "Expiry-Time", - xmlName: "Expiry-Time", - type: { - name: "DateTimeRfc1123", - }, - }, - isSealed: { - serializedName: "Sealed", - xmlName: "Sealed", - type: { - name: "Boolean", - }, - }, - rehydratePriority: { - serializedName: "RehydratePriority", - xmlName: "RehydratePriority", - type: { - name: "Enum", - allowedValues: ["High", "Standard"], - }, - }, - lastAccessedOn: { - serializedName: "LastAccessTime", - xmlName: "LastAccessTime", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiresOn: { - serializedName: "ImmutabilityPolicyUntilDate", - xmlName: "ImmutabilityPolicyUntilDate", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "ImmutabilityPolicyMode", - xmlName: "ImmutabilityPolicyMode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - legalHold: { - serializedName: "LegalHold", - xmlName: "LegalHold", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const ListBlobsHierarchySegmentResponse = { - serializedName: "ListBlobsHierarchySegmentResponse", - xmlName: "EnumerationResults", - type: { - name: "Composite", - className: "ListBlobsHierarchySegmentResponse", - modelProperties: { - serviceEndpoint: { - serializedName: "ServiceEndpoint", - required: true, - xmlName: "ServiceEndpoint", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - containerName: { - serializedName: "ContainerName", - required: true, - xmlName: "ContainerName", - xmlIsAttribute: true, - type: { - name: "String", - }, - }, - prefix: { - serializedName: "Prefix", - xmlName: "Prefix", - type: { - name: "String", - }, - }, - marker: { - serializedName: "Marker", - xmlName: "Marker", - type: { - name: "String", - }, - }, - maxPageSize: { - serializedName: "MaxResults", - xmlName: "MaxResults", - type: { - name: "Number", - }, - }, - delimiter: { - serializedName: "Delimiter", - xmlName: "Delimiter", - type: { - name: "String", - }, - }, - segment: { - serializedName: "Segment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobHierarchyListSegment", - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobHierarchyListSegment = { - serializedName: "BlobHierarchyListSegment", - xmlName: "Blobs", - type: { - name: "Composite", - className: "BlobHierarchyListSegment", - modelProperties: { - blobPrefixes: { - serializedName: "BlobPrefixes", - xmlName: "BlobPrefixes", - xmlElementName: "BlobPrefix", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobPrefix", - }, - }, - }, - }, - blobItems: { - serializedName: "BlobItems", - required: true, - xmlName: "BlobItems", - xmlElementName: "Blob", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "BlobItemInternal", - }, - }, - }, - }, - }, - }, -}; -const BlobPrefix = { - serializedName: "BlobPrefix", - type: { - name: "Composite", - className: "BlobPrefix", - modelProperties: { - name: { - serializedName: "Name", - xmlName: "Name", - type: { - name: "Composite", - className: "BlobName", - }, - }, - }, - }, -}; -const BlockLookupList = { - serializedName: "BlockLookupList", - xmlName: "BlockList", - type: { - name: "Composite", - className: "BlockLookupList", - modelProperties: { - committed: { - serializedName: "Committed", - xmlName: "Committed", - xmlElementName: "Committed", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - uncommitted: { - serializedName: "Uncommitted", - xmlName: "Uncommitted", - xmlElementName: "Uncommitted", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - latest: { - serializedName: "Latest", - xmlName: "Latest", - xmlElementName: "Latest", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; -const BlockList = { - serializedName: "BlockList", - type: { - name: "Composite", - className: "BlockList", - modelProperties: { - committedBlocks: { - serializedName: "CommittedBlocks", - xmlName: "CommittedBlocks", - xmlIsWrapped: true, - xmlElementName: "Block", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Block", - }, - }, - }, - }, - uncommittedBlocks: { - serializedName: "UncommittedBlocks", - xmlName: "UncommittedBlocks", - xmlIsWrapped: true, - xmlElementName: "Block", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Block", - }, - }, - }, - }, - }, - }, -}; -const Block = { - serializedName: "Block", - type: { - name: "Composite", - className: "Block", - modelProperties: { - name: { - serializedName: "Name", - required: true, - xmlName: "Name", - type: { - name: "String", - }, - }, - size: { - serializedName: "Size", - required: true, - xmlName: "Size", - type: { - name: "Number", - }, - }, - }, - }, -}; -const PageList = { - serializedName: "PageList", - type: { - name: "Composite", - className: "PageList", - modelProperties: { - pageRange: { - serializedName: "PageRange", - xmlName: "PageRange", - xmlElementName: "PageRange", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PageRange", - }, - }, - }, - }, - clearRange: { - serializedName: "ClearRange", - xmlName: "ClearRange", - xmlElementName: "ClearRange", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClearRange", - }, - }, - }, - }, - continuationToken: { - serializedName: "NextMarker", - xmlName: "NextMarker", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageRange = { - serializedName: "PageRange", - xmlName: "PageRange", - type: { - name: "Composite", - className: "PageRange", - modelProperties: { - start: { - serializedName: "Start", - required: true, - xmlName: "Start", - type: { - name: "Number", - }, - }, - end: { - serializedName: "End", - required: true, - xmlName: "End", - type: { - name: "Number", - }, - }, - }, - }, -}; -const ClearRange = { - serializedName: "ClearRange", - xmlName: "ClearRange", - type: { - name: "Composite", - className: "ClearRange", - modelProperties: { - start: { - serializedName: "Start", - required: true, - xmlName: "Start", - type: { - name: "Number", - }, - }, - end: { - serializedName: "End", - required: true, - xmlName: "End", - type: { - name: "Number", - }, - }, - }, - }, -}; -const QueryRequest = { - serializedName: "QueryRequest", - xmlName: "QueryRequest", - type: { - name: "Composite", - className: "QueryRequest", - modelProperties: { - queryType: { - serializedName: "QueryType", - required: true, - xmlName: "QueryType", - type: { - name: "String", - }, - }, - expression: { - serializedName: "Expression", - required: true, - xmlName: "Expression", - type: { - name: "String", - }, - }, - inputSerialization: { - serializedName: "InputSerialization", - xmlName: "InputSerialization", - type: { - name: "Composite", - className: "QuerySerialization", - }, - }, - outputSerialization: { - serializedName: "OutputSerialization", - xmlName: "OutputSerialization", - type: { - name: "Composite", - className: "QuerySerialization", - }, - }, - }, - }, -}; -const QuerySerialization = { - serializedName: "QuerySerialization", - type: { - name: "Composite", - className: "QuerySerialization", - modelProperties: { - format: { - serializedName: "Format", - xmlName: "Format", - type: { - name: "Composite", - className: "QueryFormat", - }, - }, - }, - }, -}; -const QueryFormat = { - serializedName: "QueryFormat", - type: { - name: "Composite", - className: "QueryFormat", - modelProperties: { - type: { - serializedName: "Type", - required: true, - xmlName: "Type", - type: { - name: "Enum", - allowedValues: ["delimited", "json", "arrow", "parquet"], - }, - }, - delimitedTextConfiguration: { - serializedName: "DelimitedTextConfiguration", - xmlName: "DelimitedTextConfiguration", - type: { - name: "Composite", - className: "DelimitedTextConfiguration", - }, - }, - jsonTextConfiguration: { - serializedName: "JsonTextConfiguration", - xmlName: "JsonTextConfiguration", - type: { - name: "Composite", - className: "JsonTextConfiguration", - }, - }, - arrowConfiguration: { - serializedName: "ArrowConfiguration", - xmlName: "ArrowConfiguration", - type: { - name: "Composite", - className: "ArrowConfiguration", - }, - }, - parquetTextConfiguration: { - serializedName: "ParquetTextConfiguration", - xmlName: "ParquetTextConfiguration", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; -const DelimitedTextConfiguration = { - serializedName: "DelimitedTextConfiguration", - xmlName: "DelimitedTextConfiguration", - type: { - name: "Composite", - className: "DelimitedTextConfiguration", - modelProperties: { - columnSeparator: { - serializedName: "ColumnSeparator", - xmlName: "ColumnSeparator", - type: { - name: "String", - }, - }, - fieldQuote: { - serializedName: "FieldQuote", - xmlName: "FieldQuote", - type: { - name: "String", - }, - }, - recordSeparator: { - serializedName: "RecordSeparator", - xmlName: "RecordSeparator", - type: { - name: "String", - }, - }, - escapeChar: { - serializedName: "EscapeChar", - xmlName: "EscapeChar", - type: { - name: "String", - }, - }, - headersPresent: { - serializedName: "HeadersPresent", - xmlName: "HasHeaders", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const JsonTextConfiguration = { - serializedName: "JsonTextConfiguration", - xmlName: "JsonTextConfiguration", - type: { - name: "Composite", - className: "JsonTextConfiguration", - modelProperties: { - recordSeparator: { - serializedName: "RecordSeparator", - xmlName: "RecordSeparator", - type: { - name: "String", - }, - }, - }, - }, -}; -const ArrowConfiguration = { - serializedName: "ArrowConfiguration", - xmlName: "ArrowConfiguration", - type: { - name: "Composite", - className: "ArrowConfiguration", - modelProperties: { - schema: { - serializedName: "Schema", - required: true, - xmlName: "Schema", - xmlIsWrapped: true, - xmlElementName: "Field", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ArrowField", - }, - }, - }, - }, - }, - }, -}; -const ArrowField = { - serializedName: "ArrowField", - xmlName: "Field", - type: { - name: "Composite", - className: "ArrowField", - modelProperties: { - type: { - serializedName: "Type", - required: true, - xmlName: "Type", - type: { - name: "String", - }, - }, - name: { - serializedName: "Name", - xmlName: "Name", - type: { - name: "String", - }, - }, - precision: { - serializedName: "Precision", - xmlName: "Precision", - type: { - name: "Number", - }, - }, - scale: { - serializedName: "Scale", - xmlName: "Scale", - type: { - name: "Number", - }, - }, - }, - }, -}; -const ServiceSetPropertiesHeaders = { - serializedName: "Service_setPropertiesHeaders", - type: { - name: "Composite", - className: "ServiceSetPropertiesHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceSetPropertiesExceptionHeaders = { - serializedName: "Service_setPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "ServiceSetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetPropertiesHeaders = { - serializedName: "Service_getPropertiesHeaders", - type: { - name: "Composite", - className: "ServiceGetPropertiesHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetPropertiesExceptionHeaders = { - serializedName: "Service_getPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetStatisticsHeaders = { - serializedName: "Service_getStatisticsHeaders", - type: { - name: "Composite", - className: "ServiceGetStatisticsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetStatisticsExceptionHeaders = { - serializedName: "Service_getStatisticsExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetStatisticsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceListContainersSegmentHeaders = { - serializedName: "Service_listContainersSegmentHeaders", - type: { - name: "Composite", - className: "ServiceListContainersSegmentHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceListContainersSegmentExceptionHeaders = { - serializedName: "Service_listContainersSegmentExceptionHeaders", - type: { - name: "Composite", - className: "ServiceListContainersSegmentExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetUserDelegationKeyHeaders = { - serializedName: "Service_getUserDelegationKeyHeaders", - type: { - name: "Composite", - className: "ServiceGetUserDelegationKeyHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetUserDelegationKeyExceptionHeaders = { - serializedName: "Service_getUserDelegationKeyExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetUserDelegationKeyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetAccountInfoHeaders = { - serializedName: "Service_getAccountInfoHeaders", - type: { - name: "Composite", - className: "ServiceGetAccountInfoHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - skuName: { - serializedName: "x-ms-sku-name", - xmlName: "x-ms-sku-name", - type: { - name: "Enum", - allowedValues: [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - ], - }, - }, - accountKind: { - serializedName: "x-ms-account-kind", - xmlName: "x-ms-account-kind", - type: { - name: "Enum", - allowedValues: [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage", - ], - }, - }, - isHierarchicalNamespaceEnabled: { - serializedName: "x-ms-is-hns-enabled", - xmlName: "x-ms-is-hns-enabled", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceGetAccountInfoExceptionHeaders = { - serializedName: "Service_getAccountInfoExceptionHeaders", - type: { - name: "Composite", - className: "ServiceGetAccountInfoExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceSubmitBatchHeaders = { - serializedName: "Service_submitBatchHeaders", - type: { - name: "Composite", - className: "ServiceSubmitBatchHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceSubmitBatchExceptionHeaders = { - serializedName: "Service_submitBatchExceptionHeaders", - type: { - name: "Composite", - className: "ServiceSubmitBatchExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceFilterBlobsHeaders = { - serializedName: "Service_filterBlobsHeaders", - type: { - name: "Composite", - className: "ServiceFilterBlobsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ServiceFilterBlobsExceptionHeaders = { - serializedName: "Service_filterBlobsExceptionHeaders", - type: { - name: "Composite", - className: "ServiceFilterBlobsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerCreateHeaders = { - serializedName: "Container_createHeaders", - type: { - name: "Composite", - className: "ContainerCreateHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerCreateExceptionHeaders = { - serializedName: "Container_createExceptionHeaders", - type: { - name: "Composite", - className: "ContainerCreateExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetPropertiesHeaders = { - serializedName: "Container_getPropertiesHeaders", - type: { - name: "Composite", - className: "ContainerGetPropertiesHeaders", - modelProperties: { - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobPublicAccess: { - serializedName: "x-ms-blob-public-access", - xmlName: "x-ms-blob-public-access", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, - hasImmutabilityPolicy: { - serializedName: "x-ms-has-immutability-policy", - xmlName: "x-ms-has-immutability-policy", - type: { - name: "Boolean", - }, - }, - hasLegalHold: { - serializedName: "x-ms-has-legal-hold", - xmlName: "x-ms-has-legal-hold", - type: { - name: "Boolean", - }, - }, - defaultEncryptionScope: { - serializedName: "x-ms-default-encryption-scope", - xmlName: "x-ms-default-encryption-scope", - type: { - name: "String", - }, - }, - denyEncryptionScopeOverride: { - serializedName: "x-ms-deny-encryption-scope-override", - xmlName: "x-ms-deny-encryption-scope-override", - type: { - name: "Boolean", - }, - }, - isImmutableStorageWithVersioningEnabled: { - serializedName: "x-ms-immutable-storage-with-versioning-enabled", - xmlName: "x-ms-immutable-storage-with-versioning-enabled", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetPropertiesExceptionHeaders = { - serializedName: "Container_getPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "ContainerGetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerDeleteHeaders = { - serializedName: "Container_deleteHeaders", - type: { - name: "Composite", - className: "ContainerDeleteHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerDeleteExceptionHeaders = { - serializedName: "Container_deleteExceptionHeaders", - type: { - name: "Composite", - className: "ContainerDeleteExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetMetadataHeaders = { - serializedName: "Container_setMetadataHeaders", - type: { - name: "Composite", - className: "ContainerSetMetadataHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetMetadataExceptionHeaders = { - serializedName: "Container_setMetadataExceptionHeaders", - type: { - name: "Composite", - className: "ContainerSetMetadataExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetAccessPolicyHeaders = { - serializedName: "Container_getAccessPolicyHeaders", - type: { - name: "Composite", - className: "ContainerGetAccessPolicyHeaders", - modelProperties: { - blobPublicAccess: { - serializedName: "x-ms-blob-public-access", - xmlName: "x-ms-blob-public-access", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetAccessPolicyExceptionHeaders = { - serializedName: "Container_getAccessPolicyExceptionHeaders", - type: { - name: "Composite", - className: "ContainerGetAccessPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetAccessPolicyHeaders = { - serializedName: "Container_setAccessPolicyHeaders", - type: { - name: "Composite", - className: "ContainerSetAccessPolicyHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSetAccessPolicyExceptionHeaders = { - serializedName: "Container_setAccessPolicyExceptionHeaders", - type: { - name: "Composite", - className: "ContainerSetAccessPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRestoreHeaders = { - serializedName: "Container_restoreHeaders", - type: { - name: "Composite", - className: "ContainerRestoreHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRestoreExceptionHeaders = { - serializedName: "Container_restoreExceptionHeaders", - type: { - name: "Composite", - className: "ContainerRestoreExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRenameHeaders = { - serializedName: "Container_renameHeaders", - type: { - name: "Composite", - className: "ContainerRenameHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRenameExceptionHeaders = { - serializedName: "Container_renameExceptionHeaders", - type: { - name: "Composite", - className: "ContainerRenameExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSubmitBatchHeaders = { - serializedName: "Container_submitBatchHeaders", - type: { - name: "Composite", - className: "ContainerSubmitBatchHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerSubmitBatchExceptionHeaders = { - serializedName: "Container_submitBatchExceptionHeaders", - type: { - name: "Composite", - className: "ContainerSubmitBatchExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerFilterBlobsHeaders = { - serializedName: "Container_filterBlobsHeaders", - type: { - name: "Composite", - className: "ContainerFilterBlobsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerFilterBlobsExceptionHeaders = { - serializedName: "Container_filterBlobsExceptionHeaders", - type: { - name: "Composite", - className: "ContainerFilterBlobsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerAcquireLeaseHeaders = { - serializedName: "Container_acquireLeaseHeaders", - type: { - name: "Composite", - className: "ContainerAcquireLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerAcquireLeaseExceptionHeaders = { - serializedName: "Container_acquireLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerAcquireLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerReleaseLeaseHeaders = { - serializedName: "Container_releaseLeaseHeaders", - type: { - name: "Composite", - className: "ContainerReleaseLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerReleaseLeaseExceptionHeaders = { - serializedName: "Container_releaseLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerReleaseLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerRenewLeaseHeaders = { - serializedName: "Container_renewLeaseHeaders", - type: { - name: "Composite", - className: "ContainerRenewLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerRenewLeaseExceptionHeaders = { - serializedName: "Container_renewLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerRenewLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerBreakLeaseHeaders = { - serializedName: "Container_breakLeaseHeaders", - type: { - name: "Composite", - className: "ContainerBreakLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseTime: { - serializedName: "x-ms-lease-time", - xmlName: "x-ms-lease-time", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerBreakLeaseExceptionHeaders = { - serializedName: "Container_breakLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerBreakLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerChangeLeaseHeaders = { - serializedName: "Container_changeLeaseHeaders", - type: { - name: "Composite", - className: "ContainerChangeLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const ContainerChangeLeaseExceptionHeaders = { - serializedName: "Container_changeLeaseExceptionHeaders", - type: { - name: "Composite", - className: "ContainerChangeLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobFlatSegmentHeaders = { - serializedName: "Container_listBlobFlatSegmentHeaders", - type: { - name: "Composite", - className: "ContainerListBlobFlatSegmentHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobFlatSegmentExceptionHeaders = { - serializedName: "Container_listBlobFlatSegmentExceptionHeaders", - type: { - name: "Composite", - className: "ContainerListBlobFlatSegmentExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobHierarchySegmentHeaders = { - serializedName: "Container_listBlobHierarchySegmentHeaders", - type: { - name: "Composite", - className: "ContainerListBlobHierarchySegmentHeaders", - modelProperties: { - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerListBlobHierarchySegmentExceptionHeaders = { - serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", - type: { - name: "Composite", - className: "ContainerListBlobHierarchySegmentExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const ContainerGetAccountInfoHeaders = { - serializedName: "Container_getAccountInfoHeaders", - type: { - name: "Composite", - className: "ContainerGetAccountInfoHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - skuName: { - serializedName: "x-ms-sku-name", - xmlName: "x-ms-sku-name", - type: { - name: "Enum", - allowedValues: [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - ], - }, - }, - accountKind: { - serializedName: "x-ms-account-kind", - xmlName: "x-ms-account-kind", - type: { - name: "Enum", - allowedValues: [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage", - ], - }, - }, - isHierarchicalNamespaceEnabled: { - serializedName: "x-ms-is-hns-enabled", - xmlName: "x-ms-is-hns-enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const ContainerGetAccountInfoExceptionHeaders = { - serializedName: "Container_getAccountInfoExceptionHeaders", - type: { - name: "Composite", - className: "ContainerGetAccountInfoExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDownloadHeaders = { - serializedName: "Blob_downloadHeaders", - type: { - name: "Composite", - className: "BlobDownloadHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - createdOn: { - serializedName: "x-ms-creation-time", - xmlName: "x-ms-creation-time", - type: { - name: "DateTimeRfc1123", - }, - }, - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - objectReplicationPolicyId: { - serializedName: "x-ms-or-policy-id", - xmlName: "x-ms-or-policy-id", - type: { - name: "String", - }, - }, - objectReplicationRules: { - serializedName: "x-ms-or", - headerCollectionPrefix: "x-ms-or-", - xmlName: "x-ms-or", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - contentLength: { - serializedName: "content-length", - xmlName: "content-length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - contentRange: { - serializedName: "content-range", - xmlName: "content-range", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - contentEncoding: { - serializedName: "content-encoding", - xmlName: "content-encoding", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "cache-control", - xmlName: "cache-control", - type: { - name: "String", - }, - }, - contentDisposition: { - serializedName: "content-disposition", - xmlName: "content-disposition", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "content-language", - xmlName: "content-language", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - blobType: { - serializedName: "x-ms-blob-type", - xmlName: "x-ms-blob-type", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - copyCompletedOn: { - serializedName: "x-ms-copy-completion-time", - xmlName: "x-ms-copy-completion-time", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "x-ms-copy-status-description", - xmlName: "x-ms-copy-status-description", - type: { - name: "String", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "x-ms-copy-progress", - xmlName: "x-ms-copy-progress", - type: { - name: "String", - }, - }, - copySource: { - serializedName: "x-ms-copy-source", - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - isCurrentVersion: { - serializedName: "x-ms-is-current-version", - xmlName: "x-ms-is-current-version", - type: { - name: "Boolean", - }, - }, - acceptRanges: { - serializedName: "accept-ranges", - xmlName: "accept-ranges", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-server-encrypted", - xmlName: "x-ms-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - blobContentMD5: { - serializedName: "x-ms-blob-content-md5", - xmlName: "x-ms-blob-content-md5", - type: { - name: "ByteArray", - }, - }, - tagCount: { - serializedName: "x-ms-tag-count", - xmlName: "x-ms-tag-count", - type: { - name: "Number", - }, - }, - isSealed: { - serializedName: "x-ms-blob-sealed", - xmlName: "x-ms-blob-sealed", - type: { - name: "Boolean", - }, - }, - lastAccessed: { - serializedName: "x-ms-last-access-time", - xmlName: "x-ms-last-access-time", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiresOn: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - legalHold: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - contentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - }, - }, -}; -const BlobDownloadExceptionHeaders = { - serializedName: "Blob_downloadExceptionHeaders", - type: { - name: "Composite", - className: "BlobDownloadExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetPropertiesHeaders = { - serializedName: "Blob_getPropertiesHeaders", - type: { - name: "Composite", - className: "BlobGetPropertiesHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - createdOn: { - serializedName: "x-ms-creation-time", - xmlName: "x-ms-creation-time", - type: { - name: "DateTimeRfc1123", - }, - }, - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - objectReplicationPolicyId: { - serializedName: "x-ms-or-policy-id", - xmlName: "x-ms-or-policy-id", - type: { - name: "String", - }, - }, - objectReplicationRules: { - serializedName: "x-ms-or", - headerCollectionPrefix: "x-ms-or-", - xmlName: "x-ms-or", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - blobType: { - serializedName: "x-ms-blob-type", - xmlName: "x-ms-blob-type", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - copyCompletedOn: { - serializedName: "x-ms-copy-completion-time", - xmlName: "x-ms-copy-completion-time", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "x-ms-copy-status-description", - xmlName: "x-ms-copy-status-description", - type: { - name: "String", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "x-ms-copy-progress", - xmlName: "x-ms-copy-progress", - type: { - name: "String", - }, - }, - copySource: { - serializedName: "x-ms-copy-source", - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - isIncrementalCopy: { - serializedName: "x-ms-incremental-copy", - xmlName: "x-ms-incremental-copy", - type: { - name: "Boolean", - }, - }, - destinationSnapshot: { - serializedName: "x-ms-copy-destination-snapshot", - xmlName: "x-ms-copy-destination-snapshot", - type: { - name: "String", - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - contentLength: { - serializedName: "content-length", - xmlName: "content-length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - contentEncoding: { - serializedName: "content-encoding", - xmlName: "content-encoding", - type: { - name: "String", - }, - }, - contentDisposition: { - serializedName: "content-disposition", - xmlName: "content-disposition", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "content-language", - xmlName: "content-language", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "cache-control", - xmlName: "cache-control", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - acceptRanges: { - serializedName: "accept-ranges", - xmlName: "accept-ranges", - type: { - name: "String", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-server-encrypted", - xmlName: "x-ms-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - accessTier: { - serializedName: "x-ms-access-tier", - xmlName: "x-ms-access-tier", - type: { - name: "String", - }, - }, - accessTierInferred: { - serializedName: "x-ms-access-tier-inferred", - xmlName: "x-ms-access-tier-inferred", - type: { - name: "Boolean", - }, - }, - archiveStatus: { - serializedName: "x-ms-archive-status", - xmlName: "x-ms-archive-status", - type: { - name: "String", - }, - }, - accessTierChangedOn: { - serializedName: "x-ms-access-tier-change-time", - xmlName: "x-ms-access-tier-change-time", - type: { - name: "DateTimeRfc1123", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - isCurrentVersion: { - serializedName: "x-ms-is-current-version", - xmlName: "x-ms-is-current-version", - type: { - name: "Boolean", - }, - }, - tagCount: { - serializedName: "x-ms-tag-count", - xmlName: "x-ms-tag-count", - type: { - name: "Number", - }, - }, - expiresOn: { - serializedName: "x-ms-expiry-time", - xmlName: "x-ms-expiry-time", - type: { - name: "DateTimeRfc1123", - }, - }, - isSealed: { - serializedName: "x-ms-blob-sealed", - xmlName: "x-ms-blob-sealed", - type: { - name: "Boolean", - }, - }, - rehydratePriority: { - serializedName: "x-ms-rehydrate-priority", - xmlName: "x-ms-rehydrate-priority", - type: { - name: "Enum", - allowedValues: ["High", "Standard"], - }, - }, - lastAccessed: { - serializedName: "x-ms-last-access-time", - xmlName: "x-ms-last-access-time", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiresOn: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - legalHold: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetPropertiesExceptionHeaders = { - serializedName: "Blob_getPropertiesExceptionHeaders", - type: { - name: "Composite", - className: "BlobGetPropertiesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDeleteHeaders = { - serializedName: "Blob_deleteHeaders", - type: { - name: "Composite", - className: "BlobDeleteHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDeleteExceptionHeaders = { - serializedName: "Blob_deleteExceptionHeaders", - type: { - name: "Composite", - className: "BlobDeleteExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobUndeleteHeaders = { - serializedName: "Blob_undeleteHeaders", - type: { - name: "Composite", - className: "BlobUndeleteHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobUndeleteExceptionHeaders = { - serializedName: "Blob_undeleteExceptionHeaders", - type: { - name: "Composite", - className: "BlobUndeleteExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetExpiryHeaders = { - serializedName: "Blob_setExpiryHeaders", - type: { - name: "Composite", - className: "BlobSetExpiryHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobSetExpiryExceptionHeaders = { - serializedName: "Blob_setExpiryExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetExpiryExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetHttpHeadersHeaders = { - serializedName: "Blob_setHttpHeadersHeaders", - type: { - name: "Composite", - className: "BlobSetHttpHeadersHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetHttpHeadersExceptionHeaders = { - serializedName: "Blob_setHttpHeadersExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetHttpHeadersExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetImmutabilityPolicyHeaders = { - serializedName: "Blob_setImmutabilityPolicyHeaders", - type: { - name: "Composite", - className: "BlobSetImmutabilityPolicyHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyExpiry: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, - immutabilityPolicyMode: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, - }, - }, -}; -const BlobSetImmutabilityPolicyExceptionHeaders = { - serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetImmutabilityPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobDeleteImmutabilityPolicyHeaders = { - serializedName: "Blob_deleteImmutabilityPolicyHeaders", - type: { - name: "Composite", - className: "BlobDeleteImmutabilityPolicyHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobDeleteImmutabilityPolicyExceptionHeaders = { - serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", - type: { - name: "Composite", - className: "BlobDeleteImmutabilityPolicyExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetLegalHoldHeaders = { - serializedName: "Blob_setLegalHoldHeaders", - type: { - name: "Composite", - className: "BlobSetLegalHoldHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - legalHold: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const BlobSetLegalHoldExceptionHeaders = { - serializedName: "Blob_setLegalHoldExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetLegalHoldExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetMetadataHeaders = { - serializedName: "Blob_setMetadataHeaders", - type: { - name: "Composite", - className: "BlobSetMetadataHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetMetadataExceptionHeaders = { - serializedName: "Blob_setMetadataExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetMetadataExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobAcquireLeaseHeaders = { - serializedName: "Blob_acquireLeaseHeaders", - type: { - name: "Composite", - className: "BlobAcquireLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobAcquireLeaseExceptionHeaders = { - serializedName: "Blob_acquireLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobAcquireLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobReleaseLeaseHeaders = { - serializedName: "Blob_releaseLeaseHeaders", - type: { - name: "Composite", - className: "BlobReleaseLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobReleaseLeaseExceptionHeaders = { - serializedName: "Blob_releaseLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobReleaseLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobRenewLeaseHeaders = { - serializedName: "Blob_renewLeaseHeaders", - type: { - name: "Composite", - className: "BlobRenewLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobRenewLeaseExceptionHeaders = { - serializedName: "Blob_renewLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobRenewLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobChangeLeaseHeaders = { - serializedName: "Blob_changeLeaseHeaders", - type: { - name: "Composite", - className: "BlobChangeLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - leaseId: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobChangeLeaseExceptionHeaders = { - serializedName: "Blob_changeLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobChangeLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobBreakLeaseHeaders = { - serializedName: "Blob_breakLeaseHeaders", - type: { - name: "Composite", - className: "BlobBreakLeaseHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - leaseTime: { - serializedName: "x-ms-lease-time", - xmlName: "x-ms-lease-time", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - }, - }, -}; -const BlobBreakLeaseExceptionHeaders = { - serializedName: "Blob_breakLeaseExceptionHeaders", - type: { - name: "Composite", - className: "BlobBreakLeaseExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCreateSnapshotHeaders = { - serializedName: "Blob_createSnapshotHeaders", - type: { - name: "Composite", - className: "BlobCreateSnapshotHeaders", - modelProperties: { - snapshot: { - serializedName: "x-ms-snapshot", - xmlName: "x-ms-snapshot", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCreateSnapshotExceptionHeaders = { - serializedName: "Blob_createSnapshotExceptionHeaders", - type: { - name: "Composite", - className: "BlobCreateSnapshotExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobStartCopyFromURLHeaders = { - serializedName: "Blob_startCopyFromURLHeaders", - type: { - name: "Composite", - className: "BlobStartCopyFromURLHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobStartCopyFromURLExceptionHeaders = { - serializedName: "Blob_startCopyFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlobStartCopyFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCopyFromURLHeaders = { - serializedName: "Blob_copyFromURLHeaders", - type: { - name: "Composite", - className: "BlobCopyFromURLHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyStatus: { - defaultValue: "success", - isConstant: true, - serializedName: "x-ms-copy-status", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobCopyFromURLExceptionHeaders = { - serializedName: "Blob_copyFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlobCopyFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobAbortCopyFromURLHeaders = { - serializedName: "Blob_abortCopyFromURLHeaders", - type: { - name: "Composite", - className: "BlobAbortCopyFromURLHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobAbortCopyFromURLExceptionHeaders = { - serializedName: "Blob_abortCopyFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlobAbortCopyFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTierHeaders = { - serializedName: "Blob_setTierHeaders", - type: { - name: "Composite", - className: "BlobSetTierHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTierExceptionHeaders = { - serializedName: "Blob_setTierExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetTierExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetAccountInfoHeaders = { - serializedName: "Blob_getAccountInfoHeaders", - type: { - name: "Composite", - className: "BlobGetAccountInfoHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - skuName: { - serializedName: "x-ms-sku-name", - xmlName: "x-ms-sku-name", - type: { - name: "Enum", - allowedValues: [ - "Standard_LRS", - "Standard_GRS", - "Standard_RAGRS", - "Standard_ZRS", - "Premium_LRS", - ], - }, - }, - accountKind: { - serializedName: "x-ms-account-kind", - xmlName: "x-ms-account-kind", - type: { - name: "Enum", - allowedValues: [ - "Storage", - "BlobStorage", - "StorageV2", - "FileStorage", - "BlockBlobStorage", - ], - }, - }, - isHierarchicalNamespaceEnabled: { - serializedName: "x-ms-is-hns-enabled", - xmlName: "x-ms-is-hns-enabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const BlobGetAccountInfoExceptionHeaders = { - serializedName: "Blob_getAccountInfoExceptionHeaders", - type: { - name: "Composite", - className: "BlobGetAccountInfoExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobQueryHeaders = { - serializedName: "Blob_queryHeaders", - type: { - name: "Composite", - className: "BlobQueryHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - metadata: { - serializedName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - xmlName: "x-ms-meta", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - contentLength: { - serializedName: "content-length", - xmlName: "content-length", - type: { - name: "Number", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - contentRange: { - serializedName: "content-range", - xmlName: "content-range", - type: { - name: "String", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - contentEncoding: { - serializedName: "content-encoding", - xmlName: "content-encoding", - type: { - name: "String", - }, - }, - cacheControl: { - serializedName: "cache-control", - xmlName: "cache-control", - type: { - name: "String", - }, - }, - contentDisposition: { - serializedName: "content-disposition", - xmlName: "content-disposition", - type: { - name: "String", - }, - }, - contentLanguage: { - serializedName: "content-language", - xmlName: "content-language", - type: { - name: "String", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - blobType: { - serializedName: "x-ms-blob-type", - xmlName: "x-ms-blob-type", - type: { - name: "Enum", - allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], - }, - }, - copyCompletionTime: { - serializedName: "x-ms-copy-completion-time", - xmlName: "x-ms-copy-completion-time", - type: { - name: "DateTimeRfc1123", - }, - }, - copyStatusDescription: { - serializedName: "x-ms-copy-status-description", - xmlName: "x-ms-copy-status-description", - type: { - name: "String", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyProgress: { - serializedName: "x-ms-copy-progress", - xmlName: "x-ms-copy-progress", - type: { - name: "String", - }, - }, - copySource: { - serializedName: "x-ms-copy-source", - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - leaseDuration: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Enum", - allowedValues: ["infinite", "fixed"], - }, - }, - leaseState: { - serializedName: "x-ms-lease-state", - xmlName: "x-ms-lease-state", - type: { - name: "Enum", - allowedValues: [ - "available", - "leased", - "expired", - "breaking", - "broken", - ], - }, - }, - leaseStatus: { - serializedName: "x-ms-lease-status", - xmlName: "x-ms-lease-status", - type: { - name: "Enum", - allowedValues: ["locked", "unlocked"], - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - acceptRanges: { - serializedName: "accept-ranges", - xmlName: "accept-ranges", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-server-encrypted", - xmlName: "x-ms-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - blobContentMD5: { - serializedName: "x-ms-blob-content-md5", - xmlName: "x-ms-blob-content-md5", - type: { - name: "ByteArray", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - contentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - }, - }, -}; -const BlobQueryExceptionHeaders = { - serializedName: "Blob_queryExceptionHeaders", - type: { - name: "Composite", - className: "BlobQueryExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetTagsHeaders = { - serializedName: "Blob_getTagsHeaders", - type: { - name: "Composite", - className: "BlobGetTagsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobGetTagsExceptionHeaders = { - serializedName: "Blob_getTagsExceptionHeaders", - type: { - name: "Composite", - className: "BlobGetTagsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTagsHeaders = { - serializedName: "Blob_setTagsHeaders", - type: { - name: "Composite", - className: "BlobSetTagsHeaders", - modelProperties: { - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlobSetTagsExceptionHeaders = { - serializedName: "Blob_setTagsExceptionHeaders", - type: { - name: "Composite", - className: "BlobSetTagsExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCreateHeaders = { - serializedName: "PageBlob_createHeaders", - type: { - name: "Composite", - className: "PageBlobCreateHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCreateExceptionHeaders = { - serializedName: "PageBlob_createExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobCreateExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesHeaders = { - serializedName: "PageBlob_uploadPagesHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesExceptionHeaders = { - serializedName: "PageBlob_uploadPagesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobClearPagesHeaders = { - serializedName: "PageBlob_clearPagesHeaders", - type: { - name: "Composite", - className: "PageBlobClearPagesHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobClearPagesExceptionHeaders = { - serializedName: "PageBlob_clearPagesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobClearPagesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesFromURLHeaders = { - serializedName: "PageBlob_uploadPagesFromURLHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesFromURLHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUploadPagesFromURLExceptionHeaders = { - serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobUploadPagesFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesHeaders = { - serializedName: "PageBlob_getPageRangesHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - blobContentLength: { - serializedName: "x-ms-blob-content-length", - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesExceptionHeaders = { - serializedName: "PageBlob_getPageRangesExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesDiffHeaders = { - serializedName: "PageBlob_getPageRangesDiffHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesDiffHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - blobContentLength: { - serializedName: "x-ms-blob-content-length", - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobGetPageRangesDiffExceptionHeaders = { - serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobGetPageRangesDiffExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobResizeHeaders = { - serializedName: "PageBlob_resizeHeaders", - type: { - name: "Composite", - className: "PageBlobResizeHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobResizeExceptionHeaders = { - serializedName: "PageBlob_resizeExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobResizeExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUpdateSequenceNumberHeaders = { - serializedName: "PageBlob_updateSequenceNumberHeaders", - type: { - name: "Composite", - className: "PageBlobUpdateSequenceNumberHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - blobSequenceNumber: { - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobUpdateSequenceNumberExceptionHeaders = { - serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobUpdateSequenceNumberExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCopyIncrementalHeaders = { - serializedName: "PageBlob_copyIncrementalHeaders", - type: { - name: "Composite", - className: "PageBlobCopyIncrementalHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - copyId: { - serializedName: "x-ms-copy-id", - xmlName: "x-ms-copy-id", - type: { - name: "String", - }, - }, - copyStatus: { - serializedName: "x-ms-copy-status", - xmlName: "x-ms-copy-status", - type: { - name: "Enum", - allowedValues: ["pending", "success", "aborted", "failed"], - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const PageBlobCopyIncrementalExceptionHeaders = { - serializedName: "PageBlob_copyIncrementalExceptionHeaders", - type: { - name: "Composite", - className: "PageBlobCopyIncrementalExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobCreateHeaders = { - serializedName: "AppendBlob_createHeaders", - type: { - name: "Composite", - className: "AppendBlobCreateHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobCreateExceptionHeaders = { - serializedName: "AppendBlob_createExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobCreateExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockHeaders = { - serializedName: "AppendBlob_appendBlockHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobAppendOffset: { - serializedName: "x-ms-blob-append-offset", - xmlName: "x-ms-blob-append-offset", - type: { - name: "String", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockExceptionHeaders = { - serializedName: "AppendBlob_appendBlockExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockFromUrlHeaders = { - serializedName: "AppendBlob_appendBlockFromUrlHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockFromUrlHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - blobAppendOffset: { - serializedName: "x-ms-blob-append-offset", - xmlName: "x-ms-blob-append-offset", - type: { - name: "String", - }, - }, - blobCommittedBlockCount: { - serializedName: "x-ms-blob-committed-block-count", - xmlName: "x-ms-blob-committed-block-count", - type: { - name: "Number", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobAppendBlockFromUrlExceptionHeaders = { - serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobAppendBlockFromUrlExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const AppendBlobSealHeaders = { - serializedName: "AppendBlob_sealHeaders", - type: { - name: "Composite", - className: "AppendBlobSealHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isSealed: { - serializedName: "x-ms-blob-sealed", - xmlName: "x-ms-blob-sealed", - type: { - name: "Boolean", - }, - }, - }, - }, -}; -const AppendBlobSealExceptionHeaders = { - serializedName: "AppendBlob_sealExceptionHeaders", - type: { - name: "Composite", - className: "AppendBlobSealExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobUploadHeaders = { - serializedName: "BlockBlob_uploadHeaders", - type: { - name: "Composite", - className: "BlockBlobUploadHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobUploadExceptionHeaders = { - serializedName: "BlockBlob_uploadExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobUploadExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobPutBlobFromUrlHeaders = { - serializedName: "BlockBlob_putBlobFromUrlHeaders", - type: { - name: "Composite", - className: "BlockBlobPutBlobFromUrlHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobPutBlobFromUrlExceptionHeaders = { - serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobPutBlobFromUrlExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockHeaders = { - serializedName: "BlockBlob_stageBlockHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockHeaders", - modelProperties: { - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockExceptionHeaders = { - serializedName: "BlockBlob_stageBlockExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockFromURLHeaders = { - serializedName: "BlockBlob_stageBlockFromURLHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockFromURLHeaders", - modelProperties: { - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobStageBlockFromURLExceptionHeaders = { - serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobStageBlockFromURLExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobCommitBlockListHeaders = { - serializedName: "BlockBlob_commitBlockListHeaders", - type: { - name: "Composite", - className: "BlockBlobCommitBlockListHeaders", - modelProperties: { - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - contentMD5: { - serializedName: "content-md5", - xmlName: "content-md5", - type: { - name: "ByteArray", - }, - }, - xMsContentCrc64: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - versionId: { - serializedName: "x-ms-version-id", - xmlName: "x-ms-version-id", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - isServerEncrypted: { - serializedName: "x-ms-request-server-encrypted", - xmlName: "x-ms-request-server-encrypted", - type: { - name: "Boolean", - }, - }, - encryptionKeySha256: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, - encryptionScope: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobCommitBlockListExceptionHeaders = { - serializedName: "BlockBlob_commitBlockListExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobCommitBlockListExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobGetBlockListHeaders = { - serializedName: "BlockBlob_getBlockListHeaders", - type: { - name: "Composite", - className: "BlockBlobGetBlockListHeaders", - modelProperties: { - lastModified: { - serializedName: "last-modified", - xmlName: "last-modified", - type: { - name: "DateTimeRfc1123", - }, - }, - etag: { - serializedName: "etag", - xmlName: "etag", - type: { - name: "String", - }, - }, - contentType: { - serializedName: "content-type", - xmlName: "content-type", - type: { - name: "String", - }, - }, - blobContentLength: { - serializedName: "x-ms-blob-content-length", - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, - clientRequestId: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, - requestId: { - serializedName: "x-ms-request-id", - xmlName: "x-ms-request-id", - type: { - name: "String", - }, - }, - version: { - serializedName: "x-ms-version", - xmlName: "x-ms-version", - type: { - name: "String", - }, - }, - date: { - serializedName: "date", - xmlName: "date", - type: { - name: "DateTimeRfc1123", - }, - }, - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; -const BlockBlobGetBlockListExceptionHeaders = { - serializedName: "BlockBlob_getBlockListExceptionHeaders", - type: { - name: "Composite", - className: "BlockBlobGetBlockListExceptionHeaders", - modelProperties: { - errorCode: { - serializedName: "x-ms-error-code", - xmlName: "x-ms-error-code", - type: { - name: "String", - }, - }, - }, - }, -}; - -var Mappers = /*#__PURE__*/Object.freeze({ - __proto__: null, - AccessPolicy: AccessPolicy, - AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders, - AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders, - AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders, - AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders, - AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders, - AppendBlobCreateHeaders: AppendBlobCreateHeaders, - AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders, - AppendBlobSealHeaders: AppendBlobSealHeaders, - ArrowConfiguration: ArrowConfiguration, - ArrowField: ArrowField, - BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders, - BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders, - BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders, - BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders, - BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders, - BlobBreakLeaseHeaders: BlobBreakLeaseHeaders, - BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders, - BlobChangeLeaseHeaders: BlobChangeLeaseHeaders, - BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders, - BlobCopyFromURLHeaders: BlobCopyFromURLHeaders, - BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders, - BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders, - BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders, - BlobDeleteHeaders: BlobDeleteHeaders, - BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders, - BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders, - BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders, - BlobDownloadHeaders: BlobDownloadHeaders, - BlobFlatListSegment: BlobFlatListSegment, - BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders, - BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders, - BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders, - BlobGetPropertiesHeaders: BlobGetPropertiesHeaders, - BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders, - BlobGetTagsHeaders: BlobGetTagsHeaders, - BlobHierarchyListSegment: BlobHierarchyListSegment, - BlobItemInternal: BlobItemInternal, - BlobName: BlobName, - BlobPrefix: BlobPrefix, - BlobPropertiesInternal: BlobPropertiesInternal, - BlobQueryExceptionHeaders: BlobQueryExceptionHeaders, - BlobQueryHeaders: BlobQueryHeaders, - BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders, - BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders, - BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders, - BlobRenewLeaseHeaders: BlobRenewLeaseHeaders, - BlobServiceProperties: BlobServiceProperties, - BlobServiceStatistics: BlobServiceStatistics, - BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders, - BlobSetExpiryHeaders: BlobSetExpiryHeaders, - BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders, - BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders, - BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders, - BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders, - BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders, - BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders, - BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders, - BlobSetMetadataHeaders: BlobSetMetadataHeaders, - BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders, - BlobSetTagsHeaders: BlobSetTagsHeaders, - BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders, - BlobSetTierHeaders: BlobSetTierHeaders, - BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders, - BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders, - BlobTag: BlobTag, - BlobTags: BlobTags, - BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders, - BlobUndeleteHeaders: BlobUndeleteHeaders, - Block: Block, - BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders, - BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders, - BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders, - BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders, - BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders, - BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders, - BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders, - BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders, - BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders, - BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders, - BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders, - BlockBlobUploadHeaders: BlockBlobUploadHeaders, - BlockList: BlockList, - BlockLookupList: BlockLookupList, - ClearRange: ClearRange, - ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders, - ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders, - ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders, - ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders, - ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders, - ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders, - ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders, - ContainerCreateHeaders: ContainerCreateHeaders, - ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders, - ContainerDeleteHeaders: ContainerDeleteHeaders, - ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders, - ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders, - ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders, - ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders, - ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders, - ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders, - ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders, - ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders, - ContainerItem: ContainerItem, - ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders, - ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders, - ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders, - ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders, - ContainerProperties: ContainerProperties, - ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders, - ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders, - ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders, - ContainerRenameHeaders: ContainerRenameHeaders, - ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders, - ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders, - ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders, - ContainerRestoreHeaders: ContainerRestoreHeaders, - ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders, - ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders, - ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders, - ContainerSetMetadataHeaders: ContainerSetMetadataHeaders, - ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders, - ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders, - CorsRule: CorsRule, - DelimitedTextConfiguration: DelimitedTextConfiguration, - FilterBlobItem: FilterBlobItem, - FilterBlobSegment: FilterBlobSegment, - GeoReplication: GeoReplication, - JsonTextConfiguration: JsonTextConfiguration, - KeyInfo: KeyInfo, - ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse, - ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse, - ListContainersSegmentResponse: ListContainersSegmentResponse, - Logging: Logging, - Metrics: Metrics, - PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders, - PageBlobClearPagesHeaders: PageBlobClearPagesHeaders, - PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders, - PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders, - PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders, - PageBlobCreateHeaders: PageBlobCreateHeaders, - PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders, - PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders, - PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders, - PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders, - PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders, - PageBlobResizeHeaders: PageBlobResizeHeaders, - PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders, - PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders, - PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders, - PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders, - PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders, - PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders, - PageList: PageList, - PageRange: PageRange, - QueryFormat: QueryFormat, - QueryRequest: QueryRequest, - QuerySerialization: QuerySerialization, - RetentionPolicy: RetentionPolicy, - ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders, - ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders, - ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders, - ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders, - ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders, - ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders, - ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders, - ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders, - ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders, - ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders, - ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders, - ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders, - ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders, - ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders, - ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders, - ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders, - SignedIdentifier: SignedIdentifier, - StaticWebsite: StaticWebsite, - StorageError: StorageError, - UserDelegationKey: UserDelegationKey -}); - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -const contentType = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; -const blobServiceProperties = { - parameterPath: "blobServiceProperties", - mapper: BlobServiceProperties, -}; -const accept = { - parameterPath: "accept", - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; -const url = { - parameterPath: "url", - mapper: { - serializedName: "url", - required: true, - xmlName: "url", - type: { - name: "String", - }, - }, - skipEncoding: true, -}; -const restype = { - parameterPath: "restype", - mapper: { - defaultValue: "service", - isConstant: true, - serializedName: "restype", - type: { - name: "String", - }, - }, -}; -const comp = { - parameterPath: "comp", - mapper: { - defaultValue: "properties", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const timeoutInSeconds = { - parameterPath: ["options", "timeoutInSeconds"], - mapper: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "timeout", - xmlName: "timeout", - type: { - name: "Number", - }, - }, -}; -const version = { - parameterPath: "version", - mapper: { - defaultValue: "2025-05-05", - isConstant: true, - serializedName: "x-ms-version", - type: { - name: "String", - }, - }, -}; -const requestId = { - parameterPath: ["options", "requestId"], - mapper: { - serializedName: "x-ms-client-request-id", - xmlName: "x-ms-client-request-id", - type: { - name: "String", - }, - }, -}; -const accept1 = { - parameterPath: "accept", - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; -const comp1 = { - parameterPath: "comp", - mapper: { - defaultValue: "stats", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const comp2 = { - parameterPath: "comp", - mapper: { - defaultValue: "list", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const prefix = { - parameterPath: ["options", "prefix"], - mapper: { - serializedName: "prefix", - xmlName: "prefix", - type: { - name: "String", - }, - }, -}; -const marker = { - parameterPath: ["options", "marker"], - mapper: { - serializedName: "marker", - xmlName: "marker", - type: { - name: "String", - }, - }, -}; -const maxPageSize = { - parameterPath: ["options", "maxPageSize"], - mapper: { - constraints: { - InclusiveMinimum: 1, - }, - serializedName: "maxresults", - xmlName: "maxresults", - type: { - name: "Number", - }, - }, -}; -const include = { - parameterPath: ["options", "include"], - mapper: { - serializedName: "include", - xmlName: "include", - xmlElementName: "ListContainersIncludeType", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: ["metadata", "deleted", "system"], - }, - }, - }, - }, - collectionFormat: "CSV", -}; -const keyInfo = { - parameterPath: "keyInfo", - mapper: KeyInfo, -}; -const comp3 = { - parameterPath: "comp", - mapper: { - defaultValue: "userdelegationkey", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const restype1 = { - parameterPath: "restype", - mapper: { - defaultValue: "account", - isConstant: true, - serializedName: "restype", - type: { - name: "String", - }, - }, -}; -const body = { - parameterPath: "body", - mapper: { - serializedName: "body", - required: true, - xmlName: "body", - type: { - name: "Stream", - }, - }, -}; -const comp4 = { - parameterPath: "comp", - mapper: { - defaultValue: "batch", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const contentLength = { - parameterPath: "contentLength", - mapper: { - serializedName: "Content-Length", - required: true, - xmlName: "Content-Length", - type: { - name: "Number", - }, - }, -}; -const multipartContentType = { - parameterPath: "multipartContentType", - mapper: { - serializedName: "Content-Type", - required: true, - xmlName: "Content-Type", - type: { - name: "String", - }, - }, -}; -const comp5 = { - parameterPath: "comp", - mapper: { - defaultValue: "blobs", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const where = { - parameterPath: ["options", "where"], - mapper: { - serializedName: "where", - xmlName: "where", - type: { - name: "String", - }, - }, -}; -const restype2 = { - parameterPath: "restype", - mapper: { - defaultValue: "container", - isConstant: true, - serializedName: "restype", - type: { - name: "String", - }, - }, -}; -const metadata = { - parameterPath: ["options", "metadata"], - mapper: { - serializedName: "x-ms-meta", - xmlName: "x-ms-meta", - headerCollectionPrefix: "x-ms-meta-", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, -}; -const access = { - parameterPath: ["options", "access"], - mapper: { - serializedName: "x-ms-blob-public-access", - xmlName: "x-ms-blob-public-access", - type: { - name: "Enum", - allowedValues: ["container", "blob"], - }, - }, -}; -const defaultEncryptionScope = { - parameterPath: [ - "options", - "containerEncryptionScope", - "defaultEncryptionScope", - ], - mapper: { - serializedName: "x-ms-default-encryption-scope", - xmlName: "x-ms-default-encryption-scope", - type: { - name: "String", - }, - }, -}; -const preventEncryptionScopeOverride = { - parameterPath: [ - "options", - "containerEncryptionScope", - "preventEncryptionScopeOverride", - ], - mapper: { - serializedName: "x-ms-deny-encryption-scope-override", - xmlName: "x-ms-deny-encryption-scope-override", - type: { - name: "Boolean", - }, - }, -}; -const leaseId = { - parameterPath: ["options", "leaseAccessConditions", "leaseId"], - mapper: { - serializedName: "x-ms-lease-id", - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, -}; -const ifModifiedSince = { - parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], - mapper: { - serializedName: "If-Modified-Since", - xmlName: "If-Modified-Since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const ifUnmodifiedSince = { - parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], - mapper: { - serializedName: "If-Unmodified-Since", - xmlName: "If-Unmodified-Since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const comp6 = { - parameterPath: "comp", - mapper: { - defaultValue: "metadata", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const comp7 = { - parameterPath: "comp", - mapper: { - defaultValue: "acl", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const containerAcl = { - parameterPath: ["options", "containerAcl"], - mapper: { - serializedName: "containerAcl", - xmlName: "SignedIdentifiers", - xmlIsWrapped: true, - xmlElementName: "SignedIdentifier", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SignedIdentifier", - }, - }, - }, - }, -}; -const comp8 = { - parameterPath: "comp", - mapper: { - defaultValue: "undelete", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const deletedContainerName = { - parameterPath: ["options", "deletedContainerName"], - mapper: { - serializedName: "x-ms-deleted-container-name", - xmlName: "x-ms-deleted-container-name", - type: { - name: "String", - }, - }, -}; -const deletedContainerVersion = { - parameterPath: ["options", "deletedContainerVersion"], - mapper: { - serializedName: "x-ms-deleted-container-version", - xmlName: "x-ms-deleted-container-version", - type: { - name: "String", - }, - }, -}; -const comp9 = { - parameterPath: "comp", - mapper: { - defaultValue: "rename", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const sourceContainerName = { - parameterPath: "sourceContainerName", - mapper: { - serializedName: "x-ms-source-container-name", - required: true, - xmlName: "x-ms-source-container-name", - type: { - name: "String", - }, - }, -}; -const sourceLeaseId = { - parameterPath: ["options", "sourceLeaseId"], - mapper: { - serializedName: "x-ms-source-lease-id", - xmlName: "x-ms-source-lease-id", - type: { - name: "String", - }, - }, -}; -const comp10 = { - parameterPath: "comp", - mapper: { - defaultValue: "lease", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const action = { - parameterPath: "action", - mapper: { - defaultValue: "acquire", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const duration = { - parameterPath: ["options", "duration"], - mapper: { - serializedName: "x-ms-lease-duration", - xmlName: "x-ms-lease-duration", - type: { - name: "Number", - }, - }, -}; -const proposedLeaseId = { - parameterPath: ["options", "proposedLeaseId"], - mapper: { - serializedName: "x-ms-proposed-lease-id", - xmlName: "x-ms-proposed-lease-id", - type: { - name: "String", - }, - }, -}; -const action1 = { - parameterPath: "action", - mapper: { - defaultValue: "release", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const leaseId1 = { - parameterPath: "leaseId", - mapper: { - serializedName: "x-ms-lease-id", - required: true, - xmlName: "x-ms-lease-id", - type: { - name: "String", - }, - }, -}; -const action2 = { - parameterPath: "action", - mapper: { - defaultValue: "renew", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const action3 = { - parameterPath: "action", - mapper: { - defaultValue: "break", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const breakPeriod = { - parameterPath: ["options", "breakPeriod"], - mapper: { - serializedName: "x-ms-lease-break-period", - xmlName: "x-ms-lease-break-period", - type: { - name: "Number", - }, - }, -}; -const action4 = { - parameterPath: "action", - mapper: { - defaultValue: "change", - isConstant: true, - serializedName: "x-ms-lease-action", - type: { - name: "String", - }, - }, -}; -const proposedLeaseId1 = { - parameterPath: "proposedLeaseId", - mapper: { - serializedName: "x-ms-proposed-lease-id", - required: true, - xmlName: "x-ms-proposed-lease-id", - type: { - name: "String", - }, - }, -}; -const include1 = { - parameterPath: ["options", "include"], - mapper: { - serializedName: "include", - xmlName: "include", - xmlElementName: "ListBlobsIncludeItem", - type: { - name: "Sequence", - element: { - type: { - name: "Enum", - allowedValues: [ - "copy", - "deleted", - "metadata", - "snapshots", - "uncommittedblobs", - "versions", - "tags", - "immutabilitypolicy", - "legalhold", - "deletedwithversions", - ], - }, - }, - }, - }, - collectionFormat: "CSV", -}; -const delimiter = { - parameterPath: "delimiter", - mapper: { - serializedName: "delimiter", - required: true, - xmlName: "delimiter", - type: { - name: "String", - }, - }, -}; -const snapshot = { - parameterPath: ["options", "snapshot"], - mapper: { - serializedName: "snapshot", - xmlName: "snapshot", - type: { - name: "String", - }, - }, -}; -const versionId = { - parameterPath: ["options", "versionId"], - mapper: { - serializedName: "versionid", - xmlName: "versionid", - type: { - name: "String", - }, - }, -}; -const range = { - parameterPath: ["options", "range"], - mapper: { - serializedName: "x-ms-range", - xmlName: "x-ms-range", - type: { - name: "String", - }, - }, -}; -const rangeGetContentMD5 = { - parameterPath: ["options", "rangeGetContentMD5"], - mapper: { - serializedName: "x-ms-range-get-content-md5", - xmlName: "x-ms-range-get-content-md5", - type: { - name: "Boolean", - }, - }, -}; -const rangeGetContentCRC64 = { - parameterPath: ["options", "rangeGetContentCRC64"], - mapper: { - serializedName: "x-ms-range-get-content-crc64", - xmlName: "x-ms-range-get-content-crc64", - type: { - name: "Boolean", - }, - }, -}; -const encryptionKey = { - parameterPath: ["options", "cpkInfo", "encryptionKey"], - mapper: { - serializedName: "x-ms-encryption-key", - xmlName: "x-ms-encryption-key", - type: { - name: "String", - }, - }, -}; -const encryptionKeySha256 = { - parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], - mapper: { - serializedName: "x-ms-encryption-key-sha256", - xmlName: "x-ms-encryption-key-sha256", - type: { - name: "String", - }, - }, -}; -const encryptionAlgorithm = { - parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], - mapper: { - serializedName: "x-ms-encryption-algorithm", - xmlName: "x-ms-encryption-algorithm", - type: { - name: "String", - }, - }, -}; -const ifMatch = { - parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], - mapper: { - serializedName: "If-Match", - xmlName: "If-Match", - type: { - name: "String", - }, - }, -}; -const ifNoneMatch = { - parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], - mapper: { - serializedName: "If-None-Match", - xmlName: "If-None-Match", - type: { - name: "String", - }, - }, -}; -const ifTags = { - parameterPath: ["options", "modifiedAccessConditions", "ifTags"], - mapper: { - serializedName: "x-ms-if-tags", - xmlName: "x-ms-if-tags", - type: { - name: "String", - }, - }, -}; -const deleteSnapshots = { - parameterPath: ["options", "deleteSnapshots"], - mapper: { - serializedName: "x-ms-delete-snapshots", - xmlName: "x-ms-delete-snapshots", - type: { - name: "Enum", - allowedValues: ["include", "only"], - }, - }, -}; -const blobDeleteType = { - parameterPath: ["options", "blobDeleteType"], - mapper: { - serializedName: "deletetype", - xmlName: "deletetype", - type: { - name: "String", - }, - }, -}; -const comp11 = { - parameterPath: "comp", - mapper: { - defaultValue: "expiry", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const expiryOptions = { - parameterPath: "expiryOptions", - mapper: { - serializedName: "x-ms-expiry-option", - required: true, - xmlName: "x-ms-expiry-option", - type: { - name: "String", - }, - }, -}; -const expiresOn = { - parameterPath: ["options", "expiresOn"], - mapper: { - serializedName: "x-ms-expiry-time", - xmlName: "x-ms-expiry-time", - type: { - name: "String", - }, - }, -}; -const blobCacheControl = { - parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], - mapper: { - serializedName: "x-ms-blob-cache-control", - xmlName: "x-ms-blob-cache-control", - type: { - name: "String", - }, - }, -}; -const blobContentType = { - parameterPath: ["options", "blobHttpHeaders", "blobContentType"], - mapper: { - serializedName: "x-ms-blob-content-type", - xmlName: "x-ms-blob-content-type", - type: { - name: "String", - }, - }, -}; -const blobContentMD5 = { - parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], - mapper: { - serializedName: "x-ms-blob-content-md5", - xmlName: "x-ms-blob-content-md5", - type: { - name: "ByteArray", - }, - }, -}; -const blobContentEncoding = { - parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], - mapper: { - serializedName: "x-ms-blob-content-encoding", - xmlName: "x-ms-blob-content-encoding", - type: { - name: "String", - }, - }, -}; -const blobContentLanguage = { - parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], - mapper: { - serializedName: "x-ms-blob-content-language", - xmlName: "x-ms-blob-content-language", - type: { - name: "String", - }, - }, -}; -const blobContentDisposition = { - parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], - mapper: { - serializedName: "x-ms-blob-content-disposition", - xmlName: "x-ms-blob-content-disposition", - type: { - name: "String", - }, - }, -}; -const comp12 = { - parameterPath: "comp", - mapper: { - defaultValue: "immutabilityPolicies", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const immutabilityPolicyExpiry = { - parameterPath: ["options", "immutabilityPolicyExpiry"], - mapper: { - serializedName: "x-ms-immutability-policy-until-date", - xmlName: "x-ms-immutability-policy-until-date", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const immutabilityPolicyMode = { - parameterPath: ["options", "immutabilityPolicyMode"], - mapper: { - serializedName: "x-ms-immutability-policy-mode", - xmlName: "x-ms-immutability-policy-mode", - type: { - name: "Enum", - allowedValues: ["Mutable", "Unlocked", "Locked"], - }, - }, -}; -const comp13 = { - parameterPath: "comp", - mapper: { - defaultValue: "legalhold", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const legalHold = { - parameterPath: "legalHold", - mapper: { - serializedName: "x-ms-legal-hold", - required: true, - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, -}; -const encryptionScope = { - parameterPath: ["options", "encryptionScope"], - mapper: { - serializedName: "x-ms-encryption-scope", - xmlName: "x-ms-encryption-scope", - type: { - name: "String", - }, - }, -}; -const comp14 = { - parameterPath: "comp", - mapper: { - defaultValue: "snapshot", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const tier = { - parameterPath: ["options", "tier"], - mapper: { - serializedName: "x-ms-access-tier", - xmlName: "x-ms-access-tier", - type: { - name: "Enum", - allowedValues: [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - ], - }, - }, -}; -const rehydratePriority = { - parameterPath: ["options", "rehydratePriority"], - mapper: { - serializedName: "x-ms-rehydrate-priority", - xmlName: "x-ms-rehydrate-priority", - type: { - name: "Enum", - allowedValues: ["High", "Standard"], - }, - }, -}; -const sourceIfModifiedSince = { - parameterPath: [ - "options", - "sourceModifiedAccessConditions", - "sourceIfModifiedSince", - ], - mapper: { - serializedName: "x-ms-source-if-modified-since", - xmlName: "x-ms-source-if-modified-since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const sourceIfUnmodifiedSince = { - parameterPath: [ - "options", - "sourceModifiedAccessConditions", - "sourceIfUnmodifiedSince", - ], - mapper: { - serializedName: "x-ms-source-if-unmodified-since", - xmlName: "x-ms-source-if-unmodified-since", - type: { - name: "DateTimeRfc1123", - }, - }, -}; -const sourceIfMatch = { - parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], - mapper: { - serializedName: "x-ms-source-if-match", - xmlName: "x-ms-source-if-match", - type: { - name: "String", - }, - }, -}; -const sourceIfNoneMatch = { - parameterPath: [ - "options", - "sourceModifiedAccessConditions", - "sourceIfNoneMatch", - ], - mapper: { - serializedName: "x-ms-source-if-none-match", - xmlName: "x-ms-source-if-none-match", - type: { - name: "String", - }, - }, -}; -const sourceIfTags = { - parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], - mapper: { - serializedName: "x-ms-source-if-tags", - xmlName: "x-ms-source-if-tags", - type: { - name: "String", - }, - }, -}; -const copySource = { - parameterPath: "copySource", - mapper: { - serializedName: "x-ms-copy-source", - required: true, - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, -}; -const blobTagsString = { - parameterPath: ["options", "blobTagsString"], - mapper: { - serializedName: "x-ms-tags", - xmlName: "x-ms-tags", - type: { - name: "String", - }, - }, -}; -const sealBlob = { - parameterPath: ["options", "sealBlob"], - mapper: { - serializedName: "x-ms-seal-blob", - xmlName: "x-ms-seal-blob", - type: { - name: "Boolean", - }, - }, -}; -const legalHold1 = { - parameterPath: ["options", "legalHold"], - mapper: { - serializedName: "x-ms-legal-hold", - xmlName: "x-ms-legal-hold", - type: { - name: "Boolean", - }, - }, -}; -const xMsRequiresSync = { - parameterPath: "xMsRequiresSync", - mapper: { - defaultValue: "true", - isConstant: true, - serializedName: "x-ms-requires-sync", - type: { - name: "String", - }, - }, -}; -const sourceContentMD5 = { - parameterPath: ["options", "sourceContentMD5"], - mapper: { - serializedName: "x-ms-source-content-md5", - xmlName: "x-ms-source-content-md5", - type: { - name: "ByteArray", - }, - }, -}; -const copySourceAuthorization = { - parameterPath: ["options", "copySourceAuthorization"], - mapper: { - serializedName: "x-ms-copy-source-authorization", - xmlName: "x-ms-copy-source-authorization", - type: { - name: "String", - }, - }, -}; -const copySourceTags = { - parameterPath: ["options", "copySourceTags"], - mapper: { - serializedName: "x-ms-copy-source-tag-option", - xmlName: "x-ms-copy-source-tag-option", - type: { - name: "Enum", - allowedValues: ["REPLACE", "COPY"], - }, - }, -}; -const comp15 = { - parameterPath: "comp", - mapper: { - defaultValue: "copy", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const copyActionAbortConstant = { - parameterPath: "copyActionAbortConstant", - mapper: { - defaultValue: "abort", - isConstant: true, - serializedName: "x-ms-copy-action", - type: { - name: "String", - }, - }, -}; -const copyId = { - parameterPath: "copyId", - mapper: { - serializedName: "copyid", - required: true, - xmlName: "copyid", - type: { - name: "String", - }, - }, -}; -const comp16 = { - parameterPath: "comp", - mapper: { - defaultValue: "tier", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const tier1 = { - parameterPath: "tier", - mapper: { - serializedName: "x-ms-access-tier", - required: true, - xmlName: "x-ms-access-tier", - type: { - name: "Enum", - allowedValues: [ - "P4", - "P6", - "P10", - "P15", - "P20", - "P30", - "P40", - "P50", - "P60", - "P70", - "P80", - "Hot", - "Cool", - "Archive", - "Cold", - ], - }, - }, -}; -const queryRequest = { - parameterPath: ["options", "queryRequest"], - mapper: QueryRequest, -}; -const comp17 = { - parameterPath: "comp", - mapper: { - defaultValue: "query", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const comp18 = { - parameterPath: "comp", - mapper: { - defaultValue: "tags", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const tags = { - parameterPath: ["options", "tags"], - mapper: BlobTags, -}; -const transactionalContentMD5 = { - parameterPath: ["options", "transactionalContentMD5"], - mapper: { - serializedName: "Content-MD5", - xmlName: "Content-MD5", - type: { - name: "ByteArray", - }, - }, -}; -const transactionalContentCrc64 = { - parameterPath: ["options", "transactionalContentCrc64"], - mapper: { - serializedName: "x-ms-content-crc64", - xmlName: "x-ms-content-crc64", - type: { - name: "ByteArray", - }, - }, -}; -const blobType = { - parameterPath: "blobType", - mapper: { - defaultValue: "PageBlob", - isConstant: true, - serializedName: "x-ms-blob-type", - type: { - name: "String", - }, - }, -}; -const blobContentLength = { - parameterPath: "blobContentLength", - mapper: { - serializedName: "x-ms-blob-content-length", - required: true, - xmlName: "x-ms-blob-content-length", - type: { - name: "Number", - }, - }, -}; -const blobSequenceNumber = { - parameterPath: ["options", "blobSequenceNumber"], - mapper: { - defaultValue: 0, - serializedName: "x-ms-blob-sequence-number", - xmlName: "x-ms-blob-sequence-number", - type: { - name: "Number", - }, - }, -}; -const contentType1 = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/octet-stream", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; -const body1 = { - parameterPath: "body", - mapper: { - serializedName: "body", - required: true, - xmlName: "body", - type: { - name: "Stream", - }, - }, -}; -const accept2 = { - parameterPath: "accept", - mapper: { - defaultValue: "application/xml", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; -const comp19 = { - parameterPath: "comp", - mapper: { - defaultValue: "page", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const pageWrite = { - parameterPath: "pageWrite", - mapper: { - defaultValue: "update", - isConstant: true, - serializedName: "x-ms-page-write", - type: { - name: "String", - }, - }, -}; -const ifSequenceNumberLessThanOrEqualTo = { - parameterPath: [ - "options", - "sequenceNumberAccessConditions", - "ifSequenceNumberLessThanOrEqualTo", - ], - mapper: { - serializedName: "x-ms-if-sequence-number-le", - xmlName: "x-ms-if-sequence-number-le", - type: { - name: "Number", - }, - }, -}; -const ifSequenceNumberLessThan = { - parameterPath: [ - "options", - "sequenceNumberAccessConditions", - "ifSequenceNumberLessThan", - ], - mapper: { - serializedName: "x-ms-if-sequence-number-lt", - xmlName: "x-ms-if-sequence-number-lt", - type: { - name: "Number", - }, - }, -}; -const ifSequenceNumberEqualTo = { - parameterPath: [ - "options", - "sequenceNumberAccessConditions", - "ifSequenceNumberEqualTo", - ], - mapper: { - serializedName: "x-ms-if-sequence-number-eq", - xmlName: "x-ms-if-sequence-number-eq", - type: { - name: "Number", - }, - }, -}; -const pageWrite1 = { - parameterPath: "pageWrite", - mapper: { - defaultValue: "clear", - isConstant: true, - serializedName: "x-ms-page-write", - type: { - name: "String", - }, - }, -}; -const sourceUrl = { - parameterPath: "sourceUrl", - mapper: { - serializedName: "x-ms-copy-source", - required: true, - xmlName: "x-ms-copy-source", - type: { - name: "String", - }, - }, -}; -const sourceRange = { - parameterPath: "sourceRange", - mapper: { - serializedName: "x-ms-source-range", - required: true, - xmlName: "x-ms-source-range", - type: { - name: "String", - }, - }, -}; -const sourceContentCrc64 = { - parameterPath: ["options", "sourceContentCrc64"], - mapper: { - serializedName: "x-ms-source-content-crc64", - xmlName: "x-ms-source-content-crc64", - type: { - name: "ByteArray", - }, - }, -}; -const range1 = { - parameterPath: "range", - mapper: { - serializedName: "x-ms-range", - required: true, - xmlName: "x-ms-range", - type: { - name: "String", - }, - }, -}; -const comp20 = { - parameterPath: "comp", - mapper: { - defaultValue: "pagelist", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const prevsnapshot = { - parameterPath: ["options", "prevsnapshot"], - mapper: { - serializedName: "prevsnapshot", - xmlName: "prevsnapshot", - type: { - name: "String", - }, - }, -}; -const prevSnapshotUrl = { - parameterPath: ["options", "prevSnapshotUrl"], - mapper: { - serializedName: "x-ms-previous-snapshot-url", - xmlName: "x-ms-previous-snapshot-url", - type: { - name: "String", - }, - }, -}; -const sequenceNumberAction = { - parameterPath: "sequenceNumberAction", - mapper: { - serializedName: "x-ms-sequence-number-action", - required: true, - xmlName: "x-ms-sequence-number-action", - type: { - name: "Enum", - allowedValues: ["max", "update", "increment"], - }, - }, -}; -const comp21 = { - parameterPath: "comp", - mapper: { - defaultValue: "incrementalcopy", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const blobType1 = { - parameterPath: "blobType", - mapper: { - defaultValue: "AppendBlob", - isConstant: true, - serializedName: "x-ms-blob-type", - type: { - name: "String", - }, - }, -}; -const comp22 = { - parameterPath: "comp", - mapper: { - defaultValue: "appendblock", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const maxSize = { - parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], - mapper: { - serializedName: "x-ms-blob-condition-maxsize", - xmlName: "x-ms-blob-condition-maxsize", - type: { - name: "Number", - }, - }, -}; -const appendPosition = { - parameterPath: [ - "options", - "appendPositionAccessConditions", - "appendPosition", - ], - mapper: { - serializedName: "x-ms-blob-condition-appendpos", - xmlName: "x-ms-blob-condition-appendpos", - type: { - name: "Number", - }, - }, -}; -const sourceRange1 = { - parameterPath: ["options", "sourceRange"], - mapper: { - serializedName: "x-ms-source-range", - xmlName: "x-ms-source-range", - type: { - name: "String", - }, - }, -}; -const comp23 = { - parameterPath: "comp", - mapper: { - defaultValue: "seal", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const blobType2 = { - parameterPath: "blobType", - mapper: { - defaultValue: "BlockBlob", - isConstant: true, - serializedName: "x-ms-blob-type", - type: { - name: "String", - }, - }, -}; -const copySourceBlobProperties = { - parameterPath: ["options", "copySourceBlobProperties"], - mapper: { - serializedName: "x-ms-copy-source-blob-properties", - xmlName: "x-ms-copy-source-blob-properties", - type: { - name: "Boolean", - }, - }, -}; -const comp24 = { - parameterPath: "comp", - mapper: { - defaultValue: "block", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const blockId = { - parameterPath: "blockId", - mapper: { - serializedName: "blockid", - required: true, - xmlName: "blockid", - type: { - name: "String", - }, - }, -}; -const blocks = { - parameterPath: "blocks", - mapper: BlockLookupList, -}; -const comp25 = { - parameterPath: "comp", - mapper: { - defaultValue: "blocklist", - isConstant: true, - serializedName: "comp", - type: { - name: "String", - }, - }, -}; -const listType = { - parameterPath: "listType", - mapper: { - defaultValue: "committed", - serializedName: "blocklisttype", - required: true, - xmlName: "blocklisttype", - type: { - name: "Enum", - allowedValues: ["committed", "uncommitted", "all"], - }, - }, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing Service operations. */ -class ServiceImpl { - /** - * Initialize a new instance of the class Service class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * Sets properties for a storage account's Blob service endpoint, including properties for Storage - * Analytics and CORS (Cross-Origin Resource Sharing) rules - * @param blobServiceProperties The StorageService properties. - * @param options The options parameters. - */ - setProperties(blobServiceProperties, options) { - return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); - } - /** - * gets the properties of a storage account's Blob service, including properties for Storage Analytics - * and CORS (Cross-Origin Resource Sharing) rules. - * @param options The options parameters. - */ - getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$2); - } - /** - * Retrieves statistics related to replication for the Blob service. It is only available on the - * secondary location endpoint when read-access geo-redundant replication is enabled for the storage - * account. - * @param options The options parameters. - */ - getStatistics(options) { - return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec); - } - /** - * The List Containers Segment operation returns a list of the containers under the specified account - * @param options The options parameters. - */ - listContainersSegment(options) { - return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec); - } - /** - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using - * bearer token authentication. - * @param keyInfo Key information - * @param options The options parameters. - */ - getUserDelegationKey(keyInfo, options) { - return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); - } - /** - * Returns the sku name and account kind - * @param options The options parameters. - */ - getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$2); - } - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch - * boundary. Example header value: multipart/mixed; boundary=batch_ - * @param body Initial data - * @param options The options parameters. - */ - submitBatch(contentLength, multipartContentType, body, options) { - return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec$1); - } - /** - * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a - * given search expression. Filter blobs searches across all containers within a storage account but - * can be scoped within the expression to a single container. - * @param options The options parameters. - */ - filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec$1); - } -} -// Operation Specifications -const xmlSerializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const setPropertiesOperationSpec = { - path: "/", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: ServiceSetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceSetPropertiesExceptionHeaders, - }, - }, - requestBody: blobServiceProperties, - queryParameters: [ - restype, - comp, - timeoutInSeconds, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$5, -}; -const getPropertiesOperationSpec$2 = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlobServiceProperties, - headersMapper: ServiceGetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetPropertiesExceptionHeaders, - }, - }, - queryParameters: [ - restype, - comp, - timeoutInSeconds, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const getStatisticsOperationSpec = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlobServiceStatistics, - headersMapper: ServiceGetStatisticsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetStatisticsExceptionHeaders, - }, - }, - queryParameters: [ - restype, - timeoutInSeconds, - comp1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const listContainersSegmentOperationSpec = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: ListContainersSegmentResponse, - headersMapper: ServiceListContainersSegmentHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceListContainersSegmentExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - include, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const getUserDelegationKeyOperationSpec = { - path: "/", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: UserDelegationKey, - headersMapper: ServiceGetUserDelegationKeyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetUserDelegationKeyExceptionHeaders, - }, - }, - requestBody: keyInfo, - queryParameters: [ - restype, - timeoutInSeconds, - comp3, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$5, -}; -const getAccountInfoOperationSpec$2 = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - headersMapper: ServiceGetAccountInfoHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceGetAccountInfoExceptionHeaders, - }, - }, - queryParameters: [ - comp, - timeoutInSeconds, - restype1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; -const submitBatchOperationSpec$1 = { - path: "/", - httpMethod: "POST", - responses: { - 202: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: ServiceSubmitBatchHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceSubmitBatchExceptionHeaders, - }, - }, - requestBody: body, - queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], - headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$5, -}; -const filterBlobsOperationSpec$1 = { - path: "/", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ServiceFilterBlobsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ServiceFilterBlobsExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$5, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing Container operations. */ -class ContainerImpl { - /** - * Initialize a new instance of the class Container class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * creates a new container under the specified account. If the container with the same name already - * exists, the operation fails - * @param options The options parameters. - */ - create(options) { - return this.client.sendOperationRequest({ options }, createOperationSpec$2); - } - /** - * returns all user-defined metadata and system properties for the specified container. The data - * returned does not include the container's list of blobs - * @param options The options parameters. - */ - getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec$1); - } - /** - * operation marks the specified container for deletion. The container and any blobs contained within - * it are later deleted during garbage collection - * @param options The options parameters. - */ - delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec$1); - } - /** - * operation sets one or more user-defined name-value pairs for the specified container. - * @param options The options parameters. - */ - setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec$1); - } - /** - * gets the permissions for the specified container. The permissions indicate whether container data - * may be accessed publicly. - * @param options The options parameters. - */ - getAccessPolicy(options) { - return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec); - } - /** - * sets the permissions for the specified container. The permissions indicate whether blobs in a - * container may be accessed publicly. - * @param options The options parameters. - */ - setAccessPolicy(options) { - return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec); - } - /** - * Restores a previously-deleted container. - * @param options The options parameters. - */ - restore(options) { - return this.client.sendOperationRequest({ options }, restoreOperationSpec); - } - /** - * Renames an existing container. - * @param sourceContainerName Required. Specifies the name of the container to rename. - * @param options The options parameters. - */ - rename(sourceContainerName, options) { - return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); - } - /** - * The Batch operation allows multiple API calls to be embedded into a single HTTP request. - * @param contentLength The length of the request. - * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch - * boundary. Example header value: multipart/mixed; boundary=batch_ - * @param body Initial data - * @param options The options parameters. - */ - submitBatch(contentLength, multipartContentType, body, options) { - return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); - } - /** - * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given - * search expression. Filter blobs searches within the given container. - * @param options The options parameters. - */ - filterBlobs(options) { - return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param options The options parameters. - */ - acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - releaseLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - renewLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param options The options parameters. - */ - breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec$1); - } - /** - * [Update] establishes and manages a lock on a container for delete operations. The lock duration can - * be 15 to 60 seconds, or can be infinite - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 - * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor - * (String) for a list of valid GUID string formats. - * @param options The options parameters. - */ - changeLease(leaseId, proposedLeaseId, options) { - return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec$1); - } - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container - * @param options The options parameters. - */ - listBlobFlatSegment(options) { - return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec); - } - /** - * [Update] The List Blobs operation returns a list of the blobs under the specified container - * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix - * element in the response body that acts as a placeholder for all blobs whose names begin with the - * same substring up to the appearance of the delimiter character. The delimiter may be a single - * character or a string. - * @param options The options parameters. - */ - listBlobHierarchySegment(delimiter, options) { - return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); - } - /** - * Returns the sku name and account kind - * @param options The options parameters. - */ - getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec$1); - } -} -// Operation Specifications -const xmlSerializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const createOperationSpec$2 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: ContainerCreateHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerCreateExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - access, - defaultEncryptionScope, - preventEncryptionScopeOverride, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const getPropertiesOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - headersMapper: ContainerGetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerGetPropertiesExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const deleteOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "DELETE", - responses: { - 202: { - headersMapper: ContainerDeleteHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerDeleteExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const setMetadataOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerSetMetadataHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerSetMetadataExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp6, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const getAccessPolicyOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { name: "Composite", className: "SignedIdentifier" }, - }, - }, - serializedName: "SignedIdentifiers", - xmlName: "SignedIdentifiers", - xmlIsWrapped: true, - xmlElementName: "SignedIdentifier", - }, - headersMapper: ContainerGetAccessPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccessPolicyExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp7, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const setAccessPolicyOperationSpec = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerSetAccessPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerSetAccessPolicyExceptionHeaders, - }, - }, - requestBody: containerAcl, - queryParameters: [ - timeoutInSeconds, - restype2, - comp7, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - access, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$4, -}; -const restoreOperationSpec = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: ContainerRestoreHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerRestoreExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp8, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - deletedContainerName, - deletedContainerVersion, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const renameOperationSpec = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerRenameHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerRenameExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp9, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - sourceContainerName, - sourceLeaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const submitBatchOperationSpec = { - path: "/{containerName}", - httpMethod: "POST", - responses: { - 202: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: ContainerSubmitBatchHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerSubmitBatchExceptionHeaders, - }, - }, - requestBody: body, - queryParameters: [ - timeoutInSeconds, - comp4, - restype2, - ], - urlParameters: [url], - headerParameters: [ - accept, - version, - requestId, - contentLength, - multipartContentType, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$4, -}; -const filterBlobsOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: FilterBlobSegment, - headersMapper: ContainerFilterBlobsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerFilterBlobsExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - comp5, - where, - restype2, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const acquireLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: ContainerAcquireLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerAcquireLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const releaseLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerReleaseLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerReleaseLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const renewLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerRenewLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerRenewLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const breakLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: ContainerBreakLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerBreakLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const changeLeaseOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: ContainerChangeLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerChangeLeaseExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - restype2, - comp10, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const listBlobFlatSegmentOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: ListBlobsFlatSegmentResponse, - headersMapper: ContainerListBlobFlatSegmentHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobFlatSegmentExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const listBlobHierarchySegmentOperationSpec = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: ListBlobsHierarchySegmentResponse, - headersMapper: ContainerListBlobHierarchySegmentHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp2, - prefix, - marker, - maxPageSize, - restype2, - include1, - delimiter, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; -const getAccountInfoOperationSpec$1 = { - path: "/{containerName}", - httpMethod: "GET", - responses: { - 200: { - headersMapper: ContainerGetAccountInfoHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: ContainerGetAccountInfoExceptionHeaders, - }, - }, - queryParameters: [ - comp, - timeoutInSeconds, - restype1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$4, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing Blob operations. */ -class BlobImpl { - /** - * Initialize a new instance of the class Blob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Download operation reads or downloads a blob from the system, including its metadata and - * properties. You can also call Download to read a snapshot. - * @param options The options parameters. - */ - download(options) { - return this.client.sendOperationRequest({ options }, downloadOperationSpec); - } - /** - * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system - * properties for the blob. It does not return the content of the blob. - * @param options The options parameters. - */ - getProperties(options) { - return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); - } - /** - * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is - * permanently removed from the storage account. If the storage account's soft delete feature is - * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible - * immediately. However, the blob service retains the blob or snapshot for the number of days specified - * by the DeleteRetentionPolicy section of [Storage service properties] - * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is - * permanently removed from the storage account. Note that you continue to be charged for the - * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the - * "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You - * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a - * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 - * (ResourceNotFound). - * @param options The options parameters. - */ - delete(options) { - return this.client.sendOperationRequest({ options }, deleteOperationSpec); - } - /** - * Undelete a blob that was previously soft deleted - * @param options The options parameters. - */ - undelete(options) { - return this.client.sendOperationRequest({ options }, undeleteOperationSpec); - } - /** - * Sets the time a blob will expire and be deleted. - * @param expiryOptions Required. Indicates mode of the expiry time - * @param options The options parameters. - */ - setExpiry(expiryOptions, options) { - return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); - } - /** - * The Set HTTP Headers operation sets system properties on the blob - * @param options The options parameters. - */ - setHttpHeaders(options) { - return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec); - } - /** - * The Set Immutability Policy operation sets the immutability policy on the blob - * @param options The options parameters. - */ - setImmutabilityPolicy(options) { - return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec); - } - /** - * The Delete Immutability Policy operation deletes the immutability policy on the blob - * @param options The options parameters. - */ - deleteImmutabilityPolicy(options) { - return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec); - } - /** - * The Set Legal Hold operation sets a legal hold on the blob. - * @param legalHold Specified if a legal hold should be set on the blob. - * @param options The options parameters. - */ - setLegalHold(legalHold, options) { - return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); - } - /** - * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more - * name-value pairs - * @param options The options parameters. - */ - setMetadata(options) { - return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param options The options parameters. - */ - acquireLease(options) { - return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - releaseLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param leaseId Specifies the current lease ID on the resource. - * @param options The options parameters. - */ - renewLease(leaseId, options) { - return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param leaseId Specifies the current lease ID on the resource. - * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 - * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor - * (String) for a list of valid GUID string formats. - * @param options The options parameters. - */ - changeLease(leaseId, proposedLeaseId, options) { - return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); - } - /** - * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete - * operations - * @param options The options parameters. - */ - breakLease(options) { - return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); - } - /** - * The Create Snapshot operation creates a read-only snapshot of a blob - * @param options The options parameters. - */ - createSnapshot(options) { - return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec); - } - /** - * The Start Copy From URL operation copies a blob or an internet resource to a new blob. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - startCopyFromURL(copySource, options) { - return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); - } - /** - * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return - * a response until the copy is complete. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - copyFromURL(copySource, options) { - return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); - } - /** - * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination - * blob with zero length and full metadata. - * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob - * operation. - * @param options The options parameters. - */ - abortCopyFromURL(copyId, options) { - return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); - } - /** - * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium - * storage account and on a block blob in a blob storage account (locally redundant storage only). A - * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block - * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's - * ETag. - * @param tier Indicates the tier to be set on the blob. - * @param options The options parameters. - */ - setTier(tier, options) { - return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); - } - /** - * Returns the sku name and account kind - * @param options The options parameters. - */ - getAccountInfo(options) { - return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); - } - /** - * The Query operation enables users to select/project on blob data by providing simple query - * expressions. - * @param options The options parameters. - */ - query(options) { - return this.client.sendOperationRequest({ options }, queryOperationSpec); - } - /** - * The Get Tags operation enables users to get the tags associated with a blob. - * @param options The options parameters. - */ - getTags(options) { - return this.client.sendOperationRequest({ options }, getTagsOperationSpec); - } - /** - * The Set Tags operation enables users to set tags on a blob. - * @param options The options parameters. - */ - setTags(options) { - return this.client.sendOperationRequest({ options }, setTagsOperationSpec); - } -} -// Operation Specifications -const xmlSerializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const downloadOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobDownloadHeaders, - }, - 206: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobDownloadHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobDownloadExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - rangeGetContentMD5, - rangeGetContentCRC64, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const getPropertiesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "HEAD", - responses: { - 200: { - headersMapper: BlobGetPropertiesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetPropertiesExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const deleteOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "DELETE", - responses: { - 202: { - headersMapper: BlobDeleteHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - blobDeleteType, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - deleteSnapshots, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const undeleteOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobUndeleteHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobUndeleteExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setExpiryOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetExpiryHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetExpiryExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - expiryOptions, - expiresOn, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setHttpHeadersOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetHttpHeadersHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetHttpHeadersExceptionHeaders, - }, - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setImmutabilityPolicyOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetImmutabilityPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetImmutabilityPolicyExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp12, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifUnmodifiedSince, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const deleteImmutabilityPolicyOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: BlobDeleteImmutabilityPolicyHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp12, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setLegalHoldOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetLegalHoldHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetLegalHoldExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp13, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - legalHold, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setMetadataOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetMetadataHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetMetadataExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const acquireLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlobAcquireLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobAcquireLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action, - duration, - proposedLeaseId, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const releaseLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobReleaseLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobReleaseLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action1, - leaseId1, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const renewLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobRenewLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobRenewLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action2, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const changeLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobChangeLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobChangeLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - leaseId1, - action4, - proposedLeaseId1, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const breakLeaseOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: BlobBreakLeaseHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobBreakLeaseExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - action3, - breakPeriod, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const createSnapshotOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlobCreateSnapshotHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobCreateSnapshotExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const startCopyFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: BlobStartCopyFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobStartCopyFromURLExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - tier, - rehydratePriority, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sealBlob, - legalHold1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const copyFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: BlobCopyFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobCopyFromURLExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - copySource, - blobTagsString, - legalHold1, - xMsRequiresSync, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const abortCopyFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 204: { - headersMapper: BlobAbortCopyFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobAbortCopyFromURLExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp15, - copyId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - copyActionAbortConstant, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setTierOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: BlobSetTierHeaders, - }, - 202: { - headersMapper: BlobSetTierHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetTierExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp16, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - rehydratePriority, - tier1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const getAccountInfoOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - headersMapper: BlobGetAccountInfoHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetAccountInfoExceptionHeaders, - }, - }, - queryParameters: [ - comp, - timeoutInSeconds, - restype1, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const queryOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobQueryHeaders, - }, - 206: { - bodyMapper: { - type: { name: "Stream" }, - serializedName: "parsedResponse", - }, - headersMapper: BlobQueryHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobQueryExceptionHeaders, - }, - }, - requestBody: queryRequest, - queryParameters: [ - timeoutInSeconds, - snapshot, - comp17, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$3, -}; -const getTagsOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlobTags, - headersMapper: BlobGetTagsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobGetTagsExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - versionId, - comp18, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$3, -}; -const setTagsOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 204: { - headersMapper: BlobSetTagsHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlobSetTagsExceptionHeaders, - }, - }, - requestBody: tags, - queryParameters: [ - timeoutInSeconds, - versionId, - comp18, - ], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - leaseId, - ifTags, - transactionalContentMD5, - transactionalContentCrc64, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer$3, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing PageBlob operations. */ -class PageBlobImpl { - /** - * Initialize a new instance of the class PageBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Create operation creates a new page blob. - * @param contentLength The length of the request. - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The - * page blob size must be aligned to a 512-byte boundary. - * @param options The options parameters. - */ - create(contentLength, blobContentLength, options) { - return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec$1); - } - /** - * The Upload Pages operation writes a range of pages to a page blob - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - uploadPages(contentLength, body, options) { - return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); - } - /** - * The Clear Pages operation clears a set of pages from a page blob - * @param contentLength The length of the request. - * @param options The options parameters. - */ - clearPages(contentLength, options) { - return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); - } - /** - * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a - * URL - * @param sourceUrl Specify a URL to the copy source. - * @param sourceRange Bytes of source data in the specified range. The length of this range should - * match the ContentLength header and x-ms-range/Range destination range header. - * @param contentLength The length of the request. - * @param range The range of bytes to which the source range would be written. The range should be 512 - * aligned and range-end is required. - * @param options The options parameters. - */ - uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { - return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); - } - /** - * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a - * page blob - * @param options The options parameters. - */ - getPageRanges(options) { - return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); - } - /** - * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were - * changed between target blob and previous snapshot. - * @param options The options parameters. - */ - getPageRangesDiff(options) { - return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); - } - /** - * Resize the Blob - * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The - * page blob size must be aligned to a 512-byte boundary. - * @param options The options parameters. - */ - resize(blobContentLength, options) { - return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); - } - /** - * Update the sequence number of the blob - * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. - * This property applies to page blobs only. This property indicates how the service should modify the - * blob's sequence number - * @param options The options parameters. - */ - updateSequenceNumber(sequenceNumberAction, options) { - return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); - } - /** - * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. - * The snapshot is copied such that only the differential changes between the previously copied - * snapshot are transferred to the destination. The copied snapshots are complete copies of the - * original snapshot and can be read or copied from as usual. This API is supported since REST version - * 2016-05-31. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - copyIncremental(copySource, options) { - return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); - } -} -// Operation Specifications -const xmlSerializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const createOperationSpec$1 = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobCreateHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobCreateExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - blobType, - blobContentLength, - blobSequenceNumber, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const uploadPagesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobUploadPagesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer$2, -}; -const clearPagesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobClearPagesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobClearPagesExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - pageWrite1, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const uploadPagesFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: PageBlobUploadPagesFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUploadPagesFromURLExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - pageWrite, - ifSequenceNumberLessThanOrEqualTo, - ifSequenceNumberLessThan, - ifSequenceNumberEqualTo, - sourceUrl, - sourceRange, - sourceContentCrc64, - range1, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const getPageRangesOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const getPageRangesDiffOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: PageList, - headersMapper: PageBlobGetPageRangesDiffHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobGetPageRangesDiffExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - marker, - maxPageSize, - snapshot, - comp20, - prevsnapshot, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - range, - ifMatch, - ifNoneMatch, - ifTags, - prevSnapshotUrl, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const resizeOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: PageBlobResizeHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobResizeExceptionHeaders, - }, - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - blobContentLength, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const updateSequenceNumberOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: PageBlobUpdateSequenceNumberHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders, - }, - }, - queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - blobSequenceNumber, - sequenceNumberAction, - ], - isXML: true, - serializer: xmlSerializer$2, -}; -const copyIncrementalOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 202: { - headersMapper: PageBlobCopyIncrementalHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: PageBlobCopyIncrementalExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - ifTags, - copySource, - ], - isXML: true, - serializer: xmlSerializer$2, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing AppendBlob operations. */ -class AppendBlobImpl { - /** - * Initialize a new instance of the class AppendBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Create Append Blob operation creates a new append blob. - * @param contentLength The length of the request. - * @param options The options parameters. - */ - create(contentLength, options) { - return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob. The - * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to - * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - appendBlock(contentLength, body, options) { - return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob where - * the contents are read from a source url. The Append Block operation is permitted only if the blob - * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version - * 2015-02-21 version or later. - * @param sourceUrl Specify a URL to the copy source. - * @param contentLength The length of the request. - * @param options The options parameters. - */ - appendBlockFromUrl(sourceUrl, contentLength, options) { - return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); - } - /** - * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version - * 2019-12-12 version or later. - * @param options The options parameters. - */ - seal(options) { - return this.client.sendOperationRequest({ options }, sealOperationSpec); - } -} -// Operation Specifications -const xmlSerializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const createOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: AppendBlobCreateHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobCreateExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - blobTagsString, - legalHold1, - blobType1, - ], - isXML: true, - serializer: xmlSerializer$1, -}; -const appendBlockOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: AppendBlobAppendBlockHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - maxSize, - appendPosition, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer$1, -}; -const appendBlockFromUrlOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: AppendBlobAppendBlockFromUrlHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - transactionalContentMD5, - sourceUrl, - sourceContentCrc64, - maxSize, - appendPosition, - sourceRange1, - ], - isXML: true, - serializer: xmlSerializer$1, -}; -const sealOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 200: { - headersMapper: AppendBlobSealHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: AppendBlobSealExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - ifMatch, - ifNoneMatch, - appendPosition, - ], - isXML: true, - serializer: xmlSerializer$1, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -/** Class containing BlockBlob operations. */ -class BlockBlobImpl { - /** - * Initialize a new instance of the class BlockBlob class. - * @param client Reference to the service client - */ - constructor(client) { - this.client = client; - } - /** - * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing - * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put - * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a - * partial update of the content of a block blob, use the Put Block List operation. - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - upload(contentLength, body, options) { - return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); - } - /** - * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read - * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are - * not supported with Put Blob from URL; the content of an existing blob is overwritten with the - * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, - * use the Put Block from URL API in conjunction with Put Block List. - * @param contentLength The length of the request. - * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to - * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would - * appear in a request URI. The source blob must either be public or must be authenticated via a shared - * access signature. - * @param options The options parameters. - */ - putBlobFromUrl(contentLength, copySource, options) { - return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); - } - /** - * The Stage Block operation creates a new block to be committed as part of a blob - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string - * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified - * for the blockid parameter must be the same size for each block. - * @param contentLength The length of the request. - * @param body Initial data - * @param options The options parameters. - */ - stageBlock(blockId, contentLength, body, options) { - return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); - } - /** - * The Stage Block operation creates a new block to be committed as part of a blob where the contents - * are read from a URL. - * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string - * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified - * for the blockid parameter must be the same size for each block. - * @param contentLength The length of the request. - * @param sourceUrl Specify a URL to the copy source. - * @param options The options parameters. - */ - stageBlockFromURL(blockId, contentLength, sourceUrl, options) { - return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); - } - /** - * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the - * blob. In order to be written as part of a blob, a block must have been successfully written to the - * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading - * only those blocks that have changed, then committing the new and existing blocks together. You can - * do this by specifying whether to commit a block from the committed block list or from the - * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list - * it may belong to. - * @param blocks Blob Blocks. - * @param options The options parameters. - */ - commitBlockList(blocks, options) { - return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); - } - /** - * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block - * blob - * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted - * blocks, or both lists together. - * @param options The options parameters. - */ - getBlockList(listType, options) { - return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); - } -} -// Operation Specifications -const xmlSerializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ true); -const uploadOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobUploadHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobUploadExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - blobType2, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer, -}; -const putBlobFromUrlOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobPutBlobFromUrlHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders, - }, - }, - queryParameters: [timeoutInSeconds], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - encryptionScope, - tier, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceIfTags, - copySource, - blobTagsString, - sourceContentMD5, - copySourceAuthorization, - copySourceTags, - transactionalContentMD5, - blobType2, - copySourceBlobProperties, - ], - isXML: true, - serializer: xmlSerializer, -}; -const stageBlockOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobStageBlockHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockExceptionHeaders, - }, - }, - requestBody: body1, - queryParameters: [ - timeoutInSeconds, - comp24, - blockId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - transactionalContentMD5, - transactionalContentCrc64, - contentType1, - accept2, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "binary", - serializer: xmlSerializer, -}; -const stageBlockFromURLOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobStageBlockFromURLHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobStageBlockFromURLExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - comp24, - blockId, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - contentLength, - leaseId, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - encryptionScope, - sourceIfModifiedSince, - sourceIfUnmodifiedSince, - sourceIfMatch, - sourceIfNoneMatch, - sourceContentMD5, - copySourceAuthorization, - sourceUrl, - sourceContentCrc64, - sourceRange1, - ], - isXML: true, - serializer: xmlSerializer, -}; -const commitBlockListOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "PUT", - responses: { - 201: { - headersMapper: BlockBlobCommitBlockListHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobCommitBlockListExceptionHeaders, - }, - }, - requestBody: blocks, - queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], - headerParameters: [ - contentType, - accept, - version, - requestId, - metadata, - leaseId, - ifModifiedSince, - ifUnmodifiedSince, - encryptionKey, - encryptionKeySha256, - encryptionAlgorithm, - ifMatch, - ifNoneMatch, - ifTags, - blobCacheControl, - blobContentType, - blobContentMD5, - blobContentEncoding, - blobContentLanguage, - blobContentDisposition, - immutabilityPolicyExpiry, - immutabilityPolicyMode, - encryptionScope, - tier, - blobTagsString, - legalHold1, - transactionalContentMD5, - transactionalContentCrc64, - ], - isXML: true, - contentType: "application/xml; charset=utf-8", - mediaType: "xml", - serializer: xmlSerializer, -}; -const getBlockListOperationSpec = { - path: "/{containerName}/{blob}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: BlockList, - headersMapper: BlockBlobGetBlockListHeaders, - }, - default: { - bodyMapper: StorageError, - headersMapper: BlockBlobGetBlockListExceptionHeaders, - }, - }, - queryParameters: [ - timeoutInSeconds, - snapshot, - comp25, - listType, - ], - urlParameters: [url], - headerParameters: [ - version, - requestId, - accept1, - leaseId, - ifTags, - ], - isXML: true, - serializer: xmlSerializer, -}; - -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.ExtendedServiceClient { - /** - * Initializes a new instance of the StorageClient class. - * @param url The URL of the service account, container, or blob that is the target of the desired - * operation. - * @param options The parameter options - */ - constructor(url, options) { - var _a, _b; - if (url === undefined) { - throw new Error("'url' cannot be null"); - } - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults = { - requestContentType: "application/json; charset=utf-8", - }; - const packageDetails = `azsdk-js-azure-storage-blob/12.27.0`; - const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { - userAgentPrefix, - }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); - super(optionsWithDefaults); - // Parameter assignments - this.url = url; - // Assigning values to Constant parameters - this.version = options.version || "2025-05-05"; - this.service = new ServiceImpl(this); - this.container = new ContainerImpl(this); - this.blob = new BlobImpl(this); - this.pageBlob = new PageBlobImpl(this); - this.appendBlob = new AppendBlobImpl(this); - this.blockBlob = new BlockBlobImpl(this); - } -}; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * @internal - */ -class StorageContextClient extends StorageClient$1 { - async sendOperationRequest(operationArguments, operationSpec) { - const operationSpecToSend = Object.assign({}, operationSpec); - if (operationSpecToSend.path === "/{containerName}" || - operationSpecToSend.path === "/{containerName}/{blob}") { - operationSpecToSend.path = ""; - } - return super.sendOperationRequest(operationArguments, operationSpecToSend); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} - * and etc. - */ -class StorageClient { - /** - * Creates an instance of StorageClient. - * @param url - url to resource - * @param pipeline - request policy pipeline. - */ - constructor(url, pipeline) { - // URL should be encoded and only once, protocol layer shouldn't encode URL again - this.url = escapeURLPath(url); - this.accountName = getAccountNameFromUrl(url); - this.pipeline = pipeline; - this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); - this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); - this.credential = getCredentialFromPipeline(pipeline); - // Override protocol layer's default content-type - const storageClientContext = this.storageClientContext; - storageClientContext.requestContentType = undefined; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Creates a span using the global tracer. - * @internal - */ -const tracingClient = coreTracing.createTracingClient({ - packageName: "@azure/storage-blob", - packageVersion: SDK_VERSION, - namespace: "Microsoft.Storage", -}); - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting - * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all - * the values are set, this should be serialized with toString and set as the permissions field on a - * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ -class BlobSASPermissions { - constructor() { - /** - * Specifies Read access granted. - */ - this.read = false; - /** - * Specifies Add access granted. - */ - this.add = false; - /** - * Specifies Create access granted. - */ - this.create = false; - /** - * Specifies Write access granted. - */ - this.write = false; - /** - * Specifies Delete access granted. - */ - this.delete = false; - /** - * Specifies Delete version access granted. - */ - this.deleteVersion = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Specifies Move access granted. - */ - this.move = false; - /** - * Specifies Execute access granted. - */ - this.execute = false; - /** - * Specifies SetImmutabilityPolicy access granted. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - } - /** - * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an - * Error if it encounters a character that does not correspond to a valid permission. - * - * @param permissions - - */ - static parse(permissions) { - const blobSASPermissions = new BlobSASPermissions(); - for (const char of permissions) { - switch (char) { - case "r": - blobSASPermissions.read = true; - break; - case "a": - blobSASPermissions.add = true; - break; - case "c": - blobSASPermissions.create = true; - break; - case "w": - blobSASPermissions.write = true; - break; - case "d": - blobSASPermissions.delete = true; - break; - case "x": - blobSASPermissions.deleteVersion = true; - break; - case "t": - blobSASPermissions.tag = true; - break; - case "m": - blobSASPermissions.move = true; - break; - case "e": - blobSASPermissions.execute = true; - break; - case "i": - blobSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - blobSASPermissions.permanentDelete = true; - break; - default: - throw new RangeError(`Invalid permission: ${char}`); - } - } - return blobSASPermissions; - } - /** - * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const blobSASPermissions = new BlobSASPermissions(); - if (permissionLike.read) { - blobSASPermissions.read = true; - } - if (permissionLike.add) { - blobSASPermissions.add = true; - } - if (permissionLike.create) { - blobSASPermissions.create = true; - } - if (permissionLike.write) { - blobSASPermissions.write = true; - } - if (permissionLike.delete) { - blobSASPermissions.delete = true; - } - if (permissionLike.deleteVersion) { - blobSASPermissions.deleteVersion = true; - } - if (permissionLike.tag) { - blobSASPermissions.tag = true; - } - if (permissionLike.move) { - blobSASPermissions.move = true; - } - if (permissionLike.execute) { - blobSASPermissions.execute = true; - } - if (permissionLike.setImmutabilityPolicy) { - blobSASPermissions.setImmutabilityPolicy = true; - } - if (permissionLike.permanentDelete) { - blobSASPermissions.permanentDelete = true; - } - return blobSASPermissions; - } - /** - * Converts the given permissions to a string. Using this method will guarantee the permissions are in an - * order accepted by the service. - * - * @returns A string which represents the BlobSASPermissions - */ - toString() { - const permissions = []; - if (this.read) { - permissions.push("r"); - } - if (this.add) { - permissions.push("a"); - } - if (this.create) { - permissions.push("c"); - } - if (this.write) { - permissions.push("w"); - } - if (this.delete) { - permissions.push("d"); - } - if (this.deleteVersion) { - permissions.push("x"); - } - if (this.tag) { - permissions.push("t"); - } - if (this.move) { - permissions.push("m"); - } - if (this.execute) { - permissions.push("e"); - } - if (this.setImmutabilityPolicy) { - permissions.push("i"); - } - if (this.permanentDelete) { - permissions.push("y"); - } - return permissions.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. - * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. - * Once all the values are set, this should be serialized with toString and set as the permissions field on a - * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ -class ContainerSASPermissions { - constructor() { - /** - * Specifies Read access granted. - */ - this.read = false; - /** - * Specifies Add access granted. - */ - this.add = false; - /** - * Specifies Create access granted. - */ - this.create = false; - /** - * Specifies Write access granted. - */ - this.write = false; - /** - * Specifies Delete access granted. - */ - this.delete = false; - /** - * Specifies Delete version access granted. - */ - this.deleteVersion = false; - /** - * Specifies List access granted. - */ - this.list = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Specifies Move access granted. - */ - this.move = false; - /** - * Specifies Execute access granted. - */ - this.execute = false; - /** - * Specifies SetImmutabilityPolicy access granted. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - /** - * Specifies that Filter Blobs by Tags is permitted. - */ - this.filterByTags = false; - } - /** - * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an - * Error if it encounters a character that does not correspond to a valid permission. - * - * @param permissions - - */ - static parse(permissions) { - const containerSASPermissions = new ContainerSASPermissions(); - for (const char of permissions) { - switch (char) { - case "r": - containerSASPermissions.read = true; - break; - case "a": - containerSASPermissions.add = true; - break; - case "c": - containerSASPermissions.create = true; - break; - case "w": - containerSASPermissions.write = true; - break; - case "d": - containerSASPermissions.delete = true; - break; - case "l": - containerSASPermissions.list = true; - break; - case "t": - containerSASPermissions.tag = true; - break; - case "x": - containerSASPermissions.deleteVersion = true; - break; - case "m": - containerSASPermissions.move = true; - break; - case "e": - containerSASPermissions.execute = true; - break; - case "i": - containerSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - containerSASPermissions.permanentDelete = true; - break; - case "f": - containerSASPermissions.filterByTags = true; - break; - default: - throw new RangeError(`Invalid permission ${char}`); - } - } - return containerSASPermissions; - } - /** - * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const containerSASPermissions = new ContainerSASPermissions(); - if (permissionLike.read) { - containerSASPermissions.read = true; - } - if (permissionLike.add) { - containerSASPermissions.add = true; - } - if (permissionLike.create) { - containerSASPermissions.create = true; - } - if (permissionLike.write) { - containerSASPermissions.write = true; - } - if (permissionLike.delete) { - containerSASPermissions.delete = true; - } - if (permissionLike.list) { - containerSASPermissions.list = true; - } - if (permissionLike.deleteVersion) { - containerSASPermissions.deleteVersion = true; - } - if (permissionLike.tag) { - containerSASPermissions.tag = true; - } - if (permissionLike.move) { - containerSASPermissions.move = true; - } - if (permissionLike.execute) { - containerSASPermissions.execute = true; - } - if (permissionLike.setImmutabilityPolicy) { - containerSASPermissions.setImmutabilityPolicy = true; - } - if (permissionLike.permanentDelete) { - containerSASPermissions.permanentDelete = true; - } - if (permissionLike.filterByTags) { - containerSASPermissions.filterByTags = true; - } - return containerSASPermissions; - } - /** - * Converts the given permissions to a string. Using this method will guarantee the permissions are in an - * order accepted by the service. - * - * The order of the characters should be as specified here to ensure correctness. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - */ - toString() { - const permissions = []; - if (this.read) { - permissions.push("r"); - } - if (this.add) { - permissions.push("a"); - } - if (this.create) { - permissions.push("c"); - } - if (this.write) { - permissions.push("w"); - } - if (this.delete) { - permissions.push("d"); - } - if (this.deleteVersion) { - permissions.push("x"); - } - if (this.list) { - permissions.push("l"); - } - if (this.tag) { - permissions.push("t"); - } - if (this.move) { - permissions.push("m"); - } - if (this.execute) { - permissions.push("e"); - } - if (this.setImmutabilityPolicy) { - permissions.push("i"); - } - if (this.permanentDelete) { - permissions.push("y"); - } - if (this.filterByTags) { - permissions.push("f"); - } - return permissions.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * UserDelegationKeyCredential is only used for generation of user delegation SAS. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas - */ -class UserDelegationKeyCredential { - /** - * Creates an instance of UserDelegationKeyCredential. - * @param accountName - - * @param userDelegationKey - - */ - constructor(accountName, userDelegationKey) { - this.accountName = accountName; - this.userDelegationKey = userDelegationKey; - this.key = Buffer.from(userDelegationKey.value, "base64"); - } - /** - * Generates a hash signature for an HTTP request or for a SAS. - * - * @param stringToSign - - */ - computeHMACSHA256(stringToSign) { - // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); - return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64"); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Generate SasIPRange format string. For example: - * - * "8.8.8.8" or "1.1.1.1-255.255.255.255" - * - * @param ipRange - - */ -function ipRangeToString(ipRange) { - return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Protocols for generated SAS. - */ -exports.SASProtocol = void 0; -(function (SASProtocol) { - /** - * Protocol that allows HTTPS only - */ - SASProtocol["Https"] = "https"; - /** - * Protocol that allows both HTTPS and HTTP - */ - SASProtocol["HttpsAndHttp"] = "https,http"; -})(exports.SASProtocol || (exports.SASProtocol = {})); -/** - * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly - * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} - * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should - * be taken here in case there are existing query parameters, which might affect the appropriate means of appending - * these query parameters). - * - * NOTE: Instances of this class are immutable. - */ -class SASQueryParameters { - /** - * Optional. IP range allowed for this SAS. - * - * @readonly - */ - get ipRange() { - if (this.ipRangeInner) { - return { - end: this.ipRangeInner.end, - start: this.ipRangeInner.start, - }; - } - return undefined; - } - constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { - this.version = version; - this.signature = signature; - if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { - // SASQueryParametersOptions - this.permissions = permissionsOrOptions.permissions; - this.services = permissionsOrOptions.services; - this.resourceTypes = permissionsOrOptions.resourceTypes; - this.protocol = permissionsOrOptions.protocol; - this.startsOn = permissionsOrOptions.startsOn; - this.expiresOn = permissionsOrOptions.expiresOn; - this.ipRangeInner = permissionsOrOptions.ipRange; - this.identifier = permissionsOrOptions.identifier; - this.encryptionScope = permissionsOrOptions.encryptionScope; - this.resource = permissionsOrOptions.resource; - this.cacheControl = permissionsOrOptions.cacheControl; - this.contentDisposition = permissionsOrOptions.contentDisposition; - this.contentEncoding = permissionsOrOptions.contentEncoding; - this.contentLanguage = permissionsOrOptions.contentLanguage; - this.contentType = permissionsOrOptions.contentType; - if (permissionsOrOptions.userDelegationKey) { - this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; - this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; - this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; - this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; - this.signedService = permissionsOrOptions.userDelegationKey.signedService; - this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; - this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; - this.correlationId = permissionsOrOptions.correlationId; - } - } - else { - this.services = services; - this.resourceTypes = resourceTypes; - this.expiresOn = expiresOn; - this.permissions = permissionsOrOptions; - this.protocol = protocol; - this.startsOn = startsOn; - this.ipRangeInner = ipRange; - this.encryptionScope = encryptionScope; - this.identifier = identifier; - this.resource = resource; - this.cacheControl = cacheControl; - this.contentDisposition = contentDisposition; - this.contentEncoding = contentEncoding; - this.contentLanguage = contentLanguage; - this.contentType = contentType; - if (userDelegationKey) { - this.signedOid = userDelegationKey.signedObjectId; - this.signedTenantId = userDelegationKey.signedTenantId; - this.signedStartsOn = userDelegationKey.signedStartsOn; - this.signedExpiresOn = userDelegationKey.signedExpiresOn; - this.signedService = userDelegationKey.signedService; - this.signedVersion = userDelegationKey.signedVersion; - this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; - this.correlationId = correlationId; - } - } - } - /** - * Encodes all SAS query parameters into a string that can be appended to a URL. - * - */ - toString() { - const params = [ - "sv", - "ss", - "srt", - "spr", - "st", - "se", - "sip", - "si", - "ses", - "skoid", // Signed object ID - "sktid", // Signed tenant ID - "skt", // Signed key start time - "ske", // Signed key expiry time - "sks", // Signed key service - "skv", // Signed key version - "sr", - "sp", - "sig", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "saoid", - "scid", - ]; - const queries = []; - for (const param of params) { - switch (param) { - case "sv": - this.tryAppendQueryParameter(queries, param, this.version); - break; - case "ss": - this.tryAppendQueryParameter(queries, param, this.services); - break; - case "srt": - this.tryAppendQueryParameter(queries, param, this.resourceTypes); - break; - case "spr": - this.tryAppendQueryParameter(queries, param, this.protocol); - break; - case "st": - this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined); - break; - case "se": - this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined); - break; - case "sip": - this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined); - break; - case "si": - this.tryAppendQueryParameter(queries, param, this.identifier); - break; - case "ses": - this.tryAppendQueryParameter(queries, param, this.encryptionScope); - break; - case "skoid": // Signed object ID - this.tryAppendQueryParameter(queries, param, this.signedOid); - break; - case "sktid": // Signed tenant ID - this.tryAppendQueryParameter(queries, param, this.signedTenantId); - break; - case "skt": // Signed key start time - this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined); - break; - case "ske": // Signed key expiry time - this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined); - break; - case "sks": // Signed key service - this.tryAppendQueryParameter(queries, param, this.signedService); - break; - case "skv": // Signed key version - this.tryAppendQueryParameter(queries, param, this.signedVersion); - break; - case "sr": - this.tryAppendQueryParameter(queries, param, this.resource); - break; - case "sp": - this.tryAppendQueryParameter(queries, param, this.permissions); - break; - case "sig": - this.tryAppendQueryParameter(queries, param, this.signature); - break; - case "rscc": - this.tryAppendQueryParameter(queries, param, this.cacheControl); - break; - case "rscd": - this.tryAppendQueryParameter(queries, param, this.contentDisposition); - break; - case "rsce": - this.tryAppendQueryParameter(queries, param, this.contentEncoding); - break; - case "rscl": - this.tryAppendQueryParameter(queries, param, this.contentLanguage); - break; - case "rsct": - this.tryAppendQueryParameter(queries, param, this.contentType); - break; - case "saoid": - this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); - break; - case "scid": - this.tryAppendQueryParameter(queries, param, this.correlationId); - break; - } - } - return queries.join("&"); - } - /** - * A private helper method used to filter and append query key/value pairs into an array. - * - * @param queries - - * @param key - - * @param value - - */ - tryAppendQueryParameter(queries, key, value) { - if (!value) { - return; - } - key = encodeURIComponent(key); - value = encodeURIComponent(value); - if (key.length > 0 && value.length > 0) { - queries.push(`${key}=${value}`); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; -} -function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { - const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential - ? sharedKeyCredentialOrUserDelegationKey - : undefined; - let userDelegationKeyCredential; - if (sharedKeyCredential === undefined && accountName !== undefined) { - userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); - } - if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { - throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); - } - // Version 2020-12-06 adds support for encryptionscope in SAS. - if (version >= "2020-12-06") { - if (sharedKeyCredential !== undefined) { - return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); - } - else { - return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); - } - } - // Version 2019-12-12 adds support for the blob tags permission. - // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. - // https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string - if (version >= "2018-11-09") { - if (sharedKeyCredential !== undefined) { - return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); - } - else { - // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId. - if (version >= "2020-02-10") { - return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); - } - else { - return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); - } - } - } - if (version >= "2015-04-05") { - if (sharedKeyCredential !== undefined) { - return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); - } - else { - throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); - } - } - throw new RangeError("'version' must be >= '2015-04-05'."); -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. - * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. - * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && - !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - if (blobSASSignatureValues.blobName) { - resource = "b"; - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. - * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. - * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && - !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn and identifier. - * - * WARNING: When identifier is not provided, permissions and expiresOn are required. - * You MUST assign value to identifier or expiresOn & permissions manually if you initial with - * this constructor. - * - * @param blobSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - if (!blobSASSignatureValues.identifier && - !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - blobSASSignatureValues.identifier, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", - blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", - blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", - blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", - blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", - ].join("\n"); - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. - * - * WARNING: identifier will be ignored, permissions and expiresOn are required. - * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - - */ -function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - // Stored access policies are not supported for a user delegation SAS. - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType, - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. - * - * WARNING: identifier will be ignored, permissions and expiresOn are required. - * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - - */ -function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - // Stored access policies are not supported for a user delegation SAS. - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - undefined, // agentObjectId - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType, - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), - stringToSign: stringToSign, - }; -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. - * - * Creates an instance of SASQueryParameters. - * - * Only accepts required settings needed to create a SAS. For optional settings please - * set corresponding properties directly, such as permissions, startsOn. - * - * WARNING: identifier will be ignored, permissions and expiresOn are required. - * - * @param blobSASSignatureValues - - * @param userDelegationKeyCredential - - */ -function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { - blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); - // Stored access policies are not supported for a user delegation SAS. - if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { - throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); - } - let resource = "c"; - let timestamp = blobSASSignatureValues.snapshotTime; - if (blobSASSignatureValues.blobName) { - resource = "b"; - if (blobSASSignatureValues.snapshotTime) { - resource = "bs"; - } - else if (blobSASSignatureValues.versionId) { - resource = "bv"; - timestamp = blobSASSignatureValues.versionId; - } - } - // Calling parse and toString guarantees the proper ordering and throws on invalid characters. - let verifiedPermissions; - if (blobSASSignatureValues.permissions) { - if (blobSASSignatureValues.blobName) { - verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - else { - verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); - } - } - // Signature is generated on the un-url-encoded values. - const stringToSign = [ - verifiedPermissions ? verifiedPermissions : "", - blobSASSignatureValues.startsOn - ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false) - : "", - blobSASSignatureValues.expiresOn - ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false) - : "", - getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), - userDelegationKeyCredential.userDelegationKey.signedObjectId, - userDelegationKeyCredential.userDelegationKey.signedTenantId, - userDelegationKeyCredential.userDelegationKey.signedStartsOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedExpiresOn - ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) - : "", - userDelegationKeyCredential.userDelegationKey.signedService, - userDelegationKeyCredential.userDelegationKey.signedVersion, - blobSASSignatureValues.preauthorizedAgentObjectId, - undefined, // agentObjectId - blobSASSignatureValues.correlationId, - blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : "", - blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", - blobSASSignatureValues.version, - resource, - timestamp, - blobSASSignatureValues.encryptionScope, - blobSASSignatureValues.cacheControl, - blobSASSignatureValues.contentDisposition, - blobSASSignatureValues.contentEncoding, - blobSASSignatureValues.contentLanguage, - blobSASSignatureValues.contentType, - ].join("\n"); - const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), - stringToSign: stringToSign, - }; -} -function getCanonicalName(accountName, containerName, blobName) { - // Container: "/blob/account/containerName" - // Blob: "/blob/account/containerName/blobName" - const elements = [`/blob/${accountName}/${containerName}`]; - if (blobName) { - elements.push(`/${blobName}`); - } - return elements.join(""); -} -function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { - const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION; - if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { - throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); - } - if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { - throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); - } - if (blobSASSignatureValues.versionId && version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); - } - if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { - throw RangeError("Must provide 'blobName' when providing 'versionId'."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.setImmutabilityPolicy && - version < "2020-08-04") { - throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.deleteVersion && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.permanentDelete && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); - } - if (blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.tag && - version < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); - } - if (version < "2020-02-10" && - blobSASSignatureValues.permissions && - (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { - throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); - } - if (version < "2021-04-10" && - blobSASSignatureValues.permissions && - blobSASSignatureValues.permissions.filterByTags) { - throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); - } - if (version < "2020-02-10" && - (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { - throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); - } - if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { - throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); - } - blobSASSignatureValues.version = version; - return blobSASSignatureValues; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. - */ -class BlobLeaseClient { - /** - * Gets the lease Id. - * - * @readonly - */ - get leaseId() { - return this._leaseId; - } - /** - * Gets the url. - * - * @readonly - */ - get url() { - return this._url; - } - /** - * Creates an instance of BlobLeaseClient. - * @param client - The client to make the lease operation requests. - * @param leaseId - Initial proposed lease id. - */ - constructor(client, leaseId) { - const clientContext = client.storageClientContext; - this._url = client.url; - if (client.name === undefined) { - this._isContainer = true; - this._containerOrBlobOperation = clientContext.container; - } - else { - this._isContainer = false; - this._containerOrBlobOperation = clientContext.blob; - } - if (!leaseId) { - leaseId = coreUtil.randomUUID(); - } - this._leaseId = leaseId; - } - /** - * Establishes and manages a lock on a container for delete operations, or on a blob - * for write and delete operations. - * The lock duration can be 15 to 60 seconds, or can be infinite. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param duration - Must be between 15 to 60 seconds, or infinite (-1) - * @param options - option to configure lease management operations. - * @returns Response data for acquire lease operation. - */ - async acquireLease(duration, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { - var _a; - return assertResponse(await this._containerOrBlobOperation.acquireLease({ - abortSignal: options.abortSignal, - duration, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - proposedLeaseId: this._leaseId, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * To change the ID of the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param proposedLeaseId - the proposed new lease Id. - * @param options - option to configure lease management operations. - * @returns Response data for change lease operation. - */ - async changeLease(proposedLeaseId, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - this._leaseId = proposedLeaseId; - return response; - }); - } - /** - * To free the lease if it is no longer needed so that another client may - * immediately acquire a lease against the container or the blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param options - option to configure lease management operations. - * @returns Response data for release lease operation. - */ - async releaseLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { - var _a; - return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * To renew the lease. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param options - Optional option to configure lease management operations. - * @returns Response data for renew lease operation. - */ - async renewLease(options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { - var _a; - return this._containerOrBlobOperation.renewLease(this._leaseId, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - }); - }); - } - /** - * To end the lease but ensure that another client cannot acquire a new lease - * until the current lease period has expired. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-container - * and - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/lease-blob - * - * @param breakPeriod - Break period - * @param options - Optional options to configure lease management operations. - * @returns Response data for break lease operation. - */ - async breakLease(breakPeriod, options = {}) { - var _a, _b, _c, _d, _e; - if (this._isContainer && - ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) || - (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) || - ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) { - throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); - } - return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { - var _a; - const operationOptions = { - abortSignal: options.abortSignal, - breakPeriod, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - }; - return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions)); - }); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. - */ -class RetriableReadableStream extends stream.Readable { - /** - * Creates an instance of RetriableReadableStream. - * - * @param source - The current ReadableStream returned from getter - * @param getter - A method calling downloading request returning - * a new ReadableStream from specified offset - * @param offset - Offset position in original data source to read - * @param count - How much data in original data source to read - * @param options - - */ - constructor(source, getter, offset, count, options = {}) { - super({ highWaterMark: options.highWaterMark }); - this.retries = 0; - this.sourceDataHandler = (data) => { - if (this.options.doInjectErrorOnce) { - this.options.doInjectErrorOnce = undefined; - this.source.pause(); - this.sourceErrorOrEndHandler(); - this.source.destroy(); - return; - } - // console.log( - // `Offset: ${this.offset}, Received ${data.length} from internal stream` - // ); - this.offset += data.length; - if (this.onProgress) { - this.onProgress({ loadedBytes: this.offset - this.start }); - } - if (!this.push(data)) { - this.source.pause(); - } - }; - this.sourceAbortedHandler = () => { - const abortError = new abortController.AbortError("The operation was aborted."); - this.destroy(abortError); - }; - this.sourceErrorOrEndHandler = (err) => { - if (err && err.name === "AbortError") { - this.destroy(err); - return; - } - // console.log( - // `Source stream emits end or error, offset: ${ - // this.offset - // }, dest end : ${this.end}` - // ); - this.removeSourceEventHandlers(); - if (this.offset - 1 === this.end) { - this.push(null); - } - else if (this.offset <= this.end) { - // console.log( - // `retries: ${this.retries}, max retries: ${this.maxRetries}` - // ); - if (this.retries < this.maxRetryRequests) { - this.retries += 1; - this.getter(this.offset) - .then((newSource) => { - this.source = newSource; - this.setSourceEventHandlers(); - return; - }) - .catch((error) => { - this.destroy(error); - }); - } - else { - this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); - } - } - else { - this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); - } - }; - this.getter = getter; - this.source = source; - this.start = offset; - this.offset = offset; - this.end = offset + count - 1; - this.maxRetryRequests = - options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; - this.onProgress = options.onProgress; - this.options = options; - this.setSourceEventHandlers(); - } - _read() { - this.source.resume(); - } - setSourceEventHandlers() { - this.source.on("data", this.sourceDataHandler); - this.source.on("end", this.sourceErrorOrEndHandler); - this.source.on("error", this.sourceErrorOrEndHandler); - // needed for Node14 - this.source.on("aborted", this.sourceAbortedHandler); - } - removeSourceEventHandlers() { - this.source.removeListener("data", this.sourceDataHandler); - this.source.removeListener("end", this.sourceErrorOrEndHandler); - this.source.removeListener("error", this.sourceErrorOrEndHandler); - this.source.removeListener("aborted", this.sourceAbortedHandler); - } - _destroy(error, callback) { - // remove listener from source and release source - this.removeSourceEventHandlers(); - this.source.destroy(); - callback(error === null ? undefined : error); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will - * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot - * trigger retries defined in pipeline retry policy.) - * - * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js - * Readable stream. - */ -class BlobDownloadResponse { - /** - * Indicates that the service supports - * requests for partial file content. - * - * @readonly - */ - get acceptRanges() { - return this.originalResponse.acceptRanges; - } - /** - * Returns if it was previously specified - * for the file. - * - * @readonly - */ - get cacheControl() { - return this.originalResponse.cacheControl; - } - /** - * Returns the value that was specified - * for the 'x-ms-content-disposition' header and specifies how to process the - * response. - * - * @readonly - */ - get contentDisposition() { - return this.originalResponse.contentDisposition; - } - /** - * Returns the value that was specified - * for the Content-Encoding request header. - * - * @readonly - */ - get contentEncoding() { - return this.originalResponse.contentEncoding; - } - /** - * Returns the value that was specified - * for the Content-Language request header. - * - * @readonly - */ - get contentLanguage() { - return this.originalResponse.contentLanguage; - } - /** - * The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs. - * - * @readonly - */ - get blobSequenceNumber() { - return this.originalResponse.blobSequenceNumber; - } - /** - * The blob's type. Possible values include: - * 'BlockBlob', 'PageBlob', 'AppendBlob'. - * - * @readonly - */ - get blobType() { - return this.originalResponse.blobType; - } - /** - * The number of bytes present in the - * response body. - * - * @readonly - */ - get contentLength() { - return this.originalResponse.contentLength; - } - /** - * If the file has an MD5 hash and the - * request is to read the full file, this response header is returned so that - * the client can check for message content integrity. If the request is to - * read a specified range and the 'x-ms-range-get-content-md5' is set to - * true, then the request returns an MD5 hash for the range, as long as the - * range size is less than or equal to 4 MB. If neither of these sets of - * conditions is true, then no value is returned for the 'Content-MD5' - * header. - * - * @readonly - */ - get contentMD5() { - return this.originalResponse.contentMD5; - } - /** - * Indicates the range of bytes returned if - * the client requested a subset of the file by setting the Range request - * header. - * - * @readonly - */ - get contentRange() { - return this.originalResponse.contentRange; - } - /** - * The content type specified for the file. - * The default content type is 'application/octet-stream' - * - * @readonly - */ - get contentType() { - return this.originalResponse.contentType; - } - /** - * Conclusion time of the last attempted - * Copy File operation where this file was the destination file. This value - * can specify the time of a completed, aborted, or failed copy attempt. - * - * @readonly - */ - get copyCompletedOn() { - return this.originalResponse.copyCompletedOn; - } - /** - * String identifier for the last attempted Copy - * File operation where this file was the destination file. - * - * @readonly - */ - get copyId() { - return this.originalResponse.copyId; - } - /** - * Contains the number of bytes copied and - * the total bytes in the source in the last attempted Copy File operation - * where this file was the destination file. Can show between 0 and - * Content-Length bytes copied. - * - * @readonly - */ - get copyProgress() { - return this.originalResponse.copyProgress; - } - /** - * URL up to 2KB in length that specifies the - * source file used in the last attempted Copy File operation where this file - * was the destination file. - * - * @readonly - */ - get copySource() { - return this.originalResponse.copySource; - } - /** - * State of the copy operation - * identified by 'x-ms-copy-id'. Possible values include: 'pending', - * 'success', 'aborted', 'failed' - * - * @readonly - */ - get copyStatus() { - return this.originalResponse.copyStatus; - } - /** - * Only appears when - * x-ms-copy-status is failed or pending. Describes cause of fatal or - * non-fatal copy operation failure. - * - * @readonly - */ - get copyStatusDescription() { - return this.originalResponse.copyStatusDescription; - } - /** - * When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible - * values include: 'infinite', 'fixed'. - * - * @readonly - */ - get leaseDuration() { - return this.originalResponse.leaseDuration; - } - /** - * Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. - * - * @readonly - */ - get leaseState() { - return this.originalResponse.leaseState; - } - /** - * The current lease status of the - * blob. Possible values include: 'locked', 'unlocked'. - * - * @readonly - */ - get leaseStatus() { - return this.originalResponse.leaseStatus; - } - /** - * A UTC date/time value generated by the service that - * indicates the time at which the response was initiated. - * - * @readonly - */ - get date() { - return this.originalResponse.date; - } - /** - * The number of committed blocks - * present in the blob. This header is returned only for append blobs. - * - * @readonly - */ - get blobCommittedBlockCount() { - return this.originalResponse.blobCommittedBlockCount; - } - /** - * The ETag contains a value that you can use to - * perform operations conditionally, in quotes. - * - * @readonly - */ - get etag() { - return this.originalResponse.etag; - } - /** - * The number of tags associated with the blob - * - * @readonly - */ - get tagCount() { - return this.originalResponse.tagCount; - } - /** - * The error code. - * - * @readonly - */ - get errorCode() { - return this.originalResponse.errorCode; - } - /** - * The value of this header is set to - * true if the file data and application metadata are completely encrypted - * using the specified algorithm. Otherwise, the value is set to false (when - * the file is unencrypted, or if only parts of the file/application metadata - * are encrypted). - * - * @readonly - */ - get isServerEncrypted() { - return this.originalResponse.isServerEncrypted; - } - /** - * If the blob has a MD5 hash, and if - * request contains range header (Range or x-ms-range), this response header - * is returned with the value of the whole blob's MD5 value. This value may - * or may not be equal to the value returned in Content-MD5 header, with the - * latter calculated from the requested range. - * - * @readonly - */ - get blobContentMD5() { - return this.originalResponse.blobContentMD5; - } - /** - * Returns the date and time the file was last - * modified. Any operation that modifies the file or its properties updates - * the last modified time. - * - * @readonly - */ - get lastModified() { - return this.originalResponse.lastModified; - } - /** - * Returns the UTC date and time generated by the service that indicates the time at which the blob was - * last read or written to. - * - * @readonly - */ - get lastAccessed() { - return this.originalResponse.lastAccessed; - } - /** - * Returns the date and time the blob was created. - * - * @readonly - */ - get createdOn() { - return this.originalResponse.createdOn; - } - /** - * A name-value pair - * to associate with a file storage object. - * - * @readonly - */ - get metadata() { - return this.originalResponse.metadata; - } - /** - * This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. - * - * @readonly - */ - get requestId() { - return this.originalResponse.requestId; - } - /** - * If a client request id header is sent in the request, this header will be present in the - * response with the same value. - * - * @readonly - */ - get clientRequestId() { - return this.originalResponse.clientRequestId; - } - /** - * Indicates the version of the Blob service used - * to execute the request. - * - * @readonly - */ - get version() { - return this.originalResponse.version; - } - /** - * Indicates the versionId of the downloaded blob version. - * - * @readonly - */ - get versionId() { - return this.originalResponse.versionId; - } - /** - * Indicates whether version of this blob is a current version. - * - * @readonly - */ - get isCurrentVersion() { - return this.originalResponse.isCurrentVersion; - } - /** - * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned - * when the blob was encrypted with a customer-provided key. - * - * @readonly - */ - get encryptionKeySha256() { - return this.originalResponse.encryptionKeySha256; - } - /** - * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to - * true, then the request returns a crc64 for the range, as long as the range size is less than - * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is - * specified in the same request, it will fail with 400(Bad Request) - */ - get contentCrc64() { - return this.originalResponse.contentCrc64; - } - /** - * Object Replication Policy Id of the destination blob. - * - * @readonly - */ - get objectReplicationDestinationPolicyId() { - return this.originalResponse.objectReplicationDestinationPolicyId; - } - /** - * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. - * - * @readonly - */ - get objectReplicationSourceProperties() { - return this.originalResponse.objectReplicationSourceProperties; - } - /** - * If this blob has been sealed. - * - * @readonly - */ - get isSealed() { - return this.originalResponse.isSealed; - } - /** - * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. - * - * @readonly - */ - get immutabilityPolicyExpiresOn() { - return this.originalResponse.immutabilityPolicyExpiresOn; - } - /** - * Indicates immutability policy mode. - * - * @readonly - */ - get immutabilityPolicyMode() { - return this.originalResponse.immutabilityPolicyMode; - } - /** - * Indicates if a legal hold is present on the blob. - * - * @readonly - */ - get legalHold() { - return this.originalResponse.legalHold; - } - /** - * The response body as a browser Blob. - * Always undefined in node.js. - * - * @readonly - */ - get contentAsBlob() { - return this.originalResponse.blobBody; - } - /** - * The response body as a node.js Readable stream. - * Always undefined in the browser. - * - * It will automatically retry when internal read stream unexpected ends. - * - * @readonly - */ - get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : undefined; - } - /** - * The HTTP response. - */ - get _response() { - return this.originalResponse._response; - } - /** - * Creates an instance of BlobDownloadResponse. - * - * @param originalResponse - - * @param getter - - * @param offset - - * @param count - - * @param options - - */ - constructor(originalResponse, getter, offset, count, options = {}) { - this.originalResponse = originalResponse; - this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const AVRO_SYNC_MARKER_SIZE = 16; -const AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); -const AVRO_CODEC_KEY = "avro.codec"; -const AVRO_SCHEMA_KEY = "avro.schema"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -class AvroParser { - /** - * Reads a fixed number of bytes from the stream. - * - * @param stream - - * @param length - - * @param options - - */ - static async readFixedBytes(stream, length, options = {}) { - const bytes = await stream.read(length, { abortSignal: options.abortSignal }); - if (bytes.length !== length) { - throw new Error("Hit stream end."); - } - return bytes; - } - /** - * Reads a single byte from the stream. - * - * @param stream - - * @param options - - */ - static async readByte(stream, options = {}) { - const buf = await AvroParser.readFixedBytes(stream, 1, options); - return buf[0]; - } - // int and long are stored in variable-length zig-zag coding. - // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt - // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types - static async readZigZagLong(stream, options = {}) { - let zigZagEncoded = 0; - let significanceInBit = 0; - let byte, haveMoreByte, significanceInFloat; - do { - byte = await AvroParser.readByte(stream, options); - haveMoreByte = byte & 0x80; - zigZagEncoded |= (byte & 0x7f) << significanceInBit; - significanceInBit += 7; - } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers - if (haveMoreByte) { - // Switch to float arithmetic - // eslint-disable-next-line no-self-assign - zigZagEncoded = zigZagEncoded; - significanceInFloat = 268435456; // 2 ** 28. - do { - byte = await AvroParser.readByte(stream, options); - zigZagEncoded += (byte & 0x7f) * significanceInFloat; - significanceInFloat *= 128; // 2 ** 7 - } while (byte & 0x80); - const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; - if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) { - throw new Error("Integer overflow."); - } - return res; - } - return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1); - } - static async readLong(stream, options = {}) { - return AvroParser.readZigZagLong(stream, options); - } - static async readInt(stream, options = {}) { - return AvroParser.readZigZagLong(stream, options); - } - static async readNull() { - return null; - } - static async readBoolean(stream, options = {}) { - const b = await AvroParser.readByte(stream, options); - if (b === 1) { - return true; - } - else if (b === 0) { - return false; - } - else { - throw new Error("Byte was not a boolean."); - } - } - static async readFloat(stream, options = {}) { - const u8arr = await AvroParser.readFixedBytes(stream, 4, options); - const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); - return view.getFloat32(0, true); // littleEndian = true - } - static async readDouble(stream, options = {}) { - const u8arr = await AvroParser.readFixedBytes(stream, 8, options); - const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); - return view.getFloat64(0, true); // littleEndian = true - } - static async readBytes(stream, options = {}) { - const size = await AvroParser.readLong(stream, options); - if (size < 0) { - throw new Error("Bytes size was negative."); - } - return stream.read(size, { abortSignal: options.abortSignal }); - } - static async readString(stream, options = {}) { - const u8arr = await AvroParser.readBytes(stream, options); - const utf8decoder = new TextDecoder(); - return utf8decoder.decode(u8arr); - } - static async readMapPair(stream, readItemMethod, options = {}) { - const key = await AvroParser.readString(stream, options); - // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter. - const value = await readItemMethod(stream, options); - return { key, value }; - } - static async readMap(stream, readItemMethod, options = {}) { - const readPairMethod = (s, opts = {}) => { - return AvroParser.readMapPair(s, readItemMethod, opts); - }; - const pairs = await AvroParser.readArray(stream, readPairMethod, options); - const dict = {}; - for (const pair of pairs) { - dict[pair.key] = pair.value; - } - return dict; - } - static async readArray(stream, readItemMethod, options = {}) { - const items = []; - for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) { - if (count < 0) { - // Ignore block sizes - await AvroParser.readLong(stream, options); - count = -count; - } - while (count--) { - const item = await readItemMethod(stream, options); - items.push(item); - } - } - return items; - } -} -var AvroComplex; -(function (AvroComplex) { - AvroComplex["RECORD"] = "record"; - AvroComplex["ENUM"] = "enum"; - AvroComplex["ARRAY"] = "array"; - AvroComplex["MAP"] = "map"; - AvroComplex["UNION"] = "union"; - AvroComplex["FIXED"] = "fixed"; -})(AvroComplex || (AvroComplex = {})); -var AvroPrimitive; -(function (AvroPrimitive) { - AvroPrimitive["NULL"] = "null"; - AvroPrimitive["BOOLEAN"] = "boolean"; - AvroPrimitive["INT"] = "int"; - AvroPrimitive["LONG"] = "long"; - AvroPrimitive["FLOAT"] = "float"; - AvroPrimitive["DOUBLE"] = "double"; - AvroPrimitive["BYTES"] = "bytes"; - AvroPrimitive["STRING"] = "string"; -})(AvroPrimitive || (AvroPrimitive = {})); -class AvroType { - /** - * Determines the AvroType from the Avro Schema. - */ - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - static fromSchema(schema) { - if (typeof schema === "string") { - return AvroType.fromStringSchema(schema); - } - else if (Array.isArray(schema)) { - return AvroType.fromArraySchema(schema); - } - else { - return AvroType.fromObjectSchema(schema); - } - } - static fromStringSchema(schema) { - switch (schema) { - case AvroPrimitive.NULL: - case AvroPrimitive.BOOLEAN: - case AvroPrimitive.INT: - case AvroPrimitive.LONG: - case AvroPrimitive.FLOAT: - case AvroPrimitive.DOUBLE: - case AvroPrimitive.BYTES: - case AvroPrimitive.STRING: - return new AvroPrimitiveType(schema); - default: - throw new Error(`Unexpected Avro type ${schema}`); - } - } - static fromArraySchema(schema) { - return new AvroUnionType(schema.map(AvroType.fromSchema)); - } - static fromObjectSchema(schema) { - const type = schema.type; - // Primitives can be defined as strings or objects - try { - return AvroType.fromStringSchema(type); - } - catch (_a) { - // no-op - } - switch (type) { - case AvroComplex.RECORD: - if (schema.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema}`); - } - if (!schema.name) { - throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); - } - // eslint-disable-next-line no-case-declarations - const fields = {}; - if (!schema.fields) { - throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); - } - for (const field of schema.fields) { - fields[field.name] = AvroType.fromSchema(field.type); - } - return new AvroRecordType(fields, schema.name); - case AvroComplex.ENUM: - if (schema.aliases) { - throw new Error(`aliases currently is not supported, schema: ${schema}`); - } - if (!schema.symbols) { - throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); - } - return new AvroEnumType(schema.symbols); - case AvroComplex.MAP: - if (!schema.values) { - throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); - } - return new AvroMapType(AvroType.fromSchema(schema.values)); - case AvroComplex.ARRAY: // Unused today - case AvroComplex.FIXED: // Unused today - default: - throw new Error(`Unexpected Avro type ${type} in ${schema}`); - } - } -} -class AvroPrimitiveType extends AvroType { - constructor(primitive) { - super(); - this._primitive = primitive; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream, options = {}) { - switch (this._primitive) { - case AvroPrimitive.NULL: - return AvroParser.readNull(); - case AvroPrimitive.BOOLEAN: - return AvroParser.readBoolean(stream, options); - case AvroPrimitive.INT: - return AvroParser.readInt(stream, options); - case AvroPrimitive.LONG: - return AvroParser.readLong(stream, options); - case AvroPrimitive.FLOAT: - return AvroParser.readFloat(stream, options); - case AvroPrimitive.DOUBLE: - return AvroParser.readDouble(stream, options); - case AvroPrimitive.BYTES: - return AvroParser.readBytes(stream, options); - case AvroPrimitive.STRING: - return AvroParser.readString(stream, options); - default: - throw new Error("Unknown Avro Primitive"); - } - } -} -class AvroEnumType extends AvroType { - constructor(symbols) { - super(); - this._symbols = symbols; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream, options = {}) { - const value = await AvroParser.readInt(stream, options); - return this._symbols[value]; - } -} -class AvroUnionType extends AvroType { - constructor(types) { - super(); - this._types = types; - } - async read(stream, options = {}) { - const typeIndex = await AvroParser.readInt(stream, options); - return this._types[typeIndex].read(stream, options); - } -} -class AvroMapType extends AvroType { - constructor(itemType) { - super(); - this._itemType = itemType; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - read(stream, options = {}) { - const readItemMethod = (s, opts) => { - return this._itemType.read(s, opts); - }; - return AvroParser.readMap(stream, readItemMethod, options); - } -} -class AvroRecordType extends AvroType { - constructor(fields, name) { - super(); - this._fields = fields; - this._name = name; - } - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - async read(stream, options = {}) { - // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types - const record = {}; - record["$schema"] = this._name; - for (const key in this._fields) { - if (Object.prototype.hasOwnProperty.call(this._fields, key)) { - record[key] = await this._fields[key].read(stream, options); - } - } - return record; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -function arraysEqual(a, b) { - if (a === b) - return true; - if (a == null || b == null) - return false; - if (a.length !== b.length) - return false; - for (let i = 0; i < a.length; ++i) { - if (a[i] !== b[i]) - return false; - } - return true; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -class AvroReader { - get blockOffset() { - return this._blockOffset; - } - get objectIndex() { - return this._objectIndex; - } - constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { - this._dataStream = dataStream; - this._headerStream = headerStream || dataStream; - this._initialized = false; - this._blockOffset = currentBlockOffset || 0; - this._objectIndex = indexWithinCurrentBlock || 0; - this._initialBlockOffset = currentBlockOffset || 0; - } - async initialize(options = {}) { - const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, { - abortSignal: options.abortSignal, - }); - if (!arraysEqual(header, AVRO_INIT_BYTES)) { - throw new Error("Stream is not an Avro file."); - } - // File metadata is written as if defined by the following map schema: - // { "type": "map", "values": "bytes"} - this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, { - abortSignal: options.abortSignal, - }); - // Validate codec - const codec = this._metadata[AVRO_CODEC_KEY]; - if (!(codec === undefined || codec === null || codec === "null")) { - throw new Error("Codecs are not supported"); - } - // The 16-byte, randomly-generated sync marker for this file. - this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal, - }); - // Parse the schema - const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]); - this._itemType = AvroType.fromSchema(schema); - if (this._blockOffset === 0) { - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - } - this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal, - }); - // skip block length - await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); - this._initialized = true; - if (this._objectIndex && this._objectIndex > 0) { - for (let i = 0; i < this._objectIndex; i++) { - await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); - this._itemsRemainingInBlock--; - } - } - } - hasNext() { - return !this._initialized || this._itemsRemainingInBlock > 0; - } - parseObjects() { - return tslib.__asyncGenerator(this, arguments, function* parseObjects_1(options = {}) { - if (!this._initialized) { - yield tslib.__await(this.initialize(options)); - } - while (this.hasNext()) { - const result = yield tslib.__await(this._itemType.read(this._dataStream, { - abortSignal: options.abortSignal, - })); - this._itemsRemainingInBlock--; - this._objectIndex++; - if (this._itemsRemainingInBlock === 0) { - const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, { - abortSignal: options.abortSignal, - })); - this._blockOffset = this._initialBlockOffset + this._dataStream.position; - this._objectIndex = 0; - if (!arraysEqual(this._syncMarker, marker)) { - throw new Error("Stream is not a valid Avro file."); - } - try { - this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, { - abortSignal: options.abortSignal, - })); - } - catch (_a) { - // We hit the end of the stream. - this._itemsRemainingInBlock = 0; - } - if (this._itemsRemainingInBlock > 0) { - // Ignore block size - yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal })); - } - } - yield yield tslib.__await(result); - } - }); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -class AvroReadable { -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const ABORT_ERROR = new abortController.AbortError("Reading from the avro stream was aborted."); -class AvroReadableFromStream extends AvroReadable { - toUint8Array(data) { - if (typeof data === "string") { - return Buffer.from(data); - } - return data; - } - constructor(readable) { - super(); - this._readable = readable; - this._position = 0; - } - get position() { - return this._position; - } - async read(size, options = {}) { - var _a; - if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - throw ABORT_ERROR; - } - if (size < 0) { - throw new Error(`size parameter should be positive: ${size}`); - } - if (size === 0) { - return new Uint8Array(); - } - if (!this._readable.readable) { - throw new Error("Stream no longer readable."); - } - // See if there is already enough data. - const chunk = this._readable.read(size); - if (chunk) { - this._position += chunk.length; - // chunk.length maybe less than desired size if the stream ends. - return this.toUint8Array(chunk); - } - else { - // register callback to wait for enough data to read - return new Promise((resolve, reject) => { - /* eslint-disable @typescript-eslint/no-use-before-define */ - const cleanUp = () => { - this._readable.removeListener("readable", readableCallback); - this._readable.removeListener("error", rejectCallback); - this._readable.removeListener("end", rejectCallback); - this._readable.removeListener("close", rejectCallback); - if (options.abortSignal) { - options.abortSignal.removeEventListener("abort", abortHandler); - } - }; - const readableCallback = () => { - const callbackChunk = this._readable.read(size); - if (callbackChunk) { - this._position += callbackChunk.length; - cleanUp(); - // callbackChunk.length maybe less than desired size if the stream ends. - resolve(this.toUint8Array(callbackChunk)); - } - }; - const rejectCallback = () => { - cleanUp(); - reject(); - }; - const abortHandler = () => { - cleanUp(); - reject(ABORT_ERROR); - }; - this._readable.on("readable", readableCallback); - this._readable.once("error", rejectCallback); - this._readable.once("end", rejectCallback); - this._readable.once("close", rejectCallback); - if (options.abortSignal) { - options.abortSignal.addEventListener("abort", abortHandler); - } - /* eslint-enable @typescript-eslint/no-use-before-define */ - }); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. - */ -class BlobQuickQueryStream extends stream.Readable { - /** - * Creates an instance of BlobQuickQueryStream. - * - * @param source - The current ReadableStream returned from getter - * @param options - - */ - constructor(source, options = {}) { - super(); - this.avroPaused = true; - this.source = source; - this.onProgress = options.onProgress; - this.onError = options.onError; - this.avroReader = new AvroReader(new AvroReadableFromStream(this.source)); - this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); - } - _read() { - if (this.avroPaused) { - this.readInternal().catch((err) => { - this.emit("error", err); - }); - } - } - async readInternal() { - this.avroPaused = false; - let avroNext; - do { - avroNext = await this.avroIter.next(); - if (avroNext.done) { - break; - } - const obj = avroNext.value; - const schema = obj.$schema; - if (typeof schema !== "string") { - throw Error("Missing schema in avro record."); - } - switch (schema) { - case "com.microsoft.azure.storage.queryBlobContents.resultData": - { - const data = obj.data; - if (data instanceof Uint8Array === false) { - throw Error("Invalid data in avro result record."); - } - if (!this.push(Buffer.from(data))) { - this.avroPaused = true; - } - } - break; - case "com.microsoft.azure.storage.queryBlobContents.progress": - { - const bytesScanned = obj.bytesScanned; - if (typeof bytesScanned !== "number") { - throw Error("Invalid bytesScanned in avro progress record."); - } - if (this.onProgress) { - this.onProgress({ loadedBytes: bytesScanned }); - } - } - break; - case "com.microsoft.azure.storage.queryBlobContents.end": - if (this.onProgress) { - const totalBytes = obj.totalBytes; - if (typeof totalBytes !== "number") { - throw Error("Invalid totalBytes in avro end record."); - } - this.onProgress({ loadedBytes: totalBytes }); - } - this.push(null); - break; - case "com.microsoft.azure.storage.queryBlobContents.error": - if (this.onError) { - const fatal = obj.fatal; - if (typeof fatal !== "boolean") { - throw Error("Invalid fatal in avro error record."); - } - const name = obj.name; - if (typeof name !== "string") { - throw Error("Invalid name in avro error record."); - } - const description = obj.description; - if (typeof description !== "string") { - throw Error("Invalid description in avro error record."); - } - const position = obj.position; - if (typeof position !== "number") { - throw Error("Invalid position in avro error record."); - } - this.onError({ - position, - name, - isFatal: fatal, - description, - }); - } - break; - default: - throw Error(`Unknown schema ${schema} in avro progress record.`); - } - } while (!avroNext.done && !this.avroPaused); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will - * parse avor data returned by blob query. - */ -class BlobQueryResponse { - /** - * Indicates that the service supports - * requests for partial file content. - * - * @readonly - */ - get acceptRanges() { - return this.originalResponse.acceptRanges; - } - /** - * Returns if it was previously specified - * for the file. - * - * @readonly - */ - get cacheControl() { - return this.originalResponse.cacheControl; - } - /** - * Returns the value that was specified - * for the 'x-ms-content-disposition' header and specifies how to process the - * response. - * - * @readonly - */ - get contentDisposition() { - return this.originalResponse.contentDisposition; - } - /** - * Returns the value that was specified - * for the Content-Encoding request header. - * - * @readonly - */ - get contentEncoding() { - return this.originalResponse.contentEncoding; - } - /** - * Returns the value that was specified - * for the Content-Language request header. - * - * @readonly - */ - get contentLanguage() { - return this.originalResponse.contentLanguage; - } - /** - * The current sequence number for a - * page blob. This header is not returned for block blobs or append blobs. - * - * @readonly - */ - get blobSequenceNumber() { - return this.originalResponse.blobSequenceNumber; - } - /** - * The blob's type. Possible values include: - * 'BlockBlob', 'PageBlob', 'AppendBlob'. - * - * @readonly - */ - get blobType() { - return this.originalResponse.blobType; - } - /** - * The number of bytes present in the - * response body. - * - * @readonly - */ - get contentLength() { - return this.originalResponse.contentLength; - } - /** - * If the file has an MD5 hash and the - * request is to read the full file, this response header is returned so that - * the client can check for message content integrity. If the request is to - * read a specified range and the 'x-ms-range-get-content-md5' is set to - * true, then the request returns an MD5 hash for the range, as long as the - * range size is less than or equal to 4 MB. If neither of these sets of - * conditions is true, then no value is returned for the 'Content-MD5' - * header. - * - * @readonly - */ - get contentMD5() { - return this.originalResponse.contentMD5; - } - /** - * Indicates the range of bytes returned if - * the client requested a subset of the file by setting the Range request - * header. - * - * @readonly - */ - get contentRange() { - return this.originalResponse.contentRange; - } - /** - * The content type specified for the file. - * The default content type is 'application/octet-stream' - * - * @readonly - */ - get contentType() { - return this.originalResponse.contentType; - } - /** - * Conclusion time of the last attempted - * Copy File operation where this file was the destination file. This value - * can specify the time of a completed, aborted, or failed copy attempt. - * - * @readonly - */ - get copyCompletedOn() { - return undefined; - } - /** - * String identifier for the last attempted Copy - * File operation where this file was the destination file. - * - * @readonly - */ - get copyId() { - return this.originalResponse.copyId; - } - /** - * Contains the number of bytes copied and - * the total bytes in the source in the last attempted Copy File operation - * where this file was the destination file. Can show between 0 and - * Content-Length bytes copied. - * - * @readonly - */ - get copyProgress() { - return this.originalResponse.copyProgress; - } - /** - * URL up to 2KB in length that specifies the - * source file used in the last attempted Copy File operation where this file - * was the destination file. - * - * @readonly - */ - get copySource() { - return this.originalResponse.copySource; - } - /** - * State of the copy operation - * identified by 'x-ms-copy-id'. Possible values include: 'pending', - * 'success', 'aborted', 'failed' - * - * @readonly - */ - get copyStatus() { - return this.originalResponse.copyStatus; - } - /** - * Only appears when - * x-ms-copy-status is failed or pending. Describes cause of fatal or - * non-fatal copy operation failure. - * - * @readonly - */ - get copyStatusDescription() { - return this.originalResponse.copyStatusDescription; - } - /** - * When a blob is leased, - * specifies whether the lease is of infinite or fixed duration. Possible - * values include: 'infinite', 'fixed'. - * - * @readonly - */ - get leaseDuration() { - return this.originalResponse.leaseDuration; - } - /** - * Lease state of the blob. Possible - * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. - * - * @readonly - */ - get leaseState() { - return this.originalResponse.leaseState; - } - /** - * The current lease status of the - * blob. Possible values include: 'locked', 'unlocked'. - * - * @readonly - */ - get leaseStatus() { - return this.originalResponse.leaseStatus; - } - /** - * A UTC date/time value generated by the service that - * indicates the time at which the response was initiated. - * - * @readonly - */ - get date() { - return this.originalResponse.date; - } - /** - * The number of committed blocks - * present in the blob. This header is returned only for append blobs. - * - * @readonly - */ - get blobCommittedBlockCount() { - return this.originalResponse.blobCommittedBlockCount; - } - /** - * The ETag contains a value that you can use to - * perform operations conditionally, in quotes. - * - * @readonly - */ - get etag() { - return this.originalResponse.etag; - } - /** - * The error code. - * - * @readonly - */ - get errorCode() { - return this.originalResponse.errorCode; - } - /** - * The value of this header is set to - * true if the file data and application metadata are completely encrypted - * using the specified algorithm. Otherwise, the value is set to false (when - * the file is unencrypted, or if only parts of the file/application metadata - * are encrypted). - * - * @readonly - */ - get isServerEncrypted() { - return this.originalResponse.isServerEncrypted; - } - /** - * If the blob has a MD5 hash, and if - * request contains range header (Range or x-ms-range), this response header - * is returned with the value of the whole blob's MD5 value. This value may - * or may not be equal to the value returned in Content-MD5 header, with the - * latter calculated from the requested range. - * - * @readonly - */ - get blobContentMD5() { - return this.originalResponse.blobContentMD5; - } - /** - * Returns the date and time the file was last - * modified. Any operation that modifies the file or its properties updates - * the last modified time. - * - * @readonly - */ - get lastModified() { - return this.originalResponse.lastModified; - } - /** - * A name-value pair - * to associate with a file storage object. - * - * @readonly - */ - get metadata() { - return this.originalResponse.metadata; - } - /** - * This header uniquely identifies the request - * that was made and can be used for troubleshooting the request. - * - * @readonly - */ - get requestId() { - return this.originalResponse.requestId; - } - /** - * If a client request id header is sent in the request, this header will be present in the - * response with the same value. - * - * @readonly - */ - get clientRequestId() { - return this.originalResponse.clientRequestId; - } - /** - * Indicates the version of the File service used - * to execute the request. - * - * @readonly - */ - get version() { - return this.originalResponse.version; - } - /** - * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned - * when the blob was encrypted with a customer-provided key. - * - * @readonly - */ - get encryptionKeySha256() { - return this.originalResponse.encryptionKeySha256; - } - /** - * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to - * true, then the request returns a crc64 for the range, as long as the range size is less than - * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is - * specified in the same request, it will fail with 400(Bad Request) - */ - get contentCrc64() { - return this.originalResponse.contentCrc64; - } - /** - * The response body as a browser Blob. - * Always undefined in node.js. - * - * @readonly - */ - get blobBody() { - return undefined; - } - /** - * The response body as a node.js Readable stream. - * Always undefined in the browser. - * - * It will parse avor data returned by blob query. - * - * @readonly - */ - get readableStreamBody() { - return coreUtil.isNode ? this.blobDownloadStream : undefined; - } - /** - * The HTTP response. - */ - get _response() { - return this.originalResponse._response; - } - /** - * Creates an instance of BlobQueryResponse. - * - * @param originalResponse - - * @param options - - */ - constructor(originalResponse, options = {}) { - this.originalResponse = originalResponse; - this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Represents the access tier on a blob. - * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} - */ -exports.BlockBlobTier = void 0; -(function (BlockBlobTier) { - /** - * Optimized for storing data that is accessed frequently. - */ - BlockBlobTier["Hot"] = "Hot"; - /** - * Optimized for storing data that is infrequently accessed and stored for at least 30 days. - */ - BlockBlobTier["Cool"] = "Cool"; - /** - * Optimized for storing data that is rarely accessed. - */ - BlockBlobTier["Cold"] = "Cold"; - /** - * Optimized for storing data that is rarely accessed and stored for at least 180 days - * with flexible latency requirements (on the order of hours). - */ - BlockBlobTier["Archive"] = "Archive"; -})(exports.BlockBlobTier || (exports.BlockBlobTier = {})); -/** - * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. - * Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} - * for detailed information on the corresponding IOPS and throughput per PageBlobTier. - */ -exports.PremiumPageBlobTier = void 0; -(function (PremiumPageBlobTier) { - /** - * P4 Tier. - */ - PremiumPageBlobTier["P4"] = "P4"; - /** - * P6 Tier. - */ - PremiumPageBlobTier["P6"] = "P6"; - /** - * P10 Tier. - */ - PremiumPageBlobTier["P10"] = "P10"; - /** - * P15 Tier. - */ - PremiumPageBlobTier["P15"] = "P15"; - /** - * P20 Tier. - */ - PremiumPageBlobTier["P20"] = "P20"; - /** - * P30 Tier. - */ - PremiumPageBlobTier["P30"] = "P30"; - /** - * P40 Tier. - */ - PremiumPageBlobTier["P40"] = "P40"; - /** - * P50 Tier. - */ - PremiumPageBlobTier["P50"] = "P50"; - /** - * P60 Tier. - */ - PremiumPageBlobTier["P60"] = "P60"; - /** - * P70 Tier. - */ - PremiumPageBlobTier["P70"] = "P70"; - /** - * P80 Tier. - */ - PremiumPageBlobTier["P80"] = "P80"; -})(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {})); -function toAccessTier(tier) { - if (tier === undefined) { - return undefined; - } - return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service). -} -function ensureCpkIfSpecified(cpk, isHttps) { - if (cpk && !isHttps) { - throw new RangeError("Customer-provided encryption key must be used over HTTPS."); - } - if (cpk && !cpk.encryptionAlgorithm) { - cpk.encryptionAlgorithm = EncryptionAlgorithmAES25; - } -} -/** - * Defines the known cloud audiences for Storage. - */ -exports.StorageBlobAudience = void 0; -(function (StorageBlobAudience) { - /** - * The OAuth scope to use to retrieve an AAD token for Azure Storage. - */ - StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; - /** - * The OAuth scope to use to retrieve an AAD token for Azure Disk. - */ - StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; -})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {})); -/** - * - * To get OAuth audience for a storage account for blob service. - */ -function getBlobServiceAccountAudience(storageAccountName) { - return `https://${storageAccountName}.blob.core.windows.net/.default`; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Function that converts PageRange and ClearRange to a common Range object. - * PageRange and ClearRange have start and end while Range offset and count - * this function normalizes to Range. - * @param response - Model PageBlob Range response - */ -function rangeResponseFromModel(response) { - const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start, - })); - const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ - offset: x.start, - count: x.end - x.start, - })); - return Object.assign(Object.assign({}, response), { pageRange, - clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: { - pageRange, - clearRange, - } }) }); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This is the poller returned by {@link BlobClient.beginCopyFromURL}. - * This can not be instantiated directly outside of this package. - * - * @hidden - */ -class BlobBeginCopyFromUrlPoller extends coreLro.Poller { - constructor(options) { - const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options; - let state; - if (resumeFrom) { - state = JSON.parse(resumeFrom).state; - } - const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { blobClient, - copySource, - startCopyFromURLOptions })); - super(operation); - if (typeof onProgress === "function") { - this.onProgress(onProgress); - } - this.intervalInMs = intervalInMs; - } - delay() { - return coreUtil.delay(this.intervalInMs); - } -} -/** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ -const cancel = async function cancel(options = {}) { - const state = this.state; - const { copyId } = state; - if (state.isCompleted) { - return makeBlobBeginCopyFromURLPollOperation(state); - } - if (!copyId) { - state.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state); - } - // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call - await state.blobClient.abortCopyFromURL(copyId, { - abortSignal: options.abortSignal, - }); - state.isCancelled = true; - return makeBlobBeginCopyFromURLPollOperation(state); -}; -/** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ -const update = async function update(options = {}) { - const state = this.state; - const { blobClient, copySource, startCopyFromURLOptions } = state; - if (!state.isStarted) { - state.isStarted = true; - const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); - // copyId is needed to abort - state.copyId = result.copyId; - if (result.copyStatus === "success") { - state.result = result; - state.isCompleted = true; - } - } - else if (!state.isCompleted) { - try { - const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal }); - const { copyStatus, copyProgress } = result; - const prevCopyProgress = state.copyProgress; - if (copyProgress) { - state.copyProgress = copyProgress; - } - if (copyStatus === "pending" && - copyProgress !== prevCopyProgress && - typeof options.fireProgress === "function") { - // trigger in setTimeout, or swallow error? - options.fireProgress(state); - } - else if (copyStatus === "success") { - state.result = result; - state.isCompleted = true; - } - else if (copyStatus === "failed") { - state.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); - state.isCompleted = true; - } - } - catch (err) { - state.error = err; - state.isCompleted = true; - } - } - return makeBlobBeginCopyFromURLPollOperation(state); -}; -/** - * Note: Intentionally using function expression over arrow function expression - * so that the function can be invoked with a different context. - * This affects what `this` refers to. - * @hidden - */ -const toString = function toString() { - return JSON.stringify({ state: this.state }, (key, value) => { - // remove blobClient from serialized state since a client can't be hydrated from this info. - if (key === "blobClient") { - return undefined; - } - return value; - }); -}; -/** - * Creates a poll operation given the provided state. - * @hidden - */ -function makeBlobBeginCopyFromURLPollOperation(state) { - return { - state: Object.assign({}, state), - cancel, - toString, - update, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Generate a range string. For example: - * - * "bytes=255-" or "bytes=0-511" - * - * @param iRange - - */ -function rangeToString(iRange) { - if (iRange.offset < 0) { - throw new RangeError(`Range.offset cannot be smaller than 0.`); - } - if (iRange.count && iRange.count <= 0) { - throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); - } - return iRange.count - ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` - : `bytes=${iRange.offset}-`; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -// In browser, during webpack or browserify bundling, this module will be replaced by 'events' -// https://github.com/Gozala/events -/** - * States for Batch. - */ -var BatchStates; -(function (BatchStates) { - BatchStates[BatchStates["Good"] = 0] = "Good"; - BatchStates[BatchStates["Error"] = 1] = "Error"; -})(BatchStates || (BatchStates = {})); -/** - * Batch provides basic parallel execution with concurrency limits. - * Will stop execute left operations when one of the executed operation throws an error. - * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. - */ -class Batch { - /** - * Creates an instance of Batch. - * @param concurrency - - */ - constructor(concurrency = 5) { - /** - * Number of active operations under execution. - */ - this.actives = 0; - /** - * Number of completed operations under execution. - */ - this.completed = 0; - /** - * Offset of next operation to be executed. - */ - this.offset = 0; - /** - * Operation array to be executed. - */ - this.operations = []; - /** - * States of Batch. When an error happens, state will turn into error. - * Batch will stop execute left operations. - */ - this.state = BatchStates.Good; - if (concurrency < 1) { - throw new RangeError("concurrency must be larger than 0"); - } - this.concurrency = concurrency; - this.emitter = new events.EventEmitter(); - } - /** - * Add a operation into queue. - * - * @param operation - - */ - addOperation(operation) { - this.operations.push(async () => { - try { - this.actives++; - await operation(); - this.actives--; - this.completed++; - this.parallelExecute(); - } - catch (error) { - this.emitter.emit("error", error); - } - }); - } - /** - * Start execute operations in the queue. - * - */ - async do() { - if (this.operations.length === 0) { - return Promise.resolve(); - } - this.parallelExecute(); - return new Promise((resolve, reject) => { - this.emitter.on("finish", resolve); - this.emitter.on("error", (error) => { - this.state = BatchStates.Error; - reject(error); - }); - }); - } - /** - * Get next operation to be executed. Return null when reaching ends. - * - */ - nextOperation() { - if (this.offset < this.operations.length) { - return this.operations[this.offset++]; - } - return null; - } - /** - * Start execute operations. One one the most important difference between - * this method with do() is that do() wraps as an sync method. - * - */ - parallelExecute() { - if (this.state === BatchStates.Error) { - return; - } - if (this.completed >= this.operations.length) { - this.emitter.emit("finish"); - return; - } - while (this.actives < this.concurrency) { - const operation = this.nextOperation(); - if (operation) { - operation(); - } - else { - return; - } - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This class generates a readable stream from the data in an array of buffers. - */ -class BuffersStream extends stream.Readable { - /** - * Creates an instance of BuffersStream that will emit the data - * contained in the array of buffers. - * - * @param buffers - Array of buffers containing the data - * @param byteLength - The total length of data contained in the buffers - */ - constructor(buffers, byteLength, options) { - super(options); - this.buffers = buffers; - this.byteLength = byteLength; - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex = 0; - this.pushedBytesLength = 0; - // check byteLength is no larger than buffers[] total length - let buffersLength = 0; - for (const buf of this.buffers) { - buffersLength += buf.byteLength; - } - if (buffersLength < this.byteLength) { - throw new Error("Data size shouldn't be larger than the total length of buffers."); - } - } - /** - * Internal _read() that will be called when the stream wants to pull more data in. - * - * @param size - Optional. The size of data to be read - */ - _read(size) { - if (this.pushedBytesLength >= this.byteLength) { - this.push(null); - } - if (!size) { - size = this.readableHighWaterMark; - } - const outBuffers = []; - let i = 0; - while (i < size && this.pushedBytesLength < this.byteLength) { - // The last buffer may be longer than the data it contains. - const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; - const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; - const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); - if (remaining > size - i) { - // chunkSize = size - i - const end = this.byteOffsetInCurrentBuffer + size - i; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - this.pushedBytesLength += size - i; - this.byteOffsetInCurrentBuffer = end; - i = size; - break; - } - else { - // chunkSize = remaining - const end = this.byteOffsetInCurrentBuffer + remaining; - outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); - if (remaining === remainingCapacityInThisBuffer) { - // this.buffers[this.bufferIndex] used up, shift to next one - this.byteOffsetInCurrentBuffer = 0; - this.bufferIndex++; - } - else { - this.byteOffsetInCurrentBuffer = end; - } - this.pushedBytesLength += remaining; - i += remaining; - } - } - if (outBuffers.length > 1) { - this.push(Buffer.concat(outBuffers)); - } - else if (outBuffers.length === 1) { - this.push(outBuffers[0]); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const maxBufferLength = buffer.constants.MAX_LENGTH; -/** - * This class provides a buffer container which conceptually has no hard size limit. - * It accepts a capacity, an array of input buffers and the total length of input data. - * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers - * into the internal "buffer" serially with respect to the total length. - * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream - * assembled from all the data in the internal "buffer". - */ -class PooledBuffer { - /** - * The size of the data contained in the pooled buffers. - */ - get size() { - return this._size; - } - constructor(capacity, buffers, totalLength) { - /** - * Internal buffers used to keep the data. - * Each buffer has a length of the maxBufferLength except last one. - */ - this.buffers = []; - this.capacity = capacity; - this._size = 0; - // allocate - const bufferNum = Math.ceil(capacity / maxBufferLength); - for (let i = 0; i < bufferNum; i++) { - let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; - if (len === 0) { - len = maxBufferLength; - } - this.buffers.push(Buffer.allocUnsafe(len)); - } - if (buffers) { - this.fill(buffers, totalLength); - } - } - /** - * Fill the internal buffers with data in the input buffers serially - * with respect to the total length and the total capacity of the internal buffers. - * Data copied will be shift out of the input buffers. - * - * @param buffers - Input buffers containing the data to be filled in the pooled buffer - * @param totalLength - Total length of the data to be filled in. - * - */ - fill(buffers, totalLength) { - this._size = Math.min(this.capacity, totalLength); - let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; - while (totalCopiedNum < this._size) { - const source = buffers[i]; - const target = this.buffers[j]; - const copiedNum = source.copy(target, targetOffset, sourceOffset); - totalCopiedNum += copiedNum; - sourceOffset += copiedNum; - targetOffset += copiedNum; - if (sourceOffset === source.length) { - i++; - sourceOffset = 0; - } - if (targetOffset === target.length) { - j++; - targetOffset = 0; - } - } - // clear copied from source buffers - buffers.splice(0, i); - if (buffers.length > 0) { - buffers[0] = buffers[0].slice(sourceOffset); - } - } - /** - * Get the readable stream assembled from all the data in the internal buffers. - * - */ - getReadableStream() { - return new BuffersStream(this.buffers, this.size); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * This class accepts a Node.js Readable stream as input, and keeps reading data - * from the stream into the internal buffer structure, until it reaches maxBuffers. - * Every available buffer will try to trigger outgoingHandler. - * - * The internal buffer structure includes an incoming buffer array, and a outgoing - * buffer array. The incoming buffer array includes the "empty" buffers can be filled - * with new incoming data. The outgoing array includes the filled buffers to be - * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. - * - * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING - * - * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers - * - * PERFORMANCE IMPROVEMENT TIPS: - * 1. Input stream highWaterMark is better to set a same value with bufferSize - * parameter, which will avoid Buffer.concat() operations. - * 2. concurrency should set a smaller value than maxBuffers, which is helpful to - * reduce the possibility when a outgoing handler waits for the stream data. - * in this situation, outgoing handlers are blocked. - * Outgoing queue shouldn't be empty. - */ -class BufferScheduler { - /** - * Creates an instance of BufferScheduler. - * - * @param readable - A Node.js Readable stream - * @param bufferSize - Buffer size of every maintained buffer - * @param maxBuffers - How many buffers can be allocated - * @param outgoingHandler - An async function scheduled to be - * triggered when a buffer fully filled - * with stream data - * @param concurrency - Concurrency of executing outgoingHandlers (>0) - * @param encoding - [Optional] Encoding of Readable stream when it's a string stream - */ - constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { - /** - * An internal event emitter. - */ - this.emitter = new events.EventEmitter(); - /** - * An internal offset marker to track data offset in bytes of next outgoingHandler. - */ - this.offset = 0; - /** - * An internal marker to track whether stream is end. - */ - this.isStreamEnd = false; - /** - * An internal marker to track whether stream or outgoingHandler returns error. - */ - this.isError = false; - /** - * How many handlers are executing. - */ - this.executingOutgoingHandlers = 0; - /** - * How many buffers have been allocated. - */ - this.numBuffers = 0; - /** - * Because this class doesn't know how much data every time stream pops, which - * is defined by highWaterMarker of the stream. So BufferScheduler will cache - * data received from the stream, when data in unresolvedDataArray exceeds the - * blockSize defined, it will try to concat a blockSize of buffer, fill into available - * buffers from incoming and push to outgoing array. - */ - this.unresolvedDataArray = []; - /** - * How much data consisted in unresolvedDataArray. - */ - this.unresolvedLength = 0; - /** - * The array includes all the available buffers can be used to fill data from stream. - */ - this.incoming = []; - /** - * The array (queue) includes all the buffers filled from stream data. - */ - this.outgoing = []; - if (bufferSize <= 0) { - throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); - } - if (maxBuffers <= 0) { - throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); - } - if (concurrency <= 0) { - throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); - } - this.bufferSize = bufferSize; - this.maxBuffers = maxBuffers; - this.readable = readable; - this.outgoingHandler = outgoingHandler; - this.concurrency = concurrency; - this.encoding = encoding; - } - /** - * Start the scheduler, will return error when stream of any of the outgoingHandlers - * returns error. - * - */ - async do() { - return new Promise((resolve, reject) => { - this.readable.on("data", (data) => { - data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; - this.appendUnresolvedData(data); - if (!this.resolveData()) { - this.readable.pause(); - } - }); - this.readable.on("error", (err) => { - this.emitter.emit("error", err); - }); - this.readable.on("end", () => { - this.isStreamEnd = true; - this.emitter.emit("checkEnd"); - }); - this.emitter.on("error", (err) => { - this.isError = true; - this.readable.pause(); - reject(err); - }); - this.emitter.on("checkEnd", () => { - if (this.outgoing.length > 0) { - this.triggerOutgoingHandlers(); - return; - } - if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { - if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { - const buffer = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset) - .then(resolve) - .catch(reject); - } - else if (this.unresolvedLength >= this.bufferSize) { - return; - } - else { - resolve(); - } - } - }); - }); - } - /** - * Insert a new data into unresolved array. - * - * @param data - - */ - appendUnresolvedData(data) { - this.unresolvedDataArray.push(data); - this.unresolvedLength += data.length; - } - /** - * Try to shift a buffer with size in blockSize. The buffer returned may be less - * than blockSize when data in unresolvedDataArray is less than bufferSize. - * - */ - shiftBufferFromUnresolvedDataArray(buffer) { - if (!buffer) { - buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); - } - else { - buffer.fill(this.unresolvedDataArray, this.unresolvedLength); - } - this.unresolvedLength -= buffer.size; - return buffer; - } - /** - * Resolve data in unresolvedDataArray. For every buffer with size in blockSize - * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, - * then push it into outgoing to be handled by outgoing handler. - * - * Return false when available buffers in incoming are not enough, else true. - * - * @returns Return false when buffers in incoming are not enough, else true. - */ - resolveData() { - while (this.unresolvedLength >= this.bufferSize) { - let buffer; - if (this.incoming.length > 0) { - buffer = this.incoming.shift(); - this.shiftBufferFromUnresolvedDataArray(buffer); - } - else { - if (this.numBuffers < this.maxBuffers) { - buffer = this.shiftBufferFromUnresolvedDataArray(); - this.numBuffers++; - } - else { - // No available buffer, wait for buffer returned - return false; - } - } - this.outgoing.push(buffer); - this.triggerOutgoingHandlers(); - } - return true; - } - /** - * Try to trigger a outgoing handler for every buffer in outgoing. Stop when - * concurrency reaches. - */ - async triggerOutgoingHandlers() { - let buffer; - do { - if (this.executingOutgoingHandlers >= this.concurrency) { - return; - } - buffer = this.outgoing.shift(); - if (buffer) { - this.triggerOutgoingHandler(buffer); - } - } while (buffer); - } - /** - * Trigger a outgoing handler for a buffer shifted from outgoing. - * - * @param buffer - - */ - async triggerOutgoingHandler(buffer) { - const bufferLength = buffer.size; - this.executingOutgoingHandlers++; - this.offset += bufferLength; - try { - await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); - } - catch (err) { - this.emitter.emit("error", err); - return; - } - this.executingOutgoingHandlers--; - this.reuseBuffer(buffer); - this.emitter.emit("checkEnd"); - } - /** - * Return buffer used by outgoing handler into incoming. - * - * @param buffer - - */ - reuseBuffer(buffer) { - this.incoming.push(buffer); - if (!this.isError && this.resolveData() && !this.isStreamEnd) { - this.readable.resume(); - } - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * Reads a readable stream into buffer. Fill the buffer from offset to end. - * - * @param stream - A Node.js Readable stream - * @param buffer - Buffer to be filled, length must greater than or equal to offset - * @param offset - From which position in the buffer to be filled, inclusive - * @param end - To which position in the buffer to be filled, exclusive - * @param encoding - Encoding of the Readable stream - */ -async function streamToBuffer(stream, buffer, offset, end, encoding) { - let pos = 0; // Position in stream - const count = end - offset; // Total amount of data needed in stream - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); - stream.on("readable", () => { - if (pos >= count) { - clearTimeout(timeout); - resolve(); - return; - } - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } - // How much data needed in this chunk - const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; - buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); - pos += chunkLength; - }); - stream.on("end", () => { - clearTimeout(timeout); - if (pos < count) { - reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); - } - resolve(); - }); - stream.on("error", (msg) => { - clearTimeout(timeout); - reject(msg); - }); - }); -} -/** - * Reads a readable stream into buffer entirely. - * - * @param stream - A Node.js Readable stream - * @param buffer - Buffer to be filled, length must greater than or equal to offset - * @param encoding - Encoding of the Readable stream - * @returns with the count of bytes read. - * @throws `RangeError` If buffer size is not big enough. - */ -async function streamToBuffer2(stream, buffer, encoding) { - let pos = 0; // Position in stream - const bufferSize = buffer.length; - return new Promise((resolve, reject) => { - stream.on("readable", () => { - let chunk = stream.read(); - if (!chunk) { - return; - } - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } - if (pos + chunk.length > bufferSize) { - reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); - return; - } - buffer.fill(chunk, pos, pos + chunk.length); - pos += chunk.length; - }); - stream.on("end", () => { - resolve(pos); - }); - stream.on("error", reject); - }); -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. - * - * @param rs - The read stream. - * @param file - Destination file path. - */ -async function readStreamToLocalFile(rs, file) { - return new Promise((resolve, reject) => { - const ws = fs__namespace.createWriteStream(file); - rs.on("error", (err) => { - reject(err); - }); - ws.on("error", (err) => { - reject(err); - }); - ws.on("close", resolve); - rs.pipe(ws); - }); -} -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Promisified version of fs.stat(). - */ -const fsStat = util__namespace.promisify(fs__namespace.stat); -const fsCreateReadStream = fs__namespace.createReadStream; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, - * append blob, or page blob. - */ -class BlobClient extends StorageClient { - /** - * The name of the blob. - */ - get name() { - return this._name; - } - /** - * The name of the storage container the blob is associated with. - */ - get containerName() { - return this._containerName; - } - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - options = options || {}; - let pipeline; - let url; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { - options = blobNameOrOptions; - } - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - ({ blobName: this._name, containerName: this._containerName } = - this.getBlobAndContainerNamesFromUrl()); - this.blobContext = this.storageClientContext.blob; - this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); - this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID); - } - /** - * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp - */ - withSnapshot(snapshot) { - return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * Creates a new BlobClient object pointing to a version of this blob. - * Provide "" will remove the versionId and return a Client to the base blob. - * - * @param versionId - The versionId. - * @returns A new BlobClient object pointing to the version of this blob. - */ - withVersion(versionId) { - return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline); - } - /** - * Creates a AppendBlobClient object. - * - */ - getAppendBlobClient() { - return new AppendBlobClient(this.url, this.pipeline); - } - /** - * Creates a BlockBlobClient object. - * - */ - getBlockBlobClient() { - return new BlockBlobClient(this.url, this.pipeline); - } - /** - * Creates a PageBlobClient object. - * - */ - getPageBlobClient() { - return new PageBlobClient(this.url, this.pipeline); - } - /** - * Reads or downloads a blob from the system, including its metadata and properties. - * You can also call Get Blob to read a snapshot. - * - * * In Node.js, data returns in a Readable stream readableStreamBody - * * In browsers, data returns in a promise blobBody - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob - * - * @param offset - From which position of the blob to download, greater than or equal to 0 - * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined - * @param options - Optional options to Blob Download operation. - * - * - * Example usage (Node.js): - * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody); - * console.log("Downloaded blob content:", downloaded.toString()); - * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); - * } - * ``` - * - * Example usage (browser): - * - * ```js - * // Download and convert a blob to a string - * const downloadBlockBlobResponse = await blobClient.download(); - * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody); - * console.log( - * "Downloaded blob content", - * downloaded - * ); - * - * async function blobToString(blob: Blob): Promise { - * const fileReader = new FileReader(); - * return new Promise((resolve, reject) => { - * fileReader.onloadend = (ev: any) => { - * resolve(ev.target!.result); - * }; - * fileReader.onerror = reject; - * fileReader.readAsText(blob); - * }); - * } - * ``` - */ - async download(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.download({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onDownloadProgress: coreUtil.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream - }, - range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), - rangeGetContentMD5: options.rangeGetContentMD5, - rangeGetContentCRC64: options.rangeGetContentCrc64, - snapshot: options.snapshot, - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - // Return browser response immediately - if (!coreUtil.isNode) { - return wrappedRes; - } - // We support retrying when download stream unexpected ends in Node.js runtime - // Following code shouldn't be bundled into browser build, however some - // bundlers may try to bundle following code and "FileReadResponse.ts". - // In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts" - // The config is in package.json "browser" field - if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) { - // TODO: Default value or make it a required parameter? - options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; - } - if (res.contentLength === undefined) { - throw new RangeError(`File download response doesn't contain valid content length header`); - } - if (!res.etag) { - throw new RangeError(`File download response doesn't contain valid etag header`); - } - return new BlobDownloadResponse(wrappedRes, async (start) => { - var _a; - const updatedDownloadOptions = { - leaseAccessConditions: options.conditions, - modifiedAccessConditions: { - ifMatch: options.conditions.ifMatch || res.etag, - ifModifiedSince: options.conditions.ifModifiedSince, - ifNoneMatch: options.conditions.ifNoneMatch, - ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, - ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions, - }, - range: rangeToString({ - count: offset + res.contentLength - start, - offset: start, - }), - rangeGetContentMD5: options.rangeGetContentMD5, - rangeGetContentCRC64: options.rangeGetContentCrc64, - snapshot: options.snapshot, - cpkInfo: options.customerProvidedKey, - }; - // Debug purpose only - // console.log( - // `Read from internal stream, range: ${ - // updatedOptions.range - // }, options: ${JSON.stringify(updatedOptions)}` - // ); - return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody; - }, offset, res.contentLength, { - maxRetryRequests: options.maxRetryRequests, - onProgress: options.onProgress, - }); - }); - } - /** - * Returns true if the Azure blob resource represented by this client exists; false otherwise. - * - * NOTE: use this function with care since an existing blob might be deleted by other clients or - * applications. Vice versa new blobs might be added by other clients or applications after this - * function completes. - * - * @param options - options to Exists operation. - */ - async exists(options = {}) { - return tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { - try { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - await this.getProperties({ - abortSignal: options.abortSignal, - customerProvidedKey: options.customerProvidedKey, - conditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - }); - return true; - } - catch (e) { - if (e.statusCode === 404) { - // Expected exception when checking blob existence - return false; - } - else if (e.statusCode === 409 && - (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg || - e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) { - // Expected exception when checking blob existence - return true; - } - throw e; - } - }); - } - /** - * Returns all user-defined metadata, standard HTTP properties, and system properties - * for the blob. It does not return the content of the blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-properties - * - * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if - * they originally contained uppercase characters. This differs from the metadata keys returned by - * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which - * will retain their original casing. - * - * @param options - Optional options to Get Properties operation. - */ - async getProperties(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blobContext.getProperties({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - })); - return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) }); - }); - } - /** - * Marks the specified blob or snapshot for deletion. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob - * - * @param options - Optional options to Blob Delete operation. - */ - async delete(options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.delete({ - abortSignal: options.abortSignal, - deleteSnapshots: options.deleteSnapshots, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob - * - * @param options - Optional options to Blob Delete operation. - */ - async deleteIfExists(options = {}) { - return tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = assertResponse(await this.delete(updatedOptions)); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Restores the contents and metadata of soft deleted blob and any associated - * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 - * or later. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/undelete-blob - * - * @param options - Optional options to Blob Undelete operation. - */ - async undelete(options = {}) { - return tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.undelete({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets system properties on the blob. - * - * If no value provided, or no value provided for the specified blob HTTP headers, - * these blob HTTP headers without a value will be cleared. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties - * - * @param blobHTTPHeaders - If no value provided, or no value provided for - * the specified blob HTTP headers, these blob HTTP - * headers without a value will be cleared. - * A common header to set is `blobContentType` - * enabling the browser to provide functionality - * based on file type. - * @param options - Optional options to Blob Set HTTP Headers operation. - */ - async setHTTPHeaders(blobHTTPHeaders, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setHttpHeaders({ - abortSignal: options.abortSignal, - blobHttpHeaders: blobHTTPHeaders, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets user-defined metadata for the specified blob as one or more name-value pairs. - * - * If no option provided, or no metadata defined in the parameter, the blob - * metadata will be removed. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata - * - * @param metadata - Replace existing metadata with this value. - * If no value provided the existing metadata will be removed. - * @param options - Optional options to Set Metadata operation. - */ - async setMetadata(metadata, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setMetadata({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets tags on the underlying blob. - * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. - * Valid tag key and value characters include lower and upper case letters, digits (0-9), - * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). - * - * @param tags - - * @param options - - */ - async setTags(tags, options = {}) { - return tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTags({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - tags: toBlobTags(tags), - })); - }); - } - /** - * Gets the tags associated with the underlying blob. - * - * @param options - - */ - async getTags(options = {}) { - return tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.blobContext.getTags({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} }); - return wrappedResponse; - }); - } - /** - * Get a {@link BlobLeaseClient} that manages leases on the blob. - * - * @param proposeLeaseId - Initial proposed lease Id. - * @returns A new BlobLeaseClient object for managing leases on the blob. - */ - getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); - } - /** - * Creates a read-only snapshot of a blob. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/snapshot-blob - * - * @param options - Optional options to the Blob Create Snapshot operation. - */ - async createSnapshot(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.createSnapshot({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Asynchronously copies a blob to a destination within the storage account. - * This method returns a long running operation poller that allows you to wait - * indefinitely until the copy is completed. - * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. - * Note that the onProgress callback will not be invoked if the operation completes in the first - * request, and attempting to cancel a completed copy will result in an error being thrown. - * - * In version 2012-02-12 and later, the source for a Copy Blob operation can be - * a committed blob in any Azure storage account. - * Beginning with version 2015-02-21, the source for a Copy Blob operation can be - * an Azure file in any Azure storage account. - * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob - * operation to copy from another storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob - * - * Example using automatic polling: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * const result = await copyPoller.pollUntilDone(); - * ``` - * - * Example using manual polling: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * while (!poller.isDone()) { - * await poller.poll(); - * } - * const result = copyPoller.getResult(); - * ``` - * - * Example using progress updates: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * onProgress(state) { - * console.log(`Progress: ${state.copyProgress}`); - * } - * }); - * const result = await copyPoller.pollUntilDone(); - * ``` - * - * Example using a changing polling interval (default 15 seconds): - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url', { - * intervalInMs: 1000 // poll blob every 1 second for copy progress - * }); - * const result = await copyPoller.pollUntilDone(); - * ``` - * - * Example using copy cancellation: - * - * ```js - * const copyPoller = await blobClient.beginCopyFromURL('url'); - * // cancel operation after starting it. - * try { - * await copyPoller.cancelOperation(); - * // calls to get the result now throw PollerCancelledError - * await copyPoller.getResult(); - * } catch (err) { - * if (err.name === 'PollerCancelledError') { - * console.log('The copy was cancelled.'); - * } - * } - * ``` - * - * @param copySource - url to the source Azure Blob/File. - * @param options - Optional options to the Blob Start Copy From URL operation. - */ - async beginCopyFromURL(copySource, options = {}) { - const client = { - abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), - getProperties: (...args) => this.getProperties(...args), - startCopyFromURL: (...args) => this.startCopyFromURL(...args), - }; - const poller = new BlobBeginCopyFromUrlPoller({ - blobClient: client, - copySource, - intervalInMs: options.intervalInMs, - onProgress: options.onProgress, - resumeFrom: options.resumeFrom, - startCopyFromURLOptions: options, - }); - // Trigger the startCopyFromURL call by calling poll. - // Any errors from this method should be surfaced to the user. - await poller.poll(); - return poller; - } - /** - * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero - * length and full metadata. Version 2012-02-12 and newer. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob - * - * @param copyId - Id of the Copy From URL operation. - * @param options - Optional options to the Blob Abort Copy From URL operation. - */ - async abortCopyFromURL(copyId, options = {}) { - return tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.abortCopyFromURL(copyId, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not - * return a response until the copy is complete. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url - * - * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication - * @param options - - */ - async syncCopyFromURL(copySource, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - return tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f, _g; - return assertResponse(await this.blobContext.copyFromURL(copySource, { - abortSignal: options.abortSignal, - metadata: options.metadata, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - }, - sourceContentMD5: options.sourceContentMD5, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - immutabilityPolicyExpiry: (_f = options.immutabilityPolicy) === null || _f === void 0 ? void 0 : _f.expiriesOn, - immutabilityPolicyMode: (_g = options.immutabilityPolicy) === null || _g === void 0 ? void 0 : _g.policyMode, - legalHold: options.legalHold, - encryptionScope: options.encryptionScope, - copySourceTags: options.copySourceTags, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets the tier on a blob. The operation is allowed on a page blob in a premium - * storage account and on a block blob in a blob storage account (locally redundant - * storage only). A premium page blob's tier determines the allowed size, IOPS, - * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive - * storage type. This operation does not update the blob's ETag. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-tier - * - * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. - * @param options - Optional options to the Blob Set Tier operation. - */ - async setAccessTier(tier, options = {}) { - return tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.blobContext.setTier(toAccessTier(tier), { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - rehydratePriority: options.rehydratePriority, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - async downloadToBuffer(param1, param2, param3, param4 = {}) { - var _a; - let buffer; - let offset = 0; - let count = 0; - let options = param4; - if (param1 instanceof Buffer) { - buffer = param1; - offset = param2 || 0; - count = typeof param3 === "number" ? param3 : 0; - } - else { - offset = typeof param1 === "number" ? param1 : 0; - count = typeof param2 === "number" ? param2 : 0; - options = param3 || {}; - } - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0) { - throw new RangeError("blockSize option must be >= 0"); - } - if (blockSize === 0) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; - } - if (offset < 0) { - throw new RangeError("offset option must be >= 0"); - } - if (count && count <= 0) { - throw new RangeError("count option must be greater than 0"); - } - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { - // Customer doesn't specify length, get it - if (!count) { - const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - count = response.contentLength - offset; - if (count < 0) { - throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); - } - } - // Allocate the buffer of size = count if the buffer is not provided - if (!buffer) { - try { - buffer = Buffer.alloc(count); - } - catch (error) { - throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`); - } - } - if (buffer.length < count) { - throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); - } - let transferProgress = 0; - const batch = new Batch(options.concurrency); - for (let off = offset; off < offset + count; off = off + blockSize) { - batch.addOperation(async () => { - // Exclusive chunk end position - let chunkEnd = offset + count; - if (off + blockSize < chunkEnd) { - chunkEnd = off + blockSize; - } - const response = await this.download(off, chunkEnd - off, { - abortSignal: options.abortSignal, - conditions: options.conditions, - maxRetryRequests: options.maxRetryRequestsPerBlock, - customerProvidedKey: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - }); - const stream = response.readableStreamBody; - await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset); - // Update progress after block is downloaded, in case of block trying - // Could provide finer grained progress updating inside HTTP requests, - // only if convenience layer download try is enabled - transferProgress += chunkEnd - off; - if (options.onProgress) { - options.onProgress({ loadedBytes: transferProgress }); - } - }); - } - await batch.do(); - return buffer; - }); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Downloads an Azure Blob to a local file. - * Fails if the the given file path already exits. - * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. - * - * @param filePath - - * @param offset - From which position of the block blob to download. - * @param count - How much data to be downloaded. Will download to the end when passing undefined. - * @param options - Options to Blob download options. - * @returns The response data for blob download operation, - * but with readableStreamBody set to undefined since its - * content is already read and written into a local file - * at the specified path. - */ - async downloadToFile(filePath, offset = 0, count, options = {}) { - return tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { - const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - if (response.readableStreamBody) { - await readStreamToLocalFile(response.readableStreamBody, filePath); - } - // The stream is no longer accessible so setting it to undefined. - response.blobDownloadStream = undefined; - return response; - }); - } - getBlobAndContainerNamesFromUrl() { - let containerName; - let blobName; - try { - // URL may look like the following - // "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString"; - // "https://myaccount.blob.core.windows.net/mycontainer/blob"; - // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString"; - // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt"; - // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob` - // http://localhost:10001/devstoreaccount1/containername/blob - const parsedUrl = new URL(this.url); - if (parsedUrl.host.split(".")[1] === "blob") { - // "https://myaccount.blob.core.windows.net/containername/blob". - // .getPath() -> /containername/blob - const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); - containerName = pathComponents[1]; - blobName = pathComponents[3]; - } - else if (isIpEndpointStyle(parsedUrl)) { - // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob - // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob - // .getPath() -> /devstoreaccount1/containername/blob - const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); - containerName = pathComponents[2]; - blobName = pathComponents[4]; - } - else { - // "https://customdomain.com/containername/blob". - // .getPath() -> /containername/blob - const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); - containerName = pathComponents[1]; - blobName = pathComponents[3]; - } - // decode the encoded blobName, containerName - to get all the special characters that might be present in them - containerName = decodeURIComponent(containerName); - blobName = decodeURIComponent(blobName); - // Azure Storage Server will replace "\" with "/" in the blob names - // doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName - blobName = blobName.replace(/\\/g, "/"); - if (!containerName) { - throw new Error("Provided containerName is invalid."); - } - return { blobName, containerName }; - } - catch (error) { - throw new Error("Unable to extract blobName and containerName with provided information."); - } - } - /** - * Asynchronously copies a blob to a destination within the storage account. - * In version 2012-02-12 and later, the source for a Copy Blob operation can be - * a committed blob in any Azure storage account. - * Beginning with version 2015-02-21, the source for a Copy Blob operation can be - * an Azure file in any Azure storage account. - * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob - * operation to copy from another storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob - * - * @param copySource - url to the source Azure Blob/File. - * @param options - Optional options to the Blob Start Copy From URL operation. - */ - async startCopyFromURL(copySource, options = {}) { - return tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { - var _a, _b, _c; - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - return assertResponse(await this.blobContext.startCopyFromURL(copySource, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: options.sourceConditions.ifMatch, - sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, - sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, - sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, - sourceIfTags: options.sourceConditions.tagConditions, - }, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - rehydratePriority: options.rehydratePriority, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - sealBlob: options.sealBlob, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasUrl(options) { - return new Promise((resolve) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign; - } - /** - * - * Generates a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Only available for BlobClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasStringToSign(options, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).stringToSign; - } - /** - * Delete the immutablility policy on the blob. - * - * @param options - Optional options to delete immutability policy on the blob. - */ - async deleteImmutabilityPolicy(options = {}) { - return tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.deleteImmutabilityPolicy({ - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Set immutability policy on the blob. - * - * @param options - Optional options to set immutability policy on the blob. - */ - async setImmutabilityPolicy(immutabilityPolicy, options = {}) { - return tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setImmutabilityPolicy({ - immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, - immutabilityPolicyMode: immutabilityPolicy.policyMode, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Set legal hold on the blob. - * - * @param options - Optional options to set legal hold on the blob. - */ - async setLegalHold(legalHoldEnabled, options = {}) { - return tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.setLegalHold(legalHoldEnabled, { - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information - * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. - */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.blobContext.getAccountInfo({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } -} -/** - * AppendBlobClient defines a set of operations applicable to append blobs. - */ -class AppendBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. - // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString; - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - // The second parameter is undefined. Use anonymous credential. - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - this.appendBlobContext = this.storageClientContext.appendBlob; - } - /** - * Creates a new AppendBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot) { - return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param options - Options to the Append Block Create operation. - * - * - * Example usage: - * - * ```js - * const appendBlobClient = containerClient.getAppendBlobClient(""); - * await appendBlobClient.create(); - * ``` - */ - async create(options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.appendBlobContext.create(0, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. - * If the blob with the same name already exists, the content of the existing blob will remain unchanged. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param options - - */ - async createIfNotExists(options = {}) { - const conditions = { ifNoneMatch: ETagAny }; - return tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = assertResponse(await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Seals the append blob, making it read only. - * - * @param options - - */ - async seal(options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.seal({ - abortSignal: options.abortSignal, - appendPositionAccessConditions: options.conditions, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Commits a new block of data to the end of the existing append blob. - * @see https://learn.microsoft.com/rest/api/storageservices/append-block - * - * @param body - Data to be appended. - * @param contentLength - Length of the body in bytes. - * @param options - Options to the Append Block operation. - * - * - * Example usage: - * - * ```js - * const content = "Hello World!"; - * - * // Create a new append blob and append data to the blob. - * const newAppendBlobClient = containerClient.getAppendBlobClient(""); - * await newAppendBlobClient.create(); - * await newAppendBlobClient.appendBlock(content, content.length); - * - * // Append data to an existing append blob. - * const existingAppendBlobClient = containerClient.getAppendBlobClient(""); - * await existingAppendBlobClient.appendBlock(content, content.length); - * ``` - */ - async appendBlock(body, contentLength, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.appendBlobContext.appendBlock(contentLength, body, { - abortSignal: options.abortSignal, - appendPositionAccessConditions: options.conditions, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onUploadProgress: options.onProgress, - }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Append Block operation commits a new block of data to the end of an existing append blob - * where the contents are read from a source url. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/append-block-from-url - * - * @param sourceURL - - * The url to the blob that will be the source of the copy. A source blob in the same storage account can - * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob - * must either be public or must be authenticated via a shared access signature. If the source blob is - * public, no authentication is required to perform the operation. - * @param sourceOffset - Offset in source to be appended - * @param count - Number of bytes to be appended as a block - * @param options - - */ - async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { - abortSignal: options.abortSignal, - sourceRange: rangeToString({ offset: sourceOffset, count }), - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - leaseAccessConditions: options.conditions, - appendPositionAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - }, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } -} -/** - * BlockBlobClient defines a set of operations applicable to block blobs. - */ -class BlockBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. - // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { - options = blobNameOrOptions; - } - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - this.blockBlobContext = this.storageClientContext.blockBlob; - this._blobContext = this.storageClientContext.blob; - } - /** - * Creates a new BlockBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a URL to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot) { - return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Quick query for a JSON or CSV formatted blob. - * - * Example usage (Node.js): - * - * ```js - * // Query and convert a blob to a string - * const queryBlockBlobResponse = await blockBlobClient.query("select * from BlobStorage"); - * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString(); - * console.log("Query blob content:", downloaded); - * - * async function streamToBuffer(readableStream) { - * return new Promise((resolve, reject) => { - * const chunks = []; - * readableStream.on("data", (data) => { - * chunks.push(typeof data === "string" ? Buffer.from(data) : data); - * }); - * readableStream.on("end", () => { - * resolve(Buffer.concat(chunks)); - * }); - * readableStream.on("error", reject); - * }); - * } - * ``` - * - * @param query - - * @param options - - */ - async query(query, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - if (!coreUtil.isNode) { - throw new Error("This operation currently is only supported in Node.js."); - } - return tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this._blobContext.query({ - abortSignal: options.abortSignal, - queryRequest: { - queryType: "SQL", - expression: query, - inputSerialization: toQuerySerialization(options.inputTextConfiguration), - outputSerialization: toQuerySerialization(options.outputTextConfiguration), - }, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - tracingOptions: updatedOptions.tracingOptions, - })); - return new BlobQueryResponse(response, { - abortSignal: options.abortSignal, - onProgress: options.onProgress, - onError: options.onError, - }); - }); - } - /** - * Creates a new block blob, or updates the content of an existing block blob. - * Updating an existing block blob overwrites any existing metadata on the blob. - * Partial updates are not supported; the content of the existing blob is - * overwritten with the new content. To perform a partial update of a block blob's, - * use {@link stageBlock} and {@link commitBlockList}. - * - * This is a non-parallel uploading method, please use {@link uploadFile}, - * {@link uploadStream} or {@link uploadBrowserData} for better performance - * with concurrency uploading. - * - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function - * which returns a new Readable stream whose offset is from data source beginning. - * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a - * string including non non-Base64/Hex-encoded characters. - * @param options - Options to the Block Blob Upload operation. - * @returns Response data for the Block Blob Upload operation. - * - * Example usage: - * - * ```js - * const content = "Hello world!"; - * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); - * ``` - */ - async upload(body, contentLength, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.upload(contentLength, body, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onUploadProgress: options.onProgress, - }, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Creates a new Block Blob where the contents of the blob are read from a given URL. - * This API is supported beginning with the 2020-04-08 version. Partial updates - * are not supported with Put Blob from URL; the content of an existing blob is overwritten with - * the content of the new blob. To perform partial updates to a block blob’s contents using a - * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. - * - * @param sourceURL - Specifies the URL of the blob. The value - * may be a URL of up to 2 KB in length that specifies a blob. - * The value should be URL-encoded as it would appear - * in a request URI. The source blob must either be public - * or must be authenticated via a shared access signature. - * If the source blob is public, no authentication is required - * to perform the operation. Here are some examples of source object URLs: - * - https://myaccount.blob.core.windows.net/mycontainer/myblob - * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param options - Optional parameters. - */ - async syncUploadFromURL(sourceURL, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e, _f; - return assertResponse(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - sourceIfTags: (_f = options.sourceConditions) === null || _f === void 0 ? void 0 : _f.tagConditions, - }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags, tracingOptions: updatedOptions.tracingOptions }))); - }); - } - /** - * Uploads the specified block to the block blob's "staging area" to be later - * committed by a call to commitBlockList. - * @see https://learn.microsoft.com/rest/api/storageservices/put-block - * - * @param blockId - A 64-byte value that is base64-encoded - * @param body - Data to upload to the staging area. - * @param contentLength - Number of bytes to upload. - * @param options - Options to the Block Blob Stage Block operation. - * @returns Response data for the Block Blob Stage Block operation. - */ - async stageBlock(blockId, body, contentLength, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - requestOptions: { - onUploadProgress: options.onProgress, - }, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Stage Block From URL operation creates a new block to be committed as part - * of a blob where the contents are read from a URL. - * This API is available starting in version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-from-url - * - * @param blockId - A 64-byte value that is base64-encoded - * @param sourceURL - Specifies the URL of the blob. The value - * may be a URL of up to 2 KB in length that specifies a blob. - * The value should be URL-encoded as it would appear - * in a request URI. The source blob must either be public - * or must be authenticated via a shared access signature. - * If the source blob is public, no authentication is required - * to perform the operation. Here are some examples of source object URLs: - * - https://myaccount.blob.core.windows.net/mycontainer/myblob - * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param offset - From which position of the blob to download, greater than or equal to 0 - * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined - * @param options - Options to the Block Blob Stage Block From URL operation. - * @returns Response data for the Block Blob Stage Block From URL operation. - */ - async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { - return assertResponse(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Writes a blob by specifying the list of block IDs that make up the blob. - * In order to be written as part of a blob, a block must have been successfully written - * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to - * update a blob by uploading only those blocks that have changed, then committing the new and existing - * blocks together. Any blocks not specified in the block list and permanently deleted. - * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list - * - * @param blocks - Array of 64-byte value that is base64-encoded - * @param options - Options to the Block Blob Commit Block List operation. - * @returns Response data for the Block Blob Commit Block List operation. - */ - async commitBlockList(blocks, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.blockBlobContext.commitBlockList({ latest: blocks }, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns the list of blocks that have been uploaded as part of a block blob - * using the specified block list filter. - * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list - * - * @param listType - Specifies whether to return the list of committed blocks, - * the list of uncommitted blocks, or both lists together. - * @param options - Options to the Block Blob Get Block List operation. - * @returns Response data for the Block Blob Get Block List operation. - */ - async getBlockList(listType, options = {}) { - return tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { - var _a; - const res = assertResponse(await this.blockBlobContext.getBlockList(listType, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - if (!res.committedBlocks) { - res.committedBlocks = []; - } - if (!res.uncommittedBlocks) { - res.uncommittedBlocks = []; - } - return res; - }); - } - // High level functions - /** - * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. - * - * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is - * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} - * to commit the block list. - * - * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is - * `blobContentType`, enabling the browser to provide - * functionality based on file type. - * - * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView - * @param options - - */ - async uploadData(data, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { - if (coreUtil.isNode) { - let buffer; - if (data instanceof Buffer) { - buffer = data; - } - else if (data instanceof ArrayBuffer) { - buffer = Buffer.from(data); - } - else { - data = data; - buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); - } - return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); - } - else { - const browserBlob = new Blob([data]); - return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); - } - }); - } - /** - * ONLY AVAILABLE IN BROWSERS. - * - * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. - * - * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call - * {@link commitBlockList} to commit the block list. - * - * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is - * `blobContentType`, enabling the browser to provide - * functionality based on file type. - * - * @deprecated Use {@link uploadData} instead. - * - * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView - * @param options - Options to upload browser data. - * @returns Response data for the Blob Upload operation. - */ - async uploadBrowserData(browserData, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { - const browserBlob = new Blob([browserData]); - return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); - }); - } - /** - * - * Uploads data to block blob. Requires a bodyFactory as the data source, - * which need to return a {@link HttpRequestBody} object with the offset and size provided. - * - * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is - * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. - * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} - * to commit the block list. - * - * @param bodyFactory - - * @param size - size of the data to upload. - * @param options - Options to Upload to Block Blob operation. - * @returns Response data for the Blob Upload operation. - */ - async uploadSeekableInternal(bodyFactory, size, options = {}) { - var _a, _b; - let blockSize = (_a = options.blockSize) !== null && _a !== void 0 ? _a : 0; - if (blockSize < 0 || blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { - throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); - } - const maxSingleShotSize = (_b = options.maxSingleShotSize) !== null && _b !== void 0 ? _b : BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; - if (maxSingleShotSize < 0 || maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { - throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); - } - if (blockSize === 0) { - if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`${size} is too larger to upload to a block blob.`); - } - if (size > maxSingleShotSize) { - blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS); - if (blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { - blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; - } - } - } - if (!options.blobHTTPHeaders) { - options.blobHTTPHeaders = {}; - } - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { - if (size <= maxSingleShotSize) { - return assertResponse(await this.upload(bodyFactory(0, size), size, updatedOptions)); - } - const numBlocks = Math.floor((size - 1) / blockSize) + 1; - if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) { - throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` + - `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); - } - const blockList = []; - const blockIDPrefix = coreUtil.randomUUID(); - let transferProgress = 0; - const batch = new Batch(options.concurrency); - for (let i = 0; i < numBlocks; i++) { - batch.addOperation(async () => { - const blockID = generateBlockID(blockIDPrefix, i); - const start = blockSize * i; - const end = i === numBlocks - 1 ? size : start + blockSize; - const contentLength = end - start; - blockList.push(blockID); - await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { - abortSignal: options.abortSignal, - conditions: options.conditions, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - }); - // Update progress after block is successfully uploaded to server, in case of block trying - // TODO: Hook with convenience layer progress event in finer level - transferProgress += contentLength; - if (options.onProgress) { - options.onProgress({ - loadedBytes: transferProgress, - }); - } - }); - } - await batch.do(); - return this.commitBlockList(blockList, updatedOptions); - }); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Uploads a local file in blocks to a block blob. - * - * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. - * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList - * to commit the block list. - * - * @param filePath - Full path of local file - * @param options - Options to Upload to Block Blob operation. - * @returns Response data for the Blob Upload operation. - */ - async uploadFile(filePath, options = {}) { - return tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { - const size = (await fsStat(filePath)).size; - return this.uploadSeekableInternal((offset, count) => { - return () => fsCreateReadStream(filePath, { - autoClose: true, - end: count ? offset + count - 1 : Infinity, - start: offset, - }); - }, size, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions })); - }); - } - /** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Uploads a Node.js Readable stream into block blob. - * - * PERFORMANCE IMPROVEMENT TIPS: - * * Input stream highWaterMark is better to set a same value with bufferSize - * parameter, which will avoid Buffer.concat() operations. - * - * @param stream - Node.js Readable stream - * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB - * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, - * positive correlation with max uploading concurrency. Default value is 5 - * @param options - Options to Upload Stream to Block Blob operation. - * @returns Response data for the Blob Upload operation. - */ - async uploadStream(stream, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { - if (!options.blobHTTPHeaders) { - options.blobHTTPHeaders = {}; - } - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { - let blockNum = 0; - const blockIDPrefix = coreUtil.randomUUID(); - let transferProgress = 0; - const blockList = []; - const scheduler = new BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => { - const blockID = generateBlockID(blockIDPrefix, blockNum); - blockList.push(blockID); - blockNum++; - await this.stageBlock(blockID, body, length, { - customerProvidedKey: options.customerProvidedKey, - conditions: options.conditions, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - }); - // Update progress after block is successfully uploaded to server, in case of block trying - transferProgress += length; - if (options.onProgress) { - options.onProgress({ loadedBytes: transferProgress }); - } - }, - // concurrency should set a smaller value than maxConcurrency, which is helpful to - // reduce the possibility when a outgoing handler waits for stream data, in - // this situation, outgoing handlers are blocked. - // Outgoing queue shouldn't be empty. - Math.ceil((maxConcurrency / 4) * 3)); - await scheduler.do(); - return assertResponse(await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }))); - }); - } -} -/** - * PageBlobClient defines a set of operations applicable to page blobs. - */ -class PageBlobClient extends BlobClient { - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. - // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - options = blobNameOrOptions; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string" && - blobNameOrOptions && - typeof blobNameOrOptions === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const blobName = blobNameOrOptions; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName and blobName parameters"); - } - super(url, pipeline); - this.pageBlobContext = this.storageClientContext.pageBlob; - } - /** - * Creates a new PageBlobClient object identical to the source but with the - * specified snapshot timestamp. - * Provide "" will remove the snapshot and return a Client to the base blob. - * - * @param snapshot - The snapshot timestamp. - * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. - */ - withSnapshot(snapshot) { - return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); - } - /** - * Creates a page blob of the specified length. Call uploadPages to upload data - * data to a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param size - size of the page blob. - * @param options - Options to the Page Blob Create operation. - * @returns Response data for the Page Blob Create operation. - */ - async create(size, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { - var _a, _b, _c; - return assertResponse(await this.pageBlobContext.create(0, size, { - abortSignal: options.abortSignal, - blobHttpHeaders: options.blobHTTPHeaders, - blobSequenceNumber: options.blobSequenceNumber, - leaseAccessConditions: options.conditions, - metadata: options.metadata, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, - immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, - legalHold: options.legalHold, - tier: toAccessTier(options.tier), - blobTagsString: toBlobTagsString(options.tags), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Creates a page blob of the specified length. Call uploadPages to upload data - * data to a page blob. If the blob with the same name already exists, the content - * of the existing blob will remain unchanged. - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param size - size of the page blob. - * @param options - - */ - async createIfNotExists(size, options = {}) { - return tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; - try { - const conditions = { ifNoneMatch: ETagAny }; - const res = assertResponse(await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }))); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. - * @see https://learn.microsoft.com/rest/api/storageservices/put-page - * - * @param body - Data to upload - * @param offset - Offset of destination page blob - * @param count - Content length of the body, also number of bytes to be uploaded - * @param options - Options to the Page Blob Upload Pages operation. - * @returns Response data for the Page Blob Upload Pages operation. - */ - async uploadPages(body, offset, count, options = {}) { - options.conditions = options.conditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.uploadPages(count, body, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - requestOptions: { - onUploadProgress: options.onProgress, - }, - range: rangeToString({ offset, count }), - sequenceNumberAccessConditions: options.conditions, - transactionalContentMD5: options.transactionalContentMD5, - transactionalContentCrc64: options.transactionalContentCrc64, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Upload Pages operation writes a range of pages to a page blob where the - * contents are read from a URL. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/put-page-from-url - * - * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication - * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob - * @param destOffset - Offset of destination page blob - * @param count - Number of bytes to be uploaded from source page blob - * @param options - - */ - async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { - options.conditions = options.conditions || {}; - options.sourceConditions = options.sourceConditions || {}; - ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps); - return tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { - var _a, _b, _c, _d, _e; - return assertResponse(await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), { - abortSignal: options.abortSignal, - sourceContentMD5: options.sourceContentMD5, - sourceContentCrc64: options.sourceContentCrc64, - leaseAccessConditions: options.conditions, - sequenceNumberAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - sourceModifiedAccessConditions: { - sourceIfMatch: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifMatch, - sourceIfModifiedSince: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifModifiedSince, - sourceIfNoneMatch: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch, - sourceIfUnmodifiedSince: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince, - }, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Frees the specified pages from the page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/put-page - * - * @param offset - Starting byte position of the pages to clear. - * @param count - Number of bytes to clear. - * @param options - Options to the Page Blob Clear Pages operation. - * @returns Response data for the Page Blob Clear Pages operation. - */ - async clearPages(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.clearPages(0, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - sequenceNumberAccessConditions: options.conditions, - cpkInfo: options.customerProvidedKey, - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns the list of valid page ranges for a page blob or snapshot of a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns Response data for the Page Blob Get Ranges operation. - */ - async getPageRanges(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRanges({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - tracingOptions: updatedOptions.tracingOptions, - })); - return rangeResponseFromModel(response); - }); - } - /** - * getPageRangesSegment returns a single segment of page ranges starting from the - * specified Marker. Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call getPageRangesSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to PageBlob Get Page Ranges Segment operation. - */ - async listPageRangesSegment(offset = 0, count, marker, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRanges({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - range: rangeToString({ offset, count }), - marker: marker, - maxPageSize: options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param marker - A string value that identifies the portion of - * the get of page ranges to be returned with the next getting operation. The - * operation returns the ContinuationToken value within the response body if the - * getting operation did not return all page ranges remaining within the current page. - * The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of get - * items. The marker value is opaque to the client. - * @param options - Options to List Page Ranges operation. - */ - listPageRangeItemSegments() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1(offset = 0, count, marker, options = {}) { - let getPageRangeItemSegmentsResponse; - if (!!marker || marker === undefined) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker, options)); - marker = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to List Page Ranges operation. - */ - listPageRangeItems() { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1(offset = 0, count, options = {}) { - var _a, e_1, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_1) throw e_1.error; } - } - }); - } - /** - * Returns an async iterable iterator to list of page ranges for a page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * .byPage() returns an async iterable iterator to list of page ranges for a page blob. - * - * Example using `for await` syntax: - * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` - * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRanges()) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRanges(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns An asyncIterableIterator that supports paging. - */ - listPageRanges(offset = 0, count, options = {}) { - options.conditions = options.conditions || {}; - // AsyncIterableIterator to iterate over blobs - const iter = this.listPageRangeItems(offset, count, options); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - }, - }; - } - /** - * Gets the collection of page ranges that differ between a specified snapshot and this page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page blob - * @param count - Number of bytes to get ranges diff. - * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - * @returns Response data for the Page Blob Get Page Range Diff operation. - */ - async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { - var _a; - const result = assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevsnapshot: prevSnapshot, - range: rangeToString({ offset, count }), - tracingOptions: updatedOptions.tracingOptions, - })); - return rangeResponseFromModel(result); - }); - } - /** - * getPageRangesDiffSegment returns a single segment of page ranges starting from the - * specified Marker for difference between previous snapshot and the target page blob. - * Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call getPageRangesDiffSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - */ - async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { - return tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, - leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevsnapshot: prevSnapshotOrUrl, - range: rangeToString({ - offset: offset, - count: count, - }), - marker: marker, - maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} - * - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param marker - A string value that identifies the portion of - * the get of page ranges to be returned with the next getting operation. The - * operation returns the ContinuationToken value within the response body if the - * getting operation did not return all page ranges remaining within the current page. - * The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of get - * items. The marker value is opaque to the client. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - */ - listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() { - let getPageRangeItemSegmentsResponse; - if (!!marker || marker === undefined) { - do { - getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options)); - marker = getPageRangeItemSegmentsResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects - * - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - */ - listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { - return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() { - var _a, e_2, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const getPageRangesSegment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment)))); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_2) throw e_2.error; } - } - }); - } - /** - * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. - * - * Example using `for await` syntax: - * - * ```js - * // Get the pageBlobClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("").getPageBlobClient("");` - * let i = 1; - * for await (const pageRange of pageBlobClient.listPageRangesDiff()) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = pageBlobClient.listPageRangesDiff(); - * let pageRangeItem = await iter.next(); - * while (!pageRangeItem.done) { - * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`); - * pageRangeItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) { - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 page ranges - * for (const pageRange of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 page ranges - * for (const blob of response) { - * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); - * } - * ``` - * @param offset - Starting byte position of the page ranges. - * @param count - Number of bytes to get. - * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Ranges operation. - * @returns An asyncIterableIterator that supports paging. - */ - listPageRangesDiff(offset, count, prevSnapshot, options = {}) { - options.conditions = options.conditions || {}; - // AsyncIterableIterator to iterate over blobs - const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options)); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options)); - }, - }; - } - /** - * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. - * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges - * - * @param offset - Starting byte position of the page blob - * @param count - Number of bytes to get ranges diff. - * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. - * @param options - Options to the Page Blob Get Page Ranges Diff operation. - * @returns Response data for the Page Blob Get Page Range Diff operation. - */ - async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.pageBlobContext.getPageRangesDiff({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - prevSnapshotUrl, - range: rangeToString({ offset, count }), - tracingOptions: updatedOptions.tracingOptions, - })); - return rangeResponseFromModel(response); - }); - } - /** - * Resizes the page blob to the specified size (which must be a multiple of 512). - * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties - * - * @param size - Target size - * @param options - Options to the Page Blob Resize operation. - * @returns Response data for the Page Blob Resize operation. - */ - async resize(size, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.resize(size, { - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - encryptionScope: options.encryptionScope, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets a page blob's sequence number. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-properties - * - * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. - * @param sequenceNumber - Required if sequenceNumberAction is max or update - * @param options - Options to the Page Blob Update Sequence Number operation. - * @returns Response data for the Page Blob Update Sequence Number operation. - */ - async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { - abortSignal: options.abortSignal, - blobSequenceNumber: sequenceNumber, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. - * The snapshot is copied such that only the differential changes between the previously - * copied snapshot are transferred to the destination. - * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. - * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob - * @see https://learn.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots - * - * @param copySource - Specifies the name of the source page blob snapshot. For example, - * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= - * @param options - Options to the Page Blob Copy Incremental operation. - * @returns Response data for the Page Blob Copy Incremental operation. - */ - async startCopyIncremental(copySource, options = {}) { - return tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { - var _a; - return assertResponse(await this.pageBlobContext.copyIncremental(copySource, { - abortSignal: options.abortSignal, - modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -async function getBodyAsText(batchResponse) { - let buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES); - const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer); - // Slice the buffer to trim the empty ending. - buffer = buffer.slice(0, responseLength); - return buffer.toString(); -} -function utf8ByteLength(str) { - return Buffer.byteLength(str); -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const HTTP_HEADER_DELIMITER = ": "; -const SPACE_DELIMITER = " "; -const NOT_FOUND = -1; -/** - * Util class for parsing batch response. - */ -class BatchResponseParser { - constructor(batchResponse, subRequests) { - if (!batchResponse || !batchResponse.contentType) { - // In special case(reported), server may return invalid content-type which could not be parsed. - throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); - } - if (!subRequests || subRequests.size === 0) { - // This should be prevent during coding. - throw new RangeError("Invalid state: subRequests is not provided or size is 0."); - } - this.batchResponse = batchResponse; - this.subRequests = subRequests; - this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; - this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`; - this.batchResponseEnding = `--${this.responseBatchBoundary}--`; - } - // For example of response, please refer to https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#response - async parseBatchResponse() { - // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse - // sub request's response. - if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) { - throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); - } - const responseBodyAsText = await getBodyAsText(this.batchResponse); - const subResponses = responseBodyAsText - .split(this.batchResponseEnding)[0] // string after ending is useless - .split(this.perResponsePrefix) - .slice(1); // string before first response boundary is useless - const subResponseCount = subResponses.length; - // Defensive coding in case of potential error parsing. - // Note: subResponseCount == 1 is special case where sub request is invalid. - // We try to prevent such cases through early validation, e.g. validate sub request count >= 1. - // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user. - if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { - throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); - } - const deserializedSubResponses = new Array(subResponseCount); - let subResponsesSucceededCount = 0; - let subResponsesFailedCount = 0; - // Parse sub subResponses. - for (let index = 0; index < subResponseCount; index++) { - const subResponse = subResponses[index]; - const deserializedSubResponse = {}; - deserializedSubResponse.headers = coreHttpCompat.toHttpHeadersLike(coreRestPipeline.createHttpHeaders()); - const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`); - let subRespHeaderStartFound = false; - let subRespHeaderEndFound = false; - let subRespFailed = false; - let contentId = NOT_FOUND; - for (const responseLine of responseLines) { - if (!subRespHeaderStartFound) { - // Convention line to indicate content ID - if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) { - contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); - } - // Http version line with status code indicates the start of sub request's response. - // Example: HTTP/1.1 202 Accepted - if (responseLine.startsWith(HTTP_VERSION_1_1)) { - subRespHeaderStartFound = true; - const tokens = responseLine.split(SPACE_DELIMITER); - deserializedSubResponse.status = parseInt(tokens[1]); - deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); - } - continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: * - } - if (responseLine.trim() === "") { - // Sub response's header start line already found, and the first empty line indicates header end line found. - if (!subRespHeaderEndFound) { - subRespHeaderEndFound = true; - } - continue; // Skip empty line - } - // Note: when code reach here, it indicates subRespHeaderStartFound == true - if (!subRespHeaderEndFound) { - if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) { - // Defensive coding to prevent from missing valuable lines. - throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); - } - // Parse headers of sub response. - const tokens = responseLine.split(HTTP_HEADER_DELIMITER); - deserializedSubResponse.headers.set(tokens[0], tokens[1]); - if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) { - deserializedSubResponse.errorCode = tokens[1]; - subRespFailed = true; - } - } - else { - // Assemble body of sub response. - if (!deserializedSubResponse.bodyAsText) { - deserializedSubResponse.bodyAsText = ""; - } - deserializedSubResponse.bodyAsText += responseLine; - } - } // Inner for end - // The response will contain the Content-ID header for each corresponding subrequest response to use for tracking. - // The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it - // to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that - // unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose. - if (contentId !== NOT_FOUND && - Number.isInteger(contentId) && - contentId >= 0 && - contentId < this.subRequests.size && - deserializedSubResponses[contentId] === undefined) { - deserializedSubResponse._request = this.subRequests.get(contentId); - deserializedSubResponses[contentId] = deserializedSubResponse; - } - else { - logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); - } - if (subRespFailed) { - subResponsesFailedCount++; - } - else { - subResponsesSucceededCount++; - } - } - return { - subResponses: deserializedSubResponses, - subResponsesSucceededCount: subResponsesSucceededCount, - subResponsesFailedCount: subResponsesFailedCount, - }; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var MutexLockStatus; -(function (MutexLockStatus) { - MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED"; - MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED"; -})(MutexLockStatus || (MutexLockStatus = {})); -/** - * An async mutex lock. - */ -class Mutex { - /** - * Lock for a specific key. If the lock has been acquired by another customer, then - * will wait until getting the lock. - * - * @param key - lock key - */ - static async lock(key) { - return new Promise((resolve) => { - if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) { - this.keys[key] = MutexLockStatus.LOCKED; - resolve(); - } - else { - this.onUnlockEvent(key, () => { - this.keys[key] = MutexLockStatus.LOCKED; - resolve(); - }); - } - }); - } - /** - * Unlock a key. - * - * @param key - - */ - static async unlock(key) { - return new Promise((resolve) => { - if (this.keys[key] === MutexLockStatus.LOCKED) { - this.emitUnlockEvent(key); - } - delete this.keys[key]; - resolve(); - }); - } - static onUnlockEvent(key, handler) { - if (this.listeners[key] === undefined) { - this.listeners[key] = [handler]; - } - else { - this.listeners[key].push(handler); - } - } - static emitUnlockEvent(key) { - if (this.listeners[key] !== undefined && this.listeners[key].length > 0) { - const handler = this.listeners[key].shift(); - setImmediate(() => { - handler.call(this); - }); - } - } -} -Mutex.keys = {}; -Mutex.listeners = {}; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A BlobBatch represents an aggregated set of operations on blobs. - * Currently, only `delete` and `setAccessTier` are supported. - */ -class BlobBatch { - constructor() { - this.batch = "batch"; - this.batchRequest = new InnerBatchRequest(); - } - /** - * Get the value of Content-Type for a batch request. - * The value must be multipart/mixed with a batch boundary. - * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 - */ - getMultiPartContentType() { - return this.batchRequest.getMultipartContentType(); - } - /** - * Get assembled HTTP request body for sub requests. - */ - getHttpRequestBody() { - return this.batchRequest.getHttpRequestBody(); - } - /** - * Get sub requests that are added into the batch request. - */ - getSubRequests() { - return this.batchRequest.getSubRequests(); - } - async addSubRequestInternal(subRequest, assembleSubRequestFunc) { - await Mutex.lock(this.batch); - try { - this.batchRequest.preAddSubRequest(subRequest); - await assembleSubRequestFunc(); - this.batchRequest.postAddSubRequest(subRequest); - } - finally { - await Mutex.unlock(this.batch); - } - } - setBatchType(batchType) { - if (!this.batchType) { - this.batchType = batchType; - } - if (this.batchType !== batchType) { - throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); - } - } - async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url; - let credential; - if (typeof urlOrBlobClient === "string" && - ((coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential) || - credentialOrOptions instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrOptions))) { - // First overload - url = urlOrBlobClient; - credential = credentialOrOptions; - } - else if (urlOrBlobClient instanceof BlobClient) { - // Second overload - url = urlOrBlobClient.url; - credential = urlOrBlobClient.credential; - options = credentialOrOptions; - } - else { - throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); - } - if (!options) { - options = {}; - } - return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { - this.setBatchType("delete"); - await this.addSubRequestInternal({ - url: url, - credential: credential, - }, async () => { - await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); - }); - }); - } - async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url; - let credential; - let tier; - if (typeof urlOrBlobClient === "string" && - ((coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential) || - credentialOrTier instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrTier))) { - // First overload - url = urlOrBlobClient; - credential = credentialOrTier; - tier = tierOrOptions; - } - else if (urlOrBlobClient instanceof BlobClient) { - // Second overload - url = urlOrBlobClient.url; - credential = urlOrBlobClient.credential; - tier = credentialOrTier; - options = tierOrOptions; - } - else { - throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); - } - if (!options) { - options = {}; - } - return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { - this.setBatchType("setAccessTier"); - await this.addSubRequestInternal({ - url: url, - credential: credential, - }, async () => { - await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); - }); - }); - } -} -/** - * Inner batch request class which is responsible for assembling and serializing sub requests. - * See https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled. - */ -class InnerBatchRequest { - constructor() { - this.operationCount = 0; - this.body = ""; - const tempGuid = coreUtil.randomUUID(); - // batch_{batchid} - this.boundary = `batch_${tempGuid}`; - // --batch_{batchid} - // Content-Type: application/http - // Content-Transfer-Encoding: binary - this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; - // multipart/mixed; boundary=batch_{batchid} - this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; - // --batch_{batchid}-- - this.batchRequestEnding = `--${this.boundary}--`; - this.subRequests = new Map(); - } - /** - * Create pipeline to assemble sub requests. The idea here is to use existing - * credential and serialization/deserialization components, with additional policies to - * filter unnecessary headers, assemble sub requests into request's body - * and intercept request from going to wire. - * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. - */ - createPipeline(credential) { - const corePipeline = coreRestPipeline.createEmptyPipeline(); - corePipeline.addPolicy(coreClient.serializationPolicy({ - stringifyXML: coreXml.stringifyXML, - serializerOptions: { - xml: { - xmlCharKey: "#", - }, - }, - }), { phase: "Serialize" }); - // Use batch header filter policy to exclude unnecessary headers - corePipeline.addPolicy(batchHeaderFilterPolicy()); - // Use batch assemble policy to assemble request and intercept request from going to wire - corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); - if (coreAuth.isTokenCredential(credential)) { - corePipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential, - scopes: StorageOAuthScopes, - challengeCallbacks: { authorizeRequestOnChallenge: coreClient.authorizeRequestOnTenantChallenge }, - }), { phase: "Sign" }); - } - else if (credential instanceof StorageSharedKeyCredential) { - corePipeline.addPolicy(storageSharedKeyCredentialPolicy({ - accountName: credential.accountName, - accountKey: credential.accountKey, - }), { phase: "Sign" }); - } - const pipeline = new Pipeline([]); - // attach the v2 pipeline to this one - pipeline._credential = credential; - pipeline._corePipeline = corePipeline; - return pipeline; - } - appendSubRequestToBody(request) { - // Start to assemble sub request - this.body += [ - this.subRequestPrefix, // sub request constant prefix - `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID - "", // empty line after sub request's content ID - `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method - ].join(HTTP_LINE_ENDING); - for (const [name, value] of request.headers) { - this.body += `${name}: ${value}${HTTP_LINE_ENDING}`; - } - this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line - // No body to assemble for current batch request support - // End to assemble sub request - } - preAddSubRequest(subRequest) { - if (this.operationCount >= BATCH_MAX_REQUEST) { - throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); - } - // Fast fail if url for sub request is invalid - const path = getURLPath(subRequest.url); - if (!path || path === "") { - throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); - } - } - postAddSubRequest(subRequest) { - this.subRequests.set(this.operationCount, subRequest); - this.operationCount++; - } - // Return the http request body with assembling the ending line to the sub request body. - getHttpRequestBody() { - return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`; - } - getMultipartContentType() { - return this.multipartContentType; - } - getSubRequests() { - return this.subRequests; - } -} -function batchRequestAssemblePolicy(batchRequest) { - return { - name: "batchRequestAssemblePolicy", - async sendRequest(request) { - batchRequest.appendSubRequestToBody(request); - return { - request, - status: 200, - headers: coreRestPipeline.createHttpHeaders(), - }; - }, - }; -} -function batchHeaderFilterPolicy() { - return { - name: "batchHeaderFilterPolicy", - async sendRequest(request, next) { - let xMsHeaderName = ""; - for (const [name] of request.headers) { - if (iEqual(name, HeaderConstants.X_MS_VERSION)) { - xMsHeaderName = name; - } - } - if (xMsHeaderName !== "") { - request.headers.delete(xMsHeaderName); // The subrequests should not have the x-ms-version header. - } - return next(request); - }, - }; -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - */ -class BlobBatchClient { - constructor(url, credentialOrPipeline, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - let pipeline; - if (isPipelineLike(credentialOrPipeline)) { - pipeline = credentialOrPipeline; - } - else if (!credentialOrPipeline) { - // no credential provided - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - pipeline = newPipeline(credentialOrPipeline, options); - } - const storageClientContext = new StorageContextClient(url, getCoreClientOptions(pipeline)); - const path = getURLPath(url); - if (path && path !== "/") { - // Container scoped. - this.serviceOrContainerContext = storageClientContext.container; - } - else { - this.serviceOrContainerContext = storageClientContext.service; - } - } - /** - * Creates a {@link BlobBatch}. - * A BlobBatch represents an aggregated set of operations on blobs. - */ - createBatch() { - return new BlobBatch(); - } - async deleteBlobs(urlsOrBlobClients, credentialOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - const batch = new BlobBatch(); - for (const urlOrBlobClient of urlsOrBlobClients) { - if (typeof urlOrBlobClient === "string") { - await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); - } - else { - await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); - } - } - return this.submitBatch(batch); - } - async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - const batch = new BlobBatch(); - for (const urlOrBlobClient of urlsOrBlobClients) { - if (typeof urlOrBlobClient === "string") { - await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); - } - else { - await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); - } - } - return this.submitBatch(batch); - } - /** - * Submit batch request which consists of multiple subrequests. - * - * Get `blobBatchClient` and other details before running the snippets. - * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` - * - * Example usage: - * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.deleteBlob(urlInString0, credential0); - * await batchRequest.deleteBlob(urlInString1, credential1, { - * deleteSnapshots: "include" - * }); - * const batchResp = await blobBatchClient.submitBatch(batchRequest); - * console.log(batchResp.subResponsesSucceededCount); - * ``` - * - * Example using a lease: - * - * ```js - * let batchRequest = new BlobBatch(); - * await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool"); - * await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", { - * conditions: { leaseId: leaseId } - * }); - * const batchResp = await blobBatchClient.submitBatch(batchRequest); - * console.log(batchResp.subResponsesSucceededCount); - * ``` - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - * - * @param batchRequest - A set of Delete or SetTier operations. - * @param options - - */ - async submitBatch(batchRequest, options = {}) { - if (!batchRequest || batchRequest.getSubRequests().size === 0) { - throw new RangeError("Batch request should contain one or more sub requests."); - } - return tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { - const batchRequestBody = batchRequest.getHttpRequestBody(); - // ServiceSubmitBatchResponseModel and ContainerSubmitBatchResponse are compatible for now. - const rawBatchResponse = assertResponse(await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign({}, updatedOptions))); - // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202). - const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); - const responseSummary = await batchResponseParser.parseBatchResponse(); - const res = { - _response: rawBatchResponse._response, - contentType: rawBatchResponse.contentType, - errorCode: rawBatchResponse.errorCode, - requestId: rawBatchResponse.requestId, - clientRequestId: rawBatchResponse.clientRequestId, - version: rawBatchResponse.version, - subResponses: responseSummary.subResponses, - subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, - subResponsesFailedCount: responseSummary.subResponsesFailedCount, - }; - return res; - }); - } -} - -/** - * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. - */ -class ContainerClient extends StorageClient { - /** - * The name of the container. - */ - get containerName() { - return this._containerName; - } - constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - let pipeline; - let url; - options = options || {}; - if (isPipelineLike(credentialOrPipelineOrContainerName)) { - // (url: string, pipeline: Pipeline) - url = urlOrConnectionString; - pipeline = credentialOrPipelineOrContainerName; - } - else if ((coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) || - credentialOrPipelineOrContainerName instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - url = urlOrConnectionString; - pipeline = newPipeline(credentialOrPipelineOrContainerName, options); - } - else if (!credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName !== "string") { - // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) - // The second parameter is undefined. Use anonymous credential. - url = urlOrConnectionString; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else if (credentialOrPipelineOrContainerName && - typeof credentialOrPipelineOrContainerName === "string") { - // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) - const containerName = credentialOrPipelineOrContainerName; - const extractedCreds = extractConnectionStringParts(urlOrConnectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - pipeline = newPipeline(sharedKeyCredential, options); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - url = - appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + - "?" + - extractedCreds.accountSas; - pipeline = newPipeline(new AnonymousCredential(), options); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - else { - throw new Error("Expecting non-empty strings for containerName parameter"); - } - super(url, pipeline); - this._containerName = this.getContainerNameFromUrl(); - this.containerContext = this.storageClientContext.container; - } - /** - * Creates a new container under the specified account. If the container with - * the same name already exists, the operation fails. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata - * - * @param options - Options to Container Create operation. - * - * - * Example usage: - * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); - * const createContainerResponse = await containerClient.create(); - * console.log("Container was created successfully", createContainerResponse.requestId); - * ``` - */ - async create(options = {}) { - return tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.create(updatedOptions)); - }); - } - /** - * Creates a new container under the specified account. If the container with - * the same name already exists, it is not changed. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata - * - * @param options - - */ - async createIfNotExists(options = {}) { - return tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = await this.create(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - else { - throw e; - } - } - }); - } - /** - * Returns true if the Azure container resource represented by this client exists; false otherwise. - * - * NOTE: use this function with care since an existing container might be deleted by other clients or - * applications. Vice versa new containers with the same name might be added by other clients or - * applications after this function completes. - * - * @param options - - */ - async exists(options = {}) { - return tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { - try { - await this.getProperties({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - }); - return true; - } - catch (e) { - if (e.statusCode === 404) { - return false; - } - throw e; - } - }); - } - /** - * Creates a {@link BlobClient} - * - * @param blobName - A blob name - * @returns A new BlobClient object for the given blob name. - */ - getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Creates an {@link AppendBlobClient} - * - * @param blobName - An append blob name - */ - getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Creates a {@link BlockBlobClient} - * - * @param blobName - A block blob name - * - * - * Example usage: - * - * ```js - * const content = "Hello world!"; - * - * const blockBlobClient = containerClient.getBlockBlobClient(""); - * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); - * ``` - */ - getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Creates a {@link PageBlobClient} - * - * @param blobName - A page blob name - */ - getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); - } - /** - * Returns all user-defined metadata and system properties for the specified - * container. The data returned does not include the container's list of blobs. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-properties - * - * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if - * they originally contained uppercase characters. This differs from the metadata keys returned by - * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which - * will retain their original casing. - * - * @param options - Options to Container Get Properties operation. - */ - async getProperties(options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), { tracingOptions: updatedOptions.tracingOptions }))); - }); - } - /** - * Marks the specified container for deletion. The container and any blobs - * contained within it are later deleted during garbage collection. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container - * - * @param options - Options to Container Delete operation. - */ - async delete(options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.delete({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Marks the specified container for deletion if it exists. The container and any blobs - * contained within it are later deleted during garbage collection. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-container - * - * @param options - Options to Container Delete operation. - */ - async deleteIfExists(options = {}) { - return tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { - var _a, _b; - try { - const res = await this.delete(updatedOptions); - return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response }); - } - catch (e) { - if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") { - return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response }); - } - throw e; - } - }); - } - /** - * Sets one or more user-defined name-value pairs for the specified container. - * - * If no option provided, or no metadata defined in the parameter, the container - * metadata will be removed. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-metadata - * - * @param metadata - Replace existing metadata with this value. - * If no value provided the existing metadata will be removed. - * @param options - Options to Container Set Metadata operation. - */ - async setMetadata(metadata, options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - if (options.conditions.ifUnmodifiedSince) { - throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); - } - return tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.setMetadata({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - metadata, - modifiedAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Gets the permissions for the specified container. The permissions indicate - * whether container data may be accessed publicly. - * - * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. - * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl - * - * @param options - Options to Container Get Access Policy operation. - */ - async getAccessPolicy(options = {}) { - if (!options.conditions) { - options.conditions = {}; - } - return tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.getAccessPolicy({ - abortSignal: options.abortSignal, - leaseAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - const res = { - _response: response._response, - blobPublicAccess: response.blobPublicAccess, - date: response.date, - etag: response.etag, - errorCode: response.errorCode, - lastModified: response.lastModified, - requestId: response.requestId, - clientRequestId: response.clientRequestId, - signedIdentifiers: [], - version: response.version, - }; - for (const identifier of response) { - let accessPolicy = undefined; - if (identifier.accessPolicy) { - accessPolicy = { - permissions: identifier.accessPolicy.permissions, - }; - if (identifier.accessPolicy.expiresOn) { - accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); - } - if (identifier.accessPolicy.startsOn) { - accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); - } - } - res.signedIdentifiers.push({ - accessPolicy, - id: identifier.id, - }); - } - return res; - }); - } - /** - * Sets the permissions for the specified container. The permissions indicate - * whether blobs in a container may be accessed publicly. - * - * When you set permissions for a container, the existing permissions are replaced. - * If no access or containerAcl provided, the existing container ACL will be - * removed. - * - * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. - * During this interval, a shared access signature that is associated with the stored access policy will - * fail with status code 403 (Forbidden), until the access policy becomes active. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-container-acl - * - * @param access - The level of public access to data in the container. - * @param containerAcl - Array of elements each having a unique Id and details of the access policy. - * @param options - Options to Container Set Access Policy operation. - */ - async setAccessPolicy(access, containerAcl, options = {}) { - options.conditions = options.conditions || {}; - return tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { - const acl = []; - for (const identifier of containerAcl || []) { - acl.push({ - accessPolicy: { - expiresOn: identifier.accessPolicy.expiresOn - ? truncatedISO8061Date(identifier.accessPolicy.expiresOn) - : "", - permissions: identifier.accessPolicy.permissions, - startsOn: identifier.accessPolicy.startsOn - ? truncatedISO8061Date(identifier.accessPolicy.startsOn) - : "", - }, - id: identifier.id, - }); - } - return assertResponse(await this.containerContext.setAccessPolicy({ - abortSignal: options.abortSignal, - access, - containerAcl: acl, - leaseAccessConditions: options.conditions, - modifiedAccessConditions: options.conditions, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Get a {@link BlobLeaseClient} that manages leases on the container. - * - * @param proposeLeaseId - Initial proposed lease Id. - * @returns A new BlobLeaseClient object for managing leases on the container. - */ - getBlobLeaseClient(proposeLeaseId) { - return new BlobLeaseClient(this, proposeLeaseId); - } - /** - * Creates a new block blob, or updates the content of an existing block blob. - * - * Updating an existing block blob overwrites any existing metadata on the blob. - * Partial updates are not supported; the content of the existing blob is - * overwritten with the new content. To perform a partial update of a block blob's, - * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. - * - * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, - * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better - * performance with concurrency uploading. - * - * @see https://learn.microsoft.com/rest/api/storageservices/put-blob - * - * @param blobName - Name of the block blob to create or update. - * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function - * which returns a new Readable stream whose offset is from data source beginning. - * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a - * string including non non-Base64/Hex-encoded characters. - * @param options - Options to configure the Block Blob Upload operation. - * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. - */ - async uploadBlockBlob(blobName, body, contentLength, options = {}) { - return tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { - const blockBlobClient = this.getBlockBlobClient(blobName); - const response = await blockBlobClient.upload(body, contentLength, updatedOptions); - return { - blockBlobClient, - response, - }; - }); - } - /** - * Marks the specified blob or snapshot for deletion. The blob is later deleted - * during garbage collection. Note that in order to delete a blob, you must delete - * all of its snapshots. You can delete both at the same time with the Delete - * Blob operation. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob - * - * @param blobName - - * @param options - Options to Blob Delete operation. - * @returns Block blob deletion response data. - */ - async deleteBlob(blobName, options = {}) { - return tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { - let blobClient = this.getBlobClient(blobName); - if (options.versionId) { - blobClient = blobClient.withVersion(options.versionId); - } - return blobClient.delete(updatedOptions); - }); - } - /** - * listBlobFlatSegment returns a single segment of blobs starting from the - * specified Marker. Use an empty Marker to start enumeration from the beginning. - * After getting a segment, process it, and then call listBlobsFlatSegment again - * (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs - * - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to Container List Blob Flat Segment operation. - */ - async listBlobFlatSegment(marker, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }) }) }); - return wrappedResponse; - }); - } - /** - * listBlobHierarchySegment returns a single segment of blobs starting from - * the specified Marker. Use an empty Marker to start enumeration from the - * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment - * again (passing the the previously-returned Marker) to get the next segment. - * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. - * @param options - Options to Container List Blob Hierarchy Segment operation. - */ - async listBlobHierarchySegment(delimiter, marker, options = {}) { - return tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { - var _a; - const response = assertResponse(await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), { tracingOptions: updatedOptions.tracingOptions }))); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInternal) => { - const blobItem = Object.assign(Object.assign({}, blobItemInternal), { name: BlobNameToString(blobItemInternal.name), tags: toTags(blobItemInternal.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInternal.objectReplicationMetadata) }); - return blobItem; - }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => { - const blobPrefix = Object.assign(Object.assign({}, blobPrefixInternal), { name: BlobNameToString(blobPrefixInternal.name) }); - return blobPrefix; - }) }) }); - return wrappedResponse; - }); - } - /** - * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse - * - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the ContinuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list blobs operation. - */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker, options = {}) { - let listBlobsFlatSegmentResponse; - if (!!marker || marker === undefined) { - do { - listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options)); - marker = listBlobsFlatSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator of {@link BlobItem} objects - * - * @param options - Options to list blobs operation. - */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_1, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsFlatSegmentResponse = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems))); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_1) throw e_1.error; } - } - }); - } - /** - * Returns an async iterable iterator to list all the blobs - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. - * - * Example using `for await` syntax: - * - * ```js - * // Get the containerClient before you run these snippets, - * // Can be obtained from `blobServiceClient.getContainerClient("");` - * let i = 1; - * for await (const blob of containerClient.listBlobsFlat()) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * let iter = containerClient.listBlobsFlat(); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * - * // Passing next marker as continuationToken - * - * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 blob names - * for (const blob of response.segment.blobItems) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` - * - * @param options - Options to list blobs. - * @returns An asyncIterableIterator that supports paging. - */ - listBlobsFlat(options = {}) { - const include = []; - if (options.includeCopy) { - include.push("copy"); - } - if (options.includeDeleted) { - include.push("deleted"); - } - if (options.includeMetadata) { - include.push("metadata"); - } - if (options.includeSnapshots) { - include.push("snapshots"); - } - if (options.includeVersions) { - include.push("versions"); - } - if (options.includeUncommitedBlobs) { - include.push("uncommittedblobs"); - } - if (options.includeTags) { - include.push("tags"); - } - if (options.includeDeletedWithVersions) { - include.push("deletedwithversions"); - } - if (options.includeImmutabilityPolicy) { - include.push("immutabilitypolicy"); - } - if (options.includeLegalHold) { - include.push("legalhold"); - } - if (options.prefix === "") { - options.prefix = undefined; - } - const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {})); - // AsyncIterableIterator to iterate over blobs - const iter = this.listItems(updatedOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - }, - }; - } - /** - * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the ContinuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The ContinuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list blobs operation. - */ - listHierarchySegments(delimiter_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1(delimiter, marker, options = {}) { - let listBlobsHierarchySegmentResponse; - if (!!marker || marker === undefined) { - do { - listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter, marker, options)); - marker = listBlobsHierarchySegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param options - Options to list blobs operation. - */ - listItemsByHierarchy(delimiter_1) { - return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1(delimiter, options = {}) { - var _a, e_2, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const listBlobsHierarchySegmentResponse = _c; - const segment = listBlobsHierarchySegmentResponse.segment; - if (segment.blobPrefixes) { - for (const prefix of segment.blobPrefixes) { - yield yield tslib.__await(Object.assign({ kind: "prefix" }, prefix)); - } - } - for (const blob of segment.blobItems) { - yield yield tslib.__await(Object.assign({ kind: "blob" }, blob)); - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_2) throw e_2.error; } - } - }); - } - /** - * Returns an async iterable iterator to list all the blobs by hierarchy. - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. - * - * Example using `for await` syntax: - * - * ```js - * for await (const item of containerClient.listBlobsByHierarchy("/")) { - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let iter = containerClient.listBlobsByHierarchy("/", { prefix: "prefix1/" }); - * let entity = await iter.next(); - * while (!entity.done) { - * let item = entity.value; - * if (item.kind === "prefix") { - * console.log(`\tBlobPrefix: ${item.name}`); - * } else { - * console.log(`\tBlobItem: name - ${item.name}`); - * } - * entity = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * console.log("Listing blobs by hierarchy by page"); - * for await (const response of containerClient.listBlobsByHierarchy("/").byPage()) { - * const segment = response.segment; - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * Example using paging with a max page size: - * - * ```js - * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size"); - * - * let i = 1; - * for await (const response of containerClient - * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" }) - * .byPage({ maxPageSize: 2 })) { - * console.log(`Page ${i++}`); - * const segment = response.segment; - * - * if (segment.blobPrefixes) { - * for (const prefix of segment.blobPrefixes) { - * console.log(`\tBlobPrefix: ${prefix.name}`); - * } - * } - * - * for (const blob of response.segment.blobItems) { - * console.log(`\tBlobItem: name - ${blob.name}`); - * } - * } - * ``` - * - * @param delimiter - The character or string used to define the virtual hierarchy - * @param options - Options to list blobs operation. - */ - listBlobsByHierarchy(delimiter, options = {}) { - if (delimiter === "") { - throw new RangeError("delimiter should contain one or more characters"); - } - const include = []; - if (options.includeCopy) { - include.push("copy"); - } - if (options.includeDeleted) { - include.push("deleted"); - } - if (options.includeMetadata) { - include.push("metadata"); - } - if (options.includeSnapshots) { - include.push("snapshots"); - } - if (options.includeVersions) { - include.push("versions"); - } - if (options.includeUncommitedBlobs) { - include.push("uncommittedblobs"); - } - if (options.includeTags) { - include.push("tags"); - } - if (options.includeDeletedWithVersions) { - include.push("deletedwithversions"); - } - if (options.includeImmutabilityPolicy) { - include.push("immutabilitypolicy"); - } - if (options.includeLegalHold) { - include.push("legalhold"); - } - if (options.prefix === "") { - options.prefix = undefined; - } - const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {})); - // AsyncIterableIterator to iterate over blob prefixes and blobs - const iter = this.listItemsByHierarchy(delimiter, updatedOptions); - return { - /** - * The next method, part of the iteration protocol - */ - async next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions)); - }, - }; - } - /** - * The Filter Blobs operation enables callers to list blobs in the container whose tags - * match a given search expression. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { - return tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.containerContext.filterBlobs({ - abortSignal: options.abortSignal, - where: tagFilterSqlExpression, - marker, - maxPageSize: options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); - return wrappedResponse; - }); - } - /** - * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker, options = {}) { - let response; - if (!!marker || marker === undefined) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options)); - response.blobs = response.blobs || []; - marker = response.continuationToken; - yield yield tslib.__await(response); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for blobs. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to findBlobsByTagsItems. - */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_3, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_3) throw e_3.error; } - } - }); - } - /** - * Returns an async iterable iterator to find all blobs with specified tag - * under the specified container. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. - * - * Example using `for await` syntax: - * - * ```js - * let i = 1; - * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * // Passing next marker as continuationToken - * iterator = containerClient - * .findBlobsByTags("tagkey='tagvalue'") - * .byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * ``` - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to find blobs by tags. - */ - findBlobsByTags(tagFilterSqlExpression, options = {}) { - // AsyncIterableIterator to iterate over blobs - const listSegmentOptions = Object.assign({}, options); - const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - }, - }; - } - /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information - * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. - */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.containerContext.getAccountInfo({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - getContainerNameFromUrl() { - let containerName; - try { - // URL may look like the following - // "https://myaccount.blob.core.windows.net/mycontainer?sasString"; - // "https://myaccount.blob.core.windows.net/mycontainer"; - // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername` - // http://localhost:10001/devstoreaccount1/containername - const parsedUrl = new URL(this.url); - if (parsedUrl.hostname.split(".")[1] === "blob") { - // "https://myaccount.blob.core.windows.net/containername". - // "https://customdomain.com/containername". - // .getPath() -> /containername - containerName = parsedUrl.pathname.split("/")[1]; - } - else if (isIpEndpointStyle(parsedUrl)) { - // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername - // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername - // .getPath() -> /devstoreaccount1/containername - containerName = parsedUrl.pathname.split("/")[2]; - } - else { - // "https://customdomain.com/containername". - // .getPath() -> /containername - containerName = parsedUrl.pathname.split("/")[1]; - } - // decode the encoded containerName - to get all the special characters that might be present in it - containerName = decodeURIComponent(containerName); - if (!containerName) { - throw new Error("Provided containerName is invalid."); - } - return containerName; - } - catch (error) { - throw new Error("Unable to extract containerName with provided information."); - } - } - /** - * Only available for ContainerClient constructed with a shared key credential. - * - * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasUrl(options) { - return new Promise((resolve) => { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Only available for ContainerClient constructed with a shared key credential. - * - * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI - * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - generateSasStringToSign(options) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); - } - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign; - } - /** - * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve) => { - const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).toString(); - resolve(appendToURLQuery(this.url, sas)); - }); - } - /** - * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI - * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas - * - * @param options - Optional parameters. - * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` - * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateUserDelegationSasStringToSign(options, userDelegationKey) { - return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).stringToSign; - } - /** - * Creates a BlobBatchClient object to conduct batch operations. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - * - * @returns A new BlobBatchClient object for this container. - */ - getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the - * values are set, this should be serialized with toString and set as the permissions field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but - * the order of the permissions is particular and this class guarantees correctness. - */ -class AccountSASPermissions { - constructor() { - /** - * Permission to read resources and list queues and tables granted. - */ - this.read = false; - /** - * Permission to write resources granted. - */ - this.write = false; - /** - * Permission to delete blobs and files granted. - */ - this.delete = false; - /** - * Permission to delete versions granted. - */ - this.deleteVersion = false; - /** - * Permission to list blob containers, blobs, shares, directories, and files granted. - */ - this.list = false; - /** - * Permission to add messages, table entities, and append to blobs granted. - */ - this.add = false; - /** - * Permission to create blobs and files granted. - */ - this.create = false; - /** - * Permissions to update messages and table entities granted. - */ - this.update = false; - /** - * Permission to get and delete messages granted. - */ - this.process = false; - /** - * Specfies Tag access granted. - */ - this.tag = false; - /** - * Permission to filter blobs. - */ - this.filter = false; - /** - * Permission to set immutability policy. - */ - this.setImmutabilityPolicy = false; - /** - * Specifies that Permanent Delete is permitted. - */ - this.permanentDelete = false; - } - /** - * Parse initializes the AccountSASPermissions fields from a string. - * - * @param permissions - - */ - static parse(permissions) { - const accountSASPermissions = new AccountSASPermissions(); - for (const c of permissions) { - switch (c) { - case "r": - accountSASPermissions.read = true; - break; - case "w": - accountSASPermissions.write = true; - break; - case "d": - accountSASPermissions.delete = true; - break; - case "x": - accountSASPermissions.deleteVersion = true; - break; - case "l": - accountSASPermissions.list = true; - break; - case "a": - accountSASPermissions.add = true; - break; - case "c": - accountSASPermissions.create = true; - break; - case "u": - accountSASPermissions.update = true; - break; - case "p": - accountSASPermissions.process = true; - break; - case "t": - accountSASPermissions.tag = true; - break; - case "f": - accountSASPermissions.filter = true; - break; - case "i": - accountSASPermissions.setImmutabilityPolicy = true; - break; - case "y": - accountSASPermissions.permanentDelete = true; - break; - default: - throw new RangeError(`Invalid permission character: ${c}`); - } - } - return accountSASPermissions; - } - /** - * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it - * and boolean values for them. - * - * @param permissionLike - - */ - static from(permissionLike) { - const accountSASPermissions = new AccountSASPermissions(); - if (permissionLike.read) { - accountSASPermissions.read = true; - } - if (permissionLike.write) { - accountSASPermissions.write = true; - } - if (permissionLike.delete) { - accountSASPermissions.delete = true; - } - if (permissionLike.deleteVersion) { - accountSASPermissions.deleteVersion = true; - } - if (permissionLike.filter) { - accountSASPermissions.filter = true; - } - if (permissionLike.tag) { - accountSASPermissions.tag = true; - } - if (permissionLike.list) { - accountSASPermissions.list = true; - } - if (permissionLike.add) { - accountSASPermissions.add = true; - } - if (permissionLike.create) { - accountSASPermissions.create = true; - } - if (permissionLike.update) { - accountSASPermissions.update = true; - } - if (permissionLike.process) { - accountSASPermissions.process = true; - } - if (permissionLike.setImmutabilityPolicy) { - accountSASPermissions.setImmutabilityPolicy = true; - } - if (permissionLike.permanentDelete) { - accountSASPermissions.permanentDelete = true; - } - return accountSASPermissions; - } - /** - * Produces the SAS permissions string for an Azure Storage account. - * Call this method to set AccountSASSignatureValues Permissions field. - * - * Using this method will guarantee the resource types are in - * an order accepted by the service. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - * - */ - toString() { - // The order of the characters should be as specified here to ensure correctness: - // https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - // Use a string array instead of string concatenating += operator for performance - const permissions = []; - if (this.read) { - permissions.push("r"); - } - if (this.write) { - permissions.push("w"); - } - if (this.delete) { - permissions.push("d"); - } - if (this.deleteVersion) { - permissions.push("x"); - } - if (this.filter) { - permissions.push("f"); - } - if (this.tag) { - permissions.push("t"); - } - if (this.list) { - permissions.push("l"); - } - if (this.add) { - permissions.push("a"); - } - if (this.create) { - permissions.push("c"); - } - if (this.update) { - permissions.push("u"); - } - if (this.process) { - permissions.push("p"); - } - if (this.setImmutabilityPolicy) { - permissions.push("i"); - } - if (this.permanentDelete) { - permissions.push("y"); - } - return permissions.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the - * values are set, this should be serialized with toString and set as the resources field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but - * the order of the resources is particular and this class guarantees correctness. - */ -class AccountSASResourceTypes { - constructor() { - /** - * Permission to access service level APIs granted. - */ - this.service = false; - /** - * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. - */ - this.container = false; - /** - * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. - */ - this.object = false; - } - /** - * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an - * Error if it encounters a character that does not correspond to a valid resource type. - * - * @param resourceTypes - - */ - static parse(resourceTypes) { - const accountSASResourceTypes = new AccountSASResourceTypes(); - for (const c of resourceTypes) { - switch (c) { - case "s": - accountSASResourceTypes.service = true; - break; - case "c": - accountSASResourceTypes.container = true; - break; - case "o": - accountSASResourceTypes.object = true; - break; - default: - throw new RangeError(`Invalid resource type: ${c}`); - } - } - return accountSASResourceTypes; - } - /** - * Converts the given resource types to a string. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - * - */ - toString() { - const resourceTypes = []; - if (this.service) { - resourceTypes.push("s"); - } - if (this.container) { - resourceTypes.push("c"); - } - if (this.object) { - resourceTypes.push("o"); - } - return resourceTypes.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value - * to true means that any SAS which uses these permissions will grant access to that service. Once all the - * values are set, this should be serialized with toString and set as the services field on an - * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but - * the order of the services is particular and this class guarantees correctness. - */ -class AccountSASServices { - constructor() { - /** - * Permission to access blob resources granted. - */ - this.blob = false; - /** - * Permission to access file resources granted. - */ - this.file = false; - /** - * Permission to access queue resources granted. - */ - this.queue = false; - /** - * Permission to access table resources granted. - */ - this.table = false; - } - /** - * Creates an {@link AccountSASServices} from the specified services string. This method will throw an - * Error if it encounters a character that does not correspond to a valid service. - * - * @param services - - */ - static parse(services) { - const accountSASServices = new AccountSASServices(); - for (const c of services) { - switch (c) { - case "b": - accountSASServices.blob = true; - break; - case "f": - accountSASServices.file = true; - break; - case "q": - accountSASServices.queue = true; - break; - case "t": - accountSASServices.table = true; - break; - default: - throw new RangeError(`Invalid service character: ${c}`); - } - } - return accountSASServices; - } - /** - * Converts the given services to a string. - * - */ - toString() { - const services = []; - if (this.blob) { - services.push("b"); - } - if (this.table) { - services.push("t"); - } - if (this.queue) { - services.push("q"); - } - if (this.file) { - services.push("f"); - } - return services.join(""); - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** - * ONLY AVAILABLE IN NODE.JS RUNTIME. - * - * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual - * REST request. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas - * - * @param accountSASSignatureValues - - * @param sharedKeyCredential - - */ -function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { - return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) - .sasQueryParameters; -} -function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { - const version = accountSASSignatureValues.version - ? accountSASSignatureValues.version - : SERVICE_VERSION; - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.setImmutabilityPolicy && - version < "2020-08-04") { - throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.deleteVersion && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.permanentDelete && - version < "2019-10-10") { - throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.tag && - version < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); - } - if (accountSASSignatureValues.permissions && - accountSASSignatureValues.permissions.filter && - version < "2019-12-12") { - throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); - } - if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { - throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); - } - const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); - const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString(); - const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); - let stringToSign; - if (version >= "2020-12-06") { - stringToSign = [ - sharedKeyCredential.accountName, - parsedPermissions, - parsedServices, - parsedResourceTypes, - accountSASSignatureValues.startsOn - ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) - : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", - accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version, - accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", - "", // Account SAS requires an additional newline character - ].join("\n"); - } - else { - stringToSign = [ - sharedKeyCredential.accountName, - parsedPermissions, - parsedServices, - parsedResourceTypes, - accountSASSignatureValues.startsOn - ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false) - : "", - truncatedISO8061Date(accountSASSignatureValues.expiresOn, false), - accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "", - accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", - version, - "", // Account SAS requires an additional newline character - ].join("\n"); - } - const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); - return { - sasQueryParameters: new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope), - stringToSign: stringToSign, - }; -} - -/** - * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you - * to manipulate blob containers. - */ -class BlobServiceClient extends StorageClient { - /** - * - * Creates an instance of BlobServiceClient from connection string. - * - * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. - * [ Note - Account connection string can only be used in NODE.JS runtime. ] - * Account connection string example - - * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` - * SAS connection string example - - * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` - * @param options - Optional. Options to configure the HTTP pipeline. - */ - static fromConnectionString(connectionString, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - options = options || {}; - const extractedCreds = extractConnectionStringParts(connectionString); - if (extractedCreds.kind === "AccountConnString") { - if (coreUtil.isNode) { - const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - if (!options.proxyOptions) { - options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); - } - const pipeline = newPipeline(sharedKeyCredential, options); - return new BlobServiceClient(extractedCreds.url, pipeline); - } - else { - throw new Error("Account connection string is only supported in Node.js environment"); - } - } - else if (extractedCreds.kind === "SASConnString") { - const pipeline = newPipeline(new AnonymousCredential(), options); - return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); - } - else { - throw new Error("Connection string must be either an Account connection string or a SAS connection string"); - } - } - constructor(url, credentialOrPipeline, - // Legacy, no fix for eslint error without breaking. Disable it for this interface. - /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ - options) { - let pipeline; - if (isPipelineLike(credentialOrPipeline)) { - pipeline = credentialOrPipeline; - } - else if ((coreUtil.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) || - credentialOrPipeline instanceof AnonymousCredential || - coreAuth.isTokenCredential(credentialOrPipeline)) { - pipeline = newPipeline(credentialOrPipeline, options); - } - else { - // The second parameter is undefined. Use anonymous credential - pipeline = newPipeline(new AnonymousCredential(), options); - } - super(url, pipeline); - this.serviceContext = this.storageClientContext.service; - } - /** - * Creates a {@link ContainerClient} object - * - * @param containerName - A container name - * @returns A new ContainerClient object for the given container name. - * - * Example usage: - * - * ```js - * const containerClient = blobServiceClient.getContainerClient(""); - * ``` - */ - getContainerClient(containerName) { - return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline); - } - /** - * Create a Blob container. @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-container - * - * @param containerName - Name of the container to create. - * @param options - Options to configure Container Create operation. - * @returns Container creation response and the corresponding container client. - */ - async createContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(containerName); - const containerCreateResponse = await containerClient.create(updatedOptions); - return { - containerClient, - containerCreateResponse, - }; - }); - } - /** - * Deletes a Blob container. - * - * @param containerName - Name of the container to delete. - * @param options - Options to configure Container Delete operation. - * @returns Container deletion response. - */ - async deleteContainer(containerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(containerName); - return containerClient.delete(updatedOptions); - }); - } - /** - * Restore a previously deleted Blob container. - * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. - * - * @param deletedContainerName - Name of the previously deleted container. - * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. - * @param options - Options to configure Container Restore operation. - * @returns Container deletion response. - */ - async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { - return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { - const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); - // Hack to access a protected member. - const containerContext = containerClient["storageClientContext"].container; - const containerUndeleteResponse = assertResponse(await containerContext.restore({ - deletedContainerName, - deletedContainerVersion, - tracingOptions: updatedOptions.tracingOptions, - })); - return { containerClient, containerUndeleteResponse }; - }); - } - /** - * Rename an existing Blob Container. - * - * @param sourceContainerName - The name of the source container. - * @param destinationContainerName - The new name of the container. - * @param options - Options to configure Container Rename operation. - */ - /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ - // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready. - async renameContainer(sourceContainerName, destinationContainerName, options = {}) { - return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => { - var _a; - const containerClient = this.getContainerClient(destinationContainerName); - // Hack to access a protected member. - const containerContext = containerClient["storageClientContext"].container; - const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }))); - return { containerClient, containerRenameResponse }; - }); - } - /** - * Gets the properties of a storage account’s Blob service, including properties - * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties - * - * @param options - Options to the Service Get Properties operation. - * @returns Response data for the Service Get Properties operation. - */ - async getProperties(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getProperties({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Sets properties for a storage account’s Blob service endpoint, including properties - * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties - * - * @param properties - - * @param options - Options to the Service Set Properties operation. - * @returns Response data for the Service Set Properties operation. - */ - async setProperties(properties, options = {}) { - return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.setProperties(properties, { - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Retrieves statistics related to replication for the Blob service. It is only - * available on the secondary location endpoint when read-access geo-redundant - * replication is enabled for the storage account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats - * - * @param options - Options to the Service Get Statistics operation. - * @returns Response data for the Service Get Statistics operation. - */ - async getStatistics(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getStatistics({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * The Get Account Information operation returns the sku name and account kind - * for the specified account. - * The Get Account Information operation is available on service versions beginning - * with version 2018-03-28. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-account-information - * - * @param options - Options to the Service Get Account Info operation. - * @returns Response data for the Service Get Account Info operation. - */ - async getAccountInfo(options = {}) { - return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.getAccountInfo({ - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - }); - } - /** - * Returns a list of the containers under the specified account. - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/list-containers2 - * - * @param marker - A string value that identifies the portion of - * the list of containers to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all containers remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to the Service List Container Segment operation. - * @returns Response data for the Service List Container Segment operation. - */ - async listContainersSegment(marker, options = {}) { - return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { - return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions }))); - }); - } - /** - * The Filter Blobs operation enables callers to list blobs across all containers whose tags - * match a given search expression. Filter blobs searches across all containers within a - * storage account but can be scoped within the expression to a single container. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { - return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.filterBlobs({ - abortSignal: options.abortSignal, - where: tagFilterSqlExpression, - marker, - maxPageSize: options.maxPageSize, - tracingOptions: updatedOptions.tracingOptions, - })); - const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => { - var _a; - let tagValue = ""; - if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) { - tagValue = blob.tags.blobTagSet[0].value; - } - return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue }); - }) }); - return wrappedResponse; - }); - } - /** - * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param marker - A string value that identifies the portion of - * the list of blobs to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all blobs remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to find blobs by tags. - */ - findBlobsByTagsSegments(tagFilterSqlExpression_1, marker_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1(tagFilterSqlExpression, marker, options = {}) { - let response; - if (!!marker || marker === undefined) { - do { - response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options)); - response.blobs = response.blobs || []; - marker = response.continuationToken; - yield yield tslib.__await(response); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for blobs. - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to findBlobsByTagsItems. - */ - findBlobsByTagsItems(tagFilterSqlExpression_1) { - return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1(tagFilterSqlExpression, options = {}) { - var _a, e_1, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs))); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_1) throw e_1.error; } - } - }); - } - /** - * Returns an async iterable iterator to find all blobs with specified tag - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the blobs in pages. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties - * - * Example using `for await` syntax: - * - * ```js - * let i = 1; - * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { - * console.log(`Blob ${i++}: ${container.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); - * let blobItem = await iter.next(); - * while (!blobItem.done) { - * console.log(`Blob ${i++}: ${blobItem.value.name}`); - * blobItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) { - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * // Passing next marker as continuationToken - * iterator = blobServiceClient - * .findBlobsByTags("tagkey='tagvalue'") - * .byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints blob names - * if (response.blobs) { - * for (const blob of response.blobs) { - * console.log(`Blob ${i++}: ${blob.name}`); - * } - * } - * ``` - * - * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. - * The given expression must evaluate to true for a blob to be returned in the results. - * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; - * however, only a subset of the OData filter syntax is supported in the Blob service. - * @param options - Options to find blobs by tags. - */ - findBlobsByTags(tagFilterSqlExpression, options = {}) { - // AsyncIterableIterator to iterate over blobs - const listSegmentOptions = Object.assign({}, options); - const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - }, - }; - } - /** - * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses - * - * @param marker - A string value that identifies the portion of - * the list of containers to be returned with the next listing operation. The - * operation returns the continuationToken value within the response body if the - * listing operation did not return all containers remaining to be listed - * with the current page. The continuationToken value can be used as the value for - * the marker parameter in a subsequent call to request the next page of list - * items. The marker value is opaque to the client. - * @param options - Options to list containers operation. - */ - listSegments(marker_1) { - return tslib.__asyncGenerator(this, arguments, function* listSegments_1(marker, options = {}) { - let listContainersSegmentResponse; - if (!!marker || marker === undefined) { - do { - listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options)); - listContainersSegmentResponse.containerItems = - listContainersSegmentResponse.containerItems || []; - marker = listContainersSegmentResponse.continuationToken; - yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse)); - } while (marker); - } - }); - } - /** - * Returns an AsyncIterableIterator for Container Items - * - * @param options - Options to list containers operation. - */ - listItems() { - return tslib.__asyncGenerator(this, arguments, function* listItems_1(options = {}) { - var _a, e_2, _b, _c; - let marker; - try { - for (var _d = true, _e = tslib.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const segment = _c; - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems))); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e)); - } - finally { if (e_2) throw e_2.error; } - } - }); - } - /** - * Returns an async iterable iterator to list all the containers - * under the specified account. - * - * .byPage() returns an async iterable iterator to list the containers in pages. - * - * Example using `for await` syntax: - * - * ```js - * let i = 1; - * for await (const container of blobServiceClient.listContainers()) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * ``` - * - * Example using `iter.next()`: - * - * ```js - * let i = 1; - * const iter = blobServiceClient.listContainers(); - * let containerItem = await iter.next(); - * while (!containerItem.done) { - * console.log(`Container ${i++}: ${containerItem.value.name}`); - * containerItem = await iter.next(); - * } - * ``` - * - * Example using `byPage()`: - * - * ```js - * // passing optional maxPageSize in the page settings - * let i = 1; - * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * } - * } - * ``` - * - * Example using paging with a marker: - * - * ```js - * let i = 1; - * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); - * let response = (await iterator.next()).value; - * - * // Prints 2 container names - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * } - * - * // Gets next marker - * let marker = response.continuationToken; - * // Passing next marker as continuationToken - * iterator = blobServiceClient - * .listContainers() - * .byPage({ continuationToken: marker, maxPageSize: 10 }); - * response = (await iterator.next()).value; - * - * // Prints 10 container names - * if (response.containerItems) { - * for (const container of response.containerItems) { - * console.log(`Container ${i++}: ${container.name}`); - * } - * } - * ``` - * - * @param options - Options to list containers. - * @returns An asyncIterableIterator that supports paging. - */ - listContainers(options = {}) { - if (options.prefix === "") { - options.prefix = undefined; - } - const include = []; - if (options.includeDeleted) { - include.push("deleted"); - } - if (options.includeMetadata) { - include.push("metadata"); - } - if (options.includeSystem) { - include.push("system"); - } - // AsyncIterableIterator to iterate over containers - const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {})); - const iter = this.listItems(listSegmentOptions); - return { - /** - * The next method, part of the iteration protocol - */ - next() { - return iter.next(); - }, - /** - * The connection to the async iterator, part of the iteration protocol - */ - [Symbol.asyncIterator]() { - return this; - }, - /** - * Return an AsyncIterableIterator that works a page at a time - */ - byPage: (settings = {}) => { - return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions)); - }, - }; - } - /** - * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). - * - * Retrieves a user delegation key for the Blob service. This is only a valid operation when using - * bearer token authentication. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key - * - * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time - * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time - */ - async getUserDelegationKey(startsOn, expiresOn, options = {}) { - return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { - const response = assertResponse(await this.serviceContext.getUserDelegationKey({ - startsOn: truncatedISO8061Date(startsOn, false), - expiresOn: truncatedISO8061Date(expiresOn, false), - }, { - abortSignal: options.abortSignal, - tracingOptions: updatedOptions.tracingOptions, - })); - const userDelegationKey = { - signedObjectId: response.signedObjectId, - signedTenantId: response.signedTenantId, - signedStartsOn: new Date(response.signedStartsOn), - signedExpiresOn: new Date(response.signedExpiresOn), - signedService: response.signedService, - signedVersion: response.signedVersion, - value: response.value, - }; - const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey); - return res; - }); - } - /** - * Creates a BlobBatchClient object to conduct batch operations. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch - * - * @returns A new BlobBatchClient object for this service. - */ - getBlobBatchClient() { - return new BlobBatchClient(this.url, this.pipeline); - } - /** - * Only available for BlobServiceClient constructed with a shared key credential. - * - * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties - * and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas - * - * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. - * @param permissions - Specifies the list of permissions to be associated with the SAS. - * @param resourceTypes - Specifies the resource types associated with the shared access signature. - * @param options - Optional parameters. - * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); - } - if (expiresOn === undefined) { - const now = new Date(); - expiresOn = new Date(now.getTime() + 3600 * 1000); - } - const sas = generateAccountSASQueryParameters(Object.assign({ permissions, - expiresOn, - resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).toString(); - return appendToURLQuery(this.url, sas); - } - /** - * Only available for BlobServiceClient constructed with a shared key credential. - * - * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on - * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. - * - * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas - * - * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. - * @param permissions - Specifies the list of permissions to be associated with the SAS. - * @param resourceTypes - Specifies the resource types associated with the shared access signature. - * @param options - Optional parameters. - * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. - */ - generateSasStringToSign(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { - if (!(this.credential instanceof StorageSharedKeyCredential)) { - throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); - } - if (expiresOn === undefined) { - const now = new Date(); - expiresOn = new Date(now.getTime() + 3600 * 1000); - } - return generateAccountSASQueryParametersInternal(Object.assign({ permissions, - expiresOn, - resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).stringToSign; - } -} - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ -exports.KnownEncryptionAlgorithmType = void 0; -(function (KnownEncryptionAlgorithmType) { - KnownEncryptionAlgorithmType["AES256"] = "AES256"; -})(exports.KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = {})); - -Object.defineProperty(exports, "RestError", ({ - enumerable: true, - get: function () { return coreRestPipeline.RestError; } -})); -exports.AccountSASPermissions = AccountSASPermissions; -exports.AccountSASResourceTypes = AccountSASResourceTypes; -exports.AccountSASServices = AccountSASServices; -exports.AnonymousCredential = AnonymousCredential; -exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; -exports.AppendBlobClient = AppendBlobClient; -exports.BaseRequestPolicy = BaseRequestPolicy; -exports.BlobBatch = BlobBatch; -exports.BlobBatchClient = BlobBatchClient; -exports.BlobClient = BlobClient; -exports.BlobLeaseClient = BlobLeaseClient; -exports.BlobSASPermissions = BlobSASPermissions; -exports.BlobServiceClient = BlobServiceClient; -exports.BlockBlobClient = BlockBlobClient; -exports.ContainerClient = ContainerClient; -exports.ContainerSASPermissions = ContainerSASPermissions; -exports.Credential = Credential; -exports.CredentialPolicy = CredentialPolicy; -exports.PageBlobClient = PageBlobClient; -exports.Pipeline = Pipeline; -exports.SASQueryParameters = SASQueryParameters; -exports.StorageBrowserPolicy = StorageBrowserPolicy; -exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; -exports.StorageOAuthScopes = StorageOAuthScopes; -exports.StorageRetryPolicy = StorageRetryPolicy; -exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; -exports.StorageSharedKeyCredential = StorageSharedKeyCredential; -exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; -exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; -exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; -exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; -exports.isPipelineLike = isPipelineLike; -exports.logger = logger; -exports.newPipeline = newPipeline; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 46412: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/*! - * Copyright 2015 Google Inc. All Rights Reserved. - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResourceStream = exports.paginator = exports.Paginator = void 0; -/*! - * @module common/paginator - */ -const arrify = __nccwpck_require__(61546); -const extend = __nccwpck_require__(38171); -const resource_stream_1 = __nccwpck_require__(72199); -Object.defineProperty(exports, "ResourceStream", ({ enumerable: true, get: function () { return resource_stream_1.ResourceStream; } })); -/*! Developer Documentation - * - * paginator is used to auto-paginate `nextQuery` methods as well as - * streamifying them. - * - * Before: - * - * search.query('done=true', function(err, results, nextQuery) { - * search.query(nextQuery, function(err, results, nextQuery) {}); - * }); - * - * After: - * - * search.query('done=true', function(err, results) {}); - * - * Methods to extend should be written to accept callbacks and return a - * `nextQuery`. - */ -class Paginator { - /** - * Cache the original method, then overwrite it on the Class's prototype. - * - * @param {function} Class - The parent class of the methods to extend. - * @param {string|string[]} methodNames - Name(s) of the methods to extend. - */ - // tslint:disable-next-line:variable-name - extend(Class, methodNames) { - methodNames = arrify(methodNames); - methodNames.forEach(methodName => { - const originalMethod = Class.prototype[methodName]; - // map the original method to a private member - Class.prototype[methodName + '_'] = originalMethod; - // overwrite the original to auto-paginate - /* eslint-disable @typescript-eslint/no-explicit-any */ - Class.prototype[methodName] = function (...args) { - const parsedArguments = paginator.parseArguments_(args); - return paginator.run_(parsedArguments, originalMethod.bind(this)); - }; - }); - } - /** - * Wraps paginated API calls in a readable object stream. - * - * This method simply calls the nextQuery recursively, emitting results to a - * stream. The stream ends when `nextQuery` is null. - * - * `maxResults` will act as a cap for how many results are fetched and emitted - * to the stream. - * - * @param {string} methodName - Name of the method to streamify. - * @return {function} - Wrapped function. - */ - /* eslint-disable @typescript-eslint/no-explicit-any */ - streamify(methodName) { - return function ( - /* eslint-disable @typescript-eslint/no-explicit-any */ - ...args) { - const parsedArguments = paginator.parseArguments_(args); - const originalMethod = this[methodName + '_'] || this[methodName]; - return paginator.runAsStream_(parsedArguments, originalMethod.bind(this)); - }; - } - /** - * Parse a pseudo-array `arguments` for a query and callback. - * - * @param {array} args - The original `arguments` pseduo-array that the original - * method received. - */ - /* eslint-disable @typescript-eslint/no-explicit-any */ - parseArguments_(args) { - let query; - let autoPaginate = true; - let maxApiCalls = -1; - let maxResults = -1; - let callback; - const firstArgument = args[0]; - const lastArgument = args[args.length - 1]; - if (typeof firstArgument === 'function') { - callback = firstArgument; - } - else { - query = firstArgument; - } - if (typeof lastArgument === 'function') { - callback = lastArgument; - } - if (typeof query === 'object') { - query = extend(true, {}, query); - // Check if the user only asked for a certain amount of results. - if (query.maxResults && typeof query.maxResults === 'number') { - // `maxResults` is used API-wide. - maxResults = query.maxResults; - } - else if (typeof query.pageSize === 'number') { - // `pageSize` is Pub/Sub's `maxResults`. - maxResults = query.pageSize; - } - if (query.maxApiCalls && typeof query.maxApiCalls === 'number') { - maxApiCalls = query.maxApiCalls; - delete query.maxApiCalls; - } - // maxResults is the user specified limit. - if (maxResults !== -1 || query.autoPaginate === false) { - autoPaginate = false; - } - } - const parsedArguments = { - query: query || {}, - autoPaginate, - maxApiCalls, - maxResults, - callback, - }; - parsedArguments.streamOptions = extend(true, {}, parsedArguments.query); - delete parsedArguments.streamOptions.autoPaginate; - delete parsedArguments.streamOptions.maxResults; - delete parsedArguments.streamOptions.pageSize; - return parsedArguments; - } - /** - * This simply checks to see if `autoPaginate` is set or not, if it's true - * then we buffer all results, otherwise simply call the original method. - * - * @param {array} parsedArguments - Parsed arguments from the original method - * call. - * @param {object=|string=} parsedArguments.query - Query object. This is most - * commonly an object, but to make the API more simple, it can also be a - * string in some places. - * @param {function=} parsedArguments.callback - Callback function. - * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. - * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. - * @param {number} parsedArguments.maxResults - Maximum results to return. - * @param {function} originalMethod - The cached method that accepts a callback - * and returns `nextQuery` to receive more results. - */ - run_(parsedArguments, originalMethod) { - const query = parsedArguments.query; - const callback = parsedArguments.callback; - if (!parsedArguments.autoPaginate) { - return originalMethod(query, callback); - } - const results = new Array(); - let otherArgs = []; - const promise = new Promise((resolve, reject) => { - const stream = paginator.runAsStream_(parsedArguments, originalMethod); - stream - .on('error', reject) - .on('data', (data) => results.push(data)) - .on('end', () => { - otherArgs = stream._otherArgs || []; - resolve(results); - }); - }); - if (!callback) { - return promise.then(results => [results, query, ...otherArgs]); - } - promise.then(results => callback(null, results, query, ...otherArgs), (err) => callback(err)); - } - /** - * This method simply calls the nextQuery recursively, emitting results to a - * stream. The stream ends when `nextQuery` is null. - * - * `maxResults` will act as a cap for how many results are fetched and emitted - * to the stream. - * - * @param {object=|string=} parsedArguments.query - Query object. This is most - * commonly an object, but to make the API more simple, it can also be a - * string in some places. - * @param {function=} parsedArguments.callback - Callback function. - * @param {boolean} parsedArguments.autoPaginate - Auto-pagination enabled. - * @param {boolean} parsedArguments.maxApiCalls - Maximum API calls to make. - * @param {number} parsedArguments.maxResults - Maximum results to return. - * @param {function} originalMethod - The cached method that accepts a callback - * and returns `nextQuery` to receive more results. - * @return {stream} - Readable object stream. - */ - /* eslint-disable @typescript-eslint/no-explicit-any */ - runAsStream_(parsedArguments, originalMethod) { - return new resource_stream_1.ResourceStream(parsedArguments, originalMethod); - } -} -exports.Paginator = Paginator; -const paginator = new Paginator(); -exports.paginator = paginator; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 72199: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -/*! - * Copyright 2019 Google Inc. All Rights Reserved. - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ResourceStream = void 0; -const stream_1 = __nccwpck_require__(12781); -class ResourceStream extends stream_1.Transform { - constructor(args, requestFn) { - const options = Object.assign({ objectMode: true }, args.streamOptions); - super(options); - this._ended = false; - this._maxApiCalls = args.maxApiCalls === -1 ? Infinity : args.maxApiCalls; - this._nextQuery = args.query; - this._reading = false; - this._requestFn = requestFn; - this._requestsMade = 0; - this._resultsToSend = args.maxResults === -1 ? Infinity : args.maxResults; - this._otherArgs = []; - } - /* eslint-disable @typescript-eslint/no-explicit-any */ - end(...args) { - this._ended = true; - return super.end(...args); - } - _read() { - if (this._reading) { - return; - } - this._reading = true; - // Wrap in a try/catch to catch input linting errors, e.g. - // an invalid BigQuery query. These errors are thrown in an - // async fashion, which makes them un-catchable by the user. - try { - this._requestFn(this._nextQuery, (err, results, nextQuery, ...otherArgs) => { - if (err) { - this.destroy(err); - return; - } - this._otherArgs = otherArgs; - this._nextQuery = nextQuery; - if (this._resultsToSend !== Infinity) { - results = results.splice(0, this._resultsToSend); - this._resultsToSend -= results.length; - } - let more = true; - for (const result of results) { - if (this._ended) { - break; - } - more = this.push(result); - } - const isFinished = !this._nextQuery || this._resultsToSend < 1; - const madeMaxCalls = ++this._requestsMade >= this._maxApiCalls; - if (isFinished || madeMaxCalls) { - this.end(); - } - if (more && !this._ended) { - setImmediate(() => this._read()); - } - this._reading = false; - }); - } - catch (e) { - this.destroy(e); - } - } -} -exports.ResourceStream = ResourceStream; -//# sourceMappingURL=resource-stream.js.map - -/***/ }), - -/***/ 3497: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MissingProjectIdError = exports.replaceProjectIdToken = void 0; -const stream_1 = __nccwpck_require__(12781); -// Copyright 2014 Google LLC -// -// 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. -/** - * Populate the `{{projectId}}` placeholder. - * - * @throws {Error} If a projectId is required, but one is not provided. - * - * @param {*} - Any input value that may contain a placeholder. Arrays and objects will be looped. - * @param {string} projectId - A projectId. If not provided - * @return {*} - The original argument with all placeholders populated. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function replaceProjectIdToken(value, projectId) { - if (Array.isArray(value)) { - value = value.map(v => replaceProjectIdToken(v, projectId)); - } - if (value !== null && - typeof value === 'object' && - !(value instanceof Buffer) && - !(value instanceof stream_1.Stream) && - typeof value.hasOwnProperty === 'function') { - for (const opt in value) { - // eslint-disable-next-line no-prototype-builtins - if (value.hasOwnProperty(opt)) { - value[opt] = replaceProjectIdToken(value[opt], projectId); - } - } - } - if (typeof value === 'string' && - value.indexOf('{{projectId}}') > -1) { - if (!projectId || projectId === '{{projectId}}') { - throw new MissingProjectIdError(); - } - value = value.replace(/{{projectId}}/g, projectId); - } - return value; -} -exports.replaceProjectIdToken = replaceProjectIdToken; -/** - * Custom error type for missing project ID errors. - */ -class MissingProjectIdError extends Error { - constructor() { - super(...arguments); - this.message = `Sorry, we cannot connect to Cloud Services without a project - ID. You may specify one with an environment variable named - "GOOGLE_CLOUD_PROJECT".`.replace(/ +/g, ' '); - } -} -exports.MissingProjectIdError = MissingProjectIdError; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 19203: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* eslint-disable prefer-rest-params */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.callbackifyAll = exports.callbackify = exports.promisifyAll = exports.promisify = void 0; -/** - * Wraps a callback style function to conditionally return a promise. - * - * @param {function} originalMethod - The method to promisify. - * @param {object=} options - Promise options. - * @param {boolean} options.singular - Resolve the promise with single arg instead of an array. - * @return {function} wrapped - */ -function promisify(originalMethod, options) { - if (originalMethod.promisified_) { - return originalMethod; - } - options = options || {}; - const slice = Array.prototype.slice; - // tslint:disable-next-line:no-any - const wrapper = function () { - let last; - for (last = arguments.length - 1; last >= 0; last--) { - const arg = arguments[last]; - if (typeof arg === 'undefined') { - continue; // skip trailing undefined. - } - if (typeof arg !== 'function') { - break; // non-callback last argument found. - } - return originalMethod.apply(this, arguments); - } - // peel trailing undefined. - const args = slice.call(arguments, 0, last + 1); - // tslint:disable-next-line:variable-name - let PromiseCtor = Promise; - // Because dedupe will likely create a single install of - // @google-cloud/common to be shared amongst all modules, we need to - // localize it at the Service level. - if (this && this.Promise) { - PromiseCtor = this.Promise; - } - return new PromiseCtor((resolve, reject) => { - // tslint:disable-next-line:no-any - args.push((...args) => { - const callbackArgs = slice.call(args); - const err = callbackArgs.shift(); - if (err) { - return reject(err); - } - if (options.singular && callbackArgs.length === 1) { - resolve(callbackArgs[0]); - } - else { - resolve(callbackArgs); - } - }); - originalMethod.apply(this, args); - }); - }; - wrapper.promisified_ = true; - return wrapper; -} -exports.promisify = promisify; -/** - * Promisifies certain Class methods. This will not promisify private or - * streaming methods. - * - * @param {module:common/service} Class - Service class. - * @param {object=} options - Configuration object. - */ -// tslint:disable-next-line:variable-name -function promisifyAll(Class, options) { - const exclude = (options && options.exclude) || []; - const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); - const methods = ownPropertyNames.filter(methodName => { - // clang-format off - return (!exclude.includes(methodName) && - typeof Class.prototype[methodName] === 'function' && // is it a function? - !/(^_|(Stream|_)|promise$)|^constructor$/.test(methodName) // is it promisable? - ); - // clang-format on - }); - methods.forEach(methodName => { - const originalMethod = Class.prototype[methodName]; - if (!originalMethod.promisified_) { - Class.prototype[methodName] = exports.promisify(originalMethod, options); - } - }); -} -exports.promisifyAll = promisifyAll; -/** - * Wraps a promisy type function to conditionally call a callback function. - * - * @param {function} originalMethod - The method to callbackify. - * @param {object=} options - Callback options. - * @param {boolean} options.singular - Pass to the callback a single arg instead of an array. - * @return {function} wrapped - */ -function callbackify(originalMethod) { - if (originalMethod.callbackified_) { - return originalMethod; - } - // tslint:disable-next-line:no-any - const wrapper = function () { - if (typeof arguments[arguments.length - 1] !== 'function') { - return originalMethod.apply(this, arguments); - } - const cb = Array.prototype.pop.call(arguments); - originalMethod.apply(this, arguments).then( - // tslint:disable-next-line:no-any - (res) => { - res = Array.isArray(res) ? res : [res]; - cb(null, ...res); - }, (err) => cb(err)); - }; - wrapper.callbackified_ = true; - return wrapper; -} -exports.callbackify = callbackify; -/** - * Callbackifies certain Class methods. This will not callbackify private or - * streaming methods. - * - * @param {module:common/service} Class - Service class. - * @param {object=} options - Configuration object. - */ -function callbackifyAll( -// tslint:disable-next-line:variable-name -Class, options) { - const exclude = (options && options.exclude) || []; - const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); - const methods = ownPropertyNames.filter(methodName => { - // clang-format off - return (!exclude.includes(methodName) && - typeof Class.prototype[methodName] === 'function' && // is it a function? - !/^_|(Stream|_)|^constructor$/.test(methodName) // is it callbackifyable? - ); - // clang-format on - }); - methods.forEach(methodName => { - const originalMethod = Class.prototype[methodName]; - if (!originalMethod.callbackified_) { - Class.prototype[methodName] = exports.callbackify(originalMethod); - } - }); -} -exports.callbackifyAll = callbackifyAll; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 44458: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); - -var _v = _interopRequireDefault(__nccwpck_require__(33542)); - -var _v2 = _interopRequireDefault(__nccwpck_require__(29411)); - -var _v3 = _interopRequireDefault(__nccwpck_require__(83424)); - -var _v4 = _interopRequireDefault(__nccwpck_require__(64051)); - -var _nil = _interopRequireDefault(__nccwpck_require__(46570)); - -var _version = _interopRequireDefault(__nccwpck_require__(35611)); - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -var _parse = _interopRequireDefault(__nccwpck_require__(99645)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), - -/***/ 84953: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('md5').update(bytes).digest(); -} - -var _default = md5; -exports["default"] = _default; - -/***/ }), - -/***/ 46570: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; - -/***/ }), - -/***/ 99645: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -var _default = parse; -exports["default"] = _default; - -/***/ }), - -/***/ 94323: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; - -/***/ }), - -/***/ 91430: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; - -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); - - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} - -/***/ }), - -/***/ 77416: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return _crypto.default.createHash('sha1').update(bytes).digest(); -} - -var _default = sha1; -exports["default"] = _default; - -/***/ }), - -/***/ 32122: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 33542: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(91430)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || (0, _stringify.default)(b); -} - -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 29411: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(74624)); - -var _md = _interopRequireDefault(__nccwpck_require__(84953)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; - -/***/ }), - -/***/ 74624: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -var _parse = _interopRequireDefault(__nccwpck_require__(99645)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} - -/***/ }), - -/***/ 83424: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _rng = _interopRequireDefault(__nccwpck_require__(91430)); - -var _stringify = _interopRequireDefault(__nccwpck_require__(32122)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function v4(options, buf, offset) { - options = options || {}; - - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return (0, _stringify.default)(rnds); -} - -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 64051: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _v = _interopRequireDefault(__nccwpck_require__(74624)); - -var _sha = _interopRequireDefault(__nccwpck_require__(77416)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; - -/***/ }), - -/***/ 20937: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _regex = _interopRequireDefault(__nccwpck_require__(94323)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} - -var _default = validate; -exports["default"] = _default; - -/***/ }), - -/***/ 35611: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; - -var _validate = _interopRequireDefault(__nccwpck_require__(20937)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -var _default = version; -exports["default"] = _default; - -/***/ }), - -/***/ 40334: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createTokenAuth: () => createTokenAuth -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/auth.js -var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; -var REGEX_IS_INSTALLATION = /^ghs_/; -var REGEX_IS_USER_TO_SERVER = /^ghu_/; -async function auth(token) { - const isApp = token.split(/\./).length === 3; - const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); - const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; - return { - type: "token", - token, - tokenType - }; -} - -// pkg/dist-src/with-authorization-prefix.js -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - return `token ${token}`; -} - -// pkg/dist-src/hook.js -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -// pkg/dist-src/index.js -var createTokenAuth = function createTokenAuth2(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 76762: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var index_exports = {}; -__export(index_exports, { - Octokit: () => Octokit -}); -module.exports = __toCommonJS(index_exports); -var import_universal_user_agent = __nccwpck_require__(45030); -var import_before_after_hook = __nccwpck_require__(83682); -var import_request = __nccwpck_require__(36234); -var import_graphql = __nccwpck_require__(88467); -var import_auth_token = __nccwpck_require__(40334); - -// pkg/dist-src/version.js -var VERSION = "5.2.1"; - -// pkg/dist-src/index.js -var noop = () => { -}; -var consoleWarn = console.warn.bind(console); -var consoleError = console.error.bind(console); -var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var Octokit = class { - static { - this.VERSION = VERSION; - } - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); - return; - } - super( - Object.assign( - {}, - defaults, - options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null - ) - ); - } - }; - return OctokitWithDefaults; - } - static { - this.plugins = []; - } - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - static plugin(...newPlugins) { - const currentPlugins = this.plugins; - const NewOctokit = class extends this { - static { - this.plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); - } - }; - return NewOctokit; - } - constructor(options = {}) { - const hook = new import_before_after_hook.Collection(); - const requestDefaults = { - baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" - } - }; - requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; - } - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; - } - this.request = import_request.request.defaults(requestDefaults); - this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); - this.hook = hook; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - const auth = (0, import_auth_token.createTokenAuth)(options.auth); - hook.wrap("request", auth.hook); - this.auth = auth; - } - } else { - const { authStrategy, ...otherOptions } = options; - const auth = authStrategy( - Object.assign( - { - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, - options.auth - ) - ); - hook.wrap("request", auth.hook); - this.auth = auth; - } - const classConstructor = this.constructor; - for (let i = 0; i < classConstructor.plugins.length; ++i) { - Object.assign(this, classConstructor.plugins[i](this, options)); - } - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 59440: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - endpoint: () => endpoint -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/defaults.js -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "9.0.6"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; - -// pkg/dist-src/util/lowercase-keys.js -function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -// pkg/dist-src/util/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/util/merge-deep.js -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} - -// pkg/dist-src/util/remove-undefined-properties.js -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} - -// pkg/dist-src/merge.js -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} - -// pkg/dist-src/util/add-query-parameters.js -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return url + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -// pkg/dist-src/util/extract-url-variable-names.js -var urlVariableRegex = /\{[^{}}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); -} - -// pkg/dist-src/util/omit.js -function omit(object, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; - } - } - return result; -} - -// pkg/dist-src/util/url-template.js -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } -} - -// pkg/dist-src/parse.js -function parse(options) { - let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format) => format.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/(? { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); - } - } - } - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} - -// pkg/dist-src/endpoint-with-defaults.js -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); - const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); - return Object.assign(endpoint2, { - DEFAULTS: DEFAULTS2, - defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), - parse - }); -} - -// pkg/dist-src/index.js -var endpoint = withDefaults(null, DEFAULTS); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 88467: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var index_exports = {}; -__export(index_exports, { - GraphqlResponseError: () => GraphqlResponseError, - graphql: () => graphql2, - withCustomRequest: () => withCustomRequest -}); -module.exports = __toCommonJS(index_exports); -var import_request3 = __nccwpck_require__(36234); -var import_universal_user_agent = __nccwpck_require__(45030); - -// pkg/dist-src/version.js -var VERSION = "7.1.1"; - -// pkg/dist-src/with-defaults.js -var import_request2 = __nccwpck_require__(36234); - -// pkg/dist-src/graphql.js -var import_request = __nccwpck_require__(36234); - -// pkg/dist-src/error.js -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors: -` + data.errors.map((e) => ` - ${e.message}`).join("\n"); -} -var GraphqlResponseError = class extends Error { - constructor(request2, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request2; - this.headers = headers; - this.response = response; - this.name = "GraphqlResponseError"; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } -}; - -// pkg/dist-src/graphql.js -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType" -]; -var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request2, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject( - new Error(`[@octokit/graphql] "query" cannot be used as variable name`) - ); - } - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; - return Promise.reject( - new Error( - `[@octokit/graphql] "${key}" cannot be used as variable name` - ) - ); - } - } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; - const requestOptions = Object.keys( - parsedOptions - ).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; - } - if (!result.variables) { - result.variables = {}; - } - result.variables[key] = parsedOptions[key]; - return result; - }, {}); - const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { - requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); - } - return request2(requestOptions).then((response) => { - if (response.data.errors) { - const headers = {}; - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; - } - throw new GraphqlResponseError( - requestOptions, - headers, - response.data - ); - } - return response.data.data; - }); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(request2, newDefaults) { - const newRequest = request2.defaults(newDefaults); - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: newRequest.endpoint - }); -} - -// pkg/dist-src/index.js -var graphql2 = withDefaults(import_request3.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 64193: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - composePaginateRest: () => composePaginateRest, - isPaginatingEndpoint: () => isPaginatingEndpoint, - paginateRest: () => paginateRest, - paginatingEndpoints: () => paginatingEndpoints -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "9.2.2"; - -// pkg/dist-src/normalize-paginated-list-response.js -function normalizePaginatedListResponse(response) { - if (!response.data) { - return { - ...response, - data: [] - }; - } - const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); - if (!responseNeedsNormalization) - return response; - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; - } - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } - response.data.total_count = totalCount; - return response; -} - -// pkg/dist-src/iterator.js -function iterator(octokit, route, parameters) { - const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); - const requestMethod = typeof route === "function" ? route : octokit.request; - const method = options.method; - const headers = options.headers; - let url = options.url; - return { - [Symbol.asyncIterator]: () => ({ - async next() { - if (!url) - return { done: true }; - try { - const response = await requestMethod({ method, url, headers }); - const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( - /<([^<>]+)>;\s*rel="next"/ - ) || [])[1]; - return { value: normalizedResponse }; - } catch (error) { - if (error.status !== 409) - throw error; - url = ""; - return { - value: { - status: 200, - headers: {}, - data: [] - } - }; - } - } - }) - }; -} - -// pkg/dist-src/paginate.js -function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = void 0; - } - return gather( - octokit, - [], - iterator(octokit, route, parameters)[Symbol.asyncIterator](), - mapFn - ); -} -function gather(octokit, results, iterator2, mapFn) { - return iterator2.next().then((result) => { - if (result.done) { - return results; - } - let earlyExit = false; - function done() { - earlyExit = true; - } - results = results.concat( - mapFn ? mapFn(result.value, done) : result.value.data - ); - if (earlyExit) { - return results; - } - return gather(octokit, results, iterator2, mapFn); - }); -} - -// pkg/dist-src/compose-paginate.js -var composePaginateRest = Object.assign(paginate, { - iterator -}); - -// pkg/dist-src/generated/paginating-endpoints.js -var paginatingEndpoints = [ - "GET /advisories", - "GET /app/hook/deliveries", - "GET /app/installation-requests", - "GET /app/installations", - "GET /assignments/{assignment_id}/accepted_assignments", - "GET /classrooms", - "GET /classrooms/{classroom_id}/assignments", - "GET /enterprises/{enterprise}/dependabot/alerts", - "GET /enterprises/{enterprise}/secret-scanning/alerts", - "GET /events", - "GET /gists", - "GET /gists/public", - "GET /gists/starred", - "GET /gists/{gist_id}/comments", - "GET /gists/{gist_id}/commits", - "GET /gists/{gist_id}/forks", - "GET /installation/repositories", - "GET /issues", - "GET /licenses", - "GET /marketplace_listing/plans", - "GET /marketplace_listing/plans/{plan_id}/accounts", - "GET /marketplace_listing/stubbed/plans", - "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", - "GET /networks/{owner}/{repo}/events", - "GET /notifications", - "GET /organizations", - "GET /orgs/{org}/actions/cache/usage-by-repository", - "GET /orgs/{org}/actions/permissions/repositories", - "GET /orgs/{org}/actions/runners", - "GET /orgs/{org}/actions/secrets", - "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", - "GET /orgs/{org}/actions/variables", - "GET /orgs/{org}/actions/variables/{name}/repositories", - "GET /orgs/{org}/blocks", - "GET /orgs/{org}/code-scanning/alerts", - "GET /orgs/{org}/codespaces", - "GET /orgs/{org}/codespaces/secrets", - "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", - "GET /orgs/{org}/copilot/billing/seats", - "GET /orgs/{org}/dependabot/alerts", - "GET /orgs/{org}/dependabot/secrets", - "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", - "GET /orgs/{org}/events", - "GET /orgs/{org}/failed_invitations", - "GET /orgs/{org}/hooks", - "GET /orgs/{org}/hooks/{hook_id}/deliveries", - "GET /orgs/{org}/installations", - "GET /orgs/{org}/invitations", - "GET /orgs/{org}/invitations/{invitation_id}/teams", - "GET /orgs/{org}/issues", - "GET /orgs/{org}/members", - "GET /orgs/{org}/members/{username}/codespaces", - "GET /orgs/{org}/migrations", - "GET /orgs/{org}/migrations/{migration_id}/repositories", - "GET /orgs/{org}/organization-roles/{role_id}/teams", - "GET /orgs/{org}/organization-roles/{role_id}/users", - "GET /orgs/{org}/outside_collaborators", - "GET /orgs/{org}/packages", - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", - "GET /orgs/{org}/personal-access-token-requests", - "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", - "GET /orgs/{org}/personal-access-tokens", - "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", - "GET /orgs/{org}/projects", - "GET /orgs/{org}/properties/values", - "GET /orgs/{org}/public_members", - "GET /orgs/{org}/repos", - "GET /orgs/{org}/rulesets", - "GET /orgs/{org}/rulesets/rule-suites", - "GET /orgs/{org}/secret-scanning/alerts", - "GET /orgs/{org}/security-advisories", - "GET /orgs/{org}/teams", - "GET /orgs/{org}/teams/{team_slug}/discussions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/invitations", - "GET /orgs/{org}/teams/{team_slug}/members", - "GET /orgs/{org}/teams/{team_slug}/projects", - "GET /orgs/{org}/teams/{team_slug}/repos", - "GET /orgs/{org}/teams/{team_slug}/teams", - "GET /projects/columns/{column_id}/cards", - "GET /projects/{project_id}/collaborators", - "GET /projects/{project_id}/columns", - "GET /repos/{owner}/{repo}/actions/artifacts", - "GET /repos/{owner}/{repo}/actions/caches", - "GET /repos/{owner}/{repo}/actions/organization-secrets", - "GET /repos/{owner}/{repo}/actions/organization-variables", - "GET /repos/{owner}/{repo}/actions/runners", - "GET /repos/{owner}/{repo}/actions/runs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", - "GET /repos/{owner}/{repo}/actions/secrets", - "GET /repos/{owner}/{repo}/actions/variables", - "GET /repos/{owner}/{repo}/actions/workflows", - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", - "GET /repos/{owner}/{repo}/activity", - "GET /repos/{owner}/{repo}/assignees", - "GET /repos/{owner}/{repo}/branches", - "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", - "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", - "GET /repos/{owner}/{repo}/code-scanning/alerts", - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", - "GET /repos/{owner}/{repo}/code-scanning/analyses", - "GET /repos/{owner}/{repo}/codespaces", - "GET /repos/{owner}/{repo}/codespaces/devcontainers", - "GET /repos/{owner}/{repo}/codespaces/secrets", - "GET /repos/{owner}/{repo}/collaborators", - "GET /repos/{owner}/{repo}/comments", - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/commits", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", - "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", - "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", - "GET /repos/{owner}/{repo}/commits/{ref}/status", - "GET /repos/{owner}/{repo}/commits/{ref}/statuses", - "GET /repos/{owner}/{repo}/contributors", - "GET /repos/{owner}/{repo}/dependabot/alerts", - "GET /repos/{owner}/{repo}/dependabot/secrets", - "GET /repos/{owner}/{repo}/deployments", - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", - "GET /repos/{owner}/{repo}/environments", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", - "GET /repos/{owner}/{repo}/events", - "GET /repos/{owner}/{repo}/forks", - "GET /repos/{owner}/{repo}/hooks", - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", - "GET /repos/{owner}/{repo}/invitations", - "GET /repos/{owner}/{repo}/issues", - "GET /repos/{owner}/{repo}/issues/comments", - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/issues/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", - "GET /repos/{owner}/{repo}/issues/{issue_number}/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", - "GET /repos/{owner}/{repo}/keys", - "GET /repos/{owner}/{repo}/labels", - "GET /repos/{owner}/{repo}/milestones", - "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", - "GET /repos/{owner}/{repo}/notifications", - "GET /repos/{owner}/{repo}/pages/builds", - "GET /repos/{owner}/{repo}/projects", - "GET /repos/{owner}/{repo}/pulls", - "GET /repos/{owner}/{repo}/pulls/comments", - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", - "GET /repos/{owner}/{repo}/releases", - "GET /repos/{owner}/{repo}/releases/{release_id}/assets", - "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", - "GET /repos/{owner}/{repo}/rules/branches/{branch}", - "GET /repos/{owner}/{repo}/rulesets", - "GET /repos/{owner}/{repo}/rulesets/rule-suites", - "GET /repos/{owner}/{repo}/secret-scanning/alerts", - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", - "GET /repos/{owner}/{repo}/security-advisories", - "GET /repos/{owner}/{repo}/stargazers", - "GET /repos/{owner}/{repo}/subscribers", - "GET /repos/{owner}/{repo}/tags", - "GET /repos/{owner}/{repo}/teams", - "GET /repos/{owner}/{repo}/topics", - "GET /repositories", - "GET /repositories/{repository_id}/environments/{environment_name}/secrets", - "GET /repositories/{repository_id}/environments/{environment_name}/variables", - "GET /search/code", - "GET /search/commits", - "GET /search/issues", - "GET /search/labels", - "GET /search/repositories", - "GET /search/topics", - "GET /search/users", - "GET /teams/{team_id}/discussions", - "GET /teams/{team_id}/discussions/{discussion_number}/comments", - "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /teams/{team_id}/discussions/{discussion_number}/reactions", - "GET /teams/{team_id}/invitations", - "GET /teams/{team_id}/members", - "GET /teams/{team_id}/projects", - "GET /teams/{team_id}/repos", - "GET /teams/{team_id}/teams", - "GET /user/blocks", - "GET /user/codespaces", - "GET /user/codespaces/secrets", - "GET /user/emails", - "GET /user/followers", - "GET /user/following", - "GET /user/gpg_keys", - "GET /user/installations", - "GET /user/installations/{installation_id}/repositories", - "GET /user/issues", - "GET /user/keys", - "GET /user/marketplace_purchases", - "GET /user/marketplace_purchases/stubbed", - "GET /user/memberships/orgs", - "GET /user/migrations", - "GET /user/migrations/{migration_id}/repositories", - "GET /user/orgs", - "GET /user/packages", - "GET /user/packages/{package_type}/{package_name}/versions", - "GET /user/public_emails", - "GET /user/repos", - "GET /user/repository_invitations", - "GET /user/social_accounts", - "GET /user/ssh_signing_keys", - "GET /user/starred", - "GET /user/subscriptions", - "GET /user/teams", - "GET /users", - "GET /users/{username}/events", - "GET /users/{username}/events/orgs/{org}", - "GET /users/{username}/events/public", - "GET /users/{username}/followers", - "GET /users/{username}/following", - "GET /users/{username}/gists", - "GET /users/{username}/gpg_keys", - "GET /users/{username}/keys", - "GET /users/{username}/orgs", - "GET /users/{username}/packages", - "GET /users/{username}/projects", - "GET /users/{username}/received_events", - "GET /users/{username}/received_events/public", - "GET /users/{username}/repos", - "GET /users/{username}/social_accounts", - "GET /users/{username}/ssh_signing_keys", - "GET /users/{username}/starred", - "GET /users/{username}/subscriptions" -]; - -// pkg/dist-src/paginating-endpoints.js -function isPaginatingEndpoint(arg) { - if (typeof arg === "string") { - return paginatingEndpoints.includes(arg); - } else { - return false; - } -} - -// pkg/dist-src/index.js -function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator.bind(null, octokit) - }) - }; -} -paginateRest.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 83044: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); @@ -42385,1257 +16758,10576 @@ var Endpoints = { updateAuthenticated: ["PATCH /user"] } }; -var endpoints_default = Endpoints; +var endpoints_default = Endpoints; + +// pkg/dist-src/endpoints-to-methods.js +var endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); + } +} +var handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); + } + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); + } + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + function withDecorations(...args) { + let options = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; + } + delete options2[name]; + } + } + return requestWithDefaults(options2); + } + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} + +// pkg/dist-src/index.js +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api + }; +} +restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; +} +legacyRestEndpointMethods.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 10537: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError +}); +module.exports = __toCommonJS(dist_src_exports); +var import_deprecation = __nccwpck_require__(58932); +var import_once = __toESM(__nccwpck_require__(1223)); +var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var RequestError = class extends Error { + constructor(message, statusCode, options) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + /(? { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + request: () => request +}); +module.exports = __toCommonJS(dist_src_exports); +var import_endpoint = __nccwpck_require__(59440); +var import_universal_user_agent = __nccwpck_require__(45030); + +// pkg/dist-src/version.js +var VERSION = "8.4.1"; + +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/fetch-wrapper.js +var import_request_error = __nccwpck_require__(10537); + +// pkg/dist-src/get-buffer-response.js +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +// pkg/dist-src/fetch-wrapper.js +function fetchWrapper(requestOptions) { + var _a, _b, _c, _d; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; + } + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + return fetch(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, + headers: requestOptions.headers, + signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new import_request_error.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: void 0 + }, + request: requestOptions + }); + } + if (status === 304) { + throw new import_request_error.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new import_request_error.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url, + headers, + data + }; + }).catch((error) => { + if (error instanceof import_request_error.RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + throw new import_request_error.RequestError(message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; + } else { + suffix = ""; + } + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + } + return `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); + } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); +} + +// pkg/dist-src/index.js +var request = withDefaults(import_endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + } +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 32206: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var EventAlgorithm_1 = __nccwpck_require__(28217); +/** + * Adds an algorithm to the given abort signal. + * + * @param algorithm - an algorithm + * @param signal - abort signal + */ +function abort_add(algorithm, signal) { + /** + * 1. If signal’s aborted flag is set, then return. + * 2. Append algorithm to signal’s abort algorithms. + */ + if (signal._abortedFlag) + return; + signal._abortAlgorithms.add(algorithm); +} +exports.abort_add = abort_add; +/** + * Removes an algorithm from the given abort signal. + * + * @param algorithm - an algorithm + * @param signal - abort signal + */ +function abort_remove(algorithm, signal) { + /** + * To remove an algorithm algorithm from an AbortSignal signal, remove + * algorithm from signal’s abort algorithms. + */ + signal._abortAlgorithms.delete(algorithm); +} +exports.abort_remove = abort_remove; +/** + * Signals abort on the given abort signal. + * + * @param signal - abort signal + */ +function abort_signalAbort(signal) { + var e_1, _a; + /** + * 1. If signal’s aborted flag is set, then return. + * 2. Set signal’s aborted flag. + * 3. For each algorithm in signal’s abort algorithms: run algorithm. + * 4. Empty signal’s abort algorithms. + * 5. Fire an event named abort at signal. + */ + if (signal._abortedFlag) + return; + signal._abortedFlag = true; + try { + for (var _b = __values(signal._abortAlgorithms), _c = _b.next(); !_c.done; _c = _b.next()) { + var algorithm = _c.value; + algorithm.call(signal); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + signal._abortAlgorithms.clear(); + EventAlgorithm_1.event_fireAnEvent("abort", signal); +} +exports.abort_signalAbort = abort_signalAbort; +//# sourceMappingURL=AbortAlgorithm.js.map + +/***/ }), + +/***/ 84309: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ElementAlgorithm_1 = __nccwpck_require__(51849); +/** + * Changes the value of an existing attribute. + * + * @param attribute - an attribute node + * @param value - attribute value + */ +function attr_setAnExistingAttributeValue(attribute, value) { + /** + * 1. If attribute’s element is null, then set attribute’s value to value. + * 2. Otherwise, change attribute from attribute’s element to value. + */ + if (attribute._element === null) { + attribute._value = value; + } + else { + ElementAlgorithm_1.element_change(attribute, attribute._element, value); + } +} +exports.attr_setAnExistingAttributeValue = attr_setAnExistingAttributeValue; +//# sourceMappingURL=AttrAlgorithm.js.map + +/***/ }), + +/***/ 81054: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +/** + * Defines the position of a boundary point relative to another. + * + * @param bp - a boundary point + * @param relativeTo - a boundary point to compare to + */ +function boundaryPoint_position(bp, relativeTo) { + var nodeA = bp[0]; + var offsetA = bp[1]; + var nodeB = relativeTo[0]; + var offsetB = relativeTo[1]; + /** + * 1. Assert: nodeA and nodeB have the same root. + */ + console.assert(TreeAlgorithm_1.tree_rootNode(nodeA) === TreeAlgorithm_1.tree_rootNode(nodeB), "Boundary points must share the same root node."); + /** + * 2. If nodeA is nodeB, then return equal if offsetA is offsetB, before + * if offsetA is less than offsetB, and after if offsetA is greater than + * offsetB. + */ + if (nodeA === nodeB) { + if (offsetA === offsetB) { + return interfaces_1.BoundaryPosition.Equal; + } + else if (offsetA < offsetB) { + return interfaces_1.BoundaryPosition.Before; + } + else { + return interfaces_1.BoundaryPosition.After; + } + } + /** + * 3. If nodeA is following nodeB, then if the position of (nodeB, offsetB) + * relative to (nodeA, offsetA) is before, return after, and if it is after, + * return before. + */ + if (TreeAlgorithm_1.tree_isFollowing(nodeB, nodeA)) { + var pos = boundaryPoint_position([nodeB, offsetB], [nodeA, offsetA]); + if (pos === interfaces_1.BoundaryPosition.Before) { + return interfaces_1.BoundaryPosition.After; + } + else if (pos === interfaces_1.BoundaryPosition.After) { + return interfaces_1.BoundaryPosition.Before; + } + } + /** + * 4. If nodeA is an ancestor of nodeB: + */ + if (TreeAlgorithm_1.tree_isAncestorOf(nodeB, nodeA)) { + /** + * 4.1. Let child be nodeB. + * 4.2. While child is not a child of nodeA, set child to its parent. + * 4.3. If child’s index is less than offsetA, then return after. + */ + var child = nodeB; + while (!TreeAlgorithm_1.tree_isChildOf(nodeA, child)) { + /* istanbul ignore else */ + if (child._parent !== null) { + child = child._parent; + } + } + if (TreeAlgorithm_1.tree_index(child) < offsetA) { + return interfaces_1.BoundaryPosition.After; + } + } + /** + * 5. Return before. + */ + return interfaces_1.BoundaryPosition.Before; +} +exports.boundaryPoint_position = boundaryPoint_position; +//# sourceMappingURL=BoundaryPointAlgorithm.js.map + +/***/ }), + +/***/ 19461: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(65282); +var DOMException_1 = __nccwpck_require__(13166); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); +var DOMAlgorithm_1 = __nccwpck_require__(9628); +/** + * Replaces character data. + * + * @param node - a character data node + * @param offset - start offset + * @param count - count of characters to replace + * @param data - new data + */ +function characterData_replaceData(node, offset, count, data) { + var e_1, _a; + /** + * 1. Let length be node’s length. + * 2. If offset is greater than length, then throw an "IndexSizeError" + * DOMException. + * 3. If offset plus count is greater than length, then set count to length + * minus offset. + */ + var length = TreeAlgorithm_1.tree_nodeLength(node); + if (offset > length) { + throw new DOMException_1.IndexSizeError("Offset exceeds character data length. Offset: " + offset + ", Length: " + length + ", Node is " + node.nodeName + "."); + } + if (offset + count > length) { + count = length - offset; + } + /** + * 4. Queue a mutation record of "characterData" for node with null, null, + * node’s data, « », « », null, and null. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + MutationObserverAlgorithm_1.observer_queueMutationRecord("characterData", node, null, null, node._data, [], [], null, null); + } + /** + * 5. Insert data into node’s data after offset code units. + * 6. Let delete offset be offset + data’s length. + * 7. Starting from delete offset code units, remove count code units from + * node’s data. + */ + var newData = node._data.substring(0, offset) + data + + node._data.substring(offset + count); + node._data = newData; + try { + /** + * 8. For each live range whose start node is node and start offset is + * greater than offset but less than or equal to offset plus count, set its + * start offset to offset. + * 9. For each live range whose end node is node and end offset is greater + * than offset but less than or equal to offset plus count, set its end + * offset to offset. + * 10. For each live range whose start node is node and start offset is + * greater than offset plus count, increase its start offset by data’s + * length and decrease it by count. + * 11. For each live range whose end node is node and end offset is greater + * than offset plus count, increase its end offset by data’s length and + * decrease it by count. + */ + for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) { + var range = _c.value; + if (range._start[0] === node && range._start[1] > offset && range._start[1] <= offset + count) { + range._start[1] = offset; + } + if (range._end[0] === node && range._end[1] > offset && range._end[1] <= offset + count) { + range._end[1] = offset; + } + if (range._start[0] === node && range._start[1] > offset + count) { + range._start[1] += data.length - count; + } + if (range._end[0] === node && range._end[1] > offset + count) { + range._end[1] += data.length - count; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + /** + * 12. If node is a Text node and its parent is not null, run the child + * text content change steps for node’s parent. + */ + if (DOMImpl_1.dom.features.steps) { + if (util_1.Guard.isTextNode(node) && node._parent !== null) { + DOMAlgorithm_1.dom_runChildTextContentChangeSteps(node._parent); + } + } +} +exports.characterData_replaceData = characterData_replaceData; +/** + * Returns `count` number of characters from `node`'s data starting at + * the given `offset`. + * + * @param node - a character data node + * @param offset - start offset + * @param count - count of characters to return + */ +function characterData_substringData(node, offset, count) { + /** + * 1. Let length be node’s length. + * 2. If offset is greater than length, then throw an "IndexSizeError" + * DOMException. + * 3. If offset plus count is greater than length, return a string whose + * value is the code units from the offsetth code unit to the end of node’s + * data, and then return. + * 4. Return a string whose value is the code units from the offsetth code + * unit to the offset+countth code unit in node’s data. + */ + var length = TreeAlgorithm_1.tree_nodeLength(node); + if (offset > length) { + throw new DOMException_1.IndexSizeError("Offset exceeds character data length. Offset: " + offset + ", Length: " + length + ", Node is " + node.nodeName + "."); + } + if (offset + count > length) { + return node._data.substr(offset); + } + else { + return node._data.substr(offset, count); + } +} +exports.characterData_substringData = characterData_substringData; +//# sourceMappingURL=CharacterDataAlgorithm.js.map + +/***/ }), + +/***/ 57339: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImplementationImpl_1 = __nccwpck_require__(42197); +var WindowImpl_1 = __nccwpck_require__(69067); +var XMLDocumentImpl_1 = __nccwpck_require__(21685); +var DocumentImpl_1 = __nccwpck_require__(14333); +var AbortControllerImpl_1 = __nccwpck_require__(66461); +var AbortSignalImpl_1 = __nccwpck_require__(10022); +var DocumentTypeImpl_1 = __nccwpck_require__(3173); +var ElementImpl_1 = __nccwpck_require__(35975); +var DocumentFragmentImpl_1 = __nccwpck_require__(12585); +var ShadowRootImpl_1 = __nccwpck_require__(61911); +var AttrImpl_1 = __nccwpck_require__(13717); +var TextImpl_1 = __nccwpck_require__(42191); +var CDATASectionImpl_1 = __nccwpck_require__(23977); +var CommentImpl_1 = __nccwpck_require__(20930); +var ProcessingInstructionImpl_1 = __nccwpck_require__(99430); +var HTMLCollectionImpl_1 = __nccwpck_require__(93969); +var NodeListImpl_1 = __nccwpck_require__(43728); +var NodeListStaticImpl_1 = __nccwpck_require__(65306); +var NamedNodeMapImpl_1 = __nccwpck_require__(57206); +var RangeImpl_1 = __nccwpck_require__(50166); +var NodeIteratorImpl_1 = __nccwpck_require__(61997); +var TreeWalkerImpl_1 = __nccwpck_require__(89261); +var NodeFilterImpl_1 = __nccwpck_require__(12355); +var MutationRecordImpl_1 = __nccwpck_require__(6219); +var DOMTokenListImpl_1 = __nccwpck_require__(65096); +/** + * Creates a `DOMImplementation`. + * + * @param document - associated document + */ +function create_domImplementation(document) { + return DOMImplementationImpl_1.DOMImplementationImpl._create(document); +} +exports.create_domImplementation = create_domImplementation; +/** + * Creates a `Window` node. + */ +function create_window() { + return WindowImpl_1.WindowImpl._create(); +} +exports.create_window = create_window; +/** + * Creates an `XMLDocument` node. + */ +function create_xmlDocument() { + return new XMLDocumentImpl_1.XMLDocumentImpl(); +} +exports.create_xmlDocument = create_xmlDocument; +/** + * Creates a `Document` node. + */ +function create_document() { + return new DocumentImpl_1.DocumentImpl(); +} +exports.create_document = create_document; +/** + * Creates an `AbortController`. + */ +function create_abortController() { + return new AbortControllerImpl_1.AbortControllerImpl(); +} +exports.create_abortController = create_abortController; +/** + * Creates an `AbortSignal`. + */ +function create_abortSignal() { + return AbortSignalImpl_1.AbortSignalImpl._create(); +} +exports.create_abortSignal = create_abortSignal; +/** + * Creates a `DocumentType` node. + * + * @param document - owner document + * @param name - name of the node + * @param publicId - `PUBLIC` identifier + * @param systemId - `SYSTEM` identifier + */ +function create_documentType(document, name, publicId, systemId) { + return DocumentTypeImpl_1.DocumentTypeImpl._create(document, name, publicId, systemId); +} +exports.create_documentType = create_documentType; +/** + * Creates a new `Element` node. + * + * @param document - owner document + * @param localName - local name + * @param namespace - namespace + * @param prefix - namespace prefix + */ +function create_element(document, localName, namespace, prefix) { + return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix); +} +exports.create_element = create_element; +/** + * Creates a new `HTMLElement` node. + * + * @param document - owner document + * @param localName - local name + * @param namespace - namespace + * @param prefix - namespace prefix + */ +function create_htmlElement(document, localName, namespace, prefix) { + // TODO: Implement in HTML DOM + return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix); +} +exports.create_htmlElement = create_htmlElement; +/** + * Creates a new `HTMLUnknownElement` node. + * + * @param document - owner document + * @param localName - local name + * @param namespace - namespace + * @param prefix - namespace prefix + */ +function create_htmlUnknownElement(document, localName, namespace, prefix) { + // TODO: Implement in HTML DOM + return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix); +} +exports.create_htmlUnknownElement = create_htmlUnknownElement; +/** + * Creates a new `DocumentFragment` node. + * + * @param document - owner document + */ +function create_documentFragment(document) { + return DocumentFragmentImpl_1.DocumentFragmentImpl._create(document); +} +exports.create_documentFragment = create_documentFragment; +/** + * Creates a new `ShadowRoot` node. + * + * @param document - owner document + * @param host - shadow root's host element node + */ +function create_shadowRoot(document, host) { + return ShadowRootImpl_1.ShadowRootImpl._create(document, host); +} +exports.create_shadowRoot = create_shadowRoot; +/** + * Creates a new `Attr` node. + * + * @param document - owner document + * @param localName - local name + */ +function create_attr(document, localName) { + return AttrImpl_1.AttrImpl._create(document, localName); +} +exports.create_attr = create_attr; +/** + * Creates a new `Text` node. + * + * @param document - owner document + * @param data - node contents + */ +function create_text(document, data) { + return TextImpl_1.TextImpl._create(document, data); +} +exports.create_text = create_text; +/** + * Creates a new `CDATASection` node. + * + * @param document - owner document + * @param data - node contents + */ +function create_cdataSection(document, data) { + return CDATASectionImpl_1.CDATASectionImpl._create(document, data); +} +exports.create_cdataSection = create_cdataSection; +/** + * Creates a new `Comment` node. + * + * @param document - owner document + * @param data - node contents + */ +function create_comment(document, data) { + return CommentImpl_1.CommentImpl._create(document, data); +} +exports.create_comment = create_comment; +/** + * Creates a new `ProcessingInstruction` node. + * + * @param document - owner document + * @param target - instruction target + * @param data - node contents + */ +function create_processingInstruction(document, target, data) { + return ProcessingInstructionImpl_1.ProcessingInstructionImpl._create(document, target, data); +} +exports.create_processingInstruction = create_processingInstruction; +/** + * Creates a new `HTMLCollection`. + * + * @param root - root node + * @param filter - node filter + */ +function create_htmlCollection(root, filter) { + if (filter === void 0) { filter = (function () { return true; }); } + return HTMLCollectionImpl_1.HTMLCollectionImpl._create(root, filter); +} +exports.create_htmlCollection = create_htmlCollection; +/** + * Creates a new live `NodeList`. + * + * @param root - root node + */ +function create_nodeList(root) { + return NodeListImpl_1.NodeListImpl._create(root); +} +exports.create_nodeList = create_nodeList; +/** + * Creates a new static `NodeList`. + * + * @param root - root node + * @param items - a list of items to initialize the list + */ +function create_nodeListStatic(root, items) { + return NodeListStaticImpl_1.NodeListStaticImpl._create(root, items); +} +exports.create_nodeListStatic = create_nodeListStatic; +/** + * Creates a new `NamedNodeMap`. + * + * @param element - parent element + */ +function create_namedNodeMap(element) { + return NamedNodeMapImpl_1.NamedNodeMapImpl._create(element); +} +exports.create_namedNodeMap = create_namedNodeMap; +/** + * Creates a new `Range`. + * + * @param start - start point + * @param end - end point + */ +function create_range(start, end) { + return RangeImpl_1.RangeImpl._create(start, end); +} +exports.create_range = create_range; +/** + * Creates a new `NodeIterator`. + * + * @param root - iterator's root node + * @param reference - reference node + * @param pointerBeforeReference - whether the iterator is before or after the + * reference node + */ +function create_nodeIterator(root, reference, pointerBeforeReference) { + return NodeIteratorImpl_1.NodeIteratorImpl._create(root, reference, pointerBeforeReference); +} +exports.create_nodeIterator = create_nodeIterator; +/** + * Creates a new `TreeWalker`. + * + * @param root - iterator's root node + * @param current - current node + */ +function create_treeWalker(root, current) { + return TreeWalkerImpl_1.TreeWalkerImpl._create(root, current); +} +exports.create_treeWalker = create_treeWalker; +/** + * Creates a new `NodeFilter`. + */ +function create_nodeFilter() { + return NodeFilterImpl_1.NodeFilterImpl._create(); +} +exports.create_nodeFilter = create_nodeFilter; +/** + * Creates a new `MutationRecord`. + * + * @param type - type of mutation: `"attributes"` for an attribute + * mutation, `"characterData"` for a mutation to a CharacterData node + * and `"childList"` for a mutation to the tree of nodes. + * @param target - node affected by the mutation. + * @param addedNodes - list of added nodes. + * @param removedNodes - list of removed nodes. + * @param previousSibling - previous sibling of added or removed nodes. + * @param nextSibling - next sibling of added or removed nodes. + * @param attributeName - local name of the changed attribute, + * and `null` otherwise. + * @param attributeNamespace - namespace of the changed attribute, + * and `null` otherwise. + * @param oldValue - value before mutation: attribute value for an attribute + * mutation, node `data` for a mutation to a CharacterData node and `null` + * for a mutation to the tree of nodes. + */ +function create_mutationRecord(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) { + return MutationRecordImpl_1.MutationRecordImpl._create(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue); +} +exports.create_mutationRecord = create_mutationRecord; +/** + * Creates a new `DOMTokenList`. + * + * @param element - associated element + * @param attribute - associated attribute + */ +function create_domTokenList(element, attribute) { + return DOMTokenListImpl_1.DOMTokenListImpl._create(element, attribute); +} +exports.create_domTokenList = create_domTokenList; +//# sourceMappingURL=CreateAlgorithm.js.map + +/***/ }), + +/***/ 35648: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var PotentialCustomElementName = /[a-z]([\0-\t\x2D\._a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*-([\0-\t\x2D\._a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*/; +var NamesWithHyphen = new Set(['annotation-xml', 'color-profile', + 'font-face', 'font-face-src', 'font-face-uri', 'font-face-format', + 'font-face-name', 'missing-glyph']); +var ElementNames = new Set(['article', 'aside', 'blockquote', + 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', + 'header', 'main', 'nav', 'p', 'section', 'span']); +var VoidElementNames = new Set(['area', 'base', 'basefont', + 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', + 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); +var ShadowHostNames = new Set(['article', 'aside', 'blockquote', 'body', + 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', + 'nav', 'p', 'section', 'span']); +/** + * Determines if the given string is a valid custom element name. + * + * @param name - a name string + */ +function customElement_isValidCustomElementName(name) { + if (!PotentialCustomElementName.test(name)) + return false; + if (NamesWithHyphen.has(name)) + return false; + return true; +} +exports.customElement_isValidCustomElementName = customElement_isValidCustomElementName; +/** + * Determines if the given string is a valid element name. + * + * @param name - a name string + */ +function customElement_isValidElementName(name) { + return (ElementNames.has(name)); +} +exports.customElement_isValidElementName = customElement_isValidElementName; +/** + * Determines if the given string is a void element name. + * + * @param name - a name string + */ +function customElement_isVoidElementName(name) { + return (VoidElementNames.has(name)); +} +exports.customElement_isVoidElementName = customElement_isVoidElementName; +/** + * Determines if the given string is a valid shadow host element name. + * + * @param name - a name string + */ +function customElement_isValidShadowHostName(name) { + return (ShadowHostNames.has(name)); +} +exports.customElement_isValidShadowHostName = customElement_isValidShadowHostName; +/** + * Enqueues an upgrade reaction for a custom element. + * + * @param element - a custom element + * @param definition - a custom element definition + */ +function customElement_enqueueACustomElementUpgradeReaction(element, definition) { + // TODO: Implement in HTML DOM +} +exports.customElement_enqueueACustomElementUpgradeReaction = customElement_enqueueACustomElementUpgradeReaction; +/** + * Enqueues a callback reaction for a custom element. + * + * @param element - a custom element + * @param callbackName - name of the callback + * @param args - callback arguments + */ +function customElement_enqueueACustomElementCallbackReaction(element, callbackName, args) { + // TODO: Implement in HTML DOM +} +exports.customElement_enqueueACustomElementCallbackReaction = customElement_enqueueACustomElementCallbackReaction; +/** + * Upgrade a custom element. + * + * @param element - a custom element + */ +function customElement_upgrade(definition, element) { + // TODO: Implement in HTML DOM +} +exports.customElement_upgrade = customElement_upgrade; +/** + * Tries to upgrade a custom element. + * + * @param element - a custom element + */ +function customElement_tryToUpgrade(element) { + // TODO: Implement in HTML DOM +} +exports.customElement_tryToUpgrade = customElement_tryToUpgrade; +/** + * Looks up a custom element definition. + * + * @param document - a document + * @param namespace - element namespace + * @param localName - element local name + * @param is - an `is` value + */ +function customElement_lookUpACustomElementDefinition(document, namespace, localName, is) { + // TODO: Implement in HTML DOM + return null; +} +exports.customElement_lookUpACustomElementDefinition = customElement_lookUpACustomElementDefinition; +//# sourceMappingURL=CustomElementAlgorithm.js.map + +/***/ }), + +/***/ 9628: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var util_1 = __nccwpck_require__(65282); +var ShadowTreeAlgorithm_1 = __nccwpck_require__(68733); +var supportedTokens = new Map(); +/** + * Runs removing steps for node. + * + * @param removedNode - removed node + * @param oldParent - old parent node + */ +function dom_runRemovingSteps(removedNode, oldParent) { + // No steps defined +} +exports.dom_runRemovingSteps = dom_runRemovingSteps; +/** + * Runs cloning steps for node. + * + * @param copy - node clone + * @param node - node + * @param document - document to own the cloned node + * @param cloneChildrenFlag - whether child nodes are cloned + */ +function dom_runCloningSteps(copy, node, document, cloneChildrenFlag) { + // No steps defined +} +exports.dom_runCloningSteps = dom_runCloningSteps; +/** + * Runs adopting steps for node. + * + * @param node - node + * @param oldDocument - old document + */ +function dom_runAdoptingSteps(node, oldDocument) { + // No steps defined +} +exports.dom_runAdoptingSteps = dom_runAdoptingSteps; +/** + * Runs attribute change steps for an element node. + * + * @param element - element node owning the attribute + * @param localName - attribute's local name + * @param oldValue - attribute's old value + * @param value - attribute's new value + * @param namespace - attribute's namespace + */ +function dom_runAttributeChangeSteps(element, localName, oldValue, value, namespace) { + var e_1, _a; + // run default steps + if (DOMImpl_1.dom.features.slots) { + updateASlotablesName.call(element, element, localName, oldValue, value, namespace); + updateASlotsName.call(element, element, localName, oldValue, value, namespace); + } + updateAnElementID.call(element, element, localName, value, namespace); + try { + // run custom steps + for (var _b = __values(element._attributeChangeSteps), _c = _b.next(); !_c.done; _c = _b.next()) { + var step = _c.value; + step.call(element, element, localName, oldValue, value, namespace); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } +} +exports.dom_runAttributeChangeSteps = dom_runAttributeChangeSteps; +/** + * Runs insertion steps for a node. + * + * @param insertedNode - inserted node + */ +function dom_runInsertionSteps(insertedNode) { + // No steps defined +} +exports.dom_runInsertionSteps = dom_runInsertionSteps; +/** + * Runs pre-removing steps for a node iterator and node. + * + * @param nodeIterator - a node iterator + * @param toBeRemoved - node to be removed + */ +function dom_runNodeIteratorPreRemovingSteps(nodeIterator, toBeRemoved) { + removeNodeIterator.call(nodeIterator, nodeIterator, toBeRemoved); +} +exports.dom_runNodeIteratorPreRemovingSteps = dom_runNodeIteratorPreRemovingSteps; +/** + * Determines if there are any supported tokens defined for the given + * attribute name. + * + * @param attributeName - an attribute name + */ +function dom_hasSupportedTokens(attributeName) { + return supportedTokens.has(attributeName); +} +exports.dom_hasSupportedTokens = dom_hasSupportedTokens; +/** + * Returns the set of supported tokens defined for the given attribute name. + * + * @param attributeName - an attribute name + */ +function dom_getSupportedTokens(attributeName) { + return supportedTokens.get(attributeName) || new Set(); +} +exports.dom_getSupportedTokens = dom_getSupportedTokens; +/** + * Runs event construction steps. + * + * @param event - an event + */ +function dom_runEventConstructingSteps(event) { + // No steps defined +} +exports.dom_runEventConstructingSteps = dom_runEventConstructingSteps; +/** + * Runs child text content change steps for a parent node. + * + * @param parent - parent node with text node child nodes + */ +function dom_runChildTextContentChangeSteps(parent) { + // No steps defined +} +exports.dom_runChildTextContentChangeSteps = dom_runChildTextContentChangeSteps; +/** + * Defines pre-removing steps for a node iterator. + */ +function removeNodeIterator(nodeIterator, toBeRemovedNode) { + /** + * 1. If toBeRemovedNode is not an inclusive ancestor of nodeIterator’s + * reference, or toBeRemovedNode is nodeIterator’s root, then return. + */ + if (toBeRemovedNode === nodeIterator._root || + !TreeAlgorithm_1.tree_isAncestorOf(nodeIterator._reference, toBeRemovedNode, true)) { + return; + } + /** + * 2. If nodeIterator’s pointer before reference is true, then: + */ + if (nodeIterator._pointerBeforeReference) { + /** + * 2.1. Let next be toBeRemovedNode’s first following node that is an + * inclusive descendant of nodeIterator’s root and is not an inclusive + * descendant of toBeRemovedNode, and null if there is no such node. + */ + while (true) { + var nextNode = TreeAlgorithm_1.tree_getFollowingNode(nodeIterator._root, toBeRemovedNode); + if (nextNode !== null && + TreeAlgorithm_1.tree_isDescendantOf(nodeIterator._root, nextNode, true) && + !TreeAlgorithm_1.tree_isDescendantOf(toBeRemovedNode, nextNode, true)) { + /** + * 2.2. If next is non-null, then set nodeIterator’s reference to next + * and return. + */ + nodeIterator._reference = nextNode; + return; + } + else if (nextNode === null) { + /** + * 2.3. Otherwise, set nodeIterator’s pointer before reference to false. + */ + nodeIterator._pointerBeforeReference = false; + return; + } + } + } + /** + * 3. Set nodeIterator’s reference to toBeRemovedNode’s parent, if + * toBeRemovedNode’s previous sibling is null, and to the inclusive + * descendant of toBeRemovedNode’s previous sibling that appears last in + * tree order otherwise. + */ + if (toBeRemovedNode._previousSibling === null) { + if (toBeRemovedNode._parent !== null) { + nodeIterator._reference = toBeRemovedNode._parent; + } + } + else { + var referenceNode = toBeRemovedNode._previousSibling; + var childNode = TreeAlgorithm_1.tree_getFirstDescendantNode(toBeRemovedNode._previousSibling, true, false); + while (childNode !== null) { + if (childNode !== null) { + referenceNode = childNode; + } + // loop through to get the last descendant node + childNode = TreeAlgorithm_1.tree_getNextDescendantNode(toBeRemovedNode._previousSibling, childNode, true, false); + } + nodeIterator._reference = referenceNode; + } +} +/** + * Defines attribute change steps to update a slot’s name. + */ +function updateASlotsName(element, localName, oldValue, value, namespace) { + /** + * 1. If element is a slot, localName is name, and namespace is null, then: + * 1.1. If value is oldValue, then return. + * 1.2. If value is null and oldValue is the empty string, then return. + * 1.3. If value is the empty string and oldValue is null, then return. + * 1.4. If value is null or the empty string, then set element’s name to the + * empty string. + * 1.5. Otherwise, set element’s name to value. + * 1.6. Run assign slotables for a tree with element’s root. + */ + if (util_1.Guard.isSlot(element) && localName === "name" && namespace === null) { + if (value === oldValue) + return; + if (value === null && oldValue === '') + return; + if (value === '' && oldValue === null) + return; + if ((value === null || value === '')) { + element._name = ''; + } + else { + element._name = value; + } + ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(element)); + } +} +/** + * Defines attribute change steps to update a slotable’s name. + */ +function updateASlotablesName(element, localName, oldValue, value, namespace) { + /** + * 1. If localName is slot and namespace is null, then: + * 1.1. If value is oldValue, then return. + * 1.2. If value is null and oldValue is the empty string, then return. + * 1.3. If value is the empty string and oldValue is null, then return. + * 1.4. If value is null or the empty string, then set element’s name to + * the empty string. + * 1.5. Otherwise, set element’s name to value. + * 1.6. If element is assigned, then run assign slotables for element’s + * assigned slot. + * 1.7. Run assign a slot for element. + */ + if (util_1.Guard.isSlotable(element) && localName === "slot" && namespace === null) { + if (value === oldValue) + return; + if (value === null && oldValue === '') + return; + if (value === '' && oldValue === null) + return; + if ((value === null || value === '')) { + element._name = ''; + } + else { + element._name = value; + } + if (ShadowTreeAlgorithm_1.shadowTree_isAssigned(element)) { + ShadowTreeAlgorithm_1.shadowTree_assignSlotables(element._assignedSlot); + } + ShadowTreeAlgorithm_1.shadowTree_assignASlot(element); + } +} +/** + * Defines attribute change steps to update an element's ID. + */ +function updateAnElementID(element, localName, value, namespace) { + /** + * 1. If localName is id, namespace is null, and value is null or the empty + * string, then unset element’s ID. + * 2. Otherwise, if localName is id, namespace is null, then set element’s + * ID to value. + */ + if (localName === "id" && namespace === null) { + if (!value) + element._uniqueIdentifier = undefined; + else + element._uniqueIdentifier = value; + } +} +//# sourceMappingURL=DOMAlgorithm.js.map + +/***/ }), + +/***/ 93261: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var OrderedSetAlgorithm_1 = __nccwpck_require__(53670); +var DOMAlgorithm_1 = __nccwpck_require__(9628); +var ElementAlgorithm_1 = __nccwpck_require__(51849); +/** + * Validates a given token against the supported tokens defined for the given + * token lists' associated attribute. + * + * @param tokenList - a token list + * @param token - a token + */ +function tokenList_validationSteps(tokenList, token) { + /** + * 1. If the associated attribute’s local name does not define supported + * tokens, throw a TypeError. + * 2. Let lowercase token be a copy of token, in ASCII lowercase. + * 3. If lowercase token is present in supported tokens, return true. + * 4. Return false. + */ + if (!DOMAlgorithm_1.dom_hasSupportedTokens(tokenList._attribute._localName)) { + throw new TypeError("There are no supported tokens defined for attribute name: '" + tokenList._attribute._localName + "'."); + } + return DOMAlgorithm_1.dom_getSupportedTokens(tokenList._attribute._localName).has(token.toLowerCase()); +} +exports.tokenList_validationSteps = tokenList_validationSteps; +/** + * Updates the value of the token lists' associated attribute. + * + * @param tokenList - a token list + */ +function tokenList_updateSteps(tokenList) { + /** + * 1. If the associated element does not have an associated attribute and + * token set is empty, then return. + * 2. Set an attribute value for the associated element using associated + * attribute’s local name and the result of running the ordered set + * serializer for token set. + */ + if (!tokenList._element.hasAttribute(tokenList._attribute._localName) && + tokenList._tokenSet.size === 0) { + return; + } + ElementAlgorithm_1.element_setAnAttributeValue(tokenList._element, tokenList._attribute._localName, OrderedSetAlgorithm_1.orderedSet_serialize(tokenList._tokenSet)); +} +exports.tokenList_updateSteps = tokenList_updateSteps; +/** + * Gets the value of the token lists' associated attribute. + * + * @param tokenList - a token list + */ +function tokenList_serializeSteps(tokenList) { + /** + * A DOMTokenList object’s serialize steps are to return the result of + * running get an attribute value given the associated element and the + * associated attribute’s local name. + */ + return ElementAlgorithm_1.element_getAnAttributeValue(tokenList._element, tokenList._attribute._localName); +} +exports.tokenList_serializeSteps = tokenList_serializeSteps; +//# sourceMappingURL=DOMTokenListAlgorithm.js.map + +/***/ }), + +/***/ 12793: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(65282); +var util_2 = __nccwpck_require__(76195); +var ElementImpl_1 = __nccwpck_require__(35975); +var CustomElementAlgorithm_1 = __nccwpck_require__(35648); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var NamespaceAlgorithm_1 = __nccwpck_require__(35856); +var DOMAlgorithm_1 = __nccwpck_require__(9628); +var ElementAlgorithm_1 = __nccwpck_require__(51849); +var MutationAlgorithm_1 = __nccwpck_require__(45463); +/** + * Returns an element interface for the given name and namespace. + * + * @param name - element name + * @param namespace - namespace + */ +function document_elementInterface(name, namespace) { + return ElementImpl_1.ElementImpl; +} +exports.document_elementInterface = document_elementInterface; +/** + * Creates a new element node. + * See: https://dom.spec.whatwg.org/#internal-createelementns-steps + * + * @param document - owner document + * @param namespace - element namespace + * @param qualifiedName - qualified name + * @param options - element options + */ +function document_internalCreateElementNS(document, namespace, qualifiedName, options) { + /** + * 1. Let namespace, prefix, and localName be the result of passing + * namespace and qualifiedName to validate and extract. + * 2. Let is be null. + * 3. If options is a dictionary and options’s is is present, then set + * is to it. + * 4. Return the result of creating an element given document, localName, + * namespace, prefix, is, and with the synchronous custom elements flag set. + */ + var _a = __read(NamespaceAlgorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2]; + var is = null; + if (options !== undefined) { + if (util_2.isString(options)) { + is = options; + } + else { + is = options.is; + } + } + return ElementAlgorithm_1.element_createAnElement(document, localName, ns, prefix, is, true); +} +exports.document_internalCreateElementNS = document_internalCreateElementNS; +/** + * Removes `node` and its subtree from its document and changes + * its owner document to `document` so that it can be inserted + * into `document`. + * + * @param node - the node to move + * @param document - document to receive the node and its subtree + */ +function document_adopt(node, document) { + var e_1, _a; + // Optimize for common case of inserting a fresh node + if (node._nodeDocument === document && node._parent === null) { + return; + } + /** + * 1. Let oldDocument be node’s node document. + * 2. If node’s parent is not null, remove node from its parent. + */ + var oldDocument = node._nodeDocument; + if (node._parent) + MutationAlgorithm_1.mutation_remove(node, node._parent); + /** + * 3. If document is not oldDocument, then: + */ + if (document !== oldDocument) { + /** + * 3.1. For each inclusiveDescendant in node’s shadow-including inclusive + * descendants: + */ + var inclusiveDescendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node, true, true); + while (inclusiveDescendant !== null) { + /** + * 3.1.1. Set inclusiveDescendant’s node document to document. + * 3.1.2. If inclusiveDescendant is an element, then set the node + * document of each attribute in inclusiveDescendant’s attribute list + * to document. + */ + inclusiveDescendant._nodeDocument = document; + if (util_1.Guard.isElementNode(inclusiveDescendant)) { + try { + for (var _b = (e_1 = void 0, __values(inclusiveDescendant._attributeList._asArray())), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + attr._nodeDocument = document; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + /** + * 3.2. For each inclusiveDescendant in node's shadow-including + * inclusive descendants that is custom, enqueue a custom + * element callback reaction with inclusiveDescendant, + * callback name "adoptedCallback", and an argument list + * containing oldDocument and document. + */ + if (DOMImpl_1.dom.features.customElements) { + if (util_1.Guard.isElementNode(inclusiveDescendant) && + inclusiveDescendant._customElementState === "custom") { + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(inclusiveDescendant, "adoptedCallback", [oldDocument, document]); + } + } + /** + * 3.3. For each inclusiveDescendant in node’s shadow-including + * inclusive descendants, in shadow-including tree order, run the + * adopting steps with inclusiveDescendant and oldDocument. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runAdoptingSteps(inclusiveDescendant, oldDocument); + } + inclusiveDescendant = TreeAlgorithm_1.tree_getNextDescendantNode(node, inclusiveDescendant, true, true); + } + } +} +exports.document_adopt = document_adopt; +//# sourceMappingURL=DocumentAlgorithm.js.map + +/***/ }), + +/***/ 51849: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var infra_1 = __nccwpck_require__(84251); +var util_1 = __nccwpck_require__(65282); +var DOMException_1 = __nccwpck_require__(13166); +var CreateAlgorithm_1 = __nccwpck_require__(57339); +var CustomElementAlgorithm_1 = __nccwpck_require__(35648); +var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); +var DOMAlgorithm_1 = __nccwpck_require__(9628); +var MutationAlgorithm_1 = __nccwpck_require__(45463); +var DocumentAlgorithm_1 = __nccwpck_require__(12793); +/** + * Determines whether the element's attribute list contains the given + * attribute. + * + * @param attribute - an attribute node + * @param element - an element node + */ +function element_has(attribute, element) { + /** + * An element has an attribute A if its attribute list contains A. + */ + return element._attributeList._asArray().indexOf(attribute) !== -1; +} +exports.element_has = element_has; +/** + * Changes the value of an attribute node. + * + * @param attribute - an attribute node + * @param element - an element node + * @param value - attribute value + */ +function element_change(attribute, element, value) { + /** + * 1. Queue an attribute mutation record for element with attribute’s + * local name, attribute’s namespace, and attribute’s value. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, attribute._value); + } + /** + * 2. If element is custom, then enqueue a custom element callback reaction + * with element, callback name "attributeChangedCallback", and an argument + * list containing attribute’s local name, attribute’s value, value, and + * attribute’s namespace. + */ + if (DOMImpl_1.dom.features.customElements) { + if (util_1.Guard.isCustomElementNode(element)) { + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, attribute._value, value, attribute._namespace]); + } + } + /** + * 3. Run the attribute change steps with element, attribute’s local name, + * attribute’s value, value, and attribute’s namespace. + * 4. Set attribute’s value to value. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, attribute._value, value, attribute._namespace); + } + attribute._value = value; +} +exports.element_change = element_change; +/** + * Appends an attribute to an element node. + * + * @param attribute - an attribute + * @param element - an element to receive the attribute + */ +function element_append(attribute, element) { + /** + * 1. Queue an attribute mutation record for element with attribute’s + * local name, attribute’s namespace, and null. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, null); + } + /** + * 2. If element is custom, then enqueue a custom element callback reaction + * with element, callback name "attributeChangedCallback", and an argument + * list containing attribute’s local name, null, attribute’s value, and + * attribute’s namespace. + */ + if (DOMImpl_1.dom.features.customElements) { + if (util_1.Guard.isCustomElementNode(element)) { + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, null, attribute._value, attribute._namespace]); + } + } + /** + * 3. Run the attribute change steps with element, attribute’s local name, + * null, attribute’s value, and attribute’s namespace. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, null, attribute._value, attribute._namespace); + } + /** + * 4. Append attribute to element’s attribute list. + * 5. Set attribute’s element to element. + */ + element._attributeList._asArray().push(attribute); + attribute._element = element; + // mark that the document has namespaces + if (!element._nodeDocument._hasNamespaces && (attribute._namespace !== null || + attribute._namespacePrefix !== null || attribute._localName === "xmlns")) { + element._nodeDocument._hasNamespaces = true; + } +} +exports.element_append = element_append; +/** + * Removes an attribute from an element node. + * + * @param attribute - an attribute + * @param element - an element to receive the attribute + */ +function element_remove(attribute, element) { + /** + * 1. Queue an attribute mutation record for element with attribute’s + * local name, attribute’s namespace, and attribute’s value. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, attribute._value); + } + /** + * 2. If element is custom, then enqueue a custom element callback reaction + * with element, callback name "attributeChangedCallback", and an argument + * list containing attribute’s local name, attribute’s value, null, + * and attribute’s namespace. + */ + if (DOMImpl_1.dom.features.customElements) { + if (util_1.Guard.isCustomElementNode(element)) { + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, attribute._value, null, attribute._namespace]); + } + } + /** + * 3. Run the attribute change steps with element, attribute’s local name, + * attribute’s value, null, and attribute’s namespace. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, attribute._value, null, attribute._namespace); + } + /** + * 3. Remove attribute from element’s attribute list. + * 5. Set attribute’s element to null. + */ + var index = element._attributeList._asArray().indexOf(attribute); + element._attributeList._asArray().splice(index, 1); + attribute._element = null; +} +exports.element_remove = element_remove; +/** + * Replaces an attribute with another of an element node. + * + * @param oldAttr - old attribute + * @param newAttr - new attribute + * @param element - an element to receive the attribute + */ +function element_replace(oldAttr, newAttr, element) { + /** + * 1. Queue an attribute mutation record for element with oldAttr’s + * local name, oldAttr’s namespace, and oldAttr’s value. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, oldAttr._localName, oldAttr._namespace, oldAttr._value); + } + /** + * 2. If element is custom, then enqueue a custom element callback reaction + * with element, callback name "attributeChangedCallback", and an argument + * list containing oldAttr’s local name, oldAttr’s value, newAttr’s value, + * and oldAttr’s namespace. + */ + if (DOMImpl_1.dom.features.customElements) { + if (util_1.Guard.isCustomElementNode(element)) { + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [oldAttr._localName, oldAttr._value, newAttr._value, oldAttr._namespace]); + } + } + /** + * 3. Run the attribute change steps with element, oldAttr’s local name, + * oldAttr’s value, newAttr’s value, and oldAttr’s namespace. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runAttributeChangeSteps(element, oldAttr._localName, oldAttr._value, newAttr._value, oldAttr._namespace); + } + /** + * 4. Replace oldAttr by newAttr in element’s attribute list. + * 5. Set oldAttr’s element to null. + * 6. Set newAttr’s element to element. + */ + var index = element._attributeList._asArray().indexOf(oldAttr); + if (index !== -1) { + element._attributeList._asArray()[index] = newAttr; + } + oldAttr._element = null; + newAttr._element = element; + // mark that the document has namespaces + if (!element._nodeDocument._hasNamespaces && (newAttr._namespace !== null || + newAttr._namespacePrefix !== null || newAttr._localName === "xmlns")) { + element._nodeDocument._hasNamespaces = true; + } +} +exports.element_replace = element_replace; +/** + * Retrieves an attribute with the given name from an element node. + * + * @param qualifiedName - an attribute name + * @param element - an element to receive the attribute + */ +function element_getAnAttributeByName(qualifiedName, element) { + /** + * 1. If element is in the HTML namespace and its node document is an HTML + * document, then set qualifiedName to qualifiedName in ASCII lowercase. + * 2. Return the first attribute in element’s attribute list whose qualified + * name is qualifiedName, and null otherwise. + */ + if (element._namespace === infra_1.namespace.HTML && element._nodeDocument._type === "html") { + qualifiedName = qualifiedName.toLowerCase(); + } + return element._attributeList._asArray().find(function (attr) { return attr._qualifiedName === qualifiedName; }) || null; +} +exports.element_getAnAttributeByName = element_getAnAttributeByName; +/** + * Retrieves an attribute with the given namespace and local name from an + * element node. + * + * @param namespace - an attribute namespace + * @param localName - an attribute local name + * @param element - an element to receive the attribute + */ +function element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element) { + /** + * 1. If namespace is the empty string, set it to null. + * 2. Return the attribute in element’s attribute list whose namespace is + * namespace and local name is localName, if any, and null otherwise. + */ + var ns = namespace || null; + return element._attributeList._asArray().find(function (attr) { return attr._namespace === ns && attr._localName === localName; }) || null; +} +exports.element_getAnAttributeByNamespaceAndLocalName = element_getAnAttributeByNamespaceAndLocalName; +/** + * Retrieves an attribute's value with the given name namespace and local + * name from an element node. + * + * @param element - an element to receive the attribute + * @param localName - an attribute local name + * @param namespace - an attribute namespace + */ +function element_getAnAttributeValue(element, localName, namespace) { + if (namespace === void 0) { namespace = ''; } + /** + * 1. Let attr be the result of getting an attribute given namespace, + * localName, and element. + * 2. If attr is null, then return the empty string. + * 3. Return attr’s value. + */ + var attr = element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element); + if (attr === null) + return ''; + else + return attr._value; +} +exports.element_getAnAttributeValue = element_getAnAttributeValue; +/** + * Sets an attribute of an element node. + * + * @param attr - an attribute + * @param element - an element to receive the attribute + */ +function element_setAnAttribute(attr, element) { + /** + * 1. If attr’s element is neither null nor element, throw an + * "InUseAttributeError" DOMException. + * 2. Let oldAttr be the result of getting an attribute given attr’s + * namespace, attr’s local name, and element. + * 3. If oldAttr is attr, return attr. + * 4. If oldAttr is non-null, replace it by attr in element. + * 5. Otherwise, append attr to element. + * 6. Return oldAttr. + */ + if (attr._element !== null && attr._element !== element) + throw new DOMException_1.InUseAttributeError("This attribute already exists in the document: " + attr._qualifiedName + " as a child of " + attr._element._qualifiedName + "."); + var oldAttr = element_getAnAttributeByNamespaceAndLocalName(attr._namespace || '', attr._localName, element); + if (oldAttr === attr) + return attr; + if (oldAttr !== null) { + element_replace(oldAttr, attr, element); + } + else { + element_append(attr, element); + } + return oldAttr; +} +exports.element_setAnAttribute = element_setAnAttribute; +/** + * Sets an attribute's value of an element node. + * + * @param element - an element to receive the attribute + * @param localName - an attribute local name + * @param value - an attribute value + * @param prefix - an attribute prefix + * @param namespace - an attribute namespace + */ +function element_setAnAttributeValue(element, localName, value, prefix, namespace) { + if (prefix === void 0) { prefix = null; } + if (namespace === void 0) { namespace = null; } + /** + * 1. If prefix is not given, set it to null. + * 2. If namespace is not given, set it to null. + * 3. Let attribute be the result of getting an attribute given namespace, + * localName, and element. + * 4. If attribute is null, create an attribute whose namespace is + * namespace, namespace prefix is prefix, local name is localName, value + * is value, and node document is element’s node document, then append this + * attribute to element, and then return. + * 5. Change attribute from element to value. + */ + var attribute = element_getAnAttributeByNamespaceAndLocalName(namespace || '', localName, element); + if (attribute === null) { + var newAttr = CreateAlgorithm_1.create_attr(element._nodeDocument, localName); + newAttr._namespace = namespace; + newAttr._namespacePrefix = prefix; + newAttr._value = value; + element_append(newAttr, element); + return; + } + element_change(attribute, element, value); +} +exports.element_setAnAttributeValue = element_setAnAttributeValue; +/** + * Removes an attribute with the given name from an element node. + * + * @param qualifiedName - an attribute name + * @param element - an element to receive the attribute + */ +function element_removeAnAttributeByName(qualifiedName, element) { + /** + * 1. Let attr be the result of getting an attribute given qualifiedName + * and element. + * 2. If attr is non-null, remove it from element. + * 3. Return attr. + */ + var attr = element_getAnAttributeByName(qualifiedName, element); + if (attr !== null) { + element_remove(attr, element); + } + return attr; +} +exports.element_removeAnAttributeByName = element_removeAnAttributeByName; +/** + * Removes an attribute with the given namespace and local name from an + * element node. + * + * @param namespace - an attribute namespace + * @param localName - an attribute local name + * @param element - an element to receive the attribute + */ +function element_removeAnAttributeByNamespaceAndLocalName(namespace, localName, element) { + /** + * 1. Let attr be the result of getting an attribute given namespace, localName, and element. + * 2. If attr is non-null, remove it from element. + * 3. Return attr. + */ + var attr = element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element); + if (attr !== null) { + element_remove(attr, element); + } + return attr; +} +exports.element_removeAnAttributeByNamespaceAndLocalName = element_removeAnAttributeByNamespaceAndLocalName; +/** + * Creates an element node. + * See: https://dom.spec.whatwg.org/#concept-create-element. + * + * @param document - the document owning the element + * @param localName - local name + * @param namespace - element namespace + * @param prefix - namespace prefix + * @param is - the "is" value + * @param synchronousCustomElementsFlag - synchronous custom elements flag + */ +function element_createAnElement(document, localName, namespace, prefix, is, synchronousCustomElementsFlag) { + if (prefix === void 0) { prefix = null; } + if (is === void 0) { is = null; } + if (synchronousCustomElementsFlag === void 0) { synchronousCustomElementsFlag = false; } + /** + * 1. If prefix was not given, let prefix be null. + * 2. If is was not given, let is be null. + * 3. Let result be null. + */ + var result = null; + if (!DOMImpl_1.dom.features.customElements) { + result = CreateAlgorithm_1.create_element(document, localName, namespace, prefix); + result._customElementState = "uncustomized"; + result._customElementDefinition = null; + result._is = is; + return result; + } + /** + * 4. Let definition be the result of looking up a custom element definition + * given document, namespace, localName, and is. + */ + var definition = CustomElementAlgorithm_1.customElement_lookUpACustomElementDefinition(document, namespace, localName, is); + if (definition !== null && definition.name !== definition.localName) { + /** + * 5. If definition is non-null, and definition’s name is not equal to + * its local name (i.e., definition represents a customized built-in + * element), then: + * 5.1. Let interface be the element interface for localName and the HTML + * namespace. + * 5.2. Set result to a new element that implements interface, with no + * attributes, namespace set to the HTML namespace, namespace prefix + * set to prefix, local name set to localName, custom element state set + * to "undefined", custom element definition set to null, is value set + * to is, and node document set to document. + * 5.3. If the synchronous custom elements flag is set, upgrade element + * using definition. + * 5.4. Otherwise, enqueue a custom element upgrade reaction given result + * and definition. + */ + var elemenInterface = DocumentAlgorithm_1.document_elementInterface(localName, infra_1.namespace.HTML); + result = new elemenInterface(); + result._localName = localName; + result._namespace = infra_1.namespace.HTML; + result._namespacePrefix = prefix; + result._customElementState = "undefined"; + result._customElementDefinition = null; + result._is = is; + result._nodeDocument = document; + if (synchronousCustomElementsFlag) { + CustomElementAlgorithm_1.customElement_upgrade(definition, result); + } + else { + CustomElementAlgorithm_1.customElement_enqueueACustomElementUpgradeReaction(result, definition); + } + } + else if (definition !== null) { + /** + * 6. Otherwise, if definition is non-null, then: + */ + if (synchronousCustomElementsFlag) { + /** + * 6.1. If the synchronous custom elements flag is set, then run these + * steps while catching any exceptions: + */ + try { + /** + * 6.1.1. Let C be definition’s constructor. + * 6.1.2. Set result to the result of constructing C, with no arguments. + * 6.1.3. Assert: result’s custom element state and custom element definition + * are initialized. + * 6.1.4. Assert: result’s namespace is the HTML namespace. + * _Note:_ IDL enforces that result is an HTMLElement object, which all + * use the HTML namespace. + */ + var C = definition.constructor; + var result_1 = new C(); + console.assert(result_1._customElementState !== undefined); + console.assert(result_1._customElementDefinition !== undefined); + console.assert(result_1._namespace === infra_1.namespace.HTML); + /** + * 6.1.5. If result’s attribute list is not empty, then throw a + * "NotSupportedError" DOMException. + * 6.1.6. If result has children, then throw a "NotSupportedError" + * DOMException. + * 6.1.7. If result’s parent is not null, then throw a + * "NotSupportedError" DOMException. + * 6.1.8. If result’s node document is not document, then throw a + * "NotSupportedError" DOMException. + * 6.1.9. If result’s local name is not equal to localName, then throw + * a "NotSupportedError" DOMException. + */ + if (result_1._attributeList.length !== 0) + throw new DOMException_1.NotSupportedError("Custom element already has attributes."); + if (result_1._children.size !== 0) + throw new DOMException_1.NotSupportedError("Custom element already has child nodes."); + if (result_1._parent !== null) + throw new DOMException_1.NotSupportedError("Custom element already has a parent node."); + if (result_1._nodeDocument !== document) + throw new DOMException_1.NotSupportedError("Custom element is already in a document."); + if (result_1._localName !== localName) + throw new DOMException_1.NotSupportedError("Custom element has a different local name."); + /** + * 6.1.10. Set result’s namespace prefix to prefix. + * 6.1.11. Set result’s is value to null. + */ + result_1._namespacePrefix = prefix; + result_1._is = null; + } + catch (e) { + /** + * If any of these steps threw an exception, then: + * - Report the exception. + * - Set result to a new element that implements the HTMLUnknownElement + * interface, with no attributes, namespace set to the HTML namespace, + * namespace prefix set to prefix, local name set to localName, custom + * element state set to "failed", custom element definition set to null, + * is value set to null, and node document set to document. + */ + // TODO: Report the exception + result = CreateAlgorithm_1.create_htmlUnknownElement(document, localName, infra_1.namespace.HTML, prefix); + result._customElementState = "failed"; + result._customElementDefinition = null; + result._is = null; + } + } + else { + /** + * 6.2. Otherwise: + * 6.2.1. Set result to a new element that implements the HTMLElement + * interface, with no attributes, namespace set to the HTML namespace, + * namespace prefix set to prefix, local name set to localName, custom + * element state set to "undefined", custom element definition set to + * null, is value set to null, and node document set to document. + * 6.2.2. Enqueue a custom element upgrade reaction given result and + * definition. + */ + result = CreateAlgorithm_1.create_htmlElement(document, localName, infra_1.namespace.HTML, prefix); + result._customElementState = "undefined"; + result._customElementDefinition = null; + result._is = null; + CustomElementAlgorithm_1.customElement_enqueueACustomElementUpgradeReaction(result, definition); + } + } + else { + /** + * 7. Otherwise: + * 7.1. Let interface be the element interface for localName and + * namespace. + * 7.2. Set result to a new element that implements interface, with no + * attributes, namespace set to namespace, namespace prefix set to prefix, + * local name set to localName, custom element state set to + * "uncustomized", custom element definition set to null, is value set to + * is, and node document set to document. + */ + var elementInterface = DocumentAlgorithm_1.document_elementInterface(localName, namespace); + result = new elementInterface(); + result._localName = localName; + result._namespace = namespace; + result._namespacePrefix = prefix; + result._customElementState = "uncustomized"; + result._customElementDefinition = null; + result._is = is; + result._nodeDocument = document; + /** + * 7.3. If namespace is the HTML namespace, and either localName is a + * valid custom element name or is is non-null, then set result’s + * custom element state to "undefined". + */ + if (namespace === infra_1.namespace.HTML && (is !== null || + CustomElementAlgorithm_1.customElement_isValidCustomElementName(localName))) { + result._customElementState = "undefined"; + } + } + /* istanbul ignore next */ + if (result === null) { + throw new Error("Unable to create element."); + } + /** + * 8. Returns result + */ + return result; +} +exports.element_createAnElement = element_createAnElement; +/** + * Inserts a new node adjacent to this element. + * + * @param element - a reference element + * @param where - a string defining where to insert the element node. + * - `beforebegin` before this element itself. + * - `afterbegin` before the first child. + * - `beforeend` after the last child. + * - `afterend` after this element itself. + * @param node - node to insert + */ +function element_insertAdjacent(element, where, node) { + /** + * - "beforebegin" + * If element’s parent is null, return null. + * Return the result of pre-inserting node into element’s parent before + * element. + * - "afterbegin" + * Return the result of pre-inserting node into element before element’s + * first child. + * - "beforeend" + * Return the result of pre-inserting node into element before null. + * - "afterend" + * If element’s parent is null, return null. + * Return the result of pre-inserting node into element’s parent before element’s next sibling. + * - Otherwise + * Throw a "SyntaxError" DOMException. + */ + switch (where.toLowerCase()) { + case 'beforebegin': + if (element._parent === null) + return null; + return MutationAlgorithm_1.mutation_preInsert(node, element._parent, element); + case 'afterbegin': + return MutationAlgorithm_1.mutation_preInsert(node, element, element._firstChild); + case 'beforeend': + return MutationAlgorithm_1.mutation_preInsert(node, element, null); + case 'afterend': + if (element._parent === null) + return null; + return MutationAlgorithm_1.mutation_preInsert(node, element._parent, element._nextSibling); + default: + throw new DOMException_1.SyntaxError("Invalid 'where' argument. \"beforebegin\", \"afterbegin\", \"beforeend\" or \"afterend\" expected"); + } +} +exports.element_insertAdjacent = element_insertAdjacent; +//# sourceMappingURL=ElementAlgorithm.js.map + +/***/ }), + +/***/ 28217: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var interfaces_1 = __nccwpck_require__(27305); +var util_1 = __nccwpck_require__(65282); +var CustomEventImpl_1 = __nccwpck_require__(59857); +var EventImpl_1 = __nccwpck_require__(38245); +var DOMException_1 = __nccwpck_require__(13166); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var ShadowTreeAlgorithm_1 = __nccwpck_require__(68733); +var DOMAlgorithm_1 = __nccwpck_require__(9628); +/** + * Sets the canceled flag of an event. + * + * @param event - an event + */ +function event_setTheCanceledFlag(event) { + if (event._cancelable && !event._inPassiveListenerFlag) { + event._canceledFlag = true; + } +} +exports.event_setTheCanceledFlag = event_setTheCanceledFlag; +/** + * Initializes the value of an event. + * + * @param event - an event to initialize + * @param type - the type of event + * @param bubbles - whether the event propagates in reverse + * @param cancelable - whether the event can be cancelled + */ +function event_initialize(event, type, bubbles, cancelable) { + event._initializedFlag = true; + event._stopPropagationFlag = false; + event._stopImmediatePropagationFlag = false; + event._canceledFlag = false; + event._isTrusted = false; + event._target = null; + event._type = type; + event._bubbles = bubbles; + event._cancelable = cancelable; +} +exports.event_initialize = event_initialize; +/** + * Creates a new event. + * + * @param eventInterface - event interface + * @param realm - realm + */ +function event_createAnEvent(eventInterface, realm) { + if (realm === void 0) { realm = undefined; } + /** + * 1. If realm is not given, then set it to null. + * 2. Let dictionary be the result of converting the JavaScript value + * undefined to the dictionary type accepted by eventInterface’s + * constructor. (This dictionary type will either be EventInit or a + * dictionary that inherits from it.) + * 3. Let event be the result of running the inner event creation steps with + * eventInterface, realm, the time of the occurrence that the event is + * signaling, and dictionary. + * 4. Initialize event’s isTrusted attribute to true. + * 5. Return event. + */ + if (realm === undefined) + realm = null; + var dictionary = {}; + var event = event_innerEventCreationSteps(eventInterface, realm, new Date(), dictionary); + event._isTrusted = true; + return event; +} +exports.event_createAnEvent = event_createAnEvent; +/** + * Performs event creation steps. + * + * @param eventInterface - event interface + * @param realm - realm + * @param time - time of occurrance + * @param dictionary - event attributes + * + */ +function event_innerEventCreationSteps(eventInterface, realm, time, dictionary) { + /** + * 1. Let event be the result of creating a new object using eventInterface. + * TODO: Implement realms + * If realm is non-null, then use that Realm; otherwise, use the default + * behavior defined in Web IDL. + */ + var event = new eventInterface(""); + /** + * 2. Set event’s initialized flag. + * 3. Initialize event’s timeStamp attribute to a DOMHighResTimeStamp + * representing the high resolution time from the time origin to time. + * 4. For each member → value in dictionary, if event has an attribute + * whose identifier is member, then initialize that attribute to value. + * 5. Run the event constructing steps with event. + * 6. Return event. + */ + event._initializedFlag = true; + event._timeStamp = time.getTime(); + Object.assign(event, dictionary); + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runEventConstructingSteps(event); + } + return event; +} +exports.event_innerEventCreationSteps = event_innerEventCreationSteps; +/** + * Dispatches an event to an event target. + * + * @param event - the event to dispatch + * @param target - event target + * @param legacyTargetOverrideFlag - legacy target override flag + * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns + * whether the event listener's callback threw an exception + */ +function event_dispatch(event, target, legacyTargetOverrideFlag, legacyOutputDidListenersThrowFlag) { + var e_1, _a, e_2, _b; + if (legacyTargetOverrideFlag === void 0) { legacyTargetOverrideFlag = false; } + if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; } + var clearTargets = false; + /** + * 1. Set event's dispatch flag. + */ + event._dispatchFlag = true; + /** + * 2. Let targetOverride be target, if legacy target override flag is not + * given, and target's associated Document otherwise. + * + * _Note:_ legacy target override flag is only used by HTML and only when + * target is a Window object. + */ + var targetOverride = target; + if (legacyTargetOverrideFlag) { + var doc = target._associatedDocument; + if (util_1.Guard.isDocumentNode(doc)) { + targetOverride = doc; + } + } + /** + * 3. Let activationTarget be null. + * 4. Let relatedTarget be the result of retargeting event's relatedTarget + * against target. + * 5. If target is not relatedTarget or target is event's relatedTarget, + * then: + */ + var activationTarget = null; + var relatedTarget = TreeAlgorithm_1.tree_retarget(event._relatedTarget, target); + if (target !== relatedTarget || target === event._relatedTarget) { + /** + * 5.1. Let touchTargets be a new list. + * 5.2. For each touchTarget of event's touch target list, append the + * result of retargeting touchTarget against target to touchTargets. + * 5.3. Append to an event path with event, target, targetOverride, + * relatedTarget, touchTargets, and false. + * 5.4. Let isActivationEvent be true, if event is a MouseEvent object + * and event's type attribute is "click", and false otherwise. + * 5.5. If isActivationEvent is true and target has activation behavior, + * then set activationTarget to target. + * 5.6. Let slotable be target, if target is a slotable and is assigned, + * and null otherwise. + * 5.7. Let slot-in-closed-tree be false. + * 5.8. Let parent be the result of invoking target's get the parent with + * event. + */ + var touchTargets = []; + try { + for (var _c = __values(event._touchTargetList), _d = _c.next(); !_d.done; _d = _c.next()) { + var touchTarget = _d.value; + touchTargets.push(TreeAlgorithm_1.tree_retarget(touchTarget, target)); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + event_appendToAnEventPath(event, target, targetOverride, relatedTarget, touchTargets, false); + var isActivationEvent = (util_1.Guard.isMouseEvent(event) && event._type === "click"); + if (isActivationEvent && target._activationBehavior !== undefined) { + activationTarget = target; + } + var slotable = (util_1.Guard.isSlotable(target) && ShadowTreeAlgorithm_1.shadowTree_isAssigned(target)) ? + target : null; + var slotInClosedTree = false; + var parent = target._getTheParent(event); + /** + * 5.9. While parent is non-null: + */ + while (parent !== null && util_1.Guard.isNode(parent)) { + /** + * 5.9.1 If slotable is non-null: + * 5.9.1.1. Assert: parent is a slot. + * 5.9.1.2. Set slotable to null. + * 5.9.1.3. If parent's root is a shadow root whose mode is "closed", + * then set slot-in-closed-tree to true. + */ + if (slotable !== null) { + if (!util_1.Guard.isSlot(parent)) { + throw new Error("Parent node of a slotable should be a slot."); + } + slotable = null; + var root = TreeAlgorithm_1.tree_rootNode(parent, true); + if (util_1.Guard.isShadowRoot(root) && root._mode === "closed") { + slotInClosedTree = true; + } + } + /** + * 5.9.2 If parent is a slotable and is assigned, then set slotable to + * parent. + * 5.9.3. Let relatedTarget be the result of retargeting event's + * relatedTarget against parent. + * 5.9.4. Let touchTargets be a new list. + * 5.9.4. For each touchTarget of event's touch target list, append the + * result of retargeting touchTarget against parent to touchTargets. + */ + if (util_1.Guard.isSlotable(parent) && ShadowTreeAlgorithm_1.shadowTree_isAssigned(parent)) { + slotable = parent; + } + relatedTarget = TreeAlgorithm_1.tree_retarget(event._relatedTarget, parent); + touchTargets = []; + try { + for (var _e = (e_2 = void 0, __values(event._touchTargetList)), _f = _e.next(); !_f.done; _f = _e.next()) { + var touchTarget = _f.value; + touchTargets.push(TreeAlgorithm_1.tree_retarget(touchTarget, parent)); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_2) throw e_2.error; } + } + /** + * 5.9.6. If parent is a Window object, or parent is a node and target's + * root is a shadow-including inclusive ancestor of parent, then: + */ + if (util_1.Guard.isWindow(parent) || (util_1.Guard.isNode(parent) && util_1.Guard.isNode(target) && + TreeAlgorithm_1.tree_isAncestorOf(TreeAlgorithm_1.tree_rootNode(target, true), parent, true, true))) { + /** + * 5.9.6.1. If isActivationEvent is true, event's bubbles attribute + * is true, activationTarget is null, and parent has activation + * behavior, then set activationTarget to parent. + * 5.9.6.2. Append to an event path with event, parent, null, + * relatedTarget, touchTargets, and slot-in-closed-tree. + */ + if (isActivationEvent && event._bubbles && activationTarget === null && + parent._activationBehavior) { + activationTarget = parent; + } + event_appendToAnEventPath(event, parent, null, relatedTarget, touchTargets, slotInClosedTree); + } + else if (parent === relatedTarget) { + /** + * 5.9.7. Otherwise, if parent is relatedTarget, + * then set parent to null. + */ + parent = null; + } + else { + /** + * 5.9.8. Otherwise, set target to parent and then: + * 5.9.8.1. If isActivationEvent is true, activationTarget is null, + * and target has activation behavior, then set activationTarget + * to target. + * 5.9.8.2. Append to an event path with event, parent, target, + * relatedTarget, touchTargets, and slot-in-closed-tree. + */ + target = parent; + if (isActivationEvent && activationTarget === null && + target._activationBehavior) { + activationTarget = target; + } + event_appendToAnEventPath(event, parent, target, relatedTarget, touchTargets, slotInClosedTree); + } + /** + * 5.9.9. If parent is non-null, then set parent to the result of + * invoking parent's get the parent with event. + * 5.9.10. Set slot-in-closed-tree to false. + */ + if (parent !== null) { + parent = parent._getTheParent(event); + } + slotInClosedTree = false; + } + /** + * 5.10. Let clearTargetsStruct be the last struct in event's path whose + * shadow-adjusted target is non-null. + */ + var clearTargetsStruct = null; + var path = event._path; + for (var i = path.length - 1; i >= 0; i--) { + var struct = path[i]; + if (struct.shadowAdjustedTarget !== null) { + clearTargetsStruct = struct; + break; + } + } + /** + * 5.11. Let clearTargets be true if clearTargetsStruct's shadow-adjusted + * target, clearTargetsStruct's relatedTarget, or an EventTarget object + * in clearTargetsStruct's touch target list is a node and its root is + * a shadow root, and false otherwise. + */ + if (clearTargetsStruct !== null) { + if (util_1.Guard.isNode(clearTargetsStruct.shadowAdjustedTarget) && + util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(clearTargetsStruct.shadowAdjustedTarget, true))) { + clearTargets = true; + } + else if (util_1.Guard.isNode(clearTargetsStruct.relatedTarget) && + util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(clearTargetsStruct.relatedTarget, true))) { + clearTargets = true; + } + else { + for (var j = 0; j < clearTargetsStruct.touchTargetList.length; j++) { + var struct = clearTargetsStruct.touchTargetList[j]; + if (util_1.Guard.isNode(struct) && + util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(struct, true))) { + clearTargets = true; + break; + } + } + } + } + /** + * 5.12. If activationTarget is non-null and activationTarget has + * legacy-pre-activation behavior, then run activationTarget's + * legacy-pre-activation behavior. + */ + if (activationTarget !== null && + activationTarget._legacyPreActivationBehavior !== undefined) { + activationTarget._legacyPreActivationBehavior(event); + } + /** + * 5.13. For each struct in event's path, in reverse order: + */ + for (var i = path.length - 1; i >= 0; i--) { + var struct = path[i]; + /** + * 5.13.1. If struct's shadow-adjusted target is non-null, then set + * event's eventPhase attribute to AT_TARGET. + * 5.13.2. Otherwise, set event's eventPhase attribute to + * CAPTURING_PHASE. + * 5.13.3. Invoke with struct, event, "capturing", and + * legacyOutputDidListenersThrowFlag if given. + */ + if (struct.shadowAdjustedTarget !== null) { + event._eventPhase = interfaces_1.EventPhase.AtTarget; + } + else { + event._eventPhase = interfaces_1.EventPhase.Capturing; + } + event_invoke(struct, event, "capturing", legacyOutputDidListenersThrowFlag); + } + /** + * 5.14. For each struct in event's path + */ + for (var i = 0; i < path.length; i++) { + var struct = path[i]; + /** + * 5.14.1. If struct's shadow-adjusted target is non-null, then set + * event's eventPhase attribute to AT_TARGET. + * 5.14.2. Otherwise: + * 5.14.2.1. If event's bubbles attribute is false, then continue. + * 5.14.2.2. Set event's eventPhase attribute to BUBBLING_PHASE. + * 5.14.3. Invoke with struct, event, "bubbling", and + * legacyOutputDidListenersThrowFlag if given. + */ + if (struct.shadowAdjustedTarget !== null) { + event._eventPhase = interfaces_1.EventPhase.AtTarget; + } + else { + if (!event._bubbles) + continue; + event._eventPhase = interfaces_1.EventPhase.Bubbling; + } + event_invoke(struct, event, "bubbling", legacyOutputDidListenersThrowFlag); + } + } + /** + * 6. Set event's eventPhase attribute to NONE. + * 7. Set event's currentTarget attribute to null. + * 8. Set event's path to the empty list. + * 9. Unset event's dispatch flag, stop propagation flag, and stop + * immediate propagation flag. + */ + event._eventPhase = interfaces_1.EventPhase.None; + event._currentTarget = null; + event._path = []; + event._dispatchFlag = false; + event._stopPropagationFlag = false; + event._stopImmediatePropagationFlag = false; + /** + * 10. If clearTargets, then: + * 10.1. Set event's target to null. + * 10.2. Set event's relatedTarget to null. + * 10.3. Set event's touch target list to the empty list. + */ + if (clearTargets) { + event._target = null; + event._relatedTarget = null; + event._touchTargetList = []; + } + /** + * 11. If activationTarget is non-null, then: + * 11.1. If event's canceled flag is unset, then run activationTarget's + * activation behavior with event. + * 11.2. Otherwise, if activationTarget has legacy-canceled-activation + * behavior, then run activationTarget's legacy-canceled-activation + * behavior. + */ + if (activationTarget !== null) { + if (!event._canceledFlag && activationTarget._activationBehavior !== undefined) { + activationTarget._activationBehavior(event); + } + else if (activationTarget._legacyCanceledActivationBehavior !== undefined) { + activationTarget._legacyCanceledActivationBehavior(event); + } + } + /** + * 12. Return false if event's canceled flag is set, and true otherwise. + */ + return !event._canceledFlag; +} +exports.event_dispatch = event_dispatch; +/** + * Appends a new struct to an event's path. + * + * @param event - an event + * @param invocationTarget - the target of the invocation + * @param shadowAdjustedTarget - shadow-root adjusted event target + * @param relatedTarget - related event target + * @param touchTargets - a list of touch targets + * @param slotInClosedTree - if the target's parent is a closed shadow root + */ +function event_appendToAnEventPath(event, invocationTarget, shadowAdjustedTarget, relatedTarget, touchTargets, slotInClosedTree) { + /** + * 1. Let invocationTargetInShadowTree be false. + * 2. If invocationTarget is a node and its root is a shadow root, then + * set invocationTargetInShadowTree to true. + */ + var invocationTargetInShadowTree = false; + if (util_1.Guard.isNode(invocationTarget) && + util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(invocationTarget))) { + invocationTargetInShadowTree = true; + } + /** + * 3. Let root-of-closed-tree be false. + * 4. If invocationTarget is a shadow root whose mode is "closed", then + * set root-of-closed-tree to true. + */ + var rootOfClosedTree = false; + if (util_1.Guard.isShadowRoot(invocationTarget) && + invocationTarget._mode === "closed") { + rootOfClosedTree = true; + } + /** + * 5. Append a new struct to event's path whose invocation target is + * invocationTarget, invocation-target-in-shadow-tree is + * invocationTargetInShadowTree, shadow-adjusted target is + * shadowAdjustedTarget, relatedTarget is relatedTarget, + * touch target list is touchTargets, root-of-closed-tree is + * root-of-closed-tree, and slot-in-closed-tree is slot-in-closed-tree. + */ + event._path.push({ + invocationTarget: invocationTarget, + invocationTargetInShadowTree: invocationTargetInShadowTree, + shadowAdjustedTarget: shadowAdjustedTarget, + relatedTarget: relatedTarget, + touchTargetList: touchTargets, + rootOfClosedTree: rootOfClosedTree, + slotInClosedTree: slotInClosedTree + }); +} +exports.event_appendToAnEventPath = event_appendToAnEventPath; +/** + * Invokes an event. + * + * @param struct - a struct defining event's path + * @param event - the event to invoke + * @param phase - event phase + * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns + * whether the event listener's callback threw an exception + */ +function event_invoke(struct, event, phase, legacyOutputDidListenersThrowFlag) { + if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; } + /** + * 1. Set event's target to the shadow-adjusted target of the last struct + * in event's path, that is either struct or preceding struct, whose + * shadow-adjusted target is non-null. + */ + var path = event._path; + var index = -1; + for (var i = 0; i < path.length; i++) { + if (path[i] === struct) { + index = i; + break; + } + } + if (index !== -1) { + var item = path[index]; + if (item.shadowAdjustedTarget !== null) { + event._target = item.shadowAdjustedTarget; + } + else if (index > 0) { + item = path[index - 1]; + if (item.shadowAdjustedTarget !== null) { + event._target = item.shadowAdjustedTarget; + } + } + } + /** + * 2. Set event's relatedTarget to struct's relatedTarget. + * 3. Set event's touch target list to struct's touch target list. + * 4. If event's stop propagation flag is set, then return. + * 5. Initialize event's currentTarget attribute to struct's invocation + * target. + * 6. Let listeners be a clone of event's currentTarget attribute value's + * event listener list. + * + * _Note:_ This avoids event listeners added after this point from being + * run. Note that removal still has an effect due to the removed field. + */ + event._relatedTarget = struct.relatedTarget; + event._touchTargetList = struct.touchTargetList; + if (event._stopPropagationFlag) + return; + event._currentTarget = struct.invocationTarget; + var currentTarget = event._currentTarget; + var targetListeners = currentTarget._eventListenerList; + var listeners = new (Array.bind.apply(Array, __spread([void 0], targetListeners)))(); + /** + * 7. Let found be the result of running inner invoke with event, listeners, + * phase, and legacyOutputDidListenersThrowFlag if given. + */ + var found = event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag); + /** + * 8. If found is false and event's isTrusted attribute is true, then: + */ + if (!found && event._isTrusted) { + /** + * 8.1. Let originalEventType be event's type attribute value. + * 8.2. If event's type attribute value is a match for any of the strings + * in the first column in the following table, set event's type attribute + * value to the string in the second column on the same row as the matching + * string, and return otherwise. + * + * Event type | Legacy event type + * ------------------------------------------------- + * "animationend" | "webkitAnimationEnd" + * "animationiteration" | "webkitAnimationIteration" + * "animationstart" | "webkitAnimationStart" + * "transitionend" | "webkitTransitionEnd" + */ + var originalEventType = event._type; + if (originalEventType === "animationend") { + event._type = "webkitAnimationEnd"; + } + else if (originalEventType === "animationiteration") { + event._type = "webkitAnimationIteration"; + } + else if (originalEventType === "animationstart") { + event._type = "webkitAnimationStart"; + } + else if (originalEventType === "transitionend") { + event._type = "webkitTransitionEnd"; + } + /** + * 8.3. Inner invoke with event, listeners, phase, and + * legacyOutputDidListenersThrowFlag if given. + * 8.4. Set event's type attribute value to originalEventType. + */ + event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag); + event._type = originalEventType; + } +} +exports.event_invoke = event_invoke; +/** + * Invokes an event. + * + * @param event - the event to invoke + * @param listeners - event listeners + * @param phase - event phase + * @param struct - a struct defining event's path + * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns + * whether the event listener's callback threw an exception + */ +function event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag) { + if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; } + /** + * 1. Let found be false. + * 2. For each listener in listeners, whose removed is false: + */ + var found = false; + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + if (!listener.removed) { + /** + * 2.1. If event's type attribute value is not listener's type, then + * continue. + * 2.2. Set found to true. + * 2.3. If phase is "capturing" and listener's capture is false, then + * continue. + * 2.4. If phase is "bubbling" and listener's capture is true, then + * continue. + */ + if (event._type !== listener.type) + continue; + found = true; + if (phase === "capturing" && !listener.capture) + continue; + if (phase === "bubbling" && listener.capture) + continue; + /** + * 2.5. If listener's once is true, then remove listener from event's + * currentTarget attribute value's event listener list. + */ + if (listener.once && event._currentTarget !== null) { + var impl = event._currentTarget; + var index = -1; + for (var i_1 = 0; i_1 < impl._eventListenerList.length; i_1++) { + if (impl._eventListenerList[i_1] === listener) { + index = i_1; + break; + } + } + if (index !== -1) { + impl._eventListenerList.splice(index, 1); + } + } + /** + * TODO: Implement realms + * + * 2.6. Let global be listener callback's associated Realm's global + * object. + */ + var globalObject = undefined; + /** + * 2.7. Let currentEvent be undefined. + * 2.8. If global is a Window object, then: + * 2.8.1. Set currentEvent to global's current event. + * 2.8.2. If struct's invocation-target-in-shadow-tree is false, then + * set global's current event to event. + */ + var currentEvent = undefined; + if (util_1.Guard.isWindow(globalObject)) { + currentEvent = globalObject._currentEvent; + if (struct.invocationTargetInShadowTree === false) { + globalObject._currentEvent = event; + } + } + /** + * 2.9. If listener's passive is true, then set event's in passive + * listener flag. + * 2.10. Call a user object's operation with listener's callback, + * "handleEvent", « event », and event's currentTarget attribute value. + */ + if (listener.passive) + event._inPassiveListenerFlag = true; + try { + listener.callback.handleEvent.call(event._currentTarget, event); + } + catch (err) { + /** + * If this throws an exception, then: + * 2.10.1. Report the exception. + * 2.10.2. Set legacyOutputDidListenersThrowFlag if given. + * + * _Note:_ The legacyOutputDidListenersThrowFlag is only used by + * Indexed Database API. + * TODO: Report the exception + * See: https://html.spec.whatwg.org/multipage/webappapis.html#runtime-script-errors-in-documents + */ + legacyOutputDidListenersThrowFlag.value = true; + } + /** + * 2.11. Unset event's in passive listener flag. + */ + if (listener.passive) + event._inPassiveListenerFlag = false; + /** + * 2.12. If global is a Window object, then set global's current event + * to currentEvent. + */ + if (util_1.Guard.isWindow(globalObject)) { + globalObject._currentEvent = currentEvent; + } + /** + * 2.13. If event's stop immediate propagation flag is set, then return + * found. + */ + if (event._stopImmediatePropagationFlag) + return found; + } + } + /** + * 3. Return found. + */ + return found; +} +exports.event_innerInvoke = event_innerInvoke; +/** + * Fires an event at target. + * @param e - event name + * @param target - event target + * @param eventConstructor - an event constructor, with a description of how + * IDL attributes are to be initialized + * @param idlAttributes - a dictionary describing how IDL attributes are + * to be initialized + * @param legacyTargetOverrideFlag - legacy target override flag + */ +function event_fireAnEvent(e, target, eventConstructor, idlAttributes, legacyTargetOverrideFlag) { + /** + * 1. If eventConstructor is not given, then let eventConstructor be Event. + */ + if (eventConstructor === undefined) { + eventConstructor = EventImpl_1.EventImpl; + } + /** + * 2. Let event be the result of creating an event given eventConstructor, + * in the relevant Realm of target. + */ + var event = event_createAnEvent(eventConstructor); + /** + * 3. Initialize event’s type attribute to e. + */ + event._type = e; + /** + * 4. Initialize any other IDL attributes of event as described in the + * invocation of this algorithm. + * _Note:_ This also allows for the isTrusted attribute to be set to false. + */ + if (idlAttributes) { + for (var key in idlAttributes) { + var idlObj = event; + idlObj[key] = idlAttributes[key]; + } + } + /** + * 5. Return the result of dispatching event at target, with legacy target + * override flag set if set. + */ + return event_dispatch(event, target, legacyTargetOverrideFlag); +} +exports.event_fireAnEvent = event_fireAnEvent; +/** + * Creates an event. + * + * @param eventInterface - the name of the event interface + */ +function event_createLegacyEvent(eventInterface) { + /** + * 1. Let constructor be null. + */ + var constructor = null; + /** + * TODO: Implement in HTML DOM + * 2. If interface is an ASCII case-insensitive match for any of the strings + * in the first column in the following table, then set constructor to the + * interface in the second column on the same row as the matching string: + * + * String | Interface + * -------|---------- + * "beforeunloadevent" | BeforeUnloadEvent + * "compositionevent" | CompositionEvent + * "customevent" | CustomEvent + * "devicemotionevent" | DeviceMotionEvent + * "deviceorientationevent" | DeviceOrientationEvent + * "dragevent" | DragEvent + * "event" | Event + * "events" | Event + * "focusevent" | FocusEvent + * "hashchangeevent" | HashChangeEvent + * "htmlevents" | Event + * "keyboardevent" | KeyboardEvent + * "messageevent" | MessageEvent + * "mouseevent" | MouseEvent + * "mouseevents" | + * "storageevent" | StorageEvent + * "svgevents" | Event + * "textevent" | CompositionEvent + * "touchevent" | TouchEvent + * "uievent" | UIEvent + * "uievents" | UIEvent + */ + switch (eventInterface.toLowerCase()) { + case "beforeunloadevent": + break; + case "compositionevent": + break; + case "customevent": + constructor = CustomEventImpl_1.CustomEventImpl; + break; + case "devicemotionevent": + break; + case "deviceorientationevent": + break; + case "dragevent": + break; + case "event": + case "events": + constructor = EventImpl_1.EventImpl; + break; + case "focusevent": + break; + case "hashchangeevent": + break; + case "htmlevents": + break; + case "keyboardevent": + break; + case "messageevent": + break; + case "mouseevent": + break; + case "mouseevents": + break; + case "storageevent": + break; + case "svgevents": + break; + case "textevent": + break; + case "touchevent": + break; + case "uievent": + break; + case "uievents": + break; + } + /** + * 3. If constructor is null, then throw a "NotSupportedError" DOMException. + */ + if (constructor === null) { + throw new DOMException_1.NotSupportedError("Event constructor not found for interface " + eventInterface + "."); + } + /** + * 4. If the interface indicated by constructor is not exposed on the + * relevant global object of the context object, then throw a + * "NotSupportedError" DOMException. + * _Note:_ Typically user agents disable support for touch events in some + * configurations, in which case this clause would be triggered for the + * interface TouchEvent. + */ + // TODO: Implement realms + /** + * 5. Let event be the result of creating an event given constructor. + * 6. Initialize event’s type attribute to the empty string. + * 7. Initialize event’s timeStamp attribute to a DOMHighResTimeStamp + * representing the high resolution time from the time origin to now. + * 8. Initialize event’s isTrusted attribute to false. + * 9. Unset event’s initialized flag. + */ + var event = new constructor(""); + event._type = ""; + event._timeStamp = new Date().getTime(); + event._isTrusted = false; + event._initializedFlag = false; + /** + * 10. Return event. + */ + return event; +} +exports.event_createLegacyEvent = event_createLegacyEvent; +/** + * Getter of an event handler IDL attribute. + * + * @param eventTarget - event target + * @param name - event name + */ +function event_getterEventHandlerIDLAttribute(thisObj, name) { + /** + * 1. Let eventTarget be the result of determining the target of an event + * handler given this object and name. + * 2. If eventTarget is null, then return null. + * 3. Return the result of getting the current value of the event handler + * given eventTarget and name. + */ + var eventTarget = event_determineTheTargetOfAnEventHandler(thisObj, name); + if (eventTarget === null) + return null; + return event_getTheCurrentValueOfAnEventHandler(eventTarget, name); +} +exports.event_getterEventHandlerIDLAttribute = event_getterEventHandlerIDLAttribute; +/** + * Setter of an event handler IDL attribute. + * + * @param eventTarget - event target + * @param name - event name + * @param value - event handler + */ +function event_setterEventHandlerIDLAttribute(thisObj, name, value) { + /** + * 1. Let eventTarget be the result of determining the target of an event + * handler given this object and name. + * 2. If eventTarget is null, then return. + * 3. If the given value is null, then deactivate an event handler given + * eventTarget and name. + * 4. Otherwise: + * 4.1. Let handlerMap be eventTarget's event handler map. + * 4.2. Let eventHandler be handlerMap[name]. + * 4.3. Set eventHandler's value to the given value. + * 4.4. Activate an event handler given eventTarget and name. + */ + var eventTarget = event_determineTheTargetOfAnEventHandler(thisObj, name); + if (eventTarget === null) + return; + if (value === null) { + event_deactivateAnEventHandler(eventTarget, name); + } + else { + var handlerMap = eventTarget._eventHandlerMap; + var eventHandler = handlerMap["onabort"]; + if (eventHandler !== undefined) { + eventHandler.value = value; + } + event_activateAnEventHandler(eventTarget, name); + } +} +exports.event_setterEventHandlerIDLAttribute = event_setterEventHandlerIDLAttribute; +/** + * Determines the target of an event handler. + * + * @param eventTarget - event target + * @param name - event name + */ +function event_determineTheTargetOfAnEventHandler(eventTarget, name) { + // TODO: Implement in HTML DOM + return null; +} +exports.event_determineTheTargetOfAnEventHandler = event_determineTheTargetOfAnEventHandler; +/** + * Gets the current value of an event handler. + * + * @param eventTarget - event target + * @param name - event name + */ +function event_getTheCurrentValueOfAnEventHandler(eventTarget, name) { + // TODO: Implement in HTML DOM + return null; +} +exports.event_getTheCurrentValueOfAnEventHandler = event_getTheCurrentValueOfAnEventHandler; +/** + * Activates an event handler. + * + * @param eventTarget - event target + * @param name - event name + */ +function event_activateAnEventHandler(eventTarget, name) { + // TODO: Implement in HTML DOM +} +exports.event_activateAnEventHandler = event_activateAnEventHandler; +/** + * Deactivates an event handler. + * + * @param eventTarget - event target + * @param name - event name + */ +function event_deactivateAnEventHandler(eventTarget, name) { + // TODO: Implement in HTML DOM +} +exports.event_deactivateAnEventHandler = event_deactivateAnEventHandler; +//# sourceMappingURL=EventAlgorithm.js.map + +/***/ }), + +/***/ 21312: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +/** + * Flattens the given options argument. + * + * @param options - options argument + */ +function eventTarget_flatten(options) { + /** + * 1. If options is a boolean, then return options. + * 2. Return options’s capture. + */ + if (util_1.isBoolean(options)) { + return options; + } + else { + return options.capture || false; + } +} +exports.eventTarget_flatten = eventTarget_flatten; +/** + * Flattens the given options argument. + * + * @param options - options argument + */ +function eventTarget_flattenMore(options) { + /** + * 1. Let capture be the result of flattening options. + * 2. Let once and passive be false. + * 3. If options is a dictionary, then set passive to options’s passive and + * once to options’s once. + * 4. Return capture, passive, and once. + */ + var capture = eventTarget_flatten(options); + var once = false; + var passive = false; + if (!util_1.isBoolean(options)) { + once = options.once || false; + passive = options.passive || false; + } + return [capture, passive, once]; +} +exports.eventTarget_flattenMore = eventTarget_flattenMore; +/** + * Adds a new event listener. + * + * @param eventTarget - event target + * @param listener - event listener + */ +function eventTarget_addEventListener(eventTarget, listener) { + /** + * 1. If eventTarget is a ServiceWorkerGlobalScope object, its service + * worker’s script resource’s has ever been evaluated flag is set, and + * listener’s type matches the type attribute value of any of the service + * worker events, then report a warning to the console that this might not + * give the expected results. [SERVICE-WORKERS] + */ + // TODO: service worker + /** + * 2. If listener’s callback is null, then return. + */ + if (listener.callback === null) + return; + /** + * 3. If eventTarget’s event listener list does not contain an event listener + * whose type is listener’s type, callback is listener’s callback, and capture + * is listener’s capture, then append listener to eventTarget’s event listener + * list. + */ + for (var i = 0; i < eventTarget._eventListenerList.length; i++) { + var entry = eventTarget._eventListenerList[i]; + if (entry.type === listener.type && entry.callback.handleEvent === listener.callback.handleEvent + && entry.capture === listener.capture) { + return; + } + } + eventTarget._eventListenerList.push(listener); +} +exports.eventTarget_addEventListener = eventTarget_addEventListener; +/** + * Removes an event listener. + * + * @param eventTarget - event target + * @param listener - event listener + */ +function eventTarget_removeEventListener(eventTarget, listener, index) { + /** + * 1. If eventTarget is a ServiceWorkerGlobalScope object and its service + * worker’s set of event types to handle contains type, then report a + * warning to the console that this might not give the expected results. + * [SERVICE-WORKERS] + */ + // TODO: service worker + /** + * 2. Set listener’s removed to true and remove listener from eventTarget’s + * event listener list. + */ + listener.removed = true; + eventTarget._eventListenerList.splice(index, 1); +} +exports.eventTarget_removeEventListener = eventTarget_removeEventListener; +/** + * Removes all event listeners. + * + * @param eventTarget - event target + */ +function eventTarget_removeAllEventListeners(eventTarget) { + /** + * To remove all event listeners, given an EventTarget object eventTarget, + * for each listener of eventTarget’s event listener list, remove an event + * listener with eventTarget and listener. + */ + var e_1, _a; + try { + for (var _b = __values(eventTarget._eventListenerList), _c = _b.next(); !_c.done; _c = _b.next()) { + var e = _c.value; + e.removed = true; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + eventTarget._eventListenerList.length = 0; +} +exports.eventTarget_removeAllEventListeners = eventTarget_removeAllEventListeners; +//# sourceMappingURL=EventTargetAlgorithm.js.map + +/***/ }), + +/***/ 45463: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var DOMException_1 = __nccwpck_require__(13166); +var interfaces_1 = __nccwpck_require__(27305); +var util_1 = __nccwpck_require__(65282); +var util_2 = __nccwpck_require__(76195); +var infra_1 = __nccwpck_require__(84251); +var CustomElementAlgorithm_1 = __nccwpck_require__(35648); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var NodeIteratorAlgorithm_1 = __nccwpck_require__(3973); +var ShadowTreeAlgorithm_1 = __nccwpck_require__(68733); +var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); +var DOMAlgorithm_1 = __nccwpck_require__(9628); +var DocumentAlgorithm_1 = __nccwpck_require__(12793); +/** + * Ensures pre-insertion validity of a node into a parent before a + * child. + * + * @param node - node to insert + * @param parent - parent node to receive node + * @param child - child node to insert node before + */ +function mutation_ensurePreInsertionValidity(node, parent, child) { + var e_1, _a, e_2, _b, e_3, _c, e_4, _d; + var parentNodeType = parent._nodeType; + var nodeNodeType = node._nodeType; + var childNodeType = child ? child._nodeType : null; + /** + * 1. If parent is not a Document, DocumentFragment, or Element node, + * throw a "HierarchyRequestError" DOMException. + */ + if (parentNodeType !== interfaces_1.NodeType.Document && + parentNodeType !== interfaces_1.NodeType.DocumentFragment && + parentNodeType !== interfaces_1.NodeType.Element) + throw new DOMException_1.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is " + parent.nodeName + "."); + /** + * 2. If node is a host-including inclusive ancestor of parent, throw a + * "HierarchyRequestError" DOMException. + */ + if (TreeAlgorithm_1.tree_isHostIncludingAncestorOf(parent, node, true)) + throw new DOMException_1.HierarchyRequestError("The node to be inserted cannot be an inclusive ancestor of parent node. Node is " + node.nodeName + ", parent node is " + parent.nodeName + "."); + /** + * 3. If child is not null and its parent is not parent, then throw a + * "NotFoundError" DOMException. + */ + if (child !== null && child._parent !== parent) + throw new DOMException_1.NotFoundError("The reference child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + "."); + /** + * 4. If node is not a DocumentFragment, DocumentType, Element, Text, + * ProcessingInstruction, or Comment node, throw a "HierarchyRequestError" + * DOMException. + */ + if (nodeNodeType !== interfaces_1.NodeType.DocumentFragment && + nodeNodeType !== interfaces_1.NodeType.DocumentType && + nodeNodeType !== interfaces_1.NodeType.Element && + nodeNodeType !== interfaces_1.NodeType.Text && + nodeNodeType !== interfaces_1.NodeType.ProcessingInstruction && + nodeNodeType !== interfaces_1.NodeType.CData && + nodeNodeType !== interfaces_1.NodeType.Comment) + throw new DOMException_1.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is " + node.nodeName + "."); + /** + * 5. If either node is a Text node and parent is a document, or node is a + * doctype and parent is not a document, throw a "HierarchyRequestError" + * DOMException. + */ + if (nodeNodeType === interfaces_1.NodeType.Text && + parentNodeType === interfaces_1.NodeType.Document) + throw new DOMException_1.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is " + node.nodeName + "."); + if (nodeNodeType === interfaces_1.NodeType.DocumentType && + parentNodeType !== interfaces_1.NodeType.Document) + throw new DOMException_1.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is " + parent.nodeName + "."); + /** + * 6. If parent is a document, and any of the statements below, switched on + * node, are true, throw a "HierarchyRequestError" DOMException. + * - DocumentFragment node + * If node has more than one element child or has a Text node child. + * Otherwise, if node has one element child and either parent has an element + * child, child is a doctype, or child is not null and a doctype is + * following child. + * - element + * parent has an element child, child is a doctype, or child is not null and + * a doctype is following child. + * - doctype + * parent has a doctype child, child is non-null and an element is preceding + * child, or child is null and parent has an element child. + */ + if (parentNodeType === interfaces_1.NodeType.Document) { + if (nodeNodeType === interfaces_1.NodeType.DocumentFragment) { + var eleCount = 0; + try { + for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) { + var childNode = _f.value; + if (childNode._nodeType === interfaces_1.NodeType.Element) + eleCount++; + else if (childNode._nodeType === interfaces_1.NodeType.Text) + throw new DOMException_1.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is " + childNode.nodeName + "."); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_f && !_f.done && (_a = _e.return)) _a.call(_e); + } + finally { if (e_1) throw e_1.error; } + } + if (eleCount > 1) { + throw new DOMException_1.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has " + eleCount + " element nodes."); + } + else if (eleCount === 1) { + try { + for (var _g = __values(parent._children), _h = _g.next(); !_h.done; _h = _g.next()) { + var ele = _h.value; + if (ele._nodeType === interfaces_1.NodeType.Element) + throw new DOMException_1.HierarchyRequestError("The document node already has a document element node."); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_h && !_h.done && (_b = _g.return)) _b.call(_g); + } + finally { if (e_2) throw e_2.error; } + } + if (child) { + if (childNodeType === interfaces_1.NodeType.DocumentType) + throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node."); + var doctypeChild = child._nextSibling; + while (doctypeChild) { + if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) + throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node."); + doctypeChild = doctypeChild._nextSibling; + } + } + } + } + else if (nodeNodeType === interfaces_1.NodeType.Element) { + try { + for (var _j = __values(parent._children), _k = _j.next(); !_k.done; _k = _j.next()) { + var ele = _k.value; + if (ele._nodeType === interfaces_1.NodeType.Element) + throw new DOMException_1.HierarchyRequestError("Document already has a document element node. Node is " + node.nodeName + "."); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_k && !_k.done && (_c = _j.return)) _c.call(_j); + } + finally { if (e_3) throw e_3.error; } + } + if (child) { + if (childNodeType === interfaces_1.NodeType.DocumentType) + throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + "."); + var doctypeChild = child._nextSibling; + while (doctypeChild) { + if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) + throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + "."); + doctypeChild = doctypeChild._nextSibling; + } + } + } + else if (nodeNodeType === interfaces_1.NodeType.DocumentType) { + try { + for (var _l = __values(parent._children), _m = _l.next(); !_m.done; _m = _l.next()) { + var ele = _m.value; + if (ele._nodeType === interfaces_1.NodeType.DocumentType) + throw new DOMException_1.HierarchyRequestError("Document already has a document type node. Node is " + node.nodeName + "."); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_m && !_m.done && (_d = _l.return)) _d.call(_l); + } + finally { if (e_4) throw e_4.error; } + } + if (child) { + var elementChild = child._previousSibling; + while (elementChild) { + if (elementChild._nodeType === interfaces_1.NodeType.Element) + throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + "."); + elementChild = elementChild._previousSibling; + } + } + else { + var elementChild = parent._firstChild; + while (elementChild) { + if (elementChild._nodeType === interfaces_1.NodeType.Element) + throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + "."); + elementChild = elementChild._nextSibling; + } + } + } + } +} +exports.mutation_ensurePreInsertionValidity = mutation_ensurePreInsertionValidity; +/** + * Ensures pre-insertion validity of a node into a parent before a + * child, then adopts the node to the tree and inserts it. + * + * @param node - node to insert + * @param parent - parent node to receive node + * @param child - child node to insert node before + */ +function mutation_preInsert(node, parent, child) { + /** + * 1. Ensure pre-insertion validity of node into parent before child. + * 2. Let reference child be child. + * 3. If reference child is node, set it to node’s next sibling. + * 4. Adopt node into parent’s node document. + * 5. Insert node into parent before reference child. + * 6. Return node. + */ + mutation_ensurePreInsertionValidity(node, parent, child); + var referenceChild = child; + if (referenceChild === node) + referenceChild = node._nextSibling; + DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument); + mutation_insert(node, parent, referenceChild); + return node; +} +exports.mutation_preInsert = mutation_preInsert; +/** + * Inserts a node into a parent node before the given child node. + * + * @param node - node to insert + * @param parent - parent node to receive node + * @param child - child node to insert node before + * @param suppressObservers - whether to notify observers + */ +function mutation_insert(node, parent, child, suppressObservers) { + var e_5, _a; + // Optimized common case + if (child === null && node._nodeType !== interfaces_1.NodeType.DocumentFragment) { + mutation_insert_single(node, parent, suppressObservers); + return; + } + /** + * 1. Let count be the number of children of node if it is a + * DocumentFragment node, and one otherwise. + */ + var count = (node._nodeType === interfaces_1.NodeType.DocumentFragment ? + node._children.size : 1); + /** + * 2. If child is non-null, then: + */ + if (child !== null) { + /** + * 2.1. For each live range whose start node is parent and start + * offset is greater than child's index, increase its start + * offset by count. + * 2.2. For each live range whose end node is parent and end + * offset is greater than child's index, increase its end + * offset by count. + */ + if (DOMImpl_1.dom.rangeList.size !== 0) { + var index_1 = TreeAlgorithm_1.tree_index(child); + try { + for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) { + var range = _c.value; + if (range._start[0] === parent && range._start[1] > index_1) { + range._start[1] += count; + } + if (range._end[0] === parent && range._end[1] > index_1) { + range._end[1] += count; + } + } + } + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_5) throw e_5.error; } + } + } + } + /** + * 3. Let nodes be node’s children, if node is a DocumentFragment node; + * otherwise « node ». + */ + var nodes = node._nodeType === interfaces_1.NodeType.DocumentFragment ? new (Array.bind.apply(Array, __spread([void 0], node._children)))() : [node]; + /** + * 4. If node is a DocumentFragment node, remove its children with the + * suppress observers flag set. + */ + if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { + while (node._firstChild) { + mutation_remove(node._firstChild, node, true); + } + } + /** + * 5. If node is a DocumentFragment node, then queue a tree mutation record + * for node with « », nodes, null, and null. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { + MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(node, [], nodes, null, null); + } + } + /** + * 6. Let previousSibling be child’s previous sibling or parent’s last + * child if child is null. + */ + var previousSibling = (child ? child._previousSibling : parent._lastChild); + var index = child === null ? -1 : TreeAlgorithm_1.tree_index(child); + /** + * 7. For each node in nodes, in tree order: + */ + for (var i = 0; i < nodes.length; i++) { + var node_1 = nodes[i]; + if (util_1.Guard.isElementNode(node_1)) { + // set document element node + if (util_1.Guard.isDocumentNode(parent)) { + parent._documentElement = node_1; + } + // mark that the document has namespaces + if (!node_1._nodeDocument._hasNamespaces && (node_1._namespace !== null || + node_1._namespacePrefix !== null)) { + node_1._nodeDocument._hasNamespaces = true; + } + } + /** + * 7.1. If child is null, then append node to parent’s children. + * 7.2. Otherwise, insert node into parent’s children before child’s + * index. + */ + node_1._parent = parent; + if (child === null) { + infra_1.set.append(parent._children, node_1); + } + else { + infra_1.set.insert(parent._children, node_1, index); + index++; + } + // assign siblings and children for quick lookups + if (parent._firstChild === null) { + node_1._previousSibling = null; + node_1._nextSibling = null; + parent._firstChild = node_1; + parent._lastChild = node_1; + } + else { + var prev = (child ? child._previousSibling : parent._lastChild); + var next = (child ? child : null); + node_1._previousSibling = prev; + node_1._nextSibling = next; + if (prev) + prev._nextSibling = node_1; + if (next) + next._previousSibling = node_1; + if (!prev) + parent._firstChild = node_1; + if (!next) + parent._lastChild = node_1; + } + /** + * 7.3. If parent is a shadow host and node is a slotable, then + * assign a slot for node. + */ + if (DOMImpl_1.dom.features.slots) { + if (parent._shadowRoot !== null && util_1.Guard.isSlotable(node_1)) { + ShadowTreeAlgorithm_1.shadowTree_assignASlot(node_1); + } + } + /** + * 7.4. If node is a Text node, run the child text content change + * steps for parent. + */ + if (DOMImpl_1.dom.features.steps) { + if (util_1.Guard.isTextNode(node_1)) { + DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent); + } + } + /** + * 7.5. If parent's root is a shadow root, and parent is a slot + * whose assigned nodes is the empty list, then run signal + * a slot change for parent. + */ + if (DOMImpl_1.dom.features.slots) { + if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) && + util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) { + ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent); + } + } + /** + * 7.6. Run assign slotables for a tree with node's root. + */ + if (DOMImpl_1.dom.features.slots) { + ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(node_1)); + } + /** + * 7.7. For each shadow-including inclusive descendant + * inclusiveDescendant of node, in shadow-including tree + * order: + */ + var inclusiveDescendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node_1, true, true); + while (inclusiveDescendant !== null) { + /** + * 7.7.1. Run the insertion steps with inclusiveDescendant. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runInsertionSteps(inclusiveDescendant); + } + if (DOMImpl_1.dom.features.customElements) { + /** + * 7.7.2. If inclusiveDescendant is connected, then: + */ + if (util_1.Guard.isElementNode(inclusiveDescendant) && + ShadowTreeAlgorithm_1.shadowTree_isConnected(inclusiveDescendant)) { + if (util_1.Guard.isCustomElementNode(inclusiveDescendant)) { + /** + * 7.7.2.1. If inclusiveDescendant is custom, then enqueue a custom + * element callback reaction with inclusiveDescendant, callback name + * "connectedCallback", and an empty argument list. + */ + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(inclusiveDescendant, "connectedCallback", []); + } + else { + /** + * 7.7.2.2. Otherwise, try to upgrade inclusiveDescendant. + */ + CustomElementAlgorithm_1.customElement_tryToUpgrade(inclusiveDescendant); + } + } + } + inclusiveDescendant = TreeAlgorithm_1.tree_getNextDescendantNode(node_1, inclusiveDescendant, true, true); + } + } + /** + * 8. If suppress observers flag is unset, then queue a tree mutation record + * for parent with nodes, « », previousSibling, and child. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + if (!suppressObservers) { + MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, nodes, [], previousSibling, child); + } + } +} +exports.mutation_insert = mutation_insert; +/** + * Inserts a node into a parent node. Optimized routine for the common case where + * node is not a document fragment node and it has no child nodes. + * + * @param node - node to insert + * @param parent - parent node to receive node + * @param suppressObservers - whether to notify observers + */ +function mutation_insert_single(node, parent, suppressObservers) { + /** + * 1. Let count be the number of children of node if it is a + * DocumentFragment node, and one otherwise. + * 2. If child is non-null, then: + * 2.1. For each live range whose start node is parent and start + * offset is greater than child's index, increase its start + * offset by count. + * 2.2. For each live range whose end node is parent and end + * offset is greater than child's index, increase its end + * offset by count. + * 3. Let nodes be node’s children, if node is a DocumentFragment node; + * otherwise « node ». + * 4. If node is a DocumentFragment node, remove its children with the + * suppress observers flag set. + * 5. If node is a DocumentFragment node, then queue a tree mutation record + * for node with « », nodes, null, and null. + */ + /** + * 6. Let previousSibling be child’s previous sibling or parent’s last + * child if child is null. + */ + var previousSibling = parent._lastChild; + // set document element node + if (util_1.Guard.isElementNode(node)) { + // set document element node + if (util_1.Guard.isDocumentNode(parent)) { + parent._documentElement = node; + } + // mark that the document has namespaces + if (!node._nodeDocument._hasNamespaces && (node._namespace !== null || + node._namespacePrefix !== null)) { + node._nodeDocument._hasNamespaces = true; + } + } + /** + * 7. For each node in nodes, in tree order: + * 7.1. If child is null, then append node to parent’s children. + * 7.2. Otherwise, insert node into parent’s children before child’s + * index. + */ + node._parent = parent; + parent._children.add(node); + // assign siblings and children for quick lookups + if (parent._firstChild === null) { + node._previousSibling = null; + node._nextSibling = null; + parent._firstChild = node; + parent._lastChild = node; + } + else { + var prev = parent._lastChild; + node._previousSibling = prev; + node._nextSibling = null; + if (prev) + prev._nextSibling = node; + if (!prev) + parent._firstChild = node; + parent._lastChild = node; + } + /** + * 7.3. If parent is a shadow host and node is a slotable, then + * assign a slot for node. + */ + if (DOMImpl_1.dom.features.slots) { + if (parent._shadowRoot !== null && util_1.Guard.isSlotable(node)) { + ShadowTreeAlgorithm_1.shadowTree_assignASlot(node); + } + } + /** + * 7.4. If node is a Text node, run the child text content change + * steps for parent. + */ + if (DOMImpl_1.dom.features.steps) { + if (util_1.Guard.isTextNode(node)) { + DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent); + } + } + /** + * 7.5. If parent's root is a shadow root, and parent is a slot + * whose assigned nodes is the empty list, then run signal + * a slot change for parent. + */ + if (DOMImpl_1.dom.features.slots) { + if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) && + util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) { + ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent); + } + } + /** + * 7.6. Run assign slotables for a tree with node's root. + */ + if (DOMImpl_1.dom.features.slots) { + ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(node)); + } + /** + * 7.7. For each shadow-including inclusive descendant + * inclusiveDescendant of node, in shadow-including tree + * order: + * 7.7.1. Run the insertion steps with inclusiveDescendant. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runInsertionSteps(node); + } + if (DOMImpl_1.dom.features.customElements) { + /** + * 7.7.2. If inclusiveDescendant is connected, then: + */ + if (util_1.Guard.isElementNode(node) && + ShadowTreeAlgorithm_1.shadowTree_isConnected(node)) { + if (util_1.Guard.isCustomElementNode(node)) { + /** + * 7.7.2.1. If inclusiveDescendant is custom, then enqueue a custom + * element callback reaction with inclusiveDescendant, callback name + * "connectedCallback", and an empty argument list. + */ + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(node, "connectedCallback", []); + } + else { + /** + * 7.7.2.2. Otherwise, try to upgrade inclusiveDescendant. + */ + CustomElementAlgorithm_1.customElement_tryToUpgrade(node); + } + } + } + /** + * 8. If suppress observers flag is unset, then queue a tree mutation record + * for parent with nodes, « », previousSibling, and child. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + if (!suppressObservers) { + MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, [node], [], previousSibling, null); + } + } +} +/** + * Appends a node to the children of a parent node. + * + * @param node - a node + * @param parent - the parent to receive node + */ +function mutation_append(node, parent) { + /** + * To append a node to a parent, pre-insert node into parent before null. + */ + return mutation_preInsert(node, parent, null); +} +exports.mutation_append = mutation_append; +/** + * Replaces a node with another node. + * + * @param child - child node to remove + * @param node - node to insert + * @param parent - parent node to receive node + */ +function mutation_replace(child, node, parent) { + var e_6, _a, e_7, _b, e_8, _c, e_9, _d; + /** + * 1. If parent is not a Document, DocumentFragment, or Element node, + * throw a "HierarchyRequestError" DOMException. + */ + if (parent._nodeType !== interfaces_1.NodeType.Document && + parent._nodeType !== interfaces_1.NodeType.DocumentFragment && + parent._nodeType !== interfaces_1.NodeType.Element) + throw new DOMException_1.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is " + parent.nodeName + "."); + /** + * 2. If node is a host-including inclusive ancestor of parent, throw a + * "HierarchyRequestError" DOMException. + */ + if (TreeAlgorithm_1.tree_isHostIncludingAncestorOf(parent, node, true)) + throw new DOMException_1.HierarchyRequestError("The node to be inserted cannot be an ancestor of parent node. Node is " + node.nodeName + ", parent node is " + parent.nodeName + "."); + /** + * 3. If child’s parent is not parent, then throw a "NotFoundError" + * DOMException. + */ + if (child._parent !== parent) + throw new DOMException_1.NotFoundError("The reference child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + "."); + /** + * 4. If node is not a DocumentFragment, DocumentType, Element, Text, + * ProcessingInstruction, or Comment node, throw a "HierarchyRequestError" + * DOMException. + */ + if (node._nodeType !== interfaces_1.NodeType.DocumentFragment && + node._nodeType !== interfaces_1.NodeType.DocumentType && + node._nodeType !== interfaces_1.NodeType.Element && + node._nodeType !== interfaces_1.NodeType.Text && + node._nodeType !== interfaces_1.NodeType.ProcessingInstruction && + node._nodeType !== interfaces_1.NodeType.CData && + node._nodeType !== interfaces_1.NodeType.Comment) + throw new DOMException_1.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is " + node.nodeName + "."); + /** + * 5. If either node is a Text node and parent is a document, or node is a + * doctype and parent is not a document, throw a "HierarchyRequestError" + * DOMException. + */ + if (node._nodeType === interfaces_1.NodeType.Text && + parent._nodeType === interfaces_1.NodeType.Document) + throw new DOMException_1.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is " + node.nodeName + "."); + if (node._nodeType === interfaces_1.NodeType.DocumentType && + parent._nodeType !== interfaces_1.NodeType.Document) + throw new DOMException_1.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is " + parent.nodeName + "."); + /** + * 6. If parent is a document, and any of the statements below, switched on + * node, are true, throw a "HierarchyRequestError" DOMException. + * - DocumentFragment node + * If node has more than one element child or has a Text node child. + * Otherwise, if node has one element child and either parent has an element + * child that is not child or a doctype is following child. + * - element + * parent has an element child that is not child or a doctype is + * following child. + * - doctype + * parent has a doctype child that is not child, or an element is + * preceding child. + */ + if (parent._nodeType === interfaces_1.NodeType.Document) { + if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { + var eleCount = 0; + try { + for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) { + var childNode = _f.value; + if (childNode._nodeType === interfaces_1.NodeType.Element) + eleCount++; + else if (childNode._nodeType === interfaces_1.NodeType.Text) + throw new DOMException_1.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is " + childNode.nodeName + "."); + } + } + catch (e_6_1) { e_6 = { error: e_6_1 }; } + finally { + try { + if (_f && !_f.done && (_a = _e.return)) _a.call(_e); + } + finally { if (e_6) throw e_6.error; } + } + if (eleCount > 1) { + throw new DOMException_1.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has " + eleCount + " element nodes."); + } + else if (eleCount === 1) { + try { + for (var _g = __values(parent._children), _h = _g.next(); !_h.done; _h = _g.next()) { + var ele = _h.value; + if (ele._nodeType === interfaces_1.NodeType.Element && ele !== child) + throw new DOMException_1.HierarchyRequestError("The document node already has a document element node."); + } + } + catch (e_7_1) { e_7 = { error: e_7_1 }; } + finally { + try { + if (_h && !_h.done && (_b = _g.return)) _b.call(_g); + } + finally { if (e_7) throw e_7.error; } + } + var doctypeChild = child._nextSibling; + while (doctypeChild) { + if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) + throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node."); + doctypeChild = doctypeChild._nextSibling; + } + } + } + else if (node._nodeType === interfaces_1.NodeType.Element) { + try { + for (var _j = __values(parent._children), _k = _j.next(); !_k.done; _k = _j.next()) { + var ele = _k.value; + if (ele._nodeType === interfaces_1.NodeType.Element && ele !== child) + throw new DOMException_1.HierarchyRequestError("Document already has a document element node. Node is " + node.nodeName + "."); + } + } + catch (e_8_1) { e_8 = { error: e_8_1 }; } + finally { + try { + if (_k && !_k.done && (_c = _j.return)) _c.call(_j); + } + finally { if (e_8) throw e_8.error; } + } + var doctypeChild = child._nextSibling; + while (doctypeChild) { + if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) + throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + "."); + doctypeChild = doctypeChild._nextSibling; + } + } + else if (node._nodeType === interfaces_1.NodeType.DocumentType) { + try { + for (var _l = __values(parent._children), _m = _l.next(); !_m.done; _m = _l.next()) { + var ele = _m.value; + if (ele._nodeType === interfaces_1.NodeType.DocumentType && ele !== child) + throw new DOMException_1.HierarchyRequestError("Document already has a document type node. Node is " + node.nodeName + "."); + } + } + catch (e_9_1) { e_9 = { error: e_9_1 }; } + finally { + try { + if (_m && !_m.done && (_d = _l.return)) _d.call(_l); + } + finally { if (e_9) throw e_9.error; } + } + var elementChild = child._previousSibling; + while (elementChild) { + if (elementChild._nodeType === interfaces_1.NodeType.Element) + throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + "."); + elementChild = elementChild._previousSibling; + } + } + } + /** + * 7. Let reference child be child’s next sibling. + * 8. If reference child is node, set it to node’s next sibling. + * 8. Let previousSibling be child’s previous sibling. + */ + var referenceChild = child._nextSibling; + if (referenceChild === node) + referenceChild = node._nextSibling; + var previousSibling = child._previousSibling; + /** + * 10. Adopt node into parent’s node document. + * 11. Let removedNodes be the empty list. + */ + DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument); + var removedNodes = []; + /** + * 12. If child’s parent is not null, then: + */ + if (child._parent !== null) { + /** + * 12.1. Set removedNodes to [child]. + * 12.2. Remove child from its parent with the suppress observers flag + * set. + */ + removedNodes.push(child); + mutation_remove(child, child._parent, true); + } + /** + * 13. Let nodes be node’s children if node is a DocumentFragment node; + * otherwise [node]. + */ + var nodes = []; + if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { + nodes = Array.from(node._children); + } + else { + nodes.push(node); + } + /** + * 14. Insert node into parent before reference child with the suppress + * observers flag set. + */ + mutation_insert(node, parent, referenceChild, true); + /** + * 15. Queue a tree mutation record for parent with nodes, removedNodes, + * previousSibling, and reference child. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, nodes, removedNodes, previousSibling, referenceChild); + } + /** + * 16. Return child. + */ + return child; +} +exports.mutation_replace = mutation_replace; +/** + * Replaces all nodes of a parent with the given node. + * + * @param node - node to insert + * @param parent - parent node to receive node + */ +function mutation_replaceAll(node, parent) { + var e_10, _a; + /** + * 1. If node is not null, adopt node into parent’s node document. + */ + if (node !== null) { + DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument); + } + /** + * 2. Let removedNodes be parent’s children. + */ + var removedNodes = Array.from(parent._children); + /** + * 3. Let addedNodes be the empty list. + * 4. If node is DocumentFragment node, then set addedNodes to node’s + * children. + * 5. Otherwise, if node is non-null, set addedNodes to [node]. + */ + var addedNodes = []; + if (node && node._nodeType === interfaces_1.NodeType.DocumentFragment) { + addedNodes = Array.from(node._children); + } + else if (node !== null) { + addedNodes.push(node); + } + try { + /** + * 6. Remove all parent’s children, in tree order, with the suppress + * observers flag set. + */ + for (var removedNodes_1 = __values(removedNodes), removedNodes_1_1 = removedNodes_1.next(); !removedNodes_1_1.done; removedNodes_1_1 = removedNodes_1.next()) { + var childNode = removedNodes_1_1.value; + mutation_remove(childNode, parent, true); + } + } + catch (e_10_1) { e_10 = { error: e_10_1 }; } + finally { + try { + if (removedNodes_1_1 && !removedNodes_1_1.done && (_a = removedNodes_1.return)) _a.call(removedNodes_1); + } + finally { if (e_10) throw e_10.error; } + } + /** + * 7. If node is not null, then insert node into parent before null with the + * suppress observers flag set. + */ + if (node !== null) { + mutation_insert(node, parent, null, true); + } + /** + * 8. Queue a tree mutation record for parent with addedNodes, removedNodes, + * null, and null. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, addedNodes, removedNodes, null, null); + } +} +exports.mutation_replaceAll = mutation_replaceAll; +/** + * Ensures pre-removal validity of a child node from a parent, then + * removes it. + * + * @param child - child node to remove + * @param parent - parent node + */ +function mutation_preRemove(child, parent) { + /** + * 1. If child’s parent is not parent, then throw a "NotFoundError" + * DOMException. + * 2. Remove child from parent. + * 3. Return child. + */ + if (child._parent !== parent) + throw new DOMException_1.NotFoundError("The child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + "."); + mutation_remove(child, parent); + return child; +} +exports.mutation_preRemove = mutation_preRemove; +/** + * Removes a child node from its parent. + * + * @param node - node to remove + * @param parent - parent node + * @param suppressObservers - whether to notify observers + */ +function mutation_remove(node, parent, suppressObservers) { + var e_11, _a, e_12, _b, e_13, _c, e_14, _d; + if (DOMImpl_1.dom.rangeList.size !== 0) { + /** + * 1. Let index be node’s index. + */ + var index = TreeAlgorithm_1.tree_index(node); + try { + /** + * 2. For each live range whose start node is an inclusive descendant of + * node, set its start to (parent, index). + * 3. For each live range whose end node is an inclusive descendant of + * node, set its end to (parent, index). + */ + for (var _e = __values(DOMImpl_1.dom.rangeList), _f = _e.next(); !_f.done; _f = _e.next()) { + var range = _f.value; + if (TreeAlgorithm_1.tree_isDescendantOf(node, range._start[0], true)) { + range._start = [parent, index]; + } + if (TreeAlgorithm_1.tree_isDescendantOf(node, range._end[0], true)) { + range._end = [parent, index]; + } + if (range._start[0] === parent && range._start[1] > index) { + range._start[1]--; + } + if (range._end[0] === parent && range._end[1] > index) { + range._end[1]--; + } + } + } + catch (e_11_1) { e_11 = { error: e_11_1 }; } + finally { + try { + if (_f && !_f.done && (_a = _e.return)) _a.call(_e); + } + finally { if (e_11) throw e_11.error; } + } + try { + /** + * 4. For each live range whose start node is parent and start offset is + * greater than index, decrease its start offset by 1. + * 5. For each live range whose end node is parent and end offset is greater + * than index, decrease its end offset by 1. + */ + for (var _g = __values(DOMImpl_1.dom.rangeList), _h = _g.next(); !_h.done; _h = _g.next()) { + var range = _h.value; + if (range._start[0] === parent && range._start[1] > index) { + range._start[1] -= 1; + } + if (range._end[0] === parent && range._end[1] > index) { + range._end[1] -= 1; + } + } + } + catch (e_12_1) { e_12 = { error: e_12_1 }; } + finally { + try { + if (_h && !_h.done && (_b = _g.return)) _b.call(_g); + } + finally { if (e_12) throw e_12.error; } + } + } + /** + * 6. For each NodeIterator object iterator whose root’s node document is + * node’s node document, run the NodeIterator pre-removing steps given node + * and iterator. + */ + if (DOMImpl_1.dom.features.steps) { + try { + for (var _j = __values(NodeIteratorAlgorithm_1.nodeIterator_iteratorList()), _k = _j.next(); !_k.done; _k = _j.next()) { + var iterator = _k.value; + if (iterator._root._nodeDocument === node._nodeDocument) { + DOMAlgorithm_1.dom_runNodeIteratorPreRemovingSteps(iterator, node); + } + } + } + catch (e_13_1) { e_13 = { error: e_13_1 }; } + finally { + try { + if (_k && !_k.done && (_c = _j.return)) _c.call(_j); + } + finally { if (e_13) throw e_13.error; } + } + } + /** + * 7. Let oldPreviousSibling be node’s previous sibling. + * 8. Let oldNextSibling be node’s next sibling. + */ + var oldPreviousSibling = node._previousSibling; + var oldNextSibling = node._nextSibling; + // set document element node + if (util_1.Guard.isDocumentNode(parent) && util_1.Guard.isElementNode(node)) { + parent._documentElement = null; + } + /** + * 9. Remove node from its parent’s children. + */ + node._parent = null; + parent._children.delete(node); + // assign siblings and children for quick lookups + var prev = node._previousSibling; + var next = node._nextSibling; + node._previousSibling = null; + node._nextSibling = null; + if (prev) + prev._nextSibling = next; + if (next) + next._previousSibling = prev; + if (!prev) + parent._firstChild = next; + if (!next) + parent._lastChild = prev; + /** + * 10. If node is assigned, then run assign slotables for node’s assigned + * slot. + */ + if (DOMImpl_1.dom.features.slots) { + if (util_1.Guard.isSlotable(node) && node._assignedSlot !== null && ShadowTreeAlgorithm_1.shadowTree_isAssigned(node)) { + ShadowTreeAlgorithm_1.shadowTree_assignSlotables(node._assignedSlot); + } + } + /** + * 11. If parent’s root is a shadow root, and parent is a slot whose + * assigned nodes is the empty list, then run signal a slot change for + * parent. + */ + if (DOMImpl_1.dom.features.slots) { + if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) && + util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) { + ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent); + } + } + /** + * 12. If node has an inclusive descendant that is a slot, then: + * 12.1. Run assign slotables for a tree with parent's root. + * 12.2. Run assign slotables for a tree with node. + */ + if (DOMImpl_1.dom.features.slots) { + var descendant_1 = TreeAlgorithm_1.tree_getFirstDescendantNode(node, true, false, function (e) { return util_1.Guard.isSlot(e); }); + if (descendant_1 !== null) { + ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(parent)); + ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(node); + } + } + /** + * 13. Run the removing steps with node and parent. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runRemovingSteps(node, parent); + } + /** + * 14. If node is custom, then enqueue a custom element callback + * reaction with node, callback name "disconnectedCallback", + * and an empty argument list. + */ + if (DOMImpl_1.dom.features.customElements) { + if (util_1.Guard.isCustomElementNode(node)) { + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(node, "disconnectedCallback", []); + } + } + /** + * 15. For each shadow-including descendant descendant of node, + * in shadow-including tree order, then: + */ + var descendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node, false, true); + while (descendant !== null) { + /** + * 15.1. Run the removing steps with descendant. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runRemovingSteps(descendant, node); + } + /** + * 15.2. If descendant is custom, then enqueue a custom element + * callback reaction with descendant, callback name + * "disconnectedCallback", and an empty argument list. + */ + if (DOMImpl_1.dom.features.customElements) { + if (util_1.Guard.isCustomElementNode(descendant)) { + CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(descendant, "disconnectedCallback", []); + } + } + descendant = TreeAlgorithm_1.tree_getNextDescendantNode(node, descendant, false, true); + } + /** + * 16. For each inclusive ancestor inclusiveAncestor of parent, and + * then for each registered of inclusiveAncestor's registered + * observer list, if registered's options's subtree is true, + * then append a new transient registered observer whose + * observer is registered's observer, options is registered's + * options, and source is registered to node's registered + * observer list. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + var inclusiveAncestor = TreeAlgorithm_1.tree_getFirstAncestorNode(parent, true); + while (inclusiveAncestor !== null) { + try { + for (var _l = (e_14 = void 0, __values(inclusiveAncestor._registeredObserverList)), _m = _l.next(); !_m.done; _m = _l.next()) { + var registered = _m.value; + if (registered.options.subtree) { + node._registeredObserverList.push({ + observer: registered.observer, + options: registered.options, + source: registered + }); + } + } + } + catch (e_14_1) { e_14 = { error: e_14_1 }; } + finally { + try { + if (_m && !_m.done && (_d = _l.return)) _d.call(_l); + } + finally { if (e_14) throw e_14.error; } + } + inclusiveAncestor = TreeAlgorithm_1.tree_getNextAncestorNode(parent, inclusiveAncestor, true); + } + } + /** + * 17. If suppress observers flag is unset, then queue a tree mutation + * record for parent with « », « node », oldPreviousSibling, and + * oldNextSibling. + */ + if (DOMImpl_1.dom.features.mutationObservers) { + if (!suppressObservers) { + MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, [], [node], oldPreviousSibling, oldNextSibling); + } + } + /** + * 18. If node is a Text node, then run the child text content change steps + * for parent. + */ + if (DOMImpl_1.dom.features.steps) { + if (util_1.Guard.isTextNode(node)) { + DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent); + } + } +} +exports.mutation_remove = mutation_remove; +//# sourceMappingURL=MutationAlgorithm.js.map + +/***/ }), + +/***/ 78157: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(65282); +var infra_1 = __nccwpck_require__(84251); +var CreateAlgorithm_1 = __nccwpck_require__(57339); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var EventAlgorithm_1 = __nccwpck_require__(28217); +/** + * Queues a mutation observer microtask to the surrounding agent’s mutation + * observers. + */ +function observer_queueAMutationObserverMicrotask() { + /** + * 1. If the surrounding agent’s mutation observer microtask queued is true, + * then return. + * 2. Set the surrounding agent’s mutation observer microtask queued to true. + * 3. Queue a microtask to notify mutation observers. + */ + var window = DOMImpl_1.dom.window; + if (window._mutationObserverMicrotaskQueued) + return; + window._mutationObserverMicrotaskQueued = true; + Promise.resolve().then(function () { observer_notifyMutationObservers(); }); +} +exports.observer_queueAMutationObserverMicrotask = observer_queueAMutationObserverMicrotask; +/** + * Notifies the surrounding agent’s mutation observers. + */ +function observer_notifyMutationObservers() { + var e_1, _a, e_2, _b; + /** + * 1. Set the surrounding agent’s mutation observer microtask queued to false. + * 2. Let notifySet be a clone of the surrounding agent’s mutation observers. + * 3. Let signalSet be a clone of the surrounding agent’s signal slots. + * 4. Empty the surrounding agent’s signal slots. + */ + var window = DOMImpl_1.dom.window; + window._mutationObserverMicrotaskQueued = false; + var notifySet = infra_1.set.clone(window._mutationObservers); + var signalSet = infra_1.set.clone(window._signalSlots); + infra_1.set.empty(window._signalSlots); + var _loop_1 = function (mo) { + /** + * 5.1. Let records be a clone of mo’s record queue. + * 5.2. Empty mo’s record queue. + */ + var records = infra_1.list.clone(mo._recordQueue); + infra_1.list.empty(mo._recordQueue); + /** + * 5.3. For each node of mo’s node list, remove all transient registered + * observers whose observer is mo from node’s registered observer list. + */ + for (var i = 0; i < mo._nodeList.length; i++) { + var node = mo._nodeList[i]; + infra_1.list.remove(node._registeredObserverList, function (observer) { + return util_1.Guard.isTransientRegisteredObserver(observer) && observer.observer === mo; + }); + } + /** + * 5.4. If records is not empty, then invoke mo’s callback with « records, + * mo », and mo. If this throws an exception, then report the exception. + */ + if (!infra_1.list.isEmpty(records)) { + try { + mo._callback.call(mo, records, mo); + } + catch (err) { + // TODO: Report the exception + } + } + }; + try { + /** + * 5. For each mo of notifySet: + */ + for (var notifySet_1 = __values(notifySet), notifySet_1_1 = notifySet_1.next(); !notifySet_1_1.done; notifySet_1_1 = notifySet_1.next()) { + var mo = notifySet_1_1.value; + _loop_1(mo); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (notifySet_1_1 && !notifySet_1_1.done && (_a = notifySet_1.return)) _a.call(notifySet_1); + } + finally { if (e_1) throw e_1.error; } + } + /** + * 6. For each slot of signalSet, fire an event named slotchange, with its + * bubbles attribute set to true, at slot. + */ + if (DOMImpl_1.dom.features.slots) { + try { + for (var signalSet_1 = __values(signalSet), signalSet_1_1 = signalSet_1.next(); !signalSet_1_1.done; signalSet_1_1 = signalSet_1.next()) { + var slot = signalSet_1_1.value; + EventAlgorithm_1.event_fireAnEvent("slotchange", slot, undefined, { bubbles: true }); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (signalSet_1_1 && !signalSet_1_1.done && (_b = signalSet_1.return)) _b.call(signalSet_1); + } + finally { if (e_2) throw e_2.error; } + } + } +} +exports.observer_notifyMutationObservers = observer_notifyMutationObservers; +/** + * Queues a mutation record of the given type for target. + * + * @param type - mutation record type + * @param target - target node + * @param name - name before mutation + * @param namespace - namespace before mutation + * @param oldValue - attribute value before mutation + * @param addedNodes - a list od added nodes + * @param removedNodes - a list of removed nodes + * @param previousSibling - previous sibling of target before mutation + * @param nextSibling - next sibling of target before mutation + */ +function observer_queueMutationRecord(type, target, name, namespace, oldValue, addedNodes, removedNodes, previousSibling, nextSibling) { + var e_3, _a; + /** + * 1. Let interestedObservers be an empty map. + * 2. Let nodes be the inclusive ancestors of target. + * 3. For each node in nodes, and then for each registered of node’s + * registered observer list: + */ + var interestedObservers = new Map(); + var node = TreeAlgorithm_1.tree_getFirstAncestorNode(target, true); + while (node !== null) { + for (var i = 0; i < node._registeredObserverList.length; i++) { + var registered = node._registeredObserverList[i]; + /** + * 3.1. Let options be registered’s options. + * 3.2. If none of the following are true + * - node is not target and options’s subtree is false + * - type is "attributes" and options’s attributes is not true + * - type is "attributes", options’s attributeFilter is present, and + * options’s attributeFilter does not contain name or namespace is + * non-null + * - type is "characterData" and options’s characterData is not true + * - type is "childList" and options’s childList is false + */ + var options = registered.options; + if (node !== target && !options.subtree) + continue; + if (type === "attributes" && !options.attributes) + continue; + if (type === "attributes" && options.attributeFilter && + (!options.attributeFilter.indexOf(name || '') || namespace !== null)) + continue; + if (type === "characterData" && !options.characterData) + continue; + if (type === "childList" && !options.childList) + continue; + /** + * then: + * 3.2.1. Let mo be registered’s observer. + * 3.2.2. If interestedObservers[mo] does not exist, then set + * interestedObservers[mo] to null. + * 3.2.3. If either type is "attributes" and options’s attributeOldValue + * is true, or type is "characterData" and options’s + * characterDataOldValue is true, then set interestedObservers[mo] + * to oldValue. + */ + var mo = registered.observer; + if (!interestedObservers.has(mo)) { + interestedObservers.set(mo, null); + } + if ((type === "attributes" && options.attributeOldValue) || + (type === "characterData" && options.characterDataOldValue)) { + interestedObservers.set(mo, oldValue); + } + } + node = TreeAlgorithm_1.tree_getNextAncestorNode(target, node, true); + } + try { + /** + * 4. For each observer → mappedOldValue of interestedObservers: + */ + for (var interestedObservers_1 = __values(interestedObservers), interestedObservers_1_1 = interestedObservers_1.next(); !interestedObservers_1_1.done; interestedObservers_1_1 = interestedObservers_1.next()) { + var _b = __read(interestedObservers_1_1.value, 2), observer = _b[0], mappedOldValue = _b[1]; + /** + * 4.1. Let record be a new MutationRecord object with its type set to + * type, target set to target, attributeName set to name, + * attributeNamespace set to namespace, oldValue set to mappedOldValue, + * addedNodes set to addedNodes, removedNodes set to removedNodes, + * previousSibling set to previousSibling, and nextSibling set to + * nextSibling. + * 4.2. Enqueue record to observer’s record queue. + */ + var record = CreateAlgorithm_1.create_mutationRecord(type, target, CreateAlgorithm_1.create_nodeListStatic(target, addedNodes), CreateAlgorithm_1.create_nodeListStatic(target, removedNodes), previousSibling, nextSibling, name, namespace, mappedOldValue); + var queue = observer._recordQueue; + queue.push(record); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (interestedObservers_1_1 && !interestedObservers_1_1.done && (_a = interestedObservers_1.return)) _a.call(interestedObservers_1); + } + finally { if (e_3) throw e_3.error; } + } + /** + * 5. Queue a mutation observer microtask. + */ + observer_queueAMutationObserverMicrotask(); +} +exports.observer_queueMutationRecord = observer_queueMutationRecord; +/** + * Queues a tree mutation record for target. + * + * @param target - target node + * @param addedNodes - a list od added nodes + * @param removedNodes - a list of removed nodes + * @param previousSibling - previous sibling of target before mutation + * @param nextSibling - next sibling of target before mutation + */ +function observer_queueTreeMutationRecord(target, addedNodes, removedNodes, previousSibling, nextSibling) { + /** + * To queue a tree mutation record for target with addedNodes, removedNodes, + * previousSibling, and nextSibling, queue a mutation record of "childList" + * for target with null, null, null, addedNodes, removedNodes, + * previousSibling, and nextSibling. + */ + observer_queueMutationRecord("childList", target, null, null, null, addedNodes, removedNodes, previousSibling, nextSibling); +} +exports.observer_queueTreeMutationRecord = observer_queueTreeMutationRecord; +/** + * Queues an attribute mutation record for target. + * + * @param target - target node + * @param name - name before mutation + * @param namespace - namespace before mutation + * @param oldValue - attribute value before mutation + */ +function observer_queueAttributeMutationRecord(target, name, namespace, oldValue) { + /** + * To queue an attribute mutation record for target with name, namespace, + * and oldValue, queue a mutation record of "attributes" for target with + * name, namespace, oldValue, « », « », null, and null. + */ + observer_queueMutationRecord("attributes", target, name, namespace, oldValue, [], [], null, null); +} +exports.observer_queueAttributeMutationRecord = observer_queueAttributeMutationRecord; +//# sourceMappingURL=MutationObserverAlgorithm.js.map + +/***/ }), + +/***/ 35856: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMException_1 = __nccwpck_require__(13166); +var infra_1 = __nccwpck_require__(84251); +var XMLAlgorithm_1 = __nccwpck_require__(57030); +/** + * Validates the given qualified name. + * + * @param qualifiedName - qualified name + */ +function namespace_validate(qualifiedName) { + /** + * To validate a qualifiedName, throw an "InvalidCharacterError" + * DOMException if qualifiedName does not match the Name or QName + * production. + */ + if (!XMLAlgorithm_1.xml_isName(qualifiedName)) + throw new DOMException_1.InvalidCharacterError("Invalid XML name: " + qualifiedName); + if (!XMLAlgorithm_1.xml_isQName(qualifiedName)) + throw new DOMException_1.InvalidCharacterError("Invalid XML qualified name: " + qualifiedName + "."); +} +exports.namespace_validate = namespace_validate; +/** + * Validates and extracts a namespace, prefix and localName from the + * given namespace and qualified name. + * See: https://dom.spec.whatwg.org/#validate-and-extract. + * + * @param namespace - namespace + * @param qualifiedName - qualified name + * + * @returns a tuple with `namespace`, `prefix` and `localName`. + */ +function namespace_validateAndExtract(namespace, qualifiedName) { + /** + * 1. If namespace is the empty string, set it to null. + * 2. Validate qualifiedName. + * 3. Let prefix be null. + * 4. Let localName be qualifiedName. + * 5. If qualifiedName contains a ":" (U+003E), then split the string on it + * and set prefix to the part before and localName to the part after. + * 6. If prefix is non-null and namespace is null, then throw a + * "NamespaceError" DOMException. + * 7. If prefix is "xml" and namespace is not the XML namespace, then throw + * a "NamespaceError" DOMException. + * 8. If either qualifiedName or prefix is "xmlns" and namespace is not the + * XMLNS namespace, then throw a "NamespaceError" DOMException. + * 9. If namespace is the XMLNS namespace and neither qualifiedName nor + * prefix is "xmlns", then throw a "NamespaceError" DOMException. + * 10. Return namespace, prefix, and localName. + */ + if (!namespace) + namespace = null; + namespace_validate(qualifiedName); + var parts = qualifiedName.split(':'); + var prefix = (parts.length === 2 ? parts[0] : null); + var localName = (parts.length === 2 ? parts[1] : qualifiedName); + if (prefix && namespace === null) + throw new DOMException_1.NamespaceError("Qualified name includes a prefix but the namespace is null."); + if (prefix === "xml" && namespace !== infra_1.namespace.XML) + throw new DOMException_1.NamespaceError("Qualified name includes the \"xml\" prefix but the namespace is not the XML namespace."); + if (namespace !== infra_1.namespace.XMLNS && + (prefix === "xmlns" || qualifiedName === "xmlns")) + throw new DOMException_1.NamespaceError("Qualified name includes the \"xmlns\" prefix but the namespace is not the XMLNS namespace."); + if (namespace === infra_1.namespace.XMLNS && + (prefix !== "xmlns" && qualifiedName !== "xmlns")) + throw new DOMException_1.NamespaceError("Qualified name does not include the \"xmlns\" prefix but the namespace is the XMLNS namespace."); + return [namespace, prefix, localName]; +} +exports.namespace_validateAndExtract = namespace_validateAndExtract; +/** + * Extracts a prefix and localName from the given qualified name. + * + * @param qualifiedName - qualified name + * + * @returns an tuple with `prefix` and `localName`. + */ +function namespace_extractQName(qualifiedName) { + namespace_validate(qualifiedName); + var parts = qualifiedName.split(':'); + var prefix = (parts.length === 2 ? parts[0] : null); + var localName = (parts.length === 2 ? parts[1] : qualifiedName); + return [prefix, localName]; +} +exports.namespace_extractQName = namespace_extractQName; +//# sourceMappingURL=NamespaceAlgorithm.js.map + +/***/ }), + +/***/ 74924: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(65282); +var infra_1 = __nccwpck_require__(84251); +var CreateAlgorithm_1 = __nccwpck_require__(57339); +var OrderedSetAlgorithm_1 = __nccwpck_require__(53670); +var DOMAlgorithm_1 = __nccwpck_require__(9628); +var MutationAlgorithm_1 = __nccwpck_require__(45463); +var ElementAlgorithm_1 = __nccwpck_require__(51849); +/** + * Replaces the contents of the given node with a single text node. + * + * @param string - node contents + * @param parent - a node + */ +function node_stringReplaceAll(str, parent) { + /** + * 1. Let node be null. + * 2. If string is not the empty string, then set node to a new Text node + * whose data is string and node document is parent’s node document. + * 3. Replace all with node within parent. + */ + var node = null; + if (str !== '') { + node = CreateAlgorithm_1.create_text(parent._nodeDocument, str); + } + MutationAlgorithm_1.mutation_replaceAll(node, parent); +} +exports.node_stringReplaceAll = node_stringReplaceAll; +/** + * Clones a node. + * + * @param node - a node to clone + * @param document - the document to own the cloned node + * @param cloneChildrenFlag - whether to clone node's children + */ +function node_clone(node, document, cloneChildrenFlag) { + var e_1, _a, e_2, _b; + if (document === void 0) { document = null; } + if (cloneChildrenFlag === void 0) { cloneChildrenFlag = false; } + /** + * 1. If document is not given, let document be node’s node document. + */ + if (document === null) + document = node._nodeDocument; + var copy; + if (util_1.Guard.isElementNode(node)) { + /** + * 2. If node is an element, then: + * 2.1. Let copy be the result of creating an element, given document, + * node’s local name, node’s namespace, node’s namespace prefix, + * and node’s is value, with the synchronous custom elements flag unset. + * 2.2. For each attribute in node’s attribute list: + * 2.2.1. Let copyAttribute be a clone of attribute. + * 2.2.2. Append copyAttribute to copy. + */ + copy = ElementAlgorithm_1.element_createAnElement(document, node._localName, node._namespace, node._namespacePrefix, node._is, false); + try { + for (var _c = __values(node._attributeList), _d = _c.next(); !_d.done; _d = _c.next()) { + var attribute = _d.value; + var copyAttribute = node_clone(attribute, document); + ElementAlgorithm_1.element_append(copyAttribute, copy); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + /** + * 3. Otherwise, let copy be a node that implements the same interfaces as + * node, and fulfills these additional requirements, switching on node: + * - Document + * Set copy’s encoding, content type, URL, origin, type, and mode, to those + * of node. + * - DocumentType + * Set copy’s name, public ID, and system ID, to those of node. + * - Attr + * Set copy’s namespace, namespace prefix, local name, and value, to + * those of node. + * - Text + * - Comment + * Set copy’s data, to that of node. + * - ProcessingInstruction + * Set copy’s target and data to those of node. + * - Any other node + */ + if (util_1.Guard.isDocumentNode(node)) { + var doc = CreateAlgorithm_1.create_document(); + doc._encoding = node._encoding; + doc._contentType = node._contentType; + doc._URL = node._URL; + doc._origin = node._origin; + doc._type = node._type; + doc._mode = node._mode; + copy = doc; + } + else if (util_1.Guard.isDocumentTypeNode(node)) { + var doctype = CreateAlgorithm_1.create_documentType(document, node._name, node._publicId, node._systemId); + copy = doctype; + } + else if (util_1.Guard.isAttrNode(node)) { + var attr = CreateAlgorithm_1.create_attr(document, node.localName); + attr._namespace = node._namespace; + attr._namespacePrefix = node._namespacePrefix; + attr._value = node._value; + copy = attr; + } + else if (util_1.Guard.isExclusiveTextNode(node)) { + copy = CreateAlgorithm_1.create_text(document, node._data); + } + else if (util_1.Guard.isCDATASectionNode(node)) { + copy = CreateAlgorithm_1.create_cdataSection(document, node._data); + } + else if (util_1.Guard.isCommentNode(node)) { + copy = CreateAlgorithm_1.create_comment(document, node._data); + } + else if (util_1.Guard.isProcessingInstructionNode(node)) { + copy = CreateAlgorithm_1.create_processingInstruction(document, node._target, node._data); + } + else if (util_1.Guard.isDocumentFragmentNode(node)) { + copy = CreateAlgorithm_1.create_documentFragment(document); + } + else { + copy = Object.create(node); + } + } + /** + * 4. Set copy’s node document and document to copy, if copy is a document, + * and set copy’s node document to document otherwise. + */ + if (util_1.Guard.isDocumentNode(copy)) { + copy._nodeDocument = copy; + document = copy; + } + else { + copy._nodeDocument = document; + } + /** + * 5. Run any cloning steps defined for node in other applicable + * specifications and pass copy, node, document and the clone children flag + * if set, as parameters. + */ + if (DOMImpl_1.dom.features.steps) { + DOMAlgorithm_1.dom_runCloningSteps(copy, node, document, cloneChildrenFlag); + } + /** + * 6. If the clone children flag is set, clone all the children of node and + * append them to copy, with document as specified and the clone children + * flag being set. + */ + if (cloneChildrenFlag) { + try { + for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) { + var child = _f.value; + var childCopy = node_clone(child, document, true); + MutationAlgorithm_1.mutation_append(childCopy, copy); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_2) throw e_2.error; } + } + } + /** + * 7. Return copy. + */ + return copy; +} +exports.node_clone = node_clone; +/** + * Determines if two nodes can be considered equal. + * + * @param a - node to compare + * @param b - node to compare + */ +function node_equals(a, b) { + var e_3, _a, e_4, _b; + /** + * 1. A and B’s nodeType attribute value is identical. + */ + if (a._nodeType !== b._nodeType) + return false; + /** + * 2. The following are also equal, depending on A: + * - DocumentType + * Its name, public ID, and system ID. + * - Element + * Its namespace, namespace prefix, local name, and its attribute list’s size. + * - Attr + * Its namespace, local name, and value. + * - ProcessingInstruction + * Its target and data. + * - Text + * - Comment + * Its data. + */ + if (util_1.Guard.isDocumentTypeNode(a) && util_1.Guard.isDocumentTypeNode(b)) { + if (a._name !== b._name || a._publicId !== b._publicId || + a._systemId !== b._systemId) + return false; + } + else if (util_1.Guard.isElementNode(a) && util_1.Guard.isElementNode(b)) { + if (a._namespace !== b._namespace || a._namespacePrefix !== b._namespacePrefix || + a._localName !== b._localName || + a._attributeList.length !== b._attributeList.length) + return false; + } + else if (util_1.Guard.isAttrNode(a) && util_1.Guard.isAttrNode(b)) { + if (a._namespace !== b._namespace || a._localName !== b._localName || + a._value !== b._value) + return false; + } + else if (util_1.Guard.isProcessingInstructionNode(a) && util_1.Guard.isProcessingInstructionNode(b)) { + if (a._target !== b._target || a._data !== b._data) + return false; + } + else if (util_1.Guard.isCharacterDataNode(a) && util_1.Guard.isCharacterDataNode(b)) { + if (a._data !== b._data) + return false; + } + /** + * 3. If A is an element, each attribute in its attribute list has an attribute + * that equals an attribute in B’s attribute list. + */ + if (util_1.Guard.isElementNode(a) && util_1.Guard.isElementNode(b)) { + var attrMap = {}; + try { + for (var _c = __values(a._attributeList), _d = _c.next(); !_d.done; _d = _c.next()) { + var attrA = _d.value; + attrMap[attrA._localName] = attrA; + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_3) throw e_3.error; } + } + try { + for (var _e = __values(b._attributeList), _f = _e.next(); !_f.done; _f = _e.next()) { + var attrB = _f.value; + var attrA = attrMap[attrB._localName]; + if (!attrA) + return false; + if (!node_equals(attrA, attrB)) + return false; + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_4) throw e_4.error; } + } + } + /** + * 4. A and B have the same number of children. + * 5. Each child of A equals the child of B at the identical index. + */ + if (a._children.size !== b._children.size) + return false; + var itA = a._children[Symbol.iterator](); + var itB = b._children[Symbol.iterator](); + var resultA = itA.next(); + var resultB = itB.next(); + while (!resultA.done && !resultB.done) { + var child1 = resultA.value; + var child2 = resultB.value; + if (!node_equals(child1, child2)) + return false; + resultA = itA.next(); + resultB = itB.next(); + } + return true; +} +exports.node_equals = node_equals; +/** + * Returns a collection of elements with the given qualified name which are + * descendants of the given root node. + * See: https://dom.spec.whatwg.org/#concept-getelementsbytagname + * + * @param qualifiedName - qualified name + * @param root - root node + */ +function node_listOfElementsWithQualifiedName(qualifiedName, root) { + /** + * 1. If qualifiedName is "*" (U+002A), return a HTMLCollection rooted at + * root, whose filter matches only descendant elements. + * 2. Otherwise, if root’s node document is an HTML document, return a + * HTMLCollection rooted at root, whose filter matches the following + * descendant elements: + * 2.1. Whose namespace is the HTML namespace and whose qualified name is + * qualifiedName, in ASCII lowercase. + * 2.2. Whose namespace is not the HTML namespace and whose qualified name + * is qualifiedName. + * 3. Otherwise, return a HTMLCollection rooted at root, whose filter + * matches descendant elements whose qualified name is qualifiedName. + */ + if (qualifiedName === "*") { + return CreateAlgorithm_1.create_htmlCollection(root); + } + else if (root._nodeDocument._type === "html") { + return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { + if (ele._namespace === infra_1.namespace.HTML && + ele._qualifiedName === qualifiedName.toLowerCase()) { + return true; + } + else if (ele._namespace !== infra_1.namespace.HTML && + ele._qualifiedName === qualifiedName) { + return true; + } + else { + return false; + } + }); + } + else { + return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { + return (ele._qualifiedName === qualifiedName); + }); + } +} +exports.node_listOfElementsWithQualifiedName = node_listOfElementsWithQualifiedName; +/** + * Returns a collection of elements with the given namespace which are + * descendants of the given root node. + * See: https://dom.spec.whatwg.org/#concept-getelementsbytagnamens + * + * @param namespace - element namespace + * @param localName - local name + * @param root - root node + */ +function node_listOfElementsWithNamespace(namespace, localName, root) { + /** + * 1. If namespace is the empty string, set it to null. + * 2. If both namespace and localName are "*" (U+002A), return a + * HTMLCollection rooted at root, whose filter matches descendant elements. + * 3. Otherwise, if namespace is "*" (U+002A), return a HTMLCollection + * rooted at root, whose filter matches descendant elements whose local + * name is localName. + * 4. Otherwise, if localName is "*" (U+002A), return a HTMLCollection + * rooted at root, whose filter matches descendant elements whose + * namespace is namespace. + * 5. Otherwise, return a HTMLCollection rooted at root, whose filter + * matches descendant elements whose namespace is namespace and local + * name is localName. + */ + if (namespace === '') + namespace = null; + if (namespace === "*" && localName === "*") { + return CreateAlgorithm_1.create_htmlCollection(root); + } + else if (namespace === "*") { + return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { + return (ele._localName === localName); + }); + } + else if (localName === "*") { + return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { + return (ele._namespace === namespace); + }); + } + else { + return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { + return (ele._localName === localName && ele._namespace === namespace); + }); + } +} +exports.node_listOfElementsWithNamespace = node_listOfElementsWithNamespace; +/** + * Returns a collection of elements with the given class names which are + * descendants of the given root node. + * See: https://dom.spec.whatwg.org/#concept-getelementsbyclassname + * + * @param namespace - element namespace + * @param localName - local name + * @param root - root node + */ +function node_listOfElementsWithClassNames(classNames, root) { + /** + * 1. Let classes be the result of running the ordered set parser + * on classNames. + * 2. If classes is the empty set, return an empty HTMLCollection. + * 3. Return a HTMLCollection rooted at root, whose filter matches + * descendant elements that have all their classes in classes. + * The comparisons for the classes must be done in an ASCII case-insensitive + * manner if root’s node document’s mode is "quirks", and in a + * case-sensitive manner otherwise. + */ + var classes = OrderedSetAlgorithm_1.orderedSet_parse(classNames); + if (classes.size === 0) { + return CreateAlgorithm_1.create_htmlCollection(root, function () { return false; }); + } + var caseSensitive = (root._nodeDocument._mode !== "quirks"); + return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { + var eleClasses = ele.classList; + return OrderedSetAlgorithm_1.orderedSet_contains(eleClasses._tokenSet, classes, caseSensitive); + }); +} +exports.node_listOfElementsWithClassNames = node_listOfElementsWithClassNames; +/** + * Searches for a namespace prefix associated with the given namespace + * starting from the given element through its ancestors. + * + * @param element - an element node to start searching at + * @param namespace - namespace to search for + */ +function node_locateANamespacePrefix(element, namespace) { + /** + * 1. If element’s namespace is namespace and its namespace prefix is not + * null, then return its namespace prefix. + */ + if (element._namespace === namespace && element._namespacePrefix !== null) { + return element._namespacePrefix; + } + /** + * 2. If element has an attribute whose namespace prefix is "xmlns" and + * value is namespace, then return element’s first such attribute’s + * local name. + */ + for (var i = 0; i < element._attributeList.length; i++) { + var attr = element._attributeList[i]; + if (attr._namespacePrefix === "xmlns" && attr._value === namespace) { + return attr._localName; + } + } + /** + * 3. If element’s parent element is not null, then return the result of + * running locate a namespace prefix on that element using namespace. + */ + if (element._parent && util_1.Guard.isElementNode(element._parent)) { + return node_locateANamespacePrefix(element._parent, namespace); + } + /** + * 4. Return null. + */ + return null; +} +exports.node_locateANamespacePrefix = node_locateANamespacePrefix; +/** + * Searches for a namespace associated with the given namespace prefix + * starting from the given node through its ancestors. + * + * @param node - a node to start searching at + * @param prefix - namespace prefix to search for + */ +function node_locateANamespace(node, prefix) { + if (util_1.Guard.isElementNode(node)) { + /** + * 1. If its namespace is not null and its namespace prefix is prefix, + * then return namespace. + */ + if (node._namespace !== null && node._namespacePrefix === prefix) { + return node._namespace; + } + /** + * 2. If it has an attribute whose namespace is the XMLNS namespace, + * namespace prefix is "xmlns", and local name is prefix, or if prefix + * is null and it has an attribute whose namespace is the XMLNS namespace, + * namespace prefix is null, and local name is "xmlns", then return its + * value if it is not the empty string, and null otherwise. + */ + for (var i = 0; i < node._attributeList.length; i++) { + var attr = node._attributeList[i]; + if (attr._namespace === infra_1.namespace.XMLNS && + attr._namespacePrefix === "xmlns" && + attr._localName === prefix) { + return attr._value || null; + } + if (prefix === null && attr._namespace === infra_1.namespace.XMLNS && + attr._namespacePrefix === null && attr._localName === "xmlns") { + return attr._value || null; + } + } + /** + * 3. If its parent element is null, then return null. + */ + if (node.parentElement === null) + return null; + /** + * 4. Return the result of running locate a namespace on its parent + * element using prefix. + */ + return node_locateANamespace(node.parentElement, prefix); + } + else if (util_1.Guard.isDocumentNode(node)) { + /** + * 1. If its document element is null, then return null. + * 2. Return the result of running locate a namespace on its document + * element using prefix. + */ + if (node.documentElement === null) + return null; + return node_locateANamespace(node.documentElement, prefix); + } + else if (util_1.Guard.isDocumentTypeNode(node) || util_1.Guard.isDocumentFragmentNode(node)) { + return null; + } + else if (util_1.Guard.isAttrNode(node)) { + /** + * 1. If its element is null, then return null. + * 2. Return the result of running locate a namespace on its element + * using prefix. + */ + if (node._element === null) + return null; + return node_locateANamespace(node._element, prefix); + } + else { + /** + * 1. If its parent element is null, then return null. + * 2. Return the result of running locate a namespace on its parent + * element using prefix. + */ + if (!node._parent || !util_1.Guard.isElementNode(node._parent)) + return null; + return node_locateANamespace(node._parent, prefix); + } +} +exports.node_locateANamespace = node_locateANamespace; +//# sourceMappingURL=NodeAlgorithm.js.map + +/***/ }), + +/***/ 3973: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var interfaces_1 = __nccwpck_require__(27305); +var TraversalAlgorithm_1 = __nccwpck_require__(80998); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +/** + * Returns the next or previous node in the subtree, or `null` if + * there are none. + * + * @param iterator - the `NodeIterator` instance + * @param forward- `true` to return the next node, or `false` to + * return the previous node. + */ +function nodeIterator_traverse(iterator, forward) { + /** + * 1. Let node be iterator’s reference. + * 2. Let beforeNode be iterator’s pointer before reference. + */ + var node = iterator._reference; + var beforeNode = iterator._pointerBeforeReference; + /** + * 3. While true: + */ + while (true) { + /** + * 3.1. Branch on direction: + */ + if (forward) { + /** + * - next + */ + if (!beforeNode) { + /** + * If beforeNode is false, then set node to the first node following + * node in iterator’s iterator collection. If there is no such node, + * then return null. + */ + var nextNode = TreeAlgorithm_1.tree_getFollowingNode(iterator._root, node); + if (nextNode) { + node = nextNode; + } + else { + return null; + } + } + else { + /** + * If beforeNode is true, then set it to false. + */ + beforeNode = false; + } + } + else { + /** + * - previous + */ + if (beforeNode) { + /** + * If beforeNode is true, then set node to the first node preceding + * node in iterator’s iterator collection. If there is no such node, + * then return null. + */ + var prevNode = TreeAlgorithm_1.tree_getPrecedingNode(iterator.root, node); + if (prevNode) { + node = prevNode; + } + else { + return null; + } + } + else { + /** + * If beforeNode is false, then set it to true. + */ + beforeNode = true; + } + } + /** + * 3.2. Let result be the result of filtering node within iterator. + * 3.3. If result is FILTER_ACCEPT, then break. + */ + var result = TraversalAlgorithm_1.traversal_filter(iterator, node); + if (result === interfaces_1.FilterResult.Accept) { + break; + } + } + /** + * 4. Set iterator’s reference to node. + * 5. Set iterator’s pointer before reference to beforeNode. + * 6. Return node. + */ + iterator._reference = node; + iterator._pointerBeforeReference = beforeNode; + return node; +} +exports.nodeIterator_traverse = nodeIterator_traverse; +/** + * Gets the global iterator list. + */ +function nodeIterator_iteratorList() { + return DOMImpl_1.dom.window._iteratorList; +} +exports.nodeIterator_iteratorList = nodeIterator_iteratorList; +//# sourceMappingURL=NodeIteratorAlgorithm.js.map + +/***/ }), + +/***/ 53670: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var infra_1 = __nccwpck_require__(84251); +/** + * Converts a whitespace separated string into an array of tokens. + * + * @param value - a string of whitespace separated tokens + */ +function orderedSet_parse(value) { + /** + * 1. Let inputTokens be the result of splitting input on ASCII whitespace. + * 2. Let tokens be a new ordered set. + * 3. For each token in inputTokens, append token to tokens. + * 4. Return tokens. + */ + var inputTokens = infra_1.string.splitAStringOnASCIIWhitespace(value); + return new Set(inputTokens); +} +exports.orderedSet_parse = orderedSet_parse; +/** + * Converts an array of tokens into a space separated string. + * + * @param tokens - an array of token strings + */ +function orderedSet_serialize(tokens) { + /** + * The ordered set serializer takes a set and returns the concatenation of + * set using U+0020 SPACE. + */ + return __spread(tokens).join(' '); +} +exports.orderedSet_serialize = orderedSet_serialize; +/** + * Removes duplicate tokens and convert all whitespace characters + * to space. + * + * @param value - a string of whitespace separated tokens + */ +function orderedSet_sanitize(value) { + return orderedSet_serialize(orderedSet_parse(value)); +} +exports.orderedSet_sanitize = orderedSet_sanitize; +/** + * Determines whether a set contains the other. + * + * @param set1 - a set + * @param set1 - a set that is contained in set1 + * @param caseSensitive - whether matches are case-sensitive + */ +function orderedSet_contains(set1, set2, caseSensitive) { + var e_1, _a, e_2, _b; + try { + for (var set2_1 = __values(set2), set2_1_1 = set2_1.next(); !set2_1_1.done; set2_1_1 = set2_1.next()) { + var val2 = set2_1_1.value; + var found = false; + try { + for (var set1_1 = (e_2 = void 0, __values(set1)), set1_1_1 = set1_1.next(); !set1_1_1.done; set1_1_1 = set1_1.next()) { + var val1 = set1_1_1.value; + if (caseSensitive) { + if (val1 === val2) { + found = true; + break; + } + } + else { + if (val1.toUpperCase() === val2.toUpperCase()) { + found = true; + break; + } + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (set1_1_1 && !set1_1_1.done && (_b = set1_1.return)) _b.call(set1_1); + } + finally { if (e_2) throw e_2.error; } + } + if (!found) + return false; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (set2_1_1 && !set2_1_1.done && (_a = set2_1.return)) _a.call(set2_1); + } + finally { if (e_1) throw e_1.error; } + } + return true; +} +exports.orderedSet_contains = orderedSet_contains; +//# sourceMappingURL=OrderedSetAlgorithm.js.map + +/***/ }), + +/***/ 2328: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +var CreateAlgorithm_1 = __nccwpck_require__(57339); +/** + * Converts the given nodes or strings into a node (if `nodes` has + * only one element) or a document fragment. + * + * @param nodes - the array of nodes or strings, + * @param document - owner document + */ +function parentNode_convertNodesIntoANode(nodes, document) { + var e_1, _a; + /** + * 1. Let node be null. + * 2. Replace each string in nodes with a new Text node whose data is the + * string and node document is document. + */ + var node = null; + for (var i = 0; i < nodes.length; i++) { + var item = nodes[i]; + if (util_1.isString(item)) { + var text = CreateAlgorithm_1.create_text(document, item); + nodes[i] = text; + } + } + /** + * 3. If nodes contains one node, set node to that node. + * 4. Otherwise, set node to a new DocumentFragment whose node document is + * document, and then append each node in nodes, if any, to it. + */ + if (nodes.length === 1) { + node = nodes[0]; + } + else { + node = CreateAlgorithm_1.create_documentFragment(document); + var ns = node; + try { + for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) { + var item = nodes_1_1.value; + ns.appendChild(item); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1); + } + finally { if (e_1) throw e_1.error; } + } + } + /** + * 5. Return node. + */ + return node; +} +exports.parentNode_convertNodesIntoANode = parentNode_convertNodesIntoANode; +//# sourceMappingURL=ParentNodeAlgorithm.js.map + +/***/ }), + +/***/ 30457: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var DOMException_1 = __nccwpck_require__(13166); +var util_1 = __nccwpck_require__(65282); +var CreateAlgorithm_1 = __nccwpck_require__(57339); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var BoundaryPointAlgorithm_1 = __nccwpck_require__(81054); +var CharacterDataAlgorithm_1 = __nccwpck_require__(19461); +var NodeAlgorithm_1 = __nccwpck_require__(74924); +var MutationAlgorithm_1 = __nccwpck_require__(45463); +var TextAlgorithm_1 = __nccwpck_require__(13512); +/** + * Determines if the node's start boundary point is at its end boundary + * point. + * + * @param range - a range + */ +function range_collapsed(range) { + /** + * A range is collapsed if its start node is its end node and its start offset is its end offset. + */ + return (range._startNode === range._endNode && range._startOffset === range._endOffset); +} +exports.range_collapsed = range_collapsed; +/** + * Gets the root node of a range. + * + * @param range - a range + */ +function range_root(range) { + /** + * The root of a live range is the root of its start node. + */ + return TreeAlgorithm_1.tree_rootNode(range._startNode); +} +exports.range_root = range_root; +/** + * Determines if a node is fully contained in a range. + * + * @param node - a node + * @param range - a range + */ +function range_isContained(node, range) { + /** + * A node node is contained in a live range range if node’s root is range’s + * root, and (node, 0) is after range’s start, and (node, node’s length) is + * before range’s end. + */ + return (TreeAlgorithm_1.tree_rootNode(node) === range_root(range) && + BoundaryPointAlgorithm_1.boundaryPoint_position([node, 0], range._start) === interfaces_1.BoundaryPosition.After && + BoundaryPointAlgorithm_1.boundaryPoint_position([node, TreeAlgorithm_1.tree_nodeLength(node)], range._end) === interfaces_1.BoundaryPosition.Before); +} +exports.range_isContained = range_isContained; +/** + * Determines if a node is partially contained in a range. + * + * @param node - a node + * @param range - a range + */ +function range_isPartiallyContained(node, range) { + /** + * A node is partially contained in a live range if it’s an inclusive + * ancestor of the live range’s start node but not its end node, + * or vice versa. + */ + var startCheck = TreeAlgorithm_1.tree_isAncestorOf(range._startNode, node, true); + var endCheck = TreeAlgorithm_1.tree_isAncestorOf(range._endNode, node, true); + return (startCheck && !endCheck) || (!startCheck && endCheck); +} +exports.range_isPartiallyContained = range_isPartiallyContained; +/** + * Sets the start boundary point of a range. + * + * @param range - a range + * @param node - a node + * @param offset - an offset into node + */ +function range_setTheStart(range, node, offset) { + /** + * 1. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. + * 2. If offset is greater than node’s length, then throw an "IndexSizeError" + * DOMException. + * 3. Let bp be the boundary point (node, offset). + * 4. If these steps were invoked as "set the start" + * 4.1. If bp is after the range’s end, or if range’s root is not equal to + * node’s root, set range’s end to bp. + * 4.2. Set range’s start to bp. + */ + if (util_1.Guard.isDocumentTypeNode(node)) { + throw new DOMException_1.InvalidNodeTypeError(); + } + if (offset > TreeAlgorithm_1.tree_nodeLength(node)) { + throw new DOMException_1.IndexSizeError(); + } + var bp = [node, offset]; + if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) || + BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._end) === interfaces_1.BoundaryPosition.After) { + range._end = bp; + } + range._start = bp; +} +exports.range_setTheStart = range_setTheStart; +/** + * Sets the end boundary point of a range. + * + * @param range - a range + * @param node - a node + * @param offset - an offset into node + */ +function range_setTheEnd(range, node, offset) { + /** + * 1. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. + * 2. If offset is greater than node’s length, then throw an "IndexSizeError" + * DOMException. + * 3. Let bp be the boundary point (node, offset). + * 4. If these steps were invoked as "set the end" + * 4.1. If bp is before the range’s start, or if range’s root is not equal + * to node’s root, set range’s start to bp. + * 4.2. Set range’s end to bp. + */ + if (util_1.Guard.isDocumentTypeNode(node)) { + throw new DOMException_1.InvalidNodeTypeError(); + } + if (offset > TreeAlgorithm_1.tree_nodeLength(node)) { + throw new DOMException_1.IndexSizeError(); + } + var bp = [node, offset]; + if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) || + BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._start) === interfaces_1.BoundaryPosition.Before) { + range._start = bp; + } + range._end = bp; +} +exports.range_setTheEnd = range_setTheEnd; +/** + * Selects a node. + * + * @param range - a range + * @param node - a node + */ +function range_select(node, range) { + /** + * 1. Let parent be node’s parent. + * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. + */ + var parent = node._parent; + if (parent === null) + throw new DOMException_1.InvalidNodeTypeError(); + /** + * 3. Let index be node’s index. + * 4. Set range’s start to boundary point (parent, index). + * 5. Set range’s end to boundary point (parent, index plus 1). + */ + var index = TreeAlgorithm_1.tree_index(node); + range._start = [parent, index]; + range._end = [parent, index + 1]; +} +exports.range_select = range_select; +/** + * EXtracts the contents of range as a document fragment. + * + * @param range - a range + */ +function range_extract(range) { + var e_1, _a, e_2, _b, e_3, _c; + /** + * 1. Let fragment be a new DocumentFragment node whose node document is + * range’s start node’s node document. + * 2. If range is collapsed, then return fragment. + */ + var fragment = CreateAlgorithm_1.create_documentFragment(range._startNode._nodeDocument); + if (range_collapsed(range)) + return fragment; + /** + * 3. Let original start node, original start offset, original end node, + * and original end offset be range’s start node, start offset, end node, + * and end offset, respectively. + */ + var originalStartNode = range._startNode; + var originalStartOffset = range._startOffset; + var originalEndNode = range._endNode; + var originalEndOffset = range._endOffset; + /** + * 4. If original start node is original end node, and they are a Text, + * ProcessingInstruction, or Comment node: + * 4.1. Let clone be a clone of original start node. + * 4.2. Set the data of clone to the result of substringing data with node + * original start node, offset original start offset, and count original end + * offset minus original start offset. + * 4.3. Append clone to fragment. + * 4.4. Replace data with node original start node, offset original start + * offset, count original end offset minus original start offset, and data + * the empty string. + * 4.5. Return fragment. + */ + if (originalStartNode === originalEndNode && + util_1.Guard.isCharacterDataNode(originalStartNode)) { + var clone = NodeAlgorithm_1.node_clone(originalStartNode); + clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset); + MutationAlgorithm_1.mutation_append(clone, fragment); + CharacterDataAlgorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset, ''); + return fragment; + } + /** + * 5. Let common ancestor be original start node. + * 6. While common ancestor is not an inclusive ancestor of original end + * node, set common ancestor to its own parent. + */ + var commonAncestor = originalStartNode; + while (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, commonAncestor, true)) { + if (commonAncestor._parent === null) { + throw new Error("Parent node is null."); + } + commonAncestor = commonAncestor._parent; + } + /** + * 7. Let first partially contained child be null. + * 8. If original start node is not an inclusive ancestor of original end + * node, set first partially contained child to the first child of common + * ancestor that is partially contained in range. + */ + var firstPartiallyContainedChild = null; + if (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { + try { + for (var _d = __values(commonAncestor._children), _e = _d.next(); !_e.done; _e = _d.next()) { + var node = _e.value; + if (range_isPartiallyContained(node, range)) { + firstPartiallyContainedChild = node; + break; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + } + finally { if (e_1) throw e_1.error; } + } + } + /** + * 9. Let last partially contained child be null. + * 10. If original end node is not an inclusive ancestor of original start + * node, set last partially contained child to the last child of common + * ancestor that is partially contained in range. + */ + var lastPartiallyContainedChild = null; + if (!TreeAlgorithm_1.tree_isAncestorOf(originalStartNode, originalEndNode, true)) { + var children = __spread(commonAncestor._children); + for (var i = children.length - 1; i > 0; i--) { + var node = children[i]; + if (range_isPartiallyContained(node, range)) { + lastPartiallyContainedChild = node; + break; + } + } + } + /** + * 11. Let contained children be a list of all children of common ancestor + * that are contained in range, in tree order. + * 12. If any member of contained children is a doctype, then throw a + * "HierarchyRequestError" DOMException. + */ + var containedChildren = []; + try { + for (var _f = __values(commonAncestor._children), _g = _f.next(); !_g.done; _g = _f.next()) { + var child = _g.value; + if (range_isContained(child, range)) { + if (util_1.Guard.isDocumentTypeNode(child)) { + throw new DOMException_1.HierarchyRequestError(); + } + containedChildren.push(child); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_g && !_g.done && (_b = _f.return)) _b.call(_f); + } + finally { if (e_2) throw e_2.error; } + } + var newNode; + var newOffset; + if (TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { + /** + * 13. If original start node is an inclusive ancestor of original end node, + * set new node to original start node and new offset to original start + * offset. + */ + newNode = originalStartNode; + newOffset = originalStartOffset; + } + else { + /** + * 14. Otherwise: + * 14.1. Let reference node equal original start node. + * 14.2. While reference node’s parent is not null and is not an inclusive + * ancestor of original end node, set reference node to its parent. + * 14.3. Set new node to the parent of reference node, and new offset to + * one plus reference node’s index. + */ + var referenceNode = originalStartNode; + while (referenceNode._parent !== null && + !TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, referenceNode._parent)) { + referenceNode = referenceNode._parent; + } + /* istanbul ignore next */ + if (referenceNode._parent === null) { + /** + * If reference node’s parent is null, it would be the root of range, + * so would be an inclusive ancestor of original end node, and we could + * not reach this point. + */ + throw new Error("Parent node is null."); + } + newNode = referenceNode._parent; + newOffset = 1 + TreeAlgorithm_1.tree_index(referenceNode); + } + if (util_1.Guard.isCharacterDataNode(firstPartiallyContainedChild)) { + /** + * 15. If first partially contained child is a Text, ProcessingInstruction, + * or Comment node: + * 15.1. Let clone be a clone of original start node. + * 15.2. Set the data of clone to the result of substringing data with + * node original start node, offset original start offset, and count + * original start node’s length minus original start offset. + * 15.3. Append clone to fragment. + * 15.4. Replace data with node original start node, offset original + * start offset, count original start node’s length minus original start + * offset, and data the empty string. + */ + var clone = NodeAlgorithm_1.node_clone(originalStartNode); + clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset); + MutationAlgorithm_1.mutation_append(clone, fragment); + CharacterDataAlgorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset, ''); + } + else if (firstPartiallyContainedChild !== null) { + /** + * 16. Otherwise, if first partially contained child is not null: + * 16.1. Let clone be a clone of first partially contained child. + * 16.2. Append clone to fragment. + * 16.3. Let subrange be a new live range whose start is (original start + * node, original start offset) and whose end is (first partially + * contained child, first partially contained child’s length). + * 16.4. Let subfragment be the result of extracting subrange. + * 16.5. Append subfragment to clone. + */ + var clone = NodeAlgorithm_1.node_clone(firstPartiallyContainedChild); + MutationAlgorithm_1.mutation_append(clone, fragment); + var subrange = CreateAlgorithm_1.create_range([originalStartNode, originalStartOffset], [firstPartiallyContainedChild, TreeAlgorithm_1.tree_nodeLength(firstPartiallyContainedChild)]); + var subfragment = range_extract(subrange); + MutationAlgorithm_1.mutation_append(subfragment, clone); + } + try { + /** + * 17. For each contained child in contained children, append contained + * child to fragment. + */ + for (var containedChildren_1 = __values(containedChildren), containedChildren_1_1 = containedChildren_1.next(); !containedChildren_1_1.done; containedChildren_1_1 = containedChildren_1.next()) { + var child = containedChildren_1_1.value; + MutationAlgorithm_1.mutation_append(child, fragment); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (containedChildren_1_1 && !containedChildren_1_1.done && (_c = containedChildren_1.return)) _c.call(containedChildren_1); + } + finally { if (e_3) throw e_3.error; } + } + if (util_1.Guard.isCharacterDataNode(lastPartiallyContainedChild)) { + /** + * 18. If last partially contained child is a Text, ProcessingInstruction, + * or Comment node: + * 18.1. Let clone be a clone of original end node. + * 18.2. Set the data of clone to the result of substringing data with + * node original end node, offset 0, and count original end offset. + * 18.3. Append clone to fragment. + * 18.4. Replace data with node original end node, offset 0, count + * original end offset, and data the empty string. + */ + var clone = NodeAlgorithm_1.node_clone(originalEndNode); + clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalEndNode, 0, originalEndOffset); + MutationAlgorithm_1.mutation_append(clone, fragment); + CharacterDataAlgorithm_1.characterData_replaceData(originalEndNode, 0, originalEndOffset, ''); + } + else if (lastPartiallyContainedChild !== null) { + /** + * 19. Otherwise, if last partially contained child is not null: + * 19.1. Let clone be a clone of last partially contained child. + * 19.2. Append clone to fragment. + * 19.3. Let subrange be a new live range whose start is (last partially + * contained child, 0) and whose end is (original end node, original + * end offset). + * 19.4. Let subfragment be the result of extracting subrange. + * 19.5. Append subfragment to clone. + */ + var clone = NodeAlgorithm_1.node_clone(lastPartiallyContainedChild); + MutationAlgorithm_1.mutation_append(clone, fragment); + var subrange = CreateAlgorithm_1.create_range([lastPartiallyContainedChild, 0], [originalEndNode, originalEndOffset]); + var subfragment = range_extract(subrange); + MutationAlgorithm_1.mutation_append(subfragment, clone); + } + /** + * 20. Set range’s start and end to (new node, new offset). + */ + range._start = [newNode, newOffset]; + range._end = [newNode, newOffset]; + /** + * 21. Return fragment. + */ + return fragment; +} +exports.range_extract = range_extract; +/** + * Clones the contents of range as a document fragment. + * + * @param range - a range + */ +function range_cloneTheContents(range) { + var e_4, _a, e_5, _b, e_6, _c; + /** + * 1. Let fragment be a new DocumentFragment node whose node document + * is range’s start node’s node document. + * 2. If range is collapsed, then return fragment. + */ + var fragment = CreateAlgorithm_1.create_documentFragment(range._startNode._nodeDocument); + if (range_collapsed(range)) + return fragment; + /** + * 3. Let original start node, original start offset, original end node, + * and original end offset be range’s start node, start offset, end node, + * and end offset, respectively. + * 4. If original start node is original end node, and they are a Text, + * ProcessingInstruction, or Comment node: + * 4.1. Let clone be a clone of original start node. + * 4.2. Set the data of clone to the result of substringing data with node + * original start node, offset original start offset, and count original end + * offset minus original start offset. + * 4.3. Append clone to fragment. + * 4.5. Return fragment. + */ + var originalStartNode = range._startNode; + var originalStartOffset = range._startOffset; + var originalEndNode = range._endNode; + var originalEndOffset = range._endOffset; + if (originalStartNode === originalEndNode && + util_1.Guard.isCharacterDataNode(originalStartNode)) { + var clone = NodeAlgorithm_1.node_clone(originalStartNode); + clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset); + MutationAlgorithm_1.mutation_append(clone, fragment); + } + /** + * 5. Let common ancestor be original start node. + * 6. While common ancestor is not an inclusive ancestor of original end + * node, set common ancestor to its own parent. + */ + var commonAncestor = originalStartNode; + while (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, commonAncestor, true)) { + if (commonAncestor._parent === null) { + throw new Error("Parent node is null."); + } + commonAncestor = commonAncestor._parent; + } + /** + * 7. Let first partially contained child be null. + * 8. If original start node is not an inclusive ancestor of original end + * node, set first partially contained child to the first child of common + * ancestor that is partially contained in range. + */ + var firstPartiallyContainedChild = null; + if (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { + try { + for (var _d = __values(commonAncestor._children), _e = _d.next(); !_e.done; _e = _d.next()) { + var node = _e.value; + if (range_isPartiallyContained(node, range)) { + firstPartiallyContainedChild = node; + break; + } + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + } + finally { if (e_4) throw e_4.error; } + } + } + /** + * 9. Let last partially contained child be null. + * 10. If original end node is not an inclusive ancestor of original start + * node, set last partially contained child to the last child of common + * ancestor that is partially contained in range. + */ + var lastPartiallyContainedChild = null; + if (!TreeAlgorithm_1.tree_isAncestorOf(originalStartNode, originalEndNode, true)) { + var children = __spread(commonAncestor._children); + for (var i = children.length - 1; i > 0; i--) { + var node = children[i]; + if (range_isPartiallyContained(node, range)) { + lastPartiallyContainedChild = node; + break; + } + } + } + /** + * 11. Let contained children be a list of all children of common ancestor + * that are contained in range, in tree order. + * 12. If any member of contained children is a doctype, then throw a + * "HierarchyRequestError" DOMException. + */ + var containedChildren = []; + try { + for (var _f = __values(commonAncestor._children), _g = _f.next(); !_g.done; _g = _f.next()) { + var child = _g.value; + if (range_isContained(child, range)) { + if (util_1.Guard.isDocumentTypeNode(child)) { + throw new DOMException_1.HierarchyRequestError(); + } + containedChildren.push(child); + } + } + } + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (_g && !_g.done && (_b = _f.return)) _b.call(_f); + } + finally { if (e_5) throw e_5.error; } + } + if (util_1.Guard.isCharacterDataNode(firstPartiallyContainedChild)) { + /** + * 13. If first partially contained child is a Text, ProcessingInstruction, + * or Comment node: + * 13.1. Let clone be a clone of original start node. + * 13.2. Set the data of clone to the result of substringing data with + * node original start node, offset original start offset, and count + * original start node’s length minus original start offset. + * 13.3. Append clone to fragment. + */ + var clone = NodeAlgorithm_1.node_clone(originalStartNode); + clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset); + MutationAlgorithm_1.mutation_append(clone, fragment); + } + else if (firstPartiallyContainedChild !== null) { + /** + * 14. Otherwise, if first partially contained child is not null: + * 14.1. Let clone be a clone of first partially contained child. + * 14.2. Append clone to fragment. + * 14.3. Let subrange be a new live range whose start is (original start + * node, original start offset) and whose end is (first partially + * contained child, first partially contained child’s length). + * 14.4. Let subfragment be the result of cloning the contents of + * subrange. + * 14.5. Append subfragment to clone. + */ + var clone = NodeAlgorithm_1.node_clone(firstPartiallyContainedChild); + MutationAlgorithm_1.mutation_append(clone, fragment); + var subrange = CreateAlgorithm_1.create_range([originalStartNode, originalStartOffset], [firstPartiallyContainedChild, TreeAlgorithm_1.tree_nodeLength(firstPartiallyContainedChild)]); + var subfragment = range_cloneTheContents(subrange); + MutationAlgorithm_1.mutation_append(subfragment, clone); + } + try { + /** + * 15. For each contained child in contained children, append contained + * child to fragment. + * 15.1. Let clone be a clone of contained child with the clone children + * flag set. + * 15.2. Append clone to fragment. + */ + for (var containedChildren_2 = __values(containedChildren), containedChildren_2_1 = containedChildren_2.next(); !containedChildren_2_1.done; containedChildren_2_1 = containedChildren_2.next()) { + var child = containedChildren_2_1.value; + var clone = NodeAlgorithm_1.node_clone(child); + MutationAlgorithm_1.mutation_append(clone, fragment); + } + } + catch (e_6_1) { e_6 = { error: e_6_1 }; } + finally { + try { + if (containedChildren_2_1 && !containedChildren_2_1.done && (_c = containedChildren_2.return)) _c.call(containedChildren_2); + } + finally { if (e_6) throw e_6.error; } + } + if (util_1.Guard.isCharacterDataNode(lastPartiallyContainedChild)) { + /** + * 16. If last partially contained child is a Text, ProcessingInstruction, + * or Comment node: + * 16.1. Let clone be a clone of original end node. + * 16.2. Set the data of clone to the result of substringing data with + * node original end node, offset 0, and count original end offset. + * 16.3. Append clone to fragment. + */ + var clone = NodeAlgorithm_1.node_clone(originalEndNode); + clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalEndNode, 0, originalEndOffset); + MutationAlgorithm_1.mutation_append(clone, fragment); + } + else if (lastPartiallyContainedChild !== null) { + /** + * 17. Otherwise, if last partially contained child is not null: + * 17.1. Let clone be a clone of last partially contained child. + * 17.2. Append clone to fragment. + * 17.3. Let subrange be a new live range whose start is (last partially + * contained child, 0) and whose end is (original end node, original + * end offset). + * 17.4. Let subfragment be the result of cloning the contents of subrange. + * 17.5. Append subfragment to clone. + */ + var clone = NodeAlgorithm_1.node_clone(lastPartiallyContainedChild); + fragment.append(clone); + var subrange = CreateAlgorithm_1.create_range([lastPartiallyContainedChild, 0], [originalEndNode, originalEndOffset]); + var subfragment = range_extract(subrange); + MutationAlgorithm_1.mutation_append(subfragment, clone); + } + /** + * 18. Return fragment. + */ + return fragment; +} +exports.range_cloneTheContents = range_cloneTheContents; +/** + * Inserts a node into a range at the start boundary point. + * + * @param node - node to insert + * @param range - a range + */ +function range_insert(node, range) { + var e_7, _a; + /** + * 1. If range’s start node is a ProcessingInstruction or Comment node, is a + * Text node whose parent is null, or is node, then throw a + * "HierarchyRequestError" DOMException. + */ + if (util_1.Guard.isProcessingInstructionNode(range._startNode) || + util_1.Guard.isCommentNode(range._startNode) || + (util_1.Guard.isTextNode(range._startNode) && range._startNode._parent === null) || + range._startNode === node) { + throw new DOMException_1.HierarchyRequestError(); + } + /** + * 2. Let referenceNode be null. + * 3. If range’s start node is a Text node, set referenceNode to that Text + * node. + * 4. Otherwise, set referenceNode to the child of start node whose index is + * start offset, and null if there is no such child. + */ + var referenceNode = null; + if (util_1.Guard.isTextNode(range._startNode)) { + referenceNode = range._startNode; + } + else { + var index = 0; + try { + for (var _b = __values(range._startNode._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var child = _c.value; + if (index === range._startOffset) { + referenceNode = child; + break; + } + index++; + } + } + catch (e_7_1) { e_7 = { error: e_7_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_7) throw e_7.error; } + } + } + /** + * 5. Let parent be range’s start node if referenceNode is null, and + * referenceNode’s parent otherwise. + */ + var parent; + if (referenceNode === null) { + parent = range._startNode; + } + else { + if (referenceNode._parent === null) { + throw new Error("Parent node is null."); + } + parent = referenceNode._parent; + } + /** + * 6. Ensure pre-insertion validity of node into parent before referenceNode. + */ + MutationAlgorithm_1.mutation_ensurePreInsertionValidity(node, parent, referenceNode); + /** + * 7. If range’s start node is a Text node, set referenceNode to the result + * of splitting it with offset range’s start offset. + */ + if (util_1.Guard.isTextNode(range._startNode)) { + referenceNode = TextAlgorithm_1.text_split(range._startNode, range._startOffset); + } + /** + * 8. If node is referenceNode, set referenceNode to its next sibling. + */ + if (node === referenceNode) { + referenceNode = node._nextSibling; + } + /** + * 9. If node’s parent is not null, remove node from its parent. + */ + if (node._parent !== null) { + MutationAlgorithm_1.mutation_remove(node, node._parent); + } + /** + * 10. Let newOffset be parent’s length if referenceNode is null, and + * referenceNode’s index otherwise. + */ + var newOffset = (referenceNode === null ? + TreeAlgorithm_1.tree_nodeLength(parent) : TreeAlgorithm_1.tree_index(referenceNode)); + /** + * 11. Increase newOffset by node’s length if node is a DocumentFragment + * node, and one otherwise. + */ + if (util_1.Guard.isDocumentFragmentNode(node)) { + newOffset += TreeAlgorithm_1.tree_nodeLength(node); + } + else { + newOffset++; + } + /** + * 12. Pre-insert node into parent before referenceNode. + */ + MutationAlgorithm_1.mutation_preInsert(node, parent, referenceNode); + /** + * 13. If range is collapsed, then set range’s end to (parent, newOffset). + */ + if (range_collapsed(range)) { + range._end = [parent, newOffset]; + } +} +exports.range_insert = range_insert; +/** + * Traverses through all contained nodes of a range. + * + * @param range - a range + */ +function range_getContainedNodes(range) { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var container = range.commonAncestorContainer; + var currentNode = TreeAlgorithm_1.tree_getFirstDescendantNode(container); + return { + next: function () { + while (currentNode && !range_isContained(currentNode, range)) { + currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); + } + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); + return result; + } + } + }; + }, + _a; +} +exports.range_getContainedNodes = range_getContainedNodes; +/** + * Traverses through all partially contained nodes of a range. + * + * @param range - a range + */ +function range_getPartiallyContainedNodes(range) { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var container = range.commonAncestorContainer; + var currentNode = TreeAlgorithm_1.tree_getFirstDescendantNode(container); + return { + next: function () { + while (currentNode && !range_isPartiallyContained(currentNode, range)) { + currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); + } + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); + return result; + } + } + }; + }, + _a; +} +exports.range_getPartiallyContainedNodes = range_getPartiallyContainedNodes; +//# sourceMappingURL=RangeAlgorithm.js.map + +/***/ }), + +/***/ 41853: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMException_1 = __nccwpck_require__(13166); +/** + * Matches elements with the given selectors. + * + * @param selectors - selectors + * @param node - the node to match against + */ +function selectors_scopeMatchASelectorsString(selectors, node) { + /** + * TODO: Selectors + * 1. Let s be the result of parse a selector selectors. [SELECTORS4] + * 2. If s is failure, then throw a "SyntaxError" DOMException. + * 3. Return the result of match a selector against a tree with s and node’s + * root using scoping root node. [SELECTORS4]. + */ + throw new DOMException_1.NotSupportedError(); +} +exports.selectors_scopeMatchASelectorsString = selectors_scopeMatchASelectorsString; +//# sourceMappingURL=SelectorsAlgorithm.js.map + +/***/ }), + +/***/ 68733: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(65282); +var util_2 = __nccwpck_require__(76195); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); +/** + * Signals a slot change to the given slot. + * + * @param slot - a slot + */ +function shadowTree_signalASlotChange(slot) { + /** + * 1. Append slot to slot’s relevant agent’s signal slots. + * 2. Queue a mutation observer microtask. + */ + var window = DOMImpl_1.dom.window; + window._signalSlots.add(slot); + MutationObserverAlgorithm_1.observer_queueAMutationObserverMicrotask(); +} +exports.shadowTree_signalASlotChange = shadowTree_signalASlotChange; +/** + * Determines whether a the shadow tree of the given element node is + * connected to a document node. + * + * @param element - an element node of the shadow tree + */ +function shadowTree_isConnected(element) { + /** + * An element is connected if its shadow-including root is a document. + */ + return util_1.Guard.isDocumentNode(TreeAlgorithm_1.tree_rootNode(element, true)); +} +exports.shadowTree_isConnected = shadowTree_isConnected; +/** + * Determines whether a slotable is assigned. + * + * @param slotable - a slotable + */ +function shadowTree_isAssigned(slotable) { + /** + * A slotable is assigned if its assigned slot is non-null. + */ + return (slotable._assignedSlot !== null); +} +exports.shadowTree_isAssigned = shadowTree_isAssigned; +/** + * Finds a slot for the given slotable. + * + * @param slotable - a slotable + * @param openFlag - `true` to search open shadow tree's only + */ +function shadowTree_findASlot(slotable, openFlag) { + if (openFlag === void 0) { openFlag = false; } + /** + * 1. If slotable’s parent is null, then return null. + * 2. Let shadow be slotable’s parent’s shadow root. + * 3. If shadow is null, then return null. + * 4. If the open flag is set and shadow’s mode is not "open", then + * return null. + * 5. Return the first slot in tree order in shadow’s descendants whose name + * is slotable’s name, if any, and null otherwise. + */ + var node = util_1.Cast.asNode(slotable); + var parent = node._parent; + if (parent === null) + return null; + var shadow = parent._shadowRoot || null; + if (shadow === null) + return null; + if (openFlag && shadow._mode !== "open") + return null; + var child = TreeAlgorithm_1.tree_getFirstDescendantNode(shadow, false, true, function (e) { return util_1.Guard.isSlot(e); }); + while (child !== null) { + if (child._name === slotable._name) + return child; + child = TreeAlgorithm_1.tree_getNextDescendantNode(shadow, child, false, true, function (e) { return util_1.Guard.isSlot(e); }); + } + return null; +} +exports.shadowTree_findASlot = shadowTree_findASlot; +/** + * Finds slotables for the given slot. + * + * @param slot - a slot + */ +function shadowTree_findSlotables(slot) { + var e_1, _a; + /** + * 1. Let result be an empty list. + * 2. If slot’s root is not a shadow root, then return result. + */ + var result = []; + var root = TreeAlgorithm_1.tree_rootNode(slot); + if (!util_1.Guard.isShadowRoot(root)) + return result; + /** + * 3. Let host be slot’s root’s host. + * 4. For each slotable child of host, slotable, in tree order: + */ + var host = root._host; + try { + for (var _b = __values(host._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var slotable = _c.value; + if (util_1.Guard.isSlotable(slotable)) { + /** + * 4.1. Let foundSlot be the result of finding a slot given slotable. + * 4.2. If foundSlot is slot, then append slotable to result. + */ + var foundSlot = shadowTree_findASlot(slotable); + if (foundSlot === slot) { + result.push(slotable); + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + /** + * 5. Return result. + */ + return result; +} +exports.shadowTree_findSlotables = shadowTree_findSlotables; +/** + * Finds slotables for the given slot. + * + * @param slot - a slot + */ +function shadowTree_findFlattenedSlotables(slot) { + var e_2, _a, e_3, _b; + /** + * 1. Let result be an empty list. + * 2. If slot’s root is not a shadow root, then return result. + */ + var result = []; + var root = TreeAlgorithm_1.tree_rootNode(slot); + if (!util_1.Guard.isShadowRoot(root)) + return result; + /** + * 3. Let slotables be the result of finding slotables given slot. + * 4. If slotables is the empty list, then append each slotable child of + * slot, in tree order, to slotables. + */ + var slotables = shadowTree_findSlotables(slot); + if (util_2.isEmpty(slotables)) { + try { + for (var _c = __values(slot._children), _d = _c.next(); !_d.done; _d = _c.next()) { + var slotable = _d.value; + if (util_1.Guard.isSlotable(slotable)) { + slotables.push(slotable); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_2) throw e_2.error; } + } + } + try { + /** + * 5. For each node in slotables: + */ + for (var slotables_1 = __values(slotables), slotables_1_1 = slotables_1.next(); !slotables_1_1.done; slotables_1_1 = slotables_1.next()) { + var node = slotables_1_1.value; + /** + * 5.1. If node is a slot whose root is a shadow root, then: + */ + if (util_1.Guard.isSlot(node) && util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(node))) { + /** + * 5.1.1. Let temporaryResult be the result of finding flattened slotables given node. + * 5.1.2. Append each slotable in temporaryResult, in order, to result. + */ + var temporaryResult = shadowTree_findFlattenedSlotables(node); + result.push.apply(result, __spread(temporaryResult)); + } + else { + /** + * 5.2. Otherwise, append node to result. + */ + result.push(node); + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (slotables_1_1 && !slotables_1_1.done && (_b = slotables_1.return)) _b.call(slotables_1); + } + finally { if (e_3) throw e_3.error; } + } + /** + * 6. Return result. + */ + return result; +} +exports.shadowTree_findFlattenedSlotables = shadowTree_findFlattenedSlotables; +/** + * Assigns slotables to the given slot. + * + * @param slot - a slot + */ +function shadowTree_assignSlotables(slot) { + var e_4, _a; + /** + * 1. Let slotables be the result of finding slotables for slot. + * 2. If slotables and slot’s assigned nodes are not identical, then run + * signal a slot change for slot. + */ + var slotables = shadowTree_findSlotables(slot); + if (slotables.length === slot._assignedNodes.length) { + var nodesIdentical = true; + for (var i = 0; i < slotables.length; i++) { + if (slotables[i] !== slot._assignedNodes[i]) { + nodesIdentical = false; + break; + } + } + if (!nodesIdentical) { + shadowTree_signalASlotChange(slot); + } + } + /** + * 3. Set slot’s assigned nodes to slotables. + * 4. For each slotable in slotables, set slotable’s assigned slot to slot. + */ + slot._assignedNodes = slotables; + try { + for (var slotables_2 = __values(slotables), slotables_2_1 = slotables_2.next(); !slotables_2_1.done; slotables_2_1 = slotables_2.next()) { + var slotable = slotables_2_1.value; + slotable._assignedSlot = slot; + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (slotables_2_1 && !slotables_2_1.done && (_a = slotables_2.return)) _a.call(slotables_2); + } + finally { if (e_4) throw e_4.error; } + } +} +exports.shadowTree_assignSlotables = shadowTree_assignSlotables; +/** + * Assigns slotables to all nodes of a tree. + * + * @param root - root node + */ +function shadowTree_assignSlotablesForATree(root) { + /** + * To assign slotables for a tree, given a node root, run assign slotables + * for each slot slot in root’s inclusive descendants, in tree order. + */ + var descendant = TreeAlgorithm_1.tree_getFirstDescendantNode(root, true, false, function (e) { return util_1.Guard.isSlot(e); }); + while (descendant !== null) { + shadowTree_assignSlotables(descendant); + descendant = TreeAlgorithm_1.tree_getNextDescendantNode(root, descendant, true, false, function (e) { return util_1.Guard.isSlot(e); }); + } +} +exports.shadowTree_assignSlotablesForATree = shadowTree_assignSlotablesForATree; +/** + * Assigns a slot to a slotables. + * + * @param slotable - a slotable + */ +function shadowTree_assignASlot(slotable) { + /** + * 1. Let slot be the result of finding a slot with slotable. + * 2. If slot is non-null, then run assign slotables for slot. + */ + var slot = shadowTree_findASlot(slotable); + if (slot !== null) { + shadowTree_assignSlotables(slot); + } +} +exports.shadowTree_assignASlot = shadowTree_assignASlot; +//# sourceMappingURL=ShadowTreeAlgorithm.js.map + +/***/ }), + +/***/ 13512: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(65282); +var DOMException_1 = __nccwpck_require__(13166); +var CreateAlgorithm_1 = __nccwpck_require__(57339); +var TreeAlgorithm_1 = __nccwpck_require__(16620); +var CharacterDataAlgorithm_1 = __nccwpck_require__(19461); +var MutationAlgorithm_1 = __nccwpck_require__(45463); +/** + * Returns node with its adjacent text and cdata node siblings. + * + * @param node - a node + * @param self - whether to include node itself + */ +function text_contiguousTextNodes(node, self) { + var _a; + if (self === void 0) { self = false; } + /** + * The contiguous Text nodes of a node node are node, node’s previous + * sibling Text node, if any, and its contiguous Text nodes, and node’s next + * sibling Text node, if any, and its contiguous Text nodes, avoiding any + * duplicates. + */ + return _a = {}, + _a[Symbol.iterator] = function () { + var currentNode = node; + while (currentNode && util_1.Guard.isTextNode(currentNode._previousSibling)) { + currentNode = currentNode._previousSibling; + } + return { + next: function () { + if (currentNode && (!self && currentNode === node)) { + if (util_1.Guard.isTextNode(currentNode._nextSibling)) { + currentNode = currentNode._nextSibling; + } + else { + currentNode = null; + } + } + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + if (util_1.Guard.isTextNode(currentNode._nextSibling)) { + currentNode = currentNode._nextSibling; + } + else { + currentNode = null; + } + return result; + } + } + }; + }, + _a; +} +exports.text_contiguousTextNodes = text_contiguousTextNodes; +/** + * Returns node with its adjacent text node siblings. + * + * @param node - a node + * @param self - whether to include node itself + */ +function text_contiguousExclusiveTextNodes(node, self) { + var _a; + if (self === void 0) { self = false; } + /** + * The contiguous exclusive Text nodes of a node node are node, node’s + * previous sibling exclusive Text node, if any, and its contiguous + * exclusive Text nodes, and node’s next sibling exclusive Text node, + * if any, and its contiguous exclusive Text nodes, avoiding any duplicates. + */ + return _a = {}, + _a[Symbol.iterator] = function () { + var currentNode = node; + while (currentNode && util_1.Guard.isExclusiveTextNode(currentNode._previousSibling)) { + currentNode = currentNode._previousSibling; + } + return { + next: function () { + if (currentNode && (!self && currentNode === node)) { + if (util_1.Guard.isExclusiveTextNode(currentNode._nextSibling)) { + currentNode = currentNode._nextSibling; + } + else { + currentNode = null; + } + } + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + if (util_1.Guard.isExclusiveTextNode(currentNode._nextSibling)) { + currentNode = currentNode._nextSibling; + } + else { + currentNode = null; + } + return result; + } + } + }; + }, + _a; +} +exports.text_contiguousExclusiveTextNodes = text_contiguousExclusiveTextNodes; +/** + * Returns the concatenation of the data of all the Text node descendants of + * node, in tree order. + * + * @param node - a node + */ +function text_descendantTextContent(node) { + /** + * The descendant text content of a node node is the concatenation of the + * data of all the Text node descendants of node, in tree order. + */ + var contents = ''; + var text = TreeAlgorithm_1.tree_getFirstDescendantNode(node, false, false, function (e) { return util_1.Guard.isTextNode(e); }); + while (text !== null) { + contents += text._data; + text = TreeAlgorithm_1.tree_getNextDescendantNode(node, text, false, false, function (e) { return util_1.Guard.isTextNode(e); }); + } + return contents; +} +exports.text_descendantTextContent = text_descendantTextContent; +/** + * Splits data at the given offset and returns the remainder as a text + * node. + * + * @param node - a text node + * @param offset - the offset at which to split the nodes. + */ +function text_split(node, offset) { + var e_1, _a; + /** + * 1. Let length be node’s length. + * 2. If offset is greater than length, then throw an "IndexSizeError" + * DOMException. + */ + var length = node._data.length; + if (offset > length) { + throw new DOMException_1.IndexSizeError(); + } + /** + * 3. Let count be length minus offset. + * 4. Let new data be the result of substringing data with node node, + * offset offset, and count count. + * 5. Let new node be a new Text node, with the same node document as node. + * Set new node’s data to new data. + * 6. Let parent be node’s parent. + * 7. If parent is not null, then: + */ + var count = length - offset; + var newData = CharacterDataAlgorithm_1.characterData_substringData(node, offset, count); + var newNode = CreateAlgorithm_1.create_text(node._nodeDocument, newData); + var parent = node._parent; + if (parent !== null) { + /** + * 7.1. Insert new node into parent before node’s next sibling. + */ + MutationAlgorithm_1.mutation_insert(newNode, parent, node._nextSibling); + try { + /** + * 7.2. For each live range whose start node is node and start offset is + * greater than offset, set its start node to new node and decrease its + * start offset by offset. + * 7.3. For each live range whose end node is node and end offset is greater + * than offset, set its end node to new node and decrease its end offset + * by offset. + * 7.4. For each live range whose start node is parent and start offset is + * equal to the index of node plus 1, increase its start offset by 1. + * 7.5. For each live range whose end node is parent and end offset is equal + * to the index of node plus 1, increase its end offset by 1. + */ + for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) { + var range = _c.value; + if (range._start[0] === node && range._start[1] > offset) { + range._start[0] = newNode; + range._start[1] -= offset; + } + if (range._end[0] === node && range._end[1] > offset) { + range._end[0] = newNode; + range._end[1] -= offset; + } + var index = TreeAlgorithm_1.tree_index(node); + if (range._start[0] === parent && range._start[1] === index + 1) { + range._start[1]++; + } + if (range._end[0] === parent && range._end[1] === index + 1) { + range._end[1]++; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + /** + * 8. Replace data with node node, offset offset, count count, and data + * the empty string. + * 9. Return new node. + */ + CharacterDataAlgorithm_1.characterData_replaceData(node, offset, count, ''); + return newNode; +} +exports.text_split = text_split; +//# sourceMappingURL=TextAlgorithm.js.map + +/***/ }), + +/***/ 80998: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var DOMException_1 = __nccwpck_require__(13166); +/** + * Applies the filter to the given node and returns the result. + * + * @param traverser - the `NodeIterator` or `TreeWalker` instance + * @param node - the node to filter + */ +function traversal_filter(traverser, node) { + /** + * 1. If traverser’s active flag is set, then throw an "InvalidStateError" + * DOMException. + */ + if (traverser._activeFlag) { + throw new DOMException_1.InvalidStateError(); + } + /** + * 2. Let n be node’s nodeType attribute value − 1. + */ + var n = node._nodeType - 1; + /** + * 3. If the nth bit (where 0 is the least significant bit) of traverser’s + * whatToShow is not set, then return FILTER_SKIP. + */ + var mask = 1 << n; + if ((traverser.whatToShow & mask) === 0) { + return interfaces_1.FilterResult.Skip; + } + /** + * 4. If traverser’s filter is null, then return FILTER_ACCEPT. + */ + if (!traverser.filter) { + return interfaces_1.FilterResult.Accept; + } + /** + * 5. Set traverser’s active flag. + */ + traverser._activeFlag = true; + /** + * 6. Let result be the return value of call a user object’s operation with + * traverser’s filter, "acceptNode", and « node ». If this throws an + * exception, then unset traverser’s active flag and rethrow the exception. + */ + var result = interfaces_1.FilterResult.Reject; + try { + result = traverser.filter.acceptNode(node); + } + catch (err) { + traverser._activeFlag = false; + throw err; + } + /** + * 7. Unset traverser’s active flag. + * 8. Return result. + */ + traverser._activeFlag = false; + return result; +} +exports.traversal_filter = traversal_filter; +//# sourceMappingURL=TraversalAlgorithm.js.map + +/***/ }), + +/***/ 16620: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(65282); +var interfaces_1 = __nccwpck_require__(27305); +/** + * Gets the next descendant of the given node of the tree rooted at `root` + * in depth-first pre-order. + * + * @param root - root node of the tree + * @param node - a node + * @param shadow - whether to visit shadow tree nodes + */ +function _getNextDescendantNode(root, node, shadow) { + if (shadow === void 0) { shadow = false; } + // traverse shadow tree + if (shadow && util_1.Guard.isElementNode(node) && util_1.Guard.isShadowRoot(node.shadowRoot)) { + if (node.shadowRoot._firstChild) + return node.shadowRoot._firstChild; + } + // traverse child nodes + if (node._firstChild) + return node._firstChild; + if (node === root) + return null; + // traverse siblings + if (node._nextSibling) + return node._nextSibling; + // traverse parent's next sibling + var parent = node._parent; + while (parent && parent !== root) { + if (parent._nextSibling) + return parent._nextSibling; + parent = parent._parent; + } + return null; +} +function _emptyIterator() { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + return { + next: function () { + return { done: true, value: null }; + } + }; + }, + _a; +} +/** + * Returns the first descendant node of the tree rooted at `node` in + * depth-first pre-order. + * + * @param node - root node of the tree + * @param self - whether to include `node` in traversal + * @param shadow - whether to visit shadow tree nodes + * @param filter - a function to filter nodes + */ +function tree_getFirstDescendantNode(node, self, shadow, filter) { + if (self === void 0) { self = false; } + if (shadow === void 0) { shadow = false; } + var firstNode = (self ? node : _getNextDescendantNode(node, node, shadow)); + while (firstNode && filter && !filter(firstNode)) { + firstNode = _getNextDescendantNode(node, firstNode, shadow); + } + return firstNode; +} +exports.tree_getFirstDescendantNode = tree_getFirstDescendantNode; +/** + * Returns the next descendant node of the tree rooted at `node` in + * depth-first pre-order. + * + * @param node - root node of the tree + * @param currentNode - current descendant node + * @param self - whether to include `node` in traversal + * @param shadow - whether to visit shadow tree nodes + * @param filter - a function to filter nodes + */ +function tree_getNextDescendantNode(node, currentNode, self, shadow, filter) { + if (self === void 0) { self = false; } + if (shadow === void 0) { shadow = false; } + var nextNode = _getNextDescendantNode(node, currentNode, shadow); + while (nextNode && filter && !filter(nextNode)) { + nextNode = _getNextDescendantNode(node, nextNode, shadow); + } + return nextNode; +} +exports.tree_getNextDescendantNode = tree_getNextDescendantNode; +/** + * Traverses through all descendant nodes of the tree rooted at + * `node` in depth-first pre-order. + * + * @param node - root node of the tree + * @param self - whether to include `node` in traversal + * @param shadow - whether to visit shadow tree nodes + * @param filter - a function to filter nodes + */ +function tree_getDescendantNodes(node, self, shadow, filter) { + var _a; + if (self === void 0) { self = false; } + if (shadow === void 0) { shadow = false; } + if (!self && node._children.size === 0) { + return _emptyIterator(); + } + return _a = {}, + _a[Symbol.iterator] = function () { + var currentNode = (self ? node : _getNextDescendantNode(node, node, shadow)); + return { + next: function () { + while (currentNode && filter && !filter(currentNode)) { + currentNode = _getNextDescendantNode(node, currentNode, shadow); + } + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + currentNode = _getNextDescendantNode(node, currentNode, shadow); + return result; + } + } + }; + }, + _a; +} +exports.tree_getDescendantNodes = tree_getDescendantNodes; +/** + * Traverses through all descendant element nodes of the tree rooted at + * `node` in depth-first preorder. + * + * @param node - root node of the tree + * @param self - whether to include `node` in traversal + * @param shadow - whether to visit shadow tree nodes + * @param filter - a function to filter nodes + */ +function tree_getDescendantElements(node, self, shadow, filter) { + var _a; + if (self === void 0) { self = false; } + if (shadow === void 0) { shadow = false; } + if (!self && node._children.size === 0) { + return _emptyIterator(); + } + return _a = {}, + _a[Symbol.iterator] = function () { + var it = tree_getDescendantNodes(node, self, shadow, function (e) { return util_1.Guard.isElementNode(e); })[Symbol.iterator](); + var currentNode = it.next().value; + return { + next: function () { + while (currentNode && filter && !filter(currentNode)) { + currentNode = it.next().value; + } + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + currentNode = it.next().value; + return result; + } + } + }; + }, + _a; +} +exports.tree_getDescendantElements = tree_getDescendantElements; +/** + * Traverses through all sibling nodes of `node`. + * + * @param node - root node of the tree + * @param self - whether to include `node` in traversal + * @param filter - a function to filter nodes + */ +function tree_getSiblingNodes(node, self, filter) { + var _a; + if (self === void 0) { self = false; } + if (!node._parent || node._parent._children.size === 0) { + return _emptyIterator(); + } + return _a = {}, + _a[Symbol.iterator] = function () { + var currentNode = node._parent ? node._parent._firstChild : null; + return { + next: function () { + while (currentNode && (filter && !filter(currentNode) || (!self && currentNode === node))) { + currentNode = currentNode._nextSibling; + } + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + currentNode = currentNode._nextSibling; + return result; + } + } + }; + }, + _a; +} +exports.tree_getSiblingNodes = tree_getSiblingNodes; +/** + * Gets the first ancestor of `node` in reverse tree order. + * + * @param node - root node of the tree + * @param self - whether to include `node` in traversal + * @param filter - a function to filter nodes + */ +function tree_getFirstAncestorNode(node, self, filter) { + if (self === void 0) { self = false; } + var firstNode = self ? node : node._parent; + while (firstNode && filter && !filter(firstNode)) { + firstNode = firstNode._parent; + } + return firstNode; +} +exports.tree_getFirstAncestorNode = tree_getFirstAncestorNode; +/** + * Gets the first ancestor of `node` in reverse tree order. + * + * @param node - root node of the tree + * @param self - whether to include `node` in traversal + * @param filter - a function to filter nodes + */ +function tree_getNextAncestorNode(node, currentNode, self, filter) { + if (self === void 0) { self = false; } + var nextNode = currentNode._parent; + while (nextNode && filter && !filter(nextNode)) { + nextNode = nextNode._parent; + } + return nextNode; +} +exports.tree_getNextAncestorNode = tree_getNextAncestorNode; +/** + * Traverses through all ancestor nodes `node` in reverse tree order. + * + * @param node - root node of the tree + * @param self - whether to include `node` in traversal + * @param filter - a function to filter nodes + */ +function tree_getAncestorNodes(node, self, filter) { + var _a; + if (self === void 0) { self = false; } + if (!self && !node._parent) { + return _emptyIterator(); + } + return _a = {}, + _a[Symbol.iterator] = function () { + var currentNode = tree_getFirstAncestorNode(node, self, filter); + return { + next: function () { + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + currentNode = tree_getNextAncestorNode(node, currentNode, self, filter); + return result; + } + } + }; + }, + _a; +} +exports.tree_getAncestorNodes = tree_getAncestorNodes; +/** + * Returns the common ancestor of the given nodes. + * + * @param nodeA - a node + * @param nodeB - a node + */ +function tree_getCommonAncestor(nodeA, nodeB) { + if (nodeA === nodeB) { + return nodeA._parent; + } + // lists of parent nodes + var parentsA = []; + var parentsB = []; + var pA = tree_getFirstAncestorNode(nodeA, true); + while (pA !== null) { + parentsA.push(pA); + pA = tree_getNextAncestorNode(nodeA, pA, true); + } + var pB = tree_getFirstAncestorNode(nodeB, true); + while (pB !== null) { + parentsB.push(pB); + pB = tree_getNextAncestorNode(nodeB, pB, true); + } + // walk through parents backwards until they differ + var pos1 = parentsA.length; + var pos2 = parentsB.length; + var parent = null; + for (var i = Math.min(pos1, pos2); i > 0; i--) { + var parent1 = parentsA[--pos1]; + var parent2 = parentsB[--pos2]; + if (parent1 !== parent2) { + break; + } + parent = parent1; + } + return parent; +} +exports.tree_getCommonAncestor = tree_getCommonAncestor; +/** + * Returns the node following `node` in depth-first preorder. + * + * @param root - root of the subtree + * @param node - a node + */ +function tree_getFollowingNode(root, node) { + if (node._firstChild) { + return node._firstChild; + } + else if (node._nextSibling) { + return node._nextSibling; + } + else { + while (true) { + var parent = node._parent; + if (parent === null || parent === root) { + return null; + } + else if (parent._nextSibling) { + return parent._nextSibling; + } + else { + node = parent; + } + } + } +} +exports.tree_getFollowingNode = tree_getFollowingNode; +/** + * Returns the node preceding `node` in depth-first preorder. + * + * @param root - root of the subtree + * @param node - a node + */ +function tree_getPrecedingNode(root, node) { + if (node === root) { + return null; + } + if (node._previousSibling) { + node = node._previousSibling; + if (node._lastChild) { + return node._lastChild; + } + else { + return node; + } + } + else { + return node._parent; + } +} +exports.tree_getPrecedingNode = tree_getPrecedingNode; +/** + * Determines if the node tree is constrained. A node tree is + * constrained as follows, expressed as a relationship between the + * type of node and its allowed children: + * - Document (In tree order) + * * Zero or more nodes each of which is ProcessingInstruction + * or Comment. + * * Optionally one DocumentType node. + * * Zero or more nodes each of which is ProcessingInstruction + * or Comment. + * * Optionally one Element node. + * * Zero or more nodes each of which is ProcessingInstruction + * or Comment. + * - DocumentFragment, Element + * * Zero or more nodes each of which is Element, Text, + * ProcessingInstruction, or Comment. + * - DocumentType, Text, ProcessingInstruction, Comment + * * None. + * + * @param node - the root of the tree + */ +function tree_isConstrained(node) { + var e_1, _a, e_2, _b, e_3, _c; + switch (node._nodeType) { + case interfaces_1.NodeType.Document: + var hasDocType = false; + var hasElement = false; + try { + for (var _d = __values(node._children), _e = _d.next(); !_e.done; _e = _d.next()) { + var childNode = _e.value; + switch (childNode._nodeType) { + case interfaces_1.NodeType.ProcessingInstruction: + case interfaces_1.NodeType.Comment: + break; + case interfaces_1.NodeType.DocumentType: + if (hasDocType || hasElement) + return false; + hasDocType = true; + break; + case interfaces_1.NodeType.Element: + if (hasElement) + return false; + hasElement = true; + break; + default: + return false; + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + } + finally { if (e_1) throw e_1.error; } + } + break; + case interfaces_1.NodeType.DocumentFragment: + case interfaces_1.NodeType.Element: + try { + for (var _f = __values(node._children), _g = _f.next(); !_g.done; _g = _f.next()) { + var childNode = _g.value; + switch (childNode._nodeType) { + case interfaces_1.NodeType.Element: + case interfaces_1.NodeType.Text: + case interfaces_1.NodeType.ProcessingInstruction: + case interfaces_1.NodeType.CData: + case interfaces_1.NodeType.Comment: + break; + default: + return false; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_g && !_g.done && (_b = _f.return)) _b.call(_f); + } + finally { if (e_2) throw e_2.error; } + } + break; + case interfaces_1.NodeType.DocumentType: + case interfaces_1.NodeType.Text: + case interfaces_1.NodeType.ProcessingInstruction: + case interfaces_1.NodeType.CData: + case interfaces_1.NodeType.Comment: + return (!node.hasChildNodes()); + } + try { + for (var _h = __values(node._children), _j = _h.next(); !_j.done; _j = _h.next()) { + var childNode = _j.value; + // recursively check child nodes + if (!tree_isConstrained(childNode)) + return false; + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_j && !_j.done && (_c = _h.return)) _c.call(_h); + } + finally { if (e_3) throw e_3.error; } + } + return true; +} +exports.tree_isConstrained = tree_isConstrained; +/** + * Returns the length of a node. + * + * @param node - a node to check + */ +function tree_nodeLength(node) { + /** + * To determine the length of a node node, switch on node: + * - DocumentType + * Zero. + * - Text + * - ProcessingInstruction + * - Comment + * Its data’s length. + * - Any other node + * Its number of children. + */ + if (util_1.Guard.isDocumentTypeNode(node)) { + return 0; + } + else if (util_1.Guard.isCharacterDataNode(node)) { + return node._data.length; + } + else { + return node._children.size; + } +} +exports.tree_nodeLength = tree_nodeLength; +/** + * Determines if a node is empty. + * + * @param node - a node to check + */ +function tree_isEmpty(node) { + /** + * A node is considered empty if its length is zero. + */ + return (tree_nodeLength(node) === 0); +} +exports.tree_isEmpty = tree_isEmpty; +/** + * Returns the root node of a tree. The root of an object is itself, + * if its parent is `null`, or else it is the root of its parent. + * The root of a tree is any object participating in that tree + * whose parent is `null`. + * + * @param node - a node of the tree + * @param shadow - `true` to return shadow-including root, otherwise + * `false` + */ +function tree_rootNode(node, shadow) { + if (shadow === void 0) { shadow = false; } + /** + * The root of an object is itself, if its parent is null, or else it is the + * root of its parent. The root of a tree is any object participating in + * that tree whose parent is null. + */ + if (shadow) { + var root = tree_rootNode(node, false); + if (util_1.Guard.isShadowRoot(root)) + return tree_rootNode(root._host, true); + else + return root; + } + else { + if (!node._parent) + return node; + else + return tree_rootNode(node._parent); + } +} +exports.tree_rootNode = tree_rootNode; +/** + * Determines whether `other` is a descendant of `node`. An object + * A is called a descendant of an object B, if either A is a child + * of B or A is a child of an object C that is a descendant of B. + * + * @param node - a node + * @param other - the node to check + * @param self - if `true`, traversal includes `node` itself + * @param shadow - if `true`, traversal includes the + * node's and its descendant's shadow trees as well. + */ +function tree_isDescendantOf(node, other, self, shadow) { + if (self === void 0) { self = false; } + if (shadow === void 0) { shadow = false; } + /** + * An object A is called a descendant of an object B, if either A is a + * child of B or A is a child of an object C that is a descendant of B. + * + * An inclusive descendant is an object or one of its descendants. + */ + var child = tree_getFirstDescendantNode(node, self, shadow); + while (child !== null) { + if (child === other) { + return true; + } + child = tree_getNextDescendantNode(node, child, self, shadow); + } + return false; +} +exports.tree_isDescendantOf = tree_isDescendantOf; +/** + * Determines whether `other` is an ancestor of `node`. An object A + * is called an ancestor of an object B if and only if B is a + * descendant of A. + * + * @param node - a node + * @param other - the node to check + * @param self - if `true`, traversal includes `node` itself + * @param shadow - if `true`, traversal includes the + * node's and its descendant's shadow trees as well. + */ +function tree_isAncestorOf(node, other, self, shadow) { + if (self === void 0) { self = false; } + if (shadow === void 0) { shadow = false; } + var ancestor = self ? node : shadow && util_1.Guard.isShadowRoot(node) ? + node._host : node._parent; + while (ancestor !== null) { + if (ancestor === other) + return true; + ancestor = shadow && util_1.Guard.isShadowRoot(ancestor) ? + ancestor._host : ancestor._parent; + } + return false; +} +exports.tree_isAncestorOf = tree_isAncestorOf; +/** + * Determines whether `other` is a host-including ancestor of `node`. An + * object A is a host-including inclusive ancestor of an object B, if either + * A is an inclusive ancestor of B, or if B’s root has a non-null host and + * A is a host-including inclusive ancestor of B’s root’s host. + * + * @param node - a node + * @param other - the node to check + * @param self - if `true`, traversal includes `node` itself + */ +function tree_isHostIncludingAncestorOf(node, other, self) { + if (self === void 0) { self = false; } + if (tree_isAncestorOf(node, other, self)) + return true; + var root = tree_rootNode(node); + if (util_1.Guard.isDocumentFragmentNode(root) && root._host !== null && + tree_isHostIncludingAncestorOf(root._host, other, self)) + return true; + return false; +} +exports.tree_isHostIncludingAncestorOf = tree_isHostIncludingAncestorOf; +/** + * Determines whether `other` is a sibling of `node`. An object A is + * called a sibling of an object B, if and only if B and A share + * the same non-null parent. + * + * @param node - a node + * @param other - the node to check + * @param self - if `true`, traversal includes `node` itself + */ +function tree_isSiblingOf(node, other, self) { + if (self === void 0) { self = false; } + /** + * An object A is called a sibling of an object B, if and only if B and A + * share the same non-null parent. + * + * An inclusive sibling is an object or one of its siblings. + */ + if (node === other) { + if (self) + return true; + } + else { + return (node._parent !== null && node._parent === other._parent); + } + return false; +} +exports.tree_isSiblingOf = tree_isSiblingOf; +/** + * Determines whether `other` is preceding `node`. An object A is + * preceding an object B if A and B are in the same tree and A comes + * before B in tree order. + * + * @param node - a node + * @param other - the node to check + */ +function tree_isPreceding(node, other) { + /** + * An object A is preceding an object B if A and B are in the same tree and + * A comes before B in tree order. + */ + var nodePos = tree_treePosition(node); + var otherPos = tree_treePosition(other); + if (nodePos === -1 || otherPos === -1) + return false; + else if (tree_rootNode(node) !== tree_rootNode(other)) + return false; + else + return otherPos < nodePos; +} +exports.tree_isPreceding = tree_isPreceding; +/** + * Determines whether `other` is following `node`. An object A is + * following an object B if A and B are in the same tree and A comes + * after B in tree order. + * + * @param node - a node + * @param other - the node to check + */ +function tree_isFollowing(node, other) { + /** + * An object A is following an object B if A and B are in the same tree and + * A comes after B in tree order. + */ + var nodePos = tree_treePosition(node); + var otherPos = tree_treePosition(other); + if (nodePos === -1 || otherPos === -1) + return false; + else if (tree_rootNode(node) !== tree_rootNode(other)) + return false; + else + return otherPos > nodePos; +} +exports.tree_isFollowing = tree_isFollowing; +/** + * Determines whether `other` is the parent node of `node`. + * + * @param node - a node + * @param other - the node to check + */ +function tree_isParentOf(node, other) { + /** + * An object that participates in a tree has a parent, which is either + * null or an object, and has children, which is an ordered set of objects. + * An object A whose parent is object B is a child of B. + */ + return (node._parent === other); +} +exports.tree_isParentOf = tree_isParentOf; +/** + * Determines whether `other` is a child node of `node`. + * + * @param node - a node + * @param other - the node to check + */ +function tree_isChildOf(node, other) { + /** + * An object that participates in a tree has a parent, which is either + * null or an object, and has children, which is an ordered set of objects. + * An object A whose parent is object B is a child of B. + */ + return (other._parent === node); +} +exports.tree_isChildOf = tree_isChildOf; +/** + * Returns the previous sibling node of `node` or null if it has no + * preceding sibling. + * + * @param node + */ +function tree_previousSibling(node) { + /** + * The previous sibling of an object is its first preceding sibling or null + * if it has no preceding sibling. + */ + return node._previousSibling; +} +exports.tree_previousSibling = tree_previousSibling; +/** + * Returns the next sibling node of `node` or null if it has no + * following sibling. + * + * @param node + */ +function tree_nextSibling(node) { + /** + * The next sibling of an object is its first following sibling or null + * if it has no following sibling. + */ + return node._nextSibling; +} +exports.tree_nextSibling = tree_nextSibling; +/** + * Returns the first child node of `node` or null if it has no + * children. + * + * @param node + */ +function tree_firstChild(node) { + /** + * The first child of an object is its first child or null if it has no + * children. + */ + return node._firstChild; +} +exports.tree_firstChild = tree_firstChild; +/** + * Returns the last child node of `node` or null if it has no + * children. + * + * @param node + */ +function tree_lastChild(node) { + /** + * The last child of an object is its last child or null if it has no + * children. + */ + return node._lastChild; +} +exports.tree_lastChild = tree_lastChild; +/** + * Returns the zero-based index of `node` when counted preorder in + * the tree rooted at `root`. Returns `-1` if `node` is not in + * the tree. + * + * @param node - the node to get the index of + */ +function tree_treePosition(node) { + var root = tree_rootNode(node); + var pos = 0; + var childNode = tree_getFirstDescendantNode(root); + while (childNode !== null) { + pos++; + if (childNode === node) + return pos; + childNode = tree_getNextDescendantNode(root, childNode); + } + return -1; +} +exports.tree_treePosition = tree_treePosition; +/** + * Determines the index of `node`. The index of an object is its number of + * preceding siblings, or 0 if it has none. + * + * @param node - a node + * @param other - the node to check + */ +function tree_index(node) { + /** + * The index of an object is its number of preceding siblings, or 0 if it + * has none. + */ + var n = 0; + while (node._previousSibling !== null) { + n++; + node = node._previousSibling; + } + return n; +} +exports.tree_index = tree_index; +/** + * Retargets an object against another object. + * + * @param a - an object to retarget + * @param b - an object to retarget against + */ +function tree_retarget(a, b) { + /** + * To retarget an object A against an object B, repeat these steps until + * they return an object: + * 1. If one of the following is true + * - A is not a node + * - A's root is not a shadow root + * - B is a node and A's root is a shadow-including inclusive ancestor + * of B + * then return A. + * 2. Set A to A's root's host. + */ + while (true) { + if (!a || !util_1.Guard.isNode(a)) { + return a; + } + var rootOfA = tree_rootNode(a); + if (!util_1.Guard.isShadowRoot(rootOfA)) { + return a; + } + if (b && util_1.Guard.isNode(b) && tree_isAncestorOf(rootOfA, b, true, true)) { + return a; + } + a = rootOfA.host; + } +} +exports.tree_retarget = tree_retarget; +//# sourceMappingURL=TreeAlgorithm.js.map -// pkg/dist-src/endpoints-to-methods.js -var endpointMethodsMap = /* @__PURE__ */ new Map(); -for (const [scope, endpoints] of Object.entries(endpoints_default)) { - for (const [methodName, endpoint] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); - const endpointDefaults = Object.assign( - { - method, - url - }, - defaults - ); - if (!endpointMethodsMap.has(scope)) { - endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); +/***/ }), + +/***/ 94962: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var TraversalAlgorithm_1 = __nccwpck_require__(80998); +/** + * Returns the first or last child node, or `null` if there are none. + * + * @param walker - the `TreeWalker` instance + * @param first - `true` to return the first child node, or `false` to + * return the last child node. + */ +function treeWalker_traverseChildren(walker, first) { + /** + * 1. Let node be walker’s current. + * 2. Set node to node’s first child if type is first, and node’s last child + * if type is last. + * 3. While node is non-null: + */ + var node = (first ? walker._current._firstChild : walker._current._lastChild); + while (node !== null) { + /** + * 3.1. Let result be the result of filtering node within walker. + */ + var result = TraversalAlgorithm_1.traversal_filter(walker, node); + if (result === interfaces_1.FilterResult.Accept) { + /** + * 3.2. If result is FILTER_ACCEPT, then set walker’s current to node and + * return node. + */ + walker._current = node; + return node; + } + else if (result === interfaces_1.FilterResult.Skip) { + /** + * 3.3. If result is FILTER_SKIP, then: + * 3.3.1. Let child be node’s first child if type is first, and node’s + * last child if type is last. + * 3.3.2. If child is non-null, then set node to child and continue. + */ + var child = (first ? node._firstChild : node._lastChild); + if (child !== null) { + node = child; + continue; + } + } + /** + * 3.4. While node is non-null: + */ + while (node !== null) { + /** + * 3.4.1. Let sibling be node’s next sibling if type is first, and + * node’s previous sibling if type is last. + * 3.4.2. If sibling is non-null, then set node to sibling and break. + */ + var sibling = (first ? node._nextSibling : node._previousSibling); + if (sibling !== null) { + node = sibling; + break; + } + /** + * 3.4.3. Let parent be node’s parent. + * 3.4.4. If parent is null, walker’s root, or walker’s current, then + * return null. + */ + var parent = node._parent; + if (parent === null || parent === walker._root || parent === walker._current) { + return null; + } + /** + * 3.4.5. Set node to parent. + */ + node = parent; + } } - endpointMethodsMap.get(scope).set(methodName, { - scope, - methodName, - endpointDefaults, - decorations - }); - } + /** + * 5. Return null + */ + return null; } -var handler = { - has({ scope }, methodName) { - return endpointMethodsMap.get(scope).has(methodName); - }, - getOwnPropertyDescriptor(target, methodName) { - return { - value: this.get(target, methodName), - // ensures method is in the cache - configurable: true, - writable: true, - enumerable: true - }; - }, - defineProperty(target, methodName, descriptor) { - Object.defineProperty(target.cache, methodName, descriptor); - return true; - }, - deleteProperty(target, methodName) { - delete target.cache[methodName]; +exports.treeWalker_traverseChildren = treeWalker_traverseChildren; +/** + * Returns the next or previous sibling node, or `null` if there are none. + * + * @param walker - the `TreeWalker` instance + * @param next - `true` to return the next sibling node, or `false` to + * return the previous sibling node. + */ +function treeWalker_traverseSiblings(walker, next) { + /** + * 1. Let node be walker’s current. + * 2. If node is root, then return null. + * 3. While node is non-null: + */ + var node = walker._current; + if (node === walker._root) + return null; + while (true) { + /** + * 3.1. Let sibling be node’s next sibling if type is next, and node’s + * previous sibling if type is previous. + * 3.2. While sibling is non-null: + */ + var sibling = (next ? node._nextSibling : node._previousSibling); + while (sibling !== null) { + /** + * 3.2.1. Set node to sibling. + * 3.2.2. Let result be the result of filtering node within walker. + * 3.2.3. If result is FILTER_ACCEPT, then set walker’s current to node + * and return node. + */ + node = sibling; + var result = TraversalAlgorithm_1.traversal_filter(walker, node); + if (result === interfaces_1.FilterResult.Accept) { + walker._current = node; + return node; + } + /** + * 3.2.4. Set sibling to node’s first child if type is next, and node’s + * last child if type is previous. + * 3.2.5. If result is FILTER_REJECT or sibling is null, then set + * sibling to node’s next sibling if type is next, and node’s previous + * sibling if type is previous. + */ + sibling = (next ? node._firstChild : node._lastChild); + if (result === interfaces_1.FilterResult.Reject || sibling === null) { + sibling = (next ? node._nextSibling : node._previousSibling); + } + } + /** + * 3.3. Set node to node’s parent. + * 3.4. If node is null or walker’s root, then return null. + */ + node = node._parent; + if (node === null || node === walker._root) { + return null; + } + /** + * 3.5. If the return value of filtering node within walker is FILTER_ACCEPT, + * then return null. + */ + if (TraversalAlgorithm_1.traversal_filter(walker, node) === interfaces_1.FilterResult.Accept) { + return null; + } + } +} +exports.treeWalker_traverseSiblings = treeWalker_traverseSiblings; +//# sourceMappingURL=TreeWalkerAlgorithm.js.map + +/***/ }), + +/***/ 45457: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Defines a WebIDL `Const` property on the given object. + * + * @param o - object on which to add the property + * @param name - property name + * @param value - property value + */ +function idl_defineConst(o, name, value) { + Object.defineProperty(o, name, { writable: false, enumerable: true, configurable: false, value: value }); +} +exports.idl_defineConst = idl_defineConst; +//# sourceMappingURL=WebIDLAlgorithm.js.map + +/***/ }), + +/***/ 57030: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Determines if the given string is valid for a `"Name"` construct. + * + * @param name - name string to test + */ +function xml_isName(name) { + for (var i = 0; i < name.length; i++) { + var n = name.charCodeAt(i); + // NameStartChar + if ((n >= 97 && n <= 122) || // [a-z] + (n >= 65 && n <= 90) || // [A-Z] + n === 58 || n === 95 || // ':' or '_' + (n >= 0xC0 && n <= 0xD6) || + (n >= 0xD8 && n <= 0xF6) || + (n >= 0xF8 && n <= 0x2FF) || + (n >= 0x370 && n <= 0x37D) || + (n >= 0x37F && n <= 0x1FFF) || + (n >= 0x200C && n <= 0x200D) || + (n >= 0x2070 && n <= 0x218F) || + (n >= 0x2C00 && n <= 0x2FEF) || + (n >= 0x3001 && n <= 0xD7FF) || + (n >= 0xF900 && n <= 0xFDCF) || + (n >= 0xFDF0 && n <= 0xFFFD)) { + continue; + } + else if (i !== 0 && + (n === 45 || n === 46 || // '-' or '.' + (n >= 48 && n <= 57) || // [0-9] + (n === 0xB7) || + (n >= 0x0300 && n <= 0x036F) || + (n >= 0x203F && n <= 0x2040))) { + continue; + } + if (n >= 0xD800 && n <= 0xDBFF && i < name.length - 1) { + var n2 = name.charCodeAt(i + 1); + if (n2 >= 0xDC00 && n2 <= 0xDFFF) { + n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; + i++; + if (n >= 0x10000 && n <= 0xEFFFF) { + continue; + } + } + } + return false; + } return true; - }, - ownKeys({ scope }) { - return [...endpointMethodsMap.get(scope).keys()]; - }, - set(target, methodName, value) { - return target.cache[methodName] = value; - }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; +} +exports.xml_isName = xml_isName; +/** + * Determines if the given string is valid for a `"QName"` construct. + * + * @param name - name string to test + */ +function xml_isQName(name) { + var colonFound = false; + for (var i = 0; i < name.length; i++) { + var n = name.charCodeAt(i); + // NameStartChar + if ((n >= 97 && n <= 122) || // [a-z] + (n >= 65 && n <= 90) || // [A-Z] + n === 95 || // '_' + (n >= 0xC0 && n <= 0xD6) || + (n >= 0xD8 && n <= 0xF6) || + (n >= 0xF8 && n <= 0x2FF) || + (n >= 0x370 && n <= 0x37D) || + (n >= 0x37F && n <= 0x1FFF) || + (n >= 0x200C && n <= 0x200D) || + (n >= 0x2070 && n <= 0x218F) || + (n >= 0x2C00 && n <= 0x2FEF) || + (n >= 0x3001 && n <= 0xD7FF) || + (n >= 0xF900 && n <= 0xFDCF) || + (n >= 0xFDF0 && n <= 0xFFFD)) { + continue; + } + else if (i !== 0 && + (n === 45 || n === 46 || // '-' or '.' + (n >= 48 && n <= 57) || // [0-9] + (n === 0xB7) || + (n >= 0x0300 && n <= 0x036F) || + (n >= 0x203F && n <= 0x2040))) { + continue; + } + else if (i !== 0 && n === 58) { // : + if (colonFound) + return false; // multiple colons in qname + if (i === name.length - 1) + return false; // colon at the end of qname + colonFound = true; + continue; + } + if (n >= 0xD800 && n <= 0xDBFF && i < name.length - 1) { + var n2 = name.charCodeAt(i + 1); + if (n2 >= 0xDC00 && n2 <= 0xDFFF) { + n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; + i++; + if (n >= 0x10000 && n <= 0xEFFFF) { + continue; + } + } + } + return false; } - const method = endpointMethodsMap.get(scope).get(methodName); - if (!method) { - return void 0; + return true; +} +exports.xml_isQName = xml_isQName; +/** + * Determines if the given string contains legal characters. + * + * @param chars - sequence of characters to test + */ +function xml_isLegalChar(chars) { + for (var i = 0; i < chars.length; i++) { + var n = chars.charCodeAt(i); + // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + if (n === 0x9 || n === 0xA || n === 0xD || + (n >= 0x20 && n <= 0xD7FF) || + (n >= 0xE000 && n <= 0xFFFD)) { + continue; + } + if (n >= 0xD800 && n <= 0xDBFF && i < chars.length - 1) { + var n2 = chars.charCodeAt(i + 1); + if (n2 >= 0xDC00 && n2 <= 0xDFFF) { + n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; + i++; + if (n >= 0x10000 && n <= 0x10FFFF) { + continue; + } + } + } + return false; } - const { endpointDefaults, decorations } = method; - if (decorations) { - cache[methodName] = decorate( - octokit, - scope, - methodName, - endpointDefaults, - decorations - ); - } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); + return true; +} +exports.xml_isLegalChar = xml_isLegalChar; +/** + * Determines if the given string contains legal characters for a public + * identifier. + * + * @param chars - sequence of characters to test + */ +function xml_isPubidChar(chars) { + for (var i = 0; i < chars.length; i++) { + // PubId chars are all in the ASCII range, no need to check surrogates + var n = chars.charCodeAt(i); + // #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] + if ((n >= 97 && n <= 122) || // [a-z] + (n >= 65 && n <= 90) || // [A-Z] + (n >= 39 && n <= 59) || // ['()*+,-./] | [0-9] | [:;] + n === 0x20 || n === 0xD || n === 0xA || // #x20 | #xD | #xA + (n >= 35 && n <= 37) || // [#$%] + n === 33 || // ! + n === 61 || n === 63 || n === 64 || n === 95) { // [=?@_] + continue; + } + else { + return false; + } } - return cache[methodName]; - } -}; -function endpointsToMethods(octokit) { - const newMethods = {}; - for (const scope of endpointMethodsMap.keys()) { - newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); - } - return newMethods; + return true; } -function decorate(octokit, scope, methodName, defaults, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults); - function withDecorations(...args) { - let options = requestWithDefaults.endpoint.merge(...args); - if (decorations.mapToData) { - options = Object.assign({}, options, { - data: options[decorations.mapToData], - [decorations.mapToData]: void 0 - }); - return requestWithDefaults(options); +exports.xml_isPubidChar = xml_isPubidChar; +//# sourceMappingURL=XMLAlgorithm.js.map + +/***/ }), + +/***/ 61: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", ({ value: true })); +__export(__nccwpck_require__(32206)); +__export(__nccwpck_require__(84309)); +__export(__nccwpck_require__(81054)); +__export(__nccwpck_require__(19461)); +__export(__nccwpck_require__(57339)); +__export(__nccwpck_require__(35648)); +__export(__nccwpck_require__(12793)); +__export(__nccwpck_require__(9628)); +__export(__nccwpck_require__(93261)); +__export(__nccwpck_require__(51849)); +__export(__nccwpck_require__(28217)); +__export(__nccwpck_require__(21312)); +__export(__nccwpck_require__(45463)); +__export(__nccwpck_require__(78157)); +__export(__nccwpck_require__(35856)); +__export(__nccwpck_require__(74924)); +__export(__nccwpck_require__(3973)); +__export(__nccwpck_require__(53670)); +__export(__nccwpck_require__(2328)); +__export(__nccwpck_require__(30457)); +__export(__nccwpck_require__(41853)); +__export(__nccwpck_require__(68733)); +__export(__nccwpck_require__(13512)); +__export(__nccwpck_require__(80998)); +__export(__nccwpck_require__(16620)); +__export(__nccwpck_require__(94962)); +__export(__nccwpck_require__(45457)); +__export(__nccwpck_require__(57030)); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 66461: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var algorithm_1 = __nccwpck_require__(61); +/** + * Represents a controller that allows to abort DOM requests. + */ +var AbortControllerImpl = /** @class */ (function () { + /** + * Initializes a new instance of `AbortController`. + */ + function AbortControllerImpl() { + /** + * 1. Let signal be a new AbortSignal object. + * 2. Let controller be a new AbortController object whose signal is signal. + * 3. Return controller. + */ + this._signal = algorithm_1.create_abortSignal(); } - if (decorations.renamed) { - const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn( - `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` - ); + Object.defineProperty(AbortControllerImpl.prototype, "signal", { + /** @inheritdoc */ + get: function () { return this._signal; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + AbortControllerImpl.prototype.abort = function () { + algorithm_1.abort_signalAbort(this._signal); + }; + return AbortControllerImpl; +}()); +exports.AbortControllerImpl = AbortControllerImpl; +//# sourceMappingURL=AbortControllerImpl.js.map + +/***/ }), + +/***/ 10022: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var EventTargetImpl_1 = __nccwpck_require__(69968); +var algorithm_1 = __nccwpck_require__(61); +/** + * Represents a signal object that communicates with a DOM request and abort + * it through an AbortController. + */ +var AbortSignalImpl = /** @class */ (function (_super) { + __extends(AbortSignalImpl, _super); + /** + * Initializes a new instance of `AbortSignal`. + */ + function AbortSignalImpl() { + var _this = _super.call(this) || this; + _this._abortedFlag = false; + _this._abortAlgorithms = new Set(); + return _this; } - if (decorations.deprecated) { - octokit.log.warn(decorations.deprecated); + Object.defineProperty(AbortSignalImpl.prototype, "aborted", { + /** @inheritdoc */ + get: function () { return this._abortedFlag; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbortSignalImpl.prototype, "onabort", { + /** @inheritdoc */ + get: function () { + return algorithm_1.event_getterEventHandlerIDLAttribute(this, "onabort"); + }, + set: function (val) { + algorithm_1.event_setterEventHandlerIDLAttribute(this, "onabort", val); + }, + enumerable: true, + configurable: true + }); + /** + * Creates a new `AbortSignal`. + */ + AbortSignalImpl._create = function () { + return new AbortSignalImpl(); + }; + return AbortSignalImpl; +}(EventTargetImpl_1.EventTargetImpl)); +exports.AbortSignalImpl = AbortSignalImpl; +//# sourceMappingURL=AbortSignalImpl.js.map + +/***/ }), + +/***/ 57126: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Represents an abstract range with a start and end boundary point. + */ +var AbstractRangeImpl = /** @class */ (function () { + function AbstractRangeImpl() { } - if (decorations.renamedParameters) { - const options2 = requestWithDefaults.endpoint.merge(...args); - for (const [name, alias] of Object.entries( - decorations.renamedParameters - )) { - if (name in options2) { - octokit.log.warn( - `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` - ); - if (!(alias in options2)) { - options2[alias] = options2[name]; - } - delete options2[name]; - } - } - return requestWithDefaults(options2); + Object.defineProperty(AbstractRangeImpl.prototype, "_startNode", { + get: function () { return this._start[0]; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "_startOffset", { + get: function () { return this._start[1]; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "_endNode", { + get: function () { return this._end[0]; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "_endOffset", { + get: function () { return this._end[1]; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "_collapsed", { + get: function () { + return (this._start[0] === this._end[0] && + this._start[1] === this._end[1]); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "startContainer", { + /** @inheritdoc */ + get: function () { return this._startNode; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "startOffset", { + /** @inheritdoc */ + get: function () { return this._startOffset; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "endContainer", { + /** @inheritdoc */ + get: function () { return this._endNode; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "endOffset", { + /** @inheritdoc */ + get: function () { return this._endOffset; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AbstractRangeImpl.prototype, "collapsed", { + /** @inheritdoc */ + get: function () { return this._collapsed; }, + enumerable: true, + configurable: true + }); + return AbstractRangeImpl; +}()); +exports.AbstractRangeImpl = AbstractRangeImpl; +//# sourceMappingURL=AbstractRangeImpl.js.map + +/***/ }), + +/***/ 13717: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var NodeImpl_1 = __nccwpck_require__(91745); +var algorithm_1 = __nccwpck_require__(61); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +/** + * Represents an attribute of an element node. + */ +var AttrImpl = /** @class */ (function (_super) { + __extends(AttrImpl, _super); + /** + * Initializes a new instance of `Attr`. + * + * @param localName - local name + */ + function AttrImpl(localName) { + var _this = _super.call(this) || this; + _this._namespace = null; + _this._namespacePrefix = null; + _this._element = null; + _this._value = ''; + _this._localName = localName; + return _this; } - return requestWithDefaults(...args); - } - return Object.assign(withDecorations, requestWithDefaults); -} + Object.defineProperty(AttrImpl.prototype, "ownerElement", { + /** @inheritdoc */ + get: function () { return this._element; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AttrImpl.prototype, "namespaceURI", { + /** @inheritdoc */ + get: function () { return this._namespace; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AttrImpl.prototype, "prefix", { + /** @inheritdoc */ + get: function () { return this._namespacePrefix; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AttrImpl.prototype, "localName", { + /** @inheritdoc */ + get: function () { return this._localName; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AttrImpl.prototype, "name", { + /** @inheritdoc */ + get: function () { return this._qualifiedName; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AttrImpl.prototype, "value", { + /** @inheritdoc */ + get: function () { return this._value; }, + set: function (value) { + /** + * The value attribute’s setter must set an existing attribute value with + * context object and the given value. + */ + algorithm_1.attr_setAnExistingAttributeValue(this, value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AttrImpl.prototype, "_qualifiedName", { + /** + * Returns the qualified name. + */ + get: function () { + /** + * An attribute’s qualified name is its local name if its namespace prefix + * is null, and its namespace prefix, followed by ":", followed by its + * local name, otherwise. + */ + return (this._namespacePrefix !== null ? + this._namespacePrefix + ':' + this._localName : + this._localName); + }, + enumerable: true, + configurable: true + }); + /** + * Creates an `Attr`. + * + * @param document - owner document + * @param localName - local name + */ + AttrImpl._create = function (document, localName) { + var node = new AttrImpl(localName); + node._nodeDocument = document; + return node; + }; + return AttrImpl; +}(NodeImpl_1.NodeImpl)); +exports.AttrImpl = AttrImpl; +/** + * Initialize prototype properties + */ +WebIDLAlgorithm_1.idl_defineConst(AttrImpl.prototype, "_nodeType", interfaces_1.NodeType.Attribute); +WebIDLAlgorithm_1.idl_defineConst(AttrImpl.prototype, "specified", true); +//# sourceMappingURL=AttrImpl.js.map -// pkg/dist-src/index.js -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - rest: api - }; -} -restEndpointMethods.VERSION = VERSION; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - ...api, - rest: api - }; -} -legacyRestEndpointMethods.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +/***/ }), + +/***/ 23977: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TextImpl_1 = __nccwpck_require__(42191); +var interfaces_1 = __nccwpck_require__(27305); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +/** + * Represents a CDATA node. + */ +var CDATASectionImpl = /** @class */ (function (_super) { + __extends(CDATASectionImpl, _super); + /** + * Initializes a new instance of `CDATASection`. + * + * @param data - node contents + */ + function CDATASectionImpl(data) { + return _super.call(this, data) || this; + } + /** + * Creates a new `CDATASection`. + * + * @param document - owner document + * @param data - node contents + */ + CDATASectionImpl._create = function (document, data) { + if (data === void 0) { data = ''; } + var node = new CDATASectionImpl(data); + node._nodeDocument = document; + return node; + }; + return CDATASectionImpl; +}(TextImpl_1.TextImpl)); +exports.CDATASectionImpl = CDATASectionImpl; +/** + * Initialize prototype properties + */ +WebIDLAlgorithm_1.idl_defineConst(CDATASectionImpl.prototype, "_nodeType", interfaces_1.NodeType.CData); +//# sourceMappingURL=CDATASectionImpl.js.map /***/ }), -/***/ 10537: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 65330: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - RequestError: () => RequestError -}); -module.exports = __toCommonJS(dist_src_exports); -var import_deprecation = __nccwpck_require__(58932); -var import_once = __toESM(__nccwpck_require__(1223)); -var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var RequestError = class extends Error { - constructor(message, statusCode, options) { - super(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "HttpError"; - this.status = statusCode; - let headers; - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - /(? { + +"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(65282); +var algorithm_1 = __nccwpck_require__(61); +/** + * Represents a mixin that extends child nodes that can have siblings + * including doctypes. This mixin is implemented by {@link Element}, + * {@link CharacterData} and {@link DocumentType}. + */ +var ChildNodeImpl = /** @class */ (function () { + function ChildNodeImpl() { + } + /** @inheritdoc */ + ChildNodeImpl.prototype.before = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + /** + * 1. Let parent be context object’s parent. + * 2. If parent is null, then return. + */ + var context = util_1.Cast.asNode(this); + var parent = context._parent; + if (parent === null) + return; + /** + * 3. Let viablePreviousSibling be context object’s first preceding + * sibling not in nodes, and null otherwise. + */ + var viablePreviousSibling = context._previousSibling; + var flag = true; + while (flag && viablePreviousSibling) { + flag = false; + for (var i = 0; i < nodes.length; i++) { + var child = nodes[i]; + if (child === viablePreviousSibling) { + viablePreviousSibling = viablePreviousSibling._previousSibling; + flag = true; + break; + } + } + } + /** + * 4. Let node be the result of converting nodes into a node, given nodes + * and context object’s node document. + */ + var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument); + /** + * 5. If viablePreviousSibling is null, set it to parent’s first child, + * and to viablePreviousSibling’s next sibling otherwise. + */ + if (viablePreviousSibling === null) + viablePreviousSibling = parent._firstChild; + else + viablePreviousSibling = viablePreviousSibling._nextSibling; + /** + * 6. Pre-insert node into parent before viablePreviousSibling. + */ + algorithm_1.mutation_preInsert(node, parent, viablePreviousSibling); + }; + /** @inheritdoc */ + ChildNodeImpl.prototype.after = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + /** + * 1. Let parent be context object’s parent. + * 2. If parent is null, then return. + */ + var context = util_1.Cast.asNode(this); + var parent = context._parent; + if (!parent) + return; + /** + * 3. Let viableNextSibling be context object’s first following sibling not + * in nodes, and null otherwise. + */ + var viableNextSibling = context._nextSibling; + var flag = true; + while (flag && viableNextSibling) { + flag = false; + for (var i = 0; i < nodes.length; i++) { + var child = nodes[i]; + if (child === viableNextSibling) { + viableNextSibling = viableNextSibling._nextSibling; + flag = true; + break; + } + } + } + /** + * 4. Let node be the result of converting nodes into a node, given nodes + * and context object’s node document. + */ + var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument); + /** + * 5. Pre-insert node into parent before viableNextSibling. + */ + algorithm_1.mutation_preInsert(node, parent, viableNextSibling); + }; + /** @inheritdoc */ + ChildNodeImpl.prototype.replaceWith = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + /** + * 1. Let parent be context object’s parent. + * 2. If parent is null, then return. + */ + var context = util_1.Cast.asNode(this); + var parent = context._parent; + if (!parent) + return; + /** + * 3. Let viableNextSibling be context object’s first following sibling not + * in nodes, and null otherwise. + */ + var viableNextSibling = context._nextSibling; + var flag = true; + while (flag && viableNextSibling) { + flag = false; + for (var i = 0; i < nodes.length; i++) { + var child = nodes[i]; + if (child === viableNextSibling) { + viableNextSibling = viableNextSibling._nextSibling; + flag = true; + break; + } + } + } + /** + * 4. Let node be the result of converting nodes into a node, given nodes + * and context object’s node document. + */ + var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument); + /** + * 5. If context object’s parent is parent, replace the context object with + * node within parent. + * _Note:_ Context object could have been inserted into node. + * 6. Otherwise, pre-insert node into parent before viableNextSibling. + */ + if (context._parent === parent) + algorithm_1.mutation_replace(context, node, parent); + else + algorithm_1.mutation_preInsert(node, parent, viableNextSibling); + }; + /** @inheritdoc */ + ChildNodeImpl.prototype.remove = function () { + /** + * 1. If context object’s parent is null, then return. + * 2. Remove the context object from context object’s parent. + */ + var context = util_1.Cast.asNode(this); + var parent = context._parent; + if (!parent) + return; + algorithm_1.mutation_remove(context, parent); + }; + return ChildNodeImpl; +}()); +exports.ChildNodeImpl = ChildNodeImpl; +//# sourceMappingURL=ChildNodeImpl.js.map /***/ }), -/***/ 36234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 20930: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var CharacterDataImpl_1 = __nccwpck_require__(65330); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +/** + * Represents a comment node. + */ +var CommentImpl = /** @class */ (function (_super) { + __extends(CommentImpl, _super); + /** + * Initializes a new instance of `Comment`. + * + * @param data - the text content + */ + function CommentImpl(data) { + if (data === void 0) { data = ''; } + return _super.call(this, data) || this; + } + /** + * Creates a new `Comment`. + * + * @param document - owner document + * @param data - node contents + */ + CommentImpl._create = function (document, data) { + if (data === void 0) { data = ''; } + var node = new CommentImpl(data); + node._nodeDocument = document; + return node; + }; + return CommentImpl; +}(CharacterDataImpl_1.CharacterDataImpl)); +exports.CommentImpl = CommentImpl; +/** + * Initialize prototype properties + */ +WebIDLAlgorithm_1.idl_defineConst(CommentImpl.prototype, "_nodeType", interfaces_1.NodeType.Comment); +//# sourceMappingURL=CommentImpl.js.map -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - request: () => request -}); -module.exports = __toCommonJS(dist_src_exports); -var import_endpoint = __nccwpck_require__(59440); -var import_universal_user_agent = __nccwpck_require__(45030); +/***/ }), -// pkg/dist-src/version.js -var VERSION = "8.4.1"; +/***/ 59857: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -// pkg/dist-src/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} +"use strict"; -// pkg/dist-src/fetch-wrapper.js -var import_request_error = __nccwpck_require__(10537); +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var EventImpl_1 = __nccwpck_require__(38245); +var algorithm_1 = __nccwpck_require__(61); +/** + * Represents and event that carries custom data. + */ +var CustomEventImpl = /** @class */ (function (_super) { + __extends(CustomEventImpl, _super); + /** + * Initializes a new instance of `CustomEvent`. + */ + function CustomEventImpl(type, eventInit) { + var _this = _super.call(this, type, eventInit) || this; + _this._detail = null; + _this._detail = (eventInit && eventInit.detail) || null; + return _this; + } + Object.defineProperty(CustomEventImpl.prototype, "detail", { + /** @inheritdoc */ + get: function () { return this._detail; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + CustomEventImpl.prototype.initCustomEvent = function (type, bubbles, cancelable, detail) { + if (bubbles === void 0) { bubbles = false; } + if (cancelable === void 0) { cancelable = false; } + if (detail === void 0) { detail = null; } + /** + * 1. If the context object’s dispatch flag is set, then return. + */ + if (this._dispatchFlag) + return; + /** + * 2. Initialize the context object with type, bubbles, and cancelable. + */ + algorithm_1.event_initialize(this, type, bubbles, cancelable); + /** + * 3. Set the context object’s detail attribute to detail. + */ + this._detail = detail; + }; + return CustomEventImpl; +}(EventImpl_1.EventImpl)); +exports.CustomEventImpl = CustomEventImpl; +//# sourceMappingURL=CustomEventImpl.js.map -// pkg/dist-src/get-buffer-response.js -function getBufferResponse(response) { - return response.arrayBuffer(); -} +/***/ }), -// pkg/dist-src/fetch-wrapper.js -function fetchWrapper(requestOptions) { - var _a, _b, _c, _d; - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - let { fetch } = globalThis; - if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { - fetch = requestOptions.request.fetch; - } - if (!fetch) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - return fetch(requestOptions.url, { - method: requestOptions.method, - body: requestOptions.body, - redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, - headers: requestOptions.headers, - signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; +/***/ 13166: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Represents the base class of `Error` objects used by this module. + */ +var DOMException = /** @class */ (function (_super) { + __extends(DOMException, _super); + /** + * + * @param name - message name + * @param message - error message + */ + function DOMException(name, message) { + if (message === void 0) { message = ""; } + var _this = _super.call(this, message) || this; + _this.name = name; + return _this; } - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); + return DOMException; +}(Error)); +exports.DOMException = DOMException; +var DOMStringSizeError = /** @class */ (function (_super) { + __extends(DOMStringSizeError, _super); + /** + * @param message - error message + */ + function DOMStringSizeError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "DOMStringSizeError", message) || this; } - if (status === 204 || status === 205) { - return; + return DOMStringSizeError; +}(DOMException)); +exports.DOMStringSizeError = DOMStringSizeError; +var WrongDocumentError = /** @class */ (function (_super) { + __extends(WrongDocumentError, _super); + /** + * @param message - error message + */ + function WrongDocumentError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "WrongDocumentError", "The object is in the wrong document. " + message) || this; } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - throw new import_request_error.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions - }); + return WrongDocumentError; +}(DOMException)); +exports.WrongDocumentError = WrongDocumentError; +var NoDataAllowedError = /** @class */ (function (_super) { + __extends(NoDataAllowedError, _super); + /** + * @param message - error message + */ + function NoDataAllowedError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "NoDataAllowedError", message) || this; } - if (status === 304) { - throw new import_request_error.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); + return NoDataAllowedError; +}(DOMException)); +exports.NoDataAllowedError = NoDataAllowedError; +var NoModificationAllowedError = /** @class */ (function (_super) { + __extends(NoModificationAllowedError, _super); + /** + * @param message - error message + */ + function NoModificationAllowedError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "NoModificationAllowedError", "The object can not be modified. " + message) || this; + } + return NoModificationAllowedError; +}(DOMException)); +exports.NoModificationAllowedError = NoModificationAllowedError; +var NotSupportedError = /** @class */ (function (_super) { + __extends(NotSupportedError, _super); + /** + * @param message - error message + */ + function NotSupportedError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "NotSupportedError", "The operation is not supported. " + message) || this; + } + return NotSupportedError; +}(DOMException)); +exports.NotSupportedError = NotSupportedError; +var InUseAttributeError = /** @class */ (function (_super) { + __extends(InUseAttributeError, _super); + /** + * @param message - error message + */ + function InUseAttributeError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "InUseAttributeError", message) || this; + } + return InUseAttributeError; +}(DOMException)); +exports.InUseAttributeError = InUseAttributeError; +var InvalidStateError = /** @class */ (function (_super) { + __extends(InvalidStateError, _super); + /** + * @param message - error message + */ + function InvalidStateError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "InvalidStateError", "The object is in an invalid state. " + message) || this; + } + return InvalidStateError; +}(DOMException)); +exports.InvalidStateError = InvalidStateError; +var InvalidModificationError = /** @class */ (function (_super) { + __extends(InvalidModificationError, _super); + /** + * @param message - error message + */ + function InvalidModificationError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "InvalidModificationError", "The object can not be modified in this way. " + message) || this; + } + return InvalidModificationError; +}(DOMException)); +exports.InvalidModificationError = InvalidModificationError; +var NamespaceError = /** @class */ (function (_super) { + __extends(NamespaceError, _super); + /** + * @param message - error message + */ + function NamespaceError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "NamespaceError", "The operation is not allowed by Namespaces in XML. [XMLNS] " + message) || this; + } + return NamespaceError; +}(DOMException)); +exports.NamespaceError = NamespaceError; +var InvalidAccessError = /** @class */ (function (_super) { + __extends(InvalidAccessError, _super); + /** + * @param message - error message + */ + function InvalidAccessError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "InvalidAccessError", "The object does not support the operation or argument. " + message) || this; + } + return InvalidAccessError; +}(DOMException)); +exports.InvalidAccessError = InvalidAccessError; +var ValidationError = /** @class */ (function (_super) { + __extends(ValidationError, _super); + /** + * @param message - error message + */ + function ValidationError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "ValidationError", message) || this; + } + return ValidationError; +}(DOMException)); +exports.ValidationError = ValidationError; +var TypeMismatchError = /** @class */ (function (_super) { + __extends(TypeMismatchError, _super); + /** + * @param message - error message + */ + function TypeMismatchError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "TypeMismatchError", message) || this; + } + return TypeMismatchError; +}(DOMException)); +exports.TypeMismatchError = TypeMismatchError; +var SecurityError = /** @class */ (function (_super) { + __extends(SecurityError, _super); + /** + * @param message - error message + */ + function SecurityError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "SecurityError", "The operation is insecure. " + message) || this; + } + return SecurityError; +}(DOMException)); +exports.SecurityError = SecurityError; +var NetworkError = /** @class */ (function (_super) { + __extends(NetworkError, _super); + /** + * @param message - error message + */ + function NetworkError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "NetworkError", "A network error occurred. " + message) || this; + } + return NetworkError; +}(DOMException)); +exports.NetworkError = NetworkError; +var AbortError = /** @class */ (function (_super) { + __extends(AbortError, _super); + /** + * @param message - error message + */ + function AbortError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "AbortError", "The operation was aborted. " + message) || this; + } + return AbortError; +}(DOMException)); +exports.AbortError = AbortError; +var URLMismatchError = /** @class */ (function (_super) { + __extends(URLMismatchError, _super); + /** + * @param message - error message + */ + function URLMismatchError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "URLMismatchError", "The given URL does not match another URL. " + message) || this; + } + return URLMismatchError; +}(DOMException)); +exports.URLMismatchError = URLMismatchError; +var QuotaExceededError = /** @class */ (function (_super) { + __extends(QuotaExceededError, _super); + /** + * @param message - error message + */ + function QuotaExceededError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "QuotaExceededError", "The quota has been exceeded. " + message) || this; } - if (status >= 400) { - const data = await getResponseData(response); - const error = new import_request_error.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; + return QuotaExceededError; +}(DOMException)); +exports.QuotaExceededError = QuotaExceededError; +var TimeoutError = /** @class */ (function (_super) { + __extends(TimeoutError, _super); + /** + * @param message - error message + */ + function TimeoutError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "TimeoutError", "The operation timed out. " + message) || this; } - return parseSuccessResponseBody ? await getResponseData(response) : response.body; - }).then((data) => { - return { - status, - url, - headers, - data - }; - }).catch((error) => { - if (error instanceof import_request_error.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; - } + return TimeoutError; +}(DOMException)); +exports.TimeoutError = TimeoutError; +var InvalidNodeTypeError = /** @class */ (function (_super) { + __extends(InvalidNodeTypeError, _super); + /** + * @param message - error message + */ + function InvalidNodeTypeError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation. " + message) || this; } - throw new import_request_error.RequestError(message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json().catch(() => response.text()).catch(() => ""); - } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - return getBufferResponse(response); -} -function toErrorMessage(data) { - if (typeof data === "string") - return data; - let suffix; - if ("documentation_url" in data) { - suffix = ` - ${data.documentation_url}`; - } else { - suffix = ""; - } - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; + return InvalidNodeTypeError; +}(DOMException)); +exports.InvalidNodeTypeError = InvalidNodeTypeError; +var DataCloneError = /** @class */ (function (_super) { + __extends(DataCloneError, _super); + /** + * @param message - error message + */ + function DataCloneError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "DataCloneError", "The object can not be cloned. " + message) || this; } - return `${data.message}${suffix}`; - } - return `Unknown error: ${JSON.stringify(data)}`; -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); + return DataCloneError; +}(DOMException)); +exports.DataCloneError = DataCloneError; +var NotImplementedError = /** @class */ (function (_super) { + __extends(NotImplementedError, _super); + /** + * @param message - error message + */ + function NotImplementedError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "NotImplementedError", "The DOM method is not implemented by this module. " + message) || this; } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); - }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); -} - -// pkg/dist-src/index.js -var request = withDefaults(import_endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - } -}); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 32206: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var EventAlgorithm_1 = __nccwpck_require__(28217); -/** - * Adds an algorithm to the given abort signal. - * - * @param algorithm - an algorithm - * @param signal - abort signal - */ -function abort_add(algorithm, signal) { + return NotImplementedError; +}(DOMException)); +exports.NotImplementedError = NotImplementedError; +var HierarchyRequestError = /** @class */ (function (_super) { + __extends(HierarchyRequestError, _super); /** - * 1. If signal’s aborted flag is set, then return. - * 2. Append algorithm to signal’s abort algorithms. + * @param message - error message */ - if (signal._abortedFlag) - return; - signal._abortAlgorithms.add(algorithm); -} -exports.abort_add = abort_add; -/** - * Removes an algorithm from the given abort signal. - * - * @param algorithm - an algorithm - * @param signal - abort signal - */ -function abort_remove(algorithm, signal) { + function HierarchyRequestError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "HierarchyRequestError", "The operation would yield an incorrect node tree. " + message) || this; + } + return HierarchyRequestError; +}(DOMException)); +exports.HierarchyRequestError = HierarchyRequestError; +var NotFoundError = /** @class */ (function (_super) { + __extends(NotFoundError, _super); /** - * To remove an algorithm algorithm from an AbortSignal signal, remove - * algorithm from signal’s abort algorithms. + * @param message - error message */ - signal._abortAlgorithms.delete(algorithm); -} -exports.abort_remove = abort_remove; -/** - * Signals abort on the given abort signal. - * - * @param signal - abort signal - */ -function abort_signalAbort(signal) { - var e_1, _a; + function NotFoundError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "NotFoundError", "The object can not be found here. " + message) || this; + } + return NotFoundError; +}(DOMException)); +exports.NotFoundError = NotFoundError; +var IndexSizeError = /** @class */ (function (_super) { + __extends(IndexSizeError, _super); /** - * 1. If signal’s aborted flag is set, then return. - * 2. Set signal’s aborted flag. - * 3. For each algorithm in signal’s abort algorithms: run algorithm. - * 4. Empty signal’s abort algorithms. - * 5. Fire an event named abort at signal. + * @param message - error message */ - if (signal._abortedFlag) - return; - signal._abortedFlag = true; - try { - for (var _b = __values(signal._abortAlgorithms), _c = _b.next(); !_c.done; _c = _b.next()) { - var algorithm = _c.value; - algorithm.call(signal); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } + function IndexSizeError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "IndexSizeError", "The index is not in the allowed range. " + message) || this; } - signal._abortAlgorithms.clear(); - EventAlgorithm_1.event_fireAnEvent("abort", signal); -} -exports.abort_signalAbort = abort_signalAbort; -//# sourceMappingURL=AbortAlgorithm.js.map - -/***/ }), - -/***/ 84309: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var ElementAlgorithm_1 = __nccwpck_require__(51849); -/** - * Changes the value of an existing attribute. - * - * @param attribute - an attribute node - * @param value - attribute value - */ -function attr_setAnExistingAttributeValue(attribute, value) { + return IndexSizeError; +}(DOMException)); +exports.IndexSizeError = IndexSizeError; +var SyntaxError = /** @class */ (function (_super) { + __extends(SyntaxError, _super); /** - * 1. If attribute’s element is null, then set attribute’s value to value. - * 2. Otherwise, change attribute from attribute’s element to value. + * @param message - error message */ - if (attribute._element === null) { - attribute._value = value; + function SyntaxError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "SyntaxError", "The string did not match the expected pattern. " + message) || this; } - else { - ElementAlgorithm_1.element_change(attribute, attribute._element, value); + return SyntaxError; +}(DOMException)); +exports.SyntaxError = SyntaxError; +var InvalidCharacterError = /** @class */ (function (_super) { + __extends(InvalidCharacterError, _super); + /** + * @param message - error message + */ + function InvalidCharacterError(message) { + if (message === void 0) { message = ""; } + return _super.call(this, "InvalidCharacterError", "The string contains invalid characters. " + message) || this; } -} -exports.attr_setAnExistingAttributeValue = attr_setAnExistingAttributeValue; -//# sourceMappingURL=AttrAlgorithm.js.map + return InvalidCharacterError; +}(DOMException)); +exports.InvalidCharacterError = InvalidCharacterError; +//# sourceMappingURL=DOMException.js.map /***/ }), -/***/ 81054: +/***/ 14177: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var TreeAlgorithm_1 = __nccwpck_require__(16620); +var util_1 = __nccwpck_require__(76195); +var CreateAlgorithm_1 = __nccwpck_require__(57339); /** - * Defines the position of a boundary point relative to another. - * - * @param bp - a boundary point - * @param relativeTo - a boundary point to compare to + * Represents an object implementing DOM algorithms. */ -function boundaryPoint_position(bp, relativeTo) { - var nodeA = bp[0]; - var offsetA = bp[1]; - var nodeB = relativeTo[0]; - var offsetB = relativeTo[1]; - /** - * 1. Assert: nodeA and nodeB have the same root. - */ - console.assert(TreeAlgorithm_1.tree_rootNode(nodeA) === TreeAlgorithm_1.tree_rootNode(nodeB), "Boundary points must share the same root node."); +var DOMImpl = /** @class */ (function () { /** - * 2. If nodeA is nodeB, then return equal if offsetA is offsetB, before - * if offsetA is less than offsetB, and after if offsetA is greater than - * offsetB. + * Initializes a new instance of `DOM`. */ - if (nodeA === nodeB) { - if (offsetA === offsetB) { - return interfaces_1.BoundaryPosition.Equal; - } - else if (offsetA < offsetB) { - return interfaces_1.BoundaryPosition.Before; - } - else { - return interfaces_1.BoundaryPosition.After; - } + function DOMImpl() { + this._features = { + mutationObservers: true, + customElements: true, + slots: true, + steps: true + }; + this._window = null; + this._compareCache = new util_1.CompareCache(); + this._rangeList = new util_1.FixedSizeSet(); } /** - * 3. If nodeA is following nodeB, then if the position of (nodeB, offsetB) - * relative to (nodeA, offsetA) is before, return after, and if it is after, - * return before. + * Sets DOM algorithm features. + * + * @param features - DOM features supported by algorithms. All features are + * enabled by default unless explicity disabled. */ - if (TreeAlgorithm_1.tree_isFollowing(nodeB, nodeA)) { - var pos = boundaryPoint_position([nodeB, offsetB], [nodeA, offsetA]); - if (pos === interfaces_1.BoundaryPosition.Before) { - return interfaces_1.BoundaryPosition.After; + DOMImpl.prototype.setFeatures = function (features) { + if (features === undefined) + features = true; + if (util_1.isObject(features)) { + for (var key in features) { + this._features[key] = features[key] || false; + } } - else if (pos === interfaces_1.BoundaryPosition.After) { - return interfaces_1.BoundaryPosition.Before; + else { + // enable/disable all features + for (var key in this._features) { + this._features[key] = features; + } } - } - /** - * 4. If nodeA is an ancestor of nodeB: - */ - if (TreeAlgorithm_1.tree_isAncestorOf(nodeB, nodeA)) { + }; + Object.defineProperty(DOMImpl.prototype, "features", { /** - * 4.1. Let child be nodeB. - * 4.2. While child is not a child of nodeA, set child to its parent. - * 4.3. If child’s index is less than offsetA, then return after. + * Gets DOM algorithm features. */ - var child = nodeB; - while (!TreeAlgorithm_1.tree_isChildOf(nodeA, child)) { - /* istanbul ignore else */ - if (child._parent !== null) { - child = child._parent; + get: function () { return this._features; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DOMImpl.prototype, "window", { + /** + * Gets the DOM window. + */ + get: function () { + if (this._window === null) { + this._window = CreateAlgorithm_1.create_window(); } - } - if (TreeAlgorithm_1.tree_index(child) < offsetA) { - return interfaces_1.BoundaryPosition.After; - } - } - /** - * 5. Return before. - */ - return interfaces_1.BoundaryPosition.Before; -} -exports.boundaryPoint_position = boundaryPoint_position; -//# sourceMappingURL=BoundaryPointAlgorithm.js.map + return this._window; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DOMImpl.prototype, "compareCache", { + /** + * Gets the global node compare cache. + */ + get: function () { return this._compareCache; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DOMImpl.prototype, "rangeList", { + /** + * Gets the global range list. + */ + get: function () { return this._rangeList; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DOMImpl, "instance", { + /** + * Returns the instance of `DOM`. + */ + get: function () { + if (!DOMImpl._instance) { + DOMImpl._instance = new DOMImpl(); + } + return DOMImpl._instance; + }, + enumerable: true, + configurable: true + }); + return DOMImpl; +}()); +/** + * Represents an object implementing DOM algorithms. + */ +exports.dom = DOMImpl.instance; +//# sourceMappingURL=DOMImpl.js.map /***/ }), -/***/ 19461: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 42197: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(65282); -var DOMException_1 = __nccwpck_require__(13166); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); -var DOMAlgorithm_1 = __nccwpck_require__(9628); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Replaces character data. - * - * @param node - a character data node - * @param offset - start offset - * @param count - count of characters to replace - * @param data - new data + * Represents an object providing methods which are not dependent on + * any particular document. */ -function characterData_replaceData(node, offset, count, data) { - var e_1, _a; - /** - * 1. Let length be node’s length. - * 2. If offset is greater than length, then throw an "IndexSizeError" - * DOMException. - * 3. If offset plus count is greater than length, then set count to length - * minus offset. - */ - var length = TreeAlgorithm_1.tree_nodeLength(node); - if (offset > length) { - throw new DOMException_1.IndexSizeError("Offset exceeds character data length. Offset: " + offset + ", Length: " + length + ", Node is " + node.nodeName + "."); - } - if (offset + count > length) { - count = length - offset; - } +var DOMImplementationImpl = /** @class */ (function () { /** - * 4. Queue a mutation record of "characterData" for node with null, null, - * node’s data, « », « », null, and null. + * Initializes a new instance of `DOMImplementation`. + * + * @param document - the associated document */ - if (DOMImpl_1.dom.features.mutationObservers) { - MutationObserverAlgorithm_1.observer_queueMutationRecord("characterData", node, null, null, node._data, [], [], null, null); + function DOMImplementationImpl(document) { + this._associatedDocument = document || DOMImpl_1.dom.window.document; } - /** - * 5. Insert data into node’s data after offset code units. - * 6. Let delete offset be offset + data’s length. - * 7. Starting from delete offset code units, remove count code units from - * node’s data. - */ - var newData = node._data.substring(0, offset) + data + - node._data.substring(offset + count); - node._data = newData; - try { + /** @inheritdoc */ + DOMImplementationImpl.prototype.createDocumentType = function (qualifiedName, publicId, systemId) { /** - * 8. For each live range whose start node is node and start offset is - * greater than offset but less than or equal to offset plus count, set its - * start offset to offset. - * 9. For each live range whose end node is node and end offset is greater - * than offset but less than or equal to offset plus count, set its end - * offset to offset. - * 10. For each live range whose start node is node and start offset is - * greater than offset plus count, increase its start offset by data’s - * length and decrease it by count. - * 11. For each live range whose end node is node and end offset is greater - * than offset plus count, increase its end offset by data’s length and - * decrease it by count. + * 1. Validate qualifiedName. + * 2. Return a new doctype, with qualifiedName as its name, publicId as its + * public ID, and systemId as its system ID, and with its node document set + * to the associated document of the context object. */ - for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) { - var range = _c.value; - if (range._start[0] === node && range._start[1] > offset && range._start[1] <= offset + count) { - range._start[1] = offset; - } - if (range._end[0] === node && range._end[1] > offset && range._end[1] <= offset + count) { - range._end[1] = offset; - } - if (range._start[0] === node && range._start[1] > offset + count) { - range._start[1] += data.length - count; - } - if (range._end[0] === node && range._end[1] > offset + count) { - range._end[1] += data.length - count; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + algorithm_1.namespace_validate(qualifiedName); + return algorithm_1.create_documentType(this._associatedDocument, qualifiedName, publicId, systemId); + }; + /** @inheritdoc */ + DOMImplementationImpl.prototype.createDocument = function (namespace, qualifiedName, doctype) { + if (doctype === void 0) { doctype = null; } + /** + * 1. Let document be a new XMLDocument. + */ + var document = algorithm_1.create_xmlDocument(); + /** + * 2. Let element be null. + * 3. If qualifiedName is not the empty string, then set element to + * the result of running the internal createElementNS steps, given document, + * namespace, qualifiedName, and an empty dictionary. + */ + var element = null; + if (qualifiedName) { + element = algorithm_1.document_internalCreateElementNS(document, namespace, qualifiedName); } - finally { if (e_1) throw e_1.error; } - } - /** - * 12. If node is a Text node and its parent is not null, run the child - * text content change steps for node’s parent. - */ - if (DOMImpl_1.dom.features.steps) { - if (util_1.Guard.isTextNode(node) && node._parent !== null) { - DOMAlgorithm_1.dom_runChildTextContentChangeSteps(node._parent); + /** + * 4. If doctype is non-null, append doctype to document. + * 5. If element is non-null, append element to document. + */ + if (doctype) + document.appendChild(doctype); + if (element) + document.appendChild(element); + /** + * 6. document’s origin is context object’s associated document’s origin. + */ + document._origin = this._associatedDocument._origin; + /** + * 7. document’s content type is determined by namespace: + * - HTML namespace + * application/xhtml+xml + * - SVG namespace + * image/svg+xml + * - Any other namespace + * application/xml + */ + if (namespace === infra_1.namespace.HTML) + document._contentType = "application/xhtml+xml"; + else if (namespace === infra_1.namespace.SVG) + document._contentType = "image/svg+xml"; + else + document._contentType = "application/xml"; + /** + * 8. Return document. + */ + return document; + }; + /** @inheritdoc */ + DOMImplementationImpl.prototype.createHTMLDocument = function (title) { + /** + * 1. Let doc be a new document that is an HTML document. + * 2. Set doc’s content type to "text/html". + */ + var doc = algorithm_1.create_document(); + doc._type = "html"; + doc._contentType = "text/html"; + /** + * 3. Append a new doctype, with "html" as its name and with its node + * document set to doc, to doc. + */ + doc.appendChild(algorithm_1.create_documentType(doc, "html", "", "")); + /** + * 4. Append the result of creating an element given doc, html, and the + * HTML namespace, to doc. + */ + var htmlElement = algorithm_1.element_createAnElement(doc, "html", infra_1.namespace.HTML); + doc.appendChild(htmlElement); + /** + * 5. Append the result of creating an element given doc, head, and the + * HTML namespace, to the html element created earlier. + */ + var headElement = algorithm_1.element_createAnElement(doc, "head", infra_1.namespace.HTML); + htmlElement.appendChild(headElement); + /** + * 6. If title is given: + * 6.1. Append the result of creating an element given doc, title, and + * the HTML namespace, to the head element created earlier. + * 6.2. Append a new Text node, with its data set to title (which could + * be the empty string) and its node document set to doc, to the title + * element created earlier. + */ + if (title !== undefined) { + var titleElement = algorithm_1.element_createAnElement(doc, "title", infra_1.namespace.HTML); + headElement.appendChild(titleElement); + var textElement = algorithm_1.create_text(doc, title); + titleElement.appendChild(textElement); } - } -} -exports.characterData_replaceData = characterData_replaceData; -/** - * Returns `count` number of characters from `node`'s data starting at - * the given `offset`. - * - * @param node - a character data node - * @param offset - start offset - * @param count - count of characters to return - */ -function characterData_substringData(node, offset, count) { + /** + * 7. Append the result of creating an element given doc, body, and the + * HTML namespace, to the html element created earlier. + */ + var bodyElement = algorithm_1.element_createAnElement(doc, "body", infra_1.namespace.HTML); + htmlElement.appendChild(bodyElement); + /** + * 8. doc’s origin is context object’s associated document’s origin. + */ + doc._origin = this._associatedDocument._origin; + /** + * 9. Return doc. + */ + return doc; + }; + /** @inheritdoc */ + DOMImplementationImpl.prototype.hasFeature = function () { return true; }; /** - * 1. Let length be node’s length. - * 2. If offset is greater than length, then throw an "IndexSizeError" - * DOMException. - * 3. If offset plus count is greater than length, return a string whose - * value is the code units from the offsetth code unit to the end of node’s - * data, and then return. - * 4. Return a string whose value is the code units from the offsetth code - * unit to the offset+countth code unit in node’s data. + * Creates a new `DOMImplementation`. + * + * @param document - owner document */ - var length = TreeAlgorithm_1.tree_nodeLength(node); - if (offset > length) { - throw new DOMException_1.IndexSizeError("Offset exceeds character data length. Offset: " + offset + ", Length: " + length + ", Node is " + node.nodeName + "."); - } - if (offset + count > length) { - return node._data.substr(offset); - } - else { - return node._data.substr(offset, count); - } -} -exports.characterData_substringData = characterData_substringData; -//# sourceMappingURL=CharacterDataAlgorithm.js.map - -/***/ }), - -/***/ 57339: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImplementationImpl_1 = __nccwpck_require__(42197); -var WindowImpl_1 = __nccwpck_require__(69067); -var XMLDocumentImpl_1 = __nccwpck_require__(21685); -var DocumentImpl_1 = __nccwpck_require__(14333); -var AbortControllerImpl_1 = __nccwpck_require__(66461); -var AbortSignalImpl_1 = __nccwpck_require__(10022); -var DocumentTypeImpl_1 = __nccwpck_require__(3173); -var ElementImpl_1 = __nccwpck_require__(35975); -var DocumentFragmentImpl_1 = __nccwpck_require__(12585); -var ShadowRootImpl_1 = __nccwpck_require__(61911); -var AttrImpl_1 = __nccwpck_require__(13717); -var TextImpl_1 = __nccwpck_require__(42191); -var CDATASectionImpl_1 = __nccwpck_require__(23977); -var CommentImpl_1 = __nccwpck_require__(20930); -var ProcessingInstructionImpl_1 = __nccwpck_require__(99430); -var HTMLCollectionImpl_1 = __nccwpck_require__(93969); -var NodeListImpl_1 = __nccwpck_require__(43728); -var NodeListStaticImpl_1 = __nccwpck_require__(65306); -var NamedNodeMapImpl_1 = __nccwpck_require__(57206); -var RangeImpl_1 = __nccwpck_require__(50166); -var NodeIteratorImpl_1 = __nccwpck_require__(61997); -var TreeWalkerImpl_1 = __nccwpck_require__(89261); -var NodeFilterImpl_1 = __nccwpck_require__(12355); -var MutationRecordImpl_1 = __nccwpck_require__(6219); -var DOMTokenListImpl_1 = __nccwpck_require__(65096); -/** - * Creates a `DOMImplementation`. - * - * @param document - associated document - */ -function create_domImplementation(document) { - return DOMImplementationImpl_1.DOMImplementationImpl._create(document); -} -exports.create_domImplementation = create_domImplementation; -/** - * Creates a `Window` node. - */ -function create_window() { - return WindowImpl_1.WindowImpl._create(); -} -exports.create_window = create_window; -/** - * Creates an `XMLDocument` node. - */ -function create_xmlDocument() { - return new XMLDocumentImpl_1.XMLDocumentImpl(); -} -exports.create_xmlDocument = create_xmlDocument; -/** - * Creates a `Document` node. - */ -function create_document() { - return new DocumentImpl_1.DocumentImpl(); -} -exports.create_document = create_document; -/** - * Creates an `AbortController`. - */ -function create_abortController() { - return new AbortControllerImpl_1.AbortControllerImpl(); -} -exports.create_abortController = create_abortController; -/** - * Creates an `AbortSignal`. - */ -function create_abortSignal() { - return AbortSignalImpl_1.AbortSignalImpl._create(); -} -exports.create_abortSignal = create_abortSignal; -/** - * Creates a `DocumentType` node. - * - * @param document - owner document - * @param name - name of the node - * @param publicId - `PUBLIC` identifier - * @param systemId - `SYSTEM` identifier - */ -function create_documentType(document, name, publicId, systemId) { - return DocumentTypeImpl_1.DocumentTypeImpl._create(document, name, publicId, systemId); -} -exports.create_documentType = create_documentType; -/** - * Creates a new `Element` node. - * - * @param document - owner document - * @param localName - local name - * @param namespace - namespace - * @param prefix - namespace prefix - */ -function create_element(document, localName, namespace, prefix) { - return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix); -} -exports.create_element = create_element; -/** - * Creates a new `HTMLElement` node. - * - * @param document - owner document - * @param localName - local name - * @param namespace - namespace - * @param prefix - namespace prefix - */ -function create_htmlElement(document, localName, namespace, prefix) { - // TODO: Implement in HTML DOM - return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix); -} -exports.create_htmlElement = create_htmlElement; -/** - * Creates a new `HTMLUnknownElement` node. - * - * @param document - owner document - * @param localName - local name - * @param namespace - namespace - * @param prefix - namespace prefix - */ -function create_htmlUnknownElement(document, localName, namespace, prefix) { - // TODO: Implement in HTML DOM - return ElementImpl_1.ElementImpl._create(document, localName, namespace, prefix); -} -exports.create_htmlUnknownElement = create_htmlUnknownElement; -/** - * Creates a new `DocumentFragment` node. - * - * @param document - owner document - */ -function create_documentFragment(document) { - return DocumentFragmentImpl_1.DocumentFragmentImpl._create(document); -} -exports.create_documentFragment = create_documentFragment; -/** - * Creates a new `ShadowRoot` node. - * - * @param document - owner document - * @param host - shadow root's host element node - */ -function create_shadowRoot(document, host) { - return ShadowRootImpl_1.ShadowRootImpl._create(document, host); -} -exports.create_shadowRoot = create_shadowRoot; -/** - * Creates a new `Attr` node. - * - * @param document - owner document - * @param localName - local name - */ -function create_attr(document, localName) { - return AttrImpl_1.AttrImpl._create(document, localName); -} -exports.create_attr = create_attr; -/** - * Creates a new `Text` node. - * - * @param document - owner document - * @param data - node contents - */ -function create_text(document, data) { - return TextImpl_1.TextImpl._create(document, data); -} -exports.create_text = create_text; -/** - * Creates a new `CDATASection` node. - * - * @param document - owner document - * @param data - node contents - */ -function create_cdataSection(document, data) { - return CDATASectionImpl_1.CDATASectionImpl._create(document, data); -} -exports.create_cdataSection = create_cdataSection; -/** - * Creates a new `Comment` node. - * - * @param document - owner document - * @param data - node contents - */ -function create_comment(document, data) { - return CommentImpl_1.CommentImpl._create(document, data); -} -exports.create_comment = create_comment; -/** - * Creates a new `ProcessingInstruction` node. - * - * @param document - owner document - * @param target - instruction target - * @param data - node contents - */ -function create_processingInstruction(document, target, data) { - return ProcessingInstructionImpl_1.ProcessingInstructionImpl._create(document, target, data); -} -exports.create_processingInstruction = create_processingInstruction; -/** - * Creates a new `HTMLCollection`. - * - * @param root - root node - * @param filter - node filter - */ -function create_htmlCollection(root, filter) { - if (filter === void 0) { filter = (function () { return true; }); } - return HTMLCollectionImpl_1.HTMLCollectionImpl._create(root, filter); -} -exports.create_htmlCollection = create_htmlCollection; -/** - * Creates a new live `NodeList`. - * - * @param root - root node - */ -function create_nodeList(root) { - return NodeListImpl_1.NodeListImpl._create(root); -} -exports.create_nodeList = create_nodeList; -/** - * Creates a new static `NodeList`. - * - * @param root - root node - * @param items - a list of items to initialize the list - */ -function create_nodeListStatic(root, items) { - return NodeListStaticImpl_1.NodeListStaticImpl._create(root, items); -} -exports.create_nodeListStatic = create_nodeListStatic; -/** - * Creates a new `NamedNodeMap`. - * - * @param element - parent element - */ -function create_namedNodeMap(element) { - return NamedNodeMapImpl_1.NamedNodeMapImpl._create(element); -} -exports.create_namedNodeMap = create_namedNodeMap; -/** - * Creates a new `Range`. - * - * @param start - start point - * @param end - end point - */ -function create_range(start, end) { - return RangeImpl_1.RangeImpl._create(start, end); -} -exports.create_range = create_range; -/** - * Creates a new `NodeIterator`. - * - * @param root - iterator's root node - * @param reference - reference node - * @param pointerBeforeReference - whether the iterator is before or after the - * reference node - */ -function create_nodeIterator(root, reference, pointerBeforeReference) { - return NodeIteratorImpl_1.NodeIteratorImpl._create(root, reference, pointerBeforeReference); -} -exports.create_nodeIterator = create_nodeIterator; -/** - * Creates a new `TreeWalker`. - * - * @param root - iterator's root node - * @param current - current node - */ -function create_treeWalker(root, current) { - return TreeWalkerImpl_1.TreeWalkerImpl._create(root, current); -} -exports.create_treeWalker = create_treeWalker; -/** - * Creates a new `NodeFilter`. - */ -function create_nodeFilter() { - return NodeFilterImpl_1.NodeFilterImpl._create(); -} -exports.create_nodeFilter = create_nodeFilter; -/** - * Creates a new `MutationRecord`. - * - * @param type - type of mutation: `"attributes"` for an attribute - * mutation, `"characterData"` for a mutation to a CharacterData node - * and `"childList"` for a mutation to the tree of nodes. - * @param target - node affected by the mutation. - * @param addedNodes - list of added nodes. - * @param removedNodes - list of removed nodes. - * @param previousSibling - previous sibling of added or removed nodes. - * @param nextSibling - next sibling of added or removed nodes. - * @param attributeName - local name of the changed attribute, - * and `null` otherwise. - * @param attributeNamespace - namespace of the changed attribute, - * and `null` otherwise. - * @param oldValue - value before mutation: attribute value for an attribute - * mutation, node `data` for a mutation to a CharacterData node and `null` - * for a mutation to the tree of nodes. - */ -function create_mutationRecord(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) { - return MutationRecordImpl_1.MutationRecordImpl._create(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue); -} -exports.create_mutationRecord = create_mutationRecord; -/** - * Creates a new `DOMTokenList`. - * - * @param element - associated element - * @param attribute - associated attribute - */ -function create_domTokenList(element, attribute) { - return DOMTokenListImpl_1.DOMTokenListImpl._create(element, attribute); -} -exports.create_domTokenList = create_domTokenList; -//# sourceMappingURL=CreateAlgorithm.js.map + DOMImplementationImpl._create = function (document) { + return new DOMImplementationImpl(document); + }; + return DOMImplementationImpl; +}()); +exports.DOMImplementationImpl = DOMImplementationImpl; +WebIDLAlgorithm_1.idl_defineConst(DOMImplementationImpl.prototype, "_ID", "@oozcitak/dom"); +//# sourceMappingURL=DOMImplementationImpl.js.map /***/ }), -/***/ 35648: -/***/ ((__unused_webpack_module, exports) => { +/***/ 65096: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var PotentialCustomElementName = /[a-z]([\0-\t\x2D\._a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*-([\0-\t\x2D\._a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*/; -var NamesWithHyphen = new Set(['annotation-xml', 'color-profile', - 'font-face', 'font-face-src', 'font-face-uri', 'font-face-format', - 'font-face-name', 'missing-glyph']); -var ElementNames = new Set(['article', 'aside', 'blockquote', - 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', - 'header', 'main', 'nav', 'p', 'section', 'span']); -var VoidElementNames = new Set(['area', 'base', 'basefont', - 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', - 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); -var ShadowHostNames = new Set(['article', 'aside', 'blockquote', 'body', - 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', - 'nav', 'p', 'section', 'span']); +var DOMImpl_1 = __nccwpck_require__(14177); +var DOMException_1 = __nccwpck_require__(13166); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); /** - * Determines if the given string is a valid custom element name. - * - * @param name - a name string + * Represents a token set. */ -function customElement_isValidCustomElementName(name) { - if (!PotentialCustomElementName.test(name)) - return false; - if (NamesWithHyphen.has(name)) +var DOMTokenListImpl = /** @class */ (function () { + /** + * Initializes a new instance of `DOMTokenList`. + * + * @param element - associated element + * @param attribute - associated attribute + */ + function DOMTokenListImpl(element, attribute) { + /** + * 1. Let element be associated element. + * 2. Let localName be associated attribute’s local name. + * 3. Let value be the result of getting an attribute value given element + * and localName. + * 4. Run the attribute change steps for element, localName, value, value, + * and null. + */ + this._element = element; + this._attribute = attribute; + this._tokenSet = new Set(); + var localName = attribute._localName; + var value = algorithm_1.element_getAnAttributeValue(element, localName); + // define a closure to be called when the associated attribute's value changes + var thisObj = this; + function updateTokenSet(element, localName, oldValue, value, namespace) { + /** + * 1. If localName is associated attribute’s local name, namespace is null, + * and value is null, then empty token set. + * 2. Otherwise, if localName is associated attribute’s local name, + * namespace is null, then set token set to value, parsed. + */ + if (localName === thisObj._attribute._localName && namespace === null) { + if (!value) + thisObj._tokenSet.clear(); + else + thisObj._tokenSet = algorithm_1.orderedSet_parse(value); + } + } + // add the closure to the associated element's attribute change steps + this._element._attributeChangeSteps.push(updateTokenSet); + if (DOMImpl_1.dom.features.steps) { + algorithm_1.dom_runAttributeChangeSteps(element, localName, value, value, null); + } + } + Object.defineProperty(DOMTokenListImpl.prototype, "length", { + /** @inheritdoc */ + get: function () { + /** + * The length attribute' getter must return context object’s token set’s + * size. + */ + return this._tokenSet.size; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + DOMTokenListImpl.prototype.item = function (index) { + var e_1, _a; + /** + * 1. If index is equal to or greater than context object’s token set’s + * size, then return null. + * 2. Return context object’s token set[index]. + */ + var i = 0; + try { + for (var _b = __values(this._tokenSet), _c = _b.next(); !_c.done; _c = _b.next()) { + var token = _c.value; + if (i === index) + return token; + i++; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return null; + }; + /** @inheritdoc */ + DOMTokenListImpl.prototype.contains = function (token) { + /** + * The contains(token) method, when invoked, must return true if context + * object’s token set[token] exists, and false otherwise. + */ + return this._tokenSet.has(token); + }; + /** @inheritdoc */ + DOMTokenListImpl.prototype.add = function () { + var e_2, _a; + var tokens = []; + for (var _i = 0; _i < arguments.length; _i++) { + tokens[_i] = arguments[_i]; + } + try { + /** + * 1. For each token in tokens: + * 1.1. If token is the empty string, then throw a "SyntaxError" + * DOMException. + * 1.2. If token contains any ASCII whitespace, then throw an + * "InvalidCharacterError" DOMException. + * 2. For each token in tokens, append token to context object’s token set. + * 3. Run the update steps. + */ + for (var tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) { + var token = tokens_1_1.value; + if (token === '') { + throw new DOMException_1.SyntaxError("Cannot add an empty token."); + } + else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) { + throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); + } + else { + this._tokenSet.add(token); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1); + } + finally { if (e_2) throw e_2.error; } + } + algorithm_1.tokenList_updateSteps(this); + }; + /** @inheritdoc */ + DOMTokenListImpl.prototype.remove = function () { + var e_3, _a; + var tokens = []; + for (var _i = 0; _i < arguments.length; _i++) { + tokens[_i] = arguments[_i]; + } + try { + /** + * 1. For each token in tokens: + * 1.1. If token is the empty string, then throw a "SyntaxError" + * DOMException. + * 1.2. If token contains any ASCII whitespace, then throw an + * "InvalidCharacterError" DOMException. + * 2. For each token in tokens, remove token from context object’s token set. + * 3. Run the update steps. + */ + for (var tokens_2 = __values(tokens), tokens_2_1 = tokens_2.next(); !tokens_2_1.done; tokens_2_1 = tokens_2.next()) { + var token = tokens_2_1.value; + if (token === '') { + throw new DOMException_1.SyntaxError("Cannot remove an empty token."); + } + else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) { + throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); + } + else { + this._tokenSet.delete(token); + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (tokens_2_1 && !tokens_2_1.done && (_a = tokens_2.return)) _a.call(tokens_2); + } + finally { if (e_3) throw e_3.error; } + } + algorithm_1.tokenList_updateSteps(this); + }; + /** @inheritdoc */ + DOMTokenListImpl.prototype.toggle = function (token, force) { + if (force === void 0) { force = undefined; } + /** + * 1. If token is the empty string, then throw a "SyntaxError" DOMException. + * 2. If token contains any ASCII whitespace, then throw an + * "InvalidCharacterError" DOMException. + */ + if (token === '') { + throw new DOMException_1.SyntaxError("Cannot toggle an empty token."); + } + else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) { + throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); + } + /** + * 3. If context object’s token set[token] exists, then: + */ + if (this._tokenSet.has(token)) { + /** + * 3.1. If force is either not given or is false, then remove token from + * context object’s token set, run the update steps and return false. + * 3.2. Return true. + */ + if (force === undefined || force === false) { + this._tokenSet.delete(token); + algorithm_1.tokenList_updateSteps(this); + return false; + } + return true; + } + /** + * 4. Otherwise, if force not given or is true, append token to context + * object’s token set, run the update steps, and return true. + */ + if (force === undefined || force === true) { + this._tokenSet.add(token); + algorithm_1.tokenList_updateSteps(this); + return true; + } + /** + * 5. Return false. + */ return false; - return true; -} -exports.customElement_isValidCustomElementName = customElement_isValidCustomElementName; -/** - * Determines if the given string is a valid element name. - * - * @param name - a name string - */ -function customElement_isValidElementName(name) { - return (ElementNames.has(name)); -} -exports.customElement_isValidElementName = customElement_isValidElementName; -/** - * Determines if the given string is a void element name. - * - * @param name - a name string - */ -function customElement_isVoidElementName(name) { - return (VoidElementNames.has(name)); -} -exports.customElement_isVoidElementName = customElement_isVoidElementName; -/** - * Determines if the given string is a valid shadow host element name. - * - * @param name - a name string - */ -function customElement_isValidShadowHostName(name) { - return (ShadowHostNames.has(name)); -} -exports.customElement_isValidShadowHostName = customElement_isValidShadowHostName; -/** - * Enqueues an upgrade reaction for a custom element. - * - * @param element - a custom element - * @param definition - a custom element definition - */ -function customElement_enqueueACustomElementUpgradeReaction(element, definition) { - // TODO: Implement in HTML DOM -} -exports.customElement_enqueueACustomElementUpgradeReaction = customElement_enqueueACustomElementUpgradeReaction; -/** - * Enqueues a callback reaction for a custom element. - * - * @param element - a custom element - * @param callbackName - name of the callback - * @param args - callback arguments - */ -function customElement_enqueueACustomElementCallbackReaction(element, callbackName, args) { - // TODO: Implement in HTML DOM -} -exports.customElement_enqueueACustomElementCallbackReaction = customElement_enqueueACustomElementCallbackReaction; -/** - * Upgrade a custom element. - * - * @param element - a custom element - */ -function customElement_upgrade(definition, element) { - // TODO: Implement in HTML DOM -} -exports.customElement_upgrade = customElement_upgrade; + }; + /** @inheritdoc */ + DOMTokenListImpl.prototype.replace = function (token, newToken) { + /** + * 1. If either token or newToken is the empty string, then throw a + * "SyntaxError" DOMException. + * 2. If either token or newToken contains any ASCII whitespace, then throw + * an "InvalidCharacterError" DOMException. + */ + if (token === '' || newToken === '') { + throw new DOMException_1.SyntaxError("Cannot replace an empty token."); + } + else if (infra_1.codePoint.ASCIIWhiteSpace.test(token) || infra_1.codePoint.ASCIIWhiteSpace.test(newToken)) { + throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); + } + /** + * 3. If context object’s token set does not contain token, then return + * false. + */ + if (!this._tokenSet.has(token)) + return false; + /** + * 4. Replace token in context object’s token set with newToken. + * 5. Run the update steps. + * 6. Return true. + */ + infra_1.set.replace(this._tokenSet, token, newToken); + algorithm_1.tokenList_updateSteps(this); + return true; + }; + /** @inheritdoc */ + DOMTokenListImpl.prototype.supports = function (token) { + /** + * 1. Let result be the return value of validation steps called with token. + * 2. Return result. + */ + return algorithm_1.tokenList_validationSteps(this, token); + }; + Object.defineProperty(DOMTokenListImpl.prototype, "value", { + /** @inheritdoc */ + get: function () { + /** + * The value attribute must return the result of running context object’s + * serialize steps. + */ + return algorithm_1.tokenList_serializeSteps(this); + }, + set: function (value) { + /** + * Setting the value attribute must set an attribute value for the + * associated element using associated attribute’s local name and the given + * value. + */ + algorithm_1.element_setAnAttributeValue(this._element, this._attribute._localName, value); + }, + enumerable: true, + configurable: true + }); + /** + * Returns an iterator for the token set. + */ + DOMTokenListImpl.prototype[Symbol.iterator] = function () { + var it = this._tokenSet[Symbol.iterator](); + return { + next: function () { + return it.next(); + } + }; + }; + /** + * Creates a new `DOMTokenList`. + * + * @param element - associated element + * @param attribute - associated attribute + */ + DOMTokenListImpl._create = function (element, attribute) { + return new DOMTokenListImpl(element, attribute); + }; + return DOMTokenListImpl; +}()); +exports.DOMTokenListImpl = DOMTokenListImpl; +//# sourceMappingURL=DOMTokenListImpl.js.map + +/***/ }), + +/***/ 12585: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var NodeImpl_1 = __nccwpck_require__(91745); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Tries to upgrade a custom element. - * - * @param element - a custom element + * Represents a document fragment in the XML tree. */ -function customElement_tryToUpgrade(element) { - // TODO: Implement in HTML DOM -} -exports.customElement_tryToUpgrade = customElement_tryToUpgrade; +var DocumentFragmentImpl = /** @class */ (function (_super) { + __extends(DocumentFragmentImpl, _super); + /** + * Initializes a new instance of `DocumentFragment`. + * + * @param host - shadow root's host element + */ + function DocumentFragmentImpl(host) { + if (host === void 0) { host = null; } + var _this = _super.call(this) || this; + _this._children = new Set(); + _this._host = host; + return _this; + } + // MIXIN: NonElementParentNode + /* istanbul ignore next */ + DocumentFragmentImpl.prototype.getElementById = function (elementId) { throw new Error("Mixin: NonElementParentNode not implemented."); }; + Object.defineProperty(DocumentFragmentImpl.prototype, "children", { + // MIXIN: ParentNode + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentFragmentImpl.prototype, "firstElementChild", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentFragmentImpl.prototype, "lastElementChild", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentFragmentImpl.prototype, "childElementCount", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + /* istanbul ignore next */ + DocumentFragmentImpl.prototype.prepend = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ParentNode not implemented."); + }; + /* istanbul ignore next */ + DocumentFragmentImpl.prototype.append = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ParentNode not implemented."); + }; + /* istanbul ignore next */ + DocumentFragmentImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; + /* istanbul ignore next */ + DocumentFragmentImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; + /** + * Creates a new `DocumentFragment`. + * + * @param document - owner document + * @param host - shadow root's host element + */ + DocumentFragmentImpl._create = function (document, host) { + if (host === void 0) { host = null; } + var node = new DocumentFragmentImpl(host); + node._nodeDocument = document; + return node; + }; + return DocumentFragmentImpl; +}(NodeImpl_1.NodeImpl)); +exports.DocumentFragmentImpl = DocumentFragmentImpl; /** - * Looks up a custom element definition. - * - * @param document - a document - * @param namespace - element namespace - * @param localName - element local name - * @param is - an `is` value + * Initialize prototype properties */ -function customElement_lookUpACustomElementDefinition(document, namespace, localName, is) { - // TODO: Implement in HTML DOM - return null; -} -exports.customElement_lookUpACustomElementDefinition = customElement_lookUpACustomElementDefinition; -//# sourceMappingURL=CustomElementAlgorithm.js.map +WebIDLAlgorithm_1.idl_defineConst(DocumentFragmentImpl.prototype, "_nodeType", interfaces_1.NodeType.DocumentFragment); +//# sourceMappingURL=DocumentFragmentImpl.js.map /***/ }), -/***/ 9628: +/***/ 14333: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); @@ -43647,1141 +27339,687 @@ var __values = (this && this.__values) || function(o) { }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var util_1 = __nccwpck_require__(65282); -var ShadowTreeAlgorithm_1 = __nccwpck_require__(68733); -var supportedTokens = new Map(); -/** - * Runs removing steps for node. - * - * @param removedNode - removed node - * @param oldParent - old parent node - */ -function dom_runRemovingSteps(removedNode, oldParent) { - // No steps defined -} -exports.dom_runRemovingSteps = dom_runRemovingSteps; -/** - * Runs cloning steps for node. - * - * @param copy - node clone - * @param node - node - * @param document - document to own the cloned node - * @param cloneChildrenFlag - whether child nodes are cloned - */ -function dom_runCloningSteps(copy, node, document, cloneChildrenFlag) { - // No steps defined -} -exports.dom_runCloningSteps = dom_runCloningSteps; -/** - * Runs adopting steps for node. - * - * @param node - node - * @param oldDocument - old document - */ -function dom_runAdoptingSteps(node, oldDocument) { - // No steps defined -} -exports.dom_runAdoptingSteps = dom_runAdoptingSteps; -/** - * Runs attribute change steps for an element node. - * - * @param element - element node owning the attribute - * @param localName - attribute's local name - * @param oldValue - attribute's old value - * @param value - attribute's new value - * @param namespace - attribute's namespace - */ -function dom_runAttributeChangeSteps(element, localName, oldValue, value, namespace) { - var e_1, _a; - // run default steps - if (DOMImpl_1.dom.features.slots) { - updateASlotablesName.call(element, element, localName, oldValue, value, namespace); - updateASlotsName.call(element, element, localName, oldValue, value, namespace); - } - updateAnElementID.call(element, element, localName, value, namespace); +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; try { - // run custom steps - for (var _b = __values(element._attributeChangeSteps), _c = _b.next(); !_c.done; _c = _b.next()) { - var step = _c.value; - step.call(element, element, localName, oldValue, value, namespace); - } + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } - catch (e_1_1) { e_1 = { error: e_1_1 }; } + catch (error) { e = { error: error }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + if (r && !r.done && (m = i["return"])) m.call(i); } - finally { if (e_1) throw e_1.error; } + finally { if (e) throw e.error; } } -} -exports.dom_runAttributeChangeSteps = dom_runAttributeChangeSteps; -/** - * Runs insertion steps for a node. - * - * @param insertedNode - inserted node - */ -function dom_runInsertionSteps(insertedNode) { - // No steps defined -} -exports.dom_runInsertionSteps = dom_runInsertionSteps; -/** - * Runs pre-removing steps for a node iterator and node. - * - * @param nodeIterator - a node iterator - * @param toBeRemoved - node to be removed - */ -function dom_runNodeIteratorPreRemovingSteps(nodeIterator, toBeRemoved) { - removeNodeIterator.call(nodeIterator, nodeIterator, toBeRemoved); -} -exports.dom_runNodeIteratorPreRemovingSteps = dom_runNodeIteratorPreRemovingSteps; -/** - * Determines if there are any supported tokens defined for the given - * attribute name. - * - * @param attributeName - an attribute name - */ -function dom_hasSupportedTokens(attributeName) { - return supportedTokens.has(attributeName); -} -exports.dom_hasSupportedTokens = dom_hasSupportedTokens; -/** - * Returns the set of supported tokens defined for the given attribute name. - * - * @param attributeName - an attribute name - */ -function dom_getSupportedTokens(attributeName) { - return supportedTokens.get(attributeName) || new Set(); -} -exports.dom_getSupportedTokens = dom_getSupportedTokens; -/** - * Runs event construction steps. - * - * @param event - an event - */ -function dom_runEventConstructingSteps(event) { - // No steps defined -} -exports.dom_runEventConstructingSteps = dom_runEventConstructingSteps; -/** - * Runs child text content change steps for a parent node. - * - * @param parent - parent node with text node child nodes - */ -function dom_runChildTextContentChangeSteps(parent) { - // No steps defined -} -exports.dom_runChildTextContentChangeSteps = dom_runChildTextContentChangeSteps; + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var interfaces_1 = __nccwpck_require__(27305); +var DOMException_1 = __nccwpck_require__(13166); +var NodeImpl_1 = __nccwpck_require__(91745); +var util_1 = __nccwpck_require__(65282); +var util_2 = __nccwpck_require__(76195); +var infra_1 = __nccwpck_require__(84251); +var URLAlgorithm_1 = __nccwpck_require__(53568); +var algorithm_1 = __nccwpck_require__(61); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Defines pre-removing steps for a node iterator. + * Represents a document node. */ -function removeNodeIterator(nodeIterator, toBeRemovedNode) { +var DocumentImpl = /** @class */ (function (_super) { + __extends(DocumentImpl, _super); /** - * 1. If toBeRemovedNode is not an inclusive ancestor of nodeIterator’s - * reference, or toBeRemovedNode is nodeIterator’s root, then return. + * Initializes a new instance of `Document`. */ - if (toBeRemovedNode === nodeIterator._root || - !TreeAlgorithm_1.tree_isAncestorOf(nodeIterator._reference, toBeRemovedNode, true)) { - return; + function DocumentImpl() { + var _this = _super.call(this) || this; + _this._children = new Set(); + _this._encoding = { + name: "UTF-8", + labels: ["unicode-1-1-utf-8", "utf-8", "utf8"] + }; + _this._contentType = 'application/xml'; + _this._URL = { + scheme: "about", + username: "", + password: "", + host: null, + port: null, + path: ["blank"], + query: null, + fragment: null, + _cannotBeABaseURLFlag: true, + _blobURLEntry: null + }; + _this._origin = null; + _this._type = "xml"; + _this._mode = "no-quirks"; + _this._documentElement = null; + _this._hasNamespaces = false; + _this._nodeDocumentOverwrite = null; + return _this; } - /** - * 2. If nodeIterator’s pointer before reference is true, then: - */ - if (nodeIterator._pointerBeforeReference) { + Object.defineProperty(DocumentImpl.prototype, "_nodeDocument", { + get: function () { return this._nodeDocumentOverwrite || this; }, + set: function (val) { this._nodeDocumentOverwrite = val; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "implementation", { + /** @inheritdoc */ + get: function () { + /** + * The implementation attribute’s getter must return the DOMImplementation + * object that is associated with the document. + */ + return this._implementation || (this._implementation = algorithm_1.create_domImplementation(this)); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "URL", { + /** @inheritdoc */ + get: function () { + /** + * The URL attribute’s getter and documentURI attribute’s getter must return + * the URL, serialized. + * See: https://url.spec.whatwg.org/#concept-url-serializer + */ + return URLAlgorithm_1.urlSerializer(this._URL); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "documentURI", { + /** @inheritdoc */ + get: function () { return this.URL; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "origin", { + /** @inheritdoc */ + get: function () { + return "null"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "compatMode", { + /** @inheritdoc */ + get: function () { + /** + * The compatMode attribute’s getter must return "BackCompat" if context + * object’s mode is "quirks", and "CSS1Compat" otherwise. + */ + return this._mode === "quirks" ? "BackCompat" : "CSS1Compat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "characterSet", { + /** @inheritdoc */ + get: function () { + /** + * The characterSet attribute’s getter, charset attribute’s getter, and + * inputEncoding attribute’s getter, must return context object’s + * encoding’s name. + */ + return this._encoding.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "charset", { + /** @inheritdoc */ + get: function () { return this._encoding.name; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "inputEncoding", { + /** @inheritdoc */ + get: function () { return this._encoding.name; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "contentType", { + /** @inheritdoc */ + get: function () { + /** + * The contentType attribute’s getter must return the content type. + */ + return this._contentType; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "doctype", { + /** @inheritdoc */ + get: function () { + var e_1, _a; + try { + /** + * The doctype attribute’s getter must return the child of the document + * that is a doctype, and null otherwise. + */ + for (var _b = __values(this._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var child = _c.value; + if (util_1.Guard.isDocumentTypeNode(child)) + return child; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "documentElement", { + /** @inheritdoc */ + get: function () { + /** + * The documentElement attribute’s getter must return the document element. + */ + return this._documentElement; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + DocumentImpl.prototype.getElementsByTagName = function (qualifiedName) { + /** + * The getElementsByTagName(qualifiedName) method, when invoked, must return + * the list of elements with qualified name qualifiedName for the context object. + */ + return algorithm_1.node_listOfElementsWithQualifiedName(qualifiedName, this); + }; + /** @inheritdoc */ + DocumentImpl.prototype.getElementsByTagNameNS = function (namespace, localName) { + /** + * The getElementsByTagNameNS(namespace, localName) method, when invoked, + * must return the list of elements with namespace namespace and local name + * localName for the context object. + */ + return algorithm_1.node_listOfElementsWithNamespace(namespace, localName, this); + }; + /** @inheritdoc */ + DocumentImpl.prototype.getElementsByClassName = function (classNames) { + /** + * The getElementsByClassName(classNames) method, when invoked, must return + * the list of elements with class names classNames for the context object. + */ + return algorithm_1.node_listOfElementsWithClassNames(classNames, this); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createElement = function (localName, options) { + /** + * 1. If localName does not match the Name production, then throw an + * "InvalidCharacterError" DOMException. + * 2. If the context object is an HTML document, then set localName to + * localName in ASCII lowercase. + * 3. Let is be null. + * 4. If options is a dictionary and options’s is is present, then set is + * to it. + * 5. Let namespace be the HTML namespace, if the context object is an + * HTML document or context object’s content type is + * "application/xhtml+xml", and null otherwise. + * 6. Return the result of creating an element given the context object, + * localName, namespace, null, is, and with the synchronous custom elements + * flag set. + */ + if (!algorithm_1.xml_isName(localName)) + throw new DOMException_1.InvalidCharacterError(); + if (this._type === "html") + localName = localName.toLowerCase(); + var is = null; + if (options !== undefined) { + if (util_2.isString(options)) { + is = options; + } + else { + is = options.is; + } + } + var namespace = (this._type === "html" || this._contentType === "application/xhtml+xml") ? + infra_1.namespace.HTML : null; + return algorithm_1.element_createAnElement(this, localName, namespace, null, is, true); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createElementNS = function (namespace, qualifiedName, options) { + /** + * The createElementNS(namespace, qualifiedName, options) method, when + * invoked, must return the result of running the internal createElementNS + * steps, given context object, namespace, qualifiedName, and options. + */ + return algorithm_1.document_internalCreateElementNS(this, namespace, qualifiedName, options); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createDocumentFragment = function () { + /** + * The createDocumentFragment() method, when invoked, must return a new + * DocumentFragment node with its node document set to the context object. + */ + return algorithm_1.create_documentFragment(this); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createTextNode = function (data) { + /** + * The createTextNode(data) method, when invoked, must return a new Text + * node with its data set to data and node document set to the context object. + */ + return algorithm_1.create_text(this, data); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createCDATASection = function (data) { + /** + * 1. If context object is an HTML document, then throw a + * "NotSupportedError" DOMException. + * 2. If data contains the string "]]>", then throw an + * "InvalidCharacterError" DOMException. + * 3. Return a new CDATASection node with its data set to data and node + * document set to the context object. + */ + if (this._type === "html") + throw new DOMException_1.NotSupportedError(); + if (data.indexOf(']]>') !== -1) + throw new DOMException_1.InvalidCharacterError(); + return algorithm_1.create_cdataSection(this, data); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createComment = function (data) { + /** + * The createComment(data) method, when invoked, must return a new Comment + * node with its data set to data and node document set to the context object. + */ + return algorithm_1.create_comment(this, data); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createProcessingInstruction = function (target, data) { + /** + * 1. If target does not match the Name production, then throw an + * "InvalidCharacterError" DOMException. + * 2. If data contains the string "?>", then throw an + * "InvalidCharacterError" DOMException. + * 3. Return a new ProcessingInstruction node, with target set to target, + * data set to data, and node document set to the context object. + */ + if (!algorithm_1.xml_isName(target)) + throw new DOMException_1.InvalidCharacterError(); + if (data.indexOf("?>") !== -1) + throw new DOMException_1.InvalidCharacterError(); + return algorithm_1.create_processingInstruction(this, target, data); + }; + /** @inheritdoc */ + DocumentImpl.prototype.importNode = function (node, deep) { + if (deep === void 0) { deep = false; } + /** + * 1. If node is a document or shadow root, then throw a "NotSupportedError" DOMException. + */ + if (util_1.Guard.isDocumentNode(node) || util_1.Guard.isShadowRoot(node)) + throw new DOMException_1.NotSupportedError(); + /** + * 2. Return a clone of node, with context object and the clone children flag set if deep is true. + */ + return algorithm_1.node_clone(node, this, deep); + }; + /** @inheritdoc */ + DocumentImpl.prototype.adoptNode = function (node) { + /** + * 1. If node is a document, then throw a "NotSupportedError" DOMException. + */ + if (util_1.Guard.isDocumentNode(node)) + throw new DOMException_1.NotSupportedError(); + /** + * 2. If node is a shadow root, then throw a "HierarchyRequestError" DOMException. + */ + if (util_1.Guard.isShadowRoot(node)) + throw new DOMException_1.HierarchyRequestError(); + /** + * 3. Adopt node into the context object. + * 4. Return node. + */ + algorithm_1.document_adopt(node, this); + return node; + }; + /** @inheritdoc */ + DocumentImpl.prototype.createAttribute = function (localName) { + /** + * 1. If localName does not match the Name production in XML, then throw + * an "InvalidCharacterError" DOMException. + * 2. If the context object is an HTML document, then set localName to + * localName in ASCII lowercase. + * 3. Return a new attribute whose local name is localName and node document + * is context object. + */ + if (!algorithm_1.xml_isName(localName)) + throw new DOMException_1.InvalidCharacterError(); + if (this._type === "html") { + localName = localName.toLowerCase(); + } + var attr = algorithm_1.create_attr(this, localName); + return attr; + }; + /** @inheritdoc */ + DocumentImpl.prototype.createAttributeNS = function (namespace, qualifiedName) { /** - * 2.1. Let next be toBeRemovedNode’s first following node that is an - * inclusive descendant of nodeIterator’s root and is not an inclusive - * descendant of toBeRemovedNode, and null if there is no such node. + * 1. Let namespace, prefix, and localName be the result of passing + * namespace and qualifiedName to validate and extract. + * 2. Return a new attribute whose namespace is namespace, namespace prefix + * is prefix, local name is localName, and node document is context object. */ - while (true) { - var nextNode = TreeAlgorithm_1.tree_getFollowingNode(nodeIterator._root, toBeRemovedNode); - if (nextNode !== null && - TreeAlgorithm_1.tree_isDescendantOf(nodeIterator._root, nextNode, true) && - !TreeAlgorithm_1.tree_isDescendantOf(toBeRemovedNode, nextNode, true)) { - /** - * 2.2. If next is non-null, then set nodeIterator’s reference to next - * and return. - */ - nodeIterator._reference = nextNode; - return; - } - else if (nextNode === null) { - /** - * 2.3. Otherwise, set nodeIterator’s pointer before reference to false. - */ - nodeIterator._pointerBeforeReference = false; - return; - } - } - } - /** - * 3. Set nodeIterator’s reference to toBeRemovedNode’s parent, if - * toBeRemovedNode’s previous sibling is null, and to the inclusive - * descendant of toBeRemovedNode’s previous sibling that appears last in - * tree order otherwise. - */ - if (toBeRemovedNode._previousSibling === null) { - if (toBeRemovedNode._parent !== null) { - nodeIterator._reference = toBeRemovedNode._parent; + var _a = __read(algorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2]; + var attr = algorithm_1.create_attr(this, localName); + attr._namespace = ns; + attr._namespacePrefix = prefix; + return attr; + }; + /** @inheritdoc */ + DocumentImpl.prototype.createEvent = function (eventInterface) { + return algorithm_1.event_createLegacyEvent(eventInterface); + }; + /** @inheritdoc */ + DocumentImpl.prototype.createRange = function () { + /** + * The createRange() method, when invoked, must return a new live range + * with (context object, 0) as its start and end. + */ + var range = algorithm_1.create_range(); + range._start = [this, 0]; + range._end = [this, 0]; + return range; + }; + /** @inheritdoc */ + DocumentImpl.prototype.createNodeIterator = function (root, whatToShow, filter) { + if (whatToShow === void 0) { whatToShow = interfaces_1.WhatToShow.All; } + if (filter === void 0) { filter = null; } + /** + * 1. Let iterator be a new NodeIterator object. + * 2. Set iterator’s root and iterator’s reference to root. + * 3. Set iterator’s pointer before reference to true. + * 4. Set iterator’s whatToShow to whatToShow. + * 5. Set iterator’s filter to filter. + * 6. Return iterator. + */ + var iterator = algorithm_1.create_nodeIterator(root, root, true); + iterator._whatToShow = whatToShow; + iterator._iteratorCollection = algorithm_1.create_nodeList(root); + if (util_2.isFunction(filter)) { + iterator._filter = algorithm_1.create_nodeFilter(); + iterator._filter.acceptNode = filter; } - } - else { - var referenceNode = toBeRemovedNode._previousSibling; - var childNode = TreeAlgorithm_1.tree_getFirstDescendantNode(toBeRemovedNode._previousSibling, true, false); - while (childNode !== null) { - if (childNode !== null) { - referenceNode = childNode; - } - // loop through to get the last descendant node - childNode = TreeAlgorithm_1.tree_getNextDescendantNode(toBeRemovedNode._previousSibling, childNode, true, false); + else { + iterator._filter = filter; } - nodeIterator._reference = referenceNode; - } -} -/** - * Defines attribute change steps to update a slot’s name. - */ -function updateASlotsName(element, localName, oldValue, value, namespace) { - /** - * 1. If element is a slot, localName is name, and namespace is null, then: - * 1.1. If value is oldValue, then return. - * 1.2. If value is null and oldValue is the empty string, then return. - * 1.3. If value is the empty string and oldValue is null, then return. - * 1.4. If value is null or the empty string, then set element’s name to the - * empty string. - * 1.5. Otherwise, set element’s name to value. - * 1.6. Run assign slotables for a tree with element’s root. - */ - if (util_1.Guard.isSlot(element) && localName === "name" && namespace === null) { - if (value === oldValue) - return; - if (value === null && oldValue === '') - return; - if (value === '' && oldValue === null) - return; - if ((value === null || value === '')) { - element._name = ''; + return iterator; + }; + /** @inheritdoc */ + DocumentImpl.prototype.createTreeWalker = function (root, whatToShow, filter) { + if (whatToShow === void 0) { whatToShow = interfaces_1.WhatToShow.All; } + if (filter === void 0) { filter = null; } + /** + * 1. Let walker be a new TreeWalker object. + * 2. Set walker’s root and walker’s current to root. + * 3. Set walker’s whatToShow to whatToShow. + * 4. Set walker’s filter to filter. + * 5. Return walker. + */ + var walker = algorithm_1.create_treeWalker(root, root); + walker._whatToShow = whatToShow; + if (util_2.isFunction(filter)) { + walker._filter = algorithm_1.create_nodeFilter(); + walker._filter.acceptNode = filter; } else { - element._name = value; + walker._filter = filter; } - ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(element)); - } -} -/** - * Defines attribute change steps to update a slotable’s name. - */ -function updateASlotablesName(element, localName, oldValue, value, namespace) { + return walker; + }; /** - * 1. If localName is slot and namespace is null, then: - * 1.1. If value is oldValue, then return. - * 1.2. If value is null and oldValue is the empty string, then return. - * 1.3. If value is the empty string and oldValue is null, then return. - * 1.4. If value is null or the empty string, then set element’s name to - * the empty string. - * 1.5. Otherwise, set element’s name to value. - * 1.6. If element is assigned, then run assign slotables for element’s - * assigned slot. - * 1.7. Run assign a slot for element. + * Gets the parent event target for the given event. + * + * @param event - an event */ - if (util_1.Guard.isSlotable(element) && localName === "slot" && namespace === null) { - if (value === oldValue) - return; - if (value === null && oldValue === '') - return; - if (value === '' && oldValue === null) - return; - if ((value === null || value === '')) { - element._name = ''; + DocumentImpl.prototype._getTheParent = function (event) { + /** + * TODO: Implement realms + * A document’s get the parent algorithm, given an event, returns null if + * event’s type attribute value is "load" or document does not have a + * browsing context, and the document’s relevant global object otherwise. + */ + if (event._type === "load") { + return null; } else { - element._name = value; + return DOMImpl_1.dom.window; } - if (ShadowTreeAlgorithm_1.shadowTree_isAssigned(element)) { - ShadowTreeAlgorithm_1.shadowTree_assignSlotables(element._assignedSlot); + }; + // MIXIN: NonElementParentNode + /* istanbul ignore next */ + DocumentImpl.prototype.getElementById = function (elementId) { throw new Error("Mixin: NonElementParentNode not implemented."); }; + Object.defineProperty(DocumentImpl.prototype, "children", { + // MIXIN: DocumentOrShadowRoot + // No elements + // MIXIN: ParentNode + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "firstElementChild", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "lastElementChild", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentImpl.prototype, "childElementCount", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + /* istanbul ignore next */ + DocumentImpl.prototype.prepend = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; } - ShadowTreeAlgorithm_1.shadowTree_assignASlot(element); - } -} + throw new Error("Mixin: ParentNode not implemented."); + }; + /* istanbul ignore next */ + DocumentImpl.prototype.append = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ParentNode not implemented."); + }; + /* istanbul ignore next */ + DocumentImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; + /* istanbul ignore next */ + DocumentImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; + return DocumentImpl; +}(NodeImpl_1.NodeImpl)); +exports.DocumentImpl = DocumentImpl; /** - * Defines attribute change steps to update an element's ID. + * Initialize prototype properties */ -function updateAnElementID(element, localName, value, namespace) { - /** - * 1. If localName is id, namespace is null, and value is null or the empty - * string, then unset element’s ID. - * 2. Otherwise, if localName is id, namespace is null, then set element’s - * ID to value. - */ - if (localName === "id" && namespace === null) { - if (!value) - element._uniqueIdentifier = undefined; - else - element._uniqueIdentifier = value; - } -} -//# sourceMappingURL=DOMAlgorithm.js.map +WebIDLAlgorithm_1.idl_defineConst(DocumentImpl.prototype, "_nodeType", interfaces_1.NodeType.Document); +//# sourceMappingURL=DocumentImpl.js.map /***/ }), -/***/ 93261: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 65274: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var OrderedSetAlgorithm_1 = __nccwpck_require__(53670); -var DOMAlgorithm_1 = __nccwpck_require__(9628); -var ElementAlgorithm_1 = __nccwpck_require__(51849); -/** - * Validates a given token against the supported tokens defined for the given - * token lists' associated attribute. - * - * @param tokenList - a token list - * @param token - a token - */ -function tokenList_validationSteps(tokenList, token) { - /** - * 1. If the associated attribute’s local name does not define supported - * tokens, throw a TypeError. - * 2. Let lowercase token be a copy of token, in ASCII lowercase. - * 3. If lowercase token is present in supported tokens, return true. - * 4. Return false. - */ - if (!DOMAlgorithm_1.dom_hasSupportedTokens(tokenList._attribute._localName)) { - throw new TypeError("There are no supported tokens defined for attribute name: '" + tokenList._attribute._localName + "'."); - } - return DOMAlgorithm_1.dom_getSupportedTokens(tokenList._attribute._localName).has(token.toLowerCase()); -} -exports.tokenList_validationSteps = tokenList_validationSteps; /** - * Updates the value of the token lists' associated attribute. + * Represents a mixin for an interface to be used to share APIs between + * documents and shadow roots. This mixin is implemented by + * {@link Document} and {@link ShadowRoot}. * - * @param tokenList - a token list + * _Note:_ The DocumentOrShadowRoot mixin is expected to be used by other + * standards that want to define APIs shared between documents and shadow roots. */ -function tokenList_updateSteps(tokenList) { - /** - * 1. If the associated element does not have an associated attribute and - * token set is empty, then return. - * 2. Set an attribute value for the associated element using associated - * attribute’s local name and the result of running the ordered set - * serializer for token set. - */ - if (!tokenList._element.hasAttribute(tokenList._attribute._localName) && - tokenList._tokenSet.size === 0) { - return; +var DocumentOrShadowRootImpl = /** @class */ (function () { + function DocumentOrShadowRootImpl() { } - ElementAlgorithm_1.element_setAnAttributeValue(tokenList._element, tokenList._attribute._localName, OrderedSetAlgorithm_1.orderedSet_serialize(tokenList._tokenSet)); -} -exports.tokenList_updateSteps = tokenList_updateSteps; -/** - * Gets the value of the token lists' associated attribute. - * - * @param tokenList - a token list - */ -function tokenList_serializeSteps(tokenList) { - /** - * A DOMTokenList object’s serialize steps are to return the result of - * running get an attribute value given the associated element and the - * associated attribute’s local name. - */ - return ElementAlgorithm_1.element_getAnAttributeValue(tokenList._element, tokenList._attribute._localName); -} -exports.tokenList_serializeSteps = tokenList_serializeSteps; -//# sourceMappingURL=DOMTokenListAlgorithm.js.map + return DocumentOrShadowRootImpl; +}()); +exports.DocumentOrShadowRootImpl = DocumentOrShadowRootImpl; +//# sourceMappingURL=DocumentOrShadowRootImpl.js.map /***/ }), -/***/ 12793: +/***/ 3173: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(65282); -var util_2 = __nccwpck_require__(76195); -var ElementImpl_1 = __nccwpck_require__(35975); -var CustomElementAlgorithm_1 = __nccwpck_require__(35648); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var NamespaceAlgorithm_1 = __nccwpck_require__(35856); -var DOMAlgorithm_1 = __nccwpck_require__(9628); -var ElementAlgorithm_1 = __nccwpck_require__(51849); -var MutationAlgorithm_1 = __nccwpck_require__(45463); -/** - * Returns an element interface for the given name and namespace. - * - * @param name - element name - * @param namespace - namespace - */ -function document_elementInterface(name, namespace) { - return ElementImpl_1.ElementImpl; -} -exports.document_elementInterface = document_elementInterface; -/** - * Creates a new element node. - * See: https://dom.spec.whatwg.org/#internal-createelementns-steps - * - * @param document - owner document - * @param namespace - element namespace - * @param qualifiedName - qualified name - * @param options - element options - */ -function document_internalCreateElementNS(document, namespace, qualifiedName, options) { - /** - * 1. Let namespace, prefix, and localName be the result of passing - * namespace and qualifiedName to validate and extract. - * 2. Let is be null. - * 3. If options is a dictionary and options’s is is present, then set - * is to it. - * 4. Return the result of creating an element given document, localName, - * namespace, prefix, is, and with the synchronous custom elements flag set. - */ - var _a = __read(NamespaceAlgorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2]; - var is = null; - if (options !== undefined) { - if (util_2.isString(options)) { - is = options; - } - else { - is = options.is; - } - } - return ElementAlgorithm_1.element_createAnElement(document, localName, ns, prefix, is, true); -} -exports.document_internalCreateElementNS = document_internalCreateElementNS; -/** - * Removes `node` and its subtree from its document and changes - * its owner document to `document` so that it can be inserted - * into `document`. - * - * @param node - the node to move - * @param document - document to receive the node and its subtree - */ -function document_adopt(node, document) { - var e_1, _a; - // Optimize for common case of inserting a fresh node - if (node._nodeDocument === document && node._parent === null) { - return; - } - /** - * 1. Let oldDocument be node’s node document. - * 2. If node’s parent is not null, remove node from its parent. - */ - var oldDocument = node._nodeDocument; - if (node._parent) - MutationAlgorithm_1.mutation_remove(node, node._parent); - /** - * 3. If document is not oldDocument, then: - */ - if (document !== oldDocument) { - /** - * 3.1. For each inclusiveDescendant in node’s shadow-including inclusive - * descendants: - */ - var inclusiveDescendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node, true, true); - while (inclusiveDescendant !== null) { - /** - * 3.1.1. Set inclusiveDescendant’s node document to document. - * 3.1.2. If inclusiveDescendant is an element, then set the node - * document of each attribute in inclusiveDescendant’s attribute list - * to document. - */ - inclusiveDescendant._nodeDocument = document; - if (util_1.Guard.isElementNode(inclusiveDescendant)) { - try { - for (var _b = (e_1 = void 0, __values(inclusiveDescendant._attributeList._asArray())), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - attr._nodeDocument = document; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - } - /** - * 3.2. For each inclusiveDescendant in node's shadow-including - * inclusive descendants that is custom, enqueue a custom - * element callback reaction with inclusiveDescendant, - * callback name "adoptedCallback", and an argument list - * containing oldDocument and document. - */ - if (DOMImpl_1.dom.features.customElements) { - if (util_1.Guard.isElementNode(inclusiveDescendant) && - inclusiveDescendant._customElementState === "custom") { - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(inclusiveDescendant, "adoptedCallback", [oldDocument, document]); - } - } - /** - * 3.3. For each inclusiveDescendant in node’s shadow-including - * inclusive descendants, in shadow-including tree order, run the - * adopting steps with inclusiveDescendant and oldDocument. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runAdoptingSteps(inclusiveDescendant, oldDocument); - } - inclusiveDescendant = TreeAlgorithm_1.tree_getNextDescendantNode(node, inclusiveDescendant, true, true); - } - } -} -exports.document_adopt = document_adopt; -//# sourceMappingURL=DocumentAlgorithm.js.map - -/***/ }), - -/***/ 51849: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var infra_1 = __nccwpck_require__(84251); -var util_1 = __nccwpck_require__(65282); -var DOMException_1 = __nccwpck_require__(13166); -var CreateAlgorithm_1 = __nccwpck_require__(57339); -var CustomElementAlgorithm_1 = __nccwpck_require__(35648); -var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); -var DOMAlgorithm_1 = __nccwpck_require__(9628); -var MutationAlgorithm_1 = __nccwpck_require__(45463); -var DocumentAlgorithm_1 = __nccwpck_require__(12793); -/** - * Determines whether the element's attribute list contains the given - * attribute. - * - * @param attribute - an attribute node - * @param element - an element node - */ -function element_has(attribute, element) { - /** - * An element has an attribute A if its attribute list contains A. - */ - return element._attributeList._asArray().indexOf(attribute) !== -1; -} -exports.element_has = element_has; -/** - * Changes the value of an attribute node. - * - * @param attribute - an attribute node - * @param element - an element node - * @param value - attribute value - */ -function element_change(attribute, element, value) { - /** - * 1. Queue an attribute mutation record for element with attribute’s - * local name, attribute’s namespace, and attribute’s value. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, attribute._value); - } - /** - * 2. If element is custom, then enqueue a custom element callback reaction - * with element, callback name "attributeChangedCallback", and an argument - * list containing attribute’s local name, attribute’s value, value, and - * attribute’s namespace. - */ - if (DOMImpl_1.dom.features.customElements) { - if (util_1.Guard.isCustomElementNode(element)) { - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, attribute._value, value, attribute._namespace]); - } - } - /** - * 3. Run the attribute change steps with element, attribute’s local name, - * attribute’s value, value, and attribute’s namespace. - * 4. Set attribute’s value to value. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, attribute._value, value, attribute._namespace); - } - attribute._value = value; -} -exports.element_change = element_change; -/** - * Appends an attribute to an element node. - * - * @param attribute - an attribute - * @param element - an element to receive the attribute - */ -function element_append(attribute, element) { - /** - * 1. Queue an attribute mutation record for element with attribute’s - * local name, attribute’s namespace, and null. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, null); - } - /** - * 2. If element is custom, then enqueue a custom element callback reaction - * with element, callback name "attributeChangedCallback", and an argument - * list containing attribute’s local name, null, attribute’s value, and - * attribute’s namespace. - */ - if (DOMImpl_1.dom.features.customElements) { - if (util_1.Guard.isCustomElementNode(element)) { - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, null, attribute._value, attribute._namespace]); - } - } - /** - * 3. Run the attribute change steps with element, attribute’s local name, - * null, attribute’s value, and attribute’s namespace. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, null, attribute._value, attribute._namespace); - } - /** - * 4. Append attribute to element’s attribute list. - * 5. Set attribute’s element to element. - */ - element._attributeList._asArray().push(attribute); - attribute._element = element; - // mark that the document has namespaces - if (!element._nodeDocument._hasNamespaces && (attribute._namespace !== null || - attribute._namespacePrefix !== null || attribute._localName === "xmlns")) { - element._nodeDocument._hasNamespaces = true; - } -} -exports.element_append = element_append; -/** - * Removes an attribute from an element node. - * - * @param attribute - an attribute - * @param element - an element to receive the attribute - */ -function element_remove(attribute, element) { - /** - * 1. Queue an attribute mutation record for element with attribute’s - * local name, attribute’s namespace, and attribute’s value. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, attribute._localName, attribute._namespace, attribute._value); - } - /** - * 2. If element is custom, then enqueue a custom element callback reaction - * with element, callback name "attributeChangedCallback", and an argument - * list containing attribute’s local name, attribute’s value, null, - * and attribute’s namespace. - */ - if (DOMImpl_1.dom.features.customElements) { - if (util_1.Guard.isCustomElementNode(element)) { - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [attribute._localName, attribute._value, null, attribute._namespace]); - } - } - /** - * 3. Run the attribute change steps with element, attribute’s local name, - * attribute’s value, null, and attribute’s namespace. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runAttributeChangeSteps(element, attribute._localName, attribute._value, null, attribute._namespace); - } - /** - * 3. Remove attribute from element’s attribute list. - * 5. Set attribute’s element to null. - */ - var index = element._attributeList._asArray().indexOf(attribute); - element._attributeList._asArray().splice(index, 1); - attribute._element = null; -} -exports.element_remove = element_remove; -/** - * Replaces an attribute with another of an element node. - * - * @param oldAttr - old attribute - * @param newAttr - new attribute - * @param element - an element to receive the attribute - */ -function element_replace(oldAttr, newAttr, element) { - /** - * 1. Queue an attribute mutation record for element with oldAttr’s - * local name, oldAttr’s namespace, and oldAttr’s value. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - MutationObserverAlgorithm_1.observer_queueAttributeMutationRecord(element, oldAttr._localName, oldAttr._namespace, oldAttr._value); - } - /** - * 2. If element is custom, then enqueue a custom element callback reaction - * with element, callback name "attributeChangedCallback", and an argument - * list containing oldAttr’s local name, oldAttr’s value, newAttr’s value, - * and oldAttr’s namespace. - */ - if (DOMImpl_1.dom.features.customElements) { - if (util_1.Guard.isCustomElementNode(element)) { - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(element, "attributeChangedCallback", [oldAttr._localName, oldAttr._value, newAttr._value, oldAttr._namespace]); - } - } - /** - * 3. Run the attribute change steps with element, oldAttr’s local name, - * oldAttr’s value, newAttr’s value, and oldAttr’s namespace. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runAttributeChangeSteps(element, oldAttr._localName, oldAttr._value, newAttr._value, oldAttr._namespace); - } - /** - * 4. Replace oldAttr by newAttr in element’s attribute list. - * 5. Set oldAttr’s element to null. - * 6. Set newAttr’s element to element. - */ - var index = element._attributeList._asArray().indexOf(oldAttr); - if (index !== -1) { - element._attributeList._asArray()[index] = newAttr; - } - oldAttr._element = null; - newAttr._element = element; - // mark that the document has namespaces - if (!element._nodeDocument._hasNamespaces && (newAttr._namespace !== null || - newAttr._namespacePrefix !== null || newAttr._localName === "xmlns")) { - element._nodeDocument._hasNamespaces = true; - } -} -exports.element_replace = element_replace; -/** - * Retrieves an attribute with the given name from an element node. - * - * @param qualifiedName - an attribute name - * @param element - an element to receive the attribute - */ -function element_getAnAttributeByName(qualifiedName, element) { - /** - * 1. If element is in the HTML namespace and its node document is an HTML - * document, then set qualifiedName to qualifiedName in ASCII lowercase. - * 2. Return the first attribute in element’s attribute list whose qualified - * name is qualifiedName, and null otherwise. - */ - if (element._namespace === infra_1.namespace.HTML && element._nodeDocument._type === "html") { - qualifiedName = qualifiedName.toLowerCase(); - } - return element._attributeList._asArray().find(function (attr) { return attr._qualifiedName === qualifiedName; }) || null; -} -exports.element_getAnAttributeByName = element_getAnAttributeByName; -/** - * Retrieves an attribute with the given namespace and local name from an - * element node. - * - * @param namespace - an attribute namespace - * @param localName - an attribute local name - * @param element - an element to receive the attribute - */ -function element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element) { - /** - * 1. If namespace is the empty string, set it to null. - * 2. Return the attribute in element’s attribute list whose namespace is - * namespace and local name is localName, if any, and null otherwise. - */ - var ns = namespace || null; - return element._attributeList._asArray().find(function (attr) { return attr._namespace === ns && attr._localName === localName; }) || null; -} -exports.element_getAnAttributeByNamespaceAndLocalName = element_getAnAttributeByNamespaceAndLocalName; -/** - * Retrieves an attribute's value with the given name namespace and local - * name from an element node. - * - * @param element - an element to receive the attribute - * @param localName - an attribute local name - * @param namespace - an attribute namespace - */ -function element_getAnAttributeValue(element, localName, namespace) { - if (namespace === void 0) { namespace = ''; } - /** - * 1. Let attr be the result of getting an attribute given namespace, - * localName, and element. - * 2. If attr is null, then return the empty string. - * 3. Return attr’s value. - */ - var attr = element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element); - if (attr === null) - return ''; - else - return attr._value; -} -exports.element_getAnAttributeValue = element_getAnAttributeValue; -/** - * Sets an attribute of an element node. - * - * @param attr - an attribute - * @param element - an element to receive the attribute - */ -function element_setAnAttribute(attr, element) { - /** - * 1. If attr’s element is neither null nor element, throw an - * "InUseAttributeError" DOMException. - * 2. Let oldAttr be the result of getting an attribute given attr’s - * namespace, attr’s local name, and element. - * 3. If oldAttr is attr, return attr. - * 4. If oldAttr is non-null, replace it by attr in element. - * 5. Otherwise, append attr to element. - * 6. Return oldAttr. - */ - if (attr._element !== null && attr._element !== element) - throw new DOMException_1.InUseAttributeError("This attribute already exists in the document: " + attr._qualifiedName + " as a child of " + attr._element._qualifiedName + "."); - var oldAttr = element_getAnAttributeByNamespaceAndLocalName(attr._namespace || '', attr._localName, element); - if (oldAttr === attr) - return attr; - if (oldAttr !== null) { - element_replace(oldAttr, attr, element); - } - else { - element_append(attr, element); - } - return oldAttr; -} -exports.element_setAnAttribute = element_setAnAttribute; -/** - * Sets an attribute's value of an element node. - * - * @param element - an element to receive the attribute - * @param localName - an attribute local name - * @param value - an attribute value - * @param prefix - an attribute prefix - * @param namespace - an attribute namespace - */ -function element_setAnAttributeValue(element, localName, value, prefix, namespace) { - if (prefix === void 0) { prefix = null; } - if (namespace === void 0) { namespace = null; } - /** - * 1. If prefix is not given, set it to null. - * 2. If namespace is not given, set it to null. - * 3. Let attribute be the result of getting an attribute given namespace, - * localName, and element. - * 4. If attribute is null, create an attribute whose namespace is - * namespace, namespace prefix is prefix, local name is localName, value - * is value, and node document is element’s node document, then append this - * attribute to element, and then return. - * 5. Change attribute from element to value. - */ - var attribute = element_getAnAttributeByNamespaceAndLocalName(namespace || '', localName, element); - if (attribute === null) { - var newAttr = CreateAlgorithm_1.create_attr(element._nodeDocument, localName); - newAttr._namespace = namespace; - newAttr._namespacePrefix = prefix; - newAttr._value = value; - element_append(newAttr, element); - return; - } - element_change(attribute, element, value); -} -exports.element_setAnAttributeValue = element_setAnAttributeValue; -/** - * Removes an attribute with the given name from an element node. - * - * @param qualifiedName - an attribute name - * @param element - an element to receive the attribute - */ -function element_removeAnAttributeByName(qualifiedName, element) { - /** - * 1. Let attr be the result of getting an attribute given qualifiedName - * and element. - * 2. If attr is non-null, remove it from element. - * 3. Return attr. - */ - var attr = element_getAnAttributeByName(qualifiedName, element); - if (attr !== null) { - element_remove(attr, element); - } - return attr; -} -exports.element_removeAnAttributeByName = element_removeAnAttributeByName; -/** - * Removes an attribute with the given namespace and local name from an - * element node. - * - * @param namespace - an attribute namespace - * @param localName - an attribute local name - * @param element - an element to receive the attribute - */ -function element_removeAnAttributeByNamespaceAndLocalName(namespace, localName, element) { - /** - * 1. Let attr be the result of getting an attribute given namespace, localName, and element. - * 2. If attr is non-null, remove it from element. - * 3. Return attr. - */ - var attr = element_getAnAttributeByNamespaceAndLocalName(namespace, localName, element); - if (attr !== null) { - element_remove(attr, element); - } - return attr; -} -exports.element_removeAnAttributeByNamespaceAndLocalName = element_removeAnAttributeByNamespaceAndLocalName; +var interfaces_1 = __nccwpck_require__(27305); +var NodeImpl_1 = __nccwpck_require__(91745); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Creates an element node. - * See: https://dom.spec.whatwg.org/#concept-create-element. - * - * @param document - the document owning the element - * @param localName - local name - * @param namespace - element namespace - * @param prefix - namespace prefix - * @param is - the "is" value - * @param synchronousCustomElementsFlag - synchronous custom elements flag + * Represents an object providing methods which are not dependent on + * any particular document */ -function element_createAnElement(document, localName, namespace, prefix, is, synchronousCustomElementsFlag) { - if (prefix === void 0) { prefix = null; } - if (is === void 0) { is = null; } - if (synchronousCustomElementsFlag === void 0) { synchronousCustomElementsFlag = false; } - /** - * 1. If prefix was not given, let prefix be null. - * 2. If is was not given, let is be null. - * 3. Let result be null. - */ - var result = null; - if (!DOMImpl_1.dom.features.customElements) { - result = CreateAlgorithm_1.create_element(document, localName, namespace, prefix); - result._customElementState = "uncustomized"; - result._customElementDefinition = null; - result._is = is; - return result; - } +var DocumentTypeImpl = /** @class */ (function (_super) { + __extends(DocumentTypeImpl, _super); /** - * 4. Let definition be the result of looking up a custom element definition - * given document, namespace, localName, and is. + * Initializes a new instance of `DocumentType`. + * + * @param name - name of the node + * @param publicId - `PUBLIC` identifier + * @param systemId - `SYSTEM` identifier */ - var definition = CustomElementAlgorithm_1.customElement_lookUpACustomElementDefinition(document, namespace, localName, is); - if (definition !== null && definition.name !== definition.localName) { - /** - * 5. If definition is non-null, and definition’s name is not equal to - * its local name (i.e., definition represents a customized built-in - * element), then: - * 5.1. Let interface be the element interface for localName and the HTML - * namespace. - * 5.2. Set result to a new element that implements interface, with no - * attributes, namespace set to the HTML namespace, namespace prefix - * set to prefix, local name set to localName, custom element state set - * to "undefined", custom element definition set to null, is value set - * to is, and node document set to document. - * 5.3. If the synchronous custom elements flag is set, upgrade element - * using definition. - * 5.4. Otherwise, enqueue a custom element upgrade reaction given result - * and definition. - */ - var elemenInterface = DocumentAlgorithm_1.document_elementInterface(localName, infra_1.namespace.HTML); - result = new elemenInterface(); - result._localName = localName; - result._namespace = infra_1.namespace.HTML; - result._namespacePrefix = prefix; - result._customElementState = "undefined"; - result._customElementDefinition = null; - result._is = is; - result._nodeDocument = document; - if (synchronousCustomElementsFlag) { - CustomElementAlgorithm_1.customElement_upgrade(definition, result); - } - else { - CustomElementAlgorithm_1.customElement_enqueueACustomElementUpgradeReaction(result, definition); - } + function DocumentTypeImpl(name, publicId, systemId) { + var _this = _super.call(this) || this; + _this._name = ''; + _this._publicId = ''; + _this._systemId = ''; + _this._name = name; + _this._publicId = publicId; + _this._systemId = systemId; + return _this; } - else if (definition !== null) { - /** - * 6. Otherwise, if definition is non-null, then: - */ - if (synchronousCustomElementsFlag) { - /** - * 6.1. If the synchronous custom elements flag is set, then run these - * steps while catching any exceptions: - */ - try { - /** - * 6.1.1. Let C be definition’s constructor. - * 6.1.2. Set result to the result of constructing C, with no arguments. - * 6.1.3. Assert: result’s custom element state and custom element definition - * are initialized. - * 6.1.4. Assert: result’s namespace is the HTML namespace. - * _Note:_ IDL enforces that result is an HTMLElement object, which all - * use the HTML namespace. - */ - var C = definition.constructor; - var result_1 = new C(); - console.assert(result_1._customElementState !== undefined); - console.assert(result_1._customElementDefinition !== undefined); - console.assert(result_1._namespace === infra_1.namespace.HTML); - /** - * 6.1.5. If result’s attribute list is not empty, then throw a - * "NotSupportedError" DOMException. - * 6.1.6. If result has children, then throw a "NotSupportedError" - * DOMException. - * 6.1.7. If result’s parent is not null, then throw a - * "NotSupportedError" DOMException. - * 6.1.8. If result’s node document is not document, then throw a - * "NotSupportedError" DOMException. - * 6.1.9. If result’s local name is not equal to localName, then throw - * a "NotSupportedError" DOMException. - */ - if (result_1._attributeList.length !== 0) - throw new DOMException_1.NotSupportedError("Custom element already has attributes."); - if (result_1._children.size !== 0) - throw new DOMException_1.NotSupportedError("Custom element already has child nodes."); - if (result_1._parent !== null) - throw new DOMException_1.NotSupportedError("Custom element already has a parent node."); - if (result_1._nodeDocument !== document) - throw new DOMException_1.NotSupportedError("Custom element is already in a document."); - if (result_1._localName !== localName) - throw new DOMException_1.NotSupportedError("Custom element has a different local name."); - /** - * 6.1.10. Set result’s namespace prefix to prefix. - * 6.1.11. Set result’s is value to null. - */ - result_1._namespacePrefix = prefix; - result_1._is = null; - } - catch (e) { - /** - * If any of these steps threw an exception, then: - * - Report the exception. - * - Set result to a new element that implements the HTMLUnknownElement - * interface, with no attributes, namespace set to the HTML namespace, - * namespace prefix set to prefix, local name set to localName, custom - * element state set to "failed", custom element definition set to null, - * is value set to null, and node document set to document. - */ - // TODO: Report the exception - result = CreateAlgorithm_1.create_htmlUnknownElement(document, localName, infra_1.namespace.HTML, prefix); - result._customElementState = "failed"; - result._customElementDefinition = null; - result._is = null; - } + Object.defineProperty(DocumentTypeImpl.prototype, "name", { + /** @inheritdoc */ + get: function () { return this._name; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentTypeImpl.prototype, "publicId", { + /** @inheritdoc */ + get: function () { return this._publicId; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentTypeImpl.prototype, "systemId", { + /** @inheritdoc */ + get: function () { return this._systemId; }, + enumerable: true, + configurable: true + }); + // MIXIN: ChildNode + /* istanbul ignore next */ + DocumentTypeImpl.prototype.before = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; } - else { - /** - * 6.2. Otherwise: - * 6.2.1. Set result to a new element that implements the HTMLElement - * interface, with no attributes, namespace set to the HTML namespace, - * namespace prefix set to prefix, local name set to localName, custom - * element state set to "undefined", custom element definition set to - * null, is value set to null, and node document set to document. - * 6.2.2. Enqueue a custom element upgrade reaction given result and - * definition. - */ - result = CreateAlgorithm_1.create_htmlElement(document, localName, infra_1.namespace.HTML, prefix); - result._customElementState = "undefined"; - result._customElementDefinition = null; - result._is = null; - CustomElementAlgorithm_1.customElement_enqueueACustomElementUpgradeReaction(result, definition); + throw new Error("Mixin: ChildNode not implemented."); + }; + /* istanbul ignore next */ + DocumentTypeImpl.prototype.after = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; } - } - else { - /** - * 7. Otherwise: - * 7.1. Let interface be the element interface for localName and - * namespace. - * 7.2. Set result to a new element that implements interface, with no - * attributes, namespace set to namespace, namespace prefix set to prefix, - * local name set to localName, custom element state set to - * "uncustomized", custom element definition set to null, is value set to - * is, and node document set to document. - */ - var elementInterface = DocumentAlgorithm_1.document_elementInterface(localName, namespace); - result = new elementInterface(); - result._localName = localName; - result._namespace = namespace; - result._namespacePrefix = prefix; - result._customElementState = "uncustomized"; - result._customElementDefinition = null; - result._is = is; - result._nodeDocument = document; - /** - * 7.3. If namespace is the HTML namespace, and either localName is a - * valid custom element name or is is non-null, then set result’s - * custom element state to "undefined". - */ - if (namespace === infra_1.namespace.HTML && (is !== null || - CustomElementAlgorithm_1.customElement_isValidCustomElementName(localName))) { - result._customElementState = "undefined"; + throw new Error("Mixin: ChildNode not implemented."); + }; + /* istanbul ignore next */ + DocumentTypeImpl.prototype.replaceWith = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; } - } + throw new Error("Mixin: ChildNode not implemented."); + }; /* istanbul ignore next */ - if (result === null) { - throw new Error("Unable to create element."); - } + DocumentTypeImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); }; /** - * 8. Returns result + * Creates a new `DocumentType`. + * + * @param document - owner document + * @param name - name of the node + * @param publicId - `PUBLIC` identifier + * @param systemId - `SYSTEM` identifier */ - return result; -} -exports.element_createAnElement = element_createAnElement; + DocumentTypeImpl._create = function (document, name, publicId, systemId) { + if (publicId === void 0) { publicId = ''; } + if (systemId === void 0) { systemId = ''; } + var node = new DocumentTypeImpl(name, publicId, systemId); + node._nodeDocument = document; + return node; + }; + return DocumentTypeImpl; +}(NodeImpl_1.NodeImpl)); +exports.DocumentTypeImpl = DocumentTypeImpl; /** - * Inserts a new node adjacent to this element. - * - * @param element - a reference element - * @param where - a string defining where to insert the element node. - * - `beforebegin` before this element itself. - * - `afterbegin` before the first child. - * - `beforeend` after the last child. - * - `afterend` after this element itself. - * @param node - node to insert + * Initialize prototype properties */ -function element_insertAdjacent(element, where, node) { - /** - * - "beforebegin" - * If element’s parent is null, return null. - * Return the result of pre-inserting node into element’s parent before - * element. - * - "afterbegin" - * Return the result of pre-inserting node into element before element’s - * first child. - * - "beforeend" - * Return the result of pre-inserting node into element before null. - * - "afterend" - * If element’s parent is null, return null. - * Return the result of pre-inserting node into element’s parent before element’s next sibling. - * - Otherwise - * Throw a "SyntaxError" DOMException. - */ - switch (where.toLowerCase()) { - case 'beforebegin': - if (element._parent === null) - return null; - return MutationAlgorithm_1.mutation_preInsert(node, element._parent, element); - case 'afterbegin': - return MutationAlgorithm_1.mutation_preInsert(node, element, element._firstChild); - case 'beforeend': - return MutationAlgorithm_1.mutation_preInsert(node, element, null); - case 'afterend': - if (element._parent === null) - return null; - return MutationAlgorithm_1.mutation_preInsert(node, element._parent, element._nextSibling); - default: - throw new DOMException_1.SyntaxError("Invalid 'where' argument. \"beforebegin\", \"afterbegin\", \"beforeend\" or \"afterend\" expected"); - } -} -exports.element_insertAdjacent = element_insertAdjacent; -//# sourceMappingURL=ElementAlgorithm.js.map +WebIDLAlgorithm_1.idl_defineConst(DocumentTypeImpl.prototype, "_nodeType", interfaces_1.NodeType.DocumentType); +//# sourceMappingURL=DocumentTypeImpl.js.map /***/ }), -/***/ 28217: +/***/ 35975: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); @@ -44809,977 +28047,1307 @@ var __read = (this && this.__read) || function (o, n) { } return ar; }; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); var interfaces_1 = __nccwpck_require__(27305); -var util_1 = __nccwpck_require__(65282); -var CustomEventImpl_1 = __nccwpck_require__(59857); -var EventImpl_1 = __nccwpck_require__(38245); +var NodeImpl_1 = __nccwpck_require__(91745); var DOMException_1 = __nccwpck_require__(13166); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var ShadowTreeAlgorithm_1 = __nccwpck_require__(68733); -var DOMAlgorithm_1 = __nccwpck_require__(9628); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Sets the canceled flag of an event. - * - * @param event - an event + * Represents an element node. */ -function event_setTheCanceledFlag(event) { - if (event._cancelable && !event._inPassiveListenerFlag) { - event._canceledFlag = true; +var ElementImpl = /** @class */ (function (_super) { + __extends(ElementImpl, _super); + /** + * Initializes a new instance of `Element`. + */ + function ElementImpl() { + var _this = _super.call(this) || this; + _this._children = new Set(); + _this._namespace = null; + _this._namespacePrefix = null; + _this._localName = ""; + _this._customElementState = "undefined"; + _this._customElementDefinition = null; + _this._is = null; + _this._shadowRoot = null; + _this._attributeList = algorithm_1.create_namedNodeMap(_this); + _this._attributeChangeSteps = []; + _this._name = ''; + _this._assignedSlot = null; + return _this; } -} -exports.event_setTheCanceledFlag = event_setTheCanceledFlag; -/** - * Initializes the value of an event. - * - * @param event - an event to initialize - * @param type - the type of event - * @param bubbles - whether the event propagates in reverse - * @param cancelable - whether the event can be cancelled - */ -function event_initialize(event, type, bubbles, cancelable) { - event._initializedFlag = true; - event._stopPropagationFlag = false; - event._stopImmediatePropagationFlag = false; - event._canceledFlag = false; - event._isTrusted = false; - event._target = null; - event._type = type; - event._bubbles = bubbles; - event._cancelable = cancelable; -} -exports.event_initialize = event_initialize; -/** - * Creates a new event. - * - * @param eventInterface - event interface - * @param realm - realm - */ -function event_createAnEvent(eventInterface, realm) { - if (realm === void 0) { realm = undefined; } + Object.defineProperty(ElementImpl.prototype, "namespaceURI", { + /** @inheritdoc */ + get: function () { return this._namespace; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "prefix", { + /** @inheritdoc */ + get: function () { return this._namespacePrefix; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "localName", { + /** @inheritdoc */ + get: function () { return this._localName; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "tagName", { + /** @inheritdoc */ + get: function () { return this._htmlUppercasedQualifiedName; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "id", { + /** @inheritdoc */ + get: function () { + return algorithm_1.element_getAnAttributeValue(this, "id"); + }, + set: function (value) { + algorithm_1.element_setAnAttributeValue(this, "id", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "className", { + /** @inheritdoc */ + get: function () { + return algorithm_1.element_getAnAttributeValue(this, "class"); + }, + set: function (value) { + algorithm_1.element_setAnAttributeValue(this, "class", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "classList", { + /** @inheritdoc */ + get: function () { + var attr = algorithm_1.element_getAnAttributeByName("class", this); + if (attr === null) { + attr = algorithm_1.create_attr(this._nodeDocument, "class"); + } + return algorithm_1.create_domTokenList(this, attr); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "slot", { + /** @inheritdoc */ + get: function () { + return algorithm_1.element_getAnAttributeValue(this, "slot"); + }, + set: function (value) { + algorithm_1.element_setAnAttributeValue(this, "slot", value); + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + ElementImpl.prototype.hasAttributes = function () { + return this._attributeList.length !== 0; + }; + Object.defineProperty(ElementImpl.prototype, "attributes", { + /** @inheritdoc */ + get: function () { return this._attributeList; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + ElementImpl.prototype.getAttributeNames = function () { + var e_1, _a; + /** + * The getAttributeNames() method, when invoked, must return the qualified + * names of the attributes in context object’s attribute list, in order, + * and a new list otherwise. + */ + var names = []; + try { + for (var _b = __values(this._attributeList), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + names.push(attr._qualifiedName); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return names; + }; + /** @inheritdoc */ + ElementImpl.prototype.getAttribute = function (qualifiedName) { + /** + * 1. Let attr be the result of getting an attribute given qualifiedName + * and the context object. + * 2. If attr is null, return null. + * 3. Return attr’s value. + */ + var attr = algorithm_1.element_getAnAttributeByName(qualifiedName, this); + return (attr ? attr._value : null); + }; + /** @inheritdoc */ + ElementImpl.prototype.getAttributeNS = function (namespace, localName) { + /** + * 1. Let attr be the result of getting an attribute given namespace, + * localName, and the context object. + * 2. If attr is null, return null. + * 3. Return attr’s value. + */ + var attr = algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace, localName, this); + return (attr ? attr._value : null); + }; + /** @inheritdoc */ + ElementImpl.prototype.setAttribute = function (qualifiedName, value) { + /** + * 1. If qualifiedName does not match the Name production in XML, then + * throw an "InvalidCharacterError" DOMException. + */ + if (!algorithm_1.xml_isName(qualifiedName)) + throw new DOMException_1.InvalidCharacterError(); + /** + * 2. If the context object is in the HTML namespace and its node document + * is an HTML document, then set qualifiedName to qualifiedName in ASCII + * lowercase. + */ + if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { + qualifiedName = qualifiedName.toLowerCase(); + } + /** + * 3. Let attribute be the first attribute in context object’s attribute + * list whose qualified name is qualifiedName, and null otherwise. + */ + var attribute = null; + for (var i = 0; i < this._attributeList.length; i++) { + var attr = this._attributeList[i]; + if (attr._qualifiedName === qualifiedName) { + attribute = attr; + break; + } + } + /** + * 4. If attribute is null, create an attribute whose local name is + * qualifiedName, value is value, and node document is context object’s + * node document, then append this attribute to context object, and + * then return. + */ + if (attribute === null) { + attribute = algorithm_1.create_attr(this._nodeDocument, qualifiedName); + attribute._value = value; + algorithm_1.element_append(attribute, this); + return; + } + /** + * 5. Change attribute from context object to value. + */ + algorithm_1.element_change(attribute, this, value); + }; + /** @inheritdoc */ + ElementImpl.prototype.setAttributeNS = function (namespace, qualifiedName, value) { + /** + * 1. Let namespace, prefix, and localName be the result of passing + * namespace and qualifiedName to validate and extract. + * 2. Set an attribute value for the context object using localName, value, + * and also prefix and namespace. + */ + var _a = __read(algorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2]; + algorithm_1.element_setAnAttributeValue(this, localName, value, prefix, ns); + }; + /** @inheritdoc */ + ElementImpl.prototype.removeAttribute = function (qualifiedName) { + /** + * The removeAttribute(qualifiedName) method, when invoked, must remove an + * attribute given qualifiedName and the context object, and then return + * undefined. + */ + algorithm_1.element_removeAnAttributeByName(qualifiedName, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.removeAttributeNS = function (namespace, localName) { + /** + * The removeAttributeNS(namespace, localName) method, when invoked, must + * remove an attribute given namespace, localName, and context object, and + * then return undefined. + */ + algorithm_1.element_removeAnAttributeByNamespaceAndLocalName(namespace, localName, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.hasAttribute = function (qualifiedName) { + /** + * 1. If the context object is in the HTML namespace and its node document + * is an HTML document, then set qualifiedName to qualifiedName in ASCII + * lowercase. + * 2. Return true if the context object has an attribute whose qualified + * name is qualifiedName, and false otherwise. + */ + if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { + qualifiedName = qualifiedName.toLowerCase(); + } + for (var i = 0; i < this._attributeList.length; i++) { + var attr = this._attributeList[i]; + if (attr._qualifiedName === qualifiedName) { + return true; + } + } + return false; + }; + /** @inheritdoc */ + ElementImpl.prototype.toggleAttribute = function (qualifiedName, force) { + /** + * 1. If qualifiedName does not match the Name production in XML, then + * throw an "InvalidCharacterError" DOMException. + */ + if (!algorithm_1.xml_isName(qualifiedName)) + throw new DOMException_1.InvalidCharacterError(); + /** + * 2. If the context object is in the HTML namespace and its node document + * is an HTML document, then set qualifiedName to qualifiedName in ASCII + * lowercase. + */ + if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { + qualifiedName = qualifiedName.toLowerCase(); + } + /** + * 3. Let attribute be the first attribute in the context object’s attribute + * list whose qualified name is qualifiedName, and null otherwise. + */ + var attribute = null; + for (var i = 0; i < this._attributeList.length; i++) { + var attr = this._attributeList[i]; + if (attr._qualifiedName === qualifiedName) { + attribute = attr; + break; + } + } + if (attribute === null) { + /** + * 4. If attribute is null, then: + * 4.1. If force is not given or is true, create an attribute whose local + * name is qualifiedName, value is the empty string, and node document is + * the context object’s node document, then append this attribute to the + * context object, and then return true. + * 4.2. Return false. + */ + if (force === undefined || force === true) { + attribute = algorithm_1.create_attr(this._nodeDocument, qualifiedName); + attribute._value = ''; + algorithm_1.element_append(attribute, this); + return true; + } + return false; + } + else if (force === undefined || force === false) { + /** + * 5. Otherwise, if force is not given or is false, remove an attribute + * given qualifiedName and the context object, and then return false. + */ + algorithm_1.element_removeAnAttributeByName(qualifiedName, this); + return false; + } + /** + * 6. Return true. + */ + return true; + }; + /** @inheritdoc */ + ElementImpl.prototype.hasAttributeNS = function (namespace, localName) { + /** + * 1. If namespace is the empty string, set it to null. + * 2. Return true if the context object has an attribute whose namespace is + * namespace and local name is localName, and false otherwise. + */ + var ns = namespace || null; + for (var i = 0; i < this._attributeList.length; i++) { + var attr = this._attributeList[i]; + if (attr._namespace === ns && attr._localName === localName) { + return true; + } + } + return false; + }; + /** @inheritdoc */ + ElementImpl.prototype.getAttributeNode = function (qualifiedName) { + /** + * The getAttributeNode(qualifiedName) method, when invoked, must return the + * result of getting an attribute given qualifiedName and context object. + */ + return algorithm_1.element_getAnAttributeByName(qualifiedName, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.getAttributeNodeNS = function (namespace, localName) { + /** + * The getAttributeNodeNS(namespace, localName) method, when invoked, must + * return the result of getting an attribute given namespace, localName, and + * the context object. + */ + return algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace, localName, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.setAttributeNode = function (attr) { + /** + * The setAttributeNode(attr) and setAttributeNodeNS(attr) methods, when + * invoked, must return the result of setting an attribute given attr and + * the context object. + */ + return algorithm_1.element_setAnAttribute(attr, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.setAttributeNodeNS = function (attr) { + return algorithm_1.element_setAnAttribute(attr, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.removeAttributeNode = function (attr) { + /** + * 1. If context object’s attribute list does not contain attr, then throw + * a "NotFoundError" DOMException. + * 2. Remove attr from context object. + * 3. Return attr. + */ + var found = false; + for (var i = 0; i < this._attributeList.length; i++) { + var attribute = this._attributeList[i]; + if (attribute === attr) { + found = true; + break; + } + } + if (!found) + throw new DOMException_1.NotFoundError(); + algorithm_1.element_remove(attr, this); + return attr; + }; + /** @inheritdoc */ + ElementImpl.prototype.attachShadow = function (init) { + /** + * 1. If context object’s namespace is not the HTML namespace, then throw a + * "NotSupportedError" DOMException. + */ + if (this._namespace !== infra_1.namespace.HTML) + throw new DOMException_1.NotSupportedError(); + /** + * 2. If context object’s local name is not a valid custom element name, + * "article", "aside", "blockquote", "body", "div", "footer", "h1", "h2", + * "h3", "h4", "h5", "h6", "header", "main" "nav", "p", "section", + * or "span", then throw a "NotSupportedError" DOMException. + */ + if (!algorithm_1.customElement_isValidCustomElementName(this._localName) && + !algorithm_1.customElement_isValidShadowHostName(this._localName)) + throw new DOMException_1.NotSupportedError(); + /** + * 3. If context object’s local name is a valid custom element name, + * or context object’s is value is not null, then: + * 3.1. Let definition be the result of looking up a custom element + * definition given context object’s node document, its namespace, its + * local name, and its is value. + * 3.2. If definition is not null and definition’s disable shadow is true, + * then throw a "NotSupportedError" DOMException. + */ + if (algorithm_1.customElement_isValidCustomElementName(this._localName) || this._is !== null) { + var definition = algorithm_1.customElement_lookUpACustomElementDefinition(this._nodeDocument, this._namespace, this._localName, this._is); + if (definition !== null && definition.disableShadow === true) { + throw new DOMException_1.NotSupportedError(); + } + } + /** + * 4. If context object is a shadow host, then throw an "NotSupportedError" + * DOMException. + */ + if (this._shadowRoot !== null) + throw new DOMException_1.NotSupportedError(); + /** + * 5. Let shadow be a new shadow root whose node document is context + * object’s node document, host is context object, and mode is init’s mode. + * 6. Set context object’s shadow root to shadow. + * 7. Return shadow. + */ + var shadow = algorithm_1.create_shadowRoot(this._nodeDocument, this); + shadow._mode = init.mode; + this._shadowRoot = shadow; + return shadow; + }; + Object.defineProperty(ElementImpl.prototype, "shadowRoot", { + /** @inheritdoc */ + get: function () { + /** + * 1. Let shadow be context object’s shadow root. + * 2. If shadow is null or its mode is "closed", then return null. + * 3. Return shadow. + */ + var shadow = this._shadowRoot; + if (shadow === null || shadow.mode === "closed") + return null; + else + return shadow; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + ElementImpl.prototype.closest = function (selectors) { + /** + * TODO: Selectors + * 1. Let s be the result of parse a selector from selectors. [SELECTORS4] + * 2. If s is failure, throw a "SyntaxError" DOMException. + * 3. Let elements be context object’s inclusive ancestors that are + * elements, in reverse tree order. + * 4. For each element in elements, if match a selector against an element, + * using s, element, and :scope element context object, returns success, + * return element. [SELECTORS4] + * 5. Return null. + */ + throw new DOMException_1.NotImplementedError(); + }; + /** @inheritdoc */ + ElementImpl.prototype.matches = function (selectors) { + /** + * TODO: Selectors + * 1. Let s be the result of parse a selector from selectors. [SELECTORS4] + * 2. If s is failure, throw a "SyntaxError" DOMException. + * 3. Return true if the result of match a selector against an element, + * using s, element, and :scope element context object, returns success, + * and false otherwise. [SELECTORS4] + */ + throw new DOMException_1.NotImplementedError(); + }; + /** @inheritdoc */ + ElementImpl.prototype.webkitMatchesSelector = function (selectors) { + return this.matches(selectors); + }; + /** @inheritdoc */ + ElementImpl.prototype.getElementsByTagName = function (qualifiedName) { + /** + * The getElementsByTagName(qualifiedName) method, when invoked, must return + * the list of elements with qualified name qualifiedName for context + * object. + */ + return algorithm_1.node_listOfElementsWithQualifiedName(qualifiedName, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.getElementsByTagNameNS = function (namespace, localName) { + /** + * The getElementsByTagNameNS(namespace, localName) method, when invoked, + * must return the list of elements with namespace namespace and local name + * localName for context object. + */ + return algorithm_1.node_listOfElementsWithNamespace(namespace, localName, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.getElementsByClassName = function (classNames) { + /** + * The getElementsByClassName(classNames) method, when invoked, must return + * the list of elements with class names classNames for context object. + */ + return algorithm_1.node_listOfElementsWithClassNames(classNames, this); + }; + /** @inheritdoc */ + ElementImpl.prototype.insertAdjacentElement = function (where, element) { + /** + * The insertAdjacentElement(where, element) method, when invoked, must + * return the result of running insert adjacent, given context object, + * where, and element. + */ + return algorithm_1.element_insertAdjacent(this, where, element); + }; + /** @inheritdoc */ + ElementImpl.prototype.insertAdjacentText = function (where, data) { + /** + * 1. Let text be a new Text node whose data is data and node document is + * context object’s node document. + * 2. Run insert adjacent, given context object, where, and text. + */ + var text = algorithm_1.create_text(this._nodeDocument, data); + algorithm_1.element_insertAdjacent(this, where, text); + }; + Object.defineProperty(ElementImpl.prototype, "_qualifiedName", { + /** + * Returns the qualified name. + */ + get: function () { + /** + * An element’s qualified name is its local name if its namespace prefix is + * null, and its namespace prefix, followed by ":", followed by its + * local name, otherwise. + */ + return (this._namespacePrefix ? + this._namespacePrefix + ':' + this._localName : + this._localName); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "_htmlUppercasedQualifiedName", { + /** + * Returns the upper-cased qualified name for a html element. + */ + get: function () { + /** + * 1. Let qualifiedName be context object’s qualified name. + * 2. If the context object is in the HTML namespace and its node document + * is an HTML document, then set qualifiedName to qualifiedName in ASCII + * uppercase. + * 3. Return qualifiedName. + */ + var qualifiedName = this._qualifiedName; + if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { + qualifiedName = qualifiedName.toUpperCase(); + } + return qualifiedName; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "children", { + // MIXIN: ParentNode + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "firstElementChild", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "lastElementChild", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "childElementCount", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: ParentNode not implemented."); }, + enumerable: true, + configurable: true + }); + /* istanbul ignore next */ + ElementImpl.prototype.prepend = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ParentNode not implemented."); + }; + /* istanbul ignore next */ + ElementImpl.prototype.append = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ParentNode not implemented."); + }; + /* istanbul ignore next */ + ElementImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; + /* istanbul ignore next */ + ElementImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; + Object.defineProperty(ElementImpl.prototype, "previousElementSibling", { + // MIXIN: NonDocumentTypeChildNode + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ElementImpl.prototype, "nextElementSibling", { + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); }, + enumerable: true, + configurable: true + }); + // MIXIN: ChildNode + /* istanbul ignore next */ + ElementImpl.prototype.before = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ChildNode not implemented."); + }; + /* istanbul ignore next */ + ElementImpl.prototype.after = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ChildNode not implemented."); + }; + /* istanbul ignore next */ + ElementImpl.prototype.replaceWith = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + throw new Error("Mixin: ChildNode not implemented."); + }; + /* istanbul ignore next */ + ElementImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); }; + Object.defineProperty(ElementImpl.prototype, "assignedSlot", { + // MIXIN: Slotable + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: Slotable not implemented."); }, + enumerable: true, + configurable: true + }); /** - * 1. If realm is not given, then set it to null. - * 2. Let dictionary be the result of converting the JavaScript value - * undefined to the dictionary type accepted by eventInterface’s - * constructor. (This dictionary type will either be EventInit or a - * dictionary that inherits from it.) - * 3. Let event be the result of running the inner event creation steps with - * eventInterface, realm, the time of the occurrence that the event is - * signaling, and dictionary. - * 4. Initialize event’s isTrusted attribute to true. - * 5. Return event. + * Creates a new `Element`. + * + * @param document - owner document + * @param localName - local name + * @param namespace - namespace + * @param prefix - namespace prefix */ - if (realm === undefined) - realm = null; - var dictionary = {}; - var event = event_innerEventCreationSteps(eventInterface, realm, new Date(), dictionary); - event._isTrusted = true; - return event; -} -exports.event_createAnEvent = event_createAnEvent; + ElementImpl._create = function (document, localName, namespace, namespacePrefix) { + if (namespace === void 0) { namespace = null; } + if (namespacePrefix === void 0) { namespacePrefix = null; } + var node = new ElementImpl(); + node._localName = localName; + node._namespace = namespace; + node._namespacePrefix = namespacePrefix; + node._nodeDocument = document; + return node; + }; + return ElementImpl; +}(NodeImpl_1.NodeImpl)); +exports.ElementImpl = ElementImpl; /** - * Performs event creation steps. - * - * @param eventInterface - event interface - * @param realm - realm - * @param time - time of occurrance - * @param dictionary - event attributes - * + * Initialize prototype properties */ -function event_innerEventCreationSteps(eventInterface, realm, time, dictionary) { - /** - * 1. Let event be the result of creating a new object using eventInterface. - * TODO: Implement realms - * If realm is non-null, then use that Realm; otherwise, use the default - * behavior defined in Web IDL. - */ - var event = new eventInterface(""); - /** - * 2. Set event’s initialized flag. - * 3. Initialize event’s timeStamp attribute to a DOMHighResTimeStamp - * representing the high resolution time from the time origin to time. - * 4. For each member → value in dictionary, if event has an attribute - * whose identifier is member, then initialize that attribute to value. - * 5. Run the event constructing steps with event. - * 6. Return event. - */ - event._initializedFlag = true; - event._timeStamp = time.getTime(); - Object.assign(event, dictionary); - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runEventConstructingSteps(event); - } - return event; -} -exports.event_innerEventCreationSteps = event_innerEventCreationSteps; +WebIDLAlgorithm_1.idl_defineConst(ElementImpl.prototype, "_nodeType", interfaces_1.NodeType.Element); +//# sourceMappingURL=ElementImpl.js.map + +/***/ }), + +/***/ 38245: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var algorithm_1 = __nccwpck_require__(61); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Dispatches an event to an event target. - * - * @param event - the event to dispatch - * @param target - event target - * @param legacyTargetOverrideFlag - legacy target override flag - * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns - * whether the event listener's callback threw an exception + * Represents a DOM event. */ -function event_dispatch(event, target, legacyTargetOverrideFlag, legacyOutputDidListenersThrowFlag) { - var e_1, _a, e_2, _b; - if (legacyTargetOverrideFlag === void 0) { legacyTargetOverrideFlag = false; } - if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; } - var clearTargets = false; - /** - * 1. Set event's dispatch flag. - */ - event._dispatchFlag = true; +var EventImpl = /** @class */ (function () { /** - * 2. Let targetOverride be target, if legacy target override flag is not - * given, and target's associated Document otherwise. - * - * _Note:_ legacy target override flag is only used by HTML and only when - * target is a Window object. + * Initializes a new instance of `Event`. */ - var targetOverride = target; - if (legacyTargetOverrideFlag) { - var doc = target._associatedDocument; - if (util_1.Guard.isDocumentNode(doc)) { - targetOverride = doc; - } - } - /** - * 3. Let activationTarget be null. - * 4. Let relatedTarget be the result of retargeting event's relatedTarget - * against target. - * 5. If target is not relatedTarget or target is event's relatedTarget, - * then: - */ - var activationTarget = null; - var relatedTarget = TreeAlgorithm_1.tree_retarget(event._relatedTarget, target); - if (target !== relatedTarget || target === event._relatedTarget) { + function EventImpl(type, eventInit) { + this._target = null; + this._relatedTarget = null; + this._touchTargetList = []; + this._path = []; + this._currentTarget = null; + this._eventPhase = interfaces_1.EventPhase.None; + this._stopPropagationFlag = false; + this._stopImmediatePropagationFlag = false; + this._canceledFlag = false; + this._inPassiveListenerFlag = false; + this._composedFlag = false; + this._initializedFlag = false; + this._dispatchFlag = false; + this._isTrusted = false; + this._bubbles = false; + this._cancelable = false; /** - * 5.1. Let touchTargets be a new list. - * 5.2. For each touchTarget of event's touch target list, append the - * result of retargeting touchTarget against target to touchTargets. - * 5.3. Append to an event path with event, target, targetOverride, - * relatedTarget, touchTargets, and false. - * 5.4. Let isActivationEvent be true, if event is a MouseEvent object - * and event's type attribute is "click", and false otherwise. - * 5.5. If isActivationEvent is true and target has activation behavior, - * then set activationTarget to target. - * 5.6. Let slotable be target, if target is a slotable and is assigned, - * and null otherwise. - * 5.7. Let slot-in-closed-tree be false. - * 5.8. Let parent be the result of invoking target's get the parent with - * event. + * When a constructor of the Event interface, or of an interface that + * inherits from the Event interface, is invoked, these steps must be run, + * given the arguments type and eventInitDict: + * 1. Let event be the result of running the inner event creation steps with + * this interface, null, now, and eventInitDict. + * 2. Initialize event’s type attribute to type. + * 3. Return event. */ - var touchTargets = []; - try { - for (var _c = __values(event._touchTargetList), _d = _c.next(); !_d.done; _d = _c.next()) { - var touchTarget = _d.value; - touchTargets.push(TreeAlgorithm_1.tree_retarget(touchTarget, target)); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); - } - finally { if (e_1) throw e_1.error; } + this._type = type; + if (eventInit) { + this._bubbles = eventInit.bubbles || false; + this._cancelable = eventInit.cancelable || false; + this._composedFlag = eventInit.composed || false; } - event_appendToAnEventPath(event, target, targetOverride, relatedTarget, touchTargets, false); - var isActivationEvent = (util_1.Guard.isMouseEvent(event) && event._type === "click"); - if (isActivationEvent && target._activationBehavior !== undefined) { - activationTarget = target; + this._initializedFlag = true; + this._timeStamp = new Date().getTime(); + } + Object.defineProperty(EventImpl.prototype, "type", { + /** @inheritdoc */ + get: function () { return this._type; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "target", { + /** @inheritdoc */ + get: function () { return this._target; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "srcElement", { + /** @inheritdoc */ + get: function () { return this._target; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "currentTarget", { + /** @inheritdoc */ + get: function () { return this._currentTarget; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + EventImpl.prototype.composedPath = function () { + /** + * 1. Let composedPath be an empty list. + * 2. Let path be the context object’s path. + * 3. If path is empty, then return composedPath. + * 4. Let currentTarget be the context object’s currentTarget attribute + * value. + * 5. Append currentTarget to composedPath. + * 6. Let currentTargetIndex be 0. + * 7. Let currentTargetHiddenSubtreeLevel be 0. + */ + var composedPath = []; + var path = this._path; + if (path.length === 0) + return composedPath; + var currentTarget = this._currentTarget; + if (currentTarget === null) { + throw new Error("Event currentTarget is null."); } - var slotable = (util_1.Guard.isSlotable(target) && ShadowTreeAlgorithm_1.shadowTree_isAssigned(target)) ? - target : null; - var slotInClosedTree = false; - var parent = target._getTheParent(event); + composedPath.push(currentTarget); + var currentTargetIndex = 0; + var currentTargetHiddenSubtreeLevel = 0; /** - * 5.9. While parent is non-null: + * 8. Let index be path’s size − 1. + * 9. While index is greater than or equal to 0: */ - while (parent !== null && util_1.Guard.isNode(parent)) { - /** - * 5.9.1 If slotable is non-null: - * 5.9.1.1. Assert: parent is a slot. - * 5.9.1.2. Set slotable to null. - * 5.9.1.3. If parent's root is a shadow root whose mode is "closed", - * then set slot-in-closed-tree to true. - */ - if (slotable !== null) { - if (!util_1.Guard.isSlot(parent)) { - throw new Error("Parent node of a slotable should be a slot."); - } - slotable = null; - var root = TreeAlgorithm_1.tree_rootNode(parent, true); - if (util_1.Guard.isShadowRoot(root) && root._mode === "closed") { - slotInClosedTree = true; - } - } + var index = path.length - 1; + while (index >= 0) { /** - * 5.9.2 If parent is a slotable and is assigned, then set slotable to - * parent. - * 5.9.3. Let relatedTarget be the result of retargeting event's - * relatedTarget against parent. - * 5.9.4. Let touchTargets be a new list. - * 5.9.4. For each touchTarget of event's touch target list, append the - * result of retargeting touchTarget against parent to touchTargets. + * 9.1. If path[index]'s root-of-closed-tree is true, then increase + * currentTargetHiddenSubtreeLevel by 1. + * 9.2. If path[index]'s invocation target is currentTarget, then set + * currentTargetIndex to index and break. + * 9.3. If path[index]'s slot-in-closed-tree is true, then decrease + * currentTargetHiddenSubtreeLevel by 1. + * 9.4. Decrease index by 1. */ - if (util_1.Guard.isSlotable(parent) && ShadowTreeAlgorithm_1.shadowTree_isAssigned(parent)) { - slotable = parent; + if (path[index].rootOfClosedTree) { + currentTargetHiddenSubtreeLevel++; } - relatedTarget = TreeAlgorithm_1.tree_retarget(event._relatedTarget, parent); - touchTargets = []; - try { - for (var _e = (e_2 = void 0, __values(event._touchTargetList)), _f = _e.next(); !_f.done; _f = _e.next()) { - var touchTarget = _f.value; - touchTargets.push(TreeAlgorithm_1.tree_retarget(touchTarget, parent)); - } + if (path[index].invocationTarget === currentTarget) { + currentTargetIndex = index; + break; } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_f && !_f.done && (_b = _e.return)) _b.call(_e); - } - finally { if (e_2) throw e_2.error; } + if (path[index].slotInClosedTree) { + currentTargetHiddenSubtreeLevel--; } + index--; + } + /** + * 10. Let currentHiddenLevel and maxHiddenLevel be + * currentTargetHiddenSubtreeLevel. + */ + var currentHiddenLevel = currentTargetHiddenSubtreeLevel; + var maxHiddenLevel = currentTargetHiddenSubtreeLevel; + /** + * 11. Set index to currentTargetIndex − 1. + * 12. While index is greater than or equal to 0: + */ + index = currentTargetIndex - 1; + while (index >= 0) { /** - * 5.9.6. If parent is a Window object, or parent is a node and target's - * root is a shadow-including inclusive ancestor of parent, then: + * 12.1. If path[index]'s root-of-closed-tree is true, then increase + * currentHiddenLevel by 1. + * 12.2. If currentHiddenLevel is less than or equal to maxHiddenLevel, + * then prepend path[index]'s invocation target to composedPath. */ - if (util_1.Guard.isWindow(parent) || (util_1.Guard.isNode(parent) && util_1.Guard.isNode(target) && - TreeAlgorithm_1.tree_isAncestorOf(TreeAlgorithm_1.tree_rootNode(target, true), parent, true, true))) { - /** - * 5.9.6.1. If isActivationEvent is true, event's bubbles attribute - * is true, activationTarget is null, and parent has activation - * behavior, then set activationTarget to parent. - * 5.9.6.2. Append to an event path with event, parent, null, - * relatedTarget, touchTargets, and slot-in-closed-tree. - */ - if (isActivationEvent && event._bubbles && activationTarget === null && - parent._activationBehavior) { - activationTarget = parent; - } - event_appendToAnEventPath(event, parent, null, relatedTarget, touchTargets, slotInClosedTree); + if (path[index].rootOfClosedTree) { + currentHiddenLevel++; } - else if (parent === relatedTarget) { - /** - * 5.9.7. Otherwise, if parent is relatedTarget, - * then set parent to null. - */ - parent = null; + if (currentHiddenLevel <= maxHiddenLevel) { + composedPath.unshift(path[index].invocationTarget); } - else { + /** + * 12.3. If path[index]'s slot-in-closed-tree is true, then: + */ + if (path[index].slotInClosedTree) { /** - * 5.9.8. Otherwise, set target to parent and then: - * 5.9.8.1. If isActivationEvent is true, activationTarget is null, - * and target has activation behavior, then set activationTarget - * to target. - * 5.9.8.2. Append to an event path with event, parent, target, - * relatedTarget, touchTargets, and slot-in-closed-tree. + * 12.3.1. Decrease currentHiddenLevel by 1. + * 12.3.2. If currentHiddenLevel is less than maxHiddenLevel, then set + * maxHiddenLevel to currentHiddenLevel. */ - target = parent; - if (isActivationEvent && activationTarget === null && - target._activationBehavior) { - activationTarget = target; + currentHiddenLevel--; + if (currentHiddenLevel < maxHiddenLevel) { + maxHiddenLevel = currentHiddenLevel; } - event_appendToAnEventPath(event, parent, target, relatedTarget, touchTargets, slotInClosedTree); } /** - * 5.9.9. If parent is non-null, then set parent to the result of - * invoking parent's get the parent with event. - * 5.9.10. Set slot-in-closed-tree to false. + * 12.4. Decrease index by 1. */ - if (parent !== null) { - parent = parent._getTheParent(event); - } - slotInClosedTree = false; + index--; } /** - * 5.10. Let clearTargetsStruct be the last struct in event's path whose - * shadow-adjusted target is non-null. + * 13. Set currentHiddenLevel and maxHiddenLevel to + * currentTargetHiddenSubtreeLevel. */ - var clearTargetsStruct = null; - var path = event._path; - for (var i = path.length - 1; i >= 0; i--) { - var struct = path[i]; - if (struct.shadowAdjustedTarget !== null) { - clearTargetsStruct = struct; - break; - } - } + currentHiddenLevel = currentTargetHiddenSubtreeLevel; + maxHiddenLevel = currentTargetHiddenSubtreeLevel; /** - * 5.11. Let clearTargets be true if clearTargetsStruct's shadow-adjusted - * target, clearTargetsStruct's relatedTarget, or an EventTarget object - * in clearTargetsStruct's touch target list is a node and its root is - * a shadow root, and false otherwise. + * 14. Set index to currentTargetIndex + 1. + * 15. While index is less than path’s size: */ - if (clearTargetsStruct !== null) { - if (util_1.Guard.isNode(clearTargetsStruct.shadowAdjustedTarget) && - util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(clearTargetsStruct.shadowAdjustedTarget, true))) { - clearTargets = true; + index = currentTargetIndex + 1; + while (index < path.length) { + /** + * 15.1. If path[index]'s slot-in-closed-tree is true, then increase + * currentHiddenLevel by 1. + * 15.2. If currentHiddenLevel is less than or equal to maxHiddenLevel, + * then append path[index]'s invocation target to composedPath. + */ + if (path[index].slotInClosedTree) { + currentHiddenLevel++; } - else if (util_1.Guard.isNode(clearTargetsStruct.relatedTarget) && - util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(clearTargetsStruct.relatedTarget, true))) { - clearTargets = true; + if (currentHiddenLevel <= maxHiddenLevel) { + composedPath.push(path[index].invocationTarget); } - else { - for (var j = 0; j < clearTargetsStruct.touchTargetList.length; j++) { - var struct = clearTargetsStruct.touchTargetList[j]; - if (util_1.Guard.isNode(struct) && - util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(struct, true))) { - clearTargets = true; - break; - } + /** + * 15.3. If path[index]'s root-of-closed-tree is true, then: + */ + if (path[index].rootOfClosedTree) { + /** + * 15.3.1. Decrease currentHiddenLevel by 1. + * 15.3.2. If currentHiddenLevel is less than maxHiddenLevel, then set + * maxHiddenLevel to currentHiddenLevel. + */ + currentHiddenLevel--; + if (currentHiddenLevel < maxHiddenLevel) { + maxHiddenLevel = currentHiddenLevel; } } + /** + * 15.4. Increase index by 1. + */ + index++; } /** - * 5.12. If activationTarget is non-null and activationTarget has - * legacy-pre-activation behavior, then run activationTarget's - * legacy-pre-activation behavior. + * 16. Return composedPath. */ - if (activationTarget !== null && - activationTarget._legacyPreActivationBehavior !== undefined) { - activationTarget._legacyPreActivationBehavior(event); - } + return composedPath; + }; + Object.defineProperty(EventImpl.prototype, "eventPhase", { + /** @inheritdoc */ + get: function () { return this._eventPhase; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + EventImpl.prototype.stopPropagation = function () { this._stopPropagationFlag = true; }; + Object.defineProperty(EventImpl.prototype, "cancelBubble", { + /** @inheritdoc */ + get: function () { return this._stopPropagationFlag; }, + set: function (value) { if (value) + this.stopPropagation(); }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + EventImpl.prototype.stopImmediatePropagation = function () { + this._stopPropagationFlag = true; + this._stopImmediatePropagationFlag = true; + }; + Object.defineProperty(EventImpl.prototype, "bubbles", { + /** @inheritdoc */ + get: function () { return this._bubbles; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "cancelable", { + /** @inheritdoc */ + get: function () { return this._cancelable; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "returnValue", { + /** @inheritdoc */ + get: function () { return !this._canceledFlag; }, + set: function (value) { + if (!value) { + algorithm_1.event_setTheCanceledFlag(this); + } + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + EventImpl.prototype.preventDefault = function () { + algorithm_1.event_setTheCanceledFlag(this); + }; + Object.defineProperty(EventImpl.prototype, "defaultPrevented", { + /** @inheritdoc */ + get: function () { return this._canceledFlag; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "composed", { + /** @inheritdoc */ + get: function () { return this._composedFlag; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "isTrusted", { + /** @inheritdoc */ + get: function () { return this._isTrusted; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventImpl.prototype, "timeStamp", { + /** @inheritdoc */ + get: function () { return this._timeStamp; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + EventImpl.prototype.initEvent = function (type, bubbles, cancelable) { + if (bubbles === void 0) { bubbles = false; } + if (cancelable === void 0) { cancelable = false; } /** - * 5.13. For each struct in event's path, in reverse order: + * 1. If the context object’s dispatch flag is set, then return. */ - for (var i = path.length - 1; i >= 0; i--) { - var struct = path[i]; - /** - * 5.13.1. If struct's shadow-adjusted target is non-null, then set - * event's eventPhase attribute to AT_TARGET. - * 5.13.2. Otherwise, set event's eventPhase attribute to - * CAPTURING_PHASE. - * 5.13.3. Invoke with struct, event, "capturing", and - * legacyOutputDidListenersThrowFlag if given. - */ - if (struct.shadowAdjustedTarget !== null) { - event._eventPhase = interfaces_1.EventPhase.AtTarget; - } - else { - event._eventPhase = interfaces_1.EventPhase.Capturing; - } - event_invoke(struct, event, "capturing", legacyOutputDidListenersThrowFlag); - } + if (this._dispatchFlag) + return; /** - * 5.14. For each struct in event's path + * 2. Initialize the context object with type, bubbles, and cancelable. */ - for (var i = 0; i < path.length; i++) { - var struct = path[i]; - /** - * 5.14.1. If struct's shadow-adjusted target is non-null, then set - * event's eventPhase attribute to AT_TARGET. - * 5.14.2. Otherwise: - * 5.14.2.1. If event's bubbles attribute is false, then continue. - * 5.14.2.2. Set event's eventPhase attribute to BUBBLING_PHASE. - * 5.14.3. Invoke with struct, event, "bubbling", and - * legacyOutputDidListenersThrowFlag if given. - */ - if (struct.shadowAdjustedTarget !== null) { - event._eventPhase = interfaces_1.EventPhase.AtTarget; - } - else { - if (!event._bubbles) - continue; - event._eventPhase = interfaces_1.EventPhase.Bubbling; - } - event_invoke(struct, event, "bubbling", legacyOutputDidListenersThrowFlag); - } - } - /** - * 6. Set event's eventPhase attribute to NONE. - * 7. Set event's currentTarget attribute to null. - * 8. Set event's path to the empty list. - * 9. Unset event's dispatch flag, stop propagation flag, and stop - * immediate propagation flag. - */ - event._eventPhase = interfaces_1.EventPhase.None; - event._currentTarget = null; - event._path = []; - event._dispatchFlag = false; - event._stopPropagationFlag = false; - event._stopImmediatePropagationFlag = false; - /** - * 10. If clearTargets, then: - * 10.1. Set event's target to null. - * 10.2. Set event's relatedTarget to null. - * 10.3. Set event's touch target list to the empty list. - */ - if (clearTargets) { - event._target = null; - event._relatedTarget = null; - event._touchTargetList = []; - } - /** - * 11. If activationTarget is non-null, then: - * 11.1. If event's canceled flag is unset, then run activationTarget's - * activation behavior with event. - * 11.2. Otherwise, if activationTarget has legacy-canceled-activation - * behavior, then run activationTarget's legacy-canceled-activation - * behavior. - */ - if (activationTarget !== null) { - if (!event._canceledFlag && activationTarget._activationBehavior !== undefined) { - activationTarget._activationBehavior(event); - } - else if (activationTarget._legacyCanceledActivationBehavior !== undefined) { - activationTarget._legacyCanceledActivationBehavior(event); - } - } - /** - * 12. Return false if event's canceled flag is set, and true otherwise. - */ - return !event._canceledFlag; -} -exports.event_dispatch = event_dispatch; + algorithm_1.event_initialize(this, type, bubbles, cancelable); + }; + EventImpl.NONE = 0; + EventImpl.CAPTURING_PHASE = 1; + EventImpl.AT_TARGET = 2; + EventImpl.BUBBLING_PHASE = 3; + return EventImpl; +}()); +exports.EventImpl = EventImpl; /** - * Appends a new struct to an event's path. - * - * @param event - an event - * @param invocationTarget - the target of the invocation - * @param shadowAdjustedTarget - shadow-root adjusted event target - * @param relatedTarget - related event target - * @param touchTargets - a list of touch targets - * @param slotInClosedTree - if the target's parent is a closed shadow root + * Define constants on prototype. */ -function event_appendToAnEventPath(event, invocationTarget, shadowAdjustedTarget, relatedTarget, touchTargets, slotInClosedTree) { - /** - * 1. Let invocationTargetInShadowTree be false. - * 2. If invocationTarget is a node and its root is a shadow root, then - * set invocationTargetInShadowTree to true. - */ - var invocationTargetInShadowTree = false; - if (util_1.Guard.isNode(invocationTarget) && - util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(invocationTarget))) { - invocationTargetInShadowTree = true; +WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "NONE", 0); +WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "CAPTURING_PHASE", 1); +WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "AT_TARGET", 2); +WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "BUBBLING_PHASE", 3); +//# sourceMappingURL=EventImpl.js.map + +/***/ }), + +/***/ 69968: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } - /** - * 3. Let root-of-closed-tree be false. - * 4. If invocationTarget is a shadow root whose mode is "closed", then - * set root-of-closed-tree to true. - */ - var rootOfClosedTree = false; - if (util_1.Guard.isShadowRoot(invocationTarget) && - invocationTarget._mode === "closed") { - rootOfClosedTree = true; + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - /** - * 5. Append a new struct to event's path whose invocation target is - * invocationTarget, invocation-target-in-shadow-tree is - * invocationTargetInShadowTree, shadow-adjusted target is - * shadowAdjustedTarget, relatedTarget is relatedTarget, - * touch target list is touchTargets, root-of-closed-tree is - * root-of-closed-tree, and slot-in-closed-tree is slot-in-closed-tree. - */ - event._path.push({ - invocationTarget: invocationTarget, - invocationTargetInShadowTree: invocationTargetInShadowTree, - shadowAdjustedTarget: shadowAdjustedTarget, - relatedTarget: relatedTarget, - touchTargetList: touchTargets, - rootOfClosedTree: rootOfClosedTree, - slotInClosedTree: slotInClosedTree - }); -} -exports.event_appendToAnEventPath = event_appendToAnEventPath; + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMException_1 = __nccwpck_require__(13166); +var util_1 = __nccwpck_require__(65282); +var algorithm_1 = __nccwpck_require__(61); /** - * Invokes an event. - * - * @param struct - a struct defining event's path - * @param event - the event to invoke - * @param phase - event phase - * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns - * whether the event listener's callback threw an exception + * Represents a target to which an event can be dispatched. */ -function event_invoke(struct, event, phase, legacyOutputDidListenersThrowFlag) { - if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; } +var EventTargetImpl = /** @class */ (function () { /** - * 1. Set event's target to the shadow-adjusted target of the last struct - * in event's path, that is either struct or preceding struct, whose - * shadow-adjusted target is non-null. + * Initializes a new instance of `EventTarget`. */ - var path = event._path; - var index = -1; - for (var i = 0; i < path.length; i++) { - if (path[i] === struct) { - index = i; - break; - } - } - if (index !== -1) { - var item = path[index]; - if (item.shadowAdjustedTarget !== null) { - event._target = item.shadowAdjustedTarget; - } - else if (index > 0) { - item = path[index - 1]; - if (item.shadowAdjustedTarget !== null) { - event._target = item.shadowAdjustedTarget; - } - } + function EventTargetImpl() { } - /** - * 2. Set event's relatedTarget to struct's relatedTarget. - * 3. Set event's touch target list to struct's touch target list. - * 4. If event's stop propagation flag is set, then return. - * 5. Initialize event's currentTarget attribute to struct's invocation - * target. - * 6. Let listeners be a clone of event's currentTarget attribute value's - * event listener list. - * - * _Note:_ This avoids event listeners added after this point from being - * run. Note that removal still has an effect due to the removed field. - */ - event._relatedTarget = struct.relatedTarget; - event._touchTargetList = struct.touchTargetList; - if (event._stopPropagationFlag) - return; - event._currentTarget = struct.invocationTarget; - var currentTarget = event._currentTarget; - var targetListeners = currentTarget._eventListenerList; - var listeners = new (Array.bind.apply(Array, __spread([void 0], targetListeners)))(); - /** - * 7. Let found be the result of running inner invoke with event, listeners, - * phase, and legacyOutputDidListenersThrowFlag if given. - */ - var found = event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag); - /** - * 8. If found is false and event's isTrusted attribute is true, then: - */ - if (!found && event._isTrusted) { + Object.defineProperty(EventTargetImpl.prototype, "_eventListenerList", { + get: function () { + return this.__eventListenerList || (this.__eventListenerList = []); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventTargetImpl.prototype, "_eventHandlerMap", { + get: function () { + return this.__eventHandlerMap || (this.__eventHandlerMap = {}); + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + EventTargetImpl.prototype.addEventListener = function (type, callback, options) { + if (options === void 0) { options = { passive: false, once: false, capture: false }; } /** - * 8.1. Let originalEventType be event's type attribute value. - * 8.2. If event's type attribute value is a match for any of the strings - * in the first column in the following table, set event's type attribute - * value to the string in the second column on the same row as the matching - * string, and return otherwise. - * - * Event type | Legacy event type - * ------------------------------------------------- - * "animationend" | "webkitAnimationEnd" - * "animationiteration" | "webkitAnimationIteration" - * "animationstart" | "webkitAnimationStart" - * "transitionend" | "webkitTransitionEnd" + * 1. Let capture, passive, and once be the result of flattening more options. */ - var originalEventType = event._type; - if (originalEventType === "animationend") { - event._type = "webkitAnimationEnd"; - } - else if (originalEventType === "animationiteration") { - event._type = "webkitAnimationIteration"; + var _a = __read(algorithm_1.eventTarget_flattenMore(options), 3), capture = _a[0], passive = _a[1], once = _a[2]; + // convert callback function to EventListener, return if null + var listenerCallback; + if (!callback) { + return; } - else if (originalEventType === "animationstart") { - event._type = "webkitAnimationStart"; + else if (util_1.Guard.isEventListener(callback)) { + listenerCallback = callback; } - else if (originalEventType === "transitionend") { - event._type = "webkitTransitionEnd"; + else { + listenerCallback = { handleEvent: callback }; } /** - * 8.3. Inner invoke with event, listeners, phase, and - * legacyOutputDidListenersThrowFlag if given. - * 8.4. Set event's type attribute value to originalEventType. + * 2. Add an event listener with the context object and an event listener + * whose type is type, callback is callback, capture is capture, passive is + * passive, and once is once. */ - event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag); - event._type = originalEventType; - } -} -exports.event_invoke = event_invoke; -/** - * Invokes an event. - * - * @param event - the event to invoke - * @param listeners - event listeners - * @param phase - event phase - * @param struct - a struct defining event's path - * @param legacyOutputDidListenersThrowFlag - legacy output flag that returns - * whether the event listener's callback threw an exception - */ -function event_innerInvoke(event, listeners, phase, struct, legacyOutputDidListenersThrowFlag) { - if (legacyOutputDidListenersThrowFlag === void 0) { legacyOutputDidListenersThrowFlag = { value: false }; } - /** - * 1. Let found be false. - * 2. For each listener in listeners, whose removed is false: - */ - var found = false; - for (var i = 0; i < listeners.length; i++) { - var listener = listeners[i]; - if (!listener.removed) { - /** - * 2.1. If event's type attribute value is not listener's type, then - * continue. - * 2.2. Set found to true. - * 2.3. If phase is "capturing" and listener's capture is false, then - * continue. - * 2.4. If phase is "bubbling" and listener's capture is true, then - * continue. - */ - if (event._type !== listener.type) - continue; - found = true; - if (phase === "capturing" && !listener.capture) - continue; - if (phase === "bubbling" && listener.capture) + algorithm_1.eventTarget_addEventListener(this, { + type: type, + callback: listenerCallback, + capture: capture, + passive: passive, + once: once, + removed: false + }); + }; + /** @inheritdoc */ + EventTargetImpl.prototype.removeEventListener = function (type, callback, options) { + /** + * TODO: Implement realms + * 1. If the context object’s relevant global object is a + * ServiceWorkerGlobalScope object and its associated service worker’s + * script resource’s has ever been evaluated flag is set, then throw + * a TypeError. [SERVICE-WORKERS] + */ + if (options === void 0) { options = { capture: false }; } + /** + * 2. Let capture be the result of flattening options. + */ + var capture = algorithm_1.eventTarget_flatten(options); + if (!callback) + return; + /** + * 3. If the context object’s event listener list contains an event listener + * whose type is type, callback is callback, and capture is capture, then + * remove an event listener with the context object and that event listener. + */ + for (var i = 0; i < this._eventListenerList.length; i++) { + var entry = this._eventListenerList[i]; + if (entry.type !== type || entry.capture !== capture) continue; - /** - * 2.5. If listener's once is true, then remove listener from event's - * currentTarget attribute value's event listener list. - */ - if (listener.once && event._currentTarget !== null) { - var impl = event._currentTarget; - var index = -1; - for (var i_1 = 0; i_1 < impl._eventListenerList.length; i_1++) { - if (impl._eventListenerList[i_1] === listener) { - index = i_1; - break; - } - } - if (index !== -1) { - impl._eventListenerList.splice(index, 1); - } - } - /** - * TODO: Implement realms - * - * 2.6. Let global be listener callback's associated Realm's global - * object. - */ - var globalObject = undefined; - /** - * 2.7. Let currentEvent be undefined. - * 2.8. If global is a Window object, then: - * 2.8.1. Set currentEvent to global's current event. - * 2.8.2. If struct's invocation-target-in-shadow-tree is false, then - * set global's current event to event. - */ - var currentEvent = undefined; - if (util_1.Guard.isWindow(globalObject)) { - currentEvent = globalObject._currentEvent; - if (struct.invocationTargetInShadowTree === false) { - globalObject._currentEvent = event; - } - } - /** - * 2.9. If listener's passive is true, then set event's in passive - * listener flag. - * 2.10. Call a user object's operation with listener's callback, - * "handleEvent", « event », and event's currentTarget attribute value. - */ - if (listener.passive) - event._inPassiveListenerFlag = true; - try { - listener.callback.handleEvent.call(event._currentTarget, event); - } - catch (err) { - /** - * If this throws an exception, then: - * 2.10.1. Report the exception. - * 2.10.2. Set legacyOutputDidListenersThrowFlag if given. - * - * _Note:_ The legacyOutputDidListenersThrowFlag is only used by - * Indexed Database API. - * TODO: Report the exception - * See: https://html.spec.whatwg.org/multipage/webappapis.html#runtime-script-errors-in-documents - */ - legacyOutputDidListenersThrowFlag.value = true; + if (util_1.Guard.isEventListener(callback) && entry.callback === callback) { + algorithm_1.eventTarget_removeEventListener(this, entry, i); + break; } - /** - * 2.11. Unset event's in passive listener flag. - */ - if (listener.passive) - event._inPassiveListenerFlag = false; - /** - * 2.12. If global is a Window object, then set global's current event - * to currentEvent. - */ - if (util_1.Guard.isWindow(globalObject)) { - globalObject._currentEvent = currentEvent; + else if (callback && entry.callback.handleEvent === callback) { + algorithm_1.eventTarget_removeEventListener(this, entry, i); + break; } - /** - * 2.13. If event's stop immediate propagation flag is set, then return - * found. - */ - if (event._stopImmediatePropagationFlag) - return found; } - } - /** - * 3. Return found. - */ - return found; -} -exports.event_innerInvoke = event_innerInvoke; -/** - * Fires an event at target. - * @param e - event name - * @param target - event target - * @param eventConstructor - an event constructor, with a description of how - * IDL attributes are to be initialized - * @param idlAttributes - a dictionary describing how IDL attributes are - * to be initialized - * @param legacyTargetOverrideFlag - legacy target override flag - */ -function event_fireAnEvent(e, target, eventConstructor, idlAttributes, legacyTargetOverrideFlag) { - /** - * 1. If eventConstructor is not given, then let eventConstructor be Event. - */ - if (eventConstructor === undefined) { - eventConstructor = EventImpl_1.EventImpl; - } - /** - * 2. Let event be the result of creating an event given eventConstructor, - * in the relevant Realm of target. - */ - var event = event_createAnEvent(eventConstructor); - /** - * 3. Initialize event’s type attribute to e. - */ - event._type = e; - /** - * 4. Initialize any other IDL attributes of event as described in the - * invocation of this algorithm. - * _Note:_ This also allows for the isTrusted attribute to be set to false. - */ - if (idlAttributes) { - for (var key in idlAttributes) { - var idlObj = event; - idlObj[key] = idlAttributes[key]; + }; + /** @inheritdoc */ + EventTargetImpl.prototype.dispatchEvent = function (event) { + /** + * 1. If event’s dispatch flag is set, or if its initialized flag is not + * set, then throw an "InvalidStateError" DOMException. + * 2. Initialize event’s isTrusted attribute to false. + * 3. Return the result of dispatching event to the context object. + */ + if (event._dispatchFlag || !event._initializedFlag) { + throw new DOMException_1.InvalidStateError(); } - } - /** - * 5. Return the result of dispatching event at target, with legacy target - * override flag set if set. - */ - return event_dispatch(event, target, legacyTargetOverrideFlag); -} -exports.event_fireAnEvent = event_fireAnEvent; -/** - * Creates an event. - * - * @param eventInterface - the name of the event interface - */ -function event_createLegacyEvent(eventInterface) { - /** - * 1. Let constructor be null. - */ - var constructor = null; - /** - * TODO: Implement in HTML DOM - * 2. If interface is an ASCII case-insensitive match for any of the strings - * in the first column in the following table, then set constructor to the - * interface in the second column on the same row as the matching string: - * - * String | Interface - * -------|---------- - * "beforeunloadevent" | BeforeUnloadEvent - * "compositionevent" | CompositionEvent - * "customevent" | CustomEvent - * "devicemotionevent" | DeviceMotionEvent - * "deviceorientationevent" | DeviceOrientationEvent - * "dragevent" | DragEvent - * "event" | Event - * "events" | Event - * "focusevent" | FocusEvent - * "hashchangeevent" | HashChangeEvent - * "htmlevents" | Event - * "keyboardevent" | KeyboardEvent - * "messageevent" | MessageEvent - * "mouseevent" | MouseEvent - * "mouseevents" | - * "storageevent" | StorageEvent - * "svgevents" | Event - * "textevent" | CompositionEvent - * "touchevent" | TouchEvent - * "uievent" | UIEvent - * "uievents" | UIEvent - */ - switch (eventInterface.toLowerCase()) { - case "beforeunloadevent": - break; - case "compositionevent": - break; - case "customevent": - constructor = CustomEventImpl_1.CustomEventImpl; - break; - case "devicemotionevent": - break; - case "deviceorientationevent": - break; - case "dragevent": - break; - case "event": - case "events": - constructor = EventImpl_1.EventImpl; - break; - case "focusevent": - break; - case "hashchangeevent": - break; - case "htmlevents": - break; - case "keyboardevent": - break; - case "messageevent": - break; - case "mouseevent": - break; - case "mouseevents": - break; - case "storageevent": - break; - case "svgevents": - break; - case "textevent": - break; - case "touchevent": - break; - case "uievent": - break; - case "uievents": - break; - } - /** - * 3. If constructor is null, then throw a "NotSupportedError" DOMException. - */ - if (constructor === null) { - throw new DOMException_1.NotSupportedError("Event constructor not found for interface " + eventInterface + "."); - } - /** - * 4. If the interface indicated by constructor is not exposed on the - * relevant global object of the context object, then throw a - * "NotSupportedError" DOMException. - * _Note:_ Typically user agents disable support for touch events in some - * configurations, in which case this clause would be triggered for the - * interface TouchEvent. - */ - // TODO: Implement realms - /** - * 5. Let event be the result of creating an event given constructor. - * 6. Initialize event’s type attribute to the empty string. - * 7. Initialize event’s timeStamp attribute to a DOMHighResTimeStamp - * representing the high resolution time from the time origin to now. - * 8. Initialize event’s isTrusted attribute to false. - * 9. Unset event’s initialized flag. - */ - var event = new constructor(""); - event._type = ""; - event._timeStamp = new Date().getTime(); - event._isTrusted = false; - event._initializedFlag = false; - /** - * 10. Return event. - */ - return event; -} -exports.event_createLegacyEvent = event_createLegacyEvent; -/** - * Getter of an event handler IDL attribute. - * - * @param eventTarget - event target - * @param name - event name + event._isTrusted = false; + return algorithm_1.event_dispatch(event, this); + }; + /** @inheritdoc */ + EventTargetImpl.prototype._getTheParent = function (event) { + return null; + }; + return EventTargetImpl; +}()); +exports.EventTargetImpl = EventTargetImpl; +//# sourceMappingURL=EventTargetImpl.js.map + +/***/ }), + +/***/ 93969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); +var util_1 = __nccwpck_require__(65282); +var util_2 = __nccwpck_require__(76195); +/** + * Represents a collection of elements. */ -function event_getterEventHandlerIDLAttribute(thisObj, name) { +var HTMLCollectionImpl = /** @class */ (function () { /** - * 1. Let eventTarget be the result of determining the target of an event - * handler given this object and name. - * 2. If eventTarget is null, then return null. - * 3. Return the result of getting the current value of the event handler - * given eventTarget and name. + * Initializes a new instance of `HTMLCollection`. + * + * @param root - root node + * @param filter - node filter */ - var eventTarget = event_determineTheTargetOfAnEventHandler(thisObj, name); - if (eventTarget === null) + function HTMLCollectionImpl(root, filter) { + this._live = true; + this._root = root; + this._filter = filter; + return new Proxy(this, this); + } + Object.defineProperty(HTMLCollectionImpl.prototype, "length", { + /** @inheritdoc */ + get: function () { + var _this = this; + /** + * The length attribute’s getter must return the number of nodes + * represented by the collection. + */ + var count = 0; + var node = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); + while (node !== null) { + count++; + node = algorithm_1.tree_getNextDescendantNode(this._root, node, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); + } + return count; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + HTMLCollectionImpl.prototype.item = function (index) { + var _this = this; + /** + * The item(index) method, when invoked, must return the indexth element + * in the collection. If there is no indexth element in the collection, + * then the method must return null. + */ + var i = 0; + var node = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); + while (node !== null) { + if (i === index) + return node; + else + i++; + node = algorithm_1.tree_getNextDescendantNode(this._root, node, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); + } return null; - return event_getTheCurrentValueOfAnEventHandler(eventTarget, name); -} -exports.event_getterEventHandlerIDLAttribute = event_getterEventHandlerIDLAttribute; -/** - * Setter of an event handler IDL attribute. - * - * @param eventTarget - event target - * @param name - event name - * @param value - event handler - */ -function event_setterEventHandlerIDLAttribute(thisObj, name, value) { + }; + /** @inheritdoc */ + HTMLCollectionImpl.prototype.namedItem = function (key) { + var _this = this; + /** + * 1. If key is the empty string, return null. + * 2. Return the first element in the collection for which at least one of + * the following is true: + * - it has an ID which is key; + * - it is in the HTML namespace and has a name attribute whose value is key; + * or null if there is no such element. + */ + if (key === '') + return null; + var ele = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); + while (ele != null) { + if (ele._uniqueIdentifier === key) { + return ele; + } + else if (ele._namespace === infra_1.namespace.HTML) { + for (var i = 0; i < ele._attributeList.length; i++) { + var attr = ele._attributeList[i]; + if (attr._localName === "name" && attr._namespace === null && + attr._namespacePrefix === null && attr._value === key) + return ele; + } + } + ele = algorithm_1.tree_getNextDescendantNode(this._root, ele, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); + } + return null; + }; + /** @inheritdoc */ + HTMLCollectionImpl.prototype[Symbol.iterator] = function () { + var root = this._root; + var filter = this._filter; + var currentNode = algorithm_1.tree_getFirstDescendantNode(root, false, false, function (e) { return util_1.Guard.isElementNode(e) && filter(e); }); + return { + next: function () { + if (currentNode === null) { + return { done: true, value: null }; + } + else { + var result = { done: false, value: currentNode }; + currentNode = algorithm_1.tree_getNextDescendantNode(root, currentNode, false, false, function (e) { return util_1.Guard.isElementNode(e) && filter(e); }); + return result; + } + } + }; + }; /** - * 1. Let eventTarget be the result of determining the target of an event - * handler given this object and name. - * 2. If eventTarget is null, then return. - * 3. If the given value is null, then deactivate an event handler given - * eventTarget and name. - * 4. Otherwise: - * 4.1. Let handlerMap be eventTarget's event handler map. - * 4.2. Let eventHandler be handlerMap[name]. - * 4.3. Set eventHandler's value to the given value. - * 4.4. Activate an event handler given eventTarget and name. + * Implements a proxy get trap to provide array-like access. */ - var eventTarget = event_determineTheTargetOfAnEventHandler(thisObj, name); - if (eventTarget === null) - return; - if (value === null) { - event_deactivateAnEventHandler(eventTarget, name); - } - else { - var handlerMap = eventTarget._eventHandlerMap; - var eventHandler = handlerMap["onabort"]; - if (eventHandler !== undefined) { - eventHandler.value = value; + HTMLCollectionImpl.prototype.get = function (target, key, receiver) { + if (!util_2.isString(key) || HTMLCollectionImpl.reservedNames.indexOf(key) !== -1) { + return Reflect.get(target, key, receiver); } - event_activateAnEventHandler(eventTarget, name); - } -} -exports.event_setterEventHandlerIDLAttribute = event_setterEventHandlerIDLAttribute; -/** - * Determines the target of an event handler. - * - * @param eventTarget - event target - * @param name - event name - */ -function event_determineTheTargetOfAnEventHandler(eventTarget, name) { - // TODO: Implement in HTML DOM - return null; -} -exports.event_determineTheTargetOfAnEventHandler = event_determineTheTargetOfAnEventHandler; -/** - * Gets the current value of an event handler. - * - * @param eventTarget - event target - * @param name - event name - */ -function event_getTheCurrentValueOfAnEventHandler(eventTarget, name) { - // TODO: Implement in HTML DOM - return null; -} -exports.event_getTheCurrentValueOfAnEventHandler = event_getTheCurrentValueOfAnEventHandler; -/** - * Activates an event handler. - * - * @param eventTarget - event target - * @param name - event name - */ -function event_activateAnEventHandler(eventTarget, name) { - // TODO: Implement in HTML DOM -} -exports.event_activateAnEventHandler = event_activateAnEventHandler; -/** - * Deactivates an event handler. - * - * @param eventTarget - event target - * @param name - event name - */ -function event_deactivateAnEventHandler(eventTarget, name) { - // TODO: Implement in HTML DOM -} -exports.event_deactivateAnEventHandler = event_deactivateAnEventHandler; -//# sourceMappingURL=EventAlgorithm.js.map + var index = Number(key); + if (isNaN(index)) { + return target.namedItem(key) || undefined; + } + else { + return target.item(index) || undefined; + } + }; + /** + * Implements a proxy set trap to provide array-like access. + */ + HTMLCollectionImpl.prototype.set = function (target, key, value, receiver) { + if (!util_2.isString(key) || HTMLCollectionImpl.reservedNames.indexOf(key) !== -1) { + return Reflect.set(target, key, value, receiver); + } + var index = Number(key); + var node = isNaN(index) ? + target.namedItem(key) || undefined : target.item(index) || undefined; + if (node && node._parent) { + algorithm_1.mutation_replace(node, value, node._parent); + return true; + } + else { + return false; + } + }; + /** + * Creates a new `HTMLCollection`. + * + * @param root - root node + * @param filter - node filter + */ + HTMLCollectionImpl._create = function (root, filter) { + if (filter === void 0) { filter = (function () { return true; }); } + return new HTMLCollectionImpl(root, filter); + }; + HTMLCollectionImpl.reservedNames = ['_root', '_live', '_filter', 'length', + 'item', 'namedItem', 'get', 'set']; + return HTMLCollectionImpl; +}()); +exports.HTMLCollectionImpl = HTMLCollectionImpl; +//# sourceMappingURL=HTMLCollectionImpl.js.map /***/ }), -/***/ 21312: +/***/ 89616: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -45796,143 +29364,511 @@ var __values = (this && this.__values) || function(o) { throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(65282); +var infra_1 = __nccwpck_require__(84251); /** - * Flattens the given options argument. - * - * @param options - options argument + * Represents an object that can be used to observe mutations to the tree of + * nodes. */ -function eventTarget_flatten(options) { +var MutationObserverImpl = /** @class */ (function () { /** - * 1. If options is a boolean, then return options. - * 2. Return options’s capture. + * Initializes a new instance of `MutationObserver`. + * + * @param callback - the callback function */ - if (util_1.isBoolean(options)) { - return options; - } - else { - return options.capture || false; + function MutationObserverImpl(callback) { + this._nodeList = []; + this._recordQueue = []; + /** + * 1. Let mo be a new MutationObserver object whose callback is callback. + * 2. Append mo to mo’s relevant agent’s mutation observers. + * 3. Return mo. + */ + this._callback = callback; + var window = DOMImpl_1.dom.window; + infra_1.set.append(window._mutationObservers, this); } -} -exports.eventTarget_flatten = eventTarget_flatten; + /** @inheritdoc */ + MutationObserverImpl.prototype.observe = function (target, options) { + var e_1, _a; + options = options || { + childList: false, + subtree: false + }; + /** + * 1. If either options’s attributeOldValue or attributeFilter is present + * and options’s attributes is omitted, then set options’s attributes + * to true. + * 2. If options’s characterDataOldValue is present and options’s + * characterData is omitted, then set options’s characterData to true. + * 3. If none of options’s childList, attributes, and characterData is + * true, then throw a TypeError. + * 4. If options’s attributeOldValue is true and options’s attributes is + * false, then throw a TypeError. + * 5. If options’s attributeFilter is present and options’s attributes is + * false, then throw a TypeError. + * 6. If options’s characterDataOldValue is true and options’s characterData + * is false, then throw a TypeError. + */ + if ((options.attributeOldValue !== undefined || options.attributeFilter !== undefined) && + options.attributes === undefined) { + options.attributes = true; + } + if (options.characterDataOldValue !== undefined && options.characterData === undefined) { + options.characterData = true; + } + if (!options.childList && !options.attributes && !options.characterData) { + throw new TypeError(); + } + if (options.attributeOldValue && !options.attributes) { + throw new TypeError(); + } + if (options.attributeFilter !== undefined && !options.attributes) { + throw new TypeError(); + } + if (options.characterDataOldValue && !options.characterData) { + throw new TypeError(); + } + /** + * 7. For each registered of target’s registered observer list, if + * registered’s observer is the context object: + */ + var isRegistered = false; + var coptions = options; + var _loop_1 = function (registered) { + var e_2, _a; + if (registered.observer === this_1) { + isRegistered = true; + try { + /** + * 7.1. For each node of the context object’s node list, remove all + * transient registered observers whose source is registered from node’s + * registered observer list. + */ + for (var _b = (e_2 = void 0, __values(this_1._nodeList)), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + infra_1.list.remove(node._registeredObserverList, function (ob) { + return util_1.Guard.isTransientRegisteredObserver(ob) && ob.source === registered; + }); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_2) throw e_2.error; } + } + /** + * 7.2. Set registered’s options to options. + */ + registered.options = coptions; + } + }; + var this_1 = this; + try { + for (var _b = __values(target._registeredObserverList), _c = _b.next(); !_c.done; _c = _b.next()) { + var registered = _c.value; + _loop_1(registered); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + /** + * 8. Otherwise: + * 8.1. Append a new registered observer whose observer is the context + * object and options is options to target’s registered observer list. + * 8.2. Append target to the context object’s node list. + */ + if (!isRegistered) { + target._registeredObserverList.push({ observer: this, options: options }); + this._nodeList.push(target); + } + }; + /** @inheritdoc */ + MutationObserverImpl.prototype.disconnect = function () { + var e_3, _a; + var _this = this; + try { + /** + * 1. For each node of the context object’s node list, remove any + * registered observer from node’s registered observer list for which the + * context object is the observer. + */ + for (var _b = __values(this._nodeList), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + infra_1.list.remove((node)._registeredObserverList, function (ob) { + return ob.observer === _this; + }); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_3) throw e_3.error; } + } + /** + * 2. Empty the context object’s record queue. + */ + this._recordQueue = []; + }; + /** @inheritdoc */ + MutationObserverImpl.prototype.takeRecords = function () { + /** + * 1. Let records be a clone of the context object’s record queue. + * 2. Empty the context object’s record queue. + * 3. Return records. + */ + var records = this._recordQueue; + this._recordQueue = []; + return records; + }; + return MutationObserverImpl; +}()); +exports.MutationObserverImpl = MutationObserverImpl; +//# sourceMappingURL=MutationObserverImpl.js.map + +/***/ }), + +/***/ 6219: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /** - * Flattens the given options argument. - * - * @param options - options argument + * Represents a mutation record. */ -function eventTarget_flattenMore(options) { +var MutationRecordImpl = /** @class */ (function () { /** - * 1. Let capture be the result of flattening options. - * 2. Let once and passive be false. - * 3. If options is a dictionary, then set passive to options’s passive and - * once to options’s once. - * 4. Return capture, passive, and once. + * Initializes a new instance of `MutationRecord`. + * + * @param type - type of mutation: `"attributes"` for an attribute + * mutation, `"characterData"` for a mutation to a CharacterData node + * and `"childList"` for a mutation to the tree of nodes. + * @param target - node affected by the mutation. + * @param addedNodes - list of added nodes. + * @param removedNodes - list of removed nodes. + * @param previousSibling - previous sibling of added or removed nodes. + * @param nextSibling - next sibling of added or removed nodes. + * @param attributeName - local name of the changed attribute, + * and `null` otherwise. + * @param attributeNamespace - namespace of the changed attribute, + * and `null` otherwise. + * @param oldValue - value before mutation: attribute value for an attribute + * mutation, node `data` for a mutation to a CharacterData node and `null` + * for a mutation to the tree of nodes. */ - var capture = eventTarget_flatten(options); - var once = false; - var passive = false; - if (!util_1.isBoolean(options)) { - once = options.once || false; - passive = options.passive || false; + function MutationRecordImpl(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) { + this._type = type; + this._target = target; + this._addedNodes = addedNodes; + this._removedNodes = removedNodes; + this._previousSibling = previousSibling; + this._nextSibling = nextSibling; + this._attributeName = attributeName; + this._attributeNamespace = attributeNamespace; + this._oldValue = oldValue; } - return [capture, passive, once]; -} -exports.eventTarget_flattenMore = eventTarget_flattenMore; + Object.defineProperty(MutationRecordImpl.prototype, "type", { + /** @inheritdoc */ + get: function () { return this._type; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "target", { + /** @inheritdoc */ + get: function () { return this._target; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "addedNodes", { + /** @inheritdoc */ + get: function () { return this._addedNodes; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "removedNodes", { + /** @inheritdoc */ + get: function () { return this._removedNodes; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "previousSibling", { + /** @inheritdoc */ + get: function () { return this._previousSibling; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "nextSibling", { + /** @inheritdoc */ + get: function () { return this._nextSibling; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "attributeName", { + /** @inheritdoc */ + get: function () { return this._attributeName; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "attributeNamespace", { + /** @inheritdoc */ + get: function () { return this._attributeNamespace; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutationRecordImpl.prototype, "oldValue", { + /** @inheritdoc */ + get: function () { return this._oldValue; }, + enumerable: true, + configurable: true + }); + /** + * Creates a new `MutationRecord`. + * + * @param type - type of mutation: `"attributes"` for an attribute + * mutation, `"characterData"` for a mutation to a CharacterData node + * and `"childList"` for a mutation to the tree of nodes. + * @param target - node affected by the mutation. + * @param addedNodes - list of added nodes. + * @param removedNodes - list of removed nodes. + * @param previousSibling - previous sibling of added or removed nodes. + * @param nextSibling - next sibling of added or removed nodes. + * @param attributeName - local name of the changed attribute, + * and `null` otherwise. + * @param attributeNamespace - namespace of the changed attribute, + * and `null` otherwise. + * @param oldValue - value before mutation: attribute value for an attribute + * mutation, node `data` for a mutation to a CharacterData node and `null` + * for a mutation to the tree of nodes. + */ + MutationRecordImpl._create = function (type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) { + return new MutationRecordImpl(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue); + }; + return MutationRecordImpl; +}()); +exports.MutationRecordImpl = MutationRecordImpl; +//# sourceMappingURL=MutationRecordImpl.js.map + +/***/ }), + +/***/ 57206: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMException_1 = __nccwpck_require__(13166); +var algorithm_1 = __nccwpck_require__(61); /** - * Adds a new event listener. - * - * @param eventTarget - event target - * @param listener - event listener + * Represents a collection of attributes. */ -function eventTarget_addEventListener(eventTarget, listener) { +var NamedNodeMapImpl = /** @class */ (function (_super) { + __extends(NamedNodeMapImpl, _super); /** - * 1. If eventTarget is a ServiceWorkerGlobalScope object, its service - * worker’s script resource’s has ever been evaluated flag is set, and - * listener’s type matches the type attribute value of any of the service - * worker events, then report a warning to the console that this might not - * give the expected results. [SERVICE-WORKERS] + * Initializes a new instance of `NamedNodeMap`. + * + * @param element - parent element */ - // TODO: service worker + function NamedNodeMapImpl(element) { + var _this = _super.call(this) || this; + _this._element = element; + // TODO: This workaround is needed to extend Array in ES5 + Object.setPrototypeOf(_this, NamedNodeMapImpl.prototype); + return _this; + } + NamedNodeMapImpl.prototype._asArray = function () { return this; }; + /** @inheritdoc */ + NamedNodeMapImpl.prototype.item = function (index) { + /** + * 1. If index is equal to or greater than context object’s attribute list’s + * size, then return null. + * 2. Otherwise, return context object’s attribute list[index]. + * + */ + return this[index] || null; + }; + /** @inheritdoc */ + NamedNodeMapImpl.prototype.getNamedItem = function (qualifiedName) { + /** + * The getNamedItem(qualifiedName) method, when invoked, must return the + * result of getting an attribute given qualifiedName and element. + */ + return algorithm_1.element_getAnAttributeByName(qualifiedName, this._element); + }; + /** @inheritdoc */ + NamedNodeMapImpl.prototype.getNamedItemNS = function (namespace, localName) { + /** + * The getNamedItemNS(namespace, localName) method, when invoked, must + * return the result of getting an attribute given namespace, localName, + * and element. + */ + return algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace || '', localName, this._element); + }; + /** @inheritdoc */ + NamedNodeMapImpl.prototype.setNamedItem = function (attr) { + /** + * The setNamedItem(attr) and setNamedItemNS(attr) methods, when invoked, + * must return the result of setting an attribute given attr and element. + */ + return algorithm_1.element_setAnAttribute(attr, this._element); + }; + /** @inheritdoc */ + NamedNodeMapImpl.prototype.setNamedItemNS = function (attr) { + return algorithm_1.element_setAnAttribute(attr, this._element); + }; + /** @inheritdoc */ + NamedNodeMapImpl.prototype.removeNamedItem = function (qualifiedName) { + /** + * 1. Let attr be the result of removing an attribute given qualifiedName + * and element. + * 2. If attr is null, then throw a "NotFoundError" DOMException. + * 3. Return attr. + */ + var attr = algorithm_1.element_removeAnAttributeByName(qualifiedName, this._element); + if (attr === null) + throw new DOMException_1.NotFoundError(); + return attr; + }; + /** @inheritdoc */ + NamedNodeMapImpl.prototype.removeNamedItemNS = function (namespace, localName) { + /** + * 1. Let attr be the result of removing an attribute given namespace, + * localName, and element. + * 2. If attr is null, then throw a "NotFoundError" DOMException. + * 3. Return attr. + */ + var attr = algorithm_1.element_removeAnAttributeByNamespaceAndLocalName(namespace || '', localName, this._element); + if (attr === null) + throw new DOMException_1.NotFoundError(); + return attr; + }; /** - * 2. If listener’s callback is null, then return. + * Creates a new `NamedNodeMap`. + * + * @param element - parent element */ - if (listener.callback === null) - return; + NamedNodeMapImpl._create = function (element) { + return new NamedNodeMapImpl(element); + }; + return NamedNodeMapImpl; +}(Array)); +exports.NamedNodeMapImpl = NamedNodeMapImpl; +//# sourceMappingURL=NamedNodeMapImpl.js.map + +/***/ }), + +/***/ 12355: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +/** + * Represents a node filter. + */ +var NodeFilterImpl = /** @class */ (function () { /** - * 3. If eventTarget’s event listener list does not contain an event listener - * whose type is listener’s type, callback is listener’s callback, and capture - * is listener’s capture, then append listener to eventTarget’s event listener - * list. + * Initializes a new instance of `NodeFilter`. */ - for (var i = 0; i < eventTarget._eventListenerList.length; i++) { - var entry = eventTarget._eventListenerList[i]; - if (entry.type === listener.type && entry.callback.handleEvent === listener.callback.handleEvent - && entry.capture === listener.capture) { - return; - } + function NodeFilterImpl() { } - eventTarget._eventListenerList.push(listener); -} -exports.eventTarget_addEventListener = eventTarget_addEventListener; -/** - * Removes an event listener. - * - * @param eventTarget - event target - * @param listener - event listener - */ -function eventTarget_removeEventListener(eventTarget, listener, index) { /** - * 1. If eventTarget is a ServiceWorkerGlobalScope object and its service - * worker’s set of event types to handle contains type, then report a - * warning to the console that this might not give the expected results. - * [SERVICE-WORKERS] + * Callback function. */ - // TODO: service worker + NodeFilterImpl.prototype.acceptNode = function (node) { + return interfaces_1.FilterResult.Accept; + }; /** - * 2. Set listener’s removed to true and remove listener from eventTarget’s - * event listener list. + * Creates a new `NodeFilter`. */ - listener.removed = true; - eventTarget._eventListenerList.splice(index, 1); -} -exports.eventTarget_removeEventListener = eventTarget_removeEventListener; + NodeFilterImpl._create = function () { + return new NodeFilterImpl(); + }; + NodeFilterImpl.FILTER_ACCEPT = 1; + NodeFilterImpl.FILTER_REJECT = 2; + NodeFilterImpl.FILTER_SKIP = 3; + NodeFilterImpl.SHOW_ALL = 0xffffffff; + NodeFilterImpl.SHOW_ELEMENT = 0x1; + NodeFilterImpl.SHOW_ATTRIBUTE = 0x2; + NodeFilterImpl.SHOW_TEXT = 0x4; + NodeFilterImpl.SHOW_CDATA_SECTION = 0x8; + NodeFilterImpl.SHOW_ENTITY_REFERENCE = 0x10; + NodeFilterImpl.SHOW_ENTITY = 0x20; + NodeFilterImpl.SHOW_PROCESSING_INSTRUCTION = 0x40; + NodeFilterImpl.SHOW_COMMENT = 0x80; + NodeFilterImpl.SHOW_DOCUMENT = 0x100; + NodeFilterImpl.SHOW_DOCUMENT_TYPE = 0x200; + NodeFilterImpl.SHOW_DOCUMENT_FRAGMENT = 0x400; + NodeFilterImpl.SHOW_NOTATION = 0x800; + return NodeFilterImpl; +}()); +exports.NodeFilterImpl = NodeFilterImpl; /** - * Removes all event listeners. - * - * @param eventTarget - event target + * Define constants on prototype. */ -function eventTarget_removeAllEventListeners(eventTarget) { - /** - * To remove all event listeners, given an EventTarget object eventTarget, - * for each listener of eventTarget’s event listener list, remove an event - * listener with eventTarget and listener. - */ - var e_1, _a; - try { - for (var _b = __values(eventTarget._eventListenerList), _c = _b.next(); !_c.done; _c = _b.next()) { - var e = _c.value; - e.removed = true; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - eventTarget._eventListenerList.length = 0; -} -exports.eventTarget_removeAllEventListeners = eventTarget_removeAllEventListeners; -//# sourceMappingURL=EventTargetAlgorithm.js.map +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_ACCEPT", 1); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_REJECT", 2); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_SKIP", 3); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ALL", 0xffffffff); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ELEMENT", 0x1); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ATTRIBUTE", 0x2); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_TEXT", 0x4); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_CDATA_SECTION", 0x8); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ENTITY_REFERENCE", 0x10); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ENTITY", 0x20); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_PROCESSING_INSTRUCTION", 0x40); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_COMMENT", 0x80); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT", 0x100); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT_TYPE", 0x200); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT_FRAGMENT", 0x400); +WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_NOTATION", 0x800); +//# sourceMappingURL=NodeFilterImpl.js.map /***/ }), -/***/ 45463: +/***/ 91745: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); @@ -45944,1175 +29880,1715 @@ var __values = (this && this.__values) || function(o) { }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); var DOMImpl_1 = __nccwpck_require__(14177); -var DOMException_1 = __nccwpck_require__(13166); var interfaces_1 = __nccwpck_require__(27305); +var EventTargetImpl_1 = __nccwpck_require__(69968); var util_1 = __nccwpck_require__(65282); -var util_2 = __nccwpck_require__(76195); -var infra_1 = __nccwpck_require__(84251); -var CustomElementAlgorithm_1 = __nccwpck_require__(35648); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var NodeIteratorAlgorithm_1 = __nccwpck_require__(3973); -var ShadowTreeAlgorithm_1 = __nccwpck_require__(68733); -var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); -var DOMAlgorithm_1 = __nccwpck_require__(9628); -var DocumentAlgorithm_1 = __nccwpck_require__(12793); +var DOMException_1 = __nccwpck_require__(13166); +var algorithm_1 = __nccwpck_require__(61); +var URLAlgorithm_1 = __nccwpck_require__(53568); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Ensures pre-insertion validity of a node into a parent before a - * child. - * - * @param node - node to insert - * @param parent - parent node to receive node - * @param child - child node to insert node before + * Represents a generic XML node. */ -function mutation_ensurePreInsertionValidity(node, parent, child) { - var e_1, _a, e_2, _b, e_3, _c, e_4, _d; - var parentNodeType = parent._nodeType; - var nodeNodeType = node._nodeType; - var childNodeType = child ? child._nodeType : null; - /** - * 1. If parent is not a Document, DocumentFragment, or Element node, - * throw a "HierarchyRequestError" DOMException. - */ - if (parentNodeType !== interfaces_1.NodeType.Document && - parentNodeType !== interfaces_1.NodeType.DocumentFragment && - parentNodeType !== interfaces_1.NodeType.Element) - throw new DOMException_1.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is " + parent.nodeName + "."); - /** - * 2. If node is a host-including inclusive ancestor of parent, throw a - * "HierarchyRequestError" DOMException. - */ - if (TreeAlgorithm_1.tree_isHostIncludingAncestorOf(parent, node, true)) - throw new DOMException_1.HierarchyRequestError("The node to be inserted cannot be an inclusive ancestor of parent node. Node is " + node.nodeName + ", parent node is " + parent.nodeName + "."); - /** - * 3. If child is not null and its parent is not parent, then throw a - * "NotFoundError" DOMException. - */ - if (child !== null && child._parent !== parent) - throw new DOMException_1.NotFoundError("The reference child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + "."); - /** - * 4. If node is not a DocumentFragment, DocumentType, Element, Text, - * ProcessingInstruction, or Comment node, throw a "HierarchyRequestError" - * DOMException. - */ - if (nodeNodeType !== interfaces_1.NodeType.DocumentFragment && - nodeNodeType !== interfaces_1.NodeType.DocumentType && - nodeNodeType !== interfaces_1.NodeType.Element && - nodeNodeType !== interfaces_1.NodeType.Text && - nodeNodeType !== interfaces_1.NodeType.ProcessingInstruction && - nodeNodeType !== interfaces_1.NodeType.CData && - nodeNodeType !== interfaces_1.NodeType.Comment) - throw new DOMException_1.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is " + node.nodeName + "."); +var NodeImpl = /** @class */ (function (_super) { + __extends(NodeImpl, _super); /** - * 5. If either node is a Text node and parent is a document, or node is a - * doctype and parent is not a document, throw a "HierarchyRequestError" - * DOMException. + * Initializes a new instance of `Node`. */ - if (nodeNodeType === interfaces_1.NodeType.Text && - parentNodeType === interfaces_1.NodeType.Document) - throw new DOMException_1.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is " + node.nodeName + "."); - if (nodeNodeType === interfaces_1.NodeType.DocumentType && - parentNodeType !== interfaces_1.NodeType.Document) - throw new DOMException_1.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is " + parent.nodeName + "."); + function NodeImpl() { + var _this = _super.call(this) || this; + _this._parent = null; + _this._firstChild = null; + _this._lastChild = null; + _this._previousSibling = null; + _this._nextSibling = null; + return _this; + } + Object.defineProperty(NodeImpl.prototype, "_childNodes", { + get: function () { + return this.__childNodes || (this.__childNodes = algorithm_1.create_nodeList(this)); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "_nodeDocument", { + get: function () { return this._nodeDocumentOverride || DOMImpl_1.dom.window._associatedDocument; }, + set: function (val) { this._nodeDocumentOverride = val; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "_registeredObserverList", { + get: function () { + return this.__registeredObserverList || (this.__registeredObserverList = []); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "nodeType", { + /** @inheritdoc */ + get: function () { return this._nodeType; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "nodeName", { + /** + * Returns a string appropriate for the type of node. + */ + get: function () { + if (util_1.Guard.isElementNode(this)) { + return this._htmlUppercasedQualifiedName; + } + else if (util_1.Guard.isAttrNode(this)) { + return this._qualifiedName; + } + else if (util_1.Guard.isExclusiveTextNode(this)) { + return "#text"; + } + else if (util_1.Guard.isCDATASectionNode(this)) { + return "#cdata-section"; + } + else if (util_1.Guard.isProcessingInstructionNode(this)) { + return this._target; + } + else if (util_1.Guard.isCommentNode(this)) { + return "#comment"; + } + else if (util_1.Guard.isDocumentNode(this)) { + return "#document"; + } + else if (util_1.Guard.isDocumentTypeNode(this)) { + return this._name; + } + else if (util_1.Guard.isDocumentFragmentNode(this)) { + return "#document-fragment"; + } + else { + return ""; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "baseURI", { + /** + * Gets the absolute base URL of the node. + */ + get: function () { + /** + * The baseURI attribute’s getter must return node document’s document + * base URL, serialized. + * TODO: Implement in HTML DOM + * https://html.spec.whatwg.org/multipage/urls-and-fetching.html#document-base-url + */ + return URLAlgorithm_1.urlSerializer(this._nodeDocument._URL); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "isConnected", { + /** + * Returns whether the node is rooted to a document node. + */ + get: function () { + /** + * The isConnected attribute’s getter must return true, if context object + * is connected, and false otherwise. + */ + return util_1.Guard.isElementNode(this) && algorithm_1.shadowTree_isConnected(this); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "ownerDocument", { + /** + * Returns the parent document. + */ + get: function () { + /** + * The ownerDocument attribute’s getter must return null, if the context + * object is a document, and the context object’s node document otherwise. + * _Note:_ The node document of a document is that document itself. All + * nodes have a node document at all times. + */ + if (this._nodeType === interfaces_1.NodeType.Document) + return null; + else + return this._nodeDocument; + }, + enumerable: true, + configurable: true + }); /** - * 6. If parent is a document, and any of the statements below, switched on - * node, are true, throw a "HierarchyRequestError" DOMException. - * - DocumentFragment node - * If node has more than one element child or has a Text node child. - * Otherwise, if node has one element child and either parent has an element - * child, child is a doctype, or child is not null and a doctype is - * following child. - * - element - * parent has an element child, child is a doctype, or child is not null and - * a doctype is following child. - * - doctype - * parent has a doctype child, child is non-null and an element is preceding - * child, or child is null and parent has an element child. + * Returns the root node. + * + * @param options - if options has `composed = true` this function + * returns the node's shadow-including root, otherwise it returns + * the node's root node. */ - if (parentNodeType === interfaces_1.NodeType.Document) { - if (nodeNodeType === interfaces_1.NodeType.DocumentFragment) { - var eleCount = 0; - try { - for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) { - var childNode = _f.value; - if (childNode._nodeType === interfaces_1.NodeType.Element) - eleCount++; - else if (childNode._nodeType === interfaces_1.NodeType.Text) - throw new DOMException_1.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is " + childNode.nodeName + "."); - } + NodeImpl.prototype.getRootNode = function (options) { + /** + * The getRootNode(options) method, when invoked, must return context + * object’s shadow-including root if options’s composed is true, + * and context object’s root otherwise. + */ + return algorithm_1.tree_rootNode(this, !!options && options.composed); + }; + Object.defineProperty(NodeImpl.prototype, "parentNode", { + /** + * Returns the parent node. + */ + get: function () { + /** + * The parentNode attribute’s getter must return the context object’s parent. + * _Note:_ An Attr node has no parent. + */ + if (this._nodeType === interfaces_1.NodeType.Attribute) { + return null; } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_f && !_f.done && (_a = _e.return)) _a.call(_e); - } - finally { if (e_1) throw e_1.error; } + else { + return this._parent; } - if (eleCount > 1) { - throw new DOMException_1.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has " + eleCount + " element nodes."); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "parentElement", { + /** + * Returns the parent element. + */ + get: function () { + /** + * The parentElement attribute’s getter must return the context object’s + * parent element. + */ + if (this._parent && util_1.Guard.isElementNode(this._parent)) { + return this._parent; } - else if (eleCount === 1) { - try { - for (var _g = __values(parent._children), _h = _g.next(); !_h.done; _h = _g.next()) { - var ele = _h.value; - if (ele._nodeType === interfaces_1.NodeType.Element) - throw new DOMException_1.HierarchyRequestError("The document node already has a document element node."); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_h && !_h.done && (_b = _g.return)) _b.call(_g); - } - finally { if (e_2) throw e_2.error; } - } - if (child) { - if (childNodeType === interfaces_1.NodeType.DocumentType) - throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node."); - var doctypeChild = child._nextSibling; - while (doctypeChild) { - if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) - throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node."); - doctypeChild = doctypeChild._nextSibling; - } - } + else { + return null; } - } - else if (nodeNodeType === interfaces_1.NodeType.Element) { - try { - for (var _j = __values(parent._children), _k = _j.next(); !_k.done; _k = _j.next()) { - var ele = _k.value; - if (ele._nodeType === interfaces_1.NodeType.Element) - throw new DOMException_1.HierarchyRequestError("Document already has a document element node. Node is " + node.nodeName + "."); - } + }, + enumerable: true, + configurable: true + }); + /** + * Determines whether a node has any children. + */ + NodeImpl.prototype.hasChildNodes = function () { + /** + * The hasChildNodes() method, when invoked, must return true if the context + * object has children, and false otherwise. + */ + return (this._firstChild !== null); + }; + Object.defineProperty(NodeImpl.prototype, "childNodes", { + /** + * Returns a {@link NodeList} of child nodes. + */ + get: function () { + /** + * The childNodes attribute’s getter must return a NodeList rooted at the + * context object matching only children. + */ + return this._childNodes; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "firstChild", { + /** + * Returns the first child node. + */ + get: function () { + /** + * The firstChild attribute’s getter must return the context object’s first + * child. + */ + return this._firstChild; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "lastChild", { + /** + * Returns the last child node. + */ + get: function () { + /** + * The lastChild attribute’s getter must return the context object’s last + * child. + */ + return this._lastChild; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "previousSibling", { + /** + * Returns the previous sibling node. + */ + get: function () { + /** + * The previousSibling attribute’s getter must return the context object’s + * previous sibling. + * _Note:_ An Attr node has no siblings. + */ + return this._previousSibling; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "nextSibling", { + /** + * Returns the next sibling node. + */ + get: function () { + /** + * The nextSibling attribute’s getter must return the context object’s + * next sibling. + */ + return this._nextSibling; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "nodeValue", { + /** + * Gets or sets the data associated with a {@link CharacterData} node or the + * value of an {@link @Attr} node. For other node types returns `null`. + */ + get: function () { + if (util_1.Guard.isAttrNode(this)) { + return this._value; } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_k && !_k.done && (_c = _j.return)) _c.call(_j); - } - finally { if (e_3) throw e_3.error; } + else if (util_1.Guard.isCharacterDataNode(this)) { + return this._data; } - if (child) { - if (childNodeType === interfaces_1.NodeType.DocumentType) - throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + "."); - var doctypeChild = child._nextSibling; - while (doctypeChild) { - if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) - throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + "."); - doctypeChild = doctypeChild._nextSibling; - } + else { + return null; } - } - else if (nodeNodeType === interfaces_1.NodeType.DocumentType) { - try { - for (var _l = __values(parent._children), _m = _l.next(); !_m.done; _m = _l.next()) { - var ele = _m.value; - if (ele._nodeType === interfaces_1.NodeType.DocumentType) - throw new DOMException_1.HierarchyRequestError("Document already has a document type node. Node is " + node.nodeName + "."); - } + }, + set: function (value) { + if (value === null) { + value = ''; } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (_m && !_m.done && (_d = _l.return)) _d.call(_l); - } - finally { if (e_4) throw e_4.error; } + if (util_1.Guard.isAttrNode(this)) { + algorithm_1.attr_setAnExistingAttributeValue(this, value); } - if (child) { - var elementChild = child._previousSibling; - while (elementChild) { - if (elementChild._nodeType === interfaces_1.NodeType.Element) - throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + "."); - elementChild = elementChild._previousSibling; - } + else if (util_1.Guard.isCharacterDataNode(this)) { + algorithm_1.characterData_replaceData(this, 0, this._data.length, value); + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeImpl.prototype, "textContent", { + /** + * Returns the concatenation of data of all the {@link Text} + * node descendants in tree order. When set, replaces the text + * contents of the node with the given value. + */ + get: function () { + if (util_1.Guard.isDocumentFragmentNode(this) || util_1.Guard.isElementNode(this)) { + return algorithm_1.text_descendantTextContent(this); + } + else if (util_1.Guard.isAttrNode(this)) { + return this._value; + } + else if (util_1.Guard.isCharacterDataNode(this)) { + return this._data; } else { - var elementChild = parent._firstChild; - while (elementChild) { - if (elementChild._nodeType === interfaces_1.NodeType.Element) - throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + "."); - elementChild = elementChild._nextSibling; - } + return null; } - } - } -} -exports.mutation_ensurePreInsertionValidity = mutation_ensurePreInsertionValidity; -/** - * Ensures pre-insertion validity of a node into a parent before a - * child, then adopts the node to the tree and inserts it. - * - * @param node - node to insert - * @param parent - parent node to receive node - * @param child - child node to insert node before - */ -function mutation_preInsert(node, parent, child) { - /** - * 1. Ensure pre-insertion validity of node into parent before child. - * 2. Let reference child be child. - * 3. If reference child is node, set it to node’s next sibling. - * 4. Adopt node into parent’s node document. - * 5. Insert node into parent before reference child. - * 6. Return node. - */ - mutation_ensurePreInsertionValidity(node, parent, child); - var referenceChild = child; - if (referenceChild === node) - referenceChild = node._nextSibling; - DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument); - mutation_insert(node, parent, referenceChild); - return node; -} -exports.mutation_preInsert = mutation_preInsert; -/** - * Inserts a node into a parent node before the given child node. - * - * @param node - node to insert - * @param parent - parent node to receive node - * @param child - child node to insert node before - * @param suppressObservers - whether to notify observers - */ -function mutation_insert(node, parent, child, suppressObservers) { - var e_5, _a; - // Optimized common case - if (child === null && node._nodeType !== interfaces_1.NodeType.DocumentFragment) { - mutation_insert_single(node, parent, suppressObservers); - return; - } - /** - * 1. Let count be the number of children of node if it is a - * DocumentFragment node, and one otherwise. - */ - var count = (node._nodeType === interfaces_1.NodeType.DocumentFragment ? - node._children.size : 1); + }, + set: function (value) { + if (value === null) { + value = ''; + } + if (util_1.Guard.isDocumentFragmentNode(this) || util_1.Guard.isElementNode(this)) { + algorithm_1.node_stringReplaceAll(value, this); + } + else if (util_1.Guard.isAttrNode(this)) { + algorithm_1.attr_setAnExistingAttributeValue(this, value); + } + else if (util_1.Guard.isCharacterDataNode(this)) { + algorithm_1.characterData_replaceData(this, 0, algorithm_1.tree_nodeLength(this), value); + } + }, + enumerable: true, + configurable: true + }); /** - * 2. If child is non-null, then: + * Puts all {@link Text} nodes in the full depth of the sub-tree + * underneath this node into a "normal" form where only markup + * (e.g., tags, comments, processing instructions, CDATA sections, + * and entity references) separates {@link Text} nodes, i.e., there + * are no adjacent Text nodes. */ - if (child !== null) { + NodeImpl.prototype.normalize = function () { + var e_1, _a, e_2, _b; /** - * 2.1. For each live range whose start node is parent and start - * offset is greater than child's index, increase its start - * offset by count. - * 2.2. For each live range whose end node is parent and end - * offset is greater than child's index, increase its end - * offset by count. + * The normalize() method, when invoked, must run these steps for each + * descendant exclusive Text node node of context object: */ - if (DOMImpl_1.dom.rangeList.size !== 0) { - var index_1 = TreeAlgorithm_1.tree_index(child); + var descendantNodes = []; + var node = algorithm_1.tree_getFirstDescendantNode(this, false, false, function (e) { return util_1.Guard.isExclusiveTextNode(e); }); + while (node !== null) { + descendantNodes.push(node); + node = algorithm_1.tree_getNextDescendantNode(this, node, false, false, function (e) { return util_1.Guard.isExclusiveTextNode(e); }); + } + for (var i = 0; i < descendantNodes.length; i++) { + var node_1 = descendantNodes[i]; + if (node_1._parent === null) + continue; + /** + * 1. Let length be node’s length. + * 2. If length is zero, then remove node and continue with the next + * exclusive Text node, if any. + */ + var length = algorithm_1.tree_nodeLength(node_1); + if (length === 0) { + algorithm_1.mutation_remove(node_1, node_1._parent); + continue; + } + /** + * 3. Let data be the concatenation of the data of node’s contiguous + * exclusive Text nodes (excluding itself), in tree order. + */ + var textSiblings = []; + var data = ''; try { - for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) { - var range = _c.value; - if (range._start[0] === parent && range._start[1] > index_1) { - range._start[1] += count; - } - if (range._end[0] === parent && range._end[1] > index_1) { - range._end[1] += count; - } + for (var _c = (e_1 = void 0, __values(algorithm_1.text_contiguousExclusiveTextNodes(node_1))), _d = _c.next(); !_d.done; _d = _c.next()) { + var sibling = _d.value; + textSiblings.push(sibling); + data += sibling._data; } } - catch (e_5_1) { e_5 = { error: e_5_1 }; } + catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } - finally { if (e_5) throw e_5.error; } + finally { if (e_1) throw e_1.error; } } - } - } - /** - * 3. Let nodes be node’s children, if node is a DocumentFragment node; - * otherwise « node ». - */ - var nodes = node._nodeType === interfaces_1.NodeType.DocumentFragment ? new (Array.bind.apply(Array, __spread([void 0], node._children)))() : [node]; - /** - * 4. If node is a DocumentFragment node, remove its children with the - * suppress observers flag set. - */ - if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { - while (node._firstChild) { - mutation_remove(node._firstChild, node, true); - } - } - /** - * 5. If node is a DocumentFragment node, then queue a tree mutation record - * for node with « », nodes, null, and null. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { - MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(node, [], nodes, null, null); - } - } - /** - * 6. Let previousSibling be child’s previous sibling or parent’s last - * child if child is null. - */ - var previousSibling = (child ? child._previousSibling : parent._lastChild); - var index = child === null ? -1 : TreeAlgorithm_1.tree_index(child); - /** - * 7. For each node in nodes, in tree order: - */ - for (var i = 0; i < nodes.length; i++) { - var node_1 = nodes[i]; - if (util_1.Guard.isElementNode(node_1)) { - // set document element node - if (util_1.Guard.isDocumentNode(parent)) { - parent._documentElement = node_1; + /** + * 4. Replace data with node node, offset length, count 0, and data data. + */ + algorithm_1.characterData_replaceData(node_1, length, 0, data); + /** + * 5. Let currentNode be node’s next sibling. + * 6. While currentNode is an exclusive Text node: + */ + if (DOMImpl_1.dom.rangeList.size !== 0) { + var currentNode = node_1._nextSibling; + while (currentNode !== null && util_1.Guard.isExclusiveTextNode(currentNode)) { + /** + * 6.1. For each live range whose start node is currentNode, add length + * to its start offset and set its start node to node. + * 6.2. For each live range whose end node is currentNode, add length to + * its end offset and set its end node to node. + * 6.3. For each live range whose start node is currentNode’s parent and + * start offset is currentNode’s index, set its start node to node and + * its start offset to length. + * 6.4. For each live range whose end node is currentNode’s parent and + * end offset is currentNode’s index, set its end node to node and its + * end offset to length. + */ + var cn = currentNode; + var index = algorithm_1.tree_index(cn); + try { + for (var _e = (e_2 = void 0, __values(DOMImpl_1.dom.rangeList)), _f = _e.next(); !_f.done; _f = _e.next()) { + var range = _f.value; + if (range._start[0] === cn) { + range._start[0] = node_1; + range._start[1] += length; + } + if (range._end[0] === cn) { + range._end[0] = node_1; + range._end[1] += length; + } + if (range._start[0] === cn._parent && range._start[1] === index) { + range._start[0] = node_1; + range._start[1] = length; + } + if (range._end[0] === cn._parent && range._end[1] === index) { + range._end[0] = node_1; + range._end[1] = length; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_2) throw e_2.error; } + } + /** + * 6.5. Add currentNode’s length to length. + * 6.6. Set currentNode to its next sibling. + */ + length += algorithm_1.tree_nodeLength(currentNode); + currentNode = currentNode._nextSibling; + } } - // mark that the document has namespaces - if (!node_1._nodeDocument._hasNamespaces && (node_1._namespace !== null || - node_1._namespacePrefix !== null)) { - node_1._nodeDocument._hasNamespaces = true; + /** + * 7. Remove node’s contiguous exclusive Text nodes (excluding itself), + * in tree order. + */ + for (var i_1 = 0; i_1 < textSiblings.length; i_1++) { + var sibling = textSiblings[i_1]; + if (sibling._parent === null) + continue; + algorithm_1.mutation_remove(sibling, sibling._parent); } } + }; + /** + * Returns a duplicate of this node, i.e., serves as a generic copy + * constructor for nodes. The duplicate node has no parent + * ({@link parentNode} returns `null`). + * + * @param deep - if `true`, recursively clone the subtree under the + * specified node. If `false`, clone only the node itself (and its + * attributes, if it is an {@link Element}). + */ + NodeImpl.prototype.cloneNode = function (deep) { + if (deep === void 0) { deep = false; } /** - * 7.1. If child is null, then append node to parent’s children. - * 7.2. Otherwise, insert node into parent’s children before child’s - * index. + * 1. If context object is a shadow root, then throw a "NotSupportedError" + * DOMException. + * 2. Return a clone of the context object, with the clone children flag set + * if deep is true. */ - node_1._parent = parent; - if (child === null) { - infra_1.set.append(parent._children, node_1); - } - else { - infra_1.set.insert(parent._children, node_1, index); - index++; - } - // assign siblings and children for quick lookups - if (parent._firstChild === null) { - node_1._previousSibling = null; - node_1._nextSibling = null; - parent._firstChild = node_1; - parent._lastChild = node_1; - } - else { - var prev = (child ? child._previousSibling : parent._lastChild); - var next = (child ? child : null); - node_1._previousSibling = prev; - node_1._nextSibling = next; - if (prev) - prev._nextSibling = node_1; - if (next) - next._previousSibling = node_1; - if (!prev) - parent._firstChild = node_1; - if (!next) - parent._lastChild = node_1; - } + if (util_1.Guard.isShadowRoot(this)) + throw new DOMException_1.NotSupportedError(); + return algorithm_1.node_clone(this, null, deep); + }; + /** + * Determines if the given node is equal to this one. + * + * @param node - the node to compare with + */ + NodeImpl.prototype.isEqualNode = function (node) { + if (node === void 0) { node = null; } /** - * 7.3. If parent is a shadow host and node is a slotable, then - * assign a slot for node. + * The isEqualNode(otherNode) method, when invoked, must return true if + * otherNode is non-null and context object equals otherNode, and false + * otherwise. */ - if (DOMImpl_1.dom.features.slots) { - if (parent._shadowRoot !== null && util_1.Guard.isSlotable(node_1)) { - ShadowTreeAlgorithm_1.shadowTree_assignASlot(node_1); - } - } + return (node !== null && algorithm_1.node_equals(this, node)); + }; + /** + * Determines if the given node is reference equal to this one. + * + * @param node - the node to compare with + */ + NodeImpl.prototype.isSameNode = function (node) { + if (node === void 0) { node = null; } /** - * 7.4. If node is a Text node, run the child text content change - * steps for parent. + * The isSameNode(otherNode) method, when invoked, must return true if + * otherNode is context object, and false otherwise. */ - if (DOMImpl_1.dom.features.steps) { - if (util_1.Guard.isTextNode(node_1)) { - DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent); - } - } + return (this === node); + }; + /** + * Returns a bitmask indicating the position of the given `node` + * relative to this node. + */ + NodeImpl.prototype.compareDocumentPosition = function (other) { /** - * 7.5. If parent's root is a shadow root, and parent is a slot - * whose assigned nodes is the empty list, then run signal - * a slot change for parent. + * 1. If context object is other, then return zero. + * 2. Let node1 be other and node2 be context object. + * 3. Let attr1 and attr2 be null. + * attr1’s element. */ - if (DOMImpl_1.dom.features.slots) { - if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) && - util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) { - ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent); - } - } + if (other === this) + return 0; + var node1 = other; + var node2 = this; + var attr1 = null; + var attr2 = null; /** - * 7.6. Run assign slotables for a tree with node's root. + * 4. If node1 is an attribute, then set attr1 to node1 and node1 to + * attr1’s element. */ - if (DOMImpl_1.dom.features.slots) { - ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(node_1)); + if (util_1.Guard.isAttrNode(node1)) { + attr1 = node1; + node1 = attr1._element; } /** - * 7.7. For each shadow-including inclusive descendant - * inclusiveDescendant of node, in shadow-including tree - * order: + * 5. If node2 is an attribute, then: */ - var inclusiveDescendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node_1, true, true); - while (inclusiveDescendant !== null) { + if (util_1.Guard.isAttrNode(node2)) { /** - * 7.7.1. Run the insertion steps with inclusiveDescendant. + * 5.1. Set attr2 to node2 and node2 to attr2’s element. */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runInsertionSteps(inclusiveDescendant); - } - if (DOMImpl_1.dom.features.customElements) { + attr2 = node2; + node2 = attr2._element; + /** + * 5.2. If attr1 and node1 are non-null, and node2 is node1, then: + */ + if (attr1 && node1 && (node1 === node2)) { /** - * 7.7.2. If inclusiveDescendant is connected, then: + * 5.2. For each attr in node2’s attribute list: */ - if (util_1.Guard.isElementNode(inclusiveDescendant) && - ShadowTreeAlgorithm_1.shadowTree_isConnected(inclusiveDescendant)) { - if (util_1.Guard.isCustomElementNode(inclusiveDescendant)) { - /** - * 7.7.2.1. If inclusiveDescendant is custom, then enqueue a custom - * element callback reaction with inclusiveDescendant, callback name - * "connectedCallback", and an empty argument list. - */ - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(inclusiveDescendant, "connectedCallback", []); + for (var i = 0; i < node2._attributeList.length; i++) { + var attr = node2._attributeList[i]; + /** + * 5.2.1. If attr equals attr1, then return the result of adding + * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC and + * DOCUMENT_POSITION_PRECEDING. + * 5.2.2. If attr equals attr2, then return the result of adding + * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC and + * DOCUMENT_POSITION_FOLLOWING. + */ + if (algorithm_1.node_equals(attr, attr1)) { + return interfaces_1.Position.ImplementationSpecific | interfaces_1.Position.Preceding; } - else { - /** - * 7.7.2.2. Otherwise, try to upgrade inclusiveDescendant. - */ - CustomElementAlgorithm_1.customElement_tryToUpgrade(inclusiveDescendant); + else if (algorithm_1.node_equals(attr, attr2)) { + return interfaces_1.Position.ImplementationSpecific | interfaces_1.Position.Following; } } } - inclusiveDescendant = TreeAlgorithm_1.tree_getNextDescendantNode(node_1, inclusiveDescendant, true, true); - } - } - /** - * 8. If suppress observers flag is unset, then queue a tree mutation record - * for parent with nodes, « », previousSibling, and child. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - if (!suppressObservers) { - MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, nodes, [], previousSibling, child); - } - } -} -exports.mutation_insert = mutation_insert; -/** - * Inserts a node into a parent node. Optimized routine for the common case where - * node is not a document fragment node and it has no child nodes. - * - * @param node - node to insert - * @param parent - parent node to receive node - * @param suppressObservers - whether to notify observers - */ -function mutation_insert_single(node, parent, suppressObservers) { - /** - * 1. Let count be the number of children of node if it is a - * DocumentFragment node, and one otherwise. - * 2. If child is non-null, then: - * 2.1. For each live range whose start node is parent and start - * offset is greater than child's index, increase its start - * offset by count. - * 2.2. For each live range whose end node is parent and end - * offset is greater than child's index, increase its end - * offset by count. - * 3. Let nodes be node’s children, if node is a DocumentFragment node; - * otherwise « node ». - * 4. If node is a DocumentFragment node, remove its children with the - * suppress observers flag set. - * 5. If node is a DocumentFragment node, then queue a tree mutation record - * for node with « », nodes, null, and null. - */ - /** - * 6. Let previousSibling be child’s previous sibling or parent’s last - * child if child is null. - */ - var previousSibling = parent._lastChild; - // set document element node - if (util_1.Guard.isElementNode(node)) { - // set document element node - if (util_1.Guard.isDocumentNode(parent)) { - parent._documentElement = node; - } - // mark that the document has namespaces - if (!node._nodeDocument._hasNamespaces && (node._namespace !== null || - node._namespacePrefix !== null)) { - node._nodeDocument._hasNamespaces = true; - } - } - /** - * 7. For each node in nodes, in tree order: - * 7.1. If child is null, then append node to parent’s children. - * 7.2. Otherwise, insert node into parent’s children before child’s - * index. - */ - node._parent = parent; - parent._children.add(node); - // assign siblings and children for quick lookups - if (parent._firstChild === null) { - node._previousSibling = null; - node._nextSibling = null; - parent._firstChild = node; - parent._lastChild = node; - } - else { - var prev = parent._lastChild; - node._previousSibling = prev; - node._nextSibling = null; - if (prev) - prev._nextSibling = node; - if (!prev) - parent._firstChild = node; - parent._lastChild = node; - } - /** - * 7.3. If parent is a shadow host and node is a slotable, then - * assign a slot for node. - */ - if (DOMImpl_1.dom.features.slots) { - if (parent._shadowRoot !== null && util_1.Guard.isSlotable(node)) { - ShadowTreeAlgorithm_1.shadowTree_assignASlot(node); - } - } - /** - * 7.4. If node is a Text node, run the child text content change - * steps for parent. - */ - if (DOMImpl_1.dom.features.steps) { - if (util_1.Guard.isTextNode(node)) { - DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent); } - } - /** - * 7.5. If parent's root is a shadow root, and parent is a slot - * whose assigned nodes is the empty list, then run signal - * a slot change for parent. - */ - if (DOMImpl_1.dom.features.slots) { - if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) && - util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) { - ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent); + /** + * 6. If node1 or node2 is null, or node1’s root is not node2’s root, then + * return the result of adding DOCUMENT_POSITION_DISCONNECTED, + * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, and either + * DOCUMENT_POSITION_PRECEDING or DOCUMENT_POSITION_FOLLOWING, + * with the constraint that this is to be consistent, together. + */ + if (node1 === null || node2 === null || + algorithm_1.tree_rootNode(node1) !== algorithm_1.tree_rootNode(node2)) { + // nodes are disconnected + // return a random result but cache the value for consistency + return interfaces_1.Position.Disconnected | interfaces_1.Position.ImplementationSpecific | + (DOMImpl_1.dom.compareCache.check(this, other) ? interfaces_1.Position.Preceding : interfaces_1.Position.Following); } - } - /** - * 7.6. Run assign slotables for a tree with node's root. - */ - if (DOMImpl_1.dom.features.slots) { - ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(node)); - } - /** - * 7.7. For each shadow-including inclusive descendant - * inclusiveDescendant of node, in shadow-including tree - * order: - * 7.7.1. Run the insertion steps with inclusiveDescendant. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runInsertionSteps(node); - } - if (DOMImpl_1.dom.features.customElements) { /** - * 7.7.2. If inclusiveDescendant is connected, then: + * 7. If node1 is an ancestor of node2 and attr1 is null, or node1 is node2 + * and attr2 is non-null, then return the result of adding + * DOCUMENT_POSITION_CONTAINS to DOCUMENT_POSITION_PRECEDING. */ - if (util_1.Guard.isElementNode(node) && - ShadowTreeAlgorithm_1.shadowTree_isConnected(node)) { - if (util_1.Guard.isCustomElementNode(node)) { - /** - * 7.7.2.1. If inclusiveDescendant is custom, then enqueue a custom - * element callback reaction with inclusiveDescendant, callback name - * "connectedCallback", and an empty argument list. - */ - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(node, "connectedCallback", []); - } - else { - /** - * 7.7.2.2. Otherwise, try to upgrade inclusiveDescendant. - */ - CustomElementAlgorithm_1.customElement_tryToUpgrade(node); - } + if ((!attr1 && algorithm_1.tree_isAncestorOf(node2, node1)) || + (attr2 && (node1 === node2))) { + return interfaces_1.Position.Contains | interfaces_1.Position.Preceding; } - } - /** - * 8. If suppress observers flag is unset, then queue a tree mutation record - * for parent with nodes, « », previousSibling, and child. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - if (!suppressObservers) { - MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, [node], [], previousSibling, null); + /** + * 8. If node1 is a descendant of node2 and attr2 is null, or node1 is node2 + * and attr1 is non-null, then return the result of adding + * DOCUMENT_POSITION_CONTAINED_BY to DOCUMENT_POSITION_FOLLOWING. + */ + if ((!attr2 && algorithm_1.tree_isDescendantOf(node2, node1)) || + (attr1 && (node1 === node2))) { + return interfaces_1.Position.ContainedBy | interfaces_1.Position.Following; } - } -} -/** - * Appends a node to the children of a parent node. - * - * @param node - a node - * @param parent - the parent to receive node - */ -function mutation_append(node, parent) { - /** - * To append a node to a parent, pre-insert node into parent before null. - */ - return mutation_preInsert(node, parent, null); -} -exports.mutation_append = mutation_append; -/** - * Replaces a node with another node. - * - * @param child - child node to remove - * @param node - node to insert - * @param parent - parent node to receive node - */ -function mutation_replace(child, node, parent) { - var e_6, _a, e_7, _b, e_8, _c, e_9, _d; - /** - * 1. If parent is not a Document, DocumentFragment, or Element node, - * throw a "HierarchyRequestError" DOMException. - */ - if (parent._nodeType !== interfaces_1.NodeType.Document && - parent._nodeType !== interfaces_1.NodeType.DocumentFragment && - parent._nodeType !== interfaces_1.NodeType.Element) - throw new DOMException_1.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is " + parent.nodeName + "."); - /** - * 2. If node is a host-including inclusive ancestor of parent, throw a - * "HierarchyRequestError" DOMException. - */ - if (TreeAlgorithm_1.tree_isHostIncludingAncestorOf(parent, node, true)) - throw new DOMException_1.HierarchyRequestError("The node to be inserted cannot be an ancestor of parent node. Node is " + node.nodeName + ", parent node is " + parent.nodeName + "."); - /** - * 3. If child’s parent is not parent, then throw a "NotFoundError" - * DOMException. - */ - if (child._parent !== parent) - throw new DOMException_1.NotFoundError("The reference child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + "."); - /** - * 4. If node is not a DocumentFragment, DocumentType, Element, Text, - * ProcessingInstruction, or Comment node, throw a "HierarchyRequestError" - * DOMException. - */ - if (node._nodeType !== interfaces_1.NodeType.DocumentFragment && - node._nodeType !== interfaces_1.NodeType.DocumentType && - node._nodeType !== interfaces_1.NodeType.Element && - node._nodeType !== interfaces_1.NodeType.Text && - node._nodeType !== interfaces_1.NodeType.ProcessingInstruction && - node._nodeType !== interfaces_1.NodeType.CData && - node._nodeType !== interfaces_1.NodeType.Comment) - throw new DOMException_1.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is " + node.nodeName + "."); + /** + * 9. If node1 is preceding node2, then return DOCUMENT_POSITION_PRECEDING. + */ + if (algorithm_1.tree_isPreceding(node2, node1)) + return interfaces_1.Position.Preceding; + /** + * 10. Return DOCUMENT_POSITION_FOLLOWING. + */ + return interfaces_1.Position.Following; + }; /** - * 5. If either node is a Text node and parent is a document, or node is a - * doctype and parent is not a document, throw a "HierarchyRequestError" - * DOMException. + * Returns `true` if given node is an inclusive descendant of this + * node, and `false` otherwise (including when other node is `null`). + * + * @param other - the node to check */ - if (node._nodeType === interfaces_1.NodeType.Text && - parent._nodeType === interfaces_1.NodeType.Document) - throw new DOMException_1.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is " + node.nodeName + "."); - if (node._nodeType === interfaces_1.NodeType.DocumentType && - parent._nodeType !== interfaces_1.NodeType.Document) - throw new DOMException_1.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is " + parent.nodeName + "."); + NodeImpl.prototype.contains = function (other) { + /** + * The contains(other) method, when invoked, must return true if other is an + * inclusive descendant of context object, and false otherwise (including + * when other is null). + */ + if (other === null) + return false; + return algorithm_1.tree_isDescendantOf(this, other, true); + }; /** - * 6. If parent is a document, and any of the statements below, switched on - * node, are true, throw a "HierarchyRequestError" DOMException. - * - DocumentFragment node - * If node has more than one element child or has a Text node child. - * Otherwise, if node has one element child and either parent has an element - * child that is not child or a doctype is following child. - * - element - * parent has an element child that is not child or a doctype is - * following child. - * - doctype - * parent has a doctype child that is not child, or an element is - * preceding child. + * Returns the prefix for a given namespace URI, if present, and + * `null` if not. + * + * @param namespace - the namespace to search */ - if (parent._nodeType === interfaces_1.NodeType.Document) { - if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { - var eleCount = 0; - try { - for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) { - var childNode = _f.value; - if (childNode._nodeType === interfaces_1.NodeType.Element) - eleCount++; - else if (childNode._nodeType === interfaces_1.NodeType.Text) - throw new DOMException_1.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is " + childNode.nodeName + "."); - } - } - catch (e_6_1) { e_6 = { error: e_6_1 }; } - finally { - try { - if (_f && !_f.done && (_a = _e.return)) _a.call(_e); - } - finally { if (e_6) throw e_6.error; } - } - if (eleCount > 1) { - throw new DOMException_1.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has " + eleCount + " element nodes."); - } - else if (eleCount === 1) { - try { - for (var _g = __values(parent._children), _h = _g.next(); !_h.done; _h = _g.next()) { - var ele = _h.value; - if (ele._nodeType === interfaces_1.NodeType.Element && ele !== child) - throw new DOMException_1.HierarchyRequestError("The document node already has a document element node."); - } - } - catch (e_7_1) { e_7 = { error: e_7_1 }; } - finally { - try { - if (_h && !_h.done && (_b = _g.return)) _b.call(_g); - } - finally { if (e_7) throw e_7.error; } - } - var doctypeChild = child._nextSibling; - while (doctypeChild) { - if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) - throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node."); - doctypeChild = doctypeChild._nextSibling; - } - } + NodeImpl.prototype.lookupPrefix = function (namespace) { + /** + * 1. If namespace is null or the empty string, then return null. + * 2. Switch on the context object: + */ + if (!namespace) + return null; + if (util_1.Guard.isElementNode(this)) { + /** + * Return the result of locating a namespace prefix for it using + * namespace. + */ + return algorithm_1.node_locateANamespacePrefix(this, namespace); } - else if (node._nodeType === interfaces_1.NodeType.Element) { - try { - for (var _j = __values(parent._children), _k = _j.next(); !_k.done; _k = _j.next()) { - var ele = _k.value; - if (ele._nodeType === interfaces_1.NodeType.Element && ele !== child) - throw new DOMException_1.HierarchyRequestError("Document already has a document element node. Node is " + node.nodeName + "."); - } - } - catch (e_8_1) { e_8 = { error: e_8_1 }; } - finally { - try { - if (_k && !_k.done && (_c = _j.return)) _c.call(_j); - } - finally { if (e_8) throw e_8.error; } + else if (util_1.Guard.isDocumentNode(this)) { + /** + * Return the result of locating a namespace prefix for its document + * element, if its document element is non-null, and null otherwise. + */ + if (this.documentElement === null) { + return null; } - var doctypeChild = child._nextSibling; - while (doctypeChild) { - if (doctypeChild._nodeType === interfaces_1.NodeType.DocumentType) - throw new DOMException_1.HierarchyRequestError("Cannot insert an element node before a document type node. Node is " + node.nodeName + "."); - doctypeChild = doctypeChild._nextSibling; + else { + return algorithm_1.node_locateANamespacePrefix(this.documentElement, namespace); } } - else if (node._nodeType === interfaces_1.NodeType.DocumentType) { - try { - for (var _l = __values(parent._children), _m = _l.next(); !_m.done; _m = _l.next()) { - var ele = _m.value; - if (ele._nodeType === interfaces_1.NodeType.DocumentType && ele !== child) - throw new DOMException_1.HierarchyRequestError("Document already has a document type node. Node is " + node.nodeName + "."); - } + else if (util_1.Guard.isDocumentTypeNode(this) || util_1.Guard.isDocumentFragmentNode(this)) { + return null; + } + else if (util_1.Guard.isAttrNode(this)) { + /** + * Return the result of locating a namespace prefix for its element, + * if its element is non-null, and null otherwise. + */ + if (this._element === null) { + return null; } - catch (e_9_1) { e_9 = { error: e_9_1 }; } - finally { - try { - if (_m && !_m.done && (_d = _l.return)) _d.call(_l); - } - finally { if (e_9) throw e_9.error; } + else { + return algorithm_1.node_locateANamespacePrefix(this._element, namespace); } - var elementChild = child._previousSibling; - while (elementChild) { - if (elementChild._nodeType === interfaces_1.NodeType.Element) - throw new DOMException_1.HierarchyRequestError("Cannot insert a document type node before an element node. Node is " + node.nodeName + "."); - elementChild = elementChild._previousSibling; + } + else { + /** + * Return the result of locating a namespace prefix for its parent + * element, if its parent element is non-null, and null otherwise. + */ + if (this._parent !== null && util_1.Guard.isElementNode(this._parent)) { + return algorithm_1.node_locateANamespacePrefix(this._parent, namespace); + } + else { + return null; } } - } - /** - * 7. Let reference child be child’s next sibling. - * 8. If reference child is node, set it to node’s next sibling. - * 8. Let previousSibling be child’s previous sibling. - */ - var referenceChild = child._nextSibling; - if (referenceChild === node) - referenceChild = node._nextSibling; - var previousSibling = child._previousSibling; - /** - * 10. Adopt node into parent’s node document. - * 11. Let removedNodes be the empty list. - */ - DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument); - var removedNodes = []; + }; /** - * 12. If child’s parent is not null, then: + * Returns the namespace URI for a given prefix if present, and `null` + * if not. + * + * @param prefix - the prefix to search */ - if (child._parent !== null) { + NodeImpl.prototype.lookupNamespaceURI = function (prefix) { /** - * 12.1. Set removedNodes to [child]. - * 12.2. Remove child from its parent with the suppress observers flag - * set. + * 1. If prefix is the empty string, then set it to null. + * 2. Return the result of running locate a namespace for the context object + * using prefix. */ - removedNodes.push(child); - mutation_remove(child, child._parent, true); - } - /** - * 13. Let nodes be node’s children if node is a DocumentFragment node; - * otherwise [node]. - */ - var nodes = []; - if (node._nodeType === interfaces_1.NodeType.DocumentFragment) { - nodes = Array.from(node._children); - } - else { - nodes.push(node); - } + return algorithm_1.node_locateANamespace(this, prefix || null); + }; /** - * 14. Insert node into parent before reference child with the suppress - * observers flag set. + * Returns `true` if the namespace is the default namespace on this + * node or `false` if not. + * + * @param namespace - the namespace to check */ - mutation_insert(node, parent, referenceChild, true); + NodeImpl.prototype.isDefaultNamespace = function (namespace) { + /** + * 1. If namespace is the empty string, then set it to null. + * 2. Let defaultNamespace be the result of running locate a namespace for + * context object using null. + * 3. Return true if defaultNamespace is the same as namespace, and false otherwise. + */ + if (!namespace) + namespace = null; + var defaultNamespace = algorithm_1.node_locateANamespace(this, null); + return (defaultNamespace === namespace); + }; /** - * 15. Queue a tree mutation record for parent with nodes, removedNodes, - * previousSibling, and reference child. + * Inserts the node `newChild` before the existing child node + * `refChild`. If `refChild` is `null`, inserts `newChild` at the end + * of the list of children. + * + * If `newChild` is a {@link DocumentFragment} object, all of its + * children are inserted, in the same order, before `refChild`. + * + * If `newChild` is already in the tree, it is first removed. + * + * @param newChild - the node to insert + * @param refChild - the node before which the new node must be + * inserted + * + * @returns the newly inserted child node */ - if (DOMImpl_1.dom.features.mutationObservers) { - MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, nodes, removedNodes, previousSibling, referenceChild); - } + NodeImpl.prototype.insertBefore = function (newChild, refChild) { + /** + * The insertBefore(node, child) method, when invoked, must return the + * result of pre-inserting node into context object before child. + */ + return algorithm_1.mutation_preInsert(newChild, this, refChild); + }; /** - * 16. Return child. + * Adds the node `newChild` to the end of the list of children of this + * node, and returns it. If `newChild` is already in the tree, it is + * first removed. + * + * If `newChild` is a {@link DocumentFragment} object, the entire + * contents of the document fragment are moved into the child list of + * this node. + * + * @param newChild - the node to add + * + * @returns the newly inserted child node */ - return child; -} -exports.mutation_replace = mutation_replace; -/** - * Replaces all nodes of a parent with the given node. - * - * @param node - node to insert - * @param parent - parent node to receive node - */ -function mutation_replaceAll(node, parent) { - var e_10, _a; + NodeImpl.prototype.appendChild = function (newChild) { + /** + * The appendChild(node) method, when invoked, must return the result of + * appending node to context object. + */ + return algorithm_1.mutation_append(newChild, this); + }; /** - * 1. If node is not null, adopt node into parent’s node document. + * Replaces the child node `oldChild` with `newChild` in the list of + * children, and returns the `oldChild` node. If `newChild` is already + * in the tree, it is first removed. + * + * @param newChild - the new node to put in the child list + * @param oldChild - the node being replaced in the list + * + * @returns the removed child node */ - if (node !== null) { - DocumentAlgorithm_1.document_adopt(node, parent._nodeDocument); - } + NodeImpl.prototype.replaceChild = function (newChild, oldChild) { + /** + * The replaceChild(node, child) method, when invoked, must return the + * result of replacing child with node within context object. + */ + return algorithm_1.mutation_replace(oldChild, newChild, this); + }; /** - * 2. Let removedNodes be parent’s children. - */ - var removedNodes = Array.from(parent._children); + * Removes the child node indicated by `oldChild` from the list of + * children, and returns it. + * + * @param oldChild - the node being removed from the list + * + * @returns the removed child node + */ + NodeImpl.prototype.removeChild = function (oldChild) { + /** + * The removeChild(child) method, when invoked, must return the result of + * pre-removing child from context object. + */ + return algorithm_1.mutation_preRemove(oldChild, this); + }; /** - * 3. Let addedNodes be the empty list. - * 4. If node is DocumentFragment node, then set addedNodes to node’s - * children. - * 5. Otherwise, if node is non-null, set addedNodes to [node]. + * Gets the parent event target for the given event. + * + * @param event - an event */ - var addedNodes = []; - if (node && node._nodeType === interfaces_1.NodeType.DocumentFragment) { - addedNodes = Array.from(node._children); - } - else if (node !== null) { - addedNodes.push(node); - } - try { + NodeImpl.prototype._getTheParent = function (event) { /** - * 6. Remove all parent’s children, in tree order, with the suppress - * observers flag set. + * A node’s get the parent algorithm, given an event, returns the node’s + * assigned slot, if node is assigned, and node’s parent otherwise. */ - for (var removedNodes_1 = __values(removedNodes), removedNodes_1_1 = removedNodes_1.next(); !removedNodes_1_1.done; removedNodes_1_1 = removedNodes_1.next()) { - var childNode = removedNodes_1_1.value; - mutation_remove(childNode, parent, true); + if (util_1.Guard.isSlotable(this) && algorithm_1.shadowTree_isAssigned(this)) { + return this._assignedSlot; } - } - catch (e_10_1) { e_10 = { error: e_10_1 }; } - finally { - try { - if (removedNodes_1_1 && !removedNodes_1_1.done && (_a = removedNodes_1.return)) _a.call(removedNodes_1); + else { + return this._parent; } - finally { if (e_10) throw e_10.error; } - } + }; + NodeImpl.ELEMENT_NODE = 1; + NodeImpl.ATTRIBUTE_NODE = 2; + NodeImpl.TEXT_NODE = 3; + NodeImpl.CDATA_SECTION_NODE = 4; + NodeImpl.ENTITY_REFERENCE_NODE = 5; + NodeImpl.ENTITY_NODE = 6; + NodeImpl.PROCESSING_INSTRUCTION_NODE = 7; + NodeImpl.COMMENT_NODE = 8; + NodeImpl.DOCUMENT_NODE = 9; + NodeImpl.DOCUMENT_TYPE_NODE = 10; + NodeImpl.DOCUMENT_FRAGMENT_NODE = 11; + NodeImpl.NOTATION_NODE = 12; + NodeImpl.DOCUMENT_POSITION_DISCONNECTED = 0x01; + NodeImpl.DOCUMENT_POSITION_PRECEDING = 0x02; + NodeImpl.DOCUMENT_POSITION_FOLLOWING = 0x04; + NodeImpl.DOCUMENT_POSITION_CONTAINS = 0x08; + NodeImpl.DOCUMENT_POSITION_CONTAINED_BY = 0x10; + NodeImpl.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; + return NodeImpl; +}(EventTargetImpl_1.EventTargetImpl)); +exports.NodeImpl = NodeImpl; +/** + * A performance tweak to share an empty set between all node classes. This will + * be overwritten by element, document and document fragment nodes to supply an + * actual set of nodes. + */ +NodeImpl.prototype._children = new util_1.EmptySet(); +/** + * Define constants on prototype. + */ +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ELEMENT_NODE", 1); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ATTRIBUTE_NODE", 2); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "TEXT_NODE", 3); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "CDATA_SECTION_NODE", 4); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ENTITY_REFERENCE_NODE", 5); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ENTITY_NODE", 6); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "PROCESSING_INSTRUCTION_NODE", 7); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "COMMENT_NODE", 8); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_NODE", 9); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_TYPE_NODE", 10); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_FRAGMENT_NODE", 11); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "NOTATION_NODE", 12); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_DISCONNECTED", 0x01); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_PRECEDING", 0x02); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_FOLLOWING", 0x04); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_CONTAINS", 0x08); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_CONTAINED_BY", 0x10); +WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 0x20); +//# sourceMappingURL=NodeImpl.js.map + +/***/ }), + +/***/ 61997: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var TraverserImpl_1 = __nccwpck_require__(39782); +var algorithm_1 = __nccwpck_require__(61); +/** + * Represents an object which can be used to iterate through the nodes + * of a subtree. + */ +var NodeIteratorImpl = /** @class */ (function (_super) { + __extends(NodeIteratorImpl, _super); /** - * 7. If node is not null, then insert node into parent before null with the - * suppress observers flag set. + * Initializes a new instance of `NodeIterator`. */ - if (node !== null) { - mutation_insert(node, parent, null, true); + function NodeIteratorImpl(root, reference, pointerBeforeReference) { + var _this = _super.call(this, root) || this; + _this._iteratorCollection = undefined; + _this._reference = reference; + _this._pointerBeforeReference = pointerBeforeReference; + algorithm_1.nodeIterator_iteratorList().add(_this); + return _this; } + Object.defineProperty(NodeIteratorImpl.prototype, "referenceNode", { + /** @inheritdoc */ + get: function () { return this._reference; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NodeIteratorImpl.prototype, "pointerBeforeReferenceNode", { + /** @inheritdoc */ + get: function () { return this._pointerBeforeReference; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + NodeIteratorImpl.prototype.nextNode = function () { + /** + * The nextNode() method, when invoked, must return the result of + * traversing with the context object and next. + */ + return algorithm_1.nodeIterator_traverse(this, true); + }; + /** @inheritdoc */ + NodeIteratorImpl.prototype.previousNode = function () { + /** + * The previousNode() method, when invoked, must return the result of + * traversing with the context object and previous. + */ + return algorithm_1.nodeIterator_traverse(this, false); + }; + /** @inheritdoc */ + NodeIteratorImpl.prototype.detach = function () { + /** + * The detach() method, when invoked, must do nothing. + * + * since JS lacks weak references, we still use detach + */ + algorithm_1.nodeIterator_iteratorList().delete(this); + }; /** - * 8. Queue a tree mutation record for parent with addedNodes, removedNodes, - * null, and null. + * Creates a new `NodeIterator`. + * + * @param root - iterator's root node + * @param reference - reference node + * @param pointerBeforeReference - whether the iterator is before or after the + * reference node */ - if (DOMImpl_1.dom.features.mutationObservers) { - MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, addedNodes, removedNodes, null, null); - } -} -exports.mutation_replaceAll = mutation_replaceAll; + NodeIteratorImpl._create = function (root, reference, pointerBeforeReference) { + return new NodeIteratorImpl(root, reference, pointerBeforeReference); + }; + return NodeIteratorImpl; +}(TraverserImpl_1.TraverserImpl)); +exports.NodeIteratorImpl = NodeIteratorImpl; +//# sourceMappingURL=NodeIteratorImpl.js.map + +/***/ }), + +/***/ 43728: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(76195); +var algorithm_1 = __nccwpck_require__(61); /** - * Ensures pre-removal validity of a child node from a parent, then - * removes it. - * - * @param child - child node to remove - * @param parent - parent node + * Represents an ordered set of nodes. */ -function mutation_preRemove(child, parent) { +var NodeListImpl = /** @class */ (function () { /** - * 1. If child’s parent is not parent, then throw a "NotFoundError" - * DOMException. - * 2. Remove child from parent. - * 3. Return child. + * Initializes a new instance of `NodeList`. + * + * @param root - root node */ - if (child._parent !== parent) - throw new DOMException_1.NotFoundError("The child node cannot be found under parent node. Child node is " + child.nodeName + ", parent node is " + parent.nodeName + "."); - mutation_remove(child, parent); - return child; -} -exports.mutation_preRemove = mutation_preRemove; -/** - * Removes a child node from its parent. - * - * @param node - node to remove - * @param parent - parent node - * @param suppressObservers - whether to notify observers - */ -function mutation_remove(node, parent, suppressObservers) { - var e_11, _a, e_12, _b, e_13, _c, e_14, _d; - if (DOMImpl_1.dom.rangeList.size !== 0) { - /** - * 1. Let index be node’s index. - */ - var index = TreeAlgorithm_1.tree_index(node); - try { + function NodeListImpl(root) { + this._live = true; + this._filter = null; + this._length = 0; + this._root = root; + return new Proxy(this, this); + } + Object.defineProperty(NodeListImpl.prototype, "length", { + /** @inheritdoc */ + get: function () { /** - * 2. For each live range whose start node is an inclusive descendant of - * node, set its start to (parent, index). - * 3. For each live range whose end node is an inclusive descendant of - * node, set its end to (parent, index). + * The length attribute must return the number of nodes represented + * by the collection. */ - for (var _e = __values(DOMImpl_1.dom.rangeList), _f = _e.next(); !_f.done; _f = _e.next()) { - var range = _f.value; - if (TreeAlgorithm_1.tree_isDescendantOf(node, range._start[0], true)) { - range._start = [parent, index]; - } - if (TreeAlgorithm_1.tree_isDescendantOf(node, range._end[0], true)) { - range._end = [parent, index]; - } - if (range._start[0] === parent && range._start[1] > index) { - range._start[1]--; - } - if (range._end[0] === parent && range._end[1] > index) { - range._end[1]--; - } + return this._root._children.size; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + NodeListImpl.prototype.item = function (index) { + /** + * The item(index) method must return the indexth node in the collection. + * If there is no indexth node in the collection, then the method must + * return null. + */ + if (index < 0 || index > this.length - 1) + return null; + if (index < this.length / 2) { + var i = 0; + var node = this._root._firstChild; + while (node !== null && i !== index) { + node = node._nextSibling; + i++; } + return node; } - catch (e_11_1) { e_11 = { error: e_11_1 }; } - finally { - try { - if (_f && !_f.done && (_a = _e.return)) _a.call(_e); + else { + var i = this.length - 1; + var node = this._root._lastChild; + while (node !== null && i !== index) { + node = node._previousSibling; + i--; } - finally { if (e_11) throw e_11.error; } + return node; + } + }; + /** @inheritdoc */ + NodeListImpl.prototype.keys = function () { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var index = 0; + return { + next: function () { + if (index === this.length) { + return { done: true, value: null }; + } + else { + return { done: false, value: index++ }; + } + }.bind(this) + }; + }.bind(this), + _a; + }; + /** @inheritdoc */ + NodeListImpl.prototype.values = function () { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var it = this[Symbol.iterator](); + return { + next: function () { + return it.next(); + } + }; + }.bind(this), + _a; + }; + /** @inheritdoc */ + NodeListImpl.prototype.entries = function () { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var it = this[Symbol.iterator](); + var index = 0; + return { + next: function () { + var itResult = it.next(); + if (itResult.done) { + return { done: true, value: null }; + } + else { + return { done: false, value: [index++, itResult.value] }; + } + } + }; + }.bind(this), + _a; + }; + /** @inheritdoc */ + NodeListImpl.prototype[Symbol.iterator] = function () { + return this._root._children[Symbol.iterator](); + }; + /** @inheritdoc */ + NodeListImpl.prototype.forEach = function (callback, thisArg) { + var e_1, _a; + if (thisArg === undefined) { + thisArg = DOMImpl_1.dom.window; } + var index = 0; try { - /** - * 4. For each live range whose start node is parent and start offset is - * greater than index, decrease its start offset by 1. - * 5. For each live range whose end node is parent and end offset is greater - * than index, decrease its end offset by 1. - */ - for (var _g = __values(DOMImpl_1.dom.rangeList), _h = _g.next(); !_h.done; _h = _g.next()) { - var range = _h.value; - if (range._start[0] === parent && range._start[1] > index) { - range._start[1] -= 1; - } - if (range._end[0] === parent && range._end[1] > index) { - range._end[1] -= 1; - } + for (var _b = __values(this._root._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + callback.call(thisArg, node, index++, this); } } - catch (e_12_1) { e_12 = { error: e_12_1 }; } + catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_h && !_h.done && (_b = _g.return)) _b.call(_g); + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } - finally { if (e_12) throw e_12.error; } + finally { if (e_1) throw e_1.error; } } - } + }; /** - * 6. For each NodeIterator object iterator whose root’s node document is - * node’s node document, run the NodeIterator pre-removing steps given node - * and iterator. + * Implements a proxy get trap to provide array-like access. */ - if (DOMImpl_1.dom.features.steps) { - try { - for (var _j = __values(NodeIteratorAlgorithm_1.nodeIterator_iteratorList()), _k = _j.next(); !_k.done; _k = _j.next()) { - var iterator = _k.value; - if (iterator._root._nodeDocument === node._nodeDocument) { - DOMAlgorithm_1.dom_runNodeIteratorPreRemovingSteps(iterator, node); - } - } + NodeListImpl.prototype.get = function (target, key, receiver) { + if (!util_1.isString(key)) { + return Reflect.get(target, key, receiver); } - catch (e_13_1) { e_13 = { error: e_13_1 }; } - finally { - try { - if (_k && !_k.done && (_c = _j.return)) _c.call(_j); - } - finally { if (e_13) throw e_13.error; } + var index = Number(key); + if (isNaN(index)) { + return Reflect.get(target, key, receiver); } - } + return target.item(index) || undefined; + }; /** - * 7. Let oldPreviousSibling be node’s previous sibling. - * 8. Let oldNextSibling be node’s next sibling. + * Implements a proxy set trap to provide array-like access. */ - var oldPreviousSibling = node._previousSibling; - var oldNextSibling = node._nextSibling; - // set document element node - if (util_1.Guard.isDocumentNode(parent) && util_1.Guard.isElementNode(node)) { - parent._documentElement = null; - } + NodeListImpl.prototype.set = function (target, key, value, receiver) { + if (!util_1.isString(key)) { + return Reflect.set(target, key, value, receiver); + } + var index = Number(key); + if (isNaN(index)) { + return Reflect.set(target, key, value, receiver); + } + var node = target.item(index) || undefined; + if (!node) + return false; + if (node._parent) { + algorithm_1.mutation_replace(node, value, node._parent); + return true; + } + else { + return false; + } + }; /** - * 9. Remove node from its parent’s children. + * Creates a new `NodeList`. + * + * @param root - root node */ - node._parent = null; - parent._children.delete(node); - // assign siblings and children for quick lookups - var prev = node._previousSibling; - var next = node._nextSibling; - node._previousSibling = null; - node._nextSibling = null; - if (prev) - prev._nextSibling = next; - if (next) - next._previousSibling = prev; - if (!prev) - parent._firstChild = next; - if (!next) - parent._lastChild = prev; + NodeListImpl._create = function (root) { + return new NodeListImpl(root); + }; + return NodeListImpl; +}()); +exports.NodeListImpl = NodeListImpl; +//# sourceMappingURL=NodeListImpl.js.map + +/***/ }), + +/***/ 65306: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DOMImpl_1 = __nccwpck_require__(14177); +var util_1 = __nccwpck_require__(76195); +/** + * Represents an ordered list of nodes. + * This is a static implementation of `NodeList`. + */ +var NodeListStaticImpl = /** @class */ (function () { /** - * 10. If node is assigned, then run assign slotables for node’s assigned - * slot. + * Initializes a new instance of `NodeList`. + * + * @param root - root node */ - if (DOMImpl_1.dom.features.slots) { - if (util_1.Guard.isSlotable(node) && node._assignedSlot !== null && ShadowTreeAlgorithm_1.shadowTree_isAssigned(node)) { - ShadowTreeAlgorithm_1.shadowTree_assignSlotables(node._assignedSlot); - } + function NodeListStaticImpl(root) { + this._live = false; + this._items = []; + this._length = 0; + this._root = root; + this._items = []; + this._filter = function (node) { return true; }; + return new Proxy(this, this); } + Object.defineProperty(NodeListStaticImpl.prototype, "length", { + /** @inheritdoc */ + get: function () { + /** + * The length attribute must return the number of nodes represented by + * the collection. + */ + return this._items.length; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + NodeListStaticImpl.prototype.item = function (index) { + /** + * The item(index) method must return the indexth node in the collection. + * If there is no indexth node in the collection, then the method must + * return null. + */ + if (index < 0 || index > this.length - 1) + return null; + return this._items[index]; + }; + /** @inheritdoc */ + NodeListStaticImpl.prototype.keys = function () { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var index = 0; + return { + next: function () { + if (index === this.length) { + return { done: true, value: null }; + } + else { + return { done: false, value: index++ }; + } + }.bind(this) + }; + }.bind(this), + _a; + }; + /** @inheritdoc */ + NodeListStaticImpl.prototype.values = function () { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var it = this[Symbol.iterator](); + return { + next: function () { + return it.next(); + } + }; + }.bind(this), + _a; + }; + /** @inheritdoc */ + NodeListStaticImpl.prototype.entries = function () { + var _a; + return _a = {}, + _a[Symbol.iterator] = function () { + var it = this[Symbol.iterator](); + var index = 0; + return { + next: function () { + var itResult = it.next(); + if (itResult.done) { + return { done: true, value: null }; + } + else { + return { done: false, value: [index++, itResult.value] }; + } + } + }; + }.bind(this), + _a; + }; + /** @inheritdoc */ + NodeListStaticImpl.prototype[Symbol.iterator] = function () { + var it = this._items[Symbol.iterator](); + return { + next: function () { + return it.next(); + } + }; + }; + /** @inheritdoc */ + NodeListStaticImpl.prototype.forEach = function (callback, thisArg) { + var e_1, _a; + if (thisArg === undefined) { + thisArg = DOMImpl_1.dom.window; + } + var index = 0; + try { + for (var _b = __values(this._items), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + callback.call(thisArg, node, index++, this); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + }; /** - * 11. If parent’s root is a shadow root, and parent is a slot whose - * assigned nodes is the empty list, then run signal a slot change for - * parent. + * Implements a proxy get trap to provide array-like access. */ - if (DOMImpl_1.dom.features.slots) { - if (util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(parent)) && - util_1.Guard.isSlot(parent) && util_2.isEmpty(parent._assignedNodes)) { - ShadowTreeAlgorithm_1.shadowTree_signalASlotChange(parent); + NodeListStaticImpl.prototype.get = function (target, key, receiver) { + if (!util_1.isString(key)) { + return Reflect.get(target, key, receiver); } - } + var index = Number(key); + if (isNaN(index)) { + return Reflect.get(target, key, receiver); + } + return target._items[index] || undefined; + }; /** - * 12. If node has an inclusive descendant that is a slot, then: - * 12.1. Run assign slotables for a tree with parent's root. - * 12.2. Run assign slotables for a tree with node. + * Implements a proxy set trap to provide array-like access. */ - if (DOMImpl_1.dom.features.slots) { - var descendant_1 = TreeAlgorithm_1.tree_getFirstDescendantNode(node, true, false, function (e) { return util_1.Guard.isSlot(e); }); - if (descendant_1 !== null) { - ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(TreeAlgorithm_1.tree_rootNode(parent)); - ShadowTreeAlgorithm_1.shadowTree_assignSlotablesForATree(node); + NodeListStaticImpl.prototype.set = function (target, key, value, receiver) { + if (!util_1.isString(key)) { + return Reflect.set(target, key, value, receiver); } - } + var index = Number(key); + if (isNaN(index)) { + return Reflect.set(target, key, value, receiver); + } + if (index >= 0 && index < target._items.length) { + target._items[index] = value; + return true; + } + else { + return false; + } + }; /** - * 13. Run the removing steps with node and parent. + * Creates a new `NodeList`. + * + * @param root - root node + * @param items - a list of items to initialize the list */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runRemovingSteps(node, parent); + NodeListStaticImpl._create = function (root, items) { + var list = new NodeListStaticImpl(root); + list._items = items; + return list; + }; + return NodeListStaticImpl; +}()); +exports.NodeListStaticImpl = NodeListStaticImpl; +//# sourceMappingURL=NodeListStaticImpl.js.map + +/***/ }), + +/***/ 71032: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(65282); +/** + * Represents a mixin that extends child nodes that can have siblings + * other than doctypes. This mixin is implemented by {@link Element} and + * {@link CharacterData}. + */ +var NonDocumentTypeChildNodeImpl = /** @class */ (function () { + function NonDocumentTypeChildNodeImpl() { } - /** - * 14. If node is custom, then enqueue a custom element callback - * reaction with node, callback name "disconnectedCallback", - * and an empty argument list. - */ - if (DOMImpl_1.dom.features.customElements) { - if (util_1.Guard.isCustomElementNode(node)) { - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(node, "disconnectedCallback", []); - } + Object.defineProperty(NonDocumentTypeChildNodeImpl.prototype, "previousElementSibling", { + /** @inheritdoc */ + get: function () { + /** + * The previousElementSibling attribute’s getter must return the first + * preceding sibling that is an element, and null otherwise. + */ + var node = util_1.Cast.asNode(this)._previousSibling; + while (node) { + if (util_1.Guard.isElementNode(node)) + return node; + else + node = node._previousSibling; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NonDocumentTypeChildNodeImpl.prototype, "nextElementSibling", { + /** @inheritdoc */ + get: function () { + /** + * The nextElementSibling attribute’s getter must return the first + * following sibling that is an element, and null otherwise. + */ + var node = util_1.Cast.asNode(this)._nextSibling; + while (node) { + if (util_1.Guard.isElementNode(node)) + return node; + else + node = node._nextSibling; + } + return null; + }, + enumerable: true, + configurable: true + }); + return NonDocumentTypeChildNodeImpl; +}()); +exports.NonDocumentTypeChildNodeImpl = NonDocumentTypeChildNodeImpl; +//# sourceMappingURL=NonDocumentTypeChildNodeImpl.js.map + +/***/ }), + +/***/ 90733: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(65282); +var algorithm_1 = __nccwpck_require__(61); +/** + * Represents a mixin that extends non-element parent nodes. This mixin + * is implemented by {@link Document} and {@link DocumentFragment}. + */ +var NonElementParentNodeImpl = /** @class */ (function () { + function NonElementParentNodeImpl() { } - /** - * 15. For each shadow-including descendant descendant of node, - * in shadow-including tree order, then: - */ - var descendant = TreeAlgorithm_1.tree_getFirstDescendantNode(node, false, true); - while (descendant !== null) { - /** - * 15.1. Run the removing steps with descendant. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runRemovingSteps(descendant, node); - } + /** @inheritdoc */ + NonElementParentNodeImpl.prototype.getElementById = function (id) { /** - * 15.2. If descendant is custom, then enqueue a custom element - * callback reaction with descendant, callback name - * "disconnectedCallback", and an empty argument list. + * The getElementById(elementId) method, when invoked, must return the first + * element, in tree order, within the context object’s descendants, + * whose ID is elementId, and null if there is no such element otherwise. */ - if (DOMImpl_1.dom.features.customElements) { - if (util_1.Guard.isCustomElementNode(descendant)) { - CustomElementAlgorithm_1.customElement_enqueueACustomElementCallbackReaction(descendant, "disconnectedCallback", []); + var ele = algorithm_1.tree_getFirstDescendantNode(util_1.Cast.asNode(this), false, false, function (e) { return util_1.Guard.isElementNode(e); }); + while (ele !== null) { + if (ele._uniqueIdentifier === id) { + return ele; } + ele = algorithm_1.tree_getNextDescendantNode(util_1.Cast.asNode(this), ele, false, false, function (e) { return util_1.Guard.isElementNode(e); }); } - descendant = TreeAlgorithm_1.tree_getNextDescendantNode(node, descendant, false, true); + return null; + }; + return NonElementParentNodeImpl; +}()); +exports.NonElementParentNodeImpl = NonElementParentNodeImpl; +//# sourceMappingURL=NonElementParentNodeImpl.js.map + +/***/ }), + +/***/ 85988: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(65282); +var algorithm_1 = __nccwpck_require__(61); +/** + * Represents a mixin that extends parent nodes that can have children. + * This mixin is implemented by {@link Element}, {@link Document} and + * {@link DocumentFragment}. + */ +var ParentNodeImpl = /** @class */ (function () { + function ParentNodeImpl() { } - /** - * 16. For each inclusive ancestor inclusiveAncestor of parent, and - * then for each registered of inclusiveAncestor's registered - * observer list, if registered's options's subtree is true, - * then append a new transient registered observer whose - * observer is registered's observer, options is registered's - * options, and source is registered to node's registered - * observer list. - */ - if (DOMImpl_1.dom.features.mutationObservers) { - var inclusiveAncestor = TreeAlgorithm_1.tree_getFirstAncestorNode(parent, true); - while (inclusiveAncestor !== null) { + Object.defineProperty(ParentNodeImpl.prototype, "children", { + /** @inheritdoc */ + get: function () { + /** + * The children attribute’s getter must return an HTMLCollection collection + * rooted at context object matching only element children. + */ + return algorithm_1.create_htmlCollection(util_1.Cast.asNode(this)); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ParentNodeImpl.prototype, "firstElementChild", { + /** @inheritdoc */ + get: function () { + /** + * The firstElementChild attribute’s getter must return the first child + * that is an element, and null otherwise. + */ + var node = util_1.Cast.asNode(this)._firstChild; + while (node) { + if (util_1.Guard.isElementNode(node)) + return node; + else + node = node._nextSibling; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ParentNodeImpl.prototype, "lastElementChild", { + /** @inheritdoc */ + get: function () { + /** + * The lastElementChild attribute’s getter must return the last child that + * is an element, and null otherwise. + */ + var node = util_1.Cast.asNode(this)._lastChild; + while (node) { + if (util_1.Guard.isElementNode(node)) + return node; + else + node = node._previousSibling; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ParentNodeImpl.prototype, "childElementCount", { + /** @inheritdoc */ + get: function () { + var e_1, _a; + /** + * The childElementCount attribute’s getter must return the number of + * children of context object that are elements. + */ + var count = 0; try { - for (var _l = (e_14 = void 0, __values(inclusiveAncestor._registeredObserverList)), _m = _l.next(); !_m.done; _m = _l.next()) { - var registered = _m.value; - if (registered.options.subtree) { - node._registeredObserverList.push({ - observer: registered.observer, - options: registered.options, - source: registered - }); - } + for (var _b = __values(util_1.Cast.asNode(this)._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + if (util_1.Guard.isElementNode(childNode)) + count++; } } - catch (e_14_1) { e_14 = { error: e_14_1 }; } + catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_m && !_m.done && (_d = _l.return)) _d.call(_l); + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } - finally { if (e_14) throw e_14.error; } + finally { if (e_1) throw e_1.error; } } - inclusiveAncestor = TreeAlgorithm_1.tree_getNextAncestorNode(parent, inclusiveAncestor, true); + return count; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + ParentNodeImpl.prototype.prepend = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; } - } + /** + * 1. Let node be the result of converting nodes into a node given nodes + * and context object’s node document. + * 2. Pre-insert node into context object before the context object’s first + * child. + */ + var node = util_1.Cast.asNode(this); + var childNode = algorithm_1.parentNode_convertNodesIntoANode(nodes, node._nodeDocument); + algorithm_1.mutation_preInsert(childNode, node, node._firstChild); + }; + /** @inheritdoc */ + ParentNodeImpl.prototype.append = function () { + var nodes = []; + for (var _i = 0; _i < arguments.length; _i++) { + nodes[_i] = arguments[_i]; + } + /** + * 1. Let node be the result of converting nodes into a node given nodes + * and context object’s node document. + * 2. Append node to context object. + */ + var node = util_1.Cast.asNode(this); + var childNode = algorithm_1.parentNode_convertNodesIntoANode(nodes, node._nodeDocument); + algorithm_1.mutation_append(childNode, node); + }; + /** @inheritdoc */ + ParentNodeImpl.prototype.querySelector = function (selectors) { + /** + * The querySelector(selectors) method, when invoked, must return the first + * result of running scope-match a selectors string selectors against + * context object, if the result is not an empty list, and null otherwise. + */ + var node = util_1.Cast.asNode(this); + var result = algorithm_1.selectors_scopeMatchASelectorsString(selectors, node); + return (result.length === 0 ? null : result[0]); + }; + /** @inheritdoc */ + ParentNodeImpl.prototype.querySelectorAll = function (selectors) { + /** + * The querySelectorAll(selectors) method, when invoked, must return the + * static result of running scope-match a selectors string selectors against + * context object. + */ + var node = util_1.Cast.asNode(this); + var result = algorithm_1.selectors_scopeMatchASelectorsString(selectors, node); + return algorithm_1.create_nodeListStatic(node, result); + }; + return ParentNodeImpl; +}()); +exports.ParentNodeImpl = ParentNodeImpl; +//# sourceMappingURL=ParentNodeImpl.js.map + +/***/ }), + +/***/ 99430: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var CharacterDataImpl_1 = __nccwpck_require__(65330); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +/** + * Represents a processing instruction node. + */ +var ProcessingInstructionImpl = /** @class */ (function (_super) { + __extends(ProcessingInstructionImpl, _super); /** - * 17. If suppress observers flag is unset, then queue a tree mutation - * record for parent with « », « node », oldPreviousSibling, and - * oldNextSibling. + * Initializes a new instance of `ProcessingInstruction`. */ - if (DOMImpl_1.dom.features.mutationObservers) { - if (!suppressObservers) { - MutationObserverAlgorithm_1.observer_queueTreeMutationRecord(parent, [], [node], oldPreviousSibling, oldNextSibling); - } + function ProcessingInstructionImpl(target, data) { + var _this = _super.call(this, data) || this; + _this._target = target; + return _this; } + Object.defineProperty(ProcessingInstructionImpl.prototype, "target", { + /** + * Gets the target of the {@link ProcessingInstruction} node. + */ + get: function () { return this._target; }, + enumerable: true, + configurable: true + }); /** - * 18. If node is a Text node, then run the child text content change steps - * for parent. + * Creates a new `ProcessingInstruction`. + * + * @param document - owner document + * @param target - instruction target + * @param data - node contents */ - if (DOMImpl_1.dom.features.steps) { - if (util_1.Guard.isTextNode(node)) { - DOMAlgorithm_1.dom_runChildTextContentChangeSteps(parent); - } - } -} -exports.mutation_remove = mutation_remove; -//# sourceMappingURL=MutationAlgorithm.js.map + ProcessingInstructionImpl._create = function (document, target, data) { + var node = new ProcessingInstructionImpl(target, data); + node._nodeDocument = document; + return node; + }; + return ProcessingInstructionImpl; +}(CharacterDataImpl_1.CharacterDataImpl)); +exports.ProcessingInstructionImpl = ProcessingInstructionImpl; +/** + * Initialize prototype properties + */ +WebIDLAlgorithm_1.idl_defineConst(ProcessingInstructionImpl.prototype, "_nodeType", interfaces_1.NodeType.ProcessingInstruction); +//# sourceMappingURL=ProcessingInstructionImpl.js.map /***/ }), -/***/ 78157: +/***/ 50166: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); @@ -47124,370 +31600,837 @@ var __values = (this && this.__values) || function(o) { }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); var DOMImpl_1 = __nccwpck_require__(14177); +var interfaces_1 = __nccwpck_require__(27305); +var AbstractRangeImpl_1 = __nccwpck_require__(57126); +var DOMException_1 = __nccwpck_require__(13166); +var algorithm_1 = __nccwpck_require__(61); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); var util_1 = __nccwpck_require__(65282); -var infra_1 = __nccwpck_require__(84251); -var CreateAlgorithm_1 = __nccwpck_require__(57339); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var EventAlgorithm_1 = __nccwpck_require__(28217); -/** - * Queues a mutation observer microtask to the surrounding agent’s mutation - * observers. - */ -function observer_queueAMutationObserverMicrotask() { - /** - * 1. If the surrounding agent’s mutation observer microtask queued is true, - * then return. - * 2. Set the surrounding agent’s mutation observer microtask queued to true. - * 3. Queue a microtask to notify mutation observers. - */ - var window = DOMImpl_1.dom.window; - if (window._mutationObserverMicrotaskQueued) - return; - window._mutationObserverMicrotaskQueued = true; - Promise.resolve().then(function () { observer_notifyMutationObservers(); }); -} -exports.observer_queueAMutationObserverMicrotask = observer_queueAMutationObserverMicrotask; /** - * Notifies the surrounding agent’s mutation observers. + * Represents a live range. */ -function observer_notifyMutationObservers() { - var e_1, _a, e_2, _b; +var RangeImpl = /** @class */ (function (_super) { + __extends(RangeImpl, _super); /** - * 1. Set the surrounding agent’s mutation observer microtask queued to false. - * 2. Let notifySet be a clone of the surrounding agent’s mutation observers. - * 3. Let signalSet be a clone of the surrounding agent’s signal slots. - * 4. Empty the surrounding agent’s signal slots. + * Initializes a new instance of `Range`. */ - var window = DOMImpl_1.dom.window; - window._mutationObserverMicrotaskQueued = false; - var notifySet = infra_1.set.clone(window._mutationObservers); - var signalSet = infra_1.set.clone(window._signalSlots); - infra_1.set.empty(window._signalSlots); - var _loop_1 = function (mo) { + function RangeImpl() { + var _this = _super.call(this) || this; /** - * 5.1. Let records be a clone of mo’s record queue. - * 5.2. Empty mo’s record queue. + * The Range() constructor, when invoked, must return a new live range with + * (current global object’s associated Document, 0) as its start and end. */ - var records = infra_1.list.clone(mo._recordQueue); - infra_1.list.empty(mo._recordQueue); + var doc = DOMImpl_1.dom.window._associatedDocument; + _this._start = [doc, 0]; + _this._end = [doc, 0]; + DOMImpl_1.dom.rangeList.add(_this); + return _this; + } + Object.defineProperty(RangeImpl.prototype, "commonAncestorContainer", { + /** @inheritdoc */ + get: function () { + /** + * 1. Let container be start node. + * 2. While container is not an inclusive ancestor of end node, let + * container be container’s parent. + * 3. Return container. + */ + var container = this._start[0]; + while (!algorithm_1.tree_isAncestorOf(this._end[0], container, true)) { + if (container._parent === null) { + throw new Error("Parent node is null."); + } + container = container._parent; + } + return container; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + RangeImpl.prototype.setStart = function (node, offset) { /** - * 5.3. For each node of mo’s node list, remove all transient registered - * observers whose observer is mo from node’s registered observer list. + * The setStart(node, offset) method, when invoked, must set the start of + * context object to boundary point (node, offset). */ - for (var i = 0; i < mo._nodeList.length; i++) { - var node = mo._nodeList[i]; - infra_1.list.remove(node._registeredObserverList, function (observer) { - return util_1.Guard.isTransientRegisteredObserver(observer) && observer.observer === mo; - }); + algorithm_1.range_setTheStart(this, node, offset); + }; + /** @inheritdoc */ + RangeImpl.prototype.setEnd = function (node, offset) { + /** + * The setEnd(node, offset) method, when invoked, must set the end of + * context object to boundary point (node, offset). + */ + algorithm_1.range_setTheEnd(this, node, offset); + }; + /** @inheritdoc */ + RangeImpl.prototype.setStartBefore = function (node) { + /** + * 1. Let parent be node’s parent. + * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. + * 3. Set the start of the context object to boundary point + * (parent, node’s index). + */ + var parent = node._parent; + if (parent === null) + throw new DOMException_1.InvalidNodeTypeError(); + algorithm_1.range_setTheStart(this, parent, algorithm_1.tree_index(node)); + }; + /** @inheritdoc */ + RangeImpl.prototype.setStartAfter = function (node) { + /** + * 1. Let parent be node’s parent. + * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. + * 3. Set the start of the context object to boundary point + * (parent, node’s index plus 1). + */ + var parent = node._parent; + if (parent === null) + throw new DOMException_1.InvalidNodeTypeError(); + algorithm_1.range_setTheStart(this, parent, algorithm_1.tree_index(node) + 1); + }; + /** @inheritdoc */ + RangeImpl.prototype.setEndBefore = function (node) { + /** + * 1. Let parent be node’s parent. + * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. + * 3. Set the end of the context object to boundary point + * (parent, node’s index). + */ + var parent = node._parent; + if (parent === null) + throw new DOMException_1.InvalidNodeTypeError(); + algorithm_1.range_setTheEnd(this, parent, algorithm_1.tree_index(node)); + }; + /** @inheritdoc */ + RangeImpl.prototype.setEndAfter = function (node) { + /** + * 1. Let parent be node’s parent. + * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. + * 3. Set the end of the context object to boundary point + * (parent, node’s index plus 1). + */ + var parent = node._parent; + if (parent === null) + throw new DOMException_1.InvalidNodeTypeError(); + algorithm_1.range_setTheEnd(this, parent, algorithm_1.tree_index(node) + 1); + }; + /** @inheritdoc */ + RangeImpl.prototype.collapse = function (toStart) { + /** + * The collapse(toStart) method, when invoked, must if toStart is true, + * set end to start, and set start to end otherwise. + */ + if (toStart) { + this._end = this._start; + } + else { + this._start = this._end; } + }; + /** @inheritdoc */ + RangeImpl.prototype.selectNode = function (node) { /** - * 5.4. If records is not empty, then invoke mo’s callback with « records, - * mo », and mo. If this throws an exception, then report the exception. + * The selectNode(node) method, when invoked, must select node within + * context object. */ - if (!infra_1.list.isEmpty(records)) { - try { - mo._callback.call(mo, records, mo); - } - catch (err) { - // TODO: Report the exception - } + algorithm_1.range_select(node, this); + }; + /** @inheritdoc */ + RangeImpl.prototype.selectNodeContents = function (node) { + /** + * 1. If node is a doctype, throw an "InvalidNodeTypeError" DOMException. + * 2. Let length be the length of node. + * 3. Set start to the boundary point (node, 0). + * 4. Set end to the boundary point (node, length). + */ + if (util_1.Guard.isDocumentTypeNode(node)) + throw new DOMException_1.InvalidNodeTypeError(); + var length = algorithm_1.tree_nodeLength(node); + this._start = [node, 0]; + this._end = [node, length]; + }; + /** @inheritdoc */ + RangeImpl.prototype.compareBoundaryPoints = function (how, sourceRange) { + /** + * 1. If how is not one of + * - START_TO_START, + * - START_TO_END, + * - END_TO_END, and + * - END_TO_START, + * then throw a "NotSupportedError" DOMException. + */ + if (how !== interfaces_1.HowToCompare.StartToStart && how !== interfaces_1.HowToCompare.StartToEnd && + how !== interfaces_1.HowToCompare.EndToEnd && how !== interfaces_1.HowToCompare.EndToStart) + throw new DOMException_1.NotSupportedError(); + /** + * 2. If context object’s root is not the same as sourceRange’s root, + * then throw a "WrongDocumentError" DOMException. + */ + if (algorithm_1.range_root(this) !== algorithm_1.range_root(sourceRange)) + throw new DOMException_1.WrongDocumentError(); + /** + * 3. If how is: + * - START_TO_START: + * Let this point be the context object’s start. Let other point be + * sourceRange’s start. + * - START_TO_END: + * Let this point be the context object’s end. Let other point be + * sourceRange’s start. + * - END_TO_END: + * Let this point be the context object’s end. Let other point be + * sourceRange’s end. + * - END_TO_START: + * Let this point be the context object’s start. Let other point be + * sourceRange’s end. + */ + var thisPoint; + var otherPoint; + switch (how) { + case interfaces_1.HowToCompare.StartToStart: + thisPoint = this._start; + otherPoint = sourceRange._start; + break; + case interfaces_1.HowToCompare.StartToEnd: + thisPoint = this._end; + otherPoint = sourceRange._start; + break; + case interfaces_1.HowToCompare.EndToEnd: + thisPoint = this._end; + otherPoint = sourceRange._end; + break; + case interfaces_1.HowToCompare.EndToStart: + thisPoint = this._start; + otherPoint = sourceRange._end; + break; + /* istanbul ignore next */ + default: + throw new DOMException_1.NotSupportedError(); + } + /** + * 4. If the position of this point relative to other point is + * - before + * Return −1. + * - equal + * Return 0. + * - after + * Return 1. + */ + var position = algorithm_1.boundaryPoint_position(thisPoint, otherPoint); + if (position === interfaces_1.BoundaryPosition.Before) { + return -1; + } + else if (position === interfaces_1.BoundaryPosition.After) { + return 1; + } + else { + return 0; } }; - try { + /** @inheritdoc */ + RangeImpl.prototype.deleteContents = function () { + var e_1, _a, e_2, _b; /** - * 5. For each mo of notifySet: + * 1. If the context object is collapsed, then return. + * 2. Let original start node, original start offset, original end node, + * and original end offset be the context object’s start node, + * start offset, end node, and end offset, respectively. */ - for (var notifySet_1 = __values(notifySet), notifySet_1_1 = notifySet_1.next(); !notifySet_1_1.done; notifySet_1_1 = notifySet_1.next()) { - var mo = notifySet_1_1.value; - _loop_1(mo); + if (algorithm_1.range_collapsed(this)) + return; + var originalStartNode = this._startNode; + var originalStartOffset = this._startOffset; + var originalEndNode = this._endNode; + var originalEndOffset = this._endOffset; + /** + * 3. If original start node and original end node are the same, and they + * are a Text, ProcessingInstruction, or Comment node, replace data with + * node original start node, offset original start offset, count original + * end offset minus original start offset, and data the empty string, + * and then return. + */ + if (originalStartNode === originalEndNode && + util_1.Guard.isCharacterDataNode(originalStartNode)) { + algorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset, ''); + return; } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + /** + * 4. Let nodes to remove be a list of all the nodes that are contained in + * the context object, in tree order, omitting any node whose parent is also + * contained in the context object. + */ + var nodesToRemove = []; try { - if (notifySet_1_1 && !notifySet_1_1.done && (_a = notifySet_1.return)) _a.call(notifySet_1); + for (var _c = __values(algorithm_1.range_getContainedNodes(this)), _d = _c.next(); !_d.done; _d = _c.next()) { + var node = _d.value; + var parent = node._parent; + if (parent !== null && algorithm_1.range_isContained(parent, this)) { + continue; + } + nodesToRemove.push(node); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_1) throw e_1.error; } + } + var newNode; + var newOffset; + if (algorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { + /** + * 5. If original start node is an inclusive ancestor of original end + * node, set new node to original start node and new offset to original + * start offset. + */ + newNode = originalStartNode; + newOffset = originalStartOffset; + } + else { + /** + * 6. Otherwise: + * 6.1. Let reference node equal original start node. + * 6.2. While reference node’s parent is not null and is not an inclusive + * ancestor of original end node, set reference node to its parent. + * 6.3. Set new node to the parent of reference node, and new offset to + * one plus the index of reference node. + */ + var referenceNode = originalStartNode; + while (referenceNode._parent !== null && + !algorithm_1.tree_isAncestorOf(originalEndNode, referenceNode._parent, true)) { + referenceNode = referenceNode._parent; + } + /* istanbul ignore next */ + if (referenceNode._parent === null) { + throw new Error("Parent node is null."); + } + newNode = referenceNode._parent; + newOffset = algorithm_1.tree_index(referenceNode) + 1; + } + /** + * 7. If original start node is a Text, ProcessingInstruction, or Comment + * node, replace data with node original start node, offset original start + * offset, count original start node’s length minus original start offset, + * data the empty string. + */ + if (util_1.Guard.isCharacterDataNode(originalStartNode)) { + algorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, algorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset, ''); } - finally { if (e_1) throw e_1.error; } - } - /** - * 6. For each slot of signalSet, fire an event named slotchange, with its - * bubbles attribute set to true, at slot. - */ - if (DOMImpl_1.dom.features.slots) { try { - for (var signalSet_1 = __values(signalSet), signalSet_1_1 = signalSet_1.next(); !signalSet_1_1.done; signalSet_1_1 = signalSet_1.next()) { - var slot = signalSet_1_1.value; - EventAlgorithm_1.event_fireAnEvent("slotchange", slot, undefined, { bubbles: true }); + /** + * 8. For each node in nodes to remove, in tree order, remove node from its + * parent. + */ + for (var nodesToRemove_1 = __values(nodesToRemove), nodesToRemove_1_1 = nodesToRemove_1.next(); !nodesToRemove_1_1.done; nodesToRemove_1_1 = nodesToRemove_1.next()) { + var node = nodesToRemove_1_1.value; + /* istanbul ignore else */ + if (node._parent) { + algorithm_1.mutation_remove(node, node._parent); + } } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { - if (signalSet_1_1 && !signalSet_1_1.done && (_b = signalSet_1.return)) _b.call(signalSet_1); + if (nodesToRemove_1_1 && !nodesToRemove_1_1.done && (_b = nodesToRemove_1.return)) _b.call(nodesToRemove_1); } finally { if (e_2) throw e_2.error; } } - } -} -exports.observer_notifyMutationObservers = observer_notifyMutationObservers; -/** - * Queues a mutation record of the given type for target. - * - * @param type - mutation record type - * @param target - target node - * @param name - name before mutation - * @param namespace - namespace before mutation - * @param oldValue - attribute value before mutation - * @param addedNodes - a list od added nodes - * @param removedNodes - a list of removed nodes - * @param previousSibling - previous sibling of target before mutation - * @param nextSibling - next sibling of target before mutation - */ -function observer_queueMutationRecord(type, target, name, namespace, oldValue, addedNodes, removedNodes, previousSibling, nextSibling) { - var e_3, _a; - /** - * 1. Let interestedObservers be an empty map. - * 2. Let nodes be the inclusive ancestors of target. - * 3. For each node in nodes, and then for each registered of node’s - * registered observer list: - */ - var interestedObservers = new Map(); - var node = TreeAlgorithm_1.tree_getFirstAncestorNode(target, true); - while (node !== null) { - for (var i = 0; i < node._registeredObserverList.length; i++) { - var registered = node._registeredObserverList[i]; - /** - * 3.1. Let options be registered’s options. - * 3.2. If none of the following are true - * - node is not target and options’s subtree is false - * - type is "attributes" and options’s attributes is not true - * - type is "attributes", options’s attributeFilter is present, and - * options’s attributeFilter does not contain name or namespace is - * non-null - * - type is "characterData" and options’s characterData is not true - * - type is "childList" and options’s childList is false - */ - var options = registered.options; - if (node !== target && !options.subtree) - continue; - if (type === "attributes" && !options.attributes) - continue; - if (type === "attributes" && options.attributeFilter && - (!options.attributeFilter.indexOf(name || '') || namespace !== null)) - continue; - if (type === "characterData" && !options.characterData) - continue; - if (type === "childList" && !options.childList) - continue; + /** + * 9. If original end node is a Text, ProcessingInstruction, or Comment + * node, replace data with node original end node, offset 0, count original + * end offset and data the empty string. + */ + if (util_1.Guard.isCharacterDataNode(originalEndNode)) { + algorithm_1.characterData_replaceData(originalEndNode, 0, originalEndOffset, ''); + } + /** + * 10. Set start and end to (new node, new offset). + */ + this._start = [newNode, newOffset]; + this._end = [newNode, newOffset]; + }; + /** @inheritdoc */ + RangeImpl.prototype.extractContents = function () { + /** + * The extractContents() method, when invoked, must return the result of + * extracting the context object. + */ + return algorithm_1.range_extract(this); + }; + /** @inheritdoc */ + RangeImpl.prototype.cloneContents = function () { + /** + * The cloneContents() method, when invoked, must return the result of + * cloning the contents of the context object. + */ + return algorithm_1.range_cloneTheContents(this); + }; + /** @inheritdoc */ + RangeImpl.prototype.insertNode = function (node) { + /** + * The insertNode(node) method, when invoked, must insert node into the + * context object. + */ + return algorithm_1.range_insert(node, this); + }; + /** @inheritdoc */ + RangeImpl.prototype.surroundContents = function (newParent) { + var e_3, _a; + try { /** - * then: - * 3.2.1. Let mo be registered’s observer. - * 3.2.2. If interestedObservers[mo] does not exist, then set - * interestedObservers[mo] to null. - * 3.2.3. If either type is "attributes" and options’s attributeOldValue - * is true, or type is "characterData" and options’s - * characterDataOldValue is true, then set interestedObservers[mo] - * to oldValue. + * 1. If a non-Text node is partially contained in the context object, then + * throw an "InvalidStateError" DOMException. */ - var mo = registered.observer; - if (!interestedObservers.has(mo)) { - interestedObservers.set(mo, null); + for (var _b = __values(algorithm_1.range_getPartiallyContainedNodes(this)), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + if (!util_1.Guard.isTextNode(node)) { + throw new DOMException_1.InvalidStateError(); + } } - if ((type === "attributes" && options.attributeOldValue) || - (type === "characterData" && options.characterDataOldValue)) { - interestedObservers.set(mo, oldValue); + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } + finally { if (e_3) throw e_3.error; } } - node = TreeAlgorithm_1.tree_getNextAncestorNode(target, node, true); - } - try { /** - * 4. For each observer → mappedOldValue of interestedObservers: + * 2. If newParent is a Document, DocumentType, or DocumentFragment node, + * then throw an "InvalidNodeTypeError" DOMException. */ - for (var interestedObservers_1 = __values(interestedObservers), interestedObservers_1_1 = interestedObservers_1.next(); !interestedObservers_1_1.done; interestedObservers_1_1 = interestedObservers_1.next()) { - var _b = __read(interestedObservers_1_1.value, 2), observer = _b[0], mappedOldValue = _b[1]; + if (util_1.Guard.isDocumentNode(newParent) || + util_1.Guard.isDocumentTypeNode(newParent) || + util_1.Guard.isDocumentFragmentNode(newParent)) { + throw new DOMException_1.InvalidNodeTypeError(); + } + /** + * 3. Let fragment be the result of extracting the context object. + */ + var fragment = algorithm_1.range_extract(this); + /** + * 4. If newParent has children, then replace all with null within newParent. + */ + if ((newParent)._children.size !== 0) { + algorithm_1.mutation_replaceAll(null, newParent); + } + /** + * 5. Insert newParent into the context object. + * 6. Append fragment to newParent. + */ + algorithm_1.range_insert(newParent, this); + algorithm_1.mutation_append(fragment, newParent); + /** + * 7. Select newParent within the context object. + */ + algorithm_1.range_select(newParent, this); + }; + /** @inheritdoc */ + RangeImpl.prototype.cloneRange = function () { + /** + * The cloneRange() method, when invoked, must return a new live range with + * the same start and end as the context object. + */ + return algorithm_1.create_range(this._start, this._end); + }; + /** @inheritdoc */ + RangeImpl.prototype.detach = function () { + /** + * The detach() method, when invoked, must do nothing. + * + * since JS lacks weak references, we still use detach + */ + DOMImpl_1.dom.rangeList.delete(this); + }; + /** @inheritdoc */ + RangeImpl.prototype.isPointInRange = function (node, offset) { + /** + * 1. If node’s root is different from the context object’s root, return false. + */ + if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) { + return false; + } + /** + * 2. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. + * 3. If offset is greater than node’s length, then throw an + * "IndexSizeError" DOMException. + */ + if (util_1.Guard.isDocumentTypeNode(node)) + throw new DOMException_1.InvalidNodeTypeError(); + if (offset > algorithm_1.tree_nodeLength(node)) + throw new DOMException_1.IndexSizeError(); + /** + * 4. If (node, offset) is before start or after end, return false. + */ + var bp = [node, offset]; + if (algorithm_1.boundaryPoint_position(bp, this._start) === interfaces_1.BoundaryPosition.Before || + algorithm_1.boundaryPoint_position(bp, this._end) === interfaces_1.BoundaryPosition.After) { + return false; + } + /** + * 5. Return true. + */ + return true; + }; + /** @inheritdoc */ + RangeImpl.prototype.comparePoint = function (node, offset) { + /** + * 1. If node’s root is different from the context object’s root, then throw + * a "WrongDocumentError" DOMException. + * 2. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. + * 3. If offset is greater than node’s length, then throw an + * "IndexSizeError" DOMException. + */ + if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) + throw new DOMException_1.WrongDocumentError(); + if (util_1.Guard.isDocumentTypeNode(node)) + throw new DOMException_1.InvalidNodeTypeError(); + if (offset > algorithm_1.tree_nodeLength(node)) + throw new DOMException_1.IndexSizeError(); + /** + * 4. If (node, offset) is before start, return −1. + * 5. If (node, offset) is after end, return 1. + * 6. Return 0. + */ + var bp = [node, offset]; + if (algorithm_1.boundaryPoint_position(bp, this._start) === interfaces_1.BoundaryPosition.Before) { + return -1; + } + else if (algorithm_1.boundaryPoint_position(bp, this._end) === interfaces_1.BoundaryPosition.After) { + return 1; + } + else { + return 0; + } + }; + /** @inheritdoc */ + RangeImpl.prototype.intersectsNode = function (node) { + /** + * 1. If node’s root is different from the context object’s root, return false. + */ + if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) { + return false; + } + /** + * 2. Let parent be node’s parent. + * 3. If parent is null, return true. + */ + var parent = node._parent; + if (parent === null) + return true; + /** + * 4. Let offset be node’s index. + */ + var offset = algorithm_1.tree_index(node); + /** + * 5. If (parent, offset) is before end and (parent, offset plus 1) is + * after start, return true. + */ + if (algorithm_1.boundaryPoint_position([parent, offset], this._end) === interfaces_1.BoundaryPosition.Before && + algorithm_1.boundaryPoint_position([parent, offset + 1], this._start) === interfaces_1.BoundaryPosition.After) { + return true; + } + /** + * 6. Return false. + */ + return false; + }; + RangeImpl.prototype.toString = function () { + var e_4, _a; + /** + * 1. Let s be the empty string. + */ + var s = ''; + /** + * 2. If the context object’s start node is the context object’s end node + * and it is a Text node, then return the substring of that Text node’s data + * beginning at the context object’s start offset and ending at the context + * object’s end offset. + */ + if (this._startNode === this._endNode && util_1.Guard.isTextNode(this._startNode)) { + return this._startNode._data.substring(this._startOffset, this._endOffset); + } + /** + * 3. If the context object’s start node is a Text node, then append the + * substring of that node’s data from the context object’s start offset + * until the end to s. + */ + if (util_1.Guard.isTextNode(this._startNode)) { + s += this._startNode._data.substring(this._startOffset); + } + try { /** - * 4.1. Let record be a new MutationRecord object with its type set to - * type, target set to target, attributeName set to name, - * attributeNamespace set to namespace, oldValue set to mappedOldValue, - * addedNodes set to addedNodes, removedNodes set to removedNodes, - * previousSibling set to previousSibling, and nextSibling set to - * nextSibling. - * 4.2. Enqueue record to observer’s record queue. + * 4. Append the concatenation of the data of all Text nodes that are + * contained in the context object, in tree order, to s. */ - var record = CreateAlgorithm_1.create_mutationRecord(type, target, CreateAlgorithm_1.create_nodeListStatic(target, addedNodes), CreateAlgorithm_1.create_nodeListStatic(target, removedNodes), previousSibling, nextSibling, name, namespace, mappedOldValue); - var queue = observer._recordQueue; - queue.push(record); + for (var _b = __values(algorithm_1.range_getContainedNodes(this)), _c = _b.next(); !_c.done; _c = _b.next()) { + var child = _c.value; + if (util_1.Guard.isTextNode(child)) { + s += child._data; + } + } } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (interestedObservers_1_1 && !interestedObservers_1_1.done && (_a = interestedObservers_1.return)) _a.call(interestedObservers_1); + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_4) throw e_4.error; } } - finally { if (e_3) throw e_3.error; } - } + /** + * 5. If the context object’s end node is a Text node, then append the + * substring of that node’s data from its start until the context object’s + * end offset to s. + */ + if (util_1.Guard.isTextNode(this._endNode)) { + s += this._endNode._data.substring(0, this._endOffset); + } + /** + * 6. Return s. + */ + return s; + }; /** - * 5. Queue a mutation observer microtask. + * Creates a new `Range`. + * + * @param start - start point + * @param end - end point */ - observer_queueAMutationObserverMicrotask(); -} -exports.observer_queueMutationRecord = observer_queueMutationRecord; + RangeImpl._create = function (start, end) { + var range = new RangeImpl(); + if (start) + range._start = start; + if (end) + range._end = end; + return range; + }; + RangeImpl.START_TO_START = 0; + RangeImpl.START_TO_END = 1; + RangeImpl.END_TO_END = 2; + RangeImpl.END_TO_START = 3; + return RangeImpl; +}(AbstractRangeImpl_1.AbstractRangeImpl)); +exports.RangeImpl = RangeImpl; /** - * Queues a tree mutation record for target. - * - * @param target - target node - * @param addedNodes - a list od added nodes - * @param removedNodes - a list of removed nodes - * @param previousSibling - previous sibling of target before mutation - * @param nextSibling - next sibling of target before mutation + * Define constants on prototype. */ -function observer_queueTreeMutationRecord(target, addedNodes, removedNodes, previousSibling, nextSibling) { - /** - * To queue a tree mutation record for target with addedNodes, removedNodes, - * previousSibling, and nextSibling, queue a mutation record of "childList" - * for target with null, null, null, addedNodes, removedNodes, - * previousSibling, and nextSibling. - */ - observer_queueMutationRecord("childList", target, null, null, null, addedNodes, removedNodes, previousSibling, nextSibling); -} -exports.observer_queueTreeMutationRecord = observer_queueTreeMutationRecord; +WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "START_TO_START", 0); +WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "START_TO_END", 1); +WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "END_TO_END", 2); +WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "END_TO_START", 3); +//# sourceMappingURL=RangeImpl.js.map + +/***/ }), + +/***/ 61911: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DocumentFragmentImpl_1 = __nccwpck_require__(12585); +var util_1 = __nccwpck_require__(76195); +var algorithm_1 = __nccwpck_require__(61); /** - * Queues an attribute mutation record for target. - * - * @param target - target node - * @param name - name before mutation - * @param namespace - namespace before mutation - * @param oldValue - attribute value before mutation + * Represents a shadow root. */ -function observer_queueAttributeMutationRecord(target, name, namespace, oldValue) { +var ShadowRootImpl = /** @class */ (function (_super) { + __extends(ShadowRootImpl, _super); /** - * To queue an attribute mutation record for target with name, namespace, - * and oldValue, queue a mutation record of "attributes" for target with - * name, namespace, oldValue, « », « », null, and null. + * Initializes a new instance of `ShadowRoot`. + * + * @param host - shadow root's host element + * @param mode - shadow root's mode */ - observer_queueMutationRecord("attributes", target, name, namespace, oldValue, [], [], null, null); -} -exports.observer_queueAttributeMutationRecord = observer_queueAttributeMutationRecord; -//# sourceMappingURL=MutationObserverAlgorithm.js.map + function ShadowRootImpl(host, mode) { + var _this = _super.call(this) || this; + _this._host = host; + _this._mode = mode; + return _this; + } + Object.defineProperty(ShadowRootImpl.prototype, "mode", { + /** @inheritdoc */ + get: function () { return this._mode; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ShadowRootImpl.prototype, "host", { + /** @inheritdoc */ + get: function () { return this._host; }, + enumerable: true, + configurable: true + }); + /** + * Gets the parent event target for the given event. + * + * @param event - an event + */ + ShadowRootImpl.prototype._getTheParent = function (event) { + /** + * A shadow root’s get the parent algorithm, given an event, returns null + * if event’s composed flag is unset and shadow root is the root of + * event’s path’s first struct’s invocation target, and shadow root’s host + * otherwise. + */ + if (!event._composedFlag && !util_1.isEmpty(event._path) && + algorithm_1.tree_rootNode(event._path[0].invocationTarget) === this) { + return null; + } + else { + return this._host; + } + }; + // MIXIN: DocumentOrShadowRoot + // No elements + /** + * Creates a new `ShadowRoot`. + * + * @param document - owner document + * @param host - shadow root's host element + */ + ShadowRootImpl._create = function (document, host) { + return new ShadowRootImpl(host, "closed"); + }; + return ShadowRootImpl; +}(DocumentFragmentImpl_1.DocumentFragmentImpl)); +exports.ShadowRootImpl = ShadowRootImpl; +//# sourceMappingURL=ShadowRootImpl.js.map /***/ }), -/***/ 35856: +/***/ 21964: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMException_1 = __nccwpck_require__(13166); -var infra_1 = __nccwpck_require__(84251); -var XMLAlgorithm_1 = __nccwpck_require__(57030); +var algorithm_1 = __nccwpck_require__(61); /** - * Validates the given qualified name. - * - * @param qualifiedName - qualified name + * Represents a mixin that allows nodes to become the contents of + * a element. This mixin is implemented by {@link Element} and + * {@link Text}. */ -function namespace_validate(qualifiedName) { - /** - * To validate a qualifiedName, throw an "InvalidCharacterError" - * DOMException if qualifiedName does not match the Name or QName - * production. - */ - if (!XMLAlgorithm_1.xml_isName(qualifiedName)) - throw new DOMException_1.InvalidCharacterError("Invalid XML name: " + qualifiedName); - if (!XMLAlgorithm_1.xml_isQName(qualifiedName)) - throw new DOMException_1.InvalidCharacterError("Invalid XML qualified name: " + qualifiedName + "."); -} -exports.namespace_validate = namespace_validate; +var SlotableImpl = /** @class */ (function () { + function SlotableImpl() { + } + Object.defineProperty(SlotableImpl.prototype, "_name", { + get: function () { return this.__name || ''; }, + set: function (val) { this.__name = val; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SlotableImpl.prototype, "_assignedSlot", { + get: function () { return this.__assignedSlot || null; }, + set: function (val) { this.__assignedSlot = val; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SlotableImpl.prototype, "assignedSlot", { + /** @inheritdoc */ + get: function () { + return algorithm_1.shadowTree_findASlot(this, true); + }, + enumerable: true, + configurable: true + }); + return SlotableImpl; +}()); +exports.SlotableImpl = SlotableImpl; +//# sourceMappingURL=SlotableImpl.js.map + +/***/ }), + +/***/ 86357: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var AbstractRangeImpl_1 = __nccwpck_require__(57126); +var DOMException_1 = __nccwpck_require__(13166); +var util_1 = __nccwpck_require__(65282); /** - * Validates and extracts a namespace, prefix and localName from the - * given namespace and qualified name. - * See: https://dom.spec.whatwg.org/#validate-and-extract. - * - * @param namespace - namespace - * @param qualifiedName - qualified name - * - * @returns a tuple with `namespace`, `prefix` and `localName`. + * Represents a static range. */ -function namespace_validateAndExtract(namespace, qualifiedName) { +var StaticRangeImpl = /** @class */ (function (_super) { + __extends(StaticRangeImpl, _super); /** - * 1. If namespace is the empty string, set it to null. - * 2. Validate qualifiedName. - * 3. Let prefix be null. - * 4. Let localName be qualifiedName. - * 5. If qualifiedName contains a ":" (U+003E), then split the string on it - * and set prefix to the part before and localName to the part after. - * 6. If prefix is non-null and namespace is null, then throw a - * "NamespaceError" DOMException. - * 7. If prefix is "xml" and namespace is not the XML namespace, then throw - * a "NamespaceError" DOMException. - * 8. If either qualifiedName or prefix is "xmlns" and namespace is not the - * XMLNS namespace, then throw a "NamespaceError" DOMException. - * 9. If namespace is the XMLNS namespace and neither qualifiedName nor - * prefix is "xmlns", then throw a "NamespaceError" DOMException. - * 10. Return namespace, prefix, and localName. + * Initializes a new instance of `StaticRange`. */ - if (!namespace) - namespace = null; - namespace_validate(qualifiedName); - var parts = qualifiedName.split(':'); - var prefix = (parts.length === 2 ? parts[0] : null); - var localName = (parts.length === 2 ? parts[1] : qualifiedName); - if (prefix && namespace === null) - throw new DOMException_1.NamespaceError("Qualified name includes a prefix but the namespace is null."); - if (prefix === "xml" && namespace !== infra_1.namespace.XML) - throw new DOMException_1.NamespaceError("Qualified name includes the \"xml\" prefix but the namespace is not the XML namespace."); - if (namespace !== infra_1.namespace.XMLNS && - (prefix === "xmlns" || qualifiedName === "xmlns")) - throw new DOMException_1.NamespaceError("Qualified name includes the \"xmlns\" prefix but the namespace is not the XMLNS namespace."); - if (namespace === infra_1.namespace.XMLNS && - (prefix !== "xmlns" && qualifiedName !== "xmlns")) - throw new DOMException_1.NamespaceError("Qualified name does not include the \"xmlns\" prefix but the namespace is the XMLNS namespace."); - return [namespace, prefix, localName]; -} -exports.namespace_validateAndExtract = namespace_validateAndExtract; -/** - * Extracts a prefix and localName from the given qualified name. - * - * @param qualifiedName - qualified name - * - * @returns an tuple with `prefix` and `localName`. - */ -function namespace_extractQName(qualifiedName) { - namespace_validate(qualifiedName); - var parts = qualifiedName.split(':'); - var prefix = (parts.length === 2 ? parts[0] : null); - var localName = (parts.length === 2 ? parts[1] : qualifiedName); - return [prefix, localName]; -} -exports.namespace_extractQName = namespace_extractQName; -//# sourceMappingURL=NamespaceAlgorithm.js.map + function StaticRangeImpl(init) { + var _this = _super.call(this) || this; + /** + * 1. If init’s startContainer or endContainer is a DocumentType or Attr + * node, then throw an "InvalidNodeTypeError" DOMException. + * 2. Let staticRange be a new StaticRange object. + * 3. Set staticRange’s start to (init’s startContainer, init’s startOffset) + * and end to (init’s endContainer, init’s endOffset). + * 4. Return staticRange. + */ + if (util_1.Guard.isDocumentTypeNode(init.startContainer) || util_1.Guard.isAttrNode(init.startContainer) || + util_1.Guard.isDocumentTypeNode(init.endContainer) || util_1.Guard.isAttrNode(init.endContainer)) { + throw new DOMException_1.InvalidNodeTypeError(); + } + _this._start = [init.startContainer, init.startOffset]; + _this._end = [init.endContainer, init.endOffset]; + return _this; + } + return StaticRangeImpl; +}(AbstractRangeImpl_1.AbstractRangeImpl)); +exports.StaticRangeImpl = StaticRangeImpl; +//# sourceMappingURL=StaticRangeImpl.js.map /***/ }), -/***/ 74924: +/***/ 42191: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); @@ -47500,875 +32443,772 @@ var __values = (this && this.__values) || function(o) { throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(65282); -var infra_1 = __nccwpck_require__(84251); -var CreateAlgorithm_1 = __nccwpck_require__(57339); -var OrderedSetAlgorithm_1 = __nccwpck_require__(53670); -var DOMAlgorithm_1 = __nccwpck_require__(9628); -var MutationAlgorithm_1 = __nccwpck_require__(45463); -var ElementAlgorithm_1 = __nccwpck_require__(51849); +var interfaces_1 = __nccwpck_require__(27305); +var CharacterDataImpl_1 = __nccwpck_require__(65330); +var algorithm_1 = __nccwpck_require__(61); +var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Replaces the contents of the given node with a single text node. - * - * @param string - node contents - * @param parent - a node + * Represents a text node. */ -function node_stringReplaceAll(str, parent) { +var TextImpl = /** @class */ (function (_super) { + __extends(TextImpl, _super); /** - * 1. Let node be null. - * 2. If string is not the empty string, then set node to a new Text node - * whose data is string and node document is parent’s node document. - * 3. Replace all with node within parent. + * Initializes a new instance of `Text`. + * + * @param data - the text content */ - var node = null; - if (str !== '') { - node = CreateAlgorithm_1.create_text(parent._nodeDocument, str); + function TextImpl(data) { + if (data === void 0) { data = ''; } + var _this = _super.call(this, data) || this; + _this._name = ''; + _this._assignedSlot = null; + return _this; } - MutationAlgorithm_1.mutation_replaceAll(node, parent); -} -exports.node_stringReplaceAll = node_stringReplaceAll; -/** - * Clones a node. - * - * @param node - a node to clone - * @param document - the document to own the cloned node - * @param cloneChildrenFlag - whether to clone node's children - */ -function node_clone(node, document, cloneChildrenFlag) { - var e_1, _a, e_2, _b; - if (document === void 0) { document = null; } - if (cloneChildrenFlag === void 0) { cloneChildrenFlag = false; } - /** - * 1. If document is not given, let document be node’s node document. - */ - if (document === null) - document = node._nodeDocument; - var copy; - if (util_1.Guard.isElementNode(node)) { - /** - * 2. If node is an element, then: - * 2.1. Let copy be the result of creating an element, given document, - * node’s local name, node’s namespace, node’s namespace prefix, - * and node’s is value, with the synchronous custom elements flag unset. - * 2.2. For each attribute in node’s attribute list: - * 2.2.1. Let copyAttribute be a clone of attribute. - * 2.2.2. Append copyAttribute to copy. - */ - copy = ElementAlgorithm_1.element_createAnElement(document, node._localName, node._namespace, node._namespacePrefix, node._is, false); - try { - for (var _c = __values(node._attributeList), _d = _c.next(); !_d.done; _d = _c.next()) { - var attribute = _d.value; - var copyAttribute = node_clone(attribute, document); - ElementAlgorithm_1.element_append(copyAttribute, copy); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { + Object.defineProperty(TextImpl.prototype, "wholeText", { + /** @inheritdoc */ + get: function () { + var e_1, _a; + /** + * The wholeText attribute’s getter must return the concatenation of the + * data of the contiguous Text nodes of the context object, in tree order. + */ + var text = ''; try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + for (var _b = __values(algorithm_1.text_contiguousTextNodes(this, true)), _c = _b.next(); !_c.done; _c = _b.next()) { + var node = _c.value; + text = text + node._data; + } } - finally { if (e_1) throw e_1.error; } - } - } - else { + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return text; + }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + TextImpl.prototype.splitText = function (offset) { /** - * 3. Otherwise, let copy be a node that implements the same interfaces as - * node, and fulfills these additional requirements, switching on node: - * - Document - * Set copy’s encoding, content type, URL, origin, type, and mode, to those - * of node. - * - DocumentType - * Set copy’s name, public ID, and system ID, to those of node. - * - Attr - * Set copy’s namespace, namespace prefix, local name, and value, to - * those of node. - * - Text - * - Comment - * Set copy’s data, to that of node. - * - ProcessingInstruction - * Set copy’s target and data to those of node. - * - Any other node + * The splitText(offset) method, when invoked, must split context object + * with offset offset. */ - if (util_1.Guard.isDocumentNode(node)) { - var doc = CreateAlgorithm_1.create_document(); - doc._encoding = node._encoding; - doc._contentType = node._contentType; - doc._URL = node._URL; - doc._origin = node._origin; - doc._type = node._type; - doc._mode = node._mode; - copy = doc; - } - else if (util_1.Guard.isDocumentTypeNode(node)) { - var doctype = CreateAlgorithm_1.create_documentType(document, node._name, node._publicId, node._systemId); - copy = doctype; - } - else if (util_1.Guard.isAttrNode(node)) { - var attr = CreateAlgorithm_1.create_attr(document, node.localName); - attr._namespace = node._namespace; - attr._namespacePrefix = node._namespacePrefix; - attr._value = node._value; - copy = attr; - } - else if (util_1.Guard.isExclusiveTextNode(node)) { - copy = CreateAlgorithm_1.create_text(document, node._data); - } - else if (util_1.Guard.isCDATASectionNode(node)) { - copy = CreateAlgorithm_1.create_cdataSection(document, node._data); - } - else if (util_1.Guard.isCommentNode(node)) { - copy = CreateAlgorithm_1.create_comment(document, node._data); - } - else if (util_1.Guard.isProcessingInstructionNode(node)) { - copy = CreateAlgorithm_1.create_processingInstruction(document, node._target, node._data); - } - else if (util_1.Guard.isDocumentFragmentNode(node)) { - copy = CreateAlgorithm_1.create_documentFragment(document); - } - else { - copy = Object.create(node); - } - } - /** - * 4. Set copy’s node document and document to copy, if copy is a document, - * and set copy’s node document to document otherwise. - */ - if (util_1.Guard.isDocumentNode(copy)) { - copy._nodeDocument = copy; - document = copy; - } - else { - copy._nodeDocument = document; - } - /** - * 5. Run any cloning steps defined for node in other applicable - * specifications and pass copy, node, document and the clone children flag - * if set, as parameters. - */ - if (DOMImpl_1.dom.features.steps) { - DOMAlgorithm_1.dom_runCloningSteps(copy, node, document, cloneChildrenFlag); - } - /** - * 6. If the clone children flag is set, clone all the children of node and - * append them to copy, with document as specified and the clone children - * flag being set. - */ - if (cloneChildrenFlag) { - try { - for (var _e = __values(node._children), _f = _e.next(); !_f.done; _f = _e.next()) { - var child = _f.value; - var childCopy = node_clone(child, document, true); - MutationAlgorithm_1.mutation_append(childCopy, copy); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_f && !_f.done && (_b = _e.return)) _b.call(_e); - } - finally { if (e_2) throw e_2.error; } - } - } - /** - * 7. Return copy. - */ - return copy; -} -exports.node_clone = node_clone; -/** - * Determines if two nodes can be considered equal. - * - * @param a - node to compare - * @param b - node to compare - */ -function node_equals(a, b) { - var e_3, _a, e_4, _b; - /** - * 1. A and B’s nodeType attribute value is identical. - */ - if (a._nodeType !== b._nodeType) - return false; - /** - * 2. The following are also equal, depending on A: - * - DocumentType - * Its name, public ID, and system ID. - * - Element - * Its namespace, namespace prefix, local name, and its attribute list’s size. - * - Attr - * Its namespace, local name, and value. - * - ProcessingInstruction - * Its target and data. - * - Text - * - Comment - * Its data. - */ - if (util_1.Guard.isDocumentTypeNode(a) && util_1.Guard.isDocumentTypeNode(b)) { - if (a._name !== b._name || a._publicId !== b._publicId || - a._systemId !== b._systemId) - return false; - } - else if (util_1.Guard.isElementNode(a) && util_1.Guard.isElementNode(b)) { - if (a._namespace !== b._namespace || a._namespacePrefix !== b._namespacePrefix || - a._localName !== b._localName || - a._attributeList.length !== b._attributeList.length) - return false; - } - else if (util_1.Guard.isAttrNode(a) && util_1.Guard.isAttrNode(b)) { - if (a._namespace !== b._namespace || a._localName !== b._localName || - a._value !== b._value) - return false; - } - else if (util_1.Guard.isProcessingInstructionNode(a) && util_1.Guard.isProcessingInstructionNode(b)) { - if (a._target !== b._target || a._data !== b._data) - return false; - } - else if (util_1.Guard.isCharacterDataNode(a) && util_1.Guard.isCharacterDataNode(b)) { - if (a._data !== b._data) - return false; - } - /** - * 3. If A is an element, each attribute in its attribute list has an attribute - * that equals an attribute in B’s attribute list. - */ - if (util_1.Guard.isElementNode(a) && util_1.Guard.isElementNode(b)) { - var attrMap = {}; - try { - for (var _c = __values(a._attributeList), _d = _c.next(); !_d.done; _d = _c.next()) { - var attrA = _d.value; - attrMap[attrA._localName] = attrA; - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); - } - finally { if (e_3) throw e_3.error; } - } - try { - for (var _e = __values(b._attributeList), _f = _e.next(); !_f.done; _f = _e.next()) { - var attrB = _f.value; - var attrA = attrMap[attrB._localName]; - if (!attrA) - return false; - if (!node_equals(attrA, attrB)) - return false; - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (_f && !_f.done && (_b = _e.return)) _b.call(_e); - } - finally { if (e_4) throw e_4.error; } - } - } - /** - * 4. A and B have the same number of children. - * 5. Each child of A equals the child of B at the identical index. - */ - if (a._children.size !== b._children.size) - return false; - var itA = a._children[Symbol.iterator](); - var itB = b._children[Symbol.iterator](); - var resultA = itA.next(); - var resultB = itB.next(); - while (!resultA.done && !resultB.done) { - var child1 = resultA.value; - var child2 = resultB.value; - if (!node_equals(child1, child2)) - return false; - resultA = itA.next(); - resultB = itB.next(); - } - return true; -} -exports.node_equals = node_equals; -/** - * Returns a collection of elements with the given qualified name which are - * descendants of the given root node. - * See: https://dom.spec.whatwg.org/#concept-getelementsbytagname - * - * @param qualifiedName - qualified name - * @param root - root node - */ -function node_listOfElementsWithQualifiedName(qualifiedName, root) { + return algorithm_1.text_split(this, offset); + }; + Object.defineProperty(TextImpl.prototype, "assignedSlot", { + // MIXIN: Slotable + /* istanbul ignore next */ + get: function () { throw new Error("Mixin: Slotable not implemented."); }, + enumerable: true, + configurable: true + }); /** - * 1. If qualifiedName is "*" (U+002A), return a HTMLCollection rooted at - * root, whose filter matches only descendant elements. - * 2. Otherwise, if root’s node document is an HTML document, return a - * HTMLCollection rooted at root, whose filter matches the following - * descendant elements: - * 2.1. Whose namespace is the HTML namespace and whose qualified name is - * qualifiedName, in ASCII lowercase. - * 2.2. Whose namespace is not the HTML namespace and whose qualified name - * is qualifiedName. - * 3. Otherwise, return a HTMLCollection rooted at root, whose filter - * matches descendant elements whose qualified name is qualifiedName. + * Creates a `Text`. + * + * @param document - owner document + * @param data - the text content */ - if (qualifiedName === "*") { - return CreateAlgorithm_1.create_htmlCollection(root); - } - else if (root._nodeDocument._type === "html") { - return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { - if (ele._namespace === infra_1.namespace.HTML && - ele._qualifiedName === qualifiedName.toLowerCase()) { - return true; - } - else if (ele._namespace !== infra_1.namespace.HTML && - ele._qualifiedName === qualifiedName) { - return true; - } - else { - return false; - } - }); - } - else { - return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { - return (ele._qualifiedName === qualifiedName); - }); - } -} -exports.node_listOfElementsWithQualifiedName = node_listOfElementsWithQualifiedName; + TextImpl._create = function (document, data) { + if (data === void 0) { data = ''; } + var node = new TextImpl(data); + node._nodeDocument = document; + return node; + }; + return TextImpl; +}(CharacterDataImpl_1.CharacterDataImpl)); +exports.TextImpl = TextImpl; /** - * Returns a collection of elements with the given namespace which are - * descendants of the given root node. - * See: https://dom.spec.whatwg.org/#concept-getelementsbytagnamens - * - * @param namespace - element namespace - * @param localName - local name - * @param root - root node + * Initialize prototype properties */ -function node_listOfElementsWithNamespace(namespace, localName, root) { - /** - * 1. If namespace is the empty string, set it to null. - * 2. If both namespace and localName are "*" (U+002A), return a - * HTMLCollection rooted at root, whose filter matches descendant elements. - * 3. Otherwise, if namespace is "*" (U+002A), return a HTMLCollection - * rooted at root, whose filter matches descendant elements whose local - * name is localName. - * 4. Otherwise, if localName is "*" (U+002A), return a HTMLCollection - * rooted at root, whose filter matches descendant elements whose - * namespace is namespace. - * 5. Otherwise, return a HTMLCollection rooted at root, whose filter - * matches descendant elements whose namespace is namespace and local - * name is localName. - */ - if (namespace === '') - namespace = null; - if (namespace === "*" && localName === "*") { - return CreateAlgorithm_1.create_htmlCollection(root); - } - else if (namespace === "*") { - return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { - return (ele._localName === localName); - }); - } - else if (localName === "*") { - return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { - return (ele._namespace === namespace); - }); - } - else { - return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { - return (ele._localName === localName && ele._namespace === namespace); - }); - } -} -exports.node_listOfElementsWithNamespace = node_listOfElementsWithNamespace; +WebIDLAlgorithm_1.idl_defineConst(TextImpl.prototype, "_nodeType", interfaces_1.NodeType.Text); +//# sourceMappingURL=TextImpl.js.map + +/***/ }), + +/***/ 39782: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); /** - * Returns a collection of elements with the given class names which are - * descendants of the given root node. - * See: https://dom.spec.whatwg.org/#concept-getelementsbyclassname - * - * @param namespace - element namespace - * @param localName - local name - * @param root - root node + * Represents an object which can be used to iterate through the nodes + * of a subtree. */ -function node_listOfElementsWithClassNames(classNames, root) { +var TraverserImpl = /** @class */ (function () { /** - * 1. Let classes be the result of running the ordered set parser - * on classNames. - * 2. If classes is the empty set, return an empty HTMLCollection. - * 3. Return a HTMLCollection rooted at root, whose filter matches - * descendant elements that have all their classes in classes. - * The comparisons for the classes must be done in an ASCII case-insensitive - * manner if root’s node document’s mode is "quirks", and in a - * case-sensitive manner otherwise. + * Initializes a new instance of `Traverser`. + * + * @param root - root node */ - var classes = OrderedSetAlgorithm_1.orderedSet_parse(classNames); - if (classes.size === 0) { - return CreateAlgorithm_1.create_htmlCollection(root, function () { return false; }); + function TraverserImpl(root) { + this._activeFlag = false; + this._root = root; + this._whatToShow = interfaces_1.WhatToShow.All; + this._filter = null; } - var caseSensitive = (root._nodeDocument._mode !== "quirks"); - return CreateAlgorithm_1.create_htmlCollection(root, function (ele) { - var eleClasses = ele.classList; - return OrderedSetAlgorithm_1.orderedSet_contains(eleClasses._tokenSet, classes, caseSensitive); + Object.defineProperty(TraverserImpl.prototype, "root", { + /** @inheritdoc */ + get: function () { return this._root; }, + enumerable: true, + configurable: true }); -} -exports.node_listOfElementsWithClassNames = node_listOfElementsWithClassNames; + Object.defineProperty(TraverserImpl.prototype, "whatToShow", { + /** @inheritdoc */ + get: function () { return this._whatToShow; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TraverserImpl.prototype, "filter", { + /** @inheritdoc */ + get: function () { return this._filter; }, + enumerable: true, + configurable: true + }); + return TraverserImpl; +}()); +exports.TraverserImpl = TraverserImpl; +//# sourceMappingURL=TraverserImpl.js.map + +/***/ }), + +/***/ 89261: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var TraverserImpl_1 = __nccwpck_require__(39782); +var algorithm_1 = __nccwpck_require__(61); /** - * Searches for a namespace prefix associated with the given namespace - * starting from the given element through its ancestors. - * - * @param element - an element node to start searching at - * @param namespace - namespace to search for + * Represents the nodes of a subtree and a position within them. */ -function node_locateANamespacePrefix(element, namespace) { - /** - * 1. If element’s namespace is namespace and its namespace prefix is not - * null, then return its namespace prefix. - */ - if (element._namespace === namespace && element._namespacePrefix !== null) { - return element._namespacePrefix; - } - /** - * 2. If element has an attribute whose namespace prefix is "xmlns" and - * value is namespace, then return element’s first such attribute’s - * local name. - */ - for (var i = 0; i < element._attributeList.length; i++) { - var attr = element._attributeList[i]; - if (attr._namespacePrefix === "xmlns" && attr._value === namespace) { - return attr._localName; - } - } +var TreeWalkerImpl = /** @class */ (function (_super) { + __extends(TreeWalkerImpl, _super); /** - * 3. If element’s parent element is not null, then return the result of - * running locate a namespace prefix on that element using namespace. + * Initializes a new instance of `TreeWalker`. */ - if (element._parent && util_1.Guard.isElementNode(element._parent)) { - return node_locateANamespacePrefix(element._parent, namespace); + function TreeWalkerImpl(root, current) { + var _this = _super.call(this, root) || this; + _this._current = current; + return _this; } - /** - * 4. Return null. - */ - return null; -} -exports.node_locateANamespacePrefix = node_locateANamespacePrefix; -/** - * Searches for a namespace associated with the given namespace prefix - * starting from the given node through its ancestors. - * - * @param node - a node to start searching at - * @param prefix - namespace prefix to search for - */ -function node_locateANamespace(node, prefix) { - if (util_1.Guard.isElementNode(node)) { + Object.defineProperty(TreeWalkerImpl.prototype, "currentNode", { + /** @inheritdoc */ + get: function () { return this._current; }, + set: function (value) { this._current = value; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + TreeWalkerImpl.prototype.parentNode = function () { /** - * 1. If its namespace is not null and its namespace prefix is prefix, - * then return namespace. + * 1. Let node be the context object’s current. + * 2. While node is non-null and is not the context object’s root: */ - if (node._namespace !== null && node._namespacePrefix === prefix) { - return node._namespace; + var node = this._current; + while (node !== null && node !== this._root) { + /** + * 2.1. Set node to node’s parent. + * 2.2. If node is non-null and filtering node within the context object + * returns FILTER_ACCEPT, then set the context object’s current to node + * and return node. + */ + node = node._parent; + if (node !== null && + algorithm_1.traversal_filter(this, node) === interfaces_1.FilterResult.Accept) { + this._current = node; + return node; + } } /** - * 2. If it has an attribute whose namespace is the XMLNS namespace, - * namespace prefix is "xmlns", and local name is prefix, or if prefix - * is null and it has an attribute whose namespace is the XMLNS namespace, - * namespace prefix is null, and local name is "xmlns", then return its - * value if it is not the empty string, and null otherwise. + * 3. Return null. */ - for (var i = 0; i < node._attributeList.length; i++) { - var attr = node._attributeList[i]; - if (attr._namespace === infra_1.namespace.XMLNS && - attr._namespacePrefix === "xmlns" && - attr._localName === prefix) { - return attr._value || null; + return null; + }; + /** @inheritdoc */ + TreeWalkerImpl.prototype.firstChild = function () { + /** + * The firstChild() method, when invoked, must traverse children with the + * context object and first. + */ + return algorithm_1.treeWalker_traverseChildren(this, true); + }; + /** @inheritdoc */ + TreeWalkerImpl.prototype.lastChild = function () { + /** + * The lastChild() method, when invoked, must traverse children with the + * context object and last. + */ + return algorithm_1.treeWalker_traverseChildren(this, false); + }; + /** @inheritdoc */ + TreeWalkerImpl.prototype.nextSibling = function () { + /** + * The nextSibling() method, when invoked, must traverse siblings with the + * context object and next. + */ + return algorithm_1.treeWalker_traverseSiblings(this, true); + }; + /** @inheritdoc */ + TreeWalkerImpl.prototype.previousNode = function () { + /** + * 1. Let node be the context object’s current. + * 2. While node is not the context object’s root: + */ + var node = this._current; + while (node !== this._root) { + /** + * 2.1. Let sibling be node’s previous sibling. + * 2.2. While sibling is non-null: + */ + var sibling = node._previousSibling; + while (sibling) { + /** + * 2.2.1. Set node to sibling. + * 2.2.2. Let result be the result of filtering node within the context + * object. + */ + node = sibling; + var result = algorithm_1.traversal_filter(this, node); + /** + * 2.2.3. While result is not FILTER_REJECT and node has a child: + */ + while (result !== interfaces_1.FilterResult.Reject && node._lastChild) { + /** + * 2.2.3.1. Set node to node’s last child. + * 2.2.3.2. Set result to the result of filtering node within the + * context object. + */ + node = node._lastChild; + result = algorithm_1.traversal_filter(this, node); + } + /** + * 2.2.4. If result is FILTER_ACCEPT, then set the context object’s + * current to node and return node. + */ + if (result === interfaces_1.FilterResult.Accept) { + this._current = node; + return node; + } + /** + * 2.2.5. Set sibling to node’s previous sibling. + */ + sibling = node._previousSibling; } - if (prefix === null && attr._namespace === infra_1.namespace.XMLNS && - attr._namespacePrefix === null && attr._localName === "xmlns") { - return attr._value || null; + /** + * 2.3. If node is the context object’s root or node’s parent is null, + * then return null. + */ + if (node === this._root || node._parent === null) { + return null; + } + /** + * 2.4. Set node to node’s parent. + */ + node = node._parent; + /** + * 2.5. If the return value of filtering node within the context object is + * FILTER_ACCEPT, then set the context object’s current to node and + * return node. + */ + if (algorithm_1.traversal_filter(this, node) === interfaces_1.FilterResult.Accept) { + this._current = node; + return node; } } /** - * 3. If its parent element is null, then return null. - */ - if (node.parentElement === null) - return null; - /** - * 4. Return the result of running locate a namespace on its parent - * element using prefix. - */ - return node_locateANamespace(node.parentElement, prefix); - } - else if (util_1.Guard.isDocumentNode(node)) { - /** - * 1. If its document element is null, then return null. - * 2. Return the result of running locate a namespace on its document - * element using prefix. + * 3. Return null. */ - if (node.documentElement === null) - return null; - return node_locateANamespace(node.documentElement, prefix); - } - else if (util_1.Guard.isDocumentTypeNode(node) || util_1.Guard.isDocumentFragmentNode(node)) { return null; - } - else if (util_1.Guard.isAttrNode(node)) { - /** - * 1. If its element is null, then return null. - * 2. Return the result of running locate a namespace on its element - * using prefix. - */ - if (node._element === null) - return null; - return node_locateANamespace(node._element, prefix); - } - else { + }; + /** @inheritdoc */ + TreeWalkerImpl.prototype.previousSibling = function () { /** - * 1. If its parent element is null, then return null. - * 2. Return the result of running locate a namespace on its parent - * element using prefix. + * The previousSibling() method, when invoked, must traverse siblings with + * the context object and previous. */ - if (!node._parent || !util_1.Guard.isElementNode(node._parent)) - return null; - return node_locateANamespace(node._parent, prefix); - } -} -exports.node_locateANamespace = node_locateANamespace; -//# sourceMappingURL=NodeAlgorithm.js.map - -/***/ }), - -/***/ 3973: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var interfaces_1 = __nccwpck_require__(27305); -var TraversalAlgorithm_1 = __nccwpck_require__(80998); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -/** - * Returns the next or previous node in the subtree, or `null` if - * there are none. - * - * @param iterator - the `NodeIterator` instance - * @param forward- `true` to return the next node, or `false` to - * return the previous node. - */ -function nodeIterator_traverse(iterator, forward) { - /** - * 1. Let node be iterator’s reference. - * 2. Let beforeNode be iterator’s pointer before reference. - */ - var node = iterator._reference; - var beforeNode = iterator._pointerBeforeReference; - /** - * 3. While true: - */ - while (true) { + return algorithm_1.treeWalker_traverseSiblings(this, false); + }; + /** @inheritdoc */ + TreeWalkerImpl.prototype.nextNode = function () { /** - * 3.1. Branch on direction: + * 1. Let node be the context object’s current. + * 2. Let result be FILTER_ACCEPT. + * 3. While true: */ - if (forward) { + var node = this._current; + var result = interfaces_1.FilterResult.Accept; + while (true) { /** - * - next + * 3.1. While result is not FILTER_REJECT and node has a child: */ - if (!beforeNode) { + while (result !== interfaces_1.FilterResult.Reject && node._firstChild) { /** - * If beforeNode is false, then set node to the first node following - * node in iterator’s iterator collection. If there is no such node, - * then return null. + * 3.1.1. Set node to its first child. + * 3.1.2. Set result to the result of filtering node within the context + * object. + * 3.1.3. If result is FILTER_ACCEPT, then set the context object’s + * current to node and return node. */ - var nextNode = TreeAlgorithm_1.tree_getFollowingNode(iterator._root, node); - if (nextNode) { - node = nextNode; - } - else { - return null; + node = node._firstChild; + result = algorithm_1.traversal_filter(this, node); + if (result === interfaces_1.FilterResult.Accept) { + this._current = node; + return node; } } - else { - /** - * If beforeNode is true, then set it to false. - */ - beforeNode = false; - } - } - else { /** - * - previous + * 3.2. Let sibling be null. + * 3.3. Let temporary be node. + * 3.4. While temporary is non-null: */ - if (beforeNode) { + var sibling = null; + var temporary = node; + while (temporary !== null) { /** - * If beforeNode is true, then set node to the first node preceding - * node in iterator’s iterator collection. If there is no such node, - * then return null. + * 3.4.1. If temporary is the context object’s root, then return null. */ - var prevNode = TreeAlgorithm_1.tree_getPrecedingNode(iterator.root, node); - if (prevNode) { - node = prevNode; - } - else { + if (temporary === this._root) { return null; } - } - else { /** - * If beforeNode is false, then set it to true. + * 3.4.2. Set sibling to temporary’s next sibling. + * 3.4.3. If sibling is non-null, then break. */ - beforeNode = true; + sibling = temporary._nextSibling; + if (sibling !== null) { + node = sibling; + break; + } + /** + * 3.4.4. Set temporary to temporary’s parent. + */ + temporary = temporary._parent; + } + /** + * 3.5. Set result to the result of filtering node within the context object. + * 3.6. If result is FILTER_ACCEPT, then set the context object’s current + * to node and return node. + */ + result = algorithm_1.traversal_filter(this, node); + if (result === interfaces_1.FilterResult.Accept) { + this._current = node; + return node; } } - /** - * 3.2. Let result be the result of filtering node within iterator. - * 3.3. If result is FILTER_ACCEPT, then break. - */ - var result = TraversalAlgorithm_1.traversal_filter(iterator, node); - if (result === interfaces_1.FilterResult.Accept) { - break; - } - } + }; /** - * 4. Set iterator’s reference to node. - * 5. Set iterator’s pointer before reference to beforeNode. - * 6. Return node. + * Creates a new `TreeWalker`. + * + * @param root - iterator's root node + * @param current - current node */ - iterator._reference = node; - iterator._pointerBeforeReference = beforeNode; - return node; -} -exports.nodeIterator_traverse = nodeIterator_traverse; -/** - * Gets the global iterator list. - */ -function nodeIterator_iteratorList() { - return DOMImpl_1.dom.window._iteratorList; -} -exports.nodeIterator_iteratorList = nodeIterator_iteratorList; -//# sourceMappingURL=NodeIteratorAlgorithm.js.map + TreeWalkerImpl._create = function (root, current) { + return new TreeWalkerImpl(root, current); + }; + return TreeWalkerImpl; +}(TraverserImpl_1.TraverserImpl)); +exports.TreeWalkerImpl = TreeWalkerImpl; +//# sourceMappingURL=TreeWalkerImpl.js.map /***/ }), -/***/ 53670: +/***/ 69067: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -var infra_1 = __nccwpck_require__(84251); +var EventTargetImpl_1 = __nccwpck_require__(69968); +var util_1 = __nccwpck_require__(76195); +var algorithm_1 = __nccwpck_require__(61); /** - * Converts a whitespace separated string into an array of tokens. - * - * @param value - a string of whitespace separated tokens + * Represents a window containing a DOM document. */ -function orderedSet_parse(value) { +var WindowImpl = /** @class */ (function (_super) { + __extends(WindowImpl, _super); /** - * 1. Let inputTokens be the result of splitting input on ASCII whitespace. - * 2. Let tokens be a new ordered set. - * 3. For each token in inputTokens, append token to tokens. - * 4. Return tokens. + * Initializes a new instance of `Window`. */ - var inputTokens = infra_1.string.splitAStringOnASCIIWhitespace(value); - return new Set(inputTokens); -} -exports.orderedSet_parse = orderedSet_parse; + function WindowImpl() { + var _this = _super.call(this) || this; + _this._signalSlots = new Set(); + _this._mutationObserverMicrotaskQueued = false; + _this._mutationObservers = new Set(); + _this._iteratorList = new util_1.FixedSizeSet(); + _this._associatedDocument = algorithm_1.create_document(); + return _this; + } + Object.defineProperty(WindowImpl.prototype, "document", { + /** @inheritdoc */ + get: function () { return this._associatedDocument; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(WindowImpl.prototype, "event", { + /** @inheritdoc */ + get: function () { return this._currentEvent; }, + enumerable: true, + configurable: true + }); + /** + * Creates a new window with a blank document. + */ + WindowImpl._create = function () { + return new WindowImpl(); + }; + return WindowImpl; +}(EventTargetImpl_1.EventTargetImpl)); +exports.WindowImpl = WindowImpl; +//# sourceMappingURL=WindowImpl.js.map + +/***/ }), + +/***/ 21685: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var DocumentImpl_1 = __nccwpck_require__(14333); /** - * Converts an array of tokens into a space separated string. - * - * @param tokens - an array of token strings + * Represents an XML document. */ -function orderedSet_serialize(tokens) { +var XMLDocumentImpl = /** @class */ (function (_super) { + __extends(XMLDocumentImpl, _super); /** - * The ordered set serializer takes a set and returns the concatenation of - * set using U+0020 SPACE. + * Initializes a new instance of `XMLDocument`. */ - return __spread(tokens).join(' '); -} -exports.orderedSet_serialize = orderedSet_serialize; + function XMLDocumentImpl() { + return _super.call(this) || this; + } + return XMLDocumentImpl; +}(DocumentImpl_1.DocumentImpl)); +exports.XMLDocumentImpl = XMLDocumentImpl; +//# sourceMappingURL=XMLDocumentImpl.js.map + +/***/ }), + +/***/ 50633: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +// Import implementation classes +var AbortControllerImpl_1 = __nccwpck_require__(66461); +exports.AbortController = AbortControllerImpl_1.AbortControllerImpl; +var AbortSignalImpl_1 = __nccwpck_require__(10022); +exports.AbortSignal = AbortSignalImpl_1.AbortSignalImpl; +var AbstractRangeImpl_1 = __nccwpck_require__(57126); +exports.AbstractRange = AbstractRangeImpl_1.AbstractRangeImpl; +var AttrImpl_1 = __nccwpck_require__(13717); +exports.Attr = AttrImpl_1.AttrImpl; +var CDATASectionImpl_1 = __nccwpck_require__(23977); +exports.CDATASection = CDATASectionImpl_1.CDATASectionImpl; +var CharacterDataImpl_1 = __nccwpck_require__(65330); +exports.CharacterData = CharacterDataImpl_1.CharacterDataImpl; +var ChildNodeImpl_1 = __nccwpck_require__(88264); +var CommentImpl_1 = __nccwpck_require__(20930); +exports.Comment = CommentImpl_1.CommentImpl; +var CustomEventImpl_1 = __nccwpck_require__(59857); +exports.CustomEvent = CustomEventImpl_1.CustomEventImpl; +var DocumentFragmentImpl_1 = __nccwpck_require__(12585); +exports.DocumentFragment = DocumentFragmentImpl_1.DocumentFragmentImpl; +var DocumentImpl_1 = __nccwpck_require__(14333); +exports.Document = DocumentImpl_1.DocumentImpl; +var DocumentOrShadowRootImpl_1 = __nccwpck_require__(65274); +var DocumentTypeImpl_1 = __nccwpck_require__(3173); +exports.DocumentType = DocumentTypeImpl_1.DocumentTypeImpl; +var DOMImpl_1 = __nccwpck_require__(14177); +exports.dom = DOMImpl_1.dom; +var DOMImplementationImpl_1 = __nccwpck_require__(42197); +exports.DOMImplementation = DOMImplementationImpl_1.DOMImplementationImpl; +var DOMTokenListImpl_1 = __nccwpck_require__(65096); +exports.DOMTokenList = DOMTokenListImpl_1.DOMTokenListImpl; +var ElementImpl_1 = __nccwpck_require__(35975); +exports.Element = ElementImpl_1.ElementImpl; +var EventImpl_1 = __nccwpck_require__(38245); +exports.Event = EventImpl_1.EventImpl; +var EventTargetImpl_1 = __nccwpck_require__(69968); +exports.EventTarget = EventTargetImpl_1.EventTargetImpl; +var HTMLCollectionImpl_1 = __nccwpck_require__(93969); +exports.HTMLCollection = HTMLCollectionImpl_1.HTMLCollectionImpl; +var MutationObserverImpl_1 = __nccwpck_require__(89616); +exports.MutationObserver = MutationObserverImpl_1.MutationObserverImpl; +var MutationRecordImpl_1 = __nccwpck_require__(6219); +exports.MutationRecord = MutationRecordImpl_1.MutationRecordImpl; +var NamedNodeMapImpl_1 = __nccwpck_require__(57206); +exports.NamedNodeMap = NamedNodeMapImpl_1.NamedNodeMapImpl; +var NodeFilterImpl_1 = __nccwpck_require__(12355); +exports.NodeFilter = NodeFilterImpl_1.NodeFilterImpl; +var NodeImpl_1 = __nccwpck_require__(91745); +exports.Node = NodeImpl_1.NodeImpl; +var NodeIteratorImpl_1 = __nccwpck_require__(61997); +exports.NodeIterator = NodeIteratorImpl_1.NodeIteratorImpl; +var NodeListImpl_1 = __nccwpck_require__(43728); +exports.NodeList = NodeListImpl_1.NodeListImpl; +var NodeListStaticImpl_1 = __nccwpck_require__(65306); +exports.NodeListStatic = NodeListStaticImpl_1.NodeListStaticImpl; +var NonDocumentTypeChildNodeImpl_1 = __nccwpck_require__(71032); +var NonElementParentNodeImpl_1 = __nccwpck_require__(90733); +var ParentNodeImpl_1 = __nccwpck_require__(85988); +var ProcessingInstructionImpl_1 = __nccwpck_require__(99430); +exports.ProcessingInstruction = ProcessingInstructionImpl_1.ProcessingInstructionImpl; +var RangeImpl_1 = __nccwpck_require__(50166); +exports.Range = RangeImpl_1.RangeImpl; +var ShadowRootImpl_1 = __nccwpck_require__(61911); +exports.ShadowRoot = ShadowRootImpl_1.ShadowRootImpl; +var SlotableImpl_1 = __nccwpck_require__(21964); +var StaticRangeImpl_1 = __nccwpck_require__(86357); +exports.StaticRange = StaticRangeImpl_1.StaticRangeImpl; +var TextImpl_1 = __nccwpck_require__(42191); +exports.Text = TextImpl_1.TextImpl; +var TraverserImpl_1 = __nccwpck_require__(39782); +exports.Traverser = TraverserImpl_1.TraverserImpl; +var TreeWalkerImpl_1 = __nccwpck_require__(89261); +exports.TreeWalker = TreeWalkerImpl_1.TreeWalkerImpl; +var WindowImpl_1 = __nccwpck_require__(69067); +exports.Window = WindowImpl_1.WindowImpl; +var XMLDocumentImpl_1 = __nccwpck_require__(21685); +exports.XMLDocument = XMLDocumentImpl_1.XMLDocumentImpl; +// Apply mixins +// ChildNode +util_1.applyMixin(ElementImpl_1.ElementImpl, ChildNodeImpl_1.ChildNodeImpl); +util_1.applyMixin(CharacterDataImpl_1.CharacterDataImpl, ChildNodeImpl_1.ChildNodeImpl); +util_1.applyMixin(DocumentTypeImpl_1.DocumentTypeImpl, ChildNodeImpl_1.ChildNodeImpl); +// DocumentOrShadowRoot +util_1.applyMixin(DocumentImpl_1.DocumentImpl, DocumentOrShadowRootImpl_1.DocumentOrShadowRootImpl); +util_1.applyMixin(ShadowRootImpl_1.ShadowRootImpl, DocumentOrShadowRootImpl_1.DocumentOrShadowRootImpl); +// NonDocumentTypeChildNode +util_1.applyMixin(ElementImpl_1.ElementImpl, NonDocumentTypeChildNodeImpl_1.NonDocumentTypeChildNodeImpl); +util_1.applyMixin(CharacterDataImpl_1.CharacterDataImpl, NonDocumentTypeChildNodeImpl_1.NonDocumentTypeChildNodeImpl); +// NonElementParentNode +util_1.applyMixin(DocumentImpl_1.DocumentImpl, NonElementParentNodeImpl_1.NonElementParentNodeImpl); +util_1.applyMixin(DocumentFragmentImpl_1.DocumentFragmentImpl, NonElementParentNodeImpl_1.NonElementParentNodeImpl); +// ParentNode +util_1.applyMixin(DocumentImpl_1.DocumentImpl, ParentNodeImpl_1.ParentNodeImpl); +util_1.applyMixin(DocumentFragmentImpl_1.DocumentFragmentImpl, ParentNodeImpl_1.ParentNodeImpl); +util_1.applyMixin(ElementImpl_1.ElementImpl, ParentNodeImpl_1.ParentNodeImpl); +// Slotable +util_1.applyMixin(TextImpl_1.TextImpl, SlotableImpl_1.SlotableImpl); +util_1.applyMixin(ElementImpl_1.ElementImpl, SlotableImpl_1.SlotableImpl); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 27305: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /** - * Removes duplicate tokens and convert all whitespace characters - * to space. - * - * @param value - a string of whitespace separated tokens + * Defines the position of a boundary point relative to another. */ -function orderedSet_sanitize(value) { - return orderedSet_serialize(orderedSet_parse(value)); -} -exports.orderedSet_sanitize = orderedSet_sanitize; +var BoundaryPosition; +(function (BoundaryPosition) { + BoundaryPosition[BoundaryPosition["Before"] = 0] = "Before"; + BoundaryPosition[BoundaryPosition["Equal"] = 1] = "Equal"; + BoundaryPosition[BoundaryPosition["After"] = 2] = "After"; +})(BoundaryPosition = exports.BoundaryPosition || (exports.BoundaryPosition = {})); /** - * Determines whether a set contains the other. - * - * @param set1 - a set - * @param set1 - a set that is contained in set1 - * @param caseSensitive - whether matches are case-sensitive + * Defines the event phase. */ -function orderedSet_contains(set1, set2, caseSensitive) { - var e_1, _a, e_2, _b; - try { - for (var set2_1 = __values(set2), set2_1_1 = set2_1.next(); !set2_1_1.done; set2_1_1 = set2_1.next()) { - var val2 = set2_1_1.value; - var found = false; - try { - for (var set1_1 = (e_2 = void 0, __values(set1)), set1_1_1 = set1_1.next(); !set1_1_1.done; set1_1_1 = set1_1.next()) { - var val1 = set1_1_1.value; - if (caseSensitive) { - if (val1 === val2) { - found = true; - break; - } - } - else { - if (val1.toUpperCase() === val2.toUpperCase()) { - found = true; - break; - } - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (set1_1_1 && !set1_1_1.done && (_b = set1_1.return)) _b.call(set1_1); - } - finally { if (e_2) throw e_2.error; } - } - if (!found) - return false; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (set2_1_1 && !set2_1_1.done && (_a = set2_1.return)) _a.call(set2_1); - } - finally { if (e_1) throw e_1.error; } - } - return true; -} -exports.orderedSet_contains = orderedSet_contains; -//# sourceMappingURL=OrderedSetAlgorithm.js.map +var EventPhase; +(function (EventPhase) { + EventPhase[EventPhase["None"] = 0] = "None"; + EventPhase[EventPhase["Capturing"] = 1] = "Capturing"; + EventPhase[EventPhase["AtTarget"] = 2] = "AtTarget"; + EventPhase[EventPhase["Bubbling"] = 3] = "Bubbling"; +})(EventPhase = exports.EventPhase || (exports.EventPhase = {})); +/** + * Defines the type of a node object. + */ +var NodeType; +(function (NodeType) { + NodeType[NodeType["Element"] = 1] = "Element"; + NodeType[NodeType["Attribute"] = 2] = "Attribute"; + NodeType[NodeType["Text"] = 3] = "Text"; + NodeType[NodeType["CData"] = 4] = "CData"; + NodeType[NodeType["EntityReference"] = 5] = "EntityReference"; + NodeType[NodeType["Entity"] = 6] = "Entity"; + NodeType[NodeType["ProcessingInstruction"] = 7] = "ProcessingInstruction"; + NodeType[NodeType["Comment"] = 8] = "Comment"; + NodeType[NodeType["Document"] = 9] = "Document"; + NodeType[NodeType["DocumentType"] = 10] = "DocumentType"; + NodeType[NodeType["DocumentFragment"] = 11] = "DocumentFragment"; + NodeType[NodeType["Notation"] = 12] = "Notation"; // historical +})(NodeType = exports.NodeType || (exports.NodeType = {})); +/** + * Defines the position of a node in the document relative to another + * node. + */ +var Position; +(function (Position) { + Position[Position["Disconnected"] = 1] = "Disconnected"; + Position[Position["Preceding"] = 2] = "Preceding"; + Position[Position["Following"] = 4] = "Following"; + Position[Position["Contains"] = 8] = "Contains"; + Position[Position["ContainedBy"] = 16] = "ContainedBy"; + Position[Position["ImplementationSpecific"] = 32] = "ImplementationSpecific"; +})(Position = exports.Position || (exports.Position = {})); +/** + * Defines the return value of a filter callback. + */ +var FilterResult; +(function (FilterResult) { + FilterResult[FilterResult["Accept"] = 1] = "Accept"; + FilterResult[FilterResult["Reject"] = 2] = "Reject"; + FilterResult[FilterResult["Skip"] = 3] = "Skip"; +})(FilterResult = exports.FilterResult || (exports.FilterResult = {})); +/** + * Defines what to show in node filter. + */ +var WhatToShow; +(function (WhatToShow) { + WhatToShow[WhatToShow["All"] = 4294967295] = "All"; + WhatToShow[WhatToShow["Element"] = 1] = "Element"; + WhatToShow[WhatToShow["Attribute"] = 2] = "Attribute"; + WhatToShow[WhatToShow["Text"] = 4] = "Text"; + WhatToShow[WhatToShow["CDataSection"] = 8] = "CDataSection"; + WhatToShow[WhatToShow["EntityReference"] = 16] = "EntityReference"; + WhatToShow[WhatToShow["Entity"] = 32] = "Entity"; + WhatToShow[WhatToShow["ProcessingInstruction"] = 64] = "ProcessingInstruction"; + WhatToShow[WhatToShow["Comment"] = 128] = "Comment"; + WhatToShow[WhatToShow["Document"] = 256] = "Document"; + WhatToShow[WhatToShow["DocumentType"] = 512] = "DocumentType"; + WhatToShow[WhatToShow["DocumentFragment"] = 1024] = "DocumentFragment"; + WhatToShow[WhatToShow["Notation"] = 2048] = "Notation"; +})(WhatToShow = exports.WhatToShow || (exports.WhatToShow = {})); +/** + * Defines how boundary points are compared. + */ +var HowToCompare; +(function (HowToCompare) { + HowToCompare[HowToCompare["StartToStart"] = 0] = "StartToStart"; + HowToCompare[HowToCompare["StartToEnd"] = 1] = "StartToEnd"; + HowToCompare[HowToCompare["EndToEnd"] = 2] = "EndToEnd"; + HowToCompare[HowToCompare["EndToStart"] = 3] = "EndToStart"; +})(HowToCompare = exports.HowToCompare || (exports.HowToCompare = {})); +//# sourceMappingURL=interfaces.js.map /***/ }), -/***/ 2328: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 54646: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -var CreateAlgorithm_1 = __nccwpck_require__(57339); +var dom_1 = __nccwpck_require__(50633); +dom_1.dom.setFeatures(true); +var dom_2 = __nccwpck_require__(50633); +exports.DOMImplementation = dom_2.DOMImplementation; +var parser_1 = __nccwpck_require__(36216); +exports.DOMParser = parser_1.DOMParser; +var serializer_1 = __nccwpck_require__(87119); +exports.XMLSerializer = serializer_1.XMLSerializer; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 98845: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var algorithm_1 = __nccwpck_require__(61); +var XMLParserImpl_1 = __nccwpck_require__(64126); /** - * Converts the given nodes or strings into a node (if `nodes` has - * only one element) or a document fragment. + * Represents a parser for XML and HTML content. * - * @param nodes - the array of nodes or strings, - * @param document - owner document + * See: https://w3c.github.io/DOM-Parsing/#the-domparser-interface */ -function parentNode_convertNodesIntoANode(nodes, document) { - var e_1, _a; - /** - * 1. Let node be null. - * 2. Replace each string in nodes with a new Text node whose data is the - * string and node document is document. - */ - var node = null; - for (var i = 0; i < nodes.length; i++) { - var item = nodes[i]; - if (util_1.isString(item)) { - var text = CreateAlgorithm_1.create_text(document, item); - nodes[i] = text; - } - } - /** - * 3. If nodes contains one node, set node to that node. - * 4. Otherwise, set node to a new DocumentFragment whose node document is - * document, and then append each node in nodes, if any, to it. - */ - if (nodes.length === 1) { - node = nodes[0]; +var DOMParserImpl = /** @class */ (function () { + function DOMParserImpl() { } - else { - node = CreateAlgorithm_1.create_documentFragment(document); - var ns = node; + /** @inheritdoc */ + DOMParserImpl.prototype.parseFromString = function (source, mimeType) { + if (mimeType === "text/html") + throw new Error('HTML parser not implemented.'); try { - for (var nodes_1 = __values(nodes), nodes_1_1 = nodes_1.next(); !nodes_1_1.done; nodes_1_1 = nodes_1.next()) { - var item = nodes_1_1.value; - ns.appendChild(item); - } + var parser = new XMLParserImpl_1.XMLParserImpl(); + var doc = parser.parse(source); + doc._contentType = mimeType; + return doc; } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (nodes_1_1 && !nodes_1_1.done && (_a = nodes_1.return)) _a.call(nodes_1); - } - finally { if (e_1) throw e_1.error; } + catch (e) { + var errorNS = "http://www.mozilla.org/newlayout/xml/parsererror.xml"; + var doc = algorithm_1.create_xmlDocument(); + var root = doc.createElementNS(errorNS, "parsererror"); + var ele = doc.createElementNS(errorNS, "error"); + ele.setAttribute("message", e.message); + root.appendChild(ele); + doc.appendChild(root); + return doc; } - } - /** - * 5. Return node. - */ - return node; -} -exports.parentNode_convertNodesIntoANode = parentNode_convertNodesIntoANode; -//# sourceMappingURL=ParentNodeAlgorithm.js.map + }; + return DOMParserImpl; +}()); +exports.DOMParserImpl = DOMParserImpl; +//# sourceMappingURL=DOMParserImpl.js.map /***/ }), -/***/ 30457: +/***/ 64126: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; @@ -48385,839 +33225,991 @@ var __read = (this && this.__read) || function (o, n) { } return ar; }; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var DOMException_1 = __nccwpck_require__(13166); -var util_1 = __nccwpck_require__(65282); -var CreateAlgorithm_1 = __nccwpck_require__(57339); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var BoundaryPointAlgorithm_1 = __nccwpck_require__(81054); -var CharacterDataAlgorithm_1 = __nccwpck_require__(19461); -var NodeAlgorithm_1 = __nccwpck_require__(74924); -var MutationAlgorithm_1 = __nccwpck_require__(45463); -var TextAlgorithm_1 = __nccwpck_require__(13512); -/** - * Determines if the node's start boundary point is at its end boundary - * point. - * - * @param range - a range - */ -function range_collapsed(range) { - /** - * A range is collapsed if its start node is its end node and its start offset is its end offset. - */ - return (range._startNode === range._endNode && range._startOffset === range._endOffset); -} -exports.range_collapsed = range_collapsed; -/** - * Gets the root node of a range. - * - * @param range - a range - */ -function range_root(range) { - /** - * The root of a live range is the root of its start node. - */ - return TreeAlgorithm_1.tree_rootNode(range._startNode); -} -exports.range_root = range_root; -/** - * Determines if a node is fully contained in a range. - * - * @param node - a node - * @param range - a range - */ -function range_isContained(node, range) { - /** - * A node node is contained in a live range range if node’s root is range’s - * root, and (node, 0) is after range’s start, and (node, node’s length) is - * before range’s end. - */ - return (TreeAlgorithm_1.tree_rootNode(node) === range_root(range) && - BoundaryPointAlgorithm_1.boundaryPoint_position([node, 0], range._start) === interfaces_1.BoundaryPosition.After && - BoundaryPointAlgorithm_1.boundaryPoint_position([node, TreeAlgorithm_1.tree_nodeLength(node)], range._end) === interfaces_1.BoundaryPosition.Before); -} -exports.range_isContained = range_isContained; -/** - * Determines if a node is partially contained in a range. - * - * @param node - a node - * @param range - a range - */ -function range_isPartiallyContained(node, range) { - /** - * A node is partially contained in a live range if it’s an inclusive - * ancestor of the live range’s start node but not its end node, - * or vice versa. - */ - var startCheck = TreeAlgorithm_1.tree_isAncestorOf(range._startNode, node, true); - var endCheck = TreeAlgorithm_1.tree_isAncestorOf(range._endNode, node, true); - return (startCheck && !endCheck) || (!startCheck && endCheck); -} -exports.range_isPartiallyContained = range_isPartiallyContained; +var XMLStringLexer_1 = __nccwpck_require__(47061); +var interfaces_1 = __nccwpck_require__(97707); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); +var LocalNameSet_1 = __nccwpck_require__(19049); /** - * Sets the start boundary point of a range. + * Represents a parser for XML content. * - * @param range - a range - * @param node - a node - * @param offset - an offset into node + * See: https://html.spec.whatwg.org/#xml-parser */ -function range_setTheStart(range, node, offset) { - /** - * 1. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. - * 2. If offset is greater than node’s length, then throw an "IndexSizeError" - * DOMException. - * 3. Let bp be the boundary point (node, offset). - * 4. If these steps were invoked as "set the start" - * 4.1. If bp is after the range’s end, or if range’s root is not equal to - * node’s root, set range’s end to bp. - * 4.2. Set range’s start to bp. - */ - if (util_1.Guard.isDocumentTypeNode(node)) { - throw new DOMException_1.InvalidNodeTypeError(); - } - if (offset > TreeAlgorithm_1.tree_nodeLength(node)) { - throw new DOMException_1.IndexSizeError(); - } - var bp = [node, offset]; - if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) || - BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._end) === interfaces_1.BoundaryPosition.After) { - range._end = bp; +var XMLParserImpl = /** @class */ (function () { + function XMLParserImpl() { } - range._start = bp; -} -exports.range_setTheStart = range_setTheStart; -/** - * Sets the end boundary point of a range. - * - * @param range - a range - * @param node - a node - * @param offset - an offset into node - */ -function range_setTheEnd(range, node, offset) { /** - * 1. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. - * 2. If offset is greater than node’s length, then throw an "IndexSizeError" - * DOMException. - * 3. Let bp be the boundary point (node, offset). - * 4. If these steps were invoked as "set the end" - * 4.1. If bp is before the range’s start, or if range’s root is not equal - * to node’s root, set range’s start to bp. - * 4.2. Set range’s end to bp. + * Parses XML content. + * + * @param source - a string containing XML content */ - if (util_1.Guard.isDocumentTypeNode(node)) { - throw new DOMException_1.InvalidNodeTypeError(); - } - if (offset > TreeAlgorithm_1.tree_nodeLength(node)) { - throw new DOMException_1.IndexSizeError(); + XMLParserImpl.prototype.parse = function (source) { + var e_1, _a, e_2, _b; + var lexer = new XMLStringLexer_1.XMLStringLexer(source, { skipWhitespaceOnlyText: true }); + var doc = algorithm_1.create_document(); + var context = doc; + var token = lexer.nextToken(); + while (token.type !== interfaces_1.TokenType.EOF) { + switch (token.type) { + case interfaces_1.TokenType.Declaration: + var declaration = token; + if (declaration.version !== "1.0") { + throw new Error("Invalid xml version: " + declaration.version); + } + break; + case interfaces_1.TokenType.DocType: + var doctype = token; + if (!algorithm_1.xml_isPubidChar(doctype.pubId)) { + throw new Error("DocType public identifier does not match PubidChar construct."); + } + if (!algorithm_1.xml_isLegalChar(doctype.sysId) || + (doctype.sysId.indexOf('"') !== -1 && doctype.sysId.indexOf("'") !== -1)) { + throw new Error("DocType system identifier contains invalid characters."); + } + context.appendChild(doc.implementation.createDocumentType(doctype.name, doctype.pubId, doctype.sysId)); + break; + case interfaces_1.TokenType.CDATA: + var cdata = token; + if (!algorithm_1.xml_isLegalChar(cdata.data) || + cdata.data.indexOf("]]>") !== -1) { + throw new Error("CDATA contains invalid characters."); + } + context.appendChild(doc.createCDATASection(cdata.data)); + break; + case interfaces_1.TokenType.Comment: + var comment = token; + if (!algorithm_1.xml_isLegalChar(comment.data) || + comment.data.indexOf("--") !== -1 || comment.data.endsWith("-")) { + throw new Error("Comment data contains invalid characters."); + } + context.appendChild(doc.createComment(comment.data)); + break; + case interfaces_1.TokenType.PI: + var pi = token; + if (pi.target.indexOf(":") !== -1 || (/^xml$/i).test(pi.target)) { + throw new Error("Processing instruction target contains invalid characters."); + } + if (!algorithm_1.xml_isLegalChar(pi.data) || pi.data.indexOf("?>") !== -1) { + throw new Error("Processing instruction data contains invalid characters."); + } + context.appendChild(doc.createProcessingInstruction(pi.target, pi.data)); + break; + case interfaces_1.TokenType.Text: + var text = token; + if (!algorithm_1.xml_isLegalChar(text.data)) { + throw new Error("Text data contains invalid characters."); + } + context.appendChild(doc.createTextNode(text.data)); + break; + case interfaces_1.TokenType.Element: + var element = token; + // inherit namespace from parent + var _c = __read(algorithm_1.namespace_extractQName(element.name), 2), prefix = _c[0], localName = _c[1]; + if (localName.indexOf(":") !== -1 || !algorithm_1.xml_isName(localName)) { + throw new Error("Node local name contains invalid characters."); + } + if (prefix === "xmlns") { + throw new Error("An element cannot have the 'xmlns' prefix."); + } + var namespace = context.lookupNamespaceURI(prefix); + // override namespace if there is a namespace declaration + // attribute + // also lookup namespace declaration attributes + var nsDeclarations = {}; + try { + for (var _d = (e_1 = void 0, __values(element.attributes)), _e = _d.next(); !_e.done; _e = _d.next()) { + var _f = __read(_e.value, 2), attName = _f[0], attValue = _f[1]; + if (attName === "xmlns") { + namespace = attValue; + } + else { + var _g = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _g[0], attLocalName = _g[1]; + if (attPrefix === "xmlns") { + if (attLocalName === prefix) { + namespace = attValue; + } + nsDeclarations[attLocalName] = attValue; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + } + finally { if (e_1) throw e_1.error; } + } + // create the DOM element node + var elementNode = (namespace !== null ? + doc.createElementNS(namespace, element.name) : + doc.createElement(element.name)); + context.appendChild(elementNode); + // assign attributes + var localNameSet = new LocalNameSet_1.LocalNameSet(); + try { + for (var _h = (e_2 = void 0, __values(element.attributes)), _j = _h.next(); !_j.done; _j = _h.next()) { + var _k = __read(_j.value, 2), attName = _k[0], attValue = _k[1]; + var _l = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _l[0], attLocalName = _l[1]; + var attNamespace = null; + if (attPrefix === "xmlns" || (attPrefix === null && attLocalName === "xmlns")) { + // namespace declaration attribute + attNamespace = infra_1.namespace.XMLNS; + } + else { + attNamespace = elementNode.lookupNamespaceURI(attPrefix); + if (attNamespace !== null && elementNode.isDefaultNamespace(attNamespace)) { + attNamespace = null; + } + else if (attNamespace === null && attPrefix !== null) { + attNamespace = nsDeclarations[attPrefix] || null; + } + } + if (localNameSet.has(attNamespace, attLocalName)) { + throw new Error("Element contains duplicate attributes."); + } + localNameSet.set(attNamespace, attLocalName); + if (attNamespace === infra_1.namespace.XMLNS) { + if (attValue === infra_1.namespace.XMLNS) { + throw new Error("XMLNS namespace is reserved."); + } + } + if (attLocalName.indexOf(":") !== -1 || !algorithm_1.xml_isName(attLocalName)) { + throw new Error("Attribute local name contains invalid characters."); + } + if (attPrefix === "xmlns" && attValue === "") { + throw new Error("Empty XML namespace is not allowed."); + } + if (attNamespace !== null) + elementNode.setAttributeNS(attNamespace, attName, attValue); + else + elementNode.setAttribute(attName, attValue); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_j && !_j.done && (_b = _h.return)) _b.call(_h); + } + finally { if (e_2) throw e_2.error; } + } + if (!element.selfClosing) { + context = elementNode; + } + break; + case interfaces_1.TokenType.ClosingTag: + var closingTag = token; + if (closingTag.name !== context.nodeName) { + throw new Error('Closing tag name does not match opening tag name.'); + } + /* istanbul ignore else */ + if (context._parent) { + context = context._parent; + } + break; + } + token = lexer.nextToken(); + } + return doc; + }; + return XMLParserImpl; +}()); +exports.XMLParserImpl = XMLParserImpl; +//# sourceMappingURL=XMLParserImpl.js.map + +/***/ }), + +/***/ 47061: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } - var bp = [node, offset]; - if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) || - BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._start) === interfaces_1.BoundaryPosition.Before) { - range._start = bp; + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - range._end = bp; -} -exports.range_setTheEnd = range_setTheEnd; -/** - * Selects a node. - * - * @param range - a range - * @param node - a node - */ -function range_select(node, range) { - /** - * 1. Let parent be node’s parent. - * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. - */ - var parent = node._parent; - if (parent === null) - throw new DOMException_1.InvalidNodeTypeError(); - /** - * 3. Let index be node’s index. - * 4. Set range’s start to boundary point (parent, index). - * 5. Set range’s end to boundary point (parent, index plus 1). - */ - var index = TreeAlgorithm_1.tree_index(node); - range._start = [parent, index]; - range._end = [parent, index + 1]; -} -exports.range_select = range_select; + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(97707); /** - * EXtracts the contents of range as a document fragment. - * - * @param range - a range + * Represents a lexer for XML content in a string. */ -function range_extract(range) { - var e_1, _a, e_2, _b, e_3, _c; - /** - * 1. Let fragment be a new DocumentFragment node whose node document is - * range’s start node’s node document. - * 2. If range is collapsed, then return fragment. - */ - var fragment = CreateAlgorithm_1.create_documentFragment(range._startNode._nodeDocument); - if (range_collapsed(range)) - return fragment; - /** - * 3. Let original start node, original start offset, original end node, - * and original end offset be range’s start node, start offset, end node, - * and end offset, respectively. - */ - var originalStartNode = range._startNode; - var originalStartOffset = range._startOffset; - var originalEndNode = range._endNode; - var originalEndOffset = range._endOffset; +var XMLStringLexer = /** @class */ (function () { /** - * 4. If original start node is original end node, and they are a Text, - * ProcessingInstruction, or Comment node: - * 4.1. Let clone be a clone of original start node. - * 4.2. Set the data of clone to the result of substringing data with node - * original start node, offset original start offset, and count original end - * offset minus original start offset. - * 4.3. Append clone to fragment. - * 4.4. Replace data with node original start node, offset original start - * offset, count original end offset minus original start offset, and data - * the empty string. - * 4.5. Return fragment. + * Initializes a new instance of `XMLStringLexer`. + * + * @param str - the string to tokenize and lex + * @param options - lexer options */ - if (originalStartNode === originalEndNode && - util_1.Guard.isCharacterDataNode(originalStartNode)) { - var clone = NodeAlgorithm_1.node_clone(originalStartNode); - clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset); - MutationAlgorithm_1.mutation_append(clone, fragment); - CharacterDataAlgorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset, ''); - return fragment; + function XMLStringLexer(str, options) { + this._options = { + skipWhitespaceOnlyText: false + }; + this.err = { line: -1, col: -1, index: -1, str: "" }; + this._str = str; + this._index = 0; + this._length = str.length; + if (options) { + this._options.skipWhitespaceOnlyText = options.skipWhitespaceOnlyText || false; + } } /** - * 5. Let common ancestor be original start node. - * 6. While common ancestor is not an inclusive ancestor of original end - * node, set common ancestor to its own parent. + * Returns the next token. */ - var commonAncestor = originalStartNode; - while (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, commonAncestor, true)) { - if (commonAncestor._parent === null) { - throw new Error("Parent node is null."); + XMLStringLexer.prototype.nextToken = function () { + if (this.eof()) { + return { type: interfaces_1.TokenType.EOF }; } - commonAncestor = commonAncestor._parent; - } + var token = (this.skipIfStartsWith('<') ? this.openBracket() : this.text()); + if (this._options.skipWhitespaceOnlyText) { + if (token.type === interfaces_1.TokenType.Text && + XMLStringLexer.isWhiteSpaceToken(token)) { + token = this.nextToken(); + } + } + return token; + }; /** - * 7. Let first partially contained child be null. - * 8. If original start node is not an inclusive ancestor of original end - * node, set first partially contained child to the first child of common - * ancestor that is partially contained in range. + * Branches from an opening bracket (`<`). */ - var firstPartiallyContainedChild = null; - if (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { - try { - for (var _d = __values(commonAncestor._children), _e = _d.next(); !_e.done; _e = _d.next()) { - var node = _e.value; - if (range_isPartiallyContained(node, range)) { - firstPartiallyContainedChild = node; - break; + XMLStringLexer.prototype.openBracket = function () { + if (this.skipIfStartsWith('?')) { + if (this.skipIfStartsWith('xml')) { + if (XMLStringLexer.isSpace(this._str[this._index])) { + return this.declaration(); + } + else { + // a processing instruction starting with xml. e.g. + this.seek(-3); + return this.pi(); } } + else { + return this.pi(); + } } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + else if (this.skipIfStartsWith('!')) { + if (this.skipIfStartsWith('--')) { + return this.comment(); + } + else if (this.skipIfStartsWith('[CDATA[')) { + return this.cdata(); + } + else if (this.skipIfStartsWith('DOCTYPE')) { + return this.doctype(); + } + else { + this.throwError("Invalid '!' in opening tag."); } - finally { if (e_1) throw e_1.error; } } - } + else if (this.skipIfStartsWith('/')) { + return this.closeTag(); + } + else { + return this.openTag(); + } + }; /** - * 9. Let last partially contained child be null. - * 10. If original end node is not an inclusive ancestor of original start - * node, set last partially contained child to the last child of common - * ancestor that is partially contained in range. + * Produces an XML declaration token. */ - var lastPartiallyContainedChild = null; - if (!TreeAlgorithm_1.tree_isAncestorOf(originalStartNode, originalEndNode, true)) { - var children = __spread(commonAncestor._children); - for (var i = children.length - 1; i > 0; i--) { - var node = children[i]; - if (range_isPartiallyContained(node, range)) { - lastPartiallyContainedChild = node; - break; + XMLStringLexer.prototype.declaration = function () { + var version = ''; + var encoding = ''; + var standalone = ''; + while (!this.eof()) { + this.skipSpace(); + if (this.skipIfStartsWith('?>')) { + return { type: interfaces_1.TokenType.Declaration, version: version, encoding: encoding, standalone: standalone }; + } + else { + // attribute name + var _a = __read(this.attribute(), 2), attName = _a[0], attValue = _a[1]; + if (attName === 'version') + version = attValue; + else if (attName === 'encoding') + encoding = attValue; + else if (attName === 'standalone') + standalone = attValue; + else + this.throwError('Invalid attribute name: ' + attName); } } - } + this.throwError('Missing declaration end symbol `?>`'); + }; /** - * 11. Let contained children be a list of all children of common ancestor - * that are contained in range, in tree order. - * 12. If any member of contained children is a doctype, then throw a - * "HierarchyRequestError" DOMException. + * Produces a doc type token. */ - var containedChildren = []; - try { - for (var _f = __values(commonAncestor._children), _g = _f.next(); !_g.done; _g = _f.next()) { - var child = _g.value; - if (range_isContained(child, range)) { - if (util_1.Guard.isDocumentTypeNode(child)) { - throw new DOMException_1.HierarchyRequestError(); - } - containedChildren.push(child); - } + XMLStringLexer.prototype.doctype = function () { + var pubId = ''; + var sysId = ''; + // name + this.skipSpace(); + var name = this.takeUntil2('[', '>', true); + this.skipSpace(); + if (this.skipIfStartsWith('PUBLIC')) { + pubId = this.quotedString(); + sysId = this.quotedString(); } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_g && !_g.done && (_b = _f.return)) _b.call(_f); + else if (this.skipIfStartsWith('SYSTEM')) { + sysId = this.quotedString(); } - finally { if (e_2) throw e_2.error; } - } - var newNode; - var newOffset; - if (TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { - /** - * 13. If original start node is an inclusive ancestor of original end node, - * set new node to original start node and new offset to original start - * offset. - */ - newNode = originalStartNode; - newOffset = originalStartOffset; - } - else { - /** - * 14. Otherwise: - * 14.1. Let reference node equal original start node. - * 14.2. While reference node’s parent is not null and is not an inclusive - * ancestor of original end node, set reference node to its parent. - * 14.3. Set new node to the parent of reference node, and new offset to - * one plus reference node’s index. - */ - var referenceNode = originalStartNode; - while (referenceNode._parent !== null && - !TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, referenceNode._parent)) { - referenceNode = referenceNode._parent; + // skip internal subset + this.skipSpace(); + if (this.skipIfStartsWith('[')) { + // skip internal subset nodes + this.skipUntil(']'); + if (!this.skipIfStartsWith(']')) { + this.throwError('Missing end bracket of DTD internal subset'); + } } - /* istanbul ignore next */ - if (referenceNode._parent === null) { - /** - * If reference node’s parent is null, it would be the root of range, - * so would be an inclusive ancestor of original end node, and we could - * not reach this point. - */ - throw new Error("Parent node is null."); + this.skipSpace(); + if (!this.skipIfStartsWith('>')) { + this.throwError('Missing doctype end symbol `>`'); } - newNode = referenceNode._parent; - newOffset = 1 + TreeAlgorithm_1.tree_index(referenceNode); - } - if (util_1.Guard.isCharacterDataNode(firstPartiallyContainedChild)) { - /** - * 15. If first partially contained child is a Text, ProcessingInstruction, - * or Comment node: - * 15.1. Let clone be a clone of original start node. - * 15.2. Set the data of clone to the result of substringing data with - * node original start node, offset original start offset, and count - * original start node’s length minus original start offset. - * 15.3. Append clone to fragment. - * 15.4. Replace data with node original start node, offset original - * start offset, count original start node’s length minus original start - * offset, and data the empty string. - */ - var clone = NodeAlgorithm_1.node_clone(originalStartNode); - clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset); - MutationAlgorithm_1.mutation_append(clone, fragment); - CharacterDataAlgorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset, ''); - } - else if (firstPartiallyContainedChild !== null) { - /** - * 16. Otherwise, if first partially contained child is not null: - * 16.1. Let clone be a clone of first partially contained child. - * 16.2. Append clone to fragment. - * 16.3. Let subrange be a new live range whose start is (original start - * node, original start offset) and whose end is (first partially - * contained child, first partially contained child’s length). - * 16.4. Let subfragment be the result of extracting subrange. - * 16.5. Append subfragment to clone. - */ - var clone = NodeAlgorithm_1.node_clone(firstPartiallyContainedChild); - MutationAlgorithm_1.mutation_append(clone, fragment); - var subrange = CreateAlgorithm_1.create_range([originalStartNode, originalStartOffset], [firstPartiallyContainedChild, TreeAlgorithm_1.tree_nodeLength(firstPartiallyContainedChild)]); - var subfragment = range_extract(subrange); - MutationAlgorithm_1.mutation_append(subfragment, clone); - } - try { - /** - * 17. For each contained child in contained children, append contained - * child to fragment. - */ - for (var containedChildren_1 = __values(containedChildren), containedChildren_1_1 = containedChildren_1.next(); !containedChildren_1_1.done; containedChildren_1_1 = containedChildren_1.next()) { - var child = containedChildren_1_1.value; - MutationAlgorithm_1.mutation_append(child, fragment); + return { type: interfaces_1.TokenType.DocType, name: name, pubId: pubId, sysId: sysId }; + }; + /** + * Produces a processing instruction token. + */ + XMLStringLexer.prototype.pi = function () { + var target = this.takeUntilStartsWith('?>', true); + if (this.eof()) { + this.throwError('Missing processing instruction end symbol `?>`'); } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (containedChildren_1_1 && !containedChildren_1_1.done && (_c = containedChildren_1.return)) _c.call(containedChildren_1); + this.skipSpace(); + if (this.skipIfStartsWith('?>')) { + return { type: interfaces_1.TokenType.PI, target: target, data: '' }; } - finally { if (e_3) throw e_3.error; } - } - if (util_1.Guard.isCharacterDataNode(lastPartiallyContainedChild)) { - /** - * 18. If last partially contained child is a Text, ProcessingInstruction, - * or Comment node: - * 18.1. Let clone be a clone of original end node. - * 18.2. Set the data of clone to the result of substringing data with - * node original end node, offset 0, and count original end offset. - * 18.3. Append clone to fragment. - * 18.4. Replace data with node original end node, offset 0, count - * original end offset, and data the empty string. - */ - var clone = NodeAlgorithm_1.node_clone(originalEndNode); - clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalEndNode, 0, originalEndOffset); - MutationAlgorithm_1.mutation_append(clone, fragment); - CharacterDataAlgorithm_1.characterData_replaceData(originalEndNode, 0, originalEndOffset, ''); - } - else if (lastPartiallyContainedChild !== null) { - /** - * 19. Otherwise, if last partially contained child is not null: - * 19.1. Let clone be a clone of last partially contained child. - * 19.2. Append clone to fragment. - * 19.3. Let subrange be a new live range whose start is (last partially - * contained child, 0) and whose end is (original end node, original - * end offset). - * 19.4. Let subfragment be the result of extracting subrange. - * 19.5. Append subfragment to clone. - */ - var clone = NodeAlgorithm_1.node_clone(lastPartiallyContainedChild); - MutationAlgorithm_1.mutation_append(clone, fragment); - var subrange = CreateAlgorithm_1.create_range([lastPartiallyContainedChild, 0], [originalEndNode, originalEndOffset]); - var subfragment = range_extract(subrange); - MutationAlgorithm_1.mutation_append(subfragment, clone); - } + var data = this.takeUntilStartsWith('?>'); + if (this.eof()) { + this.throwError('Missing processing instruction end symbol `?>`'); + } + this.seek(2); + return { type: interfaces_1.TokenType.PI, target: target, data: data }; + }; /** - * 20. Set range’s start and end to (new node, new offset). + * Produces a text token. + * */ - range._start = [newNode, newOffset]; - range._end = [newNode, newOffset]; + XMLStringLexer.prototype.text = function () { + var data = this.takeUntil('<'); + return { type: interfaces_1.TokenType.Text, data: data }; + }; /** - * 21. Return fragment. + * Produces a comment token. + * */ - return fragment; -} -exports.range_extract = range_extract; -/** - * Clones the contents of range as a document fragment. - * - * @param range - a range - */ -function range_cloneTheContents(range) { - var e_4, _a, e_5, _b, e_6, _c; + XMLStringLexer.prototype.comment = function () { + var data = this.takeUntilStartsWith('-->'); + if (this.eof()) { + this.throwError('Missing comment end symbol `-->`'); + } + this.seek(3); + return { type: interfaces_1.TokenType.Comment, data: data }; + }; /** - * 1. Let fragment be a new DocumentFragment node whose node document - * is range’s start node’s node document. - * 2. If range is collapsed, then return fragment. + * Produces a CDATA token. + * */ - var fragment = CreateAlgorithm_1.create_documentFragment(range._startNode._nodeDocument); - if (range_collapsed(range)) - return fragment; + XMLStringLexer.prototype.cdata = function () { + var data = this.takeUntilStartsWith(']]>'); + if (this.eof()) { + this.throwError('Missing CDATA end symbol `]>`'); + } + this.seek(3); + return { type: interfaces_1.TokenType.CDATA, data: data }; + }; /** - * 3. Let original start node, original start offset, original end node, - * and original end offset be range’s start node, start offset, end node, - * and end offset, respectively. - * 4. If original start node is original end node, and they are a Text, - * ProcessingInstruction, or Comment node: - * 4.1. Let clone be a clone of original start node. - * 4.2. Set the data of clone to the result of substringing data with node - * original start node, offset original start offset, and count original end - * offset minus original start offset. - * 4.3. Append clone to fragment. - * 4.5. Return fragment. + * Produces an element token. */ - var originalStartNode = range._startNode; - var originalStartOffset = range._startOffset; - var originalEndNode = range._endNode; - var originalEndOffset = range._endOffset; - if (originalStartNode === originalEndNode && - util_1.Guard.isCharacterDataNode(originalStartNode)) { - var clone = NodeAlgorithm_1.node_clone(originalStartNode); - clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset); - MutationAlgorithm_1.mutation_append(clone, fragment); - } + XMLStringLexer.prototype.openTag = function () { + // element name + this.skipSpace(); + var name = this.takeUntil2('>', '/', true); + this.skipSpace(); + if (this.skipIfStartsWith('>')) { + return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: false }; + } + else if (this.skipIfStartsWith('/>')) { + return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: true }; + } + // attributes + var attributes = []; + while (!this.eof()) { + // end tag + this.skipSpace(); + if (this.skipIfStartsWith('>')) { + return { type: interfaces_1.TokenType.Element, name: name, attributes: attributes, selfClosing: false }; + } + else if (this.skipIfStartsWith('/>')) { + return { type: interfaces_1.TokenType.Element, name: name, attributes: attributes, selfClosing: true }; + } + var attr = this.attribute(); + attributes.push(attr); + } + this.throwError('Missing opening element tag end symbol `>`'); + }; /** - * 5. Let common ancestor be original start node. - * 6. While common ancestor is not an inclusive ancestor of original end - * node, set common ancestor to its own parent. + * Produces a closing tag token. + * */ - var commonAncestor = originalStartNode; - while (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, commonAncestor, true)) { - if (commonAncestor._parent === null) { - throw new Error("Parent node is null."); + XMLStringLexer.prototype.closeTag = function () { + this.skipSpace(); + var name = this.takeUntil('>', true); + this.skipSpace(); + if (!this.skipIfStartsWith('>')) { + this.throwError('Missing closing element tag end symbol `>`'); } - commonAncestor = commonAncestor._parent; - } + return { type: interfaces_1.TokenType.ClosingTag, name: name }; + }; /** - * 7. Let first partially contained child be null. - * 8. If original start node is not an inclusive ancestor of original end - * node, set first partially contained child to the first child of common - * ancestor that is partially contained in range. + * Reads an attribute name, value pair */ - var firstPartiallyContainedChild = null; - if (!TreeAlgorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { - try { - for (var _d = __values(commonAncestor._children), _e = _d.next(); !_e.done; _e = _d.next()) { - var node = _e.value; - if (range_isPartiallyContained(node, range)) { - firstPartiallyContainedChild = node; - break; - } - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (_e && !_e.done && (_a = _d.return)) _a.call(_d); - } - finally { if (e_4) throw e_4.error; } + XMLStringLexer.prototype.attribute = function () { + // attribute name + this.skipSpace(); + var name = this.takeUntil('=', true); + this.skipSpace(); + if (!this.skipIfStartsWith('=')) { + this.throwError('Missing equals sign before attribute value'); } - } + // attribute value + var value = this.quotedString(); + return [name, value]; + }; /** - * 9. Let last partially contained child be null. - * 10. If original end node is not an inclusive ancestor of original start - * node, set last partially contained child to the last child of common - * ancestor that is partially contained in range. + * Reads a string between double or single quotes. */ - var lastPartiallyContainedChild = null; - if (!TreeAlgorithm_1.tree_isAncestorOf(originalStartNode, originalEndNode, true)) { - var children = __spread(commonAncestor._children); - for (var i = children.length - 1; i > 0; i--) { - var node = children[i]; - if (range_isPartiallyContained(node, range)) { - lastPartiallyContainedChild = node; - break; - } + XMLStringLexer.prototype.quotedString = function () { + this.skipSpace(); + var startQuote = this.take(1); + if (!XMLStringLexer.isQuote(startQuote)) { + this.throwError('Missing start quote character before quoted value'); } - } + var value = this.takeUntil(startQuote); + if (!this.skipIfStartsWith(startQuote)) { + this.throwError('Missing end quote character after quoted value'); + } + return value; + }; /** - * 11. Let contained children be a list of all children of common ancestor - * that are contained in range, in tree order. - * 12. If any member of contained children is a doctype, then throw a - * "HierarchyRequestError" DOMException. + * Determines if the current index is at or past the end of input string. */ - var containedChildren = []; - try { - for (var _f = __values(commonAncestor._children), _g = _f.next(); !_g.done; _g = _f.next()) { - var child = _g.value; - if (range_isContained(child, range)) { - if (util_1.Guard.isDocumentTypeNode(child)) { - throw new DOMException_1.HierarchyRequestError(); - } - containedChildren.push(child); + XMLStringLexer.prototype.eof = function () { return this._index >= this._length; }; + /** + * Skips the length of the given string if the string from current position + * starts with the given string. + * + * @param str - the string to match + */ + XMLStringLexer.prototype.skipIfStartsWith = function (str) { + var strLength = str.length; + if (strLength === 1) { + if (this._str[this._index] === str) { + this._index++; + return true; + } + else { + return false; } } - } - catch (e_5_1) { e_5 = { error: e_5_1 }; } - finally { - try { - if (_g && !_g.done && (_b = _f.return)) _b.call(_f); - } - finally { if (e_5) throw e_5.error; } - } - if (util_1.Guard.isCharacterDataNode(firstPartiallyContainedChild)) { - /** - * 13. If first partially contained child is a Text, ProcessingInstruction, - * or Comment node: - * 13.1. Let clone be a clone of original start node. - * 13.2. Set the data of clone to the result of substringing data with - * node original start node, offset original start offset, and count - * original start node’s length minus original start offset. - * 13.3. Append clone to fragment. - */ - var clone = NodeAlgorithm_1.node_clone(originalStartNode); - clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalStartNode, originalStartOffset, TreeAlgorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset); - MutationAlgorithm_1.mutation_append(clone, fragment); - } - else if (firstPartiallyContainedChild !== null) { - /** - * 14. Otherwise, if first partially contained child is not null: - * 14.1. Let clone be a clone of first partially contained child. - * 14.2. Append clone to fragment. - * 14.3. Let subrange be a new live range whose start is (original start - * node, original start offset) and whose end is (first partially - * contained child, first partially contained child’s length). - * 14.4. Let subfragment be the result of cloning the contents of - * subrange. - * 14.5. Append subfragment to clone. - */ - var clone = NodeAlgorithm_1.node_clone(firstPartiallyContainedChild); - MutationAlgorithm_1.mutation_append(clone, fragment); - var subrange = CreateAlgorithm_1.create_range([originalStartNode, originalStartOffset], [firstPartiallyContainedChild, TreeAlgorithm_1.tree_nodeLength(firstPartiallyContainedChild)]); - var subfragment = range_cloneTheContents(subrange); - MutationAlgorithm_1.mutation_append(subfragment, clone); - } - try { - /** - * 15. For each contained child in contained children, append contained - * child to fragment. - * 15.1. Let clone be a clone of contained child with the clone children - * flag set. - * 15.2. Append clone to fragment. - */ - for (var containedChildren_2 = __values(containedChildren), containedChildren_2_1 = containedChildren_2.next(); !containedChildren_2_1.done; containedChildren_2_1 = containedChildren_2.next()) { - var child = containedChildren_2_1.value; - var clone = NodeAlgorithm_1.node_clone(child); - MutationAlgorithm_1.mutation_append(clone, fragment); - } - } - catch (e_6_1) { e_6 = { error: e_6_1 }; } - finally { - try { - if (containedChildren_2_1 && !containedChildren_2_1.done && (_c = containedChildren_2.return)) _c.call(containedChildren_2); + for (var i = 0; i < strLength; i++) { + if (this._str[this._index + i] !== str[i]) + return false; } - finally { if (e_6) throw e_6.error; } - } - if (util_1.Guard.isCharacterDataNode(lastPartiallyContainedChild)) { - /** - * 16. If last partially contained child is a Text, ProcessingInstruction, - * or Comment node: - * 16.1. Let clone be a clone of original end node. - * 16.2. Set the data of clone to the result of substringing data with - * node original end node, offset 0, and count original end offset. - * 16.3. Append clone to fragment. - */ - var clone = NodeAlgorithm_1.node_clone(originalEndNode); - clone._data = CharacterDataAlgorithm_1.characterData_substringData(originalEndNode, 0, originalEndOffset); - MutationAlgorithm_1.mutation_append(clone, fragment); - } - else if (lastPartiallyContainedChild !== null) { - /** - * 17. Otherwise, if last partially contained child is not null: - * 17.1. Let clone be a clone of last partially contained child. - * 17.2. Append clone to fragment. - * 17.3. Let subrange be a new live range whose start is (last partially - * contained child, 0) and whose end is (original end node, original - * end offset). - * 17.4. Let subfragment be the result of cloning the contents of subrange. - * 17.5. Append subfragment to clone. - */ - var clone = NodeAlgorithm_1.node_clone(lastPartiallyContainedChild); - fragment.append(clone); - var subrange = CreateAlgorithm_1.create_range([lastPartiallyContainedChild, 0], [originalEndNode, originalEndOffset]); - var subfragment = range_extract(subrange); - MutationAlgorithm_1.mutation_append(subfragment, clone); - } + this._index += strLength; + return true; + }; /** - * 18. Return fragment. + * Seeks a number of character codes. + * + * @param count - number of characters to skip */ - return fragment; -} -exports.range_cloneTheContents = range_cloneTheContents; -/** - * Inserts a node into a range at the start boundary point. - * - * @param node - node to insert - * @param range - a range - */ -function range_insert(node, range) { - var e_7, _a; + XMLStringLexer.prototype.seek = function (count) { + this._index += count; + if (this._index < 0) + this._index = 0; + if (this._index > this._length) + this._index = this._length; + }; /** - * 1. If range’s start node is a ProcessingInstruction or Comment node, is a - * Text node whose parent is null, or is node, then throw a - * "HierarchyRequestError" DOMException. + * Skips space characters. */ - if (util_1.Guard.isProcessingInstructionNode(range._startNode) || - util_1.Guard.isCommentNode(range._startNode) || - (util_1.Guard.isTextNode(range._startNode) && range._startNode._parent === null) || - range._startNode === node) { - throw new DOMException_1.HierarchyRequestError(); - } + XMLStringLexer.prototype.skipSpace = function () { + while (!this.eof() && (XMLStringLexer.isSpace(this._str[this._index]))) { + this._index++; + } + }; /** - * 2. Let referenceNode be null. - * 3. If range’s start node is a Text node, set referenceNode to that Text - * node. - * 4. Otherwise, set referenceNode to the child of start node whose index is - * start offset, and null if there is no such child. + * Takes a given number of characters. + * + * @param count - character count */ - var referenceNode = null; - if (util_1.Guard.isTextNode(range._startNode)) { - referenceNode = range._startNode; - } - else { - var index = 0; - try { - for (var _b = __values(range._startNode._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var child = _c.value; - if (index === range._startOffset) { - referenceNode = child; - break; - } - index++; + XMLStringLexer.prototype.take = function (count) { + if (count === 1) { + return this._str[this._index++]; + } + var startIndex = this._index; + this.seek(count); + return this._str.slice(startIndex, this._index); + }; + /** + * Takes characters until the next character matches `char`. + * + * @param char - a character to match + * @param space - whether a space character stops iteration + */ + XMLStringLexer.prototype.takeUntil = function (char, space) { + if (space === void 0) { space = false; } + var startIndex = this._index; + while (this._index < this._length) { + var c = this._str[this._index]; + if (c !== char && (!space || !XMLStringLexer.isSpace(c))) { + this._index++; + } + else { + break; } } - catch (e_7_1) { e_7 = { error: e_7_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + return this._str.slice(startIndex, this._index); + }; + /** + * Takes characters until the next character matches `char1` or `char1`. + * + * @param char1 - a character to match + * @param char2 - a character to match + * @param space - whether a space character stops iteration + */ + XMLStringLexer.prototype.takeUntil2 = function (char1, char2, space) { + if (space === void 0) { space = false; } + var startIndex = this._index; + while (this._index < this._length) { + var c = this._str[this._index]; + if (c !== char1 && c !== char2 && (!space || !XMLStringLexer.isSpace(c))) { + this._index++; + } + else { + break; } - finally { if (e_7) throw e_7.error; } } - } + return this._str.slice(startIndex, this._index); + }; /** - * 5. Let parent be range’s start node if referenceNode is null, and - * referenceNode’s parent otherwise. + * Takes characters until the next characters matches `str`. + * + * @param str - a string to match + * @param space - whether a space character stops iteration */ - var parent; - if (referenceNode === null) { - parent = range._startNode; - } - else { - if (referenceNode._parent === null) { - throw new Error("Parent node is null."); + XMLStringLexer.prototype.takeUntilStartsWith = function (str, space) { + if (space === void 0) { space = false; } + var startIndex = this._index; + var strLength = str.length; + while (this._index < this._length) { + var match = true; + for (var i = 0; i < strLength; i++) { + var c = this._str[this._index + i]; + var char = str[i]; + if (space && XMLStringLexer.isSpace(c)) { + return this._str.slice(startIndex, this._index); + } + else if (c !== char) { + this._index++; + match = false; + break; + } + } + if (match) + return this._str.slice(startIndex, this._index); } - parent = referenceNode._parent; - } + this._index = this._length; + return this._str.slice(startIndex); + }; /** - * 6. Ensure pre-insertion validity of node into parent before referenceNode. + * Skips characters until the next character matches `char`. + * + * @param char - a character to match */ - MutationAlgorithm_1.mutation_ensurePreInsertionValidity(node, parent, referenceNode); + XMLStringLexer.prototype.skipUntil = function (char) { + while (this._index < this._length) { + var c = this._str[this._index]; + if (c !== char) { + this._index++; + } + else { + break; + } + } + }; /** - * 7. If range’s start node is a Text node, set referenceNode to the result - * of splitting it with offset range’s start offset. + * Determines if the given token is entirely whitespace. + * + * @param token - the token to check */ - if (util_1.Guard.isTextNode(range._startNode)) { - referenceNode = TextAlgorithm_1.text_split(range._startNode, range._startOffset); - } + XMLStringLexer.isWhiteSpaceToken = function (token) { + var str = token.data; + for (var i = 0; i < str.length; i++) { + var c = str[i]; + if (c !== ' ' && c !== '\n' && c !== '\r' && c !== '\t' && c !== '\f') + return false; + } + return true; + }; /** - * 8. If node is referenceNode, set referenceNode to its next sibling. + * Determines if the given character is whitespace. + * + * @param char - the character to check */ - if (node === referenceNode) { - referenceNode = node._nextSibling; - } + XMLStringLexer.isSpace = function (char) { + return char === ' ' || char === '\n' || char === '\r' || char === '\t'; + }; /** - * 9. If node’s parent is not null, remove node from its parent. + * Determines if the given character is a quote character. + * + * @param char - the character to check */ - if (node._parent !== null) { - MutationAlgorithm_1.mutation_remove(node, node._parent); - } + XMLStringLexer.isQuote = function (char) { + return (char === '"' || char === '\''); + }; /** - * 10. Let newOffset be parent’s length if referenceNode is null, and - * referenceNode’s index otherwise. + * Throws a parser error and records the line and column numbers in the parsed + * string. + * + * @param msg - error message */ - var newOffset = (referenceNode === null ? - TreeAlgorithm_1.tree_nodeLength(parent) : TreeAlgorithm_1.tree_index(referenceNode)); + XMLStringLexer.prototype.throwError = function (msg) { + var regexp = /\r\n|\r|\n/g; + var match = null; + var line = 0; + var firstNewLineIndex = 0; + var lastNewlineIndex = this._str.length; + while ((match = regexp.exec(this._str)) !== null) { + if (match === null) + break; + line++; + if (match.index < this._index) + firstNewLineIndex = regexp.lastIndex; + if (match.index > this._index) { + lastNewlineIndex = match.index; + break; + } + } + this.err = { + line: line, + col: this._index - firstNewLineIndex, + index: this._index, + str: this._str.substring(firstNewLineIndex, lastNewlineIndex) + }; + throw new Error(msg + "\nIndex: " + this.err.index + + "\nLn: " + this.err.line + ", Col: " + this.err.col + + "\nInput: " + this.err.str); + }; /** - * 11. Increase newOffset by node’s length if node is a DocumentFragment - * node, and one otherwise. + * Returns an iterator for the lexer. */ - if (util_1.Guard.isDocumentFragmentNode(node)) { - newOffset += TreeAlgorithm_1.tree_nodeLength(node); - } - else { - newOffset++; + XMLStringLexer.prototype[Symbol.iterator] = function () { + this._index = 0; + return { + next: function () { + var token = this.nextToken(); + if (token.type === interfaces_1.TokenType.EOF) { + return { done: true, value: null }; + } + else { + return { done: false, value: token }; + } + }.bind(this) + }; + }; + return XMLStringLexer; +}()); +exports.XMLStringLexer = XMLStringLexer; +//# sourceMappingURL=XMLStringLexer.js.map + +/***/ }), + +/***/ 36216: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// Export classes +var DOMParserImpl_1 = __nccwpck_require__(98845); +exports.DOMParser = DOMParserImpl_1.DOMParserImpl; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 97707: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Defines the type of a token. + */ +var TokenType; +(function (TokenType) { + TokenType[TokenType["EOF"] = 0] = "EOF"; + TokenType[TokenType["Declaration"] = 1] = "Declaration"; + TokenType[TokenType["DocType"] = 2] = "DocType"; + TokenType[TokenType["Element"] = 3] = "Element"; + TokenType[TokenType["Text"] = 4] = "Text"; + TokenType[TokenType["CDATA"] = 5] = "CDATA"; + TokenType[TokenType["PI"] = 6] = "PI"; + TokenType[TokenType["Comment"] = 7] = "Comment"; + TokenType[TokenType["ClosingTag"] = 8] = "ClosingTag"; +})(TokenType = exports.TokenType || (exports.TokenType = {})); +//# sourceMappingURL=interfaces.js.map + +/***/ }), + +/***/ 19049: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Represents a set of unique attribute namespaceURI and localName pairs. + * This set will contain tuples of unique attribute namespaceURI and + * localName pairs, and is populated as each attr is processed. This set is + * used to [optionally] enforce the well-formed constraint that an element + * cannot have two attributes with the same namespaceURI and localName. + * This can occur when two otherwise identical attributes on the same + * element differ only by their prefix values. + */ +var LocalNameSet = /** @class */ (function () { + function LocalNameSet() { + // tuple storage + this._items = {}; + this._nullItems = {}; } /** - * 12. Pre-insert node into parent before referenceNode. + * Adds or replaces a tuple. + * + * @param ns - namespace URI + * @param localName - attribute local name */ - MutationAlgorithm_1.mutation_preInsert(node, parent, referenceNode); + LocalNameSet.prototype.set = function (ns, localName) { + if (ns === null) { + this._nullItems[localName] = true; + } + else if (this._items[ns]) { + this._items[ns][localName] = true; + } + else { + this._items[ns] = {}; + this._items[ns][localName] = true; + } + }; /** - * 13. If range is collapsed, then set range’s end to (parent, newOffset). + * Determines if the given tuple exists in the set. + * + * @param ns - namespace URI + * @param localName - attribute local name */ - if (range_collapsed(range)) { - range._end = [parent, newOffset]; - } -} -exports.range_insert = range_insert; -/** - * Traverses through all contained nodes of a range. - * - * @param range - a range - */ -function range_getContainedNodes(range) { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var container = range.commonAncestorContainer; - var currentNode = TreeAlgorithm_1.tree_getFirstDescendantNode(container); - return { - next: function () { - while (currentNode && !range_isContained(currentNode, range)) { - currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); - } - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); - return result; - } - } - }; - }, - _a; -} -exports.range_getContainedNodes = range_getContainedNodes; -/** - * Traverses through all partially contained nodes of a range. - * - * @param range - a range - */ -function range_getPartiallyContainedNodes(range) { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var container = range.commonAncestorContainer; - var currentNode = TreeAlgorithm_1.tree_getFirstDescendantNode(container); - return { - next: function () { - while (currentNode && !range_isPartiallyContained(currentNode, range)) { - currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); - } - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - currentNode = TreeAlgorithm_1.tree_getNextDescendantNode(container, currentNode); - return result; - } - } - }; - }, - _a; -} -exports.range_getPartiallyContainedNodes = range_getPartiallyContainedNodes; -//# sourceMappingURL=RangeAlgorithm.js.map + LocalNameSet.prototype.has = function (ns, localName) { + if (ns === null) { + return this._nullItems[localName] === true; + } + else if (this._items[ns]) { + return this._items[ns][localName] === true; + } + else { + return false; + } + }; + return LocalNameSet; +}()); +exports.LocalNameSet = LocalNameSet; +//# sourceMappingURL=LocalNameSet.js.map /***/ }), -/***/ 41853: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 90283: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMException_1 = __nccwpck_require__(13166); /** - * Matches elements with the given selectors. + * A namespace prefix map is a map that associates namespaceURI and namespace + * prefix lists, where namespaceURI values are the map's unique keys (which can + * include the null value representing no namespace), and ordered lists of + * associated prefix values are the map's key values. The namespace prefix map + * will be populated by previously seen namespaceURIs and all their previously + * encountered prefix associations for a given node and its ancestors. * - * @param selectors - selectors - * @param node - the node to match against + * _Note:_ The last seen prefix for a given namespaceURI is at the end of its + * respective list. The list is searched to find potentially matching prefixes, + * and if no matches are found for the given namespaceURI, then the last prefix + * in the list is used. See copy a namespace prefix map and retrieve a preferred + * prefix string for additional details. + * + * See: https://w3c.github.io/DOM-Parsing/#the-namespace-prefix-map */ -function selectors_scopeMatchASelectorsString(selectors, node) { +var NamespacePrefixMap = /** @class */ (function () { + function NamespacePrefixMap() { + this._items = {}; + this._nullItems = []; + } /** - * TODO: Selectors - * 1. Let s be the result of parse a selector selectors. [SELECTORS4] - * 2. If s is failure, then throw a "SyntaxError" DOMException. - * 3. Return the result of match a selector against a tree with s and node’s - * root using scoping root node. [SELECTORS4]. + * Creates a copy of the map. */ - throw new DOMException_1.NotSupportedError(); -} -exports.selectors_scopeMatchASelectorsString = selectors_scopeMatchASelectorsString; -//# sourceMappingURL=SelectorsAlgorithm.js.map + NamespacePrefixMap.prototype.copy = function () { + /** + * To copy a namespace prefix map map means to copy the map's keys into a + * new empty namespace prefix map, and to copy each of the values in the + * namespace prefix list associated with each keys' value into a new list + * which should be associated with the respective key in the new map. + */ + var mapCopy = new NamespacePrefixMap(); + for (var key in this._items) { + mapCopy._items[key] = this._items[key].slice(0); + } + mapCopy._nullItems = this._nullItems.slice(0); + return mapCopy; + }; + /** + * Retrieves a preferred prefix string from the namespace prefix map. + * + * @param preferredPrefix - preferred prefix string + * @param ns - namespace + */ + NamespacePrefixMap.prototype.get = function (preferredPrefix, ns) { + /** + * 1. Let candidates list be the result of retrieving a list from map where + * there exists a key in map that matches the value of ns or if there is no + * such key, then stop running these steps, and return the null value. + */ + var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null); + if (candidatesList === null) { + return null; + } + /** + * 2. Otherwise, for each prefix value prefix in candidates list, iterating + * from beginning to end: + * + * _Note:_ There will always be at least one prefix value in the list. + */ + var prefix = null; + for (var i = 0; i < candidatesList.length; i++) { + prefix = candidatesList[i]; + /** + * 2.1. If prefix matches preferred prefix, then stop running these steps + * and return prefix. + */ + if (prefix === preferredPrefix) { + return prefix; + } + } + /** + * 2.2. If prefix is the last item in the candidates list, then stop + * running these steps and return prefix. + */ + return prefix; + }; + /** + * Checks if a prefix string is found in the namespace prefix map associated + * with the given namespace. + * + * @param prefix - prefix string + * @param ns - namespace + */ + NamespacePrefixMap.prototype.has = function (prefix, ns) { + /** + * 1. Let candidates list be the result of retrieving a list from map where + * there exists a key in map that matches the value of ns or if there is + * no such key, then stop running these steps, and return false. + */ + var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null); + if (candidatesList === null) { + return false; + } + /** + * 2. If the value of prefix occurs at least once in candidates list, + * return true, otherwise return false. + */ + return (candidatesList.indexOf(prefix) !== -1); + }; + /** + * Checks if a prefix string is found in the namespace prefix map. + * + * @param prefix - prefix string + */ + NamespacePrefixMap.prototype.hasPrefix = function (prefix) { + if (this._nullItems.indexOf(prefix) !== -1) + return true; + for (var key in this._items) { + if (this._items[key].indexOf(prefix) !== -1) + return true; + } + return false; + }; + /** + * Adds a prefix string associated with a namespace to the prefix map. + * + * @param prefix - prefix string + * @param ns - namespace + */ + NamespacePrefixMap.prototype.set = function (prefix, ns) { + /** + * 1. Let candidates list be the result of retrieving a list from map where + * there exists a key in map that matches the value of ns or if there is + * no such key, then let candidates list be null. + */ + var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null); + /** + * 2. If candidates list is null, then create a new list with prefix as the + * only item in the list, and associate that list with a new key ns in map. + * 3. Otherwise, append prefix to the end of candidates list. + * + * _Note:_ The steps in retrieve a preferred prefix string use the list to + * track the most recently used (MRU) prefix associated with a given + * namespace, which will be the prefix at the end of the list. This list + * may contain duplicates of the same prefix value seen earlier + * (and that's OK). + */ + if (ns !== null && candidatesList === null) { + this._items[ns] = [prefix]; + } + else { + candidatesList.push(prefix); + } + }; + return NamespacePrefixMap; +}()); +exports.NamespacePrefixMap = NamespacePrefixMap; +//# sourceMappingURL=NamespacePrefixMap.js.map /***/ }), -/***/ 68733: +/***/ 85039: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -49233,3282 +34225,4032 @@ var __values = (this && this.__values) || function(o) { }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(65282); -var util_2 = __nccwpck_require__(76195); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var MutationObserverAlgorithm_1 = __nccwpck_require__(78157); +var interfaces_1 = __nccwpck_require__(27305); +var LocalNameSet_1 = __nccwpck_require__(19049); +var NamespacePrefixMap_1 = __nccwpck_require__(90283); +var DOMException_1 = __nccwpck_require__(13166); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); /** - * Signals a slot change to the given slot. + * Represents an XML serializer. * - * @param slot - a slot + * Implements: https://www.w3.org/TR/DOM-Parsing/#serializing */ -function shadowTree_signalASlotChange(slot) { +var XMLSerializerImpl = /** @class */ (function () { + function XMLSerializerImpl() { + } + /** @inheritdoc */ + XMLSerializerImpl.prototype.serializeToString = function (root) { + /** + * The serializeToString(root) method must produce an XML serialization + * of root passing a value of false for the require well-formed parameter, + * and return the result. + */ + return this._xmlSerialization(root, false); + }; /** - * 1. Append slot to slot’s relevant agent’s signal slots. - * 2. Queue a mutation observer microtask. + * Produces an XML serialization of the given node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - var window = DOMImpl_1.dom.window; - window._signalSlots.add(slot); - MutationObserverAlgorithm_1.observer_queueAMutationObserverMicrotask(); -} -exports.shadowTree_signalASlotChange = shadowTree_signalASlotChange; -/** - * Determines whether a the shadow tree of the given element node is - * connected to a document node. - * - * @param element - an element node of the shadow tree - */ -function shadowTree_isConnected(element) { + XMLSerializerImpl.prototype._xmlSerialization = function (node, requireWellFormed) { + // To increase performance, use a namespace-aware serializer only if the + // document has namespaced elements + if (node._nodeDocument === undefined || node._nodeDocument._hasNamespaces) { + /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization + * + * 1. Let namespace be a context namespace with value null. + * The context namespace tracks the XML serialization algorithm's current + * default namespace. The context namespace is changed when either an Element + * Node has a default namespace declaration, or the algorithm generates a + * default namespace declaration for the Element Node to match its own + * namespace. The algorithm assumes no namespace (null) to start. + * 2. Let prefix map be a new namespace prefix map. + * 3. Add the XML namespace with prefix value "xml" to prefix map. + * 4. Let prefix index be a generated namespace prefix index with value 1. + * The generated namespace prefix index is used to generate a new unique + * prefix value when no suitable existing namespace prefix is available to + * serialize a node's namespaceURI (or the namespaceURI of one of node's + * attributes). See the generate a prefix algorithm. + */ + var namespace = null; + var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap(); + prefixMap.set("xml", infra_1.namespace.XML); + var prefixIndex = { value: 1 }; + /** + * 5. Return the result of running the XML serialization algorithm on node + * passing the context namespace namespace, namespace prefix map prefix map, + * generated namespace prefix index reference to prefix index, and the + * flag require well-formed. If an exception occurs during the execution + * of the algorithm, then catch that exception and throw an + * "InvalidStateError" DOMException. + */ + try { + return this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); + } + catch (_a) { + throw new DOMException_1.InvalidStateError(); + } + } + else { + try { + return this._serializeNode(node, requireWellFormed); + } + catch (_b) { + throw new DOMException_1.InvalidStateError(); + } + } + }; /** - * An element is connected if its shadow-including root is a document. + * Produces an XML serialization of a node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance */ - return util_1.Guard.isDocumentNode(TreeAlgorithm_1.tree_rootNode(element, true)); -} -exports.shadowTree_isConnected = shadowTree_isConnected; -/** - * Determines whether a slotable is assigned. - * - * @param slotable - a slotable - */ -function shadowTree_isAssigned(slotable) { + XMLSerializerImpl.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { + switch (node.nodeType) { + case interfaces_1.NodeType.Element: + return this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); + case interfaces_1.NodeType.Document: + return this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); + case interfaces_1.NodeType.Comment: + return this._serializeComment(node, requireWellFormed); + case interfaces_1.NodeType.Text: + return this._serializeText(node, requireWellFormed); + case interfaces_1.NodeType.DocumentFragment: + return this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); + case interfaces_1.NodeType.DocumentType: + return this._serializeDocumentType(node, requireWellFormed); + case interfaces_1.NodeType.ProcessingInstruction: + return this._serializeProcessingInstruction(node, requireWellFormed); + case interfaces_1.NodeType.CData: + return this._serializeCData(node, requireWellFormed); + default: + throw new Error("Unknown node type: " + node.nodeType); + } + }; /** - * A slotable is assigned if its assigned slot is non-null. + * Produces an XML serialization of a node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - return (slotable._assignedSlot !== null); -} -exports.shadowTree_isAssigned = shadowTree_isAssigned; -/** - * Finds a slot for the given slotable. - * - * @param slotable - a slotable - * @param openFlag - `true` to search open shadow tree's only - */ -function shadowTree_findASlot(slotable, openFlag) { - if (openFlag === void 0) { openFlag = false; } + XMLSerializerImpl.prototype._serializeNode = function (node, requireWellFormed) { + switch (node.nodeType) { + case interfaces_1.NodeType.Element: + return this._serializeElement(node, requireWellFormed); + case interfaces_1.NodeType.Document: + return this._serializeDocument(node, requireWellFormed); + case interfaces_1.NodeType.Comment: + return this._serializeComment(node, requireWellFormed); + case interfaces_1.NodeType.Text: + return this._serializeText(node, requireWellFormed); + case interfaces_1.NodeType.DocumentFragment: + return this._serializeDocumentFragment(node, requireWellFormed); + case interfaces_1.NodeType.DocumentType: + return this._serializeDocumentType(node, requireWellFormed); + case interfaces_1.NodeType.ProcessingInstruction: + return this._serializeProcessingInstruction(node, requireWellFormed); + case interfaces_1.NodeType.CData: + return this._serializeCData(node, requireWellFormed); + default: + throw new Error("Unknown node type: " + node.nodeType); + } + }; /** - * 1. If slotable’s parent is null, then return null. - * 2. Let shadow be slotable’s parent’s shadow root. - * 3. If shadow is null, then return null. - * 4. If the open flag is set and shadow’s mode is not "open", then - * return null. - * 5. Return the first slot in tree order in shadow’s descendants whose name - * is slotable’s name, if any, and null otherwise. + * Produces an XML serialization of an element node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance */ - var node = util_1.Cast.asNode(slotable); - var parent = node._parent; - if (parent === null) - return null; - var shadow = parent._shadowRoot || null; - if (shadow === null) - return null; - if (openFlag && shadow._mode !== "open") - return null; - var child = TreeAlgorithm_1.tree_getFirstDescendantNode(shadow, false, true, function (e) { return util_1.Guard.isSlot(e); }); - while (child !== null) { - if (child._name === slotable._name) - return child; - child = TreeAlgorithm_1.tree_getNextDescendantNode(shadow, child, false, true, function (e) { return util_1.Guard.isSlot(e); }); - } - return null; -} -exports.shadowTree_findASlot = shadowTree_findASlot; -/** - * Finds slotables for the given slot. - * - * @param slot - a slot - */ -function shadowTree_findSlotables(slot) { - var e_1, _a; + XMLSerializerImpl.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { + var e_1, _a; + /** + * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node + * + * 1. If the require well-formed flag is set (its value is true), and this + * node's localName attribute contains the character ":" (U+003A COLON) or + * does not match the XML Name production, then throw an exception; the + * serialization of this node would not be a well-formed element. + */ + if (requireWellFormed && (node.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(node.localName))) { + throw new Error("Node local name contains invalid characters (well-formed required)."); + } + /** + * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). + * 3. Let qualified name be an empty string. + * 4. Let skip end tag be a boolean flag with value false. + * 5. Let ignore namespace definition attribute be a boolean flag with value + * false. + * 6. Given prefix map, copy a namespace prefix map and let map be the + * result. + * 7. Let local prefixes map be an empty map. The map has unique Node prefix + * strings as its keys, with corresponding namespaceURI Node values as the + * map's key values (in this map, the null namespace is represented by the + * empty string). + * + * _Note:_ This map is local to each element. It is used to ensure there + * are no conflicting prefixes should a new namespace prefix attribute need + * to be generated. It is also used to enable skipping of duplicate prefix + * definitions when writing an element's attributes: the map allows the + * algorithm to distinguish between a prefix in the namespace prefix map + * that might be locally-defined (to the current Element) and one that is + * not. + * 8. Let local default namespace be the result of recording the namespace + * information for node given map and local prefixes map. + * + * _Note:_ The above step will update map with any found namespace prefix + * definitions, add the found prefix definitions to the local prefixes map + * and return a local default namespace value defined by a default namespace + * attribute if one exists. Otherwise it returns null. + * 9. Let inherited ns be a copy of namespace. + * 10. Let ns be the value of node's namespaceURI attribute. + */ + var markup = "<"; + var qualifiedName = ''; + var skipEndTag = false; + var ignoreNamespaceDefinitionAttribute = false; + var map = prefixMap.copy(); + var localPrefixesMap = {}; + var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap); + var inheritedNS = namespace; + var ns = node.namespaceURI; + /** 11. If inherited ns is equal to ns, then: */ + if (inheritedNS === ns) { + /** + * 11.1. If local default namespace is not null, then set ignore + * namespace definition attribute to true. + */ + if (localDefaultNamespace !== null) { + ignoreNamespaceDefinitionAttribute = true; + } + /** + * 11.2. If ns is the XML namespace, then append to qualified name the + * concatenation of the string "xml:" and the value of node's localName. + * 11.3. Otherwise, append to qualified name the value of node's + * localName. The node's prefix if it exists, is dropped. + */ + if (ns === infra_1.namespace.XML) { + qualifiedName = 'xml:' + node.localName; + } + else { + qualifiedName = node.localName; + } + /** 11.4. Append the value of qualified name to markup. */ + markup += qualifiedName; + } + else { + /** + * 12. Otherwise, inherited ns is not equal to ns (the node's own + * namespace is different from the context namespace of its parent). + * Run these sub-steps: + * + * 12.1. Let prefix be the value of node's prefix attribute. + * 12.2. Let candidate prefix be the result of retrieving a preferred + * prefix string prefix from map given namespace ns. The above may return + * null if no namespace key ns exists in map. + */ + var prefix = node.prefix; + /** + * We don't need to run "retrieving a preferred prefix string" algorithm if + * the element has no prefix and its namespace matches to the default + * namespace. + * See: https://github.com/web-platform-tests/wpt/pull/16703 + */ + var candidatePrefix = null; + if (prefix !== null || ns !== localDefaultNamespace) { + candidatePrefix = map.get(prefix, ns); + } + /** + * 12.3. If the value of prefix matches "xmlns", then run the following + * steps: + */ + if (prefix === "xmlns") { + /** + * 12.3.1. If the require well-formed flag is set, then throw an error. + * An Element with prefix "xmlns" will not legally round-trip in a + * conforming XML parser. + */ + if (requireWellFormed) { + throw new Error("An element cannot have the 'xmlns' prefix (well-formed required)."); + } + /** + * 12.3.2. Let candidate prefix be the value of prefix. + */ + candidatePrefix = prefix; + } + /** + * 12.4.Found a suitable namespace prefix: if candidate prefix is not + * null (a namespace prefix is defined which maps to ns), then: + */ + if (candidatePrefix !== null) { + /** + * The following may serialize a different prefix than the Element's + * existing prefix if it already had one. However, the retrieving a + * preferred prefix string algorithm already tried to match the + * existing prefix if possible. + * + * 12.4.1. Append to qualified name the concatenation of candidate + * prefix, ":" (U+003A COLON), and node's localName. There exists on + * this node or the node's ancestry a namespace prefix definition that + * defines the node's namespace. + * 12.4.2. If the local default namespace is not null (there exists a + * locally-defined default namespace declaration attribute) and its + * value is not the XML namespace, then let inherited ns get the value + * of local default namespace unless the local default namespace is the + * empty string in which case let it get null (the context namespace + * is changed to the declared default, rather than this node's own + * namespace). + * + * _Note:_ Any default namespace definitions or namespace prefixes that + * define the XML namespace are omitted when serializing this node's + * attributes. + */ + qualifiedName = candidatePrefix + ':' + node.localName; + if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) { + inheritedNS = localDefaultNamespace || null; + } + /** + * 12.4.3. Append the value of qualified name to markup. + */ + markup += qualifiedName; + /** 12.5. Otherwise, if prefix is not null, then: */ + } + else if (prefix !== null) { + /** + * _Note:_ By this step, there is no namespace or prefix mapping + * declaration in this node (or any parent node visited by this + * algorithm) that defines prefix otherwise the step labelled Found + * a suitable namespace prefix would have been followed. The sub-steps + * that follow will create a new namespace prefix declaration for prefix + * and ensure that prefix does not conflict with an existing namespace + * prefix declaration of the same localName in node's attribute list. + * + * 12.5.1. If the local prefixes map contains a key matching prefix, + * then let prefix be the result of generating a prefix providing as + * input map, ns, and prefix index. + */ + if (prefix in localPrefixesMap) { + prefix = this._generatePrefix(ns, map, prefixIndex); + } + /** + * 12.5.2. Add prefix to map given namespace ns. + * 12.5.3. Append to qualified name the concatenation of prefix, ":" + * (U+003A COLON), and node's localName. + * 12.5.4. Append the value of qualified name to markup. + */ + map.set(prefix, ns); + qualifiedName += prefix + ':' + node.localName; + markup += qualifiedName; + /** + * 12.5.5. Append the following to markup, in the order listed: + * + * _Note:_ The following serializes a namespace prefix declaration for + * prefix which was just added to the map. + * + * 12.5.5.1. " " (U+0020 SPACE); + * 12.5.5.2. The string "xmlns:"; + * 12.5.5.3. The value of prefix; + * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 12.5.5.5. The result of serializing an attribute value given ns and + * the require well-formed flag as input; + * 12.5.5.6. """ (U+0022 QUOTATION MARK). + */ + markup += " xmlns:" + prefix + "=\"" + + this._serializeAttributeValue(ns, requireWellFormed) + "\""; + /** + * 12.5.5.7. If local default namespace is not null (there exists a + * locally-defined default namespace declaration attribute), then + * let inherited ns get the value of local default namespace unless the + * local default namespace is the empty string in which case let it get + * null. + */ + if (localDefaultNamespace !== null) { + inheritedNS = localDefaultNamespace || null; + } + /** + * 12.6. Otherwise, if local default namespace is null, or local + * default namespace is not null and its value is not equal to ns, then: + */ + } + else if (localDefaultNamespace === null || + (localDefaultNamespace !== null && localDefaultNamespace !== ns)) { + /** + * _Note:_ At this point, the namespace for this node still needs to be + * serialized, but there's no prefix (or candidate prefix) available; the + * following uses the default namespace declaration to define the + * namespace--optionally replacing an existing default declaration + * if present. + * + * 12.6.1. Set the ignore namespace definition attribute flag to true. + * 12.6.2. Append to qualified name the value of node's localName. + * 12.6.3. Let the value of inherited ns be ns. + * + * _Note:_ The new default namespace will be used in the serialization + * to define this node's namespace and act as the context namespace for + * its children. + */ + ignoreNamespaceDefinitionAttribute = true; + qualifiedName += node.localName; + inheritedNS = ns; + /** + * 12.6.4. Append the value of qualified name to markup. + */ + markup += qualifiedName; + /** + * 12.6.5. Append the following to markup, in the order listed: + * + * _Note:_ The following serializes the new (or replacement) default + * namespace definition. + * + * 12.6.5.1. " " (U+0020 SPACE); + * 12.6.5.2. The string "xmlns"; + * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 12.6.5.4. The result of serializing an attribute value given ns + * and the require well-formed flag as input; + * 12.6.5.5. """ (U+0022 QUOTATION MARK). + */ + markup += " xmlns" + "=\"" + + this._serializeAttributeValue(ns, requireWellFormed) + "\""; + /** + * 12.7. Otherwise, the node has a local default namespace that matches + * ns. Append to qualified name the value of node's localName, let the + * value of inherited ns be ns, and append the value of qualified name + * to markup. + */ + } + else { + qualifiedName += node.localName; + inheritedNS = ns; + markup += qualifiedName; + } + } + /** + * 13. Append to markup the result of the XML serialization of node's + * attributes given map, prefix index, local prefixes map, ignore namespace + * definition attribute flag, and require well-formed flag. + */ + markup += this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed); + /** + * 14. If ns is the HTML namespace, and the node's list of children is + * empty, and the node's localName matches any one of the following void + * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", + * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", + * "param", "source", "track", "wbr"; then append the following to markup, + * in the order listed: + * 14.1. " " (U+0020 SPACE); + * 14.2. "/" (U+002F SOLIDUS). + * and set the skip end tag flag to true. + * 15. If ns is not the HTML namespace, and the node's list of children is + * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end + * tag flag to true. + * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. + */ + var isHTML = (ns === infra_1.namespace.HTML); + if (isHTML && node.childNodes.length === 0 && + XMLSerializerImpl._VoidElementNames.has(node.localName)) { + markup += " /"; + skipEndTag = true; + } + else if (!isHTML && node.childNodes.length === 0) { + markup += "/"; + skipEndTag = true; + } + markup += ">"; + /** + * 17. If the value of skip end tag is true, then return the value of markup + * and skip the remaining steps. The node is a leaf-node. + */ + if (skipEndTag) + return markup; + /** + * 18. If ns is the HTML namespace, and the node's localName matches the + * string "template", then this is a template element. Append to markup the + * result of XML serializing a DocumentFragment node given the template + * element's template contents (a DocumentFragment), providing inherited + * ns, map, prefix index, and the require well-formed flag. + * + * _Note:_ This allows template content to round-trip, given the rules for + * parsing XHTML documents. + * + * 19. Otherwise, append to markup the result of running the XML + * serialization algorithm on each of node's children, in tree order, + * providing inherited ns, map, prefix index, and the require well-formed + * flag. + */ + if (isHTML && node.localName === "template") { + // TODO: serialize template contents + } + else { + try { + for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + markup += this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + } + /** + * 20. Append the following to markup, in the order listed: + * 20.1. "" (U+003E GREATER-THAN SIGN). + */ + markup += ""; + /** + * 21. Return the value of markup. + */ + return markup; + }; /** - * 1. Let result be an empty list. - * 2. If slot’s root is not a shadow root, then return result. + * Produces an XML serialization of a document node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance */ - var result = []; - var root = TreeAlgorithm_1.tree_rootNode(slot); - if (!util_1.Guard.isShadowRoot(root)) + XMLSerializerImpl.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { + var e_2, _a; + /** + * If the require well-formed flag is set (its value is true), and this node + * has no documentElement (the documentElement attribute's value is null), + * then throw an exception; the serialization of this node would not be a + * well-formed document. + */ + if (requireWellFormed && node.documentElement === null) { + throw new Error("Missing document element (well-formed required)."); + } + /** + * Otherwise, run the following steps: + * 1. Let serialized document be an empty string. + * 2. For each child child of node, in tree order, run the XML + * serialization algorithm on the child passing along the provided + * arguments, and append the result to serialized document. + * + * _Note:_ This will serialize any number of ProcessingInstruction and + * Comment nodes both before and after the Document's documentElement node, + * including at most one DocumentType node. (Text nodes are not allowed as + * children of the Document.) + * + * 3. Return the value of serialized document. + */ + var serializedDocument = ""; + try { + for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + serializedDocument += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_2) throw e_2.error; } + } + return serializedDocument; + }; + /** + * Produces an XML serialization of a comment node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + XMLSerializerImpl.prototype._serializeComment = function (node, requireWellFormed) { + /** + * If the require well-formed flag is set (its value is true), and node's + * data contains characters that are not matched by the XML Char production + * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that + * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception; + * the serialization of this node's data would not be well-formed. + */ + if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || + node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) { + throw new Error("Comment data contains invalid characters (well-formed required)."); + } + /** + * Otherwise, return the concatenation of "". + */ + return ""; + }; + /** + * Produces an XML serialization of a text node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + * @param level - current depth of the XML tree + */ + XMLSerializerImpl.prototype._serializeText = function (node, requireWellFormed) { + /** + * 1. If the require well-formed flag is set (its value is true), and + * node's data contains characters that are not matched by the XML Char + * production, then throw an exception; the serialization of this node's + * data would not be well-formed. + */ + if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) { + throw new Error("Text data contains invalid characters (well-formed required)."); + } + /** + * 2. Let markup be the value of node's data. + * 3. Replace any occurrences of "&" in markup by "&". + * 4. Replace any occurrences of "<" in markup by "<". + * 5. Replace any occurrences of ">" in markup by ">". + * 6. Return the value of markup. + */ + var result = ""; + for (var i = 0; i < node.data.length; i++) { + var c = node.data[i]; + if (c === "&") + result += "&"; + else if (c === "<") + result += "<"; + else if (c === ">") + result += ">"; + else + result += c; + } return result; + }; /** - * 3. Let host be slot’s root’s host. - * 4. For each slotable child of host, slotable, in tree order: + * Produces an XML serialization of a document fragment node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance */ - var host = root._host; - try { - for (var _b = __values(host._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var slotable = _c.value; - if (util_1.Guard.isSlotable(slotable)) { - /** - * 4.1. Let foundSlot be the result of finding a slot given slotable. - * 4.2. If foundSlot is slot, then append slotable to result. - */ - var foundSlot = shadowTree_findASlot(slotable); - if (foundSlot === slot) { - result.push(slotable); - } + XMLSerializerImpl.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { + var e_3, _a; + /** + * 1. Let markup the empty string. + * 2. For each child child of node, in tree order, run the XML serialization + * algorithm on the child given namespace, prefix map, a reference to prefix + * index, and flag require well-formed. Concatenate the result to markup. + * 3. Return the value of markup. + */ + var markup = ""; + try { + for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + markup += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed); } } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_3) throw e_3.error; } } - finally { if (e_1) throw e_1.error; } - } + return markup; + }; /** - * 5. Return result. + * Produces an XML serialization of a document type node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - return result; -} -exports.shadowTree_findSlotables = shadowTree_findSlotables; -/** - * Finds slotables for the given slot. - * - * @param slot - a slot - */ -function shadowTree_findFlattenedSlotables(slot) { - var e_2, _a, e_3, _b; + XMLSerializerImpl.prototype._serializeDocumentType = function (node, requireWellFormed) { + /** + * 1. If the require well-formed flag is true and the node's publicId + * attribute contains characters that are not matched by the XML PubidChar + * production, then throw an exception; the serialization of this node + * would not be a well-formed document type declaration. + */ + if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) { + throw new Error("DocType public identifier does not match PubidChar construct (well-formed required)."); + } + /** + * 2. If the require well-formed flag is true and the node's systemId + * attribute contains characters that are not matched by the XML Char + * production or that contains both a """ (U+0022 QUOTATION MARK) and a + * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization + * of this node would not be a well-formed document type declaration. + */ + if (requireWellFormed && + (!algorithm_1.xml_isLegalChar(node.systemId) || + (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) { + throw new Error("DocType system identifier contains invalid characters (well-formed required)."); + } + /** + * 3. Let markup be an empty string. + * 4. Append the string "" (U+003E GREATER-THAN SIGN) to markup. + * 11. Return the value of markup. + */ + return node.publicId && node.systemId ? + "" + : node.publicId ? + "" + : node.systemId ? + "" + : + ""; + }; /** - * 1. Let result be an empty list. - * 2. If slot’s root is not a shadow root, then return result. + * Produces an XML serialization of a processing instruction node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - var result = []; - var root = TreeAlgorithm_1.tree_rootNode(slot); - if (!util_1.Guard.isShadowRoot(root)) - return result; + XMLSerializerImpl.prototype._serializeProcessingInstruction = function (node, requireWellFormed) { + /** + * 1. If the require well-formed flag is set (its value is true), and node's + * target contains a ":" (U+003A COLON) character or is an ASCII + * case-insensitive match for the string "xml", then throw an exception; + * the serialization of this node's target would not be well-formed. + */ + if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) { + throw new Error("Processing instruction target contains invalid characters (well-formed required)."); + } + /** + * 2. If the require well-formed flag is set (its value is true), and node's + * data contains characters that are not matched by the XML Char production + * or contains the string "?>" (U+003F QUESTION MARK, + * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of + * this node's data would not be well-formed. + */ + if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || + node.data.indexOf("?>") !== -1)) { + throw new Error("Processing instruction data contains invalid characters (well-formed required)."); + } + /** + * 3. Let markup be the concatenation of the following, in the order listed: + * 3.1. "" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN). + * 4. Return the value of markup. + */ + return ""; + }; /** - * 3. Let slotables be the result of finding slotables given slot. - * 4. If slotables is the empty list, then append each slotable child of - * slot, in tree order, to slotables. + * Produces an XML serialization of a CDATA node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - var slotables = shadowTree_findSlotables(slot); - if (util_2.isEmpty(slotables)) { + XMLSerializerImpl.prototype._serializeCData = function (node, requireWellFormed) { + if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) { + throw new Error("CDATA contains invalid characters (well-formed required)."); + } + return ""; + }; + /** + * Produces an XML serialization of the attributes of an element node. + * + * @param node - node to serialize + * @param map - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param localPrefixesMap - local prefixes map + * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace + * attributes + * @param requireWellFormed - whether to check conformance + */ + XMLSerializerImpl.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed) { + var e_4, _a; + /** + * 1. Let result be the empty string. + * 2. Let localname set be a new empty namespace localname set. This + * localname set will contain tuples of unique attribute namespaceURI and + * localName pairs, and is populated as each attr is processed. This set is + * used to [optionally] enforce the well-formed constraint that an element + * cannot have two attributes with the same namespaceURI and localName. + * This can occur when two otherwise identical attributes on the same + * element differ only by their prefix values. + */ + var result = ""; + var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined; try { - for (var _c = __values(slot._children), _d = _c.next(); !_d.done; _d = _c.next()) { - var slotable = _d.value; - if (util_1.Guard.isSlotable(slotable)) { - slotables.push(slotable); + /** + * 3. Loop: For each attribute attr in element's attributes, in the order + * they are specified in the element's attribute list: + */ + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + // Optimize common case + if (!ignoreNamespaceDefinitionAttribute && !requireWellFormed && attr.namespaceURI === null) { + result += " " + attr.localName + "=\"" + + this._serializeAttributeValue(attr.value, requireWellFormed) + "\""; + continue; + } + /** + * 3.1. If the require well-formed flag is set (its value is true), and the + * localname set contains a tuple whose values match those of a new tuple + * consisting of attr's namespaceURI attribute and localName attribute, + * then throw an exception; the serialization of this attr would fail to + * produce a well-formed element serialization. + */ + if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) { + throw new Error("Element contains duplicate attributes (well-formed required)."); + } + /** + * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and + * localName attribute, and add it to the localname set. + * 3.3. Let attribute namespace be the value of attr's namespaceURI value. + * 3.4. Let candidate prefix be null. + */ + if (requireWellFormed && localNameSet) + localNameSet.set(attr.namespaceURI, attr.localName); + var attributeNamespace = attr.namespaceURI; + var candidatePrefix = null; + /** 3.5. If attribute namespace is not null, then run these sub-steps: */ + if (attributeNamespace !== null) { + /** + * 3.5.1. Let candidate prefix be the result of retrieving a preferred + * prefix string from map given namespace attribute namespace with + * preferred prefix being attr's prefix value. + */ + candidatePrefix = map.get(attr.prefix, attributeNamespace); + /** + * 3.5.2. If the value of attribute namespace is the XMLNS namespace, + * then run these steps: + */ + if (attributeNamespace === infra_1.namespace.XMLNS) { + /** + * 3.5.2.1. If any of the following are true, then stop running these + * steps and goto Loop to visit the next attribute: + * - the attr's value is the XML namespace; + * _Note:_ The XML namespace cannot be redeclared and survive + * round-tripping (unless it defines the prefix "xml"). To avoid this + * problem, this algorithm always prefixes elements in the XML + * namespace with "xml" and drops any related definitions as seen + * in the above condition. + * - the attr's prefix is null and the ignore namespace definition + * attribute flag is true (the Element's default namespace attribute + * should be skipped); + * - the attr's prefix is not null and either + * * the attr's localName is not a key contained in the local + * prefixes map, or + * * the attr's localName is present in the local prefixes map but + * the value of the key does not match attr's value + * and furthermore that the attr's localName (as the prefix to find) + * is found in the namespace prefix map given the namespace consisting + * of the attr's value (the current namespace prefix definition was + * exactly defined previously--on an ancestor element not the current + * element whose attributes are being processed). + */ + if (attr.value === infra_1.namespace.XML || + (attr.prefix === null && ignoreNamespaceDefinitionAttribute) || + (attr.prefix !== null && (!(attr.localName in localPrefixesMap) || + localPrefixesMap[attr.localName] !== attr.value) && + map.has(attr.localName, attr.value))) + continue; + /** + * 3.5.2.2. If the require well-formed flag is set (its value is true), + * and the value of attr's value attribute matches the XMLNS + * namespace, then throw an exception; the serialization of this + * attribute would produce invalid XML because the XMLNS namespace + * is reserved and cannot be applied as an element's namespace via + * XML parsing. + * + * _Note:_ DOM APIs do allow creation of elements in the XMLNS + * namespace but with strict qualifications. + */ + if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) { + throw new Error("XMLNS namespace is reserved (well-formed required)."); + } + /** + * 3.5.2.3. If the require well-formed flag is set (its value is true), + * and the value of attr's value attribute is the empty string, then + * throw an exception; namespace prefix declarations cannot be used + * to undeclare a namespace (use a default namespace declaration + * instead). + */ + if (requireWellFormed && attr.value === '') { + throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."); + } + /** + * 3.5.2.4. the attr's prefix matches the string "xmlns", then let + * candidate prefix be the string "xmlns". + */ + if (attr.prefix === 'xmlns') + candidatePrefix = 'xmlns'; + /** + * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace. + * Run these steps: + * + * _Note:_ The (candidatePrefix === null) check is not in the spec. + * We deviate from the spec here. Otherwise a prefix is generated for + * all attributes with namespaces. + */ + } + else if (candidatePrefix === null) { + if (attr.prefix !== null && + (!map.hasPrefix(attr.prefix) || + map.has(attr.prefix, attributeNamespace))) { + /** + * Check if we can use the attribute's own prefix. + * We deviate from the spec here. + * TODO: This is not an efficient way of searching for prefixes. + * Follow developments to the spec. + */ + candidatePrefix = attr.prefix; + } + else { + /** + * 3.5.3.1. Let candidate prefix be the result of generating a prefix + * providing map, attribute namespace, and prefix index as input. + */ + candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex); + } + /** + * 3.5.3.2. Append the following to result, in the order listed: + * 3.5.3.2.1. " " (U+0020 SPACE); + * 3.5.3.2.2. The string "xmlns:"; + * 3.5.3.2.3. The value of candidate prefix; + * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 3.5.3.2.5. The result of serializing an attribute value given + * attribute namespace and the require well-formed flag as input; + * 3.5.3.2.6. """ (U+0022 QUOTATION MARK). + */ + result += " xmlns:" + candidatePrefix + "=\"" + + this._serializeAttributeValue(attributeNamespace, requireWellFormed) + "\""; + } } + /** + * 3.6. Append a " " (U+0020 SPACE) to result. + * 3.7. If candidate prefix is not null, then append to result the + * concatenation of candidate prefix with ":" (U+003A COLON). + */ + result += " "; + if (candidatePrefix !== null) { + result += candidatePrefix + ':'; + } + /** + * 3.8. If the require well-formed flag is set (its value is true), and + * this attr's localName attribute contains the character + * ":" (U+003A COLON) or does not match the XML Name production or + * equals "xmlns" and attribute namespace is null, then throw an + * exception; the serialization of this attr would not be a + * well-formed attribute. + */ + if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(attr.localName) || + (attr.localName === "xmlns" && attributeNamespace === null))) { + throw new Error("Attribute local name contains invalid characters (well-formed required)."); + } + /** + * 3.9. Append the following strings to result, in the order listed: + * 3.9.1. The value of attr's localName; + * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 3.9.3. The result of serializing an attribute value given attr's value + * attribute and the require well-formed flag as input; + * 3.9.4. """ (U+0022 QUOTATION MARK). + */ + result += attr.localName + "=\"" + + this._serializeAttributeValue(attr.value, requireWellFormed) + "\""; } } - catch (e_2_1) { e_2 = { error: e_2_1 }; } + catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } - finally { if (e_2) throw e_2.error; } + finally { if (e_4) throw e_4.error; } } - } - try { /** - * 5. For each node in slotables: + * 4. Return the value of result. */ - for (var slotables_1 = __values(slotables), slotables_1_1 = slotables_1.next(); !slotables_1_1.done; slotables_1_1 = slotables_1.next()) { - var node = slotables_1_1.value; + return result; + }; + /** + * Records namespace information for the given element and returns the + * default namespace attribute value. + * + * @param node - element node to process + * @param map - namespace prefix map + * @param localPrefixesMap - local prefixes map + */ + XMLSerializerImpl.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) { + var e_5, _a; + /** + * 1. Let default namespace attr value be null. + */ + var defaultNamespaceAttrValue = null; + try { /** - * 5.1. If node is a slot whose root is a shadow root, then: + * 2. Main: For each attribute attr in element's attributes, in the order + * they are specified in the element's attribute list: */ - if (util_1.Guard.isSlot(node) && util_1.Guard.isShadowRoot(TreeAlgorithm_1.tree_rootNode(node))) { - /** - * 5.1.1. Let temporaryResult be the result of finding flattened slotables given node. - * 5.1.2. Append each slotable in temporaryResult, in order, to result. - */ - var temporaryResult = shadowTree_findFlattenedSlotables(node); - result.push.apply(result, __spread(temporaryResult)); - } - else { + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; /** - * 5.2. Otherwise, append node to result. + * _Note:_ The following conditional steps find namespace prefixes. Only + * attributes in the XMLNS namespace are considered (e.g., attributes made + * to look like namespace declarations via + * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not + * included). */ - result.push(node); + /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */ + var attributeNamespace = attr.namespaceURI; + /** 2.2. Let attribute prefix be the value of attr's prefix. */ + var attributePrefix = attr.prefix; + /** 2.3. If the attribute namespace is the XMLNS namespace, then: */ + if (attributeNamespace === infra_1.namespace.XMLNS) { + /** + * 2.3.1. If attribute prefix is null, then attr is a default namespace + * declaration. Set the default namespace attr value to attr's value and + * stop running these steps, returning to Main to visit the next + * attribute. + */ + if (attributePrefix === null) { + defaultNamespaceAttrValue = attr.value; + continue; + /** + * 2.3.2. Otherwise, the attribute prefix is not null and attr is a + * namespace prefix definition. Run the following steps: + */ + } + else { + /** 2.3.2.1. Let prefix definition be the value of attr's localName. */ + var prefixDefinition = attr.localName; + /** 2.3.2.2. Let namespace definition be the value of attr's value. */ + var namespaceDefinition = attr.value; + /** + * 2.3.2.3. If namespace definition is the XML namespace, then stop + * running these steps, and return to Main to visit the next + * attribute. + * + * _Note:_ XML namespace definitions in prefixes are completely + * ignored (in order to avoid unnecessary work when there might be + * prefix conflicts). XML namespaced elements are always handled + * uniformly by prefixing (and overriding if necessary) the element's + * localname with the reserved "xml" prefix. + */ + if (namespaceDefinition === infra_1.namespace.XML) { + continue; + } + /** + * 2.3.2.4. If namespace definition is the empty string (the + * declarative form of having no namespace), then let namespace + * definition be null instead. + */ + if (namespaceDefinition === '') { + namespaceDefinition = null; + } + /** + * 2.3.2.5. If prefix definition is found in map given the namespace + * namespace definition, then stop running these steps, and return to + * Main to visit the next attribute. + * + * _Note:_ This step avoids adding duplicate prefix definitions for + * the same namespace in the map. This has the side-effect of avoiding + * later serialization of duplicate namespace prefix declarations in + * any descendant nodes. + */ + if (map.has(prefixDefinition, namespaceDefinition)) { + continue; + } + /** + * 2.3.2.6. Add the prefix prefix definition to map given namespace + * namespace definition. + */ + map.set(prefixDefinition, namespaceDefinition); + /** + * 2.3.2.7. Add the value of prefix definition as a new key to the + * local prefixes map, with the namespace definition as the key's + * value replacing the value of null with the empty string if + * applicable. + */ + localPrefixesMap[prefixDefinition] = namespaceDefinition || ''; + } + } } } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (slotables_1_1 && !slotables_1_1.done && (_b = slotables_1.return)) _b.call(slotables_1); + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_5) throw e_5.error; } } - finally { if (e_3) throw e_3.error; } - } + /** + * 3. Return the value of default namespace attr value. + * + * _Note:_ The empty string is a legitimate return value and is not + * converted to null. + */ + return defaultNamespaceAttrValue; + }; /** - * 6. Return result. - */ - return result; -} -exports.shadowTree_findFlattenedSlotables = shadowTree_findFlattenedSlotables; -/** - * Assigns slotables to the given slot. - * - * @param slot - a slot - */ -function shadowTree_assignSlotables(slot) { - var e_4, _a; + * Generates a new prefix for the given namespace. + * + * @param newNamespace - a namespace to generate prefix for + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + */ + XMLSerializerImpl.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) { + /** + * 1. Let generated prefix be the concatenation of the string "ns" and the + * current numerical value of prefix index. + * 2. Let the value of prefix index be incremented by one. + * 3. Add to map the generated prefix given the new namespace namespace. + * 4. Return the value of generated prefix. + */ + var generatedPrefix = "ns" + prefixIndex.value; + prefixIndex.value++; + prefixMap.set(generatedPrefix, newNamespace); + return generatedPrefix; + }; /** - * 1. Let slotables be the result of finding slotables for slot. - * 2. If slotables and slot’s assigned nodes are not identical, then run - * signal a slot change for slot. + * Produces an XML serialization of an attribute value. + * + * @param value - attribute value + * @param requireWellFormed - whether to check conformance */ - var slotables = shadowTree_findSlotables(slot); - if (slotables.length === slot._assignedNodes.length) { - var nodesIdentical = true; - for (var i = 0; i < slotables.length; i++) { - if (slotables[i] !== slot._assignedNodes[i]) { - nodesIdentical = false; - break; - } + XMLSerializerImpl.prototype._serializeAttributeValue = function (value, requireWellFormed) { + /** + * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value + * + * 1. If the require well-formed flag is set (its value is true), and + * attribute value contains characters that are not matched by the XML Char + * production, then throw an exception; the serialization of this attribute + * value would fail to produce a well-formed element serialization. + */ + if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) { + throw new Error("Invalid characters in attribute value."); } - if (!nodesIdentical) { - shadowTree_signalASlotChange(slot); + /** + * 2. If attribute value is null, then return the empty string. + */ + if (value === null) + return ""; + /** + * 3. Otherwise, attribute value is a string. Return the value of attribute + * value, first replacing any occurrences of the following: + * - "&" with "&" + * - """ with """ + * - "<" with "<" + * - ">" with ">" + * NOTE + * This matches behavior present in browsers, and goes above and beyond the + * grammar requirement in the XML specification's AttValue production by + * also replacing ">" characters. + */ + var result = ""; + for (var i = 0; i < value.length; i++) { + var c = value[i]; + if (c === "\"") + result += """; + else if (c === "&") + result += "&"; + else if (c === "<") + result += "<"; + else if (c === ">") + result += ">"; + else + result += c; } - } + return result; + }; /** - * 3. Set slot’s assigned nodes to slotables. - * 4. For each slotable in slotables, set slotable’s assigned slot to slot. + * Produces an XML serialization of an element node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - slot._assignedNodes = slotables; - try { - for (var slotables_2 = __values(slotables), slotables_2_1 = slotables_2.next(); !slotables_2_1.done; slotables_2_1 = slotables_2.next()) { - var slotable = slotables_2_1.value; - slotable._assignedSlot = slot; + XMLSerializerImpl.prototype._serializeElement = function (node, requireWellFormed) { + var e_6, _a; + /** + * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node + * + * 1. If the require well-formed flag is set (its value is true), and this + * node's localName attribute contains the character ":" (U+003A COLON) or + * does not match the XML Name production, then throw an exception; the + * serialization of this node would not be a well-formed element. + */ + if (requireWellFormed && (node.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(node.localName))) { + throw new Error("Node local name contains invalid characters (well-formed required)."); } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { + /** + * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). + * 3. Let qualified name be an empty string. + * 4. Let skip end tag be a boolean flag with value false. + * 5. Let ignore namespace definition attribute be a boolean flag with value + * false. + * 6. Given prefix map, copy a namespace prefix map and let map be the + * result. + * 7. Let local prefixes map be an empty map. The map has unique Node prefix + * strings as its keys, with corresponding namespaceURI Node values as the + * map's key values (in this map, the null namespace is represented by the + * empty string). + * + * _Note:_ This map is local to each element. It is used to ensure there + * are no conflicting prefixes should a new namespace prefix attribute need + * to be generated. It is also used to enable skipping of duplicate prefix + * definitions when writing an element's attributes: the map allows the + * algorithm to distinguish between a prefix in the namespace prefix map + * that might be locally-defined (to the current Element) and one that is + * not. + * 8. Let local default namespace be the result of recording the namespace + * information for node given map and local prefixes map. + * + * _Note:_ The above step will update map with any found namespace prefix + * definitions, add the found prefix definitions to the local prefixes map + * and return a local default namespace value defined by a default namespace + * attribute if one exists. Otherwise it returns null. + * 9. Let inherited ns be a copy of namespace. + * 10. Let ns be the value of node's namespaceURI attribute. + */ + var skipEndTag = false; + /** 11. If inherited ns is equal to ns, then: */ + /** + * 11.1. If local default namespace is not null, then set ignore + * namespace definition attribute to true. + * 11.2. If ns is the XML namespace, then append to qualified name the + * concatenation of the string "xml:" and the value of node's localName. + * 11.3. Otherwise, append to qualified name the value of node's + * localName. The node's prefix if it exists, is dropped. + */ + var qualifiedName = node.localName; + /** 11.4. Append the value of qualified name to markup. */ + var markup = "<" + qualifiedName; + /** + * 13. Append to markup the result of the XML serialization of node's + * attributes given map, prefix index, local prefixes map, ignore namespace + * definition attribute flag, and require well-formed flag. + */ + markup += this._serializeAttributes(node, requireWellFormed); + /** + * 14. If ns is the HTML namespace, and the node's list of children is + * empty, and the node's localName matches any one of the following void + * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", + * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", + * "param", "source", "track", "wbr"; then append the following to markup, + * in the order listed: + * 14.1. " " (U+0020 SPACE); + * 14.2. "/" (U+002F SOLIDUS). + * and set the skip end tag flag to true. + * 15. If ns is not the HTML namespace, and the node's list of children is + * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end + * tag flag to true. + * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. + */ + if (node._children.size === 0) { + markup += "/"; + skipEndTag = true; + } + markup += ">"; + /** + * 17. If the value of skip end tag is true, then return the value of markup + * and skip the remaining steps. The node is a leaf-node. + */ + if (skipEndTag) + return markup; try { - if (slotables_2_1 && !slotables_2_1.done && (_a = slotables_2.return)) _a.call(slotables_2); + /** + * 18. If ns is the HTML namespace, and the node's localName matches the + * string "template", then this is a template element. Append to markup the + * result of XML serializing a DocumentFragment node given the template + * element's template contents (a DocumentFragment), providing inherited + * ns, map, prefix index, and the require well-formed flag. + * + * _Note:_ This allows template content to round-trip, given the rules for + * parsing XHTML documents. + * + * 19. Otherwise, append to markup the result of running the XML + * serialization algorithm on each of node's children, in tree order, + * providing inherited ns, map, prefix index, and the require well-formed + * flag. + */ + for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + markup += this._serializeNode(childNode, requireWellFormed); + } } - finally { if (e_4) throw e_4.error; } - } -} -exports.shadowTree_assignSlotables = shadowTree_assignSlotables; -/** - * Assigns slotables to all nodes of a tree. - * - * @param root - root node - */ -function shadowTree_assignSlotablesForATree(root) { - /** - * To assign slotables for a tree, given a node root, run assign slotables - * for each slot slot in root’s inclusive descendants, in tree order. - */ - var descendant = TreeAlgorithm_1.tree_getFirstDescendantNode(root, true, false, function (e) { return util_1.Guard.isSlot(e); }); - while (descendant !== null) { - shadowTree_assignSlotables(descendant); - descendant = TreeAlgorithm_1.tree_getNextDescendantNode(root, descendant, true, false, function (e) { return util_1.Guard.isSlot(e); }); - } -} -exports.shadowTree_assignSlotablesForATree = shadowTree_assignSlotablesForATree; -/** - * Assigns a slot to a slotables. - * - * @param slotable - a slotable - */ -function shadowTree_assignASlot(slotable) { - /** - * 1. Let slot be the result of finding a slot with slotable. - * 2. If slot is non-null, then run assign slotables for slot. - */ - var slot = shadowTree_findASlot(slotable); - if (slot !== null) { - shadowTree_assignSlotables(slot); - } -} -exports.shadowTree_assignASlot = shadowTree_assignASlot; -//# sourceMappingURL=ShadowTreeAlgorithm.js.map - -/***/ }), - -/***/ 13512: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; + catch (e_6_1) { e_6 = { error: e_6_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_6) throw e_6.error; } } + /** + * 20. Append the following to markup, in the order listed: + * 20.1. "" (U+003E GREATER-THAN SIGN). + */ + markup += ""; + /** + * 21. Return the value of markup. + */ + return markup; }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(65282); -var DOMException_1 = __nccwpck_require__(13166); -var CreateAlgorithm_1 = __nccwpck_require__(57339); -var TreeAlgorithm_1 = __nccwpck_require__(16620); -var CharacterDataAlgorithm_1 = __nccwpck_require__(19461); -var MutationAlgorithm_1 = __nccwpck_require__(45463); -/** - * Returns node with its adjacent text and cdata node siblings. - * - * @param node - a node - * @param self - whether to include node itself - */ -function text_contiguousTextNodes(node, self) { - var _a; - if (self === void 0) { self = false; } /** - * The contiguous Text nodes of a node node are node, node’s previous - * sibling Text node, if any, and its contiguous Text nodes, and node’s next - * sibling Text node, if any, and its contiguous Text nodes, avoiding any - * duplicates. + * Produces an XML serialization of a document node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - return _a = {}, - _a[Symbol.iterator] = function () { - var currentNode = node; - while (currentNode && util_1.Guard.isTextNode(currentNode._previousSibling)) { - currentNode = currentNode._previousSibling; + XMLSerializerImpl.prototype._serializeDocument = function (node, requireWellFormed) { + var e_7, _a; + /** + * If the require well-formed flag is set (its value is true), and this node + * has no documentElement (the documentElement attribute's value is null), + * then throw an exception; the serialization of this node would not be a + * well-formed document. + */ + if (requireWellFormed && node.documentElement === null) { + throw new Error("Missing document element (well-formed required)."); + } + /** + * Otherwise, run the following steps: + * 1. Let serialized document be an empty string. + * 2. For each child child of node, in tree order, run the XML + * serialization algorithm on the child passing along the provided + * arguments, and append the result to serialized document. + * + * _Note:_ This will serialize any number of ProcessingInstruction and + * Comment nodes both before and after the Document's documentElement node, + * including at most one DocumentType node. (Text nodes are not allowed as + * children of the Document.) + * + * 3. Return the value of serialized document. + */ + var serializedDocument = ""; + try { + for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + serializedDocument += this._serializeNode(childNode, requireWellFormed); } - return { - next: function () { - if (currentNode && (!self && currentNode === node)) { - if (util_1.Guard.isTextNode(currentNode._nextSibling)) { - currentNode = currentNode._nextSibling; - } - else { - currentNode = null; - } - } - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - if (util_1.Guard.isTextNode(currentNode._nextSibling)) { - currentNode = currentNode._nextSibling; - } - else { - currentNode = null; - } - return result; - } - } - }; - }, - _a; -} -exports.text_contiguousTextNodes = text_contiguousTextNodes; -/** - * Returns node with its adjacent text node siblings. - * - * @param node - a node - * @param self - whether to include node itself - */ -function text_contiguousExclusiveTextNodes(node, self) { - var _a; - if (self === void 0) { self = false; } - /** - * The contiguous exclusive Text nodes of a node node are node, node’s - * previous sibling exclusive Text node, if any, and its contiguous - * exclusive Text nodes, and node’s next sibling exclusive Text node, - * if any, and its contiguous exclusive Text nodes, avoiding any duplicates. - */ - return _a = {}, - _a[Symbol.iterator] = function () { - var currentNode = node; - while (currentNode && util_1.Guard.isExclusiveTextNode(currentNode._previousSibling)) { - currentNode = currentNode._previousSibling; + } + catch (e_7_1) { e_7 = { error: e_7_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } - return { - next: function () { - if (currentNode && (!self && currentNode === node)) { - if (util_1.Guard.isExclusiveTextNode(currentNode._nextSibling)) { - currentNode = currentNode._nextSibling; - } - else { - currentNode = null; - } - } - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - if (util_1.Guard.isExclusiveTextNode(currentNode._nextSibling)) { - currentNode = currentNode._nextSibling; - } - else { - currentNode = null; - } - return result; - } - } - }; - }, - _a; -} -exports.text_contiguousExclusiveTextNodes = text_contiguousExclusiveTextNodes; -/** - * Returns the concatenation of the data of all the Text node descendants of - * node, in tree order. - * - * @param node - a node - */ -function text_descendantTextContent(node) { - /** - * The descendant text content of a node node is the concatenation of the - * data of all the Text node descendants of node, in tree order. - */ - var contents = ''; - var text = TreeAlgorithm_1.tree_getFirstDescendantNode(node, false, false, function (e) { return util_1.Guard.isTextNode(e); }); - while (text !== null) { - contents += text._data; - text = TreeAlgorithm_1.tree_getNextDescendantNode(node, text, false, false, function (e) { return util_1.Guard.isTextNode(e); }); - } - return contents; -} -exports.text_descendantTextContent = text_descendantTextContent; -/** - * Splits data at the given offset and returns the remainder as a text - * node. - * - * @param node - a text node - * @param offset - the offset at which to split the nodes. - */ -function text_split(node, offset) { - var e_1, _a; + finally { if (e_7) throw e_7.error; } + } + return serializedDocument; + }; /** - * 1. Let length be node’s length. - * 2. If offset is greater than length, then throw an "IndexSizeError" - * DOMException. + * Produces an XML serialization of a document fragment node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - var length = node._data.length; - if (offset > length) { - throw new DOMException_1.IndexSizeError(); - } + XMLSerializerImpl.prototype._serializeDocumentFragment = function (node, requireWellFormed) { + var e_8, _a; + /** + * 1. Let markup the empty string. + * 2. For each child child of node, in tree order, run the XML serialization + * algorithm on the child given namespace, prefix map, a reference to prefix + * index, and flag require well-formed. Concatenate the result to markup. + * 3. Return the value of markup. + */ + var markup = ""; + try { + for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + markup += this._serializeNode(childNode, requireWellFormed); + } + } + catch (e_8_1) { e_8 = { error: e_8_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_8) throw e_8.error; } + } + return markup; + }; /** - * 3. Let count be length minus offset. - * 4. Let new data be the result of substringing data with node node, - * offset offset, and count count. - * 5. Let new node be a new Text node, with the same node document as node. - * Set new node’s data to new data. - * 6. Let parent be node’s parent. - * 7. If parent is not null, then: + * Produces an XML serialization of the attributes of an element node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance */ - var count = length - offset; - var newData = CharacterDataAlgorithm_1.characterData_substringData(node, offset, count); - var newNode = CreateAlgorithm_1.create_text(node._nodeDocument, newData); - var parent = node._parent; - if (parent !== null) { + XMLSerializerImpl.prototype._serializeAttributes = function (node, requireWellFormed) { + var e_9, _a; /** - * 7.1. Insert new node into parent before node’s next sibling. + * 1. Let result be the empty string. + * 2. Let localname set be a new empty namespace localname set. This + * localname set will contain tuples of unique attribute namespaceURI and + * localName pairs, and is populated as each attr is processed. This set is + * used to [optionally] enforce the well-formed constraint that an element + * cannot have two attributes with the same namespaceURI and localName. + * This can occur when two otherwise identical attributes on the same + * element differ only by their prefix values. */ - MutationAlgorithm_1.mutation_insert(newNode, parent, node._nextSibling); + var result = ""; + var localNameSet = requireWellFormed ? {} : undefined; try { /** - * 7.2. For each live range whose start node is node and start offset is - * greater than offset, set its start node to new node and decrease its - * start offset by offset. - * 7.3. For each live range whose end node is node and end offset is greater - * than offset, set its end node to new node and decrease its end offset - * by offset. - * 7.4. For each live range whose start node is parent and start offset is - * equal to the index of node plus 1, increase its start offset by 1. - * 7.5. For each live range whose end node is parent and end offset is equal - * to the index of node plus 1, increase its end offset by 1. + * 3. Loop: For each attribute attr in element's attributes, in the order + * they are specified in the element's attribute list: */ - for (var _b = __values(DOMImpl_1.dom.rangeList), _c = _b.next(); !_c.done; _c = _b.next()) { - var range = _c.value; - if (range._start[0] === node && range._start[1] > offset) { - range._start[0] = newNode; - range._start[1] -= offset; - } - if (range._end[0] === node && range._end[1] > offset) { - range._end[0] = newNode; - range._end[1] -= offset; - } - var index = TreeAlgorithm_1.tree_index(node); - if (range._start[0] === parent && range._start[1] === index + 1) { - range._start[1]++; + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + /** + * 3.1. If the require well-formed flag is set (its value is true), and the + * localname set contains a tuple whose values match those of a new tuple + * consisting of attr's namespaceURI attribute and localName attribute, + * then throw an exception; the serialization of this attr would fail to + * produce a well-formed element serialization. + */ + if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) { + throw new Error("Element contains duplicate attributes (well-formed required)."); } - if (range._end[0] === parent && range._end[1] === index + 1) { - range._end[1]++; + /** + * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and + * localName attribute, and add it to the localname set. + * 3.3. Let attribute namespace be the value of attr's namespaceURI value. + * 3.4. Let candidate prefix be null. + */ + if (requireWellFormed && localNameSet) + localNameSet[attr.localName] = true; + /** 3.5. If attribute namespace is not null, then run these sub-steps: */ + /** + * 3.6. Append a " " (U+0020 SPACE) to result. + * 3.7. If candidate prefix is not null, then append to result the + * concatenation of candidate prefix with ":" (U+003A COLON). + */ + /** + * 3.8. If the require well-formed flag is set (its value is true), and + * this attr's localName attribute contains the character + * ":" (U+003A COLON) or does not match the XML Name production or + * equals "xmlns" and attribute namespace is null, then throw an + * exception; the serialization of this attr would not be a + * well-formed attribute. + */ + if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(attr.localName))) { + throw new Error("Attribute local name contains invalid characters (well-formed required)."); } + /** + * 3.9. Append the following strings to result, in the order listed: + * 3.9.1. The value of attr's localName; + * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 3.9.3. The result of serializing an attribute value given attr's value + * attribute and the require well-formed flag as input; + * 3.9.4. """ (U+0022 QUOTATION MARK). + */ + result += " " + attr.localName + "=\"" + + this._serializeAttributeValue(attr.value, requireWellFormed) + "\""; } } - catch (e_1_1) { e_1 = { error: e_1_1 }; } + catch (e_9_1) { e_9 = { error: e_9_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } - finally { if (e_1) throw e_1.error; } + finally { if (e_9) throw e_9.error; } } + /** + * 4. Return the value of result. + */ + return result; + }; + XMLSerializerImpl._VoidElementNames = new Set(['area', 'base', 'basefont', + 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', + 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); + return XMLSerializerImpl; +}()); +exports.XMLSerializerImpl = XMLSerializerImpl; +//# sourceMappingURL=XMLSerializerImpl.js.map + +/***/ }), + +/***/ 87119: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +// Export classes +var XMLSerializerImpl_1 = __nccwpck_require__(85039); +exports.XMLSerializer = XMLSerializerImpl_1.XMLSerializerImpl; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 75483: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var Guard_1 = __nccwpck_require__(66862); +/** + * Contains type casts for DOM objects. + */ +var Cast = /** @class */ (function () { + function Cast() { } /** - * 8. Replace data with node node, offset offset, count count, and data - * the empty string. - * 9. Return new node. + * Casts the given object to a `Node`. + * + * @param a - the object to cast */ - CharacterDataAlgorithm_1.characterData_replaceData(node, offset, count, ''); - return newNode; -} -exports.text_split = text_split; -//# sourceMappingURL=TextAlgorithm.js.map + Cast.asNode = function (a) { + if (Guard_1.Guard.isNode(a)) { + return a; + } + else { + throw new Error("Invalid object. Node expected."); + } + }; + return Cast; +}()); +exports.Cast = Cast; +//# sourceMappingURL=Cast.js.map /***/ }), -/***/ 80998: +/***/ 88392: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var EmptySet = /** @class */ (function () { + function EmptySet() { + } + Object.defineProperty(EmptySet.prototype, "size", { + get: function () { + return 0; + }, + enumerable: true, + configurable: true + }); + EmptySet.prototype.add = function (value) { + throw new Error("Cannot add to an empty set."); + }; + EmptySet.prototype.clear = function () { + // no-op + }; + EmptySet.prototype.delete = function (value) { + return false; + }; + EmptySet.prototype.forEach = function (callbackfn, thisArg) { + // no-op + }; + EmptySet.prototype.has = function (value) { + return false; + }; + EmptySet.prototype[Symbol.iterator] = function () { + return new EmptySetIterator(); + }; + EmptySet.prototype.entries = function () { + return new EmptySetIterator(); + }; + EmptySet.prototype.keys = function () { + return new EmptySetIterator(); + }; + EmptySet.prototype.values = function () { + return new EmptySetIterator(); + }; + Object.defineProperty(EmptySet.prototype, Symbol.toStringTag, { + get: function () { + return "EmptySet"; + }, + enumerable: true, + configurable: true + }); + return EmptySet; +}()); +exports.EmptySet = EmptySet; +var EmptySetIterator = /** @class */ (function () { + function EmptySetIterator() { + } + EmptySetIterator.prototype[Symbol.iterator] = function () { + return this; + }; + EmptySetIterator.prototype.next = function () { + return { done: true, value: null }; + }; + return EmptySetIterator; +}()); +//# sourceMappingURL=EmptySet.js.map + +/***/ }), + +/***/ 66862: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var interfaces_1 = __nccwpck_require__(27305); -var DOMException_1 = __nccwpck_require__(13166); /** - * Applies the filter to the given node and returns the result. - * - * @param traverser - the `NodeIterator` or `TreeWalker` instance - * @param node - the node to filter + * Contains user-defined type guards for DOM objects. */ -function traversal_filter(traverser, node) { +var Guard = /** @class */ (function () { + function Guard() { + } /** - * 1. If traverser’s active flag is set, then throw an "InvalidStateError" - * DOMException. + * Determines if the given object is a `Node`. + * + * @param a - the object to check */ - if (traverser._activeFlag) { - throw new DOMException_1.InvalidStateError(); - } + Guard.isNode = function (a) { + return (!!a && a._nodeType !== undefined); + }; /** - * 2. Let n be node’s nodeType attribute value − 1. + * Determines if the given object is a `Document`. + * + * @param a - the object to check */ - var n = node._nodeType - 1; + Guard.isDocumentNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Document); + }; /** - * 3. If the nth bit (where 0 is the least significant bit) of traverser’s - * whatToShow is not set, then return FILTER_SKIP. + * Determines if the given object is a `DocumentType`. + * + * @param a - the object to check */ - var mask = 1 << n; - if ((traverser.whatToShow & mask) === 0) { - return interfaces_1.FilterResult.Skip; - } + Guard.isDocumentTypeNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.DocumentType); + }; /** - * 4. If traverser’s filter is null, then return FILTER_ACCEPT. + * Determines if the given object is a `DocumentFragment`. + * + * @param a - the object to check */ - if (!traverser.filter) { - return interfaces_1.FilterResult.Accept; - } + Guard.isDocumentFragmentNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.DocumentFragment); + }; /** - * 5. Set traverser’s active flag. + * Determines if the given object is a `Attr`. + * + * @param a - the object to check */ - traverser._activeFlag = true; + Guard.isAttrNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Attribute); + }; /** - * 6. Let result be the return value of call a user object’s operation with - * traverser’s filter, "acceptNode", and « node ». If this throws an - * exception, then unset traverser’s active flag and rethrow the exception. + * Determines if the given node is a `CharacterData` node. + * + * @param a - the object to check */ - var result = interfaces_1.FilterResult.Reject; - try { - result = traverser.filter.acceptNode(node); - } - catch (err) { - traverser._activeFlag = false; - throw err; - } + Guard.isCharacterDataNode = function (a) { + if (!Guard.isNode(a)) + return false; + var type = a._nodeType; + return (type === interfaces_1.NodeType.Text || + type === interfaces_1.NodeType.ProcessingInstruction || + type === interfaces_1.NodeType.Comment || + type === interfaces_1.NodeType.CData); + }; /** - * 7. Unset traverser’s active flag. - * 8. Return result. + * Determines if the given object is a `Text` or a `CDATASection`. + * + * @param a - the object to check */ - traverser._activeFlag = false; - return result; -} -exports.traversal_filter = traversal_filter; -//# sourceMappingURL=TraversalAlgorithm.js.map + Guard.isTextNode = function (a) { + return (Guard.isNode(a) && (a._nodeType === interfaces_1.NodeType.Text || a._nodeType === interfaces_1.NodeType.CData)); + }; + /** + * Determines if the given object is a `Text`. + * + * @param a - the object to check + */ + Guard.isExclusiveTextNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Text); + }; + /** + * Determines if the given object is a `CDATASection`. + * + * @param a - the object to check + */ + Guard.isCDATASectionNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.CData); + }; + /** + * Determines if the given object is a `Comment`. + * + * @param a - the object to check + */ + Guard.isCommentNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Comment); + }; + /** + * Determines if the given object is a `ProcessingInstruction`. + * + * @param a - the object to check + */ + Guard.isProcessingInstructionNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.ProcessingInstruction); + }; + /** + * Determines if the given object is an `Element`. + * + * @param a - the object to check + */ + Guard.isElementNode = function (a) { + return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Element); + }; + /** + * Determines if the given object is a custom `Element`. + * + * @param a - the object to check + */ + Guard.isCustomElementNode = function (a) { + return (Guard.isElementNode(a) && a._customElementState === "custom"); + }; + /** + * Determines if the given object is a `ShadowRoot`. + * + * @param a - the object to check + */ + Guard.isShadowRoot = function (a) { + return (!!a && a.host !== undefined); + }; + /** + * Determines if the given object is a `MouseEvent`. + * + * @param a - the object to check + */ + Guard.isMouseEvent = function (a) { + return (!!a && a.screenX !== undefined && a.screenY != undefined); + }; + /** + * Determines if the given object is a slotable. + * + * Element and Text nodes are slotables. A slotable has an associated name + * (a string). + * + * @param a - the object to check + */ + Guard.isSlotable = function (a) { + return (!!a && a._name !== undefined && a._assignedSlot !== undefined && + (Guard.isTextNode(a) || Guard.isElementNode(a))); + }; + /** + * Determines if the given object is a slot. + * + * @param a - the object to check + */ + Guard.isSlot = function (a) { + return (!!a && a._name !== undefined && a._assignedNodes !== undefined && + Guard.isElementNode(a)); + }; + /** + * Determines if the given object is a `Window`. + * + * @param a - the object to check + */ + Guard.isWindow = function (a) { + return (!!a && a.navigator !== undefined); + }; + /** + * Determines if the given object is an `EventListener`. + * + * @param a - the object to check + */ + Guard.isEventListener = function (a) { + return (!!a && a.handleEvent !== undefined); + }; + /** + * Determines if the given object is a `RegisteredObserver`. + * + * @param a - the object to check + */ + Guard.isRegisteredObserver = function (a) { + return (!!a && a.observer !== undefined && a.options !== undefined); + }; + /** + * Determines if the given object is a `TransientRegisteredObserver`. + * + * @param a - the object to check + */ + Guard.isTransientRegisteredObserver = function (a) { + return (!!a && a.source !== undefined && Guard.isRegisteredObserver(a)); + }; + return Guard; +}()); +exports.Guard = Guard; +//# sourceMappingURL=Guard.js.map /***/ }), -/***/ 16620: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 65282: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(65282); -var interfaces_1 = __nccwpck_require__(27305); -/** - * Gets the next descendant of the given node of the tree rooted at `root` - * in depth-first pre-order. - * - * @param root - root node of the tree - * @param node - a node - * @param shadow - whether to visit shadow tree nodes - */ -function _getNextDescendantNode(root, node, shadow) { - if (shadow === void 0) { shadow = false; } - // traverse shadow tree - if (shadow && util_1.Guard.isElementNode(node) && util_1.Guard.isShadowRoot(node.shadowRoot)) { - if (node.shadowRoot._firstChild) - return node.shadowRoot._firstChild; - } - // traverse child nodes - if (node._firstChild) - return node._firstChild; - if (node === root) - return null; - // traverse siblings - if (node._nextSibling) - return node._nextSibling; - // traverse parent's next sibling - var parent = node._parent; - while (parent && parent !== root) { - if (parent._nextSibling) - return parent._nextSibling; - parent = parent._parent; - } - return null; -} -function _emptyIterator() { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - return { - next: function () { - return { done: true, value: null }; - } - }; - }, - _a; -} -/** - * Returns the first descendant node of the tree rooted at `node` in - * depth-first pre-order. - * - * @param node - root node of the tree - * @param self - whether to include `node` in traversal - * @param shadow - whether to visit shadow tree nodes - * @param filter - a function to filter nodes - */ -function tree_getFirstDescendantNode(node, self, shadow, filter) { - if (self === void 0) { self = false; } - if (shadow === void 0) { shadow = false; } - var firstNode = (self ? node : _getNextDescendantNode(node, node, shadow)); - while (firstNode && filter && !filter(firstNode)) { - firstNode = _getNextDescendantNode(node, firstNode, shadow); - } - return firstNode; -} -exports.tree_getFirstDescendantNode = tree_getFirstDescendantNode; -/** - * Returns the next descendant node of the tree rooted at `node` in - * depth-first pre-order. - * - * @param node - root node of the tree - * @param currentNode - current descendant node - * @param self - whether to include `node` in traversal - * @param shadow - whether to visit shadow tree nodes - * @param filter - a function to filter nodes - */ -function tree_getNextDescendantNode(node, currentNode, self, shadow, filter) { - if (self === void 0) { self = false; } - if (shadow === void 0) { shadow = false; } - var nextNode = _getNextDescendantNode(node, currentNode, shadow); - while (nextNode && filter && !filter(nextNode)) { - nextNode = _getNextDescendantNode(node, nextNode, shadow); - } - return nextNode; -} -exports.tree_getNextDescendantNode = tree_getNextDescendantNode; -/** - * Traverses through all descendant nodes of the tree rooted at - * `node` in depth-first pre-order. - * - * @param node - root node of the tree - * @param self - whether to include `node` in traversal - * @param shadow - whether to visit shadow tree nodes - * @param filter - a function to filter nodes - */ -function tree_getDescendantNodes(node, self, shadow, filter) { - var _a; - if (self === void 0) { self = false; } - if (shadow === void 0) { shadow = false; } - if (!self && node._children.size === 0) { - return _emptyIterator(); - } - return _a = {}, - _a[Symbol.iterator] = function () { - var currentNode = (self ? node : _getNextDescendantNode(node, node, shadow)); - return { - next: function () { - while (currentNode && filter && !filter(currentNode)) { - currentNode = _getNextDescendantNode(node, currentNode, shadow); - } - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - currentNode = _getNextDescendantNode(node, currentNode, shadow); - return result; - } - } - }; - }, - _a; -} -exports.tree_getDescendantNodes = tree_getDescendantNodes; -/** - * Traverses through all descendant element nodes of the tree rooted at - * `node` in depth-first preorder. - * - * @param node - root node of the tree - * @param self - whether to include `node` in traversal - * @param shadow - whether to visit shadow tree nodes - * @param filter - a function to filter nodes - */ -function tree_getDescendantElements(node, self, shadow, filter) { - var _a; - if (self === void 0) { self = false; } - if (shadow === void 0) { shadow = false; } - if (!self && node._children.size === 0) { - return _emptyIterator(); - } - return _a = {}, - _a[Symbol.iterator] = function () { - var it = tree_getDescendantNodes(node, self, shadow, function (e) { return util_1.Guard.isElementNode(e); })[Symbol.iterator](); - var currentNode = it.next().value; - return { - next: function () { - while (currentNode && filter && !filter(currentNode)) { - currentNode = it.next().value; - } - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - currentNode = it.next().value; - return result; - } - } - }; - }, - _a; -} -exports.tree_getDescendantElements = tree_getDescendantElements; -/** - * Traverses through all sibling nodes of `node`. - * - * @param node - root node of the tree - * @param self - whether to include `node` in traversal - * @param filter - a function to filter nodes - */ -function tree_getSiblingNodes(node, self, filter) { - var _a; - if (self === void 0) { self = false; } - if (!node._parent || node._parent._children.size === 0) { - return _emptyIterator(); - } - return _a = {}, - _a[Symbol.iterator] = function () { - var currentNode = node._parent ? node._parent._firstChild : null; - return { - next: function () { - while (currentNode && (filter && !filter(currentNode) || (!self && currentNode === node))) { - currentNode = currentNode._nextSibling; - } - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - currentNode = currentNode._nextSibling; - return result; - } - } - }; - }, - _a; -} -exports.tree_getSiblingNodes = tree_getSiblingNodes; -/** - * Gets the first ancestor of `node` in reverse tree order. - * - * @param node - root node of the tree - * @param self - whether to include `node` in traversal - * @param filter - a function to filter nodes - */ -function tree_getFirstAncestorNode(node, self, filter) { - if (self === void 0) { self = false; } - var firstNode = self ? node : node._parent; - while (firstNode && filter && !filter(firstNode)) { - firstNode = firstNode._parent; - } - return firstNode; -} -exports.tree_getFirstAncestorNode = tree_getFirstAncestorNode; -/** - * Gets the first ancestor of `node` in reverse tree order. - * - * @param node - root node of the tree - * @param self - whether to include `node` in traversal - * @param filter - a function to filter nodes - */ -function tree_getNextAncestorNode(node, currentNode, self, filter) { - if (self === void 0) { self = false; } - var nextNode = currentNode._parent; - while (nextNode && filter && !filter(nextNode)) { - nextNode = nextNode._parent; - } - return nextNode; -} -exports.tree_getNextAncestorNode = tree_getNextAncestorNode; +var Cast_1 = __nccwpck_require__(75483); +exports.Cast = Cast_1.Cast; +var Guard_1 = __nccwpck_require__(66862); +exports.Guard = Guard_1.Guard; +var EmptySet_1 = __nccwpck_require__(88392); +exports.EmptySet = EmptySet_1.EmptySet; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 28585: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var CodePoints_1 = __nccwpck_require__(28548); /** - * Traverses through all ancestor nodes `node` in reverse tree order. + * Base-64 encodes the given string. * - * @param node - root node of the tree - * @param self - whether to include `node` in traversal - * @param filter - a function to filter nodes + * @param input - a string */ -function tree_getAncestorNodes(node, self, filter) { - var _a; - if (self === void 0) { self = false; } - if (!self && !node._parent) { - return _emptyIterator(); - } - return _a = {}, - _a[Symbol.iterator] = function () { - var currentNode = tree_getFirstAncestorNode(node, self, filter); - return { - next: function () { - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - currentNode = tree_getNextAncestorNode(node, currentNode, self, filter); - return result; - } - } - }; - }, - _a; +function forgivingBase64Encode(input) { + /** + * To forgiving-base64 encode given a byte sequence data, apply the base64 + * algorithm defined in section 4 of RFC 4648 to data and return the result. + * [RFC4648] + */ + return Buffer.from(input).toString('base64'); } -exports.tree_getAncestorNodes = tree_getAncestorNodes; +exports.forgivingBase64Encode = forgivingBase64Encode; /** - * Returns the common ancestor of the given nodes. + * Decodes a base-64 string. * - * @param nodeA - a node - * @param nodeB - a node + * @param input - a string */ -function tree_getCommonAncestor(nodeA, nodeB) { - if (nodeA === nodeB) { - return nodeA._parent; - } - // lists of parent nodes - var parentsA = []; - var parentsB = []; - var pA = tree_getFirstAncestorNode(nodeA, true); - while (pA !== null) { - parentsA.push(pA); - pA = tree_getNextAncestorNode(nodeA, pA, true); - } - var pB = tree_getFirstAncestorNode(nodeB, true); - while (pB !== null) { - parentsB.push(pB); - pB = tree_getNextAncestorNode(nodeB, pB, true); - } - // walk through parents backwards until they differ - var pos1 = parentsA.length; - var pos2 = parentsB.length; - var parent = null; - for (var i = Math.min(pos1, pos2); i > 0; i--) { - var parent1 = parentsA[--pos1]; - var parent2 = parentsB[--pos2]; - if (parent1 !== parent2) { - break; +function forgivingBase64Decode(input) { + if (input === "") + return ""; + /** + * 1. Remove all ASCII whitespace from data. + */ + input = input.replace(CodePoints_1.ASCIIWhiteSpace, ''); + /** + * 2. If data’s length divides by 4 leaving no remainder, then: + * 2.1. If data ends with one or two U+003D (=) code points, then remove them from data. + */ + if (input.length % 4 === 0) { + if (input.endsWith("==")) { + input = input.substr(0, input.length - 2); } - parent = parent1; - } - return parent; -} -exports.tree_getCommonAncestor = tree_getCommonAncestor; -/** - * Returns the node following `node` in depth-first preorder. - * - * @param root - root of the subtree - * @param node - a node - */ -function tree_getFollowingNode(root, node) { - if (node._firstChild) { - return node._firstChild; - } - else if (node._nextSibling) { - return node._nextSibling; - } - else { - while (true) { - var parent = node._parent; - if (parent === null || parent === root) { - return null; - } - else if (parent._nextSibling) { - return parent._nextSibling; - } - else { - node = parent; - } + else if (input.endsWith("=")) { + input = input.substr(0, input.length - 1); } } -} -exports.tree_getFollowingNode = tree_getFollowingNode; -/** - * Returns the node preceding `node` in depth-first preorder. - * - * @param root - root of the subtree - * @param node - a node - */ -function tree_getPrecedingNode(root, node) { - if (node === root) { + /** + * 3. If data’s length divides by 4 leaving a remainder of 1, then return failure. + */ + if (input.length % 4 === 1) return null; - } - if (node._previousSibling) { - node = node._previousSibling; - if (node._lastChild) { - return node._lastChild; - } - else { - return node; - } - } - else { - return node._parent; - } + /** + * 4. If data contains a code point that is not one of + * - U+002B (+) + * - U+002F (/) + * - ASCII alphanumeric + * then return failure. + */ + if (!/[0-9A-Za-z+/]/.test(input)) + return null; + /** + * 5. Let output be an empty byte sequence. + * 6. Let buffer be an empty buffer that can have bits appended to it. + * 7. Let position be a position variable for data, initially pointing at the + * start of data. + * 8. While position does not point past the end of data: + * 8.1. Find the code point pointed to by position in the second column of + * Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in the + * first cell of the same row. [RFC4648] + * 8.2. Append the six bits corresponding to n, most significant bit first, + * to buffer. + * 8.3. If buffer has accumulated 24 bits, interpret them as three 8-bit + * big-endian numbers. Append three bytes with values equal to those numbers + * to output, in the same order, and then empty buffer. + * 8.4. Advance position by 1. + * 9. If buffer is not empty, it contains either 12 or 18 bits. If it contains + * 12 bits, then discard the last four and interpret the remaining eight as an + * 8-bit big-endian number. If it contains 18 bits, then discard the last two + * and interpret the remaining 16 as two 8-bit big-endian numbers. Append the + * one or two bytes with values equal to those one or two numbers to output, + * in the same order. + * 10. Return output. + */ + return Buffer.from(input, 'base64').toString('utf8'); } -exports.tree_getPrecedingNode = tree_getPrecedingNode; +exports.forgivingBase64Decode = forgivingBase64Decode; +//# sourceMappingURL=Base64.js.map + +/***/ }), + +/***/ 42460: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /** - * Determines if the node tree is constrained. A node tree is - * constrained as follows, expressed as a relationship between the - * type of node and its allowed children: - * - Document (In tree order) - * * Zero or more nodes each of which is ProcessingInstruction - * or Comment. - * * Optionally one DocumentType node. - * * Zero or more nodes each of which is ProcessingInstruction - * or Comment. - * * Optionally one Element node. - * * Zero or more nodes each of which is ProcessingInstruction - * or Comment. - * - DocumentFragment, Element - * * Zero or more nodes each of which is Element, Text, - * ProcessingInstruction, or Comment. - * - DocumentType, Text, ProcessingInstruction, Comment - * * None. + * Determines if the given number is an ASCII byte. * - * @param node - the root of the tree + * @param byte - a byte */ -function tree_isConstrained(node) { - var e_1, _a, e_2, _b, e_3, _c; - switch (node._nodeType) { - case interfaces_1.NodeType.Document: - var hasDocType = false; - var hasElement = false; - try { - for (var _d = __values(node._children), _e = _d.next(); !_e.done; _e = _d.next()) { - var childNode = _e.value; - switch (childNode._nodeType) { - case interfaces_1.NodeType.ProcessingInstruction: - case interfaces_1.NodeType.Comment: - break; - case interfaces_1.NodeType.DocumentType: - if (hasDocType || hasElement) - return false; - hasDocType = true; - break; - case interfaces_1.NodeType.Element: - if (hasElement) - return false; - hasElement = true; - break; - default: - return false; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_e && !_e.done && (_a = _d.return)) _a.call(_d); - } - finally { if (e_1) throw e_1.error; } - } - break; - case interfaces_1.NodeType.DocumentFragment: - case interfaces_1.NodeType.Element: - try { - for (var _f = __values(node._children), _g = _f.next(); !_g.done; _g = _f.next()) { - var childNode = _g.value; - switch (childNode._nodeType) { - case interfaces_1.NodeType.Element: - case interfaces_1.NodeType.Text: - case interfaces_1.NodeType.ProcessingInstruction: - case interfaces_1.NodeType.CData: - case interfaces_1.NodeType.Comment: - break; - default: - return false; - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_g && !_g.done && (_b = _f.return)) _b.call(_f); - } - finally { if (e_2) throw e_2.error; } - } - break; - case interfaces_1.NodeType.DocumentType: - case interfaces_1.NodeType.Text: - case interfaces_1.NodeType.ProcessingInstruction: - case interfaces_1.NodeType.CData: - case interfaces_1.NodeType.Comment: - return (!node.hasChildNodes()); - } +function isASCIIByte(byte) { + /** + * An ASCII byte is a byte in the range 0x00 (NUL) to 0x7F (DEL), inclusive. + */ + return byte >= 0x00 && byte <= 0x7F; +} +exports.isASCIIByte = isASCIIByte; +//# sourceMappingURL=Byte.js.map + +/***/ }), + +/***/ 71627: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; try { - for (var _h = __values(node._children), _j = _h.next(); !_j.done; _j = _h.next()) { - var childNode = _j.value; - // recursively check child nodes - if (!tree_isConstrained(childNode)) - return false; - } + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } - catch (e_3_1) { e_3 = { error: e_3_1 }; } + catch (error) { e = { error: error }; } finally { try { - if (_j && !_j.done && (_c = _h.return)) _c.call(_h); - } - finally { if (e_3) throw e_3.error; } - } - return true; -} -exports.tree_isConstrained = tree_isConstrained; -/** - * Returns the length of a node. - * - * @param node - a node to check - */ -function tree_nodeLength(node) { - /** - * To determine the length of a node node, switch on node: - * - DocumentType - * Zero. - * - Text - * - ProcessingInstruction - * - Comment - * Its data’s length. - * - Any other node - * Its number of children. - */ - if (util_1.Guard.isDocumentTypeNode(node)) { - return 0; - } - else if (util_1.Guard.isCharacterDataNode(node)) { - return node._data.length; - } - else { - return node._children.size; + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } -} -exports.tree_nodeLength = tree_nodeLength; + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); /** - * Determines if a node is empty. + * Returns the count of bytes in a sequence. * - * @param node - a node to check + * @param list - a byte sequence */ -function tree_isEmpty(node) { +function length(list) { /** - * A node is considered empty if its length is zero. - */ - return (tree_nodeLength(node) === 0); + * A byte sequence’s length is the number of bytes it contains. + */ + return list.length; } -exports.tree_isEmpty = tree_isEmpty; +exports.length = length; /** - * Returns the root node of a tree. The root of an object is itself, - * if its parent is `null`, or else it is the root of its parent. - * The root of a tree is any object participating in that tree - * whose parent is `null`. + * Converts each byte to lowercase. * - * @param node - a node of the tree - * @param shadow - `true` to return shadow-including root, otherwise - * `false` + * @param list - a byte sequence */ -function tree_rootNode(node, shadow) { - if (shadow === void 0) { shadow = false; } +function byteLowercase(list) { /** - * The root of an object is itself, if its parent is null, or else it is the - * root of its parent. The root of a tree is any object participating in - * that tree whose parent is null. - */ - if (shadow) { - var root = tree_rootNode(node, false); - if (util_1.Guard.isShadowRoot(root)) - return tree_rootNode(root._host, true); - else - return root; - } - else { - if (!node._parent) - return node; - else - return tree_rootNode(node._parent); + * To byte-lowercase a byte sequence, increase each byte it contains, in the + * range 0x41 (A) to 0x5A (Z), inclusive, by 0x20. + */ + for (var i = 0; i < list.length; i++) { + var c = list[i]; + if (c >= 0x41 && c <= 0x5A) { + list[i] = c + 0x20; + } } } -exports.tree_rootNode = tree_rootNode; +exports.byteLowercase = byteLowercase; /** - * Determines whether `other` is a descendant of `node`. An object - * A is called a descendant of an object B, if either A is a child - * of B or A is a child of an object C that is a descendant of B. + * Converts each byte to uppercase. * - * @param node - a node - * @param other - the node to check - * @param self - if `true`, traversal includes `node` itself - * @param shadow - if `true`, traversal includes the - * node's and its descendant's shadow trees as well. + * @param list - a byte sequence */ -function tree_isDescendantOf(node, other, self, shadow) { - if (self === void 0) { self = false; } - if (shadow === void 0) { shadow = false; } +function byteUppercase(list) { /** - * An object A is called a descendant of an object B, if either A is a - * child of B or A is a child of an object C that is a descendant of B. - * - * An inclusive descendant is an object or one of its descendants. - */ - var child = tree_getFirstDescendantNode(node, self, shadow); - while (child !== null) { - if (child === other) { - return true; + * To byte-uppercase a byte sequence, subtract each byte it contains, in the + * range 0x61 (a) to 0x7A (z), inclusive, by 0x20. + */ + for (var i = 0; i < list.length; i++) { + var c = list[i]; + if (c >= 0x61 && c <= 0x7A) { + list[i] = c - 0x20; } - child = tree_getNextDescendantNode(node, child, self, shadow); } - return false; } -exports.tree_isDescendantOf = tree_isDescendantOf; +exports.byteUppercase = byteUppercase; /** - * Determines whether `other` is an ancestor of `node`. An object A - * is called an ancestor of an object B if and only if B is a - * descendant of A. + * Compares two byte sequences. * - * @param node - a node - * @param other - the node to check - * @param self - if `true`, traversal includes `node` itself - * @param shadow - if `true`, traversal includes the - * node's and its descendant's shadow trees as well. + * @param listA - a byte sequence + * @param listB - a byte sequence */ -function tree_isAncestorOf(node, other, self, shadow) { - if (self === void 0) { self = false; } - if (shadow === void 0) { shadow = false; } - var ancestor = self ? node : shadow && util_1.Guard.isShadowRoot(node) ? - node._host : node._parent; - while (ancestor !== null) { - if (ancestor === other) - return true; - ancestor = shadow && util_1.Guard.isShadowRoot(ancestor) ? - ancestor._host : ancestor._parent; +function byteCaseInsensitiveMatch(listA, listB) { + /** + * A byte sequence A is a byte-case-insensitive match for a byte sequence B, + * if the byte-lowercase of A is the byte-lowercase of B. + */ + if (listA.length !== listB.length) + return false; + for (var i = 0; i < listA.length; i++) { + var a = listA[i]; + var b = listB[i]; + if (a >= 0x41 && a <= 0x5A) + a += 0x20; + if (b >= 0x41 && b <= 0x5A) + b += 0x20; + if (a !== b) + return false; } - return false; + return true; } -exports.tree_isAncestorOf = tree_isAncestorOf; +exports.byteCaseInsensitiveMatch = byteCaseInsensitiveMatch; /** - * Determines whether `other` is a host-including ancestor of `node`. An - * object A is a host-including inclusive ancestor of an object B, if either - * A is an inclusive ancestor of B, or if B’s root has a non-null host and - * A is a host-including inclusive ancestor of B’s root’s host. + * Determines if `listA` starts with `listB`. * - * @param node - a node - * @param other - the node to check - * @param self - if `true`, traversal includes `node` itself + * @param listA - a byte sequence + * @param listB - a byte sequence */ -function tree_isHostIncludingAncestorOf(node, other, self) { - if (self === void 0) { self = false; } - if (tree_isAncestorOf(node, other, self)) - return true; - var root = tree_rootNode(node); - if (util_1.Guard.isDocumentFragmentNode(root) && root._host !== null && - tree_isHostIncludingAncestorOf(root._host, other, self)) - return true; - return false; +function startsWith(listA, listB) { + /** + * 1. Let i be 0. + * 2. While true: + * 2.1. Let aByte be the ith byte of a if i is less than a’s length; otherwise null. + * 2.3. Let bByte be the ith byte of b if i is less than b’s length; otherwise null. + * 2.4. If bByte is null, then return true. + * 2.5. Return false if aByte is not bByte. + * 2.6. Set i to i + 1. + */ + var i = 0; + while (true) { + if (i >= listA.length) + return false; + if (i >= listB.length) + return true; + if (listA[i] !== listB[i]) + return false; + i++; + } } -exports.tree_isHostIncludingAncestorOf = tree_isHostIncludingAncestorOf; +exports.startsWith = startsWith; /** - * Determines whether `other` is a sibling of `node`. An object A is - * called a sibling of an object B, if and only if B and A share - * the same non-null parent. + * Determines if `listA` is less than `listB`. * - * @param node - a node - * @param other - the node to check - * @param self - if `true`, traversal includes `node` itself + * @param listA - a byte sequence + * @param listB - a byte sequence */ -function tree_isSiblingOf(node, other, self) { - if (self === void 0) { self = false; } +function byteLessThan(listA, listB) { /** - * An object A is called a sibling of an object B, if and only if B and A - * share the same non-null parent. - * - * An inclusive sibling is an object or one of its siblings. - */ - if (node === other) { - if (self) + * 1. If b starts with a, then return false. + * 2. If a starts with b, then return true. + * 3. Let n be the smallest index such that the nth byte of a is different + * from the nth byte of b. (There has to be such an index, since neither byte + * sequence starts with the other.) + * 4. If the nth byte of a is less than the nth byte of b, then return true. + * 5. Return false. + */ + var i = 0; + while (true) { + if (i >= listA.length) + return false; + if (i >= listB.length) return true; + var a = listA[i]; + var b = listB[i]; + if (a < b) + return true; + else if (a > b) + return false; + i++; } - else { - return (node._parent !== null && node._parent === other._parent); - } - return false; } -exports.tree_isSiblingOf = tree_isSiblingOf; +exports.byteLessThan = byteLessThan; /** - * Determines whether `other` is preceding `node`. An object A is - * preceding an object B if A and B are in the same tree and A comes - * before B in tree order. + * Decodes a byte sequence into a string. * - * @param node - a node - * @param other - the node to check + * @param list - a byte sequence */ -function tree_isPreceding(node, other) { +function isomorphicDecode(list) { /** - * An object A is preceding an object B if A and B are in the same tree and - * A comes before B in tree order. - */ - var nodePos = tree_treePosition(node); - var otherPos = tree_treePosition(other); - if (nodePos === -1 || otherPos === -1) - return false; - else if (tree_rootNode(node) !== tree_rootNode(other)) - return false; - else - return otherPos < nodePos; + * To isomorphic decode a byte sequence input, return a string whose length is + * equal to input’s length and whose code points have the same values as + * input’s bytes, in the same order. + */ + return String.fromCodePoint.apply(String, __spread(list)); } -exports.tree_isPreceding = tree_isPreceding; +exports.isomorphicDecode = isomorphicDecode; +//# sourceMappingURL=ByteSequence.js.map + +/***/ }), + +/***/ 28548: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /** - * Determines whether `other` is following `node`. An object A is - * following an object B if A and B are in the same tree and A comes - * after B in tree order. + * A surrogate is a code point that is in the range U+D800 to U+DFFF, inclusive. + */ +exports.Surrogate = /[\uD800-\uDFFF]/; +/** + * A scalar value is a code point that is not a surrogate. + */ +exports.ScalarValue = /[\uD800-\uDFFF]/; +/** + * A noncharacter is a code point that is in the range U+FDD0 to U+FDEF, + * inclusive, or U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE, + * U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, + * U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE, + * U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE, + * U+FFFFF, U+10FFFE, or U+10FFFF. + */ +exports.NonCharacter = /[\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]/; +/** + * An ASCII code point is a code point in the range U+0000 NULL to U+007F + * DELETE, inclusive. + */ +exports.ASCIICodePoint = /[\u0000-\u007F]/; +/** + * An ASCII tab or newline is U+0009 TAB, U+000A LF, or U+000D CR. + */ +exports.ASCIITabOrNewLine = /[\t\n\r]/; +/** + * ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or + * U+0020 SPACE. + */ +exports.ASCIIWhiteSpace = /[\t\n\f\r ]/; +/** + * A C0 control is a code point in the range U+0000 NULL to U+001F + * INFORMATION SEPARATOR ONE, inclusive. + */ +exports.C0Control = /[\u0000-\u001F]/; +/** + * A C0 control or space is a C0 control or U+0020 SPACE. + */ +exports.C0ControlOrSpace = /[\u0000-\u001F ]/; +/** + * A control is a C0 control or a code point in the range U+007F DELETE to + * U+009F APPLICATION PROGRAM COMMAND, inclusive. + */ +exports.Control = /[\u0000-\u001F\u007F-\u009F]/; +/** + * An ASCII digit is a code point in the range U+0030 (0) to U+0039 (9), + * inclusive. + */ +exports.ASCIIDigit = /[0-9]/; +/** + * An ASCII upper hex digit is an ASCII digit or a code point in the range + * U+0041 (A) to U+0046 (F), inclusive. + */ +exports.ASCIIUpperHexDigit = /[0-9A-F]/; +/** + * An ASCII lower hex digit is an ASCII digit or a code point in the range + * U+0061 (a) to U+0066 (f), inclusive. + */ +exports.ASCIILowerHexDigit = /[0-9a-f]/; +/** + * An ASCII hex digit is an ASCII upper hex digit or ASCII lower hex digit. + */ +exports.ASCIIHexDigit = /[0-9A-Fa-f]/; +/** + * An ASCII upper alpha is a code point in the range U+0041 (A) to U+005A (Z), + * inclusive. + */ +exports.ASCIIUpperAlpha = /[A-Z]/; +/** + * An ASCII lower alpha is a code point in the range U+0061 (a) to U+007A (z), + * inclusive. + */ +exports.ASCIILowerAlpha = /[a-z]/; +/** + * An ASCII alpha is an ASCII upper alpha or ASCII lower alpha. + */ +exports.ASCIIAlpha = /[A-Za-z]/; +/** + * An ASCII alphanumeric is an ASCII digit or ASCII alpha. + */ +exports.ASCIIAlphanumeric = /[0-9A-Za-z]/; +//# sourceMappingURL=CodePoints.js.map + +/***/ }), + +/***/ 99387: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +/** + * Parses the given byte sequence representing a JSON string into an object. * - * @param node - a node - * @param other - the node to check + * @param bytes - a byte sequence */ -function tree_isFollowing(node, other) { +function parseJSONFromBytes(bytes) { /** - * An object A is following an object B if A and B are in the same tree and - * A comes after B in tree order. - */ - var nodePos = tree_treePosition(node); - var otherPos = tree_treePosition(other); - if (nodePos === -1 || otherPos === -1) - return false; - else if (tree_rootNode(node) !== tree_rootNode(other)) - return false; - else - return otherPos > nodePos; + * 1. Let jsonText be the result of running UTF-8 decode on bytes. [ENCODING] + * 2. Return ? Call(%JSONParse%, undefined, « jsonText »). + */ + var jsonText = util_1.utf8Decode(bytes); + return JSON.parse.call(undefined, jsonText); } -exports.tree_isFollowing = tree_isFollowing; +exports.parseJSONFromBytes = parseJSONFromBytes; /** - * Determines whether `other` is the parent node of `node`. + * Serialize the given JavaScript value into a byte sequence. * - * @param node - a node - * @param other - the node to check + * @param value - a JavaScript value */ -function tree_isParentOf(node, other) { +function serializeJSONToBytes(value) { /** - * An object that participates in a tree has a parent, which is either - * null or an object, and has children, which is an ordered set of objects. - * An object A whose parent is object B is a child of B. - */ - return (node._parent === other); + * 1. Let jsonString be ? Call(%JSONStringify%, undefined, « value »). + * 2. Return the result of running UTF-8 encode on jsonString. [ENCODING] + */ + var jsonString = JSON.stringify.call(undefined, value); + return util_1.utf8Encode(jsonString); } -exports.tree_isParentOf = tree_isParentOf; +exports.serializeJSONToBytes = serializeJSONToBytes; /** - * Determines whether `other` is a child node of `node`. + * Parses the given JSON string into a Realm-independent JavaScript value. * - * @param node - a node - * @param other - the node to check + * @param jsonText - a JSON string */ -function tree_isChildOf(node, other) { +function parseJSONIntoInfraValues(jsonText) { /** - * An object that participates in a tree has a parent, which is either - * null or an object, and has children, which is an ordered set of objects. - * An object A whose parent is object B is a child of B. - */ - return (other._parent === node); + * 1. Let jsValue be ? Call(%JSONParse%, undefined, « jsonText »). + * 2. Return the result of converting a JSON-derived JavaScript value to an + * Infra value, given jsValue. + */ + var jsValue = JSON.parse.call(undefined, jsonText); + return convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValue); } -exports.tree_isChildOf = tree_isChildOf; +exports.parseJSONIntoInfraValues = parseJSONIntoInfraValues; /** - * Returns the previous sibling node of `node` or null if it has no - * preceding sibling. + * Parses the value into a Realm-independent JavaScript value. * - * @param node + * @param jsValue - a JavaScript value */ -function tree_previousSibling(node) { +function convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValue) { + var e_1, _a; /** - * The previous sibling of an object is its first preceding sibling or null - * if it has no preceding sibling. - */ - return node._previousSibling; + * 1. If Type(jsValue) is Null, String, or Number, then return jsValue. + */ + if (jsValue === null || util_1.isString(jsValue) || util_1.isNumber(jsValue)) + return jsValue; + /** + * 2. If IsArray(jsValue) is true, then: + * 2.1. Let result be an empty list. + * 2.2. Let length be ! ToLength(! Get(jsValue, "length")). + * 2.3. For each index of the range 0 to length − 1, inclusive: + * 2.3.1. Let indexName be ! ToString(index). + * 2.3.2. Let jsValueAtIndex be ! Get(jsValue, indexName). + * 2.3.3. Let infraValueAtIndex be the result of converting a JSON-derived + * JavaScript value to an Infra value, given jsValueAtIndex. + * 2.3.4. Append infraValueAtIndex to result. + * 2.8. Return result. + */ + if (util_1.isArray(jsValue)) { + var result = new Array(); + try { + for (var jsValue_1 = __values(jsValue), jsValue_1_1 = jsValue_1.next(); !jsValue_1_1.done; jsValue_1_1 = jsValue_1.next()) { + var jsValueAtIndex = jsValue_1_1.value; + result.push(convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValueAtIndex)); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (jsValue_1_1 && !jsValue_1_1.done && (_a = jsValue_1.return)) _a.call(jsValue_1); + } + finally { if (e_1) throw e_1.error; } + } + return result; + } + else if (util_1.isObject(jsValue)) { + /** + * 3. Let result be an empty ordered map. + * 4. For each key of ! jsValue.[[OwnPropertyKeys]](): + * 4.1. Let jsValueAtKey be ! Get(jsValue, key). + * 4.2. Let infraValueAtKey be the result of converting a JSON-derived + * JavaScript value to an Infra value, given jsValueAtKey. + * 4.3. Set result[key] to infraValueAtKey. + * 5. Return result. + */ + var result = new Map(); + for (var key in jsValue) { + /* istanbul ignore else */ + if (jsValue.hasOwnProperty(key)) { + var jsValueAtKey = jsValue[key]; + result.set(key, convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValueAtKey)); + } + } + return result; + } + /* istanbul ignore next */ + return jsValue; } -exports.tree_previousSibling = tree_previousSibling; +exports.convertAJSONDerivedJavaScriptValueToAnInfraValue = convertAJSONDerivedJavaScriptValueToAnInfraValue; +//# sourceMappingURL=JSON.js.map + +/***/ }), + +/***/ 20340: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); /** - * Returns the next sibling node of `node` or null if it has no - * following sibling. + * Adds the given item to the end of the list. * - * @param node + * @param list - a list + * @param item - an item */ -function tree_nextSibling(node) { - /** - * The next sibling of an object is its first following sibling or null - * if it has no following sibling. - */ - return node._nextSibling; +function append(list, item) { + list.push(item); } -exports.tree_nextSibling = tree_nextSibling; +exports.append = append; /** - * Returns the first child node of `node` or null if it has no - * children. + * Extends a list by appending all items from another list. * - * @param node + * @param listA - a list to extend + * @param listB - a list containing items to append to `listA` */ -function tree_firstChild(node) { - /** - * The first child of an object is its first child or null if it has no - * children. - */ - return node._firstChild; +function extend(listA, listB) { + listA.push.apply(listA, __spread(listB)); } -exports.tree_firstChild = tree_firstChild; +exports.extend = extend; /** - * Returns the last child node of `node` or null if it has no - * children. + * Inserts the given item to the start of the list. * - * @param node + * @param list - a list + * @param item - an item */ -function tree_lastChild(node) { - /** - * The last child of an object is its last child or null if it has no - * children. - */ - return node._lastChild; +function prepend(list, item) { + list.unshift(item); } -exports.tree_lastChild = tree_lastChild; +exports.prepend = prepend; /** - * Returns the zero-based index of `node` when counted preorder in - * the tree rooted at `root`. Returns `-1` if `node` is not in - * the tree. + * Replaces the given item or all items matching condition with a new item. * - * @param node - the node to get the index of + * @param list - a list + * @param conditionOrItem - an item to replace or a condition matching items + * to replace + * @param item - an item */ -function tree_treePosition(node) { - var root = tree_rootNode(node); - var pos = 0; - var childNode = tree_getFirstDescendantNode(root); - while (childNode !== null) { - pos++; - if (childNode === node) - return pos; - childNode = tree_getNextDescendantNode(root, childNode); +function replace(list, conditionOrItem, newItem) { + var e_1, _a; + var i = 0; + try { + for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) { + var oldItem = list_1_1.value; + if (util_1.isFunction(conditionOrItem)) { + if (!!conditionOrItem.call(null, oldItem)) { + list[i] = newItem; + } + } + else if (oldItem === conditionOrItem) { + list[i] = newItem; + return; + } + i++; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (list_1_1 && !list_1_1.done && (_a = list_1.return)) _a.call(list_1); + } + finally { if (e_1) throw e_1.error; } } - return -1; } -exports.tree_treePosition = tree_treePosition; +exports.replace = replace; /** - * Determines the index of `node`. The index of an object is its number of - * preceding siblings, or 0 if it has none. + * Inserts the given item before the given index. * - * @param node - a node - * @param other - the node to check + * @param list - a list + * @param item - an item */ -function tree_index(node) { - /** - * The index of an object is its number of preceding siblings, or 0 if it - * has none. - */ - var n = 0; - while (node._previousSibling !== null) { - n++; - node = node._previousSibling; - } - return n; +function insert(list, item, index) { + list.splice(index, 0, item); } -exports.tree_index = tree_index; +exports.insert = insert; /** - * Retargets an object against another object. + * Removes the given item or all items matching condition. * - * @param a - an object to retarget - * @param b - an object to retarget against + * @param list - a list + * @param conditionOrItem - an item to remove or a condition matching items + * to remove */ -function tree_retarget(a, b) { - /** - * To retarget an object A against an object B, repeat these steps until - * they return an object: - * 1. If one of the following is true - * - A is not a node - * - A's root is not a shadow root - * - B is a node and A's root is a shadow-including inclusive ancestor - * of B - * then return A. - * 2. Set A to A's root's host. - */ - while (true) { - if (!a || !util_1.Guard.isNode(a)) { - return a; - } - var rootOfA = tree_rootNode(a); - if (!util_1.Guard.isShadowRoot(rootOfA)) { - return a; +function remove(list, conditionOrItem) { + var i = list.length; + while (i--) { + var oldItem = list[i]; + if (util_1.isFunction(conditionOrItem)) { + if (!!conditionOrItem.call(null, oldItem)) { + list.splice(i, 1); + } } - if (b && util_1.Guard.isNode(b) && tree_isAncestorOf(rootOfA, b, true, true)) { - return a; + else if (oldItem === conditionOrItem) { + list.splice(i, 1); + return; } - a = rootOfA.host; } } -exports.tree_retarget = tree_retarget; -//# sourceMappingURL=TreeAlgorithm.js.map - -/***/ }), - -/***/ 94962: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var TraversalAlgorithm_1 = __nccwpck_require__(80998); +exports.remove = remove; /** - * Returns the first or last child node, or `null` if there are none. + * Removes all items from the list. + */ +function empty(list) { + list.length = 0; +} +exports.empty = empty; +/** + * Determines if the list contains the given item or any items matching + * condition. * - * @param walker - the `TreeWalker` instance - * @param first - `true` to return the first child node, or `false` to - * return the last child node. + * @param list - a list + * @param conditionOrItem - an item to a condition to match */ -function treeWalker_traverseChildren(walker, first) { - /** - * 1. Let node be walker’s current. - * 2. Set node to node’s first child if type is first, and node’s last child - * if type is last. - * 3. While node is non-null: - */ - var node = (first ? walker._current._firstChild : walker._current._lastChild); - while (node !== null) { - /** - * 3.1. Let result be the result of filtering node within walker. - */ - var result = TraversalAlgorithm_1.traversal_filter(walker, node); - if (result === interfaces_1.FilterResult.Accept) { - /** - * 3.2. If result is FILTER_ACCEPT, then set walker’s current to node and - * return node. - */ - walker._current = node; - return node; - } - else if (result === interfaces_1.FilterResult.Skip) { - /** - * 3.3. If result is FILTER_SKIP, then: - * 3.3.1. Let child be node’s first child if type is first, and node’s - * last child if type is last. - * 3.3.2. If child is non-null, then set node to child and continue. - */ - var child = (first ? node._firstChild : node._lastChild); - if (child !== null) { - node = child; - continue; - } - } - /** - * 3.4. While node is non-null: - */ - while (node !== null) { - /** - * 3.4.1. Let sibling be node’s next sibling if type is first, and - * node’s previous sibling if type is last. - * 3.4.2. If sibling is non-null, then set node to sibling and break. - */ - var sibling = (first ? node._nextSibling : node._previousSibling); - if (sibling !== null) { - node = sibling; - break; +function contains(list, conditionOrItem) { + var e_2, _a; + try { + for (var list_2 = __values(list), list_2_1 = list_2.next(); !list_2_1.done; list_2_1 = list_2.next()) { + var oldItem = list_2_1.value; + if (util_1.isFunction(conditionOrItem)) { + if (!!conditionOrItem.call(null, oldItem)) { + return true; + } } - /** - * 3.4.3. Let parent be node’s parent. - * 3.4.4. If parent is null, walker’s root, or walker’s current, then - * return null. - */ - var parent = node._parent; - if (parent === null || parent === walker._root || parent === walker._current) { - return null; + else if (oldItem === conditionOrItem) { + return true; } - /** - * 3.4.5. Set node to parent. - */ - node = parent; } } - /** - * 5. Return null - */ - return null; + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (list_2_1 && !list_2_1.done && (_a = list_2.return)) _a.call(list_2); + } + finally { if (e_2) throw e_2.error; } + } + return false; } -exports.treeWalker_traverseChildren = treeWalker_traverseChildren; +exports.contains = contains; /** - * Returns the next or previous sibling node, or `null` if there are none. + * Returns the count of items in the list matching the given condition. * - * @param walker - the `TreeWalker` instance - * @param next - `true` to return the next sibling node, or `false` to - * return the previous sibling node. + * @param list - a list + * @param condition - an optional condition to match */ -function treeWalker_traverseSiblings(walker, next) { - /** - * 1. Let node be walker’s current. - * 2. If node is root, then return null. - * 3. While node is non-null: - */ - var node = walker._current; - if (node === walker._root) - return null; - while (true) { - /** - * 3.1. Let sibling be node’s next sibling if type is next, and node’s - * previous sibling if type is previous. - * 3.2. While sibling is non-null: - */ - var sibling = (next ? node._nextSibling : node._previousSibling); - while (sibling !== null) { - /** - * 3.2.1. Set node to sibling. - * 3.2.2. Let result be the result of filtering node within walker. - * 3.2.3. If result is FILTER_ACCEPT, then set walker’s current to node - * and return node. - */ - node = sibling; - var result = TraversalAlgorithm_1.traversal_filter(walker, node); - if (result === interfaces_1.FilterResult.Accept) { - walker._current = node; - return node; - } - /** - * 3.2.4. Set sibling to node’s first child if type is next, and node’s - * last child if type is previous. - * 3.2.5. If result is FILTER_REJECT or sibling is null, then set - * sibling to node’s next sibling if type is next, and node’s previous - * sibling if type is previous. - */ - sibling = (next ? node._firstChild : node._lastChild); - if (result === interfaces_1.FilterResult.Reject || sibling === null) { - sibling = (next ? node._nextSibling : node._previousSibling); +function size(list, condition) { + var e_3, _a; + if (condition === undefined) { + return list.length; + } + else { + var count = 0; + try { + for (var list_3 = __values(list), list_3_1 = list_3.next(); !list_3_1.done; list_3_1 = list_3.next()) { + var item = list_3_1.value; + if (!!condition.call(null, item)) { + count++; + } } } - /** - * 3.3. Set node to node’s parent. - * 3.4. If node is null or walker’s root, then return null. - */ - node = node._parent; - if (node === null || node === walker._root) { - return null; - } - /** - * 3.5. If the return value of filtering node within walker is FILTER_ACCEPT, - * then return null. - */ - if (TraversalAlgorithm_1.traversal_filter(walker, node) === interfaces_1.FilterResult.Accept) { - return null; + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (list_3_1 && !list_3_1.done && (_a = list_3.return)) _a.call(list_3); + } + finally { if (e_3) throw e_3.error; } } + return count; } } -exports.treeWalker_traverseSiblings = treeWalker_traverseSiblings; -//# sourceMappingURL=TreeWalkerAlgorithm.js.map - -/***/ }), - -/***/ 45457: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.size = size; /** - * Defines a WebIDL `Const` property on the given object. + * Determines if the list is empty. * - * @param o - object on which to add the property - * @param name - property name - * @param value - property value + * @param list - a list */ -function idl_defineConst(o, name, value) { - Object.defineProperty(o, name, { writable: false, enumerable: true, configurable: false, value: value }); +function isEmpty(list) { + return list.length === 0; +} +exports.isEmpty = isEmpty; +/** + * Returns an iterator for the items of the list. + * + * @param list - a list + * @param condition - an optional condition to match + */ +function forEach(list, condition) { + var list_4, list_4_1, item, e_4_1; + var e_4, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!(condition === undefined)) return [3 /*break*/, 2]; + return [5 /*yield**/, __values(list)]; + case 1: + _b.sent(); + return [3 /*break*/, 9]; + case 2: + _b.trys.push([2, 7, 8, 9]); + list_4 = __values(list), list_4_1 = list_4.next(); + _b.label = 3; + case 3: + if (!!list_4_1.done) return [3 /*break*/, 6]; + item = list_4_1.value; + if (!!!condition.call(null, item)) return [3 /*break*/, 5]; + return [4 /*yield*/, item]; + case 4: + _b.sent(); + _b.label = 5; + case 5: + list_4_1 = list_4.next(); + return [3 /*break*/, 3]; + case 6: return [3 /*break*/, 9]; + case 7: + e_4_1 = _b.sent(); + e_4 = { error: e_4_1 }; + return [3 /*break*/, 9]; + case 8: + try { + if (list_4_1 && !list_4_1.done && (_a = list_4.return)) _a.call(list_4); + } + finally { if (e_4) throw e_4.error; } + return [7 /*endfinally*/]; + case 9: return [2 /*return*/]; + } + }); +} +exports.forEach = forEach; +/** + * Creates and returns a shallow clone of list. + * + * @param list - a list + */ +function clone(list) { + return new (Array.bind.apply(Array, __spread([void 0], list)))(); +} +exports.clone = clone; +/** + * Returns a new list containing items from the list sorted in ascending + * order. + * + * @param list - a list + * @param lessThanAlgo - a function that returns `true` if its first argument + * is less than its second argument, and `false` otherwise. + */ +function sortInAscendingOrder(list, lessThanAlgo) { + return list.sort(function (itemA, itemB) { + return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1; + }); +} +exports.sortInAscendingOrder = sortInAscendingOrder; +/** + * Returns a new list containing items from the list sorted in descending + * order. + * + * @param list - a list + * @param lessThanAlgo - a function that returns `true` if its first argument + * is less than its second argument, and `false` otherwise. + */ +function sortInDescendingOrder(list, lessThanAlgo) { + return list.sort(function (itemA, itemB) { + return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1; + }); } -exports.idl_defineConst = idl_defineConst; -//# sourceMappingURL=WebIDLAlgorithm.js.map +exports.sortInDescendingOrder = sortInDescendingOrder; +//# sourceMappingURL=List.js.map /***/ }), -/***/ 57030: -/***/ ((__unused_webpack_module, exports) => { +/***/ 22298: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); /** - * Determines if the given string is valid for a `"Name"` construct. + * Gets the value corresponding to the given key. * - * @param name - name string to test + * @param map - a map + * @param key - a key */ -function xml_isName(name) { - for (var i = 0; i < name.length; i++) { - var n = name.charCodeAt(i); - // NameStartChar - if ((n >= 97 && n <= 122) || // [a-z] - (n >= 65 && n <= 90) || // [A-Z] - n === 58 || n === 95 || // ':' or '_' - (n >= 0xC0 && n <= 0xD6) || - (n >= 0xD8 && n <= 0xF6) || - (n >= 0xF8 && n <= 0x2FF) || - (n >= 0x370 && n <= 0x37D) || - (n >= 0x37F && n <= 0x1FFF) || - (n >= 0x200C && n <= 0x200D) || - (n >= 0x2070 && n <= 0x218F) || - (n >= 0x2C00 && n <= 0x2FEF) || - (n >= 0x3001 && n <= 0xD7FF) || - (n >= 0xF900 && n <= 0xFDCF) || - (n >= 0xFDF0 && n <= 0xFFFD)) { - continue; - } - else if (i !== 0 && - (n === 45 || n === 46 || // '-' or '.' - (n >= 48 && n <= 57) || // [0-9] - (n === 0xB7) || - (n >= 0x0300 && n <= 0x036F) || - (n >= 0x203F && n <= 0x2040))) { - continue; - } - if (n >= 0xD800 && n <= 0xDBFF && i < name.length - 1) { - var n2 = name.charCodeAt(i + 1); - if (n2 >= 0xDC00 && n2 <= 0xDFFF) { - n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; - i++; - if (n >= 0x10000 && n <= 0xEFFFF) { - continue; - } - } - } - return false; - } - return true; +function get(map, key) { + return map.get(key); } -exports.xml_isName = xml_isName; +exports.get = get; /** - * Determines if the given string is valid for a `"QName"` construct. + * Sets the value corresponding to the given key. * - * @param name - name string to test + * @param map - a map + * @param key - a key + * @param val - a value */ -function xml_isQName(name) { - var colonFound = false; - for (var i = 0; i < name.length; i++) { - var n = name.charCodeAt(i); - // NameStartChar - if ((n >= 97 && n <= 122) || // [a-z] - (n >= 65 && n <= 90) || // [A-Z] - n === 95 || // '_' - (n >= 0xC0 && n <= 0xD6) || - (n >= 0xD8 && n <= 0xF6) || - (n >= 0xF8 && n <= 0x2FF) || - (n >= 0x370 && n <= 0x37D) || - (n >= 0x37F && n <= 0x1FFF) || - (n >= 0x200C && n <= 0x200D) || - (n >= 0x2070 && n <= 0x218F) || - (n >= 0x2C00 && n <= 0x2FEF) || - (n >= 0x3001 && n <= 0xD7FF) || - (n >= 0xF900 && n <= 0xFDCF) || - (n >= 0xFDF0 && n <= 0xFFFD)) { - continue; +function set(map, key, val) { + map.set(key, val); +} +exports.set = set; +/** + * Removes the item with the given key or all items matching condition. + * + * @param map - a map + * @param conditionOrItem - the key of an item to remove or a condition matching + * items to remove + */ +function remove(map, conditionOrItem) { + var e_1, _a, e_2, _b; + if (!util_1.isFunction(conditionOrItem)) { + map.delete(conditionOrItem); + } + else { + var toRemove = []; + try { + for (var map_1 = __values(map), map_1_1 = map_1.next(); !map_1_1.done; map_1_1 = map_1.next()) { + var item = map_1_1.value; + if (!!conditionOrItem.call(null, item)) { + toRemove.push(item[0]); + } + } } - else if (i !== 0 && - (n === 45 || n === 46 || // '-' or '.' - (n >= 48 && n <= 57) || // [0-9] - (n === 0xB7) || - (n >= 0x0300 && n <= 0x036F) || - (n >= 0x203F && n <= 0x2040))) { - continue; + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (map_1_1 && !map_1_1.done && (_a = map_1.return)) _a.call(map_1); + } + finally { if (e_1) throw e_1.error; } } - else if (i !== 0 && n === 58) { // : - if (colonFound) - return false; // multiple colons in qname - if (i === name.length - 1) - return false; // colon at the end of qname - colonFound = true; - continue; + try { + for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) { + var key = toRemove_1_1.value; + map.delete(key); + } } - if (n >= 0xD800 && n <= 0xDBFF && i < name.length - 1) { - var n2 = name.charCodeAt(i + 1); - if (n2 >= 0xDC00 && n2 <= 0xDFFF) { - n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; - i++; - if (n >= 0x10000 && n <= 0xEFFFF) { - continue; - } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (toRemove_1_1 && !toRemove_1_1.done && (_b = toRemove_1.return)) _b.call(toRemove_1); } + finally { if (e_2) throw e_2.error; } } - return false; } - return true; } -exports.xml_isQName = xml_isQName; +exports.remove = remove; /** - * Determines if the given string contains legal characters. + * Determines if the map contains a value with the given key. * - * @param chars - sequence of characters to test + * @param map - a map + * @param conditionOrItem - the key of an item to match or a condition matching + * items */ -function xml_isLegalChar(chars) { - for (var i = 0; i < chars.length; i++) { - var n = chars.charCodeAt(i); - // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] - if (n === 0x9 || n === 0xA || n === 0xD || - (n >= 0x20 && n <= 0xD7FF) || - (n >= 0xE000 && n <= 0xFFFD)) { - continue; - } - if (n >= 0xD800 && n <= 0xDBFF && i < chars.length - 1) { - var n2 = chars.charCodeAt(i + 1); - if (n2 >= 0xDC00 && n2 <= 0xDFFF) { - n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; - i++; - if (n >= 0x10000 && n <= 0x10FFFF) { - continue; +function contains(map, conditionOrItem) { + var e_3, _a; + if (!util_1.isFunction(conditionOrItem)) { + return map.has(conditionOrItem); + } + else { + try { + for (var map_2 = __values(map), map_2_1 = map_2.next(); !map_2_1.done; map_2_1 = map_2.next()) { + var item = map_2_1.value; + if (!!conditionOrItem.call(null, item)) { + return true; } } } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (map_2_1 && !map_2_1.done && (_a = map_2.return)) _a.call(map_2); + } + finally { if (e_3) throw e_3.error; } + } return false; } - return true; } -exports.xml_isLegalChar = xml_isLegalChar; +exports.contains = contains; /** - * Determines if the given string contains legal characters for a public - * identifier. + * Gets the keys of the map. * - * @param chars - sequence of characters to test + * @param map - a map */ -function xml_isPubidChar(chars) { - for (var i = 0; i < chars.length; i++) { - // PubId chars are all in the ASCII range, no need to check surrogates - var n = chars.charCodeAt(i); - // #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] - if ((n >= 97 && n <= 122) || // [a-z] - (n >= 65 && n <= 90) || // [A-Z] - (n >= 39 && n <= 59) || // ['()*+,-./] | [0-9] | [:;] - n === 0x20 || n === 0xD || n === 0xA || // #x20 | #xD | #xA - (n >= 35 && n <= 37) || // [#$%] - n === 33 || // ! - n === 61 || n === 63 || n === 64 || n === 95) { // [=?@_] - continue; +function keys(map) { + return new Set(map.keys()); +} +exports.keys = keys; +/** + * Gets the values of the map. + * + * @param map - a map + */ +function values(map) { + return __spread(map.values()); +} +exports.values = values; +/** + * Gets the size of the map. + * + * @param map - a map + * @param condition - an optional condition to match + */ +function size(map, condition) { + var e_4, _a; + if (condition === undefined) { + return map.size; + } + else { + var count = 0; + try { + for (var map_3 = __values(map), map_3_1 = map_3.next(); !map_3_1.done; map_3_1 = map_3.next()) { + var item = map_3_1.value; + if (!!condition.call(null, item)) { + count++; + } + } } - else { - return false; + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (map_3_1 && !map_3_1.done && (_a = map_3.return)) _a.call(map_3); + } + finally { if (e_4) throw e_4.error; } } + return count; } - return true; } -exports.xml_isPubidChar = xml_isPubidChar; -//# sourceMappingURL=XMLAlgorithm.js.map - -/***/ }), - -/***/ 61: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +exports.size = size; +/** + * Determines if the map is empty. + * + * @param map - a map + */ +function isEmpty(map) { + return map.size === 0; } -Object.defineProperty(exports, "__esModule", ({ value: true })); -__export(__nccwpck_require__(32206)); -__export(__nccwpck_require__(84309)); -__export(__nccwpck_require__(81054)); -__export(__nccwpck_require__(19461)); -__export(__nccwpck_require__(57339)); -__export(__nccwpck_require__(35648)); -__export(__nccwpck_require__(12793)); -__export(__nccwpck_require__(9628)); -__export(__nccwpck_require__(93261)); -__export(__nccwpck_require__(51849)); -__export(__nccwpck_require__(28217)); -__export(__nccwpck_require__(21312)); -__export(__nccwpck_require__(45463)); -__export(__nccwpck_require__(78157)); -__export(__nccwpck_require__(35856)); -__export(__nccwpck_require__(74924)); -__export(__nccwpck_require__(3973)); -__export(__nccwpck_require__(53670)); -__export(__nccwpck_require__(2328)); -__export(__nccwpck_require__(30457)); -__export(__nccwpck_require__(41853)); -__export(__nccwpck_require__(68733)); -__export(__nccwpck_require__(13512)); -__export(__nccwpck_require__(80998)); -__export(__nccwpck_require__(16620)); -__export(__nccwpck_require__(94962)); -__export(__nccwpck_require__(45457)); -__export(__nccwpck_require__(57030)); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 66461: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var algorithm_1 = __nccwpck_require__(61); +exports.isEmpty = isEmpty; /** - * Represents a controller that allows to abort DOM requests. + * Returns an iterator for the items of the map. + * + * @param map - a map + * @param condition - an optional condition to match */ -var AbortControllerImpl = /** @class */ (function () { - /** - * Initializes a new instance of `AbortController`. - */ - function AbortControllerImpl() { - /** - * 1. Let signal be a new AbortSignal object. - * 2. Let controller be a new AbortController object whose signal is signal. - * 3. Return controller. - */ - this._signal = algorithm_1.create_abortSignal(); - } - Object.defineProperty(AbortControllerImpl.prototype, "signal", { - /** @inheritdoc */ - get: function () { return this._signal; }, - enumerable: true, - configurable: true +function forEach(map, condition) { + var map_4, map_4_1, item, e_5_1; + var e_5, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!(condition === undefined)) return [3 /*break*/, 2]; + return [5 /*yield**/, __values(map)]; + case 1: + _b.sent(); + return [3 /*break*/, 9]; + case 2: + _b.trys.push([2, 7, 8, 9]); + map_4 = __values(map), map_4_1 = map_4.next(); + _b.label = 3; + case 3: + if (!!map_4_1.done) return [3 /*break*/, 6]; + item = map_4_1.value; + if (!!!condition.call(null, item)) return [3 /*break*/, 5]; + return [4 /*yield*/, item]; + case 4: + _b.sent(); + _b.label = 5; + case 5: + map_4_1 = map_4.next(); + return [3 /*break*/, 3]; + case 6: return [3 /*break*/, 9]; + case 7: + e_5_1 = _b.sent(); + e_5 = { error: e_5_1 }; + return [3 /*break*/, 9]; + case 8: + try { + if (map_4_1 && !map_4_1.done && (_a = map_4.return)) _a.call(map_4); + } + finally { if (e_5) throw e_5.error; } + return [7 /*endfinally*/]; + case 9: return [2 /*return*/]; + } }); - /** @inheritdoc */ - AbortControllerImpl.prototype.abort = function () { - algorithm_1.abort_signalAbort(this._signal); - }; - return AbortControllerImpl; -}()); -exports.AbortControllerImpl = AbortControllerImpl; -//# sourceMappingURL=AbortControllerImpl.js.map - -/***/ }), - -/***/ 10022: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var EventTargetImpl_1 = __nccwpck_require__(69968); -var algorithm_1 = __nccwpck_require__(61); +} +exports.forEach = forEach; /** - * Represents a signal object that communicates with a DOM request and abort - * it through an AbortController. + * Creates and returns a shallow clone of map. + * + * @param map - a map */ -var AbortSignalImpl = /** @class */ (function (_super) { - __extends(AbortSignalImpl, _super); - /** - * Initializes a new instance of `AbortSignal`. - */ - function AbortSignalImpl() { - var _this = _super.call(this) || this; - _this._abortedFlag = false; - _this._abortAlgorithms = new Set(); - return _this; - } - Object.defineProperty(AbortSignalImpl.prototype, "aborted", { - /** @inheritdoc */ - get: function () { return this._abortedFlag; }, - enumerable: true, - configurable: true +function clone(map) { + return new Map(map); +} +exports.clone = clone; +/** + * Returns a new map containing items from the map sorted in ascending + * order. + * + * @param map - a map + * @param lessThanAlgo - a function that returns `true` if its first argument + * is less than its second argument, and `false` otherwise. + */ +function sortInAscendingOrder(map, lessThanAlgo) { + var list = new (Array.bind.apply(Array, __spread([void 0], map)))(); + list.sort(function (itemA, itemB) { + return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1; }); - Object.defineProperty(AbortSignalImpl.prototype, "onabort", { - /** @inheritdoc */ - get: function () { - return algorithm_1.event_getterEventHandlerIDLAttribute(this, "onabort"); - }, - set: function (val) { - algorithm_1.event_setterEventHandlerIDLAttribute(this, "onabort", val); - }, - enumerable: true, - configurable: true + return new Map(list); +} +exports.sortInAscendingOrder = sortInAscendingOrder; +/** + * Returns a new map containing items from the map sorted in descending + * order. + * + * @param map - a map + * @param lessThanAlgo - a function that returns `true` if its first argument + * is less than its second argument, and `false` otherwise. + */ +function sortInDescendingOrder(map, lessThanAlgo) { + var list = new (Array.bind.apply(Array, __spread([void 0], map)))(); + list.sort(function (itemA, itemB) { + return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1; }); - /** - * Creates a new `AbortSignal`. - */ - AbortSignalImpl._create = function () { - return new AbortSignalImpl(); - }; - return AbortSignalImpl; -}(EventTargetImpl_1.EventTargetImpl)); -exports.AbortSignalImpl = AbortSignalImpl; -//# sourceMappingURL=AbortSignalImpl.js.map + return new Map(list); +} +exports.sortInDescendingOrder = sortInDescendingOrder; +//# sourceMappingURL=Map.js.map /***/ }), -/***/ 57126: +/***/ 93764: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents an abstract range with a start and end boundary point. - */ -var AbstractRangeImpl = /** @class */ (function () { - function AbstractRangeImpl() { - } - Object.defineProperty(AbstractRangeImpl.prototype, "_startNode", { - get: function () { return this._start[0]; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "_startOffset", { - get: function () { return this._start[1]; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "_endNode", { - get: function () { return this._end[0]; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "_endOffset", { - get: function () { return this._end[1]; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "_collapsed", { - get: function () { - return (this._start[0] === this._end[0] && - this._start[1] === this._end[1]); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "startContainer", { - /** @inheritdoc */ - get: function () { return this._startNode; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "startOffset", { - /** @inheritdoc */ - get: function () { return this._startOffset; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "endContainer", { - /** @inheritdoc */ - get: function () { return this._endNode; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "endOffset", { - /** @inheritdoc */ - get: function () { return this._endOffset; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AbstractRangeImpl.prototype, "collapsed", { - /** @inheritdoc */ - get: function () { return this._collapsed; }, - enumerable: true, - configurable: true - }); - return AbstractRangeImpl; -}()); -exports.AbstractRangeImpl = AbstractRangeImpl; -//# sourceMappingURL=AbstractRangeImpl.js.map +exports.HTML = "http://www.w3.org/1999/xhtml"; +exports.XML = "http://www.w3.org/XML/1998/namespace"; +exports.XMLNS = "http://www.w3.org/2000/xmlns/"; +exports.MathML = "http://www.w3.org/1998/Math/MathML"; +exports.SVG = "http://www.w3.org/2000/svg"; +exports.XLink = "http://www.w3.org/1999/xlink"; +//# sourceMappingURL=Namespace.js.map /***/ }), -/***/ 13717: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 39201: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var NodeImpl_1 = __nccwpck_require__(91745); -var algorithm_1 = __nccwpck_require__(61); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Represents an attribute of an element node. + * Appends the given item to the queue. + * + * @param list - a list + * @param item - an item */ -var AttrImpl = /** @class */ (function (_super) { - __extends(AttrImpl, _super); - /** - * Initializes a new instance of `Attr`. - * - * @param localName - local name - */ - function AttrImpl(localName) { - var _this = _super.call(this) || this; - _this._namespace = null; - _this._namespacePrefix = null; - _this._element = null; - _this._value = ''; - _this._localName = localName; - return _this; - } - Object.defineProperty(AttrImpl.prototype, "ownerElement", { - /** @inheritdoc */ - get: function () { return this._element; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AttrImpl.prototype, "namespaceURI", { - /** @inheritdoc */ - get: function () { return this._namespace; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AttrImpl.prototype, "prefix", { - /** @inheritdoc */ - get: function () { return this._namespacePrefix; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AttrImpl.prototype, "localName", { - /** @inheritdoc */ - get: function () { return this._localName; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AttrImpl.prototype, "name", { - /** @inheritdoc */ - get: function () { return this._qualifiedName; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AttrImpl.prototype, "value", { - /** @inheritdoc */ - get: function () { return this._value; }, - set: function (value) { - /** - * The value attribute’s setter must set an existing attribute value with - * context object and the given value. - */ - algorithm_1.attr_setAnExistingAttributeValue(this, value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AttrImpl.prototype, "_qualifiedName", { - /** - * Returns the qualified name. - */ - get: function () { - /** - * An attribute’s qualified name is its local name if its namespace prefix - * is null, and its namespace prefix, followed by ":", followed by its - * local name, otherwise. - */ - return (this._namespacePrefix !== null ? - this._namespacePrefix + ':' + this._localName : - this._localName); - }, - enumerable: true, - configurable: true - }); - /** - * Creates an `Attr`. - * - * @param document - owner document - * @param localName - local name - */ - AttrImpl._create = function (document, localName) { - var node = new AttrImpl(localName); - node._nodeDocument = document; - return node; - }; - return AttrImpl; -}(NodeImpl_1.NodeImpl)); -exports.AttrImpl = AttrImpl; +function enqueue(list, item) { + list.push(item); +} +exports.enqueue = enqueue; /** - * Initialize prototype properties + * Removes and returns an item from the queue. + * + * @param list - a list */ -WebIDLAlgorithm_1.idl_defineConst(AttrImpl.prototype, "_nodeType", interfaces_1.NodeType.Attribute); -WebIDLAlgorithm_1.idl_defineConst(AttrImpl.prototype, "specified", true); -//# sourceMappingURL=AttrImpl.js.map +function dequeue(list) { + return list.shift() || null; +} +exports.dequeue = dequeue; +//# sourceMappingURL=Queue.js.map /***/ }), -/***/ 23977: +/***/ 35931: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } }; -})(); + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var TextImpl_1 = __nccwpck_require__(42191); -var interfaces_1 = __nccwpck_require__(27305); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +var util_1 = __nccwpck_require__(76195); /** - * Represents a CDATA node. + * Adds the given item to the end of the set. + * + * @param set - a set + * @param item - an item */ -var CDATASectionImpl = /** @class */ (function (_super) { - __extends(CDATASectionImpl, _super); - /** - * Initializes a new instance of `CDATASection`. - * - * @param data - node contents - */ - function CDATASectionImpl(data) { - return _super.call(this, data) || this; - } - /** - * Creates a new `CDATASection`. - * - * @param document - owner document - * @param data - node contents - */ - CDATASectionImpl._create = function (document, data) { - if (data === void 0) { data = ''; } - var node = new CDATASectionImpl(data); - node._nodeDocument = document; - return node; - }; - return CDATASectionImpl; -}(TextImpl_1.TextImpl)); -exports.CDATASectionImpl = CDATASectionImpl; +function append(set, item) { + set.add(item); +} +exports.append = append; /** - * Initialize prototype properties + * Extends a set by appending all items from another set. + * + * @param setA - a list to extend + * @param setB - a list containing items to append to `setA` */ -WebIDLAlgorithm_1.idl_defineConst(CDATASectionImpl.prototype, "_nodeType", interfaces_1.NodeType.CData); -//# sourceMappingURL=CDATASectionImpl.js.map - -/***/ }), - -/***/ 65330: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var NodeImpl_1 = __nccwpck_require__(91745); -var algorithm_1 = __nccwpck_require__(61); +function extend(setA, setB) { + setB.forEach(setA.add, setA); +} +exports.extend = extend; /** - * Represents a generic text node. + * Inserts the given item to the start of the set. + * + * @param set - a set + * @param item - an item */ -var CharacterDataImpl = /** @class */ (function (_super) { - __extends(CharacterDataImpl, _super); - /** - * Initializes a new instance of `CharacterData`. - * - * @param data - the text content - */ - function CharacterDataImpl(data) { - var _this = _super.call(this) || this; - _this._data = data; - return _this; - } - Object.defineProperty(CharacterDataImpl.prototype, "data", { - /** @inheritdoc */ - get: function () { return this._data; }, - set: function (value) { - algorithm_1.characterData_replaceData(this, 0, this._data.length, value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(CharacterDataImpl.prototype, "length", { - /** @inheritdoc */ - get: function () { return this._data.length; }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - CharacterDataImpl.prototype.substringData = function (offset, count) { - /** - * The substringData(offset, count) method, when invoked, must return the - * result of running substring data with node context object, offset offset, and count count. - */ - return algorithm_1.characterData_substringData(this, offset, count); - }; - /** @inheritdoc */ - CharacterDataImpl.prototype.appendData = function (data) { - /** - * The appendData(data) method, when invoked, must replace data with node - * context object, offset context object’s length, count 0, and data data. - */ - return algorithm_1.characterData_replaceData(this, this._data.length, 0, data); - }; - /** @inheritdoc */ - CharacterDataImpl.prototype.insertData = function (offset, data) { - /** - * The insertData(offset, data) method, when invoked, must replace data with - * node context object, offset offset, count 0, and data data. - */ - algorithm_1.characterData_replaceData(this, offset, 0, data); - }; - /** @inheritdoc */ - CharacterDataImpl.prototype.deleteData = function (offset, count) { - /** - * The deleteData(offset, count) method, when invoked, must replace data - * with node context object, offset offset, count count, and data the - * empty string. - */ - algorithm_1.characterData_replaceData(this, offset, count, ''); - }; - /** @inheritdoc */ - CharacterDataImpl.prototype.replaceData = function (offset, count, data) { - /** - * The replaceData(offset, count, data) method, when invoked, must replace - * data with node context object, offset offset, count count, and data data. - */ - algorithm_1.characterData_replaceData(this, offset, count, data); - }; - Object.defineProperty(CharacterDataImpl.prototype, "previousElementSibling", { - // MIXIN: NonDocumentTypeChildNode - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(CharacterDataImpl.prototype, "nextElementSibling", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); }, - enumerable: true, - configurable: true - }); - // MIXIN: ChildNode - /* istanbul ignore next */ - CharacterDataImpl.prototype.before = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - CharacterDataImpl.prototype.after = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; +function prepend(set, item) { + var cloned = new Set(set); + set.clear(); + set.add(item); + cloned.forEach(set.add, set); +} +exports.prepend = prepend; +/** + * Replaces the given item or all items matching condition with a new item. + * + * @param set - a set + * @param conditionOrItem - an item to replace or a condition matching items + * to replace + * @param item - an item + */ +function replace(set, conditionOrItem, newItem) { + var e_1, _a; + var newSet = new Set(); + try { + for (var set_1 = __values(set), set_1_1 = set_1.next(); !set_1_1.done; set_1_1 = set_1.next()) { + var oldItem = set_1_1.value; + if (util_1.isFunction(conditionOrItem)) { + if (!!conditionOrItem.call(null, oldItem)) { + newSet.add(newItem); + } + else { + newSet.add(oldItem); + } + } + else if (oldItem === conditionOrItem) { + newSet.add(newItem); + } + else { + newSet.add(oldItem); + } } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - CharacterDataImpl.prototype.replaceWith = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (set_1_1 && !set_1_1.done && (_a = set_1.return)) _a.call(set_1); } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - CharacterDataImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); }; - return CharacterDataImpl; -}(NodeImpl_1.NodeImpl)); -exports.CharacterDataImpl = CharacterDataImpl; -//# sourceMappingURL=CharacterDataImpl.js.map - -/***/ }), - -/***/ 88264: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(65282); -var algorithm_1 = __nccwpck_require__(61); + finally { if (e_1) throw e_1.error; } + } + set.clear(); + newSet.forEach(set.add, set); +} +exports.replace = replace; /** - * Represents a mixin that extends child nodes that can have siblings - * including doctypes. This mixin is implemented by {@link Element}, - * {@link CharacterData} and {@link DocumentType}. + * Inserts the given item before the given index. + * + * @param set - a set + * @param item - an item */ -var ChildNodeImpl = /** @class */ (function () { - function ChildNodeImpl() { +function insert(set, item, index) { + var e_2, _a; + var newSet = new Set(); + var i = 0; + try { + for (var set_2 = __values(set), set_2_1 = set_2.next(); !set_2_1.done; set_2_1 = set_2.next()) { + var oldItem = set_2_1.value; + if (i === index) + newSet.add(item); + newSet.add(oldItem); + i++; + } } - /** @inheritdoc */ - ChildNodeImpl.prototype.before = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (set_2_1 && !set_2_1.done && (_a = set_2.return)) _a.call(set_2); } - /** - * 1. Let parent be context object’s parent. - * 2. If parent is null, then return. - */ - var context = util_1.Cast.asNode(this); - var parent = context._parent; - if (parent === null) - return; - /** - * 3. Let viablePreviousSibling be context object’s first preceding - * sibling not in nodes, and null otherwise. - */ - var viablePreviousSibling = context._previousSibling; - var flag = true; - while (flag && viablePreviousSibling) { - flag = false; - for (var i = 0; i < nodes.length; i++) { - var child = nodes[i]; - if (child === viablePreviousSibling) { - viablePreviousSibling = viablePreviousSibling._previousSibling; - flag = true; - break; + finally { if (e_2) throw e_2.error; } + } + set.clear(); + newSet.forEach(set.add, set); +} +exports.insert = insert; +/** + * Removes the given item or all items matching condition. + * + * @param set - a set + * @param conditionOrItem - an item to remove or a condition matching items + * to remove + */ +function remove(set, conditionOrItem) { + var e_3, _a, e_4, _b; + if (!util_1.isFunction(conditionOrItem)) { + set.delete(conditionOrItem); + } + else { + var toRemove = []; + try { + for (var set_3 = __values(set), set_3_1 = set_3.next(); !set_3_1.done; set_3_1 = set_3.next()) { + var item = set_3_1.value; + if (!!conditionOrItem.call(null, item)) { + toRemove.push(item); } } } - /** - * 4. Let node be the result of converting nodes into a node, given nodes - * and context object’s node document. - */ - var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument); - /** - * 5. If viablePreviousSibling is null, set it to parent’s first child, - * and to viablePreviousSibling’s next sibling otherwise. - */ - if (viablePreviousSibling === null) - viablePreviousSibling = parent._firstChild; - else - viablePreviousSibling = viablePreviousSibling._nextSibling; - /** - * 6. Pre-insert node into parent before viablePreviousSibling. - */ - algorithm_1.mutation_preInsert(node, parent, viablePreviousSibling); - }; - /** @inheritdoc */ - ChildNodeImpl.prototype.after = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (set_3_1 && !set_3_1.done && (_a = set_3.return)) _a.call(set_3); + } + finally { if (e_3) throw e_3.error; } } - /** - * 1. Let parent be context object’s parent. - * 2. If parent is null, then return. - */ - var context = util_1.Cast.asNode(this); - var parent = context._parent; - if (!parent) - return; - /** - * 3. Let viableNextSibling be context object’s first following sibling not - * in nodes, and null otherwise. - */ - var viableNextSibling = context._nextSibling; - var flag = true; - while (flag && viableNextSibling) { - flag = false; - for (var i = 0; i < nodes.length; i++) { - var child = nodes[i]; - if (child === viableNextSibling) { - viableNextSibling = viableNextSibling._nextSibling; - flag = true; - break; + try { + for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) { + var oldItem = toRemove_1_1.value; + set.delete(oldItem); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (toRemove_1_1 && !toRemove_1_1.done && (_b = toRemove_1.return)) _b.call(toRemove_1); + } + finally { if (e_4) throw e_4.error; } + } + } +} +exports.remove = remove; +/** + * Removes all items from the set. + */ +function empty(set) { + set.clear(); +} +exports.empty = empty; +/** + * Determines if the set contains the given item or any items matching + * condition. + * + * @param set - a set + * @param conditionOrItem - an item to a condition to match + */ +function contains(set, conditionOrItem) { + var e_5, _a; + if (!util_1.isFunction(conditionOrItem)) { + return set.has(conditionOrItem); + } + else { + try { + for (var set_4 = __values(set), set_4_1 = set_4.next(); !set_4_1.done; set_4_1 = set_4.next()) { + var oldItem = set_4_1.value; + if (!!conditionOrItem.call(null, oldItem)) { + return true; } } } - /** - * 4. Let node be the result of converting nodes into a node, given nodes - * and context object’s node document. - */ - var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument); - /** - * 5. Pre-insert node into parent before viableNextSibling. - */ - algorithm_1.mutation_preInsert(node, parent, viableNextSibling); - }; - /** @inheritdoc */ - ChildNodeImpl.prototype.replaceWith = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (set_4_1 && !set_4_1.done && (_a = set_4.return)) _a.call(set_4); + } + finally { if (e_5) throw e_5.error; } } - /** - * 1. Let parent be context object’s parent. - * 2. If parent is null, then return. - */ - var context = util_1.Cast.asNode(this); - var parent = context._parent; - if (!parent) - return; - /** - * 3. Let viableNextSibling be context object’s first following sibling not - * in nodes, and null otherwise. - */ - var viableNextSibling = context._nextSibling; - var flag = true; - while (flag && viableNextSibling) { - flag = false; - for (var i = 0; i < nodes.length; i++) { - var child = nodes[i]; - if (child === viableNextSibling) { - viableNextSibling = viableNextSibling._nextSibling; - flag = true; - break; + } + return false; +} +exports.contains = contains; +/** + * Returns the count of items in the set matching the given condition. + * + * @param set - a set + * @param condition - an optional condition to match + */ +function size(set, condition) { + var e_6, _a; + if (condition === undefined) { + return set.size; + } + else { + var count = 0; + try { + for (var set_5 = __values(set), set_5_1 = set_5.next(); !set_5_1.done; set_5_1 = set_5.next()) { + var item = set_5_1.value; + if (!!condition.call(null, item)) { + count++; } } } - /** - * 4. Let node be the result of converting nodes into a node, given nodes - * and context object’s node document. - */ - var node = algorithm_1.parentNode_convertNodesIntoANode(nodes, context._nodeDocument); - /** - * 5. If context object’s parent is parent, replace the context object with - * node within parent. - * _Note:_ Context object could have been inserted into node. - * 6. Otherwise, pre-insert node into parent before viableNextSibling. - */ - if (context._parent === parent) - algorithm_1.mutation_replace(context, node, parent); - else - algorithm_1.mutation_preInsert(node, parent, viableNextSibling); - }; - /** @inheritdoc */ - ChildNodeImpl.prototype.remove = function () { - /** - * 1. If context object’s parent is null, then return. - * 2. Remove the context object from context object’s parent. - */ - var context = util_1.Cast.asNode(this); - var parent = context._parent; - if (!parent) - return; - algorithm_1.mutation_remove(context, parent); - }; - return ChildNodeImpl; -}()); -exports.ChildNodeImpl = ChildNodeImpl; -//# sourceMappingURL=ChildNodeImpl.js.map + catch (e_6_1) { e_6 = { error: e_6_1 }; } + finally { + try { + if (set_5_1 && !set_5_1.done && (_a = set_5.return)) _a.call(set_5); + } + finally { if (e_6) throw e_6.error; } + } + return count; + } +} +exports.size = size; +/** + * Determines if the set is empty. + * + * @param set - a set + */ +function isEmpty(set) { + return set.size === 0; +} +exports.isEmpty = isEmpty; +/** + * Returns an iterator for the items of the set. + * + * @param set - a set + * @param condition - an optional condition to match + */ +function forEach(set, condition) { + var set_6, set_6_1, item, e_7_1; + var e_7, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!(condition === undefined)) return [3 /*break*/, 2]; + return [5 /*yield**/, __values(set)]; + case 1: + _b.sent(); + return [3 /*break*/, 9]; + case 2: + _b.trys.push([2, 7, 8, 9]); + set_6 = __values(set), set_6_1 = set_6.next(); + _b.label = 3; + case 3: + if (!!set_6_1.done) return [3 /*break*/, 6]; + item = set_6_1.value; + if (!!!condition.call(null, item)) return [3 /*break*/, 5]; + return [4 /*yield*/, item]; + case 4: + _b.sent(); + _b.label = 5; + case 5: + set_6_1 = set_6.next(); + return [3 /*break*/, 3]; + case 6: return [3 /*break*/, 9]; + case 7: + e_7_1 = _b.sent(); + e_7 = { error: e_7_1 }; + return [3 /*break*/, 9]; + case 8: + try { + if (set_6_1 && !set_6_1.done && (_a = set_6.return)) _a.call(set_6); + } + finally { if (e_7) throw e_7.error; } + return [7 /*endfinally*/]; + case 9: return [2 /*return*/]; + } + }); +} +exports.forEach = forEach; +/** + * Creates and returns a shallow clone of set. + * + * @param set - a set + */ +function clone(set) { + return new Set(set); +} +exports.clone = clone; +/** + * Returns a new set containing items from the set sorted in ascending + * order. + * + * @param set - a set + * @param lessThanAlgo - a function that returns `true` if its first argument + * is less than its second argument, and `false` otherwise. + */ +function sortInAscendingOrder(set, lessThanAlgo) { + var list = new (Array.bind.apply(Array, __spread([void 0], set)))(); + list.sort(function (itemA, itemB) { + return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1; + }); + return new Set(list); +} +exports.sortInAscendingOrder = sortInAscendingOrder; +/** + * Returns a new set containing items from the set sorted in descending + * order. + * + * @param set - a set + * @param lessThanAlgo - a function that returns `true` if its first argument + * is less than its second argument, and `false` otherwise. + */ +function sortInDescendingOrder(set, lessThanAlgo) { + var list = new (Array.bind.apply(Array, __spread([void 0], set)))(); + list.sort(function (itemA, itemB) { + return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1; + }); + return new Set(list); +} +exports.sortInDescendingOrder = sortInDescendingOrder; +/** + * Determines if a set is a subset of another set. + * + * @param subset - a set + * @param superset - a superset possibly containing all items from `subset`. + */ +function isSubsetOf(subset, superset) { + var e_8, _a; + try { + for (var subset_1 = __values(subset), subset_1_1 = subset_1.next(); !subset_1_1.done; subset_1_1 = subset_1.next()) { + var item = subset_1_1.value; + if (!superset.has(item)) + return false; + } + } + catch (e_8_1) { e_8 = { error: e_8_1 }; } + finally { + try { + if (subset_1_1 && !subset_1_1.done && (_a = subset_1.return)) _a.call(subset_1); + } + finally { if (e_8) throw e_8.error; } + } + return true; +} +exports.isSubsetOf = isSubsetOf; +/** + * Determines if a set is a superset of another set. + * + * @param superset - a set + * @param subset - a subset possibly contained within `superset`. + */ +function isSupersetOf(superset, subset) { + return isSubsetOf(subset, superset); +} +exports.isSupersetOf = isSupersetOf; +/** + * Returns a new set with items that are contained in both sets. + * + * @param setA - a set + * @param setB - a set + */ +function intersection(setA, setB) { + var e_9, _a; + var newSet = new Set(); + try { + for (var setA_1 = __values(setA), setA_1_1 = setA_1.next(); !setA_1_1.done; setA_1_1 = setA_1.next()) { + var item = setA_1_1.value; + if (setB.has(item)) + newSet.add(item); + } + } + catch (e_9_1) { e_9 = { error: e_9_1 }; } + finally { + try { + if (setA_1_1 && !setA_1_1.done && (_a = setA_1.return)) _a.call(setA_1); + } + finally { if (e_9) throw e_9.error; } + } + return newSet; +} +exports.intersection = intersection; +/** + * Returns a new set with items from both sets. + * + * @param setA - a set + * @param setB - a set + */ +function union(setA, setB) { + var newSet = new Set(setA); + setB.forEach(newSet.add, newSet); + return newSet; +} +exports.union = union; +/** + * Returns a set of integers from `n` to `m` inclusive. + * + * @param n - starting number + * @param m - ending number + */ +function range(n, m) { + var newSet = new Set(); + for (var i = n; i <= m; i++) { + newSet.add(i); + } + return newSet; +} +exports.range = range; +//# sourceMappingURL=Set.js.map /***/ }), -/***/ 20930: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 38784: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var CharacterDataImpl_1 = __nccwpck_require__(65330); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Represents a comment node. + * Pushes the given item to the stack. + * + * @param list - a list + * @param item - an item */ -var CommentImpl = /** @class */ (function (_super) { - __extends(CommentImpl, _super); - /** - * Initializes a new instance of `Comment`. - * - * @param data - the text content - */ - function CommentImpl(data) { - if (data === void 0) { data = ''; } - return _super.call(this, data) || this; - } - /** - * Creates a new `Comment`. - * - * @param document - owner document - * @param data - node contents - */ - CommentImpl._create = function (document, data) { - if (data === void 0) { data = ''; } - var node = new CommentImpl(data); - node._nodeDocument = document; - return node; - }; - return CommentImpl; -}(CharacterDataImpl_1.CharacterDataImpl)); -exports.CommentImpl = CommentImpl; +function push(list, item) { + list.push(item); +} +exports.push = push; /** - * Initialize prototype properties + * Pops and returns an item from the stack. + * + * @param list - a list */ -WebIDLAlgorithm_1.idl_defineConst(CommentImpl.prototype, "_nodeType", interfaces_1.NodeType.Comment); -//# sourceMappingURL=CommentImpl.js.map +function pop(list) { + return list.pop() || null; +} +exports.pop = pop; +//# sourceMappingURL=Stack.js.map /***/ }), -/***/ 59857: +/***/ 13203: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } }; -})(); + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var EventImpl_1 = __nccwpck_require__(38245); -var algorithm_1 = __nccwpck_require__(61); +var CodePoints_1 = __nccwpck_require__(28548); +var ByteSequence_1 = __nccwpck_require__(71627); +var Byte_1 = __nccwpck_require__(42460); +var util_1 = __nccwpck_require__(76195); /** - * Represents and event that carries custom data. + * Determines if the string `a` is a code unit prefix of string `b`. + * + * @param a - a string + * @param b - a string */ -var CustomEventImpl = /** @class */ (function (_super) { - __extends(CustomEventImpl, _super); +function isCodeUnitPrefix(a, b) { /** - * Initializes a new instance of `CustomEvent`. + * 1. Let i be 0. + * 2. While true: + * 2.1. Let aCodeUnit be the ith code unit of a if i is less than a’s length; + * otherwise null. + * 2.2. Let bCodeUnit be the ith code unit of b if i is less than b’s length; + * otherwise null. + * 2.3. If bCodeUnit is null, then return true. + * 2.4. Return false if aCodeUnit is different from bCodeUnit. + * 2.5. Set i to i + 1. */ - function CustomEventImpl(type, eventInit) { - var _this = _super.call(this, type, eventInit) || this; - _this._detail = null; - _this._detail = (eventInit && eventInit.detail) || null; - return _this; + var i = 0; + while (true) { + var aCodeUnit = i < a.length ? a.charCodeAt(i) : null; + var bCodeUnit = i < b.length ? b.charCodeAt(i) : null; + if (aCodeUnit === null) + return true; + if (aCodeUnit !== bCodeUnit) + return false; + i++; } - Object.defineProperty(CustomEventImpl.prototype, "detail", { - /** @inheritdoc */ - get: function () { return this._detail; }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - CustomEventImpl.prototype.initCustomEvent = function (type, bubbles, cancelable, detail) { - if (bubbles === void 0) { bubbles = false; } - if (cancelable === void 0) { cancelable = false; } - if (detail === void 0) { detail = null; } - /** - * 1. If the context object’s dispatch flag is set, then return. - */ - if (this._dispatchFlag) - return; - /** - * 2. Initialize the context object with type, bubbles, and cancelable. - */ - algorithm_1.event_initialize(this, type, bubbles, cancelable); - /** - * 3. Set the context object’s detail attribute to detail. - */ - this._detail = detail; - }; - return CustomEventImpl; -}(EventImpl_1.EventImpl)); -exports.CustomEventImpl = CustomEventImpl; -//# sourceMappingURL=CustomEventImpl.js.map - -/***/ }), - -/***/ 13166: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); +} +exports.isCodeUnitPrefix = isCodeUnitPrefix; /** - * Represents the base class of `Error` objects used by this module. + * Determines if the string `a` is a code unit less than string `b`. + * + * @param a - a string + * @param b - a string */ -var DOMException = /** @class */ (function (_super) { - __extends(DOMException, _super); +function isCodeUnitLessThan(a, b) { /** - * - * @param name - message name - * @param message - error message + * 1. If b is a code unit prefix of a, then return false. + * 2. If a is a code unit prefix of b, then return true. + * 3. Let n be the smallest index such that the nth code unit of a is + * different from the nth code unit of b. (There has to be such an index, + * since neither string is a prefix of the other.) + * 4. If the nth code unit of a is less than the nth code unit of b, then + * return true. + * 5. Return false. */ - function DOMException(name, message) { - if (message === void 0) { message = ""; } - var _this = _super.call(this, message) || this; - _this.name = name; - return _this; - } - return DOMException; -}(Error)); -exports.DOMException = DOMException; -var DOMStringSizeError = /** @class */ (function (_super) { - __extends(DOMStringSizeError, _super); - /** - * @param message - error message - */ - function DOMStringSizeError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "DOMStringSizeError", message) || this; - } - return DOMStringSizeError; -}(DOMException)); -exports.DOMStringSizeError = DOMStringSizeError; -var WrongDocumentError = /** @class */ (function (_super) { - __extends(WrongDocumentError, _super); - /** - * @param message - error message - */ - function WrongDocumentError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "WrongDocumentError", "The object is in the wrong document. " + message) || this; - } - return WrongDocumentError; -}(DOMException)); -exports.WrongDocumentError = WrongDocumentError; -var NoDataAllowedError = /** @class */ (function (_super) { - __extends(NoDataAllowedError, _super); - /** - * @param message - error message - */ - function NoDataAllowedError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "NoDataAllowedError", message) || this; - } - return NoDataAllowedError; -}(DOMException)); -exports.NoDataAllowedError = NoDataAllowedError; -var NoModificationAllowedError = /** @class */ (function (_super) { - __extends(NoModificationAllowedError, _super); - /** - * @param message - error message - */ - function NoModificationAllowedError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "NoModificationAllowedError", "The object can not be modified. " + message) || this; - } - return NoModificationAllowedError; -}(DOMException)); -exports.NoModificationAllowedError = NoModificationAllowedError; -var NotSupportedError = /** @class */ (function (_super) { - __extends(NotSupportedError, _super); - /** - * @param message - error message - */ - function NotSupportedError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "NotSupportedError", "The operation is not supported. " + message) || this; - } - return NotSupportedError; -}(DOMException)); -exports.NotSupportedError = NotSupportedError; -var InUseAttributeError = /** @class */ (function (_super) { - __extends(InUseAttributeError, _super); - /** - * @param message - error message - */ - function InUseAttributeError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "InUseAttributeError", message) || this; - } - return InUseAttributeError; -}(DOMException)); -exports.InUseAttributeError = InUseAttributeError; -var InvalidStateError = /** @class */ (function (_super) { - __extends(InvalidStateError, _super); - /** - * @param message - error message - */ - function InvalidStateError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "InvalidStateError", "The object is in an invalid state. " + message) || this; - } - return InvalidStateError; -}(DOMException)); -exports.InvalidStateError = InvalidStateError; -var InvalidModificationError = /** @class */ (function (_super) { - __extends(InvalidModificationError, _super); - /** - * @param message - error message - */ - function InvalidModificationError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "InvalidModificationError", "The object can not be modified in this way. " + message) || this; - } - return InvalidModificationError; -}(DOMException)); -exports.InvalidModificationError = InvalidModificationError; -var NamespaceError = /** @class */ (function (_super) { - __extends(NamespaceError, _super); - /** - * @param message - error message - */ - function NamespaceError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "NamespaceError", "The operation is not allowed by Namespaces in XML. [XMLNS] " + message) || this; - } - return NamespaceError; -}(DOMException)); -exports.NamespaceError = NamespaceError; -var InvalidAccessError = /** @class */ (function (_super) { - __extends(InvalidAccessError, _super); - /** - * @param message - error message - */ - function InvalidAccessError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "InvalidAccessError", "The object does not support the operation or argument. " + message) || this; + if (isCodeUnitPrefix(b, a)) + return false; + if (isCodeUnitPrefix(a, b)) + return true; + for (var i = 0; i < Math.min(a.length, b.length); i++) { + var aCodeUnit = a.charCodeAt(i); + var bCodeUnit = b.charCodeAt(i); + if (aCodeUnit === bCodeUnit) + continue; + return (aCodeUnit < bCodeUnit); } - return InvalidAccessError; -}(DOMException)); -exports.InvalidAccessError = InvalidAccessError; -var ValidationError = /** @class */ (function (_super) { - __extends(ValidationError, _super); + /* istanbul ignore next */ + return false; +} +exports.isCodeUnitLessThan = isCodeUnitLessThan; +/** + * Isomorphic encodes the given string. + * + * @param str - a string + */ +function isomorphicEncode(str) { + var e_1, _a; /** - * @param message - error message - */ - function ValidationError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "ValidationError", message) || this; + * 1. Assert: input contains no code points greater than U+00FF. + * 2. Return a byte sequence whose length is equal to input’s length and whose + * bytes have the same values as input’s code points, in the same order. + */ + var codePoints = Array.from(str); + var bytes = new Uint8Array(codePoints.length); + var i = 0; + try { + for (var str_1 = __values(str), str_1_1 = str_1.next(); !str_1_1.done; str_1_1 = str_1.next()) { + var codePoint = str_1_1.value; + var byte = codePoint.codePointAt(0); + console.assert(byte !== undefined && byte <= 0x00FF, "isomorphicEncode requires string bytes to be less than or equal to 0x00FF."); + if (byte !== undefined && byte <= 0x00FF) { + bytes[i++] = byte; + } + } } - return ValidationError; -}(DOMException)); -exports.ValidationError = ValidationError; -var TypeMismatchError = /** @class */ (function (_super) { - __extends(TypeMismatchError, _super); - /** - * @param message - error message - */ - function TypeMismatchError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "TypeMismatchError", message) || this; + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (str_1_1 && !str_1_1.done && (_a = str_1.return)) _a.call(str_1); + } + finally { if (e_1) throw e_1.error; } } - return TypeMismatchError; -}(DOMException)); -exports.TypeMismatchError = TypeMismatchError; -var SecurityError = /** @class */ (function (_super) { - __extends(SecurityError, _super); + return bytes; +} +exports.isomorphicEncode = isomorphicEncode; +/** + * Determines if the given string is An ASCII string. + * + * @param str - a string + */ +function isASCIIString(str) { /** - * @param message - error message - */ - function SecurityError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "SecurityError", "The operation is insecure. " + message) || this; - } - return SecurityError; -}(DOMException)); -exports.SecurityError = SecurityError; -var NetworkError = /** @class */ (function (_super) { - __extends(NetworkError, _super); + * An ASCII string is a string whose code points are all ASCII code points. + */ + return /^[\u0000-\u007F]*$/.test(str); +} +exports.isASCIIString = isASCIIString; +/** + * Converts all uppercase ASCII code points to lowercase. + * + * @param str - a string + */ +function asciiLowercase(str) { + var e_2, _a; /** - * @param message - error message - */ - function NetworkError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "NetworkError", "A network error occurred. " + message) || this; + * To ASCII lowercase a string, replace all ASCII upper alphas in the string + * with their corresponding code point in ASCII lower alpha. + */ + var result = ""; + try { + for (var str_2 = __values(str), str_2_1 = str_2.next(); !str_2_1.done; str_2_1 = str_2.next()) { + var c = str_2_1.value; + var code = c.codePointAt(0); + if (code !== undefined && code >= 0x41 && code <= 0x5A) { + result += String.fromCodePoint(code + 0x20); + } + else { + result += c; + } + } } - return NetworkError; -}(DOMException)); -exports.NetworkError = NetworkError; -var AbortError = /** @class */ (function (_super) { - __extends(AbortError, _super); - /** - * @param message - error message - */ - function AbortError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "AbortError", "The operation was aborted. " + message) || this; + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (str_2_1 && !str_2_1.done && (_a = str_2.return)) _a.call(str_2); + } + finally { if (e_2) throw e_2.error; } } - return AbortError; -}(DOMException)); -exports.AbortError = AbortError; -var URLMismatchError = /** @class */ (function (_super) { - __extends(URLMismatchError, _super); + return result; +} +exports.asciiLowercase = asciiLowercase; +/** + * Converts all uppercase ASCII code points to uppercase. + * + * @param str - a string + */ +function asciiUppercase(str) { + var e_3, _a; /** - * @param message - error message - */ - function URLMismatchError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "URLMismatchError", "The given URL does not match another URL. " + message) || this; + * To ASCII uppercase a string, replace all ASCII lower alphas in the string + * with their corresponding code point in ASCII upper alpha. + */ + var result = ""; + try { + for (var str_3 = __values(str), str_3_1 = str_3.next(); !str_3_1.done; str_3_1 = str_3.next()) { + var c = str_3_1.value; + var code = c.codePointAt(0); + if (code !== undefined && code >= 0x61 && code <= 0x7A) { + result += String.fromCodePoint(code - 0x20); + } + else { + result += c; + } + } } - return URLMismatchError; -}(DOMException)); -exports.URLMismatchError = URLMismatchError; -var QuotaExceededError = /** @class */ (function (_super) { - __extends(QuotaExceededError, _super); - /** - * @param message - error message - */ - function QuotaExceededError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "QuotaExceededError", "The quota has been exceeded. " + message) || this; + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (str_3_1 && !str_3_1.done && (_a = str_3.return)) _a.call(str_3); + } + finally { if (e_3) throw e_3.error; } } - return QuotaExceededError; -}(DOMException)); -exports.QuotaExceededError = QuotaExceededError; -var TimeoutError = /** @class */ (function (_super) { - __extends(TimeoutError, _super); + return result; +} +exports.asciiUppercase = asciiUppercase; +/** + * Compares two ASCII strings case-insensitively. + * + * @param a - a string + * @param b - a string + */ +function asciiCaseInsensitiveMatch(a, b) { /** - * @param message - error message - */ - function TimeoutError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "TimeoutError", "The operation timed out. " + message) || this; - } - return TimeoutError; -}(DOMException)); -exports.TimeoutError = TimeoutError; -var InvalidNodeTypeError = /** @class */ (function (_super) { - __extends(InvalidNodeTypeError, _super); + * A string A is an ASCII case-insensitive match for a string B, if the ASCII + * lowercase of A is the ASCII lowercase of B. + */ + return asciiLowercase(a) === asciiLowercase(b); +} +exports.asciiCaseInsensitiveMatch = asciiCaseInsensitiveMatch; +/** + * ASCII encodes a string. + * + * @param str - a string + */ +function asciiEncode(str) { /** - * @param message - error message - */ - function InvalidNodeTypeError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "InvalidNodeTypeError", "The supplied node is incorrect or has an incorrect ancestor for this operation. " + message) || this; + * 1. Assert: input is an ASCII string. + * 2. Return the isomorphic encoding of input. + */ + console.assert(isASCIIString(str), "asciiEncode requires an ASCII string."); + return isomorphicEncode(str); +} +exports.asciiEncode = asciiEncode; +/** + * ASCII decodes a byte sequence. + * + * @param bytes - a byte sequence + */ +function asciiDecode(bytes) { + var e_4, _a; + try { + /** + * 1. Assert: All bytes in input are ASCII bytes. + * 2. Return the isomorphic decoding of input. + */ + for (var bytes_1 = __values(bytes), bytes_1_1 = bytes_1.next(); !bytes_1_1.done; bytes_1_1 = bytes_1.next()) { + var byte = bytes_1_1.value; + console.assert(Byte_1.isASCIIByte(byte), "asciiDecode requires an ASCII byte sequence."); + } } - return InvalidNodeTypeError; -}(DOMException)); -exports.InvalidNodeTypeError = InvalidNodeTypeError; -var DataCloneError = /** @class */ (function (_super) { - __extends(DataCloneError, _super); - /** - * @param message - error message - */ - function DataCloneError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "DataCloneError", "The object can not be cloned. " + message) || this; + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (bytes_1_1 && !bytes_1_1.done && (_a = bytes_1.return)) _a.call(bytes_1); + } + finally { if (e_4) throw e_4.error; } } - return DataCloneError; -}(DOMException)); -exports.DataCloneError = DataCloneError; -var NotImplementedError = /** @class */ (function (_super) { - __extends(NotImplementedError, _super); + return ByteSequence_1.isomorphicDecode(bytes); +} +exports.asciiDecode = asciiDecode; +/** + * Strips newline characters from a string. + * + * @param str - a string + */ +function stripNewlines(str) { /** - * @param message - error message - */ - function NotImplementedError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "NotImplementedError", "The DOM method is not implemented by this module. " + message) || this; - } - return NotImplementedError; -}(DOMException)); -exports.NotImplementedError = NotImplementedError; -var HierarchyRequestError = /** @class */ (function (_super) { - __extends(HierarchyRequestError, _super); + * To strip newlines from a string, remove any U+000A LF and U+000D CR code + * points from the string. + */ + return str.replace(/[\n\r]/g, ""); +} +exports.stripNewlines = stripNewlines; +/** + * Normalizes newline characters in a string by converting consecutive + * carriage-return newline characters and also single carriage return characters + * into a single newline. + * + * @param str - a string + */ +function normalizeNewlines(str) { /** - * @param message - error message + * To normalize newlines in a string, replace every U+000D CR U+000A LF code + * point pair with a single U+000A LF code point, and then replace every + * remaining U+000D CR code point with a U+000A LF code point. */ - function HierarchyRequestError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "HierarchyRequestError", "The operation would yield an incorrect node tree. " + message) || this; - } - return HierarchyRequestError; -}(DOMException)); -exports.HierarchyRequestError = HierarchyRequestError; -var NotFoundError = /** @class */ (function (_super) { - __extends(NotFoundError, _super); + return str.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); +} +exports.normalizeNewlines = normalizeNewlines; +/** + * Removes leading and trailing whitespace characters from a string. + * + * @param str - a string + */ +function stripLeadingAndTrailingASCIIWhitespace(str) { /** - * @param message - error message + * To strip leading and trailing ASCII whitespace from a string, remove all + * ASCII whitespace that are at the start or the end of the string. */ - function NotFoundError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "NotFoundError", "The object can not be found here. " + message) || this; - } - return NotFoundError; -}(DOMException)); -exports.NotFoundError = NotFoundError; -var IndexSizeError = /** @class */ (function (_super) { - __extends(IndexSizeError, _super); + return str.replace(/^[\t\n\f\r ]+/, "").replace(/[\t\n\f\r ]+$/, ""); +} +exports.stripLeadingAndTrailingASCIIWhitespace = stripLeadingAndTrailingASCIIWhitespace; +/** + * Removes consecutive newline characters from a string. + * + * @param str - a string + */ +function stripAndCollapseASCIIWhitespace(str) { /** - * @param message - error message + * To strip and collapse ASCII whitespace in a string, replace any sequence of + * one or more consecutive code points that are ASCII whitespace in the string + * with a single U+0020 SPACE code point, and then remove any leading and + * trailing ASCII whitespace from that string. */ - function IndexSizeError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "IndexSizeError", "The index is not in the allowed range. " + message) || this; - } - return IndexSizeError; -}(DOMException)); -exports.IndexSizeError = IndexSizeError; -var SyntaxError = /** @class */ (function (_super) { - __extends(SyntaxError, _super); + return stripLeadingAndTrailingASCIIWhitespace(str.replace(/[\t\n\f\r ]{2,}/g, " ")); +} +exports.stripAndCollapseASCIIWhitespace = stripAndCollapseASCIIWhitespace; +/** + * Collects a sequence of code points matching a given condition from the input + * string. + * + * @param condition - a condition to match + * @param input - a string + * @param options - starting position + */ +function collectASequenceOfCodePoints(condition, input, options) { /** - * @param message - error message + * 1. Let result be the empty string. + * 2. While position doesn’t point past the end of input and the code point at + * position within input meets the condition condition: + * 2.1. Append that code point to the end of result. + * 2.2. Advance position by 1. + * 3. Return result. */ - function SyntaxError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "SyntaxError", "The string did not match the expected pattern. " + message) || this; + if (!util_1.isArray(input)) + return collectASequenceOfCodePoints(condition, Array.from(input), options); + var result = ""; + while (options.position < input.length && !!condition.call(null, input[options.position])) { + result += input[options.position]; + options.position++; } - return SyntaxError; -}(DOMException)); -exports.SyntaxError = SyntaxError; -var InvalidCharacterError = /** @class */ (function (_super) { - __extends(InvalidCharacterError, _super); + return result; +} +exports.collectASequenceOfCodePoints = collectASequenceOfCodePoints; +/** + * Skips over ASCII whitespace. + * + * @param input - input string + * @param options - starting position + */ +function skipASCIIWhitespace(input, options) { /** - * @param message - error message + * To skip ASCII whitespace within a string input given a position variable + * position, collect a sequence of code points that are ASCII whitespace from + * input given position. The collected code points are not used, but position + * is still updated. */ - function InvalidCharacterError(message) { - if (message === void 0) { message = ""; } - return _super.call(this, "InvalidCharacterError", "The string contains invalid characters. " + message) || this; + collectASequenceOfCodePoints(function (str) { return CodePoints_1.ASCIIWhiteSpace.test(str); }, input, options); +} +exports.skipASCIIWhitespace = skipASCIIWhitespace; +/** + * Solits a string at the given delimiter. + * + * @param input - input string + * @param delimiter - a delimiter string + */ +function strictlySplit(input, delimiter) { + /** + * 1. Let position be a position variable for input, initially pointing at the + * start of input. + * 2. Let tokens be a list of strings, initially empty. + * 3. Let token be the result of collecting a sequence of code points that are + * not equal to delimiter from input, given position. + * 4. Append token to tokens. + * 5. While position is not past the end of input: + * 5.1. Assert: the code point at position within input is delimiter. + * 5.2. Advance position by 1. + * 5.3. Let token be the result of collecting a sequence of code points that + * are not equal to delimiter from input, given position. + * 5.4. Append token to tokens. + * 6. Return tokens. + */ + if (!util_1.isArray(input)) + return strictlySplit(Array.from(input), delimiter); + var options = { position: 0 }; + var tokens = []; + var token = collectASequenceOfCodePoints(function (str) { return delimiter !== str; }, input, options); + tokens.push(token); + while (options.position < input.length) { + console.assert(input[options.position] === delimiter, "strictlySplit found no delimiter in input string."); + options.position++; + token = collectASequenceOfCodePoints(function (str) { return delimiter !== str; }, input, options); + tokens.push(token); } - return InvalidCharacterError; -}(DOMException)); -exports.InvalidCharacterError = InvalidCharacterError; -//# sourceMappingURL=DOMException.js.map - -/***/ }), - -/***/ 14177: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -var CreateAlgorithm_1 = __nccwpck_require__(57339); + return tokens; +} +exports.strictlySplit = strictlySplit; /** - * Represents an object implementing DOM algorithms. + * Splits a string on ASCII whitespace. + * + * @param input - a string */ -var DOMImpl = /** @class */ (function () { +function splitAStringOnASCIIWhitespace(input) { /** - * Initializes a new instance of `DOM`. + * 1. Let position be a position variable for input, initially pointing at the + * start of input. + * 2. Let tokens be a list of strings, initially empty. + * 3. Skip ASCII whitespace within input given position. + * 4. While position is not past the end of input: + * 4.1. Let token be the result of collecting a sequence of code points that + * are not ASCII whitespace from input, given position. + * 4.2. Append token to tokens. + * 4.3. Skip ASCII whitespace within input given position. + * 5. Return tokens. */ - function DOMImpl() { - this._features = { - mutationObservers: true, - customElements: true, - slots: true, - steps: true - }; - this._window = null; - this._compareCache = new util_1.CompareCache(); - this._rangeList = new util_1.FixedSizeSet(); + if (!util_1.isArray(input)) + return splitAStringOnASCIIWhitespace(Array.from(input)); + var options = { position: 0 }; + var tokens = []; + skipASCIIWhitespace(input, options); + while (options.position < input.length) { + var token = collectASequenceOfCodePoints(function (str) { return !CodePoints_1.ASCIIWhiteSpace.test(str); }, input, options); + tokens.push(token); + skipASCIIWhitespace(input, options); } + return tokens; +} +exports.splitAStringOnASCIIWhitespace = splitAStringOnASCIIWhitespace; +/** + * Splits a string on commas. + * + * @param input - a string + */ +function splitAStringOnCommas(input) { /** - * Sets DOM algorithm features. - * - * @param features - DOM features supported by algorithms. All features are - * enabled by default unless explicity disabled. + * 1. Let position be a position variable for input, initially pointing at the + * start of input. + * 2. Let tokens be a list of strings, initially empty. + * 3. While position is not past the end of input: + * 3.1. Let token be the result of collecting a sequence of code points that + * are not U+002C (,) from input, given position. + * 3.2. Strip leading and trailing ASCII whitespace from token. + * 3.3. Append token to tokens. + * 3.4. If position is not past the end of input, then: + * 3.4.1. Assert: the code point at position within input is U+002C (,). + * 3.4.2. Advance position by 1. + * 4. Return tokens. */ - DOMImpl.prototype.setFeatures = function (features) { - if (features === undefined) - features = true; - if (util_1.isObject(features)) { - for (var key in features) { - this._features[key] = features[key] || false; - } - } - else { - // enable/disable all features - for (var key in this._features) { - this._features[key] = features; - } + if (!util_1.isArray(input)) + return splitAStringOnCommas(Array.from(input)); + var options = { position: 0 }; + var tokens = []; + while (options.position < input.length) { + var token = collectASequenceOfCodePoints(function (str) { return str !== ','; }, input, options); + tokens.push(stripLeadingAndTrailingASCIIWhitespace(token)); + if (options.position < input.length) { + console.assert(input[options.position] === ',', "splitAStringOnCommas found no delimiter in input string."); + options.position++; } - }; - Object.defineProperty(DOMImpl.prototype, "features", { - /** - * Gets DOM algorithm features. - */ - get: function () { return this._features; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DOMImpl.prototype, "window", { - /** - * Gets the DOM window. - */ - get: function () { - if (this._window === null) { - this._window = CreateAlgorithm_1.create_window(); - } - return this._window; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DOMImpl.prototype, "compareCache", { - /** - * Gets the global node compare cache. - */ - get: function () { return this._compareCache; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DOMImpl.prototype, "rangeList", { - /** - * Gets the global range list. - */ - get: function () { return this._rangeList; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DOMImpl, "instance", { - /** - * Returns the instance of `DOM`. - */ - get: function () { - if (!DOMImpl._instance) { - DOMImpl._instance = new DOMImpl(); - } - return DOMImpl._instance; - }, - enumerable: true, - configurable: true - }); - return DOMImpl; -}()); + } + return tokens; +} +exports.splitAStringOnCommas = splitAStringOnCommas; /** - * Represents an object implementing DOM algorithms. + * Concatenates a list of strings with the given separator. + * + * @param list - a list of strings + * @param separator - a separator string */ -exports.dom = DOMImpl.instance; -//# sourceMappingURL=DOMImpl.js.map +function concatenate(list, separator) { + if (separator === void 0) { separator = ""; } + /** + * 1. If list is empty, then return the empty string. + * 2. If separator is not given, then set separator to the empty string. + * 3. Return a string whose contents are list’s items, in order, separated + * from each other by separator. + */ + if (list.length === 0) + return ""; + return list.join(separator); +} +exports.concatenate = concatenate; +//# sourceMappingURL=String.js.map /***/ }), -/***/ 42197: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 84251: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); -/** - * Represents an object providing methods which are not dependent on - * any particular document. - */ -var DOMImplementationImpl = /** @class */ (function () { - /** - * Initializes a new instance of `DOMImplementation`. - * - * @param document - the associated document - */ - function DOMImplementationImpl(document) { - this._associatedDocument = document || DOMImpl_1.dom.window.document; - } - /** @inheritdoc */ - DOMImplementationImpl.prototype.createDocumentType = function (qualifiedName, publicId, systemId) { - /** - * 1. Validate qualifiedName. - * 2. Return a new doctype, with qualifiedName as its name, publicId as its - * public ID, and systemId as its system ID, and with its node document set - * to the associated document of the context object. - */ - algorithm_1.namespace_validate(qualifiedName); - return algorithm_1.create_documentType(this._associatedDocument, qualifiedName, publicId, systemId); - }; - /** @inheritdoc */ - DOMImplementationImpl.prototype.createDocument = function (namespace, qualifiedName, doctype) { - if (doctype === void 0) { doctype = null; } - /** - * 1. Let document be a new XMLDocument. - */ - var document = algorithm_1.create_xmlDocument(); - /** - * 2. Let element be null. - * 3. If qualifiedName is not the empty string, then set element to - * the result of running the internal createElementNS steps, given document, - * namespace, qualifiedName, and an empty dictionary. - */ - var element = null; - if (qualifiedName) { - element = algorithm_1.document_internalCreateElementNS(document, namespace, qualifiedName); - } - /** - * 4. If doctype is non-null, append doctype to document. - * 5. If element is non-null, append element to document. - */ - if (doctype) - document.appendChild(doctype); - if (element) - document.appendChild(element); - /** - * 6. document’s origin is context object’s associated document’s origin. - */ - document._origin = this._associatedDocument._origin; - /** - * 7. document’s content type is determined by namespace: - * - HTML namespace - * application/xhtml+xml - * - SVG namespace - * image/svg+xml - * - Any other namespace - * application/xml - */ - if (namespace === infra_1.namespace.HTML) - document._contentType = "application/xhtml+xml"; - else if (namespace === infra_1.namespace.SVG) - document._contentType = "image/svg+xml"; - else - document._contentType = "application/xml"; - /** - * 8. Return document. - */ - return document; - }; - /** @inheritdoc */ - DOMImplementationImpl.prototype.createHTMLDocument = function (title) { - /** - * 1. Let doc be a new document that is an HTML document. - * 2. Set doc’s content type to "text/html". - */ - var doc = algorithm_1.create_document(); - doc._type = "html"; - doc._contentType = "text/html"; - /** - * 3. Append a new doctype, with "html" as its name and with its node - * document set to doc, to doc. - */ - doc.appendChild(algorithm_1.create_documentType(doc, "html", "", "")); - /** - * 4. Append the result of creating an element given doc, html, and the - * HTML namespace, to doc. - */ - var htmlElement = algorithm_1.element_createAnElement(doc, "html", infra_1.namespace.HTML); - doc.appendChild(htmlElement); - /** - * 5. Append the result of creating an element given doc, head, and the - * HTML namespace, to the html element created earlier. - */ - var headElement = algorithm_1.element_createAnElement(doc, "head", infra_1.namespace.HTML); - htmlElement.appendChild(headElement); - /** - * 6. If title is given: - * 6.1. Append the result of creating an element given doc, title, and - * the HTML namespace, to the head element created earlier. - * 6.2. Append a new Text node, with its data set to title (which could - * be the empty string) and its node document set to doc, to the title - * element created earlier. - */ - if (title !== undefined) { - var titleElement = algorithm_1.element_createAnElement(doc, "title", infra_1.namespace.HTML); - headElement.appendChild(titleElement); - var textElement = algorithm_1.create_text(doc, title); - titleElement.appendChild(textElement); - } - /** - * 7. Append the result of creating an element given doc, body, and the - * HTML namespace, to the html element created earlier. - */ - var bodyElement = algorithm_1.element_createAnElement(doc, "body", infra_1.namespace.HTML); - htmlElement.appendChild(bodyElement); - /** - * 8. doc’s origin is context object’s associated document’s origin. - */ - doc._origin = this._associatedDocument._origin; - /** - * 9. Return doc. - */ - return doc; - }; - /** @inheritdoc */ - DOMImplementationImpl.prototype.hasFeature = function () { return true; }; - /** - * Creates a new `DOMImplementation`. - * - * @param document - owner document - */ - DOMImplementationImpl._create = function (document) { - return new DOMImplementationImpl(document); - }; - return DOMImplementationImpl; -}()); -exports.DOMImplementationImpl = DOMImplementationImpl; -WebIDLAlgorithm_1.idl_defineConst(DOMImplementationImpl.prototype, "_ID", "@oozcitak/dom"); -//# sourceMappingURL=DOMImplementationImpl.js.map +var base64 = __importStar(__nccwpck_require__(28585)); +exports.base64 = base64; +var byte = __importStar(__nccwpck_require__(42460)); +exports.byte = byte; +var byteSequence = __importStar(__nccwpck_require__(71627)); +exports.byteSequence = byteSequence; +var codePoint = __importStar(__nccwpck_require__(28548)); +exports.codePoint = codePoint; +var json = __importStar(__nccwpck_require__(99387)); +exports.json = json; +var list = __importStar(__nccwpck_require__(20340)); +exports.list = list; +var map = __importStar(__nccwpck_require__(22298)); +exports.map = map; +var namespace = __importStar(__nccwpck_require__(93764)); +exports.namespace = namespace; +var queue = __importStar(__nccwpck_require__(39201)); +exports.queue = queue; +var set = __importStar(__nccwpck_require__(35931)); +exports.set = set; +var stack = __importStar(__nccwpck_require__(38784)); +exports.stack = stack; +var string = __importStar(__nccwpck_require__(13203)); +exports.string = string; +//# sourceMappingURL=index.js.map /***/ }), -/***/ 65096: +/***/ 53568: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -52524,84 +38266,230 @@ var __values = (this && this.__values) || function(o) { }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var DOMException_1 = __nccwpck_require__(13166); +var util_1 = __nccwpck_require__(76195); +var interfaces_1 = __nccwpck_require__(31752); var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); +var url_1 = __nccwpck_require__(57310); +var _validationErrorCallback; /** - * Represents a token set. + * Default ports for a special URL scheme. */ -var DOMTokenListImpl = /** @class */ (function () { +var _defaultPorts = { + "ftp": 21, + "file": null, + "http": 80, + "https": 443, + "ws": 80, + "wss": 443 +}; +/** + * The C0 control percent-encode set are the C0 controls and all code points + * greater than U+007E (~). + */ +var _c0ControlPercentEncodeSet = /[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +/** + * The fragment percent-encode set is the C0 control percent-encode set and + * U+0020 SPACE, U+0022 ("), U+003C (<), U+003E (>), and U+0060 (`). + */ +var _fragmentPercentEncodeSet = /[ "<>`]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +/** + * The path percent-encode set is the fragment percent-encode set and + * U+0023 (#), U+003F (?), U+007B ({), and U+007D (}). + */ +var _pathPercentEncodeSet = /[ "<>`#?{}]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +/** + * The userinfo percent-encode set is the path percent-encode set and + * U+002F (/), U+003A (:), U+003B (;), U+003D (=), U+0040 (@), U+005B ([), + * U+005C (\), U+005D (]), U+005E (^), and U+007C (|). + */ +var _userInfoPercentEncodeSet = /[ "<>`#?{}/:;=@\[\]\\\^\|]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +/** + * The URL code points are ASCII alphanumeric, U+0021 (!), U+0024 ($), + * U+0026 (&), U+0027 ('), U+0028 LEFT PARENTHESIS, U+0029 RIGHT PARENTHESIS, + * U+002A (*), U+002B (+), U+002C (,), U+002D (-), U+002E (.), U+002F (/), + * U+003A (:), U+003B (;), U+003D (=), U+003F (?), U+0040 (@), U+005F (_), + * U+007E (~), and code points in the range U+00A0 to U+10FFFD, inclusive, + * excluding surrogates and noncharacters. + */ +var _urlCodePoints = /[0-9A-Za-z!\$&-\/:;=\?@_~\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB40-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD]/; +/** + * A forbidden host code point is U+0000 NULL, U+0009 TAB, U+000A LF, + * U+000D CR, U+0020 SPACE, U+0023 (#), U+0025 (%), U+002F (/), U+003A (:), + * U+003F (?), U+0040 (@), U+005B ([), U+005C (\), or U+005D (]). + */ +var _forbiddenHostCodePoint = /[\0\t\f\r #%/:?@\[\\\]]/; +/** + * Sets the callback function for validation errors. + * + * @param validationErrorCallback - a callback function to be called when a + * validation error occurs + */ +function setValidationErrorCallback(validationErrorCallback) { + _validationErrorCallback = validationErrorCallback; +} +exports.setValidationErrorCallback = setValidationErrorCallback; +/** + * Generates a validation error. + * + * @param message - error message + */ +function validationError(message) { + if (_validationErrorCallback !== undefined) { + _validationErrorCallback.call(null, "Validation Error: " + message); + } +} +/** + * Creates a new URL. + */ +function newURL() { + return { + scheme: '', + username: '', + password: '', + host: null, + port: null, + path: [], + query: null, + fragment: null, + _cannotBeABaseURLFlag: false, + _blobURLEntry: null + }; +} +exports.newURL = newURL; +/** + * Determines if the scheme is a special scheme. + * + * @param scheme - a scheme + */ +function isSpecialScheme(scheme) { + return (scheme in _defaultPorts); +} +exports.isSpecialScheme = isSpecialScheme; +/** + * Determines if the URL has a special scheme. + * + * @param url - an URL + */ +function isSpecial(url) { + return isSpecialScheme(url.scheme); +} +exports.isSpecial = isSpecial; +/** + * Returns the default port for a special scheme. + * + * @param scheme - a scheme + */ +function defaultPort(scheme) { + return _defaultPorts[scheme] || null; +} +exports.defaultPort = defaultPort; +/** + * Determines if the URL has credentials. + * + * @param url - an URL + */ +function includesCredentials(url) { + return url.username !== '' || url.password !== ''; +} +exports.includesCredentials = includesCredentials; +/** + * Determines if an URL cannot have credentials. + * + * @param url - an URL + */ +function cannotHaveAUsernamePasswordPort(url) { /** - * Initializes a new instance of `DOMTokenList`. - * - * @param element - associated element - * @param attribute - associated attribute + * A URL cannot have a username/password/port if its host is null or the + * empty string, its cannot-be-a-base-URL flag is set, or its scheme is + * "file". */ - function DOMTokenListImpl(element, attribute) { + return (url.host === null || url.host === "" || url._cannotBeABaseURLFlag || + url.scheme === "file"); +} +exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; +/** + * Serializes an URL into a string. + * + * @param url - an URL + */ +function urlSerializer(url, excludeFragmentFlag) { + var e_1, _a; + if (excludeFragmentFlag === void 0) { excludeFragmentFlag = false; } + /** + * 1. Let output be url’s scheme and U+003A (:) concatenated. + */ + var output = url.scheme + ':'; + /** + * 2. If url’s host is non-null: + */ + if (url.host !== null) { /** - * 1. Let element be associated element. - * 2. Let localName be associated attribute’s local name. - * 3. Let value be the result of getting an attribute value given element - * and localName. - * 4. Run the attribute change steps for element, localName, value, value, - * and null. + * 2.1. Append "//" to output. */ - this._element = element; - this._attribute = attribute; - this._tokenSet = new Set(); - var localName = attribute._localName; - var value = algorithm_1.element_getAnAttributeValue(element, localName); - // define a closure to be called when the associated attribute's value changes - var thisObj = this; - function updateTokenSet(element, localName, oldValue, value, namespace) { + output += '//'; + /** + * 2.2. If url includes credentials, then: + */ + if (includesCredentials(url)) { /** - * 1. If localName is associated attribute’s local name, namespace is null, - * and value is null, then empty token set. - * 2. Otherwise, if localName is associated attribute’s local name, - * namespace is null, then set token set to value, parsed. + * 2.2.1. Append url’s username to output. + * 2.2.2. If url’s password is not the empty string, then append U+003A (:), + * followed by url’s password, to output. + * 2.2.3. Append U+0040 (@) to output. */ - if (localName === thisObj._attribute._localName && namespace === null) { - if (!value) - thisObj._tokenSet.clear(); - else - thisObj._tokenSet = algorithm_1.orderedSet_parse(value); + output += url.username; + if (url.password !== '') { + output += ':' + url.password; } + output += '@'; } - // add the closure to the associated element's attribute change steps - this._element._attributeChangeSteps.push(updateTokenSet); - if (DOMImpl_1.dom.features.steps) { - algorithm_1.dom_runAttributeChangeSteps(element, localName, value, value, null); + /** + * 2.3. Append url’s host, serialized, to output. + * 2.4. If url’s port is non-null, append U+003A (:) followed by url’s port, + * serialized, to output. + */ + output += hostSerializer(url.host); + if (url.port !== null) { + output += ':' + url.port; } } - Object.defineProperty(DOMTokenListImpl.prototype, "length", { - /** @inheritdoc */ - get: function () { - /** - * The length attribute' getter must return context object’s token set’s - * size. - */ - return this._tokenSet.size; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - DOMTokenListImpl.prototype.item = function (index) { - var e_1, _a; + else if (url.host === null && url.scheme === "file") { /** - * 1. If index is equal to or greater than context object’s token set’s - * size, then return null. - * 2. Return context object’s token set[index]. + * 3. Otherwise, if url’s host is null and url’s scheme is "file", append "//" to output. */ - var i = 0; + output += '//'; + } + /** + * 4. If url’s cannot-be-a-base-URL flag is set, append url’s path[0] to + * output. + * 5. Otherwise, then for each string in url’s path, append U+002F (/) + * followed by the string to output. + */ + if (url._cannotBeABaseURLFlag) { + output += url.path[0]; + } + else { try { - for (var _b = __values(this._tokenSet), _c = _b.next(); !_c.done; _c = _b.next()) { - var token = _c.value; - if (i === index) - return token; - i++; + for (var _b = __values(url.path), _c = _b.next(); !_c.done; _c = _b.next()) { + var str = _c.value; + output += '/' + str; } } catch (e_1_1) { e_1 = { error: e_1_1 }; } @@ -52611,2374 +38499,2658 @@ var DOMTokenListImpl = /** @class */ (function () { } finally { if (e_1) throw e_1.error; } } - return null; - }; - /** @inheritdoc */ - DOMTokenListImpl.prototype.contains = function (token) { + } + /** + * 6. If url’s query is non-null, append U+003F (?), followed by url’s + * query, to output. + * 7. If the exclude fragment flag is unset and url’s fragment is non-null, + * append U+0023 (#), followed by url’s fragment, to output. + * 8. Return output. + */ + if (url.query !== null) { + output += '?' + url.query; + } + if (!excludeFragmentFlag && url.fragment !== null) { + output += '#' + url.fragment; + } + return output; +} +exports.urlSerializer = urlSerializer; +/** + * Serializes a host into a string. + * + * @param host - a host + */ +function hostSerializer(host) { + /** + * 1. If host is an IPv4 address, return the result of running the IPv4 + * serializer on host. + * 2. Otherwise, if host is an IPv6 address, return U+005B ([), followed + * by the result of running the IPv6 serializer on host, followed by + * U+005D (]). + * 3. Otherwise, host is a domain, opaque host, or empty host, return host. + */ + if (util_1.isNumber(host)) { + return iPv4Serializer(host); + } + else if (util_1.isArray(host)) { + return '[' + iPv6Serializer(host) + ']'; + } + else { + return host; + } +} +exports.hostSerializer = hostSerializer; +/** + * Serializes an IPv4 address into a string. + * + * @param address - an IPv4 address + */ +function iPv4Serializer(address) { + /** + * 1. Let output be the empty string. + * 2. Let n be the value of address. + * 3. For each i in the range 1 to 4, inclusive: + * 3.1. Prepend n % 256, serialized, to output. + * 3.2. If i is not 4, then prepend U+002E (.) to output. + * 3.3. Set n to floor(n / 256). + * 4. Return output. + */ + var output = ""; + var n = address; + for (var i = 1; i <= 4; i++) { + output = (n % 256).toString() + output; + if (i !== 4) { + output = '.' + output; + } + n = Math.floor(n / 256); + } + return output; +} +exports.iPv4Serializer = iPv4Serializer; +/** + * Serializes an IPv6 address into a string. + * + * @param address - an IPv6 address represented as a list of eight numbers + */ +function iPv6Serializer(address) { + /** + * 1. Let output be the empty string. + * 2. Let compress be an index to the first IPv6 piece in the first longest + * sequences of address’s IPv6 pieces that are 0. + * In 0:f:0:0:f:f:0:0 it would point to the second 0. + * 3. If there is no sequence of address’s IPv6 pieces that are 0 that is + * longer than 1, then set compress to null. + */ + var output = ""; + var compress = null; + var lastIndex = -1; + var count = 0; + var lastCount = 0; + for (var i = 0; i < 8; i++) { + if (address[i] !== 0) + continue; + count = 1; + for (var j = i + 1; j < 8; j++) { + if (address[j] !== 0) + break; + count++; + continue; + } + if (count > lastCount) { + lastCount = count; + lastIndex = i; + } + } + if (lastCount > 1) + compress = lastIndex; + /** + * 4. Let ignore0 be false. + * 5. For each pieceIndex in the range 0 to 7, inclusive: + */ + var ignore0 = false; + for (var pieceIndex = 0; pieceIndex < 8; pieceIndex++) { + /** + * 5.1. If ignore0 is true and address[pieceIndex] is 0, then continue. + * 5.2. Otherwise, if ignore0 is true, set ignore0 to false. + * 5.3. If compress is pieceIndex, then: + */ + if (ignore0 && address[pieceIndex] === 0) + continue; + if (ignore0) + ignore0 = false; + if (compress === pieceIndex) { + /** + * 5.3.1. Let separator be "::" if pieceIndex is 0, and U+003A (:) otherwise. + * 5.3.2. Append separator to output. + * 5.3.3. Set ignore0 to true and continue. + */ + output += (pieceIndex === 0 ? '::' : ':'); + ignore0 = true; + continue; + } /** - * The contains(token) method, when invoked, must return true if context - * object’s token set[token] exists, and false otherwise. + * 5.4. Append address[pieceIndex], represented as the shortest possible + * lowercase hexadecimal number, to output. + * 5.5. If pieceIndex is not 7, then append U+003A (:) to output. */ - return this._tokenSet.has(token); - }; - /** @inheritdoc */ - DOMTokenListImpl.prototype.add = function () { - var e_2, _a; - var tokens = []; - for (var _i = 0; _i < arguments.length; _i++) { - tokens[_i] = arguments[_i]; + output += address[pieceIndex].toString(16); + if (pieceIndex !== 7) + output += ':'; + } + /** + * 6. Return output. + */ + return output; +} +exports.iPv6Serializer = iPv6Serializer; +/** + * Parses an URL string. + * + * @param input - input string + * @param baseURL - base URL + * @param encodingOverride - encoding override + */ +function urlParser(input, baseURL, encodingOverride) { + /** + * 1. Let url be the result of running the basic URL parser on input with + * base, and encoding override as provided. + * 2. If url is failure, return failure. + * 3. If url’s scheme is not "blob", return url. + * 4. Set url’s blob URL entry to the result of resolving the blob URL url, + * if that did not return failure, and null otherwise. + * 5. Return url. + */ + var url = basicURLParser(input, baseURL, encodingOverride); + if (url === null) + return null; + if (url.scheme !== "blob") + return url; + var entry = resolveABlobURL(url); + if (entry !== null) { + url._blobURLEntry = entry; + } + else { + url._blobURLEntry = null; + } + return url; +} +exports.urlParser = urlParser; +/** + * Parses an URL string. + * + * @param input - input string + * @param baseURL - base URL + * @param encodingOverride - encoding override + */ +function basicURLParser(input, baseURL, encodingOverride, url, stateOverride) { + var e_2, _a, e_3, _b; + /** + * 1. If url is not given: + * 1.1. Set url to a new URL. + * 1.2. If input contains any leading or trailing C0 control or space, + * validation error. + * 1.3. Remove any leading and trailing C0 control or space from input. + */ + if (url === undefined) { + url = newURL(); + // leading + var leadingControlOrSpace = /^[\u0000-\u001F\u0020]+/; + var trailingControlOrSpace = /[\u0000-\u001F\u0020]+$/; + if (leadingControlOrSpace.test(input) || trailingControlOrSpace.test(input)) { + validationError("Input string contains leading or trailing control characters or space."); } - try { - /** - * 1. For each token in tokens: - * 1.1. If token is the empty string, then throw a "SyntaxError" - * DOMException. - * 1.2. If token contains any ASCII whitespace, then throw an - * "InvalidCharacterError" DOMException. - * 2. For each token in tokens, append token to context object’s token set. - * 3. Run the update steps. - */ - for (var tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) { - var token = tokens_1_1.value; - if (token === '') { - throw new DOMException_1.SyntaxError("Cannot add an empty token."); + input = input.replace(leadingControlOrSpace, ''); + input = input.replace(trailingControlOrSpace, ''); + } + /** + * 2. If input contains any ASCII tab or newline, validation error. + * 3. Remove all ASCII tab or newline from input. + */ + var tabOrNewline = /[\u0009\u000A\u000D]/g; + if (tabOrNewline.test(input)) { + validationError("Input string contains tab or newline characters."); + } + input = input.replace(tabOrNewline, ''); + /** + * 4. Let state be state override if given, or scheme start state otherwise. + * 5. If base is not given, set it to null. + * 6. Let encoding be UTF-8. + * 7. If encoding override is given, set encoding to the result of getting + * an output encoding from encoding override. + */ + var state = (stateOverride === undefined ? interfaces_1.ParserState.SchemeStart : stateOverride); + if (baseURL === undefined) + baseURL = null; + var encoding = (encodingOverride === undefined || + encodingOverride === "replacement" || encodingOverride === "UTF-16BE" || + encodingOverride === "UTF-16LE" ? "UTF-8" : encodingOverride); + /** + * 8. Let buffer be the empty string. + * 9. Let the @ flag, [] flag, and passwordTokenSeenFlag be unset. + * 10. Let pointer be a pointer to first code point in input. + */ + var buffer = ""; + var atFlag = false; + var arrayFlag = false; + var passwordTokenSeenFlag = false; + var EOF = ""; + var walker = new util_1.StringWalker(input); + /** + * 11. Keep running the following state machine by switching on state. If + * after a run pointer points to the EOF code point, go to the next step. + * Otherwise, increase pointer by one and continue with the state machine. + */ + while (true) { + switch (state) { + case interfaces_1.ParserState.SchemeStart: + /** + * 1. If c is an ASCII alpha, append c, lowercased, to buffer, and set + * state to scheme state. + * 2. Otherwise, if state override is not given, set state to no scheme + * state, and decrease pointer by one. + * 3. Otherwise, validation error, return failure. + */ + if (infra_1.codePoint.ASCIIAlpha.test(walker.c())) { + buffer += walker.c().toLowerCase(); + state = interfaces_1.ParserState.Scheme; + } + else if (stateOverride === undefined) { + state = interfaces_1.ParserState.NoScheme; + walker.pointer--; + } + else { + validationError("Invalid scheme start character."); + return null; + } + break; + case interfaces_1.ParserState.Scheme: + /** + * 1. If c is an ASCII alphanumeric, U+002B (+), U+002D (-), or U+002E + * (.), append c, lowercased, to buffer. + */ + if (infra_1.codePoint.ASCIIAlphanumeric.test(walker.c()) || + walker.c() === '+' || walker.c() === '-' || walker.c() === '.') { + buffer += walker.c().toLowerCase(); + } + else if (walker.c() === ':') { + /** + * 2. Otherwise, if c is U+003A (:), then: + * 2.1. If state override is given, then: + * 2.1.1. If url’s scheme is a special scheme and buffer is not a + * special scheme, then return. + * 2.1.2. If url’s scheme is not a special scheme and buffer is a + * special scheme, then return. + * 2.1.3. If url includes credentials or has a non-null port, and + * buffer is "file", then return. + * 2.1.4. If url’s scheme is "file" and its host is an empty host or + * null, then return. + */ + if (stateOverride !== undefined) { + if (isSpecialScheme(url.scheme) && !isSpecialScheme(buffer)) + return url; + if (!isSpecialScheme(url.scheme) && isSpecialScheme(buffer)) + return url; + if ((includesCredentials(url) || url.port !== null) && buffer === "file") + return url; + if (url.scheme === "file" && (url.host === "" || url.host === null)) + return url; + } + /** + * 2.2. Set url’s scheme to buffer. + */ + url.scheme = buffer; + /** + * 2.3. If state override is given, then: + * 2.3.1. If url’s port is url’s scheme’s default port, then set + * url’s port to null. + * 2.3.2. Return. + */ + if (stateOverride !== undefined) { + if (url.port === defaultPort(url.scheme)) { + url.port = null; + } + return url; + } + /** + * 2.4. Set buffer to the empty string. + */ + buffer = ""; + if (url.scheme === "file") { + /** + * 2.5. If url’s scheme is "file", then: + * 2.5.1. If remaining does not start with "//", validation error. + * 2.5.2. Set state to file state. + */ + if (!walker.remaining().startsWith("//")) { + validationError("Invalid file URL scheme, '//' expected."); + } + state = interfaces_1.ParserState.File; + } + else if (isSpecial(url) && baseURL !== null && baseURL.scheme === url.scheme) { + /** + * 2.6. Otherwise, if url is special, base is non-null, and base’s + * scheme is equal to url’s scheme, set state to special relative + * or authority state. + */ + state = interfaces_1.ParserState.SpecialRelativeOrAuthority; + } + else if (isSpecial(url)) { + /** + * 2.7. Otherwise, if url is special, set state to special + * authority slashes state. + */ + state = interfaces_1.ParserState.SpecialAuthoritySlashes; + } + else if (walker.remaining().startsWith("/")) { + /** + * 2.8. Otherwise, if remaining starts with an U+002F (/), set state + * to path or authority state and increase pointer by one. + */ + state = interfaces_1.ParserState.PathOrAuthority; + walker.pointer++; + } + else { + /** + * 2.9. Otherwise, set url’s cannot-be-a-base-URL flag, append an + * empty string to url’s path, and set state to + * cannot-be-a-base-URL path state. + */ + url._cannotBeABaseURLFlag = true; + url.path.push(""); + state = interfaces_1.ParserState.CannotBeABaseURLPath; + } + } + else if (stateOverride === undefined) { + /** + * 3. Otherwise, if state override is not given, set buffer to the + * empty string, state to no scheme state, and start over (from the + * first code point in input). + */ + buffer = ""; + state = interfaces_1.ParserState.NoScheme; + walker.pointer = 0; + continue; + } + else { + /** + * 4. Otherwise, validation error, return failure. + */ + validationError("Invalid input string."); + return null; + } + break; + case interfaces_1.ParserState.NoScheme: + /** + * 1. If base is null, or base’s cannot-be-a-base-URL flag is set + * and c is not U+0023 (#), validation error, return failure. + * 2. Otherwise, if base’s cannot-be-a-base-URL flag is set and + * c is U+0023 (#), set url’s scheme to base’s scheme, url’s path to + * a copy of base’s path, url’s query to base’s query, url’s + * fragment to the empty string, set url’s cannot-be-a-base-URL + * flag, and set state to fragment state. + * 3. Otherwise, if base’s scheme is not "file", set state to + * relative state and decrease pointer by one. + * 4. Otherwise, set state to file state and decrease pointer by one. + */ + if (baseURL === null || (baseURL._cannotBeABaseURLFlag && walker.c() !== '#')) { + validationError("Invalid input string."); + return null; + } + else if (baseURL._cannotBeABaseURLFlag && walker.c() === '#') { + url.scheme = baseURL.scheme; + url.path = infra_1.list.clone(baseURL.path); + url.query = baseURL.query; + url.fragment = ""; + url._cannotBeABaseURLFlag = true; + state = interfaces_1.ParserState.Fragment; + } + else if (baseURL.scheme !== "file") { + state = interfaces_1.ParserState.Relative; + walker.pointer--; + } + else { + state = interfaces_1.ParserState.File; + walker.pointer--; + } + break; + case interfaces_1.ParserState.SpecialRelativeOrAuthority: + /** + * If c is U+002F (/) and remaining starts with U+002F (/), then set + * state to special authority ignore slashes state and increase + * pointer by one. + * Otherwise, validation error, set state to relative state and + * decrease pointer by one. + */ + if (walker.c() === '/' && walker.remaining().startsWith('/')) { + state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; + walker.pointer++; + } + else { + validationError("Invalid input string."); + state = interfaces_1.ParserState.Relative; + walker.pointer--; + } + break; + case interfaces_1.ParserState.PathOrAuthority: + /** + * If c is U+002F (/), then set state to authority state. + * Otherwise, set state to path state, and decrease pointer by one. + */ + if (walker.c() === '/') { + state = interfaces_1.ParserState.Authority; + } + else { + state = interfaces_1.ParserState.Path; + walker.pointer--; + } + break; + case interfaces_1.ParserState.Relative: + /** + * Set url’s scheme to base’s scheme, and then, switching on c: + */ + if (baseURL === null) { + throw new Error("Invalid parser state. Base URL is null."); + } + url.scheme = baseURL.scheme; + switch (walker.c()) { + case EOF: // EOF + /** + * Set url’s username to base’s username, url’s password to base’s + * password, url’s host to base’s host, url’s port to base’s port, + * url’s path to a copy of base’s path, and url’s query to base’s + * query. + */ + url.username = baseURL.username; + url.password = baseURL.password; + url.host = baseURL.host; + url.port = baseURL.port; + url.path = infra_1.list.clone(baseURL.path); + url.query = baseURL.query; + break; + case '/': + /** + * Set state to relative slash state. + */ + state = interfaces_1.ParserState.RelativeSlash; + break; + case '?': + /** + * Set url’s username to base’s username, url’s password to base’s + * password, url’s host to base’s host, url’s port to base’s port, + * url’s path to a copy of base’s path, url’s query to the empty + * string, and state to query state. + */ + url.username = baseURL.username; + url.password = baseURL.password; + url.host = baseURL.host; + url.port = baseURL.port; + url.path = infra_1.list.clone(baseURL.path); + url.query = ""; + state = interfaces_1.ParserState.Query; + break; + case '#': + /** + * Set url’s username to base’s username, url’s password to base’s + * password, url’s host to base’s host, url’s port to base’s port, + * url’s path to a copy of base’s path, url’s query to base’s + * query, url’s fragment to the empty string, and state to + * fragment state. + */ + url.username = baseURL.username; + url.password = baseURL.password; + url.host = baseURL.host; + url.port = baseURL.port; + url.path = infra_1.list.clone(baseURL.path); + url.query = baseURL.query; + url.fragment = ""; + state = interfaces_1.ParserState.Fragment; + break; + default: + /** + * If url is special and c is U+005C (\), validation error, + * set state to relative slash state. + * Otherwise, run these steps: + * 1. Set url’s username to base’s username, url’s password to + * base’s password, url’s host to base’s host, url’s port to + * base’s port, url’s path to a copy of base’s path, and then + * remove url’s path’s last item, if any. + * 2. Set state to path state, and decrease pointer by one. + */ + if (isSpecial(url) && walker.c() === '\\') { + validationError("Invalid input string."); + state = interfaces_1.ParserState.RelativeSlash; + } + else { + url.username = baseURL.username; + url.password = baseURL.password; + url.host = baseURL.host; + url.port = baseURL.port; + url.path = infra_1.list.clone(baseURL.path); + if (url.path.length !== 0) + url.path.splice(url.path.length - 1, 1); + state = interfaces_1.ParserState.Path; + walker.pointer--; + } + break; + } + break; + case interfaces_1.ParserState.RelativeSlash: + /** + * 1. If url is special and c is U+002F (/) or U+005C (\), then: + * 1.1. If c is U+005C (\), validation error. + * 1.2. Set state to special authority ignore slashes state. + * 2. Otherwise, if c is U+002F (/), then set state to authority state. + * 3. Otherwise, set url’s username to base’s username, url’s password + * to base’s password, url’s host to base’s host, url’s port to base’s + * port, state to path state, and then, decrease pointer by one. + */ + if (isSpecial(url) && (walker.c() === '/' || walker.c() === '\\')) { + if (walker.c() === '\\') { + validationError("Invalid input string."); + } + state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; + } + else if (walker.c() === '/') { + state = interfaces_1.ParserState.Authority; + } + else { + if (baseURL === null) { + throw new Error("Invalid parser state. Base URL is null."); + } + url.username = baseURL.username; + url.password = baseURL.password; + url.host = baseURL.host; + url.port = baseURL.port; + state = interfaces_1.ParserState.Path; + walker.pointer--; + } + break; + case interfaces_1.ParserState.SpecialAuthoritySlashes: + /** + * If c is U+002F (/) and remaining starts with U+002F (/), then set + * state to special authority ignore slashes state and increase + * pointer by one. + * Otherwise, validation error, set state to special authority ignore + * slashes state, and decrease pointer by one. + */ + if (walker.c() === '/' && walker.remaining().startsWith('/')) { + state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; + walker.pointer++; + } + else { + validationError("Expected '//'."); + state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; + walker.pointer--; + } + break; + case interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes: + /** + * If c is neither U+002F (/) nor U+005C (\), then set state to + * authority state and decrease pointer by one. + * Otherwise, validation error. + */ + if (walker.c() !== '/' && walker.c() !== '\\') { + state = interfaces_1.ParserState.Authority; + walker.pointer--; + } + else { + validationError("Unexpected '/' or '\\'."); + } + break; + case interfaces_1.ParserState.Authority: + /** + * 1. If c is U+0040 (@), then: + */ + if (walker.c() === '@') { + /** + * 1.1. Validation error. + * 1.2. If the @ flag is set, prepend "%40" to buffer. + * 1.3. Set the @ flag. + * 1.4. For each codePoint in buffer: + */ + validationError("Unexpected '@'."); + if (atFlag) + buffer = '%40' + buffer; + atFlag = true; + try { + for (var buffer_1 = (e_2 = void 0, __values(buffer)), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { + var codePoint = buffer_1_1.value; + /** + * 1.4.1. If codePoint is U+003A (:) and passwordTokenSeenFlag is + * unset, then set passwordTokenSeenFlag and continue. + * 1.4.2. Let encodedCodePoints be the result of running UTF-8 + * percent encode codePoint using the userinfo percent-encode set. + * 1.4.3. If passwordTokenSeenFlag is set, then append + * encodedCodePoints to url’s password. + * 1.4.4. Otherwise, append encodedCodePoints to url’s username. + */ + if (codePoint === ':' && !passwordTokenSeenFlag) { + passwordTokenSeenFlag = true; + continue; + } + var encodedCodePoints = utf8PercentEncode(codePoint, _userInfoPercentEncodeSet); + if (passwordTokenSeenFlag) { + url.password += encodedCodePoints; + } + else { + url.username += encodedCodePoints; + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); + } + finally { if (e_2) throw e_2.error; } + } + /** + * 1.5. Set buffer to the empty string. + */ + buffer = ""; + } + else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' || + (isSpecial(url) && walker.c() === '\\')) { + /** + * 2. Otherwise, if one of the following is true + * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#) + * - url is special and c is U+005C (\) + * then: + * 2.1. If @ flag is set and buffer is the empty string, validation + * error, return failure. + * 2.2. Decrease pointer by the number of code points in buffer plus + * one, set buffer to the empty string, and set state to host state. + */ + if (atFlag && buffer === "") { + validationError("Invalid input string."); + return null; + } + walker.pointer -= (buffer.length + 1); + buffer = ""; + state = interfaces_1.ParserState.Host; + } + else { + /** + * 3. Otherwise, append c to buffer. + */ + buffer += walker.c(); + } + break; + case interfaces_1.ParserState.Host: + case interfaces_1.ParserState.Hostname: + if (stateOverride !== undefined && url.scheme === "file") { + /** + * 1. If state override is given and url’s scheme is "file", then + * decrease pointer by one and set state to file host state. + */ + walker.pointer--; + state = interfaces_1.ParserState.FileHost; + } + else if (walker.c() === ':' && !arrayFlag) { + /** + * 2. Otherwise, if c is U+003A (:) and the [] flag is unset, then: + * 2.1. If buffer is the empty string, validation error, return + * failure. + * 2.2. Let host be the result of host parsing buffer with url is + * not special. + * 2.3. If host is failure, then return failure. + * 2.4. Set url’s host to host, buffer to the empty string, and + * state to port state. + * 2.5. If state override is given and state override is hostname + * state, then return. + */ + if (buffer === "") { + validationError("Invalid input string."); + return null; + } + var host = hostParser(buffer, !isSpecial(url)); + if (host === null) + return null; + url.host = host; + buffer = ""; + state = interfaces_1.ParserState.Port; + if (stateOverride === interfaces_1.ParserState.Hostname) + return url; + } + else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' || + (isSpecial(url) && walker.c() === '\\')) { + /** + * 3. Otherwise, if one of the following is true + * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#) + * - url is special and c is U+005C (\) + * then decrease pointer by one, and then: + * 3.1. If url is special and buffer is the empty string, validation + * error, return failure. + * 3.2. Otherwise, if state override is given, buffer is the empty + * string, and either url includes credentials or url’s port is + * non-null, validation error, return. + * 3.3. Let host be the result of host parsing buffer with url is + * not special. + * 3.4. If host is failure, then return failure. + * 3.5. Set url’s host to host, buffer to the empty string, and + * state to path start state. + * 3.6. If state override is given, then return. + */ + walker.pointer--; + if (isSpecial(url) && buffer === "") { + validationError("Invalid input string."); + return null; + } + else if (stateOverride !== undefined && buffer === "" && + (includesCredentials(url) || url.port !== null)) { + validationError("Invalid input string."); + return url; + } + var host = hostParser(buffer, !isSpecial(url)); + if (host === null) + return null; + url.host = host; + buffer = ""; + state = interfaces_1.ParserState.PathStart; + if (stateOverride !== undefined) + return url; + } + else { + /** + * 4. Otherwise: + * 4.1. If c is U+005B ([), then set the [] flag. + * 4.2. If c is U+005D (]), then unset the [] flag. + * 4.3. Append c to buffer. + */ + if (walker.c() === '[') + arrayFlag = true; + if (walker.c() === ']') + arrayFlag = false; + buffer += walker.c(); + } + break; + case interfaces_1.ParserState.Port: + if (infra_1.codePoint.ASCIIDigit.test(walker.c())) { + /** + * 1. If c is an ASCII digit, append c to buffer. + */ + buffer += walker.c(); + } + else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' || + (isSpecial(url) && walker.c() === '\\') || stateOverride) { + /** + * 2. Otherwise, if one of the following is true + * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#) + * - url is special and c is U+005C (\) + * - state override is given + * then: + */ + if (buffer !== "") { + /** + * 2.1. If buffer is not the empty string, then: + * 2.1.1. Let port be the mathematical integer value that is + * represented by buffer in radix-10 using ASCII digits for digits + * with values 0 through 9. + * 2.1.2. If port is greater than 2**16 − 1, validation error, + * return failure. + * 2.1.3. Set url’s port to null, if port is url’s scheme’s default + * port, and to port otherwise. + * 2.1.4. Set buffer to the empty string. + */ + if (buffer !== "") { + var port = parseInt(buffer, 10); + if (port > Math.pow(2, 16) - 1) { + validationError("Invalid port number."); + return null; + } + url.port = (port === defaultPort(url.scheme) ? null : port); + buffer = ""; + } + } + /** + * 2.2. If state override is given, then return. + * 2.3. Set state to path start state, and decrease pointer by one. + */ + if (stateOverride !== undefined) { + return url; + } + state = interfaces_1.ParserState.PathStart; + walker.pointer--; + } + else { + /** + * 3. Otherwise, validation error, return failure. + */ + validationError("Invalid input string."); + return null; + } + break; + case interfaces_1.ParserState.File: + /** + * 1. Set url’s scheme to "file". + */ + url.scheme = "file"; + if (walker.c() === '/' || walker.c() === '\\') { + /** + * 2. If c is U+002F (/) or U+005C (\), then: + * 2.1. If c is U+005C (\), validation error. + * 2.2. Set state to file slash state. + */ + if (walker.c() === '\\') { + validationError("Invalid input string."); + } + state = interfaces_1.ParserState.FileSlash; + } + else if (baseURL !== null && baseURL.scheme === "file") { + /** + * 3. Otherwise, if base is non-null and base’s scheme is "file", + * switch on c: + */ + switch (walker.c()) { + case EOF: + /** + * Set url’s host to base’s host, url’s path to a copy of base’s + * path, and url’s query to base’s query. + */ + url.host = baseURL.host; + url.path = infra_1.list.clone(baseURL.path); + url.query = baseURL.query; + break; + case '?': + /** + * Set url’s host to base’s host, url’s path to a copy of base’s + * path, url’s query to the empty string, and state to query + * state. + */ + url.host = baseURL.host; + url.path = infra_1.list.clone(baseURL.path); + url.query = ""; + state = interfaces_1.ParserState.Query; + break; + case '#': + /** + * Set url’s host to base’s host, url’s path to a copy of base’s + * path, url’s query to base’s query, url’s fragment to the + * empty string, and state to fragment state. + */ + url.host = baseURL.host; + url.path = infra_1.list.clone(baseURL.path); + url.query = baseURL.query; + url.fragment = ""; + state = interfaces_1.ParserState.Fragment; + break; + default: + /** + * 1. If the substring from pointer in input does not start + * with a Windows drive letter, then set url’s host to base’s + * host, url’s path to a copy of base’s path, and then shorten + * url’s path. + * _Note:_ is a (platform-independent) Windows drive letter + * quirk. + * 2. Otherwise, validation error. + * 3. Set state to path state, and decrease pointer by one. + */ + if (!startsWithAWindowsDriveLetter(walker.substring())) { + url.host = baseURL.host; + url.path = infra_1.list.clone(baseURL.path); + shorten(url); + } + else { + validationError("Unexpected windows drive letter in input string."); + } + state = interfaces_1.ParserState.Path; + walker.pointer--; + break; + } + } + else { + /** + * 4. Otherwise, set state to path state, and decrease pointer by + * one. + */ + state = interfaces_1.ParserState.Path; + walker.pointer--; + } + break; + case interfaces_1.ParserState.FileSlash: + if (walker.c() === '/' || walker.c() === '\\') { + /** + * 1. If c is U+002F (/) or U+005C (\), then: + * 1.1. If c is U+005C (\), validation error. + * 1.2. Set state to file host state. + */ + if (walker.c() === '\\') { + validationError("Invalid input string."); + } + state = interfaces_1.ParserState.FileHost; + } + else { + /** + * 2. Otherwise: + * 2.1. If base is non-null, base’s scheme is "file", and the + * substring from pointer in input does not start with a Windows + * drive letter, then: + * 2.1.1. If base’s path[0] is a normalized Windows drive letter, + * then append base’s path[0] to url’s path. + * _Note:_ is a (platform-independent) Windows drive letter + * quirk. Both url’s and base’s host are null under these conditions + * and therefore not copied. + * 2.1.2. Otherwise, set url’s host to base’s host. + * 2.2. Set state to path state, and decrease pointer by one. + */ + if (baseURL !== null && baseURL.scheme === "file" && + !startsWithAWindowsDriveLetter(walker.substring())) { + if (isNormalizedWindowsDriveLetter(baseURL.path[0])) { + url.path.push(baseURL.path[0]); + } + else { + url.host = baseURL.host; + } + } + state = interfaces_1.ParserState.Path; + walker.pointer--; + } + break; + case interfaces_1.ParserState.FileHost: + if (walker.c() === EOF || walker.c() === '/' || walker.c() === '\\' || + walker.c() === '?' || walker.c() === '#') { + /** + * 1. If c is the EOF code point, U+002F (/), U+005C (\), U+003F (?), + * or U+0023 (#), then decrease pointer by one and then: + */ + walker.pointer--; + if (stateOverride === undefined && isWindowsDriveLetter(buffer)) { + /** + * 1.1. If state override is not given and buffer is a Windows drive + * letter, validation error, set state to path state. + * _Note:_ is a (platform-independent) Windows drive letter + * quirk. buffer is not reset here and instead used in the path state. + */ + validationError("Unexpected windows drive letter in input string."); + state = interfaces_1.ParserState.Path; + } + else if (buffer === "") { + /** + * 1.2. Otherwise, if buffer is the empty string, then: + * 1.2.1. Set url’s host to the empty string. + * 1.2.2. If state override is given, then return. + * 1.2.3. Set state to path start state. + */ + url.host = ""; + if (stateOverride !== undefined) + return url; + state = interfaces_1.ParserState.PathStart; + } + else { + /** + * 1.3. Otherwise, run these steps: + * 1.3.1. Let host be the result of host parsing buffer with url + * is not special. + * 1.3.2. If host is failure, then return failure. + * 1.3.3. If host is "localhost", then set host to the empty + * string. + * 1.3.4. Set url’s host to host. + * 1.3.5. If state override is given, then return. + * 1.3.6. Set buffer to the empty string and state to path start + * state. + */ + var host = hostParser(buffer, !isSpecial(url)); + if (host === null) + return null; + if (host === "localhost") + host = ""; + url.host = host; + if (stateOverride !== undefined) + return url; + buffer = ""; + state = interfaces_1.ParserState.PathStart; + } + } + else { + /** + * 2. Otherwise, append c to buffer. + */ + buffer += walker.c(); + } + break; + case interfaces_1.ParserState.PathStart: + if (isSpecial(url)) { + /** + * 1. If url is special, then: + * 1.1. If c is U+005C (\), validation error. + * 1.2. Set state to path state. + * 1.3. If c is neither U+002F (/) nor U+005C (\), then decrease + * pointer by one. + */ + if (walker.c() === '\\') { + validationError("Invalid input string."); + } + state = interfaces_1.ParserState.Path; + if (walker.c() !== '/' && walker.c() !== '\\') + walker.pointer--; + } + else if (stateOverride === undefined && walker.c() === '?') { + /** + * 2. Otherwise, if state override is not given and c is U+003F (?), + * set url’s query to the empty string and state to query state. + */ + url.query = ""; + state = interfaces_1.ParserState.Query; + } + else if (stateOverride === undefined && walker.c() === '#') { + /** + * 3. Otherwise, if state override is not given and c is U+0023 (#), + * set url’s fragment to the empty string and state to fragment + * state. + */ + url.fragment = ""; + state = interfaces_1.ParserState.Fragment; + } + else if (walker.c() !== EOF) { + /** + * 4. Otherwise, if c is not the EOF code point: + * 4.1. Set state to path state. + * 4.2. If c is not U+002F (/), then decrease pointer by one. + */ + state = interfaces_1.ParserState.Path; + if (walker.c() !== '/') + walker.pointer--; + } + break; + case interfaces_1.ParserState.Path: + if ((walker.c() === EOF || walker.c() === '/') || + (isSpecial(url) && walker.c() === '\\') || + (stateOverride === undefined && (walker.c() === '?' || walker.c() === '#'))) { + /** + * 1. If one of the following is true + * - c is the EOF code point or U+002F (/) + * - url is special and c is U+005C (\) + * - state override is not given and c is U+003F (?) or U+0023 (#) + * then: + */ + if (isSpecial(url) && walker.c() === '\\') { + /** + * 1.1 If url is special and c is U+005C (\), validation error. + */ + validationError("Invalid input string."); + } + if (isDoubleDotPathSegment(buffer)) { + /** + * 1.2. If buffer is a double-dot path segment, shorten url’s path, + * and then if neither c is U+002F (/), nor url is special and c is + * U+005C (\), append the empty string to url’s path. + */ + shorten(url); + if (walker.c() !== '/' && !(isSpecial(url) && walker.c() === '\\')) { + url.path.push(""); + } + } + else if (isSingleDotPathSegment(buffer) && walker.c() !== '/' && + !(isSpecial(url) && walker.c() === '\\')) { + /** + * 1.3. Otherwise, if buffer is a single-dot path segment and if + * neither c is U+002F (/), nor url is special and c is U+005C (\), + * append the empty string to url’s path. + */ + url.path.push(""); + } + else if (!isSingleDotPathSegment(buffer)) { + /** + * 1.4. Otherwise, if buffer is not a single-dot path segment, then: + */ + if (url.scheme === "file" && url.path.length === 0 && + isWindowsDriveLetter(buffer)) { + /** + * 1.4.1. If url’s scheme is "file", url’s path is empty, and + * buffer is a Windows drive letter, then: + * 1.4.1.1. If url’s host is neither the empty string nor null, + * validation error, set url’s host to the empty string. + * 1.4.1.2. Replace the second code point in buffer with U+003A (:). + * _Note:_ is a (platform-independent) Windows drive letter quirk. + */ + if (url.host !== null && url.host !== "") { + validationError("Invalid input string."); + url.host = ""; + } + var bufferCodePoints = Array.from(buffer); + buffer = bufferCodePoints.slice(0, 1) + ':' + bufferCodePoints.slice(2); + } + /** + * 1.4.2. Append buffer to url’s path. + */ + url.path.push(buffer); + } + /** + * 1.5. Set buffer to the empty string. + */ + buffer = ""; + /** + * 1.6. If url’s scheme is "file" and c is the EOF code point, + * U+003F (?), or U+0023 (#), then while url’s path’s size is + * greater than 1 and url’s path[0] is the empty string, validation + * error, remove the first item from url’s path. + */ + if (url.scheme === "file" && (walker.c() === EOF || walker.c() === '?' || walker.c() === '#')) { + while (url.path.length > 1 && url.path[0] === "") { + validationError("Invalid input string."); + url.path.splice(0, 1); + } + } + /** + * 1.7. If c is U+003F (?), then set url’s query to the empty string + * and state to query state. + * 1.8. If c is U+0023 (#), then set url’s fragment to the empty + * string and state to fragment state. + */ + if (walker.c() === '?') { + url.query = ""; + state = interfaces_1.ParserState.Query; + } + if (walker.c() === '#') { + url.fragment = ""; + state = interfaces_1.ParserState.Fragment; + } } - else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) { - throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); + else { + /** + * 2. Otherwise, run these steps: + * 2.1. If c is not a URL code point and not U+0025 (%), validation + * error. + * 2.2. If c is U+0025 (%) and remaining does not start with two + * ASCII hex digits, validation error. + * 2.3. UTF-8 percent encode c using the path percent-encode set, + * and append the result to buffer. + */ + if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') { + validationError("Character is not a URL code point or a percent encoded character."); + } + if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) { + validationError("Percent encoded character must be followed by two hex digits."); + } + buffer += utf8PercentEncode(walker.c(), _pathPercentEncodeSet); + } + break; + case interfaces_1.ParserState.CannotBeABaseURLPath: + /** + * 1. If c is U+003F (?), then set url’s query to the empty string and + * state to query state. + * 2. Otherwise, if c is U+0023 (#), then set url’s fragment to the + * empty string and state to fragment state. + * 3. Otherwise: + * 3.1. If c is not the EOF code point, not a URL code point, and not + * U+0025 (%), validation error. + * 3.2. If c is U+0025 (%) and remaining does not start with two ASCII + * hex digits, validation error. + * 3.3. If c is not the EOF code point, UTF-8 percent encode c using + * the C0 control percent-encode set, and append the result to url’s + * path[0]. + */ + if (walker.c() === '?') { + url.query = ""; + state = interfaces_1.ParserState.Query; + } + else if (walker.c() === '#') { + url.fragment = ""; + state = interfaces_1.ParserState.Fragment; } else { - this._tokenSet.add(token); + if (walker.c() !== EOF && !_urlCodePoints.test(walker.c()) && walker.c() !== '%') { + validationError("Character is not a URL code point or a percent encoded character."); + } + if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) { + validationError("Percent encoded character must be followed by two hex digits."); + } + if (walker.c() !== EOF) { + url.path[0] += utf8PercentEncode(walker.c(), _c0ControlPercentEncodeSet); + } } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1); - } - finally { if (e_2) throw e_2.error; } - } - algorithm_1.tokenList_updateSteps(this); - }; - /** @inheritdoc */ - DOMTokenListImpl.prototype.remove = function () { - var e_3, _a; - var tokens = []; - for (var _i = 0; _i < arguments.length; _i++) { - tokens[_i] = arguments[_i]; - } - try { - /** - * 1. For each token in tokens: - * 1.1. If token is the empty string, then throw a "SyntaxError" - * DOMException. - * 1.2. If token contains any ASCII whitespace, then throw an - * "InvalidCharacterError" DOMException. - * 2. For each token in tokens, remove token from context object’s token set. - * 3. Run the update steps. - */ - for (var tokens_2 = __values(tokens), tokens_2_1 = tokens_2.next(); !tokens_2_1.done; tokens_2_1 = tokens_2.next()) { - var token = tokens_2_1.value; - if (token === '') { - throw new DOMException_1.SyntaxError("Cannot remove an empty token."); + break; + case interfaces_1.ParserState.Query: + /** + * 1. If encoding is not UTF-8 and one of the following is true + * - url is not special + * - url’s scheme is "ws" or "wss" + * then set encoding to UTF-8. + */ + if (encoding !== "UTF-8" && (!isSpecial(url) || + url.scheme === "ws" || url.scheme === "wss")) { + encoding = "UTF-8"; } - else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) { - throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); + if (stateOverride === undefined && walker.c() === '#') { + /** + * 2. If state override is not given and c is U+0023 (#), then set + * url’s fragment to the empty string and state to fragment state. + */ + url.fragment = ""; + state = interfaces_1.ParserState.Fragment; + } + else if (walker.c() !== EOF) { + /** + * 3. Otherwise, if c is not the EOF code point: + * 3.1. If c is not a URL code point and not U+0025 (%), validation + * error. + */ + if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') { + validationError("Character is not a URL code point or a percent encoded character."); + } + /** + * 3.2. If c is U+0025 (%) and remaining does not start with two + * ASCII hex digits, validation error. + */ + if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) { + validationError("Percent encoded character must be followed by two hex digits."); + } + /** + * 3.3. Let bytes be the result of encoding c using encoding. + */ + if (encoding.toUpperCase() !== "UTF-8") { + throw new Error("Only UTF-8 encoding is supported."); + } + var bytes = util_1.utf8Encode(walker.c()); + /** + * 3.4. If bytes starts with `&#` and ends with 0x3B (;), then: + */ + if (bytes.length >= 3 && bytes[0] === 38 && bytes[1] === 35 && + bytes[bytes.length - 1] === 59) { + /** + * 3.4.1. Replace `&#` at the start of bytes with `%26%23`. + * 3.4.2. Replace 0x3B (;) at the end of bytes with `%3B`. + * 3.4.4. Append bytes, isomorphic decoded, to url’s query. + * _Note:_ can happen when encoding code points using a + * non-UTF-8 encoding. + */ + bytes = bytes.subarray(2, bytes.length - 1); + url.query += "%26%23" + infra_1.byteSequence.isomorphicDecode(bytes) + "%3B"; + } + else { + try { + /** + * 3.5. Otherwise, for each byte in bytes: + * 3.5.1. If one of the following is true + * - byte is less than 0x21 (!) + * - byte is greater than 0x7E (~) + * - byte is 0x22 ("), 0x23 (#), 0x3C (<), or 0x3E (>) + * - byte is 0x27 (') and url is special + * then append byte, percent encoded, to url’s query. + * 3.5.2. Otherwise, append a code point whose value is byte to + * url’s query. + */ + for (var bytes_1 = (e_3 = void 0, __values(bytes)), bytes_1_1 = bytes_1.next(); !bytes_1_1.done; bytes_1_1 = bytes_1.next()) { + var byte = bytes_1_1.value; + if (byte < 0x21 || byte > 0x7E || byte === 0x22 || + byte === 0x23 || byte === 0x3C || byte === 0x3E || + (byte === 0x27 && isSpecial(url))) { + url.query += percentEncode(byte); + } + else { + url.query += String.fromCharCode(byte); + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (bytes_1_1 && !bytes_1_1.done && (_b = bytes_1.return)) _b.call(bytes_1); + } + finally { if (e_3) throw e_3.error; } + } + } + } + break; + case interfaces_1.ParserState.Fragment: + /** + * Switching on c: + * - The EOF code point + * Do nothing. + * - U+0000 NULL + * Validation error. + * - Otherwise + * 1. If c is not a URL code point and not U+0025 (%), validation + * error. + * 2. If c is U+0025 (%) and remaining does not start with two ASCII + * hex digits, validation error. + * 3. UTF-8 percent encode c using the fragment percent-encode set and + * append the result to url’s fragment. + */ + if (walker.c() === EOF) { + // + } + else if (walker.c() === "\u0000") { + validationError("NULL character in input string."); } else { - this._tokenSet.delete(token); + if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') { + validationError("Unexpected character in fragment string."); + } + if (walker.c() === '%' && !/^[A-Za-z0-9][A-Za-z0-9]/.test(walker.remaining())) { + validationError("Unexpected character in fragment string."); + } + url.fragment += utf8PercentEncode(walker.c(), _fragmentPercentEncodeSet); } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (tokens_2_1 && !tokens_2_1.done && (_a = tokens_2.return)) _a.call(tokens_2); - } - finally { if (e_3) throw e_3.error; } - } - algorithm_1.tokenList_updateSteps(this); - }; - /** @inheritdoc */ - DOMTokenListImpl.prototype.toggle = function (token, force) { - if (force === void 0) { force = undefined; } - /** - * 1. If token is the empty string, then throw a "SyntaxError" DOMException. - * 2. If token contains any ASCII whitespace, then throw an - * "InvalidCharacterError" DOMException. - */ - if (token === '') { - throw new DOMException_1.SyntaxError("Cannot toggle an empty token."); - } - else if (infra_1.codePoint.ASCIIWhiteSpace.test(token)) { - throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); - } - /** - * 3. If context object’s token set[token] exists, then: - */ - if (this._tokenSet.has(token)) { - /** - * 3.1. If force is either not given or is false, then remove token from - * context object’s token set, run the update steps and return false. - * 3.2. Return true. - */ - if (force === undefined || force === false) { - this._tokenSet.delete(token); - algorithm_1.tokenList_updateSteps(this); - return false; - } - return true; - } - /** - * 4. Otherwise, if force not given or is true, append token to context - * object’s token set, run the update steps, and return true. - */ - if (force === undefined || force === true) { - this._tokenSet.add(token); - algorithm_1.tokenList_updateSteps(this); - return true; - } - /** - * 5. Return false. - */ - return false; - }; - /** @inheritdoc */ - DOMTokenListImpl.prototype.replace = function (token, newToken) { - /** - * 1. If either token or newToken is the empty string, then throw a - * "SyntaxError" DOMException. - * 2. If either token or newToken contains any ASCII whitespace, then throw - * an "InvalidCharacterError" DOMException. - */ - if (token === '' || newToken === '') { - throw new DOMException_1.SyntaxError("Cannot replace an empty token."); - } - else if (infra_1.codePoint.ASCIIWhiteSpace.test(token) || infra_1.codePoint.ASCIIWhiteSpace.test(newToken)) { - throw new DOMException_1.InvalidCharacterError("Token cannot contain whitespace."); + break; } - /** - * 3. If context object’s token set does not contain token, then return - * false. - */ - if (!this._tokenSet.has(token)) - return false; - /** - * 4. Replace token in context object’s token set with newToken. - * 5. Run the update steps. - * 6. Return true. - */ - infra_1.set.replace(this._tokenSet, token, newToken); - algorithm_1.tokenList_updateSteps(this); - return true; - }; - /** @inheritdoc */ - DOMTokenListImpl.prototype.supports = function (token) { - /** - * 1. Let result be the return value of validation steps called with token. - * 2. Return result. - */ - return algorithm_1.tokenList_validationSteps(this, token); - }; - Object.defineProperty(DOMTokenListImpl.prototype, "value", { - /** @inheritdoc */ - get: function () { - /** - * The value attribute must return the result of running context object’s - * serialize steps. - */ - return algorithm_1.tokenList_serializeSteps(this); - }, - set: function (value) { - /** - * Setting the value attribute must set an attribute value for the - * associated element using associated attribute’s local name and the given - * value. - */ - algorithm_1.element_setAnAttributeValue(this._element, this._attribute._localName, value); - }, - enumerable: true, - configurable: true - }); - /** - * Returns an iterator for the token set. - */ - DOMTokenListImpl.prototype[Symbol.iterator] = function () { - var it = this._tokenSet[Symbol.iterator](); - return { - next: function () { - return it.next(); - } - }; - }; + if (walker.eof) + break; + else + walker.pointer++; + } /** - * Creates a new `DOMTokenList`. - * - * @param element - associated element - * @param attribute - associated attribute + * 12. Return url. */ - DOMTokenListImpl._create = function (element, attribute) { - return new DOMTokenListImpl(element, attribute); - }; - return DOMTokenListImpl; -}()); -exports.DOMTokenListImpl = DOMTokenListImpl; -//# sourceMappingURL=DOMTokenListImpl.js.map - -/***/ }), - -/***/ 12585: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var NodeImpl_1 = __nccwpck_require__(91745); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); + return url; +} +exports.basicURLParser = basicURLParser; /** - * Represents a document fragment in the XML tree. + * Sets a URL's username. + * + * @param url - a URL + * @param username - username string */ -var DocumentFragmentImpl = /** @class */ (function (_super) { - __extends(DocumentFragmentImpl, _super); - /** - * Initializes a new instance of `DocumentFragment`. - * - * @param host - shadow root's host element - */ - function DocumentFragmentImpl(host) { - if (host === void 0) { host = null; } - var _this = _super.call(this) || this; - _this._children = new Set(); - _this._host = host; - return _this; - } - // MIXIN: NonElementParentNode - /* istanbul ignore next */ - DocumentFragmentImpl.prototype.getElementById = function (elementId) { throw new Error("Mixin: NonElementParentNode not implemented."); }; - Object.defineProperty(DocumentFragmentImpl.prototype, "children", { - // MIXIN: ParentNode - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentFragmentImpl.prototype, "firstElementChild", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentFragmentImpl.prototype, "lastElementChild", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentFragmentImpl.prototype, "childElementCount", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - /* istanbul ignore next */ - DocumentFragmentImpl.prototype.prepend = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - throw new Error("Mixin: ParentNode not implemented."); - }; - /* istanbul ignore next */ - DocumentFragmentImpl.prototype.append = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - throw new Error("Mixin: ParentNode not implemented."); - }; - /* istanbul ignore next */ - DocumentFragmentImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; - /* istanbul ignore next */ - DocumentFragmentImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; +function setTheUsername(url, username) { + var e_4, _a; /** - * Creates a new `DocumentFragment`. - * - * @param document - owner document - * @param host - shadow root's host element + * 1. Set url’s username to the empty string. + * 2. For each code point in username, UTF-8 percent encode it using the + * userinfo percent-encode set, and append the result to url’s username. */ - DocumentFragmentImpl._create = function (document, host) { - if (host === void 0) { host = null; } - var node = new DocumentFragmentImpl(host); - node._nodeDocument = document; - return node; - }; - return DocumentFragmentImpl; -}(NodeImpl_1.NodeImpl)); -exports.DocumentFragmentImpl = DocumentFragmentImpl; -/** - * Initialize prototype properties - */ -WebIDLAlgorithm_1.idl_defineConst(DocumentFragmentImpl.prototype, "_nodeType", interfaces_1.NodeType.DocumentFragment); -//# sourceMappingURL=DocumentFragmentImpl.js.map - -/***/ }), - -/***/ 14333: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; + var result = ""; try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + for (var username_1 = __values(username), username_1_1 = username_1.next(); !username_1_1.done; username_1_1 = username_1.next()) { + var codePoint = username_1_1.value; + result += utf8PercentEncode(codePoint, _userInfoPercentEncodeSet); + } } - catch (error) { e = { error: error }; } + catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { - if (r && !r.done && (m = i["return"])) m.call(i); + if (username_1_1 && !username_1_1.done && (_a = username_1.return)) _a.call(username_1); } - finally { if (e) throw e.error; } + finally { if (e_4) throw e_4.error; } } - return ar; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var interfaces_1 = __nccwpck_require__(27305); -var DOMException_1 = __nccwpck_require__(13166); -var NodeImpl_1 = __nccwpck_require__(91745); -var util_1 = __nccwpck_require__(65282); -var util_2 = __nccwpck_require__(76195); -var infra_1 = __nccwpck_require__(84251); -var URLAlgorithm_1 = __nccwpck_require__(53568); -var algorithm_1 = __nccwpck_require__(61); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); + url.username = result; +} +exports.setTheUsername = setTheUsername; /** - * Represents a document node. - */ -var DocumentImpl = /** @class */ (function (_super) { - __extends(DocumentImpl, _super); - /** - * Initializes a new instance of `Document`. - */ - function DocumentImpl() { - var _this = _super.call(this) || this; - _this._children = new Set(); - _this._encoding = { - name: "UTF-8", - labels: ["unicode-1-1-utf-8", "utf-8", "utf8"] - }; - _this._contentType = 'application/xml'; - _this._URL = { - scheme: "about", - username: "", - password: "", - host: null, - port: null, - path: ["blank"], - query: null, - fragment: null, - _cannotBeABaseURLFlag: true, - _blobURLEntry: null - }; - _this._origin = null; - _this._type = "xml"; - _this._mode = "no-quirks"; - _this._documentElement = null; - _this._hasNamespaces = false; - _this._nodeDocumentOverwrite = null; - return _this; - } - Object.defineProperty(DocumentImpl.prototype, "_nodeDocument", { - get: function () { return this._nodeDocumentOverwrite || this; }, - set: function (val) { this._nodeDocumentOverwrite = val; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "implementation", { - /** @inheritdoc */ - get: function () { - /** - * The implementation attribute’s getter must return the DOMImplementation - * object that is associated with the document. - */ - return this._implementation || (this._implementation = algorithm_1.create_domImplementation(this)); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "URL", { - /** @inheritdoc */ - get: function () { - /** - * The URL attribute’s getter and documentURI attribute’s getter must return - * the URL, serialized. - * See: https://url.spec.whatwg.org/#concept-url-serializer - */ - return URLAlgorithm_1.urlSerializer(this._URL); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "documentURI", { - /** @inheritdoc */ - get: function () { return this.URL; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "origin", { - /** @inheritdoc */ - get: function () { - return "null"; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "compatMode", { - /** @inheritdoc */ - get: function () { - /** - * The compatMode attribute’s getter must return "BackCompat" if context - * object’s mode is "quirks", and "CSS1Compat" otherwise. - */ - return this._mode === "quirks" ? "BackCompat" : "CSS1Compat"; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "characterSet", { - /** @inheritdoc */ - get: function () { - /** - * The characterSet attribute’s getter, charset attribute’s getter, and - * inputEncoding attribute’s getter, must return context object’s - * encoding’s name. - */ - return this._encoding.name; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "charset", { - /** @inheritdoc */ - get: function () { return this._encoding.name; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "inputEncoding", { - /** @inheritdoc */ - get: function () { return this._encoding.name; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "contentType", { - /** @inheritdoc */ - get: function () { - /** - * The contentType attribute’s getter must return the content type. - */ - return this._contentType; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "doctype", { - /** @inheritdoc */ - get: function () { - var e_1, _a; - try { - /** - * The doctype attribute’s getter must return the child of the document - * that is a doctype, and null otherwise. - */ - for (var _b = __values(this._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var child = _c.value; - if (util_1.Guard.isDocumentTypeNode(child)) - return child; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - return null; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "documentElement", { - /** @inheritdoc */ - get: function () { - /** - * The documentElement attribute’s getter must return the document element. - */ - return this._documentElement; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - DocumentImpl.prototype.getElementsByTagName = function (qualifiedName) { - /** - * The getElementsByTagName(qualifiedName) method, when invoked, must return - * the list of elements with qualified name qualifiedName for the context object. - */ - return algorithm_1.node_listOfElementsWithQualifiedName(qualifiedName, this); - }; - /** @inheritdoc */ - DocumentImpl.prototype.getElementsByTagNameNS = function (namespace, localName) { - /** - * The getElementsByTagNameNS(namespace, localName) method, when invoked, - * must return the list of elements with namespace namespace and local name - * localName for the context object. - */ - return algorithm_1.node_listOfElementsWithNamespace(namespace, localName, this); - }; - /** @inheritdoc */ - DocumentImpl.prototype.getElementsByClassName = function (classNames) { - /** - * The getElementsByClassName(classNames) method, when invoked, must return - * the list of elements with class names classNames for the context object. - */ - return algorithm_1.node_listOfElementsWithClassNames(classNames, this); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createElement = function (localName, options) { - /** - * 1. If localName does not match the Name production, then throw an - * "InvalidCharacterError" DOMException. - * 2. If the context object is an HTML document, then set localName to - * localName in ASCII lowercase. - * 3. Let is be null. - * 4. If options is a dictionary and options’s is is present, then set is - * to it. - * 5. Let namespace be the HTML namespace, if the context object is an - * HTML document or context object’s content type is - * "application/xhtml+xml", and null otherwise. - * 6. Return the result of creating an element given the context object, - * localName, namespace, null, is, and with the synchronous custom elements - * flag set. - */ - if (!algorithm_1.xml_isName(localName)) - throw new DOMException_1.InvalidCharacterError(); - if (this._type === "html") - localName = localName.toLowerCase(); - var is = null; - if (options !== undefined) { - if (util_2.isString(options)) { - is = options; - } - else { - is = options.is; - } - } - var namespace = (this._type === "html" || this._contentType === "application/xhtml+xml") ? - infra_1.namespace.HTML : null; - return algorithm_1.element_createAnElement(this, localName, namespace, null, is, true); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createElementNS = function (namespace, qualifiedName, options) { - /** - * The createElementNS(namespace, qualifiedName, options) method, when - * invoked, must return the result of running the internal createElementNS - * steps, given context object, namespace, qualifiedName, and options. - */ - return algorithm_1.document_internalCreateElementNS(this, namespace, qualifiedName, options); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createDocumentFragment = function () { - /** - * The createDocumentFragment() method, when invoked, must return a new - * DocumentFragment node with its node document set to the context object. - */ - return algorithm_1.create_documentFragment(this); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createTextNode = function (data) { - /** - * The createTextNode(data) method, when invoked, must return a new Text - * node with its data set to data and node document set to the context object. - */ - return algorithm_1.create_text(this, data); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createCDATASection = function (data) { - /** - * 1. If context object is an HTML document, then throw a - * "NotSupportedError" DOMException. - * 2. If data contains the string "]]>", then throw an - * "InvalidCharacterError" DOMException. - * 3. Return a new CDATASection node with its data set to data and node - * document set to the context object. - */ - if (this._type === "html") - throw new DOMException_1.NotSupportedError(); - if (data.indexOf(']]>') !== -1) - throw new DOMException_1.InvalidCharacterError(); - return algorithm_1.create_cdataSection(this, data); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createComment = function (data) { - /** - * The createComment(data) method, when invoked, must return a new Comment - * node with its data set to data and node document set to the context object. - */ - return algorithm_1.create_comment(this, data); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createProcessingInstruction = function (target, data) { - /** - * 1. If target does not match the Name production, then throw an - * "InvalidCharacterError" DOMException. - * 2. If data contains the string "?>", then throw an - * "InvalidCharacterError" DOMException. - * 3. Return a new ProcessingInstruction node, with target set to target, - * data set to data, and node document set to the context object. - */ - if (!algorithm_1.xml_isName(target)) - throw new DOMException_1.InvalidCharacterError(); - if (data.indexOf("?>") !== -1) - throw new DOMException_1.InvalidCharacterError(); - return algorithm_1.create_processingInstruction(this, target, data); - }; - /** @inheritdoc */ - DocumentImpl.prototype.importNode = function (node, deep) { - if (deep === void 0) { deep = false; } - /** - * 1. If node is a document or shadow root, then throw a "NotSupportedError" DOMException. - */ - if (util_1.Guard.isDocumentNode(node) || util_1.Guard.isShadowRoot(node)) - throw new DOMException_1.NotSupportedError(); - /** - * 2. Return a clone of node, with context object and the clone children flag set if deep is true. - */ - return algorithm_1.node_clone(node, this, deep); - }; - /** @inheritdoc */ - DocumentImpl.prototype.adoptNode = function (node) { - /** - * 1. If node is a document, then throw a "NotSupportedError" DOMException. - */ - if (util_1.Guard.isDocumentNode(node)) - throw new DOMException_1.NotSupportedError(); - /** - * 2. If node is a shadow root, then throw a "HierarchyRequestError" DOMException. - */ - if (util_1.Guard.isShadowRoot(node)) - throw new DOMException_1.HierarchyRequestError(); - /** - * 3. Adopt node into the context object. - * 4. Return node. - */ - algorithm_1.document_adopt(node, this); - return node; - }; - /** @inheritdoc */ - DocumentImpl.prototype.createAttribute = function (localName) { - /** - * 1. If localName does not match the Name production in XML, then throw - * an "InvalidCharacterError" DOMException. - * 2. If the context object is an HTML document, then set localName to - * localName in ASCII lowercase. - * 3. Return a new attribute whose local name is localName and node document - * is context object. - */ - if (!algorithm_1.xml_isName(localName)) - throw new DOMException_1.InvalidCharacterError(); - if (this._type === "html") { - localName = localName.toLowerCase(); - } - var attr = algorithm_1.create_attr(this, localName); - return attr; - }; - /** @inheritdoc */ - DocumentImpl.prototype.createAttributeNS = function (namespace, qualifiedName) { - /** - * 1. Let namespace, prefix, and localName be the result of passing - * namespace and qualifiedName to validate and extract. - * 2. Return a new attribute whose namespace is namespace, namespace prefix - * is prefix, local name is localName, and node document is context object. - */ - var _a = __read(algorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2]; - var attr = algorithm_1.create_attr(this, localName); - attr._namespace = ns; - attr._namespacePrefix = prefix; - return attr; - }; - /** @inheritdoc */ - DocumentImpl.prototype.createEvent = function (eventInterface) { - return algorithm_1.event_createLegacyEvent(eventInterface); - }; - /** @inheritdoc */ - DocumentImpl.prototype.createRange = function () { - /** - * The createRange() method, when invoked, must return a new live range - * with (context object, 0) as its start and end. - */ - var range = algorithm_1.create_range(); - range._start = [this, 0]; - range._end = [this, 0]; - return range; - }; - /** @inheritdoc */ - DocumentImpl.prototype.createNodeIterator = function (root, whatToShow, filter) { - if (whatToShow === void 0) { whatToShow = interfaces_1.WhatToShow.All; } - if (filter === void 0) { filter = null; } - /** - * 1. Let iterator be a new NodeIterator object. - * 2. Set iterator’s root and iterator’s reference to root. - * 3. Set iterator’s pointer before reference to true. - * 4. Set iterator’s whatToShow to whatToShow. - * 5. Set iterator’s filter to filter. - * 6. Return iterator. - */ - var iterator = algorithm_1.create_nodeIterator(root, root, true); - iterator._whatToShow = whatToShow; - iterator._iteratorCollection = algorithm_1.create_nodeList(root); - if (util_2.isFunction(filter)) { - iterator._filter = algorithm_1.create_nodeFilter(); - iterator._filter.acceptNode = filter; - } - else { - iterator._filter = filter; - } - return iterator; - }; - /** @inheritdoc */ - DocumentImpl.prototype.createTreeWalker = function (root, whatToShow, filter) { - if (whatToShow === void 0) { whatToShow = interfaces_1.WhatToShow.All; } - if (filter === void 0) { filter = null; } - /** - * 1. Let walker be a new TreeWalker object. - * 2. Set walker’s root and walker’s current to root. - * 3. Set walker’s whatToShow to whatToShow. - * 4. Set walker’s filter to filter. - * 5. Return walker. - */ - var walker = algorithm_1.create_treeWalker(root, root); - walker._whatToShow = whatToShow; - if (util_2.isFunction(filter)) { - walker._filter = algorithm_1.create_nodeFilter(); - walker._filter.acceptNode = filter; - } - else { - walker._filter = filter; - } - return walker; - }; - /** - * Gets the parent event target for the given event. - * - * @param event - an event - */ - DocumentImpl.prototype._getTheParent = function (event) { - /** - * TODO: Implement realms - * A document’s get the parent algorithm, given an event, returns null if - * event’s type attribute value is "load" or document does not have a - * browsing context, and the document’s relevant global object otherwise. - */ - if (event._type === "load") { - return null; - } - else { - return DOMImpl_1.dom.window; - } - }; - // MIXIN: NonElementParentNode - /* istanbul ignore next */ - DocumentImpl.prototype.getElementById = function (elementId) { throw new Error("Mixin: NonElementParentNode not implemented."); }; - Object.defineProperty(DocumentImpl.prototype, "children", { - // MIXIN: DocumentOrShadowRoot - // No elements - // MIXIN: ParentNode - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "firstElementChild", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "lastElementChild", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentImpl.prototype, "childElementCount", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - /* istanbul ignore next */ - DocumentImpl.prototype.prepend = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + * Sets a URL's password. + * + * @param url - a URL + * @param username - password string + */ +function setThePassword(url, password) { + var e_5, _a; + /** + * 1. Set url’s password to the empty string. + * 2. For each code point in password, UTF-8 percent encode it using the + * userinfo percent-encode set, and append the result to url’s password. + */ + var result = ""; + try { + for (var password_1 = __values(password), password_1_1 = password_1.next(); !password_1_1.done; password_1_1 = password_1.next()) { + var codePoint = password_1_1.value; + result += utf8PercentEncode(codePoint, _userInfoPercentEncodeSet); } - throw new Error("Mixin: ParentNode not implemented."); - }; - /* istanbul ignore next */ - DocumentImpl.prototype.append = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + } + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (password_1_1 && !password_1_1.done && (_a = password_1.return)) _a.call(password_1); } - throw new Error("Mixin: ParentNode not implemented."); - }; - /* istanbul ignore next */ - DocumentImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; - /* istanbul ignore next */ - DocumentImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; - return DocumentImpl; -}(NodeImpl_1.NodeImpl)); -exports.DocumentImpl = DocumentImpl; + finally { if (e_5) throw e_5.error; } + } + url.password = result; +} +exports.setThePassword = setThePassword; /** - * Initialize prototype properties + * Determines if the string represents a single dot path. + * + * @param str - a string */ -WebIDLAlgorithm_1.idl_defineConst(DocumentImpl.prototype, "_nodeType", interfaces_1.NodeType.Document); -//# sourceMappingURL=DocumentImpl.js.map - -/***/ }), - -/***/ 65274: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); +function isSingleDotPathSegment(str) { + return str === '.' || str.toLowerCase() === "%2e"; +} +exports.isSingleDotPathSegment = isSingleDotPathSegment; /** - * Represents a mixin for an interface to be used to share APIs between - * documents and shadow roots. This mixin is implemented by - * {@link Document} and {@link ShadowRoot}. + * Determines if the string represents a double dot path. * - * _Note:_ The DocumentOrShadowRoot mixin is expected to be used by other - * standards that want to define APIs shared between documents and shadow roots. + * @param str - a string */ -var DocumentOrShadowRootImpl = /** @class */ (function () { - function DocumentOrShadowRootImpl() { - } - return DocumentOrShadowRootImpl; -}()); -exports.DocumentOrShadowRootImpl = DocumentOrShadowRootImpl; -//# sourceMappingURL=DocumentOrShadowRootImpl.js.map - -/***/ }), - -/***/ 3173: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var NodeImpl_1 = __nccwpck_require__(91745); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +function isDoubleDotPathSegment(str) { + var lowerStr = str.toLowerCase(); + return lowerStr === ".." || lowerStr === ".%2e" || + lowerStr === "%2e." || lowerStr === "%2e%2e"; +} +exports.isDoubleDotPathSegment = isDoubleDotPathSegment; /** - * Represents an object providing methods which are not dependent on - * any particular document + * Shorten's URL's path. + * + * @param url - an URL */ -var DocumentTypeImpl = /** @class */ (function (_super) { - __extends(DocumentTypeImpl, _super); +function shorten(url) { /** - * Initializes a new instance of `DocumentType`. - * - * @param name - name of the node - * @param publicId - `PUBLIC` identifier - * @param systemId - `SYSTEM` identifier + * 1. Let path be url’s path. + * 2. If path is empty, then return. + * 3. If url’s scheme is "file", path’s size is 1, and path[0] is a + * normalized Windows drive letter, then return. + * 4. Remove path’s last item. */ - function DocumentTypeImpl(name, publicId, systemId) { - var _this = _super.call(this) || this; - _this._name = ''; - _this._publicId = ''; - _this._systemId = ''; - _this._name = name; - _this._publicId = publicId; - _this._systemId = systemId; - return _this; - } - Object.defineProperty(DocumentTypeImpl.prototype, "name", { - /** @inheritdoc */ - get: function () { return this._name; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentTypeImpl.prototype, "publicId", { - /** @inheritdoc */ - get: function () { return this._publicId; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DocumentTypeImpl.prototype, "systemId", { - /** @inheritdoc */ - get: function () { return this._systemId; }, - enumerable: true, - configurable: true - }); - // MIXIN: ChildNode - /* istanbul ignore next */ - DocumentTypeImpl.prototype.before = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - DocumentTypeImpl.prototype.after = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - DocumentTypeImpl.prototype.replaceWith = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - DocumentTypeImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); }; + var path = url.path; + if (path.length === 0) + return; + if (url.scheme === "file" && path.length === 1 && + isNormalizedWindowsDriveLetter(path[0])) + return; + url.path.splice(url.path.length - 1, 1); +} +exports.shorten = shorten; +/** + * Determines if a string is a normalized Windows drive letter. + * + * @param str - a string + */ +function isNormalizedWindowsDriveLetter(str) { /** - * Creates a new `DocumentType`. - * - * @param document - owner document - * @param name - name of the node - * @param publicId - `PUBLIC` identifier - * @param systemId - `SYSTEM` identifier + * A normalized Windows drive letter is a Windows drive letter of which the + * second code point is U+003A (:). */ - DocumentTypeImpl._create = function (document, name, publicId, systemId) { - if (publicId === void 0) { publicId = ''; } - if (systemId === void 0) { systemId = ''; } - var node = new DocumentTypeImpl(name, publicId, systemId); - node._nodeDocument = document; - return node; - }; - return DocumentTypeImpl; -}(NodeImpl_1.NodeImpl)); -exports.DocumentTypeImpl = DocumentTypeImpl; + return str.length >= 2 && infra_1.codePoint.ASCIIAlpha.test(str[0]) && + str[1] === ':'; +} +exports.isNormalizedWindowsDriveLetter = isNormalizedWindowsDriveLetter; /** - * Initialize prototype properties + * Determines if a string is a Windows drive letter. + * + * @param str - a string */ -WebIDLAlgorithm_1.idl_defineConst(DocumentTypeImpl.prototype, "_nodeType", interfaces_1.NodeType.DocumentType); -//# sourceMappingURL=DocumentTypeImpl.js.map - -/***/ }), - -/***/ 35975: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; +function isWindowsDriveLetter(str) { + /** + * A Windows drive letter is two code points, of which the first is an ASCII + * alpha and the second is either U+003A (:) or U+007C (|). + */ + return str.length >= 2 && infra_1.codePoint.ASCIIAlpha.test(str[0]) && + (str[1] === ':' || str[1] === '|'); +} +exports.isWindowsDriveLetter = isWindowsDriveLetter; +/** + * Determines if a string starts with a Windows drive letter. + * + * @param str - a string + */ +function startsWithAWindowsDriveLetter(str) { + /** + * A string starts with a Windows drive letter if all of the following are + * true: + * - its length is greater than or equal to 2 + * - its first two code points are a Windows drive letter + * - its length is 2 or its third code point is U+002F (/), U+005C (\), + * U+003F (?), or U+0023 (#). + */ + return str.length >= 2 && isWindowsDriveLetter(str) && + (str.length === 2 || (str[2] === '/' || str[2] === '\\' || + str[2] === '?' || str[2] === '#')); +} +exports.startsWithAWindowsDriveLetter = startsWithAWindowsDriveLetter; +/** + * Parses a host string. + * + * @param input - input string + * @param isNotSpecial - `true` if the source URL is not special; otherwise + * `false`. + */ +function hostParser(input, isNotSpecial) { + if (isNotSpecial === void 0) { isNotSpecial = false; } + /** + * 1. If isNotSpecial is not given, then set isNotSpecial to false. + * 2. If input starts with U+005B ([), then: + * 2.1. If input does not end with U+005D (]), validation error, return + * failure. + * 2.2. Return the result of IPv6 parsing input with its leading U+005B ([) + * and trailing U+005D (]) removed. + */ + if (input.startsWith('[')) { + if (!input.endsWith(']')) { + validationError("Expected ']' after '['."); + return null; } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + return iPv6Parser(input.substring(1, input.length - 1)); } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } + /** + * 3. If isNotSpecial is true, then return the result of opaque-host parsing + * input. + */ + if (isNotSpecial) { + return opaqueHostParser(input); } - return ar; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var NodeImpl_1 = __nccwpck_require__(91745); -var DOMException_1 = __nccwpck_require__(13166); -var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); + /** + * 4. Let domain be the result of running UTF-8 decode without BOM on the + * string percent decoding of input. + * _Note:_ Alternatively UTF-8 decode without BOM or fail can be used, + * coupled with an early return for failure, as domain to ASCII fails + * on U+FFFD REPLACEMENT CHARACTER. + */ + var domain = util_1.utf8Decode(stringPercentDecode(input)); + /** + * 5. Let asciiDomain be the result of running domain to ASCII on domain. + * 6. If asciiDomain is failure, validation error, return failure. + * 7. If asciiDomain contains a forbidden host code point, validation error, + * return failure. + */ + var asciiDomain = domainToASCII(domain); + if (asciiDomain === null) { + validationError("Invalid domain."); + return null; + } + if (_forbiddenHostCodePoint.test(asciiDomain)) { + validationError("Invalid domain."); + return null; + } + /** + * 8. Let ipv4Host be the result of IPv4 parsing asciiDomain. + * 9. If ipv4Host is an IPv4 address or failure, return ipv4Host. + * 10. Return asciiDomain. + */ + var ipv4Host = iPv4Parser(asciiDomain); + if (ipv4Host === null || util_1.isNumber(ipv4Host)) + return ipv4Host; + return asciiDomain; +} +exports.hostParser = hostParser; /** - * Represents an element node. + * Parses a string containing an IP v4 address. + * + * @param input - input string + * @param isNotSpecial - `true` if the source URL is not special; otherwise + * `false`. */ -var ElementImpl = /** @class */ (function (_super) { - __extends(ElementImpl, _super); +function iPv4NumberParser(input, validationErrorFlag) { + if (validationErrorFlag === void 0) { validationErrorFlag = { value: false }; } /** - * Initializes a new instance of `Element`. + * 1. Let R be 10. */ - function ElementImpl() { - var _this = _super.call(this) || this; - _this._children = new Set(); - _this._namespace = null; - _this._namespacePrefix = null; - _this._localName = ""; - _this._customElementState = "undefined"; - _this._customElementDefinition = null; - _this._is = null; - _this._shadowRoot = null; - _this._attributeList = algorithm_1.create_namedNodeMap(_this); - _this._attributeChangeSteps = []; - _this._name = ''; - _this._assignedSlot = null; - return _this; + var R = 10; + if (input.startsWith("0x") || input.startsWith("0X")) { + /** + * 2. If input contains at least two code points and the first two code + * points are either "0x" or "0X", then: + * 2.1. Set validationErrorFlag. + * 2.2. Remove the first two code points from input. + * 2.3. Set R to 16. + */ + validationErrorFlag.value = true; + input = input.substr(2); + R = 16; } - Object.defineProperty(ElementImpl.prototype, "namespaceURI", { - /** @inheritdoc */ - get: function () { return this._namespace; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "prefix", { - /** @inheritdoc */ - get: function () { return this._namespacePrefix; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "localName", { - /** @inheritdoc */ - get: function () { return this._localName; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "tagName", { - /** @inheritdoc */ - get: function () { return this._htmlUppercasedQualifiedName; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "id", { - /** @inheritdoc */ - get: function () { - return algorithm_1.element_getAnAttributeValue(this, "id"); - }, - set: function (value) { - algorithm_1.element_setAnAttributeValue(this, "id", value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "className", { - /** @inheritdoc */ - get: function () { - return algorithm_1.element_getAnAttributeValue(this, "class"); - }, - set: function (value) { - algorithm_1.element_setAnAttributeValue(this, "class", value); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "classList", { - /** @inheritdoc */ - get: function () { - var attr = algorithm_1.element_getAnAttributeByName("class", this); - if (attr === null) { - attr = algorithm_1.create_attr(this._nodeDocument, "class"); - } - return algorithm_1.create_domTokenList(this, attr); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "slot", { - /** @inheritdoc */ - get: function () { - return algorithm_1.element_getAnAttributeValue(this, "slot"); - }, - set: function (value) { - algorithm_1.element_setAnAttributeValue(this, "slot", value); - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - ElementImpl.prototype.hasAttributes = function () { - return this._attributeList.length !== 0; - }; - Object.defineProperty(ElementImpl.prototype, "attributes", { - /** @inheritdoc */ - get: function () { return this._attributeList; }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - ElementImpl.prototype.getAttributeNames = function () { - var e_1, _a; + else if (input.length >= 2 && input[0] === '0') { /** - * The getAttributeNames() method, when invoked, must return the qualified - * names of the attributes in context object’s attribute list, in order, - * and a new list otherwise. + * 3. Otherwise, if input contains at least two code points and the first + * code point is U+0030 (0), then: + * 3.1. Set validationErrorFlag. + * 3.2. Remove the first code point from input. + * 3.3. Set R to 8. */ - var names = []; + validationErrorFlag.value = true; + input = input.substr(1); + R = 8; + } + /** + * 4. If input is the empty string, then return zero. + * 5. If input contains a code point that is not a radix-R digit, then + * return failure. + */ + if (input === "") + return 0; + var radixRDigits = (R === 10 ? /^[0-9]+$/ : (R === 16 ? /^[0-9A-Fa-f]+$/ : /^[0-7]+$/)); + if (!radixRDigits.test(input)) + return null; + /** + * 6. Return the mathematical integer value that is represented by input in + * radix-R notation, using ASCII hex digits for digits with values + * 0 through 15. + */ + return parseInt(input, R); +} +exports.iPv4NumberParser = iPv4NumberParser; +/** + * Parses a string containing an IP v4 address. + * + * @param input - input string + */ +function iPv4Parser(input) { + var e_6, _a, e_7, _b; + /** + * 1. Let validationErrorFlag be unset. + * 2. Let parts be input split on U+002E (.). + */ + var validationErrorFlag = { value: false }; + var parts = input.split('.'); + /** + * 3. If the last item in parts is the empty string, then: + * 3.1. Set validationErrorFlag. + * 3.2. If parts has more than one item, then remove the last item from + * parts. + */ + if (parts[parts.length - 1] === "") { + validationErrorFlag.value = true; + if (parts.length > 1) + parts.pop(); + } + /** + * 4. If parts has more than four items, return input. + */ + if (parts.length > 4) + return input; + /** + * 5. Let numbers be the empty list. + * 6. For each part in parts: + * 6.1. If part is the empty string, return input. + * 6.2. Let n be the result of parsing part using validationErrorFlag. + * 6.3. If n is failure, return input. + * 6.4. Append n to numbers. + */ + var numbers = []; + try { + for (var parts_1 = __values(parts), parts_1_1 = parts_1.next(); !parts_1_1.done; parts_1_1 = parts_1.next()) { + var part = parts_1_1.value; + if (part === "") + return input; + var n = iPv4NumberParser(part, validationErrorFlag); + if (n === null) + return input; + numbers.push(n); + } + } + catch (e_6_1) { e_6 = { error: e_6_1 }; } + finally { try { - for (var _b = __values(this._attributeList), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - names.push(attr._qualifiedName); - } + if (parts_1_1 && !parts_1_1.done && (_a = parts_1.return)) _a.call(parts_1); } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } + finally { if (e_6) throw e_6.error; } + } + /** + * 7. If validationErrorFlag is set, validation error. + * 8. If any item in numbers is greater than 255, validation error. + * 9. If any but the last item in numbers is greater than 255, return + * failure. + * 10. If the last item in numbers is greater than or equal to + * 256**(5 − the number of items in numbers), validation error, return failure. + */ + if (validationErrorFlag.value) + validationError("Invalid IP v4 address."); + for (var i = 0; i < numbers.length; i++) { + var item = numbers[i]; + if (item > 255) { + validationError("Invalid IP v4 address."); + if (i < numbers.length - 1) + return null; } - return names; - }; - /** @inheritdoc */ - ElementImpl.prototype.getAttribute = function (qualifiedName) { - /** - * 1. Let attr be the result of getting an attribute given qualifiedName - * and the context object. - * 2. If attr is null, return null. - * 3. Return attr’s value. - */ - var attr = algorithm_1.element_getAnAttributeByName(qualifiedName, this); - return (attr ? attr._value : null); - }; - /** @inheritdoc */ - ElementImpl.prototype.getAttributeNS = function (namespace, localName) { - /** - * 1. Let attr be the result of getting an attribute given namespace, - * localName, and the context object. - * 2. If attr is null, return null. - * 3. Return attr’s value. - */ - var attr = algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace, localName, this); - return (attr ? attr._value : null); - }; - /** @inheritdoc */ - ElementImpl.prototype.setAttribute = function (qualifiedName, value) { - /** - * 1. If qualifiedName does not match the Name production in XML, then - * throw an "InvalidCharacterError" DOMException. - */ - if (!algorithm_1.xml_isName(qualifiedName)) - throw new DOMException_1.InvalidCharacterError(); - /** - * 2. If the context object is in the HTML namespace and its node document - * is an HTML document, then set qualifiedName to qualifiedName in ASCII - * lowercase. - */ - if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { - qualifiedName = qualifiedName.toLowerCase(); + } + if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { + validationError("Invalid IP v4 address."); + return null; + } + /** + * 11. Let ipv4 be the last item in numbers. + * 12. Remove the last item from numbers. + */ + var ipv4 = numbers[numbers.length - 1]; + numbers.pop(); + /** + * 13. Let counter be zero. + * 14. For each n in numbers: + * 14.2. Increment ipv4 by n × 256**(3 − counter). + * 14.2. Increment counter by 1. + */ + var counter = 0; + try { + for (var numbers_1 = __values(numbers), numbers_1_1 = numbers_1.next(); !numbers_1_1.done; numbers_1_1 = numbers_1.next()) { + var n = numbers_1_1.value; + ipv4 += n * Math.pow(256, 3 - counter); + counter++; } - /** - * 3. Let attribute be the first attribute in context object’s attribute - * list whose qualified name is qualifiedName, and null otherwise. - */ - var attribute = null; - for (var i = 0; i < this._attributeList.length; i++) { - var attr = this._attributeList[i]; - if (attr._qualifiedName === qualifiedName) { - attribute = attr; - break; - } + } + catch (e_7_1) { e_7 = { error: e_7_1 }; } + finally { + try { + if (numbers_1_1 && !numbers_1_1.done && (_b = numbers_1.return)) _b.call(numbers_1); } - /** - * 4. If attribute is null, create an attribute whose local name is - * qualifiedName, value is value, and node document is context object’s - * node document, then append this attribute to context object, and - * then return. - */ - if (attribute === null) { - attribute = algorithm_1.create_attr(this._nodeDocument, qualifiedName); - attribute._value = value; - algorithm_1.element_append(attribute, this); - return; + finally { if (e_7) throw e_7.error; } + } + /** + * 15. Return ipv4. + */ + return ipv4; +} +exports.iPv4Parser = iPv4Parser; +/** + * Parses a string containing an IP v6 address. + * + * @param input - input string + */ +function iPv6Parser(input) { + var _a; + /** + * 1. Let address be a new IPv6 address whose IPv6 pieces are all 0. + * 2. Let pieceIndex be 0. + * 3. Let compress be null. + * 4. Let pointer be a pointer into input, initially 0 (pointing to the + * first code point). + */ + var EOF = ""; + var address = [0, 0, 0, 0, 0, 0, 0, 0]; + var pieceIndex = 0; + var compress = null; + var walker = new util_1.StringWalker(input); + /** + * 5. If c is U+003A (:), then: + * 5.1. If remaining does not start with U+003A (:), validation error, + * return failure. + * 5.2. Increase pointer by 2. + * 5.3. Increase pieceIndex by 1 and then set compress to pieceIndex. + */ + if (walker.c() === ':') { + if (!walker.remaining().startsWith(':')) { + validationError("Invalid IP v6 address."); + return null; } + walker.pointer += 2; + pieceIndex += 1; + compress = pieceIndex; + } + /** + * 6. While c is not the EOF code point: + */ + while (walker.c() !== EOF) { /** - * 5. Change attribute from context object to value. - */ - algorithm_1.element_change(attribute, this, value); - }; - /** @inheritdoc */ - ElementImpl.prototype.setAttributeNS = function (namespace, qualifiedName, value) { - /** - * 1. Let namespace, prefix, and localName be the result of passing - * namespace and qualifiedName to validate and extract. - * 2. Set an attribute value for the context object using localName, value, - * and also prefix and namespace. - */ - var _a = __read(algorithm_1.namespace_validateAndExtract(namespace, qualifiedName), 3), ns = _a[0], prefix = _a[1], localName = _a[2]; - algorithm_1.element_setAnAttributeValue(this, localName, value, prefix, ns); - }; - /** @inheritdoc */ - ElementImpl.prototype.removeAttribute = function (qualifiedName) { - /** - * The removeAttribute(qualifiedName) method, when invoked, must remove an - * attribute given qualifiedName and the context object, and then return - * undefined. - */ - algorithm_1.element_removeAnAttributeByName(qualifiedName, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.removeAttributeNS = function (namespace, localName) { - /** - * The removeAttributeNS(namespace, localName) method, when invoked, must - * remove an attribute given namespace, localName, and context object, and - * then return undefined. + * 6.1. If pieceIndex is 8, validation error, return failure. */ - algorithm_1.element_removeAnAttributeByNamespaceAndLocalName(namespace, localName, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.hasAttribute = function (qualifiedName) { + if (pieceIndex === 8) { + validationError("Invalid IP v6 address."); + return null; + } /** - * 1. If the context object is in the HTML namespace and its node document - * is an HTML document, then set qualifiedName to qualifiedName in ASCII - * lowercase. - * 2. Return true if the context object has an attribute whose qualified - * name is qualifiedName, and false otherwise. + * 6.2. If c is U+003A (:), then: + * 6.2.1. If compress is non-null, validation error, return failure. + * 6.2.2. Increase pointer and pieceIndex by 1, set compress to pieceIndex, + * and then continue. */ - if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { - qualifiedName = qualifiedName.toLowerCase(); - } - for (var i = 0; i < this._attributeList.length; i++) { - var attr = this._attributeList[i]; - if (attr._qualifiedName === qualifiedName) { - return true; + if (walker.c() === ':') { + if (compress !== null) { + validationError("Invalid IP v6 address."); + return null; } + walker.pointer++; + pieceIndex++; + compress = pieceIndex; + continue; } - return false; - }; - /** @inheritdoc */ - ElementImpl.prototype.toggleAttribute = function (qualifiedName, force) { - /** - * 1. If qualifiedName does not match the Name production in XML, then - * throw an "InvalidCharacterError" DOMException. - */ - if (!algorithm_1.xml_isName(qualifiedName)) - throw new DOMException_1.InvalidCharacterError(); /** - * 2. If the context object is in the HTML namespace and its node document - * is an HTML document, then set qualifiedName to qualifiedName in ASCII - * lowercase. + * 6.3. Let value and length be 0. + * 6.4. While length is less than 4 and c is an ASCII hex digit, set value + * to value × 0x10 + c interpreted as hexadecimal number, and increase + * pointer and length by 1. */ - if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { - qualifiedName = qualifiedName.toLowerCase(); + var value = 0; + var length = 0; + while (length < 4 && infra_1.codePoint.ASCIIHexDigit.test(walker.c())) { + value = value * 0x10 + parseInt(walker.c(), 16); + walker.pointer++; + length++; } /** - * 3. Let attribute be the first attribute in the context object’s attribute - * list whose qualified name is qualifiedName, and null otherwise. + * 6.5. If c is U+002E (.), then: */ - var attribute = null; - for (var i = 0; i < this._attributeList.length; i++) { - var attr = this._attributeList[i]; - if (attr._qualifiedName === qualifiedName) { - attribute = attr; - break; - } - } - if (attribute === null) { + if (walker.c() === '.') { /** - * 4. If attribute is null, then: - * 4.1. If force is not given or is true, create an attribute whose local - * name is qualifiedName, value is the empty string, and node document is - * the context object’s node document, then append this attribute to the - * context object, and then return true. - * 4.2. Return false. + * 6.5.1. If length is 0, validation error, return failure. + * 6.5.2. Decrease pointer by length. + * 6.5.3. If pieceIndex is greater than 6, validation error, return + * failure. + * 6.5.4. Let numbersSeen be 0. */ - if (force === undefined || force === true) { - attribute = algorithm_1.create_attr(this._nodeDocument, qualifiedName); - attribute._value = ''; - algorithm_1.element_append(attribute, this); - return true; + if (length === 0) { + validationError("Invalid IP v6 address."); + return null; } - return false; - } - else if (force === undefined || force === false) { + walker.pointer -= length; + if (pieceIndex > 6) { + validationError("Invalid IP v6 address."); + return null; + } + var numbersSeen = 0; /** - * 5. Otherwise, if force is not given or is false, remove an attribute - * given qualifiedName and the context object, and then return false. + * 6.5.5. While c is not the EOF code point: */ - algorithm_1.element_removeAnAttributeByName(qualifiedName, this); - return false; - } - /** - * 6. Return true. - */ - return true; - }; - /** @inheritdoc */ - ElementImpl.prototype.hasAttributeNS = function (namespace, localName) { - /** - * 1. If namespace is the empty string, set it to null. - * 2. Return true if the context object has an attribute whose namespace is - * namespace and local name is localName, and false otherwise. - */ - var ns = namespace || null; - for (var i = 0; i < this._attributeList.length; i++) { - var attr = this._attributeList[i]; - if (attr._namespace === ns && attr._localName === localName) { - return true; - } - } - return false; - }; - /** @inheritdoc */ - ElementImpl.prototype.getAttributeNode = function (qualifiedName) { - /** - * The getAttributeNode(qualifiedName) method, when invoked, must return the - * result of getting an attribute given qualifiedName and context object. - */ - return algorithm_1.element_getAnAttributeByName(qualifiedName, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.getAttributeNodeNS = function (namespace, localName) { - /** - * The getAttributeNodeNS(namespace, localName) method, when invoked, must - * return the result of getting an attribute given namespace, localName, and - * the context object. - */ - return algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace, localName, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.setAttributeNode = function (attr) { - /** - * The setAttributeNode(attr) and setAttributeNodeNS(attr) methods, when - * invoked, must return the result of setting an attribute given attr and - * the context object. - */ - return algorithm_1.element_setAnAttribute(attr, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.setAttributeNodeNS = function (attr) { - return algorithm_1.element_setAnAttribute(attr, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.removeAttributeNode = function (attr) { - /** - * 1. If context object’s attribute list does not contain attr, then throw - * a "NotFoundError" DOMException. - * 2. Remove attr from context object. - * 3. Return attr. - */ - var found = false; - for (var i = 0; i < this._attributeList.length; i++) { - var attribute = this._attributeList[i]; - if (attribute === attr) { - found = true; - break; - } - } - if (!found) - throw new DOMException_1.NotFoundError(); - algorithm_1.element_remove(attr, this); - return attr; - }; - /** @inheritdoc */ - ElementImpl.prototype.attachShadow = function (init) { - /** - * 1. If context object’s namespace is not the HTML namespace, then throw a - * "NotSupportedError" DOMException. - */ - if (this._namespace !== infra_1.namespace.HTML) - throw new DOMException_1.NotSupportedError(); - /** - * 2. If context object’s local name is not a valid custom element name, - * "article", "aside", "blockquote", "body", "div", "footer", "h1", "h2", - * "h3", "h4", "h5", "h6", "header", "main" "nav", "p", "section", - * or "span", then throw a "NotSupportedError" DOMException. - */ - if (!algorithm_1.customElement_isValidCustomElementName(this._localName) && - !algorithm_1.customElement_isValidShadowHostName(this._localName)) - throw new DOMException_1.NotSupportedError(); - /** - * 3. If context object’s local name is a valid custom element name, - * or context object’s is value is not null, then: - * 3.1. Let definition be the result of looking up a custom element - * definition given context object’s node document, its namespace, its - * local name, and its is value. - * 3.2. If definition is not null and definition’s disable shadow is true, - * then throw a "NotSupportedError" DOMException. - */ - if (algorithm_1.customElement_isValidCustomElementName(this._localName) || this._is !== null) { - var definition = algorithm_1.customElement_lookUpACustomElementDefinition(this._nodeDocument, this._namespace, this._localName, this._is); - if (definition !== null && definition.disableShadow === true) { - throw new DOMException_1.NotSupportedError(); + while (walker.c() !== EOF) { + /** + * 6.5.5.1. Let ipv4Piece be null. + */ + var ipv4Piece = null; + /** + * 6.5.5.2. If numbersSeen is greater than 0, then: + * 6.5.5.2.1. If c is a U+002E (.) and numbersSeen is less than 4, then + * increase pointer by 1. + * 6.5.5.2.1. Otherwise, validation error, return failure. + */ + if (numbersSeen > 0) { + if (walker.c() === '.' && numbersSeen < 4) { + walker.pointer++; + } + else { + validationError("Invalid IP v6 address."); + return null; + } + } + /** + * 6.5.5.3. If c is not an ASCII digit, validation error, return + * failure. + */ + if (!infra_1.codePoint.ASCIIDigit.test(walker.c())) { + validationError("Invalid IP v6 address."); + return null; + } + /** + * 6.5.5.4. While c is an ASCII digit: + */ + while (infra_1.codePoint.ASCIIDigit.test(walker.c())) { + /** + * 6.5.5.4.1. Let number be c interpreted as decimal number. + */ + var number = parseInt(walker.c(), 10); + /** + * 6.5.5.4.2. If ipv4Piece is null, then set ipv4Piece to number. + * Otherwise, if ipv4Piece is 0, validation error, return failure. + * Otherwise, set ipv4Piece to ipv4Piece × 10 + number. + */ + if (ipv4Piece === null) { + ipv4Piece = number; + } + else if (ipv4Piece === 0) { + validationError("Invalid IP v6 address."); + return null; + } + else { + ipv4Piece = ipv4Piece * 10 + number; + } + /** + * 6.5.5.4.3. If ipv4Piece is greater than 255, validation error, return failure. + * 6.5.5.4.4. Increase pointer by 1. + */ + if (ipv4Piece > 255) { + validationError("Invalid IP v6 address."); + return null; + } + walker.pointer++; + } + /** + * 6.5.5.5. Set address[pieceIndex] to address[pieceIndex] × 0x100 + ipv4Piece. + * 6.5.5.6. Increase numbersSeen by 1. + * 6.5.5.7. If numbersSeen is 2 or 4, then increase pieceIndex by 1. + */ + if (ipv4Piece === null) { + validationError("Invalid IP v6 address."); + return null; + } + address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; + numbersSeen++; + if (numbersSeen === 2 || numbersSeen === 4) + pieceIndex++; + } + /** + * 6.5.6. If numbersSeen is not 4, validation error, return failure. + */ + if (numbersSeen !== 4) { + validationError("Invalid IP v6 address."); + return null; } + /** + * 6.5.7. Break. + */ + break; } - /** - * 4. If context object is a shadow host, then throw an "NotSupportedError" - * DOMException. - */ - if (this._shadowRoot !== null) - throw new DOMException_1.NotSupportedError(); - /** - * 5. Let shadow be a new shadow root whose node document is context - * object’s node document, host is context object, and mode is init’s mode. - * 6. Set context object’s shadow root to shadow. - * 7. Return shadow. - */ - var shadow = algorithm_1.create_shadowRoot(this._nodeDocument, this); - shadow._mode = init.mode; - this._shadowRoot = shadow; - return shadow; - }; - Object.defineProperty(ElementImpl.prototype, "shadowRoot", { - /** @inheritdoc */ - get: function () { + else if (walker.c() === ':') { /** - * 1. Let shadow be context object’s shadow root. - * 2. If shadow is null or its mode is "closed", then return null. - * 3. Return shadow. + * 6.6. Otherwise, if c is U+003A (:): + * 6.6.1. Increase pointer by 1. + * 6.6.2. If c is the EOF code point, validation error, return failure. */ - var shadow = this._shadowRoot; - if (shadow === null || shadow.mode === "closed") + walker.pointer++; + if (walker.c() === EOF) { + validationError("Invalid IP v6 address."); return null; - else - return shadow; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - ElementImpl.prototype.closest = function (selectors) { - /** - * TODO: Selectors - * 1. Let s be the result of parse a selector from selectors. [SELECTORS4] - * 2. If s is failure, throw a "SyntaxError" DOMException. - * 3. Let elements be context object’s inclusive ancestors that are - * elements, in reverse tree order. - * 4. For each element in elements, if match a selector against an element, - * using s, element, and :scope element context object, returns success, - * return element. [SELECTORS4] - * 5. Return null. - */ - throw new DOMException_1.NotImplementedError(); - }; - /** @inheritdoc */ - ElementImpl.prototype.matches = function (selectors) { - /** - * TODO: Selectors - * 1. Let s be the result of parse a selector from selectors. [SELECTORS4] - * 2. If s is failure, throw a "SyntaxError" DOMException. - * 3. Return true if the result of match a selector against an element, - * using s, element, and :scope element context object, returns success, - * and false otherwise. [SELECTORS4] - */ - throw new DOMException_1.NotImplementedError(); - }; - /** @inheritdoc */ - ElementImpl.prototype.webkitMatchesSelector = function (selectors) { - return this.matches(selectors); - }; - /** @inheritdoc */ - ElementImpl.prototype.getElementsByTagName = function (qualifiedName) { - /** - * The getElementsByTagName(qualifiedName) method, when invoked, must return - * the list of elements with qualified name qualifiedName for context - * object. - */ - return algorithm_1.node_listOfElementsWithQualifiedName(qualifiedName, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.getElementsByTagNameNS = function (namespace, localName) { - /** - * The getElementsByTagNameNS(namespace, localName) method, when invoked, - * must return the list of elements with namespace namespace and local name - * localName for context object. - */ - return algorithm_1.node_listOfElementsWithNamespace(namespace, localName, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.getElementsByClassName = function (classNames) { - /** - * The getElementsByClassName(classNames) method, when invoked, must return - * the list of elements with class names classNames for context object. - */ - return algorithm_1.node_listOfElementsWithClassNames(classNames, this); - }; - /** @inheritdoc */ - ElementImpl.prototype.insertAdjacentElement = function (where, element) { + } + } + else if (walker.c() !== EOF) { + /** + * 6.7. Otherwise, if c is not the EOF code point, validation error, + * return failure. + */ + validationError("Invalid IP v6 address."); + return null; + } /** - * The insertAdjacentElement(where, element) method, when invoked, must - * return the result of running insert adjacent, given context object, - * where, and element. + * 6.8. Set address[pieceIndex] to value. + * 6.9. Increase pieceIndex by 1. */ - return algorithm_1.element_insertAdjacent(this, where, element); - }; - /** @inheritdoc */ - ElementImpl.prototype.insertAdjacentText = function (where, data) { + address[pieceIndex] = value; + pieceIndex++; + } + /** + * 7. If compress is non-null, then: + * 7.1. Let swaps be pieceIndex − compress. + * 7.2. Set pieceIndex to 7. + * 7.3. While pieceIndex is not 0 and swaps is greater than 0, swap + * address[pieceIndex] with address[compress + swaps − 1], and then decrease + * both pieceIndex and swaps by 1. + */ + if (compress !== null) { + var swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex !== 0 && swaps > 0) { + _a = __read([address[compress + swaps - 1], address[pieceIndex]], 2), address[pieceIndex] = _a[0], address[compress + swaps - 1] = _a[1]; + pieceIndex--; + swaps--; + } + } + else if (compress === null && pieceIndex !== 8) { /** - * 1. Let text be a new Text node whose data is data and node document is - * context object’s node document. - * 2. Run insert adjacent, given context object, where, and text. + * 8. Otherwise, if compress is null and pieceIndex is not 8, + * validation error, return failure. */ - var text = algorithm_1.create_text(this._nodeDocument, data); - algorithm_1.element_insertAdjacent(this, where, text); + validationError("Invalid IP v6 address."); + return null; + } + /** + * 9. Return address. + */ + return address; +} +exports.iPv6Parser = iPv6Parser; +/** + * Parses an opaque host string. + * + * @param input - a string + */ +function opaqueHostParser(input) { + var e_8, _a; + /** + * 1. If input contains a forbidden host code point excluding U+0025 (%), + * validation error, return failure. + * 2. Let output be the empty string. + * 3. For each code point in input, UTF-8 percent encode it using the C0 + * control percent-encode set, and append the result to output. + * 4. Return output. + */ + var forbiddenChars = /[\x00\t\f\r #/:?@\[\\\]]/; + if (forbiddenChars.test(input)) { + validationError("Invalid host string."); + return null; + } + var output = ""; + try { + for (var input_1 = __values(input), input_1_1 = input_1.next(); !input_1_1.done; input_1_1 = input_1.next()) { + var codePoint = input_1_1.value; + output += utf8PercentEncode(codePoint, _c0ControlPercentEncodeSet); + } + } + catch (e_8_1) { e_8 = { error: e_8_1 }; } + finally { + try { + if (input_1_1 && !input_1_1.done && (_a = input_1.return)) _a.call(input_1); + } + finally { if (e_8) throw e_8.error; } + } + return output; +} +exports.opaqueHostParser = opaqueHostParser; +/** + * Resolves a Blob URL from the user agent's Blob URL store. + * function is not implemented. + * See: https://w3c.github.io/FileAPI/#blob-url-resolve + * + * @param url - an url + */ +function resolveABlobURL(url) { + return null; +} +exports.resolveABlobURL = resolveABlobURL; +/** + * Percent encodes a byte. + * + * @param value - a byte + */ +function percentEncode(value) { + /** + * To percent encode a byte into a percent-encoded byte, return a string + * consisting of U+0025 (%), followed by two ASCII upper hex digits + * representing byte. + */ + return '%' + ('00' + value.toString(16).toUpperCase()).slice(-2); +} +exports.percentEncode = percentEncode; +/** + * Percent decodes a byte sequence input. + * + * @param input - a byte sequence + */ +function percentDecode(input) { + var isHexDigit = function (byte) { + return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || + (byte >= 0x61 && byte <= 0x66); }; - Object.defineProperty(ElementImpl.prototype, "_qualifiedName", { - /** - * Returns the qualified name. - */ - get: function () { - /** - * An element’s qualified name is its local name if its namespace prefix is - * null, and its namespace prefix, followed by ":", followed by its - * local name, otherwise. - */ - return (this._namespacePrefix ? - this._namespacePrefix + ':' + this._localName : - this._localName); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "_htmlUppercasedQualifiedName", { + /** + * 1. Let output be an empty byte sequence. + * 2. For each byte byte in input: + */ + var output = new Uint8Array(input.length); + var n = 0; + for (var i = 0; i < input.length; i++) { + var byte = input[i]; /** - * Returns the upper-cased qualified name for a html element. + * 2.1. If byte is not 0x25 (%), then append byte to output. + * 2.2. Otherwise, if byte is 0x25 (%) and the next two bytes after byte + * in input are not in the ranges 0x30 (0) to 0x39 (9), 0x41 (A) + * to 0x46 (F), and 0x61 (a) to 0x66 (f), all inclusive, append byte + * to output. + * 2.3. Otherwise: + * 2.3.1. Let bytePoint be the two bytes after byte in input, decoded, + * and then interpreted as hexadecimal number. + * 2.3.2. Append a byte whose value is bytePoint to output. + * 2.3.3. Skip the next two bytes in input. */ - get: function () { - /** - * 1. Let qualifiedName be context object’s qualified name. - * 2. If the context object is in the HTML namespace and its node document - * is an HTML document, then set qualifiedName to qualifiedName in ASCII - * uppercase. - * 3. Return qualifiedName. - */ - var qualifiedName = this._qualifiedName; - if (this._namespace === infra_1.namespace.HTML && this._nodeDocument._type === "html") { - qualifiedName = qualifiedName.toUpperCase(); - } - return qualifiedName; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "children", { - // MIXIN: ParentNode - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "firstElementChild", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "lastElementChild", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "childElementCount", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: ParentNode not implemented."); }, - enumerable: true, - configurable: true - }); - /* istanbul ignore next */ - ElementImpl.prototype.prepend = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + if (byte !== 0x25) { + output[n] = byte; + n++; } - throw new Error("Mixin: ParentNode not implemented."); - }; - /* istanbul ignore next */ - ElementImpl.prototype.append = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + else if (byte === 0x25 && i >= input.length - 2) { + output[n] = byte; + n++; } - throw new Error("Mixin: ParentNode not implemented."); - }; - /* istanbul ignore next */ - ElementImpl.prototype.querySelector = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; - /* istanbul ignore next */ - ElementImpl.prototype.querySelectorAll = function (selectors) { throw new Error("Mixin: ParentNode not implemented."); }; - Object.defineProperty(ElementImpl.prototype, "previousElementSibling", { - // MIXIN: NonDocumentTypeChildNode - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ElementImpl.prototype, "nextElementSibling", { - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: NonDocumentTypeChildNode not implemented."); }, - enumerable: true, - configurable: true - }); - // MIXIN: ChildNode - /* istanbul ignore next */ - ElementImpl.prototype.before = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + else if (byte === 0x25 && (!isHexDigit(input[i + 1]) || !isHexDigit(input[i + 2]))) { + output[n] = byte; + n++; } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - ElementImpl.prototype.after = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + else { + var bytePoint = parseInt(util_1.utf8Decode(Uint8Array.of(input[i + 1], input[i + 2])), 16); + output[n] = bytePoint; + n++; + i += 2; } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - ElementImpl.prototype.replaceWith = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; + } + return output.subarray(0, n); +} +exports.percentDecode = percentDecode; +/** + * String percent decodes a string. + * + * @param input - a string + */ +function stringPercentDecode(input) { + /** + * 1. Let bytes be the UTF-8 encoding of input. + * 2. Return the percent decoding of bytes. + */ + return percentDecode(util_1.utf8Encode(input)); +} +exports.stringPercentDecode = stringPercentDecode; +/** + * UTF-8 percent encodes a code point, using a percent encode set. + * + * @param codePoint - a code point + * @param percentEncodeSet - a percent encode set + */ +function utf8PercentEncode(codePoint, percentEncodeSet) { + var e_9, _a; + /** + * 1. If codePoint is not in percentEncodeSet, then return codePoint. + * 2. Let bytes be the result of running UTF-8 encode on codePoint. + * 3. Percent encode each byte in bytes, and then return the results + * concatenated, in the same order. + */ + if (!percentEncodeSet.test(codePoint)) + return codePoint; + var bytes = util_1.utf8Encode(codePoint); + var result = ""; + try { + for (var bytes_2 = __values(bytes), bytes_2_1 = bytes_2.next(); !bytes_2_1.done; bytes_2_1 = bytes_2.next()) { + var byte = bytes_2_1.value; + result += percentEncode(byte); } - throw new Error("Mixin: ChildNode not implemented."); - }; - /* istanbul ignore next */ - ElementImpl.prototype.remove = function () { throw new Error("Mixin: ChildNode not implemented."); }; - Object.defineProperty(ElementImpl.prototype, "assignedSlot", { - // MIXIN: Slotable - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: Slotable not implemented."); }, - enumerable: true, - configurable: true - }); + } + catch (e_9_1) { e_9 = { error: e_9_1 }; } + finally { + try { + if (bytes_2_1 && !bytes_2_1.done && (_a = bytes_2.return)) _a.call(bytes_2); + } + finally { if (e_9) throw e_9.error; } + } + return result; +} +exports.utf8PercentEncode = utf8PercentEncode; +/** + * Determines if two hosts are considered equal. + * + * @param hostA - a host + * @param hostB - a host + */ +function hostEquals(hostA, hostB) { + return hostA === hostB; +} +exports.hostEquals = hostEquals; +/** + * Determines if two URLs are considered equal. + * + * @param urlA - a URL + * @param urlB - a URL + * @param excludeFragmentsFlag - whether to ignore fragments while comparing + */ +function urlEquals(urlA, urlB, excludeFragmentsFlag) { + if (excludeFragmentsFlag === void 0) { excludeFragmentsFlag = false; } /** - * Creates a new `Element`. - * - * @param document - owner document - * @param localName - local name - * @param namespace - namespace - * @param prefix - namespace prefix + * 1. Let serializedA be the result of serializing A, with the exclude + * fragment flag set if the exclude fragments flag is set. + * 2. Let serializedB be the result of serializing B, with the exclude + * fragment flag set if the exclude fragments flag is set. + * 3. Return true if serializedA is serializedB, and false otherwise. */ - ElementImpl._create = function (document, localName, namespace, namespacePrefix) { - if (namespace === void 0) { namespace = null; } - if (namespacePrefix === void 0) { namespacePrefix = null; } - var node = new ElementImpl(); - node._localName = localName; - node._namespace = namespace; - node._namespacePrefix = namespacePrefix; - node._nodeDocument = document; - return node; - }; - return ElementImpl; -}(NodeImpl_1.NodeImpl)); -exports.ElementImpl = ElementImpl; + return urlSerializer(urlA, excludeFragmentsFlag) === + urlSerializer(urlB, excludeFragmentsFlag); +} +exports.urlEquals = urlEquals; /** - * Initialize prototype properties + * Parses an `application/x-www-form-urlencoded` string. + * + * @param input - a string */ -WebIDLAlgorithm_1.idl_defineConst(ElementImpl.prototype, "_nodeType", interfaces_1.NodeType.Element); -//# sourceMappingURL=ElementImpl.js.map - -/***/ }), - -/***/ 38245: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var algorithm_1 = __nccwpck_require__(61); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); +function urlEncodedStringParser(input) { + /** + * The application/x-www-form-urlencoded string parser takes a string input, + * UTF-8 encodes it, and then returns the result of + * application/x-www-form-urlencoded parsing it. + */ + return urlEncodedParser(util_1.utf8Encode(input)); +} +exports.urlEncodedStringParser = urlEncodedStringParser; /** - * Represents a DOM event. + * Parses `application/x-www-form-urlencoded` bytes. + * + * @param input - a byte sequence */ -var EventImpl = /** @class */ (function () { +function urlEncodedParser(input) { + var e_10, _a, e_11, _b; /** - * Initializes a new instance of `Event`. + * 1. Let sequences be the result of splitting input on 0x26 (&). */ - function EventImpl(type, eventInit) { - this._target = null; - this._relatedTarget = null; - this._touchTargetList = []; - this._path = []; - this._currentTarget = null; - this._eventPhase = interfaces_1.EventPhase.None; - this._stopPropagationFlag = false; - this._stopImmediatePropagationFlag = false; - this._canceledFlag = false; - this._inPassiveListenerFlag = false; - this._composedFlag = false; - this._initializedFlag = false; - this._dispatchFlag = false; - this._isTrusted = false; - this._bubbles = false; - this._cancelable = false; - /** - * When a constructor of the Event interface, or of an interface that - * inherits from the Event interface, is invoked, these steps must be run, - * given the arguments type and eventInitDict: - * 1. Let event be the result of running the inner event creation steps with - * this interface, null, now, and eventInitDict. - * 2. Initialize event’s type attribute to type. - * 3. Return event. - */ - this._type = type; - if (eventInit) { - this._bubbles = eventInit.bubbles || false; - this._cancelable = eventInit.cancelable || false; - this._composedFlag = eventInit.composed || false; + var sequences = []; + var currentSequence = []; + try { + for (var input_2 = __values(input), input_2_1 = input_2.next(); !input_2_1.done; input_2_1 = input_2.next()) { + var byte = input_2_1.value; + if (byte === 0x26) { + sequences.push(Uint8Array.from(currentSequence)); + currentSequence = []; + } + else { + currentSequence.push(byte); + } } - this._initializedFlag = true; - this._timeStamp = new Date().getTime(); } - Object.defineProperty(EventImpl.prototype, "type", { - /** @inheritdoc */ - get: function () { return this._type; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "target", { - /** @inheritdoc */ - get: function () { return this._target; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "srcElement", { - /** @inheritdoc */ - get: function () { return this._target; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "currentTarget", { - /** @inheritdoc */ - get: function () { return this._currentTarget; }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - EventImpl.prototype.composedPath = function () { - /** - * 1. Let composedPath be an empty list. - * 2. Let path be the context object’s path. - * 3. If path is empty, then return composedPath. - * 4. Let currentTarget be the context object’s currentTarget attribute - * value. - * 5. Append currentTarget to composedPath. - * 6. Let currentTargetIndex be 0. - * 7. Let currentTargetHiddenSubtreeLevel be 0. - */ - var composedPath = []; - var path = this._path; - if (path.length === 0) - return composedPath; - var currentTarget = this._currentTarget; - if (currentTarget === null) { - throw new Error("Event currentTarget is null."); + catch (e_10_1) { e_10 = { error: e_10_1 }; } + finally { + try { + if (input_2_1 && !input_2_1.done && (_a = input_2.return)) _a.call(input_2); } - composedPath.push(currentTarget); - var currentTargetIndex = 0; - var currentTargetHiddenSubtreeLevel = 0; + finally { if (e_10) throw e_10.error; } + } + if (currentSequence.length !== 0) { + sequences.push(Uint8Array.from(currentSequence)); + } + /** + * 2. Let output be an initially empty list of name-value tuples where both name and value hold a string. + */ + var output = []; + try { /** - * 8. Let index be path’s size − 1. - * 9. While index is greater than or equal to 0: + * 3. For each byte sequence bytes in sequences: */ - var index = path.length - 1; - while (index >= 0) { + for (var sequences_1 = __values(sequences), sequences_1_1 = sequences_1.next(); !sequences_1_1.done; sequences_1_1 = sequences_1.next()) { + var bytes = sequences_1_1.value; /** - * 9.1. If path[index]'s root-of-closed-tree is true, then increase - * currentTargetHiddenSubtreeLevel by 1. - * 9.2. If path[index]'s invocation target is currentTarget, then set - * currentTargetIndex to index and break. - * 9.3. If path[index]'s slot-in-closed-tree is true, then decrease - * currentTargetHiddenSubtreeLevel by 1. - * 9.4. Decrease index by 1. + * 3.1. If bytes is the empty byte sequence, then continue. */ - if (path[index].rootOfClosedTree) { - currentTargetHiddenSubtreeLevel++; + if (bytes.length === 0) + continue; + /** + * 3.2. If bytes contains a 0x3D (=), then let name be the bytes from the + * start of bytes up to but excluding its first 0x3D (=), and let value be + * the bytes, if any, after the first 0x3D (=) up to the end of bytes. + * If 0x3D (=) is the first byte, then name will be the empty byte + * sequence. If it is the last, then value will be the empty byte sequence. + * 3.3. Otherwise, let name have the value of bytes and let value be the + * empty byte sequence. + */ + var index = bytes.indexOf(0x3D); + var name = (index !== -1 ? bytes.slice(0, index) : bytes); + var value = (index !== -1 ? bytes.slice(index + 1) : new Uint8Array()); + /** + * 3.4. Replace any 0x2B (+) in name and value with 0x20 (SP). + */ + for (var i = 0; i < name.length; i++) + if (name[i] === 0x2B) + name[i] = 0x20; + for (var i = 0; i < value.length; i++) + if (value[i] === 0x2B) + value[i] = 0x20; + /** + * 3.5. Let nameString and valueString be the result of running UTF-8 + * decode without BOM on the percent decoding of name and value, + * respectively. + */ + var nameString = util_1.utf8Decode(name); + var valueString = util_1.utf8Decode(value); + /** + * 3.6. Append (nameString, valueString) to output. + */ + output.push([nameString, valueString]); + } + } + catch (e_11_1) { e_11 = { error: e_11_1 }; } + finally { + try { + if (sequences_1_1 && !sequences_1_1.done && (_b = sequences_1.return)) _b.call(sequences_1); + } + finally { if (e_11) throw e_11.error; } + } + /** + * 4. Return output. + */ + return output; +} +exports.urlEncodedParser = urlEncodedParser; +/** + * Serializes `application/x-www-form-urlencoded` bytes. + * + * @param input - a byte sequence + */ +function urlEncodedByteSerializer(input) { + var e_12, _a; + /** + * 1. Let output be the empty string. + * 2. For each byte in input, depending on byte: + * 0x20 (SP) + * Append U+002B (+) to output. + * + * 0x2A (*) + * 0x2D (-) + * 0x2E (.) + * 0x30 (0) to 0x39 (9) + * 0x41 (A) to 0x5A (Z) + * 0x5F (_) + * 0x61 (a) to 0x7A (z) + * Append a code point whose value is byte to output. + * + * Otherwise + * Append byte, percent encoded, to output. + * 3. Return output. + */ + var output = ""; + try { + for (var input_3 = __values(input), input_3_1 = input_3.next(); !input_3_1.done; input_3_1 = input_3.next()) { + var byte = input_3_1.value; + if (byte === 0x20) { + output += '+'; } - if (path[index].invocationTarget === currentTarget) { - currentTargetIndex = index; - break; + else if (byte === 0x2A || byte === 0x2D || byte === 0x2E || + (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x5A) || + byte === 0x5F || (byte >= 0x61 && byte <= 0x7A)) { + output += String.fromCodePoint(byte); } - if (path[index].slotInClosedTree) { - currentTargetHiddenSubtreeLevel--; + else { + output += percentEncode(byte); } - index--; } + } + catch (e_12_1) { e_12 = { error: e_12_1 }; } + finally { + try { + if (input_3_1 && !input_3_1.done && (_a = input_3.return)) _a.call(input_3); + } + finally { if (e_12) throw e_12.error; } + } + return output; +} +exports.urlEncodedByteSerializer = urlEncodedByteSerializer; +/** + * Serializes `application/x-www-form-urlencoded` tuples. + * + * @param input - input tuple of name/value pairs + * @param encodingOverride: encoding override + */ +function urlEncodedSerializer(tuples, encodingOverride) { + var e_13, _a; + /** + * 1. Let encoding be UTF-8. + * 2. If encoding override is given, set encoding to the result of getting + * an output encoding from encoding override. + */ + var encoding = (encodingOverride === undefined || + encodingOverride === "replacement" || encodingOverride === "UTF-16BE" || + encodingOverride === "UTF-16LE" ? "UTF-8" : encodingOverride); + if (encoding.toUpperCase() !== "UTF-8") { + throw new Error("Only UTF-8 encoding is supported."); + } + /** + * 3. Let output be the empty string. + */ + var output = ""; + try { /** - * 10. Let currentHiddenLevel and maxHiddenLevel be - * currentTargetHiddenSubtreeLevel. - */ - var currentHiddenLevel = currentTargetHiddenSubtreeLevel; - var maxHiddenLevel = currentTargetHiddenSubtreeLevel; - /** - * 11. Set index to currentTargetIndex − 1. - * 12. While index is greater than or equal to 0: + * 4. For each tuple in tuples: */ - index = currentTargetIndex - 1; - while (index >= 0) { + for (var tuples_1 = __values(tuples), tuples_1_1 = tuples_1.next(); !tuples_1_1.done; tuples_1_1 = tuples_1.next()) { + var tuple = tuples_1_1.value; /** - * 12.1. If path[index]'s root-of-closed-tree is true, then increase - * currentHiddenLevel by 1. - * 12.2. If currentHiddenLevel is less than or equal to maxHiddenLevel, - * then prepend path[index]'s invocation target to composedPath. + * 4.1. Let name be the result of serializing the result of encoding + * tuple’s name, using encoding. */ - if (path[index].rootOfClosedTree) { - currentHiddenLevel++; - } - if (currentHiddenLevel <= maxHiddenLevel) { - composedPath.unshift(path[index].invocationTarget); - } + var name = urlEncodedByteSerializer(util_1.utf8Encode(tuple[0])); /** - * 12.3. If path[index]'s slot-in-closed-tree is true, then: + * 4.2. Let value be tuple’s value. */ - if (path[index].slotInClosedTree) { - /** - * 12.3.1. Decrease currentHiddenLevel by 1. - * 12.3.2. If currentHiddenLevel is less than maxHiddenLevel, then set - * maxHiddenLevel to currentHiddenLevel. - */ - currentHiddenLevel--; - if (currentHiddenLevel < maxHiddenLevel) { - maxHiddenLevel = currentHiddenLevel; - } - } + var value = tuple[1]; /** - * 12.4. Decrease index by 1. + * TODO: + * 4.3. If value is a file, then set value to value’s filename. */ - index--; - } - /** - * 13. Set currentHiddenLevel and maxHiddenLevel to - * currentTargetHiddenSubtreeLevel. - */ - currentHiddenLevel = currentTargetHiddenSubtreeLevel; - maxHiddenLevel = currentTargetHiddenSubtreeLevel; - /** - * 14. Set index to currentTargetIndex + 1. - * 15. While index is less than path’s size: - */ - index = currentTargetIndex + 1; - while (index < path.length) { /** - * 15.1. If path[index]'s slot-in-closed-tree is true, then increase - * currentHiddenLevel by 1. - * 15.2. If currentHiddenLevel is less than or equal to maxHiddenLevel, - * then append path[index]'s invocation target to composedPath. + * 4.4. Set value to the result of serializing the result of encoding + * value, using encoding. */ - if (path[index].slotInClosedTree) { - currentHiddenLevel++; - } - if (currentHiddenLevel <= maxHiddenLevel) { - composedPath.push(path[index].invocationTarget); - } + value = urlEncodedByteSerializer(util_1.utf8Encode(value)); /** - * 15.3. If path[index]'s root-of-closed-tree is true, then: + * 4.5. If tuple is not the first pair in tuples, then append U+0026 (&) + * to output. */ - if (path[index].rootOfClosedTree) { - /** - * 15.3.1. Decrease currentHiddenLevel by 1. - * 15.3.2. If currentHiddenLevel is less than maxHiddenLevel, then set - * maxHiddenLevel to currentHiddenLevel. - */ - currentHiddenLevel--; - if (currentHiddenLevel < maxHiddenLevel) { - maxHiddenLevel = currentHiddenLevel; - } - } + if (output !== "") + output += '&'; /** - * 15.4. Increase index by 1. + * 4.6. Append name, followed by U+003D (=), followed by value, to output. */ - index++; + output += name + '=' + value; } - /** - * 16. Return composedPath. - */ - return composedPath; - }; - Object.defineProperty(EventImpl.prototype, "eventPhase", { - /** @inheritdoc */ - get: function () { return this._eventPhase; }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - EventImpl.prototype.stopPropagation = function () { this._stopPropagationFlag = true; }; - Object.defineProperty(EventImpl.prototype, "cancelBubble", { - /** @inheritdoc */ - get: function () { return this._stopPropagationFlag; }, - set: function (value) { if (value) - this.stopPropagation(); }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - EventImpl.prototype.stopImmediatePropagation = function () { - this._stopPropagationFlag = true; - this._stopImmediatePropagationFlag = true; - }; - Object.defineProperty(EventImpl.prototype, "bubbles", { - /** @inheritdoc */ - get: function () { return this._bubbles; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "cancelable", { - /** @inheritdoc */ - get: function () { return this._cancelable; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "returnValue", { - /** @inheritdoc */ - get: function () { return !this._canceledFlag; }, - set: function (value) { - if (!value) { - algorithm_1.event_setTheCanceledFlag(this); - } - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - EventImpl.prototype.preventDefault = function () { - algorithm_1.event_setTheCanceledFlag(this); - }; - Object.defineProperty(EventImpl.prototype, "defaultPrevented", { - /** @inheritdoc */ - get: function () { return this._canceledFlag; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "composed", { - /** @inheritdoc */ - get: function () { return this._composedFlag; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "isTrusted", { - /** @inheritdoc */ - get: function () { return this._isTrusted; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventImpl.prototype, "timeStamp", { - /** @inheritdoc */ - get: function () { return this._timeStamp; }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - EventImpl.prototype.initEvent = function (type, bubbles, cancelable) { - if (bubbles === void 0) { bubbles = false; } - if (cancelable === void 0) { cancelable = false; } - /** - * 1. If the context object’s dispatch flag is set, then return. - */ - if (this._dispatchFlag) - return; - /** - * 2. Initialize the context object with type, bubbles, and cancelable. - */ - algorithm_1.event_initialize(this, type, bubbles, cancelable); - }; - EventImpl.NONE = 0; - EventImpl.CAPTURING_PHASE = 1; - EventImpl.AT_TARGET = 2; - EventImpl.BUBBLING_PHASE = 3; - return EventImpl; -}()); -exports.EventImpl = EventImpl; + } + catch (e_13_1) { e_13 = { error: e_13_1 }; } + finally { + try { + if (tuples_1_1 && !tuples_1_1.done && (_a = tuples_1.return)) _a.call(tuples_1); + } + finally { if (e_13) throw e_13.error; } + } + /** + * 5. Return output. + */ + return output; +} +exports.urlEncodedSerializer = urlEncodedSerializer; +/** + * Returns a URL's origin. + * + * @param url - a URL + */ +function origin(url) { + /** + * A URL’s origin is the origin returned by running these steps, switching + * on URL’s scheme: + * "blob" + * 1. If URL’s blob URL entry is non-null, then return URL’s blob URL + * entry’s environment’s origin. + * 2. Let url be the result of parsing URL’s path[0]. + * 3. Return a new opaque origin, if url is failure, and url’s origin + * otherwise. + * "ftp" + * "http" + * "https" + * "ws" + * "wss" + * Return a tuple consisting of URL’s scheme, URL’s host, URL’s port, and + * null. + * "file" + * Unfortunate as it is, is left as an exercise to the reader. When in + * doubt, return a new opaque origin. + * Otherwise + * Return a new opaque origin. + */ + switch (url.scheme) { + case "blob": + if (url._blobURLEntry !== null) { + // TODO: return URL’s blob URL entry’s environment’s origin. + } + var parsedURL = basicURLParser(url.path[0]); + if (parsedURL === null) + return interfaces_1.OpaqueOrigin; + else + return origin(parsedURL); + case "ftp": + case "http": + case "https": + case "ws": + case "wss": + return [url.scheme, url.host === null ? "" : url.host, url.port, null]; + case "file": + return interfaces_1.OpaqueOrigin; + default: + return interfaces_1.OpaqueOrigin; + } +} +exports.origin = origin; /** - * Define constants on prototype. + * Converts a domain string to ASCII. + * + * @param domain - a domain string */ -WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "NONE", 0); -WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "CAPTURING_PHASE", 1); -WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "AT_TARGET", 2); -WebIDLAlgorithm_1.idl_defineConst(EventImpl.prototype, "BUBBLING_PHASE", 3); -//# sourceMappingURL=EventImpl.js.map +function domainToASCII(domain, beStrict) { + if (beStrict === void 0) { beStrict = false; } + /** + * 1. If beStrict is not given, set it to false. + * 2. Let result be the result of running Unicode ToASCII with domain_name + * set to domain, UseSTD3ASCIIRules set to beStrict, CheckHyphens set to + * false, CheckBidi set to true, CheckJoiners set to true, + * Transitional_Processing set to false, and VerifyDnsLength set to beStrict. + * 3. If result is a failure value, validation error, return failure. + * 4. Return result. + */ + // Use node.js function + var result = url_1.domainToASCII(domain); + if (result === "") { + validationError("Invalid domain name."); + return null; + } + return result; +} +exports.domainToASCII = domainToASCII; +/** + * Converts a domain string to Unicode. + * + * @param domain - a domain string + */ +function domainToUnicode(domain, beStrict) { + if (beStrict === void 0) { beStrict = false; } + /** + * 1. Let result be the result of running Unicode ToUnicode with domain_name + * set to domain, CheckHyphens set to false, CheckBidi set to true, + * CheckJoiners set to true, UseSTD3ASCIIRules set to false, and + * Transitional_Processing set to false. + * 2. Signify validation errors for any returned errors, and then, + * return result. + */ + // Use node.js function + var result = url_1.domainToUnicode(domain); + if (result === "") { + validationError("Invalid domain name."); + } + return result; +} +exports.domainToUnicode = domainToUnicode; +/** + * Serializes an origin. + * function is from the HTML spec: + * https://html.spec.whatwg.org/#ascii-serialisation-of-an-origin + * + * @param origin - an origin + */ +function asciiSerializationOfAnOrigin(origin) { + /** + * 1. If origin is an opaque origin, then return "null". + * 2. Otherwise, let result be origin's scheme. + * 3. Append "://" to result. + * 4. Append origin's host, serialized, to result. + * 5. If origin's port is non-null, append a U+003A COLON character (:), + * and origin's port, serialized, to result. + * 6. Return result. + */ + if (origin[0] === "" && origin[1] === "" && origin[2] === null && origin[3] === null) { + return "null"; + } + var result = origin[0] + "://" + hostSerializer(origin[1]); + if (origin[2] !== null) + result += ":" + origin[2].toString(); + return result; +} +exports.asciiSerializationOfAnOrigin = asciiSerializationOfAnOrigin; +//# sourceMappingURL=URLAlgorithm.js.map /***/ }), -/***/ 69968: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 31752: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMException_1 = __nccwpck_require__(13166); -var util_1 = __nccwpck_require__(65282); -var algorithm_1 = __nccwpck_require__(61); /** - * Represents a target to which an event can be dispatched. + * Represents the state of the URL parser. */ -var EventTargetImpl = /** @class */ (function () { - /** - * Initializes a new instance of `EventTarget`. - */ - function EventTargetImpl() { - } - Object.defineProperty(EventTargetImpl.prototype, "_eventListenerList", { - get: function () { - return this.__eventListenerList || (this.__eventListenerList = []); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(EventTargetImpl.prototype, "_eventHandlerMap", { - get: function () { - return this.__eventHandlerMap || (this.__eventHandlerMap = {}); - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - EventTargetImpl.prototype.addEventListener = function (type, callback, options) { - if (options === void 0) { options = { passive: false, once: false, capture: false }; } - /** - * 1. Let capture, passive, and once be the result of flattening more options. - */ - var _a = __read(algorithm_1.eventTarget_flattenMore(options), 3), capture = _a[0], passive = _a[1], once = _a[2]; - // convert callback function to EventListener, return if null - var listenerCallback; - if (!callback) { - return; - } - else if (util_1.Guard.isEventListener(callback)) { - listenerCallback = callback; - } - else { - listenerCallback = { handleEvent: callback }; - } - /** - * 2. Add an event listener with the context object and an event listener - * whose type is type, callback is callback, capture is capture, passive is - * passive, and once is once. - */ - algorithm_1.eventTarget_addEventListener(this, { - type: type, - callback: listenerCallback, - capture: capture, - passive: passive, - once: once, - removed: false - }); - }; - /** @inheritdoc */ - EventTargetImpl.prototype.removeEventListener = function (type, callback, options) { - /** - * TODO: Implement realms - * 1. If the context object’s relevant global object is a - * ServiceWorkerGlobalScope object and its associated service worker’s - * script resource’s has ever been evaluated flag is set, then throw - * a TypeError. [SERVICE-WORKERS] - */ - if (options === void 0) { options = { capture: false }; } - /** - * 2. Let capture be the result of flattening options. - */ - var capture = algorithm_1.eventTarget_flatten(options); - if (!callback) - return; - /** - * 3. If the context object’s event listener list contains an event listener - * whose type is type, callback is callback, and capture is capture, then - * remove an event listener with the context object and that event listener. - */ - for (var i = 0; i < this._eventListenerList.length; i++) { - var entry = this._eventListenerList[i]; - if (entry.type !== type || entry.capture !== capture) - continue; - if (util_1.Guard.isEventListener(callback) && entry.callback === callback) { - algorithm_1.eventTarget_removeEventListener(this, entry, i); - break; - } - else if (callback && entry.callback.handleEvent === callback) { - algorithm_1.eventTarget_removeEventListener(this, entry, i); - break; - } - } - }; - /** @inheritdoc */ - EventTargetImpl.prototype.dispatchEvent = function (event) { - /** - * 1. If event’s dispatch flag is set, or if its initialized flag is not - * set, then throw an "InvalidStateError" DOMException. - * 2. Initialize event’s isTrusted attribute to false. - * 3. Return the result of dispatching event to the context object. - */ - if (event._dispatchFlag || !event._initializedFlag) { - throw new DOMException_1.InvalidStateError(); - } - event._isTrusted = false; - return algorithm_1.event_dispatch(event, this); - }; - /** @inheritdoc */ - EventTargetImpl.prototype._getTheParent = function (event) { - return null; - }; - return EventTargetImpl; -}()); -exports.EventTargetImpl = EventTargetImpl; -//# sourceMappingURL=EventTargetImpl.js.map +var ParserState; +(function (ParserState) { + ParserState[ParserState["SchemeStart"] = 0] = "SchemeStart"; + ParserState[ParserState["Scheme"] = 1] = "Scheme"; + ParserState[ParserState["NoScheme"] = 2] = "NoScheme"; + ParserState[ParserState["SpecialRelativeOrAuthority"] = 3] = "SpecialRelativeOrAuthority"; + ParserState[ParserState["PathOrAuthority"] = 4] = "PathOrAuthority"; + ParserState[ParserState["Relative"] = 5] = "Relative"; + ParserState[ParserState["RelativeSlash"] = 6] = "RelativeSlash"; + ParserState[ParserState["SpecialAuthoritySlashes"] = 7] = "SpecialAuthoritySlashes"; + ParserState[ParserState["SpecialAuthorityIgnoreSlashes"] = 8] = "SpecialAuthorityIgnoreSlashes"; + ParserState[ParserState["Authority"] = 9] = "Authority"; + ParserState[ParserState["Host"] = 10] = "Host"; + ParserState[ParserState["Hostname"] = 11] = "Hostname"; + ParserState[ParserState["Port"] = 12] = "Port"; + ParserState[ParserState["File"] = 13] = "File"; + ParserState[ParserState["FileSlash"] = 14] = "FileSlash"; + ParserState[ParserState["FileHost"] = 15] = "FileHost"; + ParserState[ParserState["PathStart"] = 16] = "PathStart"; + ParserState[ParserState["Path"] = 17] = "Path"; + ParserState[ParserState["CannotBeABaseURLPath"] = 18] = "CannotBeABaseURLPath"; + ParserState[ParserState["Query"] = 19] = "Query"; + ParserState[ParserState["Fragment"] = 20] = "Fragment"; +})(ParserState = exports.ParserState || (exports.ParserState = {})); +exports.OpaqueOrigin = ["", "", null, null]; +//# sourceMappingURL=interfaces.js.map /***/ }), -/***/ 93969: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 27561: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); -var util_1 = __nccwpck_require__(65282); -var util_2 = __nccwpck_require__(76195); /** - * Represents a collection of elements. + * Represents a cache for storing order between equal objects. + * + * This cache is used when an algorithm compares two objects and finds them to + * be equal but still needs to establish an order between those two objects. + * When two such objects `a` and `b` are passed to the `check` method, a random + * number is generated with `Math.random()`. If the random number is less than + * `0.5` it is assumed that `a < b` otherwise `a > b`. The random number along + * with `a` and `b` is stored in the cache, so that subsequent checks result + * in the same consistent result. + * + * The cache has a size limit which is defined on initialization. */ -var HTMLCollectionImpl = /** @class */ (function () { +var CompareCache = /** @class */ (function () { /** - * Initializes a new instance of `HTMLCollection`. + * Initializes a new instance of `CompareCache`. * - * @param root - root node - * @param filter - node filter + * @param limit - maximum number of items to keep in the cache. When the limit + * is exceeded the first item is removed from the cache. */ - function HTMLCollectionImpl(root, filter) { - this._live = true; - this._root = root; - this._filter = filter; - return new Proxy(this, this); + function CompareCache(limit) { + if (limit === void 0) { limit = 1000; } + this._items = new Map(); + this._limit = limit; } - Object.defineProperty(HTMLCollectionImpl.prototype, "length", { - /** @inheritdoc */ - get: function () { - var _this = this; - /** - * The length attribute’s getter must return the number of nodes - * represented by the collection. - */ - var count = 0; - var node = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); - while (node !== null) { - count++; - node = algorithm_1.tree_getNextDescendantNode(this._root, node, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); - } - return count; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - HTMLCollectionImpl.prototype.item = function (index) { - var _this = this; - /** - * The item(index) method, when invoked, must return the indexth element - * in the collection. If there is no indexth element in the collection, - * then the method must return null. - */ - var i = 0; - var node = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); - while (node !== null) { - if (i === index) - return node; - else - i++; - node = algorithm_1.tree_getNextDescendantNode(this._root, node, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); - } - return null; - }; - /** @inheritdoc */ - HTMLCollectionImpl.prototype.namedItem = function (key) { - var _this = this; - /** - * 1. If key is the empty string, return null. - * 2. Return the first element in the collection for which at least one of - * the following is true: - * - it has an ID which is key; - * - it is in the HTML namespace and has a name attribute whose value is key; - * or null if there is no such element. - */ - if (key === '') - return null; - var ele = algorithm_1.tree_getFirstDescendantNode(this._root, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); - while (ele != null) { - if (ele._uniqueIdentifier === key) { - return ele; - } - else if (ele._namespace === infra_1.namespace.HTML) { - for (var i = 0; i < ele._attributeList.length; i++) { - var attr = ele._attributeList[i]; - if (attr._localName === "name" && attr._namespace === null && - attr._namespacePrefix === null && attr._value === key) - return ele; - } - } - ele = algorithm_1.tree_getNextDescendantNode(this._root, ele, false, false, function (e) { return util_1.Guard.isElementNode(e) && _this._filter(e); }); - } - return null; - }; - /** @inheritdoc */ - HTMLCollectionImpl.prototype[Symbol.iterator] = function () { - var root = this._root; - var filter = this._filter; - var currentNode = algorithm_1.tree_getFirstDescendantNode(root, false, false, function (e) { return util_1.Guard.isElementNode(e) && filter(e); }); - return { - next: function () { - if (currentNode === null) { - return { done: true, value: null }; - } - else { - var result = { done: false, value: currentNode }; - currentNode = algorithm_1.tree_getNextDescendantNode(root, currentNode, false, false, function (e) { return util_1.Guard.isElementNode(e) && filter(e); }); - return result; - } - } - }; - }; - /** - * Implements a proxy get trap to provide array-like access. - */ - HTMLCollectionImpl.prototype.get = function (target, key, receiver) { - if (!util_2.isString(key) || HTMLCollectionImpl.reservedNames.indexOf(key) !== -1) { - return Reflect.get(target, key, receiver); - } - var index = Number(key); - if (isNaN(index)) { - return target.namedItem(key) || undefined; - } - else { - return target.item(index) || undefined; - } - }; /** - * Implements a proxy set trap to provide array-like access. + * Compares and caches the given objects. Returns `true` if `objA < objB` and + * `false` otherwise. + * + * @param objA - an item to compare + * @param objB - an item to compare */ - HTMLCollectionImpl.prototype.set = function (target, key, value, receiver) { - if (!util_2.isString(key) || HTMLCollectionImpl.reservedNames.indexOf(key) !== -1) { - return Reflect.set(target, key, value, receiver); - } - var index = Number(key); - var node = isNaN(index) ? - target.namedItem(key) || undefined : target.item(index) || undefined; - if (node && node._parent) { - algorithm_1.mutation_replace(node, value, node._parent); + CompareCache.prototype.check = function (objA, objB) { + if (this._items.get(objA) === objB) return true; + else if (this._items.get(objB) === objA) + return false; + var result = (Math.random() < 0.5); + if (result) { + this._items.set(objA, objB); } else { - return false; + this._items.set(objB, objA); } + if (this._items.size > this._limit) { + var it_1 = this._items.keys().next(); + /* istanbul ignore else */ + if (!it_1.done) { + this._items.delete(it_1.value); + } + } + return result; }; - /** - * Creates a new `HTMLCollection`. - * - * @param root - root node - * @param filter - node filter - */ - HTMLCollectionImpl._create = function (root, filter) { - if (filter === void 0) { filter = (function () { return true; }); } - return new HTMLCollectionImpl(root, filter); - }; - HTMLCollectionImpl.reservedNames = ['_root', '_live', '_filter', 'length', - 'item', 'namedItem', 'get', 'set']; - return HTMLCollectionImpl; + return CompareCache; }()); -exports.HTMLCollectionImpl = HTMLCollectionImpl; -//# sourceMappingURL=HTMLCollectionImpl.js.map +exports.CompareCache = CompareCache; +//# sourceMappingURL=CompareCache.js.map /***/ }), -/***/ 89616: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 16006: +/***/ (function(__unused_webpack_module, exports) { "use strict"; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); @@ -54991,511 +41163,216 @@ var __values = (this && this.__values) || function(o) { throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(65282); -var infra_1 = __nccwpck_require__(84251); /** - * Represents an object that can be used to observe mutations to the tree of - * nodes. + * Represents a set of objects with a size limit. */ -var MutationObserverImpl = /** @class */ (function () { +var FixedSizeSet = /** @class */ (function () { /** - * Initializes a new instance of `MutationObserver`. + * Initializes a new instance of `FixedSizeSet`. * - * @param callback - the callback function + * @param limit - maximum number of items to keep in the set. When the limit + * is exceeded the first item is removed from the set. */ - function MutationObserverImpl(callback) { - this._nodeList = []; - this._recordQueue = []; - /** - * 1. Let mo be a new MutationObserver object whose callback is callback. - * 2. Append mo to mo’s relevant agent’s mutation observers. - * 3. Return mo. - */ - this._callback = callback; - var window = DOMImpl_1.dom.window; - infra_1.set.append(window._mutationObservers, this); + function FixedSizeSet(limit) { + if (limit === void 0) { limit = 1000; } + this._items = new Set(); + this._limit = limit; } - /** @inheritdoc */ - MutationObserverImpl.prototype.observe = function (target, options) { - var e_1, _a; - options = options || { - childList: false, - subtree: false - }; - /** - * 1. If either options’s attributeOldValue or attributeFilter is present - * and options’s attributes is omitted, then set options’s attributes - * to true. - * 2. If options’s characterDataOldValue is present and options’s - * characterData is omitted, then set options’s characterData to true. - * 3. If none of options’s childList, attributes, and characterData is - * true, then throw a TypeError. - * 4. If options’s attributeOldValue is true and options’s attributes is - * false, then throw a TypeError. - * 5. If options’s attributeFilter is present and options’s attributes is - * false, then throw a TypeError. - * 6. If options’s characterDataOldValue is true and options’s characterData - * is false, then throw a TypeError. - */ - if ((options.attributeOldValue !== undefined || options.attributeFilter !== undefined) && - options.attributes === undefined) { - options.attributes = true; - } - if (options.characterDataOldValue !== undefined && options.characterData === undefined) { - options.characterData = true; - } - if (!options.childList && !options.attributes && !options.characterData) { - throw new TypeError(); - } - if (options.attributeOldValue && !options.attributes) { - throw new TypeError(); - } - if (options.attributeFilter !== undefined && !options.attributes) { - throw new TypeError(); - } - if (options.characterDataOldValue && !options.characterData) { - throw new TypeError(); - } - /** - * 7. For each registered of target’s registered observer list, if - * registered’s observer is the context object: - */ - var isRegistered = false; - var coptions = options; - var _loop_1 = function (registered) { - var e_2, _a; - if (registered.observer === this_1) { - isRegistered = true; - try { - /** - * 7.1. For each node of the context object’s node list, remove all - * transient registered observers whose source is registered from node’s - * registered observer list. - */ - for (var _b = (e_2 = void 0, __values(this_1._nodeList)), _c = _b.next(); !_c.done; _c = _b.next()) { - var node = _c.value; - infra_1.list.remove(node._registeredObserverList, function (ob) { - return util_1.Guard.isTransientRegisteredObserver(ob) && ob.source === registered; - }); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_2) throw e_2.error; } - } - /** - * 7.2. Set registered’s options to options. - */ - registered.options = coptions; - } - }; - var this_1 = this; - try { - for (var _b = __values(target._registeredObserverList), _c = _b.next(); !_c.done; _c = _b.next()) { - var registered = _c.value; - _loop_1(registered); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - /** - * 8. Otherwise: - * 8.1. Append a new registered observer whose observer is the context - * object and options is options to target’s registered observer list. - * 8.2. Append target to the context object’s node list. - */ - if (!isRegistered) { - target._registeredObserverList.push({ observer: this, options: options }); - this._nodeList.push(target); - } - }; - /** @inheritdoc */ - MutationObserverImpl.prototype.disconnect = function () { - var e_3, _a; - var _this = this; - try { - /** - * 1. For each node of the context object’s node list, remove any - * registered observer from node’s registered observer list for which the - * context object is the observer. - */ - for (var _b = __values(this._nodeList), _c = _b.next(); !_c.done; _c = _b.next()) { - var node = _c.value; - infra_1.list.remove((node)._registeredObserverList, function (ob) { - return ob.observer === _this; - }); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + /** + * Adds a new item to the set. + * + * @param item - an item + */ + FixedSizeSet.prototype.add = function (item) { + this._items.add(item); + if (this._items.size > this._limit) { + var it_1 = this._items.values().next(); + /* istanbul ignore else */ + if (!it_1.done) { + this._items.delete(it_1.value); } - finally { if (e_3) throw e_3.error; } } - /** - * 2. Empty the context object’s record queue. - */ - this._recordQueue = []; - }; - /** @inheritdoc */ - MutationObserverImpl.prototype.takeRecords = function () { - /** - * 1. Let records be a clone of the context object’s record queue. - * 2. Empty the context object’s record queue. - * 3. Return records. - */ - var records = this._recordQueue; - this._recordQueue = []; - return records; + return this; }; - return MutationObserverImpl; -}()); -exports.MutationObserverImpl = MutationObserverImpl; -//# sourceMappingURL=MutationObserverImpl.js.map - -/***/ }), - -/***/ 6219: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents a mutation record. - */ -var MutationRecordImpl = /** @class */ (function () { /** - * Initializes a new instance of `MutationRecord`. + * Removes an item from the set. * - * @param type - type of mutation: `"attributes"` for an attribute - * mutation, `"characterData"` for a mutation to a CharacterData node - * and `"childList"` for a mutation to the tree of nodes. - * @param target - node affected by the mutation. - * @param addedNodes - list of added nodes. - * @param removedNodes - list of removed nodes. - * @param previousSibling - previous sibling of added or removed nodes. - * @param nextSibling - next sibling of added or removed nodes. - * @param attributeName - local name of the changed attribute, - * and `null` otherwise. - * @param attributeNamespace - namespace of the changed attribute, - * and `null` otherwise. - * @param oldValue - value before mutation: attribute value for an attribute - * mutation, node `data` for a mutation to a CharacterData node and `null` - * for a mutation to the tree of nodes. + * @param item - an item */ - function MutationRecordImpl(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) { - this._type = type; - this._target = target; - this._addedNodes = addedNodes; - this._removedNodes = removedNodes; - this._previousSibling = previousSibling; - this._nextSibling = nextSibling; - this._attributeName = attributeName; - this._attributeNamespace = attributeNamespace; - this._oldValue = oldValue; - } - Object.defineProperty(MutationRecordImpl.prototype, "type", { - /** @inheritdoc */ - get: function () { return this._type; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "target", { - /** @inheritdoc */ - get: function () { return this._target; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "addedNodes", { - /** @inheritdoc */ - get: function () { return this._addedNodes; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "removedNodes", { - /** @inheritdoc */ - get: function () { return this._removedNodes; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "previousSibling", { - /** @inheritdoc */ - get: function () { return this._previousSibling; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "nextSibling", { - /** @inheritdoc */ - get: function () { return this._nextSibling; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "attributeName", { - /** @inheritdoc */ - get: function () { return this._attributeName; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "attributeNamespace", { - /** @inheritdoc */ - get: function () { return this._attributeNamespace; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MutationRecordImpl.prototype, "oldValue", { - /** @inheritdoc */ - get: function () { return this._oldValue; }, - enumerable: true, - configurable: true - }); + FixedSizeSet.prototype.delete = function (item) { + return this._items.delete(item); + }; /** - * Creates a new `MutationRecord`. + * Determines if an item is in the set. * - * @param type - type of mutation: `"attributes"` for an attribute - * mutation, `"characterData"` for a mutation to a CharacterData node - * and `"childList"` for a mutation to the tree of nodes. - * @param target - node affected by the mutation. - * @param addedNodes - list of added nodes. - * @param removedNodes - list of removed nodes. - * @param previousSibling - previous sibling of added or removed nodes. - * @param nextSibling - next sibling of added or removed nodes. - * @param attributeName - local name of the changed attribute, - * and `null` otherwise. - * @param attributeNamespace - namespace of the changed attribute, - * and `null` otherwise. - * @param oldValue - value before mutation: attribute value for an attribute - * mutation, node `data` for a mutation to a CharacterData node and `null` - * for a mutation to the tree of nodes. + * @param item - an item */ - MutationRecordImpl._create = function (type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue) { - return new MutationRecordImpl(type, target, addedNodes, removedNodes, previousSibling, nextSibling, attributeName, attributeNamespace, oldValue); - }; - return MutationRecordImpl; -}()); -exports.MutationRecordImpl = MutationRecordImpl; -//# sourceMappingURL=MutationRecordImpl.js.map - -/***/ }), - -/***/ 57206: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + FixedSizeSet.prototype.has = function (item) { + return this._items.has(item); }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMException_1 = __nccwpck_require__(13166); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents a collection of attributes. - */ -var NamedNodeMapImpl = /** @class */ (function (_super) { - __extends(NamedNodeMapImpl, _super); /** - * Initializes a new instance of `NamedNodeMap`. - * - * @param element - parent element + * Removes all items from the set. */ - function NamedNodeMapImpl(element) { - var _this = _super.call(this) || this; - _this._element = element; - // TODO: This workaround is needed to extend Array in ES5 - Object.setPrototypeOf(_this, NamedNodeMapImpl.prototype); - return _this; - } - NamedNodeMapImpl.prototype._asArray = function () { return this; }; - /** @inheritdoc */ - NamedNodeMapImpl.prototype.item = function (index) { - /** - * 1. If index is equal to or greater than context object’s attribute list’s - * size, then return null. - * 2. Otherwise, return context object’s attribute list[index]. - * - */ - return this[index] || null; - }; - /** @inheritdoc */ - NamedNodeMapImpl.prototype.getNamedItem = function (qualifiedName) { - /** - * The getNamedItem(qualifiedName) method, when invoked, must return the - * result of getting an attribute given qualifiedName and element. - */ - return algorithm_1.element_getAnAttributeByName(qualifiedName, this._element); - }; - /** @inheritdoc */ - NamedNodeMapImpl.prototype.getNamedItemNS = function (namespace, localName) { - /** - * The getNamedItemNS(namespace, localName) method, when invoked, must - * return the result of getting an attribute given namespace, localName, - * and element. - */ - return algorithm_1.element_getAnAttributeByNamespaceAndLocalName(namespace || '', localName, this._element); + FixedSizeSet.prototype.clear = function () { + this._items.clear(); }; - /** @inheritdoc */ - NamedNodeMapImpl.prototype.setNamedItem = function (attr) { + Object.defineProperty(FixedSizeSet.prototype, "size", { /** - * The setNamedItem(attr) and setNamedItemNS(attr) methods, when invoked, - * must return the result of setting an attribute given attr and element. + * Gets the number of items in the set. */ - return algorithm_1.element_setAnAttribute(attr, this._element); + get: function () { return this._items.size; }, + enumerable: true, + configurable: true + }); + /** + * Applies the given callback function to all elements of the set. + */ + FixedSizeSet.prototype.forEach = function (callback, thisArg) { + var _this = this; + this._items.forEach(function (e) { return callback.call(thisArg, e, e, _this); }); }; - /** @inheritdoc */ - NamedNodeMapImpl.prototype.setNamedItemNS = function (attr) { - return algorithm_1.element_setAnAttribute(attr, this._element); + /** + * Iterates through the items in the set. + */ + FixedSizeSet.prototype.keys = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items.keys())]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); }; - /** @inheritdoc */ - NamedNodeMapImpl.prototype.removeNamedItem = function (qualifiedName) { - /** - * 1. Let attr be the result of removing an attribute given qualifiedName - * and element. - * 2. If attr is null, then throw a "NotFoundError" DOMException. - * 3. Return attr. - */ - var attr = algorithm_1.element_removeAnAttributeByName(qualifiedName, this._element); - if (attr === null) - throw new DOMException_1.NotFoundError(); - return attr; + /** + * Iterates through the items in the set. + */ + FixedSizeSet.prototype.values = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items.values())]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); }; - /** @inheritdoc */ - NamedNodeMapImpl.prototype.removeNamedItemNS = function (namespace, localName) { - /** - * 1. Let attr be the result of removing an attribute given namespace, - * localName, and element. - * 2. If attr is null, then throw a "NotFoundError" DOMException. - * 3. Return attr. - */ - var attr = algorithm_1.element_removeAnAttributeByNamespaceAndLocalName(namespace || '', localName, this._element); - if (attr === null) - throw new DOMException_1.NotFoundError(); - return attr; + /** + * Iterates through the items in the set. + */ + FixedSizeSet.prototype.entries = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items.entries())]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); }; /** - * Creates a new `NamedNodeMap`. - * - * @param element - parent element + * Iterates through the items in the set. */ - NamedNodeMapImpl._create = function (element) { - return new NamedNodeMapImpl(element); + FixedSizeSet.prototype[Symbol.iterator] = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); }; - return NamedNodeMapImpl; -}(Array)); -exports.NamedNodeMapImpl = NamedNodeMapImpl; -//# sourceMappingURL=NamedNodeMapImpl.js.map + Object.defineProperty(FixedSizeSet.prototype, Symbol.toStringTag, { + /** + * Returns the string tag of the set. + */ + get: function () { + return "FixedSizeSet"; + }, + enumerable: true, + configurable: true + }); + return FixedSizeSet; +}()); +exports.FixedSizeSet = FixedSizeSet; +//# sourceMappingURL=FixedSizeSet.js.map /***/ }), -/***/ 12355: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 11857: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Represents a node filter. + * Represents an object with lazy initialization. */ -var NodeFilterImpl = /** @class */ (function () { +var Lazy = /** @class */ (function () { /** - * Initializes a new instance of `NodeFilter`. + * Initializes a new instance of `Lazy`. + * + * @param initFunc - initializer function */ - function NodeFilterImpl() { + function Lazy(initFunc) { + this._initialized = false; + this._value = undefined; + this._initFunc = initFunc; } - /** - * Callback function. - */ - NodeFilterImpl.prototype.acceptNode = function (node) { - return interfaces_1.FilterResult.Accept; - }; - /** - * Creates a new `NodeFilter`. - */ - NodeFilterImpl._create = function () { - return new NodeFilterImpl(); - }; - NodeFilterImpl.FILTER_ACCEPT = 1; - NodeFilterImpl.FILTER_REJECT = 2; - NodeFilterImpl.FILTER_SKIP = 3; - NodeFilterImpl.SHOW_ALL = 0xffffffff; - NodeFilterImpl.SHOW_ELEMENT = 0x1; - NodeFilterImpl.SHOW_ATTRIBUTE = 0x2; - NodeFilterImpl.SHOW_TEXT = 0x4; - NodeFilterImpl.SHOW_CDATA_SECTION = 0x8; - NodeFilterImpl.SHOW_ENTITY_REFERENCE = 0x10; - NodeFilterImpl.SHOW_ENTITY = 0x20; - NodeFilterImpl.SHOW_PROCESSING_INSTRUCTION = 0x40; - NodeFilterImpl.SHOW_COMMENT = 0x80; - NodeFilterImpl.SHOW_DOCUMENT = 0x100; - NodeFilterImpl.SHOW_DOCUMENT_TYPE = 0x200; - NodeFilterImpl.SHOW_DOCUMENT_FRAGMENT = 0x400; - NodeFilterImpl.SHOW_NOTATION = 0x800; - return NodeFilterImpl; + Object.defineProperty(Lazy.prototype, "value", { + /** + * Gets the value of the object. + */ + get: function () { + if (!this._initialized) { + this._value = this._initFunc(); + this._initialized = true; + } + return this._value; + }, + enumerable: true, + configurable: true + }); + return Lazy; }()); -exports.NodeFilterImpl = NodeFilterImpl; -/** - * Define constants on prototype. - */ -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_ACCEPT", 1); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_REJECT", 2); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "FILTER_SKIP", 3); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ALL", 0xffffffff); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ELEMENT", 0x1); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ATTRIBUTE", 0x2); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_TEXT", 0x4); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_CDATA_SECTION", 0x8); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ENTITY_REFERENCE", 0x10); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_ENTITY", 0x20); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_PROCESSING_INSTRUCTION", 0x40); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_COMMENT", 0x80); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT", 0x100); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT_TYPE", 0x200); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_DOCUMENT_FRAGMENT", 0x400); -WebIDLAlgorithm_1.idl_defineConst(NodeFilterImpl.prototype, "SHOW_NOTATION", 0x800); -//# sourceMappingURL=NodeFilterImpl.js.map +exports.Lazy = Lazy; +//# sourceMappingURL=Lazy.js.map /***/ }), -/***/ 91745: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 25798: +/***/ (function(__unused_webpack_module, exports) { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; var __values = (this && this.__values) || function(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); @@ -55508,31846 +41385,32665 @@ var __values = (this && this.__values) || function(o) { throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var interfaces_1 = __nccwpck_require__(27305); -var EventTargetImpl_1 = __nccwpck_require__(69968); -var util_1 = __nccwpck_require__(65282); -var DOMException_1 = __nccwpck_require__(13166); -var algorithm_1 = __nccwpck_require__(61); -var URLAlgorithm_1 = __nccwpck_require__(53568); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); /** - * Represents a generic XML node. + * Represents a cache of objects with a size limit. */ -var NodeImpl = /** @class */ (function (_super) { - __extends(NodeImpl, _super); +var ObjectCache = /** @class */ (function () { /** - * Initializes a new instance of `Node`. + * Initializes a new instance of `ObjectCache`. + * + * @param limit - maximum number of items to keep in the cache. When the limit + * is exceeded the first item is removed from the cache. */ - function NodeImpl() { - var _this = _super.call(this) || this; - _this._parent = null; - _this._firstChild = null; - _this._lastChild = null; - _this._previousSibling = null; - _this._nextSibling = null; - return _this; + function ObjectCache(limit) { + if (limit === void 0) { limit = 1000; } + this._items = new Map(); + this._limit = limit; } - Object.defineProperty(NodeImpl.prototype, "_childNodes", { - get: function () { - return this.__childNodes || (this.__childNodes = algorithm_1.create_nodeList(this)); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "_nodeDocument", { - get: function () { return this._nodeDocumentOverride || DOMImpl_1.dom.window._associatedDocument; }, - set: function (val) { this._nodeDocumentOverride = val; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "_registeredObserverList", { - get: function () { - return this.__registeredObserverList || (this.__registeredObserverList = []); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "nodeType", { - /** @inheritdoc */ - get: function () { return this._nodeType; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "nodeName", { - /** - * Returns a string appropriate for the type of node. - */ - get: function () { - if (util_1.Guard.isElementNode(this)) { - return this._htmlUppercasedQualifiedName; - } - else if (util_1.Guard.isAttrNode(this)) { - return this._qualifiedName; - } - else if (util_1.Guard.isExclusiveTextNode(this)) { - return "#text"; - } - else if (util_1.Guard.isCDATASectionNode(this)) { - return "#cdata-section"; - } - else if (util_1.Guard.isProcessingInstructionNode(this)) { - return this._target; - } - else if (util_1.Guard.isCommentNode(this)) { - return "#comment"; - } - else if (util_1.Guard.isDocumentNode(this)) { - return "#document"; - } - else if (util_1.Guard.isDocumentTypeNode(this)) { - return this._name; - } - else if (util_1.Guard.isDocumentFragmentNode(this)) { - return "#document-fragment"; - } - else { - return ""; + /** + * Gets an item from the cache. + * + * @param key - object key + */ + ObjectCache.prototype.get = function (key) { + return this._items.get(key); + }; + /** + * Adds a new item to the cache. + * + * @param key - object key + * @param value - object value + */ + ObjectCache.prototype.set = function (key, value) { + this._items.set(key, value); + if (this._items.size > this._limit) { + var it_1 = this._items.keys().next(); + /* istanbul ignore else */ + if (!it_1.done) { + this._items.delete(it_1.value); } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "baseURI", { - /** - * Gets the absolute base URL of the node. - */ - get: function () { - /** - * The baseURI attribute’s getter must return node document’s document - * base URL, serialized. - * TODO: Implement in HTML DOM - * https://html.spec.whatwg.org/multipage/urls-and-fetching.html#document-base-url - */ - return URLAlgorithm_1.urlSerializer(this._nodeDocument._URL); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "isConnected", { - /** - * Returns whether the node is rooted to a document node. - */ - get: function () { - /** - * The isConnected attribute’s getter must return true, if context object - * is connected, and false otherwise. - */ - return util_1.Guard.isElementNode(this) && algorithm_1.shadowTree_isConnected(this); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "ownerDocument", { - /** - * Returns the parent document. - */ - get: function () { - /** - * The ownerDocument attribute’s getter must return null, if the context - * object is a document, and the context object’s node document otherwise. - * _Note:_ The node document of a document is that document itself. All - * nodes have a node document at all times. - */ - if (this._nodeType === interfaces_1.NodeType.Document) - return null; - else - return this._nodeDocument; - }, - enumerable: true, - configurable: true - }); + } + }; /** - * Returns the root node. + * Removes an item from the cache. * - * @param options - if options has `composed = true` this function - * returns the node's shadow-including root, otherwise it returns - * the node's root node. + * @param item - an item */ - NodeImpl.prototype.getRootNode = function (options) { - /** - * The getRootNode(options) method, when invoked, must return context - * object’s shadow-including root if options’s composed is true, - * and context object’s root otherwise. - */ - return algorithm_1.tree_rootNode(this, !!options && options.composed); + ObjectCache.prototype.delete = function (key) { + return this._items.delete(key); }; - Object.defineProperty(NodeImpl.prototype, "parentNode", { + /** + * Determines if an item is in the cache. + * + * @param item - an item + */ + ObjectCache.prototype.has = function (key) { + return this._items.has(key); + }; + /** + * Removes all items from the cache. + */ + ObjectCache.prototype.clear = function () { + this._items.clear(); + }; + Object.defineProperty(ObjectCache.prototype, "size", { /** - * Returns the parent node. + * Gets the number of items in the cache. */ - get: function () { - /** - * The parentNode attribute’s getter must return the context object’s parent. - * _Note:_ An Attr node has no parent. - */ - if (this._nodeType === interfaces_1.NodeType.Attribute) { - return null; - } - else { - return this._parent; - } - }, + get: function () { return this._items.size; }, enumerable: true, configurable: true }); - Object.defineProperty(NodeImpl.prototype, "parentElement", { - /** - * Returns the parent element. - */ - get: function () { - /** - * The parentElement attribute’s getter must return the context object’s - * parent element. - */ - if (this._parent && util_1.Guard.isElementNode(this._parent)) { - return this._parent; + /** + * Applies the given callback function to all elements of the cache. + */ + ObjectCache.prototype.forEach = function (callback, thisArg) { + this._items.forEach(function (v, k) { return callback.call(thisArg, k, v); }); + }; + /** + * Iterates through the items in the set. + */ + ObjectCache.prototype.keys = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items.keys())]; + case 1: + _a.sent(); + return [2 /*return*/]; } - else { - return null; + }); + }; + /** + * Iterates through the items in the set. + */ + ObjectCache.prototype.values = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items.values())]; + case 1: + _a.sent(); + return [2 /*return*/]; } - }, - enumerable: true, - configurable: true - }); + }); + }; /** - * Determines whether a node has any children. + * Iterates through the items in the set. */ - NodeImpl.prototype.hasChildNodes = function () { - /** - * The hasChildNodes() method, when invoked, must return true if the context - * object has children, and false otherwise. - */ - return (this._firstChild !== null); + ObjectCache.prototype.entries = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items.entries())]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); }; - Object.defineProperty(NodeImpl.prototype, "childNodes", { - /** - * Returns a {@link NodeList} of child nodes. - */ - get: function () { - /** - * The childNodes attribute’s getter must return a NodeList rooted at the - * context object matching only children. - */ - return this._childNodes; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NodeImpl.prototype, "firstChild", { + /** + * Iterates through the items in the set. + */ + ObjectCache.prototype[Symbol.iterator] = function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [5 /*yield**/, __values(this._items)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }; + Object.defineProperty(ObjectCache.prototype, Symbol.toStringTag, { /** - * Returns the first child node. + * Returns the string tag of the cache. */ get: function () { - /** - * The firstChild attribute’s getter must return the context object’s first - * child. - */ - return this._firstChild; + return "ObjectCache"; }, enumerable: true, configurable: true }); - Object.defineProperty(NodeImpl.prototype, "lastChild", { + return ObjectCache; +}()); +exports.ObjectCache = ObjectCache; +//# sourceMappingURL=ObjectCache.js.map + +/***/ }), + +/***/ 34145: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Walks through the code points of a string. + */ +var StringWalker = /** @class */ (function () { + /** + * Initializes a new `StringWalker`. + * + * @param input - input string + */ + function StringWalker(input) { + this._pointer = 0; + this._chars = Array.from(input); + this._length = this._chars.length; + } + Object.defineProperty(StringWalker.prototype, "eof", { /** - * Returns the last child node. + * Determines if the current position is beyond the end of string. */ - get: function () { - /** - * The lastChild attribute’s getter must return the context object’s last - * child. - */ - return this._lastChild; - }, + get: function () { return this._pointer >= this._length; }, enumerable: true, configurable: true }); - Object.defineProperty(NodeImpl.prototype, "previousSibling", { + Object.defineProperty(StringWalker.prototype, "length", { /** - * Returns the previous sibling node. + * Returns the number of code points in the input string. */ - get: function () { - /** - * The previousSibling attribute’s getter must return the context object’s - * previous sibling. - * _Note:_ An Attr node has no siblings. - */ - return this._previousSibling; - }, + get: function () { return this._length; }, enumerable: true, configurable: true }); - Object.defineProperty(NodeImpl.prototype, "nextSibling", { + /** + * Returns the current code point. Returns `-1` if the position is beyond + * the end of string. + */ + StringWalker.prototype.codePoint = function () { + if (this._codePoint === undefined) { + if (this.eof) { + this._codePoint = -1; + } + else { + var cp = this._chars[this._pointer].codePointAt(0); + /* istanbul ignore else */ + if (cp !== undefined) { + this._codePoint = cp; + } + else { + this._codePoint = -1; + } + } + } + return this._codePoint; + }; + /** + * Returns the current character. Returns an empty string if the position is + * beyond the end of string. + */ + StringWalker.prototype.c = function () { + if (this._c === undefined) { + this._c = (this.eof ? "" : this._chars[this._pointer]); + } + return this._c; + }; + /** + * Returns the remaining string. + */ + StringWalker.prototype.remaining = function () { + if (this._remaining === undefined) { + this._remaining = (this.eof ? + "" : this._chars.slice(this._pointer + 1).join('')); + } + return this._remaining; + }; + /** + * Returns the substring from the current character to the end of string. + */ + StringWalker.prototype.substring = function () { + if (this._substring === undefined) { + this._substring = (this.eof ? + "" : this._chars.slice(this._pointer).join('')); + } + return this._substring; + }; + Object.defineProperty(StringWalker.prototype, "pointer", { /** - * Returns the next sibling node. + * Gets or sets the current position. */ - get: function () { - /** - * The nextSibling attribute’s getter must return the context object’s - * next sibling. - */ - return this._nextSibling; + get: function () { return this._pointer; }, + set: function (val) { + if (val === this._pointer) + return; + this._pointer = val; + this._codePoint = undefined; + this._c = undefined; + this._remaining = undefined; + this._substring = undefined; }, enumerable: true, configurable: true }); - Object.defineProperty(NodeImpl.prototype, "nodeValue", { - /** - * Gets or sets the data associated with a {@link CharacterData} node or the - * value of an {@link @Attr} node. For other node types returns `null`. - */ - get: function () { - if (util_1.Guard.isAttrNode(this)) { - return this._value; - } - else if (util_1.Guard.isCharacterDataNode(this)) { - return this._data; - } - else { - return null; - } - }, - set: function (value) { - if (value === null) { - value = ''; - } - if (util_1.Guard.isAttrNode(this)) { - algorithm_1.attr_setAnExistingAttributeValue(this, value); + return StringWalker; +}()); +exports.StringWalker = StringWalker; +//# sourceMappingURL=StringWalker.js.map + +/***/ }), + +/***/ 76195: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var FixedSizeSet_1 = __nccwpck_require__(16006); +exports.FixedSizeSet = FixedSizeSet_1.FixedSizeSet; +var ObjectCache_1 = __nccwpck_require__(25798); +exports.ObjectCache = ObjectCache_1.ObjectCache; +var CompareCache_1 = __nccwpck_require__(27561); +exports.CompareCache = CompareCache_1.CompareCache; +var Lazy_1 = __nccwpck_require__(11857); +exports.Lazy = Lazy_1.Lazy; +var StringWalker_1 = __nccwpck_require__(34145); +exports.StringWalker = StringWalker_1.StringWalker; +/** + * Applies the mixin to a given class. + * + * @param baseClass - class to receive the mixin + * @param mixinClass - mixin class + * @param overrides - an array with names of function overrides. Base class + * functions whose names are in this array will be kept by prepending an + * underscore to their names. + */ +function applyMixin(baseClass, mixinClass) { + var overrides = []; + for (var _i = 2; _i < arguments.length; _i++) { + overrides[_i - 2] = arguments[_i]; + } + Object.getOwnPropertyNames(mixinClass.prototype).forEach(function (name) { + if (name !== "constructor") { + if (overrides.indexOf(name) !== -1) { + var orgPropDesc = Object.getOwnPropertyDescriptor(baseClass.prototype, name); + /* istanbul ignore else */ + if (orgPropDesc) { + Object.defineProperty(baseClass.prototype, "_" + name, orgPropDesc); + } } - else if (util_1.Guard.isCharacterDataNode(this)) { - algorithm_1.characterData_replaceData(this, 0, this._data.length, value); + var propDesc = Object.getOwnPropertyDescriptor(mixinClass.prototype, name); + /* istanbul ignore else */ + if (propDesc) { + Object.defineProperty(baseClass.prototype, name, propDesc); } - }, - enumerable: true, - configurable: true + } }); - Object.defineProperty(NodeImpl.prototype, "textContent", { - /** - * Returns the concatenation of data of all the {@link Text} - * node descendants in tree order. When set, replaces the text - * contents of the node with the given value. - */ - get: function () { - if (util_1.Guard.isDocumentFragmentNode(this) || util_1.Guard.isElementNode(this)) { - return algorithm_1.text_descendantTextContent(this); - } - else if (util_1.Guard.isAttrNode(this)) { - return this._value; +} +exports.applyMixin = applyMixin; +/** + * Applies default values to the given object. + * + * @param obj - an object + * @param defaults - an object with default values + * @param overwrite - if set to `true` defaults object always overwrites object + * values, whether they are `undefined` or not. + */ +function applyDefaults(obj, defaults, overwrite) { + if (overwrite === void 0) { overwrite = false; } + var result = clone(obj || {}); + forEachObject(defaults, function (key, val) { + if (isPlainObject(val)) { + result[key] = applyDefaults(result[key], val, overwrite); + } + else if (overwrite || result[key] === undefined) { + result[key] = val; + } + }); + return result; +} +exports.applyDefaults = applyDefaults; +/** + * Iterates over items of an array or set. + * + * @param arr - array or set to iterate + * @param callback - a callback function which receives each array item as its + * single argument + * @param thisArg - the value of this inside callback + */ +function forEachArray(arr, callback, thisArg) { + arr.forEach(callback, thisArg); +} +exports.forEachArray = forEachArray; +/** + * Iterates over key/value pairs of a map or object. + * + * @param obj - map or object to iterate + * @param callback - a callback function which receives object key as its first + * argument and object value as its second argument + * @param thisArg - the value of this inside callback + */ +function forEachObject(obj, callback, thisArg) { + if (isMap(obj)) { + obj.forEach(function (value, key) { return callback.call(thisArg, key, value); }); + } + else { + for (var key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(key)) { + callback.call(thisArg, key, obj[key]); } - else if (util_1.Guard.isCharacterDataNode(this)) { - return this._data; + } + } +} +exports.forEachObject = forEachObject; +/** + * Returns the number of entries in an array or set. + * + * @param arr - array or set + */ +function arrayLength(obj) { + if (isSet(obj)) { + return obj.size; + } + else { + return obj.length; + } +} +exports.arrayLength = arrayLength; +/** + * Returns the number of entries in a map or object. + * + * @param obj - map or object + */ +function objectLength(obj) { + if (isMap(obj)) { + return obj.size; + } + else { + return Object.keys(obj).length; + } +} +exports.objectLength = objectLength; +/** + * Gets the value of a key from a map or object. + * + * @param obj - map or object + * @param key - the key to retrieve + */ +function getObjectValue(obj, key) { + if (isMap(obj)) { + return obj.get(key); + } + else { + return obj[key]; + } +} +exports.getObjectValue = getObjectValue; +/** + * Removes a property from a map or object. + * + * @param obj - map or object + * @param key - the key to remove + */ +function removeObjectValue(obj, key) { + if (isMap(obj)) { + obj.delete(key); + } + else { + delete obj[key]; + } +} +exports.removeObjectValue = removeObjectValue; +/** + * Deep clones the given object. + * + * @param obj - an object + */ +function clone(obj) { + var e_1, _a; + if (isFunction(obj)) { + return obj; + } + else if (isArray(obj)) { + var result = []; + try { + for (var obj_1 = __values(obj), obj_1_1 = obj_1.next(); !obj_1_1.done; obj_1_1 = obj_1.next()) { + var item = obj_1_1.value; + result.push(clone(item)); } - else { - return null; + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (obj_1_1 && !obj_1_1.done && (_a = obj_1.return)) _a.call(obj_1); } - }, - set: function (value) { - if (value === null) { - value = ''; + finally { if (e_1) throw e_1.error; } + } + return result; + } + else if (isObject(obj)) { + var result = {}; + for (var key in obj) { + /* istanbul ignore next */ + if (obj.hasOwnProperty(key)) { + var val = obj[key]; + result[key] = clone(val); } - if (util_1.Guard.isDocumentFragmentNode(this) || util_1.Guard.isElementNode(this)) { - algorithm_1.node_stringReplaceAll(value, this); + } + return result; + } + else { + return obj; + } +} +exports.clone = clone; +/** + * Type guard for boolean types + * + * @param x - a variable to type check + */ +function isBoolean(x) { + return typeof x === "boolean"; +} +exports.isBoolean = isBoolean; +/** + * Type guard for numeric types + * + * @param x - a variable to type check + */ +function isNumber(x) { + return typeof x === "number"; +} +exports.isNumber = isNumber; +/** + * Type guard for strings + * + * @param x - a variable to type check + */ +function isString(x) { + return typeof x === "string"; +} +exports.isString = isString; +/** + * Type guard for function objects + * + * @param x - a variable to type check + */ +function isFunction(x) { + return !!x && Object.prototype.toString.call(x) === '[object Function]'; +} +exports.isFunction = isFunction; +/** + * Type guard for JS objects + * + * _Note:_ Functions are objects too + * + * @param x - a variable to type check + */ +function isObject(x) { + var type = typeof x; + return !!x && (type === 'function' || type === 'object'); +} +exports.isObject = isObject; +/** + * Type guard for arrays + * + * @param x - a variable to type check + */ +function isArray(x) { + return Array.isArray(x); +} +exports.isArray = isArray; +/** + * Type guard for sets. + * + * @param x - a variable to check + */ +function isSet(x) { + return x instanceof Set; +} +exports.isSet = isSet; +/** + * Type guard for maps. + * + * @param x - a variable to check + */ +function isMap(x) { + return x instanceof Map; +} +exports.isMap = isMap; +/** + * Determines if `x` is an empty Array or an Object with no own properties. + * + * @param x - a variable to check + */ +function isEmpty(x) { + if (isArray(x)) { + return !x.length; + } + else if (isSet(x)) { + return !x.size; + } + else if (isMap(x)) { + return !x.size; + } + else if (isObject(x)) { + for (var key in x) { + if (x.hasOwnProperty(key)) { + return false; } - else if (util_1.Guard.isAttrNode(this)) { - algorithm_1.attr_setAnExistingAttributeValue(this, value); + } + return true; + } + return false; +} +exports.isEmpty = isEmpty; +/** + * Determines if `x` is a plain Object. + * + * @param x - a variable to check + */ +function isPlainObject(x) { + if (isObject(x)) { + var proto = Object.getPrototypeOf(x); + var ctor = proto.constructor; + return proto && ctor && + (typeof ctor === 'function') && (ctor instanceof ctor) && + (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); + } + return false; +} +exports.isPlainObject = isPlainObject; +/** + * Determines if `x` is an iterable Object. + * + * @param x - a variable to check + */ +function isIterable(x) { + return x && (typeof x[Symbol.iterator] === 'function'); +} +exports.isIterable = isIterable; +/** + * Gets the primitive value of an object. + */ +function getValue(obj) { + if (isFunction(obj.valueOf)) { + return obj.valueOf(); + } + else { + return obj; + } +} +exports.getValue = getValue; +/** + * UTF-8 encodes the given string. + * + * @param input - a string + */ +function utf8Encode(input) { + var bytes = new Uint8Array(input.length * 4); + var byteIndex = 0; + for (var i = 0; i < input.length; i++) { + var char = input.charCodeAt(i); + if (char < 128) { + bytes[byteIndex++] = char; + continue; + } + else if (char < 2048) { + bytes[byteIndex++] = char >> 6 | 192; + } + else { + if (char > 0xd7ff && char < 0xdc00) { + if (++i >= input.length) { + throw new Error("Incomplete surrogate pair."); + } + var c2 = input.charCodeAt(i); + if (c2 < 0xdc00 || c2 > 0xdfff) { + throw new Error("Invalid surrogate character."); + } + char = 0x10000 + ((char & 0x03ff) << 10) + (c2 & 0x03ff); + bytes[byteIndex++] = char >> 18 | 240; + bytes[byteIndex++] = char >> 12 & 63 | 128; } - else if (util_1.Guard.isCharacterDataNode(this)) { - algorithm_1.characterData_replaceData(this, 0, algorithm_1.tree_nodeLength(this), value); + else { + bytes[byteIndex++] = char >> 12 | 224; } - }, - enumerable: true, - configurable: true - }); - /** - * Puts all {@link Text} nodes in the full depth of the sub-tree - * underneath this node into a "normal" form where only markup - * (e.g., tags, comments, processing instructions, CDATA sections, - * and entity references) separates {@link Text} nodes, i.e., there - * are no adjacent Text nodes. - */ - NodeImpl.prototype.normalize = function () { - var e_1, _a, e_2, _b; - /** - * The normalize() method, when invoked, must run these steps for each - * descendant exclusive Text node node of context object: - */ - var descendantNodes = []; - var node = algorithm_1.tree_getFirstDescendantNode(this, false, false, function (e) { return util_1.Guard.isExclusiveTextNode(e); }); - while (node !== null) { - descendantNodes.push(node); - node = algorithm_1.tree_getNextDescendantNode(this, node, false, false, function (e) { return util_1.Guard.isExclusiveTextNode(e); }); + bytes[byteIndex++] = char >> 6 & 63 | 128; } - for (var i = 0; i < descendantNodes.length; i++) { - var node_1 = descendantNodes[i]; - if (node_1._parent === null) - continue; - /** - * 1. Let length be node’s length. - * 2. If length is zero, then remove node and continue with the next - * exclusive Text node, if any. - */ - var length = algorithm_1.tree_nodeLength(node_1); - if (length === 0) { - algorithm_1.mutation_remove(node_1, node_1._parent); - continue; - } - /** - * 3. Let data be the concatenation of the data of node’s contiguous - * exclusive Text nodes (excluding itself), in tree order. - */ - var textSiblings = []; - var data = ''; - try { - for (var _c = (e_1 = void 0, __values(algorithm_1.text_contiguousExclusiveTextNodes(node_1))), _d = _c.next(); !_d.done; _d = _c.next()) { - var sibling = _d.value; - textSiblings.push(sibling); - data += sibling._data; + bytes[byteIndex++] = char & 63 | 128; + } + return bytes.subarray(0, byteIndex); +} +exports.utf8Encode = utf8Encode; +/** + * UTF-8 decodes the given byte sequence into a string. + * + * @param bytes - a byte sequence + */ +function utf8Decode(bytes) { + var result = ""; + var i = 0; + while (i < bytes.length) { + var c = bytes[i++]; + if (c > 127) { + if (c > 191 && c < 224) { + if (i >= bytes.length) { + throw new Error("Incomplete 2-byte sequence."); } + c = (c & 31) << 6 | bytes[i++] & 63; } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + else if (c > 223 && c < 240) { + if (i + 1 >= bytes.length) { + throw new Error("Incomplete 3-byte sequence."); } - finally { if (e_1) throw e_1.error; } + c = (c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63; } - /** - * 4. Replace data with node node, offset length, count 0, and data data. - */ - algorithm_1.characterData_replaceData(node_1, length, 0, data); - /** - * 5. Let currentNode be node’s next sibling. - * 6. While currentNode is an exclusive Text node: - */ - if (DOMImpl_1.dom.rangeList.size !== 0) { - var currentNode = node_1._nextSibling; - while (currentNode !== null && util_1.Guard.isExclusiveTextNode(currentNode)) { - /** - * 6.1. For each live range whose start node is currentNode, add length - * to its start offset and set its start node to node. - * 6.2. For each live range whose end node is currentNode, add length to - * its end offset and set its end node to node. - * 6.3. For each live range whose start node is currentNode’s parent and - * start offset is currentNode’s index, set its start node to node and - * its start offset to length. - * 6.4. For each live range whose end node is currentNode’s parent and - * end offset is currentNode’s index, set its end node to node and its - * end offset to length. - */ - var cn = currentNode; - var index = algorithm_1.tree_index(cn); - try { - for (var _e = (e_2 = void 0, __values(DOMImpl_1.dom.rangeList)), _f = _e.next(); !_f.done; _f = _e.next()) { - var range = _f.value; - if (range._start[0] === cn) { - range._start[0] = node_1; - range._start[1] += length; - } - if (range._end[0] === cn) { - range._end[0] = node_1; - range._end[1] += length; - } - if (range._start[0] === cn._parent && range._start[1] === index) { - range._start[0] = node_1; - range._start[1] = length; - } - if (range._end[0] === cn._parent && range._end[1] === index) { - range._end[0] = node_1; - range._end[1] = length; - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_f && !_f.done && (_b = _e.return)) _b.call(_e); - } - finally { if (e_2) throw e_2.error; } - } - /** - * 6.5. Add currentNode’s length to length. - * 6.6. Set currentNode to its next sibling. - */ - length += algorithm_1.tree_nodeLength(currentNode); - currentNode = currentNode._nextSibling; + else if (c > 239 && c < 248) { + if (i + 2 >= bytes.length) { + throw new Error("Incomplete 4-byte sequence."); } + c = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63; } - /** - * 7. Remove node’s contiguous exclusive Text nodes (excluding itself), - * in tree order. - */ - for (var i_1 = 0; i_1 < textSiblings.length; i_1++) { - var sibling = textSiblings[i_1]; - if (sibling._parent === null) - continue; - algorithm_1.mutation_remove(sibling, sibling._parent); + else { + throw new Error("Unknown multi-byte start."); } } - }; + if (c <= 0xffff) { + result += String.fromCharCode(c); + } + else if (c <= 0x10ffff) { + c -= 0x10000; + result += String.fromCharCode(c >> 10 | 0xd800); + result += String.fromCharCode(c & 0x3FF | 0xdc00); + } + else { + throw new Error("Code point exceeds UTF-16 limit."); + } + } + return result; +} +exports.utf8Decode = utf8Decode; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 81040: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +function once(emitter, name, { signal } = {}) { + return new Promise((resolve, reject) => { + function cleanup() { + signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup); + emitter.removeListener(name, onEvent); + emitter.removeListener('error', onError); + } + function onEvent(...args) { + cleanup(); + resolve(args); + } + function onError(err) { + cleanup(); + reject(err); + } + signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup); + emitter.on(name, onEvent); + emitter.on('error', onError); + }); +} +exports["default"] = once; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 61659: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var eventTargetShim = __nccwpck_require__(84697); + +/** + * The signal class. + * @see https://dom.spec.whatwg.org/#abortsignal + */ +class AbortSignal extends eventTargetShim.EventTarget { /** - * Returns a duplicate of this node, i.e., serves as a generic copy - * constructor for nodes. The duplicate node has no parent - * ({@link parentNode} returns `null`). - * - * @param deep - if `true`, recursively clone the subtree under the - * specified node. If `false`, clone only the node itself (and its - * attributes, if it is an {@link Element}). + * AbortSignal cannot be constructed directly. */ - NodeImpl.prototype.cloneNode = function (deep) { - if (deep === void 0) { deep = false; } - /** - * 1. If context object is a shadow root, then throw a "NotSupportedError" - * DOMException. - * 2. Return a clone of the context object, with the clone children flag set - * if deep is true. - */ - if (util_1.Guard.isShadowRoot(this)) - throw new DOMException_1.NotSupportedError(); - return algorithm_1.node_clone(this, null, deep); - }; + constructor() { + super(); + throw new TypeError("AbortSignal cannot be constructed directly"); + } /** - * Determines if the given node is equal to this one. - * - * @param node - the node to compare with + * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. */ - NodeImpl.prototype.isEqualNode = function (node) { - if (node === void 0) { node = null; } - /** - * The isEqualNode(otherNode) method, when invoked, must return true if - * otherNode is non-null and context object equals otherNode, and false - * otherwise. - */ - return (node !== null && algorithm_1.node_equals(this, node)); - }; + get aborted() { + const aborted = abortedFlags.get(this); + if (typeof aborted !== "boolean") { + throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + } + return aborted; + } +} +eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); +/** + * Create an AbortSignal object. + */ +function createAbortSignal() { + const signal = Object.create(AbortSignal.prototype); + eventTargetShim.EventTarget.call(signal); + abortedFlags.set(signal, false); + return signal; +} +/** + * Abort a given signal. + */ +function abortSignal(signal) { + if (abortedFlags.get(signal) !== false) { + return; + } + abortedFlags.set(signal, true); + signal.dispatchEvent({ type: "abort" }); +} +/** + * Aborted flag for each instances. + */ +const abortedFlags = new WeakMap(); +// Properties should be enumerable. +Object.defineProperties(AbortSignal.prototype, { + aborted: { enumerable: true }, +}); +// `toString()` should return `"[object AbortSignal]"` +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortSignal", + }); +} + +/** + * The AbortController. + * @see https://dom.spec.whatwg.org/#abortcontroller + */ +class AbortController { /** - * Determines if the given node is reference equal to this one. - * - * @param node - the node to compare with + * Initialize this controller. */ - NodeImpl.prototype.isSameNode = function (node) { - if (node === void 0) { node = null; } - /** - * The isSameNode(otherNode) method, when invoked, must return true if - * otherNode is context object, and false otherwise. - */ - return (this === node); - }; + constructor() { + signals.set(this, createAbortSignal()); + } /** - * Returns a bitmask indicating the position of the given `node` - * relative to this node. + * Returns the `AbortSignal` object associated with this object. */ - NodeImpl.prototype.compareDocumentPosition = function (other) { - /** - * 1. If context object is other, then return zero. - * 2. Let node1 be other and node2 be context object. - * 3. Let attr1 and attr2 be null. - * attr1’s element. - */ - if (other === this) - return 0; - var node1 = other; - var node2 = this; - var attr1 = null; - var attr2 = null; - /** - * 4. If node1 is an attribute, then set attr1 to node1 and node1 to - * attr1’s element. - */ - if (util_1.Guard.isAttrNode(node1)) { - attr1 = node1; - node1 = attr1._element; - } - /** - * 5. If node2 is an attribute, then: - */ - if (util_1.Guard.isAttrNode(node2)) { - /** - * 5.1. Set attr2 to node2 and node2 to attr2’s element. - */ - attr2 = node2; - node2 = attr2._element; - /** - * 5.2. If attr1 and node1 are non-null, and node2 is node1, then: - */ - if (attr1 && node1 && (node1 === node2)) { - /** - * 5.2. For each attr in node2’s attribute list: - */ - for (var i = 0; i < node2._attributeList.length; i++) { - var attr = node2._attributeList[i]; - /** - * 5.2.1. If attr equals attr1, then return the result of adding - * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC and - * DOCUMENT_POSITION_PRECEDING. - * 5.2.2. If attr equals attr2, then return the result of adding - * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC and - * DOCUMENT_POSITION_FOLLOWING. - */ - if (algorithm_1.node_equals(attr, attr1)) { - return interfaces_1.Position.ImplementationSpecific | interfaces_1.Position.Preceding; - } - else if (algorithm_1.node_equals(attr, attr2)) { - return interfaces_1.Position.ImplementationSpecific | interfaces_1.Position.Following; - } - } - } - } - /** - * 6. If node1 or node2 is null, or node1’s root is not node2’s root, then - * return the result of adding DOCUMENT_POSITION_DISCONNECTED, - * DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, and either - * DOCUMENT_POSITION_PRECEDING or DOCUMENT_POSITION_FOLLOWING, - * with the constraint that this is to be consistent, together. - */ - if (node1 === null || node2 === null || - algorithm_1.tree_rootNode(node1) !== algorithm_1.tree_rootNode(node2)) { - // nodes are disconnected - // return a random result but cache the value for consistency - return interfaces_1.Position.Disconnected | interfaces_1.Position.ImplementationSpecific | - (DOMImpl_1.dom.compareCache.check(this, other) ? interfaces_1.Position.Preceding : interfaces_1.Position.Following); - } - /** - * 7. If node1 is an ancestor of node2 and attr1 is null, or node1 is node2 - * and attr2 is non-null, then return the result of adding - * DOCUMENT_POSITION_CONTAINS to DOCUMENT_POSITION_PRECEDING. - */ - if ((!attr1 && algorithm_1.tree_isAncestorOf(node2, node1)) || - (attr2 && (node1 === node2))) { - return interfaces_1.Position.Contains | interfaces_1.Position.Preceding; - } - /** - * 8. If node1 is a descendant of node2 and attr2 is null, or node1 is node2 - * and attr1 is non-null, then return the result of adding - * DOCUMENT_POSITION_CONTAINED_BY to DOCUMENT_POSITION_FOLLOWING. - */ - if ((!attr2 && algorithm_1.tree_isDescendantOf(node2, node1)) || - (attr1 && (node1 === node2))) { - return interfaces_1.Position.ContainedBy | interfaces_1.Position.Following; - } - /** - * 9. If node1 is preceding node2, then return DOCUMENT_POSITION_PRECEDING. - */ - if (algorithm_1.tree_isPreceding(node2, node1)) - return interfaces_1.Position.Preceding; - /** - * 10. Return DOCUMENT_POSITION_FOLLOWING. - */ - return interfaces_1.Position.Following; - }; + get signal() { + return getSignal(this); + } /** - * Returns `true` if given node is an inclusive descendant of this - * node, and `false` otherwise (including when other node is `null`). - * - * @param other - the node to check + * Abort and signal to any observers that the associated activity is to be aborted. */ - NodeImpl.prototype.contains = function (other) { - /** - * The contains(other) method, when invoked, must return true if other is an - * inclusive descendant of context object, and false otherwise (including - * when other is null). - */ - if (other === null) - return false; - return algorithm_1.tree_isDescendantOf(this, other, true); - }; + abort() { + abortSignal(getSignal(this)); + } +} +/** + * Associated signals. + */ +const signals = new WeakMap(); +/** + * Get the associated signal of a given controller. + */ +function getSignal(controller) { + const signal = signals.get(controller); + if (signal == null) { + throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + } + return signal; +} +// Properties should be enumerable. +Object.defineProperties(AbortController.prototype, { + signal: { enumerable: true }, + abort: { enumerable: true }, +}); +if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { + Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { + configurable: true, + value: "AbortController", + }); +} + +exports.AbortController = AbortController; +exports.AbortSignal = AbortSignal; +exports["default"] = AbortController; + +module.exports = AbortController +module.exports.AbortController = module.exports["default"] = AbortController +module.exports.AbortSignal = AbortSignal +//# sourceMappingURL=abort-controller.js.map + + +/***/ }), + +/***/ 8348: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.req = exports.json = exports.toBuffer = void 0; +const http = __importStar(__nccwpck_require__(13685)); +const https = __importStar(__nccwpck_require__(95687)); +async function toBuffer(stream) { + let length = 0; + const chunks = []; + for await (const chunk of stream) { + length += chunk.length; + chunks.push(chunk); + } + return Buffer.concat(chunks, length); +} +exports.toBuffer = toBuffer; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +async function json(stream) { + const buf = await toBuffer(stream); + const str = buf.toString('utf8'); + try { + return JSON.parse(str); + } + catch (_err) { + const err = _err; + err.message += ` (input: ${str})`; + throw err; + } +} +exports.json = json; +function req(url, opts = {}) { + const href = typeof url === 'string' ? url : url.href; + const req = (href.startsWith('https:') ? https : http).request(url, opts); + const promise = new Promise((resolve, reject) => { + req + .once('response', resolve) + .once('error', reject) + .end(); + }); + req.then = promise.then.bind(promise); + return req; +} +exports.req = req; +//# sourceMappingURL=helpers.js.map + +/***/ }), + +/***/ 70694: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Agent = void 0; +const net = __importStar(__nccwpck_require__(41808)); +const http = __importStar(__nccwpck_require__(13685)); +const https_1 = __nccwpck_require__(95687); +__exportStar(__nccwpck_require__(8348), exports); +const INTERNAL = Symbol('AgentBaseInternalState'); +class Agent extends http.Agent { + constructor(opts) { + super(opts); + this[INTERNAL] = {}; + } /** - * Returns the prefix for a given namespace URI, if present, and - * `null` if not. - * - * @param namespace - the namespace to search + * Determine whether this is an `http` or `https` request. */ - NodeImpl.prototype.lookupPrefix = function (namespace) { - /** - * 1. If namespace is null or the empty string, then return null. - * 2. Switch on the context object: - */ - if (!namespace) - return null; - if (util_1.Guard.isElementNode(this)) { - /** - * Return the result of locating a namespace prefix for it using - * namespace. - */ - return algorithm_1.node_locateANamespacePrefix(this, namespace); - } - else if (util_1.Guard.isDocumentNode(this)) { - /** - * Return the result of locating a namespace prefix for its document - * element, if its document element is non-null, and null otherwise. - */ - if (this.documentElement === null) { - return null; + isSecureEndpoint(options) { + if (options) { + // First check the `secureEndpoint` property explicitly, since this + // means that a parent `Agent` is "passing through" to this instance. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (typeof options.secureEndpoint === 'boolean') { + return options.secureEndpoint; } - else { - return algorithm_1.node_locateANamespacePrefix(this.documentElement, namespace); + // If no explicit `secure` endpoint, check if `protocol` property is + // set. This will usually be the case since using a full string URL + // or `URL` instance should be the most common usage. + if (typeof options.protocol === 'string') { + return options.protocol === 'https:'; } } - else if (util_1.Guard.isDocumentTypeNode(this) || util_1.Guard.isDocumentFragmentNode(this)) { + // Finally, if no `protocol` property was set, then fall back to + // checking the stack trace of the current call stack, and try to + // detect the "https" module. + const { stack } = new Error(); + if (typeof stack !== 'string') + return false; + return stack + .split('\n') + .some((l) => l.indexOf('(https.js:') !== -1 || + l.indexOf('node:https:') !== -1); + } + // In order to support async signatures in `connect()` and Node's native + // connection pooling in `http.Agent`, the array of sockets for each origin + // has to be updated synchronously. This is so the length of the array is + // accurate when `addRequest()` is next called. We achieve this by creating a + // fake socket and adding it to `sockets[origin]` and incrementing + // `totalSocketCount`. + incrementSockets(name) { + // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no + // need to create a fake socket because Node.js native connection pooling + // will never be invoked. + if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { return null; } - else if (util_1.Guard.isAttrNode(this)) { - /** - * Return the result of locating a namespace prefix for its element, - * if its element is non-null, and null otherwise. - */ - if (this._element === null) { - return null; - } - else { - return algorithm_1.node_locateANamespacePrefix(this._element, namespace); - } + // All instances of `sockets` are expected TypeScript errors. The + // alternative is to add it as a private property of this class but that + // will break TypeScript subclassing. + if (!this.sockets[name]) { + // @ts-expect-error `sockets` is readonly in `@types/node` + this.sockets[name] = []; } - else { - /** - * Return the result of locating a namespace prefix for its parent - * element, if its parent element is non-null, and null otherwise. - */ - if (this._parent !== null && util_1.Guard.isElementNode(this._parent)) { - return algorithm_1.node_locateANamespacePrefix(this._parent, namespace); + const fakeSocket = new net.Socket({ writable: false }); + this.sockets[name].push(fakeSocket); + // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` + this.totalSocketCount++; + return fakeSocket; + } + decrementSockets(name, socket) { + if (!this.sockets[name] || socket === null) { + return; + } + const sockets = this.sockets[name]; + const index = sockets.indexOf(socket); + if (index !== -1) { + sockets.splice(index, 1); + // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` + this.totalSocketCount--; + if (sockets.length === 0) { + // @ts-expect-error `sockets` is readonly in `@types/node` + delete this.sockets[name]; } - else { - return null; + } + } + // In order to properly update the socket pool, we need to call `getName()` on + // the core `https.Agent` if it is a secureEndpoint. + getName(options) { + const secureEndpoint = this.isSecureEndpoint(options); + if (secureEndpoint) { + // @ts-expect-error `getName()` isn't defined in `@types/node` + return https_1.Agent.prototype.getName.call(this, options); + } + // @ts-expect-error `getName()` isn't defined in `@types/node` + return super.getName(options); + } + createSocket(req, options, cb) { + const connectOpts = { + ...options, + secureEndpoint: this.isSecureEndpoint(options), + }; + const name = this.getName(connectOpts); + const fakeSocket = this.incrementSockets(name); + Promise.resolve() + .then(() => this.connect(req, connectOpts)) + .then((socket) => { + this.decrementSockets(name, fakeSocket); + if (socket instanceof http.Agent) { + try { + // @ts-expect-error `addRequest()` isn't defined in `@types/node` + return socket.addRequest(req, connectOpts); + } + catch (err) { + return cb(err); + } } + this[INTERNAL].currentSocket = socket; + // @ts-expect-error `createSocket()` isn't defined in `@types/node` + super.createSocket(req, options, cb); + }, (err) => { + this.decrementSockets(name, fakeSocket); + cb(err); + }); + } + createConnection() { + const socket = this[INTERNAL].currentSocket; + this[INTERNAL].currentSocket = undefined; + if (!socket) { + throw new Error('No socket was returned in the `connect()` function'); } - }; - /** - * Returns the namespace URI for a given prefix if present, and `null` - * if not. - * - * @param prefix - the prefix to search - */ - NodeImpl.prototype.lookupNamespaceURI = function (prefix) { - /** - * 1. If prefix is the empty string, then set it to null. - * 2. Return the result of running locate a namespace for the context object - * using prefix. - */ - return algorithm_1.node_locateANamespace(this, prefix || null); - }; - /** - * Returns `true` if the namespace is the default namespace on this - * node or `false` if not. - * - * @param namespace - the namespace to check - */ - NodeImpl.prototype.isDefaultNamespace = function (namespace) { - /** - * 1. If namespace is the empty string, then set it to null. - * 2. Let defaultNamespace be the result of running locate a namespace for - * context object using null. - * 3. Return true if defaultNamespace is the same as namespace, and false otherwise. - */ - if (!namespace) - namespace = null; - var defaultNamespace = algorithm_1.node_locateANamespace(this, null); - return (defaultNamespace === namespace); - }; - /** - * Inserts the node `newChild` before the existing child node - * `refChild`. If `refChild` is `null`, inserts `newChild` at the end - * of the list of children. - * - * If `newChild` is a {@link DocumentFragment} object, all of its - * children are inserted, in the same order, before `refChild`. - * - * If `newChild` is already in the tree, it is first removed. - * - * @param newChild - the node to insert - * @param refChild - the node before which the new node must be - * inserted - * - * @returns the newly inserted child node - */ - NodeImpl.prototype.insertBefore = function (newChild, refChild) { - /** - * The insertBefore(node, child) method, when invoked, must return the - * result of pre-inserting node into context object before child. - */ - return algorithm_1.mutation_preInsert(newChild, this, refChild); - }; - /** - * Adds the node `newChild` to the end of the list of children of this - * node, and returns it. If `newChild` is already in the tree, it is - * first removed. - * - * If `newChild` is a {@link DocumentFragment} object, the entire - * contents of the document fragment are moved into the child list of - * this node. - * - * @param newChild - the node to add - * - * @returns the newly inserted child node - */ - NodeImpl.prototype.appendChild = function (newChild) { - /** - * The appendChild(node) method, when invoked, must return the result of - * appending node to context object. - */ - return algorithm_1.mutation_append(newChild, this); - }; - /** - * Replaces the child node `oldChild` with `newChild` in the list of - * children, and returns the `oldChild` node. If `newChild` is already - * in the tree, it is first removed. - * - * @param newChild - the new node to put in the child list - * @param oldChild - the node being replaced in the list - * - * @returns the removed child node - */ - NodeImpl.prototype.replaceChild = function (newChild, oldChild) { - /** - * The replaceChild(node, child) method, when invoked, must return the - * result of replacing child with node within context object. - */ - return algorithm_1.mutation_replace(oldChild, newChild, this); - }; - /** - * Removes the child node indicated by `oldChild` from the list of - * children, and returns it. - * - * @param oldChild - the node being removed from the list - * - * @returns the removed child node - */ - NodeImpl.prototype.removeChild = function (oldChild) { - /** - * The removeChild(child) method, when invoked, must return the result of - * pre-removing child from context object. - */ - return algorithm_1.mutation_preRemove(oldChild, this); - }; - /** - * Gets the parent event target for the given event. - * - * @param event - an event - */ - NodeImpl.prototype._getTheParent = function (event) { - /** - * A node’s get the parent algorithm, given an event, returns the node’s - * assigned slot, if node is assigned, and node’s parent otherwise. - */ - if (util_1.Guard.isSlotable(this) && algorithm_1.shadowTree_isAssigned(this)) { - return this._assignedSlot; + return socket; + } + get defaultPort() { + return (this[INTERNAL].defaultPort ?? + (this.protocol === 'https:' ? 443 : 80)); + } + set defaultPort(v) { + if (this[INTERNAL]) { + this[INTERNAL].defaultPort = v; } - else { - return this._parent; + } + get protocol() { + return (this[INTERNAL].protocol ?? + (this.isSecureEndpoint() ? 'https:' : 'http:')); + } + set protocol(v) { + if (this[INTERNAL]) { + this[INTERNAL].protocol = v; } - }; - NodeImpl.ELEMENT_NODE = 1; - NodeImpl.ATTRIBUTE_NODE = 2; - NodeImpl.TEXT_NODE = 3; - NodeImpl.CDATA_SECTION_NODE = 4; - NodeImpl.ENTITY_REFERENCE_NODE = 5; - NodeImpl.ENTITY_NODE = 6; - NodeImpl.PROCESSING_INSTRUCTION_NODE = 7; - NodeImpl.COMMENT_NODE = 8; - NodeImpl.DOCUMENT_NODE = 9; - NodeImpl.DOCUMENT_TYPE_NODE = 10; - NodeImpl.DOCUMENT_FRAGMENT_NODE = 11; - NodeImpl.NOTATION_NODE = 12; - NodeImpl.DOCUMENT_POSITION_DISCONNECTED = 0x01; - NodeImpl.DOCUMENT_POSITION_PRECEDING = 0x02; - NodeImpl.DOCUMENT_POSITION_FOLLOWING = 0x04; - NodeImpl.DOCUMENT_POSITION_CONTAINS = 0x08; - NodeImpl.DOCUMENT_POSITION_CONTAINED_BY = 0x10; - NodeImpl.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; - return NodeImpl; -}(EventTargetImpl_1.EventTargetImpl)); -exports.NodeImpl = NodeImpl; + } +} +exports.Agent = Agent; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 61546: +/***/ ((module) => { + +"use strict"; + + +const arrify = value => { + if (value === null || value === undefined) { + return []; + } + + if (Array.isArray(value)) { + return value; + } + + if (typeof value === 'string') { + return [value]; + } + + if (typeof value[Symbol.iterator] === 'function') { + return [...value]; + } + + return [value]; +}; + +module.exports = arrify; + + +/***/ }), + +/***/ 33415: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Packages +var retrier = __nccwpck_require__(71604); + +function retry(fn, opts) { + function run(resolve, reject) { + var options = opts || {}; + var op; + + // Default `randomize` to true + if (!('randomize' in options)) { + options.randomize = true; + } + + op = retrier.operation(options); + + // We allow the user to abort retrying + // this makes sense in the cases where + // knowledge is obtained that retrying + // would be futile (e.g.: auth errors) + + function bail(err) { + reject(err || new Error('Aborted')); + } + + function onError(err, num) { + if (err.bail) { + bail(err); + return; + } + + if (!op.retry(err)) { + reject(op.mainError()); + } else if (options.onRetry) { + options.onRetry(err, num); + } + } + + function runAttempt(num) { + var val; + + try { + val = fn(bail, num); + } catch (err) { + onError(err, num); + return; + } + + Promise.resolve(val) + .then(resolve) + .catch(function catchIt(err) { + onError(err, num); + }); + } + + op.attempt(runAttempt); + } + + return new Promise(run); +} + +module.exports = retry; + + +/***/ }), + +/***/ 14812: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = +{ + parallel : __nccwpck_require__(8210), + serial : __nccwpck_require__(50445), + serialOrdered : __nccwpck_require__(3578) +}; + + +/***/ }), + +/***/ 1700: +/***/ ((module) => { + +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} + + +/***/ }), + +/***/ 72794: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var defer = __nccwpck_require__(15295); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} + + +/***/ }), + +/***/ 15295: +/***/ ((module) => { + +module.exports = defer; + /** - * A performance tweak to share an empty set between all node classes. This will - * be overwritten by element, document and document fragment nodes to supply an - * actual set of nodes. + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run */ -NodeImpl.prototype._children = new util_1.EmptySet(); +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} + + +/***/ }), + +/***/ 9023: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var async = __nccwpck_require__(72794) + , abort = __nccwpck_require__(1700) + ; + +// API +module.exports = iterate; + /** - * Define constants on prototype. + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed */ -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ELEMENT_NODE", 1); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ATTRIBUTE_NODE", 2); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "TEXT_NODE", 3); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "CDATA_SECTION_NODE", 4); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ENTITY_REFERENCE_NODE", 5); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "ENTITY_NODE", 6); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "PROCESSING_INSTRUCTION_NODE", 7); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "COMMENT_NODE", 8); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_NODE", 9); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_TYPE_NODE", 10); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_FRAGMENT_NODE", 11); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "NOTATION_NODE", 12); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_DISCONNECTED", 0x01); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_PRECEDING", 0x02); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_FOLLOWING", 0x04); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_CONTAINS", 0x08); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_CONTAINED_BY", 0x10); -WebIDLAlgorithm_1.idl_defineConst(NodeImpl.prototype, "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC", 0x20); -//# sourceMappingURL=NodeImpl.js.map +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} + /***/ }), -/***/ 61997: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 42474: +/***/ ((module) => { -"use strict"; +// API +module.exports = state; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var TraverserImpl_1 = __nccwpck_require__(39782); -var algorithm_1 = __nccwpck_require__(61); /** - * Represents an object which can be used to iterate through the nodes - * of a subtree. + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object */ -var NodeIteratorImpl = /** @class */ (function (_super) { - __extends(NodeIteratorImpl, _super); - /** - * Initializes a new instance of `NodeIterator`. - */ - function NodeIteratorImpl(root, reference, pointerBeforeReference) { - var _this = _super.call(this, root) || this; - _this._iteratorCollection = undefined; - _this._reference = reference; - _this._pointerBeforeReference = pointerBeforeReference; - algorithm_1.nodeIterator_iteratorList().add(_this); - return _this; +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length } - Object.defineProperty(NodeIteratorImpl.prototype, "referenceNode", { - /** @inheritdoc */ - get: function () { return this._reference; }, - enumerable: true, - configurable: true + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); }); - Object.defineProperty(NodeIteratorImpl.prototype, "pointerBeforeReferenceNode", { - /** @inheritdoc */ - get: function () { return this._pointerBeforeReference; }, - enumerable: true, - configurable: true + } + + return initState; +} + + +/***/ }), + +/***/ 37942: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var abort = __nccwpck_require__(1700) + , async = __nccwpck_require__(72794) + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} + + +/***/ }), + +/***/ 8210: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(9023) + , initState = __nccwpck_require__(42474) + , terminator = __nccwpck_require__(37942) + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } }); - /** @inheritdoc */ - NodeIteratorImpl.prototype.nextNode = function () { - /** - * The nextNode() method, when invoked, must return the result of - * traversing with the context object and next. - */ - return algorithm_1.nodeIterator_traverse(this, true); - }; - /** @inheritdoc */ - NodeIteratorImpl.prototype.previousNode = function () { - /** - * The previousNode() method, when invoked, must return the result of - * traversing with the context object and previous. - */ - return algorithm_1.nodeIterator_traverse(this, false); - }; - /** @inheritdoc */ - NodeIteratorImpl.prototype.detach = function () { - /** - * The detach() method, when invoked, must do nothing. - * - * since JS lacks weak references, we still use detach - */ - algorithm_1.nodeIterator_iteratorList().delete(this); - }; - /** - * Creates a new `NodeIterator`. - * - * @param root - iterator's root node - * @param reference - reference node - * @param pointerBeforeReference - whether the iterator is before or after the - * reference node - */ - NodeIteratorImpl._create = function (root, reference, pointerBeforeReference) { - return new NodeIteratorImpl(root, reference, pointerBeforeReference); - }; - return NodeIteratorImpl; -}(TraverserImpl_1.TraverserImpl)); -exports.NodeIteratorImpl = NodeIteratorImpl; -//# sourceMappingURL=NodeIteratorImpl.js.map + + state.index++; + } + + return terminator.bind(state, callback); +} + /***/ }), -/***/ 43728: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 50445: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var serialOrdered = __nccwpck_require__(3578); + +// Public API +module.exports = serial; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(76195); -var algorithm_1 = __nccwpck_require__(61); /** - * Represents an ordered set of nodes. + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator */ -var NodeListImpl = /** @class */ (function () { - /** - * Initializes a new instance of `NodeList`. - * - * @param root - root node - */ - function NodeListImpl(root) { - this._live = true; - this._filter = null; - this._length = 0; - this._root = root; - return new Proxy(this, this); +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} + + +/***/ }), + +/***/ 3578: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var iterate = __nccwpck_require__(9023) + , initState = __nccwpck_require__(42474) + , terminator = __nccwpck_require__(37942) + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; } - Object.defineProperty(NodeListImpl.prototype, "length", { - /** @inheritdoc */ - get: function () { - /** - * The length attribute must return the number of nodes represented - * by the collection. - */ - return this._root._children.size; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - NodeListImpl.prototype.item = function (index) { - /** - * The item(index) method must return the indexth node in the collection. - * If there is no indexth node in the collection, then the method must - * return null. - */ - if (index < 0 || index > this.length - 1) - return null; - if (index < this.length / 2) { - var i = 0; - var node = this._root._firstChild; - while (node !== null && i !== index) { - node = node._nextSibling; - i++; - } - return node; - } - else { - var i = this.length - 1; - var node = this._root._lastChild; - while (node !== null && i !== index) { - node = node._previousSibling; - i--; - } - return node; - } - }; - /** @inheritdoc */ - NodeListImpl.prototype.keys = function () { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var index = 0; - return { - next: function () { - if (index === this.length) { - return { done: true, value: null }; - } - else { - return { done: false, value: index++ }; - } - }.bind(this) - }; - }.bind(this), - _a; - }; - /** @inheritdoc */ - NodeListImpl.prototype.values = function () { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var it = this[Symbol.iterator](); - return { - next: function () { - return it.next(); - } - }; - }.bind(this), - _a; - }; - /** @inheritdoc */ - NodeListImpl.prototype.entries = function () { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var it = this[Symbol.iterator](); - var index = 0; - return { - next: function () { - var itResult = it.next(); - if (itResult.done) { - return { done: true, value: null }; - } - else { - return { done: false, value: [index++, itResult.value] }; - } - } - }; - }.bind(this), - _a; - }; - /** @inheritdoc */ - NodeListImpl.prototype[Symbol.iterator] = function () { - return this._root._children[Symbol.iterator](); - }; - /** @inheritdoc */ - NodeListImpl.prototype.forEach = function (callback, thisArg) { - var e_1, _a; - if (thisArg === undefined) { - thisArg = DOMImpl_1.dom.window; - } - var index = 0; - try { - for (var _b = __values(this._root._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var node = _c.value; - callback.call(thisArg, node, index++, this); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - /** - * Implements a proxy get trap to provide array-like access. - */ - NodeListImpl.prototype.get = function (target, key, receiver) { - if (!util_1.isString(key)) { - return Reflect.get(target, key, receiver); - } - var index = Number(key); - if (isNaN(index)) { - return Reflect.get(target, key, receiver); - } - return target.item(index) || undefined; - }; - /** - * Implements a proxy set trap to provide array-like access. - */ - NodeListImpl.prototype.set = function (target, key, value, receiver) { - if (!util_1.isString(key)) { - return Reflect.set(target, key, value, receiver); - } - var index = Number(key); - if (isNaN(index)) { - return Reflect.set(target, key, value, receiver); - } - var node = target.item(index) || undefined; - if (!node) - return false; - if (node._parent) { - algorithm_1.mutation_replace(node, value, node._parent); - return true; - } - else { - return false; - } - }; - /** - * Creates a new `NodeList`. - * - * @param root - root node - */ - NodeListImpl._create = function (root) { - return new NodeListImpl(root); - }; - return NodeListImpl; -}()); -exports.NodeListImpl = NodeListImpl; -//# sourceMappingURL=NodeListImpl.js.map + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} + /***/ }), -/***/ 65306: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 91403: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var util_1 = __nccwpck_require__(76195); + +var CombinedStream = __nccwpck_require__(85443); +var util = __nccwpck_require__(73837); +var path = __nccwpck_require__(71017); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var parseUrl = (__nccwpck_require__(57310).parse); +var fs = __nccwpck_require__(57147); +var Stream = (__nccwpck_require__(12781).Stream); +var crypto = __nccwpck_require__(6113); +var mime = __nccwpck_require__(43583); +var asynckit = __nccwpck_require__(14812); +var setToStringTag = __nccwpck_require__(11770); +var hasOwn = __nccwpck_require__(62157); +var populate = __nccwpck_require__(47027); + /** - * Represents an ordered list of nodes. - * This is a static implementation of `NodeList`. + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {object} options - Properties to be added/overriden for FormData and CombinedStream */ -var NodeListStaticImpl = /** @class */ (function () { - /** - * Initializes a new instance of `NodeList`. - * - * @param root - root node +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; // eslint-disable-line no-param-reassign + for (var option in options) { // eslint-disable-line no-restricted-syntax + this[option] = options[option]; + } +} + +// make it a Stream +util.inherits(FormData, CombinedStream); + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function (field, value, options) { + options = options || {}; // eslint-disable-line no-param-reassign + + // allow filename as single option + if (typeof options === 'string') { + options = { filename: options }; // eslint-disable-line no-param-reassign + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value === 'number' || value == null) { + value = String(value); // eslint-disable-line no-param-reassign + } + + // https://github.com/felixge/node-form-data/issues/38 + if (Array.isArray(value)) { + /* + * Please convert your array into string + * the way web server expects it */ - function NodeListStaticImpl(root) { - this._live = false; - this._items = []; - this._length = 0; - this._root = root; - this._items = []; - this._filter = function (node) { return true; }; - return new Proxy(this, this); + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function (header, value, options) { + var valueLength = 0; + + /* + * used w/ getLengthSync(), when length is known. + * e.g. for streaming directly from a remote server, + * w/ a known file a size, and not wanting to wait for + * incoming file to finish to get its size. + */ + if (options.knownLength != null) { + valueLength += Number(options.knownLength); + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response or not a stream + if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function (value, callback) { + if (hasOwn(value, 'fd')) { + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function (err, stat) { + if (err) { + callback(err); + return; + } + + // update final size based on the range options + var fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); } - Object.defineProperty(NodeListStaticImpl.prototype, "length", { - /** @inheritdoc */ - get: function () { - /** - * The length attribute must return the number of nodes represented by - * the collection. - */ - return this._items.length; - }, - enumerable: true, - configurable: true + + // or http response + } else if (hasOwn(value, 'httpVersion')) { + callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return + + // or request stream http://github.com/mikeal/request + } else if (hasOwn(value, 'httpModule')) { + // wait till response come back + value.on('response', function (response) { + value.pause(); + callback(null, Number(response.headers['content-length'])); }); - /** @inheritdoc */ - NodeListStaticImpl.prototype.item = function (index) { - /** - * The item(index) method must return the indexth node in the collection. - * If there is no indexth node in the collection, then the method must - * return null. - */ - if (index < 0 || index > this.length - 1) - return null; - return this._items[index]; - }; - /** @inheritdoc */ - NodeListStaticImpl.prototype.keys = function () { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var index = 0; - return { - next: function () { - if (index === this.length) { - return { done: true, value: null }; - } - else { - return { done: false, value: index++ }; - } - }.bind(this) - }; - }.bind(this), - _a; - }; - /** @inheritdoc */ - NodeListStaticImpl.prototype.values = function () { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var it = this[Symbol.iterator](); - return { - next: function () { - return it.next(); - } - }; - }.bind(this), - _a; - }; - /** @inheritdoc */ - NodeListStaticImpl.prototype.entries = function () { - var _a; - return _a = {}, - _a[Symbol.iterator] = function () { - var it = this[Symbol.iterator](); - var index = 0; - return { - next: function () { - var itResult = it.next(); - if (itResult.done) { - return { done: true, value: null }; - } - else { - return { done: false, value: [index++, itResult.value] }; - } - } - }; - }.bind(this), - _a; - }; - /** @inheritdoc */ - NodeListStaticImpl.prototype[Symbol.iterator] = function () { - var it = this._items[Symbol.iterator](); - return { - next: function () { - return it.next(); - } - }; - }; - /** @inheritdoc */ - NodeListStaticImpl.prototype.forEach = function (callback, thisArg) { - var e_1, _a; - if (thisArg === undefined) { - thisArg = DOMImpl_1.dom.window; - } - var index = 0; - try { - for (var _b = __values(this._items), _c = _b.next(); !_c.done; _c = _b.next()) { - var node = _c.value; - callback.call(thisArg, node, index++, this); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - /** - * Implements a proxy get trap to provide array-like access. - */ - NodeListStaticImpl.prototype.get = function (target, key, receiver) { - if (!util_1.isString(key)) { - return Reflect.get(target, key, receiver); - } - var index = Number(key); - if (isNaN(index)) { - return Reflect.get(target, key, receiver); - } - return target._items[index] || undefined; - }; - /** - * Implements a proxy set trap to provide array-like access. - */ - NodeListStaticImpl.prototype.set = function (target, key, value, receiver) { - if (!util_1.isString(key)) { - return Reflect.set(target, key, value, receiver); - } - var index = Number(key); - if (isNaN(index)) { - return Reflect.set(target, key, value, receiver); - } - if (index >= 0 && index < target._items.length) { - target._items[index] = value; - return true; - } - else { - return false; - } - }; - /** - * Creates a new `NodeList`. - * - * @param root - root node - * @param items - a list of items to initialize the list + value.resume(); + + // something else + } else { + callback('Unknown stream'); // eslint-disable-line callback-return + } +}; + +FormData.prototype._multiPartHeader = function (field, value, options) { + /* + * custom header specified (as string)? + * it becomes responsible for boundary + * (e.g. to handle extra CRLFs on .NET servers) + */ + if (typeof options.header === 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header === 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { // eslint-disable-line no-restricted-syntax + if (hasOwn(headers, prop)) { + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return + var filename; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || (value && (value.name || value.path))) { + /* + * custom filename take precedence + * formidable and the browser add a name property + * fs- and request- streams have path property */ - NodeListStaticImpl._create = function (root, items) { - var list = new NodeListStaticImpl(root); - list._items = items; - return list; - }; - return NodeListStaticImpl; -}()); -exports.NodeListStaticImpl = NodeListStaticImpl; -//# sourceMappingURL=NodeListStaticImpl.js.map + filename = path.basename(options.filename || (value && (value.name || value.path))); + } else if (value && value.readable && hasOwn(value, 'httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } -/***/ }), + if (filename) { + return 'filename="' + filename + '"'; + } +}; + +FormData.prototype._getContentType = function (value, options) { + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && value && typeof value === 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function () { + return function (next) { + var footer = FormData.LINE_BREAK; + + var lastPart = this._streams.length === 0; + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; -/***/ 71032: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +FormData.prototype._lastBoundary = function () { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; -"use strict"; +FormData.prototype.getHeaders = function (userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(65282); -/** - * Represents a mixin that extends child nodes that can have siblings - * other than doctypes. This mixin is implemented by {@link Element} and - * {@link CharacterData}. - */ -var NonDocumentTypeChildNodeImpl = /** @class */ (function () { - function NonDocumentTypeChildNodeImpl() { + for (header in userHeaders) { // eslint-disable-line no-restricted-syntax + if (hasOwn(userHeaders, header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; } - Object.defineProperty(NonDocumentTypeChildNodeImpl.prototype, "previousElementSibling", { - /** @inheritdoc */ - get: function () { - /** - * The previousElementSibling attribute’s getter must return the first - * preceding sibling that is an element, and null otherwise. - */ - var node = util_1.Cast.asNode(this)._previousSibling; - while (node) { - if (util_1.Guard.isElementNode(node)) - return node; - else - node = node._previousSibling; - } - return null; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(NonDocumentTypeChildNodeImpl.prototype, "nextElementSibling", { - /** @inheritdoc */ - get: function () { - /** - * The nextElementSibling attribute’s getter must return the first - * following sibling that is an element, and null otherwise. - */ - var node = util_1.Cast.asNode(this)._nextSibling; - while (node) { - if (util_1.Guard.isElementNode(node)) - return node; - else - node = node._nextSibling; - } - return null; - }, - enumerable: true, - configurable: true - }); - return NonDocumentTypeChildNodeImpl; -}()); -exports.NonDocumentTypeChildNodeImpl = NonDocumentTypeChildNodeImpl; -//# sourceMappingURL=NonDocumentTypeChildNodeImpl.js.map + } -/***/ }), + return formHeaders; +}; -/***/ 90733: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +FormData.prototype.setBoundary = function (boundary) { + if (typeof boundary !== 'string') { + throw new TypeError('FormData boundary must be a string'); + } + this._boundary = boundary; +}; -"use strict"; +FormData.prototype.getBoundary = function () { + if (!this._boundary) { + this._generateBoundary(); + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(65282); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents a mixin that extends non-element parent nodes. This mixin - * is implemented by {@link Document} and {@link DocumentFragment}. - */ -var NonElementParentNodeImpl = /** @class */ (function () { - function NonElementParentNodeImpl() { - } - /** @inheritdoc */ - NonElementParentNodeImpl.prototype.getElementById = function (id) { - /** - * The getElementById(elementId) method, when invoked, must return the first - * element, in tree order, within the context object’s descendants, - * whose ID is elementId, and null if there is no such element otherwise. - */ - var ele = algorithm_1.tree_getFirstDescendantNode(util_1.Cast.asNode(this), false, false, function (e) { return util_1.Guard.isElementNode(e); }); - while (ele !== null) { - if (ele._uniqueIdentifier === id) { - return ele; - } - ele = algorithm_1.tree_getNextDescendantNode(util_1.Cast.asNode(this), ele, false, false, function (e) { return util_1.Guard.isElementNode(e); }); - } - return null; - }; - return NonElementParentNodeImpl; -}()); -exports.NonElementParentNodeImpl = NonElementParentNodeImpl; -//# sourceMappingURL=NonElementParentNodeImpl.js.map + return this._boundary; +}; -/***/ }), +FormData.prototype.getBuffer = function () { + var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap + var boundary = this.getBoundary(); -/***/ 85988: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + // Add content to the buffer. + if (Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); + } else { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); + } -"use strict"; + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); + } + } + } -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + // Add the footer and return the Buffer object. + return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(65282); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents a mixin that extends parent nodes that can have children. - * This mixin is implemented by {@link Element}, {@link Document} and - * {@link DocumentFragment}. - */ -var ParentNodeImpl = /** @class */ (function () { - function ParentNodeImpl() { - } - Object.defineProperty(ParentNodeImpl.prototype, "children", { - /** @inheritdoc */ - get: function () { - /** - * The children attribute’s getter must return an HTMLCollection collection - * rooted at context object matching only element children. - */ - return algorithm_1.create_htmlCollection(util_1.Cast.asNode(this)); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ParentNodeImpl.prototype, "firstElementChild", { - /** @inheritdoc */ - get: function () { - /** - * The firstElementChild attribute’s getter must return the first child - * that is an element, and null otherwise. - */ - var node = util_1.Cast.asNode(this)._firstChild; - while (node) { - if (util_1.Guard.isElementNode(node)) - return node; - else - node = node._nextSibling; - } - return null; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ParentNodeImpl.prototype, "lastElementChild", { - /** @inheritdoc */ - get: function () { - /** - * The lastElementChild attribute’s getter must return the last child that - * is an element, and null otherwise. - */ - var node = util_1.Cast.asNode(this)._lastChild; - while (node) { - if (util_1.Guard.isElementNode(node)) - return node; - else - node = node._previousSibling; - } - return null; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ParentNodeImpl.prototype, "childElementCount", { - /** @inheritdoc */ - get: function () { - var e_1, _a; - /** - * The childElementCount attribute’s getter must return the number of - * children of context object that are elements. - */ - var count = 0; - try { - for (var _b = __values(util_1.Cast.asNode(this)._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - if (util_1.Guard.isElementNode(childNode)) - count++; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - return count; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - ParentNodeImpl.prototype.prepend = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - /** - * 1. Let node be the result of converting nodes into a node given nodes - * and context object’s node document. - * 2. Pre-insert node into context object before the context object’s first - * child. - */ - var node = util_1.Cast.asNode(this); - var childNode = algorithm_1.parentNode_convertNodesIntoANode(nodes, node._nodeDocument); - algorithm_1.mutation_preInsert(childNode, node, node._firstChild); - }; - /** @inheritdoc */ - ParentNodeImpl.prototype.append = function () { - var nodes = []; - for (var _i = 0; _i < arguments.length; _i++) { - nodes[_i] = arguments[_i]; - } - /** - * 1. Let node be the result of converting nodes into a node given nodes - * and context object’s node document. - * 2. Append node to context object. - */ - var node = util_1.Cast.asNode(this); - var childNode = algorithm_1.parentNode_convertNodesIntoANode(nodes, node._nodeDocument); - algorithm_1.mutation_append(childNode, node); - }; - /** @inheritdoc */ - ParentNodeImpl.prototype.querySelector = function (selectors) { - /** - * The querySelector(selectors) method, when invoked, must return the first - * result of running scope-match a selectors string selectors against - * context object, if the result is not an empty list, and null otherwise. - */ - var node = util_1.Cast.asNode(this); - var result = algorithm_1.selectors_scopeMatchASelectorsString(selectors, node); - return (result.length === 0 ? null : result[0]); - }; - /** @inheritdoc */ - ParentNodeImpl.prototype.querySelectorAll = function (selectors) { - /** - * The querySelectorAll(selectors) method, when invoked, must return the - * static result of running scope-match a selectors string selectors against - * context object. - */ - var node = util_1.Cast.asNode(this); - var result = algorithm_1.selectors_scopeMatchASelectorsString(selectors, node); - return algorithm_1.create_nodeListStatic(node, result); - }; - return ParentNodeImpl; -}()); -exports.ParentNodeImpl = ParentNodeImpl; -//# sourceMappingURL=ParentNodeImpl.js.map -/***/ }), +FormData.prototype._generateBoundary = function () { + // This generates a 50 character boundary similar to those used by Firefox. -/***/ 99430: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // They are optimized for boyer-moore parsing. + this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); +}; -"use strict"; +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually and add it as knownLength option +FormData.prototype.getLengthSync = function () { + var knownLength = this._overheadLength + this._valueLength; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var CharacterDataImpl_1 = __nccwpck_require__(65330); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); -/** - * Represents a processing instruction node. - */ -var ProcessingInstructionImpl = /** @class */ (function (_super) { - __extends(ProcessingInstructionImpl, _super); - /** - * Initializes a new instance of `ProcessingInstruction`. - */ - function ProcessingInstructionImpl(target, data) { - var _this = _super.call(this, data) || this; - _this._target = target; - return _this; - } - Object.defineProperty(ProcessingInstructionImpl.prototype, "target", { - /** - * Gets the target of the {@link ProcessingInstruction} node. - */ - get: function () { return this._target; }, - enumerable: true, - configurable: true - }); - /** - * Creates a new `ProcessingInstruction`. - * - * @param document - owner document - * @param target - instruction target - * @param data - node contents + // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + /* + * Some async length retrievers are present + * therefore synchronous length calculation is false. + * Please use getLength(callback) to get proper length */ - ProcessingInstructionImpl._create = function (document, target, data) { - var node = new ProcessingInstructionImpl(target, data); - node._nodeDocument = document; - return node; - }; - return ProcessingInstructionImpl; -}(CharacterDataImpl_1.CharacterDataImpl)); -exports.ProcessingInstructionImpl = ProcessingInstructionImpl; -/** - * Initialize prototype properties - */ -WebIDLAlgorithm_1.idl_defineConst(ProcessingInstructionImpl.prototype, "_nodeType", interfaces_1.NodeType.ProcessingInstruction); -//# sourceMappingURL=ProcessingInstructionImpl.js.map + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } -/***/ }), + return knownLength; +}; -/***/ 50166: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function () { + var hasKnownLength = true; -"use strict"; + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + return hasKnownLength; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DOMImpl_1 = __nccwpck_require__(14177); -var interfaces_1 = __nccwpck_require__(27305); -var AbstractRangeImpl_1 = __nccwpck_require__(57126); -var DOMException_1 = __nccwpck_require__(13166); -var algorithm_1 = __nccwpck_require__(61); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); -var util_1 = __nccwpck_require__(65282); -/** - * Represents a live range. - */ -var RangeImpl = /** @class */ (function (_super) { - __extends(RangeImpl, _super); - /** - * Initializes a new instance of `Range`. - */ - function RangeImpl() { - var _this = _super.call(this) || this; - /** - * The Range() constructor, when invoked, must return a new live range with - * (current global object’s associated Document, 0) as its start and end. - */ - var doc = DOMImpl_1.dom.window._associatedDocument; - _this._start = [doc, 0]; - _this._end = [doc, 0]; - DOMImpl_1.dom.rangeList.add(_this); - return _this; - } - Object.defineProperty(RangeImpl.prototype, "commonAncestorContainer", { - /** @inheritdoc */ - get: function () { - /** - * 1. Let container be start node. - * 2. While container is not an inclusive ancestor of end node, let - * container be container’s parent. - * 3. Return container. - */ - var container = this._start[0]; - while (!algorithm_1.tree_isAncestorOf(this._end[0], container, true)) { - if (container._parent === null) { - throw new Error("Parent node is null."); - } - container = container._parent; - } - return container; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - RangeImpl.prototype.setStart = function (node, offset) { - /** - * The setStart(node, offset) method, when invoked, must set the start of - * context object to boundary point (node, offset). - */ - algorithm_1.range_setTheStart(this, node, offset); - }; - /** @inheritdoc */ - RangeImpl.prototype.setEnd = function (node, offset) { - /** - * The setEnd(node, offset) method, when invoked, must set the end of - * context object to boundary point (node, offset). - */ - algorithm_1.range_setTheEnd(this, node, offset); - }; - /** @inheritdoc */ - RangeImpl.prototype.setStartBefore = function (node) { - /** - * 1. Let parent be node’s parent. - * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. - * 3. Set the start of the context object to boundary point - * (parent, node’s index). - */ - var parent = node._parent; - if (parent === null) - throw new DOMException_1.InvalidNodeTypeError(); - algorithm_1.range_setTheStart(this, parent, algorithm_1.tree_index(node)); - }; - /** @inheritdoc */ - RangeImpl.prototype.setStartAfter = function (node) { - /** - * 1. Let parent be node’s parent. - * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. - * 3. Set the start of the context object to boundary point - * (parent, node’s index plus 1). - */ - var parent = node._parent; - if (parent === null) - throw new DOMException_1.InvalidNodeTypeError(); - algorithm_1.range_setTheStart(this, parent, algorithm_1.tree_index(node) + 1); - }; - /** @inheritdoc */ - RangeImpl.prototype.setEndBefore = function (node) { - /** - * 1. Let parent be node’s parent. - * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. - * 3. Set the end of the context object to boundary point - * (parent, node’s index). - */ - var parent = node._parent; - if (parent === null) - throw new DOMException_1.InvalidNodeTypeError(); - algorithm_1.range_setTheEnd(this, parent, algorithm_1.tree_index(node)); - }; - /** @inheritdoc */ - RangeImpl.prototype.setEndAfter = function (node) { - /** - * 1. Let parent be node’s parent. - * 2. If parent is null, then throw an "InvalidNodeTypeError" DOMException. - * 3. Set the end of the context object to boundary point - * (parent, node’s index plus 1). - */ - var parent = node._parent; - if (parent === null) - throw new DOMException_1.InvalidNodeTypeError(); - algorithm_1.range_setTheEnd(this, parent, algorithm_1.tree_index(node) + 1); - }; - /** @inheritdoc */ - RangeImpl.prototype.collapse = function (toStart) { - /** - * The collapse(toStart) method, when invoked, must if toStart is true, - * set end to start, and set start to end otherwise. - */ - if (toStart) { - this._end = this._start; - } - else { - this._start = this._end; - } - }; - /** @inheritdoc */ - RangeImpl.prototype.selectNode = function (node) { - /** - * The selectNode(node) method, when invoked, must select node within - * context object. - */ - algorithm_1.range_select(node, this); - }; - /** @inheritdoc */ - RangeImpl.prototype.selectNodeContents = function (node) { - /** - * 1. If node is a doctype, throw an "InvalidNodeTypeError" DOMException. - * 2. Let length be the length of node. - * 3. Set start to the boundary point (node, 0). - * 4. Set end to the boundary point (node, length). - */ - if (util_1.Guard.isDocumentTypeNode(node)) - throw new DOMException_1.InvalidNodeTypeError(); - var length = algorithm_1.tree_nodeLength(node); - this._start = [node, 0]; - this._end = [node, length]; - }; - /** @inheritdoc */ - RangeImpl.prototype.compareBoundaryPoints = function (how, sourceRange) { - /** - * 1. If how is not one of - * - START_TO_START, - * - START_TO_END, - * - END_TO_END, and - * - END_TO_START, - * then throw a "NotSupportedError" DOMException. - */ - if (how !== interfaces_1.HowToCompare.StartToStart && how !== interfaces_1.HowToCompare.StartToEnd && - how !== interfaces_1.HowToCompare.EndToEnd && how !== interfaces_1.HowToCompare.EndToStart) - throw new DOMException_1.NotSupportedError(); - /** - * 2. If context object’s root is not the same as sourceRange’s root, - * then throw a "WrongDocumentError" DOMException. - */ - if (algorithm_1.range_root(this) !== algorithm_1.range_root(sourceRange)) - throw new DOMException_1.WrongDocumentError(); - /** - * 3. If how is: - * - START_TO_START: - * Let this point be the context object’s start. Let other point be - * sourceRange’s start. - * - START_TO_END: - * Let this point be the context object’s end. Let other point be - * sourceRange’s start. - * - END_TO_END: - * Let this point be the context object’s end. Let other point be - * sourceRange’s end. - * - END_TO_START: - * Let this point be the context object’s start. Let other point be - * sourceRange’s end. - */ - var thisPoint; - var otherPoint; - switch (how) { - case interfaces_1.HowToCompare.StartToStart: - thisPoint = this._start; - otherPoint = sourceRange._start; - break; - case interfaces_1.HowToCompare.StartToEnd: - thisPoint = this._end; - otherPoint = sourceRange._start; - break; - case interfaces_1.HowToCompare.EndToEnd: - thisPoint = this._end; - otherPoint = sourceRange._end; - break; - case interfaces_1.HowToCompare.EndToStart: - thisPoint = this._start; - otherPoint = sourceRange._end; - break; - /* istanbul ignore next */ - default: - throw new DOMException_1.NotSupportedError(); - } - /** - * 4. If the position of this point relative to other point is - * - before - * Return −1. - * - equal - * Return 0. - * - after - * Return 1. - */ - var position = algorithm_1.boundaryPoint_position(thisPoint, otherPoint); - if (position === interfaces_1.BoundaryPosition.Before) { - return -1; - } - else if (position === interfaces_1.BoundaryPosition.After) { - return 1; - } - else { - return 0; - } - }; - /** @inheritdoc */ - RangeImpl.prototype.deleteContents = function () { - var e_1, _a, e_2, _b; - /** - * 1. If the context object is collapsed, then return. - * 2. Let original start node, original start offset, original end node, - * and original end offset be the context object’s start node, - * start offset, end node, and end offset, respectively. - */ - if (algorithm_1.range_collapsed(this)) - return; - var originalStartNode = this._startNode; - var originalStartOffset = this._startOffset; - var originalEndNode = this._endNode; - var originalEndOffset = this._endOffset; - /** - * 3. If original start node and original end node are the same, and they - * are a Text, ProcessingInstruction, or Comment node, replace data with - * node original start node, offset original start offset, count original - * end offset minus original start offset, and data the empty string, - * and then return. - */ - if (originalStartNode === originalEndNode && - util_1.Guard.isCharacterDataNode(originalStartNode)) { - algorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, originalEndOffset - originalStartOffset, ''); - return; - } - /** - * 4. Let nodes to remove be a list of all the nodes that are contained in - * the context object, in tree order, omitting any node whose parent is also - * contained in the context object. - */ - var nodesToRemove = []; - try { - for (var _c = __values(algorithm_1.range_getContainedNodes(this)), _d = _c.next(); !_d.done; _d = _c.next()) { - var node = _d.value; - var parent = node._parent; - if (parent !== null && algorithm_1.range_isContained(parent, this)) { - continue; - } - nodesToRemove.push(node); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); - } - finally { if (e_1) throw e_1.error; } - } - var newNode; - var newOffset; - if (algorithm_1.tree_isAncestorOf(originalEndNode, originalStartNode, true)) { - /** - * 5. If original start node is an inclusive ancestor of original end - * node, set new node to original start node and new offset to original - * start offset. - */ - newNode = originalStartNode; - newOffset = originalStartOffset; - } - else { - /** - * 6. Otherwise: - * 6.1. Let reference node equal original start node. - * 6.2. While reference node’s parent is not null and is not an inclusive - * ancestor of original end node, set reference node to its parent. - * 6.3. Set new node to the parent of reference node, and new offset to - * one plus the index of reference node. - */ - var referenceNode = originalStartNode; - while (referenceNode._parent !== null && - !algorithm_1.tree_isAncestorOf(originalEndNode, referenceNode._parent, true)) { - referenceNode = referenceNode._parent; - } - /* istanbul ignore next */ - if (referenceNode._parent === null) { - throw new Error("Parent node is null."); - } - newNode = referenceNode._parent; - newOffset = algorithm_1.tree_index(referenceNode) + 1; - } - /** - * 7. If original start node is a Text, ProcessingInstruction, or Comment - * node, replace data with node original start node, offset original start - * offset, count original start node’s length minus original start offset, - * data the empty string. - */ - if (util_1.Guard.isCharacterDataNode(originalStartNode)) { - algorithm_1.characterData_replaceData(originalStartNode, originalStartOffset, algorithm_1.tree_nodeLength(originalStartNode) - originalStartOffset, ''); - } - try { - /** - * 8. For each node in nodes to remove, in tree order, remove node from its - * parent. - */ - for (var nodesToRemove_1 = __values(nodesToRemove), nodesToRemove_1_1 = nodesToRemove_1.next(); !nodesToRemove_1_1.done; nodesToRemove_1_1 = nodesToRemove_1.next()) { - var node = nodesToRemove_1_1.value; - /* istanbul ignore else */ - if (node._parent) { - algorithm_1.mutation_remove(node, node._parent); - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (nodesToRemove_1_1 && !nodesToRemove_1_1.done && (_b = nodesToRemove_1.return)) _b.call(nodesToRemove_1); - } - finally { if (e_2) throw e_2.error; } - } - /** - * 9. If original end node is a Text, ProcessingInstruction, or Comment - * node, replace data with node original end node, offset 0, count original - * end offset and data the empty string. - */ - if (util_1.Guard.isCharacterDataNode(originalEndNode)) { - algorithm_1.characterData_replaceData(originalEndNode, 0, originalEndOffset, ''); - } - /** - * 10. Set start and end to (new node, new offset). - */ - this._start = [newNode, newOffset]; - this._end = [newNode, newOffset]; - }; - /** @inheritdoc */ - RangeImpl.prototype.extractContents = function () { - /** - * The extractContents() method, when invoked, must return the result of - * extracting the context object. - */ - return algorithm_1.range_extract(this); - }; - /** @inheritdoc */ - RangeImpl.prototype.cloneContents = function () { - /** - * The cloneContents() method, when invoked, must return the result of - * cloning the contents of the context object. - */ - return algorithm_1.range_cloneTheContents(this); - }; - /** @inheritdoc */ - RangeImpl.prototype.insertNode = function (node) { - /** - * The insertNode(node) method, when invoked, must insert node into the - * context object. - */ - return algorithm_1.range_insert(node, this); - }; - /** @inheritdoc */ - RangeImpl.prototype.surroundContents = function (newParent) { - var e_3, _a; - try { - /** - * 1. If a non-Text node is partially contained in the context object, then - * throw an "InvalidStateError" DOMException. - */ - for (var _b = __values(algorithm_1.range_getPartiallyContainedNodes(this)), _c = _b.next(); !_c.done; _c = _b.next()) { - var node = _c.value; - if (!util_1.Guard.isTextNode(node)) { - throw new DOMException_1.InvalidStateError(); - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_3) throw e_3.error; } - } - /** - * 2. If newParent is a Document, DocumentType, or DocumentFragment node, - * then throw an "InvalidNodeTypeError" DOMException. - */ - if (util_1.Guard.isDocumentNode(newParent) || - util_1.Guard.isDocumentTypeNode(newParent) || - util_1.Guard.isDocumentFragmentNode(newParent)) { - throw new DOMException_1.InvalidNodeTypeError(); - } - /** - * 3. Let fragment be the result of extracting the context object. - */ - var fragment = algorithm_1.range_extract(this); - /** - * 4. If newParent has children, then replace all with null within newParent. - */ - if ((newParent)._children.size !== 0) { - algorithm_1.mutation_replaceAll(null, newParent); - } - /** - * 5. Insert newParent into the context object. - * 6. Append fragment to newParent. - */ - algorithm_1.range_insert(newParent, this); - algorithm_1.mutation_append(fragment, newParent); - /** - * 7. Select newParent within the context object. - */ - algorithm_1.range_select(newParent, this); - }; - /** @inheritdoc */ - RangeImpl.prototype.cloneRange = function () { - /** - * The cloneRange() method, when invoked, must return a new live range with - * the same start and end as the context object. - */ - return algorithm_1.create_range(this._start, this._end); - }; - /** @inheritdoc */ - RangeImpl.prototype.detach = function () { - /** - * The detach() method, when invoked, must do nothing. - * - * since JS lacks weak references, we still use detach - */ - DOMImpl_1.dom.rangeList.delete(this); - }; - /** @inheritdoc */ - RangeImpl.prototype.isPointInRange = function (node, offset) { - /** - * 1. If node’s root is different from the context object’s root, return false. - */ - if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) { - return false; - } - /** - * 2. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. - * 3. If offset is greater than node’s length, then throw an - * "IndexSizeError" DOMException. - */ - if (util_1.Guard.isDocumentTypeNode(node)) - throw new DOMException_1.InvalidNodeTypeError(); - if (offset > algorithm_1.tree_nodeLength(node)) - throw new DOMException_1.IndexSizeError(); - /** - * 4. If (node, offset) is before start or after end, return false. - */ - var bp = [node, offset]; - if (algorithm_1.boundaryPoint_position(bp, this._start) === interfaces_1.BoundaryPosition.Before || - algorithm_1.boundaryPoint_position(bp, this._end) === interfaces_1.BoundaryPosition.After) { - return false; - } - /** - * 5. Return true. - */ - return true; - }; - /** @inheritdoc */ - RangeImpl.prototype.comparePoint = function (node, offset) { - /** - * 1. If node’s root is different from the context object’s root, then throw - * a "WrongDocumentError" DOMException. - * 2. If node is a doctype, then throw an "InvalidNodeTypeError" DOMException. - * 3. If offset is greater than node’s length, then throw an - * "IndexSizeError" DOMException. - */ - if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) - throw new DOMException_1.WrongDocumentError(); - if (util_1.Guard.isDocumentTypeNode(node)) - throw new DOMException_1.InvalidNodeTypeError(); - if (offset > algorithm_1.tree_nodeLength(node)) - throw new DOMException_1.IndexSizeError(); - /** - * 4. If (node, offset) is before start, return −1. - * 5. If (node, offset) is after end, return 1. - * 6. Return 0. - */ - var bp = [node, offset]; - if (algorithm_1.boundaryPoint_position(bp, this._start) === interfaces_1.BoundaryPosition.Before) { - return -1; - } - else if (algorithm_1.boundaryPoint_position(bp, this._end) === interfaces_1.BoundaryPosition.After) { - return 1; - } - else { - return 0; - } - }; - /** @inheritdoc */ - RangeImpl.prototype.intersectsNode = function (node) { - /** - * 1. If node’s root is different from the context object’s root, return false. - */ - if (algorithm_1.tree_rootNode(node) !== algorithm_1.range_root(this)) { - return false; - } - /** - * 2. Let parent be node’s parent. - * 3. If parent is null, return true. - */ - var parent = node._parent; - if (parent === null) - return true; - /** - * 4. Let offset be node’s index. - */ - var offset = algorithm_1.tree_index(node); - /** - * 5. If (parent, offset) is before end and (parent, offset plus 1) is - * after start, return true. - */ - if (algorithm_1.boundaryPoint_position([parent, offset], this._end) === interfaces_1.BoundaryPosition.Before && - algorithm_1.boundaryPoint_position([parent, offset + 1], this._start) === interfaces_1.BoundaryPosition.After) { - return true; - } - /** - * 6. Return false. - */ - return false; - }; - RangeImpl.prototype.toString = function () { - var e_4, _a; - /** - * 1. Let s be the empty string. - */ - var s = ''; - /** - * 2. If the context object’s start node is the context object’s end node - * and it is a Text node, then return the substring of that Text node’s data - * beginning at the context object’s start offset and ending at the context - * object’s end offset. - */ - if (this._startNode === this._endNode && util_1.Guard.isTextNode(this._startNode)) { - return this._startNode._data.substring(this._startOffset, this._endOffset); - } - /** - * 3. If the context object’s start node is a Text node, then append the - * substring of that node’s data from the context object’s start offset - * until the end to s. - */ - if (util_1.Guard.isTextNode(this._startNode)) { - s += this._startNode._data.substring(this._startOffset); - } - try { - /** - * 4. Append the concatenation of the data of all Text nodes that are - * contained in the context object, in tree order, to s. - */ - for (var _b = __values(algorithm_1.range_getContainedNodes(this)), _c = _b.next(); !_c.done; _c = _b.next()) { - var child = _c.value; - if (util_1.Guard.isTextNode(child)) { - s += child._data; - } - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_4) throw e_4.error; } - } - /** - * 5. If the context object’s end node is a Text node, then append the - * substring of that node’s data from its start until the context object’s - * end offset to s. - */ - if (util_1.Guard.isTextNode(this._endNode)) { - s += this._endNode._data.substring(0, this._endOffset); - } - /** - * 6. Return s. - */ - return s; - }; - /** - * Creates a new `Range`. - * - * @param start - start point - * @param end - end point - */ - RangeImpl._create = function (start, end) { - var range = new RangeImpl(); - if (start) - range._start = start; - if (end) - range._end = end; - return range; - }; - RangeImpl.START_TO_START = 0; - RangeImpl.START_TO_END = 1; - RangeImpl.END_TO_END = 2; - RangeImpl.END_TO_START = 3; - return RangeImpl; -}(AbstractRangeImpl_1.AbstractRangeImpl)); -exports.RangeImpl = RangeImpl; -/** - * Define constants on prototype. - */ -WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "START_TO_START", 0); -WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "START_TO_END", 1); -WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "END_TO_END", 2); -WebIDLAlgorithm_1.idl_defineConst(RangeImpl.prototype, "END_TO_START", 3); -//# sourceMappingURL=RangeImpl.js.map -/***/ }), +FormData.prototype.getLength = function (cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { + if (err) { + cb(err); + return; + } -/***/ 61911: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + values.forEach(function (length) { + knownLength += length; + }); -"use strict"; + cb(null, knownLength); + }); +}; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DocumentFragmentImpl_1 = __nccwpck_require__(12585); -var util_1 = __nccwpck_require__(76195); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents a shadow root. - */ -var ShadowRootImpl = /** @class */ (function (_super) { - __extends(ShadowRootImpl, _super); - /** - * Initializes a new instance of `ShadowRoot`. - * - * @param host - shadow root's host element - * @param mode - shadow root's mode - */ - function ShadowRootImpl(host, mode) { - var _this = _super.call(this) || this; - _this._host = host; - _this._mode = mode; - return _this; +FormData.prototype.submit = function (params, cb) { + var request; + var options; + var defaults = { method: 'post' }; + + // parse provided url if it's string or treat it as options object + if (typeof params === 'string') { + params = parseUrl(params); // eslint-disable-line no-param-reassign + /* eslint sort-keys: 0 */ + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + } else { // use custom params + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol === 'https:' ? 443 : 80; } - Object.defineProperty(ShadowRootImpl.prototype, "mode", { - /** @inheritdoc */ - get: function () { return this._mode; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ShadowRootImpl.prototype, "host", { - /** @inheritdoc */ - get: function () { return this._host; }, - enumerable: true, - configurable: true - }); - /** - * Gets the parent event target for the given event. - * - * @param event - an event - */ - ShadowRootImpl.prototype._getTheParent = function (event) { - /** - * A shadow root’s get the parent algorithm, given an event, returns null - * if event’s composed flag is unset and shadow root is the root of - * event’s path’s first struct’s invocation target, and shadow root’s host - * otherwise. - */ - if (!event._composedFlag && !util_1.isEmpty(event._path) && - algorithm_1.tree_rootNode(event._path[0].invocationTarget) === this) { - return null; - } - else { - return this._host; - } - }; - // MIXIN: DocumentOrShadowRoot - // No elements - /** - * Creates a new `ShadowRoot`. - * - * @param document - owner document - * @param host - shadow root's host element - */ - ShadowRootImpl._create = function (document, host) { - return new ShadowRootImpl(host, "closed"); - }; - return ShadowRootImpl; -}(DocumentFragmentImpl_1.DocumentFragmentImpl)); -exports.ShadowRootImpl = ShadowRootImpl; -//# sourceMappingURL=ShadowRootImpl.js.map + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol === 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function (err, length) { + if (err && err !== 'Unknown stream') { + this._error(err); + return; + } + + // add content length + if (length) { + request.setHeader('Content-Length', length); + } + + this.pipe(request); + if (cb) { + var onResponse; + + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); + + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function (err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; +setToStringTag(FormData.prototype, 'FormData'); + +// Public API +module.exports = FormData; + /***/ }), -/***/ 21964: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 47027: +/***/ ((module) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents a mixin that allows nodes to become the contents of - * a element. This mixin is implemented by {@link Element} and - * {@link Text}. - */ -var SlotableImpl = /** @class */ (function () { - function SlotableImpl() { - } - Object.defineProperty(SlotableImpl.prototype, "_name", { - get: function () { return this.__name || ''; }, - set: function (val) { this.__name = val; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(SlotableImpl.prototype, "_assignedSlot", { - get: function () { return this.__assignedSlot || null; }, - set: function (val) { this.__assignedSlot = val; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(SlotableImpl.prototype, "assignedSlot", { - /** @inheritdoc */ - get: function () { - return algorithm_1.shadowTree_findASlot(this, true); - }, - enumerable: true, - configurable: true - }); - return SlotableImpl; -}()); -exports.SlotableImpl = SlotableImpl; -//# sourceMappingURL=SlotableImpl.js.map + +// populates missing values +module.exports = function (dst, src) { + Object.keys(src).forEach(function (prop) { + dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign + }); + + return dst; +}; + /***/ }), -/***/ 86357: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 9417: +/***/ ((module) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var AbstractRangeImpl_1 = __nccwpck_require__(57126); -var DOMException_1 = __nccwpck_require__(13166); -var util_1 = __nccwpck_require__(65282); -/** - * Represents a static range. - */ -var StaticRangeImpl = /** @class */ (function (_super) { - __extends(StaticRangeImpl, _super); - /** - * Initializes a new instance of `StaticRange`. - */ - function StaticRangeImpl(init) { - var _this = _super.call(this) || this; - /** - * 1. If init’s startContainer or endContainer is a DocumentType or Attr - * node, then throw an "InvalidNodeTypeError" DOMException. - * 2. Let staticRange be a new StaticRange object. - * 3. Set staticRange’s start to (init’s startContainer, init’s startOffset) - * and end to (init’s endContainer, init’s endOffset). - * 4. Return staticRange. - */ - if (util_1.Guard.isDocumentTypeNode(init.startContainer) || util_1.Guard.isAttrNode(init.startContainer) || - util_1.Guard.isDocumentTypeNode(init.endContainer) || util_1.Guard.isAttrNode(init.endContainer)) { - throw new DOMException_1.InvalidNodeTypeError(); +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; } - _this._start = [init.startContainer, init.startOffset]; - _this._end = [init.endContainer, init.endOffset]; - return _this; + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; } - return StaticRangeImpl; -}(AbstractRangeImpl_1.AbstractRangeImpl)); -exports.StaticRangeImpl = StaticRangeImpl; -//# sourceMappingURL=StaticRangeImpl.js.map + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + /***/ }), -/***/ 42191: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 26463: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + + +/***/ }), + +/***/ 83682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var register = __nccwpck_require__(44670); +var addHook = __nccwpck_require__(5549); +var removeHook = __nccwpck_require__(6819); + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind; +var bindable = bind.bind(bind); + +function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); +} + +function HookSingular() { + var singularHookName = "h"; + var singularHookState = { + registry: {}, + }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; +} + +function HookCollection() { + var state = { + registry: {}, + }; + + var hook = register.bind(null, state); + bindApi(hook, state); + + return hook; +} + +var collectionHookDeprecationMessageDisplayed = false; +function Hook() { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; + } + return HookCollection(); +} + +Hook.Singular = HookSingular.bind(); +Hook.Collection = HookCollection.bind(); + +module.exports = Hook; +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook; +module.exports.Singular = Hook.Singular; +module.exports.Collection = Hook.Collection; + + +/***/ }), + +/***/ 5549: +/***/ ((module) => { + +module.exports = addHook; + +function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; + } + + if (kind === "before") { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)); }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var CharacterDataImpl_1 = __nccwpck_require__(65330); -var algorithm_1 = __nccwpck_require__(61); -var WebIDLAlgorithm_1 = __nccwpck_require__(45457); -/** - * Represents a text node. - */ -var TextImpl = /** @class */ (function (_super) { - __extends(TextImpl, _super); - /** - * Initializes a new instance of `Text`. - * - * @param data - the text content - */ - function TextImpl(data) { - if (data === void 0) { data = ''; } - var _this = _super.call(this, data) || this; - _this._name = ''; - _this._assignedSlot = null; - return _this; - } - Object.defineProperty(TextImpl.prototype, "wholeText", { - /** @inheritdoc */ - get: function () { - var e_1, _a; - /** - * The wholeText attribute’s getter must return the concatenation of the - * data of the contiguous Text nodes of the context object, in tree order. - */ - var text = ''; - try { - for (var _b = __values(algorithm_1.text_contiguousTextNodes(this, true)), _c = _b.next(); !_c.done; _c = _b.next()) { - var node = _c.value; - text = text + node._data; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - return text; - }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - TextImpl.prototype.splitText = function (offset) { - /** - * The splitText(offset) method, when invoked, must split context object - * with offset offset. - */ - return algorithm_1.text_split(this, offset); + } + + if (kind === "after") { + hook = function (method, options) { + var result; + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_; + return orig(result, options); + }) + .then(function () { + return result; + }); }; - Object.defineProperty(TextImpl.prototype, "assignedSlot", { - // MIXIN: Slotable - /* istanbul ignore next */ - get: function () { throw new Error("Mixin: Slotable not implemented."); }, - enumerable: true, - configurable: true - }); - /** - * Creates a `Text`. - * - * @param document - owner document - * @param data - the text content - */ - TextImpl._create = function (document, data) { - if (data === void 0) { data = ''; } - var node = new TextImpl(data); - node._nodeDocument = document; - return node; + } + + if (kind === "error") { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options); + }); }; - return TextImpl; -}(CharacterDataImpl_1.CharacterDataImpl)); -exports.TextImpl = TextImpl; -/** - * Initialize prototype properties - */ -WebIDLAlgorithm_1.idl_defineConst(TextImpl.prototype, "_nodeType", interfaces_1.NodeType.Text); -//# sourceMappingURL=TextImpl.js.map + } + + state.registry[name].push({ + hook: hook, + orig: orig, + }); +} + /***/ }), -/***/ 39782: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 44670: +/***/ ((module) => { -"use strict"; +module.exports = register; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -/** - * Represents an object which can be used to iterate through the nodes - * of a subtree. - */ -var TraverserImpl = /** @class */ (function () { - /** - * Initializes a new instance of `Traverser`. - * - * @param root - root node - */ - function TraverserImpl(root) { - this._activeFlag = false; - this._root = root; - this._whatToShow = interfaces_1.WhatToShow.All; - this._filter = null; +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } + + if (!options) { + options = {}; + } + + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); + } + + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); } - Object.defineProperty(TraverserImpl.prototype, "root", { - /** @inheritdoc */ - get: function () { return this._root; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TraverserImpl.prototype, "whatToShow", { - /** @inheritdoc */ - get: function () { return this._whatToShow; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(TraverserImpl.prototype, "filter", { - /** @inheritdoc */ - get: function () { return this._filter; }, - enumerable: true, - configurable: true - }); - return TraverserImpl; -}()); -exports.TraverserImpl = TraverserImpl; -//# sourceMappingURL=TraverserImpl.js.map + + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} + /***/ }), -/***/ 89261: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 6819: +/***/ ((module) => { -"use strict"; +module.exports = removeHook; + +function removeHook(state, name, method) { + if (!state.registry[name]) { + return; + } + + var index = state.registry[name] + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); + + if (index === -1) { + return; + } + + state.registry[name].splice(index, 1); +} -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var TraverserImpl_1 = __nccwpck_require__(39782); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents the nodes of a subtree and a position within them. - */ -var TreeWalkerImpl = /** @class */ (function (_super) { - __extends(TreeWalkerImpl, _super); - /** - * Initializes a new instance of `TreeWalker`. - */ - function TreeWalkerImpl(root, current) { - var _this = _super.call(this, root) || this; - _this._current = current; - return _this; - } - Object.defineProperty(TreeWalkerImpl.prototype, "currentNode", { - /** @inheritdoc */ - get: function () { return this._current; }, - set: function (value) { this._current = value; }, - enumerable: true, - configurable: true - }); - /** @inheritdoc */ - TreeWalkerImpl.prototype.parentNode = function () { - /** - * 1. Let node be the context object’s current. - * 2. While node is non-null and is not the context object’s root: - */ - var node = this._current; - while (node !== null && node !== this._root) { - /** - * 2.1. Set node to node’s parent. - * 2.2. If node is non-null and filtering node within the context object - * returns FILTER_ACCEPT, then set the context object’s current to node - * and return node. - */ - node = node._parent; - if (node !== null && - algorithm_1.traversal_filter(this, node) === interfaces_1.FilterResult.Accept) { - this._current = node; - return node; - } - } - /** - * 3. Return null. - */ - return null; - }; - /** @inheritdoc */ - TreeWalkerImpl.prototype.firstChild = function () { - /** - * The firstChild() method, when invoked, must traverse children with the - * context object and first. - */ - return algorithm_1.treeWalker_traverseChildren(this, true); - }; - /** @inheritdoc */ - TreeWalkerImpl.prototype.lastChild = function () { - /** - * The lastChild() method, when invoked, must traverse children with the - * context object and last. - */ - return algorithm_1.treeWalker_traverseChildren(this, false); - }; - /** @inheritdoc */ - TreeWalkerImpl.prototype.nextSibling = function () { - /** - * The nextSibling() method, when invoked, must traverse siblings with the - * context object and next. - */ - return algorithm_1.treeWalker_traverseSiblings(this, true); - }; - /** @inheritdoc */ - TreeWalkerImpl.prototype.previousNode = function () { - /** - * 1. Let node be the context object’s current. - * 2. While node is not the context object’s root: - */ - var node = this._current; - while (node !== this._root) { - /** - * 2.1. Let sibling be node’s previous sibling. - * 2.2. While sibling is non-null: - */ - var sibling = node._previousSibling; - while (sibling) { - /** - * 2.2.1. Set node to sibling. - * 2.2.2. Let result be the result of filtering node within the context - * object. - */ - node = sibling; - var result = algorithm_1.traversal_filter(this, node); - /** - * 2.2.3. While result is not FILTER_REJECT and node has a child: - */ - while (result !== interfaces_1.FilterResult.Reject && node._lastChild) { - /** - * 2.2.3.1. Set node to node’s last child. - * 2.2.3.2. Set result to the result of filtering node within the - * context object. - */ - node = node._lastChild; - result = algorithm_1.traversal_filter(this, node); - } - /** - * 2.2.4. If result is FILTER_ACCEPT, then set the context object’s - * current to node and return node. - */ - if (result === interfaces_1.FilterResult.Accept) { - this._current = node; - return node; - } - /** - * 2.2.5. Set sibling to node’s previous sibling. - */ - sibling = node._previousSibling; - } - /** - * 2.3. If node is the context object’s root or node’s parent is null, - * then return null. - */ - if (node === this._root || node._parent === null) { - return null; - } - /** - * 2.4. Set node to node’s parent. - */ - node = node._parent; - /** - * 2.5. If the return value of filtering node within the context object is - * FILTER_ACCEPT, then set the context object’s current to node and - * return node. - */ - if (algorithm_1.traversal_filter(this, node) === interfaces_1.FilterResult.Accept) { - this._current = node; - return node; - } - } - /** - * 3. Return null. - */ - return null; - }; - /** @inheritdoc */ - TreeWalkerImpl.prototype.previousSibling = function () { - /** - * The previousSibling() method, when invoked, must traverse siblings with - * the context object and previous. - */ - return algorithm_1.treeWalker_traverseSiblings(this, false); - }; - /** @inheritdoc */ - TreeWalkerImpl.prototype.nextNode = function () { - /** - * 1. Let node be the context object’s current. - * 2. Let result be FILTER_ACCEPT. - * 3. While true: - */ - var node = this._current; - var result = interfaces_1.FilterResult.Accept; - while (true) { - /** - * 3.1. While result is not FILTER_REJECT and node has a child: - */ - while (result !== interfaces_1.FilterResult.Reject && node._firstChild) { - /** - * 3.1.1. Set node to its first child. - * 3.1.2. Set result to the result of filtering node within the context - * object. - * 3.1.3. If result is FILTER_ACCEPT, then set the context object’s - * current to node and return node. - */ - node = node._firstChild; - result = algorithm_1.traversal_filter(this, node); - if (result === interfaces_1.FilterResult.Accept) { - this._current = node; - return node; - } - } - /** - * 3.2. Let sibling be null. - * 3.3. Let temporary be node. - * 3.4. While temporary is non-null: - */ - var sibling = null; - var temporary = node; - while (temporary !== null) { - /** - * 3.4.1. If temporary is the context object’s root, then return null. - */ - if (temporary === this._root) { - return null; - } - /** - * 3.4.2. Set sibling to temporary’s next sibling. - * 3.4.3. If sibling is non-null, then break. - */ - sibling = temporary._nextSibling; - if (sibling !== null) { - node = sibling; - break; - } - /** - * 3.4.4. Set temporary to temporary’s parent. - */ - temporary = temporary._parent; - } - /** - * 3.5. Set result to the result of filtering node within the context object. - * 3.6. If result is FILTER_ACCEPT, then set the context object’s current - * to node and return node. - */ - result = algorithm_1.traversal_filter(this, node); - if (result === interfaces_1.FilterResult.Accept) { - this._current = node; - return node; - } - } - }; - /** - * Creates a new `TreeWalker`. - * - * @param root - iterator's root node - * @param current - current node - */ - TreeWalkerImpl._create = function (root, current) { - return new TreeWalkerImpl(root, current); - }; - return TreeWalkerImpl; -}(TraverserImpl_1.TraverserImpl)); -exports.TreeWalkerImpl = TreeWalkerImpl; -//# sourceMappingURL=TreeWalkerImpl.js.map /***/ }), -/***/ 69067: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 87558: +/***/ (function(module) { -"use strict"; +;(function (globalObject) { + 'use strict'; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var EventTargetImpl_1 = __nccwpck_require__(69968); -var util_1 = __nccwpck_require__(76195); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents a window containing a DOM document. +/* + * bignumber.js v9.3.1 + * A JavaScript library for arbitrary-precision arithmetic. + * https://github.com/MikeMcl/bignumber.js + * Copyright (c) 2025 Michael Mclaughlin + * MIT Licensed. + * + * BigNumber.prototype methods | BigNumber methods + * | + * absoluteValue abs | clone + * comparedTo | config set + * decimalPlaces dp | DECIMAL_PLACES + * dividedBy div | ROUNDING_MODE + * dividedToIntegerBy idiv | EXPONENTIAL_AT + * exponentiatedBy pow | RANGE + * integerValue | CRYPTO + * isEqualTo eq | MODULO_MODE + * isFinite | POW_PRECISION + * isGreaterThan gt | FORMAT + * isGreaterThanOrEqualTo gte | ALPHABET + * isInteger | isBigNumber + * isLessThan lt | maximum max + * isLessThanOrEqualTo lte | minimum min + * isNaN | random + * isNegative | sum + * isPositive | + * isZero | + * minus | + * modulo mod | + * multipliedBy times | + * negated | + * plus | + * precision sd | + * shiftedBy | + * squareRoot sqrt | + * toExponential | + * toFixed | + * toFormat | + * toFraction | + * toJSON | + * toNumber | + * toPrecision | + * toString | + * valueOf | + * */ -var WindowImpl = /** @class */ (function (_super) { - __extends(WindowImpl, _super); - /** - * Initializes a new instance of `Window`. - */ - function WindowImpl() { - var _this = _super.call(this) || this; - _this._signalSlots = new Set(); - _this._mutationObserverMicrotaskQueued = false; - _this._mutationObservers = new Set(); - _this._iteratorList = new util_1.FixedSizeSet(); - _this._associatedDocument = algorithm_1.create_document(); - return _this; - } - Object.defineProperty(WindowImpl.prototype, "document", { - /** @inheritdoc */ - get: function () { return this._associatedDocument; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(WindowImpl.prototype, "event", { - /** @inheritdoc */ - get: function () { return this._currentEvent; }, - enumerable: true, - configurable: true - }); - /** - * Creates a new window with a blank document. - */ - WindowImpl._create = function () { - return new WindowImpl(); - }; - return WindowImpl; -}(EventTargetImpl_1.EventTargetImpl)); -exports.WindowImpl = WindowImpl; -//# sourceMappingURL=WindowImpl.js.map -/***/ }), -/***/ 21685: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + var BigNumber, + isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, + mathceil = Math.ceil, + mathfloor = Math.floor, -"use strict"; + bignumberError = '[BigNumber Error] ', + tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ', -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var DocumentImpl_1 = __nccwpck_require__(14333); -/** - * Represents an XML document. - */ -var XMLDocumentImpl = /** @class */ (function (_super) { - __extends(XMLDocumentImpl, _super); - /** - * Initializes a new instance of `XMLDocument`. + BASE = 1e14, + LOG_BASE = 14, + MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 + // MAX_INT32 = 0x7fffffff, // 2^31 - 1 + POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], + SQRT_BASE = 1e7, + + // EDITABLE + // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and + // the arguments to toExponential, toFixed, toFormat, and toPrecision. + MAX = 1E9; // 0 to MAX_INT32 + + + /* + * Create and return a BigNumber constructor. + */ + function clone(configObject) { + var div, convertBase, parseNumeric, + P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null }, + ONE = new BigNumber(1), + + + //----------------------------- EDITABLE CONFIG DEFAULTS ------------------------------- + + + // The default values below must be integers within the inclusive ranges stated. + // The values can also be changed at run-time using BigNumber.set. + + // The maximum number of decimal places for operations involving division. + DECIMAL_PLACES = 20, // 0 to MAX + + // The rounding mode used when rounding to the above decimal places, and when using + // toExponential, toFixed, toFormat and toPrecision, and round (default value). + // UP 0 Away from zero. + // DOWN 1 Towards zero. + // CEIL 2 Towards +Infinity. + // FLOOR 3 Towards -Infinity. + // HALF_UP 4 Towards nearest neighbour. If equidistant, up. + // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + ROUNDING_MODE = 4, // 0 to 8 + + // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] + + // The exponent value at and beneath which toString returns exponential notation. + // Number type: -7 + TO_EXP_NEG = -7, // 0 to -MAX + + // The exponent value at and above which toString returns exponential notation. + // Number type: 21 + TO_EXP_POS = 21, // 0 to MAX + + // RANGE : [MIN_EXP, MAX_EXP] + + // The minimum exponent value, beneath which underflow to zero occurs. + // Number type: -324 (5e-324) + MIN_EXP = -1e7, // -1 to -MAX + + // The maximum exponent value, above which overflow to Infinity occurs. + // Number type: 308 (1.7976931348623157e+308) + // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. + MAX_EXP = 1e7, // 1 to MAX + + // Whether to use cryptographically-secure random number generation, if available. + CRYPTO = false, // true or false + + // The modulo mode used when calculating the modulus: a mod n. + // The quotient (q = a / n) is calculated according to the corresponding rounding mode. + // The remainder (r) is calculated as: r = a - n * q. + // + // UP 0 The remainder is positive if the dividend is negative, else is negative. + // DOWN 1 The remainder has the same sign as the dividend. + // This modulo mode is commonly known as 'truncated division' and is + // equivalent to (a % n) in JavaScript. + // FLOOR 3 The remainder has the same sign as the divisor (Python %). + // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. + // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). + // The remainder is always positive. + // + // The truncated division, floored division, Euclidian division and IEEE 754 remainder + // modes are commonly used for the modulus operation. + // Although the other rounding modes can also be used, they may not give useful results. + MODULO_MODE = 1, // 0 to 9 + + // The maximum number of significant digits of the result of the exponentiatedBy operation. + // If POW_PRECISION is 0, there will be unlimited significant digits. + POW_PRECISION = 0, // 0 to MAX + + // The format specification used by the BigNumber.prototype.toFormat method. + FORMAT = { + prefix: '', + groupSize: 3, + secondaryGroupSize: 0, + groupSeparator: ',', + decimalSeparator: '.', + fractionGroupSize: 0, + fractionGroupSeparator: '\xA0', // non-breaking space + suffix: '' + }, + + // The alphabet used for base conversion. It must be at least 2 characters long, with no '+', + // '-', '.', whitespace, or repeated character. + // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_' + ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz', + alphabetHasNormalDecimalDigits = true; + + + //------------------------------------------------------------------------------------------ + + + // CONSTRUCTOR + + + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * v {number|string|BigNumber} A numeric value. + * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. */ - function XMLDocumentImpl() { - return _super.call(this) || this; - } - return XMLDocumentImpl; -}(DocumentImpl_1.DocumentImpl)); -exports.XMLDocumentImpl = XMLDocumentImpl; -//# sourceMappingURL=XMLDocumentImpl.js.map + function BigNumber(v, b) { + var alphabet, c, caseChanged, e, i, isNum, len, str, + x = this; -/***/ }), + // Enable constructor call without `new`. + if (!(x instanceof BigNumber)) return new BigNumber(v, b); -/***/ 50633: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (b == null) { -"use strict"; + if (v && v._isBigNumber === true) { + x.s = v.s; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -// Import implementation classes -var AbortControllerImpl_1 = __nccwpck_require__(66461); -exports.AbortController = AbortControllerImpl_1.AbortControllerImpl; -var AbortSignalImpl_1 = __nccwpck_require__(10022); -exports.AbortSignal = AbortSignalImpl_1.AbortSignalImpl; -var AbstractRangeImpl_1 = __nccwpck_require__(57126); -exports.AbstractRange = AbstractRangeImpl_1.AbstractRangeImpl; -var AttrImpl_1 = __nccwpck_require__(13717); -exports.Attr = AttrImpl_1.AttrImpl; -var CDATASectionImpl_1 = __nccwpck_require__(23977); -exports.CDATASection = CDATASectionImpl_1.CDATASectionImpl; -var CharacterDataImpl_1 = __nccwpck_require__(65330); -exports.CharacterData = CharacterDataImpl_1.CharacterDataImpl; -var ChildNodeImpl_1 = __nccwpck_require__(88264); -var CommentImpl_1 = __nccwpck_require__(20930); -exports.Comment = CommentImpl_1.CommentImpl; -var CustomEventImpl_1 = __nccwpck_require__(59857); -exports.CustomEvent = CustomEventImpl_1.CustomEventImpl; -var DocumentFragmentImpl_1 = __nccwpck_require__(12585); -exports.DocumentFragment = DocumentFragmentImpl_1.DocumentFragmentImpl; -var DocumentImpl_1 = __nccwpck_require__(14333); -exports.Document = DocumentImpl_1.DocumentImpl; -var DocumentOrShadowRootImpl_1 = __nccwpck_require__(65274); -var DocumentTypeImpl_1 = __nccwpck_require__(3173); -exports.DocumentType = DocumentTypeImpl_1.DocumentTypeImpl; -var DOMImpl_1 = __nccwpck_require__(14177); -exports.dom = DOMImpl_1.dom; -var DOMImplementationImpl_1 = __nccwpck_require__(42197); -exports.DOMImplementation = DOMImplementationImpl_1.DOMImplementationImpl; -var DOMTokenListImpl_1 = __nccwpck_require__(65096); -exports.DOMTokenList = DOMTokenListImpl_1.DOMTokenListImpl; -var ElementImpl_1 = __nccwpck_require__(35975); -exports.Element = ElementImpl_1.ElementImpl; -var EventImpl_1 = __nccwpck_require__(38245); -exports.Event = EventImpl_1.EventImpl; -var EventTargetImpl_1 = __nccwpck_require__(69968); -exports.EventTarget = EventTargetImpl_1.EventTargetImpl; -var HTMLCollectionImpl_1 = __nccwpck_require__(93969); -exports.HTMLCollection = HTMLCollectionImpl_1.HTMLCollectionImpl; -var MutationObserverImpl_1 = __nccwpck_require__(89616); -exports.MutationObserver = MutationObserverImpl_1.MutationObserverImpl; -var MutationRecordImpl_1 = __nccwpck_require__(6219); -exports.MutationRecord = MutationRecordImpl_1.MutationRecordImpl; -var NamedNodeMapImpl_1 = __nccwpck_require__(57206); -exports.NamedNodeMap = NamedNodeMapImpl_1.NamedNodeMapImpl; -var NodeFilterImpl_1 = __nccwpck_require__(12355); -exports.NodeFilter = NodeFilterImpl_1.NodeFilterImpl; -var NodeImpl_1 = __nccwpck_require__(91745); -exports.Node = NodeImpl_1.NodeImpl; -var NodeIteratorImpl_1 = __nccwpck_require__(61997); -exports.NodeIterator = NodeIteratorImpl_1.NodeIteratorImpl; -var NodeListImpl_1 = __nccwpck_require__(43728); -exports.NodeList = NodeListImpl_1.NodeListImpl; -var NodeListStaticImpl_1 = __nccwpck_require__(65306); -exports.NodeListStatic = NodeListStaticImpl_1.NodeListStaticImpl; -var NonDocumentTypeChildNodeImpl_1 = __nccwpck_require__(71032); -var NonElementParentNodeImpl_1 = __nccwpck_require__(90733); -var ParentNodeImpl_1 = __nccwpck_require__(85988); -var ProcessingInstructionImpl_1 = __nccwpck_require__(99430); -exports.ProcessingInstruction = ProcessingInstructionImpl_1.ProcessingInstructionImpl; -var RangeImpl_1 = __nccwpck_require__(50166); -exports.Range = RangeImpl_1.RangeImpl; -var ShadowRootImpl_1 = __nccwpck_require__(61911); -exports.ShadowRoot = ShadowRootImpl_1.ShadowRootImpl; -var SlotableImpl_1 = __nccwpck_require__(21964); -var StaticRangeImpl_1 = __nccwpck_require__(86357); -exports.StaticRange = StaticRangeImpl_1.StaticRangeImpl; -var TextImpl_1 = __nccwpck_require__(42191); -exports.Text = TextImpl_1.TextImpl; -var TraverserImpl_1 = __nccwpck_require__(39782); -exports.Traverser = TraverserImpl_1.TraverserImpl; -var TreeWalkerImpl_1 = __nccwpck_require__(89261); -exports.TreeWalker = TreeWalkerImpl_1.TreeWalkerImpl; -var WindowImpl_1 = __nccwpck_require__(69067); -exports.Window = WindowImpl_1.WindowImpl; -var XMLDocumentImpl_1 = __nccwpck_require__(21685); -exports.XMLDocument = XMLDocumentImpl_1.XMLDocumentImpl; -// Apply mixins -// ChildNode -util_1.applyMixin(ElementImpl_1.ElementImpl, ChildNodeImpl_1.ChildNodeImpl); -util_1.applyMixin(CharacterDataImpl_1.CharacterDataImpl, ChildNodeImpl_1.ChildNodeImpl); -util_1.applyMixin(DocumentTypeImpl_1.DocumentTypeImpl, ChildNodeImpl_1.ChildNodeImpl); -// DocumentOrShadowRoot -util_1.applyMixin(DocumentImpl_1.DocumentImpl, DocumentOrShadowRootImpl_1.DocumentOrShadowRootImpl); -util_1.applyMixin(ShadowRootImpl_1.ShadowRootImpl, DocumentOrShadowRootImpl_1.DocumentOrShadowRootImpl); -// NonDocumentTypeChildNode -util_1.applyMixin(ElementImpl_1.ElementImpl, NonDocumentTypeChildNodeImpl_1.NonDocumentTypeChildNodeImpl); -util_1.applyMixin(CharacterDataImpl_1.CharacterDataImpl, NonDocumentTypeChildNodeImpl_1.NonDocumentTypeChildNodeImpl); -// NonElementParentNode -util_1.applyMixin(DocumentImpl_1.DocumentImpl, NonElementParentNodeImpl_1.NonElementParentNodeImpl); -util_1.applyMixin(DocumentFragmentImpl_1.DocumentFragmentImpl, NonElementParentNodeImpl_1.NonElementParentNodeImpl); -// ParentNode -util_1.applyMixin(DocumentImpl_1.DocumentImpl, ParentNodeImpl_1.ParentNodeImpl); -util_1.applyMixin(DocumentFragmentImpl_1.DocumentFragmentImpl, ParentNodeImpl_1.ParentNodeImpl); -util_1.applyMixin(ElementImpl_1.ElementImpl, ParentNodeImpl_1.ParentNodeImpl); -// Slotable -util_1.applyMixin(TextImpl_1.TextImpl, SlotableImpl_1.SlotableImpl); -util_1.applyMixin(ElementImpl_1.ElementImpl, SlotableImpl_1.SlotableImpl); -//# sourceMappingURL=index.js.map + if (!v.c || v.e > MAX_EXP) { + x.c = x.e = null; + } else if (v.e < MIN_EXP) { + x.c = [x.e = 0]; + } else { + x.e = v.e; + x.c = v.c.slice(); + } -/***/ }), + return; + } -/***/ 27305: -/***/ ((__unused_webpack_module, exports) => { + if ((isNum = typeof v == 'number') && v * 0 == 0) { -"use strict"; + // Use `1 / n` to handle minus zero also. + x.s = 1 / v < 0 ? (v = -v, -1) : 1; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Defines the position of a boundary point relative to another. - */ -var BoundaryPosition; -(function (BoundaryPosition) { - BoundaryPosition[BoundaryPosition["Before"] = 0] = "Before"; - BoundaryPosition[BoundaryPosition["Equal"] = 1] = "Equal"; - BoundaryPosition[BoundaryPosition["After"] = 2] = "After"; -})(BoundaryPosition = exports.BoundaryPosition || (exports.BoundaryPosition = {})); -/** - * Defines the event phase. - */ -var EventPhase; -(function (EventPhase) { - EventPhase[EventPhase["None"] = 0] = "None"; - EventPhase[EventPhase["Capturing"] = 1] = "Capturing"; - EventPhase[EventPhase["AtTarget"] = 2] = "AtTarget"; - EventPhase[EventPhase["Bubbling"] = 3] = "Bubbling"; -})(EventPhase = exports.EventPhase || (exports.EventPhase = {})); -/** - * Defines the type of a node object. - */ -var NodeType; -(function (NodeType) { - NodeType[NodeType["Element"] = 1] = "Element"; - NodeType[NodeType["Attribute"] = 2] = "Attribute"; - NodeType[NodeType["Text"] = 3] = "Text"; - NodeType[NodeType["CData"] = 4] = "CData"; - NodeType[NodeType["EntityReference"] = 5] = "EntityReference"; - NodeType[NodeType["Entity"] = 6] = "Entity"; - NodeType[NodeType["ProcessingInstruction"] = 7] = "ProcessingInstruction"; - NodeType[NodeType["Comment"] = 8] = "Comment"; - NodeType[NodeType["Document"] = 9] = "Document"; - NodeType[NodeType["DocumentType"] = 10] = "DocumentType"; - NodeType[NodeType["DocumentFragment"] = 11] = "DocumentFragment"; - NodeType[NodeType["Notation"] = 12] = "Notation"; // historical -})(NodeType = exports.NodeType || (exports.NodeType = {})); -/** - * Defines the position of a node in the document relative to another - * node. - */ -var Position; -(function (Position) { - Position[Position["Disconnected"] = 1] = "Disconnected"; - Position[Position["Preceding"] = 2] = "Preceding"; - Position[Position["Following"] = 4] = "Following"; - Position[Position["Contains"] = 8] = "Contains"; - Position[Position["ContainedBy"] = 16] = "ContainedBy"; - Position[Position["ImplementationSpecific"] = 32] = "ImplementationSpecific"; -})(Position = exports.Position || (exports.Position = {})); -/** - * Defines the return value of a filter callback. - */ -var FilterResult; -(function (FilterResult) { - FilterResult[FilterResult["Accept"] = 1] = "Accept"; - FilterResult[FilterResult["Reject"] = 2] = "Reject"; - FilterResult[FilterResult["Skip"] = 3] = "Skip"; -})(FilterResult = exports.FilterResult || (exports.FilterResult = {})); -/** - * Defines what to show in node filter. - */ -var WhatToShow; -(function (WhatToShow) { - WhatToShow[WhatToShow["All"] = 4294967295] = "All"; - WhatToShow[WhatToShow["Element"] = 1] = "Element"; - WhatToShow[WhatToShow["Attribute"] = 2] = "Attribute"; - WhatToShow[WhatToShow["Text"] = 4] = "Text"; - WhatToShow[WhatToShow["CDataSection"] = 8] = "CDataSection"; - WhatToShow[WhatToShow["EntityReference"] = 16] = "EntityReference"; - WhatToShow[WhatToShow["Entity"] = 32] = "Entity"; - WhatToShow[WhatToShow["ProcessingInstruction"] = 64] = "ProcessingInstruction"; - WhatToShow[WhatToShow["Comment"] = 128] = "Comment"; - WhatToShow[WhatToShow["Document"] = 256] = "Document"; - WhatToShow[WhatToShow["DocumentType"] = 512] = "DocumentType"; - WhatToShow[WhatToShow["DocumentFragment"] = 1024] = "DocumentFragment"; - WhatToShow[WhatToShow["Notation"] = 2048] = "Notation"; -})(WhatToShow = exports.WhatToShow || (exports.WhatToShow = {})); -/** - * Defines how boundary points are compared. - */ -var HowToCompare; -(function (HowToCompare) { - HowToCompare[HowToCompare["StartToStart"] = 0] = "StartToStart"; - HowToCompare[HowToCompare["StartToEnd"] = 1] = "StartToEnd"; - HowToCompare[HowToCompare["EndToEnd"] = 2] = "EndToEnd"; - HowToCompare[HowToCompare["EndToStart"] = 3] = "EndToStart"; -})(HowToCompare = exports.HowToCompare || (exports.HowToCompare = {})); -//# sourceMappingURL=interfaces.js.map + // Fast path for integers, where n < 2147483648 (2**31). + if (v === ~~v) { + for (e = 0, i = v; i >= 10; i /= 10, e++); -/***/ }), + if (e > MAX_EXP) { + x.c = x.e = null; + } else { + x.e = e; + x.c = [v]; + } -/***/ 54646: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + return; + } -"use strict"; + str = String(v); + } else { -Object.defineProperty(exports, "__esModule", ({ value: true })); -var dom_1 = __nccwpck_require__(50633); -dom_1.dom.setFeatures(true); -var dom_2 = __nccwpck_require__(50633); -exports.DOMImplementation = dom_2.DOMImplementation; -var parser_1 = __nccwpck_require__(36216); -exports.DOMParser = parser_1.DOMParser; -var serializer_1 = __nccwpck_require__(87119); -exports.XMLSerializer = serializer_1.XMLSerializer; -//# sourceMappingURL=index.js.map + if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum); -/***/ }), + x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1; + } -/***/ 98845: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); -"use strict"; + // Exponential form? + if ((i = str.search(/e/i)) > 0) { -Object.defineProperty(exports, "__esModule", ({ value: true })); -var algorithm_1 = __nccwpck_require__(61); -var XMLParserImpl_1 = __nccwpck_require__(64126); -/** - * Represents a parser for XML and HTML content. - * - * See: https://w3c.github.io/DOM-Parsing/#the-domparser-interface - */ -var DOMParserImpl = /** @class */ (function () { - function DOMParserImpl() { - } - /** @inheritdoc */ - DOMParserImpl.prototype.parseFromString = function (source, mimeType) { - if (mimeType === "text/html") - throw new Error('HTML parser not implemented.'); - try { - var parser = new XMLParserImpl_1.XMLParserImpl(); - var doc = parser.parse(source); - doc._contentType = mimeType; - return doc; + // Determine exponent. + if (e < 0) e = i; + e += +str.slice(i + 1); + str = str.substring(0, i); + } else if (e < 0) { + + // Integer. + e = str.length; } - catch (e) { - var errorNS = "http://www.mozilla.org/newlayout/xml/parsererror.xml"; - var doc = algorithm_1.create_xmlDocument(); - var root = doc.createElementNS(errorNS, "parsererror"); - var ele = doc.createElementNS(errorNS, "error"); - ele.setAttribute("message", e.message); - root.appendChild(ele); - doc.appendChild(root); - return doc; + + } else { + + // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + intCheck(b, 2, ALPHABET.length, 'Base'); + + // Allow exponential notation to be used with base 10 argument, while + // also rounding to DECIMAL_PLACES as with other bases. + if (b == 10 && alphabetHasNormalDecimalDigits) { + x = new BigNumber(v); + return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE); } - }; - return DOMParserImpl; -}()); -exports.DOMParserImpl = DOMParserImpl; -//# sourceMappingURL=DOMParserImpl.js.map -/***/ }), + str = String(v); -/***/ 64126: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + if (isNum = typeof v == 'number') { -"use strict"; + // Avoid potential interpretation of Infinity and NaN as base 44+ values. + if (v * 0 != 0) return parseNumeric(x, str, isNum, b); -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); + x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1; + + // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' + if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) { + throw Error + (tooManyDigits + v); + } + } else { + x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1; } - finally { if (e) throw e.error; } - } - return ar; -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; + + alphabet = ALPHABET.slice(0, b); + e = i = 0; + + // Check that str is a valid base b number. + // Don't use RegExp, so alphabet can contain special characters. + for (len = str.length; i < len; i++) { + if (alphabet.indexOf(c = str.charAt(i)) < 0) { + if (c == '.') { + + // If '.' is not the first character and it has not be found before. + if (i > e) { + e = len; + continue; + } + } else if (!caseChanged) { + + // Allow e.g. hexadecimal 'FF' as well as 'ff'. + if (str == str.toUpperCase() && (str = str.toLowerCase()) || + str == str.toLowerCase() && (str = str.toUpperCase())) { + caseChanged = true; + i = -1; + e = 0; + continue; + } + } + + return parseNumeric(x, String(v), isNum, b); + } } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var XMLStringLexer_1 = __nccwpck_require__(47061); -var interfaces_1 = __nccwpck_require__(97707); -var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); -var LocalNameSet_1 = __nccwpck_require__(19049); -/** - * Represents a parser for XML content. - * - * See: https://html.spec.whatwg.org/#xml-parser - */ -var XMLParserImpl = /** @class */ (function () { - function XMLParserImpl() { + + // Prevent later check for length on converted number. + isNum = false; + str = convertBase(str, b, 10, x.s); + + // Decimal point? + if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); + else e = str.length; + } + + // Determine leading zeros. + for (i = 0; str.charCodeAt(i) === 48; i++); + + // Determine trailing zeros. + for (len = str.length; str.charCodeAt(--len) === 48;); + + if (str = str.slice(i, ++len)) { + len -= i; + + // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' + if (isNum && BigNumber.DEBUG && + len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) { + throw Error + (tooManyDigits + (x.s * v)); + } + + // Overflow? + if ((e = e - i - 1) > MAX_EXP) { + + // Infinity. + x.c = x.e = null; + + // Underflow? + } else if (e < MIN_EXP) { + + // Zero. + x.c = [x.e = 0]; + } else { + x.e = e; + x.c = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first element of the coefficient array. + i = (e + 1) % LOG_BASE; + if (e < 0) i += LOG_BASE; // i < 1 + + if (i < len) { + if (i) x.c.push(+str.slice(0, i)); + + for (len -= LOG_BASE; i < len;) { + x.c.push(+str.slice(i, i += LOG_BASE)); + } + + i = LOG_BASE - (str = str.slice(i)).length; + } else { + i -= len; + } + + for (; i--; str += '0'); + x.c.push(+str); + } + } else { + + // Zero. + x.c = [x.e = 0]; + } } - /** - * Parses XML content. + + + // CONSTRUCTOR PROPERTIES + + + BigNumber.clone = clone; + + BigNumber.ROUND_UP = 0; + BigNumber.ROUND_DOWN = 1; + BigNumber.ROUND_CEIL = 2; + BigNumber.ROUND_FLOOR = 3; + BigNumber.ROUND_HALF_UP = 4; + BigNumber.ROUND_HALF_DOWN = 5; + BigNumber.ROUND_HALF_EVEN = 6; + BigNumber.ROUND_HALF_CEIL = 7; + BigNumber.ROUND_HALF_FLOOR = 8; + BigNumber.EUCLID = 9; + + + /* + * Configure infrequently-changing library-wide settings. * - * @param source - a string containing XML content + * Accept an object with the following optional properties (if the value of a property is + * a number, it must be an integer within the inclusive range stated): + * + * DECIMAL_PLACES {number} 0 to MAX + * ROUNDING_MODE {number} 0 to 8 + * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] + * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] + * CRYPTO {boolean} true or false + * MODULO_MODE {number} 0 to 9 + * POW_PRECISION {number} 0 to MAX + * ALPHABET {string} A string of two or more unique characters which does + * not contain '.'. + * FORMAT {object} An object with some of the following properties: + * prefix {string} + * groupSize {number} + * secondaryGroupSize {number} + * groupSeparator {string} + * decimalSeparator {string} + * fractionGroupSize {number} + * fractionGroupSeparator {string} + * suffix {string} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined, except for ALPHABET. + * + * Return an object with the properties current values. */ - XMLParserImpl.prototype.parse = function (source) { - var e_1, _a, e_2, _b; - var lexer = new XMLStringLexer_1.XMLStringLexer(source, { skipWhitespaceOnlyText: true }); - var doc = algorithm_1.create_document(); - var context = doc; - var token = lexer.nextToken(); - while (token.type !== interfaces_1.TokenType.EOF) { - switch (token.type) { - case interfaces_1.TokenType.Declaration: - var declaration = token; - if (declaration.version !== "1.0") { - throw new Error("Invalid xml version: " + declaration.version); - } - break; - case interfaces_1.TokenType.DocType: - var doctype = token; - if (!algorithm_1.xml_isPubidChar(doctype.pubId)) { - throw new Error("DocType public identifier does not match PubidChar construct."); - } - if (!algorithm_1.xml_isLegalChar(doctype.sysId) || - (doctype.sysId.indexOf('"') !== -1 && doctype.sysId.indexOf("'") !== -1)) { - throw new Error("DocType system identifier contains invalid characters."); - } - context.appendChild(doc.implementation.createDocumentType(doctype.name, doctype.pubId, doctype.sysId)); - break; - case interfaces_1.TokenType.CDATA: - var cdata = token; - if (!algorithm_1.xml_isLegalChar(cdata.data) || - cdata.data.indexOf("]]>") !== -1) { - throw new Error("CDATA contains invalid characters."); - } - context.appendChild(doc.createCDATASection(cdata.data)); - break; - case interfaces_1.TokenType.Comment: - var comment = token; - if (!algorithm_1.xml_isLegalChar(comment.data) || - comment.data.indexOf("--") !== -1 || comment.data.endsWith("-")) { - throw new Error("Comment data contains invalid characters."); - } - context.appendChild(doc.createComment(comment.data)); - break; - case interfaces_1.TokenType.PI: - var pi = token; - if (pi.target.indexOf(":") !== -1 || (/^xml$/i).test(pi.target)) { - throw new Error("Processing instruction target contains invalid characters."); - } - if (!algorithm_1.xml_isLegalChar(pi.data) || pi.data.indexOf("?>") !== -1) { - throw new Error("Processing instruction data contains invalid characters."); - } - context.appendChild(doc.createProcessingInstruction(pi.target, pi.data)); - break; - case interfaces_1.TokenType.Text: - var text = token; - if (!algorithm_1.xml_isLegalChar(text.data)) { - throw new Error("Text data contains invalid characters."); - } - context.appendChild(doc.createTextNode(text.data)); - break; - case interfaces_1.TokenType.Element: - var element = token; - // inherit namespace from parent - var _c = __read(algorithm_1.namespace_extractQName(element.name), 2), prefix = _c[0], localName = _c[1]; - if (localName.indexOf(":") !== -1 || !algorithm_1.xml_isName(localName)) { - throw new Error("Node local name contains invalid characters."); - } - if (prefix === "xmlns") { - throw new Error("An element cannot have the 'xmlns' prefix."); - } - var namespace = context.lookupNamespaceURI(prefix); - // override namespace if there is a namespace declaration - // attribute - // also lookup namespace declaration attributes - var nsDeclarations = {}; - try { - for (var _d = (e_1 = void 0, __values(element.attributes)), _e = _d.next(); !_e.done; _e = _d.next()) { - var _f = __read(_e.value, 2), attName = _f[0], attValue = _f[1]; - if (attName === "xmlns") { - namespace = attValue; - } - else { - var _g = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _g[0], attLocalName = _g[1]; - if (attPrefix === "xmlns") { - if (attLocalName === prefix) { - namespace = attValue; - } - nsDeclarations[attLocalName] = attValue; - } - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_e && !_e.done && (_a = _d.return)) _a.call(_d); - } - finally { if (e_1) throw e_1.error; } - } - // create the DOM element node - var elementNode = (namespace !== null ? - doc.createElementNS(namespace, element.name) : - doc.createElement(element.name)); - context.appendChild(elementNode); - // assign attributes - var localNameSet = new LocalNameSet_1.LocalNameSet(); - try { - for (var _h = (e_2 = void 0, __values(element.attributes)), _j = _h.next(); !_j.done; _j = _h.next()) { - var _k = __read(_j.value, 2), attName = _k[0], attValue = _k[1]; - var _l = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _l[0], attLocalName = _l[1]; - var attNamespace = null; - if (attPrefix === "xmlns" || (attPrefix === null && attLocalName === "xmlns")) { - // namespace declaration attribute - attNamespace = infra_1.namespace.XMLNS; - } - else { - attNamespace = elementNode.lookupNamespaceURI(attPrefix); - if (attNamespace !== null && elementNode.isDefaultNamespace(attNamespace)) { - attNamespace = null; - } - else if (attNamespace === null && attPrefix !== null) { - attNamespace = nsDeclarations[attPrefix] || null; - } - } - if (localNameSet.has(attNamespace, attLocalName)) { - throw new Error("Element contains duplicate attributes."); - } - localNameSet.set(attNamespace, attLocalName); - if (attNamespace === infra_1.namespace.XMLNS) { - if (attValue === infra_1.namespace.XMLNS) { - throw new Error("XMLNS namespace is reserved."); - } - } - if (attLocalName.indexOf(":") !== -1 || !algorithm_1.xml_isName(attLocalName)) { - throw new Error("Attribute local name contains invalid characters."); - } - if (attPrefix === "xmlns" && attValue === "") { - throw new Error("Empty XML namespace is not allowed."); - } - if (attNamespace !== null) - elementNode.setAttributeNS(attNamespace, attName, attValue); - else - elementNode.setAttribute(attName, attValue); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_j && !_j.done && (_b = _h.return)) _b.call(_h); - } - finally { if (e_2) throw e_2.error; } - } - if (!element.selfClosing) { - context = elementNode; - } - break; - case interfaces_1.TokenType.ClosingTag: - var closingTag = token; - if (closingTag.name !== context.nodeName) { - throw new Error('Closing tag name does not match opening tag name.'); - } - /* istanbul ignore else */ - if (context._parent) { - context = context._parent; - } - break; + BigNumber.config = BigNumber.set = function (obj) { + var p, v; + + if (obj != null) { + + if (typeof obj == 'object') { + + // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. + // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) { + v = obj[p]; + intCheck(v, 0, MAX, p); + DECIMAL_PLACES = v; + } + + // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. + // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) { + v = obj[p]; + intCheck(v, 0, 8, p); + ROUNDING_MODE = v; + } + + // EXPONENTIAL_AT {number|number[]} + // Integer, -MAX to MAX inclusive or + // [integer -MAX to 0 inclusive, 0 to MAX inclusive]. + // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) { + v = obj[p]; + if (v && v.pop) { + intCheck(v[0], -MAX, 0, p); + intCheck(v[1], 0, MAX, p); + TO_EXP_NEG = v[0]; + TO_EXP_POS = v[1]; + } else { + intCheck(v, -MAX, MAX, p); + TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v); + } + } + + // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. + // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}' + if (obj.hasOwnProperty(p = 'RANGE')) { + v = obj[p]; + if (v && v.pop) { + intCheck(v[0], -MAX, -1, p); + intCheck(v[1], 1, MAX, p); + MIN_EXP = v[0]; + MAX_EXP = v[1]; + } else { + intCheck(v, -MAX, MAX, p); + if (v) { + MIN_EXP = -(MAX_EXP = v < 0 ? -v : v); + } else { + throw Error + (bignumberError + p + ' cannot be zero: ' + v); + } + } + } + + // CRYPTO {boolean} true or false. + // '[BigNumber Error] CRYPTO not true or false: {v}' + // '[BigNumber Error] crypto unavailable' + if (obj.hasOwnProperty(p = 'CRYPTO')) { + v = obj[p]; + if (v === !!v) { + if (v) { + if (typeof crypto != 'undefined' && crypto && + (crypto.getRandomValues || crypto.randomBytes)) { + CRYPTO = v; + } else { + CRYPTO = !v; + throw Error + (bignumberError + 'crypto unavailable'); + } + } else { + CRYPTO = v; + } + } else { + throw Error + (bignumberError + p + ' not true or false: ' + v); } - token = lexer.nextToken(); - } - return doc; - }; - return XMLParserImpl; -}()); -exports.XMLParserImpl = XMLParserImpl; -//# sourceMappingURL=XMLParserImpl.js.map + } -/***/ }), + // MODULO_MODE {number} Integer, 0 to 9 inclusive. + // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'MODULO_MODE')) { + v = obj[p]; + intCheck(v, 0, 9, p); + MODULO_MODE = v; + } -/***/ 47061: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // POW_PRECISION {number} Integer, 0 to MAX inclusive. + // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}' + if (obj.hasOwnProperty(p = 'POW_PRECISION')) { + v = obj[p]; + intCheck(v, 0, MAX, p); + POW_PRECISION = v; + } -"use strict"; + // FORMAT {object} + // '[BigNumber Error] FORMAT not an object: {v}' + if (obj.hasOwnProperty(p = 'FORMAT')) { + v = obj[p]; + if (typeof v == 'object') FORMAT = v; + else throw Error + (bignumberError + p + ' not an object: ' + v); + } -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(97707); -/** - * Represents a lexer for XML content in a string. - */ -var XMLStringLexer = /** @class */ (function () { - /** - * Initializes a new instance of `XMLStringLexer`. - * - * @param str - the string to tokenize and lex - * @param options - lexer options - */ - function XMLStringLexer(str, options) { - this._options = { - skipWhitespaceOnlyText: false - }; - this.err = { line: -1, col: -1, index: -1, str: "" }; - this._str = str; - this._index = 0; - this._length = str.length; - if (options) { - this._options.skipWhitespaceOnlyText = options.skipWhitespaceOnlyText || false; - } - } - /** - * Returns the next token. - */ - XMLStringLexer.prototype.nextToken = function () { - if (this.eof()) { - return { type: interfaces_1.TokenType.EOF }; - } - var token = (this.skipIfStartsWith('<') ? this.openBracket() : this.text()); - if (this._options.skipWhitespaceOnlyText) { - if (token.type === interfaces_1.TokenType.Text && - XMLStringLexer.isWhiteSpaceToken(token)) { - token = this.nextToken(); - } - } - return token; - }; - /** - * Branches from an opening bracket (`<`). - */ - XMLStringLexer.prototype.openBracket = function () { - if (this.skipIfStartsWith('?')) { - if (this.skipIfStartsWith('xml')) { - if (XMLStringLexer.isSpace(this._str[this._index])) { - return this.declaration(); - } - else { - // a processing instruction starting with xml. e.g. - this.seek(-3); - return this.pi(); - } - } - else { - return this.pi(); - } - } - else if (this.skipIfStartsWith('!')) { - if (this.skipIfStartsWith('--')) { - return this.comment(); - } - else if (this.skipIfStartsWith('[CDATA[')) { - return this.cdata(); - } - else if (this.skipIfStartsWith('DOCTYPE')) { - return this.doctype(); - } - else { - this.throwError("Invalid '!' in opening tag."); - } - } - else if (this.skipIfStartsWith('/')) { - return this.closeTag(); - } - else { - return this.openTag(); - } - }; - /** - * Produces an XML declaration token. - */ - XMLStringLexer.prototype.declaration = function () { - var version = ''; - var encoding = ''; - var standalone = ''; - while (!this.eof()) { - this.skipSpace(); - if (this.skipIfStartsWith('?>')) { - return { type: interfaces_1.TokenType.Declaration, version: version, encoding: encoding, standalone: standalone }; - } - else { - // attribute name - var _a = __read(this.attribute(), 2), attName = _a[0], attValue = _a[1]; - if (attName === 'version') - version = attValue; - else if (attName === 'encoding') - encoding = attValue; - else if (attName === 'standalone') - standalone = attValue; - else - this.throwError('Invalid attribute name: ' + attName); + // ALPHABET {string} + // '[BigNumber Error] ALPHABET invalid: {v}' + if (obj.hasOwnProperty(p = 'ALPHABET')) { + v = obj[p]; + + // Disallow if less than two characters, + // or if it contains '+', '-', '.', whitespace, or a repeated character. + if (typeof v == 'string' && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) { + alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789'; + ALPHABET = v; + } else { + throw Error + (bignumberError + p + ' invalid: ' + v); } + } + + } else { + + // '[BigNumber Error] Object expected: {v}' + throw Error + (bignumberError + 'Object expected: ' + obj); } - this.throwError('Missing declaration end symbol `?>`'); + } + + return { + DECIMAL_PLACES: DECIMAL_PLACES, + ROUNDING_MODE: ROUNDING_MODE, + EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS], + RANGE: [MIN_EXP, MAX_EXP], + CRYPTO: CRYPTO, + MODULO_MODE: MODULO_MODE, + POW_PRECISION: POW_PRECISION, + FORMAT: FORMAT, + ALPHABET: ALPHABET + }; }; - /** - * Produces a doc type token. + + + /* + * Return true if v is a BigNumber instance, otherwise return false. + * + * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. + * + * v {any} + * + * '[BigNumber Error] Invalid BigNumber: {v}' */ - XMLStringLexer.prototype.doctype = function () { - var pubId = ''; - var sysId = ''; - // name - this.skipSpace(); - var name = this.takeUntil2('[', '>', true); - this.skipSpace(); - if (this.skipIfStartsWith('PUBLIC')) { - pubId = this.quotedString(); - sysId = this.quotedString(); - } - else if (this.skipIfStartsWith('SYSTEM')) { - sysId = this.quotedString(); - } - // skip internal subset - this.skipSpace(); - if (this.skipIfStartsWith('[')) { - // skip internal subset nodes - this.skipUntil(']'); - if (!this.skipIfStartsWith(']')) { - this.throwError('Missing end bracket of DTD internal subset'); + BigNumber.isBigNumber = function (v) { + if (!v || v._isBigNumber !== true) return false; + if (!BigNumber.DEBUG) return true; + + var i, n, + c = v.c, + e = v.e, + s = v.s; + + out: if ({}.toString.call(c) == '[object Array]') { + + if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) { + + // If the first element is zero, the BigNumber value must be zero. + if (c[0] === 0) { + if (e === 0 && c.length === 1) return true; + break out; + } + + // Calculate number of digits that c[0] should have, based on the exponent. + i = (e + 1) % LOG_BASE; + if (i < 1) i += LOG_BASE; + + // Calculate number of digits of c[0]. + //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) { + if (String(c[0]).length == i) { + + for (i = 0; i < c.length; i++) { + n = c[i]; + if (n < 0 || n >= BASE || n !== mathfloor(n)) break out; } + + // Last element cannot be zero, unless it is the only element. + if (n !== 0) return true; + } } - this.skipSpace(); - if (!this.skipIfStartsWith('>')) { - this.throwError('Missing doctype end symbol `>`'); - } - return { type: interfaces_1.TokenType.DocType, name: name, pubId: pubId, sysId: sysId }; - }; - /** - * Produces a processing instruction token. - */ - XMLStringLexer.prototype.pi = function () { - var target = this.takeUntilStartsWith('?>', true); - if (this.eof()) { - this.throwError('Missing processing instruction end symbol `?>`'); - } - this.skipSpace(); - if (this.skipIfStartsWith('?>')) { - return { type: interfaces_1.TokenType.PI, target: target, data: '' }; - } - var data = this.takeUntilStartsWith('?>'); - if (this.eof()) { - this.throwError('Missing processing instruction end symbol `?>`'); - } - this.seek(2); - return { type: interfaces_1.TokenType.PI, target: target, data: data }; + + // Infinity/NaN + } else if (c === null && e === null && (s === null || s === 1 || s === -1)) { + return true; + } + + throw Error + (bignumberError + 'Invalid BigNumber: ' + v); }; - /** - * Produces a text token. + + + /* + * Return a new BigNumber whose value is the maximum of the arguments. * + * arguments {number|string|BigNumber} */ - XMLStringLexer.prototype.text = function () { - var data = this.takeUntil('<'); - return { type: interfaces_1.TokenType.Text, data: data }; + BigNumber.maximum = BigNumber.max = function () { + return maxOrMin(arguments, -1); }; - /** - * Produces a comment token. + + + /* + * Return a new BigNumber whose value is the minimum of the arguments. * + * arguments {number|string|BigNumber} */ - XMLStringLexer.prototype.comment = function () { - var data = this.takeUntilStartsWith('-->'); - if (this.eof()) { - this.throwError('Missing comment end symbol `-->`'); - } - this.seek(3); - return { type: interfaces_1.TokenType.Comment, data: data }; + BigNumber.minimum = BigNumber.min = function () { + return maxOrMin(arguments, 1); }; - /** - * Produces a CDATA token. + + + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' + * '[BigNumber Error] crypto unavailable' */ - XMLStringLexer.prototype.cdata = function () { - var data = this.takeUntilStartsWith(']]>'); - if (this.eof()) { - this.throwError('Missing CDATA end symbol `]>`'); - } - this.seek(3); - return { type: interfaces_1.TokenType.CDATA, data: data }; - }; - /** - * Produces an element token. - */ - XMLStringLexer.prototype.openTag = function () { - // element name - this.skipSpace(); - var name = this.takeUntil2('>', '/', true); - this.skipSpace(); - if (this.skipIfStartsWith('>')) { - return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: false }; - } - else if (this.skipIfStartsWith('/>')) { - return { type: interfaces_1.TokenType.Element, name: name, attributes: [], selfClosing: true }; - } - // attributes - var attributes = []; - while (!this.eof()) { - // end tag - this.skipSpace(); - if (this.skipIfStartsWith('>')) { - return { type: interfaces_1.TokenType.Element, name: name, attributes: attributes, selfClosing: false }; + BigNumber.random = (function () { + var pow2_53 = 0x20000000000000; + + // Return a 53 bit integer n, where 0 <= n < 9007199254740992. + // Check if Math.random() produces more than 32 bits of randomness. + // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. + // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. + var random53bitInt = (Math.random() * pow2_53) & 0x1fffff + ? function () { return mathfloor(Math.random() * pow2_53); } + : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + + (Math.random() * 0x800000 | 0); }; + + return function (dp) { + var a, b, e, k, v, + i = 0, + c = [], + rand = new BigNumber(ONE); + + if (dp == null) dp = DECIMAL_PLACES; + else intCheck(dp, 0, MAX); + + k = mathceil(dp / LOG_BASE); + + if (CRYPTO) { + + // Browsers supporting crypto.getRandomValues. + if (crypto.getRandomValues) { + + a = crypto.getRandomValues(new Uint32Array(k *= 2)); + + for (; i < k;) { + + // 53 bits: + // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) + // 11111 11111111 11111111 11111111 11100000 00000000 00000000 + // ((Math.pow(2, 32) - 1) >>> 11).toString(2) + // 11111 11111111 11111111 + // 0x20000 is 2^21. + v = a[i] * 0x20000 + (a[i + 1] >>> 11); + + // Rejection sampling: + // 0 <= v < 9007199254740992 + // Probability that v >= 9e15, is + // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 + if (v >= 9e15) { + b = crypto.getRandomValues(new Uint32Array(2)); + a[i] = b[0]; + a[i + 1] = b[1]; + } else { + + // 0 <= v <= 8999999999999999 + // 0 <= (v % 1e14) <= 99999999999999 + c.push(v % 1e14); + i += 2; + } } - else if (this.skipIfStartsWith('/>')) { - return { type: interfaces_1.TokenType.Element, name: name, attributes: attributes, selfClosing: true }; + i = k / 2; + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + a = crypto.randomBytes(k *= 7); + + for (; i < k;) { + + // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 + // 0x100000000 is 2^32, 0x1000000 is 2^24 + // 11111 11111111 11111111 11111111 11111111 11111111 11111111 + // 0 <= v < 9007199254740992 + v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) + + (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) + + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]; + + if (v >= 9e15) { + crypto.randomBytes(7).copy(a, i); + } else { + + // 0 <= (v % 1e14) <= 99999999999999 + c.push(v % 1e14); + i += 7; + } } - var attr = this.attribute(); - attributes.push(attr); - } - this.throwError('Missing opening element tag end symbol `>`'); - }; - /** - * Produces a closing tag token. - * - */ - XMLStringLexer.prototype.closeTag = function () { - this.skipSpace(); - var name = this.takeUntil('>', true); - this.skipSpace(); - if (!this.skipIfStartsWith('>')) { - this.throwError('Missing closing element tag end symbol `>`'); + i = k / 7; + } else { + CRYPTO = false; + throw Error + (bignumberError + 'crypto unavailable'); + } } - return { type: interfaces_1.TokenType.ClosingTag, name: name }; - }; - /** - * Reads an attribute name, value pair - */ - XMLStringLexer.prototype.attribute = function () { - // attribute name - this.skipSpace(); - var name = this.takeUntil('=', true); - this.skipSpace(); - if (!this.skipIfStartsWith('=')) { - this.throwError('Missing equals sign before attribute value'); + + // Use Math.random. + if (!CRYPTO) { + + for (; i < k;) { + v = random53bitInt(); + if (v < 9e15) c[i++] = v % 1e14; + } } - // attribute value - var value = this.quotedString(); - return [name, value]; - }; - /** - * Reads a string between double or single quotes. - */ - XMLStringLexer.prototype.quotedString = function () { - this.skipSpace(); - var startQuote = this.take(1); - if (!XMLStringLexer.isQuote(startQuote)) { - this.throwError('Missing start quote character before quoted value'); + + k = c[--i]; + dp %= LOG_BASE; + + // Convert trailing digits to zeros according to dp. + if (k && dp) { + v = POWS_TEN[LOG_BASE - dp]; + c[i] = mathfloor(k / v) * v; } - var value = this.takeUntil(startQuote); - if (!this.skipIfStartsWith(startQuote)) { - this.throwError('Missing end quote character after quoted value'); + + // Remove trailing elements which are zero. + for (; c[i] === 0; c.pop(), i--); + + // Zero? + if (i < 0) { + c = [e = 0]; + } else { + + // Remove leading elements which are zero and adjust exponent accordingly. + for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE); + + // Count the digits of the first element of c to determine leading zeros, and... + for (i = 1, v = c[0]; v >= 10; v /= 10, i++); + + // adjust the exponent accordingly. + if (i < LOG_BASE) e -= LOG_BASE - i; } - return value; - }; - /** - * Determines if the current index is at or past the end of input string. - */ - XMLStringLexer.prototype.eof = function () { return this._index >= this._length; }; - /** - * Skips the length of the given string if the string from current position - * starts with the given string. + + rand.e = e; + rand.c = c; + return rand; + }; + })(); + + + /* + * Return a BigNumber whose value is the sum of the arguments. * - * @param str - the string to match + * arguments {number|string|BigNumber} */ - XMLStringLexer.prototype.skipIfStartsWith = function (str) { - var strLength = str.length; - if (strLength === 1) { - if (this._str[this._index] === str) { - this._index++; - return true; - } - else { - return false; + BigNumber.sum = function () { + var i = 1, + args = arguments, + sum = new BigNumber(args[0]); + for (; i < args.length;) sum = sum.plus(args[i++]); + return sum; + }; + + + // PRIVATE FUNCTIONS + + + // Called by BigNumber and BigNumber.prototype.toString. + convertBase = (function () { + var decimal = '0123456789'; + + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. toBaseOut('255', 10, 16) returns [15, 15]. + * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. + */ + function toBaseOut(str, baseIn, baseOut, alphabet) { + var j, + arr = [0], + arrL, + i = 0, + len = str.length; + + for (; i < len;) { + for (arrL = arr.length; arrL--; arr[arrL] *= baseIn); + + arr[0] += alphabet.indexOf(str.charAt(i++)); + + for (j = 0; j < arr.length; j++) { + + if (arr[j] > baseOut - 1) { + if (arr[j + 1] == null) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; } + } } - for (var i = 0; i < strLength; i++) { - if (this._str[this._index + i] !== str[i]) - return false; - } - this._index += strLength; - return true; - }; - /** - * Seeks a number of character codes. - * - * @param count - number of characters to skip - */ - XMLStringLexer.prototype.seek = function (count) { - this._index += count; - if (this._index < 0) - this._index = 0; - if (this._index > this._length) - this._index = this._length; - }; - /** - * Skips space characters. - */ - XMLStringLexer.prototype.skipSpace = function () { - while (!this.eof() && (XMLStringLexer.isSpace(this._str[this._index]))) { - this._index++; + + return arr.reverse(); + } + + // Convert a numeric string of baseIn to a numeric string of baseOut. + // If the caller is toString, we are converting from base 10 to baseOut. + // If the caller is BigNumber, we are converting from baseIn to base 10. + return function (str, baseIn, baseOut, sign, callerIsToString) { + var alphabet, d, e, k, r, x, xc, y, + i = str.indexOf('.'), + dp = DECIMAL_PLACES, + rm = ROUNDING_MODE; + + // Non-integer. + if (i >= 0) { + k = POW_PRECISION; + + // Unlimited precision. + POW_PRECISION = 0; + str = str.replace('.', ''); + y = new BigNumber(baseIn); + x = y.pow(str.length - i); + POW_PRECISION = k; + + // Convert str as if an integer, then restore the fraction part by dividing the + // result by its base raised to a power. + + y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'), + 10, baseOut, decimal); + y.e = y.c.length; } - }; - /** - * Takes a given number of characters. - * - * @param count - character count - */ - XMLStringLexer.prototype.take = function (count) { - if (count === 1) { - return this._str[this._index++]; + + // Convert the number as integer. + + xc = toBaseOut(str, baseIn, baseOut, callerIsToString + ? (alphabet = ALPHABET, decimal) + : (alphabet = decimal, ALPHABET)); + + // xc now represents str as an integer and converted to baseOut. e is the exponent. + e = k = xc.length; + + // Remove trailing zeros. + for (; xc[--k] == 0; xc.pop()); + + // Zero? + if (!xc[0]) return alphabet.charAt(0); + + // Does str represent an integer? If so, no need for the division. + if (i < 0) { + --e; + } else { + x.c = xc; + x.e = e; + + // The sign is needed for correct rounding. + x.s = sign; + x = div(x, y, dp, rm, baseOut); + xc = x.c; + r = x.r; + e = x.e; } - var startIndex = this._index; - this.seek(count); - return this._str.slice(startIndex, this._index); - }; - /** - * Takes characters until the next character matches `char`. - * - * @param char - a character to match - * @param space - whether a space character stops iteration - */ - XMLStringLexer.prototype.takeUntil = function (char, space) { - if (space === void 0) { space = false; } - var startIndex = this._index; - while (this._index < this._length) { - var c = this._str[this._index]; - if (c !== char && (!space || !XMLStringLexer.isSpace(c))) { - this._index++; - } - else { - break; + + // xc now represents str converted to baseOut. + + // The index of the rounding digit. + d = e + dp + 1; + + // The rounding digit: the digit to the right of the digit that may be rounded up. + i = xc[d]; + + // Look at the rounding digits and mode to determine whether to round up. + + k = baseOut / 2; + r = r || d < 0 || xc[d + 1] != null; + + r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 || + rm == (x.s < 0 ? 8 : 7)); + + // If the index of the rounding digit is not greater than zero, or xc represents + // zero, then the result of the base conversion is zero or, if rounding up, a value + // such as 0.00001. + if (d < 1 || !xc[0]) { + + // 1^-dp or 0 + str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0); + } else { + + // Truncate xc to the required number of decimal places. + xc.length = d; + + // Round up? + if (r) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for (--baseOut; ++xc[--d] > baseOut;) { + xc[d] = 0; + + if (!d) { + ++e; + xc = [1].concat(xc); + } } + } + + // Determine trailing zeros. + for (k = xc.length; !xc[--k];); + + // E.g. [4, 11, 15] becomes 4bf. + for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++])); + + // Add leading zeros, decimal point and trailing zeros as required. + str = toFixedPoint(str, e, alphabet.charAt(0)); } - return this._str.slice(startIndex, this._index); - }; - /** - * Takes characters until the next character matches `char1` or `char1`. - * - * @param char1 - a character to match - * @param char2 - a character to match - * @param space - whether a space character stops iteration - */ - XMLStringLexer.prototype.takeUntil2 = function (char1, char2, space) { - if (space === void 0) { space = false; } - var startIndex = this._index; - while (this._index < this._length) { - var c = this._str[this._index]; - if (c !== char1 && c !== char2 && (!space || !XMLStringLexer.isSpace(c))) { - this._index++; - } - else { - break; - } + + // The caller will add the sign. + return str; + }; + })(); + + + // Perform division in the specified base. Called by div and convertBase. + div = (function () { + + // Assume non-zero x and k. + function multiply(x, k, base) { + var m, temp, xlo, xhi, + carry = 0, + i = x.length, + klo = k % SQRT_BASE, + khi = k / SQRT_BASE | 0; + + for (x = x.slice(); i--;) { + xlo = x[i] % SQRT_BASE; + xhi = x[i] / SQRT_BASE | 0; + m = khi * xlo + xhi * klo; + temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry; + carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi; + x[i] = temp % base; } - return this._str.slice(startIndex, this._index); - }; - /** - * Takes characters until the next characters matches `str`. - * - * @param str - a string to match - * @param space - whether a space character stops iteration - */ - XMLStringLexer.prototype.takeUntilStartsWith = function (str, space) { - if (space === void 0) { space = false; } - var startIndex = this._index; - var strLength = str.length; - while (this._index < this._length) { - var match = true; - for (var i = 0; i < strLength; i++) { - var c = this._str[this._index + i]; - var char = str[i]; - if (space && XMLStringLexer.isSpace(c)) { - return this._str.slice(startIndex, this._index); - } - else if (c !== char) { - this._index++; - match = false; - break; - } + + if (carry) x = [carry].concat(x); + + return x; + } + + function compare(a, b, aL, bL) { + var i, cmp; + + if (aL != bL) { + cmp = aL > bL ? 1 : -1; + } else { + + for (i = cmp = 0; i < aL; i++) { + + if (a[i] != b[i]) { + cmp = a[i] > b[i] ? 1 : -1; + break; } - if (match) - return this._str.slice(startIndex, this._index); + } } - this._index = this._length; - return this._str.slice(startIndex); - }; - /** - * Skips characters until the next character matches `char`. - * - * @param char - a character to match - */ - XMLStringLexer.prototype.skipUntil = function (char) { - while (this._index < this._length) { - var c = this._str[this._index]; - if (c !== char) { - this._index++; - } - else { - break; - } + + return cmp; + } + + function subtract(a, b, aL, base) { + var i = 0; + + // Subtract b from a. + for (; aL--;) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; } - }; - /** - * Determines if the given token is entirely whitespace. - * - * @param token - the token to check - */ - XMLStringLexer.isWhiteSpaceToken = function (token) { - var str = token.data; - for (var i = 0; i < str.length; i++) { - var c = str[i]; - if (c !== ' ' && c !== '\n' && c !== '\r' && c !== '\t' && c !== '\f') - return false; + + // Remove leading zeros. + for (; !a[0] && a.length > 1; a.splice(0, 1)); + } + + // x: dividend, y: divisor. + return function (x, y, dp, rm, base) { + var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, + yL, yz, + s = x.s == y.s ? 1 : -1, + xc = x.c, + yc = y.c; + + // Either NaN, Infinity or 0? + if (!xc || !xc[0] || !yc || !yc[0]) { + + return new BigNumber( + + // Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : + + // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. + xc && xc[0] == 0 || !yc ? s * 0 : s / 0 + ); } - return true; - }; - /** - * Determines if the given character is whitespace. - * - * @param char - the character to check - */ - XMLStringLexer.isSpace = function (char) { - return char === ' ' || char === '\n' || char === '\r' || char === '\t'; - }; - /** - * Determines if the given character is a quote character. - * - * @param char - the character to check - */ - XMLStringLexer.isQuote = function (char) { - return (char === '"' || char === '\''); - }; - /** - * Throws a parser error and records the line and column numbers in the parsed - * string. - * - * @param msg - error message - */ - XMLStringLexer.prototype.throwError = function (msg) { - var regexp = /\r\n|\r|\n/g; - var match = null; - var line = 0; - var firstNewLineIndex = 0; - var lastNewlineIndex = this._str.length; - while ((match = regexp.exec(this._str)) !== null) { - if (match === null) - break; - line++; - if (match.index < this._index) - firstNewLineIndex = regexp.lastIndex; - if (match.index > this._index) { - lastNewlineIndex = match.index; - break; - } + + q = new BigNumber(s); + qc = q.c = []; + e = x.e - y.e; + s = dp + e + 1; + + if (!base) { + base = BASE; + e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE); + s = s / LOG_BASE | 0; } - this.err = { - line: line, - col: this._index - firstNewLineIndex, - index: this._index, - str: this._str.substring(firstNewLineIndex, lastNewlineIndex) - }; - throw new Error(msg + "\nIndex: " + this.err.index + - "\nLn: " + this.err.line + ", Col: " + this.err.col + - "\nInput: " + this.err.str); - }; - /** - * Returns an iterator for the lexer. - */ - XMLStringLexer.prototype[Symbol.iterator] = function () { - this._index = 0; - return { - next: function () { - var token = this.nextToken(); - if (token.type === interfaces_1.TokenType.EOF) { - return { done: true, value: null }; - } - else { - return { done: false, value: token }; + + // Result exponent may be one less then the current value of e. + // The coefficients of the BigNumbers from convertBase may have trailing zeros. + for (i = 0; yc[i] == (xc[i] || 0); i++); + + if (yc[i] > (xc[i] || 0)) e--; + + if (s < 0) { + qc.push(1); + more = true; + } else { + xL = xc.length; + yL = yc.length; + i = 0; + s += 2; + + // Normalise xc and yc so highest order digit of yc is >= base / 2. + + n = mathfloor(base / (yc[0] + 1)); + + // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1. + // if (n > 1 || n++ == 1 && yc[0] < base / 2) { + if (n > 1) { + yc = multiply(yc, n, base); + xc = multiply(xc, n, base); + yL = yc.length; + xL = xc.length; + } + + xi = yL; + rem = xc.slice(0, yL); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for (; remL < yL; rem[remL++] = 0); + yz = yc.slice(); + yz = [0].concat(yz); + yc0 = yc[0]; + if (yc[1] >= base / 2) yc0++; + // Not necessary, but to prevent trial digit n > base, when using base 3. + // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15; + + do { + n = 0; + + // Compare divisor and remainder. + cmp = compare(yc, rem, yL, remL); + + // If divisor < remainder. + if (cmp < 0) { + + // Calculate trial digit, n. + + rem0 = rem[0]; + if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); + + // n is how many times the divisor goes into the current remainder. + n = mathfloor(rem0 / yc0); + + // Algorithm: + // product = divisor multiplied by trial digit (n). + // Compare product and remainder. + // If product is greater than remainder: + // Subtract divisor from product, decrement trial digit. + // Subtract product from remainder. + // If product was less than remainder at the last compare: + // Compare new remainder and divisor. + // If remainder is greater than divisor: + // Subtract divisor from remainder, increment trial digit. + + if (n > 1) { + + // n may be > base only when base is 3. + if (n >= base) n = base - 1; + + // product = divisor * trial digit. + prod = multiply(yc, n, base); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + // If product > remainder then trial digit n too high. + // n is 1 too high about 5% of the time, and is not known to have + // ever been more than 1 too high. + while (compare(prod, rem, prodL, remL) == 1) { + n--; + + // Subtract divisor from product. + subtract(prod, yL < prodL ? yz : yc, prodL, base); + prodL = prod.length; + cmp = 1; } - }.bind(this) - }; - }; - return XMLStringLexer; -}()); -exports.XMLStringLexer = XMLStringLexer; -//# sourceMappingURL=XMLStringLexer.js.map + } else { -/***/ }), + // n is 0 or 1, cmp is -1. + // If n is 0, there is no need to compare yc and rem again below, + // so change cmp to 1 to avoid it. + // If n is 1, leave cmp as -1, so yc and rem are compared again. + if (n == 0) { -/***/ 36216: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // divisor < remainder, so n must be at least 1. + cmp = n = 1; + } -"use strict"; + // product = divisor + prod = yc.slice(); + prodL = prod.length; + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -// Export classes -var DOMParserImpl_1 = __nccwpck_require__(98845); -exports.DOMParser = DOMParserImpl_1.DOMParserImpl; -//# sourceMappingURL=index.js.map + if (prodL < remL) prod = [0].concat(prod); -/***/ }), + // Subtract product from remainder. + subtract(rem, prod, remL, base); + remL = rem.length; -/***/ 97707: -/***/ ((__unused_webpack_module, exports) => { + // If product was < remainder. + if (cmp == -1) { -"use strict"; + // Compare divisor and new remainder. + // If divisor < new remainder, subtract divisor from remainder. + // Trial digit n too low. + // n is 1 too low about 5% of the time, and very rarely 2 too low. + while (compare(yc, rem, yL, remL) < 1) { + n++; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Defines the type of a token. - */ -var TokenType; -(function (TokenType) { - TokenType[TokenType["EOF"] = 0] = "EOF"; - TokenType[TokenType["Declaration"] = 1] = "Declaration"; - TokenType[TokenType["DocType"] = 2] = "DocType"; - TokenType[TokenType["Element"] = 3] = "Element"; - TokenType[TokenType["Text"] = 4] = "Text"; - TokenType[TokenType["CDATA"] = 5] = "CDATA"; - TokenType[TokenType["PI"] = 6] = "PI"; - TokenType[TokenType["Comment"] = 7] = "Comment"; - TokenType[TokenType["ClosingTag"] = 8] = "ClosingTag"; -})(TokenType = exports.TokenType || (exports.TokenType = {})); -//# sourceMappingURL=interfaces.js.map + // Subtract divisor from remainder. + subtract(rem, yL < remL ? yz : yc, remL, base); + remL = rem.length; + } + } + } else if (cmp === 0) { + n++; + rem = [0]; + } // else cmp === 1 and n will be 0 -/***/ }), + // Add the next digit, n, to the result array. + qc[i++] = n; -/***/ 19049: -/***/ ((__unused_webpack_module, exports) => { + // Update the remainder. + if (rem[0]) { + rem[remL++] = xc[xi] || 0; + } else { + rem = [xc[xi]]; + remL = 1; + } + } while ((xi++ < xL || rem[0] != null) && s--); -"use strict"; + more = rem[0] != null; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents a set of unique attribute namespaceURI and localName pairs. - * This set will contain tuples of unique attribute namespaceURI and - * localName pairs, and is populated as each attr is processed. This set is - * used to [optionally] enforce the well-formed constraint that an element - * cannot have two attributes with the same namespaceURI and localName. - * This can occur when two otherwise identical attributes on the same - * element differ only by their prefix values. - */ -var LocalNameSet = /** @class */ (function () { - function LocalNameSet() { - // tuple storage - this._items = {}; - this._nullItems = {}; - } - /** - * Adds or replaces a tuple. - * - * @param ns - namespace URI - * @param localName - attribute local name - */ - LocalNameSet.prototype.set = function (ns, localName) { - if (ns === null) { - this._nullItems[localName] = true; - } - else if (this._items[ns]) { - this._items[ns][localName] = true; - } - else { - this._items[ns] = {}; - this._items[ns][localName] = true; - } - }; - /** - * Determines if the given tuple exists in the set. - * - * @param ns - namespace URI - * @param localName - attribute local name - */ - LocalNameSet.prototype.has = function (ns, localName) { - if (ns === null) { - return this._nullItems[localName] === true; - } - else if (this._items[ns]) { - return this._items[ns][localName] === true; - } - else { - return false; + // Leading zero? + if (!qc[0]) qc.splice(0, 1); } - }; - return LocalNameSet; -}()); -exports.LocalNameSet = LocalNameSet; -//# sourceMappingURL=LocalNameSet.js.map -/***/ }), + if (base == BASE) { -/***/ 90283: -/***/ ((__unused_webpack_module, exports) => { + // To calculate q.e, first get the number of digits of qc[0]. + for (i = 1, s = qc[0]; s >= 10; s /= 10, i++); -"use strict"; + round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more); -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * A namespace prefix map is a map that associates namespaceURI and namespace - * prefix lists, where namespaceURI values are the map's unique keys (which can - * include the null value representing no namespace), and ordered lists of - * associated prefix values are the map's key values. The namespace prefix map - * will be populated by previously seen namespaceURIs and all their previously - * encountered prefix associations for a given node and its ancestors. - * - * _Note:_ The last seen prefix for a given namespaceURI is at the end of its - * respective list. The list is searched to find potentially matching prefixes, - * and if no matches are found for the given namespaceURI, then the last prefix - * in the list is used. See copy a namespace prefix map and retrieve a preferred - * prefix string for additional details. - * - * See: https://w3c.github.io/DOM-Parsing/#the-namespace-prefix-map - */ -var NamespacePrefixMap = /** @class */ (function () { - function NamespacePrefixMap() { - this._items = {}; - this._nullItems = []; - } - /** - * Creates a copy of the map. - */ - NamespacePrefixMap.prototype.copy = function () { - /** - * To copy a namespace prefix map map means to copy the map's keys into a - * new empty namespace prefix map, and to copy each of the values in the - * namespace prefix list associated with each keys' value into a new list - * which should be associated with the respective key in the new map. - */ - var mapCopy = new NamespacePrefixMap(); - for (var key in this._items) { - mapCopy._items[key] = this._items[key].slice(0); + // Caller is convertBase. + } else { + q.e = e; + q.r = +more; } - mapCopy._nullItems = this._nullItems.slice(0); - return mapCopy; - }; - /** - * Retrieves a preferred prefix string from the namespace prefix map. + + return q; + }; + })(); + + + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. * - * @param preferredPrefix - preferred prefix string - * @param ns - namespace + * n: a BigNumber. + * i: the index of the last digit required (i.e. the digit that may be rounded up). + * rm: the rounding mode. + * id: 1 (toExponential) or 2 (toPrecision). */ - NamespacePrefixMap.prototype.get = function (preferredPrefix, ns) { - /** - * 1. Let candidates list be the result of retrieving a list from map where - * there exists a key in map that matches the value of ns or if there is no - * such key, then stop running these steps, and return the null value. - */ - var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null); - if (candidatesList === null) { - return null; - } - /** - * 2. Otherwise, for each prefix value prefix in candidates list, iterating - * from beginning to end: - * - * _Note:_ There will always be at least one prefix value in the list. - */ - var prefix = null; - for (var i = 0; i < candidatesList.length; i++) { - prefix = candidatesList[i]; - /** - * 2.1. If prefix matches preferred prefix, then stop running these steps - * and return prefix. - */ - if (prefix === preferredPrefix) { - return prefix; + function format(n, i, rm, id) { + var c0, e, ne, len, str; + + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + if (!n.c) return n.toString(); + + c0 = n.c[0]; + ne = n.e; + + if (i == null) { + str = coeffToString(n.c); + str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) + ? toExponential(str, ne) + : toFixedPoint(str, ne, '0'); + } else { + n = round(new BigNumber(n), i, rm); + + // n.e may have changed if the value was rounded up. + e = n.e; + + str = coeffToString(n.c); + len = str.length; + + // toPrecision returns exponential notation if the number of significant digits + // specified is less than the number of digits necessary to represent the integer + // part of the value in fixed-point notation. + + // Exponential notation. + if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) { + + // Append zeros? + for (; len < i; str += '0', len++); + str = toExponential(str, e); + + // Fixed-point notation. + } else { + i -= ne + (id === 2 && e > ne); + str = toFixedPoint(str, e, '0'); + + // Append zeros? + if (e + 1 > len) { + if (--i > 0) for (str += '.'; i--; str += '0'); + } else { + i += e - len; + if (i > 0) { + if (e + 1 == len) str += '.'; + for (; i--; str += '0'); } + } } - /** - * 2.2. If prefix is the last item in the candidates list, then stop - * running these steps and return prefix. - */ - return prefix; - }; - /** - * Checks if a prefix string is found in the namespace prefix map associated - * with the given namespace. - * - * @param prefix - prefix string - * @param ns - namespace - */ - NamespacePrefixMap.prototype.has = function (prefix, ns) { - /** - * 1. Let candidates list be the result of retrieving a list from map where - * there exists a key in map that matches the value of ns or if there is - * no such key, then stop running these steps, and return false. - */ - var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null); - if (candidatesList === null) { - return false; - } - /** - * 2. If the value of prefix occurs at least once in candidates list, - * return true, otherwise return false. - */ - return (candidatesList.indexOf(prefix) !== -1); - }; - /** - * Checks if a prefix string is found in the namespace prefix map. - * - * @param prefix - prefix string - */ - NamespacePrefixMap.prototype.hasPrefix = function (prefix) { - if (this._nullItems.indexOf(prefix) !== -1) - return true; - for (var key in this._items) { - if (this._items[key].indexOf(prefix) !== -1) - return true; - } - return false; - }; - /** - * Adds a prefix string associated with a namespace to the prefix map. - * - * @param prefix - prefix string - * @param ns - namespace - */ - NamespacePrefixMap.prototype.set = function (prefix, ns) { - /** - * 1. Let candidates list be the result of retrieving a list from map where - * there exists a key in map that matches the value of ns or if there is - * no such key, then let candidates list be null. - */ - var candidatesList = ns === null ? this._nullItems : (this._items[ns] || null); - /** - * 2. If candidates list is null, then create a new list with prefix as the - * only item in the list, and associate that list with a new key ns in map. - * 3. Otherwise, append prefix to the end of candidates list. - * - * _Note:_ The steps in retrieve a preferred prefix string use the list to - * track the most recently used (MRU) prefix associated with a given - * namespace, which will be the prefix at the end of the list. This list - * may contain duplicates of the same prefix value seen earlier - * (and that's OK). - */ - if (ns !== null && candidatesList === null) { - this._items[ns] = [prefix]; - } - else { - candidatesList.push(prefix); - } - }; - return NamespacePrefixMap; -}()); -exports.NamespacePrefixMap = NamespacePrefixMap; -//# sourceMappingURL=NamespacePrefixMap.js.map + } -/***/ }), + return n.s < 0 && c0 ? '-' + str : str; + } -/***/ 85039: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; + // Handle BigNumber.max and BigNumber.min. + // If any number is NaN, return NaN. + function maxOrMin(args, n) { + var k, y, + i = 1, + x = new BigNumber(args[0]); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; + for (; i < args.length; i++) { + y = new BigNumber(args[i]); + if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) { + x = y; } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var LocalNameSet_1 = __nccwpck_require__(19049); -var NamespacePrefixMap_1 = __nccwpck_require__(90283); -var DOMException_1 = __nccwpck_require__(13166); -var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); -/** - * Represents an XML serializer. - * - * Implements: https://www.w3.org/TR/DOM-Parsing/#serializing - */ -var XMLSerializerImpl = /** @class */ (function () { - function XMLSerializerImpl() { + } + + return x; } - /** @inheritdoc */ - XMLSerializerImpl.prototype.serializeToString = function (root) { - /** - * The serializeToString(root) method must produce an XML serialization - * of root passing a value of false for the require well-formed parameter, - * and return the result. - */ - return this._xmlSerialization(root, false); - }; - /** - * Produces an XML serialization of the given node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + + + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. */ - XMLSerializerImpl.prototype._xmlSerialization = function (node, requireWellFormed) { - // To increase performance, use a namespace-aware serializer only if the - // document has namespaced elements - if (node._nodeDocument === undefined || node._nodeDocument._hasNamespaces) { - /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization - * - * 1. Let namespace be a context namespace with value null. - * The context namespace tracks the XML serialization algorithm's current - * default namespace. The context namespace is changed when either an Element - * Node has a default namespace declaration, or the algorithm generates a - * default namespace declaration for the Element Node to match its own - * namespace. The algorithm assumes no namespace (null) to start. - * 2. Let prefix map be a new namespace prefix map. - * 3. Add the XML namespace with prefix value "xml" to prefix map. - * 4. Let prefix index be a generated namespace prefix index with value 1. - * The generated namespace prefix index is used to generate a new unique - * prefix value when no suitable existing namespace prefix is available to - * serialize a node's namespaceURI (or the namespaceURI of one of node's - * attributes). See the generate a prefix algorithm. - */ - var namespace = null; - var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap(); - prefixMap.set("xml", infra_1.namespace.XML); - var prefixIndex = { value: 1 }; - /** - * 5. Return the result of running the XML serialization algorithm on node - * passing the context namespace namespace, namespace prefix map prefix map, - * generated namespace prefix index reference to prefix index, and the - * flag require well-formed. If an exception occurs during the execution - * of the algorithm, then catch that exception and throw an - * "InvalidStateError" DOMException. - */ - try { - return this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); - } - catch (_a) { - throw new DOMException_1.InvalidStateError(); - } - } - else { - try { - return this._serializeNode(node, requireWellFormed); - } - catch (_b) { - throw new DOMException_1.InvalidStateError(); + function normalise(n, c, e) { + var i = 1, + j = c.length; + + // Remove trailing zeros. + for (; !c[--j]; c.pop()); + + // Calculate the base 10 exponent. First get the number of digits of c[0]. + for (j = c[0]; j >= 10; j /= 10, i++); + + // Overflow? + if ((e = i + e * LOG_BASE - 1) > MAX_EXP) { + + // Infinity. + n.c = n.e = null; + + // Underflow? + } else if (e < MIN_EXP) { + + // Zero. + n.c = [n.e = 0]; + } else { + n.e = e; + n.c = c; + } + + return n; + } + + + // Handle values that fail the validity test in BigNumber. + parseNumeric = (function () { + var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, + dotAfter = /^([^.]+)\.$/, + dotBefore = /^\.([^.]+)$/, + isInfinityOrNaN = /^-?(Infinity|NaN)$/, + whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + + return function (x, str, isNum, b) { + var base, + s = isNum ? str : str.replace(whitespaceOrPlus, ''); + + // No exception on ±Infinity or NaN. + if (isInfinityOrNaN.test(s)) { + x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + } else { + if (!isNum) { + + // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i + s = s.replace(basePrefix, function (m, p1, p2) { + base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8; + return !b || b == base ? p1 : m; + }); + + if (b) { + base = b; + + // E.g. '1.' to '1', '.1' to '0.1' + s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1'); } + + if (str != s) return new BigNumber(s, base); + } + + // '[BigNumber Error] Not a number: {n}' + // '[BigNumber Error] Not a base {b} number: {n}' + if (BigNumber.DEBUG) { + throw Error + (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); + } + + // NaN + x.s = null; } - }; - /** - * Produces an XML serialization of a node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance - */ - XMLSerializerImpl.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { - switch (node.nodeType) { - case interfaces_1.NodeType.Element: - return this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); - case interfaces_1.NodeType.Document: - return this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); - case interfaces_1.NodeType.Comment: - return this._serializeComment(node, requireWellFormed); - case interfaces_1.NodeType.Text: - return this._serializeText(node, requireWellFormed); - case interfaces_1.NodeType.DocumentFragment: - return this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed); - case interfaces_1.NodeType.DocumentType: - return this._serializeDocumentType(node, requireWellFormed); - case interfaces_1.NodeType.ProcessingInstruction: - return this._serializeProcessingInstruction(node, requireWellFormed); - case interfaces_1.NodeType.CData: - return this._serializeCData(node, requireWellFormed); - default: - throw new Error("Unknown node type: " + node.nodeType); - } - }; - /** - * Produces an XML serialization of a node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - XMLSerializerImpl.prototype._serializeNode = function (node, requireWellFormed) { - switch (node.nodeType) { - case interfaces_1.NodeType.Element: - return this._serializeElement(node, requireWellFormed); - case interfaces_1.NodeType.Document: - return this._serializeDocument(node, requireWellFormed); - case interfaces_1.NodeType.Comment: - return this._serializeComment(node, requireWellFormed); - case interfaces_1.NodeType.Text: - return this._serializeText(node, requireWellFormed); - case interfaces_1.NodeType.DocumentFragment: - return this._serializeDocumentFragment(node, requireWellFormed); - case interfaces_1.NodeType.DocumentType: - return this._serializeDocumentType(node, requireWellFormed); - case interfaces_1.NodeType.ProcessingInstruction: - return this._serializeProcessingInstruction(node, requireWellFormed); - case interfaces_1.NodeType.CData: - return this._serializeCData(node, requireWellFormed); - default: - throw new Error("Unknown node type: " + node.nodeType); - } - }; - /** - * Produces an XML serialization of an element node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance + + x.c = x.e = null; + } + })(); + + + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. */ - XMLSerializerImpl.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { - var e_1, _a; - /** - * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node - * - * 1. If the require well-formed flag is set (its value is true), and this - * node's localName attribute contains the character ":" (U+003A COLON) or - * does not match the XML Name production, then throw an exception; the - * serialization of this node would not be a well-formed element. - */ - if (requireWellFormed && (node.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(node.localName))) { - throw new Error("Node local name contains invalid characters (well-formed required)."); - } - /** - * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). - * 3. Let qualified name be an empty string. - * 4. Let skip end tag be a boolean flag with value false. - * 5. Let ignore namespace definition attribute be a boolean flag with value - * false. - * 6. Given prefix map, copy a namespace prefix map and let map be the - * result. - * 7. Let local prefixes map be an empty map. The map has unique Node prefix - * strings as its keys, with corresponding namespaceURI Node values as the - * map's key values (in this map, the null namespace is represented by the - * empty string). - * - * _Note:_ This map is local to each element. It is used to ensure there - * are no conflicting prefixes should a new namespace prefix attribute need - * to be generated. It is also used to enable skipping of duplicate prefix - * definitions when writing an element's attributes: the map allows the - * algorithm to distinguish between a prefix in the namespace prefix map - * that might be locally-defined (to the current Element) and one that is - * not. - * 8. Let local default namespace be the result of recording the namespace - * information for node given map and local prefixes map. - * - * _Note:_ The above step will update map with any found namespace prefix - * definitions, add the found prefix definitions to the local prefixes map - * and return a local default namespace value defined by a default namespace - * attribute if one exists. Otherwise it returns null. - * 9. Let inherited ns be a copy of namespace. - * 10. Let ns be the value of node's namespaceURI attribute. - */ - var markup = "<"; - var qualifiedName = ''; - var skipEndTag = false; - var ignoreNamespaceDefinitionAttribute = false; - var map = prefixMap.copy(); - var localPrefixesMap = {}; - var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap); - var inheritedNS = namespace; - var ns = node.namespaceURI; - /** 11. If inherited ns is equal to ns, then: */ - if (inheritedNS === ns) { - /** - * 11.1. If local default namespace is not null, then set ignore - * namespace definition attribute to true. - */ - if (localDefaultNamespace !== null) { - ignoreNamespaceDefinitionAttribute = true; - } - /** - * 11.2. If ns is the XML namespace, then append to qualified name the - * concatenation of the string "xml:" and the value of node's localName. - * 11.3. Otherwise, append to qualified name the value of node's - * localName. The node's prefix if it exists, is dropped. - */ - if (ns === infra_1.namespace.XML) { - qualifiedName = 'xml:' + node.localName; - } - else { - qualifiedName = node.localName; - } - /** 11.4. Append the value of qualified name to markup. */ - markup += qualifiedName; - } - else { - /** - * 12. Otherwise, inherited ns is not equal to ns (the node's own - * namespace is different from the context namespace of its parent). - * Run these sub-steps: - * - * 12.1. Let prefix be the value of node's prefix attribute. - * 12.2. Let candidate prefix be the result of retrieving a preferred - * prefix string prefix from map given namespace ns. The above may return - * null if no namespace key ns exists in map. - */ - var prefix = node.prefix; - /** - * We don't need to run "retrieving a preferred prefix string" algorithm if - * the element has no prefix and its namespace matches to the default - * namespace. - * See: https://github.com/web-platform-tests/wpt/pull/16703 - */ - var candidatePrefix = null; - if (prefix !== null || ns !== localDefaultNamespace) { - candidatePrefix = map.get(prefix, ns); - } - /** - * 12.3. If the value of prefix matches "xmlns", then run the following - * steps: - */ - if (prefix === "xmlns") { - /** - * 12.3.1. If the require well-formed flag is set, then throw an error. - * An Element with prefix "xmlns" will not legally round-trip in a - * conforming XML parser. - */ - if (requireWellFormed) { - throw new Error("An element cannot have the 'xmlns' prefix (well-formed required)."); - } - /** - * 12.3.2. Let candidate prefix be the value of prefix. - */ - candidatePrefix = prefix; - } - /** - * 12.4.Found a suitable namespace prefix: if candidate prefix is not - * null (a namespace prefix is defined which maps to ns), then: - */ - if (candidatePrefix !== null) { - /** - * The following may serialize a different prefix than the Element's - * existing prefix if it already had one. However, the retrieving a - * preferred prefix string algorithm already tried to match the - * existing prefix if possible. - * - * 12.4.1. Append to qualified name the concatenation of candidate - * prefix, ":" (U+003A COLON), and node's localName. There exists on - * this node or the node's ancestry a namespace prefix definition that - * defines the node's namespace. - * 12.4.2. If the local default namespace is not null (there exists a - * locally-defined default namespace declaration attribute) and its - * value is not the XML namespace, then let inherited ns get the value - * of local default namespace unless the local default namespace is the - * empty string in which case let it get null (the context namespace - * is changed to the declared default, rather than this node's own - * namespace). - * - * _Note:_ Any default namespace definitions or namespace prefixes that - * define the XML namespace are omitted when serializing this node's - * attributes. - */ - qualifiedName = candidatePrefix + ':' + node.localName; - if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) { - inheritedNS = localDefaultNamespace || null; - } - /** - * 12.4.3. Append the value of qualified name to markup. - */ - markup += qualifiedName; - /** 12.5. Otherwise, if prefix is not null, then: */ - } - else if (prefix !== null) { - /** - * _Note:_ By this step, there is no namespace or prefix mapping - * declaration in this node (or any parent node visited by this - * algorithm) that defines prefix otherwise the step labelled Found - * a suitable namespace prefix would have been followed. The sub-steps - * that follow will create a new namespace prefix declaration for prefix - * and ensure that prefix does not conflict with an existing namespace - * prefix declaration of the same localName in node's attribute list. - * - * 12.5.1. If the local prefixes map contains a key matching prefix, - * then let prefix be the result of generating a prefix providing as - * input map, ns, and prefix index. - */ - if (prefix in localPrefixesMap) { - prefix = this._generatePrefix(ns, map, prefixIndex); - } - /** - * 12.5.2. Add prefix to map given namespace ns. - * 12.5.3. Append to qualified name the concatenation of prefix, ":" - * (U+003A COLON), and node's localName. - * 12.5.4. Append the value of qualified name to markup. - */ - map.set(prefix, ns); - qualifiedName += prefix + ':' + node.localName; - markup += qualifiedName; - /** - * 12.5.5. Append the following to markup, in the order listed: - * - * _Note:_ The following serializes a namespace prefix declaration for - * prefix which was just added to the map. - * - * 12.5.5.1. " " (U+0020 SPACE); - * 12.5.5.2. The string "xmlns:"; - * 12.5.5.3. The value of prefix; - * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 12.5.5.5. The result of serializing an attribute value given ns and - * the require well-formed flag as input; - * 12.5.5.6. """ (U+0022 QUOTATION MARK). - */ - markup += " xmlns:" + prefix + "=\"" + - this._serializeAttributeValue(ns, requireWellFormed) + "\""; - /** - * 12.5.5.7. If local default namespace is not null (there exists a - * locally-defined default namespace declaration attribute), then - * let inherited ns get the value of local default namespace unless the - * local default namespace is the empty string in which case let it get - * null. - */ - if (localDefaultNamespace !== null) { - inheritedNS = localDefaultNamespace || null; - } - /** - * 12.6. Otherwise, if local default namespace is null, or local - * default namespace is not null and its value is not equal to ns, then: - */ - } - else if (localDefaultNamespace === null || - (localDefaultNamespace !== null && localDefaultNamespace !== ns)) { - /** - * _Note:_ At this point, the namespace for this node still needs to be - * serialized, but there's no prefix (or candidate prefix) available; the - * following uses the default namespace declaration to define the - * namespace--optionally replacing an existing default declaration - * if present. - * - * 12.6.1. Set the ignore namespace definition attribute flag to true. - * 12.6.2. Append to qualified name the value of node's localName. - * 12.6.3. Let the value of inherited ns be ns. - * - * _Note:_ The new default namespace will be used in the serialization - * to define this node's namespace and act as the context namespace for - * its children. - */ - ignoreNamespaceDefinitionAttribute = true; - qualifiedName += node.localName; - inheritedNS = ns; - /** - * 12.6.4. Append the value of qualified name to markup. - */ - markup += qualifiedName; - /** - * 12.6.5. Append the following to markup, in the order listed: - * - * _Note:_ The following serializes the new (or replacement) default - * namespace definition. - * - * 12.6.5.1. " " (U+0020 SPACE); - * 12.6.5.2. The string "xmlns"; - * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 12.6.5.4. The result of serializing an attribute value given ns - * and the require well-formed flag as input; - * 12.6.5.5. """ (U+0022 QUOTATION MARK). - */ - markup += " xmlns" + "=\"" + - this._serializeAttributeValue(ns, requireWellFormed) + "\""; - /** - * 12.7. Otherwise, the node has a local default namespace that matches - * ns. Append to qualified name the value of node's localName, let the - * value of inherited ns be ns, and append the value of qualified name - * to markup. - */ - } - else { - qualifiedName += node.localName; - inheritedNS = ns; - markup += qualifiedName; - } - } - /** - * 13. Append to markup the result of the XML serialization of node's - * attributes given map, prefix index, local prefixes map, ignore namespace - * definition attribute flag, and require well-formed flag. - */ - markup += this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed); - /** - * 14. If ns is the HTML namespace, and the node's list of children is - * empty, and the node's localName matches any one of the following void - * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", - * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", - * "param", "source", "track", "wbr"; then append the following to markup, - * in the order listed: - * 14.1. " " (U+0020 SPACE); - * 14.2. "/" (U+002F SOLIDUS). - * and set the skip end tag flag to true. - * 15. If ns is not the HTML namespace, and the node's list of children is - * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end - * tag flag to true. - * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. - */ - var isHTML = (ns === infra_1.namespace.HTML); - if (isHTML && node.childNodes.length === 0 && - XMLSerializerImpl._VoidElementNames.has(node.localName)) { - markup += " /"; - skipEndTag = true; - } - else if (!isHTML && node.childNodes.length === 0) { - markup += "/"; - skipEndTag = true; - } - markup += ">"; - /** - * 17. If the value of skip end tag is true, then return the value of markup - * and skip the remaining steps. The node is a leaf-node. - */ - if (skipEndTag) - return markup; - /** - * 18. If ns is the HTML namespace, and the node's localName matches the - * string "template", then this is a template element. Append to markup the - * result of XML serializing a DocumentFragment node given the template - * element's template contents (a DocumentFragment), providing inherited - * ns, map, prefix index, and the require well-formed flag. - * - * _Note:_ This allows template content to round-trip, given the rules for - * parsing XHTML documents. - * - * 19. Otherwise, append to markup the result of running the XML - * serialization algorithm on each of node's children, in tree order, - * providing inherited ns, map, prefix index, and the require well-formed - * flag. - */ - if (isHTML && node.localName === "template") { - // TODO: serialize template contents - } - else { - try { - for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - markup += this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed); - } + function round(x, sd, rm, r) { + var d, i, j, k, n, ni, rd, + xc = x.c, + pows10 = POWS_TEN; + + // if x is not Infinity or NaN... + if (xc) { + + // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. + // n is a base 1e14 number, the value of the element of array x.c containing rd. + // ni is the index of n within x.c. + // d is the number of digits of n. + // i is the index of rd within n including leading zeros. + // j is the actual index of rd within n (if < 0, rd is a leading zero). + out: { + + // Get the number of digits of the first element of xc. + for (d = 1, k = xc[0]; k >= 10; k /= 10, d++); + i = sd - d; + + // If the rounding digit is in the first element of xc... + if (i < 0) { + i += LOG_BASE; + j = sd; + n = xc[ni = 0]; + + // Get the rounding digit at index j of n. + rd = mathfloor(n / pows10[d - j - 1] % 10); + } else { + ni = mathceil((i + 1) / LOG_BASE); + + if (ni >= xc.length) { + + if (r) { + + // Needed by sqrt. + for (; xc.length <= ni; xc.push(0)); + n = rd = 0; + d = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + n = k = xc[ni]; + + // Get the number of digits of n. + for (d = 1; k >= 10; k /= 10, d++); + + // Get the index of rd within n. + i %= LOG_BASE; + + // Get the index of rd within n, adjusted for leading zeros. + // The number of leading zeros of n is given by LOG_BASE - d. + j = i - LOG_BASE + d; + + // Get the rounding digit at index j of n. + rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10); } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + + r = r || sd < 0 || + + // Are there any non-zero digits after the rounding digit? + // The expression n % pows10[d - j - 1] returns all digits of n to the right + // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. + xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]); + + r = rm < 4 + ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) + : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 || + rm == (x.s < 0 ? 8 : 7)); + + if (sd < 1 || !xc[0]) { + xc.length = 0; + + if (r) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE]; + x.e = -sd || 0; + } else { + + // Zero. + xc[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if (i == 0) { + xc.length = ni; + k = 1; + ni--; + } else { + xc.length = ni + 1; + k = pows10[LOG_BASE - i]; + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of n. + xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0; + } + + // Round up? + if (r) { + + for (; ;) { + + // If the digit to be rounded up is in the first element of xc... + if (ni == 0) { + + // i will be the length of xc[0] before k is added. + for (i = 1, j = xc[0]; j >= 10; j /= 10, i++); + j = xc[0] += k; + for (k = 1; j >= 10; j /= 10, k++); + + // if i != k the length has increased. + if (i != k) { + x.e++; + if (xc[0] == BASE) xc[0] = 1; } - finally { if (e_1) throw e_1.error; } + + break; + } else { + xc[ni] += k; + if (xc[ni] != BASE) break; + xc[ni--] = 0; + k = 1; + } } + } + + // Remove trailing zeros. + for (i = xc.length; xc[--i] === 0; xc.pop()); } - /** - * 20. Append the following to markup, in the order listed: - * 20.1. "" (U+003E GREATER-THAN SIGN). - */ - markup += ""; - /** - * 21. Return the value of markup. - */ - return markup; + + // Overflow? Infinity. + if (x.e > MAX_EXP) { + x.c = x.e = null; + + // Underflow? Zero. + } else if (x.e < MIN_EXP) { + x.c = [x.e = 0]; + } + } + + return x; + } + + + function valueOf(n) { + var str, + e = n.e; + + if (e === null) return n.toString(); + + str = coeffToString(n.c); + + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential(str, e) + : toFixedPoint(str, e, '0'); + + return n.s < 0 ? '-' + str : str; + } + + + // PROTOTYPE/INSTANCE METHODS + + + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. + */ + P.absoluteValue = P.abs = function () { + var x = new BigNumber(this); + if (x.s < 0) x.s = 1; + return x; }; - /** - * Produces an XML serialization of a document node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance + + + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. */ - XMLSerializerImpl.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { - var e_2, _a; - /** - * If the require well-formed flag is set (its value is true), and this node - * has no documentElement (the documentElement attribute's value is null), - * then throw an exception; the serialization of this node would not be a - * well-formed document. - */ - if (requireWellFormed && node.documentElement === null) { - throw new Error("Missing document element (well-formed required)."); - } - /** - * Otherwise, run the following steps: - * 1. Let serialized document be an empty string. - * 2. For each child child of node, in tree order, run the XML - * serialization algorithm on the child passing along the provided - * arguments, and append the result to serialized document. - * - * _Note:_ This will serialize any number of ProcessingInstruction and - * Comment nodes both before and after the Document's documentElement node, - * including at most one DocumentType node. (Text nodes are not allowed as - * children of the Document.) - * - * 3. Return the value of serialized document. - */ - var serializedDocument = ""; - try { - for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - serializedDocument += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_2) throw e_2.error; } - } - return serializedDocument; + P.comparedTo = function (y, b) { + return compare(this, new BigNumber(y, b)); }; - /** - * Produces an XML serialization of a comment node. + + + /* + * If dp is undefined or null or true or false, return the number of decimal places of the + * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * [dp] {number} Decimal places: integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ - XMLSerializerImpl.prototype._serializeComment = function (node, requireWellFormed) { - /** - * If the require well-formed flag is set (its value is true), and node's - * data contains characters that are not matched by the XML Char production - * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that - * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception; - * the serialization of this node's data would not be well-formed. - */ - if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || - node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) { - throw new Error("Comment data contains invalid characters (well-formed required)."); - } - /** - * Otherwise, return the concatenation of "". - */ - return ""; + P.decimalPlaces = P.dp = function (dp, rm) { + var c, n, v, + x = this; + + if (dp != null) { + intCheck(dp, 0, MAX); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + + return round(new BigNumber(x), dp + x.e + 1, rm); + } + + if (!(c = x.c)) return null; + n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE; + + // Subtract the number of trailing zeros of the last number. + if (v = c[v]) for (; v % 10 == 0; v /= 10, n--); + if (n < 0) n = 0; + + return n; }; - /** - * Produces an XML serialization of a text node. + + + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - * @param level - current depth of the XML tree + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. */ - XMLSerializerImpl.prototype._serializeText = function (node, requireWellFormed) { - /** - * 1. If the require well-formed flag is set (its value is true), and - * node's data contains characters that are not matched by the XML Char - * production, then throw an exception; the serialization of this node's - * data would not be well-formed. - */ - if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) { - throw new Error("Text data contains invalid characters (well-formed required)."); - } - /** - * 2. Let markup be the value of node's data. - * 3. Replace any occurrences of "&" in markup by "&". - * 4. Replace any occurrences of "<" in markup by "<". - * 5. Replace any occurrences of ">" in markup by ">". - * 6. Return the value of markup. - */ - var result = ""; - for (var i = 0; i < node.data.length; i++) { - var c = node.data[i]; - if (c === "&") - result += "&"; - else if (c === "<") - result += "<"; - else if (c === ">") - result += ">"; - else - result += c; - } - return result; + P.dividedBy = P.div = function (y, b) { + return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); }; - /** - * Produces an XML serialization of a document fragment node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance + + + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). */ - XMLSerializerImpl.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed) { - var e_3, _a; - /** - * 1. Let markup the empty string. - * 2. For each child child of node, in tree order, run the XML serialization - * algorithm on the child given namespace, prefix map, a reference to prefix - * index, and flag require well-formed. Concatenate the result to markup. - * 3. Return the value of markup. - */ - var markup = ""; - try { - for (var _b = __values(node._children || node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - markup += this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_3) throw e_3.error; } - } - return markup; + P.dividedToIntegerBy = P.idiv = function (y, b) { + return div(this, new BigNumber(y, b), 0, 1); }; - /** - * Produces an XML serialization of a document type node. + + + /* + * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are integers, otherwise it + * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. + * + * n {number|string|BigNumber} The exponent. An integer. + * [m] {number|string|BigNumber} The modulus. + * + * '[BigNumber Error] Exponent not an integer: {n}' */ - XMLSerializerImpl.prototype._serializeDocumentType = function (node, requireWellFormed) { - /** - * 1. If the require well-formed flag is true and the node's publicId - * attribute contains characters that are not matched by the XML PubidChar - * production, then throw an exception; the serialization of this node - * would not be a well-formed document type declaration. - */ - if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) { - throw new Error("DocType public identifier does not match PubidChar construct (well-formed required)."); + P.exponentiatedBy = P.pow = function (n, m) { + var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, + x = this; + + n = new BigNumber(n); + + // Allow NaN and ±Infinity, but not other non-integers. + if (n.c && !n.isInteger()) { + throw Error + (bignumberError + 'Exponent not an integer: ' + valueOf(n)); + } + + if (m != null) m = new BigNumber(m); + + // Exponent of MAX_SAFE_INTEGER is 15. + nIsBig = n.e > 14; + + // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0. + if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) { + + // The sign of the result of pow when x is negative depends on the evenness of n. + // If +n overflows to ±Infinity, the evenness of n would be not be known. + y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n))); + return m ? y.mod(m) : y; + } + + nIsNeg = n.s < 0; + + if (m) { + + // x % m returns NaN if abs(m) is zero, or m is NaN. + if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN); + + isModExp = !nIsNeg && x.isInteger() && m.isInteger(); + + if (isModExp) x = x.mod(m); + + // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15. + // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15. + } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 + // [1, 240000000] + ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 + // [80000000000000] [99999750000000] + : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) { + + // If x is negative and n is odd, k = -0, else k = 0. + k = x.s < 0 && isOdd(n) ? -0 : 0; + + // If x >= 1, k = ±Infinity. + if (x.e > -1) k = 1 / k; + + // If n is negative return ±0, else return ±Infinity. + return new BigNumber(nIsNeg ? 1 / k : k); + + } else if (POW_PRECISION) { + + // Truncating each coefficient array to a length of k after each multiplication + // equates to truncating significant digits to POW_PRECISION + [28, 41], + // i.e. there will be a minimum of 28 guard digits retained. + k = mathceil(POW_PRECISION / LOG_BASE + 2); + } + + if (nIsBig) { + half = new BigNumber(0.5); + if (nIsNeg) n.s = 1; + nIsOdd = isOdd(n); + } else { + i = Math.abs(+valueOf(n)); + nIsOdd = i % 2; + } + + y = new BigNumber(ONE); + + // Performs 54 loop iterations for n of 9007199254740991. + for (; ;) { + + if (nIsOdd) { + y = y.times(x); + if (!y.c) break; + + if (k) { + if (y.c.length > k) y.c.length = k; + } else if (isModExp) { + y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m)); + } } - /** - * 2. If the require well-formed flag is true and the node's systemId - * attribute contains characters that are not matched by the XML Char - * production or that contains both a """ (U+0022 QUOTATION MARK) and a - * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization - * of this node would not be a well-formed document type declaration. - */ - if (requireWellFormed && - (!algorithm_1.xml_isLegalChar(node.systemId) || - (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) { - throw new Error("DocType system identifier contains invalid characters (well-formed required)."); + + if (i) { + i = mathfloor(i / 2); + if (i === 0) break; + nIsOdd = i % 2; + } else { + n = n.times(half); + round(n, n.e + 1, 1); + + if (n.e > 14) { + nIsOdd = isOdd(n); + } else { + i = +valueOf(n); + if (i === 0) break; + nIsOdd = i % 2; + } } - /** - * 3. Let markup be an empty string. - * 4. Append the string "" (U+003E GREATER-THAN SIGN) to markup. - * 11. Return the value of markup. - */ - return node.publicId && node.systemId ? - "" - : node.publicId ? - "" - : node.systemId ? - "" - : - ""; + + x = x.times(x); + + if (k) { + if (x.c && x.c.length > k) x.c.length = k; + } else if (isModExp) { + x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m)); + } + } + + if (isModExp) return y; + if (nIsNeg) y = ONE.div(y); + + return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; }; - /** - * Produces an XML serialization of a processing instruction node. + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer + * using rounding mode rm, or ROUNDING_MODE if rm is omitted. * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' */ - XMLSerializerImpl.prototype._serializeProcessingInstruction = function (node, requireWellFormed) { - /** - * 1. If the require well-formed flag is set (its value is true), and node's - * target contains a ":" (U+003A COLON) character or is an ASCII - * case-insensitive match for the string "xml", then throw an exception; - * the serialization of this node's target would not be well-formed. - */ - if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) { - throw new Error("Processing instruction target contains invalid characters (well-formed required)."); - } - /** - * 2. If the require well-formed flag is set (its value is true), and node's - * data contains characters that are not matched by the XML Char production - * or contains the string "?>" (U+003F QUESTION MARK, - * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of - * this node's data would not be well-formed. - */ - if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || - node.data.indexOf("?>") !== -1)) { - throw new Error("Processing instruction data contains invalid characters (well-formed required)."); - } - /** - * 3. Let markup be the concatenation of the following, in the order listed: - * 3.1. "" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN). - * 4. Return the value of markup. - */ - return ""; + P.integerValue = function (rm) { + var n = new BigNumber(this); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); + return round(n, n.e + 1, rm); }; - /** - * Produces an XML serialization of a CDATA node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + + + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise return false. */ - XMLSerializerImpl.prototype._serializeCData = function (node, requireWellFormed) { - if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) { - throw new Error("CDATA contains invalid characters (well-formed required)."); - } - return ""; + P.isEqualTo = P.eq = function (y, b) { + return compare(this, new BigNumber(y, b)) === 0; }; - /** - * Produces an XML serialization of the attributes of an element node. - * - * @param node - node to serialize - * @param map - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param localPrefixesMap - local prefixes map - * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace - * attributes - * @param requireWellFormed - whether to check conformance - */ - XMLSerializerImpl.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed) { - var e_4, _a; - /** - * 1. Let result be the empty string. - * 2. Let localname set be a new empty namespace localname set. This - * localname set will contain tuples of unique attribute namespaceURI and - * localName pairs, and is populated as each attr is processed. This set is - * used to [optionally] enforce the well-formed constraint that an element - * cannot have two attributes with the same namespaceURI and localName. - * This can occur when two otherwise identical attributes on the same - * element differ only by their prefix values. - */ - var result = ""; - var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined; - try { - /** - * 3. Loop: For each attribute attr in element's attributes, in the order - * they are specified in the element's attribute list: - */ - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - // Optimize common case - if (!ignoreNamespaceDefinitionAttribute && !requireWellFormed && attr.namespaceURI === null) { - result += " " + attr.localName + "=\"" + - this._serializeAttributeValue(attr.value, requireWellFormed) + "\""; - continue; - } - /** - * 3.1. If the require well-formed flag is set (its value is true), and the - * localname set contains a tuple whose values match those of a new tuple - * consisting of attr's namespaceURI attribute and localName attribute, - * then throw an exception; the serialization of this attr would fail to - * produce a well-formed element serialization. - */ - if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) { - throw new Error("Element contains duplicate attributes (well-formed required)."); - } - /** - * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and - * localName attribute, and add it to the localname set. - * 3.3. Let attribute namespace be the value of attr's namespaceURI value. - * 3.4. Let candidate prefix be null. - */ - if (requireWellFormed && localNameSet) - localNameSet.set(attr.namespaceURI, attr.localName); - var attributeNamespace = attr.namespaceURI; - var candidatePrefix = null; - /** 3.5. If attribute namespace is not null, then run these sub-steps: */ - if (attributeNamespace !== null) { - /** - * 3.5.1. Let candidate prefix be the result of retrieving a preferred - * prefix string from map given namespace attribute namespace with - * preferred prefix being attr's prefix value. - */ - candidatePrefix = map.get(attr.prefix, attributeNamespace); - /** - * 3.5.2. If the value of attribute namespace is the XMLNS namespace, - * then run these steps: - */ - if (attributeNamespace === infra_1.namespace.XMLNS) { - /** - * 3.5.2.1. If any of the following are true, then stop running these - * steps and goto Loop to visit the next attribute: - * - the attr's value is the XML namespace; - * _Note:_ The XML namespace cannot be redeclared and survive - * round-tripping (unless it defines the prefix "xml"). To avoid this - * problem, this algorithm always prefixes elements in the XML - * namespace with "xml" and drops any related definitions as seen - * in the above condition. - * - the attr's prefix is null and the ignore namespace definition - * attribute flag is true (the Element's default namespace attribute - * should be skipped); - * - the attr's prefix is not null and either - * * the attr's localName is not a key contained in the local - * prefixes map, or - * * the attr's localName is present in the local prefixes map but - * the value of the key does not match attr's value - * and furthermore that the attr's localName (as the prefix to find) - * is found in the namespace prefix map given the namespace consisting - * of the attr's value (the current namespace prefix definition was - * exactly defined previously--on an ancestor element not the current - * element whose attributes are being processed). - */ - if (attr.value === infra_1.namespace.XML || - (attr.prefix === null && ignoreNamespaceDefinitionAttribute) || - (attr.prefix !== null && (!(attr.localName in localPrefixesMap) || - localPrefixesMap[attr.localName] !== attr.value) && - map.has(attr.localName, attr.value))) - continue; - /** - * 3.5.2.2. If the require well-formed flag is set (its value is true), - * and the value of attr's value attribute matches the XMLNS - * namespace, then throw an exception; the serialization of this - * attribute would produce invalid XML because the XMLNS namespace - * is reserved and cannot be applied as an element's namespace via - * XML parsing. - * - * _Note:_ DOM APIs do allow creation of elements in the XMLNS - * namespace but with strict qualifications. - */ - if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) { - throw new Error("XMLNS namespace is reserved (well-formed required)."); - } - /** - * 3.5.2.3. If the require well-formed flag is set (its value is true), - * and the value of attr's value attribute is the empty string, then - * throw an exception; namespace prefix declarations cannot be used - * to undeclare a namespace (use a default namespace declaration - * instead). - */ - if (requireWellFormed && attr.value === '') { - throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."); - } - /** - * 3.5.2.4. the attr's prefix matches the string "xmlns", then let - * candidate prefix be the string "xmlns". - */ - if (attr.prefix === 'xmlns') - candidatePrefix = 'xmlns'; - /** - * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace. - * Run these steps: - * - * _Note:_ The (candidatePrefix === null) check is not in the spec. - * We deviate from the spec here. Otherwise a prefix is generated for - * all attributes with namespaces. - */ - } - else if (candidatePrefix === null) { - if (attr.prefix !== null && - (!map.hasPrefix(attr.prefix) || - map.has(attr.prefix, attributeNamespace))) { - /** - * Check if we can use the attribute's own prefix. - * We deviate from the spec here. - * TODO: This is not an efficient way of searching for prefixes. - * Follow developments to the spec. - */ - candidatePrefix = attr.prefix; - } - else { - /** - * 3.5.3.1. Let candidate prefix be the result of generating a prefix - * providing map, attribute namespace, and prefix index as input. - */ - candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex); - } - /** - * 3.5.3.2. Append the following to result, in the order listed: - * 3.5.3.2.1. " " (U+0020 SPACE); - * 3.5.3.2.2. The string "xmlns:"; - * 3.5.3.2.3. The value of candidate prefix; - * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 3.5.3.2.5. The result of serializing an attribute value given - * attribute namespace and the require well-formed flag as input; - * 3.5.3.2.6. """ (U+0022 QUOTATION MARK). - */ - result += " xmlns:" + candidatePrefix + "=\"" + - this._serializeAttributeValue(attributeNamespace, requireWellFormed) + "\""; - } - } - /** - * 3.6. Append a " " (U+0020 SPACE) to result. - * 3.7. If candidate prefix is not null, then append to result the - * concatenation of candidate prefix with ":" (U+003A COLON). - */ - result += " "; - if (candidatePrefix !== null) { - result += candidatePrefix + ':'; - } - /** - * 3.8. If the require well-formed flag is set (its value is true), and - * this attr's localName attribute contains the character - * ":" (U+003A COLON) or does not match the XML Name production or - * equals "xmlns" and attribute namespace is null, then throw an - * exception; the serialization of this attr would not be a - * well-formed attribute. - */ - if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(attr.localName) || - (attr.localName === "xmlns" && attributeNamespace === null))) { - throw new Error("Attribute local name contains invalid characters (well-formed required)."); - } - /** - * 3.9. Append the following strings to result, in the order listed: - * 3.9.1. The value of attr's localName; - * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 3.9.3. The result of serializing an attribute value given attr's value - * attribute and the require well-formed flag as input; - * 3.9.4. """ (U+0022 QUOTATION MARK). - */ - result += attr.localName + "=\"" + - this._serializeAttributeValue(attr.value, requireWellFormed) + "\""; - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_4) throw e_4.error; } - } - /** - * 4. Return the value of result. - */ - return result; + + + /* + * Return true if the value of this BigNumber is a finite number, otherwise return false. + */ + P.isFinite = function () { + return !!this.c; }; - /** - * Records namespace information for the given element and returns the - * default namespace attribute value. - * - * @param node - element node to process - * @param map - namespace prefix map - * @param localPrefixesMap - local prefixes map - */ - XMLSerializerImpl.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) { - var e_5, _a; - /** - * 1. Let default namespace attr value be null. - */ - var defaultNamespaceAttrValue = null; - try { - /** - * 2. Main: For each attribute attr in element's attributes, in the order - * they are specified in the element's attribute list: - */ - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - /** - * _Note:_ The following conditional steps find namespace prefixes. Only - * attributes in the XMLNS namespace are considered (e.g., attributes made - * to look like namespace declarations via - * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not - * included). - */ - /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */ - var attributeNamespace = attr.namespaceURI; - /** 2.2. Let attribute prefix be the value of attr's prefix. */ - var attributePrefix = attr.prefix; - /** 2.3. If the attribute namespace is the XMLNS namespace, then: */ - if (attributeNamespace === infra_1.namespace.XMLNS) { - /** - * 2.3.1. If attribute prefix is null, then attr is a default namespace - * declaration. Set the default namespace attr value to attr's value and - * stop running these steps, returning to Main to visit the next - * attribute. - */ - if (attributePrefix === null) { - defaultNamespaceAttrValue = attr.value; - continue; - /** - * 2.3.2. Otherwise, the attribute prefix is not null and attr is a - * namespace prefix definition. Run the following steps: - */ - } - else { - /** 2.3.2.1. Let prefix definition be the value of attr's localName. */ - var prefixDefinition = attr.localName; - /** 2.3.2.2. Let namespace definition be the value of attr's value. */ - var namespaceDefinition = attr.value; - /** - * 2.3.2.3. If namespace definition is the XML namespace, then stop - * running these steps, and return to Main to visit the next - * attribute. - * - * _Note:_ XML namespace definitions in prefixes are completely - * ignored (in order to avoid unnecessary work when there might be - * prefix conflicts). XML namespaced elements are always handled - * uniformly by prefixing (and overriding if necessary) the element's - * localname with the reserved "xml" prefix. - */ - if (namespaceDefinition === infra_1.namespace.XML) { - continue; - } - /** - * 2.3.2.4. If namespace definition is the empty string (the - * declarative form of having no namespace), then let namespace - * definition be null instead. - */ - if (namespaceDefinition === '') { - namespaceDefinition = null; - } - /** - * 2.3.2.5. If prefix definition is found in map given the namespace - * namespace definition, then stop running these steps, and return to - * Main to visit the next attribute. - * - * _Note:_ This step avoids adding duplicate prefix definitions for - * the same namespace in the map. This has the side-effect of avoiding - * later serialization of duplicate namespace prefix declarations in - * any descendant nodes. - */ - if (map.has(prefixDefinition, namespaceDefinition)) { - continue; - } - /** - * 2.3.2.6. Add the prefix prefix definition to map given namespace - * namespace definition. - */ - map.set(prefixDefinition, namespaceDefinition); - /** - * 2.3.2.7. Add the value of prefix definition as a new key to the - * local prefixes map, with the namespace definition as the key's - * value replacing the value of null with the empty string if - * applicable. - */ - localPrefixesMap[prefixDefinition] = namespaceDefinition || ''; - } - } - } - } - catch (e_5_1) { e_5 = { error: e_5_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_5) throw e_5.error; } - } - /** - * 3. Return the value of default namespace attr value. - * - * _Note:_ The empty string is a legitimate return value and is not - * converted to null. - */ - return defaultNamespaceAttrValue; + + + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise return false. + */ + P.isGreaterThan = P.gt = function (y, b) { + return compare(this, new BigNumber(y, b)) > 0; + }; + + + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise return false. + */ + P.isGreaterThanOrEqualTo = P.gte = function (y, b) { + return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0; + + }; + + + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. + */ + P.isInteger = function () { + return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; + }; + + + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise return false. + */ + P.isLessThan = P.lt = function (y, b) { + return compare(this, new BigNumber(y, b)) < 0; + }; + + + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise return false. + */ + P.isLessThanOrEqualTo = P.lte = function (y, b) { + return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0; }; - /** - * Generates a new prefix for the given namespace. - * - * @param newNamespace - a namespace to generate prefix for - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - */ - XMLSerializerImpl.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) { - /** - * 1. Let generated prefix be the concatenation of the string "ns" and the - * current numerical value of prefix index. - * 2. Let the value of prefix index be incremented by one. - * 3. Add to map the generated prefix given the new namespace namespace. - * 4. Return the value of generated prefix. - */ - var generatedPrefix = "ns" + prefixIndex.value; - prefixIndex.value++; - prefixMap.set(generatedPrefix, newNamespace); - return generatedPrefix; + + + /* + * Return true if the value of this BigNumber is NaN, otherwise return false. + */ + P.isNaN = function () { + return !this.s; }; - /** - * Produces an XML serialization of an attribute value. - * - * @param value - attribute value - * @param requireWellFormed - whether to check conformance + + + /* + * Return true if the value of this BigNumber is negative, otherwise return false. */ - XMLSerializerImpl.prototype._serializeAttributeValue = function (value, requireWellFormed) { - /** - * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value - * - * 1. If the require well-formed flag is set (its value is true), and - * attribute value contains characters that are not matched by the XML Char - * production, then throw an exception; the serialization of this attribute - * value would fail to produce a well-formed element serialization. - */ - if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) { - throw new Error("Invalid characters in attribute value."); - } - /** - * 2. If attribute value is null, then return the empty string. - */ - if (value === null) - return ""; - /** - * 3. Otherwise, attribute value is a string. Return the value of attribute - * value, first replacing any occurrences of the following: - * - "&" with "&" - * - """ with """ - * - "<" with "<" - * - ">" with ">" - * NOTE - * This matches behavior present in browsers, and goes above and beyond the - * grammar requirement in the XML specification's AttValue production by - * also replacing ">" characters. - */ - var result = ""; - for (var i = 0; i < value.length; i++) { - var c = value[i]; - if (c === "\"") - result += """; - else if (c === "&") - result += "&"; - else if (c === "<") - result += "<"; - else if (c === ">") - result += ">"; - else - result += c; - } - return result; + P.isNegative = function () { + return this.s < 0; }; - /** - * Produces an XML serialization of an element node. + + + /* + * Return true if the value of this BigNumber is positive, otherwise return false. + */ + P.isPositive = function () { + return this.s > 0; + }; + + + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise return false. + */ + P.isZero = function () { + return !!this.c && this.c[0] == 0; + }; + + + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). */ - XMLSerializerImpl.prototype._serializeElement = function (node, requireWellFormed) { - var e_6, _a; - /** - * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node - * - * 1. If the require well-formed flag is set (its value is true), and this - * node's localName attribute contains the character ":" (U+003A COLON) or - * does not match the XML Name production, then throw an exception; the - * serialization of this node would not be a well-formed element. - */ - if (requireWellFormed && (node.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(node.localName))) { - throw new Error("Node local name contains invalid characters (well-formed required)."); + P.minus = function (y, b) { + var i, j, t, xLTy, + x = this, + a = x.s; + + y = new BigNumber(y, b); + b = y.s; + + // Either NaN? + if (!a || !b) return new BigNumber(NaN); + + // Signs differ? + if (a != b) { + y.s = -b; + return x.plus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if (!xe || !ye) { + + // Either Infinity? + if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN); + + // Either zero? + if (!xc[0] || !yc[0]) { + + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : + + // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity + ROUNDING_MODE == 3 ? -0 : 0); } - /** - * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). - * 3. Let qualified name be an empty string. - * 4. Let skip end tag be a boolean flag with value false. - * 5. Let ignore namespace definition attribute be a boolean flag with value - * false. - * 6. Given prefix map, copy a namespace prefix map and let map be the - * result. - * 7. Let local prefixes map be an empty map. The map has unique Node prefix - * strings as its keys, with corresponding namespaceURI Node values as the - * map's key values (in this map, the null namespace is represented by the - * empty string). - * - * _Note:_ This map is local to each element. It is used to ensure there - * are no conflicting prefixes should a new namespace prefix attribute need - * to be generated. It is also used to enable skipping of duplicate prefix - * definitions when writing an element's attributes: the map allows the - * algorithm to distinguish between a prefix in the namespace prefix map - * that might be locally-defined (to the current Element) and one that is - * not. - * 8. Let local default namespace be the result of recording the namespace - * information for node given map and local prefixes map. - * - * _Note:_ The above step will update map with any found namespace prefix - * definitions, add the found prefix definitions to the local prefixes map - * and return a local default namespace value defined by a default namespace - * attribute if one exists. Otherwise it returns null. - * 9. Let inherited ns be a copy of namespace. - * 10. Let ns be the value of node's namespaceURI attribute. - */ - var skipEndTag = false; - /** 11. If inherited ns is equal to ns, then: */ - /** - * 11.1. If local default namespace is not null, then set ignore - * namespace definition attribute to true. - * 11.2. If ns is the XML namespace, then append to qualified name the - * concatenation of the string "xml:" and the value of node's localName. - * 11.3. Otherwise, append to qualified name the value of node's - * localName. The node's prefix if it exists, is dropped. - */ - var qualifiedName = node.localName; - /** 11.4. Append the value of qualified name to markup. */ - var markup = "<" + qualifiedName; - /** - * 13. Append to markup the result of the XML serialization of node's - * attributes given map, prefix index, local prefixes map, ignore namespace - * definition attribute flag, and require well-formed flag. - */ - markup += this._serializeAttributes(node, requireWellFormed); - /** - * 14. If ns is the HTML namespace, and the node's list of children is - * empty, and the node's localName matches any one of the following void - * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", - * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", - * "param", "source", "track", "wbr"; then append the following to markup, - * in the order listed: - * 14.1. " " (U+0020 SPACE); - * 14.2. "/" (U+002F SOLIDUS). - * and set the skip end tag flag to true. - * 15. If ns is not the HTML namespace, and the node's list of children is - * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end - * tag flag to true. - * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. - */ - if (node._children.size === 0) { - markup += "/"; - skipEndTag = true; + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Determine which is the bigger number. + if (a = xe - ye) { + + if (xLTy = a < 0) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; } - markup += ">"; - /** - * 17. If the value of skip end tag is true, then return the value of markup - * and skip the remaining steps. The node is a leaf-node. - */ - if (skipEndTag) - return markup; - try { - /** - * 18. If ns is the HTML namespace, and the node's localName matches the - * string "template", then this is a template element. Append to markup the - * result of XML serializing a DocumentFragment node given the template - * element's template contents (a DocumentFragment), providing inherited - * ns, map, prefix index, and the require well-formed flag. - * - * _Note:_ This allows template content to round-trip, given the rules for - * parsing XHTML documents. - * - * 19. Otherwise, append to markup the result of running the XML - * serialization algorithm on each of node's children, in tree order, - * providing inherited ns, map, prefix index, and the require well-formed - * flag. - */ - for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - markup += this._serializeNode(childNode, requireWellFormed); - } + + t.reverse(); + + // Prepend zeros to equalise exponents. + for (b = a; b--; t.push(0)); + t.reverse(); + } else { + + // Exponents equal. Check digit by digit. + j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b; + + for (a = b = 0; b < j; b++) { + + if (xc[b] != yc[b]) { + xLTy = xc[b] < yc[b]; + break; + } } - catch (e_6_1) { e_6 = { error: e_6_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_6) throw e_6.error; } + } + + // x < y? Point xc to the array of the bigger number. + if (xLTy) { + t = xc; + xc = yc; + yc = t; + y.s = -y.s; + } + + b = (j = yc.length) - (i = xc.length); + + // Append zeros to xc if shorter. + // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. + if (b > 0) for (; b--; xc[i++] = 0); + b = BASE - 1; + + // Subtract yc from xc. + for (; j > a;) { + + if (xc[--j] < yc[j]) { + for (i = j; i && !xc[--i]; xc[i] = b); + --xc[i]; + xc[j] += BASE; } - /** - * 20. Append the following to markup, in the order listed: - * 20.1. "" (U+003E GREATER-THAN SIGN). - */ - markup += ""; - /** - * 21. Return the value of markup. - */ - return markup; + + xc[j] -= yc[j]; + } + + // Remove leading zeros and adjust exponent accordingly. + for (; xc[0] == 0; xc.splice(0, 1), --ye); + + // Zero? + if (!xc[0]) { + + // Following IEEE 754 (2008) 6.3, + // n - n = +0 but n - n = -0 when rounding towards -Infinity. + y.s = ROUNDING_MODE == 3 ? -1 : 1; + y.c = [y.e = 0]; + return y; + } + + // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity + // for finite x and y. + return normalise(y, xc, ye); }; - /** - * Produces an XML serialization of a document node. + + + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. */ - XMLSerializerImpl.prototype._serializeDocument = function (node, requireWellFormed) { - var e_7, _a; - /** - * If the require well-formed flag is set (its value is true), and this node - * has no documentElement (the documentElement attribute's value is null), - * then throw an exception; the serialization of this node would not be a - * well-formed document. - */ - if (requireWellFormed && node.documentElement === null) { - throw new Error("Missing document element (well-formed required)."); - } - /** - * Otherwise, run the following steps: - * 1. Let serialized document be an empty string. - * 2. For each child child of node, in tree order, run the XML - * serialization algorithm on the child passing along the provided - * arguments, and append the result to serialized document. - * - * _Note:_ This will serialize any number of ProcessingInstruction and - * Comment nodes both before and after the Document's documentElement node, - * including at most one DocumentType node. (Text nodes are not allowed as - * children of the Document.) - * - * 3. Return the value of serialized document. - */ - var serializedDocument = ""; - try { - for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - serializedDocument += this._serializeNode(childNode, requireWellFormed); - } - } - catch (e_7_1) { e_7 = { error: e_7_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_7) throw e_7.error; } - } - return serializedDocument; + P.modulo = P.mod = function (y, b) { + var q, s, + x = this; + + y = new BigNumber(y, b); + + // Return NaN if x is Infinity or NaN, or y is NaN or zero. + if (!x.c || !y.s || y.c && !y.c[0]) { + return new BigNumber(NaN); + + // Return x if y is Infinity or x is zero. + } else if (!y.c || x.c && !x.c[0]) { + return new BigNumber(x); + } + + if (MODULO_MODE == 9) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // r = x - qy where 0 <= r < abs(y) + s = y.s; + y.s = 1; + q = div(x, y, 0, 3); + y.s = s; + q.s *= s; + } else { + q = div(x, y, 0, MODULO_MODE); + } + + y = x.minus(q.times(y)); + + // To match JavaScript %, ensure sign of zero is sign of dividend. + if (!y.c[0] && MODULO_MODE == 1) y.s = x.s; + + return y; }; - /** - * Produces an XML serialization of a document fragment node. + + + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value + * of BigNumber(y, b). */ - XMLSerializerImpl.prototype._serializeDocumentFragment = function (node, requireWellFormed) { - var e_8, _a; - /** - * 1. Let markup the empty string. - * 2. For each child child of node, in tree order, run the XML serialization - * algorithm on the child given namespace, prefix map, a reference to prefix - * index, and flag require well-formed. Concatenate the result to markup. - * 3. Return the value of markup. - */ - var markup = ""; - try { - for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - markup += this._serializeNode(childNode, requireWellFormed); - } + P.multipliedBy = P.times = function (y, b) { + var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, + base, sqrtBase, + x = this, + xc = x.c, + yc = (y = new BigNumber(y, b)).c; + + // Either NaN, ±Infinity or ±0? + if (!xc || !yc || !xc[0] || !yc[0]) { + + // Return NaN if either is NaN, or one is 0 and the other is Infinity. + if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) { + y.c = y.e = y.s = null; + } else { + y.s *= x.s; + + // Return ±Infinity if either is ±Infinity. + if (!xc || !yc) { + y.c = y.e = null; + + // Return ±0 if either is ±0. + } else { + y.c = [0]; + y.e = 0; + } } - catch (e_8_1) { e_8 = { error: e_8_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_8) throw e_8.error; } + + return y; + } + + e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE); + y.s *= x.s; + xcL = xc.length; + ycL = yc.length; + + // Ensure xc points to longer array and xcL to its length. + if (xcL < ycL) { + zc = xc; + xc = yc; + yc = zc; + i = xcL; + xcL = ycL; + ycL = i; + } + + // Initialise the result array with zeros. + for (i = xcL + ycL, zc = []; i--; zc.push(0)); + + base = BASE; + sqrtBase = SQRT_BASE; + + for (i = ycL; --i >= 0;) { + c = 0; + ylo = yc[i] % sqrtBase; + yhi = yc[i] / sqrtBase | 0; + + for (k = xcL, j = i + k; j > i;) { + xlo = xc[--k] % sqrtBase; + xhi = xc[k] / sqrtBase | 0; + m = yhi * xlo + xhi * ylo; + xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c; + c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi; + zc[j--] = xlo % base; } - return markup; + + zc[j] = c; + } + + if (c) { + ++e; + } else { + zc.splice(0, 1); + } + + return normalise(y, zc, e); }; - /** - * Produces an XML serialization of the attributes of an element node. + + + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. + */ + P.negated = function () { + var x = new BigNumber(this); + x.s = -x.s || null; + return x; + }; + + + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). */ - XMLSerializerImpl.prototype._serializeAttributes = function (node, requireWellFormed) { - var e_9, _a; - /** - * 1. Let result be the empty string. - * 2. Let localname set be a new empty namespace localname set. This - * localname set will contain tuples of unique attribute namespaceURI and - * localName pairs, and is populated as each attr is processed. This set is - * used to [optionally] enforce the well-formed constraint that an element - * cannot have two attributes with the same namespaceURI and localName. - * This can occur when two otherwise identical attributes on the same - * element differ only by their prefix values. - */ - var result = ""; - var localNameSet = requireWellFormed ? {} : undefined; - try { - /** - * 3. Loop: For each attribute attr in element's attributes, in the order - * they are specified in the element's attribute list: - */ - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - /** - * 3.1. If the require well-formed flag is set (its value is true), and the - * localname set contains a tuple whose values match those of a new tuple - * consisting of attr's namespaceURI attribute and localName attribute, - * then throw an exception; the serialization of this attr would fail to - * produce a well-formed element serialization. - */ - if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) { - throw new Error("Element contains duplicate attributes (well-formed required)."); - } - /** - * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and - * localName attribute, and add it to the localname set. - * 3.3. Let attribute namespace be the value of attr's namespaceURI value. - * 3.4. Let candidate prefix be null. - */ - if (requireWellFormed && localNameSet) - localNameSet[attr.localName] = true; - /** 3.5. If attribute namespace is not null, then run these sub-steps: */ - /** - * 3.6. Append a " " (U+0020 SPACE) to result. - * 3.7. If candidate prefix is not null, then append to result the - * concatenation of candidate prefix with ":" (U+003A COLON). - */ - /** - * 3.8. If the require well-formed flag is set (its value is true), and - * this attr's localName attribute contains the character - * ":" (U+003A COLON) or does not match the XML Name production or - * equals "xmlns" and attribute namespace is null, then throw an - * exception; the serialization of this attr would not be a - * well-formed attribute. - */ - if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(attr.localName))) { - throw new Error("Attribute local name contains invalid characters (well-formed required)."); - } - /** - * 3.9. Append the following strings to result, in the order listed: - * 3.9.1. The value of attr's localName; - * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 3.9.3. The result of serializing an attribute value given attr's value - * attribute and the require well-formed flag as input; - * 3.9.4. """ (U+0022 QUOTATION MARK). - */ - result += " " + attr.localName + "=\"" + - this._serializeAttributeValue(attr.value, requireWellFormed) + "\""; - } - } - catch (e_9_1) { e_9 = { error: e_9_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_9) throw e_9.error; } + P.plus = function (y, b) { + var t, + x = this, + a = x.s; + + y = new BigNumber(y, b); + b = y.s; + + // Either NaN? + if (!a || !b) return new BigNumber(NaN); + + // Signs differ? + if (a != b) { + y.s = -b; + return x.minus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if (!xe || !ye) { + + // Return ±Infinity if either ±Infinity. + if (!xc || !yc) return new BigNumber(a / 0); + + // Either zero? + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0); + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. + if (a = xe - ye) { + if (a > 0) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; } - /** - * 4. Return the value of result. - */ - return result; - }; - XMLSerializerImpl._VoidElementNames = new Set(['area', 'base', 'basefont', - 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', - 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); - return XMLSerializerImpl; -}()); -exports.XMLSerializerImpl = XMLSerializerImpl; -//# sourceMappingURL=XMLSerializerImpl.js.map -/***/ }), + t.reverse(); + for (; a--; t.push(0)); + t.reverse(); + } -/***/ 87119: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + a = xc.length; + b = yc.length; -"use strict"; + // Point xc to the longer array, and b to the shorter length. + if (a - b < 0) { + t = yc; + yc = xc; + xc = t; + b = a; + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -// Export classes -var XMLSerializerImpl_1 = __nccwpck_require__(85039); -exports.XMLSerializer = XMLSerializerImpl_1.XMLSerializerImpl; -//# sourceMappingURL=index.js.map + // Only start adding at yc.length - 1 as the further digits of xc can be ignored. + for (a = 0; b;) { + a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0; + xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; + } -/***/ }), + if (a) { + xc = [a].concat(xc); + ++ye; + } -/***/ 75483: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + // ye = MAX_EXP + 1 possible + return normalise(y, xc, ye); + }; -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Guard_1 = __nccwpck_require__(66862); -/** - * Contains type casts for DOM objects. - */ -var Cast = /** @class */ (function () { - function Cast() { - } - /** - * Casts the given object to a `Node`. + /* + * If sd is undefined or null or true or false, return the number of significant digits of + * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. + * If sd is true include integer-part trailing zeros in the count. * - * @param a - the object to cast + * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this + * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or + * ROUNDING_MODE if rm is omitted. + * + * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. + * boolean: whether to count integer-part trailing zeros: true or false. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' */ - Cast.asNode = function (a) { - if (Guard_1.Guard.isNode(a)) { - return a; - } - else { - throw new Error("Invalid object. Node expected."); - } - }; - return Cast; -}()); -exports.Cast = Cast; -//# sourceMappingURL=Cast.js.map + P.precision = P.sd = function (sd, rm) { + var c, n, v, + x = this; -/***/ }), + if (sd != null && sd !== !!sd) { + intCheck(sd, 1, MAX); + if (rm == null) rm = ROUNDING_MODE; + else intCheck(rm, 0, 8); -/***/ 88392: -/***/ ((__unused_webpack_module, exports) => { + return round(new BigNumber(x), sd, rm); + } -"use strict"; + if (!(c = x.c)) return null; + v = c.length - 1; + n = v * LOG_BASE + 1; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var EmptySet = /** @class */ (function () { - function EmptySet() { - } - Object.defineProperty(EmptySet.prototype, "size", { - get: function () { - return 0; - }, - enumerable: true, - configurable: true - }); - EmptySet.prototype.add = function (value) { - throw new Error("Cannot add to an empty set."); - }; - EmptySet.prototype.clear = function () { - // no-op - }; - EmptySet.prototype.delete = function (value) { - return false; - }; - EmptySet.prototype.forEach = function (callbackfn, thisArg) { - // no-op - }; - EmptySet.prototype.has = function (value) { - return false; - }; - EmptySet.prototype[Symbol.iterator] = function () { - return new EmptySetIterator(); - }; - EmptySet.prototype.entries = function () { - return new EmptySetIterator(); - }; - EmptySet.prototype.keys = function () { - return new EmptySetIterator(); - }; - EmptySet.prototype.values = function () { - return new EmptySetIterator(); - }; - Object.defineProperty(EmptySet.prototype, Symbol.toStringTag, { - get: function () { - return "EmptySet"; - }, - enumerable: true, - configurable: true - }); - return EmptySet; -}()); -exports.EmptySet = EmptySet; -var EmptySetIterator = /** @class */ (function () { - function EmptySetIterator() { - } - EmptySetIterator.prototype[Symbol.iterator] = function () { - return this; + if (v = c[v]) { + + // Subtract the number of trailing zeros of the last element. + for (; v % 10 == 0; v /= 10, n--); + + // Add the number of digits of the first element. + for (v = c[0]; v >= 10; v /= 10, n++); + } + + if (sd && x.e + 1 > n) n = x.e + 1; + + return n; }; - EmptySetIterator.prototype.next = function () { - return { done: true, value: null }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' + */ + P.shiftedBy = function (k) { + intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); + return this.times('1e' + k); }; - return EmptySetIterator; -}()); -//# sourceMappingURL=EmptySet.js.map -/***/ }), -/***/ 66862: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + /* + * sqrt(-n) = N + * sqrt(N) = N + * sqrt(-I) = N + * sqrt(I) = I + * sqrt(0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.squareRoot = P.sqrt = function () { + var m, n, r, rep, t, + x = this, + c = x.c, + s = x.s, + e = x.e, + dp = DECIMAL_PLACES + 4, + half = new BigNumber('0.5'); -"use strict"; + // Negative/NaN/Infinity/zero? + if (s !== 1 || !c || !c[0]) { + return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); + } + + // Initial estimate. + s = Math.sqrt(+valueOf(x)); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if (s == 0 || s == 1 / 0) { + n = coeffToString(c); + if ((n.length + e) % 2 == 0) n += '0'; + s = Math.sqrt(+n); + e = bitFloor((e + 1) / 2) - (e < 0 || e % 2); + + if (s == 1 / 0) { + n = '5e' + e; + } else { + n = s.toExponential(); + n = n.slice(0, n.indexOf('e') + 1) + e; + } + + r = new BigNumber(n); + } else { + r = new BigNumber(s + ''); + } + + // Check for zero. + // r could be zero if MIN_EXP is changed after the this value was created. + // This would cause a division by zero (x/t) and hence Infinity below, which would cause + // coeffToString to throw. + if (r.c[0]) { + e = r.e; + s = e + dp; + if (s < 3) s = 0; + + // Newton-Raphson iteration. + for (; ;) { + t = r; + r = half.times(t.plus(div(x, t, dp, 1))); + + if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) { + + // The exponent of r may here be one less than the final result exponent, + // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits + // are indexed correctly. + if (r.e < e) --s; + n = n.slice(s - 3, s + 1); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits + // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the + // iteration. + if (n == '9999' || !rep && n == '4999') { + + // On the first iteration only, check to see if rounding up gives the + // exact result as the nines may infinitely repeat. + if (!rep) { + round(t, t.e + DECIMAL_PLACES + 2, 0); + + if (t.times(t).eq(x)) { + r = t; + break; + } + } + + dp += 4; + s += 4; + rep = 1; + } else { + + // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact + // result. If not, then there are further digits and m will be truthy. + if (!+n || !+n.slice(1) && n.charAt(0) == '5') { + + // Truncate to the first rounding digit. + round(r, r.e + DECIMAL_PLACES + 2, 1); + m = !r.times(r).eq(x); + } + + break; + } + } + } + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -/** - * Contains user-defined type guards for DOM objects. - */ -var Guard = /** @class */ (function () { - function Guard() { - } - /** - * Determines if the given object is a `Node`. - * - * @param a - the object to check - */ - Guard.isNode = function (a) { - return (!!a && a._nodeType !== undefined); - }; - /** - * Determines if the given object is a `Document`. - * - * @param a - the object to check - */ - Guard.isDocumentNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Document); - }; - /** - * Determines if the given object is a `DocumentType`. - * - * @param a - the object to check - */ - Guard.isDocumentTypeNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.DocumentType); + return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); }; - /** - * Determines if the given object is a `DocumentFragment`. + + + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. * - * @param a - the object to check - */ - Guard.isDocumentFragmentNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.DocumentFragment); - }; - /** - * Determines if the given object is a `Attr`. + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * - * @param a - the object to check + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ - Guard.isAttrNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Attribute); + P.toExponential = function (dp, rm) { + if (dp != null) { + intCheck(dp, 0, MAX); + dp++; + } + return format(this, dp, rm, 1); }; - /** - * Determines if the given node is a `CharacterData` node. + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. * - * @param a - the object to check - */ - Guard.isCharacterDataNode = function (a) { - if (!Guard.isNode(a)) - return false; - var type = a._nodeType; - return (type === interfaces_1.NodeType.Text || - type === interfaces_1.NodeType.ProcessingInstruction || - type === interfaces_1.NodeType.Comment || - type === interfaces_1.NodeType.CData); - }; - /** - * Determines if the given object is a `Text` or a `CDATASection`. + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. * - * @param a - the object to check - */ - Guard.isTextNode = function (a) { - return (Guard.isNode(a) && (a._nodeType === interfaces_1.NodeType.Text || a._nodeType === interfaces_1.NodeType.CData)); - }; - /** - * Determines if the given object is a `Text`. + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * - * @param a - the object to check + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' */ - Guard.isExclusiveTextNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Text); + P.toFixed = function (dp, rm) { + if (dp != null) { + intCheck(dp, 0, MAX); + dp = dp + this.e + 1; + } + return format(this, dp, rm); }; - /** - * Determines if the given object is a `CDATASection`. + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the format or FORMAT object (see BigNumber.set). * - * @param a - the object to check - */ - Guard.isCDATASectionNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.CData); - }; - /** - * Determines if the given object is a `Comment`. + * The formatting object may contain some or all of the properties shown below. * - * @param a - the object to check - */ - Guard.isCommentNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Comment); - }; - /** - * Determines if the given object is a `ProcessingInstruction`. + * FORMAT = { + * prefix: '', + * groupSize: 3, + * secondaryGroupSize: 0, + * groupSeparator: ',', + * decimalSeparator: '.', + * fractionGroupSize: 0, + * fractionGroupSeparator: '\xA0', // non-breaking space + * suffix: '' + * }; * - * @param a - the object to check - */ - Guard.isProcessingInstructionNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.ProcessingInstruction); - }; - /** - * Determines if the given object is an `Element`. + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * [format] {object} Formatting options. See FORMAT pbject above. * - * @param a - the object to check + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + * '[BigNumber Error] Argument not an object: {format}' */ - Guard.isElementNode = function (a) { - return (Guard.isNode(a) && a._nodeType === interfaces_1.NodeType.Element); + P.toFormat = function (dp, rm, format) { + var str, + x = this; + + if (format == null) { + if (dp != null && rm && typeof rm == 'object') { + format = rm; + rm = null; + } else if (dp && typeof dp == 'object') { + format = dp; + dp = rm = null; + } else { + format = FORMAT; + } + } else if (typeof format != 'object') { + throw Error + (bignumberError + 'Argument not an object: ' + format); + } + + str = x.toFixed(dp, rm); + + if (x.c) { + var i, + arr = str.split('.'), + g1 = +format.groupSize, + g2 = +format.secondaryGroupSize, + groupSeparator = format.groupSeparator || '', + intPart = arr[0], + fractionPart = arr[1], + isNeg = x.s < 0, + intDigits = isNeg ? intPart.slice(1) : intPart, + len = intDigits.length; + + if (g2) { + i = g1; + g1 = g2; + g2 = i; + len -= i; + } + + if (g1 > 0 && len > 0) { + i = len % g1 || g1; + intPart = intDigits.substr(0, i); + for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1); + if (g2 > 0) intPart += groupSeparator + intDigits.slice(i); + if (isNeg) intPart = '-' + intPart; + } + + str = fractionPart + ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize) + ? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'), + '$&' + (format.fractionGroupSeparator || '')) + : fractionPart) + : intPart; + } + + return (format.prefix || '') + str + (format.suffix || ''); }; - /** - * Determines if the given object is a custom `Element`. + + + /* + * Return an array of two BigNumbers representing the value of this BigNumber as a simple + * fraction with an integer numerator and an integer denominator. + * The denominator will be a positive non-zero value less than or equal to the specified + * maximum denominator. If a maximum denominator is not specified, the denominator will be + * the lowest value necessary to represent the number exactly. * - * @param a - the object to check - */ - Guard.isCustomElementNode = function (a) { - return (Guard.isElementNode(a) && a._customElementState === "custom"); - }; - /** - * Determines if the given object is a `ShadowRoot`. + * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. * - * @param a - the object to check + * '[BigNumber Error] Argument {not an integer|out of range} : {md}' */ - Guard.isShadowRoot = function (a) { - return (!!a && a.host !== undefined); + P.toFraction = function (md) { + var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, + x = this, + xc = x.c; + + if (md != null) { + n = new BigNumber(md); + + // Throw if md is less than one or is not an integer, unless it is Infinity. + if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) { + throw Error + (bignumberError + 'Argument ' + + (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n)); + } + } + + if (!xc) return new BigNumber(x); + + d = new BigNumber(ONE); + n1 = d0 = new BigNumber(ONE); + d1 = n0 = new BigNumber(ONE); + s = coeffToString(xc); + + // Determine initial denominator. + // d is a power of 10 and the minimum max denominator that specifies the value exactly. + e = d.e = s.length - x.e - 1; + d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp]; + md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n; + + exp = MAX_EXP; + MAX_EXP = 1 / 0; + n = new BigNumber(s); + + // n0 = d1 = 0 + n0.c[0] = 0; + + for (; ;) { + q = div(n, d, 0, 1); + d2 = d0.plus(q.times(d1)); + if (d2.comparedTo(md) == 1) break; + d0 = d1; + d1 = d2; + n1 = n0.plus(q.times(d2 = n1)); + n0 = d2; + d = n.minus(q.times(d2 = d)); + n = d2; + } + + d2 = div(md.minus(d0), d1, 0, 1); + n0 = n0.plus(d2.times(n1)); + d0 = d0.plus(d2.times(d1)); + n0.s = n1.s = x.s; + e = e * 2; + + // Determine which fraction is closer to x, n0/d0 or n1/d1 + r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo( + div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; + + MAX_EXP = exp; + + return r; }; - /** - * Determines if the given object is a `MouseEvent`. - * - * @param a - the object to check + + + /* + * Return the value of this BigNumber converted to a number primitive. */ - Guard.isMouseEvent = function (a) { - return (!!a && a.screenX !== undefined && a.screenY != undefined); + P.toNumber = function () { + return +valueOf(this); }; - /** - * Determines if the given object is a slotable. - * - * Element and Text nodes are slotables. A slotable has an associated name - * (a string). + + + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. * - * @param a - the object to check - */ - Guard.isSlotable = function (a) { - return (!!a && a._name !== undefined && a._assignedSlot !== undefined && - (Guard.isTextNode(a) || Guard.isElementNode(a))); - }; - /** - * Determines if the given object is a slot. + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. * - * @param a - the object to check + * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' */ - Guard.isSlot = function (a) { - return (!!a && a._name !== undefined && a._assignedNodes !== undefined && - Guard.isElementNode(a)); + P.toPrecision = function (sd, rm) { + if (sd != null) intCheck(sd, 1, MAX); + return format(this, sd, rm, 2); }; - /** - * Determines if the given object is a `Window`. + + + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. * - * @param a - the object to check - */ - Guard.isWindow = function (a) { - return (!!a && a.navigator !== undefined); - }; - /** - * Determines if the given object is an `EventListener`. + * [b] {number} Integer, 2 to ALPHABET.length inclusive. * - * @param a - the object to check + * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' */ - Guard.isEventListener = function (a) { - return (!!a && a.handleEvent !== undefined); + P.toString = function (b) { + var str, + n = this, + s = n.s, + e = n.e; + + // Infinity or NaN? + if (e === null) { + if (s) { + str = 'Infinity'; + if (s < 0) str = '-' + str; + } else { + str = 'NaN'; + } + } else { + if (b == null) { + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential(coeffToString(n.c), e) + : toFixedPoint(coeffToString(n.c), e, '0'); + } else if (b === 10 && alphabetHasNormalDecimalDigits) { + n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE); + str = toFixedPoint(coeffToString(n.c), n.e, '0'); + } else { + intCheck(b, 2, ALPHABET.length, 'Base'); + str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true); + } + + if (s < 0 && n.c[0]) str = '-' + str; + } + + return str; }; - /** - * Determines if the given object is a `RegisteredObserver`. - * - * @param a - the object to check + + + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. */ - Guard.isRegisteredObserver = function (a) { - return (!!a && a.observer !== undefined && a.options !== undefined); + P.valueOf = P.toJSON = function () { + return valueOf(this); }; - /** - * Determines if the given object is a `TransientRegisteredObserver`. - * - * @param a - the object to check + + + P._isBigNumber = true; + + if (configObject != null) BigNumber.set(configObject); + + return BigNumber; + } + + + // PRIVATE HELPER FUNCTIONS + + // These functions don't need access to variables, + // e.g. DECIMAL_PLACES, in the scope of the `clone` function above. + + + function bitFloor(n) { + var i = n | 0; + return n > 0 || n === i ? i : i - 1; + } + + + // Return a coefficient array as a string of base 10 digits. + function coeffToString(a) { + var s, z, + i = 1, + j = a.length, + r = a[0] + ''; + + for (; i < j;) { + s = a[i++] + ''; + z = LOG_BASE - s.length; + for (; z--; s = '0' + s); + r += s; + } + + // Determine trailing zeros. + for (j = r.length; r.charCodeAt(--j) === 48;); + + return r.slice(0, j + 1 || 1); + } + + + // Compare the value of BigNumbers x and y. + function compare(x, y) { + var a, b, + xc = x.c, + yc = y.c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; + + // Either NaN? + if (!i || !j) return null; + + a = xc && !xc[0]; + b = yc && !yc[0]; + + // Either zero? + if (a || b) return a ? b ? 0 : -j : i; + + // Signs differ? + if (i != j) return i; + + a = i < 0; + b = k == l; + + // Either Infinity? + if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1; + + // Compare exponents. + if (!b) return k > l ^ a ? 1 : -1; + + j = (k = xc.length) < (l = yc.length) ? k : l; + + // Compare digit by digit. + for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1; + + // Compare lengths. + return k == l ? 0 : k > l ^ a ? 1 : -1; + } + + + /* + * Check that n is a primitive number, an integer, and in range, otherwise throw. */ - Guard.isTransientRegisteredObserver = function (a) { - return (!!a && a.source !== undefined && Guard.isRegisteredObserver(a)); - }; - return Guard; -}()); -exports.Guard = Guard; -//# sourceMappingURL=Guard.js.map + function intCheck(n, min, max, name) { + if (n < min || n > max || n !== mathfloor(n)) { + throw Error + (bignumberError + (name || 'Argument') + (typeof n == 'number' + ? n < min || n > max ? ' out of range: ' : ' not an integer: ' + : ' not a primitive number: ') + String(n)); + } + } -/***/ }), -/***/ 65282: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // Assumes finite n. + function isOdd(n) { + var k = n.c.length - 1; + return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0; + } -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var Cast_1 = __nccwpck_require__(75483); -exports.Cast = Cast_1.Cast; -var Guard_1 = __nccwpck_require__(66862); -exports.Guard = Guard_1.Guard; -var EmptySet_1 = __nccwpck_require__(88392); -exports.EmptySet = EmptySet_1.EmptySet; -//# sourceMappingURL=index.js.map + function toExponential(str, e) { + return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) + + (e < 0 ? 'e' : 'e+') + e; + } + + + function toFixedPoint(str, e, z) { + var len, zs; + + // Negative exponent? + if (e < 0) { + + // Prepend zeros. + for (zs = z + '.'; ++e; zs += z); + str = zs + str; + + // Positive exponent + } else { + len = str.length; + + // Append zeros. + if (++e > len) { + for (zs = z, e -= len; --e; zs += z); + str += zs; + } else if (e < len) { + str = str.slice(0, e) + '.' + str.slice(e); + } + } + + return str; + } + + + // EXPORT + + + BigNumber = clone(); + BigNumber['default'] = BigNumber.BigNumber = BigNumber; + + // AMD. + if (typeof define == 'function' && define.amd) { + define(function () { return BigNumber; }); + + // Node.js and other environments that support module.exports. + } else if ( true && module.exports) { + module.exports = BigNumber; + + // Browser. + } else { + if (!globalObject) { + globalObject = typeof self != 'undefined' && self ? self : window; + } + + globalObject.BigNumber = BigNumber; + } +})(this); + /***/ }), -/***/ 28585: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 33717: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var concatMap = __nccwpck_require__(86891); +var balanced = __nccwpck_require__(9417); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var CodePoints_1 = __nccwpck_require__(28548); -/** - * Base-64 encodes the given string. - * - * @param input - a string - */ -function forgivingBase64Encode(input) { - /** - * To forgiving-base64 encode given a byte sequence data, apply the base64 - * algorithm defined in section 4 of RFC 4648 to data and return the result. - * [RFC4648] - */ - return Buffer.from(input).toString('base64'); +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); } -exports.forgivingBase64Encode = forgivingBase64Encode; -/** - * Decodes a base-64 string. - * - * @param input - a string - */ -function forgivingBase64Decode(input) { - if (input === "") - return ""; - /** - * 1. Remove all ASCII whitespace from data. - */ - input = input.replace(CodePoints_1.ASCIIWhiteSpace, ''); - /** - * 2. If data’s length divides by 4 leaving no remainder, then: - * 2.1. If data ends with one or two U+003D (=) code points, then remove them from data. - */ - if (input.length % 4 === 0) { - if (input.endsWith("==")) { - input = input.substr(0, input.length - 2); - } - else if (input.endsWith("=")) { - input = input.substr(0, input.length - 1); - } - } - /** - * 3. If data’s length divides by 4 leaving a remainder of 1, then return failure. - */ - if (input.length % 4 === 1) - return null; - /** - * 4. If data contains a code point that is not one of - * - U+002B (+) - * - U+002F (/) - * - ASCII alphanumeric - * then return failure. - */ - if (!/[0-9A-Za-z+/]/.test(input)) - return null; - /** - * 5. Let output be an empty byte sequence. - * 6. Let buffer be an empty buffer that can have bits appended to it. - * 7. Let position be a position variable for data, initially pointing at the - * start of data. - * 8. While position does not point past the end of data: - * 8.1. Find the code point pointed to by position in the second column of - * Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in the - * first cell of the same row. [RFC4648] - * 8.2. Append the six bits corresponding to n, most significant bit first, - * to buffer. - * 8.3. If buffer has accumulated 24 bits, interpret them as three 8-bit - * big-endian numbers. Append three bytes with values equal to those numbers - * to output, in the same order, and then empty buffer. - * 8.4. Advance position by 1. - * 9. If buffer is not empty, it contains either 12 or 18 bits. If it contains - * 12 bits, then discard the last four and interpret the remaining eight as an - * 8-bit big-endian number. If it contains 18 bits, then discard the last two - * and interpret the remaining 16 as two 8-bit big-endian numbers. Append the - * one or two bytes with values equal to those one or two numbers to output, - * in the same order. - * 10. Return output. - */ - return Buffer.from(input, 'base64').toString('utf8'); + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); } -exports.forgivingBase64Decode = forgivingBase64Decode; -//# sourceMappingURL=Base64.js.map -/***/ }), +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} -/***/ 42460: -/***/ ((__unused_webpack_module, exports) => { -"use strict"; +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Determines if the given number is an ASCII byte. - * - * @param byte - a byte - */ -function isASCIIByte(byte) { - /** - * An ASCII byte is a byte in the range 0x00 (NUL) to 0x7F (DEL), inclusive. - */ - return byte >= 0x00 && byte <= 0x7F; + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; } -exports.isASCIIByte = isASCIIByte; -//# sourceMappingURL=Byte.js.map -/***/ }), +function expandTop(str) { + if (!str) + return []; -/***/ 71627: -/***/ (function(__unused_webpack_module, exports) { + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } -"use strict"; + return expand(escapeBraces(str), true).map(unescapeBraces); +} -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Returns the count of bytes in a sequence. - * - * @param list - a byte sequence - */ -function length(list) { - /** - * A byte sequence’s length is the number of bytes it contains. - */ - return list.length; +function identity(e) { + return e; } -exports.length = length; -/** - * Converts each byte to lowercase. - * - * @param list - a byte sequence - */ -function byteLowercase(list) { - /** - * To byte-lowercase a byte sequence, increase each byte it contains, in the - * range 0x41 (A) to 0x5A (Z), inclusive, by 0x20. - */ - for (var i = 0; i < list.length; i++) { - var c = list[i]; - if (c >= 0x41 && c <= 0x5A) { - list[i] = c + 0x20; - } - } + +function embrace(str) { + return '{' + str + '}'; } -exports.byteLowercase = byteLowercase; -/** - * Converts each byte to uppercase. - * - * @param list - a byte sequence - */ -function byteUppercase(list) { - /** - * To byte-uppercase a byte sequence, subtract each byte it contains, in the - * range 0x61 (a) to 0x7A (z), inclusive, by 0x20. - */ - for (var i = 0; i < list.length; i++) { - var c = list[i]; - if (c >= 0x61 && c <= 0x7A) { - list[i] = c - 0x20; - } - } +function isPadded(el) { + return /^-?0\d/.test(el); } -exports.byteUppercase = byteUppercase; -/** - * Compares two byte sequences. - * - * @param listA - a byte sequence - * @param listB - a byte sequence - */ -function byteCaseInsensitiveMatch(listA, listB) { - /** - * A byte sequence A is a byte-case-insensitive match for a byte sequence B, - * if the byte-lowercase of A is the byte-lowercase of B. - */ - if (listA.length !== listB.length) - return false; - for (var i = 0; i < listA.length; i++) { - var a = listA[i]; - var b = listB[i]; - if (a >= 0x41 && a <= 0x5A) - a += 0x20; - if (b >= 0x41 && b <= 0x5A) - b += 0x20; - if (a !== b) - return false; - } - return true; + +function lte(i, y) { + return i <= y; } -exports.byteCaseInsensitiveMatch = byteCaseInsensitiveMatch; -/** - * Determines if `listA` starts with `listB`. - * - * @param listA - a byte sequence - * @param listB - a byte sequence - */ -function startsWith(listA, listB) { - /** - * 1. Let i be 0. - * 2. While true: - * 2.1. Let aByte be the ith byte of a if i is less than a’s length; otherwise null. - * 2.3. Let bByte be the ith byte of b if i is less than b’s length; otherwise null. - * 2.4. If bByte is null, then return true. - * 2.5. Return false if aByte is not bByte. - * 2.6. Set i to i + 1. - */ - var i = 0; - while (true) { - if (i >= listA.length) - return false; - if (i >= listB.length) - return true; - if (listA[i] !== listB[i]) - return false; - i++; - } +function gte(i, y) { + return i >= y; } -exports.startsWith = startsWith; -/** - * Determines if `listA` is less than `listB`. - * - * @param listA - a byte sequence - * @param listB - a byte sequence - */ -function byteLessThan(listA, listB) { - /** - * 1. If b starts with a, then return false. - * 2. If a starts with b, then return true. - * 3. Let n be the smallest index such that the nth byte of a is different - * from the nth byte of b. (There has to be such an index, since neither byte - * sequence starts with the other.) - * 4. If the nth byte of a is less than the nth byte of b, then return true. - * 5. Return false. - */ - var i = 0; - while (true) { - if (i >= listA.length) - return false; - if (i >= listB.length) - return true; - var a = listA[i]; - var b = listB[i]; - if (a < b) - return true; - else if (a > b) - return false; - i++; + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); } + } + + return expansions; } -exports.byteLessThan = byteLessThan; -/** - * Decodes a byte sequence into a string. - * - * @param list - a byte sequence - */ -function isomorphicDecode(list) { - /** - * To isomorphic decode a byte sequence input, return a string whose length is - * equal to input’s length and whose code points have the same values as - * input’s bytes, in the same order. - */ - return String.fromCodePoint.apply(String, __spread(list)); + + + +/***/ }), + +/***/ 9239: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +/*jshint node:true */ + +var Buffer = (__nccwpck_require__(14300).Buffer); // browserify +var SlowBuffer = (__nccwpck_require__(14300).SlowBuffer); + +module.exports = bufferEq; + +function bufferEq(a, b) { + + // shortcutting on type is necessary for correctness + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + return false; + } + + // buffer sizes should be well-known information, so despite this + // shortcutting, it doesn't leak any information about the *contents* of the + // buffers. + if (a.length !== b.length) { + return false; + } + + var c = 0; + for (var i = 0; i < a.length; i++) { + /*jshint bitwise:false */ + c |= a[i] ^ b[i]; // XOR + } + return c === 0; } -exports.isomorphicDecode = isomorphicDecode; -//# sourceMappingURL=ByteSequence.js.map + +bufferEq.install = function() { + Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { + return bufferEq(this, that); + }; +}; + +var origBufEqual = Buffer.prototype.equal; +var origSlowBufEqual = SlowBuffer.prototype.equal; +bufferEq.restore = function() { + Buffer.prototype.equal = origBufEqual; + SlowBuffer.prototype.equal = origSlowBufEqual; +}; + /***/ }), -/***/ 28548: -/***/ ((__unused_webpack_module, exports) => { +/***/ 19227: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * A surrogate is a code point that is in the range U+D800 to U+DFFF, inclusive. - */ -exports.Surrogate = /[\uD800-\uDFFF]/; -/** - * A scalar value is a code point that is not a surrogate. - */ -exports.ScalarValue = /[\uD800-\uDFFF]/; -/** - * A noncharacter is a code point that is in the range U+FDD0 to U+FDEF, - * inclusive, or U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, U+2FFFE, U+2FFFF, U+3FFFE, - * U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE, - * U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE, - * U+BFFFF, U+CFFFE, U+CFFFF, U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE, - * U+FFFFF, U+10FFFE, or U+10FFFF. - */ -exports.NonCharacter = /[\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]/; -/** - * An ASCII code point is a code point in the range U+0000 NULL to U+007F - * DELETE, inclusive. - */ -exports.ASCIICodePoint = /[\u0000-\u007F]/; -/** - * An ASCII tab or newline is U+0009 TAB, U+000A LF, or U+000D CR. - */ -exports.ASCIITabOrNewLine = /[\t\n\r]/; -/** - * ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or - * U+0020 SPACE. - */ -exports.ASCIIWhiteSpace = /[\t\n\f\r ]/; -/** - * A C0 control is a code point in the range U+0000 NULL to U+001F - * INFORMATION SEPARATOR ONE, inclusive. - */ -exports.C0Control = /[\u0000-\u001F]/; -/** - * A C0 control or space is a C0 control or U+0020 SPACE. - */ -exports.C0ControlOrSpace = /[\u0000-\u001F ]/; -/** - * A control is a C0 control or a code point in the range U+007F DELETE to - * U+009F APPLICATION PROGRAM COMMAND, inclusive. - */ -exports.Control = /[\u0000-\u001F\u007F-\u009F]/; -/** - * An ASCII digit is a code point in the range U+0030 (0) to U+0039 (9), - * inclusive. - */ -exports.ASCIIDigit = /[0-9]/; -/** - * An ASCII upper hex digit is an ASCII digit or a code point in the range - * U+0041 (A) to U+0046 (F), inclusive. - */ -exports.ASCIIUpperHexDigit = /[0-9A-F]/; -/** - * An ASCII lower hex digit is an ASCII digit or a code point in the range - * U+0061 (a) to U+0066 (f), inclusive. - */ -exports.ASCIILowerHexDigit = /[0-9a-f]/; -/** - * An ASCII hex digit is an ASCII upper hex digit or ASCII lower hex digit. - */ -exports.ASCIIHexDigit = /[0-9A-Fa-f]/; -/** - * An ASCII upper alpha is a code point in the range U+0041 (A) to U+005A (Z), - * inclusive. - */ -exports.ASCIIUpperAlpha = /[A-Z]/; -/** - * An ASCII lower alpha is a code point in the range U+0061 (a) to U+007A (z), - * inclusive. - */ -exports.ASCIILowerAlpha = /[a-z]/; -/** - * An ASCII alpha is an ASCII upper alpha or ASCII lower alpha. - */ -exports.ASCIIAlpha = /[A-Za-z]/; -/** - * An ASCII alphanumeric is an ASCII digit or ASCII alpha. - */ -exports.ASCIIAlphanumeric = /[0-9A-Za-z]/; -//# sourceMappingURL=CodePoints.js.map + +var bind = __nccwpck_require__(88334); + +var $apply = __nccwpck_require__(54177); +var $call = __nccwpck_require__(2808); +var $reflectApply = __nccwpck_require__(48309); + +/** @type {import('./actualApply')} */ +module.exports = $reflectApply || bind.call($call, $apply); + /***/ }), -/***/ 99387: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 54177: +/***/ ((module) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + +/** @type {import('./functionApply')} */ +module.exports = Function.prototype.apply; + + +/***/ }), + +/***/ 2808: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./functionCall')} */ +module.exports = Function.prototype.call; + + +/***/ }), + +/***/ 86815: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(88334); +var $TypeError = __nccwpck_require__(6361); + +var $call = __nccwpck_require__(2808); +var $actualApply = __nccwpck_require__(19227); + +/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ +module.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== 'function') { + throw new $TypeError('a function is required'); + } + return $actualApply(bind, $call, args); }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -/** - * Parses the given byte sequence representing a JSON string into an object. - * - * @param bytes - a byte sequence - */ -function parseJSONFromBytes(bytes) { - /** - * 1. Let jsonText be the result of running UTF-8 decode on bytes. [ENCODING] - * 2. Return ? Call(%JSONParse%, undefined, « jsonText »). - */ - var jsonText = util_1.utf8Decode(bytes); - return JSON.parse.call(undefined, jsonText); -} -exports.parseJSONFromBytes = parseJSONFromBytes; -/** - * Serialize the given JavaScript value into a byte sequence. - * - * @param value - a JavaScript value - */ -function serializeJSONToBytes(value) { - /** - * 1. Let jsonString be ? Call(%JSONStringify%, undefined, « value »). - * 2. Return the result of running UTF-8 encode on jsonString. [ENCODING] - */ - var jsonString = JSON.stringify.call(undefined, value); - return util_1.utf8Encode(jsonString); -} -exports.serializeJSONToBytes = serializeJSONToBytes; -/** - * Parses the given JSON string into a Realm-independent JavaScript value. - * - * @param jsonText - a JSON string - */ -function parseJSONIntoInfraValues(jsonText) { - /** - * 1. Let jsValue be ? Call(%JSONParse%, undefined, « jsonText »). - * 2. Return the result of converting a JSON-derived JavaScript value to an - * Infra value, given jsValue. - */ - var jsValue = JSON.parse.call(undefined, jsonText); - return convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValue); -} -exports.parseJSONIntoInfraValues = parseJSONIntoInfraValues; -/** - * Parses the value into a Realm-independent JavaScript value. - * - * @param jsValue - a JavaScript value - */ -function convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValue) { - var e_1, _a; - /** - * 1. If Type(jsValue) is Null, String, or Number, then return jsValue. - */ - if (jsValue === null || util_1.isString(jsValue) || util_1.isNumber(jsValue)) - return jsValue; - /** - * 2. If IsArray(jsValue) is true, then: - * 2.1. Let result be an empty list. - * 2.2. Let length be ! ToLength(! Get(jsValue, "length")). - * 2.3. For each index of the range 0 to length − 1, inclusive: - * 2.3.1. Let indexName be ! ToString(index). - * 2.3.2. Let jsValueAtIndex be ! Get(jsValue, indexName). - * 2.3.3. Let infraValueAtIndex be the result of converting a JSON-derived - * JavaScript value to an Infra value, given jsValueAtIndex. - * 2.3.4. Append infraValueAtIndex to result. - * 2.8. Return result. - */ - if (util_1.isArray(jsValue)) { - var result = new Array(); - try { - for (var jsValue_1 = __values(jsValue), jsValue_1_1 = jsValue_1.next(); !jsValue_1_1.done; jsValue_1_1 = jsValue_1.next()) { - var jsValueAtIndex = jsValue_1_1.value; - result.push(convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValueAtIndex)); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (jsValue_1_1 && !jsValue_1_1.done && (_a = jsValue_1.return)) _a.call(jsValue_1); - } - finally { if (e_1) throw e_1.error; } - } - return result; - } - else if (util_1.isObject(jsValue)) { - /** - * 3. Let result be an empty ordered map. - * 4. For each key of ! jsValue.[[OwnPropertyKeys]](): - * 4.1. Let jsValueAtKey be ! Get(jsValue, key). - * 4.2. Let infraValueAtKey be the result of converting a JSON-derived - * JavaScript value to an Infra value, given jsValueAtKey. - * 4.3. Set result[key] to infraValueAtKey. - * 5. Return result. - */ - var result = new Map(); - for (var key in jsValue) { - /* istanbul ignore else */ - if (jsValue.hasOwnProperty(key)) { - var jsValueAtKey = jsValue[key]; - result.set(key, convertAJSONDerivedJavaScriptValueToAnInfraValue(jsValueAtKey)); - } - } - return result; - } - /* istanbul ignore next */ - return jsValue; -} -exports.convertAJSONDerivedJavaScriptValueToAnInfraValue = convertAJSONDerivedJavaScriptValueToAnInfraValue; -//# sourceMappingURL=JSON.js.map + /***/ }), -/***/ 20340: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 48309: +/***/ ((module) => { "use strict"; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } + +/** @type {import('./reflectApply')} */ +module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; + + +/***/ }), + +/***/ 85443: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var util = __nccwpck_require__(73837); +var Stream = (__nccwpck_require__(12781).Stream); +var DelayedStream = __nccwpck_require__(18611); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; }; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); } - return ar; + } + + this._streams.push(stream); + return this; }; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; }; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call + } + + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -/** - * Adds the given item to the end of the list. - * - * @param list - a list - * @param item - an item - */ -function append(list, item) { - list.push(item); -} -exports.append = append; -/** - * Extends a list by appending all items from another list. - * - * @param listA - a list to extend - * @param listB - a list containing items to append to `listA` - */ -function extend(listA, listB) { - listA.push.apply(listA, __spread(listB)); -} -exports.extend = extend; -/** - * Inserts the given item to the start of the list. - * - * @param list - a list - * @param item - an item - */ -function prepend(list, item) { - list.unshift(item); -} -exports.prepend = prepend; -/** - * Replaces the given item or all items matching condition with a new item. - * - * @param list - a list - * @param conditionOrItem - an item to replace or a condition matching items - * to replace - * @param item - an item - */ -function replace(list, conditionOrItem, newItem) { - var e_1, _a; - var i = 0; - try { - for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) { - var oldItem = list_1_1.value; - if (util_1.isFunction(conditionOrItem)) { - if (!!conditionOrItem.call(null, oldItem)) { - list[i] = newItem; - } - } - else if (oldItem === conditionOrItem) { - list[i] = newItem; - return; - } - i++; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (list_1_1 && !list_1_1.done && (_a = list_1.return)) _a.call(list_1); - } - finally { if (e_1) throw e_1.error; } - } -} -exports.replace = replace; -/** - * Inserts the given item before the given index. - * - * @param list - a list - * @param item - an item - */ -function insert(list, item, index) { - list.splice(index, 0, item); -} -exports.insert = insert; -/** - * Removes the given item or all items matching condition. - * - * @param list - a list - * @param conditionOrItem - an item to remove or a condition matching items - * to remove - */ -function remove(list, conditionOrItem) { - var i = list.length; - while (i--) { - var oldItem = list[i]; - if (util_1.isFunction(conditionOrItem)) { - if (!!conditionOrItem.call(null, oldItem)) { - list.splice(i, 1); - } - } - else if (oldItem === conditionOrItem) { - list.splice(i, 1); - return; - } - } -} -exports.remove = remove; -/** - * Removes all items from the list. - */ -function empty(list) { - list.length = 0; -} -exports.empty = empty; -/** - * Determines if the list contains the given item or any items matching - * condition. - * - * @param list - a list - * @param conditionOrItem - an item to a condition to match - */ -function contains(list, conditionOrItem) { - var e_2, _a; - try { - for (var list_2 = __values(list), list_2_1 = list_2.next(); !list_2_1.done; list_2_1 = list_2.next()) { - var oldItem = list_2_1.value; - if (util_1.isFunction(conditionOrItem)) { - if (!!conditionOrItem.call(null, oldItem)) { - return true; - } - } - else if (oldItem === conditionOrItem) { - return true; - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (list_2_1 && !list_2_1.done && (_a = list_2.return)) _a.call(list_2); - } - finally { if (e_2) throw e_2.error; } - } - return false; -} -exports.contains = contains; -/** - * Returns the count of items in the list matching the given condition. - * - * @param list - a list - * @param condition - an optional condition to match - */ -function size(list, condition) { - var e_3, _a; - if (condition === undefined) { - return list.length; - } - else { - var count = 0; - try { - for (var list_3 = __values(list), list_3_1 = list_3.next(); !list_3_1.done; list_3_1 = list_3.next()) { - var item = list_3_1.value; - if (!!condition.call(null, item)) { - count++; - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (list_3_1 && !list_3_1.done && (_a = list_3.return)) _a.call(list_3); - } - finally { if (e_3) throw e_3.error; } - } - return count; - } -} -exports.size = size; -/** - * Determines if the list is empty. - * - * @param list - a list - */ -function isEmpty(list) { - return list.length === 0; -} -exports.isEmpty = isEmpty; -/** - * Returns an iterator for the items of the list. - * - * @param list - a list - * @param condition - an optional condition to match - */ -function forEach(list, condition) { - var list_4, list_4_1, item, e_4_1; - var e_4, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!(condition === undefined)) return [3 /*break*/, 2]; - return [5 /*yield**/, __values(list)]; - case 1: - _b.sent(); - return [3 /*break*/, 9]; - case 2: - _b.trys.push([2, 7, 8, 9]); - list_4 = __values(list), list_4_1 = list_4.next(); - _b.label = 3; - case 3: - if (!!list_4_1.done) return [3 /*break*/, 6]; - item = list_4_1.value; - if (!!!condition.call(null, item)) return [3 /*break*/, 5]; - return [4 /*yield*/, item]; - case 4: - _b.sent(); - _b.label = 5; - case 5: - list_4_1 = list_4.next(); - return [3 /*break*/, 3]; - case 6: return [3 /*break*/, 9]; - case 7: - e_4_1 = _b.sent(); - e_4 = { error: e_4_1 }; - return [3 /*break*/, 9]; - case 8: - try { - if (list_4_1 && !list_4_1.done && (_a = list_4.return)) _a.call(list_4); - } - finally { if (e_4) throw e_4.error; } - return [7 /*endfinally*/]; - case 9: return [2 /*return*/]; - } - }); -} -exports.forEach = forEach; -/** - * Creates and returns a shallow clone of list. - * - * @param list - a list - */ -function clone(list) { - return new (Array.bind.apply(Array, __spread([void 0], list)))(); -} -exports.clone = clone; -/** - * Returns a new list containing items from the list sorted in ascending - * order. - * - * @param list - a list - * @param lessThanAlgo - a function that returns `true` if its first argument - * is less than its second argument, and `false` otherwise. - */ -function sortInAscendingOrder(list, lessThanAlgo) { - return list.sort(function (itemA, itemB) { - return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1; - }); -} -exports.sortInAscendingOrder = sortInAscendingOrder; -/** - * Returns a new list containing items from the list sorted in descending - * order. - * - * @param list - a list - * @param lessThanAlgo - a function that returns `true` if its first argument - * is less than its second argument, and `false` otherwise. - */ -function sortInDescendingOrder(list, lessThanAlgo) { - return list.sort(function (itemA, itemB) { - return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1; - }); -} -exports.sortInDescendingOrder = sortInDescendingOrder; -//# sourceMappingURL=List.js.map -/***/ }), +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); -/***/ 22298: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; + if (typeof stream == 'undefined') { + this.end(); + return; + } -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); } + + this._pipeNext(stream); + }.bind(this)); }; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); }; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; + + +/***/ }), + +/***/ 86891: +/***/ ((module) => { + +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); } - return ar; + return res; }; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -/** - * Gets the value corresponding to the given key. - * - * @param map - a map - * @param key - a key - */ -function get(map, key) { - return map.get(key); -} -exports.get = get; + + +/***/ }), + +/***/ 28222: +/***/ ((module, exports, __nccwpck_require__) => { + +/* eslint-env browser */ + /** - * Sets the value corresponding to the given key. - * - * @param map - a map - * @param key - a key - * @param val - a value + * This is the web browser implementation of `debug()`. */ -function set(map, key, val) { - map.set(key, val); -} -exports.set = set; + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + /** - * Removes the item with the given key or all items matching condition. - * - * @param map - a map - * @param conditionOrItem - the key of an item to remove or a condition matching - * items to remove + * Colors. */ -function remove(map, conditionOrItem) { - var e_1, _a, e_2, _b; - if (!util_1.isFunction(conditionOrItem)) { - map.delete(conditionOrItem); - } - else { - var toRemove = []; - try { - for (var map_1 = __values(map), map_1_1 = map_1.next(); !map_1_1.done; map_1_1 = map_1.next()) { - var item = map_1_1.value; - if (!!conditionOrItem.call(null, item)) { - toRemove.push(item[0]); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (map_1_1 && !map_1_1.done && (_a = map_1.return)) _a.call(map_1); - } - finally { if (e_1) throw e_1.error; } - } - try { - for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) { - var key = toRemove_1_1.value; - map.delete(key); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (toRemove_1_1 && !toRemove_1_1.done && (_b = toRemove_1.return)) _b.call(toRemove_1); - } - finally { if (e_2) throw e_2.error; } - } - } -} -exports.remove = remove; + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + /** - * Determines if the map contains a value with the given key. + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. * - * @param map - a map - * @param conditionOrItem - the key of an item to match or a condition matching - * items + * TODO: add a `localStorage` variable to explicitly enable/disable colors */ -function contains(map, conditionOrItem) { - var e_3, _a; - if (!util_1.isFunction(conditionOrItem)) { - return map.has(conditionOrItem); - } - else { - try { - for (var map_2 = __values(map), map_2_1 = map_2.next(); !map_2_1.done; map_2_1 = map_2.next()) { - var item = map_2_1.value; - if (!!conditionOrItem.call(null, item)) { - return true; - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (map_2_1 && !map_2_1.done && (_a = map_2.return)) _a.call(map_2); - } - finally { if (e_3) throw e_3.error; } - } - return false; - } + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); } -exports.contains = contains; + /** - * Gets the keys of the map. + * Colorize log arguments if enabled. * - * @param map - a map + * @api public */ -function keys(map) { - return new Set(map.keys()); + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); } -exports.keys = keys; + /** - * Gets the values of the map. + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. * - * @param map - a map + * @api public */ -function values(map) { - return __spread(map.values()); -} -exports.values = values; +exports.log = console.debug || console.log || (() => {}); + /** - * Gets the size of the map. + * Save `namespaces`. * - * @param map - a map - * @param condition - an optional condition to match + * @param {String} namespaces + * @api private */ -function size(map, condition) { - var e_4, _a; - if (condition === undefined) { - return map.size; - } - else { - var count = 0; - try { - for (var map_3 = __values(map), map_3_1 = map_3.next(); !map_3_1.done; map_3_1 = map_3.next()) { - var item = map_3_1.value; - if (!!condition.call(null, item)) { - count++; - } - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (map_3_1 && !map_3_1.done && (_a = map_3.return)) _a.call(map_3); - } - finally { if (e_4) throw e_4.error; } - } - return count; - } +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } -exports.size = size; + /** - * Determines if the map is empty. + * Load `namespaces`. * - * @param map - a map + * @return {String} returns the previously persisted debug modes + * @api private */ -function isEmpty(map) { - return map.size === 0; +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; } -exports.isEmpty = isEmpty; + /** - * Returns an iterator for the items of the map. + * Localstorage attempts to return the localstorage. * - * @param map - a map - * @param condition - an optional condition to match - */ -function forEach(map, condition) { - var map_4, map_4_1, item, e_5_1; - var e_5, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!(condition === undefined)) return [3 /*break*/, 2]; - return [5 /*yield**/, __values(map)]; - case 1: - _b.sent(); - return [3 /*break*/, 9]; - case 2: - _b.trys.push([2, 7, 8, 9]); - map_4 = __values(map), map_4_1 = map_4.next(); - _b.label = 3; - case 3: - if (!!map_4_1.done) return [3 /*break*/, 6]; - item = map_4_1.value; - if (!!!condition.call(null, item)) return [3 /*break*/, 5]; - return [4 /*yield*/, item]; - case 4: - _b.sent(); - _b.label = 5; - case 5: - map_4_1 = map_4.next(); - return [3 /*break*/, 3]; - case 6: return [3 /*break*/, 9]; - case 7: - e_5_1 = _b.sent(); - e_5 = { error: e_5_1 }; - return [3 /*break*/, 9]; - case 8: - try { - if (map_4_1 && !map_4_1.done && (_a = map_4.return)) _a.call(map_4); - } - finally { if (e_5) throw e_5.error; } - return [7 /*endfinally*/]; - case 9: return [2 /*return*/]; - } - }); -} -exports.forEach = forEach; -/** - * Creates and returns a shallow clone of map. + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. * - * @param map - a map + * @return {LocalStorage} + * @api private */ -function clone(map) { - return new Map(map); + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } -exports.clone = clone; + +module.exports = __nccwpck_require__(46243)(exports); + +const {formatters} = module.exports; + /** - * Returns a new map containing items from the map sorted in ascending - * order. - * - * @param map - a map - * @param lessThanAlgo - a function that returns `true` if its first argument - * is less than its second argument, and `false` otherwise. + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ -function sortInAscendingOrder(map, lessThanAlgo) { - var list = new (Array.bind.apply(Array, __spread([void 0], map)))(); - list.sort(function (itemA, itemB) { - return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1; - }); - return new Map(list); -} -exports.sortInAscendingOrder = sortInAscendingOrder; + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; + + +/***/ }), + +/***/ 46243: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + /** - * Returns a new map containing items from the map sorted in descending - * order. - * - * @param map - a map - * @param lessThanAlgo - a function that returns `true` if its first argument - * is less than its second argument, and `false` otherwise. + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. */ -function sortInDescendingOrder(map, lessThanAlgo) { - var list = new (Array.bind.apply(Array, __spread([void 0], map)))(); - list.sort(function (itemA, itemB) { - return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1; - }); - return new Map(list); -} -exports.sortInDescendingOrder = sortInDescendingOrder; -//# sourceMappingURL=Map.js.map -/***/ }), +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __nccwpck_require__(80900); + createDebug.destroy = destroy; -/***/ 93764: -/***/ ((__unused_webpack_module, exports) => { + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); -"use strict"; + /** + * The currently active debug mode names, and names to skip. + */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HTML = "http://www.w3.org/1999/xhtml"; -exports.XML = "http://www.w3.org/XML/1998/namespace"; -exports.XMLNS = "http://www.w3.org/2000/xmlns/"; -exports.MathML = "http://www.w3.org/1998/Math/MathML"; -exports.SVG = "http://www.w3.org/2000/svg"; -exports.XLink = "http://www.w3.org/1999/xlink"; -//# sourceMappingURL=Namespace.js.map + createDebug.names = []; + createDebug.skips = []; -/***/ }), + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; -/***/ 39201: -/***/ ((__unused_webpack_module, exports) => { + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; -"use strict"; + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Appends the given item to the queue. - * - * @param list - a list - * @param item - an item - */ -function enqueue(list, item) { - list.push(item); -} -exports.enqueue = enqueue; -/** - * Removes and returns an item from the queue. - * - * @param list - a list - */ -function dequeue(list) { - return list.shift() || null; -} -exports.dequeue = dequeue; -//# sourceMappingURL=Queue.js.map + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; -/***/ }), + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; -/***/ 35931: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } -"use strict"; + const self = debug; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -/** - * Adds the given item to the end of the set. - * - * @param set - a set - * @param item - an item - */ -function append(set, item) { - set.add(item); -} -exports.append = append; -/** - * Extends a set by appending all items from another set. - * - * @param setA - a list to extend - * @param setB - a list containing items to append to `setA` - */ -function extend(setA, setB) { - setB.forEach(setA.add, setA); -} -exports.extend = extend; -/** - * Inserts the given item to the start of the set. - * - * @param set - a set - * @param item - an item - */ -function prepend(set, item) { - var cloned = new Set(set); - set.clear(); - set.add(item); - cloned.forEach(set.add, set); -} -exports.prepend = prepend; -/** - * Replaces the given item or all items matching condition with a new item. - * - * @param set - a set - * @param conditionOrItem - an item to replace or a condition matching items - * to replace - * @param item - an item - */ -function replace(set, conditionOrItem, newItem) { - var e_1, _a; - var newSet = new Set(); - try { - for (var set_1 = __values(set), set_1_1 = set_1.next(); !set_1_1.done; set_1_1 = set_1.next()) { - var oldItem = set_1_1.value; - if (util_1.isFunction(conditionOrItem)) { - if (!!conditionOrItem.call(null, oldItem)) { - newSet.add(newItem); - } - else { - newSet.add(oldItem); - } - } - else if (oldItem === conditionOrItem) { - newSet.add(newItem); - } - else { - newSet.add(oldItem); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (set_1_1 && !set_1_1.done && (_a = set_1.return)) _a.call(set_1); - } - finally { if (e_1) throw e_1.error; } - } - set.clear(); - newSet.forEach(set.add, set); -} -exports.replace = replace; -/** - * Inserts the given item before the given index. - * - * @param set - a set - * @param item - an item - */ -function insert(set, item, index) { - var e_2, _a; - var newSet = new Set(); - var i = 0; - try { - for (var set_2 = __values(set), set_2_1 = set_2.next(); !set_2_1.done; set_2_1 = set_2.next()) { - var oldItem = set_2_1.value; - if (i === index) - newSet.add(item); - newSet.add(oldItem); - i++; - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (set_2_1 && !set_2_1.done && (_a = set_2.return)) _a.call(set_2); - } - finally { if (e_2) throw e_2.error; } - } - set.clear(); - newSet.forEach(set.add, set); + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; } -exports.insert = insert; + +module.exports = setup; + + +/***/ }), + +/***/ 38237: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** - * Removes the given item or all items matching condition. - * - * @param set - a set - * @param conditionOrItem - an item to remove or a condition matching items - * to remove + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. */ -function remove(set, conditionOrItem) { - var e_3, _a, e_4, _b; - if (!util_1.isFunction(conditionOrItem)) { - set.delete(conditionOrItem); - } - else { - var toRemove = []; - try { - for (var set_3 = __values(set), set_3_1 = set_3.next(); !set_3_1.done; set_3_1 = set_3.next()) { - var item = set_3_1.value; - if (!!conditionOrItem.call(null, item)) { - toRemove.push(item); - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (set_3_1 && !set_3_1.done && (_a = set_3.return)) _a.call(set_3); - } - finally { if (e_3) throw e_3.error; } - } - try { - for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) { - var oldItem = toRemove_1_1.value; - set.delete(oldItem); - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (toRemove_1_1 && !toRemove_1_1.done && (_b = toRemove_1.return)) _b.call(toRemove_1); - } - finally { if (e_4) throw e_4.error; } - } - } + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = __nccwpck_require__(28222); +} else { + module.exports = __nccwpck_require__(35332); } -exports.remove = remove; + + +/***/ }), + +/***/ 35332: +/***/ ((module, exports, __nccwpck_require__) => { + /** - * Removes all items from the set. + * Module dependencies. */ -function empty(set) { - set.clear(); -} -exports.empty = empty; + +const tty = __nccwpck_require__(76224); +const util = __nccwpck_require__(73837); + /** - * Determines if the set contains the given item or any items matching - * condition. - * - * @param set - a set - * @param conditionOrItem - an item to a condition to match + * This is the Node.js implementation of `debug()`. */ -function contains(set, conditionOrItem) { - var e_5, _a; - if (!util_1.isFunction(conditionOrItem)) { - return set.has(conditionOrItem); - } - else { - try { - for (var set_4 = __values(set), set_4_1 = set_4.next(); !set_4_1.done; set_4_1 = set_4.next()) { - var oldItem = set_4_1.value; - if (!!conditionOrItem.call(null, oldItem)) { - return true; - } - } - } - catch (e_5_1) { e_5 = { error: e_5_1 }; } - finally { - try { - if (set_4_1 && !set_4_1.done && (_a = set_4.return)) _a.call(set_4); - } - finally { if (e_5) throw e_5.error; } - } - } - return false; -} -exports.contains = contains; + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + /** - * Returns the count of items in the set matching the given condition. - * - * @param set - a set - * @param condition - an optional condition to match + * Colors. */ -function size(set, condition) { - var e_6, _a; - if (condition === undefined) { - return set.size; - } - else { - var count = 0; - try { - for (var set_5 = __values(set), set_5_1 = set_5.next(); !set_5_1.done; set_5_1 = set_5.next()) { - var item = set_5_1.value; - if (!!condition.call(null, item)) { - count++; - } - } - } - catch (e_6_1) { e_6 = { error: e_6_1 }; } - finally { - try { - if (set_5_1 && !set_5_1.done && (_a = set_5.return)) _a.call(set_5); - } - finally { if (e_6) throw e_6.error; } - } - return count; - } + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __nccwpck_require__(59318); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. } -exports.size = size; + /** - * Determines if the set is empty. + * Build up the default `inspectOpts` object from the environment variables. * - * @param set - a set + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ -function isEmpty(set) { - return set.size === 0; -} -exports.isEmpty = isEmpty; + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + /** - * Returns an iterator for the items of the set. - * - * @param set - a set - * @param condition - an optional condition to match + * Is stdout a TTY? Colored output is enabled when `true`. */ -function forEach(set, condition) { - var set_6, set_6_1, item, e_7_1; - var e_7, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!(condition === undefined)) return [3 /*break*/, 2]; - return [5 /*yield**/, __values(set)]; - case 1: - _b.sent(); - return [3 /*break*/, 9]; - case 2: - _b.trys.push([2, 7, 8, 9]); - set_6 = __values(set), set_6_1 = set_6.next(); - _b.label = 3; - case 3: - if (!!set_6_1.done) return [3 /*break*/, 6]; - item = set_6_1.value; - if (!!!condition.call(null, item)) return [3 /*break*/, 5]; - return [4 /*yield*/, item]; - case 4: - _b.sent(); - _b.label = 5; - case 5: - set_6_1 = set_6.next(); - return [3 /*break*/, 3]; - case 6: return [3 /*break*/, 9]; - case 7: - e_7_1 = _b.sent(); - e_7 = { error: e_7_1 }; - return [3 /*break*/, 9]; - case 8: - try { - if (set_6_1 && !set_6_1.done && (_a = set_6.return)) _a.call(set_6); - } - finally { if (e_7) throw e_7.error; } - return [7 /*endfinally*/]; - case 9: return [2 /*return*/]; - } - }); + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); } -exports.forEach = forEach; + /** - * Creates and returns a shallow clone of set. + * Adds ANSI color escape codes if enabled. * - * @param set - a set + * @api public */ -function clone(set) { - return new Set(set); + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } } -exports.clone = clone; -/** - * Returns a new set containing items from the set sorted in ascending - * order. - * - * @param set - a set - * @param lessThanAlgo - a function that returns `true` if its first argument - * is less than its second argument, and `false` otherwise. - */ -function sortInAscendingOrder(set, lessThanAlgo) { - var list = new (Array.bind.apply(Array, __spread([void 0], set)))(); - list.sort(function (itemA, itemB) { - return lessThanAlgo.call(null, itemA, itemB) ? -1 : 1; - }); - return new Set(list); + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; } -exports.sortInAscendingOrder = sortInAscendingOrder; + /** - * Returns a new set containing items from the set sorted in descending - * order. - * - * @param set - a set - * @param lessThanAlgo - a function that returns `true` if its first argument - * is less than its second argument, and `false` otherwise. + * Invokes `util.format()` with the specified arguments and writes to stderr. */ -function sortInDescendingOrder(set, lessThanAlgo) { - var list = new (Array.bind.apply(Array, __spread([void 0], set)))(); - list.sort(function (itemA, itemB) { - return lessThanAlgo.call(null, itemA, itemB) ? 1 : -1; - }); - return new Set(list); + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); } -exports.sortInDescendingOrder = sortInDescendingOrder; + /** - * Determines if a set is a subset of another set. + * Save `namespaces`. * - * @param subset - a set - * @param superset - a superset possibly containing all items from `subset`. + * @param {String} namespaces + * @api private */ -function isSubsetOf(subset, superset) { - var e_8, _a; - try { - for (var subset_1 = __values(subset), subset_1_1 = subset_1.next(); !subset_1_1.done; subset_1_1 = subset_1.next()) { - var item = subset_1_1.value; - if (!superset.has(item)) - return false; - } - } - catch (e_8_1) { e_8 = { error: e_8_1 }; } - finally { - try { - if (subset_1_1 && !subset_1_1.done && (_a = subset_1.return)) _a.call(subset_1); - } - finally { if (e_8) throw e_8.error; } - } - return true; +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } } -exports.isSubsetOf = isSubsetOf; + /** - * Determines if a set is a superset of another set. + * Load `namespaces`. * - * @param superset - a set - * @param subset - a subset possibly contained within `superset`. + * @return {String} returns the previously persisted debug modes + * @api private */ -function isSupersetOf(superset, subset) { - return isSubsetOf(subset, superset); + +function load() { + return process.env.DEBUG; } -exports.isSupersetOf = isSupersetOf; + /** - * Returns a new set with items that are contained in both sets. + * Init logic for `debug` instances. * - * @param setA - a set - * @param setB - a set + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. */ -function intersection(setA, setB) { - var e_9, _a; - var newSet = new Set(); - try { - for (var setA_1 = __values(setA), setA_1_1 = setA_1.next(); !setA_1_1.done; setA_1_1 = setA_1.next()) { - var item = setA_1_1.value; - if (setB.has(item)) - newSet.add(item); - } - } - catch (e_9_1) { e_9 = { error: e_9_1 }; } - finally { - try { - if (setA_1_1 && !setA_1_1.done && (_a = setA_1.return)) _a.call(setA_1); - } - finally { if (e_9) throw e_9.error; } - } - return newSet; + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } } -exports.intersection = intersection; + +module.exports = __nccwpck_require__(46243)(exports); + +const {formatters} = module.exports; + /** - * Returns a new set with items from both sets. - * - * @param setA - a set - * @param setB - a set + * Map %o to `util.inspect()`, all on a single line. */ -function union(setA, setB) { - var newSet = new Set(setA); - setB.forEach(newSet.add, newSet); - return newSet; -} -exports.union = union; + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + /** - * Returns a set of integers from `n` to `m` inclusive. - * - * @param n - starting number - * @param m - ending number + * Map %O to `util.inspect()`, allowing multiple lines if needed. */ -function range(n, m) { - var newSet = new Set(); - for (var i = n; i <= m; i++) { - newSet.add(i); + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + + +/***/ }), + +/***/ 18611: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Stream = (__nccwpck_require__(12781).Stream); +var util = __nccwpck_require__(73837); + +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); + +DelayedStream.create = function(source, options) { + var delayedStream = new this(); + + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + + delayedStream.source = source; + + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } + + return delayedStream; +}; + +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); + +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; + +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + + this.source.resume(); +}; + +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; + +DelayedStream.prototype.release = function() { + this._released = true; + + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; + +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; + +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } + + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } + + this._bufferedEvents.push(args); +}; + +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + + if (this.dataSize <= this.maxDataSize) { + return; + } + + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; + + +/***/ }), + +/***/ 58932: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } - return newSet; + + this.name = 'Deprecation'; + } + } -exports.range = range; -//# sourceMappingURL=Set.js.map + +exports.Deprecation = Deprecation; + + +/***/ }), + +/***/ 62693: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var callBind = __nccwpck_require__(86815); +var gOPD = __nccwpck_require__(18501); + +var hasProtoAccessor; +try { + // eslint-disable-next-line no-extra-parens, no-proto + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} + +// eslint-disable-next-line no-extra-parens +var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); + +var $Object = Object; +var $getPrototypeOf = $Object.getPrototypeOf; + +/** @type {import('./get')} */ +module.exports = desc && typeof desc.get === 'function' + ? callBind([desc.get]) + : typeof $getPrototypeOf === 'function' + ? /** @type {import('./get')} */ function getDunder(value) { + // eslint-disable-next-line eqeqeq + return $getPrototypeOf(value == null ? value : $Object(value)); + } + : false; + + +/***/ }), + +/***/ 76599: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var stream = __nccwpck_require__(51642) +var eos = __nccwpck_require__(81205) +var inherits = __nccwpck_require__(44124) +var shift = __nccwpck_require__(66121) + +var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from([0]) + : new Buffer([0]) + +var onuncork = function(self, fn) { + if (self._corked) self.once('uncork', fn) + else fn() +} + +var autoDestroy = function (self, err) { + if (self._autoDestroy) self.destroy(err) +} + +var destroyer = function(self, end) { + return function(err) { + if (err) autoDestroy(self, err.message === 'premature close' ? null : err) + else if (end && !self._ended) self.end() + } +} + +var end = function(ws, fn) { + if (!ws) return fn() + if (ws._writableState && ws._writableState.finished) return fn() + if (ws._writableState) return ws.end(fn) + ws.end() + fn() +} + +var noop = function() {} + +var toStreams2 = function(rs) { + return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) +} + +var Duplexify = function(writable, readable, opts) { + if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) + stream.Duplex.call(this, opts) + + this._writable = null + this._readable = null + this._readable2 = null + + this._autoDestroy = !opts || opts.autoDestroy !== false + this._forwardDestroy = !opts || opts.destroy !== false + this._forwardEnd = !opts || opts.end !== false + this._corked = 1 // start corked + this._ondrain = null + this._drained = false + this._forwarding = false + this._unwrite = null + this._unread = null + this._ended = false + + this.destroyed = false + + if (writable) this.setWritable(writable) + if (readable) this.setReadable(readable) +} + +inherits(Duplexify, stream.Duplex) + +Duplexify.obj = function(writable, readable, opts) { + if (!opts) opts = {} + opts.objectMode = true + opts.highWaterMark = 16 + return new Duplexify(writable, readable, opts) +} + +Duplexify.prototype.cork = function() { + if (++this._corked === 1) this.emit('cork') +} + +Duplexify.prototype.uncork = function() { + if (this._corked && --this._corked === 0) this.emit('uncork') +} + +Duplexify.prototype.setWritable = function(writable) { + if (this._unwrite) this._unwrite() + + if (this.destroyed) { + if (writable && writable.destroy) writable.destroy() + return + } + + if (writable === null || writable === false) { + this.end() + return + } + + var self = this + var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) + + var ondrain = function() { + var ondrain = self._ondrain + self._ondrain = null + if (ondrain) ondrain() + } + + var clear = function() { + self._writable.removeListener('drain', ondrain) + unend() + } + + if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks + + this._writable = writable + this._writable.on('drain', ondrain) + this._unwrite = clear + + this.uncork() // always uncork setWritable +} + +Duplexify.prototype.setReadable = function(readable) { + if (this._unread) this._unread() + + if (this.destroyed) { + if (readable && readable.destroy) readable.destroy() + return + } + + if (readable === null || readable === false) { + this.push(null) + this.resume() + return + } + + var self = this + var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) + + var onreadable = function() { + self._forward() + } + + var onend = function() { + self.push(null) + } + + var clear = function() { + self._readable2.removeListener('readable', onreadable) + self._readable2.removeListener('end', onend) + unend() + } + + this._drained = true + this._readable = readable + this._readable2 = readable._readableState ? readable : toStreams2(readable) + this._readable2.on('readable', onreadable) + this._readable2.on('end', onend) + this._unread = clear + + this._forward() +} + +Duplexify.prototype._read = function() { + this._drained = true + this._forward() +} + +Duplexify.prototype._forward = function() { + if (this._forwarding || !this._readable2 || !this._drained) return + this._forwarding = true + + var data + + while (this._drained && (data = shift(this._readable2)) !== null) { + if (this.destroyed) continue + this._drained = this.push(data) + } + + this._forwarding = false +} + +Duplexify.prototype.destroy = function(err, cb) { + if (!cb) cb = noop + if (this.destroyed) return cb(null) + this.destroyed = true + + var self = this + process.nextTick(function() { + self._destroy(err) + cb(null) + }) +} + +Duplexify.prototype._destroy = function(err) { + if (err) { + var ondrain = this._ondrain + this._ondrain = null + if (ondrain) ondrain(err) + else this.emit('error', err) + } + + if (this._forwardDestroy) { + if (this._readable && this._readable.destroy) this._readable.destroy() + if (this._writable && this._writable.destroy) this._writable.destroy() + } + + this.emit('close') +} + +Duplexify.prototype._write = function(data, enc, cb) { + if (this.destroyed) return + if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) + if (data === SIGNAL_FLUSH) return this._finish(cb) + if (!this._writable) return cb() + + if (this._writable.write(data) === false) this._ondrain = cb + else if (!this.destroyed) cb() +} + +Duplexify.prototype._finish = function(cb) { + var self = this + this.emit('preend') + onuncork(this, function() { + end(self._forwardEnd && self._writable, function() { + // haxx to not emit prefinish twice + if (self._writableState.prefinished === false) self._writableState.prefinished = true + self.emit('prefinish') + onuncork(self, cb) + }) + }) +} + +Duplexify.prototype.end = function(data, enc, cb) { + if (typeof data === 'function') return this.end(null, null, data) + if (typeof enc === 'function') return this.end(data, null, enc) + this._ended = true + if (data) this.write(data) + if (!this._writableState.ending && !this._writableState.destroyed) this.write(SIGNAL_FLUSH) + return stream.Writable.prototype.end.call(this, cb) +} + +module.exports = Duplexify + + +/***/ }), + +/***/ 11728: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Buffer = (__nccwpck_require__(21867).Buffer); + +var getParamBytesForAlg = __nccwpck_require__(30528); + +var MAX_OCTET = 0x80, + CLASS_UNIVERSAL = 0, + PRIMITIVE_BIT = 0x20, + TAG_SEQ = 0x10, + TAG_INT = 0x02, + ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6), + ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6); + +function base64Url(base64) { + return base64 + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); +} + +function signatureAsBuffer(signature) { + if (Buffer.isBuffer(signature)) { + return signature; + } else if ('string' === typeof signature) { + return Buffer.from(signature, 'base64'); + } + + throw new TypeError('ECDSA signature must be a Base64 string or a Buffer'); +} + +function derToJose(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + + // the DER encoded param should at most be the param size, plus a padding + // zero, since due to being a signed integer + var maxEncodedParamLength = paramBytes + 1; + + var inputLength = signature.length; + + var offset = 0; + if (signature[offset++] !== ENCODED_TAG_SEQ) { + throw new Error('Could not find expected "seq"'); + } + + var seqLength = signature[offset++]; + if (seqLength === (MAX_OCTET | 1)) { + seqLength = signature[offset++]; + } + + if (inputLength - offset < seqLength) { + throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); + } + + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "r"'); + } + + var rLength = signature[offset++]; + + if (inputLength - offset - 2 < rLength) { + throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); + } + + if (maxEncodedParamLength < rLength) { + throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + + var rOffset = offset; + offset += rLength; + + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "s"'); + } + + var sLength = signature[offset++]; + + if (inputLength - offset !== sLength) { + throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); + } + + if (maxEncodedParamLength < sLength) { + throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + + var sOffset = offset; + offset += sLength; + + if (offset !== inputLength) { + throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); + } + + var rPadding = paramBytes - rLength, + sPadding = paramBytes - sLength; + + var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength); + + for (offset = 0; offset < rPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); + + offset = paramBytes; + + for (var o = offset; offset < o + sPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); + + dst = dst.toString('base64'); + dst = base64Url(dst); + + return dst; +} + +function countPadding(buf, start, stop) { + var padding = 0; + while (start + padding < stop && buf[start + padding] === 0) { + ++padding; + } + + var needsSign = buf[start + padding] >= MAX_OCTET; + if (needsSign) { + --padding; + } + + return padding; +} + +function joseToDer(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + + var signatureBytes = signature.length; + if (signatureBytes !== paramBytes * 2) { + throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); + } + + var rPadding = countPadding(signature, 0, paramBytes); + var sPadding = countPadding(signature, paramBytes, signature.length); + var rLength = paramBytes - rPadding; + var sLength = paramBytes - sPadding; + + var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; + + var shortLength = rsBytes < MAX_OCTET; + + var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes); + + var offset = 0; + dst[offset++] = ENCODED_TAG_SEQ; + if (shortLength) { + // Bit 8 has value "0" + // bits 7-1 give the length. + dst[offset++] = rsBytes; + } else { + // Bit 8 of first octet has value "1" + // bits 7-1 give the number of additional length octets. + dst[offset++] = MAX_OCTET | 1; + // length, base 256 + dst[offset++] = rsBytes & 0xff; + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = rLength; + if (rPadding < 0) { + dst[offset++] = 0; + offset += signature.copy(dst, offset, 0, paramBytes); + } else { + offset += signature.copy(dst, offset, rPadding, paramBytes); + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = sLength; + if (sPadding < 0) { + dst[offset++] = 0; + signature.copy(dst, offset, paramBytes); + } else { + signature.copy(dst, offset, paramBytes + sPadding); + } + + return dst; +} + +module.exports = { + derToJose: derToJose, + joseToDer: joseToDer +}; + + +/***/ }), + +/***/ 30528: +/***/ ((module) => { + +"use strict"; + + +function getParamSize(keySize) { + var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); + return result; +} + +var paramBytesForAlg = { + ES256: getParamSize(256), + ES384: getParamSize(384), + ES512: getParamSize(521) +}; + +function getParamBytesForAlg(alg) { + var paramBytes = paramBytesForAlg[alg]; + if (paramBytes) { + return paramBytes; + } + + throw new Error('Unknown algorithm "' + alg + '"'); +} + +module.exports = getParamBytesForAlg; + + +/***/ }), + +/***/ 81205: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var once = __nccwpck_require__(1223); + +var noop = function() {}; + +var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process); + +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; + +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; + +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + + callback = once(callback || noop); + + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + var cancelled = false; + + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; + + var onerror = function(err) { + callback.call(stream, err); + }; + + var onclose = function() { + qnt(onclosenexttick); + }; + + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); + }; + + var onrequest = function() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + cancelled = true; + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; + + +/***/ }), + +/***/ 6123: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +var $defineProperty = Object.defineProperty || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; + + +/***/ }), + +/***/ 91933: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + /***/ }), -/***/ 38784: -/***/ ((__unused_webpack_module, exports) => { +/***/ 28015: +/***/ ((module) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Pushes the given item to the stack. - * - * @param list - a list - * @param item - an item - */ -function push(list, item) { - list.push(item); -} -exports.push = push; -/** - * Pops and returns an item from the stack. - * - * @param list - a list - */ -function pop(list) { - return list.pop() || null; -} -exports.pop = pop; -//# sourceMappingURL=Stack.js.map + +/** @type {import('.')} */ +module.exports = Error; + /***/ }), -/***/ 13203: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 54415: +/***/ ((module) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var CodePoints_1 = __nccwpck_require__(28548); -var ByteSequence_1 = __nccwpck_require__(71627); -var Byte_1 = __nccwpck_require__(42460); -var util_1 = __nccwpck_require__(76195); -/** - * Determines if the string `a` is a code unit prefix of string `b`. - * - * @param a - a string - * @param b - a string - */ -function isCodeUnitPrefix(a, b) { - /** - * 1. Let i be 0. - * 2. While true: - * 2.1. Let aCodeUnit be the ith code unit of a if i is less than a’s length; - * otherwise null. - * 2.2. Let bCodeUnit be the ith code unit of b if i is less than b’s length; - * otherwise null. - * 2.3. If bCodeUnit is null, then return true. - * 2.4. Return false if aCodeUnit is different from bCodeUnit. - * 2.5. Set i to i + 1. - */ - var i = 0; - while (true) { - var aCodeUnit = i < a.length ? a.charCodeAt(i) : null; - var bCodeUnit = i < b.length ? b.charCodeAt(i) : null; - if (aCodeUnit === null) - return true; - if (aCodeUnit !== bCodeUnit) - return false; - i++; - } -} -exports.isCodeUnitPrefix = isCodeUnitPrefix; -/** - * Determines if the string `a` is a code unit less than string `b`. - * - * @param a - a string - * @param b - a string - */ -function isCodeUnitLessThan(a, b) { - /** - * 1. If b is a code unit prefix of a, then return false. - * 2. If a is a code unit prefix of b, then return true. - * 3. Let n be the smallest index such that the nth code unit of a is - * different from the nth code unit of b. (There has to be such an index, - * since neither string is a prefix of the other.) - * 4. If the nth code unit of a is less than the nth code unit of b, then - * return true. - * 5. Return false. - */ - if (isCodeUnitPrefix(b, a)) - return false; - if (isCodeUnitPrefix(a, b)) - return true; - for (var i = 0; i < Math.min(a.length, b.length); i++) { - var aCodeUnit = a.charCodeAt(i); - var bCodeUnit = b.charCodeAt(i); - if (aCodeUnit === bCodeUnit) - continue; - return (aCodeUnit < bCodeUnit); - } - /* istanbul ignore next */ - return false; -} -exports.isCodeUnitLessThan = isCodeUnitLessThan; -/** - * Isomorphic encodes the given string. - * - * @param str - a string - */ -function isomorphicEncode(str) { - var e_1, _a; - /** - * 1. Assert: input contains no code points greater than U+00FF. - * 2. Return a byte sequence whose length is equal to input’s length and whose - * bytes have the same values as input’s code points, in the same order. - */ - var codePoints = Array.from(str); - var bytes = new Uint8Array(codePoints.length); - var i = 0; - try { - for (var str_1 = __values(str), str_1_1 = str_1.next(); !str_1_1.done; str_1_1 = str_1.next()) { - var codePoint = str_1_1.value; - var byte = codePoint.codePointAt(0); - console.assert(byte !== undefined && byte <= 0x00FF, "isomorphicEncode requires string bytes to be less than or equal to 0x00FF."); - if (byte !== undefined && byte <= 0x00FF) { - bytes[i++] = byte; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (str_1_1 && !str_1_1.done && (_a = str_1.return)) _a.call(str_1); - } - finally { if (e_1) throw e_1.error; } - } - return bytes; -} -exports.isomorphicEncode = isomorphicEncode; -/** - * Determines if the given string is An ASCII string. - * - * @param str - a string - */ -function isASCIIString(str) { - /** - * An ASCII string is a string whose code points are all ASCII code points. - */ - return /^[\u0000-\u007F]*$/.test(str); -} -exports.isASCIIString = isASCIIString; -/** - * Converts all uppercase ASCII code points to lowercase. - * - * @param str - a string - */ -function asciiLowercase(str) { - var e_2, _a; - /** - * To ASCII lowercase a string, replace all ASCII upper alphas in the string - * with their corresponding code point in ASCII lower alpha. - */ - var result = ""; - try { - for (var str_2 = __values(str), str_2_1 = str_2.next(); !str_2_1.done; str_2_1 = str_2.next()) { - var c = str_2_1.value; - var code = c.codePointAt(0); - if (code !== undefined && code >= 0x41 && code <= 0x5A) { - result += String.fromCodePoint(code + 0x20); - } - else { - result += c; - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (str_2_1 && !str_2_1.done && (_a = str_2.return)) _a.call(str_2); - } - finally { if (e_2) throw e_2.error; } - } - return result; -} -exports.asciiLowercase = asciiLowercase; -/** - * Converts all uppercase ASCII code points to uppercase. - * - * @param str - a string - */ -function asciiUppercase(str) { - var e_3, _a; - /** - * To ASCII uppercase a string, replace all ASCII lower alphas in the string - * with their corresponding code point in ASCII upper alpha. - */ - var result = ""; - try { - for (var str_3 = __values(str), str_3_1 = str_3.next(); !str_3_1.done; str_3_1 = str_3.next()) { - var c = str_3_1.value; - var code = c.codePointAt(0); - if (code !== undefined && code >= 0x61 && code <= 0x7A) { - result += String.fromCodePoint(code - 0x20); - } - else { - result += c; - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (str_3_1 && !str_3_1.done && (_a = str_3.return)) _a.call(str_3); - } - finally { if (e_3) throw e_3.error; } - } - return result; -} -exports.asciiUppercase = asciiUppercase; -/** - * Compares two ASCII strings case-insensitively. - * - * @param a - a string - * @param b - a string - */ -function asciiCaseInsensitiveMatch(a, b) { - /** - * A string A is an ASCII case-insensitive match for a string B, if the ASCII - * lowercase of A is the ASCII lowercase of B. - */ - return asciiLowercase(a) === asciiLowercase(b); -} -exports.asciiCaseInsensitiveMatch = asciiCaseInsensitiveMatch; -/** - * ASCII encodes a string. - * - * @param str - a string - */ -function asciiEncode(str) { - /** - * 1. Assert: input is an ASCII string. - * 2. Return the isomorphic encoding of input. - */ - console.assert(isASCIIString(str), "asciiEncode requires an ASCII string."); - return isomorphicEncode(str); -} -exports.asciiEncode = asciiEncode; -/** - * ASCII decodes a byte sequence. - * - * @param bytes - a byte sequence - */ -function asciiDecode(bytes) { - var e_4, _a; - try { - /** - * 1. Assert: All bytes in input are ASCII bytes. - * 2. Return the isomorphic decoding of input. - */ - for (var bytes_1 = __values(bytes), bytes_1_1 = bytes_1.next(); !bytes_1_1.done; bytes_1_1 = bytes_1.next()) { - var byte = bytes_1_1.value; - console.assert(Byte_1.isASCIIByte(byte), "asciiDecode requires an ASCII byte sequence."); - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (bytes_1_1 && !bytes_1_1.done && (_a = bytes_1.return)) _a.call(bytes_1); - } - finally { if (e_4) throw e_4.error; } - } - return ByteSequence_1.isomorphicDecode(bytes); -} -exports.asciiDecode = asciiDecode; -/** - * Strips newline characters from a string. - * - * @param str - a string - */ -function stripNewlines(str) { - /** - * To strip newlines from a string, remove any U+000A LF and U+000D CR code - * points from the string. - */ - return str.replace(/[\n\r]/g, ""); -} -exports.stripNewlines = stripNewlines; -/** - * Normalizes newline characters in a string by converting consecutive - * carriage-return newline characters and also single carriage return characters - * into a single newline. - * - * @param str - a string - */ -function normalizeNewlines(str) { - /** - * To normalize newlines in a string, replace every U+000D CR U+000A LF code - * point pair with a single U+000A LF code point, and then replace every - * remaining U+000D CR code point with a U+000A LF code point. - */ - return str.replace(/\r\n/g, "\n").replace(/\r/g, "\n"); -} -exports.normalizeNewlines = normalizeNewlines; -/** - * Removes leading and trailing whitespace characters from a string. - * - * @param str - a string - */ -function stripLeadingAndTrailingASCIIWhitespace(str) { - /** - * To strip leading and trailing ASCII whitespace from a string, remove all - * ASCII whitespace that are at the start or the end of the string. - */ - return str.replace(/^[\t\n\f\r ]+/, "").replace(/[\t\n\f\r ]+$/, ""); -} -exports.stripLeadingAndTrailingASCIIWhitespace = stripLeadingAndTrailingASCIIWhitespace; -/** - * Removes consecutive newline characters from a string. - * - * @param str - a string - */ -function stripAndCollapseASCIIWhitespace(str) { - /** - * To strip and collapse ASCII whitespace in a string, replace any sequence of - * one or more consecutive code points that are ASCII whitespace in the string - * with a single U+0020 SPACE code point, and then remove any leading and - * trailing ASCII whitespace from that string. - */ - return stripLeadingAndTrailingASCIIWhitespace(str.replace(/[\t\n\f\r ]{2,}/g, " ")); -} -exports.stripAndCollapseASCIIWhitespace = stripAndCollapseASCIIWhitespace; -/** - * Collects a sequence of code points matching a given condition from the input - * string. - * - * @param condition - a condition to match - * @param input - a string - * @param options - starting position - */ -function collectASequenceOfCodePoints(condition, input, options) { - /** - * 1. Let result be the empty string. - * 2. While position doesn’t point past the end of input and the code point at - * position within input meets the condition condition: - * 2.1. Append that code point to the end of result. - * 2.2. Advance position by 1. - * 3. Return result. - */ - if (!util_1.isArray(input)) - return collectASequenceOfCodePoints(condition, Array.from(input), options); - var result = ""; - while (options.position < input.length && !!condition.call(null, input[options.position])) { - result += input[options.position]; - options.position++; - } - return result; -} -exports.collectASequenceOfCodePoints = collectASequenceOfCodePoints; -/** - * Skips over ASCII whitespace. - * - * @param input - input string - * @param options - starting position - */ -function skipASCIIWhitespace(input, options) { - /** - * To skip ASCII whitespace within a string input given a position variable - * position, collect a sequence of code points that are ASCII whitespace from - * input given position. The collected code points are not used, but position - * is still updated. - */ - collectASequenceOfCodePoints(function (str) { return CodePoints_1.ASCIIWhiteSpace.test(str); }, input, options); -} -exports.skipASCIIWhitespace = skipASCIIWhitespace; -/** - * Solits a string at the given delimiter. - * - * @param input - input string - * @param delimiter - a delimiter string - */ -function strictlySplit(input, delimiter) { - /** - * 1. Let position be a position variable for input, initially pointing at the - * start of input. - * 2. Let tokens be a list of strings, initially empty. - * 3. Let token be the result of collecting a sequence of code points that are - * not equal to delimiter from input, given position. - * 4. Append token to tokens. - * 5. While position is not past the end of input: - * 5.1. Assert: the code point at position within input is delimiter. - * 5.2. Advance position by 1. - * 5.3. Let token be the result of collecting a sequence of code points that - * are not equal to delimiter from input, given position. - * 5.4. Append token to tokens. - * 6. Return tokens. - */ - if (!util_1.isArray(input)) - return strictlySplit(Array.from(input), delimiter); - var options = { position: 0 }; - var tokens = []; - var token = collectASequenceOfCodePoints(function (str) { return delimiter !== str; }, input, options); - tokens.push(token); - while (options.position < input.length) { - console.assert(input[options.position] === delimiter, "strictlySplit found no delimiter in input string."); - options.position++; - token = collectASequenceOfCodePoints(function (str) { return delimiter !== str; }, input, options); - tokens.push(token); - } - return tokens; -} -exports.strictlySplit = strictlySplit; -/** - * Splits a string on ASCII whitespace. - * - * @param input - a string - */ -function splitAStringOnASCIIWhitespace(input) { - /** - * 1. Let position be a position variable for input, initially pointing at the - * start of input. - * 2. Let tokens be a list of strings, initially empty. - * 3. Skip ASCII whitespace within input given position. - * 4. While position is not past the end of input: - * 4.1. Let token be the result of collecting a sequence of code points that - * are not ASCII whitespace from input, given position. - * 4.2. Append token to tokens. - * 4.3. Skip ASCII whitespace within input given position. - * 5. Return tokens. - */ - if (!util_1.isArray(input)) - return splitAStringOnASCIIWhitespace(Array.from(input)); - var options = { position: 0 }; - var tokens = []; - skipASCIIWhitespace(input, options); - while (options.position < input.length) { - var token = collectASequenceOfCodePoints(function (str) { return !CodePoints_1.ASCIIWhiteSpace.test(str); }, input, options); - tokens.push(token); - skipASCIIWhitespace(input, options); - } - return tokens; -} -exports.splitAStringOnASCIIWhitespace = splitAStringOnASCIIWhitespace; -/** - * Splits a string on commas. - * - * @param input - a string - */ -function splitAStringOnCommas(input) { - /** - * 1. Let position be a position variable for input, initially pointing at the - * start of input. - * 2. Let tokens be a list of strings, initially empty. - * 3. While position is not past the end of input: - * 3.1. Let token be the result of collecting a sequence of code points that - * are not U+002C (,) from input, given position. - * 3.2. Strip leading and trailing ASCII whitespace from token. - * 3.3. Append token to tokens. - * 3.4. If position is not past the end of input, then: - * 3.4.1. Assert: the code point at position within input is U+002C (,). - * 3.4.2. Advance position by 1. - * 4. Return tokens. - */ - if (!util_1.isArray(input)) - return splitAStringOnCommas(Array.from(input)); - var options = { position: 0 }; - var tokens = []; - while (options.position < input.length) { - var token = collectASequenceOfCodePoints(function (str) { return str !== ','; }, input, options); - tokens.push(stripLeadingAndTrailingASCIIWhitespace(token)); - if (options.position < input.length) { - console.assert(input[options.position] === ',', "splitAStringOnCommas found no delimiter in input string."); - options.position++; - } - } - return tokens; -} -exports.splitAStringOnCommas = splitAStringOnCommas; -/** - * Concatenates a list of strings with the given separator. - * - * @param list - a list of strings - * @param separator - a separator string - */ -function concatenate(list, separator) { - if (separator === void 0) { separator = ""; } - /** - * 1. If list is empty, then return the empty string. - * 2. If separator is not given, then set separator to the empty string. - * 3. Return a string whose contents are list’s items, in order, separated - * from each other by separator. - */ - if (list.length === 0) - return ""; - return list.join(separator); -} -exports.concatenate = concatenate; -//# sourceMappingURL=String.js.map + +/** @type {import('./range')} */ +module.exports = RangeError; + /***/ }), -/***/ 84251: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 46279: +/***/ ((module) => { "use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base64 = __importStar(__nccwpck_require__(28585)); -exports.base64 = base64; -var byte = __importStar(__nccwpck_require__(42460)); -exports.byte = byte; -var byteSequence = __importStar(__nccwpck_require__(71627)); -exports.byteSequence = byteSequence; -var codePoint = __importStar(__nccwpck_require__(28548)); -exports.codePoint = codePoint; -var json = __importStar(__nccwpck_require__(99387)); -exports.json = json; -var list = __importStar(__nccwpck_require__(20340)); -exports.list = list; -var map = __importStar(__nccwpck_require__(22298)); -exports.map = map; -var namespace = __importStar(__nccwpck_require__(93764)); -exports.namespace = namespace; -var queue = __importStar(__nccwpck_require__(39201)); -exports.queue = queue; -var set = __importStar(__nccwpck_require__(35931)); -exports.set = set; -var stack = __importStar(__nccwpck_require__(38784)); -exports.stack = stack; -var string = __importStar(__nccwpck_require__(13203)); -exports.string = string; -//# sourceMappingURL=index.js.map + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + /***/ }), -/***/ 53568: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 75474: +/***/ ((module) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -var interfaces_1 = __nccwpck_require__(31752); -var infra_1 = __nccwpck_require__(84251); -var url_1 = __nccwpck_require__(57310); -var _validationErrorCallback; -/** - * Default ports for a special URL scheme. - */ -var _defaultPorts = { - "ftp": 21, - "file": null, - "http": 80, - "https": 443, - "ws": 80, - "wss": 443 + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + + +/***/ }), + +/***/ 6361: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ 5065: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + + +/***/ }), + +/***/ 78308: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Object; + + +/***/ }), + +/***/ 11770: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(74538); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasToStringTag = __nccwpck_require__(99038)(); +var hasOwn = __nccwpck_require__(62157); +var $TypeError = __nccwpck_require__(6361); + +var toStringTag = hasToStringTag ? Symbol.toStringTag : null; + +/** @type {import('.')} */ +module.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; + var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; + if ( + (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') + || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') + ) { + throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); + } + if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { + if ($defineProperty) { + $defineProperty(object, toStringTag, { + configurable: !nonConfigurable, + enumerable: false, + value: value, + writable: false + }); + } else { + object[toStringTag] = value; // eslint-disable-line no-param-reassign + } + } }; + + +/***/ }), + +/***/ 84697: +/***/ ((module, exports) => { + +"use strict"; /** - * The C0 control percent-encode set are the C0 controls and all code points - * greater than U+007E (~). - */ -var _c0ControlPercentEncodeSet = /[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -/** - * The fragment percent-encode set is the C0 control percent-encode set and - * U+0020 SPACE, U+0022 ("), U+003C (<), U+003E (>), and U+0060 (`). - */ -var _fragmentPercentEncodeSet = /[ "<>`]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -/** - * The path percent-encode set is the fragment percent-encode set and - * U+0023 (#), U+003F (?), U+007B ({), and U+007D (}). - */ -var _pathPercentEncodeSet = /[ "<>`#?{}]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -/** - * The userinfo percent-encode set is the path percent-encode set and - * U+002F (/), U+003A (:), U+003B (;), U+003D (=), U+0040 (@), U+005B ([), - * U+005C (\), U+005D (]), U+005E (^), and U+007C (|). - */ -var _userInfoPercentEncodeSet = /[ "<>`#?{}/:;=@\[\]\\\^\|]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -/** - * The URL code points are ASCII alphanumeric, U+0021 (!), U+0024 ($), - * U+0026 (&), U+0027 ('), U+0028 LEFT PARENTHESIS, U+0029 RIGHT PARENTHESIS, - * U+002A (*), U+002B (+), U+002C (,), U+002D (-), U+002E (.), U+002F (/), - * U+003A (:), U+003B (;), U+003D (=), U+003F (?), U+0040 (@), U+005F (_), - * U+007E (~), and code points in the range U+00A0 to U+10FFFD, inclusive, - * excluding surrogates and noncharacters. - */ -var _urlCodePoints = /[0-9A-Za-z!\$&-\/:;=\?@_~\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB40-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD]/; -/** - * A forbidden host code point is U+0000 NULL, U+0009 TAB, U+000A LF, - * U+000D CR, U+0020 SPACE, U+0023 (#), U+0025 (%), U+002F (/), U+003A (:), - * U+003F (?), U+0040 (@), U+005B ([), U+005C (\), or U+005D (]). - */ -var _forbiddenHostCodePoint = /[\0\t\f\r #%/:?@\[\\\]]/; -/** - * Sets the callback function for validation errors. - * - * @param validationErrorCallback - a callback function to be called when a - * validation error occurs - */ -function setValidationErrorCallback(validationErrorCallback) { - _validationErrorCallback = validationErrorCallback; -} -exports.setValidationErrorCallback = setValidationErrorCallback; -/** - * Generates a validation error. - * - * @param message - error message - */ -function validationError(message) { - if (_validationErrorCallback !== undefined) { - _validationErrorCallback.call(null, "Validation Error: " + message); - } -} -/** - * Creates a new URL. - */ -function newURL() { - return { - scheme: '', - username: '', - password: '', - host: null, - port: null, - path: [], - query: null, - fragment: null, - _cannotBeABaseURLFlag: false, - _blobURLEntry: null - }; -} -exports.newURL = newURL; -/** - * Determines if the scheme is a special scheme. - * - * @param scheme - a scheme - */ -function isSpecialScheme(scheme) { - return (scheme in _defaultPorts); -} -exports.isSpecialScheme = isSpecialScheme; -/** - * Determines if the URL has a special scheme. - * - * @param url - an URL - */ -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} -exports.isSpecial = isSpecial; -/** - * Returns the default port for a special scheme. - * - * @param scheme - a scheme - */ -function defaultPort(scheme) { - return _defaultPorts[scheme] || null; -} -exports.defaultPort = defaultPort; -/** - * Determines if the URL has credentials. - * - * @param url - an URL - */ -function includesCredentials(url) { - return url.username !== '' || url.password !== ''; -} -exports.includesCredentials = includesCredentials; -/** - * Determines if an URL cannot have credentials. - * - * @param url - an URL - */ -function cannotHaveAUsernamePasswordPort(url) { - /** - * A URL cannot have a username/password/port if its host is null or the - * empty string, its cannot-be-a-base-URL flag is set, or its scheme is - * "file". - */ - return (url.host === null || url.host === "" || url._cannotBeABaseURLFlag || - url.scheme === "file"); -} -exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; -/** - * Serializes an URL into a string. - * - * @param url - an URL - */ -function urlSerializer(url, excludeFragmentFlag) { - var e_1, _a; - if (excludeFragmentFlag === void 0) { excludeFragmentFlag = false; } - /** - * 1. Let output be url’s scheme and U+003A (:) concatenated. - */ - var output = url.scheme + ':'; - /** - * 2. If url’s host is non-null: - */ - if (url.host !== null) { - /** - * 2.1. Append "//" to output. - */ - output += '//'; - /** - * 2.2. If url includes credentials, then: - */ - if (includesCredentials(url)) { - /** - * 2.2.1. Append url’s username to output. - * 2.2.2. If url’s password is not the empty string, then append U+003A (:), - * followed by url’s password, to output. - * 2.2.3. Append U+0040 (@) to output. - */ - output += url.username; - if (url.password !== '') { - output += ':' + url.password; - } - output += '@'; - } - /** - * 2.3. Append url’s host, serialized, to output. - * 2.4. If url’s port is non-null, append U+003A (:) followed by url’s port, - * serialized, to output. - */ - output += hostSerializer(url.host); - if (url.port !== null) { - output += ':' + url.port; - } - } - else if (url.host === null && url.scheme === "file") { - /** - * 3. Otherwise, if url’s host is null and url’s scheme is "file", append "//" to output. - */ - output += '//'; - } - /** - * 4. If url’s cannot-be-a-base-URL flag is set, append url’s path[0] to - * output. - * 5. Otherwise, then for each string in url’s path, append U+002F (/) - * followed by the string to output. - */ - if (url._cannotBeABaseURLFlag) { - output += url.path[0]; - } - else { - try { - for (var _b = __values(url.path), _c = _b.next(); !_c.done; _c = _b.next()) { - var str = _c.value; - output += '/' + str; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - } - /** - * 6. If url’s query is non-null, append U+003F (?), followed by url’s - * query, to output. - * 7. If the exclude fragment flag is unset and url’s fragment is non-null, - * append U+0023 (#), followed by url’s fragment, to output. - * 8. Return output. - */ - if (url.query !== null) { - output += '?' + url.query; - } - if (!excludeFragmentFlag && url.fragment !== null) { - output += '#' + url.fragment; - } - return output; -} -exports.urlSerializer = urlSerializer; -/** - * Serializes a host into a string. - * - * @param host - a host - */ -function hostSerializer(host) { - /** - * 1. If host is an IPv4 address, return the result of running the IPv4 - * serializer on host. - * 2. Otherwise, if host is an IPv6 address, return U+005B ([), followed - * by the result of running the IPv6 serializer on host, followed by - * U+005D (]). - * 3. Otherwise, host is a domain, opaque host, or empty host, return host. - */ - if (util_1.isNumber(host)) { - return iPv4Serializer(host); - } - else if (util_1.isArray(host)) { - return '[' + iPv6Serializer(host) + ']'; - } - else { - return host; - } -} -exports.hostSerializer = hostSerializer; -/** - * Serializes an IPv4 address into a string. - * - * @param address - an IPv4 address - */ -function iPv4Serializer(address) { - /** - * 1. Let output be the empty string. - * 2. Let n be the value of address. - * 3. For each i in the range 1 to 4, inclusive: - * 3.1. Prepend n % 256, serialized, to output. - * 3.2. If i is not 4, then prepend U+002E (.) to output. - * 3.3. Set n to floor(n / 256). - * 4. Return output. - */ - var output = ""; - var n = address; - for (var i = 1; i <= 4; i++) { - output = (n % 256).toString() + output; - if (i !== 4) { - output = '.' + output; - } - n = Math.floor(n / 256); - } - return output; -} -exports.iPv4Serializer = iPv4Serializer; -/** - * Serializes an IPv6 address into a string. - * - * @param address - an IPv6 address represented as a list of eight numbers - */ -function iPv6Serializer(address) { - /** - * 1. Let output be the empty string. - * 2. Let compress be an index to the first IPv6 piece in the first longest - * sequences of address’s IPv6 pieces that are 0. - * In 0:f:0:0:f:f:0:0 it would point to the second 0. - * 3. If there is no sequence of address’s IPv6 pieces that are 0 that is - * longer than 1, then set compress to null. - */ - var output = ""; - var compress = null; - var lastIndex = -1; - var count = 0; - var lastCount = 0; - for (var i = 0; i < 8; i++) { - if (address[i] !== 0) - continue; - count = 1; - for (var j = i + 1; j < 8; j++) { - if (address[j] !== 0) - break; - count++; - continue; - } - if (count > lastCount) { - lastCount = count; - lastIndex = i; - } - } - if (lastCount > 1) - compress = lastIndex; - /** - * 4. Let ignore0 be false. - * 5. For each pieceIndex in the range 0 to 7, inclusive: - */ - var ignore0 = false; - for (var pieceIndex = 0; pieceIndex < 8; pieceIndex++) { - /** - * 5.1. If ignore0 is true and address[pieceIndex] is 0, then continue. - * 5.2. Otherwise, if ignore0 is true, set ignore0 to false. - * 5.3. If compress is pieceIndex, then: - */ - if (ignore0 && address[pieceIndex] === 0) - continue; - if (ignore0) - ignore0 = false; - if (compress === pieceIndex) { - /** - * 5.3.1. Let separator be "::" if pieceIndex is 0, and U+003A (:) otherwise. - * 5.3.2. Append separator to output. - * 5.3.3. Set ignore0 to true and continue. - */ - output += (pieceIndex === 0 ? '::' : ':'); - ignore0 = true; - continue; - } - /** - * 5.4. Append address[pieceIndex], represented as the shortest possible - * lowercase hexadecimal number, to output. - * 5.5. If pieceIndex is not 7, then append U+003A (:) to output. - */ - output += address[pieceIndex].toString(16); - if (pieceIndex !== 7) - output += ':'; - } - /** - * 6. Return output. - */ - return output; -} -exports.iPv6Serializer = iPv6Serializer; -/** - * Parses an URL string. - * - * @param input - input string - * @param baseURL - base URL - * @param encodingOverride - encoding override + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. */ -function urlParser(input, baseURL, encodingOverride) { - /** - * 1. Let url be the result of running the basic URL parser on input with - * base, and encoding override as provided. - * 2. If url is failure, return failure. - * 3. If url’s scheme is not "blob", return url. - * 4. Set url’s blob URL entry to the result of resolving the blob URL url, - * if that did not return failure, and null otherwise. - * 5. Return url. - */ - var url = basicURLParser(input, baseURL, encodingOverride); - if (url === null) - return null; - if (url.scheme !== "blob") - return url; - var entry = resolveABlobURL(url); - if (entry !== null) { - url._blobURLEntry = entry; - } - else { - url._blobURLEntry = null; - } - return url; -} -exports.urlParser = urlParser; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + /** - * Parses an URL string. - * - * @param input - input string - * @param baseURL - base URL - * @param encodingOverride - encoding override + * @typedef {object} PrivateData + * @property {EventTarget} eventTarget The event target. + * @property {{type:string}} event The original event object. + * @property {number} eventPhase The current event phase. + * @property {EventTarget|null} currentTarget The current event target. + * @property {boolean} canceled The flag to prevent default. + * @property {boolean} stopped The flag to stop propagation. + * @property {boolean} immediateStopped The flag to stop propagation immediately. + * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. + * @property {number} timeStamp The unix time. + * @private */ -function basicURLParser(input, baseURL, encodingOverride, url, stateOverride) { - var e_2, _a, e_3, _b; - /** - * 1. If url is not given: - * 1.1. Set url to a new URL. - * 1.2. If input contains any leading or trailing C0 control or space, - * validation error. - * 1.3. Remove any leading and trailing C0 control or space from input. - */ - if (url === undefined) { - url = newURL(); - // leading - var leadingControlOrSpace = /^[\u0000-\u001F\u0020]+/; - var trailingControlOrSpace = /[\u0000-\u001F\u0020]+$/; - if (leadingControlOrSpace.test(input) || trailingControlOrSpace.test(input)) { - validationError("Input string contains leading or trailing control characters or space."); - } - input = input.replace(leadingControlOrSpace, ''); - input = input.replace(trailingControlOrSpace, ''); - } - /** - * 2. If input contains any ASCII tab or newline, validation error. - * 3. Remove all ASCII tab or newline from input. - */ - var tabOrNewline = /[\u0009\u000A\u000D]/g; - if (tabOrNewline.test(input)) { - validationError("Input string contains tab or newline characters."); - } - input = input.replace(tabOrNewline, ''); - /** - * 4. Let state be state override if given, or scheme start state otherwise. - * 5. If base is not given, set it to null. - * 6. Let encoding be UTF-8. - * 7. If encoding override is given, set encoding to the result of getting - * an output encoding from encoding override. - */ - var state = (stateOverride === undefined ? interfaces_1.ParserState.SchemeStart : stateOverride); - if (baseURL === undefined) - baseURL = null; - var encoding = (encodingOverride === undefined || - encodingOverride === "replacement" || encodingOverride === "UTF-16BE" || - encodingOverride === "UTF-16LE" ? "UTF-8" : encodingOverride); - /** - * 8. Let buffer be the empty string. - * 9. Let the @ flag, [] flag, and passwordTokenSeenFlag be unset. - * 10. Let pointer be a pointer to first code point in input. - */ - var buffer = ""; - var atFlag = false; - var arrayFlag = false; - var passwordTokenSeenFlag = false; - var EOF = ""; - var walker = new util_1.StringWalker(input); - /** - * 11. Keep running the following state machine by switching on state. If - * after a run pointer points to the EOF code point, go to the next step. - * Otherwise, increase pointer by one and continue with the state machine. - */ - while (true) { - switch (state) { - case interfaces_1.ParserState.SchemeStart: - /** - * 1. If c is an ASCII alpha, append c, lowercased, to buffer, and set - * state to scheme state. - * 2. Otherwise, if state override is not given, set state to no scheme - * state, and decrease pointer by one. - * 3. Otherwise, validation error, return failure. - */ - if (infra_1.codePoint.ASCIIAlpha.test(walker.c())) { - buffer += walker.c().toLowerCase(); - state = interfaces_1.ParserState.Scheme; - } - else if (stateOverride === undefined) { - state = interfaces_1.ParserState.NoScheme; - walker.pointer--; - } - else { - validationError("Invalid scheme start character."); - return null; - } - break; - case interfaces_1.ParserState.Scheme: - /** - * 1. If c is an ASCII alphanumeric, U+002B (+), U+002D (-), or U+002E - * (.), append c, lowercased, to buffer. - */ - if (infra_1.codePoint.ASCIIAlphanumeric.test(walker.c()) || - walker.c() === '+' || walker.c() === '-' || walker.c() === '.') { - buffer += walker.c().toLowerCase(); - } - else if (walker.c() === ':') { - /** - * 2. Otherwise, if c is U+003A (:), then: - * 2.1. If state override is given, then: - * 2.1.1. If url’s scheme is a special scheme and buffer is not a - * special scheme, then return. - * 2.1.2. If url’s scheme is not a special scheme and buffer is a - * special scheme, then return. - * 2.1.3. If url includes credentials or has a non-null port, and - * buffer is "file", then return. - * 2.1.4. If url’s scheme is "file" and its host is an empty host or - * null, then return. - */ - if (stateOverride !== undefined) { - if (isSpecialScheme(url.scheme) && !isSpecialScheme(buffer)) - return url; - if (!isSpecialScheme(url.scheme) && isSpecialScheme(buffer)) - return url; - if ((includesCredentials(url) || url.port !== null) && buffer === "file") - return url; - if (url.scheme === "file" && (url.host === "" || url.host === null)) - return url; - } - /** - * 2.2. Set url’s scheme to buffer. - */ - url.scheme = buffer; - /** - * 2.3. If state override is given, then: - * 2.3.1. If url’s port is url’s scheme’s default port, then set - * url’s port to null. - * 2.3.2. Return. - */ - if (stateOverride !== undefined) { - if (url.port === defaultPort(url.scheme)) { - url.port = null; - } - return url; - } - /** - * 2.4. Set buffer to the empty string. - */ - buffer = ""; - if (url.scheme === "file") { - /** - * 2.5. If url’s scheme is "file", then: - * 2.5.1. If remaining does not start with "//", validation error. - * 2.5.2. Set state to file state. - */ - if (!walker.remaining().startsWith("//")) { - validationError("Invalid file URL scheme, '//' expected."); - } - state = interfaces_1.ParserState.File; - } - else if (isSpecial(url) && baseURL !== null && baseURL.scheme === url.scheme) { - /** - * 2.6. Otherwise, if url is special, base is non-null, and base’s - * scheme is equal to url’s scheme, set state to special relative - * or authority state. - */ - state = interfaces_1.ParserState.SpecialRelativeOrAuthority; - } - else if (isSpecial(url)) { - /** - * 2.7. Otherwise, if url is special, set state to special - * authority slashes state. - */ - state = interfaces_1.ParserState.SpecialAuthoritySlashes; - } - else if (walker.remaining().startsWith("/")) { - /** - * 2.8. Otherwise, if remaining starts with an U+002F (/), set state - * to path or authority state and increase pointer by one. - */ - state = interfaces_1.ParserState.PathOrAuthority; - walker.pointer++; - } - else { - /** - * 2.9. Otherwise, set url’s cannot-be-a-base-URL flag, append an - * empty string to url’s path, and set state to - * cannot-be-a-base-URL path state. - */ - url._cannotBeABaseURLFlag = true; - url.path.push(""); - state = interfaces_1.ParserState.CannotBeABaseURLPath; - } - } - else if (stateOverride === undefined) { - /** - * 3. Otherwise, if state override is not given, set buffer to the - * empty string, state to no scheme state, and start over (from the - * first code point in input). - */ - buffer = ""; - state = interfaces_1.ParserState.NoScheme; - walker.pointer = 0; - continue; - } - else { - /** - * 4. Otherwise, validation error, return failure. - */ - validationError("Invalid input string."); - return null; - } - break; - case interfaces_1.ParserState.NoScheme: - /** - * 1. If base is null, or base’s cannot-be-a-base-URL flag is set - * and c is not U+0023 (#), validation error, return failure. - * 2. Otherwise, if base’s cannot-be-a-base-URL flag is set and - * c is U+0023 (#), set url’s scheme to base’s scheme, url’s path to - * a copy of base’s path, url’s query to base’s query, url’s - * fragment to the empty string, set url’s cannot-be-a-base-URL - * flag, and set state to fragment state. - * 3. Otherwise, if base’s scheme is not "file", set state to - * relative state and decrease pointer by one. - * 4. Otherwise, set state to file state and decrease pointer by one. - */ - if (baseURL === null || (baseURL._cannotBeABaseURLFlag && walker.c() !== '#')) { - validationError("Invalid input string."); - return null; - } - else if (baseURL._cannotBeABaseURLFlag && walker.c() === '#') { - url.scheme = baseURL.scheme; - url.path = infra_1.list.clone(baseURL.path); - url.query = baseURL.query; - url.fragment = ""; - url._cannotBeABaseURLFlag = true; - state = interfaces_1.ParserState.Fragment; - } - else if (baseURL.scheme !== "file") { - state = interfaces_1.ParserState.Relative; - walker.pointer--; - } - else { - state = interfaces_1.ParserState.File; - walker.pointer--; - } - break; - case interfaces_1.ParserState.SpecialRelativeOrAuthority: - /** - * If c is U+002F (/) and remaining starts with U+002F (/), then set - * state to special authority ignore slashes state and increase - * pointer by one. - * Otherwise, validation error, set state to relative state and - * decrease pointer by one. - */ - if (walker.c() === '/' && walker.remaining().startsWith('/')) { - state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; - walker.pointer++; - } - else { - validationError("Invalid input string."); - state = interfaces_1.ParserState.Relative; - walker.pointer--; - } - break; - case interfaces_1.ParserState.PathOrAuthority: - /** - * If c is U+002F (/), then set state to authority state. - * Otherwise, set state to path state, and decrease pointer by one. - */ - if (walker.c() === '/') { - state = interfaces_1.ParserState.Authority; - } - else { - state = interfaces_1.ParserState.Path; - walker.pointer--; - } - break; - case interfaces_1.ParserState.Relative: - /** - * Set url’s scheme to base’s scheme, and then, switching on c: - */ - if (baseURL === null) { - throw new Error("Invalid parser state. Base URL is null."); - } - url.scheme = baseURL.scheme; - switch (walker.c()) { - case EOF: // EOF - /** - * Set url’s username to base’s username, url’s password to base’s - * password, url’s host to base’s host, url’s port to base’s port, - * url’s path to a copy of base’s path, and url’s query to base’s - * query. - */ - url.username = baseURL.username; - url.password = baseURL.password; - url.host = baseURL.host; - url.port = baseURL.port; - url.path = infra_1.list.clone(baseURL.path); - url.query = baseURL.query; - break; - case '/': - /** - * Set state to relative slash state. - */ - state = interfaces_1.ParserState.RelativeSlash; - break; - case '?': - /** - * Set url’s username to base’s username, url’s password to base’s - * password, url’s host to base’s host, url’s port to base’s port, - * url’s path to a copy of base’s path, url’s query to the empty - * string, and state to query state. - */ - url.username = baseURL.username; - url.password = baseURL.password; - url.host = baseURL.host; - url.port = baseURL.port; - url.path = infra_1.list.clone(baseURL.path); - url.query = ""; - state = interfaces_1.ParserState.Query; - break; - case '#': - /** - * Set url’s username to base’s username, url’s password to base’s - * password, url’s host to base’s host, url’s port to base’s port, - * url’s path to a copy of base’s path, url’s query to base’s - * query, url’s fragment to the empty string, and state to - * fragment state. - */ - url.username = baseURL.username; - url.password = baseURL.password; - url.host = baseURL.host; - url.port = baseURL.port; - url.path = infra_1.list.clone(baseURL.path); - url.query = baseURL.query; - url.fragment = ""; - state = interfaces_1.ParserState.Fragment; - break; - default: - /** - * If url is special and c is U+005C (\), validation error, - * set state to relative slash state. - * Otherwise, run these steps: - * 1. Set url’s username to base’s username, url’s password to - * base’s password, url’s host to base’s host, url’s port to - * base’s port, url’s path to a copy of base’s path, and then - * remove url’s path’s last item, if any. - * 2. Set state to path state, and decrease pointer by one. - */ - if (isSpecial(url) && walker.c() === '\\') { - validationError("Invalid input string."); - state = interfaces_1.ParserState.RelativeSlash; - } - else { - url.username = baseURL.username; - url.password = baseURL.password; - url.host = baseURL.host; - url.port = baseURL.port; - url.path = infra_1.list.clone(baseURL.path); - if (url.path.length !== 0) - url.path.splice(url.path.length - 1, 1); - state = interfaces_1.ParserState.Path; - walker.pointer--; - } - break; - } - break; - case interfaces_1.ParserState.RelativeSlash: - /** - * 1. If url is special and c is U+002F (/) or U+005C (\), then: - * 1.1. If c is U+005C (\), validation error. - * 1.2. Set state to special authority ignore slashes state. - * 2. Otherwise, if c is U+002F (/), then set state to authority state. - * 3. Otherwise, set url’s username to base’s username, url’s password - * to base’s password, url’s host to base’s host, url’s port to base’s - * port, state to path state, and then, decrease pointer by one. - */ - if (isSpecial(url) && (walker.c() === '/' || walker.c() === '\\')) { - if (walker.c() === '\\') { - validationError("Invalid input string."); - } - state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; - } - else if (walker.c() === '/') { - state = interfaces_1.ParserState.Authority; - } - else { - if (baseURL === null) { - throw new Error("Invalid parser state. Base URL is null."); - } - url.username = baseURL.username; - url.password = baseURL.password; - url.host = baseURL.host; - url.port = baseURL.port; - state = interfaces_1.ParserState.Path; - walker.pointer--; - } - break; - case interfaces_1.ParserState.SpecialAuthoritySlashes: - /** - * If c is U+002F (/) and remaining starts with U+002F (/), then set - * state to special authority ignore slashes state and increase - * pointer by one. - * Otherwise, validation error, set state to special authority ignore - * slashes state, and decrease pointer by one. - */ - if (walker.c() === '/' && walker.remaining().startsWith('/')) { - state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; - walker.pointer++; - } - else { - validationError("Expected '//'."); - state = interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes; - walker.pointer--; - } - break; - case interfaces_1.ParserState.SpecialAuthorityIgnoreSlashes: - /** - * If c is neither U+002F (/) nor U+005C (\), then set state to - * authority state and decrease pointer by one. - * Otherwise, validation error. - */ - if (walker.c() !== '/' && walker.c() !== '\\') { - state = interfaces_1.ParserState.Authority; - walker.pointer--; - } - else { - validationError("Unexpected '/' or '\\'."); - } - break; - case interfaces_1.ParserState.Authority: - /** - * 1. If c is U+0040 (@), then: - */ - if (walker.c() === '@') { - /** - * 1.1. Validation error. - * 1.2. If the @ flag is set, prepend "%40" to buffer. - * 1.3. Set the @ flag. - * 1.4. For each codePoint in buffer: - */ - validationError("Unexpected '@'."); - if (atFlag) - buffer = '%40' + buffer; - atFlag = true; - try { - for (var buffer_1 = (e_2 = void 0, __values(buffer)), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var codePoint = buffer_1_1.value; - /** - * 1.4.1. If codePoint is U+003A (:) and passwordTokenSeenFlag is - * unset, then set passwordTokenSeenFlag and continue. - * 1.4.2. Let encodedCodePoints be the result of running UTF-8 - * percent encode codePoint using the userinfo percent-encode set. - * 1.4.3. If passwordTokenSeenFlag is set, then append - * encodedCodePoints to url’s password. - * 1.4.4. Otherwise, append encodedCodePoints to url’s username. - */ - if (codePoint === ':' && !passwordTokenSeenFlag) { - passwordTokenSeenFlag = true; - continue; - } - var encodedCodePoints = utf8PercentEncode(codePoint, _userInfoPercentEncodeSet); - if (passwordTokenSeenFlag) { - url.password += encodedCodePoints; - } - else { - url.username += encodedCodePoints; - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_2) throw e_2.error; } - } - /** - * 1.5. Set buffer to the empty string. - */ - buffer = ""; - } - else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' || - (isSpecial(url) && walker.c() === '\\')) { - /** - * 2. Otherwise, if one of the following is true - * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#) - * - url is special and c is U+005C (\) - * then: - * 2.1. If @ flag is set and buffer is the empty string, validation - * error, return failure. - * 2.2. Decrease pointer by the number of code points in buffer plus - * one, set buffer to the empty string, and set state to host state. - */ - if (atFlag && buffer === "") { - validationError("Invalid input string."); - return null; - } - walker.pointer -= (buffer.length + 1); - buffer = ""; - state = interfaces_1.ParserState.Host; - } - else { - /** - * 3. Otherwise, append c to buffer. - */ - buffer += walker.c(); - } - break; - case interfaces_1.ParserState.Host: - case interfaces_1.ParserState.Hostname: - if (stateOverride !== undefined && url.scheme === "file") { - /** - * 1. If state override is given and url’s scheme is "file", then - * decrease pointer by one and set state to file host state. - */ - walker.pointer--; - state = interfaces_1.ParserState.FileHost; - } - else if (walker.c() === ':' && !arrayFlag) { - /** - * 2. Otherwise, if c is U+003A (:) and the [] flag is unset, then: - * 2.1. If buffer is the empty string, validation error, return - * failure. - * 2.2. Let host be the result of host parsing buffer with url is - * not special. - * 2.3. If host is failure, then return failure. - * 2.4. Set url’s host to host, buffer to the empty string, and - * state to port state. - * 2.5. If state override is given and state override is hostname - * state, then return. - */ - if (buffer === "") { - validationError("Invalid input string."); - return null; - } - var host = hostParser(buffer, !isSpecial(url)); - if (host === null) - return null; - url.host = host; - buffer = ""; - state = interfaces_1.ParserState.Port; - if (stateOverride === interfaces_1.ParserState.Hostname) - return url; - } - else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' || - (isSpecial(url) && walker.c() === '\\')) { - /** - * 3. Otherwise, if one of the following is true - * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#) - * - url is special and c is U+005C (\) - * then decrease pointer by one, and then: - * 3.1. If url is special and buffer is the empty string, validation - * error, return failure. - * 3.2. Otherwise, if state override is given, buffer is the empty - * string, and either url includes credentials or url’s port is - * non-null, validation error, return. - * 3.3. Let host be the result of host parsing buffer with url is - * not special. - * 3.4. If host is failure, then return failure. - * 3.5. Set url’s host to host, buffer to the empty string, and - * state to path start state. - * 3.6. If state override is given, then return. - */ - walker.pointer--; - if (isSpecial(url) && buffer === "") { - validationError("Invalid input string."); - return null; - } - else if (stateOverride !== undefined && buffer === "" && - (includesCredentials(url) || url.port !== null)) { - validationError("Invalid input string."); - return url; - } - var host = hostParser(buffer, !isSpecial(url)); - if (host === null) - return null; - url.host = host; - buffer = ""; - state = interfaces_1.ParserState.PathStart; - if (stateOverride !== undefined) - return url; - } - else { - /** - * 4. Otherwise: - * 4.1. If c is U+005B ([), then set the [] flag. - * 4.2. If c is U+005D (]), then unset the [] flag. - * 4.3. Append c to buffer. - */ - if (walker.c() === '[') - arrayFlag = true; - if (walker.c() === ']') - arrayFlag = false; - buffer += walker.c(); - } - break; - case interfaces_1.ParserState.Port: - if (infra_1.codePoint.ASCIIDigit.test(walker.c())) { - /** - * 1. If c is an ASCII digit, append c to buffer. - */ - buffer += walker.c(); - } - else if (walker.c() === EOF || walker.c() === '/' || walker.c() === '?' || walker.c() === '#' || - (isSpecial(url) && walker.c() === '\\') || stateOverride) { - /** - * 2. Otherwise, if one of the following is true - * - c is the EOF code point, U+002F (/), U+003F (?), or U+0023 (#) - * - url is special and c is U+005C (\) - * - state override is given - * then: - */ - if (buffer !== "") { - /** - * 2.1. If buffer is not the empty string, then: - * 2.1.1. Let port be the mathematical integer value that is - * represented by buffer in radix-10 using ASCII digits for digits - * with values 0 through 9. - * 2.1.2. If port is greater than 2**16 − 1, validation error, - * return failure. - * 2.1.3. Set url’s port to null, if port is url’s scheme’s default - * port, and to port otherwise. - * 2.1.4. Set buffer to the empty string. - */ - if (buffer !== "") { - var port = parseInt(buffer, 10); - if (port > Math.pow(2, 16) - 1) { - validationError("Invalid port number."); - return null; - } - url.port = (port === defaultPort(url.scheme) ? null : port); - buffer = ""; - } - } - /** - * 2.2. If state override is given, then return. - * 2.3. Set state to path start state, and decrease pointer by one. - */ - if (stateOverride !== undefined) { - return url; - } - state = interfaces_1.ParserState.PathStart; - walker.pointer--; - } - else { - /** - * 3. Otherwise, validation error, return failure. - */ - validationError("Invalid input string."); - return null; - } - break; - case interfaces_1.ParserState.File: - /** - * 1. Set url’s scheme to "file". - */ - url.scheme = "file"; - if (walker.c() === '/' || walker.c() === '\\') { - /** - * 2. If c is U+002F (/) or U+005C (\), then: - * 2.1. If c is U+005C (\), validation error. - * 2.2. Set state to file slash state. - */ - if (walker.c() === '\\') { - validationError("Invalid input string."); - } - state = interfaces_1.ParserState.FileSlash; - } - else if (baseURL !== null && baseURL.scheme === "file") { - /** - * 3. Otherwise, if base is non-null and base’s scheme is "file", - * switch on c: - */ - switch (walker.c()) { - case EOF: - /** - * Set url’s host to base’s host, url’s path to a copy of base’s - * path, and url’s query to base’s query. - */ - url.host = baseURL.host; - url.path = infra_1.list.clone(baseURL.path); - url.query = baseURL.query; - break; - case '?': - /** - * Set url’s host to base’s host, url’s path to a copy of base’s - * path, url’s query to the empty string, and state to query - * state. - */ - url.host = baseURL.host; - url.path = infra_1.list.clone(baseURL.path); - url.query = ""; - state = interfaces_1.ParserState.Query; - break; - case '#': - /** - * Set url’s host to base’s host, url’s path to a copy of base’s - * path, url’s query to base’s query, url’s fragment to the - * empty string, and state to fragment state. - */ - url.host = baseURL.host; - url.path = infra_1.list.clone(baseURL.path); - url.query = baseURL.query; - url.fragment = ""; - state = interfaces_1.ParserState.Fragment; - break; - default: - /** - * 1. If the substring from pointer in input does not start - * with a Windows drive letter, then set url’s host to base’s - * host, url’s path to a copy of base’s path, and then shorten - * url’s path. - * _Note:_ is a (platform-independent) Windows drive letter - * quirk. - * 2. Otherwise, validation error. - * 3. Set state to path state, and decrease pointer by one. - */ - if (!startsWithAWindowsDriveLetter(walker.substring())) { - url.host = baseURL.host; - url.path = infra_1.list.clone(baseURL.path); - shorten(url); - } - else { - validationError("Unexpected windows drive letter in input string."); - } - state = interfaces_1.ParserState.Path; - walker.pointer--; - break; - } - } - else { - /** - * 4. Otherwise, set state to path state, and decrease pointer by - * one. - */ - state = interfaces_1.ParserState.Path; - walker.pointer--; - } - break; - case interfaces_1.ParserState.FileSlash: - if (walker.c() === '/' || walker.c() === '\\') { - /** - * 1. If c is U+002F (/) or U+005C (\), then: - * 1.1. If c is U+005C (\), validation error. - * 1.2. Set state to file host state. - */ - if (walker.c() === '\\') { - validationError("Invalid input string."); - } - state = interfaces_1.ParserState.FileHost; - } - else { - /** - * 2. Otherwise: - * 2.1. If base is non-null, base’s scheme is "file", and the - * substring from pointer in input does not start with a Windows - * drive letter, then: - * 2.1.1. If base’s path[0] is a normalized Windows drive letter, - * then append base’s path[0] to url’s path. - * _Note:_ is a (platform-independent) Windows drive letter - * quirk. Both url’s and base’s host are null under these conditions - * and therefore not copied. - * 2.1.2. Otherwise, set url’s host to base’s host. - * 2.2. Set state to path state, and decrease pointer by one. - */ - if (baseURL !== null && baseURL.scheme === "file" && - !startsWithAWindowsDriveLetter(walker.substring())) { - if (isNormalizedWindowsDriveLetter(baseURL.path[0])) { - url.path.push(baseURL.path[0]); - } - else { - url.host = baseURL.host; - } - } - state = interfaces_1.ParserState.Path; - walker.pointer--; - } - break; - case interfaces_1.ParserState.FileHost: - if (walker.c() === EOF || walker.c() === '/' || walker.c() === '\\' || - walker.c() === '?' || walker.c() === '#') { - /** - * 1. If c is the EOF code point, U+002F (/), U+005C (\), U+003F (?), - * or U+0023 (#), then decrease pointer by one and then: - */ - walker.pointer--; - if (stateOverride === undefined && isWindowsDriveLetter(buffer)) { - /** - * 1.1. If state override is not given and buffer is a Windows drive - * letter, validation error, set state to path state. - * _Note:_ is a (platform-independent) Windows drive letter - * quirk. buffer is not reset here and instead used in the path state. - */ - validationError("Unexpected windows drive letter in input string."); - state = interfaces_1.ParserState.Path; - } - else if (buffer === "") { - /** - * 1.2. Otherwise, if buffer is the empty string, then: - * 1.2.1. Set url’s host to the empty string. - * 1.2.2. If state override is given, then return. - * 1.2.3. Set state to path start state. - */ - url.host = ""; - if (stateOverride !== undefined) - return url; - state = interfaces_1.ParserState.PathStart; - } - else { - /** - * 1.3. Otherwise, run these steps: - * 1.3.1. Let host be the result of host parsing buffer with url - * is not special. - * 1.3.2. If host is failure, then return failure. - * 1.3.3. If host is "localhost", then set host to the empty - * string. - * 1.3.4. Set url’s host to host. - * 1.3.5. If state override is given, then return. - * 1.3.6. Set buffer to the empty string and state to path start - * state. - */ - var host = hostParser(buffer, !isSpecial(url)); - if (host === null) - return null; - if (host === "localhost") - host = ""; - url.host = host; - if (stateOverride !== undefined) - return url; - buffer = ""; - state = interfaces_1.ParserState.PathStart; - } - } - else { - /** - * 2. Otherwise, append c to buffer. - */ - buffer += walker.c(); - } - break; - case interfaces_1.ParserState.PathStart: - if (isSpecial(url)) { - /** - * 1. If url is special, then: - * 1.1. If c is U+005C (\), validation error. - * 1.2. Set state to path state. - * 1.3. If c is neither U+002F (/) nor U+005C (\), then decrease - * pointer by one. - */ - if (walker.c() === '\\') { - validationError("Invalid input string."); - } - state = interfaces_1.ParserState.Path; - if (walker.c() !== '/' && walker.c() !== '\\') - walker.pointer--; - } - else if (stateOverride === undefined && walker.c() === '?') { - /** - * 2. Otherwise, if state override is not given and c is U+003F (?), - * set url’s query to the empty string and state to query state. - */ - url.query = ""; - state = interfaces_1.ParserState.Query; - } - else if (stateOverride === undefined && walker.c() === '#') { - /** - * 3. Otherwise, if state override is not given and c is U+0023 (#), - * set url’s fragment to the empty string and state to fragment - * state. - */ - url.fragment = ""; - state = interfaces_1.ParserState.Fragment; - } - else if (walker.c() !== EOF) { - /** - * 4. Otherwise, if c is not the EOF code point: - * 4.1. Set state to path state. - * 4.2. If c is not U+002F (/), then decrease pointer by one. - */ - state = interfaces_1.ParserState.Path; - if (walker.c() !== '/') - walker.pointer--; - } - break; - case interfaces_1.ParserState.Path: - if ((walker.c() === EOF || walker.c() === '/') || - (isSpecial(url) && walker.c() === '\\') || - (stateOverride === undefined && (walker.c() === '?' || walker.c() === '#'))) { - /** - * 1. If one of the following is true - * - c is the EOF code point or U+002F (/) - * - url is special and c is U+005C (\) - * - state override is not given and c is U+003F (?) or U+0023 (#) - * then: - */ - if (isSpecial(url) && walker.c() === '\\') { - /** - * 1.1 If url is special and c is U+005C (\), validation error. - */ - validationError("Invalid input string."); - } - if (isDoubleDotPathSegment(buffer)) { - /** - * 1.2. If buffer is a double-dot path segment, shorten url’s path, - * and then if neither c is U+002F (/), nor url is special and c is - * U+005C (\), append the empty string to url’s path. - */ - shorten(url); - if (walker.c() !== '/' && !(isSpecial(url) && walker.c() === '\\')) { - url.path.push(""); - } - } - else if (isSingleDotPathSegment(buffer) && walker.c() !== '/' && - !(isSpecial(url) && walker.c() === '\\')) { - /** - * 1.3. Otherwise, if buffer is a single-dot path segment and if - * neither c is U+002F (/), nor url is special and c is U+005C (\), - * append the empty string to url’s path. - */ - url.path.push(""); - } - else if (!isSingleDotPathSegment(buffer)) { - /** - * 1.4. Otherwise, if buffer is not a single-dot path segment, then: - */ - if (url.scheme === "file" && url.path.length === 0 && - isWindowsDriveLetter(buffer)) { - /** - * 1.4.1. If url’s scheme is "file", url’s path is empty, and - * buffer is a Windows drive letter, then: - * 1.4.1.1. If url’s host is neither the empty string nor null, - * validation error, set url’s host to the empty string. - * 1.4.1.2. Replace the second code point in buffer with U+003A (:). - * _Note:_ is a (platform-independent) Windows drive letter quirk. - */ - if (url.host !== null && url.host !== "") { - validationError("Invalid input string."); - url.host = ""; - } - var bufferCodePoints = Array.from(buffer); - buffer = bufferCodePoints.slice(0, 1) + ':' + bufferCodePoints.slice(2); - } - /** - * 1.4.2. Append buffer to url’s path. - */ - url.path.push(buffer); - } - /** - * 1.5. Set buffer to the empty string. - */ - buffer = ""; - /** - * 1.6. If url’s scheme is "file" and c is the EOF code point, - * U+003F (?), or U+0023 (#), then while url’s path’s size is - * greater than 1 and url’s path[0] is the empty string, validation - * error, remove the first item from url’s path. - */ - if (url.scheme === "file" && (walker.c() === EOF || walker.c() === '?' || walker.c() === '#')) { - while (url.path.length > 1 && url.path[0] === "") { - validationError("Invalid input string."); - url.path.splice(0, 1); - } - } - /** - * 1.7. If c is U+003F (?), then set url’s query to the empty string - * and state to query state. - * 1.8. If c is U+0023 (#), then set url’s fragment to the empty - * string and state to fragment state. - */ - if (walker.c() === '?') { - url.query = ""; - state = interfaces_1.ParserState.Query; - } - if (walker.c() === '#') { - url.fragment = ""; - state = interfaces_1.ParserState.Fragment; - } - } - else { - /** - * 2. Otherwise, run these steps: - * 2.1. If c is not a URL code point and not U+0025 (%), validation - * error. - * 2.2. If c is U+0025 (%) and remaining does not start with two - * ASCII hex digits, validation error. - * 2.3. UTF-8 percent encode c using the path percent-encode set, - * and append the result to buffer. - */ - if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') { - validationError("Character is not a URL code point or a percent encoded character."); - } - if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) { - validationError("Percent encoded character must be followed by two hex digits."); - } - buffer += utf8PercentEncode(walker.c(), _pathPercentEncodeSet); - } - break; - case interfaces_1.ParserState.CannotBeABaseURLPath: - /** - * 1. If c is U+003F (?), then set url’s query to the empty string and - * state to query state. - * 2. Otherwise, if c is U+0023 (#), then set url’s fragment to the - * empty string and state to fragment state. - * 3. Otherwise: - * 3.1. If c is not the EOF code point, not a URL code point, and not - * U+0025 (%), validation error. - * 3.2. If c is U+0025 (%) and remaining does not start with two ASCII - * hex digits, validation error. - * 3.3. If c is not the EOF code point, UTF-8 percent encode c using - * the C0 control percent-encode set, and append the result to url’s - * path[0]. - */ - if (walker.c() === '?') { - url.query = ""; - state = interfaces_1.ParserState.Query; - } - else if (walker.c() === '#') { - url.fragment = ""; - state = interfaces_1.ParserState.Fragment; + +/** + * Private data for event wrappers. + * @type {WeakMap} + * @private + */ +const privateData = new WeakMap(); + +/** + * Cache for wrapper classes. + * @type {WeakMap} + * @private + */ +const wrappers = new WeakMap(); + +/** + * Get private data. + * @param {Event} event The event object to get private data. + * @returns {PrivateData} The private data of the event. + * @private + */ +function pd(event) { + const retv = privateData.get(event); + console.assert( + retv != null, + "'this' is expected an Event object, but got", + event + ); + return retv +} + +/** + * https://dom.spec.whatwg.org/#set-the-canceled-flag + * @param data {PrivateData} private data. + */ +function setCancelFlag(data) { + if (data.passiveListener != null) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "Unable to preventDefault inside passive event listener invocation.", + data.passiveListener + ); + } + return + } + if (!data.event.cancelable) { + return + } + + data.canceled = true; + if (typeof data.event.preventDefault === "function") { + data.event.preventDefault(); + } +} + +/** + * @see https://dom.spec.whatwg.org/#interface-event + * @private + */ +/** + * The event wrapper. + * @constructor + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Event|{type:string}} event The original event to wrap. + */ +function Event(eventTarget, event) { + privateData.set(this, { + eventTarget, + event, + eventPhase: 2, + currentTarget: eventTarget, + canceled: false, + stopped: false, + immediateStopped: false, + passiveListener: null, + timeStamp: event.timeStamp || Date.now(), + }); + + // https://heycam.github.io/webidl/#Unforgeable + Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); + + // Define accessors + const keys = Object.keys(event); + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in this)) { + Object.defineProperty(this, key, defineRedirectDescriptor(key)); + } + } +} + +// Should be enumerable, but class methods are not enumerable. +Event.prototype = { + /** + * The type of this event. + * @type {string} + */ + get type() { + return pd(this).event.type + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get target() { + return pd(this).eventTarget + }, + + /** + * The target of this event. + * @type {EventTarget} + */ + get currentTarget() { + return pd(this).currentTarget + }, + + /** + * @returns {EventTarget[]} The composed path of this event. + */ + composedPath() { + const currentTarget = pd(this).currentTarget; + if (currentTarget == null) { + return [] + } + return [currentTarget] + }, + + /** + * Constant of NONE. + * @type {number} + */ + get NONE() { + return 0 + }, + + /** + * Constant of CAPTURING_PHASE. + * @type {number} + */ + get CAPTURING_PHASE() { + return 1 + }, + + /** + * Constant of AT_TARGET. + * @type {number} + */ + get AT_TARGET() { + return 2 + }, + + /** + * Constant of BUBBLING_PHASE. + * @type {number} + */ + get BUBBLING_PHASE() { + return 3 + }, + + /** + * The target of this event. + * @type {number} + */ + get eventPhase() { + return pd(this).eventPhase + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopPropagation() { + const data = pd(this); + + data.stopped = true; + if (typeof data.event.stopPropagation === "function") { + data.event.stopPropagation(); + } + }, + + /** + * Stop event bubbling. + * @returns {void} + */ + stopImmediatePropagation() { + const data = pd(this); + + data.stopped = true; + data.immediateStopped = true; + if (typeof data.event.stopImmediatePropagation === "function") { + data.event.stopImmediatePropagation(); + } + }, + + /** + * The flag to be bubbling. + * @type {boolean} + */ + get bubbles() { + return Boolean(pd(this).event.bubbles) + }, + + /** + * The flag to be cancelable. + * @type {boolean} + */ + get cancelable() { + return Boolean(pd(this).event.cancelable) + }, + + /** + * Cancel this event. + * @returns {void} + */ + preventDefault() { + setCancelFlag(pd(this)); + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + */ + get defaultPrevented() { + return pd(this).canceled + }, + + /** + * The flag to be composed. + * @type {boolean} + */ + get composed() { + return Boolean(pd(this).event.composed) + }, + + /** + * The unix time of this event. + * @type {number} + */ + get timeStamp() { + return pd(this).timeStamp + }, + + /** + * The target of this event. + * @type {EventTarget} + * @deprecated + */ + get srcElement() { + return pd(this).eventTarget + }, + + /** + * The flag to stop event bubbling. + * @type {boolean} + * @deprecated + */ + get cancelBubble() { + return pd(this).stopped + }, + set cancelBubble(value) { + if (!value) { + return + } + const data = pd(this); + + data.stopped = true; + if (typeof data.event.cancelBubble === "boolean") { + data.event.cancelBubble = true; + } + }, + + /** + * The flag to indicate cancellation state. + * @type {boolean} + * @deprecated + */ + get returnValue() { + return !pd(this).canceled + }, + set returnValue(value) { + if (!value) { + setCancelFlag(pd(this)); + } + }, + + /** + * Initialize this event object. But do nothing under event dispatching. + * @param {string} type The event type. + * @param {boolean} [bubbles=false] The flag to be possible to bubble up. + * @param {boolean} [cancelable=false] The flag to be possible to cancel. + * @deprecated + */ + initEvent() { + // Do nothing. + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(Event.prototype, "constructor", { + value: Event, + configurable: true, + writable: true, +}); + +// Ensure `event instanceof window.Event` is `true`. +if (typeof window !== "undefined" && typeof window.Event !== "undefined") { + Object.setPrototypeOf(Event.prototype, window.Event.prototype); + + // Make association for wrappers. + wrappers.set(window.Event.prototype, Event); +} + +/** + * Get the property descriptor to redirect a given property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to redirect the property. + * @private + */ +function defineRedirectDescriptor(key) { + return { + get() { + return pd(this).event[key] + }, + set(value) { + pd(this).event[key] = value; + }, + configurable: true, + enumerable: true, + } +} + +/** + * Get the property descriptor to call a given method property. + * @param {string} key Property name to define property descriptor. + * @returns {PropertyDescriptor} The property descriptor to call the method property. + * @private + */ +function defineCallDescriptor(key) { + return { + value() { + const event = pd(this).event; + return event[key].apply(event, arguments) + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define new wrapper class. + * @param {Function} BaseEvent The base wrapper class. + * @param {Object} proto The prototype of the original event. + * @returns {Function} The defined wrapper class. + * @private + */ +function defineWrapper(BaseEvent, proto) { + const keys = Object.keys(proto); + if (keys.length === 0) { + return BaseEvent + } + + /** CustomEvent */ + function CustomEvent(eventTarget, event) { + BaseEvent.call(this, eventTarget, event); + } + + CustomEvent.prototype = Object.create(BaseEvent.prototype, { + constructor: { value: CustomEvent, configurable: true, writable: true }, + }); + + // Define accessors. + for (let i = 0; i < keys.length; ++i) { + const key = keys[i]; + if (!(key in BaseEvent.prototype)) { + const descriptor = Object.getOwnPropertyDescriptor(proto, key); + const isFunc = typeof descriptor.value === "function"; + Object.defineProperty( + CustomEvent.prototype, + key, + isFunc + ? defineCallDescriptor(key) + : defineRedirectDescriptor(key) + ); + } + } + + return CustomEvent +} + +/** + * Get the wrapper class of a given prototype. + * @param {Object} proto The prototype of the original event to get its wrapper. + * @returns {Function} The wrapper class. + * @private + */ +function getWrapper(proto) { + if (proto == null || proto === Object.prototype) { + return Event + } + + let wrapper = wrappers.get(proto); + if (wrapper == null) { + wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); + wrappers.set(proto, wrapper); + } + return wrapper +} + +/** + * Wrap a given event to management a dispatching. + * @param {EventTarget} eventTarget The event target of this dispatching. + * @param {Object} event The event to wrap. + * @returns {Event} The wrapper instance. + * @private + */ +function wrapEvent(eventTarget, event) { + const Wrapper = getWrapper(Object.getPrototypeOf(event)); + return new Wrapper(eventTarget, event) +} + +/** + * Get the immediateStopped flag of a given event. + * @param {Event} event The event to get. + * @returns {boolean} The flag to stop propagation immediately. + * @private + */ +function isStopped(event) { + return pd(event).immediateStopped +} + +/** + * Set the current event phase of a given event. + * @param {Event} event The event to set current target. + * @param {number} eventPhase New event phase. + * @returns {void} + * @private + */ +function setEventPhase(event, eventPhase) { + pd(event).eventPhase = eventPhase; +} + +/** + * Set the current target of a given event. + * @param {Event} event The event to set current target. + * @param {EventTarget|null} currentTarget New current target. + * @returns {void} + * @private + */ +function setCurrentTarget(event, currentTarget) { + pd(event).currentTarget = currentTarget; +} + +/** + * Set a passive listener of a given event. + * @param {Event} event The event to set current target. + * @param {Function|null} passiveListener New passive listener. + * @returns {void} + * @private + */ +function setPassiveListener(event, passiveListener) { + pd(event).passiveListener = passiveListener; +} + +/** + * @typedef {object} ListenerNode + * @property {Function} listener + * @property {1|2|3} listenerType + * @property {boolean} passive + * @property {boolean} once + * @property {ListenerNode|null} next + * @private + */ + +/** + * @type {WeakMap>} + * @private + */ +const listenersMap = new WeakMap(); + +// Listener types +const CAPTURE = 1; +const BUBBLE = 2; +const ATTRIBUTE = 3; + +/** + * Check whether a given value is an object or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an object. + */ +function isObject(x) { + return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +} + +/** + * Get listeners. + * @param {EventTarget} eventTarget The event target to get. + * @returns {Map} The listeners. + * @private + */ +function getListeners(eventTarget) { + const listeners = listenersMap.get(eventTarget); + if (listeners == null) { + throw new TypeError( + "'this' is expected an EventTarget object, but got another value." + ) + } + return listeners +} + +/** + * Get the property descriptor for the event attribute of a given event. + * @param {string} eventName The event name to get property descriptor. + * @returns {PropertyDescriptor} The property descriptor. + * @private + */ +function defineEventAttributeDescriptor(eventName) { + return { + get() { + const listeners = getListeners(this); + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + return node.listener } - else { - if (walker.c() !== EOF && !_urlCodePoints.test(walker.c()) && walker.c() !== '%') { - validationError("Character is not a URL code point or a percent encoded character."); - } - if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) { - validationError("Percent encoded character must be followed by two hex digits."); - } - if (walker.c() !== EOF) { - url.path[0] += utf8PercentEncode(walker.c(), _c0ControlPercentEncodeSet); + node = node.next; + } + return null + }, + + set(listener) { + if (typeof listener !== "function" && !isObject(listener)) { + listener = null; // eslint-disable-line no-param-reassign + } + const listeners = getListeners(this); + + // Traverse to the tail while removing old value. + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if (node.listenerType === ATTRIBUTE) { + // Remove old value. + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); } + } else { + prev = node; } - break; - case interfaces_1.ParserState.Query: - /** - * 1. If encoding is not UTF-8 and one of the following is true - * - url is not special - * - url’s scheme is "ws" or "wss" - * then set encoding to UTF-8. - */ - if (encoding !== "UTF-8" && (!isSpecial(url) || - url.scheme === "ws" || url.scheme === "wss")) { - encoding = "UTF-8"; - } - if (stateOverride === undefined && walker.c() === '#') { - /** - * 2. If state override is not given and c is U+0023 (#), then set - * url’s fragment to the empty string and state to fragment state. - */ - url.fragment = ""; - state = interfaces_1.ParserState.Fragment; - } - else if (walker.c() !== EOF) { - /** - * 3. Otherwise, if c is not the EOF code point: - * 3.1. If c is not a URL code point and not U+0025 (%), validation - * error. - */ - if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') { - validationError("Character is not a URL code point or a percent encoded character."); - } - /** - * 3.2. If c is U+0025 (%) and remaining does not start with two - * ASCII hex digits, validation error. - */ - if (walker.c() === '%' && !/^[0-9a-fA-F][0-9a-fA-F]/.test(walker.remaining())) { - validationError("Percent encoded character must be followed by two hex digits."); - } - /** - * 3.3. Let bytes be the result of encoding c using encoding. - */ - if (encoding.toUpperCase() !== "UTF-8") { - throw new Error("Only UTF-8 encoding is supported."); - } - var bytes = util_1.utf8Encode(walker.c()); - /** - * 3.4. If bytes starts with `&#` and ends with 0x3B (;), then: - */ - if (bytes.length >= 3 && bytes[0] === 38 && bytes[1] === 35 && - bytes[bytes.length - 1] === 59) { - /** - * 3.4.1. Replace `&#` at the start of bytes with `%26%23`. - * 3.4.2. Replace 0x3B (;) at the end of bytes with `%3B`. - * 3.4.4. Append bytes, isomorphic decoded, to url’s query. - * _Note:_ can happen when encoding code points using a - * non-UTF-8 encoding. - */ - bytes = bytes.subarray(2, bytes.length - 1); - url.query += "%26%23" + infra_1.byteSequence.isomorphicDecode(bytes) + "%3B"; - } - else { - try { - /** - * 3.5. Otherwise, for each byte in bytes: - * 3.5.1. If one of the following is true - * - byte is less than 0x21 (!) - * - byte is greater than 0x7E (~) - * - byte is 0x22 ("), 0x23 (#), 0x3C (<), or 0x3E (>) - * - byte is 0x27 (') and url is special - * then append byte, percent encoded, to url’s query. - * 3.5.2. Otherwise, append a code point whose value is byte to - * url’s query. - */ - for (var bytes_1 = (e_3 = void 0, __values(bytes)), bytes_1_1 = bytes_1.next(); !bytes_1_1.done; bytes_1_1 = bytes_1.next()) { - var byte = bytes_1_1.value; - if (byte < 0x21 || byte > 0x7E || byte === 0x22 || - byte === 0x23 || byte === 0x3C || byte === 0x3E || - (byte === 0x27 && isSpecial(url))) { - url.query += percentEncode(byte); - } - else { - url.query += String.fromCharCode(byte); - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (bytes_1_1 && !bytes_1_1.done && (_b = bytes_1.return)) _b.call(bytes_1); - } - finally { if (e_3) throw e_3.error; } - } - } + + node = node.next; + } + + // Add new value. + if (listener !== null) { + const newNode = { + listener, + listenerType: ATTRIBUTE, + passive: false, + once: false, + next: null, + }; + if (prev === null) { + listeners.set(eventName, newNode); + } else { + prev.next = newNode; } - break; - case interfaces_1.ParserState.Fragment: - /** - * Switching on c: - * - The EOF code point - * Do nothing. - * - U+0000 NULL - * Validation error. - * - Otherwise - * 1. If c is not a URL code point and not U+0025 (%), validation - * error. - * 2. If c is U+0025 (%) and remaining does not start with two ASCII - * hex digits, validation error. - * 3. UTF-8 percent encode c using the fragment percent-encode set and - * append the result to url’s fragment. - */ - if (walker.c() === EOF) { - // + } + }, + configurable: true, + enumerable: true, + } +} + +/** + * Define an event attribute (e.g. `eventTarget.onclick`). + * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. + * @param {string} eventName The event name to define. + * @returns {void} + */ +function defineEventAttribute(eventTargetPrototype, eventName) { + Object.defineProperty( + eventTargetPrototype, + `on${eventName}`, + defineEventAttributeDescriptor(eventName) + ); +} + +/** + * Define a custom EventTarget with event attributes. + * @param {string[]} eventNames Event names for event attributes. + * @returns {EventTarget} The custom EventTarget. + * @private + */ +function defineCustomEventTarget(eventNames) { + /** CustomEventTarget */ + function CustomEventTarget() { + EventTarget.call(this); + } + + CustomEventTarget.prototype = Object.create(EventTarget.prototype, { + constructor: { + value: CustomEventTarget, + configurable: true, + writable: true, + }, + }); + + for (let i = 0; i < eventNames.length; ++i) { + defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); + } + + return CustomEventTarget +} + +/** + * EventTarget. + * + * - This is constructor if no arguments. + * - This is a function which returns a CustomEventTarget constructor if there are arguments. + * + * For example: + * + * class A extends EventTarget {} + * class B extends EventTarget("message") {} + * class C extends EventTarget("message", "error") {} + * class D extends EventTarget(["message", "error"]) {} + */ +function EventTarget() { + /*eslint-disable consistent-return */ + if (this instanceof EventTarget) { + listenersMap.set(this, new Map()); + return + } + if (arguments.length === 1 && Array.isArray(arguments[0])) { + return defineCustomEventTarget(arguments[0]) + } + if (arguments.length > 0) { + const types = new Array(arguments.length); + for (let i = 0; i < arguments.length; ++i) { + types[i] = arguments[i]; + } + return defineCustomEventTarget(types) + } + throw new TypeError("Cannot call a class as a function") + /*eslint-enable consistent-return */ +} + +// Should be enumerable, but class methods are not enumerable. +EventTarget.prototype = { + /** + * Add a given listener to this event target. + * @param {string} eventName The event name to add. + * @param {Function} listener The listener to add. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + addEventListener(eventName, listener, options) { + if (listener == null) { + return + } + if (typeof listener !== "function" && !isObject(listener)) { + throw new TypeError("'listener' should be a function or an object.") + } + + const listeners = getListeners(this); + const optionsIsObj = isObject(options); + const capture = optionsIsObj + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + const newNode = { + listener, + listenerType, + passive: optionsIsObj && Boolean(options.passive), + once: optionsIsObj && Boolean(options.once), + next: null, + }; + + // Set it as the first node if the first node is null. + let node = listeners.get(eventName); + if (node === undefined) { + listeners.set(eventName, newNode); + return + } + + // Traverse to the tail while checking duplication.. + let prev = null; + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + // Should ignore duplication. + return + } + prev = node; + node = node.next; + } + + // Add it. + prev.next = newNode; + }, + + /** + * Remove a given listener from this event target. + * @param {string} eventName The event name to remove. + * @param {Function} listener The listener to remove. + * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. + * @returns {void} + */ + removeEventListener(eventName, listener, options) { + if (listener == null) { + return + } + + const listeners = getListeners(this); + const capture = isObject(options) + ? Boolean(options.capture) + : Boolean(options); + const listenerType = capture ? CAPTURE : BUBBLE; + + let prev = null; + let node = listeners.get(eventName); + while (node != null) { + if ( + node.listener === listener && + node.listenerType === listenerType + ) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); } - else if (walker.c() === "\u0000") { - validationError("NULL character in input string."); + return + } + + prev = node; + node = node.next; + } + }, + + /** + * Dispatch a given event. + * @param {Event|{type:string}} event The event to dispatch. + * @returns {boolean} `false` if canceled. + */ + dispatchEvent(event) { + if (event == null || typeof event.type !== "string") { + throw new TypeError('"event.type" should be a string.') + } + + // If listeners aren't registered, terminate. + const listeners = getListeners(this); + const eventName = event.type; + let node = listeners.get(eventName); + if (node == null) { + return true + } + + // Since we cannot rewrite several properties, so wrap object. + const wrappedEvent = wrapEvent(this, event); + + // This doesn't process capturing phase and bubbling phase. + // This isn't participating in a tree. + let prev = null; + while (node != null) { + // Remove this listener if it's once + if (node.once) { + if (prev !== null) { + prev.next = node.next; + } else if (node.next !== null) { + listeners.set(eventName, node.next); + } else { + listeners.delete(eventName); } - else { - if (!_urlCodePoints.test(walker.c()) && walker.c() !== '%') { - validationError("Unexpected character in fragment string."); - } - if (walker.c() === '%' && !/^[A-Za-z0-9][A-Za-z0-9]/.test(walker.remaining())) { - validationError("Unexpected character in fragment string."); + } else { + prev = node; + } + + // Call this listener + setPassiveListener( + wrappedEvent, + node.passive ? node.listener : null + ); + if (typeof node.listener === "function") { + try { + node.listener.call(this, wrappedEvent); + } catch (err) { + if ( + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error(err); } - url.fragment += utf8PercentEncode(walker.c(), _fragmentPercentEncodeSet); } - break; + } else if ( + node.listenerType !== ATTRIBUTE && + typeof node.listener.handleEvent === "function" + ) { + node.listener.handleEvent(wrappedEvent); + } + + // Break if `event.stopImmediatePropagation` was called. + if (isStopped(wrappedEvent)) { + break + } + + node = node.next; } - if (walker.eof) - break; - else - walker.pointer++; + setPassiveListener(wrappedEvent, null); + setEventPhase(wrappedEvent, 0); + setCurrentTarget(wrappedEvent, null); + + return !wrappedEvent.defaultPrevented + }, +}; + +// `constructor` is not enumerable. +Object.defineProperty(EventTarget.prototype, "constructor", { + value: EventTarget, + configurable: true, + writable: true, +}); + +// Ensure `eventTarget instanceof window.EventTarget` is `true`. +if ( + typeof window !== "undefined" && + typeof window.EventTarget !== "undefined" +) { + Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); +} + +exports.defineEventAttribute = defineEventAttribute; +exports.EventTarget = EventTarget; +exports["default"] = EventTarget; + +module.exports = EventTarget +module.exports.EventTarget = module.exports["default"] = EventTarget +module.exports.defineEventAttribute = defineEventAttribute +//# sourceMappingURL=event-target-shim.js.map + + +/***/ }), + +/***/ 38171: +/***/ ((module) => { + +"use strict"; + + +var hasOwn = Object.prototype.hasOwnProperty; +var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; + +var isArray = function isArray(arr) { + if (typeof Array.isArray === 'function') { + return Array.isArray(arr); + } + + return toStr.call(arr) === '[object Array]'; +}; + +var isPlainObject = function isPlainObject(obj) { + if (!obj || toStr.call(obj) !== '[object Object]') { + return false; + } + + var hasOwnConstructor = hasOwn.call(obj, 'constructor'); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); + // Not own constructor property must be Object + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) { /**/ } + + return typeof key === 'undefined' || hasOwn.call(obj, key); +}; + +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; + +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } + + return obj[name]; +}; + +module.exports = function extend() { + var options, name, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { + target = {}; + } + + for (; i < length; ++i) { + options = arguments[i]; + // Only deal with non-null/undefined values + if (options != null) { + // Extend the base object + for (name in options) { + src = getProperty(target, name); + copy = getProperty(options, name); + + // Prevent never-ending loop + if (target !== copy) { + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); + + // Don't bring in undefined values + } else if (typeof copy !== 'undefined') { + setProperty(target, { name: name, newValue: copy }); + } + } + } + } + } + + // Return the modified object + return target; +}; + + +/***/ }), + +/***/ 31133: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var debug; + +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = __nccwpck_require__(38237)("follow-redirects"); } - /** - * 12. Return url. - */ - return url; + catch (error) { /* */ } + if (typeof debug !== "function") { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; + + +/***/ }), + +/***/ 67707: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var url = __nccwpck_require__(57310); +var URL = url.URL; +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var Writable = (__nccwpck_require__(12781).Writable); +var assert = __nccwpck_require__(39491); +var debug = __nccwpck_require__(31133); + +// Preventive platform detection +// istanbul ignore next +(function detectUnsupportedEnvironment() { + var looksLikeNode = typeof process !== "undefined"; + var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; + var looksLikeV8 = isFunction(Error.captureStackTrace); + if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { + console.warn("The follow-redirects package should be excluded from browser builds."); + } +}()); + +// Whether to use the native URL object or the legacy url module +var useNativeURL = false; +try { + assert(new URL("")); } -exports.basicURLParser = basicURLParser; -/** - * Sets a URL's username. - * - * @param url - a URL - * @param username - username string - */ -function setTheUsername(url, username) { - var e_4, _a; - /** - * 1. Set url’s username to the empty string. - * 2. For each code point in username, UTF-8 percent encode it using the - * userinfo percent-encode set, and append the result to url’s username. - */ - var result = ""; +catch (error) { + useNativeURL = error.code === "ERR_INVALID_URL"; +} + +// URL fields to preserve in copy operations +var preservedUrlFields = [ + "auth", + "host", + "hostname", + "href", + "path", + "pathname", + "port", + "protocol", + "query", + "search", + "hash", +]; + +// Create handlers that pass events from native requests +var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; +var eventHandlers = Object.create(null); +events.forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); + +// Error types with codes +var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError +); +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded", + RedirectionError +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); + +// istanbul ignore next +var destroy = Writable.prototype.destroy || noop; + +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; + + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } + + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { try { - for (var username_1 = __values(username), username_1_1 = username_1.next(); !username_1_1.done; username_1_1 = username_1.next()) { - var codePoint = username_1_1.value; - result += utf8PercentEncode(codePoint, _userInfoPercentEncodeSet); - } + self._processResponse(response); } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (username_1_1 && !username_1_1.done && (_a = username_1.return)) _a.call(username_1); - } - finally { if (e_4) throw e_4.error; } + catch (cause) { + self.emit("error", cause instanceof RedirectionError ? + cause : new RedirectionError({ cause: cause })); } - url.username = result; + }; + + // Perform the first request + this._performRequest(); } -exports.setTheUsername = setTheUsername; -/** - * Sets a URL's password. - * - * @param url - a URL - * @param username - password string - */ -function setThePassword(url, password) { - var e_5, _a; - /** - * 1. Set url’s password to the empty string. - * 2. For each code point in password, UTF-8 percent encode it using the - * userinfo percent-encode set, and append the result to url’s password. - */ - var result = ""; - try { - for (var password_1 = __values(password), password_1_1 = password_1.next(); !password_1_1.done; password_1_1 = password_1.next()) { - var codePoint = password_1_1.value; - result += utf8PercentEncode(codePoint, _userInfoPercentEncodeSet); - } +RedirectableRequest.prototype = Object.create(Writable.prototype); + +RedirectableRequest.prototype.abort = function () { + destroyRequest(this._currentRequest); + this._currentRequest.abort(); + this.emit("abort"); +}; + +RedirectableRequest.prototype.destroy = function (error) { + destroyRequest(this._currentRequest, error); + destroy.call(this, error); + return this; +}; + +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } + + // Validate input and shift parameters if necessary + if (!isString(data) && !isBuffer(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); } - catch (e_5_1) { e_5 = { error: e_5_1 }; } - finally { - try { - if (password_1_1 && !password_1_1.done && (_a = password_1.return)) _a.call(password_1); + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; + +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (isFunction(data)) { + callback = data; + data = encoding = null; + } + else if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; + +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; + +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; + +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + var self = this; + + // Destroys the socket on timeout + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); + } + + // Sets up a timer to trigger a timeout event + function startTimer(socket) { + if (self._timeout) { + clearTimeout(self._timeout); + } + self._timeout = setTimeout(function () { + self.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); + } + + // Stops a timeout from triggering + function clearTimer() { + // Clear the timeout + if (self._timeout) { + clearTimeout(self._timeout); + self._timeout = null; + } + + // Clean up all attached listeners + self.removeListener("abort", clearTimer); + self.removeListener("error", clearTimer); + self.removeListener("response", clearTimer); + self.removeListener("close", clearTimer); + if (callback) { + self.removeListener("timeout", callback); + } + if (!self.socket) { + self._currentRequest.removeListener("socket", startTimer); + } + } + + // Attach callback if passed + if (callback) { + this.on("timeout", callback); + } + + // Start the timer if or when the socket is opened + if (this.socket) { + startTimer(this.socket); + } + else { + this._currentRequest.once("socket", startTimer); + } + + // Clean up on events + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); + this.on("close", clearTimer); + + return this; +}; + +// Proxy all other public ClientRequest methods +[ + "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); + +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); + +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } + + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } + + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; + + +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + throw new TypeError("Unsupported protocol " + protocol); + } + + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; + } + + // Create the native request and set up its event handlers + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); + } + + // RFC7230§5.3.1: When making a request directly to an origin server, […] + // a client MUST send only the absolute path […] as the request-target. + this._currentUrl = /^\//.test(this._options.path) ? + url.format(this._options) : + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path; + + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + // istanbul ignore else + if (request === self._currentRequest) { + // Report any write errors + // istanbul ignore if + if (error) { + self.emit("error", error); } - finally { if (e_5) throw e_5.error; } + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + // istanbul ignore else + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); + } + } + }()); + } +}; + +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } + + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. + + // If the response is not a redirect; return it as-is + var location = response.headers.location; + if (!location || this._options.followRedirects === false || + statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + + // Clean up + this._requestBodyBuffers = []; + return; + } + + // The response is a redirect, so abort the current request + destroyRequest(this._currentRequest); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); + + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + throw new TooManyRedirectsError(); + } + + // Store the request headers if applicable + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host"), + }, this._options.headers); + } + + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } + + // Drop the Host header, as the redirect might lead to a different host + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + + // If the redirect is relative, carry over the host of the last request + var currentUrlParts = parseUrl(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : + url.format(Object.assign(currentUrlParts, { host: currentHost })); + + // Create the redirected request + var redirectUrl = resolveUrl(location, currentUrl); + debug("redirecting to", redirectUrl.href); + this._isRedirect = true; + spreadUrlObject(redirectUrl, this._options); + + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if (redirectUrl.protocol !== currentUrlParts.protocol && + redirectUrl.protocol !== "https:" || + redirectUrl.host !== currentHost && + !isSubdomain(redirectUrl.host, currentHost)) { + removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); + } + + // Evaluate the beforeRedirect callback + if (isFunction(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode: statusCode, + }; + var requestDetails = { + url: currentUrl, + method: method, + headers: requestHeaders, + }; + beforeRedirect(this._options, responseDetails, requestDetails); + this._sanitizeOptions(this._options); + } + + // Perform the redirected request + this._performRequest(); +}; + +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; + + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); + + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters, ensuring that input is an object + if (isURL(input)) { + input = spreadUrlObject(input); + } + else if (isString(input)) { + input = spreadUrlObject(parseUrl(input)); + } + else { + callback = options; + options = validateUrl(input); + input = { protocol: protocol }; + } + if (isFunction(options)) { + callback = options; + options = null; + } + + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString(options.host) && !isString(options.hostname)) { + options.hostname = "::1"; + } + + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); } - url.password = result; + + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; } -exports.setThePassword = setThePassword; -/** - * Determines if the string represents a single dot path. - * - * @param str - a string - */ -function isSingleDotPathSegment(str) { - return str === '.' || str.toLowerCase() === "%2e"; + +function noop() { /* empty */ } + +function parseUrl(input) { + var parsed; + // istanbul ignore else + if (useNativeURL) { + parsed = new URL(input); + } + else { + // Ensure the URL is valid and absolute + parsed = validateUrl(url.parse(input)); + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); + } + } + return parsed; } -exports.isSingleDotPathSegment = isSingleDotPathSegment; -/** - * Determines if the string represents a double dot path. - * - * @param str - a string - */ -function isDoubleDotPathSegment(str) { - var lowerStr = str.toLowerCase(); - return lowerStr === ".." || lowerStr === ".%2e" || - lowerStr === "%2e." || lowerStr === "%2e%2e"; + +function resolveUrl(relative, base) { + // istanbul ignore next + return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); } -exports.isDoubleDotPathSegment = isDoubleDotPathSegment; -/** - * Shorten's URL's path. - * - * @param url - an URL - */ -function shorten(url) { - /** - * 1. Let path be url’s path. - * 2. If path is empty, then return. - * 3. If url’s scheme is "file", path’s size is 1, and path[0] is a - * normalized Windows drive letter, then return. - * 4. Remove path’s last item. - */ - var path = url.path; - if (path.length === 0) - return; - if (url.scheme === "file" && path.length === 1 && - isNormalizedWindowsDriveLetter(path[0])) - return; - url.path.splice(url.path.length - 1, 1); + +function validateUrl(input) { + if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { + throw new InvalidUrlError({ input: input.href || input }); + } + if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { + throw new InvalidUrlError({ input: input.href || input }); + } + return input; } -exports.shorten = shorten; -/** - * Determines if a string is a normalized Windows drive letter. - * - * @param str - a string - */ -function isNormalizedWindowsDriveLetter(str) { - /** - * A normalized Windows drive letter is a Windows drive letter of which the - * second code point is U+003A (:). - */ - return str.length >= 2 && infra_1.codePoint.ASCIIAlpha.test(str[0]) && - str[1] === ':'; + +function spreadUrlObject(urlObject, target) { + var spread = target || {}; + for (var key of preservedUrlFields) { + spread[key] = urlObject[key]; + } + + // Fix IPv6 hostname + if (spread.hostname.startsWith("[")) { + spread.hostname = spread.hostname.slice(1, -1); + } + // Ensure port is a number + if (spread.port !== "") { + spread.port = Number(spread.port); + } + // Concatenate path + spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; + + return spread; } -exports.isNormalizedWindowsDriveLetter = isNormalizedWindowsDriveLetter; -/** - * Determines if a string is a Windows drive letter. - * - * @param str - a string - */ -function isWindowsDriveLetter(str) { - /** - * A Windows drive letter is two code points, of which the first is an ASCII - * alpha and the second is either U+003A (:) or U+007C (|). - */ - return str.length >= 2 && infra_1.codePoint.ASCIIAlpha.test(str[0]) && - (str[1] === ':' || str[1] === '|'); + +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } + } + return (lastValue === null || typeof lastValue === "undefined") ? + undefined : String(lastValue).trim(); } -exports.isWindowsDriveLetter = isWindowsDriveLetter; -/** - * Determines if a string starts with a Windows drive letter. - * - * @param str - a string - */ -function startsWithAWindowsDriveLetter(str) { - /** - * A string starts with a Windows drive letter if all of the following are - * true: - * - its length is greater than or equal to 2 - * - its first two code points are a Windows drive letter - * - its length is 2 or its third code point is U+002F (/), U+005C (\), - * U+003F (?), or U+0023 (#). - */ - return str.length >= 2 && isWindowsDriveLetter(str) && - (str.length === 2 || (str[2] === '/' || str[2] === '\\' || - str[2] === '?' || str[2] === '#')); + +function createErrorType(code, message, baseClass) { + // Create constructor + function CustomError(properties) { + // istanbul ignore else + if (isFunction(Error.captureStackTrace)) { + Error.captureStackTrace(this, this.constructor); + } + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; + } + + // Attach constructor and set default properties + CustomError.prototype = new (baseClass || Error)(); + Object.defineProperties(CustomError.prototype, { + constructor: { + value: CustomError, + enumerable: false, + }, + name: { + value: "Error [" + code + "]", + enumerable: false, + }, + }); + return CustomError; } -exports.startsWithAWindowsDriveLetter = startsWithAWindowsDriveLetter; -/** - * Parses a host string. - * - * @param input - input string - * @param isNotSpecial - `true` if the source URL is not special; otherwise - * `false`. - */ -function hostParser(input, isNotSpecial) { - if (isNotSpecial === void 0) { isNotSpecial = false; } - /** - * 1. If isNotSpecial is not given, then set isNotSpecial to false. - * 2. If input starts with U+005B ([), then: - * 2.1. If input does not end with U+005D (]), validation error, return - * failure. - * 2.2. Return the result of IPv6 parsing input with its leading U+005B ([) - * and trailing U+005D (]) removed. - */ - if (input.startsWith('[')) { - if (!input.endsWith(']')) { - validationError("Expected ']' after '['."); - return null; + +function destroyRequest(request, error) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); + } + request.on("error", noop); + request.destroy(error); +} + +function isSubdomain(subdomain, domain) { + assert(isString(subdomain) && isString(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); +} + +function isString(value) { + return typeof value === "string" || value instanceof String; +} + +function isFunction(value) { + return typeof value === "function"; +} + +function isBuffer(value) { + return typeof value === "object" && ("length" in value); +} + +function isURL(value) { + return URL && value instanceof URL; +} + +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; + + +/***/ }), + +/***/ 19320: +/***/ ((module) => { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; } - return iPv6Parser(input.substring(1, input.length - 1)); } - /** - * 3. If isNotSpecial is true, then return the result of opaque-host parsing - * input. - */ - if (isNotSpecial) { - return opaqueHostParser(input); + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); } - /** - * 4. Let domain be the result of running UTF-8 decode without BOM on the - * string percent decoding of input. - * _Note:_ Alternatively UTF-8 decode without BOM or fail can be used, - * coupled with an early return for failure, as domain to ASCII fails - * on U+FFFD REPLACEMENT CHARACTER. - */ - var domain = util_1.utf8Decode(stringPercentDecode(input)); - /** - * 5. Let asciiDomain be the result of running domain to ASCII on domain. - * 6. If asciiDomain is failure, validation error, return failure. - * 7. If asciiDomain contains a forbidden host code point, validation error, - * return failure. - */ - var asciiDomain = domainToASCII(domain); - if (asciiDomain === null) { - validationError("Invalid domain."); - return null; + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; } - if (_forbiddenHostCodePoint.test(asciiDomain)) { - validationError("Invalid domain."); - return null; + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; } - /** - * 8. Let ipv4Host be the result of IPv4 parsing asciiDomain. - * 9. If ipv4Host is an IPv4 address or failure, return ipv4Host. - * 10. Return asciiDomain. - */ - var ipv4Host = iPv4Parser(asciiDomain); - if (ipv4Host === null || util_1.isNumber(ipv4Host)) - return ipv4Host; - return asciiDomain; -} -exports.hostParser = hostParser; + + return bound; +}; + + +/***/ }), + +/***/ 88334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var implementation = __nccwpck_require__(19320); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 66129: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2018 Google LLC +// 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. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _a; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GaxiosError = exports.GAXIOS_ERROR_SYMBOL = void 0; +exports.defaultErrorRedactor = defaultErrorRedactor; +const url_1 = __nccwpck_require__(57310); +const util_1 = __nccwpck_require__(21980); +const extend_1 = __importDefault(__nccwpck_require__(38171)); /** - * Parses a string containing an IP v4 address. + * Support `instanceof` operator for `GaxiosError`s in different versions of this library. * - * @param input - input string - * @param isNotSpecial - `true` if the source URL is not special; otherwise - * `false`. + * @see {@link GaxiosError[Symbol.hasInstance]} */ -function iPv4NumberParser(input, validationErrorFlag) { - if (validationErrorFlag === void 0) { validationErrorFlag = { value: false }; } +exports.GAXIOS_ERROR_SYMBOL = Symbol.for(`${util_1.pkg.name}-gaxios-error`); +/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ +class GaxiosError extends Error { /** - * 1. Let R be 10. + * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. + * + * @see {@link GAXIOS_ERROR_SYMBOL} + * @see {@link GaxiosError[GAXIOS_ERROR_SYMBOL]} */ - var R = 10; - if (input.startsWith("0x") || input.startsWith("0X")) { - /** - * 2. If input contains at least two code points and the first two code - * points are either "0x" or "0X", then: - * 2.1. Set validationErrorFlag. - * 2.2. Remove the first two code points from input. - * 2.3. Set R to 16. - */ - validationErrorFlag.value = true; - input = input.substr(2); - R = 16; + static [(_a = exports.GAXIOS_ERROR_SYMBOL, Symbol.hasInstance)](instance) { + if (instance && + typeof instance === 'object' && + exports.GAXIOS_ERROR_SYMBOL in instance && + instance[exports.GAXIOS_ERROR_SYMBOL] === util_1.pkg.version) { + return true; + } + // fallback to native + return Function.prototype[Symbol.hasInstance].call(GaxiosError, instance); } - else if (input.length >= 2 && input[0] === '0') { + constructor(message, config, response, error) { + var _b; + super(message); + this.config = config; + this.response = response; + this.error = error; /** - * 3. Otherwise, if input contains at least two code points and the first - * code point is U+0030 (0), then: - * 3.1. Set validationErrorFlag. - * 3.2. Remove the first code point from input. - * 3.3. Set R to 8. + * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. + * + * @see {@link GAXIOS_ERROR_SYMBOL} + * @see {@link GaxiosError[Symbol.hasInstance]} + * @see {@link https://github.com/microsoft/TypeScript/issues/13965#issuecomment-278570200} + * @see {@link https://stackoverflow.com/questions/46618852/require-and-instanceof} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance#reverting_to_default_instanceof_behavior} */ - validationErrorFlag.value = true; - input = input.substr(1); - R = 8; + this[_a] = util_1.pkg.version; + // deep-copy config as we do not want to mutate + // the existing config for future retries/use + this.config = (0, extend_1.default)(true, {}, config); + if (this.response) { + this.response.config = (0, extend_1.default)(true, {}, this.response.config); + } + if (this.response) { + try { + this.response.data = translateData(this.config.responseType, (_b = this.response) === null || _b === void 0 ? void 0 : _b.data); + } + catch (_c) { + // best effort - don't throw an error within an error + // we could set `this.response.config.responseType = 'unknown'`, but + // that would mutate future calls with this config object. + } + this.status = this.response.status; + } + if (error && 'code' in error && error.code) { + this.code = error.code; + } + if (config.errorRedactor) { + config.errorRedactor({ + config: this.config, + response: this.response, + }); + } + } +} +exports.GaxiosError = GaxiosError; +function translateData(responseType, data) { + switch (responseType) { + case 'stream': + return data; + case 'json': + return JSON.parse(JSON.stringify(data)); + case 'arraybuffer': + return JSON.parse(Buffer.from(data).toString('utf8')); + case 'blob': + return JSON.parse(data.text()); + default: + return data; } - /** - * 4. If input is the empty string, then return zero. - * 5. If input contains a code point that is not a radix-R digit, then - * return failure. - */ - if (input === "") - return 0; - var radixRDigits = (R === 10 ? /^[0-9]+$/ : (R === 16 ? /^[0-9A-Fa-f]+$/ : /^[0-7]+$/)); - if (!radixRDigits.test(input)) - return null; - /** - * 6. Return the mathematical integer value that is represented by input in - * radix-R notation, using ASCII hex digits for digits with values - * 0 through 15. - */ - return parseInt(input, R); } -exports.iPv4NumberParser = iPv4NumberParser; /** - * Parses a string containing an IP v4 address. + * An experimental error redactor. * - * @param input - input string + * @param config Config to potentially redact properties of + * @param response Config to potentially redact properties of + * + * @experimental */ -function iPv4Parser(input) { - var e_6, _a, e_7, _b; - /** - * 1. Let validationErrorFlag be unset. - * 2. Let parts be input split on U+002E (.). - */ - var validationErrorFlag = { value: false }; - var parts = input.split('.'); - /** - * 3. If the last item in parts is the empty string, then: - * 3.1. Set validationErrorFlag. - * 3.2. If parts has more than one item, then remove the last item from - * parts. - */ - if (parts[parts.length - 1] === "") { - validationErrorFlag.value = true; - if (parts.length > 1) - parts.pop(); +function defaultErrorRedactor(data) { + const REDACT = '< - See `errorRedactor` option in `gaxios` for configuration>.'; + function redactHeaders(headers) { + if (!headers) + return; + for (const key of Object.keys(headers)) { + // any casing of `Authentication` + if (/^authentication$/i.test(key)) { + headers[key] = REDACT; + } + // any casing of `Authorization` + if (/^authorization$/i.test(key)) { + headers[key] = REDACT; + } + // anything containing secret, such as 'client secret' + if (/secret/i.test(key)) { + headers[key] = REDACT; + } + } } - /** - * 4. If parts has more than four items, return input. - */ - if (parts.length > 4) - return input; - /** - * 5. Let numbers be the empty list. - * 6. For each part in parts: - * 6.1. If part is the empty string, return input. - * 6.2. Let n be the result of parsing part using validationErrorFlag. - * 6.3. If n is failure, return input. - * 6.4. Append n to numbers. - */ - var numbers = []; - try { - for (var parts_1 = __values(parts), parts_1_1 = parts_1.next(); !parts_1_1.done; parts_1_1 = parts_1.next()) { - var part = parts_1_1.value; - if (part === "") - return input; - var n = iPv4NumberParser(part, validationErrorFlag); - if (n === null) - return input; - numbers.push(n); + function redactString(obj, key) { + if (typeof obj === 'object' && + obj !== null && + typeof obj[key] === 'string') { + const text = obj[key]; + if (/grant_type=/i.test(text) || + /assertion=/i.test(text) || + /secret/i.test(text)) { + obj[key] = REDACT; + } } } - catch (e_6_1) { e_6 = { error: e_6_1 }; } - finally { - try { - if (parts_1_1 && !parts_1_1.done && (_a = parts_1.return)) _a.call(parts_1); + function redactObject(obj) { + if (typeof obj === 'object' && obj !== null) { + if ('grant_type' in obj) { + obj['grant_type'] = REDACT; + } + if ('assertion' in obj) { + obj['assertion'] = REDACT; + } + if ('client_secret' in obj) { + obj['client_secret'] = REDACT; + } } - finally { if (e_6) throw e_6.error; } } - /** - * 7. If validationErrorFlag is set, validation error. - * 8. If any item in numbers is greater than 255, validation error. - * 9. If any but the last item in numbers is greater than 255, return - * failure. - * 10. If the last item in numbers is greater than or equal to - * 256**(5 − the number of items in numbers), validation error, return failure. - */ - if (validationErrorFlag.value) - validationError("Invalid IP v4 address."); - for (var i = 0; i < numbers.length; i++) { - var item = numbers[i]; - if (item > 255) { - validationError("Invalid IP v4 address."); - if (i < numbers.length - 1) - return null; + if (data.config) { + redactHeaders(data.config.headers); + redactString(data.config, 'data'); + redactObject(data.config.data); + redactString(data.config, 'body'); + redactObject(data.config.body); + try { + const url = new url_1.URL('', data.config.url); + if (url.searchParams.has('token')) { + url.searchParams.set('token', REDACT); + } + if (url.searchParams.has('client_secret')) { + url.searchParams.set('client_secret', REDACT); + } + data.config.url = url.toString(); + } + catch (_b) { + // ignore error - no need to parse an invalid URL } } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - validationError("Invalid IP v4 address."); - return null; + if (data.response) { + defaultErrorRedactor({ config: data.response.config }); + redactHeaders(data.response.headers); + redactString(data.response, 'data'); + redactObject(data.response.data); } - /** - * 11. Let ipv4 be the last item in numbers. - * 12. Remove the last item from numbers. - */ - var ipv4 = numbers[numbers.length - 1]; - numbers.pop(); - /** - * 13. Let counter be zero. - * 14. For each n in numbers: - * 14.2. Increment ipv4 by n × 256**(3 − counter). - * 14.2. Increment counter by 1. - */ - var counter = 0; - try { - for (var numbers_1 = __values(numbers), numbers_1_1 = numbers_1.next(); !numbers_1_1.done; numbers_1_1 = numbers_1.next()) { - var n = numbers_1_1.value; - ipv4 += n * Math.pow(256, 3 - counter); - counter++; - } + return data; +} +//# sourceMappingURL=common.js.map + +/***/ }), + +/***/ 28133: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2018 Google LLC +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - catch (e_7_1) { e_7 = { error: e_7_1 }; } - finally { - try { - if (numbers_1_1 && !numbers_1_1.done && (_b = numbers_1.return)) _b.call(numbers_1); + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _Gaxios_instances, _a, _Gaxios_urlMayUseProxy, _Gaxios_applyRequestInterceptors, _Gaxios_applyResponseInterceptors, _Gaxios_prepareRequest, _Gaxios_proxyAgent, _Gaxios_getProxyAgent; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Gaxios = void 0; +const extend_1 = __importDefault(__nccwpck_require__(38171)); +const https_1 = __nccwpck_require__(95687); +const node_fetch_1 = __importDefault(__nccwpck_require__(80467)); +const querystring_1 = __importDefault(__nccwpck_require__(63477)); +const is_stream_1 = __importDefault(__nccwpck_require__(41554)); +const url_1 = __nccwpck_require__(57310); +const common_1 = __nccwpck_require__(66129); +const retry_1 = __nccwpck_require__(31052); +const stream_1 = __nccwpck_require__(12781); +const uuid_1 = __nccwpck_require__(19694); +const interceptor_1 = __nccwpck_require__(14309); +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fetch = hasFetch() ? window.fetch : node_fetch_1.default; +function hasWindow() { + return typeof window !== 'undefined' && !!window; +} +function hasFetch() { + return hasWindow() && !!window.fetch; +} +function hasBuffer() { + return typeof Buffer !== 'undefined'; +} +function hasHeader(options, header) { + return !!getHeader(options, header); +} +function getHeader(options, header) { + header = header.toLowerCase(); + for (const key of Object.keys((options === null || options === void 0 ? void 0 : options.headers) || {})) { + if (header === key.toLowerCase()) { + return options.headers[key]; } - finally { if (e_7) throw e_7.error; } } - /** - * 15. Return ipv4. - */ - return ipv4; + return undefined; } -exports.iPv4Parser = iPv4Parser; -/** - * Parses a string containing an IP v6 address. - * - * @param input - input string - */ -function iPv6Parser(input) { - var _a; +class Gaxios { /** - * 1. Let address be a new IPv6 address whose IPv6 pieces are all 0. - * 2. Let pieceIndex be 0. - * 3. Let compress be null. - * 4. Let pointer be a pointer into input, initially 0 (pointing to the - * first code point). + * The Gaxios class is responsible for making HTTP requests. + * @param defaults The default set of options to be used for this instance. */ - var EOF = ""; - var address = [0, 0, 0, 0, 0, 0, 0, 0]; - var pieceIndex = 0; - var compress = null; - var walker = new util_1.StringWalker(input); + constructor(defaults) { + _Gaxios_instances.add(this); + this.agentCache = new Map(); + this.defaults = defaults || {}; + this.interceptors = { + request: new interceptor_1.GaxiosInterceptorManager(), + response: new interceptor_1.GaxiosInterceptorManager(), + }; + } /** - * 5. If c is U+003A (:), then: - * 5.1. If remaining does not start with U+003A (:), validation error, - * return failure. - * 5.2. Increase pointer by 2. - * 5.3. Increase pieceIndex by 1 and then set compress to pieceIndex. + * Perform an HTTP request with the given options. + * @param opts Set of HTTP options that will be used for this HTTP request. */ - if (walker.c() === ':') { - if (!walker.remaining().startsWith(':')) { - validationError("Invalid IP v6 address."); - return null; - } - walker.pointer += 2; - pieceIndex += 1; - compress = pieceIndex; + async request(opts = {}) { + opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_prepareRequest).call(this, opts); + opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyRequestInterceptors).call(this, opts); + return __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyResponseInterceptors).call(this, this._request(opts)); + } + async _defaultAdapter(opts) { + const fetchImpl = opts.fetchImplementation || fetch; + const res = (await fetchImpl(opts.url, opts)); + const data = await this.getResponseData(opts, res); + return this.translateResponse(opts, res, data); } /** - * 6. While c is not the EOF code point: + * Internal, retryable version of the `request` method. + * @param opts Set of HTTP options that will be used for this HTTP request. */ - while (walker.c() !== EOF) { - /** - * 6.1. If pieceIndex is 8, validation error, return failure. - */ - if (pieceIndex === 8) { - validationError("Invalid IP v6 address."); - return null; - } - /** - * 6.2. If c is U+003A (:), then: - * 6.2.1. If compress is non-null, validation error, return failure. - * 6.2.2. Increase pointer and pieceIndex by 1, set compress to pieceIndex, - * and then continue. - */ - if (walker.c() === ':') { - if (compress !== null) { - validationError("Invalid IP v6 address."); - return null; - } - walker.pointer++; - pieceIndex++; - compress = pieceIndex; - continue; - } - /** - * 6.3. Let value and length be 0. - * 6.4. While length is less than 4 and c is an ASCII hex digit, set value - * to value × 0x10 + c interpreted as hexadecimal number, and increase - * pointer and length by 1. - */ - var value = 0; - var length = 0; - while (length < 4 && infra_1.codePoint.ASCIIHexDigit.test(walker.c())) { - value = value * 0x10 + parseInt(walker.c(), 16); - walker.pointer++; - length++; - } - /** - * 6.5. If c is U+002E (.), then: - */ - if (walker.c() === '.') { - /** - * 6.5.1. If length is 0, validation error, return failure. - * 6.5.2. Decrease pointer by length. - * 6.5.3. If pieceIndex is greater than 6, validation error, return - * failure. - * 6.5.4. Let numbersSeen be 0. - */ - if (length === 0) { - validationError("Invalid IP v6 address."); - return null; + async _request(opts = {}) { + var _b; + try { + let translatedResponse; + if (opts.adapter) { + translatedResponse = await opts.adapter(opts, this._defaultAdapter.bind(this)); } - walker.pointer -= length; - if (pieceIndex > 6) { - validationError("Invalid IP v6 address."); - return null; + else { + translatedResponse = await this._defaultAdapter(opts); } - var numbersSeen = 0; - /** - * 6.5.5. While c is not the EOF code point: - */ - while (walker.c() !== EOF) { - /** - * 6.5.5.1. Let ipv4Piece be null. - */ - var ipv4Piece = null; - /** - * 6.5.5.2. If numbersSeen is greater than 0, then: - * 6.5.5.2.1. If c is a U+002E (.) and numbersSeen is less than 4, then - * increase pointer by 1. - * 6.5.5.2.1. Otherwise, validation error, return failure. - */ - if (numbersSeen > 0) { - if (walker.c() === '.' && numbersSeen < 4) { - walker.pointer++; - } - else { - validationError("Invalid IP v6 address."); - return null; - } - } - /** - * 6.5.5.3. If c is not an ASCII digit, validation error, return - * failure. - */ - if (!infra_1.codePoint.ASCIIDigit.test(walker.c())) { - validationError("Invalid IP v6 address."); - return null; - } - /** - * 6.5.5.4. While c is an ASCII digit: - */ - while (infra_1.codePoint.ASCIIDigit.test(walker.c())) { - /** - * 6.5.5.4.1. Let number be c interpreted as decimal number. - */ - var number = parseInt(walker.c(), 10); - /** - * 6.5.5.4.2. If ipv4Piece is null, then set ipv4Piece to number. - * Otherwise, if ipv4Piece is 0, validation error, return failure. - * Otherwise, set ipv4Piece to ipv4Piece × 10 + number. - */ - if (ipv4Piece === null) { - ipv4Piece = number; - } - else if (ipv4Piece === 0) { - validationError("Invalid IP v6 address."); - return null; - } - else { - ipv4Piece = ipv4Piece * 10 + number; - } - /** - * 6.5.5.4.3. If ipv4Piece is greater than 255, validation error, return failure. - * 6.5.5.4.4. Increase pointer by 1. - */ - if (ipv4Piece > 255) { - validationError("Invalid IP v6 address."); - return null; - } - walker.pointer++; - } - /** - * 6.5.5.5. Set address[pieceIndex] to address[pieceIndex] × 0x100 + ipv4Piece. - * 6.5.5.6. Increase numbersSeen by 1. - * 6.5.5.7. If numbersSeen is 2 or 4, then increase pieceIndex by 1. - */ - if (ipv4Piece === null) { - validationError("Invalid IP v6 address."); - return null; + if (!opts.validateStatus(translatedResponse.status)) { + if (opts.responseType === 'stream') { + let response = ''; + await new Promise(resolve => { + (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('data', chunk => { + response += chunk; + }); + (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('end', resolve); + }); + translatedResponse.data = response; } - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - numbersSeen++; - if (numbersSeen === 2 || numbersSeen === 4) - pieceIndex++; - } - /** - * 6.5.6. If numbersSeen is not 4, validation error, return failure. - */ - if (numbersSeen !== 4) { - validationError("Invalid IP v6 address."); - return null; + throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse); } - /** - * 6.5.7. Break. - */ - break; + return translatedResponse; } - else if (walker.c() === ':') { - /** - * 6.6. Otherwise, if c is U+003A (:): - * 6.6.1. Increase pointer by 1. - * 6.6.2. If c is the EOF code point, validation error, return failure. - */ - walker.pointer++; - if (walker.c() === EOF) { - validationError("Invalid IP v6 address."); - return null; + catch (e) { + const err = e instanceof common_1.GaxiosError + ? e + : new common_1.GaxiosError(e.message, opts, undefined, e); + const { shouldRetry, config } = await (0, retry_1.getRetryConfig)(err); + if (shouldRetry && config) { + err.config.retryConfig.currentRetryAttempt = + config.retryConfig.currentRetryAttempt; + // The error's config could be redacted - therefore we only want to + // copy the retry state over to the existing config + opts.retryConfig = (_b = err.config) === null || _b === void 0 ? void 0 : _b.retryConfig; + return this._request(opts); } + throw err; } - else if (walker.c() !== EOF) { - /** - * 6.7. Otherwise, if c is not the EOF code point, validation error, - * return failure. - */ - validationError("Invalid IP v6 address."); - return null; + } + async getResponseData(opts, res) { + switch (opts.responseType) { + case 'stream': + return res.body; + case 'json': { + let data = await res.text(); + try { + data = JSON.parse(data); + } + catch (_b) { + // continue + } + return data; + } + case 'arraybuffer': + return res.arrayBuffer(); + case 'blob': + return res.blob(); + case 'text': + return res.text(); + default: + return this.getResponseDataFromContentType(res); } - /** - * 6.8. Set address[pieceIndex] to value. - * 6.9. Increase pieceIndex by 1. - */ - address[pieceIndex] = value; - pieceIndex++; } /** - * 7. If compress is non-null, then: - * 7.1. Let swaps be pieceIndex − compress. - * 7.2. Set pieceIndex to 7. - * 7.3. While pieceIndex is not 0 and swaps is greater than 0, swap - * address[pieceIndex] with address[compress + swaps − 1], and then decrease - * both pieceIndex and swaps by 1. + * By default, throw for any non-2xx status code + * @param status status code from the HTTP response */ - if (compress !== null) { - var swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - _a = __read([address[compress + swaps - 1], address[pieceIndex]], 2), address[pieceIndex] = _a[0], address[compress + swaps - 1] = _a[1]; - pieceIndex--; - swaps--; - } - } - else if (compress === null && pieceIndex !== 8) { - /** - * 8. Otherwise, if compress is null and pieceIndex is not 8, - * validation error, return failure. - */ - validationError("Invalid IP v6 address."); - return null; + validateStatus(status) { + return status >= 200 && status < 300; } /** - * 9. Return address. + * Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo) + * @param params key value pars to encode */ - return address; -} -exports.iPv6Parser = iPv6Parser; -/** - * Parses an opaque host string. - * - * @param input - a string - */ -function opaqueHostParser(input) { - var e_8, _a; + paramsSerializer(params) { + return querystring_1.default.stringify(params); + } + translateResponse(opts, res, data) { + // headers need to be converted from a map to an obj + const headers = {}; + res.headers.forEach((value, key) => { + headers[key] = value; + }); + return { + config: opts, + data: data, + headers, + status: res.status, + statusText: res.statusText, + // XMLHttpRequestLike + request: { + responseURL: res.url, + }, + }; + } /** - * 1. If input contains a forbidden host code point excluding U+0025 (%), - * validation error, return failure. - * 2. Let output be the empty string. - * 3. For each code point in input, UTF-8 percent encode it using the C0 - * control percent-encode set, and append the result to output. - * 4. Return output. + * Attempts to parse a response by looking at the Content-Type header. + * @param {FetchResponse} response the HTTP response. + * @returns {Promise} a promise that resolves to the response data. */ - var forbiddenChars = /[\x00\t\f\r #/:?@\[\\\]]/; - if (forbiddenChars.test(input)) { - validationError("Invalid host string."); - return null; - } - var output = ""; - try { - for (var input_1 = __values(input), input_1_1 = input_1.next(); !input_1_1.done; input_1_1 = input_1.next()) { - var codePoint = input_1_1.value; - output += utf8PercentEncode(codePoint, _c0ControlPercentEncodeSet); + async getResponseDataFromContentType(response) { + let contentType = response.headers.get('Content-Type'); + if (contentType === null) { + // Maintain existing functionality by calling text() + return response.text(); + } + contentType = contentType.toLowerCase(); + if (contentType.includes('application/json')) { + let data = await response.text(); + try { + data = JSON.parse(data); + } + catch (_b) { + // continue + } + return data; + } + else if (contentType.match(/^text\//)) { + return response.text(); + } + else { + // If the content type is something not easily handled, just return the raw data (blob) + return response.blob(); } } - catch (e_8_1) { e_8 = { error: e_8_1 }; } - finally { - try { - if (input_1_1 && !input_1_1.done && (_a = input_1.return)) _a.call(input_1); + /** + * Creates an async generator that yields the pieces of a multipart/related request body. + * This implementation follows the spec: https://www.ietf.org/rfc/rfc2387.txt. However, recursive + * multipart/related requests are not currently supported. + * + * @param {GaxioMultipartOptions[]} multipartOptions the pieces to turn into a multipart/related body. + * @param {string} boundary the boundary string to be placed between each part. + */ + async *getMultipartRequest(multipartOptions, boundary) { + const finale = `--${boundary}--`; + for (const currentPart of multipartOptions) { + const partContentType = currentPart.headers['Content-Type'] || 'application/octet-stream'; + const preamble = `--${boundary}\r\nContent-Type: ${partContentType}\r\n\r\n`; + yield preamble; + if (typeof currentPart.content === 'string') { + yield currentPart.content; + } + else { + yield* currentPart.content; + } + yield '\r\n'; } - finally { if (e_8) throw e_8.error; } + yield finale; } - return output; } -exports.opaqueHostParser = opaqueHostParser; +exports.Gaxios = Gaxios; +_a = Gaxios, _Gaxios_instances = new WeakSet(), _Gaxios_urlMayUseProxy = function _Gaxios_urlMayUseProxy(url, noProxy = []) { + var _b, _c; + const candidate = new url_1.URL(url); + const noProxyList = [...noProxy]; + const noProxyEnvList = ((_c = ((_b = process.env.NO_PROXY) !== null && _b !== void 0 ? _b : process.env.no_proxy)) === null || _c === void 0 ? void 0 : _c.split(',')) || []; + for (const rule of noProxyEnvList) { + noProxyList.push(rule.trim()); + } + for (const rule of noProxyList) { + // Match regex + if (rule instanceof RegExp) { + if (rule.test(candidate.toString())) { + return false; + } + } + // Match URL + else if (rule instanceof url_1.URL) { + if (rule.origin === candidate.origin) { + return false; + } + } + // Match string regex + else if (rule.startsWith('*.') || rule.startsWith('.')) { + const cleanedRule = rule.replace(/^\*\./, '.'); + if (candidate.hostname.endsWith(cleanedRule)) { + return false; + } + } + // Basic string match + else if (rule === candidate.origin || + rule === candidate.hostname || + rule === candidate.href) { + return false; + } + } + return true; +}, _Gaxios_applyRequestInterceptors = /** - * Resolves a Blob URL from the user agent's Blob URL store. - * function is not implemented. - * See: https://w3c.github.io/FileAPI/#blob-url-resolve + * Applies the request interceptors. The request interceptors are applied after the + * call to prepareRequest is completed. * - * @param url - an url + * @param {GaxiosOptions} options The current set of options. + * + * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. */ -function resolveABlobURL(url) { - return null; -} -exports.resolveABlobURL = resolveABlobURL; +async function _Gaxios_applyRequestInterceptors(options) { + let promiseChain = Promise.resolve(options); + for (const interceptor of this.interceptors.request.values()) { + if (interceptor) { + promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); + } + } + return promiseChain; +}, _Gaxios_applyResponseInterceptors = /** - * Percent encodes a byte. + * Applies the response interceptors. The response interceptors are applied after the + * call to request is made. * - * @param value - a byte + * @param {GaxiosOptions} options The current set of options. + * + * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. */ -function percentEncode(value) { - /** - * To percent encode a byte into a percent-encoded byte, return a string - * consisting of U+0025 (%), followed by two ASCII upper hex digits - * representing byte. - */ - return '%' + ('00' + value.toString(16).toUpperCase()).slice(-2); -} -exports.percentEncode = percentEncode; +async function _Gaxios_applyResponseInterceptors(response) { + let promiseChain = Promise.resolve(response); + for (const interceptor of this.interceptors.response.values()) { + if (interceptor) { + promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); + } + } + return promiseChain; +}, _Gaxios_prepareRequest = /** - * Percent decodes a byte sequence input. + * Validates the options, merges them with defaults, and prepare request. * - * @param input - a byte sequence + * @param options The original options passed from the client. + * @returns Prepared options, ready to make a request */ -function percentDecode(input) { - var isHexDigit = function (byte) { - return (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x46) || - (byte >= 0x61 && byte <= 0x66); - }; - /** - * 1. Let output be an empty byte sequence. - * 2. For each byte byte in input: - */ - var output = new Uint8Array(input.length); - var n = 0; - for (var i = 0; i < input.length; i++) { - var byte = input[i]; - /** - * 2.1. If byte is not 0x25 (%), then append byte to output. - * 2.2. Otherwise, if byte is 0x25 (%) and the next two bytes after byte - * in input are not in the ranges 0x30 (0) to 0x39 (9), 0x41 (A) - * to 0x46 (F), and 0x61 (a) to 0x66 (f), all inclusive, append byte - * to output. - * 2.3. Otherwise: - * 2.3.1. Let bytePoint be the two bytes after byte in input, decoded, - * and then interpreted as hexadecimal number. - * 2.3.2. Append a byte whose value is bytePoint to output. - * 2.3.3. Skip the next two bytes in input. - */ - if (byte !== 0x25) { - output[n] = byte; - n++; +async function _Gaxios_prepareRequest(options) { + var _b, _c, _d, _e; + const opts = (0, extend_1.default)(true, {}, this.defaults, options); + if (!opts.url) { + throw new Error('URL is required.'); + } + // baseUrl has been deprecated, remove in 2.0 + const baseUrl = opts.baseUrl || opts.baseURL; + if (baseUrl) { + opts.url = baseUrl.toString() + opts.url; + } + opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer; + if (opts.params && Object.keys(opts.params).length > 0) { + let additionalQueryParams = opts.paramsSerializer(opts.params); + if (additionalQueryParams.startsWith('?')) { + additionalQueryParams = additionalQueryParams.slice(1); } - else if (byte === 0x25 && i >= input.length - 2) { - output[n] = byte; - n++; + const prefix = opts.url.toString().includes('?') ? '&' : '?'; + opts.url = opts.url + prefix + additionalQueryParams; + } + if (typeof options.maxContentLength === 'number') { + opts.size = options.maxContentLength; + } + if (typeof options.maxRedirects === 'number') { + opts.follow = options.maxRedirects; + } + opts.headers = opts.headers || {}; + if (opts.multipart === undefined && opts.data) { + const isFormData = typeof FormData === 'undefined' + ? false + : (opts === null || opts === void 0 ? void 0 : opts.data) instanceof FormData; + if (is_stream_1.default.readable(opts.data)) { + opts.body = opts.data; } - else if (byte === 0x25 && (!isHexDigit(input[i + 1]) || !isHexDigit(input[i + 2]))) { - output[n] = byte; - n++; + else if (hasBuffer() && Buffer.isBuffer(opts.data)) { + // Do not attempt to JSON.stringify() a Buffer: + opts.body = opts.data; + if (!hasHeader(opts, 'Content-Type')) { + opts.headers['Content-Type'] = 'application/json'; + } + } + else if (typeof opts.data === 'object') { + // If www-form-urlencoded content type has been set, but data is + // provided as an object, serialize the content using querystring: + if (!isFormData) { + if (getHeader(opts, 'content-type') === + 'application/x-www-form-urlencoded') { + opts.body = opts.paramsSerializer(opts.data); + } + else { + // } else if (!(opts.data instanceof FormData)) { + if (!hasHeader(opts, 'Content-Type')) { + opts.headers['Content-Type'] = 'application/json'; + } + opts.body = JSON.stringify(opts.data); + } + } } else { - var bytePoint = parseInt(util_1.utf8Decode(Uint8Array.of(input[i + 1], input[i + 2])), 16); - output[n] = bytePoint; - n++; - i += 2; + opts.body = opts.data; } } - return output.subarray(0, n); -} -exports.percentDecode = percentDecode; -/** - * String percent decodes a string. - * - * @param input - a string - */ -function stringPercentDecode(input) { - /** - * 1. Let bytes be the UTF-8 encoding of input. - * 2. Return the percent decoding of bytes. - */ - return percentDecode(util_1.utf8Encode(input)); -} -exports.stringPercentDecode = stringPercentDecode; -/** - * UTF-8 percent encodes a code point, using a percent encode set. - * - * @param codePoint - a code point - * @param percentEncodeSet - a percent encode set - */ -function utf8PercentEncode(codePoint, percentEncodeSet) { - var e_9, _a; - /** - * 1. If codePoint is not in percentEncodeSet, then return codePoint. - * 2. Let bytes be the result of running UTF-8 encode on codePoint. - * 3. Percent encode each byte in bytes, and then return the results - * concatenated, in the same order. - */ - if (!percentEncodeSet.test(codePoint)) - return codePoint; - var bytes = util_1.utf8Encode(codePoint); - var result = ""; - try { - for (var bytes_2 = __values(bytes), bytes_2_1 = bytes_2.next(); !bytes_2_1.done; bytes_2_1 = bytes_2.next()) { - var byte = bytes_2_1.value; - result += percentEncode(byte); + else if (opts.multipart && opts.multipart.length > 0) { + // note: once the minimum version reaches Node 16, + // this can be replaced with randomUUID() function from crypto + // and the dependency on UUID removed + const boundary = (0, uuid_1.v4)(); + opts.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; + const bodyStream = new stream_1.PassThrough(); + opts.body = bodyStream; + (0, stream_1.pipeline)(this.getMultipartRequest(opts.multipart, boundary), bodyStream, () => { }); + } + opts.validateStatus = opts.validateStatus || this.validateStatus; + opts.responseType = opts.responseType || 'unknown'; + if (!opts.headers['Accept'] && opts.responseType === 'json') { + opts.headers['Accept'] = 'application/json'; + } + opts.method = opts.method || 'GET'; + const proxy = opts.proxy || + ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.HTTPS_PROXY) || + ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.https_proxy) || + ((_d = process === null || process === void 0 ? void 0 : process.env) === null || _d === void 0 ? void 0 : _d.HTTP_PROXY) || + ((_e = process === null || process === void 0 ? void 0 : process.env) === null || _e === void 0 ? void 0 : _e.http_proxy); + const urlMayUseProxy = __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_urlMayUseProxy).call(this, opts.url, opts.noProxy); + if (opts.agent) { + // don't do any of the following options - use the user-provided agent. + } + else if (proxy && urlMayUseProxy) { + const HttpsProxyAgent = await __classPrivateFieldGet(_a, _a, "m", _Gaxios_getProxyAgent).call(_a); + if (this.agentCache.has(proxy)) { + opts.agent = this.agentCache.get(proxy); + } + else { + opts.agent = new HttpsProxyAgent(proxy, { + cert: opts.cert, + key: opts.key, + }); + this.agentCache.set(proxy, opts.agent); } } - catch (e_9_1) { e_9 = { error: e_9_1 }; } - finally { - try { - if (bytes_2_1 && !bytes_2_1.done && (_a = bytes_2.return)) _a.call(bytes_2); + else if (opts.cert && opts.key) { + // Configure client for mTLS + if (this.agentCache.has(opts.key)) { + opts.agent = this.agentCache.get(opts.key); + } + else { + opts.agent = new https_1.Agent({ + cert: opts.cert, + key: opts.key, + }); + this.agentCache.set(opts.key, opts.agent); } - finally { if (e_9) throw e_9.error; } } - return result; -} -exports.utf8PercentEncode = utf8PercentEncode; + if (typeof opts.errorRedactor !== 'function' && + opts.errorRedactor !== false) { + opts.errorRedactor = common_1.defaultErrorRedactor; + } + return opts; +}, _Gaxios_getProxyAgent = async function _Gaxios_getProxyAgent() { + __classPrivateFieldSet(this, _a, __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent) || (await Promise.resolve().then(() => __importStar(__nccwpck_require__(77219)))).HttpsProxyAgent, "f", _Gaxios_proxyAgent); + return __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent); +}; /** - * Determines if two hosts are considered equal. + * A cache for the lazily-loaded proxy agent. * - * @param hostA - a host - * @param hostB - a host + * Should use {@link Gaxios[#getProxyAgent]} to retrieve. */ -function hostEquals(hostA, hostB) { - return hostA === hostB; -} -exports.hostEquals = hostEquals; +// using `import` to dynamically import the types here +_Gaxios_proxyAgent = { value: void 0 }; +//# sourceMappingURL=gaxios.js.map + +/***/ }), + +/***/ 59555: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2018 Google LLC +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.instance = exports.Gaxios = exports.GaxiosError = void 0; +exports.request = request; +const gaxios_1 = __nccwpck_require__(28133); +Object.defineProperty(exports, "Gaxios", ({ enumerable: true, get: function () { return gaxios_1.Gaxios; } })); +var common_1 = __nccwpck_require__(66129); +Object.defineProperty(exports, "GaxiosError", ({ enumerable: true, get: function () { return common_1.GaxiosError; } })); +__exportStar(__nccwpck_require__(14309), exports); /** - * Determines if two URLs are considered equal. - * - * @param urlA - a URL - * @param urlB - a URL - * @param excludeFragmentsFlag - whether to ignore fragments while comparing + * The default instance used when the `request` method is directly + * invoked. */ -function urlEquals(urlA, urlB, excludeFragmentsFlag) { - if (excludeFragmentsFlag === void 0) { excludeFragmentsFlag = false; } - /** - * 1. Let serializedA be the result of serializing A, with the exclude - * fragment flag set if the exclude fragments flag is set. - * 2. Let serializedB be the result of serializing B, with the exclude - * fragment flag set if the exclude fragments flag is set. - * 3. Return true if serializedA is serializedB, and false otherwise. - */ - return urlSerializer(urlA, excludeFragmentsFlag) === - urlSerializer(urlB, excludeFragmentsFlag); -} -exports.urlEquals = urlEquals; +exports.instance = new gaxios_1.Gaxios(); /** - * Parses an `application/x-www-form-urlencoded` string. - * - * @param input - a string + * Make an HTTP request using the given options. + * @param opts Options for the request */ -function urlEncodedStringParser(input) { - /** - * The application/x-www-form-urlencoded string parser takes a string input, - * UTF-8 encodes it, and then returns the result of - * application/x-www-form-urlencoded parsing it. - */ - return urlEncodedParser(util_1.utf8Encode(input)); +async function request(opts) { + return exports.instance.request(opts); } -exports.urlEncodedStringParser = urlEncodedStringParser; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 14309: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright 2024 Google LLC +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GaxiosInterceptorManager = void 0; /** - * Parses `application/x-www-form-urlencoded` bytes. - * - * @param input - a byte sequence + * Class to manage collections of GaxiosInterceptors for both requests and responses. */ -function urlEncodedParser(input) { - var e_10, _a, e_11, _b; - /** - * 1. Let sequences be the result of splitting input on 0x26 (&). - */ - var sequences = []; - var currentSequence = []; - try { - for (var input_2 = __values(input), input_2_1 = input_2.next(); !input_2_1.done; input_2_1 = input_2.next()) { - var byte = input_2_1.value; - if (byte === 0x26) { - sequences.push(Uint8Array.from(currentSequence)); - currentSequence = []; - } - else { - currentSequence.push(byte); - } - } - } - catch (e_10_1) { e_10 = { error: e_10_1 }; } - finally { - try { - if (input_2_1 && !input_2_1.done && (_a = input_2.return)) _a.call(input_2); - } - finally { if (e_10) throw e_10.error; } - } - if (currentSequence.length !== 0) { - sequences.push(Uint8Array.from(currentSequence)); +class GaxiosInterceptorManager extends Set { +} +exports.GaxiosInterceptorManager = GaxiosInterceptorManager; +//# sourceMappingURL=interceptor.js.map + +/***/ }), + +/***/ 31052: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright 2018 Google LLC +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRetryConfig = getRetryConfig; +async function getRetryConfig(err) { + let config = getConfig(err); + if (!err || !err.config || (!config && !err.config.retry)) { + return { shouldRetry: false }; } - /** - * 2. Let output be an initially empty list of name-value tuples where both name and value hold a string. - */ - var output = []; - try { - /** - * 3. For each byte sequence bytes in sequences: - */ - for (var sequences_1 = __values(sequences), sequences_1_1 = sequences_1.next(); !sequences_1_1.done; sequences_1_1 = sequences_1.next()) { - var bytes = sequences_1_1.value; - /** - * 3.1. If bytes is the empty byte sequence, then continue. - */ - if (bytes.length === 0) - continue; - /** - * 3.2. If bytes contains a 0x3D (=), then let name be the bytes from the - * start of bytes up to but excluding its first 0x3D (=), and let value be - * the bytes, if any, after the first 0x3D (=) up to the end of bytes. - * If 0x3D (=) is the first byte, then name will be the empty byte - * sequence. If it is the last, then value will be the empty byte sequence. - * 3.3. Otherwise, let name have the value of bytes and let value be the - * empty byte sequence. - */ - var index = bytes.indexOf(0x3D); - var name = (index !== -1 ? bytes.slice(0, index) : bytes); - var value = (index !== -1 ? bytes.slice(index + 1) : new Uint8Array()); - /** - * 3.4. Replace any 0x2B (+) in name and value with 0x20 (SP). - */ - for (var i = 0; i < name.length; i++) - if (name[i] === 0x2B) - name[i] = 0x20; - for (var i = 0; i < value.length; i++) - if (value[i] === 0x2B) - value[i] = 0x20; - /** - * 3.5. Let nameString and valueString be the result of running UTF-8 - * decode without BOM on the percent decoding of name and value, - * respectively. - */ - var nameString = util_1.utf8Decode(name); - var valueString = util_1.utf8Decode(value); - /** - * 3.6. Append (nameString, valueString) to output. - */ - output.push([nameString, valueString]); - } + config = config || {}; + config.currentRetryAttempt = config.currentRetryAttempt || 0; + config.retry = + config.retry === undefined || config.retry === null ? 3 : config.retry; + config.httpMethodsToRetry = config.httpMethodsToRetry || [ + 'GET', + 'HEAD', + 'PUT', + 'OPTIONS', + 'DELETE', + ]; + config.noResponseRetries = + config.noResponseRetries === undefined || config.noResponseRetries === null + ? 2 + : config.noResponseRetries; + config.retryDelayMultiplier = config.retryDelayMultiplier + ? config.retryDelayMultiplier + : 2; + config.timeOfFirstRequest = config.timeOfFirstRequest + ? config.timeOfFirstRequest + : Date.now(); + config.totalTimeout = config.totalTimeout + ? config.totalTimeout + : Number.MAX_SAFE_INTEGER; + config.maxRetryDelay = config.maxRetryDelay + ? config.maxRetryDelay + : Number.MAX_SAFE_INTEGER; + // If this wasn't in the list of status codes where we want + // to automatically retry, return. + const retryRanges = [ + // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes + // 1xx - Retry (Informational, request still processing) + // 2xx - Do not retry (Success) + // 3xx - Do not retry (Redirect) + // 4xx - Do not retry (Client errors) + // 408 - Retry ("Request Timeout") + // 429 - Retry ("Too Many Requests") + // 5xx - Retry (Server errors) + [100, 199], + [408, 408], + [429, 429], + [500, 599], + ]; + config.statusCodesToRetry = config.statusCodesToRetry || retryRanges; + // Put the config back into the err + err.config.retryConfig = config; + // Determine if we should retry the request + const shouldRetryFn = config.shouldRetry || shouldRetryRequest; + if (!(await shouldRetryFn(err))) { + return { shouldRetry: false, config: err.config }; } - catch (e_11_1) { e_11 = { error: e_11_1 }; } - finally { - try { - if (sequences_1_1 && !sequences_1_1.done && (_b = sequences_1.return)) _b.call(sequences_1); - } - finally { if (e_11) throw e_11.error; } + const delay = getNextRetryDelay(config); + // We're going to retry! Incremenent the counter. + err.config.retryConfig.currentRetryAttempt += 1; + // Create a promise that invokes the retry after the backOffDelay + const backoff = config.retryBackoff + ? config.retryBackoff(err, delay) + : new Promise(resolve => { + setTimeout(resolve, delay); + }); + // Notify the user if they added an `onRetryAttempt` handler + if (config.onRetryAttempt) { + config.onRetryAttempt(err); } - /** - * 4. Return output. - */ - return output; + // Return the promise in which recalls Gaxios to retry the request + await backoff; + return { shouldRetry: true, config: err.config }; } -exports.urlEncodedParser = urlEncodedParser; /** - * Serializes `application/x-www-form-urlencoded` bytes. - * - * @param input - a byte sequence + * Determine based on config if we should retry the request. + * @param err The GaxiosError passed to the interceptor. */ -function urlEncodedByteSerializer(input) { - var e_12, _a; - /** - * 1. Let output be the empty string. - * 2. For each byte in input, depending on byte: - * 0x20 (SP) - * Append U+002B (+) to output. - * - * 0x2A (*) - * 0x2D (-) - * 0x2E (.) - * 0x30 (0) to 0x39 (9) - * 0x41 (A) to 0x5A (Z) - * 0x5F (_) - * 0x61 (a) to 0x7A (z) - * Append a code point whose value is byte to output. - * - * Otherwise - * Append byte, percent encoded, to output. - * 3. Return output. - */ - var output = ""; - try { - for (var input_3 = __values(input), input_3_1 = input_3.next(); !input_3_1.done; input_3_1 = input_3.next()) { - var byte = input_3_1.value; - if (byte === 0x20) { - output += '+'; - } - else if (byte === 0x2A || byte === 0x2D || byte === 0x2E || - (byte >= 0x30 && byte <= 0x39) || (byte >= 0x41 && byte <= 0x5A) || - byte === 0x5F || (byte >= 0x61 && byte <= 0x7A)) { - output += String.fromCodePoint(byte); - } - else { - output += percentEncode(byte); - } - } +function shouldRetryRequest(err) { + var _a; + const config = getConfig(err); + // node-fetch raises an AbortError if signaled: + // https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal + if (err.name === 'AbortError' || ((_a = err.error) === null || _a === void 0 ? void 0 : _a.name) === 'AbortError') { + return false; } - catch (e_12_1) { e_12 = { error: e_12_1 }; } - finally { - try { - if (input_3_1 && !input_3_1.done && (_a = input_3.return)) _a.call(input_3); - } - finally { if (e_12) throw e_12.error; } + // If there's no config, or retries are disabled, return. + if (!config || config.retry === 0) { + return false; } - return output; -} -exports.urlEncodedByteSerializer = urlEncodedByteSerializer; -/** - * Serializes `application/x-www-form-urlencoded` tuples. - * - * @param input - input tuple of name/value pairs - * @param encodingOverride: encoding override - */ -function urlEncodedSerializer(tuples, encodingOverride) { - var e_13, _a; - /** - * 1. Let encoding be UTF-8. - * 2. If encoding override is given, set encoding to the result of getting - * an output encoding from encoding override. - */ - var encoding = (encodingOverride === undefined || - encodingOverride === "replacement" || encodingOverride === "UTF-16BE" || - encodingOverride === "UTF-16LE" ? "UTF-8" : encodingOverride); - if (encoding.toUpperCase() !== "UTF-8") { - throw new Error("Only UTF-8 encoding is supported."); + // Check if this error has no response (ETIMEDOUT, ENOTFOUND, etc) + if (!err.response && + (config.currentRetryAttempt || 0) >= config.noResponseRetries) { + return false; } - /** - * 3. Let output be the empty string. - */ - var output = ""; - try { - /** - * 4. For each tuple in tuples: - */ - for (var tuples_1 = __values(tuples), tuples_1_1 = tuples_1.next(); !tuples_1_1.done; tuples_1_1 = tuples_1.next()) { - var tuple = tuples_1_1.value; - /** - * 4.1. Let name be the result of serializing the result of encoding - * tuple’s name, using encoding. - */ - var name = urlEncodedByteSerializer(util_1.utf8Encode(tuple[0])); - /** - * 4.2. Let value be tuple’s value. - */ - var value = tuple[1]; - /** - * TODO: - * 4.3. If value is a file, then set value to value’s filename. - */ - /** - * 4.4. Set value to the result of serializing the result of encoding - * value, using encoding. - */ - value = urlEncodedByteSerializer(util_1.utf8Encode(value)); - /** - * 4.5. If tuple is not the first pair in tuples, then append U+0026 (&) - * to output. - */ - if (output !== "") - output += '&'; - /** - * 4.6. Append name, followed by U+003D (=), followed by value, to output. - */ - output += name + '=' + value; - } + // Only retry with configured HttpMethods. + if (!err.config.method || + config.httpMethodsToRetry.indexOf(err.config.method.toUpperCase()) < 0) { + return false; } - catch (e_13_1) { e_13 = { error: e_13_1 }; } - finally { - try { - if (tuples_1_1 && !tuples_1_1.done && (_a = tuples_1.return)) _a.call(tuples_1); + // If this wasn't in the list of status codes where we want + // to automatically retry, return. + if (err.response && err.response.status) { + let isInRange = false; + for (const [min, max] of config.statusCodesToRetry) { + const status = err.response.status; + if (status >= min && status <= max) { + isInRange = true; + break; + } + } + if (!isInRange) { + return false; } - finally { if (e_13) throw e_13.error; } } - /** - * 5. Return output. - */ - return output; -} -exports.urlEncodedSerializer = urlEncodedSerializer; -/** - * Returns a URL's origin. - * - * @param url - a URL - */ -function origin(url) { - /** - * A URL’s origin is the origin returned by running these steps, switching - * on URL’s scheme: - * "blob" - * 1. If URL’s blob URL entry is non-null, then return URL’s blob URL - * entry’s environment’s origin. - * 2. Let url be the result of parsing URL’s path[0]. - * 3. Return a new opaque origin, if url is failure, and url’s origin - * otherwise. - * "ftp" - * "http" - * "https" - * "ws" - * "wss" - * Return a tuple consisting of URL’s scheme, URL’s host, URL’s port, and - * null. - * "file" - * Unfortunate as it is, is left as an exercise to the reader. When in - * doubt, return a new opaque origin. - * Otherwise - * Return a new opaque origin. - */ - switch (url.scheme) { - case "blob": - if (url._blobURLEntry !== null) { - // TODO: return URL’s blob URL entry’s environment’s origin. - } - var parsedURL = basicURLParser(url.path[0]); - if (parsedURL === null) - return interfaces_1.OpaqueOrigin; - else - return origin(parsedURL); - case "ftp": - case "http": - case "https": - case "ws": - case "wss": - return [url.scheme, url.host === null ? "" : url.host, url.port, null]; - case "file": - return interfaces_1.OpaqueOrigin; - default: - return interfaces_1.OpaqueOrigin; + // If we are out of retry attempts, return + config.currentRetryAttempt = config.currentRetryAttempt || 0; + if (config.currentRetryAttempt >= config.retry) { + return false; } + return true; } -exports.origin = origin; /** - * Converts a domain string to ASCII. - * - * @param domain - a domain string + * Acquire the raxConfig object from an GaxiosError if available. + * @param err The Gaxios error with a config object. */ -function domainToASCII(domain, beStrict) { - if (beStrict === void 0) { beStrict = false; } - /** - * 1. If beStrict is not given, set it to false. - * 2. Let result be the result of running Unicode ToASCII with domain_name - * set to domain, UseSTD3ASCIIRules set to beStrict, CheckHyphens set to - * false, CheckBidi set to true, CheckJoiners set to true, - * Transitional_Processing set to false, and VerifyDnsLength set to beStrict. - * 3. If result is a failure value, validation error, return failure. - * 4. Return result. - */ - // Use node.js function - var result = url_1.domainToASCII(domain); - if (result === "") { - validationError("Invalid domain name."); - return null; +function getConfig(err) { + if (err && err.config && err.config.retryConfig) { + return err.config.retryConfig; } - return result; + return; } -exports.domainToASCII = domainToASCII; /** - * Converts a domain string to Unicode. + * Gets the delay to wait before the next retry. * - * @param domain - a domain string + * @param {RetryConfig} config The current set of retry options + * @returns {number} the amount of ms to wait before the next retry attempt. */ -function domainToUnicode(domain, beStrict) { - if (beStrict === void 0) { beStrict = false; } - /** - * 1. Let result be the result of running Unicode ToUnicode with domain_name - * set to domain, CheckHyphens set to false, CheckBidi set to true, - * CheckJoiners set to true, UseSTD3ASCIIRules set to false, and - * Transitional_Processing set to false. - * 2. Signify validation errors for any returned errors, and then, - * return result. - */ - // Use node.js function - var result = url_1.domainToUnicode(domain); - if (result === "") { - validationError("Invalid domain name."); - } - return result; +function getNextRetryDelay(config) { + var _a; + // Calculate time to wait with exponential backoff. + // If this is the first retry, look for a configured retryDelay. + const retryDelay = config.currentRetryAttempt ? 0 : (_a = config.retryDelay) !== null && _a !== void 0 ? _a : 100; + // Formula: retryDelay + ((retryDelayMultiplier^currentRetryAttempt - 1 / 2) * 1000) + const calculatedDelay = retryDelay + + ((Math.pow(config.retryDelayMultiplier, config.currentRetryAttempt) - 1) / + 2) * + 1000; + const maxAllowableDelay = config.totalTimeout - (Date.now() - config.timeOfFirstRequest); + return Math.min(calculatedDelay, maxAllowableDelay, config.maxRetryDelay); } -exports.domainToUnicode = domainToUnicode; +//# sourceMappingURL=retry.js.map + +/***/ }), + +/***/ 21980: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2023 Google LLC +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pkg = void 0; +exports.pkg = __nccwpck_require__(6318); +//# sourceMappingURL=util.js.map + +/***/ }), + +/***/ 19694: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); + +var _v = _interopRequireDefault(__nccwpck_require__(94625)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(93951)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(52507)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(18457)); + +var _nil = _interopRequireDefault(__nccwpck_require__(27298)); + +var _version = _interopRequireDefault(__nccwpck_require__(40278)); + +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(52956)); + +var _parse = _interopRequireDefault(__nccwpck_require__(55558)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +/***/ 12484: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +/***/ 53513: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _default = { + randomUUID: _crypto.default.randomUUID +}; +exports["default"] = _default; + +/***/ }), + +/***/ 27298: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 55558: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 23894: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +/***/ 27440: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} + +/***/ }), + +/***/ 45682: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +/***/ 52956: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +exports.unsafeStringify = unsafeStringify; + +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + /** - * Serializes an origin. - * function is from the HTML spec: - * https://html.spec.whatwg.org/#ascii-serialisation-of-an-origin - * - * @param origin - an origin + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ -function asciiSerializationOfAnOrigin(origin) { - /** - * 1. If origin is an opaque origin, then return "null". - * 2. Otherwise, let result be origin's scheme. - * 3. Append "://" to result. - * 4. Append origin's host, serialized, to result. - * 5. If origin's port is non-null, append a U+003A COLON character (:), - * and origin's port, serialized, to result. - * 6. Return result. - */ - if (origin[0] === "" && origin[1] === "" && origin[2] === null && origin[3] === null) { - return "null"; +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} + +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} + +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 94625: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(27440)); + +var _stringify = __nccwpck_require__(52956); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } - var result = origin[0] + "://" + hostSerializer(origin[1]); - if (origin[2] !== null) - result += ":" + origin[2].toString(); - return result; + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.unsafeStringify)(b); } -exports.asciiSerializationOfAnOrigin = asciiSerializationOfAnOrigin; -//# sourceMappingURL=URLAlgorithm.js.map + +var _default = v1; +exports["default"] = _default; /***/ }), -/***/ 31752: -/***/ ((__unused_webpack_module, exports) => { +/***/ 93951: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents the state of the URL parser. - */ -var ParserState; -(function (ParserState) { - ParserState[ParserState["SchemeStart"] = 0] = "SchemeStart"; - ParserState[ParserState["Scheme"] = 1] = "Scheme"; - ParserState[ParserState["NoScheme"] = 2] = "NoScheme"; - ParserState[ParserState["SpecialRelativeOrAuthority"] = 3] = "SpecialRelativeOrAuthority"; - ParserState[ParserState["PathOrAuthority"] = 4] = "PathOrAuthority"; - ParserState[ParserState["Relative"] = 5] = "Relative"; - ParserState[ParserState["RelativeSlash"] = 6] = "RelativeSlash"; - ParserState[ParserState["SpecialAuthoritySlashes"] = 7] = "SpecialAuthoritySlashes"; - ParserState[ParserState["SpecialAuthorityIgnoreSlashes"] = 8] = "SpecialAuthorityIgnoreSlashes"; - ParserState[ParserState["Authority"] = 9] = "Authority"; - ParserState[ParserState["Host"] = 10] = "Host"; - ParserState[ParserState["Hostname"] = 11] = "Hostname"; - ParserState[ParserState["Port"] = 12] = "Port"; - ParserState[ParserState["File"] = 13] = "File"; - ParserState[ParserState["FileSlash"] = 14] = "FileSlash"; - ParserState[ParserState["FileHost"] = 15] = "FileHost"; - ParserState[ParserState["PathStart"] = 16] = "PathStart"; - ParserState[ParserState["Path"] = 17] = "Path"; - ParserState[ParserState["CannotBeABaseURLPath"] = 18] = "CannotBeABaseURLPath"; - ParserState[ParserState["Query"] = 19] = "Query"; - ParserState[ParserState["Fragment"] = 20] = "Fragment"; -})(ParserState = exports.ParserState || (exports.ParserState = {})); -exports.OpaqueOrigin = ["", "", null, null]; -//# sourceMappingURL=interfaces.js.map + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(64313)); + +var _md = _interopRequireDefault(__nccwpck_require__(12484)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; /***/ }), -/***/ 27561: -/***/ ((__unused_webpack_module, exports) => { +/***/ 64313: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents a cache for storing order between equal objects. - * - * This cache is used when an algorithm compares two objects and finds them to - * be equal but still needs to establish an order between those two objects. - * When two such objects `a` and `b` are passed to the `check` method, a random - * number is generated with `Math.random()`. If the random number is less than - * `0.5` it is assumed that `a < b` otherwise `a > b`. The random number along - * with `a` and `b` is stored in the cache, so that subsequent checks result - * in the same consistent result. - * - * The cache has a size limit which is defined on initialization. - */ -var CompareCache = /** @class */ (function () { - /** - * Initializes a new instance of `CompareCache`. - * - * @param limit - maximum number of items to keep in the cache. When the limit - * is exceeded the first item is removed from the cache. - */ - function CompareCache(limit) { - if (limit === void 0) { limit = 1000; } - this._items = new Map(); - this._limit = limit; + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.URL = exports.DNS = void 0; +exports["default"] = v35; + +var _stringify = __nccwpck_require__(52956); + +var _parse = _interopRequireDefault(__nccwpck_require__(55558)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + + if (typeof value === 'string') { + value = stringToBytes(value); } - /** - * Compares and caches the given objects. Returns `true` if `objA < objB` and - * `false` otherwise. - * - * @param objA - an item to compare - * @param objB - an item to compare - */ - CompareCache.prototype.check = function (objA, objB) { - if (this._items.get(objA) === objB) - return true; - else if (this._items.get(objB) === objA) - return false; - var result = (Math.random() < 0.5); - if (result) { - this._items.set(objA, objB); - } - else { - this._items.set(objB, objA); - } - if (this._items.size > this._limit) { - var it_1 = this._items.keys().next(); - /* istanbul ignore else */ - if (!it_1.done) { - this._items.delete(it_1.value); - } - } - return result; - }; - return CompareCache; -}()); -exports.CompareCache = CompareCache; -//# sourceMappingURL=CompareCache.js.map + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} /***/ }), -/***/ 16006: -/***/ (function(__unused_webpack_module, exports) { +/***/ 52507: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents a set of objects with a size limit. - */ -var FixedSizeSet = /** @class */ (function () { - /** - * Initializes a new instance of `FixedSizeSet`. - * - * @param limit - maximum number of items to keep in the set. When the limit - * is exceeded the first item is removed from the set. - */ - function FixedSizeSet(limit) { - if (limit === void 0) { limit = 1000; } - this._items = new Set(); - this._limit = limit; + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _native = _interopRequireDefault(__nccwpck_require__(53513)); + +var _rng = _interopRequireDefault(__nccwpck_require__(27440)); + +var _stringify = __nccwpck_require__(52956); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); + } + + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } - /** - * Adds a new item to the set. - * - * @param item - an item - */ - FixedSizeSet.prototype.add = function (item) { - this._items.add(item); - if (this._items.size > this._limit) { - var it_1 = this._items.values().next(); - /* istanbul ignore else */ - if (!it_1.done) { - this._items.delete(it_1.value); - } - } - return this; - }; - /** - * Removes an item from the set. - * - * @param item - an item - */ - FixedSizeSet.prototype.delete = function (item) { - return this._items.delete(item); - }; - /** - * Determines if an item is in the set. - * - * @param item - an item - */ - FixedSizeSet.prototype.has = function (item) { - return this._items.has(item); - }; - /** - * Removes all items from the set. - */ - FixedSizeSet.prototype.clear = function () { - this._items.clear(); - }; - Object.defineProperty(FixedSizeSet.prototype, "size", { - /** - * Gets the number of items in the set. - */ - get: function () { return this._items.size; }, - enumerable: true, - configurable: true - }); - /** - * Applies the given callback function to all elements of the set. - */ - FixedSizeSet.prototype.forEach = function (callback, thisArg) { - var _this = this; - this._items.forEach(function (e) { return callback.call(thisArg, e, e, _this); }); - }; - /** - * Iterates through the items in the set. - */ - FixedSizeSet.prototype.keys = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items.keys())]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - /** - * Iterates through the items in the set. - */ - FixedSizeSet.prototype.values = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items.values())]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - /** - * Iterates through the items in the set. - */ - FixedSizeSet.prototype.entries = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items.entries())]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - /** - * Iterates through the items in the set. - */ - FixedSizeSet.prototype[Symbol.iterator] = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - Object.defineProperty(FixedSizeSet.prototype, Symbol.toStringTag, { - /** - * Returns the string tag of the set. - */ - get: function () { - return "FixedSizeSet"; - }, - enumerable: true, - configurable: true - }); - return FixedSizeSet; -}()); -exports.FixedSizeSet = FixedSizeSet; -//# sourceMappingURL=FixedSizeSet.js.map + + return buf; + } + + return (0, _stringify.unsafeStringify)(rnds); +} + +var _default = v4; +exports["default"] = _default; /***/ }), -/***/ 11857: -/***/ ((__unused_webpack_module, exports) => { +/***/ 18457: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents an object with lazy initialization. - */ -var Lazy = /** @class */ (function () { - /** - * Initializes a new instance of `Lazy`. - * - * @param initFunc - initializer function - */ - function Lazy(initFunc) { - this._initialized = false; - this._value = undefined; - this._initFunc = initFunc; - } - Object.defineProperty(Lazy.prototype, "value", { - /** - * Gets the value of the object. - */ - get: function () { - if (!this._initialized) { - this._value = this._initFunc(); - this._initialized = true; - } - return this._value; - }, - enumerable: true, - configurable: true - }); - return Lazy; -}()); -exports.Lazy = Lazy; -//# sourceMappingURL=Lazy.js.map + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(64313)); + +var _sha = _interopRequireDefault(__nccwpck_require__(45682)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; /***/ }), -/***/ 25798: -/***/ (function(__unused_webpack_module, exports) { +/***/ 75559: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Represents a cache of objects with a size limit. - */ -var ObjectCache = /** @class */ (function () { - /** - * Initializes a new instance of `ObjectCache`. - * - * @param limit - maximum number of items to keep in the cache. When the limit - * is exceeded the first item is removed from the cache. - */ - function ObjectCache(limit) { - if (limit === void 0) { limit = 1000; } - this._items = new Map(); - this._limit = limit; - } - /** - * Gets an item from the cache. - * - * @param key - object key - */ - ObjectCache.prototype.get = function (key) { - return this._items.get(key); - }; - /** - * Adds a new item to the cache. - * - * @param key - object key - * @param value - object value - */ - ObjectCache.prototype.set = function (key, value) { - this._items.set(key, value); - if (this._items.size > this._limit) { - var it_1 = this._items.keys().next(); - /* istanbul ignore else */ - if (!it_1.done) { - this._items.delete(it_1.value); - } - } - }; - /** - * Removes an item from the cache. - * - * @param item - an item - */ - ObjectCache.prototype.delete = function (key) { - return this._items.delete(key); - }; - /** - * Determines if an item is in the cache. - * - * @param item - an item - */ - ObjectCache.prototype.has = function (key) { - return this._items.has(key); - }; - /** - * Removes all items from the cache. - */ - ObjectCache.prototype.clear = function () { - this._items.clear(); - }; - Object.defineProperty(ObjectCache.prototype, "size", { - /** - * Gets the number of items in the cache. - */ - get: function () { return this._items.size; }, - enumerable: true, - configurable: true - }); - /** - * Applies the given callback function to all elements of the cache. - */ - ObjectCache.prototype.forEach = function (callback, thisArg) { - this._items.forEach(function (v, k) { return callback.call(thisArg, k, v); }); - }; - /** - * Iterates through the items in the set. - */ - ObjectCache.prototype.keys = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items.keys())]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - /** - * Iterates through the items in the set. - */ - ObjectCache.prototype.values = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items.values())]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - /** - * Iterates through the items in the set. - */ - ObjectCache.prototype.entries = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items.entries())]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - /** - * Iterates through the items in the set. - */ - ObjectCache.prototype[Symbol.iterator] = function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [5 /*yield**/, __values(this._items)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }; - Object.defineProperty(ObjectCache.prototype, Symbol.toStringTag, { - /** - * Returns the string tag of the cache. - */ - get: function () { - return "ObjectCache"; - }, - enumerable: true, - configurable: true - }); - return ObjectCache; -}()); -exports.ObjectCache = ObjectCache; -//# sourceMappingURL=ObjectCache.js.map + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _regex = _interopRequireDefault(__nccwpck_require__(23894)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; /***/ }), -/***/ 34145: -/***/ ((__unused_webpack_module, exports) => { +/***/ 40278: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Walks through the code points of a string. - */ -var StringWalker = /** @class */ (function () { - /** - * Initializes a new `StringWalker`. - * - * @param input - input string - */ - function StringWalker(input) { - this._pointer = 0; - this._chars = Array.from(input); - this._length = this._chars.length; - } - Object.defineProperty(StringWalker.prototype, "eof", { - /** - * Determines if the current position is beyond the end of string. - */ - get: function () { return this._pointer >= this._length; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(StringWalker.prototype, "length", { - /** - * Returns the number of code points in the input string. - */ - get: function () { return this._length; }, - enumerable: true, - configurable: true - }); - /** - * Returns the current code point. Returns `-1` if the position is beyond - * the end of string. - */ - StringWalker.prototype.codePoint = function () { - if (this._codePoint === undefined) { - if (this.eof) { - this._codePoint = -1; - } - else { - var cp = this._chars[this._pointer].codePointAt(0); - /* istanbul ignore else */ - if (cp !== undefined) { - this._codePoint = cp; - } - else { - this._codePoint = -1; - } - } - } - return this._codePoint; - }; - /** - * Returns the current character. Returns an empty string if the position is - * beyond the end of string. - */ - StringWalker.prototype.c = function () { - if (this._c === undefined) { - this._c = (this.eof ? "" : this._chars[this._pointer]); - } - return this._c; - }; - /** - * Returns the remaining string. - */ - StringWalker.prototype.remaining = function () { - if (this._remaining === undefined) { - this._remaining = (this.eof ? - "" : this._chars.slice(this._pointer + 1).join('')); - } - return this._remaining; - }; - /** - * Returns the substring from the current character to the end of string. - */ - StringWalker.prototype.substring = function () { - if (this._substring === undefined) { - this._substring = (this.eof ? - "" : this._chars.slice(this._pointer).join('')); - } - return this._substring; - }; - Object.defineProperty(StringWalker.prototype, "pointer", { - /** - * Gets or sets the current position. - */ - get: function () { return this._pointer; }, - set: function (val) { - if (val === this._pointer) - return; - this._pointer = val; - this._codePoint = undefined; - this._c = undefined; - this._remaining = undefined; - this._substring = undefined; - }, - enumerable: true, - configurable: true - }); - return StringWalker; -}()); -exports.StringWalker = StringWalker; -//# sourceMappingURL=StringWalker.js.map + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(75559)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.slice(14, 15), 16); +} + +var _default = version; +exports["default"] = _default; /***/ }), -/***/ 76195: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 51904: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; +/** + * Copyright 2022 Google LLC + * + * 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. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -var FixedSizeSet_1 = __nccwpck_require__(16006); -exports.FixedSizeSet = FixedSizeSet_1.FixedSizeSet; -var ObjectCache_1 = __nccwpck_require__(25798); -exports.ObjectCache = ObjectCache_1.ObjectCache; -var CompareCache_1 = __nccwpck_require__(27561); -exports.CompareCache = CompareCache_1.CompareCache; -var Lazy_1 = __nccwpck_require__(11857); -exports.Lazy = Lazy_1.Lazy; -var StringWalker_1 = __nccwpck_require__(34145); -exports.StringWalker = StringWalker_1.StringWalker; +exports.GCE_LINUX_BIOS_PATHS = void 0; +exports.isGoogleCloudServerless = isGoogleCloudServerless; +exports.isGoogleComputeEngineLinux = isGoogleComputeEngineLinux; +exports.isGoogleComputeEngineMACAddress = isGoogleComputeEngineMACAddress; +exports.isGoogleComputeEngine = isGoogleComputeEngine; +exports.detectGCPResidency = detectGCPResidency; +const fs_1 = __nccwpck_require__(57147); +const os_1 = __nccwpck_require__(22037); /** - * Applies the mixin to a given class. + * Known paths unique to Google Compute Engine Linux instances + */ +exports.GCE_LINUX_BIOS_PATHS = { + BIOS_DATE: '/sys/class/dmi/id/bios_date', + BIOS_VENDOR: '/sys/class/dmi/id/bios_vendor', +}; +const GCE_MAC_ADDRESS_REGEX = /^42:01/; +/** + * Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance). * - * @param baseClass - class to receive the mixin - * @param mixinClass - mixin class - * @param overrides - an array with names of function overrides. Base class - * functions whose names are in this array will be kept by prepending an - * underscore to their names. + * Uses the: + * - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}. + * + * @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise. */ -function applyMixin(baseClass, mixinClass) { - var overrides = []; - for (var _i = 2; _i < arguments.length; _i++) { - overrides[_i - 2] = arguments[_i]; +function isGoogleCloudServerless() { + /** + * `CLOUD_RUN_JOB` is used for Cloud Run Jobs + * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * + * `FUNCTION_NAME` is used in older Cloud Functions environments: + * - See {@link https://cloud.google.com/functions/docs/env-var Python 3.7 and Go 1.11}. + * + * `K_SERVICE` is used in Cloud Run and newer Cloud Functions environments: + * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. + * - See {@link https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}. + */ + const isGFEnvironment = process.env.CLOUD_RUN_JOB || + process.env.FUNCTION_NAME || + process.env.K_SERVICE; + return !!isGFEnvironment; +} +/** + * Determines if the process is running on a Linux Google Compute Engine instance. + * + * @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise. + */ +function isGoogleComputeEngineLinux() { + if ((0, os_1.platform)() !== 'linux') + return false; + try { + // ensure this file exist + (0, fs_1.statSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_DATE); + // ensure this file exist and matches + const biosVendor = (0, fs_1.readFileSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, 'utf8'); + return /Google/.test(biosVendor); } - Object.getOwnPropertyNames(mixinClass.prototype).forEach(function (name) { - if (name !== "constructor") { - if (overrides.indexOf(name) !== -1) { - var orgPropDesc = Object.getOwnPropertyDescriptor(baseClass.prototype, name); - /* istanbul ignore else */ - if (orgPropDesc) { - Object.defineProperty(baseClass.prototype, "_" + name, orgPropDesc); - } - } - var propDesc = Object.getOwnPropertyDescriptor(mixinClass.prototype, name); - /* istanbul ignore else */ - if (propDesc) { - Object.defineProperty(baseClass.prototype, name, propDesc); + catch (_a) { + return false; + } +} +/** + * Determines if the process is running on a Google Compute Engine instance with a known + * MAC address. + * + * @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise. + */ +function isGoogleComputeEngineMACAddress() { + const interfaces = (0, os_1.networkInterfaces)(); + for (const item of Object.values(interfaces)) { + if (!item) + continue; + for (const { mac } of item) { + if (GCE_MAC_ADDRESS_REGEX.test(mac)) { + return true; } } - }); + } + return false; } -exports.applyMixin = applyMixin; /** - * Applies default values to the given object. + * Determines if the process is running on a Google Compute Engine instance. * - * @param obj - an object - * @param defaults - an object with default values - * @param overwrite - if set to `true` defaults object always overwrites object - * values, whether they are `undefined` or not. + * @returns {boolean} `true` if the process is running on GCE, `false` otherwise. */ -function applyDefaults(obj, defaults, overwrite) { - if (overwrite === void 0) { overwrite = false; } - var result = clone(obj || {}); - forEachObject(defaults, function (key, val) { - if (isPlainObject(val)) { - result[key] = applyDefaults(result[key], val, overwrite); - } - else if (overwrite || result[key] === undefined) { - result[key] = val; - } - }); - return result; +function isGoogleComputeEngine() { + return isGoogleComputeEngineLinux() || isGoogleComputeEngineMACAddress(); } -exports.applyDefaults = applyDefaults; /** - * Iterates over items of an array or set. + * Determines if the process is running on Google Cloud Platform. * - * @param arr - array or set to iterate - * @param callback - a callback function which receives each array item as its - * single argument - * @param thisArg - the value of this inside callback + * @returns {boolean} `true` if the process is running on GCP, `false` otherwise. */ -function forEachArray(arr, callback, thisArg) { - arr.forEach(callback, thisArg); +function detectGCPResidency() { + return isGoogleCloudServerless() || isGoogleComputeEngine(); } -exports.forEachArray = forEachArray; +//# sourceMappingURL=gcp-residency.js.map + +/***/ }), + +/***/ 3563: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + /** - * Iterates over key/value pairs of a map or object. + * Copyright 2018 Google LLC * - * @param obj - map or object to iterate - * @param callback - a callback function which receives object key as its first - * argument and object value as its second argument - * @param thisArg - the value of this inside callback + * 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. */ -function forEachObject(obj, callback, thisArg) { - if (isMap(obj)) { - obj.forEach(function (value, key) { return callback.call(thisArg, key, value); }); - } - else { - for (var key in obj) { - /* istanbul ignore else */ - if (obj.hasOwnProperty(key)) { - callback.call(thisArg, key, obj[key]); - } - } +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } -} -exports.forEachObject = forEachObject; + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.gcpResidencyCache = exports.METADATA_SERVER_DETECTION = exports.HEADERS = exports.HEADER_VALUE = exports.HEADER_NAME = exports.SECONDARY_HOST_ADDRESS = exports.HOST_ADDRESS = exports.BASE_PATH = void 0; +exports.instance = instance; +exports.project = project; +exports.universe = universe; +exports.bulk = bulk; +exports.isAvailable = isAvailable; +exports.resetIsAvailableCache = resetIsAvailableCache; +exports.getGCPResidency = getGCPResidency; +exports.setGCPResidency = setGCPResidency; +exports.requestTimeout = requestTimeout; +const gaxios_1 = __nccwpck_require__(59555); +const jsonBigint = __nccwpck_require__(55031); +const gcp_residency_1 = __nccwpck_require__(51904); +const logger = __nccwpck_require__(97306); +exports.BASE_PATH = '/computeMetadata/v1'; +exports.HOST_ADDRESS = 'http://169.254.169.254'; +exports.SECONDARY_HOST_ADDRESS = 'http://metadata.google.internal.'; +exports.HEADER_NAME = 'Metadata-Flavor'; +exports.HEADER_VALUE = 'Google'; +exports.HEADERS = Object.freeze({ [exports.HEADER_NAME]: exports.HEADER_VALUE }); +const log = logger.log('gcp metadata'); /** - * Returns the number of entries in an array or set. + * Metadata server detection override options. * - * @param arr - array or set + * Available via `process.env.METADATA_SERVER_DETECTION`. */ -function arrayLength(obj) { - if (isSet(obj)) { - return obj.size; - } - else { - return obj.length; - } -} -exports.arrayLength = arrayLength; +exports.METADATA_SERVER_DETECTION = Object.freeze({ + 'assume-present': "don't try to ping the metadata server, but assume it's present", + none: "don't try to ping the metadata server, but don't try to use it either", + 'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)", + 'ping-only': 'skip the BIOS probe, and go straight to pinging', +}); /** - * Returns the number of entries in a map or object. + * Returns the base URL while taking into account the GCE_METADATA_HOST + * environment variable if it exists. * - * @param obj - map or object + * @returns The base URL, e.g., http://169.254.169.254/computeMetadata/v1. */ -function objectLength(obj) { - if (isMap(obj)) { - return obj.size; +function getBaseUrl(baseUrl) { + if (!baseUrl) { + baseUrl = + process.env.GCE_METADATA_IP || + process.env.GCE_METADATA_HOST || + exports.HOST_ADDRESS; } - else { - return Object.keys(obj).length; + // If no scheme is provided default to HTTP: + if (!/^https?:\/\//.test(baseUrl)) { + baseUrl = `http://${baseUrl}`; } + return new URL(exports.BASE_PATH, baseUrl).href; } -exports.objectLength = objectLength; -/** - * Gets the value of a key from a map or object. - * - * @param obj - map or object - * @param key - the key to retrieve - */ -function getObjectValue(obj, key) { - if (isMap(obj)) { - return obj.get(key); +// Accepts an options object passed from the user to the API. In previous +// versions of the API, it referred to a `Request` or an `Axios` request +// options object. Now it refers to an object with very limited property +// names. This is here to help ensure users don't pass invalid options when +// they upgrade from 0.4 to 0.5 to 0.8. +function validate(options) { + Object.keys(options).forEach(key => { + switch (key) { + case 'params': + case 'property': + case 'headers': + break; + case 'qs': + throw new Error("'qs' is not a valid configuration option. Please use 'params' instead."); + default: + throw new Error(`'${key}' is not a valid configuration option.`); + } + }); +} +async function metadataAccessor(type, options = {}, noResponseRetries = 3, fastFail = false) { + let metadataKey = ''; + let params = {}; + let headers = {}; + if (typeof type === 'object') { + const metadataAccessor = type; + metadataKey = metadataAccessor.metadataKey; + params = metadataAccessor.params || params; + headers = metadataAccessor.headers || headers; + noResponseRetries = metadataAccessor.noResponseRetries || noResponseRetries; + fastFail = metadataAccessor.fastFail || fastFail; } else { - return obj[key]; + metadataKey = type; } -} -exports.getObjectValue = getObjectValue; -/** - * Removes a property from a map or object. - * - * @param obj - map or object - * @param key - the key to remove - */ -function removeObjectValue(obj, key) { - if (isMap(obj)) { - obj.delete(key); + if (typeof options === 'string') { + metadataKey += `/${options}`; } else { - delete obj[key]; + validate(options); + if (options.property) { + metadataKey += `/${options.property}`; + } + headers = options.headers || headers; + params = options.params || params; } -} -exports.removeObjectValue = removeObjectValue; -/** - * Deep clones the given object. - * - * @param obj - an object - */ -function clone(obj) { - var e_1, _a; - if (isFunction(obj)) { - return obj; + const requestMethod = fastFail ? fastFailMetadataRequest : gaxios_1.request; + const req = { + url: `${getBaseUrl()}/${metadataKey}`, + headers: { ...exports.HEADERS, ...headers }, + retryConfig: { noResponseRetries }, + params, + responseType: 'text', + timeout: requestTimeout(), + }; + log.info('instance request %j', req); + const res = await requestMethod(req); + log.info('instance metadata is %s', res.data); + // NOTE: node.js converts all incoming headers to lower case. + if (res.headers[exports.HEADER_NAME.toLowerCase()] !== exports.HEADER_VALUE) { + throw new Error(`Invalid response from metadata service: incorrect ${exports.HEADER_NAME} header. Expected '${exports.HEADER_VALUE}', got ${res.headers[exports.HEADER_NAME.toLowerCase()] ? `'${res.headers[exports.HEADER_NAME.toLowerCase()]}'` : 'no header'}`); } - else if (isArray(obj)) { - var result = []; + if (typeof res.data === 'string') { try { - for (var obj_1 = __values(obj), obj_1_1 = obj_1.next(); !obj_1_1.done; obj_1_1 = obj_1.next()) { - var item = obj_1_1.value; - result.push(clone(item)); - } + return jsonBigint.parse(res.data); } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (obj_1_1 && !obj_1_1.done && (_a = obj_1.return)) _a.call(obj_1); - } - finally { if (e_1) throw e_1.error; } + catch (_a) { + /* ignore */ } - return result; } - else if (isObject(obj)) { - var result = {}; - for (var key in obj) { - /* istanbul ignore next */ - if (obj.hasOwnProperty(key)) { - var val = obj[key]; - result[key] = clone(val); - } + return res.data; +} +async function fastFailMetadataRequest(options) { + var _a; + const secondaryOptions = { + ...options, + url: (_a = options.url) === null || _a === void 0 ? void 0 : _a.toString().replace(getBaseUrl(), getBaseUrl(exports.SECONDARY_HOST_ADDRESS)), + }; + // We race a connection between DNS/IP to metadata server. There are a couple + // reasons for this: + // + // 1. the DNS is slow in some GCP environments; by checking both, we might + // detect the runtime environment signficantly faster. + // 2. we can't just check the IP, which is tarpitted and slow to respond + // on a user's local machine. + // + // Additional logic has been added to make sure that we don't create an + // unhandled rejection in scenarios where a failure happens sometime + // after a success. + // + // Note, however, if a failure happens prior to a success, a rejection should + // occur, this is for folks running locally. + // + let responded = false; + const r1 = (0, gaxios_1.request)(options) + .then(res => { + responded = true; + return res; + }) + .catch(err => { + if (responded) { + return r2; } - return result; - } - else { - return obj; - } + else { + responded = true; + throw err; + } + }); + const r2 = (0, gaxios_1.request)(secondaryOptions) + .then(res => { + responded = true; + return res; + }) + .catch(err => { + if (responded) { + return r1; + } + else { + responded = true; + throw err; + } + }); + return Promise.race([r1, r2]); } -exports.clone = clone; /** - * Type guard for boolean types + * Obtain metadata for the current GCE instance. * - * @param x - a variable to type check - */ -function isBoolean(x) { - return typeof x === "boolean"; -} -exports.isBoolean = isBoolean; -/** - * Type guard for numeric types + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} * - * @param x - a variable to type check + * @example + * ``` + * const serviceAccount: {} = await instance('service-accounts/'); + * const serviceAccountEmail: string = await instance('service-accounts/default/email'); + * ``` */ -function isNumber(x) { - return typeof x === "number"; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function instance(options) { + return metadataAccessor('instance', options); } -exports.isNumber = isNumber; /** - * Type guard for strings + * Obtain metadata for the current GCP project. * - * @param x - a variable to type check - */ -function isString(x) { - return typeof x === "string"; -} -exports.isString = isString; -/** - * Type guard for function objects + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} * - * @param x - a variable to type check + * @example + * ``` + * const projectId: string = await project('project-id'); + * const numericProjectId: number = await project('numeric-project-id'); + * ``` */ -function isFunction(x) { - return !!x && Object.prototype.toString.call(x) === '[object Function]'; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function project(options) { + return metadataAccessor('project', options); } -exports.isFunction = isFunction; /** - * Type guard for JS objects + * Obtain metadata for the current universe. * - * _Note:_ Functions are objects too + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} * - * @param x - a variable to type check + * @example + * ``` + * const universeDomain: string = await universe('universe-domain'); + * ``` */ -function isObject(x) { - var type = typeof x; - return !!x && (type === 'function' || type === 'object'); +function universe(options) { + return metadataAccessor('universe', options); } -exports.isObject = isObject; /** - * Type guard for arrays + * Retrieve metadata items in parallel. * - * @param x - a variable to type check - */ -function isArray(x) { - return Array.isArray(x); -} -exports.isArray = isArray; -/** - * Type guard for sets. + * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} * - * @param x - a variable to check + * @example + * ``` + * const data = await bulk([ + * { + * metadataKey: 'instance', + * }, + * { + * metadataKey: 'project/project-id', + * }, + * ] as const); + * + * // data.instance; + * // data['project/project-id']; + * ``` + * + * @param properties The metadata properties to retrieve + * @returns The metadata in `metadatakey:value` format */ -function isSet(x) { - return x instanceof Set; +async function bulk(properties) { + const r = {}; + await Promise.all(properties.map(item => { + return (async () => { + const res = await metadataAccessor(item); + const key = item.metadataKey; + r[key] = res; + })(); + })); + return r; } -exports.isSet = isSet; -/** - * Type guard for maps. - * - * @param x - a variable to check +/* + * How many times should we retry detecting GCP environment. */ -function isMap(x) { - return x instanceof Map; +function detectGCPAvailableRetries() { + return process.env.DETECT_GCP_RETRIES + ? Number(process.env.DETECT_GCP_RETRIES) + : 0; } -exports.isMap = isMap; +let cachedIsAvailableResponse; /** - * Determines if `x` is an empty Array or an Object with no own properties. - * - * @param x - a variable to check + * Determine if the metadata server is currently available. */ -function isEmpty(x) { - if (isArray(x)) { - return !x.length; - } - else if (isSet(x)) { - return !x.size; +async function isAvailable() { + if (process.env.METADATA_SERVER_DETECTION) { + const value = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase(); + if (!(value in exports.METADATA_SERVER_DETECTION)) { + throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${value}\`, but it should be \`${Object.keys(exports.METADATA_SERVER_DETECTION).join('`, `')}\`, or unset`); + } + switch (value) { + case 'assume-present': + return true; + case 'none': + return false; + case 'bios-only': + return getGCPResidency(); + case 'ping-only': + // continue, we want to ping the server + } } - else if (isMap(x)) { - return !x.size; + try { + // If a user is instantiating several GCP libraries at the same time, + // this may result in multiple calls to isAvailable(), to detect the + // runtime environment. We use the same promise for each of these calls + // to reduce the network load. + if (cachedIsAvailableResponse === undefined) { + cachedIsAvailableResponse = metadataAccessor('instance', undefined, detectGCPAvailableRetries(), + // If the default HOST_ADDRESS has been overridden, we should not + // make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in + // a non-GCP environment): + !(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST)); + } + await cachedIsAvailableResponse; + return true; } - else if (isObject(x)) { - for (var key in x) { - if (x.hasOwnProperty(key)) { - return false; + catch (e) { + const err = e; + if (process.env.DEBUG_AUTH) { + console.info(err); + } + if (err.type === 'request-timeout') { + // If running in a GCP environment, metadata endpoint should return + // within ms. + return false; + } + if (err.response && err.response.status === 404) { + return false; + } + else { + if (!(err.response && err.response.status === 404) && + // A warning is emitted if we see an unexpected err.code, or err.code + // is not populated: + (!err.code || + ![ + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'ENETUNREACH', + 'ENOENT', + 'ENOTFOUND', + 'ECONNREFUSED', + ].includes(err.code))) { + let code = 'UNKNOWN'; + if (err.code) + code = err.code; + process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning'); } + // Failure to resolve the metadata service means that it is not available. + return false; } - return true; } - return false; } -exports.isEmpty = isEmpty; /** - * Determines if `x` is a plain Object. - * - * @param x - a variable to check + * reset the memoized isAvailable() lookup. */ -function isPlainObject(x) { - if (isObject(x)) { - var proto = Object.getPrototypeOf(x); - var ctor = proto.constructor; - return proto && ctor && - (typeof ctor === 'function') && (ctor instanceof ctor) && - (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); - } - return false; +function resetIsAvailableCache() { + cachedIsAvailableResponse = undefined; } -exports.isPlainObject = isPlainObject; /** - * Determines if `x` is an iterable Object. - * - * @param x - a variable to check + * A cache for the detected GCP Residency. */ -function isIterable(x) { - return x && (typeof x[Symbol.iterator] === 'function'); -} -exports.isIterable = isIterable; +exports.gcpResidencyCache = null; /** - * Gets the primitive value of an object. + * Detects GCP Residency. + * Caches results to reduce costs for subsequent calls. + * + * @see setGCPResidency for setting */ -function getValue(obj) { - if (isFunction(obj.valueOf)) { - return obj.valueOf(); - } - else { - return obj; +function getGCPResidency() { + if (exports.gcpResidencyCache === null) { + setGCPResidency(); } + return exports.gcpResidencyCache; } -exports.getValue = getValue; /** - * UTF-8 encodes the given string. + * Sets the detected GCP Residency. + * Useful for forcing metadata server detection behavior. * - * @param input - a string + * Set `null` to autodetect the environment (default behavior). + * @see getGCPResidency for getting */ -function utf8Encode(input) { - var bytes = new Uint8Array(input.length * 4); - var byteIndex = 0; - for (var i = 0; i < input.length; i++) { - var char = input.charCodeAt(i); - if (char < 128) { - bytes[byteIndex++] = char; - continue; - } - else if (char < 2048) { - bytes[byteIndex++] = char >> 6 | 192; - } - else { - if (char > 0xd7ff && char < 0xdc00) { - if (++i >= input.length) { - throw new Error("Incomplete surrogate pair."); - } - var c2 = input.charCodeAt(i); - if (c2 < 0xdc00 || c2 > 0xdfff) { - throw new Error("Invalid surrogate character."); - } - char = 0x10000 + ((char & 0x03ff) << 10) + (c2 & 0x03ff); - bytes[byteIndex++] = char >> 18 | 240; - bytes[byteIndex++] = char >> 12 & 63 | 128; - } - else { - bytes[byteIndex++] = char >> 12 | 224; - } - bytes[byteIndex++] = char >> 6 & 63 | 128; - } - bytes[byteIndex++] = char & 63 | 128; - } - return bytes.subarray(0, byteIndex); +function setGCPResidency(value = null) { + exports.gcpResidencyCache = value !== null ? value : (0, gcp_residency_1.detectGCPResidency)(); } -exports.utf8Encode = utf8Encode; /** - * UTF-8 decodes the given byte sequence into a string. + * Obtain the timeout for requests to the metadata server. * - * @param bytes - a byte sequence + * In certain environments and conditions requests can take longer than + * the default timeout to complete. This function will determine the + * appropriate timeout based on the environment. + * + * @returns {number} a request timeout duration in milliseconds. */ -function utf8Decode(bytes) { - var result = ""; - var i = 0; - while (i < bytes.length) { - var c = bytes[i++]; - if (c > 127) { - if (c > 191 && c < 224) { - if (i >= bytes.length) { - throw new Error("Incomplete 2-byte sequence."); - } - c = (c & 31) << 6 | bytes[i++] & 63; - } - else if (c > 223 && c < 240) { - if (i + 1 >= bytes.length) { - throw new Error("Incomplete 3-byte sequence."); - } - c = (c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63; - } - else if (c > 239 && c < 248) { - if (i + 2 >= bytes.length) { - throw new Error("Incomplete 4-byte sequence."); - } - c = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63; - } - else { - throw new Error("Unknown multi-byte start."); - } - } - if (c <= 0xffff) { - result += String.fromCharCode(c); - } - else if (c <= 0x10ffff) { - c -= 0x10000; - result += String.fromCharCode(c >> 10 | 0xd800); - result += String.fromCharCode(c & 0x3FF | 0xdc00); - } - else { - throw new Error("Code point exceeds UTF-16 limit."); - } - } - return result; +function requestTimeout() { + return getGCPResidency() ? 0 : 3000; } -exports.utf8Decode = utf8Decode; +__exportStar(__nccwpck_require__(51904), exports); //# sourceMappingURL=index.js.map /***/ }), -/***/ 81040: -/***/ ((__unused_webpack_module, exports) => { +/***/ 74538: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -function once(emitter, name, { signal } = {}) { - return new Promise((resolve, reject) => { - function cleanup() { - signal === null || signal === void 0 ? void 0 : signal.removeEventListener('abort', cleanup); - emitter.removeListener(name, onEvent); - emitter.removeListener('error', onError); - } - function onEvent(...args) { - cleanup(); - resolve(args); - } - function onError(err) { - cleanup(); - reject(err); - } - signal === null || signal === void 0 ? void 0 : signal.addEventListener('abort', cleanup); - emitter.on(name, onEvent); - emitter.on('error', onError); - }); + +var undefined; + +var $Object = __nccwpck_require__(78308); + +var $Error = __nccwpck_require__(28015); +var $EvalError = __nccwpck_require__(91933); +var $RangeError = __nccwpck_require__(54415); +var $ReferenceError = __nccwpck_require__(46279); +var $SyntaxError = __nccwpck_require__(75474); +var $TypeError = __nccwpck_require__(6361); +var $URIError = __nccwpck_require__(5065); + +var abs = __nccwpck_require__(19775); +var floor = __nccwpck_require__(60924); +var max = __nccwpck_require__(52419); +var min = __nccwpck_require__(73373); +var pow = __nccwpck_require__(78029); +var round = __nccwpck_require__(59396); +var sign = __nccwpck_require__(39091); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = __nccwpck_require__(18501); +var $defineProperty = __nccwpck_require__(6123); + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __nccwpck_require__(40587)(); + +var getProto = __nccwpck_require__(13592); +var $ObjectGPO = __nccwpck_require__(5045); +var $ReflectGPO = __nccwpck_require__(78859); + +var $apply = __nccwpck_require__(54177); +var $call = __nccwpck_require__(2808); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': $Object, + '%Object.getOwnPropertyDescriptor%': $gOPD, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + + '%Function.prototype.call%': $call, + '%Function.prototype.apply%': $apply, + '%Object.defineProperty%': $defineProperty, + '%Object.getPrototypeOf%': $ObjectGPO, + '%Math.abs%': abs, + '%Math.floor%': floor, + '%Math.max%': max, + '%Math.min%': min, + '%Math.pow%': pow, + '%Math.round%': round, + '%Math.sign%': sign, + '%Reflect.getPrototypeOf%': $ReflectGPO +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } } -exports["default"] = once; -//# sourceMappingURL=index.js.map + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __nccwpck_require__(88334); +var hasOwn = __nccwpck_require__(62157); +var $concat = bind.call($call, Array.prototype.concat); +var $spliceApply = bind.call($apply, Array.prototype.splice); +var $replace = bind.call($call, String.prototype.replace); +var $strSlice = bind.call($call, String.prototype.slice); +var $exec = bind.call($call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + /***/ }), -/***/ 61659: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 5045: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * @author Toru Nagashima - * See LICENSE file in root directory for full license. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); +var $Object = __nccwpck_require__(78308); -var eventTargetShim = __nccwpck_require__(84697); +/** @type {import('./Object.getPrototypeOf')} */ +module.exports = $Object.getPrototypeOf || null; + + +/***/ }), + +/***/ 78859: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./Reflect.getPrototypeOf')} */ +module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; + + +/***/ }), + +/***/ 13592: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var reflectGetProto = __nccwpck_require__(78859); +var originalGetProto = __nccwpck_require__(5045); + +var getDunderProto = __nccwpck_require__(62693); +/** @type {import('.')} */ +module.exports = reflectGetProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return reflectGetProto(O); + } + : originalGetProto + ? function getProto(O) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new TypeError('getProto: not an object'); + } + // @ts-expect-error TS can't narrow inside a closure, for some reason + return originalGetProto(O); + } + : getDunderProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return getDunderProto(O); + } + : null; + + +/***/ }), + +/***/ 44627: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2012 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AuthClient = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = exports.DEFAULT_UNIVERSE = void 0; +const events_1 = __nccwpck_require__(82361); +const gaxios_1 = __nccwpck_require__(59555); +const transporters_1 = __nccwpck_require__(72649); +const util_1 = __nccwpck_require__(68905); /** - * The signal class. - * @see https://dom.spec.whatwg.org/#abortsignal + * The default cloud universe + * + * @see {@link AuthJSONOptions.universe_domain} */ -class AbortSignal extends eventTargetShim.EventTarget { +exports.DEFAULT_UNIVERSE = 'googleapis.com'; +/** + * The default {@link AuthClientOptions.eagerRefreshThresholdMillis} + */ +exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1000; +class AuthClient extends events_1.EventEmitter { + constructor(opts = {}) { + var _a, _b, _c, _d, _e; + super(); + this.credentials = {}; + this.eagerRefreshThresholdMillis = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS; + this.forceRefreshOnFailure = false; + this.universeDomain = exports.DEFAULT_UNIVERSE; + const options = (0, util_1.originalOrCamelOptions)(opts); + // Shared auth options + this.apiKey = opts.apiKey; + this.projectId = (_a = options.get('project_id')) !== null && _a !== void 0 ? _a : null; + this.quotaProjectId = options.get('quota_project_id'); + this.credentials = (_b = options.get('credentials')) !== null && _b !== void 0 ? _b : {}; + this.universeDomain = (_c = options.get('universe_domain')) !== null && _c !== void 0 ? _c : exports.DEFAULT_UNIVERSE; + // Shared client options + this.transporter = (_d = opts.transporter) !== null && _d !== void 0 ? _d : new transporters_1.DefaultTransporter(); + if (opts.transporterOptions) { + this.transporter.defaults = opts.transporterOptions; + } + if (opts.eagerRefreshThresholdMillis) { + this.eagerRefreshThresholdMillis = opts.eagerRefreshThresholdMillis; + } + this.forceRefreshOnFailure = (_e = opts.forceRefreshOnFailure) !== null && _e !== void 0 ? _e : false; + } /** - * AbortSignal cannot be constructed directly. + * Return the {@link Gaxios `Gaxios`} instance from the {@link AuthClient.transporter}. + * + * @expiremental */ - constructor() { - super(); - throw new TypeError("AbortSignal cannot be constructed directly"); + get gaxios() { + if (this.transporter instanceof gaxios_1.Gaxios) { + return this.transporter; + } + else if (this.transporter instanceof transporters_1.DefaultTransporter) { + return this.transporter.instance; + } + else if ('instance' in this.transporter && + this.transporter.instance instanceof gaxios_1.Gaxios) { + return this.transporter.instance; + } + return null; } /** - * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. + * Sets the auth credentials. */ - get aborted() { - const aborted = abortedFlags.get(this); - if (typeof aborted !== "boolean") { - throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); + setCredentials(credentials) { + this.credentials = credentials; + } + /** + * Append additional headers, e.g., x-goog-user-project, shared across the + * classes inheriting AuthClient. This method should be used by any method + * that overrides getRequestMetadataAsync(), which is a shared helper for + * setting request information in both gRPC and HTTP API calls. + * + * @param headers object to append additional headers to. + */ + addSharedMetadataHeaders(headers) { + // quota_project_id, stored in application_default_credentials.json, is set in + // the x-goog-user-project header, to indicate an alternate account for + // billing and quota: + if (!headers['x-goog-user-project'] && // don't override a value the user sets. + this.quotaProjectId) { + headers['x-goog-user-project'] = this.quotaProjectId; } - return aborted; + return headers; + } + /** + * Retry config for Auth-related requests. + * + * @remarks + * + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. + */ + static get RETRY_CONFIG() { + return { + retry: true, + retryConfig: { + httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], + }, + }; } } -eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); -/** - * Create an AbortSignal object. - */ -function createAbortSignal() { - const signal = Object.create(AbortSignal.prototype); - eventTargetShim.EventTarget.call(signal); - abortedFlags.set(signal, false); - return signal; -} +exports.AuthClient = AuthClient; + + +/***/ }), + +/***/ 71569: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2021 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AwsClient = void 0; +const awsrequestsigner_1 = __nccwpck_require__(1754); +const baseexternalclient_1 = __nccwpck_require__(40810); +const defaultawssecuritycredentialssupplier_1 = __nccwpck_require__(89799); +const util_1 = __nccwpck_require__(68905); /** - * Abort a given signal. + * AWS external account client. This is used for AWS workloads, where + * AWS STS GetCallerIdentity serialized signed requests are exchanged for + * GCP access token. */ -function abortSignal(signal) { - if (abortedFlags.get(signal) !== false) { - return; +class AwsClient extends baseexternalclient_1.BaseExternalAccountClient { + /** + * Instantiates an AwsClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid AWS credential. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + super(options, additionalOptions); + const opts = (0, util_1.originalOrCamelOptions)(options); + const credentialSource = opts.get('credential_source'); + const awsSecurityCredentialsSupplier = opts.get('aws_security_credentials_supplier'); + // Validate credential sourcing configuration. + if (!credentialSource && !awsSecurityCredentialsSupplier) { + throw new Error('A credential source or AWS security credentials supplier must be specified.'); + } + if (credentialSource && awsSecurityCredentialsSupplier) { + throw new Error('Only one of credential source or AWS security credentials supplier can be specified.'); + } + if (awsSecurityCredentialsSupplier) { + this.awsSecurityCredentialsSupplier = awsSecurityCredentialsSupplier; + this.regionalCredVerificationUrl = + __classPrivateFieldGet(_a, _a, "f", _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL); + this.credentialSourceType = 'programmatic'; + } + else { + const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); + this.environmentId = credentialSourceOpts.get('environment_id'); + // This is only required if the AWS region is not available in the + // AWS_REGION or AWS_DEFAULT_REGION environment variables. + const regionUrl = credentialSourceOpts.get('region_url'); + // This is only required if AWS security credentials are not available in + // environment variables. + const securityCredentialsUrl = credentialSourceOpts.get('url'); + const imdsV2SessionTokenUrl = credentialSourceOpts.get('imdsv2_session_token_url'); + this.awsSecurityCredentialsSupplier = + new defaultawssecuritycredentialssupplier_1.DefaultAwsSecurityCredentialsSupplier({ + regionUrl: regionUrl, + securityCredentialsUrl: securityCredentialsUrl, + imdsV2SessionTokenUrl: imdsV2SessionTokenUrl, + }); + this.regionalCredVerificationUrl = credentialSourceOpts.get('regional_cred_verification_url'); + this.credentialSourceType = 'aws'; + // Data validators. + this.validateEnvironmentId(); + } + this.awsRequestSigner = null; + this.region = ''; + } + validateEnvironmentId() { + var _b; + const match = (_b = this.environmentId) === null || _b === void 0 ? void 0 : _b.match(/^(aws)(\d+)$/); + if (!match || !this.regionalCredVerificationUrl) { + throw new Error('No valid AWS "credential_source" provided'); + } + else if (parseInt(match[2], 10) !== 1) { + throw new Error(`aws version "${match[2]}" is not supported in the current build.`); + } + } + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. This will call the + * {@link AwsSecurityCredentialsSupplier} to retrieve an AWS region and AWS + * Security Credentials, then use them to create a signed AWS STS request that + * can be exchanged for a GCP access token. + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + // Initialize AWS request signer if not already initialized. + if (!this.awsRequestSigner) { + this.region = await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext); + this.awsRequestSigner = new awsrequestsigner_1.AwsRequestSigner(async () => { + return this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext); + }, this.region); + } + // Generate signed request to AWS STS GetCallerIdentity API. + // Use the required regional endpoint. Otherwise, the request will fail. + const options = await this.awsRequestSigner.getRequestOptions({ + ..._a.RETRY_CONFIG, + url: this.regionalCredVerificationUrl.replace('{region}', this.region), + method: 'POST', + }); + // The GCP STS endpoint expects the headers to be formatted as: + // [ + // {key: 'x-amz-date', value: '...'}, + // {key: 'Authorization', value: '...'}, + // ... + // ] + // And then serialized as: + // encodeURIComponent(JSON.stringify({ + // url: '...', + // method: 'POST', + // headers: [{key: 'x-amz-date', value: '...'}, ...] + // })) + const reformattedHeader = []; + const extendedHeaders = Object.assign({ + // The full, canonical resource name of the workload identity pool + // provider, with or without the HTTPS prefix. + // Including this header as part of the signature is recommended to + // ensure data integrity. + 'x-goog-cloud-target-resource': this.audience, + }, options.headers); + // Reformat header to GCP STS expected format. + for (const key in extendedHeaders) { + reformattedHeader.push({ + key, + value: extendedHeaders[key], + }); + } + // Serialize the reformatted signed request. + return encodeURIComponent(JSON.stringify({ + url: options.url, + method: options.method, + headers: reformattedHeader, + })); } - abortedFlags.set(signal, true); - signal.dispatchEvent({ type: "abort" }); } +exports.AwsClient = AwsClient; +_a = AwsClient; +_AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL = { value: 'https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15' }; +/** + * @deprecated AWS client no validates the EC2 metadata address. + **/ +AwsClient.AWS_EC2_METADATA_IPV4_ADDRESS = '169.254.169.254'; +/** + * @deprecated AWS client no validates the EC2 metadata address. + **/ +AwsClient.AWS_EC2_METADATA_IPV6_ADDRESS = 'fd00:ec2::254'; + + +/***/ }), + +/***/ 1754: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AwsRequestSigner = void 0; +const crypto_1 = __nccwpck_require__(78043); +/** AWS Signature Version 4 signing algorithm identifier. */ +const AWS_ALGORITHM = 'AWS4-HMAC-SHA256'; /** - * Aborted flag for each instances. + * The termination string for the AWS credential scope value as defined in + * https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html */ -const abortedFlags = new WeakMap(); -// Properties should be enumerable. -Object.defineProperties(AbortSignal.prototype, { - aborted: { enumerable: true }, -}); -// `toString()` should return `"[object AbortSignal]"` -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortSignal", - }); -} - +const AWS_REQUEST_TYPE = 'aws4_request'; /** - * The AbortController. - * @see https://dom.spec.whatwg.org/#abortcontroller + * Implements an AWS API request signer based on the AWS Signature Version 4 + * signing process. + * https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html */ -class AbortController { - /** - * Initialize this controller. - */ - constructor() { - signals.set(this, createAbortSignal()); - } +class AwsRequestSigner { /** - * Returns the `AbortSignal` object associated with this object. + * Instantiates an AWS API request signer used to send authenticated signed + * requests to AWS APIs based on the AWS Signature Version 4 signing process. + * This also provides a mechanism to generate the signed request without + * sending it. + * @param getCredentials A mechanism to retrieve AWS security credentials + * when needed. + * @param region The AWS region to use. */ - get signal() { - return getSignal(this); + constructor(getCredentials, region) { + this.getCredentials = getCredentials; + this.region = region; + this.crypto = (0, crypto_1.createCrypto)(); } /** - * Abort and signal to any observers that the associated activity is to be aborted. + * Generates the signed request for the provided HTTP request for calling + * an AWS API. This follows the steps described at: + * https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html + * @param amzOptions The AWS request options that need to be signed. + * @return A promise that resolves with the GaxiosOptions containing the + * signed HTTP request parameters. */ - abort() { - abortSignal(getSignal(this)); + async getRequestOptions(amzOptions) { + if (!amzOptions.url) { + throw new Error('"url" is required in "amzOptions"'); + } + // Stringify JSON requests. This will be set in the request body of the + // generated signed request. + const requestPayloadData = typeof amzOptions.data === 'object' + ? JSON.stringify(amzOptions.data) + : amzOptions.data; + const url = amzOptions.url; + const method = amzOptions.method || 'GET'; + const requestPayload = amzOptions.body || requestPayloadData; + const additionalAmzHeaders = amzOptions.headers; + const awsSecurityCredentials = await this.getCredentials(); + const uri = new URL(url); + const headerMap = await generateAuthenticationHeaderMap({ + crypto: this.crypto, + host: uri.host, + canonicalUri: uri.pathname, + canonicalQuerystring: uri.search.substr(1), + method, + region: this.region, + securityCredentials: awsSecurityCredentials, + requestPayload, + additionalAmzHeaders, + }); + // Append additional optional headers, eg. X-Amz-Target, Content-Type, etc. + const headers = Object.assign( + // Add x-amz-date if available. + headerMap.amzDate ? { 'x-amz-date': headerMap.amzDate } : {}, { + Authorization: headerMap.authorizationHeader, + host: uri.host, + }, additionalAmzHeaders || {}); + if (awsSecurityCredentials.token) { + Object.assign(headers, { + 'x-amz-security-token': awsSecurityCredentials.token, + }); + } + const awsSignedReq = { + url, + method: method, + headers, + }; + if (typeof requestPayload !== 'undefined') { + awsSignedReq.body = requestPayload; + } + return awsSignedReq; } } +exports.AwsRequestSigner = AwsRequestSigner; /** - * Associated signals. + * Creates the HMAC-SHA256 hash of the provided message using the + * provided key. + * + * @param crypto The crypto instance used to facilitate cryptographic + * operations. + * @param key The HMAC-SHA256 key to use. + * @param msg The message to hash. + * @return The computed hash bytes. */ -const signals = new WeakMap(); +async function sign(crypto, key, msg) { + return await crypto.signWithHmacSha256(key, msg); +} /** - * Get the associated signal of a given controller. + * Calculates the signing key used to calculate the signature for + * AWS Signature Version 4 based on: + * https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + * + * @param crypto The crypto instance used to facilitate cryptographic + * operations. + * @param key The AWS secret access key. + * @param dateStamp The '%Y%m%d' date format. + * @param region The AWS region. + * @param serviceName The AWS service name, eg. sts. + * @return The signing key bytes. */ -function getSignal(controller) { - const signal = signals.get(controller); - if (signal == null) { - throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); - } - return signal; +async function getSigningKey(crypto, key, dateStamp, region, serviceName) { + const kDate = await sign(crypto, `AWS4${key}`, dateStamp); + const kRegion = await sign(crypto, kDate, region); + const kService = await sign(crypto, kRegion, serviceName); + const kSigning = await sign(crypto, kService, 'aws4_request'); + return kSigning; } -// Properties should be enumerable. -Object.defineProperties(AbortController.prototype, { - signal: { enumerable: true }, - abort: { enumerable: true }, -}); -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortController", +/** + * Generates the authentication header map needed for generating the AWS + * Signature Version 4 signed request. + * + * @param option The options needed to compute the authentication header map. + * @return The AWS authentication header map which constitutes of the following + * components: amz-date, authorization header and canonical query string. + */ +async function generateAuthenticationHeaderMap(options) { + const additionalAmzHeaders = options.additionalAmzHeaders || {}; + const requestPayload = options.requestPayload || ''; + // iam.amazonaws.com host => iam service. + // sts.us-east-2.amazonaws.com => sts service. + const serviceName = options.host.split('.')[0]; + const now = new Date(); + // Format: '%Y%m%dT%H%M%SZ'. + const amzDate = now + .toISOString() + .replace(/[-:]/g, '') + .replace(/\.[0-9]+/, ''); + // Format: '%Y%m%d'. + const dateStamp = now.toISOString().replace(/[-]/g, '').replace(/T.*/, ''); + // Change all additional headers to be lower case. + const reformattedAdditionalAmzHeaders = {}; + Object.keys(additionalAmzHeaders).forEach(key => { + reformattedAdditionalAmzHeaders[key.toLowerCase()] = + additionalAmzHeaders[key]; }); -} - -exports.AbortController = AbortController; -exports.AbortSignal = AbortSignal; -exports["default"] = AbortController; - -module.exports = AbortController -module.exports.AbortController = module.exports["default"] = AbortController -module.exports.AbortSignal = AbortSignal -//# sourceMappingURL=abort-controller.js.map - - -/***/ }), - -/***/ 8348: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.req = exports.json = exports.toBuffer = void 0; -const http = __importStar(__nccwpck_require__(13685)); -const https = __importStar(__nccwpck_require__(95687)); -async function toBuffer(stream) { - let length = 0; - const chunks = []; - for await (const chunk of stream) { - length += chunk.length; - chunks.push(chunk); - } - return Buffer.concat(chunks, length); -} -exports.toBuffer = toBuffer; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -async function json(stream) { - const buf = await toBuffer(stream); - const str = buf.toString('utf8'); - try { - return JSON.parse(str); - } - catch (_err) { - const err = _err; - err.message += ` (input: ${str})`; - throw err; + // Add AWS token if available. + if (options.securityCredentials.token) { + reformattedAdditionalAmzHeaders['x-amz-security-token'] = + options.securityCredentials.token; } -} -exports.json = json; -function req(url, opts = {}) { - const href = typeof url === 'string' ? url : url.href; - const req = (href.startsWith('https:') ? https : http).request(url, opts); - const promise = new Promise((resolve, reject) => { - req - .once('response', resolve) - .once('error', reject) - .end(); + // Header keys need to be sorted alphabetically. + const amzHeaders = Object.assign({ + host: options.host, + }, + // Previously the date was not fixed with x-amz- and could be provided manually. + // https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/aws4_testsuite/get-header-value-trim.req + reformattedAdditionalAmzHeaders.date ? {} : { 'x-amz-date': amzDate }, reformattedAdditionalAmzHeaders); + let canonicalHeaders = ''; + const signedHeadersList = Object.keys(amzHeaders).sort(); + signedHeadersList.forEach(key => { + canonicalHeaders += `${key}:${amzHeaders[key]}\n`; }); - req.then = promise.then.bind(promise); - return req; + const signedHeaders = signedHeadersList.join(';'); + const payloadHash = await options.crypto.sha256DigestHex(requestPayload); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html + const canonicalRequest = `${options.method}\n` + + `${options.canonicalUri}\n` + + `${options.canonicalQuerystring}\n` + + `${canonicalHeaders}\n` + + `${signedHeaders}\n` + + `${payloadHash}`; + const credentialScope = `${dateStamp}/${options.region}/${serviceName}/${AWS_REQUEST_TYPE}`; + // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html + const stringToSign = `${AWS_ALGORITHM}\n` + + `${amzDate}\n` + + `${credentialScope}\n` + + (await options.crypto.sha256DigestHex(canonicalRequest)); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + const signingKey = await getSigningKey(options.crypto, options.securityCredentials.secretAccessKey, dateStamp, options.region, serviceName); + const signature = await sign(options.crypto, signingKey, stringToSign); + // https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html + const authorizationHeader = `${AWS_ALGORITHM} Credential=${options.securityCredentials.accessKeyId}/` + + `${credentialScope}, SignedHeaders=${signedHeaders}, ` + + `Signature=${(0, crypto_1.fromArrayBufferToHex)(signature)}`; + return { + // Do not return x-amz-date if date is available. + amzDate: reformattedAdditionalAmzHeaders.date ? undefined : amzDate, + authorizationHeader, + canonicalQuerystring: options.canonicalQuerystring, + }; } -exports.req = req; -//# sourceMappingURL=helpers.js.map + /***/ }), -/***/ 70694: +/***/ 40810: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +// Copyright 2021 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; +var _BaseExternalAccountClient_instances, _BaseExternalAccountClient_pendingAccessToken, _BaseExternalAccountClient_internalRefreshAccessTokenAsync; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Agent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const http = __importStar(__nccwpck_require__(13685)); -const https_1 = __nccwpck_require__(95687); -__exportStar(__nccwpck_require__(8348), exports); -const INTERNAL = Symbol('AgentBaseInternalState'); -class Agent extends http.Agent { - constructor(opts) { - super(opts); - this[INTERNAL] = {}; - } +exports.BaseExternalAccountClient = exports.DEFAULT_UNIVERSE = exports.CLOUD_RESOURCE_MANAGER = exports.EXTERNAL_ACCOUNT_TYPE = exports.EXPIRATION_TIME_OFFSET = void 0; +const stream = __nccwpck_require__(12781); +const authclient_1 = __nccwpck_require__(44627); +const sts = __nccwpck_require__(86308); +const util_1 = __nccwpck_require__(68905); +/** + * The required token exchange grant_type: rfc8693#section-2.1 + */ +const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; +/** + * The requested token exchange requested_token_type: rfc8693#section-2.1 + */ +const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; +/** The default OAuth scope to request when none is provided. */ +const DEFAULT_OAUTH_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; +/** Default impersonated token lifespan in seconds.*/ +const DEFAULT_TOKEN_LIFESPAN = 3600; +/** + * Offset to take into account network delays and server clock skews. + */ +exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; +/** + * The credentials JSON file type for external account clients. + * There are 3 types of JSON configs: + * 1. authorized_user => Google end user credential + * 2. service_account => Google service account credential + * 3. external_Account => non-GCP service (eg. AWS, Azure, K8s) + */ +exports.EXTERNAL_ACCOUNT_TYPE = 'external_account'; +/** + * Cloud resource manager URL used to retrieve project information. + * + * @deprecated use {@link BaseExternalAccountClient.cloudResourceManagerURL} instead + **/ +exports.CLOUD_RESOURCE_MANAGER = 'https://cloudresourcemanager.googleapis.com/v1/projects/'; +/** The workforce audience pattern. */ +const WORKFORCE_AUDIENCE_PATTERN = '//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+'; +const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/token'; +// eslint-disable-next-line @typescript-eslint/no-var-requires +const pkg = __nccwpck_require__(51402); +/** + * For backwards compatibility. + */ +var authclient_2 = __nccwpck_require__(44627); +Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_2.DEFAULT_UNIVERSE; } })); +/** + * Base external account client. This is used to instantiate AuthClients for + * exchanging external account credentials for GCP access token and authorizing + * requests to GCP APIs. + * The base class implements common logic for exchanging various type of + * external credentials for GCP access token. The logic of determining and + * retrieving the external credential based on the environment and + * credential_source will be left for the subclasses. + */ +class BaseExternalAccountClient extends authclient_1.AuthClient { /** - * Determine whether this is an `http` or `https` request. + * Instantiate a BaseExternalAccountClient instance using the provided JSON + * object loaded from an external account credentials file. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. */ - isSecureEndpoint(options) { - if (options) { - // First check the `secureEndpoint` property explicitly, since this - // means that a parent `Agent` is "passing through" to this instance. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (typeof options.secureEndpoint === 'boolean') { - return options.secureEndpoint; - } - // If no explicit `secure` endpoint, check if `protocol` property is - // set. This will usually be the case since using a full string URL - // or `URL` instance should be the most common usage. - if (typeof options.protocol === 'string') { - return options.protocol === 'https:'; - } + constructor(options, additionalOptions) { + var _a; + super({ ...options, ...additionalOptions }); + _BaseExternalAccountClient_instances.add(this); + /** + * A pending access token request. Used for concurrent calls. + */ + _BaseExternalAccountClient_pendingAccessToken.set(this, null); + const opts = (0, util_1.originalOrCamelOptions)(options); + const type = opts.get('type'); + if (type && type !== exports.EXTERNAL_ACCOUNT_TYPE) { + throw new Error(`Expected "${exports.EXTERNAL_ACCOUNT_TYPE}" type but ` + + `received "${options.type}"`); } - // Finally, if no `protocol` property was set, then fall back to - // checking the stack trace of the current call stack, and try to - // detect the "https" module. - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack - .split('\n') - .some((l) => l.indexOf('(https.js:') !== -1 || - l.indexOf('node:https:') !== -1); - } - // In order to support async signatures in `connect()` and Node's native - // connection pooling in `http.Agent`, the array of sockets for each origin - // has to be updated synchronously. This is so the length of the array is - // accurate when `addRequest()` is next called. We achieve this by creating a - // fake socket and adding it to `sockets[origin]` and incrementing - // `totalSocketCount`. - incrementSockets(name) { - // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no - // need to create a fake socket because Node.js native connection pooling - // will never be invoked. - if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) { - return null; + const clientId = opts.get('client_id'); + const clientSecret = opts.get('client_secret'); + const tokenUrl = (_a = opts.get('token_url')) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain); + const subjectTokenType = opts.get('subject_token_type'); + const workforcePoolUserProject = opts.get('workforce_pool_user_project'); + const serviceAccountImpersonationUrl = opts.get('service_account_impersonation_url'); + const serviceAccountImpersonation = opts.get('service_account_impersonation'); + const serviceAccountImpersonationLifetime = (0, util_1.originalOrCamelOptions)(serviceAccountImpersonation).get('token_lifetime_seconds'); + this.cloudResourceManagerURL = new URL(opts.get('cloud_resource_manager_url') || + `https://cloudresourcemanager.${this.universeDomain}/v1/projects/`); + if (clientId) { + this.clientAuth = { + confidentialClientType: 'basic', + clientId, + clientSecret, + }; } - // All instances of `sockets` are expected TypeScript errors. The - // alternative is to add it as a private property of this class but that - // will break TypeScript subclassing. - if (!this.sockets[name]) { - // @ts-expect-error `sockets` is readonly in `@types/node` - this.sockets[name] = []; + this.stsCredential = new sts.StsCredentials(tokenUrl, this.clientAuth); + this.scopes = opts.get('scopes') || [DEFAULT_OAUTH_SCOPE]; + this.cachedAccessToken = null; + this.audience = opts.get('audience'); + this.subjectTokenType = subjectTokenType; + this.workforcePoolUserProject = workforcePoolUserProject; + const workforceAudiencePattern = new RegExp(WORKFORCE_AUDIENCE_PATTERN); + if (this.workforcePoolUserProject && + !this.audience.match(workforceAudiencePattern)) { + throw new Error('workforcePoolUserProject should not be set for non-workforce pool ' + + 'credentials.'); } - const fakeSocket = new net.Socket({ writable: false }); - this.sockets[name].push(fakeSocket); - // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` - this.totalSocketCount++; - return fakeSocket; - } - decrementSockets(name, socket) { - if (!this.sockets[name] || socket === null) { - return; + this.serviceAccountImpersonationUrl = serviceAccountImpersonationUrl; + this.serviceAccountImpersonationLifetime = + serviceAccountImpersonationLifetime; + if (this.serviceAccountImpersonationLifetime) { + this.configLifetimeRequested = true; } - const sockets = this.sockets[name]; - const index = sockets.indexOf(socket); - if (index !== -1) { - sockets.splice(index, 1); - // @ts-expect-error `totalSocketCount` isn't defined in `@types/node` - this.totalSocketCount--; - if (sockets.length === 0) { - // @ts-expect-error `sockets` is readonly in `@types/node` - delete this.sockets[name]; + else { + this.configLifetimeRequested = false; + this.serviceAccountImpersonationLifetime = DEFAULT_TOKEN_LIFESPAN; + } + this.projectNumber = this.getProjectNumber(this.audience); + this.supplierContext = { + audience: this.audience, + subjectTokenType: this.subjectTokenType, + transporter: this.transporter, + }; + } + /** The service account email to be impersonated, if available. */ + getServiceAccountEmail() { + var _a; + if (this.serviceAccountImpersonationUrl) { + if (this.serviceAccountImpersonationUrl.length > 256) { + /** + * Prevents DOS attacks. + * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/84} + **/ + throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`); } + // Parse email from URL. The formal looks as follows: + // https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/name@project-id.iam.gserviceaccount.com:generateAccessToken + const re = /serviceAccounts\/(?[^:]+):generateAccessToken$/; + const result = re.exec(this.serviceAccountImpersonationUrl); + return ((_a = result === null || result === void 0 ? void 0 : result.groups) === null || _a === void 0 ? void 0 : _a.email) || null; } + return null; } - // In order to properly update the socket pool, we need to call `getName()` on - // the core `https.Agent` if it is a secureEndpoint. - getName(options) { - const secureEndpoint = typeof options.secureEndpoint === 'boolean' - ? options.secureEndpoint - : this.isSecureEndpoint(options); - if (secureEndpoint) { - // @ts-expect-error `getName()` isn't defined in `@types/node` - return https_1.Agent.prototype.getName.call(this, options); + /** + * Provides a mechanism to inject GCP access tokens directly. + * When the provided credential expires, a new credential, using the + * external account options, is retrieved. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials) { + super.setCredentials(credentials); + this.cachedAccessToken = credentials; + } + /** + * @return A promise that resolves with the current GCP access token + * response. If the current credential is expired, a new one is retrieved. + */ + async getAccessToken() { + // If cached access token is unavailable or expired, force refresh. + if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { + await this.refreshAccessTokenAsync(); } - // @ts-expect-error `getName()` isn't defined in `@types/node` - return super.getName(options); + // Return GCP access token in GetAccessTokenResponse format. + return { + token: this.cachedAccessToken.access_token, + res: this.cachedAccessToken.res, + }; } - createSocket(req, options, cb) { - const connectOpts = { - ...options, - secureEndpoint: this.isSecureEndpoint(options), + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { Authorization: 'Bearer ' } + */ + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = { + Authorization: `Bearer ${accessTokenResponse.token}`, }; - const name = this.getName(connectOpts); - const fakeSocket = this.incrementSockets(name); - Promise.resolve() - .then(() => this.connect(req, connectOpts)) - .then((socket) => { - this.decrementSockets(name, fakeSocket); - if (socket instanceof http.Agent) { - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - return socket.addRequest(req, connectOpts); - } - this[INTERNAL].currentSocket = socket; - // @ts-expect-error `createSocket()` isn't defined in `@types/node` - super.createSocket(req, options, cb); - }, (err) => { - this.decrementSockets(name, fakeSocket); - cb(err); - }); + return this.addSharedMetadataHeaders(headers); } - createConnection() { - const socket = this[INTERNAL].currentSocket; - this[INTERNAL].currentSocket = undefined; - if (!socket) { - throw new Error('No socket was returned in the `connect()` function'); + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); } - return socket; } - get defaultPort() { - return (this[INTERNAL].defaultPort ?? - (this.protocol === 'https:' ? 443 : 80)); + /** + * @return A promise that resolves with the project ID corresponding to the + * current workload identity pool or current workforce pool if + * determinable. For workforce pool credential, it returns the project ID + * corresponding to the workforcePoolUserProject. + * This is introduced to match the current pattern of using the Auth + * library: + * const projectId = await auth.getProjectId(); + * const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`; + * const res = await client.request({ url }); + * The resource may not have permission + * (resourcemanager.projects.get) to call this API or the required + * scopes may not be selected: + * https://cloud.google.com/resource-manager/reference/rest/v1/projects/get#authorization-scopes + */ + async getProjectId() { + const projectNumber = this.projectNumber || this.workforcePoolUserProject; + if (this.projectId) { + // Return previously determined project ID. + return this.projectId; + } + else if (projectNumber) { + // Preferable not to use request() to avoid retrial policies. + const headers = await this.getRequestHeaders(); + const response = await this.transporter.request({ + ...BaseExternalAccountClient.RETRY_CONFIG, + headers, + url: `${this.cloudResourceManagerURL.toString()}${projectNumber}`, + responseType: 'json', + }); + this.projectId = response.data.projectId; + return this.projectId; + } + return null; } - set defaultPort(v) { - if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v; + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = opts.headers || {}; + if (requestHeaders && requestHeaders['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = + requestHeaders['x-goog-user-project']; + } + if (requestHeaders && requestHeaders.Authorization) { + opts.headers.Authorization = requestHeaders.Authorization; + } + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; } + return response; } - get protocol() { - return (this[INTERNAL].protocol ?? - (this.isSecureEndpoint() ? 'https:' : 'http:')); + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * External credentials are exchanged for GCP access tokens via the token + * exchange endpoint and other settings provided in the client options + * object. + * If the service_account_impersonation_url is provided, an additional + * step to exchange the external account GCP access token for a service + * account impersonated token is performed. + * @return A promise that resolves with the fresh GCP access tokens. + */ + async refreshAccessTokenAsync() { + // Use an existing access token request, or cache a new one + __classPrivateFieldSet(this, _BaseExternalAccountClient_pendingAccessToken, __classPrivateFieldGet(this, _BaseExternalAccountClient_pendingAccessToken, "f") || __classPrivateFieldGet(this, _BaseExternalAccountClient_instances, "m", _BaseExternalAccountClient_internalRefreshAccessTokenAsync).call(this), "f"); + try { + return await __classPrivateFieldGet(this, _BaseExternalAccountClient_pendingAccessToken, "f"); + } + finally { + // clear pending access token for future requests + __classPrivateFieldSet(this, _BaseExternalAccountClient_pendingAccessToken, null, "f"); + } } - set protocol(v) { - if (this[INTERNAL]) { - this[INTERNAL].protocol = v; + /** + * Returns the workload identity pool project number if it is determinable + * from the audience resource name. + * @param audience The STS audience used to determine the project number. + * @return The project number associated with the workload identity pool, if + * this can be determined from the STS audience field. Otherwise, null is + * returned. + */ + getProjectNumber(audience) { + // STS audience pattern: + // //iam.googleapis.com/projects/$PROJECT_NUMBER/locations/... + const match = audience.match(/\/projects\/([^/]+)/); + if (!match) { + return null; } + return match[1]; } -} -exports.Agent = Agent; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 61546: -/***/ ((module) => { - -"use strict"; - - -const arrify = value => { - if (value === null || value === undefined) { - return []; - } - - if (Array.isArray(value)) { - return value; - } - - if (typeof value === 'string') { - return [value]; - } - - if (typeof value[Symbol.iterator] === 'function') { - return [...value]; - } - - return [value]; -}; - -module.exports = arrify; - - -/***/ }), - -/***/ 33415: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Packages -var retrier = __nccwpck_require__(71604); - -function retry(fn, opts) { - function run(resolve, reject) { - var options = opts || {}; - var op; - - // Default `randomize` to true - if (!('randomize' in options)) { - options.randomize = true; + /** + * Exchanges an external account GCP access token for a service + * account impersonated access token using iamcredentials + * GenerateAccessToken API. + * @param token The access token to exchange for a service account access + * token. + * @return A promise that resolves with the service account impersonated + * credentials response. + */ + async getImpersonatedAccessToken(token) { + const opts = { + ...BaseExternalAccountClient.RETRY_CONFIG, + url: this.serviceAccountImpersonationUrl, + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: { + scope: this.getScopesArray(), + lifetime: this.serviceAccountImpersonationLifetime + 's', + }, + responseType: 'json', + }; + const response = await this.transporter.request(opts); + const successResponse = response.data; + return { + access_token: successResponse.accessToken, + // Convert from ISO format to timestamp. + expiry_date: new Date(successResponse.expireTime).getTime(), + res: response, + }; } - - op = retrier.operation(options); - - // We allow the user to abort retrying - // this makes sense in the cases where - // knowledge is obtained that retrying - // would be futile (e.g.: auth errors) - - function bail(err) { - reject(err || new Error('Aborted')); + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param accessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(accessToken) { + const now = new Date().getTime(); + return accessToken.expiry_date + ? now >= accessToken.expiry_date - this.eagerRefreshThresholdMillis + : false; } - - function onError(err, num) { - if (err.bail) { - bail(err); - return; - } - - if (!op.retry(err)) { - reject(op.mainError()); - } else if (options.onRetry) { - options.onRetry(err, num); - } + /** + * @return The list of scopes for the requested GCP access token. + */ + getScopesArray() { + // Since scopes can be provided as string or array, the type should + // be normalized. + if (typeof this.scopes === 'string') { + return [this.scopes]; + } + return this.scopes || [DEFAULT_OAUTH_SCOPE]; } - - function runAttempt(num) { - var val; - - try { - val = fn(bail, num); - } catch (err) { - onError(err, num); - return; - } - - Promise.resolve(val) - .then(resolve) - .catch(function catchIt(err) { - onError(err, num); - }); + getMetricsHeaderValue() { + const nodeVersion = process.version.replace(/^v/, ''); + const saImpersonation = this.serviceAccountImpersonationUrl !== undefined; + const credentialSourceType = this.credentialSourceType + ? this.credentialSourceType + : 'unknown'; + return `gl-node/${nodeVersion} auth/${pkg.version} google-byoid-sdk source/${credentialSourceType} sa-impersonation/${saImpersonation} config-lifetime/${this.configLifetimeRequested}`; } - - op.attempt(runAttempt); - } - - return new Promise(run); -} - -module.exports = retry; - - -/***/ }), - -/***/ 14812: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = -{ - parallel : __nccwpck_require__(8210), - serial : __nccwpck_require__(50445), - serialOrdered : __nccwpck_require__(3578) -}; - - -/***/ }), - -/***/ 1700: -/***/ ((module) => { - -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; } - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} - - -/***/ }), - -/***/ 72794: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var defer = __nccwpck_require__(15295); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); +exports.BaseExternalAccountClient = BaseExternalAccountClient; +_BaseExternalAccountClient_pendingAccessToken = new WeakMap(), _BaseExternalAccountClient_instances = new WeakSet(), _BaseExternalAccountClient_internalRefreshAccessTokenAsync = async function _BaseExternalAccountClient_internalRefreshAccessTokenAsync() { + // Retrieve the external credential. + const subjectToken = await this.retrieveSubjectToken(); + // Construct the STS credentials options. + const stsCredentialsOptions = { + grantType: STS_GRANT_TYPE, + audience: this.audience, + requestedTokenType: STS_REQUEST_TOKEN_TYPE, + subjectToken, + subjectTokenType: this.subjectTokenType, + // generateAccessToken requires the provided access token to have + // scopes: + // https://www.googleapis.com/auth/iam or + // https://www.googleapis.com/auth/cloud-platform + // The new service account access token scopes will match the user + // provided ones. + scope: this.serviceAccountImpersonationUrl + ? [DEFAULT_OAUTH_SCOPE] + : this.getScopesArray(), + }; + // Exchange the external credentials for a GCP access token. + // Client auth is prioritized over passing the workforcePoolUserProject + // parameter for STS token exchange. + const additionalOptions = !this.clientAuth && this.workforcePoolUserProject + ? { userProject: this.workforcePoolUserProject } + : undefined; + const additionalHeaders = { + 'x-goog-api-client': this.getMetricsHeaderValue(), + }; + const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, additionalHeaders, additionalOptions); + if (this.serviceAccountImpersonationUrl) { + this.cachedAccessToken = await this.getImpersonatedAccessToken(stsResponse.access_token); } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); + else if (stsResponse.expires_in) { + // Save response in cached access token. + this.cachedAccessToken = { + access_token: stsResponse.access_token, + expiry_date: new Date().getTime() + stsResponse.expires_in * 1000, + res: stsResponse.res, + }; + } + else { + // Save response in cached access token. + this.cachedAccessToken = { + access_token: stsResponse.access_token, + res: stsResponse.res, + }; } - }; -} + // Save credentials. + this.credentials = {}; + Object.assign(this.credentials, this.cachedAccessToken); + delete this.credentials.res; + // Trigger tokens event to notify external listeners. + this.emit('tokens', { + refresh_token: null, + expiry_date: this.cachedAccessToken.expiry_date, + access_token: this.cachedAccessToken.access_token, + token_type: 'Bearer', + id_token: null, + }); + // Return the cached access token. + return this.cachedAccessToken; +}; /***/ }), -/***/ 15295: -/***/ ((module) => { - -module.exports = defer; +/***/ 96875: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); +"use strict"; - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } +// Copyright 2013 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Compute = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const gcpMetadata = __nccwpck_require__(3563); +const oauth2client_1 = __nccwpck_require__(3936); +class Compute extends oauth2client_1.OAuth2Client { + /** + * Google Compute Engine service account credentials. + * + * Retrieve access token from the metadata server. + * See: https://cloud.google.com/compute/docs/access/authenticate-workloads#applications + */ + constructor(options = {}) { + super(options); + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { expiry_date: 1, refresh_token: 'compute-placeholder' }; + this.serviceAccountEmail = options.serviceAccountEmail || 'default'; + this.scopes = Array.isArray(options.scopes) + ? options.scopes + : options.scopes + ? [options.scopes] + : []; + } + /** + * Refreshes the access token. + * @param refreshToken Unused parameter + */ + async refreshTokenNoCache( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + refreshToken) { + const tokenPath = `service-accounts/${this.serviceAccountEmail}/token`; + let data; + try { + const instanceOptions = { + property: tokenPath, + }; + if (this.scopes.length > 0) { + instanceOptions.params = { + scopes: this.scopes.join(','), + }; + } + data = await gcpMetadata.instance(instanceOptions); + } + catch (e) { + if (e instanceof gaxios_1.GaxiosError) { + e.message = `Could not refresh access token: ${e.message}`; + this.wrapError(e); + } + throw e; + } + const tokens = data; + if (data && data.expires_in) { + tokens.expiry_date = new Date().getTime() + data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res: null }; + } + /** + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. + */ + async fetchIdToken(targetAudience) { + const idTokenPath = `service-accounts/${this.serviceAccountEmail}/identity` + + `?format=full&audience=${targetAudience}`; + let idToken; + try { + const instanceOptions = { + property: idTokenPath, + }; + idToken = await gcpMetadata.instance(instanceOptions); + } + catch (e) { + if (e instanceof Error) { + e.message = `Could not fetch ID token: ${e.message}`; + } + throw e; + } + return idToken; + } + wrapError(e) { + const res = e.response; + if (res && res.status) { + e.status = res.status; + if (res.status === 403) { + e.message = + 'A Forbidden error was returned while attempting to retrieve an access ' + + 'token for the Compute Engine built-in service account. This may be because the Compute ' + + 'Engine instance does not have the correct permission scopes specified: ' + + e.message; + } + else if (res.status === 404) { + e.message = + 'A Not Found error was returned while attempting to retrieve an access' + + 'token for the Compute Engine built-in service account. This may be because the Compute ' + + 'Engine instance does not have any permission scopes specified: ' + + e.message; + } + } + } } +exports.Compute = Compute; /***/ }), -/***/ 9023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var async = __nccwpck_require__(72794) - , abort = __nccwpck_require__(1700) - ; +/***/ 89799: +/***/ (function(__unused_webpack_module, exports) { -// API -module.exports = iterate; +"use strict"; +// Copyright 2024 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _DefaultAwsSecurityCredentialsSupplier_instances, _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefaultAwsSecurityCredentialsSupplier = void 0; /** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed + * Internal AWS security credentials supplier implementation used by {@link AwsClient} + * when a credential source is provided instead of a user defined supplier. + * The logic is summarized as: + * 1. If imdsv2_session_token_url is provided in the credential source, then + * fetch the aws session token and include it in the headers of the + * metadata requests. This is a requirement for IDMSv2 but optional + * for IDMSv1. + * 2. Retrieve AWS region from availability-zone. + * 3a. Check AWS credentials in environment variables. If not found, get + * from security-credentials endpoint. + * 3b. Get AWS credentials from security-credentials endpoint. In order + * to retrieve this, the AWS role needs to be determined by calling + * security-credentials endpoint without any argument. Then the + * credentials can be retrieved via: security-credentials/role_name + * 4. Generate the signed request to AWS STS GetCallerIdentity action. + * 5. Inject x-goog-cloud-target-resource into header and serialize the + * signed request. This will be the subject-token to pass to GCP STS. */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; +class DefaultAwsSecurityCredentialsSupplier { + /** + * Instantiates a new DefaultAwsSecurityCredentialsSupplier using information + * from the credential_source stored in the ADC file. + * @param opts The default aws security credentials supplier options object to + * build the supplier with. + */ + constructor(opts) { + _DefaultAwsSecurityCredentialsSupplier_instances.add(this); + this.regionUrl = opts.regionUrl; + this.securityCredentialsUrl = opts.securityCredentialsUrl; + this.imdsV2SessionTokenUrl = opts.imdsV2SessionTokenUrl; + this.additionalGaxiosOptions = opts.additionalGaxiosOptions; } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); + /** + * Returns the active AWS region. This first checks to see if the region + * is available as an environment variable. If it is not, then the supplier + * will call the region URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS region string. + */ + async getAwsRegion(context) { + // Priority order for region determination: + // AWS_REGION > AWS_DEFAULT_REGION > metadata server. + if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get)) { + return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get); + } + const metadataHeaders = {}; + if (!__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get) && this.imdsV2SessionTokenUrl) { + metadataHeaders['x-aws-ec2-metadata-token'] = + await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); + } + if (!this.regionUrl) { + throw new Error('Unable to determine AWS region due to missing ' + + '"options.credential_source.region_url"'); + } + const opts = { + ...this.additionalGaxiosOptions, + url: this.regionUrl, + method: 'GET', + responseType: 'text', + headers: metadataHeaders, + }; + const response = await context.transporter.request(opts); + // Remove last character. For example, if us-east-2b is returned, + // the region would be us-east-2. + return response.data.substr(0, response.data.length - 1); } - else - { - state.results[key] = output; + /** + * Returns AWS security credentials. This first checks to see if the credentials + * is available as environment variables. If it is not, then the supplier + * will call the security credentials URL. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link AwsClient}, contains the requested audience and subject token type + * for the external account identity. + * @return A promise that resolves with the AWS security credentials. + */ + async getAwsSecurityCredentials(context) { + // Check environment variables for permanent credentials first. + // https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html + if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get)) { + return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get); + } + const metadataHeaders = {}; + if (this.imdsV2SessionTokenUrl) { + metadataHeaders['x-aws-ec2-metadata-token'] = + await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); + } + // Since the role on a VM can change, we don't need to cache it. + const roleName = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName).call(this, metadataHeaders, context.transporter); + // Temporary credentials typically last for several hours. + // Expiration is returned in response. + // Consider future optimization of this logic to cache AWS tokens + // until their natural expiration. + const awsCreds = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials).call(this, roleName, metadataHeaders, context.transporter); + return { + accessKeyId: awsCreds.AccessKeyId, + secretAccessKey: awsCreds.SecretAccessKey, + token: awsCreds.Token, + }; } - - // return salvaged results - callback(error, state.results); - }); } - +exports.DefaultAwsSecurityCredentialsSupplier = DefaultAwsSecurityCredentialsSupplier; +_DefaultAwsSecurityCredentialsSupplier_instances = new WeakSet(), _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken = /** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the IMDSv2 Session Token. */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} - - -/***/ }), - -/***/ 42474: -/***/ ((module) => { - -// API -module.exports = state; - +async function _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken(transporter) { + const opts = { + ...this.additionalGaxiosOptions, + url: this.imdsV2SessionTokenUrl, + method: 'PUT', + responseType: 'text', + headers: { 'x-aws-ec2-metadata-token-ttl-seconds': '300' }, + }; + const response = await transporter.request(opts); + return response.data; +}, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName = /** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object + * @param headers The headers to be used in the metadata request. + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the assigned role to the current + * AWS VM. This is needed for calling the security-credentials endpoint. */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length +async function _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName(headers, transporter) { + if (!this.securityCredentialsUrl) { + throw new Error('Unable to determine AWS role name due to missing ' + + '"options.credential_source.url"'); } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} - - -/***/ }), - -/***/ 37942: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var abort = __nccwpck_require__(1700) - , async = __nccwpck_require__(72794) - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} - - -/***/ }), - -/***/ 8210: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(42474) - , terminator = __nccwpck_require__(37942) - ; - -// Public API -module.exports = parallel; - + const opts = { + ...this.additionalGaxiosOptions, + url: this.securityCredentialsUrl, + method: 'GET', + responseType: 'text', + headers: headers, + }; + const response = await transporter.request(opts); + return response.data; +}, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials = /** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator + * Retrieves the temporary AWS credentials by calling the security-credentials + * endpoint as specified in the `credential_source` object. + * @param roleName The role attached to the current VM. + * @param headers The headers to be used in the metadata request. + * @param transporter The transporter to use for requests. + * @return A promise that resolves with the temporary AWS credentials + * needed for creating the GetCallerIdentity signed request. */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } +async function _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials(roleName, headers, transporter) { + const response = await transporter.request({ + ...this.additionalGaxiosOptions, + url: `${this.securityCredentialsUrl}/${roleName}`, + responseType: 'json', + headers: headers, }); - - state.index++; - } - - return terminator.bind(state, callback); -} + return response.data; +}, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get() { + // The AWS region can be provided through AWS_REGION or AWS_DEFAULT_REGION. + // Only one is required. + return (process.env['AWS_REGION'] || process.env['AWS_DEFAULT_REGION'] || null); +}, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get() { + // Both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are required. + if (process.env['AWS_ACCESS_KEY_ID'] && + process.env['AWS_SECRET_ACCESS_KEY']) { + return { + accessKeyId: process.env['AWS_ACCESS_KEY_ID'], + secretAccessKey: process.env['AWS_SECRET_ACCESS_KEY'], + token: process.env['AWS_SESSION_TOKEN'], + }; + } + return null; +}; /***/ }), -/***/ 50445: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var serialOrdered = __nccwpck_require__(3578); +/***/ 6270: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// Public API -module.exports = serial; +"use strict"; +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DownscopedClient = exports.EXPIRATION_TIME_OFFSET = exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = void 0; +const stream = __nccwpck_require__(12781); +const authclient_1 = __nccwpck_require__(44627); +const sts = __nccwpck_require__(86308); /** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator + * The required token exchange grant_type: rfc8693#section-2.1 */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} - - -/***/ }), - -/***/ 3578: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var iterate = __nccwpck_require__(9023) - , initState = __nccwpck_require__(42474) - , terminator = __nccwpck_require__(37942) - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - +const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; /** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator + * The requested token exchange requested_token_type: rfc8693#section-2.1 */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods +const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; +/** + * The requested token exchange subject_token_type: rfc8693#section-2.1 */ - +const STS_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; /** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result + * The maximum number of access boundary rules a Credential Access Boundary + * can contain. */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - +exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; /** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result + * Offset to take into account network delays and server clock skews. */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} - - -/***/ }), - -/***/ 91403: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var CombinedStream = __nccwpck_require__(85443); -var util = __nccwpck_require__(73837); -var path = __nccwpck_require__(71017); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var parseUrl = (__nccwpck_require__(57310).parse); -var fs = __nccwpck_require__(57147); -var Stream = (__nccwpck_require__(12781).Stream); -var mime = __nccwpck_require__(43583); -var asynckit = __nccwpck_require__(14812); -var populate = __nccwpck_require__(47027); - -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - +exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; /** - * Create readable "multipart/form-data" streams. - * Can be used to submit forms - * and file uploads to other web applications. - * - * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + * Defines a set of Google credentials that are downscoped from an existing set + * of Google OAuth2 credentials. This is useful to restrict the Identity and + * Access Management (IAM) permissions that a short-lived credential can use. + * The common pattern of usage is to have a token broker with elevated access + * generate these downscoped credentials from higher access source credentials + * and pass the downscoped short-lived access tokens to a token consumer via + * some secure authenticated channel for limited access to Google Cloud Storage + * resources. */ -function FormData(options) { - if (!(this instanceof FormData)) { - return new FormData(options); - } - - this._overheadLength = 0; - this._valueLength = 0; - this._valuesToMeasure = []; - - CombinedStream.call(this); - - options = options || {}; - for (var option in options) { - this[option] = options[option]; - } -} - -FormData.LINE_BREAK = '\r\n'; -FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; - -FormData.prototype.append = function(field, value, options) { - - options = options || {}; - - // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; - } - - var append = CombinedStream.prototype.append.bind(this); - - // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; - } - - // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it - this._error(new Error('Arrays are not supported.')); - return; - } - - var header = this._multiPartHeader(field, value, options); - var footer = this._multiPartFooter(); - - append(header); - append(value); - append(footer); - - // pass along options.knownLength - this._trackLength(header, value, options); -}; - -FormData.prototype._trackLength = function(header, value, options) { - var valueLength = 0; - - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. - if (options.knownLength != null) { - valueLength += +options.knownLength; - } else if (Buffer.isBuffer(value)) { - valueLength = value.length; - } else if (typeof value === 'string') { - valueLength = Buffer.byteLength(value); - } - - this._valueLength += valueLength; - - // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; - - // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { - return; - } - - // no need to bother with the length - if (!options.knownLength) { - this._valuesToMeasure.push(value); - } -}; - -FormData.prototype._lengthRetriever = function(value, callback) { - - if (value.hasOwnProperty('fd')) { - - // take read range into a account - // `end` = Infinity –> read file till the end - // - // TODO: Looks like there is bug in Node fs.createReadStream - // it doesn't respect `end` options without `start` options - // Fix it when node fixes it. - // https://github.com/joyent/node/issues/7819 - if (value.end != undefined && value.end != Infinity && value.start != undefined) { - - // when end specified - // no need to calculate range - // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); - - // not that fast snoopy - } else { - // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { - - var fileSize; - - if (err) { - callback(err); - return; +class DownscopedClient extends authclient_1.AuthClient { + /** + * Instantiates a downscoped client object using the provided source + * AuthClient and credential access boundary rules. + * To downscope permissions of a source AuthClient, a Credential Access + * Boundary that specifies which resources the new credential can access, as + * well as an upper bound on the permissions that are available on each + * resource, has to be defined. A downscoped client can then be instantiated + * using the source AuthClient and the Credential Access Boundary. + * @param authClient The source AuthClient to be downscoped based on the + * provided Credential Access Boundary rules. + * @param credentialAccessBoundary The Credential Access Boundary which + * contains a list of access boundary rules. Each rule contains information + * on the resource that the rule applies to, the upper bound of the + * permissions that are available on that resource and an optional + * condition to further restrict permissions. + * @param additionalOptions **DEPRECATED, set this in the provided `authClient`.** + * Optional additional behavior customization options. + * @param quotaProjectId **DEPRECATED, set this in the provided `authClient`.** + * Optional quota project id for setting up in the x-goog-user-project header. + */ + constructor(authClient, credentialAccessBoundary, additionalOptions, quotaProjectId) { + super({ ...additionalOptions, quotaProjectId }); + this.authClient = authClient; + this.credentialAccessBoundary = credentialAccessBoundary; + // Check 1-10 Access Boundary Rules are defined within Credential Access + // Boundary. + if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length === 0) { + throw new Error('At least one access boundary rule needs to be defined.'); } - - // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); - callback(null, fileSize); - }); - } - - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); - - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { - // wait till response come back - value.on('response', function(response) { - value.pause(); - callback(null, +response.headers['content-length']); - }); - value.resume(); - - // something else - } else { - callback('Unknown stream'); - } -}; - -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { - return options.header; - } - - var contentDisposition = this._getContentDisposition(value, options); - var contentType = this._getContentType(value, options); - - var contents = ''; - var headers = { - // add custom disposition as third element or keep it two elements if not - 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), - // if no content type. allow it to be empty array - 'Content-Type': [].concat(contentType || []) - }; - - // allow custom headers. - if (typeof options.header == 'object') { - populate(headers, options.header); - } - - var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; - - // skip nullish headers. - if (header == null) { - continue; - } - - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } - - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; - } - } - - return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; -}; - -FormData.prototype._getContentDisposition = function(value, options) { - - var filename - , contentDisposition - ; - - if (typeof options.filepath === 'string') { - // custom filepath for relative paths - filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { - // or try http response - filename = path.basename(value.client._httpMessage.path || ''); - } - - if (filename) { - contentDisposition = 'filename="' + filename + '"'; - } - - return contentDisposition; -}; - -FormData.prototype._getContentType = function(value, options) { - - // use custom content-type above all - var contentType = options.contentType; - - // or try `name` from formidable, browser - if (!contentType && value.name) { - contentType = mime.lookup(value.name); - } - - // or try `path` from fs-, request- streams - if (!contentType && value.path) { - contentType = mime.lookup(value.path); - } - - // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { - contentType = value.headers['content-type']; - } - - // or guess it from the filepath or filename - if (!contentType && (options.filepath || options.filename)) { - contentType = mime.lookup(options.filepath || options.filename); - } - - // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { - contentType = FormData.DEFAULT_CONTENT_TYPE; - } - - return contentType; -}; - -FormData.prototype._multiPartFooter = function() { - return function(next) { - var footer = FormData.LINE_BREAK; - - var lastPart = (this._streams.length === 0); - if (lastPart) { - footer += this._lastBoundary(); - } - - next(footer); - }.bind(this); -}; - -FormData.prototype._lastBoundary = function() { - return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; -}; - -FormData.prototype.getHeaders = function(userHeaders) { - var header; - var formHeaders = { - 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() - }; - - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { - formHeaders[header.toLowerCase()] = userHeaders[header]; - } - } - - return formHeaders; -}; - -FormData.prototype.setBoundary = function(boundary) { - this._boundary = boundary; -}; - -FormData.prototype.getBoundary = function() { - if (!this._boundary) { - this._generateBoundary(); - } - - return this._boundary; -}; - -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); - var boundary = this.getBoundary(); - - // Create the form content. Add Line breaks to the end of data. - for (var i = 0, len = this._streams.length; i < len; i++) { - if (typeof this._streams[i] !== 'function') { - - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); - } - - // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); - } + else if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length > + exports.MAX_ACCESS_BOUNDARY_RULES_COUNT) { + throw new Error('The provided access boundary has more than ' + + `${exports.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`); + } + // Check at least one permission should be defined in each Access Boundary + // Rule. + for (const rule of credentialAccessBoundary.accessBoundary + .accessBoundaryRules) { + if (rule.availablePermissions.length === 0) { + throw new Error('At least one permission should be defined in access boundary rules.'); + } + } + this.stsCredential = new sts.StsCredentials(`https://sts.${this.universeDomain}/v1/token`); + this.cachedDownscopedAccessToken = null; } - } - - // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); -}; - -FormData.prototype._generateBoundary = function() { - // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - - this._boundary = boundary; -}; - -// Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { - var knownLength = this._overheadLength + this._valueLength; - - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - // https://github.com/form-data/form-data/issues/40 - if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length - this._error(new Error('Cannot calculate proper length in synchronous way.')); - } - - return knownLength; -}; - -// Public API to check if length of added values is known -// https://github.com/form-data/form-data/issues/196 -// https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { - var hasKnownLength = true; - - if (this._valuesToMeasure.length) { - hasKnownLength = false; - } - - return hasKnownLength; -}; - -FormData.prototype.getLength = function(cb) { - var knownLength = this._overheadLength + this._valueLength; - - if (this._streams.length) { - knownLength += this._lastBoundary().length; - } - - if (!this._valuesToMeasure.length) { - process.nextTick(cb.bind(this, null, knownLength)); - return; - } - - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { - if (err) { - cb(err); - return; + /** + * Provides a mechanism to inject Downscoped access tokens directly. + * The expiry_date field is required to facilitate determination of the token + * expiration which would make it easier for the token consumer to handle. + * @param credentials The Credentials object to set on the current client. + */ + setCredentials(credentials) { + if (!credentials.expiry_date) { + throw new Error('The access token expiry_date field is missing in the provided ' + + 'credentials.'); + } + super.setCredentials(credentials); + this.cachedDownscopedAccessToken = credentials; } - - values.forEach(function(length) { - knownLength += length; - }); - - cb(null, knownLength); - }); -}; - -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; - - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - - params = parseUrl(params); - options = populate({ - port: params.port, - path: params.pathname, - host: params.hostname, - protocol: params.protocol - }, defaults); - - // use custom params - } else { - - options = populate(params, defaults); - // if no port provided use default one - if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; + async getAccessToken() { + // If the cached access token is unavailable or expired, force refresh. + // The Downscoped access token will be returned in + // DownscopedAccessTokenResponse format. + if (!this.cachedDownscopedAccessToken || + this.isExpired(this.cachedDownscopedAccessToken)) { + await this.refreshAccessTokenAsync(); + } + // Return Downscoped access token in DownscopedAccessTokenResponse format. + return { + token: this.cachedDownscopedAccessToken.access_token, + expirationTime: this.cachedDownscopedAccessToken.expiry_date, + res: this.cachedDownscopedAccessToken.res, + }; } - } - - // put that good code in getHeaders to some use - options.headers = this.getHeaders(params.headers); - - // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { - request = https.request(options); - } else { - request = http.request(options); - } - - // get content length and fire away - this.getLength(function(err, length) { - if (err && err !== 'Unknown stream') { - this._error(err); - return; + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. + * + * The result has the form: + * { Authorization: 'Bearer ' } + */ + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = { + Authorization: `Bearer ${accessTokenResponse.token}`, + }; + return this.addSharedMetadataHeaders(headers); } - - // add content length - if (length) { - request.setHeader('Content-Length', length); + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } } - - this.pipe(request); - if (cb) { - var onResponse; - - var callback = function (error, responce) { - request.removeListener('error', callback); - request.removeListener('response', onResponse); - - return cb.call(this, error, responce); - }; - - onResponse = callback.bind(this, null); - - request.on('error', callback); - request.on('response', onResponse); + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = opts.headers || {}; + if (requestHeaders && requestHeaders['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = + requestHeaders['x-goog-user-project']; + } + if (requestHeaders && requestHeaders.Authorization) { + opts.headers.Authorization = requestHeaders.Authorization; + } + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; + } + return response; } - }.bind(this)); - - return request; -}; - -FormData.prototype._error = function(err) { - if (!this.error) { - this.error = err; - this.pause(); - this.emit('error', err); - } -}; - -FormData.prototype.toString = function () { - return '[object FormData]'; -}; - - -/***/ }), - -/***/ 47027: -/***/ ((module) => { - -// populates missing values -module.exports = function(dst, src) { - - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; - }); - - return dst; -}; + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * GCP access tokens are retrieved from authclient object/source credential. + * Then GCP access tokens are exchanged for downscoped access tokens via the + * token exchange endpoint. + * @return A promise that resolves with the fresh downscoped access token. + */ + async refreshAccessTokenAsync() { + var _a; + // Retrieve GCP access token from source credential. + const subjectToken = (await this.authClient.getAccessToken()).token; + // Construct the STS credentials options. + const stsCredentialsOptions = { + grantType: STS_GRANT_TYPE, + requestedTokenType: STS_REQUEST_TOKEN_TYPE, + subjectToken: subjectToken, + subjectTokenType: STS_SUBJECT_TOKEN_TYPE, + }; + // Exchange the source AuthClient access token for a Downscoped access + // token. + const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, undefined, this.credentialAccessBoundary); + /** + * The STS endpoint will only return the expiration time for the downscoped + * access token if the original access token represents a service account. + * The downscoped token's expiration time will always match the source + * credential expiration. When no expires_in is returned, we can copy the + * source credential's expiration time. + */ + const sourceCredExpireDate = ((_a = this.authClient.credentials) === null || _a === void 0 ? void 0 : _a.expiry_date) || null; + const expiryDate = stsResponse.expires_in + ? new Date().getTime() + stsResponse.expires_in * 1000 + : sourceCredExpireDate; + // Save response in cached access token. + this.cachedDownscopedAccessToken = { + access_token: stsResponse.access_token, + expiry_date: expiryDate, + res: stsResponse.res, + }; + // Save credentials. + this.credentials = {}; + Object.assign(this.credentials, this.cachedDownscopedAccessToken); + delete this.credentials.res; + // Trigger tokens event to notify external listeners. + this.emit('tokens', { + refresh_token: null, + expiry_date: this.cachedDownscopedAccessToken.expiry_date, + access_token: this.cachedDownscopedAccessToken.access_token, + token_type: 'Bearer', + id_token: null, + }); + // Return the cached access token. + return this.cachedDownscopedAccessToken; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param downscopedAccessToken The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(downscopedAccessToken) { + const now = new Date().getTime(); + return downscopedAccessToken.expiry_date + ? now >= + downscopedAccessToken.expiry_date - this.eagerRefreshThresholdMillis + : false; + } +} +exports.DownscopedClient = DownscopedClient; /***/ }), -/***/ 9417: -/***/ ((module) => { +/***/ 21380: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; +// Copyright 2018 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GCPEnv = void 0; +exports.clear = clear; +exports.getEnv = getEnv; +const gcpMetadata = __nccwpck_require__(3563); +var GCPEnv; +(function (GCPEnv) { + GCPEnv["APP_ENGINE"] = "APP_ENGINE"; + GCPEnv["KUBERNETES_ENGINE"] = "KUBERNETES_ENGINE"; + GCPEnv["CLOUD_FUNCTIONS"] = "CLOUD_FUNCTIONS"; + GCPEnv["COMPUTE_ENGINE"] = "COMPUTE_ENGINE"; + GCPEnv["CLOUD_RUN"] = "CLOUD_RUN"; + GCPEnv["NONE"] = "NONE"; +})(GCPEnv || (exports.GCPEnv = GCPEnv = {})); +let envPromise; +function clear() { + envPromise = undefined; } - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; +async function getEnv() { + if (envPromise) { + return envPromise; + } + envPromise = getEnvMemoized(); + return envPromise; } - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; +async function getEnvMemoized() { + let env = GCPEnv.NONE; + if (isAppEngine()) { + env = GCPEnv.APP_ENGINE; } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; + else if (isCloudFunction()) { + env = GCPEnv.CLOUD_FUNCTIONS; + } + else if (await isComputeEngine()) { + if (await isKubernetesEngine()) { + env = GCPEnv.KUBERNETES_ENGINE; + } + else if (isCloudRun()) { + env = GCPEnv.CLOUD_RUN; + } + else { + env = GCPEnv.COMPUTE_ENGINE; } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; } - - if (begs.length) { - result = [ left, right ]; + else { + env = GCPEnv.NONE; } - } - - return result; + return env; } - - -/***/ }), - -/***/ 26463: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i +function isAppEngine() { + return !!(process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME); } - -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function getLens (b64) { - var len = b64.length - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] +function isCloudFunction() { + return !!(process.env.FUNCTION_NAME || process.env.FUNCTION_TARGET); } - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +/** + * This check only verifies that the environment is running knative. + * This must be run *after* checking for Kubernetes, otherwise it will + * return a false positive. + */ +function isCloudRun() { + return !!process.env.K_CONFIGURATION; } - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +async function isKubernetesEngine() { + try { + await gcpMetadata.instance('attributes/cluster-name'); + return true; + } + catch (e) { + return false; + } +} +async function isComputeEngine() { + return gcpMetadata.isAvailable(); } -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } +/***/ }), - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } +/***/ 8749: +/***/ ((__unused_webpack_module, exports) => { - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } +"use strict"; - return arr +// Copyright 2022 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InvalidSubjectTokenError = exports.InvalidMessageFieldError = exports.InvalidCodeFieldError = exports.InvalidTokenTypeFieldError = exports.InvalidExpirationTimeFieldError = exports.InvalidSuccessFieldError = exports.InvalidVersionFieldError = exports.ExecutableResponseError = exports.ExecutableResponse = void 0; +const SAML_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:saml2'; +const OIDC_SUBJECT_TOKEN_TYPE1 = 'urn:ietf:params:oauth:token-type:id_token'; +const OIDC_SUBJECT_TOKEN_TYPE2 = 'urn:ietf:params:oauth:token-type:jwt'; +/** + * Defines the response of a 3rd party executable run by the pluggable auth client. + */ +class ExecutableResponse { + /** + * Instantiates an ExecutableResponse instance using the provided JSON object + * from the output of the executable. + * @param responseJson Response from a 3rd party executable, loaded from a + * run of the executable or a cached output file. + */ + constructor(responseJson) { + // Check that the required fields exist in the json response. + if (!responseJson.version) { + throw new InvalidVersionFieldError("Executable response must contain a 'version' field."); + } + if (responseJson.success === undefined) { + throw new InvalidSuccessFieldError("Executable response must contain a 'success' field."); + } + this.version = responseJson.version; + this.success = responseJson.success; + // Validate required fields for a successful response. + if (this.success) { + this.expirationTime = responseJson.expiration_time; + this.tokenType = responseJson.token_type; + // Validate token type field. + if (this.tokenType !== SAML_SUBJECT_TOKEN_TYPE && + this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE1 && + this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE2) { + throw new InvalidTokenTypeFieldError("Executable response must contain a 'token_type' field when successful " + + `and it must be one of ${OIDC_SUBJECT_TOKEN_TYPE1}, ${OIDC_SUBJECT_TOKEN_TYPE2}, or ${SAML_SUBJECT_TOKEN_TYPE}.`); + } + // Validate subject token. + if (this.tokenType === SAML_SUBJECT_TOKEN_TYPE) { + if (!responseJson.saml_response) { + throw new InvalidSubjectTokenError(`Executable response must contain a 'saml_response' field when token_type=${SAML_SUBJECT_TOKEN_TYPE}.`); + } + this.subjectToken = responseJson.saml_response; + } + else { + if (!responseJson.id_token) { + throw new InvalidSubjectTokenError("Executable response must contain a 'id_token' field when " + + `token_type=${OIDC_SUBJECT_TOKEN_TYPE1} or ${OIDC_SUBJECT_TOKEN_TYPE2}.`); + } + this.subjectToken = responseJson.id_token; + } + } + else { + // Both code and message must be provided for unsuccessful responses. + if (!responseJson.code) { + throw new InvalidCodeFieldError("Executable response must contain a 'code' field when unsuccessful."); + } + if (!responseJson.message) { + throw new InvalidMessageFieldError("Executable response must contain a 'message' field when unsuccessful."); + } + this.errorCode = responseJson.code; + this.errorMessage = responseJson.message; + } + } + /** + * @return A boolean representing if the response has a valid token. Returns + * true when the response was successful and the token is not expired. + */ + isValid() { + return !this.isExpired() && this.success; + } + /** + * @return A boolean representing if the response is expired. Returns true if the + * provided timeout has passed. + */ + isExpired() { + return (this.expirationTime !== undefined && + this.expirationTime < Math.round(Date.now() / 1000)); + } } - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] +exports.ExecutableResponse = ExecutableResponse; +/** + * An error thrown by the ExecutableResponse class. + */ +class ExecutableResponseError extends Error { + constructor(message) { + super(message); + Object.setPrototypeOf(this, new.target.prototype); + } } - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') +exports.ExecutableResponseError = ExecutableResponseError; +/** + * An error thrown when the 'version' field in an executable response is missing or invalid. + */ +class InvalidVersionFieldError extends ExecutableResponseError { } - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') +exports.InvalidVersionFieldError = InvalidVersionFieldError; +/** + * An error thrown when the 'success' field in an executable response is missing or invalid. + */ +class InvalidSuccessFieldError extends ExecutableResponseError { } - - -/***/ }), - -/***/ 83682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var register = __nccwpck_require__(44670); -var addHook = __nccwpck_require__(5549); -var removeHook = __nccwpck_require__(6819); - -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind; -var bindable = bind.bind(bind); - -function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); +exports.InvalidSuccessFieldError = InvalidSuccessFieldError; +/** + * An error thrown when the 'expiration_time' field in an executable response is missing or invalid. + */ +class InvalidExpirationTimeFieldError extends ExecutableResponseError { } - -function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; +exports.InvalidExpirationTimeFieldError = InvalidExpirationTimeFieldError; +/** + * An error thrown when the 'token_type' field in an executable response is missing or invalid. + */ +class InvalidTokenTypeFieldError extends ExecutableResponseError { } - -function HookCollection() { - var state = { - registry: {}, - }; - - var hook = register.bind(null, state); - bindApi(hook, state); - - return hook; +exports.InvalidTokenTypeFieldError = InvalidTokenTypeFieldError; +/** + * An error thrown when the 'code' field in an executable response is missing or invalid. + */ +class InvalidCodeFieldError extends ExecutableResponseError { } - -var collectionHookDeprecationMessageDisplayed = false; -function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; - } - return HookCollection(); +exports.InvalidCodeFieldError = InvalidCodeFieldError; +/** + * An error thrown when the 'message' field in an executable response is missing or invalid. + */ +class InvalidMessageFieldError extends ExecutableResponseError { } - -Hook.Singular = HookSingular.bind(); -Hook.Collection = HookCollection.bind(); - -module.exports = Hook; -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook; -module.exports.Singular = Hook.Singular; -module.exports.Collection = Hook.Collection; +exports.InvalidMessageFieldError = InvalidMessageFieldError; +/** + * An error thrown when the subject token in an executable response is missing or invalid. + */ +class InvalidSubjectTokenError extends ExecutableResponseError { +} +exports.InvalidSubjectTokenError = InvalidSubjectTokenError; /***/ }), -/***/ 5549: -/***/ ((module) => { - -module.exports = addHook; - -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } - - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } +/***/ 38765: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); - }; - } +"use strict"; - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); +// Copyright 2023 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExternalAccountAuthorizedUserClient = exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = void 0; +const authclient_1 = __nccwpck_require__(44627); +const oauth2common_1 = __nccwpck_require__(19510); +const gaxios_1 = __nccwpck_require__(59555); +const stream = __nccwpck_require__(12781); +const baseexternalclient_1 = __nccwpck_require__(40810); +/** + * The credentials JSON file type for external account authorized user clients. + */ +exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = 'external_account_authorized_user'; +const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/oauthtoken'; +/** + * Handler for token refresh requests sent to the token_url endpoint for external + * authorized user credentials. + */ +class ExternalAccountAuthorizedUserHandler extends oauth2common_1.OAuthClientAuthHandler { + /** + * Initializes an ExternalAccountAuthorizedUserHandler instance. + * @param url The URL of the token refresh endpoint. + * @param transporter The transporter to use for the refresh request. + * @param clientAuthentication The client authentication credentials to use + * for the refresh request. + */ + constructor(url, transporter, clientAuthentication) { + super(clientAuthentication); + this.url = url; + this.transporter = transporter; + } + /** + * Requests a new access token from the token_url endpoint using the provided + * refresh token. + * @param refreshToken The refresh token to use to generate a new access token. + * @param additionalHeaders Optional additional headers to pass along the + * request. + * @return A promise that resolves with the token refresh response containing + * the requested access token and its expiration time. + */ + async refreshToken(refreshToken, additionalHeaders) { + const values = new URLSearchParams({ + grant_type: 'refresh_token', + refresh_token: refreshToken, }); - }; - } - - state.registry[name].push({ - hook: hook, - orig: orig, - }); + const headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + ...additionalHeaders, + }; + const opts = { + ...ExternalAccountAuthorizedUserHandler.RETRY_CONFIG, + url: this.url, + method: 'POST', + headers, + data: values.toString(), + responseType: 'json', + }; + // Apply OAuth client authentication. + this.applyClientAuthenticationOptions(opts); + try { + const response = await this.transporter.request(opts); + // Successful response. + const tokenRefreshResponse = response.data; + tokenRefreshResponse.res = response; + return tokenRefreshResponse; + } + catch (error) { + // Translate error to OAuthError. + if (error instanceof gaxios_1.GaxiosError && error.response) { + throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, + // Preserve other fields from the original error. + error); + } + // Request could fail before the server responds. + throw error; + } + } } - - -/***/ }), - -/***/ 44670: -/***/ ((module) => { - -module.exports = register; - -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } - - if (!options) { - options = {}; - } - - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } - - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); +/** + * External Account Authorized User Client. This is used for OAuth2 credentials + * sourced using external identities through Workforce Identity Federation. + * Obtaining the initial access and refresh token can be done through the + * Google Cloud CLI. + */ +class ExternalAccountAuthorizedUserClient extends authclient_1.AuthClient { + /** + * Instantiates an ExternalAccountAuthorizedUserClient instances using the + * provided JSON object loaded from a credentials files. + * An error is throws if the credential is not valid. + * @param options The external account authorized user option object typically + * from the external accoutn authorized user JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + var _a; + super({ ...options, ...additionalOptions }); + if (options.universe_domain) { + this.universeDomain = options.universe_domain; + } + this.refreshToken = options.refresh_token; + const clientAuth = { + confidentialClientType: 'basic', + clientId: options.client_id, + clientSecret: options.client_secret, + }; + this.externalAccountAuthorizedUserHandler = + new ExternalAccountAuthorizedUserHandler((_a = options.token_url) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain), this.transporter, clientAuth); + this.cachedAccessToken = null; + this.quotaProjectId = options.quota_project_id; + // As threshold could be zero, + // eagerRefreshThresholdMillis || EXPIRATION_TIME_OFFSET will override the + // zero value. + if (typeof (additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.eagerRefreshThresholdMillis) !== 'number') { + this.eagerRefreshThresholdMillis = baseexternalclient_1.EXPIRATION_TIME_OFFSET; + } + else { + this.eagerRefreshThresholdMillis = additionalOptions + .eagerRefreshThresholdMillis; + } + this.forceRefreshOnFailure = !!(additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.forceRefreshOnFailure); + } + async getAccessToken() { + // If cached access token is unavailable or expired, force refresh. + if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { + await this.refreshAccessTokenAsync(); + } + // Return GCP access token in GetAccessTokenResponse format. + return { + token: this.cachedAccessToken.access_token, + res: this.cachedAccessToken.res, + }; + } + async getRequestHeaders() { + const accessTokenResponse = await this.getAccessToken(); + const headers = { + Authorization: `Bearer ${accessTokenResponse.token}`, + }; + return this.addSharedMetadataHeaders(headers); + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + /** + * Authenticates the provided HTTP request, processes it and resolves with the + * returned response. + * @param opts The HTTP request options. + * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. + * @return A promise that resolves with the successful response. + */ + async requestAsync(opts, reAuthRetried = false) { + let response; + try { + const requestHeaders = await this.getRequestHeaders(); + opts.headers = opts.headers || {}; + if (requestHeaders && requestHeaders['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = + requestHeaders['x-goog-user-project']; + } + if (requestHeaders && requestHeaders.Authorization) { + opts.headers.Authorization = requestHeaders.Authorization; + } + response = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - forceRefreshOnFailure is true + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + this.forceRefreshOnFailure) { + await this.refreshAccessTokenAsync(); + return await this.requestAsync(opts, true); + } + } + throw e; + } + return response; + } + /** + * Forces token refresh, even if unexpired tokens are currently cached. + * @return A promise that resolves with the refreshed credential. + */ + async refreshAccessTokenAsync() { + // Refresh the access token using the refresh token. + const refreshResponse = await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken); + this.cachedAccessToken = { + access_token: refreshResponse.access_token, + expiry_date: new Date().getTime() + refreshResponse.expires_in * 1000, + res: refreshResponse.res, + }; + if (refreshResponse.refresh_token !== undefined) { + this.refreshToken = refreshResponse.refresh_token; + } + return this.cachedAccessToken; + } + /** + * Returns whether the provided credentials are expired or not. + * If there is no expiry time, assumes the token is not expired or expiring. + * @param credentials The credentials to check for expiration. + * @return Whether the credentials are expired or not. + */ + isExpired(credentials) { + const now = new Date().getTime(); + return credentials.expiry_date + ? now >= credentials.expiry_date - this.eagerRefreshThresholdMillis + : false; } - - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); } +exports.ExternalAccountAuthorizedUserClient = ExternalAccountAuthorizedUserClient; /***/ }), -/***/ 6819: -/***/ ((module) => { - -module.exports = removeHook; - -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } - - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); +/***/ 94381: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (index === -1) { - return; - } +"use strict"; - state.registry[name].splice(index, 1); +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExternalAccountClient = void 0; +const baseexternalclient_1 = __nccwpck_require__(40810); +const identitypoolclient_1 = __nccwpck_require__(20117); +const awsclient_1 = __nccwpck_require__(71569); +const pluggable_auth_client_1 = __nccwpck_require__(44782); +/** + * Dummy class with no constructor. Developers are expected to use fromJSON. + */ +class ExternalAccountClient { + constructor() { + throw new Error('ExternalAccountClients should be initialized via: ' + + 'ExternalAccountClient.fromJSON(), ' + + 'directly via explicit constructors, eg. ' + + 'new AwsClient(options), new IdentityPoolClient(options), new' + + 'PluggableAuthClientOptions, or via ' + + 'new GoogleAuth(options).getClient()'); + } + /** + * This static method will instantiate the + * corresponding type of external account credential depending on the + * underlying credential source. + * @param options The external account options object typically loaded + * from the external account JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + * @return A BaseExternalAccountClient instance or null if the options + * provided do not correspond to an external account credential. + */ + static fromJSON(options, additionalOptions) { + var _a, _b; + if (options && options.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + if ((_a = options.credential_source) === null || _a === void 0 ? void 0 : _a.environment_id) { + return new awsclient_1.AwsClient(options, additionalOptions); + } + else if ((_b = options.credential_source) === null || _b === void 0 ? void 0 : _b.executable) { + return new pluggable_auth_client_1.PluggableAuthClient(options, additionalOptions); + } + else { + return new identitypoolclient_1.IdentityPoolClient(options, additionalOptions); + } + } + else { + return null; + } + } } +exports.ExternalAccountClient = ExternalAccountClient; /***/ }), -/***/ 87558: -/***/ (function(module) { +/***/ 27646: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -;(function (globalObject) { - 'use strict'; +"use strict"; -/* - * bignumber.js v9.1.2 - * A JavaScript library for arbitrary-precision arithmetic. - * https://github.com/MikeMcl/bignumber.js - * Copyright (c) 2022 Michael Mclaughlin - * MIT Licensed. - * - * BigNumber.prototype methods | BigNumber methods - * | - * absoluteValue abs | clone - * comparedTo | config set - * decimalPlaces dp | DECIMAL_PLACES - * dividedBy div | ROUNDING_MODE - * dividedToIntegerBy idiv | EXPONENTIAL_AT - * exponentiatedBy pow | RANGE - * integerValue | CRYPTO - * isEqualTo eq | MODULO_MODE - * isFinite | POW_PRECISION - * isGreaterThan gt | FORMAT - * isGreaterThanOrEqualTo gte | ALPHABET - * isInteger | isBigNumber - * isLessThan lt | maximum max - * isLessThanOrEqualTo lte | minimum min - * isNaN | random - * isNegative | sum - * isPositive | - * isZero | - * minus | - * modulo mod | - * multipliedBy times | - * negated | - * plus | - * precision sd | - * shiftedBy | - * squareRoot sqrt | - * toExponential | - * toFixed | - * toFormat | - * toFraction | - * toJSON | - * toNumber | - * toPrecision | - * toString | - * valueOf | - * +// Copyright 2024 Google LLC +// +// 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. +var _a, _b, _c; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FileSubjectTokenSupplier = void 0; +const util_1 = __nccwpck_require__(73837); +const fs = __nccwpck_require__(57147); +// fs.readfile is undefined in browser karma tests causing +// `npm run browser-test` to fail as test.oauth2.ts imports this file via +// src/index.ts. +// Fallback to void function to avoid promisify throwing a TypeError. +const readFile = (0, util_1.promisify)((_a = fs.readFile) !== null && _a !== void 0 ? _a : (() => { })); +const realpath = (0, util_1.promisify)((_b = fs.realpath) !== null && _b !== void 0 ? _b : (() => { })); +const lstat = (0, util_1.promisify)((_c = fs.lstat) !== null && _c !== void 0 ? _c : (() => { })); +/** + * Internal subject token supplier implementation used when a file location + * is configured in the credential configuration used to build an {@link IdentityPoolClient} */ - - - var BigNumber, - isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, - mathceil = Math.ceil, - mathfloor = Math.floor, - - bignumberError = '[BigNumber Error] ', - tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ', - - BASE = 1e14, - LOG_BASE = 14, - MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 - // MAX_INT32 = 0x7fffffff, // 2^31 - 1 - POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], - SQRT_BASE = 1e7, - - // EDITABLE - // The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and - // the arguments to toExponential, toFixed, toFormat, and toPrecision. - MAX = 1E9; // 0 to MAX_INT32 - - - /* - * Create and return a BigNumber constructor. - */ - function clone(configObject) { - var div, convertBase, parseNumeric, - P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null }, - ONE = new BigNumber(1), - - - //----------------------------- EDITABLE CONFIG DEFAULTS ------------------------------- - - - // The default values below must be integers within the inclusive ranges stated. - // The values can also be changed at run-time using BigNumber.set. - - // The maximum number of decimal places for operations involving division. - DECIMAL_PLACES = 20, // 0 to MAX - - // The rounding mode used when rounding to the above decimal places, and when using - // toExponential, toFixed, toFormat and toPrecision, and round (default value). - // UP 0 Away from zero. - // DOWN 1 Towards zero. - // CEIL 2 Towards +Infinity. - // FLOOR 3 Towards -Infinity. - // HALF_UP 4 Towards nearest neighbour. If equidistant, up. - // HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. - // HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. - // HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. - // HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. - ROUNDING_MODE = 4, // 0 to 8 - - // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] - - // The exponent value at and beneath which toString returns exponential notation. - // Number type: -7 - TO_EXP_NEG = -7, // 0 to -MAX - - // The exponent value at and above which toString returns exponential notation. - // Number type: 21 - TO_EXP_POS = 21, // 0 to MAX - - // RANGE : [MIN_EXP, MAX_EXP] - - // The minimum exponent value, beneath which underflow to zero occurs. - // Number type: -324 (5e-324) - MIN_EXP = -1e7, // -1 to -MAX - - // The maximum exponent value, above which overflow to Infinity occurs. - // Number type: 308 (1.7976931348623157e+308) - // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. - MAX_EXP = 1e7, // 1 to MAX - - // Whether to use cryptographically-secure random number generation, if available. - CRYPTO = false, // true or false - - // The modulo mode used when calculating the modulus: a mod n. - // The quotient (q = a / n) is calculated according to the corresponding rounding mode. - // The remainder (r) is calculated as: r = a - n * q. - // - // UP 0 The remainder is positive if the dividend is negative, else is negative. - // DOWN 1 The remainder has the same sign as the dividend. - // This modulo mode is commonly known as 'truncated division' and is - // equivalent to (a % n) in JavaScript. - // FLOOR 3 The remainder has the same sign as the divisor (Python %). - // HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. - // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). - // The remainder is always positive. - // - // The truncated division, floored division, Euclidian division and IEEE 754 remainder - // modes are commonly used for the modulus operation. - // Although the other rounding modes can also be used, they may not give useful results. - MODULO_MODE = 1, // 0 to 9 - - // The maximum number of significant digits of the result of the exponentiatedBy operation. - // If POW_PRECISION is 0, there will be unlimited significant digits. - POW_PRECISION = 0, // 0 to MAX - - // The format specification used by the BigNumber.prototype.toFormat method. - FORMAT = { - prefix: '', - groupSize: 3, - secondaryGroupSize: 0, - groupSeparator: ',', - decimalSeparator: '.', - fractionGroupSize: 0, - fractionGroupSeparator: '\xA0', // non-breaking space - suffix: '' - }, - - // The alphabet used for base conversion. It must be at least 2 characters long, with no '+', - // '-', '.', whitespace, or repeated character. - // '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_' - ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz', - alphabetHasNormalDecimalDigits = true; - - - //------------------------------------------------------------------------------------------ - - - // CONSTRUCTOR - - - /* - * The BigNumber constructor and exported function. - * Create and return a new instance of a BigNumber object. - * - * v {number|string|BigNumber} A numeric value. - * [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive. +class FileSubjectTokenSupplier { + /** + * Instantiates a new file based subject token supplier. + * @param opts The file subject token supplier options to build the supplier + * with. */ - function BigNumber(v, b) { - var alphabet, c, caseChanged, e, i, isNum, len, str, - x = this; - - // Enable constructor call without `new`. - if (!(x instanceof BigNumber)) return new BigNumber(v, b); - - if (b == null) { - - if (v && v._isBigNumber === true) { - x.s = v.s; - - if (!v.c || v.e > MAX_EXP) { - x.c = x.e = null; - } else if (v.e < MIN_EXP) { - x.c = [x.e = 0]; - } else { - x.e = v.e; - x.c = v.c.slice(); - } - - return; + constructor(opts) { + this.filePath = opts.filePath; + this.formatType = opts.formatType; + this.subjectTokenFieldName = opts.subjectTokenFieldName; + } + /** + * Returns the subject token stored at the file specified in the constructor. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + async getSubjectToken(context) { + // Make sure there is a file at the path. lstatSync will throw if there is + // nothing there. + let parsedFilePath = this.filePath; + try { + // Resolve path to actual file in case of symlink. Expect a thrown error + // if not resolvable. + parsedFilePath = await realpath(parsedFilePath); + if (!(await lstat(parsedFilePath)).isFile()) { + throw new Error(); + } } - - if ((isNum = typeof v == 'number') && v * 0 == 0) { - - // Use `1 / n` to handle minus zero also. - x.s = 1 / v < 0 ? (v = -v, -1) : 1; - - // Fast path for integers, where n < 2147483648 (2**31). - if (v === ~~v) { - for (e = 0, i = v; i >= 10; i /= 10, e++); - - if (e > MAX_EXP) { - x.c = x.e = null; - } else { - x.e = e; - x.c = [v]; + catch (err) { + if (err instanceof Error) { + err.message = `The file at ${parsedFilePath} does not exist, or it is not a file. ${err.message}`; } - - return; - } - - str = String(v); - } else { - - if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum); - - x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1; + throw err; } - - // Decimal point? - if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); - - // Exponential form? - if ((i = str.search(/e/i)) > 0) { - - // Determine exponent. - if (e < 0) e = i; - e += +str.slice(i + 1); - str = str.substring(0, i); - } else if (e < 0) { - - // Integer. - e = str.length; + let subjectToken; + const rawText = await readFile(parsedFilePath, { encoding: 'utf8' }); + if (this.formatType === 'text') { + subjectToken = rawText; } - - } else { - - // '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' - intCheck(b, 2, ALPHABET.length, 'Base'); - - // Allow exponential notation to be used with base 10 argument, while - // also rounding to DECIMAL_PLACES as with other bases. - if (b == 10 && alphabetHasNormalDecimalDigits) { - x = new BigNumber(v); - return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE); + else if (this.formatType === 'json' && this.subjectTokenFieldName) { + const json = JSON.parse(rawText); + subjectToken = json[this.subjectTokenFieldName]; } - - str = String(v); - - if (isNum = typeof v == 'number') { - - // Avoid potential interpretation of Infinity and NaN as base 44+ values. - if (v * 0 != 0) return parseNumeric(x, str, isNum, b); - - x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1; - - // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' - if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) { - throw Error - (tooManyDigits + v); - } - } else { - x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1; + if (!subjectToken) { + throw new Error('Unable to parse the subject_token from the credential_source file'); } + return subjectToken; + } +} +exports.FileSubjectTokenSupplier = FileSubjectTokenSupplier; - alphabet = ALPHABET.slice(0, b); - e = i = 0; - // Check that str is a valid base b number. - // Don't use RegExp, so alphabet can contain special characters. - for (len = str.length; i < len; i++) { - if (alphabet.indexOf(c = str.charAt(i)) < 0) { - if (c == '.') { +/***/ }), - // If '.' is not the first character and it has not be found before. - if (i > e) { - e = len; - continue; - } - } else if (!caseChanged) { +/***/ 20695: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // Allow e.g. hexadecimal 'FF' as well as 'ff'. - if (str == str.toUpperCase() && (str = str.toLowerCase()) || - str == str.toLowerCase() && (str = str.toUpperCase())) { - caseChanged = true; - i = -1; - e = 0; - continue; - } - } +"use strict"; - return parseNumeric(x, String(v), isNum, b); - } +// Copyright 2019 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _GoogleAuth_instances, _GoogleAuth_pendingAuthClient, _GoogleAuth_prepareAndCacheClient, _GoogleAuth_determineClient; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GoogleAuth = exports.GoogleAuthExceptionMessages = exports.CLOUD_SDK_CLIENT_ID = void 0; +const child_process_1 = __nccwpck_require__(32081); +const fs = __nccwpck_require__(57147); +const gcpMetadata = __nccwpck_require__(3563); +const os = __nccwpck_require__(22037); +const path = __nccwpck_require__(71017); +const crypto_1 = __nccwpck_require__(78043); +const transporters_1 = __nccwpck_require__(72649); +const computeclient_1 = __nccwpck_require__(96875); +const idtokenclient_1 = __nccwpck_require__(80298); +const envDetect_1 = __nccwpck_require__(21380); +const jwtclient_1 = __nccwpck_require__(13959); +const refreshclient_1 = __nccwpck_require__(98790); +const impersonated_1 = __nccwpck_require__(91103); +const externalclient_1 = __nccwpck_require__(94381); +const baseexternalclient_1 = __nccwpck_require__(40810); +const authclient_1 = __nccwpck_require__(44627); +const externalAccountAuthorizedUserClient_1 = __nccwpck_require__(38765); +const util_1 = __nccwpck_require__(68905); +exports.CLOUD_SDK_CLIENT_ID = '764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com'; +exports.GoogleAuthExceptionMessages = { + API_KEY_WITH_CREDENTIALS: 'API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.', + NO_PROJECT_ID_FOUND: 'Unable to detect a Project Id in the current environment. \n' + + 'To learn more about authentication and Google APIs, visit: \n' + + 'https://cloud.google.com/docs/authentication/getting-started', + NO_CREDENTIALS_FOUND: 'Unable to find credentials in current environment. \n' + + 'To learn more about authentication and Google APIs, visit: \n' + + 'https://cloud.google.com/docs/authentication/getting-started', + NO_ADC_FOUND: 'Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.', + NO_UNIVERSE_DOMAIN_FOUND: 'Unable to detect a Universe Domain in the current environment.\n' + + 'To learn more about Universe Domain retrieval, visit: \n' + + 'https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys', +}; +class GoogleAuth { + // Note: this properly is only public to satisfy unit tests. + // https://github.com/Microsoft/TypeScript/issues/5228 + get isGCE() { + return this.checkIsGCE; + } + /** + * Configuration is resolved in the following order of precedence: + * - {@link GoogleAuthOptions.credentials `credentials`} + * - {@link GoogleAuthOptions.keyFilename `keyFilename`} + * - {@link GoogleAuthOptions.keyFile `keyFile`} + * + * {@link GoogleAuthOptions.clientOptions `clientOptions`} are passed to the + * {@link AuthClient `AuthClient`s}. + * + * @param opts + */ + constructor(opts = {}) { + _GoogleAuth_instances.add(this); + /** + * Caches a value indicating whether the auth layer is running on Google + * Compute Engine. + * @private + */ + this.checkIsGCE = undefined; + // To save the contents of the JSON credential file + this.jsonContent = null; + this.cachedCredential = null; + /** + * A pending {@link AuthClient}. Used for concurrent {@link GoogleAuth.getClient} calls. + */ + _GoogleAuth_pendingAuthClient.set(this, null); + this.clientOptions = {}; + this._cachedProjectId = opts.projectId || null; + this.cachedCredential = opts.authClient || null; + this.keyFilename = opts.keyFilename || opts.keyFile; + this.scopes = opts.scopes; + this.clientOptions = opts.clientOptions || {}; + this.jsonContent = opts.credentials || null; + this.apiKey = opts.apiKey || this.clientOptions.apiKey || null; + // Cannot use both API Key + Credentials + if (this.apiKey && (this.jsonContent || this.clientOptions.credentials)) { + throw new RangeError(exports.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS); } - - // Prevent later check for length on converted number. - isNum = false; - str = convertBase(str, b, 10, x.s); - - // Decimal point? - if ((e = str.indexOf('.')) > -1) str = str.replace('.', ''); - else e = str.length; - } - - // Determine leading zeros. - for (i = 0; str.charCodeAt(i) === 48; i++); - - // Determine trailing zeros. - for (len = str.length; str.charCodeAt(--len) === 48;); - - if (str = str.slice(i, ++len)) { - len -= i; - - // '[BigNumber Error] Number primitive has more than 15 significant digits: {n}' - if (isNum && BigNumber.DEBUG && - len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) { - throw Error - (tooManyDigits + (x.s * v)); + if (opts.universeDomain) { + this.clientOptions.universeDomain = opts.universeDomain; } - - // Overflow? - if ((e = e - i - 1) > MAX_EXP) { - - // Infinity. - x.c = x.e = null; - - // Underflow? - } else if (e < MIN_EXP) { - - // Zero. - x.c = [x.e = 0]; - } else { - x.e = e; - x.c = []; - - // Transform base - - // e is the base 10 exponent. - // i is where to slice str to get the first element of the coefficient array. - i = (e + 1) % LOG_BASE; - if (e < 0) i += LOG_BASE; // i < 1 - - if (i < len) { - if (i) x.c.push(+str.slice(0, i)); - - for (len -= LOG_BASE; i < len;) { - x.c.push(+str.slice(i, i += LOG_BASE)); - } - - i = LOG_BASE - (str = str.slice(i)).length; - } else { - i -= len; - } - - for (; i--; str += '0'); - x.c.push(+str); + } + // GAPIC client libraries should always use self-signed JWTs. The following + // variables are set on the JWT client in order to indicate the type of library, + // and sign the JWT with the correct audience and scopes (if not supplied). + setGapicJWTValues(client) { + client.defaultServicePath = this.defaultServicePath; + client.useJWTAccessWithScope = this.useJWTAccessWithScope; + client.defaultScopes = this.defaultScopes; + } + getProjectId(callback) { + if (callback) { + this.getProjectIdAsync().then(r => callback(null, r), callback); + } + else { + return this.getProjectIdAsync(); } - } else { - - // Zero. - x.c = [x.e = 0]; - } } - - - // CONSTRUCTOR PROPERTIES - - - BigNumber.clone = clone; - - BigNumber.ROUND_UP = 0; - BigNumber.ROUND_DOWN = 1; - BigNumber.ROUND_CEIL = 2; - BigNumber.ROUND_FLOOR = 3; - BigNumber.ROUND_HALF_UP = 4; - BigNumber.ROUND_HALF_DOWN = 5; - BigNumber.ROUND_HALF_EVEN = 6; - BigNumber.ROUND_HALF_CEIL = 7; - BigNumber.ROUND_HALF_FLOOR = 8; - BigNumber.EUCLID = 9; - - - /* - * Configure infrequently-changing library-wide settings. + /** + * A temporary method for internal `getProjectId` usages where `null` is + * acceptable. In a future major release, `getProjectId` should return `null` + * (as the `Promise` base signature describes) and this private + * method should be removed. * - * Accept an object with the following optional properties (if the value of a property is - * a number, it must be an integer within the inclusive range stated): + * @returns Promise that resolves with project id (or `null`) + */ + async getProjectIdOptional() { + try { + return await this.getProjectId(); + } + catch (e) { + if (e instanceof Error && + e.message === exports.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND) { + return null; + } + else { + throw e; + } + } + } + /** + * A private method for finding and caching a projectId. * - * DECIMAL_PLACES {number} 0 to MAX - * ROUNDING_MODE {number} 0 to 8 - * EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX] - * RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX] - * CRYPTO {boolean} true or false - * MODULO_MODE {number} 0 to 9 - * POW_PRECISION {number} 0 to MAX - * ALPHABET {string} A string of two or more unique characters which does - * not contain '.'. - * FORMAT {object} An object with some of the following properties: - * prefix {string} - * groupSize {number} - * secondaryGroupSize {number} - * groupSeparator {string} - * decimalSeparator {string} - * fractionGroupSize {number} - * fractionGroupSeparator {string} - * suffix {string} + * Supports environments in order of precedence: + * - GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable + * - GOOGLE_APPLICATION_CREDENTIALS JSON file + * - Cloud SDK: `gcloud config config-helper --format json` + * - GCE project ID from metadata server * - * (The values assigned to the above FORMAT object properties are not checked for validity.) + * @returns projectId + */ + async findAndCacheProjectId() { + let projectId = null; + projectId || (projectId = await this.getProductionProjectId()); + projectId || (projectId = await this.getFileProjectId()); + projectId || (projectId = await this.getDefaultServiceProjectId()); + projectId || (projectId = await this.getGCEProjectId()); + projectId || (projectId = await this.getExternalAccountClientProjectId()); + if (projectId) { + this._cachedProjectId = projectId; + return projectId; + } + else { + throw new Error(exports.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND); + } + } + async getProjectIdAsync() { + if (this._cachedProjectId) { + return this._cachedProjectId; + } + if (!this._findProjectIdPromise) { + this._findProjectIdPromise = this.findAndCacheProjectId(); + } + return this._findProjectIdPromise; + } + /** + * Retrieves a universe domain from the metadata server via + * {@link gcpMetadata.universe}. * - * E.g. - * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * @returns a universe domain + */ + async getUniverseDomainFromMetadataServer() { + var _a; + let universeDomain; + try { + universeDomain = await gcpMetadata.universe('universe-domain'); + universeDomain || (universeDomain = authclient_1.DEFAULT_UNIVERSE); + } + catch (e) { + if (e && ((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { + universeDomain = authclient_1.DEFAULT_UNIVERSE; + } + else { + throw e; + } + } + return universeDomain; + } + /** + * Retrieves, caches, and returns the universe domain in the following order + * of precedence: + * - The universe domain in {@link GoogleAuth.clientOptions} + * - An existing or ADC {@link AuthClient}'s universe domain + * - {@link gcpMetadata.universe}, if {@link Compute} client * - * Ignore properties/parameters set to null or undefined, except for ALPHABET. + * @returns The universe domain + */ + async getUniverseDomain() { + let universeDomain = (0, util_1.originalOrCamelOptions)(this.clientOptions).get('universe_domain'); + try { + universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = (await this.getClient()).universeDomain); + } + catch (_a) { + // client or ADC is not available + universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = authclient_1.DEFAULT_UNIVERSE); + } + return universeDomain; + } + /** + * @returns Any scopes (user-specified or default scopes specified by the + * client library) that need to be set on the current Auth client. + */ + getAnyScopes() { + return this.scopes || this.defaultScopes; + } + getApplicationDefault(optionsOrCallback = {}, callback) { + let options; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else { + options = optionsOrCallback; + } + if (callback) { + this.getApplicationDefaultAsync(options).then(r => callback(null, r.credential, r.projectId), callback); + } + else { + return this.getApplicationDefaultAsync(options); + } + } + async getApplicationDefaultAsync(options = {}) { + // If we've already got a cached credential, return it. + // This will also preserve one's configured quota project, in case they + // set one directly on the credential previously. + if (this.cachedCredential) { + // cache, while preserving existing quota project preferences + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, this.cachedCredential, null); + } + let credential; + // Check for the existence of a local environment variable pointing to the + // location of the credential file. This is typically used in local + // developer scenarios. + credential = + await this._tryGetApplicationCredentialsFromEnvironmentVariable(options); + if (credential) { + if (credential instanceof jwtclient_1.JWT) { + credential.scopes = this.scopes; + } + else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { + credential.scopes = this.getAnyScopes(); + } + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, credential); + } + // Look in the well-known credential file location. + credential = + await this._tryGetApplicationCredentialsFromWellKnownFile(options); + if (credential) { + if (credential instanceof jwtclient_1.JWT) { + credential.scopes = this.scopes; + } + else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { + credential.scopes = this.getAnyScopes(); + } + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, credential); + } + // Determine if we're running on GCE. + if (await this._checkIsGCE()) { + options.scopes = this.getAnyScopes(); + return await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, new computeclient_1.Compute(options)); + } + throw new Error(exports.GoogleAuthExceptionMessages.NO_ADC_FOUND); + } + /** + * Determines whether the auth layer is running on Google Compute Engine. + * Checks for GCP Residency, then fallback to checking if metadata server + * is available. * - * Return an object with the properties current values. + * @returns A promise that resolves with the boolean. + * @api private */ - BigNumber.config = BigNumber.set = function (obj) { - var p, v; - - if (obj != null) { - - if (typeof obj == 'object') { - - // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. - // '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) { - v = obj[p]; - intCheck(v, 0, MAX, p); - DECIMAL_PLACES = v; - } - - // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. - // '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) { - v = obj[p]; - intCheck(v, 0, 8, p); - ROUNDING_MODE = v; - } - - // EXPONENTIAL_AT {number|number[]} - // Integer, -MAX to MAX inclusive or - // [integer -MAX to 0 inclusive, 0 to MAX inclusive]. - // '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) { - v = obj[p]; - if (v && v.pop) { - intCheck(v[0], -MAX, 0, p); - intCheck(v[1], 0, MAX, p); - TO_EXP_NEG = v[0]; - TO_EXP_POS = v[1]; - } else { - intCheck(v, -MAX, MAX, p); - TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v); + async _checkIsGCE() { + if (this.checkIsGCE === undefined) { + this.checkIsGCE = + gcpMetadata.getGCPResidency() || (await gcpMetadata.isAvailable()); + } + return this.checkIsGCE; + } + /** + * Attempts to load default credentials from the environment variable path.. + * @returns Promise that resolves with the OAuth2Client or null. + * @api private + */ + async _tryGetApplicationCredentialsFromEnvironmentVariable(options) { + const credentialsPath = process.env['GOOGLE_APPLICATION_CREDENTIALS'] || + process.env['google_application_credentials']; + if (!credentialsPath || credentialsPath.length === 0) { + return null; + } + try { + return this._getApplicationCredentialsFromFilePath(credentialsPath, options); + } + catch (e) { + if (e instanceof Error) { + e.message = `Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${e.message}`; } - } - - // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or - // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. - // '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}' - if (obj.hasOwnProperty(p = 'RANGE')) { - v = obj[p]; - if (v && v.pop) { - intCheck(v[0], -MAX, -1, p); - intCheck(v[1], 1, MAX, p); - MIN_EXP = v[0]; - MAX_EXP = v[1]; - } else { - intCheck(v, -MAX, MAX, p); - if (v) { - MIN_EXP = -(MAX_EXP = v < 0 ? -v : v); - } else { - throw Error - (bignumberError + p + ' cannot be zero: ' + v); - } + throw e; + } + } + /** + * Attempts to load default credentials from a well-known file location + * @return Promise that resolves with the OAuth2Client or null. + * @api private + */ + async _tryGetApplicationCredentialsFromWellKnownFile(options) { + // First, figure out the location of the file, depending upon the OS type. + let location = null; + if (this._isWindows()) { + // Windows + location = process.env['APPDATA']; + } + else { + // Linux or Mac + const home = process.env['HOME']; + if (home) { + location = path.join(home, '.config'); } - } - - // CRYPTO {boolean} true or false. - // '[BigNumber Error] CRYPTO not true or false: {v}' - // '[BigNumber Error] crypto unavailable' - if (obj.hasOwnProperty(p = 'CRYPTO')) { - v = obj[p]; - if (v === !!v) { - if (v) { - if (typeof crypto != 'undefined' && crypto && - (crypto.getRandomValues || crypto.randomBytes)) { - CRYPTO = v; - } else { - CRYPTO = !v; - throw Error - (bignumberError + 'crypto unavailable'); - } - } else { - CRYPTO = v; - } - } else { - throw Error - (bignumberError + p + ' not true or false: ' + v); + } + // If we found the root path, expand it. + if (location) { + location = path.join(location, 'gcloud', 'application_default_credentials.json'); + if (!fs.existsSync(location)) { + location = null; } - } - - // MODULO_MODE {number} Integer, 0 to 9 inclusive. - // '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'MODULO_MODE')) { - v = obj[p]; - intCheck(v, 0, 9, p); - MODULO_MODE = v; - } - - // POW_PRECISION {number} Integer, 0 to MAX inclusive. - // '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}' - if (obj.hasOwnProperty(p = 'POW_PRECISION')) { - v = obj[p]; - intCheck(v, 0, MAX, p); - POW_PRECISION = v; - } - - // FORMAT {object} - // '[BigNumber Error] FORMAT not an object: {v}' - if (obj.hasOwnProperty(p = 'FORMAT')) { - v = obj[p]; - if (typeof v == 'object') FORMAT = v; - else throw Error - (bignumberError + p + ' not an object: ' + v); - } - - // ALPHABET {string} - // '[BigNumber Error] ALPHABET invalid: {v}' - if (obj.hasOwnProperty(p = 'ALPHABET')) { - v = obj[p]; - - // Disallow if less than two characters, - // or if it contains '+', '-', '.', whitespace, or a repeated character. - if (typeof v == 'string' && !/^.?$|[+\-.\s]|(.).*\1/.test(v)) { - alphabetHasNormalDecimalDigits = v.slice(0, 10) == '0123456789'; - ALPHABET = v; - } else { - throw Error - (bignumberError + p + ' invalid: ' + v); + } + // The file does not exist. + if (!location) { + return null; + } + // The file seems to exist. Try to use it. + const client = await this._getApplicationCredentialsFromFilePath(location, options); + return client; + } + /** + * Attempts to load default credentials from a file at the given path.. + * @param filePath The path to the file to read. + * @returns Promise that resolves with the OAuth2Client + * @api private + */ + async _getApplicationCredentialsFromFilePath(filePath, options = {}) { + // Make sure the path looks like a string. + if (!filePath || filePath.length === 0) { + throw new Error('The file path is invalid.'); + } + // Make sure there is a file at the path. lstatSync will throw if there is + // nothing there. + try { + // Resolve path to actual file in case of symlink. Expect a thrown error + // if not resolvable. + filePath = fs.realpathSync(filePath); + if (!fs.lstatSync(filePath).isFile()) { + throw new Error(); } - } - - } else { - - // '[BigNumber Error] Object expected: {v}' - throw Error - (bignumberError + 'Object expected: ' + obj); } - } - - return { - DECIMAL_PLACES: DECIMAL_PLACES, - ROUNDING_MODE: ROUNDING_MODE, - EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS], - RANGE: [MIN_EXP, MAX_EXP], - CRYPTO: CRYPTO, - MODULO_MODE: MODULO_MODE, - POW_PRECISION: POW_PRECISION, - FORMAT: FORMAT, - ALPHABET: ALPHABET - }; - }; - - - /* - * Return true if v is a BigNumber instance, otherwise return false. - * - * If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed. + catch (err) { + if (err instanceof Error) { + err.message = `The file at ${filePath} does not exist, or it is not a file. ${err.message}`; + } + throw err; + } + // Now open a read stream on the file, and parse it. + const readStream = fs.createReadStream(filePath); + return this.fromStream(readStream, options); + } + /** + * Create a credentials instance using a given impersonated input options. + * @param json The impersonated input object. + * @returns JWT or UserRefresh Client with data + */ + fromImpersonatedJSON(json) { + var _a, _b, _c, _d; + if (!json) { + throw new Error('Must pass in a JSON object containing an impersonated refresh token'); + } + if (json.type !== impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { + throw new Error(`The incoming JSON object does not have the "${impersonated_1.IMPERSONATED_ACCOUNT_TYPE}" type`); + } + if (!json.source_credentials) { + throw new Error('The incoming JSON object does not contain a source_credentials field'); + } + if (!json.service_account_impersonation_url) { + throw new Error('The incoming JSON object does not contain a service_account_impersonation_url field'); + } + const sourceClient = this.fromJSON(json.source_credentials); + if (((_a = json.service_account_impersonation_url) === null || _a === void 0 ? void 0 : _a.length) > 256) { + /** + * Prevents DOS attacks. + * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/85} + **/ + throw new RangeError(`Target principal is too long: ${json.service_account_impersonation_url}`); + } + // Extract service account from service_account_impersonation_url + const targetPrincipal = (_c = (_b = /(?[^/]+):(generateAccessToken|generateIdToken)$/.exec(json.service_account_impersonation_url)) === null || _b === void 0 ? void 0 : _b.groups) === null || _c === void 0 ? void 0 : _c.target; + if (!targetPrincipal) { + throw new RangeError(`Cannot extract target principal from ${json.service_account_impersonation_url}`); + } + const targetScopes = (_d = this.getAnyScopes()) !== null && _d !== void 0 ? _d : []; + return new impersonated_1.Impersonated({ + ...json, + sourceClient, + targetPrincipal, + targetScopes: Array.isArray(targetScopes) ? targetScopes : [targetScopes], + }); + } + /** + * Create a credentials instance using the given input options. + * This client is not cached. * - * v {any} + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. * - * '[BigNumber Error] Invalid BigNumber: {v}' + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data */ - BigNumber.isBigNumber = function (v) { - if (!v || v._isBigNumber !== true) return false; - if (!BigNumber.DEBUG) return true; - - var i, n, - c = v.c, - e = v.e, - s = v.s; - - out: if ({}.toString.call(c) == '[object Array]') { - - if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) { - - // If the first element is zero, the BigNumber value must be zero. - if (c[0] === 0) { - if (e === 0 && c.length === 1) return true; - break out; - } - - // Calculate number of digits that c[0] should have, based on the exponent. - i = (e + 1) % LOG_BASE; - if (i < 1) i += LOG_BASE; - - // Calculate number of digits of c[0]. - //if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) { - if (String(c[0]).length == i) { - - for (i = 0; i < c.length; i++) { - n = c[i]; - if (n < 0 || n >= BASE || n !== mathfloor(n)) break out; - } - - // Last element cannot be zero, unless it is the only element. - if (n !== 0) return true; - } + fromJSON(json, options = {}) { + let client; + // user's preferred universe domain + const preferredUniverseDomain = (0, util_1.originalOrCamelOptions)(options).get('universe_domain'); + if (json.type === refreshclient_1.USER_REFRESH_ACCOUNT_TYPE) { + client = new refreshclient_1.UserRefreshClient(options); + client.fromJSON(json); } - - // Infinity/NaN - } else if (c === null && e === null && (s === null || s === 1 || s === -1)) { - return true; - } - - throw Error - (bignumberError + 'Invalid BigNumber: ' + v); - }; - - - /* - * Return a new BigNumber whose value is the maximum of the arguments. - * - * arguments {number|string|BigNumber} + else if (json.type === impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { + client = this.fromImpersonatedJSON(json); + } + else if (json.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + client = externalclient_1.ExternalAccountClient.fromJSON(json, options); + client.scopes = this.getAnyScopes(); + } + else if (json.type === externalAccountAuthorizedUserClient_1.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE) { + client = new externalAccountAuthorizedUserClient_1.ExternalAccountAuthorizedUserClient(json, options); + } + else { + options.scopes = this.scopes; + client = new jwtclient_1.JWT(options); + this.setGapicJWTValues(client); + client.fromJSON(json); + } + if (preferredUniverseDomain) { + client.universeDomain = preferredUniverseDomain; + } + return client; + } + /** + * Return a JWT or UserRefreshClient from JavaScript object, caching both the + * object used to instantiate and the client. + * @param json The input object. + * @param options The JWT or UserRefresh options for the client + * @returns JWT or UserRefresh Client with data */ - BigNumber.maximum = BigNumber.max = function () { - return maxOrMin(arguments, -1); - }; - - - /* - * Return a new BigNumber whose value is the minimum of the arguments. + _cacheClientFromJSON(json, options) { + const client = this.fromJSON(json, options); + // cache both raw data used to instantiate client and client itself. + this.jsonContent = json; + this.cachedCredential = client; + return client; + } + fromStream(inputStream, optionsOrCallback = {}, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else { + options = optionsOrCallback; + } + if (callback) { + this.fromStreamAsync(inputStream, options).then(r => callback(null, r), callback); + } + else { + return this.fromStreamAsync(inputStream, options); + } + } + fromStreamAsync(inputStream, options) { + return new Promise((resolve, reject) => { + if (!inputStream) { + throw new Error('Must pass in a stream containing the Google auth settings.'); + } + const chunks = []; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => chunks.push(chunk)) + .on('end', () => { + try { + try { + const data = JSON.parse(chunks.join('')); + const r = this._cacheClientFromJSON(data, options); + return resolve(r); + } + catch (err) { + // If we failed parsing this.keyFileName, assume that it + // is a PEM or p12 certificate: + if (!this.keyFilename) + throw err; + const client = new jwtclient_1.JWT({ + ...this.clientOptions, + keyFile: this.keyFilename, + }); + this.cachedCredential = client; + this.setGapicJWTValues(client); + return resolve(client); + } + } + catch (err) { + return reject(err); + } + }); + }); + } + /** + * Create a credentials instance using the given API key string. + * The created client is not cached. In order to create and cache it use the {@link GoogleAuth.getClient `getClient`} method after first providing an {@link GoogleAuth.apiKey `apiKey`}. * - * arguments {number|string|BigNumber} + * @param apiKey The API key string + * @param options An optional options object. + * @returns A JWT loaded from the key */ - BigNumber.minimum = BigNumber.min = function () { - return maxOrMin(arguments, 1); - }; - - - /* - * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, - * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing - * zeros are produced). - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}' - * '[BigNumber Error] crypto unavailable' + fromAPIKey(apiKey, options = {}) { + return new jwtclient_1.JWT({ ...options, apiKey }); + } + /** + * Determines whether the current operating system is Windows. + * @api private */ - BigNumber.random = (function () { - var pow2_53 = 0x20000000000000; - - // Return a 53 bit integer n, where 0 <= n < 9007199254740992. - // Check if Math.random() produces more than 32 bits of randomness. - // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. - // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. - var random53bitInt = (Math.random() * pow2_53) & 0x1fffff - ? function () { return mathfloor(Math.random() * pow2_53); } - : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + - (Math.random() * 0x800000 | 0); }; - - return function (dp) { - var a, b, e, k, v, - i = 0, - c = [], - rand = new BigNumber(ONE); - - if (dp == null) dp = DECIMAL_PLACES; - else intCheck(dp, 0, MAX); - - k = mathceil(dp / LOG_BASE); - - if (CRYPTO) { - - // Browsers supporting crypto.getRandomValues. - if (crypto.getRandomValues) { - - a = crypto.getRandomValues(new Uint32Array(k *= 2)); - - for (; i < k;) { - - // 53 bits: - // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) - // 11111 11111111 11111111 11111111 11100000 00000000 00000000 - // ((Math.pow(2, 32) - 1) >>> 11).toString(2) - // 11111 11111111 11111111 - // 0x20000 is 2^21. - v = a[i] * 0x20000 + (a[i + 1] >>> 11); - - // Rejection sampling: - // 0 <= v < 9007199254740992 - // Probability that v >= 9e15, is - // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 - if (v >= 9e15) { - b = crypto.getRandomValues(new Uint32Array(2)); - a[i] = b[0]; - a[i + 1] = b[1]; - } else { - - // 0 <= v <= 8999999999999999 - // 0 <= (v % 1e14) <= 99999999999999 - c.push(v % 1e14); - i += 2; - } + _isWindows() { + const sys = os.platform(); + if (sys && sys.length >= 3) { + if (sys.substring(0, 3).toLowerCase() === 'win') { + return true; } - i = k / 2; - - // Node.js supporting crypto.randomBytes. - } else if (crypto.randomBytes) { - - // buffer - a = crypto.randomBytes(k *= 7); - - for (; i < k;) { - - // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 - // 0x100000000 is 2^32, 0x1000000 is 2^24 - // 11111 11111111 11111111 11111111 11111111 11111111 11111111 - // 0 <= v < 9007199254740992 - v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) + - (a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) + - (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6]; - - if (v >= 9e15) { - crypto.randomBytes(7).copy(a, i); - } else { - - // 0 <= (v % 1e14) <= 99999999999999 - c.push(v % 1e14); - i += 7; - } + } + return false; + } + /** + * Run the Google Cloud SDK command that prints the default project ID + */ + async getDefaultServiceProjectId() { + return new Promise(resolve => { + (0, child_process_1.exec)('gcloud config config-helper --format json', (err, stdout) => { + if (!err && stdout) { + try { + const projectId = JSON.parse(stdout).configuration.properties.core.project; + resolve(projectId); + return; + } + catch (e) { + // ignore errors + } + } + resolve(null); + }); + }); + } + /** + * Loads the project id from environment variables. + * @api private + */ + getProductionProjectId() { + return (process.env['GCLOUD_PROJECT'] || + process.env['GOOGLE_CLOUD_PROJECT'] || + process.env['gcloud_project'] || + process.env['google_cloud_project']); + } + /** + * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file. + * @api private + */ + async getFileProjectId() { + if (this.cachedCredential) { + // Try to read the project ID from the cached credentials file + return this.cachedCredential.projectId; + } + // Ensure the projectId is loaded from the keyFile if available. + if (this.keyFilename) { + const creds = await this.getClient(); + if (creds && creds.projectId) { + return creds.projectId; } - i = k / 7; - } else { - CRYPTO = false; - throw Error - (bignumberError + 'crypto unavailable'); - } } - - // Use Math.random. - if (!CRYPTO) { - - for (; i < k;) { - v = random53bitInt(); - if (v < 9e15) c[i++] = v % 1e14; - } + // Try to load a credentials file and read its project ID + const r = await this._tryGetApplicationCredentialsFromEnvironmentVariable(); + if (r) { + return r.projectId; } - - k = c[--i]; - dp %= LOG_BASE; - - // Convert trailing digits to zeros according to dp. - if (k && dp) { - v = POWS_TEN[LOG_BASE - dp]; - c[i] = mathfloor(k / v) * v; + else { + return null; } - - // Remove trailing elements which are zero. - for (; c[i] === 0; c.pop(), i--); - - // Zero? - if (i < 0) { - c = [e = 0]; - } else { - - // Remove leading elements which are zero and adjust exponent accordingly. - for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE); - - // Count the digits of the first element of c to determine leading zeros, and... - for (i = 1, v = c[0]; v >= 10; v /= 10, i++); - - // adjust the exponent accordingly. - if (i < LOG_BASE) e -= LOG_BASE - i; + } + /** + * Gets the project ID from external account client if available. + */ + async getExternalAccountClientProjectId() { + if (!this.jsonContent || this.jsonContent.type !== baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { + return null; } - - rand.e = e; - rand.c = c; - return rand; - }; - })(); - - - /* - * Return a BigNumber whose value is the sum of the arguments. - * - * arguments {number|string|BigNumber} + const creds = await this.getClient(); + // Do not suppress the underlying error, as the error could contain helpful + // information for debugging and fixing. This is especially true for + // external account creds as in order to get the project ID, the following + // operations have to succeed: + // 1. Valid credentials file should be supplied. + // 2. Ability to retrieve access tokens from STS token exchange API. + // 3. Ability to exchange for service account impersonated credentials (if + // enabled). + // 4. Ability to get project info using the access token from step 2 or 3. + // Without surfacing the error, it is harder for developers to determine + // which step went wrong. + return await creds.getProjectId(); + } + /** + * Gets the Compute Engine project ID if it can be inferred. */ - BigNumber.sum = function () { - var i = 1, - args = arguments, - sum = new BigNumber(args[0]); - for (; i < args.length;) sum = sum.plus(args[i++]); - return sum; - }; - - - // PRIVATE FUNCTIONS - - - // Called by BigNumber and BigNumber.prototype.toString. - convertBase = (function () { - var decimal = '0123456789'; - - /* - * Convert string of baseIn to an array of numbers of baseOut. - * Eg. toBaseOut('255', 10, 16) returns [15, 15]. - * Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5]. - */ - function toBaseOut(str, baseIn, baseOut, alphabet) { - var j, - arr = [0], - arrL, - i = 0, - len = str.length; - - for (; i < len;) { - for (arrL = arr.length; arrL--; arr[arrL] *= baseIn); - - arr[0] += alphabet.indexOf(str.charAt(i++)); - - for (j = 0; j < arr.length; j++) { - - if (arr[j] > baseOut - 1) { - if (arr[j + 1] == null) arr[j + 1] = 0; - arr[j + 1] += arr[j] / baseOut | 0; - arr[j] %= baseOut; - } - } + async getGCEProjectId() { + try { + const r = await gcpMetadata.project('project-id'); + return r; } - - return arr.reverse(); - } - - // Convert a numeric string of baseIn to a numeric string of baseOut. - // If the caller is toString, we are converting from base 10 to baseOut. - // If the caller is BigNumber, we are converting from baseIn to base 10. - return function (str, baseIn, baseOut, sign, callerIsToString) { - var alphabet, d, e, k, r, x, xc, y, - i = str.indexOf('.'), - dp = DECIMAL_PLACES, - rm = ROUNDING_MODE; - - // Non-integer. - if (i >= 0) { - k = POW_PRECISION; - - // Unlimited precision. - POW_PRECISION = 0; - str = str.replace('.', ''); - y = new BigNumber(baseIn); - x = y.pow(str.length - i); - POW_PRECISION = k; - - // Convert str as if an integer, then restore the fraction part by dividing the - // result by its base raised to a power. - - y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'), - 10, baseOut, decimal); - y.e = y.c.length; + catch (e) { + // Ignore any errors + return null; } - - // Convert the number as integer. - - xc = toBaseOut(str, baseIn, baseOut, callerIsToString - ? (alphabet = ALPHABET, decimal) - : (alphabet = decimal, ALPHABET)); - - // xc now represents str as an integer and converted to baseOut. e is the exponent. - e = k = xc.length; - - // Remove trailing zeros. - for (; xc[--k] == 0; xc.pop()); - - // Zero? - if (!xc[0]) return alphabet.charAt(0); - - // Does str represent an integer? If so, no need for the division. - if (i < 0) { - --e; - } else { - x.c = xc; - x.e = e; - - // The sign is needed for correct rounding. - x.s = sign; - x = div(x, y, dp, rm, baseOut); - xc = x.c; - r = x.r; - e = x.e; + } + getCredentials(callback) { + if (callback) { + this.getCredentialsAsync().then(r => callback(null, r), callback); } - - // xc now represents str converted to baseOut. - - // THe index of the rounding digit. - d = e + dp + 1; - - // The rounding digit: the digit to the right of the digit that may be rounded up. - i = xc[d]; - - // Look at the rounding digits and mode to determine whether to round up. - - k = baseOut / 2; - r = r || d < 0 || xc[d + 1] != null; - - r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) - : i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 || - rm == (x.s < 0 ? 8 : 7)); - - // If the index of the rounding digit is not greater than zero, or xc represents - // zero, then the result of the base conversion is zero or, if rounding up, a value - // such as 0.00001. - if (d < 1 || !xc[0]) { - - // 1^-dp or 0 - str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0); - } else { - - // Truncate xc to the required number of decimal places. - xc.length = d; - - // Round up? - if (r) { - - // Rounding up may mean the previous digit has to be rounded up and so on. - for (--baseOut; ++xc[--d] > baseOut;) { - xc[d] = 0; - - if (!d) { - ++e; - xc = [1].concat(xc); - } - } - } - - // Determine trailing zeros. - for (k = xc.length; !xc[--k];); - - // E.g. [4, 11, 15] becomes 4bf. - for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++])); - - // Add leading zeros, decimal point and trailing zeros as required. - str = toFixedPoint(str, e, alphabet.charAt(0)); + else { + return this.getCredentialsAsync(); } - - // The caller will add the sign. - return str; - }; - })(); - - - // Perform division in the specified base. Called by div and convertBase. - div = (function () { - - // Assume non-zero x and k. - function multiply(x, k, base) { - var m, temp, xlo, xhi, - carry = 0, - i = x.length, - klo = k % SQRT_BASE, - khi = k / SQRT_BASE | 0; - - for (x = x.slice(); i--;) { - xlo = x[i] % SQRT_BASE; - xhi = x[i] / SQRT_BASE | 0; - m = khi * xlo + xhi * klo; - temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry; - carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi; - x[i] = temp % base; + } + async getCredentialsAsync() { + const client = await this.getClient(); + if (client instanceof impersonated_1.Impersonated) { + return { client_email: client.getTargetPrincipal() }; } - - if (carry) x = [carry].concat(x); - - return x; - } - - function compare(a, b, aL, bL) { - var i, cmp; - - if (aL != bL) { - cmp = aL > bL ? 1 : -1; - } else { - - for (i = cmp = 0; i < aL; i++) { - - if (a[i] != b[i]) { - cmp = a[i] > b[i] ? 1 : -1; - break; + if (client instanceof baseexternalclient_1.BaseExternalAccountClient) { + const serviceAccountEmail = client.getServiceAccountEmail(); + if (serviceAccountEmail) { + return { + client_email: serviceAccountEmail, + universe_domain: client.universeDomain, + }; } - } } - - return cmp; - } - - function subtract(a, b, aL, base) { - var i = 0; - - // Subtract b from a. - for (; aL--;) { - a[aL] -= i; - i = a[aL] < b[aL] ? 1 : 0; - a[aL] = i * base + a[aL] - b[aL]; + if (this.jsonContent) { + return { + client_email: this.jsonContent.client_email, + private_key: this.jsonContent.private_key, + universe_domain: this.jsonContent.universe_domain, + }; } - - // Remove leading zeros. - for (; !a[0] && a.length > 1; a.splice(0, 1)); - } - - // x: dividend, y: divisor. - return function (x, y, dp, rm, base) { - var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, - yL, yz, - s = x.s == y.s ? 1 : -1, - xc = x.c, - yc = y.c; - - // Either NaN, Infinity or 0? - if (!xc || !xc[0] || !yc || !yc[0]) { - - return new BigNumber( - - // Return NaN if either NaN, or both Infinity or 0. - !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : - - // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. - xc && xc[0] == 0 || !yc ? s * 0 : s / 0 - ); + if (await this._checkIsGCE()) { + const [client_email, universe_domain] = await Promise.all([ + gcpMetadata.instance('service-accounts/default/email'), + this.getUniverseDomain(), + ]); + return { client_email, universe_domain }; } - - q = new BigNumber(s); - qc = q.c = []; - e = x.e - y.e; - s = dp + e + 1; - - if (!base) { - base = BASE; - e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE); - s = s / LOG_BASE | 0; + throw new Error(exports.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND); + } + /** + * Automatically obtain an {@link AuthClient `AuthClient`} based on the + * provided configuration. If no options were passed, use Application + * Default Credentials. + */ + async getClient() { + if (this.cachedCredential) { + return this.cachedCredential; } - - // Result exponent may be one less then the current value of e. - // The coefficients of the BigNumbers from convertBase may have trailing zeros. - for (i = 0; yc[i] == (xc[i] || 0); i++); - - if (yc[i] > (xc[i] || 0)) e--; - - if (s < 0) { - qc.push(1); - more = true; - } else { - xL = xc.length; - yL = yc.length; - i = 0; - s += 2; - - // Normalise xc and yc so highest order digit of yc is >= base / 2. - - n = mathfloor(base / (yc[0] + 1)); - - // Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1. - // if (n > 1 || n++ == 1 && yc[0] < base / 2) { - if (n > 1) { - yc = multiply(yc, n, base); - xc = multiply(xc, n, base); - yL = yc.length; - xL = xc.length; - } - - xi = yL; - rem = xc.slice(0, yL); - remL = rem.length; - - // Add zeros to make remainder as long as divisor. - for (; remL < yL; rem[remL++] = 0); - yz = yc.slice(); - yz = [0].concat(yz); - yc0 = yc[0]; - if (yc[1] >= base / 2) yc0++; - // Not necessary, but to prevent trial digit n > base, when using base 3. - // else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15; - - do { - n = 0; - - // Compare divisor and remainder. - cmp = compare(yc, rem, yL, remL); - - // If divisor < remainder. - if (cmp < 0) { - - // Calculate trial digit, n. - - rem0 = rem[0]; - if (yL != remL) rem0 = rem0 * base + (rem[1] || 0); - - // n is how many times the divisor goes into the current remainder. - n = mathfloor(rem0 / yc0); - - // Algorithm: - // product = divisor multiplied by trial digit (n). - // Compare product and remainder. - // If product is greater than remainder: - // Subtract divisor from product, decrement trial digit. - // Subtract product from remainder. - // If product was less than remainder at the last compare: - // Compare new remainder and divisor. - // If remainder is greater than divisor: - // Subtract divisor from remainder, increment trial digit. - - if (n > 1) { - - // n may be > base only when base is 3. - if (n >= base) n = base - 1; - - // product = divisor * trial digit. - prod = multiply(yc, n, base); - prodL = prod.length; - remL = rem.length; - - // Compare product and remainder. - // If product > remainder then trial digit n too high. - // n is 1 too high about 5% of the time, and is not known to have - // ever been more than 1 too high. - while (compare(prod, rem, prodL, remL) == 1) { - n--; - - // Subtract divisor from product. - subtract(prod, yL < prodL ? yz : yc, prodL, base); - prodL = prod.length; - cmp = 1; - } - } else { - - // n is 0 or 1, cmp is -1. - // If n is 0, there is no need to compare yc and rem again below, - // so change cmp to 1 to avoid it. - // If n is 1, leave cmp as -1, so yc and rem are compared again. - if (n == 0) { - - // divisor < remainder, so n must be at least 1. - cmp = n = 1; - } - - // product = divisor - prod = yc.slice(); - prodL = prod.length; - } - - if (prodL < remL) prod = [0].concat(prod); - - // Subtract product from remainder. - subtract(rem, prod, remL, base); - remL = rem.length; - - // If product was < remainder. - if (cmp == -1) { - - // Compare divisor and new remainder. - // If divisor < new remainder, subtract divisor from remainder. - // Trial digit n too low. - // n is 1 too low about 5% of the time, and very rarely 2 too low. - while (compare(yc, rem, yL, remL) < 1) { - n++; - - // Subtract divisor from remainder. - subtract(rem, yL < remL ? yz : yc, remL, base); - remL = rem.length; - } - } - } else if (cmp === 0) { - n++; - rem = [0]; - } // else cmp === 1 and n will be 0 - - // Add the next digit, n, to the result array. - qc[i++] = n; - - // Update the remainder. - if (rem[0]) { - rem[remL++] = xc[xi] || 0; - } else { - rem = [xc[xi]]; - remL = 1; - } - } while ((xi++ < xL || rem[0] != null) && s--); - - more = rem[0] != null; - - // Leading zero? - if (!qc[0]) qc.splice(0, 1); + // Use an existing auth client request, or cache a new one + __classPrivateFieldSet(this, _GoogleAuth_pendingAuthClient, __classPrivateFieldGet(this, _GoogleAuth_pendingAuthClient, "f") || __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_determineClient).call(this), "f"); + try { + return await __classPrivateFieldGet(this, _GoogleAuth_pendingAuthClient, "f"); } + finally { + // reset the pending auth client in case it is changed later + __classPrivateFieldSet(this, _GoogleAuth_pendingAuthClient, null, "f"); + } + } + /** + * Creates a client which will fetch an ID token for authorization. + * @param targetAudience the audience for the fetched ID token. + * @returns IdTokenClient for making HTTP calls authenticated with ID tokens. + */ + async getIdTokenClient(targetAudience) { + const client = await this.getClient(); + if (!('fetchIdToken' in client)) { + throw new Error('Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.'); + } + return new idtokenclient_1.IdTokenClient({ targetAudience, idTokenProvider: client }); + } + /** + * Automatically obtain application default credentials, and return + * an access token for making requests. + */ + async getAccessToken() { + const client = await this.getClient(); + return (await client.getAccessToken()).token; + } + /** + * Obtain the HTTP headers that will provide authorization for a given + * request. + */ + async getRequestHeaders(url) { + const client = await this.getClient(); + return client.getRequestHeaders(url); + } + /** + * Obtain credentials for a request, then attach the appropriate headers to + * the request options. + * @param opts Axios or Request options on which to attach the headers + */ + async authorizeRequest(opts) { + opts = opts || {}; + const url = opts.url || opts.uri; + const client = await this.getClient(); + const headers = await client.getRequestHeaders(url); + opts.headers = Object.assign(opts.headers || {}, headers); + return opts; + } + /** + * Automatically obtain application default credentials, and make an + * HTTP request using the given options. + * @param opts Axios request options for the HTTP request. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + async request(opts) { + const client = await this.getClient(); + return client.request(opts); + } + /** + * Determine the compute environment in which the code is running. + */ + getEnv() { + return (0, envDetect_1.getEnv)(); + } + /** + * Sign the given data with the current private key, or go out + * to the IAM API to sign it. + * @param data The data to be signed. + * @param endpoint A custom endpoint to use. + * + * @example + * ``` + * sign('data', 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/'); + * ``` + */ + async sign(data, endpoint) { + const client = await this.getClient(); + const universe = await this.getUniverseDomain(); + endpoint = + endpoint || + `https://iamcredentials.${universe}/v1/projects/-/serviceAccounts/`; + if (client instanceof impersonated_1.Impersonated) { + const signed = await client.sign(data); + return signed.signedBlob; + } + const crypto = (0, crypto_1.createCrypto)(); + if (client instanceof jwtclient_1.JWT && client.key) { + const sign = await crypto.sign(client.key, data); + return sign; + } + const creds = await this.getCredentials(); + if (!creds.client_email) { + throw new Error('Cannot sign data without `client_email`.'); + } + return this.signBlob(crypto, creds.client_email, data, endpoint); + } + async signBlob(crypto, emailOrUniqueId, data, endpoint) { + const url = new URL(endpoint + `${emailOrUniqueId}:signBlob`); + const res = await this.request({ + method: 'POST', + url: url.href, + data: { + payload: crypto.encodeBase64StringUtf8(data), + }, + retry: true, + retryConfig: { + httpMethodsToRetry: ['POST'], + }, + }); + return res.data.signedBlob; + } +} +exports.GoogleAuth = GoogleAuth; +_GoogleAuth_pendingAuthClient = new WeakMap(), _GoogleAuth_instances = new WeakSet(), _GoogleAuth_prepareAndCacheClient = async function _GoogleAuth_prepareAndCacheClient(credential, quotaProjectIdOverride = process.env['GOOGLE_CLOUD_QUOTA_PROJECT'] || null) { + const projectId = await this.getProjectIdOptional(); + if (quotaProjectIdOverride) { + credential.quotaProjectId = quotaProjectIdOverride; + } + this.cachedCredential = credential; + return { credential, projectId }; +}, _GoogleAuth_determineClient = async function _GoogleAuth_determineClient() { + if (this.jsonContent) { + return this._cacheClientFromJSON(this.jsonContent, this.clientOptions); + } + else if (this.keyFilename) { + const filePath = path.resolve(this.keyFilename); + const stream = fs.createReadStream(filePath); + return await this.fromStreamAsync(stream, this.clientOptions); + } + else if (this.apiKey) { + const client = await this.fromAPIKey(this.apiKey, this.clientOptions); + client.scopes = this.scopes; + const { credential } = await __classPrivateFieldGet(this, _GoogleAuth_instances, "m", _GoogleAuth_prepareAndCacheClient).call(this, client); + return credential; + } + else { + const { credential } = await this.getApplicationDefaultAsync(this.clientOptions); + return credential; + } +}; +/** + * Export DefaultTransporter as a static property of the class. + */ +GoogleAuth.DefaultTransporter = transporters_1.DefaultTransporter; - if (base == BASE) { - - // To calculate q.e, first get the number of digits of qc[0]. - for (i = 1, s = qc[0]; s >= 10; s /= 10, i++); - - round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more); - // Caller is convertBase. - } else { - q.e = e; - q.r = +more; - } +/***/ }), - return q; - }; - })(); +/***/ 39735: +/***/ ((__unused_webpack_module, exports) => { +"use strict"; - /* - * Return a string representing the value of BigNumber n in fixed-point or exponential - * notation rounded to the specified decimal places or significant digits. +// Copyright 2014 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IAMAuth = void 0; +class IAMAuth { + /** + * IAM credentials. * - * n: a BigNumber. - * i: the index of the last digit required (i.e. the digit that may be rounded up). - * rm: the rounding mode. - * id: 1 (toExponential) or 2 (toPrecision). + * @param selector the iam authority selector + * @param token the token + * @constructor */ - function format(n, i, rm, id) { - var c0, e, ne, len, str; - - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); - - if (!n.c) return n.toString(); - - c0 = n.c[0]; - ne = n.e; - - if (i == null) { - str = coeffToString(n.c); - str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) - ? toExponential(str, ne) - : toFixedPoint(str, ne, '0'); - } else { - n = round(new BigNumber(n), i, rm); - - // n.e may have changed if the value was rounded up. - e = n.e; - - str = coeffToString(n.c); - len = str.length; - - // toPrecision returns exponential notation if the number of significant digits - // specified is less than the number of digits necessary to represent the integer - // part of the value in fixed-point notation. - - // Exponential notation. - if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) { - - // Append zeros? - for (; len < i; str += '0', len++); - str = toExponential(str, e); - - // Fixed-point notation. - } else { - i -= ne; - str = toFixedPoint(str, e, '0'); - - // Append zeros? - if (e + 1 > len) { - if (--i > 0) for (str += '.'; i--; str += '0'); - } else { - i += e - len; - if (i > 0) { - if (e + 1 == len) str += '.'; - for (; i--; str += '0'); - } - } - } - } - - return n.s < 0 && c0 ? '-' + str : str; - } - - - // Handle BigNumber.max and BigNumber.min. - // If any number is NaN, return NaN. - function maxOrMin(args, n) { - var k, y, - i = 1, - x = new BigNumber(args[0]); - - for (; i < args.length; i++) { - y = new BigNumber(args[i]); - if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) { - x = y; - } - } - - return x; + constructor(selector, token) { + this.selector = selector; + this.token = token; + this.selector = selector; + this.token = token; } - - - /* - * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. - * Called by minus, plus and times. + /** + * Acquire the HTTP headers required to make an authenticated request. */ - function normalise(n, c, e) { - var i = 1, - j = c.length; - - // Remove trailing zeros. - for (; !c[--j]; c.pop()); - - // Calculate the base 10 exponent. First get the number of digits of c[0]. - for (j = c[0]; j >= 10; j /= 10, i++); - - // Overflow? - if ((e = i + e * LOG_BASE - 1) > MAX_EXP) { - - // Infinity. - n.c = n.e = null; - - // Underflow? - } else if (e < MIN_EXP) { - - // Zero. - n.c = [n.e = 0]; - } else { - n.e = e; - n.c = c; - } - - return n; + getRequestHeaders() { + return { + 'x-goog-iam-authority-selector': this.selector, + 'x-goog-iam-authorization-token': this.token, + }; } +} +exports.IAMAuth = IAMAuth; - // Handle values that fail the validity test in BigNumber. - parseNumeric = (function () { - var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, - dotAfter = /^([^.]+)\.$/, - dotBefore = /^\.([^.]+)$/, - isInfinityOrNaN = /^-?(Infinity|NaN)$/, - whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; - - return function (x, str, isNum, b) { - var base, - s = isNum ? str : str.replace(whitespaceOrPlus, ''); - - // No exception on ±Infinity or NaN. - if (isInfinityOrNaN.test(s)) { - x.s = isNaN(s) ? null : s < 0 ? -1 : 1; - } else { - if (!isNum) { - - // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i - s = s.replace(basePrefix, function (m, p1, p2) { - base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8; - return !b || b == base ? p1 : m; - }); - - if (b) { - base = b; - - // E.g. '1.' to '1', '.1' to '0.1' - s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1'); - } - - if (str != s) return new BigNumber(s, base); - } - - // '[BigNumber Error] Not a number: {n}' - // '[BigNumber Error] Not a base {b} number: {n}' - if (BigNumber.DEBUG) { - throw Error - (bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str); - } - - // NaN - x.s = null; - } +/***/ }), - x.c = x.e = null; - } - })(); +/***/ 20117: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; - /* - * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. - * If r is truthy, it is known that there are more digits after the rounding digit. +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IdentityPoolClient = void 0; +const baseexternalclient_1 = __nccwpck_require__(40810); +const util_1 = __nccwpck_require__(68905); +const filesubjecttokensupplier_1 = __nccwpck_require__(27646); +const urlsubjecttokensupplier_1 = __nccwpck_require__(7428); +/** + * Defines the Url-sourced and file-sourced external account clients mainly + * used for K8s and Azure workloads. + */ +class IdentityPoolClient extends baseexternalclient_1.BaseExternalAccountClient { + /** + * Instantiate an IdentityPoolClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid file-sourced or + * url-sourced credential or a workforce pool user project is provided + * with a non workforce audience. + * @param options The external account options object typically loaded + * from the external account JSON credential file. The camelCased options + * are aliases for the snake_cased options. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. */ - function round(x, sd, rm, r) { - var d, i, j, k, n, ni, rd, - xc = x.c, - pows10 = POWS_TEN; - - // if x is not Infinity or NaN... - if (xc) { - - // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. - // n is a base 1e14 number, the value of the element of array x.c containing rd. - // ni is the index of n within x.c. - // d is the number of digits of n. - // i is the index of rd within n including leading zeros. - // j is the actual index of rd within n (if < 0, rd is a leading zero). - out: { - - // Get the number of digits of the first element of xc. - for (d = 1, k = xc[0]; k >= 10; k /= 10, d++); - i = sd - d; - - // If the rounding digit is in the first element of xc... - if (i < 0) { - i += LOG_BASE; - j = sd; - n = xc[ni = 0]; - - // Get the rounding digit at index j of n. - rd = mathfloor(n / pows10[d - j - 1] % 10); - } else { - ni = mathceil((i + 1) / LOG_BASE); - - if (ni >= xc.length) { - - if (r) { - - // Needed by sqrt. - for (; xc.length <= ni; xc.push(0)); - n = rd = 0; - d = 1; - i %= LOG_BASE; - j = i - LOG_BASE + 1; - } else { - break out; - } - } else { - n = k = xc[ni]; - - // Get the number of digits of n. - for (d = 1; k >= 10; k /= 10, d++); - - // Get the index of rd within n. - i %= LOG_BASE; - - // Get the index of rd within n, adjusted for leading zeros. - // The number of leading zeros of n is given by LOG_BASE - d. - j = i - LOG_BASE + d; - - // Get the rounding digit at index j of n. - rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10); + constructor(options, additionalOptions) { + super(options, additionalOptions); + const opts = (0, util_1.originalOrCamelOptions)(options); + const credentialSource = opts.get('credential_source'); + const subjectTokenSupplier = opts.get('subject_token_supplier'); + // Validate credential sourcing configuration. + if (!credentialSource && !subjectTokenSupplier) { + throw new Error('A credential source or subject token supplier must be specified.'); + } + if (credentialSource && subjectTokenSupplier) { + throw new Error('Only one of credential source or subject token supplier can be specified.'); + } + if (subjectTokenSupplier) { + this.subjectTokenSupplier = subjectTokenSupplier; + this.credentialSourceType = 'programmatic'; + } + else { + const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); + const formatOpts = (0, util_1.originalOrCamelOptions)(credentialSourceOpts.get('format')); + // Text is the default format type. + const formatType = formatOpts.get('type') || 'text'; + const formatSubjectTokenFieldName = formatOpts.get('subject_token_field_name'); + if (formatType !== 'json' && formatType !== 'text') { + throw new Error(`Invalid credential_source format "${formatType}"`); } - } - - r = r || sd < 0 || - - // Are there any non-zero digits after the rounding digit? - // The expression n % pows10[d - j - 1] returns all digits of n to the right - // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. - xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]); - - r = rm < 4 - ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) - : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && - - // Check whether the digit to the left of the rounding digit is odd. - ((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 || - rm == (x.s < 0 ? 8 : 7)); - - if (sd < 1 || !xc[0]) { - xc.length = 0; - - if (r) { - - // Convert sd to decimal places. - sd -= x.e + 1; - - // 1, 0.1, 0.01, 0.001, 0.0001 etc. - xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE]; - x.e = -sd || 0; - } else { - - // Zero. - xc[0] = x.e = 0; + if (formatType === 'json' && !formatSubjectTokenFieldName) { + throw new Error('Missing subject_token_field_name for JSON credential_source format'); } - - return x; - } - - // Remove excess digits. - if (i == 0) { - xc.length = ni; - k = 1; - ni--; - } else { - xc.length = ni + 1; - k = pows10[LOG_BASE - i]; - - // E.g. 56700 becomes 56000 if 7 is the rounding digit. - // j > 0 means i > number of leading zeros of n. - xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0; - } - - // Round up? - if (r) { - - for (; ;) { - - // If the digit to be rounded up is in the first element of xc... - if (ni == 0) { - - // i will be the length of xc[0] before k is added. - for (i = 1, j = xc[0]; j >= 10; j /= 10, i++); - j = xc[0] += k; - for (k = 1; j >= 10; j /= 10, k++); - - // if i != k the length has increased. - if (i != k) { - x.e++; - if (xc[0] == BASE) xc[0] = 1; - } - - break; - } else { - xc[ni] += k; - if (xc[ni] != BASE) break; - xc[ni--] = 0; - k = 1; - } + const file = credentialSourceOpts.get('file'); + const url = credentialSourceOpts.get('url'); + const headers = credentialSourceOpts.get('headers'); + if (file && url) { + throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); + } + else if (file && !url) { + this.credentialSourceType = 'file'; + this.subjectTokenSupplier = new filesubjecttokensupplier_1.FileSubjectTokenSupplier({ + filePath: file, + formatType: formatType, + subjectTokenFieldName: formatSubjectTokenFieldName, + }); + } + else if (!file && url) { + this.credentialSourceType = 'url'; + this.subjectTokenSupplier = new urlsubjecttokensupplier_1.UrlSubjectTokenSupplier({ + url: url, + formatType: formatType, + subjectTokenFieldName: formatSubjectTokenFieldName, + headers: headers, + additionalGaxiosOptions: IdentityPoolClient.RETRY_CONFIG, + }); + } + else { + throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); } - } - - // Remove trailing zeros. - for (i = xc.length; xc[--i] === 0; xc.pop()); - } - - // Overflow? Infinity. - if (x.e > MAX_EXP) { - x.c = x.e = null; - - // Underflow? Zero. - } else if (x.e < MIN_EXP) { - x.c = [x.e = 0]; } - } - - return x; } + /** + * Triggered when a external subject token is needed to be exchanged for a GCP + * access token via GCP STS endpoint. Gets a subject token by calling + * the configured {@link SubjectTokenSupplier} + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + return this.subjectTokenSupplier.getSubjectToken(this.supplierContext); + } +} +exports.IdentityPoolClient = IdentityPoolClient; - function valueOf(n) { - var str, - e = n.e; - - if (e === null) return n.toString(); +/***/ }), - str = coeffToString(n.c); +/***/ 80298: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - str = e <= TO_EXP_NEG || e >= TO_EXP_POS - ? toExponential(str, e) - : toFixedPoint(str, e, '0'); +"use strict"; - return n.s < 0 ? '-' + str : str; +// Copyright 2020 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IdTokenClient = void 0; +const oauth2client_1 = __nccwpck_require__(3936); +class IdTokenClient extends oauth2client_1.OAuth2Client { + /** + * Google ID Token client + * + * Retrieve ID token from the metadata server. + * See: https://cloud.google.com/docs/authentication/get-id-token#metadata-server + */ + constructor(options) { + super(options); + this.targetAudience = options.targetAudience; + this.idTokenProvider = options.idTokenProvider; } + async getRequestMetadataAsync( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + url) { + if (!this.credentials.id_token || + !this.credentials.expiry_date || + this.isTokenExpiring()) { + const idToken = await this.idTokenProvider.fetchIdToken(this.targetAudience); + this.credentials = { + id_token: idToken, + expiry_date: this.getIdTokenExpiryDate(idToken), + }; + } + const headers = { + Authorization: 'Bearer ' + this.credentials.id_token, + }; + return { headers }; + } + getIdTokenExpiryDate(idToken) { + const payloadB64 = idToken.split('.')[1]; + if (payloadB64) { + const payload = JSON.parse(Buffer.from(payloadB64, 'base64').toString('ascii')); + return payload.exp * 1000; + } + } +} +exports.IdTokenClient = IdTokenClient; - // PROTOTYPE/INSTANCE METHODS - - - /* - * Return a new BigNumber whose value is the absolute value of this BigNumber. - */ - P.absoluteValue = P.abs = function () { - var x = new BigNumber(this); - if (x.s < 0) x.s = 1; - return x; - }; - +/***/ }), - /* - * Return - * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), - * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), - * 0 if they have the same value, - * or null if the value of either is NaN. - */ - P.comparedTo = function (y, b) { - return compare(this, new BigNumber(y, b)); - }; +/***/ 91103: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; - /* - * If dp is undefined or null or true or false, return the number of decimal places of the - * value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. +/** + * Copyright 2021 Google LLC + * + * 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. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Impersonated = exports.IMPERSONATED_ACCOUNT_TYPE = void 0; +const oauth2client_1 = __nccwpck_require__(3936); +const gaxios_1 = __nccwpck_require__(59555); +const util_1 = __nccwpck_require__(68905); +exports.IMPERSONATED_ACCOUNT_TYPE = 'impersonated_service_account'; +class Impersonated extends oauth2client_1.OAuth2Client { + /** + * Impersonated service account credentials. * - * Otherwise, if dp is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. + * Create a new access token by impersonating another service account. * - * [dp] {number} Decimal places: integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * Impersonated Credentials allowing credentials issued to a user or + * service account to impersonate another. The source project using + * Impersonated Credentials must enable the "IAMCredentials" API. + * Also, the target service account must grant the orginating principal + * the "Service Account Token Creator" IAM role. * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' + * @param {object} options - The configuration object. + * @param {object} [options.sourceClient] the source credential used as to + * acquire the impersonated credentials. + * @param {string} [options.targetPrincipal] the service account to + * impersonate. + * @param {string[]} [options.delegates] the chained list of delegates + * required to grant the final access_token. If set, the sequence of + * identities must have "Service Account Token Creator" capability granted to + * the preceding identity. For example, if set to [serviceAccountB, + * serviceAccountC], the sourceCredential must have the Token Creator role on + * serviceAccountB. serviceAccountB must have the Token Creator on + * serviceAccountC. Finally, C must have Token Creator on target_principal. + * If left unset, sourceCredential must have that role on targetPrincipal. + * @param {string[]} [options.targetScopes] scopes to request during the + * authorization grant. + * @param {number} [options.lifetime] number of seconds the delegated + * credential should be valid for up to 3600 seconds by default, or 43,200 + * seconds by extending the token's lifetime, see: + * https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials#sa-credentials-oauth + * @param {string} [options.endpoint] api endpoint override. */ - P.decimalPlaces = P.dp = function (dp, rm) { - var c, n, v, - x = this; - - if (dp != null) { - intCheck(dp, 0, MAX); - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); - - return round(new BigNumber(x), dp + x.e + 1, rm); - } - - if (!(c = x.c)) return null; - n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE; - - // Subtract the number of trailing zeros of the last number. - if (v = c[v]) for (; v % 10 == 0; v /= 10, n--); - if (n < 0) n = 0; - - return n; - }; - - - /* - * n / 0 = I - * n / N = N - * n / I = 0 - * 0 / n = 0 - * 0 / 0 = N - * 0 / N = N - * 0 / I = 0 - * N / n = N - * N / 0 = N - * N / N = N - * N / I = N - * I / n = I - * I / 0 = I - * I / N = N - * I / I = N + constructor(options = {}) { + var _a, _b, _c, _d, _e, _f; + super(options); + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { + expiry_date: 1, + refresh_token: 'impersonated-placeholder', + }; + this.sourceClient = (_a = options.sourceClient) !== null && _a !== void 0 ? _a : new oauth2client_1.OAuth2Client(); + this.targetPrincipal = (_b = options.targetPrincipal) !== null && _b !== void 0 ? _b : ''; + this.delegates = (_c = options.delegates) !== null && _c !== void 0 ? _c : []; + this.targetScopes = (_d = options.targetScopes) !== null && _d !== void 0 ? _d : []; + this.lifetime = (_e = options.lifetime) !== null && _e !== void 0 ? _e : 3600; + const usingExplicitUniverseDomain = !!(0, util_1.originalOrCamelOptions)(options).get('universe_domain'); + if (!usingExplicitUniverseDomain) { + // override the default universe with the source's universe + this.universeDomain = this.sourceClient.universeDomain; + } + else if (this.sourceClient.universeDomain !== this.universeDomain) { + // non-default universe and is not matching the source - this could be a credential leak + throw new RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`); + } + this.endpoint = + (_f = options.endpoint) !== null && _f !== void 0 ? _f : `https://iamcredentials.${this.universeDomain}`; + } + /** + * Signs some bytes. * - * Return a new BigNumber whose value is the value of this BigNumber divided by the value of - * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob Reference Documentation} + * @param blobToSign String to sign. + * + * @returns A {@link SignBlobResponse} denoting the keyID and signedBlob in base64 string */ - P.dividedBy = P.div = function (y, b) { - return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE); - }; - - - /* - * Return a new BigNumber whose value is the integer part of dividing the value of this - * BigNumber by the value of BigNumber(y, b). + async sign(blobToSign) { + await this.sourceClient.getAccessToken(); + const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; + const u = `${this.endpoint}/v1/${name}:signBlob`; + const body = { + delegates: this.delegates, + payload: Buffer.from(blobToSign).toString('base64'), + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + return res.data; + } + /** The service account email to be impersonated. */ + getTargetPrincipal() { + return this.targetPrincipal; + } + /** + * Refreshes the access token. */ - P.dividedToIntegerBy = P.idiv = function (y, b) { - return div(this, new BigNumber(y, b), 0, 1); - }; - - - /* - * Return a BigNumber whose value is the value of this BigNumber exponentiated by n. - * - * If m is present, return the result modulo m. - * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. - * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE. - * - * The modular power operation works efficiently when x, n, and m are integers, otherwise it - * is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0. + async refreshToken() { + var _a, _b, _c, _d, _e, _f; + try { + await this.sourceClient.getAccessToken(); + const name = 'projects/-/serviceAccounts/' + this.targetPrincipal; + const u = `${this.endpoint}/v1/${name}:generateAccessToken`; + const body = { + delegates: this.delegates, + scope: this.targetScopes, + lifetime: this.lifetime + 's', + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + const tokenResponse = res.data; + this.credentials.access_token = tokenResponse.accessToken; + this.credentials.expiry_date = Date.parse(tokenResponse.expireTime); + return { + tokens: this.credentials, + res, + }; + } + catch (error) { + if (!(error instanceof Error)) + throw error; + let status = 0; + let message = ''; + if (error instanceof gaxios_1.GaxiosError) { + status = (_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.status; + message = (_f = (_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.message; + } + if (status && message) { + error.message = `${status}: unable to impersonate: ${message}`; + throw error; + } + else { + error.message = `unable to impersonate: ${error}`; + throw error; + } + } + } + /** + * Generates an OpenID Connect ID token for a service account. * - * n {number|string|BigNumber} The exponent. An integer. - * [m] {number|string|BigNumber} The modulus. + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/generateIdToken Reference Documentation} * - * '[BigNumber Error] Exponent not an integer: {n}' + * @param targetAudience the audience for the fetched ID token. + * @param options the for the request + * @return an OpenID Connect ID token */ - P.exponentiatedBy = P.pow = function (n, m) { - var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, - x = this; - - n = new BigNumber(n); - - // Allow NaN and ±Infinity, but not other non-integers. - if (n.c && !n.isInteger()) { - throw Error - (bignumberError + 'Exponent not an integer: ' + valueOf(n)); - } - - if (m != null) m = new BigNumber(m); - - // Exponent of MAX_SAFE_INTEGER is 15. - nIsBig = n.e > 14; - - // If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0. - if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) { - - // The sign of the result of pow when x is negative depends on the evenness of n. - // If +n overflows to ±Infinity, the evenness of n would be not be known. - y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n))); - return m ? y.mod(m) : y; - } - - nIsNeg = n.s < 0; - - if (m) { - - // x % m returns NaN if abs(m) is zero, or m is NaN. - if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN); - - isModExp = !nIsNeg && x.isInteger() && m.isInteger(); - - if (isModExp) x = x.mod(m); - - // Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15. - // Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15. - } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 - // [1, 240000000] - ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 - // [80000000000000] [99999750000000] - : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) { - - // If x is negative and n is odd, k = -0, else k = 0. - k = x.s < 0 && isOdd(n) ? -0 : 0; - - // If x >= 1, k = ±Infinity. - if (x.e > -1) k = 1 / k; - - // If n is negative return ±0, else return ±Infinity. - return new BigNumber(nIsNeg ? 1 / k : k); - - } else if (POW_PRECISION) { - - // Truncating each coefficient array to a length of k after each multiplication - // equates to truncating significant digits to POW_PRECISION + [28, 41], - // i.e. there will be a minimum of 28 guard digits retained. - k = mathceil(POW_PRECISION / LOG_BASE + 2); - } + async fetchIdToken(targetAudience, options) { + var _a, _b; + await this.sourceClient.getAccessToken(); + const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; + const u = `${this.endpoint}/v1/${name}:generateIdToken`; + const body = { + delegates: this.delegates, + audience: targetAudience, + includeEmail: (_a = options === null || options === void 0 ? void 0 : options.includeEmail) !== null && _a !== void 0 ? _a : true, + useEmailAzp: (_b = options === null || options === void 0 ? void 0 : options.includeEmail) !== null && _b !== void 0 ? _b : true, + }; + const res = await this.sourceClient.request({ + ...Impersonated.RETRY_CONFIG, + url: u, + data: body, + method: 'POST', + }); + return res.data.token; + } +} +exports.Impersonated = Impersonated; - if (nIsBig) { - half = new BigNumber(0.5); - if (nIsNeg) n.s = 1; - nIsOdd = isOdd(n); - } else { - i = Math.abs(+valueOf(n)); - nIsOdd = i % 2; - } - y = new BigNumber(ONE); +/***/ }), - // Performs 54 loop iterations for n of 9007199254740991. - for (; ;) { +/***/ 68740: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (nIsOdd) { - y = y.times(x); - if (!y.c) break; +"use strict"; - if (k) { - if (y.c.length > k) y.c.length = k; - } else if (isModExp) { - y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m)); - } +// Copyright 2015 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.JWTAccess = void 0; +const jws = __nccwpck_require__(4636); +const util_1 = __nccwpck_require__(68905); +const DEFAULT_HEADER = { + alg: 'RS256', + typ: 'JWT', +}; +class JWTAccess { + /** + * JWTAccess service account credentials. + * + * Create a new access token by using the credential to create a new JWT token + * that's recognized as the access token. + * + * @param email the service account email address. + * @param key the private key that will be used to sign the token. + * @param keyId the ID of the private key used to sign the token. + */ + constructor(email, key, keyId, eagerRefreshThresholdMillis) { + this.cache = new util_1.LRUCache({ + capacity: 500, + maxAge: 60 * 60 * 1000, + }); + this.email = email; + this.key = key; + this.keyId = keyId; + this.eagerRefreshThresholdMillis = + eagerRefreshThresholdMillis !== null && eagerRefreshThresholdMillis !== void 0 ? eagerRefreshThresholdMillis : 5 * 60 * 1000; + } + /** + * Ensures that we're caching a key appropriately, giving precedence to scopes vs. url + * + * @param url The URI being authorized. + * @param scopes The scope or scopes being authorized + * @returns A string that returns the cached key. + */ + getCachedKey(url, scopes) { + let cacheKey = url; + if (scopes && Array.isArray(scopes) && scopes.length) { + cacheKey = url ? `${url}_${scopes.join('_')}` : `${scopes.join('_')}`; } - - if (i) { - i = mathfloor(i / 2); - if (i === 0) break; - nIsOdd = i % 2; - } else { - n = n.times(half); - round(n, n.e + 1, 1); - - if (n.e > 14) { - nIsOdd = isOdd(n); - } else { - i = +valueOf(n); - if (i === 0) break; - nIsOdd = i % 2; - } + else if (typeof scopes === 'string') { + cacheKey = url ? `${url}_${scopes}` : scopes; } - - x = x.times(x); - - if (k) { - if (x.c && x.c.length > k) x.c.length = k; - } else if (isModExp) { - x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m)); + if (!cacheKey) { + throw Error('Scopes or url must be provided'); + } + return cacheKey; + } + /** + * Get a non-expired access token, after refreshing if necessary. + * + * @param url The URI being authorized. + * @param additionalClaims An object with a set of additional claims to + * include in the payload. + * @returns An object that includes the authorization header. + */ + getRequestHeaders(url, additionalClaims, scopes) { + // Return cached authorization headers, unless we are within + // eagerRefreshThresholdMillis ms of them expiring: + const key = this.getCachedKey(url, scopes); + const cachedToken = this.cache.get(key); + const now = Date.now(); + if (cachedToken && + cachedToken.expiration - now > this.eagerRefreshThresholdMillis) { + return cachedToken.headers; + } + const iat = Math.floor(Date.now() / 1000); + const exp = JWTAccess.getExpirationTime(iat); + let defaultClaims; + // Turn scopes into space-separated string + if (Array.isArray(scopes)) { + scopes = scopes.join(' '); + } + // If scopes are specified, sign with scopes + if (scopes) { + defaultClaims = { + iss: this.email, + sub: this.email, + scope: scopes, + exp, + iat, + }; + } + else { + defaultClaims = { + iss: this.email, + sub: this.email, + aud: url, + exp, + iat, + }; + } + // if additionalClaims are provided, ensure they do not collide with + // other required claims. + if (additionalClaims) { + for (const claim in defaultClaims) { + if (additionalClaims[claim]) { + throw new Error(`The '${claim}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`); + } + } } - } - - if (isModExp) return y; - if (nIsNeg) y = ONE.div(y); - - return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y; - }; - - - /* - * Return a new BigNumber whose value is the value of this BigNumber rounded to an integer - * using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + const header = this.keyId + ? { ...DEFAULT_HEADER, kid: this.keyId } + : DEFAULT_HEADER; + const payload = Object.assign(defaultClaims, additionalClaims); + // Sign the jwt and add it to the cache + const signedJWT = jws.sign({ header, payload, secret: this.key }); + const headers = { Authorization: `Bearer ${signedJWT}` }; + this.cache.set(key, { + expiration: exp * 1000, + headers, + }); + return headers; + } + /** + * Returns an expiration time for the JWT token. * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}' - */ - P.integerValue = function (rm) { - var n = new BigNumber(this); - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); - return round(n, n.e + 1, rm); - }; - - - /* - * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), - * otherwise return false. - */ - P.isEqualTo = P.eq = function (y, b) { - return compare(this, new BigNumber(y, b)) === 0; - }; - - - /* - * Return true if the value of this BigNumber is a finite number, otherwise return false. + * @param iat The issued at time for the JWT. + * @returns An expiration time for the JWT. */ - P.isFinite = function () { - return !!this.c; - }; - - - /* - * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), - * otherwise return false. + static getExpirationTime(iat) { + const exp = iat + 3600; // 3600 seconds = 1 hour + return exp; + } + /** + * Create a JWTAccess credentials instance using the given input options. + * @param json The input object. */ - P.isGreaterThan = P.gt = function (y, b) { - return compare(this, new BigNumber(y, b)) > 0; - }; + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the service account auth settings.'); + } + if (!json.client_email) { + throw new Error('The incoming JSON object does not contain a client_email field'); + } + if (!json.private_key) { + throw new Error('The incoming JSON object does not contain a private_key field'); + } + // Extract the relevant information from the json key file. + this.email = json.client_email; + this.key = json.private_key; + this.keyId = json.private_key_id; + this.projectId = json.project_id; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + reject(new Error('Must pass in a stream containing the service account auth settings.')); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('data', chunk => (s += chunk)) + .on('error', reject) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + resolve(); + } + catch (err) { + reject(err); + } + }); + }); + } +} +exports.JWTAccess = JWTAccess; - /* - * Return true if the value of this BigNumber is greater than or equal to the value of - * BigNumber(y, b), otherwise return false. - */ - P.isGreaterThanOrEqualTo = P.gte = function (y, b) { - return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0; +/***/ }), - }; +/***/ 13959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; - /* - * Return true if the value of this BigNumber is an integer, otherwise return false. +// Copyright 2013 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.JWT = void 0; +const gtoken_1 = __nccwpck_require__(76031); +const jwtaccess_1 = __nccwpck_require__(68740); +const oauth2client_1 = __nccwpck_require__(3936); +const authclient_1 = __nccwpck_require__(44627); +class JWT extends oauth2client_1.OAuth2Client { + constructor(optionsOrEmail, keyFile, key, scopes, subject, keyId) { + const opts = optionsOrEmail && typeof optionsOrEmail === 'object' + ? optionsOrEmail + : { email: optionsOrEmail, keyFile, key, keyId, scopes, subject }; + super(opts); + this.email = opts.email; + this.keyFile = opts.keyFile; + this.key = opts.key; + this.keyId = opts.keyId; + this.scopes = opts.scopes; + this.subject = opts.subject; + this.additionalClaims = opts.additionalClaims; + // Start with an expired refresh token, which will automatically be + // refreshed before the first API call is made. + this.credentials = { refresh_token: 'jwt-placeholder', expiry_date: 1 }; + } + /** + * Creates a copy of the credential with the specified scopes. + * @param scopes List of requested scopes or a single scope. + * @return The cloned instance. */ - P.isInteger = function () { - return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2; - }; - - - /* - * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), - * otherwise return false. + createScoped(scopes) { + const jwt = new JWT(this); + jwt.scopes = scopes; + return jwt; + } + /** + * Obtains the metadata to be sent with the request. + * + * @param url the URI being authorized. */ - P.isLessThan = P.lt = function (y, b) { - return compare(this, new BigNumber(y, b)) < 0; - }; - - - /* - * Return true if the value of this BigNumber is less than or equal to the value of - * BigNumber(y, b), otherwise return false. + async getRequestMetadataAsync(url) { + url = this.defaultServicePath ? `https://${this.defaultServicePath}/` : url; + const useSelfSignedJWT = (!this.hasUserScopes() && url) || + (this.useJWTAccessWithScope && this.hasAnyScopes()) || + this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; + if (this.subject && this.universeDomain !== authclient_1.DEFAULT_UNIVERSE) { + throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${authclient_1.DEFAULT_UNIVERSE}`); + } + if (!this.apiKey && useSelfSignedJWT) { + if (this.additionalClaims && + this.additionalClaims.target_audience) { + const { tokens } = await this.refreshToken(); + return { + headers: this.addSharedMetadataHeaders({ + Authorization: `Bearer ${tokens.id_token}`, + }), + }; + } + else { + // no scopes have been set, but a uri has been provided. Use JWTAccess + // credentials. + if (!this.access) { + this.access = new jwtaccess_1.JWTAccess(this.email, this.key, this.keyId, this.eagerRefreshThresholdMillis); + } + let scopes; + if (this.hasUserScopes()) { + scopes = this.scopes; + } + else if (!url) { + scopes = this.defaultScopes; + } + const useScopes = this.useJWTAccessWithScope || + this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; + const headers = await this.access.getRequestHeaders(url !== null && url !== void 0 ? url : undefined, this.additionalClaims, + // Scopes take precedent over audience for signing, + // so we only provide them if `useJWTAccessWithScope` is on or + // if we are in a non-default universe + useScopes ? scopes : undefined); + return { headers: this.addSharedMetadataHeaders(headers) }; + } + } + else if (this.hasAnyScopes() || this.apiKey) { + return super.getRequestMetadataAsync(url); + } + else { + // If no audience, apiKey, or scopes are provided, we should not attempt + // to populate any headers: + return { headers: {} }; + } + } + /** + * Fetches an ID token. + * @param targetAudience the audience for the fetched ID token. */ - P.isLessThanOrEqualTo = P.lte = function (y, b) { - return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0; - }; - - - /* - * Return true if the value of this BigNumber is NaN, otherwise return false. + async fetchIdToken(targetAudience) { + // Create a new gToken for fetching an ID token + const gtoken = new gtoken_1.GoogleToken({ + iss: this.email, + sub: this.subject, + scope: this.scopes || this.defaultScopes, + keyFile: this.keyFile, + key: this.key, + additionalClaims: { target_audience: targetAudience }, + transporter: this.transporter, + }); + await gtoken.getToken({ + forceRefresh: true, + }); + if (!gtoken.idToken) { + throw new Error('Unknown error: Failed to fetch ID token'); + } + return gtoken.idToken; + } + /** + * Determine if there are currently scopes available. */ - P.isNaN = function () { - return !this.s; - }; - - - /* - * Return true if the value of this BigNumber is negative, otherwise return false. + hasUserScopes() { + if (!this.scopes) { + return false; + } + return this.scopes.length > 0; + } + /** + * Are there any default or user scopes defined. */ - P.isNegative = function () { - return this.s < 0; - }; - - - /* - * Return true if the value of this BigNumber is positive, otherwise return false. + hasAnyScopes() { + if (this.scopes && this.scopes.length > 0) + return true; + if (this.defaultScopes && this.defaultScopes.length > 0) + return true; + return false; + } + authorize(callback) { + if (callback) { + this.authorizeAsync().then(r => callback(null, r), callback); + } + else { + return this.authorizeAsync(); + } + } + async authorizeAsync() { + const result = await this.refreshToken(); + if (!result) { + throw new Error('No result returned'); + } + this.credentials = result.tokens; + this.credentials.refresh_token = 'jwt-placeholder'; + this.key = this.gtoken.key; + this.email = this.gtoken.iss; + return result.tokens; + } + /** + * Refreshes the access token. + * @param refreshToken ignored + * @private */ - P.isPositive = function () { - return this.s > 0; - }; - - - /* - * Return true if the value of this BigNumber is 0 or -0, otherwise return false. + async refreshTokenNoCache( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + refreshToken) { + const gtoken = this.createGToken(); + const token = await gtoken.getToken({ + forceRefresh: this.isTokenExpiring(), + }); + const tokens = { + access_token: token.access_token, + token_type: 'Bearer', + expiry_date: gtoken.expiresAt, + id_token: gtoken.idToken, + }; + this.emit('tokens', tokens); + return { res: null, tokens }; + } + /** + * Create a gToken if it doesn't already exist. */ - P.isZero = function () { - return !!this.c && this.c[0] == 0; - }; - - - /* - * n - 0 = n - * n - N = N - * n - I = -I - * 0 - n = -n - * 0 - 0 = 0 - * 0 - N = N - * 0 - I = -I - * N - n = N - * N - 0 = N - * N - N = N - * N - I = N - * I - n = I - * I - 0 = I - * I - N = N - * I - I = N + createGToken() { + if (!this.gtoken) { + this.gtoken = new gtoken_1.GoogleToken({ + iss: this.email, + sub: this.subject, + scope: this.scopes || this.defaultScopes, + keyFile: this.keyFile, + key: this.key, + additionalClaims: this.additionalClaims, + transporter: this.transporter, + }); + } + return this.gtoken; + } + /** + * Create a JWT credentials instance using the given input options. + * @param json The input object. * - * Return a new BigNumber whose value is the value of this BigNumber minus the value of - * BigNumber(y, b). + * @remarks + * + * **Important**: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information, refer to {@link https://cloud.google.com/docs/authentication/external/externally-sourced-credentials Validate credential configurations from external sources}. */ - P.minus = function (y, b) { - var i, j, t, xLTy, - x = this, - a = x.s; - - y = new BigNumber(y, b); - b = y.s; - - // Either NaN? - if (!a || !b) return new BigNumber(NaN); - - // Signs differ? - if (a != b) { - y.s = -b; - return x.plus(y); - } - - var xe = x.e / LOG_BASE, - ye = y.e / LOG_BASE, - xc = x.c, - yc = y.c; - - if (!xe || !ye) { - - // Either Infinity? - if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN); - - // Either zero? - if (!xc[0] || !yc[0]) { - - // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. - return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x : - - // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity - ROUNDING_MODE == 3 ? -0 : 0); + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the service account auth settings.'); } - } - - xe = bitFloor(xe); - ye = bitFloor(ye); - xc = xc.slice(); - - // Determine which is the bigger number. - if (a = xe - ye) { - - if (xLTy = a < 0) { - a = -a; - t = xc; - } else { - ye = xe; - t = yc; + if (!json.client_email) { + throw new Error('The incoming JSON object does not contain a client_email field'); } - - t.reverse(); - - // Prepend zeros to equalise exponents. - for (b = a; b--; t.push(0)); - t.reverse(); - } else { - - // Exponents equal. Check digit by digit. - j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b; - - for (a = b = 0; b < j; b++) { - - if (xc[b] != yc[b]) { - xLTy = xc[b] < yc[b]; - break; - } + if (!json.private_key) { + throw new Error('The incoming JSON object does not contain a private_key field'); } - } - - // x < y? Point xc to the array of the bigger number. - if (xLTy) { - t = xc; - xc = yc; - yc = t; - y.s = -y.s; - } - - b = (j = yc.length) - (i = xc.length); - - // Append zeros to xc if shorter. - // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. - if (b > 0) for (; b--; xc[i++] = 0); - b = BASE - 1; - - // Subtract yc from xc. - for (; j > a;) { - - if (xc[--j] < yc[j]) { - for (i = j; i && !xc[--i]; xc[i] = b); - --xc[i]; - xc[j] += BASE; + // Extract the relevant information from the json key file. + this.email = json.client_email; + this.key = json.private_key; + this.keyId = json.private_key_id; + this.projectId = json.project_id; + this.quotaProjectId = json.quota_project_id; + this.universeDomain = json.universe_domain || this.universeDomain; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); } + else { + return this.fromStreamAsync(inputStream); + } + } + fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + throw new Error('Must pass in a stream containing the service account auth settings.'); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => (s += chunk)) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + resolve(); + } + catch (e) { + reject(e); + } + }); + }); + } + /** + * Creates a JWT credentials instance using an API Key for authentication. + * @param apiKey The API Key in string form. + */ + fromAPIKey(apiKey) { + if (typeof apiKey !== 'string') { + throw new Error('Must provide an API Key string.'); + } + this.apiKey = apiKey; + } + /** + * Using the key or keyFile on the JWT client, obtain an object that contains + * the key and the client email. + */ + async getCredentials() { + if (this.key) { + return { private_key: this.key, client_email: this.email }; + } + else if (this.keyFile) { + const gtoken = this.createGToken(); + const creds = await gtoken.getCredentials(this.keyFile); + return { private_key: creds.privateKey, client_email: creds.clientEmail }; + } + throw new Error('A key or a keyFile must be provided to getCredentials.'); + } +} +exports.JWT = JWT; - xc[j] -= yc[j]; - } - - // Remove leading zeros and adjust exponent accordingly. - for (; xc[0] == 0; xc.splice(0, 1), --ye); - - // Zero? - if (!xc[0]) { - // Following IEEE 754 (2008) 6.3, - // n - n = +0 but n - n = -0 when rounding towards -Infinity. - y.s = ROUNDING_MODE == 3 ? -1 : 1; - y.c = [y.e = 0]; - return y; - } +/***/ }), - // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity - // for finite x and y. - return normalise(y, xc, ye); - }; +/***/ 74524: +/***/ ((__unused_webpack_module, exports) => { +"use strict"; - /* - * n % 0 = N - * n % N = N - * n % I = n - * 0 % n = 0 - * -0 % n = -0 - * 0 % 0 = N - * 0 % N = N - * 0 % I = 0 - * N % n = N - * N % 0 = N - * N % N = N - * N % I = N - * I % n = N - * I % 0 = N - * I % N = N - * I % I = N +// Copyright 2014 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LoginTicket = void 0; +class LoginTicket { + /** + * Create a simple class to extract user ID from an ID Token * - * Return a new BigNumber whose value is the value of this BigNumber modulo the value of - * BigNumber(y, b). The result depends on the value of MODULO_MODE. + * @param {string} env Envelope of the jwt + * @param {TokenPayload} pay Payload of the jwt + * @constructor */ - P.modulo = P.mod = function (y, b) { - var q, s, - x = this; - - y = new BigNumber(y, b); - - // Return NaN if x is Infinity or NaN, or y is NaN or zero. - if (!x.c || !y.s || y.c && !y.c[0]) { - return new BigNumber(NaN); - - // Return x if y is Infinity or x is zero. - } else if (!y.c || x.c && !x.c[0]) { - return new BigNumber(x); - } - - if (MODULO_MODE == 9) { - - // Euclidian division: q = sign(y) * floor(x / abs(y)) - // r = x - qy where 0 <= r < abs(y) - s = y.s; - y.s = 1; - q = div(x, y, 0, 3); - y.s = s; - q.s *= s; - } else { - q = div(x, y, 0, MODULO_MODE); - } - - y = x.minus(q.times(y)); - - // To match JavaScript %, ensure sign of zero is sign of dividend. - if (!y.c[0] && MODULO_MODE == 1) y.s = x.s; - - return y; - }; - - - /* - * n * 0 = 0 - * n * N = N - * n * I = I - * 0 * n = 0 - * 0 * 0 = 0 - * 0 * N = N - * 0 * I = N - * N * n = N - * N * 0 = N - * N * N = N - * N * I = N - * I * n = I - * I * 0 = N - * I * N = N - * I * I = I + constructor(env, pay) { + this.envelope = env; + this.payload = pay; + } + getEnvelope() { + return this.envelope; + } + getPayload() { + return this.payload; + } + /** + * Create a simple class to extract user ID from an ID Token * - * Return a new BigNumber whose value is the value of this BigNumber multiplied by the value - * of BigNumber(y, b). + * @return The user ID */ - P.multipliedBy = P.times = function (y, b) { - var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, - base, sqrtBase, - x = this, - xc = x.c, - yc = (y = new BigNumber(y, b)).c; - - // Either NaN, ±Infinity or ±0? - if (!xc || !yc || !xc[0] || !yc[0]) { - - // Return NaN if either is NaN, or one is 0 and the other is Infinity. - if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) { - y.c = y.e = y.s = null; - } else { - y.s *= x.s; - - // Return ±Infinity if either is ±Infinity. - if (!xc || !yc) { - y.c = y.e = null; - - // Return ±0 if either is ±0. - } else { - y.c = [0]; - y.e = 0; - } + getUserId() { + const payload = this.getPayload(); + if (payload && payload.sub) { + return payload.sub; } + return null; + } + /** + * Returns attributes from the login ticket. This can contain + * various information about the user session. + * + * @return The envelope and payload + */ + getAttributes() { + return { envelope: this.getEnvelope(), payload: this.getPayload() }; + } +} +exports.LoginTicket = LoginTicket; - return y; - } - - e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE); - y.s *= x.s; - xcL = xc.length; - ycL = yc.length; - - // Ensure xc points to longer array and xcL to its length. - if (xcL < ycL) { - zc = xc; - xc = yc; - yc = zc; - i = xcL; - xcL = ycL; - ycL = i; - } - // Initialise the result array with zeros. - for (i = xcL + ycL, zc = []; i--; zc.push(0)); +/***/ }), - base = BASE; - sqrtBase = SQRT_BASE; +/***/ 3936: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - for (i = ycL; --i >= 0;) { - c = 0; - ylo = yc[i] % sqrtBase; - yhi = yc[i] / sqrtBase | 0; +"use strict"; - for (k = xcL, j = i + k; j > i;) { - xlo = xc[--k] % sqrtBase; - xhi = xc[k] / sqrtBase | 0; - m = yhi * xlo + xhi * ylo; - xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c; - c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi; - zc[j--] = xlo % base; +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OAuth2Client = exports.ClientAuthentication = exports.CertificateFormat = exports.CodeChallengeMethod = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const querystring = __nccwpck_require__(63477); +const stream = __nccwpck_require__(12781); +const formatEcdsa = __nccwpck_require__(11728); +const crypto_1 = __nccwpck_require__(78043); +const authclient_1 = __nccwpck_require__(44627); +const loginticket_1 = __nccwpck_require__(74524); +var CodeChallengeMethod; +(function (CodeChallengeMethod) { + CodeChallengeMethod["Plain"] = "plain"; + CodeChallengeMethod["S256"] = "S256"; +})(CodeChallengeMethod || (exports.CodeChallengeMethod = CodeChallengeMethod = {})); +var CertificateFormat; +(function (CertificateFormat) { + CertificateFormat["PEM"] = "PEM"; + CertificateFormat["JWK"] = "JWK"; +})(CertificateFormat || (exports.CertificateFormat = CertificateFormat = {})); +/** + * The client authentication type. Supported values are basic, post, and none. + * https://datatracker.ietf.org/doc/html/rfc7591#section-2 + */ +var ClientAuthentication; +(function (ClientAuthentication) { + ClientAuthentication["ClientSecretPost"] = "ClientSecretPost"; + ClientAuthentication["ClientSecretBasic"] = "ClientSecretBasic"; + ClientAuthentication["None"] = "None"; +})(ClientAuthentication || (exports.ClientAuthentication = ClientAuthentication = {})); +class OAuth2Client extends authclient_1.AuthClient { + constructor(optionsOrClientId, clientSecret, redirectUri) { + const opts = optionsOrClientId && typeof optionsOrClientId === 'object' + ? optionsOrClientId + : { clientId: optionsOrClientId, clientSecret, redirectUri }; + super(opts); + this.certificateCache = {}; + this.certificateExpiry = null; + this.certificateCacheFormat = CertificateFormat.PEM; + this.refreshTokenPromises = new Map(); + this._clientId = opts.clientId; + this._clientSecret = opts.clientSecret; + this.redirectUri = opts.redirectUri; + this.endpoints = { + tokenInfoUrl: 'https://oauth2.googleapis.com/tokeninfo', + oauth2AuthBaseUrl: 'https://accounts.google.com/o/oauth2/v2/auth', + oauth2TokenUrl: 'https://oauth2.googleapis.com/token', + oauth2RevokeUrl: 'https://oauth2.googleapis.com/revoke', + oauth2FederatedSignonPemCertsUrl: 'https://www.googleapis.com/oauth2/v1/certs', + oauth2FederatedSignonJwkCertsUrl: 'https://www.googleapis.com/oauth2/v3/certs', + oauth2IapPublicKeyUrl: 'https://www.gstatic.com/iap/verify/public_key', + ...opts.endpoints, + }; + this.clientAuthentication = + opts.clientAuthentication || ClientAuthentication.ClientSecretPost; + this.issuers = opts.issuers || [ + 'accounts.google.com', + 'https://accounts.google.com', + this.universeDomain, + ]; + } + /** + * Generates URL for consent page landing. + * @param opts Options. + * @return URL to consent page. + */ + generateAuthUrl(opts = {}) { + if (opts.code_challenge_method && !opts.code_challenge) { + throw new Error('If a code_challenge_method is provided, code_challenge must be included.'); + } + opts.response_type = opts.response_type || 'code'; + opts.client_id = opts.client_id || this._clientId; + opts.redirect_uri = opts.redirect_uri || this.redirectUri; + // Allow scopes to be passed either as array or a string + if (Array.isArray(opts.scope)) { + opts.scope = opts.scope.join(' '); + } + const rootUrl = this.endpoints.oauth2AuthBaseUrl.toString(); + return (rootUrl + + '?' + + querystring.stringify(opts)); + } + generateCodeVerifier() { + // To make the code compatible with browser SubtleCrypto we need to make + // this method async. + throw new Error('generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.'); + } + /** + * Convenience method to automatically generate a code_verifier, and its + * resulting SHA256. If used, this must be paired with a S256 + * code_challenge_method. + * + * For a full example see: + * https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js + */ + async generateCodeVerifierAsync() { + // base64 encoding uses 6 bits per character, and we want to generate128 + // characters. 6*128/8 = 96. + const crypto = (0, crypto_1.createCrypto)(); + const randomString = crypto.randomBytesBase64(96); + // The valid characters in the code_verifier are [A-Z]/[a-z]/[0-9]/ + // "-"/"."/"_"/"~". Base64 encoded strings are pretty close, so we're just + // swapping out a few chars. + const codeVerifier = randomString + .replace(/\+/g, '~') + .replace(/=/g, '_') + .replace(/\//g, '-'); + // Generate the base64 encoded SHA256 + const unencodedCodeChallenge = await crypto.sha256DigestBase64(codeVerifier); + // We need to use base64UrlEncoding instead of standard base64 + const codeChallenge = unencodedCodeChallenge + .split('=')[0] + .replace(/\+/g, '-') + .replace(/\//g, '_'); + return { codeVerifier, codeChallenge }; + } + getToken(codeOrOptions, callback) { + const options = typeof codeOrOptions === 'string' ? { code: codeOrOptions } : codeOrOptions; + if (callback) { + this.getTokenAsync(options).then(r => callback(null, r.tokens, r.res), e => callback(e, null, e.response)); + } + else { + return this.getTokenAsync(options); + } + } + async getTokenAsync(options) { + const url = this.endpoints.oauth2TokenUrl.toString(); + const headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + }; + const values = { + client_id: options.client_id || this._clientId, + code_verifier: options.codeVerifier, + code: options.code, + grant_type: 'authorization_code', + redirect_uri: options.redirect_uri || this.redirectUri, + }; + if (this.clientAuthentication === ClientAuthentication.ClientSecretBasic) { + const basic = Buffer.from(`${this._clientId}:${this._clientSecret}`); + headers['Authorization'] = `Basic ${basic.toString('base64')}`; + } + if (this.clientAuthentication === ClientAuthentication.ClientSecretPost) { + values.client_secret = this._clientSecret; + } + const res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + url, + data: querystring.stringify(values), + headers, + }); + const tokens = res.data; + if (res.data && res.data.expires_in) { + tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res }; + } + /** + * Refreshes the access token. + * @param refresh_token Existing refresh token. + * @private + */ + async refreshToken(refreshToken) { + if (!refreshToken) { + return this.refreshTokenNoCache(refreshToken); + } + // If a request to refresh using the same token has started, + // return the same promise. + if (this.refreshTokenPromises.has(refreshToken)) { + return this.refreshTokenPromises.get(refreshToken); + } + const p = this.refreshTokenNoCache(refreshToken).then(r => { + this.refreshTokenPromises.delete(refreshToken); + return r; + }, e => { + this.refreshTokenPromises.delete(refreshToken); + throw e; + }); + this.refreshTokenPromises.set(refreshToken, p); + return p; + } + async refreshTokenNoCache(refreshToken) { + var _a; + if (!refreshToken) { + throw new Error('No refresh token is set.'); + } + const url = this.endpoints.oauth2TokenUrl.toString(); + const data = { + refresh_token: refreshToken, + client_id: this._clientId, + client_secret: this._clientSecret, + grant_type: 'refresh_token', + }; + let res; + try { + // request for new token + res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + url, + data: querystring.stringify(data), + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + }); + } + catch (e) { + if (e instanceof gaxios_1.GaxiosError && + e.message === 'invalid_grant' && + ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) && + /ReAuth/i.test(e.response.data.error_description)) { + e.message = JSON.stringify(e.response.data); + } + throw e; + } + const tokens = res.data; + // TODO: de-duplicate this code from a few spots + if (res.data && res.data.expires_in) { + tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; + delete tokens.expires_in; + } + this.emit('tokens', tokens); + return { tokens, res }; + } + refreshAccessToken(callback) { + if (callback) { + this.refreshAccessTokenAsync().then(r => callback(null, r.credentials, r.res), callback); + } + else { + return this.refreshAccessTokenAsync(); + } + } + async refreshAccessTokenAsync() { + const r = await this.refreshToken(this.credentials.refresh_token); + const tokens = r.tokens; + tokens.refresh_token = this.credentials.refresh_token; + this.credentials = tokens; + return { credentials: this.credentials, res: r.res }; + } + getAccessToken(callback) { + if (callback) { + this.getAccessTokenAsync().then(r => callback(null, r.token, r.res), callback); + } + else { + return this.getAccessTokenAsync(); + } + } + async getAccessTokenAsync() { + const shouldRefresh = !this.credentials.access_token || this.isTokenExpiring(); + if (shouldRefresh) { + if (!this.credentials.refresh_token) { + if (this.refreshHandler) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { + this.setCredentials(refreshedAccessToken); + return { token: this.credentials.access_token }; + } + } + else { + throw new Error('No refresh token or refresh handler callback is set.'); + } + } + const r = await this.refreshAccessTokenAsync(); + if (!r.credentials || (r.credentials && !r.credentials.access_token)) { + throw new Error('Could not refresh access token.'); + } + return { token: r.credentials.access_token, res: r.res }; } - - zc[j] = c; - } - - if (c) { - ++e; - } else { - zc.splice(0, 1); - } - - return normalise(y, zc, e); - }; - - - /* - * Return a new BigNumber whose value is the value of this BigNumber negated, - * i.e. multiplied by -1. - */ - P.negated = function () { - var x = new BigNumber(this); - x.s = -x.s || null; - return x; - }; - - - /* - * n + 0 = n - * n + N = N - * n + I = I - * 0 + n = n - * 0 + 0 = 0 - * 0 + N = N - * 0 + I = I - * N + n = N - * N + 0 = N - * N + N = N - * N + I = N - * I + n = I - * I + 0 = I - * I + N = N - * I + I = I + else { + return { token: this.credentials.access_token }; + } + } + /** + * The main authentication interface. It takes an optional url which when + * present is the endpoint being accessed, and returns a Promise which + * resolves with authorization header fields. * - * Return a new BigNumber whose value is the value of this BigNumber plus the value of - * BigNumber(y, b). + * In OAuth2Client, the result has the form: + * { Authorization: 'Bearer ' } + * @param url The optional url being authorized */ - P.plus = function (y, b) { - var t, - x = this, - a = x.s; - - y = new BigNumber(y, b); - b = y.s; - - // Either NaN? - if (!a || !b) return new BigNumber(NaN); - - // Signs differ? - if (a != b) { - y.s = -b; - return x.minus(y); - } - - var xe = x.e / LOG_BASE, - ye = y.e / LOG_BASE, - xc = x.c, - yc = y.c; - - if (!xe || !ye) { - - // Return ±Infinity if either ±Infinity. - if (!xc || !yc) return new BigNumber(a / 0); - - // Either zero? - // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. - if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0); - } - - xe = bitFloor(xe); - ye = bitFloor(ye); - xc = xc.slice(); - - // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. - if (a = xe - ye) { - if (a > 0) { - ye = xe; - t = yc; - } else { - a = -a; - t = xc; + async getRequestHeaders(url) { + const headers = (await this.getRequestMetadataAsync(url)).headers; + return headers; + } + async getRequestMetadataAsync( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + url) { + const thisCreds = this.credentials; + if (!thisCreds.access_token && + !thisCreds.refresh_token && + !this.apiKey && + !this.refreshHandler) { + throw new Error('No access, refresh token, API key or refresh handler callback is set.'); } - - t.reverse(); - for (; a--; t.push(0)); - t.reverse(); - } - - a = xc.length; - b = yc.length; - - // Point xc to the longer array, and b to the shorter length. - if (a - b < 0) { - t = yc; - yc = xc; - xc = t; - b = a; - } - - // Only start adding at yc.length - 1 as the further digits of xc can be ignored. - for (a = 0; b;) { - a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0; - xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; - } - - if (a) { - xc = [a].concat(xc); - ++ye; - } - - // No need to check for zero, as +x + +y != 0 && -x + -y != 0 - // ye = MAX_EXP + 1 possible - return normalise(y, xc, ye); - }; - - - /* - * If sd is undefined or null or true or false, return the number of significant digits of - * the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN. - * If sd is true include integer-part trailing zeros in the count. - * - * Otherwise, if sd is a number, return a new BigNumber whose value is the value of this - * BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or - * ROUNDING_MODE if rm is omitted. - * - * sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive. - * boolean: whether to count integer-part trailing zeros: true or false. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + if (thisCreds.access_token && !this.isTokenExpiring()) { + thisCreds.token_type = thisCreds.token_type || 'Bearer'; + const headers = { + Authorization: thisCreds.token_type + ' ' + thisCreds.access_token, + }; + return { headers: this.addSharedMetadataHeaders(headers) }; + } + // If refreshHandler exists, call processAndValidateRefreshHandler(). + if (this.refreshHandler) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { + this.setCredentials(refreshedAccessToken); + const headers = { + Authorization: 'Bearer ' + this.credentials.access_token, + }; + return { headers: this.addSharedMetadataHeaders(headers) }; + } + } + if (this.apiKey) { + return { headers: { 'X-Goog-Api-Key': this.apiKey } }; + } + let r = null; + let tokens = null; + try { + r = await this.refreshToken(thisCreds.refresh_token); + tokens = r.tokens; + } + catch (err) { + const e = err; + if (e.response && + (e.response.status === 403 || e.response.status === 404)) { + e.message = `Could not refresh access token: ${e.message}`; + } + throw e; + } + const credentials = this.credentials; + credentials.token_type = credentials.token_type || 'Bearer'; + tokens.refresh_token = credentials.refresh_token; + this.credentials = tokens; + const headers = { + Authorization: credentials.token_type + ' ' + tokens.access_token, + }; + return { headers: this.addSharedMetadataHeaders(headers), res: r.res }; + } + /** + * Generates an URL to revoke the given token. + * @param token The existing token to be revoked. * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' + * @deprecated use instance method {@link OAuth2Client.getRevokeTokenURL} */ - P.precision = P.sd = function (sd, rm) { - var c, n, v, - x = this; - - if (sd != null && sd !== !!sd) { - intCheck(sd, 1, MAX); - if (rm == null) rm = ROUNDING_MODE; - else intCheck(rm, 0, 8); - - return round(new BigNumber(x), sd, rm); - } - - if (!(c = x.c)) return null; - v = c.length - 1; - n = v * LOG_BASE + 1; - - if (v = c[v]) { - - // Subtract the number of trailing zeros of the last element. - for (; v % 10 == 0; v /= 10, n--); - - // Add the number of digits of the first element. - for (v = c[0]; v >= 10; v /= 10, n++); - } - - if (sd && x.e + 1 > n) n = x.e + 1; - - return n; - }; - - - /* - * Return a new BigNumber whose value is the value of this BigNumber shifted by k places - * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. - * - * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + static getRevokeTokenUrl(token) { + return new OAuth2Client().getRevokeTokenURL(token).toString(); + } + /** + * Generates a URL to revoke the given token. * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}' + * @param token The existing token to be revoked. */ - P.shiftedBy = function (k) { - intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER); - return this.times('1e' + k); - }; - - - /* - * sqrt(-n) = N - * sqrt(N) = N - * sqrt(-I) = N - * sqrt(I) = I - * sqrt(0) = 0 - * sqrt(-0) = -0 + getRevokeTokenURL(token) { + const url = new URL(this.endpoints.oauth2RevokeUrl); + url.searchParams.append('token', token); + return url; + } + revokeToken(token, callback) { + const opts = { + ...OAuth2Client.RETRY_CONFIG, + url: this.getRevokeTokenURL(token).toString(), + method: 'POST', + }; + if (callback) { + this.transporter + .request(opts) + .then(r => callback(null, r), callback); + } + else { + return this.transporter.request(opts); + } + } + revokeCredentials(callback) { + if (callback) { + this.revokeCredentialsAsync().then(res => callback(null, res), callback); + } + else { + return this.revokeCredentialsAsync(); + } + } + async revokeCredentialsAsync() { + const token = this.credentials.access_token; + this.credentials = {}; + if (token) { + return this.revokeToken(token); + } + else { + throw new Error('No access token to revoke.'); + } + } + request(opts, callback) { + if (callback) { + this.requestAsync(opts).then(r => callback(null, r), e => { + return callback(e, e.response); + }); + } + else { + return this.requestAsync(opts); + } + } + async requestAsync(opts, reAuthRetried = false) { + let r2; + try { + const r = await this.getRequestMetadataAsync(opts.url); + opts.headers = opts.headers || {}; + if (r.headers && r.headers['x-goog-user-project']) { + opts.headers['x-goog-user-project'] = r.headers['x-goog-user-project']; + } + if (r.headers && r.headers.Authorization) { + opts.headers.Authorization = r.headers.Authorization; + } + if (this.apiKey) { + opts.headers['X-Goog-Api-Key'] = this.apiKey; + } + r2 = await this.transporter.request(opts); + } + catch (e) { + const res = e.response; + if (res) { + const statusCode = res.status; + // Retry the request for metadata if the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - An access_token and refresh_token were available, but either no + // expiry_date was available or the forceRefreshOnFailure flag is set. + // The absent expiry_date case can happen when developers stash the + // access_token and refresh_token for later use, but the access_token + // fails on the first try because it's expired. Some developers may + // choose to enable forceRefreshOnFailure to mitigate time-related + // errors. + // Or the following criteria are true: + // - We haven't already retried. It only makes sense to retry once. + // - The response was a 401 or a 403 + // - The request didn't send a readableStream + // - No refresh_token was available + // - An access_token and a refreshHandler callback were available, but + // either no expiry_date was available or the forceRefreshOnFailure + // flag is set. The access_token fails on the first try because it's + // expired. Some developers may choose to enable forceRefreshOnFailure + // to mitigate time-related errors. + const mayRequireRefresh = this.credentials && + this.credentials.access_token && + this.credentials.refresh_token && + (!this.credentials.expiry_date || this.forceRefreshOnFailure); + const mayRequireRefreshWithNoRefreshToken = this.credentials && + this.credentials.access_token && + !this.credentials.refresh_token && + (!this.credentials.expiry_date || this.forceRefreshOnFailure) && + this.refreshHandler; + const isReadableStream = res.config.data instanceof stream.Readable; + const isAuthErr = statusCode === 401 || statusCode === 403; + if (!reAuthRetried && + isAuthErr && + !isReadableStream && + mayRequireRefresh) { + await this.refreshAccessTokenAsync(); + return this.requestAsync(opts, true); + } + else if (!reAuthRetried && + isAuthErr && + !isReadableStream && + mayRequireRefreshWithNoRefreshToken) { + const refreshedAccessToken = await this.processAndValidateRefreshHandler(); + if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { + this.setCredentials(refreshedAccessToken); + } + return this.requestAsync(opts, true); + } + } + throw e; + } + return r2; + } + verifyIdToken(options, callback) { + // This function used to accept two arguments instead of an options object. + // Check the types to help users upgrade with less pain. + // This check can be removed after a 2.0 release. + if (callback && typeof callback !== 'function') { + throw new Error('This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.'); + } + if (callback) { + this.verifyIdTokenAsync(options).then(r => callback(null, r), callback); + } + else { + return this.verifyIdTokenAsync(options); + } + } + async verifyIdTokenAsync(options) { + if (!options.idToken) { + throw new Error('The verifyIdToken method requires an ID Token'); + } + const response = await this.getFederatedSignonCertsAsync(); + const login = await this.verifySignedJwtWithCertsAsync(options.idToken, response.certs, options.audience, this.issuers, options.maxExpiry); + return login; + } + /** + * Obtains information about the provisioned access token. Especially useful + * if you want to check the scopes that were provisioned to a given token. * - * Return a new BigNumber whose value is the square root of the value of this BigNumber, - * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + * @param accessToken Required. The Access Token for which you want to get + * user info. */ - P.squareRoot = P.sqrt = function () { - var m, n, r, rep, t, - x = this, - c = x.c, - s = x.s, - e = x.e, - dp = DECIMAL_PLACES + 4, - half = new BigNumber('0.5'); - - // Negative/NaN/Infinity/zero? - if (s !== 1 || !c || !c[0]) { - return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0); - } - - // Initial estimate. - s = Math.sqrt(+valueOf(x)); - - // Math.sqrt underflow/overflow? - // Pass x to Math.sqrt as integer, then adjust the exponent of the result. - if (s == 0 || s == 1 / 0) { - n = coeffToString(c); - if ((n.length + e) % 2 == 0) n += '0'; - s = Math.sqrt(+n); - e = bitFloor((e + 1) / 2) - (e < 0 || e % 2); - - if (s == 1 / 0) { - n = '5e' + e; - } else { - n = s.toExponential(); - n = n.slice(0, n.indexOf('e') + 1) + e; + async getTokenInfo(accessToken) { + const { data } = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + Authorization: `Bearer ${accessToken}`, + }, + url: this.endpoints.tokenInfoUrl.toString(), + }); + const info = Object.assign({ + expiry_date: new Date().getTime() + data.expires_in * 1000, + scopes: data.scope.split(' '), + }, data); + delete info.expires_in; + delete info.scope; + return info; + } + getFederatedSignonCerts(callback) { + if (callback) { + this.getFederatedSignonCertsAsync().then(r => callback(null, r.certs, r.res), callback); } - - r = new BigNumber(n); - } else { - r = new BigNumber(s + ''); - } - - // Check for zero. - // r could be zero if MIN_EXP is changed after the this value was created. - // This would cause a division by zero (x/t) and hence Infinity below, which would cause - // coeffToString to throw. - if (r.c[0]) { - e = r.e; - s = e + dp; - if (s < 3) s = 0; - - // Newton-Raphson iteration. - for (; ;) { - t = r; - r = half.times(t.plus(div(x, t, dp, 1))); - - if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) { - - // The exponent of r may here be one less than the final result exponent, - // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits - // are indexed correctly. - if (r.e < e) --s; - n = n.slice(s - 3, s + 1); - - // The 4th rounding digit may be in error by -1 so if the 4 rounding digits - // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the - // iteration. - if (n == '9999' || !rep && n == '4999') { - - // On the first iteration only, check to see if rounding up gives the - // exact result as the nines may infinitely repeat. - if (!rep) { - round(t, t.e + DECIMAL_PLACES + 2, 0); - - if (t.times(t).eq(x)) { - r = t; - break; + else { + return this.getFederatedSignonCertsAsync(); + } + } + async getFederatedSignonCertsAsync() { + const nowTime = new Date().getTime(); + const format = (0, crypto_1.hasBrowserCrypto)() + ? CertificateFormat.JWK + : CertificateFormat.PEM; + if (this.certificateExpiry && + nowTime < this.certificateExpiry.getTime() && + this.certificateCacheFormat === format) { + return { certs: this.certificateCache, format }; + } + let res; + let url; + switch (format) { + case CertificateFormat.PEM: + url = this.endpoints.oauth2FederatedSignonPemCertsUrl.toString(); + break; + case CertificateFormat.JWK: + url = this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString(); + break; + default: + throw new Error(`Unsupported certificate format ${format}`); + } + try { + res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + url, + }); + } + catch (e) { + if (e instanceof Error) { + e.message = `Failed to retrieve verification certificates: ${e.message}`; + } + throw e; + } + const cacheControl = res ? res.headers['cache-control'] : undefined; + let cacheAge = -1; + if (cacheControl) { + const pattern = new RegExp('max-age=([0-9]*)'); + const regexResult = pattern.exec(cacheControl); + if (regexResult && regexResult.length === 2) { + // Cache results with max-age (in seconds) + cacheAge = Number(regexResult[1]) * 1000; // milliseconds + } + } + let certificates = {}; + switch (format) { + case CertificateFormat.PEM: + certificates = res.data; + break; + case CertificateFormat.JWK: + for (const key of res.data.keys) { + certificates[key.kid] = key; } - } - - dp += 4; - s += 4; - rep = 1; - } else { - - // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact - // result. If not, then there are further digits and m will be truthy. - if (!+n || !+n.slice(1) && n.charAt(0) == '5') { - - // Truncate to the first rounding digit. - round(r, r.e + DECIMAL_PLACES + 2, 1); - m = !r.times(r).eq(x); - } - - break; + break; + default: + throw new Error(`Unsupported certificate format ${format}`); + } + const now = new Date(); + this.certificateExpiry = + cacheAge === -1 ? null : new Date(now.getTime() + cacheAge); + this.certificateCache = certificates; + this.certificateCacheFormat = format; + return { certs: certificates, format, res }; + } + getIapPublicKeys(callback) { + if (callback) { + this.getIapPublicKeysAsync().then(r => callback(null, r.pubkeys, r.res), callback); + } + else { + return this.getIapPublicKeysAsync(); + } + } + async getIapPublicKeysAsync() { + let res; + const url = this.endpoints.oauth2IapPublicKeyUrl.toString(); + try { + res = await this.transporter.request({ + ...OAuth2Client.RETRY_CONFIG, + url, + }); + } + catch (e) { + if (e instanceof Error) { + e.message = `Failed to retrieve verification certificates: ${e.message}`; } - } + throw e; } - } + return { pubkeys: res.data, res }; + } + verifySignedJwtWithCerts() { + // To make the code compatible with browser SubtleCrypto we need to make + // this method async. + throw new Error('verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.'); + } + /** + * Verify the id token is signed with the correct certificate + * and is from the correct audience. + * @param jwt The jwt to verify (The ID Token in this case). + * @param certs The array of certs to test the jwt against. + * @param requiredAudience The audience to test the jwt against. + * @param issuers The allowed issuers of the jwt (Optional). + * @param maxExpiry The max expiry the certificate can be (Optional). + * @return Returns a promise resolving to LoginTicket on verification. + */ + async verifySignedJwtWithCertsAsync(jwt, certs, requiredAudience, issuers, maxExpiry) { + const crypto = (0, crypto_1.createCrypto)(); + if (!maxExpiry) { + maxExpiry = OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_; + } + const segments = jwt.split('.'); + if (segments.length !== 3) { + throw new Error('Wrong number of segments in token: ' + jwt); + } + const signed = segments[0] + '.' + segments[1]; + let signature = segments[2]; + let envelope; + let payload; + try { + envelope = JSON.parse(crypto.decodeBase64StringUtf8(segments[0])); + } + catch (err) { + if (err instanceof Error) { + err.message = `Can't parse token envelope: ${segments[0]}': ${err.message}`; + } + throw err; + } + if (!envelope) { + throw new Error("Can't parse token envelope: " + segments[0]); + } + try { + payload = JSON.parse(crypto.decodeBase64StringUtf8(segments[1])); + } + catch (err) { + if (err instanceof Error) { + err.message = `Can't parse token payload '${segments[0]}`; + } + throw err; + } + if (!payload) { + throw new Error("Can't parse token payload: " + segments[1]); + } + if (!Object.prototype.hasOwnProperty.call(certs, envelope.kid)) { + // If this is not present, then there's no reason to attempt verification + throw new Error('No pem found for envelope: ' + JSON.stringify(envelope)); + } + const cert = certs[envelope.kid]; + if (envelope.alg === 'ES256') { + signature = formatEcdsa.joseToDer(signature, 'ES256').toString('base64'); + } + const verified = await crypto.verify(cert, signed, signature); + if (!verified) { + throw new Error('Invalid token signature: ' + jwt); + } + if (!payload.iat) { + throw new Error('No issue time in token: ' + JSON.stringify(payload)); + } + if (!payload.exp) { + throw new Error('No expiration time in token: ' + JSON.stringify(payload)); + } + const iat = Number(payload.iat); + if (isNaN(iat)) + throw new Error('iat field using invalid format'); + const exp = Number(payload.exp); + if (isNaN(exp)) + throw new Error('exp field using invalid format'); + const now = new Date().getTime() / 1000; + if (exp >= now + maxExpiry) { + throw new Error('Expiration time too far in future: ' + JSON.stringify(payload)); + } + const earliest = iat - OAuth2Client.CLOCK_SKEW_SECS_; + const latest = exp + OAuth2Client.CLOCK_SKEW_SECS_; + if (now < earliest) { + throw new Error('Token used too early, ' + + now + + ' < ' + + earliest + + ': ' + + JSON.stringify(payload)); + } + if (now > latest) { + throw new Error('Token used too late, ' + + now + + ' > ' + + latest + + ': ' + + JSON.stringify(payload)); + } + if (issuers && issuers.indexOf(payload.iss) < 0) { + throw new Error('Invalid issuer, expected one of [' + + issuers + + '], but got ' + + payload.iss); + } + // Check the audience matches if we have one + if (typeof requiredAudience !== 'undefined' && requiredAudience !== null) { + const aud = payload.aud; + let audVerified = false; + // If the requiredAudience is an array, check if it contains token + // audience + if (requiredAudience.constructor === Array) { + audVerified = requiredAudience.indexOf(aud) > -1; + } + else { + audVerified = aud === requiredAudience; + } + if (!audVerified) { + throw new Error('Wrong recipient, payload audience != requiredAudience'); + } + } + return new loginticket_1.LoginTicket(envelope, payload); + } + /** + * Returns a promise that resolves with AccessTokenResponse type if + * refreshHandler is defined. + * If not, nothing is returned. + */ + async processAndValidateRefreshHandler() { + if (this.refreshHandler) { + const accessTokenResponse = await this.refreshHandler(); + if (!accessTokenResponse.access_token) { + throw new Error('No access token is returned by the refreshHandler callback.'); + } + return accessTokenResponse; + } + return; + } + /** + * Returns true if a token is expired or will expire within + * eagerRefreshThresholdMillismilliseconds. + * If there is no expiry time, assumes the token is not expired or expiring. + */ + isTokenExpiring() { + const expiryDate = this.credentials.expiry_date; + return expiryDate + ? expiryDate <= new Date().getTime() + this.eagerRefreshThresholdMillis + : false; + } +} +exports.OAuth2Client = OAuth2Client; +/** + * @deprecated use instance's {@link OAuth2Client.endpoints} + */ +OAuth2Client.GOOGLE_TOKEN_INFO_URL = 'https://oauth2.googleapis.com/tokeninfo'; +/** + * Clock skew - five minutes in seconds + */ +OAuth2Client.CLOCK_SKEW_SECS_ = 300; +/** + * The default max Token Lifetime is one day in seconds + */ +OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_ = 86400; - return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m); - }; +/***/ }), - /* - * Return a string representing the value of this BigNumber in exponential notation and - * rounded using ROUNDING_MODE to dp fixed decimal places. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - */ - P.toExponential = function (dp, rm) { - if (dp != null) { - intCheck(dp, 0, MAX); - dp++; - } - return format(this, dp, rm, 1); - }; +/***/ 19510: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounding - * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. - * - * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', - * but e.g. (-0.00001).toFixed(0) is '-0'. - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OAuthClientAuthHandler = void 0; +exports.getErrorFromOAuthErrorResponse = getErrorFromOAuthErrorResponse; +const querystring = __nccwpck_require__(63477); +const crypto_1 = __nccwpck_require__(78043); +/** List of HTTP methods that accept request bodies. */ +const METHODS_SUPPORTING_REQUEST_BODY = ['PUT', 'POST', 'PATCH']; +/** + * Abstract class for handling client authentication in OAuth-based + * operations. + * When request-body client authentication is used, only application/json and + * application/x-www-form-urlencoded content types for HTTP methods that support + * request bodies are supported. + */ +class OAuthClientAuthHandler { + /** + * Instantiates an OAuth client authentication handler. + * @param clientAuthentication The client auth credentials. */ - P.toFixed = function (dp, rm) { - if (dp != null) { - intCheck(dp, 0, MAX); - dp = dp + this.e + 1; - } - return format(this, dp, rm); - }; - - - /* - * Return a string representing the value of this BigNumber in fixed-point notation rounded - * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties - * of the format or FORMAT object (see BigNumber.set). - * - * The formatting object may contain some or all of the properties shown below. - * - * FORMAT = { - * prefix: '', - * groupSize: 3, - * secondaryGroupSize: 0, - * groupSeparator: ',', - * decimalSeparator: '.', - * fractionGroupSize: 0, - * fractionGroupSeparator: '\xA0', // non-breaking space - * suffix: '' - * }; - * - * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. - * [format] {object} Formatting options. See FORMAT pbject above. - * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}' - * '[BigNumber Error] Argument not an object: {format}' + constructor(clientAuthentication) { + this.clientAuthentication = clientAuthentication; + this.crypto = (0, crypto_1.createCrypto)(); + } + /** + * Applies client authentication on the OAuth request's headers or POST + * body but does not process the request. + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. */ - P.toFormat = function (dp, rm, format) { - var str, - x = this; - - if (format == null) { - if (dp != null && rm && typeof rm == 'object') { - format = rm; - rm = null; - } else if (dp && typeof dp == 'object') { - format = dp; - dp = rm = null; - } else { - format = FORMAT; + applyClientAuthenticationOptions(opts, bearerToken) { + // Inject authenticated header. + this.injectAuthenticatedHeaders(opts, bearerToken); + // Inject authenticated request body. + if (!bearerToken) { + this.injectAuthenticatedRequestBody(opts); } - } else if (typeof format != 'object') { - throw Error - (bignumberError + 'Argument not an object: ' + format); - } - - str = x.toFixed(dp, rm); - - if (x.c) { - var i, - arr = str.split('.'), - g1 = +format.groupSize, - g2 = +format.secondaryGroupSize, - groupSeparator = format.groupSeparator || '', - intPart = arr[0], - fractionPart = arr[1], - isNeg = x.s < 0, - intDigits = isNeg ? intPart.slice(1) : intPart, - len = intDigits.length; - - if (g2) { - i = g1; - g1 = g2; - g2 = i; - len -= i; + } + /** + * Applies client authentication on the request's header if either + * basic authentication or bearer token authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + * @param bearerToken The optional bearer token to use for authentication. + * When this is used, no client authentication credentials are needed. + */ + injectAuthenticatedHeaders(opts, bearerToken) { + var _a; + // Bearer token prioritized higher than basic Auth. + if (bearerToken) { + opts.headers = opts.headers || {}; + Object.assign(opts.headers, { + Authorization: `Bearer ${bearerToken}}`, + }); } - - if (g1 > 0 && len > 0) { - i = len % g1 || g1; - intPart = intDigits.substr(0, i); - for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1); - if (g2 > 0) intPart += groupSeparator + intDigits.slice(i); - if (isNeg) intPart = '-' + intPart; + else if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'basic') { + opts.headers = opts.headers || {}; + const clientId = this.clientAuthentication.clientId; + const clientSecret = this.clientAuthentication.clientSecret || ''; + const base64EncodedCreds = this.crypto.encodeBase64StringUtf8(`${clientId}:${clientSecret}`); + Object.assign(opts.headers, { + Authorization: `Basic ${base64EncodedCreds}`, + }); } - - str = fractionPart - ? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize) - ? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'), - '$&' + (format.fractionGroupSeparator || '')) - : fractionPart) - : intPart; - } - - return (format.prefix || '') + str + (format.suffix || ''); - }; - - - /* - * Return an array of two BigNumbers representing the value of this BigNumber as a simple - * fraction with an integer numerator and an integer denominator. - * The denominator will be a positive non-zero value less than or equal to the specified - * maximum denominator. If a maximum denominator is not specified, the denominator will be - * the lowest value necessary to represent the number exactly. + } + /** + * Applies client authentication on the request's body if request-body + * client authentication is selected. + * + * @param opts The GaxiosOptions whose headers or data are to be modified + * depending on the client authentication mechanism to be used. + */ + injectAuthenticatedRequestBody(opts) { + var _a; + if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'request-body') { + const method = (opts.method || 'GET').toUpperCase(); + // Inject authenticated request body. + if (METHODS_SUPPORTING_REQUEST_BODY.indexOf(method) !== -1) { + // Get content-type. + let contentType; + const headers = opts.headers || {}; + for (const key in headers) { + if (key.toLowerCase() === 'content-type' && headers[key]) { + contentType = headers[key].toLowerCase(); + break; + } + } + if (contentType === 'application/x-www-form-urlencoded') { + opts.data = opts.data || ''; + const data = querystring.parse(opts.data); + Object.assign(data, { + client_id: this.clientAuthentication.clientId, + client_secret: this.clientAuthentication.clientSecret || '', + }); + opts.data = querystring.stringify(data); + } + else if (contentType === 'application/json') { + opts.data = opts.data || {}; + Object.assign(opts.data, { + client_id: this.clientAuthentication.clientId, + client_secret: this.clientAuthentication.clientSecret || '', + }); + } + else { + throw new Error(`${contentType} content-types are not supported with ` + + `${this.clientAuthentication.confidentialClientType} ` + + 'client authentication'); + } + } + else { + throw new Error(`${method} HTTP method does not support ` + + `${this.clientAuthentication.confidentialClientType} ` + + 'client authentication'); + } + } + } + /** + * Retry config for Auth-related requests. * - * [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator. + * @remarks * - * '[BigNumber Error] Argument {not an integer|out of range} : {md}' + * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} + * config as some downstream APIs would prefer if customers explicitly enable retries, + * such as GCS. */ - P.toFraction = function (md) { - var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, - x = this, - xc = x.c; - - if (md != null) { - n = new BigNumber(md); - - // Throw if md is less than one or is not an integer, unless it is Infinity. - if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) { - throw Error - (bignumberError + 'Argument ' + - (n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n)); + static get RETRY_CONFIG() { + return { + retry: true, + retryConfig: { + httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], + }, + }; + } +} +exports.OAuthClientAuthHandler = OAuthClientAuthHandler; +/** + * Converts an OAuth error response to a native JavaScript Error. + * @param resp The OAuth error response to convert to a native Error object. + * @param err The optional original error. If provided, the error properties + * will be copied to the new error. + * @return The converted native Error object. + */ +function getErrorFromOAuthErrorResponse(resp, err) { + // Error response. + const errorCode = resp.error; + const errorDescription = resp.error_description; + const errorUri = resp.error_uri; + let message = `Error code ${errorCode}`; + if (typeof errorDescription !== 'undefined') { + message += `: ${errorDescription}`; + } + if (typeof errorUri !== 'undefined') { + message += ` - ${errorUri}`; + } + const newError = new Error(message); + // Copy properties from original error to newly generated error. + if (err) { + const keys = Object.keys(err); + if (err.stack) { + // Copy error.stack if available. + keys.push('stack'); } - } - - if (!xc) return new BigNumber(x); - - d = new BigNumber(ONE); - n1 = d0 = new BigNumber(ONE); - d1 = n0 = new BigNumber(ONE); - s = coeffToString(xc); - - // Determine initial denominator. - // d is a power of 10 and the minimum max denominator that specifies the value exactly. - e = d.e = s.length - x.e - 1; - d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp]; - md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n; - - exp = MAX_EXP; - MAX_EXP = 1 / 0; - n = new BigNumber(s); - - // n0 = d1 = 0 - n0.c[0] = 0; - - for (; ;) { - q = div(n, d, 0, 1); - d2 = d0.plus(q.times(d1)); - if (d2.comparedTo(md) == 1) break; - d0 = d1; - d1 = d2; - n1 = n0.plus(q.times(d2 = n1)); - n0 = d2; - d = n.minus(q.times(d2 = d)); - n = d2; - } - - d2 = div(md.minus(d0), d1, 0, 1); - n0 = n0.plus(d2.times(n1)); - d0 = d0.plus(d2.times(d1)); - n0.s = n1.s = x.s; - e = e * 2; - - // Determine which fraction is closer to x, n0/d0 or n1/d1 - r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo( - div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0]; - - MAX_EXP = exp; + keys.forEach(key => { + // Do not overwrite the message field. + if (key !== 'message') { + Object.defineProperty(newError, key, { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + value: err[key], + writable: false, + enumerable: true, + }); + } + }); + } + return newError; +} - return r; - }; +/***/ }), - /* - * Return the value of this BigNumber converted to a number primitive. - */ - P.toNumber = function () { - return +valueOf(this); - }; +/***/ 32460: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; - /* - * Return a string representing the value of this BigNumber rounded to sd significant digits - * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits - * necessary to represent the integer part of the value in fixed-point notation, then use - * exponential notation. +// Copyright 2024 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PassThroughClient = void 0; +const authclient_1 = __nccwpck_require__(44627); +/** + * An AuthClient without any Authentication information. Useful for: + * - Anonymous access + * - Local Emulators + * - Testing Environments + * + */ +class PassThroughClient extends authclient_1.AuthClient { + /** + * Creates a request without any authentication headers or checks. * - * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. - * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * @remarks * - * '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}' - */ - P.toPrecision = function (sd, rm) { - if (sd != null) intCheck(sd, 1, MAX); - return format(this, sd, rm, 2); - }; - - - /* - * Return a string representing the value of this BigNumber in base b, or base 10 if b is - * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and - * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent - * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than - * TO_EXP_NEG, return exponential notation. + * In testing environments it may be useful to change the provided + * {@link AuthClient.transporter} for any desired request overrides/handling. * - * [b] {number} Integer, 2 to ALPHABET.length inclusive. + * @param opts + * @returns The response of the request. + */ + async request(opts) { + return this.transporter.request(opts); + } + /** + * A required method of the base class. + * Always will return an empty object. * - * '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}' + * @returns {} */ - P.toString = function (b) { - var str, - n = this, - s = n.s, - e = n.e; - - // Infinity or NaN? - if (e === null) { - if (s) { - str = 'Infinity'; - if (s < 0) str = '-' + str; - } else { - str = 'NaN'; - } - } else { - if (b == null) { - str = e <= TO_EXP_NEG || e >= TO_EXP_POS - ? toExponential(coeffToString(n.c), e) - : toFixedPoint(coeffToString(n.c), e, '0'); - } else if (b === 10 && alphabetHasNormalDecimalDigits) { - n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE); - str = toFixedPoint(coeffToString(n.c), n.e, '0'); - } else { - intCheck(b, 2, ALPHABET.length, 'Base'); - str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true); - } - - if (s < 0 && n.c[0]) str = '-' + str; - } - - return str; - }; - - - /* - * Return as toString, but do not accept a base argument, and include the minus sign for - * negative zero. + async getAccessToken() { + return {}; + } + /** + * A required method of the base class. + * Always will return an empty object. + * + * @returns {} */ - P.valueOf = P.toJSON = function () { - return valueOf(this); - }; - - - P._isBigNumber = true; - - if (configObject != null) BigNumber.set(configObject); - - return BigNumber; - } - - - // PRIVATE HELPER FUNCTIONS - - // These functions don't need access to variables, - // e.g. DECIMAL_PLACES, in the scope of the `clone` function above. - - - function bitFloor(n) { - var i = n | 0; - return n > 0 || n === i ? i : i - 1; - } - - - // Return a coefficient array as a string of base 10 digits. - function coeffToString(a) { - var s, z, - i = 1, - j = a.length, - r = a[0] + ''; - - for (; i < j;) { - s = a[i++] + ''; - z = LOG_BASE - s.length; - for (; z--; s = '0' + s); - r += s; + async getRequestHeaders() { + return {}; } +} +exports.PassThroughClient = PassThroughClient; +const a = new PassThroughClient(); +a.getAccessToken(); - // Determine trailing zeros. - for (j = r.length; r.charCodeAt(--j) === 48;); - - return r.slice(0, j + 1 || 1); - } - - - // Compare the value of BigNumbers x and y. - function compare(x, y) { - var a, b, - xc = x.c, - yc = y.c, - i = x.s, - j = y.s, - k = x.e, - l = y.e; - - // Either NaN? - if (!i || !j) return null; - - a = xc && !xc[0]; - b = yc && !yc[0]; - - // Either zero? - if (a || b) return a ? b ? 0 : -j : i; - - // Signs differ? - if (i != j) return i; - - a = i < 0; - b = k == l; - - // Either Infinity? - if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1; - - // Compare exponents. - if (!b) return k > l ^ a ? 1 : -1; - - j = (k = xc.length) < (l = yc.length) ? k : l; - // Compare digit by digit. - for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1; +/***/ }), - // Compare lengths. - return k == l ? 0 : k > l ^ a ? 1 : -1; - } +/***/ 44782: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +"use strict"; - /* - * Check that n is a primitive number, an integer, and in range, otherwise throw. - */ - function intCheck(n, min, max, name) { - if (n < min || n > max || n !== mathfloor(n)) { - throw Error - (bignumberError + (name || 'Argument') + (typeof n == 'number' - ? n < min || n > max ? ' out of range: ' : ' not an integer: ' - : ' not a primitive number: ') + String(n)); +// Copyright 2022 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PluggableAuthClient = exports.ExecutableError = void 0; +const baseexternalclient_1 = __nccwpck_require__(40810); +const executable_response_1 = __nccwpck_require__(8749); +const pluggable_auth_handler_1 = __nccwpck_require__(18941); +/** + * Error thrown from the executable run by PluggableAuthClient. + */ +class ExecutableError extends Error { + constructor(message, code) { + super(`The executable failed with exit code: ${code} and error message: ${message}.`); + this.code = code; + Object.setPrototypeOf(this, new.target.prototype); } - } - - - // Assumes finite n. - function isOdd(n) { - var k = n.c.length - 1; - return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0; - } - - - function toExponential(str, e) { - return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) + - (e < 0 ? 'e' : 'e+') + e; - } - - - function toFixedPoint(str, e, z) { - var len, zs; - - // Negative exponent? - if (e < 0) { - - // Prepend zeros. - for (zs = z + '.'; ++e; zs += z); - str = zs + str; - - // Positive exponent - } else { - len = str.length; - - // Append zeros. - if (++e > len) { - for (zs = z, e -= len; --e; zs += z); - str += zs; - } else if (e < len) { - str = str.slice(0, e) + '.' + str.slice(e); - } +} +exports.ExecutableError = ExecutableError; +/** + * The default executable timeout when none is provided, in milliseconds. + */ +const DEFAULT_EXECUTABLE_TIMEOUT_MILLIS = 30 * 1000; +/** + * The minimum allowed executable timeout in milliseconds. + */ +const MINIMUM_EXECUTABLE_TIMEOUT_MILLIS = 5 * 1000; +/** + * The maximum allowed executable timeout in milliseconds. + */ +const MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS = 120 * 1000; +/** + * The environment variable to check to see if executable can be run. + * Value must be set to '1' for the executable to run. + */ +const GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES = 'GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES'; +/** + * The maximum currently supported executable version. + */ +const MAXIMUM_EXECUTABLE_VERSION = 1; +/** + * PluggableAuthClient enables the exchange of workload identity pool external credentials for + * Google access tokens by retrieving 3rd party tokens through a user supplied executable. These + * scripts/executables are completely independent of the Google Cloud Auth libraries. These + * credentials plug into ADC and will call the specified executable to retrieve the 3rd party token + * to be exchanged for a Google access token. + * + *

To use these credentials, the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment variable + * must be set to '1'. This is for security reasons. + * + *

Both OIDC and SAML are supported. The executable must adhere to a specific response format + * defined below. + * + *

The executable must print out the 3rd party token to STDOUT in JSON format. When an + * output_file is specified in the credential configuration, the executable must also handle writing the + * JSON response to this file. + * + *

+ * OIDC response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:id_token",
+ *   "id_token": "HEADER.PAYLOAD.SIGNATURE",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * SAML2 response sample:
+ * {
+ *   "version": 1,
+ *   "success": true,
+ *   "token_type": "urn:ietf:params:oauth:token-type:saml2",
+ *   "saml_response": "...",
+ *   "expiration_time": 1620433341
+ * }
+ *
+ * Error response sample:
+ * {
+ *   "version": 1,
+ *   "success": false,
+ *   "code": "401",
+ *   "message": "Error message."
+ * }
+ * 
+ * + *

The "expiration_time" field in the JSON response is only required for successful + * responses when an output file was specified in the credential configuration + * + *

The auth libraries will populate certain environment variables that will be accessible by the + * executable, such as: GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE, GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE, + * GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE, GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL, and + * GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE. + * + *

Please see this repositories README for a complete executable request/response specification. + */ +class PluggableAuthClient extends baseexternalclient_1.BaseExternalAccountClient { + /** + * Instantiates a PluggableAuthClient instance using the provided JSON + * object loaded from an external account credentials file. + * An error is thrown if the credential is not a valid pluggable auth credential. + * @param options The external account options object typically loaded from + * the external account JSON credential file. + * @param additionalOptions **DEPRECATED, all options are available in the + * `options` parameter.** Optional additional behavior customization options. + * These currently customize expiration threshold time and whether to retry + * on 401/403 API request errors. + */ + constructor(options, additionalOptions) { + super(options, additionalOptions); + if (!options.credential_source.executable) { + throw new Error('No valid Pluggable Auth "credential_source" provided.'); + } + this.command = options.credential_source.executable.command; + if (!this.command) { + throw new Error('No valid Pluggable Auth "credential_source" provided.'); + } + // Check if the provided timeout exists and if it is valid. + if (options.credential_source.executable.timeout_millis === undefined) { + this.timeoutMillis = DEFAULT_EXECUTABLE_TIMEOUT_MILLIS; + } + else { + this.timeoutMillis = options.credential_source.executable.timeout_millis; + if (this.timeoutMillis < MINIMUM_EXECUTABLE_TIMEOUT_MILLIS || + this.timeoutMillis > MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS) { + throw new Error(`Timeout must be between ${MINIMUM_EXECUTABLE_TIMEOUT_MILLIS} and ` + + `${MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS} milliseconds.`); + } + } + this.outputFile = options.credential_source.executable.output_file; + this.handler = new pluggable_auth_handler_1.PluggableAuthHandler({ + command: this.command, + timeoutMillis: this.timeoutMillis, + outputFile: this.outputFile, + }); + this.credentialSourceType = 'executable'; } - - return str; - } - - - // EXPORT - - - BigNumber = clone(); - BigNumber['default'] = BigNumber.BigNumber = BigNumber; - - // AMD. - if (typeof define == 'function' && define.amd) { - define(function () { return BigNumber; }); - - // Node.js and other environments that support module.exports. - } else if ( true && module.exports) { - module.exports = BigNumber; - - // Browser. - } else { - if (!globalObject) { - globalObject = typeof self != 'undefined' && self ? self : window; + /** + * Triggered when an external subject token is needed to be exchanged for a + * GCP access token via GCP STS endpoint. + * This uses the `options.credential_source` object to figure out how + * to retrieve the token using the current environment. In this case, + * this calls a user provided executable which returns the subject token. + * The logic is summarized as: + * 1. Validated that the executable is allowed to run. The + * GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment must be set to + * 1 for security reasons. + * 2. If an output file is specified by the user, check the file location + * for a response. If the file exists and contains a valid response, + * return the subject token from the file. + * 3. Call the provided executable and return response. + * @return A promise that resolves with the external subject token. + */ + async retrieveSubjectToken() { + // Check if the executable is allowed to run. + if (process.env[GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES] !== '1') { + throw new Error('Pluggable Auth executables need to be explicitly allowed to run by ' + + 'setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment ' + + 'Variable to 1.'); + } + let executableResponse = undefined; + // Try to get cached executable response from output file. + if (this.outputFile) { + executableResponse = await this.handler.retrieveCachedResponse(); + } + // If no response from output file, call the executable. + if (!executableResponse) { + // Set up environment map with required values for the executable. + const envMap = new Map(); + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE', this.audience); + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE', this.subjectTokenType); + // Always set to 0 because interactive mode is not supported. + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE', '0'); + if (this.outputFile) { + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE', this.outputFile); + } + const serviceAccountEmail = this.getServiceAccountEmail(); + if (serviceAccountEmail) { + envMap.set('GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL', serviceAccountEmail); + } + executableResponse = + await this.handler.retrieveResponseFromExecutable(envMap); + } + if (executableResponse.version > MAXIMUM_EXECUTABLE_VERSION) { + throw new Error(`Version of executable is not currently supported, maximum supported version is ${MAXIMUM_EXECUTABLE_VERSION}.`); + } + // Check that response was successful. + if (!executableResponse.success) { + throw new ExecutableError(executableResponse.errorMessage, executableResponse.errorCode); + } + // Check that response contains expiration time if output file was specified. + if (this.outputFile) { + if (!executableResponse.expirationTime) { + throw new executable_response_1.InvalidExpirationTimeFieldError('The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.'); + } + } + // Check that response is not expired. + if (executableResponse.isExpired()) { + throw new Error('Executable response is expired.'); + } + // Return subject token from response. + return executableResponse.subjectToken; } - - globalObject.BigNumber = BigNumber; - } -})(this); - - -/***/ }), - -/***/ 33717: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var concatMap = __nccwpck_require__(86891); -var balanced = __nccwpck_require__(9417); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); } +exports.PluggableAuthClient = PluggableAuthClient; -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; +/***/ }), - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } +/***/ 18941: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return expand(escapeBraces(str), true).map(unescapeBraces); -} +"use strict"; -function identity(e) { - return e; +// Copyright 2022 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PluggableAuthHandler = void 0; +const pluggable_auth_client_1 = __nccwpck_require__(44782); +const executable_response_1 = __nccwpck_require__(8749); +const childProcess = __nccwpck_require__(32081); +const fs = __nccwpck_require__(57147); +/** + * A handler used to retrieve 3rd party token responses from user defined + * executables and cached file output for the PluggableAuthClient class. + */ +class PluggableAuthHandler { + /** + * Instantiates a PluggableAuthHandler instance using the provided + * PluggableAuthHandlerOptions object. + */ + constructor(options) { + if (!options.command) { + throw new Error('No command provided.'); + } + this.commandComponents = PluggableAuthHandler.parseCommand(options.command); + this.timeoutMillis = options.timeoutMillis; + if (!this.timeoutMillis) { + throw new Error('No timeoutMillis provided.'); + } + this.outputFile = options.outputFile; + } + /** + * Calls user provided executable to get a 3rd party subject token and + * returns the response. + * @param envMap a Map of additional Environment Variables required for + * the executable. + * @return A promise that resolves with the executable response. + */ + retrieveResponseFromExecutable(envMap) { + return new Promise((resolve, reject) => { + // Spawn process to run executable using added environment variables. + const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), { + env: { ...process.env, ...Object.fromEntries(envMap) }, + }); + let output = ''; + // Append stdout to output as executable runs. + child.stdout.on('data', (data) => { + output += data; + }); + // Append stderr as executable runs. + child.stderr.on('data', (err) => { + output += err; + }); + // Set up a timeout to end the child process and throw an error. + const timeout = setTimeout(() => { + // Kill child process and remove listeners so 'close' event doesn't get + // read after child process is killed. + child.removeAllListeners(); + child.kill(); + return reject(new Error('The executable failed to finish within the timeout specified.')); + }, this.timeoutMillis); + child.on('close', (code) => { + // Cancel timeout if executable closes before timeout is reached. + clearTimeout(timeout); + if (code === 0) { + // If the executable completed successfully, try to return the parsed response. + try { + const responseJson = JSON.parse(output); + const response = new executable_response_1.ExecutableResponse(responseJson); + return resolve(response); + } + catch (error) { + if (error instanceof executable_response_1.ExecutableResponseError) { + return reject(error); + } + return reject(new executable_response_1.ExecutableResponseError(`The executable returned an invalid response: ${output}`)); + } + } + else { + return reject(new pluggable_auth_client_1.ExecutableError(output, code.toString())); + } + }); + }); + } + /** + * Checks user provided output file for response from previous run of + * executable and return the response if it exists, is formatted correctly, and is not expired. + */ + async retrieveCachedResponse() { + if (!this.outputFile || this.outputFile.length === 0) { + return undefined; + } + let filePath; + try { + filePath = await fs.promises.realpath(this.outputFile); + } + catch (_a) { + // If file path cannot be resolved, return undefined. + return undefined; + } + if (!(await fs.promises.lstat(filePath)).isFile()) { + // If path does not lead to file, return undefined. + return undefined; + } + const responseString = await fs.promises.readFile(filePath, { + encoding: 'utf8', + }); + if (responseString === '') { + return undefined; + } + try { + const responseJson = JSON.parse(responseString); + const response = new executable_response_1.ExecutableResponse(responseJson); + // Check if response is successful and unexpired. + if (response.isValid()) { + return new executable_response_1.ExecutableResponse(responseJson); + } + return undefined; + } + catch (error) { + if (error instanceof executable_response_1.ExecutableResponseError) { + throw error; + } + throw new executable_response_1.ExecutableResponseError(`The output file contained an invalid response: ${responseString}`); + } + } + /** + * Parses given command string into component array, splitting on spaces unless + * spaces are between quotation marks. + */ + static parseCommand(command) { + // Split the command into components by splitting on spaces, + // unless spaces are contained in quotation marks. + const components = command.match(/(?:[^\s"]+|"[^"]*")+/g); + if (!components) { + throw new Error(`Provided command: "${command}" could not be parsed.`); + } + // Remove quotation marks from the beginning and end of each component if they are present. + for (let i = 0; i < components.length; i++) { + if (components[i][0] === '"' && components[i].slice(-1) === '"') { + components[i] = components[i].slice(1, -1); + } + } + return components; + } } +exports.PluggableAuthHandler = PluggableAuthHandler; -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} +/***/ }), -function expand(str, isTop) { - var expansions = []; +/***/ 98790: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; +"use strict"; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); +// Copyright 2015 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UserRefreshClient = exports.USER_REFRESH_ACCOUNT_TYPE = void 0; +const oauth2client_1 = __nccwpck_require__(3936); +const querystring_1 = __nccwpck_require__(63477); +exports.USER_REFRESH_ACCOUNT_TYPE = 'authorized_user'; +class UserRefreshClient extends oauth2client_1.OAuth2Client { + constructor(optionsOrClientId, clientSecret, refreshToken, eagerRefreshThresholdMillis, forceRefreshOnFailure) { + const opts = optionsOrClientId && typeof optionsOrClientId === 'object' + ? optionsOrClientId + : { + clientId: optionsOrClientId, + clientSecret, + refreshToken, + eagerRefreshThresholdMillis, + forceRefreshOnFailure, + }; + super(opts); + this._refreshToken = opts.refreshToken; + this.credentials.refresh_token = opts.refreshToken; } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; + /** + * Refreshes the access token. + * @param refreshToken An ignored refreshToken.. + * @param callback Optional callback. + */ + async refreshTokenNoCache( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + refreshToken) { + return super.refreshTokenNoCache(this._refreshToken); + } + async fetchIdToken(targetAudience) { + const res = await this.transporter.request({ + ...UserRefreshClient.RETRY_CONFIG, + url: this.endpoints.oauth2TokenUrl, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + method: 'POST', + data: (0, querystring_1.stringify)({ + client_id: this._clientId, + client_secret: this._clientSecret, + grant_type: 'refresh_token', + refresh_token: this._refreshToken, + target_audience: targetAudience, + }), + }); + return res.data.id_token; + } + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + fromJSON(json) { + if (!json) { + throw new Error('Must pass in a JSON object containing the user refresh token'); + } + if (json.type !== 'authorized_user') { + throw new Error('The incoming JSON object does not have the "authorized_user" type'); + } + if (!json.client_id) { + throw new Error('The incoming JSON object does not contain a client_id field'); + } + if (!json.client_secret) { + throw new Error('The incoming JSON object does not contain a client_secret field'); + } + if (!json.refresh_token) { + throw new Error('The incoming JSON object does not contain a refresh_token field'); + } + this._clientId = json.client_id; + this._clientSecret = json.client_secret; + this._refreshToken = json.refresh_token; + this.credentials.refresh_token = json.refresh_token; + this.quotaProjectId = json.quota_project_id; + this.universeDomain = json.universe_domain || this.universeDomain; + } + fromStream(inputStream, callback) { + if (callback) { + this.fromStreamAsync(inputStream).then(() => callback(), callback); + } + else { + return this.fromStreamAsync(inputStream); + } + } + async fromStreamAsync(inputStream) { + return new Promise((resolve, reject) => { + if (!inputStream) { + return reject(new Error('Must pass in a stream containing the user refresh token.')); + } + let s = ''; + inputStream + .setEncoding('utf8') + .on('error', reject) + .on('data', chunk => (s += chunk)) + .on('end', () => { + try { + const data = JSON.parse(s); + this.fromJSON(data); + return resolve(); + } + catch (err) { + return reject(err); + } + }); }); - } } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. + /** + * Create a UserRefreshClient credentials instance using the given input + * options. + * @param json The input object. + */ + static fromJSON(json) { + const client = new UserRefreshClient(); + client.fromJSON(json); + return client; + } +} +exports.UserRefreshClient = UserRefreshClient; - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - var N; +/***/ }), - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); +/***/ 86308: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - N = []; +"use strict"; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); +// Copyright 2021 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StsCredentials = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const querystring = __nccwpck_require__(63477); +const transporters_1 = __nccwpck_require__(72649); +const oauth2common_1 = __nccwpck_require__(19510); +/** + * Implements the OAuth 2.0 token exchange based on + * https://tools.ietf.org/html/rfc8693 + */ +class StsCredentials extends oauth2common_1.OAuthClientAuthHandler { + /** + * Initializes an STS credentials instance. + * @param tokenExchangeEndpoint The token exchange endpoint. + * @param clientAuthentication The client authentication credentials if + * available. + */ + constructor(tokenExchangeEndpoint, clientAuthentication) { + super(clientAuthentication); + this.tokenExchangeEndpoint = tokenExchangeEndpoint; + this.transporter = new transporters_1.DefaultTransporter(); } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); + /** + * Exchanges the provided token for another type of token based on the + * rfc8693 spec. + * @param stsCredentialsOptions The token exchange options used to populate + * the token exchange request. + * @param additionalHeaders Optional additional headers to pass along the + * request. + * @param options Optional additional GCP-specific non-spec defined options + * to send with the request. + * Example: `&options=${encodeUriComponent(JSON.stringified(options))}` + * @return A promise that resolves with the token exchange response containing + * the requested token and its expiration time. + */ + async exchangeToken(stsCredentialsOptions, additionalHeaders, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + options) { + var _a, _b, _c; + const values = { + grant_type: stsCredentialsOptions.grantType, + resource: stsCredentialsOptions.resource, + audience: stsCredentialsOptions.audience, + scope: (_a = stsCredentialsOptions.scope) === null || _a === void 0 ? void 0 : _a.join(' '), + requested_token_type: stsCredentialsOptions.requestedTokenType, + subject_token: stsCredentialsOptions.subjectToken, + subject_token_type: stsCredentialsOptions.subjectTokenType, + actor_token: (_b = stsCredentialsOptions.actingParty) === null || _b === void 0 ? void 0 : _b.actorToken, + actor_token_type: (_c = stsCredentialsOptions.actingParty) === null || _c === void 0 ? void 0 : _c.actorTokenType, + // Non-standard GCP-specific options. + options: options && JSON.stringify(options), + }; + // Remove undefined fields. + Object.keys(values).forEach(key => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (typeof values[key] === 'undefined') { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + delete values[key]; + } + }); + const headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + }; + // Inject additional STS headers if available. + Object.assign(headers, additionalHeaders || {}); + const opts = { + ...StsCredentials.RETRY_CONFIG, + url: this.tokenExchangeEndpoint.toString(), + method: 'POST', + headers, + data: querystring.stringify(values), + responseType: 'json', + }; + // Apply OAuth client authentication. + this.applyClientAuthenticationOptions(opts); + try { + const response = await this.transporter.request(opts); + // Successful response. + const stsSuccessfulResponse = response.data; + stsSuccessfulResponse.res = response; + return stsSuccessfulResponse; + } + catch (error) { + // Translate error to OAuthError. + if (error instanceof gaxios_1.GaxiosError && error.response) { + throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, + // Preserve other fields from the original error. + error); + } + // Request could fail before the server responds. + throw error; + } } - } - - return expansions; } - +exports.StsCredentials = StsCredentials; /***/ }), -/***/ 9239: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 7428: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -/*jshint node:true */ -var Buffer = (__nccwpck_require__(14300).Buffer); // browserify -var SlowBuffer = (__nccwpck_require__(14300).SlowBuffer); +// Copyright 2024 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UrlSubjectTokenSupplier = void 0; +/** + * Internal subject token supplier implementation used when a URL + * is configured in the credential configuration used to build an {@link IdentityPoolClient} + */ +class UrlSubjectTokenSupplier { + /** + * Instantiates a URL subject token supplier. + * @param opts The URL subject token supplier options to build the supplier with. + */ + constructor(opts) { + this.url = opts.url; + this.formatType = opts.formatType; + this.subjectTokenFieldName = opts.subjectTokenFieldName; + this.headers = opts.headers; + this.additionalGaxiosOptions = opts.additionalGaxiosOptions; + } + /** + * Sends a GET request to the URL provided in the constructor and resolves + * with the returned external subject token. + * @param context {@link ExternalAccountSupplierContext} from the calling + * {@link IdentityPoolClient}, contains the requested audience and subject + * token type for the external account identity. Not used. + */ + async getSubjectToken(context) { + const opts = { + ...this.additionalGaxiosOptions, + url: this.url, + method: 'GET', + headers: this.headers, + responseType: this.formatType, + }; + let subjectToken; + if (this.formatType === 'text') { + const response = await context.transporter.request(opts); + subjectToken = response.data; + } + else if (this.formatType === 'json' && this.subjectTokenFieldName) { + const response = await context.transporter.request(opts); + subjectToken = response.data[this.subjectTokenFieldName]; + } + if (!subjectToken) { + throw new Error('Unable to parse the subject_token from the credential_source URL'); + } + return subjectToken; + } +} +exports.UrlSubjectTokenSupplier = UrlSubjectTokenSupplier; -module.exports = bufferEq; -function bufferEq(a, b) { +/***/ }), - // shortcutting on type is necessary for correctness - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - return false; - } +/***/ 14693: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // buffer sizes should be well-known information, so despite this - // shortcutting, it doesn't leak any information about the *contents* of the - // buffers. - if (a.length !== b.length) { - return false; - } +"use strict"; - var c = 0; - for (var i = 0; i < a.length; i++) { - /*jshint bitwise:false */ - c |= a[i] ^ b[i]; // XOR - } - return c === 0; +// Copyright 2019 Google LLC +// +// 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. +/* global window */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BrowserCrypto = void 0; +// This file implements crypto functions we need using in-browser +// SubtleCrypto interface `window.crypto.subtle`. +const base64js = __nccwpck_require__(26463); +const crypto_1 = __nccwpck_require__(78043); +class BrowserCrypto { + constructor() { + if (typeof window === 'undefined' || + window.crypto === undefined || + window.crypto.subtle === undefined) { + throw new Error("SubtleCrypto not found. Make sure it's an https:// website."); + } + } + async sha256DigestBase64(str) { + // SubtleCrypto digest() method is async, so we must make + // this method async as well. + // To calculate SHA256 digest using SubtleCrypto, we first + // need to convert an input string to an ArrayBuffer: + const inputBuffer = new TextEncoder().encode(str); + // Result is ArrayBuffer as well. + const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); + return base64js.fromByteArray(new Uint8Array(outputBuffer)); + } + randomBytesBase64(count) { + const array = new Uint8Array(count); + window.crypto.getRandomValues(array); + return base64js.fromByteArray(array); + } + static padBase64(base64) { + // base64js requires padding, so let's add some '=' + while (base64.length % 4 !== 0) { + base64 += '='; + } + return base64; + } + async verify(pubkey, data, signature) { + const algo = { + name: 'RSASSA-PKCS1-v1_5', + hash: { name: 'SHA-256' }, + }; + const dataArray = new TextEncoder().encode(data); + const signatureArray = base64js.toByteArray(BrowserCrypto.padBase64(signature)); + const cryptoKey = await window.crypto.subtle.importKey('jwk', pubkey, algo, true, ['verify']); + // SubtleCrypto's verify method is async so we must make + // this method async as well. + const result = await window.crypto.subtle.verify(algo, cryptoKey, signatureArray, dataArray); + return result; + } + async sign(privateKey, data) { + const algo = { + name: 'RSASSA-PKCS1-v1_5', + hash: { name: 'SHA-256' }, + }; + const dataArray = new TextEncoder().encode(data); + const cryptoKey = await window.crypto.subtle.importKey('jwk', privateKey, algo, true, ['sign']); + // SubtleCrypto's sign method is async so we must make + // this method async as well. + const result = await window.crypto.subtle.sign(algo, cryptoKey, dataArray); + return base64js.fromByteArray(new Uint8Array(result)); + } + decodeBase64StringUtf8(base64) { + const uint8array = base64js.toByteArray(BrowserCrypto.padBase64(base64)); + const result = new TextDecoder().decode(uint8array); + return result; + } + encodeBase64StringUtf8(text) { + const uint8array = new TextEncoder().encode(text); + const result = base64js.fromByteArray(uint8array); + return result; + } + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + async sha256DigestHex(str) { + // SubtleCrypto digest() method is async, so we must make + // this method async as well. + // To calculate SHA256 digest using SubtleCrypto, we first + // need to convert an input string to an ArrayBuffer: + const inputBuffer = new TextEncoder().encode(str); + // Result is ArrayBuffer as well. + const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); + return (0, crypto_1.fromArrayBufferToHex)(outputBuffer); + } + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + async signWithHmacSha256(key, msg) { + // Convert key, if provided in ArrayBuffer format, to string. + const rawKey = typeof key === 'string' + ? key + : String.fromCharCode(...new Uint16Array(key)); + const enc = new TextEncoder(); + const cryptoKey = await window.crypto.subtle.importKey('raw', enc.encode(rawKey), { + name: 'HMAC', + hash: { + name: 'SHA-256', + }, + }, false, ['sign']); + return window.crypto.subtle.sign('HMAC', cryptoKey, enc.encode(msg)); + } } - -bufferEq.install = function() { - Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { - return bufferEq(this, that); - }; -}; - -var origBufEqual = Buffer.prototype.equal; -var origSlowBufEqual = SlowBuffer.prototype.equal; -bufferEq.restore = function() { - Buffer.prototype.equal = origBufEqual; - SlowBuffer.prototype.equal = origSlowBufEqual; -}; +exports.BrowserCrypto = BrowserCrypto; /***/ }), -/***/ 85443: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var util = __nccwpck_require__(73837); -var Stream = (__nccwpck_require__(12781).Stream); -var DelayedStream = __nccwpck_require__(18611); +/***/ 78043: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = CombinedStream; -function CombinedStream() { - this.writable = false; - this.readable = true; - this.dataSize = 0; - this.maxDataSize = 2 * 1024 * 1024; - this.pauseStreams = true; +"use strict"; - this._released = false; - this._streams = []; - this._currentStream = null; - this._insideLoop = false; - this._pendingNext = false; +// Copyright 2019 Google LLC +// +// 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. +/* global window */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createCrypto = createCrypto; +exports.hasBrowserCrypto = hasBrowserCrypto; +exports.fromArrayBufferToHex = fromArrayBufferToHex; +const crypto_1 = __nccwpck_require__(14693); +const crypto_2 = __nccwpck_require__(30757); +function createCrypto() { + if (hasBrowserCrypto()) { + return new crypto_1.BrowserCrypto(); + } + return new crypto_2.NodeCrypto(); +} +function hasBrowserCrypto() { + return (typeof window !== 'undefined' && + typeof window.crypto !== 'undefined' && + typeof window.crypto.subtle !== 'undefined'); +} +/** + * Converts an ArrayBuffer to a hexadecimal string. + * @param arrayBuffer The ArrayBuffer to convert to hexadecimal string. + * @return The hexadecimal encoding of the ArrayBuffer. + */ +function fromArrayBufferToHex(arrayBuffer) { + // Convert buffer to byte array. + const byteArray = Array.from(new Uint8Array(arrayBuffer)); + // Convert bytes to hex string. + return byteArray + .map(byte => { + return byte.toString(16).padStart(2, '0'); + }) + .join(''); } -util.inherits(CombinedStream, Stream); - -CombinedStream.create = function(options) { - var combinedStream = new this(); - options = options || {}; - for (var option in options) { - combinedStream[option] = options[option]; - } - return combinedStream; -}; +/***/ }), -CombinedStream.isStreamLike = function(stream) { - return (typeof stream !== 'function') - && (typeof stream !== 'string') - && (typeof stream !== 'boolean') - && (typeof stream !== 'number') - && (!Buffer.isBuffer(stream)); -}; +/***/ 30757: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -CombinedStream.prototype.append = function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); +"use strict"; - if (isStreamLike) { - if (!(stream instanceof DelayedStream)) { - var newStream = DelayedStream.create(stream, { - maxDataSize: Infinity, - pauseStream: this.pauseStreams, - }); - stream.on('data', this._checkDataSize.bind(this)); - stream = newStream; +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeCrypto = void 0; +const crypto = __nccwpck_require__(6113); +class NodeCrypto { + async sha256DigestBase64(str) { + return crypto.createHash('sha256').update(str).digest('base64'); } - - this._handleErrors(stream); - - if (this.pauseStreams) { - stream.pause(); + randomBytesBase64(count) { + return crypto.randomBytes(count).toString('base64'); } - } + async verify(pubkey, data, signature) { + const verifier = crypto.createVerify('RSA-SHA256'); + verifier.update(data); + verifier.end(); + return verifier.verify(pubkey, signature, 'base64'); + } + async sign(privateKey, data) { + const signer = crypto.createSign('RSA-SHA256'); + signer.update(data); + signer.end(); + return signer.sign(privateKey, 'base64'); + } + decodeBase64StringUtf8(base64) { + return Buffer.from(base64, 'base64').toString('utf-8'); + } + encodeBase64StringUtf8(text) { + return Buffer.from(text, 'utf-8').toString('base64'); + } + /** + * Computes the SHA-256 hash of the provided string. + * @param str The plain text string to hash. + * @return A promise that resolves with the SHA-256 hash of the provided + * string in hexadecimal encoding. + */ + async sha256DigestHex(str) { + return crypto.createHash('sha256').update(str).digest('hex'); + } + /** + * Computes the HMAC hash of a message using the provided crypto key and the + * SHA-256 algorithm. + * @param key The secret crypto key in utf-8 or ArrayBuffer format. + * @param msg The plain text message. + * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer + * format. + */ + async signWithHmacSha256(key, msg) { + const cryptoKey = typeof key === 'string' ? key : toBuffer(key); + return toArrayBuffer(crypto.createHmac('sha256', cryptoKey).update(msg).digest()); + } +} +exports.NodeCrypto = NodeCrypto; +/** + * Converts a Node.js Buffer to an ArrayBuffer. + * https://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer + * @param buffer The Buffer input to covert. + * @return The ArrayBuffer representation of the input. + */ +function toArrayBuffer(buffer) { + return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); +} +/** + * Converts an ArrayBuffer to a Node.js Buffer. + * @param arrayBuffer The ArrayBuffer input to covert. + * @return The Buffer representation of the input. + */ +function toBuffer(arrayBuffer) { + return Buffer.from(arrayBuffer); +} - this._streams.push(stream); - return this; -}; -CombinedStream.prototype.pipe = function(dest, options) { - Stream.prototype.pipe.call(this, dest, options); - this.resume(); - return dest; -}; +/***/ }), -CombinedStream.prototype._getNext = function() { - this._currentStream = null; +/***/ 20810: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (this._insideLoop) { - this._pendingNext = true; - return; // defer call - } +"use strict"; - this._insideLoop = true; - try { - do { - this._pendingNext = false; - this._realGetNext(); - } while (this._pendingNext); - } finally { - this._insideLoop = false; - } -}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GoogleAuth = exports.auth = exports.DefaultTransporter = exports.PassThroughClient = exports.ExecutableError = exports.PluggableAuthClient = exports.DownscopedClient = exports.BaseExternalAccountClient = exports.ExternalAccountClient = exports.IdentityPoolClient = exports.AwsRequestSigner = exports.AwsClient = exports.UserRefreshClient = exports.LoginTicket = exports.ClientAuthentication = exports.OAuth2Client = exports.CodeChallengeMethod = exports.Impersonated = exports.JWT = exports.JWTAccess = exports.IdTokenClient = exports.IAMAuth = exports.GCPEnv = exports.Compute = exports.DEFAULT_UNIVERSE = exports.AuthClient = exports.gaxios = exports.gcpMetadata = void 0; +// Copyright 2017 Google LLC +// +// 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. +const googleauth_1 = __nccwpck_require__(20695); +Object.defineProperty(exports, "GoogleAuth", ({ enumerable: true, get: function () { return googleauth_1.GoogleAuth; } })); +// Export common deps to ensure types/instances are the exact match. Useful +// for consistently configuring the library across versions. +exports.gcpMetadata = __nccwpck_require__(3563); +exports.gaxios = __nccwpck_require__(59555); +var authclient_1 = __nccwpck_require__(44627); +Object.defineProperty(exports, "AuthClient", ({ enumerable: true, get: function () { return authclient_1.AuthClient; } })); +Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_1.DEFAULT_UNIVERSE; } })); +var computeclient_1 = __nccwpck_require__(96875); +Object.defineProperty(exports, "Compute", ({ enumerable: true, get: function () { return computeclient_1.Compute; } })); +var envDetect_1 = __nccwpck_require__(21380); +Object.defineProperty(exports, "GCPEnv", ({ enumerable: true, get: function () { return envDetect_1.GCPEnv; } })); +var iam_1 = __nccwpck_require__(39735); +Object.defineProperty(exports, "IAMAuth", ({ enumerable: true, get: function () { return iam_1.IAMAuth; } })); +var idtokenclient_1 = __nccwpck_require__(80298); +Object.defineProperty(exports, "IdTokenClient", ({ enumerable: true, get: function () { return idtokenclient_1.IdTokenClient; } })); +var jwtaccess_1 = __nccwpck_require__(68740); +Object.defineProperty(exports, "JWTAccess", ({ enumerable: true, get: function () { return jwtaccess_1.JWTAccess; } })); +var jwtclient_1 = __nccwpck_require__(13959); +Object.defineProperty(exports, "JWT", ({ enumerable: true, get: function () { return jwtclient_1.JWT; } })); +var impersonated_1 = __nccwpck_require__(91103); +Object.defineProperty(exports, "Impersonated", ({ enumerable: true, get: function () { return impersonated_1.Impersonated; } })); +var oauth2client_1 = __nccwpck_require__(3936); +Object.defineProperty(exports, "CodeChallengeMethod", ({ enumerable: true, get: function () { return oauth2client_1.CodeChallengeMethod; } })); +Object.defineProperty(exports, "OAuth2Client", ({ enumerable: true, get: function () { return oauth2client_1.OAuth2Client; } })); +Object.defineProperty(exports, "ClientAuthentication", ({ enumerable: true, get: function () { return oauth2client_1.ClientAuthentication; } })); +var loginticket_1 = __nccwpck_require__(74524); +Object.defineProperty(exports, "LoginTicket", ({ enumerable: true, get: function () { return loginticket_1.LoginTicket; } })); +var refreshclient_1 = __nccwpck_require__(98790); +Object.defineProperty(exports, "UserRefreshClient", ({ enumerable: true, get: function () { return refreshclient_1.UserRefreshClient; } })); +var awsclient_1 = __nccwpck_require__(71569); +Object.defineProperty(exports, "AwsClient", ({ enumerable: true, get: function () { return awsclient_1.AwsClient; } })); +var awsrequestsigner_1 = __nccwpck_require__(1754); +Object.defineProperty(exports, "AwsRequestSigner", ({ enumerable: true, get: function () { return awsrequestsigner_1.AwsRequestSigner; } })); +var identitypoolclient_1 = __nccwpck_require__(20117); +Object.defineProperty(exports, "IdentityPoolClient", ({ enumerable: true, get: function () { return identitypoolclient_1.IdentityPoolClient; } })); +var externalclient_1 = __nccwpck_require__(94381); +Object.defineProperty(exports, "ExternalAccountClient", ({ enumerable: true, get: function () { return externalclient_1.ExternalAccountClient; } })); +var baseexternalclient_1 = __nccwpck_require__(40810); +Object.defineProperty(exports, "BaseExternalAccountClient", ({ enumerable: true, get: function () { return baseexternalclient_1.BaseExternalAccountClient; } })); +var downscopedclient_1 = __nccwpck_require__(6270); +Object.defineProperty(exports, "DownscopedClient", ({ enumerable: true, get: function () { return downscopedclient_1.DownscopedClient; } })); +var pluggable_auth_client_1 = __nccwpck_require__(44782); +Object.defineProperty(exports, "PluggableAuthClient", ({ enumerable: true, get: function () { return pluggable_auth_client_1.PluggableAuthClient; } })); +Object.defineProperty(exports, "ExecutableError", ({ enumerable: true, get: function () { return pluggable_auth_client_1.ExecutableError; } })); +var passthrough_1 = __nccwpck_require__(32460); +Object.defineProperty(exports, "PassThroughClient", ({ enumerable: true, get: function () { return passthrough_1.PassThroughClient; } })); +var transporters_1 = __nccwpck_require__(72649); +Object.defineProperty(exports, "DefaultTransporter", ({ enumerable: true, get: function () { return transporters_1.DefaultTransporter; } })); +const auth = new googleauth_1.GoogleAuth(); +exports.auth = auth; -CombinedStream.prototype._realGetNext = function() { - var stream = this._streams.shift(); +/***/ }), - if (typeof stream == 'undefined') { - this.end(); - return; - } +/***/ 16608: +/***/ ((__unused_webpack_module, exports) => { - if (typeof stream !== 'function') { - this._pipeNext(stream); - return; - } +"use strict"; - var getStream = stream; - getStream(function(stream) { - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('data', this._checkDataSize.bind(this)); - this._handleErrors(stream); +// Copyright 2017 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validate = validate; +// Accepts an options object passed from the user to the API. In the +// previous version of the API, it referred to a `Request` options object. +// Now it refers to an Axiox Request Config object. This is here to help +// ensure users don't pass invalid options when they upgrade from 0.x to 1.x. +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function validate(options) { + const vpairs = [ + { invalid: 'uri', expected: 'url' }, + { invalid: 'json', expected: 'data' }, + { invalid: 'qs', expected: 'params' }, + ]; + for (const pair of vpairs) { + if (options[pair.invalid]) { + const e = `'${pair.invalid}' is not a valid configuration option. Please use '${pair.expected}' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.`; + throw new Error(e); + } } +} - this._pipeNext(stream); - }.bind(this)); -}; - -CombinedStream.prototype._pipeNext = function(stream) { - this._currentStream = stream; - - var isStreamLike = CombinedStream.isStreamLike(stream); - if (isStreamLike) { - stream.on('end', this._getNext.bind(this)); - stream.pipe(this, {end: false}); - return; - } - - var value = stream; - this.write(value); - this._getNext(); -}; - -CombinedStream.prototype._handleErrors = function(stream) { - var self = this; - stream.on('error', function(err) { - self._emitError(err); - }); -}; - -CombinedStream.prototype.write = function(data) { - this.emit('data', data); -}; -CombinedStream.prototype.pause = function() { - if (!this.pauseStreams) { - return; - } +/***/ }), - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); - this.emit('pause'); -}; +/***/ 72649: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -CombinedStream.prototype.resume = function() { - if (!this._released) { - this._released = true; - this.writable = true; - this._getNext(); - } +"use strict"; - if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); - this.emit('resume'); -}; +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefaultTransporter = void 0; +const gaxios_1 = __nccwpck_require__(59555); +const options_1 = __nccwpck_require__(16608); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const pkg = __nccwpck_require__(51402); +const PRODUCT_NAME = 'google-api-nodejs-client'; +class DefaultTransporter { + constructor() { + /** + * A configurable, replacable `Gaxios` instance. + */ + this.instance = new gaxios_1.Gaxios(); + } + /** + * Configures request options before making a request. + * @param opts GaxiosOptions options. + * @return Configured options. + */ + configure(opts = {}) { + opts.headers = opts.headers || {}; + if (typeof window === 'undefined') { + // set transporter user agent if not in browser + const uaValue = opts.headers['User-Agent']; + if (!uaValue) { + opts.headers['User-Agent'] = DefaultTransporter.USER_AGENT; + } + else if (!uaValue.includes(`${PRODUCT_NAME}/`)) { + opts.headers['User-Agent'] = + `${uaValue} ${DefaultTransporter.USER_AGENT}`; + } + // track google-auth-library-nodejs version: + if (!opts.headers['x-goog-api-client']) { + const nodeVersion = process.version.replace(/^v/, ''); + opts.headers['x-goog-api-client'] = `gl-node/${nodeVersion}`; + } + } + return opts; + } + /** + * Makes a request using Gaxios with given options. + * @param opts GaxiosOptions options. + * @param callback optional callback that contains GaxiosResponse object. + * @return GaxiosPromise, assuming no callback is passed. + */ + request(opts) { + // ensure the user isn't passing in request-style options + opts = this.configure(opts); + (0, options_1.validate)(opts); + return this.instance.request(opts).catch(e => { + throw this.processError(e); + }); + } + get defaults() { + return this.instance.defaults; + } + set defaults(opts) { + this.instance.defaults = opts; + } + /** + * Changes the error to include details from the body. + */ + processError(e) { + const res = e.response; + const err = e; + const body = res ? res.data : null; + if (res && body && body.error && res.status !== 200) { + if (typeof body.error === 'string') { + err.message = body.error; + err.status = res.status; + } + else if (Array.isArray(body.error.errors)) { + err.message = body.error.errors + .map((err2) => err2.message) + .join('\n'); + err.code = body.error.code; + err.errors = body.error.errors; + } + else { + err.message = body.error.message; + err.code = body.error.code; + } + } + else if (res && res.status >= 400) { + // Consider all 4xx and 5xx responses errors. + err.message = body; + err.status = res.status; + } + return err; + } +} +exports.DefaultTransporter = DefaultTransporter; +/** + * Default user agent. + */ +DefaultTransporter.USER_AGENT = `${PRODUCT_NAME}/${pkg.version}`; -CombinedStream.prototype.end = function() { - this._reset(); - this.emit('end'); -}; -CombinedStream.prototype.destroy = function() { - this._reset(); - this.emit('close'); -}; +/***/ }), -CombinedStream.prototype._reset = function() { - this.writable = false; - this._streams = []; - this._currentStream = null; -}; +/***/ 68905: +/***/ (function(__unused_webpack_module, exports) { -CombinedStream.prototype._checkDataSize = function() { - this._updateDataSize(); - if (this.dataSize <= this.maxDataSize) { - return; - } +"use strict"; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; - this._emitError(new Error(message)); +// Copyright 2023 Google LLC +// +// 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. +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; - -CombinedStream.prototype._updateDataSize = function() { - this.dataSize = 0; - - var self = this; - this._streams.forEach(function(stream) { - if (!stream.dataSize) { - return; +var _LRUCache_instances, _LRUCache_cache, _LRUCache_moveToEnd, _LRUCache_evict; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LRUCache = void 0; +exports.snakeToCamel = snakeToCamel; +exports.originalOrCamelOptions = originalOrCamelOptions; +/** + * Returns the camel case of a provided string. + * + * @remarks + * + * Match any `_` and not `_` pair, then return the uppercase of the not `_` + * character. + * + * @internal + * + * @param str the string to convert + * @returns the camelCase'd string + */ +function snakeToCamel(str) { + return str.replace(/([_][^_])/g, match => match.slice(1).toUpperCase()); +} +/** + * Get the value of `obj[key]` or `obj[camelCaseKey]`, with a preference + * for original, non-camelCase key. + * + * @param obj object to lookup a value in + * @returns a `get` function for getting `obj[key || snakeKey]`, if available + */ +function originalOrCamelOptions(obj) { + /** + * + * @param key an index of object, preferably snake_case + * @returns the value `obj[key || snakeKey]`, if available + */ + function get(key) { + var _a; + const o = (obj || {}); + return (_a = o[key]) !== null && _a !== void 0 ? _a : o[snakeToCamel(key)]; + } + return { get }; +} +/** + * A simple LRU cache utility. + * Not meant for external usage. + * + * @experimental + * @internal + */ +class LRUCache { + constructor(options) { + _LRUCache_instances.add(this); + /** + * Maps are in order. Thus, the older item is the first item. + * + * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map} + */ + _LRUCache_cache.set(this, new Map()); + this.capacity = options.capacity; + this.maxAge = options.maxAge; + } + /** + * Add an item to the cache. + * + * @param key the key to upsert + * @param value the value of the key + */ + set(key, value) { + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, value); + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); + } + /** + * Get an item from the cache. + * + * @param key the key to retrieve + */ + get(key) { + const item = __classPrivateFieldGet(this, _LRUCache_cache, "f").get(key); + if (!item) + return; + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, item.value); + __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); + return item.value; + } +} +exports.LRUCache = LRUCache; +_LRUCache_cache = new WeakMap(), _LRUCache_instances = new WeakSet(), _LRUCache_moveToEnd = function _LRUCache_moveToEnd(key, value) { + __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(key); + __classPrivateFieldGet(this, _LRUCache_cache, "f").set(key, { + value, + lastAccessed: Date.now(), + }); +}, _LRUCache_evict = function _LRUCache_evict() { + const cutoffDate = this.maxAge ? Date.now() - this.maxAge : 0; + /** + * Because we know Maps are in order, this item is both the + * last item in the list (capacity) and oldest (maxAge). + */ + let oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); + while (!oldestItem.done && + (__classPrivateFieldGet(this, _LRUCache_cache, "f").size > this.capacity || // too many + oldestItem.value[1].lastAccessed < cutoffDate) // too old + ) { + __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(oldestItem.value[0]); + oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); } +}; - self.dataSize += stream.dataSize; - }); - if (this._currentStream && this._currentStream.dataSize) { - this.dataSize += this._currentStream.dataSize; - } -}; +/***/ }), -CombinedStream.prototype._emitError = function(err) { - this._reset(); - this.emit('error', err); -}; +/***/ 74118: +/***/ ((__unused_webpack_module, exports) => { +"use strict"; -/***/ }), +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Colours = void 0; +/** + * Handles figuring out if we can use ANSI colours and handing out the escape codes. + * + * This is for package-internal use only, and may change at any time. + * + * @private + * @internal + */ +class Colours { + /** + * @param stream The stream (e.g. process.stderr) + * @returns true if the stream should have colourization enabled + */ + static isEnabled(stream) { + return (stream.isTTY && + (typeof stream.getColorDepth === 'function' + ? stream.getColorDepth() > 2 + : true)); + } + static refresh() { + Colours.enabled = Colours.isEnabled(process.stderr); + if (!this.enabled) { + Colours.reset = ''; + Colours.bright = ''; + Colours.dim = ''; + Colours.red = ''; + Colours.green = ''; + Colours.yellow = ''; + Colours.blue = ''; + Colours.magenta = ''; + Colours.cyan = ''; + Colours.white = ''; + Colours.grey = ''; + } + else { + Colours.reset = '\u001b[0m'; + Colours.bright = '\u001b[1m'; + Colours.dim = '\u001b[2m'; + Colours.red = '\u001b[31m'; + Colours.green = '\u001b[32m'; + Colours.yellow = '\u001b[33m'; + Colours.blue = '\u001b[34m'; + Colours.magenta = '\u001b[35m'; + Colours.cyan = '\u001b[36m'; + Colours.white = '\u001b[37m'; + Colours.grey = '\u001b[90m'; + } + } +} +exports.Colours = Colours; +Colours.enabled = false; +Colours.reset = ''; +Colours.bright = ''; +Colours.dim = ''; +Colours.red = ''; +Colours.green = ''; +Colours.yellow = ''; +Colours.blue = ''; +Colours.magenta = ''; +Colours.cyan = ''; +Colours.white = ''; +Colours.grey = ''; +Colours.refresh(); +//# sourceMappingURL=colours.js.map + +/***/ }), + +/***/ 97306: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -/***/ 86891: -/***/ ((module) => { +"use strict"; -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); +// Copyright 2024 Google LLC +// +// 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 +// +// https://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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; - +Object.defineProperty(exports, "__esModule", ({ value: true })); +__exportStar(__nccwpck_require__(13029), exports); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 28222: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 13029: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -/* eslint-env browser */ +"use strict"; +// Copyright 2021-2024 Google LLC +// +// 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 +// +// https://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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.env = exports.DebugLogBackendBase = exports.placeholder = exports.AdhocDebugLogger = exports.LogSeverity = void 0; +exports.getNodeBackend = getNodeBackend; +exports.getDebugBackend = getDebugBackend; +exports.getStructuredBackend = getStructuredBackend; +exports.setBackend = setBackend; +exports.log = log; +const node_events_1 = __nccwpck_require__(15673); +const process = __importStar(__nccwpck_require__(97742)); +const util = __importStar(__nccwpck_require__(47261)); +const colours_1 = __nccwpck_require__(74118); +// Some functions (as noted) are based on the Node standard library, from +// the following file: +// +// https://github.com/nodejs/node/blob/main/lib/internal/util/debuglog.js /** - * This is the web browser implementation of `debug()`. + * This module defines an ad-hoc debug logger for Google Cloud Platform + * client libraries in Node. An ad-hoc debug logger is a tool which lets + * users use an external, unified interface (in this case, environment + * variables) to determine what logging they want to see at runtime. This + * isn't necessarily fed into the console, but is meant to be under the + * control of the user. The kind of logging that will be produced by this + * is more like "call retry happened", not "event you'd want to record + * in Cloud Logger". + * + * More for Googlers implementing libraries with it: + * go/cloud-client-logging-design */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - /** - * Colors. + * Possible log levels. These are a subset of Cloud Observability levels. + * https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - +var LogSeverity; +(function (LogSeverity) { + LogSeverity["DEFAULT"] = "DEFAULT"; + LogSeverity["DEBUG"] = "DEBUG"; + LogSeverity["INFO"] = "INFO"; + LogSeverity["WARNING"] = "WARNING"; + LogSeverity["ERROR"] = "ERROR"; +})(LogSeverity || (exports.LogSeverity = LogSeverity = {})); /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors + * Our logger instance. This actually contains the meat of dealing + * with log lines, including EventEmitter. This contains the function + * that will be passed back to users of the package. */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +class AdhocDebugLogger extends node_events_1.EventEmitter { + /** + * @param upstream The backend will pass a function that will be + * called whenever our logger function is invoked. + */ + constructor(namespace, upstream) { + super(); + this.namespace = namespace; + this.upstream = upstream; + this.func = Object.assign(this.invoke.bind(this), { + // Also add an instance pointer back to us. + instance: this, + // And pull over the EventEmitter functionality. + on: (event, listener) => this.on(event, listener), + }); + // Convenience methods for log levels. + this.func.debug = (...args) => this.invokeSeverity(LogSeverity.DEBUG, ...args); + this.func.info = (...args) => this.invokeSeverity(LogSeverity.INFO, ...args); + this.func.warn = (...args) => this.invokeSeverity(LogSeverity.WARNING, ...args); + this.func.error = (...args) => this.invokeSeverity(LogSeverity.ERROR, ...args); + this.func.sublog = (namespace) => log(namespace, this.func); + } + invoke(fields, ...args) { + // Push out any upstream logger first. + if (this.upstream) { + this.upstream(fields, ...args); + } + // Emit sink events. + this.emit('log', fields, args); + } + invokeSeverity(severity, ...args) { + this.invoke({ severity }, ...args); + } } - +exports.AdhocDebugLogger = AdhocDebugLogger; /** - * Colorize log arguments if enabled. + * This can be used in place of a real logger while waiting for Promises or disabling logging. + */ +exports.placeholder = new AdhocDebugLogger('', () => { }).func; +/** + * The base class for debug logging backends. It's possible to use this, but the + * same non-guarantees above still apply (unstable interface, etc). * - * @api public + * @private + * @internal */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); +class DebugLogBackendBase { + constructor() { + var _a; + this.cached = new Map(); + this.filters = []; + this.filtersSet = false; + // Look for the Node config variable for what systems to enable. We'll store + // these for the log method below, which will call setFilters() once. + let nodeFlag = (_a = process.env[exports.env.nodeEnables]) !== null && _a !== void 0 ? _a : '*'; + if (nodeFlag === 'all') { + nodeFlag = '*'; + } + this.filters = nodeFlag.split(','); + } + log(namespace, fields, ...args) { + try { + if (!this.filtersSet) { + this.setFilters(); + this.filtersSet = true; + } + let logger = this.cached.get(namespace); + if (!logger) { + logger = this.makeLogger(namespace); + this.cached.set(namespace, logger); + } + logger(fields, ...args); + } + catch (e) { + // Silently ignore all errors; we don't want them to interfere with + // the user's running app. + // e; + console.error(e); + } + } +} +exports.DebugLogBackendBase = DebugLogBackendBase; +// The basic backend. This one definitely works, but it's less feature-filled. +// +// Rather than using util.debuglog, this implements the same basic logic directly. +// The reason for this decision is that debuglog checks the value of the +// NODE_DEBUG environment variable before any user code runs; we therefore +// can't pipe our own enables into it (and util.debuglog will never print unless +// the user duplicates it into NODE_DEBUG, which isn't reasonable). +// +class NodeBackend extends DebugLogBackendBase { + constructor() { + super(...arguments); + // Default to allowing all systems, since we gate earlier based on whether the + // variable is empty. + this.enabledRegexp = /.*/g; + } + isEnabled(namespace) { + return this.enabledRegexp.test(namespace); + } + makeLogger(namespace) { + if (!this.enabledRegexp.test(namespace)) { + return () => { }; + } + return (fields, ...args) => { + var _a; + // TODO: `fields` needs to be turned into a string here, one way or another. + const nscolour = `${colours_1.Colours.green}${namespace}${colours_1.Colours.reset}`; + const pid = `${colours_1.Colours.yellow}${process.pid}${colours_1.Colours.reset}`; + let level; + switch (fields.severity) { + case LogSeverity.ERROR: + level = `${colours_1.Colours.red}${fields.severity}${colours_1.Colours.reset}`; + break; + case LogSeverity.INFO: + level = `${colours_1.Colours.magenta}${fields.severity}${colours_1.Colours.reset}`; + break; + case LogSeverity.WARNING: + level = `${colours_1.Colours.yellow}${fields.severity}${colours_1.Colours.reset}`; + break; + default: + level = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.DEFAULT; + break; + } + const msg = util.formatWithOptions({ colors: colours_1.Colours.enabled }, ...args); + const filteredFields = Object.assign({}, fields); + delete filteredFields.severity; + const fieldsJson = Object.getOwnPropertyNames(filteredFields).length + ? JSON.stringify(filteredFields) + : ''; + const fieldsColour = fieldsJson + ? `${colours_1.Colours.grey}${fieldsJson}${colours_1.Colours.reset}` + : ''; + console.error('%s [%s|%s] %s%s', pid, nscolour, level, msg, fieldsJson ? ` ${fieldsColour}` : ''); + }; + } + // Regexp patterns below are from here: + // https://github.com/nodejs/node/blob/c0aebed4b3395bd65d54b18d1fd00f071002ac20/lib/internal/util/debuglog.js#L36 + setFilters() { + const totalFilters = this.filters.join(','); + const regexp = totalFilters + .replace(/[|\\{}()[\]^$+?.]/g, '\\$&') + .replace(/\*/g, '.*') + .replace(/,/g, '$|^'); + this.enabledRegexp = new RegExp(`^${regexp}$`, 'i'); + } } - /** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public + * @returns A backend based on Node util.debuglog; this is the default. */ -exports.log = console.debug || console.log || (() => {}); - +function getNodeBackend() { + return new NodeBackend(); +} +class DebugBackend extends DebugLogBackendBase { + constructor(pkg) { + super(); + this.debugPkg = pkg; + } + makeLogger(namespace) { + const debugLogger = this.debugPkg(namespace); + return (fields, ...args) => { + // TODO: `fields` needs to be turned into a string here. + debugLogger(args[0], ...args.slice(1)); + }; + } + setFilters() { + var _a; + const existingFilters = (_a = process.env['NODE_DEBUG']) !== null && _a !== void 0 ? _a : ''; + process.env['NODE_DEBUG'] = `${existingFilters}${existingFilters ? ',' : ''}${this.filters.join(',')}`; + } +} /** - * Save `namespaces`. + * Creates a "debug" package backend. The user must call require('debug') and pass + * the resulting object to this function. * - * @param {String} namespaces - * @api private + * ``` + * setBackend(getDebugBackend(require('debug'))) + * ``` + * + * https://www.npmjs.com/package/debug + * + * Note: Google does not explicitly endorse or recommend this package; it's just + * being provided as an option. + * + * @returns A backend based on the npm "debug" package. */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } +function getDebugBackend(debugPkg) { + return new DebugBackend(debugPkg); } - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private + * This pretty much works like the Node logger, but it outputs structured + * logging JSON matching Google Cloud's ingestion specs. Rather than handling + * its own output, it wraps another backend. The passed backend must be a subclass + * of `DebugLogBackendBase` (any of the backends exposed by this package will work). */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; +class StructuredBackend extends DebugLogBackendBase { + constructor(upstream) { + var _a; + super(); + this.upstream = (_a = upstream) !== null && _a !== void 0 ? _a : new NodeBackend(); + } + makeLogger(namespace) { + const debugLogger = this.upstream.makeLogger(namespace); + return (fields, ...args) => { + var _a; + const severity = (_a = fields.severity) !== null && _a !== void 0 ? _a : LogSeverity.INFO; + const json = Object.assign({ + severity, + message: util.format(...args), + }, fields); + const jsonString = JSON.stringify(json); + debugLogger(fields, jsonString); + }; + } + setFilters() { + this.upstream.setFilters(); + } } - /** - * Localstorage attempts to return the localstorage. + * Creates a "structured logging" backend. This pretty much works like the + * Node logger, but it outputs structured logging JSON matching Google + * Cloud's ingestion specs instead of plain text. * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. + * ``` + * setBackend(getStructuredBackend()) + * ``` * - * @return {LocalStorage} - * @api private + * @param upstream If you want to use something besides the Node backend to + * write the actual log lines into, pass that here. + * @returns A backend based on Google Cloud structured logging. */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } +function getStructuredBackend(upstream) { + return new StructuredBackend(upstream); } - -module.exports = __nccwpck_require__(46243)(exports); - -const {formatters} = module.exports; - /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + * The environment variables that we standardized on, for all ad-hoc logging. */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } +exports.env = { + /** + * Filter wildcards specific to the Node syntax, and similar to the built-in + * utils.debuglog() environment variable. If missing, disables logging. + */ + nodeEnables: 'GOOGLE_SDK_NODE_LOGGING', }; - - -/***/ }), - -/***/ 46243: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - +// Keep a copy of all namespaced loggers so users can reliably .on() them. +// Note that these cached functions will need to deal with changes in the backend. +const loggerCache = new Map(); +// Our current global backend. This might be: +let cachedBackend = undefined; /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. + * Set the backend to use for our log output. + * - A backend object + * - null to disable logging + * - undefined for "nothing yet", defaults to the Node backend + * + * @param backend Results from one of the get*Backend() functions. */ +function setBackend(backend) { + cachedBackend = backend; + loggerCache.clear(); +} +/** + * Creates a logging function. Multiple calls to this with the same namespace + * will produce the same logger, with the same event emitter hooks. + * + * Namespaces can be a simple string ("system" name), or a qualified string + * (system:subsystem), which can be used for filtering, or for "system:*". + * + * @param namespace The namespace, a descriptive text string. + * @returns A function you can call that works similar to console.log(). + */ +function log(namespace, parent) { + // If the enable flag isn't set, do nothing. + const enablesFlag = process.env[exports.env.nodeEnables]; + if (!enablesFlag) { + return exports.placeholder; + } + // This might happen mostly if the typings are dropped in a user's code, + // or if they're calling from JavaScript. + if (!namespace) { + return exports.placeholder; + } + // Handle sub-loggers. + if (parent) { + namespace = `${parent.instance.namespace}:${namespace}`; + } + // Reuse loggers so things like event sinks are persistent. + const existing = loggerCache.get(namespace); + if (existing) { + return existing.func; + } + // Do we have a backend yet? + if (cachedBackend === null) { + // Explicitly disabled. + return exports.placeholder; + } + else if (cachedBackend === undefined) { + // One hasn't been made yet, so default to Node. + cachedBackend = getNodeBackend(); + } + // The logger is further wrapped so we can handle the backend changing out. + const logger = (() => { + let previousBackend = undefined; + const newLogger = new AdhocDebugLogger(namespace, (fields, ...args) => { + if (previousBackend !== cachedBackend) { + // Did the user pass a custom backend? + if (cachedBackend === null) { + // Explicitly disabled. + return; + } + else if (cachedBackend === undefined) { + // One hasn't been made yet, so default to Node. + cachedBackend = getNodeBackend(); + } + previousBackend = cachedBackend; + } + cachedBackend === null || cachedBackend === void 0 ? void 0 : cachedBackend.log(namespace, fields, ...args); + }); + return newLogger; + })(); + loggerCache.set(namespace, logger); + return logger.func; +} +//# sourceMappingURL=logging-utils.js.map -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __nccwpck_require__(80900); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } +/***/ }), - namespaces = split[i].replace(/\*/g, '.*?'); +/***/ 57087: +/***/ ((module) => { - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } +"use strict"; - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } +/** @type {import('./gOPD')} */ +module.exports = Object.getOwnPropertyDescriptor; - let i; - let len; - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } +/***/ }), - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } +/***/ 18501: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return false; - } +"use strict"; - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } +/** @type {import('.')} */ +var $gOPD = __nccwpck_require__(57087); - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; } - - createDebug.enable(createDebug.load()); - - return createDebug; } -module.exports = setup; +module.exports = $gOPD; /***/ }), -/***/ 38237: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 76031: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; /** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. + * Copyright 2018 Google LLC + * + * Distributed under MIT license. + * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __nccwpck_require__(28222); -} else { - module.exports = __nccwpck_require__(35332); +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _GoogleToken_instances, _GoogleToken_inFlightRequest, _GoogleToken_getTokenAsync, _GoogleToken_getTokenAsyncInner, _GoogleToken_ensureEmail, _GoogleToken_revokeTokenAsync, _GoogleToken_configure, _GoogleToken_requestToken; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GoogleToken = void 0; +const fs = __nccwpck_require__(57147); +const gaxios_1 = __nccwpck_require__(59555); +const jws = __nccwpck_require__(4636); +const path = __nccwpck_require__(71017); +const util_1 = __nccwpck_require__(73837); +const readFile = fs.readFile + ? (0, util_1.promisify)(fs.readFile) + : async () => { + // if running in the web-browser, fs.readFile may not have been shimmed. + throw new ErrorWithCode('use key rather than keyFile.', 'MISSING_CREDENTIALS'); + }; +const GOOGLE_TOKEN_URL = 'https://www.googleapis.com/oauth2/v4/token'; +const GOOGLE_REVOKE_TOKEN_URL = 'https://accounts.google.com/o/oauth2/revoke?token='; +class ErrorWithCode extends Error { + constructor(message, code) { + super(message); + this.code = code; + } } - +class GoogleToken { + get accessToken() { + return this.rawToken ? this.rawToken.access_token : undefined; + } + get idToken() { + return this.rawToken ? this.rawToken.id_token : undefined; + } + get tokenType() { + return this.rawToken ? this.rawToken.token_type : undefined; + } + get refreshToken() { + return this.rawToken ? this.rawToken.refresh_token : undefined; + } + /** + * Create a GoogleToken. + * + * @param options Configuration object. + */ + constructor(options) { + _GoogleToken_instances.add(this); + this.transporter = { + request: opts => (0, gaxios_1.request)(opts), + }; + _GoogleToken_inFlightRequest.set(this, void 0); + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, options); + } + /** + * Returns whether the token has expired. + * + * @return true if the token has expired, false otherwise. + */ + hasExpired() { + const now = new Date().getTime(); + if (this.rawToken && this.expiresAt) { + return now >= this.expiresAt; + } + else { + return true; + } + } + /** + * Returns whether the token will expire within eagerRefreshThresholdMillis + * + * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. + */ + isTokenExpiring() { + var _a; + const now = new Date().getTime(); + const eagerRefreshThresholdMillis = (_a = this.eagerRefreshThresholdMillis) !== null && _a !== void 0 ? _a : 0; + if (this.rawToken && this.expiresAt) { + return this.expiresAt <= now + eagerRefreshThresholdMillis; + } + else { + return true; + } + } + getToken(callback, opts = {}) { + if (typeof callback === 'object') { + opts = callback; + callback = undefined; + } + opts = Object.assign({ + forceRefresh: false, + }, opts); + if (callback) { + const cb = callback; + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts).then(t => cb(null, t), callback); + return; + } + return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts); + } + /** + * Given a keyFile, extract the key and client email if available + * @param keyFile Path to a json, pem, or p12 file that contains the key. + * @returns an object with privateKey and clientEmail properties + */ + async getCredentials(keyFile) { + const ext = path.extname(keyFile); + switch (ext) { + case '.json': { + const key = await readFile(keyFile, 'utf8'); + const body = JSON.parse(key); + const privateKey = body.private_key; + const clientEmail = body.client_email; + if (!privateKey || !clientEmail) { + throw new ErrorWithCode('private_key and client_email are required.', 'MISSING_CREDENTIALS'); + } + return { privateKey, clientEmail }; + } + case '.der': + case '.crt': + case '.pem': { + const privateKey = await readFile(keyFile, 'utf8'); + return { privateKey }; + } + case '.p12': + case '.pfx': { + throw new ErrorWithCode('*.p12 certificates are not supported after v6.1.2. ' + + 'Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.', 'UNKNOWN_CERTIFICATE_TYPE'); + } + default: + throw new ErrorWithCode('Unknown certificate type. Type is determined based on file extension. ' + + 'Current supported extensions are *.json, and *.pem.', 'UNKNOWN_CERTIFICATE_TYPE'); + } + } + revokeToken(callback) { + if (callback) { + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this).then(() => callback(), callback); + return; + } + return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this); + } +} +exports.GoogleToken = GoogleToken; +_GoogleToken_inFlightRequest = new WeakMap(), _GoogleToken_instances = new WeakSet(), _GoogleToken_getTokenAsync = async function _GoogleToken_getTokenAsync(opts) { + if (__classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f") && !opts.forceRefresh) { + return __classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f"); + } + try { + return await (__classPrivateFieldSet(this, _GoogleToken_inFlightRequest, __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsyncInner).call(this, opts), "f")); + } + finally { + __classPrivateFieldSet(this, _GoogleToken_inFlightRequest, undefined, "f"); + } +}, _GoogleToken_getTokenAsyncInner = async function _GoogleToken_getTokenAsyncInner(opts) { + if (this.isTokenExpiring() === false && opts.forceRefresh === false) { + return Promise.resolve(this.rawToken); + } + if (!this.key && !this.keyFile) { + throw new Error('No key or keyFile set.'); + } + if (!this.key && this.keyFile) { + const creds = await this.getCredentials(this.keyFile); + this.key = creds.privateKey; + this.iss = creds.clientEmail || this.iss; + if (!creds.clientEmail) { + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_ensureEmail).call(this); + } + } + return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_requestToken).call(this); +}, _GoogleToken_ensureEmail = function _GoogleToken_ensureEmail() { + if (!this.iss) { + throw new ErrorWithCode('email is required.', 'MISSING_CREDENTIALS'); + } +}, _GoogleToken_revokeTokenAsync = async function _GoogleToken_revokeTokenAsync() { + if (!this.accessToken) { + throw new Error('No token to revoke.'); + } + const url = GOOGLE_REVOKE_TOKEN_URL + this.accessToken; + await this.transporter.request({ + url, + retry: true, + }); + __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, { + email: this.iss, + sub: this.sub, + key: this.key, + keyFile: this.keyFile, + scope: this.scope, + additionalClaims: this.additionalClaims, + }); +}, _GoogleToken_configure = function _GoogleToken_configure(options = {}) { + this.keyFile = options.keyFile; + this.key = options.key; + this.rawToken = undefined; + this.iss = options.email || options.iss; + this.sub = options.sub; + this.additionalClaims = options.additionalClaims; + if (typeof options.scope === 'object') { + this.scope = options.scope.join(' '); + } + else { + this.scope = options.scope; + } + this.eagerRefreshThresholdMillis = options.eagerRefreshThresholdMillis; + if (options.transporter) { + this.transporter = options.transporter; + } +}, _GoogleToken_requestToken = +/** + * Request the token from Google. + */ +async function _GoogleToken_requestToken() { + var _a, _b; + const iat = Math.floor(new Date().getTime() / 1000); + const additionalClaims = this.additionalClaims || {}; + const payload = Object.assign({ + iss: this.iss, + scope: this.scope, + aud: GOOGLE_TOKEN_URL, + exp: iat + 3600, + iat, + sub: this.sub, + }, additionalClaims); + const signedJWT = jws.sign({ + header: { alg: 'RS256' }, + payload, + secret: this.key, + }); + try { + const r = await this.transporter.request({ + method: 'POST', + url: GOOGLE_TOKEN_URL, + data: { + grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', + assertion: signedJWT, + }, + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + responseType: 'json', + retryConfig: { + httpMethodsToRetry: ['POST'], + }, + }); + this.rawToken = r.data; + this.expiresAt = + r.data.expires_in === null || r.data.expires_in === undefined + ? undefined + : (iat + r.data.expires_in) * 1000; + return this.rawToken; + } + catch (e) { + this.rawToken = undefined; + this.tokenExpires = undefined; + const body = e.response && ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) + ? (_b = e.response) === null || _b === void 0 ? void 0 : _b.data + : {}; + if (body.error) { + const desc = body.error_description + ? `: ${body.error_description}` + : ''; + e.message = `${body.error}${desc}`; + } + throw e; + } +}; +//# sourceMappingURL=index.js.map /***/ }), -/***/ 35332: -/***/ ((module, exports, __nccwpck_require__) => { - -/** - * Module dependencies. - */ +/***/ 31621: +/***/ ((module) => { -const tty = __nccwpck_require__(76224); -const util = __nccwpck_require__(73837); +"use strict"; -/** - * This is the Node.js implementation of `debug()`. - */ -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); +module.exports = (flag, argv = process.argv) => { + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf('--'); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); +}; -/** - * Colors. - */ -exports.colors = [6, 2, 3, 4, 5, 1]; +/***/ }), -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __nccwpck_require__(59318); +/***/ 40587: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} +"use strict"; -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __nccwpck_require__(57747); - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } +/** @type {import('.')} */ +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } - obj[prop] = val; - return obj; -}, {}); + return hasSymbolSham(); +}; -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} +/***/ }), -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ +/***/ 57747: +/***/ ((module) => { -function formatArgs(args) { - const {namespace: name, useColors} = this; +"use strict"; - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} +/** @type {import('./shams')} */ +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } -function load() { - return process.env.DEBUG; -} + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } -function init(debug) { - debug.inspectOpts = {}; + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + if (typeof Object.getOwnPropertyDescriptor === 'function') { + // eslint-disable-next-line no-extra-parens + var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } -} -module.exports = __nccwpck_require__(46243)(exports); + return true; +}; -const {formatters} = module.exports; -/** - * Map %o to `util.inspect()`, all on a single line. - */ +/***/ }), -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; +/***/ 99038: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ +"use strict"; -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); + +var hasSymbols = __nccwpck_require__(57747); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; }; /***/ }), -/***/ 18611: +/***/ 62157: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Stream = (__nccwpck_require__(12781).Stream); -var util = __nccwpck_require__(73837); +"use strict"; -module.exports = DelayedStream; -function DelayedStream() { - this.source = null; - this.dataSize = 0; - this.maxDataSize = 1024 * 1024; - this.pauseStream = true; - this._maxDataSizeExceeded = false; - this._released = false; - this._bufferedEvents = []; -} -util.inherits(DelayedStream, Stream); +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __nccwpck_require__(88334); -DelayedStream.create = function(source, options) { - var delayedStream = new this(); +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); - options = options || {}; - for (var option in options) { - delayedStream[option] = options[option]; - } - delayedStream.source = source; +/***/ }), - var realEmit = source.emit; - source.emit = function() { - delayedStream._handleEmit(arguments); - return realEmit.apply(source, arguments); - }; +/***/ 23764: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - source.on('error', function() {}); - if (delayedStream.pauseStream) { - source.pause(); - } +"use strict"; - return delayedStream; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpProxyAgent = void 0; +const net = __importStar(__nccwpck_require__(41808)); +const tls = __importStar(__nccwpck_require__(24404)); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const events_1 = __nccwpck_require__(82361); +const agent_base_1 = __nccwpck_require__(70694); +const url_1 = __nccwpck_require__(57310); +const debug = (0, debug_1.default)('http-proxy-agent'); +/** + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects + * to the specified "HTTP proxy server" in order to proxy HTTP requests. + */ +class HttpProxyAgent extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug('Creating new HttpProxyAgent instance: %o', this.proxy.href); + // Trim off the brackets from IPv6 addresses + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); + const port = this.proxy.port + ? parseInt(this.proxy.port, 10) + : this.proxy.protocol === 'https:' + ? 443 + : 80; + this.connectOpts = { + ...(opts ? omit(opts, 'headers') : null), + host, + port, + }; + } + addRequest(req, opts) { + req._header = null; + this.setRequestProps(req, opts); + // @ts-expect-error `addRequest()` isn't defined in `@types/node` + super.addRequest(req, opts); + } + setRequestProps(req, opts) { + const { proxy } = this; + const protocol = opts.secureEndpoint ? 'https:' : 'http:'; + const hostname = req.getHeader('host') || 'localhost'; + const base = `${protocol}//${hostname}`; + const url = new url_1.URL(req.path, base); + if (opts.port !== 80) { + url.port = String(opts.port); + } + // Change the `http.ClientRequest` instance's "path" field + // to the absolute path of the URL that will be requested. + req.path = String(url); + // Inject the `Proxy-Authorization` header if necessary. + const headers = typeof this.proxyHeaders === 'function' + ? this.proxyHeaders() + : { ...this.proxyHeaders }; + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; + } + if (!headers['Proxy-Connection']) { + headers['Proxy-Connection'] = this.keepAlive + ? 'Keep-Alive' + : 'close'; + } + for (const name of Object.keys(headers)) { + const value = headers[name]; + if (value) { + req.setHeader(name, value); + } + } + } + async connect(req, opts) { + req._header = null; + if (!req.path.includes('://')) { + this.setRequestProps(req, opts); + } + // At this point, the http ClientRequest's internal `_header` field + // might have already been set. If this is the case then we'll need + // to re-generate the string since we just changed the `req.path`. + let first; + let endOfHeaders; + debug('Regenerating stored HTTP header string for request'); + req._implicitHeader(); + if (req.outputData && req.outputData.length > 0) { + debug('Patching connection write() output buffer with updated header'); + first = req.outputData[0].data; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.outputData[0].data = + req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.outputData[0].data); + } + // Create a socket connection to the proxy server. + let socket; + if (this.proxy.protocol === 'https:') { + debug('Creating `tls.Socket`: %o', this.connectOpts); + socket = tls.connect(this.connectOpts); + } + else { + debug('Creating `net.Socket`: %o', this.connectOpts); + socket = net.connect(this.connectOpts); + } + // Wait for the socket's `connect` event, so that this `callback()` + // function throws instead of the `http` request machinery. This is + // important for i.e. `PacProxyAgent` which determines a failed proxy + // connection via the `callback()` function throwing. + await (0, events_1.once)(socket, 'connect'); + return socket; + } +} +HttpProxyAgent.protocols = ['http', 'https']; +exports.HttpProxyAgent = HttpProxyAgent; +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=index.js.map -Object.defineProperty(DelayedStream.prototype, 'readable', { - configurable: true, - enumerable: true, - get: function() { - return this.source.readable; - } -}); +/***/ }), -DelayedStream.prototype.setEncoding = function() { - return this.source.setEncoding.apply(this.source, arguments); -}; +/***/ 77219: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -DelayedStream.prototype.resume = function() { - if (!this._released) { - this.release(); - } +"use strict"; - this.source.resume(); +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; }; - -DelayedStream.prototype.pause = function() { - this.source.pause(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; - -DelayedStream.prototype.release = function() { - this._released = true; - - this._bufferedEvents.forEach(function(args) { - this.emit.apply(this, args); - }.bind(this)); - this._bufferedEvents = []; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpsProxyAgent = void 0; +const net = __importStar(__nccwpck_require__(41808)); +const tls = __importStar(__nccwpck_require__(24404)); +const assert_1 = __importDefault(__nccwpck_require__(39491)); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const agent_base_1 = __nccwpck_require__(70694); +const url_1 = __nccwpck_require__(57310); +const parse_proxy_response_1 = __nccwpck_require__(595); +const debug = (0, debug_1.default)('https-proxy-agent'); +const setServernameFromNonIpHost = (options) => { + if (options.servername === undefined && + options.host && + !net.isIP(options.host)) { + return { + ...options, + servername: options.host, + }; + } + return options; }; +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + */ +class HttpsProxyAgent extends agent_base_1.Agent { + constructor(proxy, opts) { + super(opts); + this.options = { path: undefined }; + this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; + this.proxyHeaders = opts?.headers ?? {}; + debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); + // Trim off the brackets from IPv6 addresses + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); + const port = this.proxy.port + ? parseInt(this.proxy.port, 10) + : this.proxy.protocol === 'https:' + ? 443 + : 80; + this.connectOpts = { + // Attempt to negotiate http/1.1 for proxy servers that support http/2 + ALPNProtocols: ['http/1.1'], + ...(opts ? omit(opts, 'headers') : null), + host, + port, + }; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + */ + async connect(req, opts) { + const { proxy } = this; + if (!opts.host) { + throw new TypeError('No "host" provided'); + } + // Create a socket connection to the proxy server. + let socket; + if (proxy.protocol === 'https:') { + debug('Creating `tls.Socket`: %o', this.connectOpts); + socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); + } + else { + debug('Creating `net.Socket`: %o', this.connectOpts); + socket = net.connect(this.connectOpts); + } + const headers = typeof this.proxyHeaders === 'function' + ? this.proxyHeaders() + : { ...this.proxyHeaders }; + const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; + let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.username || proxy.password) { + const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; + } + headers.Host = `${host}:${opts.port}`; + if (!headers['Proxy-Connection']) { + headers['Proxy-Connection'] = this.keepAlive + ? 'Keep-Alive' + : 'close'; + } + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r\n`; + } + const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); + socket.write(`${payload}\r\n`); + const { connect, buffered } = await proxyResponsePromise; + req.emit('proxyConnect', connect); + this.emit('proxyConnect', connect, req); + if (connect.statusCode === 200) { + req.once('socket', resume); + if (opts.secureEndpoint) { + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + return tls.connect({ + ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'), + socket, + }); + } + return socket; + } + // Some other status code that's not 200... need to re-play the HTTP + // header "data" events onto the socket once the HTTP machinery is + // attached so that the node core `http` can parse and handle the + // error status code. + // Close the original socket, and a new "fake" socket is returned + // instead, so that the proxy doesn't get the HTTP request + // written to it (which may contain `Authorization` headers or other + // sensitive data). + // + // See: https://hackerone.com/reports/541502 + socket.destroy(); + const fakeSocket = new net.Socket({ writable: false }); + fakeSocket.readable = true; + // Need to wait for the "socket" event to re-play the "data" events. + req.once('socket', (s) => { + debug('Replaying proxy buffer for failed request'); + (0, assert_1.default)(s.listenerCount('data') > 0); + // Replay the "buffered" Buffer onto the fake `socket`, since at + // this point the HTTP module machinery has been hooked up for + // the user. + s.push(buffered); + s.push(null); + }); + return fakeSocket; + } +} +HttpsProxyAgent.protocols = ['http', 'https']; +exports.HttpsProxyAgent = HttpsProxyAgent; +function resume(socket) { + socket.resume(); +} +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=index.js.map -DelayedStream.prototype.pipe = function() { - var r = Stream.prototype.pipe.apply(this, arguments); - this.resume(); - return r; -}; +/***/ }), -DelayedStream.prototype._handleEmit = function(args) { - if (this._released) { - this.emit.apply(this, args); - return; - } +/***/ 595: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - if (args[0] === 'data') { - this.dataSize += args[1].length; - this._checkIfMaxDataSizeExceeded(); - } +"use strict"; - this._bufferedEvents.push(args); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseProxyResponse = void 0; +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); +function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + // we need to buffer any HTTP traffic that happens with the proxy before we get + // the CONNECT response, so that if the response is anything other than an "200" + // response code, then we can re-play the "data" events on the socket once the + // HTTP parser is hooked up... + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once('readable', read); + } + function cleanup() { + socket.removeListener('end', onend); + socket.removeListener('error', onerror); + socket.removeListener('readable', read); + } + function onend() { + cleanup(); + debug('onend'); + reject(new Error('Proxy connection ended before receiving CONNECT response')); + } + function onerror(err) { + cleanup(); + debug('onerror %o', err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf('\r\n\r\n'); + if (endOfHeaders === -1) { + // keep buffering + debug('have not received end of HTTP headers yet...'); + read(); + return; + } + const headerParts = buffered + .slice(0, endOfHeaders) + .toString('ascii') + .split('\r\n'); + const firstLine = headerParts.shift(); + if (!firstLine) { + socket.destroy(); + return reject(new Error('No header received from proxy CONNECT response')); + } + const firstLineParts = firstLine.split(' '); + const statusCode = +firstLineParts[1]; + const statusText = firstLineParts.slice(2).join(' '); + const headers = {}; + for (const header of headerParts) { + if (!header) + continue; + const firstColon = header.indexOf(':'); + if (firstColon === -1) { + socket.destroy(); + return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + } + const key = header.slice(0, firstColon).toLowerCase(); + const value = header.slice(firstColon + 1).trimStart(); + const current = headers[key]; + if (typeof current === 'string') { + headers[key] = [current, value]; + } + else if (Array.isArray(current)) { + current.push(value); + } + else { + headers[key] = value; + } + } + debug('got proxy server response: %o %o', firstLine, headers); + cleanup(); + resolve({ + connect: { + statusCode, + statusText, + headers, + }, + buffered, + }); + } + socket.on('error', onerror); + socket.on('end', onend); + read(); + }); +} +exports.parseProxyResponse = parseProxyResponse; +//# sourceMappingURL=parse-proxy-response.js.map -DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { - if (this._maxDataSizeExceeded) { - return; - } +/***/ }), - if (this.dataSize <= this.maxDataSize) { - return; - } +/***/ 44124: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this._maxDataSizeExceeded = true; - var message = - 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' - this.emit('error', new Error(message)); -}; +try { + var util = __nccwpck_require__(73837); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __nccwpck_require__(8544); +} /***/ }), -/***/ 58932: -/***/ ((__unused_webpack_module, exports) => { +/***/ 8544: +/***/ ((module) => { -"use strict"; +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} -Object.defineProperty(exports, "__esModule", ({ value: true })); +/***/ }), -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) +/***/ 41554: +/***/ ((module) => { - /* istanbul ignore next */ +"use strict"; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = 'Deprecation'; - } +const isStream = stream => + stream !== null && + typeof stream === 'object' && + typeof stream.pipe === 'function'; -} +isStream.writable = stream => + isStream(stream) && + stream.writable !== false && + typeof stream._write === 'function' && + typeof stream._writableState === 'object'; -exports.Deprecation = Deprecation; +isStream.readable = stream => + isStream(stream) && + stream.readable !== false && + typeof stream._read === 'function' && + typeof stream._readableState === 'object'; +isStream.duplex = stream => + isStream.writable(stream) && + isStream.readable(stream); -/***/ }), +isStream.transform = stream => + isStream.duplex(stream) && + typeof stream._transform === 'function'; -/***/ 76599: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +module.exports = isStream; -var stream = __nccwpck_require__(51642) -var eos = __nccwpck_require__(81205) -var inherits = __nccwpck_require__(44124) -var shift = __nccwpck_require__(66121) -var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) - ? Buffer.from([0]) - : new Buffer([0]) +/***/ }), -var onuncork = function(self, fn) { - if (self._corked) self.once('uncork', fn) - else fn() -} +/***/ 55031: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var autoDestroy = function (self, err) { - if (self._autoDestroy) self.destroy(err) -} +var json_stringify = (__nccwpck_require__(78574).stringify); +var json_parse = __nccwpck_require__(89099); -var destroyer = function(self, end) { - return function(err) { - if (err) autoDestroy(self, err.message === 'premature close' ? null : err) - else if (end && !self._ended) self.end() - } -} +module.exports = function(options) { + return { + parse: json_parse(options), + stringify: json_stringify + } +}; +//create the default method members with no options applied for backwards compatibility +module.exports.parse = json_parse(); +module.exports.stringify = json_stringify; -var end = function(ws, fn) { - if (!ws) return fn() - if (ws._writableState && ws._writableState.finished) return fn() - if (ws._writableState) return ws.end(fn) - ws.end() - fn() -} -var noop = function() {} +/***/ }), -var toStreams2 = function(rs) { - return new (stream.Readable)({objectMode:true, highWaterMark:16}).wrap(rs) -} +/***/ 89099: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Duplexify = function(writable, readable, opts) { - if (!(this instanceof Duplexify)) return new Duplexify(writable, readable, opts) - stream.Duplex.call(this, opts) +var BigNumber = null; - this._writable = null - this._readable = null - this._readable2 = null +// regexpxs extracted from +// (c) BSD-3-Clause +// https://github.com/fastify/secure-json-parse/graphs/contributors and https://github.com/hapijs/bourne/graphs/contributors - this._autoDestroy = !opts || opts.autoDestroy !== false - this._forwardDestroy = !opts || opts.destroy !== false - this._forwardEnd = !opts || opts.end !== false - this._corked = 1 // start corked - this._ondrain = null - this._drained = false - this._forwarding = false - this._unwrite = null - this._unread = null - this._ended = false +const suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/; +const suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/; - this.destroyed = false +/* + json_parse.js + 2012-06-20 - if (writable) this.setWritable(writable) - if (readable) this.setReadable(readable) -} + Public Domain. -inherits(Duplexify, stream.Duplex) + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. -Duplexify.obj = function(writable, readable, opts) { - if (!opts) opts = {} - opts.objectMode = true - opts.highWaterMark = 16 - return new Duplexify(writable, readable, opts) -} + This file creates a json_parse function. + During create you can (optionally) specify some behavioural switches -Duplexify.prototype.cork = function() { - if (++this._corked === 1) this.emit('cork') -} + require('json-bigint')(options) -Duplexify.prototype.uncork = function() { - if (this._corked && --this._corked === 0) this.emit('uncork') -} + The optional options parameter holds switches that drive certain + aspects of the parsing process: + * options.strict = true will warn about duplicate-key usage in the json. + The default (strict = false) will silently ignore those and overwrite + values for keys that are in duplicate use. -Duplexify.prototype.setWritable = function(writable) { - if (this._unwrite) this._unwrite() + The resulting function follows this signature: + json_parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. - if (this.destroyed) { - if (writable && writable.destroy) writable.destroy() - return - } + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. - if (writable === null || writable === false) { - this.end() - return - } + Example: - var self = this - var unend = eos(writable, {writable:true, readable:false}, destroyer(this, this._forwardEnd)) + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. - var ondrain = function() { - var ondrain = self._ondrain - self._ondrain = null - if (ondrain) ondrain() - } + myData = json_parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); - var clear = function() { - self._writable.removeListener('drain', ondrain) - unend() - } + This is a reference implementation. You are free to copy, modify, or + redistribute. - if (this._unwrite) process.nextTick(ondrain) // force a drain on stream reset to avoid livelocks + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html - this._writable = writable - this._writable.on('drain', ondrain) - this._unwrite = clear + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. +*/ - this.uncork() // always uncork setWritable -} +/*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode, + hasOwnProperty, message, n, name, prototype, push, r, t, text +*/ -Duplexify.prototype.setReadable = function(readable) { - if (this._unread) this._unread() +var json_parse = function (options) { + 'use strict'; - if (this.destroyed) { - if (readable && readable.destroy) readable.destroy() - return - } + // This is a function that can parse a JSON text, producing a JavaScript + // data structure. It is a simple, recursive descent parser. It does not use + // eval or regular expressions, so it can be used as a model for implementing + // a JSON parser in other languages. - if (readable === null || readable === false) { - this.push(null) - this.resume() - return - } + // We are defining the function inside of another function to avoid creating + // global variables. - var self = this - var unend = eos(readable, {writable:false, readable:true}, destroyer(this)) + // Default options one can override by passing options to the parse() + var _options = { + strict: false, // not being strict means do not generate syntax errors for "duplicate key" + storeAsString: false, // toggles whether the values should be stored as BigNumber (default) or a string + alwaysParseAsBig: false, // toggles whether all numbers should be Big + useNativeBigInt: false, // toggles whether to use native BigInt instead of bignumber.js + protoAction: 'error', + constructorAction: 'error', + }; - var onreadable = function() { - self._forward() - } + // If there are options, then use them to override the default _options + if (options !== undefined && options !== null) { + if (options.strict === true) { + _options.strict = true; + } + if (options.storeAsString === true) { + _options.storeAsString = true; + } + _options.alwaysParseAsBig = + options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false; + _options.useNativeBigInt = + options.useNativeBigInt === true ? options.useNativeBigInt : false; - var onend = function() { - self.push(null) - } + if (typeof options.constructorAction !== 'undefined') { + if ( + options.constructorAction === 'error' || + options.constructorAction === 'ignore' || + options.constructorAction === 'preserve' + ) { + _options.constructorAction = options.constructorAction; + } else { + throw new Error( + `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}` + ); + } + } - var clear = function() { - self._readable2.removeListener('readable', onreadable) - self._readable2.removeListener('end', onend) - unend() + if (typeof options.protoAction !== 'undefined') { + if ( + options.protoAction === 'error' || + options.protoAction === 'ignore' || + options.protoAction === 'preserve' + ) { + _options.protoAction = options.protoAction; + } else { + throw new Error( + `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}` + ); + } + } } - this._drained = true - this._readable = readable - this._readable2 = readable._readableState ? readable : toStreams2(readable) - this._readable2.on('readable', onreadable) - this._readable2.on('end', onend) - this._unread = clear + var at, // The index of the current character + ch, // The current character + escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t', + }, + text, + error = function (m) { + // Call error when something is wrong. - this._forward() -} + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text, + }; + }, + next = function (c) { + // If a c parameter is provided, verify that it matches the current character. -Duplexify.prototype._read = function() { - this._drained = true - this._forward() -} + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } -Duplexify.prototype._forward = function() { - if (this._forwarding || !this._readable2 || !this._drained) return - this._forwarding = true + // Get the next character. When there are no more characters, + // return the empty string. - var data + ch = text.charAt(at); + at += 1; + return ch; + }, + number = function () { + // Parse a number value. - while (this._drained && (data = shift(this._readable2)) !== null) { - if (this.destroyed) continue - this._drained = this.push(data) - } + var number, + string = ''; - this._forwarding = false -} + if (ch === '-') { + string = '-'; + next('-'); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + if (ch === '.') { + string += '.'; + while (next() && ch >= '0' && ch <= '9') { + string += ch; + } + } + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + if (ch === '-' || ch === '+') { + string += ch; + next(); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + } + number = +string; + if (!isFinite(number)) { + error('Bad number'); + } else { + if (BigNumber == null) BigNumber = __nccwpck_require__(87558); + //if (number > 9007199254740992 || number < -9007199254740992) + // Bignumber has stricter check: everything with length > 15 digits disallowed + if (string.length > 15) + return _options.storeAsString + ? string + : _options.useNativeBigInt + ? BigInt(string) + : new BigNumber(string); + else + return !_options.alwaysParseAsBig + ? number + : _options.useNativeBigInt + ? BigInt(number) + : new BigNumber(number); + } + }, + string = function () { + // Parse a string value. -Duplexify.prototype.destroy = function(err, cb) { - if (!cb) cb = noop - if (this.destroyed) return cb(null) - this.destroyed = true + var hex, + i, + string = '', + uffff; - var self = this - process.nextTick(function() { - self._destroy(err) - cb(null) - }) -} + // When parsing for string values, we must look for " and \ characters. -Duplexify.prototype._destroy = function(err) { - if (err) { - var ondrain = this._ondrain - this._ondrain = null - if (ondrain) ondrain(err) - else this.emit('error', err) - } + if (ch === '"') { + var startAt = at; + while (next()) { + if (ch === '"') { + if (at - 1 > startAt) string += text.substring(startAt, at - 1); + next(); + return string; + } + if (ch === '\\') { + if (at - 1 > startAt) string += text.substring(startAt, at - 1); + next(); + if (ch === 'u') { + uffff = 0; + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + if (!isFinite(hex)) { + break; + } + uffff = uffff * 16 + hex; + } + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; + } + startAt = at; + } + } + } + error('Bad string'); + }, + white = function () { + // Skip whitespace. - if (this._forwardDestroy) { - if (this._readable && this._readable.destroy) this._readable.destroy() - if (this._writable && this._writable.destroy) this._writable.destroy() - } + while (ch && ch <= ' ') { + next(); + } + }, + word = function () { + // true, false, or null. - this.emit('close') -} + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + error("Unexpected '" + ch + "'"); + }, + value, // Place holder for the value function. + array = function () { + // Parse an array value. -Duplexify.prototype._write = function(data, enc, cb) { - if (this.destroyed) return - if (this._corked) return onuncork(this, this._write.bind(this, data, enc, cb)) - if (data === SIGNAL_FLUSH) return this._finish(cb) - if (!this._writable) return cb() + var array = []; - if (this._writable.write(data) === false) this._ondrain = cb - else if (!this.destroyed) cb() -} + if (ch === '[') { + next('['); + white(); + if (ch === ']') { + next(']'); + return array; // empty array + } + while (ch) { + array.push(value()); + white(); + if (ch === ']') { + next(']'); + return array; + } + next(','); + white(); + } + } + error('Bad array'); + }, + object = function () { + // Parse an object value. -Duplexify.prototype._finish = function(cb) { - var self = this - this.emit('preend') - onuncork(this, function() { - end(self._forwardEnd && self._writable, function() { - // haxx to not emit prefinish twice - if (self._writableState.prefinished === false) self._writableState.prefinished = true - self.emit('prefinish') - onuncork(self, cb) - }) - }) -} + var key, + object = Object.create(null); -Duplexify.prototype.end = function(data, enc, cb) { - if (typeof data === 'function') return this.end(null, null, data) - if (typeof enc === 'function') return this.end(data, null, enc) - this._ended = true - if (data) this.write(data) - if (!this._writableState.ending && !this._writableState.destroyed) this.write(SIGNAL_FLUSH) - return stream.Writable.prototype.end.call(this, cb) -} + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object + } + while (ch) { + key = string(); + white(); + next(':'); + if ( + _options.strict === true && + Object.hasOwnProperty.call(object, key) + ) { + error('Duplicate key "' + key + '"'); + } -module.exports = Duplexify + if (suspectProtoRx.test(key) === true) { + if (_options.protoAction === 'error') { + error('Object contains forbidden prototype property'); + } else if (_options.protoAction === 'ignore') { + value(); + } else { + object[key] = value(); + } + } else if (suspectConstructorRx.test(key) === true) { + if (_options.constructorAction === 'error') { + error('Object contains forbidden constructor property'); + } else if (_options.constructorAction === 'ignore') { + value(); + } else { + object[key] = value(); + } + } else { + object[key] = value(); + } + white(); + if (ch === '}') { + next('}'); + return object; + } + next(','); + white(); + } + } + error('Bad object'); + }; -/***/ }), + value = function () { + // Parse a JSON value. It could be an object, an array, a string, a number, + // or a word. -/***/ 11728: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); + } + }; -"use strict"; + // Return the json_parse function. It will have access to all of the above + // functions and variables. + return function (source, reviver) { + var result; -var Buffer = (__nccwpck_require__(21867).Buffer); + text = source + ''; + at = 0; + ch = ' '; + result = value(); + white(); + if (ch) { + error('Syntax error'); + } -var getParamBytesForAlg = __nccwpck_require__(30528); + // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. -var MAX_OCTET = 0x80, - CLASS_UNIVERSAL = 0, - PRIMITIVE_BIT = 0x20, - TAG_SEQ = 0x10, - TAG_INT = 0x02, - ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6), - ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6); + return typeof reviver === 'function' + ? (function walk(holder, key) { + var k, + v, + value = holder[key]; + if (value && typeof value === 'object') { + Object.keys(value).forEach(function (k) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + }); + } + return reviver.call(holder, key, value); + })({ '': result }, '') + : result; + }; +}; -function base64Url(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} +module.exports = json_parse; -function signatureAsBuffer(signature) { - if (Buffer.isBuffer(signature)) { - return signature; - } else if ('string' === typeof signature) { - return Buffer.from(signature, 'base64'); - } - throw new TypeError('ECDSA signature must be a Base64 string or a Buffer'); -} +/***/ }), -function derToJose(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); +/***/ 78574: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // the DER encoded param should at most be the param size, plus a padding - // zero, since due to being a signed integer - var maxEncodedParamLength = paramBytes + 1; +var BigNumber = __nccwpck_require__(87558); - var inputLength = signature.length; +/* + json2.js + 2013-05-26 - var offset = 0; - if (signature[offset++] !== ENCODED_TAG_SEQ) { - throw new Error('Could not find expected "seq"'); - } + Public Domain. - var seqLength = signature[offset++]; - if (seqLength === (MAX_OCTET | 1)) { - seqLength = signature[offset++]; - } + NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - if (inputLength - offset < seqLength) { - throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); - } + See http://www.JSON.org/js.html - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "r"'); - } - var rLength = signature[offset++]; + This code should be minified before deployment. + See http://javascript.crockford.com/jsmin.html - if (inputLength - offset - 2 < rLength) { - throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); - } + USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO + NOT CONTROL. - if (maxEncodedParamLength < rLength) { - throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } - var rOffset = offset; - offset += rLength; + This file creates a global JSON object containing two methods: stringify + and parse. - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "s"'); - } + JSON.stringify(value, replacer, space) + value any JavaScript value, usually an object or array. - var sLength = signature[offset++]; + replacer an optional parameter that determines how object + values are stringified for objects. It can be a + function or an array of strings. - if (inputLength - offset !== sLength) { - throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); - } + space an optional parameter that specifies the indentation + of nested structures. If it is omitted, the text will + be packed without extra whitespace. If it is a number, + it will specify the number of spaces to indent at each + level. If it is a string (such as '\t' or ' '), + it contains the characters used to indent at each level. - if (maxEncodedParamLength < sLength) { - throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } + This method produces a JSON text from a JavaScript value. - var sOffset = offset; - offset += sLength; + When an object value is found, if the object contains a toJSON + method, its toJSON method will be called and the result will be + stringified. A toJSON method does not serialize: it returns the + value represented by the name/value pair that should be serialized, + or undefined if nothing should be serialized. The toJSON method + will be passed the key associated with the value, and this will be + bound to the value - if (offset !== inputLength) { - throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); - } + For example, this would serialize Dates as ISO strings. - var rPadding = paramBytes - rLength, - sPadding = paramBytes - sLength; + Date.prototype.toJSON = function (key) { + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } - var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength); + return this.getUTCFullYear() + '-' + + f(this.getUTCMonth() + 1) + '-' + + f(this.getUTCDate()) + 'T' + + f(this.getUTCHours()) + ':' + + f(this.getUTCMinutes()) + ':' + + f(this.getUTCSeconds()) + 'Z'; + }; - for (offset = 0; offset < rPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); + You can provide an optional replacer method. It will be passed the + key and value of each member, with this bound to the containing + object. The value that is returned from your method will be + serialized. If your method returns undefined, then the member will + be excluded from the serialization. - offset = paramBytes; + If the replacer parameter is an array of strings, then it will be + used to select the members to be serialized. It filters the results + such that only members with keys listed in the replacer array are + stringified. - for (var o = offset; offset < o + sPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); + Values that do not have JSON representations, such as undefined or + functions, will not be serialized. Such values in objects will be + dropped; in arrays they will be replaced with null. You can use + a replacer function to replace those with JSON values. + JSON.stringify(undefined) returns undefined. - dst = dst.toString('base64'); - dst = base64Url(dst); + The optional space parameter produces a stringification of the + value that is filled with line breaks and indentation to make it + easier to read. - return dst; -} + If the space parameter is a non-empty string, then that string will + be used for indentation. If the space parameter is a number, then + the indentation will be that many spaces. -function countPadding(buf, start, stop) { - var padding = 0; - while (start + padding < stop && buf[start + padding] === 0) { - ++padding; - } + Example: - var needsSign = buf[start + padding] >= MAX_OCTET; - if (needsSign) { - --padding; - } + text = JSON.stringify(['e', {pluribus: 'unum'}]); + // text is '["e",{"pluribus":"unum"}]' - return padding; -} -function joseToDer(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); + text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); + // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' - var signatureBytes = signature.length; - if (signatureBytes !== paramBytes * 2) { - throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); - } + text = JSON.stringify([new Date()], function (key, value) { + return this[key] instanceof Date ? + 'Date(' + this[key] + ')' : value; + }); + // text is '["Date(---current time---)"]' - var rPadding = countPadding(signature, 0, paramBytes); - var sPadding = countPadding(signature, paramBytes, signature.length); - var rLength = paramBytes - rPadding; - var sLength = paramBytes - sPadding; - var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; + JSON.parse(text, reviver) + This method parses a JSON text to produce an object or array. + It can throw a SyntaxError exception. - var shortLength = rsBytes < MAX_OCTET; + The optional reviver parameter is a function that can filter and + transform the results. It receives each of the keys and values, + and its return value is used instead of the original value. + If it returns what it received, then the structure is not modified. + If it returns undefined then the member is deleted. - var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes); + Example: - var offset = 0; - dst[offset++] = ENCODED_TAG_SEQ; - if (shortLength) { - // Bit 8 has value "0" - // bits 7-1 give the length. - dst[offset++] = rsBytes; - } else { - // Bit 8 of first octet has value "1" - // bits 7-1 give the number of additional length octets. - dst[offset++] = MAX_OCTET | 1; - // length, base 256 - dst[offset++] = rsBytes & 0xff; - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = rLength; - if (rPadding < 0) { - dst[offset++] = 0; - offset += signature.copy(dst, offset, 0, paramBytes); - } else { - offset += signature.copy(dst, offset, rPadding, paramBytes); - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = sLength; - if (sPadding < 0) { - dst[offset++] = 0; - signature.copy(dst, offset, paramBytes); - } else { - signature.copy(dst, offset, paramBytes + sPadding); - } + // Parse the text. Values that look like ISO date strings will + // be converted to Date objects. - return dst; -} + myData = JSON.parse(text, function (key, value) { + var a; + if (typeof value === 'string') { + a = +/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); + if (a) { + return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], + +a[5], +a[6])); + } + } + return value; + }); -module.exports = { - derToJose: derToJose, - joseToDer: joseToDer -}; + myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { + var d; + if (typeof value === 'string' && + value.slice(0, 5) === 'Date(' && + value.slice(-1) === ')') { + d = new Date(value.slice(5, -1)); + if (d) { + return d; + } + } + return value; + }); -/***/ }), + This is a reference implementation. You are free to copy, modify, or + redistribute. +*/ -/***/ 30528: -/***/ ((module) => { +/*jslint evil: true, regexp: true */ -"use strict"; +/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, + call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, + getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, + lastIndex, length, parse, prototype, push, replace, slice, stringify, + test, toJSON, toString, valueOf +*/ -function getParamSize(keySize) { - var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); - return result; -} +// Create a JSON object only if one does not already exist. We create the +// methods in a closure to avoid creating global variables. -var paramBytesForAlg = { - ES256: getParamSize(256), - ES384: getParamSize(384), - ES512: getParamSize(521) -}; +var JSON = module.exports; -function getParamBytesForAlg(alg) { - var paramBytes = paramBytesForAlg[alg]; - if (paramBytes) { - return paramBytes; - } +(function () { + 'use strict'; - throw new Error('Unknown algorithm "' + alg + '"'); -} + function f(n) { + // Format integers to have at least two digits. + return n < 10 ? '0' + n : n; + } -module.exports = getParamBytesForAlg; + var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; -/***/ }), + function quote(string) { -/***/ 81205: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// If the string contains no control characters, no quote characters, and no +// backslash characters, then we can safely slap some quotes around it. +// Otherwise we must also replace the offending characters with safe escape +// sequences. -var once = __nccwpck_require__(1223); + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' + ? c + : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; + } -var noop = function() {}; -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; + function str(key, holder) { -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; +// Produce a string from holder[key]. -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key], + isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value)); - callback = once(callback || noop); +// If the value has a toJSON method, call it to obtain a replacement value. - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - var cancelled = false; + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; +// If we were called with a replacer function, then call the replacer to +// obtain a replacement value. - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; +// What happens next depends on the value's type. - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; + switch (typeof value) { + case 'string': + if (isBigNumber) { + return value; + } else { + return quote(value); + } - var onerror = function(err) { - callback.call(stream, err); - }; + case 'number': - var onclose = function() { - process.nextTick(onclosenexttick); - }; +// JSON numbers must be finite. Encode non-finite numbers as null. - var onclosenexttick = function() { - if (cancelled) return; - if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close')); - }; + return isFinite(value) ? String(value) : 'null'; - var onrequest = function() { - stream.req.on('finish', onfinish); - }; + case 'boolean': + case 'null': + case 'bigint': - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } +// If the value is a boolean or null, convert it to a string. Note: +// typeof null does not produce 'null'. The case is included here in +// the remote chance that this gets fixed someday. - if (isChildProcess(stream)) stream.on('exit', onexit); + return String(value); - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); +// If the type is 'object', we might be dealing with an object or an array or +// null. - return function() { - cancelled = true; - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -}; + case 'object': -module.exports = eos; +// Due to a specification blunder in ECMAScript, typeof null is 'object', +// so watch out for that case. + if (!value) { + return 'null'; + } -/***/ }), +// Make an array to hold the partial results of stringifying this object value. -/***/ 84697: -/***/ ((module, exports) => { + gap += indent; + partial = []; -"use strict"; -/** - * @author Toru Nagashima - * @copyright 2015 Toru Nagashima. All rights reserved. - * See LICENSE file in root directory for full license. - */ +// Is the value an array? + if (Object.prototype.toString.apply(value) === '[object Array]') { -Object.defineProperty(exports, "__esModule", ({ value: true })); +// The value is an array. Stringify every element. Use null as a placeholder +// for non-JSON values. -/** - * @typedef {object} PrivateData - * @property {EventTarget} eventTarget The event target. - * @property {{type:string}} event The original event object. - * @property {number} eventPhase The current event phase. - * @property {EventTarget|null} currentTarget The current event target. - * @property {boolean} canceled The flag to prevent default. - * @property {boolean} stopped The flag to stop propagation. - * @property {boolean} immediateStopped The flag to stop propagation immediately. - * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. - * @property {number} timeStamp The unix time. - * @private - */ + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } -/** - * Private data for event wrappers. - * @type {WeakMap} - * @private - */ -const privateData = new WeakMap(); +// Join all of the elements together, separated with commas, and wrap them in +// brackets. -/** - * Cache for wrapper classes. - * @type {WeakMap} - * @private - */ -const wrappers = new WeakMap(); + v = partial.length === 0 + ? '[]' + : gap + ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' + : '[' + partial.join(',') + ']'; + gap = mind; + return v; + } -/** - * Get private data. - * @param {Event} event The event object to get private data. - * @returns {PrivateData} The private data of the event. - * @private - */ -function pd(event) { - const retv = privateData.get(event); - console.assert( - retv != null, - "'this' is expected an Event object, but got", - event - ); - return retv -} +// If the replacer is an array, use it to select the members to be stringified. -/** - * https://dom.spec.whatwg.org/#set-the-canceled-flag - * @param data {PrivateData} private data. - */ -function setCancelFlag(data) { - if (data.passiveListener != null) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error( - "Unable to preventDefault inside passive event listener invocation.", - data.passiveListener - ); - } - return - } - if (!data.event.cancelable) { - return - } + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + if (typeof rep[i] === 'string') { + k = rep[i]; + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } else { - data.canceled = true; - if (typeof data.event.preventDefault === "function") { - data.event.preventDefault(); - } -} +// Otherwise, iterate through all of the keys in the object. -/** - * @see https://dom.spec.whatwg.org/#interface-event - * @private - */ -/** - * The event wrapper. - * @constructor - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Event|{type:string}} event The original event to wrap. - */ -function Event(eventTarget, event) { - privateData.set(this, { - eventTarget, - event, - eventPhase: 2, - currentTarget: eventTarget, - canceled: false, - stopped: false, - immediateStopped: false, - passiveListener: null, - timeStamp: event.timeStamp || Date.now(), - }); + Object.keys(value).forEach(function(k) { + var v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + }); + } - // https://heycam.github.io/webidl/#Unforgeable - Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); +// Join all of the member texts together, separated with commas, +// and wrap them in braces. - // Define accessors - const keys = Object.keys(event); - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in this)) { - Object.defineProperty(this, key, defineRedirectDescriptor(key)); + v = partial.length === 0 + ? '{}' + : gap + ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' + : '{' + partial.join(',') + '}'; + gap = mind; + return v; } } -} -// Should be enumerable, but class methods are not enumerable. -Event.prototype = { - /** - * The type of this event. - * @type {string} - */ - get type() { - return pd(this).event.type - }, +// If the JSON object does not yet have a stringify method, give it one. - /** - * The target of this event. - * @type {EventTarget} - */ - get target() { - return pd(this).eventTarget - }, + if (typeof JSON.stringify !== 'function') { + JSON.stringify = function (value, replacer, space) { - /** - * The target of this event. - * @type {EventTarget} - */ - get currentTarget() { - return pd(this).currentTarget - }, +// The stringify method takes a value and an optional replacer, and an optional +// space parameter, and returns a JSON text. The replacer can be a function +// that can replace values, or an array of strings that will select the keys. +// A default replacer method can be provided. Use of the space parameter can +// produce text that is more easily readable. - /** - * @returns {EventTarget[]} The composed path of this event. - */ - composedPath() { - const currentTarget = pd(this).currentTarget; - if (currentTarget == null) { - return [] - } - return [currentTarget] - }, + var i; + gap = ''; + indent = ''; - /** - * Constant of NONE. - * @type {number} - */ - get NONE() { - return 0 - }, +// If the space parameter is a number, make an indent string containing that +// many spaces. - /** - * Constant of CAPTURING_PHASE. - * @type {number} - */ - get CAPTURING_PHASE() { - return 1 - }, + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } - /** - * Constant of AT_TARGET. - * @type {number} - */ - get AT_TARGET() { - return 2 - }, +// If the space parameter is a string, it will be used as the indent string. - /** - * Constant of BUBBLING_PHASE. - * @type {number} - */ - get BUBBLING_PHASE() { - return 3 - }, + } else if (typeof space === 'string') { + indent = space; + } - /** - * The target of this event. - * @type {number} - */ - get eventPhase() { - return pd(this).eventPhase - }, +// If there is a replacer, it must be a function or an array. +// Otherwise, throw an error. - /** - * Stop event bubbling. - * @returns {void} - */ - stopPropagation() { - const data = pd(this); + rep = replacer; + if (replacer && typeof replacer !== 'function' && + (typeof replacer !== 'object' || + typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } - data.stopped = true; - if (typeof data.event.stopPropagation === "function") { - data.event.stopPropagation(); - } - }, +// Make a fake root object containing our value under the key of ''. +// Return the result of stringifying the value. - /** - * Stop event bubbling. - * @returns {void} - */ - stopImmediatePropagation() { - const data = pd(this); + return str('', {'': value}); + }; + } +}()); - data.stopped = true; - data.immediateStopped = true; - if (typeof data.event.stopImmediatePropagation === "function") { - data.event.stopImmediatePropagation(); - } - }, - /** - * The flag to be bubbling. - * @type {boolean} - */ - get bubbles() { - return Boolean(pd(this).event.bubbles) - }, +/***/ }), - /** - * The flag to be cancelable. - * @type {boolean} - */ - get cancelable() { - return Boolean(pd(this).event.cancelable) - }, +/***/ 96010: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Cancel this event. - * @returns {void} - */ - preventDefault() { - setCancelFlag(pd(this)); - }, +var Buffer = (__nccwpck_require__(21867).Buffer); +var crypto = __nccwpck_require__(6113); +var formatEcdsa = __nccwpck_require__(11728); +var util = __nccwpck_require__(73837); - /** - * The flag to indicate cancellation state. - * @type {boolean} - */ - get defaultPrevented() { - return pd(this).canceled - }, +var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' +var MSG_INVALID_SECRET = 'secret must be a string or buffer'; +var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; +var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; - /** - * The flag to be composed. - * @type {boolean} - */ - get composed() { - return Boolean(pd(this).event.composed) - }, +var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; +if (supportsKeyObjects) { + MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; + MSG_INVALID_SECRET += 'or a KeyObject'; +} - /** - * The unix time of this event. - * @type {number} - */ - get timeStamp() { - return pd(this).timeStamp - }, +function checkIsPublicKey(key) { + if (Buffer.isBuffer(key)) { + return; + } - /** - * The target of this event. - * @type {EventTarget} - * @deprecated - */ - get srcElement() { - return pd(this).eventTarget - }, + if (typeof key === 'string') { + return; + } - /** - * The flag to stop event bubbling. - * @type {boolean} - * @deprecated - */ - get cancelBubble() { - return pd(this).stopped - }, - set cancelBubble(value) { - if (!value) { - return - } - const data = pd(this); + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } - data.stopped = true; - if (typeof data.event.cancelBubble === "boolean") { - data.event.cancelBubble = true; - } - }, + if (typeof key !== 'object') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } - /** - * The flag to indicate cancellation state. - * @type {boolean} - * @deprecated - */ - get returnValue() { - return !pd(this).canceled - }, - set returnValue(value) { - if (!value) { - setCancelFlag(pd(this)); - } - }, + if (typeof key.type !== 'string') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } - /** - * Initialize this event object. But do nothing under event dispatching. - * @param {string} type The event type. - * @param {boolean} [bubbles=false] The flag to be possible to bubble up. - * @param {boolean} [cancelable=false] The flag to be possible to cancel. - * @deprecated - */ - initEvent() { - // Do nothing. - }, + if (typeof key.asymmetricKeyType !== 'string') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + + if (typeof key.export !== 'function') { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } }; -// `constructor` is not enumerable. -Object.defineProperty(Event.prototype, "constructor", { - value: Event, - configurable: true, - writable: true, -}); +function checkIsPrivateKey(key) { + if (Buffer.isBuffer(key)) { + return; + } -// Ensure `event instanceof window.Event` is `true`. -if (typeof window !== "undefined" && typeof window.Event !== "undefined") { - Object.setPrototypeOf(Event.prototype, window.Event.prototype); + if (typeof key === 'string') { + return; + } - // Make association for wrappers. - wrappers.set(window.Event.prototype, Event); -} + if (typeof key === 'object') { + return; + } -/** - * Get the property descriptor to redirect a given property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to redirect the property. - * @private - */ -function defineRedirectDescriptor(key) { - return { - get() { - return pd(this).event[key] - }, - set(value) { - pd(this).event[key] = value; - }, - configurable: true, - enumerable: true, - } + throw typeError(MSG_INVALID_SIGNER_KEY); +}; + +function checkIsSecretKey(key) { + if (Buffer.isBuffer(key)) { + return; + } + + if (typeof key === 'string') { + return key; + } + + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_SECRET); + } + + if (typeof key !== 'object') { + throw typeError(MSG_INVALID_SECRET); + } + + if (key.type !== 'secret') { + throw typeError(MSG_INVALID_SECRET); + } + + if (typeof key.export !== 'function') { + throw typeError(MSG_INVALID_SECRET); + } } -/** - * Get the property descriptor to call a given method property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to call the method property. - * @private - */ -function defineCallDescriptor(key) { - return { - value() { - const event = pd(this).event; - return event[key].apply(event, arguments) - }, - configurable: true, - enumerable: true, - } +function fromBase64(base64) { + return base64 + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); } -/** - * Define new wrapper class. - * @param {Function} BaseEvent The base wrapper class. - * @param {Object} proto The prototype of the original event. - * @returns {Function} The defined wrapper class. - * @private - */ -function defineWrapper(BaseEvent, proto) { - const keys = Object.keys(proto); - if (keys.length === 0) { - return BaseEvent - } +function toBase64(base64url) { + base64url = base64url.toString(); - /** CustomEvent */ - function CustomEvent(eventTarget, event) { - BaseEvent.call(this, eventTarget, event); + var padding = 4 - base64url.length % 4; + if (padding !== 4) { + for (var i = 0; i < padding; ++i) { + base64url += '='; } + } - CustomEvent.prototype = Object.create(BaseEvent.prototype, { - constructor: { value: CustomEvent, configurable: true, writable: true }, - }); + return base64url + .replace(/\-/g, '+') + .replace(/_/g, '/'); +} - // Define accessors. - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in BaseEvent.prototype)) { - const descriptor = Object.getOwnPropertyDescriptor(proto, key); - const isFunc = typeof descriptor.value === "function"; - Object.defineProperty( - CustomEvent.prototype, - key, - isFunc - ? defineCallDescriptor(key) - : defineRedirectDescriptor(key) - ); - } - } +function typeError(template) { + var args = [].slice.call(arguments, 1); + var errMsg = util.format.bind(util, template).apply(null, args); + return new TypeError(errMsg); +} - return CustomEvent +function bufferOrString(obj) { + return Buffer.isBuffer(obj) || typeof obj === 'string'; } -/** - * Get the wrapper class of a given prototype. - * @param {Object} proto The prototype of the original event to get its wrapper. - * @returns {Function} The wrapper class. - * @private - */ -function getWrapper(proto) { - if (proto == null || proto === Object.prototype) { - return Event - } +function normalizeInput(thing) { + if (!bufferOrString(thing)) + thing = JSON.stringify(thing); + return thing; +} - let wrapper = wrappers.get(proto); - if (wrapper == null) { - wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); - wrappers.set(proto, wrapper); - } - return wrapper +function createHmacSigner(bits) { + return function sign(thing, secret) { + checkIsSecretKey(secret); + thing = normalizeInput(thing); + var hmac = crypto.createHmac('sha' + bits, secret); + var sig = (hmac.update(thing), hmac.digest('base64')) + return fromBase64(sig); + } } -/** - * Wrap a given event to management a dispatching. - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Object} event The event to wrap. - * @returns {Event} The wrapper instance. - * @private - */ -function wrapEvent(eventTarget, event) { - const Wrapper = getWrapper(Object.getPrototypeOf(event)); - return new Wrapper(eventTarget, event) +var bufferEqual; +var timingSafeEqual = 'timingSafeEqual' in crypto ? function timingSafeEqual(a, b) { + if (a.byteLength !== b.byteLength) { + return false; + } + + return crypto.timingSafeEqual(a, b) +} : function timingSafeEqual(a, b) { + if (!bufferEqual) { + bufferEqual = __nccwpck_require__(9239); + } + + return bufferEqual(a, b) } -/** - * Get the immediateStopped flag of a given event. - * @param {Event} event The event to get. - * @returns {boolean} The flag to stop propagation immediately. - * @private - */ -function isStopped(event) { - return pd(event).immediateStopped +function createHmacVerifier(bits) { + return function verify(thing, signature, secret) { + var computedSig = createHmacSigner(bits)(thing, secret); + return timingSafeEqual(Buffer.from(signature), Buffer.from(computedSig)); + } } -/** - * Set the current event phase of a given event. - * @param {Event} event The event to set current target. - * @param {number} eventPhase New event phase. - * @returns {void} - * @private - */ -function setEventPhase(event, eventPhase) { - pd(event).eventPhase = eventPhase; +function createKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + // Even though we are specifying "RSA" here, this works with ECDSA + // keys as well. + var signer = crypto.createSign('RSA-SHA' + bits); + var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); + return fromBase64(sig); + } } -/** - * Set the current target of a given event. - * @param {Event} event The event to set current target. - * @param {EventTarget|null} currentTarget New current target. - * @returns {void} - * @private - */ -function setCurrentTarget(event, currentTarget) { - pd(event).currentTarget = currentTarget; +function createKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto.createVerify('RSA-SHA' + bits); + verifier.update(thing); + return verifier.verify(publicKey, signature, 'base64'); + } } -/** - * Set a passive listener of a given event. - * @param {Event} event The event to set current target. - * @param {Function|null} passiveListener New passive listener. - * @returns {void} - * @private - */ -function setPassiveListener(event, passiveListener) { - pd(event).passiveListener = passiveListener; +function createPSSKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto.createSign('RSA-SHA' + bits); + var sig = (signer.update(thing), signer.sign({ + key: privateKey, + padding: crypto.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST + }, 'base64')); + return fromBase64(sig); + } } -/** - * @typedef {object} ListenerNode - * @property {Function} listener - * @property {1|2|3} listenerType - * @property {boolean} passive - * @property {boolean} once - * @property {ListenerNode|null} next - * @private - */ +function createPSSKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto.createVerify('RSA-SHA' + bits); + verifier.update(thing); + return verifier.verify({ + key: publicKey, + padding: crypto.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST + }, signature, 'base64'); + } +} -/** - * @type {WeakMap>} - * @private - */ -const listenersMap = new WeakMap(); +function createECDSASigner(bits) { + var inner = createKeySigner(bits); + return function sign() { + var signature = inner.apply(null, arguments); + signature = formatEcdsa.derToJose(signature, 'ES' + bits); + return signature; + }; +} -// Listener types -const CAPTURE = 1; -const BUBBLE = 2; -const ATTRIBUTE = 3; +function createECDSAVerifer(bits) { + var inner = createKeyVerifier(bits); + return function verify(thing, signature, publicKey) { + signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); + var result = inner(thing, signature, publicKey); + return result; + }; +} -/** - * Check whether a given value is an object or not. - * @param {any} x The value to check. - * @returns {boolean} `true` if the value is an object. - */ -function isObject(x) { - return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax +function createNoneSigner() { + return function sign() { + return ''; + } } -/** - * Get listeners. - * @param {EventTarget} eventTarget The event target to get. - * @returns {Map} The listeners. - * @private - */ -function getListeners(eventTarget) { - const listeners = listenersMap.get(eventTarget); - if (listeners == null) { - throw new TypeError( - "'this' is expected an EventTarget object, but got another value." - ) - } - return listeners +function createNoneVerifier() { + return function verify(thing, signature) { + return signature === ''; + } } -/** - * Get the property descriptor for the event attribute of a given event. - * @param {string} eventName The event name to get property descriptor. - * @returns {PropertyDescriptor} The property descriptor. - * @private - */ -function defineEventAttributeDescriptor(eventName) { - return { - get() { - const listeners = getListeners(this); - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - return node.listener - } - node = node.next; - } - return null - }, +module.exports = function jwa(algorithm) { + var signerFactories = { + hs: createHmacSigner, + rs: createKeySigner, + ps: createPSSKeySigner, + es: createECDSASigner, + none: createNoneSigner, + } + var verifierFactories = { + hs: createHmacVerifier, + rs: createKeyVerifier, + ps: createPSSKeyVerifier, + es: createECDSAVerifer, + none: createNoneVerifier, + } + var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); + if (!match) + throw typeError(MSG_INVALID_ALGORITHM, algorithm); + var algo = (match[1] || match[3]).toLowerCase(); + var bits = match[2]; - set(listener) { - if (typeof listener !== "function" && !isObject(listener)) { - listener = null; // eslint-disable-line no-param-reassign - } - const listeners = getListeners(this); + return { + sign: signerFactories[algo](bits), + verify: verifierFactories[algo](bits), + } +}; - // Traverse to the tail while removing old value. - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - // Remove old value. - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } - node = node.next; - } +/***/ }), - // Add new value. - if (listener !== null) { - const newNode = { - listener, - listenerType: ATTRIBUTE, - passive: false, - once: false, - next: null, - }; - if (prev === null) { - listeners.set(eventName, newNode); - } else { - prev.next = newNode; - } - } - }, - configurable: true, - enumerable: true, - } -} +/***/ 4636: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Define an event attribute (e.g. `eventTarget.onclick`). - * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. - * @param {string} eventName The event name to define. - * @returns {void} - */ -function defineEventAttribute(eventTargetPrototype, eventName) { - Object.defineProperty( - eventTargetPrototype, - `on${eventName}`, - defineEventAttributeDescriptor(eventName) - ); -} +/*global exports*/ +var SignStream = __nccwpck_require__(73334); +var VerifyStream = __nccwpck_require__(5522); -/** - * Define a custom EventTarget with event attributes. - * @param {string[]} eventNames Event names for event attributes. - * @returns {EventTarget} The custom EventTarget. - * @private - */ -function defineCustomEventTarget(eventNames) { - /** CustomEventTarget */ - function CustomEventTarget() { - EventTarget.call(this); - } +var ALGORITHMS = [ + 'HS256', 'HS384', 'HS512', + 'RS256', 'RS384', 'RS512', + 'PS256', 'PS384', 'PS512', + 'ES256', 'ES384', 'ES512' +]; - CustomEventTarget.prototype = Object.create(EventTarget.prototype, { - constructor: { - value: CustomEventTarget, - configurable: true, - writable: true, - }, - }); +exports.ALGORITHMS = ALGORITHMS; +exports.sign = SignStream.sign; +exports.verify = VerifyStream.verify; +exports.decode = VerifyStream.decode; +exports.isValid = VerifyStream.isValid; +exports.createSign = function createSign(opts) { + return new SignStream(opts); +}; +exports.createVerify = function createVerify(opts) { + return new VerifyStream(opts); +}; - for (let i = 0; i < eventNames.length; ++i) { - defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); - } - return CustomEventTarget -} +/***/ }), -/** - * EventTarget. - * - * - This is constructor if no arguments. - * - This is a function which returns a CustomEventTarget constructor if there are arguments. - * - * For example: - * - * class A extends EventTarget {} - * class B extends EventTarget("message") {} - * class C extends EventTarget("message", "error") {} - * class D extends EventTarget(["message", "error"]) {} - */ -function EventTarget() { - /*eslint-disable consistent-return */ - if (this instanceof EventTarget) { - listenersMap.set(this, new Map()); - return - } - if (arguments.length === 1 && Array.isArray(arguments[0])) { - return defineCustomEventTarget(arguments[0]) - } - if (arguments.length > 0) { - const types = new Array(arguments.length); - for (let i = 0; i < arguments.length; ++i) { - types[i] = arguments[i]; - } - return defineCustomEventTarget(types) - } - throw new TypeError("Cannot call a class as a function") - /*eslint-enable consistent-return */ -} +/***/ 61868: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// Should be enumerable, but class methods are not enumerable. -EventTarget.prototype = { - /** - * Add a given listener to this event target. - * @param {string} eventName The event name to add. - * @param {Function} listener The listener to add. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - addEventListener(eventName, listener, options) { - if (listener == null) { - return - } - if (typeof listener !== "function" && !isObject(listener)) { - throw new TypeError("'listener' should be a function or an object.") - } +/*global module, process*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var Stream = __nccwpck_require__(12781); +var util = __nccwpck_require__(73837); - const listeners = getListeners(this); - const optionsIsObj = isObject(options); - const capture = optionsIsObj - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - const newNode = { - listener, - listenerType, - passive: optionsIsObj && Boolean(options.passive), - once: optionsIsObj && Boolean(options.once), - next: null, - }; +function DataStream(data) { + this.buffer = null; + this.writable = true; + this.readable = true; - // Set it as the first node if the first node is null. - let node = listeners.get(eventName); - if (node === undefined) { - listeners.set(eventName, newNode); - return - } + // No input + if (!data) { + this.buffer = Buffer.alloc(0); + return this; + } - // Traverse to the tail while checking duplication.. - let prev = null; - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - // Should ignore duplication. - return - } - prev = node; - node = node.next; - } + // Stream + if (typeof data.pipe === 'function') { + this.buffer = Buffer.alloc(0); + data.pipe(this); + return this; + } - // Add it. - prev.next = newNode; - }, + // Buffer or String + // or Object (assumedly a passworded key) + if (data.length || typeof data === 'object') { + this.buffer = data; + this.writable = false; + process.nextTick(function () { + this.emit('end', data); + this.readable = false; + this.emit('close'); + }.bind(this)); + return this; + } - /** - * Remove a given listener from this event target. - * @param {string} eventName The event name to remove. - * @param {Function} listener The listener to remove. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - removeEventListener(eventName, listener, options) { - if (listener == null) { - return - } + throw new TypeError('Unexpected data type ('+ typeof data + ')'); +} +util.inherits(DataStream, Stream); - const listeners = getListeners(this); - const capture = isObject(options) - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; +DataStream.prototype.write = function write(data) { + this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); + this.emit('data', data); +}; - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - return - } +DataStream.prototype.end = function end(data) { + if (data) + this.write(data); + this.emit('end', data); + this.emit('close'); + this.writable = false; + this.readable = false; +}; - prev = node; - node = node.next; - } - }, +module.exports = DataStream; - /** - * Dispatch a given event. - * @param {Event|{type:string}} event The event to dispatch. - * @returns {boolean} `false` if canceled. - */ - dispatchEvent(event) { - if (event == null || typeof event.type !== "string") { - throw new TypeError('"event.type" should be a string.') - } - // If listeners aren't registered, terminate. - const listeners = getListeners(this); - const eventName = event.type; - let node = listeners.get(eventName); - if (node == null) { - return true - } +/***/ }), - // Since we cannot rewrite several properties, so wrap object. - const wrappedEvent = wrapEvent(this, event); +/***/ 73334: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // This doesn't process capturing phase and bubbling phase. - // This isn't participating in a tree. - let prev = null; - while (node != null) { - // Remove this listener if it's once - if (node.once) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } +/*global module*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var DataStream = __nccwpck_require__(61868); +var jwa = __nccwpck_require__(96010); +var Stream = __nccwpck_require__(12781); +var toString = __nccwpck_require__(65292); +var util = __nccwpck_require__(73837); - // Call this listener - setPassiveListener( - wrappedEvent, - node.passive ? node.listener : null - ); - if (typeof node.listener === "function") { - try { - node.listener.call(this, wrappedEvent); - } catch (err) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error(err); - } - } - } else if ( - node.listenerType !== ATTRIBUTE && - typeof node.listener.handleEvent === "function" - ) { - node.listener.handleEvent(wrappedEvent); - } +function base64url(string, encoding) { + return Buffer + .from(string, encoding) + .toString('base64') + .replace(/=/g, '') + .replace(/\+/g, '-') + .replace(/\//g, '_'); +} + +function jwsSecuredInput(header, payload, encoding) { + encoding = encoding || 'utf8'; + var encodedHeader = base64url(toString(header), 'binary'); + var encodedPayload = base64url(toString(payload), encoding); + return util.format('%s.%s', encodedHeader, encodedPayload); +} + +function jwsSign(opts) { + var header = opts.header; + var payload = opts.payload; + var secretOrKey = opts.secret || opts.privateKey; + var encoding = opts.encoding; + var algo = jwa(header.alg); + var securedInput = jwsSecuredInput(header, payload, encoding); + var signature = algo.sign(securedInput, secretOrKey); + return util.format('%s.%s', securedInput, signature); +} + +function SignStream(opts) { + var secret = opts.secret; + secret = secret == null ? opts.privateKey : secret; + secret = secret == null ? opts.key : secret; + if (/^hs/i.test(opts.header.alg) === true && secret == null) { + throw new TypeError('secret must be a string or buffer or a KeyObject') + } + var secretStream = new DataStream(secret); + this.readable = true; + this.header = opts.header; + this.encoding = opts.encoding; + this.secret = this.privateKey = this.key = secretStream; + this.payload = new DataStream(opts.payload); + this.secret.once('close', function () { + if (!this.payload.writable && this.readable) + this.sign(); + }.bind(this)); + + this.payload.once('close', function () { + if (!this.secret.writable && this.readable) + this.sign(); + }.bind(this)); +} +util.inherits(SignStream, Stream); + +SignStream.prototype.sign = function sign() { + try { + var signature = jwsSign({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding + }); + this.emit('done', signature); + this.emit('data', signature); + this.emit('end'); + this.readable = false; + return signature; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); + } +}; - // Break if `event.stopImmediatePropagation` was called. - if (isStopped(wrappedEvent)) { - break - } +SignStream.sign = jwsSign; - node = node.next; - } - setPassiveListener(wrappedEvent, null); - setEventPhase(wrappedEvent, 0); - setCurrentTarget(wrappedEvent, null); +module.exports = SignStream; - return !wrappedEvent.defaultPrevented - }, -}; -// `constructor` is not enumerable. -Object.defineProperty(EventTarget.prototype, "constructor", { - value: EventTarget, - configurable: true, - writable: true, -}); +/***/ }), -// Ensure `eventTarget instanceof window.EventTarget` is `true`. -if ( - typeof window !== "undefined" && - typeof window.EventTarget !== "undefined" -) { - Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); -} +/***/ 65292: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -exports.defineEventAttribute = defineEventAttribute; -exports.EventTarget = EventTarget; -exports["default"] = EventTarget; +/*global module*/ +var Buffer = (__nccwpck_require__(14300).Buffer); -module.exports = EventTarget -module.exports.EventTarget = module.exports["default"] = EventTarget -module.exports.defineEventAttribute = defineEventAttribute -//# sourceMappingURL=event-target-shim.js.map +module.exports = function toString(obj) { + if (typeof obj === 'string') + return obj; + if (typeof obj === 'number' || Buffer.isBuffer(obj)) + return obj.toString(); + return JSON.stringify(obj); +}; /***/ }), -/***/ 38171: -/***/ ((module) => { +/***/ 5522: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +/*global module*/ +var Buffer = (__nccwpck_require__(21867).Buffer); +var DataStream = __nccwpck_require__(61868); +var jwa = __nccwpck_require__(96010); +var Stream = __nccwpck_require__(12781); +var toString = __nccwpck_require__(65292); +var util = __nccwpck_require__(73837); +var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; +function isObject(thing) { + return Object.prototype.toString.call(thing) === '[object Object]'; +} -var hasOwn = Object.prototype.hasOwnProperty; -var toStr = Object.prototype.toString; -var defineProperty = Object.defineProperty; -var gOPD = Object.getOwnPropertyDescriptor; +function safeJsonParse(thing) { + if (isObject(thing)) + return thing; + try { return JSON.parse(thing); } + catch (e) { return undefined; } +} -var isArray = function isArray(arr) { - if (typeof Array.isArray === 'function') { - return Array.isArray(arr); - } +function headerFromJWS(jwsSig) { + var encodedHeader = jwsSig.split('.', 1)[0]; + return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); +} - return toStr.call(arr) === '[object Array]'; -}; +function securedInputFromJWS(jwsSig) { + return jwsSig.split('.', 2).join('.'); +} -var isPlainObject = function isPlainObject(obj) { - if (!obj || toStr.call(obj) !== '[object Object]') { - return false; - } +function signatureFromJWS(jwsSig) { + return jwsSig.split('.')[2]; +} - var hasOwnConstructor = hasOwn.call(obj, 'constructor'); - var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf'); - // Not own constructor property must be Object - if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { - return false; - } +function payloadFromJWS(jwsSig, encoding) { + encoding = encoding || 'utf8'; + var payload = jwsSig.split('.')[1]; + return Buffer.from(payload, 'base64').toString(encoding); +} - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - var key; - for (key in obj) { /**/ } +function isValidJws(string) { + return JWS_REGEX.test(string) && !!headerFromJWS(string); +} - return typeof key === 'undefined' || hasOwn.call(obj, key); -}; +function jwsVerify(jwsSig, algorithm, secretOrKey) { + if (!algorithm) { + var err = new Error("Missing algorithm parameter for jws.verify"); + err.code = "MISSING_ALGORITHM"; + throw err; + } + jwsSig = toString(jwsSig); + var signature = signatureFromJWS(jwsSig); + var securedInput = securedInputFromJWS(jwsSig); + var algo = jwa(algorithm); + return algo.verify(securedInput, signature, secretOrKey); +} -// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target -var setProperty = function setProperty(target, options) { - if (defineProperty && options.name === '__proto__') { - defineProperty(target, options.name, { - enumerable: true, - configurable: true, - value: options.newValue, - writable: true - }); - } else { - target[options.name] = options.newValue; - } -}; +function jwsDecode(jwsSig, opts) { + opts = opts || {}; + jwsSig = toString(jwsSig); -// Return undefined instead of __proto__ if '__proto__' is not an own property -var getProperty = function getProperty(obj, name) { - if (name === '__proto__') { - if (!hasOwn.call(obj, name)) { - return void 0; - } else if (gOPD) { - // In early versions of node, obj['__proto__'] is buggy when obj has - // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. - return gOPD(obj, name).value; - } - } + if (!isValidJws(jwsSig)) + return null; - return obj[name]; -}; + var header = headerFromJWS(jwsSig); -module.exports = function extend() { - var options, name, src, copy, copyIsArray, clone; - var target = arguments[0]; - var i = 1; - var length = arguments.length; - var deep = false; + if (!header) + return null; - // Handle a deep copy situation - if (typeof target === 'boolean') { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - if (target == null || (typeof target !== 'object' && typeof target !== 'function')) { - target = {}; - } + var payload = payloadFromJWS(jwsSig); + if (header.typ === 'JWT' || opts.json) + payload = JSON.parse(payload, opts.encoding); - for (; i < length; ++i) { - options = arguments[i]; - // Only deal with non-null/undefined values - if (options != null) { - // Extend the base object - for (name in options) { - src = getProperty(target, name); - copy = getProperty(options, name); + return { + header: header, + payload: payload, + signature: signatureFromJWS(jwsSig) + }; +} - // Prevent never-ending loop - if (target !== copy) { - // Recurse if we're merging plain objects or arrays - if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { - if (copyIsArray) { - copyIsArray = false; - clone = src && isArray(src) ? src : []; - } else { - clone = src && isPlainObject(src) ? src : {}; - } +function VerifyStream(opts) { + opts = opts || {}; + var secretOrKey = opts.secret; + secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; + secretOrKey = secretOrKey == null ? opts.key : secretOrKey; + if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { + throw new TypeError('secret must be a string or buffer or a KeyObject') + } + var secretStream = new DataStream(secretOrKey); + this.readable = true; + this.algorithm = opts.algorithm; + this.encoding = opts.encoding; + this.secret = this.publicKey = this.key = secretStream; + this.signature = new DataStream(opts.signature); + this.secret.once('close', function () { + if (!this.signature.writable && this.readable) + this.verify(); + }.bind(this)); - // Never move original objects, clone them - setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); + this.signature.once('close', function () { + if (!this.secret.writable && this.readable) + this.verify(); + }.bind(this)); +} +util.inherits(VerifyStream, Stream); +VerifyStream.prototype.verify = function verify() { + try { + var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); + var obj = jwsDecode(this.signature.buffer, this.encoding); + this.emit('done', valid, obj); + this.emit('data', valid); + this.emit('end'); + this.readable = false; + return valid; + } catch (e) { + this.readable = false; + this.emit('error', e); + this.emit('close'); + } +}; - // Don't bring in undefined values - } else if (typeof copy !== 'undefined') { - setProperty(target, { name: name, newValue: copy }); - } - } - } - } - } +VerifyStream.decode = jwsDecode; +VerifyStream.isValid = isValidJws; +VerifyStream.verify = jwsVerify; - // Return the modified object - return target; -}; +module.exports = VerifyStream; /***/ }), -/***/ 12603: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 19775: +/***/ ((module) => { "use strict"; -const validator = __nccwpck_require__(61739); -const XMLParser = __nccwpck_require__(42380); -const XMLBuilder = __nccwpck_require__(80660); +/** @type {import('./abs')} */ +module.exports = Math.abs; -module.exports = { - XMLParser: XMLParser, - XMLValidator: validator, - XMLBuilder: XMLBuilder -} /***/ }), -/***/ 38280: -/***/ ((__unused_webpack_module, exports) => { +/***/ 60924: +/***/ ((module) => { "use strict"; -const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; -const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*' -const regexName = new RegExp('^' + nameRegexp + '$'); +/** @type {import('./floor')} */ +module.exports = Math.floor; -const getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - allmatches.startIndex = regex.lastIndex - match[0].length; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; -}; -const isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === 'undefined'); -}; +/***/ }), -exports.isExist = function(v) { - return typeof v !== 'undefined'; -}; +/***/ 57661: +/***/ ((module) => { -exports.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; -}; +"use strict"; -/** - * Copy all the properties of a into b. - * @param {*} target - * @param {*} a - */ -exports.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); // will return an array of own properties - const len = keys.length; //don't make it inline - for (let i = 0; i < len; i++) { - if (arrayMode === 'strict') { - target[keys[i]] = [ a[keys[i]] ]; - } else { - target[keys[i]] = a[keys[i]]; - } - } - } -}; -/* exports.merge =function (b,a){ - return Object.assign(b,a); -} */ -exports.getValue = function(v) { - if (exports.isExist(v)) { - return v; - } else { - return ''; - } +/** @type {import('./isNaN')} */ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; }; -// const fakeCall = function(a) {return a;}; -// const fakeCallNoReturn = function() {}; - -exports.isName = isName; -exports.getAllMatches = getAllMatches; -exports.nameRegexp = nameRegexp; - /***/ }), -/***/ 61739: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 52419: +/***/ ((module) => { "use strict"; -const util = __nccwpck_require__(38280); +/** @type {import('./max')} */ +module.exports = Math.max; -const defaultOptions = { - allowBooleanAttributes: false, //A tag can have attributes without any value - unpairedTags: [] -}; -//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); -exports.validate = function (xmlData, options) { - options = Object.assign({}, defaultOptions, options); +/***/ }), - //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line - //xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag - //xmlData = xmlData.replace(/()/g,"");//Remove DOCTYPE - const tags = []; - let tagFound = false; +/***/ 73373: +/***/ ((module) => { - //indicates that the root tag has been closed (aka. depth 0 has been reached) - let reachedRoot = false; +"use strict"; - if (xmlData[0] === '\ufeff') { - // check for byte order mark (BOM) - xmlData = xmlData.substr(1); - } - - for (let i = 0; i < xmlData.length; i++) { - - if (xmlData[i] === '<' && xmlData[i+1] === '?') { - i+=2; - i = readPI(xmlData,i); - if (i.err) return i; - }else if (xmlData[i] === '<') { - //starting of tag - //read until you reach to '>' avoiding any '>' in attribute value - let tagStartPos = i; - i++; - - if (xmlData[i] === '!') { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === '/') { - //closing tag - closingTag = true; - i++; - } - //read tagname - let tagName = ''; - for (; i < xmlData.length && - xmlData[i] !== '>' && - xmlData[i] !== ' ' && - xmlData[i] !== '\t' && - xmlData[i] !== '\n' && - xmlData[i] !== '\r'; i++ - ) { - tagName += xmlData[i]; - } - tagName = tagName.trim(); - //console.log(tagName); - if (tagName[tagName.length - 1] === '/') { - //self closing tag without attributes - tagName = tagName.substring(0, tagName.length - 1); - //continue; - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "Invalid space after '<'."; - } else { - msg = "Tag '"+tagName+"' is an invalid name."; - } - return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i)); - } +/** @type {import('./min')} */ +module.exports = Math.min; - const result = readAttributeStr(xmlData, i); - if (result === false) { - return getErrorObject('InvalidAttr', "Attributes for '"+tagName+"' have open quote.", getLineNumberForPosition(xmlData, i)); - } - let attrStr = result.value; - i = result.index; - if (attrStr[attrStr.length - 1] === '/') { - //self closing tag - const attrStrStart = i - attrStr.length; - attrStr = attrStr.substring(0, attrStr.length - 1); - const isValid = validateAttributeString(attrStr, options); - if (isValid === true) { - tagFound = true; - //continue; //text may presents after self closing tag - } else { - //the result from the nested function returns the position of the error within the attribute - //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute - //this gives us the absolute index in the entire xml, which we can use to find the line at last - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); - } - } else if (closingTag) { - if (!result.tagClosed) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); - } else if (attrStr.trim().length > 0) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); - } else if (tags.length === 0) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos)); - } else { - const otg = tags.pop(); - if (tagName !== otg.tagName) { - let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); - return getErrorObject('InvalidTag', - "Expected closing tag '"+otg.tagName+"' (opened in line "+openPos.line+", col "+openPos.col+") instead of closing tag '"+tagName+"'.", - getLineNumberForPosition(xmlData, tagStartPos)); - } +/***/ }), - //when there are no more tags, we reached the root level. - if (tags.length == 0) { - reachedRoot = true; - } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - //the result from the nested function returns the position of the error within the attribute - //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute - //this gives us the absolute index in the entire xml, which we can use to find the line at last - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } +/***/ 78029: +/***/ ((module) => { - //if the root level has been reached before ... - if (reachedRoot === true) { - return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i)); - } else if(options.unpairedTags.indexOf(tagName) !== -1){ - //don't push into stack - } else { - tags.push({tagName, tagStartPos}); - } - tagFound = true; - } - - //skip tag text value - //It may include comments and CDATA value - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - if (xmlData[i + 1] === '!') { - //comment or CADATA - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i+1] === '?') { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else{ - break; - } - } else if (xmlData[i] === '&') { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - }else{ - if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { - return getErrorObject('InvalidXml', "Extra text at the end", getLineNumberForPosition(xmlData, i)); - } - } - } //end of reading tag text value - if (xmlData[i] === '<') { - i--; - } - } - } else { - if ( isWhiteSpace(xmlData[i])) { - continue; - } - return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } +"use strict"; - if (!tagFound) { - return getErrorObject('InvalidXml', 'Start tag expected.', 1); - }else if (tags.length == 1) { - return getErrorObject('InvalidTag', "Unclosed tag '"+tags[0].tagName+"'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); - }else if (tags.length > 0) { - return getErrorObject('InvalidXml', "Invalid '"+ - JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\r?\n/g, '')+ - "' found.", {line: 1, col: 1}); - } - return true; -}; +/** @type {import('./pow')} */ +module.exports = Math.pow; -function isWhiteSpace(char){ - return char === ' ' || char === '\t' || char === '\n' || char === '\r'; -} -/** - * Read Processing insstructions and skip - * @param {*} xmlData - * @param {*} i - */ -function readPI(xmlData, i) { - const start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == '?' || xmlData[i] == ' ') { - //tagname - const tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === 'xml') { - return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') { - //check if valid attribut string - i++; - break; - } else { - continue; - } - } - } - return i; -} -function readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') { - //comment - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') { - i += 2; - break; - } - } - } else if ( - xmlData.length > i + 8 && - xmlData[i + 1] === 'D' && - xmlData[i + 2] === 'O' && - xmlData[i + 3] === 'C' && - xmlData[i + 4] === 'T' && - xmlData[i + 5] === 'Y' && - xmlData[i + 6] === 'P' && - xmlData[i + 7] === 'E' - ) { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - angleBracketsCount++; - } else if (xmlData[i] === '>') { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; - } - } - } - } else if ( - xmlData.length > i + 9 && - xmlData[i + 1] === '[' && - xmlData[i + 2] === 'C' && - xmlData[i + 3] === 'D' && - xmlData[i + 4] === 'A' && - xmlData[i + 5] === 'T' && - xmlData[i + 6] === 'A' && - xmlData[i + 7] === '[' - ) { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') { - i += 2; - break; - } - } - } +/***/ }), - return i; -} +/***/ 59396: +/***/ ((module) => { -const doubleQuote = '"'; -const singleQuote = "'"; +"use strict"; -/** - * Keep reading xmlData until '<' is found outside the attribute value. - * @param {string} xmlData - * @param {number} i - */ -function readAttributeStr(xmlData, i) { - let attrStr = ''; - let startChar = ''; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === '') { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa - } else { - startChar = ''; - } - } else if (xmlData[i] === '>') { - if (startChar === '') { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== '') { - return false; - } - return { - value: attrStr, - index: i, - tagClosed: tagClosed - }; -} +/** @type {import('./round')} */ +module.exports = Math.round; -/** - * Select all the attributes whether valid or invalid. - */ -const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g'); -//attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" +/***/ }), + +/***/ 39091: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; -function validateAttributeString(attrStr, options) { - //console.log("start:"+attrStr+":end"); - //if(attrStr.trim().length === 0) return true; //empty string +var $isNaN = __nccwpck_require__(57661); - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; +/** @type {import('./sign')} */ +module.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : +1; +}; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - //nospace before attribute name: a="sd"b="saf" - return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(matches[i])) - } else if (matches[i][3] !== undefined && matches[i][4] === undefined) { - return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' is without value.", getPositionFromMatch(matches[i])); - } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) { - //independent attribute: ab - return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(matches[i])); - } - /* else if(matches[i][6] === undefined){//attribute without value: ab= - return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}}; - } */ - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(matches[i])); - } - if (!attrNames.hasOwnProperty(attrName)) { - //check for duplicate attribute. - attrNames[attrName] = 1; - } else { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(matches[i])); - } - } - return true; -} +/***/ }), -function validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === 'x') { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ';') - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; -} +/***/ 47426: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function validateAmpersand(xmlData, i) { - // https://www.w3.org/TR/xml/#dt-charref - i++; - if (xmlData[i] === ';') - return -1; - if (xmlData[i] === '#') { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ';') - break; - return -1; - } - return i; -} +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ -function getErrorObject(code, message, lineNumber) { - return { - err: { - code: code, - msg: message, - line: lineNumber.line || lineNumber, - col: lineNumber.col, - }, - }; -} +/** + * Module exports. + */ -function validateAttrName(attrName) { - return util.isName(attrName); -} +module.exports = __nccwpck_require__(53765) -// const startsWithXML = /^xml/i; -function validateTagName(tagname) { - return util.isName(tagname) /* && !tagname.match(startsWithXML) */; -} +/***/ }), -//this function returns the line number for the character at the given index -function getLineNumberForPosition(xmlData, index) { - const lines = xmlData.substring(0, index).split(/\r?\n/); - return { - line: lines.length, +/***/ 43583: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // column number is last line's length + 1, because column numbering starts at 1: - col: lines[lines.length - 1].length + 1 - }; -} +"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ -//this function returns the position of the first character of match within attrStr -function getPositionFromMatch(match) { - return match.startIndex + match[1].length; -} -/***/ }), +/** + * Module dependencies. + * @private + */ -/***/ 80660: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var db = __nccwpck_require__(47426) +var extname = (__nccwpck_require__(71017).extname) -"use strict"; +/** + * Module variables. + * @private + */ -//parse Empty Node as self closing node -const buildFromOrderedJs = __nccwpck_require__(72462); +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i -const defaultOptions = { - attributeNamePrefix: '@_', - attributesGroupName: false, - textNodeName: '#text', - ignoreAttributes: true, - cdataPropName: false, - format: false, - indentBy: ' ', - suppressEmptyNode: false, - suppressUnpairedNode: true, - suppressBooleanAttributes: true, - tagValueProcessor: function(key, a) { - return a; - }, - attributeValueProcessor: function(attrName, a) { - return a; - }, - preserveOrder: false, - commentPropName: false, - unpairedTags: [], - entities: [ - { regex: new RegExp("&", "g"), val: "&" },//it must be on top - { regex: new RegExp(">", "g"), val: ">" }, - { regex: new RegExp("<", "g"), val: "<" }, - { regex: new RegExp("\'", "g"), val: "'" }, - { regex: new RegExp("\"", "g"), val: """ } - ], - processEntities: true, - stopNodes: [], - // transformTagName: false, - // transformAttributeName: false, - oneListGroup: false -}; +/** + * Module exports. + * @public + */ -function Builder(options) { - this.options = Object.assign({}, defaultOptions, options); - if (this.options.ignoreAttributes || this.options.attributesGroupName) { - this.isAttribute = function(/*a*/) { - return false; - }; - } else { - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) - this.processTextOrObjNode = processTextOrObjNode +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = '>\n'; - this.newLine = '\n'; - } else { - this.indentate = function() { - return ''; - }; - this.tagEndChar = '>'; - this.newLine = ''; +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false } -} -Builder.prototype.build = function(jObj) { - if(this.options.preserveOrder){ - return buildFromOrderedJs(jObj, this.options); - }else { - if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){ - jObj = { - [this.options.arrayNodeName] : jObj - } - } - return this.j2x(jObj, 0).val; + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset } -}; -Builder.prototype.j2x = function(jObj, level) { - let attrStr = ''; - let val = ''; - for (let key in jObj) { - if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue; - if (typeof jObj[key] === 'undefined') { - // supress undefined node only if it is not an attribute - if (this.isAttribute(key)) { - val += ''; - } - } else if (jObj[key] === null) { - // null attribute should be ignored by the attribute list, but should not cause the tag closing - if (this.isAttribute(key)) { - val += ''; - } else if (key[0] === '?') { - val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; - } else { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } - // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (jObj[key] instanceof Date) { - val += this.buildTextValNode(jObj[key], key, '', level); - } else if (typeof jObj[key] !== 'object') { - //premitive type - const attr = this.isAttribute(key); - if (attr) { - attrStr += this.buildAttrPairStr(attr, '' + jObj[key]); - }else { - //tag value - if (key === this.options.textNodeName) { - let newval = this.options.tagValueProcessor(key, '' + jObj[key]); - val += this.replaceEntitiesValue(newval); - } else { - val += this.buildTextValNode(jObj[key], key, '', level); - } - } - } else if (Array.isArray(jObj[key])) { - //repeated nodes - const arrLen = jObj[key].length; - let listTagVal = ""; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === 'undefined') { - // supress undefined node - } else if (item === null) { - if(key[0] === "?") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; - else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (typeof item === 'object') { - if(this.options.oneListGroup ){ - listTagVal += this.j2x(item, level + 1).val; - }else{ - listTagVal += this.processTextOrObjNode(item, key, level) - } - } else { - listTagVal += this.buildTextValNode(item, key, '', level); - } - } - if(this.options.oneListGroup){ - listTagVal = this.buildObjectNode(listTagVal, key, '', level); - } - val += listTagVal; - } else { - //nested node - if (this.options.attributesGroupName && key === this.options.attributesGroupName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]); - } - } else { - val += this.processTextOrObjNode(jObj[key], key, level) - } - } + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' } - return {attrStr: attrStr, val: val}; -}; -Builder.prototype.buildAttrPairStr = function(attrName, val){ - val = this.options.attributeValueProcessor(attrName, '' + val); - val = this.replaceEntitiesValue(val); - if (this.options.suppressBooleanAttributes && val === "true") { - return ' ' + attrName; - } else return ' ' + attrName + '="' + val + '"'; + return false } -function processTextOrObjNode (object, key, level) { - const result = this.j2x(object, level + 1); - if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) { - return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); - } else { - return this.buildObjectNode(result.val, key, result.attrStr, level); +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false } -} -Builder.prototype.buildObjectNode = function(val, key, attrStr, level) { - if(val === ""){ - if(key[0] === "?") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; - else { - return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; - } - }else{ + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str - let tagEndExp = '' + val + tagEndExp ); - } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { - return this.indentate(level) + `` + this.newLine; - }else { - return ( - this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar + - val + - this.indentate(level) + tagEndExp ); - } + if (!mime) { + return false } -} -Builder.prototype.closeTag = function(key){ - let closeTag = ""; - if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired - if(!this.options.suppressUnpairedNode) closeTag = "/" - }else if(this.options.suppressEmptyNode){ //empty - closeTag = "/"; - }else{ - closeTag = `>` + this.newLine; - }else if (this.options.commentPropName !== false && key === this.options.commentPropName) { - return this.indentate(level) + `` + this.newLine; - }else if(key[0] === "?") {//PI tag - return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; - }else{ - let textValue = this.options.tagValueProcessor(key, val); - textValue = this.replaceEntitiesValue(textValue); - - if( textValue === ''){ - return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; - }else{ - return this.indentate(level) + '<' + key + attrStr + '>' + - textValue + - ' 0 && this.options.processEntities){ - for (let i=0; i { + if (!extension) { + return false + } -const EOL = "\n"; + return exports.types[extension] || false +} /** - * - * @param {array} jArray - * @param {any} options - * @returns + * Populate the extensions and types maps. + * @private */ -function toXml(jArray, options) { - let indentation = ""; - if (options.format && options.indentBy.length > 0) { - indentation = EOL; - } - return arrToStr(jArray, options, "", indentation); -} -function arrToStr(arr, options, jPath, indentation) { - let xmlStr = ""; - let isPreviousElementTag = false; - - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const tagName = propName(tagObj); - if(tagName === undefined) continue; +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] - let newJPath = ""; - if (jPath.length === 0) newJPath = tagName - else newJPath = `${jPath}.${tagName}`; + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions - if (tagName === options.textNodeName) { - let tagText = tagObj[tagName]; - if (!isStopNode(newJPath, options)) { - tagText = options.tagValueProcessor(tagName, tagText); - tagText = replaceEntitiesValue(tagText, options); - } - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += tagText; - isPreviousElementTag = false; - continue; - } else if (tagName === options.cdataPropName) { - if (isPreviousElementTag) { - xmlStr += indentation; - } - xmlStr += ``; - isPreviousElementTag = false; - continue; - } else if (tagName === options.commentPropName) { - xmlStr += indentation + ``; - isPreviousElementTag = true; - continue; - } else if (tagName[0] === "?") { - const attStr = attr_to_str(tagObj[":@"], options); - const tempInd = tagName === "?xml" ? "" : indentation; - let piTextNodeName = tagObj[tagName][0][options.textNodeName]; - piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; //remove extra spacing - xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`; - isPreviousElementTag = true; - continue; - } - let newIdentation = indentation; - if (newIdentation !== "") { - newIdentation += options.indentBy; - } - const attStr = attr_to_str(tagObj[":@"], options); - const tagStart = indentation + `<${tagName}${attStr}`; - const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); - if (options.unpairedTags.indexOf(tagName) !== -1) { - if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; - else xmlStr += tagStart + "/>"; - } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { - xmlStr += tagStart + "/>"; - } else if (tagValue && tagValue.endsWith(">")) { - xmlStr += tagStart + `>${tagValue}${indentation}`; - } else { - xmlStr += tagStart + ">"; - if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; - } - isPreviousElementTag = true; + if (!exts || !exts.length) { + return } - return xmlStr; -} - -function propName(obj) { - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if(!obj.hasOwnProperty(key)) continue; - if (key !== ":@") return key; - } -} + // mime -> extensions + extensions[type] = exts -function attr_to_str(attrMap, options) { - let attrStr = ""; - if (attrMap && !options.ignoreAttributes) { - for (let attr in attrMap) { - if(!attrMap.hasOwnProperty(attr)) continue; - let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); - attrVal = replaceEntitiesValue(attrVal, options); - if (attrVal === true && options.suppressBooleanAttributes) { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; - } else { - attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; - } - } - } - return attrStr; -} + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] -function isStopNode(jPath, options) { - jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); - let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); - for (let index in options.stopNodes) { - if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; - } - return false; -} + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) -function replaceEntitiesValue(textValue, options) { - if (textValue && textValue.length > 0 && options.processEntities) { - for (let i = 0; i < options.entities.length; i++) { - const entity = options.entities[i]; - textValue = textValue.replace(entity.regex, entity.val); + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue } + } + + // set the extension -> mime + types[extension] = type } - return textValue; + }) } -module.exports = toXml; /***/ }), -/***/ 6072: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 46038: +/***/ ((module) => { -const util = __nccwpck_require__(38280); - -//TODO: handle comments -function readDocType(xmlData, i){ - - const entities = {}; - if( xmlData[i + 3] === 'O' && - xmlData[i + 4] === 'C' && - xmlData[i + 5] === 'T' && - xmlData[i + 6] === 'Y' && - xmlData[i + 7] === 'P' && - xmlData[i + 8] === 'E') - { - i = i+9; - let angleBracketsCount = 1; - let hasBody = false, comment = false; - let exp = ""; - for(;i') { //Read tag content - if(comment){ - if( xmlData[i - 1] === "-" && xmlData[i - 2] === "-"){ - comment = false; - angleBracketsCount--; - } - }else{ - angleBracketsCount--; - } - if (angleBracketsCount === 0) { - break; - } - }else if( xmlData[i] === '['){ - hasBody = true; - }else{ - exp += xmlData[i]; - } - } - if(angleBracketsCount !== 0){ - throw new Error(`Unclosed DOCTYPE`); - } - }else{ - throw new Error(`Invalid Tag instead of DOCTYPE`); - } - return {entities, i}; -} +"use strict"; -function readEntityExp(xmlData,i){ - //External entities are not supported - // - //Parameter entities are not supported - // +/** + * @param typeMap [Object] Map of MIME type -> Array[extensions] + * @param ... + */ +function Mime() { + this._types = Object.create(null); + this._extensions = Object.create(null); - //Internal entities are supported - // - - //read EntityName - let entityName = ""; - for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"' ); i++) { - // if(xmlData[i] === " ") continue; - // else - entityName += xmlData[i]; - } - entityName = entityName.trim(); - if(entityName.indexOf(" ") !== -1) throw new Error("External entites are not supported"); + for (let i = 0; i < arguments.length; i++) { + this.define(arguments[i]); + } - //read Entity Value - const startChar = xmlData[i++]; - let val = "" - for (; i < xmlData.length && xmlData[i] !== startChar ; i++) { - val += xmlData[i]; - } - return [entityName, val, i]; + this.define = this.define.bind(this); + this.getType = this.getType.bind(this); + this.getExtension = this.getExtension.bind(this); } -function isComment(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === '-' && - xmlData[i+3] === '-') return true - return false -} -function isEntity(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'E' && - xmlData[i+3] === 'N' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'I' && - xmlData[i+6] === 'T' && - xmlData[i+7] === 'Y') return true - return false -} -function isElement(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'E' && - xmlData[i+3] === 'L' && - xmlData[i+4] === 'E' && - xmlData[i+5] === 'M' && - xmlData[i+6] === 'E' && - xmlData[i+7] === 'N' && - xmlData[i+8] === 'T') return true - return false -} +/** + * Define mimetype -> extension mappings. Each key is a mime-type that maps + * to an array of extensions associated with the type. The first extension is + * used as the default extension for the type. + * + * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); + * + * If a type declares an extension that has already been defined, an error will + * be thrown. To suppress this error and force the extension to be associated + * with the new type, pass `force`=true. Alternatively, you may prefix the + * extension with "*" to map the type to extension, without mapping the + * extension to the type. + * + * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); + * + * + * @param map (Object) type definitions + * @param force (Boolean) if true, force overriding of existing definitions + */ +Mime.prototype.define = function(typeMap, force) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t) { + return t.toLowerCase(); + }); + type = type.toLowerCase(); -function isAttlist(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'A' && - xmlData[i+3] === 'T' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'L' && - xmlData[i+6] === 'I' && - xmlData[i+7] === 'S' && - xmlData[i+8] === 'T') return true - return false -} -function isNotation(xmlData, i){ - if(xmlData[i+1] === '!' && - xmlData[i+2] === 'N' && - xmlData[i+3] === 'O' && - xmlData[i+4] === 'T' && - xmlData[i+5] === 'A' && - xmlData[i+6] === 'T' && - xmlData[i+7] === 'I' && - xmlData[i+8] === 'O' && - xmlData[i+9] === 'N') return true - return false -} + for (let i = 0; i < extensions.length; i++) { + const ext = extensions[i]; -function validateEntityName(name){ - if (util.isName(name)) - return name; - else - throw new Error(`Invalid entity name ${name}`); -} + // '*' prefix = not the preferred type for this extension. So fixup the + // extension, and skip it. + if (ext[0] === '*') { + continue; + } -module.exports = readDocType; + if (!force && (ext in this._types)) { + throw new Error( + 'Attempt to change mapping for "' + ext + + '" extension from "' + this._types[ext] + '" to "' + type + + '". Pass `force=true` to allow this, otherwise remove "' + ext + + '" from the list of extensions for "' + type + '".' + ); + } + this._types[ext] = type; + } -/***/ }), + // Use first extension as default + if (force || !this._extensions[type]) { + const ext = extensions[0]; + this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1); + } + } +}; -/***/ 86993: -/***/ ((__unused_webpack_module, exports) => { +/** + * Lookup a mime type based on extension + */ +Mime.prototype.getType = function(path) { + path = String(path); + let last = path.replace(/^.*[/\\]/, '').toLowerCase(); + let ext = last.replace(/^.*\./, '').toLowerCase(); + let hasPath = last.length < path.length; + let hasDot = ext.length < last.length - 1; -const defaultOptions = { - preserveOrder: false, - attributeNamePrefix: '@_', - attributesGroupName: false, - textNodeName: '#text', - ignoreAttributes: true, - removeNSPrefix: false, // remove NS from tag name or attribute name if true - allowBooleanAttributes: false, //a tag can have attributes without any value - //ignoreRootElement : false, - parseTagValue: true, - parseAttributeValue: false, - trimValues: true, //Trim string values of tag and attributes - cdataPropName: false, - numberParseOptions: { - hex: true, - leadingZeros: true, - eNotation: true - }, - tagValueProcessor: function(tagName, val) { - return val; - }, - attributeValueProcessor: function(attrName, val) { - return val; - }, - stopNodes: [], //nested tags will not be parsed even for errors - alwaysCreateTextNode: false, - isArray: () => false, - commentPropName: false, - unpairedTags: [], - processEntities: true, - htmlEntities: false, - ignoreDeclaration: false, - ignorePiTags: false, - transformTagName: false, - transformAttributeName: false, - updateTag: function(tagName, jPath, attrs){ - return tagName - }, - // skipEmptyListItem: false + return (hasDot || !hasPath) && this._types[ext] || null; }; - -const buildOptions = function(options) { - return Object.assign({}, defaultOptions, options); + +/** + * Return file extension associated with a mime type + */ +Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; }; -exports.buildOptions = buildOptions; -exports.defaultOptions = defaultOptions; +module.exports = Mime; + /***/ }), -/***/ 25832: +/***/ 29994: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -///@ts-check -const util = __nccwpck_require__(38280); -const xmlNode = __nccwpck_require__(7462); -const readDocType = __nccwpck_require__(6072); -const toNumber = __nccwpck_require__(14526); - -// const regx = -// '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' -// .replace(/NAME/g, util.nameRegexp); - -//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); -//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); +let Mime = __nccwpck_require__(46038); +module.exports = new Mime(__nccwpck_require__(13114), __nccwpck_require__(38809)); -class OrderedObjParser{ - constructor(options){ - this.options = options; - this.currentNode = null; - this.tagsNodeStack = []; - this.docTypeEntities = {}; - this.lastEntities = { - "apos" : { regex: /&(apos|#39|#x27);/g, val : "'"}, - "gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"}, - "lt" : { regex: /&(lt|#60|#x3C);/g, val : "<"}, - "quot" : { regex: /&(quot|#34|#x22);/g, val : "\""}, - }; - this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"}; - this.htmlEntities = { - "space": { regex: /&(nbsp|#160);/g, val: " " }, - // "lt" : { regex: /&(lt|#60);/g, val: "<" }, - // "gt" : { regex: /&(gt|#62);/g, val: ">" }, - // "amp" : { regex: /&(amp|#38);/g, val: "&" }, - // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, - // "apos" : { regex: /&(apos|#39);/g, val: "'" }, - "cent" : { regex: /&(cent|#162);/g, val: "¢" }, - "pound" : { regex: /&(pound|#163);/g, val: "£" }, - "yen" : { regex: /&(yen|#165);/g, val: "¥" }, - "euro" : { regex: /&(euro|#8364);/g, val: "€" }, - "copyright" : { regex: /&(copy|#169);/g, val: "©" }, - "reg" : { regex: /&(reg|#174);/g, val: "®" }, - "inr" : { regex: /&(inr|#8377);/g, val: "₹" }, - "num_dec": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 10)) }, - "num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }, - }; - this.addExternalEntities = addExternalEntities; - this.parseXml = parseXml; - this.parseTextData = parseTextData; - this.resolveNameSpace = resolveNameSpace; - this.buildAttributesMap = buildAttributesMap; - this.isItStopNode = isItStopNode; - this.replaceEntitiesValue = replaceEntitiesValue; - this.readStopNodeData = readStopNodeData; - this.saveTextToParentTag = saveTextToParentTag; - this.addChild = addChild; - } -} +/***/ }), -function addExternalEntities(externalEntities){ - const entKeys = Object.keys(externalEntities); - for (let i = 0; i < entKeys.length; i++) { - const ent = entKeys[i]; - this.lastEntities[ent] = { - regex: new RegExp("&"+ent+";","g"), - val : externalEntities[ent] - } - } -} +/***/ 38809: +/***/ ((module) => { -/** - * @param {string} val - * @param {string} tagName - * @param {string} jPath - * @param {boolean} dontTrim - * @param {boolean} hasAttributes - * @param {boolean} isLeafNode - * @param {boolean} escapeEntities - */ -function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { - if (val !== undefined) { - if (this.options.trimValues && !dontTrim) { - val = val.trim(); - } - if(val.length > 0){ - if(!escapeEntities) val = this.replaceEntitiesValue(val); - - const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode); - if(newval === null || newval === undefined){ - //don't parse - return val; - }else if(typeof newval !== typeof val || newval !== val){ - //overwrite - return newval; - }else if(this.options.trimValues){ - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - }else{ - const trimmedVal = val.trim(); - if(trimmedVal === val){ - return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); - }else{ - return val; - } - } - } - } -} +module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; -function resolveNameSpace(tagname) { - if (this.options.removeNSPrefix) { - const tags = tagname.split(':'); - const prefix = tagname.charAt(0) === '/' ? '/' : ''; - if (tags[0] === 'xmlns') { - return ''; - } - if (tags.length === 2) { - tagname = prefix + tags[1]; - } - } - return tagname; -} +/***/ }), -//TODO: change regex to capture NS -//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); -const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm'); +/***/ 13114: +/***/ ((module) => { -function buildAttributesMap(attrStr, jPath, tagName) { - if (!this.options.ignoreAttributes && typeof attrStr === 'string') { - // attrStr = attrStr.replace(/\r?\n/g, ' '); - //attrStr = attrStr || attrStr.trim(); +module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; //don't make it inline - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = this.resolveNameSpace(matches[i][1]); - let oldVal = matches[i][4]; - let aName = this.options.attributeNamePrefix + attrName; - if (attrName.length) { - if (this.options.transformAttributeName) { - aName = this.options.transformAttributeName(aName); - } - if(aName === "__proto__") aName = "#__proto__"; - if (oldVal !== undefined) { - if (this.options.trimValues) { - oldVal = oldVal.trim(); - } - oldVal = this.replaceEntitiesValue(oldVal); - const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); - if(newVal === null || newVal === undefined){ - //don't parse - attrs[aName] = oldVal; - }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){ - //overwrite - attrs[aName] = newVal; - }else{ - //parse - attrs[aName] = parseValue( - oldVal, - this.options.parseAttributeValue, - this.options.numberParseOptions - ); - } - } else if (this.options.allowBooleanAttributes) { - attrs[aName] = true; - } - } - } - if (!Object.keys(attrs).length) { - return; - } - if (this.options.attributesGroupName) { - const attrCollection = {}; - attrCollection[this.options.attributesGroupName] = attrs; - return attrCollection; - } - return attrs - } -} - -const parseXml = function(xmlData) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); //TODO: remove this line - const xmlObj = new xmlNode('!xml'); - let currentNode = xmlObj; - let textData = ""; - let jPath = ""; - for(let i=0; i< xmlData.length; i++){//for each char in XML data - const ch = xmlData[i]; - if(ch === '<'){ - // const nextIndex = i+1; - // const _2ndChar = xmlData[nextIndex]; - if( xmlData[i+1] === '/') {//Closing Tag - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") - let tagName = xmlData.substring(i+2,closeIndex).trim(); - - if(this.options.removeNSPrefix){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - } - } +/***/ }), - if(this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } +/***/ 83973: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if(currentNode){ - textData = this.saveTextToParentTag(textData, currentNode, jPath); - } +module.exports = minimatch +minimatch.Minimatch = Minimatch - //check if last tag of nested tag was unpaired tag - const lastTagName = jPath.substring(jPath.lastIndexOf(".")+1); - if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){ - throw new Error(`Unpaired tag can not be used as closing tag: `); - } - let propIndex = 0 - if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){ - propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1) - this.tagsNodeStack.pop(); - }else{ - propIndex = jPath.lastIndexOf("."); - } - jPath = jPath.substring(0, propIndex); +var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep - currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope - textData = ""; - i = closeIndex; - } else if( xmlData[i+1] === '?') { +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __nccwpck_require__(33717) - let tagData = readTagExp(xmlData,i, false, "?>"); - if(!tagData) throw new Error("Pi Tag is not closed."); +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} - textData = this.saveTextToParentTag(textData, currentNode, jPath); - if( (this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags){ +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' - }else{ - - const childNode = new xmlNode(tagData.tagName); - childNode.add(this.options.textNodeName, ""); - - if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); - } - this.addChild(currentNode, childNode, jPath) +// * => any number of characters +var star = qmark + '*?' - } +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - i = tagData.closeIndex + 1; - } else if(xmlData.substr(i + 1, 3) === '!--') { - const endIndex = findClosingIndex(xmlData, "-->", i+4, "Comment is not closed.") - if(this.options.commentPropName){ - const comment = xmlData.substring(i + 4, endIndex - 2); +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') - textData = this.saveTextToParentTag(textData, currentNode, jPath); +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} - currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]); - } - i = endIndex; - } else if( xmlData.substr(i + 1, 2) === '!D') { - const result = readDocType(xmlData, i); - this.docTypeEntities = result.entities; - i = result.i; - }else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; - const tagExp = xmlData.substring(i + 9,closeIndex); +// normalizes slashes. +var slashSplit = /\/+/ - textData = this.saveTextToParentTag(textData, currentNode, jPath); +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} - let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true); - if(val == undefined) val = ""; +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} - //cdata should be set even if it is 0 length string - if(this.options.cdataPropName){ - currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]); - }else{ - currentNode.add(this.options.textNodeName, val); - } - - i = closeIndex + 2; - }else {//Opening tag - let result = readTagExp(xmlData,i, this.options.removeNSPrefix); - let tagName= result.tagName; - const rawTagName = result.rawTagName; - let tagExp = result.tagExp; - let attrExpPresent = result.attrExpPresent; - let closeIndex = result.closeIndex; +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } - if (this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - - //save text as child node - if (currentNode && textData) { - if(currentNode.tagname !== '!xml'){ - //when nested tag is found - textData = this.saveTextToParentTag(textData, currentNode, jPath, false); - } - } + var orig = minimatch - //check if last tag was unpaired tag - const lastTag = currentNode; - if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){ - currentNode = this.tagsNodeStack.pop(); - jPath = jPath.substring(0, jPath.lastIndexOf(".")); - } - if(tagName !== xmlObj.tagname){ - jPath += jPath ? "." + tagName : tagName; - } - if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { - let tagContent = ""; - //self-closing tag - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } - i = result.closeIndex; - } - //unpaired tag - else if(this.options.unpairedTags.indexOf(tagName) !== -1){ - - i = result.closeIndex; - } - //normal tag - else{ - //read until closing tag is found - const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1); - if(!result) throw new Error(`Unexpected end of ${rawTagName}`); - i = result.i; - tagContent = result.tagContent; - } + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } - const childNode = new xmlNode(tagName); - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - if(tagContent) { - tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); - } - - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - childNode.add(this.options.textNodeName, tagContent); - - this.addChild(currentNode, childNode, jPath) - }else{ - //selfClosing tag - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - jPath = jPath.substr(0, jPath.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } - - if(this.options.transformTagName) { - tagName = this.options.transformTagName(tagName); - } - - const childNode = new xmlNode(tagName); - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath) - jPath = jPath.substr(0, jPath.lastIndexOf(".")); - } - //opening tag - else{ - const childNode = new xmlNode( tagName); - this.tagsNodeStack.push(currentNode); - - if(tagName !== tagExp && attrExpPresent){ - childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); - } - this.addChild(currentNode, childNode, jPath) - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - } - }else{ - textData += xmlData[i]; - } + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch } - return xmlObj.child; -} -function addChild(currentNode, childNode, jPath){ - const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]) - if(result === false){ - }else if(typeof result === "string"){ - childNode.tagname = result - currentNode.addChild(childNode); - }else{ - currentNode.addChild(childNode); + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) } -} -const replaceEntitiesValue = function(val){ + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } - if(this.options.processEntities){ - for(let entityName in this.docTypeEntities){ - const entity = this.docTypeEntities[entityName]; - val = val.replace( entity.regx, entity.val); - } - for(let entityName in this.lastEntities){ - const entity = this.lastEntities[entityName]; - val = val.replace( entity.regex, entity.val); - } - if(this.options.htmlEntities){ - for(let entityName in this.htmlEntities){ - const entity = this.htmlEntities[entityName]; - val = val.replace( entity.regex, entity.val); - } - } - val = val.replace( this.ampEntity.regex, this.ampEntity.val); + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) } - return val; -} -function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { - if (textData) { //store previously collected data as textNode - if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0 - - textData = this.parseTextData(textData, - currentNode.tagname, - jPath, - false, - currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, - isLeafNode); - if (textData !== undefined && textData !== "") - currentNode.add(this.options.textNodeName, textData); - textData = ""; + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) } - return textData; -} -//TODO: use jPath to simplify the logic -/** - * - * @param {string[]} stopNodes - * @param {string} jPath - * @param {string} currentTagName - */ -function isItStopNode(stopNodes, jPath, currentTagName){ - const allNodesExp = "*." + currentTagName; - for (const stopNodePath in stopNodes) { - const stopNodeExp = stopNodes[stopNodePath]; - if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true; + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) } - return false; + + return m } -/** - * Returns the tag Expression and where it is ending handling single-double quotes situation - * @param {string} xmlData - * @param {number} i starting index - * @returns - */ -function tagExpWithClosingIndex(xmlData, i, closingChar = ">"){ - let attrBoundary; - let tagExp = ""; - for (let index = i; index < xmlData.length; index++) { - let ch = xmlData[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = "";//reset - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === closingChar[0]) { - if(closingChar[1]){ - if(xmlData[index + 1] === closingChar[1]){ - return { - data: tagExp, - index: index - } - } - }else{ - return { - data: tagExp, - index: index - } - } - } else if (ch === '\t') { - ch = " " - } - tagExp += ch; - } +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch } -function findClosingIndex(xmlData, str, i, errMsg){ - const closingIndex = xmlData.indexOf(str, i); - if(closingIndex === -1){ - throw new Error(errMsg) - }else{ - return closingIndex + str.length - 1; +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false } + + return new Minimatch(pattern, options).match(p) } -function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){ - const result = tagExpWithClosingIndex(xmlData, i+1, closingChar); - if(!result) return; - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.search(/\s/); - let tagName = tagExp; - let attrExpPresent = true; - if(separatorIndex !== -1){//separate tag name and attributes expression - tagName = tagExp.substring(0, separatorIndex); - tagExp = tagExp.substring(separatorIndex + 1).trimStart(); +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) } - const rawTagName = tagName; - if(removeNSPrefix){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - attrExpPresent = tagName !== result.data.substr(colonIndex + 1); - } + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') } - return { - tagName: tagName, - tagExp: tagExp, - closeIndex: closeIndex, - attrExpPresent: attrExpPresent, - rawTagName: rawTagName, - } -} -/** - * find paired tag for a stop node - * @param {string} xmlData - * @param {string} tagName - * @param {number} i - */ -function readStopNodeData(xmlData, tagName, i){ - const startIndex = i; - // Starting at 1 since we already have an open tag - let openTagCount = 1; - - for (; i < xmlData.length; i++) { - if( xmlData[i] === "<"){ - if (xmlData[i+1] === "/") {//close tag - const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); - let closeTagName = xmlData.substring(i+2,closeIndex).trim(); - if(closeTagName === tagName){ - openTagCount--; - if (openTagCount === 0) { - return { - tagContent: xmlData.substring(startIndex, i), - i : closeIndex - } - } - } - i=closeIndex; - } else if(xmlData[i+1] === '?') { - const closeIndex = findClosingIndex(xmlData, "?>", i+1, "StopNode is not closed.") - i=closeIndex; - } else if(xmlData.substr(i + 1, 3) === '!--') { - const closeIndex = findClosingIndex(xmlData, "-->", i+3, "StopNode is not closed.") - i=closeIndex; - } else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; - i=closeIndex; - } else { - const tagData = readTagExp(xmlData, i, '>') + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial - if (tagData) { - const openTagName = tagData && tagData.tagName; - if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== "/") { - openTagCount++; - } - i=tagData.closeIndex; - } - } - } - }//end for loop + // make the set of regexps etc. + this.make() } -function parseValue(val, shouldParse, options) { - if (shouldParse && typeof val === 'string') { - //console.log(options) - const newval = val.trim(); - if(newval === 'true' ) return true; - else if(newval === 'false' ) return false; - else return toNumber(val, options); - } else { - if (util.isExist(val)) { - return val; - } else { - return ''; - } +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return } -} + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) -module.exports = OrderedObjParser; + this.debug(this.pattern, set) + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) -/***/ }), + this.debug(this.pattern, set) -/***/ 42380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) -const { buildOptions} = __nccwpck_require__(86993); -const OrderedObjParser = __nccwpck_require__(25832); -const { prettify} = __nccwpck_require__(42882); -const validator = __nccwpck_require__(61739); - -class XMLParser{ - - constructor(options){ - this.externalEntities = {}; - this.options = buildOptions(options); - - } - /** - * Parse XML dats to JS object - * @param {string|Buffer} xmlData - * @param {boolean|Object} validationOption - */ - parse(xmlData,validationOption){ - if(typeof xmlData === "string"){ - }else if( xmlData.toString){ - xmlData = xmlData.toString(); - }else{ - throw new Error("XML data is accepted in String or Bytes[] form.") - } - if( validationOption){ - if(validationOption === true) validationOption = {}; //validate with default options - - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` ) - } - } - const orderedObjParser = new OrderedObjParser(this.options); - orderedObjParser.addExternalEntities(this.externalEntities); - const orderedResult = orderedObjParser.parseXml(xmlData); - if(this.options.preserveOrder || orderedResult === undefined) return orderedResult; - else return prettify(orderedResult, this.options); - } + this.debug(this.pattern, set) - /** - * Add Entity which is not by default supported by this library - * @param {string} key - * @param {string} value - */ - addEntity(key, value){ - if(value.indexOf("&") !== -1){ - throw new Error("Entity value can't have '&'") - }else if(key.indexOf("&") !== -1 || key.indexOf(";") !== -1){ - throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '") - }else if(value === "&"){ - throw new Error("An entity with value '&' is not permitted"); - }else{ - this.externalEntities[key] = value; - } - } + this.set = set } -module.exports = XMLParser; - -/***/ }), - -/***/ 42882: -/***/ ((__unused_webpack_module, exports) => { +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 -"use strict"; + if (options.nonegate) return + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } -/** - * - * @param {array} node - * @param {any} options - * @returns - */ -function prettify(node, options){ - return compress( node, options); + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate } -/** - * - * @param {array} arr - * @param {object} options - * @param {string} jPath - * @returns object - */ -function compress(arr, options, jPath){ - let text; - const compressedObj = {}; - for (let i = 0; i < arr.length; i++) { - const tagObj = arr[i]; - const property = propName(tagObj); - let newJpath = ""; - if(jPath === undefined) newJpath = property; - else newJpath = jPath + "." + property; - - if(property === options.textNodeName){ - if(text === undefined) text = tagObj[property]; - else text += "" + tagObj[property]; - }else if(property === undefined){ - continue; - }else if(tagObj[property]){ - - let val = compress(tagObj[property], options, newJpath); - const isLeaf = isLeafTag(val, options); +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} - if(tagObj[":@"]){ - assignAttributes( val, tagObj[":@"], newJpath, options); - }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){ - val = val[options.textNodeName]; - }else if(Object.keys(val).length === 0){ - if(options.alwaysCreateTextNode) val[options.textNodeName] = ""; - else val = ""; - } +Minimatch.prototype.braceExpand = braceExpand - if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) { - if(!Array.isArray(compressedObj[property])) { - compressedObj[property] = [ compressedObj[property] ]; - } - compressedObj[property].push(val); - }else{ - //TODO: if a node is not an array, then check if it should be an array - //also determine if it is a leaf node - if (options.isArray(property, newJpath, isLeaf )) { - compressedObj[property] = [val]; - }else{ - compressedObj[property] = val; - } - } +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} } - } - // if(text && text.length > 0) compressedObj[options.textNodeName] = text; - if(typeof text === "string"){ - if(text.length > 0) compressedObj[options.textNodeName] = text; - }else if(text !== undefined) compressedObj[options.textNodeName] = text; - return compressedObj; -} -function propName(obj){ - const keys = Object.keys(obj); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if(key !== ":@") return key; - } -} + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern -function assignAttributes(obj, attrMap, jpath, options){ - if (attrMap) { - const keys = Object.keys(attrMap); - const len = keys.length; //don't make it inline - for (let i = 0; i < len; i++) { - const atrrName = keys[i]; - if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { - obj[atrrName] = [ attrMap[atrrName] ]; - } else { - obj[atrrName] = attrMap[atrrName]; - } - } + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] } + + return expand(pattern) } -function isLeafTag(obj, options){ - const { textNodeName } = options; - const propCount = Object.keys(obj).length; - - if (propCount === 0) { - return true; +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') } - if ( - propCount === 1 && - (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0) - ) { - return true; + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') } - - return false; } -exports.prettify = prettify; - - -/***/ }), - -/***/ 7462: -/***/ ((module) => { -"use strict"; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + var options = this.options -class XmlNode{ - constructor(tagname) { - this.tagname = tagname; - this.child = []; //nested tags, text, cdata, comments in order - this[":@"] = {}; //attributes map - } - add(key,val){ - // this.child.push( {name : key, val: val, isCdata: isCdata }); - if(key === "__proto__") key = "#__proto__"; - this.child.push( {[key]: val }); + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' } - addChild(node) { - if(node.tagname === "__proto__") node.tagname = "#__proto__"; - if(node[":@"] && Object.keys(node[":@"]).length > 0){ - this.child.push( { [node.tagname]: node.child, [":@"]: node[":@"] }); - }else{ - this.child.push( { [node.tagname]: node.child }); - } - }; -}; - - -module.exports = XmlNode; - -/***/ }), - -/***/ 31133: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (pattern === '') return '' -var debug; + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this -module.exports = function () { - if (!debug) { - try { - /* eslint global-require: off */ - debug = __nccwpck_require__(38237)("follow-redirects"); - } - catch (error) { /* */ } - if (typeof debug !== "function") { - debug = function () { /* */ }; + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false } } - debug.apply(null, arguments); -}; + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) -/***/ }), + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } -/***/ 67707: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } -var url = __nccwpck_require__(57310); -var URL = url.URL; -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var Writable = (__nccwpck_require__(12781).Writable); -var assert = __nccwpck_require__(39491); -var debug = __nccwpck_require__(31133); + case '\\': + clearStateChar() + escaping = true + continue -// Whether to use the native URL object or the legacy url module -var useNativeURL = false; -try { - assert(new URL()); -} -catch (error) { - useNativeURL = error.code === "ERR_INVALID_URL"; -} + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) -// URL fields to preserve in copy operations -var preservedUrlFields = [ - "auth", - "host", - "hostname", - "href", - "path", - "pathname", - "port", - "protocol", - "query", - "search", - "hash", -]; + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } -// Create handlers that pass events from native requests -var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; -var eventHandlers = Object.create(null); -events.forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue -// Error types with codes -var InvalidUrlError = createErrorType( - "ERR_INVALID_URL", - "Invalid URL", - TypeError -); -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "Redirected request failed" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded", - RedirectionError -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); + case '(': + if (inClass) { + re += '(' + continue + } -// istanbul ignore next -var destroy = Writable.prototype.destroy || noop; + if (!stateChar) { + re += '\\(' + continue + } -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - try { - self._processResponse(response); - } - catch (cause) { - self.emit("error", cause instanceof RedirectionError ? - cause : new RedirectionError({ cause: cause })); - } - }; + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } -RedirectableRequest.prototype.abort = function () { - destroyRequest(this._currentRequest); - this._currentRequest.abort(); - this.emit("abort"); -}; + clearStateChar() + re += '|' + continue -RedirectableRequest.prototype.destroy = function (error) { - destroyRequest(this._currentRequest, error); - destroy.call(this, error); - return this; -}; + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } + if (inClass) { + re += '\\' + c + continue + } - // Validate input and shift parameters if necessary - if (!isString(data) && !isBuffer(data)) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } + inClass = true + classStart = i + reClassStart = re.length + re += c + continue - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (isFunction(data)) { - callback = data; - data = encoding = null; - } - else if (isFunction(encoding)) { - callback = encoding; - encoding = null; - } + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; + // finish up the class. + hasMagic = true + inClass = false + re += c + continue -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; + default: + // swallow any state char that wasn't consumed + clearStateChar() -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - var self = this; + re += c - // Destroys the socket on timeout - function destroyOnTimeout(socket) { - socket.setTimeout(msecs); - socket.removeListener("timeout", socket.destroy); - socket.addListener("timeout", socket.destroy); - } + } // switch + } // for - // Sets up a timer to trigger a timeout event - function startTimer(socket) { - if (self._timeout) { - clearTimeout(self._timeout); - } - self._timeout = setTimeout(function () { - self.emit("timeout"); - clearTimer(); - }, msecs); - destroyOnTimeout(socket); + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] } - // Stops a timeout from triggering - function clearTimer() { - // Clear the timeout - if (self._timeout) { - clearTimeout(self._timeout); - self._timeout = null; - } + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } - // Clean up all attached listeners - self.removeListener("abort", clearTimer); - self.removeListener("error", clearTimer); - self.removeListener("response", clearTimer); - self.removeListener("close", clearTimer); - if (callback) { - self.removeListener("timeout", callback); - } - if (!self.socket) { - self._currentRequest.removeListener("socket", startTimer); - } - } + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) - // Attach callback if passed - if (callback) { - this.on("timeout", callback); - } + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type - // Start the timer if or when the socket is opened - if (this.socket) { - startTimer(this.socket); - } - else { - this._currentRequest.once("socket", startTimer); + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail } - // Clean up on events - this.on("socket", destroyOnTimeout); - this.on("abort", clearTimer); - this.on("error", clearTimer); - this.on("response", clearTimer); - this.on("close", clearTimer); + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } - return this; -}; + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } -// Proxy all other public ClientRequest methods -[ - "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } + nlLast += nlAfter - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') } - delete options.host; - } + nlAfter = cleanAfter - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe } -}; - -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - throw new TypeError("Unsupported protocol " + protocol); + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re } - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.slice(0, -1); - this._options.agent = this._options.agents[scheme]; + if (addPatternStart) { + re = patternStart + re } - // Create the native request and set up its event handlers - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - request._redirectable = this; - for (var event of events) { - request.on(event, eventHandlers[event]); + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] } - // RFC7230§5.3.1: When making a request directly to an origin server, […] - // a client MUST send only the absolute path […] as the request-target. - this._currentUrl = /^\//.test(this._options.path) ? - url.format(this._options) : - // When making a request to a proxy, […] - // a client MUST send the target URI in absolute-form […]. - this._options.path; - - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - /* istanbul ignore else */ - if (request === self._currentRequest) { - // Report any write errors - /* istanbul ignore if */ - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - /* istanbul ignore else */ - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } - } - }()); + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) } -}; -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') } - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - - // If the response is not a redirect; return it as-is - var location = response.headers.location; - if (!location || this._options.followRedirects === false || - statusCode < 300 || statusCode >= 400) { - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); + regExp._glob = pattern + regExp._src = re - // Clean up - this._requestBodyBuffers = []; - return; - } + return regExp +} - // The response is a redirect, so abort the current request - destroyRequest(this._currentRequest); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - throw new TooManyRedirectsError(); - } +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp - // Store the request headers if applicable - var requestHeaders; - var beforeRedirect = this._options.beforeRedirect; - if (beforeRedirect) { - requestHeaders = Object.assign({ - // The Host header was set by nativeProtocol.request - Host: response.req.getHeader("host"), - }, this._options.headers); - } + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - var method = this._options.method; - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); + if (!set.length) { + this.regexp = false + return this.regexp } + var options = this.options - // Drop the Host header, as the redirect might lead to a different host - var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' - // If the redirect is relative, carry over the host of the last request - var currentUrlParts = parseUrl(this._currentUrl); - var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : - url.format(Object.assign(currentUrlParts, { host: currentHost })); + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') - // Create the redirected request - var redirectUrl = resolveUrl(location, currentUrl); - debug("redirecting to", redirectUrl.href); - this._isRedirect = true; - spreadUrlObject(redirectUrl, this._options); + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' - // Drop confidential headers when redirecting to a less secure protocol - // or to a different domain that is not a superdomain - if (redirectUrl.protocol !== currentUrlParts.protocol && - redirectUrl.protocol !== "https:" || - redirectUrl.host !== currentHost && - !isSubdomain(redirectUrl.host, currentHost)) { - removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers); - } + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' - // Evaluate the beforeRedirect callback - if (isFunction(beforeRedirect)) { - var responseDetails = { - headers: response.headers, - statusCode: statusCode, - }; - var requestDetails = { - url: currentUrl, - method: method, - headers: requestHeaders, - }; - beforeRedirect(this._options, responseDetails, requestDetails); - this._sanitizeOptions(this._options); + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false } - - // Perform the redirected request - this._performRequest(); -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - function request(input, options, callback) { - // Parse parameters, ensuring that input is an object - if (isURL(input)) { - input = spreadUrlObject(input); - } - else if (isString(input)) { - input = spreadUrlObject(parseUrl(input)); - } - else { - callback = options; - options = validateUrl(input); - input = { protocol: protocol }; - } - if (isFunction(options)) { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - if (!isString(options.host) && !isString(options.hostname)) { - options.hostname = "::1"; - } - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - } - - // Executes a GET request, following redirects - function get(input, options, callback) { - var wrappedRequest = wrappedProtocol.request(input, options, callback); - wrappedRequest.end(); - return wrappedRequest; - } - - // Expose the properties on the wrapped protocol - Object.defineProperties(wrappedProtocol, { - request: { value: request, configurable: true, enumerable: true, writable: true }, - get: { value: get, configurable: true, enumerable: true, writable: true }, - }); - }); - return exports; + return this.regexp } -function noop() { /* empty */ } - -function parseUrl(input) { - var parsed; - /* istanbul ignore else */ - if (useNativeURL) { - parsed = new URL(input); - } - else { - // Ensure the URL is valid and absolute - parsed = validateUrl(url.parse(input)); - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); - } +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) } - return parsed; + return list } -function resolveUrl(relative, base) { - /* istanbul ignore next */ - return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); -} +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' -function validateUrl(input) { - if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { - throw new InvalidUrlError({ input: input.href || input }); - } - if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { - throw new InvalidUrlError({ input: input.href || input }); - } - return input; -} + if (f === '/' && partial) return true -function spreadUrlObject(urlObject, target) { - var spread = target || {}; - for (var key of preservedUrlFields) { - spread[key] = urlObject[key]; - } + var options = this.options - // Fix IPv6 hostname - if (spread.hostname.startsWith("[")) { - spread.hostname = spread.hostname.slice(1, -1); - } - // Ensure port is a number - if (spread.port !== "") { - spread.port = Number(spread.port); + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') } - // Concatenate path - spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; - return spread; -} + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; - } + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break } - return (lastValue === null || typeof lastValue === "undefined") ? - undefined : String(lastValue).trim(); -} -function createErrorType(code, message, baseClass) { - // Create constructor - function CustomError(properties) { - Error.captureStackTrace(this, this.constructor); - Object.assign(this, properties || {}); - this.code = code; - this.message = this.cause ? message + ": " + this.cause.message : message; + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } } - // Attach constructor and set default properties - CustomError.prototype = new (baseClass || Error)(); - Object.defineProperties(CustomError.prototype, { - constructor: { - value: CustomError, - enumerable: false, - }, - name: { - value: "Error [" + code + "]", - enumerable: false, - }, - }); - return CustomError; + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate } -function destroyRequest(request, error) { - for (var event of events) { - request.removeListener(event, eventHandlers[event]); - } - request.on("error", noop); - request.destroy(error); -} +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options -function isSubdomain(subdomain, domain) { - assert(isString(subdomain) && isString(domain)); - var dot = subdomain.length - domain.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); -} + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) -function isString(value) { - return typeof value === "string" || value instanceof String; -} + this.debug('matchOne', file.length, pattern.length) -function isFunction(value) { - return typeof value === "function"; -} + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] -function isBuffer(value) { - return typeof value === "object" && ("length" in value); -} + this.debug(pattern, p, f) -function isURL(value) { - return URL && value instanceof URL; -} + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } -/***/ }), + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] -/***/ 66129: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) -"use strict"; + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } -// Copyright 2018 Google LLC -// 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. -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultErrorRedactor = exports.GaxiosError = exports.GAXIOS_ERROR_SYMBOL = void 0; -const url_1 = __nccwpck_require__(57310); -const util_1 = __nccwpck_require__(21980); -const extend_1 = __importDefault(__nccwpck_require__(38171)); -/** - * Support `instanceof` operator for `GaxiosError`s in different versions of this library. - * - * @see {@link GaxiosError[Symbol.hasInstance]} - */ -exports.GAXIOS_ERROR_SYMBOL = Symbol.for(`${util_1.pkg.name}-gaxios-error`); -/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ -class GaxiosError extends Error { - /** - * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. - * - * @see {@link GAXIOS_ERROR_SYMBOL} - * @see {@link GaxiosError[GAXIOS_ERROR_SYMBOL]} - */ - static [(_a = exports.GAXIOS_ERROR_SYMBOL, Symbol.hasInstance)](instance) { - if (instance && - typeof instance === 'object' && - exports.GAXIOS_ERROR_SYMBOL in instance && - instance[exports.GAXIOS_ERROR_SYMBOL] === util_1.pkg.version) { - return true; + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ } - // fallback to native - return Function.prototype[Symbol.hasInstance].call(GaxiosError, instance); + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false } - constructor(message, config, response, error) { - var _b; - super(message); - this.config = config; - this.response = response; - this.error = error; - /** - * Support `instanceof` operator for `GaxiosError` across builds/duplicated files. - * - * @see {@link GAXIOS_ERROR_SYMBOL} - * @see {@link GaxiosError[Symbol.hasInstance]} - * @see {@link https://github.com/microsoft/TypeScript/issues/13965#issuecomment-278570200} - * @see {@link https://stackoverflow.com/questions/46618852/require-and-instanceof} - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance#reverting_to_default_instanceof_behavior} - */ - this[_a] = util_1.pkg.version; - // deep-copy config as we do not want to mutate - // the existing config for future retries/use - this.config = (0, extend_1.default)(true, {}, config); - if (this.response) { - this.response.config = (0, extend_1.default)(true, {}, this.response.config); - } - if (this.response) { - try { - this.response.data = translateData(this.config.responseType, (_b = this.response) === null || _b === void 0 ? void 0 : _b.data); - } - catch (_c) { - // best effort - don't throw an error within an error - // we could set `this.response.config.responseType = 'unknown'`, but - // that would mutate future calls with this config object. - } - this.status = this.response.status; - } - if (error && 'code' in error && error.code) { - this.code = error.code; - } - if (config.errorRedactor) { - config.errorRedactor({ - config: this.config, - response: this.response, - }); - } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') } -exports.GaxiosError = GaxiosError; -function translateData(responseType, data) { - switch (responseType) { - case 'stream': - return data; - case 'json': - return JSON.parse(JSON.stringify(data)); - case 'arraybuffer': - return JSON.parse(Buffer.from(data).toString('utf8')); - case 'blob': - return JSON.parse(data.text()); - default: - return data; - } + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') } -/** - * An experimental error redactor. - * - * @param config Config to potentially redact properties of - * @param response Config to potentially redact properties of - * - * @experimental - */ -function defaultErrorRedactor(data) { - const REDACT = '< - See `errorRedactor` option in `gaxios` for configuration>.'; - function redactHeaders(headers) { - if (!headers) - return; - for (const key of Object.keys(headers)) { - // any casing of `Authentication` - if (/^authentication$/i.test(key)) { - headers[key] = REDACT; - } - // any casing of `Authorization` - if (/^authorization$/i.test(key)) { - headers[key] = REDACT; - } - // anything containing secret, such as 'client secret' - if (/secret/i.test(key)) { - headers[key] = REDACT; - } - } - } - function redactString(obj, key) { - if (typeof obj === 'object' && - obj !== null && - typeof obj[key] === 'string') { - const text = obj[key]; - if (/grant_type=/i.test(text) || - /assertion=/i.test(text) || - /secret/i.test(text)) { - obj[key] = REDACT; - } - } - } - function redactObject(obj) { - if (typeof obj === 'object' && obj !== null) { - if ('grant_type' in obj) { - obj['grant_type'] = REDACT; - } - if ('assertion' in obj) { - obj['assertion'] = REDACT; - } - if ('client_secret' in obj) { - obj['client_secret'] = REDACT; - } - } - } - if (data.config) { - redactHeaders(data.config.headers); - redactString(data.config, 'data'); - redactObject(data.config.data); - redactString(data.config, 'body'); - redactObject(data.config.body); - try { - const url = new url_1.URL('', data.config.url); - if (url.searchParams.has('token')) { - url.searchParams.set('token', REDACT); - } - if (url.searchParams.has('client_secret')) { - url.searchParams.set('client_secret', REDACT); - } - data.config.url = url.toString(); - } - catch (_b) { - // ignore error - no need to parse an invalid URL - } - } - if (data.response) { - defaultErrorRedactor({ config: data.response.config }); - redactHeaders(data.response.headers); - redactString(data.response, 'data'); - redactObject(data.response.data); - } - return data; + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') } -exports.defaultErrorRedactor = defaultErrorRedactor; -//# sourceMappingURL=common.js.map + /***/ }), -/***/ 28133: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 80900: +/***/ ((module) => { -"use strict"; +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; -// Copyright 2018 Google LLC -// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _Gaxios_instances, _a, _Gaxios_urlMayUseProxy, _Gaxios_applyRequestInterceptors, _Gaxios_applyResponseInterceptors, _Gaxios_prepareRequest, _Gaxios_proxyAgent, _Gaxios_getProxyAgent; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Gaxios = void 0; -const extend_1 = __importDefault(__nccwpck_require__(38171)); -const https_1 = __nccwpck_require__(95687); -const node_fetch_1 = __importDefault(__nccwpck_require__(80467)); -const querystring_1 = __importDefault(__nccwpck_require__(63477)); -const is_stream_1 = __importDefault(__nccwpck_require__(41554)); -const url_1 = __nccwpck_require__(57310); -const common_1 = __nccwpck_require__(66129); -const retry_1 = __nccwpck_require__(31052); -const stream_1 = __nccwpck_require__(12781); -const uuid_1 = __nccwpck_require__(19694); -const interceptor_1 = __nccwpck_require__(14309); -/* eslint-disable @typescript-eslint/no-explicit-any */ -const fetch = hasFetch() ? window.fetch : node_fetch_1.default; -function hasWindow() { - return typeof window !== 'undefined' && !!window; -} -function hasFetch() { - return hasWindow() && !!window.fetch; -} -function hasBuffer() { - return typeof Buffer !== 'undefined'; -} -function hasHeader(options, header) { - return !!getHeader(options, header); -} -function getHeader(options, header) { - header = header.toLowerCase(); - for (const key of Object.keys((options === null || options === void 0 ? void 0 : options.headers) || {})) { - if (header === key.toLowerCase()) { - return options.headers[key]; - } - } - return undefined; -} -class Gaxios { - /** - * The Gaxios class is responsible for making HTTP requests. - * @param defaults The default set of options to be used for this instance. - */ - constructor(defaults) { - _Gaxios_instances.add(this); - this.agentCache = new Map(); - this.defaults = defaults || {}; - this.interceptors = { - request: new interceptor_1.GaxiosInterceptorManager(), - response: new interceptor_1.GaxiosInterceptorManager(), - }; - } - /** - * Perform an HTTP request with the given options. - * @param opts Set of HTTP options that will be used for this HTTP request. - */ - async request(opts = {}) { - opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_prepareRequest).call(this, opts); - opts = await __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyRequestInterceptors).call(this, opts); - return __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_applyResponseInterceptors).call(this, this._request(opts)); - } - async _defaultAdapter(opts) { - const fetchImpl = opts.fetchImplementation || fetch; - const res = (await fetchImpl(opts.url, opts)); - const data = await this.getResponseData(opts, res); - return this.translateResponse(opts, res, data); - } - /** - * Internal, retryable version of the `request` method. - * @param opts Set of HTTP options that will be used for this HTTP request. - */ - async _request(opts = {}) { - var _b; - try { - let translatedResponse; - if (opts.adapter) { - translatedResponse = await opts.adapter(opts, this._defaultAdapter.bind(this)); - } - else { - translatedResponse = await this._defaultAdapter(opts); - } - if (!opts.validateStatus(translatedResponse.status)) { - if (opts.responseType === 'stream') { - let response = ''; - await new Promise(resolve => { - (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('data', chunk => { - response += chunk; - }); - (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on('end', resolve); - }); - translatedResponse.data = response; - } - throw new common_1.GaxiosError(`Request failed with status code ${translatedResponse.status}`, opts, translatedResponse); - } - return translatedResponse; - } - catch (e) { - const err = e instanceof common_1.GaxiosError - ? e - : new common_1.GaxiosError(e.message, opts, undefined, e); - const { shouldRetry, config } = await (0, retry_1.getRetryConfig)(err); - if (shouldRetry && config) { - err.config.retryConfig.currentRetryAttempt = - config.retryConfig.currentRetryAttempt; - // The error's config could be redacted - therefore we only want to - // copy the retry state over to the existing config - opts.retryConfig = (_b = err.config) === null || _b === void 0 ? void 0 : _b.retryConfig; - return this._request(opts); - } - throw err; - } - } - async getResponseData(opts, res) { - switch (opts.responseType) { - case 'stream': - return res.body; - case 'json': { - let data = await res.text(); - try { - data = JSON.parse(data); - } - catch (_b) { - // continue - } - return data; - } - case 'arraybuffer': - return res.arrayBuffer(); - case 'blob': - return res.blob(); - case 'text': - return res.text(); - default: - return this.getResponseDataFromContentType(res); - } - } - /** - * By default, throw for any non-2xx status code - * @param status status code from the HTTP response - */ - validateStatus(status) { - return status >= 200 && status < 300; - } - /** - * Encode a set of key/value pars into a querystring format (?foo=bar&baz=boo) - * @param params key value pars to encode - */ - paramsSerializer(params) { - return querystring_1.default.stringify(params); - } - translateResponse(opts, res, data) { - // headers need to be converted from a map to an obj - const headers = {}; - res.headers.forEach((value, key) => { - headers[key] = value; - }); - return { - config: opts, - data: data, - headers, - status: res.status, - statusText: res.statusText, - // XMLHttpRequestLike - request: { - responseURL: res.url, - }, - }; - } - /** - * Attempts to parse a response by looking at the Content-Type header. - * @param {FetchResponse} response the HTTP response. - * @returns {Promise} a promise that resolves to the response data. - */ - async getResponseDataFromContentType(response) { - let contentType = response.headers.get('Content-Type'); - if (contentType === null) { - // Maintain existing functionality by calling text() - return response.text(); - } - contentType = contentType.toLowerCase(); - if (contentType.includes('application/json')) { - let data = await response.text(); - try { - data = JSON.parse(data); - } - catch (_b) { - // continue - } - return data; - } - else if (contentType.match(/^text\//)) { - return response.text(); - } - else { - // If the content type is something not easily handled, just return the raw data (blob) - return response.blob(); - } - } - /** - * Creates an async generator that yields the pieces of a multipart/related request body. - * This implementation follows the spec: https://www.ietf.org/rfc/rfc2387.txt. However, recursive - * multipart/related requests are not currently supported. - * - * @param {GaxioMultipartOptions[]} multipartOptions the pieces to turn into a multipart/related body. - * @param {string} boundary the boundary string to be placed between each part. - */ - async *getMultipartRequest(multipartOptions, boundary) { - const finale = `--${boundary}--`; - for (const currentPart of multipartOptions) { - const partContentType = currentPart.headers['Content-Type'] || 'application/octet-stream'; - const preamble = `--${boundary}\r\nContent-Type: ${partContentType}\r\n\r\n`; - yield preamble; - if (typeof currentPart.content === 'string') { - yield currentPart.content; - } - else { - yield* currentPart.content; - } - yield '\r\n'; - } - yield finale; - } -} -exports.Gaxios = Gaxios; -_a = Gaxios, _Gaxios_instances = new WeakSet(), _Gaxios_urlMayUseProxy = function _Gaxios_urlMayUseProxy(url, noProxy = []) { - var _b, _c; - const candidate = new url_1.URL(url); - const noProxyList = [...noProxy]; - const noProxyEnvList = ((_c = ((_b = process.env.NO_PROXY) !== null && _b !== void 0 ? _b : process.env.no_proxy)) === null || _c === void 0 ? void 0 : _c.split(',')) || []; - for (const rule of noProxyEnvList) { - noProxyList.push(rule.trim()); - } - for (const rule of noProxyList) { - // Match regex - if (rule instanceof RegExp) { - if (rule.test(candidate.toString())) { - return false; - } - } - // Match URL - else if (rule instanceof url_1.URL) { - if (rule.origin === candidate.origin) { - return false; - } - } - // Match string regex - else if (rule.startsWith('*.') || rule.startsWith('.')) { - const cleanedRule = rule.replace(/^\*\./, '.'); - if (candidate.hostname.endsWith(cleanedRule)) { - return false; - } - } - // Basic string match - else if (rule === candidate.origin || - rule === candidate.hostname || - rule === candidate.href) { - return false; - } - } - return true; -}, _Gaxios_applyRequestInterceptors = /** - * Applies the request interceptors. The request interceptors are applied after the - * call to prepareRequest is completed. + * Parse or format the given `val`. * - * @param {GaxiosOptions} options The current set of options. + * Options: * - * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public */ -async function _Gaxios_applyRequestInterceptors(options) { - let promiseChain = Promise.resolve(options); - for (const interceptor of this.interceptors.request.values()) { - if (interceptor) { - promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); - } - } - return promiseChain; -}, _Gaxios_applyResponseInterceptors = + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + /** - * Applies the response interceptors. The response interceptors are applied after the - * call to request is made. - * - * @param {GaxiosOptions} options The current set of options. + * Parse the given `str` and return milliseconds. * - * @returns {Promise} Promise that resolves to the set of options or response after interceptors are applied. + * @param {String} str + * @return {Number} + * @api private */ -async function _Gaxios_applyResponseInterceptors(response) { - let promiseChain = Promise.resolve(response); - for (const interceptor of this.interceptors.response.values()) { - if (interceptor) { - promiseChain = promiseChain.then(interceptor.resolved, interceptor.rejected); - } - } - return promiseChain; -}, _Gaxios_prepareRequest = + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + /** - * Validates the options, merges them with defaults, and prepare request. + * Short format for `ms`. * - * @param options The original options passed from the client. - * @returns Prepared options, ready to make a request + * @param {Number} ms + * @return {String} + * @api private */ -async function _Gaxios_prepareRequest(options) { - var _b, _c, _d, _e; - const opts = (0, extend_1.default)(true, {}, this.defaults, options); - if (!opts.url) { - throw new Error('URL is required.'); - } - // baseUrl has been deprecated, remove in 2.0 - const baseUrl = opts.baseUrl || opts.baseURL; - if (baseUrl) { - opts.url = baseUrl.toString() + opts.url; - } - opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer; - if (opts.params && Object.keys(opts.params).length > 0) { - let additionalQueryParams = opts.paramsSerializer(opts.params); - if (additionalQueryParams.startsWith('?')) { - additionalQueryParams = additionalQueryParams.slice(1); - } - const prefix = opts.url.toString().includes('?') ? '&' : '?'; - opts.url = opts.url + prefix + additionalQueryParams; - } - if (typeof options.maxContentLength === 'number') { - opts.size = options.maxContentLength; - } - if (typeof options.maxRedirects === 'number') { - opts.follow = options.maxRedirects; - } - opts.headers = opts.headers || {}; - if (opts.multipart === undefined && opts.data) { - const isFormData = typeof FormData === 'undefined' - ? false - : (opts === null || opts === void 0 ? void 0 : opts.data) instanceof FormData; - if (is_stream_1.default.readable(opts.data)) { - opts.body = opts.data; - } - else if (hasBuffer() && Buffer.isBuffer(opts.data)) { - // Do not attempt to JSON.stringify() a Buffer: - opts.body = opts.data; - if (!hasHeader(opts, 'Content-Type')) { - opts.headers['Content-Type'] = 'application/json'; - } - } - else if (typeof opts.data === 'object') { - // If www-form-urlencoded content type has been set, but data is - // provided as an object, serialize the content using querystring: - if (!isFormData) { - if (getHeader(opts, 'content-type') === - 'application/x-www-form-urlencoded') { - opts.body = opts.paramsSerializer(opts.data); - } - else { - // } else if (!(opts.data instanceof FormData)) { - if (!hasHeader(opts, 'Content-Type')) { - opts.headers['Content-Type'] = 'application/json'; - } - opts.body = JSON.stringify(opts.data); - } - } - } - else { - opts.body = opts.data; - } - } - else if (opts.multipart && opts.multipart.length > 0) { - // note: once the minimum version reaches Node 16, - // this can be replaced with randomUUID() function from crypto - // and the dependency on UUID removed - const boundary = (0, uuid_1.v4)(); - opts.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; - const bodyStream = new stream_1.PassThrough(); - opts.body = bodyStream; - (0, stream_1.pipeline)(this.getMultipartRequest(opts.multipart, boundary), bodyStream, () => { }); - } - opts.validateStatus = opts.validateStatus || this.validateStatus; - opts.responseType = opts.responseType || 'unknown'; - if (!opts.headers['Accept'] && opts.responseType === 'json') { - opts.headers['Accept'] = 'application/json'; - } - opts.method = opts.method || 'GET'; - const proxy = opts.proxy || - ((_b = process === null || process === void 0 ? void 0 : process.env) === null || _b === void 0 ? void 0 : _b.HTTPS_PROXY) || - ((_c = process === null || process === void 0 ? void 0 : process.env) === null || _c === void 0 ? void 0 : _c.https_proxy) || - ((_d = process === null || process === void 0 ? void 0 : process.env) === null || _d === void 0 ? void 0 : _d.HTTP_PROXY) || - ((_e = process === null || process === void 0 ? void 0 : process.env) === null || _e === void 0 ? void 0 : _e.http_proxy); - const urlMayUseProxy = __classPrivateFieldGet(this, _Gaxios_instances, "m", _Gaxios_urlMayUseProxy).call(this, opts.url, opts.noProxy); - if (opts.agent) { - // don't do any of the following options - use the user-provided agent. - } - else if (proxy && urlMayUseProxy) { - const HttpsProxyAgent = await __classPrivateFieldGet(_a, _a, "m", _Gaxios_getProxyAgent).call(_a); - if (this.agentCache.has(proxy)) { - opts.agent = this.agentCache.get(proxy); - } - else { - opts.agent = new HttpsProxyAgent(proxy, { - cert: opts.cert, - key: opts.key, - }); - this.agentCache.set(proxy, opts.agent); - } - } - else if (opts.cert && opts.key) { - // Configure client for mTLS - if (this.agentCache.has(opts.key)) { - opts.agent = this.agentCache.get(opts.key); - } - else { - opts.agent = new https_1.Agent({ - cert: opts.cert, - key: opts.key, - }); - this.agentCache.set(opts.key, opts.agent); - } - } - if (typeof opts.errorRedactor !== 'function' && - opts.errorRedactor !== false) { - opts.errorRedactor = common_1.defaultErrorRedactor; - } - return opts; -}, _Gaxios_getProxyAgent = async function _Gaxios_getProxyAgent() { - __classPrivateFieldSet(this, _a, __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent) || (await Promise.resolve().then(() => __importStar(__nccwpck_require__(77219)))).HttpsProxyAgent, "f", _Gaxios_proxyAgent); - return __classPrivateFieldGet(this, _a, "f", _Gaxios_proxyAgent); -}; + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + /** - * A cache for the lazily-loaded proxy agent. + * Long format for `ms`. * - * Should use {@link Gaxios[#getProxyAgent]} to retrieve. + * @param {Number} ms + * @return {String} + * @api private */ -// using `import` to dynamically import the types here -_Gaxios_proxyAgent = { value: void 0 }; -//# sourceMappingURL=gaxios.js.map - -/***/ }), -/***/ 59555: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} -// Copyright 2018 Google LLC -// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.request = exports.instance = exports.Gaxios = exports.GaxiosError = void 0; -const gaxios_1 = __nccwpck_require__(28133); -Object.defineProperty(exports, "Gaxios", ({ enumerable: true, get: function () { return gaxios_1.Gaxios; } })); -var common_1 = __nccwpck_require__(66129); -Object.defineProperty(exports, "GaxiosError", ({ enumerable: true, get: function () { return common_1.GaxiosError; } })); -__exportStar(__nccwpck_require__(14309), exports); -/** - * The default instance used when the `request` method is directly - * invoked. - */ -exports.instance = new gaxios_1.Gaxios(); /** - * Make an HTTP request using the given options. - * @param opts Options for the request + * Pluralization helper. */ -async function request(opts) { - return exports.instance.request(opts); + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); } -exports.request = request; -//# sourceMappingURL=index.js.map + /***/ }), -/***/ 14309: -/***/ ((__unused_webpack_module, exports) => { +/***/ 80467: +/***/ ((module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2024 Google LLC -// 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. + Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GaxiosInterceptorManager = void 0; -/** - * Class to manage collections of GaxiosInterceptors for both requests and responses. - */ -class GaxiosInterceptorManager extends Set { -} -exports.GaxiosInterceptorManager = GaxiosInterceptorManager; -//# sourceMappingURL=interceptor.js.map -/***/ }), +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -/***/ 31052: -/***/ ((__unused_webpack_module, exports) => { +var Stream = _interopDefault(__nccwpck_require__(12781)); +var http = _interopDefault(__nccwpck_require__(13685)); +var Url = _interopDefault(__nccwpck_require__(57310)); +var whatwgUrl = _interopDefault(__nccwpck_require__(28665)); +var https = _interopDefault(__nccwpck_require__(95687)); +var zlib = _interopDefault(__nccwpck_require__(59796)); -"use strict"; +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js -// Copyright 2018 Google LLC -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRetryConfig = void 0; -async function getRetryConfig(err) { - var _a; - let config = getConfig(err); - if (!err || !err.config || (!config && !err.config.retry)) { - return { shouldRetry: false }; - } - config = config || {}; - config.currentRetryAttempt = config.currentRetryAttempt || 0; - config.retry = - config.retry === undefined || config.retry === null ? 3 : config.retry; - config.httpMethodsToRetry = config.httpMethodsToRetry || [ - 'GET', - 'HEAD', - 'PUT', - 'OPTIONS', - 'DELETE', - ]; - config.noResponseRetries = - config.noResponseRetries === undefined || config.noResponseRetries === null - ? 2 - : config.noResponseRetries; - // If this wasn't in the list of status codes where we want - // to automatically retry, return. - const retryRanges = [ - // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes - // 1xx - Retry (Informational, request still processing) - // 2xx - Do not retry (Success) - // 3xx - Do not retry (Redirect) - // 4xx - Do not retry (Client errors) - // 408 - Retry ("Request Timeout") - // 429 - Retry ("Too Many Requests") - // 5xx - Retry (Server errors) - [100, 199], - [408, 408], - [429, 429], - [500, 599], - ]; - config.statusCodesToRetry = config.statusCodesToRetry || retryRanges; - // Put the config back into the err - err.config.retryConfig = config; - // Determine if we should retry the request - const shouldRetryFn = config.shouldRetry || shouldRetryRequest; - if (!(await shouldRetryFn(err))) { - return { shouldRetry: false, config: err.config }; - } - // Calculate time to wait with exponential backoff. - // If this is the first retry, look for a configured retryDelay. - const retryDelay = config.currentRetryAttempt ? 0 : (_a = config.retryDelay) !== null && _a !== void 0 ? _a : 100; - // Formula: retryDelay + ((2^c - 1 / 2) * 1000) - const delay = retryDelay + ((Math.pow(2, config.currentRetryAttempt) - 1) / 2) * 1000; - // We're going to retry! Incremenent the counter. - err.config.retryConfig.currentRetryAttempt += 1; - // Create a promise that invokes the retry after the backOffDelay - const backoff = config.retryBackoff - ? config.retryBackoff(err, delay) - : new Promise(resolve => { - setTimeout(resolve, delay); - }); - // Notify the user if they added an `onRetryAttempt` handler - if (config.onRetryAttempt) { - config.onRetryAttempt(err); - } - // Return the promise in which recalls Gaxios to retry the request - await backoff; - return { shouldRetry: true, config: err.config }; +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } } -exports.getRetryConfig = getRetryConfig; + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + /** - * Determine based on config if we should retry the request. - * @param err The GaxiosError passed to the interceptor. + * fetch-error.js + * + * FetchError interface for operational errors */ -function shouldRetryRequest(err) { - var _a; - const config = getConfig(err); - // node-fetch raises an AbortError if signaled: - // https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal - if (err.name === 'AbortError' || ((_a = err.error) === null || _a === void 0 ? void 0 : _a.name) === 'AbortError') { - return false; - } - // If there's no config, or retries are disabled, return. - if (!config || config.retry === 0) { - return false; - } - // Check if this error has no response (ETIMEDOUT, ENOTFOUND, etc) - if (!err.response && - (config.currentRetryAttempt || 0) >= config.noResponseRetries) { - return false; - } - // Only retry with configured HttpMethods. - if (!err.config.method || - config.httpMethodsToRetry.indexOf(err.config.method.toUpperCase()) < 0) { - return false; - } - // If this wasn't in the list of status codes where we want - // to automatically retry, return. - if (err.response && err.response.status) { - let isInRange = false; - for (const [min, max] of config.statusCodesToRetry) { - const status = err.response.status; - if (status >= min && status <= max) { - isInRange = true; - break; - } - } - if (!isInRange) { - return false; - } - } - // If we are out of retry attempts, return - config.currentRetryAttempt = config.currentRetryAttempt || 0; - if (config.currentRetryAttempt >= config.retry) { - return false; - } - return true; + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); } + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = (__nccwpck_require__(22877).convert); +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + /** - * Acquire the raxConfig object from an GaxiosError if available. - * @param err The Gaxios error with a config object. + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void */ -function getConfig(err) { - if (err && err.config && err.config.retryConfig) { - return err.config.retryConfig; - } - return; +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } } -//# sourceMappingURL=retry.js.map -/***/ }), +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, -/***/ 21980: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + get bodyUsed() { + return this[INTERNALS].disturbed; + }, -"use strict"; + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, -// Copyright 2023 Google LLC -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pkg = void 0; -exports.pkg = __nccwpck_require__(6318); -//# sourceMappingURL=util.js.map + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, -/***/ }), + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; -/***/ 19694: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, -"use strict"; + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; -var _v = _interopRequireDefault(__nccwpck_require__(94625)); + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; -var _v2 = _interopRequireDefault(__nccwpck_require__(93951)); +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); -var _v3 = _interopRequireDefault(__nccwpck_require__(52507)); +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; -var _v4 = _interopRequireDefault(__nccwpck_require__(18457)); +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; -var _nil = _interopRequireDefault(__nccwpck_require__(27298)); + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } -var _version = _interopRequireDefault(__nccwpck_require__(40278)); + this[INTERNALS].disturbed = true; -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } -var _stringify = _interopRequireDefault(__nccwpck_require__(52956)); + let body = this.body; -var _parse = _interopRequireDefault(__nccwpck_require__(55558)); + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // body is blob + if (isBlob(body)) { + body = body.stream(); + } -/***/ }), + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } -/***/ 12484: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } -"use strict"; + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + return new Body.Promise(function (resolve, reject) { + let resTimeout; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } - return _crypto.default.createHash('md5').update(bytes).digest(); + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); } -var _default = md5; -exports["default"] = _default; +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } -/***/ }), + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; -/***/ 53513: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } -"use strict"; + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + // html5 + if (!res && str) { + res = / { + // turn raw buffers into a single utf-8 buffer + return convert(buffer, 'UTF-8', charset).toString(); +} -"use strict"; +/** + * Detect a URLSearchParams object + * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143 + * + * @param Object obj Object to detect by type or brand + * @return String + */ +function isURLSearchParams(obj) { + // Duck-typing as a necessary condition. + if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') { + return false; + } + // Brand-checking and more duck-typing as optional condition. + return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function'; +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; +/** + * Check if `obj` is a W3C `Blob` object (which `File` inherits from) + * @param {*} obj + * @return {boolean} + */ +function isBlob(obj) { + return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); +} -/***/ }), +/** + * Clone body given Res/Req instance + * + * @param Mixed instance Response or Request instance + * @return Mixed + */ +function clone(instance) { + let p1, p2; + let body = instance.body; -/***/ 55558: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // don't allow cloning a used body + if (instance.bodyUsed) { + throw new Error('cannot clone body after it is used'); + } -"use strict"; + // check that body is a stream and not form-data object + // note: we can't clone the form-data object without having it as a dependency + if (body instanceof Stream && typeof body.getBoundary !== 'function') { + // tee instance body + p1 = new PassThrough(); + p2 = new PassThrough(); + body.pipe(p1); + body.pipe(p2); + // set instance body to teed body and return the other teed body + instance[INTERNALS].body = p1; + body = p2; + } + return body; +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +/** + * Performs the operation "extract a `Content-Type` value from |object|" as + * specified in the specification: + * https://fetch.spec.whatwg.org/#concept-bodyinit-extract + * + * This function assumes that instance.body is present. + * + * @param Mixed instance Any options.body input + */ +function extractContentType(body) { + if (body === null) { + // body is null + return null; + } else if (typeof body === 'string') { + // body is string + return 'text/plain;charset=UTF-8'; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + return 'application/x-www-form-urlencoded;charset=UTF-8'; + } else if (isBlob(body)) { + // body is blob + return body.type || null; + } else if (Buffer.isBuffer(body)) { + // body is buffer + return null; + } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + return null; + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + return null; + } else if (typeof body.getBoundary === 'function') { + // detect form data input from form-data module + return `multipart/form-data;boundary=${body.getBoundary()}`; + } else if (body instanceof Stream) { + // body is stream + // can't really do much about this + return null; + } else { + // Body constructor defaults other things to string + return 'text/plain;charset=UTF-8'; + } +} -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); +/** + * The Fetch Standard treats this as if "total bytes" is a property on the body. + * For us, we have to explicitly get it with a function. + * + * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes + * + * @param Body instance Instance of Body + * @return Number? Number of bytes, or null if not possible + */ +function getTotalBytes(instance) { + const body = instance.body; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } + if (body === null) { + // body is null + return 0; + } else if (isBlob(body)) { + return body.size; + } else if (Buffer.isBuffer(body)) { + // body is buffer + return body.length; + } else if (body && typeof body.getLengthSync === 'function') { + // detect form data input from form-data module + if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x + body.hasKnownLength && body.hasKnownLength()) { + // 2.x + return body.getLengthSync(); + } + return null; + } else { + // body is stream + return null; + } +} - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ +/** + * Write a Body to a Node.js WritableStream (e.g. http.Request) object. + * + * @param Body instance Instance of Body + * @return Void + */ +function writeToStream(dest, instance) { + const body = instance.body; - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ + if (body === null) { + // body is null + dest.end(); + } else if (isBlob(body)) { + body.stream().pipe(dest); + } else if (Buffer.isBuffer(body)) { + // body is buffer + dest.write(body); + dest.end(); + } else { + // body is stream + body.pipe(dest); + } +} - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ +// expose Promise +Body.Promise = global.Promise; - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) +/** + * headers.js + * + * Headers class offers convenient helpers + */ - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; +const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; +const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + +function validateName(name) { + name = `${name}`; + if (invalidTokenRegex.test(name) || name === '') { + throw new TypeError(`${name} is not a legal HTTP header name`); + } } -var _default = parse; -exports["default"] = _default; +function validateValue(value) { + value = `${value}`; + if (invalidHeaderCharRegex.test(value)) { + throw new TypeError(`${value} is not a legal HTTP header value`); + } +} -/***/ }), +/** + * Find the key in the map object given a header name. + * + * Returns undefined if not found. + * + * @param String name Header name + * @return String|Undefined + */ +function find(map, name) { + name = name.toLowerCase(); + for (const key in map) { + if (key.toLowerCase() === name) { + return key; + } + } + return undefined; +} -/***/ 23894: -/***/ ((__unused_webpack_module, exports) => { +const MAP = Symbol('map'); +class Headers { + /** + * Headers class + * + * @param Object headers Response headers + * @return Void + */ + constructor() { + let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; -"use strict"; + this[MAP] = Object.create(null); + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } -/***/ }), + return; + } -/***/ 27440: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } -"use strict"; + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + return this[MAP][key].join(', '); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; -let poolPtr = rnds8Pool.length; + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } - poolPtr = 0; - } + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } -/***/ }), + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } -/***/ 45682: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } -"use strict"; + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - return _crypto.default.createHash('sha1').update(bytes).digest(); + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); } -var _default = sha1; -exports["default"] = _default; +const INTERNAL = Symbol('internal'); -/***/ }), +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} -/***/ 52956: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } -"use strict"; + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; + this[INTERNAL].index = index + 1; -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object */ -const byteToHex = []; +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; + return obj; } -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; } -var _default = stringify; -exports["default"] = _default; - -/***/ }), +const INTERNALS$1 = Symbol('Response internals'); -/***/ 94625: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; -"use strict"; +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + Body.call(this, body, opts); -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + const status = opts.status || 200; + const headers = new Headers(opts.headers); -var _rng = _interopRequireDefault(__nccwpck_require__(27440)); + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } -var _stringify = __nccwpck_require__(52956); + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + get url() { + return this[INTERNALS$1].url || ''; + } -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; + get status() { + return this[INTERNALS$1].status; + } -let _clockseq; // Previous uuid creation time + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + get redirected() { + return this[INTERNALS$1].counter > 0; + } -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + get statusText() { + return this[INTERNALS$1].statusText; + } -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 + get headers() { + return this[INTERNALS$1].headers; + } - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } +Body.mixIn(Response.prototype); - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + let parsedURL; - msecs += 12219292800000; // `time_low` + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + const headers = new Headers(init.headers || input.headers || {}); - b[i++] = clockseq & 0xff; // `node` + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; - return buf || (0, _stringify.unsafeStringify)(b); -} + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } -var _default = v1; -exports["default"] = _default; + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; -/***/ }), + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } -/***/ 93951: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + get method() { + return this[INTERNALS$2].method; + } -"use strict"; + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + get headers() { + return this[INTERNALS$2].headers; + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + get redirect() { + return this[INTERNALS$2].redirect; + } -var _v = _interopRequireDefault(__nccwpck_require__(64313)); + get signal() { + return this[INTERNALS$2].signal; + } -var _md = _interopRequireDefault(__nccwpck_require__(12484)); + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +Body.mixIn(Request.prototype); -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); -/***/ }), +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); -/***/ 64313: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); -"use strict"; + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } -var _stringify = __nccwpck_require__(52956); + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } -var _parse = _interopRequireDefault(__nccwpck_require__(55558)); + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } - const bytes = []; + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js - return bytes; + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); } -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; - - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } - - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ - return buf; - } +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) + this.type = 'aborted'; + this.message = message; + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; +const URL$1 = Url.URL || whatwgUrl.URL; - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; -/***/ }), +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; -/***/ 52507: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; -"use strict"; +/** + * isSameProtocol reports whether the two provided URLs use the same protocol. + * + * Both domains must already be in canonical form. + * @param {string|URL} original + * @param {string|URL} destination + */ +const isSameProtocol = function isSameProtocol(destination, original) { + const orig = new URL$1(original).protocol; + const dest = new URL$1(destination).protocol; + return orig === dest; +}; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { -var _native = _interopRequireDefault(__nccwpck_require__(53513)); + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } -var _rng = _interopRequireDefault(__nccwpck_require__(27440)); + Body.Promise = fetch.Promise; -var _stringify = __nccwpck_require__(52956); + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } + let response = null; - options = options || {}; + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + destroyStream(request.body, error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + if (signal && signal.aborted) { + abort(); + return; + } + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + // send request + const req = send(options); + let reqTimeout; - if (buf) { - offset = offset || 0; + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } - return buf; - } + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } - return (0, _stringify.unsafeStringify)(rnds); -} + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); -var _default = v4; -exports["default"] = _default; + if (response && response.body) { + destroyStream(response.body, err); + } -/***/ }), + finalize(); + }); -/***/ 18457: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + fixResponseChunkedTransferBadEnding(req, function (err) { + if (signal && signal.aborted) { + return; + } -"use strict"; + if (response && response.body) { + destroyStream(response.body, err); + } + }); + /* c8 ignore next 18 */ + if (parseInt(process.version.substring(1)) < 14) { + // Before Node.js 14, pipeline() does not fully support async iterators and does not always + // properly handle when the socket close/end events are out of order. + req.on('socket', function (s) { + s.addListener('close', function (hadError) { + // if a data listener is still present we didn't end cleanly + const hasDataListener = s.listenerCount('data') > 0; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // if end happened before close but the socket didn't emit an error, do it now + if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + response.body.emit('error', err); + } + }); + }); + } -var _v = _interopRequireDefault(__nccwpck_require__(64313)); + req.on('response', function (res) { + clearTimeout(reqTimeout); -var _sha = _interopRequireDefault(__nccwpck_require__(45682)); + const headers = createHeadersLenient(res.headers); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } -/***/ }), + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } -/***/ 75559: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } -"use strict"; + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } -var _regex = _interopRequireDefault(__nccwpck_require__(23894)); + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); -var _default = validate; -exports["default"] = _default; + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; -/***/ }), + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); -/***/ 40278: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // HTTP-network fetch step 12.1.1.4: handle content codings -"use strict"; + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } -var _validate = _interopRequireDefault(__nccwpck_require__(75559)); + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + raw.on('end', function () { + // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. + if (!response) { + response = new Response(body, response_options); + resolve(response); + } + }); + return; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); - return parseInt(uuid.slice(14, 15), 16); + writeToStream(req, request); + }); } +function fixResponseChunkedTransferBadEnding(request, errorCallback) { + let socket; -var _default = version; -exports["default"] = _default; - -/***/ }), + request.on('socket', function (s) { + socket = s; + }); -/***/ 51904: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + request.on('response', function (response) { + const headers = response.headers; -"use strict"; + if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { + response.once('close', function (hadError) { + // tests for socket presence, as in some situations the + // the 'socket' event is not triggered for the request + // (happens in deno), avoids `TypeError` + // if a data listener is still present we didn't end cleanly + const hasDataListener = socket && socket.listenerCount('data') > 0; -/** - * Copyright 2022 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.detectGCPResidency = exports.isGoogleComputeEngine = exports.isGoogleComputeEngineMACAddress = exports.isGoogleComputeEngineLinux = exports.isGoogleCloudServerless = exports.GCE_LINUX_BIOS_PATHS = void 0; -const fs_1 = __nccwpck_require__(57147); -const os_1 = __nccwpck_require__(22037); -/** - * Known paths unique to Google Compute Engine Linux instances - */ -exports.GCE_LINUX_BIOS_PATHS = { - BIOS_DATE: '/sys/class/dmi/id/bios_date', - BIOS_VENDOR: '/sys/class/dmi/id/bios_vendor', -}; -const GCE_MAC_ADDRESS_REGEX = /^42:01/; -/** - * Determines if the process is running on a Google Cloud Serverless environment (Cloud Run or Cloud Functions instance). - * - * Uses the: - * - {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. - * - {@link https://cloud.google.com/functions/docs/env-var Cloud Functions environment variables}. - * - * @returns {boolean} `true` if the process is running on GCP serverless, `false` otherwise. - */ -function isGoogleCloudServerless() { - /** - * `CLOUD_RUN_JOB` is used for Cloud Run Jobs - * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. - * - * `FUNCTION_NAME` is used in older Cloud Functions environments: - * - See {@link https://cloud.google.com/functions/docs/env-var Python 3.7 and Go 1.11}. - * - * `K_SERVICE` is used in Cloud Run and newer Cloud Functions environments: - * - See {@link https://cloud.google.com/run/docs/container-contract#env-vars Cloud Run environment variables}. - * - See {@link https://cloud.google.com/functions/docs/env-var Cloud Functions newer runtimes}. - */ - const isGFEnvironment = process.env.CLOUD_RUN_JOB || - process.env.FUNCTION_NAME || - process.env.K_SERVICE; - return !!isGFEnvironment; -} -exports.isGoogleCloudServerless = isGoogleCloudServerless; -/** - * Determines if the process is running on a Linux Google Compute Engine instance. - * - * @returns {boolean} `true` if the process is running on Linux GCE, `false` otherwise. - */ -function isGoogleComputeEngineLinux() { - if ((0, os_1.platform)() !== 'linux') - return false; - try { - // ensure this file exist - (0, fs_1.statSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_DATE); - // ensure this file exist and matches - const biosVendor = (0, fs_1.readFileSync)(exports.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR, 'utf8'); - return /Google/.test(biosVendor); - } - catch (_a) { - return false; - } -} -exports.isGoogleComputeEngineLinux = isGoogleComputeEngineLinux; -/** - * Determines if the process is running on a Google Compute Engine instance with a known - * MAC address. - * - * @returns {boolean} `true` if the process is running on GCE (as determined by MAC address), `false` otherwise. - */ -function isGoogleComputeEngineMACAddress() { - const interfaces = (0, os_1.networkInterfaces)(); - for (const item of Object.values(interfaces)) { - if (!item) - continue; - for (const { mac } of item) { - if (GCE_MAC_ADDRESS_REGEX.test(mac)) { - return true; - } - } - } - return false; -} -exports.isGoogleComputeEngineMACAddress = isGoogleComputeEngineMACAddress; -/** - * Determines if the process is running on a Google Compute Engine instance. - * - * @returns {boolean} `true` if the process is running on GCE, `false` otherwise. - */ -function isGoogleComputeEngine() { - return isGoogleComputeEngineLinux() || isGoogleComputeEngineMACAddress(); -} -exports.isGoogleComputeEngine = isGoogleComputeEngine; -/** - * Determines if the process is running on Google Cloud Platform. - * - * @returns {boolean} `true` if the process is running on GCP, `false` otherwise. - */ -function detectGCPResidency() { - return isGoogleCloudServerless() || isGoogleComputeEngine(); + if (hasDataListener && !hadError) { + const err = new Error('Premature close'); + err.code = 'ERR_STREAM_PREMATURE_CLOSE'; + errorCallback(err); + } + }); + } + }); } -exports.detectGCPResidency = detectGCPResidency; -//# sourceMappingURL=gcp-residency.js.map - -/***/ }), - -/***/ 3563: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; +function destroyStream(stream, err) { + if (stream.destroy) { + stream.destroy(err); + } else { + // node < 8 + stream.emit('error', err); + stream.end(); + } +} /** - * Copyright 2018 Google LLC + * Redirect code matching * - * Distributed under MIT license. - * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT + * @param Number code Status code + * @return Boolean */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.requestTimeout = exports.setGCPResidency = exports.getGCPResidency = exports.gcpResidencyCache = exports.resetIsAvailableCache = exports.isAvailable = exports.bulk = exports.universe = exports.project = exports.instance = exports.METADATA_SERVER_DETECTION = exports.HEADERS = exports.HEADER_VALUE = exports.HEADER_NAME = exports.SECONDARY_HOST_ADDRESS = exports.HOST_ADDRESS = exports.BASE_PATH = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const jsonBigint = __nccwpck_require__(55031); -const gcp_residency_1 = __nccwpck_require__(51904); -exports.BASE_PATH = '/computeMetadata/v1'; -exports.HOST_ADDRESS = 'http://169.254.169.254'; -exports.SECONDARY_HOST_ADDRESS = 'http://metadata.google.internal.'; -exports.HEADER_NAME = 'Metadata-Flavor'; -exports.HEADER_VALUE = 'Google'; -exports.HEADERS = Object.freeze({ [exports.HEADER_NAME]: exports.HEADER_VALUE }); -/** - * Metadata server detection override options. - * - * Available via `process.env.METADATA_SERVER_DETECTION`. - */ -exports.METADATA_SERVER_DETECTION = Object.freeze({ - 'assume-present': "don't try to ping the metadata server, but assume it's present", - none: "don't try to ping the metadata server, but don't try to use it either", - 'bios-only': "treat the result of a BIOS probe as canonical (don't fall back to pinging)", - 'ping-only': 'skip the BIOS probe, and go straight to pinging', -}); -/** - * Returns the base URL while taking into account the GCE_METADATA_HOST - * environment variable if it exists. - * - * @returns The base URL, e.g., http://169.254.169.254/computeMetadata/v1. - */ -function getBaseUrl(baseUrl) { - if (!baseUrl) { - baseUrl = - process.env.GCE_METADATA_IP || - process.env.GCE_METADATA_HOST || - exports.HOST_ADDRESS; - } - // If no scheme is provided default to HTTP: - if (!/^https?:\/\//.test(baseUrl)) { - baseUrl = `http://${baseUrl}`; - } - return new URL(exports.BASE_PATH, baseUrl).href; -} -// Accepts an options object passed from the user to the API. In previous -// versions of the API, it referred to a `Request` or an `Axios` request -// options object. Now it refers to an object with very limited property -// names. This is here to help ensure users don't pass invalid options when -// they upgrade from 0.4 to 0.5 to 0.8. -function validate(options) { - Object.keys(options).forEach(key => { - switch (key) { - case 'params': - case 'property': - case 'headers': - break; - case 'qs': - throw new Error("'qs' is not a valid configuration option. Please use 'params' instead."); - default: - throw new Error(`'${key}' is not a valid configuration option.`); - } - }); -} -async function metadataAccessor(type, options = {}, noResponseRetries = 3, fastFail = false) { - let metadataKey = ''; - let params = {}; - let headers = {}; - if (typeof type === 'object') { - const metadataAccessor = type; - metadataKey = metadataAccessor.metadataKey; - params = metadataAccessor.params || params; - headers = metadataAccessor.headers || headers; - noResponseRetries = metadataAccessor.noResponseRetries || noResponseRetries; - fastFail = metadataAccessor.fastFail || fastFail; - } - else { - metadataKey = type; - } - if (typeof options === 'string') { - metadataKey += `/${options}`; - } - else { - validate(options); - if (options.property) { - metadataKey += `/${options.property}`; - } - headers = options.headers || headers; - params = options.params || params; - } - try { - const requestMethod = fastFail ? fastFailMetadataRequest : gaxios_1.request; - const res = await requestMethod({ - url: `${getBaseUrl()}/${metadataKey}`, - headers: { ...exports.HEADERS, ...headers }, - retryConfig: { noResponseRetries }, - params, - responseType: 'text', - timeout: requestTimeout(), - }); - // NOTE: node.js converts all incoming headers to lower case. - if (res.headers[exports.HEADER_NAME.toLowerCase()] !== exports.HEADER_VALUE) { - throw new Error(`Invalid response from metadata service: incorrect ${exports.HEADER_NAME} header.`); - } - else if (!res.data) { - throw new Error('Invalid response from the metadata service'); - } - if (typeof res.data === 'string') { - try { - return jsonBigint.parse(res.data); - } - catch (_a) { - /* ignore */ - } - } - return res.data; - } - catch (e) { - const err = e; - if (err.response && err.response.status !== 200) { - err.message = `Unsuccessful response status code. ${err.message}`; - } - throw e; - } -} -async function fastFailMetadataRequest(options) { - const secondaryOptions = { - ...options, - url: options.url.replace(getBaseUrl(), getBaseUrl(exports.SECONDARY_HOST_ADDRESS)), - }; - // We race a connection between DNS/IP to metadata server. There are a couple - // reasons for this: - // - // 1. the DNS is slow in some GCP environments; by checking both, we might - // detect the runtime environment signficantly faster. - // 2. we can't just check the IP, which is tarpitted and slow to respond - // on a user's local machine. - // - // Additional logic has been added to make sure that we don't create an - // unhandled rejection in scenarios where a failure happens sometime - // after a success. - // - // Note, however, if a failure happens prior to a success, a rejection should - // occur, this is for folks running locally. - // - let responded = false; - const r1 = (0, gaxios_1.request)(options) - .then(res => { - responded = true; - return res; - }) - .catch(err => { - if (responded) { - return r2; - } - else { - responded = true; - throw err; - } - }); - const r2 = (0, gaxios_1.request)(secondaryOptions) - .then(res => { - responded = true; - return res; - }) - .catch(err => { - if (responded) { - return r1; - } - else { - responded = true; - throw err; - } - }); - return Promise.race([r1, r2]); -} -/** - * Obtain metadata for the current GCE instance. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} - * - * @example - * ``` - * const serviceAccount: {} = await instance('service-accounts/'); - * const serviceAccountEmail: string = await instance('service-accounts/default/email'); - * ``` - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function instance(options) { - return metadataAccessor('instance', options); -} -exports.instance = instance; -/** - * Obtain metadata for the current GCP project. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} - * - * @example - * ``` - * const projectId: string = await project('project-id'); - * const numericProjectId: number = await project('numeric-project-id'); - * ``` - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function project(options) { - return metadataAccessor('project', options); -} -exports.project = project; -/** - * Obtain metadata for the current universe. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} - * - * @example - * ``` - * const universeDomain: string = await universe('universe_domain'); - * ``` - */ -function universe(options) { - return metadataAccessor('universe', options); -} -exports.universe = universe; -/** - * Retrieve metadata items in parallel. - * - * @see {@link https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys} - * - * @example - * ``` - * const data = await bulk([ - * { - * metadataKey: 'instance', - * }, - * { - * metadataKey: 'project/project-id', - * }, - * ] as const); - * - * // data.instance; - * // data['project/project-id']; - * ``` - * - * @param properties The metadata properties to retrieve - * @returns The metadata in `metadatakey:value` format - */ -async function bulk(properties) { - const r = {}; - await Promise.all(properties.map(item => { - return (async () => { - const res = await metadataAccessor(item); - const key = item.metadataKey; - r[key] = res; - })(); - })); - return r; -} -exports.bulk = bulk; -/* - * How many times should we retry detecting GCP environment. - */ -function detectGCPAvailableRetries() { - return process.env.DETECT_GCP_RETRIES - ? Number(process.env.DETECT_GCP_RETRIES) - : 0; -} -let cachedIsAvailableResponse; -/** - * Determine if the metadata server is currently available. - */ -async function isAvailable() { - if (process.env.METADATA_SERVER_DETECTION) { - const value = process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase(); - if (!(value in exports.METADATA_SERVER_DETECTION)) { - throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${value}\`, but it should be \`${Object.keys(exports.METADATA_SERVER_DETECTION).join('`, `')}\`, or unset`); - } - switch (value) { - case 'assume-present': - return true; - case 'none': - return false; - case 'bios-only': - return getGCPResidency(); - case 'ping-only': - // continue, we want to ping the server - } - } - try { - // If a user is instantiating several GCP libraries at the same time, - // this may result in multiple calls to isAvailable(), to detect the - // runtime environment. We use the same promise for each of these calls - // to reduce the network load. - if (cachedIsAvailableResponse === undefined) { - cachedIsAvailableResponse = metadataAccessor('instance', undefined, detectGCPAvailableRetries(), - // If the default HOST_ADDRESS has been overridden, we should not - // make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in - // a non-GCP environment): - !(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST)); - } - await cachedIsAvailableResponse; - return true; - } - catch (e) { - const err = e; - if (process.env.DEBUG_AUTH) { - console.info(err); - } - if (err.type === 'request-timeout') { - // If running in a GCP environment, metadata endpoint should return - // within ms. - return false; - } - if (err.response && err.response.status === 404) { - return false; - } - else { - if (!(err.response && err.response.status === 404) && - // A warning is emitted if we see an unexpected err.code, or err.code - // is not populated: - (!err.code || - ![ - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'ENETUNREACH', - 'ENOENT', - 'ENOTFOUND', - 'ECONNREFUSED', - ].includes(err.code))) { - let code = 'UNKNOWN'; - if (err.code) - code = err.code; - process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning'); - } - // Failure to resolve the metadata service means that it is not available. - return false; - } - } -} -exports.isAvailable = isAvailable; -/** - * reset the memoized isAvailable() lookup. - */ -function resetIsAvailableCache() { - cachedIsAvailableResponse = undefined; -} -exports.resetIsAvailableCache = resetIsAvailableCache; -/** - * A cache for the detected GCP Residency. - */ -exports.gcpResidencyCache = null; -/** - * Detects GCP Residency. - * Caches results to reduce costs for subsequent calls. - * - * @see setGCPResidency for setting - */ -function getGCPResidency() { - if (exports.gcpResidencyCache === null) { - setGCPResidency(); - } - return exports.gcpResidencyCache; -} -exports.getGCPResidency = getGCPResidency; -/** - * Sets the detected GCP Residency. - * Useful for forcing metadata server detection behavior. - * - * Set `null` to autodetect the environment (default behavior). - * @see getGCPResidency for getting - */ -function setGCPResidency(value = null) { - exports.gcpResidencyCache = value !== null ? value : (0, gcp_residency_1.detectGCPResidency)(); -} -exports.setGCPResidency = setGCPResidency; -/** - * Obtain the timeout for requests to the metadata server. - * - * In certain environments and conditions requests can take longer than - * the default timeout to complete. This function will determine the - * appropriate timeout based on the environment. - * - * @returns {number} a request timeout duration in milliseconds. - */ -function requestTimeout() { - return getGCPResidency() ? 0 : 3000; -} -exports.requestTimeout = requestTimeout; -__exportStar(__nccwpck_require__(51904), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 44627: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +// expose Promise +fetch.Promise = global.Promise; -// Copyright 2012 Google LLC -// -// 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. +module.exports = exports = fetch; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AuthClient = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = exports.DEFAULT_UNIVERSE = void 0; -const events_1 = __nccwpck_require__(82361); -const gaxios_1 = __nccwpck_require__(59555); -const transporters_1 = __nccwpck_require__(72649); -const util_1 = __nccwpck_require__(68905); -/** - * The default cloud universe - * - * @see {@link AuthJSONOptions.universe_domain} - */ -exports.DEFAULT_UNIVERSE = 'googleapis.com'; -/** - * The default {@link AuthClientOptions.eagerRefreshThresholdMillis} - */ -exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1000; -class AuthClient extends events_1.EventEmitter { - constructor(opts = {}) { - var _a, _b, _c, _d, _e; - super(); - this.credentials = {}; - this.eagerRefreshThresholdMillis = exports.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS; - this.forceRefreshOnFailure = false; - this.universeDomain = exports.DEFAULT_UNIVERSE; - const options = (0, util_1.originalOrCamelOptions)(opts); - // Shared auth options - this.projectId = (_a = options.get('project_id')) !== null && _a !== void 0 ? _a : null; - this.quotaProjectId = options.get('quota_project_id'); - this.credentials = (_b = options.get('credentials')) !== null && _b !== void 0 ? _b : {}; - this.universeDomain = (_c = options.get('universe_domain')) !== null && _c !== void 0 ? _c : exports.DEFAULT_UNIVERSE; - // Shared client options - this.transporter = (_d = opts.transporter) !== null && _d !== void 0 ? _d : new transporters_1.DefaultTransporter(); - if (opts.transporterOptions) { - this.transporter.defaults = opts.transporterOptions; - } - if (opts.eagerRefreshThresholdMillis) { - this.eagerRefreshThresholdMillis = opts.eagerRefreshThresholdMillis; - } - this.forceRefreshOnFailure = (_e = opts.forceRefreshOnFailure) !== null && _e !== void 0 ? _e : false; - } - /** - * Return the {@link Gaxios `Gaxios`} instance from the {@link AuthClient.transporter}. - * - * @expiremental - */ - get gaxios() { - if (this.transporter instanceof gaxios_1.Gaxios) { - return this.transporter; - } - else if (this.transporter instanceof transporters_1.DefaultTransporter) { - return this.transporter.instance; - } - else if ('instance' in this.transporter && - this.transporter.instance instanceof gaxios_1.Gaxios) { - return this.transporter.instance; - } - return null; - } - /** - * Sets the auth credentials. - */ - setCredentials(credentials) { - this.credentials = credentials; - } - /** - * Append additional headers, e.g., x-goog-user-project, shared across the - * classes inheriting AuthClient. This method should be used by any method - * that overrides getRequestMetadataAsync(), which is a shared helper for - * setting request information in both gRPC and HTTP API calls. - * - * @param headers object to append additional headers to. - */ - addSharedMetadataHeaders(headers) { - // quota_project_id, stored in application_default_credentials.json, is set in - // the x-goog-user-project header, to indicate an alternate account for - // billing and quota: - if (!headers['x-goog-user-project'] && // don't override a value the user sets. - this.quotaProjectId) { - headers['x-goog-user-project'] = this.quotaProjectId; - } - return headers; - } - /** - * Retry config for Auth-related requests. - * - * @remarks - * - * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} - * config as some downstream APIs would prefer if customers explicitly enable retries, - * such as GCS. - */ - static get RETRY_CONFIG() { - return { - retry: true, - retryConfig: { - httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], - }, - }; - } -} -exports.AuthClient = AuthClient; +exports["default"] = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; +exports.AbortError = AbortError; /***/ }), -/***/ 71569: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 1223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var wrappy = __nccwpck_require__(62940) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) -// Copyright 2021 Google LLC -// -// 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. -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _a, _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsClient = void 0; -const awsrequestsigner_1 = __nccwpck_require__(1754); -const baseexternalclient_1 = __nccwpck_require__(40810); -const defaultawssecuritycredentialssupplier_1 = __nccwpck_require__(89799); -const util_1 = __nccwpck_require__(68905); -/** - * AWS external account client. This is used for AWS workloads, where - * AWS STS GetCallerIdentity serialized signed requests are exchanged for - * GCP access token. - */ -class AwsClient extends baseexternalclient_1.BaseExternalAccountClient { - /** - * Instantiates an AwsClient instance using the provided JSON - * object loaded from an external account credentials file. - * An error is thrown if the credential is not a valid AWS credential. - * @param options The external account options object typically loaded - * from the external account JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - super(options, additionalOptions); - const opts = (0, util_1.originalOrCamelOptions)(options); - const credentialSource = opts.get('credential_source'); - const awsSecurityCredentialsSupplier = opts.get('aws_security_credentials_supplier'); - // Validate credential sourcing configuration. - if (!credentialSource && !awsSecurityCredentialsSupplier) { - throw new Error('A credential source or AWS security credentials supplier must be specified.'); - } - if (credentialSource && awsSecurityCredentialsSupplier) { - throw new Error('Only one of credential source or AWS security credentials supplier can be specified.'); - } - if (awsSecurityCredentialsSupplier) { - this.awsSecurityCredentialsSupplier = awsSecurityCredentialsSupplier; - this.regionalCredVerificationUrl = - __classPrivateFieldGet(_a, _a, "f", _AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL); - this.credentialSourceType = 'programmatic'; - } - else { - const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); - this.environmentId = credentialSourceOpts.get('environment_id'); - // This is only required if the AWS region is not available in the - // AWS_REGION or AWS_DEFAULT_REGION environment variables. - const regionUrl = credentialSourceOpts.get('region_url'); - // This is only required if AWS security credentials are not available in - // environment variables. - const securityCredentialsUrl = credentialSourceOpts.get('url'); - const imdsV2SessionTokenUrl = credentialSourceOpts.get('imdsv2_session_token_url'); - this.awsSecurityCredentialsSupplier = - new defaultawssecuritycredentialssupplier_1.DefaultAwsSecurityCredentialsSupplier({ - regionUrl: regionUrl, - securityCredentialsUrl: securityCredentialsUrl, - imdsV2SessionTokenUrl: imdsV2SessionTokenUrl, - }); - this.regionalCredVerificationUrl = credentialSourceOpts.get('regional_cred_verification_url'); - this.credentialSourceType = 'aws'; - // Data validators. - this.validateEnvironmentId(); - } - this.awsRequestSigner = null; - this.region = ''; - } - validateEnvironmentId() { - var _b; - const match = (_b = this.environmentId) === null || _b === void 0 ? void 0 : _b.match(/^(aws)(\d+)$/); - if (!match || !this.regionalCredVerificationUrl) { - throw new Error('No valid AWS "credential_source" provided'); - } - else if (parseInt(match[2], 10) !== 1) { - throw new Error(`aws version "${match[2]}" is not supported in the current build.`); - } - } - /** - * Triggered when an external subject token is needed to be exchanged for a - * GCP access token via GCP STS endpoint. This will call the - * {@link AwsSecurityCredentialsSupplier} to retrieve an AWS region and AWS - * Security Credentials, then use them to create a signed AWS STS request that - * can be exchanged for a GCP access token. - * @return A promise that resolves with the external subject token. - */ - async retrieveSubjectToken() { - // Initialize AWS request signer if not already initialized. - if (!this.awsRequestSigner) { - this.region = await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext); - this.awsRequestSigner = new awsrequestsigner_1.AwsRequestSigner(async () => { - return this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext); - }, this.region); - } - // Generate signed request to AWS STS GetCallerIdentity API. - // Use the required regional endpoint. Otherwise, the request will fail. - const options = await this.awsRequestSigner.getRequestOptions({ - ..._a.RETRY_CONFIG, - url: this.regionalCredVerificationUrl.replace('{region}', this.region), - method: 'POST', - }); - // The GCP STS endpoint expects the headers to be formatted as: - // [ - // {key: 'x-amz-date', value: '...'}, - // {key: 'Authorization', value: '...'}, - // ... - // ] - // And then serialized as: - // encodeURIComponent(JSON.stringify({ - // url: '...', - // method: 'POST', - // headers: [{key: 'x-amz-date', value: '...'}, ...] - // })) - const reformattedHeader = []; - const extendedHeaders = Object.assign({ - // The full, canonical resource name of the workload identity pool - // provider, with or without the HTTPS prefix. - // Including this header as part of the signature is recommended to - // ensure data integrity. - 'x-goog-cloud-target-resource': this.audience, - }, options.headers); - // Reformat header to GCP STS expected format. - for (const key in extendedHeaders) { - reformattedHeader.push({ - key, - value: extendedHeaders[key], - }); - } - // Serialize the reformatted signed request. - return encodeURIComponent(JSON.stringify({ - url: options.url, - method: options.method, - headers: reformattedHeader, - })); - } +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f } -exports.AwsClient = AwsClient; -_a = AwsClient; -_AwsClient_DEFAULT_AWS_REGIONAL_CREDENTIAL_VERIFICATION_URL = { value: 'https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15' }; -/** - * @deprecated AWS client no validates the EC2 metadata address. - **/ -AwsClient.AWS_EC2_METADATA_IPV4_ADDRESS = '169.254.169.254'; -/** - * @deprecated AWS client no validates the EC2 metadata address. - **/ -AwsClient.AWS_EC2_METADATA_IPV6_ADDRESS = 'fd00:ec2::254'; /***/ }), -/***/ 1754: +/***/ 57684: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const Queue = __nccwpck_require__(15185); + +const pLimit = concurrency => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } + + const queue = new Queue(); + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.size > 0) { + queue.dequeue()(); + } + }; + + const run = async (fn, resolve, ...args) => { + activeCount++; + + const result = (async () => fn(...args))(); + + resolve(result); + + try { + await result; + } catch {} + + next(); + }; + + const enqueue = (fn, resolve, ...args) => { + queue.enqueue(run.bind(null, fn, resolve, ...args)); + + (async () => { + // This function needs to wait until the next microtask before comparing + // `activeCount` to `concurrency`, because `activeCount` is updated asynchronously + // when the run function is dequeued and called. The comparison in the if-statement + // needs to happen asynchronously as well to get an up-to-date value for `activeCount`. + await Promise.resolve(); + + if (activeCount < concurrency && queue.size > 0) { + queue.dequeue()(); + } + })(); + }; + + const generator = (fn, ...args) => new Promise(resolve => { + enqueue(fn, resolve, ...args); + }); + + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.size + }, + clearQueue: { + value: () => { + queue.clear(); + } + } + }); + + return generator; +}; + +module.exports = pLimit; + + +/***/ }), + +/***/ 63329: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AwsRequestSigner = void 0; -const crypto_1 = __nccwpck_require__(78043); -/** AWS Signature Version 4 signing algorithm identifier. */ -const AWS_ALGORITHM = 'AWS4-HMAC-SHA256'; + +var parseUrl = (__nccwpck_require__(57310).parse); + +var DEFAULT_PORTS = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443, +}; + +var stringEndsWith = String.prototype.endsWith || function(s) { + return s.length <= this.length && + this.indexOf(s, this.length - s.length) !== -1; +}; + /** - * The termination string for the AWS credential scope value as defined in - * https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html + * @param {string|object} url - The URL, or the result from url.parse. + * @return {string} The URL of the proxy that should handle the request to the + * given URL. If no proxy is set, this will be an empty string. */ -const AWS_REQUEST_TYPE = 'aws4_request'; +function getProxyForUrl(url) { + var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { + return ''; // Don't proxy URLs without a valid scheme or host. + } + + proto = proto.split(':', 1)[0]; + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, ''); + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ''; // Don't proxy URLs that match NO_PROXY. + } + + var proxy = + getEnv('npm_config_' + proto + '_proxy') || + getEnv(proto + '_proxy') || + getEnv('npm_config_proxy') || + getEnv('all_proxy'); + if (proxy && proxy.indexOf('://') === -1) { + // Missing scheme in proxy, default to the requested URL's scheme. + proxy = proto + '://' + proxy; + } + return proxy; +} + /** - * Implements an AWS API request signer based on the AWS Signature Version 4 - * signing process. - * https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html + * Determines whether a given URL should be proxied. + * + * @param {string} hostname - The host name of the URL. + * @param {number} port - The effective port of the URL. + * @returns {boolean} Whether the given URL should be proxied. + * @private */ -class AwsRequestSigner { - /** - * Instantiates an AWS API request signer used to send authenticated signed - * requests to AWS APIs based on the AWS Signature Version 4 signing process. - * This also provides a mechanism to generate the signed request without - * sending it. - * @param getCredentials A mechanism to retrieve AWS security credentials - * when needed. - * @param region The AWS region to use. - */ - constructor(getCredentials, region) { - this.getCredentials = getCredentials; - this.region = region; - this.crypto = (0, crypto_1.createCrypto)(); +function shouldProxy(hostname, port) { + var NO_PROXY = + (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); + if (!NO_PROXY) { + return true; // Always proxy if NO_PROXY is not set. + } + if (NO_PROXY === '*') { + return false; // Never proxy if wildcard is set. + } + + return NO_PROXY.split(/[,\s]/).every(function(proxy) { + if (!proxy) { + return true; // Skip zero-length hosts. } - /** - * Generates the signed request for the provided HTTP request for calling - * an AWS API. This follows the steps described at: - * https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html - * @param amzOptions The AWS request options that need to be signed. - * @return A promise that resolves with the GaxiosOptions containing the - * signed HTTP request parameters. - */ - async getRequestOptions(amzOptions) { - if (!amzOptions.url) { - throw new Error('"url" is required in "amzOptions"'); - } - // Stringify JSON requests. This will be set in the request body of the - // generated signed request. - const requestPayloadData = typeof amzOptions.data === 'object' - ? JSON.stringify(amzOptions.data) - : amzOptions.data; - const url = amzOptions.url; - const method = amzOptions.method || 'GET'; - const requestPayload = amzOptions.body || requestPayloadData; - const additionalAmzHeaders = amzOptions.headers; - const awsSecurityCredentials = await this.getCredentials(); - const uri = new URL(url); - const headerMap = await generateAuthenticationHeaderMap({ - crypto: this.crypto, - host: uri.host, - canonicalUri: uri.pathname, - canonicalQuerystring: uri.search.substr(1), - method, - region: this.region, - securityCredentials: awsSecurityCredentials, - requestPayload, - additionalAmzHeaders, - }); - // Append additional optional headers, eg. X-Amz-Target, Content-Type, etc. - const headers = Object.assign( - // Add x-amz-date if available. - headerMap.amzDate ? { 'x-amz-date': headerMap.amzDate } : {}, { - Authorization: headerMap.authorizationHeader, - host: uri.host, - }, additionalAmzHeaders || {}); - if (awsSecurityCredentials.token) { - Object.assign(headers, { - 'x-amz-security-token': awsSecurityCredentials.token, - }); - } - const awsSignedReq = { - url, - method: method, - headers, - }; - if (typeof requestPayload !== 'undefined') { - awsSignedReq.body = requestPayload; - } - return awsSignedReq; + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; // Skip if ports don't match. + } + + if (!/^[.*]/.test(parsedProxyHostname)) { + // No wildcards, so stop proxying if there is an exact match. + return hostname !== parsedProxyHostname; + } + + if (parsedProxyHostname.charAt(0) === '*') { + // Remove leading wildcard. + parsedProxyHostname = parsedProxyHostname.slice(1); } + // Stop proxying if the hostname ends with the no_proxy host. + return !stringEndsWith.call(hostname, parsedProxyHostname); + }); } -exports.AwsRequestSigner = AwsRequestSigner; + /** - * Creates the HMAC-SHA256 hash of the provided message using the - * provided key. + * Get the value for an environment variable. * - * @param crypto The crypto instance used to facilitate cryptographic - * operations. - * @param key The HMAC-SHA256 key to use. - * @param msg The message to hash. - * @return The computed hash bytes. + * @param {string} key - The name of the environment variable. + * @return {string} The value of the environment variable. + * @private */ -async function sign(crypto, key, msg) { - return await crypto.signWithHmacSha256(key, msg); +function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; } -/** - * Calculates the signing key used to calculate the signature for - * AWS Signature Version 4 based on: - * https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html - * - * @param crypto The crypto instance used to facilitate cryptographic - * operations. - * @param key The AWS secret access key. - * @param dateStamp The '%Y%m%d' date format. - * @param region The AWS region. - * @param serviceName The AWS service name, eg. sts. - * @return The signing key bytes. - */ -async function getSigningKey(crypto, key, dateStamp, region, serviceName) { - const kDate = await sign(crypto, `AWS4${key}`, dateStamp); - const kRegion = await sign(crypto, kDate, region); - const kService = await sign(crypto, kRegion, serviceName); - const kSigning = await sign(crypto, kService, 'aws4_request'); - return kSigning; + +exports.getProxyForUrl = getProxyForUrl; + + +/***/ }), + +/***/ 67214: +/***/ ((module) => { + +"use strict"; + + +const codes = {}; + +function createErrorType(code, message, Base) { + if (!Base) { + Base = Error + } + + function getMessage (arg1, arg2, arg3) { + if (typeof message === 'string') { + return message + } else { + return message(arg1, arg2, arg3) + } + } + + class NodeError extends Base { + constructor (arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + + codes[code] = NodeError; } -/** - * Generates the authentication header map needed for generating the AWS - * Signature Version 4 signed request. - * - * @param option The options needed to compute the authentication header map. - * @return The AWS authentication header map which constitutes of the following - * components: amz-date, authorization header and canonical query string. - */ -async function generateAuthenticationHeaderMap(options) { - const additionalAmzHeaders = options.additionalAmzHeaders || {}; - const requestPayload = options.requestPayload || ''; - // iam.amazonaws.com host => iam service. - // sts.us-east-2.amazonaws.com => sts service. - const serviceName = options.host.split('.')[0]; - const now = new Date(); - // Format: '%Y%m%dT%H%M%SZ'. - const amzDate = now - .toISOString() - .replace(/[-:]/g, '') - .replace(/\.[0-9]+/, ''); - // Format: '%Y%m%d'. - const dateStamp = now.toISOString().replace(/[-]/g, '').replace(/T.*/, ''); - // Change all additional headers to be lower case. - const reformattedAdditionalAmzHeaders = {}; - Object.keys(additionalAmzHeaders).forEach(key => { - reformattedAdditionalAmzHeaders[key.toLowerCase()] = - additionalAmzHeaders[key]; - }); - // Add AWS token if available. - if (options.securityCredentials.token) { - reformattedAdditionalAmzHeaders['x-amz-security-token'] = - options.securityCredentials.token; + +// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js +function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; } - // Header keys need to be sorted alphabetically. - const amzHeaders = Object.assign({ - host: options.host, - }, - // Previously the date was not fixed with x-amz- and could be provided manually. - // https://github.com/boto/botocore/blob/879f8440a4e9ace5d3cf145ce8b3d5e5ffb892ef/tests/unit/auth/aws4_testsuite/get-header-value-trim.req - reformattedAdditionalAmzHeaders.date ? {} : { 'x-amz-date': amzDate }, reformattedAdditionalAmzHeaders); - let canonicalHeaders = ''; - const signedHeadersList = Object.keys(amzHeaders).sort(); - signedHeadersList.forEach(key => { - canonicalHeaders += `${key}:${amzHeaders[key]}\n`; - }); - const signedHeaders = signedHeadersList.join(';'); - const payloadHash = await options.crypto.sha256DigestHex(requestPayload); - // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html - const canonicalRequest = `${options.method}\n` + - `${options.canonicalUri}\n` + - `${options.canonicalQuerystring}\n` + - `${canonicalHeaders}\n` + - `${signedHeaders}\n` + - `${payloadHash}`; - const credentialScope = `${dateStamp}/${options.region}/${serviceName}/${AWS_REQUEST_TYPE}`; - // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html - const stringToSign = `${AWS_ALGORITHM}\n` + - `${amzDate}\n` + - `${credentialScope}\n` + - (await options.crypto.sha256DigestHex(canonicalRequest)); - // https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html - const signingKey = await getSigningKey(options.crypto, options.securityCredentials.secretAccessKey, dateStamp, options.region, serviceName); - const signature = await sign(options.crypto, signingKey, stringToSign); - // https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html - const authorizationHeader = `${AWS_ALGORITHM} Credential=${options.securityCredentials.accessKeyId}/` + - `${credentialScope}, SignedHeaders=${signedHeaders}, ` + - `Signature=${(0, crypto_1.fromArrayBufferToHex)(signature)}`; - return { - // Do not return x-amz-date if date is available. - amzDate: reformattedAdditionalAmzHeaders.date ? undefined : amzDate, - authorizationHeader, - canonicalQuerystring: options.canonicalQuerystring, - }; + } else { + return `of ${thing} ${String(expected)}`; + } +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith +function startsWith(str, search, pos) { + return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith +function endsWith(str, search, this_len) { + if (this_len === undefined || this_len > str.length) { + this_len = str.length; + } + return str.substring(this_len - search.length, this_len) === search; +} + +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes +function includes(str, search, start) { + if (typeof start !== 'number') { + start = 0; + } + + if (start + search.length > str.length) { + return false; + } else { + return str.indexOf(search, start) !== -1; + } } +createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"' +}, TypeError); +createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { + // determiner: 'must be' or 'must not be' + let determiner; + if (typeof expected === 'string' && startsWith(expected, 'not ')) { + determiner = 'must not be'; + expected = expected.replace(/^not /, ''); + } else { + determiner = 'must be'; + } + + let msg; + if (endsWith(name, ' argument')) { + // For cases like 'first argument' + msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; + } else { + const type = includes(name, '.') ? 'property' : 'argument'; + msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; + } + + msg += `. Received type ${typeof actual}`; + return msg; +}, TypeError); +createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); +createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { + return 'The ' + name + ' method is not implemented' +}); +createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); +createErrorType('ERR_STREAM_DESTROYED', function (name) { + return 'Cannot call ' + name + ' after a stream was destroyed'; +}); +createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); +createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); +createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); +createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); +createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { + return 'Unknown encoding: ' + arg +}, TypeError); +createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); + +module.exports.q = codes; + /***/ }), -/***/ 40810: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 41359: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2021 Google LLC +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BaseExternalAccountClient = exports.DEFAULT_UNIVERSE = exports.CLOUD_RESOURCE_MANAGER = exports.EXTERNAL_ACCOUNT_TYPE = exports.EXPIRATION_TIME_OFFSET = void 0; -const stream = __nccwpck_require__(12781); -const authclient_1 = __nccwpck_require__(44627); -const sts = __nccwpck_require__(86308); -const util_1 = __nccwpck_require__(68905); -/** - * The required token exchange grant_type: rfc8693#section-2.1 - */ -const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; -/** - * The requested token exchange requested_token_type: rfc8693#section-2.1 - */ -const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; -/** The default OAuth scope to request when none is provided. */ -const DEFAULT_OAUTH_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; -/** Default impersonated token lifespan in seconds.*/ -const DEFAULT_TOKEN_LIFESPAN = 3600; -/** - * Offset to take into account network delays and server clock skews. - */ -exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; -/** - * The credentials JSON file type for external account clients. - * There are 3 types of JSON configs: - * 1. authorized_user => Google end user credential - * 2. service_account => Google service account credential - * 3. external_Account => non-GCP service (eg. AWS, Azure, K8s) - */ -exports.EXTERNAL_ACCOUNT_TYPE = 'external_account'; -/** - * Cloud resource manager URL used to retrieve project information. - * - * @deprecated use {@link BaseExternalAccountClient.cloudResourceManagerURL} instead - **/ -exports.CLOUD_RESOURCE_MANAGER = 'https://cloudresourcemanager.googleapis.com/v1/projects/'; -/** The workforce audience pattern. */ -const WORKFORCE_AUDIENCE_PATTERN = '//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+'; -const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/token'; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const pkg = __nccwpck_require__(51402); -/** - * For backwards compatibility. - */ -var authclient_2 = __nccwpck_require__(44627); -Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_2.DEFAULT_UNIVERSE; } })); -/** - * Base external account client. This is used to instantiate AuthClients for - * exchanging external account credentials for GCP access token and authorizing - * requests to GCP APIs. - * The base class implements common logic for exchanging various type of - * external credentials for GCP access token. The logic of determining and - * retrieving the external credential based on the environment and - * credential_source will be left for the subclasses. - */ -class BaseExternalAccountClient extends authclient_1.AuthClient { - /** - * Instantiate a BaseExternalAccountClient instance using the provided JSON - * object loaded from an external account credentials file. - * @param options The external account options object typically loaded - * from the external account JSON credential file. The camelCased options - * are aliases for the snake_cased options. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - var _a; - super({ ...options, ...additionalOptions }); - const opts = (0, util_1.originalOrCamelOptions)(options); - const type = opts.get('type'); - if (type && type !== exports.EXTERNAL_ACCOUNT_TYPE) { - throw new Error(`Expected "${exports.EXTERNAL_ACCOUNT_TYPE}" type but ` + - `received "${options.type}"`); - } - const clientId = opts.get('client_id'); - const clientSecret = opts.get('client_secret'); - const tokenUrl = (_a = opts.get('token_url')) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain); - const subjectTokenType = opts.get('subject_token_type'); - const workforcePoolUserProject = opts.get('workforce_pool_user_project'); - const serviceAccountImpersonationUrl = opts.get('service_account_impersonation_url'); - const serviceAccountImpersonation = opts.get('service_account_impersonation'); - const serviceAccountImpersonationLifetime = (0, util_1.originalOrCamelOptions)(serviceAccountImpersonation).get('token_lifetime_seconds'); - this.cloudResourceManagerURL = new URL(opts.get('cloud_resource_manager_url') || - `https://cloudresourcemanager.${this.universeDomain}/v1/projects/`); - if (clientId) { - this.clientAuth = { - confidentialClientType: 'basic', - clientId, - clientSecret, - }; - } - this.stsCredential = new sts.StsCredentials(tokenUrl, this.clientAuth); - this.scopes = opts.get('scopes') || [DEFAULT_OAUTH_SCOPE]; - this.cachedAccessToken = null; - this.audience = opts.get('audience'); - this.subjectTokenType = subjectTokenType; - this.workforcePoolUserProject = workforcePoolUserProject; - const workforceAudiencePattern = new RegExp(WORKFORCE_AUDIENCE_PATTERN); - if (this.workforcePoolUserProject && - !this.audience.match(workforceAudiencePattern)) { - throw new Error('workforcePoolUserProject should not be set for non-workforce pool ' + - 'credentials.'); - } - this.serviceAccountImpersonationUrl = serviceAccountImpersonationUrl; - this.serviceAccountImpersonationLifetime = - serviceAccountImpersonationLifetime; - if (this.serviceAccountImpersonationLifetime) { - this.configLifetimeRequested = true; - } - else { - this.configLifetimeRequested = false; - this.serviceAccountImpersonationLifetime = DEFAULT_TOKEN_LIFESPAN; - } - this.projectNumber = this.getProjectNumber(this.audience); - this.supplierContext = { - audience: this.audience, - subjectTokenType: this.subjectTokenType, - transporter: this.transporter, - }; - } - /** The service account email to be impersonated, if available. */ - getServiceAccountEmail() { - var _a; - if (this.serviceAccountImpersonationUrl) { - if (this.serviceAccountImpersonationUrl.length > 256) { - /** - * Prevents DOS attacks. - * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/84} - **/ - throw new RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`); - } - // Parse email from URL. The formal looks as follows: - // https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/name@project-id.iam.gserviceaccount.com:generateAccessToken - const re = /serviceAccounts\/(?[^:]+):generateAccessToken$/; - const result = re.exec(this.serviceAccountImpersonationUrl); - return ((_a = result === null || result === void 0 ? void 0 : result.groups) === null || _a === void 0 ? void 0 : _a.email) || null; - } - return null; - } - /** - * Provides a mechanism to inject GCP access tokens directly. - * When the provided credential expires, a new credential, using the - * external account options, is retrieved. - * @param credentials The Credentials object to set on the current client. - */ - setCredentials(credentials) { - super.setCredentials(credentials); - this.cachedAccessToken = credentials; - } - /** - * @return A promise that resolves with the current GCP access token - * response. If the current credential is expired, a new one is retrieved. - */ - async getAccessToken() { - // If cached access token is unavailable or expired, force refresh. - if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { - await this.refreshAccessTokenAsync(); - } - // Return GCP access token in GetAccessTokenResponse format. - return { - token: this.cachedAccessToken.access_token, - res: this.cachedAccessToken.res, - }; - } - /** - * The main authentication interface. It takes an optional url which when - * present is the endpoint being accessed, and returns a Promise which - * resolves with authorization header fields. - * - * The result has the form: - * { Authorization: 'Bearer ' } - */ - async getRequestHeaders() { - const accessTokenResponse = await this.getAccessToken(); - const headers = { - Authorization: `Bearer ${accessTokenResponse.token}`, - }; - return this.addSharedMetadataHeaders(headers); - } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); - } - else { - return this.requestAsync(opts); - } - } - /** - * @return A promise that resolves with the project ID corresponding to the - * current workload identity pool or current workforce pool if - * determinable. For workforce pool credential, it returns the project ID - * corresponding to the workforcePoolUserProject. - * This is introduced to match the current pattern of using the Auth - * library: - * const projectId = await auth.getProjectId(); - * const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`; - * const res = await client.request({ url }); - * The resource may not have permission - * (resourcemanager.projects.get) to call this API or the required - * scopes may not be selected: - * https://cloud.google.com/resource-manager/reference/rest/v1/projects/get#authorization-scopes - */ - async getProjectId() { - const projectNumber = this.projectNumber || this.workforcePoolUserProject; - if (this.projectId) { - // Return previously determined project ID. - return this.projectId; - } - else if (projectNumber) { - // Preferable not to use request() to avoid retrial policies. - const headers = await this.getRequestHeaders(); - const response = await this.transporter.request({ - ...BaseExternalAccountClient.RETRY_CONFIG, - headers, - url: `${this.cloudResourceManagerURL.toString()}${projectNumber}`, - responseType: 'json', - }); - this.projectId = response.data.projectId; - return this.projectId; - } - return null; - } - /** - * Authenticates the provided HTTP request, processes it and resolves with the - * returned response. - * @param opts The HTTP request options. - * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. - * @return A promise that resolves with the successful response. - */ - async requestAsync(opts, reAuthRetried = false) { - let response; - try { - const requestHeaders = await this.getRequestHeaders(); - opts.headers = opts.headers || {}; - if (requestHeaders && requestHeaders['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = - requestHeaders['x-goog-user-project']; - } - if (requestHeaders && requestHeaders.Authorization) { - opts.headers.Authorization = requestHeaders.Authorization; - } - response = await this.transporter.request(opts); - } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - forceRefreshOnFailure is true - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - this.forceRefreshOnFailure) { - await this.refreshAccessTokenAsync(); - return await this.requestAsync(opts, true); - } - } - throw e; - } - return response; - } - /** - * Forces token refresh, even if unexpired tokens are currently cached. - * External credentials are exchanged for GCP access tokens via the token - * exchange endpoint and other settings provided in the client options - * object. - * If the service_account_impersonation_url is provided, an additional - * step to exchange the external account GCP access token for a service - * account impersonated token is performed. - * @return A promise that resolves with the fresh GCP access tokens. - */ - async refreshAccessTokenAsync() { - // Retrieve the external credential. - const subjectToken = await this.retrieveSubjectToken(); - // Construct the STS credentials options. - const stsCredentialsOptions = { - grantType: STS_GRANT_TYPE, - audience: this.audience, - requestedTokenType: STS_REQUEST_TOKEN_TYPE, - subjectToken, - subjectTokenType: this.subjectTokenType, - // generateAccessToken requires the provided access token to have - // scopes: - // https://www.googleapis.com/auth/iam or - // https://www.googleapis.com/auth/cloud-platform - // The new service account access token scopes will match the user - // provided ones. - scope: this.serviceAccountImpersonationUrl - ? [DEFAULT_OAUTH_SCOPE] - : this.getScopesArray(), - }; - // Exchange the external credentials for a GCP access token. - // Client auth is prioritized over passing the workforcePoolUserProject - // parameter for STS token exchange. - const additionalOptions = !this.clientAuth && this.workforcePoolUserProject - ? { userProject: this.workforcePoolUserProject } - : undefined; - const additionalHeaders = { - 'x-goog-api-client': this.getMetricsHeaderValue(), - }; - const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, additionalHeaders, additionalOptions); - if (this.serviceAccountImpersonationUrl) { - this.cachedAccessToken = await this.getImpersonatedAccessToken(stsResponse.access_token); - } - else if (stsResponse.expires_in) { - // Save response in cached access token. - this.cachedAccessToken = { - access_token: stsResponse.access_token, - expiry_date: new Date().getTime() + stsResponse.expires_in * 1000, - res: stsResponse.res, - }; - } - else { - // Save response in cached access token. - this.cachedAccessToken = { - access_token: stsResponse.access_token, - res: stsResponse.res, - }; - } - // Save credentials. - this.credentials = {}; - Object.assign(this.credentials, this.cachedAccessToken); - delete this.credentials.res; - // Trigger tokens event to notify external listeners. - this.emit('tokens', { - refresh_token: null, - expiry_date: this.cachedAccessToken.expiry_date, - access_token: this.cachedAccessToken.access_token, - token_type: 'Bearer', - id_token: null, - }); - // Return the cached access token. - return this.cachedAccessToken; - } - /** - * Returns the workload identity pool project number if it is determinable - * from the audience resource name. - * @param audience The STS audience used to determine the project number. - * @return The project number associated with the workload identity pool, if - * this can be determined from the STS audience field. Otherwise, null is - * returned. - */ - getProjectNumber(audience) { - // STS audience pattern: - // //iam.googleapis.com/projects/$PROJECT_NUMBER/locations/... - const match = audience.match(/\/projects\/([^/]+)/); - if (!match) { - return null; - } - return match[1]; - } - /** - * Exchanges an external account GCP access token for a service - * account impersonated access token using iamcredentials - * GenerateAccessToken API. - * @param token The access token to exchange for a service account access - * token. - * @return A promise that resolves with the service account impersonated - * credentials response. - */ - async getImpersonatedAccessToken(token) { - const opts = { - ...BaseExternalAccountClient.RETRY_CONFIG, - url: this.serviceAccountImpersonationUrl, - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: `Bearer ${token}`, - }, - data: { - scope: this.getScopesArray(), - lifetime: this.serviceAccountImpersonationLifetime + 's', - }, - responseType: 'json', - }; - const response = await this.transporter.request(opts); - const successResponse = response.data; - return { - access_token: successResponse.accessToken, - // Convert from ISO format to timestamp. - expiry_date: new Date(successResponse.expireTime).getTime(), - res: response, - }; - } - /** - * Returns whether the provided credentials are expired or not. - * If there is no expiry time, assumes the token is not expired or expiring. - * @param accessToken The credentials to check for expiration. - * @return Whether the credentials are expired or not. - */ - isExpired(accessToken) { - const now = new Date().getTime(); - return accessToken.expiry_date - ? now >= accessToken.expiry_date - this.eagerRefreshThresholdMillis - : false; +// 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + + + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +}; +/**/ + +module.exports = Duplex; +var Readable = __nccwpck_require__(51433); +var Writable = __nccwpck_require__(26993); +__nccwpck_require__(44124)(Duplex, Readable); +{ + // Allow the keys array to be GC'ed. + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + this.allowHalfOpen = true; + if (options) { + if (options.readable === false) this.readable = false; + if (options.writable === false) this.writable = false; + if (options.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once('end', onend); } - /** - * @return The list of scopes for the requested GCP access token. - */ - getScopesArray() { - // Since scopes can be provided as string or array, the type should - // be normalized. - if (typeof this.scopes === 'string') { - return [this.scopes]; - } - return this.scopes || [DEFAULT_OAUTH_SCOPE]; + } +} +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); +Object.defineProperty(Duplex.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +Object.defineProperty(Duplex.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); + +// the no-half-open enforcer +function onend() { + // If the writable side ended, then we're ok. + if (this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(onEndNT, this); +} +function onEndNT(self) { + self.end(); +} +Object.defineProperty(Duplex.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined || this._writableState === undefined) { + return false; } - getMetricsHeaderValue() { - const nodeVersion = process.version.replace(/^v/, ''); - const saImpersonation = this.serviceAccountImpersonationUrl !== undefined; - const credentialSourceType = this.credentialSourceType - ? this.credentialSourceType - : 'unknown'; - return `gl-node/${nodeVersion} auth/${pkg.version} google-byoid-sdk source/${credentialSourceType} sa-impersonation/${saImpersonation} config-lifetime/${this.configLifetimeRequested}`; + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; } -} -exports.BaseExternalAccountClient = BaseExternalAccountClient; + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); /***/ }), -/***/ 96875: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 81542: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2013 Google LLC +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Compute = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const gcpMetadata = __nccwpck_require__(3563); -const oauth2client_1 = __nccwpck_require__(3936); -class Compute extends oauth2client_1.OAuth2Client { - /** - * Google Compute Engine service account credentials. - * - * Retrieve access token from the metadata server. - * See: https://cloud.google.com/compute/docs/access/authenticate-workloads#applications - */ - constructor(options = {}) { - super(options); - // Start with an expired refresh token, which will automatically be - // refreshed before the first API call is made. - this.credentials = { expiry_date: 1, refresh_token: 'compute-placeholder' }; - this.serviceAccountEmail = options.serviceAccountEmail || 'default'; - this.scopes = Array.isArray(options.scopes) - ? options.scopes - : options.scopes - ? [options.scopes] - : []; - } - /** - * Refreshes the access token. - * @param refreshToken Unused parameter - */ - async refreshTokenNoCache( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - refreshToken) { - const tokenPath = `service-accounts/${this.serviceAccountEmail}/token`; - let data; - try { - const instanceOptions = { - property: tokenPath, - }; - if (this.scopes.length > 0) { - instanceOptions.params = { - scopes: this.scopes.join(','), - }; - } - data = await gcpMetadata.instance(instanceOptions); - } - catch (e) { - if (e instanceof gaxios_1.GaxiosError) { - e.message = `Could not refresh access token: ${e.message}`; - this.wrapError(e); - } - throw e; - } - const tokens = data; - if (data && data.expires_in) { - tokens.expiry_date = new Date().getTime() + data.expires_in * 1000; - delete tokens.expires_in; - } - this.emit('tokens', tokens); - return { tokens, res: null }; - } - /** - * Fetches an ID token. - * @param targetAudience the audience for the fetched ID token. - */ - async fetchIdToken(targetAudience) { - const idTokenPath = `service-accounts/${this.serviceAccountEmail}/identity` + - `?format=full&audience=${targetAudience}`; - let idToken; - try { - const instanceOptions = { - property: idTokenPath, - }; - idToken = await gcpMetadata.instance(instanceOptions); - } - catch (e) { - if (e instanceof Error) { - e.message = `Could not fetch ID token: ${e.message}`; - } - throw e; - } - return idToken; - } - wrapError(e) { - const res = e.response; - if (res && res.status) { - e.status = res.status; - if (res.status === 403) { - e.message = - 'A Forbidden error was returned while attempting to retrieve an access ' + - 'token for the Compute Engine built-in service account. This may be because the Compute ' + - 'Engine instance does not have the correct permission scopes specified: ' + - e.message; - } - else if (res.status === 404) { - e.message = - 'A Not Found error was returned while attempting to retrieve an access' + - 'token for the Compute Engine built-in service account. This may be because the Compute ' + - 'Engine instance does not have any permission scopes specified: ' + - e.message; - } - } - } -} -exports.Compute = Compute; +// 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + + +module.exports = PassThrough; +var Transform = __nccwpck_require__(34415); +__nccwpck_require__(44124)(PassThrough, Transform); +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); +} +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; /***/ }), -/***/ 89799: -/***/ (function(__unused_webpack_module, exports) { +/***/ 51433: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2024 Google LLC +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +// 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. + + + +module.exports = Readable; + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = (__nccwpck_require__(82361).EventEmitter); +var EElistenerCount = function EElistenerCount(emitter, type) { + return emitter.listeners(type).length; }; -var _DefaultAwsSecurityCredentialsSupplier_instances, _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DefaultAwsSecurityCredentialsSupplier = void 0; -/** - * Internal AWS security credentials supplier implementation used by {@link AwsClient} - * when a credential source is provided instead of a user defined supplier. - * The logic is summarized as: - * 1. If imdsv2_session_token_url is provided in the credential source, then - * fetch the aws session token and include it in the headers of the - * metadata requests. This is a requirement for IDMSv2 but optional - * for IDMSv1. - * 2. Retrieve AWS region from availability-zone. - * 3a. Check AWS credentials in environment variables. If not found, get - * from security-credentials endpoint. - * 3b. Get AWS credentials from security-credentials endpoint. In order - * to retrieve this, the AWS role needs to be determined by calling - * security-credentials endpoint without any argument. Then the - * credentials can be retrieved via: security-credentials/role_name - * 4. Generate the signed request to AWS STS GetCallerIdentity action. - * 5. Inject x-goog-cloud-target-resource into header and serialize the - * signed request. This will be the subject-token to pass to GCP STS. - */ -class DefaultAwsSecurityCredentialsSupplier { - /** - * Instantiates a new DefaultAwsSecurityCredentialsSupplier using information - * from the credential_source stored in the ADC file. - * @param opts The default aws security credentials supplier options object to - * build the supplier with. - */ - constructor(opts) { - _DefaultAwsSecurityCredentialsSupplier_instances.add(this); - this.regionUrl = opts.regionUrl; - this.securityCredentialsUrl = opts.securityCredentialsUrl; - this.imdsV2SessionTokenUrl = opts.imdsV2SessionTokenUrl; - this.additionalGaxiosOptions = opts.additionalGaxiosOptions; - } - /** - * Returns the active AWS region. This first checks to see if the region - * is available as an environment variable. If it is not, then the supplier - * will call the region URL. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link AwsClient}, contains the requested audience and subject token type - * for the external account identity. - * @return A promise that resolves with the AWS region string. - */ - async getAwsRegion(context) { - // Priority order for region determination: - // AWS_REGION > AWS_DEFAULT_REGION > metadata server. - if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get)) { - return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get); - } - const metadataHeaders = {}; - if (!__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get) && this.imdsV2SessionTokenUrl) { - metadataHeaders['x-aws-ec2-metadata-token'] = - await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); - } - if (!this.regionUrl) { - throw new Error('Unable to determine AWS region due to missing ' + - '"options.credential_source.region_url"'); - } - const opts = { - ...this.additionalGaxiosOptions, - url: this.regionUrl, - method: 'GET', - responseType: 'text', - headers: metadataHeaders, - }; - const response = await context.transporter.request(opts); - // Remove last character. For example, if us-east-2b is returned, - // the region would be us-east-2. - return response.data.substr(0, response.data.length - 1); - } - /** - * Returns AWS security credentials. This first checks to see if the credentials - * is available as environment variables. If it is not, then the supplier - * will call the security credentials URL. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link AwsClient}, contains the requested audience and subject token type - * for the external account identity. - * @return A promise that resolves with the AWS security credentials. - */ - async getAwsSecurityCredentials(context) { - // Check environment variables for permanent credentials first. - // https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html - if (__classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get)) { - return __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "a", _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get); - } - const metadataHeaders = {}; - if (this.imdsV2SessionTokenUrl) { - metadataHeaders['x-aws-ec2-metadata-token'] = - await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken).call(this, context.transporter); - } - // Since the role on a VM can change, we don't need to cache it. - const roleName = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName).call(this, metadataHeaders, context.transporter); - // Temporary credentials typically last for several hours. - // Expiration is returned in response. - // Consider future optimization of this logic to cache AWS tokens - // until their natural expiration. - const awsCreds = await __classPrivateFieldGet(this, _DefaultAwsSecurityCredentialsSupplier_instances, "m", _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials).call(this, roleName, metadataHeaders, context.transporter); - return { - accessKeyId: awsCreds.AccessKeyId, - secretAccessKey: awsCreds.SecretAccessKey, - token: awsCreds.Token, - }; - } +/**/ + +/**/ +var Stream = __nccwpck_require__(62387); +/**/ + +var Buffer = (__nccwpck_require__(14300).Buffer); +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } -exports.DefaultAwsSecurityCredentialsSupplier = DefaultAwsSecurityCredentialsSupplier; -_DefaultAwsSecurityCredentialsSupplier_instances = new WeakSet(), _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken = -/** - * @param transporter The transporter to use for requests. - * @return A promise that resolves with the IMDSv2 Session Token. - */ -async function _DefaultAwsSecurityCredentialsSupplier_getImdsV2SessionToken(transporter) { - const opts = { - ...this.additionalGaxiosOptions, - url: this.imdsV2SessionTokenUrl, - method: 'PUT', - responseType: 'text', - headers: { 'x-aws-ec2-metadata-token-ttl-seconds': '300' }, - }; - const response = await transporter.request(opts); - return response.data; -}, _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName = -/** - * @param headers The headers to be used in the metadata request. - * @param transporter The transporter to use for requests. - * @return A promise that resolves with the assigned role to the current - * AWS VM. This is needed for calling the security-credentials endpoint. - */ -async function _DefaultAwsSecurityCredentialsSupplier_getAwsRoleName(headers, transporter) { - if (!this.securityCredentialsUrl) { - throw new Error('Unable to determine AWS role name due to missing ' + - '"options.credential_source.url"'); - } - const opts = { - ...this.additionalGaxiosOptions, - url: this.securityCredentialsUrl, - method: 'GET', - responseType: 'text', - headers: headers, - }; - const response = await transporter.request(opts); - return response.data; -}, _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials = -/** - * Retrieves the temporary AWS credentials by calling the security-credentials - * endpoint as specified in the `credential_source` object. - * @param roleName The role attached to the current VM. - * @param headers The headers to be used in the metadata request. - * @param transporter The transporter to use for requests. - * @return A promise that resolves with the temporary AWS credentials - * needed for creating the GetCallerIdentity signed request. - */ -async function _DefaultAwsSecurityCredentialsSupplier_retrieveAwsSecurityCredentials(roleName, headers, transporter) { - const response = await transporter.request({ - ...this.additionalGaxiosOptions, - url: `${this.securityCredentialsUrl}/${roleName}`, - responseType: 'json', - headers: headers, - }); - return response.data; -}, _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_regionFromEnv_get() { - // The AWS region can be provided through AWS_REGION or AWS_DEFAULT_REGION. - // Only one is required. - return (process.env['AWS_REGION'] || process.env['AWS_DEFAULT_REGION'] || null); -}, _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get = function _DefaultAwsSecurityCredentialsSupplier_securityCredentialsFromEnv_get() { - // Both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are required. - if (process.env['AWS_ACCESS_KEY_ID'] && - process.env['AWS_SECRET_ACCESS_KEY']) { - return { - accessKeyId: process.env['AWS_ACCESS_KEY_ID'], - secretAccessKey: process.env['AWS_SECRET_ACCESS_KEY'], - token: process.env['AWS_SESSION_TOKEN'], - }; - } - return null; -}; +/**/ +var debugUtil = __nccwpck_require__(73837); +var debug; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function debug() {}; +} +/**/ -/***/ }), +var BufferList = __nccwpck_require__(52746); +var destroyImpl = __nccwpck_require__(97049); +var _require = __nccwpck_require__(39948), + getHighWaterMark = _require.getHighWaterMark; +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; -/***/ 6270: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// Lazy loaded to improve the startup performance. +var StringDecoder; +var createReadableStreamAsyncIterator; +var from; +__nccwpck_require__(44124)(Readable, Stream); +var errorOrDestroy = destroyImpl.errorOrDestroy; +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); -"use strict"; + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} +function ReadableState(options, stream, isDuplex) { + Duplex = Duplex || __nccwpck_require__(41359); + options = options || {}; -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DownscopedClient = exports.EXPIRATION_TIME_OFFSET = exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = void 0; -const stream = __nccwpck_require__(12781); -const authclient_1 = __nccwpck_require__(44627); -const sts = __nccwpck_require__(86308); -/** - * The required token exchange grant_type: rfc8693#section-2.1 - */ -const STS_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:token-exchange'; -/** - * The requested token exchange requested_token_type: rfc8693#section-2.1 - */ -const STS_REQUEST_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; -/** - * The requested token exchange subject_token_type: rfc8693#section-2.1 - */ -const STS_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'; -/** - * The maximum number of access boundary rules a Credential Access Boundary - * can contain. - */ -exports.MAX_ACCESS_BOUNDARY_RULES_COUNT = 10; -/** - * Offset to take into account network delays and server clock skews. - */ -exports.EXPIRATION_TIME_OFFSET = 5 * 60 * 1000; -/** - * Defines a set of Google credentials that are downscoped from an existing set - * of Google OAuth2 credentials. This is useful to restrict the Identity and - * Access Management (IAM) permissions that a short-lived credential can use. - * The common pattern of usage is to have a token broker with elevated access - * generate these downscoped credentials from higher access source credentials - * and pass the downscoped short-lived access tokens to a token consumer via - * some secure authenticated channel for limited access to Google Cloud Storage - * resources. - */ -class DownscopedClient extends authclient_1.AuthClient { - /** - * Instantiates a downscoped client object using the provided source - * AuthClient and credential access boundary rules. - * To downscope permissions of a source AuthClient, a Credential Access - * Boundary that specifies which resources the new credential can access, as - * well as an upper bound on the permissions that are available on each - * resource, has to be defined. A downscoped client can then be instantiated - * using the source AuthClient and the Credential Access Boundary. - * @param authClient The source AuthClient to be downscoped based on the - * provided Credential Access Boundary rules. - * @param credentialAccessBoundary The Credential Access Boundary which - * contains a list of access boundary rules. Each rule contains information - * on the resource that the rule applies to, the upper bound of the - * permissions that are available on that resource and an optional - * condition to further restrict permissions. - * @param additionalOptions **DEPRECATED, set this in the provided `authClient`.** - * Optional additional behavior customization options. - * @param quotaProjectId **DEPRECATED, set this in the provided `authClient`.** - * Optional quota project id for setting up in the x-goog-user-project header. - */ - constructor(authClient, credentialAccessBoundary, additionalOptions, quotaProjectId) { - super({ ...additionalOptions, quotaProjectId }); - this.authClient = authClient; - this.credentialAccessBoundary = credentialAccessBoundary; - // Check 1-10 Access Boundary Rules are defined within Credential Access - // Boundary. - if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length === 0) { - throw new Error('At least one access boundary rule needs to be defined.'); - } - else if (credentialAccessBoundary.accessBoundary.accessBoundaryRules.length > - exports.MAX_ACCESS_BOUNDARY_RULES_COUNT) { - throw new Error('The provided access boundary has more than ' + - `${exports.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`); - } - // Check at least one permission should be defined in each Access Boundary - // Rule. - for (const rule of credentialAccessBoundary.accessBoundary - .accessBoundaryRules) { - if (rule.availablePermissions.length === 0) { - throw new Error('At least one permission should be defined in access boundary rules.'); - } - } - this.stsCredential = new sts.StsCredentials(`https://sts.${this.universeDomain}/v1/token`); - this.cachedDownscopedAccessToken = null; - } - /** - * Provides a mechanism to inject Downscoped access tokens directly. - * The expiry_date field is required to facilitate determination of the token - * expiration which would make it easier for the token consumer to handle. - * @param credentials The Credentials object to set on the current client. - */ - setCredentials(credentials) { - if (!credentials.expiry_date) { - throw new Error('The access token expiry_date field is missing in the provided ' + - 'credentials.'); - } - super.setCredentials(credentials); - this.cachedDownscopedAccessToken = credentials; - } - async getAccessToken() { - // If the cached access token is unavailable or expired, force refresh. - // The Downscoped access token will be returned in - // DownscopedAccessTokenResponse format. - if (!this.cachedDownscopedAccessToken || - this.isExpired(this.cachedDownscopedAccessToken)) { - await this.refreshAccessTokenAsync(); - } - // Return Downscoped access token in DownscopedAccessTokenResponse format. - return { - token: this.cachedDownscopedAccessToken.access_token, - expirationTime: this.cachedDownscopedAccessToken.expiry_date, - res: this.cachedDownscopedAccessToken.res, - }; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + + // Should close be emitted on destroy. Defaults to true. + this.emitClose = options.emitClose !== false; + + // Should .destroy() be called after 'end' (and potentially 'finish') + this.autoDestroy = !!options.autoDestroy; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} +function Readable(options) { + Duplex = Duplex || __nccwpck_require__(41359); + if (!(this instanceof Readable)) return new Readable(options); + + // Checking for a Stream.Duplex instance is faster here instead of inside + // the ReadableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); + + // legacy + this.readable = true; + if (options) { + if (typeof options.read === 'function') this._read = options.read; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + Stream.call(this); +} +Object.defineProperty(Readable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === undefined) { + return false; } - /** - * The main authentication interface. It takes an optional url which when - * present is the endpoint being accessed, and returns a Promise which - * resolves with authorization header fields. - * - * The result has the form: - * { Authorization: 'Bearer ' } - */ - async getRequestHeaders() { - const accessTokenResponse = await this.getAccessToken(); - const headers = { - Authorization: `Bearer ${accessTokenResponse.token}`, - }; - return this.addSharedMetadataHeaders(headers); + return this._readableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); - } - else { - return this.requestAsync(opts); - } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; } - /** - * Authenticates the provided HTTP request, processes it and resolves with the - * returned response. - * @param opts The HTTP request options. - * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure - * @return A promise that resolves with the successful response. - */ - async requestAsync(opts, reAuthRetried = false) { - let response; - try { - const requestHeaders = await this.getRequestHeaders(); - opts.headers = opts.headers || {}; - if (requestHeaders && requestHeaders['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = - requestHeaders['x-goog-user-project']; - } - if (requestHeaders && requestHeaders.Authorization) { - opts.headers.Authorization = requestHeaders.Authorization; - } - response = await this.transporter.request(opts); - } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - forceRefreshOnFailure is true - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - this.forceRefreshOnFailure) { - await this.refreshAccessTokenAsync(); - return await this.requestAsync(opts, true); - } - } - throw e; + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug('readableAddChunk', chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); } - return response; - } - /** - * Forces token refresh, even if unexpired tokens are currently cached. - * GCP access tokens are retrieved from authclient object/source credential. - * Then GCP access tokens are exchanged for downscoped access tokens via the - * token exchange endpoint. - * @return A promise that resolves with the fresh downscoped access token. - */ - async refreshAccessTokenAsync() { - var _a; - // Retrieve GCP access token from source credential. - const subjectToken = (await this.authClient.getAccessToken()).token; - // Construct the STS credentials options. - const stsCredentialsOptions = { - grantType: STS_GRANT_TYPE, - requestedTokenType: STS_REQUEST_TOKEN_TYPE, - subjectToken: subjectToken, - subjectTokenType: STS_SUBJECT_TOKEN_TYPE, - }; - // Exchange the source AuthClient access token for a Downscoped access - // token. - const stsResponse = await this.stsCredential.exchangeToken(stsCredentialsOptions, undefined, this.credentialAccessBoundary); - /** - * The STS endpoint will only return the expiration time for the downscoped - * access token if the original access token represents a service account. - * The downscoped token's expiration time will always match the source - * credential expiration. When no expires_in is returned, we can copy the - * source credential's expiration time. - */ - const sourceCredExpireDate = ((_a = this.authClient.credentials) === null || _a === void 0 ? void 0 : _a.expiry_date) || null; - const expiryDate = stsResponse.expires_in - ? new Date().getTime() + stsResponse.expires_in * 1000 - : sourceCredExpireDate; - // Save response in cached access token. - this.cachedDownscopedAccessToken = { - access_token: stsResponse.access_token, - expiry_date: expiryDate, - res: stsResponse.res, - }; - // Save credentials. - this.credentials = {}; - Object.assign(this.credentials, this.cachedDownscopedAccessToken); - delete this.credentials.res; - // Trigger tokens event to notify external listeners. - this.emit('tokens', { - refresh_token: null, - expiry_date: this.cachedDownscopedAccessToken.expiry_date, - access_token: this.cachedDownscopedAccessToken.access_token, - token_type: 'Bearer', - id_token: null, - }); - // Return the cached access token. - return this.cachedDownscopedAccessToken; - } - /** - * Returns whether the provided credentials are expired or not. - * If there is no expiry time, assumes the token is not expired or expiring. - * @param downscopedAccessToken The credentials to check for expiration. - * @return Whether the credentials are expired or not. - */ - isExpired(downscopedAccessToken) { - const now = new Date().getTime(); - return downscopedAccessToken.expiry_date - ? now >= - downscopedAccessToken.expiry_date - this.eagerRefreshThresholdMillis - : false; + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); } + } + + // We can push more data if we are below the highWaterMark. + // Also, if we have no data yet, we can stand some more bytes. + // This is to work around cases where hwm=0, such as the repl. + return !state.ended && (state.length < state.highWaterMark || state.length === 0); } -exports.DownscopedClient = DownscopedClient; +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit('data', chunk); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); + } + return er; +} +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + // If setEncoding(null), decoder.encoding equals utf8 + this._readableState.encoding = this._readableState.decoder.encoding; -/***/ }), + // Iterate over current buffer to convert already stored Buffers: + var p = this._readableState.buffer.head; + var content = ''; + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + this._readableState.buffer.clear(); + if (content !== '') this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; +}; -/***/ 21380: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// Don't raise the hwm > 1GB +var MAX_HWM = 0x40000000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } -"use strict"; + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; -// Copyright 2018 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEnv = exports.clear = exports.GCPEnv = void 0; -const gcpMetadata = __nccwpck_require__(3563); -var GCPEnv; -(function (GCPEnv) { - GCPEnv["APP_ENGINE"] = "APP_ENGINE"; - GCPEnv["KUBERNETES_ENGINE"] = "KUBERNETES_ENGINE"; - GCPEnv["CLOUD_FUNCTIONS"] = "CLOUD_FUNCTIONS"; - GCPEnv["COMPUTE_ENGINE"] = "COMPUTE_ENGINE"; - GCPEnv["CLOUD_RUN"] = "CLOUD_RUN"; - GCPEnv["NONE"] = "NONE"; -})(GCPEnv || (exports.GCPEnv = GCPEnv = {})); -let envPromise; -function clear() { - envPromise = undefined; -} -exports.clear = clear; -async function getEnv() { - if (envPromise) { - return envPromise; - } - envPromise = getEnvMemoized(); - return envPromise; -} -exports.getEnv = getEnv; -async function getEnvMemoized() { - let env = GCPEnv.NONE; - if (isAppEngine()) { - env = GCPEnv.APP_ENGINE; - } - else if (isCloudFunction()) { - env = GCPEnv.CLOUD_FUNCTIONS; - } - else if (await isComputeEngine()) { - if (await isKubernetesEngine()) { - env = GCPEnv.KUBERNETES_ENGINE; - } - else if (isCloudRun()) { - env = GCPEnv.CLOUD_RUN; - } - else { - env = GCPEnv.COMPUTE_ENGINE; - } + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret !== null) this.emit('data', ret); + return ret; +}; +function onEofChunk(stream, state) { + debug('onEofChunk'); + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; } - else { - env = GCPEnv.NONE; + } + state.ended = true; + if (state.sync) { + // if we are sync, wait until next tick to emit the data. + // Otherwise we risk emitting data in the flow() + // the readable code triggers during a read() call + emitReadable(stream); + } else { + // emit 'readable' now to make sure it gets picked up. + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); } - return env; + } } -function isAppEngine() { - return !!(process.env.GAE_SERVICE || process.env.GAE_MODULE_NAME); + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + debug('emitReadable', state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); + } } -function isCloudFunction() { - return !!(process.env.FUNCTION_NAME || process.env.FUNCTION_TARGET); +function emitReadable_(stream) { + var state = stream._readableState; + debug('emitReadable_', state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { + stream.emit('readable'); + state.emittedReadable = false; + } + + // The stream needs another readable event if + // 1. It is not flowing, as the flow mechanism will take + // care of it. + // 2. It is not ended. + // 3. It is below the highWaterMark, so we can schedule + // another readable later. + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); } -/** - * This check only verifies that the environment is running knative. - * This must be run *after* checking for Kubernetes, otherwise it will - * return a false positive. - */ -function isCloudRun() { - return !!process.env.K_CONFIGURATION; + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } } -async function isKubernetesEngine() { - try { - await gcpMetadata.instance('attributes/cluster-name'); - return true; +function maybeReadMore_(stream, state) { + // Attempt to read more data if we should. + // + // The conditions for reading more data are (one of): + // - Not enough data buffered (state.length < state.highWaterMark). The loop + // is responsible for filling the buffer with enough data if such data + // is available. If highWaterMark is 0 and we are not in the flowing mode + // we should _not_ attempt to buffer any extra data. We'll get more data + // when the stream consumer calls read() instead. + // - No data in the buffer, and the stream is in flowing mode. In this mode + // the loop below is responsible for ensuring read() is called. Failing to + // call read here would abort the flow and there's no other mechanism for + // continuing the flow if the stream consumer has just subscribed to the + // 'data' event. + // + // In addition to the above conditions to keep reading data, the following + // conditions prevent the data from being read: + // - The stream has ended (state.ended). + // - There is already a pending 'read' operation (state.reading). This is a + // case where the the stream has called the implementation defined _read() + // method, but they are processing the call asynchronously and have _not_ + // called push() with new data. In this case we skip performing more + // read()s. The execution ends in this method again after the _read() ends + // up calling push() with more data. + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); +}; +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } } - catch (e) { - return false; + } + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + debug('dest.write', ret); + if (ret === false) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', state.awaitDrain); + state.awaitDrain++; + } + src.pause(); } -} -async function isComputeEngine() { - return gcpMetadata.isAvailable(); -} + } + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); + } -/***/ }), + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); -/***/ 8749: -/***/ ((__unused_webpack_module, exports) => { + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } -"use strict"; + // tell the dest that it's being piped to + dest.emit('pipe', src); -// Copyright 2022 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.InvalidSubjectTokenError = exports.InvalidMessageFieldError = exports.InvalidCodeFieldError = exports.InvalidTokenTypeFieldError = exports.InvalidExpirationTimeFieldError = exports.InvalidSuccessFieldError = exports.InvalidVersionFieldError = exports.ExecutableResponseError = exports.ExecutableResponse = void 0; -const SAML_SUBJECT_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:saml2'; -const OIDC_SUBJECT_TOKEN_TYPE1 = 'urn:ietf:params:oauth:token-type:id_token'; -const OIDC_SUBJECT_TOKEN_TYPE2 = 'urn:ietf:params:oauth:token-type:jwt'; -/** - * Defines the response of a 3rd party executable run by the pluggable auth client. - */ -class ExecutableResponse { - /** - * Instantiates an ExecutableResponse instance using the provided JSON object - * from the output of the executable. - * @param responseJson Response from a 3rd party executable, loaded from a - * run of the executable or a cached output file. - */ - constructor(responseJson) { - // Check that the required fields exist in the json response. - if (!responseJson.version) { - throw new InvalidVersionFieldError("Executable response must contain a 'version' field."); - } - if (responseJson.success === undefined) { - throw new InvalidSuccessFieldError("Executable response must contain a 'success' field."); - } - this.version = responseJson.version; - this.success = responseJson.success; - // Validate required fields for a successful response. - if (this.success) { - this.expirationTime = responseJson.expiration_time; - this.tokenType = responseJson.token_type; - // Validate token type field. - if (this.tokenType !== SAML_SUBJECT_TOKEN_TYPE && - this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE1 && - this.tokenType !== OIDC_SUBJECT_TOKEN_TYPE2) { - throw new InvalidTokenTypeFieldError("Executable response must contain a 'token_type' field when successful " + - `and it must be one of ${OIDC_SUBJECT_TOKEN_TYPE1}, ${OIDC_SUBJECT_TOKEN_TYPE2}, or ${SAML_SUBJECT_TOKEN_TYPE}.`); - } - // Validate subject token. - if (this.tokenType === SAML_SUBJECT_TOKEN_TYPE) { - if (!responseJson.saml_response) { - throw new InvalidSubjectTokenError(`Executable response must contain a 'saml_response' field when token_type=${SAML_SUBJECT_TOKEN_TYPE}.`); - } - this.subjectToken = responseJson.saml_response; - } - else { - if (!responseJson.id_token) { - throw new InvalidSubjectTokenError("Executable response must contain a 'id_token' field when " + - `token_type=${OIDC_SUBJECT_TOKEN_TYPE1} or ${OIDC_SUBJECT_TOKEN_TYPE2}.`); - } - this.subjectToken = responseJson.id_token; - } - } - else { - // Both code and message must be provided for unsuccessful responses. - if (!responseJson.code) { - throw new InvalidCodeFieldError("Executable response must contain a 'code' field when unsuccessful."); - } - if (!responseJson.message) { - throw new InvalidMessageFieldError("Executable response must contain a 'message' field when unsuccessful."); - } - this.errorCode = responseJson.code; - this.errorMessage = responseJson.message; - } - } - /** - * @return A boolean representing if the response has a valid token. Returns - * true when the response was successful and the token is not expired. - */ - isValid() { - return !this.isExpired() && this.success; - } - /** - * @return A boolean representing if the response is expired. Returns true if the - * provided timeout has passed. - */ - isExpired() { - return (this.expirationTime !== undefined && - this.expirationTime < Math.round(Date.now() / 1000)); + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + return dest; +}; +function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); } + }; } -exports.ExecutableResponse = ExecutableResponse; -/** - * An error thrown by the ExecutableResponse class. - */ -class ExecutableResponseError extends Error { - constructor(message) { - super(message); - Object.setPrototypeOf(this, new.target.prototype); +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { + hasUnpiped: false + }); + return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit('unpipe', this, unpipeInfo); + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + var state = this._readableState; + if (ev === 'data') { + // update readableListening so that resume() may be a no-op + // a few lines down. This is needed to support once('readable'). + state.readableListening = this.listenerCount('readable') > 0; + + // Try start flowing on next tick if stream isn't explicitly paused + if (state.flowing !== false) this.resume(); + } else if (ev === 'readable') { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug('on readable', state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); + } } + } + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; +Readable.prototype.removeListener = function (ev, fn) { + var res = Stream.prototype.removeListener.call(this, ev, fn); + if (ev === 'readable') { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +Readable.prototype.removeAllListeners = function (ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === 'readable' || ev === undefined) { + // We need to check if there is someone still listening to + // readable and reset the state. However this needs to happen + // after readable has been emitted but before I/O (nextTick) to + // support once('readable', fn) cycles. This means that calling + // resume within the same tick will have no + // effect. + process.nextTick(updateReadableListening, this); + } + return res; +}; +function updateReadableListening(self) { + var state = self._readableState; + state.readableListening = self.listenerCount('readable') > 0; + if (state.resumeScheduled && !state.paused) { + // flowing needs to be set to true now, otherwise + // the upcoming resume will not flow. + state.flowing = true; + + // crude way to check if we should resume + } else if (self.listenerCount('data') > 0) { + self.resume(); + } } -exports.ExecutableResponseError = ExecutableResponseError; -/** - * An error thrown when the 'version' field in an executable response is missing or invalid. - */ -class InvalidVersionFieldError extends ExecutableResponseError { -} -exports.InvalidVersionFieldError = InvalidVersionFieldError; -/** - * An error thrown when the 'success' field in an executable response is missing or invalid. - */ -class InvalidSuccessFieldError extends ExecutableResponseError { -} -exports.InvalidSuccessFieldError = InvalidSuccessFieldError; -/** - * An error thrown when the 'expiration_time' field in an executable response is missing or invalid. - */ -class InvalidExpirationTimeFieldError extends ExecutableResponseError { -} -exports.InvalidExpirationTimeFieldError = InvalidExpirationTimeFieldError; -/** - * An error thrown when the 'token_type' field in an executable response is missing or invalid. - */ -class InvalidTokenTypeFieldError extends ExecutableResponseError { +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); } -exports.InvalidTokenTypeFieldError = InvalidTokenTypeFieldError; -/** - * An error thrown when the 'code' field in an executable response is missing or invalid. - */ -class InvalidCodeFieldError extends ExecutableResponseError { + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + // we flow only if there is no one listening + // for readable, but we still have to call + // resume() + state.flowing = !state.readableListening; + resume(this, state); + } + state.paused = false; + return this; +}; +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } } -exports.InvalidCodeFieldError = InvalidCodeFieldError; -/** - * An error thrown when the 'message' field in an executable response is missing or invalid. - */ -class InvalidMessageFieldError extends ExecutableResponseError { +function resume_(stream, state) { + debug('resume', state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); } -exports.InvalidMessageFieldError = InvalidMessageFieldError; -/** - * An error thrown when the subject token in an executable response is missing or invalid. - */ -class InvalidSubjectTokenError extends ExecutableResponseError { +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + this._readableState.paused = true; + return this; +}; +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null); } -exports.InvalidSubjectTokenError = InvalidSubjectTokenError; +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + _this.push(null); + }); + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); -/***/ }), + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); -/***/ 38765: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } -"use strict"; + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } -// Copyright 2023 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExternalAccountAuthorizedUserClient = exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = void 0; -const authclient_1 = __nccwpck_require__(44627); -const oauth2common_1 = __nccwpck_require__(19510); -const gaxios_1 = __nccwpck_require__(59555); -const stream = __nccwpck_require__(12781); -const baseexternalclient_1 = __nccwpck_require__(40810); -/** - * The credentials JSON file type for external account authorized user clients. - */ -exports.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE = 'external_account_authorized_user'; -const DEFAULT_TOKEN_URL = 'https://sts.{universeDomain}/v1/oauthtoken'; -/** - * Handler for token refresh requests sent to the token_url endpoint for external - * authorized user credentials. - */ -class ExternalAccountAuthorizedUserHandler extends oauth2common_1.OAuthClientAuthHandler { - /** - * Initializes an ExternalAccountAuthorizedUserHandler instance. - * @param url The URL of the token refresh endpoint. - * @param transporter The transporter to use for the refresh request. - * @param clientAuthentication The client authentication credentials to use - * for the refresh request. - */ - constructor(url, transporter, clientAuthentication) { - super(clientAuthentication); - this.url = url; - this.transporter = transporter; + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); } - /** - * Requests a new access token from the token_url endpoint using the provided - * refresh token. - * @param refreshToken The refresh token to use to generate a new access token. - * @param additionalHeaders Optional additional headers to pass along the - * request. - * @return A promise that resolves with the token refresh response containing - * the requested access token and its expiration time. - */ - async refreshToken(refreshToken, additionalHeaders) { - const values = new URLSearchParams({ - grant_type: 'refresh_token', - refresh_token: refreshToken, - }); - const headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - ...additionalHeaders, - }; - const opts = { - ...ExternalAccountAuthorizedUserHandler.RETRY_CONFIG, - url: this.url, - method: 'POST', - headers, - data: values.toString(), - responseType: 'json', - }; - // Apply OAuth client authentication. - this.applyClientAuthenticationOptions(opts); - try { - const response = await this.transporter.request(opts); - // Successful response. - const tokenRefreshResponse = response.data; - tokenRefreshResponse.res = response; - return tokenRefreshResponse; - } - catch (error) { - // Translate error to OAuthError. - if (error instanceof gaxios_1.GaxiosError && error.response) { - throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, - // Preserve other fields from the original error. - error); - } - // Request could fail before the server responds. - throw error; - } + }; + return this; +}; +if (typeof Symbol === 'function') { + Readable.prototype[Symbol.asyncIterator] = function () { + if (createReadableStreamAsyncIterator === undefined) { + createReadableStreamAsyncIterator = __nccwpck_require__(43306); } + return createReadableStreamAsyncIterator(this); + }; } -/** - * External Account Authorized User Client. This is used for OAuth2 credentials - * sourced using external identities through Workforce Identity Federation. - * Obtaining the initial access and refresh token can be done through the - * Google Cloud CLI. - */ -class ExternalAccountAuthorizedUserClient extends authclient_1.AuthClient { - /** - * Instantiates an ExternalAccountAuthorizedUserClient instances using the - * provided JSON object loaded from a credentials files. - * An error is throws if the credential is not valid. - * @param options The external account authorized user option object typically - * from the external accoutn authorized user JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - var _a; - super({ ...options, ...additionalOptions }); - if (options.universe_domain) { - this.universeDomain = options.universe_domain; - } - this.refreshToken = options.refresh_token; - const clientAuth = { - confidentialClientType: 'basic', - clientId: options.client_id, - clientSecret: options.client_secret, - }; - this.externalAccountAuthorizedUserHandler = - new ExternalAccountAuthorizedUserHandler((_a = options.token_url) !== null && _a !== void 0 ? _a : DEFAULT_TOKEN_URL.replace('{universeDomain}', this.universeDomain), this.transporter, clientAuth); - this.cachedAccessToken = null; - this.quotaProjectId = options.quota_project_id; - // As threshold could be zero, - // eagerRefreshThresholdMillis || EXPIRATION_TIME_OFFSET will override the - // zero value. - if (typeof (additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.eagerRefreshThresholdMillis) !== 'number') { - this.eagerRefreshThresholdMillis = baseexternalclient_1.EXPIRATION_TIME_OFFSET; - } - else { - this.eagerRefreshThresholdMillis = additionalOptions - .eagerRefreshThresholdMillis; - } - this.forceRefreshOnFailure = !!(additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.forceRefreshOnFailure); - } - async getAccessToken() { - // If cached access token is unavailable or expired, force refresh. - if (!this.cachedAccessToken || this.isExpired(this.cachedAccessToken)) { - await this.refreshAccessTokenAsync(); - } - // Return GCP access token in GetAccessTokenResponse format. - return { - token: this.cachedAccessToken.access_token, - res: this.cachedAccessToken.res, - }; - } - async getRequestHeaders() { - const accessTokenResponse = await this.getAccessToken(); - const headers = { - Authorization: `Bearer ${accessTokenResponse.token}`, - }; - return this.addSharedMetadataHeaders(headers); - } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); - } - else { - return this.requestAsync(opts); - } - } - /** - * Authenticates the provided HTTP request, processes it and resolves with the - * returned response. - * @param opts The HTTP request options. - * @param reAuthRetried Whether the current attempt is a retry after a failed attempt due to an auth failure. - * @return A promise that resolves with the successful response. - */ - async requestAsync(opts, reAuthRetried = false) { - let response; - try { - const requestHeaders = await this.getRequestHeaders(); - opts.headers = opts.headers || {}; - if (requestHeaders && requestHeaders['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = - requestHeaders['x-goog-user-project']; - } - if (requestHeaders && requestHeaders.Authorization) { - opts.headers.Authorization = requestHeaders.Authorization; - } - response = await this.transporter.request(opts); - } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - forceRefreshOnFailure is true - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - this.forceRefreshOnFailure) { - await this.refreshAccessTokenAsync(); - return await this.requestAsync(opts, true); - } - } - throw e; - } - return response; +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } +}); +Object.defineProperty(Readable.prototype, 'readableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } +}); +Object.defineProperty(Readable.prototype, 'readableFlowing', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set(state) { + if (this._readableState) { + this._readableState.flowing = state; } - /** - * Forces token refresh, even if unexpired tokens are currently cached. - * @return A promise that resolves with the refreshed credential. - */ - async refreshAccessTokenAsync() { - // Refresh the access token using the refresh token. - const refreshResponse = await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken); - this.cachedAccessToken = { - access_token: refreshResponse.access_token, - expiry_date: new Date().getTime() + refreshResponse.expires_in * 1000, - res: refreshResponse.res, - }; - if (refreshResponse.refresh_token !== undefined) { - this.refreshToken = refreshResponse.refresh_token; - } - return this.cachedAccessToken; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; +Object.defineProperty(Readable.prototype, 'readableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.length; + } +}); + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = state.buffer.consume(n, state.decoder); + } + return ret; +} +function endReadable(stream) { + var state = stream._readableState; + debug('endReadable', state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } +} +function endReadableNT(state, stream) { + debug('endReadableNT', state.endEmitted, state.length); + + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the writable side is ready for autoDestroy as well + var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } } - /** - * Returns whether the provided credentials are expired or not. - * If there is no expiry time, assumes the token is not expired or expiring. - * @param credentials The credentials to check for expiration. - * @return Whether the credentials are expired or not. - */ - isExpired(credentials) { - const now = new Date().getTime(); - return credentials.expiry_date - ? now >= credentials.expiry_date - this.eagerRefreshThresholdMillis - : false; + } +} +if (typeof Symbol === 'function') { + Readable.from = function (iterable, opts) { + if (from === undefined) { + from = __nccwpck_require__(39082); } + return from(Readable, iterable, opts); + }; +} +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; } -exports.ExternalAccountAuthorizedUserClient = ExternalAccountAuthorizedUserClient; - /***/ }), -/***/ 94381: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 34415: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. -// Copyright 2021 Google LLC +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) // -// 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 +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. // -// http://www.apache.org/licenses/LICENSE-2.0 +// Here's how this works: // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExternalAccountClient = void 0; -const baseexternalclient_1 = __nccwpck_require__(40810); -const identitypoolclient_1 = __nccwpck_require__(20117); -const awsclient_1 = __nccwpck_require__(71569); -const pluggable_auth_client_1 = __nccwpck_require__(44782); -/** - * Dummy class with no constructor. Developers are expected to use fromJSON. - */ -class ExternalAccountClient { - constructor() { - throw new Error('ExternalAccountClients should be initialized via: ' + - 'ExternalAccountClient.fromJSON(), ' + - 'directly via explicit constructors, eg. ' + - 'new AwsClient(options), new IdentityPoolClient(options), new' + - 'PluggableAuthClientOptions, or via ' + - 'new GoogleAuth(options).getClient()'); - } - /** - * This static method will instantiate the - * corresponding type of external account credential depending on the - * underlying credential source. - * @param options The external account options object typically loaded - * from the external account JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - * @return A BaseExternalAccountClient instance or null if the options - * provided do not correspond to an external account credential. - */ - static fromJSON(options, additionalOptions) { - var _a, _b; - if (options && options.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { - if ((_a = options.credential_source) === null || _a === void 0 ? void 0 : _a.environment_id) { - return new awsclient_1.AwsClient(options, additionalOptions); - } - else if ((_b = options.credential_source) === null || _b === void 0 ? void 0 : _b.executable) { - return new pluggable_auth_client_1.PluggableAuthClient(options, additionalOptions); - } - else { - return new identitypoolclient_1.IdentityPoolClient(options, additionalOptions); - } - } - else { - return null; - } - } +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + + + +module.exports = Transform; +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, + ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; +var Duplex = __nccwpck_require__(41359); +__nccwpck_require__(44124)(Transform, Duplex); +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit('error', new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + // single equals check for both `null` and `undefined` + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } } -exports.ExternalAccountClient = ExternalAccountClient; +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} +function prefinish() { + var _this = this; + if (typeof this._flush === 'function' && !this._readableState.destroyed) { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); +}; +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; +Transform.prototype._destroy = function (err, cb) { + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + }); +}; +function done(stream, er, data) { + if (er) return stream.emit('error', er); + if (data != null) + // single equals check for both `null` and `undefined` + stream.push(data); + // TODO(BridgeAR): Write a test for these two error cases + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); +} /***/ }), -/***/ 27646: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 26993: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2024 Google LLC +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -var _a, _b, _c; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FileSubjectTokenSupplier = void 0; -const util_1 = __nccwpck_require__(73837); -const fs = __nccwpck_require__(57147); -// fs.readfile is undefined in browser karma tests causing -// `npm run browser-test` to fail as test.oauth2.ts imports this file via -// src/index.ts. -// Fallback to void function to avoid promisify throwing a TypeError. -const readFile = (0, util_1.promisify)((_a = fs.readFile) !== null && _a !== void 0 ? _a : (() => { })); -const realpath = (0, util_1.promisify)((_b = fs.realpath) !== null && _b !== void 0 ? _b : (() => { })); -const lstat = (0, util_1.promisify)((_c = fs.lstat) !== null && _c !== void 0 ? _c : (() => { })); -/** - * Internal subject token supplier implementation used when a file location - * is configured in the credential configuration used to build an {@link IdentityPoolClient} - */ -class FileSubjectTokenSupplier { - /** - * Instantiates a new file based subject token supplier. - * @param opts The file subject token supplier options to build the supplier - * with. - */ - constructor(opts) { - this.filePath = opts.filePath; - this.formatType = opts.formatType; - this.subjectTokenFieldName = opts.subjectTokenFieldName; - } - /** - * Returns the subject token stored at the file specified in the constructor. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link IdentityPoolClient}, contains the requested audience and subject - * token type for the external account identity. Not used. - */ - async getSubjectToken(context) { - // Make sure there is a file at the path. lstatSync will throw if there is - // nothing there. - let parsedFilePath = this.filePath; - try { - // Resolve path to actual file in case of symlink. Expect a thrown error - // if not resolvable. - parsedFilePath = await realpath(parsedFilePath); - if (!(await lstat(parsedFilePath)).isFile()) { - throw new Error(); - } - } - catch (err) { - if (err instanceof Error) { - err.message = `The file at ${parsedFilePath} does not exist, or it is not a file. ${err.message}`; - } - throw err; - } - let subjectToken; - const rawText = await readFile(parsedFilePath, { encoding: 'utf8' }); - if (this.formatType === 'text') { - subjectToken = rawText; - } - else if (this.formatType === 'json' && this.subjectTokenFieldName) { - const json = JSON.parse(rawText); - subjectToken = json[this.subjectTokenFieldName]; - } - if (!subjectToken) { - throw new Error('Unable to parse the subject_token from the credential_source file'); - } - return subjectToken; +// 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + + + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var internalUtil = { + deprecate: __nccwpck_require__(65278) +}; +/**/ + +/**/ +var Stream = __nccwpck_require__(62387); +/**/ + +var Buffer = (__nccwpck_require__(14300).Buffer); +var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} +var destroyImpl = __nccwpck_require__(97049); +var _require = __nccwpck_require__(39948), + getHighWaterMark = _require.getHighWaterMark; +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, + ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, + ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, + ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; +var errorOrDestroy = destroyImpl.errorOrDestroy; +__nccwpck_require__(44124)(Writable, Stream); +function nop() {} +function WritableState(options, stream, isDuplex) { + Duplex = Duplex || __nccwpck_require__(41359); + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream, + // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // Should close be emitted on destroy. Defaults to true. + this.emitClose = options.emitClose !== false; + + // Should .destroy() be called after 'finish' (and potentially 'end') + this.autoDestroy = !!options.autoDestroy; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; } + }); +} else { + realHasInstance = function realHasInstance(object) { + return object instanceof this; + }; } -exports.FileSubjectTokenSupplier = FileSubjectTokenSupplier; +function Writable(options) { + Duplex = Duplex || __nccwpck_require__(41359); + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. -/***/ }), + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. -/***/ 20695: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // Checking for a Stream.Duplex instance is faster here instead of inside + // the WritableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); + this._writableState = new WritableState(options, this, isDuplex); -"use strict"; + // legacy. + this.writable = true; + if (options) { + if (typeof options.write === 'function') this._write = options.write; + if (typeof options.writev === 'function') this._writev = options.writev; + if (typeof options.destroy === 'function') this._destroy = options.destroy; + if (typeof options.final === 'function') this._final = options.final; + } + Stream.call(this); +} -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GoogleAuth = exports.CLOUD_SDK_CLIENT_ID = void 0; -const child_process_1 = __nccwpck_require__(32081); -const fs = __nccwpck_require__(57147); -const gcpMetadata = __nccwpck_require__(3563); -const os = __nccwpck_require__(22037); -const path = __nccwpck_require__(71017); -const crypto_1 = __nccwpck_require__(78043); -const transporters_1 = __nccwpck_require__(72649); -const computeclient_1 = __nccwpck_require__(96875); -const idtokenclient_1 = __nccwpck_require__(80298); -const envDetect_1 = __nccwpck_require__(21380); -const jwtclient_1 = __nccwpck_require__(13959); -const refreshclient_1 = __nccwpck_require__(98790); -const impersonated_1 = __nccwpck_require__(91103); -const externalclient_1 = __nccwpck_require__(94381); -const baseexternalclient_1 = __nccwpck_require__(40810); -const authclient_1 = __nccwpck_require__(44627); -const externalAccountAuthorizedUserClient_1 = __nccwpck_require__(38765); -const util_1 = __nccwpck_require__(68905); -exports.CLOUD_SDK_CLIENT_ID = '764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com'; -const GoogleAuthExceptionMessages = { - NO_PROJECT_ID_FOUND: 'Unable to detect a Project Id in the current environment. \n' + - 'To learn more about authentication and Google APIs, visit: \n' + - 'https://cloud.google.com/docs/authentication/getting-started', - NO_CREDENTIALS_FOUND: 'Unable to find credentials in current environment. \n' + - 'To learn more about authentication and Google APIs, visit: \n' + - 'https://cloud.google.com/docs/authentication/getting-started', - NO_UNIVERSE_DOMAIN_FOUND: 'Unable to detect a Universe Domain in the current environment.\n' + - 'To learn more about Universe Domain retrieval, visit: \n' + - 'https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys', +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); }; -class GoogleAuth { - // Note: this properly is only public to satisify unit tests. - // https://github.com/Microsoft/TypeScript/issues/5228 - get isGCE() { - return this.checkIsGCE; +function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); + // TODO: defer error events consistently everywhere, not just the cb + errorOrDestroy(stream, er); + process.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== 'string' && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); + } + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; + } + return true; +} +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== 'function') cb = nop; + if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; +}; +Writable.prototype.cork = function () { + this._writableState.corked++; +}; +Writable.prototype.uncork = function () { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; +Object.defineProperty(Writable.prototype, 'writableBuffer', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } +}); +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; } - /** - * Configuration is resolved in the following order of precedence: - * - {@link GoogleAuthOptions.credentials `credentials`} - * - {@link GoogleAuthOptions.keyFilename `keyFilename`} - * - {@link GoogleAuthOptions.keyFile `keyFile`} - * - * {@link GoogleAuthOptions.clientOptions `clientOptions`} are passed to the - * {@link AuthClient `AuthClient`s}. - * - * @param opts - */ - constructor(opts) { - /** - * Caches a value indicating whether the auth layer is running on Google - * Compute Engine. - * @private - */ - this.checkIsGCE = undefined; - // To save the contents of the JSON credential file - this.jsonContent = null; - this.cachedCredential = null; - this.clientOptions = {}; - opts = opts || {}; - this._cachedProjectId = opts.projectId || null; - this.cachedCredential = opts.authClient || null; - this.keyFilename = opts.keyFilename || opts.keyFile; - this.scopes = opts.scopes; - this.jsonContent = opts.credentials || null; - this.clientOptions = opts.clientOptions || {}; - if (opts.universeDomain) { - this.clientOptions.universeDomain = opts.universeDomain; - } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; } - // GAPIC client libraries should always use self-signed JWTs. The following - // variables are set on the JWT client in order to indicate the type of library, - // and sign the JWT with the correct audience and scopes (if not supplied). - setGapicJWTValues(client) { - client.defaultServicePath = this.defaultServicePath; - client.useJWTAccessWithScope = this.useJWTAccessWithScope; - client.defaultScopes = this.defaultScopes; + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; +} +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + process.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); } - getProjectId(callback) { - if (callback) { - this.getProjectIdAsync().then(r => callback(null, r), callback); - } - else { - return this.getProjectIdAsync(); - } + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); } - /** - * A temporary method for internal `getProjectId` usages where `null` is - * acceptable. In a future major release, `getProjectId` should return `null` - * (as the `Promise` base signature describes) and this private - * method should be removed. - * - * @returns Promise that resolves with project id (or `null`) - */ - async getProjectIdOptional() { - try { - return await this.getProjectId(); - } - catch (e) { - if (e instanceof Error && - e.message === GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND) { - return null; - } - else { - throw e; - } + } +} +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; +} +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); +}; +Writable.prototype._writev = null; +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending) endWritable(this, state, cb); + return this; +}; +Object.defineProperty(Writable.prototype, 'writableLength', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } +}); +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function' && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + if (state.autoDestroy) { + // In case of duplex streams we need a way to detect + // if the readable side is ready for autoDestroy as well + var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); } + } } - /* - * A private method for finding and caching a projectId. - * - * Supports environments in order of precedence: - * - GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable - * - GOOGLE_APPLICATION_CREDENTIALS JSON file - * - Cloud SDK: `gcloud config config-helper --format json` - * - GCE project ID from metadata server - * - * @returns projectId - */ - async findAndCacheProjectId() { - let projectId = null; - projectId || (projectId = await this.getProductionProjectId()); - projectId || (projectId = await this.getFileProjectId()); - projectId || (projectId = await this.getDefaultServiceProjectId()); - projectId || (projectId = await this.getGCEProjectId()); - projectId || (projectId = await this.getExternalAccountClientProjectId()); - if (projectId) { - this._cachedProjectId = projectId; - return projectId; - } - else { - throw new Error(GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND); - } + } + return need; +} +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) process.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + + // reuse the free corkReq. + state.corkedRequestsFree.next = corkReq; +} +Object.defineProperty(Writable.prototype, 'destroyed', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._writableState === undefined) { + return false; } - async getProjectIdAsync() { - if (this._cachedProjectId) { - return this._cachedProjectId; - } - if (!this._findProjectIdPromise) { - this._findProjectIdPromise = this.findAndCacheProjectId(); - } - return this._findProjectIdPromise; + return this._writableState.destroyed; + }, + set: function set(value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; } - /** - * Retrieves a universe domain from the metadata server via - * {@link gcpMetadata.universe}. - * - * @returns a universe domain - */ - async getUniverseDomainFromMetadataServer() { - var _a; - let universeDomain; - try { - universeDomain = await gcpMetadata.universe('universe-domain'); - universeDomain || (universeDomain = authclient_1.DEFAULT_UNIVERSE); - } - catch (e) { - if (e && ((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 404) { - universeDomain = authclient_1.DEFAULT_UNIVERSE; - } - else { - throw e; - } - } - return universeDomain; + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + cb(err); +}; + +/***/ }), + +/***/ 43306: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var _Object$setPrototypeO; +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var finished = __nccwpck_require__(76080); +var kLastResolve = Symbol('lastResolve'); +var kLastReject = Symbol('lastReject'); +var kError = Symbol('error'); +var kEnded = Symbol('ended'); +var kLastPromise = Symbol('lastPromise'); +var kHandlePromise = Symbol('handlePromise'); +var kStream = Symbol('stream'); +function createIterResult(value, done) { + return { + value: value, + done: done + }; +} +function readAndResolve(iter) { + var resolve = iter[kLastResolve]; + if (resolve !== null) { + var data = iter[kStream].read(); + // we defer if data is null + // we can be expecting either 'end' or + // 'error' + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve(createIterResult(data, false)); } - /** - * Retrieves, caches, and returns the universe domain in the following order - * of precedence: - * - The universe domain in {@link GoogleAuth.clientOptions} - * - An existing or ADC {@link AuthClient}'s universe domain - * - {@link gcpMetadata.universe}, if {@link Compute} client - * - * @returns The universe domain - */ - async getUniverseDomain() { - let universeDomain = (0, util_1.originalOrCamelOptions)(this.clientOptions).get('universe_domain'); - try { - universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = (await this.getClient()).universeDomain); - } - catch (_a) { - // client or ADC is not available - universeDomain !== null && universeDomain !== void 0 ? universeDomain : (universeDomain = authclient_1.DEFAULT_UNIVERSE); - } - return universeDomain; + } +} +function onReadable(iter) { + // we wait for the next tick, because it might + // emit an error with process.nextTick + process.nextTick(readAndResolve, iter); +} +function wrapForNext(lastPromise, iter) { + return function (resolve, reject) { + lastPromise.then(function () { + if (iter[kEnded]) { + resolve(createIterResult(undefined, true)); + return; + } + iter[kHandlePromise](resolve, reject); + }, reject); + }; +} +var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); +var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + // if we have detected an error in the meanwhile + // reject straight away + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); } - /** - * @returns Any scopes (user-specified or default scopes specified by the - * client library) that need to be set on the current Auth client. - */ - getAnyScopes() { - return this.scopes || this.defaultScopes; + if (this[kEnded]) { + return Promise.resolve(createIterResult(undefined, true)); } - getApplicationDefault(optionsOrCallback = {}, callback) { - let options; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else { - options = optionsOrCallback; - } - if (callback) { - this.getApplicationDefaultAsync(options).then(r => callback(null, r.credential, r.projectId), callback); - } - else { - return this.getApplicationDefaultAsync(options); - } + if (this[kStream].destroyed) { + // We need to defer via nextTick because if .destroy(err) is + // called, the error will be emitted via nextTick, and + // we cannot guarantee that there is no error lingering around + // waiting to be emitted. + return new Promise(function (resolve, reject) { + process.nextTick(function () { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve(createIterResult(undefined, true)); + } + }); + }); } - async getApplicationDefaultAsync(options = {}) { - // If we've already got a cached credential, return it. - // This will also preserve one's configured quota project, in case they - // set one directly on the credential previously. - if (this.cachedCredential) { - return await this.prepareAndCacheADC(this.cachedCredential); - } - // Since this is a 'new' ADC to cache we will use the environment variable - // if it's available. We prefer this value over the value from ADC. - const quotaProjectIdOverride = process.env['GOOGLE_CLOUD_QUOTA_PROJECT']; - let credential; - // Check for the existence of a local environment variable pointing to the - // location of the credential file. This is typically used in local - // developer scenarios. - credential = - await this._tryGetApplicationCredentialsFromEnvironmentVariable(options); - if (credential) { - if (credential instanceof jwtclient_1.JWT) { - credential.scopes = this.scopes; - } - else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { - credential.scopes = this.getAnyScopes(); - } - return await this.prepareAndCacheADC(credential, quotaProjectIdOverride); - } - // Look in the well-known credential file location. - credential = - await this._tryGetApplicationCredentialsFromWellKnownFile(options); - if (credential) { - if (credential instanceof jwtclient_1.JWT) { - credential.scopes = this.scopes; - } - else if (credential instanceof baseexternalclient_1.BaseExternalAccountClient) { - credential.scopes = this.getAnyScopes(); - } - return await this.prepareAndCacheADC(credential, quotaProjectIdOverride); - } - // Determine if we're running on GCE. - if (await this._checkIsGCE()) { - // set universe domain for Compute client - if (!(0, util_1.originalOrCamelOptions)(options).get('universe_domain')) { - options.universeDomain = - await this.getUniverseDomainFromMetadataServer(); - } - options.scopes = this.getAnyScopes(); - return await this.prepareAndCacheADC(new computeclient_1.Compute(options), quotaProjectIdOverride); - } - throw new Error('Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.'); + + // if we have multiple next() calls + // we will wait for the previous Promise to finish + // this logic is optimized to support for await loops, + // where next() is only called once at a time + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); + } else { + // fast path needed to support multiple this.push() + // without triggering the next() queue + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); } - async prepareAndCacheADC(credential, quotaProjectIdOverride) { - const projectId = await this.getProjectIdOptional(); - if (quotaProjectIdOverride) { - credential.quotaProjectId = quotaProjectIdOverride; - } - this.cachedCredential = credential; - return { credential, projectId }; + this[kLastPromise] = promise; + return promise; + } +}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { + return this; +}), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + // destroy(err, cb) is a private API + // we can guarantee we have that here, because we control the + // Readable class this is attached to + return new Promise(function (resolve, reject) { + _this2[kStream].destroy(null, function (err) { + if (err) { + reject(err); + return; + } + resolve(createIterResult(undefined, true)); + }); + }); +}), _Object$setPrototypeO), AsyncIteratorPrototype); +var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { + var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve, reject) { + var data = iterator[kStream].read(); + if (data) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(data, false)); + } else { + iterator[kLastResolve] = resolve; + iterator[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator[kLastPromise] = null; + finished(stream, function (err) { + if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { + var reject = iterator[kLastReject]; + // reject if we are waiting for data in the Promise + // returned by next() and store the error + if (reject !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + reject(err); + } + iterator[kError] = err; + return; } - /** - * Determines whether the auth layer is running on Google Compute Engine. - * Checks for GCP Residency, then fallback to checking if metadata server - * is available. - * - * @returns A promise that resolves with the boolean. - * @api private - */ - async _checkIsGCE() { - if (this.checkIsGCE === undefined) { - this.checkIsGCE = - gcpMetadata.getGCPResidency() || (await gcpMetadata.isAvailable()); - } - return this.checkIsGCE; + var resolve = iterator[kLastResolve]; + if (resolve !== null) { + iterator[kLastPromise] = null; + iterator[kLastResolve] = null; + iterator[kLastReject] = null; + resolve(createIterResult(undefined, true)); } - /** - * Attempts to load default credentials from the environment variable path.. - * @returns Promise that resolves with the OAuth2Client or null. - * @api private - */ - async _tryGetApplicationCredentialsFromEnvironmentVariable(options) { - const credentialsPath = process.env['GOOGLE_APPLICATION_CREDENTIALS'] || - process.env['google_application_credentials']; - if (!credentialsPath || credentialsPath.length === 0) { - return null; - } - try { - return this._getApplicationCredentialsFromFilePath(credentialsPath, options); - } - catch (e) { - if (e instanceof Error) { - e.message = `Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${e.message}`; - } - throw e; - } + iterator[kEnded] = true; + }); + stream.on('readable', onReadable.bind(null, iterator)); + return iterator; +}; +module.exports = createReadableStreamAsyncIterator; + +/***/ }), + +/***/ 52746: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var _require = __nccwpck_require__(14300), + Buffer = _require.Buffer; +var _require2 = __nccwpck_require__(73837), + inspect = _require2.inspect; +var custom = inspect && inspect.custom || 'inspect'; +function copyBuffer(src, target, offset) { + Buffer.prototype.copy.call(src, target, offset); +} +module.exports = /*#__PURE__*/function () { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; } - /** - * Attempts to load default credentials from a well-known file location - * @return Promise that resolves with the OAuth2Client or null. - * @api private - */ - async _tryGetApplicationCredentialsFromWellKnownFile(options) { - // First, figure out the location of the file, depending upon the OS type. - let location = null; - if (this._isWindows()) { - // Windows - location = process.env['APPDATA']; - } - else { - // Linux or Mac - const home = process.env['HOME']; - if (home) { - location = path.join(home, '.config'); - } - } - // If we found the root path, expand it. - if (location) { - location = path.join(location, 'gcloud', 'application_default_credentials.json'); - if (!fs.existsSync(location)) { - location = null; - } - } - // The file does not exist. - if (!location) { - return null; - } - // The file seems to exist. Try to use it. - const client = await this._getApplicationCredentialsFromFilePath(location, options); - return client; + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; } - /** - * Attempts to load default credentials from a file at the given path.. - * @param filePath The path to the file to read. - * @returns Promise that resolves with the OAuth2Client - * @api private - */ - async _getApplicationCredentialsFromFilePath(filePath, options = {}) { - // Make sure the path looks like a string. - if (!filePath || filePath.length === 0) { - throw new Error('The file path is invalid.'); - } - // Make sure there is a file at the path. lstatSync will throw if there is - // nothing there. - try { - // Resolve path to actual file in case of symlink. Expect a thrown error - // if not resolvable. - filePath = fs.realpathSync(filePath); - if (!fs.lstatSync(filePath).isFile()) { - throw new Error(); - } - } - catch (err) { - if (err instanceof Error) { - err.message = `The file at ${filePath} does not exist, or it is not a file. ${err.message}`; - } - throw err; - } - // Now open a read stream on the file, and parse it. - const readStream = fs.createReadStream(filePath); - return this.fromStream(readStream, options); + }, { + key: "shift", + value: function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; } - /** - * Create a credentials instance using a given impersonated input options. - * @param json The impersonated input object. - * @returns JWT or UserRefresh Client with data - */ - fromImpersonatedJSON(json) { - var _a, _b, _c, _d, _e; - if (!json) { - throw new Error('Must pass in a JSON object containing an impersonated refresh token'); - } - if (json.type !== impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { - throw new Error(`The incoming JSON object does not have the "${impersonated_1.IMPERSONATED_ACCOUNT_TYPE}" type`); - } - if (!json.source_credentials) { - throw new Error('The incoming JSON object does not contain a source_credentials field'); - } - if (!json.service_account_impersonation_url) { - throw new Error('The incoming JSON object does not contain a service_account_impersonation_url field'); - } - // Create source client for impersonation - const sourceClient = new refreshclient_1.UserRefreshClient(); - sourceClient.fromJSON(json.source_credentials); - if (((_a = json.service_account_impersonation_url) === null || _a === void 0 ? void 0 : _a.length) > 256) { - /** - * Prevents DOS attacks. - * @see {@link https://github.com/googleapis/google-auth-library-nodejs/security/code-scanning/85} - **/ - throw new RangeError(`Target principal is too long: ${json.service_account_impersonation_url}`); - } - // Extreact service account from service_account_impersonation_url - const targetPrincipal = (_c = (_b = /(?[^/]+):generateAccessToken$/.exec(json.service_account_impersonation_url)) === null || _b === void 0 ? void 0 : _b.groups) === null || _c === void 0 ? void 0 : _c.target; - if (!targetPrincipal) { - throw new RangeError(`Cannot extract target principal from ${json.service_account_impersonation_url}`); - } - const targetScopes = (_d = this.getAnyScopes()) !== null && _d !== void 0 ? _d : []; - const client = new impersonated_1.Impersonated({ - ...json, - delegates: (_e = json.delegates) !== null && _e !== void 0 ? _e : [], - sourceClient: sourceClient, - targetPrincipal: targetPrincipal, - targetScopes: Array.isArray(targetScopes) ? targetScopes : [targetScopes], - }); - return client; + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; } - /** - * Create a credentials instance using the given input options. - * @param json The input object. - * @param options The JWT or UserRefresh options for the client - * @returns JWT or UserRefresh Client with data - */ - fromJSON(json, options = {}) { - let client; - // user's preferred universe domain - const preferredUniverseDomain = (0, util_1.originalOrCamelOptions)(options).get('universe_domain'); - if (json.type === refreshclient_1.USER_REFRESH_ACCOUNT_TYPE) { - client = new refreshclient_1.UserRefreshClient(options); - client.fromJSON(json); - } - else if (json.type === impersonated_1.IMPERSONATED_ACCOUNT_TYPE) { - client = this.fromImpersonatedJSON(json); - } - else if (json.type === baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { - client = externalclient_1.ExternalAccountClient.fromJSON(json, options); - client.scopes = this.getAnyScopes(); - } - else if (json.type === externalAccountAuthorizedUserClient_1.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE) { - client = new externalAccountAuthorizedUserClient_1.ExternalAccountAuthorizedUserClient(json, options); - } - else { - options.scopes = this.scopes; - client = new jwtclient_1.JWT(options); - this.setGapicJWTValues(client); - client.fromJSON(json); - } - if (preferredUniverseDomain) { - client.universeDomain = preferredUniverseDomain; - } - return client; + }, { + key: "join", + value: function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) ret += s + p.data; + return ret; } - /** - * Return a JWT or UserRefreshClient from JavaScript object, caching both the - * object used to instantiate and the client. - * @param json The input object. - * @param options The JWT or UserRefresh options for the client - * @returns JWT or UserRefresh Client with data - */ - _cacheClientFromJSON(json, options) { - const client = this.fromJSON(json, options); - // cache both raw data used to instantiate client and client itself. - this.jsonContent = json; - this.cachedCredential = client; - return client; + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; } - fromStream(inputStream, optionsOrCallback = {}, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else { - options = optionsOrCallback; - } - if (callback) { - this.fromStreamAsync(inputStream, options).then(r => callback(null, r), callback); - } - else { - return this.fromStreamAsync(inputStream, options); - } + + // Consumes a specified amount of bytes or characters from the buffered data. + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + if (n < this.head.data.length) { + // `slice` is the same for buffers and strings. + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + // First chunk is a perfect match. + ret = this.shift(); + } else { + // Result spans more than one buffer. + ret = hasStrings ? this._getString(n) : this._getBuffer(n); + } + return ret; } - fromStreamAsync(inputStream, options) { - return new Promise((resolve, reject) => { - if (!inputStream) { - throw new Error('Must pass in a stream containing the Google auth settings.'); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('error', reject) - .on('data', chunk => (s += chunk)) - .on('end', () => { - try { - try { - const data = JSON.parse(s); - const r = this._cacheClientFromJSON(data, options); - return resolve(r); - } - catch (err) { - // If we failed parsing this.keyFileName, assume that it - // is a PEM or p12 certificate: - if (!this.keyFilename) - throw err; - const client = new jwtclient_1.JWT({ - ...this.clientOptions, - keyFile: this.keyFilename, - }); - this.cachedCredential = client; - this.setGapicJWTValues(client); - return resolve(client); - } - } - catch (err) { - return reject(err); - } - }); - }); + }, { + key: "first", + value: function first() { + return this.head.data; } - /** - * Create a credentials instance using the given API key string. - * @param apiKey The API key string - * @param options An optional options object. - * @returns A JWT loaded from the key - */ - fromAPIKey(apiKey, options) { - options = options || {}; - const client = new jwtclient_1.JWT(options); - client.fromAPIKey(apiKey); - return client; + + // Consumes a specified amount of characters from the buffered data. + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; } - /** - * Determines whether the current operating system is Windows. - * @api private - */ - _isWindows() { - const sys = os.platform(); - if (sys && sys.length >= 3) { - if (sys.substring(0, 3).toLowerCase() === 'win') { - return true; - } + + // Consumes a specified amount of bytes from the buffered data. + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) this.head = p.next;else this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + break; } - return false; + ++c; + } + this.length -= c; + return ret; } - /** - * Run the Google Cloud SDK command that prints the default project ID - */ - async getDefaultServiceProjectId() { - return new Promise(resolve => { - (0, child_process_1.exec)('gcloud config config-helper --format json', (err, stdout) => { - if (!err && stdout) { - try { - const projectId = JSON.parse(stdout).configuration.properties.core.project; - resolve(projectId); - return; - } - catch (e) { - // ignore errors - } - } - resolve(null); - }); - }); + + // Make sure the linked list only shows the minimal necessary information. + }, { + key: custom, + value: function value(_, options) { + return inspect(this, _objectSpread(_objectSpread({}, options), {}, { + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + })); } - /** - * Loads the project id from environment variables. - * @api private - */ - getProductionProjectId() { - return (process.env['GCLOUD_PROJECT'] || - process.env['GOOGLE_CLOUD_PROJECT'] || - process.env['gcloud_project'] || - process.env['google_cloud_project']); + }]); + return BufferList; +}(); + +/***/ }), + +/***/ 97049: +/***/ ((module) => { + +"use strict"; + + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } } - /** - * Loads the project id from the GOOGLE_APPLICATION_CREDENTIALS json file. - * @api private - */ - async getFileProjectId() { - if (this.cachedCredential) { - // Try to read the project ID from the cached credentials file - return this.cachedCredential.projectId; - } - // Ensure the projectId is loaded from the keyFile if available. - if (this.keyFilename) { - const creds = await this.getClient(); - if (creds && creds.projectId) { - return creds.projectId; - } - } - // Try to load a credentials file and read its project ID - const r = await this._tryGetApplicationCredentialsFromEnvironmentVariable(); - if (r) { - return r.projectId; - } - else { - return null; - } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function (err) { + if (!cb && err) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err); + } else { + process.nextTick(emitCloseNT, _this); } - /** - * Gets the project ID from external account client if available. - */ - async getExternalAccountClientProjectId() { - if (!this.jsonContent || this.jsonContent.type !== baseexternalclient_1.EXTERNAL_ACCOUNT_TYPE) { - return null; - } - const creds = await this.getClient(); - // Do not suppress the underlying error, as the error could contain helpful - // information for debugging and fixing. This is especially true for - // external account creds as in order to get the project ID, the following - // operations have to succeed: - // 1. Valid credentials file should be supplied. - // 2. Ability to retrieve access tokens from STS token exchange API. - // 3. Ability to exchange for service account impersonated credentials (if - // enabled). - // 4. Ability to get project info using the access token from step 2 or 3. - // Without surfacing the error, it is harder for developers to determine - // which step went wrong. - return await creds.getProjectId(); + }); + return this; +} +function emitErrorAndCloseNT(self, err) { + emitErrorNT(self, err); + emitCloseNT(self); +} +function emitCloseNT(self) { + if (self._writableState && !self._writableState.emitClose) return; + if (self._readableState && !self._readableState.emitClose) return; + self.emit('close'); +} +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} +function emitErrorNT(self, err) { + self.emit('error', err); +} +function errorOrDestroy(stream, err) { + // We have tests that rely on errors being emitted + // in the same tick, so changing this is semver major. + // For now when you opt-in to autoDestroy we allow + // the error to be emitted nextTick. In a future + // semver major update we should change the default to this. + + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); +} +module.exports = { + destroy: destroy, + undestroy: undestroy, + errorOrDestroy: errorOrDestroy +}; + +/***/ }), + +/***/ 76080: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Ported from https://github.com/mafintosh/end-of-stream with +// permission from the author, Mathias Buus (@mafintosh). + + + +var ERR_STREAM_PREMATURE_CLOSE = (__nccwpck_require__(67214)/* .codes.ERR_STREAM_PREMATURE_CLOSE */ .q.ERR_STREAM_PREMATURE_CLOSE); +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; } - /** - * Gets the Compute Engine project ID if it can be inferred. - */ - async getGCEProjectId() { - try { - const r = await gcpMetadata.project('project-id'); - return r; - } - catch (e) { - // Ignore any errors - return null; - } + callback.apply(this, args); + }; +} +function noop() {} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} +function eos(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish() { + if (!stream.writable) onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; + var onerror = function onerror(err) { + callback.call(stream, err); + }; + var onclose = function onclose() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); } - getCredentials(callback) { - if (callback) { - this.getCredentialsAsync().then(r => callback(null, r), callback); - } - else { - return this.getCredentialsAsync(); - } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); } - async getCredentialsAsync() { - const client = await this.getClient(); - if (client instanceof impersonated_1.Impersonated) { - return { client_email: client.getTargetPrincipal() }; - } - if (client instanceof baseexternalclient_1.BaseExternalAccountClient) { - const serviceAccountEmail = client.getServiceAccountEmail(); - if (serviceAccountEmail) { - return { - client_email: serviceAccountEmail, - universe_domain: client.universeDomain, - }; - } - } - if (this.jsonContent) { - return { - client_email: this.jsonContent.client_email, - private_key: this.jsonContent.private_key, - universe_domain: this.jsonContent.universe_domain, - }; - } - if (await this._checkIsGCE()) { - const [client_email, universe_domain] = await Promise.all([ - gcpMetadata.instance('service-accounts/default/email'), - this.getUniverseDomain(), - ]); - return { client_email, universe_domain }; - } - throw new Error(GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND); + }; + var onrequest = function onrequest() { + stream.req.on('finish', onfinish); + }; + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest();else stream.on('request', onrequest); + } else if (writable && !stream._writableState) { + // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + return function () { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +} +module.exports = eos; + +/***/ }), + +/***/ 39082: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var ERR_INVALID_ARG_TYPE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_ARG_TYPE */ .q.ERR_INVALID_ARG_TYPE); +function from(Readable, iterable, opts) { + var iterator; + if (iterable && typeof iterable.next === 'function') { + iterator = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); + var readable = new Readable(_objectSpread({ + objectMode: true + }, opts)); + // Reading boolean to protect against _read + // being called before last iteration completion. + var reading = false; + readable._read = function () { + if (!reading) { + reading = true; + next(); } - /** - * Automatically obtain an {@link AuthClient `AuthClient`} based on the - * provided configuration. If no options were passed, use Application - * Default Credentials. - */ - async getClient() { - if (!this.cachedCredential) { - if (this.jsonContent) { - this._cacheClientFromJSON(this.jsonContent, this.clientOptions); - } - else if (this.keyFilename) { - const filePath = path.resolve(this.keyFilename); - const stream = fs.createReadStream(filePath); - await this.fromStreamAsync(stream, this.clientOptions); - } - else { - await this.getApplicationDefaultAsync(this.clientOptions); - } + }; + function next() { + return _next2.apply(this, arguments); + } + function _next2() { + _next2 = _asyncToGenerator(function* () { + try { + var _yield$iterator$next = yield iterator.next(), + value = _yield$iterator$next.value, + done = _yield$iterator$next.done; + if (done) { + readable.push(null); + } else if (readable.push(yield value)) { + next(); + } else { + reading = false; } - return this.cachedCredential; + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + return readable; +} +module.exports = from; + + +/***/ }), + +/***/ 76989: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; +// Ported from https://github.com/mafintosh/pump with +// permission from the author, Mathias Buus (@mafintosh). + + + +var eos; +function once(callback) { + var called = false; + return function () { + if (called) return; + called = true; + callback.apply(void 0, arguments); + }; +} +var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), + ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; +function noop(err) { + // Rethrow the error if it exists to avoid swallowing it + if (err) throw err; +} +function isRequest(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +} +function destroyer(stream, reading, writing, callback) { + callback = once(callback); + var closed = false; + stream.on('close', function () { + closed = true; + }); + if (eos === undefined) eos = __nccwpck_require__(76080); + eos(stream, { + readable: reading, + writable: writing + }, function (err) { + if (err) return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function (err) { + if (closed) return; + if (destroyed) return; + destroyed = true; + + // request.destroy just do .end - .abort is what we want + if (isRequest(stream)) return stream.abort(); + if (typeof stream.destroy === 'function') return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED('pipe')); + }; +} +function call(fn) { + fn(); +} +function pipe(from, to) { + return from.pipe(to); +} +function popCallback(streams) { + if (!streams.length) return noop; + if (typeof streams[streams.length - 1] !== 'function') return noop; + return streams.pop(); +} +function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS('streams'); + } + var error; + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err; + if (err) destroys.forEach(call); + if (reading) return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); +} +module.exports = pipeline; + +/***/ }), + +/***/ 39948: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var ERR_INVALID_OPT_VALUE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_OPT_VALUE */ .q.ERR_INVALID_OPT_VALUE); +function highWaterMarkFrom(options, isDuplex, duplexKey) { + return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; +} +function getHighWaterMark(state, options, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : 'highWaterMark'; + throw new ERR_INVALID_OPT_VALUE(name, hwm); } - /** - * Creates a client which will fetch an ID token for authorization. - * @param targetAudience the audience for the fetched ID token. - * @returns IdTokenClient for making HTTP calls authenticated with ID tokens. - */ - async getIdTokenClient(targetAudience) { - const client = await this.getClient(); - if (!('fetchIdToken' in client)) { - throw new Error('Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.'); - } - return new idtokenclient_1.IdTokenClient({ targetAudience, idTokenProvider: client }); + return Math.floor(hwm); + } + + // Default value + return state.objectMode ? 16 : 16 * 1024; +} +module.exports = { + getHighWaterMark: getHighWaterMark +}; + +/***/ }), + +/***/ 62387: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(12781); + + +/***/ }), + +/***/ 51642: +/***/ ((module, exports, __nccwpck_require__) => { + +var Stream = __nccwpck_require__(12781); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream.Readable; + Object.assign(module.exports, Stream); + module.exports.Stream = Stream; +} else { + exports = module.exports = __nccwpck_require__(51433); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = __nccwpck_require__(26993); + exports.Duplex = __nccwpck_require__(41359); + exports.Transform = __nccwpck_require__(34415); + exports.PassThrough = __nccwpck_require__(81542); + exports.finished = __nccwpck_require__(76080); + exports.pipeline = __nccwpck_require__(76989); +} + + +/***/ }), + +/***/ 63515: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const {PassThrough} = __nccwpck_require__(12781); +const extend = __nccwpck_require__(38171); + +let debug = () => {}; +if ( + typeof process !== 'undefined' && + 'env' in process && + typeof process.env === 'object' && + process.env.DEBUG === 'retry-request' +) { + debug = message => { + console.log('retry-request:', message); + }; +} + +const DEFAULTS = { + objectMode: false, + retries: 2, + + /* + The maximum time to delay in seconds. If retryDelayMultiplier results in a + delay greater than maxRetryDelay, retries should delay by maxRetryDelay + seconds instead. + */ + maxRetryDelay: 64, + + /* + The multiplier by which to increase the delay time between the completion of + failed requests, and the initiation of the subsequent retrying request. + */ + retryDelayMultiplier: 2, + + /* + The length of time to keep retrying in seconds. The last sleep period will + be shortened as necessary, so that the last retry runs at deadline (and not + considerably beyond it). The total time starting from when the initial + request is sent, after which an error will be returned, regardless of the + retrying attempts made meanwhile. + */ + totalTimeout: 600, + + noResponseRetries: 2, + currentRetryAttempt: 0, + shouldRetryFn: function (response) { + const retryRanges = [ + // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes + // 1xx - Retry (Informational, request still processing) + // 2xx - Do not retry (Success) + // 3xx - Do not retry (Redirect) + // 4xx - Do not retry (Client errors) + // 429 - Retry ("Too Many Requests") + // 5xx - Retry (Server errors) + [100, 199], + [429, 429], + [500, 599], + ]; + + const statusCode = response.statusCode; + debug(`Response status: ${statusCode}`); + + let range; + while ((range = retryRanges.shift())) { + if (statusCode >= range[0] && statusCode <= range[1]) { + // Not a successful status or redirect. + return true; + } } - /** - * Automatically obtain application default credentials, and return - * an access token for making requests. - */ - async getAccessToken() { - const client = await this.getClient(); - return (await client.getAccessToken()).token; + }, +}; + +function retryRequest(requestOpts, opts, callback) { + if (typeof requestOpts === 'string') { + requestOpts = {url: requestOpts}; + } + + const streamMode = typeof arguments[arguments.length - 1] !== 'function'; + + if (typeof opts === 'function') { + callback = opts; + } + + const manualCurrentRetryAttemptWasSet = + opts && typeof opts.currentRetryAttempt === 'number'; + opts = extend({}, DEFAULTS, opts); + + if (typeof opts.request === 'undefined') { + throw new Error('A request library must be provided to retry-request.'); + } + + let currentRetryAttempt = opts.currentRetryAttempt; + + let numNoResponseAttempts = 0; + let streamResponseHandled = false; + + let retryStream; + let requestStream; + let delayStream; + + let activeRequest; + const retryRequest = { + abort: function () { + if (activeRequest && activeRequest.abort) { + activeRequest.abort(); + } + }, + }; + + if (streamMode) { + retryStream = new PassThrough({objectMode: opts.objectMode}); + retryStream.abort = resetStreams; + } + + const timeOfFirstRequest = Date.now(); + if (currentRetryAttempt > 0) { + retryAfterDelay(currentRetryAttempt); + } else { + makeRequest(); + } + + if (streamMode) { + return retryStream; + } else { + return retryRequest; + } + + function resetStreams() { + delayStream = null; + + if (requestStream) { + requestStream.abort && requestStream.abort(); + requestStream.cancel && requestStream.cancel(); + + if (requestStream.destroy) { + requestStream.destroy(); + } else if (requestStream.end) { + requestStream.end(); + } } - /** - * Obtain the HTTP headers that will provide authorization for a given - * request. - */ - async getRequestHeaders(url) { - const client = await this.getClient(); - return client.getRequestHeaders(url); + } + + function makeRequest() { + let finishHandled = false; + currentRetryAttempt++; + debug(`Current retry attempt: ${currentRetryAttempt}`); + + function handleFinish(args = []) { + if (!finishHandled) { + finishHandled = true; + retryStream.emit('complete', ...args); + } } - /** - * Obtain credentials for a request, then attach the appropriate headers to - * the request options. - * @param opts Axios or Request options on which to attach the headers - */ - async authorizeRequest(opts) { - opts = opts || {}; - const url = opts.url || opts.uri; - const client = await this.getClient(); - const headers = await client.getRequestHeaders(url); - opts.headers = Object.assign(opts.headers || {}, headers); - return opts; + + if (streamMode) { + streamResponseHandled = false; + + delayStream = new PassThrough({objectMode: opts.objectMode}); + requestStream = opts.request(requestOpts); + + setImmediate(() => { + retryStream.emit('request'); + }); + + requestStream + // gRPC via google-cloud-node can emit an `error` as well as a `response` + // Whichever it emits, we run with-- we can't run with both. That's what + // is up with the `streamResponseHandled` tracking. + .on('error', err => { + if (streamResponseHandled) { + return; + } + + streamResponseHandled = true; + onResponse(err); + }) + .on('response', (resp, body) => { + if (streamResponseHandled) { + return; + } + + streamResponseHandled = true; + onResponse(null, resp, body); + }) + .on('complete', (...params) => handleFinish(params)) + .on('finish', (...params) => handleFinish(params)); + + requestStream.pipe(delayStream); + } else { + activeRequest = opts.request(requestOpts, onResponse); } - /** - * Automatically obtain application default credentials, and make an - * HTTP request using the given options. - * @param opts Axios request options for the HTTP request. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - async request(opts) { - const client = await this.getClient(); - return client.request(opts); + } + + function retryAfterDelay(currentRetryAttempt) { + if (streamMode) { + resetStreams(); } - /** - * Determine the compute environment in which the code is running. - */ - getEnv() { - return (0, envDetect_1.getEnv)(); + + const nextRetryDelay = getNextRetryDelay({ + maxRetryDelay: opts.maxRetryDelay, + retryDelayMultiplier: opts.retryDelayMultiplier, + retryNumber: currentRetryAttempt, + timeOfFirstRequest, + totalTimeout: opts.totalTimeout, + }); + debug(`Next retry delay: ${nextRetryDelay}`); + + if (nextRetryDelay <= 0) { + numNoResponseAttempts = opts.noResponseRetries + 1; + return; } - /** - * Sign the given data with the current private key, or go out - * to the IAM API to sign it. - * @param data The data to be signed. - * @param endpoint A custom endpoint to use. - * - * @example - * ``` - * sign('data', 'https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/'); - * ``` - */ - async sign(data, endpoint) { - const client = await this.getClient(); - const universe = await this.getUniverseDomain(); - endpoint = - endpoint || - `https://iamcredentials.${universe}/v1/projects/-/serviceAccounts/`; - if (client instanceof impersonated_1.Impersonated) { - const signed = await client.sign(data); - return signed.signedBlob; - } - const crypto = (0, crypto_1.createCrypto)(); - if (client instanceof jwtclient_1.JWT && client.key) { - const sign = await crypto.sign(client.key, data); - return sign; - } - const creds = await this.getCredentials(); - if (!creds.client_email) { - throw new Error('Cannot sign data without `client_email`.'); + + setTimeout(makeRequest, nextRetryDelay); + } + + function onResponse(err, response, body) { + // An error such as DNS resolution. + if (err) { + numNoResponseAttempts++; + + if (numNoResponseAttempts <= opts.noResponseRetries) { + retryAfterDelay(numNoResponseAttempts); + } else { + if (streamMode) { + retryStream.emit('error', err); + retryStream.end(); + } else { + callback(err, response, body); } - return this.signBlob(crypto, creds.client_email, data, endpoint); + } + + return; } - async signBlob(crypto, emailOrUniqueId, data, endpoint) { - const url = new URL(endpoint + `${emailOrUniqueId}:signBlob`); - const res = await this.request({ - method: 'POST', - url: url.href, - data: { - payload: crypto.encodeBase64StringUtf8(data), - }, - retry: true, - retryConfig: { - httpMethodsToRetry: ['POST'], - }, - }); - return res.data.signedBlob; + + // Send the response to see if we should try again. + // NOTE: "currentRetryAttempt" isn't accurate by default, as it counts + // the very first request sent as the first "retry". It is only accurate + // when a user provides their own "currentRetryAttempt" option at + // instantiation. + const adjustedCurrentRetryAttempt = manualCurrentRetryAttemptWasSet + ? currentRetryAttempt + : currentRetryAttempt - 1; + if ( + adjustedCurrentRetryAttempt < opts.retries && + opts.shouldRetryFn(response) + ) { + retryAfterDelay(currentRetryAttempt); + return; + } + + // No more attempts need to be made, just continue on. + if (streamMode) { + retryStream.emit('response', response); + delayStream.pipe(retryStream); + requestStream.on('error', err => { + retryStream.destroy(err); + }); + } else { + callback(err, response, body); } + } } -exports.GoogleAuth = GoogleAuth; -/** - * Export DefaultTransporter as a static property of the class. - */ -GoogleAuth.DefaultTransporter = transporters_1.DefaultTransporter; +module.exports = retryRequest; -/***/ }), +function getNextRetryDelay(config) { + const { + maxRetryDelay, + retryDelayMultiplier, + retryNumber, + timeOfFirstRequest, + totalTimeout, + } = config; -/***/ 39735: -/***/ ((__unused_webpack_module, exports) => { + const maxRetryDelayMs = maxRetryDelay * 1000; + const totalTimeoutMs = totalTimeout * 1000; -"use strict"; + const jitter = Math.floor(Math.random() * 1000); + const calculatedNextRetryDelay = + Math.pow(retryDelayMultiplier, retryNumber) * 1000 + jitter; -// Copyright 2014 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IAMAuth = void 0; -class IAMAuth { - /** - * IAM credentials. - * - * @param selector the iam authority selector - * @param token the token - * @constructor - */ - constructor(selector, token) { - this.selector = selector; - this.token = token; - this.selector = selector; - this.token = token; - } - /** - * Acquire the HTTP headers required to make an authenticated request. - */ - getRequestHeaders() { - return { - 'x-goog-iam-authority-selector': this.selector, - 'x-goog-iam-authorization-token': this.token, - }; - } + const maxAllowableDelayMs = + totalTimeoutMs - (Date.now() - timeOfFirstRequest); + + return Math.min( + calculatedNextRetryDelay, + maxAllowableDelayMs, + maxRetryDelayMs + ); } -exports.IAMAuth = IAMAuth; + +module.exports.defaults = DEFAULTS; +module.exports.getNextRetryDelay = getNextRetryDelay; /***/ }), -/***/ 20117: +/***/ 71604: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(56244); + +/***/ }), + +/***/ 56244: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +var RetryOperation = __nccwpck_require__(45369); -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IdentityPoolClient = void 0; -const baseexternalclient_1 = __nccwpck_require__(40810); -const util_1 = __nccwpck_require__(68905); -const filesubjecttokensupplier_1 = __nccwpck_require__(27646); -const urlsubjecttokensupplier_1 = __nccwpck_require__(7428); -/** - * Defines the Url-sourced and file-sourced external account clients mainly - * used for K8s and Azure workloads. - */ -class IdentityPoolClient extends baseexternalclient_1.BaseExternalAccountClient { - /** - * Instantiate an IdentityPoolClient instance using the provided JSON - * object loaded from an external account credentials file. - * An error is thrown if the credential is not a valid file-sourced or - * url-sourced credential or a workforce pool user project is provided - * with a non workforce audience. - * @param options The external account options object typically loaded - * from the external account JSON credential file. The camelCased options - * are aliases for the snake_cased options. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - super(options, additionalOptions); - const opts = (0, util_1.originalOrCamelOptions)(options); - const credentialSource = opts.get('credential_source'); - const subjectTokenSupplier = opts.get('subject_token_supplier'); - // Validate credential sourcing configuration. - if (!credentialSource && !subjectTokenSupplier) { - throw new Error('A credential source or subject token supplier must be specified.'); - } - if (credentialSource && subjectTokenSupplier) { - throw new Error('Only one of credential source or subject token supplier can be specified.'); - } - if (subjectTokenSupplier) { - this.subjectTokenSupplier = subjectTokenSupplier; - this.credentialSourceType = 'programmatic'; +exports.operation = function(options) { + var timeouts = exports.timeouts(options); + return new RetryOperation(timeouts, { + forever: options && (options.forever || options.retries === Infinity), + unref: options && options.unref, + maxRetryTime: options && options.maxRetryTime + }); +}; + +exports.timeouts = function(options) { + if (options instanceof Array) { + return [].concat(options); + } + + var opts = { + retries: 10, + factor: 2, + minTimeout: 1 * 1000, + maxTimeout: Infinity, + randomize: false + }; + for (var key in options) { + opts[key] = options[key]; + } + + if (opts.minTimeout > opts.maxTimeout) { + throw new Error('minTimeout is greater than maxTimeout'); + } + + var timeouts = []; + for (var i = 0; i < opts.retries; i++) { + timeouts.push(this.createTimeout(i, opts)); + } + + if (options && options.forever && !timeouts.length) { + timeouts.push(this.createTimeout(i, opts)); + } + + // sort the array numerically ascending + timeouts.sort(function(a,b) { + return a - b; + }); + + return timeouts; +}; + +exports.createTimeout = function(attempt, opts) { + var random = (opts.randomize) + ? (Math.random() + 1) + : 1; + + var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt)); + timeout = Math.min(timeout, opts.maxTimeout); + + return timeout; +}; + +exports.wrap = function(obj, options, methods) { + if (options instanceof Array) { + methods = options; + options = null; + } + + if (!methods) { + methods = []; + for (var key in obj) { + if (typeof obj[key] === 'function') { + methods.push(key); + } + } + } + + for (var i = 0; i < methods.length; i++) { + var method = methods[i]; + var original = obj[method]; + + obj[method] = function retryWrapper(original) { + var op = exports.operation(options); + var args = Array.prototype.slice.call(arguments, 1); + var callback = args.pop(); + + args.push(function(err) { + if (op.retry(err)) { + return; } - else { - const credentialSourceOpts = (0, util_1.originalOrCamelOptions)(credentialSource); - const formatOpts = (0, util_1.originalOrCamelOptions)(credentialSourceOpts.get('format')); - // Text is the default format type. - const formatType = formatOpts.get('type') || 'text'; - const formatSubjectTokenFieldName = formatOpts.get('subject_token_field_name'); - if (formatType !== 'json' && formatType !== 'text') { - throw new Error(`Invalid credential_source format "${formatType}"`); - } - if (formatType === 'json' && !formatSubjectTokenFieldName) { - throw new Error('Missing subject_token_field_name for JSON credential_source format'); - } - const file = credentialSourceOpts.get('file'); - const url = credentialSourceOpts.get('url'); - const headers = credentialSourceOpts.get('headers'); - if (file && url) { - throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); - } - else if (file && !url) { - this.credentialSourceType = 'file'; - this.subjectTokenSupplier = new filesubjecttokensupplier_1.FileSubjectTokenSupplier({ - filePath: file, - formatType: formatType, - subjectTokenFieldName: formatSubjectTokenFieldName, - }); - } - else if (!file && url) { - this.credentialSourceType = 'url'; - this.subjectTokenSupplier = new urlsubjecttokensupplier_1.UrlSubjectTokenSupplier({ - url: url, - formatType: formatType, - subjectTokenFieldName: formatSubjectTokenFieldName, - headers: headers, - additionalGaxiosOptions: IdentityPoolClient.RETRY_CONFIG, - }); - } - else { - throw new Error('No valid Identity Pool "credential_source" provided, must be either file or url.'); - } + if (err) { + arguments[0] = op.mainError(); } + callback.apply(this, arguments); + }); + + op.attempt(function() { + original.apply(obj, args); + }); + }.bind(obj, original); + obj[method].options = options; + } +}; + + +/***/ }), + +/***/ 45369: +/***/ ((module) => { + +function RetryOperation(timeouts, options) { + // Compatibility for the old (timeouts, retryForever) signature + if (typeof options === 'boolean') { + options = { forever: options }; + } + + this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); + this._timeouts = timeouts; + this._options = options || {}; + this._maxRetryTime = options && options.maxRetryTime || Infinity; + this._fn = null; + this._errors = []; + this._attempts = 1; + this._operationTimeout = null; + this._operationTimeoutCb = null; + this._timeout = null; + this._operationStart = null; + this._timer = null; + + if (this._options.forever) { + this._cachedTimeouts = this._timeouts.slice(0); + } +} +module.exports = RetryOperation; + +RetryOperation.prototype.reset = function() { + this._attempts = 1; + this._timeouts = this._originalTimeouts.slice(0); +} + +RetryOperation.prototype.stop = function() { + if (this._timeout) { + clearTimeout(this._timeout); + } + if (this._timer) { + clearTimeout(this._timer); + } + + this._timeouts = []; + this._cachedTimeouts = null; +}; + +RetryOperation.prototype.retry = function(err) { + if (this._timeout) { + clearTimeout(this._timeout); + } + + if (!err) { + return false; + } + var currentTime = new Date().getTime(); + if (err && currentTime - this._operationStart >= this._maxRetryTime) { + this._errors.push(err); + this._errors.unshift(new Error('RetryOperation timeout occurred')); + return false; + } + + this._errors.push(err); + + var timeout = this._timeouts.shift(); + if (timeout === undefined) { + if (this._cachedTimeouts) { + // retry forever, only keep last error + this._errors.splice(0, this._errors.length - 1); + timeout = this._cachedTimeouts.slice(-1); + } else { + return false; + } + } + + var self = this; + this._timer = setTimeout(function() { + self._attempts++; + + if (self._operationTimeoutCb) { + self._timeout = setTimeout(function() { + self._operationTimeoutCb(self._attempts); + }, self._operationTimeout); + + if (self._options.unref) { + self._timeout.unref(); + } + } + + self._fn(self._attempts); + }, timeout); + + if (this._options.unref) { + this._timer.unref(); + } + + return true; +}; + +RetryOperation.prototype.attempt = function(fn, timeoutOps) { + this._fn = fn; + + if (timeoutOps) { + if (timeoutOps.timeout) { + this._operationTimeout = timeoutOps.timeout; } - /** - * Triggered when a external subject token is needed to be exchanged for a GCP - * access token via GCP STS endpoint. Gets a subject token by calling - * the configured {@link SubjectTokenSupplier} - * @return A promise that resolves with the external subject token. - */ - async retrieveSubjectToken() { - return this.subjectTokenSupplier.getSubjectToken(this.supplierContext); + if (timeoutOps.cb) { + this._operationTimeoutCb = timeoutOps.cb; } -} -exports.IdentityPoolClient = IdentityPoolClient; + } + var self = this; + if (this._operationTimeoutCb) { + this._timeout = setTimeout(function() { + self._operationTimeoutCb(); + }, self._operationTimeout); + } -/***/ }), + this._operationStart = new Date().getTime(); -/***/ 80298: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + this._fn(this._attempts); +}; -"use strict"; +RetryOperation.prototype.try = function(fn) { + console.log('Using RetryOperation.try() is deprecated'); + this.attempt(fn); +}; -// Copyright 2020 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.IdTokenClient = void 0; -const oauth2client_1 = __nccwpck_require__(3936); -class IdTokenClient extends oauth2client_1.OAuth2Client { - /** - * Google ID Token client - * - * Retrieve ID token from the metadata server. - * See: https://cloud.google.com/docs/authentication/get-id-token#metadata-server - */ - constructor(options) { - super(options); - this.targetAudience = options.targetAudience; - this.idTokenProvider = options.idTokenProvider; - } - async getRequestMetadataAsync( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - url) { - if (!this.credentials.id_token || - !this.credentials.expiry_date || - this.isTokenExpiring()) { - const idToken = await this.idTokenProvider.fetchIdToken(this.targetAudience); - this.credentials = { - id_token: idToken, - expiry_date: this.getIdTokenExpiryDate(idToken), - }; - } - const headers = { - Authorization: 'Bearer ' + this.credentials.id_token, - }; - return { headers }; - } - getIdTokenExpiryDate(idToken) { - const payloadB64 = idToken.split('.')[1]; - if (payloadB64) { - const payload = JSON.parse(Buffer.from(payloadB64, 'base64').toString('ascii')); - return payload.exp * 1000; - } +RetryOperation.prototype.start = function(fn) { + console.log('Using RetryOperation.start() is deprecated'); + this.attempt(fn); +}; + +RetryOperation.prototype.start = RetryOperation.prototype.try; + +RetryOperation.prototype.errors = function() { + return this._errors; +}; + +RetryOperation.prototype.attempts = function() { + return this._attempts; +}; + +RetryOperation.prototype.mainError = function() { + if (this._errors.length === 0) { + return null; + } + + var counts = {}; + var mainError = null; + var mainErrorCount = 0; + + for (var i = 0; i < this._errors.length; i++) { + var error = this._errors[i]; + var message = error.message; + var count = (counts[message] || 0) + 1; + + counts[message] = count; + + if (count >= mainErrorCount) { + mainError = error; + mainErrorCount = count; } -} -exports.IdTokenClient = IdTokenClient; + } + + return mainError; +}; /***/ }), -/***/ 91103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 21867: +/***/ ((module, exports, __nccwpck_require__) => { -"use strict"; +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ +/* eslint-disable node/no-deprecated-api */ +var buffer = __nccwpck_require__(14300) +var Buffer = buffer.Buffer -/** - * Copyright 2021 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Impersonated = exports.IMPERSONATED_ACCOUNT_TYPE = void 0; -const oauth2client_1 = __nccwpck_require__(3936); -const gaxios_1 = __nccwpck_require__(59555); -exports.IMPERSONATED_ACCOUNT_TYPE = 'impersonated_service_account'; -class Impersonated extends oauth2client_1.OAuth2Client { - /** - * Impersonated service account credentials. - * - * Create a new access token by impersonating another service account. - * - * Impersonated Credentials allowing credentials issued to a user or - * service account to impersonate another. The source project using - * Impersonated Credentials must enable the "IAMCredentials" API. - * Also, the target service account must grant the orginating principal - * the "Service Account Token Creator" IAM role. - * - * @param {object} options - The configuration object. - * @param {object} [options.sourceClient] the source credential used as to - * acquire the impersonated credentials. - * @param {string} [options.targetPrincipal] the service account to - * impersonate. - * @param {string[]} [options.delegates] the chained list of delegates - * required to grant the final access_token. If set, the sequence of - * identities must have "Service Account Token Creator" capability granted to - * the preceding identity. For example, if set to [serviceAccountB, - * serviceAccountC], the sourceCredential must have the Token Creator role on - * serviceAccountB. serviceAccountB must have the Token Creator on - * serviceAccountC. Finally, C must have Token Creator on target_principal. - * If left unset, sourceCredential must have that role on targetPrincipal. - * @param {string[]} [options.targetScopes] scopes to request during the - * authorization grant. - * @param {number} [options.lifetime] number of seconds the delegated - * credential should be valid for up to 3600 seconds by default, or 43,200 - * seconds by extending the token's lifetime, see: - * https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials#sa-credentials-oauth - * @param {string} [options.endpoint] api endpoint override. - */ - constructor(options = {}) { - var _a, _b, _c, _d, _e, _f; - super(options); - // Start with an expired refresh token, which will automatically be - // refreshed before the first API call is made. - this.credentials = { - expiry_date: 1, - refresh_token: 'impersonated-placeholder', - }; - this.sourceClient = (_a = options.sourceClient) !== null && _a !== void 0 ? _a : new oauth2client_1.OAuth2Client(); - this.targetPrincipal = (_b = options.targetPrincipal) !== null && _b !== void 0 ? _b : ''; - this.delegates = (_c = options.delegates) !== null && _c !== void 0 ? _c : []; - this.targetScopes = (_d = options.targetScopes) !== null && _d !== void 0 ? _d : []; - this.lifetime = (_e = options.lifetime) !== null && _e !== void 0 ? _e : 3600; - this.endpoint = (_f = options.endpoint) !== null && _f !== void 0 ? _f : 'https://iamcredentials.googleapis.com'; - } - /** - * Signs some bytes. - * - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob Reference Documentation} - * @param blobToSign String to sign. - * @return denoting the keyyID and signedBlob in base64 string - */ - async sign(blobToSign) { - await this.sourceClient.getAccessToken(); - const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; - const u = `${this.endpoint}/v1/${name}:signBlob`; - const body = { - delegates: this.delegates, - payload: Buffer.from(blobToSign).toString('base64'), - }; - const res = await this.sourceClient.request({ - ...Impersonated.RETRY_CONFIG, - url: u, - data: body, - method: 'POST', - }); - return res.data; - } - /** The service account email to be impersonated. */ - getTargetPrincipal() { - return this.targetPrincipal; - } - /** - * Refreshes the access token. - */ - async refreshToken() { - var _a, _b, _c, _d, _e, _f; - try { - await this.sourceClient.getAccessToken(); - const name = 'projects/-/serviceAccounts/' + this.targetPrincipal; - const u = `${this.endpoint}/v1/${name}:generateAccessToken`; - const body = { - delegates: this.delegates, - scope: this.targetScopes, - lifetime: this.lifetime + 's', - }; - const res = await this.sourceClient.request({ - ...Impersonated.RETRY_CONFIG, - url: u, - data: body, - method: 'POST', - }); - const tokenResponse = res.data; - this.credentials.access_token = tokenResponse.accessToken; - this.credentials.expiry_date = Date.parse(tokenResponse.expireTime); - return { - tokens: this.credentials, - res, - }; - } - catch (error) { - if (!(error instanceof Error)) - throw error; - let status = 0; - let message = ''; - if (error instanceof gaxios_1.GaxiosError) { - status = (_c = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.status; - message = (_f = (_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) === null || _f === void 0 ? void 0 : _f.message; - } - if (status && message) { - error.message = `${status}: unable to impersonate: ${message}`; - throw error; - } - else { - error.message = `unable to impersonate: ${error}`; - throw error; - } - } - } - /** - * Generates an OpenID Connect ID token for a service account. - * - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/generateIdToken Reference Documentation} - * - * @param targetAudience the audience for the fetched ID token. - * @param options the for the request - * @return an OpenID Connect ID token - */ - async fetchIdToken(targetAudience, options) { - var _a; - await this.sourceClient.getAccessToken(); - const name = `projects/-/serviceAccounts/${this.targetPrincipal}`; - const u = `${this.endpoint}/v1/${name}:generateIdToken`; - const body = { - delegates: this.delegates, - audience: targetAudience, - includeEmail: (_a = options === null || options === void 0 ? void 0 : options.includeEmail) !== null && _a !== void 0 ? _a : true, - }; - const res = await this.sourceClient.request({ - ...Impersonated.RETRY_CONFIG, - url: u, - data: body, - method: 'POST', - }); - return res.data.token; +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.prototype = Object.create(Buffer.prototype) + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) } -exports.Impersonated = Impersonated; /***/ }), -/***/ 68740: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 91532: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } -// Copyright 2015 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JWTAccess = void 0; -const jws = __nccwpck_require__(4636); -const util_1 = __nccwpck_require__(68905); -const DEFAULT_HEADER = { - alg: 'RS256', - typ: 'JWT', -}; -class JWTAccess { - /** - * JWTAccess service account credentials. - * - * Create a new access token by using the credential to create a new JWT token - * that's recognized as the access token. - * - * @param email the service account email address. - * @param key the private key that will be used to sign the token. - * @param keyId the ID of the private key used to sign the token. - */ - constructor(email, key, keyId, eagerRefreshThresholdMillis) { - this.cache = new util_1.LRUCache({ - capacity: 500, - maxAge: 60 * 60 * 1000, - }); - this.email = email; - this.key = key; - this.keyId = keyId; - this.eagerRefreshThresholdMillis = - eagerRefreshThresholdMillis !== null && eagerRefreshThresholdMillis !== void 0 ? eagerRefreshThresholdMillis : 5 * 60 * 1000; + constructor (comp, options) { + options = parseOptions(options) + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } } - /** - * Ensures that we're caching a key appropriately, giving precedence to scopes vs. url - * - * @param url The URI being authorized. - * @param scopes The scope or scopes being authorized - * @returns A string that returns the cached key. - */ - getCachedKey(url, scopes) { - let cacheKey = url; - if (scopes && Array.isArray(scopes) && scopes.length) { - cacheKey = url ? `${url}_${scopes.join('_')}` : `${scopes.join('_')}`; - } - else if (typeof scopes === 'string') { - cacheKey = url ? `${url}_${scopes}` : scopes; - } - if (!cacheKey) { - throw Error('Scopes or url must be provided'); - } - return cacheKey; + + comp = comp.trim().split(/\s+/).join(' ') + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version } - /** - * Get a non-expired access token, after refreshing if necessary. - * - * @param url The URI being authorized. - * @param additionalClaims An object with a set of additional claims to - * include in the payload. - * @returns An object that includes the authorization header. - */ - getRequestHeaders(url, additionalClaims, scopes) { - // Return cached authorization headers, unless we are within - // eagerRefreshThresholdMillis ms of them expiring: - const key = this.getCachedKey(url, scopes); - const cachedToken = this.cache.get(key); - const now = Date.now(); - if (cachedToken && - cachedToken.expiration - now > this.eagerRefreshThresholdMillis) { - return cachedToken.headers; - } - const iat = Math.floor(Date.now() / 1000); - const exp = JWTAccess.getExpirationTime(iat); - let defaultClaims; - // Turn scopes into space-separated string - if (Array.isArray(scopes)) { - scopes = scopes.join(' '); - } - // If scopes are specified, sign with scopes - if (scopes) { - defaultClaims = { - iss: this.email, - sub: this.email, - scope: scopes, - exp, - iat, - }; - } - else { - defaultClaims = { - iss: this.email, - sub: this.email, - aud: url, - exp, - iat, - }; - } - // if additionalClaims are provided, ensure they do not collide with - // other required claims. - if (additionalClaims) { - for (const claim in defaultClaims) { - if (additionalClaims[claim]) { - throw new Error(`The '${claim}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`); - } - } - } - const header = this.keyId - ? { ...DEFAULT_HEADER, kid: this.keyId } - : DEFAULT_HEADER; - const payload = Object.assign(defaultClaims, additionalClaims); - // Sign the jwt and add it to the cache - const signedJWT = jws.sign({ header, payload, secret: this.key }); - const headers = { Authorization: `Bearer ${signedJWT}` }; - this.cache.set(key, { - expiration: exp * 1000, - headers, - }); - return headers; + + debug('comp', this) + } + + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) } - /** - * Returns an expiration time for the JWT token. - * - * @param iat The issued at time for the JWT. - * @returns An expiration time for the JWT. - */ - static getExpirationTime(iat) { - const exp = iat + 3600; // 3600 seconds = 1 hour - return exp; + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' } - /** - * Create a JWTAccess credentials instance using the given input options. - * @param json The input object. - */ - fromJSON(json) { - if (!json) { - throw new Error('Must pass in a JSON object containing the service account auth settings.'); - } - if (!json.client_email) { - throw new Error('The incoming JSON object does not contain a client_email field'); - } - if (!json.private_key) { - throw new Error('The incoming JSON object does not contain a private_key field'); - } - // Extract the relevant information from the json key file. - this.email = json.client_email; - this.key = json.private_key; - this.keyId = json.private_key_id; - this.projectId = json.project_id; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) } - fromStream(inputStream, callback) { - if (callback) { - this.fromStreamAsync(inputStream).then(() => callback(), callback); - } - else { - return this.fromStreamAsync(inputStream); - } + } + + toString () { + return this.value + } + + test (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true } - fromStreamAsync(inputStream) { - return new Promise((resolve, reject) => { - if (!inputStream) { - reject(new Error('Must pass in a stream containing the service account auth settings.')); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('data', chunk => (s += chunk)) - .on('error', reject) - .on('end', () => { - try { - const data = JSON.parse(s); - this.fromJSON(data); - resolve(); - } - catch (err) { - reject(err); - } - }); - }); + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } } -} -exports.JWTAccess = JWTAccess; + return cmp(version, this.operator, this.semver, this.options) + } -/***/ }), + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } -/***/ 13959: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } -"use strict"; + options = parseOptions(options) -// Copyright 2013 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JWT = void 0; -const gtoken_1 = __nccwpck_require__(76031); -const jwtaccess_1 = __nccwpck_require__(68740); -const oauth2client_1 = __nccwpck_require__(3936); -const authclient_1 = __nccwpck_require__(44627); -class JWT extends oauth2client_1.OAuth2Client { - constructor(optionsOrEmail, keyFile, key, scopes, subject, keyId) { - const opts = optionsOrEmail && typeof optionsOrEmail === 'object' - ? optionsOrEmail - : { email: optionsOrEmail, keyFile, key, keyId, scopes, subject }; - super(opts); - this.email = opts.email; - this.keyFile = opts.keyFile; - this.key = opts.key; - this.keyId = opts.keyId; - this.scopes = opts.scopes; - this.subject = opts.subject; - this.additionalClaims = opts.additionalClaims; - // Start with an expired refresh token, which will automatically be - // refreshed before the first API call is made. - this.credentials = { refresh_token: 'jwt-placeholder', expiry_date: 1 }; + // Special cases where nothing can possibly be lower + if (options.includePrerelease && + (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { + return false } - /** - * Creates a copy of the credential with the specified scopes. - * @param scopes List of requested scopes or a single scope. - * @return The cloned instance. - */ - createScoped(scopes) { - const jwt = new JWT(this); - jwt.scopes = scopes; - return jwt; + if (!options.includePrerelease && + (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { + return false } - /** - * Obtains the metadata to be sent with the request. - * - * @param url the URI being authorized. - */ - async getRequestMetadataAsync(url) { - url = this.defaultServicePath ? `https://${this.defaultServicePath}/` : url; - const useSelfSignedJWT = (!this.hasUserScopes() && url) || - (this.useJWTAccessWithScope && this.hasAnyScopes()) || - this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; - if (this.subject && this.universeDomain !== authclient_1.DEFAULT_UNIVERSE) { - throw new RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${authclient_1.DEFAULT_UNIVERSE}`); - } - if (!this.apiKey && useSelfSignedJWT) { - if (this.additionalClaims && - this.additionalClaims.target_audience) { - const { tokens } = await this.refreshToken(); - return { - headers: this.addSharedMetadataHeaders({ - Authorization: `Bearer ${tokens.id_token}`, - }), - }; - } - else { - // no scopes have been set, but a uri has been provided. Use JWTAccess - // credentials. - if (!this.access) { - this.access = new jwtaccess_1.JWTAccess(this.email, this.key, this.keyId, this.eagerRefreshThresholdMillis); - } - let scopes; - if (this.hasUserScopes()) { - scopes = this.scopes; - } - else if (!url) { - scopes = this.defaultScopes; - } - const useScopes = this.useJWTAccessWithScope || - this.universeDomain !== authclient_1.DEFAULT_UNIVERSE; - const headers = await this.access.getRequestHeaders(url !== null && url !== void 0 ? url : undefined, this.additionalClaims, - // Scopes take precedent over audience for signing, - // so we only provide them if `useJWTAccessWithScope` is on or - // if we are in a non-default universe - useScopes ? scopes : undefined); - return { headers: this.addSharedMetadataHeaders(headers) }; - } - } - else if (this.hasAnyScopes() || this.apiKey) { - return super.getRequestMetadataAsync(url); - } - else { - // If no audience, apiKey, or scopes are provided, we should not attempt - // to populate any headers: - return { headers: {} }; - } + + // Same direction increasing (> or >=) + if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { + return true } - /** - * Fetches an ID token. - * @param targetAudience the audience for the fetched ID token. - */ - async fetchIdToken(targetAudience) { - // Create a new gToken for fetching an ID token - const gtoken = new gtoken_1.GoogleToken({ - iss: this.email, - sub: this.subject, - scope: this.scopes || this.defaultScopes, - keyFile: this.keyFile, - key: this.key, - additionalClaims: { target_audience: targetAudience }, - transporter: this.transporter, - }); - await gtoken.getToken({ - forceRefresh: true, - }); - if (!gtoken.idToken) { - throw new Error('Unknown error: Failed to fetch ID token'); - } - return gtoken.idToken; + // Same direction decreasing (< or <=) + if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { + return true } - /** - * Determine if there are currently scopes available. - */ - hasUserScopes() { - if (!this.scopes) { - return false; - } - return this.scopes.length > 0; + // same SemVer and both sides are inclusive (<= or >=) + if ( + (this.semver.version === comp.semver.version) && + this.operator.includes('=') && comp.operator.includes('=')) { + return true } - /** - * Are there any default or user scopes defined. - */ - hasAnyScopes() { - if (this.scopes && this.scopes.length > 0) - return true; - if (this.defaultScopes && this.defaultScopes.length > 0) - return true; - return false; + // opposite directions less than + if (cmp(this.semver, '<', comp.semver, options) && + this.operator.startsWith('>') && comp.operator.startsWith('<')) { + return true } - authorize(callback) { - if (callback) { - this.authorizeAsync().then(r => callback(null, r), callback); - } - else { - return this.authorizeAsync(); - } + // opposite directions greater than + if (cmp(this.semver, '>', comp.semver, options) && + this.operator.startsWith('<') && comp.operator.startsWith('>')) { + return true } - async authorizeAsync() { - const result = await this.refreshToken(); - if (!result) { - throw new Error('No result returned'); - } - this.credentials = result.tokens; - this.credentials.refresh_token = 'jwt-placeholder'; - this.key = this.gtoken.key; - this.email = this.gtoken.iss; - return result.tokens; + return false + } +} + +module.exports = Comparator + +const parseOptions = __nccwpck_require__(40785) +const { safeRe: re, t } = __nccwpck_require__(9523) +const cmp = __nccwpck_require__(75098) +const debug = __nccwpck_require__(50427) +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) + + +/***/ }), + +/***/ 9828: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SPACE_CHARACTERS = /\s+/g + +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) + + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } } - /** - * Refreshes the access token. - * @param refreshToken ignored - * @private - */ - async refreshTokenNoCache( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - refreshToken) { - const gtoken = this.createGToken(); - const token = await gtoken.getToken({ - forceRefresh: this.isTokenExpiring(), - }); - const tokens = { - access_token: token.access_token, - token_type: 'Bearer', - expiry_date: gtoken.expiresAt, - id_token: gtoken.idToken, - }; - this.emit('tokens', tokens); - return { res: null, tokens }; + + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.formatted = undefined + return this } - /** - * Create a gToken if it doesn't already exist. - */ - createGToken() { - if (!this.gtoken) { - this.gtoken = new gtoken_1.GoogleToken({ - iss: this.email, - sub: this.subject, - scope: this.scopes || this.defaultScopes, - keyFile: this.keyFile, - key: this.key, - additionalClaims: this.additionalClaims, - transporter: this.transporter, - }); - } - return this.gtoken; + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. + this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') + + // First, split on || + this.set = this.raw + .split('||') + // map the range to a 2d array of comparators + .map(r => this.parseRange(r.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) + + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`) } - /** - * Create a JWT credentials instance using the given input options. - * @param json The input object. - */ - fromJSON(json) { - if (!json) { - throw new Error('Must pass in a JSON object containing the service account auth settings.'); - } - if (!json.client_email) { - throw new Error('The incoming JSON object does not contain a client_email field'); - } - if (!json.private_key) { - throw new Error('The incoming JSON object does not contain a private_key field'); + + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) { + this.set = [first] + } else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } } - // Extract the relevant information from the json key file. - this.email = json.client_email; - this.key = json.private_key; - this.keyId = json.private_key_id; - this.projectId = json.project_id; - this.quotaProjectId = json.quota_project_id; - this.universeDomain = json.universe_domain || this.universeDomain; + } } - fromStream(inputStream, callback) { - if (callback) { - this.fromStreamAsync(inputStream).then(() => callback(), callback); - } - else { - return this.fromStreamAsync(inputStream); + + this.formatted = undefined + } + + get range () { + if (this.formatted === undefined) { + this.formatted = '' + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += '||' } - } - fromStreamAsync(inputStream) { - return new Promise((resolve, reject) => { - if (!inputStream) { - throw new Error('Must pass in a stream containing the service account auth settings.'); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('error', reject) - .on('data', chunk => (s += chunk)) - .on('end', () => { - try { - const data = JSON.parse(s); - this.fromJSON(data); - resolve(); - } - catch (e) { - reject(e); - } - }); - }); - } - /** - * Creates a JWT credentials instance using an API Key for authentication. - * @param apiKey The API Key in string form. - */ - fromAPIKey(apiKey) { - if (typeof apiKey !== 'string') { - throw new Error('Must provide an API Key string.'); + const comps = this.set[i] + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += ' ' + } + this.formatted += comps[k].toString().trim() } - this.apiKey = apiKey; + } } - /** - * Using the key or keyFile on the JWT client, obtain an object that contains - * the key and the client email. - */ - async getCredentials() { - if (this.key) { - return { private_key: this.key, client_email: this.email }; - } - else if (this.keyFile) { - const gtoken = this.createGToken(); - const creds = await gtoken.getCredentials(this.keyFile); - return { private_key: creds.privateKey, client_email: creds.clientEmail }; - } - throw new Error('A key or a keyFile must be provided to getCredentials.'); + return this.formatted + } + + format () { + return this.range + } + + toString () { + return this.range + } + + parseRange (range) { + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = + (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | + (this.options.loose && FLAG_LOOSE) + const memoKey = memoOpts + ':' + range + const cached = cache.get(memoKey) + if (cached) { + return cached } -} -exports.JWT = JWT; + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) -/***/ }), + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range) -/***/ 74524: -/***/ ((__unused_webpack_module, exports) => { + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + debug('tilde trim', range) -"use strict"; + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + debug('caret trim', range) -// Copyright 2014 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LoginTicket = void 0; -class LoginTicket { - /** - * Create a simple class to extract user ID from an ID Token - * - * @param {string} env Envelope of the jwt - * @param {TokenPayload} pay Payload of the jwt - * @constructor - */ - constructor(env, pay) { - this.envelope = env; - this.payload = pay; + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + let rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) + + if (loose) { + // in loose mode, throw out any that are not valid comparators + rangeList = rangeList.filter(comp => { + debug('loose invalid filter', comp, this.options) + return !!comp.match(re[t.COMPARATORLOOSE]) + }) } - getEnvelope() { - return this.envelope; + debug('range list', rangeList) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const rangeMap = new Map() + const comparators = rangeList.map(comp => new Comparator(comp, this.options)) + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp] + } + rangeMap.set(comp.value, comp) } - getPayload() { - return this.payload; + if (rangeMap.size > 1 && rangeMap.has('')) { + rangeMap.delete('') } - /** - * Create a simple class to extract user ID from an ID Token - * - * @return The user ID - */ - getUserId() { - const payload = this.getPayload(); - if (payload && payload.sub) { - return payload.sub; - } - return null; + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') } - /** - * Returns attributes from the login ticket. This can contain - * various information about the user session. - * - * @return The envelope and payload - */ - getAttributes() { - return { envelope: this.getEnvelope(), payload: this.getPayload() }; + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } } + return false + } } -exports.LoginTicket = LoginTicket; +module.exports = Range -/***/ }), +const LRU = __nccwpck_require__(15339) +const cache = new LRU() -/***/ 3936: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const parseOptions = __nccwpck_require__(40785) +const Comparator = __nccwpck_require__(91532) +const debug = __nccwpck_require__(50427) +const SemVer = __nccwpck_require__(48088) +const { + safeRe: re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace, +} = __nccwpck_require__(9523) +const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(42293) -"use strict"; +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OAuth2Client = exports.CertificateFormat = exports.CodeChallengeMethod = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const querystring = __nccwpck_require__(63477); -const stream = __nccwpck_require__(12781); -const formatEcdsa = __nccwpck_require__(11728); -const crypto_1 = __nccwpck_require__(78043); -const authclient_1 = __nccwpck_require__(44627); -const loginticket_1 = __nccwpck_require__(74524); -var CodeChallengeMethod; -(function (CodeChallengeMethod) { - CodeChallengeMethod["Plain"] = "plain"; - CodeChallengeMethod["S256"] = "S256"; -})(CodeChallengeMethod || (exports.CodeChallengeMethod = CodeChallengeMethod = {})); -var CertificateFormat; -(function (CertificateFormat) { - CertificateFormat["PEM"] = "PEM"; - CertificateFormat["JWK"] = "JWK"; -})(CertificateFormat || (exports.CertificateFormat = CertificateFormat = {})); -class OAuth2Client extends authclient_1.AuthClient { - constructor(optionsOrClientId, clientSecret, redirectUri) { - const opts = optionsOrClientId && typeof optionsOrClientId === 'object' - ? optionsOrClientId - : { clientId: optionsOrClientId, clientSecret, redirectUri }; - super(opts); - this.certificateCache = {}; - this.certificateExpiry = null; - this.certificateCacheFormat = CertificateFormat.PEM; - this.refreshTokenPromises = new Map(); - this._clientId = opts.clientId; - this._clientSecret = opts.clientSecret; - this.redirectUri = opts.redirectUri; - this.endpoints = { - tokenInfoUrl: 'https://oauth2.googleapis.com/tokeninfo', - oauth2AuthBaseUrl: 'https://accounts.google.com/o/oauth2/v2/auth', - oauth2TokenUrl: 'https://oauth2.googleapis.com/token', - oauth2RevokeUrl: 'https://oauth2.googleapis.com/revoke', - oauth2FederatedSignonPemCertsUrl: 'https://www.googleapis.com/oauth2/v1/certs', - oauth2FederatedSignonJwkCertsUrl: 'https://www.googleapis.com/oauth2/v3/certs', - oauth2IapPublicKeyUrl: 'https://www.gstatic.com/iap/verify/public_key', - ...opts.endpoints, - }; - this.issuers = opts.issuers || [ - 'accounts.google.com', - 'https://accounts.google.com', - this.universeDomain, - ]; - } - /** - * Generates URL for consent page landing. - * @param opts Options. - * @return URL to consent page. - */ - generateAuthUrl(opts = {}) { - if (opts.code_challenge_method && !opts.code_challenge) { - throw new Error('If a code_challenge_method is provided, code_challenge must be included.'); - } - opts.response_type = opts.response_type || 'code'; - opts.client_id = opts.client_id || this._clientId; - opts.redirect_uri = opts.redirect_uri || this.redirectUri; - // Allow scopes to be passed either as array or a string - if (Array.isArray(opts.scope)) { - opts.scope = opts.scope.join(' '); - } - const rootUrl = this.endpoints.oauth2AuthBaseUrl.toString(); - return (rootUrl + - '?' + - querystring.stringify(opts)); - } - generateCodeVerifier() { - // To make the code compatible with browser SubtleCrypto we need to make - // this method async. - throw new Error('generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.'); - } - /** - * Convenience method to automatically generate a code_verifier, and its - * resulting SHA256. If used, this must be paired with a S256 - * code_challenge_method. - * - * For a full example see: - * https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/oauth2-codeVerifier.js - */ - async generateCodeVerifierAsync() { - // base64 encoding uses 6 bits per character, and we want to generate128 - // characters. 6*128/8 = 96. - const crypto = (0, crypto_1.createCrypto)(); - const randomString = crypto.randomBytesBase64(96); - // The valid characters in the code_verifier are [A-Z]/[a-z]/[0-9]/ - // "-"/"."/"_"/"~". Base64 encoded strings are pretty close, so we're just - // swapping out a few chars. - const codeVerifier = randomString - .replace(/\+/g, '~') - .replace(/=/g, '_') - .replace(/\//g, '-'); - // Generate the base64 encoded SHA256 - const unencodedCodeChallenge = await crypto.sha256DigestBase64(codeVerifier); - // We need to use base64UrlEncoding instead of standard base64 - const codeChallenge = unencodedCodeChallenge - .split('=')[0] - .replace(/\+/g, '-') - .replace(/\//g, '_'); - return { codeVerifier, codeChallenge }; - } - getToken(codeOrOptions, callback) { - const options = typeof codeOrOptions === 'string' ? { code: codeOrOptions } : codeOrOptions; - if (callback) { - this.getTokenAsync(options).then(r => callback(null, r.tokens, r.res), e => callback(e, null, e.response)); - } - else { - return this.getTokenAsync(options); - } - } - async getTokenAsync(options) { - const url = this.endpoints.oauth2TokenUrl.toString(); - const values = { - code: options.code, - client_id: options.client_id || this._clientId, - client_secret: this._clientSecret, - redirect_uri: options.redirect_uri || this.redirectUri, - grant_type: 'authorization_code', - code_verifier: options.codeVerifier, - }; - const res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - method: 'POST', - url, - data: querystring.stringify(values), - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - }); - const tokens = res.data; - if (res.data && res.data.expires_in) { - tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; - delete tokens.expires_in; - } - this.emit('tokens', tokens); - return { tokens, res }; +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +// ~0.0.1 --> >=0.0.1 <0.1.0-0 +const replaceTildes = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceTilde(c, options)) + .join(' ') +} + +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` } - /** - * Refreshes the access token. - * @param refresh_token Existing refresh token. - * @private - */ - async refreshToken(refreshToken) { - if (!refreshToken) { - return this.refreshTokenNoCache(refreshToken); + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +// ^0.0.1 --> >=0.0.1 <0.0.2-0 +// ^0.1.0 --> >=0.1.0 <0.2.0-0 +const replaceCarets = (comp, options) => { + return comp + .trim() + .split(/\s+/) + .map((c) => replaceCaret(c, options)) + .join(' ') +} + +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` } - // If a request to refresh using the same token has started, - // return the same promise. - if (this.refreshTokenPromises.has(refreshToken)) { - return this.refreshTokenPromises.get(refreshToken); + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` } - const p = this.refreshTokenNoCache(refreshToken).then(r => { - this.refreshTokenPromises.delete(refreshToken); - return r; - }, e => { - this.refreshTokenPromises.delete(refreshToken); - throw e; - }); - this.refreshTokenPromises.set(refreshToken, p); - return p; + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } } - async refreshTokenNoCache(refreshToken) { - var _a; - if (!refreshToken) { - throw new Error('No refresh token is set.'); - } - const url = this.endpoints.oauth2TokenUrl.toString(); - const data = { - refresh_token: refreshToken, - client_id: this._clientId, - client_secret: this._clientSecret, - grant_type: 'refresh_token', - }; - let res; - try { - // request for new token - res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - method: 'POST', - url, - data: querystring.stringify(data), - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - }); - } - catch (e) { - if (e instanceof gaxios_1.GaxiosError && - e.message === 'invalid_grant' && - ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) && - /ReAuth/i.test(e.response.data.error_description)) { - e.message = JSON.stringify(e.response.data); - } - throw e; - } - const tokens = res.data; - // TODO: de-duplicate this code from a few spots - if (res.data && res.data.expires_in) { - tokens.expiry_date = new Date().getTime() + res.data.expires_in * 1000; - delete tokens.expires_in; - } - this.emit('tokens', tokens); - return { tokens, res }; + + debug('caret return', ret) + return ret + }) +} + +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp + .split(/\s+/) + .map((c) => replaceXRange(c, options)) + .join(' ') +} + +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' } - refreshAccessToken(callback) { - if (callback) { - this.refreshAccessTokenAsync().then(r => callback(null, r.credentials, r.res), callback); + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 } - else { - return this.refreshAccessTokenAsync(); + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 } + } + + if (gtlt === '<') { + pr = '-0' + } + + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` } - async refreshAccessTokenAsync() { - const r = await this.refreshToken(this.credentials.refresh_token); - const tokens = r.tokens; - tokens.refresh_token = this.credentials.refresh_token; - this.credentials = tokens; - return { credentials: this.credentials, res: r.res }; - } - getAccessToken(callback) { - if (callback) { - this.getAccessTokenAsync().then(r => callback(null, r.token, r.res), callback); - } - else { - return this.getAccessTokenAsync(); - } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp + .trim() + .replace(re[t.STAR], '') +} + +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp + .trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +// TODO build? +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } + + return `${from} ${to}`.trim() +} + +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false } - async getAccessTokenAsync() { - const shouldRefresh = !this.credentials.access_token || this.isTokenExpiring(); - if (shouldRefresh) { - if (!this.credentials.refresh_token) { - if (this.refreshHandler) { - const refreshedAccessToken = await this.processAndValidateRefreshHandler(); - if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { - this.setCredentials(refreshedAccessToken); - return { token: this.credentials.access_token }; - } - } - else { - throw new Error('No refresh token or refresh handler callback is set.'); - } - } - const r = await this.refreshAccessTokenAsync(); - if (!r.credentials || (r.credentials && !r.credentials.access_token)) { - throw new Error('Could not refresh access token.'); - } - return { token: r.credentials.access_token, res: r.res }; - } - else { - return { token: this.credentials.access_token }; + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true } + } } - /** - * The main authentication interface. It takes an optional url which when - * present is the endpoint being accessed, and returns a Promise which - * resolves with authorization header fields. - * - * In OAuth2Client, the result has the form: - * { Authorization: 'Bearer ' } - * @param url The optional url being authorized - */ - async getRequestHeaders(url) { - const headers = (await this.getRequestMetadataAsync(url)).headers; - return headers; + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + + +/***/ }), + +/***/ 48088: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const debug = __nccwpck_require__(50427) +const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(42293) +const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(9523) + +const parseOptions = __nccwpck_require__(40785) +const { compareIdentifiers } = __nccwpck_require__(92463) +class SemVer { + constructor (version, options) { + options = parseOptions(options) + + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) } - async getRequestMetadataAsync( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - url) { - const thisCreds = this.credentials; - if (!thisCreds.access_token && - !thisCreds.refresh_token && - !this.apiKey && - !this.refreshHandler) { - throw new Error('No access, refresh token, API key or refresh handler callback is set.'); - } - if (thisCreds.access_token && !this.isTokenExpiring()) { - thisCreds.token_type = thisCreds.token_type || 'Bearer'; - const headers = { - Authorization: thisCreds.token_type + ' ' + thisCreds.access_token, - }; - return { headers: this.addSharedMetadataHeaders(headers) }; - } - // If refreshHandler exists, call processAndValidateRefreshHandler(). - if (this.refreshHandler) { - const refreshedAccessToken = await this.processAndValidateRefreshHandler(); - if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { - this.setCredentials(refreshedAccessToken); - const headers = { - Authorization: 'Bearer ' + this.credentials.access_token, - }; - return { headers: this.addSharedMetadataHeaders(headers) }; - } - } - if (this.apiKey) { - return { headers: { 'X-Goog-Api-Key': this.apiKey } }; - } - let r = null; - let tokens = null; - try { - r = await this.refreshToken(thisCreds.refresh_token); - tokens = r.tokens; - } - catch (err) { - const e = err; - if (e.response && - (e.response.status === 403 || e.response.status === 404)) { - e.message = `Could not refresh access token: ${e.message}`; - } - throw e; - } - const credentials = this.credentials; - credentials.token_type = credentials.token_type || 'Bearer'; - tokens.refresh_token = credentials.refresh_token; - this.credentials = tokens; - const headers = { - Authorization: credentials.token_type + ' ' + tokens.access_token, - }; - return { headers: this.addSharedMetadataHeaders(headers), res: r.res }; + + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) } - /** - * Generates an URL to revoke the given token. - * @param token The existing token to be revoked. - * - * @deprecated use instance method {@link OAuth2Client.getRevokeTokenURL} - */ - static getRevokeTokenUrl(token) { - return new OAuth2Client().getRevokeTokenURL(token).toString(); + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) } - /** - * Generates a URL to revoke the given token. - * - * @param token The existing token to be revoked. - */ - getRevokeTokenURL(token) { - const url = new URL(this.endpoints.oauth2RevokeUrl); - url.searchParams.append('token', token); - return url; + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') } - revokeToken(token, callback) { - const opts = { - ...OAuth2Client.RETRY_CONFIG, - url: this.getRevokeTokenURL(token).toString(), - method: 'POST', - }; - if (callback) { - this.transporter - .request(opts) - .then(r => callback(null, r), callback); - } - else { - return this.transporter.request(opts); - } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') } - revokeCredentials(callback) { - if (callback) { - this.revokeCredentialsAsync().then(res => callback(null, res), callback); - } - else { - return this.revokeCredentialsAsync(); - } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') } - async revokeCredentialsAsync() { - const token = this.credentials.access_token; - this.credentials = {}; - if (token) { - return this.revokeToken(token); - } - else { - throw new Error('No access token to revoke.'); + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } } + return id + }) } - request(opts, callback) { - if (callback) { - this.requestAsync(opts).then(r => callback(null, r), e => { - return callback(e, e.response); - }); - } - else { - return this.requestAsync(opts); - } + + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` } - async requestAsync(opts, reAuthRetried = false) { - let r2; - try { - const r = await this.getRequestMetadataAsync(opts.url); - opts.headers = opts.headers || {}; - if (r.headers && r.headers['x-goog-user-project']) { - opts.headers['x-goog-user-project'] = r.headers['x-goog-user-project']; - } - if (r.headers && r.headers.Authorization) { - opts.headers.Authorization = r.headers.Authorization; - } - if (this.apiKey) { - opts.headers['X-Goog-Api-Key'] = this.apiKey; - } - r2 = await this.transporter.request(opts); - } - catch (e) { - const res = e.response; - if (res) { - const statusCode = res.status; - // Retry the request for metadata if the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - An access_token and refresh_token were available, but either no - // expiry_date was available or the forceRefreshOnFailure flag is set. - // The absent expiry_date case can happen when developers stash the - // access_token and refresh_token for later use, but the access_token - // fails on the first try because it's expired. Some developers may - // choose to enable forceRefreshOnFailure to mitigate time-related - // errors. - // Or the following criteria are true: - // - We haven't already retried. It only makes sense to retry once. - // - The response was a 401 or a 403 - // - The request didn't send a readableStream - // - No refresh_token was available - // - An access_token and a refreshHandler callback were available, but - // either no expiry_date was available or the forceRefreshOnFailure - // flag is set. The access_token fails on the first try because it's - // expired. Some developers may choose to enable forceRefreshOnFailure - // to mitigate time-related errors. - const mayRequireRefresh = this.credentials && - this.credentials.access_token && - this.credentials.refresh_token && - (!this.credentials.expiry_date || this.forceRefreshOnFailure); - const mayRequireRefreshWithNoRefreshToken = this.credentials && - this.credentials.access_token && - !this.credentials.refresh_token && - (!this.credentials.expiry_date || this.forceRefreshOnFailure) && - this.refreshHandler; - const isReadableStream = res.config.data instanceof stream.Readable; - const isAuthErr = statusCode === 401 || statusCode === 403; - if (!reAuthRetried && - isAuthErr && - !isReadableStream && - mayRequireRefresh) { - await this.refreshAccessTokenAsync(); - return this.requestAsync(opts, true); - } - else if (!reAuthRetried && - isAuthErr && - !isReadableStream && - mayRequireRefreshWithNoRefreshToken) { - const refreshedAccessToken = await this.processAndValidateRefreshHandler(); - if (refreshedAccessToken === null || refreshedAccessToken === void 0 ? void 0 : refreshedAccessToken.access_token) { - this.setCredentials(refreshedAccessToken); - } - return this.requestAsync(opts, true); - } - } - throw e; - } - return r2; + return this.version + } + + toString () { + return this.version + } + + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) } - verifyIdToken(options, callback) { - // This function used to accept two arguments instead of an options object. - // Check the types to help users upgrade with less pain. - // This check can be removed after a 2.0 release. - if (callback && typeof callback !== 'function') { - throw new Error('This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.'); - } - if (callback) { - this.verifyIdTokenAsync(options).then(r => callback(null, r), callback); - } - else { - return this.verifyIdTokenAsync(options); - } + + if (other.version === this.version) { + return 0 } - async verifyIdTokenAsync(options) { - if (!options.idToken) { - throw new Error('The verifyIdToken method requires an ID Token'); - } - const response = await this.getFederatedSignonCertsAsync(); - const login = await this.verifySignedJwtWithCertsAsync(options.idToken, response.certs, options.audience, this.issuers, options.maxExpiry); - return login; + + return this.compareMain(other) || this.comparePre(other) + } + + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) } - /** - * Obtains information about the provisioned access token. Especially useful - * if you want to check the scopes that were provisioned to a given token. - * - * @param accessToken Required. The Access Token for which you want to get - * user info. - */ - async getTokenInfo(accessToken) { - const { data } = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - method: 'POST', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - Authorization: `Bearer ${accessToken}`, - }, - url: this.endpoints.tokenInfoUrl.toString(), - }); - const info = Object.assign({ - expiry_date: new Date().getTime() + data.expires_in * 1000, - scopes: data.scope.split(' '), - }, data); - delete info.expires_in; - delete info.scope; - return info; + + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } + + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) } - getFederatedSignonCerts(callback) { - if (callback) { - this.getFederatedSignonCertsAsync().then(r => callback(null, r.certs, r.res), callback); - } - else { - return this.getFederatedSignonCertsAsync(); - } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 } - async getFederatedSignonCertsAsync() { - const nowTime = new Date().getTime(); - const format = (0, crypto_1.hasBrowserCrypto)() - ? CertificateFormat.JWK - : CertificateFormat.PEM; - if (this.certificateExpiry && - nowTime < this.certificateExpiry.getTime() && - this.certificateCacheFormat === format) { - return { certs: this.certificateCache, format }; - } - let res; - let url; - switch (format) { - case CertificateFormat.PEM: - url = this.endpoints.oauth2FederatedSignonPemCertsUrl.toString(); - break; - case CertificateFormat.JWK: - url = this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString(); - break; - default: - throw new Error(`Unsupported certificate format ${format}`); - } - try { - res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - url, - }); - } - catch (e) { - if (e instanceof Error) { - e.message = `Failed to retrieve verification certificates: ${e.message}`; - } - throw e; - } - const cacheControl = res ? res.headers['cache-control'] : undefined; - let cacheAge = -1; - if (cacheControl) { - const pattern = new RegExp('max-age=([0-9]*)'); - const regexResult = pattern.exec(cacheControl); - if (regexResult && regexResult.length === 2) { - // Cache results with max-age (in seconds) - cacheAge = Number(regexResult[1]) * 1000; // milliseconds - } - } - let certificates = {}; - switch (format) { - case CertificateFormat.PEM: - certificates = res.data; - break; - case CertificateFormat.JWK: - for (const key of res.data.keys) { - certificates[key.kid] = key; - } - break; - default: - throw new Error(`Unsupported certificate format ${format}`); - } - const now = new Date(); - this.certificateExpiry = - cacheAge === -1 ? null : new Date(now.getTime() + cacheAge); - this.certificateCache = certificates; - this.certificateCacheFormat = format; - return { certs: certificates, format, res }; + + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) } - getIapPublicKeys(callback) { - if (callback) { - this.getIapPublicKeysAsync().then(r => callback(null, r.pubkeys, r.res), callback); - } - else { - return this.getIapPublicKeysAsync(); + + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('build compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier, identifierBase) { + if (release.startsWith('pre')) { + if (!identifier && identifierBase === false) { + throw new Error('invalid increment argument: identifier is empty') + } + // Avoid an invalid semver results + if (identifier) { + const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`) + const match = `-${identifier}`.match(r) + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`) } + } } - async getIapPublicKeysAsync() { - let res; - const url = this.endpoints.oauth2IapPublicKeyUrl.toString(); - try { - res = await this.transporter.request({ - ...OAuth2Client.RETRY_CONFIG, - url, - }); + + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier, identifierBase) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier, identifierBase) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier, identifierBase) + this.inc('pre', identifier, identifierBase) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier, identifierBase) } - catch (e) { - if (e instanceof Error) { - e.message = `Failed to retrieve verification certificates: ${e.message}`; - } - throw e; + this.inc('pre', identifier, identifierBase) + break + case 'release': + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`) } - return { pubkeys: res.data, res }; - } - verifySignedJwtWithCerts() { - // To make the code compatible with browser SubtleCrypto we need to make - // this method async. - throw new Error('verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.'); - } - /** - * Verify the id token is signed with the correct certificate - * and is from the correct audience. - * @param jwt The jwt to verify (The ID Token in this case). - * @param certs The array of certs to test the jwt against. - * @param requiredAudience The audience to test the jwt against. - * @param issuers The allowed issuers of the jwt (Optional). - * @param maxExpiry The max expiry the certificate can be (Optional). - * @return Returns a promise resolving to LoginTicket on verification. - */ - async verifySignedJwtWithCertsAsync(jwt, certs, requiredAudience, issuers, maxExpiry) { - const crypto = (0, crypto_1.createCrypto)(); - if (!maxExpiry) { - maxExpiry = OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_; + this.prerelease.length = 0 + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ } - const segments = jwt.split('.'); - if (segments.length !== 3) { - throw new Error('Wrong number of segments in token: ' + jwt); + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ } - const signed = segments[0] + '.' + segments[1]; - let signature = segments[2]; - let envelope; - let payload; - try { - envelope = JSON.parse(crypto.decodeBase64StringUtf8(segments[0])); + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ } - catch (err) { - if (err instanceof Error) { - err.message = `Can't parse token envelope: ${segments[0]}': ${err.message}`; + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': { + const base = Number(identifierBase) ? 1 : 0 + + if (this.prerelease.length === 0) { + this.prerelease = [base] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 } - throw err; - } - if (!envelope) { - throw new Error("Can't parse token envelope: " + segments[0]); - } - try { - payload = JSON.parse(crypto.decodeBase64StringUtf8(segments[1])); - } - catch (err) { - if (err instanceof Error) { - err.message = `Can't parse token payload '${segments[0]}`; + } + if (i === -1) { + // didn't increment anything + if (identifier === this.prerelease.join('.') && identifierBase === false) { + throw new Error('invalid increment argument: identifier already exists') } - throw err; - } - if (!payload) { - throw new Error("Can't parse token payload: " + segments[1]); - } - if (!Object.prototype.hasOwnProperty.call(certs, envelope.kid)) { - // If this is not present, then there's no reason to attempt verification - throw new Error('No pem found for envelope: ' + JSON.stringify(envelope)); - } - const cert = certs[envelope.kid]; - if (envelope.alg === 'ES256') { - signature = formatEcdsa.joseToDer(signature, 'ES256').toString('base64'); - } - const verified = await crypto.verify(cert, signed, signature); - if (!verified) { - throw new Error('Invalid token signature: ' + jwt); - } - if (!payload.iat) { - throw new Error('No issue time in token: ' + JSON.stringify(payload)); - } - if (!payload.exp) { - throw new Error('No expiration time in token: ' + JSON.stringify(payload)); - } - const iat = Number(payload.iat); - if (isNaN(iat)) - throw new Error('iat field using invalid format'); - const exp = Number(payload.exp); - if (isNaN(exp)) - throw new Error('exp field using invalid format'); - const now = new Date().getTime() / 1000; - if (exp >= now + maxExpiry) { - throw new Error('Expiration time too far in future: ' + JSON.stringify(payload)); - } - const earliest = iat - OAuth2Client.CLOCK_SKEW_SECS_; - const latest = exp + OAuth2Client.CLOCK_SKEW_SECS_; - if (now < earliest) { - throw new Error('Token used too early, ' + - now + - ' < ' + - earliest + - ': ' + - JSON.stringify(payload)); - } - if (now > latest) { - throw new Error('Token used too late, ' + - now + - ' > ' + - latest + - ': ' + - JSON.stringify(payload)); - } - if (issuers && issuers.indexOf(payload.iss) < 0) { - throw new Error('Invalid issuer, expected one of [' + - issuers + - '], but got ' + - payload.iss); + this.prerelease.push(base) + } } - // Check the audience matches if we have one - if (typeof requiredAudience !== 'undefined' && requiredAudience !== null) { - const aud = payload.aud; - let audVerified = false; - // If the requiredAudience is an array, check if it contains token - // audience - if (requiredAudience.constructor === Array) { - audVerified = requiredAudience.indexOf(aud) > -1; - } - else { - audVerified = aud === requiredAudience; - } - if (!audVerified) { - throw new Error('Wrong recipient, payload audience != requiredAudience'); + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + let prerelease = [identifier, base] + if (identifierBase === false) { + prerelease = [identifier] + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease } + } else { + this.prerelease = prerelease + } } - return new loginticket_1.LoginTicket(envelope, payload); + break + } + default: + throw new Error(`invalid increment argument: ${release}`) } - /** - * Returns a promise that resolves with AccessTokenResponse type if - * refreshHandler is defined. - * If not, nothing is returned. - */ - async processAndValidateRefreshHandler() { - if (this.refreshHandler) { - const accessTokenResponse = await this.refreshHandler(); - if (!accessTokenResponse.access_token) { - throw new Error('No access token is returned by the refreshHandler callback.'); - } - return accessTokenResponse; - } - return; + this.raw = this.format() + if (this.build.length) { + this.raw += `+${this.build.join('.')}` } - /** - * Returns true if a token is expired or will expire within - * eagerRefreshThresholdMillismilliseconds. - * If there is no expiry time, assumes the token is not expired or expiring. - */ - isTokenExpiring() { - const expiryDate = this.credentials.expiry_date; - return expiryDate - ? expiryDate <= new Date().getTime() + this.eagerRefreshThresholdMillis - : false; + return this + } +} + +module.exports = SemVer + + +/***/ }), + +/***/ 48848: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const parse = __nccwpck_require__(75925) +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} +module.exports = clean + + +/***/ }), + +/***/ 75098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const eq = __nccwpck_require__(91898) +const neq = __nccwpck_require__(6017) +const gt = __nccwpck_require__(84123) +const gte = __nccwpck_require__(15522) +const lt = __nccwpck_require__(80194) +const lte = __nccwpck_require__(77520) + +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a === b + + case '!==': + if (typeof a === 'object') { + a = a.version + } + if (typeof b === 'object') { + b = b.version + } + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp + + +/***/ }), + +/***/ 13466: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const parse = __nccwpck_require__(75925) +const { safeRe: re, t } = __nccwpck_require__(9523) + +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + let match = null + if (!options.rtl) { + match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] + let next + while ((next = coerceRtlRegex.exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + coerceRtlRegex.lastIndex = -1 + } + + if (match === null) { + return null + } + + const major = match[2] + const minor = match[3] || '0' + const patch = match[4] || '0' + const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' + const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' + + return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) +} +module.exports = coerce + + +/***/ }), + +/***/ 92156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} +module.exports = compareBuild + + +/***/ }), + +/***/ 62804: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose + + +/***/ }), + +/***/ 44309: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + +module.exports = compare + + +/***/ }), + +/***/ 64297: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const parse = __nccwpck_require__(75925) + +const diff = (version1, version2) => { + const v1 = parse(version1, null, true) + const v2 = parse(version2, null, true) + const comparison = v1.compare(v2) + + if (comparison === 0) { + return null + } + + const v1Higher = comparison > 0 + const highVersion = v1Higher ? v1 : v2 + const lowVersion = v1Higher ? v2 : v1 + const highHasPre = !!highVersion.prerelease.length + const lowHasPre = !!lowVersion.prerelease.length + + if (lowHasPre && !highHasPre) { + // Going from prerelease -> no prerelease requires some special casing + + // If the low version has only a major, then it will always be a major + // Some examples: + // 1.0.0-1 -> 1.0.0 + // 1.0.0-1 -> 1.1.1 + // 1.0.0-1 -> 2.0.0 + if (!lowVersion.patch && !lowVersion.minor) { + return 'major' + } + + // If the main part has no difference + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return 'minor' + } + return 'patch' + } + } + + // add the `pre` prefix if we are going to a prerelease version + const prefix = highHasPre ? 'pre' : '' + + if (v1.major !== v2.major) { + return prefix + 'major' + } + + if (v1.minor !== v2.minor) { + return prefix + 'minor' + } + + if (v1.patch !== v2.patch) { + return prefix + 'patch' + } + + // high and low are preleases + return 'prerelease' +} + +module.exports = diff + + +/***/ }), + +/***/ 91898: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq + + +/***/ }), + +/***/ 84123: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt + + +/***/ }), + +/***/ 15522: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte + + +/***/ }), + +/***/ 30900: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) + +const inc = (version, release, options, identifier, identifierBase) => { + if (typeof (options) === 'string') { + identifierBase = identifier + identifier = options + options = undefined + } + + try { + return new SemVer( + version instanceof SemVer ? version.version : version, + options + ).inc(release, identifier, identifierBase).version + } catch (er) { + return null + } +} +module.exports = inc + + +/***/ }), + +/***/ 80194: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt + + +/***/ }), + +/***/ 77520: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte + + +/***/ }), + +/***/ 76688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major + + +/***/ }), + +/***/ 38447: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor + + +/***/ }), + +/***/ 6017: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq + + +/***/ }), + +/***/ 75925: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const parse = (version, options, throwErrors = false) => { + if (version instanceof SemVer) { + return version + } + try { + return new SemVer(version, options) + } catch (er) { + if (!throwErrors) { + return null } + throw er + } +} + +module.exports = parse + + +/***/ }), + +/***/ 42866: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch + + +/***/ }), + +/***/ 24016: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const parse = __nccwpck_require__(75925) +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease + + +/***/ }), + +/***/ 76417: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compare = __nccwpck_require__(44309) +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare + + +/***/ }), + +/***/ 8701: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compareBuild = __nccwpck_require__(92156) +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort + + +/***/ }), + +/***/ 6055: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Range = __nccwpck_require__(9828) +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} +module.exports = satisfies + + +/***/ }), + +/***/ 61426: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const compareBuild = __nccwpck_require__(92156) +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort + + +/***/ }), + +/***/ 19601: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const parse = __nccwpck_require__(75925) +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null +} +module.exports = valid + + +/***/ }), + +/***/ 11383: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// just pre-load all the stuff that index.js lazily exports +const internalRe = __nccwpck_require__(9523) +const constants = __nccwpck_require__(42293) +const SemVer = __nccwpck_require__(48088) +const identifiers = __nccwpck_require__(92463) +const parse = __nccwpck_require__(75925) +const valid = __nccwpck_require__(19601) +const clean = __nccwpck_require__(48848) +const inc = __nccwpck_require__(30900) +const diff = __nccwpck_require__(64297) +const major = __nccwpck_require__(76688) +const minor = __nccwpck_require__(38447) +const patch = __nccwpck_require__(42866) +const prerelease = __nccwpck_require__(24016) +const compare = __nccwpck_require__(44309) +const rcompare = __nccwpck_require__(76417) +const compareLoose = __nccwpck_require__(62804) +const compareBuild = __nccwpck_require__(92156) +const sort = __nccwpck_require__(61426) +const rsort = __nccwpck_require__(8701) +const gt = __nccwpck_require__(84123) +const lt = __nccwpck_require__(80194) +const eq = __nccwpck_require__(91898) +const neq = __nccwpck_require__(6017) +const gte = __nccwpck_require__(15522) +const lte = __nccwpck_require__(77520) +const cmp = __nccwpck_require__(75098) +const coerce = __nccwpck_require__(13466) +const Comparator = __nccwpck_require__(91532) +const Range = __nccwpck_require__(9828) +const satisfies = __nccwpck_require__(6055) +const toComparators = __nccwpck_require__(52706) +const maxSatisfying = __nccwpck_require__(20579) +const minSatisfying = __nccwpck_require__(10832) +const minVersion = __nccwpck_require__(34179) +const validRange = __nccwpck_require__(2098) +const outside = __nccwpck_require__(60420) +const gtr = __nccwpck_require__(9380) +const ltr = __nccwpck_require__(33323) +const intersects = __nccwpck_require__(27008) +const simplifyRange = __nccwpck_require__(75297) +const subset = __nccwpck_require__(7863) +module.exports = { + parse, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers, +} + + +/***/ }), + +/***/ 42293: +/***/ ((module) => { + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' + +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || +/* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 + +// Max safe length for a build identifier. The max length minus 6 characters for +// the shortest version with a build 0.0.0+BUILD. +const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + +const RELEASE_TYPES = [ + 'major', + 'premajor', + 'minor', + 'preminor', + 'patch', + 'prepatch', + 'prerelease', +] + +module.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 0b001, + FLAG_LOOSE: 0b010, } -exports.OAuth2Client = OAuth2Client; -/** - * @deprecated use instance's {@link OAuth2Client.endpoints} - */ -OAuth2Client.GOOGLE_TOKEN_INFO_URL = 'https://oauth2.googleapis.com/tokeninfo'; -/** - * Clock skew - five minutes in seconds - */ -OAuth2Client.CLOCK_SKEW_SECS_ = 300; -/** - * The default max Token Lifetime is one day in seconds - */ -OAuth2Client.DEFAULT_MAX_TOKEN_LIFETIME_SECS_ = 86400; /***/ }), -/***/ 19510: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 50427: +/***/ ((module) => { -"use strict"; +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getErrorFromOAuthErrorResponse = exports.OAuthClientAuthHandler = void 0; -const querystring = __nccwpck_require__(63477); -const crypto_1 = __nccwpck_require__(78043); -/** List of HTTP methods that accept request bodies. */ -const METHODS_SUPPORTING_REQUEST_BODY = ['PUT', 'POST', 'PATCH']; -/** - * Abstract class for handling client authentication in OAuth-based - * operations. - * When request-body client authentication is used, only application/json and - * application/x-www-form-urlencoded content types for HTTP methods that support - * request bodies are supported. - */ -class OAuthClientAuthHandler { - /** - * Instantiates an OAuth client authentication handler. - * @param clientAuthentication The client auth credentials. - */ - constructor(clientAuthentication) { - this.clientAuthentication = clientAuthentication; - this.crypto = (0, crypto_1.createCrypto)(); - } - /** - * Applies client authentication on the OAuth request's headers or POST - * body but does not process the request. - * @param opts The GaxiosOptions whose headers or data are to be modified - * depending on the client authentication mechanism to be used. - * @param bearerToken The optional bearer token to use for authentication. - * When this is used, no client authentication credentials are needed. - */ - applyClientAuthenticationOptions(opts, bearerToken) { - // Inject authenticated header. - this.injectAuthenticatedHeaders(opts, bearerToken); - // Inject authenticated request body. - if (!bearerToken) { - this.injectAuthenticatedRequestBody(opts); - } - } - /** - * Applies client authentication on the request's header if either - * basic authentication or bearer token authentication is selected. - * - * @param opts The GaxiosOptions whose headers or data are to be modified - * depending on the client authentication mechanism to be used. - * @param bearerToken The optional bearer token to use for authentication. - * When this is used, no client authentication credentials are needed. - */ - injectAuthenticatedHeaders(opts, bearerToken) { - var _a; - // Bearer token prioritized higher than basic Auth. - if (bearerToken) { - opts.headers = opts.headers || {}; - Object.assign(opts.headers, { - Authorization: `Bearer ${bearerToken}}`, - }); - } - else if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'basic') { - opts.headers = opts.headers || {}; - const clientId = this.clientAuthentication.clientId; - const clientSecret = this.clientAuthentication.clientSecret || ''; - const base64EncodedCreds = this.crypto.encodeBase64StringUtf8(`${clientId}:${clientSecret}`); - Object.assign(opts.headers, { - Authorization: `Basic ${base64EncodedCreds}`, - }); - } - } - /** - * Applies client authentication on the request's body if request-body - * client authentication is selected. - * - * @param opts The GaxiosOptions whose headers or data are to be modified - * depending on the client authentication mechanism to be used. - */ - injectAuthenticatedRequestBody(opts) { - var _a; - if (((_a = this.clientAuthentication) === null || _a === void 0 ? void 0 : _a.confidentialClientType) === 'request-body') { - const method = (opts.method || 'GET').toUpperCase(); - // Inject authenticated request body. - if (METHODS_SUPPORTING_REQUEST_BODY.indexOf(method) !== -1) { - // Get content-type. - let contentType; - const headers = opts.headers || {}; - for (const key in headers) { - if (key.toLowerCase() === 'content-type' && headers[key]) { - contentType = headers[key].toLowerCase(); - break; - } - } - if (contentType === 'application/x-www-form-urlencoded') { - opts.data = opts.data || ''; - const data = querystring.parse(opts.data); - Object.assign(data, { - client_id: this.clientAuthentication.clientId, - client_secret: this.clientAuthentication.clientSecret || '', - }); - opts.data = querystring.stringify(data); - } - else if (contentType === 'application/json') { - opts.data = opts.data || {}; - Object.assign(opts.data, { - client_id: this.clientAuthentication.clientId, - client_secret: this.clientAuthentication.clientSecret || '', - }); - } - else { - throw new Error(`${contentType} content-types are not supported with ` + - `${this.clientAuthentication.confidentialClientType} ` + - 'client authentication'); - } - } - else { - throw new Error(`${method} HTTP method does not support ` + - `${this.clientAuthentication.confidentialClientType} ` + - 'client authentication'); - } - } - } - /** - * Retry config for Auth-related requests. - * - * @remarks - * - * This is not a part of the default {@link AuthClient.transporter transporter/gaxios} - * config as some downstream APIs would prefer if customers explicitly enable retries, - * such as GCS. - */ - static get RETRY_CONFIG() { - return { - retry: true, - retryConfig: { - httpMethodsToRetry: ['GET', 'PUT', 'POST', 'HEAD', 'OPTIONS', 'DELETE'], - }, - }; - } +module.exports = debug + + +/***/ }), + +/***/ 92463: +/***/ ((module) => { + +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 } -exports.OAuthClientAuthHandler = OAuthClientAuthHandler; -/** - * Converts an OAuth error response to a native JavaScript Error. - * @param resp The OAuth error response to convert to a native Error object. - * @param err The optional original error. If provided, the error properties - * will be copied to the new error. - * @return The converted native Error object. - */ -function getErrorFromOAuthErrorResponse(resp, err) { - // Error response. - const errorCode = resp.error; - const errorDescription = resp.error_description; - const errorUri = resp.error_uri; - let message = `Error code ${errorCode}`; - if (typeof errorDescription !== 'undefined') { - message += `: ${errorDescription}`; - } - if (typeof errorUri !== 'undefined') { - message += ` - ${errorUri}`; + +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers, +} + + +/***/ }), + +/***/ 15339: +/***/ ((module) => { + +class LRUCache { + constructor () { + this.max = 1000 + this.map = new Map() + } + + get (key) { + const value = this.map.get(key) + if (value === undefined) { + return undefined + } else { + // Remove the key from the map and add it to the end + this.map.delete(key) + this.map.set(key, value) + return value } - const newError = new Error(message); - // Copy properties from original error to newly generated error. - if (err) { - const keys = Object.keys(err); - if (err.stack) { - // Copy error.stack if available. - keys.push('stack'); - } - keys.forEach(key => { - // Do not overwrite the message field. - if (key !== 'message') { - Object.defineProperty(newError, key, { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - value: err[key], - writable: false, - enumerable: true, - }); - } - }); + } + + delete (key) { + return this.map.delete(key) + } + + set (key, value) { + const deleted = this.delete(key) + + if (!deleted && value !== undefined) { + // If cache is full, delete the least recently used item + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value + this.delete(firstKey) + } + + this.map.set(key, value) } - return newError; + + return this + } } -exports.getErrorFromOAuthErrorResponse = getErrorFromOAuthErrorResponse; + +module.exports = LRUCache /***/ }), -/***/ 32460: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 40785: +/***/ ((module) => { -"use strict"; +// parse out just the options we care about +const looseOption = Object.freeze({ loose: true }) +const emptyOpts = Object.freeze({ }) +const parseOptions = options => { + if (!options) { + return emptyOpts + } -// Copyright 2024 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PassThroughClient = void 0; -const authclient_1 = __nccwpck_require__(44627); -/** - * An AuthClient without any Authentication information. Useful for: - * - Anonymous access - * - Local Emulators - * - Testing Environments - * - */ -class PassThroughClient extends authclient_1.AuthClient { - /** - * Creates a request without any authentication headers or checks. - * - * @remarks - * - * In testing environments it may be useful to change the provided - * {@link AuthClient.transporter} for any desired request overrides/handling. - * - * @param opts - * @returns The response of the request. - */ - async request(opts) { - return this.transporter.request(opts); - } - /** - * A required method of the base class. - * Always will return an empty object. - * - * @returns {} - */ - async getAccessToken() { - return {}; + if (typeof options !== 'object') { + return looseOption + } + + return options +} +module.exports = parseOptions + + +/***/ }), + +/***/ 9523: +/***/ ((module, exports, __nccwpck_require__) => { + +const { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH, +} = __nccwpck_require__(42293) +const debug = __nccwpck_require__(50427) +exports = module.exports = {} + +// The actual regexps go on exports.re +const re = exports.re = [] +const safeRe = exports.safeRe = [] +const src = exports.src = [] +const safeSrc = exports.safeSrc = [] +const t = exports.t = {} +let R = 0 + +const LETTERDASHNUMBER = '[a-zA-Z0-9-]' + +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +const safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] + +const makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value + .split(`${token}*`).join(`${token}{0,${max}}`) + .split(`${token}+`).join(`${token}{1,${max}}`) + } + return value +} + +const createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value) + const index = R++ + debug(name, index, value) + t[name] = index + src[index] = value + safeSrc[index] = safe + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) + safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '\\d+') + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) + +// ## Main Version +// Three dot-separated numeric identifiers. + +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) + +createToken('FULL', `^${src[t.FULLPLAIN]}$`) + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) + +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + +createToken('GTLT', '((?:<|>)?=?)') + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCEPLAIN', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) +createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) +createToken('COERCEFULL', src[t.COERCEPLAIN] + + `(?:${src[t.PRERELEASE]})?` + + `(?:${src[t.BUILD]})?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) +createToken('COERCERTLFULL', src[t.COERCEFULL], true) + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') + +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' + +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') + +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' + +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') + + +/***/ }), + +/***/ 9380: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Determine if version is greater than all the versions possible in the range. +const outside = __nccwpck_require__(60420) +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr + + +/***/ }), + +/***/ 27008: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Range = __nccwpck_require__(9828) +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2, options) +} +module.exports = intersects + + +/***/ }), + +/***/ 33323: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const outside = __nccwpck_require__(60420) +// Determine if version is less than all the versions possible in the range +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr + + +/***/ }), + +/***/ 20579: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) + +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } } - /** - * A required method of the base class. - * Always will return an empty object. - * - * @returns {} - */ - async getRequestHeaders() { - return {}; + }) + return max +} +module.exports = maxSatisfying + + +/***/ }), + +/***/ 10832: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } } + }) + return min } -exports.PassThroughClient = PassThroughClient; -const a = new PassThroughClient(); -a.getAccessToken(); +module.exports = minSatisfying /***/ }), -/***/ 44782: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 34179: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const SemVer = __nccwpck_require__(48088) +const Range = __nccwpck_require__(9828) +const gt = __nccwpck_require__(84123) -// Copyright 2022 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PluggableAuthClient = exports.ExecutableError = void 0; -const baseexternalclient_1 = __nccwpck_require__(40810); -const executable_response_1 = __nccwpck_require__(8749); -const pluggable_auth_handler_1 = __nccwpck_require__(18941); -/** - * Error thrown from the executable run by PluggableAuthClient. - */ -class ExecutableError extends Error { - constructor(message, code) { - super(`The executable failed with exit code: ${code} and error message: ${message}.`); - this.code = code; - Object.setPrototypeOf(this, new.target.prototype); +const minVersion = (range, loose) => { + range = new Range(range, loose) + + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin } + } + + if (minver && range.test(minver)) { + return minver + } + + return null } -exports.ExecutableError = ExecutableError; -/** - * The default executable timeout when none is provided, in milliseconds. - */ -const DEFAULT_EXECUTABLE_TIMEOUT_MILLIS = 30 * 1000; -/** - * The minimum allowed executable timeout in milliseconds. - */ -const MINIMUM_EXECUTABLE_TIMEOUT_MILLIS = 5 * 1000; -/** - * The maximum allowed executable timeout in milliseconds. - */ -const MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS = 120 * 1000; -/** - * The environment variable to check to see if executable can be run. - * Value must be set to '1' for the executable to run. - */ -const GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES = 'GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES'; -/** - * The maximum currently supported executable version. - */ -const MAXIMUM_EXECUTABLE_VERSION = 1; -/** - * PluggableAuthClient enables the exchange of workload identity pool external credentials for - * Google access tokens by retrieving 3rd party tokens through a user supplied executable. These - * scripts/executables are completely independent of the Google Cloud Auth libraries. These - * credentials plug into ADC and will call the specified executable to retrieve the 3rd party token - * to be exchanged for a Google access token. - * - *

To use these credentials, the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment variable - * must be set to '1'. This is for security reasons. - * - *

Both OIDC and SAML are supported. The executable must adhere to a specific response format - * defined below. - * - *

The executable must print out the 3rd party token to STDOUT in JSON format. When an - * output_file is specified in the credential configuration, the executable must also handle writing the - * JSON response to this file. - * - *

- * OIDC response sample:
- * {
- *   "version": 1,
- *   "success": true,
- *   "token_type": "urn:ietf:params:oauth:token-type:id_token",
- *   "id_token": "HEADER.PAYLOAD.SIGNATURE",
- *   "expiration_time": 1620433341
- * }
- *
- * SAML2 response sample:
- * {
- *   "version": 1,
- *   "success": true,
- *   "token_type": "urn:ietf:params:oauth:token-type:saml2",
- *   "saml_response": "...",
- *   "expiration_time": 1620433341
- * }
- *
- * Error response sample:
- * {
- *   "version": 1,
- *   "success": false,
- *   "code": "401",
- *   "message": "Error message."
- * }
- * 
- * - *

The "expiration_time" field in the JSON response is only required for successful - * responses when an output file was specified in the credential configuration - * - *

The auth libraries will populate certain environment variables that will be accessible by the - * executable, such as: GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE, GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE, - * GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE, GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL, and - * GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE. - * - *

Please see this repositories README for a complete executable request/response specification. - */ -class PluggableAuthClient extends baseexternalclient_1.BaseExternalAccountClient { - /** - * Instantiates a PluggableAuthClient instance using the provided JSON - * object loaded from an external account credentials file. - * An error is thrown if the credential is not a valid pluggable auth credential. - * @param options The external account options object typically loaded from - * the external account JSON credential file. - * @param additionalOptions **DEPRECATED, all options are available in the - * `options` parameter.** Optional additional behavior customization options. - * These currently customize expiration threshold time and whether to retry - * on 401/403 API request errors. - */ - constructor(options, additionalOptions) { - super(options, additionalOptions); - if (!options.credential_source.executable) { - throw new Error('No valid Pluggable Auth "credential_source" provided.'); - } - this.command = options.credential_source.executable.command; - if (!this.command) { - throw new Error('No valid Pluggable Auth "credential_source" provided.'); - } - // Check if the provided timeout exists and if it is valid. - if (options.credential_source.executable.timeout_millis === undefined) { - this.timeoutMillis = DEFAULT_EXECUTABLE_TIMEOUT_MILLIS; - } - else { - this.timeoutMillis = options.credential_source.executable.timeout_millis; - if (this.timeoutMillis < MINIMUM_EXECUTABLE_TIMEOUT_MILLIS || - this.timeoutMillis > MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS) { - throw new Error(`Timeout must be between ${MINIMUM_EXECUTABLE_TIMEOUT_MILLIS} and ` + - `${MAXIMUM_EXECUTABLE_TIMEOUT_MILLIS} milliseconds.`); - } - } - this.outputFile = options.credential_source.executable.output_file; - this.handler = new pluggable_auth_handler_1.PluggableAuthHandler({ - command: this.command, - timeoutMillis: this.timeoutMillis, - outputFile: this.outputFile, - }); - this.credentialSourceType = 'executable'; +module.exports = minVersion + + +/***/ }), + +/***/ 60420: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const SemVer = __nccwpck_require__(48088) +const Comparator = __nccwpck_require__(91532) +const { ANY } = Comparator +const Range = __nccwpck_require__(9828) +const satisfies = __nccwpck_require__(6055) +const gt = __nccwpck_require__(84123) +const lt = __nccwpck_require__(80194) +const lte = __nccwpck_require__(77520) +const gte = __nccwpck_require__(15522) + +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) + + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let high = null + let low = null + + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false } - /** - * Triggered when an external subject token is needed to be exchanged for a - * GCP access token via GCP STS endpoint. - * This uses the `options.credential_source` object to figure out how - * to retrieve the token using the current environment. In this case, - * this calls a user provided executable which returns the subject token. - * The logic is summarized as: - * 1. Validated that the executable is allowed to run. The - * GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment must be set to - * 1 for security reasons. - * 2. If an output file is specified by the user, check the file location - * for a response. If the file exists and contains a valid response, - * return the subject token from the file. - * 3. Call the provided executable and return response. - * @return A promise that resolves with the external subject token. - */ - async retrieveSubjectToken() { - // Check if the executable is allowed to run. - if (process.env[GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES] !== '1') { - throw new Error('Pluggable Auth executables need to be explicitly allowed to run by ' + - 'setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment ' + - 'Variable to 1.'); - } - let executableResponse = undefined; - // Try to get cached executable response from output file. - if (this.outputFile) { - executableResponse = await this.handler.retrieveCachedResponse(); - } - // If no response from output file, call the executable. - if (!executableResponse) { - // Set up environment map with required values for the executable. - const envMap = new Map(); - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE', this.audience); - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE', this.subjectTokenType); - // Always set to 0 because interactive mode is not supported. - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE', '0'); - if (this.outputFile) { - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE', this.outputFile); - } - const serviceAccountEmail = this.getServiceAccountEmail(); - if (serviceAccountEmail) { - envMap.set('GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL', serviceAccountEmail); - } - executableResponse = - await this.handler.retrieveResponseFromExecutable(envMap); - } - if (executableResponse.version > MAXIMUM_EXECUTABLE_VERSION) { - throw new Error(`Version of executable is not currently supported, maximum supported version is ${MAXIMUM_EXECUTABLE_VERSION}.`); - } - // Check that response was successful. - if (!executableResponse.success) { - throw new ExecutableError(executableResponse.errorMessage, executableResponse.errorCode); - } - // Check that response contains expiration time if output file was specified. - if (this.outputFile) { - if (!executableResponse.expirationTime) { - throw new executable_response_1.InvalidExpirationTimeFieldError('The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.'); - } - } - // Check that response is not expired. - if (executableResponse.isExpired()) { - throw new Error('Executable response is expired.'); - } - // Return subject token from response. - return executableResponse.subjectToken; + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +module.exports = outside + + +/***/ }), + +/***/ 75297: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = __nccwpck_require__(6055) +const compare = __nccwpck_require__(44309) +module.exports = (versions, range, options) => { + const set = [] + let first = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!first) { + first = version + } + } else { + if (prev) { + set.push([first, prev]) + } + prev = null + first = null + } + } + if (first) { + set.push([first, null]) + } + + const ranges = [] + for (const [min, max] of set) { + if (min === max) { + ranges.push(min) + } else if (!max && min === v[0]) { + ranges.push('*') + } else if (!max) { + ranges.push(`>=${min}`) + } else if (min === v[0]) { + ranges.push(`<=${max}`) + } else { + ranges.push(`${min} - ${max}`) } + } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range } -exports.PluggableAuthClient = PluggableAuthClient; /***/ }), -/***/ 18941: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 7863: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const Range = __nccwpck_require__(9828) +const Comparator = __nccwpck_require__(91532) +const { ANY } = Comparator +const satisfies = __nccwpck_require__(6055) +const compare = __nccwpck_require__(44309) -// Copyright 2022 Google LLC -// -// 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 +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` // -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PluggableAuthHandler = void 0; -const pluggable_auth_client_1 = __nccwpck_require__(44782); -const executable_response_1 = __nccwpck_require__(8749); -const childProcess = __nccwpck_require__(32081); -const fs = __nccwpck_require__(57147); -/** - * A handler used to retrieve 3rd party token responses from user defined - * executables and cached file output for the PluggableAuthClient class. - */ -class PluggableAuthHandler { - /** - * Instantiates a PluggableAuthHandler instance using the provided - * PluggableAuthHandlerOptions object. - */ - constructor(options) { - if (!options.command) { - throw new Error('No command provided.'); - } - this.commandComponents = PluggableAuthHandler.parseCommand(options.command); - this.timeoutMillis = options.timeoutMillis; - if (!this.timeoutMillis) { - throw new Error('No timeoutMillis provided.'); - } - this.outputFile = options.outputFile; - } - /** - * Calls user provided executable to get a 3rd party subject token and - * returns the response. - * @param envMap a Map of additional Environment Variables required for - * the executable. - * @return A promise that resolves with the executable response. - */ - retrieveResponseFromExecutable(envMap) { - return new Promise((resolve, reject) => { - // Spawn process to run executable using added environment variables. - const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), { - env: { ...process.env, ...Object.fromEntries(envMap) }, - }); - let output = ''; - // Append stdout to output as executable runs. - child.stdout.on('data', (data) => { - output += data; - }); - // Append stderr as executable runs. - child.stderr.on('data', (err) => { - output += err; - }); - // Set up a timeout to end the child process and throw an error. - const timeout = setTimeout(() => { - // Kill child process and remove listeners so 'close' event doesn't get - // read after child process is killed. - child.removeAllListeners(); - child.kill(); - return reject(new Error('The executable failed to finish within the timeout specified.')); - }, this.timeoutMillis); - child.on('close', (code) => { - // Cancel timeout if executable closes before timeout is reached. - clearTimeout(timeout); - if (code === 0) { - // If the executable completed successfully, try to return the parsed response. - try { - const responseJson = JSON.parse(output); - const response = new executable_response_1.ExecutableResponse(responseJson); - return resolve(response); - } - catch (error) { - if (error instanceof executable_response_1.ExecutableResponseError) { - return reject(error); - } - return reject(new executable_response_1.ExecutableResponseError(`The executable returned an invalid response: ${output}`)); - } - } - else { - return reject(new pluggable_auth_client_1.ExecutableError(output, code.toString())); - } - }); - }); - } - /** - * Checks user provided output file for response from previous run of - * executable and return the response if it exists, is formatted correctly, and is not expired. - */ - async retrieveCachedResponse() { - if (!this.outputFile || this.outputFile.length === 0) { - return undefined; - } - let filePath; - try { - filePath = await fs.promises.realpath(this.outputFile); - } - catch (_a) { - // If file path cannot be resolved, return undefined. - return undefined; - } - if (!(await fs.promises.lstat(filePath)).isFile()) { - // If path does not lead to file, return undefined. - return undefined; - } - const responseString = await fs.promises.readFile(filePath, { - encoding: 'utf8', - }); - if (responseString === '') { - return undefined; - } - try { - const responseJson = JSON.parse(responseString); - const response = new executable_response_1.ExecutableResponse(responseJson); - // Check if response is successful and unexpired. - if (response.isValid()) { - return new executable_response_1.ExecutableResponse(responseJson); - } - return undefined; - } - catch (error) { - if (error instanceof executable_response_1.ExecutableResponseError) { - throw error; - } - throw new executable_response_1.ExecutableResponseError(`The output file contained an invalid response: ${responseString}`); - } +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true + +const subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true + } + + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false + + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) { + continue OUTER + } } - /** - * Parses given command string into component array, splitting on spaces unless - * spaces are between quotation marks. - */ - static parseCommand(command) { - // Split the command into components by splitting on spaces, - // unless spaces are contained in quotation marks. - const components = command.match(/(?:[^\s"]+|"[^"]*")+/g); - if (!components) { - throw new Error(`Provided command: "${command}" could not be parsed.`); - } - // Remove quotation marks from the beginning and end of each component if they are present. - for (let i = 0; i < components.length; i++) { - if (components[i][0] === '"' && components[i].slice(-1) === '"') { - components[i] = components[i].slice(1, -1); - } - } - return components; + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) { + return false } + } + return true } -exports.PluggableAuthHandler = PluggableAuthHandler; +const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] +const minimumVersion = [new Comparator('>=0.0.0')] -/***/ }), +const simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true + } -/***/ 98790: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease + } else { + sub = minimumVersion + } + } -"use strict"; + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true + } else { + dom = minimumVersion + } + } -// Copyright 2015 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UserRefreshClient = exports.USER_REFRESH_ACCOUNT_TYPE = void 0; -const oauth2client_1 = __nccwpck_require__(3936); -const querystring_1 = __nccwpck_require__(63477); -exports.USER_REFRESH_ACCOUNT_TYPE = 'authorized_user'; -class UserRefreshClient extends oauth2client_1.OAuth2Client { - constructor(optionsOrClientId, clientSecret, refreshToken, eagerRefreshThresholdMillis, forceRefreshOnFailure) { - const opts = optionsOrClientId && typeof optionsOrClientId === 'object' - ? optionsOrClientId - : { - clientId: optionsOrClientId, - clientSecret, - refreshToken, - eagerRefreshThresholdMillis, - forceRefreshOnFailure, - }; - super(opts); - this._refreshToken = opts.refreshToken; - this.credentials.refresh_token = opts.refreshToken; + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') { + gt = higherGT(gt, c, options) + } else if (c.operator === '<' || c.operator === '<=') { + lt = lowerLT(lt, c, options) + } else { + eqSet.add(c.semver) } - /** - * Refreshes the access token. - * @param refreshToken An ignored refreshToken.. - * @param callback Optional callback. - */ - async refreshTokenNoCache( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - refreshToken) { - return super.refreshTokenNoCache(this._refreshToken); + } + + if (eqSet.size > 1) { + return null + } + + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) { + return null + } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { + return null } - async fetchIdToken(targetAudience) { - const res = await this.transporter.request({ - ...UserRefreshClient.RETRY_CONFIG, - url: this.endpoints.oauth2TokenUrl, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - method: 'POST', - data: (0, querystring_1.stringify)({ - client_id: this._clientId, - client_secret: this._clientSecret, - grant_type: 'refresh_token', - refresh_token: this._refreshToken, - target_audience: targetAudience, - }), - }); - return res.data.id_token; + } + + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null } - /** - * Create a UserRefreshClient credentials instance using the given input - * options. - * @param json The input object. - */ - fromJSON(json) { - if (!json) { - throw new Error('Must pass in a JSON object containing the user refresh token'); - } - if (json.type !== 'authorized_user') { - throw new Error('The incoming JSON object does not have the "authorized_user" type'); - } - if (!json.client_id) { - throw new Error('The incoming JSON object does not contain a client_id field'); - } - if (!json.client_secret) { - throw new Error('The incoming JSON object does not contain a client_secret field'); + + if (lt && !satisfies(eq, String(lt), options)) { + return null + } + + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false + } + } + + return true + } + + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false } - if (!json.refresh_token) { - throw new Error('The incoming JSON object does not contain a refresh_token field'); + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) { + return false } - this._clientId = json.client_id; - this._clientSecret = json.client_secret; - this._refreshToken = json.refresh_token; - this.credentials.refresh_token = json.refresh_token; - this.quotaProjectId = json.quota_project_id; - this.universeDomain = json.universe_domain || this.universeDomain; + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { + return false + } } - fromStream(inputStream, callback) { - if (callback) { - this.fromStreamAsync(inputStream).then(() => callback(), callback); + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false } - else { - return this.fromStreamAsync(inputStream); + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) { + return false } + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { + return false + } } - async fromStreamAsync(inputStream) { - return new Promise((resolve, reject) => { - if (!inputStream) { - return reject(new Error('Must pass in a stream containing the user refresh token.')); - } - let s = ''; - inputStream - .setEncoding('utf8') - .on('error', reject) - .on('data', chunk => (s += chunk)) - .on('end', () => { - try { - const data = JSON.parse(s); - this.fromJSON(data); - return resolve(); - } - catch (err) { - return reject(err); - } - }); - }); + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false } + } + + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false + } + + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false + } + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) { + return false + } + + return true } -exports.UserRefreshClient = UserRefreshClient; + +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) { + return b + } + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a +} + +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) { + return b + } + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a +} + +module.exports = subset /***/ }), -/***/ 86308: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 52706: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const Range = __nccwpck_require__(9828) -// Copyright 2021 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.StsCredentials = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const querystring = __nccwpck_require__(63477); -const transporters_1 = __nccwpck_require__(72649); -const oauth2common_1 = __nccwpck_require__(19510); -/** - * Implements the OAuth 2.0 token exchange based on - * https://tools.ietf.org/html/rfc8693 - */ -class StsCredentials extends oauth2common_1.OAuthClientAuthHandler { - /** - * Initializes an STS credentials instance. - * @param tokenExchangeEndpoint The token exchange endpoint. - * @param clientAuthentication The client authentication credentials if - * available. - */ - constructor(tokenExchangeEndpoint, clientAuthentication) { - super(clientAuthentication); - this.tokenExchangeEndpoint = tokenExchangeEndpoint; - this.transporter = new transporters_1.DefaultTransporter(); - } - /** - * Exchanges the provided token for another type of token based on the - * rfc8693 spec. - * @param stsCredentialsOptions The token exchange options used to populate - * the token exchange request. - * @param additionalHeaders Optional additional headers to pass along the - * request. - * @param options Optional additional GCP-specific non-spec defined options - * to send with the request. - * Example: `&options=${encodeUriComponent(JSON.stringified(options))}` - * @return A promise that resolves with the token exchange response containing - * the requested token and its expiration time. - */ - async exchangeToken(stsCredentialsOptions, additionalHeaders, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - options) { - var _a, _b, _c; - const values = { - grant_type: stsCredentialsOptions.grantType, - resource: stsCredentialsOptions.resource, - audience: stsCredentialsOptions.audience, - scope: (_a = stsCredentialsOptions.scope) === null || _a === void 0 ? void 0 : _a.join(' '), - requested_token_type: stsCredentialsOptions.requestedTokenType, - subject_token: stsCredentialsOptions.subjectToken, - subject_token_type: stsCredentialsOptions.subjectTokenType, - actor_token: (_b = stsCredentialsOptions.actingParty) === null || _b === void 0 ? void 0 : _b.actorToken, - actor_token_type: (_c = stsCredentialsOptions.actingParty) === null || _c === void 0 ? void 0 : _c.actorTokenType, - // Non-standard GCP-specific options. - options: options && JSON.stringify(options), - }; - // Remove undefined fields. - Object.keys(values).forEach(key => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (typeof values[key] === 'undefined') { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - delete values[key]; - } - }); - const headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - }; - // Inject additional STS headers if available. - Object.assign(headers, additionalHeaders || {}); - const opts = { - ...StsCredentials.RETRY_CONFIG, - url: this.tokenExchangeEndpoint.toString(), - method: 'POST', - headers, - data: querystring.stringify(values), - responseType: 'json', - }; - // Apply OAuth client authentication. - this.applyClientAuthenticationOptions(opts); - try { - const response = await this.transporter.request(opts); - // Successful response. - const stsSuccessfulResponse = response.data; - stsSuccessfulResponse.res = response; - return stsSuccessfulResponse; - } - catch (error) { - // Translate error to OAuthError. - if (error instanceof gaxios_1.GaxiosError && error.response) { - throw (0, oauth2common_1.getErrorFromOAuthErrorResponse)(error.response.data, - // Preserve other fields from the original error. - error); - } - // Request could fail before the server responds. - throw error; - } - } +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) + +module.exports = toComparators + + +/***/ }), + +/***/ 2098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Range = __nccwpck_require__(9828) +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } } -exports.StsCredentials = StsCredentials; +module.exports = validRange /***/ }), -/***/ 7428: -/***/ ((__unused_webpack_module, exports) => { +/***/ 79626: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright 2024 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UrlSubjectTokenSupplier = void 0; -/** - * Internal subject token supplier implementation used when a URL - * is configured in the credential configuration used to build an {@link IdentityPoolClient} + +var stubs = __nccwpck_require__(1099) + +/* + * StreamEvents can be used 2 ways: + * + * 1: + * function MyStream() { + * require('stream-events').call(this) + * } + * + * 2: + * require('stream-events')(myStream) */ -class UrlSubjectTokenSupplier { - /** - * Instantiates a URL subject token supplier. - * @param opts The URL subject token supplier options to build the supplier with. - */ - constructor(opts) { - this.url = opts.url; - this.formatType = opts.formatType; - this.subjectTokenFieldName = opts.subjectTokenFieldName; - this.headers = opts.headers; - this.additionalGaxiosOptions = opts.additionalGaxiosOptions; - } - /** - * Sends a GET request to the URL provided in the constructor and resolves - * with the returned external subject token. - * @param context {@link ExternalAccountSupplierContext} from the calling - * {@link IdentityPoolClient}, contains the requested audience and subject - * token type for the external account identity. Not used. - */ - async getSubjectToken(context) { - const opts = { - ...this.additionalGaxiosOptions, - url: this.url, - method: 'GET', - headers: this.headers, - responseType: this.formatType, - }; - let subjectToken; - if (this.formatType === 'text') { - const response = await context.transporter.request(opts); - subjectToken = response.data; - } - else if (this.formatType === 'json' && this.subjectTokenFieldName) { - const response = await context.transporter.request(opts); - subjectToken = response.data[this.subjectTokenFieldName]; - } - if (!subjectToken) { - throw new Error('Unable to parse the subject_token from the credential_source URL'); - } - return subjectToken; +function StreamEvents(stream) { + stream = stream || this + + var cfg = { + callthrough: true, + calls: 1 + } + + stubs(stream, '_read', cfg, stream.emit.bind(stream, 'reading')) + stubs(stream, '_write', cfg, stream.emit.bind(stream, 'writing')) + + return stream +} + +module.exports = StreamEvents + + +/***/ }), + +/***/ 66121: +/***/ ((module) => { + +module.exports = shift + +function shift (stream) { + var rs = stream._readableState + if (!rs) return null + return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs)) +} + +function getStateLength (state) { + if (state.buffer.length) { + var idx = state.bufferIndex || 0 + // Since node 6.3.0 state.buffer is a BufferList not an array + if (state.buffer.head) { + return state.buffer.head.data.length + } else if (state.buffer.length - idx > 0 && state.buffer[idx]) { + return state.buffer[idx].length } + } + + return state.length } -exports.UrlSubjectTokenSupplier = UrlSubjectTokenSupplier; /***/ }), -/***/ 14693: +/***/ 94841: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2019 Google LLC +// Copyright Joyent, Inc. and other Node contributors. // -// 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 +// 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: // -// http://www.apache.org/licenses/LICENSE-2.0 +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. // -// 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. -/* global window */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BrowserCrypto = void 0; -// This file implements crypto functions we need using in-browser -// SubtleCrypto interface `window.crypto.subtle`. -const base64js = __nccwpck_require__(26463); -const crypto_1 = __nccwpck_require__(78043); -class BrowserCrypto { - constructor() { - if (typeof window === 'undefined' || - window.crypto === undefined || - window.crypto.subtle === undefined) { - throw new Error("SubtleCrypto not found. Make sure it's an https:// website."); - } - } - async sha256DigestBase64(str) { - // SubtleCrypto digest() method is async, so we must make - // this method async as well. - // To calculate SHA256 digest using SubtleCrypto, we first - // need to convert an input string to an ArrayBuffer: - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const inputBuffer = new TextEncoder().encode(str); - // Result is ArrayBuffer as well. - const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); - return base64js.fromByteArray(new Uint8Array(outputBuffer)); - } - randomBytesBase64(count) { - const array = new Uint8Array(count); - window.crypto.getRandomValues(array); - return base64js.fromByteArray(array); - } - static padBase64(base64) { - // base64js requires padding, so let's add some '=' - while (base64.length % 4 !== 0) { - base64 += '='; - } - return base64; - } - async verify(pubkey, data, signature) { - const algo = { - name: 'RSASSA-PKCS1-v1_5', - hash: { name: 'SHA-256' }, - }; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const dataArray = new TextEncoder().encode(data); - const signatureArray = base64js.toByteArray(BrowserCrypto.padBase64(signature)); - const cryptoKey = await window.crypto.subtle.importKey('jwk', pubkey, algo, true, ['verify']); - // SubtleCrypto's verify method is async so we must make - // this method async as well. - const result = await window.crypto.subtle.verify(algo, cryptoKey, signatureArray, dataArray); - return result; - } - async sign(privateKey, data) { - const algo = { - name: 'RSASSA-PKCS1-v1_5', - hash: { name: 'SHA-256' }, - }; - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const dataArray = new TextEncoder().encode(data); - const cryptoKey = await window.crypto.subtle.importKey('jwk', privateKey, algo, true, ['sign']); - // SubtleCrypto's sign method is async so we must make - // this method async as well. - const result = await window.crypto.subtle.sign(algo, cryptoKey, dataArray); - return base64js.fromByteArray(new Uint8Array(result)); - } - decodeBase64StringUtf8(base64) { - const uint8array = base64js.toByteArray(BrowserCrypto.padBase64(base64)); - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const result = new TextDecoder().decode(uint8array); - return result; - } - encodeBase64StringUtf8(text) { - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const uint8array = new TextEncoder().encode(text); - const result = base64js.fromByteArray(uint8array); - return result; - } - /** - * Computes the SHA-256 hash of the provided string. - * @param str The plain text string to hash. - * @return A promise that resolves with the SHA-256 hash of the provided - * string in hexadecimal encoding. - */ - async sha256DigestHex(str) { - // SubtleCrypto digest() method is async, so we must make - // this method async as well. - // To calculate SHA256 digest using SubtleCrypto, we first - // need to convert an input string to an ArrayBuffer: - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const inputBuffer = new TextEncoder().encode(str); - // Result is ArrayBuffer as well. - const outputBuffer = await window.crypto.subtle.digest('SHA-256', inputBuffer); - return (0, crypto_1.fromArrayBufferToHex)(outputBuffer); - } - /** - * Computes the HMAC hash of a message using the provided crypto key and the - * SHA-256 algorithm. - * @param key The secret crypto key in utf-8 or ArrayBuffer format. - * @param msg The plain text message. - * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer - * format. - */ - async signWithHmacSha256(key, msg) { - // Convert key, if provided in ArrayBuffer format, to string. - const rawKey = typeof key === 'string' - ? key - : String.fromCharCode(...new Uint16Array(key)); - // eslint-disable-next-line node/no-unsupported-features/node-builtins - const enc = new TextEncoder(); - const cryptoKey = await window.crypto.subtle.importKey('raw', enc.encode(rawKey), { - name: 'HMAC', - hash: { - name: 'SHA-256', - }, - }, false, ['sign']); - return window.crypto.subtle.sign('HMAC', cryptoKey, enc.encode(msg)); +// 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. + + + +/**/ + +var Buffer = (__nccwpck_require__(21867).Buffer); +/**/ + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.s = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); } -exports.BrowserCrypto = BrowserCrypto; +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; -/***/ }), +StringDecoder.prototype.end = utf8End; -/***/ 78043: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; -"use strict"; +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; -// Copyright 2019 Google LLC -// -// 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. -/* global window */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromArrayBufferToHex = exports.hasBrowserCrypto = exports.createCrypto = void 0; -const crypto_1 = __nccwpck_require__(14693); -const crypto_2 = __nccwpck_require__(30757); -function createCrypto() { - if (hasBrowserCrypto()) { - return new crypto_1.BrowserCrypto(); +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; } - return new crypto_2.NodeCrypto(); + return nb; + } + return 0; } -exports.createCrypto = createCrypto; -function hasBrowserCrypto() { - return (typeof window !== 'undefined' && - typeof window.crypto !== 'undefined' && - typeof window.crypto.subtle !== 'undefined'); + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } } -exports.hasBrowserCrypto = hasBrowserCrypto; -/** - * Converts an ArrayBuffer to a hexadecimal string. - * @param arrayBuffer The ArrayBuffer to convert to hexadecimal string. - * @return The hexadecimal encoding of the ArrayBuffer. - */ -function fromArrayBufferToHex(arrayBuffer) { - // Convert buffer to byte array. - const byteArray = Array.from(new Uint8Array(arrayBuffer)); - // Convert bytes to hex string. - return byteArray - .map(byte => { - return byte.toString(16).padStart(2, '0'); - }) - .join(''); + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; } -exports.fromArrayBufferToHex = fromArrayBufferToHex; +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} -/***/ }), +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} -/***/ 30757: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} -"use strict"; +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.NodeCrypto = void 0; -const crypto = __nccwpck_require__(6113); -class NodeCrypto { - async sha256DigestBase64(str) { - return crypto.createHash('sha256').update(str).digest('base64'); - } - randomBytesBase64(count) { - return crypto.randomBytes(count).toString('base64'); - } - async verify(pubkey, data, signature) { - const verifier = crypto.createVerify('RSA-SHA256'); - verifier.update(data); - verifier.end(); - return verifier.verify(pubkey, signature, 'base64'); - } - async sign(privateKey, data) { - const signer = crypto.createSign('RSA-SHA256'); - signer.update(data); - signer.end(); - return signer.sign(privateKey, 'base64'); - } - decodeBase64StringUtf8(base64) { - return Buffer.from(base64, 'base64').toString('utf-8'); - } - encodeBase64StringUtf8(text) { - return Buffer.from(text, 'utf-8').toString('base64'); - } - /** - * Computes the SHA-256 hash of the provided string. - * @param str The plain text string to hash. - * @return A promise that resolves with the SHA-256 hash of the provided - * string in hexadecimal encoding. - */ - async sha256DigestHex(str) { - return crypto.createHash('sha256').update(str).digest('hex'); - } - /** - * Computes the HMAC hash of a message using the provided crypto key and the - * SHA-256 algorithm. - * @param key The secret crypto key in utf-8 or ArrayBuffer format. - * @param msg The plain text message. - * @return A promise that resolves with the HMAC-SHA256 hash in ArrayBuffer - * format. - */ - async signWithHmacSha256(key, msg) { - const cryptoKey = typeof key === 'string' ? key : toBuffer(key); - return toArrayBuffer(crypto.createHmac('sha256', cryptoKey).update(msg).digest()); - } +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); } -exports.NodeCrypto = NodeCrypto; -/** - * Converts a Node.js Buffer to an ArrayBuffer. - * https://stackoverflow.com/questions/8609289/convert-a-binary-nodejs-buffer-to-javascript-arraybuffer - * @param buffer The Buffer input to covert. - * @return The ArrayBuffer representation of the input. - */ -function toArrayBuffer(buffer) { - return buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength); + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; } -/** - * Converts an ArrayBuffer to a Node.js Buffer. - * @param arrayBuffer The ArrayBuffer input to covert. - * @return The Buffer representation of the input. - */ -function toBuffer(arrayBuffer) { - return Buffer.from(arrayBuffer); + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); } +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} /***/ }), -/***/ 20810: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 1099: +/***/ ((module) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GoogleAuth = exports.auth = exports.DefaultTransporter = exports.PassThroughClient = exports.PluggableAuthClient = exports.DownscopedClient = exports.BaseExternalAccountClient = exports.ExternalAccountClient = exports.IdentityPoolClient = exports.AwsClient = exports.UserRefreshClient = exports.LoginTicket = exports.OAuth2Client = exports.CodeChallengeMethod = exports.Impersonated = exports.JWT = exports.JWTAccess = exports.IdTokenClient = exports.IAMAuth = exports.GCPEnv = exports.Compute = exports.DEFAULT_UNIVERSE = exports.AuthClient = exports.gaxios = exports.gcpMetadata = void 0; -// Copyright 2017 Google LLC -// -// 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. -const googleauth_1 = __nccwpck_require__(20695); -Object.defineProperty(exports, "GoogleAuth", ({ enumerable: true, get: function () { return googleauth_1.GoogleAuth; } })); -// Export common deps to ensure types/instances are the exact match. Useful -// for consistently configuring the library across versions. -exports.gcpMetadata = __nccwpck_require__(3563); -exports.gaxios = __nccwpck_require__(59555); -var authclient_1 = __nccwpck_require__(44627); -Object.defineProperty(exports, "AuthClient", ({ enumerable: true, get: function () { return authclient_1.AuthClient; } })); -Object.defineProperty(exports, "DEFAULT_UNIVERSE", ({ enumerable: true, get: function () { return authclient_1.DEFAULT_UNIVERSE; } })); -var computeclient_1 = __nccwpck_require__(96875); -Object.defineProperty(exports, "Compute", ({ enumerable: true, get: function () { return computeclient_1.Compute; } })); -var envDetect_1 = __nccwpck_require__(21380); -Object.defineProperty(exports, "GCPEnv", ({ enumerable: true, get: function () { return envDetect_1.GCPEnv; } })); -var iam_1 = __nccwpck_require__(39735); -Object.defineProperty(exports, "IAMAuth", ({ enumerable: true, get: function () { return iam_1.IAMAuth; } })); -var idtokenclient_1 = __nccwpck_require__(80298); -Object.defineProperty(exports, "IdTokenClient", ({ enumerable: true, get: function () { return idtokenclient_1.IdTokenClient; } })); -var jwtaccess_1 = __nccwpck_require__(68740); -Object.defineProperty(exports, "JWTAccess", ({ enumerable: true, get: function () { return jwtaccess_1.JWTAccess; } })); -var jwtclient_1 = __nccwpck_require__(13959); -Object.defineProperty(exports, "JWT", ({ enumerable: true, get: function () { return jwtclient_1.JWT; } })); -var impersonated_1 = __nccwpck_require__(91103); -Object.defineProperty(exports, "Impersonated", ({ enumerable: true, get: function () { return impersonated_1.Impersonated; } })); -var oauth2client_1 = __nccwpck_require__(3936); -Object.defineProperty(exports, "CodeChallengeMethod", ({ enumerable: true, get: function () { return oauth2client_1.CodeChallengeMethod; } })); -Object.defineProperty(exports, "OAuth2Client", ({ enumerable: true, get: function () { return oauth2client_1.OAuth2Client; } })); -var loginticket_1 = __nccwpck_require__(74524); -Object.defineProperty(exports, "LoginTicket", ({ enumerable: true, get: function () { return loginticket_1.LoginTicket; } })); -var refreshclient_1 = __nccwpck_require__(98790); -Object.defineProperty(exports, "UserRefreshClient", ({ enumerable: true, get: function () { return refreshclient_1.UserRefreshClient; } })); -var awsclient_1 = __nccwpck_require__(71569); -Object.defineProperty(exports, "AwsClient", ({ enumerable: true, get: function () { return awsclient_1.AwsClient; } })); -var identitypoolclient_1 = __nccwpck_require__(20117); -Object.defineProperty(exports, "IdentityPoolClient", ({ enumerable: true, get: function () { return identitypoolclient_1.IdentityPoolClient; } })); -var externalclient_1 = __nccwpck_require__(94381); -Object.defineProperty(exports, "ExternalAccountClient", ({ enumerable: true, get: function () { return externalclient_1.ExternalAccountClient; } })); -var baseexternalclient_1 = __nccwpck_require__(40810); -Object.defineProperty(exports, "BaseExternalAccountClient", ({ enumerable: true, get: function () { return baseexternalclient_1.BaseExternalAccountClient; } })); -var downscopedclient_1 = __nccwpck_require__(6270); -Object.defineProperty(exports, "DownscopedClient", ({ enumerable: true, get: function () { return downscopedclient_1.DownscopedClient; } })); -var pluggable_auth_client_1 = __nccwpck_require__(44782); -Object.defineProperty(exports, "PluggableAuthClient", ({ enumerable: true, get: function () { return pluggable_auth_client_1.PluggableAuthClient; } })); -var passthrough_1 = __nccwpck_require__(32460); -Object.defineProperty(exports, "PassThroughClient", ({ enumerable: true, get: function () { return passthrough_1.PassThroughClient; } })); -var transporters_1 = __nccwpck_require__(72649); -Object.defineProperty(exports, "DefaultTransporter", ({ enumerable: true, get: function () { return transporters_1.DefaultTransporter; } })); -const auth = new googleauth_1.GoogleAuth(); -exports.auth = auth; +module.exports = function stubs(obj, method, cfg, stub) { + if (!obj || !method || !obj[method]) + throw new Error('You must provide an object and a key for an existing method') -/***/ }), + if (!stub) { + stub = cfg + cfg = {} + } -/***/ 16608: -/***/ ((__unused_webpack_module, exports) => { + stub = stub || function() {} -"use strict"; + cfg.callthrough = cfg.callthrough || false + cfg.calls = cfg.calls || 0 -// Copyright 2017 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.validate = void 0; -// Accepts an options object passed from the user to the API. In the -// previous version of the API, it referred to a `Request` options object. -// Now it refers to an Axiox Request Config object. This is here to help -// ensure users don't pass invalid options when they upgrade from 0.x to 1.x. -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function validate(options) { - const vpairs = [ - { invalid: 'uri', expected: 'url' }, - { invalid: 'json', expected: 'data' }, - { invalid: 'qs', expected: 'params' }, - ]; - for (const pair of vpairs) { - if (options[pair.invalid]) { - const e = `'${pair.invalid}' is not a valid configuration option. Please use '${pair.expected}' instead. This library is using Axios for requests. Please see https://github.com/axios/axios to learn more about the valid request options.`; - throw new Error(e); - } - } -} -exports.validate = validate; + var norevert = cfg.calls === 0 + var cached = obj[method].bind(obj) -/***/ }), + obj[method] = function() { + var args = [].slice.call(arguments) + var returnVal -/***/ 72649: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (cfg.callthrough) + returnVal = cached.apply(obj, args) -"use strict"; + returnVal = stub.apply(obj, args) || returnVal -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DefaultTransporter = void 0; -const gaxios_1 = __nccwpck_require__(59555); -const options_1 = __nccwpck_require__(16608); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const pkg = __nccwpck_require__(51402); -const PRODUCT_NAME = 'google-api-nodejs-client'; -class DefaultTransporter { - constructor() { - /** - * A configurable, replacable `Gaxios` instance. - */ - this.instance = new gaxios_1.Gaxios(); - } - /** - * Configures request options before making a request. - * @param opts GaxiosOptions options. - * @return Configured options. - */ - configure(opts = {}) { - opts.headers = opts.headers || {}; - if (typeof window === 'undefined') { - // set transporter user agent if not in browser - const uaValue = opts.headers['User-Agent']; - if (!uaValue) { - opts.headers['User-Agent'] = DefaultTransporter.USER_AGENT; - } - else if (!uaValue.includes(`${PRODUCT_NAME}/`)) { - opts.headers['User-Agent'] = - `${uaValue} ${DefaultTransporter.USER_AGENT}`; - } - // track google-auth-library-nodejs version: - if (!opts.headers['x-goog-api-client']) { - const nodeVersion = process.version.replace(/^v/, ''); - opts.headers['x-goog-api-client'] = `gl-node/${nodeVersion}`; - } - } - return opts; - } - /** - * Makes a request using Gaxios with given options. - * @param opts GaxiosOptions options. - * @param callback optional callback that contains GaxiosResponse object. - * @return GaxiosPromise, assuming no callback is passed. - */ - request(opts) { - // ensure the user isn't passing in request-style options - opts = this.configure(opts); - (0, options_1.validate)(opts); - return this.instance.request(opts).catch(e => { - throw this.processError(e); - }); - } - get defaults() { - return this.instance.defaults; - } - set defaults(opts) { - this.instance.defaults = opts; - } - /** - * Changes the error to include details from the body. - */ - processError(e) { - const res = e.response; - const err = e; - const body = res ? res.data : null; - if (res && body && body.error && res.status !== 200) { - if (typeof body.error === 'string') { - err.message = body.error; - err.status = res.status; - } - else if (Array.isArray(body.error.errors)) { - err.message = body.error.errors - .map((err2) => err2.message) - .join('\n'); - err.code = body.error.code; - err.errors = body.error.errors; - } - else { - err.message = body.error.message; - err.code = body.error.code; - } - } - else if (res && res.status >= 400) { - // Consider all 4xx and 5xx responses errors. - err.message = body; - err.status = res.status; - } - return err; - } + if (!norevert && --cfg.calls === 0) + obj[method] = cached + + return returnVal + } } -exports.DefaultTransporter = DefaultTransporter; -/** - * Default user agent. - */ -DefaultTransporter.USER_AGENT = `${PRODUCT_NAME}/${pkg.version}`; /***/ }), -/***/ 68905: -/***/ (function(__unused_webpack_module, exports) { +/***/ 59318: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright 2023 Google LLC -// -// 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. -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _LRUCache_instances, _LRUCache_cache, _LRUCache_moveToEnd, _LRUCache_evict; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LRUCache = exports.originalOrCamelOptions = exports.snakeToCamel = void 0; -/** - * Returns the camel case of a provided string. - * - * @remarks - * - * Match any `_` and not `_` pair, then return the uppercase of the not `_` - * character. - * - * @internal - * - * @param str the string to convert - * @returns the camelCase'd string - */ -function snakeToCamel(str) { - return str.replace(/([_][^_])/g, match => match.slice(1).toUpperCase()); +const os = __nccwpck_require__(22037); +const tty = __nccwpck_require__(76224); +const hasFlag = __nccwpck_require__(31621); + +const {env} = process; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false') || + hasFlag('color=never')) { + forceColor = 0; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = 1; } -exports.snakeToCamel = snakeToCamel; -/** - * Get the value of `obj[key]` or `obj[camelCaseKey]`, with a preference - * for original, non-camelCase key. - * - * @param obj object to lookup a value in - * @returns a `get` function for getting `obj[key || snakeKey]`, if available - */ -function originalOrCamelOptions(obj) { - /** - * - * @param key an index of object, preferably snake_case - * @returns the value `obj[key || snakeKey]`, if available - */ - function get(key) { - var _a; - const o = (obj || {}); - return (_a = o[key]) !== null && _a !== void 0 ? _a : o[snakeToCamel(key)]; - } - return { get }; + +if ('FORCE_COLOR' in env) { + if (env.FORCE_COLOR === 'true') { + forceColor = 1; + } else if (env.FORCE_COLOR === 'false') { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } } -exports.originalOrCamelOptions = originalOrCamelOptions; -/** - * A simple LRU cache utility. - * Not meant for external usage. - * - * @experimental - * @internal - */ -class LRUCache { - constructor(options) { - _LRUCache_instances.add(this); - /** - * Maps are in order. Thus, the older item is the first item. - * - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map} - */ - _LRUCache_cache.set(this, new Map()); - this.capacity = options.capacity; - this.maxAge = options.maxAge; - } - /** - * Add an item to the cache. - * - * @param key the key to upsert - * @param value the value of the key - */ - set(key, value) { - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, value); - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); - } - /** - * Get an item from the cache. - * - * @param key the key to retrieve - */ - get(key) { - const item = __classPrivateFieldGet(this, _LRUCache_cache, "f").get(key); - if (!item) - return; - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_moveToEnd).call(this, key, item.value); - __classPrivateFieldGet(this, _LRUCache_instances, "m", _LRUCache_evict).call(this); - return item.value; - } + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; } -exports.LRUCache = LRUCache; -_LRUCache_cache = new WeakMap(), _LRUCache_instances = new WeakSet(), _LRUCache_moveToEnd = function _LRUCache_moveToEnd(key, value) { - __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(key); - __classPrivateFieldGet(this, _LRUCache_cache, "f").set(key, { - value, - lastAccessed: Date.now(), - }); -}, _LRUCache_evict = function _LRUCache_evict() { - const cutoffDate = this.maxAge ? Date.now() - this.maxAge : 0; - /** - * Because we know Maps are in order, this item is both the - * last item in the list (capacity) and oldest (maxAge). - */ - let oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); - while (!oldestItem.done && - (__classPrivateFieldGet(this, _LRUCache_cache, "f").size > this.capacity || // too many - oldestItem.value[1].lastAccessed < cutoffDate) // too old - ) { - __classPrivateFieldGet(this, _LRUCache_cache, "f").delete(oldestItem.value[0]); - oldestItem = __classPrivateFieldGet(this, _LRUCache_cache, "f").entries().next(); - } -}; +function supportsColor(haveStream, streamIsTTY) { + if (forceColor === 0) { + return 0; + } -/***/ }), + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } -/***/ 76031: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + if (hasFlag('color=256')) { + return 2; + } -"use strict"; + if (haveStream && !streamIsTTY && forceColor === undefined) { + return 0; + } -/** - * Copyright 2018 Google LLC - * - * Distributed under MIT license. - * See file LICENSE for detail or copy at https://opensource.org/licenses/MIT - */ -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var _GoogleToken_instances, _GoogleToken_inFlightRequest, _GoogleToken_getTokenAsync, _GoogleToken_getTokenAsyncInner, _GoogleToken_ensureEmail, _GoogleToken_revokeTokenAsync, _GoogleToken_configure, _GoogleToken_requestToken; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GoogleToken = void 0; -const fs = __nccwpck_require__(57147); -const gaxios_1 = __nccwpck_require__(59555); -const jws = __nccwpck_require__(4636); -const path = __nccwpck_require__(71017); -const util_1 = __nccwpck_require__(73837); -const readFile = fs.readFile - ? (0, util_1.promisify)(fs.readFile) - : async () => { - // if running in the web-browser, fs.readFile may not have been shimmed. - throw new ErrorWithCode('use key rather than keyFile.', 'MISSING_CREDENTIALS'); - }; -const GOOGLE_TOKEN_URL = 'https://www.googleapis.com/oauth2/v4/token'; -const GOOGLE_REVOKE_TOKEN_URL = 'https://accounts.google.com/o/oauth2/revoke?token='; -class ErrorWithCode extends Error { - constructor(message, code) { - super(message); - this.code = code; - } -} -class GoogleToken { - get accessToken() { - return this.rawToken ? this.rawToken.access_token : undefined; - } - get idToken() { - return this.rawToken ? this.rawToken.id_token : undefined; - } - get tokenType() { - return this.rawToken ? this.rawToken.token_type : undefined; - } - get refreshToken() { - return this.rawToken ? this.rawToken.refresh_token : undefined; - } - /** - * Create a GoogleToken. - * - * @param options Configuration object. - */ - constructor(options) { - _GoogleToken_instances.add(this); - this.transporter = { - request: opts => (0, gaxios_1.request)(opts), - }; - _GoogleToken_inFlightRequest.set(this, void 0); - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, options); - } - /** - * Returns whether the token has expired. - * - * @return true if the token has expired, false otherwise. - */ - hasExpired() { - const now = new Date().getTime(); - if (this.rawToken && this.expiresAt) { - return now >= this.expiresAt; - } - else { - return true; - } - } - /** - * Returns whether the token will expire within eagerRefreshThresholdMillis - * - * @return true if the token will be expired within eagerRefreshThresholdMillis, false otherwise. - */ - isTokenExpiring() { - var _a; - const now = new Date().getTime(); - const eagerRefreshThresholdMillis = (_a = this.eagerRefreshThresholdMillis) !== null && _a !== void 0 ? _a : 0; - if (this.rawToken && this.expiresAt) { - return this.expiresAt <= now + eagerRefreshThresholdMillis; - } - else { - return true; - } - } - getToken(callback, opts = {}) { - if (typeof callback === 'object') { - opts = callback; - callback = undefined; - } - opts = Object.assign({ - forceRefresh: false, - }, opts); - if (callback) { - const cb = callback; - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts).then(t => cb(null, t), callback); - return; - } - return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsync).call(this, opts); - } - /** - * Given a keyFile, extract the key and client email if available - * @param keyFile Path to a json, pem, or p12 file that contains the key. - * @returns an object with privateKey and clientEmail properties - */ - async getCredentials(keyFile) { - const ext = path.extname(keyFile); - switch (ext) { - case '.json': { - const key = await readFile(keyFile, 'utf8'); - const body = JSON.parse(key); - const privateKey = body.private_key; - const clientEmail = body.client_email; - if (!privateKey || !clientEmail) { - throw new ErrorWithCode('private_key and client_email are required.', 'MISSING_CREDENTIALS'); - } - return { privateKey, clientEmail }; - } - case '.der': - case '.crt': - case '.pem': { - const privateKey = await readFile(keyFile, 'utf8'); - return { privateKey }; - } - case '.p12': - case '.pfx': { - throw new ErrorWithCode('*.p12 certificates are not supported after v6.1.2. ' + - 'Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.', 'UNKNOWN_CERTIFICATE_TYPE'); - } - default: - throw new ErrorWithCode('Unknown certificate type. Type is determined based on file extension. ' + - 'Current supported extensions are *.json, and *.pem.', 'UNKNOWN_CERTIFICATE_TYPE'); - } - } - revokeToken(callback) { - if (callback) { - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this).then(() => callback(), callback); - return; - } - return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_revokeTokenAsync).call(this); - } -} -exports.GoogleToken = GoogleToken; -_GoogleToken_inFlightRequest = new WeakMap(), _GoogleToken_instances = new WeakSet(), _GoogleToken_getTokenAsync = async function _GoogleToken_getTokenAsync(opts) { - if (__classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f") && !opts.forceRefresh) { - return __classPrivateFieldGet(this, _GoogleToken_inFlightRequest, "f"); - } - try { - return await (__classPrivateFieldSet(this, _GoogleToken_inFlightRequest, __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_getTokenAsyncInner).call(this, opts), "f")); - } - finally { - __classPrivateFieldSet(this, _GoogleToken_inFlightRequest, undefined, "f"); - } -}, _GoogleToken_getTokenAsyncInner = async function _GoogleToken_getTokenAsyncInner(opts) { - if (this.isTokenExpiring() === false && opts.forceRefresh === false) { - return Promise.resolve(this.rawToken); - } - if (!this.key && !this.keyFile) { - throw new Error('No key or keyFile set.'); - } - if (!this.key && this.keyFile) { - const creds = await this.getCredentials(this.keyFile); - this.key = creds.privateKey; - this.iss = creds.clientEmail || this.iss; - if (!creds.clientEmail) { - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_ensureEmail).call(this); - } - } - return __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_requestToken).call(this); -}, _GoogleToken_ensureEmail = function _GoogleToken_ensureEmail() { - if (!this.iss) { - throw new ErrorWithCode('email is required.', 'MISSING_CREDENTIALS'); - } -}, _GoogleToken_revokeTokenAsync = async function _GoogleToken_revokeTokenAsync() { - if (!this.accessToken) { - throw new Error('No token to revoke.'); - } - const url = GOOGLE_REVOKE_TOKEN_URL + this.accessToken; - await this.transporter.request({ - url, - retry: true, - }); - __classPrivateFieldGet(this, _GoogleToken_instances, "m", _GoogleToken_configure).call(this, { - email: this.iss, - sub: this.sub, - key: this.key, - keyFile: this.keyFile, - scope: this.scope, - additionalClaims: this.additionalClaims, - }); -}, _GoogleToken_configure = function _GoogleToken_configure(options = {}) { - this.keyFile = options.keyFile; - this.key = options.key; - this.rawToken = undefined; - this.iss = options.email || options.iss; - this.sub = options.sub; - this.additionalClaims = options.additionalClaims; - if (typeof options.scope === 'object') { - this.scope = options.scope.join(' '); - } - else { - this.scope = options.scope; - } - this.eagerRefreshThresholdMillis = options.eagerRefreshThresholdMillis; - if (options.transporter) { - this.transporter = options.transporter; - } -}, _GoogleToken_requestToken = -/** - * Request the token from Google. - */ -async function _GoogleToken_requestToken() { - var _a, _b; - const iat = Math.floor(new Date().getTime() / 1000); - const additionalClaims = this.additionalClaims || {}; - const payload = Object.assign({ - iss: this.iss, - scope: this.scope, - aud: GOOGLE_TOKEN_URL, - exp: iat + 3600, - iat, - sub: this.sub, - }, additionalClaims); - const signedJWT = jws.sign({ - header: { alg: 'RS256' }, - payload, - secret: this.key, - }); - try { - const r = await this.transporter.request({ - method: 'POST', - url: GOOGLE_TOKEN_URL, - data: { - grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer', - assertion: signedJWT, - }, - headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, - responseType: 'json', - retryConfig: { - httpMethodsToRetry: ['POST'], - }, - }); - this.rawToken = r.data; - this.expiresAt = - r.data.expires_in === null || r.data.expires_in === undefined - ? undefined - : (iat + r.data.expires_in) * 1000; - return this.rawToken; - } - catch (e) { - this.rawToken = undefined; - this.tokenExpires = undefined; - const body = e.response && ((_a = e.response) === null || _a === void 0 ? void 0 : _a.data) - ? (_b = e.response) === null || _b === void 0 ? void 0 : _b.data - : {}; - if (body.error) { - const desc = body.error_description - ? `: ${body.error_description}` - : ''; - e.message = `${body.error}${desc}`; - } - throw e; - } -}; -//# sourceMappingURL=index.js.map + const min = forceColor || 0; + + if (env.TERM === 'dumb') { + return min; + } + + if (process.platform === 'win32') { + // Windows 10 build 10586 is the first Windows release that supports 256 colors. + // Windows 10 build 14931 is the first release that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } -/***/ }), + return min; + } -/***/ 31621: -/***/ ((module) => { + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } -"use strict"; + if (env.COLORTERM === 'truecolor') { + return 3; + } + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } -/***/ }), + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } -/***/ 52589: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + if ('COLORTERM' in env) { + return 1; + } -"use strict"; -var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i'"&]/g,nonAscii:/[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintable:/[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintableOnly:/[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,extensive:/[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g};var defaultEncodeOptions={mode:"specialChars",level:"all",numeric:"decimal"};function encode(text,_a){var _b=_a===void 0?defaultEncodeOptions:_a,_c=_b.mode,mode=_c===void 0?"specialChars":_c,_d=_b.numeric,numeric=_d===void 0?"decimal":_d,_e=_b.level,level=_e===void 0?"all":_e;if(!text){return""}var encodeRegExp=encodeRegExps[mode];var references=allNamedReferences[level].characters;var isHex=numeric==="hexadecimal";return replaceUsingRegExp(text,encodeRegExp,(function(input){var result=references[input];if(!result){var code=input.length>1?surrogate_pairs_1.getCodePoint(input,0):input.charCodeAt(0);result=(isHex?"&#x"+code.toString(16):"&#"+code)+";"}return result}))}exports.encode=encode;var defaultDecodeOptions={scope:"body",level:"all"};var strict=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g;var attribute=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g;var baseDecodeRegExps={xml:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.xml},html4:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.html4},html5:{strict:strict,attribute:attribute,body:named_references_1.bodyRegExps.html5}};var decodeRegExps=__assign(__assign({},baseDecodeRegExps),{all:baseDecodeRegExps.html5});var fromCharCode=String.fromCharCode;var outOfBoundsChar=fromCharCode(65533);var defaultDecodeEntityOptions={level:"all"};function getDecodedEntity(entity,references,isAttribute,isStrict){var decodeResult=entity;var decodeEntityLastChar=entity[entity.length-1];if(isAttribute&&decodeEntityLastChar==="="){decodeResult=entity}else if(isStrict&&decodeEntityLastChar!==";"){decodeResult=entity}else{var decodeResultByReference=references[entity];if(decodeResultByReference){decodeResult=decodeResultByReference}else if(entity[0]==="&"&&entity[1]==="#"){var decodeSecondChar=entity[2];var decodeCode=decodeSecondChar=="x"||decodeSecondChar=="X"?parseInt(entity.substr(3),16):parseInt(entity.substr(2));decodeResult=decodeCode>=1114111?outOfBoundsChar:decodeCode>65535?surrogate_pairs_1.fromCodePoint(decodeCode):fromCharCode(numeric_unicode_map_1.numericUnicodeMap[decodeCode]||decodeCode)}}return decodeResult}function decodeEntity(entity,_a){var _b=(_a===void 0?defaultDecodeEntityOptions:_a).level,level=_b===void 0?"all":_b;if(!entity){return""}return getDecodedEntity(entity,allNamedReferences[level].entities,false,false)}exports.decodeEntity=decodeEntity;function decode(text,_a){var _b=_a===void 0?defaultDecodeOptions:_a,_c=_b.level,level=_c===void 0?"all":_c,_d=_b.scope,scope=_d===void 0?level==="xml"?"strict":"body":_d;if(!text){return""}var decodeRegExp=decodeRegExps[level][scope];var references=allNamedReferences[level].entities;var isAttribute=scope==="attribute";var isStrict=scope==="strict";return replaceUsingRegExp(text,decodeRegExp,(function(entity){return getDecodedEntity(entity,references,isAttribute,isStrict)}))}exports.decode=decode; -//# sourceMappingURL=./index.js.map + return min; +} -/***/ }), +function getSupportLevel(stream) { + const level = supportsColor(stream, stream && stream.isTTY); + return translateLevel(level); +} -/***/ 6068: -/***/ ((__unused_webpack_module, exports) => { +module.exports = { + supportsColor: getSupportLevel, + stdout: translateLevel(supportsColor(true, tty.isatty(1))), + stderr: translateLevel(supportsColor(true, tty.isatty(2))) +}; -"use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g};exports.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"¥","¥":"¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"­","­":"­","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"À","À":"À","Á":"Á","Á":"Á","Â":"Â","Â":"Â","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","Å":"Å","Å":"Å","Æ":"Æ","Æ":"Æ","Ç":"Ç","Ç":"Ç","È":"È","È":"È","É":"É","É":"É","Ê":"Ê","Ê":"Ê","Ë":"Ë","Ë":"Ë","Ì":"Ì","Ì":"Ì","Í":"Í","Í":"Í","Î":"Î","Î":"Î","Ï":"Ï","Ï":"Ï","Ð":"Ð","Ð":"Ð","Ñ":"Ñ","Ñ":"Ñ","Ò":"Ò","Ò":"Ò","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","Õ":"Õ","Õ":"Õ","Ö":"Ö","Ö":"Ö","×":"×","×":"×","Ø":"Ø","Ø":"Ø","Ù":"Ù","Ù":"Ù","Ú":"Ú","Ú":"Ú","Û":"Û","Û":"Û","Ü":"Ü","Ü":"Ü","Ý":"Ý","Ý":"Ý","Þ":"Þ","Þ":"Þ","ß":"ß","ß":"ß","à":"à","à":"à","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"å","å":"å","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"í","í":"í","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"‌","‍":"‍","‎":"‎","‏":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©","ª":"ª","«":"«","¬":"¬","­":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´","µ":"µ","¶":"¶","·":"·","¸":"¸","¹":"¹","º":"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿","À":"À","Á":"Á","Â":"Â","Ã":"Ã","Ä":"Ä","Å":"Å","Æ":"Æ","Ç":"Ç","È":"È","É":"É","Ê":"Ê","Ë":"Ë","Ì":"Ì","Í":"Í","Î":"Î","Ï":"Ï","Ð":"Ð","Ñ":"Ñ","Ò":"Ò","Ó":"Ó","Ô":"Ô","Õ":"Õ","Ö":"Ö","×":"×","Ø":"Ø","Ù":"Ù","Ú":"Ú","Û":"Û","Ü":"Ü","Ý":"Ý","Þ":"Þ","ß":"ß","à":"à","á":"á","â":"â","ã":"ã","ä":"ä","å":"å","æ":"æ","ç":"ç","è":"è","é":"é","ê":"ê","ë":"ë","ì":"ì","í":"í","î":"î","ï":"ï","ð":"ð","ñ":"ñ","ò":"ò","ó":"ó","ô":"ô","õ":"õ","ö":"ö","÷":"÷","ø":"ø","ù":"ù","ú":"ú","û":"û","ü":"ü","ý":"ý","þ":"þ","ÿ":"ÿ",'"':""","&":"&","<":"<",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"‌","‍":"‍","‎":"‎","‏":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","〈":"⟨","〉":"⟩","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"}},html5:{entities:{"Æ":"Æ","Æ":"Æ","&":"&","&":"&","Á":"Á","Á":"Á","Ă":"Ă","Â":"Â","Â":"Â","А":"А","𝔄":"𝔄","À":"À","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"⁡","Å":"Å","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","ℬ":"ℬ","≎":"≎","Ч":"Ч","©":"©","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","ℭ":"ℭ","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","ⅅ":"ⅅ","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","∯":"∯","¨":"¨","⇓":"⇓","⇐":"⇐","⇔":"⇔","⫤":"⫤","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","⇓":"⇓","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","Ð":"Ð","É":"É","É":"É","Ě":"Ě","Ê":"Ê","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","ℱ":"ℱ","Ѓ":"Ѓ",">":">",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","ℋ":"ℋ","Ħ":"Ħ","≎":"≎","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Í":"Í","Î":"Î","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ì":"Ì","ℑ":"ℑ","Ī":"Ī","ⅈ":"ⅈ","⇒":"⇒","∬":"∬","∫":"∫","⋂":"⋂","⁣":"⁣","⁢":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⇐":"⇐","⇔":"⇔","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","⟸":"⟸","⟺":"⟺","⟹":"⟹","𝕃":"𝕃","↙":"↙","↘":"↘","ℒ":"ℒ","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","ℳ":"ℳ","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"​","​":"​","​":"​","​":"​","≫":"≫","≪":"≪"," ":"\n","𝔑":"𝔑","⁠":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Ø":"Ø","Õ":"Õ","Õ":"Õ","⨷":"⨷","Ö":"Ö","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℌ":"ℌ","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∷":"∷","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",""":'"',""":'"',"𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","ℜ":"ℜ","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","⇒":"⇒","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↓":"↓","←":"←","→":"→","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∋":"∋","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","⋑":"⋑","Þ":"Þ","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц"," ":"\t","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ù":"Ù","Ū":"Ū","_":"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","↑":"↑","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","⇑":"⇑","⇕":"⇕","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","​":"​","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"⁡","𝔞":"𝔞","à":"à","à":"à","ℵ":"ℵ","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","&":"&","&":"&","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∠":"∠","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","Å":"Å","⍼":"⍼","ą":"ą","𝕒":"𝕒","≈":"≈","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","≈":"≈","≊":"≊","å":"å","å":"å","𝒶":"𝒶","*":"*","≈":"≈","≍":"≍","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"∳","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⌅":"⌅","⎵":"⎵","⎶":"⎶","≌":"≌","б":"б","„":"„","∵":"∵","∵":"∵","⦰":"⦰","϶":"϶","ℬ":"ℬ","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","⋂":"⋂","◯":"◯","⋃":"⋃","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⋁":"⋁","⋀":"⋀","⤍":"⤍","⧫":"⧫","▪":"▪","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⊥":"⊥","⊥":"⊥","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","─":"─","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","‵":"‵","˘":"˘","¦":"¦","¦":"¦","𝒷":"𝒷","⁏":"⁏","∽":"∽","⋍":"⋍","\":"\\","⧅":"⧅","⟈":"⟈","•":"•","•":"•","≎":"≎","⪮":"⪮","≏":"≏","≏":"≏","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","ˇ":"ˇ","⩍":"⩍","č":"č","ç":"ç","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"𝔠","ч":"ч","✓":"✓","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","®":"®","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","≗":"≗","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣","♣":"♣",":":":","≔":"≔","≔":"≔",",":",","@":"@","∁":"∁","∘":"∘","∁":"∁","ℂ":"ℂ","≅":"≅","⩭":"⩭","∮":"∮","𝕔":"𝕔","∐":"∐","©":"©","©":"©","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋞":"⋞","⋟":"⋟","⋎":"⋎","⋏":"⋏","¤":"¤","¤":"¤","↶":"↶","↷":"↷","⋎":"⋎","⋏":"⋏","∲":"∲","∱":"∱","⌭":"⌭","⇓":"⇓","⥥":"⥥","†":"†","ℸ":"ℸ","↓":"↓","‐":"‐","⊣":"⊣","⤏":"⤏","˝":"˝","ď":"ď","д":"д","ⅆ":"ⅆ","‡":"‡","⇊":"⇊","⩷":"⩷","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","⇃":"⇃","⇂":"⇂","⋄":"⋄","⋄":"⋄","♦":"♦","♦":"♦","¨":"¨","ϝ":"ϝ","⋲":"⋲","÷":"÷","÷":"÷","÷":"÷","⋇":"⋇","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍","$":"$","𝕕":"𝕕","˙":"˙","≐":"≐","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌆":"⌆","↓":"↓","⇊":"⇊","⇃":"⇃","⇂":"⇂","⤐":"⤐","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","▾":"▾","⇵":"⇵","⥯":"⥯","⦦":"⦦","џ":"џ","⟿":"⟿","⩷":"⩷","≑":"≑","é":"é","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","ê":"ê","≕":"≕","э":"э","ė":"ė","ⅇ":"ⅇ","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅","∅":"∅","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"≖","≕":"≕","≂":"≂","⪖":"⪖","⪕":"⪕","=":"=","≟":"≟","≡":"≡","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","≐":"≐","≂":"≂","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"€","!":"!","∃":"∃","ℰ":"ℰ","ⅇ":"ⅇ","≒":"≒","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi","fj":"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","∀":"∀","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","½":"½","⅓":"⅓","¼":"¼","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","≧":"≧","⪌":"⪌","ǵ":"ǵ","γ":"γ","ϝ":"ϝ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","≥":"≥","⋛":"⋛","≥":"≥","≧":"≧","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","≫":"≫","⋙":"⋙","ℷ":"ℷ","ѓ":"ѓ","≷":"≷","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪊":"⪊","⪈":"⪈","⪈":"⪈","≩":"≩","⋧":"⋧","𝕘":"𝕘","`":"`","ℊ":"ℊ","≳":"≳","⪎":"⪎","⪐":"⪐",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⪆":"⪆","⥸":"⥸","⋗":"⋗","⋛":"⋛","⪌":"⪌","≷":"≷","≳":"≳","≩︀":"≩︀","≩︀":"≩︀","⇔":"⇔"," ":" ","½":"½","ℋ":"ℋ","ъ":"ъ","↔":"↔","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ℏ":"ℏ","ħ":"ħ","⁃":"⁃","‐":"‐","í":"í","í":"í","⁣":"⁣","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"⇔","𝔦":"𝔦","ì":"ì","ì":"ì","ⅈ":"ⅈ","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ℑ":"ℑ","ℐ":"ℐ","ℑ":"ℑ","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","∈":"∈","℅":"℅","∞":"∞","⧝":"⧝","ı":"ı","∫":"∫","⊺":"⊺","ℤ":"ℤ","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"𝒾","∈":"∈","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","∈":"∈","⁢":"⁢","ĩ":"ĩ","і":"і","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⇚":"⇚","⇐":"⇐","⤛":"⤛","⤎":"⤎","≦":"≦","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"ℒ","λ":"λ","⟨":"⟨","⦑":"⦑","⟨":"⟨","⪅":"⪅","«":"«","«":"«","←":"←","⇤":"⇤","⤟":"⤟","⤝":"⤝","↩":"↩","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","⌈":"⌈","{":"{","л":"л","⤶":"⤶","“":"“","„":"„","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","←":"←","↢":"↢","↽":"↽","↼":"↼","⇇":"⇇","↔":"↔","⇆":"⇆","⇋":"⇋","↭":"↭","⋋":"⋋","⋚":"⋚","≤":"≤","≦":"≦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⪅":"⪅","⋖":"⋖","⋚":"⋚","⪋":"⪋","≶":"≶","≲":"≲","⥼":"⥼","⌊":"⌊","𝔩":"𝔩","≶":"≶","⪑":"⪑","↽":"↽","↼":"↼","⥪":"⥪","▄":"▄","љ":"љ","≪":"≪","⇇":"⇇","⌞":"⌞","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","⎰":"⎰","≨":"≨","⪉":"⪉","⪉":"⪉","⪇":"⪇","⪇":"⪇","≨":"≨","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟦":"⟦","⟵":"⟵","⟷":"⟷","⟼":"⟼","⟶":"⟶","↫":"↫","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","_":"_","◊":"◊","◊":"◊","⧫":"⧫","(":"(","⦓":"⦓","⇆":"⇆","⌟":"⌟","⇋":"⇋","⥭":"⥭","‎":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","↰":"↰","≲":"≲","⪍":"⪍","⪏":"⪏","[":"[","‘":"‘","‚":"‚","ł":"ł","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"⋖","⋋":"⋋","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⊴":"⊴","◂":"◂","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","≨︀":"≨︀","∺":"∺","¯":"¯","¯":"¯","♂":"♂","✠":"✠","✠":"✠","↦":"↦","↦":"↦","↧":"↧","↤":"↤","↥":"↥","▮":"▮","⨩":"⨩","м":"м","—":"—","∡":"∡","𝔪":"𝔪","℧":"℧","µ":"µ","µ":"µ","∣":"∣","*":"*","⫰":"⫰","·":"·","·":"·","−":"−","⊟":"⊟","∸":"∸","⨪":"⨪","⫛":"⫛","…":"…","∓":"∓","⊧":"⊧","𝕞":"𝕞","∓":"∓","𝓂":"𝓂","∾":"∾","μ":"μ","⊸":"⊸","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","≫̸":"≫̸","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","≪̸":"≪̸","⇏":"⇏","⊯":"⊯","⊮":"⊮","∇":"∇","ń":"ń","∠⃒":"∠⃒","≉":"≉","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","≉":"≉","♮":"♮","♮":"♮","ℕ":"ℕ"," ":" "," ":" ","≎̸":"≎̸","≏̸":"≏̸","⩃":"⩃","ň":"ň","ņ":"ņ","≇":"≇","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","≠":"≠","⇗":"⇗","⤤":"⤤","↗":"↗","↗":"↗","≐̸":"≐̸","≢":"≢","⤨":"⤨","≂̸":"≂̸","∄":"∄","∄":"∄","𝔫":"𝔫","≧̸":"≧̸","≱":"≱","≱":"≱","≧̸":"≧̸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"≵","≯":"≯","≯":"≯","⇎":"⇎","↮":"↮","⫲":"⫲","∋":"∋","⋼":"⋼","⋺":"⋺","∋":"∋","њ":"њ","⇍":"⇍","≦̸":"≦̸","↚":"↚","‥":"‥","≰":"≰","↚":"↚","↮":"↮","≰":"≰","≦̸":"≦̸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"≮","≴":"≴","≮":"≮","⋪":"⋪","⋬":"⋬","∤":"∤","𝕟":"𝕟","¬":"¬","¬":"¬","∉":"∉","⋹̸":"⋹̸","⋵̸":"⋵̸","∉":"∉","⋷":"⋷","⋶":"⋶","∌":"∌","∌":"∌","⋾":"⋾","⋽":"⋽","∦":"∦","∦":"∦","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","⊀":"⊀","⋠":"⋠","⪯̸":"⪯̸","⊀":"⊀","⪯̸":"⪯̸","⇏":"⇏","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","↛":"↛","⋫":"⋫","⋭":"⋭","⊁":"⊁","⋡":"⋡","⪰̸":"⪰̸","𝓃":"𝓃","∤":"∤","∦":"∦","≁":"≁","≄":"≄","≄":"≄","∤":"∤","∦":"∦","⋢":"⋢","⋣":"⋣","⊄":"⊄","⫅̸":"⫅̸","⊈":"⊈","⊂⃒":"⊂⃒","⊈":"⊈","⫅̸":"⫅̸","⊁":"⊁","⪰̸":"⪰̸","⊅":"⊅","⫆̸":"⫆̸","⊉":"⊉","⊃⃒":"⊃⃒","⊉":"⊉","⫆̸":"⫆̸","≹":"≹","ñ":"ñ","ñ":"ñ","≸":"≸","⋪":"⋪","⋬":"⋬","⋫":"⋫","⋭":"⋭","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","↖":"↖","↖":"↖","⤧":"⤧","Ⓢ":"Ⓢ","ó":"ó","ó":"ó","⊛":"⊛","⊚":"⊚","ô":"ô","ô":"ô","о":"о","⊝":"⊝","ő":"ő","⨸":"⨸","⊙":"⊙","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","ò":"ò","⧁":"⧁","⦵":"⦵","Ω":"Ω","∮":"∮","↺":"↺","⦾":"⦾","⦻":"⦻","‾":"‾","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","⊖":"⊖","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","⊕":"⊕","∨":"∨","↻":"↻","⩝":"⩝","ℴ":"ℴ","ℴ":"ℴ","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ℴ":"ℴ","ø":"ø","ø":"ø","⊘":"⊘","õ":"õ","õ":"õ","⊗":"⊗","⨶":"⨶","ö":"ö","ö":"ö","⌽":"⌽","∥":"∥","¶":"¶","¶":"¶","∥":"∥","⫳":"⫳","⫽":"⫽","∂":"∂","п":"п","%":"%",".":".","‰":"‰","⊥":"⊥","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","ℳ":"ℳ","☎":"☎","π":"π","⋔":"⋔","ϖ":"ϖ","ℏ":"ℏ","ℎ":"ℎ","ℏ":"ℏ","+":"+","⨣":"⨣","⊞":"⊞","⨢":"⨢","∔":"∔","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"⨕","𝕡":"𝕡","£":"£","£":"£","≺":"≺","⪳":"⪳","⪷":"⪷","≼":"≼","⪯":"⪯","≺":"≺","⪷":"⪷","≼":"≼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"⋨","≾":"≾","′":"′","ℙ":"ℙ","⪵":"⪵","⪹":"⪹","⋨":"⋨","∏":"∏","⌮":"⌮","⌒":"⌒","⌓":"⌓","∝":"∝","∝":"∝","≾":"≾","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","⨌":"⨌","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","ℍ":"ℍ","⨖":"⨖","?":"?","≟":"≟",""":'"',""":'"',"⇛":"⇛","⇒":"⇒","⤜":"⤜","⤏":"⤏","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","√":"√","⦳":"⦳","⟩":"⟩","⦒":"⦒","⦥":"⦥","⟩":"⟩","»":"»","»":"»","→":"→","⥵":"⥵","⇥":"⇥","⤠":"⤠","⤳":"⤳","⤞":"⤞","↪":"↪","↬":"↬","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","ℚ":"ℚ","⤍":"⤍","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","⌉":"⌉","}":"}","р":"р","⤷":"⤷","⥩":"⥩","”":"”","”":"”","↳":"↳","ℜ":"ℜ","ℛ":"ℛ","ℜ":"ℜ","ℝ":"ℝ","▭":"▭","®":"®","®":"®","⥽":"⥽","⌋":"⌋","𝔯":"𝔯","⇁":"⇁","⇀":"⇀","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","→":"→","↣":"↣","⇁":"⇁","⇀":"⇀","⇄":"⇄","⇌":"⇌","⇉":"⇉","↝":"↝","⋌":"⋌","˚":"˚","≓":"≓","⇄":"⇄","⇌":"⇌","‏":"‏","⎱":"⎱","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⟧":"⟧","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","⇉":"⇉","›":"›","𝓇":"𝓇","↱":"↱","]":"]","’":"’","’":"’","⋌":"⋌","⋊":"⋊","▹":"▹","⊵":"⊵","▸":"▸","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","‚":"‚","≻":"≻","⪴":"⪴","⪸":"⪸","š":"š","≽":"≽","⪰":"⪰","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","≿":"≿","с":"с","⋅":"⋅","⊡":"⊡","⩦":"⩦","⇘":"⇘","⤥":"⤥","↘":"↘","↘":"↘","§":"§","§":"§",";":";","⤩":"⤩","∖":"∖","∖":"∖","✶":"✶","𝔰":"𝔰","⌢":"⌢","♯":"♯","щ":"щ","ш":"ш","∣":"∣","∥":"∥","­":"­","­":"­","σ":"σ","ς":"ς","ς":"ς","∼":"∼","⩪":"⩪","≃":"≃","≃":"≃","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","←":"←","∖":"∖","⨳":"⨳","⧤":"⧤","∣":"∣","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","♠":"♠","∥":"∥","⊓":"⊓","⊓︀":"⊓︀","⊔":"⊔","⊔︀":"⊔︀","⊏":"⊏","⊑":"⊑","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊐":"⊐","⊒":"⊒","□":"□","□":"□","▪":"▪","▪":"▪","→":"→","𝓈":"𝓈","∖":"∖","⌣":"⌣","⋆":"⋆","☆":"☆","★":"★","ϵ":"ϵ","ϕ":"ϕ","¯":"¯","⊂":"⊂","⫅":"⫅","⪽":"⪽","⊆":"⊆","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⊂":"⊂","⊆":"⊆","⫅":"⫅","⊊":"⊊","⫋":"⫋","⫇":"⫇","⫕":"⫕","⫓":"⫓","≻":"≻","⪸":"⪸","≽":"≽","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"⋩","≿":"≿","∑":"∑","♪":"♪","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"⊃","⫆":"⫆","⪾":"⪾","⫘":"⫘","⊇":"⊇","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⊃":"⊃","⊇":"⊇","⫆":"⫆","⊋":"⊋","⫌":"⫌","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤦":"⤦","↙":"↙","↙":"↙","⤪":"⤪","ß":"ß","ß":"ß","⌖":"⌖","τ":"τ","⎴":"⎴","ť":"ť","ţ":"ţ","т":"т","⃛":"⃛","⌕":"⌕","𝔱":"𝔱","∴":"∴","∴":"∴","θ":"θ","ϑ":"ϑ","ϑ":"ϑ","≈":"≈","∼":"∼"," ":" ","≈":"≈","∼":"∼","þ":"þ","þ":"þ","˜":"˜","×":"×","×":"×","⊠":"⊠","⨱":"⨱","⨰":"⨰","∭":"∭","⤨":"⤨","⊤":"⊤","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","⤩":"⤩","‴":"‴","™":"™","▵":"▵","▿":"▿","◃":"◃","⊴":"⊴","≜":"≜","▹":"▹","⊵":"⊵","◬":"◬","≜":"≜","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","≬":"≬","↞":"↞","↠":"↠","⇑":"⇑","⥣":"⥣","ú":"ú","ú":"ú","↑":"↑","ў":"ў","ŭ":"ŭ","û":"û","û":"û","у":"у","⇅":"⇅","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"𝔲","ù":"ù","ù":"ù","↿":"↿","↾":"↾","▀":"▀","⌜":"⌜","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","¨":"¨","¨":"¨","ų":"ų","𝕦":"𝕦","↑":"↑","↕":"↕","↿":"↿","↾":"↾","⊎":"⊎","υ":"υ","ϒ":"ϒ","υ":"υ","⇈":"⇈","⌝":"⌝","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","▵":"▵","▴":"▴","⇈":"⇈","ü":"ü","ü":"ü","⦧":"⦧","⇕":"⇕","⫨":"⫨","⫩":"⫩","⊨":"⊨","⦜":"⦜","ϵ":"ϵ","ϰ":"ϰ","∅":"∅","ϕ":"ϕ","ϖ":"ϖ","∝":"∝","↕":"↕","ϱ":"ϱ","ς":"ς","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","ϑ":"ϑ","⊲":"⊲","⊳":"⊳","в":"в","⊢":"⊢","∨":"∨","⊻":"⊻","≚":"≚","⋮":"⋮","|":"|","|":"|","𝔳":"𝔳","⊲":"⊲","⊂⃒":"⊂⃒","⊃⃒":"⊃⃒","𝕧":"𝕧","∝":"∝","⊳":"⊳","𝓋":"𝓋","⫋︀":"⫋︀","⊊︀":"⊊︀","⫌︀":"⫌︀","⊋︀":"⊋︀","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","∧":"∧","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","℘":"℘","≀":"≀","≀":"≀","𝓌":"𝓌","⋂":"⋂","◯":"◯","⋃":"⋃","▽":"▽","𝔵":"𝔵","⟺":"⟺","⟷":"⟷","ξ":"ξ","⟸":"⟸","⟵":"⟵","⟼":"⟼","⋻":"⋻","⨀":"⨀","𝕩":"𝕩","⨁":"⨁","⨂":"⨂","⟹":"⟹","⟶":"⟶","𝓍":"𝓍","⨆":"⨆","⨄":"⨄","△":"△","⋁":"⋁","⋀":"⋀","ý":"ý","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"ℨ","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"‍","‌":"‌"},characters:{"Æ":"Æ","&":"&","Á":"Á","Ă":"Ă","Â":"Â","А":"А","𝔄":"𝔄","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"⁡","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","≎":"≎","Ч":"Ч","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","⇓":"⇓","⇐":"⇐","⇔":"⇔","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","É":"É","Ě":"Ě","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","Ѓ":"Ѓ",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","Ħ":"Ħ","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ī":"Ī","ⅈ":"ⅈ","∬":"∬","∫":"∫","⋂":"⋂","⁣":"⁣","⁢":"⁢","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","𝕃":"𝕃","↙":"↙","↘":"↘","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"​","\n":" ","𝔑":"𝔑","⁠":"⁠"," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Õ":"Õ","⨷":"⨷","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",'"':""","𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","\t":" ","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ū":"Ū",_:"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","а":"а","æ":"æ","𝔞":"𝔞","à":"à","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","⍼":"⍼","ą":"ą","𝕒":"𝕒","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","å":"å","𝒶":"𝒶","*":"*","ã":"ã","ä":"ä","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⎶":"⎶","б":"б","„":"„","⦰":"⦰","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","◯":"◯","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⤍":"⤍","⧫":"⧫","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","¦":"¦","𝒷":"𝒷","⁏":"⁏","\\":"\","⧅":"⧅","⟈":"⟈","•":"•","⪮":"⪮","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","⩍":"⩍","č":"č","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","⦲":"⦲","¢":"¢","𝔠":"𝔠","ч":"ч","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣",":":":",",":",","@":"@","∁":"∁","⩭":"⩭","𝕔":"𝕔","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋎":"⋎","⋏":"⋏","¤":"¤","∱":"∱","⌭":"⌭","⥥":"⥥","†":"†","ℸ":"ℸ","‐":"‐","⤏":"⤏","ď":"ď","д":"д","⇊":"⇊","⩷":"⩷","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","♦":"♦","ϝ":"ϝ","⋲":"⋲","÷":"÷","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍",$:"$","𝕕":"𝕕","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","⦦":"⦦","џ":"џ","⟿":"⟿","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","≕":"≕","э":"э","ė":"ė","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ϵ":"ϵ","=":"=","≟":"≟","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","η":"η","ð":"ð","ë":"ë","€":"€","!":"!","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi",fj:"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","⅓":"⅓","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","⪌":"⪌","ǵ":"ǵ","γ":"γ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","ℷ":"ℷ","ѓ":"ѓ","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪈":"⪈","⋧":"⋧","𝕘":"𝕘","ℊ":"ℊ","⪎":"⪎","⪐":"⪐","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⥸":"⥸","≩︀":"≩︀","ъ":"ъ","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ħ":"ħ","⁃":"⁃","í":"í","î":"î","и":"и","е":"е","¡":"¡","𝔦":"𝔦","ì":"ì","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","℅":"℅","∞":"∞","⧝":"⧝","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","¿":"¿","𝒾":"𝒾","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","ĩ":"ĩ","і":"і","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⤛":"⤛","⤎":"⤎","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","λ":"λ","⦑":"⦑","⪅":"⪅","«":"«","⤟":"⤟","⤝":"⤝","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","л":"л","⤶":"⤶","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","⇇":"⇇","⋋":"⋋","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⋖":"⋖","⥼":"⥼","𝔩":"𝔩","⪑":"⪑","⥪":"⥪","▄":"▄","љ":"љ","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","≨":"≨","⪉":"⪉","⪇":"⪇","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟼":"⟼","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","◊":"◊","(":"(","⦓":"⦓","⥭":"⥭","‎":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","⪍":"⪍","⪏":"⪏","‚":"‚","ł":"ł","⪦":"⪦","⩹":"⩹","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","∺":"∺","¯":"¯","♂":"♂","✠":"✠","▮":"▮","⨩":"⨩","м":"м","—":"—","𝔪":"𝔪","℧":"℧","µ":"µ","⫰":"⫰","−":"−","⨪":"⨪","⫛":"⫛","⊧":"⊧","𝕞":"𝕞","𝓂":"𝓂","μ":"μ","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","⇏":"⇏","⊯":"⊯","⊮":"⊮","ń":"ń","∠⃒":"∠⃒","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","♮":"♮","⩃":"⩃","ň":"ň","ņ":"ņ","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","⇗":"⇗","⤤":"⤤","≐̸":"≐̸","⤨":"⤨","𝔫":"𝔫","↮":"↮","⫲":"⫲","⋼":"⋼","⋺":"⋺","њ":"њ","≦̸":"≦̸","↚":"↚","‥":"‥","𝕟":"𝕟","¬":"¬","⋹̸":"⋹̸","⋵̸":"⋵̸","⋷":"⋷","⋶":"⋶","⋾":"⋾","⋽":"⋽","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","𝓃":"𝓃","⊄":"⊄","⫅̸":"⫅̸","⊅":"⊅","⫆̸":"⫆̸","ñ":"ñ","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","⤧":"⤧","ó":"ó","ô":"ô","о":"о","ő":"ő","⨸":"⨸","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","⧁":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","∨":"∨","⩝":"⩝","ℴ":"ℴ","ª":"ª","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ø":"ø","⊘":"⊘","õ":"õ","⨶":"⨶","ö":"ö","⌽":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽","п":"п","%":"%",".":".","‰":"‰","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","☎":"☎","π":"π","ϖ":"ϖ","ℎ":"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","⨕":"⨕","𝕡":"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","⋨":"⋨","′":"′","⌮":"⌮","⌒":"⌒","⌓":"⌓","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","⨖":"⨖","?":"?","⤜":"⤜","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","⦳":"⦳","⦒":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","⤞":"⤞","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","р":"р","⤷":"⤷","⥩":"⥩","↳":"↳","▭":"▭","⥽":"⥽","𝔯":"𝔯","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","⇉":"⇉","⋌":"⋌","˚":"˚","‏":"‏","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","›":"›","𝓇":"𝓇","⋊":"⋊","▹":"▹","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","⪴":"⪴","⪸":"⪸","š":"š","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","с":"с","⋅":"⋅","⩦":"⩦","⇘":"⇘","§":"§",";":";","⤩":"⤩","✶":"✶","𝔰":"𝔰","♯":"♯","щ":"щ","ш":"ш","­":"­","σ":"σ","ς":"ς","⩪":"⩪","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","⊓︀":"⊓︀","⊔︀":"⊔︀","𝓈":"𝓈","☆":"☆","⊂":"⊂","⫅":"⫅","⪽":"⪽","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⫇":"⫇","⫕":"⫕","⫓":"⫓","♪":"♪","¹":"¹","²":"²","³":"³","⫆":"⫆","⪾":"⪾","⫘":"⫘","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤪":"⤪","ß":"ß","⌖":"⌖","τ":"τ","ť":"ť","ţ":"ţ","т":"т","⌕":"⌕","𝔱":"𝔱","θ":"θ","ϑ":"ϑ","þ":"þ","×":"×","⨱":"⨱","⨰":"⨰","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","‴":"‴","▵":"▵","≜":"≜","◬":"◬","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","⥣":"⥣","ú":"ú","ў":"ў","ŭ":"ŭ","û":"û","у":"у","ű":"ű","⥾":"⥾","𝔲":"𝔲","ù":"ù","▀":"▀","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","ų":"ų","𝕦":"𝕦","υ":"υ","⇈":"⇈","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","ü":"ü","⦧":"⦧","⫨":"⫨","⫩":"⫩","⦜":"⦜","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","в":"в","⊻":"⊻","≚":"≚","⋮":"⋮","𝔳":"𝔳","𝕧":"𝕧","𝓋":"𝓋","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","𝓌":"𝓌","𝔵":"𝔵","ξ":"ξ","⋻":"⋻","𝕩":"𝕩","𝓍":"𝓍","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"‍","‌":"‌"}}}; -//# sourceMappingURL=./named-references.js.map /***/ }), -/***/ 45439: +/***/ 14920: /***/ ((__unused_webpack_module, exports) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}; -//# sourceMappingURL=./numeric-unicode-map.js.map + +/** + * @license + * Copyright 2020 Google LLC + * + * 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. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TeenyStatistics = exports.TeenyStatisticsWarning = void 0; +/** + * @class TeenyStatisticsWarning + * @extends Error + * @description While an error, is used for emitting warnings when + * meeting certain configured thresholds. + * @see process.emitWarning + */ +class TeenyStatisticsWarning extends Error { + /** + * @param {string} message + */ + constructor(message) { + super(message); + this.threshold = 0; + this.type = ''; + this.value = 0; + this.name = this.constructor.name; + Error.captureStackTrace(this, this.constructor); + } +} +exports.TeenyStatisticsWarning = TeenyStatisticsWarning; +TeenyStatisticsWarning.CONCURRENT_REQUESTS = 'ConcurrentRequestsExceededWarning'; +/** + * @class TeenyStatistics + * @description Maintain various statistics internal to teeny-request. Tracking + * is not automatic and must be instrumented within teeny-request. + */ +class TeenyStatistics { + /** + * @param {TeenyStatisticsOptions} [opts] + */ + constructor(opts) { + /** + * @type {number} + * @private + * @default 0 + */ + this._concurrentRequests = 0; + /** + * @type {boolean} + * @private + * @default false + */ + this._didConcurrentRequestWarn = false; + this._options = TeenyStatistics._prepareOptions(opts); + } + /** + * Returns a copy of the current options. + * @return {TeenyStatisticsOptions} + */ + getOptions() { + return Object.assign({}, this._options); + } + /** + * Change configured statistics options. This will not preserve unspecified + * options that were previously specified, i.e. this is a reset of options. + * @param {TeenyStatisticsOptions} [opts] + * @returns {TeenyStatisticsConfig} The previous options. + * @see _prepareOptions + */ + setOptions(opts) { + const oldOpts = this._options; + this._options = TeenyStatistics._prepareOptions(opts); + return oldOpts; + } + /** + * @readonly + * @return {TeenyStatisticsCounters} + */ + get counters() { + return { + concurrentRequests: this._concurrentRequests, + }; + } + /** + * @description Should call this right before making a request. + */ + requestStarting() { + this._concurrentRequests++; + if (this._options.concurrentRequests > 0 && + this._concurrentRequests >= this._options.concurrentRequests && + !this._didConcurrentRequestWarn) { + this._didConcurrentRequestWarn = true; + const warning = new TeenyStatisticsWarning('Possible excessive concurrent requests detected. ' + + this._concurrentRequests + + ' requests in-flight, which exceeds the configured threshold of ' + + this._options.concurrentRequests + + '. Use the TEENY_REQUEST_WARN_CONCURRENT_REQUESTS environment ' + + 'variable or the concurrentRequests option of teeny-request to ' + + 'increase or disable (0) this warning.'); + warning.type = TeenyStatisticsWarning.CONCURRENT_REQUESTS; + warning.value = this._concurrentRequests; + warning.threshold = this._options.concurrentRequests; + process.emitWarning(warning); + } + } + /** + * @description When using `requestStarting`, call this after the request + * has finished. + */ + requestFinished() { + // TODO negative? + this._concurrentRequests--; + } + /** + * Configuration Precedence: + * 1. Dependency inversion via defined option. + * 2. Global numeric environment variable. + * 3. Built-in default. + * This will not preserve unspecified options previously specified. + * @param {TeenyStatisticsOptions} [opts] + * @returns {TeenyStatisticsOptions} + * @private + */ + static _prepareOptions({ concurrentRequests: diConcurrentRequests, } = {}) { + let concurrentRequests = this.DEFAULT_WARN_CONCURRENT_REQUESTS; + const envConcurrentRequests = Number(process.env.TEENY_REQUEST_WARN_CONCURRENT_REQUESTS); + if (diConcurrentRequests !== undefined) { + concurrentRequests = diConcurrentRequests; + } + else if (!Number.isNaN(envConcurrentRequests)) { + concurrentRequests = envConcurrentRequests; + } + return { concurrentRequests }; + } +} +exports.TeenyStatistics = TeenyStatistics; +/** + * @description A default threshold representing when to warn about excessive + * in-flight/concurrent requests. + * @type {number} + * @static + * @readonly + * @default 5000 + */ +TeenyStatistics.DEFAULT_WARN_CONCURRENT_REQUESTS = 5000; +//# sourceMappingURL=TeenyStatistics.js.map /***/ }), -/***/ 1454: -/***/ ((__unused_webpack_module, exports) => { +/***/ 60446: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({value:true}));exports.fromCodePoint=String.fromCodePoint||function(astralCodePoint){return String.fromCharCode(Math.floor((astralCodePoint-65536)/1024)+55296,(astralCodePoint-65536)%1024+56320)};exports.getCodePoint=String.prototype.codePointAt?function(input,position){return input.codePointAt(position)}:function(input,position){return(input.charCodeAt(position)-55296)*1024+input.charCodeAt(position+1)-56320+65536};exports.highSurrogateFrom=55296;exports.highSurrogateTo=56319; -//# sourceMappingURL=./surrogate-pairs.js.map + +/** + * @license + * Copyright 2019 Google LLC + * + * 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. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAgent = exports.pool = void 0; +const http_1 = __nccwpck_require__(13685); +const https_1 = __nccwpck_require__(95687); +// eslint-disable-next-line node/no-deprecated-api +const url_1 = __nccwpck_require__(57310); +exports.pool = new Map(); +/** + * Determines if a proxy should be considered based on the environment. + * + * @param uri The request uri + * @returns {boolean} + */ +function shouldUseProxyForURI(uri) { + const noProxyEnv = process.env.NO_PROXY || process.env.no_proxy; + if (!noProxyEnv) { + return true; + } + const givenURI = new URL(uri); + for (const noProxyRaw of noProxyEnv.split(',')) { + const noProxy = noProxyRaw.trim(); + if (noProxy === givenURI.origin || noProxy === givenURI.hostname) { + return false; + } + else if (noProxy.startsWith('*.') || noProxy.startsWith('.')) { + const noProxyWildcard = noProxy.replace(/^\*\./, '.'); + if (givenURI.hostname.endsWith(noProxyWildcard)) { + return false; + } + } + } + return true; +} +/** + * Returns a custom request Agent if one is found, otherwise returns undefined + * which will result in the global http(s) Agent being used. + * @private + * @param {string} uri The request uri + * @param {Options} reqOpts The request options + * @returns {HttpAnyAgent|undefined} + */ +function getAgent(uri, reqOpts) { + const isHttp = uri.startsWith('http://'); + const proxy = reqOpts.proxy || + process.env.HTTP_PROXY || + process.env.http_proxy || + process.env.HTTPS_PROXY || + process.env.https_proxy; + const poolOptions = Object.assign({}, reqOpts.pool); + const manuallyProvidedProxy = !!reqOpts.proxy; + const shouldUseProxy = manuallyProvidedProxy || shouldUseProxyForURI(uri); + if (proxy && shouldUseProxy) { + // tslint:disable-next-line variable-name + const Agent = isHttp + ? __nccwpck_require__(42049) + : __nccwpck_require__(66202); + const proxyOpts = { ...(0, url_1.parse)(proxy), ...poolOptions }; + return new Agent(proxyOpts); + } + let key = isHttp ? 'http' : 'https'; + if (reqOpts.forever) { + key += ':forever'; + if (!exports.pool.has(key)) { + // tslint:disable-next-line variable-name + const Agent = isHttp ? http_1.Agent : https_1.Agent; + exports.pool.set(key, new Agent({ ...poolOptions, keepAlive: true })); + } + } + return exports.pool.get(key); +} +exports.getAgent = getAgent; +//# sourceMappingURL=agents.js.map /***/ }), -/***/ 77492: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 6886: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +/** + * @license + * Copyright 2018 Google LLC + * + * 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. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -const net_1 = __importDefault(__nccwpck_require__(41808)); -const tls_1 = __importDefault(__nccwpck_require__(24404)); -const url_1 = __importDefault(__nccwpck_require__(57310)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const once_1 = __importDefault(__nccwpck_require__(81040)); -const agent_base_1 = __nccwpck_require__(97635); -const debug = (0, debug_1.default)('http-proxy-agent'); -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +exports.teenyRequest = exports.RequestError = void 0; +const node_fetch_1 = __nccwpck_require__(80467); +const stream_1 = __nccwpck_require__(12781); +const uuid = __nccwpck_require__(17835); +const agents_1 = __nccwpck_require__(60446); +const TeenyStatistics_1 = __nccwpck_require__(14920); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const streamEvents = __nccwpck_require__(79626); +class RequestError extends Error { } +exports.RequestError = RequestError; /** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - * - * @api public + * Convert options from Request to Fetch format + * @private + * @param reqOpts Request options */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; +function requestToFetchOptions(reqOpts) { + const options = { + method: reqOpts.method || 'GET', + ...(reqOpts.timeout && { timeout: reqOpts.timeout }), + ...(typeof reqOpts.gzip === 'boolean' && { compress: reqOpts.gzip }), + }; + if (typeof reqOpts.json === 'object') { + // Add Content-type: application/json header + reqOpts.headers = reqOpts.headers || {}; + reqOpts.headers['Content-Type'] = 'application/json'; + // Set body to JSON representation of value + options.body = JSON.stringify(reqOpts.json); + } + else { + if (Buffer.isBuffer(reqOpts.body)) { + options.body = reqOpts.body; } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + else if (typeof reqOpts.body !== 'string') { + options.body = JSON.stringify(reqOpts.body); } - debug('Creating new HttpProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); + else { + options.body = reqOpts.body; } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + options.headers = reqOpts.headers; + let uri = (reqOpts.uri || + reqOpts.url); + if (!uri) { + throw new Error('Missing uri or url in reqOpts.'); + } + if (reqOpts.useQuerystring === true || typeof reqOpts.qs === 'object') { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const qs = __nccwpck_require__(63477); + const params = qs.stringify(reqOpts.qs); + uri = uri + '?' + params; + } + options.agent = (0, agents_1.getAgent)(uri, reqOpts); + return { uri, options }; +} +/** + * Convert a response from `fetch` to `request` format. + * @private + * @param opts The `request` options used to create the request. + * @param res The Fetch response + * @returns A `request` response object + */ +function fetchToRequestResponse(opts, res) { + const request = {}; + request.agent = opts.agent || false; + request.headers = (opts.headers || {}); + request.href = res.url; + // headers need to be converted from a map to an obj + const resHeaders = {}; + res.headers.forEach((value, key) => (resHeaders[key] = value)); + const response = Object.assign(res.body, { + statusCode: res.status, + statusMessage: res.statusText, + request, + body: res.body, + headers: resHeaders, + toJSON: () => ({ headers: resHeaders }), + }); + return response; +} +/** + * Create POST body from two parts as multipart/related content-type + * @private + * @param boundary + * @param multipart + */ +function createMultipartStream(boundary, multipart) { + const finale = `--${boundary}--`; + const stream = new stream_1.PassThrough(); + for (const part of multipart) { + const preamble = `--${boundary}\r\nContent-Type: ${part['Content-Type']}\r\n\r\n`; + stream.write(preamble); + if (typeof part.body === 'string') { + stream.write(part.body); + stream.write('\r\n'); } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; + else { + part.body.pipe(stream, { end: false }); + part.body.on('end', () => { + stream.write('\r\n'); + stream.write(finale); + stream.end(); + }); } - this.proxy = proxy; } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - const parsed = url_1.default.parse(req.path); - if (!parsed.protocol) { - parsed.protocol = 'http:'; - } - if (!parsed.hostname) { - parsed.hostname = opts.hostname || opts.host || null; - } - if (parsed.port == null && typeof opts.port) { - parsed.port = String(opts.port); - } - if (parsed.port === '80') { - // if port is 80, then we can remove the port so that the - // ":80" portion is not on the produced URL - parsed.port = ''; - } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = url_1.default.format(parsed); - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); + return stream; +} +function teenyRequest(reqOpts, callback) { + const { uri, options } = requestToFetchOptions(reqOpts); + const multipart = reqOpts.multipart; + if (reqOpts.multipart && multipart.length === 2) { + if (!callback) { + // TODO: add support for multipart uploads through streaming + throw new Error('Multipart without callback is not implemented.'); + } + const boundary = uuid.v4(); + options.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; + options.body = createMultipartStream(boundary, multipart); + // Multipart upload + teenyRequest.stats.requestStarting(); + (0, node_fetch_1.default)(uri, options).then(res => { + teenyRequest.stats.requestFinished(); + const header = res.headers.get('content-type'); + const response = fetchToRequestResponse(options, res); + const body = response.body; + if (header === 'application/json' || + header === 'application/json; charset=utf-8') { + res.json().then(json => { + response.body = json; + callback(null, response, json); + }, (err) => { + callback(err, response, body); + }); + return; } - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); + res.text().then(text => { + response.body = text; + callback(null, response, text); + }, err => { + callback(err, response, body); + }); + }, err => { + teenyRequest.stats.requestFinished(); + callback(err, null, null); + }); + return; + } + if (callback === undefined) { + // Stream mode + const requestStream = streamEvents(new stream_1.PassThrough()); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let responseStream; + requestStream.once('reading', () => { + if (responseStream) { + (0, stream_1.pipeline)(responseStream, requestStream, () => { }); } else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - if (req._header) { - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._header = null; - req._implicitHeader(); - if (req.output && req.output.length > 0) { - // Node < 12 - debug('Patching connection write() output buffer with updated header'); - first = req.output[0]; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.output[0] = req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.output); - } - else if (req.outputData && req.outputData.length > 0) { - // Node >= 12 - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } + requestStream.once('response', () => { + (0, stream_1.pipeline)(responseStream, requestStream, () => { }); + }); } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - yield (0, once_1.default)(socket, 'connect'); - return socket; }); + options.compress = false; + teenyRequest.stats.requestStarting(); + (0, node_fetch_1.default)(uri, options).then(res => { + teenyRequest.stats.requestFinished(); + responseStream = res.body; + responseStream.on('error', (err) => { + requestStream.emit('error', err); + }); + const response = fetchToRequestResponse(options, res); + requestStream.emit('response', response); + }, err => { + teenyRequest.stats.requestFinished(); + requestStream.emit('error', err); + }); + // fetch doesn't supply the raw HTTP stream, instead it + // returns a PassThrough piped from the HTTP response + // stream. + return requestStream; } + // GET or POST with callback + teenyRequest.stats.requestStarting(); + (0, node_fetch_1.default)(uri, options).then(res => { + teenyRequest.stats.requestFinished(); + const header = res.headers.get('content-type'); + const response = fetchToRequestResponse(options, res); + const body = response.body; + if (header === 'application/json' || + header === 'application/json; charset=utf-8') { + if (response.statusCode === 204) { + // Probably a DELETE + callback(null, response, body); + return; + } + res.json().then(json => { + response.body = json; + callback(null, response, json); + }, err => { + callback(err, response, body); + }); + return; + } + res.text().then(text => { + const response = fetchToRequestResponse(options, res); + response.body = text; + callback(null, response, text); + }, err => { + callback(err, response, body); + }); + }, err => { + teenyRequest.stats.requestFinished(); + callback(err, null, null); + }); + return; } -exports["default"] = HttpProxyAgent; -//# sourceMappingURL=agent.js.map - -/***/ }), - -/***/ 23764: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.teenyRequest = teenyRequest; +teenyRequest.defaults = (defaults) => { + return (reqOpts, callback) => { + const opts = { ...defaults, ...reqOpts }; + if (callback === undefined) { + return teenyRequest(opts); + } + teenyRequest(opts, callback); + }; +}; +/** + * Single instance of an interface for keeping track of things. + */ +teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(); +teenyRequest.resetStats = () => { + teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(teenyRequest.stats.getOptions()); }; -const agent_1 = __importDefault(__nccwpck_require__(77492)); -function createHttpProxyAgent(opts) { - return new agent_1.default(opts); -} -(function (createHttpProxyAgent) { - createHttpProxyAgent.HttpProxyAgent = agent_1.default; - createHttpProxyAgent.prototype = agent_1.default.prototype; -})(createHttpProxyAgent || (createHttpProxyAgent = {})); -module.exports = createHttpProxyAgent; //# sourceMappingURL=index.js.map /***/ }), -/***/ 97635: +/***/ 76503: /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { "use strict"; @@ -87357,7 +74053,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; const events_1 = __nccwpck_require__(82361); const debug_1 = __importDefault(__nccwpck_require__(38237)); -const promisify_1 = __importDefault(__nccwpck_require__(79965)); +const promisify_1 = __importDefault(__nccwpck_require__(55947)); const debug = debug_1.default('agent-base'); function isAgent(v) { return Boolean(v) && typeof v.addRequest === 'function'; @@ -87557,7 +74253,7 @@ module.exports = createAgent; /***/ }), -/***/ 79965: +/***/ 55947: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -87582,47 +74278,205 @@ exports["default"] = promisify; /***/ }), -/***/ 77219: +/***/ 58949: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const net_1 = __importDefault(__nccwpck_require__(41808)); +const tls_1 = __importDefault(__nccwpck_require__(24404)); +const url_1 = __importDefault(__nccwpck_require__(57310)); +const debug_1 = __importDefault(__nccwpck_require__(38237)); +const once_1 = __importDefault(__nccwpck_require__(81040)); +const agent_base_1 = __nccwpck_require__(76503); +const debug = (0, debug_1.default)('http-proxy-agent'); +function isHTTPS(protocol) { + return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +} +/** + * The `HttpProxyAgent` implements an HTTP Agent subclass that connects + * to the specified "HTTP proxy server" in order to proxy HTTP requests. + * + * @api public + */ +class HttpProxyAgent extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === 'string') { + opts = url_1.default.parse(_opts); + } + else { + opts = _opts; + } + if (!opts) { + throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + } + debug('Creating new HttpProxyAgent instance: %o', opts); + super(opts); + const proxy = Object.assign({}, opts); + // If `true`, then connect to the proxy server over TLS. + // Defaults to `false`. + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + // Prefer `hostname` over `host`, and set the `port` if needed. + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === 'string') { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + if (proxy.host && proxy.path) { + // If both a `host` and `path` are specified then it's most likely + // the result of a `url.parse()` call... we need to remove the + // `path` portion so that `net.connect()` doesn't attempt to open + // that as a Unix socket file. + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + const parsed = url_1.default.parse(req.path); + if (!parsed.protocol) { + parsed.protocol = 'http:'; + } + if (!parsed.hostname) { + parsed.hostname = opts.hostname || opts.host || null; + } + if (parsed.port == null && typeof opts.port) { + parsed.port = String(opts.port); + } + if (parsed.port === '80') { + // if port is 80, then we can remove the port so that the + // ":80" portion is not on the produced URL + parsed.port = ''; + } + // Change the `http.ClientRequest` instance's "path" field + // to the absolute path of the URL that will be requested. + req.path = url_1.default.format(parsed); + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.auth) { + req.setHeader('Proxy-Authorization', `Basic ${Buffer.from(proxy.auth).toString('base64')}`); + } + // Create a socket connection to the proxy server. + let socket; + if (secureProxy) { + debug('Creating `tls.Socket`: %o', proxy); + socket = tls_1.default.connect(proxy); + } + else { + debug('Creating `net.Socket`: %o', proxy); + socket = net_1.default.connect(proxy); + } + // At this point, the http ClientRequest's internal `_header` field + // might have already been set. If this is the case then we'll need + // to re-generate the string since we just changed the `req.path`. + if (req._header) { + let first; + let endOfHeaders; + debug('Regenerating stored HTTP header string for request'); + req._header = null; + req._implicitHeader(); + if (req.output && req.output.length > 0) { + // Node < 12 + debug('Patching connection write() output buffer with updated header'); + first = req.output[0]; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.output[0] = req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.output); + } + else if (req.outputData && req.outputData.length > 0) { + // Node >= 12 + debug('Patching connection write() output buffer with updated header'); + first = req.outputData[0].data; + endOfHeaders = first.indexOf('\r\n\r\n') + 4; + req.outputData[0].data = + req._header + first.substring(endOfHeaders); + debug('Output buffer: %o', req.outputData[0].data); + } + } + // Wait for the socket's `connect` event, so that this `callback()` + // function throws instead of the `http` request machinery. This is + // important for i.e. `PacProxyAgent` which determines a failed proxy + // connection via the `callback()` function throwing. + yield (0, once_1.default)(socket, 'connect'); + return socket; + }); + } +} +exports["default"] = HttpProxyAgent; +//# sourceMappingURL=agent.js.map + +/***/ }), + +/***/ 42049: +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const agent_1 = __importDefault(__nccwpck_require__(58949)); +function createHttpProxyAgent(opts) { + return new agent_1.default(opts); +} +(function (createHttpProxyAgent) { + createHttpProxyAgent.HttpProxyAgent = agent_1.default; + createHttpProxyAgent.prototype = agent_1.default.prototype; +})(createHttpProxyAgent || (createHttpProxyAgent = {})); +module.exports = createHttpProxyAgent; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 98455: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpsProxyAgent = void 0; -const net = __importStar(__nccwpck_require__(41808)); -const tls = __importStar(__nccwpck_require__(24404)); +const net_1 = __importDefault(__nccwpck_require__(41808)); +const tls_1 = __importDefault(__nccwpck_require__(24404)); +const url_1 = __importDefault(__nccwpck_require__(57310)); const assert_1 = __importDefault(__nccwpck_require__(39491)); const debug_1 = __importDefault(__nccwpck_require__(38237)); -const agent_base_1 = __nccwpck_require__(70694); -const url_1 = __nccwpck_require__(57310); -const parse_proxy_response_1 = __nccwpck_require__(595); -const debug = (0, debug_1.default)('https-proxy-agent'); +const agent_base_1 = __nccwpck_require__(76503); +const parse_proxy_response_1 = __importDefault(__nccwpck_require__(94037)); +const debug = debug_1.default('https-proxy-agent:agent'); /** * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. @@ -87634,122 +74488,139 @@ const debug = (0, debug_1.default)('https-proxy-agent'); * * `https:` requests have their socket connection upgraded to TLS once * the connection to the proxy server has been established. + * + * @api public */ class HttpsProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.options = { path: undefined }; - this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - // Attempt to negotiate http/1.1 for proxy servers that support http/2 - ALPNProtocols: ['http/1.1'], - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - */ - async connect(req, opts) { - const { proxy } = this; - if (!opts.host) { - throw new TypeError('No "host" provided'); - } - // Create a socket connection to the proxy server. - let socket; - if (proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - const servername = this.connectOpts.servername || this.connectOpts.host; - socket = tls.connect({ - ...this.connectOpts, - servername: servername && net.isIP(servername) ? undefined : servername, - }); + constructor(_opts) { + let opts; + if (typeof _opts === 'string') { + opts = url_1.default.parse(_opts); } else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); + opts = _opts; } - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; - let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; + if (!opts) { + throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); } - headers.Host = `${host}:${opts.port}`; - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; + debug('creating new HttpsProxyAgent instance: %o', opts); + super(opts); + const proxy = Object.assign({}, opts); + // If `true`, then connect to the proxy server over TLS. + // Defaults to `false`. + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + // Prefer `hostname` over `host`, and set the `port` if needed. + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === 'string') { + proxy.port = parseInt(proxy.port, 10); } - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; } - const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); - socket.write(`${payload}\r\n`); - const { connect, buffered } = await proxyResponsePromise; - req.emit('proxyConnect', connect); - this.emit('proxyConnect', connect, req); - if (connect.statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls.connect({ - ...omit(opts, 'host', 'path', 'port'), - socket, - servername: net.isIP(servername) ? undefined : servername, - }); + // ALPN is supported by Node.js >= v5. + // attempt to negotiate http/1.1 for proxy servers that support http/2 + if (this.secureProxy && !('ALPNProtocols' in proxy)) { + proxy.ALPNProtocols = ['http 1.1']; + } + if (proxy.host && proxy.path) { + // If both a `host` and `path` are specified then it's most likely + // the result of a `url.parse()` call... we need to remove the + // `path` portion so that `net.connect()` doesn't attempt to open + // that as a Unix socket file. + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + // Create a socket connection to the proxy server. + let socket; + if (secureProxy) { + debug('Creating `tls.Socket`: %o', proxy); + socket = tls_1.default.connect(proxy); + } + else { + debug('Creating `net.Socket`: %o', proxy); + socket = net_1.default.connect(proxy); + } + const headers = Object.assign({}, proxy.headers); + const hostname = `${opts.host}:${opts.port}`; + let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.auth) { + headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('Replaying proxy buffer for failed request'); - (0, assert_1.default)(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); + // The `Host` header should only include the port + // number when it is not the default port. + let { host, port, secureEndpoint } = opts; + if (!isDefaultPort(port, secureEndpoint)) { + host += `:${port}`; + } + headers.Host = host; + headers.Connection = 'close'; + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r\n`; + } + const proxyResponsePromise = parse_proxy_response_1.default(socket); + socket.write(`${payload}\r\n`); + const { statusCode, buffered } = yield proxyResponsePromise; + if (statusCode === 200) { + req.once('socket', resume); + if (opts.secureEndpoint) { + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + const servername = opts.servername || opts.host; + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, + servername })); + } + return socket; + } + // Some other status code that's not 200... need to re-play the HTTP + // header "data" events onto the socket once the HTTP machinery is + // attached so that the node core `http` can parse and handle the + // error status code. + // Close the original socket, and a new "fake" socket is returned + // instead, so that the proxy doesn't get the HTTP request + // written to it (which may contain `Authorization` headers or other + // sensitive data). + // + // See: https://hackerone.com/reports/541502 + socket.destroy(); + const fakeSocket = new net_1.default.Socket({ writable: false }); + fakeSocket.readable = true; + // Need to wait for the "socket" event to re-play the "data" events. + req.once('socket', (s) => { + debug('replaying proxy buffer for failed request'); + assert_1.default(s.listenerCount('data') > 0); + // Replay the "buffered" Buffer onto the fake `socket`, since at + // this point the HTTP module machinery has been hooked up for + // the user. + s.push(buffered); + s.push(null); + }); + return fakeSocket; }); - return fakeSocket; } } -HttpsProxyAgent.protocols = ['http', 'https']; -exports.HttpsProxyAgent = HttpsProxyAgent; +exports["default"] = HttpsProxyAgent; function resume(socket) { socket.resume(); } +function isDefaultPort(port, secure) { + return Boolean((!secure && port === 80) || (secure && port === 443)); +} +function isHTTPS(protocol) { + return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +} function omit(obj, ...keys) { const ret = {}; let key; @@ -87760,11 +74631,32 @@ function omit(obj, ...keys) { } return ret; } +//# sourceMappingURL=agent.js.map + +/***/ }), + +/***/ 66202: +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const agent_1 = __importDefault(__nccwpck_require__(98455)); +function createHttpsProxyAgent(opts) { + return new agent_1.default(opts); +} +(function (createHttpsProxyAgent) { + createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; + createHttpsProxyAgent.prototype = agent_1.default.prototype; +})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); +module.exports = createHttpsProxyAgent; //# sourceMappingURL=index.js.map /***/ }), -/***/ 595: +/***/ 94037: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -87773,9 +74665,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseProxyResponse = void 0; const debug_1 = __importDefault(__nccwpck_require__(38237)); -const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); +const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); function parseProxyResponse(socket) { return new Promise((resolve, reject) => { // we need to buffer any HTTP traffic that happens with the proxy before we get @@ -87794,12 +74685,14 @@ function parseProxyResponse(socket) { function cleanup() { socket.removeListener('end', onend); socket.removeListener('error', onerror); + socket.removeListener('close', onclose); socket.removeListener('readable', read); } + function onclose(err) { + debug('onclose had error %o', err); + } function onend() { - cleanup(); debug('onend'); - reject(new Error('Proxy connection ended before receiving CONNECT response')); } function onerror(err) { cleanup(); @@ -87817,53282 +74710,68693 @@ function parseProxyResponse(socket) { read(); return; } - const headerParts = buffered - .slice(0, endOfHeaders) - .toString('ascii') - .split('\r\n'); - const firstLine = headerParts.shift(); - if (!firstLine) { - socket.destroy(); - return reject(new Error('No header received from proxy CONNECT response')); - } - const firstLineParts = firstLine.split(' '); - const statusCode = +firstLineParts[1]; - const statusText = firstLineParts.slice(2).join(' '); - const headers = {}; - for (const header of headerParts) { - if (!header) - continue; - const firstColon = header.indexOf(':'); - if (firstColon === -1) { - socket.destroy(); - return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); - } - const key = header.slice(0, firstColon).toLowerCase(); - const value = header.slice(firstColon + 1).trimStart(); - const current = headers[key]; - if (typeof current === 'string') { - headers[key] = [current, value]; - } - else if (Array.isArray(current)) { - current.push(value); - } - else { - headers[key] = value; - } - } - debug('got proxy server response: %o %o', firstLine, headers); - cleanup(); + const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); + const statusCode = +firstLine.split(' ')[1]; + debug('got proxy server response: %o', firstLine); resolve({ - connect: { - statusCode, - statusText, - headers, - }, - buffered, + statusCode, + buffered }); } socket.on('error', onerror); + socket.on('close', onclose); socket.on('end', onend); read(); }); } -exports.parseProxyResponse = parseProxyResponse; +exports["default"] = parseProxyResponse; //# sourceMappingURL=parse-proxy-response.js.map /***/ }), -/***/ 44124: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -try { - var util = __nccwpck_require__(73837); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __nccwpck_require__(8544); -} - - -/***/ }), - -/***/ 8544: -/***/ ((module) => { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} - - -/***/ }), - -/***/ 41554: -/***/ ((module) => { +/***/ 17835: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -const isStream = stream => - stream !== null && - typeof stream === 'object' && - typeof stream.pipe === 'function'; - -isStream.writable = stream => - isStream(stream) && - stream.writable !== false && - typeof stream._write === 'function' && - typeof stream._writableState === 'object'; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); -isStream.readable = stream => - isStream(stream) && - stream.readable !== false && - typeof stream._read === 'function' && - typeof stream._readableState === 'object'; +var _v = _interopRequireDefault(__nccwpck_require__(70618)); -isStream.duplex = stream => - isStream.writable(stream) && - isStream.readable(stream); +var _v2 = _interopRequireDefault(__nccwpck_require__(36888)); -isStream.transform = stream => - isStream.duplex(stream) && - typeof stream._transform === 'function'; +var _v3 = _interopRequireDefault(__nccwpck_require__(91186)); -module.exports = isStream; +var _v4 = _interopRequireDefault(__nccwpck_require__(92385)); +var _nil = _interopRequireDefault(__nccwpck_require__(65879)); -/***/ }), +var _version = _interopRequireDefault(__nccwpck_require__(40694)); -/***/ 55031: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var _validate = _interopRequireDefault(__nccwpck_require__(34875)); -var json_stringify = (__nccwpck_require__(78574).stringify); -var json_parse = __nccwpck_require__(89099); +var _stringify = _interopRequireDefault(__nccwpck_require__(5802)); -module.exports = function(options) { - return { - parse: json_parse(options), - stringify: json_stringify - } -}; -//create the default method members with no options applied for backwards compatibility -module.exports.parse = json_parse(); -module.exports.stringify = json_stringify; +var _parse = _interopRequireDefault(__nccwpck_require__(50893)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 89099: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var BigNumber = null; - -// regexpxs extracted from -// (c) BSD-3-Clause -// https://github.com/fastify/secure-json-parse/graphs/contributors and https://github.com/hapijs/bourne/graphs/contributors - -const suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/; -const suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/; - -/* - json_parse.js - 2012-06-20 - - Public Domain. - - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - - This file creates a json_parse function. - During create you can (optionally) specify some behavioural switches - - require('json-bigint')(options) - - The optional options parameter holds switches that drive certain - aspects of the parsing process: - * options.strict = true will warn about duplicate-key usage in the json. - The default (strict = false) will silently ignore those and overwrite - values for keys that are in duplicate use. - - The resulting function follows this signature: - json_parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. - - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. - - Example: - - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. - - myData = json_parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); - - This is a reference implementation. You are free to copy, modify, or - redistribute. - - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html - - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. -*/ - -/*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode, - hasOwnProperty, message, n, name, prototype, push, r, t, text -*/ - -var json_parse = function (options) { - 'use strict'; +/***/ 9576: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // This is a function that can parse a JSON text, producing a JavaScript - // data structure. It is a simple, recursive descent parser. It does not use - // eval or regular expressions, so it can be used as a model for implementing - // a JSON parser in other languages. +"use strict"; - // We are defining the function inside of another function to avoid creating - // global variables. - // Default options one can override by passing options to the parse() - var _options = { - strict: false, // not being strict means do not generate syntax errors for "duplicate key" - storeAsString: false, // toggles whether the values should be stored as BigNumber (default) or a string - alwaysParseAsBig: false, // toggles whether all numbers should be Big - useNativeBigInt: false, // toggles whether to use native BigInt instead of bignumber.js - protoAction: 'error', - constructorAction: 'error', - }; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - // If there are options, then use them to override the default _options - if (options !== undefined && options !== null) { - if (options.strict === true) { - _options.strict = true; - } - if (options.storeAsString === true) { - _options.storeAsString = true; - } - _options.alwaysParseAsBig = - options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false; - _options.useNativeBigInt = - options.useNativeBigInt === true ? options.useNativeBigInt : false; +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - if (typeof options.constructorAction !== 'undefined') { - if ( - options.constructorAction === 'error' || - options.constructorAction === 'ignore' || - options.constructorAction === 'preserve' - ) { - _options.constructorAction = options.constructorAction; - } else { - throw new Error( - `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}` - ); - } - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (typeof options.protoAction !== 'undefined') { - if ( - options.protoAction === 'error' || - options.protoAction === 'ignore' || - options.protoAction === 'preserve' - ) { - _options.protoAction = options.protoAction; - } else { - throw new Error( - `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}` - ); - } - } +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); } - var at, // The index of the current character - ch, // The current character - escapee = { - '"': '"', - '\\': '\\', - '/': '/', - b: '\b', - f: '\f', - n: '\n', - r: '\r', - t: '\t', - }, - text, - error = function (m) { - // Call error when something is wrong. - - throw { - name: 'SyntaxError', - message: m, - at: at, - text: text, - }; - }, - next = function (c) { - // If a c parameter is provided, verify that it matches the current character. - - if (c && c !== ch) { - error("Expected '" + c + "' instead of '" + ch + "'"); - } - - // Get the next character. When there are no more characters, - // return the empty string. - - ch = text.charAt(at); - at += 1; - return ch; - }, - number = function () { - // Parse a number value. - - var number, - string = ''; - - if (ch === '-') { - string = '-'; - next('-'); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; - } - } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - } - number = +string; - if (!isFinite(number)) { - error('Bad number'); - } else { - if (BigNumber == null) BigNumber = __nccwpck_require__(87558); - //if (number > 9007199254740992 || number < -9007199254740992) - // Bignumber has stricter check: everything with length > 15 digits disallowed - if (string.length > 15) - return _options.storeAsString - ? string - : _options.useNativeBigInt - ? BigInt(string) - : new BigNumber(string); - else - return !_options.alwaysParseAsBig - ? number - : _options.useNativeBigInt - ? BigInt(number) - : new BigNumber(number); - } - }, - string = function () { - // Parse a string value. - - var hex, - i, - string = '', - uffff; - - // When parsing for string values, we must look for " and \ characters. - - if (ch === '"') { - var startAt = at; - while (next()) { - if (ch === '"') { - if (at - 1 > startAt) string += text.substring(startAt, at - 1); - next(); - return string; - } - if (ch === '\\') { - if (at - 1 > startAt) string += text.substring(startAt, at - 1); - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - startAt = at; - } - } - } - error('Bad string'); - }, - white = function () { - // Skip whitespace. - - while (ch && ch <= ' ') { - next(); - } - }, - word = function () { - // true, false, or null. - - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - } - error("Unexpected '" + ch + "'"); - }, - value, // Place holder for the value function. - array = function () { - // Parse an array value. - - var array = []; - - if (ch === '[') { - next('['); - white(); - if (ch === ']') { - next(']'); - return array; // empty array - } - while (ch) { - array.push(value()); - white(); - if (ch === ']') { - next(']'); - return array; - } - next(','); - white(); - } - } - error('Bad array'); - }, - object = function () { - // Parse an object value. - - var key, - object = Object.create(null); - - if (ch === '{') { - next('{'); - white(); - if (ch === '}') { - next('}'); - return object; // empty object - } - while (ch) { - key = string(); - white(); - next(':'); - if ( - _options.strict === true && - Object.hasOwnProperty.call(object, key) - ) { - error('Duplicate key "' + key + '"'); - } + return _crypto.default.createHash('md5').update(bytes).digest(); +} - if (suspectProtoRx.test(key) === true) { - if (_options.protoAction === 'error') { - error('Object contains forbidden prototype property'); - } else if (_options.protoAction === 'ignore') { - value(); - } else { - object[key] = value(); - } - } else if (suspectConstructorRx.test(key) === true) { - if (_options.constructorAction === 'error') { - error('Object contains forbidden constructor property'); - } else if (_options.constructorAction === 'ignore') { - value(); - } else { - object[key] = value(); - } - } else { - object[key] = value(); - } +var _default = md5; +exports["default"] = _default; - white(); - if (ch === '}') { - next('}'); - return object; - } - next(','); - white(); - } - } - error('Bad object'); - }; +/***/ }), - value = function () { - // Parse a JSON value. It could be an object, an array, a string, a number, - // or a word. +/***/ 54974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - return string(); - case '-': - return number(); - default: - return ch >= '0' && ch <= '9' ? number() : word(); - } - }; +"use strict"; - // Return the json_parse function. It will have access to all of the above - // functions and variables. - return function (source, reviver) { - var result; +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - text = source + ''; - at = 0; - ch = ' '; - result = value(); - white(); - if (ch) { - error('Syntax error'); - } +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - // If there is a reviver function, we recursively walk the new structure, - // passing each name/value pair to the reviver function for possible - // transformation, starting with a temporary root object that holds the result - // in an empty key. If there is not a reviver function, we simply return the - // result. +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return typeof reviver === 'function' - ? (function walk(holder, key) { - var k, - v, - value = holder[key]; - if (value && typeof value === 'object') { - Object.keys(value).forEach(function (k) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - }); - } - return reviver.call(holder, key, value); - })({ '': result }, '') - : result; - }; +var _default = { + randomUUID: _crypto.default.randomUUID }; - -module.exports = json_parse; - +exports["default"] = _default; /***/ }), -/***/ 78574: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var BigNumber = __nccwpck_require__(87558); - -/* - json2.js - 2013-05-26 - - Public Domain. - - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - - See http://www.JSON.org/js.html - - - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html - - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. - - - This file creates a global JSON object containing two methods: stringify - and parse. - - JSON.stringify(value, replacer, space) - value any JavaScript value, usually an object or array. - - replacer an optional parameter that determines how object - values are stringified for objects. It can be a - function or an array of strings. - - space an optional parameter that specifies the indentation - of nested structures. If it is omitted, the text will - be packed without extra whitespace. If it is a number, - it will specify the number of spaces to indent at each - level. If it is a string (such as '\t' or ' '), - it contains the characters used to indent at each level. - - This method produces a JSON text from a JavaScript value. - - When an object value is found, if the object contains a toJSON - method, its toJSON method will be called and the result will be - stringified. A toJSON method does not serialize: it returns the - value represented by the name/value pair that should be serialized, - or undefined if nothing should be serialized. The toJSON method - will be passed the key associated with the value, and this will be - bound to the value - - For example, this would serialize Dates as ISO strings. - - Date.prototype.toJSON = function (key) { - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - return this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z'; - }; - - You can provide an optional replacer method. It will be passed the - key and value of each member, with this bound to the containing - object. The value that is returned from your method will be - serialized. If your method returns undefined, then the member will - be excluded from the serialization. - - If the replacer parameter is an array of strings, then it will be - used to select the members to be serialized. It filters the results - such that only members with keys listed in the replacer array are - stringified. - - Values that do not have JSON representations, such as undefined or - functions, will not be serialized. Such values in objects will be - dropped; in arrays they will be replaced with null. You can use - a replacer function to replace those with JSON values. - JSON.stringify(undefined) returns undefined. - - The optional space parameter produces a stringification of the - value that is filled with line breaks and indentation to make it - easier to read. - - If the space parameter is a non-empty string, then that string will - be used for indentation. If the space parameter is a number, then - the indentation will be that many spaces. - - Example: - - text = JSON.stringify(['e', {pluribus: 'unum'}]); - // text is '["e",{"pluribus":"unum"}]' +/***/ 65879: +/***/ ((__unused_webpack_module, exports) => { +"use strict"; - text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); - // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' - text = JSON.stringify([new Date()], function (key, value) { - return this[key] instanceof Date ? - 'Date(' + this[key] + ')' : value; - }); - // text is '["Date(---current time---)"]' +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; +/***/ }), - JSON.parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. +/***/ 50893: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. +"use strict"; - Example: - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - myData = JSON.parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); +var _validate = _interopRequireDefault(__nccwpck_require__(34875)); - myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { - var d; - if (typeof value === 'string' && - value.slice(0, 5) === 'Date(' && - value.slice(-1) === ')') { - d = new Date(value.slice(5, -1)); - if (d) { - return d; - } - } - return value; - }); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } - This is a reference implementation. You are free to copy, modify, or - redistribute. -*/ + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ -/*jslint evil: true, regexp: true */ + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ -/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, - call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, - lastIndex, length, parse, prototype, push, replace, slice, stringify, - test, toJSON, toString, valueOf -*/ + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ -// Create a JSON object only if one does not already exist. We create the -// methods in a closure to avoid creating global variables. + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) -var JSON = module.exports; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} -(function () { - 'use strict'; +var _default = parse; +exports["default"] = _default; - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } +/***/ }), - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; +/***/ 47658: +/***/ ((__unused_webpack_module, exports) => { +"use strict"; - function quote(string) { -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' - ? c - : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } +/***/ }), +/***/ 82042: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - function str(key, holder) { +"use strict"; -// Produce a string from holder[key]. - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key], - isBigNumber = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value)); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; -// If the value has a toJSON method, call it to obtain a replacement value. +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// If we were called with a replacer function, then call the replacer to -// obtain a replacement value. +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } +let poolPtr = rnds8Pool.length; -// What happens next depends on the value's type. +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); - switch (typeof value) { - case 'string': - if (isBigNumber) { - return value; - } else { - return quote(value); - } + poolPtr = 0; + } - case 'number': + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} -// JSON numbers must be finite. Encode non-finite numbers as null. +/***/ }), - return isFinite(value) ? String(value) : 'null'; +/***/ 26723: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - case 'boolean': - case 'null': - case 'bigint': +"use strict"; -// If the value is a boolean or null, convert it to a string. Note: -// typeof null does not produce 'null'. The case is included here in -// the remote chance that this gets fixed someday. - return String(value); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -// If the type is 'object', we might be dealing with an object or an array or -// null. +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); - case 'object': +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// Due to a specification blunder in ECMAScript, typeof null is 'object', -// so watch out for that case. +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } - if (!value) { - return 'null'; - } + return _crypto.default.createHash('sha1').update(bytes).digest(); +} -// Make an array to hold the partial results of stringifying this object value. +var _default = sha1; +exports["default"] = _default; - gap += indent; - partial = []; +/***/ }), -// Is the value an array? +/***/ 5802: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (Object.prototype.toString.apply(value) === '[object Array]') { +"use strict"; -// The value is an array. Stringify every element. Use null as a placeholder -// for non-JSON values. - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +exports.unsafeStringify = unsafeStringify; -// Join all of the elements together, separated with commas, and wrap them in -// brackets. +var _validate = _interopRequireDefault(__nccwpck_require__(34875)); - v = partial.length === 0 - ? '[]' - : gap - ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' - : '[' + partial.join(',') + ']'; - gap = mind; - return v; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// If the replacer is an array, use it to select the members to be stringified. +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - if (typeof rep[i] === 'string') { - k = rep[i]; - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} -// Otherwise, iterate through all of the keys in the object. +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} - Object.keys(value).forEach(function(k) { - var v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - }); - } +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields -// Join all of the member texts together, separated with commas, -// and wrap them in braces. + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } - v = partial.length === 0 - ? '{}' - : gap - ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' - : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } + return uuid; +} -// If the JSON object does not yet have a stringify method, give it one. +var _default = stringify; +exports["default"] = _default; - if (typeof JSON.stringify !== 'function') { - JSON.stringify = function (value, replacer, space) { +/***/ }), -// The stringify method takes a value and an optional replacer, and an optional -// space parameter, and returns a JSON text. The replacer can be a function -// that can replace values, or an array of strings that will select the keys. -// A default replacer method can be provided. Use of the space parameter can -// produce text that is more easily readable. +/***/ 70618: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var i; - gap = ''; - indent = ''; +"use strict"; -// If the space parameter is a number, make an indent string containing that -// many spaces. - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -// If the space parameter is a string, it will be used as the indent string. +var _rng = _interopRequireDefault(__nccwpck_require__(82042)); - } else if (typeof space === 'string') { - indent = space; - } +var _stringify = __nccwpck_require__(5802); -// If there is a replacer, it must be a function or an array. -// Otherwise, throw an error. +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; -// Make a fake root object containing our value under the key of ''. -// Return the result of stringifying the value. +let _clockseq; // Previous uuid creation time - return str('', {'': value}); - }; - } -}()); +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details -/***/ }), +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 -/***/ 96010: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); -var bufferEqual = __nccwpck_require__(9239); -var Buffer = (__nccwpck_require__(21867).Buffer); -var crypto = __nccwpck_require__(6113); -var formatEcdsa = __nccwpck_require__(11728); -var util = __nccwpck_require__(73837); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } -var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' -var MSG_INVALID_SECRET = 'secret must be a string or buffer'; -var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; -var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. -var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; -if (supportsKeyObjects) { - MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; - MSG_INVALID_SECRET += 'or a KeyObject'; -} -function checkIsPublicKey(key) { - if (Buffer.isBuffer(key)) { - return; - } + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock - if (typeof key === 'string') { - return; - } + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval - if (typeof key.type !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - if (typeof key.asymmetricKeyType !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } -}; -function checkIsPrivateKey(key) { - if (Buffer.isBuffer(key)) { - return; + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } - if (typeof key === 'string') { - return; - } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - if (typeof key === 'object') { - return; - } + msecs += 12219292800000; // `time_low` - throw typeError(MSG_INVALID_SIGNER_KEY); -}; + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` -function checkIsSecretKey(key) { - if (Buffer.isBuffer(key)) { - return; - } + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` - if (typeof key === 'string') { - return key; - } + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_SECRET); - } + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_SECRET); - } + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - if (key.type !== 'secret') { - throw typeError(MSG_INVALID_SECRET); - } + b[i++] = clockseq & 0xff; // `node` - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_SECRET); + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; } -} -function fromBase64(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); + return buf || (0, _stringify.unsafeStringify)(b); } -function toBase64(base64url) { - base64url = base64url.toString(); +var _default = v1; +exports["default"] = _default; - var padding = 4 - base64url.length % 4; - if (padding !== 4) { - for (var i = 0; i < padding; ++i) { - base64url += '='; - } - } +/***/ }), - return base64url - .replace(/\-/g, '+') - .replace(/_/g, '/'); -} +/***/ 36888: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function typeError(template) { - var args = [].slice.call(arguments, 1); - var errMsg = util.format.bind(util, template).apply(null, args); - return new TypeError(errMsg); -} +"use strict"; -function bufferOrString(obj) { - return Buffer.isBuffer(obj) || typeof obj === 'string'; -} -function normalizeInput(thing) { - if (!bufferOrString(thing)) - thing = JSON.stringify(thing); - return thing; -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -function createHmacSigner(bits) { - return function sign(thing, secret) { - checkIsSecretKey(secret); - thing = normalizeInput(thing); - var hmac = crypto.createHmac('sha' + bits, secret); - var sig = (hmac.update(thing), hmac.digest('base64')) - return fromBase64(sig); - } -} +var _v = _interopRequireDefault(__nccwpck_require__(8392)); -function createHmacVerifier(bits) { - return function verify(thing, signature, secret) { - var computedSig = createHmacSigner(bits)(thing, secret); - return bufferEqual(Buffer.from(signature), Buffer.from(computedSig)); - } -} +var _md = _interopRequireDefault(__nccwpck_require__(9576)); -function createKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - // Even though we are specifying "RSA" here, this works with ECDSA - // keys as well. - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); - return fromBase64(sig); - } -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function createKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify(publicKey, signature, 'base64'); - } -} +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; -function createPSSKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign({ - key: privateKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, 'base64')); - return fromBase64(sig); - } -} +/***/ }), -function createPSSKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify({ - key: publicKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, signature, 'base64'); - } -} +/***/ 8392: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function createECDSASigner(bits) { - var inner = createKeySigner(bits); - return function sign() { - var signature = inner.apply(null, arguments); - signature = formatEcdsa.derToJose(signature, 'ES' + bits); - return signature; - }; -} +"use strict"; -function createECDSAVerifer(bits) { - var inner = createKeyVerifier(bits); - return function verify(thing, signature, publicKey) { - signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); - var result = inner(thing, signature, publicKey); - return result; - }; -} -function createNoneSigner() { - return function sign() { - return ''; - } -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.URL = exports.DNS = void 0; +exports["default"] = v35; -function createNoneVerifier() { - return function verify(thing, signature) { - return signature === ''; - } -} +var _stringify = __nccwpck_require__(5802); -module.exports = function jwa(algorithm) { - var signerFactories = { - hs: createHmacSigner, - rs: createKeySigner, - ps: createPSSKeySigner, - es: createECDSASigner, - none: createNoneSigner, - } - var verifierFactories = { - hs: createHmacVerifier, - rs: createKeyVerifier, - ps: createPSSKeyVerifier, - es: createECDSAVerifer, - none: createNoneVerifier, - } - var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); - if (!match) - throw typeError(MSG_INVALID_ALGORITHM, algorithm); - var algo = (match[1] || match[3]).toLowerCase(); - var bits = match[2]; +var _parse = _interopRequireDefault(__nccwpck_require__(50893)); - return { - sign: signerFactories[algo](bits), - verify: verifierFactories[algo](bits), - } -}; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape -/***/ }), + const bytes = []; -/***/ 4636: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } -/*global exports*/ -var SignStream = __nccwpck_require__(73334); -var VerifyStream = __nccwpck_require__(5522); + return bytes; +} -var ALGORITHMS = [ - 'HS256', 'HS384', 'HS512', - 'RS256', 'RS384', 'RS512', - 'PS256', 'PS384', 'PS512', - 'ES256', 'ES384', 'ES512' -]; +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; -exports.ALGORITHMS = ALGORITHMS; -exports.sign = SignStream.sign; -exports.verify = VerifyStream.verify; -exports.decode = VerifyStream.decode; -exports.isValid = VerifyStream.isValid; -exports.createSign = function createSign(opts) { - return new SignStream(opts); -}; -exports.createVerify = function createVerify(opts) { - return new VerifyStream(opts); -}; +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + if (typeof value === 'string') { + value = stringToBytes(value); + } -/***/ }), + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } -/***/ 61868: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` -/*global module, process*/ -var Buffer = (__nccwpck_require__(21867).Buffer); -var Stream = __nccwpck_require__(12781); -var util = __nccwpck_require__(73837); -function DataStream(data) { - this.buffer = null; - this.writable = true; - this.readable = true; + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; - // No input - if (!data) { - this.buffer = Buffer.alloc(0); - return this; - } + if (buf) { + offset = offset || 0; - // Stream - if (typeof data.pipe === 'function') { - this.buffer = Buffer.alloc(0); - data.pipe(this); - return this; - } + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } - // Buffer or String - // or Object (assumedly a passworded key) - if (data.length || typeof data === 'object') { - this.buffer = data; - this.writable = false; - process.nextTick(function () { - this.emit('end', data); - this.readable = false; - this.emit('close'); - }.bind(this)); - return this; - } + return buf; + } - throw new TypeError('Unexpected data type ('+ typeof data + ')'); -} -util.inherits(DataStream, Stream); + return (0, _stringify.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) -DataStream.prototype.write = function write(data) { - this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); - this.emit('data', data); -}; -DataStream.prototype.end = function end(data) { - if (data) - this.write(data); - this.emit('end', data); - this.emit('close'); - this.writable = false; - this.readable = false; -}; + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support -module.exports = DataStream; + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} /***/ }), -/***/ 73334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 91186: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/*global module*/ -var Buffer = (__nccwpck_require__(21867).Buffer); -var DataStream = __nccwpck_require__(61868); -var jwa = __nccwpck_require__(96010); -var Stream = __nccwpck_require__(12781); -var toString = __nccwpck_require__(65292); -var util = __nccwpck_require__(73837); +"use strict"; -function base64url(string, encoding) { - return Buffer - .from(string, encoding) - .toString('base64') - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} -function jwsSecuredInput(header, payload, encoding) { - encoding = encoding || 'utf8'; - var encodedHeader = base64url(toString(header), 'binary'); - var encodedPayload = base64url(toString(payload), encoding); - return util.format('%s.%s', encodedHeader, encodedPayload); -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -function jwsSign(opts) { - var header = opts.header; - var payload = opts.payload; - var secretOrKey = opts.secret || opts.privateKey; - var encoding = opts.encoding; - var algo = jwa(header.alg); - var securedInput = jwsSecuredInput(header, payload, encoding); - var signature = algo.sign(securedInput, secretOrKey); - return util.format('%s.%s', securedInput, signature); -} +var _native = _interopRequireDefault(__nccwpck_require__(54974)); -function SignStream(opts) { - var secret = opts.secret||opts.privateKey||opts.key; - var secretStream = new DataStream(secret); - this.readable = true; - this.header = opts.header; - this.encoding = opts.encoding; - this.secret = this.privateKey = this.key = secretStream; - this.payload = new DataStream(opts.payload); - this.secret.once('close', function () { - if (!this.payload.writable && this.readable) - this.sign(); - }.bind(this)); +var _rng = _interopRequireDefault(__nccwpck_require__(82042)); - this.payload.once('close', function () { - if (!this.secret.writable && this.readable) - this.sign(); - }.bind(this)); -} -util.inherits(SignStream, Stream); +var _stringify = __nccwpck_require__(5802); -SignStream.prototype.sign = function sign() { - try { - var signature = jwsSign({ - header: this.header, - payload: this.payload.buffer, - secret: this.secret.buffer, - encoding: this.encoding - }); - this.emit('done', signature); - this.emit('data', signature); - this.emit('end'); - this.readable = false; - return signature; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); } -}; -SignStream.sign = jwsSign; + options = options || {}; -module.exports = SignStream; + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` -/***/ }), + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided -/***/ 65292: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (buf) { + offset = offset || 0; -/*global module*/ -var Buffer = (__nccwpck_require__(14300).Buffer); + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } -module.exports = function toString(obj) { - if (typeof obj === 'string') - return obj; - if (typeof obj === 'number' || Buffer.isBuffer(obj)) - return obj.toString(); - return JSON.stringify(obj); -}; + return buf; + } + return (0, _stringify.unsafeStringify)(rnds); +} + +var _default = v4; +exports["default"] = _default; /***/ }), -/***/ 5522: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 92385: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/*global module*/ -var Buffer = (__nccwpck_require__(21867).Buffer); -var DataStream = __nccwpck_require__(61868); -var jwa = __nccwpck_require__(96010); -var Stream = __nccwpck_require__(12781); -var toString = __nccwpck_require__(65292); -var util = __nccwpck_require__(73837); -var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; +"use strict"; -function isObject(thing) { - return Object.prototype.toString.call(thing) === '[object Object]'; -} -function safeJsonParse(thing) { - if (isObject(thing)) - return thing; - try { return JSON.parse(thing); } - catch (e) { return undefined; } -} +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -function headerFromJWS(jwsSig) { - var encodedHeader = jwsSig.split('.', 1)[0]; - return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); -} +var _v = _interopRequireDefault(__nccwpck_require__(8392)); -function securedInputFromJWS(jwsSig) { - return jwsSig.split('.', 2).join('.'); -} +var _sha = _interopRequireDefault(__nccwpck_require__(26723)); -function signatureFromJWS(jwsSig) { - return jwsSig.split('.')[2]; -} +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function payloadFromJWS(jwsSig, encoding) { - encoding = encoding || 'utf8'; - var payload = jwsSig.split('.')[1]; - return Buffer.from(payload, 'base64').toString(encoding); -} +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; -function isValidJws(string) { - return JWS_REGEX.test(string) && !!headerFromJWS(string); -} +/***/ }), -function jwsVerify(jwsSig, algorithm, secretOrKey) { - if (!algorithm) { - var err = new Error("Missing algorithm parameter for jws.verify"); - err.code = "MISSING_ALGORITHM"; - throw err; - } - jwsSig = toString(jwsSig); - var signature = signatureFromJWS(jwsSig); - var securedInput = securedInputFromJWS(jwsSig); - var algo = jwa(algorithm); - return algo.verify(securedInput, signature, secretOrKey); -} +/***/ 34875: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function jwsDecode(jwsSig, opts) { - opts = opts || {}; - jwsSig = toString(jwsSig); +"use strict"; - if (!isValidJws(jwsSig)) - return null; - var header = headerFromJWS(jwsSig); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; - if (!header) - return null; +var _regex = _interopRequireDefault(__nccwpck_require__(47658)); - var payload = payloadFromJWS(jwsSig); - if (header.typ === 'JWT' || opts.json) - payload = JSON.parse(payload, opts.encoding); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return { - header: header, - payload: payload, - signature: signatureFromJWS(jwsSig) - }; +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); } -function VerifyStream(opts) { - opts = opts || {}; - var secretOrKey = opts.secret||opts.publicKey||opts.key; - var secretStream = new DataStream(secretOrKey); - this.readable = true; - this.algorithm = opts.algorithm; - this.encoding = opts.encoding; - this.secret = this.publicKey = this.key = secretStream; - this.signature = new DataStream(opts.signature); - this.secret.once('close', function () { - if (!this.signature.writable && this.readable) - this.verify(); - }.bind(this)); +var _default = validate; +exports["default"] = _default; - this.signature.once('close', function () { - if (!this.secret.writable && this.readable) - this.verify(); - }.bind(this)); -} -util.inherits(VerifyStream, Stream); -VerifyStream.prototype.verify = function verify() { - try { - var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); - var obj = jwsDecode(this.signature.buffer, this.encoding); - this.emit('done', valid, obj); - this.emit('data', valid); - this.emit('end'); - this.readable = false; - return valid; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; +/***/ }), -VerifyStream.decode = jwsDecode; -VerifyStream.isValid = isValidJws; -VerifyStream.verify = jwsVerify; +/***/ 40694: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = VerifyStream; +"use strict"; -/***/ }), +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; -/***/ 47426: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var _validate = _interopRequireDefault(__nccwpck_require__(34875)); -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Module exports. - */ +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } -module.exports = __nccwpck_require__(53765) + return parseInt(uuid.slice(14, 15), 16); +} +var _default = version; +exports["default"] = _default; /***/ }), -/***/ 43583: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 84256: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ +var punycode = __nccwpck_require__(85477); +var mappingTable = __nccwpck_require__(72020); -/** - * Module dependencies. - * @private - */ +var PROCESSING_OPTIONS = { + TRANSITIONAL: 0, + NONTRANSITIONAL: 1 +}; -var db = __nccwpck_require__(47426) -var extname = (__nccwpck_require__(71017).extname) +function normalize(str) { // fix bug in v8 + return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); +} -/** - * Module variables. - * @private - */ +function findStatus(val) { + var start = 0; + var end = mappingTable.length - 1; -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i + while (start <= end) { + var mid = Math.floor((start + end) / 2); -/** - * Module exports. - * @public - */ + var target = mappingTable[mid]; + if (target[0][0] <= val && target[0][1] >= val) { + return target; + } else if (target[0][0] > val) { + end = mid - 1; + } else { + start = mid + 1; + } + } -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) + return null; +} -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) +var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ +function countSymbols(string) { + return string + // replace every surrogate pair with a BMP symbol + .replace(regexAstralSymbols, '_') + // then get the length + .length; +} -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } +function mapChars(domain_name, useSTD3, processing_option) { + var hasError = false; + var processed = ""; - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] + var len = countSymbols(domain_name); + for (var i = 0; i < len; ++i) { + var codePoint = domain_name.codePointAt(i); + var status = findStatus(codePoint); - if (mime && mime.charset) { - return mime.charset - } + switch (status[1]) { + case "disallowed": + hasError = true; + processed += String.fromCodePoint(codePoint); + break; + case "ignored": + break; + case "mapped": + processed += String.fromCodePoint.apply(String, status[2]); + break; + case "deviation": + if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { + processed += String.fromCodePoint.apply(String, status[2]); + } else { + processed += String.fromCodePoint(codePoint); + } + break; + case "valid": + processed += String.fromCodePoint(codePoint); + break; + case "disallowed_STD3_mapped": + if (useSTD3) { + hasError = true; + processed += String.fromCodePoint(codePoint); + } else { + processed += String.fromCodePoint.apply(String, status[2]); + } + break; + case "disallowed_STD3_valid": + if (useSTD3) { + hasError = true; + } - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' + processed += String.fromCodePoint(codePoint); + break; + } } - return false + return { + string: processed, + error: hasError + }; } -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ +var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false +function validateLabel(label, processing_option) { + if (label.substr(0, 4) === "xn--") { + label = punycode.toUnicode(label); + processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; } - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str + var error = false; - if (!mime) { - return false + if (normalize(label) !== label || + (label[3] === "-" && label[4] === "-") || + label[0] === "-" || label[label.length - 1] === "-" || + label.indexOf(".") !== -1 || + label.search(combiningMarksRegex) === 0) { + error = true; } - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() + var len = countSymbols(label); + for (var i = 0; i < len; ++i) { + var status = findStatus(label.codePointAt(i)); + if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || + (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && + status[1] !== "valid" && status[1] !== "deviation")) { + error = true; + break; + } } - return mime + return { + label: label, + error: error + }; } -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ +function processing(domain_name, useSTD3, processing_option) { + var result = mapChars(domain_name, useSTD3, processing_option); + result.string = normalize(result.string); -function extension (type) { - if (!type || typeof type !== 'string') { - return false + var labels = result.string.split("."); + for (var i = 0; i < labels.length; ++i) { + try { + var validation = validateLabel(labels[i]); + labels[i] = validation.label; + result.error = result.error || validation.error; + } catch(e) { + result.error = true; + } } - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) + return { + string: labels.join("."), + error: result.error + }; +} - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] +module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { + var result = processing(domain_name, useSTD3, processing_option); + var labels = result.string.split("."); + labels = labels.map(function(l) { + try { + return punycode.toASCII(l); + } catch(e) { + result.error = true; + return l; + } + }); - if (!exts || !exts.length) { - return false + if (verifyDnsLength) { + var total = labels.slice(0, labels.length - 1).join(".").length; + if (total.length > 253 || total.length === 0) { + result.error = true; + } + + for (var i=0; i < labels.length; ++i) { + if (labels.length > 63 || labels.length === 0) { + result.error = true; + break; + } + } } - return exts[0] -} + if (result.error) return null; + return labels.join("."); +}; -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ +module.exports.toUnicode = function(domain_name, useSTD3) { + var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } + return { + domain: result.string, + error: result.error + }; +}; - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) +module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; - if (!extension) { - return false - } - return exports.types[extension] || false -} +/***/ }), -/** - * Populate the extensions and types maps. - * @private - */ +/***/ 4351: +/***/ ((module) => { -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] +/****************************************************************************** +Copyright (c) Microsoft Corporation. - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. - if (!exts || !exts.length) { - return +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +var __rewriteRelativeImportExtension; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - // mime -> extensions - extensions[type] = exts + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; - // set the extension -> mime - types[extension] = type - } - }) -} + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; -/***/ }), + __runInitializers = function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + }; -/***/ 46038: -/***/ ((module) => { + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -"use strict"; + __setFunctionName = function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -/** - * @param typeMap [Object] Map of MIME type -> Array[extensions] - * @param ... - */ -function Mime() { - this._types = Object.create(null); - this._extensions = Object.create(null); + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; - for (let i = 0; i < arguments.length; i++) { - this.define(arguments[i]); - } + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; - this.define = this.define.bind(this); - this.getType = this.getType.bind(this); - this.getExtension = this.getExtension.bind(this); -} + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * If a type declares an extension that has already been defined, an error will - * be thrown. To suppress this error and force the extension to be associated - * with the new type, pass `force`=true. Alternatively, you may prefix the - * extension with "*" to map the type to extension, without mapping the - * extension to the type. - * - * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); - * - * - * @param map (Object) type definitions - * @param force (Boolean) if true, force overriding of existing definitions - */ -Mime.prototype.define = function(typeMap, force) { - for (let type in typeMap) { - let extensions = typeMap[type].map(function(t) { - return t.toLowerCase(); + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; }); - type = type.toLowerCase(); - for (let i = 0; i < extensions.length; i++) { - const ext = extensions[i]; + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - // '*' prefix = not the preferred type for this extension. So fixup the - // extension, and skip it. - if (ext[0] === '*') { - continue; - } + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - if (!force && (ext in this._types)) { - throw new Error( - 'Attempt to change mapping for "' + ext + - '" extension from "' + this._types[ext] + '" to "' + type + - '". Pass `force=true` to allow this, otherwise remove "' + ext + - '" from the list of extensions for "' + type + '".' - ); - } + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - this._types[ext] = type; - } + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; - // Use first extension as default - if (force || !this._extensions[type]) { - const ext = extensions[0]; - this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1); - } - } -}; + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; -/** - * Lookup a mime type based on extension - */ -Mime.prototype.getType = function(path) { - path = String(path); - let last = path.replace(/^.*[/\\]/, '').toLowerCase(); - let ext = last.replace(/^.*\./, '').toLowerCase(); + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - let hasPath = last.length < path.length; - let hasDot = ext.length < last.length - 1; + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; - return (hasDot || !hasPath) && this._types[ext] || null; -}; + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -/** - * Return file extension associated with a mime type - */ -Mime.prototype.getExtension = function(type) { - type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; - return type && this._extensions[type.toLowerCase()] || null; -}; + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; -module.exports = Mime; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -/***/ }), + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; -/***/ 29994: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; -"use strict"; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -let Mime = __nccwpck_require__(46038); -module.exports = new Mime(__nccwpck_require__(13114), __nccwpck_require__(38809)); + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + __classPrivateFieldIn = function (state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; -/***/ }), + __addDisposableResource = function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -/***/ 38809: -/***/ ((module) => { + var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + }; -module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; + __disposeResources = function (env) { + function fail(e) { + env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); + }; -/***/ }), + __rewriteRelativeImportExtension = function (path, preserveJsx) { + if (typeof path === "string" && /^\.\.?\//.test(path)) { + return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; + }; -/***/ 13114: -/***/ ((module) => { + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__esDecorate", __esDecorate); + exporter("__runInitializers", __runInitializers); + exporter("__propKey", __propKey); + exporter("__setFunctionName", __setFunctionName); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); + exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); +}); + +0 && (0); -module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; /***/ }), -/***/ 83973: +/***/ 74294: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep +module.exports = __nccwpck_require__(54219); -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __nccwpck_require__(33717) -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} +/***/ }), -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' +/***/ 54219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// * => any number of characters -var star = qmark + '*?' +"use strict"; -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' +var net = __nccwpck_require__(41808); +var tls = __nccwpck_require__(24404); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var events = __nccwpck_require__(82361); +var assert = __nccwpck_require__(39491); +var util = __nccwpck_require__(73837); -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; -// normalizes slashes. -var slashSplit = /\/+/ -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; } -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; } -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } - - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } - - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) - } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) - } - - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) - } - - return m +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; } -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; } -function minimatch (p, pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; - return new Minimatch(pattern, options).match(p) + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); } +util.inherits(TunnelingAgent, events.EventEmitter); -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; } - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); - // make the set of regexps etc. - this.make() -} + function onFree() { + self.emit('free', socket, options); + } -Minimatch.prototype.debug = function () {} + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; } - if (!pattern) { - this.empty = true - return + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); } - // step 1: figure out negation, etc. - this.parseNegate() + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); - // step 2: expand braces - var set = this.globSet = this.braceExpand() + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } - this.debug(this.pattern, set) + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } - this.debug(this.pattern, set) + function onError(cause) { + connectReq.removeAllListeners(); - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; - this.debug(this.pattern, set) +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; - this.debug(this.pattern, set) +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); - this.set = set + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); } -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate + return host; // for v0.11 or later } -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; } -Minimatch.prototype.braceExpand = braceExpand -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; } else { - options = {} + args.unshift('TUNNEL:'); } + console.error.apply(console, args); } +} else { + debug = function() {}; +} +exports.debug = debug; // for test - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - assertValidPattern(pattern) +/***/ }), - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } +/***/ 41773: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return expand(pattern) -} +"use strict"; -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } +const Client = __nccwpck_require__(33598) +const Dispatcher = __nccwpck_require__(60412) +const errors = __nccwpck_require__(48045) +const Pool = __nccwpck_require__(4634) +const BalancedPool = __nccwpck_require__(37931) +const Agent = __nccwpck_require__(7890) +const util = __nccwpck_require__(83983) +const { InvalidArgumentError } = errors +const api = __nccwpck_require__(44059) +const buildConnector = __nccwpck_require__(82067) +const MockClient = __nccwpck_require__(58687) +const MockAgent = __nccwpck_require__(66771) +const MockPool = __nccwpck_require__(26193) +const mockErrors = __nccwpck_require__(50888) +const ProxyAgent = __nccwpck_require__(97858) +const RetryHandler = __nccwpck_require__(82286) +const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(21892) +const DecoratorHandler = __nccwpck_require__(46930) +const RedirectHandler = __nccwpck_require__(72860) +const createRedirectInterceptor = __nccwpck_require__(38861) + +let hasCrypto +try { + __nccwpck_require__(6113) + hasCrypto = true +} catch { + hasCrypto = false } -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) +Object.assign(Dispatcher.prototype, api) - var options = this.options +module.exports.Dispatcher = Dispatcher +module.exports.Client = Client +module.exports.Pool = Pool +module.exports.BalancedPool = BalancedPool +module.exports.Agent = Agent +module.exports.ProxyAgent = ProxyAgent +module.exports.RetryHandler = RetryHandler - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' +module.exports.DecoratorHandler = DecoratorHandler +module.exports.RedirectHandler = RedirectHandler +module.exports.createRedirectInterceptor = createRedirectInterceptor - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this +module.exports.buildConnector = buildConnector +module.exports.errors = errors - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break +function makeDispatcher (fn) { + return (url, opts, handler) => { + if (typeof opts === 'function') { + handler = opts + opts = null + } + + if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { + throw new InvalidArgumentError('invalid url') + } + + if (opts != null && typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + if (opts && opts.path != null) { + if (typeof opts.path !== 'string') { + throw new InvalidArgumentError('invalid opts.path') } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false + + let path = opts.path + if (!opts.path.startsWith('/')) { + path = `/${path}` + } + + url = new URL(util.parseOrigin(url).origin + path) + } else { + if (!opts) { + opts = typeof url === 'object' ? url : {} + } + + url = util.parseURL(url) + } + + const { agent, dispatcher = getGlobalDispatcher() } = opts + + if (agent) { + throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') } + + return fn.call(dispatcher, { + ...opts, + origin: url.origin, + path: url.search ? `${url.pathname}${url.search}` : url.pathname, + method: opts.method || (opts.body ? 'PUT' : 'GET') + }, handler) } +} - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) +module.exports.setGlobalDispatcher = setGlobalDispatcher +module.exports.getGlobalDispatcher = getGlobalDispatcher - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue +if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { + let fetchImpl = null + module.exports.fetch = async function fetch (resource) { + if (!fetchImpl) { + fetchImpl = (__nccwpck_require__(74881).fetch) } - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false + try { + return await fetchImpl(...arguments) + } catch (err) { + if (typeof err === 'object') { + Error.captureStackTrace(err, this) } - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + throw err + } + } + module.exports.Headers = __nccwpck_require__(10554).Headers + module.exports.Response = __nccwpck_require__(27823).Response + module.exports.Request = __nccwpck_require__(48359).Request + module.exports.FormData = __nccwpck_require__(72015).FormData + module.exports.File = __nccwpck_require__(78511).File + module.exports.FileReader = __nccwpck_require__(1446).FileReader - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } + const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(71246) - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue + module.exports.setGlobalOrigin = setGlobalOrigin + module.exports.getGlobalOrigin = getGlobalOrigin - case '(': - if (inClass) { - re += '(' - continue - } + const { CacheStorage } = __nccwpck_require__(37907) + const { kConstruct } = __nccwpck_require__(29174) - if (!stateChar) { - re += '\\(' - continue - } + // Cache & CacheStorage are tightly coupled with fetch. Even if it may run + // in an older version of Node, it doesn't have any use without fetch. + module.exports.caches = new CacheStorage(kConstruct) +} - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue +if (util.nodeMajor >= 16) { + const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(41724) - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } + module.exports.deleteCookie = deleteCookie + module.exports.getCookies = getCookies + module.exports.getSetCookies = getSetCookies + module.exports.setCookie = setCookie - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue + const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } + module.exports.parseMIMEType = parseMIMEType + module.exports.serializeAMimeType = serializeAMimeType +} - clearStateChar() - re += '|' - continue +if (util.nodeMajor >= 18 && hasCrypto) { + const { WebSocket } = __nccwpck_require__(54284) - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() + module.exports.WebSocket = WebSocket +} - if (inClass) { - re += '\\' + c - continue - } +module.exports.request = makeDispatcher(api.request) +module.exports.stream = makeDispatcher(api.stream) +module.exports.pipeline = makeDispatcher(api.pipeline) +module.exports.connect = makeDispatcher(api.connect) +module.exports.upgrade = makeDispatcher(api.upgrade) - inClass = true - classStart = i - reClassStart = re.length - re += c - continue +module.exports.MockClient = MockClient +module.exports.MockPool = MockPool +module.exports.MockAgent = MockAgent +module.exports.mockErrors = mockErrors - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } +/***/ }), - // finish up the class. - hasMagic = true - inClass = false - re += c - continue +/***/ 7890: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - default: - // swallow any state char that wasn't consumed - clearStateChar() +"use strict"; - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - re += c +const { InvalidArgumentError } = __nccwpck_require__(48045) +const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(72785) +const DispatcherBase = __nccwpck_require__(74839) +const Pool = __nccwpck_require__(4634) +const Client = __nccwpck_require__(33598) +const util = __nccwpck_require__(83983) +const createRedirectInterceptor = __nccwpck_require__(38861) +const { WeakRef, FinalizationRegistry } = __nccwpck_require__(56436)() - } // switch - } // for +const kOnConnect = Symbol('onConnect') +const kOnDisconnect = Symbol('onDisconnect') +const kOnConnectionError = Symbol('onConnectionError') +const kMaxRedirections = Symbol('maxRedirections') +const kOnDrain = Symbol('onDrain') +const kFactory = Symbol('factory') +const kFinalizer = Symbol('finalizer') +const kOptions = Symbol('options') - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } +function defaultFactory (origin, opts) { + return opts && opts.connections === 1 + ? new Client(origin, opts) + : new Pool(origin, opts) +} - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } +class Agent extends DispatcherBase { + constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { + super() - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') + } - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { + throw new InvalidArgumentError('maxRedirections must be a positive number') + } - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } + if (connect && typeof connect !== 'function') { + connect = { ...connect } + } - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } + this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) + ? options.interceptors.Agent + : [createRedirectInterceptor({ maxRedirections })] - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] + this[kOptions] = { ...util.deepClone(options), connect } + this[kOptions].interceptors = options.interceptors + ? { ...options.interceptors } + : undefined + this[kMaxRedirections] = maxRedirections + this[kFactory] = factory + this[kClients] = new Map() + this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => { + const ref = this[kClients].get(key) + if (ref !== undefined && ref.deref() === undefined) { + this[kClients].delete(key) + } + }) - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) + const agent = this - nlLast += nlAfter + this[kOnDrain] = (origin, targets) => { + agent.emit('drain', origin, [agent, ...targets]) + } - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + this[kOnConnect] = (origin, targets) => { + agent.emit('connect', origin, [agent, ...targets]) } - nlAfter = cleanAfter - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' + this[kOnDisconnect] = (origin, targets, err) => { + agent.emit('disconnect', origin, [agent, ...targets], err) } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re + this[kOnConnectionError] = (origin, targets, err) => { + agent.emit('connectionError', origin, [agent, ...targets], err) + } } - if (addPatternStart) { - re = patternStart + re + get [kRunning] () { + let ret = 0 + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore next: gc is undeterministic */ + if (client) { + ret += client[kRunning] + } + } + return ret } - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } + [kDispatch] (opts, handler) { + let key + if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { + key = String(opts.origin) + } else { + throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') + } - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } + const ref = this[kClients].get(key) - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } + let dispatcher = ref ? ref.deref() : null + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]) + .on('drain', this[kOnDrain]) + .on('connect', this[kOnConnect]) + .on('disconnect', this[kOnDisconnect]) + .on('connectionError', this[kOnConnectionError]) - regExp._glob = pattern - regExp._src = re + this[kClients].set(key, new WeakRef(dispatcher)) + this[kFinalizer].register(dispatcher, key) + } - return regExp -} + return dispatcher.dispatch(opts, handler) + } -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} + async [kClose] () { + const closePromises = [] + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore else: gc is undeterministic */ + if (client) { + closePromises.push(client.close()) + } + } -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp + await Promise.all(closePromises) + } - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set + async [kDestroy] (err) { + const destroyPromises = [] + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore else: gc is undeterministic */ + if (client) { + destroyPromises.push(client.destroy(err)) + } + } - if (!set.length) { - this.regexp = false - return this.regexp + await Promise.all(destroyPromises) } - var options = this.options +} - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' +module.exports = Agent - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' +/***/ }), - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' +/***/ 7032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp -} +const { addAbortListener } = __nccwpck_require__(83983) +const { RequestAbortedError } = __nccwpck_require__(48045) -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) +const kListener = Symbol('kListener') +const kSignal = Symbol('kSignal') + +function abort (self) { + if (self.abort) { + self.abort() + } else { + self.onError(new RequestAbortedError()) } - return list } -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options +function addSignal (self, signal) { + self[kSignal] = null + self[kListener] = null - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') + if (!signal) { + return } - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) + if (signal.aborted) { + abort(self) + return + } - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. + self[kSignal] = signal + self[kListener] = () => { + abort(self) + } - var set = this.set - this.debug(this.pattern, 'set', set) + addAbortListener(self[kSignal], self[kListener]) +} - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break +function removeSignal (self) { + if (!self[kSignal]) { + return } - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } + if ('removeEventListener' in self[kSignal]) { + self[kSignal].removeEventListener('abort', self[kListener]) + } else { + self[kSignal].removeListener('abort', self[kListener]) } - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate + self[kSignal] = null + self[kListener] = null } -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options +module.exports = { + addSignal, + removeSignal +} - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - this.debug('matchOne', file.length, pattern.length) +/***/ }), - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] +/***/ 29744: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - this.debug(pattern, p, f) +"use strict"; - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false) return false - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) +const { AsyncResource } = __nccwpck_require__(50852) +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { addSignal, removeSignal } = __nccwpck_require__(7032) - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } +class ConnectHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + const { signal, opaque, responseHeaders } = opts - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } + super('UNDICI_CONNECT') - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - /* istanbul ignore if */ - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } + this.opaque = opaque || null + this.responseHeaders = responseHeaders || null + this.callback = callback + this.abort = null - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) + addSignal(this, signal) + } + + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() } - if (!hit) return false + this.abort = abort + this.context = context } - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* + onHeaders () { + throw new SocketError('bad connect', null) + } - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') + onUpgrade (statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this + + removeSignal(this) + + this.callback = null + + let headers = rawHeaders + // Indicates is an HTTP2Session + if (headers != null) { + headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + } + + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }) } - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} + onError (err) { + const { callback, opaque } = this -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') + removeSignal(this) + + if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + } } -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +function connect (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } + + try { + const connectHandler = new ConnectHandler(opts, callback) + this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } } +module.exports = connect + /***/ }), -/***/ 80900: -/***/ ((module) => { +/***/ 28752: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Helpers. - */ +"use strict"; -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ +const { + Readable, + Duplex, + PassThrough +} = __nccwpck_require__(12781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) +const assert = __nccwpck_require__(39491) -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; +const kResume = Symbol('resume') -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ +class PipelineRequest extends Readable { + constructor () { + super({ autoDestroy: true }) -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; + this[kResume] = null } -} -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ + _read () { + const { [kResume]: resume } = this -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; + if (resume) { + this[kResume] = null + resume() + } } - return ms + 'ms'; -} -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ + _destroy (err, callback) { + this._read() -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); + callback(err) } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); +} + +class PipelineResponse extends Readable { + constructor (resume) { + super({ autoDestroy: true }) + this[kResume] = resume } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); + + _read () { + this[kResume]() } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); + + _destroy (err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() + } + + callback(err) } - return ms + ' ms'; } -/** - * Pluralization helper. - */ +class PipelineHandler extends AsyncResource { + constructor (opts, handler) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} + if (typeof handler !== 'function') { + throw new InvalidArgumentError('invalid handler') + } + const { signal, method, opaque, onInfo, responseHeaders } = opts -/***/ }), + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } -/***/ 80467: -/***/ ((module, exports, __nccwpck_require__) => { + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } -"use strict"; + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } + super('UNDICI_PIPELINE') -Object.defineProperty(exports, "__esModule", ({ value: true })); + this.opaque = opaque || null + this.responseHeaders = responseHeaders || null + this.handler = handler + this.abort = null + this.context = null + this.onInfo = onInfo || null -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + this.req = new PipelineRequest().on('error', util.nop) -var Stream = _interopDefault(__nccwpck_require__(12781)); -var http = _interopDefault(__nccwpck_require__(13685)); -var Url = _interopDefault(__nccwpck_require__(57310)); -var whatwgUrl = _interopDefault(__nccwpck_require__(73323)); -var https = _interopDefault(__nccwpck_require__(95687)); -var zlib = _interopDefault(__nccwpck_require__(59796)); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + if (body && body.resume) { + body.resume() + } + }, + write: (chunk, encoding, callback) => { + const { req } = this -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; + if (req.push(chunk, encoding) || req._readableState.destroyed) { + callback() + } else { + req[kResume] = callback + } + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); + if (!err && !ret._readableState.endEmitted) { + err = new RequestAbortedError() + } -class Blob { - constructor() { - this[TYPE] = ''; + if (abort && err) { + abort() + } - const blobParts = arguments[0]; - const options = arguments[1]; + util.destroy(body, err) + util.destroy(req, err) + util.destroy(res, err) - const buffers = []; - let size = 0; + removeSignal(this) - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } + callback(err) + } + }).on('prefinish', () => { + const { req } = this - this[BUFFER] = Buffer.concat(buffers); + // Node < 15 does not call _final in same tick. + req.push(null) + }) - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; + this.res = null - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); + addSignal(this, signal) + } - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} + onConnect (abort, context) { + const { ret, res } = this -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); + assert(!res, 'pipeline cannot be retried') -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); + if (ret.destroyed) { + throw new RequestAbortedError() + } -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ + this.abort = abort + this.context = context + } -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); + onHeaders (statusCode, rawHeaders, resume) { + const { opaque, handler, context } = this - this.message = message; - this.type = type; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + this.onInfo({ statusCode, headers }) + } + return + } - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } + this.res = new PipelineResponse(resume) - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} + let body + try { + this.handler = null + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + body = this.runInAsyncScope(handler, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }) + } catch (err) { + this.res.on('error', util.nop) + throw err + } -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; + if (!body || typeof body.on !== 'function') { + throw new InvalidReturnValueError('expected Readable') + } -let convert; -try { - convert = (__nccwpck_require__(22877).convert); -} catch (e) {} + body + .on('data', (chunk) => { + const { ret, body } = this -const INTERNALS = Symbol('Body internals'); + if (!ret.push(chunk) && body.pause) { + body.pause() + } + }) + .on('error', (err) => { + const { ret } = this -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; + util.destroy(ret, err) + }) + .on('end', () => { + const { ret } = this -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; + ret.push(null) + }) + .on('close', () => { + const { ret } = this - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; + if (!ret._readableState.ended) { + util.destroy(ret, new RequestAbortedError()) + } + }) - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + this.body = body + } - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; + onData (chunk) { + const { res } = this + return res.push(chunk) + } - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } + onComplete (trailers) { + const { res } = this + res.push(null) + } + + onError (err) { + const { ret } = this + this.handler = null + util.destroy(ret, err) + } } -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, +function pipeline (opts, handler) { + try { + const pipelineHandler = new PipelineHandler(opts, handler) + this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) + return pipelineHandler.ret + } catch (err) { + return new PassThrough().destroy(err) + } +} - get bodyUsed() { - return this[INTERNALS].disturbed; - }, +module.exports = pipeline - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, +/***/ }), - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; +/***/ 55448: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, +"use strict"; - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, +const Readable = __nccwpck_require__(73858) +const { + InvalidArgumentError, + RequestAbortedError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; +class RequestHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); + try { + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; + if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { + throw new InvalidArgumentError('invalid highWaterMark') + } -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } - this[INTERNALS].disturbed = true; + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } + super('UNDICI_REQUEST') + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on('error', util.nop), err) + } + throw err + } - let body = this.body; + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.callback = callback + this.res = null + this.abort = null + this.body = body + this.trailers = {} + this.context = null + this.onInfo = onInfo || null + this.throwOnError = throwOnError + this.highWaterMark = highWaterMark - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + if (util.isStream(body)) { + body.on('error', (err) => { + this.onError(err) + }) + } - // body is blob - if (isBlob(body)) { - body = body.stream(); - } + addSignal(this, signal) + } - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + this.abort = abort + this.context = context + } - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - return new Body.Promise(function (resolve, reject) { - let resTimeout; + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }) + } + return + } - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + const body = new Readable({ resume, abort, contentType, highWaterMark }) - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } + this.callback = null + this.res = body + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope(getResolveErrorBodyCallback, null, + { callback, body, contentType, statusCode, statusMessage, headers } + ) + } else { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body, + context + }) + } + } + } - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } + onData (chunk) { + const { res } = this + return res.push(chunk) + } - accumBytes += chunk.length; - accum.push(chunk); - }); + onComplete (trailers) { + const { res } = this - body.on('end', function () { - if (abort) { - return; - } + removeSignal(this) - clearTimeout(resTimeout); + util.parseHeaders(trailers, this.trailers) - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); + res.push(null) + } + + onError (err) { + const { res, callback, body, opaque } = this + + removeSignal(this) + + if (callback) { + // TODO: Does this need queueMicrotask? + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + + if (res) { + this.res = null + // Ensure all queued handlers are invoked before destroying res. + queueMicrotask(() => { + util.destroy(res, err) + }) + } + + if (body) { + this.body = null + util.destroy(body, err) + } + } } -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } +function request (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; + try { + this.dispatch(opts, new RequestHandler(opts, callback)) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } +module.exports = request +module.exports.RequestHandler = RequestHandler - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - // html5 - if (!res && str) { - res = / { - if (res) { - res = /charset=(.*)/i.exec(res.pop()); - } - } +"use strict"; + + +const { finished, PassThrough } = __nccwpck_require__(12781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(7032) + +class StreamHandler extends AsyncResource { + constructor (opts, factory, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } + + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts + + try { + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + if (typeof factory !== 'function') { + throw new InvalidArgumentError('invalid factory') + } + + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } + + if (method === 'CONNECT') { + throw new InvalidArgumentError('invalid method') + } + + if (onInfo && typeof onInfo !== 'function') { + throw new InvalidArgumentError('invalid onInfo callback') + } + + super('UNDICI_STREAM') + } catch (err) { + if (util.isStream(body)) { + util.destroy(body.on('error', util.nop), err) + } + throw err + } + + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.factory = factory + this.callback = callback + this.res = null + this.abort = null + this.context = null + this.trailers = null + this.body = body + this.onInfo = onInfo || null + this.throwOnError = throwOnError || false + + if (util.isStream(body)) { + body.on('error', (err) => { + this.onError(err) + }) + } - // xml - if (!res && str) { - res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str); - } + addSignal(this, signal) + } - // found charset - if (res) { - charset = res.pop(); + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } - // prevent decode issues when sites use incorrect encoding - // ref: https://hsivonen.fi/encoding-menu/ - if (charset === 'gb2312' || charset === 'gbk') { - charset = 'gb18030'; - } - } + this.abort = abort + this.context = context + } - // turn raw buffers into a single utf-8 buffer - return convert(buffer, 'UTF-8', charset).toString(); -} + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this -/** - * Detect a URLSearchParams object - * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143 - * - * @param Object obj Object to detect by type or brand - * @return String - */ -function isURLSearchParams(obj) { - // Duck-typing as a necessary condition. - if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') { - return false; - } + const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - // Brand-checking and more duck-typing as optional condition. - return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function'; -} + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }) + } + return + } -/** - * Check if `obj` is a W3C `Blob` object (which `File` inherits from) - * @param {*} obj - * @return {boolean} - */ -function isBlob(obj) { - return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); -} + this.factory = null -/** - * Clone body given Res/Req instance - * - * @param Mixed instance Response or Request instance - * @return Mixed - */ -function clone(instance) { - let p1, p2; - let body = instance.body; + let res - // don't allow cloning a used body - if (instance.bodyUsed) { - throw new Error('cannot clone body after it is used'); - } + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + res = new PassThrough() - // check that body is a stream and not form-data object - // note: we can't clone the form-data object without having it as a dependency - if (body instanceof Stream && typeof body.getBoundary !== 'function') { - // tee instance body - p1 = new PassThrough(); - p2 = new PassThrough(); - body.pipe(p1); - body.pipe(p2); - // set instance body to teed body and return the other teed body - instance[INTERNALS].body = p1; - body = p2; - } + this.callback = null + this.runInAsyncScope(getResolveErrorBodyCallback, null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ) + } else { + if (factory === null) { + return + } - return body; -} + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }) -/** - * Performs the operation "extract a `Content-Type` value from |object|" as - * specified in the specification: - * https://fetch.spec.whatwg.org/#concept-bodyinit-extract - * - * This function assumes that instance.body is present. - * - * @param Mixed instance Any options.body input - */ -function extractContentType(body) { - if (body === null) { - // body is null - return null; - } else if (typeof body === 'string') { - // body is string - return 'text/plain;charset=UTF-8'; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - return 'application/x-www-form-urlencoded;charset=UTF-8'; - } else if (isBlob(body)) { - // body is blob - return body.type || null; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return null; - } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - return null; - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - return null; - } else if (typeof body.getBoundary === 'function') { - // detect form data input from form-data module - return `multipart/form-data;boundary=${body.getBoundary()}`; - } else if (body instanceof Stream) { - // body is stream - // can't really do much about this - return null; - } else { - // Body constructor defaults other things to string - return 'text/plain;charset=UTF-8'; - } -} + if ( + !res || + typeof res.write !== 'function' || + typeof res.end !== 'function' || + typeof res.on !== 'function' + ) { + throw new InvalidReturnValueError('expected Writable') + } -/** - * The Fetch Standard treats this as if "total bytes" is a property on the body. - * For us, we have to explicitly get it with a function. - * - * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes - * - * @param Body instance Instance of Body - * @return Number? Number of bytes, or null if not possible - */ -function getTotalBytes(instance) { - const body = instance.body; + // TODO: Avoid finished. It registers an unnecessary amount of listeners. + finished(res, { readable: false }, (err) => { + const { callback, res, opaque, trailers, abort } = this + this.res = null + if (err || !res.readable) { + util.destroy(res, err) + } - if (body === null) { - // body is null - return 0; - } else if (isBlob(body)) { - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === 'function') { - // detect form data input from form-data module - if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x - body.hasKnownLength && body.hasKnownLength()) { - // 2.x - return body.getLengthSync(); - } - return null; - } else { - // body is stream - return null; - } -} + this.callback = null + this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) -/** - * Write a Body to a Node.js WritableStream (e.g. http.Request) object. - * - * @param Body instance Instance of Body - * @return Void - */ -function writeToStream(dest, instance) { - const body = instance.body; + if (err) { + abort() + } + }) + } + res.on('drain', resume) - if (body === null) { - // body is null - dest.end(); - } else if (isBlob(body)) { - body.stream().pipe(dest); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - body.pipe(dest); - } -} + this.res = res -// expose Promise -Body.Promise = global.Promise; + const needDrain = res.writableNeedDrain !== undefined + ? res.writableNeedDrain + : res._writableState && res._writableState.needDrain -/** - * headers.js - * - * Headers class offers convenient helpers - */ + return needDrain !== true + } -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; -const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + onData (chunk) { + const { res } = this -function validateName(name) { - name = `${name}`; - if (invalidTokenRegex.test(name) || name === '') { - throw new TypeError(`${name} is not a legal HTTP header name`); - } -} + return res ? res.write(chunk) : true + } -function validateValue(value) { - value = `${value}`; - if (invalidHeaderCharRegex.test(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); - } -} + onComplete (trailers) { + const { res } = this -/** - * Find the key in the map object given a header name. - * - * Returns undefined if not found. - * - * @param String name Header name - * @return String|Undefined - */ -function find(map, name) { - name = name.toLowerCase(); - for (const key in map) { - if (key.toLowerCase() === name) { - return key; - } - } - return undefined; -} + removeSignal(this) -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + if (!res) { + return + } - this[MAP] = Object.create(null); + this.trailers = util.parseHeaders(trailers) - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); + res.end() + } - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } + onError (err) { + const { res, callback, opaque, body } = this - return; - } + removeSignal(this) - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } + this.factory = null - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } + if (res) { + this.res = null + util.destroy(res, err) + } else if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } + if (body) { + this.body = null + util.destroy(body, err) + } + } +} - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } +function stream (opts, factory, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } - return this[MAP][key].join(', '); - } + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } +} - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; +module.exports = stream - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } +/***/ }), - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } +/***/ 36923: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } +"use strict"; - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) +const { AsyncResource } = __nccwpck_require__(50852) +const util = __nccwpck_require__(83983) +const { addSignal, removeSignal } = __nccwpck_require__(7032) +const assert = __nccwpck_require__(39491) - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } +class UpgradeHandler extends AsyncResource { + constructor (opts, callback) { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('invalid opts') + } - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } + const { signal, opaque, responseHeaders } = opts - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { + throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') + } -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); + super('UNDICI_UPGRADE') -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); + this.responseHeaders = responseHeaders || null + this.opaque = opaque || null + this.callback = callback + this.abort = null + this.context = null -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + addSignal(this, signal) + } - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } -const INTERNAL = Symbol('internal'); + this.abort = abort + this.context = null + } -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} + onHeaders () { + throw new SocketError('bad upgrade', null) + } -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } + onUpgrade (statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; + assert.strictEqual(statusCode, 101) - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } + removeSignal(this) - this[INTERNAL].index = index + 1; + this.callback = null + const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }) + } - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + onError (err) { + const { callback, opaque } = this -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); + removeSignal(this) -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); + if (callback) { + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + } +} - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } +function upgrade (opts, callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data) + }) + }) + } - return obj; + try { + const upgradeHandler = new UpgradeHandler(opts, callback) + this.dispatch({ + ...opts, + method: opts.method || 'GET', + upgrade: opts.protocol || 'Websocket' + }, upgradeHandler) + } catch (err) { + if (typeof callback !== 'function') { + throw err + } + const opaque = opts && opts.opaque + queueMicrotask(() => callback(err, { opaque })) + } } -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} +module.exports = upgrade -const INTERNALS$1 = Symbol('Response internals'); -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; +/***/ }), -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +/***/ 44059: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - Body.call(this, body, opts); +"use strict"; - const status = opts.status || 200; - const headers = new Headers(opts.headers); - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } +module.exports.request = __nccwpck_require__(55448) +module.exports.stream = __nccwpck_require__(75395) +module.exports.pipeline = __nccwpck_require__(28752) +module.exports.upgrade = __nccwpck_require__(36923) +module.exports.connect = __nccwpck_require__(29744) - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - get url() { - return this[INTERNALS$1].url || ''; - } +/***/ }), - get status() { - return this[INTERNALS$1].status; - } +/***/ 73858: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } +"use strict"; +// Ported from https://github.com/nodejs/undici/pull/907 - get redirected() { - return this[INTERNALS$1].counter > 0; - } - get statusText() { - return this[INTERNALS$1].statusText; - } - get headers() { - return this[INTERNALS$1].headers; - } +const assert = __nccwpck_require__(39491) +const { Readable } = __nccwpck_require__(12781) +const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(83983) - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} +let Blob -Body.mixIn(Response.prototype); +const kConsume = Symbol('kConsume') +const kReading = Symbol('kReading') +const kBody = Symbol('kBody') +const kAbort = Symbol('abort') +const kContentType = Symbol('kContentType') -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); +const noop = () => {} -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); +module.exports = class BodyReadable extends Readable { + constructor ({ + resume, + abort, + contentType = '', + highWaterMark = 64 * 1024 // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }) -const INTERNALS$2 = Symbol('Request internals'); -const URL = Url.URL || whatwgUrl.URL; + this._readableState.dataEmitted = false -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; + this[kAbort] = abort + this[kConsume] = null + this[kBody] = null + this[kContentType] = contentType -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } + // Is stream being consumed through Readable API? + // This is an optimization so that we avoid checking + // for 'data' and 'readable' listeners in the hot path + // inside push(). + this[kReading] = false + } - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} + destroy (err) { + if (this.destroyed) { + // Node < 16 + return this + } -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() + } -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} + if (err) { + this[kAbort]() + } -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} + return super.destroy(err) + } -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + emit (ev, ...args) { + if (ev === 'data') { + // Node < 16.7 + this._readableState.dataEmitted = true + } else if (ev === 'error') { + // Node < 16 + this._readableState.errorEmitted = true + } + return super.emit(ev, ...args) + } - let parsedURL; + on (ev, ...args) { + if (ev === 'data' || ev === 'readable') { + this[kReading] = true + } + return super.on(ev, ...args) + } - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } + addListener (ev, ...args) { + return this.on(ev, ...args) + } - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); + off (ev, ...args) { + const ret = super.off(ev, ...args) + if (ev === 'data' || ev === 'readable') { + this[kReading] = ( + this.listenerCount('data') > 0 || + this.listenerCount('readable') > 0 + ) + } + return ret + } - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } + removeListener (ev, ...args) { + return this.off(ev, ...args) + } - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + push (chunk) { + if (this[kConsume] && chunk !== null && this.readableLength === 0) { + consumePush(this[kConsume], chunk) + return this[kReading] ? super.push(chunk) : true + } + return super.push(chunk) + } - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); + // https://fetch.spec.whatwg.org/#dom-body-text + async text () { + return consume(this, 'text') + } - const headers = new Headers(init.headers || input.headers || {}); + // https://fetch.spec.whatwg.org/#dom-body-json + async json () { + return consume(this, 'json') + } - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob () { + return consume(this, 'blob') + } - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer () { + return consume(this, 'arrayBuffer') + } - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData () { + // TODO: Implement. + throw new NotSupportedError() + } - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed () { + return util.isDisturbed(this) + } - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } + // https://fetch.spec.whatwg.org/#dom-body-body + get body () { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this) + if (this[kConsume]) { + // TODO: Is this the best way to force a lock? + this[kBody].getReader() // Ensure stream is locked. + assert(this[kBody].locked) + } + } + return this[kBody] + } - get method() { - return this[INTERNALS$2].method; - } + dump (opts) { + let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 + const signal = opts && opts.signal - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } + if (signal) { + try { + if (typeof signal !== 'object' || !('aborted' in signal)) { + throw new InvalidArgumentError('signal must be an AbortSignal') + } + util.throwIfAborted(signal) + } catch (err) { + return Promise.reject(err) + } + } - get headers() { - return this[INTERNALS$2].headers; - } + if (this.closed) { + return Promise.resolve(null) + } - get redirect() { - return this[INTERNALS$2].redirect; - } + return new Promise((resolve, reject) => { + const signalListenerCleanup = signal + ? util.addAbortListener(signal, () => { + this.destroy() + }) + : noop - get signal() { - return this[INTERNALS$2].signal; - } + this + .on('close', function () { + signalListenerCleanup() + if (signal && signal.aborted) { + reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) + } else { + resolve(null) + } + }) + .on('error', noop) + .on('data', function (chunk) { + limit -= chunk.length + if (limit <= 0) { + this.destroy() + } + }) + .resume() + }) + } +} - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } +// https://streams.spec.whatwg.org/#readablestream-locked +function isLocked (self) { + // Consume is an implicit lock. + return (self[kBody] && self[kBody].locked === true) || self[kConsume] } -Body.mixIn(Request.prototype); +// https://fetch.spec.whatwg.org/#body-unusable +function isUnusable (self) { + return util.isDisturbed(self) || isLocked(self) +} -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); +async function consume (stream, type) { + if (isUnusable(stream)) { + throw new TypeError('unusable') + } -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); + assert(!stream[kConsume]) -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); + return new Promise((resolve, reject) => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + } - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } + stream + .on('error', function (err) { + consumeFinish(this[kConsume], err) + }) + .on('close', function () { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()) + } + }) - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } + process.nextTick(consumeStart, stream[kConsume]) + }) +} - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } +function consumeStart (consume) { + if (consume.body === null) { + return + } - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } + const { _readableState: state } = consume.stream - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } + for (const chunk of state.buffer) { + consumePush(consume, chunk) + } - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } + if (state.endEmitted) { + consumeEnd(this[kConsume]) + } else { + consume.stream.on('end', function () { + consumeEnd(this[kConsume]) + }) + } - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } + consume.stream.resume() - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } + while (consume.stream.read() != null) { + // Loop + } +} - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js +function consumeEnd (consume) { + const { type, body, resolve, stream, length } = consume - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} + try { + if (type === 'text') { + resolve(toUSVString(Buffer.concat(body))) + } else if (type === 'json') { + resolve(JSON.parse(Buffer.concat(body))) + } else if (type === 'arrayBuffer') { + const dst = new Uint8Array(length) -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ + let pos = 0 + for (const buf of body) { + dst.set(buf, pos) + pos += buf.byteLength + } -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); + resolve(dst.buffer) + } else if (type === 'blob') { + if (!Blob) { + Blob = (__nccwpck_require__(14300).Blob) + } + resolve(new Blob(body, { type: stream[kContentType] })) + } - this.type = 'aborted'; - this.message = message; + consumeFinish(consume) + } catch (err) { + stream.destroy(err) + } +} - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); +function consumePush (consume, chunk) { + consume.length += chunk.length + consume.body.push(chunk) } -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; +function consumeFinish (consume, err) { + if (consume.body === null) { + return + } -const URL$1 = Url.URL || whatwgUrl.URL; + if (err) { + consume.reject(err) + } else { + consume.resolve() + } -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; + consume.type = null + consume.stream = null + consume.resolve = null + consume.reject = null + consume.length = 0 + consume.body = null +} -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); -}; +/***/ }), -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; +/***/ 77474: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return orig === dest; -}; +const assert = __nccwpck_require__(39491) +const { + ResponseStatusCodeError +} = __nccwpck_require__(48045) +const { toUSVString } = __nccwpck_require__(83983) -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { +async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert(body) - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } + let chunks = [] + let limit = 0 - Body.Promise = fetch.Promise; + for await (const chunk of body) { + chunks.push(chunk) + limit += chunk.length + if (limit > 128 * 1024) { + chunks = null + break + } + } - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); + if (statusCode === 204 || !contentType || !chunks) { + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) + return + } - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; + try { + if (contentType.startsWith('application/json')) { + const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } - let response = null; + if (contentType.startsWith('text/')) { + const payload = toUSVString(Buffer.concat(chunks)) + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) + return + } + } catch (err) { + // Process in a fallback if error + } - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) +} - if (signal && signal.aborted) { - abort(); - return; - } +module.exports = { getResolveErrorBodyCallback } - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - // send request - const req = send(options); - let reqTimeout; +/***/ }), - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } +/***/ 37931: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } +"use strict"; - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); +const { + BalancedPoolMissingUpstreamError, + InvalidArgumentError +} = __nccwpck_require__(48045) +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher +} = __nccwpck_require__(73198) +const Pool = __nccwpck_require__(4634) +const { kUrl, kInterceptors } = __nccwpck_require__(72785) +const { parseOrigin } = __nccwpck_require__(83983) +const kFactory = Symbol('factory') - if (response && response.body) { - destroyStream(response.body, err); - } +const kOptions = Symbol('options') +const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') +const kCurrentWeight = Symbol('kCurrentWeight') +const kIndex = Symbol('kIndex') +const kWeight = Symbol('kWeight') +const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') +const kErrorPenalty = Symbol('kErrorPenalty') - finalize(); - }); +function getGreatestCommonDivisor (a, b) { + if (b === 0) return a + return getGreatestCommonDivisor(b, a % b) +} - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} - if (response && response.body) { - destroyStream(response.body, err); - } - }); +class BalancedPool extends PoolBase { + constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super() - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; + this[kOptions] = opts + this[kIndex] = -1 + this[kCurrentWeight] = 0 - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 + this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - req.on('response', function (res) { - clearTimeout(reqTimeout); + if (!Array.isArray(upstreams)) { + upstreams = [upstreams] + } - const headers = createHeadersLenient(res.headers); + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') + } - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); + this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) + ? opts.interceptors.BalancedPool + : [] + this[kFactory] = factory - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } + for (const upstream of upstreams) { + this.addUpstream(upstream) + } + this._updateBalancedPoolStats() + } - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } + addUpstream (upstream) { + const upstreamOrigin = parseOrigin(upstream).origin - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } + if (this[kClients].find((pool) => ( + pool[kUrl].origin === upstreamOrigin && + pool.closed !== true && + pool.destroyed !== true + ))) { + return this + } + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; + this[kAddClient](pool) + pool.on('connect', () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) + }) - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } + pool.on('connectionError', () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) + this._updateBalancedPoolStats() + }) - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } + pool.on('disconnect', (...args) => { + const err = args[2] + if (err && err.code === 'UND_ERR_SOCKET') { + // decrease the weight of the pool. + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) + this._updateBalancedPoolStats() + } + }) - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } + for (const client of this[kClients]) { + client[kWeight] = this[kMaxWeightPerServer] + } - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } + this._updateBalancedPoolStats() - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); + return this + } - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; + _updateBalancedPoolStats () { + this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0) + } - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); + removeUpstream (upstream) { + const upstreamOrigin = parseOrigin(upstream).origin - // HTTP-network fetch step 12.1.1.4: handle content codings + const pool = this[kClients].find((pool) => ( + pool[kUrl].origin === upstreamOrigin && + pool.closed !== true && + pool.destroyed !== true + )) - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } + if (pool) { + this[kRemoveClient](pool) + } - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; + return this + } - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } + get upstreams () { + return this[kClients] + .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) + .map((p) => p[kUrl].origin) + } - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); - return; - } + [kGetDispatcher] () { + // We validate that pools is greater than 0, + // otherwise we would have to wait until an upstream + // is added, which might never happen. + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError() + } - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } + const dispatcher = this[kClients].find(dispatcher => ( + !dispatcher[kNeedDrain] && + dispatcher.closed !== true && + dispatcher.destroyed !== true + )) - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); + if (!dispatcher) { + return + } - writeToStream(req, request); - }); -} -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; + const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - request.on('socket', function (s) { - socket = s; - }); + if (allClientsBusy) { + return + } - request.on('response', function (response) { - const headers = response.headers; + let counter = 0 - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // tests for socket presence, as in some situations the - // the 'socket' event is not triggered for the request - // (happens in deno), avoids `TypeError` - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket && socket.listenerCount('data') > 0; + let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length + const pool = this[kClients][this[kIndex]] -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} + // find pool index with the largest weight + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { + maxWeightIndex = this[kIndex] + } -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; + // decrease the current weight every `this[kClients].length`. + if (this[kIndex] === 0) { + // Set the current weight to the next lower weight. + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] -// expose Promise -fetch.Promise = global.Promise; + if (this[kCurrentWeight] <= 0) { + this[kCurrentWeight] = this[kMaxWeightPerServer] + } + } + if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { + return pool + } + } -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; -exports.AbortError = AbortError; + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] + this[kIndex] = maxWeightIndex + return this[kClients][maxWeightIndex] + } +} + +module.exports = BalancedPool /***/ }), -/***/ 42299: +/***/ 66101: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -var punycode = __nccwpck_require__(85477); -var mappingTable = __nccwpck_require__(1907); - -var PROCESSING_OPTIONS = { - TRANSITIONAL: 0, - NONTRANSITIONAL: 1 -}; +const { kConstruct } = __nccwpck_require__(29174) +const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(82396) +const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(83983) +const { kHeadersList } = __nccwpck_require__(72785) +const { webidl } = __nccwpck_require__(21744) +const { Response, cloneResponse } = __nccwpck_require__(27823) +const { Request } = __nccwpck_require__(48359) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) +const { fetching } = __nccwpck_require__(74881) +const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(52538) +const assert = __nccwpck_require__(39491) +const { getGlobalDispatcher } = __nccwpck_require__(21892) -function normalize(str) { // fix bug in v8 - return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); -} +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation + * @typedef {Object} CacheBatchOperation + * @property {'delete' | 'put'} type + * @property {any} request + * @property {any} response + * @property {import('../../types/cache').CacheQueryOptions} options + */ -function findStatus(val) { - var start = 0; - var end = mappingTable.length - 1; +/** + * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list + * @typedef {[any, any][]} requestResponseList + */ - while (start <= end) { - var mid = Math.floor((start + end) / 2); +class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList - var target = mappingTable[mid]; - if (target[0][0] <= val && target[0][1] >= val) { - return target; - } else if (target[0][0] > val) { - end = mid - 1; - } else { - start = mid + 1; + constructor () { + if (arguments[0] !== kConstruct) { + webidl.illegalConstructor() } - } - - return null; -} - -var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; -function countSymbols(string) { - return string - // replace every surrogate pair with a BMP symbol - .replace(regexAstralSymbols, '_') - // then get the length - .length; -} + this.#relevantRequestResponseList = arguments[1] + } -function mapChars(domain_name, useSTD3, processing_option) { - var hasError = false; - var processed = ""; + async match (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) - var len = countSymbols(domain_name); - for (var i = 0; i < len; ++i) { - var codePoint = domain_name.codePointAt(i); - var status = findStatus(codePoint); + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) - switch (status[1]) { - case "disallowed": - hasError = true; - processed += String.fromCodePoint(codePoint); - break; - case "ignored": - break; - case "mapped": - processed += String.fromCodePoint.apply(String, status[2]); - break; - case "deviation": - if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { - processed += String.fromCodePoint.apply(String, status[2]); - } else { - processed += String.fromCodePoint(codePoint); - } - break; - case "valid": - processed += String.fromCodePoint(codePoint); - break; - case "disallowed_STD3_mapped": - if (useSTD3) { - hasError = true; - processed += String.fromCodePoint(codePoint); - } else { - processed += String.fromCodePoint.apply(String, status[2]); - } - break; - case "disallowed_STD3_valid": - if (useSTD3) { - hasError = true; - } + const p = await this.matchAll(request, options) - processed += String.fromCodePoint(codePoint); - break; + if (p.length === 0) { + return } - } - return { - string: processed, - error: hasError - }; -} + return p[0] + } -var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; + async matchAll (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) -function validateLabel(label, processing_option) { - if (label.substr(0, 4) === "xn--") { - label = punycode.toUnicode(label); - processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; - } + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) - var error = false; + // 1. + let r = null - if (normalize(label) !== label || - (label[3] === "-" && label[4] === "-") || - label[0] === "-" || label[label.length - 1] === "-" || - label.indexOf(".") !== -1 || - label.search(combiningMarksRegex) === 0) { - error = true; - } + // 2. + if (request !== undefined) { + if (request instanceof Request) { + // 2.1.1 + r = request[kState] - var len = countSymbols(label); - for (var i = 0; i < len; ++i) { - var status = findStatus(label.codePointAt(i)); - if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || - (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && - status[1] !== "valid" && status[1] !== "deviation")) { - error = true; - break; + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { + // 2.2.1 + r = new Request(request)[kState] + } } - } - return { - label: label, - error: error - }; -} + // 5. + // 5.1 + const responses = [] -function processing(domain_name, useSTD3, processing_option) { - var result = mapChars(domain_name, useSTD3, processing_option); - result.string = normalize(result.string); + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) - var labels = result.string.split("."); - for (var i = 0; i < labels.length; ++i) { - try { - var validation = validateLabel(labels[i]); - labels[i] = validation.label; - result.error = result.error || validation.error; - } catch(e) { - result.error = true; + // 5.3.2 + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]) + } } - } - return { - string: labels.join("."), - error: result.error - }; -} - -module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { - var result = processing(domain_name, useSTD3, processing_option); - var labels = result.string.split("."); - labels = labels.map(function(l) { - try { - return punycode.toASCII(l); - } catch(e) { - result.error = true; - return l; - } - }); + // 5.4 + // We don't implement CORs so we don't need to loop over the responses, yay! - if (verifyDnsLength) { - var total = labels.slice(0, labels.length - 1).join(".").length; - if (total.length > 253 || total.length === 0) { - result.error = true; - } + // 5.5.1 + const responseList = [] - for (var i=0; i < labels.length; ++i) { - if (labels.length > 63 || labels.length === 0) { - result.error = true; - break; - } + // 5.5.2 + for (const response of responses) { + // 5.5.2.1 + const responseObject = new Response(response.body?.source ?? null) + const body = responseObject[kState].body + responseObject[kState] = response + responseObject[kState].body = body + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + + responseList.push(responseObject) } - } - if (result.error) return null; - return labels.join("."); -}; + // 6. + return Object.freeze(responseList) + } -module.exports.toUnicode = function(domain_name, useSTD3) { - var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); + async add (request) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) - return { - domain: result.string, - error: result.error - }; -}; + request = webidl.converters.RequestInfo(request) -module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; + // 1. + const requests = [request] + // 2. + const responseArrayPromise = this.addAll(requests) -/***/ }), + // 3. + return await responseArrayPromise + } -/***/ 15871: -/***/ ((module) => { + async addAll (requests) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) -"use strict"; + requests = webidl.converters['sequence'](requests) + // 1. + const responsePromises = [] -var conversions = {}; -module.exports = conversions; + // 2. + const requestList = [] -function sign(x) { - return x < 0 ? -1 : 1; -} + // 3. + for (const request of requests) { + if (typeof request === 'string') { + continue + } -function evenRound(x) { - // Round x to the nearest integer, choosing the even integer if it lies halfway between two. - if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) - return Math.floor(x); - } else { - return Math.round(x); - } -} + // 3.1 + const r = request[kState] -function createNumberConversion(bitLength, typeOpts) { - if (!typeOpts.unsigned) { - --bitLength; + // 3.2 + if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme when method is not GET.' + }) + } } - const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); - const upperBound = Math.pow(2, bitLength) - 1; - - const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); - const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); - return function(V, opts) { - if (!opts) opts = {}; + // 4. + /** @type {ReturnType[]} */ + const fetchControllers = [] - let x = +V; + // 5. + for (const request of requests) { + // 5.1 + const r = new Request(request)[kState] - if (opts.enforceRange) { - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite number"); - } + // 5.2 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme.' + }) + } - x = sign(x) * Math.floor(Math.abs(x)); - if (x < lowerBound || x > upperBound) { - throw new TypeError("Argument is not in byte range"); - } + // 5.4 + r.initiator = 'fetch' + r.destination = 'subresource' - return x; - } + // 5.5 + requestList.push(r) - if (!isNaN(x) && opts.clamp) { - x = evenRound(x); + // 5.6 + const responsePromise = createDeferredPromise() - if (x < lowerBound) x = lowerBound; - if (x > upperBound) x = upperBound; - return x; - } + // 5.7 + fetchControllers.push(fetching({ + request: r, + dispatcher: getGlobalDispatcher(), + processResponse (response) { + // 1. + if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Received an invalid status code or the request failed.' + })) + } else if (response.headersList.contains('vary')) { // 2. + // 2.1 + const fieldValues = getFieldValues(response.headersList.get('vary')) - if (!Number.isFinite(x) || x === 0) { - return 0; - } + // 2.2 + for (const fieldValue of fieldValues) { + // 2.2.1 + if (fieldValue === '*') { + responsePromise.reject(webidl.errors.exception({ + header: 'Cache.addAll', + message: 'invalid vary field value' + })) - x = sign(x) * Math.floor(Math.abs(x)); - x = x % moduloVal; + for (const controller of fetchControllers) { + controller.abort() + } - if (!typeOpts.unsigned && x >= moduloBound) { - return x - moduloVal; - } else if (typeOpts.unsigned) { - if (x < 0) { - x += moduloVal; - } else if (x === -0) { // don't return negative zero - return 0; + return + } } + } + }, + processResponseEndOfBody (response) { + // 1. + if (response.aborted) { + responsePromise.reject(new DOMException('aborted', 'AbortError')) + return + } + + // 2. + responsePromise.resolve(response) } + })) - return x; + // 5.8 + responsePromises.push(responsePromise.promise) } -} - -conversions["void"] = function () { - return undefined; -}; -conversions["boolean"] = function (val) { - return !!val; -}; + // 6. + const p = Promise.all(responsePromises) -conversions["byte"] = createNumberConversion(8, { unsigned: false }); -conversions["octet"] = createNumberConversion(8, { unsigned: true }); + // 7. + const responses = await p -conversions["short"] = createNumberConversion(16, { unsigned: false }); -conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); + // 7.1 + const operations = [] -conversions["long"] = createNumberConversion(32, { unsigned: false }); -conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); + // 7.2 + let index = 0 -conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); -conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); + // 7.3 + for (const response of responses) { + // 7.3.1 + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 7.3.2 + request: requestList[index], // 7.3.3 + response // 7.3.4 + } -conversions["double"] = function (V) { - const x = +V; + operations.push(operation) // 7.3.5 - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite floating-point value"); + index++ // 7.3.6 } - return x; -}; + // 7.5 + const cacheJobPromise = createDeferredPromise() -conversions["unrestricted double"] = function (V) { - const x = +V; + // 7.6.1 + let errorData = null - if (isNaN(x)) { - throw new TypeError("Argument is NaN"); + // 7.6.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e } - return x; -}; + // 7.6.3 + queueMicrotask(() => { + // 7.6.3.1 + if (errorData === null) { + cacheJobPromise.resolve(undefined) + } else { + // 7.6.3.2 + cacheJobPromise.reject(errorData) + } + }) -// not quite valid, but good enough for JS -conversions["float"] = conversions["double"]; -conversions["unrestricted float"] = conversions["unrestricted double"]; + // 7.7 + return cacheJobPromise.promise + } -conversions["DOMString"] = function (V, opts) { - if (!opts) opts = {}; + async put (request, response) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) - if (opts.treatNullAsEmptyString && V === null) { - return ""; + request = webidl.converters.RequestInfo(request) + response = webidl.converters.Response(response) + + // 1. + let innerRequest = null + + // 2. + if (request instanceof Request) { + innerRequest = request[kState] + } else { // 3. + innerRequest = new Request(request)[kState] } - return String(V); -}; + // 4. + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Expected an http/s scheme when method is not GET' + }) + } -conversions["ByteString"] = function (V, opts) { - const x = String(V); - let c = undefined; - for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { - if (c > 255) { - throw new TypeError("Argument is not a valid bytestring"); - } + // 5. + const innerResponse = response[kState] + + // 6. + if (innerResponse.status === 206) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got 206 status' + }) } - return x; -}; + // 7. + if (innerResponse.headersList.contains('vary')) { + // 7.1. + const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) -conversions["USVString"] = function (V) { - const S = String(V); - const n = S.length; - const U = []; - for (let i = 0; i < n; ++i) { - const c = S.charCodeAt(i); - if (c < 0xD800 || c > 0xDFFF) { - U.push(String.fromCodePoint(c)); - } else if (0xDC00 <= c && c <= 0xDFFF) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - if (i === n - 1) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - const d = S.charCodeAt(i + 1); - if (0xDC00 <= d && d <= 0xDFFF) { - const a = c & 0x3FF; - const b = d & 0x3FF; - U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); - ++i; - } else { - U.push(String.fromCodePoint(0xFFFD)); - } - } + // 7.2. + for (const fieldValue of fieldValues) { + // 7.2.1 + if (fieldValue === '*') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got * vary field value' + }) } + } } - return U.join(''); -}; + // 8. + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Response body is locked or disturbed' + }) + } -conversions["Date"] = function (V, opts) { - if (!(V instanceof Date)) { - throw new TypeError("Argument is not a Date object"); + // 9. + const clonedResponse = cloneResponse(innerResponse) + + // 10. + const bodyReadPromise = createDeferredPromise() + + // 11. + if (innerResponse.body != null) { + // 11.1 + const stream = innerResponse.body.stream + + // 11.2 + const reader = stream.getReader() + + // 11.3 + readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) + } else { + bodyReadPromise.resolve(undefined) } - if (isNaN(V)) { - return undefined; + + // 12. + /** @type {CacheBatchOperation[]} */ + const operations = [] + + // 13. + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 14. + request: innerRequest, // 15. + response: clonedResponse // 16. } - return V; -}; + // 17. + operations.push(operation) -conversions["RegExp"] = function (V, opts) { - if (!(V instanceof RegExp)) { - V = new RegExp(V); + // 19. + const bytes = await bodyReadPromise.promise + + if (clonedResponse.body != null) { + clonedResponse.body.source = bytes } - return V; -}; + // 19.1 + const cacheJobPromise = createDeferredPromise() + // 19.2.1 + let errorData = null -/***/ }), + // 19.2.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } -/***/ 58262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 19.2.3 + queueMicrotask(() => { + // 19.2.3.1 + if (errorData === null) { + cacheJobPromise.resolve() + } else { // 19.2.3.2 + cacheJobPromise.reject(errorData) + } + }) -"use strict"; + return cacheJobPromise.promise + } -const usm = __nccwpck_require__(40033); + async delete (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) -exports.implementation = class URLImpl { - constructor(constructorArgs) { - const url = constructorArgs[0]; - const base = constructorArgs[1]; + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) - let parsedBase = null; - if (base !== undefined) { - parsedBase = usm.basicURLParse(base); - if (parsedBase === "failure") { - throw new TypeError("Invalid base URL"); + /** + * @type {Request} + */ + let r = null + + if (request instanceof Request) { + r = request[kState] + + if (r.method !== 'GET' && !options.ignoreMethod) { + return false } + } else { + assert(typeof request === 'string') + + r = new Request(request)[kState] } - const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); + /** @type {CacheBatchOperation[]} */ + const operations = [] + + /** @type {CacheBatchOperation} */ + const operation = { + type: 'delete', + request: r, + options } - this._url = parsedURL; + operations.push(operation) - // TODO: query stuff - } + const cacheJobPromise = createDeferredPromise() - get href() { - return usm.serializeURL(this._url); - } + let errorData = null + let requestResponses - set href(v) { - const parsedURL = usm.basicURLParse(v); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); + try { + requestResponses = this.#batchCacheOperations(operations) + } catch (e) { + errorData = e } - this._url = parsedURL; - } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(!!requestResponses?.length) + } else { + cacheJobPromise.reject(errorData) + } + }) - get origin() { - return usm.serializeURLOrigin(this._url); + return cacheJobPromise.promise } - get protocol() { - return this._url.scheme + ":"; - } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {readonly Request[]} + */ + async keys (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) - set protocol(v) { - usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); - } + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) - get username() { - return this._url.username; - } + // 1. + let r = null - set username(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; + // 2. + if (request !== undefined) { + // 2.1 + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { // 2.2 + r = new Request(request)[kState] + } } - usm.setTheUsername(this._url, v); - } + // 4. + const promise = createDeferredPromise() - get password() { - return this._url.password; - } + // 5. + // 5.1 + const requests = [] - set password(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + // 5.2.1.1 + requests.push(requestResponse[0]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) + + // 5.3.2 + for (const requestResponse of requestResponses) { + // 5.3.2.1 + requests.push(requestResponse[0]) + } } - usm.setThePassword(this._url, v); - } + // 5.4 + queueMicrotask(() => { + // 5.4.1 + const requestList = [] - get host() { - const url = this._url; + // 5.4.2 + for (const request of requests) { + const requestObject = new Request('https://a') + requestObject[kState] = request + requestObject[kHeaders][kHeadersList] = request.headersList + requestObject[kHeaders][kGuard] = 'immutable' + requestObject[kRealm] = request.client - if (url.host === null) { - return ""; - } + // 5.4.2.1 + requestList.push(requestObject) + } - if (url.port === null) { - return usm.serializeHost(url.host); - } + // 5.4.3 + promise.resolve(Object.freeze(requestList)) + }) - return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); + return promise.promise } - set host(v) { - if (this._url.cannotBeABaseURL) { - return; - } + /** + * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm + * @param {CacheBatchOperation[]} operations + * @returns {requestResponseList} + */ + #batchCacheOperations (operations) { + // 1. + const cache = this.#relevantRequestResponseList - usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); - } + // 2. + const backupCache = [...cache] - get hostname() { - if (this._url.host === null) { - return ""; - } + // 3. + const addedItems = [] - return usm.serializeHost(this._url.host); - } + // 4.1 + const resultList = [] - set hostname(v) { - if (this._url.cannotBeABaseURL) { - return; - } + try { + // 4.2 + for (const operation of operations) { + // 4.2.1 + if (operation.type !== 'delete' && operation.type !== 'put') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'operation type does not match "delete" or "put"' + }) + } - usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); - } + // 4.2.2 + if (operation.type === 'delete' && operation.response != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'delete operation should not have an associated response' + }) + } - get port() { - if (this._url.port === null) { - return ""; - } + // 4.2.3 + if (this.#queryCache(operation.request, operation.options, addedItems).length) { + throw new DOMException('???', 'InvalidStateError') + } - return usm.serializeInteger(this._url.port); - } + // 4.2.4 + let requestResponses - set port(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } + // 4.2.5 + if (operation.type === 'delete') { + // 4.2.5.1 + requestResponses = this.#queryCache(operation.request, operation.options) - if (v === "") { - this._url.port = null; - } else { - usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); - } - } + // TODO: the spec is wrong, this is needed to pass WPTs + if (requestResponses.length === 0) { + return [] + } - get pathname() { - if (this._url.cannotBeABaseURL) { - return this._url.path[0]; - } + // 4.2.5.2 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) - if (this._url.path.length === 0) { - return ""; - } + // 4.2.5.2.1 + cache.splice(idx, 1) + } + } else if (operation.type === 'put') { // 4.2.6 + // 4.2.6.1 + if (operation.response == null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'put operation should have an associated response' + }) + } - return "/" + this._url.path.join("/"); - } + // 4.2.6.2 + const r = operation.request - set pathname(v) { - if (this._url.cannotBeABaseURL) { - return; - } + // 4.2.6.3 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'expected http or https scheme' + }) + } - this._url.path = []; - usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); - } + // 4.2.6.4 + if (r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'not get method' + }) + } - get search() { - if (this._url.query === null || this._url.query === "") { - return ""; - } + // 4.2.6.5 + if (operation.options != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'options must not be defined' + }) + } - return "?" + this._url.query; - } + // 4.2.6.6 + requestResponses = this.#queryCache(operation.request) - set search(v) { - // TODO: query stuff + // 4.2.6.7 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) - const url = this._url; + // 4.2.6.7.1 + cache.splice(idx, 1) + } - if (v === "") { - url.query = null; - return; - } + // 4.2.6.8 + cache.push([operation.request, operation.response]) - const input = v[0] === "?" ? v.substring(1) : v; - url.query = ""; - usm.basicURLParse(input, { url, stateOverride: "query" }); - } + // 4.2.6.10 + addedItems.push([operation.request, operation.response]) + } - get hash() { - if (this._url.fragment === null || this._url.fragment === "") { - return ""; - } + // 4.2.7 + resultList.push([operation.request, operation.response]) + } - return "#" + this._url.fragment; + // 4.3 + return resultList + } catch (e) { // 5. + // 5.1 + this.#relevantRequestResponseList.length = 0 + + // 5.2 + this.#relevantRequestResponseList = backupCache + + // 5.3 + throw e + } } - set hash(v) { - if (v === "") { - this._url.fragment = null; - return; + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache (requestQuery, options, targetStorage) { + /** @type {requestResponseList} */ + const resultList = [] + + const storage = targetStorage ?? this.#relevantRequestResponseList + + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { + resultList.push(requestResponse) + } } - const input = v[0] === "#" ? v.substring(1) : v; - this._url.fragment = ""; - usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); + return resultList } - toJSON() { - return this.href; - } -}; + /** + * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm + * @param {any} requestQuery + * @param {any} request + * @param {any | null} response + * @param {import('../../types/cache').CacheQueryOptions | undefined} options + * @returns {boolean} + */ + #requestMatchesCachedItem (requestQuery, request, response = null, options) { + // if (options?.ignoreMethod === false && request.method === 'GET') { + // return false + // } + const queryURL = new URL(requestQuery.url) -/***/ }), + const cachedURL = new URL(request.url) -/***/ 80653: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (options?.ignoreSearch) { + cachedURL.search = '' -"use strict"; + queryURL.search = '' + } + if (!urlEquals(queryURL, cachedURL, true)) { + return false + } -const conversions = __nccwpck_require__(15871); -const utils = __nccwpck_require__(60276); -const Impl = __nccwpck_require__(58262); + if ( + response == null || + options?.ignoreVary || + !response.headersList.contains('vary') + ) { + return true + } -const impl = utils.implSymbol; + const fieldValues = getFieldValues(response.headersList.get('vary')) -function URL(url) { - if (!this || this[impl] || !(this instanceof URL)) { - throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); - } - if (arguments.length < 1) { - throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); - } - const args = []; - for (let i = 0; i < arguments.length && i < 2; ++i) { - args[i] = arguments[i]; - } - args[0] = conversions["USVString"](args[0]); - if (args[1] !== undefined) { - args[1] = conversions["USVString"](args[1]); - } + for (const fieldValue of fieldValues) { + if (fieldValue === '*') { + return false + } - module.exports.setup(this, args); -} + const requestValue = request.headersList.get(fieldValue) + const queryValue = requestQuery.headersList.get(fieldValue) -URL.prototype.toJSON = function toJSON() { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - const args = []; - for (let i = 0; i < arguments.length && i < 0; ++i) { - args[i] = arguments[i]; - } - return this[impl].toJSON.apply(this[impl], args); -}; -Object.defineProperty(URL.prototype, "href", { - get() { - return this[impl].href; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].href = V; - }, - enumerable: true, - configurable: true -}); + // If one has the header and the other doesn't, or one has + // a different value than the other, return false + if (requestValue !== queryValue) { + return false + } + } -URL.prototype.toString = function () { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); + return true } - return this.href; -}; +} -Object.defineProperty(URL.prototype, "origin", { - get() { - return this[impl].origin; +Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: 'Cache', + configurable: true }, - enumerable: true, - configurable: true -}); + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) -Object.defineProperty(URL.prototype, "protocol", { - get() { - return this[impl].protocol; +const cacheQueryOptionConverters = [ + { + key: 'ignoreSearch', + converter: webidl.converters.boolean, + defaultValue: false }, - set(V) { - V = conversions["USVString"](V); - this[impl].protocol = V; + { + key: 'ignoreMethod', + converter: webidl.converters.boolean, + defaultValue: false }, - enumerable: true, - configurable: true -}); + { + key: 'ignoreVary', + converter: webidl.converters.boolean, + defaultValue: false + } +] -Object.defineProperty(URL.prototype, "username", { - get() { - return this[impl].username; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].username = V; - }, - enumerable: true, - configurable: true -}); +webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) -Object.defineProperty(URL.prototype, "password", { - get() { - return this[impl].password; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].password = V; - }, - enumerable: true, - configurable: true -}); +webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ + ...cacheQueryOptionConverters, + { + key: 'cacheName', + converter: webidl.converters.DOMString + } +]) -Object.defineProperty(URL.prototype, "host", { - get() { - return this[impl].host; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].host = V; - }, - enumerable: true, - configurable: true -}); +webidl.converters.Response = webidl.interfaceConverter(Response) -Object.defineProperty(URL.prototype, "hostname", { - get() { - return this[impl].hostname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hostname = V; - }, - enumerable: true, - configurable: true -}); +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.RequestInfo +) -Object.defineProperty(URL.prototype, "port", { - get() { - return this[impl].port; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].port = V; - }, - enumerable: true, - configurable: true -}); +module.exports = { + Cache +} -Object.defineProperty(URL.prototype, "pathname", { - get() { - return this[impl].pathname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].pathname = V; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(URL.prototype, "search", { - get() { - return this[impl].search; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].search = V; - }, - enumerable: true, - configurable: true -}); +/***/ }), + +/***/ 37907: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { kConstruct } = __nccwpck_require__(29174) +const { Cache } = __nccwpck_require__(66101) +const { webidl } = __nccwpck_require__(21744) +const { kEnumerableProperty } = __nccwpck_require__(83983) + +class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) + cacheName = webidl.converters.DOMString(cacheName) -/***/ }), + // 2.1.1 + // 2.2 + return this.#caches.has(cacheName) + } -/***/ 73323: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) -"use strict"; + cacheName = webidl.converters.DOMString(cacheName) + // 2.1 + if (this.#caches.has(cacheName)) { + // await caches.open('v1') !== await caches.open('v1') -exports.URL = __nccwpck_require__(80653)["interface"]; -exports.serializeURL = __nccwpck_require__(40033).serializeURL; -exports.serializeURLOrigin = __nccwpck_require__(40033).serializeURLOrigin; -exports.basicURLParse = __nccwpck_require__(40033).basicURLParse; -exports.setTheUsername = __nccwpck_require__(40033).setTheUsername; -exports.setThePassword = __nccwpck_require__(40033).setThePassword; -exports.serializeHost = __nccwpck_require__(40033).serializeHost; -exports.serializeInteger = __nccwpck_require__(40033).serializeInteger; -exports.parseURL = __nccwpck_require__(40033).parseURL; + // 2.1.1 + const cache = this.#caches.get(cacheName) + // 2.1.1.1 + return new Cache(kConstruct, cache) + } -/***/ }), + // 2.2 + const cache = [] -/***/ 40033: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 2.3 + this.#caches.set(cacheName, cache) -"use strict"; + // 2.4 + return new Cache(kConstruct, cache) + } -const punycode = __nccwpck_require__(85477); -const tr46 = __nccwpck_require__(42299); + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) -const specialSchemes = { - ftp: 21, - file: null, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; + cacheName = webidl.converters.DOMString(cacheName) -const failure = Symbol("failure"); + return this.#caches.delete(cacheName) + } -function countSymbols(str) { - return punycode.ucs2.decode(str).length; -} + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {string[]} + */ + async keys () { + webidl.brandCheck(this, CacheStorage) -function at(input, idx) { - const c = input[idx]; - return isNaN(c) ? undefined : String.fromCodePoint(c); -} + // 2.1 + const keys = this.#caches.keys() -function isASCIIDigit(c) { - return c >= 0x30 && c <= 0x39; + // 2.2 + return [...keys] + } } -function isASCIIAlpha(c) { - return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); -} +Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: 'CacheStorage', + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) -function isASCIIAlphanumeric(c) { - return isASCIIAlpha(c) || isASCIIDigit(c); +module.exports = { + CacheStorage } -function isASCIIHex(c) { - return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); -} -function isSingleDot(buffer) { - return buffer === "." || buffer.toLowerCase() === "%2e"; -} +/***/ }), -function isDoubleDot(buffer) { - buffer = buffer.toLowerCase(); - return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; -} +/***/ 29174: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function isWindowsDriveLetterCodePoints(cp1, cp2) { - return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); -} +"use strict"; -function isWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); -} -function isNormalizedWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; +module.exports = { + kConstruct: (__nccwpck_require__(72785).kConstruct) } -function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; -} -function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; -} +/***/ }), -function isSpecialScheme(scheme) { - return specialSchemes[scheme] !== undefined; -} +/***/ 82396: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} +"use strict"; -function defaultPort(scheme) { - return specialSchemes[scheme]; -} -function percentEncode(c) { - let hex = c.toString(16).toUpperCase(); - if (hex.length === 1) { - hex = "0" + hex; - } +const assert = __nccwpck_require__(39491) +const { URLSerializer } = __nccwpck_require__(685) +const { isValidHeaderName } = __nccwpck_require__(52538) - return "%" + hex; -} +/** + * @see https://url.spec.whatwg.org/#concept-url-equals + * @param {URL} A + * @param {URL} B + * @param {boolean | undefined} excludeFragment + * @returns {boolean} + */ +function urlEquals (A, B, excludeFragment = false) { + const serializedA = URLSerializer(A, excludeFragment) -function utf8PercentEncode(c) { - const buf = new Buffer(c); + const serializedB = URLSerializer(B, excludeFragment) - let str = ""; + return serializedA === serializedB +} - for (let i = 0; i < buf.length; ++i) { - str += percentEncode(buf[i]); - } +/** + * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 + * @param {string} header + */ +function fieldValues (header) { + assert(header !== null) - return str; -} + const values = [] -function utf8PercentDecode(str) { - const input = new Buffer(str); - const output = []; - for (let i = 0; i < input.length; ++i) { - if (input[i] !== 37) { - output.push(input[i]); - } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { - output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); - i += 2; - } else { - output.push(input[i]); + for (let value of header.split(',')) { + value = value.trim() + + if (!value.length) { + continue + } else if (!isValidHeaderName(value)) { + continue } + + values.push(value) } - return new Buffer(output).toString(); -} -function isC0ControlPercentEncode(c) { - return c <= 0x1F || c > 0x7E; + return values } -const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); -function isPathPercentEncode(c) { - return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); +module.exports = { + urlEquals, + fieldValues } -const extraUserinfoPercentEncodeSet = - new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); -function isUserinfoPercentEncode(c) { - return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); -} -function percentEncodeChar(c, encodeSetPredicate) { - const cStr = String.fromCodePoint(c); +/***/ }), - if (encodeSetPredicate(c)) { - return utf8PercentEncode(cStr); - } +/***/ 33598: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return cStr; -} +"use strict"; +// @ts-check -function parseIPv4Number(input) { - let R = 10; - if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { - input = input.substring(2); - R = 16; - } else if (input.length >= 2 && input.charAt(0) === "0") { - input = input.substring(1); - R = 8; - } - if (input === "") { - return 0; - } +/* global WebAssembly */ - const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); - if (regex.test(input)) { - return failure; - } +const assert = __nccwpck_require__(39491) +const net = __nccwpck_require__(41808) +const http = __nccwpck_require__(13685) +const { pipeline } = __nccwpck_require__(12781) +const util = __nccwpck_require__(83983) +const timers = __nccwpck_require__(29459) +const Request = __nccwpck_require__(62905) +const DispatcherBase = __nccwpck_require__(74839) +const { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + InvalidArgumentError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError, + ClientDestroyedError +} = __nccwpck_require__(48045) +const buildConnector = __nccwpck_require__(82067) +const { + kUrl, + kReset, + kServerName, + kClient, + kBusy, + kParser, + kConnect, + kBlocking, + kResuming, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kHTTPConnVersion, + // HTTP2 + kHost, + kHTTP2Session, + kHTTP2SessionState, + kHTTP2BuildRequest, + kHTTP2CopyHeaders, + kHTTP1BuildRequest +} = __nccwpck_require__(72785) - return parseInt(input, R); +/** @type {import('http2')} */ +let http2 +try { + http2 = __nccwpck_require__(85158) +} catch { + // @ts-ignore + http2 = { constants: {} } } -function parseIPv4(input) { - const parts = input.split("."); - if (parts[parts.length - 1] === "") { - if (parts.length > 1) { - parts.pop(); - } +const { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS } +} = http2 - if (parts.length > 4) { - return input; - } +// Experimental +let h2ExperimentalWarned = false - const numbers = []; - for (const part of parts) { - if (part === "") { - return input; +const FastBuffer = Buffer[Symbol.species] + +const kClosedResolve = Symbol('kClosedResolve') + +const channels = {} + +try { + const diagnosticsChannel = __nccwpck_require__(67643) + channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') + channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') + channels.connectError = diagnosticsChannel.channel('undici:client:connectError') + channels.connected = diagnosticsChannel.channel('undici:client:connected') +} catch { + channels.sendHeaders = { hasSubscribers: false } + channels.beforeConnect = { hasSubscribers: false } + channels.connectError = { hasSubscribers: false } + channels.connected = { hasSubscribers: false } +} + +/** + * @type {import('../types/client').default} + */ +class Client extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../types/client').Client.Options} options + */ + constructor (url, { + interceptors, + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls, + strictContentLength, + maxCachedSessions, + maxRedirections, + connect, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + allowH2, + maxConcurrentStreams + } = {}) { + super() + + if (keepAlive !== undefined) { + throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') } - const n = parseIPv4Number(part); - if (n === failure) { - return input; + + if (socketTimeout !== undefined) { + throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') } - numbers.push(n); - } + if (requestTimeout !== undefined) { + throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') + } - for (let i = 0; i < numbers.length - 1; ++i) { - if (numbers[i] > 255) { - return failure; + if (idleTimeout !== undefined) { + throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') } - } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - return failure; - } - let ipv4 = numbers.pop(); - let counter = 0; + if (maxKeepAliveTimeout !== undefined) { + throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') + } - for (const n of numbers) { - ipv4 += n * Math.pow(256, 3 - counter); - ++counter; - } + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { + throw new InvalidArgumentError('invalid maxHeaderSize') + } - return ipv4; -} + if (socketPath != null && typeof socketPath !== 'string') { + throw new InvalidArgumentError('invalid socketPath') + } -function serializeIPv4(address) { - let output = ""; - let n = address; + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError('invalid connectTimeout') + } - for (let i = 1; i <= 4; ++i) { - output = String(n % 256) + output; - if (i !== 4) { - output = "." + output; + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError('invalid keepAliveTimeout') } - n = Math.floor(n / 256); - } - return output; -} + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError('invalid keepAliveMaxTimeout') + } -function parseIPv6(input) { - const address = [0, 0, 0, 0, 0, 0, 0, 0]; - let pieceIndex = 0; - let compress = null; - let pointer = 0; + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') + } - input = punycode.ucs2.decode(input); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') + } - if (input[pointer] === 58) { - if (input[pointer + 1] !== 58) { - return failure; + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') } - pointer += 2; - ++pieceIndex; - compress = pieceIndex; - } + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') + } - while (pointer < input.length) { - if (pieceIndex === 8) { - return failure; + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError('maxRedirections must be a positive number') } - if (input[pointer] === 58) { - if (compress !== null) { - return failure; - } - ++pointer; - ++pieceIndex; - compress = pieceIndex; - continue; + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') } - let value = 0; - let length = 0; + if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { + throw new InvalidArgumentError('localAddress must be valid string IP address') + } - while (length < 4 && isASCIIHex(input[pointer])) { - value = value * 0x10 + parseInt(at(input, pointer), 16); - ++pointer; - ++length; + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError('maxResponseSize must be a positive number') } - if (input[pointer] === 46) { - if (length === 0) { - return failure; - } + if ( + autoSelectFamilyAttemptTimeout != null && + (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) + ) { + throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') + } - pointer -= length; + // h2 + if (allowH2 != null && typeof allowH2 !== 'boolean') { + throw new InvalidArgumentError('allowH2 must be a valid boolean value') + } - if (pieceIndex > 6) { - return failure; - } + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') + } - let numbersSeen = 0; + if (typeof connect !== 'function') { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) + } - while (input[pointer] !== undefined) { - let ipv4Piece = null; + this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) + ? interceptors.Client + : [createRedirectInterceptor({ maxRedirections })] + this[kUrl] = util.parseOrigin(url) + this[kConnector] = connect + this[kSocket] = null + this[kPipelining] = pipelining != null ? pipelining : 1 + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] + this[kServerName] = null + this[kLocalAddress] = localAddress != null ? localAddress : null + this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength + this[kMaxRedirections] = maxRedirections + this[kMaxRequests] = maxRequestsPerClient + this[kClosedResolve] = null + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 + this[kHTTPConnVersion] = 'h1' - if (numbersSeen > 0) { - if (input[pointer] === 46 && numbersSeen < 4) { - ++pointer; - } else { - return failure; - } + // HTTP/2 + this[kHTTP2Session] = null + this[kHTTP2SessionState] = !allowH2 + ? null + : { + // streams: null, // Fixed queue of streams - For future support of `push` + openStreams: 0, // Keep track of them to decide wether or not unref the session + maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server } + this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` - if (!isASCIIDigit(input[pointer])) { - return failure; - } + // kQueue is built up of 3 sections separated by + // the kRunningIdx and kPendingIdx indices. + // | complete | running | pending | + // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length + // kRunningIdx points to the first running element. + // kPendingIdx points to the first pending element. + // This implements a fast queue with an amortized + // time of O(1). - while (isASCIIDigit(input[pointer])) { - const number = parseInt(at(input, pointer)); - if (ipv4Piece === null) { - ipv4Piece = number; - } else if (ipv4Piece === 0) { - return failure; - } else { - ipv4Piece = ipv4Piece * 10 + number; - } - if (ipv4Piece > 255) { - return failure; - } - ++pointer; - } + this[kQueue] = [] + this[kRunningIdx] = 0 + this[kPendingIdx] = 0 + } - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; + get pipelining () { + return this[kPipelining] + } - ++numbersSeen; + set pipelining (value) { + this[kPipelining] = value + resume(this, true) + } - if (numbersSeen === 2 || numbersSeen === 4) { - ++pieceIndex; - } - } + get [kPending] () { + return this[kQueue].length - this[kPendingIdx] + } - if (numbersSeen !== 4) { - return failure; - } + get [kRunning] () { + return this[kPendingIdx] - this[kRunningIdx] + } - break; - } else if (input[pointer] === 58) { - ++pointer; - if (input[pointer] === undefined) { - return failure; - } - } else if (input[pointer] !== undefined) { - return failure; - } + get [kSize] () { + return this[kQueue].length - this[kRunningIdx] + } - address[pieceIndex] = value; - ++pieceIndex; + get [kConnected] () { + return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed } - if (compress !== null) { - let swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; - address[pieceIndex] = temp; - --pieceIndex; - --swaps; - } - } else if (compress === null && pieceIndex !== 8) { - return failure; + get [kBusy] () { + const socket = this[kSocket] + return ( + (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) || + (this[kSize] >= (this[kPipelining] || 1)) || + this[kPending] > 0 + ) } - return address; -} + /* istanbul ignore: only used for test */ + [kConnect] (cb) { + connect(this) + this.once('connect', cb) + } -function serializeIPv6(address) { - let output = ""; - const seqResult = findLongestZeroSequence(address); - const compress = seqResult.idx; - let ignore0 = false; + [kDispatch] (opts, handler) { + const origin = opts.origin || this[kUrl].origin - for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { - if (ignore0 && address[pieceIndex] === 0) { - continue; - } else if (ignore0) { - ignore0 = false; + const request = this[kHTTPConnVersion] === 'h2' + ? Request[kHTTP2BuildRequest](origin, opts, handler) + : Request[kHTTP1BuildRequest](origin, opts, handler) + + this[kQueue].push(request) + if (this[kResuming]) { + // Do nothing. + } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + // Wait a tick in case stream/iterator is ended in the same tick. + this[kResuming] = 1 + process.nextTick(resume, this) + } else { + resume(this, true) } - if (compress === pieceIndex) { - const separator = pieceIndex === 0 ? "::" : ":"; - output += separator; - ignore0 = true; - continue; + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2 } - output += address[pieceIndex].toString(16); + return this[kNeedDrain] < 2 + } - if (pieceIndex !== 7) { - output += ":"; - } + async [kClose] () { + // TODO: for H2 we need to gracefully flush the remaining enqueued + // request and close each stream. + return new Promise((resolve) => { + if (!this[kSize]) { + resolve(null) + } else { + this[kClosedResolve] = resolve + } + }) } - return output; -} + async [kDestroy] (err) { + return new Promise((resolve) => { + const requests = this[kQueue].splice(this[kPendingIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) + } -function parseHost(input, isSpecialArg) { - if (input[0] === "[") { - if (input[input.length - 1] !== "]") { - return failure; - } + const callback = () => { + if (this[kClosedResolve]) { + // TODO (fix): Should we error here with ClientDestroyedError? + this[kClosedResolve]() + this[kClosedResolve] = null + } + resolve() + } - return parseIPv6(input.substring(1, input.length - 1)); - } + if (this[kHTTP2Session] != null) { + util.destroy(this[kHTTP2Session], err) + this[kHTTP2Session] = null + this[kHTTP2SessionState] = null + } - if (!isSpecialArg) { - return parseOpaqueHost(input); - } + if (!this[kSocket]) { + queueMicrotask(callback) + } else { + util.destroy(this[kSocket].on('close', callback), err) + } - const domain = utf8PercentDecode(input); - const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); - if (asciiDomain === null) { - return failure; + resume(this) + }) } +} - if (containsForbiddenHostCodePoint(asciiDomain)) { - return failure; - } +function onHttp2SessionError (err) { + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - const ipv4Host = parseIPv4(asciiDomain); - if (typeof ipv4Host === "number" || ipv4Host === failure) { - return ipv4Host; - } + this[kSocket][kError] = err - return asciiDomain; + onError(this[kClient], err) } -function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { - return failure; - } +function onHttp2FrameError (type, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - let output = ""; - const decoded = punycode.ucs2.decode(input); - for (let i = 0; i < decoded.length; ++i) { - output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + if (id === 0) { + this[kSocket][kError] = err + onError(this[kClient], err) } - return output; } -function findLongestZeroSequence(arr) { - let maxIdx = null; - let maxLen = 1; // only find elements > 1 - let currStart = null; - let currLen = 0; - - for (let i = 0; i < arr.length; ++i) { - if (arr[i] !== 0) { - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } +function onHttp2SessionEnd () { + util.destroy(this, new SocketError('other side closed')) + util.destroy(this[kSocket], new SocketError('other side closed')) +} - currStart = null; - currLen = 0; - } else { - if (currStart === null) { - currStart = i; - } - ++currLen; - } - } +function onHTTP2GoAway (code) { + const client = this[kClient] + const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) + client[kSocket] = null + client[kHTTP2Session] = null - // if trailing zeros - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } + if (client.destroyed) { + assert(this[kPending] === 0) - return { - idx: maxIdx, - len: maxLen - }; -} + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) + } + } else if (client[kRunning] > 0) { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null -function serializeHost(host) { - if (typeof host === "number") { - return serializeIPv4(host); + errorRequest(client, request, err) } - // IPv6 serializer - if (host instanceof Array) { - return "[" + serializeIPv6(host) + "]"; - } + client[kPendingIdx] = client[kRunningIdx] - return host; -} + assert(client[kRunning] === 0) -function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); -} + client.emit('disconnect', + client[kUrl], + [client], + err + ) -function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); + resume(client) } -function shortenPath(url) { - const path = url.path; - if (path.length === 0) { - return; - } - if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { - return; - } +const constants = __nccwpck_require__(30953) +const createRedirectInterceptor = __nccwpck_require__(38861) +const EMPTY_BUF = Buffer.alloc(0) - path.pop(); -} +async function lazyllhttp () { + const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(61145) : undefined -function includesCredentials(url) { - return url.username !== "" || url.password !== ""; -} + let mod + try { + mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(95627), 'base64')) + } catch (e) { + /* istanbul ignore next */ -function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; -} + // We could check if the error was caused by the simd option not + // being enabled, but the occurring of this other error + // * https://github.com/emscripten-core/emscripten/issues/11495 + // got me to remove that check to avoid breaking Node 12. + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(61145), 'base64')) + } -function isNormalizedWindowsDriveLetter(string) { - return /^[A-Za-z]:$/.test(string); -} + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ -function URLStateMachine(input, base, encodingOverride, url, stateOverride) { - this.pointer = 0; - this.input = input; - this.base = base || null; - this.encodingOverride = encodingOverride || "utf-8"; - this.stateOverride = stateOverride; - this.url = url; - this.failure = false; - this.parseError = false; + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0 + }, + wasm_on_status: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_message_begin: (p) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onMessageBegin() || 0 + }, + wasm_on_header_field: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_header_value: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 + }, + wasm_on_body: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p) + const start = at - currentBufferPtr + currentBufferRef.byteOffset + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 + }, + wasm_on_message_complete: (p) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onMessageComplete() || 0 + } - if (!this.url) { - this.url = { - scheme: "", - username: "", - password: "", - host: null, - port: null, - path: [], - query: null, - fragment: null, + /* eslint-enable camelcase */ + } + }) +} - cannotBeABaseURL: false - }; +let llhttpInstance = null +let llhttpPromise = lazyllhttp() +llhttpPromise.catch() - const res = trimControlChars(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - } +let currentParser = null +let currentBufferRef = null +let currentBufferSize = 0 +let currentBufferPtr = null - const res = trimTabAndNewline(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; +const TIMEOUT_HEADERS = 1 +const TIMEOUT_BODY = 2 +const TIMEOUT_IDLE = 3 - this.state = stateOverride || "scheme start"; +class Parser { + constructor (client, socket, { exports }) { + assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - this.buffer = ""; - this.atFlag = false; - this.arrFlag = false; - this.passwordTokenSeenFlag = false; + this.llhttp = exports + this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) + this.client = client + this.socket = socket + this.timeout = null + this.timeoutValue = null + this.timeoutType = null + this.statusCode = null + this.statusText = '' + this.upgrade = false + this.headers = [] + this.headersSize = 0 + this.headersMaxSize = client[kMaxHeadersSize] + this.shouldKeepAlive = false + this.paused = false + this.resume = this.resume.bind(this) - this.input = punycode.ucs2.decode(this.input); + this.bytesRead = 0 - for (; this.pointer <= this.input.length; ++this.pointer) { - const c = this.input[this.pointer]; - const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); + this.keepAlive = '' + this.contentLength = '' + this.connection = '' + this.maxResponseSize = client[kMaxResponseSize] + } - // exec state machine - const ret = this["parse " + this.state](c, cStr); - if (!ret) { - break; // terminate algorithm - } else if (ret === failure) { - this.failure = true; - break; + setTimeout (value, type) { + this.timeoutType = type + if (value !== this.timeoutValue) { + timers.clearTimeout(this.timeout) + if (value) { + this.timeout = timers.setTimeout(onParserTimeout, value, this) + // istanbul ignore else: only for jest + if (this.timeout.unref) { + this.timeout.unref() + } + } else { + this.timeout = null + } + this.timeoutValue = value + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } } } -} -URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { - if (isASCIIAlpha(c)) { - this.buffer += cStr.toLowerCase(); - this.state = "scheme"; - } else if (!this.stateOverride) { - this.state = "no scheme"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } + resume () { + if (this.socket.destroyed || !this.paused) { + return + } - return true; -}; + assert(this.ptr != null) + assert(currentParser == null) -URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { - if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { - this.buffer += cStr.toLowerCase(); - } else if (c === 58) { - if (this.stateOverride) { - if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { - return false; - } + this.llhttp.llhttp_resume(this.ptr) - if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { - return false; + assert(this.timeoutType === TIMEOUT_BODY) + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() } + } - if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { - return false; - } + this.paused = false + this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. + this.readMore() + } - if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { - return false; - } - } - this.url.scheme = this.buffer; - this.buffer = ""; - if (this.stateOverride) { - return false; - } - if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { - this.parseError = true; + readMore () { + while (!this.paused && this.ptr) { + const chunk = this.socket.read() + if (chunk === null) { + break } - this.state = "file"; - } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { - this.state = "special relative or authority"; - } else if (isSpecial(this.url)) { - this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === 47) { - this.state = "path or authority"; - ++this.pointer; - } else { - this.url.cannotBeABaseURL = true; - this.url.path.push(""); - this.state = "cannot-be-a-base-URL path"; + this.execute(chunk) } - } else if (!this.stateOverride) { - this.buffer = ""; - this.state = "no scheme"; - this.pointer = -1; - } else { - this.parseError = true; - return failure; } - return true; -}; - -URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { - if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { - return failure; - } else if (this.base.cannotBeABaseURL && c === 35) { - this.url.scheme = this.base.scheme; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.url.cannotBeABaseURL = true; - this.state = "fragment"; - } else if (this.base.scheme === "file") { - this.state = "file"; - --this.pointer; - } else { - this.state = "relative"; - --this.pointer; - } + execute (data) { + assert(this.ptr != null) + assert(currentParser == null) + assert(!this.paused) - return true; -}; + const { socket, llhttp } = this -URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "relative"; - --this.pointer; - } + if (data.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr) + } + currentBufferSize = Math.ceil(data.length / 4096) * 4096 + currentBufferPtr = llhttp.malloc(currentBufferSize) + } - return true; -}; + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) -URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { - if (c === 47) { - this.state = "authority"; - } else { - this.state = "path"; - --this.pointer; - } + // Call `execute` on the wasm parser. + // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, + // and finally the length of bytes to parse. + // The return value is an error code or `constants.ERROR.OK`. + try { + let ret - return true; -}; + try { + currentBufferRef = data + currentParser = this + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) + /* eslint-disable-next-line no-useless-catch */ + } catch (err) { + /* istanbul ignore next: difficult to make a test case for */ + throw err + } finally { + currentParser = null + currentBufferRef = null + } -URLStateMachine.prototype["parse relative"] = function parseRelative(c) { - this.url.scheme = this.base.scheme; - if (isNaN(c)) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 47) { - this.state = "relative slash"; - } else if (c === 63) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else if (isSpecial(this.url) && c === 92) { - this.parseError = true; - this.state = "relative slash"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(0, this.base.path.length - 1); + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - this.state = "path"; - --this.pointer; + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data.slice(offset)) + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true + socket.unshift(data.slice(offset)) + } else if (ret !== constants.ERROR.OK) { + const ptr = llhttp.llhttp_get_error_reason(this.ptr) + let message = '' + /* istanbul ignore else: difficult to make a test case for */ + if (ptr) { + const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) + message = + 'Response does not match the HTTP/1.1 protocol (' + + Buffer.from(llhttp.memory.buffer, ptr, len).toString() + + ')' + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) + } + } catch (err) { + util.destroy(socket, err) + } } - return true; -}; + destroy () { + assert(this.ptr != null) + assert(currentParser == null) -URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { - if (isSpecial(this.url) && (c === 47 || c === 92)) { - if (c === 92) { - this.parseError = true; - } - this.state = "special authority ignore slashes"; - } else if (c === 47) { - this.state = "authority"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.state = "path"; - --this.pointer; - } + this.llhttp.llhttp_free(this.ptr) + this.ptr = null - return true; -}; + timers.clearTimeout(this.timeout) + this.timeout = null + this.timeoutValue = null + this.timeoutType = null -URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "special authority ignore slashes"; - --this.pointer; + this.paused = false } - return true; -}; - -URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { - if (c !== 47 && c !== 92) { - this.state = "authority"; - --this.pointer; - } else { - this.parseError = true; + onStatus (buf) { + this.statusText = buf.toString() } - return true; -}; + onMessageBegin () { + const { socket, client } = this -URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { - if (c === 64) { - this.parseError = true; - if (this.atFlag) { - this.buffer = "%40" + this.buffer; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) { + return -1 } - this.atFlag = true; - - // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars - const len = countSymbols(this.buffer); - for (let pointer = 0; pointer < len; ++pointer) { - const codePoint = this.buffer.codePointAt(pointer); - if (codePoint === 58 && !this.passwordTokenSeenFlag) { - this.passwordTokenSeenFlag = true; - continue; - } - const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); - if (this.passwordTokenSeenFlag) { - this.url.password += encodedCodePoints; - } else { - this.url.username += encodedCodePoints; - } - } - this.buffer = ""; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - if (this.atFlag && this.buffer === "") { - this.parseError = true; - return failure; + const request = client[kQueue][client[kRunningIdx]] + if (!request) { + return -1 } - this.pointer -= countSymbols(this.buffer) + 1; - this.buffer = ""; - this.state = "host"; - } else { - this.buffer += cStr; } - return true; -}; + onHeaderField (buf) { + const len = this.headers.length -URLStateMachine.prototype["parse hostname"] = -URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { - if (this.stateOverride && this.url.scheme === "file") { - --this.pointer; - this.state = "file host"; - } else if (c === 58 && !this.arrFlag) { - if (this.buffer === "") { - this.parseError = true; - return failure; + if ((len & 1) === 0) { + this.headers.push(buf) + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) } - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } + this.trackHeader(buf.length) + } - this.url.host = host; - this.buffer = ""; - this.state = "port"; - if (this.stateOverride === "hostname") { - return false; - } - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - --this.pointer; - if (isSpecial(this.url) && this.buffer === "") { - this.parseError = true; - return failure; - } else if (this.stateOverride && this.buffer === "" && - (includesCredentials(this.url) || this.url.port !== null)) { - this.parseError = true; - return false; - } + onHeaderValue (buf) { + let len = this.headers.length - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; + if ((len & 1) === 1) { + this.headers.push(buf) + len += 1 + } else { + this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) } - this.url.host = host; - this.buffer = ""; - this.state = "path start"; - if (this.stateOverride) { - return false; - } - } else { - if (c === 91) { - this.arrFlag = true; - } else if (c === 93) { - this.arrFlag = false; + const key = this.headers[len - 2] + if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') { + this.keepAlive += buf.toString() + } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') { + this.connection += buf.toString() + } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') { + this.contentLength += buf.toString() } - this.buffer += cStr; - } - return true; -}; + this.trackHeader(buf.length) + } -URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { - if (isASCIIDigit(c)) { - this.buffer += cStr; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92) || - this.stateOverride) { - if (this.buffer !== "") { - const port = parseInt(this.buffer); - if (port > Math.pow(2, 16) - 1) { - this.parseError = true; - return failure; - } - this.url.port = port === defaultPort(this.url.scheme) ? null : port; - this.buffer = ""; - } - if (this.stateOverride) { - return false; + trackHeader (len) { + this.headersSize += len + if (this.headersSize >= this.headersMaxSize) { + util.destroy(this.socket, new HeadersOverflowError()) } - this.state = "path start"; - --this.pointer; - } else { - this.parseError = true; - return failure; } - return true; -}; + onUpgrade (head) { + const { upgrade, client, socket, headers, statusCode } = this -const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); + assert(upgrade) -URLStateMachine.prototype["parse file"] = function parseFile(c) { - this.url.scheme = "file"; + const request = client[kQueue][client[kRunningIdx]] + assert(request) - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file slash"; - } else if (this.base !== null && this.base.scheme === "file") { - if (isNaN(c)) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 63) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else { - if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points - !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || - (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points - !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - shortenPath(this.url); - } else { - this.parseError = true; - } + assert(!socket.destroyed) + assert(socket === client[kSocket]) + assert(!this.paused) + assert(request.upgrade || request.method === 'CONNECT') - this.state = "path"; - --this.pointer; - } - } else { - this.state = "path"; - --this.pointer; - } + this.statusCode = null + this.statusText = '' + this.shouldKeepAlive = null - return true; -}; + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 -URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file host"; - } else { - if (this.base !== null && this.base.scheme === "file") { - if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { - this.url.path.push(this.base.path[0]); - } else { - this.url.host = this.base.host; - } - } - this.state = "path"; - --this.pointer; - } + socket.unshift(head) - return true; -}; + socket[kParser].destroy() + socket[kParser] = null -URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { - if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { - --this.pointer; - if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { - this.parseError = true; - this.state = "path"; - } else if (this.buffer === "") { - this.url.host = ""; - if (this.stateOverride) { - return false; - } - this.state = "path start"; - } else { - let host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - if (host === "localhost") { - host = ""; - } - this.url.host = host; + socket[kClient] = null + socket[kError] = null + socket + .removeListener('error', onSocketError) + .removeListener('readable', onSocketReadable) + .removeListener('end', onSocketEnd) + .removeListener('close', onSocketClose) - if (this.stateOverride) { - return false; - } + client[kSocket] = null + client[kQueue][client[kRunningIdx]++] = null + client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - this.buffer = ""; - this.state = "path start"; + try { + request.onUpgrade(statusCode, headers, socket) + } catch (err) { + util.destroy(socket, err) } - } else { - this.buffer += cStr; - } - return true; -}; + resume(client) + } -URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { - if (isSpecial(this.url)) { - if (c === 92) { - this.parseError = true; - } - this.state = "path"; + onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this - if (c !== 47 && c !== 92) { - --this.pointer; - } - } else if (!this.stateOverride && c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (!this.stateOverride && c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else if (c !== undefined) { - this.state = "path"; - if (c !== 47) { - --this.pointer; + /* istanbul ignore next: difficult to make a test case for */ + if (socket.destroyed) { + return -1 } - } - return true; -}; + const request = client[kQueue][client[kRunningIdx]] -URLStateMachine.prototype["parse path"] = function parsePath(c) { - if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || - (!this.stateOverride && (c === 63 || c === 35))) { - if (isSpecial(this.url) && c === 92) { - this.parseError = true; + /* istanbul ignore next: difficult to make a test case for */ + if (!request) { + return -1 } - if (isDoubleDot(this.buffer)) { - shortenPath(this.url); - if (c !== 47 && !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } - } else if (isSingleDot(this.buffer) && c !== 47 && - !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } else if (!isSingleDot(this.buffer)) { - if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { - if (this.url.host !== "" && this.url.host !== null) { - this.parseError = true; - this.url.host = ""; - } - this.buffer = this.buffer[0] + ":"; - } - this.url.path.push(this.buffer); - } - this.buffer = ""; - if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { - while (this.url.path.length > 1 && this.url.path[0] === "") { - this.parseError = true; - this.url.path.shift(); - } - } - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; + assert(!this.upgrade) + assert(this.statusCode < 200) + + if (statusCode === 100) { + util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) + return -1 } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; + /* this can only happen if server is misbehaving */ + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) + return -1 } - this.buffer += percentEncodeChar(c, isPathPercentEncode); - } + assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) - return true; -}; + this.statusCode = statusCode + this.shouldKeepAlive = ( + shouldKeepAlive || + // Override llhttp value which does not allow keepAlive for HEAD. + (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') + ) -URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else { - // TODO: Add: not a URL code point - if (!isNaN(c) && c !== 37) { - this.parseError = true; + if (this.statusCode >= 200) { + const bodyTimeout = request.bodyTimeout != null + ? request.bodyTimeout + : client[kBodyTimeout] + this.setTimeout(bodyTimeout, TIMEOUT_BODY) + } else if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } } - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; + if (request.method === 'CONNECT') { + assert(client[kRunning] === 1) + this.upgrade = true + return 2 } - if (!isNaN(c)) { - this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); + if (upgrade) { + assert(client[kRunning] === 1) + this.upgrade = true + return 2 } - } - return true; -}; + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 -URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { - if (isNaN(c) || (!this.stateOverride && c === 35)) { - if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { - this.encodingOverride = "utf-8"; - } + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || - buffer[i] === 0x3C || buffer[i] === 0x3E) { - this.url.query += percentEncode(buffer[i]); + if (keepAliveTimeout != null) { + const timeout = Math.min( + keepAliveTimeout - client[kKeepAliveTimeoutThreshold], + client[kKeepAliveMaxTimeout] + ) + if (timeout <= 0) { + socket[kReset] = true + } else { + client[kKeepAliveTimeoutValue] = timeout + } } else { - this.url.query += String.fromCodePoint(buffer[i]); + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] } + } else { + // Stop more requests from being dispatched. + socket[kReset] = true } - this.buffer = ""; - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false + + if (request.aborted) { + return -1 } - this.buffer += cStr; - } + if (request.method === 'HEAD') { + return 1 + } - return true; -}; + if (statusCode < 200) { + return 1 + } -URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; + if (socket[kBlocking]) { + socket[kBlocking] = false + resume(client) } - this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); + return pause ? constants.ERROR.PAUSED : 0 } - return true; -}; + onBody (buf) { + const { client, socket, statusCode, maxResponseSize } = this -function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { - output += "//"; + if (socket.destroyed) { + return -1 + } - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; + const request = client[kQueue][client[kRunningIdx]] + assert(request) + + assert.strictEqual(this.timeoutType, TIMEOUT_BODY) + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() } - output += "@"; } - output += serializeHost(url.host); + assert(statusCode >= 200) - if (url.port !== null) { - output += ":" + url.port; + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util.destroy(socket, new ResponseExceededMaxSizeError()) + return -1 } - } else if (url.host === null && url.scheme === "file") { - output += "//"; - } - if (url.cannotBeABaseURL) { - output += url.path[0]; - } else { - for (const string of url.path) { - output += "/" + string; + this.bytesRead += buf.length + + if (request.onData(buf) === false) { + return constants.ERROR.PAUSED } } - if (url.query !== null) { - output += "?" + url.query; - } + onMessageComplete () { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; - } + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1 + } - return output; -} + if (upgrade) { + return + } -function serializeOrigin(tuple) { - let result = tuple.scheme + "://"; - result += serializeHost(tuple.host); + const request = client[kQueue][client[kRunningIdx]] + assert(request) - if (tuple.port !== null) { - result += ":" + tuple.port; - } + assert(statusCode >= 100) - return result; -} + this.statusCode = null + this.statusText = '' + this.bytesRead = 0 + this.contentLength = '' + this.keepAlive = '' + this.connection = '' -module.exports.serializeURL = serializeURL; + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 -module.exports.serializeURLOrigin = function (url) { - // https://url.spec.whatwg.org/#concept-url-origin - switch (url.scheme) { - case "blob": - try { - return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); - } catch (e) { - // serializing an opaque origin returns "null" - return "null"; - } - case "ftp": - case "gopher": - case "http": - case "https": - case "ws": - case "wss": - return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port - }); - case "file": - // spec says "exercise to the reader", chrome says "file://" - return "file://"; - default: - // serializing an opaque origin returns "null" - return "null"; - } -}; + if (statusCode < 200) { + return + } -module.exports.basicURLParse = function (input, options) { - if (options === undefined) { - options = {}; - } + /* istanbul ignore next: should be handled by llhttp? */ + if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util.destroy(socket, new ResponseContentLengthMismatchError()) + return -1 + } - const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); - if (usm.failure) { - return "failure"; - } + request.onComplete(headers) - return usm.url; -}; + client[kQueue][client[kRunningIdx]++] = null -module.exports.setTheUsername = function (url, username) { - url.username = ""; - const decoded = punycode.ucs2.decode(username); - for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + if (socket[kWriting]) { + assert.strictEqual(client[kRunning], 0) + // Response completed before request. + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (!shouldKeepAlive) { + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (socket[kReset] && client[kRunning] === 0) { + // Destroy socket once all requests have completed. + // The request at the tail of the pipeline is the one + // that requested reset and no further requests should + // have been queued since then. + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (client[kPipelining] === 1) { + // We must wait a full event loop cycle to reuse this socket to make sure + // that non-spec compliant servers are not closing the connection even if they + // said they won't. + setImmediate(resume, client) + } else { + resume(client) + } } -}; +} -module.exports.setThePassword = function (url, password) { - url.password = ""; - const decoded = punycode.ucs2.decode(password); - for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); +function onParserTimeout (parser) { + const { socket, timeoutType, client } = parser + + /* istanbul ignore else */ + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert(!parser.paused, 'cannot be paused while waiting for headers') + util.destroy(socket, new HeadersTimeoutError()) + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!parser.paused) { + util.destroy(socket, new BodyTimeoutError()) + } + } else if (timeoutType === TIMEOUT_IDLE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) + util.destroy(socket, new InformationalError('socket idle timeout')) } -}; +} -module.exports.serializeHost = serializeHost; +function onSocketReadable () { + const { [kParser]: parser } = this + if (parser) { + parser.readMore() + } +} -module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; +function onSocketError (err) { + const { [kClient]: client, [kParser]: parser } = this -module.exports.serializeInteger = function (integer) { - return String(integer); -}; + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') -module.exports.parseURL = function (input, options) { - if (options === undefined) { - options = {}; + if (client[kHTTPConnVersion] !== 'h2') { + // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded + // to the user. + if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so for as a valid response. + parser.onMessageComplete() + return + } } - // We don't handle blobs, so this just delegates: - return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); -}; - - -/***/ }), + this[kError] = err -/***/ 60276: -/***/ ((module) => { + onError(this[kClient], err) +} -"use strict"; +function onError (client, err) { + if ( + client[kRunning] === 0 && + err.code !== 'UND_ERR_INFO' && + err.code !== 'UND_ERR_SOCKET' + ) { + // Error is not caused by running request and not a recoverable + // socket error. + assert(client[kPendingIdx] === client[kRunningIdx]) -module.exports.mixin = function mixin(target, source) { - const keys = Object.getOwnPropertyNames(source); - for (let i = 0; i < keys.length; ++i) { - Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + assert(client[kSize] === 0) } -}; +} -module.exports.wrapperSymbol = Symbol("wrapper"); -module.exports.implSymbol = Symbol("impl"); +function onSocketEnd () { + const { [kParser]: parser, [kClient]: client } = this -module.exports.wrapperForImpl = function (impl) { - return impl[module.exports.wrapperSymbol]; -}; + if (client[kHTTPConnVersion] !== 'h2') { + if (parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + return + } + } -module.exports.implForWrapper = function (wrapper) { - return wrapper[module.exports.implSymbol]; -}; + util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) +} +function onSocketClose () { + const { [kClient]: client, [kParser]: parser } = this + if (client[kHTTPConnVersion] === 'h1' && parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + } -/***/ }), + this[kParser].destroy() + this[kParser] = null + } -/***/ 1223: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) -var wrappy = __nccwpck_require__(62940) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) + client[kSocket] = null -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) + if (client.destroyed) { + assert(client[kPending] === 0) - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) + errorRequest(client, request, err) } - f.called = false - return f -} -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} + client[kPendingIdx] = client[kRunningIdx] + assert(client[kRunning] === 0) -/***/ }), + client.emit('disconnect', client[kUrl], [client], err) -/***/ 57684: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + resume(client) +} -"use strict"; +async function connect (client) { + assert(!client[kConnecting]) + assert(!client[kSocket]) -const Queue = __nccwpck_require__(15185); + let { host, hostname, protocol, port } = client[kUrl] -const pLimit = concurrency => { - if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { - throw new TypeError('Expected `concurrency` to be a number from 1 and up'); - } + // Resolve ipv6 + if (hostname[0] === '[') { + const idx = hostname.indexOf(']') - const queue = new Queue(); - let activeCount = 0; + assert(idx !== -1) + const ip = hostname.substring(1, idx) - const next = () => { - activeCount--; + assert(net.isIP(ip)) + hostname = ip + } - if (queue.size > 0) { - queue.dequeue()(); - } - }; + client[kConnecting] = true - const run = async (fn, resolve, ...args) => { - activeCount++; + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }) + } - const result = (async () => fn(...args))(); + try { + const socket = await new Promise((resolve, reject) => { + client[kConnector]({ + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket) => { + if (err) { + reject(err) + } else { + resolve(socket) + } + }) + }) - resolve(result); + if (client.destroyed) { + util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) + return + } - try { - await result; - } catch {} + client[kConnecting] = false - next(); - }; + assert(socket) - const enqueue = (fn, resolve, ...args) => { - queue.enqueue(run.bind(null, fn, resolve, ...args)); + const isH2 = socket.alpnProtocol === 'h2' + if (isH2) { + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true + process.emitWarning('H2 support is experimental, expect them to change at any time.', { + code: 'UNDICI-H2' + }) + } - (async () => { - // This function needs to wait until the next microtask before comparing - // `activeCount` to `concurrency`, because `activeCount` is updated asynchronously - // when the run function is dequeued and called. The comparison in the if-statement - // needs to happen asynchronously as well to get an up-to-date value for `activeCount`. - await Promise.resolve(); + const session = http2.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams + }) - if (activeCount < concurrency && queue.size > 0) { - queue.dequeue()(); - } - })(); - }; + client[kHTTPConnVersion] = 'h2' + session[kClient] = client + session[kSocket] = socket + session.on('error', onHttp2SessionError) + session.on('frameError', onHttp2FrameError) + session.on('end', onHttp2SessionEnd) + session.on('goaway', onHTTP2GoAway) + session.on('close', onSocketClose) + session.unref() - const generator = (fn, ...args) => new Promise(resolve => { - enqueue(fn, resolve, ...args); - }); + client[kHTTP2Session] = session + socket[kHTTP2Session] = session + } else { + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise + llhttpPromise = null + } - Object.defineProperties(generator, { - activeCount: { - get: () => activeCount - }, - pendingCount: { - get: () => queue.size - }, - clearQueue: { - value: () => { - queue.clear(); - } - } - }); + socket[kNoRef] = false + socket[kWriting] = false + socket[kReset] = false + socket[kBlocking] = false + socket[kParser] = new Parser(client, socket, llhttpInstance) + } - return generator; -}; + socket[kCounter] = 0 + socket[kMaxRequests] = client[kMaxRequests] + socket[kClient] = client + socket[kError] = null -module.exports = pLimit; + socket + .on('error', onSocketError) + .on('readable', onSocketReadable) + .on('end', onSocketEnd) + .on('close', onSocketClose) + client[kSocket] = socket -/***/ }), + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }) + } + client.emit('connect', client[kUrl], [client]) + } catch (err) { + if (client.destroyed) { + return + } -/***/ 63329: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + client[kConnecting] = false -"use strict"; + if (channels.connectError.hasSubscribers) { + channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }) + } + if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { + assert(client[kRunning] === 0) + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++] + errorRequest(client, request, err) + } + } else { + onError(client, err) + } -var parseUrl = (__nccwpck_require__(57310).parse); + client.emit('connectionError', client[kUrl], [client], err) + } -var DEFAULT_PORTS = { - ftp: 21, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443, -}; + resume(client) +} -var stringEndsWith = String.prototype.endsWith || function(s) { - return s.length <= this.length && - this.indexOf(s, this.length - s.length) !== -1; -}; +function emitDrain (client) { + client[kNeedDrain] = 0 + client.emit('drain', client[kUrl], [client]) +} -/** - * @param {string|object} url - The URL, or the result from url.parse. - * @return {string} The URL of the proxy that should handle the request to the - * given URL. If no proxy is set, this will be an empty string. - */ -function getProxyForUrl(url) { - var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; - var proto = parsedUrl.protocol; - var hostname = parsedUrl.host; - var port = parsedUrl.port; - if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { - return ''; // Don't proxy URLs without a valid scheme or host. +function resume (client, sync) { + if (client[kResuming] === 2) { + return } - proto = proto.split(':', 1)[0]; - // Stripping ports in this way instead of using parsedUrl.hostname to make - // sure that the brackets around IPv6 addresses are kept. - hostname = hostname.replace(/:\d*$/, ''); - port = parseInt(port) || DEFAULT_PORTS[proto] || 0; - if (!shouldProxy(hostname, port)) { - return ''; // Don't proxy URLs that match NO_PROXY. - } + client[kResuming] = 2 - var proxy = - getEnv('npm_config_' + proto + '_proxy') || - getEnv(proto + '_proxy') || - getEnv('npm_config_proxy') || - getEnv('all_proxy'); - if (proxy && proxy.indexOf('://') === -1) { - // Missing scheme in proxy, default to the requested URL's scheme. - proxy = proto + '://' + proxy; - } - return proxy; -} + _resume(client, sync) + client[kResuming] = 0 -/** - * Determines whether a given URL should be proxied. - * - * @param {string} hostname - The host name of the URL. - * @param {number} port - The effective port of the URL. - * @returns {boolean} Whether the given URL should be proxied. - * @private - */ -function shouldProxy(hostname, port) { - var NO_PROXY = - (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); - if (!NO_PROXY) { - return true; // Always proxy if NO_PROXY is not set. - } - if (NO_PROXY === '*') { - return false; // Never proxy if wildcard is set. + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]) + client[kPendingIdx] -= client[kRunningIdx] + client[kRunningIdx] = 0 } +} - return NO_PROXY.split(/[,\s]/).every(function(proxy) { - if (!proxy) { - return true; // Skip zero-length hosts. +function _resume (client, sync) { + while (true) { + if (client.destroyed) { + assert(client[kPending] === 0) + return } - var parsedProxy = proxy.match(/^(.+):(\d+)$/); - var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; - var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; - if (parsedProxyPort && parsedProxyPort !== port) { - return true; // Skip if ports don't match. + + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve]() + client[kClosedResolve] = null + return } - if (!/^[.*]/.test(parsedProxyHostname)) { - // No wildcards, so stop proxying if there is an exact match. - return hostname !== parsedProxyHostname; + const socket = client[kSocket] + + if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref() + socket[kNoRef] = true + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref() + socket[kNoRef] = false + } + + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE) + } + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request = client[kQueue][client[kRunningIdx]] + const headersTimeout = request.headersTimeout != null + ? request.headersTimeout + : client[kHeadersTimeout] + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) + } + } } - if (parsedProxyHostname.charAt(0) === '*') { - // Remove leading wildcard. - parsedProxyHostname = parsedProxyHostname.slice(1); + if (client[kBusy]) { + client[kNeedDrain] = 2 + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1 + process.nextTick(emitDrain, client) + } else { + emitDrain(client) + } + continue } - // Stop proxying if the hostname ends with the no_proxy host. - return !stringEndsWith.call(hostname, parsedProxyHostname); - }); -} -/** - * Get the value for an environment variable. - * - * @param {string} key - The name of the environment variable. - * @return {string} The value of the environment variable. - * @private - */ -function getEnv(key) { - return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; -} + if (client[kPending] === 0) { + return + } -exports.getProxyForUrl = getProxyForUrl; + if (client[kRunning] >= (client[kPipelining] || 1)) { + return + } + const request = client[kQueue][client[kPendingIdx]] -/***/ }), + if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { + if (client[kRunning] > 0) { + return + } -/***/ 67214: -/***/ ((module) => { + client[kServerName] = request.servername -"use strict"; + if (socket && socket.servername !== request.servername) { + util.destroy(socket, new InformationalError('servername changed')) + return + } + } + if (client[kConnecting]) { + return + } -const codes = {}; + if (!socket && !client[kHTTP2Session]) { + connect(client) + return + } -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error - } + if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return + } - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) + if (client[kRunning] > 0 && !request.idempotent) { + // Non-idempotent request cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return } - } - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); + if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { + // Don't dispatch an upgrade until all preceding requests have completed. + // A misbehaving server might upgrade the connection before all pipelined + // request has completed. + return } - } - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && + (util.isStream(request.body) || util.isAsyncIterable(request.body))) { + // Request with stream or iterator body can error while other requests + // are inflight and indirectly error those as well. + // Ensure this doesn't happen by waiting for inflight + // to complete before dispatching. - codes[code] = NodeError; -} + // Request with stream or iterator body cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return + } -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; + if (!request.aborted && write(client, request)) { + client[kPendingIdx]++ } else { - return `of ${thing} ${expected[0]}`; + client[kQueue].splice(client[kPendingIdx], 1) } - } else { - return `of ${thing} ${String(expected)}`; } } -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function shouldSendContentLength (method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' } -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; -} +function write (client, request) { + if (client[kHTTPConnVersion] === 'h2') { + writeH2(client, client[kHTTP2Session], request) + return + } -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; + const { body, method, path, host, upgrade, headers, blocking, reset } = request + + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) + + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) } - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; + const bodyLength = util.bodyLength(body) + + let contentLength = bodyLength + + if (contentLength === null) { + contentLength = request.contentLength } -} -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; + if (contentLength === 0 && !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null } - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false + } + + process.emitWarning(new RequestContentLengthMismatchError()) } - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); + const socket = client[kSocket] -module.exports.q = codes; + try { + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } + errorRequest(client, request, err || new RequestAbortedError()) -/***/ }), + util.destroy(socket, new InformationalError('aborted')) + }) + } catch (err) { + errorRequest(client, request, err) + } -/***/ 41359: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (request.aborted) { + return false + } -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + if (method === 'HEAD') { + // https://github.com/mcollina/undici/issues/258 + // Close after a HEAD request to interop with misbehaving servers + // that may send a body in the response. -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. + socket[kReset] = true + } + if (upgrade || method === 'CONNECT') { + // On CONNECT or upgrade, block pipeline from dispatching further + // requests on this connection. + socket[kReset] = true + } -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; -/**/ + if (reset != null) { + socket[kReset] = reset + } -module.exports = Duplex; -var Readable = __nccwpck_require__(51433); -var Writable = __nccwpck_require__(32094); -__nccwpck_require__(44124)(Duplex, Readable); -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true } -} -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } + + if (blocking) { + socket[kBlocking] = true } -} -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; + + let header = `${method} ${path} HTTP/1.1\r\n` + + if (typeof host === 'string') { + header += `host: ${host}\r\n` + } else { + header += client[kHostHeader] } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); + + if (upgrade) { + header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` + } else if (client[kPipelining] && !socket[kReset]) { + header += 'connection: keep-alive\r\n' + } else { + header += 'connection: close\r\n' } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; + + if (headers) { + header += headers } -}); -// the no-half-open enforcer -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }) + } - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(onEndNT, this); -} -function onEndNT(self) { - self.end(); -} -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') + } else { + assert(contentLength === null, 'no body must not have content length') + socket.write(`${header}\r\n`, 'latin1') } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') + + socket.cork() + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + socket.write(body) + socket.uncork() + request.onBodySent(body) + request.onRequestSent() + if (!expectsPayload) { + socket[kReset] = true + } + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) + } else { + writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }) } + } else if (util.isStream(body)) { + writeStream({ body, client, request, socket, contentLength, header, expectsPayload }) + } else if (util.isIterable(body)) { + writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }) + } else { + assert(false) + } - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; + return true +} + +function writeH2 (client, session, request) { + const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request + + let headers + if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) + else headers = reqHeaders + + if (upgrade) { + errorRequest(client, request, new Error('Upgrade not supported for H2')) + return false } -}); -/***/ }), + try { + // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } -/***/ 81542: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + errorRequest(client, request, err || new RequestAbortedError()) + }) + } catch (err) { + errorRequest(client, request, err) + } -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + if (request.aborted) { + return false + } -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream + const h2State = client[kHTTP2SessionState] + + headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] + headers[HTTP2_HEADER_METHOD] = method + + if (method === 'CONNECT') { + session.ref() + // we are already connected, streams are pending, first request + // will create a new stream. We trigger a request to create the stream and wait until + // `ready` event is triggered + // We disabled endStream to allow the user to write to the stream + stream = session.request(headers, { endStream: false, signal }) + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + } else { + stream.once('ready', () => { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + }) + } + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) session.unref() + }) -module.exports = PassThrough; -var Transform = __nccwpck_require__(34415); -__nccwpck_require__(44124)(PassThrough, Transform); -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; + return true + } -/***/ }), + // https://tools.ietf.org/html/rfc7540#section-8.3 + // :path and :scheme headers must be omited when sending CONNECT -/***/ 51433: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + headers[HTTP2_HEADER_PATH] = path + headers[HTTP2_HEADER_SCHEME] = 'https' -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) -module.exports = Readable; + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } -/**/ -var Duplex; -/**/ + let contentLength = util.bodyLength(body) -Readable.ReadableState = ReadableState; + if (contentLength == null) { + contentLength = request.contentLength + } -/**/ -var EE = (__nccwpck_require__(82361).EventEmitter); -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ + if (contentLength === 0 || !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. -/**/ -var Stream = __nccwpck_require__(62387); -/**/ + contentLength = null + } -var Buffer = (__nccwpck_require__(14300).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false + } -/**/ -var debugUtil = __nccwpck_require__(73837); -var debug; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ + process.emitWarning(new RequestContentLengthMismatchError()) + } -var BufferList = __nccwpck_require__(52746); -var destroyImpl = __nccwpck_require__(97049); -var _require = __nccwpck_require__(39948), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + if (contentLength != null) { + assert(body, 'no body must not have content length') + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` + } -// Lazy loaded to improve the startup performance. -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; -__nccwpck_require__(44124)(Readable, Stream); -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + session.ref() - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(41359); - options = options || {}; + const shouldEndStream = method === 'GET' || method === 'HEAD' + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = '100-continue' + stream = session.request(headers, { endStream: shouldEndStream, signal }) - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; + stream.once('continue', writeBodyH2) + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }) + writeBodyH2() + } - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + // Increment counter as we have new several streams open + ++h2State.openStreams - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); + stream.once('response', headers => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { + stream.pause() + } + }) - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; + stream.once('end', () => { + request.onComplete([]) + }) - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; + stream.on('data', (chunk) => { + if (request.onData(chunk) === false) { + stream.pause() + } + }) - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) { + session.unref() + } + }) - // Should .destroy() be called after 'end' (and potentially 'finish') - this.autoDestroy = !!options.autoDestroy; + stream.once('error', function (err) { + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) - // has it been destroyed - this.destroyed = false; + stream.once('frameError', (type, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + errorRequest(client, request, err) - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; + // stream.on('aborted', () => { + // // TODO(HTTP/2): Support aborted + // }) - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} -function Readable(options) { - Duplex = Duplex || __nccwpck_require__(41359); - if (!(this instanceof Readable)) return new Readable(options); + // stream.on('timeout', () => { + // // TODO(HTTP/2): Support timeout + // }) - // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); + // stream.on('push', headers => { + // // TODO(HTTP/2): Suppor push + // }) - // legacy - this.readable = true; - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - Stream.call(this); -} -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } + // stream.on('trailers', headers => { + // // TODO(HTTP/2): Support trailers + // }) - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; + return true -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; + function writeBodyH2 () { + /* istanbul ignore else: assertion */ + if (!body) { + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') + stream.cork() + stream.write(body) + stream.uncork() + stream.end() + request.onBodySent(body) + request.onRequestSent() + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ + client, + request, + contentLength, + h2stream: stream, + expectsPayload, + body: body.stream(), + socket: client[kSocket], + header: '' + }) + } else { + writeBlob({ + body, + client, + request, + contentLength, + expectsPayload, + h2stream: stream, + header: '', + socket: client[kSocket] + }) } - skipChunkCheck = true; + } else if (util.isStream(body)) { + writeStream({ + body, + client, + request, + contentLength, + expectsPayload, + socket: client[kSocket], + h2stream: stream, + header: '' + }) + } else if (util.isIterable(body)) { + writeIterable({ + body, + client, + request, + contentLength, + expectsPayload, + header: '', + h2stream: stream, + socket: client[kSocket] + }) + } else { + assert(false) } - } else { - skipChunkCheck = true; } - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; +} -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); +function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') + + if (client[kHTTPConnVersion] === 'h2') { + // For HTTP/2, is enough to pipe the stream + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(body, err) + util.destroy(h2stream, err) } else { - addChunk(stream, state, chunk, false); + request.onRequestSent() } } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); + ) + + pipe.on('data', onPipeData) + pipe.once('end', () => { + pipe.removeListener('data', onPipeData) + util.destroy(pipe) + }) + + function onPipeData (chunk) { + request.onBodySent(chunk) } - } - // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); + return } - return er; -} -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(94841)/* .StringDecoder */ .s); - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; - // If setEncoding(null), decoder.encoding equals utf8 - this._readableState.encoding = this._readableState.decoder.encoding; + let finished = false - // Iterate over current buffer to convert already stored Buffers: - var p = this._readableState.buffer.head; - var content = ''; - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - this._readableState.buffer.clear(); - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) -// Don't raise the hwm > 1GB -var MAX_HWM = 0x40000000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; + const onData = function (chunk) { + if (finished) { + return + } + + try { + if (!writer.write(chunk) && this.pause) { + this.pause() + } + } catch (err) { + util.destroy(this, err) + } } - return n; -} + const onDrain = function () { + if (finished) { + return + } -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + if (body.resume) { + body.resume() + } } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; + const onAbort = function () { + if (finished) { + return + } + const err = new RequestAbortedError() + queueMicrotask(() => onFinished(err)) } - return state.length; -} + const onFinished = function (err) { + if (finished) { + return + } -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; + finished = true - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - n = howMuchToRead(n, state); + assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } + socket + .off('drain', onDrain) + .off('error', onFinished) - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. + body + .removeListener('data', onData) + .removeListener('end', onFinished) + .removeListener('error', onFinished) + .removeListener('close', onAbort) - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); + if (!err) { + try { + writer.end() + } catch (er) { + err = er + } + } - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } + writer.destroy(err) - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; + if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { + util.destroy(body, err) + } else { + util.destroy(body) + } } - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); + body + .on('data', onData) + .on('end', onFinished) + .on('error', onFinished) + .on('close', onAbort) + + if (body.resume) { + body.resume() } - if (ret !== null) this.emit('data', ret); - return ret; -}; -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; + + socket + .on('drain', onDrain) + .on('error', onFinished) +} + +async function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength === body.size, 'blob body must have content length') + + const isH2 = client[kHTTPConnVersion] === 'h2' + try { + if (contentLength != null && contentLength !== body.size) { + throw new RequestContentLengthMismatchError() } - } - state.ended = true; - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); + + const buffer = Buffer.from(await body.arrayBuffer()) + + if (isH2) { + h2stream.cork() + h2stream.write(buffer) + h2stream.uncork() + } else { + socket.cork() + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + socket.write(buffer) + socket.uncork() } - } -} -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } + request.onBodySent(buffer) + request.onRequestSent() - // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} + if (!expectsPayload) { + socket[kReset] = true + } -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; + resume(client) + } catch (err) { + util.destroy(isH2 ? h2stream : socket, err) } - state.readingMore = false; } -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; +async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') + + let callback = null + function onDrain () { + if (callback) { + const cb = callback + callback = null + cb() + } } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); + + const waitForDrain = () => new Promise((resolve, reject) => { + assert(callback === null) + + if (socket[kError]) { + reject(socket[kError]) + } else { + callback = resolve + } + }) + + if (client[kHTTPConnVersion] === 'h2') { + h2stream + .on('close', onDrain) + .on('drain', onDrain) + + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } + + const res = h2stream.write(chunk) + request.onBodySent(chunk) + if (!res) { + await waitForDrain() + } } + } catch (err) { + h2stream.destroy(err) + } finally { + request.onRequestSent() + h2stream.end() + h2stream + .off('close', onDrain) + .off('drain', onDrain) } - } - function onend() { - debug('onend'); - dest.end(); + + return } - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; + socket + .on('close', onDrain) + .on('drain', onDrain) - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } + + if (!writer.write(chunk)) { + await waitForDrain() } - src.pause(); } - } - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); + writer.end() + } catch (err) { + writer.destroy(err) + } finally { + socket + .off('close', onDrain) + .off('drain', onDrain) } +} - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); +class AsyncWriter { + constructor ({ socket, request, contentLength, client, expectsPayload, header }) { + this.socket = socket + this.request = request + this.contentLength = contentLength + this.client = client + this.bytesWritten = 0 + this.expectsPayload = expectsPayload + this.header = header - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - function unpipe() { - debug('unpipe'); - src.unpipe(dest); + socket[kWriting] = true } - // tell the dest that it's being piped to - dest.emit('pipe', src); + write (chunk) { + const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - return dest; -}; -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); + if (socket[kError]) { + throw socket[kError] } - }; -} -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; + if (socket.destroyed) { + return false + } - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; + const len = Buffer.byteLength(chunk) + if (!len) { + return true + } - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } + // We should defer writing chunks. + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError() + } - // slow case. multiple pipe destinations. + process.emitWarning(new RequestContentLengthMismatchError()) + } - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - return this; - } + socket.cork() - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; + if (bytesWritten === 0) { + if (!expectsPayload) { + socket[kReset] = true + } + + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') + } else { + socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + } + } + + if (contentLength === null) { + socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') + } + + this.bytesWritten += len -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; + const ret = socket.write(chunk) - // Try start flowing on next tick if stream isn't explicitly paused - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); + socket.uncork() + + request.onBodySent(chunk) + + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh() + } } } - } - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; - // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); + return ret } -} -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - state.flowing = !state.readableListening; - resume(this, state); - } - state.paused = false; - return this; -}; -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} -function resume_(stream, state) { - debug('resume', state.reading); - if (!state.reading) { - stream.read(0); - } - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - this._readableState.paused = true; - return this; -}; -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null); -} + end () { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this + request.onRequestSent() -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); + socket[kWriting] = false - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); + if (socket[kError]) { + throw socket[kError] } - }); - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); + if (socket.destroyed) { + return } - } - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } + if (bytesWritten === 0) { + if (expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD send a Content-Length in a request message when + // no Transfer-Encoding is sent and the request method defines a meaning + // for an enclosed payload body. - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') + } else { + socket.write(`${header}\r\n`, 'latin1') + } + } else if (contentLength === null) { + socket.write('\r\n0\r\n\r\n', 'latin1') } - }; - return this; -}; -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = __nccwpck_require__(43306); + + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError() + } else { + process.emitWarning(new RequestContentLengthMismatchError()) + } } - return createReadableStreamAsyncIterator(this); - }; -} -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; + + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + // istanbul ignore else: only for jest + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh() + } } + + resume(client) } -}); -// exposed for testing purposes only. -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; + destroy (err) { + const { socket, client } = this + + socket[kWriting] = false + + if (err) { + assert(client[kRunning] <= 1, 'pipeline should only contain this request') + util.destroy(socket, err) + } } -}); +} -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); +function errorRequest (client, request, err) { + try { + request.onError(err) + assert(request.aborted) + } catch (err) { + client.emit('error', err) } - return ret; } -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); + +module.exports = Client + + +/***/ }), + +/***/ 56436: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/* istanbul ignore file: only for Node 12 */ + +const { kConnected, kSize } = __nccwpck_require__(72785) + +class CompatWeakRef { + constructor (value) { + this.value = value + } + + deref () { + return this.value[kConnected] === 0 && this.value[kSize] === 0 + ? undefined + : this.value } } -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } +class CompatFinalizer { + constructor (finalizer) { + this.finalizer = finalizer + } + + register (dispatcher, key) { + if (dispatcher.on) { + dispatcher.on('disconnect', () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { + this.finalizer(key) + } + }) } } } -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = __nccwpck_require__(39082); + +module.exports = function () { + // FIXME: remove workaround when the Node bug is fixed + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer } - return from(Readable, iterable, opts); - }; -} -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; } - return -1; + return { + WeakRef: global.WeakRef || CompatWeakRef, + FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer + } } + /***/ }), -/***/ 34415: +/***/ 20663: +/***/ ((module) => { + +"use strict"; + + +// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size +const maxAttributeValueSize = 1024 + +// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size +const maxNameValuePairSize = 4096 + +module.exports = { + maxAttributeValueSize, + maxNameValuePairSize +} + + +/***/ }), + +/***/ 41724: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. +const { parseSetCookie } = __nccwpck_require__(24408) +const { stringify } = __nccwpck_require__(43121) +const { webidl } = __nccwpck_require__(21744) +const { Headers } = __nccwpck_require__(10554) +/** + * @typedef {Object} Cookie + * @property {string} name + * @property {string} value + * @property {Date|number|undefined} expires + * @property {number|undefined} maxAge + * @property {string|undefined} domain + * @property {string|undefined} path + * @property {boolean|undefined} secure + * @property {boolean|undefined} httpOnly + * @property {'Strict'|'Lax'|'None'} sameSite + * @property {string[]} unparsed + */ -module.exports = Transform; -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; -var Duplex = __nccwpck_require__(41359); -__nccwpck_require__(44124)(Transform, Duplex); -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); +/** + * @param {Headers} headers + * @returns {Record} + */ +function getCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + const cookie = headers.get('cookie') + const out = {} + + if (!cookie) { + return out } - ts.writechunk = null; - ts.writecb = null; - if (data != null) - // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); + + for (const piece of cookie.split(';')) { + const [name, ...value] = piece.split('=') + + out[name.trim()] = value.join('=') } + + return out } -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; +/** + * @param {Headers} headers + * @param {string} name + * @param {{ path?: string, domain?: string }|undefined} attributes + * @returns {void} + */ +function deleteCookie (headers, name, attributes) { + webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; + webidl.brandCheck(headers, Headers, { strict: false }) + + name = webidl.converters.DOMString(name) + attributes = webidl.converters.DeleteCookieAttributes(attributes) + + // Matches behavior of + // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 + setCookie(headers, { + name, + value: '', + expires: new Date(0), + ...attributes + }) +} + +/** + * @param {Headers} headers + * @returns {Cookie[]} + */ +function getSetCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + const cookies = headers.getSetCookie() + + if (!cookies) { + return [] } - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); + return cookies.map((pair) => parseSetCookie(pair)) } -function prefinish() { - var _this = this; - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); + +/** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ +function setCookie (headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + cookie = webidl.converters.Cookie(cookie) + + const str = stringify(cookie) + + if (str) { + headers.append('Set-Cookie', stringify(cookie)) } } -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); +webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null } -}; +]) -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; +webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: 'name' + }, + { + converter: webidl.converters.DOMString, + key: 'value' + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === 'number') { + return webidl.converters['unsigned long long'](value) + } + + return new Date(value) + }), + key: 'expires', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters['long long']), + key: 'maxAge', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'domain', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: 'path', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'secure', + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: 'httpOnly', + defaultValue: null + }, + { + converter: webidl.converters.USVString, + key: 'sameSite', + allowedValues: ['Strict', 'Lax', 'None'] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: 'unparsed', + defaultValue: [] } -}; -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) - // single equals check for both `null` and `undefined` - stream.push(data); +]) - // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); +module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie } + /***/ }), -/***/ 32094: +/***/ 24408: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. +const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(20663) +const { isCTLExcludingHtab } = __nccwpck_require__(43121) +const { collectASequenceOfCodePointsFast } = __nccwpck_require__(685) +const assert = __nccwpck_require__(39491) +/** + * @description Parses the field-value attributes of a set-cookie header string. + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} header + * @returns if the header is invalid, null will be returned + */ +function parseSetCookie (header) { + // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F + // character (CTL characters excluding HTAB): Abort these steps and + // ignore the set-cookie-string entirely. + if (isCTLExcludingHtab(header)) { + return null + } -module.exports = Writable; + let nameValuePair = '' + let unparsedAttributes = '' + let name = '' + let value = '' -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} + // 2. If the set-cookie-string contains a %x3B (";") character: + if (header.includes(';')) { + // 1. The name-value-pair string consists of the characters up to, + // but not including, the first %x3B (";"), and the unparsed- + // attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question). + const position = { position: 0 } -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ + nameValuePair = collectASequenceOfCodePointsFast(';', header, position) + unparsedAttributes = header.slice(position.position) + } else { + // Otherwise: -/**/ -var Duplex; -/**/ + // 1. The name-value-pair string consists of all the characters + // contained in the set-cookie-string, and the unparsed- + // attributes is the empty string. + nameValuePair = header + } -Writable.WritableState = WritableState; + // 3. If the name-value-pair string lacks a %x3D ("=") character, then + // the name string is empty, and the value string is the value of + // name-value-pair. + if (!nameValuePair.includes('=')) { + value = nameValuePair + } else { + // Otherwise, the name string consists of the characters up to, but + // not including, the first %x3D ("=") character, and the (possibly + // empty) value string consists of the characters after the first + // %x3D ("=") character. + const position = { position: 0 } + name = collectASequenceOfCodePointsFast( + '=', + nameValuePair, + position + ) + value = nameValuePair.slice(position.position + 1) + } -/**/ -var internalUtil = { - deprecate: __nccwpck_require__(65278) -}; -/**/ + // 4. Remove any leading or trailing WSP characters from the name + // string and the value string. + name = name.trim() + value = value.trim() -/**/ -var Stream = __nccwpck_require__(62387); -/**/ + // 5. If the sum of the lengths of the name string and the value string + // is more than 4096 octets, abort these steps and ignore the set- + // cookie-string entirely. + if (name.length + value.length > maxNameValuePairSize) { + return null + } -var Buffer = (__nccwpck_require__(14300).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; + // 6. The cookie-name is the name string, and the cookie-value is the + // value string. + return { + name, value, ...parseUnparsedAttributes(unparsedAttributes) + } } -var destroyImpl = __nccwpck_require__(97049); -var _require = __nccwpck_require__(39948), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; -var errorOrDestroy = destroyImpl.errorOrDestroy; -__nccwpck_require__(44124)(Writable, Stream); -function nop() {} -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(41359); - options = options || {}; - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; +/** + * Parses the remaining attributes of a set-cookie header + * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 + * @param {string} unparsedAttributes + * @param {[Object.]={}} cookieAttributeList + */ +function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { + // 1. If the unparsed-attributes string is empty, skip the rest of + // these steps. + if (unparsedAttributes.length === 0) { + return cookieAttributeList + } - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + // 2. Discard the first character of the unparsed-attributes (which + // will be a %x3B (";") character). + assert(unparsedAttributes[0] === ';') + unparsedAttributes = unparsedAttributes.slice(1) - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); + let cookieAv = '' - // if _final has been called - this.finalCalled = false; + // 3. If the remaining unparsed-attributes contains a %x3B (";") + // character: + if (unparsedAttributes.includes(';')) { + // 1. Consume the characters of the unparsed-attributes up to, but + // not including, the first %x3B (";") character. + cookieAv = collectASequenceOfCodePointsFast( + ';', + unparsedAttributes, + { position: 0 } + ) + unparsedAttributes = unparsedAttributes.slice(cookieAv.length) + } else { + // Otherwise: - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; + // 1. Consume the remainder of the unparsed-attributes. + cookieAv = unparsedAttributes + unparsedAttributes = '' + } - // has it been destroyed - this.destroyed = false; + // Let the cookie-av string be the characters consumed in this step. - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; + let attributeName = '' + let attributeValue = '' + + // 4. If the cookie-av string contains a %x3D ("=") character: + if (cookieAv.includes('=')) { + // 1. The (possibly empty) attribute-name string consists of the + // characters up to, but not including, the first %x3D ("=") + // character, and the (possibly empty) attribute-value string + // consists of the characters after the first %x3D ("=") + // character. + const position = { position: 0 } + + attributeName = collectASequenceOfCodePointsFast( + '=', + cookieAv, + position + ) + attributeValue = cookieAv.slice(position.position + 1) + } else { + // Otherwise: + + // 1. The attribute-name string consists of the entire cookie-av + // string, and the attribute-value string is empty. + attributeName = cookieAv + } + + // 5. Remove any leading or trailing WSP characters from the attribute- + // name string and the attribute-value string. + attributeName = attributeName.trim() + attributeValue = attributeValue.trim() + + // 6. If the attribute-value is longer than 1024 octets, ignore the + // cookie-av string and return to Step 1 of this algorithm. + if (attributeValue.length > maxAttributeValueSize) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 7. Process the attribute-name and attribute-value according to the + // requirements in the following subsections. (Notice that + // attributes with unrecognized attribute-names are ignored.) + const attributeNameLowercase = attributeName.toLowerCase() + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 + // If the attribute-name case-insensitively matches the string + // "Expires", the user agent MUST process the cookie-av as follows. + if (attributeNameLowercase === 'expires') { + // 1. Let the expiry-time be the result of parsing the attribute-value + // as cookie-date (see Section 5.1.1). + const expiryTime = new Date(attributeValue) + + // 2. If the attribute-value failed to parse as a cookie date, ignore + // the cookie-av. + + cookieAttributeList.expires = expiryTime + } else if (attributeNameLowercase === 'max-age') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 + // If the attribute-name case-insensitively matches the string "Max- + // Age", the user agent MUST process the cookie-av as follows. + + // 1. If the first character of the attribute-value is not a DIGIT or a + // "-" character, ignore the cookie-av. + const charCode = attributeValue.charCodeAt(0) + + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 2. If the remainder of attribute-value contains a non-DIGIT + // character, ignore the cookie-av. + if (!/^\d+$/.test(attributeValue)) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 3. Let delta-seconds be the attribute-value converted to an integer. + const deltaSeconds = Number(attributeValue) + + // 4. Let cookie-age-limit be the maximum age of the cookie (which + // SHOULD be 400 days or less, see Section 4.1.2.2). + + // 5. Set delta-seconds to the smaller of its present value and cookie- + // age-limit. + // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) + + // 6. If delta-seconds is less than or equal to zero (0), let expiry- + // time be the earliest representable date and time. Otherwise, let + // the expiry-time be the current date and time plus delta-seconds + // seconds. + // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; + // 7. Append an attribute to the cookie-attribute-list with an + // attribute-name of Max-Age and an attribute-value of expiry-time. + cookieAttributeList.maxAge = deltaSeconds + } else if (attributeNameLowercase === 'domain') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 + // If the attribute-name case-insensitively matches the string "Domain", + // the user agent MUST process the cookie-av as follows. - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; + // 1. Let cookie-domain be the attribute-value. + let cookieDomain = attributeValue - // a flag to see when we're in the middle of a write. - this.writing = false; + // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be + // cookie-domain without its leading %x2E ("."). + if (cookieDomain[0] === '.') { + cookieDomain = cookieDomain.slice(1) + } - // when true all writes will be buffered until .uncork() call - this.corked = 0; + // 3. Convert the cookie-domain to lower case. + cookieDomain = cookieDomain.toLowerCase() - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; + // 4. Append an attribute to the cookie-attribute-list with an + // attribute-name of Domain and an attribute-value of cookie-domain. + cookieAttributeList.domain = cookieDomain + } else if (attributeNameLowercase === 'path') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 + // If the attribute-name case-insensitively matches the string "Path", + // the user agent MUST process the cookie-av as follows. - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; + // 1. If the attribute-value is empty or if the first character of the + // attribute-value is not %x2F ("/"): + let cookiePath = '' + if (attributeValue.length === 0 || attributeValue[0] !== '/') { + // 1. Let cookie-path be the default-path. + cookiePath = '/' + } else { + // Otherwise: - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; + // 1. Let cookie-path be the attribute-value. + cookiePath = attributeValue + } - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; + // 2. Append an attribute to the cookie-attribute-list with an + // attribute-name of Path and an attribute-value of cookie-path. + cookieAttributeList.path = cookiePath + } else if (attributeNameLowercase === 'secure') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 + // If the attribute-name case-insensitively matches the string "Secure", + // the user agent MUST append an attribute to the cookie-attribute-list + // with an attribute-name of Secure and an empty attribute-value. - // the amount that is being written when _write is called. - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; + cookieAttributeList.secure = true + } else if (attributeNameLowercase === 'httponly') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 + // If the attribute-name case-insensitively matches the string + // "HttpOnly", the user agent MUST append an attribute to the cookie- + // attribute-list with an attribute-name of HttpOnly and an empty + // attribute-value. - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; + cookieAttributeList.httpOnly = true + } else if (attributeNameLowercase === 'samesite') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 + // If the attribute-name case-insensitively matches the string + // "SameSite", the user agent MUST process the cookie-av as follows: - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; + // 1. Let enforcement be "Default". + let enforcement = 'Default' - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; + const attributeValueLowercase = attributeValue.toLowerCase() + // 2. If cookie-av's attribute-value is a case-insensitive match for + // "None", set enforcement to "None". + if (attributeValueLowercase.includes('none')) { + enforcement = 'None' + } - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; + // 3. If cookie-av's attribute-value is a case-insensitive match for + // "Strict", set enforcement to "Strict". + if (attributeValueLowercase.includes('strict')) { + enforcement = 'Strict' + } - // Should .destroy() be called after 'finish' (and potentially 'end') - this.autoDestroy = !!options.autoDestroy; + // 4. If cookie-av's attribute-value is a case-insensitive match for + // "Lax", set enforcement to "Lax". + if (attributeValueLowercase.includes('lax')) { + enforcement = 'Lax' + } - // count buffered requests - this.bufferedRequestCount = 0; + // 5. Append an attribute to the cookie-attribute-list with an + // attribute-name of "SameSite" and an attribute-value of + // enforcement. + cookieAttributeList.sameSite = enforcement + } else { + cookieAttributeList.unparsed ??= [] - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) } - return out; -}; -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; + // 8. Return to Step 1 of this algorithm. + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) } -function Writable(options) { - Duplex = Duplex || __nccwpck_require__(41359); - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. +module.exports = { + parseSetCookie, + parseUnparsedAttributes +} - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); +/***/ }), - // legacy. - this.writable = true; - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - Stream.call(this); -} +/***/ 43121: +/***/ ((module) => { -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); - // TODO: defer error events consistently everywhere, not just the cb - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} +"use strict"; -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var er; - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - return true; -} -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; -Writable.prototype.cork = function () { - this._writableState.corked++; -}; -Writable.prototype.uncork = function () { - var state = this._writableState; - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; + +/** + * @param {string} value + * @returns {boolean} + */ +function isCTLExcludingHtab (value) { + if (value.length === 0) { + return false } -}); -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; + for (const char of value) { + const code = char.charCodeAt(0) + + if ( + (code >= 0x00 || code <= 0x08) || + (code >= 0x0A || code <= 0x1F) || + code === 0x7F + ) { + return false } } - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; +} + +/** + CHAR = + token = 1* + separators = "(" | ")" | "<" | ">" | "@" + | "," | ";" | ":" | "\" | <"> + | "/" | "[" | "]" | "?" | "=" + | "{" | "}" | SP | HT + * @param {string} name + */ +function validateCookieName (name) { + for (const char of name) { + const code = char.charCodeAt(0) + + if ( + (code <= 0x20 || code > 0x7F) || + char === '(' || + char === ')' || + char === '>' || + char === '<' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' + ) { + throw new Error('Invalid cookie name') } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); } - return ret; -} -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; } -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); + +/** + cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) + cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E + ; US-ASCII characters excluding CTLs, + ; whitespace DQUOTE, comma, semicolon, + ; and backslash + * @param {string} value + */ +function validateCookieValue (value) { + for (const char of value) { + const code = char.charCodeAt(0) + + if ( + code < 0x21 || // exclude CTLs (0-31) + code === 0x22 || + code === 0x2C || + code === 0x3B || + code === 0x5C || + code > 0x7E // non-ascii + ) { + throw new Error('Invalid header value') + } } } -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); + +/** + * path-value = + * @param {string} path + */ +function validateCookiePath (path) { + for (const char of path) { + const code = char.charCodeAt(0) + + if (code < 0x21 || char === ';') { + throw new Error('Invalid cookie path') } } } -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); +/** + * I have no idea why these values aren't allowed to be honest, + * but Deno tests these. - Khafra + * @param {string} domain + */ +function validateCookieDomain (domain) { + if ( + domain.startsWith('-') || + domain.endsWith('.') || + domain.endsWith('-') + ) { + throw new Error('Invalid cookie domain') } } -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); +/** + * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 + * @param {number|Date} date + IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT + ; fixed length/zone/capitalization subset of the format + ; see Section 3.3 of [RFC5322] - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - if (entry === null) state.lastBufferedRequest = null; + day-name = %x4D.6F.6E ; "Mon", case-sensitive + / %x54.75.65 ; "Tue", case-sensitive + / %x57.65.64 ; "Wed", case-sensitive + / %x54.68.75 ; "Thu", case-sensitive + / %x46.72.69 ; "Fri", case-sensitive + / %x53.61.74 ; "Sat", case-sensitive + / %x53.75.6E ; "Sun", case-sensitive + date1 = day SP month SP year + ; e.g., 02 Jun 1982 + + day = 2DIGIT + month = %x4A.61.6E ; "Jan", case-sensitive + / %x46.65.62 ; "Feb", case-sensitive + / %x4D.61.72 ; "Mar", case-sensitive + / %x41.70.72 ; "Apr", case-sensitive + / %x4D.61.79 ; "May", case-sensitive + / %x4A.75.6E ; "Jun", case-sensitive + / %x4A.75.6C ; "Jul", case-sensitive + / %x41.75.67 ; "Aug", case-sensitive + / %x53.65.70 ; "Sep", case-sensitive + / %x4F.63.74 ; "Oct", case-sensitive + / %x4E.6F.76 ; "Nov", case-sensitive + / %x44.65.63 ; "Dec", case-sensitive + year = 4DIGIT + + GMT = %x47.4D.54 ; "GMT", case-sensitive + + time-of-day = hour ":" minute ":" second + ; 00:00:00 - 23:59:60 (leap second) + + hour = 2DIGIT + minute = 2DIGIT + second = 2DIGIT + */ +function toIMFDate (date) { + if (typeof date === 'number') { + date = new Date(date) } - state.bufferedRequest = entry; - state.bufferProcessing = false; + + const days = [ + 'Sun', 'Mon', 'Tue', 'Wed', + 'Thu', 'Fri', 'Sat' + ] + + const months = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' + ] + + const dayName = days[date.getUTCDay()] + const day = date.getUTCDate().toString().padStart(2, '0') + const month = months[date.getUTCMonth()] + const year = date.getUTCFullYear() + const hour = date.getUTCHours().toString().padStart(2, '0') + const minute = date.getUTCMinutes().toString().padStart(2, '0') + const second = date.getUTCSeconds().toString().padStart(2, '0') + + return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT` } -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; -Writable.prototype._writev = null; -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; + +/** + max-age-av = "Max-Age=" non-zero-digit *DIGIT + ; In practice, both expires-av and max-age-av + ; are limited to dates representable by the + ; user agent. + * @param {number} maxAge + */ +function validateCookieMaxAge (maxAge) { + if (maxAge < 0) { + throw new Error('Invalid cookie max-age') } - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); +} - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); +/** + * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 + * @param {import('./index').Cookie} cookie + */ +function stringify (cookie) { + if (cookie.name.length === 0) { + return null } - // ignore unnecessary end() calls. - if (!state.ending) endWritable(this, state, cb); - return this; -}; -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; + validateCookieName(cookie.name) + validateCookieValue(cookie.value) + + const out = [`${cookie.name}=${cookie.value}`] + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 + if (cookie.name.startsWith('__Secure-')) { + cookie.secure = true } -}); -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - errorOrDestroy(stream, err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } + + if (cookie.name.startsWith('__Host-')) { + cookie.secure = true + cookie.domain = null + cookie.path = '/' } -} -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } + + if (cookie.secure) { + out.push('Secure') } - return need; -} -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); + + if (cookie.httpOnly) { + out.push('HttpOnly') } - state.ended = true; - stream.writable = false; -} -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; + + if (typeof cookie.maxAge === 'number') { + validateCookieMaxAge(cookie.maxAge) + out.push(`Max-Age=${cookie.maxAge}`) } - // reuse the free corkReq. - state.corkedRequestsFree.next = corkReq; -} -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } + if (cookie.domain) { + validateCookieDomain(cookie.domain) + out.push(`Domain=${cookie.domain}`) + } - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; + if (cookie.path) { + validateCookiePath(cookie.path) + out.push(`Path=${cookie.path}`) } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; -/***/ }), + if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { + out.push(`Expires=${toIMFDate(cookie.expires)}`) + } -/***/ 43306: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (cookie.sameSite) { + out.push(`SameSite=${cookie.sameSite}`) + } -"use strict"; + for (const part of cookie.unparsed) { + if (!part.includes('=')) { + throw new Error('Invalid unparsed') + } + const [key, ...value] = part.split('=') -var _Object$setPrototypeO; -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var finished = __nccwpck_require__(76080); -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - if (resolve !== null) { - var data = iter[kStream].read(); - // we defer if data is null - // we can be expecting either 'end' or - // 'error' - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } + out.push(`${key.trim()}=${value.join('=')}`) } + + return out.join('; ') } -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - iter[kHandlePromise](resolve, reject); - }, reject); - }; + +module.exports = { + isCTLExcludingHtab, + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify } -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - next: function next() { - var _this = this; - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - if (error !== null) { - return Promise.reject(error); - } - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } - // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - var lastPromise = this[kLastPromise]; - var promise; - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - promise = new Promise(this[kHandlePromise]); - } - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; - // reject if we are waiting for data in the Promise - // returned by next() and store the error - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - iterator[kError] = err; - return; - } - var resolve = iterator[kLastResolve]; - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; -module.exports = createReadableStreamAsyncIterator; /***/ }), -/***/ 52746: +/***/ 82067: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var _require = __nccwpck_require__(14300), - Buffer = _require.Buffer; -var _require2 = __nccwpck_require__(73837), - inspect = _require2.inspect; -var custom = inspect && inspect.custom || 'inspect'; -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} -module.exports = /*#__PURE__*/function () { - function BufferList() { - _classCallCheck(this, BufferList); - this.head = null; - this.tail = null; - this.length = 0; - } - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; +const net = __nccwpck_require__(41808) +const assert = __nccwpck_require__(39491) +const util = __nccwpck_require__(83983) +const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(48045) + +let tls // include tls conditionally since it is not always available + +// TODO: session re-use does not wait for the first +// connection to resolve the session and might therefore +// resolve the same servername multiple times even when +// re-use is enabled. + +let SessionCache +// FIXME: remove workaround when the Node bug is fixed +// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 +if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { + SessionCache = class WeakSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return + } + + const ref = this._sessionCache.get(key) + if (ref !== undefined && ref.deref() === undefined) { + this._sessionCache.delete(key) + } + }) } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; + + get (sessionKey) { + const ref = this._sessionCache.get(sessionKey) + return ref ? ref.deref() : null } - }, { - key: "clear", - value: function clear() { - this.head = this.tail = null; - this.length = 0; + + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return + } + + this._sessionCache.set(sessionKey, new WeakRef(session)) + this._sessionRegistry.register(session, sessionKey) } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) ret += s + p.data; - return ret; + } +} else { + SessionCache = class SimpleSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; + + get (sessionKey) { + return this._sessionCache.get(sessionKey) } - // Consumes a specified amount of bytes or characters from the buffered data. - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret; - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return } - return ret; - } - }, { - key: "first", - value: function first() { - return this.head.data; - } - // Consumes a specified amount of characters from the buffered data. - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; + if (this._sessionCache.size >= this._maxCachedSessions) { + // remove the oldest session + const { value: oldestKey } = this._sessionCache.keys().next() + this._sessionCache.delete(oldestKey) } - this.length -= c; - return ret; + + this._sessionCache.set(sessionKey, session) } + } +} - // Consumes a specified amount of bytes from the buffered data. - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; +function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { + throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') + } + + const options = { path: socketPath, ...opts } + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) + timeout = timeout == null ? 10e3 : timeout + allowH2 = allowH2 != null ? allowH2 : false + return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket + if (protocol === 'https:') { + if (!tls) { + tls = __nccwpck_require__(24404) } - this.length -= c; - return ret; + servername = servername || options.servername || util.getServerName(host) || null + + const sessionKey = servername || hostname + const session = sessionCache.get(sessionKey) || null + + assert(sessionKey) + + socket = tls.connect({ + highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... + ...options, + servername, + session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], + socket: httpSocket, // upgrade socket connection + port: port || 443, + host: hostname + }) + + socket + .on('session', function (session) { + // TODO (fix): Can a session become invalid once established? Don't think so? + sessionCache.set(sessionKey, session) + }) + } else { + assert(!httpSocket, 'httpSocket can only be sent on TLS update') + socket = net.connect({ + highWaterMark: 64 * 1024, // Same as nodejs fs streams. + ...options, + localAddress, + port: port || 80, + host: hostname + }) } - // Make sure the linked list only shows the minimal necessary information. - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread(_objectSpread({}, options), {}, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); + // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay + socket.setKeepAlive(true, keepAliveInitialDelay) } - }]); - return BufferList; -}(); -/***/ }), + const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) -/***/ 97049: -/***/ ((module) => { + socket + .setNoDelay(true) + .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { + cancelTimeout() -"use strict"; + if (callback) { + const cb = callback + callback = null + cb(null, this) + } + }) + .on('error', function (err) { + cancelTimeout() + if (callback) { + const cb = callback + callback = null + cb(err) + } + }) -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); - } - } - return this; + return socket } +} - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; +function setupTimeout (onConnectTimeout, timeout) { + if (!timeout) { + return () => {} } - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); + let s1 = null + let s2 = null + const timeoutId = setTimeout(() => { + // setImmediate is added to make sure that we priotorise socket error events over timeouts + s1 = setImmediate(() => { + if (process.platform === 'win32') { + // Windows needs an extra setImmediate probably due to implementation differences in the socket logic + s2 = setImmediate(() => onConnectTimeout()) } else { - process.nextTick(emitCloseNT, _this); + onConnectTimeout() } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - return this; -} -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; + }) + }, timeout) + return () => { + clearTimeout(timeoutId) + clearImmediate(s1) + clearImmediate(s2) } } -function emitErrorNT(self, err) { - self.emit('error', err); -} -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); +function onConnectTimeout (socket) { + util.destroy(socket, new ConnectTimeoutError()) } -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; + +module.exports = buildConnector + /***/ }), -/***/ 76080: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 14462: +/***/ ((module) => { "use strict"; -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). +/** @type {Record} */ +const headerNameLowerCasedRecord = {} + +// https://developer.mozilla.org/docs/Web/HTTP/Headers +const wellknownHeaderNames = [ + 'Accept', + 'Accept-Encoding', + 'Accept-Language', + 'Accept-Ranges', + 'Access-Control-Allow-Credentials', + 'Access-Control-Allow-Headers', + 'Access-Control-Allow-Methods', + 'Access-Control-Allow-Origin', + 'Access-Control-Expose-Headers', + 'Access-Control-Max-Age', + 'Access-Control-Request-Headers', + 'Access-Control-Request-Method', + 'Age', + 'Allow', + 'Alt-Svc', + 'Alt-Used', + 'Authorization', + 'Cache-Control', + 'Clear-Site-Data', + 'Connection', + 'Content-Disposition', + 'Content-Encoding', + 'Content-Language', + 'Content-Length', + 'Content-Location', + 'Content-Range', + 'Content-Security-Policy', + 'Content-Security-Policy-Report-Only', + 'Content-Type', + 'Cookie', + 'Cross-Origin-Embedder-Policy', + 'Cross-Origin-Opener-Policy', + 'Cross-Origin-Resource-Policy', + 'Date', + 'Device-Memory', + 'Downlink', + 'ECT', + 'ETag', + 'Expect', + 'Expect-CT', + 'Expires', + 'Forwarded', + 'From', + 'Host', + 'If-Match', + 'If-Modified-Since', + 'If-None-Match', + 'If-Range', + 'If-Unmodified-Since', + 'Keep-Alive', + 'Last-Modified', + 'Link', + 'Location', + 'Max-Forwards', + 'Origin', + 'Permissions-Policy', + 'Pragma', + 'Proxy-Authenticate', + 'Proxy-Authorization', + 'RTT', + 'Range', + 'Referer', + 'Referrer-Policy', + 'Refresh', + 'Retry-After', + 'Sec-WebSocket-Accept', + 'Sec-WebSocket-Extensions', + 'Sec-WebSocket-Key', + 'Sec-WebSocket-Protocol', + 'Sec-WebSocket-Version', + 'Server', + 'Server-Timing', + 'Service-Worker-Allowed', + 'Service-Worker-Navigation-Preload', + 'Set-Cookie', + 'SourceMap', + 'Strict-Transport-Security', + 'Supports-Loading-Mode', + 'TE', + 'Timing-Allow-Origin', + 'Trailer', + 'Transfer-Encoding', + 'Upgrade', + 'Upgrade-Insecure-Requests', + 'User-Agent', + 'Vary', + 'Via', + 'WWW-Authenticate', + 'X-Content-Type-Options', + 'X-DNS-Prefetch-Control', + 'X-Frame-Options', + 'X-Permitted-Cross-Domain-Policies', + 'X-Powered-By', + 'X-Requested-With', + 'X-XSS-Protection' +] -var ERR_STREAM_PREMATURE_CLOSE = (__nccwpck_require__(67214)/* .codes.ERR_STREAM_PREMATURE_CLOSE */ .q.ERR_STREAM_PREMATURE_CLOSE); -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - callback.apply(this, args); - }; -} -function noop() {} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; +for (let i = 0; i < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i] + const lowerCasedKey = key.toLowerCase() + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = + lowerCasedKey } -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - var writableEnded = stream._writableState && stream._writableState.finished; - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - var readableEnded = stream._readableState && stream._readableState.endEmitted; - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - var onerror = function onerror(err) { - callback.call(stream, err); - }; - var onclose = function onclose() { - var err; - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(headerNameLowerCasedRecord, null) + +module.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord } -module.exports = eos; + /***/ }), -/***/ 39082: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 48045: +/***/ ((module) => { "use strict"; -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var ERR_INVALID_ARG_TYPE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_ARG_TYPE */ .q.ERR_INVALID_ARG_TYPE); -function from(Readable, iterable, opts) { - var iterator; - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); - // Reading boolean to protect against _read - // being called before last iteration completion. - var reading = false; - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - function next() { - return _next2.apply(this, arguments); +class UndiciError extends Error { + constructor (message) { + super(message) + this.name = 'UndiciError' + this.code = 'UND_ERR' } - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _yield$iterator$next = yield iterator.next(), - value = _yield$iterator$next.value, - done = _yield$iterator$next.done; - if (done) { - readable.push(null); - } else if (readable.push(yield value)) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); +} + +class ConnectTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ConnectTimeoutError) + this.name = 'ConnectTimeoutError' + this.message = message || 'Connect Timeout Error' + this.code = 'UND_ERR_CONNECT_TIMEOUT' } - return readable; } -module.exports = from; +class HeadersTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersTimeoutError) + this.name = 'HeadersTimeoutError' + this.message = message || 'Headers Timeout Error' + this.code = 'UND_ERR_HEADERS_TIMEOUT' + } +} -/***/ }), +class HeadersOverflowError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersOverflowError) + this.name = 'HeadersOverflowError' + this.message = message || 'Headers Overflow Error' + this.code = 'UND_ERR_HEADERS_OVERFLOW' + } +} -/***/ 76989: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +class BodyTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, BodyTimeoutError) + this.name = 'BodyTimeoutError' + this.message = message || 'Body Timeout Error' + this.code = 'UND_ERR_BODY_TIMEOUT' + } +} -"use strict"; -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). +class ResponseStatusCodeError extends UndiciError { + constructor (message, statusCode, headers, body) { + super(message) + Error.captureStackTrace(this, ResponseStatusCodeError) + this.name = 'ResponseStatusCodeError' + this.message = message || 'Response Status Code Error' + this.code = 'UND_ERR_RESPONSE_STATUS_CODE' + this.body = body + this.status = statusCode + this.statusCode = statusCode + this.headers = headers + } +} +class InvalidArgumentError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidArgumentError) + this.name = 'InvalidArgumentError' + this.message = message || 'Invalid Argument Error' + this.code = 'UND_ERR_INVALID_ARG' + } +} +class InvalidReturnValueError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidReturnValueError) + this.name = 'InvalidReturnValueError' + this.message = message || 'Invalid Return Value Error' + this.code = 'UND_ERR_INVALID_RETURN_VALUE' + } +} -var eos; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; +class RequestAbortedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestAbortedError) + this.name = 'AbortError' + this.message = message || 'Request aborted' + this.code = 'UND_ERR_ABORTED' + } } -var _require$codes = (__nccwpck_require__(67214)/* .codes */ .q), - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; + +class InformationalError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InformationalError) + this.name = 'InformationalError' + this.message = message || 'Request information' + this.code = 'UND_ERR_INFO' + } } -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; + +class RequestContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestContentLengthMismatchError) + this.name = 'RequestContentLengthMismatchError' + this.message = message || 'Request body length does not match content-length header' + this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' + } } -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = __nccwpck_require__(76080); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; - // request.destroy just do .end - .abort is what we want - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; +class ResponseContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseContentLengthMismatchError) + this.name = 'ResponseContentLengthMismatchError' + this.message = message || 'Response body length does not match content-length header' + this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' + } } -function call(fn) { - fn(); + +class ClientDestroyedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientDestroyedError) + this.name = 'ClientDestroyedError' + this.message = message || 'The client is destroyed' + this.code = 'UND_ERR_DESTROYED' + } } -function pipe(from, to) { - return from.pipe(to); + +class ClientClosedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientClosedError) + this.name = 'ClientClosedError' + this.message = message || 'The client is closed' + this.code = 'UND_ERR_CLOSED' + } } -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); + +class SocketError extends UndiciError { + constructor (message, socket) { + super(message) + Error.captureStackTrace(this, SocketError) + this.name = 'SocketError' + this.message = message || 'Socket error' + this.code = 'UND_ERR_SOCKET' + this.socket = socket + } } -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; + +class NotSupportedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'NotSupportedError' + this.message = message || 'Not supported error' + this.code = 'UND_ERR_NOT_SUPPORTED' } - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); +} + +class BalancedPoolMissingUpstreamError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'MissingUpstreamError' + this.message = message || 'No upstream has been added to the BalancedPool' + this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' } - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); } -module.exports = pipeline; + +class HTTPParserError extends Error { + constructor (message, code, data) { + super(message) + Error.captureStackTrace(this, HTTPParserError) + this.name = 'HTTPParserError' + this.code = code ? `HPE_${code}` : undefined + this.data = data ? data.toString() : undefined + } +} + +class ResponseExceededMaxSizeError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseExceededMaxSizeError) + this.name = 'ResponseExceededMaxSizeError' + this.message = message || 'Response content exceeded max size' + this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } +} + +class RequestRetryError extends UndiciError { + constructor (message, code, { headers, data }) { + super(message) + Error.captureStackTrace(this, RequestRetryError) + this.name = 'RequestRetryError' + this.message = message || 'Request retry error' + this.code = 'UND_ERR_REQ_RETRY' + this.statusCode = code + this.data = data + this.headers = headers + } +} + +module.exports = { + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError +} + /***/ }), -/***/ 39948: +/***/ 62905: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -var ERR_INVALID_OPT_VALUE = (__nccwpck_require__(67214)/* .codes.ERR_INVALID_OPT_VALUE */ .q.ERR_INVALID_OPT_VALUE); -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; +const { + InvalidArgumentError, + NotSupportedError +} = __nccwpck_require__(48045) +const assert = __nccwpck_require__(39491) +const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(72785) +const util = __nccwpck_require__(83983) + +// tokenRegExp and headerCharRegex have been lifted from +// https://github.com/nodejs/node/blob/main/lib/_http_common.js + +/** + * Verifies that the given val is a valid HTTP token + * per the rules defined in RFC 7230 + * See https://tools.ietf.org/html/rfc7230#section-3.2.6 + */ +const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/ + +/** + * Matches if val contains an invalid field-vchar + * field-value = *( field-content / obs-fold ) + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + */ +const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ + +// Verifies that a given path is valid does not contain control chars \x00 to \x20 +const invalidPathRegex = /[^\u0021-\u00ff]/ + +const kHandler = Symbol('handler') + +const channels = {} + +let extractBody + +try { + const diagnosticsChannel = __nccwpck_require__(67643) + channels.create = diagnosticsChannel.channel('undici:request:create') + channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') + channels.headers = diagnosticsChannel.channel('undici:request:headers') + channels.trailers = diagnosticsChannel.channel('undici:request:trailers') + channels.error = diagnosticsChannel.channel('undici:request:error') +} catch { + channels.create = { hasSubscribers: false } + channels.bodySent = { hasSubscribers: false } + channels.headers = { hasSubscribers: false } + channels.trailers = { hasSubscribers: false } + channels.error = { hasSubscribers: false } } -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); + +class Request { + constructor (origin, { + path, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue + }, handler) { + if (typeof path !== 'string') { + throw new InvalidArgumentError('path must be a string') + } else if ( + path[0] !== '/' && + !(path.startsWith('http://') || path.startsWith('https://')) && + method !== 'CONNECT' + ) { + throw new InvalidArgumentError('path must be an absolute URL or start with a slash') + } else if (invalidPathRegex.exec(path) !== null) { + throw new InvalidArgumentError('invalid request path') } - return Math.floor(hwm); - } - // Default value - return state.objectMode ? 16 : 16 * 1024; -} -module.exports = { - getHighWaterMark: getHighWaterMark -}; + if (typeof method !== 'string') { + throw new InvalidArgumentError('method must be a string') + } else if (tokenRegExp.exec(method) === null) { + throw new InvalidArgumentError('invalid request method') + } -/***/ }), + if (upgrade && typeof upgrade !== 'string') { + throw new InvalidArgumentError('upgrade must be a string') + } -/***/ 62387: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError('invalid headersTimeout') + } -module.exports = __nccwpck_require__(12781); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError('invalid bodyTimeout') + } + if (reset != null && typeof reset !== 'boolean') { + throw new InvalidArgumentError('invalid reset') + } -/***/ }), + if (expectContinue != null && typeof expectContinue !== 'boolean') { + throw new InvalidArgumentError('invalid expectContinue') + } -/***/ 51642: -/***/ ((module, exports, __nccwpck_require__) => { + this.headersTimeout = headersTimeout -var Stream = __nccwpck_require__(12781); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = __nccwpck_require__(51433); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = __nccwpck_require__(32094); - exports.Duplex = __nccwpck_require__(41359); - exports.Transform = __nccwpck_require__(34415); - exports.PassThrough = __nccwpck_require__(81542); - exports.finished = __nccwpck_require__(76080); - exports.pipeline = __nccwpck_require__(76989); -} + this.bodyTimeout = bodyTimeout + this.throwOnError = throwOnError === true -/***/ }), + this.method = method -/***/ 63515: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + this.abort = null -"use strict"; + if (body == null) { + this.body = null + } else if (util.isStream(body)) { + this.body = body + const rState = this.body._readableState + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy () { + util.destroy(this) + } + this.body.on('end', this.endHandler) + } -const {PassThrough} = __nccwpck_require__(12781); -const extend = __nccwpck_require__(38171); + this.errorHandler = err => { + if (this.abort) { + this.abort(err) + } else { + this.error = err + } + } + this.body.on('error', this.errorHandler) + } else if (util.isBuffer(body)) { + this.body = body.byteLength ? body : null + } else if (ArrayBuffer.isView(body)) { + this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null + } else if (body instanceof ArrayBuffer) { + this.body = body.byteLength ? Buffer.from(body) : null + } else if (typeof body === 'string') { + this.body = body.length ? Buffer.from(body) : null + } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { + this.body = body + } else { + throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') + } -let debug = () => {}; -if ( - typeof process !== 'undefined' && - 'env' in process && - typeof process.env === 'object' && - process.env.DEBUG === 'retry-request' -) { - debug = message => { - console.log('retry-request:', message); - }; -} + this.completed = false -const DEFAULTS = { - objectMode: false, - retries: 2, + this.aborted = false - /* - The maximum time to delay in seconds. If retryDelayMultiplier results in a - delay greater than maxRetryDelay, retries should delay by maxRetryDelay - seconds instead. - */ - maxRetryDelay: 64, + this.upgrade = upgrade || null + + this.path = query ? util.buildURL(path, query) : path + + this.origin = origin + + this.idempotent = idempotent == null + ? method === 'HEAD' || method === 'GET' + : idempotent + + this.blocking = blocking == null ? false : blocking + + this.reset = reset == null ? null : reset + + this.host = null + + this.contentLength = null + + this.contentType = null + + this.headers = '' + + // Only for H2 + this.expectContinue = expectContinue != null ? expectContinue : false + + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError('headers array must be even') + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(this, headers[i], headers[i + 1]) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(this, key, headers[key]) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') + } + + if (util.isFormDataLike(this.body)) { + if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { + throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') + } + + if (!extractBody) { + extractBody = (__nccwpck_require__(41472).extractBody) + } + + const [bodyStream, contentType] = extractBody(body) + if (this.contentType == null) { + this.contentType = contentType + this.headers += `content-type: ${contentType}\r\n` + } + this.body = bodyStream.stream + this.contentLength = bodyStream.length + } else if (util.isBlobLike(body) && this.contentType == null && body.type) { + this.contentType = body.type + this.headers += `content-type: ${body.type}\r\n` + } - /* - The multiplier by which to increase the delay time between the completion of - failed requests, and the initiation of the subsequent retrying request. - */ - retryDelayMultiplier: 2, + util.validateHandler(handler, method, upgrade) - /* - The length of time to keep retrying in seconds. The last sleep period will - be shortened as necessary, so that the last retry runs at deadline (and not - considerably beyond it). The total time starting from when the initial - request is sent, after which an error will be returned, regardless of the - retrying attempts made meanwhile. - */ - totalTimeout: 600, + this.servername = util.getServerName(this.host) - noResponseRetries: 2, - currentRetryAttempt: 0, - shouldRetryFn: function (response) { - const retryRanges = [ - // https://en.wikipedia.org/wiki/List_of_HTTP_status_codes - // 1xx - Retry (Informational, request still processing) - // 2xx - Do not retry (Success) - // 3xx - Do not retry (Redirect) - // 4xx - Do not retry (Client errors) - // 429 - Retry ("Too Many Requests") - // 5xx - Retry (Server errors) - [100, 199], - [429, 429], - [500, 599], - ]; + this[kHandler] = handler - const statusCode = response.statusCode; - debug(`Response status: ${statusCode}`); + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }) + } + } - let range; - while ((range = retryRanges.shift())) { - if (statusCode >= range[0] && statusCode <= range[1]) { - // Not a successful status or redirect. - return true; + onBodySent (chunk) { + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk) + } catch (err) { + this.abort(err) } } - }, -}; - -function retryRequest(requestOpts, opts, callback) { - if (typeof requestOpts === 'string') { - requestOpts = {url: requestOpts}; } - const streamMode = typeof arguments[arguments.length - 1] !== 'function'; + onRequestSent () { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }) + } - if (typeof opts === 'function') { - callback = opts; + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent() + } catch (err) { + this.abort(err) + } + } } - const manualCurrentRetryAttemptWasSet = - opts && typeof opts.currentRetryAttempt === 'number'; - opts = extend({}, DEFAULTS, opts); + onConnect (abort) { + assert(!this.aborted) + assert(!this.completed) - if (typeof opts.request === 'undefined') { - throw new Error('A request library must be provided to retry-request.'); + if (this.error) { + abort(this.error) + } else { + this.abort = abort + return this[kHandler].onConnect(abort) + } } - let currentRetryAttempt = opts.currentRetryAttempt; + onHeaders (statusCode, headers, resume, statusText) { + assert(!this.aborted) + assert(!this.completed) - let numNoResponseAttempts = 0; - let streamResponseHandled = false; + if (channels.headers.hasSubscribers) { + channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) + } - let retryStream; - let requestStream; - let delayStream; + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText) + } catch (err) { + this.abort(err) + } + } - let activeRequest; - const retryRequest = { - abort: function () { - if (activeRequest && activeRequest.abort) { - activeRequest.abort(); - } - }, - }; + onData (chunk) { + assert(!this.aborted) + assert(!this.completed) - if (streamMode) { - retryStream = new PassThrough({objectMode: opts.objectMode}); - retryStream.abort = resetStreams; + try { + return this[kHandler].onData(chunk) + } catch (err) { + this.abort(err) + return false + } } - const timeOfFirstRequest = Date.now(); - if (currentRetryAttempt > 0) { - retryAfterDelay(currentRetryAttempt); - } else { - makeRequest(); - } + onUpgrade (statusCode, headers, socket) { + assert(!this.aborted) + assert(!this.completed) - if (streamMode) { - return retryStream; - } else { - return retryRequest; + return this[kHandler].onUpgrade(statusCode, headers, socket) } - function resetStreams() { - delayStream = null; + onComplete (trailers) { + this.onFinally() - if (requestStream) { - requestStream.abort && requestStream.abort(); - requestStream.cancel && requestStream.cancel(); + assert(!this.aborted) - if (requestStream.destroy) { - requestStream.destroy(); - } else if (requestStream.end) { - requestStream.end(); - } + this.completed = true + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }) + } + + try { + return this[kHandler].onComplete(trailers) + } catch (err) { + // TODO (fix): This might be a bad idea? + this.onError(err) } } - function makeRequest() { - let finishHandled = false; - currentRetryAttempt++; - debug(`Current retry attempt: ${currentRetryAttempt}`); + onError (error) { + this.onFinally() - function handleFinish(args = []) { - if (!finishHandled) { - finishHandled = true; - retryStream.emit('complete', ...args); - } + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }) } - if (streamMode) { - streamResponseHandled = false; + if (this.aborted) { + return + } + this.aborted = true - delayStream = new PassThrough({objectMode: opts.objectMode}); - requestStream = opts.request(requestOpts); + return this[kHandler].onError(error) + } - setImmediate(() => { - retryStream.emit('request'); - }); + onFinally () { + if (this.errorHandler) { + this.body.off('error', this.errorHandler) + this.errorHandler = null + } - requestStream - // gRPC via google-cloud-node can emit an `error` as well as a `response` - // Whichever it emits, we run with-- we can't run with both. That's what - // is up with the `streamResponseHandled` tracking. - .on('error', err => { - if (streamResponseHandled) { - return; - } + if (this.endHandler) { + this.body.off('end', this.endHandler) + this.endHandler = null + } + } - streamResponseHandled = true; - onResponse(err); - }) - .on('response', (resp, body) => { - if (streamResponseHandled) { - return; - } + // TODO: adjust to support H2 + addHeader (key, value) { + processHeader(this, key, value) + return this + } - streamResponseHandled = true; - onResponse(null, resp, body); - }) - .on('complete', (...params) => handleFinish(params)) - .on('finish', (...params) => handleFinish(params)); + static [kHTTP1BuildRequest] (origin, opts, handler) { + // TODO: Migrate header parsing here, to make Requests + // HTTP agnostic + return new Request(origin, opts, handler) + } - requestStream.pipe(delayStream); - } else { - activeRequest = opts.request(requestOpts, onResponse); + static [kHTTP2BuildRequest] (origin, opts, handler) { + const headers = opts.headers + opts = { ...opts, headers: null } + + const request = new Request(origin, opts, handler) + + request.headers = {} + + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError('headers array must be even') + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(request, headers[i], headers[i + 1], true) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(request, key, headers[key], true) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') } + + return request } - function retryAfterDelay(currentRetryAttempt) { - if (streamMode) { - resetStreams(); - } + static [kHTTP2CopyHeaders] (raw) { + const rawHeaders = raw.split('\r\n') + const headers = {} - const nextRetryDelay = getNextRetryDelay({ - maxRetryDelay: opts.maxRetryDelay, - retryDelayMultiplier: opts.retryDelayMultiplier, - retryNumber: currentRetryAttempt, - timeOfFirstRequest, - totalTimeout: opts.totalTimeout, - }); - debug(`Next retry delay: ${nextRetryDelay}`); + for (const header of rawHeaders) { + const [key, value] = header.split(': ') - if (nextRetryDelay <= 0) { - numNoResponseAttempts = opts.noResponseRetries + 1; - return; + if (value == null || value.length === 0) continue + + if (headers[key]) headers[key] += `,${value}` + else headers[key] = value } - setTimeout(makeRequest, nextRetryDelay); + return headers } +} - function onResponse(err, response, body) { - // An error such as DNS resolution. - if (err) { - numNoResponseAttempts++; +function processHeaderValue (key, val, skipAppend) { + if (val && typeof val === 'object') { + throw new InvalidArgumentError(`invalid ${key} header`) + } - if (numNoResponseAttempts <= opts.noResponseRetries) { - retryAfterDelay(numNoResponseAttempts); - } else { - if (streamMode) { - retryStream.emit('error', err); - retryStream.end(); - } else { - callback(err, response, body); - } - } + val = val != null ? `${val}` : '' - return; - } + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } - // Send the response to see if we should try again. - // NOTE: "currentRetryAttempt" isn't accurate by default, as it counts - // the very first request sent as the first "retry". It is only accurate - // when a user provides their own "currentRetryAttempt" option at - // instantiation. - const adjustedCurrentRetryAttempt = manualCurrentRetryAttemptWasSet - ? currentRetryAttempt - : currentRetryAttempt - 1; - if ( - adjustedCurrentRetryAttempt < opts.retries && - opts.shouldRetryFn(response) - ) { - retryAfterDelay(currentRetryAttempt); - return; - } + return skipAppend ? val : `${key}: ${val}\r\n` +} - // No more attempts need to be made, just continue on. - if (streamMode) { - retryStream.emit('response', response); - delayStream.pipe(retryStream); - requestStream.on('error', err => { - retryStream.destroy(err); - }); +function processHeader (request, key, val, skipAppend = false) { + if (val && (typeof val === 'object' && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`) + } else if (val === undefined) { + return + } + + if ( + request.host === null && + key.length === 4 && + key.toLowerCase() === 'host' + ) { + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + // Consumed by Client + request.host = val + } else if ( + request.contentLength === null && + key.length === 14 && + key.toLowerCase() === 'content-length' + ) { + request.contentLength = parseInt(val, 10) + if (!Number.isFinite(request.contentLength)) { + throw new InvalidArgumentError('invalid content-length header') + } + } else if ( + request.contentType === null && + key.length === 12 && + key.toLowerCase() === 'content-type' + ) { + request.contentType = val + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) + } else if ( + key.length === 17 && + key.toLowerCase() === 'transfer-encoding' + ) { + throw new InvalidArgumentError('invalid transfer-encoding header') + } else if ( + key.length === 10 && + key.toLowerCase() === 'connection' + ) { + const value = typeof val === 'string' ? val.toLowerCase() : null + if (value !== 'close' && value !== 'keep-alive') { + throw new InvalidArgumentError('invalid connection header') + } else if (value === 'close') { + request.reset = true + } + } else if ( + key.length === 10 && + key.toLowerCase() === 'keep-alive' + ) { + throw new InvalidArgumentError('invalid keep-alive header') + } else if ( + key.length === 7 && + key.toLowerCase() === 'upgrade' + ) { + throw new InvalidArgumentError('invalid upgrade header') + } else if ( + key.length === 6 && + key.toLowerCase() === 'expect' + ) { + throw new NotSupportedError('expect header not supported') + } else if (tokenRegExp.exec(key) === null) { + throw new InvalidArgumentError('invalid header key') + } else { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (skipAppend) { + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` + else request.headers[key] = processHeaderValue(key, val[i], skipAppend) + } else { + request.headers += processHeaderValue(key, val[i]) + } + } } else { - callback(err, response, body); + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) } } } -module.exports = retryRequest; - -function getNextRetryDelay(config) { - const { - maxRetryDelay, - retryDelayMultiplier, - retryNumber, - timeOfFirstRequest, - totalTimeout, - } = config; +module.exports = Request - const maxRetryDelayMs = maxRetryDelay * 1000; - const totalTimeoutMs = totalTimeout * 1000; - const jitter = Math.floor(Math.random() * 1000); - const calculatedNextRetryDelay = - Math.pow(retryDelayMultiplier, retryNumber) * 1000 + jitter; +/***/ }), - const maxAllowableDelayMs = - totalTimeoutMs - (Date.now() - timeOfFirstRequest); +/***/ 72785: +/***/ ((module) => { - return Math.min( - calculatedNextRetryDelay, - maxAllowableDelayMs, - maxRetryDelayMs - ); +module.exports = { + kClose: Symbol('close'), + kDestroy: Symbol('destroy'), + kDispatch: Symbol('dispatch'), + kUrl: Symbol('url'), + kWriting: Symbol('writing'), + kResuming: Symbol('resuming'), + kQueue: Symbol('queue'), + kConnect: Symbol('connect'), + kConnecting: Symbol('connecting'), + kHeadersList: Symbol('headers list'), + kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), + kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), + kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), + kKeepAliveTimeoutValue: Symbol('keep alive timeout'), + kKeepAlive: Symbol('keep alive'), + kHeadersTimeout: Symbol('headers timeout'), + kBodyTimeout: Symbol('body timeout'), + kServerName: Symbol('server name'), + kLocalAddress: Symbol('local address'), + kHost: Symbol('host'), + kNoRef: Symbol('no ref'), + kBodyUsed: Symbol('used'), + kRunning: Symbol('running'), + kBlocking: Symbol('blocking'), + kPending: Symbol('pending'), + kSize: Symbol('size'), + kBusy: Symbol('busy'), + kQueued: Symbol('queued'), + kFree: Symbol('free'), + kConnected: Symbol('connected'), + kClosed: Symbol('closed'), + kNeedDrain: Symbol('need drain'), + kReset: Symbol('reset'), + kDestroyed: Symbol.for('nodejs.stream.destroyed'), + kMaxHeadersSize: Symbol('max headers size'), + kRunningIdx: Symbol('running index'), + kPendingIdx: Symbol('pending index'), + kError: Symbol('error'), + kClients: Symbol('clients'), + kClient: Symbol('client'), + kParser: Symbol('parser'), + kOnDestroyed: Symbol('destroy callbacks'), + kPipelining: Symbol('pipelining'), + kSocket: Symbol('socket'), + kHostHeader: Symbol('host header'), + kConnector: Symbol('connector'), + kStrictContentLength: Symbol('strict content length'), + kMaxRedirections: Symbol('maxRedirections'), + kMaxRequests: Symbol('maxRequestsPerClient'), + kProxy: Symbol('proxy agent options'), + kCounter: Symbol('socket request counter'), + kInterceptors: Symbol('dispatch interceptors'), + kMaxResponseSize: Symbol('max response size'), + kHTTP2Session: Symbol('http2Session'), + kHTTP2SessionState: Symbol('http2Session state'), + kHTTP2BuildRequest: Symbol('http2 build request'), + kHTTP1BuildRequest: Symbol('http1 build request'), + kHTTP2CopyHeaders: Symbol('http2 copy headers'), + kHTTPConnVersion: Symbol('http connection version'), + kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), + kConstruct: Symbol('constructable') } -module.exports.defaults = DEFAULTS; -module.exports.getNextRetryDelay = getNextRetryDelay; - /***/ }), -/***/ 71604: +/***/ 83983: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(56244); +"use strict"; -/***/ }), -/***/ 56244: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const assert = __nccwpck_require__(39491) +const { kDestroyed, kBodyUsed } = __nccwpck_require__(72785) +const { IncomingMessage } = __nccwpck_require__(13685) +const stream = __nccwpck_require__(12781) +const net = __nccwpck_require__(41808) +const { InvalidArgumentError } = __nccwpck_require__(48045) +const { Blob } = __nccwpck_require__(14300) +const nodeUtil = __nccwpck_require__(73837) +const { stringify } = __nccwpck_require__(63477) +const { headerNameLowerCasedRecord } = __nccwpck_require__(14462) -var RetryOperation = __nccwpck_require__(45369); +const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) -exports.operation = function(options) { - var timeouts = exports.timeouts(options); - return new RetryOperation(timeouts, { - forever: options && (options.forever || options.retries === Infinity), - unref: options && options.unref, - maxRetryTime: options && options.maxRetryTime - }); -}; +function nop () {} -exports.timeouts = function(options) { - if (options instanceof Array) { - return [].concat(options); +function isStream (obj) { + return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' +} + +// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) +function isBlobLike (object) { + return (Blob && object instanceof Blob) || ( + object && + typeof object === 'object' && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + /^(Blob|File)$/.test(object[Symbol.toStringTag]) + ) +} + +function buildURL (url, queryParams) { + if (url.includes('?') || url.includes('#')) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".') } - var opts = { - retries: 10, - factor: 2, - minTimeout: 1 * 1000, - maxTimeout: Infinity, - randomize: false - }; - for (var key in options) { - opts[key] = options[key]; + const stringified = stringify(queryParams) + + if (stringified) { + url += '?' + stringified } - if (opts.minTimeout > opts.maxTimeout) { - throw new Error('minTimeout is greater than maxTimeout'); + return url +} + +function parseURL (url) { + if (typeof url === 'string') { + url = new URL(url) + + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + } + + return url } - var timeouts = []; - for (var i = 0; i < opts.retries; i++) { - timeouts.push(this.createTimeout(i, opts)); + if (!url || typeof url !== 'object') { + throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') } - if (options && options.forever && !timeouts.length) { - timeouts.push(this.createTimeout(i, opts)); + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') } - // sort the array numerically ascending - timeouts.sort(function(a,b) { - return a - b; - }); + if (!(url instanceof URL)) { + if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { + throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') + } - return timeouts; -}; + if (url.path != null && typeof url.path !== 'string') { + throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') + } -exports.createTimeout = function(attempt, opts) { - var random = (opts.randomize) - ? (Math.random() + 1) - : 1; + if (url.pathname != null && typeof url.pathname !== 'string') { + throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') + } - var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt)); - timeout = Math.min(timeout, opts.maxTimeout); + if (url.hostname != null && typeof url.hostname !== 'string') { + throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') + } - return timeout; -}; + if (url.origin != null && typeof url.origin !== 'string') { + throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') + } -exports.wrap = function(obj, options, methods) { - if (options instanceof Array) { - methods = options; - options = null; - } + const port = url.port != null + ? url.port + : (url.protocol === 'https:' ? 443 : 80) + let origin = url.origin != null + ? url.origin + : `${url.protocol}//${url.hostname}:${port}` + let path = url.path != null + ? url.path + : `${url.pathname || ''}${url.search || ''}` - if (!methods) { - methods = []; - for (var key in obj) { - if (typeof obj[key] === 'function') { - methods.push(key); - } + if (origin.endsWith('/')) { + origin = origin.substring(0, origin.length - 1) } - } - for (var i = 0; i < methods.length; i++) { - var method = methods[i]; - var original = obj[method]; + if (path && !path.startsWith('/')) { + path = `/${path}` + } + // new URL(path, origin) is unsafe when `path` contains an absolute URL + // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: + // If first parameter is a relative URL, second param is required, and will be used as the base URL. + // If first parameter is an absolute URL, a given second param will be ignored. + url = new URL(origin + path) + } - obj[method] = function retryWrapper(original) { - var op = exports.operation(options); - var args = Array.prototype.slice.call(arguments, 1); - var callback = args.pop(); + return url +} - args.push(function(err) { - if (op.retry(err)) { - return; - } - if (err) { - arguments[0] = op.mainError(); - } - callback.apply(this, arguments); - }); +function parseOrigin (url) { + url = parseURL(url) - op.attempt(function() { - original.apply(obj, args); - }); - }.bind(obj, original); - obj[method].options = options; + if (url.pathname !== '/' || url.search || url.hash) { + throw new InvalidArgumentError('invalid url') } -}; + return url +} -/***/ }), +function getHostname (host) { + if (host[0] === '[') { + const idx = host.indexOf(']') -/***/ 45369: -/***/ ((module) => { + assert(idx !== -1) + return host.substring(1, idx) + } -function RetryOperation(timeouts, options) { - // Compatibility for the old (timeouts, retryForever) signature - if (typeof options === 'boolean') { - options = { forever: options }; + const idx = host.indexOf(':') + if (idx === -1) return host + + return host.substring(0, idx) +} + +// IP addresses are not valid server names per RFC6066 +// > Currently, the only server names supported are DNS hostnames +function getServerName (host) { + if (!host) { + return null } - this._originalTimeouts = JSON.parse(JSON.stringify(timeouts)); - this._timeouts = timeouts; - this._options = options || {}; - this._maxRetryTime = options && options.maxRetryTime || Infinity; - this._fn = null; - this._errors = []; - this._attempts = 1; - this._operationTimeout = null; - this._operationTimeoutCb = null; - this._timeout = null; - this._operationStart = null; - this._timer = null; + assert.strictEqual(typeof host, 'string') - if (this._options.forever) { - this._cachedTimeouts = this._timeouts.slice(0); + const servername = getHostname(host) + if (net.isIP(servername)) { + return '' } -} -module.exports = RetryOperation; -RetryOperation.prototype.reset = function() { - this._attempts = 1; - this._timeouts = this._originalTimeouts.slice(0); + return servername } -RetryOperation.prototype.stop = function() { - if (this._timeout) { - clearTimeout(this._timeout); - } - if (this._timer) { - clearTimeout(this._timer); - } +function deepClone (obj) { + return JSON.parse(JSON.stringify(obj)) +} - this._timeouts = []; - this._cachedTimeouts = null; -}; +function isAsyncIterable (obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') +} -RetryOperation.prototype.retry = function(err) { - if (this._timeout) { - clearTimeout(this._timeout); - } +function isIterable (obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) +} - if (!err) { - return false; - } - var currentTime = new Date().getTime(); - if (err && currentTime - this._operationStart >= this._maxRetryTime) { - this._errors.push(err); - this._errors.unshift(new Error('RetryOperation timeout occurred')); - return false; +function bodyLength (body) { + if (body == null) { + return 0 + } else if (isStream(body)) { + const state = body._readableState + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) + ? state.length + : null + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null + } else if (isBuffer(body)) { + return body.byteLength } - this._errors.push(err); + return null +} - var timeout = this._timeouts.shift(); - if (timeout === undefined) { - if (this._cachedTimeouts) { - // retry forever, only keep last error - this._errors.splice(0, this._errors.length - 1); - timeout = this._cachedTimeouts.slice(-1); - } else { - return false; - } - } +function isDestroyed (stream) { + return !stream || !!(stream.destroyed || stream[kDestroyed]) +} - var self = this; - this._timer = setTimeout(function() { - self._attempts++; +function isReadableAborted (stream) { + const state = stream && stream._readableState + return isDestroyed(stream) && state && !state.endEmitted +} - if (self._operationTimeoutCb) { - self._timeout = setTimeout(function() { - self._operationTimeoutCb(self._attempts); - }, self._operationTimeout); +function destroy (stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) { + return + } - if (self._options.unref) { - self._timeout.unref(); - } + if (typeof stream.destroy === 'function') { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { + // See: https://github.com/nodejs/node/pull/38505/files + stream.socket = null } - self._fn(self._attempts); - }, timeout); + stream.destroy(err) + } else if (err) { + process.nextTick((stream, err) => { + stream.emit('error', err) + }, stream, err) + } - if (this._options.unref) { - this._timer.unref(); + if (stream.destroyed !== true) { + stream[kDestroyed] = true } +} - return true; -}; +const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ +function parseKeepAliveTimeout (val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) + return m ? parseInt(m[1], 10) * 1000 : null +} -RetryOperation.prototype.attempt = function(fn, timeoutOps) { - this._fn = fn; +/** + * Retrieves a header name and returns its lowercase value. + * @param {string | Buffer} value Header name + * @returns {string} + */ +function headerNameToString (value) { + return headerNameLowerCasedRecord[value] || value.toLowerCase() +} - if (timeoutOps) { - if (timeoutOps.timeout) { - this._operationTimeout = timeoutOps.timeout; - } - if (timeoutOps.cb) { - this._operationTimeoutCb = timeoutOps.cb; +function parseHeaders (headers, obj = {}) { + // For H2 support + if (!Array.isArray(headers)) return headers + + for (let i = 0; i < headers.length; i += 2) { + const key = headers[i].toString().toLowerCase() + let val = obj[key] + + if (!val) { + if (Array.isArray(headers[i + 1])) { + obj[key] = headers[i + 1].map(x => x.toString('utf8')) + } else { + obj[key] = headers[i + 1].toString('utf8') + } + } else { + if (!Array.isArray(val)) { + val = [val] + obj[key] = val + } + val.push(headers[i + 1].toString('utf8')) } } - var self = this; - if (this._operationTimeoutCb) { - this._timeout = setTimeout(function() { - self._operationTimeoutCb(); - }, self._operationTimeout); + // See https://github.com/nodejs/node/pull/46528 + if ('content-length' in obj && 'content-disposition' in obj) { + obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') } - this._operationStart = new Date().getTime(); + return obj +} - this._fn(this._attempts); -}; +function parseRawHeaders (headers) { + const ret = [] + let hasContentLength = false + let contentDispositionIdx = -1 -RetryOperation.prototype.try = function(fn) { - console.log('Using RetryOperation.try() is deprecated'); - this.attempt(fn); -}; + for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0].toString() + const val = headers[n + 1].toString('utf8') -RetryOperation.prototype.start = function(fn) { - console.log('Using RetryOperation.start() is deprecated'); - this.attempt(fn); -}; + if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) { + ret.push(key, val) + hasContentLength = true + } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { + contentDispositionIdx = ret.push(key, val) - 1 + } else { + ret.push(key, val) + } + } -RetryOperation.prototype.start = RetryOperation.prototype.try; + // See https://github.com/nodejs/node/pull/46528 + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') + } -RetryOperation.prototype.errors = function() { - return this._errors; -}; + return ret +} -RetryOperation.prototype.attempts = function() { - return this._attempts; -}; +function isBuffer (buffer) { + // See, https://github.com/mcollina/undici/pull/319 + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) +} -RetryOperation.prototype.mainError = function() { - if (this._errors.length === 0) { - return null; +function validateHandler (handler, method, upgrade) { + if (!handler || typeof handler !== 'object') { + throw new InvalidArgumentError('handler must be an object') } - var counts = {}; - var mainError = null; - var mainErrorCount = 0; + if (typeof handler.onConnect !== 'function') { + throw new InvalidArgumentError('invalid onConnect method') + } - for (var i = 0; i < this._errors.length; i++) { - var error = this._errors[i]; - var message = error.message; - var count = (counts[message] || 0) + 1; + if (typeof handler.onError !== 'function') { + throw new InvalidArgumentError('invalid onError method') + } - counts[message] = count; + if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { + throw new InvalidArgumentError('invalid onBodySent method') + } - if (count >= mainErrorCount) { - mainError = error; - mainErrorCount = count; + if (upgrade || method === 'CONNECT') { + if (typeof handler.onUpgrade !== 'function') { + throw new InvalidArgumentError('invalid onUpgrade method') + } + } else { + if (typeof handler.onHeaders !== 'function') { + throw new InvalidArgumentError('invalid onHeaders method') } - } - return mainError; -}; + if (typeof handler.onData !== 'function') { + throw new InvalidArgumentError('invalid onData method') + } + if (typeof handler.onComplete !== 'function') { + throw new InvalidArgumentError('invalid onComplete method') + } + } +} -/***/ }), +// A body is disturbed if it has been read from and it cannot +// be re-used without losing state or data. +function isDisturbed (body) { + return !!(body && ( + stream.isDisturbed + ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? + : body[kBodyUsed] || + body.readableDidRead || + (body._readableState && body._readableState.dataEmitted) || + isReadableAborted(body) + )) +} -/***/ 21867: -/***/ ((module, exports, __nccwpck_require__) => { +function isErrored (body) { + return !!(body && ( + stream.isErrored + ? stream.isErrored(body) + : /state: 'errored'/.test(nodeUtil.inspect(body) + ))) +} -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = __nccwpck_require__(14300) -var Buffer = buffer.Buffer +function isReadable (body) { + return !!(body && ( + stream.isReadable + ? stream.isReadable(body) + : /state: 'readable'/.test(nodeUtil.inspect(body) + ))) +} -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] +function getSocketInfo (socket) { + return { + localAddress: socket.localAddress, + localPort: socket.localPort, + remoteAddress: socket.remoteAddress, + remotePort: socket.remotePort, + remoteFamily: socket.remoteFamily, + timeout: socket.timeout, + bytesWritten: socket.bytesWritten, + bytesRead: socket.bytesRead } } -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) +async function * convertIterableToBuffer (iterable) { + for await (const chunk of iterable) { + yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) + } } -SafeBuffer.prototype = Object.create(Buffer.prototype) +let ReadableStream +function ReadableStreamFrom (iterable) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + + if (ReadableStream.from) { + return ReadableStream.from(convertIterableToBuffer(iterable)) + } -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) + let iterator + return new ReadableStream( + { + async start () { + iterator = iterable[Symbol.asyncIterator]() + }, + async pull (controller) { + const { done, value } = await iterator.next() + if (done) { + queueMicrotask(() => { + controller.close() + }) + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) + controller.enqueue(new Uint8Array(buf)) + } + return controller.desiredSize > 0 + }, + async cancel (reason) { + await iterator.return() + } + }, + 0 + ) +} -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) +// The chunk should be a FormData instance and contains +// all the required methods. +function isFormDataLike (object) { + return ( + object && + typeof object === 'object' && + typeof object.append === 'function' && + typeof object.delete === 'function' && + typeof object.get === 'function' && + typeof object.getAll === 'function' && + typeof object.has === 'function' && + typeof object.set === 'function' && + object[Symbol.toStringTag] === 'FormData' + ) } -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } +function throwIfAborted (signal) { + if (!signal) { return } + if (typeof signal.throwIfAborted === 'function') { + signal.throwIfAborted() } else { - buf.fill(0) + if (signal.aborted) { + // DOMException not available < v17.0.0 + const err = new Error('The operation was aborted') + err.name = 'AbortError' + throw err + } } - return buf } -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') +function addAbortListener (signal, listener) { + if ('addEventListener' in signal) { + signal.addEventListener('abort', listener, { once: true }) + return () => signal.removeEventListener('abort', listener) } - return Buffer(size) + signal.addListener('abort', listener) + return () => signal.removeListener('abort', listener) } -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') +const hasToWellFormed = !!String.prototype.toWellFormed + +/** + * @param {string} val + */ +function toUSVString (val) { + if (hasToWellFormed) { + return `${val}`.toWellFormed() + } else if (nodeUtil.toUSVString) { + return nodeUtil.toUSVString(val) } - return buffer.SlowBuffer(size) + + return `${val}` } +// Parsed accordingly to RFC 9110 +// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +function parseRangeHeader (range) { + if (range == null || range === '') return { start: 0, end: null, size: null } -/***/ }), + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null + return m + ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } + : null +} -/***/ 91532: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const kEnumerableProperty = Object.create(null) +kEnumerableProperty.enumerable = true -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } +module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isReadableAborted, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + throwIfAborted, + addAbortListener, + parseRangeHeader, + nodeMajor, + nodeMinor, + nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), + safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] +} - constructor (comp, options) { - options = parseOptions(options) - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } +/***/ }), - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) +/***/ 74839: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } +"use strict"; - debug('comp', this) - } - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) +const Dispatcher = __nccwpck_require__(60412) +const { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError +} = __nccwpck_require__(48045) +const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(72785) - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } +const kDestroyed = Symbol('destroyed') +const kClosed = Symbol('closed') +const kOnDestroyed = Symbol('onDestroyed') +const kOnClosed = Symbol('onClosed') +const kInterceptedDispatch = Symbol('Intercepted Dispatch') - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } +class DispatcherBase extends Dispatcher { + constructor () { + super() - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } + this[kDestroyed] = false + this[kOnDestroyed] = null + this[kClosed] = false + this[kOnClosed] = [] } - toString () { - return this.value + get destroyed () { + return this[kDestroyed] } - test (version) { - debug('Comparator.test', version, this.options.loose) + get closed () { + return this[kClosed] + } - if (this.semver === ANY || version === ANY) { - return true - } + get interceptors () { + return this[kInterceptors] + } - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false + set interceptors (newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) { + const interceptor = this[kInterceptors][i] + if (typeof interceptor !== 'function') { + throw new InvalidArgumentError('interceptor must be an function') + } } } - return cmp(version, this.operator, this.semver, this.options) + this[kInterceptors] = newInterceptors } - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) + close (callback) { + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data) + }) + }) } - options = parseOptions(options) - - // Special cases where nothing can possibly be lower - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') } - // Same direction increasing (> or >=) - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - // Same direction decreasing (< or <=) - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - // same SemVer and both sides are inclusive (<= or >=) - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - // opposite directions less than - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - // opposite directions greater than - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)) + return } - return false - } -} - -module.exports = Comparator - -const parseOptions = __nccwpck_require__(40785) -const { safeRe: re, t } = __nccwpck_require__(9523) -const cmp = __nccwpck_require__(75098) -const debug = __nccwpck_require__(50427) -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) - - -/***/ }), - -/***/ 9828: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback) } else { - return new Range(range.raw, options) + queueMicrotask(() => callback(null, null)) } + return } - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.format() - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range - .trim() - .split(/\s+/) - .join(' ') - - // First, split on || - this.set = this.raw - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } + this[kClosed] = true + this[kOnClosed].push(callback) - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } + const onClosed = () => { + const callbacks = this[kOnClosed] + this[kOnClosed] = null + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null) } } - this.format() - } - - format () { - this.range = this.set - .map((comps) => comps.join(' ').trim()) - .join('||') - .trim() - return this.range - } - - toString () { - return this.range + // Should not error. + this[kClose]() + .then(() => this.destroy()) + .then(() => { + queueMicrotask(onClosed) + }) } - parseRange (range) { - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE) - const memoKey = memoOpts + ':' + range - const cached = cache.get(memoKey) - if (cached) { - return cached + destroy (err, callback) { + if (typeof err === 'function') { + callback = err + err = null } - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - debug('tilde trim', range) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - debug('caret trim', range) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) + }) }) } - debug('range list', rangeList) - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] + if (typeof callback !== 'function') { + throw new InvalidArgumentError('invalid callback') + } + + if (this[kDestroyed]) { + if (this[kOnDestroyed]) { + this[kOnDestroyed].push(callback) + } else { + queueMicrotask(() => callback(null, null)) } - rangeMap.set(comp.value, comp) + return } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') + + if (!err) { + err = new ClientDestroyedError() } - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } + this[kDestroyed] = true + this[kOnDestroyed] = this[kOnDestroyed] || [] + this[kOnDestroyed].push(callback) - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') + const onDestroyed = () => { + const callbacks = this[kOnDestroyed] + this[kOnDestroyed] = null + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null) + } } - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) + // Should not error. + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed) }) } - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } + [kInterceptedDispatch] (opts, handler) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch] + return this[kDispatch](opts, handler) } - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } + let dispatch = this[kDispatch].bind(this) + for (let i = this[kInterceptors].length - 1; i >= 0; i--) { + dispatch = this[kInterceptors][i](dispatch) } - return false + this[kInterceptedDispatch] = dispatch + return dispatch(opts, handler) } -} -module.exports = Range + dispatch (opts, handler) { + if (!handler || typeof handler !== 'object') { + throw new InvalidArgumentError('handler must be an object') + } -const LRU = __nccwpck_require__(81196) -const cache = new LRU({ max: 1000 }) + try { + if (!opts || typeof opts !== 'object') { + throw new InvalidArgumentError('opts must be an object.') + } -const parseOptions = __nccwpck_require__(40785) -const Comparator = __nccwpck_require__(91532) -const debug = __nccwpck_require__(50427) -const SemVer = __nccwpck_require__(48088) -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = __nccwpck_require__(9523) -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(42293) + if (this[kDestroyed] || this[kOnDestroyed]) { + throw new ClientDestroyedError() + } -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' + if (this[kClosed]) { + throw new ClientClosedError() + } -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() + return this[kInterceptedDispatch](opts, handler) + } catch (err) { + if (typeof handler.onError !== 'function') { + throw new InvalidArgumentError('invalid onError method') + } - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) + handler.onError(err) - testComparator = remainingComparators.pop() + return false + } } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp } -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' +module.exports = DispatcherBase -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret +/***/ }), - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } +/***/ 60412: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - debug('tilde return', ret) - return ret - }) -} +"use strict"; -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret +const EventEmitter = __nccwpck_require__(82361) - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } +class Dispatcher extends EventEmitter { + dispatch () { + throw new Error('not implemented') + } - debug('caret return', ret) - return ret - }) -} + close () { + throw new Error('not implemented') + } -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') + destroy () { + throw new Error('not implemented') + } } -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } +module.exports = Dispatcher - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 +/***/ }), - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } +/***/ 41472: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (gtlt === '<') { - pr = '-0' - } +"use strict"; - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - debug('xRange return', ret) +const Busboy = __nccwpck_require__(50727) +const util = __nccwpck_require__(83983) +const { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody +} = __nccwpck_require__(52538) +const { FormData } = __nccwpck_require__(72015) +const { kState } = __nccwpck_require__(15861) +const { webidl } = __nccwpck_require__(21744) +const { DOMException, structuredClone } = __nccwpck_require__(41037) +const { Blob, File: NativeFile } = __nccwpck_require__(14300) +const { kBodyUsed } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { isErrored } = __nccwpck_require__(83983) +const { isUint8Array, isArrayBuffer } = __nccwpck_require__(29830) +const { File: UndiciFile } = __nccwpck_require__(78511) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) - return ret - }) +let random +try { + const crypto = __nccwpck_require__(6005) + random = (max) => crypto.randomInt(0, max) +} catch { + random = (max) => Math.floor(Math.random(max)) } -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') -} +let ReadableStream = globalThis.ReadableStream -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile +const textEncoder = new TextEncoder() +const textDecoder = new TextDecoder() -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` +// https://fetch.spec.whatwg.org/#concept-bodyinit-extract +function extractBody (object, keepalive = false) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) } - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` + // 1. Let stream be null. + let stream = null + + // 2. If object is a ReadableStream object, then set stream to object. + if (object instanceof ReadableStream) { + stream = object + } else if (isBlobLike(object)) { + // 3. Otherwise, if object is a Blob object, set stream to the + // result of running object’s get stream. + stream = object.stream() } else { - to = `<=${to}` + // 4. Otherwise, set stream to a new ReadableStream object, and set + // up stream. + stream = new ReadableStream({ + async pull (controller) { + controller.enqueue( + typeof source === 'string' ? textEncoder.encode(source) : source + ) + queueMicrotask(() => readableStreamClose(controller)) + }, + start () {}, + type: undefined + }) } - return `${from} ${to}`.trim() -} + // 5. Assert: stream is a ReadableStream object. + assert(isReadableStreamLike(stream)) -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } + // 6. Let action be null. + let action = null - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } + // 7. Let source be null. + let source = null - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } + // 8. Let length be null. + let length = null - // Version has a -pre, but it's not one of the ones we like. - return false - } + // 9. Let type be null. + let type = null - return true -} + // 10. Switch on object: + if (typeof object === 'string') { + // Set source to the UTF-8 encoding of object. + // Note: setting source to a Uint8Array here breaks some mocking assumptions. + source = object + + // Set type to `text/plain;charset=UTF-8`. + type = 'text/plain;charset=UTF-8' + } else if (object instanceof URLSearchParams) { + // URLSearchParams + // spec says to run application/x-www-form-urlencoded on body.list + // this is implemented in Node.js as apart of an URLSearchParams instance toString method + // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 + // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 -/***/ }), + // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. + source = object.toString() -/***/ 48088: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. + type = 'application/x-www-form-urlencoded;charset=UTF-8' + } else if (isArrayBuffer(object)) { + // BufferSource/ArrayBuffer -const debug = __nccwpck_require__(50427) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(42293) -const { safeRe: re, t } = __nccwpck_require__(9523) + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.slice()) + } else if (ArrayBuffer.isView(object)) { + // BufferSource/ArrayBufferView -const parseOptions = __nccwpck_require__(40785) -const { compareIdentifiers } = __nccwpck_require__(92463) -class SemVer { - constructor (version, options) { - options = parseOptions(options) + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) + } else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` + const prefix = `--${boundary}\r\nContent-Disposition: form-data` - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version + /*! formdata-polyfill. MIT License. Jimmy Wärting */ + const escape = (str) => + str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') + + // Set action to this step: run the multipart/form-data + // encoding algorithm, with object’s entry list and UTF-8. + // - This ensures that the body is immutable and can't be changed afterwords + // - That the content-length is calculated in advance. + // - And that all parts are pre-encoded and ready to be sent. + + const blobParts = [] + const rn = new Uint8Array([13, 10]) // '\r\n' + length = 0 + let hasUnknownSizeValue = false + + for (const [name, value] of object) { + if (typeof value === 'string') { + const chunk = textEncoder.encode(prefix + + `; name="${escape(normalizeLinefeeds(name))}"` + + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) + blobParts.push(chunk) + length += chunk.byteLength } else { - version = version.version + const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + + (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + + `Content-Type: ${ + value.type || 'application/octet-stream' + }\r\n\r\n`) + blobParts.push(chunk, value, rn) + if (typeof value.size === 'number') { + length += chunk.byteLength + value.size + rn.byteLength + } else { + hasUnknownSizeValue = true + } } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) } - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) + const chunk = textEncoder.encode(`--${boundary}--`) + blobParts.push(chunk) + length += chunk.byteLength + if (hasUnknownSizeValue) { + length = null } - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + // Set source to object. + source = object - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) + action = async function * () { + for (const part of blobParts) { + if (part.stream) { + yield * part.stream() + } else { + yield part + } + } } - this.raw = version + // Set type to `multipart/form-data; boundary=`, + // followed by the multipart/form-data boundary string generated + // by the multipart/form-data encoding algorithm. + type = 'multipart/form-data; boundary=' + boundary + } else if (isBlobLike(object)) { + // Blob - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] + // Set source to object. + source = object - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } + // Set length to object’s size. + length = object.size - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') + // If object’s type attribute is not the empty byte sequence, set + // type to its value. + if (object.type) { + type = object.type } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') + } else if (typeof object[Symbol.asyncIterator] === 'function') { + // If keepalive is true, then throw a TypeError. + if (keepalive) { + throw new TypeError('keepalive') } - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) + // If object is disturbed or locked, then throw a TypeError. + if (util.isDisturbed(object) || object.locked) { + throw new TypeError( + 'Response body object should not be disturbed or locked' + ) } - this.build = m[5] ? m[5].split('.') : [] - this.format() + stream = + object instanceof ReadableStream ? object : ReadableStreamFrom(object) } - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version + // 11. If source is a byte sequence, then set action to a + // step that returns source and length to source’s length. + if (typeof source === 'string' || util.isBuffer(source)) { + length = Buffer.byteLength(source) } - toString () { - return this.version + // 12. If action is non-null, then run these steps in in parallel: + if (action != null) { + // Run action. + let iterator + stream = new ReadableStream({ + async start () { + iterator = action(object)[Symbol.asyncIterator]() + }, + async pull (controller) { + const { value, done } = await iterator.next() + if (done) { + // When running action is done, close stream. + queueMicrotask(() => { + controller.close() + }) + } else { + // Whenever one or more bytes are available and stream is not errored, + // enqueue a Uint8Array wrapping an ArrayBuffer containing the available + // bytes into stream. + if (!isErrored(stream)) { + controller.enqueue(new Uint8Array(value)) + } + } + return controller.desiredSize > 0 + }, + async cancel (reason) { + await iterator.return() + }, + type: undefined + }) } - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } + // 13. Let body be a body whose stream is stream, source is source, + // and length is length. + const body = { stream, source, length } - if (other.version === this.version) { - return 0 - } + // 14. Return (body, type). + return [body, type] +} - return this.compareMain(other) || this.comparePre(other) +// https://fetch.spec.whatwg.org/#bodyinit-safely-extract +function safelyExtractBody (object, keepalive = false) { + if (!ReadableStream) { + // istanbul ignore next + ReadableStream = (__nccwpck_require__(35356).ReadableStream) } - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } + // To safely extract a body and a `Content-Type` value from + // a byte sequence or BodyInit object object, run these steps: - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) + // 1. If object is a ReadableStream object, then: + if (object instanceof ReadableStream) { + // Assert: object is neither disturbed nor locked. + // istanbul ignore next + assert(!util.isDisturbed(object), 'The body has already been consumed.') + // istanbul ignore next + assert(!object.locked, 'The stream is locked.') } - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } + // 2. Return the results of extracting object. + return extractBody(object, keepalive) +} - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } +function cloneBody (body) { + // To clone a body body, run these steps: - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } + // https://fetch.spec.whatwg.org/#concept-body-clone - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } + // 1. Let « out1, out2 » be the result of teeing body’s stream. + const [out1, out2] = body.stream.tee() + const out2Clone = structuredClone(out2, { transfer: [out2] }) + // This, for whatever reasons, unrefs out2Clone which allows + // the process to exit by itself. + const [, finalClone] = out2Clone.tee() - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } + // 2. Set body’s stream to out1. + body.stream = out1 - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier, identifierBase) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier, identifierBase) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) - } - this.inc('pre', identifier, identifierBase) - break + // 3. Return a body whose stream is out2 and other members are copied from body. + return { + stream: finalClone, + length: body.length, + source: body.source + } +} - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 +async function * consumeBody (body) { + if (body) { + if (isUint8Array(body)) { + yield body + } else { + const stream = body.stream - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } + if (util.isDisturbed(stream)) { + throw new TypeError('The body has already been consumed.') + } - if (this.prerelease.length === 0) { - this.prerelease = [base] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease - } - } else { - this.prerelease = prerelease - } - } - break + if (stream.locked) { + throw new TypeError('The stream is locked.') } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` + + // Compat. + stream[kBodyUsed] = true + + yield * stream } - return this } } -module.exports = SemVer +function throwIfAborted (state) { + if (state.aborted) { + throw new DOMException('The operation was aborted.', 'AbortError') + } +} +function bodyMixinMethods (instance) { + const methods = { + blob () { + // The blob() method steps are to return the result of + // running consume body with this and the following step + // given a byte sequence bytes: return a Blob whose + // contents are bytes and whose type attribute is this’s + // MIME type. + return specConsumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this) -/***/ }), + if (mimeType === 'failure') { + mimeType = '' + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType) + } -/***/ 48848: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Return a Blob whose contents are bytes and type attribute + // is mimeType. + return new Blob([bytes], { type: mimeType }) + }, instance) + }, -const parse = __nccwpck_require__(75925) -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean + arrayBuffer () { + // The arrayBuffer() method steps are to return the result + // of running consume body with this and the following step + // given a byte sequence bytes: return a new ArrayBuffer + // whose contents are bytes. + return specConsumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer + }, instance) + }, + text () { + // The text() method steps are to return the result of running + // consume body with this and UTF-8 decode. + return specConsumeBody(this, utf8DecodeBytes, instance) + }, -/***/ }), + json () { + // The json() method steps are to return the result of running + // consume body with this and parse JSON from bytes. + return specConsumeBody(this, parseJSONFromBytes, instance) + }, -/***/ 75098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + async formData () { + webidl.brandCheck(this, instance) -const eq = __nccwpck_require__(91898) -const neq = __nccwpck_require__(6017) -const gt = __nccwpck_require__(84123) -const gte = __nccwpck_require__(15522) -const lt = __nccwpck_require__(80194) -const lte = __nccwpck_require__(77520) + throwIfAborted(this[kState]) -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a === b + const contentType = this.headers.get('Content-Type') - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a !== b + // If mimeType’s essence is "multipart/form-data", then: + if (/multipart\/form-data/.test(contentType)) { + const headers = {} + for (const [key, value] of this.headers) headers[key.toLowerCase()] = value - case '': - case '=': - case '==': - return eq(a, b, loose) + const responseFormData = new FormData() - case '!=': - return neq(a, b, loose) + let busboy - case '>': - return gt(a, b, loose) + try { + busboy = new Busboy({ + headers, + preservePath: true + }) + } catch (err) { + throw new DOMException(`${err}`, 'AbortError') + } - case '>=': - return gte(a, b, loose) + busboy.on('field', (name, value) => { + responseFormData.append(name, value) + }) + busboy.on('file', (name, value, filename, encoding, mimeType) => { + const chunks = [] - case '<': - return lt(a, b, loose) + if (encoding === 'base64' || encoding.toLowerCase() === 'base64') { + let base64chunk = '' - case '<=': - return lte(a, b, loose) + value.on('data', (chunk) => { + base64chunk += chunk.toString().replace(/[\r\n]/gm, '') - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp + const end = base64chunk.length - base64chunk.length % 4 + chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64')) + + base64chunk = base64chunk.slice(end) + }) + value.on('end', () => { + chunks.push(Buffer.from(base64chunk, 'base64')) + responseFormData.append(name, new File(chunks, filename, { type: mimeType })) + }) + } else { + value.on('data', (chunk) => { + chunks.push(chunk) + }) + value.on('end', () => { + responseFormData.append(name, new File(chunks, filename, { type: mimeType })) + }) + } + }) + const busboyResolve = new Promise((resolve, reject) => { + busboy.on('finish', resolve) + busboy.on('error', (err) => reject(new TypeError(err))) + }) -/***/ }), + if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk) + busboy.end() + await busboyResolve -/***/ 13466: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return responseFormData + } else if (/application\/x-www-form-urlencoded/.test(contentType)) { + // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then: -const SemVer = __nccwpck_require__(48088) -const parse = __nccwpck_require__(75925) -const { safeRe: re, t } = __nccwpck_require__(9523) + // 1. Let entries be the result of parsing bytes. + let entries + try { + let text = '' + // application/x-www-form-urlencoded parser will keep the BOM. + // https://url.spec.whatwg.org/#concept-urlencoded-parser + // Note that streaming decoder is stateful and cannot be reused + const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } + for await (const chunk of consumeBody(this[kState].body)) { + if (!isUint8Array(chunk)) { + throw new TypeError('Expected Uint8Array chunk') + } + text += streamingDecoder.decode(chunk, { stream: true }) + } + text += streamingDecoder.decode() + entries = new URLSearchParams(text) + } catch (err) { + // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. + // 2. If entries is failure, then throw a TypeError. + throw Object.assign(new TypeError(), { cause: err }) + } - if (typeof version === 'number') { - version = String(version) + // 3. Return a new FormData object whose entries are entries. + const formData = new FormData() + for (const [name, value] of entries) { + formData.append(name, value) + } + return formData + } else { + // Wait a tick before checking if the request has been aborted. + // Otherwise, a TypeError can be thrown when an AbortError should. + await Promise.resolve() + + throwIfAborted(this[kState]) + + // Otherwise, throw a TypeError. + throw webidl.errors.exception({ + header: `${instance.name}.formData`, + message: 'Could not parse content as FormData.' + }) + } + } } - if (typeof version !== 'string') { - return null + return methods +} + +function mixinBody (prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)) +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {Response|Request} object + * @param {(value: unknown) => unknown} convertBytesToJSValue + * @param {Response|Request} instance + */ +async function specConsumeBody (object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance) + + throwIfAborted(object[kState]) + + // 1. If object is unusable, then return a promise rejected + // with a TypeError. + if (bodyUnusable(object[kState].body)) { + throw new TypeError('Body is unusable') } - options = options || {} + // 2. Let promise be a new promise. + const promise = createDeferredPromise() - let match = null - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] - let next - while ((next = coerceRtlRegex.exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length + // 3. Let errorSteps given error be to reject promise with error. + const errorSteps = (error) => promise.reject(error) + + // 4. Let successSteps given a byte sequence data be to resolve + // promise with the result of running convertBytesToJSValue + // with data. If that threw an exception, then run errorSteps + // with that exception. + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)) + } catch (e) { + errorSteps(e) } - // leave it in a clean state - coerceRtlRegex.lastIndex = -1 } - if (match === null) { - return null + // 5. If object’s body is null, then run successSteps with an + // empty byte sequence. + if (object[kState].body == null) { + successSteps(new Uint8Array()) + return promise.promise } - const major = match[2] - const minor = match[3] || '0' - const patch = match[4] || '0' - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' - const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' + // 6. Otherwise, fully read object’s body given successSteps, + // errorSteps, and object’s relevant global object. + await fullyReadBody(object[kState].body, successSteps, errorSteps) - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) + // 7. Return promise. + return promise.promise +} + +// https://fetch.spec.whatwg.org/#body-unusable +function bodyUnusable (body) { + // An object including the Body interface mixin is + // said to be unusable if its body is non-null and + // its body’s stream is disturbed or locked. + return body != null && (body.stream.locked || util.isDisturbed(body.stream)) } -module.exports = coerce +/** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ +function utf8DecodeBytes (buffer) { + if (buffer.length === 0) { + return '' + } -/***/ }), + // 1. Let buffer be the result of peeking three bytes from + // ioQueue, converted to a byte sequence. -/***/ 92156: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 2. If buffer is 0xEF 0xBB 0xBF, then read three + // bytes from ioQueue. (Do nothing with those bytes.) + if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { + buffer = buffer.subarray(3) + } -const SemVer = __nccwpck_require__(48088) -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) + // 3. Process a queue with an instance of UTF-8’s + // decoder, ioQueue, output, and "replacement". + const output = textDecoder.decode(buffer) + + // 4. Return output. + return output } -module.exports = compareBuild +/** + * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value + * @param {Uint8Array} bytes + */ +function parseJSONFromBytes (bytes) { + return JSON.parse(utf8DecodeBytes(bytes)) +} -/***/ }), +/** + * @see https://fetch.spec.whatwg.org/#concept-body-mime-type + * @param {import('./response').Response|import('./request').Request} object + */ +function bodyMimeType (object) { + const { headersList } = object[kState] + const contentType = headersList.get('content-type') -/***/ 62804: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (contentType === null) { + return 'failure' + } -const compare = __nccwpck_require__(44309) -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose + return parseMIMEType(contentType) +} + +module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody +} /***/ }), -/***/ 44309: +/***/ 41037: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const SemVer = __nccwpck_require__(48088) -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) +"use strict"; -module.exports = compare +const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(71267) -/***/ }), +const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] +const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) -/***/ 64297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const nullBodyStatus = [101, 204, 205, 304] -const parse = __nccwpck_require__(75925) +const redirectStatus = [301, 302, 303, 307, 308] +const redirectStatusSet = new Set(redirectStatus) -const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) +// https://fetch.spec.whatwg.org/#block-bad-port +const badPorts = [ + '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', + '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', + '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', + '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', + '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', + '10080' +] - if (comparison === 0) { - return null - } +const badPortsSet = new Set(badPorts) - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length +// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies +const referrerPolicy = [ + '', + 'no-referrer', + 'no-referrer-when-downgrade', + 'same-origin', + 'origin', + 'strict-origin', + 'origin-when-cross-origin', + 'strict-origin-when-cross-origin', + 'unsafe-url' +] +const referrerPolicySet = new Set(referrerPolicy) - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing +const requestRedirect = ['follow', 'manual', 'error'] - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' - } +const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] +const safeMethodsSet = new Set(safeMethods) - // Otherwise it can be determined by checking the high version +const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors'] - if (highVersion.patch) { - // anything higher than a patch bump would result in the wrong version - return 'patch' - } +const requestCredentials = ['omit', 'same-origin', 'include'] - if (highVersion.minor) { - // anything higher than a minor bump would result in the wrong version - return 'minor' - } +const requestCache = [ + 'default', + 'no-store', + 'reload', + 'no-cache', + 'force-cache', + 'only-if-cached' +] - // bumping major/minor/patch all have same result - return 'major' - } +// https://fetch.spec.whatwg.org/#request-body-header-name +const requestBodyHeader = [ + 'content-encoding', + 'content-language', + 'content-location', + 'content-type', + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + 'content-length' +] - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' +// https://fetch.spec.whatwg.org/#enumdef-requestduplex +const requestDuplex = [ + 'half' +] - if (v1.major !== v2.major) { - return prefix + 'major' - } +// http://fetch.spec.whatwg.org/#forbidden-method +const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK'] +const forbiddenMethodsSet = new Set(forbiddenMethods) - if (v1.minor !== v2.minor) { - return prefix + 'minor' +const subresource = [ + 'audio', + 'audioworklet', + 'font', + 'image', + 'manifest', + 'paintworklet', + 'script', + 'style', + 'track', + 'video', + 'xslt', + '' +] +const subresourceSet = new Set(subresource) + +/** @type {globalThis['DOMException']} */ +const DOMException = globalThis.DOMException ?? (() => { + // DOMException was only made a global in Node v17.0.0, + // but fetch supports >= v16.8. + try { + atob('~') + } catch (err) { + return Object.getPrototypeOf(err).constructor } +})() - if (v1.patch !== v2.patch) { - return prefix + 'patch' +let channel + +/** @type {globalThis['structuredClone']} */ +const structuredClone = + globalThis.structuredClone ?? + // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js + // structuredClone was added in v17.0.0, but fetch supports v16.8 + function structuredClone (value, options = undefined) { + if (arguments.length === 0) { + throw new TypeError('missing argument') + } + + if (!channel) { + channel = new MessageChannel() + } + channel.port1.unref() + channel.port2.unref() + channel.port1.postMessage(value, options?.transfer) + return receiveMessageOnPort(channel.port2).message } - // high and low are preleases - return 'prerelease' +module.exports = { + DOMException, + structuredClone, + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet } -module.exports = diff - /***/ }), -/***/ 91898: +/***/ 685: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const compare = __nccwpck_require__(44309) -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq +const assert = __nccwpck_require__(39491) +const { atob } = __nccwpck_require__(14300) +const { isomorphicDecode } = __nccwpck_require__(52538) +const encoder = new TextEncoder() -/***/ }), +/** + * @see https://mimesniff.spec.whatwg.org/#http-token-code-point + */ +const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/ +const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line +/** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ +const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line -/***/ 84123: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// https://fetch.spec.whatwg.org/#data-url-processor +/** @param {URL} dataURL */ +function dataURLProcessor (dataURL) { + // 1. Assert: dataURL’s scheme is "data". + assert(dataURL.protocol === 'data:') -const compare = __nccwpck_require__(44309) -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt + // 2. Let input be the result of running the URL + // serializer on dataURL with exclude fragment + // set to true. + let input = URLSerializer(dataURL, true) + // 3. Remove the leading "data:" string from input. + input = input.slice(5) -/***/ }), + // 4. Let position point at the start of input. + const position = { position: 0 } -/***/ 15522: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 5. Let mimeType be the result of collecting a + // sequence of code points that are not equal + // to U+002C (,), given position. + let mimeType = collectASequenceOfCodePointsFast( + ',', + input, + position + ) -const compare = __nccwpck_require__(44309) -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte + // 6. Strip leading and trailing ASCII whitespace + // from mimeType. + // Undici implementation note: we need to store the + // length because if the mimetype has spaces removed, + // the wrong amount will be sliced from the input in + // step #9 + const mimeTypeLength = mimeType.length + mimeType = removeASCIIWhitespace(mimeType, true, true) + // 7. If position is past the end of input, then + // return failure + if (position.position >= input.length) { + return 'failure' + } -/***/ }), + // 8. Advance position by 1. + position.position++ -/***/ 30900: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 9. Let encodedBody be the remainder of input. + const encodedBody = input.slice(mimeTypeLength + 1) + + // 10. Let body be the percent-decoding of encodedBody. + let body = stringPercentDecode(encodedBody) + + // 11. If mimeType ends with U+003B (;), followed by + // zero or more U+0020 SPACE, followed by an ASCII + // case-insensitive match for "base64", then: + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + // 1. Let stringBody be the isomorphic decode of body. + const stringBody = isomorphicDecode(body) + + // 2. Set body to the forgiving-base64 decode of + // stringBody. + body = forgivingBase64(stringBody) + + // 3. If body is failure, then return failure. + if (body === 'failure') { + return 'failure' + } + + // 4. Remove the last 6 code points from mimeType. + mimeType = mimeType.slice(0, -6) + + // 5. Remove trailing U+0020 SPACE code points from mimeType, + // if any. + mimeType = mimeType.replace(/(\u0020)+$/, '') + + // 6. Remove the last U+003B (;) code point from mimeType. + mimeType = mimeType.slice(0, -1) + } + + // 12. If mimeType starts with U+003B (;), then prepend + // "text/plain" to mimeType. + if (mimeType.startsWith(';')) { + mimeType = 'text/plain' + mimeType + } -const SemVer = __nccwpck_require__(48088) + // 13. Let mimeTypeRecord be the result of parsing + // mimeType. + let mimeTypeRecord = parseMIMEType(mimeType) -const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier - identifier = options - options = undefined + // 14. If mimeTypeRecord is failure, then set + // mimeTypeRecord to text/plain;charset=US-ASCII. + if (mimeTypeRecord === 'failure') { + mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') } - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } + // 15. Return a new data: URL struct whose MIME + // type is mimeTypeRecord and body is body. + // https://fetch.spec.whatwg.org/#data-url-struct + return { mimeType: mimeTypeRecord, body } } -module.exports = inc +// https://url.spec.whatwg.org/#concept-url-serializer +/** + * @param {URL} url + * @param {boolean} excludeFragment + */ +function URLSerializer (url, excludeFragment = false) { + if (!excludeFragment) { + return url.href + } -/***/ }), + const href = url.href + const hashLength = url.hash.length -/***/ 80194: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return hashLength === 0 ? href : href.substring(0, href.length - hashLength) +} -const compare = __nccwpck_require__(44309) -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt +// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points +/** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePoints (condition, input, position) { + // 1. Let result be the empty string. + let result = '' + // 2. While position doesn’t point past the end of input and the + // code point at position within input meets the condition condition: + while (position.position < input.length && condition(input[position.position])) { + // 1. Append that code point to the end of result. + result += input[position.position] -/***/ }), + // 2. Advance position by 1. + position.position++ + } -/***/ 77520: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 3. Return result. + return result +} -const compare = __nccwpck_require__(44309) -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte +/** + * A faster collectASequenceOfCodePoints that only works when comparing a single character. + * @param {string} char + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePointsFast (char, input, position) { + const idx = input.indexOf(char, position.position) + const start = position.position + if (idx === -1) { + position.position = input.length + return input.slice(start) + } -/***/ }), + position.position = idx + return input.slice(start, position.position) +} -/***/ 76688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// https://url.spec.whatwg.org/#string-percent-decode +/** @param {string} input */ +function stringPercentDecode (input) { + // 1. Let bytes be the UTF-8 encoding of input. + const bytes = encoder.encode(input) -const SemVer = __nccwpck_require__(48088) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major + // 2. Return the percent-decoding of bytes. + return percentDecode(bytes) +} +// https://url.spec.whatwg.org/#percent-decode +/** @param {Uint8Array} input */ +function percentDecode (input) { + // 1. Let output be an empty byte sequence. + /** @type {number[]} */ + const output = [] -/***/ }), + // 2. For each byte byte in input: + for (let i = 0; i < input.length; i++) { + const byte = input[i] -/***/ 38447: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 1. If byte is not 0x25 (%), then append byte to output. + if (byte !== 0x25) { + output.push(byte) -const SemVer = __nccwpck_require__(48088) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor + // 2. Otherwise, if byte is 0x25 (%) and the next two bytes + // after byte in input are not in the ranges + // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), + // and 0x61 (a) to 0x66 (f), all inclusive, append byte + // to output. + } else if ( + byte === 0x25 && + !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2])) + ) { + output.push(0x25) + // 3. Otherwise: + } else { + // 1. Let bytePoint be the two bytes after byte in input, + // decoded, and then interpreted as hexadecimal number. + const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]) + const bytePoint = Number.parseInt(nextTwoBytes, 16) -/***/ }), + // 2. Append a byte whose value is bytePoint to output. + output.push(bytePoint) -/***/ 6017: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 3. Skip the next two bytes in input. + i += 2 + } + } -const compare = __nccwpck_require__(44309) -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq + // 3. Return output. + return Uint8Array.from(output) +} +// https://mimesniff.spec.whatwg.org/#parse-a-mime-type +/** @param {string} input */ +function parseMIMEType (input) { + // 1. Remove any leading and trailing HTTP whitespace + // from input. + input = removeHTTPWhitespace(input, true, true) -/***/ }), + // 2. Let position be a position variable for input, + // initially pointing at the start of input. + const position = { position: 0 } -/***/ 75925: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 3. Let type be the result of collecting a sequence + // of code points that are not U+002F (/) from + // input, given position. + const type = collectASequenceOfCodePointsFast( + '/', + input, + position + ) -const SemVer = __nccwpck_require__(48088) -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null - } - throw er + // 4. If type is the empty string or does not solely + // contain HTTP token code points, then return failure. + // https://mimesniff.spec.whatwg.org/#http-token-code-point + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { + return 'failure' } -} -module.exports = parse + // 5. If position is past the end of input, then return + // failure + if (position.position > input.length) { + return 'failure' + } + // 6. Advance position by 1. (This skips past U+002F (/).) + position.position++ -/***/ }), + // 7. Let subtype be the result of collecting a sequence of + // code points that are not U+003B (;) from input, given + // position. + let subtype = collectASequenceOfCodePointsFast( + ';', + input, + position + ) -/***/ 42866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 8. Remove any trailing HTTP whitespace from subtype. + subtype = removeHTTPWhitespace(subtype, false, true) -const SemVer = __nccwpck_require__(48088) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch + // 9. If subtype is the empty string or does not solely + // contain HTTP token code points, then return failure. + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return 'failure' + } + const typeLowercase = type.toLowerCase() + const subtypeLowercase = subtype.toLowerCase() -/***/ }), + // 10. Let mimeType be a new MIME type record whose type + // is type, in ASCII lowercase, and subtype is subtype, + // in ASCII lowercase. + // https://mimesniff.spec.whatwg.org/#mime-type + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + } -/***/ 24016: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 11. While position is not past the end of input: + while (position.position < input.length) { + // 1. Advance position by 1. (This skips past U+003B (;).) + position.position++ -const parse = __nccwpck_require__(75925) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease + // 2. Collect a sequence of code points that are HTTP + // whitespace from input given position. + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + char => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ) + // 3. Let parameterName be the result of collecting a + // sequence of code points that are not U+003B (;) + // or U+003D (=) from input, given position. + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ';' && char !== '=', + input, + position + ) -/***/ }), + // 4. Set parameterName to parameterName, in ASCII + // lowercase. + parameterName = parameterName.toLowerCase() -/***/ 76417: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 5. If position is not past the end of input, then: + if (position.position < input.length) { + // 1. If the code point at position within input is + // U+003B (;), then continue. + if (input[position.position] === ';') { + continue + } -const compare = __nccwpck_require__(44309) -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare + // 2. Advance position by 1. (This skips past U+003D (=).) + position.position++ + } + // 6. If position is past the end of input, then break. + if (position.position > input.length) { + break + } -/***/ }), + // 7. Let parameterValue be null. + let parameterValue = null -/***/ 8701: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 8. If the code point at position within input is + // U+0022 ("), then: + if (input[position.position] === '"') { + // 1. Set parameterValue to the result of collecting + // an HTTP quoted string from input, given position + // and the extract-value flag. + parameterValue = collectAnHTTPQuotedString(input, position, true) -const compareBuild = __nccwpck_require__(92156) -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort + // 2. Collect a sequence of code points that are not + // U+003B (;) from input, given position. + collectASequenceOfCodePointsFast( + ';', + input, + position + ) + // 9. Otherwise: + } else { + // 1. Set parameterValue to the result of collecting + // a sequence of code points that are not U+003B (;) + // from input, given position. + parameterValue = collectASequenceOfCodePointsFast( + ';', + input, + position + ) -/***/ }), + // 2. Remove any trailing HTTP whitespace from parameterValue. + parameterValue = removeHTTPWhitespace(parameterValue, false, true) -/***/ 6055: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 3. If parameterValue is the empty string, then continue. + if (parameterValue.length === 0) { + continue + } + } -const Range = __nccwpck_require__(9828) -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false + // 10. If all of the following are true + // - parameterName is not the empty string + // - parameterName solely contains HTTP token code points + // - parameterValue solely contains HTTP quoted-string token code points + // - mimeType’s parameters[parameterName] does not exist + // then set mimeType’s parameters[parameterName] to parameterValue. + if ( + parameterName.length !== 0 && + HTTP_TOKEN_CODEPOINTS.test(parameterName) && + (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && + !mimeType.parameters.has(parameterName) + ) { + mimeType.parameters.set(parameterName, parameterValue) + } } - return range.test(version) -} -module.exports = satisfies + // 12. Return mimeType. + return mimeType +} -/***/ }), +// https://infra.spec.whatwg.org/#forgiving-base64-decode +/** @param {string} data */ +function forgivingBase64 (data) { + // 1. Remove all ASCII whitespace from data. + data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line -/***/ 61426: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 2. If data’s code point length divides by 4 leaving + // no remainder, then: + if (data.length % 4 === 0) { + // 1. If data ends with one or two U+003D (=) code points, + // then remove them from data. + data = data.replace(/=?=$/, '') + } -const compareBuild = __nccwpck_require__(92156) -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort + // 3. If data’s code point length divides by 4 leaving + // a remainder of 1, then return failure. + if (data.length % 4 === 1) { + return 'failure' + } + // 4. If data contains a code point that is not one of + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // then return failure. + if (/[^+/0-9A-Za-z]/.test(data)) { + return 'failure' + } -/***/ }), + const binary = atob(data) + const bytes = new Uint8Array(binary.length) -/***/ 19601: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + for (let byte = 0; byte < binary.length; byte++) { + bytes[byte] = binary.charCodeAt(byte) + } -const parse = __nccwpck_require__(75925) -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null + return bytes } -module.exports = valid +// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string +// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string +/** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ +function collectAnHTTPQuotedString (input, position, extractValue) { + // 1. Let positionStart be position. + const positionStart = position.position -/***/ }), + // 2. Let value be the empty string. + let value = '' -/***/ 11383: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 3. Assert: the code point at position within input + // is U+0022 ("). + assert(input[position.position] === '"') -// just pre-load all the stuff that index.js lazily exports -const internalRe = __nccwpck_require__(9523) -const constants = __nccwpck_require__(42293) -const SemVer = __nccwpck_require__(48088) -const identifiers = __nccwpck_require__(92463) -const parse = __nccwpck_require__(75925) -const valid = __nccwpck_require__(19601) -const clean = __nccwpck_require__(48848) -const inc = __nccwpck_require__(30900) -const diff = __nccwpck_require__(64297) -const major = __nccwpck_require__(76688) -const minor = __nccwpck_require__(38447) -const patch = __nccwpck_require__(42866) -const prerelease = __nccwpck_require__(24016) -const compare = __nccwpck_require__(44309) -const rcompare = __nccwpck_require__(76417) -const compareLoose = __nccwpck_require__(62804) -const compareBuild = __nccwpck_require__(92156) -const sort = __nccwpck_require__(61426) -const rsort = __nccwpck_require__(8701) -const gt = __nccwpck_require__(84123) -const lt = __nccwpck_require__(80194) -const eq = __nccwpck_require__(91898) -const neq = __nccwpck_require__(6017) -const gte = __nccwpck_require__(15522) -const lte = __nccwpck_require__(77520) -const cmp = __nccwpck_require__(75098) -const coerce = __nccwpck_require__(13466) -const Comparator = __nccwpck_require__(91532) -const Range = __nccwpck_require__(9828) -const satisfies = __nccwpck_require__(6055) -const toComparators = __nccwpck_require__(52706) -const maxSatisfying = __nccwpck_require__(20579) -const minSatisfying = __nccwpck_require__(10832) -const minVersion = __nccwpck_require__(34179) -const validRange = __nccwpck_require__(2098) -const outside = __nccwpck_require__(60420) -const gtr = __nccwpck_require__(9380) -const ltr = __nccwpck_require__(33323) -const intersects = __nccwpck_require__(27008) -const simplifyRange = __nccwpck_require__(75297) -const subset = __nccwpck_require__(7863) -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} + // 4. Advance position by 1. + position.position++ + + // 5. While true: + while (true) { + // 1. Append the result of collecting a sequence of code points + // that are not U+0022 (") or U+005C (\) from input, given + // position, to value. + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== '\\', + input, + position + ) + // 2. If position is past the end of input, then break. + if (position.position >= input.length) { + break + } -/***/ }), + // 3. Let quoteOrBackslash be the code point at position within + // input. + const quoteOrBackslash = input[position.position] -/***/ 42293: -/***/ ((module) => { + // 4. Advance position by 1. + position.position++ -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' + // 5. If quoteOrBackslash is U+005C (\), then: + if (quoteOrBackslash === '\\') { + // 1. If position is past the end of input, then append + // U+005C (\) to value and break. + if (position.position >= input.length) { + value += '\\' + break + } -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 + // 2. Append the code point at position within input to value. + value += input[position.position] -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 + // 3. Advance position by 1. + position.position++ -// Max safe length for a build identifier. The max length minus 6 characters for -// the shortest version with a build 0.0.0+BUILD. -const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + // 6. Otherwise: + } else { + // 1. Assert: quoteOrBackslash is U+0022 ("). + assert(quoteOrBackslash === '"') -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] + // 2. Break. + break + } + } -module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, -} + // 6. If the extract-value flag is set, then return value. + if (extractValue) { + return value + } + // 7. Return the code points from positionStart to position, + // inclusive, within input. + return input.slice(positionStart, position.position) +} -/***/ }), +/** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +function serializeAMimeType (mimeType) { + assert(mimeType !== 'failure') + const { parameters, essence } = mimeType -/***/ 50427: -/***/ ((module) => { + // 1. Let serialization be the concatenation of mimeType’s + // type, U+002F (/), and mimeType’s subtype. + let serialization = essence -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} + // 2. For each name → value of mimeType’s parameters: + for (let [name, value] of parameters.entries()) { + // 1. Append U+003B (;) to serialization. + serialization += ';' -module.exports = debug + // 2. Append name to serialization. + serialization += name + // 3. Append U+003D (=) to serialization. + serialization += '=' -/***/ }), + // 4. If value does not solely contain HTTP token code + // points or value is the empty string, then: + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + // 1. Precede each occurence of U+0022 (") or + // U+005C (\) in value with U+005C (\). + value = value.replace(/(\\|")/g, '\\$1') -/***/ 92463: -/***/ ((module) => { + // 2. Prepend U+0022 (") to value. + value = '"' + value -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) + // 3. Append U+0022 (") to value. + value += '"' + } - if (anum && bnum) { - a = +a - b = +b + // 5. Append value to serialization. + serialization += value } - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 + // 3. Return serialization. + return serialization } -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} char + */ +function isHTTPWhiteSpace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === ' ' } +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} str + */ +function removeHTTPWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 -/***/ }), - -/***/ 40785: -/***/ ((module) => { - -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts + if (leading) { + for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); } - if (typeof options !== 'object') { - return looseOption + if (trailing) { + for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); } - return options + return str.slice(lead, trail + 1) } -module.exports = parseOptions - - -/***/ }), - -/***/ 9523: -/***/ ((module, exports, __nccwpck_require__) => { - -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = __nccwpck_require__(42293) -const debug = __nccwpck_require__(50427) -exports = module.exports = {} -// The actual regexps go on exports.re -const re = exports.re = [] -const safeRe = exports.safeRe = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 +/** + * @see https://infra.spec.whatwg.org/#ascii-whitespace + * @param {string} char + */ +function isASCIIWhitespace (char) { + return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' ' +} -const LETTERDASHNUMBER = '[a-zA-Z0-9-]' +/** + * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace + */ +function removeASCIIWhitespace (str, leading = true, trailing = true) { + let lead = 0 + let trail = str.length - 1 -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] + if (leading) { + for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); + } -const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`) + if (trailing) { + for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); } - return value -} -const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value) - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) + return str.slice(lead, trail + 1) } -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '\\d+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) +module.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType +} -// ## Main Version -// Three dot-separated numeric identifiers. -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) +/***/ }), -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) +/***/ 78511: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. +"use strict"; -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) +const { Blob, File: NativeFile } = __nccwpck_require__(14300) +const { types } = __nccwpck_require__(73837) +const { kState } = __nccwpck_require__(15861) +const { isBlobLike } = __nccwpck_require__(52538) +const { webidl } = __nccwpck_require__(21744) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) +const { kEnumerableProperty } = __nccwpck_require__(83983) +const encoder = new TextEncoder() -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. +class File extends Blob { + constructor (fileBits, fileName, options = {}) { + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: + webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + fileBits = webidl.converters['sequence'](fileBits) + fileName = webidl.converters.USVString(fileName) + options = webidl.converters.FilePropertyBag(options) -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + // Note: Blob handles this for us -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. + // 2. Let n be the fileName argument to the constructor. + const n = fileName -createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // 2. Convert every character in t to ASCII lowercase. + let t = options.type + let d -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + // eslint-disable-next-line no-labels + substep: { + if (t) { + t = parseMIMEType(t) -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. + if (t === 'failure') { + t = '' + // eslint-disable-next-line no-labels + break substep + } -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. + t = serializeAMimeType(t).toLowerCase() + } -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + d = options.lastModified + } -createToken('FULL', `^${src[t.FULLPLAIN]}$`) + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) + super(processBlobParts(fileBits, options), { type: t }) + this[kState] = { + name: n, + lastModified: d, + type: t + } + } -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + get name () { + webidl.brandCheck(this, File) -createToken('GTLT', '((?:<|>)?=?)') + return this[kState].name + } -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + get lastModified () { + webidl.brandCheck(this, File) -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) + return this[kState].lastModified + } -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) + get type () { + webidl.brandCheck(this, File) -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + return this[kState].type + } +} -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCEPLAIN', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`) -createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`) -createToken('COERCEFULL', src[t.COERCEPLAIN] + - `(?:${src[t.PRERELEASE]})?` + - `(?:${src[t.BUILD]})?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) -createToken('COERCERTLFULL', src[t.COERCEFULL], true) +class FileLike { + constructor (blobLike, fileName, options = {}) { + // TODO: argument idl type check -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + // 2. Let n be the fileName argument to the constructor. + const n = fileName -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // TODO + const t = options.type -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + // 2. Convert every character in t to ASCII lowercase. + // TODO -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + const d = options.lastModified ?? Date.now() -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + } + } -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) + stream (...args) { + webidl.brandCheck(this, FileLike) -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') + return this[kState].blobLike.stream(...args) + } + arrayBuffer (...args) { + webidl.brandCheck(this, FileLike) -/***/ }), + return this[kState].blobLike.arrayBuffer(...args) + } -/***/ 81196: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + slice (...args) { + webidl.brandCheck(this, FileLike) -"use strict"; + return this[kState].blobLike.slice(...args) + } + text (...args) { + webidl.brandCheck(this, FileLike) -// A linked list to keep track of recently-used-ness -const Yallist = __nccwpck_require__(70220) + return this[kState].blobLike.text(...args) + } -const MAX = Symbol('max') -const LENGTH = Symbol('length') -const LENGTH_CALCULATOR = Symbol('lengthCalculator') -const ALLOW_STALE = Symbol('allowStale') -const MAX_AGE = Symbol('maxAge') -const DISPOSE = Symbol('dispose') -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet') -const LRU_LIST = Symbol('lruList') -const CACHE = Symbol('cache') -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet') + get size () { + webidl.brandCheck(this, FileLike) -const naiveLength = () => 1 + return this[kState].blobLike.size + } -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options } + get type () { + webidl.brandCheck(this, FileLike) - if (!options) - options = {} + return this[kState].blobLike.type + } - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - const max = this[MAX] = options.max || Infinity + get name () { + webidl.brandCheck(this, FileLike) - const lc = options.length || naiveLength - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc - this[ALLOW_STALE] = options.stale || false - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0 - this[DISPOSE] = options.dispose - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false - this.reset() + return this[kState].name } - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') + get lastModified () { + webidl.brandCheck(this, FileLike) - this[MAX] = mL || Infinity - trim(this) - } - get max () { - return this[MAX] + return this[kState].lastModified } - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale - } - get allowStale () { - return this[ALLOW_STALE] + get [Symbol.toStringTag] () { + return 'File' } +} - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') +Object.defineProperties(File.prototype, { + [Symbol.toStringTag]: { + value: 'File', + configurable: true + }, + name: kEnumerableProperty, + lastModified: kEnumerableProperty +}) - this[MAX_AGE] = mA - trim(this) - } - get maxAge () { - return this[MAX_AGE] - } +webidl.converters.Blob = webidl.interfaceConverter(Blob) - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength +webidl.converters.BlobPart = function (V, opts) { + if (webidl.util.Type(V) === 'Object') { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC - this[LENGTH] = 0 - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) - this[LENGTH] += hit.length - }) + if ( + ArrayBuffer.isView(V) || + types.isAnyArrayBuffer(V) + ) { + return webidl.converters.BufferSource(V, opts) } - trim(this) } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } + return webidl.converters.USVString(V, opts) +} - rforEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev - forEachStep(this, fn, walker, thisp) - walker = prev - } - } +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.BlobPart +) - forEach (fn, thisp) { - thisp = thisp || this - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next - forEachStep(this, fn, walker, thisp) - walker = next +// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag +webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ + { + key: 'lastModified', + converter: webidl.converters['long long'], + get defaultValue () { + return Date.now() } - } + }, + { + key: 'type', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'endings', + converter: (value) => { + value = webidl.converters.DOMString(value) + value = value.toLowerCase() - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } + if (value !== 'native') { + value = 'transparent' + } - values () { - return this[LRU_LIST].toArray().map(k => k.value) + return value + }, + defaultValue: 'transparent' } +]) - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)) - } +/** + * @see https://www.w3.org/TR/FileAPI/#process-blob-parts + * @param {(NodeJS.TypedArray|Blob|string)[]} parts + * @param {{ type: string, endings: string }} options + */ +function processBlobParts (parts, options) { + // 1. Let bytes be an empty sequence of bytes. + /** @type {NodeJS.TypedArray[]} */ + const bytes = [] - this[CACHE] = new Map() // hash of items by key - this[LRU_LIST] = new Yallist() // list of items in order of use recency - this[LENGTH] = 0 // length of items in the list - } + // 2. For each element in parts: + for (const element of parts) { + // 1. If element is a USVString, run the following substeps: + if (typeof element === 'string') { + // 1. Let s be element. + let s = element + + // 2. If the endings member of options is "native", set s + // to the result of converting line endings to native + // of element. + if (options.endings === 'native') { + s = convertLineEndingsNative(s) + } - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) + // 3. Append the result of UTF-8 encoding s to bytes. + bytes.push(encoder.encode(s)) + } else if ( + types.isAnyArrayBuffer(element) || + types.isTypedArray(element) + ) { + // 2. If element is a BufferSource, get a copy of the + // bytes held by the buffer source, and append those + // bytes to bytes. + if (!element.buffer) { // ArrayBuffer + bytes.push(new Uint8Array(element)) + } else { + bytes.push( + new Uint8Array(element.buffer, element.byteOffset, element.byteLength) + ) + } + } else if (isBlobLike(element)) { + // 3. If element is a Blob, append the bytes it represents + // to bytes. + bytes.push(element) + } } - dumpLru () { - return this[LRU_LIST] + // 3. Return bytes. + return bytes +} + +/** + * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native + * @param {string} s + */ +function convertLineEndingsNative (s) { + // 1. Let native line ending be be the code point U+000A LF. + let nativeLineEnding = '\n' + + // 2. If the underlying platform’s conventions are to + // represent newlines as a carriage return and line feed + // sequence, set native line ending to the code point + // U+000D CR followed by the code point U+000A LF. + if (process.platform === 'win32') { + nativeLineEnding = '\r\n' } - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE] + return s.replace(/\r?\n/g, nativeLineEnding) +} + +// If this function is moved to ./util.js, some tools (such as +// rollup) will warn about circular dependencies. See: +// https://github.com/nodejs/undici/issues/1629 +function isFileLike (object) { + return ( + (NativeFile && object instanceof NativeFile) || + object instanceof File || ( + object && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + object[Symbol.toStringTag] === 'File' + ) + ) +} - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') +module.exports = { File, FileLike, isFileLike } - const now = maxAge ? Date.now() : 0 - const len = this[LENGTH_CALCULATOR](value, key) - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)) - return false - } +/***/ }), - const node = this[CACHE].get(key) - const item = node.value +/***/ 72015: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value) - } +"use strict"; - item.now = now - item.maxAge = maxAge - item.value = value - this[LENGTH] += len - item.length - item.length = len - this.get(key) - trim(this) - return true - } - const hit = new Entry(key, value, len, now, maxAge) +const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(52538) +const { kState } = __nccwpck_require__(15861) +const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(78511) +const { webidl } = __nccwpck_require__(21744) +const { Blob, File: NativeFile } = __nccwpck_require__(14300) - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value) +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile - return false +// https://xhr.spec.whatwg.org/#formdata +class FormData { + constructor (form) { + if (form !== undefined) { + throw webidl.errors.conversionFailed({ + prefix: 'FormData constructor', + argument: 'Argument 1', + types: ['undefined'] + }) } - this[LENGTH] += hit.length - this[LRU_LIST].unshift(hit) - this[CACHE].set(key, this[LRU_LIST].head) - trim(this) - return true + this[kState] = [] } - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value - return !isStale(this, hit) - } + append (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) - get (key) { - return get(this, key, true) - } + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) - peek (key) { - return get(this, key, false) - } + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + ) + } - pop () { - const node = this[LRU_LIST].tail - if (!node) - return null + // 1. Let value be value if given; otherwise blobValue. - del(this, node) - return node.value - } + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? webidl.converters.USVString(filename) + : undefined + + // 2. Let entry be the result of creating an entry with + // name, value, and filename if given. + const entry = makeEntry(name, value, filename) - del (key) { - del(this, this[CACHE].get(key)) + // 3. Append entry to this’s entry list. + this[kState].push(entry) } - load (arr) { - // reset the cache - this.reset() + delete (name) { + webidl.brandCheck(this, FormData) - const now = Date.now() - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l] - const expiresAt = hit.e || 0 - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v) - else { - const maxAge = expiresAt - now - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge) - } - } - } - } + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)) - } -} + name = webidl.converters.USVString(name) -const get = (self, key, doUse) => { - const node = self[CACHE].get(key) - if (node) { - const hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now() - self[LRU_LIST].unshiftNode(node) - } - } - return hit.value + // The delete(name) method steps are to remove all entries whose name + // is name from this’s entry list. + this[kState] = this[kState].filter(entry => entry.name !== name) } -} -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false + get (name) { + webidl.brandCheck(this, FormData) - const diff = Date.now() - hit.now - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -} + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev - del(self, walker) - walker = prev - } - } -} + name = webidl.converters.USVString(name) -const del = (self, node) => { - if (node) { - const hit = node.value - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value) + // 1. If there is no entry whose name is name in this’s entry list, + // then return null. + const idx = this[kState].findIndex((entry) => entry.name === name) + if (idx === -1) { + return null + } - self[LENGTH] -= hit.length - self[CACHE].delete(hit.key) - self[LRU_LIST].removeNode(node) + // 2. Return the value of the first entry whose name is name from + // this’s entry list. + return this[kState][idx].value } -} -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key - this.value = value - this.length = length - this.now = now - this.maxAge = maxAge || 0 - } -} + getAll (name) { + webidl.brandCheck(this, FormData) -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value - if (isStale(self, hit)) { - del(self, node) - if (!self[ALLOW_STALE]) - hit = undefined - } - if (hit) - fn.call(thisp, hit.value, hit.key, self) -} + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) -module.exports = LRUCache + name = webidl.converters.USVString(name) + // 1. If there is no entry whose name is name in this’s entry list, + // then return the empty list. + // 2. Return the values of all entries whose name is name, in order, + // from this’s entry list. + return this[kState] + .filter((entry) => entry.name === name) + .map((entry) => entry.value) + } -/***/ }), + has (name) { + webidl.brandCheck(this, FormData) -/***/ 45327: -/***/ ((module) => { + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) -"use strict"; + name = webidl.converters.USVString(name) -module.exports = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value - } + // The has(name) method steps are to return true if there is an entry + // whose name is name in this’s entry list; otherwise false. + return this[kState].findIndex((entry) => entry.name === name) !== -1 } -} - -/***/ }), + set (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) -/***/ 70220: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) -"use strict"; + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" + ) + } -module.exports = Yallist + // The set(name, value) and set(name, blobValue, filename) method steps + // are: -Yallist.Node = Node -Yallist.create = Yallist + // 1. Let value be value if given; otherwise blobValue. -function Yallist (list) { - var self = this - if (!(self instanceof Yallist)) { - self = new Yallist() - } + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? toUSVString(filename) + : undefined - self.tail = null - self.head = null - self.length = 0 + // 2. Let entry be the result of creating an entry with name, value, and + // filename if given. + const entry = makeEntry(name, value, filename) - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item) - }) - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]) + // 3. If there are entries in this’s entry list whose name is name, then + // replace the first such entry with entry and remove the others. + const idx = this[kState].findIndex((entry) => entry.name === name) + if (idx !== -1) { + this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) + ] + } else { + // 4. Otherwise, append entry to this’s entry list. + this[kState].push(entry) } } - return self -} + entries () { + webidl.brandCheck(this, FormData) -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key+value' + ) } - var next = node.next - var prev = node.prev + keys () { + webidl.brandCheck(this, FormData) - if (next) { - next.prev = prev + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key' + ) } - if (prev) { - prev.next = next - } + values () { + webidl.brandCheck(this, FormData) - if (node === this.head) { - this.head = next - } - if (node === this.tail) { - this.tail = prev + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'value' + ) } - node.list.length-- - node.next = null - node.prev = null - node.list = null + /** + * @param {(value: string, key: string, self: FormData) => void} callbackFn + * @param {unknown} thisArg + */ + forEach (callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, FormData) - return next -} + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' }) -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } + if (typeof callbackFn !== 'function') { + throw new TypeError( + "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'." + ) + } - if (node.list) { - node.list.removeNode(node) + for (const [key, value] of this) { + callbackFn.apply(thisArg, [value, key, this]) + } } +} - var head = this.head - node.list = this - node.next = head - if (head) { - head.prev = node - } +FormData.prototype[Symbol.iterator] = FormData.prototype.entries - this.head = node - if (!this.tail) { - this.tail = node +Object.defineProperties(FormData.prototype, { + [Symbol.toStringTag]: { + value: 'FormData', + configurable: true } - this.length++ -} +}) -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } +/** + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry + * @param {string} name + * @param {string|Blob} value + * @param {?string} filename + * @returns + */ +function makeEntry (name, value, filename) { + // 1. Set name to the result of converting name into a scalar value string. + // "To convert a string into a scalar value string, replace any surrogates + // with U+FFFD." + // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end + name = Buffer.from(name).toString('utf8') - if (node.list) { - node.list.removeNode(node) - } + // 2. If value is a string, then set value to the result of converting + // value into a scalar value string. + if (typeof value === 'string') { + value = Buffer.from(value).toString('utf8') + } else { + // 3. Otherwise: - var tail = this.tail - node.list = this - node.prev = tail - if (tail) { - tail.next = node - } + // 1. If value is not a File object, then set value to a new File object, + // representing the same bytes, whose name attribute value is "blob" + if (!isFileLike(value)) { + value = value instanceof Blob + ? new File([value], 'blob', { type: value.type }) + : new FileLike(value, 'blob', { type: value.type }) + } - this.tail = node - if (!this.head) { - this.head = node - } - this.length++ -} + // 2. If filename is given, then set value to a new File object, + // representing the same bytes, whose name attribute is filename. + if (filename !== undefined) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + } -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]) + value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile + ? new File([value], filename, options) + : new FileLike(value, filename, options) + } } - return this.length -} -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]) - } - return this.length + // 4. Return an entry whose name is name and whose value is value. + return { name, value } } -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } +module.exports = { FormData } - var res = this.tail.value - this.tail = this.tail.prev - if (this.tail) { - this.tail.next = null - } else { - this.head = null - } - this.length-- - return res -} -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } +/***/ }), - var res = this.head.value - this.head = this.head.next - if (this.head) { - this.head.prev = null - } else { - this.tail = null - } - this.length-- - return res -} +/***/ 71246: +/***/ ((module) => { -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this) - walker = walker.next - } -} +"use strict"; -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this) - walker = walker.prev - } -} -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next - } - if (i === n && walker !== null) { - return walker.value - } +// In case of breaking changes, increase the version +// number to avoid conflicts. +const globalOrigin = Symbol.for('undici.globalOrigin.1') + +function getGlobalOrigin () { + return globalThis[globalOrigin] } -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev - } - if (i === n && walker !== null) { - return walker.value +function setGlobalOrigin (newOrigin) { + if (newOrigin === undefined) { + Object.defineProperty(globalThis, globalOrigin, { + value: undefined, + writable: true, + enumerable: false, + configurable: false + }) + + return } -} -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.next + const parsedURL = new URL(newOrigin) + + if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { + throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) } - return res + + Object.defineProperty(globalThis, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }) } -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this - var res = new Yallist() - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)) - walker = walker.prev - } - return res +module.exports = { + getGlobalOrigin, + setGlobalOrigin } -Yallist.prototype.reduce = function (fn, initial) { - var acc - var walker = this.head - if (arguments.length > 1) { - acc = initial - } else if (this.head) { - walker = this.head.next - acc = this.head.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i) - walker = walker.next - } +/***/ }), - return acc -} +/***/ 10554: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc - var walker = this.tail - if (arguments.length > 1) { - acc = initial - } else if (this.tail) { - walker = this.tail.prev - acc = this.tail.value - } else { - throw new TypeError('Reduce of empty list with no initial value') - } +"use strict"; +// https://github.com/Ethan-Arrowood/undici-fetch - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i) - walker = walker.prev - } - return acc -} -Yallist.prototype.toArray = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value - walker = walker.next - } - return arr -} +const { kHeadersList, kConstruct } = __nccwpck_require__(72785) +const { kGuard } = __nccwpck_require__(15861) +const { kEnumerableProperty } = __nccwpck_require__(83983) +const { + makeIterator, + isValidHeaderName, + isValidHeaderValue +} = __nccwpck_require__(52538) +const util = __nccwpck_require__(73837) +const { webidl } = __nccwpck_require__(21744) +const assert = __nccwpck_require__(39491) -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length) - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value - walker = walker.prev - } - return arr -} +const kHeadersMap = Symbol('headers map') +const kHeadersSortedMap = Symbol('headers map sorted') -Yallist.prototype.slice = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value) - } - return ret +/** + * @param {number} code + */ +function isHTTPWhiteSpaceCharCode (code) { + return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 } -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length - if (to < 0) { - to += this.length - } - from = from || 0 - if (from < 0) { - from += this.length - } - var ret = new Yallist() - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0 - } - if (to > this.length) { - to = this.length - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value) - } - return ret -} +/** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ +function headerValueNormalize (potentialValue) { + // To normalize a byte sequence potentialValue, remove + // any leading and trailing HTTP whitespace bytes from + // potentialValue. + let i = 0; let j = potentialValue.length -Yallist.prototype.splice = function (start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1 - } - if (start < 0) { - start = this.length + start; - } + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next - } + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) +} - var ret = [] - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value) - walker = this.removeNode(walker) - } - if (walker === null) { - walker = this.tail - } +function fill (headers, object) { + // To fill a Headers object headers with a given object object, run these steps: - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev - } + // 1. If object is a sequence, then for each header in object: + // Note: webidl conversion to array has already been done. + if (Array.isArray(object)) { + for (let i = 0; i < object.length; ++i) { + const header = object[i] + // 1. If header does not contain exactly two items, then throw a TypeError. + if (header.length !== 2) { + throw webidl.errors.exception({ + header: 'Headers constructor', + message: `expected name/value pair to be length 2, found ${header.length}.` + }) + } - for (var i = 0; i < nodes.length; i++) { - walker = insert(this, walker, nodes[i]) - } - return ret; -} + // 2. Append (header’s first item, header’s second item) to headers. + appendHeader(headers, header[0], header[1]) + } + } else if (typeof object === 'object' && object !== null) { + // Note: null should throw -Yallist.prototype.reverse = function () { - var head = this.head - var tail = this.tail - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev - walker.prev = walker.next - walker.next = p + // 2. Otherwise, object is a record, then for each key → value in object, + // append (key, value) to headers + const keys = Object.keys(object) + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]) + } + } else { + throw webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: ['sequence>', 'record'] + }) } - this.head = tail - this.tail = head - return this } -function insert (self, node, value) { - var inserted = node === self.head ? - new Node(value, null, node, self) : - new Node(value, node, node.next, self) +/** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ +function appendHeader (headers, name, value) { + // 1. Normalize value. + value = headerValueNormalize(value) - if (inserted.next === null) { - self.tail = inserted + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value, + type: 'header value' + }) } - if (inserted.prev === null) { - self.head = inserted + + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // Note: undici does not implement forbidden header names + if (headers[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (headers[kGuard] === 'request-no-cors') { + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO } - self.length++ + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. - return inserted -} + // 7. Append (name, value) to headers’s header list. + return headers[kHeadersList].append(name, value) -function push (self, item) { - self.tail = new Node(item, self.tail, null, self) - if (!self.head) { - self.head = self.tail - } - self.length++ + // 8. If headers’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from headers } -function unshift (self, item) { - self.head = new Node(item, null, self.head, self) - if (!self.tail) { - self.tail = self.head - } - self.length++ -} +class HeadersList { + /** @type {[string, string][]|null} */ + cookies = null -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) + constructor (init) { + if (init instanceof HeadersList) { + this[kHeadersMap] = new Map(init[kHeadersMap]) + this[kHeadersSortedMap] = init[kHeadersSortedMap] + this.cookies = init.cookies === null ? null : [...init.cookies] + } else { + this[kHeadersMap] = new Map(init) + this[kHeadersSortedMap] = null + } } - this.list = list - this.value = value + // https://fetch.spec.whatwg.org/#header-list-contains + contains (name) { + // A header list list contains a header name name if list + // contains a header whose name is a byte-case-insensitive + // match for name. + name = name.toLowerCase() - if (prev) { - prev.next = this - this.prev = prev - } else { - this.prev = null + return this[kHeadersMap].has(name) } - if (next) { - next.prev = this - this.next = next - } else { - this.next = null + clear () { + this[kHeadersMap].clear() + this[kHeadersSortedMap] = null + this.cookies = null } -} - -try { - // add if support for Symbol.iterator is present - __nccwpck_require__(45327)(Yallist) -} catch (er) {} - -/***/ }), + // https://fetch.spec.whatwg.org/#concept-header-list-append + append (name, value) { + this[kHeadersSortedMap] = null -/***/ 9380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 1. If list contains name, then set name to the first such + // header’s name. + const lowercaseName = name.toLowerCase() + const exists = this[kHeadersMap].get(lowercaseName) -// Determine if version is greater than all the versions possible in the range. -const outside = __nccwpck_require__(60420) -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr + // 2. Append (name, value) to list. + if (exists) { + const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }) + } else { + this[kHeadersMap].set(lowercaseName, { name, value }) + } + if (lowercaseName === 'set-cookie') { + this.cookies ??= [] + this.cookies.push(value) + } + } -/***/ }), + // https://fetch.spec.whatwg.org/#concept-header-list-set + set (name, value) { + this[kHeadersSortedMap] = null + const lowercaseName = name.toLowerCase() -/***/ 27008: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (lowercaseName === 'set-cookie') { + this.cookies = [value] + } -const Range = __nccwpck_require__(9828) -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects + // 1. If list contains name, then set the value of + // the first such header to value and remove the + // others. + // 2. Otherwise, append header (name, value) to list. + this[kHeadersMap].set(lowercaseName, { name, value }) + } + // https://fetch.spec.whatwg.org/#concept-header-list-delete + delete (name) { + this[kHeadersSortedMap] = null -/***/ }), + name = name.toLowerCase() -/***/ 33323: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (name === 'set-cookie') { + this.cookies = null + } -const outside = __nccwpck_require__(60420) -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr + this[kHeadersMap].delete(name) + } + // https://fetch.spec.whatwg.org/#concept-header-list-get + get (name) { + const value = this[kHeadersMap].get(name.toLowerCase()) -/***/ }), + // 1. If list does not contain name, then return null. + // 2. Return the values of all headers in list whose name + // is a byte-case-insensitive match for name, + // separated from each other by 0x2C 0x20, in order. + return value === undefined ? null : value.value + } -/***/ 20579: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + * [Symbol.iterator] () { + // use the lowercased name + for (const [name, { value }] of this[kHeadersMap]) { + yield [name, value] + } + } -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) + get entries () { + const headers = {} -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) + if (this[kHeadersMap].size) { + for (const { name, value } of this[kHeadersMap].values()) { + headers[name] = value } } - }) - return max + + return headers + } } -module.exports = maxSatisfying +// https://fetch.spec.whatwg.org/#headers-class +class Headers { + constructor (init = undefined) { + if (init === kConstruct) { + return + } + this[kHeadersList] = new HeadersList() -/***/ }), + // The new Headers(init) constructor steps are: -/***/ 10832: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 1. Set this’s guard to "none". + this[kGuard] = 'none' -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } + // 2. If init is given, then fill this with init. + if (init !== undefined) { + init = webidl.converters.HeadersInit(init) + fill(this, init) } - }) - return min -} -module.exports = minSatisfying + } + // https://fetch.spec.whatwg.org/#dom-headers-append + append (name, value) { + webidl.brandCheck(this, Headers) -/***/ }), + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) -/***/ 34179: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) -const SemVer = __nccwpck_require__(48088) -const Range = __nccwpck_require__(9828) -const gt = __nccwpck_require__(84123) + return appendHeader(this, name, value) + } -const minVersion = (range, loose) => { - range = new Range(range, loose) + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete (name) { + webidl.brandCheck(this, Headers) - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } + name = webidl.converters.ByteString(name) - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.delete', + value: name, + type: 'header name' + }) + } - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin + // 2. If this’s guard is "immutable", then throw a TypeError. + // 3. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 4. Otherwise, if this’s guard is "request-no-cors", name + // is not a no-CORS-safelisted request-header name, and + // name is not a privileged no-CORS request-header name, + // return. + // 5. Otherwise, if this’s guard is "response" and name is + // a forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO } - } - if (minver && range.test(minver)) { - return minver + // 6. If this’s header list does not contain name, then + // return. + if (!this[kHeadersList].contains(name)) { + return + } + + // 7. Delete name from this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this. + this[kHeadersList].delete(name) } - return null -} -module.exports = minVersion + // https://fetch.spec.whatwg.org/#dom-headers-get + get (name) { + webidl.brandCheck(this, Headers) + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) -/***/ }), + name = webidl.converters.ByteString(name) -/***/ 60420: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.get', + value: name, + type: 'header name' + }) + } -const SemVer = __nccwpck_require__(48088) -const Comparator = __nccwpck_require__(91532) -const { ANY } = Comparator -const Range = __nccwpck_require__(9828) -const satisfies = __nccwpck_require__(6055) -const gt = __nccwpck_require__(84123) -const lt = __nccwpck_require__(80194) -const lte = __nccwpck_require__(77520) -const gte = __nccwpck_require__(15522) + // 2. Return the result of getting name from this’s header + // list. + return this[kHeadersList].get(name) + } -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) + // https://fetch.spec.whatwg.org/#dom-headers-has + has (name) { + webidl.brandCheck(this, Headers) - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false + name = webidl.converters.ByteString(name) + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.has', + value: name, + type: 'header name' + }) + } + + // 2. Return true if this’s header list contains name; + // otherwise false. + return this[kHeadersList].contains(name) } - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. + // https://fetch.spec.whatwg.org/#dom-headers-set + set (name, value) { + webidl.brandCheck(this, Headers) - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) - let high = null - let low = null + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) + // 1. Normalize value. + value = headerValueNormalize(value) - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value, + type: 'header value' + }) } - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false + // 3. If this’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if this’s guard is "request-no-cors" and + // name/value is not a no-CORS-safelisted request-header, + // return. + // 6. Otherwise, if this’s guard is "response" and name is a + // forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO } - } - return true -} -module.exports = outside + // 7. Set (name, value) in this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this + this[kHeadersList].set(name, value) + } + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie () { + webidl.brandCheck(this, Headers) -/***/ }), + // 1. If this’s header list does not contain `Set-Cookie`, then return « ». + // 2. Return the values of all headers in this’s header list whose name is + // a byte-case-insensitive match for `Set-Cookie`, in order. -/***/ 75297: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const list = this[kHeadersList].cookies -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = __nccwpck_require__(6055) -const compare = __nccwpck_require__(44309) -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null + if (list) { + return [...list] } - } - if (first) { - set.push([first, null]) - } - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } + return [] } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + get [kHeadersSortedMap] () { + if (this[kHeadersList][kHeadersSortedMap]) { + return this[kHeadersList][kHeadersSortedMap] + } -/***/ }), + // 1. Let headers be an empty list of headers with the key being the name + // and value the value. + const headers = [] -/***/ 7863: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 2. Let names be the result of convert header names to a sorted-lowercase + // set with all the names of the headers in list. + const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) + const cookies = this[kHeadersList].cookies -const Range = __nccwpck_require__(9828) -const Comparator = __nccwpck_require__(91532) -const { ANY } = Comparator -const satisfies = __nccwpck_require__(6055) -const compare = __nccwpck_require__(44309) + // 3. For each name of names: + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i] + // 1. If name is `set-cookie`, then: + if (name === 'set-cookie') { + // 1. Let values be a list of all values of headers in list whose name + // is a byte-case-insensitive match for name, in order. -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true + // 2. For each value of values: + // 1. Append (name, value) to headers. + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]) + } + } else { + // 2. Otherwise: -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } + // 1. Let value be the result of getting name from list. - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false + // 2. Assert: value is non-null. + assert(value !== null) - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER + // 3. Append (name, value) to headers. + headers.push([name, value]) } } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] + this[kHeadersList][kHeadersSortedMap] = headers -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true + // 4. Return headers. + return headers } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease - } else { - sub = minimumVersion - } - } + keys () { + webidl.brandCheck(this, Headers) - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key') } - } - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key' + ) } - if (eqSet.size > 1) { - return null - } + values () { + webidl.brandCheck(this, Headers) - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'value') } - } - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'value' + ) + } - if (lt && !satisfies(eq, String(lt), options)) { - return null - } + entries () { + webidl.brandCheck(this, Headers) - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key+value') } - return true + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key+value' + ) } - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } + /** + * @param {(value: string, key: string, self: Headers) => void} callbackFn + * @param {unknown} thisArg + */ + forEach (callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, Headers) - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' }) + + if (typeof callbackFn !== 'function') { + throw new TypeError( + "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'." + ) } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false + + for (const [key, value] of this) { + callbackFn.apply(thisArg, [value, key, this]) } } - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } + [Symbol.for('nodejs.util.inspect.custom')] () { + webidl.brandCheck(this, Headers) - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false + return this[kHeadersList] } +} - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false +Headers.prototype[Symbol.iterator] = Headers.prototype.entries + +Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + keys: kEnumerableProperty, + values: kEnumerableProperty, + entries: kEnumerableProperty, + forEach: kEnumerableProperty, + [Symbol.iterator]: { enumerable: false }, + [Symbol.toStringTag]: { + value: 'Headers', + configurable: true + }, + [util.inspect.custom]: { + enumerable: false } +}) - return true -} +webidl.converters.HeadersInit = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (V[Symbol.iterator]) { + return webidl.converters['sequence>'](V) + } -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b + return webidl.converters['record'](V) } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a + throw webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: ['sequence>', 'record'] + }) } -module.exports = subset +module.exports = { + fill, + Headers, + HeadersList +} /***/ }), -/***/ 52706: +/***/ 74881: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const Range = __nccwpck_require__(9828) +"use strict"; +// https://github.com/Ethan-Arrowood/undici-fetch -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) -module.exports = toComparators +const { + Response, + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse +} = __nccwpck_require__(27823) +const { Headers } = __nccwpck_require__(10554) +const { Request, makeRequest } = __nccwpck_require__(48359) +const zlib = __nccwpck_require__(59796) +const { + bytesMatch, + makePolicyContainer, + clonePolicyContainer, + requestBadPort, + TAOCheck, + appendRequestOriginHeader, + responseLocationURL, + requestCurrentURL, + setRequestReferrerPolicyOnRedirect, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + createOpaqueTimingInfo, + appendFetchMetadata, + corsCheck, + crossOriginResourcePolicyCheck, + determineRequestsReferrer, + coarsenedSharedCurrentTime, + createDeferredPromise, + isBlobLike, + sameOrigin, + isCancelled, + isAborted, + isErrorLike, + fullyReadBody, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlIsHttpHttpsScheme, + urlHasHttpsScheme +} = __nccwpck_require__(52538) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) +const assert = __nccwpck_require__(39491) +const { safelyExtractBody } = __nccwpck_require__(41472) +const { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet, + DOMException +} = __nccwpck_require__(41037) +const { kHeadersList } = __nccwpck_require__(72785) +const EE = __nccwpck_require__(82361) +const { Readable, pipeline } = __nccwpck_require__(12781) +const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(83983) +const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(685) +const { TransformStream } = __nccwpck_require__(35356) +const { getGlobalDispatcher } = __nccwpck_require__(21892) +const { webidl } = __nccwpck_require__(21744) +const { STATUS_CODES } = __nccwpck_require__(13685) +const GET_OR_HEAD = ['GET', 'HEAD'] -/***/ }), +/** @type {import('buffer').resolveObjectURL} */ +let resolveObjectURL +let ReadableStream = globalThis.ReadableStream -/***/ 2098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +class Fetch extends EE { + constructor (dispatcher) { + super() -const Range = __nccwpck_require__(9828) -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null + this.dispatcher = dispatcher + this.connection = null + this.dump = false + this.state = 'ongoing' + // 2 terminated listeners get added per request, + // but only 1 gets removed. If there are 20 redirects, + // 21 listeners will be added. + // See https://github.com/nodejs/undici/issues/1711 + // TODO (fix): Find and fix root cause for leaked listener. + this.setMaxListeners(21) } -} -module.exports = validRange + terminate (reason) { + if (this.state !== 'ongoing') { + return + } -/***/ }), + this.state = 'terminated' + this.connection?.destroy(reason) + this.emit('terminated', reason) + } -/***/ 79626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort (error) { + if (this.state !== 'ongoing') { + return + } -"use strict"; + // 1. Set controller’s state to "aborted". + this.state = 'aborted' + // 2. Let fallbackError be an "AbortError" DOMException. + // 3. Set error to fallbackError if it is not given. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } -var stubs = __nccwpck_require__(1099) + // 4. Let serializedError be StructuredSerialize(error). + // If that threw an exception, catch it, and let + // serializedError be StructuredSerialize(fallbackError). -/* - * StreamEvents can be used 2 ways: - * - * 1: - * function MyStream() { - * require('stream-events').call(this) - * } - * - * 2: - * require('stream-events')(myStream) - */ -function StreamEvents(stream) { - stream = stream || this + // 5. Set controller’s serialized abort reason to serializedError. + this.serializedAbortReason = error - var cfg = { - callthrough: true, - calls: 1 + this.connection?.destroy(error) + this.emit('terminated', error) } - - stubs(stream, '_read', cfg, stream.emit.bind(stream, 'reading')) - stubs(stream, '_write', cfg, stream.emit.bind(stream, 'writing')) - - return stream } -module.exports = StreamEvents +// https://fetch.spec.whatwg.org/#fetch-method +function fetch (input, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) + // 1. Let p be a new promise. + const p = createDeferredPromise() -/***/ }), + // 2. Let requestObject be the result of invoking the initial value of + // Request as constructor with input and init as arguments. If this throws + // an exception, reject p with it and return p. + let requestObject -/***/ 66121: -/***/ ((module) => { + try { + requestObject = new Request(input, init) + } catch (e) { + p.reject(e) + return p.promise + } -module.exports = shift + // 3. Let request be requestObject’s request. + const request = requestObject[kState] -function shift (stream) { - var rs = stream._readableState - if (!rs) return null - return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs)) -} + // 4. If requestObject’s signal’s aborted flag is set, then: + if (requestObject.signal.aborted) { + // 1. Abort the fetch() call with p, request, null, and + // requestObject’s signal’s abort reason. + abortFetch(p, request, null, requestObject.signal.reason) -function getStateLength (state) { - if (state.buffer.length) { - var idx = state.bufferIndex || 0 - // Since node 6.3.0 state.buffer is a BufferList not an array - if (state.buffer.head) { - return state.buffer.head.data.length - } else if (state.buffer.length - idx > 0 && state.buffer[idx]) { - return state.buffer[idx].length - } + // 2. Return p. + return p.promise } - return state.length -} - + // 5. Let globalObject be request’s client’s global object. + const globalObject = request.client.globalObject -/***/ }), + // 6. If globalObject is a ServiceWorkerGlobalScope object, then set + // request’s service-workers mode to "none". + if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { + request.serviceWorkers = 'none' + } -/***/ 94841: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 7. Let responseObject be null. + let responseObject = null -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. + // 8. Let relevantRealm be this’s relevant Realm. + const relevantRealm = null + // 9. Let locallyAborted be false. + let locallyAborted = false + // 10. Let controller be null. + let controller = null -/**/ + // 11. Add the following abort steps to requestObject’s signal: + addAbortListener( + requestObject.signal, + () => { + // 1. Set locallyAborted to true. + locallyAborted = true -var Buffer = (__nccwpck_require__(21867).Buffer); -/**/ + // 2. Assert: controller is non-null. + assert(controller != null) -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; + // 3. Abort controller with requestObject’s signal’s abort reason. + controller.abort(requestObject.signal.reason) -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; + // 4. Abort the fetch() call with p, request, responseObject, + // and requestObject’s signal’s abort reason. + abortFetch(p, request, responseObject, requestObject.signal.reason) } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.s = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} + ) -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; + // 12. Let handleFetchDone given response response be to finalize and + // report timing with response, globalObject, and "fetch". + const handleFetchDone = (response) => + finalizeAndReportTiming(response, 'fetch') -StringDecoder.prototype.end = utf8End; + // 13. Set controller to the result of calling fetch given request, + // with processResponseEndOfBody set to handleFetchDone, and processResponse + // given response being these substeps: -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; + const processResponse = (response) => { + // 1. If locallyAborted is true, terminate these substeps. + if (locallyAborted) { + return Promise.resolve() + } -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; + // 2. If response’s aborted flag is set, then: + if (response.aborted) { + // 1. Let deserializedError be the result of deserialize a serialized + // abort reason given controller’s serialized abort reason and + // relevantRealm. -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} + // 2. Abort the fetch() call with p, request, responseObject, and + // deserializedError. -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + abortFetch(p, request, responseObject, controller.serializedAbortReason) + return Promise.resolve() } - return nb; - } - return 0; -} -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } + // 3. If response is a network error, then reject p with a TypeError + // and terminate these substeps. + if (response.type === 'error') { + p.reject( + Object.assign(new TypeError('fetch failed'), { cause: response.error }) + ) + return Promise.resolve() } - } -} -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} + // 4. Set responseObject to the result of creating a Response object, + // given response, "immutable", and relevantRealm. + responseObject = new Response() + responseObject[kState] = response + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} + // 5. Resolve p with responseObject. + p.resolve(responseObject) + } -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici + }) -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); + // 14. Return p. + return p.promise } -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); +// https://fetch.spec.whatwg.org/#finalize-and-report-timing +function finalizeAndReportTiming (response, initiatorType = 'other') { + // 1. If response is an aborted network error, then return. + if (response.type === 'error' && response.aborted) { + return } - return r; -} -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; + // 2. If response’s URL list is null or empty, then return. + if (!response.urlList?.length) { + return } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} + // 3. Let originalURL be response’s URL list[0]. + const originalURL = response.urlList[0] -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} + // 4. Let timingInfo be response’s timing info. + let timingInfo = response.timingInfo -/***/ }), + // 5. Let cacheState be response’s cache state. + let cacheState = response.cacheState -/***/ 14526: -/***/ ((module) => { + // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. + if (!urlIsHttpHttpsScheme(originalURL)) { + return + } -const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; -const numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; -// const octRegex = /0x[a-z0-9]+/; -// const binRegex = /0x[a-z0-9]+/; + // 7. If timingInfo is null, then return. + if (timingInfo === null) { + return + } + // 8. If response’s timing allow passed flag is not set, then: + if (!response.timingAllowPassed) { + // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. + timingInfo = createOpaqueTimingInfo({ + startTime: timingInfo.startTime + }) -//polyfill -if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; -} -if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; -} + // 2. Set cacheState to the empty string. + cacheState = '' + } - -const consider = { - hex : true, - leadingZeros: true, - decimalPoint: "\.", - eNotation: true - //skipLike: /regex/ -}; - -function toNumber(str, options = {}){ - // const options = Object.assign({}, consider); - // if(opt.leadingZeros === false){ - // options.leadingZeros = false; - // }else if(opt.hex === false){ - // options.hex = false; - // } + // 9. Set timingInfo’s end time to the coarsened shared current time + // given global’s relevant settings object’s cross-origin isolated + // capability. + // TODO: given global’s relevant settings object’s cross-origin isolated + // capability? + timingInfo.endTime = coarsenedSharedCurrentTime() - options = Object.assign({}, consider, options ); - if(!str || typeof str !== "string" ) return str; - - let trimmedStr = str.trim(); - // if(trimmedStr === "0.0") return 0; - // else if(trimmedStr === "+0.0") return 0; - // else if(trimmedStr === "-0.0") return -0; - - if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str; - else if (options.hex && hexRegex.test(trimmedStr)) { - return Number.parseInt(trimmedStr, 16); - // } else if (options.parseOct && octRegex.test(str)) { - // return Number.parseInt(val, 8); - // }else if (options.parseBin && binRegex.test(str)) { - // return Number.parseInt(val, 2); - }else{ - //separate negative sign, leading zeros, and rest number - const match = numRegex.exec(trimmedStr); - if(match){ - const sign = match[1]; - const leadingZeros = match[2]; - let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros - //trim ending zeros for floating number - - const eNotation = match[4] || match[6]; - if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str; //-0123 - else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str; //0123 - else{//no leading zeros or leading zeros are allowed - const num = Number(trimmedStr); - const numStr = "" + num; - if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation - if(options.eNotation) return num; - else return str; - }else if(eNotation){ //given number has enotation - if(options.eNotation) return num; - else return str; - }else if(trimmedStr.indexOf(".") !== -1){ //floating number - // const decimalPart = match[5].substr(1); - // const intPart = trimmedStr.substr(0,trimmedStr.indexOf(".")); - - - // const p = numStr.indexOf("."); - // const givenIntPart = numStr.substr(0,p); - // const givenDecPart = numStr.substr(p+1); - if(numStr === "0" && (numTrimmedByZeros === "") ) return num; //0.0 - else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000 - else if( sign && numStr === "-"+numTrimmedByZeros) return num; - else return str; - } - - if(leadingZeros){ - // if(numTrimmedByZeros === numStr){ - // if(options.leadingZeros) return num; - // else return str; - // }else return str; - if(numTrimmedByZeros === numStr) return num; - else if(sign+numTrimmedByZeros === numStr) return num; - else return str; - } - - if(trimmedStr === numStr) return num; - else if(trimmedStr === sign+numStr) return num; - // else{ - // //number with +/- sign - // trimmedStr.test(/[-+][0-9]); - - // } - return str; - } - // else if(!eNotation && trimmedStr && trimmedStr !== Number(trimmedStr) ) return str; - - }else{ //non-numeric string - return str; - } - } -} + // 10. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo -/** - * - * @param {string} numStr without leading zeros - * @returns - */ -function trimZeros(numStr){ - if(numStr && numStr.indexOf(".") !== -1){//float - numStr = numStr.replace(/0+$/, ""); //remove ending zeros - if(numStr === ".") numStr = "0"; - else if(numStr[0] === ".") numStr = "0"+numStr; - else if(numStr[numStr.length-1] === ".") numStr = numStr.substr(0,numStr.length-1); - return numStr; - } - return numStr; + // 11. Mark resource timing for timingInfo, originalURL, initiatorType, + // global, and cacheState. + markResourceTiming( + timingInfo, + originalURL, + initiatorType, + globalThis, + cacheState + ) } -module.exports = toNumber +// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing +function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { + if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { + performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) + } +} -/***/ }), +// https://fetch.spec.whatwg.org/#abort-fetch +function abortFetch (p, request, responseObject, error) { + // Note: AbortSignal.reason was added in node v17.2.0 + // which would give us an undefined error to reject with. + // Remove this once node v16 is no longer supported. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } -/***/ 1099: -/***/ ((module) => { + // 1. Reject promise with error. + p.reject(error) -"use strict"; + // 2. If request’s body is not null and is readable, then cancel request’s + // body with error. + if (request.body != null && isReadable(request.body?.stream)) { + request.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return + } + throw err + }) + } + // 3. If responseObject is null, then return. + if (responseObject == null) { + return + } -module.exports = function stubs(obj, method, cfg, stub) { - if (!obj || !method || !obj[method]) - throw new Error('You must provide an object and a key for an existing method') + // 4. Let response be responseObject’s response. + const response = responseObject[kState] - if (!stub) { - stub = cfg - cfg = {} + // 5. If response’s body is not null and is readable, then error response’s + // body with error. + if (response.body != null && isReadable(response.body?.stream)) { + response.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return + } + throw err + }) } +} - stub = stub || function() {} +// https://fetch.spec.whatwg.org/#fetching +function fetching ({ + request, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher // undici +}) { + // 1. Let taskDestination be null. + let taskDestination = null - cfg.callthrough = cfg.callthrough || false - cfg.calls = cfg.calls || 0 + // 2. Let crossOriginIsolatedCapability be false. + let crossOriginIsolatedCapability = false - var norevert = cfg.calls === 0 + // 3. If request’s client is non-null, then: + if (request.client != null) { + // 1. Set taskDestination to request’s client’s global object. + taskDestination = request.client.globalObject - var cached = obj[method].bind(obj) + // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin + // isolated capability. + crossOriginIsolatedCapability = + request.client.crossOriginIsolatedCapability + } - obj[method] = function() { - var args = [].slice.call(arguments) - var returnVal + // 4. If useParallelQueue is true, then set taskDestination to the result of + // starting a new parallel queue. + // TODO - if (cfg.callthrough) - returnVal = cached.apply(obj, args) + // 5. Let timingInfo be a new fetch timing info whose start time and + // post-redirect start time are the coarsened shared current time given + // crossOriginIsolatedCapability. + const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) + const timingInfo = createOpaqueTimingInfo({ + startTime: currenTime + }) - returnVal = stub.apply(obj, args) || returnVal + // 6. Let fetchParams be a new fetch params whose + // request is request, + // timing info is timingInfo, + // process request body chunk length is processRequestBodyChunkLength, + // process request end-of-body is processRequestEndOfBody, + // process response is processResponse, + // process response consume body is processResponseConsumeBody, + // process response end-of-body is processResponseEndOfBody, + // task destination is taskDestination, + // and cross-origin isolated capability is crossOriginIsolatedCapability. + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + } - if (!norevert && --cfg.calls === 0) - obj[method] = cached + // 7. If request’s body is a byte sequence, then set request’s body to + // request’s body as a body. + // NOTE: Since fetching is only called from fetch, body should already be + // extracted. + assert(!request.body || request.body.stream) - return returnVal + // 8. If request’s window is "client", then set request’s window to request’s + // client, if request’s client’s global object is a Window object; otherwise + // "no-window". + if (request.window === 'client') { + // TODO: What if request.client is null? + request.window = + request.client?.globalObject?.constructor?.name === 'Window' + ? request.client + : 'no-window' } -} + // 9. If request’s origin is "client", then set request’s origin to request’s + // client’s origin. + if (request.origin === 'client') { + // TODO: What if request.client is null? + request.origin = request.client?.origin + } -/***/ }), - -/***/ 59318: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 10. If all of the following conditions are true: + // TODO -"use strict"; + // 11. If request’s policy container is "client", then: + if (request.policyContainer === 'client') { + // 1. If request’s client is non-null, then set request’s policy + // container to a clone of request’s client’s policy container. [HTML] + if (request.client != null) { + request.policyContainer = clonePolicyContainer( + request.client.policyContainer + ) + } else { + // 2. Otherwise, set request’s policy container to a new policy + // container. + request.policyContainer = makePolicyContainer() + } + } -const os = __nccwpck_require__(22037); -const tty = __nccwpck_require__(76224); -const hasFlag = __nccwpck_require__(31621); + // 12. If request’s header list does not contain `Accept`, then: + if (!request.headersList.contains('accept')) { + // 1. Let value be `*/*`. + const value = '*/*' -const {env} = process; + // 2. A user agent should set value to the first matching statement, if + // any, switching on request’s destination: + // "document" + // "frame" + // "iframe" + // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` + // "image" + // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` + // "style" + // `text/css,*/*;q=0.1` + // TODO -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} + // 3. Append `Accept`/value to request’s header list. + request.headersList.append('accept', value) + } -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} + // 13. If request’s header list does not contain `Accept-Language`, then + // user agents should append `Accept-Language`/an appropriate value to + // request’s header list. + if (!request.headersList.contains('accept-language')) { + request.headersList.append('accept-language', '*') + } -function translateLevel(level) { - if (level === 0) { - return false; - } + // 14. If request’s priority is null, then use request’s initiator and + // destination appropriately in setting request’s priority to a + // user-agent-defined object. + if (request.priority === null) { + // TODO + } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} + // 15. If request is a subresource request, then: + if (subresourceSet.has(request.destination)) { + // TODO + } -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } + // 16. Run main fetch given fetchParams. + mainFetch(fetchParams) + .catch(err => { + fetchParams.controller.terminate(err) + }) - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } + // 17. Return fetchParam's controller + return fetchParams.controller +} - if (hasFlag('color=256')) { - return 2; - } +// https://fetch.spec.whatwg.org/#concept-main-fetch +async function mainFetch (fetchParams, recursive = false) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } + // 2. Let response be null. + let response = null - const min = forceColor || 0; + // 3. If request’s local-URLs-only flag is set and request’s current URL is + // not local, then set response to a network error. + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { + response = makeNetworkError('local URLs only') + } - if (env.TERM === 'dumb') { - return min; - } + // 4. Run report Content Security Policy violations for request. + // TODO - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } + // 5. Upgrade request to a potentially trustworthy URL, if appropriate. + tryUpgradeRequestToAPotentiallyTrustworthyURL(request) - return 1; - } + // 6. If should request be blocked due to a bad port, should fetching request + // be blocked as mixed content, or should request be blocked by Content + // Security Policy returns blocked, then set response to a network error. + if (requestBadPort(request) === 'blocked') { + response = makeNetworkError('bad port') + } + // TODO: should fetching request be blocked as mixed content? + // TODO: should request be blocked by Content Security Policy? - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } + // 7. If request’s referrer policy is the empty string, then set request’s + // referrer policy to request’s policy container’s referrer policy. + if (request.referrerPolicy === '') { + request.referrerPolicy = request.policyContainer.referrerPolicy + } - return min; - } + // 8. If request’s referrer is not "no-referrer", then set request’s + // referrer to the result of invoking determine request’s referrer. + if (request.referrer !== 'no-referrer') { + request.referrer = determineRequestsReferrer(request) + } - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } + // 9. Set request’s current URL’s scheme to "https" if all of the following + // conditions are true: + // - request’s current URL’s scheme is "http" + // - request’s current URL’s host is a domain + // - Matching request’s current URL’s host per Known HSTS Host Domain Name + // Matching results in either a superdomain match with an asserted + // includeSubDomains directive or a congruent match (with or without an + // asserted includeSubDomains directive). [HSTS] + // TODO - if (env.COLORTERM === 'truecolor') { - return 3; - } + // 10. If recursive is false, then run the remaining steps in parallel. + // TODO - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + // 11. If response is null, then set response to the result of running + // the steps corresponding to the first matching statement: + if (response === null) { + response = await (async () => { + const currentURL = requestCurrentURL(request) - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } + if ( + // - request’s current URL’s origin is same origin with request’s origin, + // and request’s response tainting is "basic" + (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || + // request’s current URL’s scheme is "data" + (currentURL.protocol === 'data:') || + // - request’s mode is "navigate" or "websocket" + (request.mode === 'navigate' || request.mode === 'websocket') + ) { + // 1. Set request’s response tainting to "basic". + request.responseTainting = 'basic' - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } + // 2. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } + // request’s mode is "same-origin" + if (request.mode === 'same-origin') { + // 1. Return a network error. + return makeNetworkError('request mode cannot be "same-origin"') + } - if ('COLORTERM' in env) { - return 1; - } + // request’s mode is "no-cors" + if (request.mode === 'no-cors') { + // 1. If request’s redirect mode is not "follow", then return a network + // error. + if (request.redirect !== 'follow') { + return makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ) + } - return min; -} + // 2. Set request’s response tainting to "opaque". + request.responseTainting = 'opaque' -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} + // 3. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; + // request’s current URL’s scheme is not an HTTP(S) scheme + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { + // Return a network error. + return makeNetworkError('URL scheme must be a HTTP(S) scheme') + } + // - request’s use-CORS-preflight flag is set + // - request’s unsafe-request flag is set and either request’s method is + // not a CORS-safelisted method or CORS-unsafe request-header names with + // request’s header list is not empty + // 1. Set request’s response tainting to "cors". + // 2. Let corsWithPreflightResponse be the result of running HTTP fetch + // given fetchParams and true. + // 3. If corsWithPreflightResponse is a network error, then clear cache + // entries using request. + // 4. Return corsWithPreflightResponse. + // TODO -/***/ }), + // Otherwise + // 1. Set request’s response tainting to "cors". + request.responseTainting = 'cors' -/***/ 14920: -/***/ ((__unused_webpack_module, exports) => { + // 2. Return the result of running HTTP fetch given fetchParams. + return await httpFetch(fetchParams) + })() + } -"use strict"; + // 12. If recursive is true, then return response. + if (recursive) { + return response + } -/** - * @license - * Copyright 2020 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TeenyStatistics = exports.TeenyStatisticsWarning = void 0; -/** - * @class TeenyStatisticsWarning - * @extends Error - * @description While an error, is used for emitting warnings when - * meeting certain configured thresholds. - * @see process.emitWarning - */ -class TeenyStatisticsWarning extends Error { - /** - * @param {string} message - */ - constructor(message) { - super(message); - this.threshold = 0; - this.type = ''; - this.value = 0; - this.name = this.constructor.name; - Error.captureStackTrace(this, this.constructor); - } -} -exports.TeenyStatisticsWarning = TeenyStatisticsWarning; -TeenyStatisticsWarning.CONCURRENT_REQUESTS = 'ConcurrentRequestsExceededWarning'; -/** - * @class TeenyStatistics - * @description Maintain various statistics internal to teeny-request. Tracking - * is not automatic and must be instrumented within teeny-request. - */ -class TeenyStatistics { - /** - * @param {TeenyStatisticsOptions} [opts] - */ - constructor(opts) { - /** - * @type {number} - * @private - * @default 0 - */ - this._concurrentRequests = 0; - /** - * @type {boolean} - * @private - * @default false - */ - this._didConcurrentRequestWarn = false; - this._options = TeenyStatistics._prepareOptions(opts); - } - /** - * Returns a copy of the current options. - * @return {TeenyStatisticsOptions} - */ - getOptions() { - return Object.assign({}, this._options); - } - /** - * Change configured statistics options. This will not preserve unspecified - * options that were previously specified, i.e. this is a reset of options. - * @param {TeenyStatisticsOptions} [opts] - * @returns {TeenyStatisticsConfig} The previous options. - * @see _prepareOptions - */ - setOptions(opts) { - const oldOpts = this._options; - this._options = TeenyStatistics._prepareOptions(opts); - return oldOpts; - } - /** - * @readonly - * @return {TeenyStatisticsCounters} - */ - get counters() { - return { - concurrentRequests: this._concurrentRequests, - }; - } - /** - * @description Should call this right before making a request. - */ - requestStarting() { - this._concurrentRequests++; - if (this._options.concurrentRequests > 0 && - this._concurrentRequests >= this._options.concurrentRequests && - !this._didConcurrentRequestWarn) { - this._didConcurrentRequestWarn = true; - const warning = new TeenyStatisticsWarning('Possible excessive concurrent requests detected. ' + - this._concurrentRequests + - ' requests in-flight, which exceeds the configured threshold of ' + - this._options.concurrentRequests + - '. Use the TEENY_REQUEST_WARN_CONCURRENT_REQUESTS environment ' + - 'variable or the concurrentRequests option of teeny-request to ' + - 'increase or disable (0) this warning.'); - warning.type = TeenyStatisticsWarning.CONCURRENT_REQUESTS; - warning.value = this._concurrentRequests; - warning.threshold = this._options.concurrentRequests; - process.emitWarning(warning); - } - } - /** - * @description When using `requestStarting`, call this after the request - * has finished. - */ - requestFinished() { - // TODO negative? - this._concurrentRequests--; - } - /** - * Configuration Precedence: - * 1. Dependency inversion via defined option. - * 2. Global numeric environment variable. - * 3. Built-in default. - * This will not preserve unspecified options previously specified. - * @param {TeenyStatisticsOptions} [opts] - * @returns {TeenyStatisticsOptions} - * @private - */ - static _prepareOptions({ concurrentRequests: diConcurrentRequests, } = {}) { - let concurrentRequests = this.DEFAULT_WARN_CONCURRENT_REQUESTS; - const envConcurrentRequests = Number(process.env.TEENY_REQUEST_WARN_CONCURRENT_REQUESTS); - if (diConcurrentRequests !== undefined) { - concurrentRequests = diConcurrentRequests; - } - else if (!Number.isNaN(envConcurrentRequests)) { - concurrentRequests = envConcurrentRequests; - } - return { concurrentRequests }; + // 13. If response is not a network error and response is not a filtered + // response, then: + if (response.status !== 0 && !response.internalResponse) { + // If request’s response tainting is "cors", then: + if (request.responseTainting === 'cors') { + // 1. Let headerNames be the result of extracting header list values + // given `Access-Control-Expose-Headers` and response’s header list. + // TODO + // 2. If request’s credentials mode is not "include" and headerNames + // contains `*`, then set response’s CORS-exposed header-name list to + // all unique header names in response’s header list. + // TODO + // 3. Otherwise, if headerNames is not null or failure, then set + // response’s CORS-exposed header-name list to headerNames. + // TODO } -} -exports.TeenyStatistics = TeenyStatistics; -/** - * @description A default threshold representing when to warn about excessive - * in-flight/concurrent requests. - * @type {number} - * @static - * @readonly - * @default 5000 - */ -TeenyStatistics.DEFAULT_WARN_CONCURRENT_REQUESTS = 5000; -//# sourceMappingURL=TeenyStatistics.js.map -/***/ }), + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (request.responseTainting === 'basic') { + response = filterResponse(response, 'basic') + } else if (request.responseTainting === 'cors') { + response = filterResponse(response, 'cors') + } else if (request.responseTainting === 'opaque') { + response = filterResponse(response, 'opaque') + } else { + assert(false) + } + } -/***/ 60446: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 14. Let internalResponse be response, if response is a network error, + // and response’s internal response otherwise. + let internalResponse = + response.status === 0 ? response : response.internalResponse -"use strict"; + // 15. If internalResponse’s URL list is empty, then set it to a clone of + // request’s URL list. + if (internalResponse.urlList.length === 0) { + internalResponse.urlList.push(...request.urlList) + } -/** - * @license - * Copyright 2019 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAgent = exports.pool = void 0; -const http_1 = __nccwpck_require__(13685); -const https_1 = __nccwpck_require__(95687); -// eslint-disable-next-line node/no-deprecated-api -const url_1 = __nccwpck_require__(57310); -exports.pool = new Map(); -/** - * Determines if a proxy should be considered based on the environment. - * - * @param uri The request uri - * @returns {boolean} - */ -function shouldUseProxyForURI(uri) { - const noProxyEnv = process.env.NO_PROXY || process.env.no_proxy; - if (!noProxyEnv) { - return true; - } - const givenURI = new URL(uri); - for (const noProxyRaw of noProxyEnv.split(',')) { - const noProxy = noProxyRaw.trim(); - if (noProxy === givenURI.origin || noProxy === givenURI.hostname) { - return false; - } - else if (noProxy.startsWith('*.') || noProxy.startsWith('.')) { - const noProxyWildcard = noProxy.replace(/^\*\./, '.'); - if (givenURI.hostname.endsWith(noProxyWildcard)) { - return false; - } - } - } - return true; -} -/** - * Returns a custom request Agent if one is found, otherwise returns undefined - * which will result in the global http(s) Agent being used. - * @private - * @param {string} uri The request uri - * @param {Options} reqOpts The request options - * @returns {HttpAnyAgent|undefined} - */ -function getAgent(uri, reqOpts) { - const isHttp = uri.startsWith('http://'); - const proxy = reqOpts.proxy || - process.env.HTTP_PROXY || - process.env.http_proxy || - process.env.HTTPS_PROXY || - process.env.https_proxy; - const poolOptions = Object.assign({}, reqOpts.pool); - const manuallyProvidedProxy = !!reqOpts.proxy; - const shouldUseProxy = manuallyProvidedProxy || shouldUseProxyForURI(uri); - if (proxy && shouldUseProxy) { - // tslint:disable-next-line variable-name - const Agent = isHttp - ? __nccwpck_require__(23764) - : __nccwpck_require__(66202); - const proxyOpts = { ...(0, url_1.parse)(proxy), ...poolOptions }; - return new Agent(proxyOpts); - } - let key = isHttp ? 'http' : 'https'; - if (reqOpts.forever) { - key += ':forever'; - if (!exports.pool.has(key)) { - // tslint:disable-next-line variable-name - const Agent = isHttp ? http_1.Agent : https_1.Agent; - exports.pool.set(key, new Agent({ ...poolOptions, keepAlive: true })); - } - } - return exports.pool.get(key); -} -exports.getAgent = getAgent; -//# sourceMappingURL=agents.js.map + // 16. If request’s timing allow failed flag is unset, then set + // internalResponse’s timing allow passed flag. + if (!request.timingAllowFailed) { + response.timingAllowPassed = true + } -/***/ }), + // 17. If response is not a network error and any of the following returns + // blocked + // - should internalResponse to request be blocked as mixed content + // - should internalResponse to request be blocked by Content Security Policy + // - should internalResponse to request be blocked due to its MIME type + // - should internalResponse to request be blocked due to nosniff + // TODO -/***/ 6886: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 18. If response’s type is "opaque", internalResponse’s status is 206, + // internalResponse’s range-requested flag is set, and request’s header + // list does not contain `Range`, then set response and internalResponse + // to a network error. + if ( + response.type === 'opaque' && + internalResponse.status === 206 && + internalResponse.rangeRequested && + !request.headers.contains('range') + ) { + response = internalResponse = makeNetworkError() + } -"use strict"; + // 19. If response is not a network error and either request’s method is + // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, + // set internalResponse’s body to null and disregard any enqueuing toward + // it (if any). + if ( + response.status !== 0 && + (request.method === 'HEAD' || + request.method === 'CONNECT' || + nullBodyStatus.includes(internalResponse.status)) + ) { + internalResponse.body = null + fetchParams.controller.dump = true + } -/** - * @license - * Copyright 2018 Google LLC - * - * 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. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.teenyRequest = exports.RequestError = void 0; -const node_fetch_1 = __nccwpck_require__(80467); -const stream_1 = __nccwpck_require__(12781); -const uuid = __nccwpck_require__(17835); -const agents_1 = __nccwpck_require__(60446); -const TeenyStatistics_1 = __nccwpck_require__(14920); -// eslint-disable-next-line @typescript-eslint/no-var-requires -const streamEvents = __nccwpck_require__(79626); -class RequestError extends Error { -} -exports.RequestError = RequestError; -/** - * Convert options from Request to Fetch format - * @private - * @param reqOpts Request options - */ -function requestToFetchOptions(reqOpts) { - const options = { - method: reqOpts.method || 'GET', - ...(reqOpts.timeout && { timeout: reqOpts.timeout }), - ...(typeof reqOpts.gzip === 'boolean' && { compress: reqOpts.gzip }), - }; - if (typeof reqOpts.json === 'object') { - // Add Content-type: application/json header - reqOpts.headers = reqOpts.headers || {}; - reqOpts.headers['Content-Type'] = 'application/json'; - // Set body to JSON representation of value - options.body = JSON.stringify(reqOpts.json); - } - else { - if (Buffer.isBuffer(reqOpts.body)) { - options.body = reqOpts.body; - } - else if (typeof reqOpts.body !== 'string') { - options.body = JSON.stringify(reqOpts.body); - } - else { - options.body = reqOpts.body; - } - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - options.headers = reqOpts.headers; - let uri = (reqOpts.uri || - reqOpts.url); - if (!uri) { - throw new Error('Missing uri or url in reqOpts.'); - } - if (reqOpts.useQuerystring === true || typeof reqOpts.qs === 'object') { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const qs = __nccwpck_require__(63477); - const params = qs.stringify(reqOpts.qs); - uri = uri + '?' + params; - } - options.agent = (0, agents_1.getAgent)(uri, reqOpts); - return { uri, options }; -} -/** - * Convert a response from `fetch` to `request` format. - * @private - * @param opts The `request` options used to create the request. - * @param res The Fetch response - * @returns A `request` response object - */ -function fetchToRequestResponse(opts, res) { - const request = {}; - request.agent = opts.agent || false; - request.headers = (opts.headers || {}); - request.href = res.url; - // headers need to be converted from a map to an obj - const resHeaders = {}; - res.headers.forEach((value, key) => (resHeaders[key] = value)); - const response = Object.assign(res.body, { - statusCode: res.status, - statusMessage: res.statusText, - request, - body: res.body, - headers: resHeaders, - toJSON: () => ({ headers: resHeaders }), - }); - return response; -} -/** - * Create POST body from two parts as multipart/related content-type - * @private - * @param boundary - * @param multipart - */ -function createMultipartStream(boundary, multipart) { - const finale = `--${boundary}--`; - const stream = new stream_1.PassThrough(); - for (const part of multipart) { - const preamble = `--${boundary}\r\nContent-Type: ${part['Content-Type']}\r\n\r\n`; - stream.write(preamble); - if (typeof part.body === 'string') { - stream.write(part.body); - stream.write('\r\n'); - } - else { - part.body.pipe(stream, { end: false }); - part.body.on('end', () => { - stream.write('\r\n'); - stream.write(finale); - stream.end(); - }); - } - } - return stream; -} -function teenyRequest(reqOpts, callback) { - const { uri, options } = requestToFetchOptions(reqOpts); - const multipart = reqOpts.multipart; - if (reqOpts.multipart && multipart.length === 2) { - if (!callback) { - // TODO: add support for multipart uploads through streaming - throw new Error('Multipart without callback is not implemented.'); - } - const boundary = uuid.v4(); - options.headers['Content-Type'] = `multipart/related; boundary=${boundary}`; - options.body = createMultipartStream(boundary, multipart); - // Multipart upload - teenyRequest.stats.requestStarting(); - (0, node_fetch_1.default)(uri, options).then(res => { - teenyRequest.stats.requestFinished(); - const header = res.headers.get('content-type'); - const response = fetchToRequestResponse(options, res); - const body = response.body; - if (header === 'application/json' || - header === 'application/json; charset=utf-8') { - res.json().then(json => { - response.body = json; - callback(null, response, json); - }, (err) => { - callback(err, response, body); - }); - return; - } - res.text().then(text => { - response.body = text; - callback(null, response, text); - }, err => { - callback(err, response, body); - }); - }, err => { - teenyRequest.stats.requestFinished(); - callback(err, null, null); - }); - return; - } - if (callback === undefined) { - // Stream mode - const requestStream = streamEvents(new stream_1.PassThrough()); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let responseStream; - requestStream.once('reading', () => { - if (responseStream) { - (0, stream_1.pipeline)(responseStream, requestStream, () => { }); - } - else { - requestStream.once('response', () => { - (0, stream_1.pipeline)(responseStream, requestStream, () => { }); - }); - } - }); - options.compress = false; - teenyRequest.stats.requestStarting(); - (0, node_fetch_1.default)(uri, options).then(res => { - teenyRequest.stats.requestFinished(); - responseStream = res.body; - responseStream.on('error', (err) => { - requestStream.emit('error', err); - }); - const response = fetchToRequestResponse(options, res); - requestStream.emit('response', response); - }, err => { - teenyRequest.stats.requestFinished(); - requestStream.emit('error', err); - }); - // fetch doesn't supply the raw HTTP stream, instead it - // returns a PassThrough piped from the HTTP response - // stream. - return requestStream; - } - // GET or POST with callback - teenyRequest.stats.requestStarting(); - (0, node_fetch_1.default)(uri, options).then(res => { - teenyRequest.stats.requestFinished(); - const header = res.headers.get('content-type'); - const response = fetchToRequestResponse(options, res); - const body = response.body; - if (header === 'application/json' || - header === 'application/json; charset=utf-8') { - if (response.statusCode === 204) { - // Probably a DELETE - callback(null, response, body); - return; - } - res.json().then(json => { - response.body = json; - callback(null, response, json); - }, err => { - callback(err, response, body); - }); - return; - } - res.text().then(text => { - const response = fetchToRequestResponse(options, res); - response.body = text; - callback(null, response, text); - }, err => { - callback(err, response, body); - }); - }, err => { - teenyRequest.stats.requestFinished(); - callback(err, null, null); - }); - return; -} -exports.teenyRequest = teenyRequest; -teenyRequest.defaults = (defaults) => { - return (reqOpts, callback) => { - const opts = { ...defaults, ...reqOpts }; - if (callback === undefined) { - return teenyRequest(opts); - } - teenyRequest(opts, callback); - }; -}; -/** - * Single instance of an interface for keeping track of things. - */ -teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(); -teenyRequest.resetStats = () => { - teenyRequest.stats = new TeenyStatistics_1.TeenyStatistics(teenyRequest.stats.getOptions()); -}; -//# sourceMappingURL=index.js.map + // 20. If request’s integrity metadata is not the empty string, then: + if (request.integrity) { + // 1. Let processBodyError be this step: run fetch finale given fetchParams + // and a network error. + const processBodyError = (reason) => + fetchFinale(fetchParams, makeNetworkError(reason)) -/***/ }), + // 2. If request’s response tainting is "opaque", or response’s body is null, + // then run processBodyError and abort these steps. + if (request.responseTainting === 'opaque' || response.body == null) { + processBodyError(response.error) + return + } -/***/ 76503: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + // 3. Let processBody given bytes be these steps: + const processBody = (bytes) => { + // 1. If bytes do not match request’s integrity metadata, + // then run processBodyError and abort these steps. [SRI] + if (!bytesMatch(bytes, request.integrity)) { + processBodyError('integrity mismatch') + return + } -"use strict"; + // 2. Set response’s body to bytes as a body. + response.body = safelyExtractBody(bytes)[0] -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = __nccwpck_require__(82361); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const promisify_1 = __importDefault(__nccwpck_require__(55947)); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); + // 3. Run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) + } + + // 4. Fully read response’s body given processBody and processBodyError. + await fullyReadBody(response.body, processBody, processBodyError) + } else { + // 21. Otherwise, run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) + } } -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; - } - else if (callback) { - opts = callback; - } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; - } - return isSecureEndpoint() ? 443 : 80; - } - set defaultPort(v) { - this.explicitDefaultPort = v; - } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; - } - set protocol(v) { - this.explicitProtocol = v; - } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); - } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); - } - } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); - } - destroy() { - debug('Destroying agent %o', this.constructor.name); - } + +// https://fetch.spec.whatwg.org/#concept-scheme-fetch +// given a fetch params fetchParams +function schemeFetch (fetchParams) { + // Note: since the connection is destroyed on redirect, which sets fetchParams to a + // cancelled state, we do not want this condition to trigger *unless* there have been + // no redirects. See https://github.com/nodejs/undici/issues/1776 + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { + return Promise.resolve(makeAppropriateNetworkError(fetchParams)) + } + + // 2. Let request be fetchParams’s request. + const { request } = fetchParams + + const { protocol: scheme } = requestCurrentURL(request) + + // 3. Switch on request’s current URL’s scheme and run the associated steps: + switch (scheme) { + case 'about:': { + // If request’s current URL’s path is the string "blank", then return a new response + // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », + // and body is the empty byte sequence as a body. + + // Otherwise, return a network error. + return Promise.resolve(makeNetworkError('about scheme is not supported')) } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map + case 'blob:': { + if (!resolveObjectURL) { + resolveObjectURL = (__nccwpck_require__(14300).resolveObjectURL) + } -/***/ }), + // 1. Let blobURLEntry be request’s current URL’s blob URL entry. + const blobURLEntry = requestCurrentURL(request) -/***/ 55947: -/***/ ((__unused_webpack_module, exports) => { + // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 + // Buffer.resolveObjectURL does not ignore URL queries. + if (blobURLEntry.search.length !== 0) { + return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) + } -"use strict"; + const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) -Object.defineProperty(exports, "__esModule", ({ value: true })); -function promisify(fn) { - return function (req, opts) { - return new Promise((resolve, reject) => { - fn.call(this, req, opts, (err, rtn) => { - if (err) { - reject(err); - } - else { - resolve(rtn); - } - }); - }); - }; -} -exports["default"] = promisify; -//# sourceMappingURL=promisify.js.map + // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s + // object is not a Blob object, then return a network error. + if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { + return Promise.resolve(makeNetworkError('invalid method')) + } -/***/ }), + // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. + const bodyWithType = safelyExtractBody(blobURLEntryObject) -/***/ 98455: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // 4. Let body be bodyWithType’s body. + const body = bodyWithType[0] -"use strict"; + // 5. Let length be body’s length, serialized and isomorphic encoded. + const length = isomorphicEncode(`${body.length}`) -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const net_1 = __importDefault(__nccwpck_require__(41808)); -const tls_1 = __importDefault(__nccwpck_require__(24404)); -const url_1 = __importDefault(__nccwpck_require__(57310)); -const assert_1 = __importDefault(__nccwpck_require__(39491)); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const agent_base_1 = __nccwpck_require__(76503); -const parse_proxy_response_1 = __importDefault(__nccwpck_require__(94037)); -const debug = debug_1.default('https-proxy-agent:agent'); -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - * - * @api public - */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(_opts) { - let opts; - if (typeof _opts === 'string') { - opts = url_1.default.parse(_opts); - } - else { - opts = _opts; - } - if (!opts) { - throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); - } - debug('creating new HttpsProxyAgent instance: %o', opts); - super(opts); - const proxy = Object.assign({}, opts); - // If `true`, then connect to the proxy server over TLS. - // Defaults to `false`. - this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); - // Prefer `hostname` over `host`, and set the `port` if needed. - proxy.host = proxy.hostname || proxy.host; - if (typeof proxy.port === 'string') { - proxy.port = parseInt(proxy.port, 10); - } - if (!proxy.port && proxy.host) { - proxy.port = this.secureProxy ? 443 : 80; - } - // ALPN is supported by Node.js >= v5. - // attempt to negotiate http/1.1 for proxy servers that support http/2 - if (this.secureProxy && !('ALPNProtocols' in proxy)) { - proxy.ALPNProtocols = ['http 1.1']; - } - if (proxy.host && proxy.path) { - // If both a `host` and `path` are specified then it's most likely - // the result of a `url.parse()` call... we need to remove the - // `path` portion so that `net.connect()` doesn't attempt to open - // that as a Unix socket file. - delete proxy.path; - delete proxy.pathname; - } - this.proxy = proxy; + // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. + const type = bodyWithType[1] ?? '' + + // 7. Return a new response whose status message is `OK`, header list is + // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. + const response = makeResponse({ + statusText: 'OK', + headersList: [ + ['content-length', { name: 'Content-Length', value: length }], + ['content-type', { name: 'Content-Type', value: type }] + ] + }) + + response.body = body + + return Promise.resolve(response) } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - * - * @api protected - */ - callback(req, opts) { - return __awaiter(this, void 0, void 0, function* () { - const { proxy, secureProxy } = this; - // Create a socket connection to the proxy server. - let socket; - if (secureProxy) { - debug('Creating `tls.Socket`: %o', proxy); - socket = tls_1.default.connect(proxy); - } - else { - debug('Creating `net.Socket`: %o', proxy); - socket = net_1.default.connect(proxy); - } - const headers = Object.assign({}, proxy.headers); - const hostname = `${opts.host}:${opts.port}`; - let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.auth) { - headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; - } - // The `Host` header should only include the port - // number when it is not the default port. - let { host, port, secureEndpoint } = opts; - if (!isDefaultPort(port, secureEndpoint)) { - host += `:${port}`; - } - headers.Host = host; - headers.Connection = 'close'; - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = parse_proxy_response_1.default(socket); - socket.write(`${payload}\r\n`); - const { statusCode, buffered } = yield proxyResponsePromise; - if (statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, - servername })); - } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net_1.default.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('replaying proxy buffer for failed request'); - assert_1.default(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - return fakeSocket; - }); + case 'data:': { + // 1. Let dataURLStruct be the result of running the + // data: URL processor on request’s current URL. + const currentURL = requestCurrentURL(request) + const dataURLStruct = dataURLProcessor(currentURL) + + // 2. If dataURLStruct is failure, then return a + // network error. + if (dataURLStruct === 'failure') { + return Promise.resolve(makeNetworkError('failed to fetch the data URL')) + } + + // 3. Let mimeType be dataURLStruct’s MIME type, serialized. + const mimeType = serializeAMimeType(dataURLStruct.mimeType) + + // 4. Return a response whose status message is `OK`, + // header list is « (`Content-Type`, mimeType) », + // and body is dataURLStruct’s body as a body. + return Promise.resolve(makeResponse({ + statusText: 'OK', + headersList: [ + ['content-type', { name: 'Content-Type', value: mimeType }] + ], + body: safelyExtractBody(dataURLStruct.body)[0] + })) } + case 'file:': { + // For now, unfortunate as it is, file URLs are left as an exercise for the reader. + // When in doubt, return a network error. + return Promise.resolve(makeNetworkError('not implemented... yet...')) + } + case 'http:': + case 'https:': { + // Return the result of running HTTP fetch given fetchParams. + + return httpFetch(fetchParams) + .catch((err) => makeNetworkError(err)) + } + default: { + return Promise.resolve(makeNetworkError('unknown scheme')) + } + } } -exports["default"] = HttpsProxyAgent; -function resume(socket) { - socket.resume(); -} -function isDefaultPort(port, secure) { - return Boolean((!secure && port === 80) || (secure && port === 443)); -} -function isHTTPS(protocol) { - return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; + +// https://fetch.spec.whatwg.org/#finalize-response +function finalizeResponse (fetchParams, response) { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true + + // 2, If fetchParams’s process response done is not null, then queue a fetch + // task to run fetchParams’s process response done given response, with + // fetchParams’s task destination. + if (fetchParams.processResponseDone != null) { + queueMicrotask(() => fetchParams.processResponseDone(response)) + } } -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } + +// https://fetch.spec.whatwg.org/#fetch-finale +function fetchFinale (fetchParams, response) { + // 1. If response is a network error, then: + if (response.type === 'error') { + // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». + response.urlList = [fetchParams.request.urlList[0]] + + // 2. Set response’s timing info to the result of creating an opaque timing + // info for fetchParams’s timing info. + response.timingInfo = createOpaqueTimingInfo({ + startTime: fetchParams.timingInfo.startTime + }) + } + + // 2. Let processResponseEndOfBody be the following steps: + const processResponseEndOfBody = () => { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true + + // If fetchParams’s process response end-of-body is not null, + // then queue a fetch task to run fetchParams’s process response + // end-of-body given response with fetchParams’s task destination. + if (fetchParams.processResponseEndOfBody != null) { + queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) } - return ret; -} -//# sourceMappingURL=agent.js.map + } -/***/ }), + // 3. If fetchParams’s process response is non-null, then queue a fetch task + // to run fetchParams’s process response given response, with fetchParams’s + // task destination. + if (fetchParams.processResponse != null) { + queueMicrotask(() => fetchParams.processResponse(response)) + } -/***/ 66202: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + // 4. If response’s body is null, then run processResponseEndOfBody. + if (response.body == null) { + processResponseEndOfBody() + } else { + // 5. Otherwise: -"use strict"; + // 1. Let transformStream be a new a TransformStream. -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const agent_1 = __importDefault(__nccwpck_require__(98455)); -function createHttpsProxyAgent(opts) { - return new agent_1.default(opts); + // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, + // enqueues chunk in transformStream. + const identityTransformAlgorithm = (chunk, controller) => { + controller.enqueue(chunk) + } + + // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm + // and flushAlgorithm set to processResponseEndOfBody. + const transformStream = new TransformStream({ + start () {}, + transform: identityTransformAlgorithm, + flush: processResponseEndOfBody + }, { + size () { + return 1 + } + }, { + size () { + return 1 + } + }) + + // 4. Set response’s body to the result of piping response’s body through transformStream. + response.body = { stream: response.body.stream.pipeThrough(transformStream) } + } + + // 6. If fetchParams’s process response consume body is non-null, then: + if (fetchParams.processResponseConsumeBody != null) { + // 1. Let processBody given nullOrBytes be this step: run fetchParams’s + // process response consume body given response and nullOrBytes. + const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes) + + // 2. Let processBodyError be this step: run fetchParams’s process + // response consume body given response and failure. + const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure) + + // 3. If response’s body is null, then queue a fetch task to run processBody + // given null, with fetchParams’s task destination. + if (response.body == null) { + queueMicrotask(() => processBody(null)) + } else { + // 4. Otherwise, fully read response’s body given processBody, processBodyError, + // and fetchParams’s task destination. + return fullyReadBody(response.body, processBody, processBodyError) + } + return Promise.resolve() + } } -(function (createHttpsProxyAgent) { - createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; - createHttpsProxyAgent.prototype = agent_1.default.prototype; -})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); -module.exports = createHttpsProxyAgent; -//# sourceMappingURL=index.js.map -/***/ }), +// https://fetch.spec.whatwg.org/#http-fetch +async function httpFetch (fetchParams) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request -/***/ 94037: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + // 2. Let response be null. + let response = null -"use strict"; + // 3. Let actualResponse be null. + let actualResponse = null -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const debug_1 = __importDefault(__nccwpck_require__(38237)); -const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('close', onclose); - socket.removeListener('readable', read); - } - function onclose(err) { - debug('onclose had error %o', err); - } - function onend() { - debug('onend'); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); - const statusCode = +firstLine.split(' ')[1]; - debug('got proxy server response: %o', firstLine); - resolve({ - statusCode, - buffered - }); - } - socket.on('error', onerror); - socket.on('close', onclose); - socket.on('end', onend); - read(); - }); + // 4. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 5. If request’s service-workers mode is "all", then: + if (request.serviceWorkers === 'all') { + // TODO + } + + // 6. If response is null, then: + if (response === null) { + // 1. If makeCORSPreflight is true and one of these conditions is true: + // TODO + + // 2. If request’s redirect mode is "follow", then set request’s + // service-workers mode to "none". + if (request.redirect === 'follow') { + request.serviceWorkers = 'none' + } + + // 3. Set response and actualResponse to the result of running + // HTTP-network-or-cache fetch given fetchParams. + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) + + // 4. If request’s response tainting is "cors" and a CORS check + // for request and response returns failure, then return a network error. + if ( + request.responseTainting === 'cors' && + corsCheck(request, response) === 'failure' + ) { + return makeNetworkError('cors failure') + } + + // 5. If the TAO check for request and response returns failure, then set + // request’s timing allow failed flag. + if (TAOCheck(request, response) === 'failure') { + request.timingAllowFailed = true + } + } + + // 7. If either request’s response tainting or response’s type + // is "opaque", and the cross-origin resource policy check with + // request’s origin, request’s client, request’s destination, + // and actualResponse returns blocked, then return a network error. + if ( + (request.responseTainting === 'opaque' || response.type === 'opaque') && + crossOriginResourcePolicyCheck( + request.origin, + request.client, + request.destination, + actualResponse + ) === 'blocked' + ) { + return makeNetworkError('blocked') + } + + // 8. If actualResponse’s status is a redirect status, then: + if (redirectStatusSet.has(actualResponse.status)) { + // 1. If actualResponse’s status is not 303, request’s body is not null, + // and the connection uses HTTP/2, then user agents may, and are even + // encouraged to, transmit an RST_STREAM frame. + // See, https://github.com/whatwg/fetch/issues/1288 + if (request.redirect !== 'manual') { + fetchParams.controller.connection.destroy() + } + + // 2. Switch on request’s redirect mode: + if (request.redirect === 'error') { + // Set response to a network error. + response = makeNetworkError('unexpected redirect') + } else if (request.redirect === 'manual') { + // Set response to an opaque-redirect filtered response whose internal + // response is actualResponse. + // NOTE(spec): On the web this would return an `opaqueredirect` response, + // but that doesn't make sense server side. + // See https://github.com/nodejs/undici/issues/1193. + response = actualResponse + } else if (request.redirect === 'follow') { + // Set response to the result of running HTTP-redirect fetch given + // fetchParams and response. + response = await httpRedirectFetch(fetchParams, response) + } else { + assert(false) + } + } + + // 9. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo + + // 10. Return response. + return response } -exports["default"] = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map -/***/ }), +// https://fetch.spec.whatwg.org/#http-redirect-fetch +function httpRedirectFetch (fetchParams, response) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request -/***/ 17835: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 2. Let actualResponse be response, if response is not a filtered response, + // and response’s internal response otherwise. + const actualResponse = response.internalResponse + ? response.internalResponse + : response -"use strict"; + // 3. Let locationURL be actualResponse’s location URL given request’s current + // URL’s fragment. + let locationURL + try { + locationURL = responseLocationURL( + actualResponse, + requestCurrentURL(request).hash + ) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; + // 4. If locationURL is null, then return response. + if (locationURL == null) { + return response + } + } catch (err) { + // 5. If locationURL is failure, then return a network error. + return Promise.resolve(makeNetworkError(err)) } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; + + // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network + // error. + if (!urlIsHttpHttpsScheme(locationURL)) { + return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; + + // 7. If request’s redirect count is 20, then return a network error. + if (request.redirectCount === 20) { + return Promise.resolve(makeNetworkError('redirect count exceeded')) } -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; + + // 8. Increase request’s redirect count by 1. + request.redirectCount += 1 + + // 9. If request’s mode is "cors", locationURL includes credentials, and + // request’s origin is not same origin with locationURL’s origin, then return + // a network error. + if ( + request.mode === 'cors' && + (locationURL.username || locationURL.password) && + !sameOrigin(request, locationURL) + ) { + return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; + + // 10. If request’s response tainting is "cors" and locationURL includes + // credentials, then return a network error. + if ( + request.responseTainting === 'cors' && + (locationURL.username || locationURL.password) + ) { + return Promise.resolve(makeNetworkError( + 'URL cannot contain credentials for request mode "cors"' + )) } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; + + // 11. If actualResponse’s status is not 303, request’s body is non-null, + // and request’s body’s source is null, then return a network error. + if ( + actualResponse.status !== 303 && + request.body != null && + request.body.source == null + ) { + return Promise.resolve(makeNetworkError()) } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; + + // 12. If one of the following is true + // - actualResponse’s status is 301 or 302 and request’s method is `POST` + // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` + if ( + ([301, 302].includes(actualResponse.status) && request.method === 'POST') || + (actualResponse.status === 303 && + !GET_OR_HEAD.includes(request.method)) + ) { + // then: + // 1. Set request’s method to `GET` and request’s body to null. + request.method = 'GET' + request.body = null + + // 2. For each headerName of request-body-header name, delete headerName from + // request’s header list. + for (const headerName of requestBodyHeader) { + request.headersList.delete(headerName) + } } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; + + // 13. If request’s current URL’s origin is not same origin with locationURL’s + // origin, then for each headerName of CORS non-wildcard request-header name, + // delete headerName from request’s header list. + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name + request.headersList.delete('authorization') + + // https://fetch.spec.whatwg.org/#authentication-entries + request.headersList.delete('proxy-authorization', true) + + // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. + request.headersList.delete('cookie') + request.headersList.delete('host') } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; + + // 14. If request’s body is non-null, then set request’s body to the first return + // value of safely extracting request’s body’s source. + if (request.body != null) { + assert(request.body.source != null) + request.body = safelyExtractBody(request.body.source)[0] } -})); -var _v = _interopRequireDefault(__nccwpck_require__(70618)); + // 15. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 16. Set timingInfo’s redirect end time and post-redirect start time to the + // coarsened shared current time given fetchParams’s cross-origin isolated + // capability. + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = + coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) + + // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s + // redirect start time to timingInfo’s start time. + if (timingInfo.redirectStartTime === 0) { + timingInfo.redirectStartTime = timingInfo.startTime + } + + // 18. Append locationURL to request’s URL list. + request.urlList.push(locationURL) + + // 19. Invoke set request’s referrer policy on redirect on request and + // actualResponse. + setRequestReferrerPolicyOnRedirect(request, actualResponse) + + // 20. Return the result of running main fetch given fetchParams and true. + return mainFetch(fetchParams, true) +} + +// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch +async function httpNetworkOrCacheFetch ( + fetchParams, + isAuthenticationFetch = false, + isNewConnectionFetch = false +) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let httpFetchParams be null. + let httpFetchParams = null + + // 3. Let httpRequest be null. + let httpRequest = null + + // 4. Let response be null. + let response = null + + // 5. Let storedResponse be null. + // TODO: cache + + // 6. Let httpCache be null. + const httpCache = null + + // 7. Let the revalidatingFlag be unset. + const revalidatingFlag = false + + // 8. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. If request’s window is "no-window" and request’s redirect mode is + // "error", then set httpFetchParams to fetchParams and httpRequest to + // request. + if (request.window === 'no-window' && request.redirect === 'error') { + httpFetchParams = fetchParams + httpRequest = request + } else { + // Otherwise: + + // 1. Set httpRequest to a clone of request. + httpRequest = makeRequest(request) -var _v2 = _interopRequireDefault(__nccwpck_require__(36888)); + // 2. Set httpFetchParams to a copy of fetchParams. + httpFetchParams = { ...fetchParams } -var _v3 = _interopRequireDefault(__nccwpck_require__(91186)); + // 3. Set httpFetchParams’s request to httpRequest. + httpFetchParams.request = httpRequest + } -var _v4 = _interopRequireDefault(__nccwpck_require__(92385)); + // 3. Let includeCredentials be true if one of + const includeCredentials = + request.credentials === 'include' || + (request.credentials === 'same-origin' && + request.responseTainting === 'basic') -var _nil = _interopRequireDefault(__nccwpck_require__(65879)); + // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s + // body is non-null; otherwise null. + const contentLength = httpRequest.body ? httpRequest.body.length : null -var _version = _interopRequireDefault(__nccwpck_require__(40694)); + // 5. Let contentLengthHeaderValue be null. + let contentLengthHeaderValue = null -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or + // `PUT`, then set contentLengthHeaderValue to `0`. + if ( + httpRequest.body == null && + ['POST', 'PUT'].includes(httpRequest.method) + ) { + contentLengthHeaderValue = '0' + } -var _stringify = _interopRequireDefault(__nccwpck_require__(5802)); + // 7. If contentLength is non-null, then set contentLengthHeaderValue to + // contentLength, serialized and isomorphic encoded. + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) + } -var _parse = _interopRequireDefault(__nccwpck_require__(50893)); + // 8. If contentLengthHeaderValue is non-null, then append + // `Content-Length`/contentLengthHeaderValue to httpRequest’s header + // list. + if (contentLengthHeaderValue != null) { + httpRequest.headersList.append('content-length', contentLengthHeaderValue) + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, + // contentLengthHeaderValue) to httpRequest’s header list. -/***/ }), + // 10. If contentLength is non-null and httpRequest’s keepalive is true, + // then: + if (contentLength != null && httpRequest.keepalive) { + // NOTE: keepalive is a noop outside of browser context. + } -/***/ 9576: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 11. If httpRequest’s referrer is a URL, then append + // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, + // to httpRequest’s header list. + if (httpRequest.referrer instanceof URL) { + httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href)) + } -"use strict"; + // 12. Append a request `Origin` header for httpRequest. + appendRequestOriginHeader(httpRequest) + // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] + appendFetchMetadata(httpRequest) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 14. If httpRequest’s header list does not contain `User-Agent`, then + // user agents should append `User-Agent`/default `User-Agent` value to + // httpRequest’s header list. + if (!httpRequest.headersList.contains('user-agent')) { + httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') + } -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // 15. If httpRequest’s cache mode is "default" and httpRequest’s header + // list contains `If-Modified-Since`, `If-None-Match`, + // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set + // httpRequest’s cache mode to "no-store". + if ( + httpRequest.cache === 'default' && + (httpRequest.headersList.contains('if-modified-since') || + httpRequest.headersList.contains('if-none-match') || + httpRequest.headersList.contains('if-unmodified-since') || + httpRequest.headersList.contains('if-match') || + httpRequest.headersList.contains('if-range')) + ) { + httpRequest.cache = 'no-store' + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent + // no-cache cache-control header modification flag is unset, and + // httpRequest’s header list does not contain `Cache-Control`, then append + // `Cache-Control`/`max-age=0` to httpRequest’s header list. + if ( + httpRequest.cache === 'no-cache' && + !httpRequest.preventNoCacheCacheControlHeaderModification && + !httpRequest.headersList.contains('cache-control') + ) { + httpRequest.headersList.append('cache-control', 'max-age=0') + } -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); + // 17. If httpRequest’s cache mode is "no-store" or "reload", then: + if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { + // 1. If httpRequest’s header list does not contain `Pragma`, then append + // `Pragma`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('pragma')) { + httpRequest.headersList.append('pragma', 'no-cache') + } + + // 2. If httpRequest’s header list does not contain `Cache-Control`, + // then append `Cache-Control`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('cache-control')) { + httpRequest.headersList.append('cache-control', 'no-cache') + } } - return _crypto.default.createHash('md5').update(bytes).digest(); -} + // 18. If httpRequest’s header list contains `Range`, then append + // `Accept-Encoding`/`identity` to httpRequest’s header list. + if (httpRequest.headersList.contains('range')) { + httpRequest.headersList.append('accept-encoding', 'identity') + } -var _default = md5; -exports["default"] = _default; + // 19. Modify httpRequest’s header list per HTTP. Do not append a given + // header if httpRequest’s header list contains that header’s name. + // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 + if (!httpRequest.headersList.contains('accept-encoding')) { + if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { + httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate') + } else { + httpRequest.headersList.append('accept-encoding', 'gzip, deflate') + } + } -/***/ }), + httpRequest.headersList.delete('host') -/***/ 54974: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 20. If includeCredentials is true, then: + if (includeCredentials) { + // 1. If the user agent is not configured to block cookies for httpRequest + // (see section 7 of [COOKIES]), then: + // TODO: credentials + // 2. If httpRequest’s header list does not contain `Authorization`, then: + // TODO: credentials + } -"use strict"; + // 21. If there’s a proxy-authentication entry, use it as appropriate. + // TODO: proxy-authentication + // 22. Set httpCache to the result of determining the HTTP cache + // partition, given httpRequest. + // TODO: cache -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 23. If httpCache is null, then set httpRequest’s cache mode to + // "no-store". + if (httpCache == null) { + httpRequest.cache = 'no-store' + } -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", + // then: + if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') { + // TODO: cache + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 9. If aborted, then return the appropriate network error for fetchParams. + // TODO -var _default = { - randomUUID: _crypto.default.randomUUID -}; -exports["default"] = _default; + // 10. If response is null, then: + if (response == null) { + // 1. If httpRequest’s cache mode is "only-if-cached", then return a + // network error. + if (httpRequest.mode === 'only-if-cached') { + return makeNetworkError('only if cached') + } -/***/ }), + // 2. Let forwardResponse be the result of running HTTP-network fetch + // given httpFetchParams, includeCredentials, and isNewConnectionFetch. + const forwardResponse = await httpNetworkFetch( + httpFetchParams, + includeCredentials, + isNewConnectionFetch + ) -/***/ 65879: -/***/ ((__unused_webpack_module, exports) => { + // 3. If httpRequest’s method is unsafe and forwardResponse’s status is + // in the range 200 to 399, inclusive, invalidate appropriate stored + // responses in httpCache, as per the "Invalidation" chapter of HTTP + // Caching, and set storedResponse to null. [HTTP-CACHING] + if ( + !safeMethodsSet.has(httpRequest.method) && + forwardResponse.status >= 200 && + forwardResponse.status <= 399 + ) { + // TODO: cache + } -"use strict"; + // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, + // then: + if (revalidatingFlag && forwardResponse.status === 304) { + // TODO: cache + } + // 5. If response is null, then: + if (response == null) { + // 1. Set response to forwardResponse. + response = forwardResponse -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; + // 2. Store httpRequest and forwardResponse in httpCache, as per the + // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] + // TODO: cache + } + } -/***/ }), + // 11. Set response’s URL list to a clone of httpRequest’s URL list. + response.urlList = [...httpRequest.urlList] -/***/ 50893: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 12. If httpRequest’s header list contains `Range`, then set response’s + // range-requested flag. + if (httpRequest.headersList.contains('range')) { + response.rangeRequested = true + } -"use strict"; + // 13. Set response’s request-includes-credentials to includeCredentials. + response.requestIncludesCredentials = includeCredentials + // 14. If response’s status is 401, httpRequest’s response tainting is not + // "cors", includeCredentials is true, and request’s window is an environment + // settings object, then: + // TODO -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 15. If response’s status is 407, then: + if (response.status === 407) { + // 1. If request’s window is "no-window", then return a network error. + if (request.window === 'no-window') { + return makeNetworkError() + } -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + // 2. ??? -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) + } -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); + // 4. Prompt the end user as appropriate in request’s window and store + // the result as a proxy-authentication entry. [HTTP-AUTH] + // TODO: Invoke some kind of callback? + + // 5. Set response to the result of running HTTP-network-or-cache fetch given + // fetchParams. + // TODO + return makeNetworkError('proxy authentication required') } - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + // 16. If all of the following are true + if ( + // response’s status is 421 + response.status === 421 && + // isNewConnectionFetch is false + !isNewConnectionFetch && + // request’s body is null, or request’s body is non-null and request’s body’s source is non-null + (request.body == null || request.body.source != null) + ) { + // then: - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) + } - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ + // 2. Set response to the result of running HTTP-network-or-cache + // fetch given fetchParams, isAuthenticationFetch, and true. - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ + // TODO (spec): The spec doesn't specify this but we need to cancel + // the active response before we can start a new one. + // https://github.com/whatwg/fetch/issues/1293 + fetchParams.controller.connection.destroy() - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true + ) + } - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; + // 17. If isAuthenticationFetch is true, then create an authentication entry + if (isAuthenticationFetch) { + // TODO + } + + // 18. Return response. + return response } -var _default = parse; -exports["default"] = _default; +// https://fetch.spec.whatwg.org/#http-network-fetch +async function httpNetworkFetch ( + fetchParams, + includeCredentials = false, + forceNewConnection = false +) { + assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) -/***/ }), + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy (err) { + if (!this.destroyed) { + this.destroyed = true + this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) + } + } + } -/***/ 47658: -/***/ ((__unused_webpack_module, exports) => { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request -"use strict"; + // 2. Let response be null. + let response = null + // 3. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; + // 4. Let httpCache be the result of determining the HTTP cache partition, + // given request. + // TODO: cache + const httpCache = null -/***/ }), + // 5. If httpCache is null, then set request’s cache mode to "no-store". + if (httpCache == null) { + request.cache = 'no-store' + } -/***/ 82042: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 6. Let networkPartitionKey be the result of determining the network + // partition key given request. + // TODO -"use strict"; + // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise + // "no". + const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars + // 8. Switch on request’s mode: + if (request.mode === 'websocket') { + // Let connection be the result of obtaining a WebSocket connection, + // given request’s current URL. + // TODO + } else { + // Let connection be the result of obtaining a connection, given + // networkPartitionKey, request’s current URL’s origin, + // includeCredentials, and forceNewConnection. + // TODO + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; + // 9. Run these steps, but abort when the ongoing fetch is terminated: -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // 1. If connection is failure, then return a network error. -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 2. Set timingInfo’s final connection timing info to the result of + // calling clamp and coarsen connection timing info with connection’s + // timing info, timingInfo’s post-redirect start time, and fetchParams’s + // cross-origin isolated capability. -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + // 3. If connection is not an HTTP/2 connection, request’s body is non-null, + // and request’s body’s source is null, then append (`Transfer-Encoding`, + // `chunked`) to request’s header list. -let poolPtr = rnds8Pool.length; + // 4. Set timingInfo’s final network-request start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated + // capability. -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); + // 5. Set response to the result of making an HTTP request over connection + // using request with the following caveats: - poolPtr = 0; - } + // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] + // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} + // - If request’s body is non-null, and request’s body’s source is null, + // then the user agent may have a buffer of up to 64 kibibytes and store + // a part of request’s body in that buffer. If the user agent reads from + // request’s body beyond that buffer’s size and the user agent needs to + // resend request, then instead return a network error. -/***/ }), + // - Set timingInfo’s final network-response start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated capability, + // immediately after the user agent’s HTTP parser receives the first byte + // of the response (e.g., frame header bytes for HTTP/2 or response status + // line for HTTP/1.x). -/***/ 26723: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // - Wait until all the headers are transmitted. -"use strict"; + // - Any responses whose status is in the range 100 to 199, inclusive, + // and is not 101, are to be ignored, except for the purposes of setting + // timingInfo’s final network-response start time above. + // - If request’s header list contains `Transfer-Encoding`/`chunked` and + // response is transferred via HTTP/1.0 or older, then return a network + // error. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // - If the HTTP request results in a TLS client certificate dialog, then: -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + // 1. If request’s window is an environment settings object, make the + // dialog available in request’s window. -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 2. Otherwise, return a network error. -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } + // To transmit request’s body body, run these steps: + let requestBody = null + // 1. If body is null and fetchParams’s process request end-of-body is + // non-null, then queue a fetch task given fetchParams’s process request + // end-of-body and fetchParams’s task destination. + if (request.body == null && fetchParams.processRequestEndOfBody) { + queueMicrotask(() => fetchParams.processRequestEndOfBody()) + } else if (request.body != null) { + // 2. Otherwise, if body is non-null: - return _crypto.default.createHash('sha1').update(bytes).digest(); -} + // 1. Let processBodyChunk given bytes be these steps: + const processBodyChunk = async function * (bytes) { + // 1. If the ongoing fetch is terminated, then abort these steps. + if (isCancelled(fetchParams)) { + return + } -var _default = sha1; -exports["default"] = _default; + // 2. Run this step in parallel: transmit bytes. + yield bytes -/***/ }), + // 3. If fetchParams’s process request body is non-null, then run + // fetchParams’s process request body given bytes’s length. + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) + } -/***/ 5802: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 2. Let processEndOfBody be these steps: + const processEndOfBody = () => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } -"use strict"; + // 2. If fetchParams’s process request end-of-body is non-null, + // then run fetchParams’s process request end-of-body. + if (fetchParams.processRequestEndOfBody) { + fetchParams.processRequestEndOfBody() + } + } + // 3. Let processBodyError given e be these steps: + const processBodyError = (e) => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -exports.unsafeStringify = unsafeStringify; + // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. + if (e.name === 'AbortError') { + fetchParams.controller.abort() + } else { + fetchParams.controller.terminate(e) + } + } -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, + // processBodyError, and fetchParams’s task destination. + requestBody = (async function * () { + try { + for await (const bytes of request.body.stream) { + yield * processBodyChunk(bytes) + } + processEndOfBody() + } catch (err) { + processBodyError(err) + } + })() + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + try { + // socket is only provided for websockets + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; + if (socket) { + response = makeResponse({ status, statusText, headersList, socket }) + } else { + const iterator = body[Symbol.asyncIterator]() + fetchParams.controller.next = () => iterator.next() -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).slice(1)); -} + response = makeResponse({ status, statusText, headersList }) + } + } catch (err) { + // 10. If aborted, then: + if (err.name === 'AbortError') { + // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. + fetchParams.controller.connection.destroy() -function unsafeStringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; -} + // 2. Return the appropriate network error for fetchParams. + return makeAppropriateNetworkError(fetchParams, err) + } -function stringify(arr, offset = 0) { - const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields + return makeNetworkError(err) + } - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); + // 11. Let pullAlgorithm be an action that resumes the ongoing fetch + // if it is suspended. + const pullAlgorithm = () => { + fetchParams.controller.resume() } - return uuid; -} + // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s + // controller with reason, given reason. + const cancelAlgorithm = (reason) => { + fetchParams.controller.abort(reason) + } -var _default = stringify; -exports["default"] = _default; + // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by + // the user agent. + // TODO -/***/ }), + // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object + // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. + // TODO -/***/ 70618: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 15. Let stream be a new ReadableStream. + // 16. Set up stream with pullAlgorithm set to pullAlgorithm, + // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to + // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } -"use strict"; + const stream = new ReadableStream( + { + async start (controller) { + fetchParams.controller.controller = controller + }, + async pull (controller) { + await pullAlgorithm(controller) + }, + async cancel (reason) { + await cancelAlgorithm(reason) + } + }, + { + highWaterMark: 0, + size () { + return 1 + } + } + ) + // 17. Run these steps, but abort when the ongoing fetch is terminated: -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 1. Set response’s body to a new body whose stream is stream. + response.body = { stream } -var _rng = _interopRequireDefault(__nccwpck_require__(82042)); + // 2. If response is not a network error and request’s cache mode is + // not "no-store", then update response in httpCache for request. + // TODO -var _stringify = __nccwpck_require__(5802); + // 3. If includeCredentials is true and the user agent is not configured + // to block cookies for request (see section 7 of [COOKIES]), then run the + // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on + // the value of each header whose name is a byte-case-insensitive match for + // `Set-Cookie` in response’s header list, if any, and request’s current URL. + // TODO -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 18. If aborted, then: + // TODO -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; + // 19. Run these steps in parallel: -let _clockseq; // Previous uuid creation time + // 1. Run these steps, but abort when fetchParams is canceled: + fetchParams.controller.on('terminated', onAborted) + fetchParams.controller.resume = async () => { + // 1. While true + while (true) { + // 1-3. See onData... + // 4. Set bytes to the result of handling content codings given + // codings and bytes. + let bytes + let isFailure + try { + const { done, value } = await fetchParams.controller.next() -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + if (isAborted(fetchParams)) { + break + } -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 + bytes = done ? undefined : value + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { + // zlib doesn't like empty streams. + bytes = undefined + } else { + bytes = err - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); + // err may be propagated from the result of calling readablestream.cancel, + // which might not be an error. https://github.com/nodejs/undici/issues/2009 + isFailure = true + } + } - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } + if (bytes === undefined) { + // 2. Otherwise, if the bytes transmission for response’s message + // body is done normally and stream is readable, then close + // stream, finalize response for fetchParams and response, and + // abort these in-parallel steps. + readableStreamClose(fetchParams.controller.controller) - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + finalizeResponse(fetchParams, response) + return + } - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock + // 5. Increase timingInfo’s decoded body size by bytes’s length. + timingInfo.decodedBodySize += bytes?.byteLength ?? 0 - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + // 6. If bytes is failure, then terminate fetchParams’s controller. + if (isFailure) { + fetchParams.controller.terminate(bytes) + return + } - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes + // into stream. + fetchParams.controller.controller.enqueue(new Uint8Array(bytes)) - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval + // 8. If stream is errored, then terminate the ongoing fetch. + if (isErrored(stream)) { + fetchParams.controller.terminate() + return + } + // 9. If stream doesn’t need more data ask the user agent to suspend + // the ongoing fetch. + if (!fetchParams.controller.controller.desiredSize) { + return + } + } + } - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested + // 2. If aborted, then: + function onAborted (reason) { + // 2. If fetchParams is aborted, then: + if (isAborted(fetchParams)) { + // 1. Set response’s aborted flag. + response.aborted = true + // 2. If stream is readable, then error stream with the result of + // deserialize a serialized abort reason given fetchParams’s + // controller’s serialized abort reason and an + // implementation-defined realm. + if (isReadable(stream)) { + fetchParams.controller.controller.error( + fetchParams.controller.serializedAbortReason + ) + } + } else { + // 3. Otherwise, if stream is readable, error stream with a TypeError. + if (isReadable(stream)) { + fetchParams.controller.controller.error(new TypeError('terminated', { + cause: isErrorLike(reason) ? reason : undefined + })) + } + } - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. + // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. + fetchParams.controller.connection.destroy() } - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + // 20. Return response. + return response - msecs += 12219292800000; // `time_low` + async function dispatch ({ body }) { + const url = requestCurrentURL(request) + /** @type {import('../..').Agent} */ + const agent = fetchParams.controller.dispatcher - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` + return new Promise((resolve, reject) => agent.dispatch( + { + path: url.pathname + url.search, + origin: url.origin, + method: request.method, + body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === 'websocket' ? 'websocket' : undefined + }, + { + body: null, + abort: null, - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` + onConnect (abort) { + // TODO (fix): Do we need connection here? + const { connection } = fetchParams.controller - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + if (connection.destroyed) { + abort(new DOMException('The operation was aborted.', 'AbortError')) + } else { + fetchParams.controller.on('terminated', abort) + this.abort = connection.abort = abort + } + }, - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + onHeaders (status, headersList, resume, statusText) { + if (status < 200) { + return + } - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + let codings = [] + let location = '' - b[i++] = clockseq & 0xff; // `node` + const headers = new Headers() - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } + // For H2, the headers are a plain JS object + // We distinguish between them and iterate accordingly + if (Array.isArray(headersList)) { + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()) + } else if (key.toLowerCase() === 'location') { + location = val + } - return buf || (0, _stringify.unsafeStringify)(b); -} + headers[kHeadersList].append(key, val) + } + } else { + const keys = Object.keys(headersList) + for (const key of keys) { + const val = headersList[key] + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse() + } else if (key.toLowerCase() === 'location') { + location = val + } -var _default = v1; -exports["default"] = _default; + headers[kHeadersList].append(key, val) + } + } -/***/ }), + this.body = new Readable({ read: resume }) -/***/ 36888: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + const decoders = [] -"use strict"; + const willFollow = request.redirect === 'follow' && + location && + redirectStatusSet.has(status) + + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding + if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { + for (const coding of codings) { + // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 + if (coding === 'x-gzip' || coding === 'gzip') { + decoders.push(zlib.createGunzip({ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })) + } else if (coding === 'deflate') { + decoders.push(zlib.createInflate()) + } else if (coding === 'br') { + decoders.push(zlib.createBrotliDecompress()) + } else { + decoders.length = 0 + break + } + } + } + resolve({ + status, + statusText, + headersList: headers[kHeadersList], + body: decoders.length + ? pipeline(this.body, ...decoders, () => { }) + : this.body.on('error', () => {}) + }) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + return true + }, -var _v = _interopRequireDefault(__nccwpck_require__(8392)); + onData (chunk) { + if (fetchParams.controller.dump) { + return + } -var _md = _interopRequireDefault(__nccwpck_require__(9576)); + // 1. If one or more bytes have been transmitted from response’s + // message body, then: -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 1. Let bytes be the transmitted bytes. + const bytes = chunk -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; + // 2. Let codings be the result of extracting header list values + // given `Content-Encoding` and response’s header list. + // See pullAlgorithm. -/***/ }), + // 3. Increase timingInfo’s encoded body size by bytes’s length. + timingInfo.encodedBodySize += bytes.byteLength -/***/ 8392: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 4. See pullAlgorithm... -"use strict"; + return this.body.push(bytes) + }, + onComplete () { + if (this.abort) { + fetchParams.controller.off('terminated', this.abort) + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.URL = exports.DNS = void 0; -exports["default"] = v35; + fetchParams.controller.ended = true -var _stringify = __nccwpck_require__(5802); + this.body.push(null) + }, -var _parse = _interopRequireDefault(__nccwpck_require__(50893)); + onError (error) { + if (this.abort) { + fetchParams.controller.off('terminated', this.abort) + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + this.body?.destroy(error) -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape + fetchParams.controller.terminate(error) - const bytes = []; + reject(error) + }, - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } + onUpgrade (status, headersList, socket) { + if (status !== 101) { + return + } - return bytes; -} + const headers = new Headers() -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString('latin1') + const val = headersList[n + 1].toString('latin1') -function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - var _namespace; + headers[kHeadersList].append(key, val) + } - if (typeof value === 'string') { - value = stringToBytes(value); - } + resolve({ + status, + statusText: STATUS_CODES[status], + headersList: headers[kHeadersList], + socket + }) - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); - } + return true + } + } + )) + } +} + +module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming +} - if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` +/***/ }), + +/***/ 48359: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; +"use strict"; +/* globals AbortController */ - if (buf) { - offset = offset || 0; - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - return buf; - } +const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(41472) +const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(10554) +const { FinalizationRegistry } = __nccwpck_require__(56436)() +const util = __nccwpck_require__(83983) +const { + isValidHTTPToken, + sameOrigin, + normalizeMethod, + makePolicyContainer, + normalizeMethodRecord +} = __nccwpck_require__(52538) +const { + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex +} = __nccwpck_require__(41037) +const { kEnumerableProperty } = util +const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(15861) +const { webidl } = __nccwpck_require__(21744) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { URLSerializer } = __nccwpck_require__(685) +const { kHeadersList, kConstruct } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(82361) - return (0, _stringify.unsafeStringify)(bytes); - } // Function#name is not settable on some platforms (#270) +let TransformStream = globalThis.TransformStream +const kAbortController = Symbol('abortController') - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support +const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener('abort', abort) +}) +// https://fetch.spec.whatwg.org/#request-class +class Request { + // https://fetch.spec.whatwg.org/#dom-request + constructor (input, init = {}) { + if (input === kConstruct) { + return + } - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} + webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) -/***/ }), + input = webidl.converters.RequestInfo(input) + init = webidl.converters.RequestInit(init) -/***/ 91186: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object + this[kRealm] = { + settingsObject: { + baseUrl: getGlobalOrigin(), + get origin () { + return this.baseUrl?.origin + }, + policyContainer: makePolicyContainer() + } + } -"use strict"; + // 1. Let request be null. + let request = null + // 2. Let fallbackMode be null. + let fallbackMode = null -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 3. Let baseURL be this’s relevant settings object’s API base URL. + const baseUrl = this[kRealm].settingsObject.baseUrl -var _native = _interopRequireDefault(__nccwpck_require__(54974)); + // 4. Let signal be null. + let signal = null -var _rng = _interopRequireDefault(__nccwpck_require__(82042)); + // 5. If input is a string, then: + if (typeof input === 'string') { + // 1. Let parsedURL be the result of parsing input with baseURL. + // 2. If parsedURL is failure, then throw a TypeError. + let parsedURL + try { + parsedURL = new URL(input, baseUrl) + } catch (err) { + throw new TypeError('Failed to parse URL from ' + input, { cause: err }) + } -var _stringify = __nccwpck_require__(5802); + // 3. If parsedURL includes credentials, then throw a TypeError. + if (parsedURL.username || parsedURL.password) { + throw new TypeError( + 'Request cannot be constructed from a URL that includes credentials: ' + + input + ) + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 4. Set request to a new request whose URL is parsedURL. + request = makeRequest({ urlList: [parsedURL] }) -function v4(options, buf, offset) { - if (_native.default.randomUUID && !buf && !options) { - return _native.default.randomUUID(); - } + // 5. Set fallbackMode to "cors". + fallbackMode = 'cors' + } else { + // 6. Otherwise: - options = options || {}; + // 7. Assert: input is a Request object. + assert(input instanceof Request) - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + // 8. Set request to input’s request. + request = input[kState] + // 9. Set signal to input’s signal. + signal = input[kSignal] + } - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + // 7. Let origin be this’s relevant settings object’s origin. + const origin = this[kRealm].settingsObject.origin - if (buf) { - offset = offset || 0; + // 8. Let window be "client". + let window = 'client' - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; + // 9. If request’s window is an environment settings object and its origin + // is same origin with origin, then set window to request’s window. + if ( + request.window?.constructor?.name === 'EnvironmentSettingsObject' && + sameOrigin(request.window, origin) + ) { + window = request.window } - return buf; - } + // 10. If init["window"] exists and is non-null, then throw a TypeError. + if (init.window != null) { + throw new TypeError(`'window' option '${window}' must be null`) + } - return (0, _stringify.unsafeStringify)(rnds); -} + // 11. If init["window"] exists, then set window to "no-window". + if ('window' in init) { + window = 'no-window' + } -var _default = v4; -exports["default"] = _default; + // 12. Set request to a new request with the following properties: + request = makeRequest({ + // URL request’s URL. + // undici implementation note: this is set as the first item in request's urlList in makeRequest + // method request’s method. + method: request.method, + // header list A copy of request’s header list. + // undici implementation note: headersList is cloned in makeRequest + headersList: request.headersList, + // unsafe-request flag Set. + unsafeRequest: request.unsafeRequest, + // client This’s relevant settings object. + client: this[kRealm].settingsObject, + // window window. + window, + // priority request’s priority. + priority: request.priority, + // origin request’s origin. The propagation of the origin is only significant for navigation requests + // being handled by a service worker. In this scenario a request can have an origin that is different + // from the current client. + origin: request.origin, + // referrer request’s referrer. + referrer: request.referrer, + // referrer policy request’s referrer policy. + referrerPolicy: request.referrerPolicy, + // mode request’s mode. + mode: request.mode, + // credentials mode request’s credentials mode. + credentials: request.credentials, + // cache mode request’s cache mode. + cache: request.cache, + // redirect mode request’s redirect mode. + redirect: request.redirect, + // integrity metadata request’s integrity metadata. + integrity: request.integrity, + // keepalive request’s keepalive. + keepalive: request.keepalive, + // reload-navigation flag request’s reload-navigation flag. + reloadNavigation: request.reloadNavigation, + // history-navigation flag request’s history-navigation flag. + historyNavigation: request.historyNavigation, + // URL list A clone of request’s URL list. + urlList: [...request.urlList] + }) -/***/ }), + const initHasKey = Object.keys(init).length !== 0 -/***/ 92385: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 13. If init is not empty, then: + if (initHasKey) { + // 1. If request’s mode is "navigate", then set it to "same-origin". + if (request.mode === 'navigate') { + request.mode = 'same-origin' + } -"use strict"; + // 2. Unset request’s reload-navigation flag. + request.reloadNavigation = false + // 3. Unset request’s history-navigation flag. + request.historyNavigation = false -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 4. Set request’s origin to "client". + request.origin = 'client' -var _v = _interopRequireDefault(__nccwpck_require__(8392)); + // 5. Set request’s referrer to "client" + request.referrer = 'client' -var _sha = _interopRequireDefault(__nccwpck_require__(26723)); + // 6. Set request’s referrer policy to the empty string. + request.referrerPolicy = '' -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 7. Set request’s URL to request’s current URL. + request.url = request.urlList[request.urlList.length - 1] -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; + // 8. Set request’s URL list to « request’s URL ». + request.urlList = [request.url] + } -/***/ }), + // 14. If init["referrer"] exists, then: + if (init.referrer !== undefined) { + // 1. Let referrer be init["referrer"]. + const referrer = init.referrer -/***/ 34875: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". + if (referrer === '') { + request.referrer = 'no-referrer' + } else { + // 1. Let parsedReferrer be the result of parsing referrer with + // baseURL. + // 2. If parsedReferrer is failure, then throw a TypeError. + let parsedReferrer + try { + parsedReferrer = new URL(referrer, baseUrl) + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) + } -"use strict"; + // 3. If one of the following is true + // - parsedReferrer’s scheme is "about" and path is the string "client" + // - parsedReferrer’s origin is not same origin with origin + // then set request’s referrer to "client". + if ( + (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || + (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) + ) { + request.referrer = 'client' + } else { + // 4. Otherwise, set request’s referrer to parsedReferrer. + request.referrer = parsedReferrer + } + } + } + // 15. If init["referrerPolicy"] exists, then set request’s referrer policy + // to it. + if (init.referrerPolicy !== undefined) { + request.referrerPolicy = init.referrerPolicy + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. + let mode + if (init.mode !== undefined) { + mode = init.mode + } else { + mode = fallbackMode + } -var _regex = _interopRequireDefault(__nccwpck_require__(47658)); + // 17. If mode is "navigate", then throw a TypeError. + if (mode === 'navigate') { + throw webidl.errors.exception({ + header: 'Request constructor', + message: 'invalid request mode navigate.' + }) + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // 18. If mode is non-null, set request’s mode to mode. + if (mode != null) { + request.mode = mode + } -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} + // 19. If init["credentials"] exists, then set request’s credentials mode + // to it. + if (init.credentials !== undefined) { + request.credentials = init.credentials + } -var _default = validate; -exports["default"] = _default; + // 18. If init["cache"] exists, then set request’s cache mode to it. + if (init.cache !== undefined) { + request.cache = init.cache + } -/***/ }), + // 21. If request’s cache mode is "only-if-cached" and request’s mode is + // not "same-origin", then throw a TypeError. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { + throw new TypeError( + "'only-if-cached' can be set only with 'same-origin' mode" + ) + } -/***/ 40694: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // 22. If init["redirect"] exists, then set request’s redirect mode to it. + if (init.redirect !== undefined) { + request.redirect = init.redirect + } -"use strict"; + // 23. If init["integrity"] exists, then set request’s integrity metadata to it. + if (init.integrity != null) { + request.integrity = String(init.integrity) + } + // 24. If init["keepalive"] exists, then set request’s keepalive to it. + if (init.keepalive !== undefined) { + request.keepalive = Boolean(init.keepalive) + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + // 25. If init["method"] exists, then: + if (init.method !== undefined) { + // 1. Let method be init["method"]. + let method = init.method -var _validate = _interopRequireDefault(__nccwpck_require__(34875)); + // 2. If method is not a method or method is a forbidden method, then + // throw a TypeError. + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`) + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + if (forbiddenMethodsSet.has(method.toUpperCase())) { + throw new TypeError(`'${method}' HTTP method is unsupported.`) + } -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } + // 3. Normalize method. + method = normalizeMethodRecord[method] ?? normalizeMethod(method) - return parseInt(uuid.slice(14, 15), 16); -} + // 4. Set request’s method to method. + request.method = method + } -var _default = version; -exports["default"] = _default; + // 26. If init["signal"] exists, then set signal to it. + if (init.signal !== undefined) { + signal = init.signal + } -/***/ }), + // 27. Set this’s request to request. + this[kState] = request -/***/ 4351: -/***/ ((module) => { + // 28. Set this’s signal to a new AbortSignal object with this’s relevant + // Realm. + // TODO: could this be simplified with AbortSignal.any + // (https://dom.spec.whatwg.org/#dom-abortsignal-any) + const ac = new AbortController() + this[kSignal] = ac.signal + this[kSignal][kRealm] = this[kRealm] -/****************************************************************************** -Copyright (c) Microsoft Corporation. + // 29. If signal is not null, then make this’s signal follow signal. + if (signal != null) { + if ( + !signal || + typeof signal.aborted !== 'boolean' || + typeof signal.addEventListener !== 'function' + ) { + throw new TypeError( + "Failed to construct 'Request': member signal is not of type AbortSignal." + ) + } -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. + if (signal.aborted) { + ac.abort(signal.reason) + } else { + // Keep a strong ref to ac while request object + // is alive. This is needed to prevent AbortController + // from being prematurely garbage collected. + // See, https://github.com/nodejs/undici/issues/1926. + this[kAbortController] = ac -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __esDecorate; -var __runInitializers; -var __propKey; -var __setFunctionName; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -var __addDisposableResource; -var __disposeResources; -var __rewriteRelativeImportExtension; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } + const acRef = new WeakRef(ac) + const abort = function () { + const ac = acRef.deref() + if (ac !== undefined) { + ac.abort(this.reason) + } } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; + // Third-party AbortControllers may not work with these. + // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. + try { + // If the max amount of listeners is equal to the default, increase it + // This is only available in node >= v19.9.0 + if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(100, signal) + } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { + setMaxListeners(100, signal) + } + } catch {} - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; + util.addAbortListener(signal, abort) + requestFinalizer.register(ac, { signal, abort }) + } + } - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; + // 30. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is request’s header list and guard is + // "request". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kHeadersList] = request.headersList + this[kHeaders][kGuard] = 'request' + this[kHeaders][kRealm] = this[kRealm] - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; + // 31. If this’s request’s mode is "no-cors", then: + if (mode === 'no-cors') { + // 1. If this’s request’s method is not a CORS-safelisted method, + // then throw a TypeError. + if (!corsSafeListedMethodsSet.has(request.method)) { + throw new TypeError( + `'${request.method} is unsupported in no-cors mode.` + ) + } - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; + // 2. Set this’s headers’s guard to "request-no-cors". + this[kHeaders][kGuard] = 'request-no-cors' + } - __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - }; + // 32. If init is not empty, then: + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = this[kHeaders][kHeadersList] + // 1. Let headers be a copy of this’s headers and its associated header + // list. + // 2. If init["headers"] exists, then set headers to init["headers"]. + const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) - __runInitializers = function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - }; + // 3. Empty this’s headers’s header list. + headersList.clear() - __propKey = function (x) { - return typeof x === "symbol" ? x : "".concat(x); - }; + // 4. If headers is a Headers object, then for each header in its header + // list, append header’s name/header’s value to this’s headers. + if (headers instanceof HeadersList) { + for (const [key, val] of headers) { + headersList.append(key, val) + } + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies + } else { + // 5. Otherwise, fill this’s headers with headers. + fillHeaders(this[kHeaders], headers) + } + } - __setFunctionName = function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - }; + // 33. Let inputBody be input’s request’s body if input is a Request + // object; otherwise null. + const inputBody = input instanceof Request ? input[kState].body : null - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; + // 34. If either init["body"] exists and is non-null or inputBody is + // non-null, and request’s method is `GET` or `HEAD`, then throw a + // TypeError. + if ( + (init.body != null || inputBody != null) && + (request.method === 'GET' || request.method === 'HEAD') + ) { + throw new TypeError('Request with GET/HEAD method cannot have body.') + } - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; + // 35. Let initBody be null. + let initBody = null - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; + // 36. If init["body"] exists and is non-null, then: + if (init.body != null) { + // 1. Let Content-Type be null. + // 2. Set initBody and Content-Type to the result of extracting + // init["body"], with keepalive set to request’s keepalive. + const [extractedBody, contentType] = extractBody( + init.body, + request.keepalive + ) + initBody = extractedBody - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; + // 3, If Content-Type is non-null and this’s headers’s header list does + // not contain `Content-Type`, then append `Content-Type`/Content-Type to + // this’s headers. + if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) { + this[kHeaders].append('content-type', contentType) + } + } - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); + // 37. Let inputOrInitBody be initBody if it is non-null; otherwise + // inputBody. + const inputOrInitBody = initBody ?? inputBody - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; + // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is + // null, then: + if (inputOrInitBody != null && inputOrInitBody.source == null) { + // 1. If initBody is non-null and init["duplex"] does not exist, + // then throw a TypeError. + if (initBody != null && init.duplex == null) { + throw new TypeError('RequestInit: duplex option is required when sending a body.') + } - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; + // 2. If this’s request’s mode is neither "same-origin" nor "cors", + // then throw a TypeError. + if (request.mode !== 'same-origin' && request.mode !== 'cors') { + throw new TypeError( + 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' + ) + } - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; + // 3. Set this’s request’s use-CORS-preflight flag. + request.useCORSPreflightFlag = true + } - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; + // 39. Let finalBody be inputOrInitBody. + let finalBody = inputOrInitBody - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; + // 40. If initBody is null and inputBody is non-null, then: + if (initBody == null && inputBody != null) { + // 1. If input is unusable, then throw a TypeError. + if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { + throw new TypeError( + 'Cannot construct a Request with a Request object that has already been used.' + ) + } - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; + // 2. Set finalBody to the result of creating a proxy for inputBody. + if (!TransformStream) { + TransformStream = (__nccwpck_require__(35356).TransformStream) + } - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; - function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } - function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; + // https://streams.spec.whatwg.org/#readablestream-create-a-proxy + const identityTransform = new TransformStream() + inputBody.stream.pipeThrough(identityTransform) + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + } + } - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } - }; + // 41. Set this’s request’s body to finalBody. + this[kState].body = finalBody + } - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; + // Returns request’s HTTP method, which is "GET" by default. + get method () { + webidl.brandCheck(this, Request) - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; + // The method getter steps are to return this’s request’s method. + return this[kState].method + } - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; + // Returns the URL of request as a string. + get url () { + webidl.brandCheck(this, Request) - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; + // The url getter steps are to return this’s request’s URL, serialized. + return URLSerializer(this[kState].url) + } - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; + // Returns a Headers object consisting of the headers associated with request. + // Note that headers added in the network layer by the user agent will not + // be accounted for in this object, e.g., the "Host" header. + get headers () { + webidl.brandCheck(this, Request) - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; + // The headers getter steps are to return this’s headers. + return this[kHeaders] + } - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination () { + webidl.brandCheck(this, Request) - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; + // The destination getter are to return this’s request’s destination. + return this[kState].destination + } - __classPrivateFieldIn = function (state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - }; + // Returns the referrer of request. Its value can be a same-origin URL if + // explicitly set in init, the empty string to indicate no referrer, and + // "about:client" when defaulting to the global’s default. This is used + // during fetching to determine the value of the `Referer` header of the + // request being made. + get referrer () { + webidl.brandCheck(this, Request) - __addDisposableResource = function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose, inner; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - if (async) inner = dispose; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - }; + // 1. If this’s request’s referrer is "no-referrer", then return the + // empty string. + if (this[kState].referrer === 'no-referrer') { + return '' + } - var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; + // 2. If this’s request’s referrer is "client", then return + // "about:client". + if (this[kState].referrer === 'client') { + return 'about:client' + } - __disposeResources = function (env) { - function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - var r, s = 0; - function next() { - while (r = env.stack.pop()) { - try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); - if (r.dispose) { - var result = r.dispose.call(r.value); - if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - else s |= 1; - } - catch (e) { - fail(e); - } - } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; - } - return next(); - }; + // Return this’s request’s referrer, serialized. + return this[kState].referrer.toString() + } - __rewriteRelativeImportExtension = function (path, preserveJsx) { - if (typeof path === "string" && /^\.\.?\//.test(path)) { - return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { - return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); - }); - } - return path; - }; + // Returns the referrer policy associated with request. + // This is used during fetching to compute the value of the request’s + // referrer. + get referrerPolicy () { + webidl.brandCheck(this, Request) - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__esDecorate", __esDecorate); - exporter("__runInitializers", __runInitializers); - exporter("__propKey", __propKey); - exporter("__setFunctionName", __setFunctionName); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); - exporter("__addDisposableResource", __addDisposableResource); - exporter("__disposeResources", __disposeResources); - exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension); -}); + // The referrerPolicy getter steps are to return this’s request’s referrer policy. + return this[kState].referrerPolicy + } -0 && (0); + // Returns the mode associated with request, which is a string indicating + // whether the request will use CORS, or will be restricted to same-origin + // URLs. + get mode () { + webidl.brandCheck(this, Request) + // The mode getter steps are to return this’s request’s mode. + return this[kState].mode + } -/***/ }), + // Returns the credentials mode associated with request, + // which is a string indicating whether credentials will be sent with the + // request always, never, or only when sent to a same-origin URL. + get credentials () { + // The credentials getter steps are to return this’s request’s credentials mode. + return this[kState].credentials + } -/***/ 74294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Returns the cache mode associated with request, + // which is a string indicating how the request will + // interact with the browser’s cache when fetching. + get cache () { + webidl.brandCheck(this, Request) -module.exports = __nccwpck_require__(54219); + // The cache getter steps are to return this’s request’s cache mode. + return this[kState].cache + } + // Returns the redirect mode associated with request, + // which is a string indicating how redirects for the + // request will be handled during fetching. A request + // will follow redirects by default. + get redirect () { + webidl.brandCheck(this, Request) -/***/ }), + // The redirect getter steps are to return this’s request’s redirect mode. + return this[kState].redirect + } -/***/ 54219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // Returns request’s subresource integrity metadata, which is a + // cryptographic hash of the resource being fetched. Its value + // consists of multiple hashes separated by whitespace. [SRI] + get integrity () { + webidl.brandCheck(this, Request) -"use strict"; + // The integrity getter steps are to return this’s request’s integrity + // metadata. + return this[kState].integrity + } + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive () { + webidl.brandCheck(this, Request) -var net = __nccwpck_require__(41808); -var tls = __nccwpck_require__(24404); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var events = __nccwpck_require__(82361); -var assert = __nccwpck_require__(39491); -var util = __nccwpck_require__(73837); + // The keepalive getter steps are to return this’s request’s keepalive. + return this[kState].keepalive + } + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation () { + webidl.brandCheck(this, Request) -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; + // The isReloadNavigation getter steps are to return true if this’s + // request’s reload-navigation flag is set; otherwise false. + return this[kState].reloadNavigation + } + // Returns a boolean indicating whether or not request is for a history + // navigation (a.k.a. back-foward navigation). + get isHistoryNavigation () { + webidl.brandCheck(this, Request) -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} + // The isHistoryNavigation getter steps are to return true if this’s request’s + // history-navigation flag is set; otherwise false. + return this[kState].historyNavigation + } -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} + // Returns the signal associated with request, which is an AbortSignal + // object indicating whether or not request has been aborted, and its + // abort event handler. + get signal () { + webidl.brandCheck(this, Request) -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} + // The signal getter steps are to return this’s signal. + return this[kSignal] + } -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} + get body () { + webidl.brandCheck(this, Request) + return this[kState].body ? this[kState].body.stream : null + } -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; + get bodyUsed () { + webidl.brandCheck(this, Request) - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + get duplex () { + webidl.brandCheck(this, Request) - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; + return 'half' } - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); + // Returns a clone of request. + clone () { + webidl.brandCheck(this, Request) - function onFree() { - self.emit('free', socket, options); + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || this.body?.locked) { + throw new TypeError('unusable') } - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; + // 2. Let clonedRequest be the result of cloning this’s request. + const clonedRequest = cloneRequest(this[kState]) -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); + // 3. Let clonedRequestObject be the result of creating a Request object, + // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. + const clonedRequestObject = new Request(kConstruct) + clonedRequestObject[kState] = clonedRequest + clonedRequestObject[kRealm] = this[kRealm] + clonedRequestObject[kHeaders] = new Headers(kConstruct) + clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList + clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port + // 4. Make clonedRequestObject’s signal follow this’s signal. + const ac = new AbortController() + if (this.signal.aborted) { + ac.abort(this.signal.reason) + } else { + util.addAbortListener( + this.signal, + () => { + ac.abort(this.signal.reason) + } + ) } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); + clonedRequestObject[kSignal] = ac.signal + + // 4. Return clonedRequestObject. + return clonedRequestObject } +} - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); +mixinBody(Request) - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; +function makeRequest (init) { + // https://fetch.spec.whatwg.org/#requests + const request = { + method: 'GET', + localURLsOnly: false, + unsafeRequest: false, + body: null, + client: null, + reservedClient: null, + replacesClientId: '', + window: 'client', + keepalive: false, + serviceWorkers: 'all', + initiator: '', + destination: '', + priority: null, + origin: 'client', + policyContainer: 'client', + referrer: 'client', + referrerPolicy: '', + mode: 'no-cors', + useCORSPreflightFlag: false, + credentials: 'same-origin', + useCredentials: false, + cache: 'default', + redirect: 'follow', + integrity: '', + cryptoGraphicsNonceMetadata: '', + parserMetadata: '', + reloadNavigation: false, + historyNavigation: false, + userActivation: false, + taintedOrigin: false, + redirectCount: 0, + responseTainting: 'basic', + preventNoCacheCacheControlHeaderModification: false, + done: false, + timingAllowFailed: false, + ...init, + headersList: init.headersList + ? new HeadersList(init.headersList) + : new HeadersList() } + request.url = request.urlList[0] + return request +} - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } +// https://fetch.spec.whatwg.org/#concept-request-clone +function cloneRequest (request) { + // To clone a request request, run these steps: - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); + // 1. Let newRequest be a copy of request, except for its body. + const newRequest = makeRequest({ ...request, body: null }) - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); + // 2. If request’s body is non-null, set newRequest’s body to the + // result of cloning request’s body. + if (request.body != null) { + newRequest.body = cloneBody(request.body) } - function onError(cause) { - connectReq.removeAllListeners(); + // 3. Return newRequest. + return newRequest +} - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); +Object.defineProperties(Request.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Request', + configurable: true } -}; +}) -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); +webidl.converters.Request = webidl.interfaceConverter( + Request +) - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); +// https://fetch.spec.whatwg.org/#requestinfo +webidl.converters.RequestInfo = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; + if (V instanceof Request) { + return webidl.converters.Request(V) } - return host; // for v0.11 or later -} -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; + return webidl.converters.USVString(V) } +webidl.converters.AbortSignal = webidl.interfaceConverter( + AbortSignal +) -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); +// https://fetch.spec.whatwg.org/#requestinit +webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: 'method', + converter: webidl.converters.ByteString + }, + { + key: 'headers', + converter: webidl.converters.HeadersInit + }, + { + key: 'body', + converter: webidl.nullableConverter( + webidl.converters.BodyInit + ) + }, + { + key: 'referrer', + converter: webidl.converters.USVString + }, + { + key: 'referrerPolicy', + converter: webidl.converters.DOMString, + // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy + allowedValues: referrerPolicy + }, + { + key: 'mode', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#concept-request-mode + allowedValues: requestMode + }, + { + key: 'credentials', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcredentials + allowedValues: requestCredentials + }, + { + key: 'cache', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcache + allowedValues: requestCache + }, + { + key: 'redirect', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestredirect + allowedValues: requestRedirect + }, + { + key: 'integrity', + converter: webidl.converters.DOMString + }, + { + key: 'keepalive', + converter: webidl.converters.boolean + }, + { + key: 'signal', + converter: webidl.nullableConverter( + (signal) => webidl.converters.AbortSignal( + signal, + { strict: false } + ) + ) + }, + { + key: 'window', + converter: webidl.converters.any + }, + { + key: 'duplex', + converter: webidl.converters.DOMString, + allowedValues: requestDuplex } -} else { - debug = function() {}; -} -exports.debug = debug; // for test +]) + +module.exports = { Request, makeRequest } /***/ }), -/***/ 41773: +/***/ 27823: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Client = __nccwpck_require__(33598) -const Dispatcher = __nccwpck_require__(60412) -const errors = __nccwpck_require__(48045) -const Pool = __nccwpck_require__(4634) -const BalancedPool = __nccwpck_require__(37931) -const Agent = __nccwpck_require__(7890) +const { Headers, HeadersList, fill } = __nccwpck_require__(10554) +const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(41472) const util = __nccwpck_require__(83983) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(44059) -const buildConnector = __nccwpck_require__(82067) -const MockClient = __nccwpck_require__(58687) -const MockAgent = __nccwpck_require__(66771) -const MockPool = __nccwpck_require__(26193) -const mockErrors = __nccwpck_require__(50888) -const ProxyAgent = __nccwpck_require__(97858) -const RetryHandler = __nccwpck_require__(82286) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(21892) -const DecoratorHandler = __nccwpck_require__(46930) -const RedirectHandler = __nccwpck_require__(72860) -const createRedirectInterceptor = __nccwpck_require__(38861) - -let hasCrypto -try { - __nccwpck_require__(6113) - hasCrypto = true -} catch { - hasCrypto = false -} +const { kEnumerableProperty } = util +const { + isValidReasonPhrase, + isCancelled, + isAborted, + isBlobLike, + serializeJavascriptValueToJSONString, + isErrorLike, + isomorphicEncode +} = __nccwpck_require__(52538) +const { + redirectStatusSet, + nullBodyStatus, + DOMException +} = __nccwpck_require__(41037) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) +const { webidl } = __nccwpck_require__(21744) +const { FormData } = __nccwpck_require__(72015) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { URLSerializer } = __nccwpck_require__(685) +const { kHeadersList, kConstruct } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { types } = __nccwpck_require__(73837) -Object.assign(Dispatcher.prototype, api) +const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(35356).ReadableStream) +const textEncoder = new TextEncoder('utf-8') -module.exports.Dispatcher = Dispatcher -module.exports.Client = Client -module.exports.Pool = Pool -module.exports.BalancedPool = BalancedPool -module.exports.Agent = Agent -module.exports.ProxyAgent = ProxyAgent -module.exports.RetryHandler = RetryHandler +// https://fetch.spec.whatwg.org/#response-class +class Response { + // Creates network error Response. + static error () { + // TODO + const relevantRealm = { settingsObject: {} } -module.exports.DecoratorHandler = DecoratorHandler -module.exports.RedirectHandler = RedirectHandler -module.exports.createRedirectInterceptor = createRedirectInterceptor + // The static error() method steps are to return the result of creating a + // Response object, given a new network error, "immutable", and this’s + // relevant Realm. + const responseObject = new Response() + responseObject[kState] = makeNetworkError() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + return responseObject + } -module.exports.buildConnector = buildConnector -module.exports.errors = errors + // https://fetch.spec.whatwg.org/#dom-response-json + static json (data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) -function makeDispatcher (fn) { - return (url, opts, handler) => { - if (typeof opts === 'function') { - handler = opts - opts = null + if (init !== null) { + init = webidl.converters.ResponseInit(init) } - if (!url || (typeof url !== 'string' && typeof url !== 'object' && !(url instanceof URL))) { - throw new InvalidArgumentError('invalid url') + // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. + const bytes = textEncoder.encode( + serializeJavascriptValueToJSONString(data) + ) + + // 2. Let body be the result of extracting bytes. + const body = extractBody(bytes) + + // 3. Let responseObject be the result of creating a Response object, given a new response, + // "response", and this’s relevant Realm. + const relevantRealm = { settingsObject: {} } + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'response' + responseObject[kHeaders][kRealm] = relevantRealm + + // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). + initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) + + // 5. Return responseObject. + return responseObject + } + + // Creates a redirect Response that redirects to url with status status. + static redirect (url, status = 302) { + const relevantRealm = { settingsObject: {} } + + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) + + url = webidl.converters.USVString(url) + status = webidl.converters['unsigned short'](status) + + // 1. Let parsedURL be the result of parsing url with current settings + // object’s API base URL. + // 2. If parsedURL is failure, then throw a TypeError. + // TODO: base-URL? + let parsedURL + try { + parsedURL = new URL(url, getGlobalOrigin()) + } catch (err) { + throw Object.assign(new TypeError('Failed to parse URL from ' + url), { + cause: err + }) } - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') + // 3. If status is not a redirect status, then throw a RangeError. + if (!redirectStatusSet.has(status)) { + throw new RangeError('Invalid status code ' + status) } - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } + // 4. Let responseObject be the result of creating a Response object, + // given a new response, "immutable", and this’s relevant Realm. + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } + // 5. Set responseObject’s response’s status to status. + responseObject[kState].status = status - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } + // 6. Let value be parsedURL, serialized and isomorphic encoded. + const value = isomorphicEncode(URLSerializer(parsedURL)) - url = util.parseURL(url) + // 7. Append `Location`/value to responseObject’s response’s header list. + responseObject[kState].headersList.append('location', value) + + // 8. Return responseObject. + return responseObject + } + + // https://fetch.spec.whatwg.org/#dom-response + constructor (body = null, init = {}) { + if (body !== null) { + body = webidl.converters.BodyInit(body) } - const { agent, dispatcher = getGlobalDispatcher() } = opts + init = webidl.converters.ResponseInit(init) - if (agent) { - throw new InvalidArgumentError('unsupported opts.agent. Did you mean opts.client?') + // TODO + this[kRealm] = { settingsObject: {} } + + // 1. Set this’s response to a new response. + this[kState] = makeResponse({}) + + // 2. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is this’s response’s header list and guard + // is "response". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kGuard] = 'response' + this[kHeaders][kHeadersList] = this[kState].headersList + this[kHeaders][kRealm] = this[kRealm] + + // 3. Let bodyWithType be null. + let bodyWithType = null + + // 4. If body is non-null, then set bodyWithType to the result of extracting body. + if (body != null) { + const [extractedBody, type] = extractBody(body) + bodyWithType = { body: extractedBody, type } } - return fn.call(dispatcher, { - ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, - method: opts.method || (opts.body ? 'PUT' : 'GET') - }, handler) + // 5. Perform initialize a response given this, init, and bodyWithType. + initializeResponse(this, init, bodyWithType) } -} -module.exports.setGlobalDispatcher = setGlobalDispatcher -module.exports.getGlobalDispatcher = getGlobalDispatcher + // Returns response’s type, e.g., "cors". + get type () { + webidl.brandCheck(this, Response) -if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { - let fetchImpl = null - module.exports.fetch = async function fetch (resource) { - if (!fetchImpl) { - fetchImpl = (__nccwpck_require__(74881).fetch) - } + // The type getter steps are to return this’s response’s type. + return this[kState].type + } - try { - return await fetchImpl(...arguments) - } catch (err) { - if (typeof err === 'object') { - Error.captureStackTrace(err, this) - } + // Returns response’s URL, if it has one; otherwise the empty string. + get url () { + webidl.brandCheck(this, Response) - throw err + const urlList = this[kState].urlList + + // The url getter steps are to return the empty string if this’s + // response’s URL is null; otherwise this’s response’s URL, + // serialized with exclude fragment set to true. + const url = urlList[urlList.length - 1] ?? null + + if (url === null) { + return '' } - } - module.exports.Headers = __nccwpck_require__(10554).Headers - module.exports.Response = __nccwpck_require__(27823).Response - module.exports.Request = __nccwpck_require__(48359).Request - module.exports.FormData = __nccwpck_require__(72015).FormData - module.exports.File = __nccwpck_require__(78511).File - module.exports.FileReader = __nccwpck_require__(1446).FileReader - const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(71246) + return URLSerializer(url, true) + } - module.exports.setGlobalOrigin = setGlobalOrigin - module.exports.getGlobalOrigin = getGlobalOrigin + // Returns whether response was obtained through a redirect. + get redirected () { + webidl.brandCheck(this, Response) - const { CacheStorage } = __nccwpck_require__(37907) - const { kConstruct } = __nccwpck_require__(29174) + // The redirected getter steps are to return true if this’s response’s URL + // list has more than one item; otherwise false. + return this[kState].urlList.length > 1 + } - // Cache & CacheStorage are tightly coupled with fetch. Even if it may run - // in an older version of Node, it doesn't have any use without fetch. - module.exports.caches = new CacheStorage(kConstruct) -} + // Returns response’s status. + get status () { + webidl.brandCheck(this, Response) -if (util.nodeMajor >= 16) { - const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(41724) + // The status getter steps are to return this’s response’s status. + return this[kState].status + } - module.exports.deleteCookie = deleteCookie - module.exports.getCookies = getCookies - module.exports.getSetCookies = getSetCookies - module.exports.setCookie = setCookie + // Returns whether response’s status is an ok status. + get ok () { + webidl.brandCheck(this, Response) - const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) + // The ok getter steps are to return true if this’s response’s status is an + // ok status; otherwise false. + return this[kState].status >= 200 && this[kState].status <= 299 + } - module.exports.parseMIMEType = parseMIMEType - module.exports.serializeAMimeType = serializeAMimeType -} + // Returns response’s status message. + get statusText () { + webidl.brandCheck(this, Response) -if (util.nodeMajor >= 18 && hasCrypto) { - const { WebSocket } = __nccwpck_require__(54284) + // The statusText getter steps are to return this’s response’s status + // message. + return this[kState].statusText + } - module.exports.WebSocket = WebSocket -} + // Returns response’s headers as Headers. + get headers () { + webidl.brandCheck(this, Response) -module.exports.request = makeDispatcher(api.request) -module.exports.stream = makeDispatcher(api.stream) -module.exports.pipeline = makeDispatcher(api.pipeline) -module.exports.connect = makeDispatcher(api.connect) -module.exports.upgrade = makeDispatcher(api.upgrade) + // The headers getter steps are to return this’s headers. + return this[kHeaders] + } -module.exports.MockClient = MockClient -module.exports.MockPool = MockPool -module.exports.MockAgent = MockAgent -module.exports.mockErrors = mockErrors + get body () { + webidl.brandCheck(this, Response) + return this[kState].body ? this[kState].body.stream : null + } -/***/ }), + get bodyUsed () { + webidl.brandCheck(this, Response) -/***/ 7890: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } -"use strict"; + // Returns a clone of response. + clone () { + webidl.brandCheck(this, Response) + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || (this.body && this.body.locked)) { + throw webidl.errors.exception({ + header: 'Response.clone', + message: 'Body has already been consumed.' + }) + } -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(72785) -const DispatcherBase = __nccwpck_require__(74839) -const Pool = __nccwpck_require__(4634) -const Client = __nccwpck_require__(33598) -const util = __nccwpck_require__(83983) -const createRedirectInterceptor = __nccwpck_require__(38861) -const { WeakRef, FinalizationRegistry } = __nccwpck_require__(56436)() + // 2. Let clonedResponse be the result of cloning this’s response. + const clonedResponse = cloneResponse(this[kState]) -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kFinalizer = Symbol('finalizer') -const kOptions = Symbol('options') + // 3. Return the result of creating a Response object, given + // clonedResponse, this’s headers’s guard, and this’s relevant Realm. + const clonedResponseObject = new Response() + clonedResponseObject[kState] = clonedResponse + clonedResponseObject[kRealm] = this[kRealm] + clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList + clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm] -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) + return clonedResponseObject + } } -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super() +mixinBody(Response) - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } +Object.defineProperties(Response.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'Response', + configurable: true + } +}) - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } +Object.defineProperties(Response, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty +}) - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } +// https://fetch.spec.whatwg.org/#concept-response-clone +function cloneResponse (response) { + // To clone a response response, run these steps: - if (connect && typeof connect !== 'function') { - connect = { ...connect } + // 1. If response is a filtered response, then return a new identical + // filtered response whose internal response is a clone of response’s + // internal response. + if (response.internalResponse) { + return filterResponse( + cloneResponse(response.internalResponse), + response.type + ) + } + + // 2. Let newResponse be a copy of response, except for its body. + const newResponse = makeResponse({ ...response, body: null }) + + // 3. If response’s body is non-null, then set newResponse’s body to the + // result of cloning response’s body. + if (response.body != null) { + newResponse.body = cloneBody(response.body) + } + + // 4. Return newResponse. + return newResponse +} + +function makeResponse (init) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: 'default', + status: 200, + timingInfo: null, + cacheState: '', + statusText: '', + ...init, + headersList: init.headersList + ? new HeadersList(init.headersList) + : new HeadersList(), + urlList: init.urlList ? [...init.urlList] : [] + } +} + +function makeNetworkError (reason) { + const isError = isErrorLike(reason) + return makeResponse({ + type: 'error', + status: 0, + error: isError + ? reason + : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === 'AbortError' + }) +} + +function makeFilteredResponse (response, state) { + state = { + internalResponse: response, + ...state + } + + return new Proxy(response, { + get (target, p) { + return p in state ? state[p] : target[p] + }, + set (target, p, value) { + assert(!(p in state)) + target[p] = value + return true } + }) +} - this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] +// https://fetch.spec.whatwg.org/#concept-filtered-response +function filterResponse (response, type) { + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (type === 'basic') { + // A basic filtered response is a filtered response whose type is "basic" + // and header list excludes any headers in internal response’s header list + // whose name is a forbidden response-header name. - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => { - const ref = this[kClients].get(key) - if (ref !== undefined && ref.deref() === undefined) { - this[kClients].delete(key) - } + // Note: undici does not implement forbidden response-header names + return makeFilteredResponse(response, { + type: 'basic', + headersList: response.headersList }) + } else if (type === 'cors') { + // A CORS filtered response is a filtered response whose type is "cors" + // and header list excludes any headers in internal response’s header + // list whose name is not a CORS-safelisted response-header name, given + // internal response’s CORS-exposed header-name list. - const agent = this + // Note: undici does not implement CORS-safelisted response-header names + return makeFilteredResponse(response, { + type: 'cors', + headersList: response.headersList + }) + } else if (type === 'opaque') { + // An opaque filtered response is a filtered response whose type is + // "opaque", URL list is the empty list, status is 0, status message + // is the empty byte sequence, header list is empty, and body is null. - this[kOnDrain] = (origin, targets) => { - agent.emit('drain', origin, [agent, ...targets]) - } + return makeFilteredResponse(response, { + type: 'opaque', + urlList: Object.freeze([]), + status: 0, + statusText: '', + body: null + }) + } else if (type === 'opaqueredirect') { + // An opaque-redirect filtered response is a filtered response whose type + // is "opaqueredirect", status is 0, status message is the empty byte + // sequence, header list is empty, and body is null. - this[kOnConnect] = (origin, targets) => { - agent.emit('connect', origin, [agent, ...targets]) - } + return makeFilteredResponse(response, { + type: 'opaqueredirect', + status: 0, + statusText: '', + headersList: [], + body: null + }) + } else { + assert(false) + } +} - this[kOnDisconnect] = (origin, targets, err) => { - agent.emit('disconnect', origin, [agent, ...targets], err) - } +// https://fetch.spec.whatwg.org/#appropriate-network-error +function makeAppropriateNetworkError (fetchParams, err = null) { + // 1. Assert: fetchParams is canceled. + assert(isCancelled(fetchParams)) - this[kOnConnectionError] = (origin, targets, err) => { - agent.emit('connectionError', origin, [agent, ...targets], err) - } - } + // 2. Return an aborted network error if fetchParams is aborted; + // otherwise return a network error. + return isAborted(fetchParams) + ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) + : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) +} - get [kRunning] () { - let ret = 0 - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore next: gc is undeterministic */ - if (client) { - ret += client[kRunning] - } - } - return ret +// https://whatpr.org/fetch/1392.html#initialize-a-response +function initializeResponse (response, init, body) { + // 1. If init["status"] is not in the range 200 to 599, inclusive, then + // throw a RangeError. + if (init.status !== null && (init.status < 200 || init.status > 599)) { + throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') } - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') + // 2. If init["statusText"] does not match the reason-phrase token production, + // then throw a TypeError. + if ('statusText' in init && init.statusText != null) { + // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: + // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) + if (!isValidReasonPhrase(String(init.statusText))) { + throw new TypeError('Invalid statusText') } + } - const ref = this[kClients].get(key) - - let dispatcher = ref ? ref.deref() : null - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) + // 3. Set response’s response’s status to init["status"]. + if ('status' in init && init.status != null) { + response[kState].status = init.status + } - this[kClients].set(key, new WeakRef(dispatcher)) - this[kFinalizer].register(dispatcher, key) - } + // 4. Set response’s response’s status message to init["statusText"]. + if ('statusText' in init && init.statusText != null) { + response[kState].statusText = init.statusText + } - return dispatcher.dispatch(opts, handler) + // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. + if ('headers' in init && init.headers != null) { + fill(response[kHeaders], init.headers) } - async [kClose] () { - const closePromises = [] - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore else: gc is undeterministic */ - if (client) { - closePromises.push(client.close()) - } + // 6. If body was given, then: + if (body) { + // 1. If response's status is a null body status, then throw a TypeError. + if (nullBodyStatus.includes(response.status)) { + throw webidl.errors.exception({ + header: 'Response constructor', + message: 'Invalid response status code ' + response.status + }) } - await Promise.all(closePromises) - } + // 2. Set response's body to body's body. + response[kState].body = body.body - async [kDestroy] (err) { - const destroyPromises = [] - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore else: gc is undeterministic */ - if (client) { - destroyPromises.push(client.destroy(err)) - } + // 3. If body's type is non-null and response's header list does not contain + // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. + if (body.type != null && !response[kState].headersList.contains('Content-Type')) { + response[kState].headersList.append('content-type', body.type) } - - await Promise.all(destroyPromises) } } -module.exports = Agent - - -/***/ }), - -/***/ 7032: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +webidl.converters.ReadableStream = webidl.interfaceConverter( + ReadableStream +) -const { addAbortListener } = __nccwpck_require__(83983) -const { RequestAbortedError } = __nccwpck_require__(48045) +webidl.converters.FormData = webidl.interfaceConverter( + FormData +) -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') +webidl.converters.URLSearchParams = webidl.interfaceConverter( + URLSearchParams +) -function abort (self) { - if (self.abort) { - self.abort() - } else { - self.onError(new RequestAbortedError()) +// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit +webidl.converters.XMLHttpRequestBodyInit = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) } -} -function addSignal (self, signal) { - self[kSignal] = null - self[kListener] = null + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } - if (!signal) { - return + if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { + return webidl.converters.BufferSource(V) } - if (signal.aborted) { - abort(self) - return + if (util.isFormDataLike(V)) { + return webidl.converters.FormData(V, { strict: false }) } - self[kSignal] = signal - self[kListener] = () => { - abort(self) + if (V instanceof URLSearchParams) { + return webidl.converters.URLSearchParams(V) } - addAbortListener(self[kSignal], self[kListener]) + return webidl.converters.DOMString(V) } -function removeSignal (self) { - if (!self[kSignal]) { - return +// https://fetch.spec.whatwg.org/#bodyinit +webidl.converters.BodyInit = function (V) { + if (V instanceof ReadableStream) { + return webidl.converters.ReadableStream(V) } - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) + // Note: the spec doesn't include async iterables, + // this is an undici extension. + if (V?.[Symbol.asyncIterator]) { + return V } - self[kSignal] = null - self[kListener] = null + return webidl.converters.XMLHttpRequestBodyInit(V) } +webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: 'status', + converter: webidl.converters['unsigned short'], + defaultValue: 200 + }, + { + key: 'statusText', + converter: webidl.converters.ByteString, + defaultValue: '' + }, + { + key: 'headers', + converter: webidl.converters.HeadersInit + } +]) + module.exports = { - addSignal, - removeSignal + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse } /***/ }), -/***/ 29744: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 15861: +/***/ ((module) => { "use strict"; -const { AsyncResource } = __nccwpck_require__(50852) -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { addSignal, removeSignal } = __nccwpck_require__(7032) +module.exports = { + kUrl: Symbol('url'), + kHeaders: Symbol('headers'), + kSignal: Symbol('signal'), + kState: Symbol('state'), + kGuard: Symbol('guard'), + kRealm: Symbol('realm') +} -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } +/***/ }), - const { signal, opaque, responseHeaders } = opts +/***/ 52538: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } +"use strict"; - super('UNDICI_CONNECT') - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.callback = callback - this.abort = null +const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(41037) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { performance } = __nccwpck_require__(4074) +const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(83983) +const assert = __nccwpck_require__(39491) +const { isUint8Array } = __nccwpck_require__(29830) - addSignal(this, signal) - } +let supportedHashes = [] - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } +// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable +/** @type {import('crypto')|undefined} */ +let crypto - this.abort = abort - this.context = context +try { + crypto = __nccwpck_require__(6113) + const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] + supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) +/* c8 ignore next 3 */ +} catch { +} + +function responseURL (response) { + // https://fetch.spec.whatwg.org/#responses + // A response has an associated URL. It is a pointer to the last URL + // in response’s URL list and null if response’s URL list is empty. + const urlList = response.urlList + const length = urlList.length + return length === 0 ? null : urlList[length - 1].toString() +} + +// https://fetch.spec.whatwg.org/#concept-response-location-url +function responseLocationURL (response, requestFragment) { + // 1. If response’s status is not a redirect status, then return null. + if (!redirectStatusSet.has(response.status)) { + return null } - onHeaders () { - throw new SocketError('bad connect', null) + // 2. Let location be the result of extracting header list values given + // `Location` and response’s header list. + let location = response.headersList.get('location') + + // 3. If location is a header value, then set location to the result of + // parsing location with response’s URL. + if (location !== null && isValidHeaderValue(location)) { + location = new URL(location, responseURL(response)) } - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this + // 4. If location is a URL whose fragment is null, then set location’s + // fragment to requestFragment. + if (location && !location.hash) { + location.hash = requestFragment + } - removeSignal(this) + // 5. Return location. + return location +} - this.callback = null +/** @returns {URL} */ +function requestCurrentURL (request) { + return request.urlList[request.urlList.length - 1] +} - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } +function requestBadPort (request) { + // 1. Let url be request’s current URL. + const url = requestCurrentURL(request) - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) + // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, + // then return blocked. + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return 'blocked' } - onError (err) { - const { callback, opaque } = this + // 3. Return allowed. + return 'allowed' +} - removeSignal(this) +function isErrorLike (object) { + return object instanceof Error || ( + object?.constructor?.name === 'Error' || + object?.constructor?.name === 'DOMException' + ) +} - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) +// Check whether |statusText| is a ByteString and +// matches the Reason-Phrase token production. +// RFC 2616: https://tools.ietf.org/html/rfc2616 +// RFC 7230: https://tools.ietf.org/html/rfc7230 +// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" +// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 +function isValidReasonPhrase (statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i) + if ( + !( + ( + c === 0x09 || // HTAB + (c >= 0x20 && c <= 0x7e) || // SP / VCHAR + (c >= 0x80 && c <= 0xff) + ) // obs-text + ) + ) { + return false } } + return true } -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new ConnectHandler(opts, callback) - this.dispatch({ ...opts, method: 'CONNECT' }, connectHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ +function isTokenCharCode (c) { + switch (c) { + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e } } -module.exports = connect - - -/***/ }), - -/***/ 28752: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(12781) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { AsyncResource } = __nccwpck_require__(50852) -const { addSignal, removeSignal } = __nccwpck_require__(7032) -const assert = __nccwpck_require__(39491) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null +/** + * @param {string} characters + */ +function isValidHTTPToken (characters) { + if (characters.length === 0) { + return false } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false } } + return true +} - _destroy (err, callback) { - this._read() - - callback(err) - } +/** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ +function isValidHeaderName (potentialValue) { + return isValidHTTPToken(potentialValue) } -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume +/** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ +function isValidHeaderValue (potentialValue) { + // - Has no leading or trailing HTTP tab or space bytes. + // - Contains no 0x00 (NUL) or HTTP newline bytes. + if ( + potentialValue.startsWith('\t') || + potentialValue.startsWith(' ') || + potentialValue.endsWith('\t') || + potentialValue.endsWith(' ') + ) { + return false } - _read () { - this[kResume]() + if ( + potentialValue.includes('\0') || + potentialValue.includes('\r') || + potentialValue.includes('\n') + ) { + return false } - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } + return true } -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts +// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect +function setRequestReferrerPolicyOnRedirect (request, actualResponse) { + // Given a request request and a response actualResponse, this algorithm + // updates request’s referrer policy according to the Referrer-Policy + // header (if any) in actualResponse. - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } + // 1. Let policy be the result of executing § 8.1 Parse a referrer policy + // from a Referrer-Policy header on actualResponse. - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } + // 8.1 Parse a referrer policy from a Referrer-Policy header + // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. + const { headersList } = actualResponse + // 2. Let policy be the empty string. + // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. + // 4. Return policy. + const policyHeader = (headersList.get('referrer-policy') ?? '').split(',') - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') + // Note: As the referrer-policy can contain multiple policies + // separated by comma, we need to loop through all of them + // and pick the first valid one. + // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy + let policy = '' + if (policyHeader.length > 0) { + // The right-most policy takes precedence. + // The left-most policy is the fallback. + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim() + if (referrerPolicyTokens.has(token)) { + policy = token + break + } } + } - super('UNDICI_PIPELINE') - - this.opaque = opaque || null - this.responseHeaders = responseHeaders || null - this.handler = handler - this.abort = null - this.context = null - this.onInfo = onInfo || null - - this.req = new PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body && body.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) + // 2. If policy is not the empty string, then set request’s referrer policy to policy. + if (policy !== '') { + request.referrerPolicy = policy + } +} - callback(err) - } - }).on('prefinish', () => { - const { req } = this +// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check +function crossOriginResourcePolicyCheck () { + // TODO + return 'allowed' +} - // Node < 15 does not call _final in same tick. - req.push(null) - }) +// https://fetch.spec.whatwg.org/#concept-cors-check +function corsCheck () { + // TODO + return 'success' +} - this.res = null +// https://fetch.spec.whatwg.org/#concept-tao-check +function TAOCheck () { + // TODO + return 'success' +} - addSignal(this, signal) - } +function appendFetchMetadata (httpRequest) { + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header + // TODO - onConnect (abort, context) { - const { ret, res } = this + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header - assert(!res, 'pipeline cannot be retried') + // 1. Assert: r’s url is a potentially trustworthy URL. + // TODO - if (ret.destroyed) { - throw new RequestAbortedError() - } + // 2. Let header be a Structured Header whose value is a token. + let header = null - this.abort = abort - this.context = context - } + // 3. Set header’s value to r’s mode. + header = httpRequest.mode - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this + // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. + httpRequest.headersList.set('sec-fetch-mode', header) - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header + // TODO - this.res = new PipelineResponse(resume) + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header + // TODO +} - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } +// https://fetch.spec.whatwg.org/#append-a-request-origin-header +function appendRequestOriginHeader (request) { + // 1. Let serializedOrigin be the result of byte-serializing a request origin with request. + let serializedOrigin = request.origin - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') + // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. + if (request.responseTainting === 'cors' || request.mode === 'websocket') { + if (serializedOrigin) { + request.headersList.append('origin', serializedOrigin) } - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() + // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: + } else if (request.method !== 'GET' && request.method !== 'HEAD') { + // 1. Switch on request’s referrer policy: + switch (request.referrerPolicy) { + case 'no-referrer': + // Set serializedOrigin to `null`. + serializedOrigin = null + break + case 'no-referrer-when-downgrade': + case 'strict-origin': + case 'strict-origin-when-cross-origin': + // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { + serializedOrigin = null } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) + break + case 'same-origin': + // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`. + if (!sameOrigin(request, requestCurrentURL(request))) { + serializedOrigin = null } - }) + break + default: + // Do nothing. + } - this.body = body + if (serializedOrigin) { + // 2. Append (`Origin`, serializedOrigin) to request’s header list. + request.headersList.append('origin', serializedOrigin) + } } +} - onData (chunk) { - const { res } = this - return res.push(chunk) - } +function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { + // TODO + return performance.now() +} - onComplete (trailers) { - const { res } = this - res.push(null) +// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info +function createOpaqueTimingInfo (timingInfo) { + return { + startTime: timingInfo.startTime ?? 0, + redirectStartTime: 0, + redirectEndTime: 0, + postRedirectStartTime: timingInfo.startTime ?? 0, + finalServiceWorkerStartTime: 0, + finalNetworkResponseStartTime: 0, + finalNetworkRequestStartTime: 0, + endTime: 0, + encodedBodySize: 0, + decodedBodySize: 0, + finalConnectionTimingInfo: null } +} - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) +// https://html.spec.whatwg.org/multipage/origin.html#policy-container +function makePolicyContainer () { + // Note: the fetch spec doesn't make use of embedder policy or CSP list + return { + referrerPolicy: 'strict-origin-when-cross-origin' } } -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) +// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container +function clonePolicyContainer (policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy } } -module.exports = pipeline - +// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer +function determineRequestsReferrer (request) { + // 1. Let policy be request's referrer policy. + const policy = request.referrerPolicy -/***/ }), + // Note: policy cannot (shouldn't) be null or an empty string. + assert(policy) -/***/ 55448: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 2. Let environment be request’s client. -"use strict"; + let referrerSource = null + // 3. Switch on request’s referrer: + if (request.referrer === 'client') { + // Note: node isn't a browser and doesn't implement document/iframes, + // so we bypass this step and replace it with our own. -const Readable = __nccwpck_require__(73858) -const { - InvalidArgumentError, - RequestAbortedError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) -const { AsyncResource } = __nccwpck_require__(50852) -const { addSignal, removeSignal } = __nccwpck_require__(7032) + const globalOrigin = getGlobalOrigin() -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') + if (!globalOrigin || globalOrigin.origin === 'null') { + return 'no-referrer' } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts + // note: we need to clone it as it's mutated + referrerSource = new URL(globalOrigin) + } else if (request.referrer instanceof URL) { + // Let referrerSource be request’s referrer. + referrerSource = request.referrer + } - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } + // 4. Let request’s referrerURL be the result of stripping referrerSource for + // use as a referrer. + let referrerURL = stripURLForReferrer(referrerSource) - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } + // 5. Let referrerOrigin be the result of stripping referrerSource for use as + // a referrer, with the origin-only flag set to true. + const referrerOrigin = stripURLForReferrer(referrerSource, true) - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } + // 6. If the result of serializing referrerURL is a string whose length is + // greater than 4096, set referrerURL to referrerOrigin. + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin + } - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } + const areSameOrigin = sameOrigin(request, referrerURL) + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && + !isURLPotentiallyTrustworthy(request.url) - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } + // 8. Execute the switch statements corresponding to the value of policy: + switch (policy) { + case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) + case 'unsafe-url': return referrerURL + case 'same-origin': + return areSameOrigin ? referrerOrigin : 'no-referrer' + case 'origin-when-cross-origin': + return areSameOrigin ? referrerURL : referrerOrigin + case 'strict-origin-when-cross-origin': { + const currentURL = requestCurrentURL(request) - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL } - throw err - } - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.res = null - this.abort = null - this.body = body - this.trailers = {} - this.context = null - this.onInfo = onInfo || null - this.throwOnError = throwOnError - this.highWaterMark = highWaterMark + // 2. If referrerURL is a potentially trustworthy URL and request’s + // current URL is not a potentially trustworthy URL, then return no + // referrer. + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return 'no-referrer' + } - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) + // 3. Return referrerOrigin. + return referrerOrigin } + case 'strict-origin': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + case 'no-referrer-when-downgrade': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ - addSignal(this, signal) + default: // eslint-disable-line + return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin } +} - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } +/** + * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url + * @param {URL} url + * @param {boolean|undefined} originOnly + */ +function stripURLForReferrer (url, originOnly) { + // 1. Assert: url is a URL. + assert(url instanceof URL) - this.abort = abort - this.context = context + // 2. If url’s scheme is a local scheme, then return no referrer. + if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { + return 'no-referrer' } - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this + // 3. Set url’s username to the empty string. + url.username = '' - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + // 4. Set url’s password to the empty string. + url.password = '' - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } + // 5. Set url’s fragment to null. + url.hash = '' - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const body = new Readable({ resume, abort, contentType, highWaterMark }) + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 1. Set url’s path to « the empty string ». + url.pathname = '' - this.callback = null - this.res = body - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body, - context - }) - } - } + // 2. Set url’s query to null. + url.search = '' + } + + // 7. Return url. + return url +} + +function isURLPotentiallyTrustworthy (url) { + if (!(url instanceof URL)) { + return false } - onData (chunk) { - const { res } = this - return res.push(chunk) + // If child of about, return true + if (url.href === 'about:blank' || url.href === 'about:srcdoc') { + return true } - onComplete (trailers) { - const { res } = this - - removeSignal(this) + // If scheme is data, return true + if (url.protocol === 'data:') return true - util.parseHeaders(trailers, this.trailers) + // If file, return true + if (url.protocol === 'file:') return true - res.push(null) - } + return isOriginPotentiallyTrustworthy(url.origin) - onError (err) { - const { res, callback, body, opaque } = this + function isOriginPotentiallyTrustworthy (origin) { + // If origin is explicitly null, return false + if (origin == null || origin === 'null') return false - removeSignal(this) + const originAsURL = new URL(origin) - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) + // If secure, return true + if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { + return true } - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) + // If localhost or variants, return true + if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || + (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || + (originAsURL.hostname.endsWith('.localhost'))) { + return true } - if (body) { - this.body = null - util.destroy(body, err) - } + // If any other, return false + return false } } -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ +function bytesMatch (bytes, metadataList) { + // If node is not built with OpenSSL support, we cannot check + // a request's integrity, so allow it by default (the spec will + // allow requests if an invalid hash is given, as precedence). + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === undefined) { + return true } - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) + // 1. Let parsedMetadata be the result of parsing metadataList. + const parsedMetadata = parseMetadata(metadataList) + + // 2. If parsedMetadata is no metadata, return true. + if (parsedMetadata === 'no metadata') { + return true } -} -module.exports = request -module.exports.RequestHandler = RequestHandler + // 3. If response is not eligible for integrity validation, return false. + // TODO + // 4. If parsedMetadata is the empty set, return true. + if (parsedMetadata.length === 0) { + return true + } -/***/ }), + // 5. Let metadata be the result of getting the strongest + // metadata from parsedMetadata. + const strongest = getStrongestMetadata(parsedMetadata) + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest) -/***/ 75395: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 6. For each item in metadata: + for (const item of metadata) { + // 1. Let algorithm be the alg component of item. + const algorithm = item.algo -"use strict"; + // 2. Let expectedValue be the val component of item. + const expectedValue = item.hash + // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e + // "be liberal with padding". This is annoying, and it's not even in the spec. -const { finished, PassThrough } = __nccwpck_require__(12781) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { getResolveErrorBodyCallback } = __nccwpck_require__(77474) -const { AsyncResource } = __nccwpck_require__(50852) -const { addSignal, removeSignal } = __nccwpck_require__(7032) + // 3. Let actualValue be the result of applying algorithm to bytes. + let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') + if (actualValue[actualValue.length - 1] === '=') { + if (actualValue[actualValue.length - 2] === '=') { + actualValue = actualValue.slice(0, -2) + } else { + actualValue = actualValue.slice(0, -1) + } } - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts + // 4. If actualValue is a case-sensitive match for expectedValue, + // return true. + if (compareBase64Mixed(actualValue, expectedValue)) { + return true + } + } - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } + // 7. Return false. + return false +} - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } +// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options +// https://www.w3.org/TR/CSP2/#source-list-syntax +// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 +const parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ +function parseMetadata (metadata) { + // 1. Let result be the empty set. + /** @type {{ algo: string, hash: string }[]} */ + const result = [] - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } + // 2. Let empty be equal to true. + let empty = true - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } + // 3. For each token returned by splitting metadata on spaces: + for (const token of metadata.split(' ')) { + // 1. Set empty to false. + empty = false - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.nop), err) - } - throw err + // 2. Parse token as a hash-with-options. + const parsedToken = parseHashWithOptions.exec(token) + + // 3. If token does not parse, continue to the next token. + if ( + parsedToken === null || + parsedToken.groups === undefined || + parsedToken.groups.algo === undefined + ) { + // Note: Chromium blocks the request at this point, but Firefox + // gives a warning that an invalid integrity was given. The + // correct behavior is to ignore these, and subsequently not + // check the integrity of the resource. + continue } - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.factory = factory - this.callback = callback - this.res = null - this.abort = null - this.context = null - this.trailers = null - this.body = body - this.onInfo = onInfo || null - this.throwOnError = throwOnError || false + // 4. Let algorithm be the hash-algo component of token. + const algorithm = parsedToken.groups.algo.toLowerCase() - if (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) + // 5. If algorithm is a hash function recognized by the user + // agent, add the parsed token to result. + if (supportedHashes.includes(algorithm)) { + result.push(parsedToken.groups) } + } - addSignal(this, signal) + // 4. Return no metadata if empty is true, otherwise return result. + if (empty === true) { + return 'no metadata' } - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() + return result +} + +/** + * @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList + */ +function getStrongestMetadata (metadataList) { + // Let algorithm be the algo component of the first item in metadataList. + // Can be sha256 + let algorithm = metadataList[0].algo + // If the algorithm is sha512, then it is the strongest + // and we can return immediately + if (algorithm[3] === '5') { + return algorithm + } + + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i] + // If the algorithm is sha512, then it is the strongest + // and we can break the loop immediately + if (metadata.algo[3] === '5') { + algorithm = 'sha512' + break + // If the algorithm is sha384, then a potential sha256 or sha384 is ignored + } else if (algorithm[3] === '3') { + continue + // algorithm is sha256, check if algorithm is sha384 and if so, set it as + // the strongest + } else if (metadata.algo[3] === '3') { + algorithm = 'sha384' } + } + return algorithm +} - this.abort = abort - this.context = context +function filterMetadataListByAlgorithm (metadataList, algorithm) { + if (metadataList.length === 1) { + return metadataList } - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this + let pos = 0 + for (let i = 0; i < metadataList.length; ++i) { + if (metadataList[i].algo === algorithm) { + metadataList[pos++] = metadataList[i] + } + } - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) + metadataList.length = pos - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) + return metadataList +} + +/** + * Compares two base64 strings, allowing for base64url + * in the second string. + * +* @param {string} actualValue always base64 + * @param {string} expectedValue base64 or base64url + * @returns {boolean} + */ +function compareBase64Mixed (actualValue, expectedValue) { + if (actualValue.length !== expectedValue.length) { + return false + } + for (let i = 0; i < actualValue.length; ++i) { + if (actualValue[i] !== expectedValue[i]) { + if ( + (actualValue[i] === '+' && expectedValue[i] === '-') || + (actualValue[i] === '/' && expectedValue[i] === '_') + ) { + continue } - return + return false } + } - this.factory = null + return true +} - let res +// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request +function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { + // TODO +} - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() +/** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ +function sameOrigin (A, B) { + // 1. If A and B are the same opaque origin, then return true. + if (A.origin === B.origin && A.origin === 'null') { + return true + } - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } + // 2. If A and B are both tuple origins and their schemes, + // hosts, and port are identical, then return true. + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true + } - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) + // 3. Return false. + return false +} - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } +function createDeferredPromise () { + let res + let rej + const promise = new Promise((resolve, reject) => { + res = resolve + rej = reject + }) - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this + return { promise, resolve: res, reject: rej } +} - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } +function isAborted (fetchParams) { + return fetchParams.controller.state === 'aborted' +} - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, trailers }) +function isCancelled (fetchParams) { + return fetchParams.controller.state === 'aborted' || + fetchParams.controller.state === 'terminated' +} - if (err) { - abort() - } - }) - } +const normalizeMethodRecord = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} - res.on('drain', resume) +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizeMethodRecord, null) - this.res = res +/** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ +function normalizeMethod (method) { + return normalizeMethodRecord[method.toLowerCase()] ?? method +} - const needDrain = res.writableNeedDrain !== undefined - ? res.writableNeedDrain - : res._writableState && res._writableState.needDrain +// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string +function serializeJavascriptValueToJSONString (value) { + // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). + const result = JSON.stringify(value) - return needDrain !== true + // 2. If result is undefined, then throw a TypeError. + if (result === undefined) { + throw new TypeError('Value is not JSON serializable') } - onData (chunk) { - const { res } = this + // 3. Assert: result is a string. + assert(typeof result === 'string') - return res ? res.write(chunk) : true + // 4. Return result. + return result +} + +// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object +const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) + +/** + * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object + * @param {() => unknown[]} iterator + * @param {string} name name of the instance + * @param {'key'|'value'|'key+value'} kind + */ +function makeIterator (iterator, name, kind) { + const object = { + index: 0, + kind, + target: iterator } - onComplete (trailers) { - const { res } = this + const i = { + next () { + // 1. Let interface be the interface for which the iterator prototype object exists. - removeSignal(this) + // 2. Let thisValue be the this value. - if (!res) { - return - } + // 3. Let object be ? ToObject(thisValue). - this.trailers = util.parseHeaders(trailers) + // 4. If object is a platform object, then perform a security + // check, passing: - res.end() - } + // 5. If object is not a default iterator object for interface, + // then throw a TypeError. + if (Object.getPrototypeOf(this) !== i) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.` + ) + } - onError (err) { - const { res, callback, opaque, body } = this + // 6. Let index be object’s index. + // 7. Let kind be object’s kind. + // 8. Let values be object’s target's value pairs to iterate over. + const { index, kind, target } = object + const values = target() - removeSignal(this) + // 9. Let len be the length of values. + const len = values.length - this.factory = null + // 10. If index is greater than or equal to len, then return + // CreateIterResultObject(undefined, true). + if (index >= len) { + return { value: undefined, done: true } + } - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } + // 11. Let pair be the entry in values at index index. + const pair = values[index] - if (body) { - this.body = null - util.destroy(body, err) - } + // 12. Set object’s index to index + 1. + object.index = index + 1 + + // 13. Return the iterator result for pair and kind. + return iteratorResult(pair, kind) + }, + // The class string of an iterator prototype object for a given interface is the + // result of concatenating the identifier of the interface and the string " Iterator". + [Symbol.toStringTag]: `${name} Iterator` } + + // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%. + Object.setPrototypeOf(i, esIteratorPrototype) + // esIteratorPrototype needs to be the prototype of i + // which is the prototype of an empty object. Yes, it's confusing. + return Object.setPrototypeOf({}, i) } -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } +// https://webidl.spec.whatwg.org/#iterator-result +function iteratorResult (pair, kind) { + let result - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err + // 1. Let result be a value determined by the value of kind: + switch (kind) { + case 'key': { + // 1. Let idlKey be pair’s key. + // 2. Let key be the result of converting idlKey to an + // ECMAScript value. + // 3. result is key. + result = pair[0] + break + } + case 'value': { + // 1. Let idlValue be pair’s value. + // 2. Let value be the result of converting idlValue to + // an ECMAScript value. + // 3. result is value. + result = pair[1] + break + } + case 'key+value': { + // 1. Let idlKey be pair’s key. + // 2. Let idlValue be pair’s value. + // 3. Let key be the result of converting idlKey to an + // ECMAScript value. + // 4. Let value be the result of converting idlValue to + // an ECMAScript value. + // 5. Let array be ! ArrayCreate(2). + // 6. Call ! CreateDataProperty(array, "0", key). + // 7. Call ! CreateDataProperty(array, "1", value). + // 8. result is array. + result = pair + break } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) } -} - -module.exports = stream + // 2. Return CreateIterResultObject(result, false). + return { value: result, done: false } +} -/***/ }), +/** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ +async function fullyReadBody (body, processBody, processBodyError) { + // 1. If taskDestination is null, then set taskDestination to + // the result of starting a new parallel queue. -/***/ 36923: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // 2. Let successSteps given a byte sequence bytes be to queue a + // fetch task to run processBody given bytes, with taskDestination. + const successSteps = processBody -"use strict"; + // 3. Let errorSteps be to queue a fetch task to run processBodyError, + // with taskDestination. + const errorSteps = processBodyError + // 4. Let reader be the result of getting a reader for body’s stream. + // If that threw an exception, then run errorSteps with that + // exception and return. + let reader -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(48045) -const { AsyncResource } = __nccwpck_require__(50852) -const util = __nccwpck_require__(83983) -const { addSignal, removeSignal } = __nccwpck_require__(7032) -const assert = __nccwpck_require__(39491) + try { + reader = body.stream.getReader() + } catch (e) { + errorSteps(e) + return + } -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } + // 5. Read all bytes from reader, given successSteps and errorSteps. + try { + const result = await readAllBytes(reader) + successSteps(result) + } catch (e) { + errorSteps(e) + } +} - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } +/** @type {ReadableStream} */ +let ReadableStream = globalThis.ReadableStream - const { signal, opaque, responseHeaders } = opts +function isReadableStreamLike (stream) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } + return stream instanceof ReadableStream || ( + stream[Symbol.toStringTag] === 'ReadableStream' && + typeof stream.tee === 'function' + ) +} - super('UNDICI_UPGRADE') +const MAXIMUM_ARGUMENT_LENGTH = 65535 - this.responseHeaders = responseHeaders || null - this.opaque = opaque || null - this.callback = callback - this.abort = null - this.context = null +/** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {number[]|Uint8Array} input + */ +function isomorphicDecode (input) { + // 1. To isomorphic decode a byte sequence input, return a string whose code point + // length is equal to input’s length and whose code points have the same values + // as the values of input’s bytes, in the same order. - addSignal(this, signal) + if (input.length < MAXIMUM_ARGUMENT_LENGTH) { + return String.fromCharCode(...input) } - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } + return input.reduce((previous, current) => previous + String.fromCharCode(current), '') +} - this.abort = abort - this.context = null +/** + * @param {ReadableStreamController} controller + */ +function readableStreamClose (controller) { + try { + controller.close() + } catch (err) { + // TODO: add comment explaining why this error occurs. + if (!err.message.includes('Controller is already closed')) { + throw err + } } +} - onHeaders () { - throw new SocketError('bad upgrade', null) +/** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ +function isomorphicEncode (input) { + // 1. Assert: input contains no code points greater than U+00FF. + for (let i = 0; i < input.length; i++) { + assert(input.charCodeAt(i) <= 0xFF) } - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this + // 2. Return a byte sequence whose length is equal to input’s code + // point length and whose bytes have the same values as the + // values of input’s code points, in the same order + return input +} - assert.strictEqual(statusCode, 101) +/** + * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes + * @see https://streams.spec.whatwg.org/#read-loop + * @param {ReadableStreamDefaultReader} reader + */ +async function readAllBytes (reader) { + const bytes = [] + let byteLength = 0 - removeSignal(this) + while (true) { + const { done, value: chunk } = await reader.read() - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } + if (done) { + // 1. Call successSteps with bytes. + return Buffer.concat(bytes, byteLength) + } - onError (err) { - const { callback, opaque } = this + // 1. If chunk is not a Uint8Array object, call failureSteps + // with a TypeError and abort these steps. + if (!isUint8Array(chunk)) { + throw new TypeError('Received non-Uint8Array chunk') + } - removeSignal(this) + // 2. Append the bytes represented by chunk to bytes. + bytes.push(chunk) + byteLength += chunk.length - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } + // 3. Read-loop given reader, bytes, successSteps, and failureSteps. } } -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } +/** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ +function urlIsLocal (url) { + assert('protocol' in url) // ensure it's a url object - try { - const upgradeHandler = new UpgradeHandler(opts, callback) - this.dispatch({ - ...opts, - method: opts.method || 'GET', - upgrade: opts.protocol || 'Websocket' - }, upgradeHandler) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) - } + const protocol = url.protocol + + return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' } -module.exports = upgrade +/** + * @param {string|URL} url + */ +function urlHasHttpsScheme (url) { + if (typeof url === 'string') { + return url.startsWith('https:') + } + return url.protocol === 'https:' +} -/***/ }), +/** + * @see https://fetch.spec.whatwg.org/#http-scheme + * @param {URL} url + */ +function urlIsHttpHttpsScheme (url) { + assert('protocol' in url) // ensure it's a url object -/***/ 44059: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const protocol = url.protocol -"use strict"; + return protocol === 'http:' || protocol === 'https:' +} +/** + * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. + */ +const hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)) -module.exports.request = __nccwpck_require__(55448) -module.exports.stream = __nccwpck_require__(75395) -module.exports.pipeline = __nccwpck_require__(28752) -module.exports.upgrade = __nccwpck_require__(36923) -module.exports.connect = __nccwpck_require__(29744) +module.exports = { + isAborted, + isCancelled, + createDeferredPromise, + ReadableStreamFrom, + toUSVString, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + makeIterator, + isValidHeaderName, + isValidHeaderValue, + hasOwn, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + isomorphicDecode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + normalizeMethodRecord, + parseMetadata +} /***/ }), -/***/ 73858: +/***/ 21744: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Ported from https://github.com/nodejs/undici/pull/907 +const { types } = __nccwpck_require__(73837) +const { hasOwn, toUSVString } = __nccwpck_require__(52538) -const assert = __nccwpck_require__(39491) -const { Readable } = __nccwpck_require__(12781) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(83983) - -let Blob +/** @type {import('../../types/webidl').Webidl} */ +const webidl = {} +webidl.converters = {} +webidl.util = {} +webidl.errors = {} -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('abort') -const kContentType = Symbol('kContentType') +webidl.errors.exception = function (message) { + return new TypeError(`${message.header}: ${message.message}`) +} -const noop = () => {} +webidl.errors.conversionFailed = function (context) { + const plural = context.types.length === 1 ? '' : ' one of' + const message = + `${context.argument} could not be converted to` + + `${plural}: ${context.types.join(', ')}.` -module.exports = class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) + return webidl.errors.exception({ + header: context.prefix, + message + }) +} - this._readableState.dataEmitted = false +webidl.errors.invalidArgument = function (context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }) +} - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[kContentType] = contentType +// https://webidl.spec.whatwg.org/#implements +webidl.brandCheck = function (V, I, opts = undefined) { + if (opts?.strict !== false && !(V instanceof I)) { + throw new TypeError('Illegal invocation') + } else { + return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] + } +} - // Is stream being consumed through Readable API? - // This is an optimization so that we avoid checking - // for 'data' and 'readable' listeners in the hot path - // inside push(). - this[kReading] = false +webidl.argumentLengthCheck = function ({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? 's' : ''} required, ` + + `but${length ? ' only' : ''} ${length} found.`, + ...ctx + }) } +} - destroy (err) { - if (this.destroyed) { - // Node < 16 - return this - } +webidl.illegalConstructor = function () { + throw webidl.errors.exception({ + header: 'TypeError', + message: 'Illegal constructor' + }) +} - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } +// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values +webidl.util.Type = function (V) { + switch (typeof V) { + case 'undefined': return 'Undefined' + case 'boolean': return 'Boolean' + case 'string': return 'String' + case 'symbol': return 'Symbol' + case 'number': return 'Number' + case 'bigint': return 'BigInt' + case 'function': + case 'object': { + if (V === null) { + return 'Null' + } - if (err) { - this[kAbort]() + return 'Object' } - - return super.destroy(err) } +} - emit (ev, ...args) { - if (ev === 'data') { - // Node < 16.7 - this._readableState.dataEmitted = true - } else if (ev === 'error') { - // Node < 16 - this._readableState.errorEmitted = true - } - return super.emit(ev, ...args) - } +// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint +webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { + let upperBound + let lowerBound - on (ev, ...args) { - if (ev === 'data' || ev === 'readable') { - this[kReading] = true + // 1. If bitLength is 64, then: + if (bitLength === 64) { + // 1. Let upperBound be 2^53 − 1. + upperBound = Math.pow(2, 53) - 1 + + // 2. If signedness is "unsigned", then let lowerBound be 0. + if (signedness === 'unsigned') { + lowerBound = 0 + } else { + // 3. Otherwise let lowerBound be −2^53 + 1. + lowerBound = Math.pow(-2, 53) + 1 } - return super.on(ev, ...args) - } + } else if (signedness === 'unsigned') { + // 2. Otherwise, if signedness is "unsigned", then: - addListener (ev, ...args) { - return this.on(ev, ...args) - } + // 1. Let lowerBound be 0. + lowerBound = 0 - off (ev, ...args) { - const ret = super.off(ev, ...args) - if (ev === 'data' || ev === 'readable') { - this[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } + // 2. Let upperBound be 2^bitLength − 1. + upperBound = Math.pow(2, bitLength) - 1 + } else { + // 3. Otherwise: - removeListener (ev, ...args) { - return this.off(ev, ...args) - } + // 1. Let lowerBound be -2^bitLength − 1. + lowerBound = Math.pow(-2, bitLength) - 1 - push (chunk) { - if (this[kConsume] && chunk !== null && this.readableLength === 0) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) + // 2. Let upperBound be 2^bitLength − 1 − 1. + upperBound = Math.pow(2, bitLength - 1) - 1 } - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } + // 4. Let x be ? ToNumber(V). + let x = Number(V) - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') + // 5. If x is −0, then set x to +0. + if (x === 0) { + x = 0 } - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } + // 6. If the conversion is to an IDL type associated + // with the [EnforceRange] extended attribute, then: + if (opts.enforceRange === true) { + // 1. If x is NaN, +∞, or −∞, then throw a TypeError. + if ( + Number.isNaN(x) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Could not convert ${V} to an integer.` + }) + } - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } + // 2. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } + // 3. If x < lowerBound or x > upperBound, then + // throw a TypeError. + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }) + } - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) + // 4. Return x. + return x } - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } + // 7. If x is not NaN and the conversion is to an IDL + // type associated with the [Clamp] extended + // attribute, then: + if (!Number.isNaN(x) && opts.clamp === true) { + // 1. Set x to min(max(x, lowerBound), upperBound). + x = Math.min(Math.max(x, lowerBound), upperBound) + + // 2. Round x to the nearest integer, choosing the + // even integer if it lies halfway between two, + // and choosing +0 rather than −0. + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x) + } else { + x = Math.ceil(x) } - return this[kBody] - } - dump (opts) { - let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 - const signal = opts && opts.signal + // 3. Return x. + return x + } - if (signal) { - try { - if (typeof signal !== 'object' || !('aborted' in signal)) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - util.throwIfAborted(signal) - } catch (err) { - return Promise.reject(err) - } - } + // 8. If x is NaN, +0, +∞, or −∞, then return +0. + if ( + Number.isNaN(x) || + (x === 0 && Object.is(0, x)) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + return 0 + } - if (this.closed) { - return Promise.resolve(null) - } + // 9. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) - return new Promise((resolve, reject) => { - const signalListenerCleanup = signal - ? util.addAbortListener(signal, () => { - this.destroy() - }) - : noop + // 10. Set x to x modulo 2^bitLength. + x = x % Math.pow(2, bitLength) - this - .on('close', function () { - signalListenerCleanup() - if (signal && signal.aborted) { - reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) - } else { - resolve(null) - } - }) - .on('error', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) + // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, + // then return x − 2^bitLength. + if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength) } -} -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] + // 12. Otherwise, return x. + return x } -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} +// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart +webidl.util.IntegerPart = function (n) { + // 1. Let r be floor(abs(n)). + const r = Math.floor(Math.abs(n)) -async function consume (stream, type) { - if (isUnusable(stream)) { - throw new TypeError('unusable') + // 2. If n < 0, then return -1 × r. + if (n < 0) { + return -1 * r } - assert(!stream[kConsume]) + // 3. Otherwise, return r. + return r +} - return new Promise((resolve, reject) => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] +// https://webidl.spec.whatwg.org/#es-sequence +webidl.sequenceConverter = function (converter) { + return (V) => { + // 1. If Type(V) is not Object, throw a TypeError. + if (webidl.util.Type(V) !== 'Object') { + throw webidl.errors.exception({ + header: 'Sequence', + message: `Value of type ${webidl.util.Type(V)} is not an Object.` + }) } - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } + // 2. Let method be ? GetMethod(V, @@iterator). + /** @type {Generator} */ + const method = V?.[Symbol.iterator]?.() + const seq = [] + + // 3. If method is undefined, throw a TypeError. + if ( + method === undefined || + typeof method.next !== 'function' + ) { + throw webidl.errors.exception({ + header: 'Sequence', + message: 'Object is not an iterator.' }) + } - process.nextTick(consumeStart, stream[kConsume]) - }) -} + // https://webidl.spec.whatwg.org/#create-sequence-from-iterable + while (true) { + const { done, value } = method.next() -function consumeStart (consume) { - if (consume.body === null) { - return - } + if (done) { + break + } - const { _readableState: state } = consume.stream + seq.push(converter(value)) + } - for (const chunk of state.buffer) { - consumePush(consume, chunk) + return seq } +} - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } +// https://webidl.spec.whatwg.org/#es-to-record +webidl.recordConverter = function (keyConverter, valueConverter) { + return (O) => { + // 1. If Type(O) is not Object, throw a TypeError. + if (webidl.util.Type(O) !== 'Object') { + throw webidl.errors.exception({ + header: 'Record', + message: `Value of type ${webidl.util.Type(O)} is not an Object.` + }) + } - consume.stream.resume() + // 2. Let result be a new empty instance of record. + const result = {} - while (consume.stream.read() != null) { - // Loop - } -} + if (!types.isProxy(O)) { + // Object.keys only returns enumerable properties + const keys = Object.keys(O) -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume + for (const key of keys) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) - try { - if (type === 'text') { - resolve(toUSVString(Buffer.concat(body))) - } else if (type === 'json') { - resolve(JSON.parse(Buffer.concat(body))) - } else if (type === 'arrayBuffer') { - const dst = new Uint8Array(length) + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) - let pos = 0 - for (const buf of body) { - dst.set(buf, pos) - pos += buf.byteLength + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue } - resolve(dst.buffer) - } else if (type === 'blob') { - if (!Blob) { - Blob = (__nccwpck_require__(14300).Blob) + // 5. Return result. + return result + } + + // 3. Let keys be ? O.[[OwnPropertyKeys]](). + const keys = Reflect.ownKeys(O) + + // 4. For each key of keys. + for (const key of keys) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const desc = Reflect.getOwnPropertyDescriptor(O, key) + + // 2. If desc is not undefined and desc.[[Enumerable]] is true: + if (desc?.enumerable) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue } - resolve(new Blob(body, { type: stream[kContentType] })) } - consumeFinish(consume) - } catch (err) { - stream.destroy(err) + // 5. Return result. + return result } } -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} +webidl.interfaceConverter = function (i) { + return (V, opts = {}) => { + if (opts.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: i.name, + message: `Expected ${V} to be an instance of ${i.name}.` + }) + } -function consumeFinish (consume, err) { - if (consume.body === null) { - return + return V } +} - if (err) { - consume.reject(err) - } else { - consume.resolve() - } +webidl.dictionaryConverter = function (converters) { + return (dictionary) => { + const type = webidl.util.Type(dictionary) + const dict = {} - consume.type = null - consume.stream = null - consume.resolve = null - consume.reject = null - consume.length = 0 - consume.body = null -} + if (type === 'Null' || type === 'Undefined') { + return dict + } else if (type !== 'Object') { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }) + } + for (const options of converters) { + const { key, defaultValue, required, converter } = options -/***/ }), + if (required === true) { + if (!hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `Missing required key "${key}".` + }) + } + } -/***/ 77474: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + let value = dictionary[key] + const hasDefault = hasOwn(options, 'defaultValue') -const assert = __nccwpck_require__(39491) -const { - ResponseStatusCodeError -} = __nccwpck_require__(48045) -const { toUSVString } = __nccwpck_require__(83983) + // Only use defaultValue if value is undefined and + // a defaultValue options was provided. + if (hasDefault && value !== null) { + value = value ?? defaultValue + } -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) + // A key can be optional and have no default value. + // When this happens, do not perform a conversion, + // and do not assign the key a value. + if (required || hasDefault || value !== undefined) { + value = converter(value) - let chunks = [] - let limit = 0 + if ( + options.allowedValues && + !options.allowedValues.includes(value) + ) { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` + }) + } - for await (const chunk of body) { - chunks.push(chunk) - limit += chunk.length - if (limit > 128 * 1024) { - chunks = null - break + dict[key] = value + } } - } - if (statusCode === 204 || !contentType || !chunks) { - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) - return + return dict } +} - try { - if (contentType.startsWith('application/json')) { - const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return +webidl.nullableConverter = function (converter) { + return (V) => { + if (V === null) { + return V } - if (contentType.startsWith('text/')) { - const payload = toUSVString(Buffer.concat(chunks)) - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return - } - } catch (err) { - // Process in a fallback if error + return converter(V) } - - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) } -module.exports = { getResolveErrorBodyCallback } +// https://webidl.spec.whatwg.org/#es-DOMString +webidl.converters.DOMString = function (V, opts = {}) { + // 1. If V is null and the conversion is to an IDL type + // associated with the [LegacyNullToEmptyString] + // extended attribute, then return the DOMString value + // that represents the empty string. + if (V === null && opts.legacyNullToEmptyString) { + return '' + } + // 2. Let x be ? ToString(V). + if (typeof V === 'symbol') { + throw new TypeError('Could not convert argument of type symbol to string.') + } -/***/ }), + // 3. Return the IDL DOMString value that represents the + // same sequence of code units as the one the + // ECMAScript String value x represents. + return String(V) +} -/***/ 37931: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +// https://webidl.spec.whatwg.org/#es-ByteString +webidl.converters.ByteString = function (V) { + // 1. Let x be ? ToString(V). + // Note: DOMString converter perform ? ToString(V) + const x = webidl.converters.DOMString(V) -"use strict"; + // 2. If the value of any element of x is greater than + // 255, then throw a TypeError. + for (let index = 0; index < x.length; index++) { + if (x.charCodeAt(index) > 255) { + throw new TypeError( + 'Cannot convert argument to a ByteString because the character at ' + + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` + ) + } + } + // 3. Return an IDL ByteString value whose length is the + // length of x, and where the value of each element is + // the value of the corresponding element of x. + return x +} -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(48045) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(73198) -const Pool = __nccwpck_require__(4634) -const { kUrl, kInterceptors } = __nccwpck_require__(72785) -const { parseOrigin } = __nccwpck_require__(83983) -const kFactory = Symbol('factory') +// https://webidl.spec.whatwg.org/#es-USVString +webidl.converters.USVString = toUSVString -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') +// https://webidl.spec.whatwg.org/#es-boolean +webidl.converters.boolean = function (V) { + // 1. Let x be the result of computing ToBoolean(V). + const x = Boolean(V) -function getGreatestCommonDivisor (a, b) { - if (b === 0) return a - return getGreatestCommonDivisor(b, a % b) + // 2. Return the IDL boolean value that is the one that represents + // the same truth value as the ECMAScript Boolean value x. + return x } -function defaultFactory (origin, opts) { - return new Pool(origin, opts) +// https://webidl.spec.whatwg.org/#es-any +webidl.converters.any = function (V) { + return V } -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 +// https://webidl.spec.whatwg.org/#es-long-long +webidl.converters['long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "signed"). + const x = webidl.util.ConvertToInt(V, 64, 'signed') - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 + // 2. Return the IDL long long value that represents + // the same numeric value as x. + return x +} - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } +// https://webidl.spec.whatwg.org/#es-unsigned-long-long +webidl.converters['unsigned long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). + const x = webidl.util.ConvertToInt(V, 64, 'unsigned') - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } + // 2. Return the IDL unsigned long long value that + // represents the same numeric value as x. + return x +} - this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory +// https://webidl.spec.whatwg.org/#es-unsigned-long +webidl.converters['unsigned long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). + const x = webidl.util.ConvertToInt(V, 32, 'unsigned') - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } + // 2. Return the IDL unsigned long value that + // represents the same numeric value as x. + return x +} - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin +// https://webidl.spec.whatwg.org/#es-unsigned-short +webidl.converters['unsigned short'] = function (V, opts) { + // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). + const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts) - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) + // 2. Return the IDL unsigned short value that represents + // the same numeric value as x. + return x +} - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) +// https://webidl.spec.whatwg.org/#idl-ArrayBuffer +webidl.converters.ArrayBuffer = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have an + // [[ArrayBufferData]] internal slot, then throw a + // TypeError. + // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances + // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances + if ( + webidl.util.Type(V) !== 'Object' || + !types.isAnyArrayBuffer(V) + ) { + throw webidl.errors.conversionFailed({ + prefix: `${V}`, + argument: `${V}`, + types: ['ArrayBuffer'] }) + } - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V) is true, then throw a + // TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' }) + } - pool.on('disconnect', (...args) => { - const err = args[2] - if (err && err.code === 'UND_ERR_SOCKET') { - // decrease the weight of the pool. - pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V) is true, then throw a + // TypeError. + // Note: resizable ArrayBuffers are currently a proposal. - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } + // 4. Return the IDL ArrayBuffer value that is a + // reference to the same object as V. + return V +} - this._updateBalancedPoolStats() +webidl.converters.TypedArray = function (V, T, opts = {}) { + // 1. Let T be the IDL type V is being converted to. - return this + // 2. If Type(V) is not Object, or V does not have a + // [[TypedArrayName]] internal slot with a value + // equal to T’s name, then throw a TypeError. + if ( + webidl.util.Type(V) !== 'Object' || + !types.isTypedArray(V) || + V.constructor.name !== T.name + ) { + throw webidl.errors.conversionFailed({ + prefix: `${T.name}`, + argument: `${V}`, + types: [T.name] + }) } - _updateBalancedPoolStats () { - this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0) + // 3. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) } - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) + // 4. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable array buffers are currently a proposal - if (pool) { - this[kRemoveClient](pool) - } + // 5. Return the IDL value of type T that is a reference + // to the same object as V. + return V +} - return this +webidl.converters.DataView = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have a + // [[DataView]] internal slot, then throw a TypeError. + if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: 'DataView', + message: 'Object is not a DataView.' + }) } - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, + // then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) } - [kGetDispatcher] () { - // We validate that pools is greater than 0, - // otherwise we would have to wait until an upstream - // is added, which might never happen. - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable ArrayBuffers are currently a proposal - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) + // 4. Return the IDL DataView value that is a reference + // to the same object as V. + return V +} - if (allClientsBusy) { - return - } +// https://webidl.spec.whatwg.org/#BufferSource +webidl.converters.BufferSource = function (V, opts = {}) { + if (types.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, opts) + } - let counter = 0 + if (types.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor) + } - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) + if (types.isDataView(V)) { + return webidl.converters.DataView(V, opts) + } - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] + throw new TypeError(`Could not convert ${V} to a BufferSource.`) +} - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.ByteString +) - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] +webidl.converters['sequence>'] = webidl.sequenceConverter( + webidl.converters['sequence'] +) - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } +webidl.converters['record'] = webidl.recordConverter( + webidl.converters.ByteString, + webidl.converters.ByteString +) - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } +module.exports = { + webidl } -module.exports = BalancedPool - /***/ }), -/***/ 66101: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 84854: +/***/ ((module) => { "use strict"; -const { kConstruct } = __nccwpck_require__(29174) -const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(82396) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(83983) -const { kHeadersList } = __nccwpck_require__(72785) -const { webidl } = __nccwpck_require__(21744) -const { Response, cloneResponse } = __nccwpck_require__(27823) -const { Request } = __nccwpck_require__(48359) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) -const { fetching } = __nccwpck_require__(74881) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(52538) -const assert = __nccwpck_require__(39491) -const { getGlobalDispatcher } = __nccwpck_require__(21892) - -/** - * @see https://w3c.github.io/ServiceWorker/#dfn-cache-batch-operation - * @typedef {Object} CacheBatchOperation - * @property {'delete' | 'put'} type - * @property {any} request - * @property {any} response - * @property {import('../../types/cache').CacheQueryOptions} options - */ - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-request-response-list - * @typedef {[any, any][]} requestResponseList + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label */ - -class Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - this.#relevantRequestResponseList = arguments[1] +function getEncoding (label) { + if (!label) { + return 'failure' } - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) + // 1. Remove any leading and trailing ASCII whitespace from label. + // 2. If label is an ASCII case-insensitive match for any of the + // labels listed in the table below, then return the + // corresponding encoding; otherwise return failure. + switch (label.trim().toLowerCase()) { + case 'unicode-1-1-utf-8': + case 'unicode11utf8': + case 'unicode20utf8': + case 'utf-8': + case 'utf8': + case 'x-unicode20utf8': + return 'UTF-8' + case '866': + case 'cp866': + case 'csibm866': + case 'ibm866': + return 'IBM866' + case 'csisolatin2': + case 'iso-8859-2': + case 'iso-ir-101': + case 'iso8859-2': + case 'iso88592': + case 'iso_8859-2': + case 'iso_8859-2:1987': + case 'l2': + case 'latin2': + return 'ISO-8859-2' + case 'csisolatin3': + case 'iso-8859-3': + case 'iso-ir-109': + case 'iso8859-3': + case 'iso88593': + case 'iso_8859-3': + case 'iso_8859-3:1988': + case 'l3': + case 'latin3': + return 'ISO-8859-3' + case 'csisolatin4': + case 'iso-8859-4': + case 'iso-ir-110': + case 'iso8859-4': + case 'iso88594': + case 'iso_8859-4': + case 'iso_8859-4:1988': + case 'l4': + case 'latin4': + return 'ISO-8859-4' + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso-8859-5': + case 'iso-ir-144': + case 'iso8859-5': + case 'iso88595': + case 'iso_8859-5': + case 'iso_8859-5:1988': + return 'ISO-8859-5' + case 'arabic': + case 'asmo-708': + case 'csiso88596e': + case 'csiso88596i': + case 'csisolatinarabic': + case 'ecma-114': + case 'iso-8859-6': + case 'iso-8859-6-e': + case 'iso-8859-6-i': + case 'iso-ir-127': + case 'iso8859-6': + case 'iso88596': + case 'iso_8859-6': + case 'iso_8859-6:1987': + return 'ISO-8859-6' + case 'csisolatingreek': + case 'ecma-118': + case 'elot_928': + case 'greek': + case 'greek8': + case 'iso-8859-7': + case 'iso-ir-126': + case 'iso8859-7': + case 'iso88597': + case 'iso_8859-7': + case 'iso_8859-7:1987': + case 'sun_eu_greek': + return 'ISO-8859-7' + case 'csiso88598e': + case 'csisolatinhebrew': + case 'hebrew': + case 'iso-8859-8': + case 'iso-8859-8-e': + case 'iso-ir-138': + case 'iso8859-8': + case 'iso88598': + case 'iso_8859-8': + case 'iso_8859-8:1988': + case 'visual': + return 'ISO-8859-8' + case 'csiso88598i': + case 'iso-8859-8-i': + case 'logical': + return 'ISO-8859-8-I' + case 'csisolatin6': + case 'iso-8859-10': + case 'iso-ir-157': + case 'iso8859-10': + case 'iso885910': + case 'l6': + case 'latin6': + return 'ISO-8859-10' + case 'iso-8859-13': + case 'iso8859-13': + case 'iso885913': + return 'ISO-8859-13' + case 'iso-8859-14': + case 'iso8859-14': + case 'iso885914': + return 'ISO-8859-14' + case 'csisolatin9': + case 'iso-8859-15': + case 'iso8859-15': + case 'iso885915': + case 'iso_8859-15': + case 'l9': + return 'ISO-8859-15' + case 'iso-8859-16': + return 'ISO-8859-16' + case 'cskoi8r': + case 'koi': + case 'koi8': + case 'koi8-r': + case 'koi8_r': + return 'KOI8-R' + case 'koi8-ru': + case 'koi8-u': + return 'KOI8-U' + case 'csmacintosh': + case 'mac': + case 'macintosh': + case 'x-mac-roman': + return 'macintosh' + case 'iso-8859-11': + case 'iso8859-11': + case 'iso885911': + case 'tis-620': + case 'windows-874': + return 'windows-874' + case 'cp1250': + case 'windows-1250': + case 'x-cp1250': + return 'windows-1250' + case 'cp1251': + case 'windows-1251': + case 'x-cp1251': + return 'windows-1251' + case 'ansi_x3.4-1968': + case 'ascii': + case 'cp1252': + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso-8859-1': + case 'iso-ir-100': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'iso_8859-1:1987': + case 'l1': + case 'latin1': + case 'us-ascii': + case 'windows-1252': + case 'x-cp1252': + return 'windows-1252' + case 'cp1253': + case 'windows-1253': + case 'x-cp1253': + return 'windows-1253' + case 'cp1254': + case 'csisolatin5': + case 'iso-8859-9': + case 'iso-ir-148': + case 'iso8859-9': + case 'iso88599': + case 'iso_8859-9': + case 'iso_8859-9:1989': + case 'l5': + case 'latin5': + case 'windows-1254': + case 'x-cp1254': + return 'windows-1254' + case 'cp1255': + case 'windows-1255': + case 'x-cp1255': + return 'windows-1255' + case 'cp1256': + case 'windows-1256': + case 'x-cp1256': + return 'windows-1256' + case 'cp1257': + case 'windows-1257': + case 'x-cp1257': + return 'windows-1257' + case 'cp1258': + case 'windows-1258': + case 'x-cp1258': + return 'windows-1258' + case 'x-mac-cyrillic': + case 'x-mac-ukrainian': + return 'x-mac-cyrillic' + case 'chinese': + case 'csgb2312': + case 'csiso58gb231280': + case 'gb2312': + case 'gb_2312': + case 'gb_2312-80': + case 'gbk': + case 'iso-ir-58': + case 'x-gbk': + return 'GBK' + case 'gb18030': + return 'gb18030' + case 'big5': + case 'big5-hkscs': + case 'cn-big5': + case 'csbig5': + case 'x-x-big5': + return 'Big5' + case 'cseucpkdfmtjapanese': + case 'euc-jp': + case 'x-euc-jp': + return 'EUC-JP' + case 'csiso2022jp': + case 'iso-2022-jp': + return 'ISO-2022-JP' + case 'csshiftjis': + case 'ms932': + case 'ms_kanji': + case 'shift-jis': + case 'shift_jis': + case 'sjis': + case 'windows-31j': + case 'x-sjis': + return 'Shift_JIS' + case 'cseuckr': + case 'csksc56011987': + case 'euc-kr': + case 'iso-ir-149': + case 'korean': + case 'ks_c_5601-1987': + case 'ks_c_5601-1989': + case 'ksc5601': + case 'ksc_5601': + case 'windows-949': + return 'EUC-KR' + case 'csiso2022kr': + case 'hz-gb-2312': + case 'iso-2022-cn': + case 'iso-2022-cn-ext': + case 'iso-2022-kr': + case 'replacement': + return 'replacement' + case 'unicodefffe': + case 'utf-16be': + return 'UTF-16BE' + case 'csunicode': + case 'iso-10646-ucs-2': + case 'ucs-2': + case 'unicode': + case 'unicodefeff': + case 'utf-16': + case 'utf-16le': + return 'UTF-16LE' + case 'x-user-defined': + return 'x-user-defined' + default: return 'failure' + } +} - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) +module.exports = { + getEncoding +} - const p = await this.matchAll(request, options) - if (p.length === 0) { - return - } +/***/ }), - return p[0] - } +/***/ 1446: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) +"use strict"; - if (request !== undefined) request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) - // 1. - let r = null +const { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} = __nccwpck_require__(87530) +const { + kState, + kError, + kResult, + kEvents, + kAborted +} = __nccwpck_require__(29054) +const { webidl } = __nccwpck_require__(21744) +const { kEnumerableProperty } = __nccwpck_require__(83983) - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] +class FileReader extends EventTarget { + constructor () { + super() - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[kState] - } + this[kState] = 'empty' + this[kResult] = null + this[kError] = null + this[kEvents] = { + loadend: null, + error: null, + abort: null, + load: null, + progress: null, + loadstart: null } + } - // 5. - // 5.1 - const responses = [] + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer + * @param {import('buffer').Blob} blob + */ + readAsArrayBuffer (blob) { + webidl.brandCheck(this, FileReader) - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' }) - // 5.3.2 - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]) - } - } + blob = webidl.converters.Blob(blob, { strict: false }) - // 5.4 - // We don't implement CORs so we don't need to loop over the responses, yay! + // The readAsArrayBuffer(blob) method, when invoked, + // must initiate a read operation for blob with ArrayBuffer. + readOperation(this, blob, 'ArrayBuffer') + } - // 5.5.1 - const responseList = [] + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString (blob) { + webidl.brandCheck(this, FileReader) - // 5.5.2 - for (const response of responses) { - // 5.5.2.1 - const responseObject = new Response(response.body?.source ?? null) - const body = responseObject[kState].body - responseObject[kState] = response - responseObject[kState].body = body - responseObject[kHeaders][kHeadersList] = response.headersList - responseObject[kHeaders][kGuard] = 'immutable' + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' }) - responseList.push(responseObject) - } + blob = webidl.converters.Blob(blob, { strict: false }) - // 6. - return Object.freeze(responseList) + // The readAsBinaryString(blob) method, when invoked, + // must initiate a read operation for blob with BinaryString. + readOperation(this, blob, 'BinaryString') } - async add (request) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText (blob, encoding = undefined) { + webidl.brandCheck(this, FileReader) - request = webidl.converters.RequestInfo(request) + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) - // 1. - const requests = [request] + blob = webidl.converters.Blob(blob, { strict: false }) - // 2. - const responseArrayPromise = this.addAll(requests) + if (encoding !== undefined) { + encoding = webidl.converters.DOMString(encoding) + } - // 3. - return await responseArrayPromise + // The readAsText(blob, encoding) method, when invoked, + // must initiate a read operation for blob with Text and encoding. + readOperation(this, blob, 'Text', encoding) } - async addAll (requests) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) - - requests = webidl.converters['sequence'](requests) + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL (blob) { + webidl.brandCheck(this, FileReader) - // 1. - const responsePromises = [] + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' }) - // 2. - const requestList = [] + blob = webidl.converters.Blob(blob, { strict: false }) - // 3. - for (const request of requests) { - if (typeof request === 'string') { - continue - } + // The readAsDataURL(blob) method, when invoked, must + // initiate a read operation for blob with DataURL. + readOperation(this, blob, 'DataURL') + } - // 3.1 - const r = request[kState] + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort () { + // 1. If this's state is "empty" or if this's state is + // "done" set this's result to null and terminate + // this algorithm. + if (this[kState] === 'empty' || this[kState] === 'done') { + this[kResult] = null + return + } - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Expected http/s scheme when method is not GET.' - }) - } + // 2. If this's state is "loading" set this's state to + // "done" and set this's result to null. + if (this[kState] === 'loading') { + this[kState] = 'done' + this[kResult] = null } - // 4. - /** @type {ReturnType[]} */ - const fetchControllers = [] + // 3. If there are any tasks from this on the file reading + // task source in an affiliated task queue, then remove + // those tasks from that task queue. + this[kAborted] = true - // 5. - for (const request of requests) { - // 5.1 - const r = new Request(request)[kState] + // 4. Terminate the algorithm for the read method being processed. + // TODO - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Expected http/s scheme.' - }) - } + // 5. Fire a progress event called abort at this. + fireAProgressEvent('abort', this) - // 5.4 - r.initiator = 'fetch' - r.destination = 'subresource' + // 6. If this's state is not "loading", fire a progress + // event called loadend at this. + if (this[kState] !== 'loading') { + fireAProgressEvent('loadend', this) + } + } - // 5.5 - requestList.push(r) + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState () { + webidl.brandCheck(this, FileReader) - // 5.6 - const responsePromise = createDeferredPromise() + switch (this[kState]) { + case 'empty': return this.EMPTY + case 'loading': return this.LOADING + case 'done': return this.DONE + } + } - // 5.7 - fetchControllers.push(fetching({ - request: r, - dispatcher: getGlobalDispatcher(), - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-result + */ + get result () { + webidl.brandCheck(this, FileReader) - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'invalid vary field value' - })) + // The result attribute’s getter, when invoked, must return + // this's result. + return this[kResult] + } - for (const controller of fetchControllers) { - controller.abort() - } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error () { + webidl.brandCheck(this, FileReader) - return - } - } - } - }, - processResponseEndOfBody (response) { - // 1. - if (response.aborted) { - responsePromise.reject(new DOMException('aborted', 'AbortError')) - return - } + // The error attribute’s getter, when invoked, must return + // this's error. + return this[kError] + } - // 2. - responsePromise.resolve(response) - } - })) + get onloadend () { + webidl.brandCheck(this, FileReader) - // 5.8 - responsePromises.push(responsePromise.promise) - } + return this[kEvents].loadend + } - // 6. - const p = Promise.all(responsePromises) + set onloadend (fn) { + webidl.brandCheck(this, FileReader) - // 7. - const responses = await p + if (this[kEvents].loadend) { + this.removeEventListener('loadend', this[kEvents].loadend) + } - // 7.1 - const operations = [] + if (typeof fn === 'function') { + this[kEvents].loadend = fn + this.addEventListener('loadend', fn) + } else { + this[kEvents].loadend = null + } + } - // 7.2 - let index = 0 + get onerror () { + webidl.brandCheck(this, FileReader) - // 7.3 - for (const response of responses) { - // 7.3.1 - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } + return this[kEvents].error + } - operations.push(operation) // 7.3.5 + set onerror (fn) { + webidl.brandCheck(this, FileReader) - index++ // 7.3.6 + if (this[kEvents].error) { + this.removeEventListener('error', this[kEvents].error) } - // 7.5 - const cacheJobPromise = createDeferredPromise() - - // 7.6.1 - let errorData = null - - // 7.6.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e + if (typeof fn === 'function') { + this[kEvents].error = fn + this.addEventListener('error', fn) + } else { + this[kEvents].error = null } - - // 7.6.3 - queueMicrotask(() => { - // 7.6.3.1 - if (errorData === null) { - cacheJobPromise.resolve(undefined) - } else { - // 7.6.3.2 - cacheJobPromise.reject(errorData) - } - }) - - // 7.7 - return cacheJobPromise.promise } - async put (request, response) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) + get onloadstart () { + webidl.brandCheck(this, FileReader) - request = webidl.converters.RequestInfo(request) - response = webidl.converters.Response(response) + return this[kEvents].loadstart + } - // 1. - let innerRequest = null + set onloadstart (fn) { + webidl.brandCheck(this, FileReader) - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] + if (this[kEvents].loadstart) { + this.removeEventListener('loadstart', this[kEvents].loadstart) } - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Expected an http/s scheme when method is not GET' - }) + if (typeof fn === 'function') { + this[kEvents].loadstart = fn + this.addEventListener('loadstart', fn) + } else { + this[kEvents].loadstart = null } + } - // 5. - const innerResponse = response[kState] + get onprogress () { + webidl.brandCheck(this, FileReader) - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Got 206 status' - }) - } + return this[kEvents].progress + } - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) + set onprogress (fn) { + webidl.brandCheck(this, FileReader) - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Got * vary field value' - }) - } - } + if (this[kEvents].progress) { + this.removeEventListener('progress', this[kEvents].progress) } - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Response body is locked or disturbed' - }) + if (typeof fn === 'function') { + this[kEvents].progress = fn + this.addEventListener('progress', fn) + } else { + this[kEvents].progress = null } + } - // 9. - const clonedResponse = cloneResponse(innerResponse) + get onload () { + webidl.brandCheck(this, FileReader) - // 10. - const bodyReadPromise = createDeferredPromise() + return this[kEvents].load + } - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream + set onload (fn) { + webidl.brandCheck(this, FileReader) - // 11.2 - const reader = stream.getReader() + if (this[kEvents].load) { + this.removeEventListener('load', this[kEvents].load) + } - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) + if (typeof fn === 'function') { + this[kEvents].load = fn + this.addEventListener('load', fn) } else { - bodyReadPromise.resolve(undefined) + this[kEvents].load = null } + } - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - response: clonedResponse // 16. - } + get onabort () { + webidl.brandCheck(this, FileReader) - // 17. - operations.push(operation) + return this[kEvents].abort + } - // 19. - const bytes = await bodyReadPromise.promise + set onabort (fn) { + webidl.brandCheck(this, FileReader) - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes + if (this[kEvents].abort) { + this.removeEventListener('abort', this[kEvents].abort) } - // 19.1 - const cacheJobPromise = createDeferredPromise() - - // 19.2.1 - let errorData = null - - // 19.2.2 - try { - this.#batchCacheOperations(operations) - } catch (e) { - errorData = e + if (typeof fn === 'function') { + this[kEvents].abort = fn + this.addEventListener('abort', fn) + } else { + this[kEvents].abort = null } + } +} - // 19.2.3 - queueMicrotask(() => { - // 19.2.3.1 - if (errorData === null) { - cacheJobPromise.resolve() - } else { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) +// https://w3c.github.io/FileAPI/#dom-filereader-empty +FileReader.EMPTY = FileReader.prototype.EMPTY = 0 +// https://w3c.github.io/FileAPI/#dom-filereader-loading +FileReader.LOADING = FileReader.prototype.LOADING = 1 +// https://w3c.github.io/FileAPI/#dom-filereader-done +FileReader.DONE = FileReader.prototype.DONE = 2 - return cacheJobPromise.promise +Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'FileReader', + writable: false, + enumerable: false, + configurable: true } +}) - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) +Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors +}) - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) +module.exports = { + FileReader +} - /** - * @type {Request} - */ - let r = null - if (request instanceof Request) { - r = request[kState] +/***/ }), - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') +/***/ 55504: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - r = new Request(request)[kState] - } +"use strict"; - /** @type {CacheBatchOperation[]} */ - const operations = [] - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } +const { webidl } = __nccwpck_require__(21744) - operations.push(operation) +const kState = Symbol('ProgressEvent state') - const cacheJobPromise = createDeferredPromise() +/** + * @see https://xhr.spec.whatwg.org/#progressevent + */ +class ProgressEvent extends Event { + constructor (type, eventInitDict = {}) { + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - let errorData = null - let requestResponses + super(type, eventInitDict) - try { - requestResponses = this.#batchCacheOperations(operations) - } catch (e) { - errorData = e + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total } - - queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length) - } else { - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise } - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {readonly Request[]} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - if (request !== undefined) request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] + get lengthComputable () { + webidl.brandCheck(this, ProgressEvent) - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } + return this[kState].lengthComputable + } - // 4. - const promise = createDeferredPromise() + get loaded () { + webidl.brandCheck(this, ProgressEvent) - // 5. - // 5.1 - const requests = [] + return this[kState].loaded + } - // 5.2 - if (request === undefined) { - // 5.2.1 - for (const requestResponse of this.#relevantRequestResponseList) { - // 5.2.1.1 - requests.push(requestResponse[0]) - } - } else { // 5.3 - // 5.3.1 - const requestResponses = this.#queryCache(r, options) + get total () { + webidl.brandCheck(this, ProgressEvent) - // 5.3.2 - for (const requestResponse of requestResponses) { - // 5.3.2.1 - requests.push(requestResponse[0]) - } - } + return this[kState].total + } +} - // 5.4 - queueMicrotask(() => { - // 5.4.1 - const requestList = [] +webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: 'lengthComputable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'loaded', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'total', + converter: webidl.converters['unsigned long long'], + defaultValue: 0 + }, + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false + } +]) - // 5.4.2 - for (const request of requests) { - const requestObject = new Request('https://a') - requestObject[kState] = request - requestObject[kHeaders][kHeadersList] = request.headersList - requestObject[kHeaders][kGuard] = 'immutable' - requestObject[kRealm] = request.client +module.exports = { + ProgressEvent +} - // 5.4.2.1 - requestList.push(requestObject) - } - // 5.4.3 - promise.resolve(Object.freeze(requestList)) - }) +/***/ }), - return promise.promise - } +/***/ 29054: +/***/ ((module) => { - /** - * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm - * @param {CacheBatchOperation[]} operations - * @returns {requestResponseList} - */ - #batchCacheOperations (operations) { - // 1. - const cache = this.#relevantRequestResponseList +"use strict"; - // 2. - const backupCache = [...cache] - // 3. - const addedItems = [] +module.exports = { + kState: Symbol('FileReader state'), + kResult: Symbol('FileReader result'), + kError: Symbol('FileReader error'), + kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), + kEvents: Symbol('FileReader events'), + kAborted: Symbol('FileReader aborted') +} - // 4.1 - const resultList = [] - try { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'operation type does not match "delete" or "put"' - }) - } +/***/ }), - // 4.2.2 - if (operation.type === 'delete' && operation.response != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'delete operation should not have an associated response' - }) - } +/***/ 87530: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 4.2.3 - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException('???', 'InvalidStateError') - } +"use strict"; - // 4.2.4 - let requestResponses - // 4.2.5 - if (operation.type === 'delete') { - // 4.2.5.1 - requestResponses = this.#queryCache(operation.request, operation.options) +const { + kState, + kError, + kResult, + kAborted, + kLastProgressEventFired +} = __nccwpck_require__(29054) +const { ProgressEvent } = __nccwpck_require__(55504) +const { getEncoding } = __nccwpck_require__(84854) +const { DOMException } = __nccwpck_require__(41037) +const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(685) +const { types } = __nccwpck_require__(73837) +const { StringDecoder } = __nccwpck_require__(71576) +const { btoa } = __nccwpck_require__(14300) - // TODO: the spec is wrong, this is needed to pass WPTs - if (requestResponses.length === 0) { - return [] - } +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} - // 4.2.5.2 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) +/** + * @see https://w3c.github.io/FileAPI/#readOperation + * @param {import('./filereader').FileReader} fr + * @param {import('buffer').Blob} blob + * @param {string} type + * @param {string?} encodingName + */ +function readOperation (fr, blob, type, encodingName) { + // 1. If fr’s state is "loading", throw an InvalidStateError + // DOMException. + if (fr[kState] === 'loading') { + throw new DOMException('Invalid state', 'InvalidStateError') + } - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'put operation should have an associated response' - }) - } + // 2. Set fr’s state to "loading". + fr[kState] = 'loading' - // 4.2.6.2 - const r = operation.request + // 3. Set fr’s result to null. + fr[kResult] = null - // 4.2.6.3 - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } + // 4. Set fr’s error to null. + fr[kError] = null - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } + // 5. Let stream be the result of calling get stream on blob. + /** @type {import('stream/web').ReadableStream} */ + const stream = blob.stream() - // 4.2.6.5 - if (operation.options != null) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'options must not be defined' - }) - } + // 6. Let reader be the result of getting a reader from stream. + const reader = stream.getReader() - // 4.2.6.6 - requestResponses = this.#queryCache(operation.request) + // 7. Let bytes be an empty byte sequence. + /** @type {Uint8Array[]} */ + const bytes = [] - // 4.2.6.7 - for (const requestResponse of requestResponses) { - const idx = cache.indexOf(requestResponse) - assert(idx !== -1) + // 8. Let chunkPromise be the result of reading a chunk from + // stream with reader. + let chunkPromise = reader.read() - // 4.2.6.7.1 - cache.splice(idx, 1) - } + // 9. Let isFirstChunk be true. + let isFirstChunk = true - // 4.2.6.8 - cache.push([operation.request, operation.response]) + // 10. In parallel, while true: + // Note: "In parallel" just means non-blocking + // Note 2: readOperation itself cannot be async as double + // reading the body would then reject the promise, instead + // of throwing an error. + ;(async () => { + while (!fr[kAborted]) { + // 1. Wait for chunkPromise to be fulfilled or rejected. + try { + const { done, value } = await chunkPromise - // 4.2.6.10 - addedItems.push([operation.request, operation.response]) + // 2. If chunkPromise is fulfilled, and isFirstChunk is + // true, queue a task to fire a progress event called + // loadstart at fr. + if (isFirstChunk && !fr[kAborted]) { + queueMicrotask(() => { + fireAProgressEvent('loadstart', fr) + }) } - // 4.2.7 - resultList.push([operation.request, operation.response]) - } + // 3. Set isFirstChunk to false. + isFirstChunk = false - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 + // 4. If chunkPromise is fulfilled with an object whose + // done property is false and whose value property is + // a Uint8Array object, run these steps: + if (!done && types.isUint8Array(value)) { + // 1. Let bs be the byte sequence represented by the + // Uint8Array object. - // 5.2 - this.#relevantRequestResponseList = backupCache + // 2. Append bs to bytes. + bytes.push(value) - // 5.3 - throw e - } - } + // 3. If roughly 50ms have passed since these steps + // were last invoked, queue a task to fire a + // progress event called progress at fr. + if ( + ( + fr[kLastProgressEventFired] === undefined || + Date.now() - fr[kLastProgressEventFired] >= 50 + ) && + !fr[kAborted] + ) { + fr[kLastProgressEventFired] = Date.now() + queueMicrotask(() => { + fireAProgressEvent('progress', fr) + }) + } - /** - * @see https://w3c.github.io/ServiceWorker/#query-cache - * @param {any} requestQuery - * @param {import('../../types/cache').CacheQueryOptions} options - * @param {requestResponseList} targetStorage - * @returns {requestResponseList} - */ - #queryCache (requestQuery, options, targetStorage) { - /** @type {requestResponseList} */ - const resultList = [] + // 4. Set chunkPromise to the result of reading a + // chunk from stream with reader. + chunkPromise = reader.read() + } else if (done) { + // 5. Otherwise, if chunkPromise is fulfilled with an + // object whose done property is true, queue a task + // to run the following steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' - const storage = targetStorage ?? this.#relevantRequestResponseList + // 2. Let result be the result of package data given + // bytes, type, blob’s type, and encodingName. + try { + const result = packageData(bytes, type, blob.type, encodingName) - for (const requestResponse of storage) { - const [cachedRequest, cachedResponse] = requestResponse - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse) - } - } + // 4. Else: - return resultList - } + if (fr[kAborted]) { + return + } - /** - * @see https://w3c.github.io/ServiceWorker/#request-matches-cached-item-algorithm - * @param {any} requestQuery - * @param {any} request - * @param {any | null} response - * @param {import('../../types/cache').CacheQueryOptions | undefined} options - * @returns {boolean} - */ - #requestMatchesCachedItem (requestQuery, request, response = null, options) { - // if (options?.ignoreMethod === false && request.method === 'GET') { - // return false - // } + // 1. Set fr’s result to result. + fr[kResult] = result - const queryURL = new URL(requestQuery.url) + // 2. Fire a progress event called load at the fr. + fireAProgressEvent('load', fr) + } catch (error) { + // 3. If package data threw an exception error: - const cachedURL = new URL(request.url) + // 1. Set fr’s error to error. + fr[kError] = error - if (options?.ignoreSearch) { - cachedURL.search = '' + // 2. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + } - queryURL.search = '' - } + // 5. If fr’s state is not "loading", fire a progress + // event called loadend at the fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) - if (!urlEquals(queryURL, cachedURL, true)) { - return false - } + break + } + } catch (error) { + if (fr[kAborted]) { + return + } - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } + // 6. Otherwise, if chunkPromise is rejected with an + // error error, queue a task to run the following + // steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' - const fieldValues = getFieldValues(response.headersList.get('vary')) + // 2. Set fr’s error to error. + fr[kError] = error - for (const fieldValue of fieldValues) { - if (fieldValue === '*') { - return false - } + // 3. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) - const requestValue = request.headersList.get(fieldValue) - const queryValue = requestQuery.headersList.get(fieldValue) + // 4. If fr’s state is not "loading", fire a progress + // event called loadend at fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) - // If one has the header and the other doesn't, or one has - // a different value than the other, return false - if (requestValue !== queryValue) { - return false + break } } + })() +} - return true - } +/** + * @see https://w3c.github.io/FileAPI/#fire-a-progress-event + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e The name of the event + * @param {import('./filereader').FileReader} reader + */ +function fireAProgressEvent (e, reader) { + // The progress event e does not bubble. e.bubbles must be false + // The progress event e is NOT cancelable. e.cancelable must be false + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }) + + reader.dispatchEvent(event) } -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) +/** + * @see https://w3c.github.io/FileAPI/#blob-package-data + * @param {Uint8Array[]} bytes + * @param {string} type + * @param {string?} mimeType + * @param {string?} encodingName + */ +function packageData (bytes, type, mimeType, encodingName) { + // 1. A Blob has an associated package data algorithm, given + // bytes, a type, a optional mimeType, and a optional + // encodingName, which switches on type and runs the + // associated steps: -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: false - } -] + switch (type) { + case 'DataURL': { + // 1. Return bytes as a DataURL [RFC2397] subject to + // the considerations below: + // * Use mimeType as part of the Data URL if it is + // available in keeping with the Data URL + // specification [RFC2397]. + // * If mimeType is not available return a Data URL + // without a media-type. [RFC2397]. -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) + // https://datatracker.ietf.org/doc/html/rfc2397#section-3 + // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data + // mediatype := [ type "/" subtype ] *( ";" parameter ) + // data := *urlchar + // parameter := attribute "=" value + let dataURL = 'data:' -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) + const parsed = parseMIMEType(mimeType || 'application/octet-stream') -webidl.converters.Response = webidl.interfaceConverter(Response) + if (parsed !== 'failure') { + dataURL += serializeAMimeType(parsed) + } -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) + dataURL += ';base64,' -module.exports = { - Cache -} + const decoder = new StringDecoder('latin1') + for (const chunk of bytes) { + dataURL += btoa(decoder.write(chunk)) + } -/***/ }), + dataURL += btoa(decoder.end()) -/***/ 37907: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return dataURL + } + case 'Text': { + // 1. Let encoding be failure + let encoding = 'failure' -"use strict"; + // 2. If the encodingName is present, set encoding to the + // result of getting an encoding from encodingName. + if (encodingName) { + encoding = getEncoding(encodingName) + } + // 3. If encoding is failure, and mimeType is present: + if (encoding === 'failure' && mimeType) { + // 1. Let type be the result of parse a MIME type + // given mimeType. + const type = parseMIMEType(mimeType) -const { kConstruct } = __nccwpck_require__(29174) -const { Cache } = __nccwpck_require__(66101) -const { webidl } = __nccwpck_require__(21744) -const { kEnumerableProperty } = __nccwpck_require__(83983) + // 2. If type is not failure, set encoding to the result + // of getting an encoding from type’s parameters["charset"]. + if (type !== 'failure') { + encoding = getEncoding(type.parameters.get('charset')) + } + } -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) - - cacheName = webidl.converters.DOMString(cacheName) +/** + * @see https://encoding.spec.whatwg.org/#decode + * @param {Uint8Array[]} ioQueue + * @param {string} encoding + */ +function decode (ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue) - // 2.1.1 - // 2.2 - return this.#caches.has(cacheName) - } + // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. + const BOMEncoding = BOMSniffing(bytes) - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open - * @param {string} cacheName - * @returns {Promise} - */ - async open (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) + let slice = 0 - cacheName = webidl.converters.DOMString(cacheName) + // 2. If BOMEncoding is non-null: + if (BOMEncoding !== null) { + // 1. Set encoding to BOMEncoding. + encoding = BOMEncoding - // 2.1 - if (this.#caches.has(cacheName)) { - // await caches.open('v1') !== await caches.open('v1') + // 2. Read three bytes from ioQueue, if BOMEncoding is + // UTF-8; otherwise read two bytes. + // (Do nothing with those bytes.) + slice = BOMEncoding === 'UTF-8' ? 3 : 2 + } - // 2.1.1 - const cache = this.#caches.get(cacheName) + // 3. Process a queue with an instance of encoding’s + // decoder, ioQueue, output, and "replacement". - // 2.1.1.1 - return new Cache(kConstruct, cache) - } + // 4. Return output. - // 2.2 - const cache = [] + const sliced = bytes.slice(slice) + return new TextDecoder(encoding).decode(sliced) +} - // 2.3 - this.#caches.set(cacheName, cache) +/** + * @see https://encoding.spec.whatwg.org/#bom-sniff + * @param {Uint8Array} ioQueue + */ +function BOMSniffing (ioQueue) { + // 1. Let BOM be the result of peeking 3 bytes from ioQueue, + // converted to a byte sequence. + const [a, b, c] = ioQueue - // 2.4 - return new Cache(kConstruct, cache) + // 2. For each of the rows in the table below, starting with + // the first one and going down, if BOM starts with the + // bytes given in the first column, then return the + // encoding given in the cell in the second column of that + // row. Otherwise, return null. + if (a === 0xEF && b === 0xBB && c === 0xBF) { + return 'UTF-8' + } else if (a === 0xFE && b === 0xFF) { + return 'UTF-16BE' + } else if (a === 0xFF && b === 0xFE) { + return 'UTF-16LE' } - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) - - cacheName = webidl.converters.DOMString(cacheName) - - return this.#caches.delete(cacheName) - } + return null +} - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {string[]} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) +/** + * @param {Uint8Array[]} sequences + */ +function combineByteSequences (sequences) { + const size = sequences.reduce((a, b) => { + return a + b.byteLength + }, 0) - // 2.1 - const keys = this.#caches.keys() + let offset = 0 - // 2.2 - return [...keys] - } + return sequences.reduce((a, b) => { + a.set(b, offset) + offset += b.byteLength + return a + }, new Uint8Array(size)) } -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - module.exports = { - CacheStorage + staticPropertyDescriptors, + readOperation, + fireAProgressEvent } /***/ }), -/***/ 29174: +/***/ 21892: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -module.exports = { - kConstruct: (__nccwpck_require__(72785).kConstruct) +// We include a version number for the Dispatcher API. In case of breaking changes, +// this version number must be increased to avoid conflicts. +const globalDispatcher = Symbol.for('undici.globalDispatcher.1') +const { InvalidArgumentError } = __nccwpck_require__(48045) +const Agent = __nccwpck_require__(7890) + +if (getGlobalDispatcher() === undefined) { + setGlobalDispatcher(new Agent()) } +function setGlobalDispatcher (agent) { + if (!agent || typeof agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument agent must implement Agent') + } + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }) +} -/***/ }), +function getGlobalDispatcher () { + return globalThis[globalDispatcher] +} -/***/ 82396: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +module.exports = { + setGlobalDispatcher, + getGlobalDispatcher +} -"use strict"; +/***/ }), -const assert = __nccwpck_require__(39491) -const { URLSerializer } = __nccwpck_require__(685) -const { isValidHeaderName } = __nccwpck_require__(52538) +/***/ 46930: +/***/ ((module) => { -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) +"use strict"; - const serializedB = URLSerializer(B, excludeFragment) - return serializedA === serializedB -} +module.exports = class DecoratorHandler { + constructor (handler) { + this.handler = handler + } -/** - * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 - * @param {string} header - */ -function fieldValues (header) { - assert(header !== null) + onConnect (...args) { + return this.handler.onConnect(...args) + } - const values = [] + onError (...args) { + return this.handler.onError(...args) + } - for (let value of header.split(',')) { - value = value.trim() + onUpgrade (...args) { + return this.handler.onUpgrade(...args) + } - if (!value.length) { - continue - } else if (!isValidHeaderName(value)) { - continue - } + onHeaders (...args) { + return this.handler.onHeaders(...args) + } - values.push(value) + onData (...args) { + return this.handler.onData(...args) } - return values -} + onComplete (...args) { + return this.handler.onComplete(...args) + } -module.exports = { - urlEquals, - fieldValues + onBodySent (...args) { + return this.handler.onBodySent(...args) + } } /***/ }), -/***/ 33598: +/***/ 72860: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// @ts-check - -/* global WebAssembly */ - -const assert = __nccwpck_require__(39491) -const net = __nccwpck_require__(41808) -const http = __nccwpck_require__(13685) -const { pipeline } = __nccwpck_require__(12781) const util = __nccwpck_require__(83983) -const timers = __nccwpck_require__(29459) -const Request = __nccwpck_require__(62905) -const DispatcherBase = __nccwpck_require__(74839) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - InvalidArgumentError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError, - ClientDestroyedError -} = __nccwpck_require__(48045) -const buildConnector = __nccwpck_require__(82067) -const { - kUrl, - kReset, - kServerName, - kClient, - kBusy, - kParser, - kConnect, - kBlocking, - kResuming, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kHTTPConnVersion, - // HTTP2 - kHost, - kHTTP2Session, - kHTTP2SessionState, - kHTTP2BuildRequest, - kHTTP2CopyHeaders, - kHTTP1BuildRequest -} = __nccwpck_require__(72785) - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(85158) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -// Experimental -let h2ExperimentalWarned = false +const { kBodyUsed } = __nccwpck_require__(72785) +const assert = __nccwpck_require__(39491) +const { InvalidArgumentError } = __nccwpck_require__(48045) +const EE = __nccwpck_require__(82361) -const FastBuffer = Buffer[Symbol.species] +const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] -const kClosedResolve = Symbol('kClosedResolve') +const kBody = Symbol('body') -const channels = {} +class BodyAsyncIterable { + constructor (body) { + this[kBody] = body + this[kBodyUsed] = false + } -try { - const diagnosticsChannel = __nccwpck_require__(67643) - channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') - channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') - channels.connectError = diagnosticsChannel.channel('undici:client:connectError') - channels.connected = diagnosticsChannel.channel('undici:client:connected') -} catch { - channels.sendHeaders = { hasSubscribers: false } - channels.beforeConnect = { hasSubscribers: false } - channels.connectError = { hasSubscribers: false } - channels.connected = { hasSubscribers: false } + async * [Symbol.asyncIterator] () { + assert(!this[kBodyUsed], 'disturbed') + this[kBodyUsed] = true + yield * this[kBody] + } } -/** - * @type {import('../types/client').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../types/client').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - allowH2, - maxConcurrentStreams - } = {}) { - super() - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') +class RedirectHandler { + constructor (dispatch, maxRedirections, opts, handler) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError('maxRedirections must be a positive number') } - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } + util.validateHandler(handler, opts.method, opts.upgrade) - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } + this.dispatch = dispatch + this.location = null + this.abort = null + this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy + this.maxRedirections = maxRedirections + this.handler = handler + this.history = [] - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } + if (util.isStream(this.opts.body)) { + // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp + // so that it can be dispatched again? + // TODO (fix): Do we need 100-expect support to provide a way to do this properly? + if (util.bodyLength(this.opts.body) === 0) { + this.opts.body + .on('data', function () { + assert(false) + }) + } - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') + if (typeof this.opts.body.readableDidRead !== 'boolean') { + this.opts.body[kBodyUsed] = false + EE.prototype.on.call(this.opts.body, 'data', function () { + this[kBodyUsed] = true + }) + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { + // TODO (fix): We can't access ReadableStream internal state + // to determine whether or not it has been disturbed. This is just + // a workaround. + this.opts.body = new BodyAsyncIterable(this.opts.body) + } else if ( + this.opts.body && + typeof this.opts.body !== 'string' && + !ArrayBuffer.isView(this.opts.body) && + util.isIterable(this.opts.body) + ) { + // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + this.opts.body = new BodyAsyncIterable(this.opts.body) } + } - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } + onConnect (abort) { + this.abort = abort + this.handler.onConnect(abort, { history: this.history }) + } - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } + onUpgrade (statusCode, headers, socket) { + this.handler.onUpgrade(statusCode, headers, socket) + } - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } + onError (error) { + this.handler.onError(error) + } - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } + onHeaders (statusCode, headers, resume, statusText) { + this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) + ? null + : parseLocation(statusCode, headers) - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') + if (this.opts.origin) { + this.history.push(new URL(this.opts.path, this.opts.origin)) } - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') + if (!this.location) { + return this.handler.onHeaders(statusCode, headers, resume, statusText) } - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } + const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) + const path = search ? `${pathname}${search}` : pathname - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } + // Remove headers referring to the original URL. + // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. + // https://tools.ietf.org/html/rfc7231#section-6.4 + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) + this.opts.path = path + this.opts.origin = origin + this.opts.maxRedirections = 0 + this.opts.query = null - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') + // https://tools.ietf.org/html/rfc7231#section-6.4.4 + // In case of HTTP 303, always replace method to be either HEAD or GET + if (statusCode === 303 && this.opts.method !== 'HEAD') { + this.opts.method = 'GET' + this.opts.body = null } + } - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } + onData (chunk) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } + TLDR: undici always ignores 3xx response bodies. - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } + Redirection is used to serve the requested resource from another URL, so it is assumes that + no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } + For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually + (which means it's optional and not mandated) contain just an hyperlink to the value of + the Location response header, so the body can be ignored safely. - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') + For status 300, which is "Multiple Choices", the spec mentions both generating a Location + response header AND a response body with the other possible location to follow. + Since the spec explicitily chooses not to specify a format for such body and leave it to + servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. + */ + } else { + return this.handler.onData(chunk) } + } - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } + onComplete (trailers) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 - this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) - ? interceptors.Client - : [createRedirectInterceptor({ maxRedirections })] - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kSocket] = null - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kHTTPConnVersion] = 'h1' + TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections + and neither are useful if present. - // HTTP/2 - this[kHTTP2Session] = null - this[kHTTP2SessionState] = !allowH2 - ? null - : { - // streams: null, // Fixed queue of streams - For future support of `push` - openStreams: 0, // Keep track of them to decide wether or not unref the session - maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - } - this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` + See comment on onData method above for more detailed informations. + */ - // kQueue is built up of 3 sections separated by - // the kRunningIdx and kPendingIdx indices. - // | complete | running | pending | - // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length - // kRunningIdx points to the first running element. - // kPendingIdx points to the first pending element. - // This implements a fast queue with an amortized - // time of O(1). + this.location = null + this.abort = null - this[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 + this.dispatch(this.opts, this) + } else { + this.handler.onComplete(trailers) + } } - get pipelining () { - return this[kPipelining] + onBodySent (chunk) { + if (this.handler.onBodySent) { + this.handler.onBodySent(chunk) + } } +} - set pipelining (value) { - this[kPipelining] = value - resume(this, true) +function parseLocation (statusCode, headers) { + if (redirectableStatusCodes.indexOf(statusCode) === -1) { + return null } - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].toString().toLowerCase() === 'location') { + return headers[i + 1] + } } +} - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] +// https://tools.ietf.org/html/rfc7231#section-6.4.4 +function shouldRemoveHeader (header, removeContent, unknownOrigin) { + if (header.length === 4) { + return util.headerNameToString(header) === 'host' } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] + if (removeContent && util.headerNameToString(header).startsWith('content-')) { + return true } - - get [kConnected] () { - return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util.headerNameToString(header) + return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' } + return false +} - get [kBusy] () { - const socket = this[kSocket] - return ( - (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) || - (this[kSize] >= (this[kPipelining] || 1)) || - this[kPending] > 0 - ) +// https://tools.ietf.org/html/rfc7231#section-6.4 +function cleanRequestHeaders (headers, removeContent, unknownOrigin) { + const ret = [] + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { + ret.push(headers[i], headers[i + 1]) + } + } + } else if (headers && typeof headers === 'object') { + for (const key of Object.keys(headers)) { + if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, headers[key]) + } + } + } else { + assert(headers == null, 'headers must be an object or an array') } + return ret +} - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } +module.exports = RedirectHandler - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - const request = this[kHTTPConnVersion] === 'h2' - ? Request[kHTTP2BuildRequest](origin, opts, handler) - : Request[kHTTP1BuildRequest](origin, opts, handler) +/***/ }), - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - process.nextTick(resume, this) - } else { - resume(this, true) - } +/***/ 82286: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 +const assert = __nccwpck_require__(39491) + +const { kRetryHandlerDefaultRetry } = __nccwpck_require__(72785) +const { RequestRetryError } = __nccwpck_require__(48045) +const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(83983) + +function calculateRetryAfterHeader (retryAfter) { + const current = Date.now() + const diff = new Date(retryAfter).getTime() - current + + return diff +} + +class RetryHandler { + constructor (opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes + } = retryOptions ?? {} + + this.dispatch = handlers.dispatch + this.handler = handlers.handler + this.opts = dispatchOpts + this.abort = null + this.aborted = false + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1000, // 30s, + timeout: minTimeout ?? 500, // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + errorCodes: errorCodes ?? [ + 'ECONNRESET', + 'ECONNREFUSED', + 'ENOTFOUND', + 'ENETDOWN', + 'ENETUNREACH', + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'EPIPE' + ] } - return this[kNeedDrain] < 2 - } + this.retryCount = 0 + this.start = 0 + this.end = null + this.etag = null + this.resume = null - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (!this[kSize]) { - resolve(null) + // Handle possible onConnect duplication + this.handler.onConnect(reason => { + this.aborted = true + if (this.abort) { + this.abort(reason) } else { - this[kClosedResolve] = resolve + this.reason = reason } }) } - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(this, request, err) - } - - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve() - } + onRequestSent () { + if (this.handler.onRequestSent) { + this.handler.onRequestSent() + } + } - if (this[kHTTP2Session] != null) { - util.destroy(this[kHTTP2Session], err) - this[kHTTP2Session] = null - this[kHTTP2SessionState] = null - } + onUpgrade (statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket) + } + } - if (!this[kSocket]) { - queueMicrotask(callback) - } else { - util.destroy(this[kSocket].on('close', callback), err) - } + onConnect (abort) { + if (this.aborted) { + abort(this.reason) + } else { + this.abort = abort + } + } - resume(this) - }) + onBodySent (chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk) } -} -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { + const { statusCode, code, headers } = err + const { method, retryOptions } = opts + const { + maxRetries, + timeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions + let { counter, currentTimeout } = state - this[kSocket][kError] = err + currentTimeout = + currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout - onError(this[kClient], err) -} + // Any code that is not a Undici's originated and allowed to retry + if ( + code && + code !== 'UND_ERR_REQ_RETRY' && + code !== 'UND_ERR_SOCKET' && + !errorCodes.includes(code) + ) { + cb(err) + return + } -function onHttp2FrameError (type, code, id) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err) + return + } - if (id === 0) { - this[kSocket][kError] = err - onError(this[kClient], err) - } -} + // If a set of status code are provided and the current status code is not in the list + if ( + statusCode != null && + Array.isArray(statusCodes) && + !statusCodes.includes(statusCode) + ) { + cb(err) + return + } -function onHttp2SessionEnd () { - util.destroy(this, new SocketError('other side closed')) - util.destroy(this[kSocket], new SocketError('other side closed')) -} + // If we reached the max number of retries + if (counter > maxRetries) { + cb(err) + return + } -function onHTTP2GoAway (code) { - const client = this[kClient] - const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) - client[kSocket] = null - client[kHTTP2Session] = null + let retryAfterHeader = headers != null && headers['retry-after'] + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader) + retryAfterHeader = isNaN(retryAfterHeader) + ? calculateRetryAfterHeader(retryAfterHeader) + : retryAfterHeader * 1e3 // Retry-After is in seconds + } - if (client.destroyed) { - assert(this[kPending] === 0) + const retryTimeout = + retryAfterHeader > 0 + ? Math.min(retryAfterHeader, maxTimeout) + : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(this, request, err) - } - } else if (client[kRunning] > 0) { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null + state.currentTimeout = retryTimeout - errorRequest(client, request, err) + setTimeout(() => cb(null), retryTimeout) } - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders) - client.emit('disconnect', - client[kUrl], - [client], - err - ) + this.retryCount += 1 - resume(client) -} + if (statusCode >= 300) { + this.abort( + new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } -const constants = __nccwpck_require__(30953) -const createRedirectInterceptor = __nccwpck_require__(38861) -const EMPTY_BUF = Buffer.alloc(0) + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(61145) : undefined + if (statusCode !== 206) { + return true + } - let mod - try { - mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(95627), 'base64')) - } catch (e) { - /* istanbul ignore next */ + const contentRange = parseRangeHeader(headers['content-range']) + // If no content range + if (!contentRange) { + this.abort( + new RequestRetryError('Content-Range mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } - // We could check if the error was caused by the simd option not - // being enabled, but the occurring of this other error - // * https://github.com/emscripten-core/emscripten/issues/11495 - // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(61145), 'base64')) - } + // Let's start with a weak etag check + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError('ETag mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } - return await WebAssembly.instantiate(mod, { - env: { - /* eslint-disable camelcase */ + const { start, size, end = size } = contentRange - wasm_on_url: (p, at, len) => { - /* istanbul ignore next */ - return 0 - }, - wasm_on_status: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onMessageComplete() || 0 - } + assert(this.start === start, 'content-range mismatch') + assert(this.end == null || this.end === end, 'content-range mismatch') - /* eslint-enable camelcase */ + this.resume = resume + return true } - }) -} -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = parseRangeHeader(headers['content-range']) -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } -const TIMEOUT_HEADERS = 1 -const TIMEOUT_BODY = 2 -const TIMEOUT_IDLE = 3 + const { start, size, end = size } = range -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) + assert( + start != null && Number.isFinite(start) && this.start !== start, + 'content-range mismatch' + ) + assert(Number.isFinite(start)) + assert( + end != null && Number.isFinite(end) && this.end !== end, + 'invalid content-length' + ) - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE) - this.client = client - this.socket = socket - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - this.statusCode = null - this.statusText = '' - this.upgrade = false - this.headers = [] - this.headersSize = 0 - this.headersMaxSize = client[kMaxHeadersSize] - this.shouldKeepAlive = false - this.paused = false - this.resume = this.resume.bind(this) + this.start = start + this.end = end + } - this.bytesRead = 0 + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers['content-length'] + this.end = contentLength != null ? Number(contentLength) : null + } - this.keepAlive = '' - this.contentLength = '' - this.connection = '' - this.maxResponseSize = client[kMaxResponseSize] - } + assert(Number.isFinite(this.start)) + assert( + this.end == null || Number.isFinite(this.end), + 'invalid content-length' + ) - setTimeout (value, type) { - this.timeoutType = type - if (value !== this.timeoutValue) { - timers.clearTimeout(this.timeout) - if (value) { - this.timeout = timers.setTimeout(onParserTimeout, value, this) - // istanbul ignore else: only for jest - if (this.timeout.unref) { - this.timeout.unref() - } - } else { - this.timeout = null - } - this.timeoutValue = value - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } - } + this.resume = resume + this.etag = headers.etag != null ? headers.etag : null - resume () { - if (this.socket.destroyed || !this.paused) { - return + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) } - assert(this.ptr != null) - assert(currentParser == null) + const err = new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) - this.llhttp.llhttp_resume(this.ptr) + this.abort(err) - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } - } + return false + } - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() + onData (chunk) { + this.start += chunk.length + + return this.handler.onData(chunk) } - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break - } - this.execute(chunk) - } + onComplete (rawTrailers) { + this.retryCount = 0 + return this.handler.onComplete(rawTrailers) } - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) + onError (err) { + if (this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } - const { socket, llhttp } = this + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + onRetry.bind(this) + ) - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) + function onRetry (err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) - } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data) - // Call `execute` on the wasm parser. - // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, - // and finally the length of bytes to parse. - // The return value is an error code or `constants.ERROR.OK`. - try { - let ret + if (this.start !== 0) { + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + range: `bytes=${this.start}-${this.end ?? ''}` + } + } + } try { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) - /* eslint-disable-next-line no-useless-catch */ + this.dispatch(this.opts, this) } catch (err) { - /* istanbul ignore next: difficult to make a test case for */ - throw err - } finally { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.ERROR.OK) { - const ptr = llhttp.llhttp_get_error_reason(this.ptr) - let message = '' - /* istanbul ignore else: difficult to make a test case for */ - if (ptr) { - const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0) - message = - 'Response does not match the HTTP/1.1 protocol (' + - Buffer.from(llhttp.memory.buffer, ptr, len).toString() + - ')' - } - throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) + this.handler.onError(err) } - } catch (err) { - util.destroy(socket, err) } } +} - destroy () { - assert(this.ptr != null) - assert(currentParser == null) +module.exports = RetryHandler - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null +/***/ }), - this.paused = false - } +/***/ 38861: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - onStatus (buf) { - this.statusText = buf.toString() - } +"use strict"; - onMessageBegin () { - const { socket, client } = this - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } +const RedirectHandler = __nccwpck_require__(72860) - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 +function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept (opts, handler) { + const { maxRedirections = defaultMaxRedirections } = opts + + if (!maxRedirections) { + return dispatch(opts, handler) + } + + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) + opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. + return dispatch(opts, redirectHandler) } } +} - onHeaderField (buf) { - const len = this.headers.length +module.exports = createRedirectInterceptor - if ((len & 1) === 0) { - this.headers.push(buf) - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } - this.trackHeader(buf.length) - } +/***/ }), - onHeaderValue (buf) { - let len = this.headers.length +/***/ 30953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if ((len & 1) === 1) { - this.headers.push(buf) - len += 1 - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]) - } +"use strict"; - const key = this.headers[len - 2] - if (key.length === 10 && key.toString().toLowerCase() === 'keep-alive') { - this.keepAlive += buf.toString() - } else if (key.length === 10 && key.toString().toLowerCase() === 'connection') { - this.connection += buf.toString() - } else if (key.length === 14 && key.toString().toLowerCase() === 'content-length') { - this.contentLength += buf.toString() +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; +const utils_1 = __nccwpck_require__(41891); +// C headers +var ERROR; +(function (ERROR) { + ERROR[ERROR["OK"] = 0] = "OK"; + ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; + ERROR[ERROR["STRICT"] = 2] = "STRICT"; + ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; + ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR[ERROR["USER"] = 24] = "USER"; +})(ERROR = exports.ERROR || (exports.ERROR = {})); +var TYPE; +(function (TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; +})(TYPE = exports.TYPE || (exports.TYPE = {})); +var FLAGS; +(function (FLAGS) { + FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; + FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; + FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; + // 1 << 8 is unused + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; +})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); +var LENIENT_FLAGS; +(function (LENIENT_FLAGS) { + LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; +})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); +var METHODS; +(function (METHODS) { + METHODS[METHODS["DELETE"] = 0] = "DELETE"; + METHODS[METHODS["GET"] = 1] = "GET"; + METHODS[METHODS["HEAD"] = 2] = "HEAD"; + METHODS[METHODS["POST"] = 3] = "POST"; + METHODS[METHODS["PUT"] = 4] = "PUT"; + /* pathological */ + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + /* WebDAV */ + METHODS[METHODS["COPY"] = 8] = "COPY"; + METHODS[METHODS["LOCK"] = 9] = "LOCK"; + METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; + METHODS[METHODS["MOVE"] = 11] = "MOVE"; + METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; + METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; + METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; + METHODS[METHODS["BIND"] = 16] = "BIND"; + METHODS[METHODS["REBIND"] = 17] = "REBIND"; + METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; + METHODS[METHODS["ACL"] = 19] = "ACL"; + /* subversion */ + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + /* upnp */ + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + /* RFC-5789 */ + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + /* CalDAV */ + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + /* RFC-2068, section 19.6.1.2 */ + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + /* icecast */ + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + /* RFC-7540, section 11.6 */ + METHODS[METHODS["PRI"] = 34] = "PRI"; + /* RFC-2326 RTSP */ + METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS[METHODS["SETUP"] = 37] = "SETUP"; + METHODS[METHODS["PLAY"] = 38] = "PLAY"; + METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; + METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; + METHODS[METHODS["RECORD"] = 44] = "RECORD"; + /* RAOP */ + METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; +})(METHODS = exports.METHODS || (exports.METHODS = {})); +exports.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS['M-SEARCH'], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + METHODS.SOURCE, +]; +exports.METHODS_ICE = [ + METHODS.SOURCE, +]; +exports.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + // For AirPlay + METHODS.GET, + METHODS.POST, +]; +exports.METHOD_MAP = utils_1.enumToMap(METHODS); +exports.H_METHOD_MAP = {}; +Object.keys(exports.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) { + exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; + } +}); +var FINISH; +(function (FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; +})(FINISH = exports.FINISH || (exports.FINISH = {})); +exports.ALPHA = []; +for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { + // Upper case + exports.ALPHA.push(String.fromCharCode(i)); + // Lower case + exports.ALPHA.push(String.fromCharCode(i + 0x20)); +} +exports.NUM_MAP = { + 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, + 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, +}; +exports.HEX_MAP = { + 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, + 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, + A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, + a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, +}; +exports.NUM = [ + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', +]; +exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); +exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; +exports.USERINFO_CHARS = exports.ALPHANUM + .concat(exports.MARK) + .concat(['%', ';', ':', '&', '=', '+', '$', ',']); +// TODO(indutny): use RFC +exports.STRICT_URL_CHAR = [ + '!', '"', '$', '%', '&', '\'', + '(', ')', '*', '+', ',', '-', '.', '/', + ':', ';', '<', '=', '>', + '@', '[', '\\', ']', '^', '_', + '`', + '{', '|', '}', '~', +].concat(exports.ALPHANUM); +exports.URL_CHAR = exports.STRICT_URL_CHAR + .concat(['\t', '\f']); +// All characters with 0x80 bit set to 1 +for (let i = 0x80; i <= 0xff; i++) { + exports.URL_CHAR.push(i); +} +exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); +/* Tokens as defined by rfc 2616. Also lowercases them. + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + */ +exports.STRICT_TOKEN = [ + '!', '#', '$', '%', '&', '\'', + '*', '+', '-', '.', + '^', '_', '`', + '|', '~', +].concat(exports.ALPHANUM); +exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); +/* + * Verify that a char is a valid visible (printable) US-ASCII + * character or %x80-FF + */ +exports.HEADER_CHARS = ['\t']; +for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports.HEADER_CHARS.push(i); } +} +// ',' = \x44 +exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); +exports.MAJOR = exports.NUM_MAP; +exports.MINOR = exports.MAJOR; +var HEADER_STATE; +(function (HEADER_STATE) { + HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; +})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); +exports.SPECIAL_HEADERS = { + 'connection': HEADER_STATE.CONNECTION, + 'content-length': HEADER_STATE.CONTENT_LENGTH, + 'proxy-connection': HEADER_STATE.CONNECTION, + 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, + 'upgrade': HEADER_STATE.UPGRADE, +}; +//# sourceMappingURL=constants.js.map - this.trackHeader(buf.length) - } +/***/ }), - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) - } - } +/***/ 61145: +/***/ ((module) => { - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' - assert(upgrade) - const request = client[kQueue][client[kRunningIdx]] - assert(request) +/***/ }), - assert(!socket.destroyed) - assert(socket === client[kSocket]) - assert(!this.paused) - assert(request.upgrade || request.method === 'CONNECT') +/***/ 95627: +/***/ ((module) => { - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 - socket.unshift(head) +/***/ }), - socket[kParser].destroy() - socket[kParser] = null +/***/ 41891: +/***/ ((__unused_webpack_module, exports) => { - socket[kClient] = null - socket[kError] = null - socket - .removeListener('error', onSocketError) - .removeListener('readable', onSocketReadable) - .removeListener('end', onSocketEnd) - .removeListener('close', onSocketClose) +"use strict"; - client[kSocket] = null - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.enumToMap = void 0; +function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === 'number') { + res[key] = value; + } + }); + return res; +} +exports.enumToMap = enumToMap; +//# sourceMappingURL=utils.js.map - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) - } +/***/ }), - resume(client) - } +/***/ 66771: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this +"use strict"; - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - const request = client[kQueue][client[kRunningIdx]] +const { kClients } = __nccwpck_require__(72785) +const Agent = __nccwpck_require__(7890) +const { + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory +} = __nccwpck_require__(24347) +const MockClient = __nccwpck_require__(58687) +const MockPool = __nccwpck_require__(26193) +const { matchValue, buildMockOptions } = __nccwpck_require__(79323) +const { InvalidArgumentError, UndiciError } = __nccwpck_require__(48045) +const Dispatcher = __nccwpck_require__(60412) +const Pluralizer = __nccwpck_require__(78891) +const PendingInterceptorsFormatter = __nccwpck_require__(86823) - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 - } +class FakeWeakRef { + constructor (value) { + this.value = value + } - assert(!this.upgrade) - assert(this.statusCode < 200) + deref () { + return this.value + } +} - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 - } +class MockAgent extends Dispatcher { + constructor (opts) { + super(opts) - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 + this[kNetConnect] = true + this[kIsMockActive] = true + + // Instantiate Agent and encapsulate + if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') } + const agent = opts && opts.agent ? opts.agent : new Agent(opts) + this[kAgent] = agent - assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) + this[kClients] = agent[kClients] + this[kOptions] = buildMockOptions(opts) + } - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) + get (origin) { + let dispatcher = this[kMockAgentGet](origin) - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } + if (!dispatcher) { + dispatcher = this[kFactory](origin) + this[kMockAgentSet](origin, dispatcher) } + return dispatcher + } - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } + dispatch (opts, handler) { + // Call MockAgent.get to perform additional setup before dispatching as normal + this.get(opts.origin) + return this[kAgent].dispatch(opts, handler) + } - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 - } + async close () { + await this[kAgent].close() + this[kClients].clear() + } - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 + deactivate () { + this[kIsMockActive] = false + } - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null + activate () { + this[kIsMockActive] = true + } - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout - } + enableNetConnect (matcher) { + if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { + if (Array.isArray(this[kNetConnect])) { + this[kNetConnect].push(matcher) } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] + this[kNetConnect] = [matcher] } + } else if (typeof matcher === 'undefined') { + this[kNetConnect] = true } else { - // Stop more requests from being dispatched. - socket[kReset] = true + throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') } + } - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false + disableNetConnect () { + this[kNetConnect] = false + } - if (request.aborted) { - return -1 - } + // This is required to bypass issues caused by using global symbols - see: + // https://github.com/nodejs/undici/issues/1447 + get isMockActive () { + return this[kIsMockActive] + } - if (request.method === 'HEAD') { - return 1 + [kMockAgentSet] (origin, dispatcher) { + this[kClients].set(origin, new FakeWeakRef(dispatcher)) + } + + [kFactory] (origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]) + return this[kOptions] && this[kOptions].connections === 1 + ? new MockClient(origin, mockOptions) + : new MockPool(origin, mockOptions) + } + + [kMockAgentGet] (origin) { + // First check if we can immediately find it + const ref = this[kClients].get(origin) + if (ref) { + return ref.deref() } - if (statusCode < 200) { - return 1 + // If the origin is not a string create a dummy parent pool and return to user + if (typeof origin !== 'string') { + const dispatcher = this[kFactory]('http://localhost:9999') + this[kMockAgentSet](origin, dispatcher) + return dispatcher } - if (socket[kBlocking]) { - socket[kBlocking] = false - resume(client) + // If we match, create a pool and assign the same dispatches + for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { + const nonExplicitDispatcher = nonExplicitRef.deref() + if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin) + this[kMockAgentSet](origin, dispatcher) + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] + return dispatcher + } } + } - return pause ? constants.ERROR.PAUSED : 0 + [kGetNetConnect] () { + return this[kNetConnect] } - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this + pendingInterceptors () { + const mockAgentClients = this[kClients] - if (socket.destroyed) { - return -1 - } + return Array.from(mockAgentClients.entries()) + .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin }))) + .filter(({ pending }) => pending) + } - const request = client[kQueue][client[kRunningIdx]] - assert(request) + assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors() - assert.strictEqual(this.timeoutType, TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() - } + if (pending.length === 0) { + return } - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } + const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - this.bytesRead += buf.length + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } +${pendingInterceptorsFormatter.format(pending)} +`.trim()) } +} - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this +module.exports = MockAgent - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - if (upgrade) { - return - } +/***/ }), - const request = client[kQueue][client[kRunningIdx]] - assert(request) +/***/ 58687: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - assert(statusCode >= 100) +"use strict"; - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 +const { promisify } = __nccwpck_require__(73837) +const Client = __nccwpck_require__(33598) +const { buildMockDispatch } = __nccwpck_require__(79323) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(24347) +const { MockInterceptor } = __nccwpck_require__(90410) +const Symbols = __nccwpck_require__(72785) +const { InvalidArgumentError } = __nccwpck_require__(48045) - if (statusCode < 200) { - return - } +/** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ +class MockClient extends Client { + constructor (origin, opts) { + super(origin, opts) - /* istanbul ignore next: should be handled by llhttp? */ - if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') } - request.onComplete(headers) - - client[kQueue][client[kRunningIdx]++] = null + this[kMockAgent] = opts.agent + this[kOrigin] = origin + this[kDispatches] = [] + this[kConnected] = 1 + this[kOriginalDispatch] = this.dispatch + this[kOriginalClose] = this.close.bind(this) - if (socket[kWriting]) { - assert.strictEqual(client[kRunning], 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[kRunning] === 0) { - // Destroy socket once all requests have completed. - // The request at the tail of the pipeline is the one - // that requested reset and no further requests should - // have been queued since then. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[kPipelining] === 1) { - // We must wait a full event loop cycle to reuse this socket to make sure - // that non-spec compliant servers are not closing the connection even if they - // said they won't. - setImmediate(resume, client) - } else { - resume(client) - } + this.dispatch = buildMockDispatch.call(this) + this.close = this[kClose] } -} -function onParserTimeout (parser) { - const { socket, timeoutType, client } = parser + get [Symbols.kConnected] () { + return this[kConnected] + } - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!parser.paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!parser.paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_IDLE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept (opts) { + return new MockInterceptor(opts, this[kDispatches]) } -} -function onSocketReadable () { - const { [kParser]: parser } = this - if (parser) { - parser.readMore() + async [kClose] () { + await promisify(this[kOriginalClose])() + this[kConnected] = 0 + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) } } -function onSocketError (err) { - const { [kClient]: client, [kParser]: parser } = this +module.exports = MockClient - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - if (client[kHTTPConnVersion] !== 'h2') { - // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded - // to the user. - if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so for as a valid response. - parser.onMessageComplete() - return - } - } +/***/ }), - this[kError] = err +/***/ 50888: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - onError(this[kClient], err) -} +"use strict"; -function onError (client, err) { - if ( - client[kRunning] === 0 && - err.code !== 'UND_ERR_INFO' && - err.code !== 'UND_ERR_SOCKET' - ) { - // Error is not caused by running request and not a recoverable - // socket error. - assert(client[kPendingIdx] === client[kRunningIdx]) +const { UndiciError } = __nccwpck_require__(48045) - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(client, request, err) - } - assert(client[kSize] === 0) +class MockNotMatchedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, MockNotMatchedError) + this.name = 'MockNotMatchedError' + this.message = message || 'The request does not match any registered mock dispatches' + this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' } } -function onSocketEnd () { - const { [kParser]: parser, [kClient]: client } = this +module.exports = { + MockNotMatchedError +} - if (client[kHTTPConnVersion] !== 'h2') { - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return - } - } - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) -} +/***/ }), -function onSocketClose () { - const { [kClient]: client, [kParser]: parser } = this +/***/ 90410: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (client[kHTTPConnVersion] === 'h1' && parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() +"use strict"; + + +const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(79323) +const { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch +} = __nccwpck_require__(24347) +const { InvalidArgumentError } = __nccwpck_require__(48045) +const { buildURL } = __nccwpck_require__(83983) + +/** + * Defines the scope API for an interceptor reply + */ +class MockScope { + constructor (mockDispatch) { + this[kMockDispatch] = mockDispatch + } + + /** + * Delay a reply by a set amount in ms. + */ + delay (waitInMs) { + if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { + throw new InvalidArgumentError('waitInMs must be a valid integer > 0') } - this[kParser].destroy() - this[kParser] = null + this[kMockDispatch].delay = waitInMs + return this } - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) + /** + * For a defined reply, never mark as consumed. + */ + persist () { + this[kMockDispatch].persist = true + return this + } - client[kSocket] = null + /** + * Allow one to define a reply for a set amount of matching requests. + */ + times (repeatTimes) { + if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { + throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') + } - if (client.destroyed) { - assert(client[kPending] === 0) + this[kMockDispatch].times = repeatTimes + return this + } +} - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(client, request, err) +/** + * Defines an interceptor for a Mock + */ +class MockInterceptor { + constructor (opts, mockDispatches) { + if (typeof opts !== 'object') { + throw new InvalidArgumentError('opts must be an object') + } + if (typeof opts.path === 'undefined') { + throw new InvalidArgumentError('opts.path must be defined') + } + if (typeof opts.method === 'undefined') { + opts.method = 'GET' + } + // See https://github.com/nodejs/undici/issues/1245 + // As per RFC 3986, clients are not supposed to send URI + // fragments to servers when they retrieve a document, + if (typeof opts.path === 'string') { + if (opts.query) { + opts.path = buildURL(opts.path, opts.query) + } else { + // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 + const parsedURL = new URL(opts.path, 'data://') + opts.path = parsedURL.pathname + parsedURL.search + } + } + if (typeof opts.method === 'string') { + opts.method = opts.method.toUpperCase() } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - errorRequest(client, request, err) + this[kDispatchKey] = buildKey(opts) + this[kDispatches] = mockDispatches + this[kDefaultHeaders] = {} + this[kDefaultTrailers] = {} + this[kContentLength] = false } - client[kPendingIdx] = client[kRunningIdx] + createMockScopeDispatchData (statusCode, data, responseOptions = {}) { + const responseData = getResponseData(data) + const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} + const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } + const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - assert(client[kRunning] === 0) + return { statusCode, data, headers, trailers } + } - client.emit('disconnect', client[kUrl], [client], err) + validateReplyParameters (statusCode, data, responseOptions) { + if (typeof statusCode === 'undefined') { + throw new InvalidArgumentError('statusCode must be defined') + } + if (typeof data === 'undefined') { + throw new InvalidArgumentError('data must be defined') + } + if (typeof responseOptions !== 'object') { + throw new InvalidArgumentError('responseOptions must be an object') + } + } - resume(client) -} + /** + * Mock an undici request with a defined reply. + */ + reply (replyData) { + // Values of reply aren't available right now as they + // can only be available when the reply callback is invoked. + if (typeof replyData === 'function') { + // We'll first wrap the provided callback in another function, + // this function will properly resolve the data from the callback + // when invoked. + const wrappedDefaultsCallback = (opts) => { + // Our reply options callback contains the parameter for statusCode, data and options. + const resolvedData = replyData(opts) -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kSocket]) + // Check if it is in the right format + if (typeof resolvedData !== 'object') { + throw new InvalidArgumentError('reply options callback must return an object') + } - let { host, hostname, protocol, port } = client[kUrl] + const { statusCode, data = '', responseOptions = {} } = resolvedData + this.validateReplyParameters(statusCode, data, responseOptions) + // Since the values can be obtained immediately we return them + // from this higher order function that will be resolved later. + return { + ...this.createMockScopeDispatchData(statusCode, data, responseOptions) + } + } - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') + // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) + return new MockScope(newMockDispatch) + } - assert(idx !== -1) - const ip = hostname.substring(1, idx) + // We can have either one or three parameters, if we get here, + // we should have 1-3 parameters. So we spread the arguments of + // this function to obtain the parameters, since replyData will always + // just be the statusCode. + const [statusCode, data = '', responseOptions = {}] = [...arguments] + this.validateReplyParameters(statusCode, data, responseOptions) - assert(net.isIP(ip)) - hostname = ip + // Send in-already provided data like usual + const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) + return new MockScope(newMockDispatch) } - client[kConnecting] = true + /** + * Mock an undici request with a defined error. + */ + replyWithError (error) { + if (typeof error === 'undefined') { + throw new InvalidArgumentError('error must be defined') + } - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) + return new MockScope(newMockDispatch) } - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) - } - }) - }) + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders (headers) { + if (typeof headers === 'undefined') { + throw new InvalidArgumentError('headers must be defined') + } - if (client.destroyed) { - util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) - return + this[kDefaultHeaders] = headers + return this + } + + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers (trailers) { + if (typeof trailers === 'undefined') { + throw new InvalidArgumentError('trailers must be defined') } - client[kConnecting] = false + this[kDefaultTrailers] = trailers + return this + } - assert(socket) + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength () { + this[kContentLength] = true + return this + } +} - const isH2 = socket.alpnProtocol === 'h2' - if (isH2) { - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) - } +module.exports.MockInterceptor = MockInterceptor +module.exports.MockScope = MockScope - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams - }) - client[kHTTPConnVersion] = 'h2' - session[kClient] = client - session[kSocket] = socket - session.on('error', onHttp2SessionError) - session.on('frameError', onHttp2FrameError) - session.on('end', onHttp2SessionEnd) - session.on('goaway', onHTTP2GoAway) - session.on('close', onSocketClose) - session.unref() +/***/ }), - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - } else { - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null - } +/***/ 26193: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) - } +"use strict"; - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - socket - .on('error', onSocketError) - .on('readable', onSocketReadable) - .on('end', onSocketEnd) - .on('close', onSocketClose) +const { promisify } = __nccwpck_require__(73837) +const Pool = __nccwpck_require__(4634) +const { buildMockDispatch } = __nccwpck_require__(79323) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(24347) +const { MockInterceptor } = __nccwpck_require__(90410) +const Symbols = __nccwpck_require__(72785) +const { InvalidArgumentError } = __nccwpck_require__(48045) - client[kSocket] = socket +/** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ +class MockPool extends Pool { + constructor (origin, opts) { + super(origin, opts) - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) - } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return + if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') } - client[kConnecting] = false + this[kMockAgent] = opts.agent + this[kOrigin] = origin + this[kDispatches] = [] + this[kConnected] = 1 + this[kOriginalDispatch] = this.dispatch + this[kOriginalClose] = this.close.bind(this) - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) - } + this.dispatch = buildMockDispatch.call(this) + this.close = this[kClose] + } - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - errorRequest(client, request, err) - } - } else { - onError(client, err) - } + get [Symbols.kConnected] () { + return this[kConnected] + } - client.emit('connectionError', client[kUrl], [client], err) + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept (opts) { + return new MockInterceptor(opts, this[kDispatches]) } - resume(client) + async [kClose] () { + await promisify(this[kOriginalClose])() + this[kConnected] = 0 + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) + } } -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) +module.exports = MockPool + + +/***/ }), + +/***/ 24347: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + kAgent: Symbol('agent'), + kOptions: Symbol('options'), + kFactory: Symbol('factory'), + kDispatches: Symbol('dispatches'), + kDispatchKey: Symbol('dispatch key'), + kDefaultHeaders: Symbol('default headers'), + kDefaultTrailers: Symbol('default trailers'), + kContentLength: Symbol('content length'), + kMockAgent: Symbol('mock agent'), + kMockAgentSet: Symbol('mock agent set'), + kMockAgentGet: Symbol('mock agent get'), + kMockDispatch: Symbol('mock dispatch'), + kClose: Symbol('close'), + kOriginalClose: Symbol('original agent close'), + kOrigin: Symbol('origin'), + kIsMockActive: Symbol('is mock active'), + kNetConnect: Symbol('net connect'), + kGetNetConnect: Symbol('get net connect'), + kConnected: Symbol('connected') } -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - client[kResuming] = 2 +/***/ }), - _resume(client, sync) - client[kResuming] = 0 +/***/ 79323: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 +"use strict"; + + +const { MockNotMatchedError } = __nccwpck_require__(50888) +const { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect +} = __nccwpck_require__(24347) +const { buildURL, nop } = __nccwpck_require__(83983) +const { STATUS_CODES } = __nccwpck_require__(13685) +const { + types: { + isPromise + } +} = __nccwpck_require__(73837) + +function matchValue (match, value) { + if (typeof match === 'string') { + return match === value + } + if (match instanceof RegExp) { + return match.test(value) + } + if (typeof match === 'function') { + return match(value) === true } + return false } -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return - } +function lowerCaseEntries (headers) { + return Object.fromEntries( + Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue] + }) + ) +} - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return +/** + * @param {import('../../index').Headers|string[]|Record} headers + * @param {string} key + */ +function getHeaderByName (headers, key) { + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { + return headers[i + 1] + } } - const socket = client[kSocket] + return undefined + } else if (typeof headers.get === 'function') { + return headers.get(key) + } else { + return lowerCaseEntries(headers)[key.toLocaleLowerCase()] + } +} - if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false - } +/** @param {string[]} headers */ +function buildHeadersFromArray (headers) { // fetch HeadersList + const clone = headers.slice() + const entries = [] + for (let index = 0; index < clone.length; index += 2) { + entries.push([clone[index], clone[index + 1]]) + } + return Object.fromEntries(entries) +} - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } - } +function matchHeaders (mockDispatch, headers) { + if (typeof mockDispatch.headers === 'function') { + if (Array.isArray(headers)) { // fetch HeadersList + headers = buildHeadersFromArray(headers) } + return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) + } + if (typeof mockDispatch.headers === 'undefined') { + return true + } + if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { + return false + } - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - process.nextTick(emitDrain, client) - } else { - emitDrain(client) - } - continue - } + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { + const headerValue = getHeaderByName(headers, matchHeaderName) - if (client[kPending] === 0) { - return + if (!matchValue(matchHeaderValue, headerValue)) { + return false } + } + return true +} - if (client[kRunning] >= (client[kPipelining] || 1)) { - return - } +function safeUrl (path) { + if (typeof path !== 'string') { + return path + } - const request = client[kQueue][client[kPendingIdx]] + const pathSegments = path.split('?') - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return - } + if (pathSegments.length !== 2) { + return path + } - client[kServerName] = request.servername + const qp = new URLSearchParams(pathSegments.pop()) + qp.sort() + return [...pathSegments, qp.toString()].join('?') +} - if (socket && socket.servername !== request.servername) { - util.destroy(socket, new InformationalError('servername changed')) - return - } - } +function matchKey (mockDispatch, { path, method, body, headers }) { + const pathMatch = matchValue(mockDispatch.path, path) + const methodMatch = matchValue(mockDispatch.method, method) + const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true + const headersMatch = matchHeaders(mockDispatch, headers) + return pathMatch && methodMatch && bodyMatch && headersMatch +} - if (client[kConnecting]) { - return - } +function getResponseData (data) { + if (Buffer.isBuffer(data)) { + return data + } else if (typeof data === 'object') { + return JSON.stringify(data) + } else { + return data.toString() + } +} - if (!socket && !client[kHTTP2Session]) { - connect(client) - return - } +function getMockDispatch (mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path + const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return - } + // Match path + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) + } - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return - } + // Match method + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`) + } - if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { - // Don't dispatch an upgrade until all preceding requests have completed. - // A misbehaving server might upgrade the connection before all pipelined - // request has completed. - return - } + // Match body + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`) + } - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.isAsyncIterable(request.body))) { - // Request with stream or iterator body can error while other requests - // are inflight and indirectly error those as well. - // Ensure this doesn't happen by waiting for inflight - // to complete before dispatching. + // Match headers + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`) + } - // Request with stream or iterator body cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return - } + return matchedMockDispatches[0] +} - if (!request.aborted && write(client, request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) +function addMockDispatch (mockDispatches, key, data) { + const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } + const replyData = typeof data === 'function' ? { callback: data } : { ...data } + const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } + mockDispatches.push(newMockDispatch) + return newMockDispatch +} + +function deleteMockDispatch (mockDispatches, key) { + const index = mockDispatches.findIndex(dispatch => { + if (!dispatch.consumed) { + return false } + return matchKey(dispatch, key) + }) + if (index !== -1) { + mockDispatches.splice(index, 1) } } -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' +function buildKey (opts) { + const { path, method, body, headers, query } = opts + return { + path, + method, + body, + headers, + query + } } -function write (client, request) { - if (client[kHTTPConnVersion] === 'h2') { - writeH2(client, client[kHTTP2Session], request) - return - } +function generateKeyValues (data) { + return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ + ...keyValuePairs, + Buffer.from(`${key}`), + Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`) + ], []) +} - const { body, method, path, host, upgrade, headers, blocking, reset } = request +/** + * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + * @param {number} statusCode + */ +function getStatusText (statusCode) { + return STATUS_CODES[statusCode] || 'unknown' +} - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 +async function getResponse (body) { + const buffers = [] + for await (const data of body) { + buffers.push(data) + } + return Buffer.concat(buffers).toString('utf8') +} - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. +/** + * Mock dispatch function used to simulate undici dispatches + */ +function mockDispatch (opts, handler) { + // Get mock dispatch from built key + const key = buildKey(opts) + const mockDispatch = getMockDispatch(this[kDispatches], key) - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) + mockDispatch.timesInvoked++ - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) + // Here's where we resolve a callback if a callback is present for the dispatch data. + if (mockDispatch.data.callback) { + mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } } - const bodyLength = util.bodyLength(body) + // Parse mockDispatch data + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch + const { timesInvoked, times } = mockDispatch - let contentLength = bodyLength + // If it's used up and not persistent, mark as consumed + mockDispatch.consumed = !persist && timesInvoked >= times + mockDispatch.pending = timesInvoked < times - if (contentLength === null) { - contentLength = request.contentLength + // If specified, trigger dispatch error + if (error !== null) { + deleteMockDispatch(this[kDispatches], key) + handler.onError(error) + return true } - if (contentLength === 0 && !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. - - contentLength = null + // Handle the request with a delay if necessary + if (typeof delay === 'number' && delay > 0) { + setTimeout(() => { + handleReply(this[kDispatches]) + }, delay) + } else { + handleReply(this[kDispatches]) } - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request, new RequestContentLengthMismatchError()) - return false + function handleReply (mockDispatches, _data = data) { + // fetch's HeadersList is a 1D string array + const optsHeaders = Array.isArray(opts.headers) + ? buildHeadersFromArray(opts.headers) + : opts.headers + const body = typeof _data === 'function' + ? _data({ ...opts, headers: optsHeaders }) + : _data + + // util.types.isPromise is likely needed for jest. + if (isPromise(body)) { + // If handleReply is asynchronous, throwing an error + // in the callback will reject the promise, rather than + // synchronously throw the error, which breaks some tests. + // Rather, we wait for the callback to resolve if it is a + // promise, and then re-run handleReply with the new body. + body.then((newData) => handleReply(mockDispatches, newData)) + return } - process.emitWarning(new RequestContentLengthMismatchError()) + const responseData = getResponseData(body) + const responseHeaders = generateKeyValues(headers) + const responseTrailers = generateKeyValues(trailers) + + handler.abort = nop + handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)) + handler.onData(Buffer.from(responseData)) + handler.onComplete(responseTrailers) + deleteMockDispatch(mockDispatches, key) } - const socket = client[kSocket] + function resume () {} - try { - request.onConnect((err) => { - if (request.aborted || request.completed) { - return - } + return true +} - errorRequest(client, request, err || new RequestAbortedError()) +function buildMockDispatch () { + const agent = this[kMockAgent] + const origin = this[kOrigin] + const originalDispatch = this[kOriginalDispatch] - util.destroy(socket, new InformationalError('aborted')) - }) - } catch (err) { - errorRequest(client, request, err) + return function dispatch (opts, handler) { + if (agent.isMockActive) { + try { + mockDispatch.call(this, opts, handler) + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect]() + if (netConnect === false) { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) + } + if (checkNetConnect(netConnect, origin)) { + originalDispatch.call(this, opts, handler) + } else { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) + } + } else { + throw error + } + } + } else { + originalDispatch.call(this, opts, handler) + } } +} - if (request.aborted) { - return false +function checkNetConnect (netConnect, origin) { + const url = new URL(origin) + if (netConnect === true) { + return true + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + return true } + return false +} - if (method === 'HEAD') { - // https://github.com/mcollina/undici/issues/258 - // Close after a HEAD request to interop with misbehaving servers - // that may send a body in the response. - - socket[kReset] = true +function buildMockOptions (opts) { + if (opts) { + const { agent, ...mockOptions } = opts + return mockOptions } +} - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. +module.exports = { + getResponseData, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName +} - socket[kReset] = true - } - if (reset != null) { - socket[kReset] = reset - } +/***/ }), - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } +/***/ 86823: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (blocking) { - socket[kBlocking] = true - } +"use strict"; - let header = `${method} ${path} HTTP/1.1\r\n` - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } +const { Transform } = __nccwpck_require__(12781) +const { Console } = __nccwpck_require__(96206) - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } +/** + * Gets the output of `console.table(…)` as a string. + */ +module.exports = class PendingInterceptorsFormatter { + constructor ({ disableColors } = {}) { + this.transform = new Transform({ + transform (chunk, _enc, cb) { + cb(null, chunk) + } + }) - if (headers) { - header += headers + this.logger = new Console({ + stdout: this.transform, + inspectOptions: { + colors: !disableColors && !process.env.CI + } + }) } - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) + format (pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map( + ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + 'Status code': statusCode, + Persistent: persist ? '✅' : '❌', + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })) + + this.logger.table(withPrettyHeaders) + return this.transform.read().toString() } +} - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - request.onRequestSent() - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(body) - socket.uncork() - request.onBodySent(body) - request.onRequestSent() - if (!expectsPayload) { - socket[kReset] = true - } - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) - } else { - writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }) - } - } else if (util.isStream(body)) { - writeStream({ body, client, request, socket, contentLength, header, expectsPayload }) - } else if (util.isIterable(body)) { - writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }) - } else { - assert(false) - } +/***/ }), - return true -} +/***/ 78891: +/***/ ((module) => { -function writeH2 (client, session, request) { - const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request +"use strict"; - let headers - if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) - else headers = reqHeaders - if (upgrade) { - errorRequest(client, request, new Error('Upgrade not supported for H2')) - return false - } +const singulars = { + pronoun: 'it', + is: 'is', + was: 'was', + this: 'this' +} - try { - // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? - request.onConnect((err) => { - if (request.aborted || request.completed) { - return - } +const plurals = { + pronoun: 'they', + is: 'are', + was: 'were', + this: 'these' +} - errorRequest(client, request, err || new RequestAbortedError()) - }) - } catch (err) { - errorRequest(client, request, err) +module.exports = class Pluralizer { + constructor (singular, plural) { + this.singular = singular + this.plural = plural } - if (request.aborted) { - return false + pluralize (count) { + const one = count === 1 + const keys = one ? singulars : plurals + const noun = one ? this.singular : this.plural + return { ...keys, count, noun } } +} - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - const h2State = client[kHTTP2SessionState] - headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] - headers[HTTP2_HEADER_METHOD] = method +/***/ }), - if (method === 'CONNECT') { - session.ref() - // we are already connected, streams are pending, first request - // will create a new stream. We trigger a request to create the stream and wait until - // `ready` event is triggered - // We disabled endStream to allow the user to write to the stream - stream = session.request(headers, { endStream: false, signal }) +/***/ 68266: +/***/ ((module) => { - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - }) - } +"use strict"; +/* eslint-disable */ - stream.once('close', () => { - h2State.openStreams -= 1 - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) session.unref() - }) - return true - } - // https://tools.ietf.org/html/rfc7540#section-8.3 - // :path and :scheme headers must be omited when sending CONNECT +// Extracted from node/lib/internal/fixed_queue.js - headers[HTTP2_HEADER_PATH] = path - headers[HTTP2_HEADER_SCHEME] = 'https' +// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. +const kSize = 2048; +const kMask = kSize - 1; - // https://tools.ietf.org/html/rfc7231#section-4.3.1 - // https://tools.ietf.org/html/rfc7231#section-4.3.2 - // https://tools.ietf.org/html/rfc7231#section-4.3.5 +// The FixedQueue is implemented as a singly-linked list of fixed-size +// circular buffers. It looks something like this: +// +// head tail +// | | +// v v +// +-----------+ <-----\ +-----------+ <------\ +-----------+ +// | [null] | \----- | next | \------- | next | +// +-----------+ +-----------+ +-----------+ +// | item | <-- bottom | item | <-- bottom | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | bottom --> | item | +// | item | | item | | item | +// | ... | | ... | | ... | +// | item | | item | | item | +// | item | | item | | item | +// | [empty] | <-- top | item | | item | +// | [empty] | | item | | item | +// | [empty] | | [empty] | <-- top top --> | [empty] | +// +-----------+ +-----------+ +-----------+ +// +// Or, if there is only one circular buffer, it looks something +// like either of these: +// +// head tail head tail +// | | | | +// v v v v +// +-----------+ +-----------+ +// | [null] | | [null] | +// +-----------+ +-----------+ +// | [empty] | | item | +// | [empty] | | item | +// | item | <-- bottom top --> | [empty] | +// | item | | [empty] | +// | [empty] | <-- top bottom --> | item | +// | [empty] | | item | +// +-----------+ +-----------+ +// +// Adding a value means moving `top` forward by one, removing means +// moving `bottom` forward by one. After reaching the end, the queue +// wraps around. +// +// When `top === bottom` the current queue is empty and when +// `top + 1 === bottom` it's full. This wastes a single space of storage +// but allows much quicker checks. - // Sending a payload body on a request that does not - // expect it can cause undefined behavior on some - // servers and corrupt connection state. Do not - // re-use the connection for further requests. +class FixedCircularBuffer { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } - const expectsPayload = ( - method === 'PUT' || - method === 'POST' || - method === 'PATCH' - ) + isEmpty() { + return this.top === this.bottom; + } - if (body && typeof body.read === 'function') { - // Try to read EOF in order to get length. - body.read(0) + isFull() { + return ((this.top + 1) & kMask) === this.bottom; } - let contentLength = util.bodyLength(body) + push(data) { + this.list[this.top] = data; + this.top = (this.top + 1) & kMask; + } - if (contentLength == null) { - contentLength = request.contentLength + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === undefined) + return null; + this.list[this.bottom] = undefined; + this.bottom = (this.bottom + 1) & kMask; + return nextItem; } +} - if (contentLength === 0 || !expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD NOT send a Content-Length header field when - // the request message does not contain a payload body and the method - // semantics do not anticipate such a body. +module.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } - contentLength = null + isEmpty() { + return this.head.isEmpty(); } - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request, new RequestContentLengthMismatchError()) - return false + push(data) { + if (this.head.isFull()) { + // Head is full: Creates a new queue, sets the old queue's `.next` to it, + // and sets it as the new main queue. + this.head = this.head.next = new FixedCircularBuffer(); } - - process.emitWarning(new RequestContentLengthMismatchError()) + this.head.push(data); } - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + // If there is another queue, it forms the new tail. + this.tail = tail.next; + } + return next; } +}; - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - // Increment counter as we have new several streams open - ++h2State.openStreams +/***/ }), - stream.once('response', headers => { - const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers +/***/ 73198: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { - stream.pause() - } - }) +"use strict"; - stream.once('end', () => { - request.onComplete([]) - }) - stream.on('data', (chunk) => { - if (request.onData(chunk) === false) { - stream.pause() - } - }) +const DispatcherBase = __nccwpck_require__(74839) +const FixedQueue = __nccwpck_require__(68266) +const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(72785) +const PoolStats = __nccwpck_require__(39689) - stream.once('close', () => { - h2State.openStreams -= 1 - // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) { - session.unref() - } - }) +const kClients = Symbol('clients') +const kNeedDrain = Symbol('needDrain') +const kQueue = Symbol('queue') +const kClosedResolve = Symbol('closed resolve') +const kOnDrain = Symbol('onDrain') +const kOnConnect = Symbol('onConnect') +const kOnDisconnect = Symbol('onDisconnect') +const kOnConnectionError = Symbol('onConnectionError') +const kGetDispatcher = Symbol('get dispatcher') +const kAddClient = Symbol('add client') +const kRemoveClient = Symbol('remove client') +const kStats = Symbol('stats') - stream.once('error', function (err) { - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.destroy(stream, err) - } - }) +class PoolBase extends DispatcherBase { + constructor () { + super() - stream.once('frameError', (type, code) => { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - errorRequest(client, request, err) + this[kQueue] = new FixedQueue() + this[kClients] = [] + this[kQueued] = 0 - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.destroy(stream, err) - } - }) + const pool = this - // stream.on('aborted', () => { - // // TODO(HTTP/2): Support aborted - // }) + this[kOnDrain] = function onDrain (origin, targets) { + const queue = pool[kQueue] - // stream.on('timeout', () => { - // // TODO(HTTP/2): Support timeout - // }) + let needDrain = false - // stream.on('push', headers => { - // // TODO(HTTP/2): Suppor push - // }) + while (!needDrain) { + const item = queue.shift() + if (!item) { + break + } + pool[kQueued]-- + needDrain = !this.dispatch(item.opts, item.handler) + } - // stream.on('trailers', headers => { - // // TODO(HTTP/2): Support trailers - // }) + this[kNeedDrain] = needDrain - return true + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false + pool.emit('drain', origin, [pool, ...targets]) + } - function writeBodyH2 () { - /* istanbul ignore else: assertion */ - if (!body) { - request.onRequestSent() - } else if (util.isBuffer(body)) { - assert(contentLength === body.byteLength, 'buffer body must have content length') - stream.cork() - stream.write(body) - stream.uncork() - stream.end() - request.onBodySent(body) - request.onRequestSent() - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable({ - client, - request, - contentLength, - h2stream: stream, - expectsPayload, - body: body.stream(), - socket: client[kSocket], - header: '' - }) - } else { - writeBlob({ - body, - client, - request, - contentLength, - expectsPayload, - h2stream: stream, - header: '', - socket: client[kSocket] - }) + if (pool[kClosedResolve] && queue.isEmpty()) { + Promise + .all(pool[kClients].map(c => c.close())) + .then(pool[kClosedResolve]) } - } else if (util.isStream(body)) { - writeStream({ - body, - client, - request, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: '' - }) - } else if (util.isIterable(body)) { - writeIterable({ - body, - client, - request, - contentLength, - expectsPayload, - header: '', - h2stream: stream, - socket: client[kSocket] - }) - } else { - assert(false) } - } -} - -function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - if (client[kHTTPConnVersion] === 'h2') { - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(body, err) - util.destroy(h2stream, err) - } else { - request.onRequestSent() - } - } - ) + this[kOnConnect] = (origin, targets) => { + pool.emit('connect', origin, [pool, ...targets]) + } - pipe.on('data', onPipeData) - pipe.once('end', () => { - pipe.removeListener('data', onPipeData) - util.destroy(pipe) - }) + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit('disconnect', origin, [pool, ...targets], err) + } - function onPipeData (chunk) { - request.onBodySent(chunk) + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit('connectionError', origin, [pool, ...targets], err) } - return + this[kStats] = new PoolStats(this) } - let finished = false - - const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) + get [kBusy] () { + return this[kNeedDrain] + } - const onData = function (chunk) { - if (finished) { - return - } + get [kConnected] () { + return this[kClients].filter(client => client[kConnected]).length + } - try { - if (!writer.write(chunk) && this.pause) { - this.pause() - } - } catch (err) { - util.destroy(this, err) - } + get [kFree] () { + return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length } - const onDrain = function () { - if (finished) { - return - } - if (body.resume) { - body.resume() + get [kPending] () { + let ret = this[kQueued] + for (const { [kPending]: pending } of this[kClients]) { + ret += pending } + return ret } - const onAbort = function () { - if (finished) { - return + + get [kRunning] () { + let ret = 0 + for (const { [kRunning]: running } of this[kClients]) { + ret += running } - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) + return ret } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1)) - - socket - .off('drain', onDrain) - .off('error', onFinished) - - body - .removeListener('data', onData) - .removeListener('end', onFinished) - .removeListener('error', onFinished) - .removeListener('close', onAbort) - if (!err) { - try { - writer.end() - } catch (er) { - err = er - } + get [kSize] () { + let ret = this[kQueued] + for (const { [kSize]: size } of this[kClients]) { + ret += size } + return ret + } - writer.destroy(err) + get stats () { + return this[kStats] + } - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) + async [kClose] () { + if (this[kQueue].isEmpty()) { + return Promise.all(this[kClients].map(c => c.close())) } else { - util.destroy(body) + return new Promise((resolve) => { + this[kClosedResolve] = resolve + }) } } - body - .on('data', onData) - .on('end', onFinished) - .on('error', onFinished) - .on('close', onAbort) + async [kDestroy] (err) { + while (true) { + const item = this[kQueue].shift() + if (!item) { + break + } + item.handler.onError(err) + } - if (body.resume) { - body.resume() + return Promise.all(this[kClients].map(c => c.destroy(err))) } - socket - .on('drain', onDrain) - .on('error', onFinished) -} - -async function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength === body.size, 'blob body must have content length') + [kDispatch] (opts, handler) { + const dispatcher = this[kGetDispatcher]() - const isH2 = client[kHTTPConnVersion] === 'h2' - try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError() + if (!dispatcher) { + this[kNeedDrain] = true + this[kQueue].push({ opts, handler }) + this[kQueued]++ + } else if (!dispatcher.dispatch(opts, handler)) { + dispatcher[kNeedDrain] = true + this[kNeedDrain] = !this[kGetDispatcher]() } - const buffer = Buffer.from(await body.arrayBuffer()) + return !this[kNeedDrain] + } - if (isH2) { - h2stream.cork() - h2stream.write(buffer) - h2stream.uncork() - } else { - socket.cork() - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - socket.write(buffer) - socket.uncork() - } + [kAddClient] (client) { + client + .on('drain', this[kOnDrain]) + .on('connect', this[kOnConnect]) + .on('disconnect', this[kOnDisconnect]) + .on('connectionError', this[kOnConnectionError]) - request.onBodySent(buffer) - request.onRequestSent() + this[kClients].push(client) - if (!expectsPayload) { - socket[kReset] = true + if (this[kNeedDrain]) { + process.nextTick(() => { + if (this[kNeedDrain]) { + this[kOnDrain](client[kUrl], [this, client]) + } + }) } - resume(client) - } catch (err) { - util.destroy(isH2 ? h2stream : socket, err) + return this } -} -async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') + [kRemoveClient] (client) { + client.close(() => { + const idx = this[kClients].indexOf(client) + if (idx !== -1) { + this[kClients].splice(idx, 1) + } + }) - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } + this[kNeedDrain] = this[kClients].some(dispatcher => ( + !dispatcher[kNeedDrain] && + dispatcher.closed !== true && + dispatcher.destroyed !== true + )) } +} - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) +module.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher +} - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - if (client[kHTTPConnVersion] === 'h2') { - h2stream - .on('close', onDrain) - .on('drain', onDrain) +/***/ }), - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } +/***/ 39689: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() - } - } - } catch (err) { - h2stream.destroy(err) - } finally { - request.onRequestSent() - h2stream.end() - h2stream - .off('close', onDrain) - .off('drain', onDrain) - } +const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(72785) +const kPool = Symbol('pool') - return +class PoolStats { + constructor (pool) { + this[kPool] = pool } - socket - .on('close', onDrain) - .on('drain', onDrain) - - const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] - } - - if (!writer.write(chunk)) { - await waitForDrain() - } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) + get connected () { + return this[kPool][kConnected] } -} - -class AsyncWriter { - constructor ({ socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header - socket[kWriting] = true + get free () { + return this[kPool][kFree] } - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this + get pending () { + return this[kPool][kPending] + } - if (socket[kError]) { - throw socket[kError] - } + get queued () { + return this[kPool][kQueued] + } - if (socket.destroyed) { - return false - } + get running () { + return this[kPool][kRunning] + } - const len = Buffer.byteLength(chunk) - if (!len) { - return true - } + get size () { + return this[kPool][kSize] + } +} - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } +module.exports = PoolStats - process.emitWarning(new RequestContentLengthMismatchError()) - } - socket.cork() +/***/ }), - if (bytesWritten === 0) { - if (!expectsPayload) { - socket[kReset] = true - } +/***/ 4634: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') - } - } +"use strict"; - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1') - } - this.bytesWritten += len +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher +} = __nccwpck_require__(73198) +const Client = __nccwpck_require__(33598) +const { + InvalidArgumentError +} = __nccwpck_require__(48045) +const util = __nccwpck_require__(83983) +const { kUrl, kInterceptors } = __nccwpck_require__(72785) +const buildConnector = __nccwpck_require__(82067) - const ret = socket.write(chunk) +const kOptions = Symbol('options') +const kConnections = Symbol('connections') +const kFactory = Symbol('factory') - socket.uncork() +function defaultFactory (origin, opts) { + return new Client(origin, opts) +} - request.onBodySent(chunk) +class Pool extends PoolBase { + constructor (origin, { + connections, + factory = defaultFactory, + connect, + connectTimeout, + tls, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + ...options + } = {}) { + super() - if (!ret) { - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } - } + if (connections != null && (!Number.isFinite(connections) || connections < 0)) { + throw new InvalidArgumentError('invalid connections') } - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] + if (typeof factory !== 'function') { + throw new InvalidArgumentError('factory must be a function.') } - if (socket.destroyed) { - return + if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { + throw new InvalidArgumentError('connect must be a function or an object') } - if (bytesWritten === 0) { - if (expectsPayload) { - // https://tools.ietf.org/html/rfc7230#section-3.3.2 - // A user agent SHOULD send a Content-Length in a request message when - // no Transfer-Encoding is sent and the request method defines a meaning - // for an enclosed payload body. - - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - socket.write(`${header}\r\n`, 'latin1') - } - } else if (contentLength === null) { - socket.write('\r\n0\r\n\r\n', 'latin1') + if (typeof connect !== 'function') { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) } - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) - } - } + this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) + ? options.interceptors.Pool + : [] + this[kConnections] = connections || null + this[kUrl] = util.parseOrigin(origin) + this[kOptions] = { ...util.deepClone(options), connect, allowH2 } + this[kOptions].interceptors = options.interceptors + ? { ...options.interceptors } + : undefined + this[kFactory] = factory - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() + this.on('connectionError', (origin, targets, error) => { + // If a connection error occurs, we remove the client from the pool, + // and emit a connectionError event. They will not be re-used. + // Fixes https://github.com/nodejs/undici/issues/3895 + for (const target of targets) { + // Do not use kRemoveClient here, as it will close the client, + // but the client cannot be closed in this state. + const idx = this[kClients].indexOf(target) + if (idx !== -1) { + this[kClients].splice(idx, 1) + } } - } - - resume(client) + }) } - destroy (err) { - const { socket, client } = this + [kGetDispatcher] () { + let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) - socket[kWriting] = false + if (dispatcher) { + return dispatcher + } - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - util.destroy(socket, err) + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + dispatcher = this[kFactory](this[kUrl], this[kOptions]) + this[kAddClient](dispatcher) } - } -} -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) + return dispatcher } } -module.exports = Client +module.exports = Pool /***/ }), -/***/ 56436: +/***/ 97858: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/* istanbul ignore file: only for Node 12 */ - -const { kConnected, kSize } = __nccwpck_require__(72785) +const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(72785) +const { URL } = __nccwpck_require__(57310) +const Agent = __nccwpck_require__(7890) +const Pool = __nccwpck_require__(4634) +const DispatcherBase = __nccwpck_require__(74839) +const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(48045) +const buildConnector = __nccwpck_require__(82067) -class CompatWeakRef { - constructor (value) { - this.value = value - } +const kAgent = Symbol('proxy agent') +const kClient = Symbol('proxy client') +const kProxyHeaders = Symbol('proxy headers') +const kRequestTls = Symbol('request tls settings') +const kProxyTls = Symbol('proxy tls settings') +const kConnectEndpoint = Symbol('connect endpoint function') - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } +function defaultProtocolPort (protocol) { + return protocol === 'https:' ? 443 : 80 } -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer +function buildProxyOptions (opts) { + if (typeof opts === 'string') { + opts = { uri: opts } } - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } + if (!opts || !opts.uri) { + throw new InvalidArgumentError('Proxy opts.uri is mandatory') } -} -module.exports = function () { - // FIXME: remove workaround when the Node bug is fixed - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE) { - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } return { - WeakRef: global.WeakRef || CompatWeakRef, - FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer + uri: opts.uri, + protocol: opts.protocol || 'https' } } +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} -/***/ }), - -/***/ 20663: -/***/ ((module) => { - -"use strict"; +class ProxyAgent extends DispatcherBase { + constructor (opts) { + super(opts) + this[kProxy] = buildProxyOptions(opts) + this[kAgent] = new Agent(opts) + this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) + ? opts.interceptors.ProxyAgent + : [] + if (typeof opts === 'string') { + opts = { uri: opts } + } -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 + if (!opts || !opts.uri) { + throw new InvalidArgumentError('Proxy opts.uri is mandatory') + } -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 + const { clientFactory = defaultFactory } = opts -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} + if (typeof clientFactory !== 'function') { + throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') + } + this[kRequestTls] = opts.requestTls + this[kProxyTls] = opts.proxyTls + this[kProxyHeaders] = opts.headers || {} -/***/ }), + const resolvedUrl = new URL(opts.uri) + const { origin, port, host, username, password } = resolvedUrl -/***/ 41724: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (opts.auth && opts.token) { + throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') + } else if (opts.auth) { + /* @deprecated in favour of opts.token */ + this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` + } else if (opts.token) { + this[kProxyHeaders]['proxy-authorization'] = opts.token + } else if (username && password) { + this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` + } -"use strict"; + const connect = buildConnector({ ...opts.proxyTls }) + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) + this[kClient] = clientFactory(resolvedUrl, { connect }) + this[kAgent] = new Agent({ + ...opts, + connect: async (opts, callback) => { + let requestedHost = opts.host + if (!opts.port) { + requestedHost += `:${defaultProtocolPort(opts.protocol)}` + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedHost, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host + } + }) + if (statusCode !== 200) { + socket.on('error', () => {}).destroy() + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) + } + if (opts.protocol !== 'https:') { + callback(null, socket) + return + } + let servername + if (this[kRequestTls]) { + servername = this[kRequestTls].servername + } else { + servername = opts.servername + } + this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) + } catch (err) { + callback(err) + } + } + }) + } + dispatch (opts, handler) { + const { host } = new URL(opts.origin) + const headers = buildHeaders(opts.headers) + throwIfProxyAuthIsSent(headers) + return this[kAgent].dispatch( + { + ...opts, + headers: { + ...headers, + host + } + }, + handler + ) + } -const { parseSetCookie } = __nccwpck_require__(24408) -const { stringify, getHeadersList } = __nccwpck_require__(43121) -const { webidl } = __nccwpck_require__(21744) -const { Headers } = __nccwpck_require__(10554) + async [kClose] () { + await this[kAgent].close() + await this[kClient].close() + } -/** - * @typedef {Object} Cookie - * @property {string} name - * @property {string} value - * @property {Date|number|undefined} expires - * @property {number|undefined} maxAge - * @property {string|undefined} domain - * @property {string|undefined} path - * @property {boolean|undefined} secure - * @property {boolean|undefined} httpOnly - * @property {'Strict'|'Lax'|'None'} sameSite - * @property {string[]} unparsed - */ + async [kDestroy] () { + await this[kAgent].destroy() + await this[kClient].destroy() + } +} /** - * @param {Headers} headers + * @param {string[] | Record} headers * @returns {Record} */ -function getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' }) - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookie = headers.get('cookie') - const out = {} - - if (!cookie) { - return out - } +function buildHeaders (headers) { + // When using undici.fetch, the headers list is stored + // as an array. + if (Array.isArray(headers)) { + /** @type {Record} */ + const headersPair = {} - for (const piece of cookie.split(';')) { - const [name, ...value] = piece.split('=') + for (let i = 0; i < headers.length; i += 2) { + headersPair[headers[i]] = headers[i + 1] + } - out[name.trim()] = value.join('=') + return headersPair } - return out + return headers } /** - * @param {Headers} headers - * @param {string} name - * @param {{ path?: string, domain?: string }|undefined} attributes - * @returns {void} + * @param {Record} headers + * + * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers + * Nevertheless, it was changed and to avoid a security vulnerability by end users + * this check was created. + * It should be removed in the next major version for performance reasons */ -function deleteCookie (headers, name, attributes) { - webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) +function throwIfProxyAuthIsSent (headers) { + const existProxyAuth = headers && Object.keys(headers) + .find((key) => key.toLowerCase() === 'proxy-authorization') + if (existProxyAuth) { + throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') + } +} - webidl.brandCheck(headers, Headers, { strict: false }) +module.exports = ProxyAgent - name = webidl.converters.DOMString(name) - attributes = webidl.converters.DeleteCookieAttributes(attributes) - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} +/***/ }), -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) +/***/ 29459: +/***/ ((module) => { - webidl.brandCheck(headers, Headers, { strict: false }) +"use strict"; - const cookies = getHeadersList(headers).cookies - if (!cookies) { - return [] - } +let fastNow = Date.now() +let fastNowTimeout - // In older versions of undici, cookies is a list of name:value. - return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) -} +const fastTimers = [] -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) +function onTimeout () { + fastNow = Date.now() - webidl.brandCheck(headers, Headers, { strict: false }) + let len = fastTimers.length + let idx = 0 + while (idx < len) { + const timer = fastTimers[idx] - cookie = webidl.converters.Cookie(cookie) + if (timer.state === 0) { + timer.state = fastNow + timer.delay + } else if (timer.state > 0 && fastNow >= timer.state) { + timer.state = -1 + timer.callback(timer.opaque) + } - const str = stringify(cookie) + if (timer.state === -1) { + timer.state = -2 + if (idx !== len - 1) { + fastTimers[idx] = fastTimers.pop() + } else { + fastTimers.pop() + } + len -= 1 + } else { + idx += 1 + } + } - if (str) { - headers.append('Set-Cookie', stringify(cookie)) + if (fastTimers.length > 0) { + refreshTimeout() } } -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: null +function refreshTimeout () { + if (fastNowTimeout && fastNowTimeout.refresh) { + fastNowTimeout.refresh() + } else { + clearTimeout(fastNowTimeout) + fastNowTimeout = setTimeout(onTimeout, 1e3) + if (fastNowTimeout.unref) { + fastNowTimeout.unref() + } } -]) +} -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) +class Timeout { + constructor (callback, delay, opaque) { + this.callback = callback + this.delay = delay + this.opaque = opaque + + // -2 not in timer list + // -1 in timer list but inactive + // 0 in timer list waiting for time + // > 0 in timer list waiting for time to expire + this.state = -2 + + this.refresh() + } + + refresh () { + if (this.state === -2) { + fastTimers.push(this) + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout() } + } - return new Date(value) - }), - key: 'expires', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: [] + this.state = 0 } -]) + + clear () { + this.state = -1 + } +} module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie + setTimeout (callback, delay, opaque) { + return delay < 1e3 + ? setTimeout(callback, delay, opaque) + : new Timeout(callback, delay, opaque) + }, + clearTimeout (timeout) { + if (timeout instanceof Timeout) { + timeout.clear() + } else { + clearTimeout(timeout) + } + } } /***/ }), -/***/ 24408: +/***/ 35354: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(20663) -const { isCTLExcludingHtab } = __nccwpck_require__(43121) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(685) -const assert = __nccwpck_require__(39491) +const diagnosticsChannel = __nccwpck_require__(67643) +const { uid, states } = __nccwpck_require__(19188) +const { + kReadyState, + kSentClose, + kByteParser, + kReceivedClose +} = __nccwpck_require__(37578) +const { fireEvent, failWebsocketConnection } = __nccwpck_require__(25515) +const { CloseEvent } = __nccwpck_require__(52611) +const { makeRequest } = __nccwpck_require__(48359) +const { fetching } = __nccwpck_require__(74881) +const { Headers } = __nccwpck_require__(10554) +const { getGlobalDispatcher } = __nccwpck_require__(21892) +const { kHeadersList } = __nccwpck_require__(72785) + +const channels = {} +channels.open = diagnosticsChannel.channel('undici:websocket:open') +channels.close = diagnosticsChannel.channel('undici:websocket:close') +channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') + +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} catch { + +} /** - * @description Parses the field-value attributes of a set-cookie header string. - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} header - * @returns if the header is invalid, null will be returned + * @see https://websockets.spec.whatwg.org/#concept-websocket-establish + * @param {URL} url + * @param {string|string[]} protocols + * @param {import('./websocket').WebSocket} ws + * @param {(response: any) => void} onEstablish + * @param {Partial} options */ -function parseSetCookie (header) { - // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F - // character (CTL characters excluding HTAB): Abort these steps and - // ignore the set-cookie-string entirely. - if (isCTLExcludingHtab(header)) { - return null - } +function establishWebSocketConnection (url, protocols, ws, onEstablish, options) { + // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s + // scheme is "ws", and to "https" otherwise. + const requestURL = url - let nameValuePair = '' - let unparsedAttributes = '' - let name = '' - let value = '' + requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - // 2. If the set-cookie-string contains a %x3B (";") character: - if (header.includes(';')) { - // 1. The name-value-pair string consists of the characters up to, - // but not including, the first %x3B (";"), and the unparsed- - // attributes consist of the remainder of the set-cookie-string - // (including the %x3B (";") in question). - const position = { position: 0 } + // 2. Let request be a new request, whose URL is requestURL, client is client, + // service-workers mode is "none", referrer is "no-referrer", mode is + // "websocket", credentials mode is "include", cache mode is "no-store" , + // and redirect mode is "error". + const request = makeRequest({ + urlList: [requestURL], + serviceWorkers: 'none', + referrer: 'no-referrer', + mode: 'websocket', + credentials: 'include', + cache: 'no-store', + redirect: 'error' + }) - nameValuePair = collectASequenceOfCodePointsFast(';', header, position) - unparsedAttributes = header.slice(position.position) - } else { - // Otherwise: + // Note: undici extension, allow setting custom headers. + if (options.headers) { + const headersList = new Headers(options.headers)[kHeadersList] - // 1. The name-value-pair string consists of all the characters - // contained in the set-cookie-string, and the unparsed- - // attributes is the empty string. - nameValuePair = header + request.headersList = headersList } - // 3. If the name-value-pair string lacks a %x3D ("=") character, then - // the name string is empty, and the value string is the value of - // name-value-pair. - if (!nameValuePair.includes('=')) { - value = nameValuePair - } else { - // Otherwise, the name string consists of the characters up to, but - // not including, the first %x3D ("=") character, and the (possibly - // empty) value string consists of the characters after the first - // %x3D ("=") character. - const position = { position: 0 } - name = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } + // 3. Append (`Upgrade`, `websocket`) to request’s header list. + // 4. Append (`Connection`, `Upgrade`) to request’s header list. + // Note: both of these are handled by undici currently. + // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - // 4. Remove any leading or trailing WSP characters from the name - // string and the value string. - name = name.trim() - value = value.trim() + // 5. Let keyValue be a nonce consisting of a randomly selected + // 16-byte value that has been forgiving-base64-encoded and + // isomorphic encoded. + const keyValue = crypto.randomBytes(16).toString('base64') - // 5. If the sum of the lengths of the name string and the value string - // is more than 4096 octets, abort these steps and ignore the set- - // cookie-string entirely. - if (name.length + value.length > maxNameValuePairSize) { - return null - } + // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s + // header list. + request.headersList.append('sec-websocket-key', keyValue) - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} + // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s + // header list. + request.headersList.append('sec-websocket-version', '13') -/** - * Parses the remaining attributes of a set-cookie header - * @see https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4 - * @param {string} unparsedAttributes - * @param {[Object.]={}} cookieAttributeList - */ -function parseUnparsedAttributes (unparsedAttributes, cookieAttributeList = {}) { - // 1. If the unparsed-attributes string is empty, skip the rest of - // these steps. - if (unparsedAttributes.length === 0) { - return cookieAttributeList + // 8. For each protocol in protocols, combine + // (`Sec-WebSocket-Protocol`, protocol) in request’s header + // list. + for (const protocol of protocols) { + request.headersList.append('sec-websocket-protocol', protocol) } - // 2. Discard the first character of the unparsed-attributes (which - // will be a %x3B (";") character). - assert(unparsedAttributes[0] === ';') - unparsedAttributes = unparsedAttributes.slice(1) + // 9. Let permessageDeflate be a user-agent defined + // "permessage-deflate" extension header value. + // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 + // TODO: enable once permessage-deflate is supported + const permessageDeflate = '' // 'permessage-deflate; 15' - let cookieAv = '' + // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to + // request’s header list. + // request.headersList.append('sec-websocket-extensions', permessageDeflate) - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - if (unparsedAttributes.includes(';')) { - // 1. Consume the characters of the unparsed-attributes up to, but - // not including, the first %x3B (";") character. - cookieAv = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - unparsedAttributes = unparsedAttributes.slice(cookieAv.length) - } else { - // Otherwise: + // 11. Fetch request with useParallelQueue set to true, and + // processResponse given response being these steps: + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher ?? getGlobalDispatcher(), + processResponse (response) { + // 1. If response is a network error or its status is not 101, + // fail the WebSocket connection. + if (response.type === 'error' || response.status !== 101) { + failWebsocketConnection(ws, 'Received network error or non-101 status code.') + return + } - // 1. Consume the remainder of the unparsed-attributes. - cookieAv = unparsedAttributes - unparsedAttributes = '' - } + // 2. If protocols is not the empty list and extracting header + // list values given `Sec-WebSocket-Protocol` and response’s + // header list results in null, failure, or the empty byte + // sequence, then fail the WebSocket connection. + if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Server did not respond with sent protocols.') + return + } - // Let the cookie-av string be the characters consumed in this step. + // 3. Follow the requirements stated step 2 to step 6, inclusive, + // of the last set of steps in section 4.1 of The WebSocket + // Protocol to validate response. This either results in fail + // the WebSocket connection or the WebSocket connection is + // established. - let attributeName = '' - let attributeValue = '' + // 2. If the response lacks an |Upgrade| header field or the |Upgrade| + // header field contains a value that is not an ASCII case- + // insensitive match for the value "websocket", the client MUST + // _Fail the WebSocket Connection_. + if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { + failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') + return + } - // 4. If the cookie-av string contains a %x3D ("=") character: - if (cookieAv.includes('=')) { - // 1. The (possibly empty) attribute-name string consists of the - // characters up to, but not including, the first %x3D ("=") - // character, and the (possibly empty) attribute-value string - // consists of the characters after the first %x3D ("=") - // character. - const position = { position: 0 } + // 3. If the response lacks a |Connection| header field or the + // |Connection| header field doesn't contain a token that is an + // ASCII case-insensitive match for the value "Upgrade", the client + // MUST _Fail the WebSocket Connection_. + if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { + failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') + return + } - attributeName = collectASequenceOfCodePointsFast( - '=', - cookieAv, - position - ) - attributeValue = cookieAv.slice(position.position + 1) - } else { - // Otherwise: + // 4. If the response lacks a |Sec-WebSocket-Accept| header field or + // the |Sec-WebSocket-Accept| contains a value other than the + // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- + // Key| (as a string, not base64-decoded) with the string "258EAFA5- + // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and + // trailing whitespace, the client MUST _Fail the WebSocket + // Connection_. + const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') + const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') + if (secWSAccept !== digest) { + failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') + return + } - // 1. The attribute-name string consists of the entire cookie-av - // string, and the attribute-value string is empty. - attributeName = cookieAv - } + // 5. If the response includes a |Sec-WebSocket-Extensions| header + // field and this header field indicates the use of an extension + // that was not present in the client's handshake (the server has + // indicated an extension not requested by the client), the client + // MUST _Fail the WebSocket Connection_. (The parsing of this + // header field to determine which extensions are requested is + // discussed in Section 9.1.) + const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - // 5. Remove any leading or trailing WSP characters from the attribute- - // name string and the attribute-value string. - attributeName = attributeName.trim() - attributeValue = attributeValue.trim() + if (secExtension !== null && secExtension !== permessageDeflate) { + failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') + return + } - // 6. If the attribute-value is longer than 1024 octets, ignore the - // cookie-av string and return to Step 1 of this algorithm. - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } + // 6. If the response includes a |Sec-WebSocket-Protocol| header field + // and this header field indicates the use of a subprotocol that was + // not present in the client's handshake (the server has indicated a + // subprotocol not requested by the client), the client MUST _Fail + // the WebSocket Connection_. + const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - // 7. Process the attribute-name and attribute-value according to the - // requirements in the following subsections. (Notice that - // attributes with unrecognized attribute-names are ignored.) - const attributeNameLowercase = attributeName.toLowerCase() + if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') + return + } - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 - // If the attribute-name case-insensitively matches the string - // "Expires", the user agent MUST process the cookie-av as follows. - if (attributeNameLowercase === 'expires') { - // 1. Let the expiry-time be the result of parsing the attribute-value - // as cookie-date (see Section 5.1.1). - const expiryTime = new Date(attributeValue) + response.socket.on('data', onSocketData) + response.socket.on('close', onSocketClose) + response.socket.on('error', onSocketError) - // 2. If the attribute-value failed to parse as a cookie date, ignore - // the cookie-av. + if (channels.open.hasSubscribers) { + channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }) + } - cookieAttributeList.expires = expiryTime - } else if (attributeNameLowercase === 'max-age') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 - // If the attribute-name case-insensitively matches the string "Max- - // Age", the user agent MUST process the cookie-av as follows. + onEstablish(response) + } + }) - // 1. If the first character of the attribute-value is not a DIGIT or a - // "-" character, ignore the cookie-av. - const charCode = attributeValue.charCodeAt(0) + return controller +} - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } +/** + * @param {Buffer} chunk + */ +function onSocketData (chunk) { + if (!this.ws[kByteParser].write(chunk)) { + this.pause() + } +} - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + */ +function onSocketClose () { + const { ws } = this - // 3. Let delta-seconds be the attribute-value converted to an integer. - const deltaSeconds = Number(attributeValue) + // If the TCP connection was closed after the + // WebSocket closing handshake was completed, the WebSocket connection + // is said to have been closed _cleanly_. + const wasClean = ws[kSentClose] && ws[kReceivedClose] - // 4. Let cookie-age-limit be the maximum age of the cookie (which - // SHOULD be 400 days or less, see Section 4.1.2.2). + let code = 1005 + let reason = '' - // 5. Set delta-seconds to the smaller of its present value and cookie- - // age-limit. - // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) + const result = ws[kByteParser].closingInfo - // 6. If delta-seconds is less than or equal to zero (0), let expiry- - // time be the earliest representable date and time. Otherwise, let - // the expiry-time be the current date and time plus delta-seconds - // seconds. - // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds + if (result) { + code = result.code ?? 1005 + reason = result.reason + } else if (!ws[kSentClose]) { + // If _The WebSocket + // Connection is Closed_ and no Close control frame was received by the + // endpoint (such as could occur if the underlying transport connection + // is lost), _The WebSocket Connection Close Code_ is considered to be + // 1006. + code = 1006 + } - // 7. Append an attribute to the cookie-attribute-list with an - // attribute-name of Max-Age and an attribute-value of expiry-time. - cookieAttributeList.maxAge = deltaSeconds - } else if (attributeNameLowercase === 'domain') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 - // If the attribute-name case-insensitively matches the string "Domain", - // the user agent MUST process the cookie-av as follows. + // 1. Change the ready state to CLOSED (3). + ws[kReadyState] = states.CLOSED - // 1. Let cookie-domain be the attribute-value. - let cookieDomain = attributeValue + // 2. If the user agent was required to fail the WebSocket + // connection, or if the WebSocket connection was closed + // after being flagged as full, fire an event named error + // at the WebSocket object. + // TODO - // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be - // cookie-domain without its leading %x2E ("."). - if (cookieDomain[0] === '.') { - cookieDomain = cookieDomain.slice(1) - } + // 3. Fire an event named close at the WebSocket object, + // using CloseEvent, with the wasClean attribute + // initialized to true if the connection closed cleanly + // and false otherwise, the code attribute initialized to + // the WebSocket connection close code, and the reason + // attribute initialized to the result of applying UTF-8 + // decode without BOM to the WebSocket connection close + // reason. + fireEvent('close', ws, CloseEvent, { + wasClean, code, reason + }) - // 3. Convert the cookie-domain to lower case. - cookieDomain = cookieDomain.toLowerCase() + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: ws, + code, + reason + }) + } +} - // 4. Append an attribute to the cookie-attribute-list with an - // attribute-name of Domain and an attribute-value of cookie-domain. - cookieAttributeList.domain = cookieDomain - } else if (attributeNameLowercase === 'path') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 - // If the attribute-name case-insensitively matches the string "Path", - // the user agent MUST process the cookie-av as follows. +function onSocketError (error) { + const { ws } = this - // 1. If the attribute-value is empty or if the first character of the - // attribute-value is not %x2F ("/"): - let cookiePath = '' - if (attributeValue.length === 0 || attributeValue[0] !== '/') { - // 1. Let cookie-path be the default-path. - cookiePath = '/' - } else { - // Otherwise: + ws[kReadyState] = states.CLOSING - // 1. Let cookie-path be the attribute-value. - cookiePath = attributeValue - } + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(error) + } - // 2. Append an attribute to the cookie-attribute-list with an - // attribute-name of Path and an attribute-value of cookie-path. - cookieAttributeList.path = cookiePath - } else if (attributeNameLowercase === 'secure') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 - // If the attribute-name case-insensitively matches the string "Secure", - // the user agent MUST append an attribute to the cookie-attribute-list - // with an attribute-name of Secure and an empty attribute-value. + this.destroy() +} - cookieAttributeList.secure = true - } else if (attributeNameLowercase === 'httponly') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 - // If the attribute-name case-insensitively matches the string - // "HttpOnly", the user agent MUST append an attribute to the cookie- - // attribute-list with an attribute-name of HttpOnly and an empty - // attribute-value. +module.exports = { + establishWebSocketConnection +} + + +/***/ }), - cookieAttributeList.httpOnly = true - } else if (attributeNameLowercase === 'samesite') { - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 - // If the attribute-name case-insensitively matches the string - // "SameSite", the user agent MUST process the cookie-av as follows: +/***/ 19188: +/***/ ((module) => { - // 1. Let enforcement be "Default". - let enforcement = 'Default' +"use strict"; - const attributeValueLowercase = attributeValue.toLowerCase() - // 2. If cookie-av's attribute-value is a case-insensitive match for - // "None", set enforcement to "None". - if (attributeValueLowercase.includes('none')) { - enforcement = 'None' - } - // 3. If cookie-av's attribute-value is a case-insensitive match for - // "Strict", set enforcement to "Strict". - if (attributeValueLowercase.includes('strict')) { - enforcement = 'Strict' - } +// This is a Globally Unique Identifier unique used +// to validate that the endpoint accepts websocket +// connections. +// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 +const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - // 4. If cookie-av's attribute-value is a case-insensitive match for - // "Lax", set enforcement to "Lax". - if (attributeValueLowercase.includes('lax')) { - enforcement = 'Lax' - } +/** @type {PropertyDescriptor} */ +const staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false +} - // 5. Append an attribute to the cookie-attribute-list with an - // attribute-name of "SameSite" and an attribute-value of - // enforcement. - cookieAttributeList.sameSite = enforcement - } else { - cookieAttributeList.unparsed ??= [] +const states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 +} - cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) - } +const opcodes = { + CONTINUATION: 0x0, + TEXT: 0x1, + BINARY: 0x2, + CLOSE: 0x8, + PING: 0x9, + PONG: 0xA +} - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) +const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 + +const parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 } +const emptyBuffer = Buffer.allocUnsafe(0) + module.exports = { - parseSetCookie, - parseUnparsedAttributes + uid, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer } /***/ }), -/***/ 43121: +/***/ 52611: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const assert = __nccwpck_require__(39491) -const { kHeadersList } = __nccwpck_require__(72785) +const { webidl } = __nccwpck_require__(21744) +const { kEnumerableProperty } = __nccwpck_require__(83983) +const { MessagePort } = __nccwpck_require__(71267) -function isCTLExcludingHtab (value) { - if (value.length === 0) { - return false +/** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ +class MessageEvent extends Event { + #eventInit + + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.MessageEventInit(eventInitDict) + + super(type, eventInitDict) + + this.#eventInit = eventInitDict } - for (const char of value) { - const code = char.charCodeAt(0) + get data () { + webidl.brandCheck(this, MessageEvent) - if ( - (code >= 0x00 || code <= 0x08) || - (code >= 0x0A || code <= 0x1F) || - code === 0x7F - ) { - return false - } + return this.#eventInit.data } -} -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function validateCookieName (name) { - for (const char of name) { - const code = char.charCodeAt(0) + get origin () { + webidl.brandCheck(this, MessageEvent) - if ( - (code <= 0x20 || code > 0x7F) || - char === '(' || - char === ')' || - char === '>' || - char === '<' || - char === '@' || - char === ',' || - char === ';' || - char === ':' || - char === '\\' || - char === '"' || - char === '/' || - char === '[' || - char === ']' || - char === '?' || - char === '=' || - char === '{' || - char === '}' - ) { - throw new Error('Invalid cookie name') - } + return this.#eventInit.origin } -} -/** - cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE ) - cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E - ; US-ASCII characters excluding CTLs, - ; whitespace DQUOTE, comma, semicolon, - ; and backslash - * @param {string} value - */ -function validateCookieValue (value) { - for (const char of value) { - const code = char.charCodeAt(0) + get lastEventId () { + webidl.brandCheck(this, MessageEvent) - if ( - code < 0x21 || // exclude CTLs (0-31) - code === 0x22 || - code === 0x2C || - code === 0x3B || - code === 0x5C || - code > 0x7E // non-ascii - ) { - throw new Error('Invalid header value') - } + return this.#eventInit.lastEventId } -} -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (const char of path) { - const code = char.charCodeAt(0) + get source () { + webidl.brandCheck(this, MessageEvent) - if (code < 0x21 || char === ';') { - throw new Error('Invalid cookie path') + return this.#eventInit.source + } + + get ports () { + webidl.brandCheck(this, MessageEvent) + + if (!Object.isFrozen(this.#eventInit.ports)) { + Object.freeze(this.#eventInit.ports) } + + return this.#eventInit.ports } -} -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function validateCookieDomain (domain) { - if ( - domain.startsWith('-') || - domain.endsWith('.') || - domain.endsWith('-') + initMessageEvent ( + type, + bubbles = false, + cancelable = false, + data = null, + origin = '', + lastEventId = '', + source = null, + ports = [] ) { - throw new Error('Invalid cookie domain') + webidl.brandCheck(this, MessageEvent) + + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' }) + + return new MessageEvent(type, { + bubbles, cancelable, data, origin, lastEventId, source, ports + }) } } /** - * @see https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1 - * @param {number|Date} date - IMF-fixdate = day-name "," SP date1 SP time-of-day SP GMT - ; fixed length/zone/capitalization subset of the format - ; see Section 3.3 of [RFC5322] - - day-name = %x4D.6F.6E ; "Mon", case-sensitive - / %x54.75.65 ; "Tue", case-sensitive - / %x57.65.64 ; "Wed", case-sensitive - / %x54.68.75 ; "Thu", case-sensitive - / %x46.72.69 ; "Fri", case-sensitive - / %x53.61.74 ; "Sat", case-sensitive - / %x53.75.6E ; "Sun", case-sensitive - date1 = day SP month SP year - ; e.g., 02 Jun 1982 + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ +class CloseEvent extends Event { + #eventInit - day = 2DIGIT - month = %x4A.61.6E ; "Jan", case-sensitive - / %x46.65.62 ; "Feb", case-sensitive - / %x4D.61.72 ; "Mar", case-sensitive - / %x41.70.72 ; "Apr", case-sensitive - / %x4D.61.79 ; "May", case-sensitive - / %x4A.75.6E ; "Jun", case-sensitive - / %x4A.75.6C ; "Jul", case-sensitive - / %x41.75.67 ; "Aug", case-sensitive - / %x53.65.70 ; "Sep", case-sensitive - / %x4F.63.74 ; "Oct", case-sensitive - / %x4E.6F.76 ; "Nov", case-sensitive - / %x44.65.63 ; "Dec", case-sensitive - year = 4DIGIT + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) - GMT = %x47.4D.54 ; "GMT", case-sensitive + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) + super(type, eventInitDict) - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function toIMFDate (date) { - if (typeof date === 'number') { - date = new Date(date) + this.#eventInit = eventInitDict } - const days = [ - 'Sun', 'Mon', 'Tue', 'Wed', - 'Thu', 'Fri', 'Sat' - ] + get wasClean () { + webidl.brandCheck(this, CloseEvent) - const months = [ - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' - ] + return this.#eventInit.wasClean + } - const dayName = days[date.getUTCDay()] - const day = date.getUTCDate().toString().padStart(2, '0') - const month = months[date.getUTCMonth()] - const year = date.getUTCFullYear() - const hour = date.getUTCHours().toString().padStart(2, '0') - const minute = date.getUTCMinutes().toString().padStart(2, '0') - const second = date.getUTCSeconds().toString().padStart(2, '0') + get code () { + webidl.brandCheck(this, CloseEvent) - return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT` -} + return this.#eventInit.code + } -/** - max-age-av = "Max-Age=" non-zero-digit *DIGIT - ; In practice, both expires-av and max-age-av - ; are limited to dates representable by the - ; user agent. - * @param {number} maxAge - */ -function validateCookieMaxAge (maxAge) { - if (maxAge < 0) { - throw new Error('Invalid cookie max-age') + get reason () { + webidl.brandCheck(this, CloseEvent) + + return this.#eventInit.reason } } -/** - * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 - * @param {import('./index').Cookie} cookie - */ -function stringify (cookie) { - if (cookie.name.length === 0) { - return null - } +// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface +class ErrorEvent extends Event { + #eventInit - validateCookieName(cookie.name) - validateCookieValue(cookie.value) + constructor (type, eventInitDict) { + webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) - const out = [`${cookie.name}=${cookie.value}`] + super(type, eventInitDict) - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 - // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 - if (cookie.name.startsWith('__Secure-')) { - cookie.secure = true - } + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - if (cookie.name.startsWith('__Host-')) { - cookie.secure = true - cookie.domain = null - cookie.path = '/' + this.#eventInit = eventInitDict } - if (cookie.secure) { - out.push('Secure') - } + get message () { + webidl.brandCheck(this, ErrorEvent) - if (cookie.httpOnly) { - out.push('HttpOnly') + return this.#eventInit.message } - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } + get filename () { + webidl.brandCheck(this, ErrorEvent) - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) + return this.#eventInit.filename } - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) + get lineno () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.lineno } - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${toIMFDate(cookie.expires)}`) + get colno () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.colno } - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`) + get error () { + webidl.brandCheck(this, ErrorEvent) + + return this.#eventInit.error } +} - for (const part of cookie.unparsed) { - if (!part.includes('=')) { - throw new Error('Invalid unparsed') - } +Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: 'MessageEvent', + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty +}) - const [key, ...value] = part.split('=') +Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: 'CloseEvent', + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty +}) - out.push(`${key.trim()}=${value.join('=')}`) - } +Object.defineProperties(ErrorEvent.prototype, { + [Symbol.toStringTag]: { + value: 'ErrorEvent', + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty +}) - return out.join('; ') -} +webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) -let kHeadersListNode +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.MessagePort +) -function getHeadersList (headers) { - if (headers[kHeadersList]) { - return headers[kHeadersList] +const eventInit = [ + { + key: 'bubbles', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'cancelable', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'composed', + converter: webidl.converters.boolean, + defaultValue: false } +] - if (!kHeadersListNode) { - kHeadersListNode = Object.getOwnPropertySymbols(headers).find( - (symbol) => symbol.description === 'headers list' - ) - - assert(kHeadersListNode, 'Headers cannot be parsed') +webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'data', + converter: webidl.converters.any, + defaultValue: null + }, + { + key: 'origin', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lastEventId', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'source', + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: null + }, + { + key: 'ports', + converter: webidl.converters['sequence'], + get defaultValue () { + return [] + } } +]) - const headersList = headers[kHeadersListNode] - assert(headersList) +webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'wasClean', + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: 'code', + converter: webidl.converters['unsigned short'], + defaultValue: 0 + }, + { + key: 'reason', + converter: webidl.converters.USVString, + defaultValue: '' + } +]) - return headersList -} +webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: 'message', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'filename', + converter: webidl.converters.USVString, + defaultValue: '' + }, + { + key: 'lineno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'colno', + converter: webidl.converters['unsigned long'], + defaultValue: 0 + }, + { + key: 'error', + converter: webidl.converters.any + } +]) module.exports = { - isCTLExcludingHtab, - stringify, - getHeadersList + MessageEvent, + CloseEvent, + ErrorEvent } /***/ }), -/***/ 82067: +/***/ 25444: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const net = __nccwpck_require__(41808) -const assert = __nccwpck_require__(39491) -const util = __nccwpck_require__(83983) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(48045) - -let tls // include tls conditionally since it is not always available - -// TODO: session re-use does not wait for the first -// connection to resolve the session and might therefore -// resolve the same servername multiple times even when -// re-use is enabled. - -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } +const { maxUnsigned16Bit } = __nccwpck_require__(19188) - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} catch { - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } +} - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } +class WebsocketFrameSend { + /** + * @param {Buffer|undefined} data + */ + constructor (data) { + this.frameData = data + this.maskKey = crypto.randomBytes(4) } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return - } + createFrame (opcode) { + const bodyLength = this.frameData?.byteLength ?? 0 - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } + /** @type {number} */ + let payloadLength = bodyLength // 0-125 + let offset = 6 - this._sessionCache.set(sessionKey, session) + if (bodyLength > maxUnsigned16Bit) { + offset += 8 // payload length is next 8 bytes + payloadLength = 127 + } else if (bodyLength > 125) { + offset += 2 // payload length is next 2 bytes + payloadLength = 126 } - } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(24404) - } - servername = servername || options.servername || util.getServerName(host) || null + const buffer = Buffer.allocUnsafe(bodyLength + offset) - const sessionKey = servername || hostname - const session = sessionCache.get(sessionKey) || null + // Clear first 2 bytes, everything else is overwritten + buffer[0] = buffer[1] = 0 + buffer[0] |= 0x80 // FIN + buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - assert(sessionKey) + /*! ws. MIT License. Einar Otto Stangvik */ + buffer[offset - 4] = this.maskKey[0] + buffer[offset - 3] = this.maskKey[1] + buffer[offset - 2] = this.maskKey[2] + buffer[offset - 1] = this.maskKey[3] - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - port: port || 443, - host: hostname - }) + buffer[1] = payloadLength - socket - .on('session', function (session) { - // TODO (fix): Can a session become invalid once established? Don't think so? - sessionCache.set(sessionKey, session) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port: port || 80, - host: hostname - }) + if (payloadLength === 126) { + buffer.writeUInt16BE(bodyLength, 2) + } else if (payloadLength === 127) { + // Clear extended payload length + buffer[2] = buffer[3] = 0 + buffer.writeUIntBE(bodyLength, 4, 6) } - // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket - if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : options.keepAliveInitialDelay - socket.setKeepAlive(true, keepAliveInitialDelay) + buffer[1] |= 0x80 // MASK + + // mask body + for (let i = 0; i < bodyLength; i++) { + buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] } - const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) + return buffer + } +} - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - cancelTimeout() +module.exports = { + WebsocketFrameSend +} - if (callback) { - const cb = callback - callback = null - cb(null, this) - } - }) - .on('error', function (err) { - cancelTimeout() - if (callback) { - const cb = callback - callback = null - cb(err) - } - }) +/***/ }), - return socket - } -} +/***/ 11688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function setupTimeout (onConnectTimeout, timeout) { - if (!timeout) { - return () => {} - } +"use strict"; - let s1 = null - let s2 = null - const timeoutId = setTimeout(() => { - // setImmediate is added to make sure that we priotorise socket error events over timeouts - s1 = setImmediate(() => { - if (process.platform === 'win32') { - // Windows needs an extra setImmediate probably due to implementation differences in the socket logic - s2 = setImmediate(() => onConnectTimeout()) - } else { - onConnectTimeout() - } - }) - }, timeout) - return () => { - clearTimeout(timeoutId) - clearImmediate(s1) - clearImmediate(s2) - } -} -function onConnectTimeout (socket) { - util.destroy(socket, new ConnectTimeoutError()) -} +const { Writable } = __nccwpck_require__(12781) +const diagnosticsChannel = __nccwpck_require__(67643) +const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(19188) +const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(37578) +const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(25515) +const { WebsocketFrameSend } = __nccwpck_require__(25444) -module.exports = buildConnector +// This code was influenced by ws released under the MIT license. +// Copyright (c) 2011 Einar Otto Stangvik +// Copyright (c) 2013 Arnout Kazemier and contributors +// Copyright (c) 2016 Luigi Pinca and contributors +const channels = {} +channels.ping = diagnosticsChannel.channel('undici:websocket:ping') +channels.pong = diagnosticsChannel.channel('undici:websocket:pong') -/***/ }), +class ByteParser extends Writable { + #buffers = [] + #byteOffset = 0 -/***/ 48045: -/***/ ((module) => { + #state = parserStates.INFO -"use strict"; + #info = {} + #fragments = [] + constructor (ws) { + super() -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' + this.ws = ws } -} -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ConnectTimeoutError) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } -} + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write (chunk, _, callback) { + this.#buffers.push(chunk) + this.#byteOffset += chunk.length -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, HeadersTimeoutError) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' + this.run(callback) } -} -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, HeadersOverflowError) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } -} + /** + * Runs whenever a new chunk is received. + * Callback is called whenever there are no more chunks buffering, + * or not enough bytes are buffered to parse. + */ + run (callback) { + while (true) { + if (this.#state === parserStates.INFO) { + // If there aren't enough bytes to parse the payload length, etc. + if (this.#byteOffset < 2) { + return callback() + } -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, BodyTimeoutError) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' - } -} + const buffer = this.consume(2) -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - Error.captureStackTrace(this, ResponseStatusCodeError) - this.name = 'ResponseStatusCodeError' - this.message = message || 'Response Status Code Error' - this.code = 'UND_ERR_RESPONSE_STATUS_CODE' - this.body = body - this.status = statusCode - this.statusCode = statusCode - this.headers = headers - } -} + this.#info.fin = (buffer[0] & 0x80) !== 0 + this.#info.opcode = buffer[0] & 0x0F -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InvalidArgumentError) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' - } -} + // If we receive a fragmented message, we use the type of the first + // frame to parse the full message as binary/text, when it's terminated + this.#info.originalOpcode ??= this.#info.opcode -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InvalidReturnValueError) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' - } -} + this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION -class RequestAbortedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, RequestAbortedError) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' - } -} + if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { + // Only text and binary frames can be fragmented + failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') + return + } -class InformationalError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InformationalError) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' - } -} + const payloadLength = buffer[1] & 0x7F -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, RequestContentLengthMismatchError) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' - } -} + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength + this.#state = parserStates.READ_DATA + } else if (payloadLength === 126) { + this.#state = parserStates.PAYLOADLENGTH_16 + } else if (payloadLength === 127) { + this.#state = parserStates.PAYLOADLENGTH_64 + } -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ResponseContentLengthMismatchError) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' - } -} + if (this.#info.fragmented && payloadLength > 125) { + // A fragmented frame can't be fragmented itself + failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') + return + } else if ( + (this.#info.opcode === opcodes.PING || + this.#info.opcode === opcodes.PONG || + this.#info.opcode === opcodes.CLOSE) && + payloadLength > 125 + ) { + // Control frames can have a payload length of 125 bytes MAX + failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') + return + } else if (this.#info.opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') + return + } -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ClientDestroyedError) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' - } -} + const body = this.consume(payloadLength) -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ClientClosedError) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' - } -} + this.#info.closeInfo = this.parseCloseBody(false, body) -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - Error.captureStackTrace(this, SocketError) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket - } -} + if (!this.ws[kSentClose]) { + // If an endpoint receives a Close frame and did not previously send a + // Close frame, the endpoint MUST send a Close frame in response. (When + // sending a Close frame in response, the endpoint typically echos the + // status code it received.) + const body = Buffer.allocUnsafe(2) + body.writeUInt16BE(this.#info.closeInfo.code, 0) + const closeFrame = new WebsocketFrameSend(body) -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, NotSupportedError) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' - } -} + this.ws[kResponse].socket.write( + closeFrame.createFrame(opcodes.CLOSE), + (err) => { + if (!err) { + this.ws[kSentClose] = true + } + } + ) + } -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, NotSupportedError) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' - } -} + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this.ws[kReadyState] = states.CLOSING + this.ws[kReceivedClose] = true + + this.end() + + return + } else if (this.#info.opcode === opcodes.PING) { + // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in + // response, unless it already received a Close frame. + // A Pong frame sent in response to a Ping frame must have identical + // "Application data" + + const body = this.consume(payloadLength) -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - Error.captureStackTrace(this, HTTPParserError) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined - } -} + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body) -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ResponseExceededMaxSizeError) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' - } -} + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - Error.captureStackTrace(this, RequestRetryError) - this.name = 'RequestRetryError' - this.message = message || 'Request retry error' - this.code = 'UND_ERR_REQ_RETRY' - this.statusCode = code - this.data = data - this.headers = headers - } -} + if (channels.ping.hasSubscribers) { + channels.ping.publish({ + payload: body + }) + } + } -module.exports = { - HTTPParserError, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError -} + this.#state = parserStates.INFO + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } else if (this.#info.opcode === opcodes.PONG) { + // A Pong frame MAY be sent unsolicited. This serves as a + // unidirectional heartbeat. A response to an unsolicited Pong frame is + // not expected. -/***/ }), + const body = this.consume(payloadLength) -/***/ 62905: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body + }) + } -"use strict"; + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) { + return callback() + } + const buffer = this.consume(2) -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(48045) -const assert = __nccwpck_require__(39491) -const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(72785) -const util = __nccwpck_require__(83983) + this.#info.payloadLength = buffer.readUInt16BE(0) + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) { + return callback() + } -// tokenRegExp and headerCharRegex have been lifted from -// https://github.com/nodejs/node/blob/main/lib/_http_common.js + const buffer = this.consume(8) + const upper = buffer.readUInt32BE(0) -/** - * Verifies that the given val is a valid HTTP token - * per the rules defined in RFC 7230 - * See https://tools.ietf.org/html/rfc7230#section-3.2.6 - */ -const tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/ + // 2^31 is the maxinimum bytes an arraybuffer can contain + // on 32-bit systems. Although, on 64-bit systems, this is + // 2^53-1 bytes. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') + return + } -/** - * Matches if val contains an invalid field-vchar - * field-value = *( field-content / obs-fold ) - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - */ -const headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ + const lower = buffer.readUInt32BE(4) -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ + this.#info.payloadLength = (upper << 8) + lower + this.#state = parserStates.READ_DATA + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) { + // If there is still more data in this chunk that needs to be read + return callback() + } else if (this.#byteOffset >= this.#info.payloadLength) { + // If the server sent multiple frames in a single chunk -const kHandler = Symbol('handler') + const body = this.consume(this.#info.payloadLength) -const channels = {} + this.#fragments.push(body) -let extractBody + // If the frame is unfragmented, or a fragmented frame was terminated, + // a message was received + if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) { + const fullMessage = Buffer.concat(this.#fragments) -try { - const diagnosticsChannel = __nccwpck_require__(67643) - channels.create = diagnosticsChannel.channel('undici:request:create') - channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') - channels.headers = diagnosticsChannel.channel('undici:request:headers') - channels.trailers = diagnosticsChannel.channel('undici:request:trailers') - channels.error = diagnosticsChannel.channel('undici:request:error') -} catch { - channels.create = { hasSubscribers: false } - channels.bodySent = { hasSubscribers: false } - channels.headers = { hasSubscribers: false } - channels.trailers = { hasSubscribers: false } - channels.error = { hasSubscribers: false } -} + websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage) -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.exec(path) !== null) { - throw new InvalidArgumentError('invalid request path') - } + this.#info = {} + this.#fragments.length = 0 + } - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (tokenRegExp.exec(method) === null) { - throw new InvalidArgumentError('invalid request method') - } + this.#state = parserStates.INFO + } + } - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') + if (this.#byteOffset > 0) { + continue + } else { + callback() + break + } } + } - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer|null} + */ + consume (n) { + if (n > this.#byteOffset) { + return null + } else if (n === 0) { + return emptyBuffer } - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') + if (this.#buffers[0].length === n) { + this.#byteOffset -= this.#buffers[0].length + return this.#buffers.shift() } - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') - } + const buffer = Buffer.allocUnsafe(n) + let offset = 0 - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') + while (offset !== n) { + const next = this.#buffers[0] + const { length } = next + + if (length + offset === n) { + buffer.set(this.#buffers.shift(), offset) + break + } else if (length + offset > n) { + buffer.set(next.subarray(0, n - offset), offset) + this.#buffers[0] = next.subarray(n - offset) + break + } else { + buffer.set(this.#buffers.shift(), offset) + offset += next.length + } } - this.headersTimeout = headersTimeout + this.#byteOffset -= n - this.bodyTimeout = bodyTimeout + return buffer + } - this.throwOnError = throwOnError === true + parseCloseBody (onlyCode, data) { + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + /** @type {number|undefined} */ + let code - this.method = method + if (data.length >= 2) { + // _The WebSocket Connection Close Code_ is + // defined as the status code (Section 7.4) contained in the first Close + // control frame received by the application + code = data.readUInt16BE(0) + } - this.abort = null + if (onlyCode) { + if (!isValidStatusCode(code)) { + return null + } - if (body == null) { - this.body = null - } else if (util.isStream(body)) { - this.body = body + return { code } + } - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - util.destroy(this) - } - this.body.on('end', this.endHandler) - } + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 + /** @type {Buffer} */ + let reason = data.subarray(2) - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (util.isBuffer(body)) { - this.body = body.byteLength ? body : null - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null - } else if (typeof body === 'string') { - this.body = body.length ? Buffer.from(body) : null - } else if (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { - this.body = body - } else { - throw new InvalidArgumentError('body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable') + // Remove BOM + if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { + reason = reason.subarray(3) } - this.completed = false + if (code !== undefined && !isValidStatusCode(code)) { + return null + } - this.aborted = false + try { + // TODO: optimize this + reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) + } catch { + return null + } - this.upgrade = upgrade || null + return { code, reason } + } - this.path = query ? util.buildURL(path, query) : path + get closingInfo () { + return this.#info.closeInfo + } +} - this.origin = origin +module.exports = { + ByteParser +} - this.idempotent = idempotent == null - ? method === 'HEAD' || method === 'GET' - : idempotent - this.blocking = blocking == null ? false : blocking +/***/ }), - this.reset = reset == null ? null : reset +/***/ 37578: +/***/ ((module) => { - this.host = null +"use strict"; - this.contentLength = null - this.contentType = null +module.exports = { + kWebSocketURL: Symbol('url'), + kReadyState: Symbol('ready state'), + kController: Symbol('controller'), + kResponse: Symbol('response'), + kBinaryType: Symbol('binary type'), + kSentClose: Symbol('sent close'), + kReceivedClose: Symbol('received close'), + kByteParser: Symbol('byte parser') +} - this.headers = '' - // Only for H2 - this.expectContinue = expectContinue != null ? expectContinue : false +/***/ }), - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) - } - } else if (headers && typeof headers === 'object') { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - processHeader(this, key, headers[key]) - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } +/***/ 25515: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (util.isFormDataLike(this.body)) { - if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { - throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') - } +"use strict"; - if (!extractBody) { - extractBody = (__nccwpck_require__(41472).extractBody) - } - const [bodyStream, contentType] = extractBody(body) - if (this.contentType == null) { - this.contentType = contentType - this.headers += `content-type: ${contentType}\r\n` - } - this.body = bodyStream.stream - this.contentLength = bodyStream.length - } else if (util.isBlobLike(body) && this.contentType == null && body.type) { - this.contentType = body.type - this.headers += `content-type: ${body.type}\r\n` - } +const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(37578) +const { states, opcodes } = __nccwpck_require__(19188) +const { MessageEvent, ErrorEvent } = __nccwpck_require__(52611) - util.validateHandler(handler, method, upgrade) +/* globals Blob */ - this.servername = util.getServerName(this.host) +/** + * @param {import('./websocket').WebSocket} ws + */ +function isEstablished (ws) { + // If the server's response is validated as provided for above, it is + // said that _The WebSocket Connection is Established_ and that the + // WebSocket Connection is in the OPEN state. + return ws[kReadyState] === states.OPEN +} - this[kHandler] = handler +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosing (ws) { + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + return ws[kReadyState] === states.CLOSING +} - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) - } - } +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosed (ws) { + return ws[kReadyState] === states.CLOSED +} - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } - } - } +/** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {EventInit | undefined} eventInitDict + */ +function fireEvent (e, target, eventConstructor = Event, eventInitDict) { + // 1. If eventConstructor is not given, then let eventConstructor be Event. - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) - } + // 2. Let event be the result of creating an event given eventConstructor, + // in the relevant realm of target. + // 3. Initialize event’s type attribute to e. + const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent() - } catch (err) { - this.abort(err) - } - } + // 4. Initialize any other IDL attributes of event as described in the + // invocation of this algorithm. + + // 5. Return the result of dispatching event at target, with legacy target + // override flag set if set. + target.dispatchEvent(event) +} + +/** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + * @param {import('./websocket').WebSocket} ws + * @param {number} type Opcode + * @param {Buffer} data application data + */ +function websocketMessageReceived (ws, type, data) { + // 1. If ready state is not OPEN (1), then return. + if (ws[kReadyState] !== states.OPEN) { + return } - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) + // 2. Let dataForEvent be determined by switching on type and binary type: + let dataForEvent - if (this.error) { - abort(this.error) + if (type === opcodes.TEXT) { + // -> type indicates that the data is Text + // a new DOMString containing data + try { + dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data) + } catch { + failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') + return + } + } else if (type === opcodes.BINARY) { + if (ws[kBinaryType] === 'blob') { + // -> type indicates that the data is Binary and binary type is "blob" + // a new Blob object, created in the relevant Realm of the WebSocket + // object, that represents data as its raw data + dataForEvent = new Blob([data]) } else { - this.abort = abort - return this[kHandler].onConnect(abort) + // -> type indicates that the data is Binary and binary type is "arraybuffer" + // a new ArrayBuffer object, created in the relevant Realm of the + // WebSocket object, whose contents are data + dataForEvent = new Uint8Array(data).buffer } } - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) - } + // 3. Fire an event named message at the WebSocket object, using MessageEvent, + // with the origin attribute initialized to the serialization of the WebSocket + // object’s url's origin, and the data attribute initialized to dataForEvent. + fireEvent('message', ws, MessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }) +} - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) - } +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455 + * @see https://datatracker.ietf.org/doc/html/rfc2616 + * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 + * @param {string} protocol + */ +function isValidSubprotocol (protocol) { + // If present, this value indicates one + // or more comma-separated subprotocol the client wishes to speak, + // ordered by preference. The elements that comprise this value + // MUST be non-empty strings with characters in the range U+0021 to + // U+007E not including separator characters as defined in + // [RFC2616] and MUST all be unique strings. + if (protocol.length === 0) { + return false } - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) + for (const char of protocol) { + const code = char.charCodeAt(0) - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) + if ( + code < 0x21 || + code > 0x7E || + char === '(' || + char === ')' || + char === '<' || + char === '>' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' || + code === 32 || // SP + code === 9 // HT + ) { return false } } - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) + return true +} - return this[kHandler].onUpgrade(statusCode, headers, socket) +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ +function isValidStatusCode (code) { + if (code >= 1000 && code < 1015) { + return ( + code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006 // "MUST NOT be set as a status code" + ) } - onComplete (trailers) { - this.onFinally() + return code >= 3000 && code <= 4999 +} - assert(!this.aborted) +/** + * @param {import('./websocket').WebSocket} ws + * @param {string|undefined} reason + */ +function failWebsocketConnection (ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) - } + controller.abort() - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) - } + if (response?.socket && !response.socket.destroyed) { + response.socket.destroy() } - onError (error) { - this.onFinally() + if (reason) { + fireEvent('error', ws, ErrorEvent, { + error: new Error(reason) + }) + } +} - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) - } +module.exports = { + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived +} - if (this.aborted) { - return - } - this.aborted = true - return this[kHandler].onError(error) +/***/ }), + +/***/ 54284: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const { webidl } = __nccwpck_require__(21744) +const { DOMException } = __nccwpck_require__(41037) +const { URLSerializer } = __nccwpck_require__(685) +const { getGlobalOrigin } = __nccwpck_require__(71246) +const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(19188) +const { + kWebSocketURL, + kReadyState, + kController, + kBinaryType, + kResponse, + kSentClose, + kByteParser +} = __nccwpck_require__(37578) +const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(25515) +const { establishWebSocketConnection } = __nccwpck_require__(35354) +const { WebsocketFrameSend } = __nccwpck_require__(25444) +const { ByteParser } = __nccwpck_require__(11688) +const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(83983) +const { getGlobalDispatcher } = __nccwpck_require__(21892) +const { types } = __nccwpck_require__(73837) + +let experimentalWarned = false + +// https://websockets.spec.whatwg.org/#interface-definition +class WebSocket extends EventTarget { + #events = { + open: null, + error: null, + close: null, + message: null } - onFinally () { - if (this.errorHandler) { - this.body.off('error', this.errorHandler) - this.errorHandler = null - } + #bufferedAmount = 0 + #protocol = '' + #extensions = '' - if (this.endHandler) { - this.body.off('end', this.endHandler) - this.endHandler = null + /** + * @param {string} url + * @param {string|string[]} protocols + */ + constructor (url, protocols = []) { + super() + + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' }) + + if (!experimentalWarned) { + experimentalWarned = true + process.emitWarning('WebSockets are experimental, expect them to change at any time.', { + code: 'UNDICI-WS' + }) } - } - // TODO: adjust to support H2 - addHeader (key, value) { - processHeader(this, key, value) - return this - } + const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols) - static [kHTTP1BuildRequest] (origin, opts, handler) { - // TODO: Migrate header parsing here, to make Requests - // HTTP agnostic - return new Request(origin, opts, handler) - } + url = webidl.converters.USVString(url) + protocols = options.protocols - static [kHTTP2BuildRequest] (origin, opts, handler) { - const headers = opts.headers - opts = { ...opts, headers: null } + // 1. Let baseURL be this's relevant settings object's API base URL. + const baseURL = getGlobalOrigin() - const request = new Request(origin, opts, handler) + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. + let urlRecord - request.headers = {} + try { + urlRecord = new URL(url, baseURL) + } catch (e) { + // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, 'SyntaxError') + } - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(request, headers[i], headers[i + 1], true) - } - } else if (headers && typeof headers === 'object') { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - processHeader(request, key, headers[key], true) - } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') + // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". + if (urlRecord.protocol === 'http:') { + urlRecord.protocol = 'ws:' + } else if (urlRecord.protocol === 'https:') { + // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". + urlRecord.protocol = 'wss:' } - return request - } + // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. + if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { + throw new DOMException( + `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, + 'SyntaxError' + ) + } - static [kHTTP2CopyHeaders] (raw) { - const rawHeaders = raw.split('\r\n') - const headers = {} + // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" + // DOMException. + if (urlRecord.hash || urlRecord.href.endsWith('#')) { + throw new DOMException('Got fragment', 'SyntaxError') + } - for (const header of rawHeaders) { - const [key, value] = header.split(': ') + // 8. If protocols is a string, set protocols to a sequence consisting + // of just that string. + if (typeof protocols === 'string') { + protocols = [protocols] + } - if (value == null || value.length === 0) continue + // 9. If any of the values in protocols occur more than once or otherwise + // fail to match the requirements for elements that comprise the value + // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket + // protocol, then throw a "SyntaxError" DOMException. + if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + } - if (headers[key]) headers[key] += `,${value}` - else headers[key] = value + if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { + throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') } - return headers - } -} + // 10. Set this's url to urlRecord. + this[kWebSocketURL] = new URL(urlRecord.href) -function processHeaderValue (key, val, skipAppend) { - if (val && typeof val === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } + // 11. Let client be this's relevant settings object. - val = val != null ? `${val}` : '' + // 12. Run this step in parallel: - if (headerCharRegex.exec(val) !== null) { - throw new InvalidArgumentError(`invalid ${key} header`) - } + // 1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this[kController] = establishWebSocketConnection( + urlRecord, + protocols, + this, + (response) => this.#onConnectionEstablished(response), + options + ) - return skipAppend ? val : `${key}: ${val}\r\n` -} + // Each WebSocket object has an associated ready state, which is a + // number representing the state of the connection. Initially it must + // be CONNECTING (0). + this[kReadyState] = WebSocket.CONNECTING -function processHeader (request, key, val, skipAppend = false) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return + // The extensions attribute must initially return the empty string. + + // The protocol attribute must initially return the empty string. + + // Each WebSocket object has an associated binary type, which is a + // BinaryType. Initially it must be "blob". + this[kBinaryType] = 'blob' } - if ( - request.host === null && - key.length === 4 && - key.toLowerCase() === 'host' - ) { - if (headerCharRegex.exec(val) !== null) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - // Consumed by Client - request.host = val - } else if ( - request.contentLength === null && - key.length === 14 && - key.toLowerCase() === 'content-length' - ) { - request.contentLength = parseInt(val, 10) - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError('invalid content-length header') + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close (code = undefined, reason = undefined) { + webidl.brandCheck(this, WebSocket) + + if (code !== undefined) { + code = webidl.converters['unsigned short'](code, { clamp: true }) } - } else if ( - request.contentType === null && - key.length === 12 && - key.toLowerCase() === 'content-type' - ) { - request.contentType = val - if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) - else request.headers += processHeaderValue(key, val) - } else if ( - key.length === 17 && - key.toLowerCase() === 'transfer-encoding' - ) { - throw new InvalidArgumentError('invalid transfer-encoding header') - } else if ( - key.length === 10 && - key.toLowerCase() === 'connection' - ) { - const value = typeof val === 'string' ? val.toLowerCase() : null - if (value !== 'close' && value !== 'keep-alive') { - throw new InvalidArgumentError('invalid connection header') - } else if (value === 'close') { - request.reset = true + + if (reason !== undefined) { + reason = webidl.converters.USVString(reason) } - } else if ( - key.length === 10 && - key.toLowerCase() === 'keep-alive' - ) { - throw new InvalidArgumentError('invalid keep-alive header') - } else if ( - key.length === 7 && - key.toLowerCase() === 'upgrade' - ) { - throw new InvalidArgumentError('invalid upgrade header') - } else if ( - key.length === 6 && - key.toLowerCase() === 'expect' - ) { - throw new NotSupportedError('expect header not supported') - } else if (tokenRegExp.exec(key) === null) { - throw new InvalidArgumentError('invalid header key') - } else { - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (skipAppend) { - if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` - else request.headers[key] = processHeaderValue(key, val[i], skipAppend) - } else { - request.headers += processHeaderValue(key, val[i]) - } + + // 1. If code is present, but is neither an integer equal to 1000 nor an + // integer in the range 3000 to 4999, inclusive, throw an + // "InvalidAccessError" DOMException. + if (code !== undefined) { + if (code !== 1000 && (code < 3000 || code > 4999)) { + throw new DOMException('invalid code', 'InvalidAccessError') } - } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) - else request.headers += processHeaderValue(key, val) } - } -} - -module.exports = Request + let reasonByteLength = 0 -/***/ }), + // 2. If reason is present, then run these substeps: + if (reason !== undefined) { + // 1. Let reasonBytes be the result of encoding reason. + // 2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + reasonByteLength = Buffer.byteLength(reason) -/***/ 72785: -/***/ ((module) => { + if (reasonByteLength > 123) { + throw new DOMException( + `Reason must be less than 123 bytes; received ${reasonByteLength}`, + 'SyntaxError' + ) + } + } -module.exports = { - kClose: Symbol('close'), - kDestroy: Symbol('destroy'), - kDispatch: Symbol('dispatch'), - kUrl: Symbol('url'), - kWriting: Symbol('writing'), - kResuming: Symbol('resuming'), - kQueue: Symbol('queue'), - kConnect: Symbol('connect'), - kConnecting: Symbol('connecting'), - kHeadersList: Symbol('headers list'), - kKeepAliveDefaultTimeout: Symbol('default keep alive timeout'), - kKeepAliveMaxTimeout: Symbol('max keep alive timeout'), - kKeepAliveTimeoutThreshold: Symbol('keep alive timeout threshold'), - kKeepAliveTimeoutValue: Symbol('keep alive timeout'), - kKeepAlive: Symbol('keep alive'), - kHeadersTimeout: Symbol('headers timeout'), - kBodyTimeout: Symbol('body timeout'), - kServerName: Symbol('server name'), - kLocalAddress: Symbol('local address'), - kHost: Symbol('host'), - kNoRef: Symbol('no ref'), - kBodyUsed: Symbol('used'), - kRunning: Symbol('running'), - kBlocking: Symbol('blocking'), - kPending: Symbol('pending'), - kSize: Symbol('size'), - kBusy: Symbol('busy'), - kQueued: Symbol('queued'), - kFree: Symbol('free'), - kConnected: Symbol('connected'), - kClosed: Symbol('closed'), - kNeedDrain: Symbol('need drain'), - kReset: Symbol('reset'), - kDestroyed: Symbol.for('nodejs.stream.destroyed'), - kMaxHeadersSize: Symbol('max headers size'), - kRunningIdx: Symbol('running index'), - kPendingIdx: Symbol('pending index'), - kError: Symbol('error'), - kClients: Symbol('clients'), - kClient: Symbol('client'), - kParser: Symbol('parser'), - kOnDestroyed: Symbol('destroy callbacks'), - kPipelining: Symbol('pipelining'), - kSocket: Symbol('socket'), - kHostHeader: Symbol('host header'), - kConnector: Symbol('connector'), - kStrictContentLength: Symbol('strict content length'), - kMaxRedirections: Symbol('maxRedirections'), - kMaxRequests: Symbol('maxRequestsPerClient'), - kProxy: Symbol('proxy agent options'), - kCounter: Symbol('socket request counter'), - kInterceptors: Symbol('dispatch interceptors'), - kMaxResponseSize: Symbol('max response size'), - kHTTP2Session: Symbol('http2Session'), - kHTTP2SessionState: Symbol('http2Session state'), - kHTTP2BuildRequest: Symbol('http2 build request'), - kHTTP1BuildRequest: Symbol('http1 build request'), - kHTTP2CopyHeaders: Symbol('http2 copy headers'), - kHTTPConnVersion: Symbol('http connection version'), - kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), - kConstruct: Symbol('constructable') -} + // 3. Run the first matching steps from the following list: + if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { + // If this's ready state is CLOSING (2) or CLOSED (3) + // Do nothing. + } else if (!isEstablished(this)) { + // If the WebSocket connection is not yet established + // Fail the WebSocket connection and set this's ready state + // to CLOSING (2). + failWebsocketConnection(this, 'Connection was closed before it was established.') + this[kReadyState] = WebSocket.CLOSING + } else if (!isClosing(this)) { + // If the WebSocket closing handshake has not yet been started + // Start the WebSocket closing handshake and set this's ready + // state to CLOSING (2). + // - If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // - If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + // - If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + const frame = new WebsocketFrameSend() -/***/ }), + // If neither code nor reason is present, the WebSocket Close + // message must not have a body. -/***/ 83983: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + if (code !== undefined && reason === undefined) { + frame.frameData = Buffer.allocUnsafe(2) + frame.frameData.writeUInt16BE(code, 0) + } else if (code !== undefined && reason !== undefined) { + // If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) + frame.frameData.writeUInt16BE(code, 0) + // the body MAY contain UTF-8-encoded data with value /reason/ + frame.frameData.write(reason, 2, 'utf-8') + } else { + frame.frameData = emptyBuffer + } -"use strict"; + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket + socket.write(frame.createFrame(opcodes.CLOSE), (err) => { + if (!err) { + this[kSentClose] = true + } + }) -const assert = __nccwpck_require__(39491) -const { kDestroyed, kBodyUsed } = __nccwpck_require__(72785) -const { IncomingMessage } = __nccwpck_require__(13685) -const stream = __nccwpck_require__(12781) -const net = __nccwpck_require__(41808) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { Blob } = __nccwpck_require__(14300) -const nodeUtil = __nccwpck_require__(73837) -const { stringify } = __nccwpck_require__(63477) + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this[kReadyState] = states.CLOSING + } else { + // Otherwise + // Set this's ready state to CLOSING (2). + this[kReadyState] = WebSocket.CLOSING + } + } -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send (data) { + webidl.brandCheck(this, WebSocket) -function nop () {} + webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' }) -function isStream (obj) { - return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' -} + data = webidl.converters.WebSocketSendData(data) -// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) -function isBlobLike (object) { - return (Blob && object instanceof Blob) || ( - object && - typeof object === 'object' && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - /^(Blob|File)$/.test(object[Symbol.toStringTag]) - ) -} + // 1. If this's ready state is CONNECTING, then throw an + // "InvalidStateError" DOMException. + if (this[kReadyState] === WebSocket.CONNECTING) { + throw new DOMException('Sent before connected.', 'InvalidStateError') + } -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } + // 2. Run the appropriate set of steps from the following list: + // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 + // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - const stringified = stringify(queryParams) + if (!isEstablished(this) || isClosing(this)) { + return + } - if (stringified) { - url += '?' + stringified - } + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket - return url -} + // If data is a string + if (typeof data === 'string') { + // If the WebSocket connection is established and the WebSocket + // closing handshake has not yet started, then the user agent + // must send a WebSocket Message comprised of the data argument + // using a text frame opcode; if the data cannot be sent, e.g. + // because it would need to be buffered but the buffer is full, + // the user agent must flag the WebSocket as full and then close + // the WebSocket connection. Any invocation of this method with a + // string argument that does not throw an exception must increase + // the bufferedAmount attribute by the number of bytes needed to + // express the argument as UTF-8. -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.TEXT) - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (types.isArrayBuffer(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need + // to be buffered but the buffer is full, the user agent must flag + // the WebSocket as full and then close the WebSocket connection. + // The data to be sent is the data stored in the buffer described + // by the ArrayBuffer object. Any invocation of this method with an + // ArrayBuffer argument that does not throw an exception must + // increase the bufferedAmount attribute by the length of the + // ArrayBuffer in bytes. - return url - } + const value = Buffer.from(data) + const frame = new WebsocketFrameSend(value) + const buffer = frame.createFrame(opcodes.BINARY) - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + } else if (ArrayBuffer.isView(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The + // data to be sent is the data stored in the section of the buffer + // described by the ArrayBuffer object that data references. Any + // invocation of this method with this kind of argument that does + // not throw an exception must increase the bufferedAmount attribute + // by the length of data’s buffer in bytes. - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') - } + const ab = Buffer.from(data, data.byteOffset, data.byteLength) - if (!(url instanceof URL)) { - if (url.port != null && url.port !== '' && !Number.isFinite(parseInt(url.port))) { - throw new InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') - } + const frame = new WebsocketFrameSend(ab) + const buffer = frame.createFrame(opcodes.BINARY) - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') - } + this.#bufferedAmount += ab.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= ab.byteLength + }) + } else if (isBlobLike(data)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The data + // to be sent is the raw data represented by the Blob object. Any + // invocation of this method with a Blob argument that does not throw + // an exception must increase the bufferedAmount attribute by the size + // of the Blob object’s raw data, in bytes. - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') - } + const frame = new WebsocketFrameSend() - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') - } + data.arrayBuffer().then((ab) => { + const value = Buffer.from(ab) + frame.frameData = value + const buffer = frame.createFrame(opcodes.BINARY) - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') + this.#bufferedAmount += value.byteLength + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength + }) + }) } + } - const port = url.port != null - ? url.port - : (url.protocol === 'https:' ? 443 : 80) - let origin = url.origin != null - ? url.origin - : `${url.protocol}//${url.hostname}:${port}` - let path = url.path != null - ? url.path - : `${url.pathname || ''}${url.search || ''}` - - if (origin.endsWith('/')) { - origin = origin.substring(0, origin.length - 1) - } + get readyState () { + webidl.brandCheck(this, WebSocket) - if (path && !path.startsWith('/')) { - path = `/${path}` - } - // new URL(path, origin) is unsafe when `path` contains an absolute URL - // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: - // If first parameter is a relative URL, second param is required, and will be used as the base URL. - // If first parameter is an absolute URL, a given second param will be ignored. - url = new URL(origin + path) + // The readyState getter steps are to return this's ready state. + return this[kReadyState] } - return url -} - -function parseOrigin (url) { - url = parseURL(url) + get bufferedAmount () { + webidl.brandCheck(this, WebSocket) - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') + return this.#bufferedAmount } - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') + get url () { + webidl.brandCheck(this, WebSocket) - assert(idx !== -1) - return host.substring(1, idx) + // The url getter steps are to return this's url, serialized. + return URLSerializer(this[kWebSocketURL]) } - const idx = host.indexOf(':') - if (idx === -1) return host - - return host.substring(0, idx) -} + get extensions () { + webidl.brandCheck(this, WebSocket) -// IP addresses are not valid server names per RFC6066 -// > Currently, the only server names supported are DNS hostnames -function getServerName (host) { - if (!host) { - return null + return this.#extensions } - assert.strictEqual(typeof host, 'string') + get protocol () { + webidl.brandCheck(this, WebSocket) - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' + return this.#protocol } - return servername -} + get onopen () { + webidl.brandCheck(this, WebSocket) -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} + return this.#events.open + } -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} + set onopen (fn) { + webidl.brandCheck(this, WebSocket) -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} + if (this.#events.open) { + this.removeEventListener('open', this.#events.open) + } -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength + if (typeof fn === 'function') { + this.#events.open = fn + this.addEventListener('open', fn) + } else { + this.#events.open = null + } } - return null -} - -function isDestroyed (stream) { - return !stream || !!(stream.destroyed || stream[kDestroyed]) -} - -function isReadableAborted (stream) { - const state = stream && stream._readableState - return isDestroyed(stream) && state && !state.endEmitted -} + get onerror () { + webidl.brandCheck(this, WebSocket) -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return + return this.#events.error } - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null + set onerror (fn) { + webidl.brandCheck(this, WebSocket) + + if (this.#events.error) { + this.removeEventListener('error', this.#events.error) } - stream.destroy(err) - } else if (err) { - process.nextTick((stream, err) => { - stream.emit('error', err) - }, stream, err) + if (typeof fn === 'function') { + this.#events.error = fn + this.addEventListener('error', fn) + } else { + this.#events.error = null + } } - if (stream.destroyed !== true) { - stream[kDestroyed] = true - } -} + get onclose () { + webidl.brandCheck(this, WebSocket) -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR) - return m ? parseInt(m[1], 10) * 1000 : null -} + return this.#events.close + } -function parseHeaders (headers, obj = {}) { - // For H2 support - if (!Array.isArray(headers)) return headers + set onclose (fn) { + webidl.brandCheck(this, WebSocket) - for (let i = 0; i < headers.length; i += 2) { - const key = headers[i].toString().toLowerCase() - let val = obj[key] + if (this.#events.close) { + this.removeEventListener('close', this.#events.close) + } - if (!val) { - if (Array.isArray(headers[i + 1])) { - obj[key] = headers[i + 1].map(x => x.toString('utf8')) - } else { - obj[key] = headers[i + 1].toString('utf8') - } + if (typeof fn === 'function') { + this.#events.close = fn + this.addEventListener('close', fn) } else { - if (!Array.isArray(val)) { - val = [val] - obj[key] = val - } - val.push(headers[i + 1].toString('utf8')) + this.#events.close = null } } - // See https://github.com/nodejs/node/pull/46528 - if ('content-length' in obj && 'content-disposition' in obj) { - obj['content-disposition'] = Buffer.from(obj['content-disposition']).toString('latin1') - } + get onmessage () { + webidl.brandCheck(this, WebSocket) - return obj -} + return this.#events.message + } -function parseRawHeaders (headers) { - const ret = [] - let hasContentLength = false - let contentDispositionIdx = -1 + set onmessage (fn) { + webidl.brandCheck(this, WebSocket) - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0].toString() - const val = headers[n + 1].toString('utf8') + if (this.#events.message) { + this.removeEventListener('message', this.#events.message) + } - if (key.length === 14 && (key === 'content-length' || key.toLowerCase() === 'content-length')) { - ret.push(key, val) - hasContentLength = true - } else if (key.length === 19 && (key === 'content-disposition' || key.toLowerCase() === 'content-disposition')) { - contentDispositionIdx = ret.push(key, val) - 1 + if (typeof fn === 'function') { + this.#events.message = fn + this.addEventListener('message', fn) } else { - ret.push(key, val) + this.#events.message = null } } - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } + get binaryType () { + webidl.brandCheck(this, WebSocket) - return ret -} + return this[kBinaryType] + } -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} + set binaryType (type) { + webidl.brandCheck(this, WebSocket) -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') + if (type !== 'blob' && type !== 'arraybuffer') { + this[kBinaryType] = 'blob' + } else { + this[kBinaryType] = type + } } - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished (response) { + // processResponse is called when the "response’s header list has been received and initialized." + // once this happens, the connection is open + this[kResponse] = response - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } + const parser = new ByteParser(this) + parser.on('drain', function onParserDrain () { + this.ws[kResponse].socket.resume() + }) - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } + response.socket.ws = this + this[kByteParser] = parser - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') - } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') - } + // 1. Change the ready state to OPEN (1). + this[kReadyState] = states.OPEN - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') + // 2. Change the extensions attribute’s value to the extensions in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 + const extensions = response.headersList.get('sec-websocket-extensions') + + if (extensions !== null) { + this.#extensions = extensions } - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') + // 3. Change the protocol attribute’s value to the subprotocol in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 + const protocol = response.headersList.get('sec-websocket-protocol') + + if (protocol !== null) { + this.#protocol = protocol } + + // 4. Fire an event named open at the WebSocket object. + fireEvent('open', this) } } -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - return !!(body && ( - stream.isDisturbed - ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? - : body[kBodyUsed] || - body.readableDidRead || - (body._readableState && body._readableState.dataEmitted) || - isReadableAborted(body) - )) -} +// https://websockets.spec.whatwg.org/#dom-websocket-connecting +WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING +// https://websockets.spec.whatwg.org/#dom-websocket-open +WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN +// https://websockets.spec.whatwg.org/#dom-websocket-closing +WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING +// https://websockets.spec.whatwg.org/#dom-websocket-closed +WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED -function isErrored (body) { - return !!(body && ( - stream.isErrored - ? stream.isErrored(body) - : /state: 'errored'/.test(nodeUtil.inspect(body) - ))) -} +Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: 'WebSocket', + writable: false, + enumerable: false, + configurable: true + } +}) -function isReadable (body) { - return !!(body && ( - stream.isReadable - ? stream.isReadable(body) - : /state: 'readable'/.test(nodeUtil.inspect(body) - ))) -} +Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors +}) -function getSocketInfo (socket) { - return { - localAddress: socket.localAddress, - localPort: socket.localPort, - remoteAddress: socket.remoteAddress, - remotePort: socket.remotePort, - remoteFamily: socket.remoteFamily, - timeout: socket.timeout, - bytesWritten: socket.bytesWritten, - bytesRead: socket.bytesRead - } -} +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.DOMString +) -async function * convertIterableToBuffer (iterable) { - for await (const chunk of iterable) { - yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) +webidl.converters['DOMString or sequence'] = function (V) { + if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { + return webidl.converters['sequence'](V) } + + return webidl.converters.DOMString(V) } -let ReadableStream -function ReadableStreamFrom (iterable) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) +// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 +webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: 'protocols', + converter: webidl.converters['DOMString or sequence'], + get defaultValue () { + return [] + } + }, + { + key: 'dispatcher', + converter: (V) => V, + get defaultValue () { + return getGlobalDispatcher() + } + }, + { + key: 'headers', + converter: webidl.nullableConverter(webidl.converters.HeadersInit) } +]) - if (ReadableStream.from) { - return ReadableStream.from(convertIterableToBuffer(iterable)) +webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { + if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { + return webidl.converters.WebSocketInit(V) } - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - controller.enqueue(new Uint8Array(buf)) - } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - } - }, - 0 - ) + return { protocols: webidl.converters['DOMString or sequence'](V) } } -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} +webidl.converters.WebSocketSendData = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } -function throwIfAborted (signal) { - if (!signal) { return } - if (typeof signal.throwIfAborted === 'function') { - signal.throwIfAborted() - } else { - if (signal.aborted) { - // DOMException not available < v17.0.0 - const err = new Error('The operation was aborted') - err.name = 'AbortError' - throw err + if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { + return webidl.converters.BufferSource(V) } } + + return webidl.converters.USVString(V) } -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) +module.exports = { + WebSocket } -const hasToWellFormed = !!String.prototype.toWellFormed -/** - * @param {string} val - */ -function toUSVString (val) { - if (hasToWellFormed) { - return `${val}`.toWellFormed() - } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val) +/***/ }), + +/***/ 45030: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; } - return `${val}` + if (typeof process === "object" && process.version !== undefined) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + + return ""; } -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function parseRangeHeader (range) { - if (range == null || range === '') return { start: 0, end: null, size: null } +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map - const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null - return m - ? { - start: parseInt(m[1]), - end: m[2] ? parseInt(m[2]) : null, - size: m[3] ? parseInt(m[3]) : null - } - : null -} -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true +/***/ }), -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isReadableAborted, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - throwIfAborted, - addAbortListener, - parseRangeHeader, - nodeMajor, - nodeMinor, - nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] -} +/***/ 65278: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +module.exports = __nccwpck_require__(73837).deprecate; /***/ }), -/***/ 74839: +/***/ 2155: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var v1 = __nccwpck_require__(18749); +var v4 = __nccwpck_require__(80824); +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; -const Dispatcher = __nccwpck_require__(60412) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(48045) -const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(72785) +module.exports = uuid; -const kDestroyed = Symbol('destroyed') -const kClosed = Symbol('closed') -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') -class DispatcherBase extends Dispatcher { - constructor () { - super() +/***/ }), - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - } +/***/ 92707: +/***/ ((module) => { - get destroyed () { - return this[kDestroyed] - } +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} - get closed () { - return this[kClosed] - } +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} - get interceptors () { - return this[kInterceptors] - } +module.exports = bytesToUuid; - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') - } - } - } - this[kInterceptors] = newInterceptors - } +/***/ }), - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } +/***/ 15859: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return - } +var crypto = __nccwpck_require__(6113); - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; - this[kClosed] = true - this[kOnClosed].push(callback) - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } - } +/***/ }), - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } +/***/ 18749: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null - } +var rng = __nccwpck_require__(15859); +var bytesToUuid = __nccwpck_require__(92707); - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? /* istanbul ignore next: should never error */ reject(err) : resolve(data) - }) - }) - } +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } +var _nodeId; +var _clockseq; - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) - } - return - } +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; - if (!err) { - err = new ClientDestroyedError() - } +// See https://github.com/uuidjs/uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) - } + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; } - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) - } + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) - } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); } - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') - } + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() - } + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; - if (this[kClosed]) { - throw new ClientClosedError() - } + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; - handler.onError(err) + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; - return false - } + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; } + + return buf ? buf : bytesToUuid(b); } -module.exports = DispatcherBase +module.exports = v1; /***/ }), -/***/ 60412: +/***/ 80824: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; - +var rng = __nccwpck_require__(15859); +var bytesToUuid = __nccwpck_require__(92707); -const EventEmitter = __nccwpck_require__(82361) +function v4(options, buf, offset) { + var i = buf && offset || 0; -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; } + options = options || {}; - close () { - throw new Error('not implemented') - } + var rnds = options.random || (options.rng || rng)(); - destroy () { - throw new Error('not implemented') + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } } + + return buf || bytesToUuid(rnds); } -module.exports = Dispatcher +module.exports = v4; /***/ }), -/***/ 41472: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 54886: +/***/ ((module) => { "use strict"; -const Busboy = __nccwpck_require__(50727) -const util = __nccwpck_require__(83983) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody -} = __nccwpck_require__(52538) -const { FormData } = __nccwpck_require__(72015) -const { kState } = __nccwpck_require__(15861) -const { webidl } = __nccwpck_require__(21744) -const { DOMException, structuredClone } = __nccwpck_require__(41037) -const { Blob, File: NativeFile } = __nccwpck_require__(14300) -const { kBodyUsed } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { isErrored } = __nccwpck_require__(83983) -const { isUint8Array, isArrayBuffer } = __nccwpck_require__(29830) -const { File: UndiciFile } = __nccwpck_require__(78511) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) +var conversions = {}; +module.exports = conversions; -let ReadableStream = globalThis.ReadableStream +function sign(x) { + return x < 0 ? -1 : 1; +} -/** @type {globalThis['File']} */ -const File = NativeFile ?? UndiciFile -const textEncoder = new TextEncoder() -const textDecoder = new TextDecoder() +function evenRound(x) { + // Round x to the nearest integer, choosing the even integer if it lies halfway between two. + if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) + return Math.floor(x); + } else { + return Math.round(x); + } +} -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) - } +function createNumberConversion(bitLength, typeOpts) { + if (!typeOpts.unsigned) { + --bitLength; + } + const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); + const upperBound = Math.pow(2, bitLength) - 1; - // 1. Let stream be null. - let stream = null + const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); + const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); - // 2. If object is a ReadableStream object, then set stream to object. - if (object instanceof ReadableStream) { - stream = object - } else if (isBlobLike(object)) { - // 3. Otherwise, if object is a Blob object, set stream to the - // result of running object’s get stream. - stream = object.stream() - } else { - // 4. Otherwise, set stream to a new ReadableStream object, and set - // up stream. - stream = new ReadableStream({ - async pull (controller) { - controller.enqueue( - typeof source === 'string' ? textEncoder.encode(source) : source - ) - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: undefined - }) - } + return function(V, opts) { + if (!opts) opts = {}; - // 5. Assert: stream is a ReadableStream object. - assert(isReadableStreamLike(stream)) + let x = +V; - // 6. Let action be null. - let action = null + if (opts.enforceRange) { + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite number"); + } - // 7. Let source be null. - let source = null + x = sign(x) * Math.floor(Math.abs(x)); + if (x < lowerBound || x > upperBound) { + throw new TypeError("Argument is not in byte range"); + } - // 8. Let length be null. - let length = null + return x; + } - // 9. Let type be null. - let type = null + if (!isNaN(x) && opts.clamp) { + x = evenRound(x); - // 10. Switch on object: - if (typeof object === 'string') { - // Set source to the UTF-8 encoding of object. - // Note: setting source to a Uint8Array here breaks some mocking assumptions. - source = object + if (x < lowerBound) x = lowerBound; + if (x > upperBound) x = upperBound; + return x; + } - // Set type to `text/plain;charset=UTF-8`. - type = 'text/plain;charset=UTF-8' - } else if (object instanceof URLSearchParams) { - // URLSearchParams + if (!Number.isFinite(x) || x === 0) { + return 0; + } - // spec says to run application/x-www-form-urlencoded on body.list - // this is implemented in Node.js as apart of an URLSearchParams instance toString method - // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 - // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 + x = sign(x) * Math.floor(Math.abs(x)); + x = x % moduloVal; - // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. - source = object.toString() + if (!typeOpts.unsigned && x >= moduloBound) { + return x - moduloVal; + } else if (typeOpts.unsigned) { + if (x < 0) { + x += moduloVal; + } else if (x === -0) { // don't return negative zero + return 0; + } + } - // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. - type = 'application/x-www-form-urlencoded;charset=UTF-8' - } else if (isArrayBuffer(object)) { - // BufferSource/ArrayBuffer + return x; + } +} - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.slice()) - } else if (ArrayBuffer.isView(object)) { - // BufferSource/ArrayBufferView +conversions["void"] = function () { + return undefined; +}; - // Set source to a copy of the bytes held by object. - source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) - } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` - const prefix = `--${boundary}\r\nContent-Disposition: form-data` +conversions["boolean"] = function (val) { + return !!val; +}; - /*! formdata-polyfill. MIT License. Jimmy Wärting */ - const escape = (str) => - str.replace(/\n/g, '%0A').replace(/\r/g, '%0D').replace(/"/g, '%22') - const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, '\r\n') +conversions["byte"] = createNumberConversion(8, { unsigned: false }); +conversions["octet"] = createNumberConversion(8, { unsigned: true }); - // Set action to this step: run the multipart/form-data - // encoding algorithm, with object’s entry list and UTF-8. - // - This ensures that the body is immutable and can't be changed afterwords - // - That the content-length is calculated in advance. - // - And that all parts are pre-encoded and ready to be sent. +conversions["short"] = createNumberConversion(16, { unsigned: false }); +conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); - const blobParts = [] - const rn = new Uint8Array([13, 10]) // '\r\n' - length = 0 - let hasUnknownSizeValue = false +conversions["long"] = createNumberConversion(32, { unsigned: false }); +conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); - for (const [name, value] of object) { - if (typeof value === 'string') { - const chunk = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + - (value.name ? `; filename="${escape(value.name)}"` : '') + '\r\n' + - `Content-Type: ${ - value.type || 'application/octet-stream' - }\r\n\r\n`) - blobParts.push(chunk, value, rn) - if (typeof value.size === 'number') { - length += chunk.byteLength + value.size + rn.byteLength - } else { - hasUnknownSizeValue = true - } - } - } +conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); +conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); - const chunk = textEncoder.encode(`--${boundary}--`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null +conversions["double"] = function (V) { + const x = +V; + + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite floating-point value"); } - // Set source to object. - source = object + return x; +}; - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part - } - } +conversions["unrestricted double"] = function (V) { + const x = +V; + + if (isNaN(x)) { + throw new TypeError("Argument is NaN"); } - // Set type to `multipart/form-data; boundary=`, - // followed by the multipart/form-data boundary string generated - // by the multipart/form-data encoding algorithm. - type = 'multipart/form-data; boundary=' + boundary - } else if (isBlobLike(object)) { - // Blob + return x; +}; - // Set source to object. - source = object +// not quite valid, but good enough for JS +conversions["float"] = conversions["double"]; +conversions["unrestricted float"] = conversions["unrestricted double"]; - // Set length to object’s size. - length = object.size +conversions["DOMString"] = function (V, opts) { + if (!opts) opts = {}; - // If object’s type attribute is not the empty byte sequence, set - // type to its value. - if (object.type) { - type = object.type - } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') + if (opts.treatNullAsEmptyString && V === null) { + return ""; } - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) - } + return String(V); +}; - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) - } +conversions["ByteString"] = function (V, opts) { + const x = String(V); + let c = undefined; + for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { + if (c > 255) { + throw new TypeError("Argument is not a valid bytestring"); + } + } - // 11. If source is a byte sequence, then set action to a - // step that returns source and length to source’s length. - if (typeof source === 'string' || util.isBuffer(source)) { - length = Buffer.byteLength(source) - } + return x; +}; - // 12. If action is non-null, then run these steps in in parallel: - if (action != null) { - // Run action. - let iterator - stream = new ReadableStream({ - async start () { - iterator = action(object)[Symbol.asyncIterator]() - }, - async pull (controller) { - const { value, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - }) +conversions["USVString"] = function (V) { + const S = String(V); + const n = S.length; + const U = []; + for (let i = 0; i < n; ++i) { + const c = S.charCodeAt(i); + if (c < 0xD800 || c > 0xDFFF) { + U.push(String.fromCodePoint(c)); + } else if (0xDC00 <= c && c <= 0xDFFF) { + U.push(String.fromCodePoint(0xFFFD)); } else { - // Whenever one or more bytes are available and stream is not errored, - // enqueue a Uint8Array wrapping an ArrayBuffer containing the available - // bytes into stream. - if (!isErrored(stream)) { - controller.enqueue(new Uint8Array(value)) - } + if (i === n - 1) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + const d = S.charCodeAt(i + 1); + if (0xDC00 <= d && d <= 0xDFFF) { + const a = c & 0x3FF; + const b = d & 0x3FF; + U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); + ++i; + } else { + U.push(String.fromCodePoint(0xFFFD)); + } + } } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: undefined - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } + } - // 14. Return (body, type). - return [body, type] -} + return U.join(''); +}; -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - if (!ReadableStream) { - // istanbul ignore next - ReadableStream = (__nccwpck_require__(35356).ReadableStream) - } +conversions["Date"] = function (V, opts) { + if (!(V instanceof Date)) { + throw new TypeError("Argument is not a Date object"); + } + if (isNaN(V)) { + return undefined; + } - // To safely extract a body and a `Content-Type` value from - // a byte sequence or BodyInit object object, run these steps: + return V; +}; - // 1. If object is a ReadableStream object, then: - if (object instanceof ReadableStream) { - // Assert: object is neither disturbed nor locked. - // istanbul ignore next - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') - } +conversions["RegExp"] = function (V, opts) { + if (!(V instanceof RegExp)) { + V = new RegExp(V); + } - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} + return V; +}; -function cloneBody (body) { - // To clone a body body, run these steps: - // https://fetch.spec.whatwg.org/#concept-body-clone +/***/ }), - // 1. Let « out1, out2 » be the result of teeing body’s stream. - const [out1, out2] = body.stream.tee() - const out2Clone = structuredClone(out2, { transfer: [out2] }) - // This, for whatever reasons, unrefs out2Clone which allows - // the process to exit by itself. - const [, finalClone] = out2Clone.tee() +/***/ 97537: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 2. Set body’s stream to out1. - body.stream = out1 +"use strict"; - // 3. Return a body whose stream is out2 and other members are copied from body. - return { - stream: finalClone, - length: body.length, - source: body.source - } -} +const usm = __nccwpck_require__(2158); -async function * consumeBody (body) { - if (body) { - if (isUint8Array(body)) { - yield body - } else { - const stream = body.stream +exports.implementation = class URLImpl { + constructor(constructorArgs) { + const url = constructorArgs[0]; + const base = constructorArgs[1]; - if (util.isDisturbed(stream)) { - throw new TypeError('The body has already been consumed.') + let parsedBase = null; + if (base !== undefined) { + parsedBase = usm.basicURLParse(base); + if (parsedBase === "failure") { + throw new TypeError("Invalid base URL"); } + } - if (stream.locked) { - throw new TypeError('The stream is locked.') - } + const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); + } - // Compat. - stream[kBodyUsed] = true + this._url = parsedURL; - yield * stream - } + // TODO: query stuff } -} -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') + get href() { + return usm.serializeURL(this._url); } -} - -function bodyMixinMethods (instance) { - const methods = { - blob () { - // The blob() method steps are to return the result of - // running consume body with this and the following step - // given a byte sequence bytes: return a Blob whose - // contents are bytes and whose type attribute is this’s - // MIME type. - return specConsumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) - if (mimeType === 'failure') { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) - } + set href(v) { + const parsedURL = usm.basicURLParse(v); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); + } - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new Blob([bytes], { type: mimeType }) - }, instance) - }, + this._url = parsedURL; + } - arrayBuffer () { - // The arrayBuffer() method steps are to return the result - // of running consume body with this and the following step - // given a byte sequence bytes: return a new ArrayBuffer - // whose contents are bytes. - return specConsumeBody(this, (bytes) => { - return new Uint8Array(bytes).buffer - }, instance) - }, + get origin() { + return usm.serializeURLOrigin(this._url); + } - text () { - // The text() method steps are to return the result of running - // consume body with this and UTF-8 decode. - return specConsumeBody(this, utf8DecodeBytes, instance) - }, + get protocol() { + return this._url.scheme + ":"; + } - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return specConsumeBody(this, parseJSONFromBytes, instance) - }, + set protocol(v) { + usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); + } - async formData () { - webidl.brandCheck(this, instance) + get username() { + return this._url.username; + } - throwIfAborted(this[kState]) + set username(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } - const contentType = this.headers.get('Content-Type') + usm.setTheUsername(this._url, v); + } - // If mimeType’s essence is "multipart/form-data", then: - if (/multipart\/form-data/.test(contentType)) { - const headers = {} - for (const [key, value] of this.headers) headers[key.toLowerCase()] = value + get password() { + return this._url.password; + } - const responseFormData = new FormData() + set password(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } - let busboy + usm.setThePassword(this._url, v); + } - try { - busboy = new Busboy({ - headers, - preservePath: true - }) - } catch (err) { - throw new DOMException(`${err}`, 'AbortError') - } + get host() { + const url = this._url; - busboy.on('field', (name, value) => { - responseFormData.append(name, value) - }) - busboy.on('file', (name, value, filename, encoding, mimeType) => { - const chunks = [] + if (url.host === null) { + return ""; + } - if (encoding === 'base64' || encoding.toLowerCase() === 'base64') { - let base64chunk = '' + if (url.port === null) { + return usm.serializeHost(url.host); + } - value.on('data', (chunk) => { - base64chunk += chunk.toString().replace(/[\r\n]/gm, '') + return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); + } - const end = base64chunk.length - base64chunk.length % 4 - chunks.push(Buffer.from(base64chunk.slice(0, end), 'base64')) + set host(v) { + if (this._url.cannotBeABaseURL) { + return; + } - base64chunk = base64chunk.slice(end) - }) - value.on('end', () => { - chunks.push(Buffer.from(base64chunk, 'base64')) - responseFormData.append(name, new File(chunks, filename, { type: mimeType })) - }) - } else { - value.on('data', (chunk) => { - chunks.push(chunk) - }) - value.on('end', () => { - responseFormData.append(name, new File(chunks, filename, { type: mimeType })) - }) - } - }) + usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); + } - const busboyResolve = new Promise((resolve, reject) => { - busboy.on('finish', resolve) - busboy.on('error', (err) => reject(new TypeError(err))) - }) + get hostname() { + if (this._url.host === null) { + return ""; + } - if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk) - busboy.end() - await busboyResolve + return usm.serializeHost(this._url.host); + } - return responseFormData - } else if (/application\/x-www-form-urlencoded/.test(contentType)) { - // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then: + set hostname(v) { + if (this._url.cannotBeABaseURL) { + return; + } - // 1. Let entries be the result of parsing bytes. - let entries - try { - let text = '' - // application/x-www-form-urlencoded parser will keep the BOM. - // https://url.spec.whatwg.org/#concept-urlencoded-parser - // Note that streaming decoder is stateful and cannot be reused - const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) + usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); + } - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError('Expected Uint8Array chunk') - } - text += streamingDecoder.decode(chunk, { stream: true }) - } - text += streamingDecoder.decode() - entries = new URLSearchParams(text) - } catch (err) { - // istanbul ignore next: Unclear when new URLSearchParams can fail on a string. - // 2. If entries is failure, then throw a TypeError. - throw Object.assign(new TypeError(), { cause: err }) - } + get port() { + if (this._url.port === null) { + return ""; + } - // 3. Return a new FormData object whose entries are entries. - const formData = new FormData() - for (const [name, value] of entries) { - formData.append(name, value) - } - return formData - } else { - // Wait a tick before checking if the request has been aborted. - // Otherwise, a TypeError can be thrown when an AbortError should. - await Promise.resolve() + return usm.serializeInteger(this._url.port); + } - throwIfAborted(this[kState]) + set port(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } - // Otherwise, throw a TypeError. - throw webidl.errors.exception({ - header: `${instance.name}.formData`, - message: 'Could not parse content as FormData.' - }) - } + if (v === "") { + this._url.port = null; + } else { + usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); } } - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, bodyMixinMethods(prototype)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-consume-body - * @param {Response|Request} object - * @param {(value: unknown) => unknown} convertBytesToJSValue - * @param {Response|Request} instance - */ -async function specConsumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) + get pathname() { + if (this._url.cannotBeABaseURL) { + return this._url.path[0]; + } - throwIfAborted(object[kState]) + if (this._url.path.length === 0) { + return ""; + } - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object[kState].body)) { - throw new TypeError('Body is unusable') + return "/" + this._url.path.join("/"); } - // 2. Let promise be a new promise. - const promise = createDeferredPromise() + set pathname(v) { + if (this._url.cannotBeABaseURL) { + return; + } - // 3. Let errorSteps given error be to reject promise with error. - const errorSteps = (error) => promise.reject(error) + this._url.path = []; + usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); + } - // 4. Let successSteps given a byte sequence data be to resolve - // promise with the result of running convertBytesToJSValue - // with data. If that threw an exception, then run errorSteps - // with that exception. - const successSteps = (data) => { - try { - promise.resolve(convertBytesToJSValue(data)) - } catch (e) { - errorSteps(e) + get search() { + if (this._url.query === null || this._url.query === "") { + return ""; } - } - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(new Uint8Array()) - return promise.promise + return "?" + this._url.query; } - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) + set search(v) { + // TODO: query stuff - // 7. Return promise. - return promise.promise -} + const url = this._url; -// https://fetch.spec.whatwg.org/#body-unusable -function bodyUnusable (body) { - // An object including the Body interface mixin is - // said to be unusable if its body is non-null and - // its body’s stream is disturbed or locked. - return body != null && (body.stream.locked || util.isDisturbed(body.stream)) -} + if (v === "") { + url.query = null; + return; + } -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' + const input = v[0] === "?" ? v.substring(1) : v; + url.query = ""; + usm.basicURLParse(input, { url, stateOverride: "query" }); } - // 1. Let buffer be the result of peeking three bytes from - // ioQueue, converted to a byte sequence. + get hash() { + if (this._url.fragment === null || this._url.fragment === "") { + return ""; + } - // 2. If buffer is 0xEF 0xBB 0xBF, then read three - // bytes from ioQueue. (Do nothing with those bytes.) - if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - buffer = buffer.subarray(3) + return "#" + this._url.fragment; } - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} object - */ -function bodyMimeType (object) { - const { headersList } = object[kState] - const contentType = headersList.get('content-type') + set hash(v) { + if (v === "") { + this._url.fragment = null; + return; + } - if (contentType === null) { - return 'failure' + const input = v[0] === "#" ? v.substring(1) : v; + this._url.fragment = ""; + usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); } - return parseMIMEType(contentType) -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody -} + toJSON() { + return this.href; + } +}; /***/ }), -/***/ 41037: +/***/ 63394: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(71267) - -const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = [101, 204, 205, 304] - -const redirectStatus = [301, 302, 303, 307, 308] -const redirectStatusSet = new Set(redirectStatus) - -// https://fetch.spec.whatwg.org/#block-bad-port -const badPorts = [ - '1', '7', '9', '11', '13', '15', '17', '19', '20', '21', '22', '23', '25', '37', '42', '43', '53', '69', '77', '79', - '87', '95', '101', '102', '103', '104', '109', '110', '111', '113', '115', '117', '119', '123', '135', '137', - '139', '143', '161', '179', '389', '427', '465', '512', '513', '514', '515', '526', '530', '531', '532', - '540', '548', '554', '556', '563', '587', '601', '636', '989', '990', '993', '995', '1719', '1720', '1723', - '2049', '3659', '4045', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', - '10080' -] - -const badPortsSet = new Set(badPorts) - -// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies -const referrerPolicy = [ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -] -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = ['follow', 'manual', 'error'] - -const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] -const safeMethodsSet = new Set(safeMethods) - -const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors'] - -const requestCredentials = ['omit', 'same-origin', 'include'] - -const requestCache = [ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -] +const conversions = __nccwpck_require__(54886); +const utils = __nccwpck_require__(83185); +const Impl = __nccwpck_require__(97537); -// https://fetch.spec.whatwg.org/#request-body-header-name -const requestBodyHeader = [ - 'content-encoding', - 'content-language', - 'content-location', - 'content-type', - // See https://github.com/nodejs/undici/issues/2021 - // 'Content-Length' is a forbidden header name, which is typically - // removed in the Headers implementation. However, undici doesn't - // filter out headers, so we add it here. - 'content-length' -] +const impl = utils.implSymbol; -// https://fetch.spec.whatwg.org/#enumdef-requestduplex -const requestDuplex = [ - 'half' -] +function URL(url) { + if (!this || this[impl] || !(this instanceof URL)) { + throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); + } + if (arguments.length < 1) { + throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); + } + const args = []; + for (let i = 0; i < arguments.length && i < 2; ++i) { + args[i] = arguments[i]; + } + args[0] = conversions["USVString"](args[0]); + if (args[1] !== undefined) { + args[1] = conversions["USVString"](args[1]); + } -// http://fetch.spec.whatwg.org/#forbidden-method -const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK'] -const forbiddenMethodsSet = new Set(forbiddenMethods) + module.exports.setup(this, args); +} -const subresource = [ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -] -const subresourceSet = new Set(subresource) +URL.prototype.toJSON = function toJSON() { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + const args = []; + for (let i = 0; i < arguments.length && i < 0; ++i) { + args[i] = arguments[i]; + } + return this[impl].toJSON.apply(this[impl], args); +}; +Object.defineProperty(URL.prototype, "href", { + get() { + return this[impl].href; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].href = V; + }, + enumerable: true, + configurable: true +}); -/** @type {globalThis['DOMException']} */ -const DOMException = globalThis.DOMException ?? (() => { - // DOMException was only made a global in Node v17.0.0, - // but fetch supports >= v16.8. - try { - atob('~') - } catch (err) { - return Object.getPrototypeOf(err).constructor +URL.prototype.toString = function () { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); } -})() + return this.href; +}; -let channel +Object.defineProperty(URL.prototype, "origin", { + get() { + return this[impl].origin; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "protocol", { + get() { + return this[impl].protocol; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].protocol = V; + }, + enumerable: true, + configurable: true +}); -/** @type {globalThis['structuredClone']} */ -const structuredClone = - globalThis.structuredClone ?? - // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js - // structuredClone was added in v17.0.0, but fetch supports v16.8 - function structuredClone (value, options = undefined) { - if (arguments.length === 0) { - throw new TypeError('missing argument') - } +Object.defineProperty(URL.prototype, "username", { + get() { + return this[impl].username; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].username = V; + }, + enumerable: true, + configurable: true +}); - if (!channel) { - channel = new MessageChannel() - } - channel.port1.unref() - channel.port2.unref() - channel.port1.postMessage(value, options?.transfer) - return receiveMessageOnPort(channel.port2).message - } +Object.defineProperty(URL.prototype, "password", { + get() { + return this[impl].password; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].password = V; + }, + enumerable: true, + configurable: true +}); -module.exports = { - DOMException, - structuredClone, - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} +Object.defineProperty(URL.prototype, "host", { + get() { + return this[impl].host; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].host = V; + }, + enumerable: true, + configurable: true +}); +Object.defineProperty(URL.prototype, "hostname", { + get() { + return this[impl].hostname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hostname = V; + }, + enumerable: true, + configurable: true +}); -/***/ }), +Object.defineProperty(URL.prototype, "port", { + get() { + return this[impl].port; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].port = V; + }, + enumerable: true, + configurable: true +}); -/***/ 685: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +Object.defineProperty(URL.prototype, "pathname", { + get() { + return this[impl].pathname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].pathname = V; + }, + enumerable: true, + configurable: true +}); -const assert = __nccwpck_require__(39491) -const { atob } = __nccwpck_require__(14300) -const { isomorphicDecode } = __nccwpck_require__(52538) +Object.defineProperty(URL.prototype, "search", { + get() { + return this[impl].search; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].search = V; + }, + enumerable: true, + configurable: true +}); -const encoder = new TextEncoder() +Object.defineProperty(URL.prototype, "hash", { + get() { + return this[impl].hash; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hash = V; + }, + enumerable: true, + configurable: true +}); -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - assert(dataURL.protocol === 'data:') +module.exports = { + is(obj) { + return !!obj && obj[impl] instanceof Impl.implementation; + }, + create(constructorArgs, privateData) { + let obj = Object.create(URL.prototype); + this.setup(obj, constructorArgs, privateData); + return obj; + }, + setup(obj, constructorArgs, privateData) { + if (!privateData) privateData = {}; + privateData.wrapper = obj; - // 2. Let input be the result of running the URL - // serializer on dataURL with exclude fragment - // set to true. - let input = URLSerializer(dataURL, true) + obj[impl] = new Impl.implementation(constructorArgs, privateData); + obj[impl][utils.wrapperSymbol] = obj; + }, + interface: URL, + expose: { + Window: { URL: URL }, + Worker: { URL: URL } + } +}; - // 3. Remove the leading "data:" string from input. - input = input.slice(5) - // 4. Let position point at the start of input. - const position = { position: 0 } - // 5. Let mimeType be the result of collecting a - // sequence of code points that are not equal - // to U+002C (,), given position. - let mimeType = collectASequenceOfCodePointsFast( - ',', - input, - position - ) +/***/ }), - // 6. Strip leading and trailing ASCII whitespace - // from mimeType. - // Undici implementation note: we need to store the - // length because if the mimetype has spaces removed, - // the wrong amount will be sliced from the input in - // step #9 - const mimeTypeLength = mimeType.length - mimeType = removeASCIIWhitespace(mimeType, true, true) +/***/ 28665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' - } +"use strict"; - // 8. Advance position by 1. - position.position++ - // 9. Let encodedBody be the remainder of input. - const encodedBody = input.slice(mimeTypeLength + 1) +exports.URL = __nccwpck_require__(63394)["interface"]; +exports.serializeURL = __nccwpck_require__(2158).serializeURL; +exports.serializeURLOrigin = __nccwpck_require__(2158).serializeURLOrigin; +exports.basicURLParse = __nccwpck_require__(2158).basicURLParse; +exports.setTheUsername = __nccwpck_require__(2158).setTheUsername; +exports.setThePassword = __nccwpck_require__(2158).setThePassword; +exports.serializeHost = __nccwpck_require__(2158).serializeHost; +exports.serializeInteger = __nccwpck_require__(2158).serializeInteger; +exports.parseURL = __nccwpck_require__(2158).parseURL; - // 10. Let body be the percent-decoding of encodedBody. - let body = stringPercentDecode(encodedBody) - // 11. If mimeType ends with U+003B (;), followed by - // zero or more U+0020 SPACE, followed by an ASCII - // case-insensitive match for "base64", then: - if (/;(\u0020){0,}base64$/i.test(mimeType)) { - // 1. Let stringBody be the isomorphic decode of body. - const stringBody = isomorphicDecode(body) +/***/ }), - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = forgivingBase64(stringBody) +/***/ 2158: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 3. If body is failure, then return failure. - if (body === 'failure') { - return 'failure' - } +"use strict"; - // 4. Remove the last 6 code points from mimeType. - mimeType = mimeType.slice(0, -6) +const punycode = __nccwpck_require__(85477); +const tr46 = __nccwpck_require__(84256); - // 5. Remove trailing U+0020 SPACE code points from mimeType, - // if any. - mimeType = mimeType.replace(/(\u0020)+$/, '') +const specialSchemes = { + ftp: 21, + file: null, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; - // 6. Remove the last U+003B (;) code point from mimeType. - mimeType = mimeType.slice(0, -1) - } +const failure = Symbol("failure"); - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType - } +function countSymbols(str) { + return punycode.ucs2.decode(str).length; +} - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) +function at(input, idx) { + const c = input[idx]; + return isNaN(c) ? undefined : String.fromCodePoint(c); +} - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') - } +function isASCIIDigit(c) { + return c >= 0x30 && c <= 0x39; +} - // 15. Return a new data: URL struct whose MIME - // type is mimeTypeRecord and body is body. - // https://fetch.spec.whatwg.org/#data-url-struct - return { mimeType: mimeTypeRecord, body } +function isASCIIAlpha(c) { + return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); } -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href - } +function isASCIIAlphanumeric(c) { + return isASCIIAlpha(c) || isASCIIDigit(c); +} - const href = url.href - const hashLength = url.hash.length +function isASCIIHex(c) { + return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); +} - return hashLength === 0 ? href : href.substring(0, href.length - hashLength) +function isSingleDot(buffer) { + return buffer === "." || buffer.toLowerCase() === "%2e"; } -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePoints (condition, input, position) { - // 1. Let result be the empty string. - let result = '' +function isDoubleDot(buffer) { + buffer = buffer.toLowerCase(); + return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; +} - // 2. While position doesn’t point past the end of input and the - // code point at position within input meets the condition condition: - while (position.position < input.length && condition(input[position.position])) { - // 1. Append that code point to the end of result. - result += input[position.position] +function isWindowsDriveLetterCodePoints(cp1, cp2) { + return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); +} - // 2. Advance position by 1. - position.position++ - } +function isWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); +} - // 3. Return result. - return result +function isNormalizedWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; } -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function collectASequenceOfCodePointsFast (char, input, position) { - const idx = input.indexOf(char, position.position) - const start = position.position +function containsForbiddenHostCodePoint(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; +} - if (idx === -1) { - position.position = input.length - return input.slice(start) - } +function containsForbiddenHostCodePointExcludingPercent(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; +} - position.position = idx - return input.slice(start, position.position) +function isSpecialScheme(scheme) { + return specialSchemes[scheme] !== undefined; } -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) +function isSpecial(url) { + return isSpecialScheme(url.scheme); +} - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) +function defaultPort(scheme) { + return specialSchemes[scheme]; } -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function percentDecode (input) { - // 1. Let output be an empty byte sequence. - /** @type {number[]} */ - const output = [] +function percentEncode(c) { + let hex = c.toString(16).toUpperCase(); + if (hex.length === 1) { + hex = "0" + hex; + } - // 2. For each byte byte in input: - for (let i = 0; i < input.length; i++) { - const byte = input[i] + return "%" + hex; +} - // 1. If byte is not 0x25 (%), then append byte to output. - if (byte !== 0x25) { - output.push(byte) +function utf8PercentEncode(c) { + const buf = new Buffer(c); - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2])) - ) { - output.push(0x25) + let str = ""; - // 3. Otherwise: - } else { - // 1. Let bytePoint be the two bytes after byte in input, - // decoded, and then interpreted as hexadecimal number. - const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]) - const bytePoint = Number.parseInt(nextTwoBytes, 16) + for (let i = 0; i < buf.length; ++i) { + str += percentEncode(buf[i]); + } - // 2. Append a byte whose value is bytePoint to output. - output.push(bytePoint) + return str; +} - // 3. Skip the next two bytes in input. - i += 2 +function utf8PercentDecode(str) { + const input = new Buffer(str); + const output = []; + for (let i = 0; i < input.length; ++i) { + if (input[i] !== 37) { + output.push(input[i]); + } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { + output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); + i += 2; + } else { + output.push(input[i]); } } - - // 3. Return output. - return Uint8Array.from(output) + return new Buffer(output).toString(); } -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = removeHTTPWhitespace(input, true, true) +function isC0ControlPercentEncode(c) { + return c <= 0x1F || c > 0x7E; +} - // 2. Let position be a position variable for input, - // initially pointing at the start of input. - const position = { position: 0 } +const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); +function isPathPercentEncode(c) { + return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); +} - // 3. Let type be the result of collecting a sequence - // of code points that are not U+002F (/) from - // input, given position. - const type = collectASequenceOfCodePointsFast( - '/', - input, - position - ) +const extraUserinfoPercentEncodeSet = + new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); +function isUserinfoPercentEncode(c) { + return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); +} - // 4. If type is the empty string or does not solely - // contain HTTP token code points, then return failure. - // https://mimesniff.spec.whatwg.org/#http-token-code-point - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return 'failure' - } +function percentEncodeChar(c, encodeSetPredicate) { + const cStr = String.fromCodePoint(c); - // 5. If position is past the end of input, then return - // failure - if (position.position > input.length) { - return 'failure' + if (encodeSetPredicate(c)) { + return utf8PercentEncode(cStr); } - // 6. Advance position by 1. (This skips past U+002F (/).) - position.position++ - - // 7. Let subtype be the result of collecting a sequence of - // code points that are not U+003B (;) from input, given - // position. - let subtype = collectASequenceOfCodePointsFast( - ';', - input, - position - ) + return cStr; +} - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = removeHTTPWhitespace(subtype, false, true) +function parseIPv4Number(input) { + let R = 10; - // 9. If subtype is the empty string or does not solely - // contain HTTP token code points, then return failure. - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return 'failure' + if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { + input = input.substring(2); + R = 16; + } else if (input.length >= 2 && input.charAt(0) === "0") { + input = input.substring(1); + R = 8; } - const typeLowercase = type.toLowerCase() - const subtypeLowercase = subtype.toLowerCase() - - // 10. Let mimeType be a new MIME type record whose type - // is type, in ASCII lowercase, and subtype is subtype, - // in ASCII lowercase. - // https://mimesniff.spec.whatwg.org/#mime-type - const mimeType = { - type: typeLowercase, - subtype: subtypeLowercase, - /** @type {Map} */ - parameters: new Map(), - // https://mimesniff.spec.whatwg.org/#mime-type-essence - essence: `${typeLowercase}/${subtypeLowercase}` + if (input === "") { + return 0; } - // 11. While position is not past the end of input: - while (position.position < input.length) { - // 1. Advance position by 1. (This skips past U+003B (;).) - position.position++ - - // 2. Collect a sequence of code points that are HTTP - // whitespace from input given position. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => HTTP_WHITESPACE_REGEX.test(char), - input, - position - ) + const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); + if (regex.test(input)) { + return failure; + } - // 3. Let parameterName be the result of collecting a - // sequence of code points that are not U+003B (;) - // or U+003D (=) from input, given position. - let parameterName = collectASequenceOfCodePoints( - (char) => char !== ';' && char !== '=', - input, - position - ) + return parseInt(input, R); +} - // 4. Set parameterName to parameterName, in ASCII - // lowercase. - parameterName = parameterName.toLowerCase() +function parseIPv4(input) { + const parts = input.split("."); + if (parts[parts.length - 1] === "") { + if (parts.length > 1) { + parts.pop(); + } + } - // 5. If position is not past the end of input, then: - if (position.position < input.length) { - // 1. If the code point at position within input is - // U+003B (;), then continue. - if (input[position.position] === ';') { - continue - } + if (parts.length > 4) { + return input; + } - // 2. Advance position by 1. (This skips past U+003D (=).) - position.position++ + const numbers = []; + for (const part of parts) { + if (part === "") { + return input; } - - // 6. If position is past the end of input, then break. - if (position.position > input.length) { - break + const n = parseIPv4Number(part); + if (n === failure) { + return input; } - // 7. Let parameterValue be null. - let parameterValue = null + numbers.push(n); + } - // 8. If the code point at position within input is - // U+0022 ("), then: - if (input[position.position] === '"') { - // 1. Set parameterValue to the result of collecting - // an HTTP quoted string from input, given position - // and the extract-value flag. - parameterValue = collectAnHTTPQuotedString(input, position, true) + for (let i = 0; i < numbers.length - 1; ++i) { + if (numbers[i] > 255) { + return failure; + } + } + if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { + return failure; + } - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) + let ipv4 = numbers.pop(); + let counter = 0; - // 9. Otherwise: - } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) + for (const n of numbers) { + ipv4 += n * Math.pow(256, 3 - counter); + ++counter; + } - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) + return ipv4; +} - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue - } - } +function serializeIPv4(address) { + let output = ""; + let n = address; - // 10. If all of the following are true - // - parameterName is not the empty string - // - parameterName solely contains HTTP token code points - // - parameterValue solely contains HTTP quoted-string token code points - // - mimeType’s parameters[parameterName] does not exist - // then set mimeType’s parameters[parameterName] to parameterValue. - if ( - parameterName.length !== 0 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) + for (let i = 1; i <= 4; ++i) { + output = String(n % 256) + output; + if (i !== 4) { + output = "." + output; } + n = Math.floor(n / 256); } - // 12. Return mimeType. - return mimeType + return output; } -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function forgivingBase64 (data) { - // 1. Remove all ASCII whitespace from data. - data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line +function parseIPv6(input) { + const address = [0, 0, 0, 0, 0, 0, 0, 0]; + let pieceIndex = 0; + let compress = null; + let pointer = 0; - // 2. If data’s code point length divides by 4 leaving - // no remainder, then: - if (data.length % 4 === 0) { - // 1. If data ends with one or two U+003D (=) code points, - // then remove them from data. - data = data.replace(/=?=$/, '') - } + input = punycode.ucs2.decode(input); - // 3. If data’s code point length divides by 4 leaving - // a remainder of 1, then return failure. - if (data.length % 4 === 1) { - return 'failure' - } + if (input[pointer] === 58) { + if (input[pointer + 1] !== 58) { + return failure; + } - // 4. If data contains a code point that is not one of - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // then return failure. - if (/[^+/0-9A-Za-z]/.test(data)) { - return 'failure' + pointer += 2; + ++pieceIndex; + compress = pieceIndex; } - const binary = atob(data) - const bytes = new Uint8Array(binary.length) + while (pointer < input.length) { + if (pieceIndex === 8) { + return failure; + } - for (let byte = 0; byte < binary.length; byte++) { - bytes[byte] = binary.charCodeAt(byte) - } + if (input[pointer] === 58) { + if (compress !== null) { + return failure; + } + ++pointer; + ++pieceIndex; + compress = pieceIndex; + continue; + } - return bytes -} + let value = 0; + let length = 0; -// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string -// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string -/** - * @param {string} input - * @param {{ position: number }} position - * @param {boolean?} extractValue - */ -function collectAnHTTPQuotedString (input, position, extractValue) { - // 1. Let positionStart be position. - const positionStart = position.position + while (length < 4 && isASCIIHex(input[pointer])) { + value = value * 0x10 + parseInt(at(input, pointer), 16); + ++pointer; + ++length; + } - // 2. Let value be the empty string. - let value = '' + if (input[pointer] === 46) { + if (length === 0) { + return failure; + } - // 3. Assert: the code point at position within input - // is U+0022 ("). - assert(input[position.position] === '"') + pointer -= length; - // 4. Advance position by 1. - position.position++ + if (pieceIndex > 6) { + return failure; + } - // 5. While true: - while (true) { - // 1. Append the result of collecting a sequence of code points - // that are not U+0022 (") or U+005C (\) from input, given - // position, to value. - value += collectASequenceOfCodePoints( - (char) => char !== '"' && char !== '\\', - input, - position - ) + let numbersSeen = 0; - // 2. If position is past the end of input, then break. - if (position.position >= input.length) { - break - } + while (input[pointer] !== undefined) { + let ipv4Piece = null; - // 3. Let quoteOrBackslash be the code point at position within - // input. - const quoteOrBackslash = input[position.position] + if (numbersSeen > 0) { + if (input[pointer] === 46 && numbersSeen < 4) { + ++pointer; + } else { + return failure; + } + } - // 4. Advance position by 1. - position.position++ + if (!isASCIIDigit(input[pointer])) { + return failure; + } - // 5. If quoteOrBackslash is U+005C (\), then: - if (quoteOrBackslash === '\\') { - // 1. If position is past the end of input, then append - // U+005C (\) to value and break. - if (position.position >= input.length) { - value += '\\' - break - } + while (isASCIIDigit(input[pointer])) { + const number = parseInt(at(input, pointer)); + if (ipv4Piece === null) { + ipv4Piece = number; + } else if (ipv4Piece === 0) { + return failure; + } else { + ipv4Piece = ipv4Piece * 10 + number; + } + if (ipv4Piece > 255) { + return failure; + } + ++pointer; + } - // 2. Append the code point at position within input to value. - value += input[position.position] + address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - // 3. Advance position by 1. - position.position++ + ++numbersSeen; - // 6. Otherwise: - } else { - // 1. Assert: quoteOrBackslash is U+0022 ("). - assert(quoteOrBackslash === '"') + if (numbersSeen === 2 || numbersSeen === 4) { + ++pieceIndex; + } + } - // 2. Break. - break + if (numbersSeen !== 4) { + return failure; + } + + break; + } else if (input[pointer] === 58) { + ++pointer; + if (input[pointer] === undefined) { + return failure; + } + } else if (input[pointer] !== undefined) { + return failure; } + + address[pieceIndex] = value; + ++pieceIndex; } - // 6. If the extract-value flag is set, then return value. - if (extractValue) { - return value + if (compress !== null) { + let swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex !== 0 && swaps > 0) { + const temp = address[compress + swaps - 1]; + address[compress + swaps - 1] = address[pieceIndex]; + address[pieceIndex] = temp; + --pieceIndex; + --swaps; + } + } else if (compress === null && pieceIndex !== 8) { + return failure; } - // 7. Return the code points from positionStart to position, - // inclusive, within input. - return input.slice(positionStart, position.position) + return address; } -/** - * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type - */ -function serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, essence } = mimeType - - // 1. Let serialization be the concatenation of mimeType’s - // type, U+002F (/), and mimeType’s subtype. - let serialization = essence - - // 2. For each name → value of mimeType’s parameters: - for (let [name, value] of parameters.entries()) { - // 1. Append U+003B (;) to serialization. - serialization += ';' - - // 2. Append name to serialization. - serialization += name +function serializeIPv6(address) { + let output = ""; + const seqResult = findLongestZeroSequence(address); + const compress = seqResult.idx; + let ignore0 = false; - // 3. Append U+003D (=) to serialization. - serialization += '=' + for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { + if (ignore0 && address[pieceIndex] === 0) { + continue; + } else if (ignore0) { + ignore0 = false; + } - // 4. If value does not solely contain HTTP token code - // points or value is the empty string, then: - if (!HTTP_TOKEN_CODEPOINTS.test(value)) { - // 1. Precede each occurence of U+0022 (") or - // U+005C (\) in value with U+005C (\). - value = value.replace(/(\\|")/g, '\\$1') + if (compress === pieceIndex) { + const separator = pieceIndex === 0 ? "::" : ":"; + output += separator; + ignore0 = true; + continue; + } - // 2. Prepend U+0022 (") to value. - value = '"' + value + output += address[pieceIndex].toString(16); - // 3. Append U+0022 (") to value. - value += '"' + if (pieceIndex !== 7) { + output += ":"; } - - // 5. Append value to serialization. - serialization += value } - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} char - */ -function isHTTPWhiteSpace (char) { - return char === '\r' || char === '\n' || char === '\t' || char === ' ' + return output; } -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - let lead = 0 - let trail = str.length - 1 +function parseHost(input, isSpecialArg) { + if (input[0] === "[") { + if (input[input.length - 1] !== "]") { + return failure; + } - if (leading) { - for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); + return parseIPv6(input.substring(1, input.length - 1)); } - if (trailing) { - for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); + if (!isSpecialArg) { + return parseOpaqueHost(input); } - return str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {string} char - */ -function isASCIIWhitespace (char) { - return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' ' -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - let lead = 0 - let trail = str.length - 1 + const domain = utf8PercentDecode(input); + const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); + if (asciiDomain === null) { + return failure; + } - if (leading) { - for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); + if (containsForbiddenHostCodePoint(asciiDomain)) { + return failure; } - if (trailing) { - for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); + const ipv4Host = parseIPv4(asciiDomain); + if (typeof ipv4Host === "number" || ipv4Host === failure) { + return ipv4Host; } - return str.slice(lead, trail + 1) + return asciiDomain; } -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType +function parseOpaqueHost(input) { + if (containsForbiddenHostCodePointExcludingPercent(input)) { + return failure; + } + + let output = ""; + const decoded = punycode.ucs2.decode(input); + for (let i = 0; i < decoded.length; ++i) { + output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + } + return output; } +function findLongestZeroSequence(arr) { + let maxIdx = null; + let maxLen = 1; // only find elements > 1 + let currStart = null; + let currLen = 0; -/***/ }), + for (let i = 0; i < arr.length; ++i) { + if (arr[i] !== 0) { + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } -/***/ 78511: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + currStart = null; + currLen = 0; + } else { + if (currStart === null) { + currStart = i; + } + ++currLen; + } + } -"use strict"; + // if trailing zeros + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + return { + idx: maxIdx, + len: maxLen + }; +} -const { Blob, File: NativeFile } = __nccwpck_require__(14300) -const { types } = __nccwpck_require__(73837) -const { kState } = __nccwpck_require__(15861) -const { isBlobLike } = __nccwpck_require__(52538) -const { webidl } = __nccwpck_require__(21744) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const encoder = new TextEncoder() +function serializeHost(host) { + if (typeof host === "number") { + return serializeIPv4(host); + } -class File extends Blob { - constructor (fileBits, fileName, options = {}) { - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) + // IPv6 serializer + if (host instanceof Array) { + return "[" + serializeIPv6(host) + "]"; + } - fileBits = webidl.converters['sequence'](fileBits) - fileName = webidl.converters.USVString(fileName) - options = webidl.converters.FilePropertyBag(options) + return host; +} - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - // Note: Blob handles this for us +function trimControlChars(url) { + return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); +} - // 2. Let n be the fileName argument to the constructor. - const n = fileName +function trimTabAndNewline(url) { + return url.replace(/\u0009|\u000A|\u000D/g, ""); +} - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: +function shortenPath(url) { + const path = url.path; + if (path.length === 0) { + return; + } + if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { + return; + } - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // 2. Convert every character in t to ASCII lowercase. - let t = options.type - let d + path.pop(); +} - // eslint-disable-next-line no-labels - substep: { - if (t) { - t = parseMIMEType(t) +function includesCredentials(url) { + return url.username !== "" || url.password !== ""; +} - if (t === 'failure') { - t = '' - // eslint-disable-next-line no-labels - break substep - } +function cannotHaveAUsernamePasswordPort(url) { + return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; +} - t = serializeAMimeType(t).toLowerCase() - } +function isNormalizedWindowsDriveLetter(string) { + return /^[A-Za-z]:$/.test(string); +} - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - d = options.lastModified - } +function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + this.pointer = 0; + this.input = input; + this.base = base || null; + this.encodingOverride = encodingOverride || "utf-8"; + this.stateOverride = stateOverride; + this.url = url; + this.failure = false; + this.parseError = false; - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. + if (!this.url) { + this.url = { + scheme: "", + username: "", + password: "", + host: null, + port: null, + path: [], + query: null, + fragment: null, - super(processBlobParts(fileBits, options), { type: t }) - this[kState] = { - name: n, - lastModified: d, - type: t + cannotBeABaseURL: false + }; + + const res = trimControlChars(this.input); + if (res !== this.input) { + this.parseError = true; } + this.input = res; } - get name () { - webidl.brandCheck(this, File) - - return this[kState].name + const res = trimTabAndNewline(this.input); + if (res !== this.input) { + this.parseError = true; } + this.input = res; - get lastModified () { - webidl.brandCheck(this, File) + this.state = stateOverride || "scheme start"; - return this[kState].lastModified - } + this.buffer = ""; + this.atFlag = false; + this.arrFlag = false; + this.passwordTokenSeenFlag = false; - get type () { - webidl.brandCheck(this, File) + this.input = punycode.ucs2.decode(this.input); - return this[kState].type + for (; this.pointer <= this.input.length; ++this.pointer) { + const c = this.input[this.pointer]; + const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); + + // exec state machine + const ret = this["parse " + this.state](c, cStr); + if (!ret) { + break; // terminate algorithm + } else if (ret === failure) { + this.failure = true; + break; + } } } -class FileLike { - constructor (blobLike, fileName, options = {}) { - // TODO: argument idl type check - - // The File constructor is invoked with two or three parameters, depending - // on whether the optional dictionary parameter is used. When the File() - // constructor is invoked, user agents must run the following steps: - - // 1. Let bytes be the result of processing blob parts given fileBits and - // options. - - // 2. Let n be the fileName argument to the constructor. - const n = fileName - - // 3. Process FilePropertyBag dictionary argument by running the following - // substeps: +URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { + if (isASCIIAlpha(c)) { + this.buffer += cStr.toLowerCase(); + this.state = "scheme"; + } else if (!this.stateOverride) { + this.state = "no scheme"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } - // 1. If the type member is provided and is not the empty string, let t - // be set to the type dictionary member. If t contains any characters - // outside the range U+0020 to U+007E, then set t to the empty string - // and return from these substeps. - // TODO - const t = options.type + return true; +}; - // 2. Convert every character in t to ASCII lowercase. - // TODO +URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { + if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { + this.buffer += cStr.toLowerCase(); + } else if (c === 58) { + if (this.stateOverride) { + if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { + return false; + } - // 3. If the lastModified member is provided, let d be set to the - // lastModified dictionary member. If it is not provided, set d to the - // current date and time represented as the number of milliseconds since - // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). - const d = options.lastModified ?? Date.now() + if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { + return false; + } - // 4. Return a new File object F such that: - // F refers to the bytes byte sequence. - // F.size is set to the number of total bytes in bytes. - // F.name is set to n. - // F.type is set to t. - // F.lastModified is set to d. + if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { + return false; + } - this[kState] = { - blobLike, - name: n, - type: t, - lastModified: d + if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { + return false; + } + } + this.url.scheme = this.buffer; + this.buffer = ""; + if (this.stateOverride) { + return false; + } + if (this.url.scheme === "file") { + if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { + this.parseError = true; + } + this.state = "file"; + } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { + this.state = "special relative or authority"; + } else if (isSpecial(this.url)) { + this.state = "special authority slashes"; + } else if (this.input[this.pointer + 1] === 47) { + this.state = "path or authority"; + ++this.pointer; + } else { + this.url.cannotBeABaseURL = true; + this.url.path.push(""); + this.state = "cannot-be-a-base-URL path"; } + } else if (!this.stateOverride) { + this.buffer = ""; + this.state = "no scheme"; + this.pointer = -1; + } else { + this.parseError = true; + return failure; } - stream (...args) { - webidl.brandCheck(this, FileLike) + return true; +}; - return this[kState].blobLike.stream(...args) +URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { + if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { + return failure; + } else if (this.base.cannotBeABaseURL && c === 35) { + this.url.scheme = this.base.scheme; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.url.cannotBeABaseURL = true; + this.state = "fragment"; + } else if (this.base.scheme === "file") { + this.state = "file"; + --this.pointer; + } else { + this.state = "relative"; + --this.pointer; } - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) + return true; +}; - return this[kState].blobLike.arrayBuffer(...args) +URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "relative"; + --this.pointer; } - slice (...args) { - webidl.brandCheck(this, FileLike) + return true; +}; - return this[kState].blobLike.slice(...args) +URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { + if (c === 47) { + this.state = "authority"; + } else { + this.state = "path"; + --this.pointer; } - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } + return true; +}; - get size () { - webidl.brandCheck(this, FileLike) +URLStateMachine.prototype["parse relative"] = function parseRelative(c) { + this.url.scheme = this.base.scheme; + if (isNaN(c)) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 47) { + this.state = "relative slash"; + } else if (c === 63) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else if (isSpecial(this.url) && c === 92) { + this.parseError = true; + this.state = "relative slash"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(0, this.base.path.length - 1); - return this[kState].blobLike.size + this.state = "path"; + --this.pointer; } - get type () { - webidl.brandCheck(this, FileLike) + return true; +}; - return this[kState].blobLike.type +URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { + if (isSpecial(this.url) && (c === 47 || c === 92)) { + if (c === 92) { + this.parseError = true; + } + this.state = "special authority ignore slashes"; + } else if (c === 47) { + this.state = "authority"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.state = "path"; + --this.pointer; } - get name () { - webidl.brandCheck(this, FileLike) + return true; +}; - return this[kState].name +URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "special authority ignore slashes"; + --this.pointer; } - get lastModified () { - webidl.brandCheck(this, FileLike) + return true; +}; - return this[kState].lastModified +URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { + if (c !== 47 && c !== 92) { + this.state = "authority"; + --this.pointer; + } else { + this.parseError = true; } - get [Symbol.toStringTag] () { - return 'File' - } -} + return true; +}; -Object.defineProperties(File.prototype, { - [Symbol.toStringTag]: { - value: 'File', - configurable: true - }, - name: kEnumerableProperty, - lastModified: kEnumerableProperty -}) +URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { + if (c === 64) { + this.parseError = true; + if (this.atFlag) { + this.buffer = "%40" + this.buffer; + } + this.atFlag = true; -webidl.converters.Blob = webidl.interfaceConverter(Blob) + // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars + const len = countSymbols(this.buffer); + for (let pointer = 0; pointer < len; ++pointer) { + const codePoint = this.buffer.codePointAt(pointer); -webidl.converters.BlobPart = function (V, opts) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) + if (codePoint === 58 && !this.passwordTokenSeenFlag) { + this.passwordTokenSeenFlag = true; + continue; + } + const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); + if (this.passwordTokenSeenFlag) { + this.url.password += encodedCodePoints; + } else { + this.url.username += encodedCodePoints; + } } - - if ( - ArrayBuffer.isView(V) || - types.isAnyArrayBuffer(V) - ) { - return webidl.converters.BufferSource(V, opts) + this.buffer = ""; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + if (this.atFlag && this.buffer === "") { + this.parseError = true; + return failure; } + this.pointer -= countSymbols(this.buffer) + 1; + this.buffer = ""; + this.state = "host"; + } else { + this.buffer += cStr; } - return webidl.converters.USVString(V, opts) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.BlobPart -) + return true; +}; -// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag -webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ - { - key: 'lastModified', - converter: webidl.converters['long long'], - get defaultValue () { - return Date.now() +URLStateMachine.prototype["parse hostname"] = +URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { + if (this.stateOverride && this.url.scheme === "file") { + --this.pointer; + this.state = "file host"; + } else if (c === 58 && !this.arrFlag) { + if (this.buffer === "") { + this.parseError = true; + return failure; } - }, - { - key: 'type', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'endings', - converter: (value) => { - value = webidl.converters.DOMString(value) - value = value.toLowerCase() - if (value !== 'native') { - value = 'transparent' - } + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } - return value - }, - defaultValue: 'transparent' - } -]) + this.url.host = host; + this.buffer = ""; + this.state = "port"; + if (this.stateOverride === "hostname") { + return false; + } + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + --this.pointer; + if (isSpecial(this.url) && this.buffer === "") { + this.parseError = true; + return failure; + } else if (this.stateOverride && this.buffer === "" && + (includesCredentials(this.url) || this.url.port !== null)) { + this.parseError = true; + return false; + } -/** - * @see https://www.w3.org/TR/FileAPI/#process-blob-parts - * @param {(NodeJS.TypedArray|Blob|string)[]} parts - * @param {{ type: string, endings: string }} options - */ -function processBlobParts (parts, options) { - // 1. Let bytes be an empty sequence of bytes. - /** @type {NodeJS.TypedArray[]} */ - const bytes = [] + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } - // 2. For each element in parts: - for (const element of parts) { - // 1. If element is a USVString, run the following substeps: - if (typeof element === 'string') { - // 1. Let s be element. - let s = element + this.url.host = host; + this.buffer = ""; + this.state = "path start"; + if (this.stateOverride) { + return false; + } + } else { + if (c === 91) { + this.arrFlag = true; + } else if (c === 93) { + this.arrFlag = false; + } + this.buffer += cStr; + } - // 2. If the endings member of options is "native", set s - // to the result of converting line endings to native - // of element. - if (options.endings === 'native') { - s = convertLineEndingsNative(s) - } + return true; +}; - // 3. Append the result of UTF-8 encoding s to bytes. - bytes.push(encoder.encode(s)) - } else if ( - types.isAnyArrayBuffer(element) || - types.isTypedArray(element) - ) { - // 2. If element is a BufferSource, get a copy of the - // bytes held by the buffer source, and append those - // bytes to bytes. - if (!element.buffer) { // ArrayBuffer - bytes.push(new Uint8Array(element)) - } else { - bytes.push( - new Uint8Array(element.buffer, element.byteOffset, element.byteLength) - ) +URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { + if (isASCIIDigit(c)) { + this.buffer += cStr; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92) || + this.stateOverride) { + if (this.buffer !== "") { + const port = parseInt(this.buffer); + if (port > Math.pow(2, 16) - 1) { + this.parseError = true; + return failure; } - } else if (isBlobLike(element)) { - // 3. If element is a Blob, append the bytes it represents - // to bytes. - bytes.push(element) + this.url.port = port === defaultPort(this.url.scheme) ? null : port; + this.buffer = ""; + } + if (this.stateOverride) { + return false; } + this.state = "path start"; + --this.pointer; + } else { + this.parseError = true; + return failure; } - // 3. Return bytes. - return bytes -} - -/** - * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native - * @param {string} s - */ -function convertLineEndingsNative (s) { - // 1. Let native line ending be be the code point U+000A LF. - let nativeLineEnding = '\n' + return true; +}; - // 2. If the underlying platform’s conventions are to - // represent newlines as a carriage return and line feed - // sequence, set native line ending to the code point - // U+000D CR followed by the code point U+000A LF. - if (process.platform === 'win32') { - nativeLineEnding = '\r\n' - } +const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); - return s.replace(/\r?\n/g, nativeLineEnding) -} +URLStateMachine.prototype["parse file"] = function parseFile(c) { + this.url.scheme = "file"; -// If this function is moved to ./util.js, some tools (such as -// rollup) will warn about circular dependencies. See: -// https://github.com/nodejs/undici/issues/1629 -function isFileLike (object) { - return ( - (NativeFile && object instanceof NativeFile) || - object instanceof File || ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file slash"; + } else if (this.base !== null && this.base.scheme === "file") { + if (isNaN(c)) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 63) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else { + if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points + !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || + (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points + !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + shortenPath(this.url); + } else { + this.parseError = true; + } -module.exports = { File, FileLike, isFileLike } + this.state = "path"; + --this.pointer; + } + } else { + this.state = "path"; + --this.pointer; + } + return true; +}; -/***/ }), +URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file host"; + } else { + if (this.base !== null && this.base.scheme === "file") { + if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { + this.url.path.push(this.base.path[0]); + } else { + this.url.host = this.base.host; + } + } + this.state = "path"; + --this.pointer; + } -/***/ 72015: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return true; +}; -"use strict"; +URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { + if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { + --this.pointer; + if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { + this.parseError = true; + this.state = "path"; + } else if (this.buffer === "") { + this.url.host = ""; + if (this.stateOverride) { + return false; + } + this.state = "path start"; + } else { + let host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + if (host === "localhost") { + host = ""; + } + this.url.host = host; + if (this.stateOverride) { + return false; + } -const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(52538) -const { kState } = __nccwpck_require__(15861) -const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(78511) -const { webidl } = __nccwpck_require__(21744) -const { Blob, File: NativeFile } = __nccwpck_require__(14300) + this.buffer = ""; + this.state = "path start"; + } + } else { + this.buffer += cStr; + } -/** @type {globalThis['File']} */ -const File = NativeFile ?? UndiciFile + return true; +}; -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) +URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { + if (isSpecial(this.url)) { + if (c === 92) { + this.parseError = true; } + this.state = "path"; - this[kState] = [] + if (c !== 47 && c !== 92) { + --this.pointer; + } + } else if (!this.stateOverride && c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (!this.stateOverride && c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else if (c !== undefined) { + this.state = "path"; + if (c !== 47) { + --this.pointer; + } } - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) + return true; +}; - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) +URLStateMachine.prototype["parse path"] = function parsePath(c) { + if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || + (!this.stateOverride && (c === 63 || c === 35))) { + if (isSpecial(this.url) && c === 92) { + this.parseError = true; } - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name) - value = isBlobLike(value) - ? webidl.converters.Blob(value, { strict: false }) - : webidl.converters.USVString(value) - filename = arguments.length === 3 - ? webidl.converters.USVString(filename) - : undefined + if (isDoubleDot(this.buffer)) { + shortenPath(this.url); + if (c !== 47 && !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } + } else if (isSingleDot(this.buffer) && c !== 47 && + !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } else if (!isSingleDot(this.buffer)) { + if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { + if (this.url.host !== "" && this.url.host !== null) { + this.parseError = true; + this.url.host = ""; + } + this.buffer = this.buffer[0] + ":"; + } + this.url.path.push(this.buffer); + } + this.buffer = ""; + if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { + while (this.url.path.length > 1 && this.url.path[0] === "") { + this.parseError = true; + this.url.path.shift(); + } + } + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } - // 3. Append entry to this’s entry list. - this[kState].push(entry) + this.buffer += percentEncodeChar(c, isPathPercentEncode); } - delete (name) { - webidl.brandCheck(this, FormData) + return true; +}; - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) +URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else { + // TODO: Add: not a URL code point + if (!isNaN(c) && c !== 37) { + this.parseError = true; + } - name = webidl.converters.USVString(name) + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) + if (!isNaN(c)) { + this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); + } } - get (name) { - webidl.brandCheck(this, FormData) + return true; +}; - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) +URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { + if (isNaN(c) || (!this.stateOverride && c === 35)) { + if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { + this.encodingOverride = "utf-8"; + } - name = webidl.converters.USVString(name) + const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || + buffer[i] === 0x3C || buffer[i] === 0x3E) { + this.url.query += percentEncode(buffer[i]); + } else { + this.url.query += String.fromCodePoint(buffer[i]); + } + } - // 1. If there is no entry whose name is name in this’s entry list, - // then return null. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null + this.buffer = ""; + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; } - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value + this.buffer += cStr; } - getAll (name) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) + return true; +}; - name = webidl.converters.USVString(name) +URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { + if (isNaN(c)) { // do nothing + } else if (c === 0x0) { + this.parseError = true; + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } - // 1. If there is no entry whose name is name in this’s entry list, - // then return the empty list. - // 2. Return the values of all entries whose name is name, in order, - // from this’s entry list. - return this[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) + this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); } - has (name) { - webidl.brandCheck(this, FormData) + return true; +}; - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) +function serializeURL(url, excludeFragment) { + let output = url.scheme + ":"; + if (url.host !== null) { + output += "//"; - name = webidl.converters.USVString(name) + if (url.username !== "" || url.password !== "") { + output += url.username; + if (url.password !== "") { + output += ":" + url.password; + } + output += "@"; + } - // The has(name) method steps are to return true if there is an entry - // whose name is name in this’s entry list; otherwise false. - return this[kState].findIndex((entry) => entry.name === name) !== -1 + output += serializeHost(url.host); + + if (url.port !== null) { + output += ":" + url.port; + } + } else if (url.host === null && url.scheme === "file") { + output += "//"; } - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) + if (url.cannotBeABaseURL) { + output += url.path[0]; + } else { + for (const string of url.path) { + output += "/" + string; + } + } - webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) + if (url.query !== null) { + output += "?" + url.query; + } - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) - } + if (!excludeFragment && url.fragment !== null) { + output += "#" + url.fragment; + } - // The set(name, value) and set(name, blobValue, filename) method steps - // are: + return output; +} - // 1. Let value be value if given; otherwise blobValue. +function serializeOrigin(tuple) { + let result = tuple.scheme + "://"; + result += serializeHost(tuple.host); - name = webidl.converters.USVString(name) - value = isBlobLike(value) - ? webidl.converters.Blob(value, { strict: false }) - : webidl.converters.USVString(value) - filename = arguments.length === 3 - ? toUSVString(filename) - : undefined + if (tuple.port !== null) { + result += ":" + tuple.port; + } - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = makeEntry(name, value, filename) + return result; +} - // 3. If there are entries in this’s entry list whose name is name, then - // replace the first such entry with entry and remove the others. - const idx = this[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) - } +module.exports.serializeURL = serializeURL; + +module.exports.serializeURLOrigin = function (url) { + // https://url.spec.whatwg.org/#concept-url-origin + switch (url.scheme) { + case "blob": + try { + return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); + } catch (e) { + // serializing an opaque origin returns "null" + return "null"; + } + case "ftp": + case "gopher": + case "http": + case "https": + case "ws": + case "wss": + return serializeOrigin({ + scheme: url.scheme, + host: url.host, + port: url.port + }); + case "file": + // spec says "exercise to the reader", chrome says "file://" + return "file://"; + default: + // serializing an opaque origin returns "null" + return "null"; } +}; - entries () { - webidl.brandCheck(this, FormData) +module.exports.basicURLParse = function (input, options) { + if (options === undefined) { + options = {}; + } - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'key+value' - ) + const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); + if (usm.failure) { + return "failure"; } - keys () { - webidl.brandCheck(this, FormData) + return usm.url; +}; - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'key' - ) +module.exports.setTheUsername = function (url, username) { + url.username = ""; + const decoded = punycode.ucs2.decode(username); + for (let i = 0; i < decoded.length; ++i) { + url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); } +}; - values () { - webidl.brandCheck(this, FormData) - - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'value' - ) +module.exports.setThePassword = function (url, password) { + url.password = ""; + const decoded = punycode.ucs2.decode(password); + for (let i = 0; i < decoded.length; ++i) { + url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); } +}; - /** - * @param {(value: string, key: string, self: FormData) => void} callbackFn - * @param {unknown} thisArg - */ - forEach (callbackFn, thisArg = globalThis) { - webidl.brandCheck(this, FormData) +module.exports.serializeHost = serializeHost; - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.forEach' }) +module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; - if (typeof callbackFn !== 'function') { - throw new TypeError( - "Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'." - ) - } +module.exports.serializeInteger = function (integer) { + return String(integer); +}; - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]) - } +module.exports.parseURL = function (input, options) { + if (options === undefined) { + options = {}; } -} -FormData.prototype[Symbol.iterator] = FormData.prototype.entries + // We don't handle blobs, so this just delegates: + return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); +}; -Object.defineProperties(FormData.prototype, { - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true - } -}) -/** - * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry - * @param {string} name - * @param {string|Blob} value - * @param {?string} filename - * @returns - */ -function makeEntry (name, value, filename) { - // 1. Set name to the result of converting name into a scalar value string. - // "To convert a string into a scalar value string, replace any surrogates - // with U+FFFD." - // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end - name = Buffer.from(name).toString('utf8') +/***/ }), - // 2. If value is a string, then set value to the result of converting - // value into a scalar value string. - if (typeof value === 'string') { - value = Buffer.from(value).toString('utf8') - } else { - // 3. Otherwise: +/***/ 83185: +/***/ ((module) => { - // 1. If value is not a File object, then set value to a new File object, - // representing the same bytes, whose name attribute value is "blob" - if (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) - } +"use strict"; - // 2. If filename is given, then set value to a new File object, - // representing the same bytes, whose name attribute is filename. - if (filename !== undefined) { - /** @type {FilePropertyBag} */ - const options = { - type: value.type, - lastModified: value.lastModified - } - value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) - } +module.exports.mixin = function mixin(target, source) { + const keys = Object.getOwnPropertyNames(source); + for (let i = 0; i < keys.length; ++i) { + Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); } +}; - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} +module.exports.wrapperSymbol = Symbol("wrapper"); +module.exports.implSymbol = Symbol("impl"); + +module.exports.wrapperForImpl = function (impl) { + return impl[module.exports.wrapperSymbol]; +}; + +module.exports.implForWrapper = function (wrapper) { + return wrapper[module.exports.implSymbol]; +}; -module.exports = { FormData } /***/ }), -/***/ 71246: +/***/ 62940: /***/ ((module) => { -"use strict"; +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) -function getGlobalOrigin () { - return globalThis[globalOrigin] + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } } -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, globalOrigin, { - value: undefined, - writable: true, - enumerable: false, - configurable: false - }) - return - } +/***/ }), - const parsedURL = new URL(newOrigin) +/***/ 95696: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`) - } +"use strict"; - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(56417); +var util_1 = __nccwpck_require__(76195); +var util_2 = __nccwpck_require__(65282); +var _1 = __nccwpck_require__(44260); +var dom_1 = __nccwpck_require__(40770); +/** @inheritdoc */ +function builder(p1, p2) { + var options = formatBuilderOptions(isXMLBuilderCreateOptions(p1) ? p1 : interfaces_1.DefaultBuilderOptions); + var nodes = util_2.Guard.isNode(p1) || util_1.isArray(p1) ? p1 : p2; + if (nodes === undefined) { + throw new Error("Invalid arguments."); + } + if (util_1.isArray(nodes)) { + var builders = []; + for (var i = 0; i < nodes.length; i++) { + var builder_1 = new _1.XMLBuilderImpl(nodes[i]); + builder_1.set(options); + builders.push(builder_1); + } + return builders; + } + else { + var builder_2 = new _1.XMLBuilderImpl(nodes); + builder_2.set(options); + return builder_2; + } +} +exports.builder = builder; +/** @inheritdoc */ +function create(p1, p2) { + var options = formatBuilderOptions(p1 === undefined || isXMLBuilderCreateOptions(p1) ? + p1 : interfaces_1.DefaultBuilderOptions); + var contents = isXMLBuilderCreateOptions(p1) ? p2 : p1; + var doc = dom_1.createDocument(); + setOptions(doc, options); + var builder = new _1.XMLBuilderImpl(doc); + if (contents !== undefined) { + // parse contents + builder.ele(contents); + } + return builder; +} +exports.create = create; +/** @inheritdoc */ +function fragment(p1, p2) { + var options = formatBuilderOptions(p1 === undefined || isXMLBuilderCreateOptions(p1) ? + p1 : interfaces_1.DefaultBuilderOptions); + var contents = isXMLBuilderCreateOptions(p1) ? p2 : p1; + var doc = dom_1.createDocument(); + setOptions(doc, options, true); + var builder = new _1.XMLBuilderImpl(doc.createDocumentFragment()); + if (contents !== undefined) { + // parse contents + builder.ele(contents); + } + return builder; } +exports.fragment = fragment; +/** @inheritdoc */ +function convert(p1, p2, p3) { + var builderOptions; + var contents; + var convertOptions; + if (isXMLBuilderCreateOptions(p1) && p2 !== undefined) { + builderOptions = p1; + contents = p2; + convertOptions = p3; + } + else { + builderOptions = interfaces_1.DefaultBuilderOptions; + contents = p1; + convertOptions = p2 || undefined; + } + return create(builderOptions, contents).end(convertOptions); +} +exports.convert = convert; +function isXMLBuilderCreateOptions(obj) { + if (!util_1.isPlainObject(obj)) + return false; + for (var key in obj) { + /* istanbul ignore else */ + if (obj.hasOwnProperty(key)) { + if (!interfaces_1.XMLBuilderOptionKeys.has(key)) + return false; + } + } + return true; +} +function formatBuilderOptions(createOptions) { + if (createOptions === void 0) { createOptions = {}; } + var options = util_1.applyDefaults(createOptions, interfaces_1.DefaultBuilderOptions); + if (options.convert.att.length === 0 || + options.convert.ins.length === 0 || + options.convert.text.length === 0 || + options.convert.cdata.length === 0 || + options.convert.comment.length === 0) { + throw new Error("JS object converter strings cannot be zero length."); + } + return options; +} +function setOptions(doc, options, isFragment) { + var docWithSettings = doc; + docWithSettings._xmlBuilderOptions = options; + docWithSettings._isFragment = isFragment; +} +//# sourceMappingURL=BuilderFunctions.js.map -module.exports = { - getGlobalOrigin, - setGlobalOrigin +/***/ }), + +/***/ 10268: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +var _1 = __nccwpck_require__(44260); +/** + * Creates an XML builder which serializes the document in chunks. + * + * @param options - callback builder options + * + * @returns callback builder + */ +function createCB(options) { + return new _1.XMLBuilderCBImpl(options); +} +exports.createCB = createCB; +/** + * Creates an XML builder which serializes the fragment in chunks. + * + * @param options - callback builder options + * + * @returns callback builder + */ +function fragmentCB(options) { + return new _1.XMLBuilderCBImpl(options, true); } +exports.fragmentCB = fragmentCB; +//# sourceMappingURL=BuilderFunctionsCB.js.map + +/***/ }), + +/***/ 71438: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +"use strict"; + +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(56417); +var util_1 = __nccwpck_require__(76195); +var BuilderFunctions_1 = __nccwpck_require__(95696); +var algorithm_1 = __nccwpck_require__(61); +var infra_1 = __nccwpck_require__(84251); +var NamespacePrefixMap_1 = __nccwpck_require__(90283); +var LocalNameSet_1 = __nccwpck_require__(19049); +var util_2 = __nccwpck_require__(65282); +var XMLCBWriter_1 = __nccwpck_require__(77572); +var JSONCBWriter_1 = __nccwpck_require__(37525); +var YAMLCBWriter_1 = __nccwpck_require__(42444); +var events_1 = __nccwpck_require__(82361); +/** + * Represents a readable XML document stream. + */ +var XMLBuilderCBImpl = /** @class */ (function (_super) { + __extends(XMLBuilderCBImpl, _super); + /** + * Initializes a new instance of `XMLStream`. + * + * @param options - stream writer options + * @param fragment - whether to create fragment stream or a document stream + * + * @returns XML stream + */ + function XMLBuilderCBImpl(options, fragment) { + if (fragment === void 0) { fragment = false; } + var _this = _super.call(this) || this; + _this._hasDeclaration = false; + _this._docTypeName = ""; + _this._hasDocumentElement = false; + _this._currentElementSerialized = false; + _this._openTags = []; + _this._ended = false; + _this._fragment = fragment; + // provide default options + _this._options = util_1.applyDefaults(options || {}, interfaces_1.DefaultXMLBuilderCBOptions); + _this._builderOptions = { + defaultNamespace: _this._options.defaultNamespace, + namespaceAlias: _this._options.namespaceAlias + }; + if (_this._options.format === "json") { + _this._writer = new JSONCBWriter_1.JSONCBWriter(_this._options); + } + else if (_this._options.format === "yaml") { + _this._writer = new YAMLCBWriter_1.YAMLCBWriter(_this._options); + } + else { + _this._writer = new XMLCBWriter_1.XMLCBWriter(_this._options); + } + // automatically create listeners for callbacks passed via options + if (_this._options.data !== undefined) { + _this.on("data", _this._options.data); + } + if (_this._options.end !== undefined) { + _this.on("end", _this._options.end); + } + if (_this._options.error !== undefined) { + _this.on("error", _this._options.error); + } + _this._prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap(); + _this._prefixMap.set("xml", infra_1.namespace.XML); + _this._prefixIndex = { value: 1 }; + _this._push(_this._writer.frontMatter()); + return _this; + } + /** @inheritdoc */ + XMLBuilderCBImpl.prototype.ele = function (p1, p2, p3) { + var e_1, _a; + // parse if JS object or XML or JSON string + if (util_1.isObject(p1) || (util_1.isString(p1) && (/^\s*/g, '>'); + } + else { + for (var i = 0; i < node.data.length; i++) { + var c = node.data[i]; + if (c === "&") + markup += "&"; + else if (c === "<") + markup += "<"; + else if (c === ">") + markup += ">"; + else + markup += c; + } + } + this._push(this._writer.text(markup)); + return this; + }; + /** @inheritdoc */ + XMLBuilderCBImpl.prototype.ins = function (target, content) { + if (content === void 0) { content = ''; } + this._serializeOpenTag(true); + var node; + try { + node = BuilderFunctions_1.fragment(this._builderOptions).ins(target, content).first().node; + } + catch (err) { + /* istanbul ignore next */ + this.emit("error", err); + /* istanbul ignore next */ + return this; + } + if (this._options.wellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) { + this.emit("error", new Error("Processing instruction target contains invalid characters (well-formed required).")); + return this; + } + if (this._options.wellFormed && !algorithm_1.xml_isLegalChar(node.data)) { + this.emit("error", Error("Processing instruction data contains invalid characters (well-formed required).")); + return this; + } + this._push(this._writer.instruction(node.target, node.data)); + return this; + }; + /** @inheritdoc */ + XMLBuilderCBImpl.prototype.dat = function (content) { + this._serializeOpenTag(true); + var node; + try { + node = BuilderFunctions_1.fragment(this._builderOptions).dat(content).first().node; + } + catch (err) { + this.emit("error", err); + return this; + } + this._push(this._writer.cdata(node.data)); + return this; + }; + /** @inheritdoc */ + XMLBuilderCBImpl.prototype.dec = function (options) { + if (options === void 0) { options = { version: "1.0" }; } + if (this._fragment) { + this.emit("error", Error("Cannot insert an XML declaration into a document fragment.")); + return this; + } + if (this._hasDeclaration) { + this.emit("error", Error("XML declaration is already inserted.")); + return this; + } + this._push(this._writer.declaration(options.version || "1.0", options.encoding, options.standalone)); + this._hasDeclaration = true; + return this; + }; + /** @inheritdoc */ + XMLBuilderCBImpl.prototype.dtd = function (options) { + if (this._fragment) { + this.emit("error", Error("Cannot insert a DocType declaration into a document fragment.")); + return this; + } + if (this._docTypeName !== "") { + this.emit("error", new Error("DocType declaration is already inserted.")); + return this; + } + if (this._hasDocumentElement) { + this.emit("error", new Error("Cannot insert DocType declaration after document element.")); + return this; + } + var node; + try { + node = BuilderFunctions_1.create().dtd(options).first().node; + } + catch (err) { + this.emit("error", err); + return this; + } + if (this._options.wellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) { + this.emit("error", new Error("DocType public identifier does not match PubidChar construct (well-formed required).")); + return this; + } + if (this._options.wellFormed && + (!algorithm_1.xml_isLegalChar(node.systemId) || + (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) { + this.emit("error", new Error("DocType system identifier contains invalid characters (well-formed required).")); + return this; + } + this._docTypeName = options.name; + this._push(this._writer.docType(options.name, node.publicId, node.systemId)); + return this; + }; + /** @inheritdoc */ + XMLBuilderCBImpl.prototype.up = function () { + this._serializeOpenTag(false); + this._serializeCloseTag(); + return this; + }; + /** @inheritdoc */ + XMLBuilderCBImpl.prototype.end = function () { + this._serializeOpenTag(false); + while (this._openTags.length > 0) { + this._serializeCloseTag(); + } + this._push(null); + return this; + }; + /** + * Serializes the opening tag of an element node. + * + * @param hasChildren - whether the element node has child nodes + */ + XMLBuilderCBImpl.prototype._serializeOpenTag = function (hasChildren) { + if (this._currentElementSerialized) + return; + if (this._currentElement === undefined) + return; + var node = this._currentElement.node; + if (this._options.wellFormed && (node.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(node.localName))) { + this.emit("error", new Error("Node local name contains invalid characters (well-formed required).")); + return; + } + var qualifiedName = ""; + var ignoreNamespaceDefinitionAttribute = false; + var map = this._prefixMap.copy(); + var localPrefixesMap = {}; + var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap); + var inheritedNS = this._openTags.length === 0 ? null : this._openTags[this._openTags.length - 1][1]; + var ns = node.namespaceURI; + if (ns === null) + ns = inheritedNS; + if (inheritedNS === ns) { + if (localDefaultNamespace !== null) { + ignoreNamespaceDefinitionAttribute = true; + } + if (ns === infra_1.namespace.XML) { + qualifiedName = "xml:" + node.localName; + } + else { + qualifiedName = node.localName; + } + this._writer.beginElement(qualifiedName); + this._push(this._writer.openTagBegin(qualifiedName)); + } + else { + var prefix = node.prefix; + var candidatePrefix = null; + if (prefix !== null || ns !== localDefaultNamespace) { + candidatePrefix = map.get(prefix, ns); + } + if (prefix === "xmlns") { + if (this._options.wellFormed) { + this.emit("error", new Error("An element cannot have the 'xmlns' prefix (well-formed required).")); + return; + } + candidatePrefix = prefix; + } + if (candidatePrefix !== null) { + qualifiedName = candidatePrefix + ':' + node.localName; + if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) { + inheritedNS = localDefaultNamespace || null; + } + this._writer.beginElement(qualifiedName); + this._push(this._writer.openTagBegin(qualifiedName)); + } + else if (prefix !== null) { + if (prefix in localPrefixesMap) { + prefix = this._generatePrefix(ns, map, this._prefixIndex); + } + map.set(prefix, ns); + qualifiedName += prefix + ':' + node.localName; + this._writer.beginElement(qualifiedName); + this._push(this._writer.openTagBegin(qualifiedName)); + this._push(this._writer.attribute("xmlns:" + prefix, this._serializeAttributeValue(ns, this._options.wellFormed))); + if (localDefaultNamespace !== null) { + inheritedNS = localDefaultNamespace || null; + } + } + else if (localDefaultNamespace === null || + (localDefaultNamespace !== null && localDefaultNamespace !== ns)) { + ignoreNamespaceDefinitionAttribute = true; + qualifiedName += node.localName; + inheritedNS = ns; + this._writer.beginElement(qualifiedName); + this._push(this._writer.openTagBegin(qualifiedName)); + this._push(this._writer.attribute("xmlns", this._serializeAttributeValue(ns, this._options.wellFormed))); + } + else { + qualifiedName += node.localName; + inheritedNS = ns; + this._writer.beginElement(qualifiedName); + this._push(this._writer.openTagBegin(qualifiedName)); + } + } + this._serializeAttributes(node, map, this._prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, this._options.wellFormed); + var isHTML = (ns === infra_1.namespace.HTML); + if (isHTML && !hasChildren && + XMLBuilderCBImpl._VoidElementNames.has(node.localName)) { + this._push(this._writer.openTagEnd(qualifiedName, true, true)); + this._writer.endElement(qualifiedName); + } + else if (!isHTML && !hasChildren) { + this._push(this._writer.openTagEnd(qualifiedName, true, false)); + this._writer.endElement(qualifiedName); + } + else { + this._push(this._writer.openTagEnd(qualifiedName, false, false)); + } + this._currentElementSerialized = true; + /** + * Save qualified name, original inherited ns, original prefix map, and + * hasChildren flag. + */ + this._openTags.push([qualifiedName, inheritedNS, this._prefixMap, hasChildren]); + /** + * New values of inherited namespace and prefix map will be used while + * serializing child nodes. They will be returned to their original values + * when this node is closed using the _openTags array item we saved above. + */ + if (this._isPrefixMapModified(this._prefixMap, map)) { + this._prefixMap = map; + } + /** + * Calls following this will either serialize child nodes or close this tag. + */ + this._writer.level++; + }; + /** + * Serializes the closing tag of an element node. + */ + XMLBuilderCBImpl.prototype._serializeCloseTag = function () { + this._writer.level--; + var lastEle = this._openTags.pop(); + /* istanbul ignore next */ + if (lastEle === undefined) { + this.emit("error", new Error("Last element is undefined.")); + return; + } + var _a = __read(lastEle, 4), qualifiedName = _a[0], ns = _a[1], map = _a[2], hasChildren = _a[3]; + /** + * Restore original values of inherited namespace and prefix map. + */ + this._prefixMap = map; + if (!hasChildren) + return; + this._push(this._writer.closeTag(qualifiedName)); + this._writer.endElement(qualifiedName); + }; + /** + * Pushes data to internal buffer. + * + * @param data - data + */ + XMLBuilderCBImpl.prototype._push = function (data) { + if (data === null) { + this._ended = true; + this.emit("end"); + } + else if (this._ended) { + this.emit("error", new Error("Cannot push to ended stream.")); + } + else if (data.length !== 0) { + this._writer.hasData = true; + this.emit("data", data, this._writer.level); + } + }; + /** + * Reads and serializes an XML tree. + * + * @param node - root node + */ + XMLBuilderCBImpl.prototype._fromNode = function (node) { + var e_2, _a, e_3, _b; + if (util_2.Guard.isElementNode(node)) { + var name = node.prefix ? node.prefix + ":" + node.localName : node.localName; + if (node.namespaceURI !== null) { + this.ele(node.namespaceURI, name); + } + else { + this.ele(name); + } + try { + for (var _c = __values(node.attributes), _d = _c.next(); !_d.done; _d = _c.next()) { + var attr = _d.value; + var name_1 = attr.prefix ? attr.prefix + ":" + attr.localName : attr.localName; + if (attr.namespaceURI !== null) { + this.att(attr.namespaceURI, name_1, attr.value); + } + else { + this.att(name_1, attr.value); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_d && !_d.done && (_a = _c.return)) _a.call(_c); + } + finally { if (e_2) throw e_2.error; } + } + try { + for (var _e = __values(node.childNodes), _f = _e.next(); !_f.done; _f = _e.next()) { + var child = _f.value; + this._fromNode(child); + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_f && !_f.done && (_b = _e.return)) _b.call(_e); + } + finally { if (e_3) throw e_3.error; } + } + this.up(); + } + else if (util_2.Guard.isExclusiveTextNode(node) && node.data) { + this.txt(node.data); + } + else if (util_2.Guard.isCommentNode(node)) { + this.com(node.data); + } + else if (util_2.Guard.isCDATASectionNode(node)) { + this.dat(node.data); + } + else if (util_2.Guard.isProcessingInstructionNode(node)) { + this.ins(node.target, node.data); + } + }; + /** + * Produces an XML serialization of the attributes of an element node. + * + * @param node - node to serialize + * @param map - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param localPrefixesMap - local prefixes map + * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace + * attributes + * @param requireWellFormed - whether to check conformance + */ + XMLBuilderCBImpl.prototype._serializeAttributes = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed) { + var e_4, _a; + var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined; + try { + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + // Optimize common case + if (!requireWellFormed && !ignoreNamespaceDefinitionAttribute && attr.namespaceURI === null) { + this._push(this._writer.attribute(attr.localName, this._serializeAttributeValue(attr.value, this._options.wellFormed))); + continue; + } + if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) { + this.emit("error", new Error("Element contains duplicate attributes (well-formed required).")); + return; + } + if (requireWellFormed && localNameSet) + localNameSet.set(attr.namespaceURI, attr.localName); + var attributeNamespace = attr.namespaceURI; + var candidatePrefix = null; + if (attributeNamespace !== null) { + candidatePrefix = map.get(attr.prefix, attributeNamespace); + if (attributeNamespace === infra_1.namespace.XMLNS) { + if (attr.value === infra_1.namespace.XML || + (attr.prefix === null && ignoreNamespaceDefinitionAttribute) || + (attr.prefix !== null && (!(attr.localName in localPrefixesMap) || + localPrefixesMap[attr.localName] !== attr.value) && + map.has(attr.localName, attr.value))) + continue; + if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) { + this.emit("error", new Error("XMLNS namespace is reserved (well-formed required).")); + return; + } + if (requireWellFormed && attr.value === '') { + this.emit("error", new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).")); + return; + } + if (attr.prefix === 'xmlns') + candidatePrefix = 'xmlns'; + /** + * _Note:_ The (candidatePrefix === null) check is not in the spec. + * We deviate from the spec here. Otherwise a prefix is generated for + * all attributes with namespaces. + */ + } + else if (candidatePrefix === null) { + if (attr.prefix !== null && + (!map.hasPrefix(attr.prefix) || + map.has(attr.prefix, attributeNamespace))) { + /** + * Check if we can use the attribute's own prefix. + * We deviate from the spec here. + * TODO: This is not an efficient way of searching for prefixes. + * Follow developments to the spec. + */ + candidatePrefix = attr.prefix; + } + else { + candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex); + } + this._push(this._writer.attribute("xmlns:" + candidatePrefix, this._serializeAttributeValue(attributeNamespace, this._options.wellFormed))); + } + } + if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(attr.localName) || + (attr.localName === "xmlns" && attributeNamespace === null))) { + this.emit("error", new Error("Attribute local name contains invalid characters (well-formed required).")); + return; + } + this._push(this._writer.attribute((candidatePrefix !== null ? candidatePrefix + ":" : "") + attr.localName, this._serializeAttributeValue(attr.value, this._options.wellFormed))); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_4) throw e_4.error; } + } + }; + /** + * Produces an XML serialization of an attribute value. + * + * @param value - attribute value + * @param requireWellFormed - whether to check conformance + */ + XMLBuilderCBImpl.prototype._serializeAttributeValue = function (value, requireWellFormed) { + if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) { + this.emit("error", new Error("Invalid characters in attribute value.")); + return ""; + } + if (value === null) + return ""; + if (this._options.noDoubleEncoding) { + return value.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"'); + } + else { + var result = ""; + for (var i = 0; i < value.length; i++) { + var c = value[i]; + if (c === "\"") + result += """; + else if (c === "&") + result += "&"; + else if (c === "<") + result += "<"; + else if (c === ">") + result += ">"; + else + result += c; + } + return result; + } + }; + /** + * Records namespace information for the given element and returns the + * default namespace attribute value. + * + * @param node - element node to process + * @param map - namespace prefix map + * @param localPrefixesMap - local prefixes map + */ + XMLBuilderCBImpl.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) { + var e_5, _a; + var defaultNamespaceAttrValue = null; + try { + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + var attributeNamespace = attr.namespaceURI; + var attributePrefix = attr.prefix; + if (attributeNamespace === infra_1.namespace.XMLNS) { + if (attributePrefix === null) { + defaultNamespaceAttrValue = attr.value; + continue; + } + else { + var prefixDefinition = attr.localName; + var namespaceDefinition = attr.value; + if (namespaceDefinition === infra_1.namespace.XML) { + continue; + } + if (namespaceDefinition === '') { + namespaceDefinition = null; + } + if (map.has(prefixDefinition, namespaceDefinition)) { + continue; + } + map.set(prefixDefinition, namespaceDefinition); + localPrefixesMap[prefixDefinition] = namespaceDefinition || ''; + } + } + } + } + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_5) throw e_5.error; } + } + return defaultNamespaceAttrValue; + }; + /** + * Generates a new prefix for the given namespace. + * + * @param newNamespace - a namespace to generate prefix for + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + */ + XMLBuilderCBImpl.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) { + var generatedPrefix = "ns" + prefixIndex.value; + prefixIndex.value++; + prefixMap.set(generatedPrefix, newNamespace); + return generatedPrefix; + }; + /** + * Determines if the namespace prefix map was modified from its original. + * + * @param originalMap - original namespace prefix map + * @param newMap - new namespace prefix map + */ + XMLBuilderCBImpl.prototype._isPrefixMapModified = function (originalMap, newMap) { + var items1 = originalMap._items; + var items2 = newMap._items; + var nullItems1 = originalMap._nullItems; + var nullItems2 = newMap._nullItems; + for (var key in items2) { + var arr1 = items1[key]; + if (arr1 === undefined) + return true; + var arr2 = items2[key]; + if (arr1.length !== arr2.length) + return true; + for (var i = 0; i < arr1.length; i++) { + if (arr1[i] !== arr2[i]) + return true; + } + } + if (nullItems1.length !== nullItems2.length) + return true; + for (var i = 0; i < nullItems1.length; i++) { + if (nullItems1[i] !== nullItems2[i]) + return true; + } + return false; + }; + XMLBuilderCBImpl._VoidElementNames = new Set(['area', 'base', 'basefont', + 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', + 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); + return XMLBuilderCBImpl; +}(events_1.EventEmitter)); +exports.XMLBuilderCBImpl = XMLBuilderCBImpl; +//# sourceMappingURL=XMLBuilderCBImpl.js.map /***/ }), -/***/ 10554: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 48248: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kHeadersList, kConstruct } = __nccwpck_require__(72785) -const { kGuard } = __nccwpck_require__(15861) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { - makeIterator, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(52538) -const { webidl } = __nccwpck_require__(21744) -const assert = __nccwpck_require__(39491) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function isHTTPWhiteSpaceCharCode (code) { - return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize - * @param {string} potentialValue - */ -function headerValueNormalize (potentialValue) { - // To normalize a byte sequence potentialValue, remove - // any leading and trailing HTTP whitespace bytes from - // potentialValue. - let i = 0; let j = potentialValue.length - - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: - - // 1. If object is a sequence, then for each header in object: - // Note: webidl conversion to array has already been done. - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i] - // 1. If header does not contain exactly two items, then throw a TypeError. - if (header.length !== 2) { - throw webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) - } - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } - } else if (typeof object === 'object' && object !== null) { - // Note: null should throw - - // 2. Otherwise, object is a record, then for each key → value in object, - // append (key, value) to headers - const keys = Object.keys(object) - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]) + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) - } -} - + return ar; +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(56417); +var util_1 = __nccwpck_require__(76195); +var writers_1 = __nccwpck_require__(17476); +var interfaces_2 = __nccwpck_require__(27305); +var util_2 = __nccwpck_require__(65282); +var algorithm_1 = __nccwpck_require__(61); +var dom_1 = __nccwpck_require__(40770); +var infra_1 = __nccwpck_require__(84251); +var readers_1 = __nccwpck_require__(90560); /** - * @see https://fetch.spec.whatwg.org/#concept-headers-append + * Represents a wrapper that extends XML nodes to implement easy to use and + * chainable document builder methods. */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } +var XMLBuilderImpl = /** @class */ (function () { + /** + * Initializes a new instance of `XMLBuilderNodeImpl`. + * + * @param domNode - the DOM node to wrap + */ + function XMLBuilderImpl(domNode) { + this._domNode = domNode; + } + Object.defineProperty(XMLBuilderImpl.prototype, "node", { + /** @inheritdoc */ + get: function () { return this._domNode; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(XMLBuilderImpl.prototype, "options", { + /** @inheritdoc */ + get: function () { return this._options; }, + enumerable: true, + configurable: true + }); + /** @inheritdoc */ + XMLBuilderImpl.prototype.set = function (options) { + this._options = util_1.applyDefaults(util_1.applyDefaults(this._options, options, true), // apply user settings + interfaces_1.DefaultBuilderOptions); // provide defaults + return this; + }; + /** @inheritdoc */ + XMLBuilderImpl.prototype.ele = function (p1, p2, p3) { + var _a, _b, _c; + var namespace; + var name; + var attributes; + if (util_1.isObject(p1)) { + // ele(obj: ExpandObject) + return new readers_1.ObjectReader(this._options).parse(this, p1); + } + else if (p1 !== null && /^\s* 0) { + if (namespace === undefined) + namespace = name.slice(atIndex + 1); + name = name.slice(0, atIndex); + } + if (namespace === undefined) { + // look-up default namespace + namespace = (ele ? this._options.defaultNamespace.ele : this._options.defaultNamespace.att); + } + else if (namespace !== null && namespace[0] === "@") { + // look-up namespace aliases + var alias = namespace.slice(1); + namespace = this._options.namespaceAlias[alias]; + if (namespace === undefined) { + throw new Error("Namespace alias `" + alias + "` is not defined. " + this._debugInfo()); + } + } + return [namespace, name]; + }; + /** + * Updates the element's namespace. + * + * @param ns - new namespace + */ + XMLBuilderImpl.prototype._updateNamespace = function (ns) { + var e_2, _a, e_3, _b; + var ele = this._domNode; + if (util_2.Guard.isElementNode(ele) && ns !== null && ele.namespaceURI !== ns) { + var _c = __read(algorithm_1.namespace_extractQName(ele.prefix ? ele.prefix + ':' + ele.localName : ele.localName), 2), elePrefix = _c[0], eleLocalName = _c[1]; + // re-create the element node if its namespace changed + // we can't simply change the namespaceURI since its read-only + var newEle = algorithm_1.create_element(this._doc, eleLocalName, ns, elePrefix); + try { + for (var _d = __values(ele.attributes), _e = _d.next(); !_e.done; _e = _d.next()) { + var attr = _e.value; + var attrQName = attr.prefix ? attr.prefix + ':' + attr.localName : attr.localName; + var _f = __read(algorithm_1.namespace_extractQName(attrQName), 1), attrPrefix = _f[0]; + var newAttrNS = attr.namespaceURI; + if (newAttrNS === null && attrPrefix !== null) { + newAttrNS = ele.lookupNamespaceURI(attrPrefix); + } + if (newAttrNS === null) { + newEle.setAttribute(attrQName, attr.value); + } + else { + newEle.setAttributeNS(newAttrNS, attrQName, attr.value); + } + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + } + finally { if (e_2) throw e_2.error; } + } + // replace the new node in parent node + var parent = ele.parentNode; + /* istanbul ignore next */ + if (parent === null) { + throw new Error("Parent node is null." + this._debugInfo()); + } + parent.replaceChild(newEle, ele); + this._domNode = newEle; + try { + // check child nodes + for (var _g = __values(ele.childNodes), _h = _g.next(); !_h.done; _h = _g.next()) { + var childNode = _h.value; + var newChildNode = childNode.cloneNode(true); + newEle.appendChild(newChildNode); + if (util_2.Guard.isElementNode(newChildNode)) { + var _j = __read(algorithm_1.namespace_extractQName(newChildNode.prefix ? newChildNode.prefix + ':' + newChildNode.localName : newChildNode.localName), 1), newChildNodePrefix = _j[0]; + var newChildNodeNS = newEle.lookupNamespaceURI(newChildNodePrefix); + new XMLBuilderImpl(newChildNode)._updateNamespace(newChildNodeNS); + } + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_h && !_h.done && (_b = _g.return)) _b.call(_g); + } + finally { if (e_3) throw e_3.error; } + } + } + }; + Object.defineProperty(XMLBuilderImpl.prototype, "_doc", { + /** + * Returns the document owning this node. + */ + get: function () { + var node = this.node; + if (util_2.Guard.isDocumentNode(node)) { + return node; + } + else { + var docNode = node.ownerDocument; + /* istanbul ignore next */ + if (!docNode) + throw new Error("Owner document is null. " + this._debugInfo()); + return docNode; + } + }, + enumerable: true, + configurable: true + }); + /** + * Returns debug information for this node. + * + * @param name - node name + */ + XMLBuilderImpl.prototype._debugInfo = function (name) { + var node = this.node; + var parentNode = node.parentNode; + name = name || node.nodeName; + var parentName = parentNode ? parentNode.nodeName : ''; + if (!parentName) { + return "node: <" + name + ">"; + } + else { + return "node: <" + name + ">, parent: <" + parentName + ">"; + } + }; + Object.defineProperty(XMLBuilderImpl.prototype, "_options", { + /** + * Gets or sets builder options. + */ + get: function () { + var doc = this._doc; + /* istanbul ignore next */ + if (doc._xmlBuilderOptions === undefined) { + throw new Error("Builder options is not set."); + } + return doc._xmlBuilderOptions; + }, + set: function (value) { + var doc = this._doc; + doc._xmlBuilderOptions = value; + }, + enumerable: true, + configurable: true + }); + return XMLBuilderImpl; +}()); +exports.XMLBuilderImpl = XMLBuilderImpl; +//# sourceMappingURL=XMLBuilderImpl.js.map - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // Note: undici does not implement forbidden header names - if (headers[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (headers[kGuard] === 'request-no-cors') { - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - } +/***/ }), - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. +/***/ 40770: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 7. Append (name, value) to headers’s header list. - return headers[kHeadersList].append(name, value) +"use strict"; - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers +Object.defineProperty(exports, "__esModule", ({ value: true })); +var dom_1 = __nccwpck_require__(54646); +var dom_2 = __nccwpck_require__(50633); +var util_1 = __nccwpck_require__(76195); +dom_2.dom.setFeatures(false); +/** + * Creates an XML document without any child nodes. + */ +function createDocument() { + var impl = new dom_1.DOMImplementation(); + var doc = impl.createDocument(null, 'root', null); + /* istanbul ignore else */ + if (doc.documentElement) { + doc.removeChild(doc.documentElement); + } + return doc; } - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null +exports.createDocument = createDocument; +/** + * Sanitizes input strings with user supplied replacement characters. + * + * @param str - input string + * @param replacement - replacement character or function + */ +function sanitizeInput(str, replacement) { + if (str == null) { + return str; } - } - - // https://fetch.spec.whatwg.org/#header-list-contains - contains (name) { - // A header list list contains a header name name if list - // contains a header whose name is a byte-case-insensitive - // match for name. - name = name.toLowerCase() - - return this[kHeadersMap].has(name) - } - - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null - } - - // https://fetch.spec.whatwg.org/#concept-header-list-append - append (name, value) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) + else if (replacement === undefined) { + return str + ""; } - - if (lowercaseName === 'set-cookie') { - this.cookies ??= [] - this.cookies.push(value) + else { + var result = ""; + str = str + ""; + for (var i = 0; i < str.length; i++) { + var n = str.charCodeAt(i); + // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] + if (n === 0x9 || n === 0xA || n === 0xD || + (n >= 0x20 && n <= 0xD7FF) || + (n >= 0xE000 && n <= 0xFFFD)) { + // valid character - not surrogate pair + result += str.charAt(i); + } + else if (n >= 0xD800 && n <= 0xDBFF && i < str.length - 1) { + var n2 = str.charCodeAt(i + 1); + if (n2 >= 0xDC00 && n2 <= 0xDFFF) { + // valid surrogate pair + n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; + result += String.fromCodePoint(n); + i++; + } + else { + // invalid lone surrogate + result += util_1.isString(replacement) ? replacement : replacement(str.charAt(i), i, str); + } + } + else { + // invalid character + result += util_1.isString(replacement) ? replacement : replacement(str.charAt(i), i, str); + } + } + return result; } - } +} +exports.sanitizeInput = sanitizeInput; +//# sourceMappingURL=dom.js.map - // https://fetch.spec.whatwg.org/#concept-header-list-set - set (name, value) { - this[kHeadersSortedMap] = null - const lowercaseName = name.toLowerCase() +/***/ }), - if (lowercaseName === 'set-cookie') { - this.cookies = [value] - } +/***/ 44260: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 1. If list contains name, then set the value of - // the first such header to value and remove the - // others. - // 2. Otherwise, append header (name, value) to list. - this[kHeadersMap].set(lowercaseName, { name, value }) - } +"use strict"; - // https://fetch.spec.whatwg.org/#concept-header-list-delete - delete (name) { - this[kHeadersSortedMap] = null +Object.defineProperty(exports, "__esModule", ({ value: true })); +var XMLBuilderImpl_1 = __nccwpck_require__(48248); +exports.XMLBuilderImpl = XMLBuilderImpl_1.XMLBuilderImpl; +var XMLBuilderCBImpl_1 = __nccwpck_require__(71438); +exports.XMLBuilderCBImpl = XMLBuilderCBImpl_1.XMLBuilderCBImpl; +var BuilderFunctions_1 = __nccwpck_require__(95696); +exports.builder = BuilderFunctions_1.builder; +exports.create = BuilderFunctions_1.create; +exports.fragment = BuilderFunctions_1.fragment; +exports.convert = BuilderFunctions_1.convert; +var BuilderFunctionsCB_1 = __nccwpck_require__(10268); +exports.createCB = BuilderFunctionsCB_1.createCB; +exports.fragmentCB = BuilderFunctionsCB_1.fragmentCB; +//# sourceMappingURL=index.js.map - name = name.toLowerCase() +/***/ }), - if (name === 'set-cookie') { - this.cookies = null - } +/***/ 70151: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this[kHeadersMap].delete(name) - } +"use strict"; - // https://fetch.spec.whatwg.org/#concept-header-list-get - get (name) { - const value = this[kHeadersMap].get(name.toLowerCase()) +Object.defineProperty(exports, "__esModule", ({ value: true })); +var builder_1 = __nccwpck_require__(44260); +exports.builder = builder_1.builder; +exports.create = builder_1.create; +exports.fragment = builder_1.fragment; +exports.convert = builder_1.convert; +exports.createCB = builder_1.createCB; +exports.fragmentCB = builder_1.fragmentCB; +//# sourceMappingURL=index.js.map - // 1. If list does not contain name, then return null. - // 2. Return the values of all headers in list whose name - // is a byte-case-insensitive match for name, - // separated from each other by 0x2C 0x20, in order. - return value === undefined ? null : value.value - } +/***/ }), - * [Symbol.iterator] () { - // use the lowercased name - for (const [name, { value }] of this[kHeadersMap]) { - yield [name, value] - } - } +/***/ 56417: +/***/ ((__unused_webpack_module, exports) => { - get entries () { - const headers = {} +"use strict"; - if (this[kHeadersMap].size) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Defines default values for builder options. + */ +exports.DefaultBuilderOptions = { + version: "1.0", + encoding: undefined, + standalone: undefined, + keepNullNodes: false, + keepNullAttributes: false, + ignoreConverters: false, + convert: { + att: "@", + ins: "?", + text: "#", + cdata: "$", + comment: "!" + }, + defaultNamespace: { + ele: undefined, + att: undefined + }, + namespaceAlias: { + html: "http://www.w3.org/1999/xhtml", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/", + mathml: "http://www.w3.org/1998/Math/MathML", + svg: "http://www.w3.org/2000/svg", + xlink: "http://www.w3.org/1999/xlink" + }, + invalidCharReplacement: undefined, + parser: undefined +}; +/** + * Contains keys of `XMLBuilderOptions`. + */ +exports.XMLBuilderOptionKeys = new Set(Object.keys(exports.DefaultBuilderOptions)); +/** + * Defines default values for builder options. + */ +exports.DefaultXMLBuilderCBOptions = { + format: "xml", + wellFormed: false, + prettyPrint: false, + indent: " ", + newline: "\n", + offset: 0, + width: 0, + allowEmptyTags: false, + spaceBeforeSlash: false, + keepNullNodes: false, + keepNullAttributes: false, + ignoreConverters: false, + convert: { + att: "@", + ins: "?", + text: "#", + cdata: "$", + comment: "!" + }, + defaultNamespace: { + ele: undefined, + att: undefined + }, + namespaceAlias: { + html: "http://www.w3.org/1999/xhtml", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/", + mathml: "http://www.w3.org/1998/Math/MathML", + svg: "http://www.w3.org/2000/svg", + xlink: "http://www.w3.org/1999/xlink" } +}; +//# sourceMappingURL=interfaces.js.map - return headers - } -} - -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - constructor (init = undefined) { - if (init === kConstruct) { - return - } - this[kHeadersList] = new HeadersList() +/***/ }), - // The new Headers(init) constructor steps are: +/***/ 33396: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 1. Set this’s guard to "none". - this[kGuard] = 'none' +"use strict"; - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init) - fill(this, init) +Object.defineProperty(exports, "__esModule", ({ value: true })); +var dom_1 = __nccwpck_require__(40770); +/** + * Pre-serializes XML nodes. + */ +var BaseReader = /** @class */ (function () { + /** + * Initializes a new instance of `BaseReader`. + * + * @param builderOptions - XML builder options + */ + function BaseReader(builderOptions) { + this._builderOptions = builderOptions; + if (builderOptions.parser) { + Object.assign(this, builderOptions.parser); + } } - } - - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) - - name = webidl.converters.ByteString(name) - value = webidl.converters.ByteString(value) - - return appendHeader(this, name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) + BaseReader.prototype._docType = function (parent, name, publicId, systemId) { + return parent.dtd({ name: name, pubID: publicId, sysID: systemId }); + }; + BaseReader.prototype._comment = function (parent, data) { + return parent.com(data); + }; + BaseReader.prototype._text = function (parent, data) { + return parent.txt(data); + }; + BaseReader.prototype._instruction = function (parent, target, data) { + return parent.ins(target, data); + }; + BaseReader.prototype._cdata = function (parent, data) { + return parent.dat(data); + }; + BaseReader.prototype._element = function (parent, namespace, name) { + return (namespace === undefined ? parent.ele(name) : parent.ele(namespace, name)); + }; + BaseReader.prototype._attribute = function (parent, namespace, name, value) { + return (namespace === undefined ? parent.att(name, value) : parent.att(namespace, name, value)); + }; + BaseReader.prototype._sanitize = function (str) { + return dom_1.sanitizeInput(str, this._builderOptions.invalidCharReplacement); + }; + /** + * Main parser function which parses the given object and returns an XMLBuilder. + * + * @param node - node to recieve parsed content + * @param obj - object to parse + */ + BaseReader.prototype.parse = function (node, obj) { + return this._parse(node, obj); + }; + /** + * Creates a DocType node. + * The node will be skipped if the function returns `undefined`. + * + * @param name - node name + * @param publicId - public identifier + * @param systemId - system identifier + */ + BaseReader.prototype.docType = function (parent, name, publicId, systemId) { + return this._docType(parent, name, publicId, systemId); + }; + /** + * Creates a comment node. + * The node will be skipped if the function returns `undefined`. + * + * @param parent - parent node + * @param data - node data + */ + BaseReader.prototype.comment = function (parent, data) { + return this._comment(parent, data); + }; + /** + * Creates a text node. + * The node will be skipped if the function returns `undefined`. + * + * @param parent - parent node + * @param data - node data + */ + BaseReader.prototype.text = function (parent, data) { + return this._text(parent, data); + }; + /** + * Creates a processing instruction node. + * The node will be skipped if the function returns `undefined`. + * + * @param parent - parent node + * @param target - instruction target + * @param data - node data + */ + BaseReader.prototype.instruction = function (parent, target, data) { + return this._instruction(parent, target, data); + }; + /** + * Creates a CData section node. + * The node will be skipped if the function returns `undefined`. + * + * @param parent - parent node + * @param data - node data + */ + BaseReader.prototype.cdata = function (parent, data) { + return this._cdata(parent, data); + }; + /** + * Creates an element node. + * The node will be skipped if the function returns `undefined`. + * + * @param parent - parent node + * @param namespace - node namespace + * @param name - node name + */ + BaseReader.prototype.element = function (parent, namespace, name) { + return this._element(parent, namespace, name); + }; + /** + * Creates an attribute or namespace declaration. + * The node will be skipped if the function returns `undefined`. + * + * @param parent - parent node + * @param namespace - node namespace + * @param name - node name + * @param value - node value + */ + BaseReader.prototype.attribute = function (parent, namespace, name, value) { + return this._attribute(parent, namespace, name, value); + }; + /** + * Sanitizes input strings. + * + * @param str - input string + */ + BaseReader.prototype.sanitize = function (str) { + return this._sanitize(str); + }; + return BaseReader; +}()); +exports.BaseReader = BaseReader; +//# sourceMappingURL=BaseReader.js.map - name = webidl.converters.ByteString(name) +/***/ }), - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) - } +/***/ 43518: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 2. If this’s guard is "immutable", then throw a TypeError. - // 3. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 4. Otherwise, if this’s guard is "request-no-cors", name - // is not a no-CORS-safelisted request-header name, and - // name is not a privileged no-CORS request-header name, - // return. - // 5. Otherwise, if this’s guard is "response" and name is - // a forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // TODO - } +"use strict"; - // 6. If this’s header list does not contain name, then - // return. - if (!this[kHeadersList].contains(name)) { - return +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ObjectReader_1 = __nccwpck_require__(40768); +var BaseReader_1 = __nccwpck_require__(33396); +/** + * Parses XML nodes from a JSON string. + */ +var JSONReader = /** @class */ (function (_super) { + __extends(JSONReader, _super); + function JSONReader() { + return _super !== null && _super.apply(this, arguments) || this; } + /** + * Parses the given document representation. + * + * @param node - node receive parsed XML nodes + * @param str - JSON string to parse + */ + JSONReader.prototype._parse = function (node, str) { + return new ObjectReader_1.ObjectReader(this._builderOptions).parse(node, JSON.parse(str)); + }; + return JSONReader; +}(BaseReader_1.BaseReader)); +exports.JSONReader = JSONReader; +//# sourceMappingURL=JSONReader.js.map - // 7. Delete name from this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this. - this[kHeadersList].delete(name) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) +/***/ }), - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) +/***/ 40768: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - name = webidl.converters.ByteString(name) +"use strict"; - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.get', - value: name, - type: 'header name' - }) +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +var BaseReader_1 = __nccwpck_require__(33396); +/** + * Parses XML nodes from objects and arrays. + * ES6 maps and sets are also supoorted. + */ +var ObjectReader = /** @class */ (function (_super) { + __extends(ObjectReader, _super); + function ObjectReader() { + return _super !== null && _super.apply(this, arguments) || this; } + /** + * Parses the given document representation. + * + * @param node - node receive parsed XML nodes + * @param obj - object to parse + */ + ObjectReader.prototype._parse = function (node, obj) { + var _this = this; + var options = this._builderOptions; + var lastChild = null; + if (util_1.isFunction(obj)) { + // evaluate if function + lastChild = this.parse(node, obj.apply(this)); + } + else if (util_1.isArray(obj) || util_1.isSet(obj)) { + util_1.forEachArray(obj, function (item) { return lastChild = _this.parse(node, item); }, this); + } + else /* if (isMap(obj) || isObject(obj)) */ { + // expand if object + util_1.forEachObject(obj, function (key, val) { + if (util_1.isFunction(val)) { + // evaluate if function + val = val.apply(_this); + } + if (!options.ignoreConverters && key.indexOf(options.convert.att) === 0) { + // assign attributes + if (key === options.convert.att) { + if (util_1.isArray(val) || util_1.isSet(val)) { + throw new Error("Invalid attribute: " + val.toString() + ". " + node._debugInfo()); + } + else /* if (isMap(val) || isObject(val)) */ { + util_1.forEachObject(val, function (attrKey, attrVal) { + lastChild = _this.attribute(node, undefined, _this.sanitize(attrKey), _this.sanitize(attrVal)) || lastChild; + }); + } + } + else { + lastChild = _this.attribute(node, undefined, _this.sanitize(key.substr(options.convert.att.length)), _this.sanitize(val)) || lastChild; + } + } + else if (!options.ignoreConverters && key.indexOf(options.convert.text) === 0) { + // text node + if (util_1.isMap(val) || util_1.isObject(val)) { + // if the key is #text expand child nodes under this node to support mixed content + lastChild = _this.parse(node, val); + } + else { + lastChild = _this.text(node, _this.sanitize(val)) || lastChild; + } + } + else if (!options.ignoreConverters && key.indexOf(options.convert.cdata) === 0) { + // cdata node + if (util_1.isArray(val) || util_1.isSet(val)) { + util_1.forEachArray(val, function (item) { return lastChild = _this.cdata(node, _this.sanitize(item)) || lastChild; }, _this); + } + else { + lastChild = _this.cdata(node, _this.sanitize(val)) || lastChild; + } + } + else if (!options.ignoreConverters && key.indexOf(options.convert.comment) === 0) { + // comment node + if (util_1.isArray(val) || util_1.isSet(val)) { + util_1.forEachArray(val, function (item) { return lastChild = _this.comment(node, _this.sanitize(item)) || lastChild; }, _this); + } + else { + lastChild = _this.comment(node, _this.sanitize(val)) || lastChild; + } + } + else if (!options.ignoreConverters && key.indexOf(options.convert.ins) === 0) { + // processing instruction + if (util_1.isString(val)) { + var insIndex = val.indexOf(' '); + var insTarget = (insIndex === -1 ? val : val.substr(0, insIndex)); + var insValue = (insIndex === -1 ? '' : val.substr(insIndex + 1)); + lastChild = _this.instruction(node, _this.sanitize(insTarget), _this.sanitize(insValue)) || lastChild; + } + else if (util_1.isArray(val) || util_1.isSet(val)) { + util_1.forEachArray(val, function (item) { + var insIndex = item.indexOf(' '); + var insTarget = (insIndex === -1 ? item : item.substr(0, insIndex)); + var insValue = (insIndex === -1 ? '' : item.substr(insIndex + 1)); + lastChild = _this.instruction(node, _this.sanitize(insTarget), _this.sanitize(insValue)) || lastChild; + }, _this); + } + else /* if (isMap(target) || isObject(target)) */ { + util_1.forEachObject(val, function (insTarget, insValue) { return lastChild = _this.instruction(node, _this.sanitize(insTarget), _this.sanitize(insValue)) || lastChild; }, _this); + } + } + else if ((util_1.isArray(val) || util_1.isSet(val)) && util_1.isEmpty(val)) { + // skip empty arrays + } + else if ((util_1.isMap(val) || util_1.isObject(val)) && util_1.isEmpty(val)) { + // empty objects produce one node + lastChild = _this.element(node, undefined, _this.sanitize(key)) || lastChild; + } + else if (!options.keepNullNodes && (val == null)) { + // skip null and undefined nodes + } + else if (util_1.isArray(val) || util_1.isSet(val)) { + // expand list by creating child nodes + util_1.forEachArray(val, function (item) { + var childNode = {}; + childNode[key] = item; + lastChild = _this.parse(node, childNode); + }, _this); + } + else if (util_1.isMap(val) || util_1.isObject(val)) { + // create a parent node + var parent = _this.element(node, undefined, _this.sanitize(key)); + if (parent) { + lastChild = parent; + // expand child nodes under parent + _this.parse(parent, val); + } + } + else if (val != null && val !== '') { + // leaf element node with a single text node + var parent = _this.element(node, undefined, _this.sanitize(key)); + if (parent) { + lastChild = parent; + _this.text(parent, _this.sanitize(val)); + } + } + else { + // leaf element node + lastChild = _this.element(node, undefined, _this.sanitize(key)) || lastChild; + } + }, this); + } + return lastChild || node; + }; + return ObjectReader; +}(BaseReader_1.BaseReader)); +exports.ObjectReader = ObjectReader; +//# sourceMappingURL=ObjectReader.js.map - // 2. Return the result of getting name from this’s header - // list. - return this[kHeadersList].get(name) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) +/***/ }), - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) +/***/ 65044: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - name = webidl.converters.ByteString(name) +"use strict"; - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.has', - value: name, - type: 'header name' - }) +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var XMLStringLexer_1 = __nccwpck_require__(47061); +var interfaces_1 = __nccwpck_require__(97707); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); +var BaseReader_1 = __nccwpck_require__(33396); +/** + * Parses XML nodes from an XML document string. + */ +var XMLReader = /** @class */ (function (_super) { + __extends(XMLReader, _super); + function XMLReader() { + return _super !== null && _super.apply(this, arguments) || this; + } + /** + * Parses the given document representation. + * + * @param node - node receive parsed XML nodes + * @param str - XML document string to parse + */ + XMLReader.prototype._parse = function (node, str) { + var e_1, _a, e_2, _b; + var lexer = new XMLStringLexer_1.XMLStringLexer(str, { skipWhitespaceOnlyText: true }); + var context = node; + var token = lexer.nextToken(); + while (token.type !== interfaces_1.TokenType.EOF) { + switch (token.type) { + case interfaces_1.TokenType.Declaration: + var declaration = token; + var version = this.sanitize(declaration.version); + if (version !== "1.0") { + throw new Error("Invalid xml version: " + version); + } + var builderOptions = { + version: version + }; + if (declaration.encoding) { + builderOptions.encoding = this.sanitize(declaration.encoding); + } + if (declaration.standalone) { + builderOptions.standalone = (this.sanitize(declaration.standalone) === "yes"); + } + context.set(builderOptions); + break; + case interfaces_1.TokenType.DocType: + var doctype = token; + context = this.docType(context, this.sanitize(doctype.name), this.sanitize(doctype.pubId), this.sanitize(doctype.sysId)) || context; + break; + case interfaces_1.TokenType.CDATA: + var cdata = token; + context = this.cdata(context, this.sanitize(cdata.data)) || context; + break; + case interfaces_1.TokenType.Comment: + var comment = token; + context = this.comment(context, this.sanitize(comment.data)) || context; + break; + case interfaces_1.TokenType.PI: + var pi = token; + context = this.instruction(context, this.sanitize(pi.target), this.sanitize(pi.data)) || context; + break; + case interfaces_1.TokenType.Text: + var text = token; + context = this.text(context, this.sanitize(text.data)) || context; + break; + case interfaces_1.TokenType.Element: + var element = token; + var elementName = this.sanitize(element.name); + // inherit namespace from parent + var _c = __read(algorithm_1.namespace_extractQName(elementName), 1), prefix = _c[0]; + var namespace = context.node.lookupNamespaceURI(prefix); + // override namespace if there is a namespace declaration + // attribute + // also lookup namespace declaration attributes + var nsDeclarations = {}; + try { + for (var _d = (e_1 = void 0, __values(element.attributes)), _e = _d.next(); !_e.done; _e = _d.next()) { + var _f = __read(_e.value, 2), attName = _f[0], attValue = _f[1]; + attName = this.sanitize(attName); + attValue = this.sanitize(attValue); + if (attName === "xmlns") { + namespace = attValue; + } + else { + var _g = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _g[0], attLocalName = _g[1]; + if (attPrefix === "xmlns") { + if (attLocalName === prefix) { + namespace = attValue; + } + nsDeclarations[attLocalName] = attValue; + } + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_e && !_e.done && (_a = _d.return)) _a.call(_d); + } + finally { if (e_1) throw e_1.error; } + } + // create the DOM element node + var elementNode = (namespace !== null ? + this.element(context, namespace, elementName) : + this.element(context, undefined, elementName)); + if (elementNode === undefined) + break; + try { + // assign attributes + for (var _h = (e_2 = void 0, __values(element.attributes)), _j = _h.next(); !_j.done; _j = _h.next()) { + var _k = __read(_j.value, 2), attName = _k[0], attValue = _k[1]; + attName = this.sanitize(attName); + attValue = this.sanitize(attValue); + var _l = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _l[0], attLocalName = _l[1]; + var attNamespace = null; + if (attPrefix === "xmlns" || (attPrefix === null && attLocalName === "xmlns")) { + // namespace declaration attribute + attNamespace = infra_1.namespace.XMLNS; + } + else { + attNamespace = elementNode.node.lookupNamespaceURI(attPrefix); + if (attNamespace !== null && elementNode.node.isDefaultNamespace(attNamespace)) { + attNamespace = null; + } + else if (attNamespace === null && attPrefix !== null) { + attNamespace = nsDeclarations[attPrefix] || null; + } + } + if (attNamespace !== null) + this.attribute(elementNode, attNamespace, attName, attValue); + else + this.attribute(elementNode, undefined, attName, attValue); + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_j && !_j.done && (_b = _h.return)) _b.call(_h); + } + finally { if (e_2) throw e_2.error; } + } + if (!element.selfClosing) { + context = elementNode; + } + break; + case interfaces_1.TokenType.ClosingTag: + /* istanbul ignore else */ + if (context.node.parentNode) { + context = context.up(); + } + break; + } + token = lexer.nextToken(); + } + return context; + }; + return XMLReader; +}(BaseReader_1.BaseReader)); +exports.XMLReader = XMLReader; +//# sourceMappingURL=XMLReader.js.map - // 2. Return true if this’s header list contains name; - // otherwise false. - return this[kHeadersList].contains(name) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) - - name = webidl.converters.ByteString(name) - value = webidl.converters.ByteString(value) +/***/ }), - // 1. Normalize value. - value = headerValueNormalize(value) +/***/ 12475: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.set', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.set', - value, - type: 'header value' - }) - } +"use strict"; - // 3. If this’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if this’s guard is "request" and name is a - // forbidden header name, return. - // 5. Otherwise, if this’s guard is "request-no-cors" and - // name/value is not a no-CORS-safelisted request-header, - // return. - // 6. Otherwise, if this’s guard is "response" and name is a - // forbidden response-header name, return. - // Note: undici does not implement forbidden header names - if (this[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // TODO +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ObjectReader_1 = __nccwpck_require__(40768); +var BaseReader_1 = __nccwpck_require__(33396); +var js_yaml_1 = __nccwpck_require__(10829); +/** + * Parses XML nodes from a YAML string. + */ +var YAMLReader = /** @class */ (function (_super) { + __extends(YAMLReader, _super); + function YAMLReader() { + return _super !== null && _super.apply(this, arguments) || this; } + /** + * Parses the given document representation. + * + * @param node - node receive parsed XML nodes + * @param str - YAML string to parse + */ + YAMLReader.prototype._parse = function (node, str) { + var result = js_yaml_1.safeLoad(str); + /* istanbul ignore next */ + if (result === undefined) { + throw new Error("Unable to parse YAML document."); + } + return new ObjectReader_1.ObjectReader(this._builderOptions).parse(node, result); + }; + return YAMLReader; +}(BaseReader_1.BaseReader)); +exports.YAMLReader = YAMLReader; +//# sourceMappingURL=YAMLReader.js.map - // 7. Set (name, value) in this’s header list. - // 8. If this’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from this - this[kHeadersList].set(name, value) - } +/***/ }), - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, Headers) +/***/ 90560: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 1. If this’s header list does not contain `Set-Cookie`, then return « ». - // 2. Return the values of all headers in this’s header list whose name is - // a byte-case-insensitive match for `Set-Cookie`, in order. +"use strict"; - const list = this[kHeadersList].cookies +Object.defineProperty(exports, "__esModule", ({ value: true })); +var XMLReader_1 = __nccwpck_require__(65044); +exports.XMLReader = XMLReader_1.XMLReader; +var ObjectReader_1 = __nccwpck_require__(40768); +exports.ObjectReader = ObjectReader_1.ObjectReader; +var JSONReader_1 = __nccwpck_require__(43518); +exports.JSONReader = JSONReader_1.JSONReader; +var YAMLReader_1 = __nccwpck_require__(12475); +exports.YAMLReader = YAMLReader_1.YAMLReader; +//# sourceMappingURL=index.js.map - if (list) { - return [...list] - } +/***/ }), - return [] - } +/***/ 50708: +/***/ ((__unused_webpack_module, exports) => { - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this[kHeadersList][kHeadersSortedMap]) { - return this[kHeadersList][kHeadersSortedMap] +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Pre-serializes XML nodes. + */ +var BaseCBWriter = /** @class */ (function () { + /** + * Initializes a new instance of `BaseCBWriter`. + * + * @param builderOptions - XML builder options + */ + function BaseCBWriter(builderOptions) { + /** + * Gets the current depth of the XML tree. + */ + this.level = 0; + this._builderOptions = builderOptions; + this._writerOptions = builderOptions; } + return BaseCBWriter; +}()); +exports.BaseCBWriter = BaseCBWriter; +//# sourceMappingURL=BaseCBWriter.js.map - // 1. Let headers be an empty list of headers with the key being the name - // and value the value. - const headers = [] +/***/ }), - // 2. Let names be the result of convert header names to a sorted-lowercase - // set with all the names of the headers in list. - const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) - const cookies = this[kHeadersList].cookies +/***/ 37644: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 3. For each name of names: - for (let i = 0; i < names.length; ++i) { - const [name, value] = names[i] - // 1. If name is `set-cookie`, then: - if (name === 'set-cookie') { - // 1. Let values be a list of all values of headers in list whose name - // is a byte-case-insensitive match for name, in order. +"use strict"; - // 2. For each value of values: - // 1. Append (name, value) to headers. - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]) +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var interfaces_1 = __nccwpck_require__(27305); +var LocalNameSet_1 = __nccwpck_require__(19049); +var NamespacePrefixMap_1 = __nccwpck_require__(90283); +var infra_1 = __nccwpck_require__(84251); +var algorithm_1 = __nccwpck_require__(61); +/** + * Pre-serializes XML nodes. + */ +var BaseWriter = /** @class */ (function () { + /** + * Initializes a new instance of `BaseWriter`. + * + * @param builderOptions - XML builder options + */ + function BaseWriter(builderOptions) { + /** + * Gets the current depth of the XML tree. + */ + this.level = 0; + this._builderOptions = builderOptions; + } + /** + * Used by derived classes to serialize the XML declaration. + * + * @param version - a version number string + * @param encoding - encoding declaration + * @param standalone - standalone document declaration + */ + BaseWriter.prototype.declaration = function (version, encoding, standalone) { }; + /** + * Used by derived classes to serialize a DocType node. + * + * @param name - node name + * @param publicId - public identifier + * @param systemId - system identifier + */ + BaseWriter.prototype.docType = function (name, publicId, systemId) { }; + /** + * Used by derived classes to serialize a comment node. + * + * @param data - node data + */ + BaseWriter.prototype.comment = function (data) { }; + /** + * Used by derived classes to serialize a text node. + * + * @param data - node data + */ + BaseWriter.prototype.text = function (data) { }; + /** + * Used by derived classes to serialize a processing instruction node. + * + * @param target - instruction target + * @param data - node data + */ + BaseWriter.prototype.instruction = function (target, data) { }; + /** + * Used by derived classes to serialize a CData section node. + * + * @param data - node data + */ + BaseWriter.prototype.cdata = function (data) { }; + /** + * Used by derived classes to serialize the beginning of the opening tag of an + * element node. + * + * @param name - node name + */ + BaseWriter.prototype.openTagBegin = function (name) { }; + /** + * Used by derived classes to serialize the ending of the opening tag of an + * element node. + * + * @param name - node name + * @param selfClosing - whether the element node is self closing + * @param voidElement - whether the element node is a HTML void element + */ + BaseWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { }; + /** + * Used by derived classes to serialize the closing tag of an element node. + * + * @param name - node name + */ + BaseWriter.prototype.closeTag = function (name) { }; + /** + * Used by derived classes to serialize attributes or namespace declarations. + * + * @param attributes - attribute array + */ + BaseWriter.prototype.attributes = function (attributes) { + var e_1, _a; + try { + for (var attributes_1 = __values(attributes), attributes_1_1 = attributes_1.next(); !attributes_1_1.done; attributes_1_1 = attributes_1.next()) { + var attr = attributes_1_1.value; + this.attribute(attr[1] === null ? attr[2] : attr[1] + ':' + attr[2], attr[3]); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (attributes_1_1 && !attributes_1_1.done && (_a = attributes_1.return)) _a.call(attributes_1); + } + finally { if (e_1) throw e_1.error; } + } + }; + /** + * Used by derived classes to serialize an attribute or namespace declaration. + * + * @param name - node name + * @param value - node value + */ + BaseWriter.prototype.attribute = function (name, value) { }; + /** + * Used by derived classes to perform any pre-processing steps before starting + * serializing an element node. + * + * @param name - node name + */ + BaseWriter.prototype.beginElement = function (name) { }; + /** + * Used by derived classes to perform any post-processing steps after + * completing serializing an element node. + * + * @param name - node name + */ + BaseWriter.prototype.endElement = function (name) { }; + /** + * Produces an XML serialization of the given node. The pre-serializer inserts + * namespace declarations where necessary and produces qualified names for + * nodes and attributes. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype.serializeNode = function (node, requireWellFormed, noDoubleEncoding) { + var hasNamespaces = (node._nodeDocument !== undefined && node._nodeDocument._hasNamespaces); + this.level = 0; + this.currentNode = node; + if (hasNamespaces) { + /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization + * + * 1. Let namespace be a context namespace with value null. + * The context namespace tracks the XML serialization algorithm's current + * default namespace. The context namespace is changed when either an Element + * Node has a default namespace declaration, or the algorithm generates a + * default namespace declaration for the Element Node to match its own + * namespace. The algorithm assumes no namespace (null) to start. + * 2. Let prefix map be a new namespace prefix map. + * 3. Add the XML namespace with prefix value "xml" to prefix map. + * 4. Let prefix index be a generated namespace prefix index with value 1. + * The generated namespace prefix index is used to generate a new unique + * prefix value when no suitable existing namespace prefix is available to + * serialize a node's namespaceURI (or the namespaceURI of one of node's + * attributes). See the generate a prefix algorithm. + */ + var namespace = null; + var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap(); + prefixMap.set("xml", infra_1.namespace.XML); + var prefixIndex = { value: 1 }; + /** + * 5. Return the result of running the XML serialization algorithm on node + * passing the context namespace namespace, namespace prefix map prefix map, + * generated namespace prefix index reference to prefix index, and the + * flag require well-formed. If an exception occurs during the execution + * of the algorithm, then catch that exception and throw an + * "InvalidStateError" DOMException. + */ + this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); + } + else { + this._serializeNode(node, requireWellFormed, noDoubleEncoding); + } + }; + /** + * Produces an XML serialization of a node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { + this.currentNode = node; + switch (node.nodeType) { + case interfaces_1.NodeType.Element: + this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.Document: + this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.Comment: + this._serializeComment(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.Text: + this._serializeText(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.DocumentFragment: + this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.DocumentType: + this._serializeDocumentType(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.ProcessingInstruction: + this._serializeProcessingInstruction(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.CData: + this._serializeCData(node, requireWellFormed, noDoubleEncoding); + break; + default: + throw new Error("Unknown node type: " + node.nodeType); + } + }; + /** + * Produces an XML serialization of a node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeNode = function (node, requireWellFormed, noDoubleEncoding) { + this.currentNode = node; + switch (node.nodeType) { + case interfaces_1.NodeType.Element: + this._serializeElement(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.Document: + this._serializeDocument(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.Comment: + this._serializeComment(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.Text: + this._serializeText(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.DocumentFragment: + this._serializeDocumentFragment(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.DocumentType: + this._serializeDocumentType(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.ProcessingInstruction: + this._serializeProcessingInstruction(node, requireWellFormed, noDoubleEncoding); + break; + case interfaces_1.NodeType.CData: + this._serializeCData(node, requireWellFormed, noDoubleEncoding); + break; + default: + throw new Error("Unknown node type: " + node.nodeType); + } + }; + /** + * Produces an XML serialization of an element node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { + var e_2, _a; + var attributes = []; + /** + * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node + * + * 1. If the require well-formed flag is set (its value is true), and this + * node's localName attribute contains the character ":" (U+003A COLON) or + * does not match the XML Name production, then throw an exception; the + * serialization of this node would not be a well-formed element. + */ + if (requireWellFormed && (node.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(node.localName))) { + throw new Error("Node local name contains invalid characters (well-formed required)."); + } + /** + * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). + * 3. Let qualified name be an empty string. + * 4. Let skip end tag be a boolean flag with value false. + * 5. Let ignore namespace definition attribute be a boolean flag with value + * false. + * 6. Given prefix map, copy a namespace prefix map and let map be the + * result. + * 7. Let local prefixes map be an empty map. The map has unique Node prefix + * strings as its keys, with corresponding namespaceURI Node values as the + * map's key values (in this map, the null namespace is represented by the + * empty string). + * + * _Note:_ This map is local to each element. It is used to ensure there + * are no conflicting prefixes should a new namespace prefix attribute need + * to be generated. It is also used to enable skipping of duplicate prefix + * definitions when writing an element's attributes: the map allows the + * algorithm to distinguish between a prefix in the namespace prefix map + * that might be locally-defined (to the current Element) and one that is + * not. + * 8. Let local default namespace be the result of recording the namespace + * information for node given map and local prefixes map. + * + * _Note:_ The above step will update map with any found namespace prefix + * definitions, add the found prefix definitions to the local prefixes map + * and return a local default namespace value defined by a default namespace + * attribute if one exists. Otherwise it returns null. + * 9. Let inherited ns be a copy of namespace. + * 10. Let ns be the value of node's namespaceURI attribute. + */ + var qualifiedName = ''; + var skipEndTag = false; + var ignoreNamespaceDefinitionAttribute = false; + var map = prefixMap.copy(); + var localPrefixesMap = {}; + var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap); + var inheritedNS = namespace; + var ns = node.namespaceURI; + /** 11. If inherited ns is equal to ns, then: */ + if (inheritedNS === ns) { + /** + * 11.1. If local default namespace is not null, then set ignore + * namespace definition attribute to true. + */ + if (localDefaultNamespace !== null) { + ignoreNamespaceDefinitionAttribute = true; + } + /** + * 11.2. If ns is the XML namespace, then append to qualified name the + * concatenation of the string "xml:" and the value of node's localName. + * 11.3. Otherwise, append to qualified name the value of node's + * localName. The node's prefix if it exists, is dropped. + */ + if (ns === infra_1.namespace.XML) { + qualifiedName = 'xml:' + node.localName; + } + else { + qualifiedName = node.localName; + } + /** 11.4. Append the value of qualified name to markup. */ + this.beginElement(qualifiedName); + this.openTagBegin(qualifiedName); + } + else { + /** + * 12. Otherwise, inherited ns is not equal to ns (the node's own + * namespace is different from the context namespace of its parent). + * Run these sub-steps: + * + * 12.1. Let prefix be the value of node's prefix attribute. + * 12.2. Let candidate prefix be the result of retrieving a preferred + * prefix string prefix from map given namespace ns. The above may return + * null if no namespace key ns exists in map. + */ + var prefix = node.prefix; + /** + * We don't need to run "retrieving a preferred prefix string" algorithm if + * the element has no prefix and its namespace matches to the default + * namespace. + * See: https://github.com/web-platform-tests/wpt/pull/16703 + */ + var candidatePrefix = null; + if (prefix !== null || ns !== localDefaultNamespace) { + candidatePrefix = map.get(prefix, ns); + } + /** + * 12.3. If the value of prefix matches "xmlns", then run the following + * steps: + */ + if (prefix === "xmlns") { + /** + * 12.3.1. If the require well-formed flag is set, then throw an error. + * An Element with prefix "xmlns" will not legally round-trip in a + * conforming XML parser. + */ + if (requireWellFormed) { + throw new Error("An element cannot have the 'xmlns' prefix (well-formed required)."); + } + /** + * 12.3.2. Let candidate prefix be the value of prefix. + */ + candidatePrefix = prefix; + } + /** + * 12.4.Found a suitable namespace prefix: if candidate prefix is not + * null (a namespace prefix is defined which maps to ns), then: + */ + if (candidatePrefix !== null) { + /** + * The following may serialize a different prefix than the Element's + * existing prefix if it already had one. However, the retrieving a + * preferred prefix string algorithm already tried to match the + * existing prefix if possible. + * + * 12.4.1. Append to qualified name the concatenation of candidate + * prefix, ":" (U+003A COLON), and node's localName. There exists on + * this node or the node's ancestry a namespace prefix definition that + * defines the node's namespace. + * 12.4.2. If the local default namespace is not null (there exists a + * locally-defined default namespace declaration attribute) and its + * value is not the XML namespace, then let inherited ns get the value + * of local default namespace unless the local default namespace is the + * empty string in which case let it get null (the context namespace + * is changed to the declared default, rather than this node's own + * namespace). + * + * _Note:_ Any default namespace definitions or namespace prefixes that + * define the XML namespace are omitted when serializing this node's + * attributes. + */ + qualifiedName = candidatePrefix + ':' + node.localName; + if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) { + inheritedNS = localDefaultNamespace || null; + } + /** + * 12.4.3. Append the value of qualified name to markup. + */ + this.beginElement(qualifiedName); + this.openTagBegin(qualifiedName); + /** 12.5. Otherwise, if prefix is not null, then: */ + } + else if (prefix !== null) { + /** + * _Note:_ By this step, there is no namespace or prefix mapping + * declaration in this node (or any parent node visited by this + * algorithm) that defines prefix otherwise the step labelled Found + * a suitable namespace prefix would have been followed. The sub-steps + * that follow will create a new namespace prefix declaration for prefix + * and ensure that prefix does not conflict with an existing namespace + * prefix declaration of the same localName in node's attribute list. + * + * 12.5.1. If the local prefixes map contains a key matching prefix, + * then let prefix be the result of generating a prefix providing as + * input map, ns, and prefix index. + */ + if (prefix in localPrefixesMap) { + prefix = this._generatePrefix(ns, map, prefixIndex); + } + /** + * 12.5.2. Add prefix to map given namespace ns. + * 12.5.3. Append to qualified name the concatenation of prefix, ":" + * (U+003A COLON), and node's localName. + * 12.5.4. Append the value of qualified name to markup. + */ + map.set(prefix, ns); + qualifiedName += prefix + ':' + node.localName; + this.beginElement(qualifiedName); + this.openTagBegin(qualifiedName); + /** + * 12.5.5. Append the following to markup, in the order listed: + * + * _Note:_ The following serializes a namespace prefix declaration for + * prefix which was just added to the map. + * + * 12.5.5.1. " " (U+0020 SPACE); + * 12.5.5.2. The string "xmlns:"; + * 12.5.5.3. The value of prefix; + * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 12.5.5.5. The result of serializing an attribute value given ns and + * the require well-formed flag as input; + * 12.5.5.6. """ (U+0022 QUOTATION MARK). + */ + attributes.push([null, 'xmlns', prefix, + this._serializeAttributeValue(ns, requireWellFormed, noDoubleEncoding)]); + /** + * 12.5.5.7. If local default namespace is not null (there exists a + * locally-defined default namespace declaration attribute), then + * let inherited ns get the value of local default namespace unless the + * local default namespace is the empty string in which case let it get + * null. + */ + if (localDefaultNamespace !== null) { + inheritedNS = localDefaultNamespace || null; + } + /** + * 12.6. Otherwise, if local default namespace is null, or local + * default namespace is not null and its value is not equal to ns, then: + */ + } + else if (localDefaultNamespace === null || + (localDefaultNamespace !== null && localDefaultNamespace !== ns)) { + /** + * _Note:_ At this point, the namespace for this node still needs to be + * serialized, but there's no prefix (or candidate prefix) available; the + * following uses the default namespace declaration to define the + * namespace--optionally replacing an existing default declaration + * if present. + * + * 12.6.1. Set the ignore namespace definition attribute flag to true. + * 12.6.2. Append to qualified name the value of node's localName. + * 12.6.3. Let the value of inherited ns be ns. + * + * _Note:_ The new default namespace will be used in the serialization + * to define this node's namespace and act as the context namespace for + * its children. + */ + ignoreNamespaceDefinitionAttribute = true; + qualifiedName += node.localName; + inheritedNS = ns; + /** + * 12.6.4. Append the value of qualified name to markup. + */ + this.beginElement(qualifiedName); + this.openTagBegin(qualifiedName); + /** + * 12.6.5. Append the following to markup, in the order listed: + * + * _Note:_ The following serializes the new (or replacement) default + * namespace definition. + * + * 12.6.5.1. " " (U+0020 SPACE); + * 12.6.5.2. The string "xmlns"; + * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 12.6.5.4. The result of serializing an attribute value given ns + * and the require well-formed flag as input; + * 12.6.5.5. """ (U+0022 QUOTATION MARK). + */ + attributes.push([null, null, 'xmlns', + this._serializeAttributeValue(ns, requireWellFormed, noDoubleEncoding)]); + /** + * 12.7. Otherwise, the node has a local default namespace that matches + * ns. Append to qualified name the value of node's localName, let the + * value of inherited ns be ns, and append the value of qualified name + * to markup. + */ + } + else { + qualifiedName += node.localName; + inheritedNS = ns; + this.beginElement(qualifiedName); + this.openTagBegin(qualifiedName); + } + } + /** + * 13. Append to markup the result of the XML serialization of node's + * attributes given map, prefix index, local prefixes map, ignore namespace + * definition attribute flag, and require well-formed flag. + */ + attributes.push.apply(attributes, __spread(this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed, noDoubleEncoding))); + this.attributes(attributes); + /** + * 14. If ns is the HTML namespace, and the node's list of children is + * empty, and the node's localName matches any one of the following void + * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", + * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", + * "param", "source", "track", "wbr"; then append the following to markup, + * in the order listed: + * 14.1. " " (U+0020 SPACE); + * 14.2. "/" (U+002F SOLIDUS). + * and set the skip end tag flag to true. + * 15. If ns is not the HTML namespace, and the node's list of children is + * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end + * tag flag to true. + * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. + */ + var isHTML = (ns === infra_1.namespace.HTML); + if (isHTML && node.childNodes.length === 0 && + BaseWriter._VoidElementNames.has(node.localName)) { + this.openTagEnd(qualifiedName, true, true); + this.endElement(qualifiedName); + skipEndTag = true; + } + else if (!isHTML && node.childNodes.length === 0) { + this.openTagEnd(qualifiedName, true, false); + this.endElement(qualifiedName); + skipEndTag = true; + } + else { + this.openTagEnd(qualifiedName, false, false); + } + /** + * 17. If the value of skip end tag is true, then return the value of markup + * and skip the remaining steps. The node is a leaf-node. + */ + if (skipEndTag) + return; + /** + * 18. If ns is the HTML namespace, and the node's localName matches the + * string "template", then this is a template element. Append to markup the + * result of XML serializing a DocumentFragment node given the template + * element's template contents (a DocumentFragment), providing inherited + * ns, map, prefix index, and the require well-formed flag. + * + * _Note:_ This allows template content to round-trip, given the rules for + * parsing XHTML documents. + * + * 19. Otherwise, append to markup the result of running the XML + * serialization algorithm on each of node's children, in tree order, + * providing inherited ns, map, prefix index, and the require well-formed + * flag. + */ + if (isHTML && node.localName === "template") { + // TODO: serialize template contents + } + else { + try { + for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + this.level++; + this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed, noDoubleEncoding); + this.level--; + } + } + catch (e_2_1) { e_2 = { error: e_2_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_2) throw e_2.error; } + } + } + /** + * 20. Append the following to markup, in the order listed: + * 20.1. "" (U+003E GREATER-THAN SIGN). + * 21. Return the value of markup. + */ + this.closeTag(qualifiedName); + this.endElement(qualifiedName); + }; + /** + * Produces an XML serialization of an element node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeElement = function (node, requireWellFormed, noDoubleEncoding) { + var e_3, _a; + /** + * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node + * + * 1. If the require well-formed flag is set (its value is true), and this + * node's localName attribute contains the character ":" (U+003A COLON) or + * does not match the XML Name production, then throw an exception; the + * serialization of this node would not be a well-formed element. + */ + if (requireWellFormed && (node.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(node.localName))) { + throw new Error("Node local name contains invalid characters (well-formed required)."); + } + /** + * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). + * 3. Let qualified name be an empty string. + * 4. Let skip end tag be a boolean flag with value false. + * 5. Let ignore namespace definition attribute be a boolean flag with value + * false. + * 6. Given prefix map, copy a namespace prefix map and let map be the + * result. + * 7. Let local prefixes map be an empty map. The map has unique Node prefix + * strings as its keys, with corresponding namespaceURI Node values as the + * map's key values (in this map, the null namespace is represented by the + * empty string). + * + * _Note:_ This map is local to each element. It is used to ensure there + * are no conflicting prefixes should a new namespace prefix attribute need + * to be generated. It is also used to enable skipping of duplicate prefix + * definitions when writing an element's attributes: the map allows the + * algorithm to distinguish between a prefix in the namespace prefix map + * that might be locally-defined (to the current Element) and one that is + * not. + * 8. Let local default namespace be the result of recording the namespace + * information for node given map and local prefixes map. + * + * _Note:_ The above step will update map with any found namespace prefix + * definitions, add the found prefix definitions to the local prefixes map + * and return a local default namespace value defined by a default namespace + * attribute if one exists. Otherwise it returns null. + * 9. Let inherited ns be a copy of namespace. + * 10. Let ns be the value of node's namespaceURI attribute. + */ + var skipEndTag = false; + /** 11. If inherited ns is equal to ns, then: */ + /** + * 11.1. If local default namespace is not null, then set ignore + * namespace definition attribute to true. + */ + /** + * 11.2. If ns is the XML namespace, then append to qualified name the + * concatenation of the string "xml:" and the value of node's localName. + * 11.3. Otherwise, append to qualified name the value of node's + * localName. The node's prefix if it exists, is dropped. + */ + var qualifiedName = node.localName; + /** 11.4. Append the value of qualified name to markup. */ + this.beginElement(qualifiedName); + this.openTagBegin(qualifiedName); + /** + * 13. Append to markup the result of the XML serialization of node's + * attributes given map, prefix index, local prefixes map, ignore namespace + * definition attribute flag, and require well-formed flag. + */ + var attributes = this._serializeAttributes(node, requireWellFormed, noDoubleEncoding); + this.attributes(attributes); + /** + * 14. If ns is the HTML namespace, and the node's list of children is + * empty, and the node's localName matches any one of the following void + * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", + * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", + * "param", "source", "track", "wbr"; then append the following to markup, + * in the order listed: + * 14.1. " " (U+0020 SPACE); + * 14.2. "/" (U+002F SOLIDUS). + * and set the skip end tag flag to true. + * 15. If ns is not the HTML namespace, and the node's list of children is + * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end + * tag flag to true. + * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. + */ + if (!node.hasChildNodes()) { + this.openTagEnd(qualifiedName, true, false); + this.endElement(qualifiedName); + skipEndTag = true; + } + else { + this.openTagEnd(qualifiedName, false, false); + } + /** + * 17. If the value of skip end tag is true, then return the value of markup + * and skip the remaining steps. The node is a leaf-node. + */ + if (skipEndTag) + return; + try { + /** + * 18. If ns is the HTML namespace, and the node's localName matches the + * string "template", then this is a template element. Append to markup the + * result of XML serializing a DocumentFragment node given the template + * element's template contents (a DocumentFragment), providing inherited + * ns, map, prefix index, and the require well-formed flag. + * + * _Note:_ This allows template content to round-trip, given the rules for + * parsing XHTML documents. + * + * 19. Otherwise, append to markup the result of running the XML + * serialization algorithm on each of node's children, in tree order, + * providing inherited ns, map, prefix index, and the require well-formed + * flag. + */ + for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + this.level++; + this._serializeNode(childNode, requireWellFormed, noDoubleEncoding); + this.level--; + } + } + catch (e_3_1) { e_3 = { error: e_3_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_3) throw e_3.error; } + } + /** + * 20. Append the following to markup, in the order listed: + * 20.1. "" (U+003E GREATER-THAN SIGN). + * 21. Return the value of markup. + */ + this.closeTag(qualifiedName); + this.endElement(qualifiedName); + }; + /** + * Produces an XML serialization of a document node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { + var e_4, _a; + /** + * If the require well-formed flag is set (its value is true), and this node + * has no documentElement (the documentElement attribute's value is null), + * then throw an exception; the serialization of this node would not be a + * well-formed document. + */ + if (requireWellFormed && node.documentElement === null) { + throw new Error("Missing document element (well-formed required)."); + } + try { + /** + * Otherwise, run the following steps: + * 1. Let serialized document be an empty string. + * 2. For each child child of node, in tree order, run the XML + * serialization algorithm on the child passing along the provided + * arguments, and append the result to serialized document. + * + * _Note:_ This will serialize any number of ProcessingInstruction and + * Comment nodes both before and after the Document's documentElement node, + * including at most one DocumentType node. (Text nodes are not allowed as + * children of the Document.) + * + * 3. Return the value of serialized document. + */ + for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); + } + } + catch (e_4_1) { e_4 = { error: e_4_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_4) throw e_4.error; } + } + }; + /** + * Produces an XML serialization of a document node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeDocument = function (node, requireWellFormed, noDoubleEncoding) { + var e_5, _a; + /** + * If the require well-formed flag is set (its value is true), and this node + * has no documentElement (the documentElement attribute's value is null), + * then throw an exception; the serialization of this node would not be a + * well-formed document. + */ + if (requireWellFormed && node.documentElement === null) { + throw new Error("Missing document element (well-formed required)."); + } + try { + /** + * Otherwise, run the following steps: + * 1. Let serialized document be an empty string. + * 2. For each child child of node, in tree order, run the XML + * serialization algorithm on the child passing along the provided + * arguments, and append the result to serialized document. + * + * _Note:_ This will serialize any number of ProcessingInstruction and + * Comment nodes both before and after the Document's documentElement node, + * including at most one DocumentType node. (Text nodes are not allowed as + * children of the Document.) + * + * 3. Return the value of serialized document. + */ + for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + this._serializeNode(childNode, requireWellFormed, noDoubleEncoding); + } + } + catch (e_5_1) { e_5 = { error: e_5_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_5) throw e_5.error; } + } + }; + /** + * Produces an XML serialization of a comment node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeComment = function (node, requireWellFormed, noDoubleEncoding) { + /** + * If the require well-formed flag is set (its value is true), and node's + * data contains characters that are not matched by the XML Char production + * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that + * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception; + * the serialization of this node's data would not be well-formed. + */ + if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || + node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) { + throw new Error("Comment data contains invalid characters (well-formed required)."); + } + /** + * Otherwise, return the concatenation of "". + */ + this.comment(node.data); + }; + /** + * Produces an XML serialization of a text node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + * @param level - current depth of the XML tree + */ + BaseWriter.prototype._serializeText = function (node, requireWellFormed, noDoubleEncoding) { + /** + * 1. If the require well-formed flag is set (its value is true), and + * node's data contains characters that are not matched by the XML Char + * production, then throw an exception; the serialization of this node's + * data would not be well-formed. + */ + if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) { + throw new Error("Text data contains invalid characters (well-formed required)."); } - } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - assert(value !== null) - - // 3. Append (name, value) to headers. - headers.push([name, value]) - } - } - - this[kHeadersList][kHeadersSortedMap] = headers - - // 4. Return headers. - return headers - } - - keys () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key') - } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'key' - ) - } - - values () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'value') - } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'value' - ) - } - - entries () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key+value') - } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'key+value' - ) - } - - /** - * @param {(value: string, key: string, self: Headers) => void} callbackFn - * @param {unknown} thisArg - */ - forEach (callbackFn, thisArg = globalThis) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.forEach' }) - - if (typeof callbackFn !== 'function') { - throw new TypeError( - "Failed to execute 'forEach' on 'Headers': parameter 1 is not of type 'Function'." - ) - } - - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]) - } - } - - [Symbol.for('nodejs.util.inspect.custom')] () { - webidl.brandCheck(this, Headers) - - return this[kHeadersList] - } -} - -Headers.prototype[Symbol.iterator] = Headers.prototype.entries - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - keys: kEnumerableProperty, - values: kEnumerableProperty, - entries: kEnumerableProperty, - forEach: kEnumerableProperty, - [Symbol.iterator]: { enumerable: false }, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - } -}) - -webidl.converters.HeadersInit = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (V[Symbol.iterator]) { - return webidl.converters['sequence>'](V) - } - - return webidl.converters['record'](V) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - Headers, - HeadersList -} - - -/***/ }), - -/***/ 74881: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - Response, - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse -} = __nccwpck_require__(27823) -const { Headers } = __nccwpck_require__(10554) -const { Request, makeRequest } = __nccwpck_require__(48359) -const zlib = __nccwpck_require__(59796) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme -} = __nccwpck_require__(52538) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) -const assert = __nccwpck_require__(39491) -const { safelyExtractBody } = __nccwpck_require__(41472) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet, - DOMException -} = __nccwpck_require__(41037) -const { kHeadersList } = __nccwpck_require__(72785) -const EE = __nccwpck_require__(82361) -const { Readable, pipeline } = __nccwpck_require__(12781) -const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(83983) -const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(685) -const { TransformStream } = __nccwpck_require__(35356) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { webidl } = __nccwpck_require__(21744) -const { STATUS_CODES } = __nccwpck_require__(13685) -const GET_OR_HEAD = ['GET', 'HEAD'] - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL -let ReadableStream = globalThis.ReadableStream - -class Fetch extends EE { - constructor (dispatcher) { - super() - - this.dispatcher = dispatcher - this.connection = null - this.dump = false - this.state = 'ongoing' - // 2 terminated listeners get added per request, - // but only 1 gets removed. If there are 20 redirects, - // 21 listeners will be added. - // See https://github.com/nodejs/undici/issues/1711 - // TODO (fix): Find and fix root cause for leaked listener. - this.setMaxListeners(21) - } - - terminate (reason) { - if (this.state !== 'ongoing') { - return - } - - this.state = 'terminated' - this.connection?.destroy(reason) - this.emit('terminated', reason) - } - - // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort (error) { - if (this.state !== 'ongoing') { - return - } - - // 1. Set controller’s state to "aborted". - this.state = 'aborted' - - // 2. Let fallbackError be an "AbortError" DOMException. - // 3. Set error to fallbackError if it is not given. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } - - // 4. Let serializedError be StructuredSerialize(error). - // If that threw an exception, catch it, and let - // serializedError be StructuredSerialize(fallbackError). - - // 5. Set controller’s serialized abort reason to serializedError. - this.serializedAbortReason = error - - this.connection?.destroy(error) - this.emit('terminated', error) - } -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) - - // 1. Let p be a new promise. - const p = createDeferredPromise() - - // 2. Let requestObject be the result of invoking the initial value of - // Request as constructor with input and init as arguments. If this throws - // an exception, reject p with it and return p. - let requestObject - - try { - requestObject = new Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[kState] - - // 4. If requestObject’s signal’s aborted flag is set, then: - if (requestObject.signal.aborted) { - // 1. Abort the fetch() call with p, request, null, and - // requestObject’s signal’s abort reason. - abortFetch(p, request, null, requestObject.signal.reason) - - // 2. Return p. - return p.promise - } - - // 5. Let globalObject be request’s client’s global object. - const globalObject = request.client.globalObject - - // 6. If globalObject is a ServiceWorkerGlobalScope object, then set - // request’s service-workers mode to "none". - if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { - request.serviceWorkers = 'none' - } - - // 7. Let responseObject be null. - let responseObject = null - - // 8. Let relevantRealm be this’s relevant Realm. - const relevantRealm = null - - // 9. Let locallyAborted be false. - let locallyAborted = false - - // 10. Let controller be null. - let controller = null - - // 11. Add the following abort steps to requestObject’s signal: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - assert(controller != null) - - // 3. Abort controller with requestObject’s signal’s abort reason. - controller.abort(requestObject.signal.reason) + /** + * 2. Let markup be the value of node's data. + * 3. Replace any occurrences of "&" in markup by "&". + * 4. Replace any occurrences of "<" in markup by "<". + * 5. Replace any occurrences of ">" in markup by ">". + * 6. Return the value of markup. + */ + var markup = ""; + if (noDoubleEncoding) { + markup = node.data.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&') + .replace(//g, '>'); + } + else { + for (var i = 0; i < node.data.length; i++) { + var c = node.data[i]; + if (c === "&") + markup += "&"; + else if (c === "<") + markup += "<"; + else if (c === ">") + markup += ">"; + else + markup += c; + } + } + this.text(markup); + }; + /** + * Produces an XML serialization of a document fragment node. + * + * @param node - node to serialize + * @param namespace - context namespace + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { + var e_6, _a; + try { + /** + * 1. Let markup the empty string. + * 2. For each child child of node, in tree order, run the XML serialization + * algorithm on the child given namespace, prefix map, a reference to prefix + * index, and flag require well-formed. Concatenate the result to markup. + * 3. Return the value of markup. + */ + for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); + } + } + catch (e_6_1) { e_6 = { error: e_6_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_6) throw e_6.error; } + } + }; + /** + * Produces an XML serialization of a document fragment node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeDocumentFragment = function (node, requireWellFormed, noDoubleEncoding) { + var e_7, _a; + try { + /** + * 1. Let markup the empty string. + * 2. For each child child of node, in tree order, run the XML serialization + * algorithm on the child given namespace, prefix map, a reference to prefix + * index, and flag require well-formed. Concatenate the result to markup. + * 3. Return the value of markup. + */ + for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { + var childNode = _c.value; + this._serializeNode(childNode, requireWellFormed, noDoubleEncoding); + } + } + catch (e_7_1) { e_7 = { error: e_7_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_7) throw e_7.error; } + } + }; + /** + * Produces an XML serialization of a document type node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeDocumentType = function (node, requireWellFormed, noDoubleEncoding) { + /** + * 1. If the require well-formed flag is true and the node's publicId + * attribute contains characters that are not matched by the XML PubidChar + * production, then throw an exception; the serialization of this node + * would not be a well-formed document type declaration. + */ + if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) { + throw new Error("DocType public identifier does not match PubidChar construct (well-formed required)."); + } + /** + * 2. If the require well-formed flag is true and the node's systemId + * attribute contains characters that are not matched by the XML Char + * production or that contains both a """ (U+0022 QUOTATION MARK) and a + * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization + * of this node would not be a well-formed document type declaration. + */ + if (requireWellFormed && + (!algorithm_1.xml_isLegalChar(node.systemId) || + (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) { + throw new Error("DocType system identifier contains invalid characters (well-formed required)."); + } + /** + * 3. Let markup be an empty string. + * 4. Append the string "" (U+003E GREATER-THAN SIGN) to markup. + * 11. Return the value of markup. + */ + this.docType(node.name, node.publicId, node.systemId); + }; + /** + * Produces an XML serialization of a processing instruction node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeProcessingInstruction = function (node, requireWellFormed, noDoubleEncoding) { + /** + * 1. If the require well-formed flag is set (its value is true), and node's + * target contains a ":" (U+003A COLON) character or is an ASCII + * case-insensitive match for the string "xml", then throw an exception; + * the serialization of this node's target would not be well-formed. + */ + if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) { + throw new Error("Processing instruction target contains invalid characters (well-formed required)."); + } + /** + * 2. If the require well-formed flag is set (its value is true), and node's + * data contains characters that are not matched by the XML Char production + * or contains the string "?>" (U+003F QUESTION MARK, + * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of + * this node's data would not be well-formed. + */ + if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || + node.data.indexOf("?>") !== -1)) { + throw new Error("Processing instruction data contains invalid characters (well-formed required)."); + } + /** + * 3. Let markup be the concatenation of the following, in the order listed: + * 3.1. "" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN). + * 4. Return the value of markup. + */ + this.instruction(node.target, node.data); + }; + /** + * Produces an XML serialization of a CDATA node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeCData = function (node, requireWellFormed, noDoubleEncoding) { + if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) { + throw new Error("CDATA contains invalid characters (well-formed required)."); + } + this.cdata(node.data); + }; + /** + * Produces an XML serialization of the attributes of an element node. + * + * @param node - node to serialize + * @param map - namespace prefix map + * @param prefixIndex - generated namespace prefix index + * @param localPrefixesMap - local prefixes map + * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace + * attributes + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed, noDoubleEncoding) { + var e_8, _a; + /** + * 1. Let result be the empty string. + * 2. Let localname set be a new empty namespace localname set. This + * localname set will contain tuples of unique attribute namespaceURI and + * localName pairs, and is populated as each attr is processed. This set is + * used to [optionally] enforce the well-formed constraint that an element + * cannot have two attributes with the same namespaceURI and localName. + * This can occur when two otherwise identical attributes on the same + * element differ only by their prefix values. + */ + var result = []; + var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined; + try { + /** + * 3. Loop: For each attribute attr in element's attributes, in the order + * they are specified in the element's attribute list: + */ + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + // Optimize common case + if (!requireWellFormed && !ignoreNamespaceDefinitionAttribute && attr.namespaceURI === null) { + result.push([null, null, attr.localName, + this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); + continue; + } + /** + * 3.1. If the require well-formed flag is set (its value is true), and the + * localname set contains a tuple whose values match those of a new tuple + * consisting of attr's namespaceURI attribute and localName attribute, + * then throw an exception; the serialization of this attr would fail to + * produce a well-formed element serialization. + */ + if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) { + throw new Error("Element contains duplicate attributes (well-formed required)."); + } + /** + * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and + * localName attribute, and add it to the localname set. + * 3.3. Let attribute namespace be the value of attr's namespaceURI value. + * 3.4. Let candidate prefix be null. + */ + if (requireWellFormed && localNameSet) + localNameSet.set(attr.namespaceURI, attr.localName); + var attributeNamespace = attr.namespaceURI; + var candidatePrefix = null; + /** 3.5. If attribute namespace is not null, then run these sub-steps: */ + if (attributeNamespace !== null) { + /** + * 3.5.1. Let candidate prefix be the result of retrieving a preferred + * prefix string from map given namespace attribute namespace with + * preferred prefix being attr's prefix value. + */ + candidatePrefix = map.get(attr.prefix, attributeNamespace); + /** + * 3.5.2. If the value of attribute namespace is the XMLNS namespace, + * then run these steps: + */ + if (attributeNamespace === infra_1.namespace.XMLNS) { + /** + * 3.5.2.1. If any of the following are true, then stop running these + * steps and goto Loop to visit the next attribute: + * - the attr's value is the XML namespace; + * _Note:_ The XML namespace cannot be redeclared and survive + * round-tripping (unless it defines the prefix "xml"). To avoid this + * problem, this algorithm always prefixes elements in the XML + * namespace with "xml" and drops any related definitions as seen + * in the above condition. + * - the attr's prefix is null and the ignore namespace definition + * attribute flag is true (the Element's default namespace attribute + * should be skipped); + * - the attr's prefix is not null and either + * * the attr's localName is not a key contained in the local + * prefixes map, or + * * the attr's localName is present in the local prefixes map but + * the value of the key does not match attr's value + * and furthermore that the attr's localName (as the prefix to find) + * is found in the namespace prefix map given the namespace consisting + * of the attr's value (the current namespace prefix definition was + * exactly defined previously--on an ancestor element not the current + * element whose attributes are being processed). + */ + if (attr.value === infra_1.namespace.XML || + (attr.prefix === null && ignoreNamespaceDefinitionAttribute) || + (attr.prefix !== null && (!(attr.localName in localPrefixesMap) || + localPrefixesMap[attr.localName] !== attr.value) && + map.has(attr.localName, attr.value))) + continue; + /** + * 3.5.2.2. If the require well-formed flag is set (its value is true), + * and the value of attr's value attribute matches the XMLNS + * namespace, then throw an exception; the serialization of this + * attribute would produce invalid XML because the XMLNS namespace + * is reserved and cannot be applied as an element's namespace via + * XML parsing. + * + * _Note:_ DOM APIs do allow creation of elements in the XMLNS + * namespace but with strict qualifications. + */ + if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) { + throw new Error("XMLNS namespace is reserved (well-formed required)."); + } + /** + * 3.5.2.3. If the require well-formed flag is set (its value is true), + * and the value of attr's value attribute is the empty string, then + * throw an exception; namespace prefix declarations cannot be used + * to undeclare a namespace (use a default namespace declaration + * instead). + */ + if (requireWellFormed && attr.value === '') { + throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."); + } + /** + * 3.5.2.4. the attr's prefix matches the string "xmlns", then let + * candidate prefix be the string "xmlns". + */ + if (attr.prefix === 'xmlns') + candidatePrefix = 'xmlns'; + /** + * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace. + * Run these steps: + * + * _Note:_ The (candidatePrefix === null) check is not in the spec. + * We deviate from the spec here. Otherwise a prefix is generated for + * all attributes with namespaces. + */ + } + else if (candidatePrefix === null) { + if (attr.prefix !== null && + (!map.hasPrefix(attr.prefix) || + map.has(attr.prefix, attributeNamespace))) { + /** + * Check if we can use the attribute's own prefix. + * We deviate from the spec here. + * TODO: This is not an efficient way of searching for prefixes. + * Follow developments to the spec. + */ + candidatePrefix = attr.prefix; + } + else { + /** + * 3.5.3.1. Let candidate prefix be the result of generating a prefix + * providing map, attribute namespace, and prefix index as input. + */ + candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex); + } + /** + * 3.5.3.2. Append the following to result, in the order listed: + * 3.5.3.2.1. " " (U+0020 SPACE); + * 3.5.3.2.2. The string "xmlns:"; + * 3.5.3.2.3. The value of candidate prefix; + * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 3.5.3.2.5. The result of serializing an attribute value given + * attribute namespace and the require well-formed flag as input; + * 3.5.3.2.6. """ (U+0022 QUOTATION MARK). + */ + result.push([null, "xmlns", candidatePrefix, + this._serializeAttributeValue(attributeNamespace, requireWellFormed, noDoubleEncoding)]); + } + } + /** + * 3.6. Append a " " (U+0020 SPACE) to result. + * 3.7. If candidate prefix is not null, then append to result the + * concatenation of candidate prefix with ":" (U+003A COLON). + */ + var attrName = ''; + if (candidatePrefix !== null) { + attrName = candidatePrefix; + } + /** + * 3.8. If the require well-formed flag is set (its value is true), and + * this attr's localName attribute contains the character + * ":" (U+003A COLON) or does not match the XML Name production or + * equals "xmlns" and attribute namespace is null, then throw an + * exception; the serialization of this attr would not be a + * well-formed attribute. + */ + if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(attr.localName) || + (attr.localName === "xmlns" && attributeNamespace === null))) { + throw new Error("Attribute local name contains invalid characters (well-formed required)."); + } + /** + * 3.9. Append the following strings to result, in the order listed: + * 3.9.1. The value of attr's localName; + * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 3.9.3. The result of serializing an attribute value given attr's value + * attribute and the require well-formed flag as input; + * 3.9.4. """ (U+0022 QUOTATION MARK). + */ + result.push([attributeNamespace, candidatePrefix, attr.localName, + this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); + } + } + catch (e_8_1) { e_8 = { error: e_8_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_8) throw e_8.error; } + } + /** + * 4. Return the value of result. + */ + return result; + }; + /** + * Produces an XML serialization of the attributes of an element node. + * + * @param node - node to serialize + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeAttributes = function (node, requireWellFormed, noDoubleEncoding) { + var e_9, _a; + /** + * 1. Let result be the empty string. + * 2. Let localname set be a new empty namespace localname set. This + * localname set will contain tuples of unique attribute namespaceURI and + * localName pairs, and is populated as each attr is processed. This set is + * used to [optionally] enforce the well-formed constraint that an element + * cannot have two attributes with the same namespaceURI and localName. + * This can occur when two otherwise identical attributes on the same + * element differ only by their prefix values. + */ + var result = []; + var localNameSet = requireWellFormed ? {} : undefined; + try { + /** + * 3. Loop: For each attribute attr in element's attributes, in the order + * they are specified in the element's attribute list: + */ + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + // Optimize common case + if (!requireWellFormed) { + result.push([null, null, attr.localName, + this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); + continue; + } + /** + * 3.1. If the require well-formed flag is set (its value is true), and the + * localname set contains a tuple whose values match those of a new tuple + * consisting of attr's namespaceURI attribute and localName attribute, + * then throw an exception; the serialization of this attr would fail to + * produce a well-formed element serialization. + */ + if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) { + throw new Error("Element contains duplicate attributes (well-formed required)."); + } + /** + * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and + * localName attribute, and add it to the localname set. + * 3.3. Let attribute namespace be the value of attr's namespaceURI value. + * 3.4. Let candidate prefix be null. + */ + /* istanbul ignore else */ + if (requireWellFormed && localNameSet) + localNameSet[attr.localName] = true; + /** 3.5. If attribute namespace is not null, then run these sub-steps: */ + /** + * 3.6. Append a " " (U+0020 SPACE) to result. + * 3.7. If candidate prefix is not null, then append to result the + * concatenation of candidate prefix with ":" (U+003A COLON). + */ + /** + * 3.8. If the require well-formed flag is set (its value is true), and + * this attr's localName attribute contains the character + * ":" (U+003A COLON) or does not match the XML Name production or + * equals "xmlns" and attribute namespace is null, then throw an + * exception; the serialization of this attr would not be a + * well-formed attribute. + */ + if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || + !algorithm_1.xml_isName(attr.localName))) { + throw new Error("Attribute local name contains invalid characters (well-formed required)."); + } + /** + * 3.9. Append the following strings to result, in the order listed: + * 3.9.1. The value of attr's localName; + * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); + * 3.9.3. The result of serializing an attribute value given attr's value + * attribute and the require well-formed flag as input; + * 3.9.4. """ (U+0022 QUOTATION MARK). + */ + result.push([null, null, attr.localName, + this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); + } + } + catch (e_9_1) { e_9 = { error: e_9_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_9) throw e_9.error; } + } + /** + * 4. Return the value of result. + */ + return result; + }; + /** + * Records namespace information for the given element and returns the + * default namespace attribute value. + * + * @param node - element node to process + * @param map - namespace prefix map + * @param localPrefixesMap - local prefixes map + */ + BaseWriter.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) { + var e_10, _a; + /** + * 1. Let default namespace attr value be null. + */ + var defaultNamespaceAttrValue = null; + try { + /** + * 2. Main: For each attribute attr in element's attributes, in the order + * they are specified in the element's attribute list: + */ + for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { + var attr = _c.value; + /** + * _Note:_ The following conditional steps find namespace prefixes. Only + * attributes in the XMLNS namespace are considered (e.g., attributes made + * to look like namespace declarations via + * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not + * included). + */ + /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */ + var attributeNamespace = attr.namespaceURI; + /** 2.2. Let attribute prefix be the value of attr's prefix. */ + var attributePrefix = attr.prefix; + /** 2.3. If the attribute namespace is the XMLNS namespace, then: */ + if (attributeNamespace === infra_1.namespace.XMLNS) { + /** + * 2.3.1. If attribute prefix is null, then attr is a default namespace + * declaration. Set the default namespace attr value to attr's value and + * stop running these steps, returning to Main to visit the next + * attribute. + */ + if (attributePrefix === null) { + defaultNamespaceAttrValue = attr.value; + continue; + /** + * 2.3.2. Otherwise, the attribute prefix is not null and attr is a + * namespace prefix definition. Run the following steps: + */ + } + else { + /** 2.3.2.1. Let prefix definition be the value of attr's localName. */ + var prefixDefinition = attr.localName; + /** 2.3.2.2. Let namespace definition be the value of attr's value. */ + var namespaceDefinition = attr.value; + /** + * 2.3.2.3. If namespace definition is the XML namespace, then stop + * running these steps, and return to Main to visit the next + * attribute. + * + * _Note:_ XML namespace definitions in prefixes are completely + * ignored (in order to avoid unnecessary work when there might be + * prefix conflicts). XML namespaced elements are always handled + * uniformly by prefixing (and overriding if necessary) the element's + * localname with the reserved "xml" prefix. + */ + if (namespaceDefinition === infra_1.namespace.XML) { + continue; + } + /** + * 2.3.2.4. If namespace definition is the empty string (the + * declarative form of having no namespace), then let namespace + * definition be null instead. + */ + if (namespaceDefinition === '') { + namespaceDefinition = null; + } + /** + * 2.3.2.5. If prefix definition is found in map given the namespace + * namespace definition, then stop running these steps, and return to + * Main to visit the next attribute. + * + * _Note:_ This step avoids adding duplicate prefix definitions for + * the same namespace in the map. This has the side-effect of avoiding + * later serialization of duplicate namespace prefix declarations in + * any descendant nodes. + */ + if (map.has(prefixDefinition, namespaceDefinition)) { + continue; + } + /** + * 2.3.2.6. Add the prefix prefix definition to map given namespace + * namespace definition. + */ + map.set(prefixDefinition, namespaceDefinition); + /** + * 2.3.2.7. Add the value of prefix definition as a new key to the + * local prefixes map, with the namespace definition as the key's + * value replacing the value of null with the empty string if + * applicable. + */ + localPrefixesMap[prefixDefinition] = namespaceDefinition || ''; + } + } + } + } + catch (e_10_1) { e_10 = { error: e_10_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_10) throw e_10.error; } + } + /** + * 3. Return the value of default namespace attr value. + * + * _Note:_ The empty string is a legitimate return value and is not + * converted to null. + */ + return defaultNamespaceAttrValue; + }; + /** + * Generates a new prefix for the given namespace. + * + * @param newNamespace - a namespace to generate prefix for + * @param prefixMap - namespace prefix map + * @param prefixIndex - generated namespace prefix index + */ + BaseWriter.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) { + /** + * 1. Let generated prefix be the concatenation of the string "ns" and the + * current numerical value of prefix index. + * 2. Let the value of prefix index be incremented by one. + * 3. Add to map the generated prefix given the new namespace namespace. + * 4. Return the value of generated prefix. + */ + var generatedPrefix = "ns" + prefixIndex.value.toString(); + prefixIndex.value++; + prefixMap.set(generatedPrefix, newNamespace); + return generatedPrefix; + }; + /** + * Produces an XML serialization of an attribute value. + * + * @param value - attribute value + * @param requireWellFormed - whether to check conformance + */ + BaseWriter.prototype._serializeAttributeValue = function (value, requireWellFormed, noDoubleEncoding) { + /** + * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value + * + * 1. If the require well-formed flag is set (its value is true), and + * attribute value contains characters that are not matched by the XML Char + * production, then throw an exception; the serialization of this attribute + * value would fail to produce a well-formed element serialization. + */ + if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) { + throw new Error("Invalid characters in attribute value."); + } + /** + * 2. If attribute value is null, then return the empty string. + */ + if (value === null) + return ""; + /** + * 3. Otherwise, attribute value is a string. Return the value of attribute + * value, first replacing any occurrences of the following: + * - "&" with "&" + * - """ with """ + * - "<" with "<" + * - ">" with ">" + * NOTE + * This matches behavior present in browsers, and goes above and beyond the + * grammar requirement in the XML specification's AttValue production by + * also replacing ">" characters. + */ + if (noDoubleEncoding) { + return value.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"'); + } + else { + var result = ""; + for (var i = 0; i < value.length; i++) { + var c = value[i]; + if (c === "\"") + result += """; + else if (c === "&") + result += "&"; + else if (c === "<") + result += "<"; + else if (c === ">") + result += ">"; + else + result += c; + } + return result; + } + }; + BaseWriter._VoidElementNames = new Set(['area', 'base', 'basefont', + 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', + 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); + return BaseWriter; +}()); +exports.BaseWriter = BaseWriter; +//# sourceMappingURL=BaseWriter.js.map - // 4. Abort the fetch() call with p, request, responseObject, - // and requestObject’s signal’s abort reason. - abortFetch(p, request, responseObject, requestObject.signal.reason) - } - ) +/***/ }), - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - const handleFetchDone = (response) => - finalizeAndReportTiming(response, 'fetch') +/***/ 37525: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 13. Set controller to the result of calling fetch given request, - // with processResponseEndOfBody set to handleFetchDone, and processResponse - // given response being these substeps: +"use strict"; - const processResponse = (response) => { - // 1. If locallyAborted is true, terminate these substeps. - if (locallyAborted) { - return Promise.resolve() +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var BaseCBWriter_1 = __nccwpck_require__(50708); +/** + * Serializes XML nodes. + */ +var JSONCBWriter = /** @class */ (function (_super) { + __extends(JSONCBWriter, _super); + /** + * Initializes a new instance of `JSONCBWriter`. + * + * @param builderOptions - XML builder options + */ + function JSONCBWriter(builderOptions) { + var _this = _super.call(this, builderOptions) || this; + _this._hasChildren = []; + _this._additionalLevel = 0; + return _this; } + /** @inheritdoc */ + JSONCBWriter.prototype.frontMatter = function () { + return ""; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.declaration = function (version, encoding, standalone) { + return ""; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.docType = function (name, publicId, systemId) { + return ""; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.comment = function (data) { + // { "!": "hello" } + return this._comma() + this._beginLine() + "{" + this._sep() + + this._key(this._builderOptions.convert.comment) + this._sep() + + this._val(data) + this._sep() + "}"; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.text = function (data) { + // { "#": "hello" } + return this._comma() + this._beginLine() + "{" + this._sep() + + this._key(this._builderOptions.convert.text) + this._sep() + + this._val(data) + this._sep() + "}"; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.instruction = function (target, data) { + // { "?": "target hello" } + return this._comma() + this._beginLine() + "{" + this._sep() + + this._key(this._builderOptions.convert.ins) + this._sep() + + this._val(data ? target + " " + data : target) + this._sep() + "}"; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.cdata = function (data) { + // { "$": "hello" } + return this._comma() + this._beginLine() + "{" + this._sep() + + this._key(this._builderOptions.convert.cdata) + this._sep() + + this._val(data) + this._sep() + "}"; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.attribute = function (name, value) { + // { "@name": "val" } + return this._comma() + this._beginLine(1) + "{" + this._sep() + + this._key(this._builderOptions.convert.att + name) + this._sep() + + this._val(value) + this._sep() + "}"; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.openTagBegin = function (name) { + // { "node": { "#": [ + var str = this._comma() + this._beginLine() + "{" + this._sep() + this._key(name) + this._sep() + "{"; + this._additionalLevel++; + this.hasData = true; + str += this._beginLine() + this._key(this._builderOptions.convert.text) + this._sep() + "["; + this._hasChildren.push(false); + return str; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { + if (selfClosing) { + var str = this._sep() + "]"; + this._additionalLevel--; + str += this._beginLine() + "}" + this._sep() + "}"; + return str; + } + else { + return ""; + } + }; + /** @inheritdoc */ + JSONCBWriter.prototype.closeTag = function (name) { + // ] } } + var str = this._beginLine() + "]"; + this._additionalLevel--; + str += this._beginLine() + "}" + this._sep() + "}"; + return str; + }; + /** @inheritdoc */ + JSONCBWriter.prototype.beginElement = function (name) { }; + /** @inheritdoc */ + JSONCBWriter.prototype.endElement = function (name) { this._hasChildren.pop(); }; + /** + * Produces characters to be prepended to a line of string in pretty-print + * mode. + */ + JSONCBWriter.prototype._beginLine = function (additionalOffset) { + if (additionalOffset === void 0) { additionalOffset = 0; } + if (this._writerOptions.prettyPrint) { + return (this.hasData ? this._writerOptions.newline : "") + + this._indent(this._writerOptions.offset + this.level + additionalOffset); + } + else { + return ""; + } + }; + /** + * Produces an indentation string. + * + * @param level - depth of the tree + */ + JSONCBWriter.prototype._indent = function (level) { + if (level + this._additionalLevel <= 0) { + return ""; + } + else { + return this._writerOptions.indent.repeat(level + this._additionalLevel); + } + }; + /** + * Produces a comma before a child node if it has previous siblings. + */ + JSONCBWriter.prototype._comma = function () { + var str = (this._hasChildren[this._hasChildren.length - 1] ? "," : ""); + if (this._hasChildren.length > 0) { + this._hasChildren[this._hasChildren.length - 1] = true; + } + return str; + }; + /** + * Produces a separator string. + */ + JSONCBWriter.prototype._sep = function () { + return (this._writerOptions.prettyPrint ? " " : ""); + }; + /** + * Produces a JSON key string delimited with double quotes. + */ + JSONCBWriter.prototype._key = function (key) { + return "\"" + key + "\":"; + }; + /** + * Produces a JSON value string delimited with double quotes. + */ + JSONCBWriter.prototype._val = function (val) { + return JSON.stringify(val); + }; + return JSONCBWriter; +}(BaseCBWriter_1.BaseCBWriter)); +exports.JSONCBWriter = JSONCBWriter; +//# sourceMappingURL=JSONCBWriter.js.map - // 2. If response’s aborted flag is set, then: - if (response.aborted) { - // 1. Let deserializedError be the result of deserialize a serialized - // abort reason given controller’s serialized abort reason and - // relevantRealm. +/***/ }), - // 2. Abort the fetch() call with p, request, responseObject, and - // deserializedError. +/***/ 37510: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return Promise.resolve() - } +"use strict"; - // 3. If response is a network error, then reject p with a TypeError - // and terminate these substeps. - if (response.type === 'error') { - p.reject( - Object.assign(new TypeError('fetch failed'), { cause: response.error }) - ) - return Promise.resolve() +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ObjectWriter_1 = __nccwpck_require__(50243); +var util_1 = __nccwpck_require__(76195); +var BaseWriter_1 = __nccwpck_require__(37644); +/** + * Serializes XML nodes into a JSON string. + */ +var JSONWriter = /** @class */ (function (_super) { + __extends(JSONWriter, _super); + /** + * Initializes a new instance of `JSONWriter`. + * + * @param builderOptions - XML builder options + * @param writerOptions - serialization options + */ + function JSONWriter(builderOptions, writerOptions) { + var _this = _super.call(this, builderOptions) || this; + // provide default options + _this._writerOptions = util_1.applyDefaults(writerOptions, { + wellFormed: false, + noDoubleEncoding: false, + prettyPrint: false, + indent: ' ', + newline: '\n', + offset: 0, + group: false, + verbose: false + }); + return _this; } + /** + * Produces an XML serialization of the given node. + * + * @param node - node to serialize + * @param writerOptions - serialization options + */ + JSONWriter.prototype.serialize = function (node) { + // convert to object + var objectWriterOptions = util_1.applyDefaults(this._writerOptions, { + format: "object", + wellFormed: false, + noDoubleEncoding: false, + }); + var objectWriter = new ObjectWriter_1.ObjectWriter(this._builderOptions, objectWriterOptions); + var val = objectWriter.serialize(node); + // recursively convert object into JSON string + return this._beginLine(this._writerOptions, 0) + this._convertObject(val, this._writerOptions); + }; + /** + * Produces an XML serialization of the given object. + * + * @param obj - object to serialize + * @param options - serialization options + * @param level - depth of the XML tree + */ + JSONWriter.prototype._convertObject = function (obj, options, level) { + var e_1, _a; + var _this = this; + if (level === void 0) { level = 0; } + var markup = ''; + var isLeaf = this._isLeafNode(obj); + if (util_1.isArray(obj)) { + markup += '['; + var len = obj.length; + var i = 0; + try { + for (var obj_1 = __values(obj), obj_1_1 = obj_1.next(); !obj_1_1.done; obj_1_1 = obj_1.next()) { + var val = obj_1_1.value; + markup += this._endLine(options, level + 1) + + this._beginLine(options, level + 1) + + this._convertObject(val, options, level + 1); + if (i < len - 1) { + markup += ','; + } + i++; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (obj_1_1 && !obj_1_1.done && (_a = obj_1.return)) _a.call(obj_1); + } + finally { if (e_1) throw e_1.error; } + } + markup += this._endLine(options, level) + this._beginLine(options, level); + markup += ']'; + } + else if (util_1.isObject(obj)) { + markup += '{'; + var len_1 = util_1.objectLength(obj); + var i_1 = 0; + util_1.forEachObject(obj, function (key, val) { + if (isLeaf && options.prettyPrint) { + markup += ' '; + } + else { + markup += _this._endLine(options, level + 1) + _this._beginLine(options, level + 1); + } + markup += _this._key(key); + if (options.prettyPrint) { + markup += ' '; + } + markup += _this._convertObject(val, options, level + 1); + if (i_1 < len_1 - 1) { + markup += ','; + } + i_1++; + }, this); + if (isLeaf && options.prettyPrint) { + markup += ' '; + } + else { + markup += this._endLine(options, level) + this._beginLine(options, level); + } + markup += '}'; + } + else { + markup += this._val(obj); + } + return markup; + }; + /** + * Produces characters to be prepended to a line of string in pretty-print + * mode. + * + * @param options - serialization options + * @param level - current depth of the XML tree + */ + JSONWriter.prototype._beginLine = function (options, level) { + if (!options.prettyPrint) { + return ''; + } + else { + var indentLevel = options.offset + level + 1; + if (indentLevel > 0) { + return new Array(indentLevel).join(options.indent); + } + } + return ''; + }; + /** + * Produces characters to be appended to a line of string in pretty-print + * mode. + * + * @param options - serialization options + * @param level - current depth of the XML tree + */ + JSONWriter.prototype._endLine = function (options, level) { + if (!options.prettyPrint) { + return ''; + } + else { + return options.newline; + } + }; + /** + * Produces a JSON key string delimited with double quotes. + */ + JSONWriter.prototype._key = function (key) { + return "\"" + key + "\":"; + }; + /** + * Produces a JSON value string delimited with double quotes. + */ + JSONWriter.prototype._val = function (val) { + return JSON.stringify(val); + }; + /** + * Determines if an object is a leaf node. + * + * @param obj + */ + JSONWriter.prototype._isLeafNode = function (obj) { + return this._descendantCount(obj) <= 1; + }; + /** + * Counts the number of descendants of the given object. + * + * @param obj + * @param count + */ + JSONWriter.prototype._descendantCount = function (obj, count) { + var _this = this; + if (count === void 0) { count = 0; } + if (util_1.isArray(obj)) { + util_1.forEachArray(obj, function (val) { return count += _this._descendantCount(val, count); }, this); + } + else if (util_1.isObject(obj)) { + util_1.forEachObject(obj, function (key, val) { return count += _this._descendantCount(val, count); }, this); + } + else { + count++; + } + return count; + }; + return JSONWriter; +}(BaseWriter_1.BaseWriter)); +exports.JSONWriter = JSONWriter; +//# sourceMappingURL=JSONWriter.js.map - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new Response() - responseObject[kState] = response - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kHeadersList] = response.headersList - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm - - // 5. Resolve p with responseObject. - p.resolve(responseObject) - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function finalizeAndReportTiming (response, initiatorType = 'other') { - // 1. If response is an aborted network error, then return. - if (response.type === 'error' && response.aborted) { - return - } - - // 2. If response’s URL list is null or empty, then return. - if (!response.urlList?.length) { - return - } - - // 3. Let originalURL be response’s URL list[0]. - const originalURL = response.urlList[0] - - // 4. Let timingInfo be response’s timing info. - let timingInfo = response.timingInfo - - // 5. Let cacheState be response’s cache state. - let cacheState = response.cacheState - - // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. - if (!urlIsHttpHttpsScheme(originalURL)) { - return - } - - // 7. If timingInfo is null, then return. - if (timingInfo === null) { - return - } - - // 8. If response’s timing allow passed flag is not set, then: - if (!response.timingAllowPassed) { - // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. - timingInfo = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 9. Set timingInfo’s end time to the coarsened shared current time - // given global’s relevant settings object’s cross-origin isolated - // capability. - // TODO: given global’s relevant settings object’s cross-origin isolated - // capability? - timingInfo.endTime = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL, - initiatorType, - globalThis, - cacheState - ) -} +/***/ }), -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { - if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { - performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) - } -} +/***/ 41397: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -// https://fetch.spec.whatwg.org/#abort-fetch -function abortFetch (p, request, responseObject, error) { - // Note: AbortSignal.reason was added in node v17.2.0 - // which would give us an undefined error to reject with. - // Remove this once node v16 is no longer supported. - if (!error) { - error = new DOMException('The operation was aborted.', 'AbortError') - } +"use strict"; - // 1. Reject promise with error. - p.reject(error) +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +var ObjectWriter_1 = __nccwpck_require__(50243); +var BaseWriter_1 = __nccwpck_require__(37644); +/** + * Serializes XML nodes into ES6 maps and arrays. + */ +var MapWriter = /** @class */ (function (_super) { + __extends(MapWriter, _super); + /** + * Initializes a new instance of `MapWriter`. + * + * @param builderOptions - XML builder options + * @param writerOptions - serialization options + */ + function MapWriter(builderOptions, writerOptions) { + var _this = _super.call(this, builderOptions) || this; + // provide default options + _this._writerOptions = util_1.applyDefaults(writerOptions, { + format: "map", + wellFormed: false, + noDoubleEncoding: false, + group: false, + verbose: false + }); + return _this; + } + /** + * Produces an XML serialization of the given node. + * + * @param node - node to serialize + */ + MapWriter.prototype.serialize = function (node) { + // convert to object + var objectWriterOptions = util_1.applyDefaults(this._writerOptions, { + format: "object", + wellFormed: false, + noDoubleEncoding: false, + verbose: false + }); + var objectWriter = new ObjectWriter_1.ObjectWriter(this._builderOptions, objectWriterOptions); + var val = objectWriter.serialize(node); + // recursively convert object into Map + return this._convertObject(val); + }; + /** + * Recursively converts a JS object into an ES5 map. + * + * @param obj - a JS object + */ + MapWriter.prototype._convertObject = function (obj) { + if (util_1.isArray(obj)) { + for (var i = 0; i < obj.length; i++) { + obj[i] = this._convertObject(obj[i]); + } + return obj; + } + else if (util_1.isObject(obj)) { + var map = new Map(); + for (var key in obj) { + map.set(key, this._convertObject(obj[key])); + } + return map; + } + else { + return obj; + } + }; + return MapWriter; +}(BaseWriter_1.BaseWriter)); +exports.MapWriter = MapWriter; +//# sourceMappingURL=MapWriter.js.map - // 2. If request’s body is not null and is readable, then cancel request’s - // body with error. - if (request.body != null && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } +/***/ }), - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } +/***/ 50243: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 4. Let response be responseObject’s response. - const response = responseObject[kState] +"use strict"; - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return - } - throw err - }) - } -} +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +var interfaces_1 = __nccwpck_require__(27305); +var BaseWriter_1 = __nccwpck_require__(37644); +/** + * Serializes XML nodes into objects and arrays. + */ +var ObjectWriter = /** @class */ (function (_super) { + __extends(ObjectWriter, _super); + /** + * Initializes a new instance of `ObjectWriter`. + * + * @param builderOptions - XML builder options + * @param writerOptions - serialization options + */ + function ObjectWriter(builderOptions, writerOptions) { + var _this = _super.call(this, builderOptions) || this; + _this._writerOptions = util_1.applyDefaults(writerOptions, { + format: "object", + wellFormed: false, + noDoubleEncoding: false, + group: false, + verbose: false + }); + return _this; + } + /** + * Produces an XML serialization of the given node. + * + * @param node - node to serialize + */ + ObjectWriter.prototype.serialize = function (node) { + this._currentList = []; + this._currentIndex = 0; + this._listRegister = [this._currentList]; + /** + * First pass, serialize nodes + * This creates a list of nodes grouped under node types while preserving + * insertion order. For example: + * [ + * root: [ + * node: [ + * { "@" : { "att1": "val1", "att2": "val2" } + * { "#": "node text" } + * { childNode: [] } + * { "#": "more text" } + * ], + * node: [ + * { "@" : { "att": "val" } + * { "#": [ "text line1", "text line2" ] } + * ] + * ] + * ] + */ + this.serializeNode(node, this._writerOptions.wellFormed, this._writerOptions.noDoubleEncoding); + /** + * Second pass, process node lists. Above example becomes: + * { + * root: { + * node: [ + * { + * "@att1": "val1", + * "@att2": "val2", + * "#1": "node text", + * childNode: {}, + * "#2": "more text" + * }, + * { + * "@att": "val", + * "#": [ "text line1", "text line2" ] + * } + * ] + * } + * } + */ + return this._process(this._currentList, this._writerOptions); + }; + ObjectWriter.prototype._process = function (items, options) { + var _a, _b, _c, _d, _e, _f, _g; + if (items.length === 0) + return {}; + // determine if there are non-unique element names + var namesSeen = {}; + var hasNonUniqueNames = false; + var textCount = 0; + var commentCount = 0; + var instructionCount = 0; + var cdataCount = 0; + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var key = Object.keys(item)[0]; + switch (key) { + case "@": + continue; + case "#": + textCount++; + break; + case "!": + commentCount++; + break; + case "?": + instructionCount++; + break; + case "$": + cdataCount++; + break; + default: + if (namesSeen[key]) { + hasNonUniqueNames = true; + } + else { + namesSeen[key] = true; + } + break; + } + } + var defAttrKey = this._getAttrKey(); + var defTextKey = this._getNodeKey(interfaces_1.NodeType.Text); + var defCommentKey = this._getNodeKey(interfaces_1.NodeType.Comment); + var defInstructionKey = this._getNodeKey(interfaces_1.NodeType.ProcessingInstruction); + var defCdataKey = this._getNodeKey(interfaces_1.NodeType.CData); + if (textCount === 1 && items.length === 1 && util_1.isString(items[0]["#"])) { + // special case of an element node with a single text node + return items[0]["#"]; + } + else if (hasNonUniqueNames) { + var obj = {}; + // process attributes first + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var key = Object.keys(item)[0]; + if (key === "@") { + var attrs = item["@"]; + var attrKeys = Object.keys(attrs); + if (attrKeys.length === 1) { + obj[defAttrKey + attrKeys[0]] = attrs[attrKeys[0]]; + } + else { + obj[defAttrKey] = item["@"]; + } + } + } + // list contains element nodes with non-unique names + // return an array with mixed content notation + var result = []; + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var key = Object.keys(item)[0]; + switch (key) { + case "@": + // attributes were processed above + break; + case "#": + result.push((_a = {}, _a[defTextKey] = item["#"], _a)); + break; + case "!": + result.push((_b = {}, _b[defCommentKey] = item["!"], _b)); + break; + case "?": + result.push((_c = {}, _c[defInstructionKey] = item["?"], _c)); + break; + case "$": + result.push((_d = {}, _d[defCdataKey] = item["$"], _d)); + break; + default: + // element node + var ele = item; + if (ele[key].length !== 0 && util_1.isArray(ele[key][0])) { + // group of element nodes + var eleGroup = []; + var listOfLists = ele[key]; + for (var i_1 = 0; i_1 < listOfLists.length; i_1++) { + eleGroup.push(this._process(listOfLists[i_1], options)); + } + result.push((_e = {}, _e[key] = eleGroup, _e)); + } + else { + // single element node + if (options.verbose) { + result.push((_f = {}, _f[key] = [this._process(ele[key], options)], _f)); + } + else { + result.push((_g = {}, _g[key] = this._process(ele[key], options), _g)); + } + } + break; + } + } + obj[defTextKey] = result; + return obj; + } + else { + // all element nodes have unique names + // return an object while prefixing data node keys + var textId = 1; + var commentId = 1; + var instructionId = 1; + var cdataId = 1; + var obj = {}; + for (var i = 0; i < items.length; i++) { + var item = items[i]; + var key = Object.keys(item)[0]; + switch (key) { + case "@": + var attrs = item["@"]; + var attrKeys = Object.keys(attrs); + if (!options.group || attrKeys.length === 1) { + for (var attrName in attrs) { + obj[defAttrKey + attrName] = attrs[attrName]; + } + } + else { + obj[defAttrKey] = attrs; + } + break; + case "#": + textId = this._processSpecItem(item["#"], obj, options.group, defTextKey, textCount, textId); + break; + case "!": + commentId = this._processSpecItem(item["!"], obj, options.group, defCommentKey, commentCount, commentId); + break; + case "?": + instructionId = this._processSpecItem(item["?"], obj, options.group, defInstructionKey, instructionCount, instructionId); + break; + case "$": + cdataId = this._processSpecItem(item["$"], obj, options.group, defCdataKey, cdataCount, cdataId); + break; + default: + // element node + var ele = item; + if (ele[key].length !== 0 && util_1.isArray(ele[key][0])) { + // group of element nodes + var eleGroup = []; + var listOfLists = ele[key]; + for (var i_2 = 0; i_2 < listOfLists.length; i_2++) { + eleGroup.push(this._process(listOfLists[i_2], options)); + } + obj[key] = eleGroup; + } + else { + // single element node + if (options.verbose) { + obj[key] = [this._process(ele[key], options)]; + } + else { + obj[key] = this._process(ele[key], options); + } + } + break; + } + } + return obj; + } + }; + ObjectWriter.prototype._processSpecItem = function (item, obj, group, defKey, count, id) { + var e_1, _a; + if (!group && util_1.isArray(item) && count + item.length > 2) { + try { + for (var item_1 = __values(item), item_1_1 = item_1.next(); !item_1_1.done; item_1_1 = item_1.next()) { + var subItem = item_1_1.value; + var key = defKey + (id++).toString(); + obj[key] = subItem; + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (item_1_1 && !item_1_1.done && (_a = item_1.return)) _a.call(item_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + var key = count > 1 ? defKey + (id++).toString() : defKey; + obj[key] = item; + } + return id; + }; + /** @inheritdoc */ + ObjectWriter.prototype.beginElement = function (name) { + var _a, _b; + var childItems = []; + if (this._currentList.length === 0) { + this._currentList.push((_a = {}, _a[name] = childItems, _a)); + } + else { + var lastItem = this._currentList[this._currentList.length - 1]; + if (this._isElementNode(lastItem, name)) { + if (lastItem[name].length !== 0 && util_1.isArray(lastItem[name][0])) { + var listOfLists = lastItem[name]; + listOfLists.push(childItems); + } + else { + lastItem[name] = [lastItem[name], childItems]; + } + } + else { + this._currentList.push((_b = {}, _b[name] = childItems, _b)); + } + } + this._currentIndex++; + if (this._listRegister.length > this._currentIndex) { + this._listRegister[this._currentIndex] = childItems; + } + else { + this._listRegister.push(childItems); + } + this._currentList = childItems; + }; + /** @inheritdoc */ + ObjectWriter.prototype.endElement = function () { + this._currentList = this._listRegister[--this._currentIndex]; + }; + /** @inheritdoc */ + ObjectWriter.prototype.attribute = function (name, value) { + var _a, _b; + if (this._currentList.length === 0) { + this._currentList.push({ "@": (_a = {}, _a[name] = value, _a) }); + } + else { + var lastItem = this._currentList[this._currentList.length - 1]; + /* istanbul ignore else */ + if (this._isAttrNode(lastItem)) { + lastItem["@"][name] = value; + } + else { + this._currentList.push({ "@": (_b = {}, _b[name] = value, _b) }); + } + } + }; + /** @inheritdoc */ + ObjectWriter.prototype.comment = function (data) { + if (this._currentList.length === 0) { + this._currentList.push({ "!": data }); + } + else { + var lastItem = this._currentList[this._currentList.length - 1]; + if (this._isCommentNode(lastItem)) { + if (util_1.isArray(lastItem["!"])) { + lastItem["!"].push(data); + } + else { + lastItem["!"] = [lastItem["!"], data]; + } + } + else { + this._currentList.push({ "!": data }); + } + } + }; + /** @inheritdoc */ + ObjectWriter.prototype.text = function (data) { + if (this._currentList.length === 0) { + this._currentList.push({ "#": data }); + } + else { + var lastItem = this._currentList[this._currentList.length - 1]; + if (this._isTextNode(lastItem)) { + if (util_1.isArray(lastItem["#"])) { + lastItem["#"].push(data); + } + else { + lastItem["#"] = [lastItem["#"], data]; + } + } + else { + this._currentList.push({ "#": data }); + } + } + }; + /** @inheritdoc */ + ObjectWriter.prototype.instruction = function (target, data) { + var value = (data === "" ? target : target + " " + data); + if (this._currentList.length === 0) { + this._currentList.push({ "?": value }); + } + else { + var lastItem = this._currentList[this._currentList.length - 1]; + if (this._isInstructionNode(lastItem)) { + if (util_1.isArray(lastItem["?"])) { + lastItem["?"].push(value); + } + else { + lastItem["?"] = [lastItem["?"], value]; + } + } + else { + this._currentList.push({ "?": value }); + } + } + }; + /** @inheritdoc */ + ObjectWriter.prototype.cdata = function (data) { + if (this._currentList.length === 0) { + this._currentList.push({ "$": data }); + } + else { + var lastItem = this._currentList[this._currentList.length - 1]; + if (this._isCDATANode(lastItem)) { + if (util_1.isArray(lastItem["$"])) { + lastItem["$"].push(data); + } + else { + lastItem["$"] = [lastItem["$"], data]; + } + } + else { + this._currentList.push({ "$": data }); + } + } + }; + ObjectWriter.prototype._isAttrNode = function (x) { + return "@" in x; + }; + ObjectWriter.prototype._isTextNode = function (x) { + return "#" in x; + }; + ObjectWriter.prototype._isCommentNode = function (x) { + return "!" in x; + }; + ObjectWriter.prototype._isInstructionNode = function (x) { + return "?" in x; + }; + ObjectWriter.prototype._isCDATANode = function (x) { + return "$" in x; + }; + ObjectWriter.prototype._isElementNode = function (x, name) { + return name in x; + }; + /** + * Returns an object key for an attribute or namespace declaration. + */ + ObjectWriter.prototype._getAttrKey = function () { + return this._builderOptions.convert.att; + }; + /** + * Returns an object key for the given node type. + * + * @param nodeType - node type to get a key for + */ + ObjectWriter.prototype._getNodeKey = function (nodeType) { + switch (nodeType) { + case interfaces_1.NodeType.Comment: + return this._builderOptions.convert.comment; + case interfaces_1.NodeType.Text: + return this._builderOptions.convert.text; + case interfaces_1.NodeType.ProcessingInstruction: + return this._builderOptions.convert.ins; + case interfaces_1.NodeType.CData: + return this._builderOptions.convert.cdata; + /* istanbul ignore next */ + default: + throw new Error("Invalid node type."); + } + }; + return ObjectWriter; +}(BaseWriter_1.BaseWriter)); +exports.ObjectWriter = ObjectWriter; +//# sourceMappingURL=ObjectWriter.js.map -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - dispatcher // undici -}) { - // 1. Let taskDestination be null. - let taskDestination = null +/***/ }), - // 2. Let crossOriginIsolatedCapability be false. - let crossOriginIsolatedCapability = false +/***/ 77572: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 3. If request’s client is non-null, then: - if (request.client != null) { - // 1. Set taskDestination to request’s client’s global object. - taskDestination = request.client.globalObject +"use strict"; - // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin - // isolated capability. - crossOriginIsolatedCapability = - request.client.crossOriginIsolatedCapability - } +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var BaseCBWriter_1 = __nccwpck_require__(50708); +/** + * Serializes XML nodes. + */ +var XMLCBWriter = /** @class */ (function (_super) { + __extends(XMLCBWriter, _super); + /** + * Initializes a new instance of `XMLCBWriter`. + * + * @param builderOptions - XML builder options + */ + function XMLCBWriter(builderOptions) { + var _this = _super.call(this, builderOptions) || this; + _this._lineLength = 0; + return _this; + } + /** @inheritdoc */ + XMLCBWriter.prototype.frontMatter = function () { + return ""; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.declaration = function (version, encoding, standalone) { + var markup = this._beginLine() + ""; + return markup; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.docType = function (name, publicId, systemId) { + var markup = this._beginLine(); + if (publicId && systemId) { + markup += ""; + } + else if (publicId) { + markup += ""; + } + else if (systemId) { + markup += ""; + } + else { + markup += ""; + } + return markup; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.comment = function (data) { + return this._beginLine() + ""; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.text = function (data) { + return this._beginLine() + data; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.instruction = function (target, data) { + if (data) { + return this._beginLine() + ""; + } + else { + return this._beginLine() + ""; + } + }; + /** @inheritdoc */ + XMLCBWriter.prototype.cdata = function (data) { + return this._beginLine() + ""; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.openTagBegin = function (name) { + this._lineLength += 1 + name.length; + return this._beginLine() + "<" + name; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { + if (voidElement) { + return " />"; + } + else if (selfClosing) { + if (this._writerOptions.allowEmptyTags) { + return ">"; + } + else if (this._writerOptions.spaceBeforeSlash) { + return " />"; + } + else { + return "/>"; + } + } + else { + return ">"; + } + }; + /** @inheritdoc */ + XMLCBWriter.prototype.closeTag = function (name) { + return this._beginLine() + ""; + }; + /** @inheritdoc */ + XMLCBWriter.prototype.attribute = function (name, value) { + var str = name + "=\"" + value + "\""; + if (this._writerOptions.prettyPrint && this._writerOptions.width > 0 && + this._lineLength + 1 + str.length > this._writerOptions.width) { + str = this._beginLine() + this._indent(1) + str; + this._lineLength = str.length; + return str; + } + else { + this._lineLength += 1 + str.length; + return " " + str; + } + }; + /** @inheritdoc */ + XMLCBWriter.prototype.beginElement = function (name) { }; + /** @inheritdoc */ + XMLCBWriter.prototype.endElement = function (name) { }; + /** + * Produces characters to be prepended to a line of string in pretty-print + * mode. + */ + XMLCBWriter.prototype._beginLine = function () { + if (this._writerOptions.prettyPrint) { + var str = (this.hasData ? this._writerOptions.newline : "") + + this._indent(this._writerOptions.offset + this.level); + this._lineLength = str.length; + return str; + } + else { + return ""; + } + }; + /** + * Produces an indentation string. + * + * @param level - depth of the tree + */ + XMLCBWriter.prototype._indent = function (level) { + if (level <= 0) { + return ""; + } + else { + return this._writerOptions.indent.repeat(level); + } + }; + return XMLCBWriter; +}(BaseCBWriter_1.BaseCBWriter)); +exports.XMLCBWriter = XMLCBWriter; +//# sourceMappingURL=XMLCBWriter.js.map - // 4. If useParallelQueue is true, then set taskDestination to the result of - // starting a new parallel queue. - // TODO +/***/ }), - // 5. Let timingInfo be a new fetch timing info whose start time and - // post-redirect start time are the coarsened shared current time given - // crossOriginIsolatedCapability. - const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = createOpaqueTimingInfo({ - startTime: currenTime - }) +/***/ 59606: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 6. Let fetchParams be a new fetch params whose - // request is request, - // timing info is timingInfo, - // process request body chunk length is processRequestBodyChunkLength, - // process request end-of-body is processRequestEndOfBody, - // process response is processResponse, - // process response consume body is processResponseConsumeBody, - // process response end-of-body is processResponseEndOfBody, - // task destination is taskDestination, - // and cross-origin isolated capability is crossOriginIsolatedCapability. - const fetchParams = { - controller: new Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - crossOriginIsolatedCapability - } +"use strict"; - // 7. If request’s body is a byte sequence, then set request’s body to - // request’s body as a body. - // NOTE: Since fetching is only called from fetch, body should already be - // extracted. - assert(!request.body || request.body.stream) +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var util_1 = __nccwpck_require__(76195); +var interfaces_1 = __nccwpck_require__(27305); +var BaseWriter_1 = __nccwpck_require__(37644); +var util_2 = __nccwpck_require__(65282); +/** + * Serializes XML nodes into strings. + */ +var XMLWriter = /** @class */ (function (_super) { + __extends(XMLWriter, _super); + /** + * Initializes a new instance of `XMLWriter`. + * + * @param builderOptions - XML builder options + * @param writerOptions - serialization options + */ + function XMLWriter(builderOptions, writerOptions) { + var _this = _super.call(this, builderOptions) || this; + _this._indentation = {}; + _this._lengthToLastNewline = 0; + // provide default options + _this._writerOptions = util_1.applyDefaults(writerOptions, { + wellFormed: false, + noDoubleEncoding: false, + headless: false, + prettyPrint: false, + indent: " ", + newline: "\n", + offset: 0, + width: 0, + allowEmptyTags: false, + indentTextOnlyNodes: false, + spaceBeforeSlash: false + }); + return _this; + } + /** + * Produces an XML serialization of the given node. + * + * @param node - node to serialize + */ + XMLWriter.prototype.serialize = function (node) { + this._refs = { suppressPretty: false, emptyNode: false, markup: "" }; + // Serialize XML declaration + if (node.nodeType === interfaces_1.NodeType.Document && !this._writerOptions.headless) { + this.declaration(this._builderOptions.version, this._builderOptions.encoding, this._builderOptions.standalone); + } + // recursively serialize node + this.serializeNode(node, this._writerOptions.wellFormed, this._writerOptions.noDoubleEncoding); + // remove trailing newline + if (this._writerOptions.prettyPrint && + this._refs.markup.slice(-this._writerOptions.newline.length) === this._writerOptions.newline) { + this._refs.markup = this._refs.markup.slice(0, -this._writerOptions.newline.length); + } + return this._refs.markup; + }; + /** @inheritdoc */ + XMLWriter.prototype.declaration = function (version, encoding, standalone) { + this._beginLine(); + this._refs.markup += ""; + this._endLine(); + }; + /** @inheritdoc */ + XMLWriter.prototype.docType = function (name, publicId, systemId) { + this._beginLine(); + if (publicId && systemId) { + this._refs.markup += ""; + } + else if (publicId) { + this._refs.markup += ""; + } + else if (systemId) { + this._refs.markup += ""; + } + else { + this._refs.markup += ""; + } + this._endLine(); + }; + /** @inheritdoc */ + XMLWriter.prototype.openTagBegin = function (name) { + this._beginLine(); + this._refs.markup += "<" + name; + }; + /** @inheritdoc */ + XMLWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { + // do not indent text only elements or elements with empty text nodes + this._refs.suppressPretty = false; + this._refs.emptyNode = false; + if (this._writerOptions.prettyPrint && !selfClosing && !voidElement) { + var textOnlyNode = true; + var emptyNode = true; + var childNode = this.currentNode.firstChild; + var cdataCount = 0; + var textCount = 0; + while (childNode) { + if (util_2.Guard.isExclusiveTextNode(childNode)) { + textCount++; + } + else if (util_2.Guard.isCDATASectionNode(childNode)) { + cdataCount++; + } + else { + textOnlyNode = false; + emptyNode = false; + break; + } + if (childNode.data !== '') { + emptyNode = false; + } + childNode = childNode.nextSibling; + } + this._refs.suppressPretty = !this._writerOptions.indentTextOnlyNodes && textOnlyNode && ((cdataCount <= 1 && textCount === 0) || cdataCount === 0); + this._refs.emptyNode = emptyNode; + } + if ((voidElement || selfClosing || this._refs.emptyNode) && this._writerOptions.allowEmptyTags) { + this._refs.markup += ">"; + } + else { + this._refs.markup += voidElement ? " />" : + (selfClosing || this._refs.emptyNode) ? (this._writerOptions.spaceBeforeSlash ? " />" : "/>") : ">"; + } + this._endLine(); + }; + /** @inheritdoc */ + XMLWriter.prototype.closeTag = function (name) { + if (!this._refs.emptyNode) { + this._beginLine(); + this._refs.markup += ""; + } + this._refs.suppressPretty = false; + this._refs.emptyNode = false; + this._endLine(); + }; + /** @inheritdoc */ + XMLWriter.prototype.attribute = function (name, value) { + var str = name + "=\"" + value + "\""; + if (this._writerOptions.prettyPrint && this._writerOptions.width > 0 && + this._refs.markup.length - this._lengthToLastNewline + 1 + str.length > this._writerOptions.width) { + this._endLine(); + this._beginLine(); + this._refs.markup += this._indent(1) + str; + } + else { + this._refs.markup += " " + str; + } + }; + /** @inheritdoc */ + XMLWriter.prototype.text = function (data) { + if (data !== '') { + this._beginLine(); + this._refs.markup += data; + this._endLine(); + } + }; + /** @inheritdoc */ + XMLWriter.prototype.cdata = function (data) { + if (data !== '') { + this._beginLine(); + this._refs.markup += ""; + this._endLine(); + } + }; + /** @inheritdoc */ + XMLWriter.prototype.comment = function (data) { + this._beginLine(); + this._refs.markup += ""; + this._endLine(); + }; + /** @inheritdoc */ + XMLWriter.prototype.instruction = function (target, data) { + this._beginLine(); + this._refs.markup += ""; + this._endLine(); + }; + /** + * Produces characters to be prepended to a line of string in pretty-print + * mode. + */ + XMLWriter.prototype._beginLine = function () { + if (this._writerOptions.prettyPrint && !this._refs.suppressPretty) { + this._refs.markup += this._indent(this._writerOptions.offset + this.level); + } + }; + /** + * Produces characters to be appended to a line of string in pretty-print + * mode. + */ + XMLWriter.prototype._endLine = function () { + if (this._writerOptions.prettyPrint && !this._refs.suppressPretty) { + this._refs.markup += this._writerOptions.newline; + this._lengthToLastNewline = this._refs.markup.length; + } + }; + /** + * Produces an indentation string. + * + * @param level - depth of the tree + */ + XMLWriter.prototype._indent = function (level) { + if (level <= 0) { + return ""; + } + else if (this._indentation[level] !== undefined) { + return this._indentation[level]; + } + else { + var str = this._writerOptions.indent.repeat(level); + this._indentation[level] = str; + return str; + } + }; + return XMLWriter; +}(BaseWriter_1.BaseWriter)); +exports.XMLWriter = XMLWriter; +//# sourceMappingURL=XMLWriter.js.map - // 8. If request’s window is "client", then set request’s window to request’s - // client, if request’s client’s global object is a Window object; otherwise - // "no-window". - if (request.window === 'client') { - // TODO: What if request.client is null? - request.window = - request.client?.globalObject?.constructor?.name === 'Window' - ? request.client - : 'no-window' - } +/***/ }), - // 9. If request’s origin is "client", then set request’s origin to request’s - // client’s origin. - if (request.origin === 'client') { - // TODO: What if request.client is null? - request.origin = request.client?.origin - } +/***/ 42444: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 10. If all of the following conditions are true: - // TODO +"use strict"; - // 11. If request’s policy container is "client", then: - if (request.policyContainer === 'client') { - // 1. If request’s client is non-null, then set request’s policy - // container to a clone of request’s client’s policy container. [HTML] - if (request.client != null) { - request.policyContainer = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +var BaseCBWriter_1 = __nccwpck_require__(50708); +/** + * Serializes XML nodes. + */ +var YAMLCBWriter = /** @class */ (function (_super) { + __extends(YAMLCBWriter, _super); + /** + * Initializes a new instance of `BaseCBWriter`. + * + * @param builderOptions - XML builder options + */ + function YAMLCBWriter(builderOptions) { + var _this = _super.call(this, builderOptions) || this; + _this._rootWritten = false; + _this._additionalLevel = 0; + if (builderOptions.indent.length < 2) { + throw new Error("YAML indententation string must be at least two characters long."); + } + if (builderOptions.offset < 0) { + throw new Error("YAML offset should be zero or a positive number."); + } + return _this; } - } - - // 12. If request’s header list does not contain `Accept`, then: - if (!request.headersList.contains('accept')) { - // 1. Let value be `*/*`. - const value = '*/*' - - // 2. A user agent should set value to the first matching statement, if - // any, switching on request’s destination: - // "document" - // "frame" - // "iframe" - // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` - // "image" - // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` - // "style" - // `text/css,*/*;q=0.1` - // TODO - - // 3. Append `Accept`/value to request’s header list. - request.headersList.append('accept', value) - } + /** @inheritdoc */ + YAMLCBWriter.prototype.frontMatter = function () { + return this._beginLine() + "---"; + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.declaration = function (version, encoding, standalone) { + return ""; + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.docType = function (name, publicId, systemId) { + return ""; + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.comment = function (data) { + // "!": "hello" + return this._beginLine() + + this._key(this._builderOptions.convert.comment) + " " + + this._val(data); + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.text = function (data) { + // "#": "hello" + return this._beginLine() + + this._key(this._builderOptions.convert.text) + " " + + this._val(data); + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.instruction = function (target, data) { + // "?": "target hello" + return this._beginLine() + + this._key(this._builderOptions.convert.ins) + " " + + this._val(data ? target + " " + data : target); + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.cdata = function (data) { + // "$": "hello" + return this._beginLine() + + this._key(this._builderOptions.convert.cdata) + " " + + this._val(data); + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.attribute = function (name, value) { + // "@name": "val" + this._additionalLevel++; + var str = this._beginLine() + + this._key(this._builderOptions.convert.att + name) + " " + + this._val(value); + this._additionalLevel--; + return str; + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.openTagBegin = function (name) { + // "node": + // "#": + // - + var str = this._beginLine() + this._key(name); + if (!this._rootWritten) { + this._rootWritten = true; + } + this.hasData = true; + this._additionalLevel++; + str += this._beginLine(true) + this._key(this._builderOptions.convert.text); + return str; + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { + if (selfClosing) { + return " " + this._val(""); + } + return ""; + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.closeTag = function (name) { + this._additionalLevel--; + return ""; + }; + /** @inheritdoc */ + YAMLCBWriter.prototype.beginElement = function (name) { }; + /** @inheritdoc */ + YAMLCBWriter.prototype.endElement = function (name) { }; + /** + * Produces characters to be prepended to a line of string in pretty-print + * mode. + */ + YAMLCBWriter.prototype._beginLine = function (suppressArray) { + if (suppressArray === void 0) { suppressArray = false; } + return (this.hasData ? this._writerOptions.newline : "") + + this._indent(this._writerOptions.offset + this.level, suppressArray); + }; + /** + * Produces an indentation string. + * + * @param level - depth of the tree + * @param suppressArray - whether the suppress array marker + */ + YAMLCBWriter.prototype._indent = function (level, suppressArray) { + if (level + this._additionalLevel <= 0) { + return ""; + } + else { + var chars = this._writerOptions.indent.repeat(level + this._additionalLevel); + if (!suppressArray && this._rootWritten) { + return chars.substr(0, chars.length - 2) + '-' + chars.substr(-1, 1); + } + return chars; + } + }; + /** + * Produces a YAML key string delimited with double quotes. + */ + YAMLCBWriter.prototype._key = function (key) { + return "\"" + key + "\":"; + }; + /** + * Produces a YAML value string delimited with double quotes. + */ + YAMLCBWriter.prototype._val = function (val) { + return JSON.stringify(val); + }; + return YAMLCBWriter; +}(BaseCBWriter_1.BaseCBWriter)); +exports.YAMLCBWriter = YAMLCBWriter; +//# sourceMappingURL=YAMLCBWriter.js.map - // 13. If request’s header list does not contain `Accept-Language`, then - // user agents should append `Accept-Language`/an appropriate value to - // request’s header list. - if (!request.headersList.contains('accept-language')) { - request.headersList.append('accept-language', '*') - } +/***/ }), - // 14. If request’s priority is null, then use request’s initiator and - // destination appropriately in setting request’s priority to a - // user-agent-defined object. - if (request.priority === null) { - // TODO - } +/***/ 96517: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } +"use strict"; - // 16. Run main fetch given fetchParams. - mainFetch(fetchParams) - .catch(err => { - fetchParams.controller.terminate(err) - }) +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var ObjectWriter_1 = __nccwpck_require__(50243); +var util_1 = __nccwpck_require__(76195); +var BaseWriter_1 = __nccwpck_require__(37644); +/** + * Serializes XML nodes into a YAML string. + */ +var YAMLWriter = /** @class */ (function (_super) { + __extends(YAMLWriter, _super); + /** + * Initializes a new instance of `YAMLWriter`. + * + * @param builderOptions - XML builder options + * @param writerOptions - serialization options + */ + function YAMLWriter(builderOptions, writerOptions) { + var _this = _super.call(this, builderOptions) || this; + // provide default options + _this._writerOptions = util_1.applyDefaults(writerOptions, { + wellFormed: false, + noDoubleEncoding: false, + indent: ' ', + newline: '\n', + offset: 0, + group: false, + verbose: false + }); + if (_this._writerOptions.indent.length < 2) { + throw new Error("YAML indententation string must be at least two characters long."); + } + if (_this._writerOptions.offset < 0) { + throw new Error("YAML offset should be zero or a positive number."); + } + return _this; + } + /** + * Produces an XML serialization of the given node. + * + * @param node - node to serialize + * @param writerOptions - serialization options + */ + YAMLWriter.prototype.serialize = function (node) { + // convert to object + var objectWriterOptions = util_1.applyDefaults(this._writerOptions, { + format: "object", + wellFormed: false, + noDoubleEncoding: false, + }); + var objectWriter = new ObjectWriter_1.ObjectWriter(this._builderOptions, objectWriterOptions); + var val = objectWriter.serialize(node); + var markup = this._beginLine(this._writerOptions, 0) + '---' + this._endLine(this._writerOptions) + + this._convertObject(val, this._writerOptions, 0); + // remove trailing newline + /* istanbul ignore else */ + if (markup.slice(-this._writerOptions.newline.length) === this._writerOptions.newline) { + markup = markup.slice(0, -this._writerOptions.newline.length); + } + return markup; + }; + /** + * Produces an XML serialization of the given object. + * + * @param obj - object to serialize + * @param options - serialization options + * @param level - depth of the XML tree + * @param indentLeaf - indents leaf nodes + */ + YAMLWriter.prototype._convertObject = function (obj, options, level, suppressIndent) { + var e_1, _a; + var _this = this; + if (suppressIndent === void 0) { suppressIndent = false; } + var markup = ''; + if (util_1.isArray(obj)) { + try { + for (var obj_1 = __values(obj), obj_1_1 = obj_1.next(); !obj_1_1.done; obj_1_1 = obj_1.next()) { + var val = obj_1_1.value; + markup += this._beginLine(options, level, true); + if (!util_1.isObject(val)) { + markup += this._val(val) + this._endLine(options); + } + else if (util_1.isEmpty(val)) { + markup += '""' + this._endLine(options); + } + else { + markup += this._convertObject(val, options, level, true); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (obj_1_1 && !obj_1_1.done && (_a = obj_1.return)) _a.call(obj_1); + } + finally { if (e_1) throw e_1.error; } + } + } + else /* if (isObject(obj)) */ { + util_1.forEachObject(obj, function (key, val) { + if (suppressIndent) { + markup += _this._key(key); + suppressIndent = false; + } + else { + markup += _this._beginLine(options, level) + _this._key(key); + } + if (!util_1.isObject(val)) { + markup += ' ' + _this._val(val) + _this._endLine(options); + } + else if (util_1.isEmpty(val)) { + markup += ' ""' + _this._endLine(options); + } + else { + markup += _this._endLine(options) + + _this._convertObject(val, options, level + 1); + } + }, this); + } + return markup; + }; + /** + * Produces characters to be prepended to a line of string in pretty-print + * mode. + * + * @param options - serialization options + * @param level - current depth of the XML tree + * @param isArray - whether this line is an array item + */ + YAMLWriter.prototype._beginLine = function (options, level, isArray) { + if (isArray === void 0) { isArray = false; } + var indentLevel = options.offset + level + 1; + var chars = new Array(indentLevel).join(options.indent); + if (isArray) { + return chars.substr(0, chars.length - 2) + '-' + chars.substr(-1, 1); + } + else { + return chars; + } + }; + /** + * Produces characters to be appended to a line of string in pretty-print + * mode. + * + * @param options - serialization options + */ + YAMLWriter.prototype._endLine = function (options) { + return options.newline; + }; + /** + * Produces a YAML key string delimited with double quotes. + */ + YAMLWriter.prototype._key = function (key) { + return "\"" + key + "\":"; + }; + /** + * Produces a YAML value string delimited with double quotes. + */ + YAMLWriter.prototype._val = function (val) { + return JSON.stringify(val); + }; + return YAMLWriter; +}(BaseWriter_1.BaseWriter)); +exports.YAMLWriter = YAMLWriter; +//# sourceMappingURL=YAMLWriter.js.map - // 17. Return fetchParam's controller - return fetchParams.controller -} +/***/ }), -// https://fetch.spec.whatwg.org/#concept-main-fetch -async function mainFetch (fetchParams, recursive = false) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request +/***/ 17476: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 2. Let response be null. - let response = null +"use strict"; - // 3. If request’s local-URLs-only flag is set and request’s current URL is - // not local, then set response to a network error. - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +var MapWriter_1 = __nccwpck_require__(41397); +exports.MapWriter = MapWriter_1.MapWriter; +var XMLWriter_1 = __nccwpck_require__(59606); +exports.XMLWriter = XMLWriter_1.XMLWriter; +var ObjectWriter_1 = __nccwpck_require__(50243); +exports.ObjectWriter = ObjectWriter_1.ObjectWriter; +var JSONWriter_1 = __nccwpck_require__(37510); +exports.JSONWriter = JSONWriter_1.JSONWriter; +var YAMLWriter_1 = __nccwpck_require__(96517); +exports.YAMLWriter = YAMLWriter_1.YAMLWriter; +//# sourceMappingURL=index.js.map - // 4. Run report Content Security Policy violations for request. - // TODO +/***/ }), - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - tryUpgradeRequestToAPotentiallyTrustworthyURL(request) +/***/ 10829: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 6. If should request be blocked due to a bad port, should fetching request - // be blocked as mixed content, or should request be blocked by Content - // Security Policy returns blocked, then set response to a network error. - if (requestBadPort(request) === 'blocked') { - response = makeNetworkError('bad port') - } - // TODO: should fetching request be blocked as mixed content? - // TODO: should request be blocked by Content Security Policy? +"use strict"; - // 7. If request’s referrer policy is the empty string, then set request’s - // referrer policy to request’s policy container’s referrer policy. - if (request.referrerPolicy === '') { - request.referrerPolicy = request.policyContainer.referrerPolicy - } - // 8. If request’s referrer is not "no-referrer", then set request’s - // referrer to the result of invoking determine request’s referrer. - if (request.referrer !== 'no-referrer') { - request.referrer = determineRequestsReferrer(request) - } - // 9. Set request’s current URL’s scheme to "https" if all of the following - // conditions are true: - // - request’s current URL’s scheme is "http" - // - request’s current URL’s host is a domain - // - Matching request’s current URL’s host per Known HSTS Host Domain Name - // Matching results in either a superdomain match with an asserted - // includeSubDomains directive or a congruent match (with or without an - // asserted includeSubDomains directive). [HSTS] - // TODO +var yaml = __nccwpck_require__(59625); - // 10. If recursive is false, then run the remaining steps in parallel. - // TODO - // 11. If response is null, then set response to the result of running - // the steps corresponding to the first matching statement: - if (response === null) { - response = await (async () => { - const currentURL = requestCurrentURL(request) +module.exports = yaml; - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || - // request’s current URL’s scheme is "data" - (currentURL.protocol === 'data:') || - // - request’s mode is "navigate" or "websocket" - (request.mode === 'navigate' || request.mode === 'websocket') - ) { - // 1. Set request’s response tainting to "basic". - request.responseTainting = 'basic' - // 2. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } +/***/ }), - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') - } +/***/ 59625: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // request’s mode is "no-cors" - if (request.mode === 'no-cors') { - // 1. If request’s redirect mode is not "follow", then return a network - // error. - if (request.redirect !== 'follow') { - return makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) - } +"use strict"; - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return makeNetworkError('URL scheme must be a HTTP(S) scheme') - } +var loader = __nccwpck_require__(40342); +var dumper = __nccwpck_require__(98069); - // - request’s use-CORS-preflight flag is set - // - request’s unsafe-request flag is set and either request’s method is - // not a CORS-safelisted method or CORS-unsafe request-header names with - // request’s header list is not empty - // 1. Set request’s response tainting to "cors". - // 2. Let corsWithPreflightResponse be the result of running HTTP fetch - // given fetchParams and true. - // 3. If corsWithPreflightResponse is a network error, then clear cache - // entries using request. - // 4. Return corsWithPreflightResponse. - // TODO - // Otherwise - // 1. Set request’s response tainting to "cors". - request.responseTainting = 'cors' +function deprecated(name) { + return function () { + throw new Error('Function ' + name + ' is deprecated and cannot be used.'); + }; +} - // 2. Return the result of running HTTP fetch given fetchParams. - return await httpFetch(fetchParams) - })() - } - // 12. If recursive is true, then return response. - if (recursive) { - return response - } +module.exports.Type = __nccwpck_require__(90256); +module.exports.Schema = __nccwpck_require__(66280); +module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(70026); +module.exports.JSON_SCHEMA = __nccwpck_require__(2168); +module.exports.CORE_SCHEMA = __nccwpck_require__(11950); +module.exports.DEFAULT_SAFE_SCHEMA = __nccwpck_require__(42881); +module.exports.DEFAULT_FULL_SCHEMA = __nccwpck_require__(145); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.safeLoad = loader.safeLoad; +module.exports.safeLoadAll = loader.safeLoadAll; +module.exports.dump = dumper.dump; +module.exports.safeDump = dumper.safeDump; +module.exports.YAMLException = __nccwpck_require__(29291); - // 13. If response is not a network error and response is not a filtered - // response, then: - if (response.status !== 0 && !response.internalResponse) { - // If request’s response tainting is "cors", then: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } +// Deprecated schema names from JS-YAML 2.0.x +module.exports.MINIMAL_SCHEMA = __nccwpck_require__(70026); +module.exports.SAFE_SCHEMA = __nccwpck_require__(42881); +module.exports.DEFAULT_SCHEMA = __nccwpck_require__(145); - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(false) - } - } +// Deprecated functions from JS-YAML 1.x.x +module.exports.scan = deprecated('scan'); +module.exports.parse = deprecated('parse'); +module.exports.compose = deprecated('compose'); +module.exports.addConstructor = deprecated('addConstructor'); - // 14. Let internalResponse be response, if response is a network error, - // and response’s internal response otherwise. - let internalResponse = - response.status === 0 ? response : response.internalResponse - // 15. If internalResponse’s URL list is empty, then set it to a clone of - // request’s URL list. - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList) - } +/***/ }), - // 16. If request’s timing allow failed flag is unset, then set - // internalResponse’s timing allow passed flag. - if (!request.timingAllowFailed) { - response.timingAllowPassed = true - } +/***/ 59941: +/***/ ((module) => { - // 17. If response is not a network error and any of the following returns - // blocked - // - should internalResponse to request be blocked as mixed content - // - should internalResponse to request be blocked by Content Security Policy - // - should internalResponse to request be blocked due to its MIME type - // - should internalResponse to request be blocked due to nosniff - // TODO +"use strict"; - // 18. If response’s type is "opaque", internalResponse’s status is 206, - // internalResponse’s range-requested flag is set, and request’s header - // list does not contain `Range`, then set response and internalResponse - // to a network error. - if ( - response.type === 'opaque' && - internalResponse.status === 206 && - internalResponse.rangeRequested && - !request.headers.contains('range') - ) { - response = internalResponse = makeNetworkError() - } - // 19. If response is not a network error and either request’s method is - // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, - // set internalResponse’s body to null and disregard any enqueuing toward - // it (if any). - if ( - response.status !== 0 && - (request.method === 'HEAD' || - request.method === 'CONNECT' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = true - } - // 20. If request’s integrity metadata is not the empty string, then: - if (request.integrity) { - // 1. Let processBodyError be this step: run fetch finale given fetchParams - // and a network error. - const processBodyError = (reason) => - fetchFinale(fetchParams, makeNetworkError(reason)) +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} - // 2. If request’s response tainting is "opaque", or response’s body is null, - // then run processBodyError and abort these steps. - if (request.responseTainting === 'opaque' || response.body == null) { - processBodyError(response.error) - return - } - // 3. Let processBody given bytes be these steps: - const processBody = (bytes) => { - // 1. If bytes do not match request’s integrity metadata, - // then run processBodyError and abort these steps. [SRI] - if (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } + return [ sequence ]; } -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function schemeFetch (fetchParams) { - // Note: since the connection is destroyed on redirect, which sets fetchParams to a - // cancelled state, we do not want this condition to trigger *unless* there have been - // no redirects. See https://github.com/nodejs/undici/issues/1776 - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - const { protocol: scheme } = requestCurrentURL(request) +function extend(target, source) { + var index, length, key, sourceKeys; - // 3. Switch on request’s current URL’s scheme and run the associated steps: - switch (scheme) { - case 'about:': { - // If request’s current URL’s path is the string "blank", then return a new response - // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », - // and body is the empty byte sequence as a body. + if (source) { + sourceKeys = Object.keys(source); - // Otherwise, return a network error. - return Promise.resolve(makeNetworkError('about scheme is not supported')) + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(14300).resolveObjectURL) - } + } - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = requestCurrentURL(request) + return target; +} - // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 - // Buffer.resolveObjectURL does not ignore URL queries. - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) - } - const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) +function repeat(string, count) { + var result = '', cycle; - // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s - // object is not a Blob object, then return a network error. - if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { - return Promise.resolve(makeNetworkError('invalid method')) - } + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } - // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. - const bodyWithType = safelyExtractBody(blobURLEntryObject) + return result; +} - // 4. Let body be bodyWithType’s body. - const body = bodyWithType[0] - // 5. Let length be body’s length, serialized and isomorphic encoded. - const length = isomorphicEncode(`${body.length}`) +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} - // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. - const type = bodyWithType[1] ?? '' - // 7. Return a new response whose status message is `OK`, header list is - // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. - const response = makeResponse({ - statusText: 'OK', - headersList: [ - ['content-length', { name: 'Content-Length', value: length }], - ['content-type', { name: 'Content-Type', value: type }] - ] - }) +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; - response.body = body - return Promise.resolve(response) - } - case 'data:': { - // 1. Let dataURLStruct be the result of running the - // data: URL processor on request’s current URL. - const currentURL = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) +/***/ }), - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) - } +/***/ 98069: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = serializeAMimeType(dataURLStruct.mimeType) +"use strict"; - // 4. Return a response whose status message is `OK`, - // header list is « (`Content-Type`, mimeType) », - // and body is dataURLStruct’s body as a body. - return Promise.resolve(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) - } - case 'file:': { - // For now, unfortunate as it is, file URLs are left as an exercise for the reader. - // When in doubt, return a network error. - return Promise.resolve(makeNetworkError('not implemented... yet...')) - } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) - } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) - } - } -} +/*eslint-disable no-use-before-define*/ -// https://fetch.spec.whatwg.org/#finalize-response -function finalizeResponse (fetchParams, response) { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true +var common = __nccwpck_require__(59941); +var YAMLException = __nccwpck_require__(29291); +var DEFAULT_FULL_SCHEMA = __nccwpck_require__(145); +var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(42881); - // 2, If fetchParams’s process response done is not null, then queue a fetch - // task to run fetchParams’s process response done given response, with - // fetchParams’s task destination. - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)) - } -} +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; -// https://fetch.spec.whatwg.org/#fetch-finale -function fetchFinale (fetchParams, response) { - // 1. If response is a network error, then: - if (response.type === 'error') { - // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». - response.urlList = [fetchParams.request.urlList[0]] +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - // 2. Set response’s timing info to the result of creating an opaque timing - // info for fetchParams’s timing info. - response.timingInfo = createOpaqueTimingInfo({ - startTime: fetchParams.timingInfo.startTime - }) - } +var ESCAPE_SEQUENCES = {}; - // 2. Let processResponseEndOfBody be the following steps: - const processResponseEndOfBody = () => { - // 1. Set fetchParams’s request’s done flag. - fetchParams.request.done = true +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; - // If fetchParams’s process response end-of-body is not null, - // then queue a fetch task to run fetchParams’s process response - // end-of-body given response with fetchParams’s task destination. - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) - } - } +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; - // 3. If fetchParams’s process response is non-null, then queue a fetch task - // to run fetchParams’s process response given response, with fetchParams’s - // task destination. - if (fetchParams.processResponse != null) { - queueMicrotask(() => fetchParams.processResponse(response)) - } +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; - // 4. If response’s body is null, then run processResponseEndOfBody. - if (response.body == null) { - processResponseEndOfBody() - } else { - // 5. Otherwise: + if (map === null) return {}; - // 1. Let transformStream be a new a TransformStream. + result = {}; + keys = Object.keys(map); - // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, - // enqueues chunk in transformStream. - const identityTransformAlgorithm = (chunk, controller) => { - controller.enqueue(chunk) + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); } + type = schema.compiledTypeMap['fallback'][tag]; - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm - // and flushAlgorithm set to processResponseEndOfBody. - const transformStream = new TransformStream({ - start () {}, - transform: identityTransformAlgorithm, - flush: processResponseEndOfBody - }, { - size () { - return 1 - } - }, { - size () { - return 1 - } - }) + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } - // 4. Set response’s body to the result of piping response’s body through transformStream. - response.body = { stream: response.body.stream.pipeThrough(transformStream) } + result[tag] = style; } - // 6. If fetchParams’s process response consume body is non-null, then: - if (fetchParams.processResponseConsumeBody != null) { - // 1. Let processBody given nullOrBytes be this step: run fetchParams’s - // process response consume body given response and nullOrBytes. - const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes) - - // 2. Let processBodyError be this step: run fetchParams’s process - // response consume body given response and failure. - const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure) - - // 3. If response’s body is null, then queue a fetch task to run processBody - // given null, with fetchParams’s task destination. - if (response.body == null) { - queueMicrotask(() => processBody(null)) - } else { - // 4. Otherwise, fully read response’s body given processBody, processBodyError, - // and fetchParams’s task destination. - return fullyReadBody(response.body, processBody, processBodyError) - } - return Promise.resolve() - } + return result; } -// https://fetch.spec.whatwg.org/#http-fetch -async function httpFetch (fetchParams) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let response be null. - let response = null - - // 3. Let actualResponse be null. - let actualResponse = null +function encodeHex(character) { + var string, handle, length; - // 4. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo + string = character.toString(16).toUpperCase(); - // 5. If request’s service-workers mode is "all", then: - if (request.serviceWorkers === 'all') { - // TODO + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); } - // 6. If response is null, then: - if (response === null) { - // 1. If makeCORSPreflight is true and one of these conditions is true: - // TODO - - // 2. If request’s redirect mode is "follow", then set request’s - // service-workers mode to "none". - if (request.redirect === 'follow') { - request.serviceWorkers = 'none' - } + return '\\' + handle + common.repeat('0', length - string.length) + string; +} - // 3. Set response and actualResponse to the result of running - // HTTP-network-or-cache fetch given fetchParams. - actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; - // 4. If request’s response tainting is "cors" and a CORS check - // for request and response returns failure, then return a network error. - if ( - request.responseTainting === 'cors' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } + this.tag = null; + this.result = ''; - // 7. If either request’s response tainting or response’s type - // is "opaque", and the cross-origin resource policy check with - // request’s origin, request’s client, request’s destination, - // and actualResponse returns blocked, then return a network error. - if ( - (request.responseTainting === 'opaque' || response.type === 'opaque') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } + this.duplicates = []; + this.usedDuplicates = null; +} - // 8. If actualResponse’s status is a redirect status, then: - if (redirectStatusSet.has(actualResponse.status)) { - // 1. If actualResponse’s status is not 303, request’s body is not null, - // and the connection uses HTTP/2, then user agents may, and are even - // encouraged to, transmit an RST_STREAM frame. - // See, https://github.com/whatwg/fetch/issues/1288 - if (request.redirect !== 'manual') { - fetchParams.controller.connection.destroy() - } +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; - // 2. Switch on request’s redirect mode: - if (request.redirect === 'error') { - // Set response to a network error. - response = makeNetworkError('unexpected redirect') - } else if (request.redirect === 'manual') { - // Set response to an opaque-redirect filtered response whose internal - // response is actualResponse. - // NOTE(spec): On the web this would return an `opaqueredirect` response, - // but that doesn't make sense server side. - // See https://github.com/nodejs/undici/issues/1193. - response = actualResponse - } else if (request.redirect === 'follow') { - // Set response to the result of running HTTP-redirect fetch given - // fetchParams and response. - response = await httpRedirectFetch(fetchParams, response) + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; } else { - assert(false) + line = string.slice(position, next + 1); + position = next + 1; } - } - // 9. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo + if (line.length && line !== '\n') result += ind; - // 10. Return response. - return response -} + result += line; + } -// https://fetch.spec.whatwg.org/#http-redirect-fetch -function httpRedirectFetch (fetchParams, response) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request + return result; +} - // 2. Let actualResponse be response, if response is not a filtered response, - // and response’s internal response otherwise. - const actualResponse = response.internalResponse - ? response.internalResponse - : response +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} - // 3. Let locationURL be actualResponse’s location URL given request’s current - // URL’s fragment. - let locationURL +function testImplicitResolving(state, str) { + var index, length, type; - try { - locationURL = responseLocationURL( - actualResponse, - requestCurrentURL(request).hash - ) + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; - // 4. If locationURL is null, then return response. - if (locationURL == null) { - return response + if (type.resolve(str)) { + return true; } - } catch (err) { - // 5. If locationURL is failure, then return a network error. - return Promise.resolve(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) } - // 7. If request’s redirect count is 20, then return a network error. - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError('redirect count exceeded')) - } + return false; +} - // 8. Increase request’s redirect count by 1. - request.redirectCount += 1 +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} - // 9. If request’s mode is "cors", locationURL includes credentials, and - // request’s origin is not same origin with locationURL’s origin, then return - // a network error. - if ( - request.mode === 'cors' && - (locationURL.username || locationURL.password) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) - } +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} - // 10. If request’s response tainting is "cors" and locationURL includes - // credentials, then return a network error. - if ( - request.responseTainting === 'cors' && - (locationURL.username || locationURL.password) - ) { - return Promise.resolve(makeNetworkError( - 'URL cannot contain credentials for request mode "cors"' - )) - } +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// [24] b-line-feed ::= #xA /* LF */ +// [25] b-carriage-return ::= #xD /* CR */ +// [3] c-byte-order-mark ::= #xFEFF +function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) + // byte-order-mark + && c !== 0xFEFF + // b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} - // 11. If actualResponse’s status is not 303, request’s body is non-null, - // and request’s body’s source is null, then return a network error. - if ( - actualResponse.status !== 303 && - request.body != null && - request.body.source == null - ) { - return Promise.resolve(makeNetworkError()) - } +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c, prev) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + // /* An ns-char preceding */ "#" + && c !== CHAR_COLON + && ((c !== CHAR_SHARP) || (prev && isNsChar(prev))); +} - // 12. If one of the following is true - // - actualResponse’s status is 301 or 302 and request’s method is `POST` - // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` - if ( - ([301, 302].includes(actualResponse.status) && request.method === 'POST') || - (actualResponse.status === 303 && - !GET_OR_HEAD.includes(request.method)) - ) { - // then: - // 1. Set request’s method to `GET` and request’s body to null. - request.method = 'GET' - request.body = null +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} - // 2. For each headerName of request-body-header name, delete headerName from - // request’s header list. - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName) - } - } +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} - // 13. If request’s current URL’s origin is not same origin with locationURL’s - // origin, then for each headerName of CORS non-wildcard request-header name, - // delete headerName from request’s header list. - if (!sameOrigin(requestCurrentURL(request), locationURL)) { - // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name - request.headersList.delete('authorization') +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; - // https://fetch.spec.whatwg.org/#authentication-entries - request.headersList.delete('proxy-authorization', true) +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); - // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. - request.headersList.delete('cookie') - request.headersList.delete('host') + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); } - - // 14. If request’s body is non-null, then set request’s body to the first return - // value of safely extracting request’s body’s source. - if (request.body != null) { - assert(request.body.source != null) - request.body = safelyExtractBody(request.body.source)[0] + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; } - - // 15. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo - - // 16. Set timingInfo’s redirect end time and post-redirect start time to the - // coarsened shared current time given fetchParams’s cross-origin isolated - // capability. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) - - // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s - // redirect start time to timingInfo’s start time. - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; } - - // 18. Append locationURL to request’s URL list. - request.urlList.push(locationURL) - - // 19. Invoke set request’s referrer policy on redirect on request and - // actualResponse. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; } -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function httpNetworkOrCacheFetch ( - fetchParams, - isAuthenticationFetch = false, - isNewConnectionFetch = false -) { - // 1. Let request be fetchParams’s request. - const request = fetchParams.request - - // 2. Let httpFetchParams be null. - let httpFetchParams = null +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } - // 3. Let httpRequest be null. - let httpRequest = null + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - // 4. Let response be null. - let response = null + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } - // 5. Let storedResponse be null. - // TODO: cache + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} - // 6. Let httpCache be null. - const httpCache = null +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - // 7. Let the revalidatingFlag be unset. - const revalidatingFlag = false + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); - // 8. Run these steps, but abort when the ongoing fetch is terminated: + return indentIndicator + chomp + '\n'; +} - // 1. If request’s window is "no-window" and request’s redirect mode is - // "error", then set httpFetchParams to fetchParams and httpRequest to - // request. - if (request.window === 'no-window' && request.redirect === 'error') { - httpFetchParams = fetchParams - httpRequest = request - } else { - // Otherwise: +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} - // 1. Set httpRequest to a clone of request. - httpRequest = makeRequest(request) +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; } - // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') - - // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s - // body is non-null; otherwise null. - const contentLength = httpRequest.body ? httpRequest.body.length : null + return result; +} - // 5. Let contentLengthHeaderValue be null. - let contentLengthHeaderValue = null +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; - // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or - // `PUT`, then set contentLengthHeaderValue to `0`. - if ( - httpRequest.body == null && - ['POST', 'PUT'].includes(httpRequest.method) - ) { - contentLengthHeaderValue = '0' - } + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; - // 7. If contentLength is non-null, then set contentLengthHeaderValue to - // contentLength, serialized and isomorphic encoded. - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; } - // 8. If contentLengthHeaderValue is non-null, then append - // `Content-Length`/contentLengthHeaderValue to httpRequest’s header - // list. - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append('content-length', contentLengthHeaderValue) + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); } - // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, - // contentLengthHeaderValue) to httpRequest’s header list. + return result.slice(1); // drop extra \n joiner +} - // 10. If contentLength is non-null and httpRequest’s keepalive is true, - // then: - if (contentLength != null && httpRequest.keepalive) { - // NOTE: keepalive is a noop outside of browser context. - } +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; - // 11. If httpRequest’s referrer is a URL, then append - // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, - // to httpRequest’s header list. - if (httpRequest.referrer instanceof URL) { - httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href)) + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); } - // 12. Append a request `Origin` header for httpRequest. - appendRequestOriginHeader(httpRequest) - - // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] - appendFetchMetadata(httpRequest) + return result; +} - // 14. If httpRequest’s header list does not contain `User-Agent`, then - // user agents should append `User-Agent`/default `User-Agent` value to - // httpRequest’s header list. - if (!httpRequest.headersList.contains('user-agent')) { - httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') - } +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; - // 15. If httpRequest’s cache mode is "default" and httpRequest’s header - // list contains `If-Modified-Since`, `If-None-Match`, - // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set - // httpRequest’s cache mode to "no-store". - if ( - httpRequest.cache === 'default' && - (httpRequest.headersList.contains('if-modified-since') || - httpRequest.headersList.contains('if-none-match') || - httpRequest.headersList.contains('if-unmodified-since') || - httpRequest.headersList.contains('if-match') || - httpRequest.headersList.contains('if-range')) - ) { - httpRequest.cache = 'no-store' + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } } - // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent - // no-cache cache-control header modification flag is unset, and - // httpRequest’s header list does not contain `Cache-Control`, then append - // `Cache-Control`/`max-age=0` to httpRequest’s header list. - if ( - httpRequest.cache === 'no-cache' && - !httpRequest.preventNoCacheCacheControlHeaderModification && - !httpRequest.headersList.contains('cache-control') - ) { - httpRequest.headersList.append('cache-control', 'max-age=0') - } + state.tag = _tag; + state.dump = '[' + _result + ']'; +} - // 17. If httpRequest’s cache mode is "no-store" or "reload", then: - if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { - // 1. If httpRequest’s header list does not contain `Pragma`, then append - // `Pragma`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('pragma')) { - httpRequest.headersList.append('pragma', 'no-cache') - } +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; - // 2. If httpRequest’s header list does not contain `Cache-Control`, - // then append `Cache-Control`/`no-cache` to httpRequest’s header list. - if (!httpRequest.headersList.contains('cache-control')) { - httpRequest.headersList.append('cache-control', 'no-cache') - } - } + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } - // 18. If httpRequest’s header list contains `Range`, then append - // `Accept-Encoding`/`identity` to httpRequest’s header list. - if (httpRequest.headersList.contains('range')) { - httpRequest.headersList.append('accept-encoding', 'identity') - } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } - // 19. Modify httpRequest’s header list per HTTP. Do not append a given - // header if httpRequest’s header list contains that header’s name. - // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 - if (!httpRequest.headersList.contains('accept-encoding')) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate') - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate') + _result += state.dump; } } - httpRequest.headersList.delete('host') - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} - // 21. If there’s a proxy-authentication entry, use it as appropriate. - // TODO: proxy-authentication +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; - // 22. Set httpCache to the result of determining the HTTP cache - // partition, given httpRequest. - // TODO: cache + for (index = 0, length = objectKeyList.length; index < length; index += 1) { - // 23. If httpCache is null, then set httpRequest’s cache mode to - // "no-store". - if (httpCache == null) { - httpRequest.cache = 'no-store' - } + pairBuffer = ''; + if (index !== 0) pairBuffer += ', '; - // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') { - // TODO: cache - } + if (state.condenseFlow) pairBuffer += '"'; - // 9. If aborted, then return the appropriate network error for fetchParams. - // TODO + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; - // 10. If response is null, then: - if (response == null) { - // 1. If httpRequest’s cache mode is "only-if-cached", then return a - // network error. - if (httpRequest.mode === 'only-if-cached') { - return makeNetworkError('only if cached') + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; } - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await httpNetworkFetch( - httpFetchParams, - includeCredentials, - isNewConnectionFetch - ) + if (state.dump.length > 1024) pairBuffer += '? '; - // 3. If httpRequest’s method is unsafe and forwardResponse’s status is - // in the range 200 to 399, inclusive, invalidate appropriate stored - // responses in httpCache, as per the "Invalidation" chapter of HTTP - // Caching, and set storedResponse to null. [HTTP-CACHING] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache - } + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. } - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse + pairBuffer += state.dump; - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache - } + // Both key and value are valid. + _result += pairBuffer; } - // 11. Set response’s URL list to a clone of httpRequest’s URL list. - response.urlList = [...httpRequest.urlList] + state.tag = _tag; + state.dump = '{' + _result + '}'; +} - // 12. If httpRequest’s header list contains `Range`, then set response’s - // range-requested flag. - if (httpRequest.headersList.contains('range')) { - response.rangeRequested = true - } +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; - // 13. Set response’s request-includes-credentials to includeCredentials. - response.requestIncludesCredentials = includeCredentials + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } - // 14. If response’s status is 401, httpRequest’s response tainting is not - // "cors", includeCredentials is true, and request’s window is an environment - // settings object, then: - // TODO + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; - // 15. If response’s status is 407, then: - if (response.status === 407) { - // 1. If request’s window is "no-window", then return a network error. - if (request.window === 'no-window') { - return makeNetworkError() + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); } - // 2. ??? + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. } - // 4. Prompt the end user as appropriate in request’s window and store - // the result as a proxy-authentication entry. [HTTP-AUTH] - // TODO: Invoke some kind of callback? + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); - // 5. Set response to the result of running HTTP-network-or-cache fetch given - // fetchParams. - // TODO - return makeNetworkError('proxy authentication required') - } + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } - // 16. If all of the following are true - if ( - // response’s status is 421 - response.status === 421 && - // isNewConnectionFetch is false - !isNewConnectionFetch && - // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request.body == null || request.body.source != null) - ) { - // then: + pairBuffer += state.dump; - // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) + if (explicitPair) { + pairBuffer += generateNextLine(state, level); } - // 2. Set response to the result of running HTTP-network-or-cache - // fetch given fetchParams, isAuthenticationFetch, and true. + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } - // TODO (spec): The spec doesn't specify this but we need to cancel - // the active response before we can start a new one. - // https://github.com/whatwg/fetch/issues/1293 - fetchParams.controller.connection.destroy() + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } - response = await httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) - } + pairBuffer += state.dump; - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO + // Both key and value are valid. + _result += pairBuffer; } - // 18. Return response. - return response + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. } -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed) - - fetchParams.controller.connection = { - abort: null, - destroyed: false, - destroy (err) { - if (!this.destroyed) { - this.destroyed = true - this.abort?.(err ?? new DOMException('The operation was aborted.', 'AbortError')) - } - } - } +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; - // 1. Let request be fetchParams’s request. - const request = fetchParams.request + typeList = explicit ? state.explicitTypes : state.implicitTypes; - // 2. Let response be null. - let response = null + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; - // 3. Let timingInfo be fetchParams’s timing info. - const timingInfo = fetchParams.timingInfo + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { - // 4. Let httpCache be the result of determining the HTTP cache partition, - // given request. - // TODO: cache - const httpCache = null + state.tag = explicit ? type.tag : '?'; - // 5. If httpCache is null, then set request’s cache mode to "no-store". - if (httpCache == null) { - request.cache = 'no-store' - } + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; - // 6. Let networkPartitionKey be the result of determining the network - // partition key given request. - // TODO + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } - // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise - // "no". - const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars + state.dump = _result; + } - // 8. Switch on request’s mode: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO + return true; + } } - // 9. Run these steps, but abort when the ongoing fetch is terminated: - - // 1. If connection is failure, then return a network error. - - // 2. Set timingInfo’s final connection timing info to the result of - // calling clamp and coarsen connection timing info with connection’s - // timing info, timingInfo’s post-redirect start time, and fetchParams’s - // cross-origin isolated capability. - - // 3. If connection is not an HTTP/2 connection, request’s body is non-null, - // and request’s body’s source is null, then append (`Transfer-Encoding`, - // `chunked`) to request’s header list. - - // 4. Set timingInfo’s final network-request start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated - // capability. - - // 5. Set response to the result of making an HTTP request over connection - // using request with the following caveats: - - // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] - // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] - - // - If request’s body is non-null, and request’s body’s source is null, - // then the user agent may have a buffer of up to 64 kibibytes and store - // a part of request’s body in that buffer. If the user agent reads from - // request’s body beyond that buffer’s size and the user agent needs to - // resend request, then instead return a network error. - - // - Set timingInfo’s final network-response start time to the coarsened - // shared current time given fetchParams’s cross-origin isolated capability, - // immediately after the user agent’s HTTP parser receives the first byte - // of the response (e.g., frame header bytes for HTTP/2 or response status - // line for HTTP/1.x). - - // - Wait until all the headers are transmitted. - - // - Any responses whose status is in the range 100 to 199, inclusive, - // and is not 101, are to be ignored, except for the purposes of setting - // timingInfo’s final network-response start time above. - - // - If request’s header list contains `Transfer-Encoding`/`chunked` and - // response is transferred via HTTP/1.0 or older, then return a network - // error. - - // - If the HTTP request results in a TLS client certificate dialog, then: + return false; +} - // 1. If request’s window is an environment settings object, make the - // dialog available in request’s window. +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; - // 2. Otherwise, return a network error. + if (!detectType(state, object, false)) { + detectType(state, object, true); + } - // To transmit request’s body body, run these steps: - let requestBody = null - // 1. If body is null and fetchParams’s process request end-of-body is - // non-null, then queue a fetch task given fetchParams’s process request - // end-of-body and fetchParams’s task destination. - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()) - } else if (request.body != null) { - // 2. Otherwise, if body is non-null: + var type = _toString.call(state.dump); - // 1. Let processBodyChunk given bytes be these steps: - const processBodyChunk = async function * (bytes) { - // 1. If the ongoing fetch is terminated, then abort these steps. - if (isCancelled(fetchParams)) { - return - } + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } - // 2. Run this step in parallel: transmit bytes. - yield bytes + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; - // 3. If fetchParams’s process request body is non-null, then run - // fetchParams’s process request body given bytes’s length. - fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) - } + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } - // 2. Let processEndOfBody be these steps: - const processEndOfBody = () => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } - // 2. If fetchParams’s process request end-of-body is non-null, - // then run fetchParams’s process request end-of-body. - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody() - } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return - } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } } else { - fetchParams.controller.terminate(e) + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } } - } - - // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, - // processBodyError, and fetchParams’s task destination. - requestBody = (async function * () { - try { - for await (const bytes of request.body.stream) { - yield * processBodyChunk(bytes) + } else if (type === '[object Array]') { + var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; } - processEndOfBody() - } catch (err) { - processBodyError(err) } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, headersList }) + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); } - } catch (err) { - // 10. If aborted, then: - if (err.name === 'AbortError') { - // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. - fetchParams.controller.connection.destroy() - // 2. Return the appropriate network error for fetchParams. - return makeAppropriateNetworkError(fetchParams, err) + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; } - - return makeNetworkError(err) - } - - // 11. Let pullAlgorithm be an action that resumes the ongoing fetch - // if it is suspended. - const pullAlgorithm = () => { - fetchParams.controller.resume() } - // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s - // controller with reason, given reason. - const cancelAlgorithm = (reason) => { - fetchParams.controller.abort(reason) - } + return true; +} - // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by - // the user agent. - // TODO +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; - // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object - // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. - // TODO + inspectNode(object, objects, duplicatesIndexes); - // 15. Let stream be a new ReadableStream. - // 16. Set up stream with pullAlgorithm set to pullAlgorithm, - // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to - // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); } + state.usedDuplicates = new Array(length); +} - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) - } - }, - { - highWaterMark: 0, - size () { - return 1 - } - } - ) - - // 17. Run these steps, but abort when the ongoing fetch is terminated: +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; - // 1. Set response’s body to a new body whose stream is stream. - response.body = { stream } + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); - // 2. If response is not a network error and request’s cache mode is - // not "no-store", then update response in httpCache for request. - // TODO + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); - // 3. If includeCredentials is true and the user agent is not configured - // to block cookies for request (see section 7 of [COOKIES]), then run the - // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on - // the value of each header whose name is a byte-case-insensitive match for - // `Set-Cookie` in response’s header list, if any, and request’s current URL. - // TODO + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} - // 18. If aborted, then: - // TODO +function dump(input, options) { + options = options || {}; - // 19. Run these steps in parallel: + var state = new State(options); - // 1. Run these steps, but abort when fetchParams is canceled: - fetchParams.controller.on('terminated', onAborted) - fetchParams.controller.resume = async () => { - // 1. While true - while (true) { - // 1-3. See onData... + if (!state.noRefs) getDuplicateReferences(input, state); - // 4. Set bytes to the result of handling content codings given - // codings and bytes. - let bytes - let isFailure - try { - const { done, value } = await fetchParams.controller.next() + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; - if (isAborted(fetchParams)) { - break - } + return ''; +} - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined - } else { - bytes = err +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} - // err may be propagated from the result of calling readablestream.cancel, - // which might not be an error. https://github.com/nodejs/undici/issues/2009 - isFailure = true - } - } +module.exports.dump = dump; +module.exports.safeDump = safeDump; - if (bytes === undefined) { - // 2. Otherwise, if the bytes transmission for response’s message - // body is done normally and stream is readable, then close - // stream, finalize response for fetchParams and response, and - // abort these in-parallel steps. - readableStreamClose(fetchParams.controller.controller) - finalizeResponse(fetchParams, response) +/***/ }), - return - } +/***/ 29291: +/***/ ((module) => { - // 5. Increase timingInfo’s decoded body size by bytes’s length. - timingInfo.decodedBodySize += bytes?.byteLength ?? 0 +"use strict"; +// YAML error class. http://stackoverflow.com/questions/8458984 +// - // 6. If bytes is failure, then terminate fetchParams’s controller. - if (isFailure) { - fetchParams.controller.terminate(bytes) - return - } - // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes - // into stream. - fetchParams.controller.controller.enqueue(new Uint8Array(bytes)) +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); - // 8. If stream is errored, then terminate the ongoing fetch. - if (isErrored(stream)) { - fetchParams.controller.terminate() - return - } + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (!fetchParams.controller.controller.desiredSize) { - return - } - } + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; } +} - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (isAborted(fetchParams)) { - // 1. Set response’s aborted flag. - response.aborted = true - // 2. If stream is readable, then error stream with the result of - // deserialize a serialized abort reason given fetchParams’s - // controller’s serialized abort reason and an - // implementation-defined realm. - if (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) - } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) - } - } +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; - // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. - // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. - fetchParams.controller.connection.destroy() - } - // 20. Return response. - return response +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; - async function dispatch ({ body }) { - const url = requestCurrentURL(request) - /** @type {import('../..').Agent} */ - const agent = fetchParams.controller.dispatcher + result += this.reason || '(unknown reason)'; - return new Promise((resolve, reject) => agent.dispatch( - { - path: url.pathname + url.search, - origin: url.origin, - method: request.method, - body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, - headers: request.headersList.entries, - maxRedirections: 0, - upgrade: request.mode === 'websocket' ? 'websocket' : undefined - }, - { - body: null, - abort: null, + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } - onConnect (abort) { - // TODO (fix): Do we need connection here? - const { connection } = fetchParams.controller + return result; +}; - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort - } - }, - onHeaders (status, headersList, resume, statusText) { - if (status < 200) { - return - } +module.exports = YAMLException; - let codings = [] - let location = '' - const headers = new Headers() +/***/ }), - // For H2, the headers are a plain JS object - // We distinguish between them and iterate accordingly - if (Array.isArray(headersList)) { - for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString('latin1') - const val = headersList[n + 1].toString('latin1') - if (key.toLowerCase() === 'content-encoding') { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - // "All content-coding values are case-insensitive..." - codings = val.toLowerCase().split(',').map((x) => x.trim()) - } else if (key.toLowerCase() === 'location') { - location = val - } +/***/ 40342: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - headers[kHeadersList].append(key, val) - } - } else { - const keys = Object.keys(headersList) - for (const key of keys) { - const val = headersList[key] - if (key.toLowerCase() === 'content-encoding') { - // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 - // "All content-coding values are case-insensitive..." - codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse() - } else if (key.toLowerCase() === 'location') { - location = val - } +"use strict"; - headers[kHeadersList].append(key, val) - } - } - this.body = new Readable({ read: resume }) +/*eslint-disable max-len,no-use-before-define*/ - const decoders = [] +var common = __nccwpck_require__(59941); +var YAMLException = __nccwpck_require__(29291); +var Mark = __nccwpck_require__(77262); +var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(42881); +var DEFAULT_FULL_SCHEMA = __nccwpck_require__(145); - const willFollow = request.redirect === 'follow' && - location && - redirectStatusSet.has(status) - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { - for (const coding of codings) { - // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 - if (coding === 'x-gzip' || coding === 'gzip') { - decoders.push(zlib.createGunzip({ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(zlib.createInflate()) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress()) - } else { - decoders.length = 0 - break - } - } - } +var _hasOwnProperty = Object.prototype.hasOwnProperty; - resolve({ - status, - statusText, - headersList: headers[kHeadersList], - body: decoders.length - ? pipeline(this.body, ...decoders, () => { }) - : this.body.on('error', () => {}) - }) - return true - }, +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; - onData (chunk) { - if (fetchParams.controller.dump) { - return - } - // 1. If one or more bytes have been transmitted from response’s - // message body, then: +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; - // 1. Let bytes be the transmitted bytes. - const bytes = chunk - // 2. Let codings be the result of extracting header list values - // given `Content-Encoding` and response’s header list. - // See pullAlgorithm. +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - // 3. Increase timingInfo’s encoded body size by bytes’s length. - timingInfo.encodedBodySize += bytes.byteLength - // 4. See pullAlgorithm... +function _class(obj) { return Object.prototype.toString.call(obj); } - return this.body.push(bytes) - }, +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} - onComplete () { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} - fetchParams.controller.ended = true +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} - this.body.push(null) - }, +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) - } +function fromHexCode(c) { + var lc; - this.body?.destroy(error) + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } - fetchParams.controller.terminate(error) + /*eslint-disable no-bitwise*/ + lc = c | 0x20; - reject(error) - }, + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } - onUpgrade (status, headersList, socket) { - if (status !== 101) { - return - } + return -1; +} - const headers = new Headers() +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} - for (let n = 0; n < headersList.length; n += 2) { - const key = headersList[n + 0].toString('latin1') - const val = headersList[n + 1].toString('latin1') +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } - headers[kHeadersList].append(key, val) - } + return -1; +} - resolve({ - status, - statusText: STATUS_CODES[status], - headersList: headers[kHeadersList], - socket - }) +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} - return true - } - } - )) +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); } -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); } -/***/ }), - -/***/ 48359: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +function State(input, options) { + this.input = input; -"use strict"; -/* globals AbortController */ + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; -const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(41472) -const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(10554) -const { FinalizationRegistry } = __nccwpck_require__(56436)() -const util = __nccwpck_require__(83983) -const { - isValidHTTPToken, - sameOrigin, - normalizeMethod, - makePolicyContainer, - normalizeMethodRecord -} = __nccwpck_require__(52538) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(41037) -const { kEnumerableProperty } = util -const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(15861) -const { webidl } = __nccwpck_require__(21744) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { URLSerializer } = __nccwpck_require__(685) -const { kHeadersList, kConstruct } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(82361) + this.documents = []; -let TransformStream = globalThis.TransformStream + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ -const kAbortController = Symbol('abortController') +} -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - if (input === kConstruct) { - return - } +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} - webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) +function throwError(state, message) { + throw generateError(state, message); +} - input = webidl.converters.RequestInfo(input) - init = webidl.converters.RequestInit(init) +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - this[kRealm] = { - settingsObject: { - baseUrl: getGlobalOrigin(), - get origin () { - return this.baseUrl?.origin - }, - policyContainer: makePolicyContainer() - } - } - // 1. Let request be null. - let request = null +var directiveHandlers = { - // 2. Let fallbackMode be null. - let fallbackMode = null + YAML: function handleYamlDirective(state, name, args) { - // 3. Let baseURL be this’s relevant settings object’s API base URL. - const baseUrl = this[kRealm].settingsObject.baseUrl + var match, major, minor; - // 4. Let signal be null. - let signal = null + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } - // 5. If input is a string, then: - if (typeof input === 'string') { - // 1. Let parsedURL be the result of parsing input with baseURL. - // 2. If parsedURL is failure, then throw a TypeError. - let parsedURL - try { - parsedURL = new URL(input, baseUrl) - } catch (err) { - throw new TypeError('Failed to parse URL from ' + input, { cause: err }) - } + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } - // 3. If parsedURL includes credentials, then throw a TypeError. - if (parsedURL.username || parsedURL.password) { - throw new TypeError( - 'Request cannot be constructed from a URL that includes credentials: ' + - input - ) - } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - // 6. Otherwise: + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); - // 7. Assert: input is a Request object. - assert(input instanceof Request) + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } - // 8. Set request to input’s request. - request = input[kState] + state.version = args[0]; + state.checkLineBreaks = (minor < 2); - // 9. Set signal to input’s signal. - signal = input[kSignal] + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); } + }, - // 7. Let origin be this’s relevant settings object’s origin. - const origin = this[kRealm].settingsObject.origin + TAG: function handleTagDirective(state, name, args) { - // 8. Let window be "client". - let window = 'client' + var handle, prefix; - // 9. If request’s window is an environment settings object and its origin - // is same origin with origin, then set window to request’s window. - if ( - request.window?.constructor?.name === 'EnvironmentSettingsObject' && - sameOrigin(request.window, origin) - ) { - window = request.window + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); } - // 10. If init["window"] exists and is non-null, then throw a TypeError. - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`) + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); } - // 11. If init["window"] exists, then set window to "no-window". - if ('window' in init) { - window = 'no-window' + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); } - // 12. Set request to a new request with the following properties: - request = makeRequest({ - // URL request’s URL. - // undici implementation note: this is set as the first item in request's urlList in makeRequest - // method request’s method. - method: request.method, - // header list A copy of request’s header list. - // undici implementation note: headersList is cloned in makeRequest - headersList: request.headersList, - // unsafe-request flag Set. - unsafeRequest: request.unsafeRequest, - // client This’s relevant settings object. - client: this[kRealm].settingsObject, - // window window. - window, - // priority request’s priority. - priority: request.priority, - // origin request’s origin. The propagation of the origin is only significant for navigation requests - // being handled by a service worker. In this scenario a request can have an origin that is different - // from the current client. - origin: request.origin, - // referrer request’s referrer. - referrer: request.referrer, - // referrer policy request’s referrer policy. - referrerPolicy: request.referrerPolicy, - // mode request’s mode. - mode: request.mode, - // credentials mode request’s credentials mode. - credentials: request.credentials, - // cache mode request’s cache mode. - cache: request.cache, - // redirect mode request’s redirect mode. - redirect: request.redirect, - // integrity metadata request’s integrity metadata. - integrity: request.integrity, - // keepalive request’s keepalive. - keepalive: request.keepalive, - // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request.reloadNavigation, - // history-navigation flag request’s history-navigation flag. - historyNavigation: request.historyNavigation, - // URL list A clone of request’s URL list. - urlList: [...request.urlList] - }) + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } - const initHasKey = Object.keys(init).length !== 0 + state.tagMap[handle] = prefix; + } +}; - // 13. If init is not empty, then: - if (initHasKey) { - // 1. If request’s mode is "navigate", then set it to "same-origin". - if (request.mode === 'navigate') { - request.mode = 'same-origin' - } - // 2. Unset request’s reload-navigation flag. - request.reloadNavigation = false +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; - // 3. Unset request’s history-navigation flag. - request.historyNavigation = false + if (start < end) { + _result = state.input.slice(start, end); - // 4. Set request’s origin to "client". - request.origin = 'client' + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } - // 5. Set request’s referrer to "client" - request.referrer = 'client' + state.result += _result; + } +} - // 6. Set request’s referrer policy to the empty string. - request.referrerPolicy = '' +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; - // 7. Set request’s URL to request’s current URL. - request.url = request.urlList[request.urlList.length - 1] + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } - // 8. Set request’s URL list to « request’s URL ». - request.urlList = [request.url] + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; } + } +} - // 14. If init["referrer"] exists, then: - if (init.referrer !== undefined) { - // 1. Let referrer be init["referrer"]. - const referrer = init.referrer +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; - // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". - if (referrer === '') { - request.referrer = 'no-referrer' - } else { - // 1. Let parsedReferrer be the result of parsing referrer with - // baseURL. - // 2. If parsedReferrer is failure, then throw a TypeError. - let parsedReferrer - try { - parsedReferrer = new URL(referrer, baseUrl) - } catch (err) { - throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) - } + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); - // 3. If one of the following is true - // - parsedReferrer’s scheme is "about" and path is the string "client" - // - parsedReferrer’s origin is not same origin with origin - // then set request’s referrer to "client". - if ( - (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || - (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) - ) { - request.referrer = 'client' - } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer - } + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); } - } - // 15. If init["referrerPolicy"] exists, then set request’s referrer policy - // to it. - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } } + } - // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. - let mode - if (init.mode !== undefined) { - mode = init.mode + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } } else { - mode = fallbackMode + mergeMappings(state, _result, valueNode, overridableKeys); } - - // 17. If mode is "navigate", then throw a TypeError. - if (mode === 'navigate') { - throw webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } - // 18. If mode is non-null, set request’s mode to mode. - if (mode != null) { - request.mode = mode - } + return _result; +} - // 19. If init["credentials"] exists, then set request’s credentials mode - // to it. - if (init.credentials !== undefined) { - request.credentials = init.credentials - } +function readLineBreak(state) { + var ch; - // 18. If init["cache"] exists, then set request’s cache mode to it. - if (init.cache !== undefined) { - request.cache = init.cache - } + ch = state.input.charCodeAt(state.position); - // 21. If request’s cache mode is "only-if-cached" and request’s mode is - // not "same-origin", then throw a TypeError. - if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { - throw new TypeError( - "'only-if-cached' can be set only with 'same-origin' mode" - ) + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; } + } else { + throwError(state, 'a line break is expected'); + } - // 22. If init["redirect"] exists, then set request’s redirect mode to it. - if (init.redirect !== undefined) { - request.redirect = init.redirect - } + state.line += 1; + state.lineStart = state.position; +} - // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity != null) { - request.integrity = String(init.integrity) +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); } - // 24. If init["keepalive"] exists, then set request’s keepalive to it. - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive) + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); } - // 25. If init["method"] exists, then: - if (init.method !== undefined) { - // 1. Let method be init["method"]. - let method = init.method + if (is_EOL(ch)) { + readLineBreak(state); - // 2. If method is not a method or method is a forbidden method, then - // throw a TypeError. - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) - } + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; - if (forbiddenMethodsSet.has(method.toUpperCase())) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); } + } else { + break; + } + } - // 3. Normalize method. - method = normalizeMethodRecord[method] ?? normalizeMethod(method) + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } - // 4. Set request’s method to method. - request.method = method - } + return lineBreaks; +} - // 26. If init["signal"] exists, then set signal to it. - if (init.signal !== undefined) { - signal = init.signal +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; } + } - // 27. Set this’s request to request. - this[kState] = request + return false; +} - // 28. Set this’s signal to a new AbortSignal object with this’s relevant - // Realm. - // TODO: could this be simplified with AbortSignal.any - // (https://dom.spec.whatwg.org/#dom-abortsignal-any) - const ac = new AbortController() - this[kSignal] = ac.signal - this[kSignal][kRealm] = this[kRealm] +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} - // 29. If signal is not null, then make this’s signal follow signal. - if (signal != null) { - if ( - !signal || - typeof signal.aborted !== 'boolean' || - typeof signal.addEventListener !== 'function' - ) { - throw new TypeError( - "Failed to construct 'Request': member signal is not of type AbortSignal." - ) - } - if (signal.aborted) { - ac.abort(signal.reason) - } else { - // Keep a strong ref to ac while request object - // is alive. This is needed to prevent AbortController - // from being prematurely garbage collected. - // See, https://github.com/nodejs/undici/issues/1926. - this[kAbortController] = ac +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; - const acRef = new WeakRef(ac) - const abort = function () { - const ac = acRef.deref() - if (ac !== undefined) { - ac.abort(this.reason) - } - } + ch = state.input.charCodeAt(state.position); - // Third-party AbortControllers may not work with these. - // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. - try { - // If the max amount of listeners is equal to the default, increase it - // This is only available in node >= v19.9.0 - if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(100, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(100, signal) - } - } catch {} + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } - util.addAbortListener(signal, abort) - requestFinalizer.register(ac, { signal, abort }) - } + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; } + } - // 30. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is request’s header list and guard is - // "request". - this[kHeaders] = new Headers(kConstruct) - this[kHeaders][kHeadersList] = request.headersList - this[kHeaders][kGuard] = 'request' - this[kHeaders][kRealm] = this[kRealm] + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; - // 31. If this’s request’s mode is "no-cors", then: - if (mode === 'no-cors') { - // 1. If this’s request’s method is not a CORS-safelisted method, - // then throw a TypeError. - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; } - // 2. Set this’s headers’s guard to "request-no-cors". - this[kHeaders][kGuard] = 'request-no-cors' - } + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = this[kHeaders][kHeadersList] - // 1. Let headers be a copy of this’s headers and its associated header - // list. - // 2. If init["headers"] exists, then set headers to init["headers"]. - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) + if (is_WS_OR_EOL(preceding)) { + break; + } - // 3. Empty this’s headers’s header list. - headersList.clear() + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; - // 4. If headers is a Headers object, then for each header in its header - // list, append header’s name/header’s value to this’s headers. - if (headers instanceof HeadersList) { - for (const [key, val] of headers) { - headersList.append(key, val) - } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; } } - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[kState].body : null + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } - // 34. If either init["body"] exists and is non-null or inputBody is - // non-null, and request’s method is `GET` or `HEAD`, then throw a - // TypeError. - if ( - (init.body != null || inputBody != null) && - (request.method === 'GET' || request.method === 'HEAD') - ) { - throw new TypeError('Request with GET/HEAD method cannot have body.') + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; } - // 35. Let initBody be null. - let initBody = null + ch = state.input.charCodeAt(++state.position); + } - // 36. If init["body"] exists and is non-null, then: - if (init.body != null) { - // 1. Let Content-Type be null. - // 2. Set initBody and Content-Type to the result of extracting - // init["body"], with keepalive set to request’s keepalive. - const [extractedBody, contentType] = extractBody( - init.body, - request.keepalive - ) - initBody = extractedBody + captureSegment(state, captureStart, captureEnd, false); - // 3, If Content-Type is non-null and this’s headers’s header list does - // not contain `Content-Type`, then append `Content-Type`/Content-Type to - // this’s headers. - if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) { - this[kHeaders].append('content-type', contentType) - } - } + if (state.result) { + return true; + } - // 37. Let inputOrInitBody be initBody if it is non-null; otherwise - // inputBody. - const inputOrInitBody = initBody ?? inputBody + state.kind = _kind; + state.result = _result; + return false; +} - // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is - // null, then: - if (inputOrInitBody != null && inputOrInitBody.source == null) { - // 1. If initBody is non-null and init["duplex"] does not exist, - // then throw a TypeError. - if (initBody != null && init.duplex == null) { - throw new TypeError('RequestInit: duplex option is required when sending a body.') - } +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; - // 2. If this’s request’s mode is neither "same-origin" nor "cors", - // then throw a TypeError. - if (request.mode !== 'same-origin' && request.mode !== 'cors') { - throw new TypeError( - 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' - ) - } + ch = state.input.charCodeAt(state.position); - // 3. Set this’s request’s use-CORS-preflight flag. - request.useCORSPreflightFlag = true - } + if (ch !== 0x27/* ' */) { + return false; + } - // 39. Let finalBody be inputOrInitBody. - let finalBody = inputOrInitBody + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; - // 40. If initBody is null and inputBody is non-null, then: - if (initBody == null && inputBody != null) { - // 1. If input is unusable, then throw a TypeError. - if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) - } + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); - // 2. Set finalBody to the result of creating a proxy for inputBody. - if (!TransformStream) { - TransformStream = (__nccwpck_require__(35356).TransformStream) + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; } - // https://streams.spec.whatwg.org/#readablestream-create-a-proxy - const identityTransform = new TransformStream() - inputBody.stream.pipeThrough(identityTransform) - finalBody = { - source: inputBody.source, - length: inputBody.length, - stream: identityTransform.readable - } - } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } } - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} - // The method getter steps are to return this’s request’s method. - return this[kState].method - } +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) + ch = state.input.charCodeAt(state.position); - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) + if (ch !== 0x22/* " */) { + return false; } - // Returns a Headers object consisting of the headers associated with request. - // Note that headers added in the network layer by the user agent will not - // be accounted for in this object, e.g., the "Host" header. - get headers () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); - // Returns the referrer of request. Its value can be a same-origin URL if - // explicitly set in init, the empty string to indicate no referrer, and - // "about:client" when defaulting to the global’s default. This is used - // during fetching to determine the value of the `Referer` header of the - // request being made. - get referrer () { - webidl.brandCheck(this, Request) + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } + } else { + throwError(state, 'expected hexadecimal character'); + } + } - // Returns the mode associated with request, which is a string indicating - // whether the request will use CORS, or will be restricted to same-origin - // URLs. - get mode () { - webidl.brandCheck(this, Request) + state.result += charFromCodepoint(hexResult); - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } + state.position++; - // Returns the credentials mode associated with request, - // which is a string indicating whether credentials will be sent with the - // request always, never, or only when sent to a same-origin URL. - get credentials () { - // The credentials getter steps are to return this’s request’s credentials mode. - return this[kState].credentials - } + } else { + throwError(state, 'unknown escape sequence'); + } - // Returns the cache mode associated with request, - // which is a string indicating how the request will - // interact with the browser’s cache when fetching. - get cache () { - webidl.brandCheck(this, Request) + captureStart = captureEnd = state.position; - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; - // Returns the redirect mode associated with request, - // which is a string indicating how redirects for the - // request will be handled during fetching. A request - // will follow redirects by default. - get redirect () { - webidl.brandCheck(this, Request) + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect + } else { + state.position++; + captureEnd = state.position; + } } - // Returns request’s subresource integrity metadata, which is a - // cryptographic hash of the resource being fetched. Its value - // consists of multiple hashes separated by whitespace. [SRI] - get integrity () { - webidl.brandCheck(this, Request) + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) + ch = state.input.charCodeAt(state.position); - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; } - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; } - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-foward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } + ch = state.input.charCodeAt(++state.position); - // Returns the signal associated with request, which is an AbortSignal - // object indicating whether or not request has been aborted, and its - // abort event handler. - get signal () { - webidl.brandCheck(this, Request) + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); - // The signal getter steps are to return this’s signal. - return this[kSignal] - } + ch = state.input.charCodeAt(state.position); - get body () { - webidl.brandCheck(this, Request) + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } - return this[kState].body ? this[kState].body.stream : null - } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; - get bodyUsed () { - webidl.brandCheck(this, Request) + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } - get duplex () { - webidl.brandCheck(this, Request) + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); - return 'half' - } + ch = state.input.charCodeAt(state.position); - // Returns a clone of request. - clone () { - webidl.brandCheck(this, Request) + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } - // 1. If this is unusable, then throw a TypeError. - if (this.bodyUsed || this.body?.locked) { - throw new TypeError('unusable') + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); } - // 2. Let clonedRequest be the result of cloning this’s request. - const clonedRequest = cloneRequest(this[kState]) + skipSeparationSpace(state, true, nodeIndent); - // 3. Let clonedRequestObject be the result of creating a Request object, - // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - const clonedRequestObject = new Request(kConstruct) - clonedRequestObject[kState] = clonedRequest - clonedRequestObject[kRealm] = this[kRealm] - clonedRequestObject[kHeaders] = new Headers(kConstruct) - clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList - clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] - clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] + ch = state.input.charCodeAt(state.position); - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); } else { - util.addAbortListener( - this.signal, - () => { - ac.abort(this.signal.reason) - } - ) + readNext = false; } - clonedRequestObject[kSignal] = ac.signal - - // 4. Return clonedRequestObject. - return clonedRequestObject } + + throwError(state, 'unexpected end of the stream within a flow collection'); } -mixinBody(Request) +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; -function makeRequest (init) { - // https://fetch.spec.whatwg.org/#requests - const request = { - method: 'GET', - localURLsOnly: false, - unsafeRequest: false, - body: null, - client: null, - reservedClient: null, - replacesClientId: '', - window: 'client', - keepalive: false, - serviceWorkers: 'all', - initiator: '', - destination: '', - priority: null, - origin: 'client', - policyContainer: 'client', - referrer: 'client', - referrerPolicy: '', - mode: 'no-cors', - useCORSPreflightFlag: false, - credentials: 'same-origin', - useCredentials: false, - cache: 'default', - redirect: 'follow', - integrity: '', - cryptoGraphicsNonceMetadata: '', - parserMetadata: '', - reloadNavigation: false, - historyNavigation: false, - userActivation: false, - taintedOrigin: false, - redirectCount: 0, - responseTainting: 'basic', - preventNoCacheCacheControlHeaderModification: false, - done: false, - timingAllowFailed: false, - ...init, - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList() + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; } - request.url = request.urlList[0] - return request -} -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: + state.kind = 'scalar'; + state.result = ''; - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = makeRequest({ ...request, body: null }) + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); - // 2. If request’s body is non-null, set newRequest’s body to the - // result of cloning request’s body. - if (request.body != null) { - newRequest.body = cloneBody(request.body) - } + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } - // 3. Return newRequest. - return newRequest -} + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true + } else { + break; + } } -}) -webidl.converters.Request = webidl.interfaceConverter( - Request -) + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } } - if (V instanceof Request) { - return webidl.converters.Request(V) - } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; - return webidl.converters.USVString(V) -} + ch = state.input.charCodeAt(state.position); -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - } -]) + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } -module.exports = { Request, makeRequest } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + // End of the scalar. + if (state.lineIndent < textIndent) { -/***/ }), + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } -/***/ 27823: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Break this `while` cycle and go to the funciton's epilogue. + break; + } -"use strict"; + // Folded style: use fancy rules to handle line breaks. + if (folding) { + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); -const { Headers, HeadersList, fill } = __nccwpck_require__(10554) -const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(41472) -const util = __nccwpck_require__(83983) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode -} = __nccwpck_require__(52538) -const { - redirectStatusSet, - nullBodyStatus, - DOMException -} = __nccwpck_require__(41037) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(15861) -const { webidl } = __nccwpck_require__(21744) -const { FormData } = __nccwpck_require__(72015) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { URLSerializer } = __nccwpck_require__(685) -const { kHeadersList, kConstruct } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { types } = __nccwpck_require__(73837) + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); -const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(35356).ReadableStream) -const textEncoder = new TextEncoder('utf-8') + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } -// https://fetch.spec.whatwg.org/#response-class -class Response { - // Creates network error Response. - static error () { - // TODO - const relevantRealm = { settingsObject: {} } + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } - // The static error() method steps are to return the result of creating a - // Response object, given a new network error, "immutable", and this’s - // relevant Realm. - const responseObject = new Response() - responseObject[kState] = makeNetworkError() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm - return responseObject - } + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; - if (init !== null) { - init = webidl.converters.ResponseInit(init) + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); } - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = extractBody(bytes) + captureSegment(state, captureStart, state.position, false); + } - // 3. Let responseObject be the result of creating a Response object, given a new response, - // "response", and this’s relevant Realm. - const relevantRealm = { settingsObject: {} } - const responseObject = new Response() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kGuard] = 'response' - responseObject[kHeaders][kRealm] = relevantRealm + return true; +} - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; - // 5. Return responseObject. - return responseObject + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; } - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - const relevantRealm = { settingsObject: {} } + ch = state.input.charCodeAt(state.position); - webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) + while (ch !== 0) { - url = webidl.converters.USVString(url) - status = webidl.converters['unsigned short'](status) + if (ch !== 0x2D/* - */) { + break; + } - // 1. Let parsedURL be the result of parsing url with current settings - // object’s API base URL. - // 2. If parsedURL is failure, then throw a TypeError. - // TODO: base-URL? - let parsedURL - try { - parsedURL = new URL(url, getGlobalOrigin()) - } catch (err) { - throw Object.assign(new TypeError('Failed to parse URL from ' + url), { - cause: err - }) + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; } - // 3. If status is not a redirect status, then throw a RangeError. - if (!redirectStatusSet.has(status)) { - throw new RangeError('Invalid status code ' + status) + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } } - // 4. Let responseObject be the result of creating a Response object, - // given a new response, "immutable", and this’s relevant Realm. - const responseObject = new Response() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status + ch = state.input.charCodeAt(state.position); - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value) + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} - // 8. Return responseObject. - return responseObject +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; } - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - if (body !== null) { - body = webidl.converters.BodyInit(body) - } + ch = state.input.charCodeAt(state.position); - init = webidl.converters.ResponseInit(init) + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; - // TODO - this[kRealm] = { settingsObject: {} } + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - // 1. Set this’s response to a new response. - this[kState] = makeResponse({}) + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } - // 2. Set this’s headers to a new Headers object with this’s relevant - // Realm, whose header list is this’s response’s header list and guard - // is "response". - this[kHeaders] = new Headers(kConstruct) - this[kHeaders][kGuard] = 'response' - this[kHeaders][kHeadersList] = this[kState].headersList - this[kHeaders][kRealm] = this[kRealm] + detected = true; + atExplicitKey = true; + allowCompact = true; - // 3. Let bodyWithType be null. - let bodyWithType = null + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; - // 4. If body is non-null, then set bodyWithType to the result of extracting body. - if (body != null) { - const [extractedBody, type] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } + state.position += 1; + ch = following; - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // The type getter steps are to return this’s response’s type. - return this[kState].type - } + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } - const urlList = this[kState].urlList + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); - // The url getter steps are to return the empty string if this’s - // response’s URL is null; otherwise this’s response’s URL, - // serialized with exclude fragment set to true. - const url = urlList[urlList.length - 1] ?? null + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } - if (url === null) { - return '' + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. } - return URLSerializer(url, true) - } + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, Response) + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } - // The redirected getter steps are to return true if this’s response’s URL - // list has more than one item; otherwise false. - return this[kState].urlList.length > 1 + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } } - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) + // + // Epilogue. + // - // The status getter steps are to return this’s response’s status. - return this[kState].status + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); } - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; } - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) + return detected; +} - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) + ch = state.input.charCodeAt(state.position); - // The headers getter steps are to return this’s headers. - return this[kHeaders] + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); } - get body () { - webidl.brandCheck(this, Response) + ch = state.input.charCodeAt(++state.position); - return this[kState].body ? this[kState].body.stream : null - } + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); - get bodyUsed () { - webidl.brandCheck(this, Response) + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) + } else { + tagHandle = '!'; } - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) + _position = state.position; - // 1. If this is unusable, then throw a TypeError. - if (this.bodyUsed || (this.body && this.body.locked)) { - throw webidl.errors.exception({ - header: 'Response.clone', - message: 'Body has already been consumed.' - }) + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { - // 2. Let clonedResponse be the result of cloning this’s response. - const clonedResponse = cloneResponse(this[kState]) + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); - // 3. Return the result of creating a Response object, given - // clonedResponse, this’s headers’s guard, and this’s relevant Realm. - const clonedResponseObject = new Response() - clonedResponseObject[kState] = clonedResponse - clonedResponseObject[kRealm] = this[kRealm] - clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList - clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard] - clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm] + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } - return clonedResponseObject - } -} + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } -mixinBody(Response) + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); } -}) -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) + if (isVerbatim) { + state.tag = tagName; -// https://fetch.spec.whatwg.org/#concept-response-clone -function cloneResponse (response) { - // To clone a response response, run these steps: + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; - // 1. If response is a filtered response, then return a new identical - // filtered response whose internal response is a clone of response’s - // internal response. - if (response.internalResponse) { - return filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } + } else if (tagHandle === '!') { + state.tag = '!' + tagName; - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = makeResponse({ ...response, body: null }) + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; - // 3. If response’s body is non-null, then set newResponse’s body to the - // result of cloning response’s body. - if (response.body != null) { - newResponse.body = cloneBody(response.body) + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); } - // 4. Return newResponse. - return newResponse + return true; } -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList(), - urlList: init.urlList ? [...init.urlList] : [] +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); } -} -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} + ch = state.input.charCodeAt(++state.position); + _position = state.position; -function makeFilteredResponse (response, state) { - state = { - internalResponse: response, - ...state + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); } - return new Proxy(response, { - get (target, p) { - return p in state ? state[p] : target[p] - }, - set (target, p, value) { - assert(!(p in state)) - target[p] = value - return true - } - }) + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; } -// https://fetch.spec.whatwg.org/#concept-filtered-response -function filterResponse (response, type) { - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (type === 'basic') { - // A basic filtered response is a filtered response whose type is "basic" - // and header list excludes any headers in internal response’s header list - // whose name is a forbidden response-header name. +function readAlias(state) { + var _position, alias, + ch; - // Note: undici does not implement forbidden response-header names - return makeFilteredResponse(response, { - type: 'basic', - headersList: response.headersList - }) - } else if (type === 'cors') { - // A CORS filtered response is a filtered response whose type is "cors" - // and header list excludes any headers in internal response’s header - // list whose name is not a CORS-safelisted response-header name, given - // internal response’s CORS-exposed header-name list. + ch = state.input.charCodeAt(state.position); - // Note: undici does not implement CORS-safelisted response-header names - return makeFilteredResponse(response, { - type: 'cors', - headersList: response.headersList - }) - } else if (type === 'opaque') { - // An opaque filtered response is a filtered response whose type is - // "opaque", URL list is the empty list, status is 0, status message - // is the empty byte sequence, header list is empty, and body is null. + if (ch !== 0x2A/* * */) return false; - return makeFilteredResponse(response, { - type: 'opaque', - urlList: Object.freeze([]), - status: 0, - statusText: '', - body: null - }) - } else if (type === 'opaqueredirect') { - // An opaque-redirect filtered response is a filtered response whose type - // is "opaqueredirect", status is 0, status message is the empty byte - // sequence, header list is empty, and body is null. + ch = state.input.charCodeAt(++state.position); + _position = state.position; - return makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); } -} -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; } -// https://whatpr.org/fetch/1392.html#initialize-a-response -function initializeResponse (response, init, body) { - // 1. If init["status"] is not in the range 200 to 599, inclusive, then - // throw a RangeError. - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.') +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } } } - // 3. Set response’s response’s status to init["status"]. - if ('status' in init && init.status != null) { - response[kState].status = init.status - } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } } - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[kHeaders], init.headers) + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; } - // 6. If body was given, then: - if (body) { - // 1. If response's status is a null body status, then throw a TypeError. - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: 'Invalid response status code ' + response.status - }) + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; } - // 2. Set response's body to body's body. - response[kState].body = body.body + blockIndent = state.position - state.lineStart; - // 3. If body's type is non-null and response's header list does not contain - // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. - if (body.type != null && !response[kState].headersList.contains('Content-Type')) { - response[kState].headersList.append('content-type', body.type) - } - } -} + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) + } else if (readAlias(state)) { + hasContent = true; -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) - } + if (state.tag === null) { + state.tag = '?'; + } + } - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } } - if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { - return webidl.converters.BufferSource(V) - } + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, { strict: false }) - } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V) - } + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; - return webidl.converters.DOMString(V) -} + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V) + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } } - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V + if (state.listener !== null) { + state.listener('close', state); } - - return webidl.converters.XMLHttpRequestBodyInit(V) + return state.tag !== null || state.anchor !== null || hasContent; } -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; -module.exports = { - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse -} + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); -/***/ }), + ch = state.input.charCodeAt(state.position); -/***/ 15861: -/***/ ((module) => { + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } -"use strict"; + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kGuard: Symbol('guard'), - kRealm: Symbol('realm') -} + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } -/***/ }), + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } -/***/ 52538: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } -"use strict"; + if (is_EOL(ch)) break; + _position = state.position; -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(41037) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { performance } = __nccwpck_require__(4074) -const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(83983) -const assert = __nccwpck_require__(39491) -const { isUint8Array } = __nccwpck_require__(29830) + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')|undefined} */ -let crypto + directiveArgs.push(state.input.slice(_position, state.position)); + } -try { - crypto = __nccwpck_require__(6113) -} catch { + if (ch !== 0) readLineBreak(state); -} + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } -function responseURL (response) { - // https://fetch.spec.whatwg.org/#responses - // A response has an associated URL. It is a pointer to the last URL - // in response’s URL list and null if response’s URL list is empty. - const urlList = response.urlList - const length = urlList.length - return length === 0 ? null : urlList[length - 1].toString() -} + skipSeparationSpace(state, true, -1); -// https://fetch.spec.whatwg.org/#concept-response-location-url -function responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!redirectStatusSet.has(response.status)) { - return null + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); } - // 2. Let location be the result of extracting header list values given - // `Location` and response’s header list. - let location = response.headersList.get('location') + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); - // 3. If location is a header value, then set location to the result of - // parsing location with response’s URL. - if (location !== null && isValidHeaderValue(location)) { - location = new URL(location, responseURL(response)) + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); } - // 4. If location is a URL whose fragment is null, then set location’s - // fragment to requestFragment. - if (location && !location.hash) { - location.hash = requestFragment - } + state.documents.push(state.result); - // 5. Return location. - return location -} + if (state.position === state.lineStart && testDocumentSeparator(state)) { -/** @returns {URL} */ -function requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } } -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } +function loadDocuments(input, options) { + input = String(input); + options = options || {}; - // 3. Return allowed. - return 'allowed' -} + if (input.length !== 0) { -function isErrorLike (object) { - return object instanceof Error || ( - object?.constructor?.name === 'Error' || - object?.constructor?.name === 'DOMException' - ) -} + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } -// Check whether |statusText| is a ByteString and -// matches the Reason-Phrase token production. -// RFC 2616: https://tools.ietf.org/html/rfc2616 -// RFC 7230: https://tools.ietf.org/html/rfc7230 -// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" -// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 -function isValidReasonPhrase (statusText) { - for (let i = 0; i < statusText.length; ++i) { - const c = statusText.charCodeAt(i) - if ( - !( - ( - c === 0x09 || // HTAB - (c >= 0x20 && c <= 0x7e) || // SP / VCHAR - (c >= 0x80 && c <= 0xff) - ) // obs-text - ) - ) { - return false + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); } } - return true -} -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function isTokenCharCode (c) { - switch (c) { - case 0x22: - case 0x28: - case 0x29: - case 0x2c: - case 0x2f: - case 0x3a: - case 0x3b: - case 0x3c: - case 0x3d: - case 0x3e: - case 0x3f: - case 0x40: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x7b: - case 0x7d: - // DQUOTE and "(),/:;<=>?@[\]{}" - return false - default: - // VCHAR %x21-7E - return c >= 0x21 && c <= 0x7e - } -} + var state = new State(input, options); -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); } - return true -} -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -function isValidHeaderName (potentialValue) { - return isValidHTTPToken(potentialValue) -} + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - if ( - potentialValue.startsWith('\t') || - potentialValue.startsWith(' ') || - potentialValue.endsWith('\t') || - potentialValue.endsWith(' ') - ) { - return false + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; } - if ( - potentialValue.includes('\0') || - potentialValue.includes('\r') || - potentialValue.includes('\n') - ) { - return false + while (state.position < (state.length - 1)) { + readDocument(state); } - return true + return state.documents; } -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function setRequestReferrerPolicyOnRedirect (request, actualResponse) { - // Given a request request and a response actualResponse, this algorithm - // updates request’s referrer policy according to the Referrer-Policy - // header (if any) in actualResponse. - // 1. Let policy be the result of executing § 8.1 Parse a referrer policy - // from a Referrer-Policy header on actualResponse. +function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } - // 8.1 Parse a referrer policy from a Referrer-Policy header - // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. - const { headersList } = actualResponse - // 2. Let policy be the empty string. - // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. - // 4. Return policy. - const policyHeader = (headersList.get('referrer-policy') ?? '').split(',') + var documents = loadDocuments(input, options); - // Note: As the referrer-policy can contain multiple policies - // separated by comma, we need to loop through all of them - // and pick the first valid one. - // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy - let policy = '' - if (policyHeader.length > 0) { - // The right-most policy takes precedence. - // The left-most policy is the fallback. - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim() - if (referrerPolicyTokens.has(token)) { - policy = token - break - } - } + if (typeof iterator !== 'function') { + return documents; } - // 2. If policy is not the empty string, then set request’s referrer policy to policy. - if (policy !== '') { - request.referrerPolicy = policy + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); } } -// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check -function crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); } -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' + +function safeLoadAll(input, iterator, options) { + if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); } -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' + +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); } -function appendFetchMetadata (httpRequest) { - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header - // TODO - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; - // 1. Assert: r’s url is a potentially trustworthy URL. - // TODO - // 2. Let header be a Structured Header whose value is a token. - let header = null +/***/ }), - // 3. Set header’s value to r’s mode. - header = httpRequest.mode +/***/ 77262: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. - httpRequest.headersList.set('sec-fetch-mode', header) +"use strict"; - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header - // TODO - // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header - // TODO + +var common = __nccwpck_require__(59941); + + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; } -// https://fetch.spec.whatwg.org/#append-a-request-origin-header -function appendRequestOriginHeader (request) { - // 1. Let serializedOrigin be the result of byte-serializing a request origin with request. - let serializedOrigin = request.origin - // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. - if (request.responseTainting === 'cors' || request.mode === 'websocket') { - if (serializedOrigin) { - request.headersList.append('origin', serializedOrigin) - } +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - } else if (request.method !== 'GET' && request.method !== 'HEAD') { - // 1. Switch on request’s referrer policy: - switch (request.referrerPolicy) { - case 'no-referrer': - // Set serializedOrigin to `null`. - serializedOrigin = null - break - case 'no-referrer-when-downgrade': - case 'strict-origin': - case 'strict-origin-when-cross-origin': - // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null - } - break - case 'same-origin': - // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`. - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null - } - break - default: - // Do nothing. - } + if (!this.buffer) return null; - if (serializedOrigin) { - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin) + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; } } -} -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - // TODO - return performance.now() -} + tail = ''; + end = this.position; -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function createOpaqueTimingInfo (timingInfo) { - return { - startTime: timingInfo.startTime ?? 0, - redirectStartTime: 0, - redirectEndTime: 0, - postRedirectStartTime: timingInfo.startTime ?? 0, - finalServiceWorkerStartTime: 0, - finalNetworkResponseStartTime: 0, - finalNetworkRequestStartTime: 0, - endTime: 0, - encodedBodySize: 0, - decodedBodySize: 0, - finalConnectionTimingInfo: null + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } } -} -// https://html.spec.whatwg.org/multipage/origin.html#policy-container -function makePolicyContainer () { - // Note: the fetch spec doesn't make use of embedder policy or CSP list - return { - referrerPolicy: 'strict-origin-when-cross-origin' + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; } -} -// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container -function clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } } -} -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function determineRequestsReferrer (request) { - // 1. Let policy be request's referrer policy. - const policy = request.referrerPolicy + return where; +}; - // Note: policy cannot (shouldn't) be null or an empty string. - assert(policy) - // 2. Let environment be request’s client. +module.exports = Mark; - let referrerSource = null - // 3. Switch on request’s referrer: - if (request.referrer === 'client') { - // Note: node isn't a browser and doesn't implement document/iframes, - // so we bypass this step and replace it with our own. +/***/ }), - const globalOrigin = getGlobalOrigin() +/***/ 66280: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - if (!globalOrigin || globalOrigin.origin === 'null') { - return 'no-referrer' - } +"use strict"; - // note: we need to clone it as it's mutated - referrerSource = new URL(globalOrigin) - } else if (request.referrer instanceof URL) { - // Let referrerSource be request’s referrer. - referrerSource = request.referrer - } - // 4. Let request’s referrerURL be the result of stripping referrerSource for - // use as a referrer. - let referrerURL = stripURLForReferrer(referrerSource) +/*eslint-disable max-len*/ - // 5. Let referrerOrigin be the result of stripping referrerSource for use as - // a referrer, with the origin-only flag set to true. - const referrerOrigin = stripURLForReferrer(referrerSource, true) +var common = __nccwpck_require__(59941); +var YAMLException = __nccwpck_require__(29291); +var Type = __nccwpck_require__(90256); - // 6. If the result of serializing referrerURL is a string whose length is - // greater than 4096, set referrerURL to referrerOrigin. - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin - } - const areSameOrigin = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) +function compileList(schema, name, result) { + var exclude = []; - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true) - case 'unsafe-url': return referrerURL - case 'same-origin': - return areSameOrigin ? referrerOrigin : 'no-referrer' - case 'origin-when-cross-origin': - return areSameOrigin ? referrerURL : referrerOrigin - case 'strict-origin-when-cross-origin': { - const currentURL = requestCurrentURL(request) + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); } + }); - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' - } + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} - // 3. Return referrerOrigin. - return referrerOrigin + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); } - case 'strict-origin': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ - case 'no-referrer-when-downgrade': // eslint-disable-line - /** - * 1. If referrerURL is a potentially trustworthy URL and - * request’s current URL is not a potentially trustworthy URL, - * then return no referrer. - * 2. Return referrerOrigin - */ + }); - default: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); } -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - assert(url instanceof URL) - // 2. If url’s scheme is a local scheme, then return no referrer. - if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { - return 'no-referrer' - } +Schema.DEFAULT = null; - // 3. Set url’s username to the empty string. - url.username = '' - // 4. Set url’s password to the empty string. - url.password = '' +Schema.create = function createSchema() { + var schemas, types; - // 5. Set url’s fragment to null. - url.hash = '' + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; - // 6. If the origin-only flag is true, then: - if (originOnly) { - // 1. Set url’s path to « the empty string ». - url.pathname = '' + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; - // 2. Set url’s query to null. - url.search = '' + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); } - // 7. Return url. - return url -} + schemas = common.toArray(schemas); + types = common.toArray(types); -function isURLPotentiallyTrustworthy (url) { - if (!(url instanceof URL)) { - return false + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); } - // If child of about, return true - if (url.href === 'about:blank' || url.href === 'about:srcdoc') { - return true + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); } - // If scheme is data, return true - if (url.protocol === 'data:') return true + return new Schema({ + include: schemas, + explicit: types + }); +}; - // If file, return true - if (url.protocol === 'file:') return true - return isOriginPotentiallyTrustworthy(url.origin) +module.exports = Schema; - function isOriginPotentiallyTrustworthy (origin) { - // If origin is explicitly null, return false - if (origin == null || origin === 'null') return false - const originAsURL = new URL(origin) +/***/ }), - // If secure, return true - if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { - return true - } +/***/ 11950: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // If localhost or variants, return true - if (/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(originAsURL.hostname) || - (originAsURL.hostname === 'localhost' || originAsURL.hostname.includes('localhost.')) || - (originAsURL.hostname.endsWith('.localhost'))) { - return true - } +"use strict"; +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. - // If any other, return false - return false - } -} -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function bytesMatch (bytes, metadataList) { - // If node is not built with OpenSSL support, we cannot check - // a request's integrity, so allow it by default (the spec will - // allow requests if an invalid hash is given, as precedence). - /* istanbul ignore if: only if node is built with --without-ssl */ - if (crypto === undefined) { - return true - } - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = parseMetadata(metadataList) - // 2. If parsedMetadata is no metadata, return true. - if (parsedMetadata === 'no metadata') { - return true - } - // 3. If parsedMetadata is the empty set, return true. - if (parsedMetadata.length === 0) { - return true - } +var Schema = __nccwpck_require__(66280); - // 4. Let metadata be the result of getting the strongest - // metadata from parsedMetadata. - const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo)) - // get the strongest algorithm - const strongest = list[0].algo - // get all entries that use the strongest algorithm; ignore weaker - const metadata = list.filter((item) => item.algo === strongest) - // 5. For each item in metadata: - for (const item of metadata) { - // 1. Let algorithm be the alg component of item. - const algorithm = item.algo +module.exports = new Schema({ + include: [ + __nccwpck_require__(2168) + ] +}); - // 2. Let expectedValue be the val component of item. - let expectedValue = item.hash - // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e - // "be liberal with padding". This is annoying, and it's not even in the spec. +/***/ }), - if (expectedValue.endsWith('==')) { - expectedValue = expectedValue.slice(0, -2) - } +/***/ 145: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 3. Let actualValue be the result of applying algorithm to bytes. - let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') +"use strict"; +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. - if (actualValue.endsWith('==')) { - actualValue = actualValue.slice(0, -2) - } - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (actualValue === expectedValue) { - return true - } - let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url') - if (actualBase64URL.endsWith('==')) { - actualBase64URL = actualBase64URL.slice(0, -2) - } - if (actualBase64URL === expectedValue) { - return true - } - } +var Schema = __nccwpck_require__(66280); - // 6. Return false. - return false -} -// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options -// https://www.w3.org/TR/CSP2/#source-list-syntax -// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 -const parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i +module.exports = Schema.DEFAULT = new Schema({ + include: [ + __nccwpck_require__(42881) + ], + explicit: [ + __nccwpck_require__(34801), + __nccwpck_require__(77234), + __nccwpck_require__(35361) + ] +}); -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata - * @param {string} metadata - */ -function parseMetadata (metadata) { - // 1. Let result be the empty set. - /** @type {{ algo: string, hash: string }[]} */ - const result = [] - // 2. Let empty be equal to true. - let empty = true +/***/ }), - const supportedHashes = crypto.getHashes() +/***/ 42881: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 3. For each token returned by splitting metadata on spaces: - for (const token of metadata.split(' ')) { - // 1. Set empty to false. - empty = false +"use strict"; +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) - // 2. Parse token as a hash-with-options. - const parsedToken = parseHashWithOptions.exec(token) - // 3. If token does not parse, continue to the next token. - if (parsedToken === null || parsedToken.groups === undefined) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - continue - } - // 4. Let algorithm be the hash-algo component of token. - const algorithm = parsedToken.groups.algo - // 5. If algorithm is a hash function recognized by the user - // agent, add the parsed token to result. - if (supportedHashes.includes(algorithm.toLowerCase())) { - result.push(parsedToken.groups) - } - } - // 4. Return no metadata if empty is true, otherwise return result. - if (empty === true) { - return 'no metadata' - } +var Schema = __nccwpck_require__(66280); - return result -} -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} +module.exports = new Schema({ + include: [ + __nccwpck_require__(11950) + ], + implicit: [ + __nccwpck_require__(82018), + __nccwpck_require__(60194) + ], + explicit: [ + __nccwpck_require__(21716), + __nccwpck_require__(96439), + __nccwpck_require__(33730), + __nccwpck_require__(9047) + ] +}); -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function sameOrigin (A, B) { - // 1. If A and B are the same opaque origin, then return true. - if (A.origin === B.origin && A.origin === 'null') { - return true - } - // 2. If A and B are both tuple origins and their schemes, - // hosts, and port are identical, then return true. - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true - } +/***/ }), - // 3. Return false. - return false -} +/***/ 70026: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -function createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) +"use strict"; +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 - return { promise, resolve: res, reject: rej } -} -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} -const normalizeMethodRecord = { - delete: 'DELETE', - DELETE: 'DELETE', - get: 'GET', - GET: 'GET', - head: 'HEAD', - HEAD: 'HEAD', - options: 'OPTIONS', - OPTIONS: 'OPTIONS', - post: 'POST', - POST: 'POST', - put: 'PUT', - PUT: 'PUT' -} -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(normalizeMethodRecord, null) +var Schema = __nccwpck_require__(66280); -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizeMethodRecord[method.toLowerCase()] ?? method -} -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function serializeJavascriptValueToJSONString (value) { - // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). - const result = JSON.stringify(value) +module.exports = new Schema({ + explicit: [ + __nccwpck_require__(24649), + __nccwpck_require__(65629), + __nccwpck_require__(15938) + ] +}); - // 2. If result is undefined, then throw a TypeError. - if (result === undefined) { - throw new TypeError('Value is not JSON serializable') - } - // 3. Assert: result is a string. - assert(typeof result === 'string') +/***/ }), - // 4. Return result. - return result -} +/***/ 2168: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())) +"use strict"; +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. -/** - * @see https://webidl.spec.whatwg.org/#dfn-iterator-prototype-object - * @param {() => unknown[]} iterator - * @param {string} name name of the instance - * @param {'key'|'value'|'key+value'} kind - */ -function makeIterator (iterator, name, kind) { - const object = { - index: 0, - kind, - target: iterator - } - const i = { - next () { - // 1. Let interface be the interface for which the iterator prototype object exists. - // 2. Let thisValue be the this value. - // 3. Let object be ? ToObject(thisValue). - // 4. If object is a platform object, then perform a security - // check, passing: +var Schema = __nccwpck_require__(66280); - // 5. If object is not a default iterator object for interface, - // then throw a TypeError. - if (Object.getPrototypeOf(this) !== i) { - throw new TypeError( - `'next' called on an object that does not implement interface ${name} Iterator.` - ) - } - // 6. Let index be object’s index. - // 7. Let kind be object’s kind. - // 8. Let values be object’s target's value pairs to iterate over. - const { index, kind, target } = object - const values = target() +module.exports = new Schema({ + include: [ + __nccwpck_require__(70026) + ], + implicit: [ + __nccwpck_require__(26058), + __nccwpck_require__(93195), + __nccwpck_require__(76865), + __nccwpck_require__(16480) + ] +}); - // 9. Let len be the length of values. - const len = values.length - // 10. If index is greater than or equal to len, then return - // CreateIterResultObject(undefined, true). - if (index >= len) { - return { value: undefined, done: true } - } +/***/ }), - // 11. Let pair be the entry in values at index index. - const pair = values[index] +/***/ 90256: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 12. Set object’s index to index + 1. - object.index = index + 1 +"use strict"; - // 13. Return the iterator result for pair and kind. - return iteratorResult(pair, kind) - }, - // The class string of an iterator prototype object for a given interface is the - // result of concatenating the identifier of the interface and the string " Iterator". - [Symbol.toStringTag]: `${name} Iterator` + +var YAMLException = __nccwpck_require__(29291); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); } - // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%. - Object.setPrototypeOf(i, esIteratorPrototype) - // esIteratorPrototype needs to be the prototype of i - // which is the prototype of an empty object. Yes, it's confusing. - return Object.setPrototypeOf({}, i) + return result; } -// https://webidl.spec.whatwg.org/#iterator-result -function iteratorResult (pair, kind) { - let result +function Type(tag, options) { + options = options || {}; - // 1. Let result be a value determined by the value of kind: - switch (kind) { - case 'key': { - // 1. Let idlKey be pair’s key. - // 2. Let key be the result of converting idlKey to an - // ECMAScript value. - // 3. result is key. - result = pair[0] - break - } - case 'value': { - // 1. Let idlValue be pair’s value. - // 2. Let value be the result of converting idlValue to - // an ECMAScript value. - // 3. result is value. - result = pair[1] - break - } - case 'key+value': { - // 1. Let idlKey be pair’s key. - // 2. Let idlValue be pair’s value. - // 3. Let key be the result of converting idlKey to an - // ECMAScript value. - // 4. Let value be the result of converting idlValue to - // an ECMAScript value. - // 5. Let array be ! ArrayCreate(2). - // 6. Call ! CreateDataProperty(array, "0", key). - // 7. Call ! CreateDataProperty(array, "1", value). - // 8. result is array. - result = pair - break + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); } - } + }); - // 2. Return CreateIterResultObject(result, false). - return { value: result, done: false } + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } } -/** - * @see https://fetch.spec.whatwg.org/#body-fully-read - */ -async function fullyReadBody (body, processBody, processBodyError) { - // 1. If taskDestination is null, then set taskDestination to - // the result of starting a new parallel queue. +module.exports = Type; - // 2. Let successSteps given a byte sequence bytes be to queue a - // fetch task to run processBody given bytes, with taskDestination. - const successSteps = processBody - // 3. Let errorSteps be to queue a fetch task to run processBodyError, - // with taskDestination. - const errorSteps = processBodyError +/***/ }), - // 4. Let reader be the result of getting a reader for body’s stream. - // If that threw an exception, then run errorSteps with that - // exception and return. - let reader +/***/ 21716: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - try { - reader = body.stream.getReader() - } catch (e) { - errorSteps(e) - return - } +"use strict"; - // 5. Read all bytes from reader, given successSteps and errorSteps. - try { - const result = await readAllBytes(reader) - successSteps(result) - } catch (e) { - errorSteps(e) - } -} -/** @type {ReadableStream} */ -let ReadableStream = globalThis.ReadableStream +/*eslint-disable no-bitwise*/ -function isReadableStreamLike (stream) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(35356).ReadableStream) - } +var NodeBuffer; - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = require; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} -const MAXIMUM_ARGUMENT_LENGTH = 65535 +var Type = __nccwpck_require__(90256); -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {number[]|Uint8Array} input - */ -function isomorphicDecode (input) { - // 1. To isomorphic decode a byte sequence input, return a string whose code point - // length is equal to input’s length and whose code points have the same values - // as the values of input’s bytes, in the same order. - if (input.length < MAXIMUM_ARGUMENT_LENGTH) { - return String.fromCharCode(...input) +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; } - return input.reduce((previous, current) => previous + String.fromCharCode(current), '') + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; } -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - } catch (err) { - // TODO: add comment explaining why this error occurs. - if (!err.message.includes('Controller is already closed')) { - throw err +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); } -} -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ -function isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - for (let i = 0; i < input.length; i++) { - assert(input.charCodeAt(i) <= 0xFF) + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); } - // 2. Return a byte sequence whose length is equal to input’s code - // point length and whose bytes have the same values as the - // values of input’s code points, in the same order - return input + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; } -/** - * @see https://streams.spec.whatwg.org/#readablestreamdefaultreader-read-all-bytes - * @see https://streams.spec.whatwg.org/#read-loop - * @param {ReadableStreamDefaultReader} reader - */ -async function readAllBytes (reader) { - const bytes = [] - let byteLength = 0 +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; - while (true) { - const { done, value: chunk } = await reader.read() + // Convert every three bytes to 4 ASCII characters. - if (done) { - // 1. Call successSteps with bytes. - return Buffer.concat(bytes, byteLength) + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; } - // 1. If chunk is not a Uint8Array object, call failureSteps - // with a TypeError and abort these steps. - if (!isUint8Array(chunk)) { - throw new TypeError('Received non-Uint8Array chunk') - } + bits = (bits << 8) + object[idx]; + } - // 2. Append the bytes represented by chunk to bytes. - bytes.push(chunk) - byteLength += chunk.length + // Dump tail - // 3. Read-loop given reader, bytes, successSteps, and failureSteps. + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; } + + return result; } -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - assert('protocol' in url) // ensure it's a url object +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} - const protocol = url.protocol +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); - return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' -} -/** - * @param {string|URL} url - */ -function urlHasHttpsScheme (url) { - if (typeof url === 'string') { - return url.startsWith('https:') - } +/***/ }), - return url.protocol === 'https:' -} +/***/ 93195: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * @see https://fetch.spec.whatwg.org/#http-scheme - * @param {URL} url - */ -function urlIsHttpHttpsScheme (url) { - assert('protocol' in url) // ensure it's a url object +"use strict"; - const protocol = url.protocol - return protocol === 'http:' || protocol === 'https:' +var Type = __nccwpck_require__(90256); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); } -/** - * Fetch supports node >= 16.8.0, but Object.hasOwn was added in v16.9.0. - */ -const hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)) +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} -module.exports = { - isAborted, - isCancelled, - createDeferredPromise, - ReadableStreamFrom, - toUSVString, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - makeIterator, - isValidHeaderName, - isValidHeaderValue, - hasOwn, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - isomorphicDecode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - normalizeMethodRecord +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; } +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + /***/ }), -/***/ 21744: +/***/ 16480: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { types } = __nccwpck_require__(73837) -const { hasOwn, toUSVString } = __nccwpck_require__(52538) +var common = __nccwpck_require__(59941); +var Type = __nccwpck_require__(90256); -/** @type {import('../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} +function resolveYamlFloat(data) { + if (data === null) return false; -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' - const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } - return webidl.errors.exception({ - header: context.prefix, - message - }) + return true; } -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} +function constructYamlFloat(data) { + var value, sign, base, digits; -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts = undefined) { - if (opts?.strict !== false && !(V instanceof I)) { - throw new TypeError('Illegal invocation') - } else { - return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); } -} -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - ...ctx - }) + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + } + return sign * parseFloat(value, 10); } -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -webidl.util.Type = function (V) { - switch (typeof V) { - case 'undefined': return 'Undefined' - case 'boolean': return 'Boolean' - case 'string': return 'String' - case 'symbol': return 'Symbol' - case 'number': return 'Number' - case 'bigint': return 'BigInt' - case 'function': - case 'object': { - if (V === null) { - return 'Null' - } +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - return 'Object' +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; } -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { - let upperBound - let lowerBound +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} - // 1. If bitLength is 64, then: - if (bitLength === 64) { - // 1. Let upperBound be 2^53 − 1. - upperBound = Math.pow(2, 53) - 1 +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); - // 2. If signedness is "unsigned", then let lowerBound be 0. - if (signedness === 'unsigned') { - lowerBound = 0 - } else { - // 3. Otherwise let lowerBound be −2^53 + 1. - lowerBound = Math.pow(-2, 53) + 1 - } - } else if (signedness === 'unsigned') { - // 2. Otherwise, if signedness is "unsigned", then: - // 1. Let lowerBound be 0. - lowerBound = 0 +/***/ }), + +/***/ 76865: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var common = __nccwpck_require__(59941); +var Type = __nccwpck_require__(90256); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} - // 2. Let upperBound be 2^bitLength − 1. - upperBound = Math.pow(2, bitLength) - 1 - } else { - // 3. Otherwise: +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} - // 1. Let lowerBound be -2^bitLength − 1. - lowerBound = Math.pow(-2, bitLength) - 1 +function resolveYamlInteger(data) { + if (data === null) return false; - // 2. Let upperBound be 2^bitLength − 1 − 1. - upperBound = Math.pow(2, bitLength - 1) - 1 - } + var max = data.length, + index = 0, + hasDigits = false, + ch; - // 4. Let x be ? ToNumber(V). - let x = Number(V) + if (!max) return false; - // 5. If x is −0, then set x to +0. - if (x === 0) { - x = 0 + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; } - // 6. If the conversion is to an IDL type associated - // with the [EnforceRange] extended attribute, then: - if (opts.enforceRange === true) { - // 1. If x is NaN, +∞, or −∞, then throw a TypeError. - if ( - Number.isNaN(x) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${V} to an integer.` - }) - } + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) + // base 2, base 8, base 16 - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; } - // 4. Return x. - return x - } - // 7. If x is not NaN and the conversion is to an IDL - // type associated with the [Clamp] extended - // attribute, then: - if (!Number.isNaN(x) && opts.clamp === true) { - // 1. Set x to min(max(x, lowerBound), upperBound). - x = Math.min(Math.max(x, lowerBound), upperBound) + if (ch === 'x') { + // base 16 + index++; - // 2. Round x to the nearest integer, choosing the - // even integer if it lies halfway between two, - // and choosing +0 rather than −0. - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x) - } else { - x = Math.ceil(x) + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; } - // 3. Return x. - return x - } - - // 8. If x is NaN, +0, +∞, or −∞, then return +0. - if ( - Number.isNaN(x) || - (x === 0 && Object.is(0, x)) || - x === Number.POSITIVE_INFINITY || - x === Number.NEGATIVE_INFINITY - ) { - return 0 + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; } - // 9. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) + // base 10 (except 0) or base 60 - // 10. Set x to x modulo 2^bitLength. - x = x % Math.pow(2, bitLength) + // value should not start with `_`; + if (ch === '_') return false; - // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, - // then return x − 2^bitLength. - if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength) + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; } - // 12. Otherwise, return x. - return x + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); } -// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart -webidl.util.IntegerPart = function (n) { - // 1. Let r be floor(abs(n)). - const r = Math.floor(Math.abs(n)) +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; - // 2. If n < 0, then return -1 × r. - if (n < 0) { - return -1 * r + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); } - // 3. Otherwise, return r. - return r -} + ch = value[0]; -// https://webidl.spec.whatwg.org/#es-sequence -webidl.sequenceConverter = function (converter) { - return (V) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: 'Sequence', - message: `Value of type ${webidl.util.Type(V)} is not an Object.` - }) - } + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } - // 2. Let method be ? GetMethod(V, @@iterator). - /** @type {Generator} */ - const method = V?.[Symbol.iterator]?.() - const seq = [] + if (value === '0') return 0; - // 3. If method is undefined, throw a TypeError. - if ( - method === undefined || - typeof method.next !== 'function' - ) { - throw webidl.errors.exception({ - header: 'Sequence', - message: 'Object is not an iterator.' - }) - } + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); - if (done) { - break - } + value = 0; + base = 1; - seq.push(converter(value)) - } + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; - return seq } + + return sign * parseInt(value, 10); } -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: 'Record', - message: `Value of type ${webidl.util.Type(O)} is not an Object.` - }) - } +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} - // 2. Let result be a new empty instance of record. - const result = {} +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); - if (!types.isProxy(O)) { - // Object.keys only returns enumerable properties - const keys = Object.keys(O) - for (const key of keys) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key) +/***/ }), - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key]) +/***/ 35361: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } +"use strict"; - // 5. Return result. - return result - } - // 3. Let keys be ? O.[[OwnPropertyKeys]](). - const keys = Reflect.ownKeys(O) +var esprima; - // 4. For each key of keys. - for (const key of keys) { - // 1. Let desc be ? O.[[GetOwnProperty]](key). - const desc = Reflect.getOwnPropertyDescriptor(O, key) +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + // workaround to exclude package from browserify list. + var _require = require; + esprima = _require('esprima'); +} catch (_) { + /* eslint-disable no-redeclare */ + /* global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} - // 2. If desc is not undefined and desc.[[Enumerable]] is true: - if (desc?.enumerable) { - // 1. Let typedKey be key converted to an IDL value of type K. - const typedKey = keyConverter(key) +var Type = __nccwpck_require__(90256); - // 2. Let value be ? Get(O, key). - // 3. Let typedValue be value converted to an IDL value of type V. - const typedValue = valueConverter(O[key]) +function resolveJavascriptFunction(data) { + if (data === null) return false; - // 4. Set result[typedKey] to typedValue. - result[typedKey] = typedValue - } + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + return false; } - // 5. Return result. - return result + return true; + } catch (err) { + return false; } } -webidl.interfaceConverter = function (i) { - return (V, opts = {}) => { - if (opts.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: i.name, - message: `Expected ${V} to be an instance of ${i.name}.` - }) - } +function constructJavascriptFunction(data) { + /*jslint evil:true*/ - return V + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + (ast.body[0].expression.type !== 'ArrowFunctionExpression' && + ast.body[0].expression.type !== 'FunctionExpression')) { + throw new Error('Failed to resolve function'); } -} -webidl.dictionaryConverter = function (converters) { - return (dictionary) => { - const type = webidl.util.Type(dictionary) - const dict = {} + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } + body = ast.body[0].expression.body.range; - for (const options of converters) { - const { key, defaultValue, required, converter } = options + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + if (ast.body[0].expression.body.type === 'BlockStatement') { + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + // ES6 arrow functions can omit the BlockStatement. In that case, just return + // the body. + /*eslint-disable no-new-func*/ + return new Function(params, 'return ' + source.slice(body[0], body[1])); +} - if (required === true) { - if (!hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `Missing required key "${key}".` - }) - } - } +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} - let value = dictionary[key] - const hasDefault = hasOwn(options, 'defaultValue') +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value = value ?? defaultValue - } +module.exports = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); - // A key can be optional and have no default value. - // When this happens, do not perform a conversion, - // and do not assign the key a value. - if (required || hasDefault || value !== undefined) { - value = converter(value) - if ( - options.allowedValues && - !options.allowedValues.includes(value) - ) { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) - } +/***/ }), - dict[key] = value - } - } +/***/ 77234: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return dict - } -} +"use strict"; -webidl.nullableConverter = function (converter) { - return (V) => { - if (V === null) { - return V - } - return converter(V) - } -} +var Type = __nccwpck_require__(90256); -// https://webidl.spec.whatwg.org/#es-DOMString -webidl.converters.DOMString = function (V, opts = {}) { - // 1. If V is null and the conversion is to an IDL type - // associated with the [LegacyNullToEmptyString] - // extended attribute, then return the DOMString value - // that represents the empty string. - if (V === null && opts.legacyNullToEmptyString) { - return '' - } +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; - // 2. Let x be ? ToString(V). - if (typeof V === 'symbol') { - throw new TypeError('Could not convert argument of type symbol to string.') + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; } - // 3. Return the IDL DOMString value that represents the - // same sequence of code units as the one the - // ECMAScript String value x represents. - return String(V) + return true; } -// https://webidl.spec.whatwg.org/#es-ByteString -webidl.converters.ByteString = function (V) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = webidl.converters.DOMString(V) +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; - // 2. If the value of any element of x is greater than - // 255, then throw a TypeError. - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError( - 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` - ) - } + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); } - // 3. Return an IDL ByteString value whose length is the - // length of x, and where the value of each element is - // the value of the corresponding element of x. - return x + return new RegExp(regexp, modifiers); } -// https://webidl.spec.whatwg.org/#es-USVString -webidl.converters.USVString = toUSVString +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; -// https://webidl.spec.whatwg.org/#es-boolean -webidl.converters.boolean = function (V) { - // 1. Let x be the result of computing ToBoolean(V). - const x = Boolean(V) + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; - // 2. Return the IDL boolean value that is the one that represents - // the same truth value as the ECMAScript Boolean value x. - return x + return result; } -// https://webidl.spec.whatwg.org/#es-any -webidl.converters.any = function (V) { - return V +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; } -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = webidl.util.ConvertToInt(V, 64, 'signed') +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); - // 2. Return the IDL long long value that represents - // the same numeric value as x. - return x -} -// https://webidl.spec.whatwg.org/#es-unsigned-long-long -webidl.converters['unsigned long long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = webidl.util.ConvertToInt(V, 64, 'unsigned') +/***/ }), - // 2. Return the IDL unsigned long long value that - // represents the same numeric value as x. - return x -} +/***/ 34801: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// https://webidl.spec.whatwg.org/#es-unsigned-long -webidl.converters['unsigned long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = webidl.util.ConvertToInt(V, 32, 'unsigned') +"use strict"; - // 2. Return the IDL unsigned long value that - // represents the same numeric value as x. - return x -} -// https://webidl.spec.whatwg.org/#es-unsigned-short -webidl.converters['unsigned short'] = function (V, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts) +var Type = __nccwpck_require__(90256); - // 2. Return the IDL unsigned short value that represents - // the same numeric value as x. - return x +function resolveJavascriptUndefined() { + return true; } -// https://webidl.spec.whatwg.org/#idl-ArrayBuffer -webidl.converters.ArrayBuffer = function (V, opts = {}) { - // 1. If Type(V) is not Object, or V does not have an - // [[ArrayBufferData]] internal slot, then throw a - // TypeError. - // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances - // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances - if ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix: `${V}`, - argument: `${V}`, - types: ['ArrayBuffer'] - }) - } - - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V) is true, then throw a - // TypeError. - if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } - - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V) is true, then throw a - // TypeError. - // Note: resizable ArrayBuffers are currently a proposal. - - // 4. Return the IDL ArrayBuffer value that is a - // reference to the same object as V. - return V +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; } -webidl.converters.TypedArray = function (V, T, opts = {}) { - // 1. Let T be the IDL type V is being converted to. +function representJavascriptUndefined() { + return ''; +} - // 2. If Type(V) is not Object, or V does not have a - // [[TypedArrayName]] internal slot with a value - // equal to T’s name, then throw a TypeError. - if ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix: `${T.name}`, - argument: `${V}`, - types: [T.name] - }) - } +function isUndefined(object) { + return typeof object === 'undefined'; +} - // 3. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); - // 4. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - // Note: resizable array buffers are currently a proposal - // 5. Return the IDL value of type T that is a reference - // to the same object as V. - return V -} +/***/ }), -webidl.converters.DataView = function (V, opts = {}) { - // 1. If Type(V) is not Object, or V does not have a - // [[DataView]] internal slot, then throw a TypeError. - if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: 'DataView', - message: 'Object is not a DataView.' - }) - } +/***/ 15938: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // 2. If the conversion is not to an IDL type associated - // with the [AllowShared] extended attribute, and - // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, - // then throw a TypeError. - if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: 'ArrayBuffer', - message: 'SharedArrayBuffer is not allowed.' - }) - } +"use strict"; - // 3. If the conversion is not to an IDL type associated - // with the [AllowResizable] extended attribute, and - // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is - // true, then throw a TypeError. - // Note: resizable ArrayBuffers are currently a proposal - // 4. Return the IDL DataView value that is a reference - // to the same object as V. - return V -} +var Type = __nccwpck_require__(90256); -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, opts = {}) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, opts) - } +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor) - } - if (types.isDataView(V)) { - return webidl.converters.DataView(V, opts) - } +/***/ }), - throw new TypeError(`Could not convert ${V} to a BufferSource.`) -} +/***/ 60194: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) +"use strict"; -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) +var Type = __nccwpck_require__(90256); -module.exports = { - webidl +function resolveYamlMerge(data) { + return data === '<<' || data === null; } +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + /***/ }), -/***/ 84854: -/***/ ((module) => { +/***/ 26058: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function getEncoding (label) { - if (!label) { - return 'failure' - } +var Type = __nccwpck_require__(90256); - // 1. Remove any leading and trailing ASCII whitespace from label. - // 2. If label is an ASCII case-insensitive match for any of the - // labels listed in the table below, then return the - // corresponding encoding; otherwise return failure. - switch (label.trim().toLowerCase()) { - case 'unicode-1-1-utf-8': - case 'unicode11utf8': - case 'unicode20utf8': - case 'utf-8': - case 'utf8': - case 'x-unicode20utf8': - return 'UTF-8' - case '866': - case 'cp866': - case 'csibm866': - case 'ibm866': - return 'IBM866' - case 'csisolatin2': - case 'iso-8859-2': - case 'iso-ir-101': - case 'iso8859-2': - case 'iso88592': - case 'iso_8859-2': - case 'iso_8859-2:1987': - case 'l2': - case 'latin2': - return 'ISO-8859-2' - case 'csisolatin3': - case 'iso-8859-3': - case 'iso-ir-109': - case 'iso8859-3': - case 'iso88593': - case 'iso_8859-3': - case 'iso_8859-3:1988': - case 'l3': - case 'latin3': - return 'ISO-8859-3' - case 'csisolatin4': - case 'iso-8859-4': - case 'iso-ir-110': - case 'iso8859-4': - case 'iso88594': - case 'iso_8859-4': - case 'iso_8859-4:1988': - case 'l4': - case 'latin4': - return 'ISO-8859-4' - case 'csisolatincyrillic': - case 'cyrillic': - case 'iso-8859-5': - case 'iso-ir-144': - case 'iso8859-5': - case 'iso88595': - case 'iso_8859-5': - case 'iso_8859-5:1988': - return 'ISO-8859-5' - case 'arabic': - case 'asmo-708': - case 'csiso88596e': - case 'csiso88596i': - case 'csisolatinarabic': - case 'ecma-114': - case 'iso-8859-6': - case 'iso-8859-6-e': - case 'iso-8859-6-i': - case 'iso-ir-127': - case 'iso8859-6': - case 'iso88596': - case 'iso_8859-6': - case 'iso_8859-6:1987': - return 'ISO-8859-6' - case 'csisolatingreek': - case 'ecma-118': - case 'elot_928': - case 'greek': - case 'greek8': - case 'iso-8859-7': - case 'iso-ir-126': - case 'iso8859-7': - case 'iso88597': - case 'iso_8859-7': - case 'iso_8859-7:1987': - case 'sun_eu_greek': - return 'ISO-8859-7' - case 'csiso88598e': - case 'csisolatinhebrew': - case 'hebrew': - case 'iso-8859-8': - case 'iso-8859-8-e': - case 'iso-ir-138': - case 'iso8859-8': - case 'iso88598': - case 'iso_8859-8': - case 'iso_8859-8:1988': - case 'visual': - return 'ISO-8859-8' - case 'csiso88598i': - case 'iso-8859-8-i': - case 'logical': - return 'ISO-8859-8-I' - case 'csisolatin6': - case 'iso-8859-10': - case 'iso-ir-157': - case 'iso8859-10': - case 'iso885910': - case 'l6': - case 'latin6': - return 'ISO-8859-10' - case 'iso-8859-13': - case 'iso8859-13': - case 'iso885913': - return 'ISO-8859-13' - case 'iso-8859-14': - case 'iso8859-14': - case 'iso885914': - return 'ISO-8859-14' - case 'csisolatin9': - case 'iso-8859-15': - case 'iso8859-15': - case 'iso885915': - case 'iso_8859-15': - case 'l9': - return 'ISO-8859-15' - case 'iso-8859-16': - return 'ISO-8859-16' - case 'cskoi8r': - case 'koi': - case 'koi8': - case 'koi8-r': - case 'koi8_r': - return 'KOI8-R' - case 'koi8-ru': - case 'koi8-u': - return 'KOI8-U' - case 'csmacintosh': - case 'mac': - case 'macintosh': - case 'x-mac-roman': - return 'macintosh' - case 'iso-8859-11': - case 'iso8859-11': - case 'iso885911': - case 'tis-620': - case 'windows-874': - return 'windows-874' - case 'cp1250': - case 'windows-1250': - case 'x-cp1250': - return 'windows-1250' - case 'cp1251': - case 'windows-1251': - case 'x-cp1251': - return 'windows-1251' - case 'ansi_x3.4-1968': - case 'ascii': - case 'cp1252': - case 'cp819': - case 'csisolatin1': - case 'ibm819': - case 'iso-8859-1': - case 'iso-ir-100': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'iso_8859-1:1987': - case 'l1': - case 'latin1': - case 'us-ascii': - case 'windows-1252': - case 'x-cp1252': - return 'windows-1252' - case 'cp1253': - case 'windows-1253': - case 'x-cp1253': - return 'windows-1253' - case 'cp1254': - case 'csisolatin5': - case 'iso-8859-9': - case 'iso-ir-148': - case 'iso8859-9': - case 'iso88599': - case 'iso_8859-9': - case 'iso_8859-9:1989': - case 'l5': - case 'latin5': - case 'windows-1254': - case 'x-cp1254': - return 'windows-1254' - case 'cp1255': - case 'windows-1255': - case 'x-cp1255': - return 'windows-1255' - case 'cp1256': - case 'windows-1256': - case 'x-cp1256': - return 'windows-1256' - case 'cp1257': - case 'windows-1257': - case 'x-cp1257': - return 'windows-1257' - case 'cp1258': - case 'windows-1258': - case 'x-cp1258': - return 'windows-1258' - case 'x-mac-cyrillic': - case 'x-mac-ukrainian': - return 'x-mac-cyrillic' - case 'chinese': - case 'csgb2312': - case 'csiso58gb231280': - case 'gb2312': - case 'gb_2312': - case 'gb_2312-80': - case 'gbk': - case 'iso-ir-58': - case 'x-gbk': - return 'GBK' - case 'gb18030': - return 'gb18030' - case 'big5': - case 'big5-hkscs': - case 'cn-big5': - case 'csbig5': - case 'x-x-big5': - return 'Big5' - case 'cseucpkdfmtjapanese': - case 'euc-jp': - case 'x-euc-jp': - return 'EUC-JP' - case 'csiso2022jp': - case 'iso-2022-jp': - return 'ISO-2022-JP' - case 'csshiftjis': - case 'ms932': - case 'ms_kanji': - case 'shift-jis': - case 'shift_jis': - case 'sjis': - case 'windows-31j': - case 'x-sjis': - return 'Shift_JIS' - case 'cseuckr': - case 'csksc56011987': - case 'euc-kr': - case 'iso-ir-149': - case 'korean': - case 'ks_c_5601-1987': - case 'ks_c_5601-1989': - case 'ksc5601': - case 'ksc_5601': - case 'windows-949': - return 'EUC-KR' - case 'csiso2022kr': - case 'hz-gb-2312': - case 'iso-2022-cn': - case 'iso-2022-cn-ext': - case 'iso-2022-kr': - case 'replacement': - return 'replacement' - case 'unicodefffe': - case 'utf-16be': - return 'UTF-16BE' - case 'csunicode': - case 'iso-10646-ucs-2': - case 'ucs-2': - case 'unicode': - case 'unicodefeff': - case 'utf-16': - case 'utf-16le': - return 'UTF-16LE' - case 'x-user-defined': - return 'x-user-defined' - default: return 'failure' - } +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); } -module.exports = { - getEncoding +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; } +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); + /***/ }), -/***/ 1446: +/***/ 96439: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(87530) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(29054) -const { webidl } = __nccwpck_require__(21744) -const { kEnumerableProperty } = __nccwpck_require__(83983) +var Type = __nccwpck_require__(90256); -class FileReader extends EventTarget { - constructor () { - super() +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[kEvents] = { - loadend: null, - error: null, - abort: null, - load: null, - progress: null, - loadstart: null +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; } - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer - * @param {import('buffer').Blob} blob - */ - readAsArrayBuffer (blob) { - webidl.brandCheck(this, FileReader) + return true; +} - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' }) +function constructYamlOmap(data) { + return data !== null ? data : []; +} - blob = webidl.converters.Blob(blob, { strict: false }) +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) +/***/ }), - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' }) +/***/ 33730: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - blob = webidl.converters.Blob(blob, { strict: false }) +"use strict"; - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) +var Type = __nccwpck_require__(90256); - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) +var _toString = Object.prototype.toString; - blob = webidl.converters.Blob(blob, { strict: false }) +function resolveYamlPairs(data) { + if (data === null) return true; - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding) - } + var index, length, pair, keys, result, + object = data; - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) - } + result = new Array(object.length); - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' }) + if (_toString.call(pair) !== '[object Object]') return false; - blob = webidl.converters.Blob(blob, { strict: false }) + keys = Object.keys(pair); - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; } - /** - * @see https://w3c.github.io/FileAPI/#dfn-abort - */ - abort () { - // 1. If this's state is "empty" or if this's state is - // "done" set this's result to null and terminate - // this algorithm. - if (this[kState] === 'empty' || this[kState] === 'done') { - this[kResult] = null - return - } + return true; +} - // 2. If this's state is "loading" set this's state to - // "done" and set this's result to null. - if (this[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null - } +function constructYamlPairs(data) { + if (data === null) return []; - // 3. If there are any tasks from this on the file reading - // task source in an affiliated task queue, then remove - // those tasks from that task queue. - this[kAborted] = true + var index, length, pair, keys, result, + object = data; - // 4. Terminate the algorithm for the read method being processed. - // TODO + result = new Array(object.length); - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) - } + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) + return result; +} - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + + +/***/ }), + +/***/ 65629: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(90256); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + + +/***/ }), + +/***/ 9047: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(90256); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; } } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) + return true; +} - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + + +/***/ }), + +/***/ 24649: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(90256); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + + +/***/ }), + +/***/ 82018: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var Type = __nccwpck_require__(90256); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); } - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) + // match: [4] hour [5] minute [6] second [7] fraction - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; } - get onloadend () { - webidl.brandCheck(this, FileReader) + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - return this[kEvents].loadend + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; } - set onloadend (fn) { - webidl.brandCheck(this, FileReader) + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + + +/***/ }), + +/***/ 15185: +/***/ ((module) => { + +class Node { + /// value; + /// next; + + constructor(value) { + this.value = value; + + // TODO: Remove this when targeting Node.js 12. + this.next = undefined; + } +} + +class Queue { + // TODO: Use private class fields when targeting Node.js 12. + // #_head; + // #_tail; + // #_size; + + constructor() { + this.clear(); + } + + enqueue(value) { + const node = new Node(value); + + if (this._head) { + this._tail.next = node; + this._tail = node; + } else { + this._head = node; + this._tail = node; + } + + this._size++; + } + + dequeue() { + const current = this._head; + if (!current) { + return; + } + + this._head = this._head.next; + this._size--; + return current.value; + } + + clear() { + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + get size() { + return this._size; + } + + * [Symbol.iterator]() { + let current = this._head; + + while (current) { + yield current.value; + current = current.next; + } + } +} + +module.exports = Queue; + + +/***/ }), + +/***/ 53497: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.generate = exports.createAuthenticationSettings = exports.configureAuthentication = void 0; +const path = __importStar(__nccwpck_require__(71017)); +const core = __importStar(__nccwpck_require__(42186)); +const io = __importStar(__nccwpck_require__(47351)); +const fs = __importStar(__nccwpck_require__(57147)); +const os = __importStar(__nccwpck_require__(22037)); +const xmlbuilder2_1 = __nccwpck_require__(70151); +const constants = __importStar(__nccwpck_require__(69042)); +const gpg = __importStar(__nccwpck_require__(23759)); +const util_1 = __nccwpck_require__(92629); +function configureAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + const id = core.getInput(constants.INPUT_SERVER_ID); + const username = core.getInput(constants.INPUT_SERVER_USERNAME); + const password = core.getInput(constants.INPUT_SERVER_PASSWORD); + const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || + path.join(os.homedir(), constants.M2_DIR); + const overwriteSettings = (0, util_1.getBooleanInput)(constants.INPUT_OVERWRITE_SETTINGS, true); + const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY) || + constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; + const gpgPassphrase = core.getInput(constants.INPUT_GPG_PASSPHRASE) || + (gpgPrivateKey ? constants.INPUT_DEFAULT_GPG_PASSPHRASE : undefined); + if (gpgPrivateKey) { + core.setSecret(gpgPrivateKey); + } + yield createAuthenticationSettings(id, username, password, settingsDirectory, overwriteSettings, gpgPassphrase); + if (gpgPrivateKey) { + core.info('Importing private gpg key'); + const keyFingerprint = (yield gpg.importKey(gpgPrivateKey)) || ''; + core.saveState(constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT, keyFingerprint); + } + }); +} +exports.configureAuthentication = configureAuthentication; +function createAuthenticationSettings(id, username, password, settingsDirectory, overwriteSettings, gpgPassphrase = undefined) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Creating ${constants.MVN_SETTINGS_FILE} with server-id: ${id}`); + // when an alternate m2 location is specified use only that location (no .m2 directory) + // otherwise use the home/.m2/ path + yield io.mkdirP(settingsDirectory); + yield write(settingsDirectory, generate(id, username, password, gpgPassphrase), overwriteSettings); + }); +} +exports.createAuthenticationSettings = createAuthenticationSettings; +// only exported for testing purposes +function generate(id, username, password, gpgPassphrase) { + const xmlObj = { + settings: { + '@xmlns': 'http://maven.apache.org/SETTINGS/1.0.0', + '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', + '@xsi:schemaLocation': 'http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd', + servers: { + server: [ + { + id: id, + username: `\${env.${username}}`, + password: `\${env.${password}}` + } + ] + } + } + }; + if (gpgPassphrase) { + const gpgServer = { + id: 'gpg.passphrase', + passphrase: `\${env.${gpgPassphrase}}` + }; + xmlObj.settings.servers.server.push(gpgServer); } + return (0, xmlbuilder2_1.create)(xmlObj).end({ + headless: true, + prettyPrint: true, + width: 80 + }); +} +exports.generate = generate; +function write(directory, settings, overwriteSettings) { + return __awaiter(this, void 0, void 0, function* () { + const location = path.join(directory, constants.MVN_SETTINGS_FILE); + const settingsExists = fs.existsSync(location); + if (settingsExists && overwriteSettings) { + core.info(`Overwriting existing file ${location}`); + } + else if (!settingsExists) { + core.info(`Writing to ${location}`); + } + else { + core.info(`Skipping generation ${location} because file already exists and overwriting is not required`); + return; + } + return fs.writeFileSync(location, settings, { + encoding: 'utf-8', + flag: 'w' + }); + }); +} - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null + +/***/ }), + +/***/ 64810: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/** + * @fileoverview this file provides methods handling dependency cache + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.save = exports.restore = void 0; +const path_1 = __nccwpck_require__(71017); +const os_1 = __importDefault(__nccwpck_require__(22037)); +const cache = __importStar(__nccwpck_require__(27799)); +const core = __importStar(__nccwpck_require__(42186)); +const glob = __importStar(__nccwpck_require__(28090)); +const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'; +const CACHE_MATCHED_KEY = 'cache-matched-key'; +const CACHE_KEY_PREFIX = 'setup-java'; +const supportedPackageManager = [ + { + id: 'maven', + path: [(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository')], + // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven + pattern: ['**/pom.xml'] + }, + { + id: 'gradle', + path: [ + (0, path_1.join)(os_1.default.homedir(), '.gradle', 'caches'), + (0, path_1.join)(os_1.default.homedir(), '.gradle', 'wrapper') + ], + // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle + pattern: [ + '**/*.gradle*', + '**/gradle-wrapper.properties', + 'buildSrc/**/Versions.kt', + 'buildSrc/**/Dependencies.kt', + 'gradle/*.versions.toml', + '**/versions.properties' + ] + }, + { + id: 'sbt', + path: [ + (0, path_1.join)(os_1.default.homedir(), '.ivy2', 'cache'), + (0, path_1.join)(os_1.default.homedir(), '.sbt'), + getCoursierCachePath(), + // Some files should not be cached to avoid resolution problems. + // In particular the resolution of snapshots (ideological gap between maven/ivy). + '!' + (0, path_1.join)(os_1.default.homedir(), '.sbt', '*.lock'), + '!' + (0, path_1.join)(os_1.default.homedir(), '**', 'ivydata-*.properties') + ], + pattern: [ + '**/*.sbt', + '**/project/build.properties', + '**/project/**.scala', + '**/project/**.sbt' + ] + } +]; +function getCoursierCachePath() { + if (os_1.default.type() === 'Linux') + return (0, path_1.join)(os_1.default.homedir(), '.cache', 'coursier'); + if (os_1.default.type() === 'Darwin') + return (0, path_1.join)(os_1.default.homedir(), 'Library', 'Caches', 'Coursier'); + return (0, path_1.join)(os_1.default.homedir(), 'AppData', 'Local', 'Coursier', 'Cache'); +} +function findPackageManager(id) { + const packageManager = supportedPackageManager.find(packageManager => packageManager.id === id); + if (packageManager === undefined) { + throw new Error(`unknown package manager specified: ${id}`); + } + return packageManager; +} +/** + * A function that generates a cache key to use. + * Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"". + * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key} + */ +function computeCacheKey(packageManager, cacheDependencyPath) { + return __awaiter(this, void 0, void 0, function* () { + const pattern = cacheDependencyPath + ? cacheDependencyPath.trim().split('\n') + : packageManager.pattern; + const fileHash = yield glob.hashFiles(pattern.join('\n')); + if (!fileHash) { + throw new Error(`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`); + } + return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-${packageManager.id}-${fileHash}`; + }); +} +/** + * Restore the dependency cache + * @param id ID of the package manager, should be "maven" or "gradle" + * @param cacheDependencyPath The path to a dependency file + */ +function restore(id, cacheDependencyPath) { + return __awaiter(this, void 0, void 0, function* () { + const packageManager = findPackageManager(id); + const primaryKey = yield computeCacheKey(packageManager, cacheDependencyPath); + core.debug(`primary key is ${primaryKey}`); + core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey); + // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269) + const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey); + if (matchedKey) { + core.saveState(CACHE_MATCHED_KEY, matchedKey); + core.setOutput('cache-hit', matchedKey === primaryKey); + core.info(`Cache restored from key: ${matchedKey}`); + } + else { + core.setOutput('cache-hit', false); + core.info(`${packageManager.id} cache is not found`); + } + }); +} +exports.restore = restore; +/** + * Save the dependency cache + * @param id ID of the package manager, should be "maven" or "gradle" + */ +function save(id) { + return __awaiter(this, void 0, void 0, function* () { + const packageManager = findPackageManager(id); + const matchedKey = core.getState(CACHE_MATCHED_KEY); + // Inputs are re-evaluated before the post action, so we want the original key used for restore + const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY); + if (!primaryKey) { + core.warning('Error retrieving key from state.'); + return; + } + else if (matchedKey === primaryKey) { + // no change in target directories + core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); + return; + } + try { + yield cache.saveCache(packageManager.path, primaryKey); + core.info(`Cache saved with the key: ${primaryKey}`); + } + catch (error) { + const err = error; + if (err.name === cache.ReserveCacheError.name) { + core.info(err.message); + } + else { + if (isProbablyGradleDaemonProblem(packageManager, err)) { + core.warning('Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'); + } + throw error; + } + } + }); +} +exports.save = save; +/** + * @param packageManager the specified package manager by user + * @param error the error thrown by the saveCache + * @returns true if the given error seems related to the {@link https://github.com/actions/cache/issues/454|running Gradle Daemon issue}. + * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} + */ +function isProbablyGradleDaemonProblem(packageManager, error) { + if (packageManager.id !== 'gradle' || + process.env['RUNNER_OS'] !== 'Windows') { + return false; + } + const message = error.message || ''; + return message.startsWith('Tar failed with error: '); +} + + +/***/ }), + +/***/ 69042: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE_DEPENDENCY_PATH = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; +exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home'; +exports.INPUT_JAVA_VERSION = 'java-version'; +exports.INPUT_JAVA_VERSION_FILE = 'java-version-file'; +exports.INPUT_ARCHITECTURE = 'architecture'; +exports.INPUT_JAVA_PACKAGE = 'java-package'; +exports.INPUT_DISTRIBUTION = 'distribution'; +exports.INPUT_JDK_FILE = 'jdkFile'; +exports.INPUT_CHECK_LATEST = 'check-latest'; +exports.INPUT_SERVER_ID = 'server-id'; +exports.INPUT_SERVER_USERNAME = 'server-username'; +exports.INPUT_SERVER_PASSWORD = 'server-password'; +exports.INPUT_SETTINGS_PATH = 'settings-path'; +exports.INPUT_OVERWRITE_SETTINGS = 'overwrite-settings'; +exports.INPUT_GPG_PRIVATE_KEY = 'gpg-private-key'; +exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; +exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; +exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; +exports.INPUT_CACHE = 'cache'; +exports.INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path'; +exports.INPUT_JOB_STATUS = 'job-status'; +exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; +exports.M2_DIR = '.m2'; +exports.MVN_SETTINGS_FILE = 'settings.xml'; +exports.MVN_TOOLCHAINS_FILE = 'toolchains.xml'; +exports.INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id'; +exports.INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor'; +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto']; + + +/***/ }), + +/***/ 68766: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdoptDistribution = exports.AdoptImplementation = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +var AdoptImplementation; +(function (AdoptImplementation) { + AdoptImplementation["Hotspot"] = "Hotspot"; + AdoptImplementation["OpenJ9"] = "OpenJ9"; +})(AdoptImplementation || (exports.AdoptImplementation = AdoptImplementation = {})); +class AdoptDistribution extends base_installer_1.JavaBase { + constructor(installerOptions, jvmImpl) { + super(`Adopt-${jvmImpl}`, installerOptions); + this.jvmImpl = jvmImpl; + } + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + const availableVersionsRaw = yield this.getAvailableVersions(); + const availableVersionsWithBinaries = availableVersionsRaw + .filter(item => item.binaries.length > 0) + .map(item => { + return { + version: item.version_data.semver, + url: item.binaries[0].package.link + }; + }); + const satisfiedVersions = availableVersionsWithBinaries + .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) + .sort((a, b) => { + return -semver_1.default.compareBuild(a.version, b.version); + }); + const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); + } + return resolvedFullVersion; + }); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + get toolcacheFolderName() { + if (this.jvmImpl === AdoptImplementation.Hotspot) { + // exclude Hotspot postfix from distribution name because Hosted runners have pre-cached Adopt OpenJDK under "Java_Adopt_jdk" + // for more information see: https://github.com/actions/setup-java/pull/155#discussion_r610451063 + return `Java_Adopt_${this.packageType}`; + } + return super.toolcacheFolderName; + } + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + const imageType = this.packageType; + const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions + const releaseType = this.stable ? 'ga' : 'ea'; + if (core.isDebug()) { + console.time('Retrieving available versions for Adopt took'); // eslint-disable-line no-console + } + const baseRequestArguments = [ + `project=jdk`, + 'vendor=adoptopenjdk', + `heap_size=normal`, + 'sort_method=DEFAULT', + 'sort_order=DESC', + `os=${platform}`, + `architecture=${arch}`, + `image_type=${imageType}`, + `release_type=${releaseType}`, + `jvm_impl=${this.jvmImpl.toLowerCase()}` + ].join('&'); + // need to iterate through all pages to retrieve the list of all versions + // Adopt API doesn't provide way to retrieve the count of pages to iterate so infinity loop + let page_index = 0; + const availableVersions = []; + while (true) { + const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; + const availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`; + if (core.isDebug() && page_index === 0) { + // url is identical except page_index so print it once for debug + core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + } + const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result; + if (paginationPage === null || paginationPage.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + availableVersions.push(...paginationPage); + page_index++; + } + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Adopt took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); + core.endGroup(); + } + return availableVersions; + }); + } + getPlatformOption() { + // Adopt has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'mac'; + case 'win32': + return 'windows'; + default: + return process.platform; + } } - } +} +exports.AdoptDistribution = AdoptDistribution; - get onerror () { - webidl.brandCheck(this, FileReader) - return this[kEvents].error - } +/***/ }), - set onerror (fn) { - webidl.brandCheck(this, FileReader) +/***/ 59741: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } +"use strict"; - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - } - - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.JavaBase = void 0; +const tc = __importStar(__nccwpck_require__(27784)); +const core = __importStar(__nccwpck_require__(42186)); +const fs = __importStar(__nccwpck_require__(57147)); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const httpm = __importStar(__nccwpck_require__(96255)); +const util_1 = __nccwpck_require__(92629); +const constants_1 = __nccwpck_require__(69042); +const os_1 = __importDefault(__nccwpck_require__(22037)); +class JavaBase { + constructor(distribution, installerOptions) { + this.distribution = distribution; + this.http = new httpm.HttpClient('actions/setup-java', undefined, { + allowRetries: true, + maxRetries: 3 + }); + ({ version: this.version, stable: this.stable } = this.normalizeVersion(installerOptions.version)); + this.architecture = installerOptions.architecture || os_1.default.arch(); + this.packageType = installerOptions.packageType; + this.checkLatest = installerOptions.checkLatest; } - - if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null + setupJava() { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + let foundJava = this.findInToolcache(); + if (foundJava && !this.checkLatest) { + core.info(`Resolved Java ${foundJava.version} from tool-cache`); + } + else { + core.info('Trying to resolve the latest version from remote'); + const MAX_RETRIES = 4; + const RETRY_DELAY_MS = 2000; + const retryableCodes = [ + 'ETIMEDOUT', + 'ECONNRESET', + 'ENOTFOUND', + 'ECONNREFUSED' + ]; + let retries = MAX_RETRIES; + while (retries > 0) { + try { + // Clear console timers before each attempt to prevent conflicts + if (retries < MAX_RETRIES && core.isDebug()) { + const consoleAny = console; + (_b = (_a = consoleAny._times) === null || _a === void 0 ? void 0 : _a.clear) === null || _b === void 0 ? void 0 : _b.call(_a); + } + const javaRelease = yield this.findPackageForDownload(this.version); + core.info(`Resolved latest version as ${javaRelease.version}`); + if ((foundJava === null || foundJava === void 0 ? void 0 : foundJava.version) === javaRelease.version) { + core.info(`Resolved Java ${foundJava.version} from tool-cache`); + } + else { + core.info('Trying to download...'); + foundJava = yield this.downloadTool(javaRelease); + core.info(`Java ${foundJava.version} was downloaded`); + } + break; + } + catch (error) { + retries--; + // Check if error is retryable (including aggregate errors) + const isRetryable = (error instanceof tc.HTTPError && + error.httpStatusCode && + [429, 502, 503, 504, 522].includes(error.httpStatusCode)) || + retryableCodes.includes(error === null || error === void 0 ? void 0 : error.code) || + ((error === null || error === void 0 ? void 0 : error.errors) && + Array.isArray(error.errors) && + error.errors.some((err) => retryableCodes.includes(err === null || err === void 0 ? void 0 : err.code))); + if (retries > 0 && isRetryable) { + core.debug(`Attempt failed due to network or timeout issues, initiating retry... (${retries} attempts left)`); + yield new Promise(r => setTimeout(r, RETRY_DELAY_MS)); + continue; + } + if (error instanceof tc.HTTPError) { + if (error.httpStatusCode === 403) { + core.error('HTTP 403: Permission denied or access restricted.'); + } + else if (error.httpStatusCode === 429) { + core.warning('HTTP 429: Rate limit exceeded. Please retry later.'); + } + else { + core.error(`HTTP ${error.httpStatusCode}: ${error.message}`); + } + } + else if (error && error.errors && Array.isArray(error.errors)) { + core.error(`Java setup failed due to network or configuration error(s)`); + if (error instanceof Error && error.stack) { + core.debug(error.stack); + } + for (const err of error.errors) { + const endpoint = (err === null || err === void 0 ? void 0 : err.address) || (err === null || err === void 0 ? void 0 : err.hostname) || ''; + const port = (err === null || err === void 0 ? void 0 : err.port) ? `:${err.port}` : ''; + const message = (err === null || err === void 0 ? void 0 : err.message) || 'Aggregate error'; + const endpointInfo = !message.includes(endpoint) + ? ` ${endpoint}${port}` + : ''; + const localInfo = err.localAddress && err.localPort + ? ` - Local (${err.localAddress}:${err.localPort})` + : ''; + const logMessage = `${message}${endpointInfo}${localInfo}`; + core.error(logMessage); + core.debug(`${err.stack || err.message}`); + Object.entries(err).forEach(([key, value]) => { + core.debug(`"${key}": ${JSON.stringify(value)}`); + }); + } + } + else { + const message = error instanceof Error ? error.message : JSON.stringify(error); + core.error(`Java setup process failed due to: ${message}`); + if (typeof (error === null || error === void 0 ? void 0 : error.code) === 'string') { + core.debug(error.stack); + } + const errorDetails = Object.assign({ name: error.name, message: error.message }, Object.getOwnPropertyNames(error) + .filter(prop => !['name', 'message', 'stack'].includes(prop)) + .reduce((acc, prop) => { + acc[prop] = error[prop]; + return acc; + }, {})); + Object.entries(errorDetails).forEach(([key, value]) => { + core.debug(`"${key}": ${JSON.stringify(value)}`); + }); + } + throw error; + } + } + } + if (!foundJava) { + throw new Error('Failed to resolve Java version'); + } + // JDK folder may contain postfix "Contents/Home" on macOS + const macOSPostfixPath = path_1.default.join(foundJava.path, constants_1.MACOS_JAVA_CONTENT_POSTFIX); + if (process.platform === 'darwin' && fs.existsSync(macOSPostfixPath)) { + foundJava.path = macOSPostfixPath; + } + core.info(`Setting Java ${foundJava.version} as the default`); + this.setJavaDefault(foundJava.version, foundJava.path); + return foundJava; + }); } - } - - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) + get toolcacheFolderName() { + return `Java_${this.distribution}_${this.packageType}`; } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null + getToolcacheVersionName(version) { + if (!this.stable) { + if (version.includes('+')) { + return version.replace('+', '-ea.'); + } + else { + return `${version}-ea`; + } + } + // Kotlin and some Java dependencies don't work properly when Java path contains "+" sign + // so replace "/hostedtoolcache/Java/11.0.3+4/x64" to "/hostedtoolcache/Java/11.0.3-4/x64" when saves to cache + // related issue: https://github.com/actions/virtual-environments/issues/3014 + return version.replace('+', '-'); } - } - - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load - } - - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) + findInToolcache() { + // we can't use tc.find directly because firstly, we need to filter versions by stability flag + // if *-ea is provided, take only ea versions from toolcache, otherwise - only stable versions + const availableVersions = tc + .findAllVersions(this.toolcacheFolderName, this.architecture) + .map(item => { + return { + version: item + .replace('-ea.', '+') + .replace(/-ea$/, '') + // Kotlin and some Java dependencies don't work properly when Java path contains "+" sign + // so replace "/hostedtoolcache/Java/11.0.3-4/x64" to "/hostedtoolcache/Java/11.0.3+4/x64" when retrieves to cache + // related issue: https://github.com/actions/virtual-environments/issues/3014 + .replace('-', '+'), + path: (0, util_1.getToolcachePath)(this.toolcacheFolderName, item, this.architecture) || '', + stable: !item.includes('-ea') + }; + }) + .filter(item => item.stable === this.stable); + const satisfiedVersions = availableVersions + .filter(item => (0, util_1.isVersionSatisfies)(this.version, item.version)) + .filter(item => item.path) + .sort((a, b) => { + return -semver_1.default.compareBuild(a.version, b.version); + }); + if (!satisfiedVersions || satisfiedVersions.length === 0) { + return null; + } + return { + version: satisfiedVersions[0].version, + path: satisfiedVersions[0].path + }; } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null + normalizeVersion(version) { + let stable = true; + if (version.endsWith('-ea')) { + version = version.replace(/-ea$/, ''); + stable = false; + } + else if (version.includes('-ea.')) { + // transform '11.0.3-ea.2' -> '11.0.3+2' + version = version.replace('-ea.', '+'); + stable = false; + } + if (!semver_1.default.validRange(version)) { + throw new Error(`The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information`); + } + return { + version, + stable + }; } - } - - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) + setJavaDefault(version, toolPath) { + const majorVersion = version.split('.')[0]; + core.exportVariable('JAVA_HOME', toolPath); + core.addPath(path_1.default.join(toolPath, 'bin')); + core.setOutput('distribution', this.distribution); + core.setOutput('path', toolPath); + core.setOutput('version', version); + core.exportVariable(`JAVA_HOME_${majorVersion}_${this.architecture.toUpperCase()}`, toolPath); } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null + distributionArchitecture() { + // default mappings of config architectures to distribution architectures + // override if a distribution uses any different names; see liberica for an example + // node's os.arch() - which this defaults to - can return any of: + // 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', and 'x64' + // so we need to map these to java distribution architectures + // 'amd64' is included here too b/c it's a common alias for 'x64' people might use explicitly + switch (this.architecture) { + case 'amd64': + return 'x64'; + case 'ia32': + return 'x86'; + case 'arm64': + return 'aarch64'; + default: + return this.architecture; + } } - } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader } +exports.JavaBase = JavaBase; /***/ }), -/***/ 55504: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 34750: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const { webidl } = __nccwpck_require__(21744) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) - - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CorrettoDistribution = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const util_1 = __nccwpck_require__(92629); +const base_installer_1 = __nccwpck_require__(59741); +class CorrettoDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Corretto', installerOptions); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + if (!this.stable) { + throw new Error('Early access versions are not supported'); + } + if (version.includes('.')) { + throw new Error('Only major versions are supported'); + } + const availableVersions = yield this.getAvailableVersions(); + const matchingVersions = availableVersions + .filter(item => item.version == version) + .map(item => { + return { + version: (0, util_1.convertVersionToSemver)(item.correttoVersion), + url: item.downloadLink + }; + }); + const resolvedVersion = matchingVersions.length > 0 ? matchingVersions[0] : null; + if (!resolvedVersion) { + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); + } + return resolvedVersion; + }); + } + getAvailableVersions() { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + const imageType = this.packageType; + if (core.isDebug()) { + console.time('Retrieving available versions for Corretto took'); // eslint-disable-line no-console + } + const availableVersionsUrl = 'https://corretto.github.io/corretto-downloads/latest_links/indexmap_with_checksum.json'; + const fetchCurrentVersions = yield this.http.getJson(availableVersionsUrl); + const fetchedCurrentVersions = fetchCurrentVersions.result; + if (!fetchedCurrentVersions) { + throw Error(`Could not fetch latest corretto versions from ${availableVersionsUrl}`); + } + const eligibleVersions = (_b = (_a = fetchedCurrentVersions === null || fetchedCurrentVersions === void 0 ? void 0 : fetchedCurrentVersions[platform]) === null || _a === void 0 ? void 0 : _a[arch]) === null || _b === void 0 ? void 0 : _b[imageType]; + const availableVersions = this.getAvailableVersionsForPlatform(eligibleVersions); + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Corretto took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions + .map(item => `${item.version}: ${item.correttoVersion}`) + .join(', ')); + core.endGroup(); + } + return availableVersions; + }); + } + getAvailableVersionsForPlatform(eligibleVersions) { + const availableVersions = []; + for (const version in eligibleVersions) { + const availableVersion = eligibleVersions[version]; + for (const fileType in availableVersion) { + const skipNonExtractableBinaries = fileType != (0, util_1.getDownloadArchiveExtension)(); + if (skipNonExtractableBinaries) { + continue; + } + const availableVersionDetails = availableVersion[fileType]; + const correttoVersion = this.getCorrettoVersion(availableVersionDetails.resource); + availableVersions.push({ + checksum: availableVersionDetails.checksum, + checksum_sha256: availableVersionDetails.checksum_sha256, + fileType, + resource: availableVersionDetails.resource, + downloadLink: `https://corretto.aws${availableVersionDetails.resource}`, + version: version, + correttoVersion + }); + } + } + return availableVersions; + } + getPlatformOption() { + // Corretto has its own platform names so we need to map them + switch (process.platform) { + case 'darwin': + return 'macos'; + case 'win32': + return 'windows'; + default: + return process.platform; + } + } + getCorrettoVersion(resource) { + const regex = /(\d+.+)\//; + const match = regex.exec(resource); + if (match === null) { + throw Error(`Could not parse corretto version from ${resource}`); + } + return match[1]; } - } - - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total - } -} - -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: false - } -]) - -module.exports = { - ProgressEvent } +exports.CorrettoDistribution = CorrettoDistribution; /***/ }), -/***/ 29054: -/***/ ((module) => { +/***/ 10924: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -module.exports = { - kState: Symbol('FileReader state'), - kResult: Symbol('FileReader result'), - kError: Symbol('FileReader error'), - kLastProgressEventFired: Symbol('FileReader last progress event fired timestamp'), - kEvents: Symbol('FileReader events'), - kAborted: Symbol('FileReader aborted') +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getJavaDistribution = void 0; +const installer_1 = __nccwpck_require__(19917); +const installer_2 = __nccwpck_require__(82005); +const installer_3 = __nccwpck_require__(68766); +const installer_4 = __nccwpck_require__(18579); +const installer_5 = __nccwpck_require__(40883); +const installer_6 = __nccwpck_require__(73613); +const installer_7 = __nccwpck_require__(41121); +const installer_8 = __nccwpck_require__(34750); +const installer_9 = __nccwpck_require__(64298); +const installer_10 = __nccwpck_require__(16132); +const installer_11 = __nccwpck_require__(52869); +const installer_12 = __nccwpck_require__(55644); +const installer_13 = __nccwpck_require__(12634); +var JavaDistribution; +(function (JavaDistribution) { + JavaDistribution["Adopt"] = "adopt"; + JavaDistribution["AdoptHotspot"] = "adopt-hotspot"; + JavaDistribution["AdoptOpenJ9"] = "adopt-openj9"; + JavaDistribution["Temurin"] = "temurin"; + JavaDistribution["Zulu"] = "zulu"; + JavaDistribution["Liberica"] = "liberica"; + JavaDistribution["JdkFile"] = "jdkfile"; + JavaDistribution["Microsoft"] = "microsoft"; + JavaDistribution["Semeru"] = "semeru"; + JavaDistribution["Corretto"] = "corretto"; + JavaDistribution["Oracle"] = "oracle"; + JavaDistribution["Dragonwell"] = "dragonwell"; + JavaDistribution["SapMachine"] = "sapmachine"; + JavaDistribution["GraalVM"] = "graalvm"; + JavaDistribution["JetBrains"] = "jetbrains"; +})(JavaDistribution || (JavaDistribution = {})); +function getJavaDistribution(distributionName, installerOptions, jdkFile) { + switch (distributionName) { + case JavaDistribution.JdkFile: + return new installer_1.LocalDistribution(installerOptions, jdkFile); + case JavaDistribution.Adopt: + case JavaDistribution.AdoptHotspot: + return new installer_3.AdoptDistribution(installerOptions, installer_3.AdoptImplementation.Hotspot); + case JavaDistribution.AdoptOpenJ9: + return new installer_3.AdoptDistribution(installerOptions, installer_3.AdoptImplementation.OpenJ9); + case JavaDistribution.Temurin: + return new installer_4.TemurinDistribution(installerOptions, installer_4.TemurinImplementation.Hotspot); + case JavaDistribution.Zulu: + return new installer_2.ZuluDistribution(installerOptions); + case JavaDistribution.Liberica: + return new installer_5.LibericaDistributions(installerOptions); + case JavaDistribution.Microsoft: + return new installer_6.MicrosoftDistributions(installerOptions); + case JavaDistribution.Semeru: + return new installer_7.SemeruDistribution(installerOptions); + case JavaDistribution.Corretto: + return new installer_8.CorrettoDistribution(installerOptions); + case JavaDistribution.Oracle: + return new installer_9.OracleDistribution(installerOptions); + case JavaDistribution.Dragonwell: + return new installer_10.DragonwellDistribution(installerOptions); + case JavaDistribution.SapMachine: + return new installer_11.SapMachineDistribution(installerOptions); + case JavaDistribution.GraalVM: + return new installer_12.GraalVMDistribution(installerOptions); + case JavaDistribution.JetBrains: + return new installer_13.JetBrainsDistribution(installerOptions); + default: + return null; + } } +exports.getJavaDistribution = getJavaDistribution; /***/ }), -/***/ 87530: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 16132: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(29054) -const { ProgressEvent } = __nccwpck_require__(55504) -const { getEncoding } = __nccwpck_require__(84854) -const { DOMException } = __nccwpck_require__(41037) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(685) -const { types } = __nccwpck_require__(73837) -const { StringDecoder } = __nccwpck_require__(71576) -const { btoa } = __nccwpck_require__(14300) - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -/** - * @see https://w3c.github.io/FileAPI/#readOperation - * @param {import('./filereader').FileReader} fr - * @param {import('buffer').Blob} blob - * @param {string} type - * @param {string?} encodingName - */ -function readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[kError] = null - - // 5. Let stream be the result of calling get stream on blob. - /** @type {import('stream/web').ReadableStream} */ - const stream = blob.stream() - - // 6. Let reader be the result of getting a reader from stream. - const reader = stream.getReader() - - // 7. Let bytes be an empty byte sequence. - /** @type {Uint8Array[]} */ - const bytes = [] - - // 8. Let chunkPromise be the result of reading a chunk from - // stream with reader. - let chunkPromise = reader.read() - - // 9. Let isFirstChunk be true. - let isFirstChunk = true - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, value } = await chunkPromise - - // 2. If chunkPromise is fulfilled, and isFirstChunk is - // true, queue a task to fire a progress event called - // loadstart at fr. - if (isFirstChunk && !fr[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) - } - - // 3. Set isFirstChunk to false. - isFirstChunk = false - - // 4. If chunkPromise is fulfilled with an object whose - // done property is false and whose value property is - // a Uint8Array object, run these steps: - if (!done && types.isUint8Array(value)) { - // 1. Let bs be the byte sequence represented by the - // Uint8Array object. - - // 2. Append bs to bytes. - bytes.push(value) - - // 3. If roughly 50ms have passed since these steps - // were last invoked, queue a task to fire a - // progress event called progress at fr. - if ( - ( - fr[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - fireAProgressEvent('progress', fr) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DragonwellDistribution = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +class DragonwellDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Dragonwell', installerOptions); + } + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + if (!this.stable) { + throw new Error('Early access versions are not supported by Dragonwell'); + } + if (this.packageType !== 'jdk') { + throw new Error('Dragonwell provides only the `jdk` package type'); + } + const availableVersions = yield this.getAvailableVersions(); + const matchedVersions = availableVersions + .filter(item => { + return (0, util_1.isVersionSatisfies)(version, item.jdk_version); }) - } - - // 4. Set chunkPromise to the result of reading a - // chunk from stream with reader. - chunkPromise = reader.read() - } else if (done) { - // 5. Otherwise, if chunkPromise is fulfilled with an - // object whose done property is true, queue a task - // to run the following steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) + .map(item => { + return { + version: item.jdk_version, + url: item.download_link + }; + }); + if (!matchedVersions.length) { + throw new Error(`Couldn't find any satisfied version for the specified java-version: "${version}" and architecture: "${this.architecture}".`); } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) + const resolvedVersion = matchedVersions[0]; + return resolvedVersion; + }); + } + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + let fetchedDragonwellJson = yield this.fetchJsonFromPrimaryUrl(); + if (!fetchedDragonwellJson) { + fetchedDragonwellJson = yield this.fetchJsonFromBackupUrl(); } - }) - - break - } - } catch (error) { - if (fr[kAborted]) { - return - } - - // 6. Otherwise, if chunkPromise is rejected with an - // error error, queue a task to run the following - // steps and abort this algorithm: - queueMicrotask(() => { - // 1. Set fr’s state to "done". - fr[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) - } - }) - - break - } + if (!fetchedDragonwellJson) { + throw new Error(`Couldn't fetch Dragonwell versions information from both primary and backup urls`); + } + core.debug('Successfully fetched information about available Dragonwell versions'); + const availableVersions = this.parseVersions(platform, arch, fetchedDragonwellJson); + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + core.debug(availableVersions.map(item => item.jdk_version).join(', ')); + core.endGroup(); + } + return availableVersions; + }); } - })() -} - -/** - * @see https://w3c.github.io/FileAPI/#fire-a-progress-event - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e The name of the event - * @param {import('./filereader').FileReader} reader - */ -function fireAProgressEvent (e, reader) { - // The progress event e does not bubble. e.bubbles must be false - // The progress event e is NOT cancelable. e.cancelable must be false - const event = new ProgressEvent(e, { - bubbles: false, - cancelable: false - }) - - reader.dispatchEvent(event) -} - -/** - * @see https://w3c.github.io/FileAPI/#blob-package-data - * @param {Uint8Array[]} bytes - * @param {string} type - * @param {string?} mimeType - * @param {string?} encodingName - */ -function packageData (bytes, type, mimeType, encodingName) { - // 1. A Blob has an associated package data algorithm, given - // bytes, a type, a optional mimeType, and a optional - // encodingName, which switches on type and runs the - // associated steps: - - switch (type) { - case 'DataURL': { - // 1. Return bytes as a DataURL [RFC2397] subject to - // the considerations below: - // * Use mimeType as part of the Data URL if it is - // available in keeping with the Data URL - // specification [RFC2397]. - // * If mimeType is not available return a Data URL - // without a media-type. [RFC2397]. - - // https://datatracker.ietf.org/doc/html/rfc2397#section-3 - // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data - // mediatype := [ type "/" subtype ] *( ";" parameter ) - // data := *urlchar - // parameter := attribute "=" value - let dataURL = 'data:' - - const parsed = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) - } - - dataURL += btoa(decoder.end()) - - return dataURL + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + parseVersions(platform, arch, dragonwellVersions) { + var _a; + const eligibleVersions = []; + for (const majorVersion in dragonwellVersions) { + const majorVersionMap = dragonwellVersions[majorVersion]; + for (let jdkVersion in majorVersionMap) { + const jdkVersionMap = majorVersionMap[jdkVersion]; + if (!(platform in jdkVersionMap)) { + continue; + } + const platformMap = jdkVersionMap[platform]; + if (!(arch in platformMap)) { + continue; + } + const archMap = platformMap[arch]; + if (jdkVersion === 'latest') { + continue; + } + // Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits). + // Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools. + const jdkVersionNums = jdkVersion + .replace('+', '.') + .split('.'); + jdkVersion = (0, util_1.convertVersionToSemver)(`${jdkVersionNums.slice(0, 3).join('.')}.${jdkVersionNums[jdkVersionNums.length - 1]}`); + for (const edition in archMap) { + eligibleVersions.push({ + os: platform, + architecture: arch, + jdk_version: jdkVersion, + checksum: (_a = archMap[edition].sha256) !== null && _a !== void 0 ? _a : '', + download_link: archMap[edition].download_url, + edition: edition, + image_type: 'jdk' + }); + break; // Get the first available link to the JDK. In most cases it should point to the Extended version of JDK, in rare cases like with v17 it points to the Standard version (the only available). + } + } + } + const sortedVersions = this.sortParsedVersions(eligibleVersions); + return sortedVersions; } - case 'Text': { - // 1. Let encoding be failure - let encoding = 'failure' - - // 2. If the encodingName is present, set encoding to the - // result of getting an encoding from encodingName. - if (encodingName) { - encoding = getEncoding(encodingName) - } - - // 3. If encoding is failure, and mimeType is present: - if (encoding === 'failure' && mimeType) { - // 1. Let type be the result of parse a MIME type - // given mimeType. - const type = parseMIMEType(mimeType) - - // 2. If type is not failure, set encoding to the result - // of getting an encoding from type’s parameters["charset"]. - if (type !== 'failure') { - encoding = getEncoding(type.parameters.get('charset')) + // Sorts versions in descending order as by default data in JSON isn't sorted + sortParsedVersions(eligibleVersions) { + const sortedVersions = eligibleVersions.sort((versionObj1, versionObj2) => { + const version1 = versionObj1.jdk_version; + const version2 = versionObj2.jdk_version; + return semver_1.default.compareBuild(version1, version2); + }); + return sortedVersions.reverse(); + } + getPlatformOption() { + switch (process.platform) { + case 'win32': + return 'windows'; + default: + return process.platform; } - } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' - } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = combineByteSequences(bytes) - - return sequence.buffer + fetchJsonFromPrimaryUrl() { + return __awaiter(this, void 0, void 0, function* () { + const primaryUrl = 'https://dragonwell-jdk.io/map_with_checksum.json'; + try { + core.debug(`Trying to fetch available Dragonwell versions info from the primary url: ${primaryUrl}`); + const fetchedDragonwellJson = (yield this.http.getJson(primaryUrl)).result; + return fetchedDragonwellJson; + } + catch (err) { + core.debug(`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${err.message}`); + return null; + } + }); } - case 'BinaryString': { - // Return bytes as a binary string, in which every byte - // is represented by a code unit of equal value [0..255]. - let binaryString = '' - - const decoder = new StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) - } - - binaryString += decoder.end() - - return binaryString + fetchJsonFromBackupUrl() { + return __awaiter(this, void 0, void 0, function* () { + const owner = 'dragonwell-releng'; + const repository = 'dragonwell-setup-java'; + const branch = 'main'; + const filePath = 'releases.json'; + const backupUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; + const headers = (0, util_1.getGitHubHttpHeaders)(); + try { + core.debug(`Trying to fetch available Dragonwell versions info from the backup url: ${backupUrl}`); + const fetchedDragonwellJson = (yield this.http.getJson(backupUrl, headers)).result; + return fetchedDragonwellJson; + } + catch (err) { + core.debug(`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${err.message}`); + return null; + } + }); } - } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = BOMSniffing(bytes) - - let slice = 0 - - // 2. If BOMEncoding is non-null: - if (BOMEncoding !== null) { - // 1. Set encoding to BOMEncoding. - encoding = BOMEncoding - - // 2. Read three bytes from ioQueue, if BOMEncoding is - // UTF-8; otherwise read two bytes. - // (Do nothing with those bytes.) - slice = BOMEncoding === 'UTF-8' ? 3 : 2 - } - - // 3. Process a queue with an instance of encoding’s - // decoder, ioQueue, output, and "replacement". - - // 4. Return output. - - const sliced = bytes.slice(slice) - return new TextDecoder(encoding).decode(sliced) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function BOMSniffing (ioQueue) { - // 1. Let BOM be the result of peeking 3 bytes from ioQueue, - // converted to a byte sequence. - const [a, b, c] = ioQueue - - // 2. For each of the rows in the table below, starting with - // the first one and going down, if BOM starts with the - // bytes given in the first column, then return the - // encoding given in the cell in the second column of that - // row. Otherwise, return null. - if (a === 0xEF && b === 0xBB && c === 0xBF) { - return 'UTF-8' - } else if (a === 0xFE && b === 0xFF) { - return 'UTF-16BE' - } else if (a === 0xFF && b === 0xFE) { - return 'UTF-16LE' - } - - return null -} - -/** - * @param {Uint8Array[]} sequences - */ -function combineByteSequences (sequences) { - const size = sequences.reduce((a, b) => { - return a + b.byteLength - }, 0) - - let offset = 0 - - return sequences.reduce((a, b) => { - a.set(b, offset) - offset += b.byteLength - return a - }, new Uint8Array(size)) -} - -module.exports = { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent } +exports.DragonwellDistribution = DragonwellDistribution; /***/ }), -/***/ 21892: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 55644: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -// We include a version number for the Dispatcher API. In case of breaking changes, -// this version number must be increased to avoid conflicts. -const globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(48045) -const Agent = __nccwpck_require__(7890) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GraalVMDistribution = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const base_installer_1 = __nccwpck_require__(59741); +const http_client_1 = __nccwpck_require__(96255); +const util_1 = __nccwpck_require__(92629); +const GRAALVM_DL_BASE = 'https://download.oracle.com/graalvm'; +const IS_WINDOWS = process.platform === 'win32'; +const GRAALVM_PLATFORM = IS_WINDOWS ? 'windows' : process.platform; +const GRAALVM_MIN_VERSION = 17; +const SUPPORTED_ARCHITECTURES = ['x64', 'aarch64']; +class GraalVMDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('GraalVM', installerOptions); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + try { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (IS_WINDOWS) { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + // Add validation for extracted path + if (!fs_1.default.existsSync(extractedJavaPath)) { + throw new Error(`Extraction failed: path ${extractedJavaPath} does not exist`); + } + const dirContents = fs_1.default.readdirSync(extractedJavaPath); + if (dirContents.length === 0) { + throw new Error('Extraction failed: no files found in extracted directory'); + } + const archivePath = path_1.default.join(extractedJavaPath, dirContents[0]); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + } + catch (error) { + core.error(`Failed to download and extract GraalVM: ${error}`); + throw error; + } + }); + } + findPackageForDownload(range) { + return __awaiter(this, void 0, void 0, function* () { + // Add input validation + if (!range || typeof range !== 'string') { + throw new Error('Version range is required and must be a string'); + } + const arch = this.distributionArchitecture(); + if (!SUPPORTED_ARCHITECTURES.includes(arch)) { + throw new Error(`Unsupported architecture: ${this.architecture}. Supported architectures are: ${SUPPORTED_ARCHITECTURES.join(', ')}`); + } + if (!this.stable) { + return this.findEABuildDownloadUrl(`${range}-ea`); + } + if (this.packageType !== 'jdk') { + throw new Error('GraalVM provides only the `jdk` package type'); + } + const platform = this.getPlatform(); + const extension = (0, util_1.getDownloadArchiveExtension)(); + const major = range.includes('.') ? range.split('.')[0] : range; + const majorVersion = parseInt(major); + if (isNaN(majorVersion)) { + throw new Error(`Invalid version format: ${range}`); + } + if (majorVersion < GRAALVM_MIN_VERSION) { + throw new Error(`GraalVM is only supported for JDK ${GRAALVM_MIN_VERSION} and later. Requested version: ${major}`); + } + const fileUrl = this.constructFileUrl(range, major, platform, arch, extension); + const response = yield this.http.head(fileUrl); + this.handleHttpResponse(response, range); + return { url: fileUrl, version: range }; + }); + } + constructFileUrl(range, major, platform, arch, extension) { + return range.includes('.') + ? `${GRAALVM_DL_BASE}/${major}/archive/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}` + : `${GRAALVM_DL_BASE}/${range}/latest/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + handleHttpResponse(response, range) { + const statusCode = response.message.statusCode; + if (statusCode === http_client_1.HttpCodes.NotFound) { + throw new Error(`Could not find GraalVM for SemVer ${range}. Please check if this version is available at ${GRAALVM_DL_BASE}`); + } + if (statusCode === http_client_1.HttpCodes.Unauthorized || + statusCode === http_client_1.HttpCodes.Forbidden) { + throw new Error(`Access denied when downloading GraalVM. Status code: ${statusCode}. Please check your credentials or permissions.`); + } + if (statusCode !== http_client_1.HttpCodes.OK) { + throw new Error(`HTTP request for GraalVM failed with status code: ${statusCode} (${response.message.statusMessage || 'Unknown error'})`); + } + } + findEABuildDownloadUrl(javaEaVersion) { + return __awaiter(this, void 0, void 0, function* () { + core.debug(`Searching for EA build: ${javaEaVersion}`); + const versions = yield this.fetchEAJson(javaEaVersion); + core.debug(`Found ${versions.length} EA versions`); + const latestVersion = versions.find(v => v.latest); + if (!latestVersion) { + core.error(`Available versions: ${versions.map(v => v.version).join(', ')}`); + throw new Error(`Unable to find latest version for '${javaEaVersion}'`); + } + core.debug(`Latest version found: ${latestVersion.version}`); + const arch = this.distributionArchitecture(); + const file = latestVersion.files.find(f => f.arch === arch && f.platform === GRAALVM_PLATFORM); + if (!file) { + core.error(`Available files for architecture ${arch}: ${JSON.stringify(latestVersion.files)}`); + throw new Error(`Unable to find file for architecture '${arch}' and platform '${GRAALVM_PLATFORM}'`); + } + if (!file.filename.startsWith('graalvm-jdk-')) { + throw new Error(`Invalid filename format: ${file.filename}. Expected to start with 'graalvm-jdk-'`); + } + const downloadUrl = `${latestVersion.download_base_url}${file.filename}`; + core.debug(`Download URL: ${downloadUrl}`); + return { + url: downloadUrl, + version: latestVersion.version + }; + }); + } + fetchEAJson(javaEaVersion) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const url = `https://api.github.com/repos/graalvm/oracle-graalvm-ea-builds/contents/versions/${javaEaVersion}.json?ref=main`; + const headers = (0, util_1.getGitHubHttpHeaders)(); + core.debug(`Trying to fetch available version info for GraalVM EA builds from '${url}'`); + try { + const response = yield this.http.getJson(url, headers); + if (!response.result) { + throw new Error(`No GraalVM EA build found for version '${javaEaVersion}'. Please check if the version is correct.`); + } + return response.result; + } + catch (error) { + if (error instanceof Error) { + // Check if it's a 404 error (file not found) + if ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('404')) { + throw new Error(`GraalVM EA version '${javaEaVersion}' not found. Please verify the version exists in the EA builds repository.`); + } + // Re-throw with more context + throw new Error(`Failed to fetch GraalVM EA version information for '${javaEaVersion}': ${error.message}`); + } + // If it's not an Error instance, throw a generic error + throw new Error(`Failed to fetch GraalVM EA version information for '${javaEaVersion}'`); + } + }); + } + getPlatform(platform = process.platform) { + const platformMap = { + darwin: 'macos', + win32: 'windows', + linux: 'linux' + }; + const result = platformMap[platform]; + if (!result) { + throw new Error(`Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'`); + } + return result; + } } +exports.GraalVMDistribution = GraalVMDistribution; /***/ }), -/***/ 46930: -/***/ ((module) => { +/***/ 12634: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -module.exports = class DecoratorHandler { - constructor (handler) { - this.handler = handler - } - - onConnect (...args) { - return this.handler.onConnect(...args) - } - - onError (...args) { - return this.handler.onError(...args) - } - - onUpgrade (...args) { - return this.handler.onUpgrade(...args) - } - - onHeaders (...args) { - return this.handler.onHeaders(...args) - } - - onData (...args) { - return this.handler.onData(...args) - } - - onComplete (...args) { - return this.handler.onComplete(...args) - } - - onBodySent (...args) { - return this.handler.onBodySent(...args) - } +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.JetBrainsDistribution = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +const http_client_1 = __nccwpck_require__(96255); +class JetBrainsDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('JetBrains', installerOptions); + } + findPackageForDownload(range) { + return __awaiter(this, void 0, void 0, function* () { + const versionsRaw = yield this.getAvailableVersions(); + const versions = versionsRaw.map(v => { + const formattedVersion = `${v.semver}+${v.build}`; + return { + version: formattedVersion, + url: v.url + }; + }); + const satisfiedVersions = versions + .filter(item => (0, util_1.isVersionSatisfies)(range, item.version)) + .sort((a, b) => { + return -semver_1.default.compareBuild(a.version, b.version); + }); + const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = versionsRaw + .map(item => `${item.tag_name} (${item.semver}+${item.build})`) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for SemVer '${range}'. ${availableOptionsMessage}`); + } + return resolvedFullVersion; + }); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + const javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, 'tar.gz'); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + if (core.isDebug()) { + console.time('Retrieving available versions for JBR took'); // eslint-disable-line no-console + } + // need to iterate through all pages to retrieve the list of all versions + // GitHub API doesn't provide way to retrieve the count of pages to iterate so infinity loop + let page_index = 1; + const rawVersions = []; + const bearerToken = process.env.GITHUB_TOKEN; + while (true) { + const requestArguments = `per_page=100&page=${page_index}`; + const requestHeaders = {}; + if (bearerToken) { + requestHeaders['Authorization'] = `Bearer ${bearerToken}`; + } + const rawUrl = `https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases?${requestArguments}`; + if (core.isDebug() && page_index === 1) { + // url is identical except page_index so print it once for debug + core.debug(`Gathering available versions from '${rawUrl}'`); + } + const paginationPageResult = (yield this.http.getJson(rawUrl, requestHeaders)).result; + if (!paginationPageResult || paginationPageResult.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + const paginationPage = paginationPageResult.filter(version => this.stable ? !version.prerelease : version.prerelease); + if (!paginationPage || paginationPage.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + rawVersions.push(...paginationPage); + page_index++; + } + if (this.stable) { + // Add versions not available from the API but are downloadable + const hidden = ['11_0_10b1145.115', '11_0_11b1341.60']; + rawVersions.push(...hidden.map(tag => ({ tag_name: tag, name: tag, prerelease: false }))); + } + const versions0 = rawVersions.map((v) => __awaiter(this, void 0, void 0, function* () { + var _a; + // Release tags look like one of these: + // jbr-release-21.0.3b465.3 + // jbr17-b87.7 + // jb11_0_11-b87.7 + // jbr11_0_15b2043.56 + // 11_0_11b1536.2 + // 11_0_11-b1522 + const tag = v.tag_name; + // Extract version string + const vstring = tag + .replace('jbr-release-', '') + .replace('jbr', '') + .replace('jb', '') + .replace('-', ''); + const vsplit = vstring.split('b'); + let semver = vsplit[0]; + const build = vsplit[1]; + // Normalize semver + if (!semver.includes('.') && !semver.includes('_')) + semver = `${semver}.0.0`; + // Construct URL + let type; + switch ((_a = this.packageType) !== null && _a !== void 0 ? _a : '') { + case 'jre': + type = 'jbr'; + break; + case 'jdk+jcef': + type = 'jbrsdk_jcef'; + break; + case 'jre+jcef': + type = 'jbr_jcef'; + break; + case 'jdk+ft': + type = 'jbrsdk_ft'; + break; + case 'jre+ft': + type = 'jbr_ft'; + break; + default: + type = 'jbrsdk'; + break; + } + let url = `https://cache-redirector.jetbrains.com/intellij-jbr/${type}-${semver}-${platform}-${arch}-b${build}.tar.gz`; + let include = false; + const res = yield this.http.head(url); + if (res.message.statusCode === http_client_1.HttpCodes.OK) { + include = true; + } + else { + url = `https://cache-redirector.jetbrains.com/intellij-jbr/${type}_nomod-${semver}-${platform}-${arch}-b${build}.tar.gz`; + const res2 = yield this.http.head(url); + if (res2.message.statusCode === http_client_1.HttpCodes.OK) { + include = true; + } + } + const version = { + tag_name: tag, + semver: semver.replace(/_/g, '.'), + build: build, + url: url + }; + return { + item: version, + include: include + }; + })); + const versions = yield Promise.all(versions0).then(res => res.filter(item => item.include).map(item => item.item)); + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for JBR took'); // eslint-disable-line no-console + core.debug(`Available versions: [${versions.length}]`); + core.debug(versions.map(item => item.semver).join(', ')); + core.endGroup(); + } + return versions; + }); + } + getPlatformOption() { + // Jetbrains has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'osx'; + case 'win32': + return 'windows'; + default: + return process.platform; + } + } } +exports.JetBrainsDistribution = JetBrainsDistribution; /***/ }), -/***/ 72860: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 40883: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const util = __nccwpck_require__(83983) -const { kBodyUsed } = __nccwpck_require__(72785) -const assert = __nccwpck_require__(39491) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const EE = __nccwpck_require__(82361) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') - -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false - } - - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] - } -} - -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - - util.validateHandler(handler, opts.method, opts.upgrade) - - this.dispatch = dispatch - this.location = null - this.abort = null - this.opts = { ...opts, maxRedirections: 0 } // opts must be a copy - this.maxRedirections = maxRedirections - this.handler = handler - this.history = [] - - if (util.isStream(this.opts.body)) { - // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp - // so that it can be dispatched again? - // TODO (fix): Do we need 100-expect support to provide a way to do this properly? - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) - } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) - } - } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { - // TODO (fix): We can't access ReadableStream internal state - // to determine whether or not it has been disturbed. This is just - // a workaround. - this.opts.body = new BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LibericaDistributions = void 0; +const base_installer_1 = __nccwpck_require__(59741); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const util_1 = __nccwpck_require__(92629); +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const supportedPlatform = `'linux', 'linux-musl', 'macos', 'solaris', 'windows'`; +const supportedArchitectures = `'x86', 'x64', 'armv7', 'aarch64', 'ppc64le'`; +class LibericaDistributions extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Liberica', installerOptions); } - } - - onConnect (abort) { - this.abort = abort - this.handler.onConnect(abort, { history: this.history }) - } - - onUpgrade (statusCode, headers, socket) { - this.handler.onUpgrade(statusCode, headers, socket) - } - - onError (error) { - this.handler.onError(error) - } - - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) + findPackageForDownload(range) { + return __awaiter(this, void 0, void 0, function* () { + const availableVersionsRaw = yield this.getAvailableVersions(); + const availableVersions = availableVersionsRaw.map(item => ({ + url: item.downloadUrl, + version: this.convertVersionToSemver(item) + })); + const satisfiedVersion = availableVersions + .filter(item => (0, util_1.isVersionSatisfies)(range, item.version)) + .sort((a, b) => -semver_1.default.compareBuild(a.version, b.version))[0]; + if (!satisfiedVersion) { + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for semver ${range}. ${availableOptionsMessage}`); + } + return satisfiedVersion; + }); } - - const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))) - const path = search ? `${pathname}${search}` : pathname - - // Remove headers referring to the original URL. - // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. - // https://tools.ietf.org/html/rfc7231#section-6.4 - this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin) - this.opts.path = path - this.opts.origin = origin - this.opts.maxRedirections = 0 - this.opts.query = null - - // https://tools.ietf.org/html/rfc7231#section-6.4.4 - // In case of HTTP 303, always replace method to be either HEAD or GET - if (statusCode === 303 && this.opts.method !== 'HEAD') { - this.opts.method = 'GET' - this.opts.body = null + getAvailableVersions() { + var _a; + return __awaiter(this, void 0, void 0, function* () { + if (core.isDebug()) { + console.time('Retrieving available versions for Liberica took'); // eslint-disable-line no-console + } + const url = this.prepareAvailableVersionsUrl(); + core.debug(`Gathering available versions from '${url}'`); + const availableVersions = (_a = (yield this.http.getJson(url)).result) !== null && _a !== void 0 ? _a : []; + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Liberica took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version).join(', ')); + core.endGroup(); + } + return availableVersions; + }); } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitily chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) + prepareAvailableVersionsUrl() { + const urlOptions = Object.assign(Object.assign({ os: this.getPlatformOption(), 'bundle-type': this.getBundleType() }, this.getArchitectureOptions()), { 'build-type': this.stable ? 'all' : 'ea', 'installation-type': 'archive', fields: 'downloadUrl,version,featureVersion,interimVersion,updateVersion,buildVersion' }); + const searchParams = new URLSearchParams(urlOptions).toString(); + return `https://api.bell-sw.com/v1/liberica/releases?${searchParams}`; } - } - - onComplete (trailers) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections - and neither are useful if present. - - See comment on onData method above for more detailed informations. - */ - - this.location = null - this.abort = null - - this.dispatch(this.opts, this) - } else { - this.handler.onComplete(trailers) + getBundleType() { + const [bundleType, feature] = this.packageType.split('+'); + if (feature === null || feature === void 0 ? void 0 : feature.includes('fx')) { + return bundleType + '-full'; + } + return bundleType; } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) + getArchitectureOptions() { + const arch = this.distributionArchitecture(); + switch (arch) { + case 'x86': + return { bitness: '32', arch: 'x86' }; + case 'x64': + return { bitness: '64', arch: 'x86' }; + case 'armv7': + return { bitness: '32', arch: 'arm' }; + case 'aarch64': + return { bitness: '64', arch: 'arm' }; + case 'ppc64le': + return { bitness: '64', arch: 'ppc' }; + default: + throw new Error(`Architecture '${this.architecture}' is not supported. Supported architectures: ${supportedArchitectures}`); + } } - } -} - -function parseLocation (statusCode, headers) { - if (redirectableStatusCodes.indexOf(statusCode) === -1) { - return null - } - - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toString().toLowerCase() === 'location') { - return headers[i + 1] + getPlatformOption(platform = process.platform) { + switch (platform) { + case 'darwin': + return 'macos'; + case 'win32': + case 'cygwin': + return 'windows'; + case 'linux': + return 'linux'; + case 'sunos': + return 'solaris'; + default: + throw new Error(`Platform '${platform}' is not supported. Supported platforms: ${supportedPlatform}`); + } } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - return ( - (header.length === 4 && header.toString().toLowerCase() === 'host') || - (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) || - (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') || - (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') - ) -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) - } + convertVersionToSemver(version) { + const { buildVersion, featureVersion, interimVersion, updateVersion } = version; + const mainVersion = [featureVersion, interimVersion, updateVersion].join('.'); + if (buildVersion != 0) { + return `${mainVersion}+${buildVersion}`; + } + return mainVersion; } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) - } + distributionArchitecture() { + const arch = super.distributionArchitecture(); + switch (arch) { + case 'arm': + return 'armv7'; + default: + return arch; + } } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret } - -module.exports = RedirectHandler +exports.LibericaDistributions = LibericaDistributions; /***/ }), -/***/ 82286: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(39491) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(72785) -const { RequestRetryError } = __nccwpck_require__(48045) -const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(83983) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - const diff = new Date(retryAfter).getTime() - current - - return diff -} +/***/ 19917: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} +"use strict"; - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = dispatchOpts - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - timeout: minTimeout ?? 500, // .5s - timeoutFactor: timeoutFactor ?? 2, - maxRetries: maxRetries ?? 5, - // What errors we should retry - methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], - // Indicates which errors to retry - statusCodes: statusCodes ?? [500, 502, 503, 504, 429], - // List of errors to retry - errorCodes: errorCodes ?? [ - 'ECONNRESET', - 'ECONNREFUSED', - 'ENOTFOUND', - 'ENETDOWN', - 'ENETUNREACH', - 'EHOSTDOWN', - 'EHOSTUNREACH', - 'EPIPE' - ] +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - - this.retryCount = 0 - this.start = 0 - this.end = null - this.etag = null - this.resume = null - - // Handle possible onConnect duplication - this.handler.onConnect(reason => { - this.aborted = true - if (this.abort) { - this.abort(reason) - } else { - this.reason = reason - } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LocalDistribution = void 0; +const tc = __importStar(__nccwpck_require__(27784)); +const core = __importStar(__nccwpck_require__(42186)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +const constants_1 = __nccwpck_require__(69042); +class LocalDistribution extends base_installer_1.JavaBase { + constructor(installerOptions, jdkFile) { + super('jdkfile', installerOptions); + this.jdkFile = jdkFile; } - } - - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) + setupJava() { + return __awaiter(this, void 0, void 0, function* () { + let foundJava = this.findInToolcache(); + if (foundJava) { + core.info(`Resolved Java ${foundJava.version} from tool-cache`); + } + else { + core.info(`Java ${this.version} was not found in tool-cache. Trying to unpack JDK file...`); + if (!this.jdkFile) { + throw new Error("'jdkFile' is not specified"); + } + const jdkFilePath = path_1.default.resolve(this.jdkFile); + const stats = fs_1.default.statSync(jdkFilePath); + if (!stats.isFile()) { + throw new Error(`JDK file was not found in path '${jdkFilePath}'`); + } + core.info(`Extracting Java from '${jdkFilePath}'`); + const extractedJavaPath = yield (0, util_1.extractJdkFile)(jdkFilePath); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const javaVersion = this.version; + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaVersion), this.architecture); + foundJava = { + version: javaVersion, + path: javaPath + }; + } + // JDK folder may contain postfix "Contents/Home" on macOS + const macOSPostfixPath = path_1.default.join(foundJava.path, constants_1.MACOS_JAVA_CONTENT_POSTFIX); + if (process.platform === 'darwin' && fs_1.default.existsSync(macOSPostfixPath)) { + foundJava.path = macOSPostfixPath; + } + core.info(`Setting Java ${foundJava.version} as default`); + this.setJavaDefault(foundJava.version, foundJava.path); + return foundJava; + }); + } + findPackageForDownload(version // eslint-disable-line @typescript-eslint/no-unused-vars + ) { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('This method should not be implemented in local file provider'); + }); } - } - - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort + downloadTool(javaRelease // eslint-disable-line @typescript-eslint/no-unused-vars + ) { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('This method should not be implemented in local file provider'); + }); } - } +} +exports.LocalDistribution = LocalDistribution; - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) - } - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - timeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - let { counter, currentTimeout } = state +/***/ }), - currentTimeout = - currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout +/***/ 73613: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - // Any code that is not a Undici's originated and allowed to retry - if ( - code && - code !== 'UND_ERR_REQ_RETRY' && - code !== 'UND_ERR_SOCKET' && - !errorCodes.includes(code) - ) { - cb(err) - return - } +"use strict"; - // If a set of method are provided and the current method is not in the list - if (Array.isArray(methods) && !methods.includes(method)) { - cb(err) - return +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - - // If a set of status code are provided and the current status code is not in the list - if ( - statusCode != null && - Array.isArray(statusCodes) && - !statusCodes.includes(statusCode) - ) { - cb(err) - return + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MicrosoftDistributions = void 0; +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +class MicrosoftDistributions extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Microsoft', installerOptions); } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); } - - let retryAfterHeader = headers != null && headers['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds + findPackageForDownload(range) { + return __awaiter(this, void 0, void 0, function* () { + const arch = this.distributionArchitecture(); + if (arch !== 'x64' && arch !== 'aarch64') { + throw new Error(`Unsupported architecture: ${this.architecture}`); + } + if (!this.stable) { + throw new Error('Early access versions are not supported'); + } + if (this.packageType !== 'jdk') { + throw new Error('Microsoft Build of OpenJDK provides only the `jdk` package type'); + } + const manifest = yield this.getAvailableVersions(); + if (!manifest) { + throw new Error('Could not load manifest for Microsoft Build of OpenJDK'); + } + const foundRelease = yield tc.findFromManifest(range, true, manifest, arch); + if (!foundRelease) { + throw new Error(`Could not find satisfied version for SemVer ${range}.\nAvailable versions: ${manifest + .map(item => item.version) + .join(', ')}`); + } + return { + url: foundRelease.files[0].download_url, + version: foundRelease.version + }; + }); } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) - - state.currentTimeout = retryTimeout - - setTimeout(() => cb(null), retryTimeout) - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - count: this.retryCount - }) - ) - return false + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + // TODO get these dynamically! + // We will need Microsoft to add an endpoint where we can query for versions. + const owner = 'actions'; + const repository = 'setup-java'; + const branch = 'main'; + const filePath = 'src/distributions/microsoft/microsoft-openjdk-versions.json'; + let releases = null; + const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; + const headers = (0, util_1.getGitHubHttpHeaders)(); + let response = null; + if (core.isDebug()) { + console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console + } + try { + response = yield this.http.getJson(fileUrl, headers); + if (!response.result) { + return null; + } + } + catch (err) { + core.debug(`Http request for microsoft-openjdk-versions.json failed with status code: ${response === null || response === void 0 ? void 0 : response.statusCode}. Error: ${err}`); + return null; + } + if (response.result) { + releases = response.result; + } + if (core.isDebug() && releases) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console + core.debug(`Available versions: [${releases.length}]`); + core.debug(releases.map(item => item.version).join(', ')); + core.endGroup(); + } + return releases; + }); } +} +exports.MicrosoftDistributions = MicrosoftDistributions; - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - if (statusCode !== 206) { - return true - } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false - } +/***/ }), - const { start, size, end = size } = contentRange +/***/ 64298: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') +"use strict"; - this.resume = resume - return true +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - const { start, size, end = size } = range - - assert( - start != null && Number.isFinite(start) && this.start !== start, - 'content-range mismatch' - ) - assert(Number.isFinite(start)) - assert( - end != null && Number.isFinite(end) && this.end !== end, - 'invalid content-length' - ) - - this.start = start - this.end = end - } - - // We make our best to checkpoint the body for further range headers - if (this.end == null) { - const contentLength = headers['content-length'] - this.end = contentLength != null ? Number(contentLength) : null - } - - assert(Number.isFinite(this.start)) - assert( - this.end == null || Number.isFinite(this.end), - 'invalid content-length' - ) - - this.resume = resume - this.etag = headers.etag != null ? headers.etag : null - - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OracleDistribution = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +const http_client_1 = __nccwpck_require__(96255); +const ORACLE_DL_BASE = 'https://download.oracle.com/java'; +class OracleDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Oracle', installerOptions); } - - const err = new RequestRetryError('Request failed', statusCode, { - headers, - count: this.retryCount - }) - - this.abort(err) - - return false - } - - onData (chunk) { - this.start += chunk.length - - return this.handler.onData(chunk) - } - - onComplete (rawTrailers) { - this.retryCount = 0 - return this.handler.onComplete(rawTrailers) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) - } - - if (this.start !== 0) { - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - range: `bytes=${this.start}-${this.end ?? ''}` - } + findPackageForDownload(range) { + return __awaiter(this, void 0, void 0, function* () { + const arch = this.distributionArchitecture(); + if (arch !== 'x64' && arch !== 'aarch64') { + throw new Error(`Unsupported architecture: ${this.architecture}`); + } + if (!this.stable) { + throw new Error('Early access versions are not supported'); + } + if (this.packageType !== 'jdk') { + throw new Error('Oracle JDK provides only the `jdk` package type'); + } + const platform = this.getPlatform(); + const extension = (0, util_1.getDownloadArchiveExtension)(); + const isOnlyMajorProvided = !range.includes('.'); + const major = isOnlyMajorProvided ? range : range.split('.')[0]; + const possibleUrls = []; + /** + * NOTE + * If only major version was provided we will check it under /latest first + * in order to retrieve the latest possible version if possible, + * otherwise we will fall back to /archive where we are guaranteed to + * find any version if it exists + */ + if (isOnlyMajorProvided) { + possibleUrls.push(`${ORACLE_DL_BASE}/${major}/latest/jdk-${major}_${platform}-${arch}_bin.${extension}`); + } + possibleUrls.push(`${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`); + if (parseInt(major) < 17) { + throw new Error('Oracle JDK is only supported for JDK 17 and later'); + } + for (const url of possibleUrls) { + const response = yield this.http.head(url); + if (response.message.statusCode === http_client_1.HttpCodes.OK) { + return { url, version: range }; + } + if (response.message.statusCode !== http_client_1.HttpCodes.NotFound) { + throw new Error(`Http request for Oracle JDK failed with status code: ${response.message.statusCode}`); + } + } + throw new Error(`Could not find Oracle JDK for SemVer ${range}`); + }); + } + getPlatform(platform = process.platform) { + switch (platform) { + case 'darwin': + return 'macos'; + case 'win32': + return 'windows'; + case 'linux': + return 'linux'; + default: + throw new Error(`Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'`); } - } - - try { - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } } - } } - -module.exports = RetryHandler +exports.OracleDistribution = OracleDistribution; /***/ }), -/***/ 38861: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 52869: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const RedirectHandler = __nccwpck_require__(72860) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SapMachineDistribution = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const util_1 = __nccwpck_require__(92629); +const base_installer_1 = __nccwpck_require__(59741); +class SapMachineDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('SapMachine', installerOptions); + } + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + core.debug(`Only stable versions: ${this.stable}`); + if (!['jdk', 'jre'].includes(this.packageType)) { + throw new Error('SapMachine provides only the `jdk` and `jre` package type'); + } + const availableVersions = yield this.getAvailableVersions(); + const matchedVersions = availableVersions + .filter(item => { + return (0, util_1.isVersionSatisfies)(version, item.version); + }) + .map(item => { + return { + version: item.version, + url: item.downloadLink + }; + }); + if (!matchedVersions.length) { + throw new Error(`Couldn't find any satisfied version for the specified java-version: "${version}" and architecture: "${this.architecture}".`); + } + const resolvedVersion = matchedVersions[0]; + return resolvedVersion; + }); + } + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + let fetchedReleasesJson = yield this.fetchReleasesFromUrl('https://sapmachine.io/assets/data/sapmachine-releases-all.json'); + if (!fetchedReleasesJson) { + fetchedReleasesJson = yield this.fetchReleasesFromUrl('https://sap.github.io/SapMachine/assets/data/sapmachine-releases-all.json'); + } + if (!fetchedReleasesJson) { + throw new Error(`Couldn't fetch SapMachine versions information from both primary and backup urls`); + } + core.debug('Successfully fetched information about available SapMachine versions'); + const availableVersions = this.parseVersions(platform, arch, fetchedReleasesJson); + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + core.debug(availableVersions.map(item => item.version).join(', ')); + core.endGroup(); + } + return availableVersions; + }); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + parseVersions(platform, arch, versions) { + const eligibleVersions = []; + for (const [, majorVersionMap] of Object.entries(versions)) { + for (const [, jdkVersionMap] of Object.entries(majorVersionMap.updates)) { + for (const [buildVersion, buildVersionMap] of Object.entries(jdkVersionMap)) { + let buildVersionWithoutPrefix = buildVersion.replace('sapmachine-', ''); + if (!buildVersionWithoutPrefix.includes('.')) { + // replace major version with major.minor.patch and keep the remaining build identifier after the + as is with regex + buildVersionWithoutPrefix = buildVersionWithoutPrefix.replace(/(\d+)(\+.*)?/, '$1.0.0$2'); + } + // replace + with . to convert to semver format if we have more than 3 version digits + if (buildVersionWithoutPrefix.split('.').length > 3) { + buildVersionWithoutPrefix = buildVersionWithoutPrefix.replace('+', '.'); + } + buildVersionWithoutPrefix = (0, util_1.convertVersionToSemver)(buildVersionWithoutPrefix); + // ignore invalid version + if (!semver_1.default.valid(buildVersionWithoutPrefix)) { + core.debug(`Invalid version: ${buildVersionWithoutPrefix}`); + continue; + } + // skip earlyAccessVersions if stable version requested + if (this.stable && buildVersionMap.ea === 'true') { + continue; + } + for (const [edition, editionAssets] of Object.entries(buildVersionMap.assets)) { + if (this.packageType !== edition) { + continue; + } + for (const [archAndPlatForm, archAssets] of Object.entries(editionAssets)) { + let expectedArchAndPlatform = `${platform}-${arch}`; + if (platform === 'linux-musl') { + expectedArchAndPlatform = `linux-${arch}-musl`; + } + if (archAndPlatForm !== expectedArchAndPlatform) { + continue; + } + for (const [contentType, contentTypeAssets] of Object.entries(archAssets)) { + // skip if not tar.gz and zip files + if (contentType !== 'tar.gz' && contentType !== 'zip') { + continue; + } + eligibleVersions.push({ + os: platform, + architecture: arch, + version: buildVersionWithoutPrefix, + checksum: contentTypeAssets.checksum, + downloadLink: contentTypeAssets.url, + packageType: edition + }); + } + } + } + } + } + } + const sortedVersions = this.sortParsedVersions(eligibleVersions); + return sortedVersions; + } + // Sorts versions in descending order as by default data in JSON isn't sorted + sortParsedVersions(eligibleVersions) { + const sortedVersions = eligibleVersions.sort((versionObj1, versionObj2) => { + const version1 = versionObj1.version; + const version2 = versionObj2.version; + return semver_1.default.compareBuild(version1, version2); + }); + return sortedVersions.reverse(); + } + getPlatformOption() { + switch (process.platform) { + case 'win32': + return 'windows'; + case 'darwin': + return 'macos'; + case 'linux': + // figure out if alpine/musl + if (fs_1.default.existsSync('/etc/alpine-release')) { + return 'linux-musl'; + } + return 'linux'; + default: + return process.platform; + } + } + fetchReleasesFromUrl(url, headers = {}) { + return __awaiter(this, void 0, void 0, function* () { + try { + core.debug(`Trying to fetch available SapMachine versions info from the primary url: ${url}`); + const releases = (yield this.http.getJson(url, headers)).result; + return releases; + } + catch (err) { + core.debug(`Fetching SapMachine versions info from the link: ${url} ended up with the error: ${err.message}`); + return null; + } + }); } - } } - -module.exports = createRedirectInterceptor +exports.SapMachineDistribution = SapMachineDistribution; /***/ }), -/***/ 30953: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 41121: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(41891); -// C headers -var ERROR; -(function (ERROR) { - ERROR[ERROR["OK"] = 0] = "OK"; - ERROR[ERROR["INTERNAL"] = 1] = "INTERNAL"; - ERROR[ERROR["STRICT"] = 2] = "STRICT"; - ERROR[ERROR["LF_EXPECTED"] = 3] = "LF_EXPECTED"; - ERROR[ERROR["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; - ERROR[ERROR["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; - ERROR[ERROR["INVALID_METHOD"] = 6] = "INVALID_METHOD"; - ERROR[ERROR["INVALID_URL"] = 7] = "INVALID_URL"; - ERROR[ERROR["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; - ERROR[ERROR["INVALID_VERSION"] = 9] = "INVALID_VERSION"; - ERROR[ERROR["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; - ERROR[ERROR["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; - ERROR[ERROR["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; - ERROR[ERROR["INVALID_STATUS"] = 13] = "INVALID_STATUS"; - ERROR[ERROR["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; - ERROR[ERROR["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; - ERROR[ERROR["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; - ERROR[ERROR["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; - ERROR[ERROR["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; - ERROR[ERROR["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; - ERROR[ERROR["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; - ERROR[ERROR["PAUSED"] = 21] = "PAUSED"; - ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; - ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; - ERROR[ERROR["USER"] = 24] = "USER"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -var FLAGS; -(function (FLAGS) { - FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; - FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; - FLAGS[FLAGS["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; - FLAGS[FLAGS["CHUNKED"] = 8] = "CHUNKED"; - FLAGS[FLAGS["UPGRADE"] = 16] = "UPGRADE"; - FLAGS[FLAGS["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; - FLAGS[FLAGS["SKIPBODY"] = 64] = "SKIPBODY"; - FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING"; - // 1 << 8 is unused - FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -var LENIENT_FLAGS; -(function (LENIENT_FLAGS) { - LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS"; - LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; - LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -var METHODS; -(function (METHODS) { - METHODS[METHODS["DELETE"] = 0] = "DELETE"; - METHODS[METHODS["GET"] = 1] = "GET"; - METHODS[METHODS["HEAD"] = 2] = "HEAD"; - METHODS[METHODS["POST"] = 3] = "POST"; - METHODS[METHODS["PUT"] = 4] = "PUT"; - /* pathological */ - METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; - METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; - METHODS[METHODS["TRACE"] = 7] = "TRACE"; - /* WebDAV */ - METHODS[METHODS["COPY"] = 8] = "COPY"; - METHODS[METHODS["LOCK"] = 9] = "LOCK"; - METHODS[METHODS["MKCOL"] = 10] = "MKCOL"; - METHODS[METHODS["MOVE"] = 11] = "MOVE"; - METHODS[METHODS["PROPFIND"] = 12] = "PROPFIND"; - METHODS[METHODS["PROPPATCH"] = 13] = "PROPPATCH"; - METHODS[METHODS["SEARCH"] = 14] = "SEARCH"; - METHODS[METHODS["UNLOCK"] = 15] = "UNLOCK"; - METHODS[METHODS["BIND"] = 16] = "BIND"; - METHODS[METHODS["REBIND"] = 17] = "REBIND"; - METHODS[METHODS["UNBIND"] = 18] = "UNBIND"; - METHODS[METHODS["ACL"] = 19] = "ACL"; - /* subversion */ - METHODS[METHODS["REPORT"] = 20] = "REPORT"; - METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; - METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; - METHODS[METHODS["MERGE"] = 23] = "MERGE"; - /* upnp */ - METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; - METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; - METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; - METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; - /* RFC-5789 */ - METHODS[METHODS["PATCH"] = 28] = "PATCH"; - METHODS[METHODS["PURGE"] = 29] = "PURGE"; - /* CalDAV */ - METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; - /* RFC-2068, section 19.6.1.2 */ - METHODS[METHODS["LINK"] = 31] = "LINK"; - METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; - /* icecast */ - METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; - /* RFC-7540, section 11.6 */ - METHODS[METHODS["PRI"] = 34] = "PRI"; - /* RFC-2326 RTSP */ - METHODS[METHODS["DESCRIBE"] = 35] = "DESCRIBE"; - METHODS[METHODS["ANNOUNCE"] = 36] = "ANNOUNCE"; - METHODS[METHODS["SETUP"] = 37] = "SETUP"; - METHODS[METHODS["PLAY"] = 38] = "PLAY"; - METHODS[METHODS["PAUSE"] = 39] = "PAUSE"; - METHODS[METHODS["TEARDOWN"] = 40] = "TEARDOWN"; - METHODS[METHODS["GET_PARAMETER"] = 41] = "GET_PARAMETER"; - METHODS[METHODS["SET_PARAMETER"] = 42] = "SET_PARAMETER"; - METHODS[METHODS["REDIRECT"] = 43] = "REDIRECT"; - METHODS[METHODS["RECORD"] = 44] = "RECORD"; - /* RAOP */ - METHODS[METHODS["FLUSH"] = 45] = "FLUSH"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; }); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; }; -exports.HEX_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, - A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, - a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SemeruDistribution = void 0; +const base_installer_1 = __nccwpck_require__(59741); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const util_1 = __nccwpck_require__(92629); +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const supportedArchitectures = [ + 'x64', + 'x86', + 'ppc64le', + 'ppc64', + 's390x', + 'aarch64' ]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); -/* Tokens as defined by rfc 2616. Also lowercases them. - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); +class SemeruDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('IBM_Semeru', installerOptions); + } + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + const arch = this.distributionArchitecture(); + if (!supportedArchitectures.includes(arch)) { + throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture} for your current OS version, the following are supported: ${supportedArchitectures.join(', ')}`); + } + if (!this.stable) { + throw new Error('IBM Semeru does not provide builds for early access versions'); + } + if (this.packageType !== 'jdk' && this.packageType !== 'jre') { + throw new Error('IBM Semeru only provide `jdk` and `jre` package types'); + } + const availableVersionsRaw = yield this.getAvailableVersions(); + const availableVersionsWithBinaries = availableVersionsRaw + .filter(item => item.binaries.length > 0) + .map(item => { + // normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions + const formattedVersion = this.stable + ? item.version_data.semver + : item.version_data.semver.replace('-beta+', '+'); + return { + version: formattedVersion, + url: item.binaries[0].package.link + }; + }); + const satisfiedVersions = availableVersionsWithBinaries + .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) + .sort((a, b) => { + return -semver_1.default.compareBuild(a.version, b.version); + }); + const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for SemVer version '${version}' for your current OS version for ${this.architecture} architecture ${availableOptionsMessage}`); + } + return resolvedFullVersion; + }); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + get toolcacheFolderName() { + return super.toolcacheFolderName; + } + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + const imageType = this.packageType; + const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions + const releaseType = this.stable ? 'ga' : 'ea'; + if (core.isDebug()) { + console.time('Retrieving available versions for Semeru took'); // eslint-disable-line no-console + } + const baseRequestArguments = [ + `project=jdk`, + 'vendor=ibm', + `heap_size=normal`, + 'sort_method=DEFAULT', + 'sort_order=DESC', + `os=${platform}`, + `architecture=${arch}`, + `image_type=${imageType}`, + `release_type=${releaseType}`, + `jvm_impl=openj9` + ].join('&'); + // need to iterate through all pages to retrieve the list of all versions + // Adoptium API doesn't provide way to retrieve the count of pages to iterate so infinity loop + let page_index = 0; + const availableVersions = []; + while (true) { + const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; + const availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`; + if (core.isDebug() && page_index === 0) { + // url is identical except page_index so print it once for debug + core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + } + const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result; + if (paginationPage === null || paginationPage.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + availableVersions.push(...paginationPage); + page_index++; + } + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Semeru took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); + core.endGroup(); + } + return availableVersions; + }); + } + getPlatformOption() { + // Adopt has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'mac'; + case 'win32': + return 'windows'; + default: + return process.platform; + } } } -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -var HEADER_STATE; -(function (HEADER_STATE) { - HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL"; - HEADER_STATE[HEADER_STATE["CONNECTION"] = 1] = "CONNECTION"; - HEADER_STATE[HEADER_STATE["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; - HEADER_STATE[HEADER_STATE["UPGRADE"] = 4] = "UPGRADE"; - HEADER_STATE[HEADER_STATE["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; - HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; - HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; - HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 61145: -/***/ ((module) => { - -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' - - -/***/ }), - -/***/ 95627: -/***/ ((module) => { - -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' +exports.SemeruDistribution = SemeruDistribution; /***/ }), -/***/ 41891: -/***/ ((__unused_webpack_module, exports) => { +/***/ 18579: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; +exports.TemurinDistribution = exports.TemurinImplementation = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +var TemurinImplementation; +(function (TemurinImplementation) { + TemurinImplementation["Hotspot"] = "Hotspot"; +})(TemurinImplementation || (exports.TemurinImplementation = TemurinImplementation = {})); +class TemurinDistribution extends base_installer_1.JavaBase { + constructor(installerOptions, jvmImpl) { + super(`Temurin-${jvmImpl}`, installerOptions); + this.jvmImpl = jvmImpl; + } + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + const availableVersionsRaw = yield this.getAvailableVersions(); + const availableVersionsWithBinaries = availableVersionsRaw + .filter(item => item.binaries.length > 0) + .map(item => { + // normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions + const formattedVersion = this.stable + ? item.version_data.semver + : item.version_data.semver.replace('-beta+', '+'); + return { + version: formattedVersion, + url: item.binaries[0].package.link + }; + }); + const satisfiedVersions = availableVersionsWithBinaries + .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) + .sort((a, b) => { + return -semver_1.default.compareBuild(a.version, b.version); + }); + const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); + } + return resolvedFullVersion; + }); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + get toolcacheFolderName() { + return super.toolcacheFolderName; + } + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + const imageType = this.packageType; + const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions + const releaseType = this.stable ? 'ga' : 'ea'; + if (core.isDebug()) { + console.time('Retrieving available versions for Temurin took'); // eslint-disable-line no-console + } + const baseRequestArguments = [ + `project=jdk`, + 'vendor=adoptium', + `heap_size=normal`, + 'sort_method=DEFAULT', + 'sort_order=DESC', + `os=${platform}`, + `architecture=${arch}`, + `image_type=${imageType}`, + `release_type=${releaseType}`, + `jvm_impl=${this.jvmImpl.toLowerCase()}` + ].join('&'); + // need to iterate through all pages to retrieve the list of all versions + // Adoptium API doesn't provide way to retrieve the count of pages to iterate so infinity loop + let page_index = 0; + const availableVersions = []; + while (true) { + const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; + const availableVersionsUrl = `https://api.adoptium.net/v3/assets/version/${versionRange}?${requestArguments}`; + if (core.isDebug() && page_index === 0) { + // url is identical except page_index so print it once for debug + core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + } + const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result; + if (paginationPage === null || paginationPage.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + availableVersions.push(...paginationPage); + page_index++; + } + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Temurin took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); + core.endGroup(); + } + return availableVersions; + }); + } + getPlatformOption() { + // Adoptium has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'mac'; + case 'win32': + return 'windows'; + default: + return process.platform; } - }); - return res; + } } -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map +exports.TemurinDistribution = TemurinDistribution; + /***/ }), -/***/ 66771: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 82005: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const { kClients } = __nccwpck_require__(72785) -const Agent = __nccwpck_require__(7890) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(24347) -const MockClient = __nccwpck_require__(58687) -const MockPool = __nccwpck_require__(26193) -const { matchValue, buildMockOptions } = __nccwpck_require__(79323) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(48045) -const Dispatcher = __nccwpck_require__(60412) -const Pluralizer = __nccwpck_require__(78891) -const PendingInterceptorsFormatter = __nccwpck_require__(86823) - -class FakeWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value - } -} - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - const agent = opts && opts.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ZuluDistribution = void 0; +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const semver_1 = __importDefault(__nccwpck_require__(11383)); +const base_installer_1 = __nccwpck_require__(59741); +const util_1 = __nccwpck_require__(92629); +class ZuluDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Zulu', installerOptions); } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false - } - - activate () { - this[kIsMockActive] = true - } - - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] - } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + const availableVersionsRaw = yield this.getAvailableVersions(); + const availableVersions = availableVersionsRaw.map(item => { + return { + version: (0, util_1.convertVersionToSemver)(item.jdk_version), + url: item.url, + zuluVersion: (0, util_1.convertVersionToSemver)(item.zulu_version) + }; + }); + const satisfiedVersions = availableVersions + .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) + .sort((a, b) => { + // Azul provides two versions: jdk_version and azul_version + // we should sort by both fields by descending + return (-semver_1.default.compareBuild(a.version, b.version) || + -semver_1.default.compareBuild(a.zuluVersion, b.zuluVersion)); + }) + .map(item => { + return { + version: item.version, + url: item.url + }; + }); + const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for semver ${version}. ${availableOptionsMessage}`); + } + return resolvedFullVersion; + }); } - } - - disableNetConnect () { - this[kNetConnect] = false - } - - // This is required to bypass issues caused by using global symbols - see: - // https://github.com/nodejs/undici/issues/1447 - get isMockActive () { - return this[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, new FakeWeakRef(dispatcher)) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const ref = this[kClients].get(origin) - if (ref) { - return ref.deref() + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + let javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = (0, util_1.getDownloadArchiveExtension)(); + if (process.platform === 'win32') { + javaArchivePath = (0, util_1.renameWinArchive)(javaArchivePath); + } + const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher + getAvailableVersions() { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + const { arch, hw_bitness, abi } = this.getArchitectureOptions(); + const [bundleType, features] = this.packageType.split('+'); + const platform = this.getPlatformOption(); + const extension = (0, util_1.getDownloadArchiveExtension)(); + const javafx = (_a = features === null || features === void 0 ? void 0 : features.includes('fx')) !== null && _a !== void 0 ? _a : false; + const releaseStatus = this.stable ? 'ga' : 'ea'; + if (core.isDebug()) { + console.time('Retrieving available versions for Zulu took'); // eslint-disable-line no-console + } + const requestArguments = [ + `os=${platform}`, + `ext=${extension}`, + `bundle_type=${bundleType}`, + `javafx=${javafx}`, + `arch=${arch}`, + `hw_bitness=${hw_bitness}`, + `release_status=${releaseStatus}`, + abi ? `abi=${abi}` : null, + features ? `features=${features}` : null + ] + .filter(Boolean) + .join('&'); + const availableVersionsUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?${requestArguments}`; + core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + const availableVersions = (_b = (yield this.http.getJson(availableVersionsUrl)) + .result) !== null && _b !== void 0 ? _b : []; + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Zulu took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.jdk_version.join('.')).join(', ')); + core.endGroup(); + } + return availableVersions; + }); } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { - const nonExplicitDispatcher = nonExplicitRef.deref() - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher - } + getArchitectureOptions() { + const arch = this.distributionArchitecture(); + switch (arch) { + case 'x64': + return { arch: 'x86', hw_bitness: '64', abi: '' }; + case 'x86': + return { arch: 'x86', hw_bitness: '32', abi: '' }; + case 'aarch64': + case 'arm64': + return { arch: 'arm', hw_bitness: '64', abi: '' }; + default: + return { arch: arch, hw_bitness: '', abi: '' }; + } } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return + getPlatformOption() { + // Azul has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'macos'; + case 'win32': + return 'windows'; + default: + return process.platform; + } } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } } - -module.exports = MockAgent +exports.ZuluDistribution = ZuluDistribution; /***/ }), -/***/ 58687: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 23759: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const { promisify } = __nccwpck_require__(73837) -const Client = __nccwpck_require__(33598) -const { buildMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(24347) -const { MockInterceptor } = __nccwpck_require__(90410) -const Symbols = __nccwpck_require__(72785) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteKey = exports.importKey = exports.PRIVATE_KEY_FILE = void 0; +const fs = __importStar(__nccwpck_require__(57147)); +const path = __importStar(__nccwpck_require__(71017)); +const io = __importStar(__nccwpck_require__(47351)); +const exec = __importStar(__nccwpck_require__(71514)); +const util = __importStar(__nccwpck_require__(92629)); +exports.PRIVATE_KEY_FILE = path.join(util.getTempDir(), 'private-key.asc'); +const PRIVATE_KEY_FINGERPRINT_REGEX = /\w{40}/; +function importKey(privateKey) { + return __awaiter(this, void 0, void 0, function* () { + fs.writeFileSync(exports.PRIVATE_KEY_FILE, privateKey, { + encoding: 'utf-8', + flag: 'w' + }); + let output = ''; + const options = { + silent: true, + listeners: { + stdout: (data) => { + output += data.toString(); + } + } + }; + yield exec.exec('gpg', [ + '--batch', + '--import-options', + 'import-show', + '--import', + exports.PRIVATE_KEY_FILE + ], options); + yield io.rmRF(exports.PRIVATE_KEY_FILE); + const match = output.match(PRIVATE_KEY_FINGERPRINT_REGEX); + return match && match[0]; + }); } - -module.exports = MockClient +exports.importKey = importKey; +function deleteKey(keyFingerprint) { + return __awaiter(this, void 0, void 0, function* () { + yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], { + silent: true + }); + }); +} +exports.deleteKey = deleteKey; /***/ }), -/***/ 50888: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 20994: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -const { UndiciError } = __nccwpck_require__(48045) - -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const core = __importStar(__nccwpck_require__(42186)); +const auth = __importStar(__nccwpck_require__(53497)); +const util_1 = __nccwpck_require__(92629); +const toolchains = __importStar(__nccwpck_require__(79322)); +const constants = __importStar(__nccwpck_require__(69042)); +const cache_1 = __nccwpck_require__(64810); +const path = __importStar(__nccwpck_require__(71017)); +const distribution_factory_1 = __nccwpck_require__(10924); +function run() { + return __awaiter(this, void 0, void 0, function* () { + try { + const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION); + const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { + required: true + }); + const versionFile = core.getInput(constants.INPUT_JAVA_VERSION_FILE); + const architecture = core.getInput(constants.INPUT_ARCHITECTURE); + const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE); + const jdkFile = core.getInput(constants.INPUT_JDK_FILE); + const cache = core.getInput(constants.INPUT_CACHE); + const cacheDependencyPath = core.getInput(constants.INPUT_CACHE_DEPENDENCY_PATH); + const checkLatest = (0, util_1.getBooleanInput)(constants.INPUT_CHECK_LATEST, false); + let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID); + core.startGroup('Installed distributions'); + if (versions.length !== toolchainIds.length) { + toolchainIds = []; + } + if (!versions.length && !versionFile) { + throw new Error('java-version or java-version-file input expected'); + } + const installerInputsOptions = { + architecture, + packageType, + checkLatest, + distributionName, + jdkFile, + toolchainIds + }; + if (!versions.length) { + core.debug('java-version input is empty, looking for java-version-file input'); + const content = fs_1.default.readFileSync(versionFile).toString().trim(); + const version = (0, util_1.getVersionFromFileContent)(content, distributionName, versionFile); + core.debug(`Parsed version from file '${version}'`); + if (!version) { + throw new Error(`No supported version was found in file ${versionFile}`); + } + yield installVersion(version, installerInputsOptions); + } + for (const [index, version] of versions.entries()) { + yield installVersion(version, installerInputsOptions, index); + } + core.endGroup(); + const matchersPath = path.join(__dirname, '..', '..', '.github'); + core.info(`##[add-matcher]${path.join(matchersPath, 'java.json')}`); + yield auth.configureAuthentication(); + if (cache && (0, util_1.isCacheFeatureAvailable)()) { + yield (0, cache_1.restore)(cache, cacheDependencyPath); + } + } + catch (error) { + core.setFailed(error.message); + } + }); } - -module.exports = { - MockNotMatchedError +run(); +function installVersion(version, options, toolchainId = 0) { + return __awaiter(this, void 0, void 0, function* () { + const { distributionName, jdkFile, architecture, packageType, checkLatest, toolchainIds } = options; + const installerOptions = { + architecture, + packageType, + checkLatest, + version + }; + const distribution = (0, distribution_factory_1.getJavaDistribution)(distributionName, installerOptions, jdkFile); + if (!distribution) { + throw new Error(`No supported distribution was found for input ${distributionName}`); + } + const result = yield distribution.setupJava(); + yield toolchains.configureToolchains(version, distributionName, result.path, toolchainIds[toolchainId]); + core.info(''); + core.info('Java configuration:'); + core.info(` Distribution: ${distributionName}`); + core.info(` Version: ${result.version}`); + core.info(` Path: ${result.path}`); + core.info(''); + }); } /***/ }), -/***/ 90410: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 79322: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.generateToolchainDefinition = exports.createToolchainsSettings = exports.configureToolchains = void 0; +const fs = __importStar(__nccwpck_require__(57147)); +const os = __importStar(__nccwpck_require__(22037)); +const path = __importStar(__nccwpck_require__(71017)); +const core = __importStar(__nccwpck_require__(42186)); +const io = __importStar(__nccwpck_require__(47351)); +const constants = __importStar(__nccwpck_require__(69042)); +const util_1 = __nccwpck_require__(92629); +const xmlbuilder2_1 = __nccwpck_require__(70151); +function configureToolchains(version, distributionName, jdkHome, toolchainId) { + return __awaiter(this, void 0, void 0, function* () { + const vendor = core.getInput(constants.INPUT_MVN_TOOLCHAIN_VENDOR) || distributionName; + const id = toolchainId || `${vendor}_${version}`; + const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || + path.join(os.homedir(), constants.M2_DIR); + const overwriteSettings = (0, util_1.getBooleanInput)(constants.INPUT_OVERWRITE_SETTINGS, true); + yield createToolchainsSettings({ + jdkInfo: { + version, + vendor, + id, + jdkHome + }, + settingsDirectory, + overwriteSettings + }); + }); +} +exports.configureToolchains = configureToolchains; +function createToolchainsSettings({ jdkInfo, settingsDirectory, overwriteSettings }) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Creating ${constants.MVN_TOOLCHAINS_FILE} for JDK version ${jdkInfo.version} from ${jdkInfo.vendor}`); + // when an alternate m2 location is specified use only that location (no .m2 directory) + // otherwise use the home/.m2/ path + yield io.mkdirP(settingsDirectory); + const originalToolchains = yield readExistingToolchainsFile(settingsDirectory); + const updatedToolchains = generateToolchainDefinition(originalToolchains, jdkInfo.version, jdkInfo.vendor, jdkInfo.id, jdkInfo.jdkHome); + yield writeToolchainsFileToDisk(settingsDirectory, updatedToolchains, overwriteSettings); + }); +} +exports.createToolchainsSettings = createToolchainsSettings; +// only exported for testing purposes +function generateToolchainDefinition(original, version, vendor, id, jdkHome) { + let xmlObj; + if (original === null || original === void 0 ? void 0 : original.length) { + xmlObj = (0, xmlbuilder2_1.create)(original) + .root() + .ele({ + toolchain: { + type: 'jdk', + provides: { + version: `${version}`, + vendor: `${vendor}`, + id: `${id}` + }, + configuration: { + jdkHome: `${jdkHome}` + } + } + }); + } + else + xmlObj = (0, xmlbuilder2_1.create)({ + toolchains: { + '@xmlns': 'http://maven.apache.org/TOOLCHAINS/1.1.0', + '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', + '@xsi:schemaLocation': 'http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd', + toolchain: [ + { + type: 'jdk', + provides: { + version: `${version}`, + vendor: `${vendor}`, + id: `${id}` + }, + configuration: { + jdkHome: `${jdkHome}` + } + } + ] + } + }); + return xmlObj.end({ + format: 'xml', + wellFormed: false, + headless: false, + prettyPrint: true, + width: 80 + }); +} +exports.generateToolchainDefinition = generateToolchainDefinition; +function readExistingToolchainsFile(directory) { + return __awaiter(this, void 0, void 0, function* () { + const location = path.join(directory, constants.MVN_TOOLCHAINS_FILE); + if (fs.existsSync(location)) { + return fs.readFileSync(location, { + encoding: 'utf-8', + flag: 'r' + }); + } + return ''; + }); +} +function writeToolchainsFileToDisk(directory, settings, overwriteSettings) { + return __awaiter(this, void 0, void 0, function* () { + const location = path.join(directory, constants.MVN_TOOLCHAINS_FILE); + const settingsExists = fs.existsSync(location); + if (settingsExists && overwriteSettings) { + core.info(`Overwriting existing file ${location}`); + } + else if (!settingsExists) { + core.info(`Writing to ${location}`); + } + else { + core.info(`Skipping generation of ${location} because file already exists and overwriting is not enabled`); + return; + } + return fs.writeFileSync(location, settings, { + encoding: 'utf-8', + flag: 'w' + }); + }); +} -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(24347) -const { InvalidArgumentError } = __nccwpck_require__(48045) -const { buildURL } = __nccwpck_require__(83983) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') - } +/***/ }), - this[kMockDispatch].delay = waitInMs - return this - } +/***/ 92629: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this - } +"use strict"; - /** - * Allow one to define a reply for a set amount of matching requests. - */ - times (repeatTimes) { - if (typeof repeatTimes !== 'number' || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError('repeatTimes must be a valid integer > 0') +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - - this[kMockDispatch].times = repeatTimes - return this - } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.renameWinArchive = exports.getGitHubHttpHeaders = exports.convertVersionToSemver = exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; +const os_1 = __importDefault(__nccwpck_require__(22037)); +const path_1 = __importDefault(__nccwpck_require__(71017)); +const fs = __importStar(__nccwpck_require__(57147)); +const semver = __importStar(__nccwpck_require__(11383)); +const cache = __importStar(__nccwpck_require__(27799)); +const core = __importStar(__nccwpck_require__(42186)); +const tc = __importStar(__nccwpck_require__(27784)); +const constants_1 = __nccwpck_require__(69042); +function getTempDir() { + const tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); + return tempDirectory; } - -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') +exports.getTempDir = getTempDir; +function getBooleanInput(inputName, defaultValue = false) { + return ((core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'); +} +exports.getBooleanInput = getBooleanInput; +function getVersionFromToolcachePath(toolPath) { + if (toolPath) { + return path_1.default.basename(path_1.default.dirname(toolPath)); } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') + return toolPath; +} +exports.getVersionFromToolcachePath = getVersionFromToolcachePath; +function extractJdkFile(toolPath, extension) { + return __awaiter(this, void 0, void 0, function* () { + if (!extension) { + extension = toolPath.endsWith('.tar.gz') + ? 'tar.gz' + : path_1.default.extname(toolPath); + if (extension.startsWith('.')) { + extension = extension.substring(1); + } + } + switch (extension) { + case 'tar.gz': + case 'tar': + return yield tc.extractTar(toolPath); + case 'zip': + return yield tc.extractZip(toolPath); + default: + return yield tc.extract7z(toolPath); + } + }); +} +exports.extractJdkFile = extractJdkFile; +function getDownloadArchiveExtension() { + return process.platform === 'win32' ? 'zip' : 'tar.gz'; +} +exports.getDownloadArchiveExtension = getDownloadArchiveExtension; +function isVersionSatisfies(range, version) { + var _a; + if (semver.valid(range)) { + // if full version with build digit is provided as a range (such as '1.2.3+4') + // we should check for exact equal via compareBuild + // since semver.satisfies doesn't handle 4th digit + const semRange = semver.parse(range); + if (semRange && ((_a = semRange.build) === null || _a === void 0 ? void 0 : _a.length) > 0) { + return semver.compareBuild(range, version) === 0; + } } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' + return semver.satisfies(version, range); +} +exports.isVersionSatisfies = isVersionSatisfies; +function getToolcachePath(toolName, version, architecture) { + var _a; + const toolcacheRoot = (_a = process.env['RUNNER_TOOL_CACHE']) !== null && _a !== void 0 ? _a : ''; + const fullPath = path_1.default.join(toolcacheRoot, toolName, version, architecture); + if (fs.existsSync(fullPath)) { + return fullPath; } - // See https://github.com/nodejs/undici/issues/1245 - // As per RFC 3986, clients are not supposed to send URI - // fragments to servers when they retrieve a document, - if (typeof opts.path === 'string') { - if (opts.query) { - opts.path = buildURL(opts.path, opts.query) - } else { - // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 - const parsedURL = new URL(opts.path, 'data://') - opts.path = parsedURL.pathname + parsedURL.search - } + return null; +} +exports.getToolcachePath = getToolcachePath; +function isJobStatusSuccess() { + const jobStatus = core.getInput(constants_1.INPUT_JOB_STATUS); + return jobStatus === 'success'; +} +exports.isJobStatusSuccess = isJobStatusSuccess; +function isGhes() { + const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); + const hostname = ghUrl.hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === 'GITHUB.COM'; + const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM'); + const isLocalHost = hostname.endsWith('.LOCALHOST'); + return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; +} +exports.isGhes = isGhes; +function isCacheFeatureAvailable() { + if (cache.isFeatureAvailable()) { + return true; } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() + if (isGhes()) { + core.warning('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); + return false; } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false - } - - createMockScopeDispatchData (statusCode, data, responseOptions = {}) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } - } - - validateReplyParameters (statusCode, data, responseOptions) { - if (typeof statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') + core.warning('The runner was not able to contact the cache service. Caching will be skipped'); + return false; +} +exports.isCacheFeatureAvailable = isCacheFeatureAvailable; +function getVersionFromFileContent(content, distributionName, versionFile) { + var _a, _b, _c, _d, _e; + let javaVersionRegExp; + function getFileName(versionFile) { + return path_1.default.basename(versionFile); } - if (typeof data === 'undefined') { - throw new InvalidArgumentError('data must be defined') + const versionFileName = getFileName(versionFile); + if (versionFileName == '.tool-versions') { + javaVersionRegExp = + /^java\s+(?:\S*-)?(?\d+(?:\.\d+)*([+_.-](?:openj9[-._]?\d[\w.-]*|java\d+|jre[-_\w]*|OpenJDK\d+[\w_.-]*|[a-z0-9]+))*)/im; } - if (typeof responseOptions !== 'object') { - throw new InvalidArgumentError('responseOptions must be an object') + else if (versionFileName == '.sdkmanrc') { + javaVersionRegExp = /^java\s*=\s*(?[^-]+)/m; } - } - - /** - * Mock an undici request with a defined reply. - */ - reply (replyData) { - // Values of reply aren't available right now as they - // can only be available when the reply callback is invoked. - if (typeof replyData === 'function') { - // We'll first wrap the provided callback in another function, - // this function will properly resolve the data from the callback - // when invoked. - const wrappedDefaultsCallback = (opts) => { - // Our reply options callback contains the parameter for statusCode, data and options. - const resolvedData = replyData(opts) - - // Check if it is in the right format - if (typeof resolvedData !== 'object') { - throw new InvalidArgumentError('reply options callback must return an object') - } - - const { statusCode, data = '', responseOptions = {} } = resolvedData - this.validateReplyParameters(statusCode, data, responseOptions) - // Since the values can be obtained immediately we return them - // from this higher order function that will be resolved later. - return { - ...this.createMockScopeDispatchData(statusCode, data, responseOptions) - } - } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new MockScope(newMockDispatch) + else { + javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; } - - // We can have either one or three parameters, if we get here, - // we should have 1-3 parameters. So we spread the arguments of - // this function to obtain the parameters, since replyData will always - // just be the statusCode. - const [statusCode, data = '', responseOptions = {}] = [...arguments] - this.validateReplyParameters(statusCode, data, responseOptions) - - // Send in-already provided data like usual - const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions) - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) - } - - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') + const capturedVersion = ((_b = (_a = content.match(javaVersionRegExp)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.version) + ? (_d = (_c = content.match(javaVersionRegExp)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.version + : ''; + core.debug(`Parsed version '${capturedVersion}' from file '${versionFileName}'`); + if (!capturedVersion) { + return null; } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') + const tentativeVersion = avoidOldNotation(capturedVersion); + const rawVersion = tentativeVersion.split('-')[0]; + let version = semver.validRange(rawVersion) + ? tentativeVersion + : semver.coerce(tentativeVersion); + core.debug(`Range version from file is '${version}'`); + if (!version) { + return null; } - - this[kDefaultHeaders] = headers - return this - } - - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') + if (constants_1.DISTRIBUTIONS_ONLY_MAJOR_VERSION.includes(distributionName)) { + const coerceVersion = (_e = semver.coerce(version)) !== null && _e !== void 0 ? _e : version; + version = semver.major(coerceVersion).toString(); } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } + return version.toString(); } - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope +exports.getVersionFromFileContent = getVersionFromFileContent; +// By convention, action expects version 8 in the format `8.*` instead of `1.8` +function avoidOldNotation(content) { + return content.startsWith('1.') ? content.substring(2) : content; +} +function convertVersionToSemver(version) { + // Some distributions may use semver-like notation (12.10.2.1, 12.10.2.1.1) + const versionArray = Array.isArray(version) ? version : version.split('.'); + const mainVersion = versionArray.slice(0, 3).join('.'); + if (versionArray.length > 3) { + return `${mainVersion}+${versionArray.slice(3).join('.')}`; + } + return mainVersion; +} +exports.convertVersionToSemver = convertVersionToSemver; +function getGitHubHttpHeaders() { + const resolvedToken = core.getInput('token') || process.env.GITHUB_TOKEN; + const auth = !resolvedToken ? undefined : `token ${resolvedToken}`; + const headers = { + accept: 'application/vnd.github.VERSION.raw' + }; + if (auth) { + headers.authorization = auth; + } + return headers; +} +exports.getGitHubHttpHeaders = getGitHubHttpHeaders; +// Rename archive to add extension because after downloading +// archive does not contain extension type and it leads to some issues +// on Windows runners without PowerShell Core. +// +// For default PowerShell Windows it should contain extension type to unpack it. +function renameWinArchive(javaArchivePath) { + const javaArchivePathRenamed = `${javaArchivePath}.zip`; + fs.renameSync(javaArchivePath, javaArchivePathRenamed); + return javaArchivePathRenamed; +} +exports.renameWinArchive = renameWinArchive; /***/ }), -/***/ 26193: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { promisify } = __nccwpck_require__(73837) -const Pool = __nccwpck_require__(4634) -const { buildMockDispatch } = __nccwpck_require__(79323) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(24347) -const { MockInterceptor } = __nccwpck_require__(90410) -const Symbols = __nccwpck_require__(72785) -const { InvalidArgumentError } = __nccwpck_require__(48045) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') - } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } +/***/ 22877: +/***/ ((module) => { - get [Symbols.kConnected] () { - return this[kConnected] - } +module.exports = eval("require")("encoding"); - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} +/***/ }), -module.exports = MockPool +/***/ 39491: +/***/ ((module) => { +"use strict"; +module.exports = require("assert"); /***/ }), -/***/ 24347: +/***/ 50852: /***/ ((module) => { "use strict"; +module.exports = require("async_hooks"); +/***/ }), -module.exports = { - kAgent: Symbol('agent'), - kOptions: Symbol('options'), - kFactory: Symbol('factory'), - kDispatches: Symbol('dispatches'), - kDispatchKey: Symbol('dispatch key'), - kDefaultHeaders: Symbol('default headers'), - kDefaultTrailers: Symbol('default trailers'), - kContentLength: Symbol('content length'), - kMockAgent: Symbol('mock agent'), - kMockAgentSet: Symbol('mock agent set'), - kMockAgentGet: Symbol('mock agent get'), - kMockDispatch: Symbol('mock dispatch'), - kClose: Symbol('close'), - kOriginalClose: Symbol('original agent close'), - kOrigin: Symbol('origin'), - kIsMockActive: Symbol('is mock active'), - kNetConnect: Symbol('net connect'), - kGetNetConnect: Symbol('get net connect'), - kConnected: Symbol('connected') -} +/***/ 14300: +/***/ ((module) => { +"use strict"; +module.exports = require("buffer"); /***/ }), -/***/ 79323: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 32081: +/***/ ((module) => { "use strict"; +module.exports = require("child_process"); +/***/ }), -const { MockNotMatchedError } = __nccwpck_require__(50888) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(24347) -const { buildURL, nop } = __nccwpck_require__(83983) -const { STATUS_CODES } = __nccwpck_require__(13685) -const { - types: { - isPromise - } -} = __nccwpck_require__(73837) - -function matchValue (match, value) { - if (typeof match === 'string') { - return match === value - } - if (match instanceof RegExp) { - return match.test(value) - } - if (typeof match === 'function') { - return match(value) === true - } - return false -} - -function lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} +/***/ 96206: +/***/ ((module) => { -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function getHeaderByName (headers, key) { - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1] - } - } +"use strict"; +module.exports = require("console"); - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} +/***/ }), -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - const clone = headers.slice() - const entries = [] - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]) - } - return Object.fromEntries(entries) -} +/***/ 6113: +/***/ ((module) => { -function matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) - } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true - } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } +"use strict"; +module.exports = require("crypto"); - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) +/***/ }), - if (!matchValue(matchHeaderValue, headerValue)) { - return false - } - } - return true -} +/***/ 67643: +/***/ ((module) => { -function safeUrl (path) { - if (typeof path !== 'string') { - return path - } +"use strict"; +module.exports = require("diagnostics_channel"); - const pathSegments = path.split('?') +/***/ }), - if (pathSegments.length !== 2) { - return path - } +/***/ 82361: +/***/ ((module) => { - const qp = new URLSearchParams(pathSegments.pop()) - qp.sort() - return [...pathSegments, qp.toString()].join('?') -} +"use strict"; +module.exports = require("events"); -function matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} +/***/ }), -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} +/***/ 57147: +/***/ ((module) => { -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath +"use strict"; +module.exports = require("fs"); - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } +/***/ }), - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`) - } +/***/ 13685: +/***/ ((module) => { - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`) - } +"use strict"; +module.exports = require("http"); - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`) - } +/***/ }), - return matchedMockDispatches[0] -} +/***/ 85158: +/***/ ((module) => { -function addMockDispatch (mockDispatches, key, data) { - const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false } - const replyData = typeof data === 'function' ? { callback: data } : { ...data } - const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } } - mockDispatches.push(newMockDispatch) - return newMockDispatch -} +"use strict"; +module.exports = require("http2"); -function deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false - } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} +/***/ }), -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} +/***/ 95687: +/***/ ((module) => { -function generateKeyValues (data) { - return Object.entries(data).reduce((keyValuePairs, [key, value]) => [ - ...keyValuePairs, - Buffer.from(`${key}`), - Array.isArray(value) ? value.map(x => Buffer.from(`${x}`)) : Buffer.from(`${value}`) - ], []) -} +"use strict"; +module.exports = require("https"); -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} +/***/ }), -async function getResponse (body) { - const buffers = [] - for await (const data of body) { - buffers.push(data) - } - return Buffer.concat(buffers).toString('utf8') -} +/***/ 41808: +/***/ ((module) => { -/** - * Mock dispatch function used to simulate undici dispatches - */ -function mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[kDispatches], key) +"use strict"; +module.exports = require("net"); - mockDispatch.timesInvoked++ +/***/ }), - // Here's where we resolve a callback if a callback is present for the dispatch data. - if (mockDispatch.data.callback) { - mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } - } +/***/ 72254: +/***/ ((module) => { - // Parse mockDispatch data - const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, times } = mockDispatch +"use strict"; +module.exports = require("node:buffer"); - // If it's used up and not persistent, mark as consumed - mockDispatch.consumed = !persist && timesInvoked >= times - mockDispatch.pending = timesInvoked < times +/***/ }), - // If specified, trigger dispatch error - if (error !== null) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } +/***/ 6005: +/***/ ((module) => { - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } +"use strict"; +module.exports = require("node:crypto"); - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data +/***/ }), - // util.types.isPromise is likely needed for jest. - if (isPromise(body)) { - // If handleReply is asynchronous, throwing an error - // in the callback will reject the promise, rather than - // synchronously throw the error, which breaks some tests. - // Rather, we wait for the callback to resolve if it is a - // promise, and then re-run handleReply with the new body. - body.then((newData) => handleReply(mockDispatches, newData)) - return - } +/***/ 15673: +/***/ ((module) => { - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) +"use strict"; +module.exports = require("node:events"); - handler.abort = nop - handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData(Buffer.from(responseData)) - handler.onComplete(responseTrailers) - deleteMockDispatch(mockDispatches, key) - } +/***/ }), - function resume () {} +/***/ 87561: +/***/ ((module) => { - return true -} +"use strict"; +module.exports = require("node:fs"); -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] +/***/ }), - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) - } - } else { - throw error - } - } - } else { - originalDispatch.call(this, opts, handler) - } - } -} +/***/ 88849: +/***/ ((module) => { -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true - } - return false -} +"use strict"; +module.exports = require("node:http"); -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions - } -} +/***/ }), -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName -} +/***/ 22286: +/***/ ((module) => { +"use strict"; +module.exports = require("node:https"); /***/ }), -/***/ 86823: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 70612: +/***/ ((module) => { "use strict"; +module.exports = require("node:os"); +/***/ }), -const { Transform } = __nccwpck_require__(12781) -const { Console } = __nccwpck_require__(96206) - -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) - } - }) +/***/ 97742: +/***/ ((module) => { - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI - } - }) - } +"use strict"; +module.exports = require("node:process"); - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? '✅' : '❌', - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) +/***/ }), - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} +/***/ 84492: +/***/ ((module) => { +"use strict"; +module.exports = require("node:stream"); /***/ }), -/***/ 78891: +/***/ 47261: /***/ ((module) => { "use strict"; +module.exports = require("node:util"); +/***/ }), -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} +/***/ 65628: +/***/ ((module) => { -const plurals = { - pronoun: 'they', - is: 'are', - was: 'were', - this: 'these' -} +"use strict"; +module.exports = require("node:zlib"); -module.exports = class Pluralizer { - constructor (singular, plural) { - this.singular = singular - this.plural = plural - } +/***/ }), - pluralize (count) { - const one = count === 1 - const keys = one ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} +/***/ 22037: +/***/ ((module) => { +"use strict"; +module.exports = require("os"); /***/ }), -/***/ 68266: +/***/ 71017: /***/ ((module) => { "use strict"; -/* eslint-disable */ +module.exports = require("path"); +/***/ }), +/***/ 4074: +/***/ ((module) => { -// Extracted from node/lib/internal/fixed_queue.js +"use strict"; +module.exports = require("perf_hooks"); -// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. -const kSize = 2048; -const kMask = kSize - 1; +/***/ }), -// The FixedQueue is implemented as a singly-linked list of fixed-size -// circular buffers. It looks something like this: -// -// head tail -// | | -// v v -// +-----------+ <-----\ +-----------+ <------\ +-----------+ -// | [null] | \----- | next | \------- | next | -// +-----------+ +-----------+ +-----------+ -// | item | <-- bottom | item | <-- bottom | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | | [empty] | -// | item | | item | bottom --> | item | -// | item | | item | | item | -// | ... | | ... | | ... | -// | item | | item | | item | -// | item | | item | | item | -// | [empty] | <-- top | item | | item | -// | [empty] | | item | | item | -// | [empty] | | [empty] | <-- top top --> | [empty] | -// +-----------+ +-----------+ +-----------+ -// -// Or, if there is only one circular buffer, it looks something -// like either of these: -// -// head tail head tail -// | | | | -// v v v v -// +-----------+ +-----------+ -// | [null] | | [null] | -// +-----------+ +-----------+ -// | [empty] | | item | -// | [empty] | | item | -// | item | <-- bottom top --> | [empty] | -// | item | | [empty] | -// | [empty] | <-- top bottom --> | item | -// | [empty] | | item | -// +-----------+ +-----------+ -// -// Adding a value means moving `top` forward by one, removing means -// moving `bottom` forward by one. After reaching the end, the queue -// wraps around. -// -// When `top === bottom` the current queue is empty and when -// `top + 1 === bottom` it's full. This wastes a single space of storage -// but allows much quicker checks. +/***/ 85477: +/***/ ((module) => { -class FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } +"use strict"; +module.exports = require("punycode"); - isEmpty() { - return this.top === this.bottom; - } +/***/ }), - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } +/***/ 63477: +/***/ ((module) => { - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } +"use strict"; +module.exports = require("querystring"); - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} +/***/ }), -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); - } +/***/ 12781: +/***/ ((module) => { - isEmpty() { - return this.head.isEmpty(); - } +"use strict"; +module.exports = require("stream"); - push(data) { - if (this.head.isFull()) { - // Head is full: Creates a new queue, sets the old queue's `.next` to it, - // and sets it as the new main queue. - this.head = this.head.next = new FixedCircularBuffer(); - } - this.head.push(data); - } +/***/ }), - shift() { - const tail = this.tail; - const next = tail.shift(); - if (tail.isEmpty() && tail.next !== null) { - // If there is another queue, it forms the new tail. - this.tail = tail.next; - } - return next; - } -}; +/***/ 35356: +/***/ ((module) => { +"use strict"; +module.exports = require("stream/web"); /***/ }), -/***/ 73198: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 71576: +/***/ ((module) => { "use strict"; +module.exports = require("string_decoder"); +/***/ }), -const DispatcherBase = __nccwpck_require__(74839) -const FixedQueue = __nccwpck_require__(68266) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(72785) -const PoolStats = __nccwpck_require__(39689) +/***/ 39512: +/***/ ((module) => { -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') +"use strict"; +module.exports = require("timers"); -class PoolBase extends DispatcherBase { - constructor () { - super() +/***/ }), - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 +/***/ 24404: +/***/ ((module) => { - const pool = this +"use strict"; +module.exports = require("tls"); - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] +/***/ }), - let needDrain = false +/***/ 76224: +/***/ ((module) => { - while (!needDrain) { - const item = queue.shift() - if (!item) { - break - } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) - } +"use strict"; +module.exports = require("tty"); - this[kNeedDrain] = needDrain +/***/ }), - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) - } +/***/ 57310: +/***/ ((module) => { - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) - } - } +"use strict"; +module.exports = require("url"); - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) - } +/***/ }), - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) - } +/***/ 73837: +/***/ ((module) => { - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) - } +"use strict"; +module.exports = require("util"); - this[kStats] = new PoolStats(this) - } +/***/ }), - get [kBusy] () { - return this[kNeedDrain] - } +/***/ 29830: +/***/ ((module) => { - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } +"use strict"; +module.exports = require("util/types"); - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } +/***/ }), - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending - } - return ret - } +/***/ 71267: +/***/ ((module) => { - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running - } - return ret - } +"use strict"; +module.exports = require("worker_threads"); - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size - } - return ret - } +/***/ }), - get stats () { - return this[kStats] - } +/***/ 59796: +/***/ ((module) => { - async [kClose] () { - if (this[kQueue].isEmpty()) { - return Promise.all(this[kClients].map(c => c.close())) - } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve - }) - } - } +"use strict"; +module.exports = require("zlib"); - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break - } - item.handler.onError(err) - } +/***/ }), - return Promise.all(this[kClients].map(c => c.destroy(err))) - } +/***/ 31875: +/***/ ((__unused_webpack_module, exports) => { - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() +"use strict"; - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureKeyCredential = void 0; +/** + * A static-key-based credential that supports updating + * the underlying key value. + */ +class AzureKeyCredential { + _key; + /** + * The value of the key to be used in authentication + */ + get key() { + return this._key; + } + /** + * Create an instance of an AzureKeyCredential for use + * with a service client. + * + * @param key - The initial value of the key to use in authentication + */ + constructor(key) { + if (!key) { + throw new Error("key must be a non-empty string"); + } + this._key = key; + } + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newKey - The new key value to be used + */ + update(newKey) { + this._key = newKey; } +} +exports.AzureKeyCredential = AzureKeyCredential; +//# sourceMappingURL=azureKeyCredential.js.map - return !this[kNeedDrain] - } +/***/ }), - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) +/***/ 51377: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this[kClients].push(client) +"use strict"; - if (this[kNeedDrain]) { - process.nextTick(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureNamedKeyCredential = void 0; +exports.isNamedKeyCredential = isNamedKeyCredential; +const core_util_1 = __nccwpck_require__(80637); +/** + * A static name/key-based credential that supports updating + * the underlying name and key values. + */ +class AzureNamedKeyCredential { + _key; + _name; + /** + * The value of the key to be used in authentication. + */ + get key() { + return this._key; + } + /** + * The value of the name to be used in authentication. + */ + get name() { + return this._name; + } + /** + * Create an instance of an AzureNamedKeyCredential for use + * with a service client. + * + * @param name - The initial value of the name to use in authentication. + * @param key - The initial value of the key to use in authentication. + */ + constructor(name, key) { + if (!name || !key) { + throw new TypeError("name and key must be non-empty strings"); } - }) + this._name = name; + this._key = key; + } + /** + * Change the value of the key. + * + * Updates will take effect upon the next request after + * updating the key value. + * + * @param newName - The new name value to be used. + * @param newKey - The new key value to be used. + */ + update(newName, newKey) { + if (!newName || !newKey) { + throw new TypeError("newName and newKey must be non-empty strings"); + } + this._name = newName; + this._key = newKey; } +} +exports.AzureNamedKeyCredential = AzureNamedKeyCredential; +/** + * Tests an object to determine whether it implements NamedKeyCredential. + * + * @param credential - The assumed NamedKeyCredential to be tested. + */ +function isNamedKeyCredential(credential) { + return ((0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && + typeof credential.key === "string" && + typeof credential.name === "string"); +} +//# sourceMappingURL=azureNamedKeyCredential.js.map - return this - } +/***/ }), - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) - } - }) +/***/ 27182: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} +"use strict"; -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AzureSASCredential = void 0; +exports.isSASCredential = isSASCredential; +const core_util_1 = __nccwpck_require__(80637); +/** + * A static-signature-based credential that supports updating + * the underlying signature value. + */ +class AzureSASCredential { + _signature; + /** + * The value of the shared access signature to be used in authentication + */ + get signature() { + return this._signature; + } + /** + * Create an instance of an AzureSASCredential for use + * with a service client. + * + * @param signature - The initial value of the shared access signature to use in authentication + */ + constructor(signature) { + if (!signature) { + throw new Error("shared access signature must be a non-empty string"); + } + this._signature = signature; + } + /** + * Change the value of the signature. + * + * Updates will take effect upon the next request after + * updating the signature value. + * + * @param newSignature - The new shared access signature value to be used + */ + update(newSignature) { + if (!newSignature) { + throw new Error("shared access signature must be a non-empty string"); + } + this._signature = newSignature; + } } - +exports.AzureSASCredential = AzureSASCredential; +/** + * Tests an object to determine whether it implements SASCredential. + * + * @param credential - The assumed SASCredential to be tested. + */ +function isSASCredential(credential) { + return ((0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"); +} +//# sourceMappingURL=azureSASCredential.js.map /***/ }), -/***/ 39689: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 98834: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(72785) -const kPool = Symbol('pool') +"use strict"; -class PoolStats { - constructor (pool) { - this[kPool] = pool - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0; +var azureKeyCredential_js_1 = __nccwpck_require__(31875); +Object.defineProperty(exports, "AzureKeyCredential", ({ enumerable: true, get: function () { return azureKeyCredential_js_1.AzureKeyCredential; } })); +var keyCredential_js_1 = __nccwpck_require__(59122); +Object.defineProperty(exports, "isKeyCredential", ({ enumerable: true, get: function () { return keyCredential_js_1.isKeyCredential; } })); +var azureNamedKeyCredential_js_1 = __nccwpck_require__(51377); +Object.defineProperty(exports, "AzureNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; } })); +Object.defineProperty(exports, "isNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.isNamedKeyCredential; } })); +var azureSASCredential_js_1 = __nccwpck_require__(27182); +Object.defineProperty(exports, "AzureSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.AzureSASCredential; } })); +Object.defineProperty(exports, "isSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.isSASCredential; } })); +var tokenCredential_js_1 = __nccwpck_require__(39162); +Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: function () { return tokenCredential_js_1.isTokenCredential; } })); +//# sourceMappingURL=index.js.map - get connected () { - return this[kPool][kConnected] - } +/***/ }), - get free () { - return this[kPool][kFree] - } +/***/ 59122: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - get pending () { - return this[kPool][kPending] - } +"use strict"; - get queued () { - return this[kPool][kQueued] - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isKeyCredential = isKeyCredential; +const core_util_1 = __nccwpck_require__(80637); +/** + * Tests an object to determine whether it implements KeyCredential. + * + * @param credential - The assumed KeyCredential to be tested. + */ +function isKeyCredential(credential) { + return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; +} +//# sourceMappingURL=keyCredential.js.map - get running () { - return this[kPool][kRunning] - } +/***/ }), - get size () { - return this[kPool][kSize] - } +/***/ 39162: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isBearerToken = isBearerToken; +exports.isPopToken = isPopToken; +exports.isTokenCredential = isTokenCredential; +/** + * @internal + * @param accessToken - Access token + * @returns Whether a token is bearer type or not + */ +function isBearerToken(accessToken) { + return !accessToken.tokenType || accessToken.tokenType === "Bearer"; +} +/** + * @internal + * @param accessToken - Access token + * @returns Whether a token is Pop token or not + */ +function isPopToken(accessToken) { + return accessToken.tokenType === "pop"; +} +/** + * Tests an object to determine whether it implements TokenCredential. + * + * @param credential - The assumed TokenCredential to be tested. + */ +function isTokenCredential(credential) { + // Check for an object with a 'getToken' function and possibly with + // a 'signRequest' function. We do this check to make sure that + // a ServiceClientCredentials implementor (like TokenClientCredentials + // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if + // it doesn't actually implement TokenCredential also. + const castCredential = credential; + return (castCredential && + typeof castCredential.getToken === "function" && + (castCredential.signRequest === undefined || castCredential.getToken.length > 0)); } +//# sourceMappingURL=tokenCredential.js.map -module.exports = PoolStats +/***/ }), + +/***/ 94873: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseCAEChallenge = parseCAEChallenge; +exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; +const log_js_1 = __nccwpck_require__(53776); +const base64_js_1 = __nccwpck_require__(23442); +/** + * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. + * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. + * + * @internal + */ +function parseCAEChallenge(challenges) { + const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); + return bearerChallenges.map((challenge) => { + const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); + const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); + // Key-value pairs to plain object: + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); + }); +} +/** + * This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges: + * [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation). + * + * Call the `bearerTokenAuthenticationPolicy` with the following options: + * + * ```ts snippet:AuthorizeRequestOnClaimChallenge + * import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; + * import { authorizeRequestOnClaimChallenge } from "@azure/core-client"; + * + * const policy = bearerTokenAuthenticationPolicy({ + * challengeCallbacks: { + * authorizeRequestOnChallenge: authorizeRequestOnClaimChallenge, + * }, + * scopes: ["https://service/.default"], + * }); + * ``` + * + * Once provided, the `bearerTokenAuthenticationPolicy` policy will internally handle Continuous Access Evaluation (CAE) challenges. + * When it can't complete a challenge it will return the 401 (unauthorized) response from ARM. + * + * Example challenge with claims: + * + * ``` + * Bearer authorization_uri="https://login.windows-ppe.net/", error="invalid_token", + * error_description="User session has been revoked", + * claims="eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbHVlIjoiMTYwMzc0MjgwMCJ9fX0=" + * ``` + */ +async function authorizeRequestOnClaimChallenge(onChallengeOptions) { + const { scopes, response } = onChallengeOptions; + const logger = onChallengeOptions.logger || log_js_1.logger; + const challenge = response.headers.get("WWW-Authenticate"); + if (!challenge) { + logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const challenges = parseCAEChallenge(challenge) || []; + const parsedChallenge = challenges.find((x) => x.claims); + if (!parsedChallenge) { + logger.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); + return false; + } + const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { + claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims), + }); + if (!accessToken) { + return false; + } + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; +} +//# sourceMappingURL=authorizeRequestOnClaimChallenge.js.map /***/ }), -/***/ 4634: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 16576: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.authorizeRequestOnTenantChallenge = void 0; +/** + * A set of constants used internally when processing requests. + */ +const Constants = { + DefaultScope: "/.default", + /** + * Defines constants for use with HTTP headers. + */ + HeaderConstants: { + /** + * The Authorization header. + */ + AUTHORIZATION: "authorization", + }, +}; +function isUuid(text) { + return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(text); +} +/** + * Defines a callback to handle auth challenge for Storage APIs. + * This implements the bearer challenge process described here: https://learn.microsoft.com/rest/api/storageservices/authorize-with-azure-active-directory#bearer-challenge + * Handling has specific features for storage that departs to the general AAD challenge docs. + **/ +const authorizeRequestOnTenantChallenge = async (challengeOptions) => { + const requestOptions = requestToOptions(challengeOptions.request); + const challenge = getChallenge(challengeOptions.response); + if (challenge) { + const challengeInfo = parseChallenge(challenge); + const challengeScopes = buildScopes(challengeOptions, challengeInfo); + const tenantId = extractTenantId(challengeInfo); + if (!tenantId) { + return false; + } + const accessToken = await challengeOptions.getAccessToken(challengeScopes, { + ...requestOptions, + tenantId, + }); + if (!accessToken) { + return false; + } + challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; + } + return false; +}; +exports.authorizeRequestOnTenantChallenge = authorizeRequestOnTenantChallenge; +/** + * Extracts the tenant id from the challenge information + * The tenant id is contained in the authorization_uri as the first + * path part. + */ +function extractTenantId(challengeInfo) { + const parsedAuthUri = new URL(challengeInfo.authorization_uri); + const pathSegments = parsedAuthUri.pathname.split("/"); + const tenantId = pathSegments[1]; + if (tenantId && isUuid(tenantId)) { + return tenantId; + } + return undefined; +} +/** + * Builds the authentication scopes based on the information that comes in the + * challenge information. Scopes url is present in the resource_id, if it is empty + * we keep using the original scopes. + */ +function buildScopes(challengeOptions, challengeInfo) { + if (!challengeInfo.resource_id) { + return challengeOptions.scopes; + } + const challengeScopes = new URL(challengeInfo.resource_id); + challengeScopes.pathname = Constants.DefaultScope; + let scope = challengeScopes.toString(); + if (scope === "https://disk.azure.com/.default") { + // the extra slash is required by the service + scope = "https://disk.azure.com//.default"; + } + return [scope]; +} +/** + * We will retrieve the challenge only if the response status code was 401, + * and if the response contained the header "WWW-Authenticate" with a non-empty value. + */ +function getChallenge(response) { + const challenge = response.headers.get("WWW-Authenticate"); + if (response.status === 401 && challenge) { + return challenge; + } + return; +} +/** + * Converts: `Bearer a="b" c="d"`. + * Into: `[ { a: 'b', c: 'd' }]`. + * + * @internal + */ +function parseChallenge(challenge) { + const bearerChallenge = challenge.slice("Bearer ".length); + const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); + const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); + // Key-value pairs to plain object: + return keyValuePairs.reduce((a, b) => ({ ...a, ...b }), {}); +} +/** + * Extracts the options form a Pipeline Request for later re-use + */ +function requestToOptions(request) { + return { + abortSignal: request.abortSignal, + requestOptions: { + timeout: request.timeout, + }, + tracingOptions: request.tracingOptions, + }; +} +//# sourceMappingURL=authorizeRequestOnTenantChallenge.js.map + +/***/ }), -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(73198) -const Client = __nccwpck_require__(33598) -const { - InvalidArgumentError -} = __nccwpck_require__(48045) -const util = __nccwpck_require__(83983) -const { kUrl, kInterceptors } = __nccwpck_require__(72785) -const buildConnector = __nccwpck_require__(82067) +/***/ 23442: +/***/ ((__unused_webpack_module, exports) => { -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') +"use strict"; -function defaultFactory (origin, opts) { - return new Client(origin, opts) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.encodeString = encodeString; +exports.encodeByteArray = encodeByteArray; +exports.decodeString = decodeString; +exports.decodeStringToString = decodeStringToString; +/** + * Encodes a string in base64 format. + * @param value - the string to encode + * @internal + */ +function encodeString(value) { + return Buffer.from(value).toString("base64"); +} +/** + * Encodes a byte array in base64 format. + * @param value - the Uint8Aray to encode + * @internal + */ +function encodeByteArray(value) { + const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); + return bufferValue.toString("base64"); +} +/** + * Decodes a base64 string into a byte array. + * @param value - the base64 string to decode + * @internal + */ +function decodeString(value) { + return Buffer.from(value, "base64"); +} +/** + * Decodes a base64 string into a string. + * @param value - the base64 string to decode + * @internal + */ +function decodeStringToString(value) { + return Buffer.from(value, "base64").toString(); } +//# sourceMappingURL=base64.js.map -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - super() +/***/ }), - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') - } +/***/ 25315: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } +"use strict"; - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializationPolicyName = void 0; +exports.deserializationPolicy = deserializationPolicy; +const interfaces_js_1 = __nccwpck_require__(8153); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const serializer_js_1 = __nccwpck_require__(63566); +const operationHelpers_js_1 = __nccwpck_require__(62074); +const defaultJsonContentTypes = ["application/json", "text/json"]; +const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; +/** + * The programmatic identifier of the deserializationPolicy. + */ +exports.deserializationPolicyName = "deserializationPolicy"; +/** + * This policy handles parsing out responses according to OperationSpecs on the request. + */ +function deserializationPolicy(options = {}) { + const jsonContentTypes = options.expectedContentTypes?.json ?? defaultJsonContentTypes; + const xmlContentTypes = options.expectedContentTypes?.xml ?? defaultXmlContentTypes; + const parseXML = options.parseXML; + const serializerOptions = options.serializerOptions; + const updatedOptions = { + xml: { + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + }; + return { + name: exports.deserializationPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML); + }, + }; +} +function getOperationResponseMap(parsedResponse) { + let result; + const request = parsedResponse.request; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const operationSpec = operationInfo?.operationSpec; + if (operationSpec) { + if (!operationInfo?.operationResponseGetter) { + result = operationSpec.responses[parsedResponse.status]; + } + else { + result = operationInfo?.operationResponseGetter(operationSpec, parsedResponse); + } } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) + return result; +} +function shouldDeserializeResponse(parsedResponse) { + const request = parsedResponse.request; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const shouldDeserialize = operationInfo?.shouldDeserialize; + let result; + if (shouldDeserialize === undefined) { + result = true; + } + else if (typeof shouldDeserialize === "boolean") { + result = shouldDeserialize; + } + else { + result = shouldDeserialize(parsedResponse); + } + return result; +} +async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) { + const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML); + if (!shouldDeserializeResponse(parsedResponse)) { + return parsedResponse; + } + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); + const operationSpec = operationInfo?.operationSpec; + if (!operationSpec || !operationSpec.responses) { + return parsedResponse; + } + const responseSpec = getOperationResponseMap(parsedResponse); + const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); + if (error) { + throw error; + } + else if (shouldReturnResponse) { + return parsedResponse; + } + // An operation response spec does exist for current status code, so + // use it to deserialize the response. + if (responseSpec) { + if (responseSpec.bodyMapper) { + let valueToDeserialize = parsedResponse.parsedBody; + if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { + valueToDeserialize = + typeof valueToDeserialize === "object" + ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] + : []; + } + try { + parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); + } + catch (deserializeError) { + const restError = new core_rest_pipeline_1.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse, + }); + throw restError; + } + } + else if (operationSpec.httpMethod === "HEAD") { + // head methods never have a body, but we return a boolean to indicate presence/absence of the resource + parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + } + if (responseSpec.headersMapper) { + parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true }); + } + } + return parsedResponse; +} +function isOperationSpecEmpty(operationSpec) { + const expectedStatusCodes = Object.keys(operationSpec.responses); + return (expectedStatusCodes.length === 0 || + (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); +} +function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { + const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; + const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) + ? isSuccessByStatus + : !!responseSpec; + if (isExpectedStatusCode) { + if (responseSpec) { + if (!responseSpec.isError) { + return { error: null, shouldReturnResponse: false }; + } + } + else { + return { error: null, shouldReturnResponse: false }; + } + } + const errorResponseSpec = responseSpec ?? operationSpec.responses.default; + const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) + ? `Unexpected status code: ${parsedResponse.status}` + : parsedResponse.bodyAsText; + const error = new core_rest_pipeline_1.RestError(initialErrorMessage, { + statusCode: parsedResponse.status, + request: parsedResponse.request, + response: parsedResponse, + }); + // If the item failed but there's no error spec or default spec to deserialize the error, + // and the parsed body doesn't look like an error object, + // we should fail so we just throw the parsed response + if (!errorResponseSpec && + !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { + throw error; + } + const defaultBodyMapper = errorResponseSpec?.bodyMapper; + const defaultHeadersMapper = errorResponseSpec?.headersMapper; + try { + // If error response has a body, try to deserialize it using default body mapper. + // Then try to extract error code & message from it + if (parsedResponse.parsedBody) { + const parsedBody = parsedResponse.parsedBody; + let deserializedError; + if (defaultBodyMapper) { + let valueToDeserialize = parsedBody; + if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { + valueToDeserialize = []; + const elementName = defaultBodyMapper.xmlElementName; + if (typeof parsedBody === "object" && elementName) { + valueToDeserialize = parsedBody[elementName]; + } + } + deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options); + } + const internalError = parsedBody.error || deserializedError || parsedBody; + error.code = internalError.code; + if (internalError.message) { + error.message = internalError.message; + } + if (defaultBodyMapper) { + error.response.parsedBody = deserializedError; + } + } + // If error response has headers, try to deserialize it using default header mapper + if (parsedResponse.headers && defaultHeadersMapper) { + error.response.parsedHeaders = + operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); + } + } + catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; + } + return { error, shouldReturnResponse: false }; +} +async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { + if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && + operationResponse.bodyAsText) { + const text = operationResponse.bodyAsText; + const contentType = operationResponse.headers.get("Content-Type") || ""; + const contentComponents = !contentType + ? [] + : contentType.split(";").map((component) => component.toLowerCase()); + try { + if (contentComponents.length === 0 || + contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { + operationResponse.parsedBody = JSON.parse(text); + return operationResponse; + } + else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { + if (!parseXML) { + throw new Error("Parsing XML not supported."); + } + const body = await parseXML(text, opts.xml); + operationResponse.parsedBody = body; + return operationResponse; + } + } + catch (err) { + const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; + const errCode = err.code || core_rest_pipeline_1.RestError.PARSE_ERROR; + const e = new core_rest_pipeline_1.RestError(msg, { + code: errCode, + statusCode: operationResponse.status, + request: operationResponse.request, + response: operationResponse, + }); + throw e; + } } + return operationResponse; +} +//# sourceMappingURL=deserializationPolicy.js.map - this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory - } +/***/ }), - [kGetDispatcher] () { - let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) +/***/ 30308: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (dispatcher) { - return dispatcher - } +"use strict"; - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +let cachedHttpClient; +function getCachedDefaultHttpClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } - - return dispatcher - } + return cachedHttpClient; } - -module.exports = Pool - +//# sourceMappingURL=httpClientCache.js.map /***/ }), -/***/ 97858: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 7611: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.authorizeRequestOnTenantChallenge = exports.authorizeRequestOnClaimChallenge = exports.serializationPolicyName = exports.serializationPolicy = exports.deserializationPolicyName = exports.deserializationPolicy = exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.createClientPipeline = exports.ServiceClient = exports.MapperTypeNames = exports.createSerializer = void 0; +var serializer_js_1 = __nccwpck_require__(63566); +Object.defineProperty(exports, "createSerializer", ({ enumerable: true, get: function () { return serializer_js_1.createSerializer; } })); +Object.defineProperty(exports, "MapperTypeNames", ({ enumerable: true, get: function () { return serializer_js_1.MapperTypeNames; } })); +var serviceClient_js_1 = __nccwpck_require__(28927); +Object.defineProperty(exports, "ServiceClient", ({ enumerable: true, get: function () { return serviceClient_js_1.ServiceClient; } })); +var pipeline_js_1 = __nccwpck_require__(33924); +Object.defineProperty(exports, "createClientPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createClientPipeline; } })); +var interfaces_js_1 = __nccwpck_require__(8153); +Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_ATTRKEY; } })); +Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_CHARKEY; } })); +var deserializationPolicy_js_1 = __nccwpck_require__(25315); +Object.defineProperty(exports, "deserializationPolicy", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicy; } })); +Object.defineProperty(exports, "deserializationPolicyName", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicyName; } })); +var serializationPolicy_js_1 = __nccwpck_require__(96625); +Object.defineProperty(exports, "serializationPolicy", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicy; } })); +Object.defineProperty(exports, "serializationPolicyName", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicyName; } })); +var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(94873); +Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } })); +var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(16576); +Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } })); +//# sourceMappingURL=index.js.map + +/***/ }), -const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(72785) -const { URL } = __nccwpck_require__(57310) -const Agent = __nccwpck_require__(7890) -const Pool = __nccwpck_require__(4634) -const DispatcherBase = __nccwpck_require__(74839) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(48045) -const buildConnector = __nccwpck_require__(82067) +/***/ 41459: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') +"use strict"; -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; +exports.getPathStringFromParameter = getPathStringFromParameter; +const serializer_js_1 = __nccwpck_require__(63566); +/** + * Gets the list of status codes for streaming responses. + * @internal + */ +function getStreamingResponseStatusCodes(operationSpec) { + const result = new Set(); + for (const statusCode in operationSpec.responses) { + const operationResponse = operationSpec.responses[statusCode]; + if (operationResponse.bodyMapper && + operationResponse.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Stream) { + result.add(Number(statusCode)); + } + } + return result; +} +/** + * Get the path to this parameter's value as a dotted string (a.b.c). + * @param parameter - The parameter to get the path string for. + * @returns The path to this parameter's value as a dotted string. + * @internal + */ +function getPathStringFromParameter(parameter) { + const { parameterPath, mapper } = parameter; + let result; + if (typeof parameterPath === "string") { + result = parameterPath; + } + else if (Array.isArray(parameterPath)) { + result = parameterPath.join("."); + } + else { + result = mapper.serializedName; + } + return result; } +//# sourceMappingURL=interfaceHelpers.js.map -function buildProxyOptions (opts) { - if (typeof opts === 'string') { - opts = { uri: opts } - } +/***/ }), - if (!opts || !opts.uri) { - throw new InvalidArgumentError('Proxy opts.uri is mandatory') - } +/***/ 8153: +/***/ ((__unused_webpack_module, exports) => { - return { - uri: opts.uri, - protocol: opts.protocol || 'https' - } -} +"use strict"; -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; +/** + * Default key used to access the XML attributes. + */ +exports.XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +exports.XML_CHARKEY = "_"; +//# sourceMappingURL=interfaces.js.map -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super(opts) - this[kProxy] = buildProxyOptions(opts) - this[kAgent] = new Agent(opts) - this[kInterceptors] = opts.interceptors && opts.interceptors.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) - ? opts.interceptors.ProxyAgent - : [] +/***/ }), - if (typeof opts === 'string') { - opts = { uri: opts } - } +/***/ 53776: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (!opts || !opts.uri) { - throw new InvalidArgumentError('Proxy opts.uri is mandatory') - } +"use strict"; - const { clientFactory = defaultFactory } = opts +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); +exports.logger = (0, logger_1.createClientLogger)("core-client"); +//# sourceMappingURL=log.js.map - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') - } +/***/ }), - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} +/***/ 62074: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const resolvedUrl = new URL(opts.uri) - const { origin, port, host, username, password } = resolvedUrl +"use strict"; - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; +exports.getOperationRequestInfo = getOperationRequestInfo; +const state_js_1 = __nccwpck_require__(35429); +/** + * @internal + * Retrieves the value to use for a given operation argument + * @param operationArguments - The arguments passed from the generated client + * @param parameter - The parameter description + * @param fallbackObject - If something isn't found in the arguments bag, look here. + * Generally used to look at the service client properties. + */ +function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { + let parameterPath = parameter.parameterPath; + const parameterMapper = parameter.mapper; + let value; + if (typeof parameterPath === "string") { + parameterPath = [parameterPath]; } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - this[kClient] = clientFactory(resolvedUrl, { connect }) - this[kAgent] = new Agent({ - ...opts, - connect: async (opts, callback) => { - let requestedHost = opts.host - if (!opts.port) { - requestedHost += `:${defaultProtocolPort(opts.protocol)}` + if (Array.isArray(parameterPath)) { + if (parameterPath.length > 0) { + if (parameterMapper.isConstant) { + value = parameterMapper.defaultValue; + } + else { + let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); + if (!propertySearchResult.propertyFound && fallbackObject) { + propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); + } + let useDefaultValue = false; + if (!propertySearchResult.propertyFound) { + useDefaultValue = + parameterMapper.required || + (parameterPath[0] === "options" && parameterPath.length === 2); + } + value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; + } } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedHost, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host + } + else { + if (parameterMapper.required) { + value = {}; + } + for (const propertyName in parameterPath) { + const propertyMapper = parameterMapper.type.modelProperties[propertyName]; + const propertyPath = parameterPath[propertyName]; + const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { + parameterPath: propertyPath, + mapper: propertyMapper, + }, fallbackObject); + if (propertyValue !== undefined) { + if (!value) { + value = {}; + } + value[propertyName] = propertyValue; } - }) - if (statusCode !== 200) { - socket.on('error', () => {}).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) - } - if (opts.protocol !== 'https:') { - callback(null, socket) - return - } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername - } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - callback(err) } - } - }) - } - - dispatch (opts, handler) { - const { host } = new URL(opts.origin) - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - return this[kAgent].dispatch( - { - ...opts, - headers: { - ...headers, - host + } + return value; +} +function getPropertyFromParameterPath(parent, parameterPath) { + const result = { propertyFound: false }; + let i = 0; + for (; i < parameterPath.length; ++i) { + const parameterPathPart = parameterPath[i]; + // Make sure to check inherited properties too, so don't use hasOwnProperty(). + if (parent && parameterPathPart in parent) { + parent = parent[parameterPathPart]; } - }, - handler - ) - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } + else { + break; + } + } + if (i === parameterPath.length) { + result.propertyValue = parent; + result.propertyFound = true; + } + return result; } - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function buildHeaders (headers) { - // When using undici.fetch, the headers list is stored - // as an array. - if (Array.isArray(headers)) { - /** @type {Record} */ - const headersPair = {} - - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1] +const originalRequestSymbol = Symbol.for("@azure/core-client original request"); +function hasOriginalRequest(request) { + return originalRequestSymbol in request; +} +function getOperationRequestInfo(request) { + if (hasOriginalRequest(request)) { + return getOperationRequestInfo(request[originalRequestSymbol]); + } + let info = state_js_1.state.operationRequestMap.get(request); + if (!info) { + info = {}; + state_js_1.state.operationRequestMap.set(request, info); } + return info; +} +//# sourceMappingURL=operationHelpers.js.map - return headersPair - } +/***/ }), - return headers -} +/***/ 33924: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createClientPipeline = createClientPipeline; +const deserializationPolicy_js_1 = __nccwpck_require__(25315); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const serializationPolicy_js_1 = __nccwpck_require__(96625); /** - * @param {Record} headers - * - * Previous versions of ProxyAgent suggests the Proxy-Authorization in request headers - * Nevertheless, it was changed and to avoid a security vulnerability by end users - * this check was created. - * It should be removed in the next major version for performance reasons + * Creates a new Pipeline for use with a Service Client. + * Adds in deserializationPolicy by default. + * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential. + * @param options - Options to customize the created pipeline. */ -function throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') - } +function createClientPipeline(options = {}) { + const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options ?? {}); + if (options.credentialOptions) { + pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential: options.credentialOptions.credential, + scopes: options.credentialOptions.credentialScopes, + })); + } + pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); + pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { + phase: "Deserialize", + }); + return pipeline; } - -module.exports = ProxyAgent - +//# sourceMappingURL=pipeline.js.map /***/ }), -/***/ 29459: -/***/ ((module) => { +/***/ 96625: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializationPolicyName = void 0; +exports.serializationPolicy = serializationPolicy; +exports.serializeHeaders = serializeHeaders; +exports.serializeRequestBody = serializeRequestBody; +const interfaces_js_1 = __nccwpck_require__(8153); +const operationHelpers_js_1 = __nccwpck_require__(62074); +const serializer_js_1 = __nccwpck_require__(63566); +const interfaceHelpers_js_1 = __nccwpck_require__(41459); +/** + * The programmatic identifier of the serializationPolicy. + */ +exports.serializationPolicyName = "serializationPolicy"; +/** + * This policy handles assembling the request body and headers using + * an OperationSpec and OperationArguments on the request. + */ +function serializationPolicy(options = {}) { + const stringifyXML = options.stringifyXML; + return { + name: exports.serializationPolicyName, + async sendRequest(request, next) { + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + const operationSpec = operationInfo?.operationSpec; + const operationArguments = operationInfo?.operationArguments; + if (operationSpec && operationArguments) { + serializeHeaders(request, operationArguments, operationSpec); + serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); + } + return next(request); + }, + }; +} +/** + * @internal + */ +function serializeHeaders(request, operationArguments, operationSpec) { + if (operationSpec.headerParameters) { + for (const headerParameter of operationSpec.headerParameters) { + let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); + if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) { + headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter)); + const headerCollectionPrefix = headerParameter.mapper + .headerCollectionPrefix; + if (headerCollectionPrefix) { + for (const key of Object.keys(headerValue)) { + request.headers.set(headerCollectionPrefix + key, headerValue[key]); + } + } + else { + request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter), headerValue); + } + } + } + } + const customHeaders = operationArguments.options?.requestOptions?.customHeaders; + if (customHeaders) { + for (const customHeaderName of Object.keys(customHeaders)) { + request.headers.set(customHeaderName, customHeaders[customHeaderName]); + } + } +} +/** + * @internal + */ +function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () { + throw new Error("XML serialization unsupported!"); +}) { + const serializerOptions = operationArguments.options?.serializerOptions; + const updatedOptions = { + xml: { + rootName: serializerOptions?.xml.rootName ?? "", + includeRoot: serializerOptions?.xml.includeRoot ?? false, + xmlCharKey: serializerOptions?.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + }; + const xmlCharKey = updatedOptions.xml.xmlCharKey; + if (operationSpec.requestBody && operationSpec.requestBody.mapper) { + request.body = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); + const bodyMapper = operationSpec.requestBody.mapper; + const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable, } = bodyMapper; + const typeName = bodyMapper.type.name; + try { + if ((request.body !== undefined && request.body !== null) || + (nullable && request.body === null) || + required) { + const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); + request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); + const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; + if (operationSpec.isXML) { + const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; + const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); + if (typeName === serializer_js_1.MapperTypeNames.Sequence) { + request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); + } + else if (!isStream) { + request.body = stringifyXML(value, { + rootName: xmlName || serializedName, + xmlCharKey, + }); + } + } + else if (typeName === serializer_js_1.MapperTypeNames.String && + (operationSpec.contentType?.match("text/plain") || operationSpec.mediaType === "text")) { + // the String serializer has validated that request body is a string + // so just send the string. + return; + } + else if (!isStream) { + request.body = JSON.stringify(request.body); + } + } + } + catch (error) { + throw new Error(`Error "${error.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, " ")}.`); + } + } + else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { + request.formData = {}; + for (const formDataParameter of operationSpec.formDataParameters) { + const formDataParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); + if (formDataParameterValue !== undefined && formDataParameterValue !== null) { + const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter); + request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter), updatedOptions); + } + } + } +} +/** + * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself + */ +function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { + // Composite and Sequence schemas already got their root namespace set during serialization + // We just need to add xmlns to the other schema types + if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { + const result = {}; + result[options.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; + return result; + } + return serializedValue; +} +function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { + if (!Array.isArray(obj)) { + obj = [obj]; + } + if (!xmlNamespaceKey || !xmlNamespace) { + return { [elementName]: obj }; + } + const result = { [elementName]: obj }; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; + return result; +} +//# sourceMappingURL=serializationPolicy.js.map -let fastNow = Date.now() -let fastNowTimeout - -const fastTimers = [] +/***/ }), -function onTimeout () { - fastNow = Date.now() +/***/ 63566: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - let len = fastTimers.length - let idx = 0 - while (idx < len) { - const timer = fastTimers[idx] +"use strict"; - if (timer.state === 0) { - timer.state = fastNow + timer.delay - } else if (timer.state > 0 && fastNow >= timer.state) { - timer.state = -1 - timer.callback(timer.opaque) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MapperTypeNames = void 0; +exports.createSerializer = createSerializer; +const tslib_1 = __nccwpck_require__(4351); +const base64 = tslib_1.__importStar(__nccwpck_require__(23442)); +const interfaces_js_1 = __nccwpck_require__(8153); +const utils_js_1 = __nccwpck_require__(25363); +class SerializerImpl { + modelMappers; + isXML; + constructor(modelMappers = {}, isXML = false) { + this.modelMappers = modelMappers; + this.isXML = isXML; } - - if (timer.state === -1) { - timer.state = -2 - if (idx !== len - 1) { - fastTimers[idx] = fastTimers.pop() - } else { - fastTimers.pop() - } - len -= 1 - } else { - idx += 1 + /** + * @deprecated Removing the constraints validation on client side. + */ + validateConstraints(mapper, value, objectName) { + const failValidation = (constraintName, constraintValue) => { + throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); + }; + if (mapper.constraints && value !== undefined && value !== null) { + const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints; + if (ExclusiveMaximum !== undefined && value >= ExclusiveMaximum) { + failValidation("ExclusiveMaximum", ExclusiveMaximum); + } + if (ExclusiveMinimum !== undefined && value <= ExclusiveMinimum) { + failValidation("ExclusiveMinimum", ExclusiveMinimum); + } + if (InclusiveMaximum !== undefined && value > InclusiveMaximum) { + failValidation("InclusiveMaximum", InclusiveMaximum); + } + if (InclusiveMinimum !== undefined && value < InclusiveMinimum) { + failValidation("InclusiveMinimum", InclusiveMinimum); + } + if (MaxItems !== undefined && value.length > MaxItems) { + failValidation("MaxItems", MaxItems); + } + if (MaxLength !== undefined && value.length > MaxLength) { + failValidation("MaxLength", MaxLength); + } + if (MinItems !== undefined && value.length < MinItems) { + failValidation("MinItems", MinItems); + } + if (MinLength !== undefined && value.length < MinLength) { + failValidation("MinLength", MinLength); + } + if (MultipleOf !== undefined && value % MultipleOf !== 0) { + failValidation("MultipleOf", MultipleOf); + } + if (Pattern) { + const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; + if (typeof value !== "string" || value.match(pattern) === null) { + failValidation("Pattern", Pattern); + } + } + if (UniqueItems && + value.some((item, i, ar) => ar.indexOf(item) !== i)) { + failValidation("UniqueItems", UniqueItems); + } + } + } + /** + * Serialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param object - A valid Javascript object to be serialized + * + * @param objectName - Name of the serialized object + * + * @param options - additional options to serialization + * + * @returns A valid serialized Javascript object + */ + serialize(mapper, object, objectName, options = { xml: {} }) { + const updatedOptions = { + xml: { + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + }; + let payload = {}; + const mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Sequence$/i) !== null) { + payload = []; + } + if (mapper.isConstant) { + object = mapper.defaultValue; + } + // This table of allowed values should help explain + // the mapper.required and mapper.nullable properties. + // X means "neither undefined or null are allowed". + // || required + // || true | false + // nullable || ========================== + // true || null | undefined/null + // false || X | undefined + // undefined || X | undefined/null + const { required, nullable } = mapper; + if (required && nullable && object === undefined) { + throw new Error(`${objectName} cannot be undefined.`); + } + if (required && !nullable && (object === undefined || object === null)) { + throw new Error(`${objectName} cannot be null or undefined.`); + } + if (!required && nullable === false && object === null) { + throw new Error(`${objectName} cannot be null.`); + } + if (object === undefined || object === null) { + payload = object; + } + else { + if (mapperType.match(/^any$/i) !== null) { + payload = object; + } + else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { + payload = serializeBasicTypes(mapperType, objectName, object); + } + else if (mapperType.match(/^Enum$/i) !== null) { + const enumMapper = mapper; + payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); + } + else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { + payload = serializeDateTypes(mapperType, object, objectName); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = serializeByteArrayType(objectName, object); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = serializeBase64UrlType(objectName, object); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + else if (mapperType.match(/^Composite$/i) !== null) { + payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); + } + } + return payload; + } + /** + * Deserialize the given object based on its metadata defined in the mapper + * + * @param mapper - The mapper which defines the metadata of the serializable object + * + * @param responseBody - A valid Javascript entity to be deserialized + * + * @param objectName - Name of the deserialized object + * + * @param options - Controls behavior of XML parser and builder. + * + * @returns A valid deserialized Javascript object + */ + deserialize(mapper, responseBody, objectName, options = { xml: {} }) { + const updatedOptions = { + xml: { + rootName: options.xml.rootName ?? "", + includeRoot: options.xml.includeRoot ?? false, + xmlCharKey: options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY, + }, + ignoreUnknownProperties: options.ignoreUnknownProperties ?? false, + }; + if (responseBody === undefined || responseBody === null) { + if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { + // Edge case for empty XML non-wrapped lists. xml2js can't distinguish + // between the list being empty versus being missing, + // so let's do the more user-friendly thing and return an empty list. + responseBody = []; + } + // specifically check for undefined as default value can be a falsey value `0, "", false, null` + if (mapper.defaultValue !== undefined) { + responseBody = mapper.defaultValue; + } + return responseBody; + } + let payload; + const mapperType = mapper.type.name; + if (!objectName) { + objectName = mapper.serializedName; + } + if (mapperType.match(/^Composite$/i) !== null) { + payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); + } + else { + if (this.isXML) { + const xmlCharKey = updatedOptions.xml.xmlCharKey; + /** + * If the mapper specifies this as a non-composite type value but the responseBody contains + * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, + * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. + */ + if (responseBody[interfaces_js_1.XML_ATTRKEY] !== undefined && responseBody[xmlCharKey] !== undefined) { + responseBody = responseBody[xmlCharKey]; + } + } + if (mapperType.match(/^Number$/i) !== null) { + payload = parseFloat(responseBody); + if (isNaN(payload)) { + payload = responseBody; + } + } + else if (mapperType.match(/^Boolean$/i) !== null) { + if (responseBody === "true") { + payload = true; + } + else if (responseBody === "false") { + payload = false; + } + else { + payload = responseBody; + } + } + else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { + payload = responseBody; + } + else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { + payload = new Date(responseBody); + } + else if (mapperType.match(/^UnixTime$/i) !== null) { + payload = unixTimeToDate(responseBody); + } + else if (mapperType.match(/^ByteArray$/i) !== null) { + payload = base64.decodeString(responseBody); + } + else if (mapperType.match(/^Base64Url$/i) !== null) { + payload = base64UrlToByteArray(responseBody); + } + else if (mapperType.match(/^Sequence$/i) !== null) { + payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); + } + else if (mapperType.match(/^Dictionary$/i) !== null) { + payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); + } + } + if (mapper.isConstant) { + payload = mapper.defaultValue; + } + return payload; + } +} +/** + * Method that creates and returns a Serializer. + * @param modelMappers - Known models to map + * @param isXML - If XML should be supported + */ +function createSerializer(modelMappers = {}, isXML = false) { + return new SerializerImpl(modelMappers, isXML); +} +function trimEnd(str, ch) { + let len = str.length; + while (len - 1 >= 0 && str[len - 1] === ch) { + --len; + } + return str.substr(0, len); +} +function bufferToBase64Url(buffer) { + if (!buffer) { + return undefined; + } + if (!(buffer instanceof Uint8Array)) { + throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); + } + // Uint8Array to Base64. + const str = base64.encodeByteArray(buffer); + // Base64 to Base64Url. + return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); +} +function base64UrlToByteArray(str) { + if (!str) { + return undefined; + } + if (str && typeof str.valueOf() !== "string") { + throw new Error("Please provide an input of type string for converting to Uint8Array"); + } + // Base64Url to Base64. + str = str.replace(/-/g, "+").replace(/_/g, "/"); + // Base64 to Uint8Array. + return base64.decodeString(str); +} +function splitSerializeName(prop) { + const classes = []; + let partialclass = ""; + if (prop) { + const subwords = prop.split("."); + for (const item of subwords) { + if (item.charAt(item.length - 1) === "\\") { + partialclass += item.substr(0, item.length - 1) + "."; + } + else { + partialclass += item; + classes.push(partialclass); + partialclass = ""; + } + } + } + return classes; +} +function dateToUnixTime(d) { + if (!d) { + return undefined; + } + if (typeof d.valueOf() === "string") { + d = new Date(d); + } + return Math.floor(d.getTime() / 1000); +} +function unixTimeToDate(n) { + if (!n) { + return undefined; + } + return new Date(n * 1000); +} +function serializeBasicTypes(typeName, objectName, value) { + if (value !== null && value !== undefined) { + if (typeName.match(/^Number$/i) !== null) { + if (typeof value !== "number") { + throw new Error(`${objectName} with value ${value} must be of type number.`); + } + } + else if (typeName.match(/^String$/i) !== null) { + if (typeof value.valueOf() !== "string") { + throw new Error(`${objectName} with value "${value}" must be of type string.`); + } + } + else if (typeName.match(/^Uuid$/i) !== null) { + if (!(typeof value.valueOf() === "string" && (0, utils_js_1.isValidUuid)(value))) { + throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); + } + } + else if (typeName.match(/^Boolean$/i) !== null) { + if (typeof value !== "boolean") { + throw new Error(`${objectName} with value ${value} must be of type boolean.`); + } + } + else if (typeName.match(/^Stream$/i) !== null) { + const objectType = typeof value; + if (objectType !== "string" && + typeof value.pipe !== "function" && // NodeJS.ReadableStream + typeof value.tee !== "function" && // browser ReadableStream + !(value instanceof ArrayBuffer) && + !ArrayBuffer.isView(value) && + // File objects count as a type of Blob, so we want to use instanceof explicitly + !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && + objectType !== "function") { + throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); + } + } + } + return value; +} +function serializeEnumType(objectName, allowedValues, value) { + if (!allowedValues) { + throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); + } + const isPresent = allowedValues.some((item) => { + if (typeof item.valueOf() === "string") { + return item.toLowerCase() === value.toLowerCase(); + } + return item === value; + }); + if (!isPresent) { + throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); + } + return value; +} +function serializeByteArrayType(objectName, value) { + if (value !== undefined && value !== null) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); + } + value = base64.encodeByteArray(value); + } + return value; +} +function serializeBase64UrlType(objectName, value) { + if (value !== undefined && value !== null) { + if (!(value instanceof Uint8Array)) { + throw new Error(`${objectName} must be of type Uint8Array.`); + } + value = bufferToBase64Url(value); + } + return value; +} +function serializeDateTypes(typeName, value, objectName) { + if (value !== undefined && value !== null) { + if (typeName.match(/^Date$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = + value instanceof Date + ? value.toISOString().substring(0, 10) + : new Date(value).toISOString().substring(0, 10); + } + else if (typeName.match(/^DateTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + } + value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); + } + else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); + } + value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); + } + else if (typeName.match(/^UnixTime$/i) !== null) { + if (!(value instanceof Date || + (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { + throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` + + `for it to be serialized in UnixTime/Epoch format.`); + } + value = dateToUnixTime(value); + } + else if (typeName.match(/^TimeSpan$/i) !== null) { + if (!(0, utils_js_1.isDuration)(value)) { + throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); + } + } } - } - - if (fastTimers.length > 0) { - refreshTimeout() - } + return value; } - -function refreshTimeout () { - if (fastNowTimeout && fastNowTimeout.refresh) { - fastNowTimeout.refresh() - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTimeout, 1e3) - if (fastNowTimeout.unref) { - fastNowTimeout.unref() +function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { + if (!Array.isArray(object)) { + throw new Error(`${objectName} must be of type Array.`); } - } -} - -class Timeout { - constructor (callback, delay, opaque) { - this.callback = callback - this.delay = delay - this.opaque = opaque - - // -2 not in timer list - // -1 in timer list but inactive - // 0 in timer list waiting for time - // > 0 in timer list waiting for time to expire - this.state = -2 - - this.refresh() - } - - refresh () { - if (this.state === -2) { - fastTimers.push(this) - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() - } + let elementType = mapper.type.element; + if (!elementType || typeof elementType !== "object") { + throw new Error(`element" metadata for an Array must be defined in the ` + + `mapper and it must of type "object" in ${objectName}.`); } - - this.state = 0 - } - - clear () { - this.state = -1 - } -} - -module.exports = { - setTimeout (callback, delay, opaque) { - return delay < 1e3 - ? setTimeout(callback, delay, opaque) - : new Timeout(callback, delay, opaque) - }, - clearTimeout (timeout) { - if (timeout instanceof Timeout) { - timeout.clear() - } else { - clearTimeout(timeout) + // Quirk: Composite mappers referenced by `element` might + // not have *all* properties declared (like uberParent), + // so let's try to look up the full definition by name. + if (elementType.type.name === "Composite" && elementType.type.className) { + elementType = serializer.modelMappers[elementType.type.className] ?? elementType; } - } + const tempArray = []; + for (let i = 0; i < object.length; i++) { + const serializedValue = serializer.serialize(elementType, object[i], objectName, options); + if (isXml && elementType.xmlNamespace) { + const xmlnsKey = elementType.xmlNamespacePrefix + ? `xmlns:${elementType.xmlNamespacePrefix}` + : "xmlns"; + if (elementType.type.name === "Composite") { + tempArray[i] = { ...serializedValue }; + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + } + else { + tempArray[i] = {}; + tempArray[i][options.xml.xmlCharKey] = serializedValue; + tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + } + } + else { + tempArray[i] = serializedValue; + } + } + return tempArray; } - - -/***/ }), - -/***/ 35354: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const diagnosticsChannel = __nccwpck_require__(67643) -const { uid, states } = __nccwpck_require__(19188) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose -} = __nccwpck_require__(37578) -const { fireEvent, failWebsocketConnection } = __nccwpck_require__(25515) -const { CloseEvent } = __nccwpck_require__(52611) -const { makeRequest } = __nccwpck_require__(48359) -const { fetching } = __nccwpck_require__(74881) -const { Headers } = __nccwpck_require__(10554) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { kHeadersList } = __nccwpck_require__(72785) - -const channels = {} -channels.open = diagnosticsChannel.channel('undici:websocket:open') -channels.close = diagnosticsChannel.channel('undici:websocket:close') -channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(6113) -} catch { - +function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { + if (typeof object !== "object") { + throw new Error(`${objectName} must be of type object.`); + } + const valueType = mapper.type.value; + if (!valueType || typeof valueType !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the ` + + `mapper and it must of type "object" in ${objectName}.`); + } + const tempDictionary = {}; + for (const key of Object.keys(object)) { + const serializedValue = serializer.serialize(valueType, object[key], objectName, options); + // If the element needs an XML namespace we need to add it within the $ property + tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); + } + // Add the namespace to the root element if needed + if (isXml && mapper.xmlNamespace) { + const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; + const result = tempDictionary; + result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; + return result; + } + return tempDictionary; } - /** - * @see https://websockets.spec.whatwg.org/#concept-websocket-establish - * @param {URL} url - * @param {string|string[]} protocols - * @param {import('./websocket').WebSocket} ws - * @param {(response: any) => void} onEstablish - * @param {Partial} options + * Resolves the additionalProperties property from a referenced mapper + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve + * @param objectName - name of the object being serialized */ -function establishWebSocketConnection (url, protocols, ws, onEstablish, options) { - // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s - // scheme is "ws", and to "https" otherwise. - const requestURL = url - - requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' - - // 2. Let request be a new request, whose URL is requestURL, client is client, - // service-workers mode is "none", referrer is "no-referrer", mode is - // "websocket", credentials mode is "include", cache mode is "no-store" , - // and redirect mode is "error". - const request = makeRequest({ - urlList: [requestURL], - serviceWorkers: 'none', - referrer: 'no-referrer', - mode: 'websocket', - credentials: 'include', - cache: 'no-store', - redirect: 'error' - }) - - // Note: undici extension, allow setting custom headers. - if (options.headers) { - const headersList = new Headers(options.headers)[kHeadersList] - - request.headersList = headersList - } - - // 3. Append (`Upgrade`, `websocket`) to request’s header list. - // 4. Append (`Connection`, `Upgrade`) to request’s header list. - // Note: both of these are handled by undici currently. - // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 - - // 5. Let keyValue be a nonce consisting of a randomly selected - // 16-byte value that has been forgiving-base64-encoded and - // isomorphic encoded. - const keyValue = crypto.randomBytes(16).toString('base64') - - // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s - // header list. - request.headersList.append('sec-websocket-key', keyValue) - - // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s - // header list. - request.headersList.append('sec-websocket-version', '13') - - // 8. For each protocol in protocols, combine - // (`Sec-WebSocket-Protocol`, protocol) in request’s header - // list. - for (const protocol of protocols) { - request.headersList.append('sec-websocket-protocol', protocol) - } - - // 9. Let permessageDeflate be a user-agent defined - // "permessage-deflate" extension header value. - // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 - // TODO: enable once permessage-deflate is supported - const permessageDeflate = '' // 'permessage-deflate; 15' - - // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to - // request’s header list. - // request.headersList.append('sec-websocket-extensions', permessageDeflate) - - // 11. Fetch request with useParallelQueue set to true, and - // processResponse given response being these steps: - const controller = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher ?? getGlobalDispatcher(), - processResponse (response) { - // 1. If response is a network error or its status is not 101, - // fail the WebSocket connection. - if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(ws, 'Received network error or non-101 status code.') - return - } - - // 2. If protocols is not the empty list and extracting header - // list values given `Sec-WebSocket-Protocol` and response’s - // header list results in null, failure, or the empty byte - // sequence, then fail the WebSocket connection. - if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Server did not respond with sent protocols.') - return - } - - // 3. Follow the requirements stated step 2 to step 6, inclusive, - // of the last set of steps in section 4.1 of The WebSocket - // Protocol to validate response. This either results in fail - // the WebSocket connection or the WebSocket connection is - // established. - - // 2. If the response lacks an |Upgrade| header field or the |Upgrade| - // header field contains a value that is not an ASCII case- - // insensitive match for the value "websocket", the client MUST - // _Fail the WebSocket Connection_. - if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { - failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') - return - } - - // 3. If the response lacks a |Connection| header field or the - // |Connection| header field doesn't contain a token that is an - // ASCII case-insensitive match for the value "Upgrade", the client - // MUST _Fail the WebSocket Connection_. - if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { - failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') - return - } - - // 4. If the response lacks a |Sec-WebSocket-Accept| header field or - // the |Sec-WebSocket-Accept| contains a value other than the - // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- - // Key| (as a string, not base64-decoded) with the string "258EAFA5- - // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and - // trailing whitespace, the client MUST _Fail the WebSocket - // Connection_. - const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') - const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') - return - } - - // 5. If the response includes a |Sec-WebSocket-Extensions| header - // field and this header field indicates the use of an extension - // that was not present in the client's handshake (the server has - // indicated an extension not requested by the client), the client - // MUST _Fail the WebSocket Connection_. (The parsing of this - // header field to determine which extensions are requested is - // discussed in Section 9.1.) - const secExtension = response.headersList.get('Sec-WebSocket-Extensions') - - if (secExtension !== null && secExtension !== permessageDeflate) { - failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') - return - } - - // 6. If the response includes a |Sec-WebSocket-Protocol| header field - // and this header field indicates the use of a subprotocol that was - // not present in the client's handshake (the server has indicated a - // subprotocol not requested by the client), the client MUST _Fail - // the WebSocket Connection_. - const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') - - if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) - } - - onEstablish(response) +function resolveAdditionalProperties(serializer, mapper, objectName) { + const additionalProperties = mapper.type.additionalProperties; + if (!additionalProperties && mapper.type.className) { + const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + return modelMapper?.type.additionalProperties; } - }) - - return controller + return additionalProperties; } - /** - * @param {Buffer} chunk + * Finds the mapper referenced by className + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve + * @param objectName - name of the object being serialized */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } +function resolveReferencedMapper(serializer, mapper, objectName) { + const className = mapper.type.className; + if (!className) { + throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, undefined, 2)}".`); + } + return serializer.modelMappers[className]; } - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 + * Resolves a composite mapper's modelProperties. + * @param serializer - the serializer containing the entire set of mappers + * @param mapper - the composite mapper to resolve */ -function onSocketClose () { - const { ws } = this - - // If the TCP connection was closed after the - // WebSocket closing handshake was completed, the WebSocket connection - // is said to have been closed _cleanly_. - const wasClean = ws[kSentClose] && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kSentClose]) { - // If _The WebSocket - // Connection is Closed_ and no Close control frame was received by the - // endpoint (such as could occur if the underlying transport connection - // is lost), _The WebSocket Connection Close Code_ is considered to be - // 1006. - code = 1006 - } - - // 1. Change the ready state to CLOSED (3). - ws[kReadyState] = states.CLOSED - - // 2. If the user agent was required to fail the WebSocket - // connection, or if the WebSocket connection was closed - // after being flagged as full, fire an event named error - // at the WebSocket object. - // TODO - - // 3. Fire an event named close at the WebSocket object, - // using CloseEvent, with the wasClean attribute - // initialized to true if the connection closed cleanly - // and false otherwise, the code attribute initialized to - // the WebSocket connection close code, and the reason - // attribute initialized to the result of applying UTF-8 - // decode without BOM to the WebSocket connection close - // reason. - fireEvent('close', ws, CloseEvent, { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection -} - - -/***/ }), - -/***/ 19188: -/***/ ((module) => { - -"use strict"; - - -// This is a Globally Unique Identifier unique used -// to validate that the endpoint accepts websocket -// connections. -// See https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 -const uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 +function resolveModelProperties(serializer, mapper, objectName) { + let modelProps = mapper.type.modelProperties; + if (!modelProps) { + const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); + if (!modelMapper) { + throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); + } + modelProps = modelMapper?.type.modelProperties; + if (!modelProps) { + throw new Error(`modelProperties cannot be null or undefined in the ` + + `mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); + } + } + return modelProps; } - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA +function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); + } + if (object !== undefined && object !== null) { + const payload = {}; + const modelProps = resolveModelProperties(serializer, mapper, objectName); + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + if (propertyMapper.readOnly) { + continue; + } + let propName; + let parentObject = payload; + if (serializer.isXML) { + if (propertyMapper.xmlIsWrapped) { + propName = propertyMapper.xmlName; + } + else { + propName = propertyMapper.xmlElementName || propertyMapper.xmlName; + } + } + else { + const paths = splitSerializeName(propertyMapper.serializedName); + propName = paths.pop(); + for (const pathName of paths) { + const childObject = parentObject[pathName]; + if ((childObject === undefined || childObject === null) && + ((object[key] !== undefined && object[key] !== null) || + propertyMapper.defaultValue !== undefined)) { + parentObject[pathName] = {}; + } + parentObject = parentObject[pathName]; + } + } + if (parentObject !== undefined && parentObject !== null) { + if (isXml && mapper.xmlNamespace) { + const xmlnsKey = mapper.xmlNamespacePrefix + ? `xmlns:${mapper.xmlNamespacePrefix}` + : "xmlns"; + parentObject[interfaces_js_1.XML_ATTRKEY] = { + ...parentObject[interfaces_js_1.XML_ATTRKEY], + [xmlnsKey]: mapper.xmlNamespace, + }; + } + const propertyObjectName = propertyMapper.serializedName !== "" + ? objectName + "." + propertyMapper.serializedName + : objectName; + let toSerialize = object[key]; + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator && + polymorphicDiscriminator.clientName === key && + (toSerialize === undefined || toSerialize === null)) { + toSerialize = mapper.serializedName; + } + const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); + if (serializedValue !== undefined && propName !== undefined && propName !== null) { + const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); + if (isXml && propertyMapper.xmlIsAttribute) { + // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js. + // This keeps things simple while preventing name collision + // with names in user documents. + parentObject[interfaces_js_1.XML_ATTRKEY] = parentObject[interfaces_js_1.XML_ATTRKEY] || {}; + parentObject[interfaces_js_1.XML_ATTRKEY][propName] = serializedValue; + } + else if (isXml && propertyMapper.xmlIsWrapped) { + parentObject[propName] = { [propertyMapper.xmlElementName]: value }; + } + else { + parentObject[propName] = value; + } + } + } + } + const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); + if (additionalPropertiesMapper) { + const propNames = Object.keys(modelProps); + for (const clientPropName in object) { + const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); + if (isAdditionalProperty) { + payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); + } + } + } + return payload; + } + return object; } - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 +function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { + if (!isXml || !propertyMapper.xmlNamespace) { + return serializedValue; + } + const xmlnsKey = propertyMapper.xmlNamespacePrefix + ? `xmlns:${propertyMapper.xmlNamespacePrefix}` + : "xmlns"; + const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; + if (["Composite"].includes(propertyMapper.type.name)) { + if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { + return serializedValue; + } + else { + const result = { ...serializedValue }; + result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; + return result; + } + } + const result = {}; + result[options.xml.xmlCharKey] = serializedValue; + result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; + return result; } - -const emptyBuffer = Buffer.allocUnsafe(0) - -module.exports = { - uid, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer +function isSpecialXmlProperty(propertyName, options) { + return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); } - - -/***/ }), - -/***/ 52611: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { webidl } = __nccwpck_require__(21744) -const { kEnumerableProperty } = __nccwpck_require__(83983) -const { MessagePort } = __nccwpck_require__(71267) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.MessageEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, MessageEvent) - - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports) +function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { + const xmlCharKey = options.xml.xmlCharKey ?? interfaces_js_1.XML_CHARKEY; + if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { + mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } - - return this.#eventInit.ports - } - - initMessageEvent ( - type, - bubbles = false, - cancelable = false, - data = null, - origin = '', - lastEventId = '', - source = null, - ports = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' }) - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } -} - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } + const modelProps = resolveModelProperties(serializer, mapper, objectName); + let instance = {}; + const handledPropertyNames = []; + for (const key of Object.keys(modelProps)) { + const propertyMapper = modelProps[key]; + const paths = splitSerializeName(modelProps[key].serializedName); + handledPropertyNames.push(paths[0]); + const { serializedName, xmlName, xmlElementName } = propertyMapper; + let propertyObjectName = objectName; + if (serializedName !== "" && serializedName !== undefined) { + propertyObjectName = objectName + "." + serializedName; + } + const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; + if (headerCollectionPrefix) { + const dictionary = {}; + for (const headerKey of Object.keys(responseBody)) { + if (headerKey.startsWith(headerCollectionPrefix)) { + dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); + } + handledPropertyNames.push(headerKey); + } + instance[key] = dictionary; + } + else if (serializer.isXML) { + if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1.XML_ATTRKEY]) { + instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1.XML_ATTRKEY][xmlName], propertyObjectName, options); + } + else if (propertyMapper.xmlIsMsText) { + if (responseBody[xmlCharKey] !== undefined) { + instance[key] = responseBody[xmlCharKey]; + } + else if (typeof responseBody === "string") { + // The special case where xml parser parses "content" into JSON of + // `{ name: "content"}` instead of `{ name: { "_": "content" }}` + instance[key] = responseBody; + } + } + else { + const propertyName = xmlElementName || xmlName || serializedName; + if (propertyMapper.xmlIsWrapped) { + /* a list of wrapped by + For the xml example below + + ... + ... + + the responseBody has + { + Cors: { + CorsRule: [{...}, {...}] + } + } + xmlName is "Cors" and xmlElementName is"CorsRule". + */ + const wrapped = responseBody[xmlName]; + const elementList = wrapped?.[xmlElementName] ?? []; + instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); + handledPropertyNames.push(xmlName); + } + else { + const property = responseBody[propertyName]; + instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); + handledPropertyNames.push(propertyName); + } + } + } + else { + // deserialize the property if it is present in the provided responseBody instance + let propertyInstance; + let res = responseBody; + // traversing the object step by step. + let steps = 0; + for (const item of paths) { + if (!res) + break; + steps++; + res = res[item]; + } + // only accept null when reaching the last position of object otherwise it would be undefined + if (res === null && steps < paths.length) { + res = undefined; + } + propertyInstance = res; + const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; + // checking that the model property name (key)(ex: "fishtype") and the + // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") + // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") + // is a better approach. The generator is not consistent with escaping '\.' in the + // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator + // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, + // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and + // the transformation of model property name (ex: "fishtype") is done consistently. + // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. + if (polymorphicDiscriminator && + key === polymorphicDiscriminator.clientName && + (propertyInstance === undefined || propertyInstance === null)) { + propertyInstance = mapper.serializedName; + } + let serializedValue; + // paging + if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { + propertyInstance = responseBody[key]; + const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + // Copy over any properties that have already been added into the instance, where they do + // not exist on the newly de-serialized array + for (const [k, v] of Object.entries(instance)) { + if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) { + arrayInstance[k] = v; + } + } + instance = arrayInstance; + } + else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { + serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); + instance[key] = serializedValue; + } + } + } + const additionalPropertiesMapper = mapper.type.additionalProperties; + if (additionalPropertiesMapper) { + const isAdditionalProperty = (responsePropName) => { + for (const clientPropName in modelProps) { + const paths = splitSerializeName(modelProps[clientPropName].serializedName); + if (paths[0] === responsePropName) { + return false; + } + } + return true; + }; + for (const responsePropName in responseBody) { + if (isAdditionalProperty(responsePropName)) { + instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); + } + } + } + else if (responseBody && !options.ignoreUnknownProperties) { + for (const key of Object.keys(responseBody)) { + if (instance[key] === undefined && + !handledPropertyNames.includes(key) && + !isSpecialXmlProperty(key, options)) { + instance[key] = responseBody[key]; + } + } + } + return instance; } - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) - - super(type, eventInitDict) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } +function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { + /* jshint validthis: true */ + const value = mapper.type.value; + if (!value || typeof value !== "object") { + throw new Error(`"value" metadata for a Dictionary must be defined in the ` + + `mapper and it must of type "object" in ${objectName}`); + } + if (responseBody) { + const tempDictionary = {}; + for (const key of Object.keys(responseBody)) { + tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); + } + return tempDictionary; + } + return responseBody; } - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - get defaultValue () { - return [] +function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { + let element = mapper.type.element; + if (!element || typeof element !== "object") { + throw new Error(`element" metadata for an Array must be defined in the ` + + `mapper and it must of type "object" in ${objectName}`); } - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent + if (responseBody) { + if (!Array.isArray(responseBody)) { + // xml2js will interpret a single element array as just the element, so force it to be an array + responseBody = [responseBody]; + } + // Quirk: Composite mappers referenced by `element` might + // not have *all* properties declared (like uberParent), + // so let's try to look up the full definition by name. + if (element.type.name === "Composite" && element.type.className) { + element = serializer.modelMappers[element.type.className] ?? element; + } + const tempArray = []; + for (let i = 0; i < responseBody.length; i++) { + tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options); + } + return tempArray; + } + return responseBody; } - +function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { + const typeNamesToCheck = [typeName]; + while (typeNamesToCheck.length) { + const currentName = typeNamesToCheck.shift(); + const indexDiscriminator = discriminatorValue === currentName + ? discriminatorValue + : currentName + "." + discriminatorValue; + if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) { + return discriminators[indexDiscriminator]; + } + else { + for (const [name, mapper] of Object.entries(discriminators)) { + if (name.startsWith(currentName + ".") && + mapper.type.uberParent === currentName && + mapper.type.className) { + typeNamesToCheck.push(mapper.type.className); + } + } + } + } + return undefined; +} +function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { + const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); + if (polymorphicDiscriminator) { + let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; + if (discriminatorName) { + // The serializedName might have \\, which we just want to ignore + if (polymorphicPropertyName === "serializedName") { + discriminatorName = discriminatorName.replace(/\\/gi, ""); + } + const discriminatorValue = object[discriminatorName]; + const typeName = mapper.type.uberParent ?? mapper.type.className; + if (typeof discriminatorValue === "string" && typeName) { + const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); + if (polymorphicMapper) { + mapper = polymorphicMapper; + } + } + } + } + return mapper; +} +function getPolymorphicDiscriminatorRecursively(serializer, mapper) { + return (mapper.type.polymorphicDiscriminator || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || + getPolymorphicDiscriminatorSafely(serializer, mapper.type.className)); +} +function getPolymorphicDiscriminatorSafely(serializer, typeName) { + return (typeName && + serializer.modelMappers[typeName] && + serializer.modelMappers[typeName].type.polymorphicDiscriminator); +} +/** + * Known types of Mappers + */ +exports.MapperTypeNames = { + Base64Url: "Base64Url", + Boolean: "Boolean", + ByteArray: "ByteArray", + Composite: "Composite", + Date: "Date", + DateTime: "DateTime", + DateTimeRfc1123: "DateTimeRfc1123", + Dictionary: "Dictionary", + Enum: "Enum", + Number: "Number", + Object: "Object", + Sequence: "Sequence", + String: "String", + Stream: "Stream", + TimeSpan: "TimeSpan", + UnixTime: "UnixTime", +}; +//# sourceMappingURL=serializer.js.map /***/ }), -/***/ 25444: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 28927: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { maxUnsigned16Bit } = __nccwpck_require__(19188) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(6113) -} catch { - -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - this.maskKey = crypto.randomBytes(4) - } - - createFrame (opcode) { - const bodyLength = this.frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > maxUnsigned16Bit) { - offset += 8 // payload length is next 8 bytes - payloadLength = 127 - } else if (bodyLength > 125) { - offset += 2 // payload length is next 2 bytes - payloadLength = 126 +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceClient = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const pipeline_js_1 = __nccwpck_require__(33924); +const utils_js_1 = __nccwpck_require__(25363); +const httpClientCache_js_1 = __nccwpck_require__(30308); +const operationHelpers_js_1 = __nccwpck_require__(62074); +const urlHelpers_js_1 = __nccwpck_require__(98258); +const interfaceHelpers_js_1 = __nccwpck_require__(41459); +const log_js_1 = __nccwpck_require__(53776); +/** + * Initializes a new instance of the ServiceClient. + */ +class ServiceClient { + /** + * If specified, this is the base URI that requests will be made against for this ServiceClient. + * If it is not specified, then all OperationSpecs must contain a baseUrl property. + */ + _endpoint; + /** + * The default request content type for the service. + * Used if no requestContentType is present on an OperationSpec. + */ + _requestContentType; + /** + * Set to true if the request is sent over HTTP instead of HTTPS + */ + _allowInsecureConnection; + /** + * The HTTP client that will be used to send requests. + */ + _httpClient; + /** + * The pipeline used by this client to make requests + */ + pipeline; + /** + * The ServiceClient constructor + * @param options - The service client options that govern the behavior of the client. + */ + constructor(options = {}) { + this._requestContentType = options.requestContentType; + this._endpoint = options.endpoint ?? options.baseUri; + if (options.baseUri) { + log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); + } + this._allowInsecureConnection = options.allowInsecureConnection; + this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); + this.pipeline = options.pipeline || createDefaultPipeline(options); + if (options.additionalPolicies?.length) { + for (const { policy, position } of options.additionalPolicies) { + // Sign happens after Retry and is commonly needed to occur + // before policies that intercept post-retry. + const afterPhase = position === "perRetry" ? "Sign" : undefined; + this.pipeline.addPolicy(policy, { + afterPhase, + }); + } + } } - - const buffer = Buffer.allocUnsafe(bodyLength + offset) - - // Clear first 2 bytes, everything else is overwritten - buffer[0] = buffer[1] = 0 - buffer[0] |= 0x80 // FIN - buffer[0] = (buffer[0] & 0xF0) + opcode // opcode - - /*! ws. MIT License. Einar Otto Stangvik */ - buffer[offset - 4] = this.maskKey[0] - buffer[offset - 3] = this.maskKey[1] - buffer[offset - 2] = this.maskKey[2] - buffer[offset - 1] = this.maskKey[3] - - buffer[1] = payloadLength - - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2) - } else if (payloadLength === 127) { - // Clear extended payload length - buffer[2] = buffer[3] = 0 - buffer.writeUIntBE(bodyLength, 4, 6) + /** + * Send the provided httpRequest. + */ + async sendRequest(request) { + return this.pipeline.sendRequest(this._httpClient, request); } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; i++) { - buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] + /** + * Send an HTTP request that is populated using the provided OperationSpec. + * @typeParam T - The typed result of the request, based on the OperationSpec. + * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. + * @param operationSpec - The OperationSpec to use to populate the httpRequest. + */ + async sendOperationRequest(operationArguments, operationSpec) { + const endpoint = operationSpec.baseUrl || this._endpoint; + if (!endpoint) { + throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); + } + // Templatized URLs sometimes reference properties on the ServiceClient child class, + // so we have to pass `this` below in order to search these properties if they're + // not part of OperationArguments + const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const request = (0, core_rest_pipeline_1.createPipelineRequest)({ + url, + }); + request.method = operationSpec.httpMethod; + const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); + operationInfo.operationSpec = operationSpec; + operationInfo.operationArguments = operationArguments; + const contentType = operationSpec.contentType || this._requestContentType; + if (contentType && operationSpec.requestBody) { + request.headers.set("Content-Type", contentType); + } + const options = operationArguments.options; + if (options) { + const requestOptions = options.requestOptions; + if (requestOptions) { + if (requestOptions.timeout) { + request.timeout = requestOptions.timeout; + } + if (requestOptions.onUploadProgress) { + request.onUploadProgress = requestOptions.onUploadProgress; + } + if (requestOptions.onDownloadProgress) { + request.onDownloadProgress = requestOptions.onDownloadProgress; + } + if (requestOptions.shouldDeserialize !== undefined) { + operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; + } + if (requestOptions.allowInsecureConnection) { + request.allowInsecureConnection = true; + } + } + if (options.abortSignal) { + request.abortSignal = options.abortSignal; + } + if (options.tracingOptions) { + request.tracingOptions = options.tracingOptions; + } + } + if (this._allowInsecureConnection) { + request.allowInsecureConnection = true; + } + if (request.streamResponseStatusCodes === undefined) { + request.streamResponseStatusCodes = (0, interfaceHelpers_js_1.getStreamingResponseStatusCodes)(operationSpec); + } + try { + const rawResponse = await this.sendRequest(request); + const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); + if (options?.onResponse) { + options.onResponse(rawResponse, flatResponse); + } + return flatResponse; + } + catch (error) { + if (typeof error === "object" && error?.response) { + const rawResponse = error.response; + const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); + error.details = flatResponse; + if (options?.onResponse) { + options.onResponse(rawResponse, flatResponse, error); + } + } + throw error; + } } - - return buffer - } } - -module.exports = { - WebsocketFrameSend +exports.ServiceClient = ServiceClient; +function createDefaultPipeline(options) { + const credentialScopes = getCredentialScopes(options); + const credentialOptions = options.credential && credentialScopes + ? { credentialScopes, credential: options.credential } + : undefined; + return (0, pipeline_js_1.createClientPipeline)({ + ...options, + credentialOptions, + }); } - +function getCredentialScopes(options) { + if (options.credentialScopes) { + return options.credentialScopes; + } + if (options.endpoint) { + return `${options.endpoint}/.default`; + } + if (options.baseUri) { + return `${options.baseUri}/.default`; + } + if (options.credential && !options.credentialScopes) { + throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); + } + return undefined; +} +//# sourceMappingURL=serviceClient.js.map /***/ }), -/***/ 11688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 35429: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.state = void 0; +/** + * Holds the singleton operationRequestMap, to be shared across CJS and ESM imports. + */ +exports.state = { + operationRequestMap: new WeakMap(), +}; +//# sourceMappingURL=state-cjs.cjs.map -const { Writable } = __nccwpck_require__(12781) -const diagnosticsChannel = __nccwpck_require__(67643) -const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(19188) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(37578) -const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(25515) -const { WebsocketFrameSend } = __nccwpck_require__(25444) - -// This code was influenced by ws released under the MIT license. -// Copyright (c) 2011 Einar Otto Stangvik -// Copyright (c) 2013 Arnout Kazemier and contributors -// Copyright (c) 2016 Luigi Pinca and contributors - -const channels = {} -channels.ping = diagnosticsChannel.channel('undici:websocket:ping') -channels.pong = diagnosticsChannel.channel('undici:websocket:pong') - -class ByteParser extends Writable { - #buffers = [] - #byteOffset = 0 - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - constructor (ws) { - super() - - this.ws = ws - } +/***/ }), - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length +/***/ 98258: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this.run(callback) - } +"use strict"; - /** - * Runs whenever a new chunk is received. - * Callback is called whenever there are no more chunks buffering, - * or not enough bytes are buffered to parse. - */ - run (callback) { - while (true) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRequestUrl = getRequestUrl; +exports.appendQueryParams = appendQueryParams; +const operationHelpers_js_1 = __nccwpck_require__(62074); +const interfaceHelpers_js_1 = __nccwpck_require__(41459); +const CollectionFormatToDelimiterMap = { + CSV: ",", + SSV: " ", + Multi: "Multi", + TSV: "\t", + Pipes: "|", +}; +function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { + const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); + let isAbsolutePath = false; + let requestUrl = replaceAll(baseUri, urlReplacements); + if (operationSpec.path) { + let path = replaceAll(operationSpec.path, urlReplacements); + // QUIRK: sometimes we get a path component like /{nextLink} + // which may be a fully formed URL with a leading /. In that case, we should + // remove the leading / + if (operationSpec.path === "/{nextLink}" && path.startsWith("/")) { + path = path.substring(1); } - - const buffer = this.consume(2) - - this.#info.fin = (buffer[0] & 0x80) !== 0 - this.#info.opcode = buffer[0] & 0x0F - - // If we receive a fragmented message, we use the type of the first - // frame to parse the full message as binary/text, when it's terminated - this.#info.originalOpcode ??= this.#info.opcode - - this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION - - if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return + // QUIRK: sometimes we get a path component like {nextLink} + // which may be a fully formed URL. In that case, we should + // ignore the baseUri. + if (isAbsoluteUrl(path)) { + requestUrl = path; + isAbsolutePath = true; } - - const payloadLength = buffer[1] & 0x7F - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 + else { + requestUrl = appendPath(requestUrl, path); } - - if (this.#info.fragmented && payloadLength > 125) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } else if ( - (this.#info.opcode === opcodes.PING || - this.#info.opcode === opcodes.PONG || - this.#info.opcode === opcodes.CLOSE) && - payloadLength > 125 - ) { - // Control frames can have a payload length of 125 bytes MAX - failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') - return - } else if (this.#info.opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return - } - - const body = this.consume(payloadLength) - - this.#info.closeInfo = this.parseCloseBody(false, body) - - if (!this.ws[kSentClose]) { - // If an endpoint receives a Close frame and did not previously send a - // Close frame, the endpoint MUST send a Close frame in response. (When - // sending a Close frame in response, the endpoint typically echos the - // status code it received.) - const body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[kSentClose] = true - } - } - ) - } - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - this.end() - - return - } else if (this.#info.opcode === opcodes.PING) { - // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in - // response, unless it already received a Close frame. - // A Pong frame sent in response to a Ping frame must have identical - // "Application data" - - const body = this.consume(payloadLength) - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) + } + const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); + /** + * Notice that this call sets the `noOverwrite` parameter to true if the `requestUrl` + * is an absolute path. This ensures that existing query parameter values in `requestUrl` + * do not get overwritten. On the other hand when `requestUrl` is not absolute path, it + * is still being built so there is nothing to overwrite. + */ + requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); + return requestUrl; +} +function replaceAll(input, replacements) { + let result = input; + for (const [searchValue, replaceValue] of replacements) { + result = result.split(searchValue).join(replaceValue); + } + return result; +} +function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { + const result = new Map(); + if (operationSpec.urlParameters?.length) { + for (const urlParameter of operationSpec.urlParameters) { + let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); + const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); + urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); + if (!urlParameter.skipEncoding) { + urlParameterValue = encodeURIComponent(urlParameterValue); } - } - - this.#state = parserStates.INFO - - if (this.#byteOffset > 0) { - continue - } else { - callback() - return - } - } else if (this.#info.opcode === opcodes.PONG) { - // A Pong frame MAY be sent unsolicited. This serves as a - // unidirectional heartbeat. A response to an unsolicited Pong frame is - // not expected. - - const body = this.consume(payloadLength) - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) - } - - if (this.#byteOffset > 0) { - continue - } else { - callback() - return - } + result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); } - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() + } + return result; +} +function isAbsoluteUrl(url) { + return url.includes("://"); +} +function appendPath(url, pathToAppend) { + if (!pathToAppend) { + return url; + } + const parsedUrl = new URL(url); + let newPath = parsedUrl.pathname; + if (!newPath.endsWith("/")) { + newPath = `${newPath}/`; + } + if (pathToAppend.startsWith("/")) { + pathToAppend = pathToAppend.substring(1); + } + const searchStart = pathToAppend.indexOf("?"); + if (searchStart !== -1) { + const path = pathToAppend.substring(0, searchStart); + const search = pathToAppend.substring(searchStart + 1); + newPath = newPath + path; + if (search) { + parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() + } + else { + newPath = newPath + pathToAppend; + } + parsedUrl.pathname = newPath; + return parsedUrl.toString(); +} +function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { + const result = new Map(); + const sequenceParams = new Set(); + if (operationSpec.queryParameters?.length) { + for (const queryParameter of operationSpec.queryParameters) { + if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { + sequenceParams.add(queryParameter.mapper.serializedName); + } + let queryParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); + if ((queryParameterValue !== undefined && queryParameterValue !== null) || + queryParameter.mapper.required) { + queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter)); + const delimiter = queryParameter.collectionFormat + ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] + : ""; + if (Array.isArray(queryParameterValue)) { + // replace null and undefined + queryParameterValue = queryParameterValue.map((item) => { + if (item === null || item === undefined) { + return ""; + } + return item; + }); + } + if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) { + continue; + } + else if (Array.isArray(queryParameterValue) && + (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) { + queryParameterValue = queryParameterValue.join(delimiter); + } + if (!queryParameter.skipEncoding) { + if (Array.isArray(queryParameterValue)) { + queryParameterValue = queryParameterValue.map((item) => { + return encodeURIComponent(item); + }); + } + else { + queryParameterValue = encodeURIComponent(queryParameterValue); + } + } + // Join pipes and CSV *after* encoding, or the server will be upset. + if (Array.isArray(queryParameterValue) && + (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) { + queryParameterValue = queryParameterValue.join(delimiter); + } + result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter), queryParameterValue); + } } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) - - // 2^31 is the maxinimum bytes an arraybuffer can contain - // on 32-bit systems. Although, on 64-bit systems, this is - // 2^53-1 bytes. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 - // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e - if (upper > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return + } + return { + queryParams: result, + sequenceParams, + }; +} +function simpleParseQueryParams(queryString) { + const result = new Map(); + if (!queryString || queryString[0] !== "?") { + return result; + } + // remove the leading ? + queryString = queryString.slice(1); + const pairs = queryString.split("&"); + for (const pair of pairs) { + const [name, value] = pair.split("=", 2); + const existingValue = result.get(name); + if (existingValue) { + if (Array.isArray(existingValue)) { + existingValue.push(value); + } + else { + result.set(name, [existingValue, value]); + } } - - const lower = buffer.readUInt32BE(4) - - this.#info.payloadLength = (upper << 8) + lower - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - // If there is still more data in this chunk that needs to be read - return callback() - } else if (this.#byteOffset >= this.#info.payloadLength) { - // If the server sent multiple frames in a single chunk - - const body = this.consume(this.#info.payloadLength) - - this.#fragments.push(body) - - // If the frame is unfragmented, or a fragmented frame was terminated, - // a message was received - if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) { - const fullMessage = Buffer.concat(this.#fragments) - - websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage) - - this.#info = {} - this.#fragments.length = 0 - } - - this.#state = parserStates.INFO + else { + result.set(name, value); } - } - - if (this.#byteOffset > 0) { - continue - } else { - callback() - break - } } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer|null} - */ - consume (n) { - if (n > this.#byteOffset) { - return null - } else if (n === 0) { - return emptyBuffer + return result; +} +/** @internal */ +function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + if (queryParams.size === 0) { + return url; } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() + const parsedUrl = new URL(url); + // QUIRK: parsedUrl.searchParams will have their name/value pairs decoded, which + // can change their meaning to the server, such as in the case of a SAS signature. + // To avoid accidentally un-encoding a query param, we parse the key/values ourselves + const combinedParams = simpleParseQueryParams(parsedUrl.search); + for (const [name, value] of queryParams) { + const existingValue = combinedParams.get(name); + if (Array.isArray(existingValue)) { + if (Array.isArray(value)) { + existingValue.push(...value); + const valueSet = new Set(existingValue); + combinedParams.set(name, Array.from(valueSet)); + } + else { + existingValue.push(value); + } + } + else if (existingValue) { + if (Array.isArray(value)) { + value.unshift(existingValue); + } + else if (sequenceParams.has(name)) { + combinedParams.set(name, [existingValue, value]); + } + if (!noOverwrite) { + combinedParams.set(name, value); + } + } + else { + combinedParams.set(name, value); + } } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { length } = next - - if (length + offset === n) { - buffer.set(this.#buffers.shift(), offset) - break - } else if (length + offset > n) { - buffer.set(next.subarray(0, n - offset), offset) - this.#buffers[0] = next.subarray(n - offset) - break - } else { - buffer.set(this.#buffers.shift(), offset) - offset += next.length - } + const searchPieces = []; + for (const [name, value] of combinedParams) { + if (typeof value === "string") { + searchPieces.push(`${name}=${value}`); + } + else if (Array.isArray(value)) { + // QUIRK: If we get an array of values, include multiple key/value pairs + for (const subValue of value) { + searchPieces.push(`${name}=${subValue}`); + } + } + else { + searchPieces.push(`${name}=${value}`); + } } + // QUIRK: we have to set search manually as searchParams will encode comma when it shouldn't. + parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return parsedUrl.toString(); +} +//# sourceMappingURL=urlHelpers.js.map - this.#byteOffset -= n +/***/ }), - return buffer - } +/***/ 25363: +/***/ ((__unused_webpack_module, exports) => { - parseCloseBody (onlyCode, data) { - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 - /** @type {number|undefined} */ - let code +"use strict"; - if (data.length >= 2) { - // _The WebSocket Connection Close Code_ is - // defined as the status code (Section 7.4) contained in the first Close - // control frame received by the application - code = data.readUInt16BE(0) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isPrimitiveBody = isPrimitiveBody; +exports.isDuration = isDuration; +exports.isValidUuid = isValidUuid; +exports.flattenResponse = flattenResponse; +/** + * A type guard for a primitive response body. + * @param value - Value to test + * + * @internal + */ +function isPrimitiveBody(value, mapperTypeName) { + return (mapperTypeName !== "Composite" && + mapperTypeName !== "Dictionary" && + (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean" || + mapperTypeName?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i) !== + null || + value === undefined || + value === null)); +} +const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +/** + * Returns true if the given string is in ISO 8601 format. + * @param value - The value to be validated for ISO 8601 duration format. + * @internal + */ +function isDuration(value) { + return validateISODuration.test(value); +} +const validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; +/** + * Returns true if the provided uuid is valid. + * + * @param uuid - The uuid that needs to be validated. + * + * @internal + */ +function isValidUuid(uuid) { + return validUuidRegex.test(uuid); +} +/** + * Maps the response as follows: + * - wraps the response body if needed (typically if its type is primitive). + * - returns null if the combination of the headers and the body is empty. + * - otherwise, returns the combination of the headers and the body. + * + * @param responseObject - a representation of the parsed response + * @returns the response that will be returned to the user which can be null and/or wrapped + * + * @internal + */ +function handleNullableResponseAndWrappableBody(responseObject) { + const combinedHeadersAndBody = { + ...responseObject.headers, + ...responseObject.body, + }; + if (responseObject.hasNullableType && + Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { + return responseObject.shouldWrapBody ? { body: null } : null; } - - if (onlyCode) { - if (!isValidStatusCode(code)) { - return null - } - - return { code } + else { + return responseObject.shouldWrapBody + ? { + ...responseObject.headers, + body: responseObject.body, + } + : combinedHeadersAndBody; } - - // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 - /** @type {Buffer} */ - let reason = data.subarray(2) - - // Remove BOM - if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { - reason = reason.subarray(3) +} +/** + * Take a `FullOperationResponse` and turn it into a flat + * response object to hand back to the consumer. + * @param fullResponse - The processed response from the operation request + * @param responseSpec - The response map from the OperationSpec + * + * @internal + */ +function flattenResponse(fullResponse, responseSpec) { + const parsedHeaders = fullResponse.parsedHeaders; + // head methods never have a body, but we return a boolean set to body property + // to indicate presence/absence of the resource + if (fullResponse.request.method === "HEAD") { + return { + ...parsedHeaders, + body: fullResponse.parsedBody, + }; } - - if (code !== undefined && !isValidStatusCode(code)) { - return null + const bodyMapper = responseSpec && responseSpec.bodyMapper; + const isNullable = Boolean(bodyMapper?.nullable); + const expectedBodyTypeName = bodyMapper?.type.name; + /** If the body is asked for, we look at the expected body type to handle it */ + if (expectedBodyTypeName === "Stream") { + return { + ...parsedHeaders, + blobBody: fullResponse.blobBody, + readableStreamBody: fullResponse.readableStreamBody, + }; + } + const modelProperties = (expectedBodyTypeName === "Composite" && + bodyMapper.type.modelProperties) || + {}; + const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); + if (expectedBodyTypeName === "Sequence" || isPageableResponse) { + const arrayResponse = fullResponse.parsedBody ?? []; + for (const key of Object.keys(modelProperties)) { + if (modelProperties[key].serializedName) { + arrayResponse[key] = fullResponse.parsedBody?.[key]; + } + } + if (parsedHeaders) { + for (const key of Object.keys(parsedHeaders)) { + arrayResponse[key] = parsedHeaders[key]; + } + } + return isNullable && + !fullResponse.parsedBody && + !parsedHeaders && + Object.getOwnPropertyNames(modelProperties).length === 0 + ? null + : arrayResponse; } + return handleNullableResponseAndWrappableBody({ + body: fullResponse.parsedBody, + headers: parsedHeaders, + hasNullableType: isNullable, + shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName), + }); +} +//# sourceMappingURL=utils.js.map - try { - // TODO: optimize this - reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) - } catch { - return null - } +/***/ }), - return { code, reason } - } +/***/ 35064: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - get closingInfo () { - return this.#info.closeInfo - } -} +"use strict"; -module.exports = { - ByteParser +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ExtendedServiceClient = void 0; +const disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_client_1 = __nccwpck_require__(7611); +const response_js_1 = __nccwpck_require__(49283); +/** + * Client to provide compatability between core V1 & V2. + */ +class ExtendedServiceClient extends core_client_1.ServiceClient { + constructor(options) { + super(options); + if (options.keepAliveOptions?.enable === false && + !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { + this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); + } + if (options.redirectOptions?.handleRedirects === false) { + this.pipeline.removePolicy({ + name: core_rest_pipeline_1.redirectPolicyName, + }); + } + } + /** + * Compatible send operation request function. + * + * @param operationArguments - Operation arguments + * @param operationSpec - Operation Spec + * @returns + */ + async sendOperationRequest(operationArguments, operationSpec) { + const userProvidedCallBack = operationArguments?.options?.onResponse; + let lastResponse; + function onResponse(rawResponse, flatResponse, error) { + lastResponse = rawResponse; + if (userProvidedCallBack) { + userProvidedCallBack(rawResponse, flatResponse, error); + } + } + operationArguments.options = { + ...operationArguments.options, + onResponse, + }; + const result = await super.sendOperationRequest(operationArguments, operationSpec); + if (lastResponse) { + Object.defineProperty(result, "_response", { + value: (0, response_js_1.toCompatResponse)(lastResponse), + }); + } + return result; + } } - +exports.ExtendedServiceClient = ExtendedServiceClient; +//# sourceMappingURL=extendedClient.js.map /***/ }), -/***/ 37578: -/***/ ((module) => { +/***/ 23256: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -module.exports = { - kWebSocketURL: Symbol('url'), - kReadyState: Symbol('ready state'), - kController: Symbol('controller'), - kResponse: Symbol('response'), - kBinaryType: Symbol('binary type'), - kSentClose: Symbol('sent close'), - kReceivedClose: Symbol('received close'), - kByteParser: Symbol('byte parser') +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.convertHttpClient = convertHttpClient; +const response_js_1 = __nccwpck_require__(49283); +const util_js_1 = __nccwpck_require__(43732); +/** + * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. + * @param requestPolicyClient - A HttpClient compatible with core-http + * @returns A HttpClient compatible with core-rest-pipeline + */ +function convertHttpClient(requestPolicyClient) { + return { + sendRequest: async (request) => { + const response = await requestPolicyClient.sendRequest((0, util_js_1.toWebResourceLike)(request, { createProxy: true })); + return (0, response_js_1.toPipelineResponse)(response); + }, + }; } - +//# sourceMappingURL=httpClientAdapter.js.map /***/ }), -/***/ 25515: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 25083: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlivePolicyName = exports.HttpPipelineLogLevel = exports.createRequestPolicyFactoryPolicy = exports.requestPolicyFactoryPolicyName = exports.ExtendedServiceClient = void 0; +/** + * A Shim Library that provides compatibility between Core V1 & V2 Packages. + * + * @packageDocumentation + */ +var extendedClient_js_1 = __nccwpck_require__(35064); +Object.defineProperty(exports, "ExtendedServiceClient", ({ enumerable: true, get: function () { return extendedClient_js_1.ExtendedServiceClient; } })); +var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(98241); +Object.defineProperty(exports, "requestPolicyFactoryPolicyName", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; } })); +Object.defineProperty(exports, "createRequestPolicyFactoryPolicy", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; } })); +Object.defineProperty(exports, "HttpPipelineLogLevel", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; } })); +var disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); +Object.defineProperty(exports, "disableKeepAlivePolicyName", ({ enumerable: true, get: function () { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } })); +var httpClientAdapter_js_1 = __nccwpck_require__(23256); +Object.defineProperty(exports, "convertHttpClient", ({ enumerable: true, get: function () { return httpClientAdapter_js_1.convertHttpClient; } })); +var util_js_1 = __nccwpck_require__(43732); +Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: function () { return util_js_1.toHttpHeadersLike; } })); +//# sourceMappingURL=index.js.map + +/***/ }), -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(37578) -const { states, opcodes } = __nccwpck_require__(19188) -const { MessageEvent, ErrorEvent } = __nccwpck_require__(52611) +/***/ 75840: +/***/ ((__unused_webpack_module, exports) => { -/* globals Blob */ +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.disableKeepAlivePolicyName = void 0; +exports.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; +exports.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; +exports.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; +function createDisableKeepAlivePolicy() { + return { + name: exports.disableKeepAlivePolicyName, + async sendRequest(request, next) { + request.disableKeepAlive = true; + return next(request); + }, + }; +} /** - * @param {import('./websocket').WebSocket} ws + * @internal */ -function isEstablished (ws) { - // If the server's response is validated as provided for above, it is - // said that _The WebSocket Connection is Established_ and that the - // WebSocket Connection is in the OPEN state. - return ws[kReadyState] === states.OPEN +function pipelineContainsDisableKeepAlivePolicy(pipeline) { + return pipeline.getOrderedPolicies().some((policy) => policy.name === exports.disableKeepAlivePolicyName); } +//# sourceMappingURL=disableKeepAlivePolicy.js.map + +/***/ }), + +/***/ 98241: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.requestPolicyFactoryPolicyName = exports.HttpPipelineLogLevel = void 0; +exports.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; +const util_js_1 = __nccwpck_require__(43732); +const response_js_1 = __nccwpck_require__(49283); /** - * @param {import('./websocket').WebSocket} ws + * An enum for compatibility with RequestPolicy */ -function isClosing (ws) { - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - return ws[kReadyState] === states.CLOSING -} - +var HttpPipelineLogLevel; +(function (HttpPipelineLogLevel) { + HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; + HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; + HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; + HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; +})(HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); +const mockRequestPolicyOptions = { + log(_logLevel, _message) { + /* do nothing */ + }, + shouldLog(_logLevel) { + return false; + }, +}; /** - * @param {import('./websocket').WebSocket} ws + * The name of the RequestPolicyFactoryPolicy */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - +exports.requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; /** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {EventInit | undefined} eventInitDict + * A policy that wraps policies written for core-http. + * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline */ -function fireEvent (e, target, eventConstructor = Event, eventInitDict) { - // 1. If eventConstructor is not given, then let eventConstructor be Event. +function createRequestPolicyFactoryPolicy(factories) { + const orderedFactories = factories.slice().reverse(); + return { + name: exports.requestPolicyFactoryPolicyName, + async sendRequest(request, next) { + let httpPipeline = { + async sendRequest(httpRequest) { + const response = await next((0, util_js_1.toPipelineRequest)(httpRequest)); + return (0, response_js_1.toCompatResponse)(response, { createProxy: true }); + }, + }; + for (const factory of orderedFactories) { + httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); + } + const webResourceLike = (0, util_js_1.toWebResourceLike)(request, { createProxy: true }); + const response = await httpPipeline.sendRequest(webResourceLike); + return (0, response_js_1.toPipelineResponse)(response); + }, + }; +} +//# sourceMappingURL=requestPolicyFactoryPolicy.js.map - // 2. Let event be the result of creating an event given eventConstructor, - // in the relevant realm of target. - // 3. Initialize event’s type attribute to e. - const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap +/***/ }), - // 4. Initialize any other IDL attributes of event as described in the - // invocation of this algorithm. +/***/ 49283: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 5. Return the result of dispatching event at target, with legacy target - // override flag set if set. - target.dispatchEvent(event) -} +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCompatResponse = toCompatResponse; +exports.toPipelineResponse = toPipelineResponse; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const util_js_1 = __nccwpck_require__(43732); +const originalResponse = Symbol("Original FullOperationResponse"); /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @param {import('./websocket').WebSocket} ws - * @param {number} type Opcode - * @param {Buffer} data application data + * A helper to convert response objects from the new pipeline back to the old one. + * @param response - A response object from core-client. + * @returns A response compatible with `HttpOperationResponse` from core-http. */ -function websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === opcodes.TEXT) { - // -> type indicates that the data is Text - // a new DOMString containing data - try { - dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data) - } catch { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return +function toCompatResponse(response, options) { + let request = (0, util_js_1.toWebResourceLike)(response.request); + let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); + if (options?.createProxy) { + return new Proxy(response, { + get(target, prop, receiver) { + if (prop === "headers") { + return headers; + } + else if (prop === "request") { + return request; + } + else if (prop === originalResponse) { + return response; + } + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "headers") { + headers = value; + } + else if (prop === "request") { + request = value; + } + return Reflect.set(target, prop, value, receiver); + }, + }); } - } else if (type === opcodes.BINARY) { - if (ws[kBinaryType] === 'blob') { - // -> type indicates that the data is Binary and binary type is "blob" - // a new Blob object, created in the relevant Realm of the WebSocket - // object, that represents data as its raw data - dataForEvent = new Blob([data]) - } else { - // -> type indicates that the data is Binary and binary type is "arraybuffer" - // a new ArrayBuffer object, created in the relevant Realm of the - // WebSocket object, whose contents are data - dataForEvent = new Uint8Array(data).buffer + else { + return { + ...response, + request, + headers, + }; } - } - - // 3. Fire an event named message at the WebSocket object, using MessageEvent, - // with the origin attribute initialized to the serialization of the WebSocket - // object’s url's origin, and the data attribute initialized to dataForEvent. - fireEvent('message', ws, MessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) } - /** - * @see https://datatracker.ietf.org/doc/html/rfc6455 - * @see https://datatracker.ietf.org/doc/html/rfc2616 - * @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407 - * @param {string} protocol + * A helper to convert back to a PipelineResponse + * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http. */ -function isValidSubprotocol (protocol) { - // If present, this value indicates one - // or more comma-separated subprotocol the client wishes to speak, - // ordered by preference. The elements that comprise this value - // MUST be non-empty strings with characters in the range U+0021 to - // U+007E not including separator characters as defined in - // [RFC2616] and MUST all be unique strings. - if (protocol.length === 0) { - return false - } +function toPipelineResponse(compatResponse) { + const extendedCompatResponse = compatResponse; + const response = extendedCompatResponse[originalResponse]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); + if (response) { + response.headers = headers; + return response; + } + else { + return { + ...compatResponse, + headers, + request: (0, util_js_1.toPipelineRequest)(compatResponse.request), + }; + } +} +//# sourceMappingURL=response.js.map - for (const char of protocol) { - const code = char.charCodeAt(0) +/***/ }), - if ( - code < 0x21 || - code > 0x7E || - char === '(' || - char === ')' || - char === '<' || - char === '>' || - char === '@' || - char === ',' || - char === ';' || - char === ':' || - char === '\\' || - char === '"' || - char === '/' || - char === '[' || - char === ']' || - char === '?' || - char === '=' || - char === '{' || - char === '}' || - code === 32 || // SP - code === 9 // HT - ) { - return false - } - } +/***/ 43732: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return true -} +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpHeaders = void 0; +exports.toPipelineRequest = toPipelineRequest; +exports.toWebResourceLike = toWebResourceLike; +exports.toHttpHeadersLike = toHttpHeadersLike; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +// We use a custom symbol to cache a reference to the original request without +// exposing it on the public interface. +const originalRequestSymbol = Symbol("Original PipelineRequest"); +// Symbol.for() will return the same symbol if it's already been created +// This particular one is used in core-client to handle the case of when a request is +// cloned but we need to retrieve the OperationSpec and OperationArguments from the +// original request. +const originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); +function toPipelineRequest(webResource, options = {}) { + const compatWebResource = webResource; + const request = compatWebResource[originalRequestSymbol]; + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); + if (request) { + request.headers = headers; + return request; + } + else { + const newRequest = (0, core_rest_pipeline_1.createPipelineRequest)({ + url: webResource.url, + method: webResource.method, + headers, + withCredentials: webResource.withCredentials, + timeout: webResource.timeout, + requestId: webResource.requestId, + abortSignal: webResource.abortSignal, + body: webResource.body, + formData: webResource.formData, + disableKeepAlive: !!webResource.keepAlive, + onDownloadProgress: webResource.onDownloadProgress, + onUploadProgress: webResource.onUploadProgress, + proxySettings: webResource.proxySettings, + streamResponseStatusCodes: webResource.streamResponseStatusCodes, + agent: webResource.agent, + requestOverrides: webResource.requestOverrides, + }); + if (options.originalRequest) { + newRequest[originalClientRequestSymbol] = + options.originalRequest; + } + return newRequest; + } +} +function toWebResourceLike(request, options) { + const originalRequest = options?.originalRequest ?? request; + const webResource = { + url: request.url, + method: request.method, + headers: toHttpHeadersLike(request.headers), + withCredentials: request.withCredentials, + timeout: request.timeout, + requestId: request.headers.get("x-ms-client-request-id") || request.requestId, + abortSignal: request.abortSignal, + body: request.body, + formData: request.formData, + keepAlive: !!request.disableKeepAlive, + onDownloadProgress: request.onDownloadProgress, + onUploadProgress: request.onUploadProgress, + proxySettings: request.proxySettings, + streamResponseStatusCodes: request.streamResponseStatusCodes, + agent: request.agent, + requestOverrides: request.requestOverrides, + clone() { + throw new Error("Cannot clone a non-proxied WebResourceLike"); + }, + prepare() { + throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); + }, + validateRequestProperties() { + /** do nothing */ + }, + }; + if (options?.createProxy) { + return new Proxy(webResource, { + get(target, prop, receiver) { + if (prop === originalRequestSymbol) { + return request; + } + else if (prop === "clone") { + return () => { + return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { + createProxy: true, + originalRequest, + }); + }; + } + return Reflect.get(target, prop, receiver); + }, + set(target, prop, value, receiver) { + if (prop === "keepAlive") { + request.disableKeepAlive = !value; + } + const passThroughProps = [ + "url", + "method", + "withCredentials", + "timeout", + "requestId", + "abortSignal", + "body", + "formData", + "onDownloadProgress", + "onUploadProgress", + "proxySettings", + "streamResponseStatusCodes", + "agent", + "requestOverrides", + ]; + if (typeof prop === "string" && passThroughProps.includes(prop)) { + request[prop] = value; + } + return Reflect.set(target, prop, value, receiver); + }, + }); + } + else { + return webResource; + } +} /** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code + * Converts HttpHeaders from core-rest-pipeline to look like + * HttpHeaders from core-http. + * @param headers - HttpHeaders from core-rest-pipeline + * @returns HttpHeaders as they looked in core-http */ -function isValidStatusCode (code) { - if (code >= 1000 && code < 1015) { - return ( - code !== 1004 && // reserved - code !== 1005 && // "MUST NOT be set as a status code" - code !== 1006 // "MUST NOT be set as a status code" - ) - } - - return code >= 3000 && code <= 4999 +function toHttpHeadersLike(headers) { + return new HttpHeaders(headers.toJSON({ preserveCase: true })); } - /** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason + * A collection of HttpHeaders that can be sent with a HTTP request. */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - fireEvent('error', ws, ErrorEvent, { - error: new Error(reason) - }) - } +function getHeaderKey(headerName) { + return headerName.toLowerCase(); } - -module.exports = { - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived +/** + * A collection of HTTP header key/value pairs. + */ +class HttpHeaders { + _headersMap; + constructor(rawHeaders) { + this._headersMap = {}; + if (rawHeaders) { + for (const headerName in rawHeaders) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param headerName - The name of the header to set. This value is case-insensitive. + * @param headerValue - The value of the header to set. + */ + set(headerName, headerValue) { + this._headersMap[getHeaderKey(headerName)] = { + name: headerName, + value: headerValue.toString(), + }; + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param headerName - The name of the header. + */ + get(headerName) { + const header = this._headersMap[getHeaderKey(headerName)]; + return !header ? undefined : header.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + */ + contains(headerName) { + return !!this._headersMap[getHeaderKey(headerName)]; + } + /** + * Remove the header with the provided headerName. Return whether or not the header existed and + * was removed. + * @param headerName - The name of the header to remove. + */ + remove(headerName) { + const result = this.contains(headerName); + delete this._headersMap[getHeaderKey(headerName)]; + return result; + } + /** + * Get the headers that are contained this collection as an object. + */ + rawHeaders() { + return this.toJson({ preserveCase: true }); + } + /** + * Get the headers that are contained in this collection as an array. + */ + headersArray() { + const headers = []; + for (const headerKey in this._headersMap) { + headers.push(this._headersMap[headerKey]); + } + return headers; + } + /** + * Get the header names that are contained in this collection. + */ + headerNames() { + const headerNames = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerNames.push(headers[i].name); + } + return headerNames; + } + /** + * Get the header values that are contained in this collection. + */ + headerValues() { + const headerValues = []; + const headers = this.headersArray(); + for (let i = 0; i < headers.length; ++i) { + headerValues.push(headers[i].value); + } + return headerValues; + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJson(options = {}) { + const result = {}; + if (options.preserveCase) { + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[header.name] = header.value; + } + } + else { + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + result[getHeaderKey(header.name)] = header.value; + } + } + return result; + } + /** + * Get the string representation of this HTTP header collection. + */ + toString() { + return JSON.stringify(this.toJson({ preserveCase: true })); + } + /** + * Create a deep clone/copy of this HttpHeaders collection. + */ + clone() { + const resultPreservingCasing = {}; + for (const headerKey in this._headersMap) { + const header = this._headersMap[headerKey]; + resultPreservingCasing[header.name] = header.value; + } + return new HttpHeaders(resultPreservingCasing); + } } - +exports.HttpHeaders = HttpHeaders; +//# sourceMappingURL=util.js.map /***/ }), -/***/ 54284: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 57759: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -const { webidl } = __nccwpck_require__(21744) -const { DOMException } = __nccwpck_require__(41037) -const { URLSerializer } = __nccwpck_require__(685) -const { getGlobalOrigin } = __nccwpck_require__(71246) -const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(19188) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(37578) -const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(25515) -const { establishWebSocketConnection } = __nccwpck_require__(35354) -const { WebsocketFrameSend } = __nccwpck_require__(25444) -const { ByteParser } = __nccwpck_require__(11688) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(83983) -const { getGlobalDispatcher } = __nccwpck_require__(21892) -const { types } = __nccwpck_require__(73837) - -let experimentalWarned = false - -// https://websockets.spec.whatwg.org/#interface-definition -class WebSocket extends EventTarget { - #events = { - open: null, - error: null, - close: null, - message: null - } - - #bufferedAmount = 0 - #protocol = '' - #extensions = '' - - /** - * @param {string} url - * @param {string|string[]} protocols - */ - constructor (url, protocols = []) { - super() - - webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' }) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('WebSockets are experimental, expect them to change at any time.', { - code: 'UNDICI-WS' - }) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pollHttpOperation = exports.isOperationError = exports.getResourceLocation = exports.getOperationStatus = exports.getOperationLocation = exports.initHttpOperation = exports.getStatusFromInitialResponse = exports.getErrorFromResponse = exports.parseRetryAfter = exports.inferLroMode = void 0; +const operation_js_1 = __nccwpck_require__(70281); +const logger_js_1 = __nccwpck_require__(28121); +function getOperationLocationPollingUrl(inputs) { + const { azureAsyncOperation, operationLocation } = inputs; + return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; +} +function getLocationHeader(rawResponse) { + return rawResponse.headers["location"]; +} +function getOperationLocationHeader(rawResponse) { + return rawResponse.headers["operation-location"]; +} +function getAzureAsyncOperationHeader(rawResponse) { + return rawResponse.headers["azure-asyncoperation"]; +} +function findResourceLocation(inputs) { + var _a; + const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; + switch (requestMethod) { + case "PUT": { + return requestPath; + } + case "DELETE": { + return undefined; + } + case "PATCH": { + return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; + } + default: { + return getDefault(); + } } - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols) - - url = webidl.converters.USVString(url) - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = getGlobalOrigin() - - // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. - let urlRecord - - try { - urlRecord = new URL(url, baseURL) - } catch (e) { - // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. - throw new DOMException(e, 'SyntaxError') + function getDefault() { + switch (resourceLocationConfig) { + case "azure-async-operation": { + return undefined; + } + case "original-uri": { + return requestPath; + } + case "location": + default: { + return location; + } + } + } +} +function inferLroMode(inputs) { + const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; + const operationLocation = getOperationLocationHeader(rawResponse); + const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); + const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); + const location = getLocationHeader(rawResponse); + const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); + if (pollingUrl !== undefined) { + return { + mode: "OperationLocation", + operationLocation: pollingUrl, + resourceLocation: findResourceLocation({ + requestMethod: normalizedRequestMethod, + location, + requestPath, + resourceLocationConfig, + }), + }; + } + else if (location !== undefined) { + return { + mode: "ResourceLocation", + operationLocation: location, + }; + } + else if (normalizedRequestMethod === "PUT" && requestPath) { + return { + mode: "Body", + operationLocation: requestPath, + }; + } + else { + return undefined; + } +} +exports.inferLroMode = inferLroMode; +function transformStatus(inputs) { + const { status, statusCode } = inputs; + if (typeof status !== "string" && status !== undefined) { + throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); + } + switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { + case undefined: + return toOperationStatus(statusCode); + case "succeeded": + return "succeeded"; + case "failed": + return "failed"; + case "running": + case "accepted": + case "started": + case "canceling": + case "cancelling": + return "running"; + case "canceled": + case "cancelled": + return "canceled"; + default: { + logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); + return status; + } + } +} +function getStatus(rawResponse) { + var _a; + const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + return transformStatus({ status, statusCode: rawResponse.statusCode }); +} +function getProvisioningState(rawResponse) { + var _a, _b; + const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; + const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; + return transformStatus({ status, statusCode: rawResponse.statusCode }); +} +function toOperationStatus(statusCode) { + if (statusCode === 202) { + return "running"; + } + else if (statusCode < 300) { + return "succeeded"; + } + else { + return "failed"; + } +} +function parseRetryAfter({ rawResponse }) { + const retryAfter = rawResponse.headers["retry-after"]; + if (retryAfter !== undefined) { + // Retry-After header value is either in HTTP date format, or in seconds + const retryAfterInSeconds = parseInt(retryAfter); + return isNaN(retryAfterInSeconds) + ? calculatePollingIntervalFromDate(new Date(retryAfter)) + : retryAfterInSeconds * 1000; + } + return undefined; +} +exports.parseRetryAfter = parseRetryAfter; +function getErrorFromResponse(response) { + const error = accessBodyProperty(response, "error"); + if (!error) { + logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); + return; + } + if (!error.code || !error.message) { + logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); + return; + } + return error; +} +exports.getErrorFromResponse = getErrorFromResponse; +function calculatePollingIntervalFromDate(retryAfterDate) { + const timeNow = Math.floor(new Date().getTime()); + const retryAfterTime = retryAfterDate.getTime(); + if (timeNow < retryAfterTime) { + return retryAfterTime - timeNow; + } + return undefined; +} +function getStatusFromInitialResponse(inputs) { + const { response, state, operationLocation } = inputs; + function helper() { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case undefined: + return toOperationStatus(response.rawResponse.statusCode); + case "Body": + return getOperationStatus(response, state); + default: + return "running"; + } + } + const status = helper(); + return status === "running" && operationLocation === undefined ? "succeeded" : status; +} +exports.getStatusFromInitialResponse = getStatusFromInitialResponse; +/** + * Initiates the long-running operation. + */ +async function initHttpOperation(inputs) { + const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; + return (0, operation_js_1.initOperation)({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = inferLroMode({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig, + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); + }, + stateProxy, + processResult: processResult + ? ({ flatResponse }, state) => processResult(flatResponse, state) + : ({ flatResponse }) => flatResponse, + getOperationStatus: getStatusFromInitialResponse, + setErrorAsResult, + }); +} +exports.initHttpOperation = initHttpOperation; +function getOperationLocation({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getOperationLocationPollingUrl({ + operationLocation: getOperationLocationHeader(rawResponse), + azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse), + }); + } + case "ResourceLocation": { + return getLocationHeader(rawResponse); + } + case "Body": + default: { + return undefined; + } + } +} +exports.getOperationLocation = getOperationLocation; +function getOperationStatus({ rawResponse }, state) { + var _a; + const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; + switch (mode) { + case "OperationLocation": { + return getStatus(rawResponse); + } + case "ResourceLocation": { + return toOperationStatus(rawResponse.statusCode); + } + case "Body": { + return getProvisioningState(rawResponse); + } + default: + throw new Error(`Internal error: Unexpected operation mode: ${mode}`); + } +} +exports.getOperationStatus = getOperationStatus; +function accessBodyProperty({ flatResponse, rawResponse }, prop) { + var _a, _b; + return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; +} +function getResourceLocation(res, state) { + const loc = accessBodyProperty(res, "resourceLocation"); + if (loc && typeof loc === "string") { + state.config.resourceLocation = loc; } + return state.config.resourceLocation; +} +exports.getResourceLocation = getResourceLocation; +function isOperationError(e) { + return e.name === "RestError"; +} +exports.isOperationError = isOperationError; +/** Polls the long-running operation. */ +async function pollHttpOperation(inputs) { + const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs; + return (0, operation_js_1.pollOperation)({ + state, + stateProxy, + setDelay, + processResult: processResult + ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) + : ({ flatResponse }) => flatResponse, + getError: getErrorFromResponse, + updateState, + getPollingInterval: parseRetryAfter, + getOperationLocation, + getOperationStatus, + isOperationError, + getResourceLocation, + options, + /** + * The expansion here is intentional because `lro` could be an object that + * references an inner this, so we need to preserve a reference to it. + */ + poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), + setErrorAsResult, + }); +} +exports.pollHttpOperation = pollHttpOperation; +//# sourceMappingURL=operation.js.map - // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". - if (urlRecord.protocol === 'http:') { - urlRecord.protocol = 'ws:' - } else if (urlRecord.protocol === 'https:') { - // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". - urlRecord.protocol = 'wss:' - } +/***/ }), - // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. - if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { - throw new DOMException( - `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, - 'SyntaxError' - ) - } +/***/ 78412: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" - // DOMException. - if (urlRecord.hash || urlRecord.href.endsWith('#')) { - throw new DOMException('Got fragment', 'SyntaxError') - } +"use strict"; - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpPoller = void 0; +const operation_js_1 = __nccwpck_require__(57759); +const poller_js_1 = __nccwpck_require__(76713); +/** + * Creates a poller that can be used to poll a long-running operation. + * @param lro - Description of the long-running operation + * @param options - options to configure the poller + * @returns an initialized poller + */ +async function createHttpPoller(lro, options) { + const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {}; + return (0, poller_js_1.buildCreatePoller)({ + getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, + getStatusFromPollResponse: operation_js_1.getOperationStatus, + isOperationError: operation_js_1.isOperationError, + getOperationLocation: operation_js_1.getOperationLocation, + getResourceLocation: operation_js_1.getResourceLocation, + getPollingInterval: operation_js_1.parseRetryAfter, + getError: operation_js_1.getErrorFromResponse, + resolveOnUnsuccessful, + })({ + init: async () => { + const response = await lro.sendInitialRequest(); + const config = (0, operation_js_1.inferLroMode)({ + rawResponse: response.rawResponse, + requestPath: lro.requestPath, + requestMethod: lro.requestMethod, + resourceLocationConfig, + }); + return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); + }, + poll: lro.sendPollRequest, + }, { + intervalInMs, + withOperationLocation, + restoreFrom, + updateState, + processResult: processResult + ? ({ flatResponse }, state) => processResult(flatResponse, state) + : ({ flatResponse }) => flatResponse, + }); +} +exports.createHttpPoller = createHttpPoller; +//# sourceMappingURL=poller.js.map - // 9. If any of the values in protocols occur more than once or otherwise - // fail to match the requirements for elements that comprise the value - // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket - // protocol, then throw a "SyntaxError" DOMException. - if (protocols.length !== new Set(protocols.map(p => p.toLowerCase())).size) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } +/***/ }), - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') - } +/***/ 90334: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 10. Set this's url to urlRecord. - this[kWebSocketURL] = new URL(urlRecord.href) +"use strict"; - // 11. Let client be this's relevant settings object. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpPoller = void 0; +const tslib_1 = __nccwpck_require__(4351); +var poller_js_1 = __nccwpck_require__(78412); +Object.defineProperty(exports, "createHttpPoller", ({ enumerable: true, get: function () { return poller_js_1.createHttpPoller; } })); +/** + * This can be uncommented to expose the protocol-agnostic poller + */ +// export { +// BuildCreatePollerOptions, +// Operation, +// CreatePollerOptions, +// OperationConfig, +// RestorableOperationState, +// } from "./poller/models"; +// export { buildCreatePoller } from "./poller/poller"; +/** legacy */ +tslib_1.__exportStar(__nccwpck_require__(52260), exports); +tslib_1.__exportStar(__nccwpck_require__(17270), exports); +tslib_1.__exportStar(__nccwpck_require__(93586), exports); +//# sourceMappingURL=index.js.map - // 12. Run this step in parallel: +/***/ }), - // 1. Establish a WebSocket connection given urlRecord, protocols, - // and client. - this[kController] = establishWebSocketConnection( - urlRecord, - protocols, - this, - (response) => this.#onConnectionEstablished(response), - options - ) +/***/ 52260: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Each WebSocket object has an associated ready state, which is a - // number representing the state of the connection. Initially it must - // be CONNECTING (0). - this[kReadyState] = WebSocket.CONNECTING +"use strict"; - // The extensions attribute must initially return the empty string. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LroEngine = void 0; +var lroEngine_js_1 = __nccwpck_require__(35780); +Object.defineProperty(exports, "LroEngine", ({ enumerable: true, get: function () { return lroEngine_js_1.LroEngine; } })); +//# sourceMappingURL=index.js.map - // The protocol attribute must initially return the empty string. +/***/ }), - // Each WebSocket object has an associated binary type, which is a - // BinaryType. Initially it must be "blob". - this[kBinaryType] = 'blob' - } +/***/ 35780: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) +"use strict"; - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, { clamp: true }) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LroEngine = void 0; +const operation_js_1 = __nccwpck_require__(77954); +const constants_js_1 = __nccwpck_require__(53846); +const poller_js_1 = __nccwpck_require__(17270); +const operation_js_2 = __nccwpck_require__(70281); +/** + * The LRO Engine, a class that performs polling. + */ +class LroEngine extends poller_js_1.Poller { + constructor(lro, options) { + const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState, } = options || {}; + const state = resumeFrom + ? (0, operation_js_2.deserializeState)(resumeFrom) + : {}; + const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); + super(operation); + this.resolveOnUnsuccessful = resolveOnUnsuccessful; + this.config = { intervalInMs: intervalInMs }; + operation.setPollerConfig(this.config); } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason) + /** + * The method used by the poller to wait before attempting to update its operation. + */ + delay() { + return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); } +} +exports.LroEngine = LroEngine; +//# sourceMappingURL=lroEngine.js.map - // 1. If code is present, but is neither an integer equal to 1000 nor an - // integer in the range 3000 to 4999, inclusive, throw an - // "InvalidAccessError" DOMException. - if (code !== undefined) { - if (code !== 1000 && (code < 3000 || code > 4999)) { - throw new DOMException('invalid code', 'InvalidAccessError') - } - } +/***/ }), - let reasonByteLength = 0 +/***/ 77954: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // 2. If reason is present, then run these substeps: - if (reason !== undefined) { - // 1. Let reasonBytes be the result of encoding reason. - // 2. If reasonBytes is longer than 123 bytes, then throw a - // "SyntaxError" DOMException. - reasonByteLength = Buffer.byteLength(reason) +"use strict"; - if (reasonByteLength > 123) { - throw new DOMException( - `Reason must be less than 123 bytes; received ${reasonByteLength}`, - 'SyntaxError' - ) - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GenericPollOperation = void 0; +const operation_js_1 = __nccwpck_require__(57759); +const logger_js_1 = __nccwpck_require__(28121); +const createStateProxy = () => ({ + initState: (config) => ({ config, isStarted: true }), + setCanceled: (state) => (state.isCancelled = true), + setError: (state, error) => (state.error = error), + setResult: (state, result) => (state.result = result), + setRunning: (state) => (state.isStarted = true), + setSucceeded: (state) => (state.isCompleted = true), + setFailed: () => { + /** empty body */ + }, + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => !!state.isCancelled, + isFailed: (state) => !!state.error, + isRunning: (state) => !!state.isStarted, + isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error), +}); +class GenericPollOperation { + constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { + this.state = state; + this.lro = lro; + this.setErrorAsResult = setErrorAsResult; + this.lroResourceLocationConfig = lroResourceLocationConfig; + this.processResult = processResult; + this.updateState = updateState; + this.isDone = isDone; } - - // 3. Run the first matching steps from the following list: - if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(this)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(this, 'Connection was closed before it was established.') - this[kReadyState] = WebSocket.CLOSING - } else if (!isClosing(this)) { - // If the WebSocket closing handshake has not yet been started - // Start the WebSocket closing handshake and set this's ready - // state to CLOSING (2). - // - If neither code nor reason is present, the WebSocket Close - // message must not have a body. - // - If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - // - If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - - const frame = new WebsocketFrameSend() - - // If neither code nor reason is present, the WebSocket Close - // message must not have a body. - - // If code is present, then the status code to use in the - // WebSocket Close message must be the integer given by code. - if (code !== undefined && reason === undefined) { - frame.frameData = Buffer.allocUnsafe(2) - frame.frameData.writeUInt16BE(code, 0) - } else if (code !== undefined && reason !== undefined) { - // If reason is also present, then reasonBytes must be - // provided in the Close message after the status code. - frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) - frame.frameData.writeUInt16BE(code, 0) - // the body MAY contain UTF-8-encoded data with value /reason/ - frame.frameData.write(reason, 2, 'utf-8') - } else { - frame.frameData = emptyBuffer - } - - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE), (err) => { - if (!err) { - this[kSentClose] = true + setPollerConfig(pollerConfig) { + this.pollerConfig = pollerConfig; + } + async update(options) { + var _a; + const stateProxy = createStateProxy(); + if (!this.state.isStarted) { + this.state = Object.assign(Object.assign({}, this.state), (await (0, operation_js_1.initHttpOperation)({ + lro: this.lro, + stateProxy, + resourceLocationConfig: this.lroResourceLocationConfig, + processResult: this.processResult, + setErrorAsResult: this.setErrorAsResult, + }))); } - }) - - // Upon either sending or receiving a Close control frame, it is said - // that _The WebSocket Closing Handshake is Started_ and that the - // WebSocket connection is in the CLOSING state. - this[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - this[kReadyState] = WebSocket.CLOSING + const updateState = this.updateState; + const isDone = this.isDone; + if (!this.state.isCompleted && this.state.error === undefined) { + await (0, operation_js_1.pollHttpOperation)({ + lro: this.lro, + state: this.state, + stateProxy, + processResult: this.processResult, + updateState: updateState + ? (state, { rawResponse }) => updateState(state, rawResponse) + : undefined, + isDone: isDone + ? ({ flatResponse }, state) => isDone(flatResponse, state) + : undefined, + options, + setDelay: (intervalInMs) => { + this.pollerConfig.intervalInMs = intervalInMs; + }, + setErrorAsResult: this.setErrorAsResult, + }); + } + (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); + return this; } - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' }) - - data = webidl.converters.WebSocketSendData(data) - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (this[kReadyState] === WebSocket.CONNECTING) { - throw new DOMException('Sent before connected.', 'InvalidStateError') + async cancel() { + logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); + return this; } - - // 2. Run the appropriate set of steps from the following list: - // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 - // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - - if (!isEstablished(this) || isClosing(this)) { - return + /** + * Serializes the Poller operation. + */ + toString() { + return JSON.stringify({ + state: this.state, + }); } +} +exports.GenericPollOperation = GenericPollOperation; +//# sourceMappingURL=operation.js.map - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket - - // If data is a string - if (typeof data === 'string') { - // If the WebSocket connection is established and the WebSocket - // closing handshake has not yet started, then the user agent - // must send a WebSocket Message comprised of the data argument - // using a text frame opcode; if the data cannot be sent, e.g. - // because it would need to be buffered but the buffer is full, - // the user agent must flag the WebSocket as full and then close - // the WebSocket connection. Any invocation of this method with a - // string argument that does not throw an exception must increase - // the bufferedAmount attribute by the number of bytes needed to - // express the argument as UTF-8. - - const value = Buffer.from(data) - const frame = new WebsocketFrameSend(value) - const buffer = frame.createFrame(opcodes.TEXT) - - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - } else if (types.isArrayBuffer(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need - // to be buffered but the buffer is full, the user agent must flag - // the WebSocket as full and then close the WebSocket connection. - // The data to be sent is the data stored in the buffer described - // by the ArrayBuffer object. Any invocation of this method with an - // ArrayBuffer argument that does not throw an exception must - // increase the bufferedAmount attribute by the length of the - // ArrayBuffer in bytes. - - const value = Buffer.from(data) - const frame = new WebsocketFrameSend(value) - const buffer = frame.createFrame(opcodes.BINARY) +/***/ }), - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - } else if (ArrayBuffer.isView(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The - // data to be sent is the data stored in the section of the buffer - // described by the ArrayBuffer object that data references. Any - // invocation of this method with this kind of argument that does - // not throw an exception must increase the bufferedAmount attribute - // by the length of data’s buffer in bytes. +/***/ 93586: +/***/ ((__unused_webpack_module, exports) => { - const ab = Buffer.from(data, data.byteOffset, data.byteLength) +"use strict"; - const frame = new WebsocketFrameSend(ab) - const buffer = frame.createFrame(opcodes.BINARY) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=pollOperation.js.map - this.#bufferedAmount += ab.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= ab.byteLength - }) - } else if (isBlobLike(data)) { - // If the WebSocket connection is established, and the WebSocket - // closing handshake has not yet started, then the user agent must - // send a WebSocket Message comprised of data using a binary frame - // opcode; if the data cannot be sent, e.g. because it would need to - // be buffered but the buffer is full, the user agent must flag the - // WebSocket as full and then close the WebSocket connection. The data - // to be sent is the raw data represented by the Blob object. Any - // invocation of this method with a Blob argument that does not throw - // an exception must increase the bufferedAmount attribute by the size - // of the Blob object’s raw data, in bytes. +/***/ }), - const frame = new WebsocketFrameSend() +/***/ 17270: +/***/ ((__unused_webpack_module, exports) => { - data.arrayBuffer().then((ab) => { - const value = Buffer.from(ab) - frame.frameData = value - const buffer = frame.createFrame(opcodes.BINARY) +"use strict"; - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - }) +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Poller = exports.PollerCancelledError = exports.PollerStoppedError = void 0; +/** + * When a poller is manually stopped through the `stopPolling` method, + * the poller will be rejected with an instance of the PollerStoppedError. + */ +class PollerStoppedError extends Error { + constructor(message) { + super(message); + this.name = "PollerStoppedError"; + Object.setPrototypeOf(this, PollerStoppedError.prototype); } - } - - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol - } - - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open - } - - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) +} +exports.PollerStoppedError = PollerStoppedError; +/** + * When the operation is cancelled, the poller will be rejected with an instance + * of the PollerCancelledError. + */ +class PollerCancelledError extends Error { + constructor(message) { + super(message); + this.name = "PollerCancelledError"; + Object.setPrototypeOf(this, PollerCancelledError.prototype); } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null +} +exports.PollerCancelledError = PollerCancelledError; +/** + * A class that represents the definition of a program that polls through consecutive requests + * until it reaches a state of completion. + * + * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. + * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. + * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * + * ```ts + * const poller = new MyPoller(); + * + * // Polling just once: + * await poller.poll(); + * + * // We can try to cancel the request here, by calling: + * // + * // await poller.cancelOperation(); + * // + * + * // Getting the final result: + * const result = await poller.pollUntilDone(); + * ``` + * + * The Poller is defined by two types, a type representing the state of the poller, which + * must include a basic set of properties from `PollOperationState`, + * and a return type defined by `TResult`, which can be anything. + * + * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having + * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * + * ```ts + * class Client { + * public async makePoller: PollerLike { + * const poller = new MyPoller({}); + * // It might be preferred to return the poller after the first request is made, + * // so that some information can be obtained right away. + * await poller.poll(); + * return poller; + * } + * } + * + * const poller: PollerLike = myClient.makePoller(); + * ``` + * + * A poller can be created through its constructor, then it can be polled until it's completed. + * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. + * At any point in time, the intermediate forms of the result type can be requested without delay. + * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * + * ```ts + * const poller = myClient.makePoller(); + * const state: MyOperationState = poller.getOperationState(); + * + * // The intermediate result can be obtained at any time. + * const result: MyResult | undefined = poller.getResult(); + * + * // The final result can only be obtained after the poller finishes. + * const result: MyResult = await poller.pollUntilDone(); + * ``` + * + */ +// eslint-disable-next-line no-use-before-define +class Poller { + /** + * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. + * + * When writing an implementation of a Poller, this implementation needs to deal with the initialization + * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's + * operation has already been defined, at least its basic properties. The code below shows how to approach + * the definition of the constructor of a new custom poller. + * + * ```ts + * export class MyPoller extends Poller { + * constructor({ + * // Anything you might need outside of the basics + * }) { + * let state: MyOperationState = { + * privateProperty: private, + * publicProperty: public, + * }; + * + * const operation = { + * state, + * update, + * cancel, + * toString + * } + * + * // Sending the operation to the parent's constructor. + * super(operation); + * + * // You can assign more local properties here. + * } + * } + * ``` + * + * Inside of this constructor, a new promise is created. This will be used to + * tell the user when the poller finishes (see `pollUntilDone()`). The promise's + * resolve and reject methods are also used internally to control when to resolve + * or reject anyone waiting for the poller to finish. + * + * The constructor of a custom implementation of a poller is where any serialized version of + * a previous poller's operation should be deserialized into the operation sent to the + * base constructor. For example: + * + * ```ts + * export class MyPoller extends Poller { + * constructor( + * baseOperation: string | undefined + * ) { + * let state: MyOperationState = {}; + * if (baseOperation) { + * state = { + * ...JSON.parse(baseOperation).state, + * ...state + * }; + * } + * const operation = { + * state, + * // ... + * } + * super(operation); + * } + * } + * ``` + * + * @param operation - Must contain the basic properties of `PollOperation`. + */ + constructor(operation) { + /** controls whether to throw an error if the operation failed or was canceled. */ + this.resolveOnUnsuccessful = false; + this.stopped = true; + this.pollProgressCallbacks = []; + this.operation = operation; + this.promise = new Promise((resolve, reject) => { + this.resolve = resolve; + this.reject = reject; + }); + // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown. + // The above warning would get thrown if `poller.poll` is called, it returns an error, + // and pullUntilDone did not have a .catch or await try/catch on it's return value. + this.promise.catch(() => { + /* intentionally blank */ + }); } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) + /** + * Starts a loop that will break only if the poller is done + * or if the poller is stopped. + */ + async startPolling(pollOptions = {}) { + if (this.stopped) { + this.stopped = false; + } + while (!this.isStopped() && !this.isDone()) { + await this.poll(pollOptions); + await this.delay(); + } } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null + /** + * pollOnce does one polling, by calling to the update method of the underlying + * poll operation to make any relevant change effective. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + async pollOnce(options = {}) { + if (!this.isDone()) { + this.operation = await this.operation.update({ + abortSignal: options.abortSignal, + fireProgress: this.fireProgress.bind(this), + }); + } + this.processUpdatedState(); } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) + /** + * fireProgress calls the functions passed in via onProgress the method of the poller. + * + * It loops over all of the callbacks received from onProgress, and executes them, sending them + * the current operation state. + * + * @param state - The current operation state. + */ + fireProgress(state) { + for (const callback of this.pollProgressCallbacks) { + callback(state); + } } - - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null + /** + * Invokes the underlying operation's cancel method. + */ + async cancelOnce(options = {}) { + this.operation = await this.operation.cancel(options); } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) + /** + * Returns a promise that will resolve once a single polling request finishes. + * It does this by calling the update method of the Poller's operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * @param options - Optional properties passed to the operation's update method. + */ + poll(options = {}) { + if (!this.pollOncePromise) { + this.pollOncePromise = this.pollOnce(options); + const clearPollOncePromise = () => { + this.pollOncePromise = undefined; + }; + this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); + } + return this.pollOncePromise; } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null + processUpdatedState() { + if (this.operation.state.error) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + this.reject(this.operation.state.error); + throw this.operation.state.error; + } + } + if (this.operation.state.isCancelled) { + this.stopped = true; + if (!this.resolveOnUnsuccessful) { + const error = new PollerCancelledError("Operation was canceled"); + this.reject(error); + throw error; + } + } + if (this.isDone() && this.resolve) { + // If the poller has finished polling, this means we now have a result. + // However, it can be the case that TResult is instantiated to void, so + // we are not expecting a result anyway. To assert that we might not + // have a result eventually after finishing polling, we cast the result + // to TResult. + this.resolve(this.getResult()); + } } - } - - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type + /** + * Returns a promise that will resolve once the underlying operation is completed. + */ + async pollUntilDone(pollOptions = {}) { + if (this.stopped) { + this.startPolling(pollOptions).catch(this.reject); + } + // This is needed because the state could have been updated by + // `cancelOperation`, e.g. the operation is canceled or an error occurred. + this.processUpdatedState(); + return this.promise; } - } - - /** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - */ - #onConnectionEstablished (response) { - // processResponse is called when the "response’s header list has been received and initialized." - // once this happens, the connection is open - this[kResponse] = response - - const parser = new ByteParser(this) - parser.on('drain', function onParserDrain () { - this.ws[kResponse].socket.resume() - }) - - response.socket.ws = this - this[kByteParser] = parser - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = states.OPEN - - // 2. Change the extensions attribute’s value to the extensions in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 - const extensions = response.headersList.get('sec-websocket-extensions') - - if (extensions !== null) { - this.#extensions = extensions + /** + * Invokes the provided callback after each polling is completed, + * sending the current state of the poller's operation. + * + * It returns a method that can be used to stop receiving updates on the given callback function. + */ + onProgress(callback) { + this.pollProgressCallbacks.push(callback); + return () => { + this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); + }; } - - // 3. Change the protocol attribute’s value to the subprotocol in use, if - // it is not the null value. - // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 - const protocol = response.headersList.get('sec-websocket-protocol') - - if (protocol !== null) { - this.#protocol = protocol + /** + * Returns true if the poller has finished polling. + */ + isDone() { + const state = this.operation.state; + return Boolean(state.isCompleted || state.isCancelled || state.error); } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V) -} - -// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - get defaultValue () { - return [] + /** + * Stops the poller from continuing to poll. + */ + stopPolling() { + if (!this.stopped) { + this.stopped = true; + if (this.reject) { + this.reject(new PollerStoppedError("This poller is already stopped")); + } + } } - }, - { - key: 'dispatcher', - converter: (V) => V, - get defaultValue () { - return getGlobalDispatcher() + /** + * Returns true if the poller is stopped. + */ + isStopped() { + return this.stopped; } - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) + /** + * Attempts to cancel the underlying operation. + * + * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. + * + * If it's called again before it finishes, it will throw an error. + * + * @param options - Optional properties passed to the operation's update method. + */ + cancelOperation(options = {}) { + if (!this.cancelPromise) { + this.cancelPromise = this.cancelOnce(options); + } + else if (options.abortSignal) { + throw new Error("A cancel request is currently pending"); + } + return this.cancelPromise; } - - if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { - return webidl.converters.BufferSource(V) + /** + * Returns the state of the operation. + * + * Even though TState will be the same type inside any of the methods of any extension of the Poller class, + * implementations of the pollers can customize what's shared with the public by writing their own + * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller + * and a public type representing a safe to share subset of the properties of the internal state. + * Their definition of getOperationState can then return their public type. + * + * Example: + * + * ```ts + * // Let's say we have our poller's operation state defined as: + * interface MyOperationState extends PollOperationState { + * privateProperty?: string; + * publicProperty?: string; + * } + * + * // To allow us to have a true separation of public and private state, we have to define another interface: + * interface PublicState extends PollOperationState { + * publicProperty?: string; + * } + * + * // Then, we define our Poller as follows: + * export class MyPoller extends Poller { + * // ... More content is needed here ... + * + * public getOperationState(): PublicState { + * const state: PublicState = this.operation.state; + * return { + * // Properties from PollOperationState + * isStarted: state.isStarted, + * isCompleted: state.isCompleted, + * isCancelled: state.isCancelled, + * error: state.error, + * result: state.result, + * + * // The only other property needed by PublicState. + * publicProperty: state.publicProperty + * } + * } + * } + * ``` + * + * You can see this in the tests of this repository, go to the file: + * `../test/utils/testPoller.ts` + * and look for the getOperationState implementation. + */ + getOperationState() { + return this.operation.state; + } + /** + * Returns the result value of the operation, + * regardless of the state of the poller. + * It can return undefined or an incomplete form of the final TResult value + * depending on the implementation. + */ + getResult() { + const state = this.operation.state; + return state.result; + } + /** + * Returns a serialized version of the poller's operation + * by invoking the operation's toString method. + */ + toString() { + return this.operation.toString(); } - } - - return webidl.converters.USVString(V) -} - -module.exports = { - WebSocket } - +exports.Poller = Poller; +//# sourceMappingURL=poller.js.map /***/ }), -/***/ 45030: -/***/ ((__unused_webpack_module, exports) => { +/***/ 28121: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); - -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - - if (typeof process === "object" && process.version !== undefined) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - - return ""; -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map - +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); +/** + * The `@azure/logger` configuration for this package. + * @internal + */ +exports.logger = (0, logger_1.createClientLogger)("core-lro"); +//# sourceMappingURL=logger.js.map /***/ }), -/***/ 65278: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 53846: +/***/ ((__unused_webpack_module, exports) => { +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.terminalStates = exports.POLL_INTERVAL_IN_MS = void 0; /** - * For Node.js, simply re-export the core `util.deprecate` function. + * The default time interval to wait before sending the next polling request. */ - -module.exports = __nccwpck_require__(73837).deprecate; - +exports.POLL_INTERVAL_IN_MS = 2000; +/** + * The closed set of terminal states. + */ +exports.terminalStates = ["succeeded", "canceled", "failed"]; +//# sourceMappingURL=constants.js.map /***/ }), -/***/ 2155: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var v1 = __nccwpck_require__(18749); -var v4 = __nccwpck_require__(80824); - -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; - - -/***/ }), +/***/ 70281: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/***/ 92707: -/***/ ((module) => { +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pollOperation = exports.initOperation = exports.deserializeState = void 0; +const logger_js_1 = __nccwpck_require__(28121); +const constants_js_1 = __nccwpck_require__(53846); /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + * Deserializes the state */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); +function deserializeState(serializedState) { + try { + return JSON.parse(serializedState).state; + } + catch (e) { + throw new Error(`Unable to deserialize input state: ${serializedState}`); + } } - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([ - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]] - ]).join(''); +exports.deserializeState = deserializeState; +function setStateError(inputs) { + const { state, stateProxy, isOperationError } = inputs; + return (error) => { + if (isOperationError(error)) { + stateProxy.setError(state, error); + stateProxy.setFailed(state); + } + throw error; + }; } - -module.exports = bytesToUuid; - +function appendReadableErrorMessage(currentMessage, innerMessage) { + let message = currentMessage; + if (message.slice(-1) !== ".") { + message = message + "."; + } + return message + " " + innerMessage; +} +function simplifyError(err) { + let message = err.message; + let code = err.code; + let curErr = err; + while (curErr.innererror) { + curErr = curErr.innererror; + code = curErr.code; + message = appendReadableErrorMessage(message, curErr.message); + } + return { + code, + message, + }; +} +function processOperationStatus(result) { + const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; + switch (status) { + case "succeeded": { + stateProxy.setSucceeded(state); + break; + } + case "failed": { + const err = getError === null || getError === void 0 ? void 0 : getError(response); + let postfix = ""; + if (err) { + const { code, message } = simplifyError(err); + postfix = `. ${code}. ${message}`; + } + const errStr = `The long-running operation has failed${postfix}`; + stateProxy.setError(state, new Error(errStr)); + stateProxy.setFailed(state); + logger_js_1.logger.warning(errStr); + break; + } + case "canceled": { + stateProxy.setCanceled(state); + break; + } + } + if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || + (isDone === undefined && + ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status))) { + stateProxy.setResult(state, buildResult({ + response, + state, + processResult, + })); + } +} +function buildResult(inputs) { + const { processResult, response, state } = inputs; + return processResult ? processResult(response, state) : response; +} +/** + * Initiates the long-running operation. + */ +async function initOperation(inputs) { + const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs; + const { operationLocation, resourceLocation, metadata, response } = await init(); + if (operationLocation) + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + const config = { + metadata, + operationLocation, + resourceLocation, + }; + logger_js_1.logger.verbose(`LRO: Operation description:`, config); + const state = stateProxy.initState(config); + const status = getOperationStatus({ response, state, operationLocation }); + processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); + return state; +} +exports.initOperation = initOperation; +async function pollOperationHelper(inputs) { + const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs; + const response = await poll(operationLocation, options).catch(setStateError({ + state, + stateProxy, + isOperationError, + })); + const status = getOperationStatus(response, state); + logger_js_1.logger.verbose(`LRO: Status:\n\tPolling from: ${state.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); + if (status === "succeeded") { + const resourceLocation = getResourceLocation(response, state); + if (resourceLocation !== undefined) { + return { + response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), + status, + }; + } + } + return { response, status }; +} +/** Polls the long-running operation. */ +async function pollOperation(inputs) { + const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult, } = inputs; + const { operationLocation } = state.config; + if (operationLocation !== undefined) { + const { response, status } = await pollOperationHelper({ + poll, + getOperationStatus, + state, + stateProxy, + operationLocation, + getResourceLocation, + isOperationError, + options, + }); + processOperationStatus({ + status, + response, + state, + stateProxy, + isDone, + processResult, + getError, + setErrorAsResult, + }); + if (!constants_js_1.terminalStates.includes(status)) { + const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); + if (intervalInMs) + setDelay(intervalInMs); + const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); + if (location !== undefined) { + const isUpdated = operationLocation !== location; + state.config.operationLocation = location; + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); + } + else + withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); + } + updateState === null || updateState === void 0 ? void 0 : updateState(state, response); + } +} +exports.pollOperation = pollOperation; +//# sourceMappingURL=operation.js.map /***/ }), -/***/ 15859: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. - -var crypto = __nccwpck_require__(6113); +/***/ 76713: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = function nodeRNG() { - return crypto.randomBytes(16); -}; +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildCreatePoller = void 0; +const operation_js_1 = __nccwpck_require__(70281); +const constants_js_1 = __nccwpck_require__(53846); +const core_util_1 = __nccwpck_require__(80637); +const createStateProxy = () => ({ + /** + * The state at this point is created to be of type OperationState. + * It will be updated later to be of type TState when the + * customer-provided callback, `updateState`, is called during polling. + */ + initState: (config) => ({ status: "running", config }), + setCanceled: (state) => (state.status = "canceled"), + setError: (state, error) => (state.error = error), + setResult: (state, result) => (state.result = result), + setRunning: (state) => (state.status = "running"), + setSucceeded: (state) => (state.status = "succeeded"), + setFailed: (state) => (state.status = "failed"), + getError: (state) => state.error, + getResult: (state) => state.result, + isCanceled: (state) => state.status === "canceled", + isFailed: (state) => state.status === "failed", + isRunning: (state) => state.status === "running", + isSucceeded: (state) => state.status === "succeeded", +}); +/** + * Returns a poller factory. + */ +function buildCreatePoller(inputs) { + const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful, } = inputs; + return async ({ init, poll }, options) => { + const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom, } = options || {}; + const stateProxy = createStateProxy(); + const withOperationLocation = withOperationLocationCallback + ? (() => { + let called = false; + return (operationLocation, isUpdated) => { + if (isUpdated) + withOperationLocationCallback(operationLocation); + else if (!called) + withOperationLocationCallback(operationLocation); + called = true; + }; + })() + : undefined; + const state = restoreFrom + ? (0, operation_js_1.deserializeState)(restoreFrom) + : await (0, operation_js_1.initOperation)({ + init, + stateProxy, + processResult, + getOperationStatus: getStatusFromInitialResponse, + withOperationLocation, + setErrorAsResult: !resolveOnUnsuccessful, + }); + let resultPromise; + const abortController = new AbortController(); + const handlers = new Map(); + const handleProgressEvents = async () => handlers.forEach((h) => h(state)); + const cancelErrMsg = "Operation was canceled"; + let currentPollIntervalInMs = intervalInMs; + const poller = { + getOperationState: () => state, + getResult: () => state.result, + isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), + isStopped: () => resultPromise === undefined, + stopPolling: () => { + abortController.abort(); + }, + toString: () => JSON.stringify({ + state, + }), + onProgress: (callback) => { + const s = Symbol(); + handlers.set(s, callback); + return () => handlers.delete(s); + }, + pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + // In the future we can use AbortSignal.any() instead + function abortListener() { + abortController.abort(); + } + const abortSignal = abortController.signal; + if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { + abortController.abort(); + } + else if (!abortSignal.aborted) { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); + } + try { + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); + await poller.poll({ abortSignal }); + } + } + } + finally { + inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); + } + if (resolveOnUnsuccessful) { + return poller.getResult(); + } + else { + switch (state.status) { + case "succeeded": + return poller.getResult(); + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + case "notStarted": + case "running": + throw new Error(`Polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = undefined; + }))), + async poll(pollOptions) { + if (resolveOnUnsuccessful) { + if (poller.isDone()) + return; + } + else { + switch (state.status) { + case "succeeded": + return; + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + await (0, operation_js_1.pollOperation)({ + poll, + state, + stateProxy, + getOperationLocation, + isOperationError, + withOperationLocation, + getPollingInterval, + getOperationStatus: getStatusFromPollResponse, + getResourceLocation, + processResult, + getError, + updateState, + options: pollOptions, + setDelay: (pollIntervalInMs) => { + currentPollIntervalInMs = pollIntervalInMs; + }, + setErrorAsResult: !resolveOnUnsuccessful, + }); + await handleProgressEvents(); + if (!resolveOnUnsuccessful) { + switch (state.status) { + case "canceled": + throw new Error(cancelErrMsg); + case "failed": + throw state.error; + } + } + }, + }; + return poller; + }; +} +exports.buildCreatePoller = buildCreatePoller; +//# sourceMappingURL=poller.js.map /***/ }), -/***/ 18749: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); +/***/ 43171: +/***/ ((__unused_webpack_module, exports) => { -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html +"use strict"; -var _nodeId; -var _clockseq; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "1.22.2"; +exports.DEFAULT_RETRY_POLICY_COUNT = 3; +//# sourceMappingURL=constants.js.map -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; +/***/ }), -// See https://github.com/uuidjs/uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; +/***/ 81060: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; +"use strict"; - // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - var seedBytes = rng(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] - ]; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineFromOptions = createPipelineFromOptions; +const logPolicy_js_1 = __nccwpck_require__(46821); +const pipeline_js_1 = __nccwpck_require__(83906); +const redirectPolicy_js_1 = __nccwpck_require__(98526); +const userAgentPolicy_js_1 = __nccwpck_require__(88935); +const multipartPolicy_js_1 = __nccwpck_require__(19042); +const decompressResponsePolicy_js_1 = __nccwpck_require__(57618); +const defaultRetryPolicy_js_1 = __nccwpck_require__(48549); +const formDataPolicy_js_1 = __nccwpck_require__(16501); +const core_util_1 = __nccwpck_require__(80637); +const proxyPolicy_js_1 = __nccwpck_require__(94761); +const setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); +const agentPolicy_js_1 = __nccwpck_require__(15093); +const tlsPolicy_js_1 = __nccwpck_require__(88446); +const tracingPolicy_js_1 = __nccwpck_require__(80606); +const wrapAbortSignalLikePolicy_js_1 = __nccwpck_require__(48753); +/** + * Create a new pipeline with a default set of customizable policies. + * @param options - Options to configure a custom pipeline. + */ +function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (core_util_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); + } + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + pipeline.addPolicy((0, wrapAbortSignalLikePolicy_js_1.wrapAbortSignalLikePolicy)()); + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)(options.telemetryOptions?.clientRequestIdHeaderName)); + // The multipart policy is added after policies with no phase, so that + // policies can be added between it and formDataPolicy to modify + // properties (e.g., making the boundary constant in recorded tests). + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)({ ...options.userAgentOptions, ...options.loggingOptions }), { + afterPhase: "Retry", + }); + if (core_util_1.isNodeLike) { + // Both XHR and Fetch expect to handle redirects automatically, + // so only include this policy when we're in Node. + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); } - } - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf ? buf : bytesToUuid(b); + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; } - -module.exports = v1; - +//# sourceMappingURL=createPipelineFromOptions.js.map /***/ }), -/***/ 80824: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(15859); -var bytesToUuid = __nccwpck_require__(92707); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; +/***/ 88609: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } - } +"use strict"; - return buf || bytesToUuid(rnds); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultHttpClient = createDefaultHttpClient; +const ts_http_runtime_1 = __nccwpck_require__(83335); +const wrapAbortSignal_js_1 = __nccwpck_require__(7188); +/** + * Create the correct HttpClient for the current environment. + */ +function createDefaultHttpClient() { + const client = (0, ts_http_runtime_1.createDefaultHttpClient)(); + return { + async sendRequest(request) { + // we wrap any AbortSignalLike here since the TypeSpec runtime expects a native AbortSignal. + // 99% of the time, this should be a no-op since a native AbortSignal is passed in. + const { abortSignal, cleanup } = request.abortSignal + ? (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal) + : {}; + try { + request.abortSignal = abortSignal; + return await client.sendRequest(request); + } + finally { + cleanup?.(); + } + }, + }; } - -module.exports = v4; - +//# sourceMappingURL=defaultHttpClient.js.map /***/ }), -/***/ 62940: -/***/ ((module) => { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) +/***/ 60118: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return wrapper +"use strict"; - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpHeaders = createHttpHeaders; +const ts_http_runtime_1 = __nccwpck_require__(83335); +/** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders - A simple object representing initial headers + */ +function createHttpHeaders(rawHeaders) { + return (0, ts_http_runtime_1.createHttpHeaders)(rawHeaders); } - +//# sourceMappingURL=httpHeaders.js.map /***/ }), -/***/ 95696: +/***/ 29146: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(56417); -var util_1 = __nccwpck_require__(76195); -var util_2 = __nccwpck_require__(65282); -var _1 = __nccwpck_require__(44260); -var dom_1 = __nccwpck_require__(40770); -/** @inheritdoc */ -function builder(p1, p2) { - var options = formatBuilderOptions(isXMLBuilderCreateOptions(p1) ? p1 : interfaces_1.DefaultBuilderOptions); - var nodes = util_2.Guard.isNode(p1) || util_1.isArray(p1) ? p1 : p2; - if (nodes === undefined) { - throw new Error("Invalid arguments."); - } - if (util_1.isArray(nodes)) { - var builders = []; - for (var i = 0; i < nodes.length; i++) { - var builder_1 = new _1.XMLBuilderImpl(nodes[i]); - builder_1.set(options); - builders.push(builder_1); - } - return builders; - } - else { - var builder_2 = new _1.XMLBuilderImpl(nodes); - builder_2.set(options); - return builder_2; - } -} -exports.builder = builder; -/** @inheritdoc */ -function create(p1, p2) { - var options = formatBuilderOptions(p1 === undefined || isXMLBuilderCreateOptions(p1) ? - p1 : interfaces_1.DefaultBuilderOptions); - var contents = isXMLBuilderCreateOptions(p1) ? p2 : p1; - var doc = dom_1.createDocument(); - setOptions(doc, options); - var builder = new _1.XMLBuilderImpl(doc); - if (contents !== undefined) { - // parse contents - builder.ele(contents); - } - return builder; -} -exports.create = create; -/** @inheritdoc */ -function fragment(p1, p2) { - var options = formatBuilderOptions(p1 === undefined || isXMLBuilderCreateOptions(p1) ? - p1 : interfaces_1.DefaultBuilderOptions); - var contents = isXMLBuilderCreateOptions(p1) ? p2 : p1; - var doc = dom_1.createDocument(); - setOptions(doc, options, true); - var builder = new _1.XMLBuilderImpl(doc.createDocumentFragment()); - if (contents !== undefined) { - // parse contents - builder.ele(contents); - } - return builder; -} -exports.fragment = fragment; -/** @inheritdoc */ -function convert(p1, p2, p3) { - var builderOptions; - var contents; - var convertOptions; - if (isXMLBuilderCreateOptions(p1) && p2 !== undefined) { - builderOptions = p1; - contents = p2; - convertOptions = p3; - } - else { - builderOptions = interfaces_1.DefaultBuilderOptions; - contents = p1; - convertOptions = p2 || undefined; - } - return create(builderOptions, contents).end(convertOptions); -} -exports.convert = convert; -function isXMLBuilderCreateOptions(obj) { - if (!util_1.isPlainObject(obj)) - return false; - for (var key in obj) { - /* istanbul ignore else */ - if (obj.hasOwnProperty(key)) { - if (!interfaces_1.XMLBuilderOptionKeys.has(key)) - return false; - } - } - return true; -} -function formatBuilderOptions(createOptions) { - if (createOptions === void 0) { createOptions = {}; } - var options = util_1.applyDefaults(createOptions, interfaces_1.DefaultBuilderOptions); - if (options.convert.att.length === 0 || - options.convert.ins.length === 0 || - options.convert.text.length === 0 || - options.convert.cdata.length === 0 || - options.convert.comment.length === 0) { - throw new Error("JS object converter strings cannot be zero length."); - } - return options; -} -function setOptions(doc, options, isFragment) { - var docWithSettings = doc; - docWithSettings._xmlBuilderOptions = options; - docWithSettings._isFragment = isFragment; +exports.createFileFromStream = exports.createFile = exports.agentPolicyName = exports.agentPolicy = exports.auxiliaryAuthenticationHeaderPolicyName = exports.auxiliaryAuthenticationHeaderPolicy = exports.ndJsonPolicyName = exports.ndJsonPolicy = exports.bearerTokenAuthenticationPolicyName = exports.bearerTokenAuthenticationPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.userAgentPolicyName = exports.userAgentPolicy = exports.defaultRetryPolicy = exports.tracingPolicyName = exports.tracingPolicy = exports.retryPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.setClientRequestIdPolicyName = exports.setClientRequestIdPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.isRestError = exports.RestError = exports.createPipelineRequest = exports.createHttpHeaders = exports.createDefaultHttpClient = exports.createPipelineFromOptions = exports.createEmptyPipeline = void 0; +var pipeline_js_1 = __nccwpck_require__(83906); +Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); +var createPipelineFromOptions_js_1 = __nccwpck_require__(81060); +Object.defineProperty(exports, "createPipelineFromOptions", ({ enumerable: true, get: function () { return createPipelineFromOptions_js_1.createPipelineFromOptions; } })); +var defaultHttpClient_js_1 = __nccwpck_require__(88609); +Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); +var httpHeaders_js_1 = __nccwpck_require__(60118); +Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); +var pipelineRequest_js_1 = __nccwpck_require__(93536); +Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); +var restError_js_1 = __nccwpck_require__(61036); +Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); +Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); +var decompressResponsePolicy_js_1 = __nccwpck_require__(57618); +Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); +Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(1598); +Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); +Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); +var setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); +Object.defineProperty(exports, "setClientRequestIdPolicy", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; } })); +Object.defineProperty(exports, "setClientRequestIdPolicyName", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } })); +var logPolicy_js_1 = __nccwpck_require__(46821); +Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); +Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); +var multipartPolicy_js_1 = __nccwpck_require__(19042); +Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); +Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); +var proxyPolicy_js_1 = __nccwpck_require__(94761); +Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); +Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); +Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); +var redirectPolicy_js_1 = __nccwpck_require__(98526); +Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); +Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(72470); +Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); +Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(54802); +Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); +Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); +var retryPolicy_js_1 = __nccwpck_require__(39700); +Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); +var tracingPolicy_js_1 = __nccwpck_require__(80606); +Object.defineProperty(exports, "tracingPolicy", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicy; } })); +Object.defineProperty(exports, "tracingPolicyName", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicyName; } })); +var defaultRetryPolicy_js_1 = __nccwpck_require__(48549); +Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); +var userAgentPolicy_js_1 = __nccwpck_require__(88935); +Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); +Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); +var tlsPolicy_js_1 = __nccwpck_require__(88446); +Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); +Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); +var formDataPolicy_js_1 = __nccwpck_require__(16501); +Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); +Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); +var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(11319); +Object.defineProperty(exports, "bearerTokenAuthenticationPolicy", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; } })); +Object.defineProperty(exports, "bearerTokenAuthenticationPolicyName", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; } })); +var ndJsonPolicy_js_1 = __nccwpck_require__(82032); +Object.defineProperty(exports, "ndJsonPolicy", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicy; } })); +Object.defineProperty(exports, "ndJsonPolicyName", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicyName; } })); +var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(21760); +Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicy", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; } })); +Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicyName", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } })); +var agentPolicy_js_1 = __nccwpck_require__(15093); +Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); +Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); +var file_js_1 = __nccwpck_require__(3224); +Object.defineProperty(exports, "createFile", ({ enumerable: true, get: function () { return file_js_1.createFile; } })); +Object.defineProperty(exports, "createFileFromStream", ({ enumerable: true, get: function () { return file_js_1.createFileFromStream; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 30648: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); +exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 83906: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createEmptyPipeline = createEmptyPipeline; +const ts_http_runtime_1 = __nccwpck_require__(83335); +/** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ +function createEmptyPipeline() { + return (0, ts_http_runtime_1.createEmptyPipeline)(); } -//# sourceMappingURL=BuilderFunctions.js.map +//# sourceMappingURL=pipeline.js.map /***/ }), -/***/ 10268: +/***/ 93536: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var _1 = __nccwpck_require__(44260); +exports.createPipelineRequest = createPipelineRequest; +const ts_http_runtime_1 = __nccwpck_require__(83335); /** - * Creates an XML builder which serializes the document in chunks. - * - * @param options - callback builder options - * - * @returns callback builder + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options - The options to create the request with. */ -function createCB(options) { - return new _1.XMLBuilderCBImpl(options); +function createPipelineRequest(options) { + // Cast required due to difference between ts-http-runtime requiring AbortSignal while core-rest-pipeline allows + // the more generic AbortSignalLike. The wrapAbortSignalLike pipeline policy will take care of ensuring that any AbortSignalLike in the request + // is converted into a true AbortSignal. + return (0, ts_http_runtime_1.createPipelineRequest)(options); } -exports.createCB = createCB; +//# sourceMappingURL=pipelineRequest.js.map + +/***/ }), + +/***/ 15093: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.agentPolicyName = void 0; +exports.agentPolicy = agentPolicy; +const policies_1 = __nccwpck_require__(81914); /** - * Creates an XML builder which serializes the fragment in chunks. - * - * @param options - callback builder options - * - * @returns callback builder + * Name of the Agent Policy */ -function fragmentCB(options) { - return new _1.XMLBuilderCBImpl(options, true); +exports.agentPolicyName = policies_1.agentPolicyName; +/** + * Gets a pipeline policy that sets http.agent + */ +function agentPolicy(agent) { + return (0, policies_1.agentPolicy)(agent); } -exports.fragmentCB = fragmentCB; -//# sourceMappingURL=BuilderFunctionsCB.js.map +//# sourceMappingURL=agentPolicy.js.map /***/ }), -/***/ 71438: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 21760: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(56417); -var util_1 = __nccwpck_require__(76195); -var BuilderFunctions_1 = __nccwpck_require__(95696); -var algorithm_1 = __nccwpck_require__(61); -var infra_1 = __nccwpck_require__(84251); -var NamespacePrefixMap_1 = __nccwpck_require__(90283); -var LocalNameSet_1 = __nccwpck_require__(19049); -var util_2 = __nccwpck_require__(65282); -var XMLCBWriter_1 = __nccwpck_require__(77572); -var JSONCBWriter_1 = __nccwpck_require__(37525); -var YAMLCBWriter_1 = __nccwpck_require__(42444); -var events_1 = __nccwpck_require__(82361); +exports.auxiliaryAuthenticationHeaderPolicyName = void 0; +exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; +const tokenCycler_js_1 = __nccwpck_require__(50601); +const log_js_1 = __nccwpck_require__(30648); /** - * Represents a readable XML document stream. + * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. */ -var XMLBuilderCBImpl = /** @class */ (function (_super) { - __extends(XMLBuilderCBImpl, _super); - /** - * Initializes a new instance of `XMLStream`. - * - * @param options - stream writer options - * @param fragment - whether to create fragment stream or a document stream - * - * @returns XML stream - */ - function XMLBuilderCBImpl(options, fragment) { - if (fragment === void 0) { fragment = false; } - var _this = _super.call(this) || this; - _this._hasDeclaration = false; - _this._docTypeName = ""; - _this._hasDocumentElement = false; - _this._currentElementSerialized = false; - _this._openTags = []; - _this._ended = false; - _this._fragment = fragment; - // provide default options - _this._options = util_1.applyDefaults(options || {}, interfaces_1.DefaultXMLBuilderCBOptions); - _this._builderOptions = { - defaultNamespace: _this._options.defaultNamespace, - namespaceAlias: _this._options.namespaceAlias - }; - if (_this._options.format === "json") { - _this._writer = new JSONCBWriter_1.JSONCBWriter(_this._options); - } - else if (_this._options.format === "yaml") { - _this._writer = new YAMLCBWriter_1.YAMLCBWriter(_this._options); - } - else { - _this._writer = new XMLCBWriter_1.XMLCBWriter(_this._options); - } - // automatically create listeners for callbacks passed via options - if (_this._options.data !== undefined) { - _this.on("data", _this._options.data); - } - if (_this._options.end !== undefined) { - _this.on("end", _this._options.end); - } - if (_this._options.error !== undefined) { - _this.on("error", _this._options.error); - } - _this._prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap(); - _this._prefixMap.set("xml", infra_1.namespace.XML); - _this._prefixIndex = { value: 1 }; - _this._push(_this._writer.frontMatter()); - return _this; - } - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.ele = function (p1, p2, p3) { - var e_1, _a; - // parse if JS object or XML or JSON string - if (util_1.isObject(p1) || (util_1.isString(p1) && (/^\s* Boolean(token)); + if (auxiliaryTokens.length === 0) { + logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); + return next(request); } - return this; - } - this._serializeOpenTag(true); - if (!this._fragment && this._hasDocumentElement && this._writer.level === 0) { - this.emit("error", new Error("Document cannot have multiple document element nodes.")); - return this; - } - try { - this._currentElement = BuilderFunctions_1.fragment(this._builderOptions).ele(p1, p2, p3); - } - catch (err) { - this.emit("error", err); - return this; - } - if (!this._fragment && !this._hasDocumentElement && this._docTypeName !== "" - && this._currentElement.node._qualifiedName !== this._docTypeName) { - this.emit("error", new Error("Document element name does not match DocType declaration name.")); - return this; - } - this._currentElementSerialized = false; - if (!this._fragment) { - this._hasDocumentElement = true; - } - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.att = function (p1, p2, p3) { - if (this._currentElement === undefined) { - this.emit("error", new Error("Cannot insert an attribute node as child of a document node.")); - return this; - } - try { - this._currentElement.att(p1, p2, p3); - } - catch (err) { - this.emit("error", err); - return this; - } - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.com = function (content) { - this._serializeOpenTag(true); - var node; - try { - node = BuilderFunctions_1.fragment(this._builderOptions).com(content).first().node; - } - catch (err) { - /* istanbul ignore next */ - this.emit("error", err); - /* istanbul ignore next */ - return this; - } - if (this._options.wellFormed && (!algorithm_1.xml_isLegalChar(node.data) || - node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) { - this.emit("error", new Error("Comment data contains invalid characters (well-formed required).")); - return this; - } - this._push(this._writer.comment(node.data)); - return this; + request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); + return next(request); + }, }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.txt = function (content) { - if (!this._fragment && this._currentElement === undefined) { - this.emit("error", new Error("Cannot insert a text node as child of a document node.")); - return this; - } - this._serializeOpenTag(true); - var node; - try { - node = BuilderFunctions_1.fragment(this._builderOptions).txt(content).first().node; - } - catch (err) { - /* istanbul ignore next */ - this.emit("error", err); - /* istanbul ignore next */ - return this; - } - if (this._options.wellFormed && !algorithm_1.xml_isLegalChar(node.data)) { - this.emit("error", new Error("Text data contains invalid characters (well-formed required).")); - return this; - } - var markup = ""; - if (this._options.noDoubleEncoding) { - markup = node.data.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&') - .replace(//g, '>'); +} +//# sourceMappingURL=auxiliaryAuthenticationHeaderPolicy.js.map + +/***/ }), + +/***/ 11319: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.bearerTokenAuthenticationPolicyName = void 0; +exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; +exports.parseChallenges = parseChallenges; +const tokenCycler_js_1 = __nccwpck_require__(50601); +const log_js_1 = __nccwpck_require__(30648); +const restError_js_1 = __nccwpck_require__(61036); +/** + * The programmatic identifier of the bearerTokenAuthenticationPolicy. + */ +exports.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; +/** + * Try to send the given request. + * + * When a response is received, returns a tuple of the response received and, if the response was received + * inside a thrown RestError, the RestError that was thrown. + * + * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it + * will be rethrown. + */ +async function trySendRequest(request, next) { + try { + return [await next(request), undefined]; + } + catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response) { + return [e.response, e]; } else { - for (var i = 0; i < node.data.length; i++) { - var c = node.data[i]; - if (c === "&") - markup += "&"; - else if (c === "<") - markup += "<"; - else if (c === ">") - markup += ">"; - else - markup += c; - } - } - this._push(this._writer.text(markup)); - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.ins = function (target, content) { - if (content === void 0) { content = ''; } - this._serializeOpenTag(true); - var node; - try { - node = BuilderFunctions_1.fragment(this._builderOptions).ins(target, content).first().node; - } - catch (err) { - /* istanbul ignore next */ - this.emit("error", err); - /* istanbul ignore next */ - return this; - } - if (this._options.wellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) { - this.emit("error", new Error("Processing instruction target contains invalid characters (well-formed required).")); - return this; - } - if (this._options.wellFormed && !algorithm_1.xml_isLegalChar(node.data)) { - this.emit("error", Error("Processing instruction data contains invalid characters (well-formed required).")); - return this; - } - this._push(this._writer.instruction(node.target, node.data)); - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.dat = function (content) { - this._serializeOpenTag(true); - var node; - try { - node = BuilderFunctions_1.fragment(this._builderOptions).dat(content).first().node; - } - catch (err) { - this.emit("error", err); - return this; - } - this._push(this._writer.cdata(node.data)); - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.dec = function (options) { - if (options === void 0) { options = { version: "1.0" }; } - if (this._fragment) { - this.emit("error", Error("Cannot insert an XML declaration into a document fragment.")); - return this; - } - if (this._hasDeclaration) { - this.emit("error", Error("XML declaration is already inserted.")); - return this; - } - this._push(this._writer.declaration(options.version || "1.0", options.encoding, options.standalone)); - this._hasDeclaration = true; - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.dtd = function (options) { - if (this._fragment) { - this.emit("error", Error("Cannot insert a DocType declaration into a document fragment.")); - return this; - } - if (this._docTypeName !== "") { - this.emit("error", new Error("DocType declaration is already inserted.")); - return this; - } - if (this._hasDocumentElement) { - this.emit("error", new Error("Cannot insert DocType declaration after document element.")); - return this; - } - var node; - try { - node = BuilderFunctions_1.create().dtd(options).first().node; - } - catch (err) { - this.emit("error", err); - return this; - } - if (this._options.wellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) { - this.emit("error", new Error("DocType public identifier does not match PubidChar construct (well-formed required).")); - return this; - } - if (this._options.wellFormed && - (!algorithm_1.xml_isLegalChar(node.systemId) || - (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) { - this.emit("error", new Error("DocType system identifier contains invalid characters (well-formed required).")); - return this; - } - this._docTypeName = options.name; - this._push(this._writer.docType(options.name, node.publicId, node.systemId)); - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.up = function () { - this._serializeOpenTag(false); - this._serializeCloseTag(); - return this; - }; - /** @inheritdoc */ - XMLBuilderCBImpl.prototype.end = function () { - this._serializeOpenTag(false); - while (this._openTags.length > 0) { - this._serializeCloseTag(); + throw e; } - this._push(null); - return this; + } +} +/** + * Default authorize request handler + */ +async function defaultAuthorizeRequest(options) { + const { scopes, getAccessToken, request } = options; + // Enable CAE true by default + const getTokenOptions = { + abortSignal: request.abortSignal, + tracingOptions: request.tracingOptions, + enableCae: true, }; - /** - * Serializes the opening tag of an element node. - * - * @param hasChildren - whether the element node has child nodes - */ - XMLBuilderCBImpl.prototype._serializeOpenTag = function (hasChildren) { - if (this._currentElementSerialized) - return; - if (this._currentElement === undefined) - return; - var node = this._currentElement.node; - if (this._options.wellFormed && (node.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(node.localName))) { - this.emit("error", new Error("Node local name contains invalid characters (well-formed required).")); - return; - } - var qualifiedName = ""; - var ignoreNamespaceDefinitionAttribute = false; - var map = this._prefixMap.copy(); - var localPrefixesMap = {}; - var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap); - var inheritedNS = this._openTags.length === 0 ? null : this._openTags[this._openTags.length - 1][1]; - var ns = node.namespaceURI; - if (ns === null) - ns = inheritedNS; - if (inheritedNS === ns) { - if (localDefaultNamespace !== null) { - ignoreNamespaceDefinitionAttribute = true; - } - if (ns === infra_1.namespace.XML) { - qualifiedName = "xml:" + node.localName; - } - else { - qualifiedName = node.localName; - } - this._writer.beginElement(qualifiedName); - this._push(this._writer.openTagBegin(qualifiedName)); - } - else { - var prefix = node.prefix; - var candidatePrefix = null; - if (prefix !== null || ns !== localDefaultNamespace) { - candidatePrefix = map.get(prefix, ns); - } - if (prefix === "xmlns") { - if (this._options.wellFormed) { - this.emit("error", new Error("An element cannot have the 'xmlns' prefix (well-formed required).")); - return; - } - candidatePrefix = prefix; - } - if (candidatePrefix !== null) { - qualifiedName = candidatePrefix + ':' + node.localName; - if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) { - inheritedNS = localDefaultNamespace || null; - } - this._writer.beginElement(qualifiedName); - this._push(this._writer.openTagBegin(qualifiedName)); - } - else if (prefix !== null) { - if (prefix in localPrefixesMap) { - prefix = this._generatePrefix(ns, map, this._prefixIndex); - } - map.set(prefix, ns); - qualifiedName += prefix + ':' + node.localName; - this._writer.beginElement(qualifiedName); - this._push(this._writer.openTagBegin(qualifiedName)); - this._push(this._writer.attribute("xmlns:" + prefix, this._serializeAttributeValue(ns, this._options.wellFormed))); - if (localDefaultNamespace !== null) { - inheritedNS = localDefaultNamespace || null; - } - } - else if (localDefaultNamespace === null || - (localDefaultNamespace !== null && localDefaultNamespace !== ns)) { - ignoreNamespaceDefinitionAttribute = true; - qualifiedName += node.localName; - inheritedNS = ns; - this._writer.beginElement(qualifiedName); - this._push(this._writer.openTagBegin(qualifiedName)); - this._push(this._writer.attribute("xmlns", this._serializeAttributeValue(ns, this._options.wellFormed))); - } - else { - qualifiedName += node.localName; - inheritedNS = ns; - this._writer.beginElement(qualifiedName); - this._push(this._writer.openTagBegin(qualifiedName)); - } - } - this._serializeAttributes(node, map, this._prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, this._options.wellFormed); - var isHTML = (ns === infra_1.namespace.HTML); - if (isHTML && !hasChildren && - XMLBuilderCBImpl._VoidElementNames.has(node.localName)) { - this._push(this._writer.openTagEnd(qualifiedName, true, true)); - this._writer.endElement(qualifiedName); - } - else if (!isHTML && !hasChildren) { - this._push(this._writer.openTagEnd(qualifiedName, true, false)); - this._writer.endElement(qualifiedName); - } - else { - this._push(this._writer.openTagEnd(qualifiedName, false, false)); - } - this._currentElementSerialized = true; - /** - * Save qualified name, original inherited ns, original prefix map, and - * hasChildren flag. - */ - this._openTags.push([qualifiedName, inheritedNS, this._prefixMap, hasChildren]); - /** - * New values of inherited namespace and prefix map will be used while - * serializing child nodes. They will be returned to their original values - * when this node is closed using the _openTags array item we saved above. - */ - if (this._isPrefixMapModified(this._prefixMap, map)) { - this._prefixMap = map; - } - /** - * Calls following this will either serialize child nodes or close this tag. - */ - this._writer.level++; + const accessToken = await getAccessToken(scopes, getTokenOptions); + if (accessToken) { + options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); + } +} +/** + * We will retrieve the challenge only if the response status code was 401, + * and if the response contained the header "WWW-Authenticate" with a non-empty value. + */ +function isChallengeResponse(response) { + return response.status === 401 && response.headers.has("WWW-Authenticate"); +} +/** + * Re-authorize the request for CAE challenge. + * The response containing the challenge is `options.response`. + * If this method returns true, the underlying request will be sent once again. + */ +async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { + const { scopes } = onChallengeOptions; + const accessToken = await onChallengeOptions.getAccessToken(scopes, { + enableCae: true, + claims: caeClaims, + }); + if (!accessToken) { + return false; + } + onChallengeOptions.request.headers.set("Authorization", `${accessToken.tokenType ?? "Bearer"} ${accessToken.token}`); + return true; +} +/** + * A policy that can request a token from a TokenCredential implementation and + * then apply it to the Authorization header of a request as a Bearer token. + */ +function bearerTokenAuthenticationPolicy(options) { + const { credential, scopes, challengeCallbacks } = options; + const logger = options.logger || log_js_1.logger; + const callbacks = { + authorizeRequest: challengeCallbacks?.authorizeRequest?.bind(challengeCallbacks) ?? defaultAuthorizeRequest, + authorizeRequestOnChallenge: challengeCallbacks?.authorizeRequestOnChallenge?.bind(challengeCallbacks), }; - /** - * Serializes the closing tag of an element node. - */ - XMLBuilderCBImpl.prototype._serializeCloseTag = function () { - this._writer.level--; - var lastEle = this._openTags.pop(); - /* istanbul ignore next */ - if (lastEle === undefined) { - this.emit("error", new Error("Last element is undefined.")); - return; - } - var _a = __read(lastEle, 4), qualifiedName = _a[0], ns = _a[1], map = _a[2], hasChildren = _a[3]; + // This function encapsulates the entire process of reliably retrieving the token + // The options are left out of the public API until there's demand to configure this. + // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions` + // in order to pass through the `options` object. + const getAccessToken = credential + ? (0, tokenCycler_js_1.createTokenCycler)(credential /* , options */) + : () => Promise.resolve(null); + return { + name: exports.bearerTokenAuthenticationPolicyName, /** - * Restore original values of inherited namespace and prefix map. + * If there's no challenge parameter: + * - It will try to retrieve the token using the cache, or the credential's getToken. + * - Then it will try the next policy with or without the retrieved token. + * + * It uses the challenge parameters to: + * - Skip a first attempt to get the token from the credential if there's no cached token, + * since it expects the token to be retrievable only after the challenge. + * - Prepare the outgoing request if the `prepareRequest` method has been provided. + * - Send an initial request to receive the challenge if it fails. + * - Process a challenge if the response contains it. + * - Retrieve a token with the challenge information, then re-send the request. */ - this._prefixMap = map; - if (!hasChildren) - return; - this._push(this._writer.closeTag(qualifiedName)); - this._writer.endElement(qualifiedName); - }; - /** - * Pushes data to internal buffer. - * - * @param data - data - */ - XMLBuilderCBImpl.prototype._push = function (data) { - if (data === null) { - this._ended = true; - this.emit("end"); - } - else if (this._ended) { - this.emit("error", new Error("Cannot push to ended stream.")); - } - else if (data.length !== 0) { - this._writer.hasData = true; - this.emit("data", data, this._writer.level); - } - }; - /** - * Reads and serializes an XML tree. - * - * @param node - root node - */ - XMLBuilderCBImpl.prototype._fromNode = function (node) { - var e_2, _a, e_3, _b; - if (util_2.Guard.isElementNode(node)) { - var name = node.prefix ? node.prefix + ":" + node.localName : node.localName; - if (node.namespaceURI !== null) { - this.ele(node.namespaceURI, name); - } - else { - this.ele(name); + async sendRequest(request, next) { + if (!request.url.toLowerCase().startsWith("https://")) { + throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); } - try { - for (var _c = __values(node.attributes), _d = _c.next(); !_d.done; _d = _c.next()) { - var attr = _d.value; - var name_1 = attr.prefix ? attr.prefix + ":" + attr.localName : attr.localName; - if (attr.namespaceURI !== null) { - this.att(attr.namespaceURI, name_1, attr.value); - } - else { - this.att(name_1, attr.value); + await callbacks.authorizeRequest({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + getAccessToken, + logger, + }); + let response; + let error; + let shouldSendRequest; + [response, error] = await trySendRequest(request, next); + if (isChallengeResponse(response)) { + let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + // Handle CAE by default when receive CAE claim + if (claims) { + let parsedClaim; + // Return the response immediately if claims is not a valid base64 encoded string + try { + parsedClaim = atob(claims); } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); - } - finally { if (e_2) throw e_2.error; } - } - try { - for (var _e = __values(node.childNodes), _f = _e.next(); !_f.done; _f = _e.next()) { - var child = _f.value; - this._fromNode(child); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_f && !_f.done && (_b = _e.return)) _b.call(_e); - } - finally { if (e_3) throw e_3.error; } - } - this.up(); - } - else if (util_2.Guard.isExclusiveTextNode(node) && node.data) { - this.txt(node.data); - } - else if (util_2.Guard.isCommentNode(node)) { - this.com(node.data); - } - else if (util_2.Guard.isCDATASectionNode(node)) { - this.dat(node.data); - } - else if (util_2.Guard.isProcessingInstructionNode(node)) { - this.ins(node.target, node.data); - } - }; - /** - * Produces an XML serialization of the attributes of an element node. - * - * @param node - node to serialize - * @param map - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param localPrefixesMap - local prefixes map - * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace - * attributes - * @param requireWellFormed - whether to check conformance - */ - XMLBuilderCBImpl.prototype._serializeAttributes = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed) { - var e_4, _a; - var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined; - try { - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - // Optimize common case - if (!requireWellFormed && !ignoreNamespaceDefinitionAttribute && attr.namespaceURI === null) { - this._push(this._writer.attribute(attr.localName, this._serializeAttributeValue(attr.value, this._options.wellFormed))); - continue; - } - if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) { - this.emit("error", new Error("Element contains duplicate attributes (well-formed required).")); - return; - } - if (requireWellFormed && localNameSet) - localNameSet.set(attr.namespaceURI, attr.localName); - var attributeNamespace = attr.namespaceURI; - var candidatePrefix = null; - if (attributeNamespace !== null) { - candidatePrefix = map.get(attr.prefix, attributeNamespace); - if (attributeNamespace === infra_1.namespace.XMLNS) { - if (attr.value === infra_1.namespace.XML || - (attr.prefix === null && ignoreNamespaceDefinitionAttribute) || - (attr.prefix !== null && (!(attr.localName in localPrefixesMap) || - localPrefixesMap[attr.localName] !== attr.value) && - map.has(attr.localName, attr.value))) - continue; - if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) { - this.emit("error", new Error("XMLNS namespace is reserved (well-formed required).")); - return; - } - if (requireWellFormed && attr.value === '') { - this.emit("error", new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).")); - return; - } - if (attr.prefix === 'xmlns') - candidatePrefix = 'xmlns'; - /** - * _Note:_ The (candidatePrefix === null) check is not in the spec. - * We deviate from the spec here. Otherwise a prefix is generated for - * all attributes with namespaces. - */ + catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; } - else if (candidatePrefix === null) { - if (attr.prefix !== null && - (!map.hasPrefix(attr.prefix) || - map.has(attr.prefix, attributeNamespace))) { - /** - * Check if we can use the attribute's own prefix. - * We deviate from the spec here. - * TODO: This is not an efficient way of searching for prefixes. - * Follow developments to the spec. - */ - candidatePrefix = attr.prefix; - } - else { - candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex); - } - this._push(this._writer.attribute("xmlns:" + candidatePrefix, this._serializeAttributeValue(attributeNamespace, this._options.wellFormed))); + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger, + }, parsedClaim); + // Send updated request and handle response for RestError + if (shouldSendRequest) { + [response, error] = await trySendRequest(request, next); } } - if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(attr.localName) || - (attr.localName === "xmlns" && attributeNamespace === null))) { - this.emit("error", new Error("Attribute local name contains invalid characters (well-formed required).")); - return; - } - this._push(this._writer.attribute((candidatePrefix !== null ? candidatePrefix + ":" : "") + attr.localName, this._serializeAttributeValue(attr.value, this._options.wellFormed))); - } - } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_4) throw e_4.error; } - } - }; - /** - * Produces an XML serialization of an attribute value. - * - * @param value - attribute value - * @param requireWellFormed - whether to check conformance - */ - XMLBuilderCBImpl.prototype._serializeAttributeValue = function (value, requireWellFormed) { - if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) { - this.emit("error", new Error("Invalid characters in attribute value.")); - return ""; - } - if (value === null) - return ""; - if (this._options.noDoubleEncoding) { - return value.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - } - else { - var result = ""; - for (var i = 0; i < value.length; i++) { - var c = value[i]; - if (c === "\"") - result += """; - else if (c === "&") - result += "&"; - else if (c === "<") - result += "<"; - else if (c === ">") - result += ">"; - else - result += c; - } - return result; - } - }; - /** - * Records namespace information for the given element and returns the - * default namespace attribute value. - * - * @param node - element node to process - * @param map - namespace prefix map - * @param localPrefixesMap - local prefixes map - */ - XMLBuilderCBImpl.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) { - var e_5, _a; - var defaultNamespaceAttrValue = null; - try { - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - var attributeNamespace = attr.namespaceURI; - var attributePrefix = attr.prefix; - if (attributeNamespace === infra_1.namespace.XMLNS) { - if (attributePrefix === null) { - defaultNamespaceAttrValue = attr.value; - continue; + else if (callbacks.authorizeRequestOnChallenge) { + // Handle custom challenges when client provides custom callback + shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + request, + response, + getAccessToken, + logger, + }); + // Send updated request and handle response for RestError + if (shouldSendRequest) { + [response, error] = await trySendRequest(request, next); } - else { - var prefixDefinition = attr.localName; - var namespaceDefinition = attr.value; - if (namespaceDefinition === infra_1.namespace.XML) { - continue; - } - if (namespaceDefinition === '') { - namespaceDefinition = null; - } - if (map.has(prefixDefinition, namespaceDefinition)) { - continue; + // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this + if (isChallengeResponse(response)) { + claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); + if (claims) { + let parsedClaim; + try { + parsedClaim = atob(claims); + } + catch (e) { + logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); + return response; + } + shouldSendRequest = await authorizeRequestOnCaeChallenge({ + scopes: Array.isArray(scopes) ? scopes : [scopes], + response, + request, + getAccessToken, + logger, + }, parsedClaim); + // Send updated request and handle response for RestError + if (shouldSendRequest) { + [response, error] = await trySendRequest(request, next); + } } - map.set(prefixDefinition, namespaceDefinition); - localPrefixesMap[prefixDefinition] = namespaceDefinition || ''; } } } - } - catch (e_5_1) { e_5 = { error: e_5_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + if (error) { + throw error; } - finally { if (e_5) throw e_5.error; } - } - return defaultNamespaceAttrValue; - }; - /** - * Generates a new prefix for the given namespace. - * - * @param newNamespace - a namespace to generate prefix for - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - */ - XMLBuilderCBImpl.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) { - var generatedPrefix = "ns" + prefixIndex.value; - prefixIndex.value++; - prefixMap.set(generatedPrefix, newNamespace); - return generatedPrefix; - }; - /** - * Determines if the namespace prefix map was modified from its original. - * - * @param originalMap - original namespace prefix map - * @param newMap - new namespace prefix map - */ - XMLBuilderCBImpl.prototype._isPrefixMapModified = function (originalMap, newMap) { - var items1 = originalMap._items; - var items2 = newMap._items; - var nullItems1 = originalMap._nullItems; - var nullItems2 = newMap._nullItems; - for (var key in items2) { - var arr1 = items1[key]; - if (arr1 === undefined) - return true; - var arr2 = items2[key]; - if (arr1.length !== arr2.length) - return true; - for (var i = 0; i < arr1.length; i++) { - if (arr1[i] !== arr2[i]) - return true; + else { + return response; } - } - if (nullItems1.length !== nullItems2.length) - return true; - for (var i = 0; i < nullItems1.length; i++) { - if (nullItems1[i] !== nullItems2[i]) - return true; - } - return false; + }, }; - XMLBuilderCBImpl._VoidElementNames = new Set(['area', 'base', 'basefont', - 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', - 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); - return XMLBuilderCBImpl; -}(events_1.EventEmitter)); -exports.XMLBuilderCBImpl = XMLBuilderCBImpl; -//# sourceMappingURL=XMLBuilderCBImpl.js.map +} +/** + * Converts: `Bearer a="b", c="d", Pop e="f", g="h"`. + * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`. + * + * @internal + */ +function parseChallenges(challenges) { + // Challenge regex seperates the string to individual challenges with different schemes in the format `Scheme a="b", c=d` + // The challenge regex captures parameteres with either quotes values or unquoted values + const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; + // Parameter regex captures the claims group removed from the scheme in the format `a="b"` and `c="d"` + // CAE challenge always have quoted parameters. For more reference, https://learn.microsoft.com/entra/identity-platform/claims-challenge + const paramRegex = /(\w+)="([^"]*)"/g; + const parsedChallenges = []; + let match; + // Iterate over each challenge match + while ((match = challengeRegex.exec(challenges)) !== null) { + const scheme = match[1]; + const paramsString = match[2]; + const params = {}; + let paramMatch; + // Iterate over each parameter match + while ((paramMatch = paramRegex.exec(paramsString)) !== null) { + params[paramMatch[1]] = paramMatch[2]; + } + parsedChallenges.push({ scheme, params }); + } + return parsedChallenges; +} +/** + * Parse a pipeline response and look for a CAE challenge with "Bearer" scheme + * Return the value in the header without parsing the challenge + * @internal + */ +function getCaeChallengeClaims(challenges) { + if (!challenges) { + return; + } + // Find all challenges present in the header + const parsedChallenges = parseChallenges(challenges); + return parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")?.params.claims; +} +//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map /***/ }), -/***/ 48248: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 57618: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(56417); -var util_1 = __nccwpck_require__(76195); -var writers_1 = __nccwpck_require__(17476); -var interfaces_2 = __nccwpck_require__(27305); -var util_2 = __nccwpck_require__(65282); -var algorithm_1 = __nccwpck_require__(61); -var dom_1 = __nccwpck_require__(40770); -var infra_1 = __nccwpck_require__(84251); -var readers_1 = __nccwpck_require__(90560); +exports.decompressResponsePolicyName = void 0; +exports.decompressResponsePolicy = decompressResponsePolicy; +const policies_1 = __nccwpck_require__(81914); /** - * Represents a wrapper that extends XML nodes to implement easy to use and - * chainable document builder methods. + * The programmatic identifier of the decompressResponsePolicy. */ -var XMLBuilderImpl = /** @class */ (function () { - /** - * Initializes a new instance of `XMLBuilderNodeImpl`. - * - * @param domNode - the DOM node to wrap - */ - function XMLBuilderImpl(domNode) { - this._domNode = domNode; - } - Object.defineProperty(XMLBuilderImpl.prototype, "node", { - /** @inheritdoc */ - get: function () { return this._domNode; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(XMLBuilderImpl.prototype, "options", { - /** @inheritdoc */ - get: function () { return this._options; }, - enumerable: true, - configurable: true +exports.decompressResponsePolicyName = policies_1.decompressResponsePolicyName; +/** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +function decompressResponsePolicy() { + return (0, policies_1.decompressResponsePolicy)(); +} +//# sourceMappingURL=decompressResponsePolicy.js.map + +/***/ }), + +/***/ 48549: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRetryPolicyName = void 0; +exports.defaultRetryPolicy = defaultRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the {@link defaultRetryPolicy} + */ +exports.defaultRetryPolicyName = policies_1.defaultRetryPolicyName; +/** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + */ +function defaultRetryPolicy(options = {}) { + return (0, policies_1.defaultRetryPolicy)(options); +} +//# sourceMappingURL=defaultRetryPolicy.js.map + +/***/ }), + +/***/ 1598: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryPolicyName = void 0; +exports.exponentialRetryPolicy = exponentialRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the exponentialRetryPolicy. + */ +exports.exponentialRetryPolicyName = policies_1.exponentialRetryPolicyName; +/** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @param options - Options that configure retry logic. + */ +function exponentialRetryPolicy(options = {}) { + return (0, policies_1.exponentialRetryPolicy)(options); +} +//# sourceMappingURL=exponentialRetryPolicy.js.map + +/***/ }), + +/***/ 16501: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formDataPolicyName = void 0; +exports.formDataPolicy = formDataPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the formDataPolicy. + */ +exports.formDataPolicyName = policies_1.formDataPolicyName; +/** + * A policy that encodes FormData on the request into the body. + */ +function formDataPolicy() { + return (0, policies_1.formDataPolicy)(); +} +//# sourceMappingURL=formDataPolicy.js.map + +/***/ }), + +/***/ 46821: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logPolicyName = void 0; +exports.logPolicy = logPolicy; +const log_js_1 = __nccwpck_require__(30648); +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the logPolicy. + */ +exports.logPolicyName = policies_1.logPolicyName; +/** + * A policy that logs all requests and responses. + * @param options - Options to configure logPolicy. + */ +function logPolicy(options = {}) { + return (0, policies_1.logPolicy)({ + logger: log_js_1.logger.info, + ...options, }); - /** @inheritdoc */ - XMLBuilderImpl.prototype.set = function (options) { - this._options = util_1.applyDefaults(util_1.applyDefaults(this._options, options, true), // apply user settings - interfaces_1.DefaultBuilderOptions); // provide defaults - return this; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.ele = function (p1, p2, p3) { - var _a, _b, _c; - var namespace; - var name; - var attributes; - if (util_1.isObject(p1)) { - // ele(obj: ExpandObject) - return new readers_1.ObjectReader(this._options).parse(this, p1); - } - else if (p1 !== null && /^\s* { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.multipartPolicyName = void 0; +exports.multipartPolicy = multipartPolicy; +const policies_1 = __nccwpck_require__(81914); +const file_js_1 = __nccwpck_require__(3224); +/** + * Name of multipart policy + */ +exports.multipartPolicyName = policies_1.multipartPolicyName; +/** + * Pipeline policy for multipart requests + */ +function multipartPolicy() { + const tspPolicy = (0, policies_1.multipartPolicy)(); + return { + name: exports.multipartPolicyName, + sendRequest: async (request, next) => { + if (request.multipartBody) { + for (const part of request.multipartBody.parts) { + if ((0, file_js_1.hasRawContent)(part.body)) { + part.body = (0, file_js_1.getRawContent)(part.body); + } + } } - } - var child = this._doc.createTextNode(dom_1.sanitizeInput(content, this._options.invalidCharReplacement)); - this.node.appendChild(child); - return this; + return tspPolicy.sendRequest(request, next); + }, }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.com = function (content) { - if (content === null || content === undefined) { - if (this._options.keepNullNodes) { - // keep null nodes - content = ""; - } - else { - // skip null|undefined nodes - return this; +} +//# sourceMappingURL=multipartPolicy.js.map + +/***/ }), + +/***/ 82032: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ndJsonPolicyName = void 0; +exports.ndJsonPolicy = ndJsonPolicy; +/** + * The programmatic identifier of the ndJsonPolicy. + */ +exports.ndJsonPolicyName = "ndJsonPolicy"; +/** + * ndJsonPolicy is a policy used to control keep alive settings for every request. + */ +function ndJsonPolicy() { + return { + name: exports.ndJsonPolicyName, + async sendRequest(request, next) { + // There currently isn't a good way to bypass the serializer + if (typeof request.body === "string" && request.body.startsWith("[")) { + const body = JSON.parse(request.body); + if (Array.isArray(body)) { + request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); + } } - } - var child = this._doc.createComment(dom_1.sanitizeInput(content, this._options.invalidCharReplacement)); - this.node.appendChild(child); - return this; + return next(request); + }, }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.dat = function (content) { - if (content === null || content === undefined) { - if (this._options.keepNullNodes) { - // keep null nodes - content = ""; - } - else { - // skip null|undefined nodes - return this; +} +//# sourceMappingURL=ndJsonPolicy.js.map + +/***/ }), + +/***/ 94761: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.proxyPolicyName = void 0; +exports.getDefaultProxySettings = getDefaultProxySettings; +exports.proxyPolicy = proxyPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the proxyPolicy. + */ +exports.proxyPolicyName = policies_1.proxyPolicyName; +/** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl - The url of the proxy to use. May contain authentication information. + * @deprecated - Internally this method is no longer necessary when setting proxy information. + */ +function getDefaultProxySettings(proxyUrl) { + return (0, policies_1.getDefaultProxySettings)(proxyUrl); +} +/** + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings - ProxySettings to use on each request. + * @param options - additional settings, for example, custom NO_PROXY patterns + */ +function proxyPolicy(proxySettings, options) { + return (0, policies_1.proxyPolicy)(proxySettings, options); +} +//# sourceMappingURL=proxyPolicy.js.map + +/***/ }), + +/***/ 98526: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.redirectPolicyName = void 0; +exports.redirectPolicy = redirectPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * The programmatic identifier of the redirectPolicy. + */ +exports.redirectPolicyName = policies_1.redirectPolicyName; +/** + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. + */ +function redirectPolicy(options = {}) { + return (0, policies_1.redirectPolicy)(options); +} +//# sourceMappingURL=redirectPolicy.js.map + +/***/ }), + +/***/ 39700: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.retryPolicy = retryPolicy; +const logger_1 = __nccwpck_require__(89497); +const constants_js_1 = __nccwpck_require__(43171); +const policies_1 = __nccwpck_require__(81914); +const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); +/** + * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + */ +function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + // Cast is required since the TSP runtime retry strategy type is slightly different + // very deep down (using real AbortSignal vs. AbortSignalLike in RestError). + // In practice the difference doesn't actually matter. + return (0, policies_1.retryPolicy)(strategies, { + logger: retryPolicyLogger, + ...options, + }); +} +//# sourceMappingURL=retryPolicy.js.map + +/***/ }), + +/***/ 93860: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setClientRequestIdPolicyName = void 0; +exports.setClientRequestIdPolicy = setClientRequestIdPolicy; +/** + * The programmatic identifier of the setClientRequestIdPolicy. + */ +exports.setClientRequestIdPolicyName = "setClientRequestIdPolicy"; +/** + * Each PipelineRequest gets a unique id upon creation. + * This policy passes that unique id along via an HTTP header to enable better + * telemetry and tracing. + * @param requestIdHeaderName - The name of the header to pass the request ID to. + */ +function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { + return { + name: exports.setClientRequestIdPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(requestIdHeaderName)) { + request.headers.set(requestIdHeaderName, request.requestId); } - } - var child = this._doc.createCDATASection(dom_1.sanitizeInput(content, this._options.invalidCharReplacement)); - this.node.appendChild(child); - return this; + return next(request); + }, }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.ins = function (target, content) { - var _this = this; - if (content === void 0) { content = ''; } - if (content === null || content === undefined) { - if (this._options.keepNullNodes) { - // keep null nodes - content = ""; +} +//# sourceMappingURL=setClientRequestIdPolicy.js.map + +/***/ }), + +/***/ 72470: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.systemErrorRetryPolicyName = void 0; +exports.systemErrorRetryPolicy = systemErrorRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the {@link systemErrorRetryPolicy} + */ +exports.systemErrorRetryPolicyName = policies_1.systemErrorRetryPolicyName; +/** + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @param options - Options that customize the policy. + */ +function systemErrorRetryPolicy(options = {}) { + return (0, policies_1.systemErrorRetryPolicy)(options); +} +//# sourceMappingURL=systemErrorRetryPolicy.js.map + +/***/ }), + +/***/ 54802: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.throttlingRetryPolicyName = void 0; +exports.throttlingRetryPolicy = throttlingRetryPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the {@link throttlingRetryPolicy} + */ +exports.throttlingRetryPolicyName = policies_1.throttlingRetryPolicyName; +/** + * A policy that retries when the server sends a 429 response with a Retry-After header. + * + * To learn more, please refer to + * https://learn.microsoft.com/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors + * + * @param options - Options that configure retry logic. + */ +function throttlingRetryPolicy(options = {}) { + return (0, policies_1.throttlingRetryPolicy)(options); +} +//# sourceMappingURL=throttlingRetryPolicy.js.map + +/***/ }), + +/***/ 88446: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.tlsPolicyName = void 0; +exports.tlsPolicy = tlsPolicy; +const policies_1 = __nccwpck_require__(81914); +/** + * Name of the TLS Policy + */ +exports.tlsPolicyName = policies_1.tlsPolicyName; +/** + * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. + */ +function tlsPolicy(tlsSettings) { + return (0, policies_1.tlsPolicy)(tlsSettings); +} +//# sourceMappingURL=tlsPolicy.js.map + +/***/ }), + +/***/ 80606: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.tracingPolicyName = void 0; +exports.tracingPolicy = tracingPolicy; +const core_tracing_1 = __nccwpck_require__(19363); +const constants_js_1 = __nccwpck_require__(43171); +const userAgent_js_1 = __nccwpck_require__(96158); +const log_js_1 = __nccwpck_require__(30648); +const core_util_1 = __nccwpck_require__(80637); +const restError_js_1 = __nccwpck_require__(61036); +const util_1 = __nccwpck_require__(68152); +/** + * The programmatic identifier of the tracingPolicy. + */ +exports.tracingPolicyName = "tracingPolicy"; +/** + * A simple policy to create OpenTelemetry Spans for each request made by the pipeline + * that has SpanOptions with a parent. + * Requests made without a parent Span will not be recorded. + * @param options - Options to configure the telemetry logged by the tracing policy. + */ +function tracingPolicy(options = {}) { + const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + const sanitizer = new util_1.Sanitizer({ + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, + }); + const tracingClient = tryCreateTracingClient(); + return { + name: exports.tracingPolicyName, + async sendRequest(request, next) { + if (!tracingClient) { + return next(request); } - else { - // skip null|undefined nodes - return this; + const userAgent = await userAgentPromise; + const spanAttributes = { + "http.url": sanitizer.sanitizeUrl(request.url), + "http.method": request.method, + "http.user_agent": userAgent, + requestId: request.requestId, + }; + if (userAgent) { + spanAttributes["http.user_agent"] = userAgent; } - } - if (util_1.isArray(target) || util_1.isSet(target)) { - util_1.forEachArray(target, function (item) { - item += ""; - var insIndex = item.indexOf(' '); - var insTarget = (insIndex === -1 ? item : item.substr(0, insIndex)); - var insValue = (insIndex === -1 ? '' : item.substr(insIndex + 1)); - _this.ins(insTarget, insValue); - }, this); - } - else if (util_1.isMap(target) || util_1.isObject(target)) { - util_1.forEachObject(target, function (insTarget, insValue) { return _this.ins(insTarget, insValue); }, this); - } - else { - var child = this._doc.createProcessingInstruction(dom_1.sanitizeInput(target, this._options.invalidCharReplacement), dom_1.sanitizeInput(content, this._options.invalidCharReplacement)); - this.node.appendChild(child); - } - return this; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.dec = function (options) { - this._options.version = options.version || "1.0"; - this._options.encoding = options.encoding; - this._options.standalone = options.standalone; - return this; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.dtd = function (options) { - var name = dom_1.sanitizeInput((options && options.name) || (this._doc.documentElement ? this._doc.documentElement.tagName : "ROOT"), this._options.invalidCharReplacement); - var pubID = dom_1.sanitizeInput((options && options.pubID) || "", this._options.invalidCharReplacement); - var sysID = dom_1.sanitizeInput((options && options.sysID) || "", this._options.invalidCharReplacement); - // name must match document element - if (this._doc.documentElement !== null && name !== this._doc.documentElement.tagName) { - throw new Error("DocType name does not match document element name."); - } - // create doctype node - var docType = this._doc.implementation.createDocumentType(name, pubID, sysID); - if (this._doc.doctype !== null) { - // replace existing doctype - this._doc.replaceChild(docType, this._doc.doctype); - } - else { - // insert before document element node or append to end - this._doc.insertBefore(docType, this._doc.documentElement); - } - return this; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.import = function (node) { - var e_1, _a; - var hostNode = this._domNode; - var hostDoc = this._doc; - var importedNode = node.node; - if (util_2.Guard.isDocumentNode(importedNode)) { - // import document node - var elementNode = importedNode.documentElement; - if (elementNode === null) { - throw new Error("Imported document has no document element node. " + this._debugInfo()); + const { span, tracingContext } = tryCreateSpan(tracingClient, request, spanAttributes) ?? {}; + if (!span || !tracingContext) { + return next(request); } - var clone = hostDoc.importNode(elementNode, true); - hostNode.appendChild(clone); - var _b = __read(algorithm_1.namespace_extractQName(clone.prefix ? clone.prefix + ':' + clone.localName : clone.localName), 1), prefix = _b[0]; - var namespace = hostNode.lookupNamespaceURI(prefix); - new XMLBuilderImpl(clone)._updateNamespace(namespace); - } - else if (util_2.Guard.isDocumentFragmentNode(importedNode)) { try { - // import child nodes - for (var _c = __values(importedNode.childNodes), _d = _c.next(); !_d.done; _d = _c.next()) { - var childNode = _d.value; - var clone = hostDoc.importNode(childNode, true); - hostNode.appendChild(clone); - if (util_2.Guard.isElementNode(clone)) { - var _e = __read(algorithm_1.namespace_extractQName(clone.prefix ? clone.prefix + ':' + clone.localName : clone.localName), 1), prefix = _e[0]; - var namespace = hostNode.lookupNamespaceURI(prefix); - new XMLBuilderImpl(clone)._updateNamespace(namespace); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); - } - finally { if (e_1) throw e_1.error; } - } - } - else { - // import node - var clone = hostDoc.importNode(importedNode, true); - hostNode.appendChild(clone); - if (util_2.Guard.isElementNode(clone)) { - var _f = __read(algorithm_1.namespace_extractQName(clone.prefix ? clone.prefix + ':' + clone.localName : clone.localName), 1), prefix = _f[0]; - var namespace = hostNode.lookupNamespaceURI(prefix); - new XMLBuilderImpl(clone)._updateNamespace(namespace); - } - } - return this; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.doc = function () { - if (this._doc._isFragment) { - var node = this.node; - while (node && node.nodeType !== interfaces_2.NodeType.DocumentFragment) { - node = node.parentNode; + const response = await tracingClient.withContext(tracingContext, next, request); + tryProcessResponse(span, response); + return response; } - /* istanbul ignore next */ - if (node === null) { - throw new Error("Node has no parent node while searching for document fragment ancestor. " + this._debugInfo()); + catch (err) { + tryProcessError(span, err); + throw err; } - return new XMLBuilderImpl(node); - } - else { - return new XMLBuilderImpl(this._doc); - } - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.root = function () { - var ele = this._doc.documentElement; - if (!ele) { - throw new Error("Document root element is null. " + this._debugInfo()); - } - return new XMLBuilderImpl(ele); - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.up = function () { - var parent = this._domNode.parentNode; - if (!parent) { - throw new Error("Parent node is null. " + this._debugInfo()); - } - return new XMLBuilderImpl(parent); + }, }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.prev = function () { - var node = this._domNode.previousSibling; - if (!node) { - throw new Error("Previous sibling node is null. " + this._debugInfo()); +} +function tryCreateTracingClient() { + try { + return (0, core_tracing_1.createTracingClient)({ + namespace: "", + packageName: "@azure/core-rest-pipeline", + packageVersion: constants_js_1.SDK_VERSION, + }); + } + catch (e) { + log_js_1.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1.getErrorMessage)(e)}`); + return undefined; + } +} +function tryCreateSpan(tracingClient, request, spanAttributes) { + try { + // As per spec, we do not need to differentiate between HTTP and HTTPS in span name. + const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { + spanKind: "client", + spanAttributes, + }); + // If the span is not recording, don't do any more work. + if (!span.isRecording()) { + span.end(); + return undefined; } - return new XMLBuilderImpl(node); - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.next = function () { - var node = this._domNode.nextSibling; - if (!node) { - throw new Error("Next sibling node is null. " + this._debugInfo()); + // set headers + const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); + for (const [key, value] of Object.entries(headers)) { + request.headers.set(key, value); } - return new XMLBuilderImpl(node); - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.first = function () { - var node = this._domNode.firstChild; - if (!node) { - throw new Error("First child node is null. " + this._debugInfo()); + return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; + } + catch (e) { + log_js_1.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + return undefined; + } +} +function tryProcessError(span, error) { + try { + span.setStatus({ + status: "error", + error: (0, core_util_1.isError)(error) ? error : undefined, + }); + if ((0, restError_js_1.isRestError)(error) && error.statusCode) { + span.setAttribute("http.status_code", error.statusCode); } - return new XMLBuilderImpl(node); - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.last = function () { - var node = this._domNode.lastChild; - if (!node) { - throw new Error("Last child node is null. " + this._debugInfo()); + span.end(); + } + catch (e) { + log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + } +} +function tryProcessResponse(span, response) { + try { + span.setAttribute("http.status_code", response.status); + const serviceRequestId = response.headers.get("x-ms-request-id"); + if (serviceRequestId) { + span.setAttribute("serviceRequestId", serviceRequestId); } - return new XMLBuilderImpl(node); - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.each = function (callback, self, recursive, thisArg) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var result = this._getFirstDescendantNode(this._domNode, self, recursive); - while (result[0]) { - var nextResult = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]); - callback.call(thisArg, new XMLBuilderImpl(result[0]), result[1], result[2]); - result = nextResult; + // Per semantic conventions, only set the status to error if the status code is 4xx or 5xx. + // Otherwise, the status MUST remain unset. + // https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status + if (response.status >= 400) { + span.setStatus({ + status: "error", + }); } - return this; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.map = function (callback, self, recursive, thisArg) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var result = []; - this.each(function (node, index, level) { - return result.push(callback.call(thisArg, node, index, level)); - }, self, recursive); - return result; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.reduce = function (callback, initialValue, self, recursive, thisArg) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var value = initialValue; - this.each(function (node, index, level) { - return value = callback.call(thisArg, value, node, index, level); - }, self, recursive); - return value; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.find = function (predicate, self, recursive, thisArg) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var result = this._getFirstDescendantNode(this._domNode, self, recursive); - while (result[0]) { - var builder = new XMLBuilderImpl(result[0]); - if (predicate.call(thisArg, builder, result[1], result[2])) { - return builder; + span.end(); + } + catch (e) { + log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + } +} +//# sourceMappingURL=tracingPolicy.js.map + +/***/ }), + +/***/ 88935: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userAgentPolicyName = void 0; +exports.userAgentPolicy = userAgentPolicy; +const userAgent_js_1 = __nccwpck_require__(96158); +const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); +/** + * The programmatic identifier of the userAgentPolicy. + */ +exports.userAgentPolicyName = "userAgentPolicy"; +/** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options - Options to customize the user agent value. + */ +function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); } - result = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]); - } - return undefined; + return next(request); + }, }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.filter = function (predicate, self, recursive, thisArg) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var result = []; - this.each(function (node, index, level) { - if (predicate.call(thisArg, node, index, level)) { - result.push(node); +} +//# sourceMappingURL=userAgentPolicy.js.map + +/***/ }), + +/***/ 48753: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wrapAbortSignalLikePolicyName = void 0; +exports.wrapAbortSignalLikePolicy = wrapAbortSignalLikePolicy; +const wrapAbortSignal_js_1 = __nccwpck_require__(7188); +exports.wrapAbortSignalLikePolicyName = "wrapAbortSignalLikePolicy"; +/** + * Policy that ensure that any AbortSignalLike is wrapped in a native AbortSignal for processing by the pipeline. + * Since the ts-http-runtime expects a native AbortSignal, this policy is used to ensure that any AbortSignalLike is wrapped in a native AbortSignal. + * + * @returns - created policy + */ +function wrapAbortSignalLikePolicy() { + return { + name: exports.wrapAbortSignalLikePolicyName, + sendRequest: async (request, next) => { + if (!request.abortSignal) { + return next(request); } - }, self, recursive); - return result; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.every = function (predicate, self, recursive, thisArg) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var result = this._getFirstDescendantNode(this._domNode, self, recursive); - while (result[0]) { - var builder = new XMLBuilderImpl(result[0]); - if (!predicate.call(thisArg, builder, result[1], result[2])) { - return false; + const { abortSignal, cleanup } = (0, wrapAbortSignal_js_1.wrapAbortSignalLike)(request.abortSignal); + request.abortSignal = abortSignal; + try { + return await next(request); } - result = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]); - } - return true; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.some = function (predicate, self, recursive, thisArg) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var result = this._getFirstDescendantNode(this._domNode, self, recursive); - while (result[0]) { - var builder = new XMLBuilderImpl(result[0]); - if (predicate.call(thisArg, builder, result[1], result[2])) { - return true; + finally { + cleanup?.(); } - result = this._getNextDescendantNode(this._domNode, result[0], recursive, result[1], result[2]); - } - return false; - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.toArray = function (self, recursive) { - if (self === void 0) { self = false; } - if (recursive === void 0) { recursive = false; } - var result = []; - this.each(function (node) { return result.push(node); }, self, recursive); - return result; + }, }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.toString = function (writerOptions) { - writerOptions = writerOptions || {}; - if (writerOptions.format === undefined) { - writerOptions.format = "xml"; - } - return this._serialize(writerOptions); +} +//# sourceMappingURL=wrapAbortSignalLikePolicy.js.map + +/***/ }), + +/***/ 61036: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RestError = void 0; +exports.isRestError = isRestError; +const ts_http_runtime_1 = __nccwpck_require__(83335); +/** + * A custom error type for failed pipeline requests. + */ +// eslint-disable-next-line @typescript-eslint/no-redeclare +exports.RestError = ts_http_runtime_1.RestError; +/** + * Typeguard for RestError + * @param e - Something caught by a catch clause. + */ +function isRestError(e) { + return (0, ts_http_runtime_1.isRestError)(e); +} +//# sourceMappingURL=restError.js.map + +/***/ }), + +/***/ 3224: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.hasRawContent = hasRawContent; +exports.getRawContent = getRawContent; +exports.createFileFromStream = createFileFromStream; +exports.createFile = createFile; +const core_util_1 = __nccwpck_require__(80637); +function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); +} +const unimplementedMethods = { + arrayBuffer: () => { + throw new Error("Not implemented"); + }, + bytes: () => { + throw new Error("Not implemented"); + }, + slice: () => { + throw new Error("Not implemented"); + }, + text: () => { + throw new Error("Not implemented"); + }, +}; +/** + * Private symbol used as key on objects created using createFile containing the + * original source of the file object. + * + * This is used in Node to access the original Node stream without using Blob#stream, which + * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and + * Readable#to/fromWeb in Node versions we support: + * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14) + * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6) + * + * Once these versions are no longer supported, we may be able to stop doing this. + * + * @internal + */ +const rawContent = Symbol("rawContent"); +/** + * Type guard to check if a given object is a blob-like object with a raw content property. + */ +function hasRawContent(x) { + return typeof x[rawContent] === "function"; +} +/** + * Extract the raw content from a given blob-like object. If the input was created using createFile + * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. + * For true instances of Blob and File, returns the actual blob. + * + * @internal + */ +function getRawContent(blob) { + if (hasRawContent(blob)) { + return blob[rawContent](); + } + else { + return blob; + } +} +/** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function to: + * - Create a File object for use in RequestBodyType.formData in environments where the + * global File object is unavailable. + * - Create a File-like object from a readable stream without reading the stream into memory. + * + * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is + * passed in a request's form data map, the stream will not be read into memory + * and instead will be streamed when the request is made. In the event of a retry, the + * stream needs to be read again, so this callback SHOULD return a fresh stream if possible. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ +function createFileFromStream(stream, name, options = {}) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? new Date().getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: options.size ?? -1, + name, + stream: () => { + const s = stream(); + if (isNodeReadableStream(s)) { + throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); + } + return s; + }, + [rawContent]: stream, }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.toObject = function (writerOptions) { - writerOptions = writerOptions || {}; - if (writerOptions.format === undefined) { - writerOptions.format = "object"; +} +/** + * Create an object that implements the File interface. This object is intended to be + * passed into RequestBodyType.formData, and is not guaranteed to work as expected in + * other situations. + * + * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable. + * + * @param content - the content of the file as a Uint8Array in memory. + * @param name - the name of the file. + * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + */ +function createFile(content, name, options = {}) { + if (core_util_1.isNodeLike) { + return { + ...unimplementedMethods, + type: options.type ?? "", + lastModified: options.lastModified ?? new Date().getTime(), + webkitRelativePath: options.webkitRelativePath ?? "", + size: content.byteLength, + name, + arrayBuffer: async () => content.buffer, + stream: () => new Blob([toArrayBuffer(content)]).stream(), + [rawContent]: () => content, + }; + } + else { + return new File([toArrayBuffer(content)], name, options); + } +} +function toArrayBuffer(source) { + if ("resize" in source.buffer) { + // ArrayBuffer + return source; + } + // SharedArrayBuffer + return source.map((x) => x); +} +//# sourceMappingURL=file.js.map + +/***/ }), + +/***/ 50601: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_CYCLER_OPTIONS = void 0; +exports.createTokenCycler = createTokenCycler; +const core_util_1 = __nccwpck_require__(80637); +// Default options for the cycler if none are provided +exports.DEFAULT_CYCLER_OPTIONS = { + forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires + retryIntervalInMs: 3000, // Allow refresh attempts every 3s + refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry +}; +/** + * Converts an an unreliable access token getter (which may resolve with null) + * into an AccessTokenGetter by retrying the unreliable getter in a regular + * interval. + * + * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null. + * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts. + * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception. + * @returns - A promise that, if it resolves, will resolve with an access token. + */ +async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { + // This wrapper handles exceptions gracefully as long as we haven't exceeded + // the timeout. + async function tryGetAccessToken() { + if (Date.now() < refreshTimeout) { + try { + return await getAccessToken(); + } + catch { + return null; + } } - return this._serialize(writerOptions); - }; - /** @inheritdoc */ - XMLBuilderImpl.prototype.end = function (writerOptions) { - writerOptions = writerOptions || {}; - if (writerOptions.format === undefined) { - writerOptions.format = "xml"; + else { + const finalToken = await getAccessToken(); + // Timeout is up, so throw if it's still null + if (finalToken === null) { + throw new Error("Failed to refresh access token."); + } + return finalToken; } - return this.doc()._serialize(writerOptions); + } + let token = await tryGetAccessToken(); + while (token === null) { + await (0, core_util_1.delay)(retryIntervalInMs); + token = await tryGetAccessToken(); + } + return token; +} +/** + * Creates a token cycler from a credential, scopes, and optional settings. + * + * A token cycler represents a way to reliably retrieve a valid access token + * from a TokenCredential. It will handle initializing the token, refreshing it + * when it nears expiration, and synchronizes refresh attempts to avoid + * concurrency hazards. + * + * @param credential - the underlying TokenCredential that provides the access + * token + * @param tokenCyclerOptions - optionally override default settings for the cycler + * + * @returns - a function that reliably produces a valid access token + */ +function createTokenCycler(credential, tokenCyclerOptions) { + let refreshWorker = null; + let token = null; + let tenantId; + const options = { + ...exports.DEFAULT_CYCLER_OPTIONS, + ...tokenCyclerOptions, }; /** - * Gets the next descendant of the given node of the tree rooted at `root` - * in depth-first pre-order. Returns a three-tuple with - * [descendant, descendant_index, descendant_level]. - * - * @param root - root node of the tree - * @param self - whether to visit the current node along with child nodes - * @param recursive - whether to visit all descendant nodes in tree-order or - * only the immediate child nodes + * This little holder defines several predicates that we use to construct + * the rules of refreshing the token. */ - XMLBuilderImpl.prototype._getFirstDescendantNode = function (root, self, recursive) { - if (self) - return [this._domNode, 0, 0]; - else if (recursive) - return this._getNextDescendantNode(root, root, recursive, 0, 0); - else - return [this._domNode.firstChild, 0, 1]; + const cycler = { + /** + * Produces true if a refresh job is currently in progress. + */ + get isRefreshing() { + return refreshWorker !== null; + }, + /** + * Produces true if the cycler SHOULD refresh (we are within the refresh + * window and not already refreshing) + */ + get shouldRefresh() { + if (cycler.isRefreshing) { + return false; + } + if (token?.refreshAfterTimestamp && token.refreshAfterTimestamp < Date.now()) { + return true; + } + return (token?.expiresOnTimestamp ?? 0) - options.refreshWindowInMs < Date.now(); + }, + /** + * Produces true if the cycler MUST refresh (null or nearly-expired + * token). + */ + get mustRefresh() { + return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()); + }, }; /** - * Gets the next descendant of the given node of the tree rooted at `root` - * in depth-first pre-order. Returns a three-tuple with - * [descendant, descendant_index, descendant_level]. - * - * @param root - root node of the tree - * @param node - current node - * @param recursive - whether to visit all descendant nodes in tree-order or - * only the immediate child nodes - * @param index - child node index - * @param level - current depth of the XML tree + * Starts a refresh job or returns the existing job if one is already + * running. */ - XMLBuilderImpl.prototype._getNextDescendantNode = function (root, node, recursive, index, level) { - if (recursive) { - // traverse child nodes - if (node.firstChild) - return [node.firstChild, 0, level + 1]; - if (node === root) - return [null, -1, -1]; - // traverse siblings - if (node.nextSibling) - return [node.nextSibling, index + 1, level]; - // traverse parent's next sibling - var parent = node.parentNode; - while (parent && parent !== root) { - if (parent.nextSibling) - return [parent.nextSibling, algorithm_1.tree_index(parent.nextSibling), level - 1]; - parent = parent.parentNode; - level--; - } + function refresh(scopes, getTokenOptions) { + if (!cycler.isRefreshing) { + // We bind `scopes` here to avoid passing it around a lot + const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); + // Take advantage of promise chaining to insert an assignment to `token` + // before the refresh can be considered done. + refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, + // If we don't have a token, then we should timeout immediately + token?.expiresOnTimestamp ?? Date.now()) + .then((_token) => { + refreshWorker = null; + token = _token; + tenantId = getTokenOptions.tenantId; + return token; + }) + .catch((reason) => { + // We also should reset the refresher if we enter a failed state. All + // existing awaiters will throw, but subsequent requests will start a + // new retry chain. + refreshWorker = null; + token = null; + tenantId = undefined; + throw reason; + }); } - else { - if (root === node) - return [node.firstChild, 0, level + 1]; - else - return [node.nextSibling, index + 1, level]; + return refreshWorker; + } + return async (scopes, tokenOptions) => { + // + // Simple rules: + // - If we MUST refresh, then return the refresh task, blocking + // the pipeline until a token is available. + // - If we SHOULD refresh, then run refresh but don't return it + // (we can still use the cached token). + // - Return the token, since it's fine if we didn't return in + // step 1. + // + const hasClaimChallenge = Boolean(tokenOptions.claims); + const tenantIdChanged = tenantId !== tokenOptions.tenantId; + if (hasClaimChallenge) { + // If we've received a claim, we know the existing token isn't valid + // We want to clear it so that that refresh worker won't use the old expiration time as a timeout + token = null; } - return [null, -1, -1]; - }; - /** - * Converts the node into its string or object representation. - * - * @param options - serialization options - */ - XMLBuilderImpl.prototype._serialize = function (writerOptions) { - if (writerOptions.format === "xml") { - var writer = new writers_1.XMLWriter(this._options, writerOptions); - return writer.serialize(this.node); + // If the tenantId passed in token options is different to the one we have + // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to + // refresh the token with the new tenantId or token. + const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; + if (mustRefresh) { + return refresh(scopes, tokenOptions); } - else if (writerOptions.format === "map") { - var writer = new writers_1.MapWriter(this._options, writerOptions); - return writer.serialize(this.node); + if (cycler.shouldRefresh) { + refresh(scopes, tokenOptions); } - else if (writerOptions.format === "object") { - var writer = new writers_1.ObjectWriter(this._options, writerOptions); - return writer.serialize(this.node); + return token; + }; +} +//# sourceMappingURL=tokenCycler.js.map + +/***/ }), + +/***/ 96158: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUserAgentHeaderName = getUserAgentHeaderName; +exports.getUserAgentValue = getUserAgentValue; +const userAgentPlatform_js_1 = __nccwpck_require__(15316); +const constants_js_1 = __nccwpck_require__(43171); +function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); +} +/** + * @internal + */ +function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); +} +/** + * @internal + */ +async function getUserAgentValue(prefix) { + const runtimeInfo = new Map(); + runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; +} +//# sourceMappingURL=userAgent.js.map + +/***/ }), + +/***/ 15316: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHeaderName = getHeaderName; +exports.setPlatformSpecificData = setPlatformSpecificData; +const tslib_1 = __nccwpck_require__(4351); +const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(70612)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(97742)); +/** + * @internal + */ +function getHeaderName() { + return "User-Agent"; +} +/** + * @internal + */ +async function setPlatformSpecificData(map) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map.set("Bun", `${versions.bun} (${osInfo})`); } - else if (writerOptions.format === "json") { - var writer = new writers_1.JSONWriter(this._options, writerOptions); - return writer.serialize(this.node); + else if (versions.deno) { + map.set("Deno", `${versions.deno} (${osInfo})`); } - else if (writerOptions.format === "yaml") { - var writer = new writers_1.YAMLWriter(this._options, writerOptions); - return writer.serialize(this.node); + else if (versions.node) { + map.set("Node", `${versions.node} (${osInfo})`); } - else { - throw new Error("Invalid writer format: " + writerOptions.format + ". " + this._debugInfo()); + } +} +//# sourceMappingURL=userAgentPlatform.js.map + +/***/ }), + +/***/ 7188: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.wrapAbortSignalLike = wrapAbortSignalLike; +/** + * Creates a native AbortSignal which reflects the state of the provided AbortSignalLike. + * If the AbortSignalLike is already a native AbortSignal, it is returned as is. + * @param abortSignalLike - The AbortSignalLike to wrap. + * @returns - An object containing the native AbortSignal and an optional cleanup function. The cleanup function should be called when the AbortSignal is no longer needed. + */ +function wrapAbortSignalLike(abortSignalLike) { + if (abortSignalLike instanceof AbortSignal) { + return { abortSignal: abortSignalLike }; + } + if (abortSignalLike.aborted) { + return { abortSignal: AbortSignal.abort(abortSignalLike.reason) }; + } + const controller = new AbortController(); + let needsCleanup = true; + function cleanup() { + if (needsCleanup) { + abortSignalLike.removeEventListener("abort", listener); + needsCleanup = false; } + } + function listener() { + controller.abort(abortSignalLike.reason); + cleanup(); + } + abortSignalLike.addEventListener("abort", listener); + return { abortSignal: controller.signal, cleanup }; +} +//# sourceMappingURL=wrapAbortSignal.js.map + +/***/ }), + +/***/ 19363: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createTracingClient = exports.useInstrumenter = void 0; +var instrumenter_js_1 = __nccwpck_require__(63418); +Object.defineProperty(exports, "useInstrumenter", ({ enumerable: true, get: function () { return instrumenter_js_1.useInstrumenter; } })); +var tracingClient_js_1 = __nccwpck_require__(69254); +Object.defineProperty(exports, "createTracingClient", ({ enumerable: true, get: function () { return tracingClient_js_1.createTracingClient; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 63418: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultTracingSpan = createDefaultTracingSpan; +exports.createDefaultInstrumenter = createDefaultInstrumenter; +exports.useInstrumenter = useInstrumenter; +exports.getInstrumenter = getInstrumenter; +const tracingContext_js_1 = __nccwpck_require__(18110); +const state_js_1 = __nccwpck_require__(81241); +function createDefaultTracingSpan() { + return { + end: () => { + // noop + }, + isRecording: () => false, + recordException: () => { + // noop + }, + setAttribute: () => { + // noop + }, + setStatus: () => { + // noop + }, + addEvent: () => { + // noop + }, }; - /** - * Extracts a namespace and name from the given string. - * - * @param namespace - namespace - * @param name - a string containing both a name and namespace separated by an - * `'@'` character - * @param ele - `true` if this is an element namespace; otherwise `false` - */ - XMLBuilderImpl.prototype._extractNamespace = function (namespace, name, ele) { - // extract from name - var atIndex = name.indexOf("@"); - if (atIndex > 0) { - if (namespace === undefined) - namespace = name.slice(atIndex + 1); - name = name.slice(0, atIndex); +} +function createDefaultInstrumenter() { + return { + createRequestHeaders: () => { + return {}; + }, + parseTraceparentHeader: () => { + return undefined; + }, + startSpan: (_name, spanOptions) => { + return { + span: createDefaultTracingSpan(), + tracingContext: (0, tracingContext_js_1.createTracingContext)({ parentContext: spanOptions.tracingContext }), + }; + }, + withContext(_context, callback, ...callbackArgs) { + return callback(...callbackArgs); + }, + }; +} +/** + * Extends the Azure SDK with support for a given instrumenter implementation. + * + * @param instrumenter - The instrumenter implementation to use. + */ +function useInstrumenter(instrumenter) { + state_js_1.state.instrumenterImplementation = instrumenter; +} +/** + * Gets the currently set instrumenter, a No-Op instrumenter by default. + * + * @returns The currently set instrumenter + */ +function getInstrumenter() { + if (!state_js_1.state.instrumenterImplementation) { + state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); + } + return state_js_1.state.instrumenterImplementation; +} +//# sourceMappingURL=instrumenter.js.map + +/***/ }), + +/***/ 81241: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.state = void 0; +/** + * @internal + * + * Holds the singleton instrumenter, to be shared across CJS and ESM imports. + */ +exports.state = { + instrumenterImplementation: undefined, +}; +//# sourceMappingURL=state-cjs.cjs.map + +/***/ }), + +/***/ 69254: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createTracingClient = createTracingClient; +const instrumenter_js_1 = __nccwpck_require__(63418); +const tracingContext_js_1 = __nccwpck_require__(18110); +/** + * Creates a new tracing client. + * + * @param options - Options used to configure the tracing client. + * @returns - An instance of {@link TracingClient}. + */ +function createTracingClient(options) { + const { namespace, packageName, packageVersion } = options; + function startSpan(name, operationOptions, spanOptions) { + const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, { + ...spanOptions, + packageName: packageName, + packageVersion: packageVersion, + tracingContext: operationOptions?.tracingOptions?.tracingContext, + }); + let tracingContext = startSpanResult.tracingContext; + const span = startSpanResult.span; + if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { + tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); } - if (namespace === undefined) { - // look-up default namespace - namespace = (ele ? this._options.defaultNamespace.ele : this._options.defaultNamespace.att); + span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); + const updatedOptions = Object.assign({}, operationOptions, { + tracingOptions: { ...operationOptions?.tracingOptions, tracingContext }, + }); + return { + span, + updatedOptions, + }; + } + async function withSpan(name, operationOptions, callback, spanOptions) { + const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); + try { + const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); + span.setStatus({ status: "success" }); + return result; } - else if (namespace !== null && namespace[0] === "@") { - // look-up namespace aliases - var alias = namespace.slice(1); - namespace = this._options.namespaceAlias[alias]; - if (namespace === undefined) { - throw new Error("Namespace alias `" + alias + "` is not defined. " + this._debugInfo()); - } + catch (err) { + span.setStatus({ status: "error", error: err }); + throw err; } - return [namespace, name]; - }; + finally { + span.end(); + } + } + function withContext(context, callback, ...callbackArgs) { + return (0, instrumenter_js_1.getInstrumenter)().withContext(context, callback, ...callbackArgs); + } /** - * Updates the element's namespace. + * Parses a traceparent header value into a span identifier. * - * @param ns - new namespace + * @param traceparentHeader - The traceparent header to parse. + * @returns An implementation-specific identifier for the span. */ - XMLBuilderImpl.prototype._updateNamespace = function (ns) { - var e_2, _a, e_3, _b; - var ele = this._domNode; - if (util_2.Guard.isElementNode(ele) && ns !== null && ele.namespaceURI !== ns) { - var _c = __read(algorithm_1.namespace_extractQName(ele.prefix ? ele.prefix + ':' + ele.localName : ele.localName), 2), elePrefix = _c[0], eleLocalName = _c[1]; - // re-create the element node if its namespace changed - // we can't simply change the namespaceURI since its read-only - var newEle = algorithm_1.create_element(this._doc, eleLocalName, ns, elePrefix); - try { - for (var _d = __values(ele.attributes), _e = _d.next(); !_e.done; _e = _d.next()) { - var attr = _e.value; - var attrQName = attr.prefix ? attr.prefix + ':' + attr.localName : attr.localName; - var _f = __read(algorithm_1.namespace_extractQName(attrQName), 1), attrPrefix = _f[0]; - var newAttrNS = attr.namespaceURI; - if (newAttrNS === null && attrPrefix !== null) { - newAttrNS = ele.lookupNamespaceURI(attrPrefix); - } - if (newAttrNS === null) { - newEle.setAttribute(attrQName, attr.value); - } - else { - newEle.setAttributeNS(newAttrNS, attrQName, attr.value); - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_e && !_e.done && (_a = _d.return)) _a.call(_d); - } - finally { if (e_2) throw e_2.error; } - } - // replace the new node in parent node - var parent = ele.parentNode; - /* istanbul ignore next */ - if (parent === null) { - throw new Error("Parent node is null." + this._debugInfo()); - } - parent.replaceChild(newEle, ele); - this._domNode = newEle; - try { - // check child nodes - for (var _g = __values(ele.childNodes), _h = _g.next(); !_h.done; _h = _g.next()) { - var childNode = _h.value; - var newChildNode = childNode.cloneNode(true); - newEle.appendChild(newChildNode); - if (util_2.Guard.isElementNode(newChildNode)) { - var _j = __read(algorithm_1.namespace_extractQName(newChildNode.prefix ? newChildNode.prefix + ':' + newChildNode.localName : newChildNode.localName), 1), newChildNodePrefix = _j[0]; - var newChildNodeNS = newEle.lookupNamespaceURI(newChildNodePrefix); - new XMLBuilderImpl(newChildNode)._updateNamespace(newChildNodeNS); - } - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_h && !_h.done && (_b = _g.return)) _b.call(_g); - } - finally { if (e_3) throw e_3.error; } - } - } - }; - Object.defineProperty(XMLBuilderImpl.prototype, "_doc", { - /** - * Returns the document owning this node. - */ - get: function () { - var node = this.node; - if (util_2.Guard.isDocumentNode(node)) { - return node; - } - else { - var docNode = node.ownerDocument; - /* istanbul ignore next */ - if (!docNode) - throw new Error("Owner document is null. " + this._debugInfo()); - return docNode; - } - }, - enumerable: true, - configurable: true - }); + function parseTraceparentHeader(traceparentHeader) { + return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); + } /** - * Returns debug information for this node. + * Creates a set of request headers to propagate tracing information to a backend. * - * @param name - node name + * @param tracingContext - The context containing the span to serialize. + * @returns The set of headers to add to a request. */ - XMLBuilderImpl.prototype._debugInfo = function (name) { - var node = this.node; - var parentNode = node.parentNode; - name = name || node.nodeName; - var parentName = parentNode ? parentNode.nodeName : ''; - if (!parentName) { - return "node: <" + name + ">"; - } - else { - return "node: <" + name + ">, parent: <" + parentName + ">"; - } + function createRequestHeaders(tracingContext) { + return (0, instrumenter_js_1.getInstrumenter)().createRequestHeaders(tracingContext); + } + return { + startSpan, + withSpan, + withContext, + parseTraceparentHeader, + createRequestHeaders, }; - Object.defineProperty(XMLBuilderImpl.prototype, "_options", { - /** - * Gets or sets builder options. - */ - get: function () { - var doc = this._doc; - /* istanbul ignore next */ - if (doc._xmlBuilderOptions === undefined) { - throw new Error("Builder options is not set."); - } - return doc._xmlBuilderOptions; - }, - set: function (value) { - var doc = this._doc; - doc._xmlBuilderOptions = value; - }, - enumerable: true, - configurable: true - }); - return XMLBuilderImpl; -}()); -exports.XMLBuilderImpl = XMLBuilderImpl; -//# sourceMappingURL=XMLBuilderImpl.js.map +} +//# sourceMappingURL=tracingClient.js.map + +/***/ }), + +/***/ 18110: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TracingContextImpl = exports.knownContextKeys = void 0; +exports.createTracingContext = createTracingContext; +/** @internal */ +exports.knownContextKeys = { + span: Symbol.for("@azure/core-tracing span"), + namespace: Symbol.for("@azure/core-tracing namespace"), +}; +/** + * Creates a new {@link TracingContext} with the given options. + * @param options - A set of known keys that may be set on the context. + * @returns A new {@link TracingContext} with the given options. + * + * @internal + */ +function createTracingContext(options = {}) { + let context = new TracingContextImpl(options.parentContext); + if (options.span) { + context = context.setValue(exports.knownContextKeys.span, options.span); + } + if (options.namespace) { + context = context.setValue(exports.knownContextKeys.namespace, options.namespace); + } + return context; +} +/** @internal */ +class TracingContextImpl { + _contextMap; + constructor(initialContext) { + this._contextMap = + initialContext instanceof TracingContextImpl + ? new Map(initialContext._contextMap) + : new Map(); + } + setValue(key, value) { + const newContext = new TracingContextImpl(this); + newContext._contextMap.set(key, value); + return newContext; + } + getValue(key) { + return this._contextMap.get(key); + } + deleteValue(key) { + const newContext = new TracingContextImpl(this); + newContext._contextMap.delete(key); + return newContext; + } +} +exports.TracingContextImpl = TracingContextImpl; +//# sourceMappingURL=tracingContext.js.map /***/ }), -/***/ 40770: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 87205: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var dom_1 = __nccwpck_require__(54646); -var dom_2 = __nccwpck_require__(50633); -var util_1 = __nccwpck_require__(76195); -dom_2.dom.setFeatures(false); +exports.cancelablePromiseRace = cancelablePromiseRace; /** - * Creates an XML document without any child nodes. + * promise.race() wrapper that aborts rest of promises as soon as the first promise settles. */ -function createDocument() { - var impl = new dom_1.DOMImplementation(); - var doc = impl.createDocument(null, 'root', null); - /* istanbul ignore else */ - if (doc.documentElement) { - doc.removeChild(doc.documentElement); +async function cancelablePromiseRace(abortablePromiseBuilders, options) { + const aborter = new AbortController(); + function abortHandler() { + aborter.abort(); + } + options?.abortSignal?.addEventListener("abort", abortHandler); + try { + return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); + } + finally { + aborter.abort(); + options?.abortSignal?.removeEventListener("abort", abortHandler); } - return doc; } -exports.createDocument = createDocument; +//# sourceMappingURL=aborterUtils.js.map + +/***/ }), + +/***/ 12376: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createAbortablePromise = createAbortablePromise; +const abort_controller_1 = __nccwpck_require__(54812); /** - * Sanitizes input strings with user supplied replacement characters. - * - * @param str - input string - * @param replacement - replacement character or function + * Creates an abortable promise. + * @param buildPromise - A function that takes the resolve and reject functions as parameters. + * @param options - The options for the abortable promise. + * @returns A promise that can be aborted. */ -function sanitizeInput(str, replacement) { - if (str == null) { - return str; - } - else if (replacement === undefined) { - return str + ""; - } - else { - var result = ""; - str = str + ""; - for (var i = 0; i < str.length; i++) { - var n = str.charCodeAt(i); - // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] - if (n === 0x9 || n === 0xA || n === 0xD || - (n >= 0x20 && n <= 0xD7FF) || - (n >= 0xE000 && n <= 0xFFFD)) { - // valid character - not surrogate pair - result += str.charAt(i); - } - else if (n >= 0xD800 && n <= 0xDBFF && i < str.length - 1) { - var n2 = str.charCodeAt(i + 1); - if (n2 >= 0xDC00 && n2 <= 0xDFFF) { - // valid surrogate pair - n = (n - 0xD800) * 0x400 + n2 - 0xDC00 + 0x10000; - result += String.fromCodePoint(n); - i++; - } - else { - // invalid lone surrogate - result += util_1.isString(replacement) ? replacement : replacement(str.charAt(i), i, str); - } - } - else { - // invalid character - result += util_1.isString(replacement) ? replacement : replacement(str.charAt(i), i, str); - } +function createAbortablePromise(buildPromise, options) { + const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; + return new Promise((resolve, reject) => { + function rejectOnAbort() { + reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } - return result; - } + function removeListeners() { + abortSignal?.removeEventListener("abort", onAbort); + } + function onAbort() { + cleanupBeforeAbort?.(); + removeListeners(); + rejectOnAbort(); + } + if (abortSignal?.aborted) { + return rejectOnAbort(); + } + try { + buildPromise((x) => { + removeListeners(); + resolve(x); + }, (x) => { + removeListeners(); + reject(x); + }); + } + catch (err) { + reject(err); + } + abortSignal?.addEventListener("abort", onAbort); + }); } -exports.sanitizeInput = sanitizeInput; -//# sourceMappingURL=dom.js.map +//# sourceMappingURL=createAbortablePromise.js.map /***/ }), -/***/ 44260: +/***/ 19259: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var XMLBuilderImpl_1 = __nccwpck_require__(48248); -exports.XMLBuilderImpl = XMLBuilderImpl_1.XMLBuilderImpl; -var XMLBuilderCBImpl_1 = __nccwpck_require__(71438); -exports.XMLBuilderCBImpl = XMLBuilderCBImpl_1.XMLBuilderCBImpl; -var BuilderFunctions_1 = __nccwpck_require__(95696); -exports.builder = BuilderFunctions_1.builder; -exports.create = BuilderFunctions_1.create; -exports.fragment = BuilderFunctions_1.fragment; -exports.convert = BuilderFunctions_1.convert; -var BuilderFunctionsCB_1 = __nccwpck_require__(10268); -exports.createCB = BuilderFunctionsCB_1.createCB; -exports.fragmentCB = BuilderFunctionsCB_1.fragmentCB; -//# sourceMappingURL=index.js.map +exports.delay = delay; +exports.calculateRetryDelay = calculateRetryDelay; +const createAbortablePromise_js_1 = __nccwpck_require__(12376); +const util_1 = __nccwpck_require__(68152); +const StandardAbortMessage = "The delay was aborted."; +/** + * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. + * @param timeInMs - The number of milliseconds to be delayed. + * @param options - The options for delay - currently abort options + * @returns Promise that is resolved after timeInMs + */ +function delay(timeInMs, options) { + let token; + const { abortSignal, abortErrorMsg } = options ?? {}; + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { + token = setTimeout(resolve, timeInMs); + }, { + cleanupBeforeAbort: () => clearTimeout(token), + abortSignal, + abortErrorMsg: abortErrorMsg ?? StandardAbortMessage, + }); +} +/** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * @param retryAttempt - The current retry attempt number. + * @param config - The exponential retry configuration. + * @returns An object containing the calculated retry delay. + */ +function calculateRetryDelay(retryAttempt, config) { + // Exponentially increase the delay each time + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + // Don't let the delay exceed the maximum + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + // Allow the final value to have some "jitter" (within 50% of the delay size) so + // that retries across multiple clients don't occur simultaneously. + const retryAfterInMs = clampedDelay / 2 + (0, util_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; +} +//# sourceMappingURL=delay.js.map /***/ }), -/***/ 70151: +/***/ 46734: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var builder_1 = __nccwpck_require__(44260); -exports.builder = builder_1.builder; -exports.create = builder_1.create; -exports.fragment = builder_1.fragment; -exports.convert = builder_1.convert; -exports.createCB = builder_1.createCB; -exports.fragmentCB = builder_1.fragmentCB; -//# sourceMappingURL=index.js.map +exports.getErrorMessage = getErrorMessage; +const util_1 = __nccwpck_require__(68152); +/** + * Given what is thought to be an error object, return the message if possible. + * If the message is missing, returns a stringified version of the input. + * @param e - Something thrown from a try block + * @returns The error message or a string of the input + */ +function getErrorMessage(e) { + if ((0, util_1.isError)(e)) { + return e.message; + } + else { + let stringified; + try { + if (typeof e === "object" && e) { + stringified = JSON.stringify(e); + } + else { + stringified = String(e); + } + } + catch (err) { + stringified = "[unable to stringify input]"; + } + return `Unknown error ${stringified}`; + } +} +//# sourceMappingURL=error.js.map /***/ }), -/***/ 56417: -/***/ ((__unused_webpack_module, exports) => { +/***/ 80637: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isWebWorker = exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isDeno = exports.isBun = exports.isBrowser = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.getErrorMessage = exports.delay = exports.createAbortablePromise = exports.cancelablePromiseRace = void 0; +exports.calculateRetryDelay = calculateRetryDelay; +exports.computeSha256Hash = computeSha256Hash; +exports.computeSha256Hmac = computeSha256Hmac; +exports.getRandomIntegerInclusive = getRandomIntegerInclusive; +exports.isError = isError; +exports.isObject = isObject; +exports.randomUUID = randomUUID; +exports.uint8ArrayToString = uint8ArrayToString; +exports.stringToUint8Array = stringToUint8Array; +const tslib_1 = __nccwpck_require__(4351); +const tspRuntime = tslib_1.__importStar(__nccwpck_require__(68152)); +var aborterUtils_js_1 = __nccwpck_require__(87205); +Object.defineProperty(exports, "cancelablePromiseRace", ({ enumerable: true, get: function () { return aborterUtils_js_1.cancelablePromiseRace; } })); +var createAbortablePromise_js_1 = __nccwpck_require__(12376); +Object.defineProperty(exports, "createAbortablePromise", ({ enumerable: true, get: function () { return createAbortablePromise_js_1.createAbortablePromise; } })); +var delay_js_1 = __nccwpck_require__(19259); +Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); +var error_js_1 = __nccwpck_require__(46734); +Object.defineProperty(exports, "getErrorMessage", ({ enumerable: true, get: function () { return error_js_1.getErrorMessage; } })); +var typeGuards_js_1 = __nccwpck_require__(1187); +Object.defineProperty(exports, "isDefined", ({ enumerable: true, get: function () { return typeGuards_js_1.isDefined; } })); +Object.defineProperty(exports, "isObjectWithProperties", ({ enumerable: true, get: function () { return typeGuards_js_1.isObjectWithProperties; } })); +Object.defineProperty(exports, "objectHasProperty", ({ enumerable: true, get: function () { return typeGuards_js_1.objectHasProperty; } })); /** - * Defines default values for builder options. + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * + * @param retryAttempt - The current retry attempt number. + * + * @param config - The exponential retry configuration. + * + * @returns An object containing the calculated retry delay. */ -exports.DefaultBuilderOptions = { - version: "1.0", - encoding: undefined, - standalone: undefined, - keepNullNodes: false, - keepNullAttributes: false, - ignoreConverters: false, - convert: { - att: "@", - ins: "?", - text: "#", - cdata: "$", - comment: "!" - }, - defaultNamespace: { - ele: undefined, - att: undefined - }, - namespaceAlias: { - html: "http://www.w3.org/1999/xhtml", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/", - mathml: "http://www.w3.org/1998/Math/MathML", - svg: "http://www.w3.org/2000/svg", - xlink: "http://www.w3.org/1999/xlink" - }, - invalidCharReplacement: undefined, - parser: undefined -}; +function calculateRetryDelay(retryAttempt, config) { + return tspRuntime.calculateRetryDelay(retryAttempt, config); +} /** - * Contains keys of `XMLBuilderOptions`. + * Generates a SHA-256 hash. + * + * @param content - The data to be included in the hash. + * + * @param encoding - The textual encoding to use for the returned hash. */ -exports.XMLBuilderOptionKeys = new Set(Object.keys(exports.DefaultBuilderOptions)); +function computeSha256Hash(content, encoding) { + return tspRuntime.computeSha256Hash(content, encoding); +} /** - * Defines default values for builder options. + * Generates a SHA-256 HMAC signature. + * + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * + * @param stringToSign - The data to be signed. + * + * @param encoding - The textual encoding to use for the returned HMAC digest. */ -exports.DefaultXMLBuilderCBOptions = { - format: "xml", - wellFormed: false, - prettyPrint: false, - indent: " ", - newline: "\n", - offset: 0, - width: 0, - allowEmptyTags: false, - spaceBeforeSlash: false, - keepNullNodes: false, - keepNullAttributes: false, - ignoreConverters: false, - convert: { - att: "@", - ins: "?", - text: "#", - cdata: "$", - comment: "!" - }, - defaultNamespace: { - ele: undefined, - att: undefined - }, - namespaceAlias: { - html: "http://www.w3.org/1999/xhtml", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/", - mathml: "http://www.w3.org/1998/Math/MathML", - svg: "http://www.w3.org/2000/svg", - xlink: "http://www.w3.org/1999/xlink" - } -}; -//# sourceMappingURL=interfaces.js.map +function computeSha256Hmac(key, stringToSign, encoding) { + return tspRuntime.computeSha256Hmac(key, stringToSign, encoding); +} +/** + * Returns a random integer value between a lower and upper bound, inclusive of both bounds. Note that this uses Math.random and isn't secure. If you need to use this for any kind of security purpose, find a better source of random. + * + * @param min - The smallest integer value allowed. + * + * @param max - The largest integer value allowed. + */ +function getRandomIntegerInclusive(min, max) { + return tspRuntime.getRandomIntegerInclusive(min, max); +} +/** + * Typeguard for an error object shape (has name and message) + * + * @param e - Something caught by a catch clause. + */ +function isError(e) { + return tspRuntime.isError(e); +} +/** + * Helper to determine when an input is a generic JS object. + * + * @returns true when input is an object type that is not null, Array, RegExp, or Date. + */ +function isObject(input) { + return tspRuntime.isObject(input); +} +/** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ +function randomUUID() { + return tspRuntime.randomUUID(); +} +/** + * A constant that indicates whether the environment the code is running is a Web Browser. + */ +exports.isBrowser = tspRuntime.isBrowser; +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +exports.isBun = tspRuntime.isBun; +/** + * A constant that indicates whether the environment the code is running is Deno. + */ +exports.isDeno = tspRuntime.isDeno; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + * + * @deprecated + * + * Use `isNodeLike` instead. + */ +exports.isNode = tspRuntime.isNodeLike; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ +exports.isNodeLike = tspRuntime.isNodeLike; +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +exports.isNodeRuntime = tspRuntime.isNodeRuntime; +/** + * A constant that indicates whether the environment the code is running is in React-Native. + */ +exports.isReactNative = tspRuntime.isReactNative; +/** + * A constant that indicates whether the environment the code is running is a Web Worker. + */ +exports.isWebWorker = tspRuntime.isWebWorker; +/** + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string + */ +function uint8ArrayToString(bytes, format) { + return tspRuntime.uint8ArrayToString(bytes, format); +} +/** + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array + */ +function stringToUint8Array(value, format) { + return tspRuntime.stringToUint8Array(value, format); +} +//# sourceMappingURL=index.js.map /***/ }), -/***/ 33396: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 1187: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var dom_1 = __nccwpck_require__(40770); +exports.isDefined = isDefined; +exports.isObjectWithProperties = isObjectWithProperties; +exports.objectHasProperty = objectHasProperty; /** - * Pre-serializes XML nodes. + * Helper TypeGuard that checks if something is defined or not. + * @param thing - Anything */ -var BaseReader = /** @class */ (function () { - /** - * Initializes a new instance of `BaseReader`. - * - * @param builderOptions - XML builder options - */ - function BaseReader(builderOptions) { - this._builderOptions = builderOptions; - if (builderOptions.parser) { - Object.assign(this, builderOptions.parser); +function isDefined(thing) { + return typeof thing !== "undefined" && thing !== null; +} +/** + * Helper TypeGuard that checks if the input is an object with the specified properties. + * @param thing - Anything. + * @param properties - The name of the properties that should appear in the object. + */ +function isObjectWithProperties(thing, properties) { + if (!isDefined(thing) || typeof thing !== "object") { + return false; + } + for (const property of properties) { + if (!objectHasProperty(thing, property)) { + return false; } } - BaseReader.prototype._docType = function (parent, name, publicId, systemId) { - return parent.dtd({ name: name, pubID: publicId, sysID: systemId }); - }; - BaseReader.prototype._comment = function (parent, data) { - return parent.com(data); - }; - BaseReader.prototype._text = function (parent, data) { - return parent.txt(data); - }; - BaseReader.prototype._instruction = function (parent, target, data) { - return parent.ins(target, data); - }; - BaseReader.prototype._cdata = function (parent, data) { - return parent.dat(data); - }; - BaseReader.prototype._element = function (parent, namespace, name) { - return (namespace === undefined ? parent.ele(name) : parent.ele(namespace, name)); - }; - BaseReader.prototype._attribute = function (parent, namespace, name, value) { - return (namespace === undefined ? parent.att(name, value) : parent.att(namespace, name, value)); - }; - BaseReader.prototype._sanitize = function (str) { - return dom_1.sanitizeInput(str, this._builderOptions.invalidCharReplacement); - }; - /** - * Main parser function which parses the given object and returns an XMLBuilder. - * - * @param node - node to recieve parsed content - * @param obj - object to parse - */ - BaseReader.prototype.parse = function (node, obj) { - return this._parse(node, obj); - }; - /** - * Creates a DocType node. - * The node will be skipped if the function returns `undefined`. - * - * @param name - node name - * @param publicId - public identifier - * @param systemId - system identifier - */ - BaseReader.prototype.docType = function (parent, name, publicId, systemId) { - return this._docType(parent, name, publicId, systemId); - }; - /** - * Creates a comment node. - * The node will be skipped if the function returns `undefined`. - * - * @param parent - parent node - * @param data - node data - */ - BaseReader.prototype.comment = function (parent, data) { - return this._comment(parent, data); - }; - /** - * Creates a text node. - * The node will be skipped if the function returns `undefined`. - * - * @param parent - parent node - * @param data - node data - */ - BaseReader.prototype.text = function (parent, data) { - return this._text(parent, data); - }; - /** - * Creates a processing instruction node. - * The node will be skipped if the function returns `undefined`. - * - * @param parent - parent node - * @param target - instruction target - * @param data - node data - */ - BaseReader.prototype.instruction = function (parent, target, data) { - return this._instruction(parent, target, data); - }; - /** - * Creates a CData section node. - * The node will be skipped if the function returns `undefined`. - * - * @param parent - parent node - * @param data - node data - */ - BaseReader.prototype.cdata = function (parent, data) { - return this._cdata(parent, data); - }; - /** - * Creates an element node. - * The node will be skipped if the function returns `undefined`. - * - * @param parent - parent node - * @param namespace - node namespace - * @param name - node name - */ - BaseReader.prototype.element = function (parent, namespace, name) { - return this._element(parent, namespace, name); - }; - /** - * Creates an attribute or namespace declaration. - * The node will be skipped if the function returns `undefined`. - * - * @param parent - parent node - * @param namespace - node namespace - * @param name - node name - * @param value - node value - */ - BaseReader.prototype.attribute = function (parent, namespace, name, value) { - return this._attribute(parent, namespace, name, value); - }; - /** - * Sanitizes input strings. - * - * @param str - input string - */ - BaseReader.prototype.sanitize = function (str) { - return this._sanitize(str); - }; - return BaseReader; -}()); -exports.BaseReader = BaseReader; -//# sourceMappingURL=BaseReader.js.map + return true; +} +/** + * Helper TypeGuard that checks if the input is an object with the specified property. + * @param thing - Any object. + * @param property - The name of the property that should appear in the object. + */ +function objectHasProperty(thing, property) { + return (isDefined(thing) && typeof thing === "object" && property in thing); +} +//# sourceMappingURL=typeGuards.js.map /***/ }), -/***/ 43518: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 42118: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -var ObjectReader_1 = __nccwpck_require__(40768); -var BaseReader_1 = __nccwpck_require__(33396); +exports.AbortError = void 0; /** - * Parses XML nodes from a JSON string. + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` */ -var JSONReader = /** @class */ (function (_super) { - __extends(JSONReader, _super); - function JSONReader() { - return _super !== null && _super.apply(this, arguments) || this; +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; } - /** - * Parses the given document representation. - * - * @param node - node receive parsed XML nodes - * @param str - JSON string to parse - */ - JSONReader.prototype._parse = function (node, str) { - return new ObjectReader_1.ObjectReader(this._builderOptions).parse(node, JSON.parse(str)); - }; - return JSONReader; -}(BaseReader_1.BaseReader)); -exports.JSONReader = JSONReader; -//# sourceMappingURL=JSONReader.js.map +} +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map /***/ }), -/***/ 40768: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 54812: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -var BaseReader_1 = __nccwpck_require__(33396); -/** - * Parses XML nodes from objects and arrays. - * ES6 maps and sets are also supoorted. - */ -var ObjectReader = /** @class */ (function (_super) { - __extends(ObjectReader, _super); - function ObjectReader() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * Parses the given document representation. - * - * @param node - node receive parsed XML nodes - * @param obj - object to parse - */ - ObjectReader.prototype._parse = function (node, obj) { - var _this = this; - var options = this._builderOptions; - var lastChild = null; - if (util_1.isFunction(obj)) { - // evaluate if function - lastChild = this.parse(node, obj.apply(this)); - } - else if (util_1.isArray(obj) || util_1.isSet(obj)) { - util_1.forEachArray(obj, function (item) { return lastChild = _this.parse(node, item); }, this); - } - else /* if (isMap(obj) || isObject(obj)) */ { - // expand if object - util_1.forEachObject(obj, function (key, val) { - if (util_1.isFunction(val)) { - // evaluate if function - val = val.apply(_this); - } - if (!options.ignoreConverters && key.indexOf(options.convert.att) === 0) { - // assign attributes - if (key === options.convert.att) { - if (util_1.isArray(val) || util_1.isSet(val)) { - throw new Error("Invalid attribute: " + val.toString() + ". " + node._debugInfo()); - } - else /* if (isMap(val) || isObject(val)) */ { - util_1.forEachObject(val, function (attrKey, attrVal) { - lastChild = _this.attribute(node, undefined, _this.sanitize(attrKey), _this.sanitize(attrVal)) || lastChild; - }); - } - } - else { - lastChild = _this.attribute(node, undefined, _this.sanitize(key.substr(options.convert.att.length)), _this.sanitize(val)) || lastChild; - } - } - else if (!options.ignoreConverters && key.indexOf(options.convert.text) === 0) { - // text node - if (util_1.isMap(val) || util_1.isObject(val)) { - // if the key is #text expand child nodes under this node to support mixed content - lastChild = _this.parse(node, val); - } - else { - lastChild = _this.text(node, _this.sanitize(val)) || lastChild; - } - } - else if (!options.ignoreConverters && key.indexOf(options.convert.cdata) === 0) { - // cdata node - if (util_1.isArray(val) || util_1.isSet(val)) { - util_1.forEachArray(val, function (item) { return lastChild = _this.cdata(node, _this.sanitize(item)) || lastChild; }, _this); - } - else { - lastChild = _this.cdata(node, _this.sanitize(val)) || lastChild; - } - } - else if (!options.ignoreConverters && key.indexOf(options.convert.comment) === 0) { - // comment node - if (util_1.isArray(val) || util_1.isSet(val)) { - util_1.forEachArray(val, function (item) { return lastChild = _this.comment(node, _this.sanitize(item)) || lastChild; }, _this); - } - else { - lastChild = _this.comment(node, _this.sanitize(val)) || lastChild; - } - } - else if (!options.ignoreConverters && key.indexOf(options.convert.ins) === 0) { - // processing instruction - if (util_1.isString(val)) { - var insIndex = val.indexOf(' '); - var insTarget = (insIndex === -1 ? val : val.substr(0, insIndex)); - var insValue = (insIndex === -1 ? '' : val.substr(insIndex + 1)); - lastChild = _this.instruction(node, _this.sanitize(insTarget), _this.sanitize(insValue)) || lastChild; - } - else if (util_1.isArray(val) || util_1.isSet(val)) { - util_1.forEachArray(val, function (item) { - var insIndex = item.indexOf(' '); - var insTarget = (insIndex === -1 ? item : item.substr(0, insIndex)); - var insValue = (insIndex === -1 ? '' : item.substr(insIndex + 1)); - lastChild = _this.instruction(node, _this.sanitize(insTarget), _this.sanitize(insValue)) || lastChild; - }, _this); - } - else /* if (isMap(target) || isObject(target)) */ { - util_1.forEachObject(val, function (insTarget, insValue) { return lastChild = _this.instruction(node, _this.sanitize(insTarget), _this.sanitize(insValue)) || lastChild; }, _this); - } - } - else if ((util_1.isArray(val) || util_1.isSet(val)) && util_1.isEmpty(val)) { - // skip empty arrays - } - else if ((util_1.isMap(val) || util_1.isObject(val)) && util_1.isEmpty(val)) { - // empty objects produce one node - lastChild = _this.element(node, undefined, _this.sanitize(key)) || lastChild; - } - else if (!options.keepNullNodes && (val == null)) { - // skip null and undefined nodes - } - else if (util_1.isArray(val) || util_1.isSet(val)) { - // expand list by creating child nodes - util_1.forEachArray(val, function (item) { - var childNode = {}; - childNode[key] = item; - lastChild = _this.parse(node, childNode); - }, _this); - } - else if (util_1.isMap(val) || util_1.isObject(val)) { - // create a parent node - var parent = _this.element(node, undefined, _this.sanitize(key)); - if (parent) { - lastChild = parent; - // expand child nodes under parent - _this.parse(parent, val); - } - } - else if (val != null && val !== '') { - // leaf element node with a single text node - var parent = _this.element(node, undefined, _this.sanitize(key)); - if (parent) { - lastChild = parent; - _this.text(parent, _this.sanitize(val)); - } - } - else { - // leaf element node - lastChild = _this.element(node, undefined, _this.sanitize(key)) || lastChild; - } - }, this); - } - return lastChild || node; - }; - return ObjectReader; -}(BaseReader_1.BaseReader)); -exports.ObjectReader = ObjectReader; -//# sourceMappingURL=ObjectReader.js.map +exports.AbortError = void 0; +var AbortError_js_1 = __nccwpck_require__(42118); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 65044: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 17309: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var XMLStringLexer_1 = __nccwpck_require__(47061); -var interfaces_1 = __nccwpck_require__(97707); -var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); -var BaseReader_1 = __nccwpck_require__(33396); -/** - * Parses XML nodes from an XML document string. - */ -var XMLReader = /** @class */ (function (_super) { - __extends(XMLReader, _super); - function XMLReader() { - return _super !== null && _super.apply(this, arguments) || this; - } - /** - * Parses the given document representation. - * - * @param node - node receive parsed XML nodes - * @param str - XML document string to parse - */ - XMLReader.prototype._parse = function (node, str) { - var e_1, _a, e_2, _b; - var lexer = new XMLStringLexer_1.XMLStringLexer(str, { skipWhitespaceOnlyText: true }); - var context = node; - var token = lexer.nextToken(); - while (token.type !== interfaces_1.TokenType.EOF) { - switch (token.type) { - case interfaces_1.TokenType.Declaration: - var declaration = token; - var version = this.sanitize(declaration.version); - if (version !== "1.0") { - throw new Error("Invalid xml version: " + version); - } - var builderOptions = { - version: version - }; - if (declaration.encoding) { - builderOptions.encoding = this.sanitize(declaration.encoding); - } - if (declaration.standalone) { - builderOptions.standalone = (this.sanitize(declaration.standalone) === "yes"); - } - context.set(builderOptions); - break; - case interfaces_1.TokenType.DocType: - var doctype = token; - context = this.docType(context, this.sanitize(doctype.name), this.sanitize(doctype.pubId), this.sanitize(doctype.sysId)) || context; - break; - case interfaces_1.TokenType.CDATA: - var cdata = token; - context = this.cdata(context, this.sanitize(cdata.data)) || context; - break; - case interfaces_1.TokenType.Comment: - var comment = token; - context = this.comment(context, this.sanitize(comment.data)) || context; - break; - case interfaces_1.TokenType.PI: - var pi = token; - context = this.instruction(context, this.sanitize(pi.target), this.sanitize(pi.data)) || context; - break; - case interfaces_1.TokenType.Text: - var text = token; - context = this.text(context, this.sanitize(text.data)) || context; - break; - case interfaces_1.TokenType.Element: - var element = token; - var elementName = this.sanitize(element.name); - // inherit namespace from parent - var _c = __read(algorithm_1.namespace_extractQName(elementName), 1), prefix = _c[0]; - var namespace = context.node.lookupNamespaceURI(prefix); - // override namespace if there is a namespace declaration - // attribute - // also lookup namespace declaration attributes - var nsDeclarations = {}; - try { - for (var _d = (e_1 = void 0, __values(element.attributes)), _e = _d.next(); !_e.done; _e = _d.next()) { - var _f = __read(_e.value, 2), attName = _f[0], attValue = _f[1]; - attName = this.sanitize(attName); - attValue = this.sanitize(attValue); - if (attName === "xmlns") { - namespace = attValue; - } - else { - var _g = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _g[0], attLocalName = _g[1]; - if (attPrefix === "xmlns") { - if (attLocalName === prefix) { - namespace = attValue; - } - nsDeclarations[attLocalName] = attValue; - } - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_e && !_e.done && (_a = _d.return)) _a.call(_d); - } - finally { if (e_1) throw e_1.error; } - } - // create the DOM element node - var elementNode = (namespace !== null ? - this.element(context, namespace, elementName) : - this.element(context, undefined, elementName)); - if (elementNode === undefined) - break; - try { - // assign attributes - for (var _h = (e_2 = void 0, __values(element.attributes)), _j = _h.next(); !_j.done; _j = _h.next()) { - var _k = __read(_j.value, 2), attName = _k[0], attValue = _k[1]; - attName = this.sanitize(attName); - attValue = this.sanitize(attValue); - var _l = __read(algorithm_1.namespace_extractQName(attName), 2), attPrefix = _l[0], attLocalName = _l[1]; - var attNamespace = null; - if (attPrefix === "xmlns" || (attPrefix === null && attLocalName === "xmlns")) { - // namespace declaration attribute - attNamespace = infra_1.namespace.XMLNS; - } - else { - attNamespace = elementNode.node.lookupNamespaceURI(attPrefix); - if (attNamespace !== null && elementNode.node.isDefaultNamespace(attNamespace)) { - attNamespace = null; - } - else if (attNamespace === null && attPrefix !== null) { - attNamespace = nsDeclarations[attPrefix] || null; - } - } - if (attNamespace !== null) - this.attribute(elementNode, attNamespace, attName, attValue); - else - this.attribute(elementNode, undefined, attName, attValue); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_j && !_j.done && (_b = _h.return)) _b.call(_h); - } - finally { if (e_2) throw e_2.error; } - } - if (!element.selfClosing) { - context = elementNode; - } - break; - case interfaces_1.TokenType.ClosingTag: - /* istanbul ignore else */ - if (context.node.parentNode) { - context = context.up(); - } - break; - } - token = lexer.nextToken(); - } - return context; - }; - return XMLReader; -}(BaseReader_1.BaseReader)); -exports.XMLReader = XMLReader; -//# sourceMappingURL=XMLReader.js.map +exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.parseXML = exports.stringifyXML = void 0; +var xml_js_1 = __nccwpck_require__(39170); +Object.defineProperty(exports, "stringifyXML", ({ enumerable: true, get: function () { return xml_js_1.stringifyXML; } })); +Object.defineProperty(exports, "parseXML", ({ enumerable: true, get: function () { return xml_js_1.parseXML; } })); +var xml_common_js_1 = __nccwpck_require__(62060); +Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_ATTRKEY; } })); +Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_CHARKEY; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 62060: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; +/** + * Default key used to access the XML attributes. + */ +exports.XML_ATTRKEY = "$"; +/** + * Default key used to access the XML value content. + */ +exports.XML_CHARKEY = "_"; +//# sourceMappingURL=xml.common.js.map /***/ }), -/***/ 12475: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 39170: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var ObjectReader_1 = __nccwpck_require__(40768); -var BaseReader_1 = __nccwpck_require__(33396); -var js_yaml_1 = __nccwpck_require__(10829); +exports.stringifyXML = stringifyXML; +exports.parseXML = parseXML; +const fast_xml_parser_1 = __nccwpck_require__(74577); +const xml_common_js_1 = __nccwpck_require__(62060); +function getCommonOptions(options) { + var _a; + return { + attributesGroupName: xml_common_js_1.XML_ATTRKEY, + textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, + ignoreAttributes: false, + suppressBooleanAttributes: false, + }; +} +function getSerializerOptions(options = {}) { + var _a, _b; + return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); +} +function getParserOptions(options = {}) { + return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); +} /** - * Parses XML nodes from a YAML string. + * Converts given JSON object to XML string + * @param obj - JSON object to be converted into XML string + * @param opts - Options that govern the XML building of given JSON object + * `rootName` indicates the name of the root element in the resulting XML */ -var YAMLReader = /** @class */ (function (_super) { - __extends(YAMLReader, _super); - function YAMLReader() { - return _super !== null && _super.apply(this, arguments) || this; +function stringifyXML(obj, opts = {}) { + const parserOptions = getSerializerOptions(opts); + const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); + const node = { [parserOptions.rootNodeName]: obj }; + const xmlData = j2x.build(node); + return `${xmlData}`.replace(/\n/g, ""); +} +/** + * Converts given XML string into JSON + * @param str - String containing the XML content to be parsed into JSON + * @param opts - Options that govern the parsing of given xml string + * `includeRoot` indicates whether the root element is to be included or not in the output + */ +async function parseXML(str, opts = {}) { + if (!str) { + throw new Error("Document is empty"); } - /** - * Parses the given document representation. - * - * @param node - node receive parsed XML nodes - * @param str - YAML string to parse - */ - YAMLReader.prototype._parse = function (node, str) { - var result = js_yaml_1.safeLoad(str); - /* istanbul ignore next */ - if (result === undefined) { - throw new Error("Unable to parse YAML document."); + const validation = fast_xml_parser_1.XMLValidator.validate(str); + if (validation !== true) { + throw validation; + } + const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); + const parsedXml = parser.parse(str); + // Remove the node. + // This is a change in behavior on fxp v4. Issue #424 + if (parsedXml["?xml"]) { + delete parsedXml["?xml"]; + } + if (!opts.includeRoot) { + for (const key of Object.keys(parsedXml)) { + const value = parsedXml[key]; + return typeof value === "object" ? Object.assign({}, value) : value; } - return new ObjectReader_1.ObjectReader(this._builderOptions).parse(node, result); - }; - return YAMLReader; -}(BaseReader_1.BaseReader)); -exports.YAMLReader = YAMLReader; -//# sourceMappingURL=YAMLReader.js.map + } + return parsedXml; +} +//# sourceMappingURL=xml.js.map /***/ }), -/***/ 90560: +/***/ 89497: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var XMLReader_1 = __nccwpck_require__(65044); -exports.XMLReader = XMLReader_1.XMLReader; -var ObjectReader_1 = __nccwpck_require__(40768); -exports.ObjectReader = ObjectReader_1.ObjectReader; -var JSONReader_1 = __nccwpck_require__(43518); -exports.JSONReader = JSONReader_1.JSONReader; -var YAMLReader_1 = __nccwpck_require__(12475); -exports.YAMLReader = YAMLReader_1.YAMLReader; +exports.AzureLogger = void 0; +exports.setLogLevel = setLogLevel; +exports.getLogLevel = getLogLevel; +exports.createClientLogger = createClientLogger; +const logger_1 = __nccwpck_require__(46244); +const context = (0, logger_1.createLoggerContext)({ + logLevelEnvVarName: "AZURE_LOG_LEVEL", + namespace: "azure", +}); +/** + * The AzureLogger provides a mechanism for overriding where logs are output to. + * By default, logs are sent to stderr. + * Override the `log` method to redirect logs to another location. + */ +exports.AzureLogger = context.logger; +/** + * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. + * @param level - The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +function setLogLevel(level) { + context.setLogLevel(level); +} +/** + * Retrieves the currently specified log level. + */ +function getLogLevel() { + return context.getLogLevel(); +} +/** + * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. + * @param namespace - The name of the SDK package. + * @hidden + */ +function createClientLogger(namespace) { + return context.createClientLogger(namespace); +} //# sourceMappingURL=index.js.map /***/ }), -/***/ 50708: +/***/ 1227: /***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Pre-serializes XML nodes. - */ -var BaseCBWriter = /** @class */ (function () { - /** - * Initializes a new instance of `BaseCBWriter`. - * - * @param builderOptions - XML builder options - */ - function BaseCBWriter(builderOptions) { - /** - * Gets the current depth of the XML tree. - */ - this.level = 0; - this._builderOptions = builderOptions; - this._writerOptions = builderOptions; - } - return BaseCBWriter; -}()); -exports.BaseCBWriter = BaseCBWriter; -//# sourceMappingURL=BaseCBWriter.js.map +//# sourceMappingURL=BatchResponse.js.map /***/ }), -/***/ 37644: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 58259: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var interfaces_1 = __nccwpck_require__(27305); -var LocalNameSet_1 = __nccwpck_require__(19049); -var NamespacePrefixMap_1 = __nccwpck_require__(90283); -var infra_1 = __nccwpck_require__(84251); -var algorithm_1 = __nccwpck_require__(61); +exports.BatchResponseParser = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_http_compat_1 = __nccwpck_require__(25083); +const constants_js_1 = __nccwpck_require__(81865); +const BatchUtils_js_1 = __nccwpck_require__(4982); +const log_js_1 = __nccwpck_require__(53282); +const HTTP_HEADER_DELIMITER = ": "; +const SPACE_DELIMITER = " "; +const NOT_FOUND = -1; /** - * Pre-serializes XML nodes. + * Util class for parsing batch response. */ -var BaseWriter = /** @class */ (function () { - /** - * Initializes a new instance of `BaseWriter`. - * - * @param builderOptions - XML builder options - */ - function BaseWriter(builderOptions) { - /** - * Gets the current depth of the XML tree. - */ - this.level = 0; - this._builderOptions = builderOptions; - } - /** - * Used by derived classes to serialize the XML declaration. - * - * @param version - a version number string - * @param encoding - encoding declaration - * @param standalone - standalone document declaration - */ - BaseWriter.prototype.declaration = function (version, encoding, standalone) { }; - /** - * Used by derived classes to serialize a DocType node. - * - * @param name - node name - * @param publicId - public identifier - * @param systemId - system identifier - */ - BaseWriter.prototype.docType = function (name, publicId, systemId) { }; - /** - * Used by derived classes to serialize a comment node. - * - * @param data - node data - */ - BaseWriter.prototype.comment = function (data) { }; - /** - * Used by derived classes to serialize a text node. - * - * @param data - node data - */ - BaseWriter.prototype.text = function (data) { }; - /** - * Used by derived classes to serialize a processing instruction node. - * - * @param target - instruction target - * @param data - node data - */ - BaseWriter.prototype.instruction = function (target, data) { }; - /** - * Used by derived classes to serialize a CData section node. - * - * @param data - node data - */ - BaseWriter.prototype.cdata = function (data) { }; - /** - * Used by derived classes to serialize the beginning of the opening tag of an - * element node. - * - * @param name - node name - */ - BaseWriter.prototype.openTagBegin = function (name) { }; - /** - * Used by derived classes to serialize the ending of the opening tag of an - * element node. - * - * @param name - node name - * @param selfClosing - whether the element node is self closing - * @param voidElement - whether the element node is a HTML void element - */ - BaseWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { }; - /** - * Used by derived classes to serialize the closing tag of an element node. - * - * @param name - node name - */ - BaseWriter.prototype.closeTag = function (name) { }; - /** - * Used by derived classes to serialize attributes or namespace declarations. - * - * @param attributes - attribute array - */ - BaseWriter.prototype.attributes = function (attributes) { - var e_1, _a; - try { - for (var attributes_1 = __values(attributes), attributes_1_1 = attributes_1.next(); !attributes_1_1.done; attributes_1_1 = attributes_1.next()) { - var attr = attributes_1_1.value; - this.attribute(attr[1] === null ? attr[2] : attr[1] + ':' + attr[2], attr[3]); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (attributes_1_1 && !attributes_1_1.done && (_a = attributes_1.return)) _a.call(attributes_1); - } - finally { if (e_1) throw e_1.error; } - } - }; - /** - * Used by derived classes to serialize an attribute or namespace declaration. - * - * @param name - node name - * @param value - node value - */ - BaseWriter.prototype.attribute = function (name, value) { }; - /** - * Used by derived classes to perform any pre-processing steps before starting - * serializing an element node. - * - * @param name - node name - */ - BaseWriter.prototype.beginElement = function (name) { }; - /** - * Used by derived classes to perform any post-processing steps after - * completing serializing an element node. - * - * @param name - node name - */ - BaseWriter.prototype.endElement = function (name) { }; - /** - * Produces an XML serialization of the given node. The pre-serializer inserts - * namespace declarations where necessary and produces qualified names for - * nodes and attributes. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype.serializeNode = function (node, requireWellFormed, noDoubleEncoding) { - var hasNamespaces = (node._nodeDocument !== undefined && node._nodeDocument._hasNamespaces); - this.level = 0; - this.currentNode = node; - if (hasNamespaces) { - /** From: https://w3c.github.io/DOM-Parsing/#xml-serialization - * - * 1. Let namespace be a context namespace with value null. - * The context namespace tracks the XML serialization algorithm's current - * default namespace. The context namespace is changed when either an Element - * Node has a default namespace declaration, or the algorithm generates a - * default namespace declaration for the Element Node to match its own - * namespace. The algorithm assumes no namespace (null) to start. - * 2. Let prefix map be a new namespace prefix map. - * 3. Add the XML namespace with prefix value "xml" to prefix map. - * 4. Let prefix index be a generated namespace prefix index with value 1. - * The generated namespace prefix index is used to generate a new unique - * prefix value when no suitable existing namespace prefix is available to - * serialize a node's namespaceURI (or the namespaceURI of one of node's - * attributes). See the generate a prefix algorithm. - */ - var namespace = null; - var prefixMap = new NamespacePrefixMap_1.NamespacePrefixMap(); - prefixMap.set("xml", infra_1.namespace.XML); - var prefixIndex = { value: 1 }; - /** - * 5. Return the result of running the XML serialization algorithm on node - * passing the context namespace namespace, namespace prefix map prefix map, - * generated namespace prefix index reference to prefix index, and the - * flag require well-formed. If an exception occurs during the execution - * of the algorithm, then catch that exception and throw an - * "InvalidStateError" DOMException. - */ - this._serializeNodeNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); - } - else { - this._serializeNode(node, requireWellFormed, noDoubleEncoding); - } - }; - /** - * Produces an XML serialization of a node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeNodeNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { - this.currentNode = node; - switch (node.nodeType) { - case interfaces_1.NodeType.Element: - this._serializeElementNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.Document: - this._serializeDocumentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.Comment: - this._serializeComment(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.Text: - this._serializeText(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.DocumentFragment: - this._serializeDocumentFragmentNS(node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.DocumentType: - this._serializeDocumentType(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.ProcessingInstruction: - this._serializeProcessingInstruction(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.CData: - this._serializeCData(node, requireWellFormed, noDoubleEncoding); - break; - default: - throw new Error("Unknown node type: " + node.nodeType); - } - }; - /** - * Produces an XML serialization of a node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeNode = function (node, requireWellFormed, noDoubleEncoding) { - this.currentNode = node; - switch (node.nodeType) { - case interfaces_1.NodeType.Element: - this._serializeElement(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.Document: - this._serializeDocument(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.Comment: - this._serializeComment(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.Text: - this._serializeText(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.DocumentFragment: - this._serializeDocumentFragment(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.DocumentType: - this._serializeDocumentType(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.ProcessingInstruction: - this._serializeProcessingInstruction(node, requireWellFormed, noDoubleEncoding); - break; - case interfaces_1.NodeType.CData: - this._serializeCData(node, requireWellFormed, noDoubleEncoding); - break; - default: - throw new Error("Unknown node type: " + node.nodeType); - } - }; - /** - * Produces an XML serialization of an element node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeElementNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { - var e_2, _a; - var attributes = []; - /** - * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node - * - * 1. If the require well-formed flag is set (its value is true), and this - * node's localName attribute contains the character ":" (U+003A COLON) or - * does not match the XML Name production, then throw an exception; the - * serialization of this node would not be a well-formed element. - */ - if (requireWellFormed && (node.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(node.localName))) { - throw new Error("Node local name contains invalid characters (well-formed required)."); - } - /** - * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). - * 3. Let qualified name be an empty string. - * 4. Let skip end tag be a boolean flag with value false. - * 5. Let ignore namespace definition attribute be a boolean flag with value - * false. - * 6. Given prefix map, copy a namespace prefix map and let map be the - * result. - * 7. Let local prefixes map be an empty map. The map has unique Node prefix - * strings as its keys, with corresponding namespaceURI Node values as the - * map's key values (in this map, the null namespace is represented by the - * empty string). - * - * _Note:_ This map is local to each element. It is used to ensure there - * are no conflicting prefixes should a new namespace prefix attribute need - * to be generated. It is also used to enable skipping of duplicate prefix - * definitions when writing an element's attributes: the map allows the - * algorithm to distinguish between a prefix in the namespace prefix map - * that might be locally-defined (to the current Element) and one that is - * not. - * 8. Let local default namespace be the result of recording the namespace - * information for node given map and local prefixes map. - * - * _Note:_ The above step will update map with any found namespace prefix - * definitions, add the found prefix definitions to the local prefixes map - * and return a local default namespace value defined by a default namespace - * attribute if one exists. Otherwise it returns null. - * 9. Let inherited ns be a copy of namespace. - * 10. Let ns be the value of node's namespaceURI attribute. - */ - var qualifiedName = ''; - var skipEndTag = false; - var ignoreNamespaceDefinitionAttribute = false; - var map = prefixMap.copy(); - var localPrefixesMap = {}; - var localDefaultNamespace = this._recordNamespaceInformation(node, map, localPrefixesMap); - var inheritedNS = namespace; - var ns = node.namespaceURI; - /** 11. If inherited ns is equal to ns, then: */ - if (inheritedNS === ns) { - /** - * 11.1. If local default namespace is not null, then set ignore - * namespace definition attribute to true. - */ - if (localDefaultNamespace !== null) { - ignoreNamespaceDefinitionAttribute = true; - } - /** - * 11.2. If ns is the XML namespace, then append to qualified name the - * concatenation of the string "xml:" and the value of node's localName. - * 11.3. Otherwise, append to qualified name the value of node's - * localName. The node's prefix if it exists, is dropped. - */ - if (ns === infra_1.namespace.XML) { - qualifiedName = 'xml:' + node.localName; - } - else { - qualifiedName = node.localName; - } - /** 11.4. Append the value of qualified name to markup. */ - this.beginElement(qualifiedName); - this.openTagBegin(qualifiedName); - } - else { - /** - * 12. Otherwise, inherited ns is not equal to ns (the node's own - * namespace is different from the context namespace of its parent). - * Run these sub-steps: - * - * 12.1. Let prefix be the value of node's prefix attribute. - * 12.2. Let candidate prefix be the result of retrieving a preferred - * prefix string prefix from map given namespace ns. The above may return - * null if no namespace key ns exists in map. - */ - var prefix = node.prefix; - /** - * We don't need to run "retrieving a preferred prefix string" algorithm if - * the element has no prefix and its namespace matches to the default - * namespace. - * See: https://github.com/web-platform-tests/wpt/pull/16703 - */ - var candidatePrefix = null; - if (prefix !== null || ns !== localDefaultNamespace) { - candidatePrefix = map.get(prefix, ns); - } - /** - * 12.3. If the value of prefix matches "xmlns", then run the following - * steps: - */ - if (prefix === "xmlns") { - /** - * 12.3.1. If the require well-formed flag is set, then throw an error. - * An Element with prefix "xmlns" will not legally round-trip in a - * conforming XML parser. - */ - if (requireWellFormed) { - throw new Error("An element cannot have the 'xmlns' prefix (well-formed required)."); - } - /** - * 12.3.2. Let candidate prefix be the value of prefix. - */ - candidatePrefix = prefix; - } - /** - * 12.4.Found a suitable namespace prefix: if candidate prefix is not - * null (a namespace prefix is defined which maps to ns), then: - */ - if (candidatePrefix !== null) { - /** - * The following may serialize a different prefix than the Element's - * existing prefix if it already had one. However, the retrieving a - * preferred prefix string algorithm already tried to match the - * existing prefix if possible. - * - * 12.4.1. Append to qualified name the concatenation of candidate - * prefix, ":" (U+003A COLON), and node's localName. There exists on - * this node or the node's ancestry a namespace prefix definition that - * defines the node's namespace. - * 12.4.2. If the local default namespace is not null (there exists a - * locally-defined default namespace declaration attribute) and its - * value is not the XML namespace, then let inherited ns get the value - * of local default namespace unless the local default namespace is the - * empty string in which case let it get null (the context namespace - * is changed to the declared default, rather than this node's own - * namespace). - * - * _Note:_ Any default namespace definitions or namespace prefixes that - * define the XML namespace are omitted when serializing this node's - * attributes. - */ - qualifiedName = candidatePrefix + ':' + node.localName; - if (localDefaultNamespace !== null && localDefaultNamespace !== infra_1.namespace.XML) { - inheritedNS = localDefaultNamespace || null; - } - /** - * 12.4.3. Append the value of qualified name to markup. - */ - this.beginElement(qualifiedName); - this.openTagBegin(qualifiedName); - /** 12.5. Otherwise, if prefix is not null, then: */ - } - else if (prefix !== null) { - /** - * _Note:_ By this step, there is no namespace or prefix mapping - * declaration in this node (or any parent node visited by this - * algorithm) that defines prefix otherwise the step labelled Found - * a suitable namespace prefix would have been followed. The sub-steps - * that follow will create a new namespace prefix declaration for prefix - * and ensure that prefix does not conflict with an existing namespace - * prefix declaration of the same localName in node's attribute list. - * - * 12.5.1. If the local prefixes map contains a key matching prefix, - * then let prefix be the result of generating a prefix providing as - * input map, ns, and prefix index. - */ - if (prefix in localPrefixesMap) { - prefix = this._generatePrefix(ns, map, prefixIndex); - } - /** - * 12.5.2. Add prefix to map given namespace ns. - * 12.5.3. Append to qualified name the concatenation of prefix, ":" - * (U+003A COLON), and node's localName. - * 12.5.4. Append the value of qualified name to markup. - */ - map.set(prefix, ns); - qualifiedName += prefix + ':' + node.localName; - this.beginElement(qualifiedName); - this.openTagBegin(qualifiedName); - /** - * 12.5.5. Append the following to markup, in the order listed: - * - * _Note:_ The following serializes a namespace prefix declaration for - * prefix which was just added to the map. - * - * 12.5.5.1. " " (U+0020 SPACE); - * 12.5.5.2. The string "xmlns:"; - * 12.5.5.3. The value of prefix; - * 12.5.5.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 12.5.5.5. The result of serializing an attribute value given ns and - * the require well-formed flag as input; - * 12.5.5.6. """ (U+0022 QUOTATION MARK). - */ - attributes.push([null, 'xmlns', prefix, - this._serializeAttributeValue(ns, requireWellFormed, noDoubleEncoding)]); - /** - * 12.5.5.7. If local default namespace is not null (there exists a - * locally-defined default namespace declaration attribute), then - * let inherited ns get the value of local default namespace unless the - * local default namespace is the empty string in which case let it get - * null. - */ - if (localDefaultNamespace !== null) { - inheritedNS = localDefaultNamespace || null; - } - /** - * 12.6. Otherwise, if local default namespace is null, or local - * default namespace is not null and its value is not equal to ns, then: - */ - } - else if (localDefaultNamespace === null || - (localDefaultNamespace !== null && localDefaultNamespace !== ns)) { - /** - * _Note:_ At this point, the namespace for this node still needs to be - * serialized, but there's no prefix (or candidate prefix) available; the - * following uses the default namespace declaration to define the - * namespace--optionally replacing an existing default declaration - * if present. - * - * 12.6.1. Set the ignore namespace definition attribute flag to true. - * 12.6.2. Append to qualified name the value of node's localName. - * 12.6.3. Let the value of inherited ns be ns. - * - * _Note:_ The new default namespace will be used in the serialization - * to define this node's namespace and act as the context namespace for - * its children. - */ - ignoreNamespaceDefinitionAttribute = true; - qualifiedName += node.localName; - inheritedNS = ns; - /** - * 12.6.4. Append the value of qualified name to markup. - */ - this.beginElement(qualifiedName); - this.openTagBegin(qualifiedName); - /** - * 12.6.5. Append the following to markup, in the order listed: - * - * _Note:_ The following serializes the new (or replacement) default - * namespace definition. - * - * 12.6.5.1. " " (U+0020 SPACE); - * 12.6.5.2. The string "xmlns"; - * 12.6.5.3. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 12.6.5.4. The result of serializing an attribute value given ns - * and the require well-formed flag as input; - * 12.6.5.5. """ (U+0022 QUOTATION MARK). - */ - attributes.push([null, null, 'xmlns', - this._serializeAttributeValue(ns, requireWellFormed, noDoubleEncoding)]); - /** - * 12.7. Otherwise, the node has a local default namespace that matches - * ns. Append to qualified name the value of node's localName, let the - * value of inherited ns be ns, and append the value of qualified name - * to markup. - */ - } - else { - qualifiedName += node.localName; - inheritedNS = ns; - this.beginElement(qualifiedName); - this.openTagBegin(qualifiedName); - } - } - /** - * 13. Append to markup the result of the XML serialization of node's - * attributes given map, prefix index, local prefixes map, ignore namespace - * definition attribute flag, and require well-formed flag. - */ - attributes.push.apply(attributes, __spread(this._serializeAttributesNS(node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed, noDoubleEncoding))); - this.attributes(attributes); - /** - * 14. If ns is the HTML namespace, and the node's list of children is - * empty, and the node's localName matches any one of the following void - * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", - * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", - * "param", "source", "track", "wbr"; then append the following to markup, - * in the order listed: - * 14.1. " " (U+0020 SPACE); - * 14.2. "/" (U+002F SOLIDUS). - * and set the skip end tag flag to true. - * 15. If ns is not the HTML namespace, and the node's list of children is - * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end - * tag flag to true. - * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. - */ - var isHTML = (ns === infra_1.namespace.HTML); - if (isHTML && node.childNodes.length === 0 && - BaseWriter._VoidElementNames.has(node.localName)) { - this.openTagEnd(qualifiedName, true, true); - this.endElement(qualifiedName); - skipEndTag = true; - } - else if (!isHTML && node.childNodes.length === 0) { - this.openTagEnd(qualifiedName, true, false); - this.endElement(qualifiedName); - skipEndTag = true; - } - else { - this.openTagEnd(qualifiedName, false, false); - } - /** - * 17. If the value of skip end tag is true, then return the value of markup - * and skip the remaining steps. The node is a leaf-node. - */ - if (skipEndTag) - return; - /** - * 18. If ns is the HTML namespace, and the node's localName matches the - * string "template", then this is a template element. Append to markup the - * result of XML serializing a DocumentFragment node given the template - * element's template contents (a DocumentFragment), providing inherited - * ns, map, prefix index, and the require well-formed flag. - * - * _Note:_ This allows template content to round-trip, given the rules for - * parsing XHTML documents. - * - * 19. Otherwise, append to markup the result of running the XML - * serialization algorithm on each of node's children, in tree order, - * providing inherited ns, map, prefix index, and the require well-formed - * flag. - */ - if (isHTML && node.localName === "template") { - // TODO: serialize template contents - } - else { - try { - for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - this.level++; - this._serializeNodeNS(childNode, inheritedNS, map, prefixIndex, requireWellFormed, noDoubleEncoding); - this.level--; - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_2) throw e_2.error; } - } - } - /** - * 20. Append the following to markup, in the order listed: - * 20.1. "" (U+003E GREATER-THAN SIGN). - * 21. Return the value of markup. - */ - this.closeTag(qualifiedName); - this.endElement(qualifiedName); - }; - /** - * Produces an XML serialization of an element node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeElement = function (node, requireWellFormed, noDoubleEncoding) { - var e_3, _a; - /** - * From: https://w3c.github.io/DOM-Parsing/#xml-serializing-an-element-node - * - * 1. If the require well-formed flag is set (its value is true), and this - * node's localName attribute contains the character ":" (U+003A COLON) or - * does not match the XML Name production, then throw an exception; the - * serialization of this node would not be a well-formed element. - */ - if (requireWellFormed && (node.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(node.localName))) { - throw new Error("Node local name contains invalid characters (well-formed required)."); - } - /** - * 2. Let markup be the string "<" (U+003C LESS-THAN SIGN). - * 3. Let qualified name be an empty string. - * 4. Let skip end tag be a boolean flag with value false. - * 5. Let ignore namespace definition attribute be a boolean flag with value - * false. - * 6. Given prefix map, copy a namespace prefix map and let map be the - * result. - * 7. Let local prefixes map be an empty map. The map has unique Node prefix - * strings as its keys, with corresponding namespaceURI Node values as the - * map's key values (in this map, the null namespace is represented by the - * empty string). - * - * _Note:_ This map is local to each element. It is used to ensure there - * are no conflicting prefixes should a new namespace prefix attribute need - * to be generated. It is also used to enable skipping of duplicate prefix - * definitions when writing an element's attributes: the map allows the - * algorithm to distinguish between a prefix in the namespace prefix map - * that might be locally-defined (to the current Element) and one that is - * not. - * 8. Let local default namespace be the result of recording the namespace - * information for node given map and local prefixes map. - * - * _Note:_ The above step will update map with any found namespace prefix - * definitions, add the found prefix definitions to the local prefixes map - * and return a local default namespace value defined by a default namespace - * attribute if one exists. Otherwise it returns null. - * 9. Let inherited ns be a copy of namespace. - * 10. Let ns be the value of node's namespaceURI attribute. - */ - var skipEndTag = false; - /** 11. If inherited ns is equal to ns, then: */ - /** - * 11.1. If local default namespace is not null, then set ignore - * namespace definition attribute to true. - */ - /** - * 11.2. If ns is the XML namespace, then append to qualified name the - * concatenation of the string "xml:" and the value of node's localName. - * 11.3. Otherwise, append to qualified name the value of node's - * localName. The node's prefix if it exists, is dropped. - */ - var qualifiedName = node.localName; - /** 11.4. Append the value of qualified name to markup. */ - this.beginElement(qualifiedName); - this.openTagBegin(qualifiedName); - /** - * 13. Append to markup the result of the XML serialization of node's - * attributes given map, prefix index, local prefixes map, ignore namespace - * definition attribute flag, and require well-formed flag. - */ - var attributes = this._serializeAttributes(node, requireWellFormed, noDoubleEncoding); - this.attributes(attributes); - /** - * 14. If ns is the HTML namespace, and the node's list of children is - * empty, and the node's localName matches any one of the following void - * elements: "area", "base", "basefont", "bgsound", "br", "col", "embed", - * "frame", "hr", "img", "input", "keygen", "link", "menuitem", "meta", - * "param", "source", "track", "wbr"; then append the following to markup, - * in the order listed: - * 14.1. " " (U+0020 SPACE); - * 14.2. "/" (U+002F SOLIDUS). - * and set the skip end tag flag to true. - * 15. If ns is not the HTML namespace, and the node's list of children is - * empty, then append "/" (U+002F SOLIDUS) to markup and set the skip end - * tag flag to true. - * 16. Append ">" (U+003E GREATER-THAN SIGN) to markup. - */ - if (!node.hasChildNodes()) { - this.openTagEnd(qualifiedName, true, false); - this.endElement(qualifiedName); - skipEndTag = true; - } - else { - this.openTagEnd(qualifiedName, false, false); - } - /** - * 17. If the value of skip end tag is true, then return the value of markup - * and skip the remaining steps. The node is a leaf-node. - */ - if (skipEndTag) - return; - try { - /** - * 18. If ns is the HTML namespace, and the node's localName matches the - * string "template", then this is a template element. Append to markup the - * result of XML serializing a DocumentFragment node given the template - * element's template contents (a DocumentFragment), providing inherited - * ns, map, prefix index, and the require well-formed flag. - * - * _Note:_ This allows template content to round-trip, given the rules for - * parsing XHTML documents. - * - * 19. Otherwise, append to markup the result of running the XML - * serialization algorithm on each of node's children, in tree order, - * providing inherited ns, map, prefix index, and the require well-formed - * flag. - */ - for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - this.level++; - this._serializeNode(childNode, requireWellFormed, noDoubleEncoding); - this.level--; - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_3) throw e_3.error; } - } - /** - * 20. Append the following to markup, in the order listed: - * 20.1. "" (U+003E GREATER-THAN SIGN). - * 21. Return the value of markup. - */ - this.closeTag(qualifiedName); - this.endElement(qualifiedName); - }; - /** - * Produces an XML serialization of a document node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeDocumentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { - var e_4, _a; - /** - * If the require well-formed flag is set (its value is true), and this node - * has no documentElement (the documentElement attribute's value is null), - * then throw an exception; the serialization of this node would not be a - * well-formed document. - */ - if (requireWellFormed && node.documentElement === null) { - throw new Error("Missing document element (well-formed required)."); +class BatchResponseParser { + batchResponse; + responseBatchBoundary; + perResponsePrefix; + batchResponseEnding; + subRequests; + constructor(batchResponse, subRequests) { + if (!batchResponse || !batchResponse.contentType) { + // In special case(reported), server may return invalid content-type which could not be parsed. + throw new RangeError("batchResponse is malformed or doesn't contain valid content-type."); } - try { - /** - * Otherwise, run the following steps: - * 1. Let serialized document be an empty string. - * 2. For each child child of node, in tree order, run the XML - * serialization algorithm on the child passing along the provided - * arguments, and append the result to serialized document. - * - * _Note:_ This will serialize any number of ProcessingInstruction and - * Comment nodes both before and after the Document's documentElement node, - * including at most one DocumentType node. (Text nodes are not allowed as - * children of the Document.) - * - * 3. Return the value of serialized document. - */ - for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); - } + if (!subRequests || subRequests.size === 0) { + // This should be prevent during coding. + throw new RangeError("Invalid state: subRequests is not provided or size is 0."); } - catch (e_4_1) { e_4 = { error: e_4_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_4) throw e_4.error; } + this.batchResponse = batchResponse; + this.subRequests = subRequests; + this.responseBatchBoundary = this.batchResponse.contentType.split("=")[1]; + this.perResponsePrefix = `--${this.responseBatchBoundary}${constants_js_1.HTTP_LINE_ENDING}`; + this.batchResponseEnding = `--${this.responseBatchBoundary}--`; + } + // For example of response, please refer to https://learn.microsoft.com/rest/api/storageservices/blob-batch#response + async parseBatchResponse() { + // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse + // sub request's response. + if (this.batchResponse._response.status !== constants_js_1.HTTPURLConnection.HTTP_ACCEPTED) { + throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`); } - }; - /** - * Produces an XML serialization of a document node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeDocument = function (node, requireWellFormed, noDoubleEncoding) { - var e_5, _a; - /** - * If the require well-formed flag is set (its value is true), and this node - * has no documentElement (the documentElement attribute's value is null), - * then throw an exception; the serialization of this node would not be a - * well-formed document. - */ - if (requireWellFormed && node.documentElement === null) { - throw new Error("Missing document element (well-formed required)."); + const responseBodyAsText = await (0, BatchUtils_js_1.getBodyAsText)(this.batchResponse); + const subResponses = responseBodyAsText + .split(this.batchResponseEnding)[0] // string after ending is useless + .split(this.perResponsePrefix) + .slice(1); // string before first response boundary is useless + const subResponseCount = subResponses.length; + // Defensive coding in case of potential error parsing. + // Note: subResponseCount == 1 is special case where sub request is invalid. + // We try to prevent such cases through early validation, e.g. validate sub request count >= 1. + // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user. + if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) { + throw new Error("Invalid state: sub responses' count is not equal to sub requests' count."); } - try { - /** - * Otherwise, run the following steps: - * 1. Let serialized document be an empty string. - * 2. For each child child of node, in tree order, run the XML - * serialization algorithm on the child passing along the provided - * arguments, and append the result to serialized document. - * - * _Note:_ This will serialize any number of ProcessingInstruction and - * Comment nodes both before and after the Document's documentElement node, - * including at most one DocumentType node. (Text nodes are not allowed as - * children of the Document.) - * - * 3. Return the value of serialized document. - */ - for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - this._serializeNode(childNode, requireWellFormed, noDoubleEncoding); + const deserializedSubResponses = new Array(subResponseCount); + let subResponsesSucceededCount = 0; + let subResponsesFailedCount = 0; + // Parse sub subResponses. + for (let index = 0; index < subResponseCount; index++) { + const subResponse = subResponses[index]; + const deserializedSubResponse = {}; + deserializedSubResponse.headers = (0, core_http_compat_1.toHttpHeadersLike)((0, core_rest_pipeline_1.createHttpHeaders)()); + const responseLines = subResponse.split(`${constants_js_1.HTTP_LINE_ENDING}`); + let subRespHeaderStartFound = false; + let subRespHeaderEndFound = false; + let subRespFailed = false; + let contentId = NOT_FOUND; + for (const responseLine of responseLines) { + if (!subRespHeaderStartFound) { + // Convention line to indicate content ID + if (responseLine.startsWith(constants_js_1.HeaderConstants.CONTENT_ID)) { + contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]); + } + // Http version line with status code indicates the start of sub request's response. + // Example: HTTP/1.1 202 Accepted + if (responseLine.startsWith(constants_js_1.HTTP_VERSION_1_1)) { + subRespHeaderStartFound = true; + const tokens = responseLine.split(SPACE_DELIMITER); + deserializedSubResponse.status = parseInt(tokens[1]); + deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER); + } + continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: * + } + if (responseLine.trim() === "") { + // Sub response's header start line already found, and the first empty line indicates header end line found. + if (!subRespHeaderEndFound) { + subRespHeaderEndFound = true; + } + continue; // Skip empty line + } + // Note: when code reach here, it indicates subRespHeaderStartFound == true + if (!subRespHeaderEndFound) { + if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) { + // Defensive coding to prevent from missing valuable lines. + throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`); + } + // Parse headers of sub response. + const tokens = responseLine.split(HTTP_HEADER_DELIMITER); + deserializedSubResponse.headers.set(tokens[0], tokens[1]); + if (tokens[0] === constants_js_1.HeaderConstants.X_MS_ERROR_CODE) { + deserializedSubResponse.errorCode = tokens[1]; + subRespFailed = true; + } + } + else { + // Assemble body of sub response. + if (!deserializedSubResponse.bodyAsText) { + deserializedSubResponse.bodyAsText = ""; + } + deserializedSubResponse.bodyAsText += responseLine; + } + } // Inner for end + // The response will contain the Content-ID header for each corresponding subrequest response to use for tracking. + // The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it + // to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that + // unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose. + if (contentId !== NOT_FOUND && + Number.isInteger(contentId) && + contentId >= 0 && + contentId < this.subRequests.size && + deserializedSubResponses[contentId] === undefined) { + deserializedSubResponse._request = this.subRequests.get(contentId); + deserializedSubResponses[contentId] = deserializedSubResponse; } - } - catch (e_5_1) { e_5 = { error: e_5_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + else { + log_js_1.logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`); + } + if (subRespFailed) { + subResponsesFailedCount++; + } + else { + subResponsesSucceededCount++; } - finally { if (e_5) throw e_5.error; } } - }; + return { + subResponses: deserializedSubResponses, + subResponsesSucceededCount: subResponsesSucceededCount, + subResponsesFailedCount: subResponsesFailedCount, + }; + } +} +exports.BatchResponseParser = BatchResponseParser; +//# sourceMappingURL=BatchResponseParser.js.map + +/***/ }), + +/***/ 4982: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getBodyAsText = getBodyAsText; +exports.utf8ByteLength = utf8ByteLength; +const utils_js_1 = __nccwpck_require__(85157); +const constants_js_1 = __nccwpck_require__(81865); +async function getBodyAsText(batchResponse) { + let buffer = Buffer.alloc(constants_js_1.BATCH_MAX_PAYLOAD_IN_BYTES); + const responseLength = await (0, utils_js_1.streamToBuffer2)(batchResponse.readableStreamBody, buffer); + // Slice the buffer to trim the empty ending. + buffer = buffer.slice(0, responseLength); + return buffer.toString(); +} +function utf8ByteLength(str) { + return Buffer.byteLength(str); +} +//# sourceMappingURL=BatchUtils.js.map + +/***/ }), + +/***/ 73689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobBatch = void 0; +const core_util_1 = __nccwpck_require__(80637); +const core_auth_1 = __nccwpck_require__(98834); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_2 = __nccwpck_require__(80637); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const Clients_js_1 = __nccwpck_require__(54437); +const Mutex_js_1 = __nccwpck_require__(25300); +const Pipeline_js_1 = __nccwpck_require__(33781); +const utils_common_js_1 = __nccwpck_require__(16673); +const core_xml_1 = __nccwpck_require__(17309); +const constants_js_1 = __nccwpck_require__(81865); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const tracing_js_1 = __nccwpck_require__(53683); +const core_client_1 = __nccwpck_require__(7611); +const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(93846); +/** + * A BlobBatch represents an aggregated set of operations on blobs. + * Currently, only `delete` and `setAccessTier` are supported. + */ +class BlobBatch { + batchRequest; + batch = "batch"; + batchType; + constructor() { + this.batchRequest = new InnerBatchRequest(); + } /** - * Produces an XML serialization of a comment node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance + * Get the value of Content-Type for a batch request. + * The value must be multipart/mixed with a batch boundary. + * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252 */ - BaseWriter.prototype._serializeComment = function (node, requireWellFormed, noDoubleEncoding) { - /** - * If the require well-formed flag is set (its value is true), and node's - * data contains characters that are not matched by the XML Char production - * or contains "--" (two adjacent U+002D HYPHEN-MINUS characters) or that - * ends with a "-" (U+002D HYPHEN-MINUS) character, then throw an exception; - * the serialization of this node's data would not be well-formed. - */ - if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || - node.data.indexOf("--") !== -1 || node.data.endsWith("-"))) { - throw new Error("Comment data contains invalid characters (well-formed required)."); - } - /** - * Otherwise, return the concatenation of "". - */ - this.comment(node.data); - }; + getMultiPartContentType() { + return this.batchRequest.getMultipartContentType(); + } /** - * Produces an XML serialization of a text node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - * @param level - current depth of the XML tree + * Get assembled HTTP request body for sub requests. */ - BaseWriter.prototype._serializeText = function (node, requireWellFormed, noDoubleEncoding) { - /** - * 1. If the require well-formed flag is set (its value is true), and - * node's data contains characters that are not matched by the XML Char - * production, then throw an exception; the serialization of this node's - * data would not be well-formed. - */ - if (requireWellFormed && !algorithm_1.xml_isLegalChar(node.data)) { - throw new Error("Text data contains invalid characters (well-formed required)."); - } - /** - * 2. Let markup be the value of node's data. - * 3. Replace any occurrences of "&" in markup by "&". - * 4. Replace any occurrences of "<" in markup by "<". - * 5. Replace any occurrences of ">" in markup by ">". - * 6. Return the value of markup. - */ - var markup = ""; - if (noDoubleEncoding) { - markup = node.data.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&') - .replace(//g, '>'); - } - else { - for (var i = 0; i < node.data.length; i++) { - var c = node.data[i]; - if (c === "&") - markup += "&"; - else if (c === "<") - markup += "<"; - else if (c === ">") - markup += ">"; - else - markup += c; - } - } - this.text(markup); - }; + getHttpRequestBody() { + return this.batchRequest.getHttpRequestBody(); + } /** - * Produces an XML serialization of a document fragment node. - * - * @param node - node to serialize - * @param namespace - context namespace - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param requireWellFormed - whether to check conformance + * Get sub requests that are added into the batch request. */ - BaseWriter.prototype._serializeDocumentFragmentNS = function (node, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding) { - var e_6, _a; + getSubRequests() { + return this.batchRequest.getSubRequests(); + } + async addSubRequestInternal(subRequest, assembleSubRequestFunc) { + await Mutex_js_1.Mutex.lock(this.batch); try { - /** - * 1. Let markup the empty string. - * 2. For each child child of node, in tree order, run the XML serialization - * algorithm on the child given namespace, prefix map, a reference to prefix - * index, and flag require well-formed. Concatenate the result to markup. - * 3. Return the value of markup. - */ - for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - this._serializeNodeNS(childNode, namespace, prefixMap, prefixIndex, requireWellFormed, noDoubleEncoding); - } + this.batchRequest.preAddSubRequest(subRequest); + await assembleSubRequestFunc(); + this.batchRequest.postAddSubRequest(subRequest); } - catch (e_6_1) { e_6 = { error: e_6_1 }; } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_6) throw e_6.error; } - } - }; - /** - * Produces an XML serialization of a document fragment node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeDocumentFragment = function (node, requireWellFormed, noDoubleEncoding) { - var e_7, _a; - try { - /** - * 1. Let markup the empty string. - * 2. For each child child of node, in tree order, run the XML serialization - * algorithm on the child given namespace, prefix map, a reference to prefix - * index, and flag require well-formed. Concatenate the result to markup. - * 3. Return the value of markup. - */ - for (var _b = __values(node._children), _c = _b.next(); !_c.done; _c = _b.next()) { - var childNode = _c.value; - this._serializeNode(childNode, requireWellFormed, noDoubleEncoding); - } + await Mutex_js_1.Mutex.unlock(this.batch); } - catch (e_7_1) { e_7 = { error: e_7_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_7) throw e_7.error; } + } + setBatchType(batchType) { + if (!this.batchType) { + this.batchType = batchType; } - }; - /** - * Produces an XML serialization of a document type node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeDocumentType = function (node, requireWellFormed, noDoubleEncoding) { - /** - * 1. If the require well-formed flag is true and the node's publicId - * attribute contains characters that are not matched by the XML PubidChar - * production, then throw an exception; the serialization of this node - * would not be a well-formed document type declaration. - */ - if (requireWellFormed && !algorithm_1.xml_isPubidChar(node.publicId)) { - throw new Error("DocType public identifier does not match PubidChar construct (well-formed required)."); + if (this.batchType !== batchType) { + throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`); } - /** - * 2. If the require well-formed flag is true and the node's systemId - * attribute contains characters that are not matched by the XML Char - * production or that contains both a """ (U+0022 QUOTATION MARK) and a - * "'" (U+0027 APOSTROPHE), then throw an exception; the serialization - * of this node would not be a well-formed document type declaration. - */ - if (requireWellFormed && - (!algorithm_1.xml_isLegalChar(node.systemId) || - (node.systemId.indexOf('"') !== -1 && node.systemId.indexOf("'") !== -1))) { - throw new Error("DocType system identifier contains invalid characters (well-formed required)."); + } + async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { + let url; + let credential; + if (typeof urlOrBlobClient === "string" && + ((core_util_2.isNodeLike && credentialOrOptions instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrOptions instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrOptions))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrOptions; } - /** - * 3. Let markup be an empty string. - * 4. Append the string "" (U+003E GREATER-THAN SIGN) to markup. - * 11. Return the value of markup. - */ - this.docType(node.name, node.publicId, node.systemId); - }; - /** - * Produces an XML serialization of a processing instruction node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeProcessingInstruction = function (node, requireWellFormed, noDoubleEncoding) { - /** - * 1. If the require well-formed flag is set (its value is true), and node's - * target contains a ":" (U+003A COLON) character or is an ASCII - * case-insensitive match for the string "xml", then throw an exception; - * the serialization of this node's target would not be well-formed. - */ - if (requireWellFormed && (node.target.indexOf(":") !== -1 || (/^xml$/i).test(node.target))) { - throw new Error("Processing instruction target contains invalid characters (well-formed required)."); + else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + options = credentialOrOptions; } - /** - * 2. If the require well-formed flag is set (its value is true), and node's - * data contains characters that are not matched by the XML Char production - * or contains the string "?>" (U+003F QUESTION MARK, - * U+003E GREATER-THAN SIGN), then throw an exception; the serialization of - * this node's data would not be well-formed. - */ - if (requireWellFormed && (!algorithm_1.xml_isLegalChar(node.data) || - node.data.indexOf("?>") !== -1)) { - throw new Error("Processing instruction data contains invalid characters (well-formed required)."); + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); } - /** - * 3. Let markup be the concatenation of the following, in the order listed: - * 3.1. "" (U+003F QUESTION MARK, U+003E GREATER-THAN SIGN). - * 4. Return the value of markup. - */ - this.instruction(node.target, node.data); - }; - /** - * Produces an XML serialization of a CDATA node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeCData = function (node, requireWellFormed, noDoubleEncoding) { - if (requireWellFormed && (node.data.indexOf("]]>") !== -1)) { - throw new Error("CDATA contains invalid characters (well-formed required)."); + if (!options) { + options = {}; } - this.cdata(node.data); - }; - /** - * Produces an XML serialization of the attributes of an element node. - * - * @param node - node to serialize - * @param map - namespace prefix map - * @param prefixIndex - generated namespace prefix index - * @param localPrefixesMap - local prefixes map - * @param ignoreNamespaceDefinitionAttribute - whether to ignore namespace - * attributes - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeAttributesNS = function (node, map, prefixIndex, localPrefixesMap, ignoreNamespaceDefinitionAttribute, requireWellFormed, noDoubleEncoding) { - var e_8, _a; - /** - * 1. Let result be the empty string. - * 2. Let localname set be a new empty namespace localname set. This - * localname set will contain tuples of unique attribute namespaceURI and - * localName pairs, and is populated as each attr is processed. This set is - * used to [optionally] enforce the well-formed constraint that an element - * cannot have two attributes with the same namespaceURI and localName. - * This can occur when two otherwise identical attributes on the same - * element differ only by their prefix values. - */ - var result = []; - var localNameSet = requireWellFormed ? new LocalNameSet_1.LocalNameSet() : undefined; - try { - /** - * 3. Loop: For each attribute attr in element's attributes, in the order - * they are specified in the element's attribute list: - */ - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - // Optimize common case - if (!requireWellFormed && !ignoreNamespaceDefinitionAttribute && attr.namespaceURI === null) { - result.push([null, null, attr.localName, - this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); - continue; - } - /** - * 3.1. If the require well-formed flag is set (its value is true), and the - * localname set contains a tuple whose values match those of a new tuple - * consisting of attr's namespaceURI attribute and localName attribute, - * then throw an exception; the serialization of this attr would fail to - * produce a well-formed element serialization. - */ - if (requireWellFormed && localNameSet && localNameSet.has(attr.namespaceURI, attr.localName)) { - throw new Error("Element contains duplicate attributes (well-formed required)."); - } - /** - * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and - * localName attribute, and add it to the localname set. - * 3.3. Let attribute namespace be the value of attr's namespaceURI value. - * 3.4. Let candidate prefix be null. - */ - if (requireWellFormed && localNameSet) - localNameSet.set(attr.namespaceURI, attr.localName); - var attributeNamespace = attr.namespaceURI; - var candidatePrefix = null; - /** 3.5. If attribute namespace is not null, then run these sub-steps: */ - if (attributeNamespace !== null) { - /** - * 3.5.1. Let candidate prefix be the result of retrieving a preferred - * prefix string from map given namespace attribute namespace with - * preferred prefix being attr's prefix value. - */ - candidatePrefix = map.get(attr.prefix, attributeNamespace); - /** - * 3.5.2. If the value of attribute namespace is the XMLNS namespace, - * then run these steps: - */ - if (attributeNamespace === infra_1.namespace.XMLNS) { - /** - * 3.5.2.1. If any of the following are true, then stop running these - * steps and goto Loop to visit the next attribute: - * - the attr's value is the XML namespace; - * _Note:_ The XML namespace cannot be redeclared and survive - * round-tripping (unless it defines the prefix "xml"). To avoid this - * problem, this algorithm always prefixes elements in the XML - * namespace with "xml" and drops any related definitions as seen - * in the above condition. - * - the attr's prefix is null and the ignore namespace definition - * attribute flag is true (the Element's default namespace attribute - * should be skipped); - * - the attr's prefix is not null and either - * * the attr's localName is not a key contained in the local - * prefixes map, or - * * the attr's localName is present in the local prefixes map but - * the value of the key does not match attr's value - * and furthermore that the attr's localName (as the prefix to find) - * is found in the namespace prefix map given the namespace consisting - * of the attr's value (the current namespace prefix definition was - * exactly defined previously--on an ancestor element not the current - * element whose attributes are being processed). - */ - if (attr.value === infra_1.namespace.XML || - (attr.prefix === null && ignoreNamespaceDefinitionAttribute) || - (attr.prefix !== null && (!(attr.localName in localPrefixesMap) || - localPrefixesMap[attr.localName] !== attr.value) && - map.has(attr.localName, attr.value))) - continue; - /** - * 3.5.2.2. If the require well-formed flag is set (its value is true), - * and the value of attr's value attribute matches the XMLNS - * namespace, then throw an exception; the serialization of this - * attribute would produce invalid XML because the XMLNS namespace - * is reserved and cannot be applied as an element's namespace via - * XML parsing. - * - * _Note:_ DOM APIs do allow creation of elements in the XMLNS - * namespace but with strict qualifications. - */ - if (requireWellFormed && attr.value === infra_1.namespace.XMLNS) { - throw new Error("XMLNS namespace is reserved (well-formed required)."); - } - /** - * 3.5.2.3. If the require well-formed flag is set (its value is true), - * and the value of attr's value attribute is the empty string, then - * throw an exception; namespace prefix declarations cannot be used - * to undeclare a namespace (use a default namespace declaration - * instead). - */ - if (requireWellFormed && attr.value === '') { - throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."); - } - /** - * 3.5.2.4. the attr's prefix matches the string "xmlns", then let - * candidate prefix be the string "xmlns". - */ - if (attr.prefix === 'xmlns') - candidatePrefix = 'xmlns'; - /** - * 3.5.3. Otherwise, the attribute namespace is not the XMLNS namespace. - * Run these steps: - * - * _Note:_ The (candidatePrefix === null) check is not in the spec. - * We deviate from the spec here. Otherwise a prefix is generated for - * all attributes with namespaces. - */ - } - else if (candidatePrefix === null) { - if (attr.prefix !== null && - (!map.hasPrefix(attr.prefix) || - map.has(attr.prefix, attributeNamespace))) { - /** - * Check if we can use the attribute's own prefix. - * We deviate from the spec here. - * TODO: This is not an efficient way of searching for prefixes. - * Follow developments to the spec. - */ - candidatePrefix = attr.prefix; - } - else { - /** - * 3.5.3.1. Let candidate prefix be the result of generating a prefix - * providing map, attribute namespace, and prefix index as input. - */ - candidatePrefix = this._generatePrefix(attributeNamespace, map, prefixIndex); - } - /** - * 3.5.3.2. Append the following to result, in the order listed: - * 3.5.3.2.1. " " (U+0020 SPACE); - * 3.5.3.2.2. The string "xmlns:"; - * 3.5.3.2.3. The value of candidate prefix; - * 3.5.3.2.4. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 3.5.3.2.5. The result of serializing an attribute value given - * attribute namespace and the require well-formed flag as input; - * 3.5.3.2.6. """ (U+0022 QUOTATION MARK). - */ - result.push([null, "xmlns", candidatePrefix, - this._serializeAttributeValue(attributeNamespace, requireWellFormed, noDoubleEncoding)]); - } - } - /** - * 3.6. Append a " " (U+0020 SPACE) to result. - * 3.7. If candidate prefix is not null, then append to result the - * concatenation of candidate prefix with ":" (U+003A COLON). - */ - var attrName = ''; - if (candidatePrefix !== null) { - attrName = candidatePrefix; - } - /** - * 3.8. If the require well-formed flag is set (its value is true), and - * this attr's localName attribute contains the character - * ":" (U+003A COLON) or does not match the XML Name production or - * equals "xmlns" and attribute namespace is null, then throw an - * exception; the serialization of this attr would not be a - * well-formed attribute. - */ - if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(attr.localName) || - (attr.localName === "xmlns" && attributeNamespace === null))) { - throw new Error("Attribute local name contains invalid characters (well-formed required)."); - } - /** - * 3.9. Append the following strings to result, in the order listed: - * 3.9.1. The value of attr's localName; - * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 3.9.3. The result of serializing an attribute value given attr's value - * attribute and the require well-formed flag as input; - * 3.9.4. """ (U+0022 QUOTATION MARK). - */ - result.push([attributeNamespace, candidatePrefix, attr.localName, - this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); - } + return tracing_js_1.tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("delete"); + await this.addSubRequestInternal({ + url: url, + credential: credential, + }, async () => { + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + }); + }); + } + async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { + let url; + let credential; + let tier; + if (typeof urlOrBlobClient === "string" && + ((core_util_2.isNodeLike && credentialOrTier instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrTier instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrTier))) { + // First overload + url = urlOrBlobClient; + credential = credentialOrTier; + tier = tierOrOptions; } - catch (e_8_1) { e_8 = { error: e_8_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_8) throw e_8.error; } + else if (urlOrBlobClient instanceof Clients_js_1.BlobClient) { + // Second overload + url = urlOrBlobClient.url; + credential = urlOrBlobClient.credential; + tier = credentialOrTier; + options = tierOrOptions; } - /** - * 4. Return the value of result. - */ - return result; - }; - /** - * Produces an XML serialization of the attributes of an element node. - * - * @param node - node to serialize - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeAttributes = function (node, requireWellFormed, noDoubleEncoding) { - var e_9, _a; - /** - * 1. Let result be the empty string. - * 2. Let localname set be a new empty namespace localname set. This - * localname set will contain tuples of unique attribute namespaceURI and - * localName pairs, and is populated as each attr is processed. This set is - * used to [optionally] enforce the well-formed constraint that an element - * cannot have two attributes with the same namespaceURI and localName. - * This can occur when two otherwise identical attributes on the same - * element differ only by their prefix values. - */ - var result = []; - var localNameSet = requireWellFormed ? {} : undefined; - try { - /** - * 3. Loop: For each attribute attr in element's attributes, in the order - * they are specified in the element's attribute list: - */ - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - // Optimize common case - if (!requireWellFormed) { - result.push([null, null, attr.localName, - this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); - continue; - } - /** - * 3.1. If the require well-formed flag is set (its value is true), and the - * localname set contains a tuple whose values match those of a new tuple - * consisting of attr's namespaceURI attribute and localName attribute, - * then throw an exception; the serialization of this attr would fail to - * produce a well-formed element serialization. - */ - if (requireWellFormed && localNameSet && (attr.localName in localNameSet)) { - throw new Error("Element contains duplicate attributes (well-formed required)."); - } - /** - * 3.2. Create a new tuple consisting of attr's namespaceURI attribute and - * localName attribute, and add it to the localname set. - * 3.3. Let attribute namespace be the value of attr's namespaceURI value. - * 3.4. Let candidate prefix be null. - */ - /* istanbul ignore else */ - if (requireWellFormed && localNameSet) - localNameSet[attr.localName] = true; - /** 3.5. If attribute namespace is not null, then run these sub-steps: */ - /** - * 3.6. Append a " " (U+0020 SPACE) to result. - * 3.7. If candidate prefix is not null, then append to result the - * concatenation of candidate prefix with ":" (U+003A COLON). - */ - /** - * 3.8. If the require well-formed flag is set (its value is true), and - * this attr's localName attribute contains the character - * ":" (U+003A COLON) or does not match the XML Name production or - * equals "xmlns" and attribute namespace is null, then throw an - * exception; the serialization of this attr would not be a - * well-formed attribute. - */ - if (requireWellFormed && (attr.localName.indexOf(":") !== -1 || - !algorithm_1.xml_isName(attr.localName))) { - throw new Error("Attribute local name contains invalid characters (well-formed required)."); - } - /** - * 3.9. Append the following strings to result, in the order listed: - * 3.9.1. The value of attr's localName; - * 3.9.2. "="" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK); - * 3.9.3. The result of serializing an attribute value given attr's value - * attribute and the require well-formed flag as input; - * 3.9.4. """ (U+0022 QUOTATION MARK). - */ - result.push([null, null, attr.localName, - this._serializeAttributeValue(attr.value, requireWellFormed, noDoubleEncoding)]); - } + else { + throw new RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided."); } - catch (e_9_1) { e_9 = { error: e_9_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_9) throw e_9.error; } + if (!options) { + options = {}; } - /** - * 4. Return the value of result. - */ - return result; - }; + return tracing_js_1.tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { + this.setBatchType("setAccessTier"); + await this.addSubRequestInternal({ + url: url, + credential: credential, + }, async () => { + await new Clients_js_1.BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions); + }); + }); + } +} +exports.BlobBatch = BlobBatch; +/** + * Inner batch request class which is responsible for assembling and serializing sub requests. + * See https://learn.microsoft.com/rest/api/storageservices/blob-batch#request-body for how requests are assembled. + */ +class InnerBatchRequest { + operationCount; + body; + subRequests; + boundary; + subRequestPrefix; + multipartContentType; + batchRequestEnding; + constructor() { + this.operationCount = 0; + this.body = ""; + const tempGuid = (0, core_util_1.randomUUID)(); + // batch_{batchid} + this.boundary = `batch_${tempGuid}`; + // --batch_{batchid} + // Content-Type: application/http + // Content-Transfer-Encoding: binary + this.subRequestPrefix = `--${this.boundary}${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TYPE}: application/http${constants_js_1.HTTP_LINE_ENDING}${constants_js_1.HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`; + // multipart/mixed; boundary=batch_{batchid} + this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`; + // --batch_{batchid}-- + this.batchRequestEnding = `--${this.boundary}--`; + this.subRequests = new Map(); + } /** - * Records namespace information for the given element and returns the - * default namespace attribute value. - * - * @param node - element node to process - * @param map - namespace prefix map - * @param localPrefixesMap - local prefixes map - */ - BaseWriter.prototype._recordNamespaceInformation = function (node, map, localPrefixesMap) { - var e_10, _a; - /** - * 1. Let default namespace attr value be null. - */ - var defaultNamespaceAttrValue = null; - try { - /** - * 2. Main: For each attribute attr in element's attributes, in the order - * they are specified in the element's attribute list: - */ - for (var _b = __values(node.attributes), _c = _b.next(); !_c.done; _c = _b.next()) { - var attr = _c.value; - /** - * _Note:_ The following conditional steps find namespace prefixes. Only - * attributes in the XMLNS namespace are considered (e.g., attributes made - * to look like namespace declarations via - * setAttribute("xmlns:pretend-prefix", "pretend-namespace") are not - * included). - */ - /** 2.1. Let attribute namespace be the value of attr's namespaceURI value. */ - var attributeNamespace = attr.namespaceURI; - /** 2.2. Let attribute prefix be the value of attr's prefix. */ - var attributePrefix = attr.prefix; - /** 2.3. If the attribute namespace is the XMLNS namespace, then: */ - if (attributeNamespace === infra_1.namespace.XMLNS) { - /** - * 2.3.1. If attribute prefix is null, then attr is a default namespace - * declaration. Set the default namespace attr value to attr's value and - * stop running these steps, returning to Main to visit the next - * attribute. - */ - if (attributePrefix === null) { - defaultNamespaceAttrValue = attr.value; - continue; - /** - * 2.3.2. Otherwise, the attribute prefix is not null and attr is a - * namespace prefix definition. Run the following steps: - */ - } - else { - /** 2.3.2.1. Let prefix definition be the value of attr's localName. */ - var prefixDefinition = attr.localName; - /** 2.3.2.2. Let namespace definition be the value of attr's value. */ - var namespaceDefinition = attr.value; - /** - * 2.3.2.3. If namespace definition is the XML namespace, then stop - * running these steps, and return to Main to visit the next - * attribute. - * - * _Note:_ XML namespace definitions in prefixes are completely - * ignored (in order to avoid unnecessary work when there might be - * prefix conflicts). XML namespaced elements are always handled - * uniformly by prefixing (and overriding if necessary) the element's - * localname with the reserved "xml" prefix. - */ - if (namespaceDefinition === infra_1.namespace.XML) { - continue; - } - /** - * 2.3.2.4. If namespace definition is the empty string (the - * declarative form of having no namespace), then let namespace - * definition be null instead. - */ - if (namespaceDefinition === '') { - namespaceDefinition = null; - } - /** - * 2.3.2.5. If prefix definition is found in map given the namespace - * namespace definition, then stop running these steps, and return to - * Main to visit the next attribute. - * - * _Note:_ This step avoids adding duplicate prefix definitions for - * the same namespace in the map. This has the side-effect of avoiding - * later serialization of duplicate namespace prefix declarations in - * any descendant nodes. - */ - if (map.has(prefixDefinition, namespaceDefinition)) { - continue; - } - /** - * 2.3.2.6. Add the prefix prefix definition to map given namespace - * namespace definition. - */ - map.set(prefixDefinition, namespaceDefinition); - /** - * 2.3.2.7. Add the value of prefix definition as a new key to the - * local prefixes map, with the namespace definition as the key's - * value replacing the value of null with the empty string if - * applicable. - */ - localPrefixesMap[prefixDefinition] = namespaceDefinition || ''; - } - } - } + * Create pipeline to assemble sub requests. The idea here is to use existing + * credential and serialization/deserialization components, with additional policies to + * filter unnecessary headers, assemble sub requests into request's body + * and intercept request from going to wire. + * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + createPipeline(credential) { + const corePipeline = (0, core_rest_pipeline_1.createEmptyPipeline)(); + corePipeline.addPolicy((0, core_client_1.serializationPolicy)({ + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + xmlCharKey: "#", + }, + }, + }), { phase: "Serialize" }); + // Use batch header filter policy to exclude unnecessary headers + corePipeline.addPolicy(batchHeaderFilterPolicy()); + // Use batch assemble policy to assemble request and intercept request from going to wire + corePipeline.addPolicy(batchRequestAssemblePolicy(this), { afterPhase: "Sign" }); + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential, + scopes: constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge }, + }), { phase: "Sign" }); } - catch (e_10_1) { e_10 = { error: e_10_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_10) throw e_10.error; } + else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ + accountName: credential.accountName, + accountKey: credential.accountKey, + }), { phase: "Sign" }); } - /** - * 3. Return the value of default namespace attr value. - * - * _Note:_ The empty string is a legitimate return value and is not - * converted to null. - */ - return defaultNamespaceAttrValue; - }; - /** - * Generates a new prefix for the given namespace. - * - * @param newNamespace - a namespace to generate prefix for - * @param prefixMap - namespace prefix map - * @param prefixIndex - generated namespace prefix index - */ - BaseWriter.prototype._generatePrefix = function (newNamespace, prefixMap, prefixIndex) { - /** - * 1. Let generated prefix be the concatenation of the string "ns" and the - * current numerical value of prefix index. - * 2. Let the value of prefix index be incremented by one. - * 3. Add to map the generated prefix given the new namespace namespace. - * 4. Return the value of generated prefix. - */ - var generatedPrefix = "ns" + prefixIndex.value.toString(); - prefixIndex.value++; - prefixMap.set(generatedPrefix, newNamespace); - return generatedPrefix; - }; - /** - * Produces an XML serialization of an attribute value. - * - * @param value - attribute value - * @param requireWellFormed - whether to check conformance - */ - BaseWriter.prototype._serializeAttributeValue = function (value, requireWellFormed, noDoubleEncoding) { - /** - * From: https://w3c.github.io/DOM-Parsing/#dfn-serializing-an-attribute-value - * - * 1. If the require well-formed flag is set (its value is true), and - * attribute value contains characters that are not matched by the XML Char - * production, then throw an exception; the serialization of this attribute - * value would fail to produce a well-formed element serialization. - */ - if (requireWellFormed && value !== null && !algorithm_1.xml_isLegalChar(value)) { - throw new Error("Invalid characters in attribute value."); + const pipeline = new Pipeline_js_1.Pipeline([]); + // attach the v2 pipeline to this one + pipeline._credential = credential; + pipeline._corePipeline = corePipeline; + return pipeline; + } + appendSubRequestToBody(request) { + // Start to assemble sub request + this.body += [ + this.subRequestPrefix, // sub request constant prefix + `${constants_js_1.HeaderConstants.CONTENT_ID}: ${this.operationCount}`, // sub request's content ID + "", // empty line after sub request's content ID + `${request.method.toString()} ${(0, utils_common_js_1.getURLPathAndQuery)(request.url)} ${constants_js_1.HTTP_VERSION_1_1}${constants_js_1.HTTP_LINE_ENDING}`, // sub request start line with method + ].join(constants_js_1.HTTP_LINE_ENDING); + for (const [name, value] of request.headers) { + this.body += `${name}: ${value}${constants_js_1.HTTP_LINE_ENDING}`; } - /** - * 2. If attribute value is null, then return the empty string. - */ - if (value === null) - return ""; - /** - * 3. Otherwise, attribute value is a string. Return the value of attribute - * value, first replacing any occurrences of the following: - * - "&" with "&" - * - """ with """ - * - "<" with "<" - * - ">" with ">" - * NOTE - * This matches behavior present in browsers, and goes above and beyond the - * grammar requirement in the XML specification's AttValue production by - * also replacing ">" characters. - */ - if (noDoubleEncoding) { - return value.replace(/(?!&(lt|gt|amp|apos|quot);)&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); + this.body += constants_js_1.HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line + // No body to assemble for current batch request support + // End to assemble sub request + } + preAddSubRequest(subRequest) { + if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { + throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); + } + // Fast fail if url for sub request is invalid + const path = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path || path === "") { + throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } - else { - var result = ""; - for (var i = 0; i < value.length; i++) { - var c = value[i]; - if (c === "\"") - result += """; - else if (c === "&") - result += "&"; - else if (c === "<") - result += "<"; - else if (c === ">") - result += ">"; - else - result += c; + } + postAddSubRequest(subRequest) { + this.subRequests.set(this.operationCount, subRequest); + this.operationCount++; + } + // Return the http request body with assembling the ending line to the sub request body. + getHttpRequestBody() { + return `${this.body}${this.batchRequestEnding}${constants_js_1.HTTP_LINE_ENDING}`; + } + getMultipartContentType() { + return this.multipartContentType; + } + getSubRequests() { + return this.subRequests; + } +} +function batchRequestAssemblePolicy(batchRequest) { + return { + name: "batchRequestAssemblePolicy", + async sendRequest(request) { + batchRequest.appendSubRequestToBody(request); + return { + request, + status: 200, + headers: (0, core_rest_pipeline_1.createHttpHeaders)(), + }; + }, + }; +} +function batchHeaderFilterPolicy() { + return { + name: "batchHeaderFilterPolicy", + async sendRequest(request, next) { + let xMsHeaderName = ""; + for (const [name] of request.headers) { + if ((0, utils_common_js_1.iEqual)(name, constants_js_1.HeaderConstants.X_MS_VERSION)) { + xMsHeaderName = name; + } } - return result; - } + if (xMsHeaderName !== "") { + request.headers.delete(xMsHeaderName); // The subrequests should not have the x-ms-version header. + } + return next(request); + }, }; - BaseWriter._VoidElementNames = new Set(['area', 'base', 'basefont', - 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', - 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr']); - return BaseWriter; -}()); -exports.BaseWriter = BaseWriter; -//# sourceMappingURL=BaseWriter.js.map +} +//# sourceMappingURL=BlobBatch.js.map /***/ }), -/***/ 37525: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 71861: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var BaseCBWriter_1 = __nccwpck_require__(50708); +exports.BlobBatchClient = void 0; +const BatchResponseParser_js_1 = __nccwpck_require__(58259); +const BatchUtils_js_1 = __nccwpck_require__(4982); +const BlobBatch_js_1 = __nccwpck_require__(73689); +const tracing_js_1 = __nccwpck_require__(53683); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const StorageContextClient_js_1 = __nccwpck_require__(50557); +const Pipeline_js_1 = __nccwpck_require__(33781); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * Serializes XML nodes. + * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch */ -var JSONCBWriter = /** @class */ (function (_super) { - __extends(JSONCBWriter, _super); - /** - * Initializes a new instance of `JSONCBWriter`. - * - * @param builderOptions - XML builder options - */ - function JSONCBWriter(builderOptions) { - var _this = _super.call(this, builderOptions) || this; - _this._hasChildren = []; - _this._additionalLevel = 0; - return _this; - } - /** @inheritdoc */ - JSONCBWriter.prototype.frontMatter = function () { - return ""; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.declaration = function (version, encoding, standalone) { - return ""; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.docType = function (name, publicId, systemId) { - return ""; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.comment = function (data) { - // { "!": "hello" } - return this._comma() + this._beginLine() + "{" + this._sep() + - this._key(this._builderOptions.convert.comment) + this._sep() + - this._val(data) + this._sep() + "}"; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.text = function (data) { - // { "#": "hello" } - return this._comma() + this._beginLine() + "{" + this._sep() + - this._key(this._builderOptions.convert.text) + this._sep() + - this._val(data) + this._sep() + "}"; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.instruction = function (target, data) { - // { "?": "target hello" } - return this._comma() + this._beginLine() + "{" + this._sep() + - this._key(this._builderOptions.convert.ins) + this._sep() + - this._val(data ? target + " " + data : target) + this._sep() + "}"; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.cdata = function (data) { - // { "$": "hello" } - return this._comma() + this._beginLine() + "{" + this._sep() + - this._key(this._builderOptions.convert.cdata) + this._sep() + - this._val(data) + this._sep() + "}"; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.attribute = function (name, value) { - // { "@name": "val" } - return this._comma() + this._beginLine(1) + "{" + this._sep() + - this._key(this._builderOptions.convert.att + name) + this._sep() + - this._val(value) + this._sep() + "}"; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.openTagBegin = function (name) { - // { "node": { "#": [ - var str = this._comma() + this._beginLine() + "{" + this._sep() + this._key(name) + this._sep() + "{"; - this._additionalLevel++; - this.hasData = true; - str += this._beginLine() + this._key(this._builderOptions.convert.text) + this._sep() + "["; - this._hasChildren.push(false); - return str; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { - if (selfClosing) { - var str = this._sep() + "]"; - this._additionalLevel--; - str += this._beginLine() + "}" + this._sep() + "}"; - return str; +class BlobBatchClient { + serviceOrContainerContext; + constructor(url, credentialOrPipeline, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + let pipeline; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { + pipeline = credentialOrPipeline; + } + else if (!credentialOrPipeline) { + // no credential provided + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } else { - return ""; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } - }; - /** @inheritdoc */ - JSONCBWriter.prototype.closeTag = function (name) { - // ] } } - var str = this._beginLine() + "]"; - this._additionalLevel--; - str += this._beginLine() + "}" + this._sep() + "}"; - return str; - }; - /** @inheritdoc */ - JSONCBWriter.prototype.beginElement = function (name) { }; - /** @inheritdoc */ - JSONCBWriter.prototype.endElement = function (name) { this._hasChildren.pop(); }; - /** - * Produces characters to be prepended to a line of string in pretty-print - * mode. - */ - JSONCBWriter.prototype._beginLine = function (additionalOffset) { - if (additionalOffset === void 0) { additionalOffset = 0; } - if (this._writerOptions.prettyPrint) { - return (this.hasData ? this._writerOptions.newline : "") + - this._indent(this._writerOptions.offset + this.level + additionalOffset); + const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + const path = (0, utils_common_js_1.getURLPath)(url); + if (path && path !== "/") { + // Container scoped. + this.serviceOrContainerContext = storageClientContext.container; } else { - return ""; + this.serviceOrContainerContext = storageClientContext.service; } - }; + } /** - * Produces an indentation string. - * - * @param level - depth of the tree + * Creates a {@link BlobBatch}. + * A BlobBatch represents an aggregated set of operations on blobs. */ - JSONCBWriter.prototype._indent = function (level) { - if (level + this._additionalLevel <= 0) { - return ""; + createBatch() { + return new BlobBatch_js_1.BlobBatch(); + } + async deleteBlobs(urlsOrBlobClients, credentialOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + const batch = new BlobBatch_js_1.BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) { + if (typeof urlOrBlobClient === "string") { + await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options); + } + else { + await batch.deleteBlob(urlOrBlobClient, credentialOrOptions); + } } - else { - return this._writerOptions.indent.repeat(level + this._additionalLevel); + return this.submitBatch(batch); + } + async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + const batch = new BlobBatch_js_1.BlobBatch(); + for (const urlOrBlobClient of urlsOrBlobClients) { + if (typeof urlOrBlobClient === "string") { + await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options); + } + else { + await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions); + } } - }; + return this.submitBatch(batch); + } /** - * Produces a comma before a child node if it has previous siblings. + * Submit batch request which consists of multiple subrequests. + * + * Get `blobBatchClient` and other details before running the snippets. + * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient` + * + * Example usage: + * + * ```ts snippet:BlobBatchClientSubmitBatch + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.deleteBlob("", credential); + * await batchRequest.deleteBlob("", credential, { + * deleteSnapshots: "include", + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * Example using a lease: + * + * ```ts snippet:BlobBatchClientSubmitBatchWithLease + * import { DefaultAzureCredential } from "@azure/identity"; + * import { BlobServiceClient, BlobBatch } from "@azure/storage-blob"; + * + * const account = ""; + * const credential = new DefaultAzureCredential(); + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * credential, + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobBatchClient = containerClient.getBlobBatchClient(); + * const blobClient = containerClient.getBlobClient(""); + * + * const batchRequest = new BlobBatch(); + * await batchRequest.setBlobAccessTier(blobClient, "Cool"); + * await batchRequest.setBlobAccessTier(blobClient, "Cool", { + * conditions: { leaseId: "" }, + * }); + * const batchResp = await blobBatchClient.submitBatch(batchRequest); + * console.log(batchResp.subResponsesSucceededCount); + * ``` + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @param batchRequest - A set of Delete or SetTier operations. + * @param options - */ - JSONCBWriter.prototype._comma = function () { - var str = (this._hasChildren[this._hasChildren.length - 1] ? "," : ""); - if (this._hasChildren.length > 0) { - this._hasChildren[this._hasChildren.length - 1] = true; + async submitBatch(batchRequest, options = {}) { + if (!batchRequest || batchRequest.getSubRequests().size === 0) { + throw new RangeError("Batch request should contain one or more sub requests."); } - return str; - }; - /** - * Produces a separator string. - */ - JSONCBWriter.prototype._sep = function () { - return (this._writerOptions.prettyPrint ? " " : ""); - }; - /** - * Produces a JSON key string delimited with double quotes. - */ - JSONCBWriter.prototype._key = function (key) { - return "\"" + key + "\":"; - }; - /** - * Produces a JSON value string delimited with double quotes. - */ - JSONCBWriter.prototype._val = function (val) { - return JSON.stringify(val); - }; - return JSONCBWriter; -}(BaseCBWriter_1.BaseCBWriter)); -exports.JSONCBWriter = JSONCBWriter; -//# sourceMappingURL=JSONCBWriter.js.map + return tracing_js_1.tracingClient.withSpan("BlobBatchClient-submitBatch", options, async (updatedOptions) => { + const batchRequestBody = batchRequest.getHttpRequestBody(); + // ServiceSubmitBatchResponseModel and ContainerSubmitBatchResponse are compatible for now. + const rawBatchResponse = (0, utils_common_js_1.assertResponse)(await this.serviceOrContainerContext.submitBatch((0, BatchUtils_js_1.utf8ByteLength)(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, { + ...updatedOptions, + })); + // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202). + const batchResponseParser = new BatchResponseParser_js_1.BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests()); + const responseSummary = await batchResponseParser.parseBatchResponse(); + const res = { + _response: rawBatchResponse._response, + contentType: rawBatchResponse.contentType, + errorCode: rawBatchResponse.errorCode, + requestId: rawBatchResponse.requestId, + clientRequestId: rawBatchResponse.clientRequestId, + version: rawBatchResponse.version, + subResponses: responseSummary.subResponses, + subResponsesSucceededCount: responseSummary.subResponsesSucceededCount, + subResponsesFailedCount: responseSummary.subResponsesFailedCount, + }; + return res; + }); + } +} +exports.BlobBatchClient = BlobBatchClient; +//# sourceMappingURL=BlobBatchClient.js.map /***/ }), -/***/ 37510: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 88710: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var ObjectWriter_1 = __nccwpck_require__(50243); -var util_1 = __nccwpck_require__(76195); -var BaseWriter_1 = __nccwpck_require__(37644); +exports.BlobDownloadResponse = void 0; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const core_util_1 = __nccwpck_require__(80637); +const RetriableReadableStream_js_1 = __nccwpck_require__(88251); /** - * Serializes XML nodes into a JSON string. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will + * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot + * trigger retries defined in pipeline retry policy.) + * + * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js + * Readable stream. */ -var JSONWriter = /** @class */ (function (_super) { - __extends(JSONWriter, _super); +class BlobDownloadResponse { /** - * Initializes a new instance of `JSONWriter`. + * Indicates that the service supports + * requests for partial file content. * - * @param builderOptions - XML builder options - * @param writerOptions - serialization options + * @readonly */ - function JSONWriter(builderOptions, writerOptions) { - var _this = _super.call(this, builderOptions) || this; - // provide default options - _this._writerOptions = util_1.applyDefaults(writerOptions, { - wellFormed: false, - noDoubleEncoding: false, - prettyPrint: false, - indent: ' ', - newline: '\n', - offset: 0, - group: false, - verbose: false - }); - return _this; + get acceptRanges() { + return this.originalResponse.acceptRanges; } /** - * Produces an XML serialization of the given node. + * Returns if it was previously specified + * for the file. * - * @param node - node to serialize - * @param writerOptions - serialization options + * @readonly */ - JSONWriter.prototype.serialize = function (node) { - // convert to object - var objectWriterOptions = util_1.applyDefaults(this._writerOptions, { - format: "object", - wellFormed: false, - noDoubleEncoding: false, - }); - var objectWriter = new ObjectWriter_1.ObjectWriter(this._builderOptions, objectWriterOptions); - var val = objectWriter.serialize(node); - // recursively convert object into JSON string - return this._beginLine(this._writerOptions, 0) + this._convertObject(val, this._writerOptions); - }; + get cacheControl() { + return this.originalResponse.cacheControl; + } /** - * Produces an XML serialization of the given object. + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. * - * @param obj - object to serialize - * @param options - serialization options - * @param level - depth of the XML tree + * @readonly */ - JSONWriter.prototype._convertObject = function (obj, options, level) { - var e_1, _a; - var _this = this; - if (level === void 0) { level = 0; } - var markup = ''; - var isLeaf = this._isLeafNode(obj); - if (util_1.isArray(obj)) { - markup += '['; - var len = obj.length; - var i = 0; - try { - for (var obj_1 = __values(obj), obj_1_1 = obj_1.next(); !obj_1_1.done; obj_1_1 = obj_1.next()) { - var val = obj_1_1.value; - markup += this._endLine(options, level + 1) + - this._beginLine(options, level + 1) + - this._convertObject(val, options, level + 1); - if (i < len - 1) { - markup += ','; - } - i++; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (obj_1_1 && !obj_1_1.done && (_a = obj_1.return)) _a.call(obj_1); - } - finally { if (e_1) throw e_1.error; } - } - markup += this._endLine(options, level) + this._beginLine(options, level); - markup += ']'; - } - else if (util_1.isObject(obj)) { - markup += '{'; - var len_1 = util_1.objectLength(obj); - var i_1 = 0; - util_1.forEachObject(obj, function (key, val) { - if (isLeaf && options.prettyPrint) { - markup += ' '; - } - else { - markup += _this._endLine(options, level + 1) + _this._beginLine(options, level + 1); - } - markup += _this._key(key); - if (options.prettyPrint) { - markup += ' '; - } - markup += _this._convertObject(val, options, level + 1); - if (i_1 < len_1 - 1) { - markup += ','; - } - i_1++; - }, this); - if (isLeaf && options.prettyPrint) { - markup += ' '; - } - else { - markup += this._endLine(options, level) + this._beginLine(options, level); - } - markup += '}'; - } - else { - markup += this._val(obj); - } - return markup; - }; + get contentDisposition() { + return this.originalResponse.contentDisposition; + } /** - * Produces characters to be prepended to a line of string in pretty-print - * mode. + * Returns the value that was specified + * for the Content-Encoding request header. * - * @param options - serialization options - * @param level - current depth of the XML tree + * @readonly */ - JSONWriter.prototype._beginLine = function (options, level) { - if (!options.prettyPrint) { - return ''; - } - else { - var indentLevel = options.offset + level + 1; - if (indentLevel > 0) { - return new Array(indentLevel).join(options.indent); - } - } - return ''; - }; + get contentEncoding() { + return this.originalResponse.contentEncoding; + } /** - * Produces characters to be appended to a line of string in pretty-print - * mode. + * Returns the value that was specified + * for the Content-Language request header. * - * @param options - serialization options - * @param level - current depth of the XML tree + * @readonly */ - JSONWriter.prototype._endLine = function (options, level) { - if (!options.prettyPrint) { - return ''; - } - else { - return options.newline; - } - }; + get contentLanguage() { + return this.originalResponse.contentLanguage; + } /** - * Produces a JSON key string delimited with double quotes. + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly */ - JSONWriter.prototype._key = function (key) { - return "\"" + key + "\":"; - }; + get blobSequenceNumber() { + return this.originalResponse.blobSequenceNumber; + } /** - * Produces a JSON value string delimited with double quotes. + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly */ - JSONWriter.prototype._val = function (val) { - return JSON.stringify(val); - }; + get blobType() { + return this.originalResponse.blobType; + } /** - * Determines if an object is a leaf node. + * The number of bytes present in the + * response body. * - * @param obj + * @readonly */ - JSONWriter.prototype._isLeafNode = function (obj) { - return this._descendantCount(obj) <= 1; - }; + get contentLength() { + return this.originalResponse.contentLength; + } /** - * Counts the number of descendants of the given object. + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. * - * @param obj - * @param count + * @readonly */ - JSONWriter.prototype._descendantCount = function (obj, count) { - var _this = this; - if (count === void 0) { count = 0; } - if (util_1.isArray(obj)) { - util_1.forEachArray(obj, function (val) { return count += _this._descendantCount(val, count); }, this); - } - else if (util_1.isObject(obj)) { - util_1.forEachObject(obj, function (key, val) { return count += _this._descendantCount(val, count); }, this); - } - else { - count++; - } - return count; - }; - return JSONWriter; -}(BaseWriter_1.BaseWriter)); -exports.JSONWriter = JSONWriter; -//# sourceMappingURL=JSONWriter.js.map - -/***/ }), - -/***/ 41397: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -var ObjectWriter_1 = __nccwpck_require__(50243); -var BaseWriter_1 = __nccwpck_require__(37644); -/** - * Serializes XML nodes into ES6 maps and arrays. - */ -var MapWriter = /** @class */ (function (_super) { - __extends(MapWriter, _super); + get contentMD5() { + return this.originalResponse.contentMD5; + } /** - * Initializes a new instance of `MapWriter`. + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. * - * @param builderOptions - XML builder options - * @param writerOptions - serialization options + * @readonly */ - function MapWriter(builderOptions, writerOptions) { - var _this = _super.call(this, builderOptions) || this; - // provide default options - _this._writerOptions = util_1.applyDefaults(writerOptions, { - format: "map", - wellFormed: false, - noDoubleEncoding: false, - group: false, - verbose: false - }); - return _this; + get contentRange() { + return this.originalResponse.contentRange; } /** - * Produces an XML serialization of the given node. + * The content type specified for the file. + * The default content type is 'application/octet-stream' * - * @param node - node to serialize + * @readonly */ - MapWriter.prototype.serialize = function (node) { - // convert to object - var objectWriterOptions = util_1.applyDefaults(this._writerOptions, { - format: "object", - wellFormed: false, - noDoubleEncoding: false, - verbose: false - }); - var objectWriter = new ObjectWriter_1.ObjectWriter(this._builderOptions, objectWriterOptions); - var val = objectWriter.serialize(node); - // recursively convert object into Map - return this._convertObject(val); - }; + get contentType() { + return this.originalResponse.contentType; + } /** - * Recursively converts a JS object into an ES5 map. + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. * - * @param obj - a JS object + * @readonly */ - MapWriter.prototype._convertObject = function (obj) { - if (util_1.isArray(obj)) { - for (var i = 0; i < obj.length; i++) { - obj[i] = this._convertObject(obj[i]); - } - return obj; - } - else if (util_1.isObject(obj)) { - var map = new Map(); - for (var key in obj) { - map.set(key, this._convertObject(obj[key])); - } - return map; - } - else { - return obj; - } - }; - return MapWriter; -}(BaseWriter_1.BaseWriter)); -exports.MapWriter = MapWriter; -//# sourceMappingURL=MapWriter.js.map - -/***/ }), - -/***/ 50243: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -var interfaces_1 = __nccwpck_require__(27305); -var BaseWriter_1 = __nccwpck_require__(37644); -/** - * Serializes XML nodes into objects and arrays. - */ -var ObjectWriter = /** @class */ (function (_super) { - __extends(ObjectWriter, _super); + get copyCompletedOn() { + return this.originalResponse.copyCompletedOn; + } + /** + * String identifier for the last attempted Copy + * File operation where this file was the destination file. + * + * @readonly + */ + get copyId() { + return this.originalResponse.copyId; + } + /** + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. + * + * @readonly + */ + get copyProgress() { + return this.originalResponse.copyProgress; + } + /** + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly + */ + get copySource() { + return this.originalResponse.copySource; + } + /** + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' + * + * @readonly + */ + get copyStatus() { + return this.originalResponse.copyStatus; + } + /** + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly + */ + get copyStatusDescription() { + return this.originalResponse.copyStatusDescription; + } + /** + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly + */ + get leaseDuration() { + return this.originalResponse.leaseDuration; + } + /** + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. + * + * @readonly + */ + get leaseState() { + return this.originalResponse.leaseState; + } + /** + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. + * + * @readonly + */ + get leaseStatus() { + return this.originalResponse.leaseStatus; + } + /** + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. + * + * @readonly + */ + get date() { + return this.originalResponse.date; + } + /** + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. + * + * @readonly + */ + get blobCommittedBlockCount() { + return this.originalResponse.blobCommittedBlockCount; + } + /** + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. + * + * @readonly + */ + get etag() { + return this.originalResponse.etag; + } + /** + * The number of tags associated with the blob + * + * @readonly + */ + get tagCount() { + return this.originalResponse.tagCount; + } + /** + * The error code. + * + * @readonly + */ + get errorCode() { + return this.originalResponse.errorCode; + } + /** + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly + */ + get isServerEncrypted() { + return this.originalResponse.isServerEncrypted; + } + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + */ + get blobContentMD5() { + return this.originalResponse.blobContentMD5; + } + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + */ + get lastModified() { + return this.originalResponse.lastModified; + } + /** + * Returns the UTC date and time generated by the service that indicates the time at which the blob was + * last read or written to. + * + * @readonly + */ + get lastAccessed() { + return this.originalResponse.lastAccessed; + } + /** + * Returns the date and time the blob was created. + * + * @readonly + */ + get createdOn() { + return this.originalResponse.createdOn; + } + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + */ + get metadata() { + return this.originalResponse.metadata; + } + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + */ + get requestId() { + return this.originalResponse.requestId; + } + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + */ + get clientRequestId() { + return this.originalResponse.clientRequestId; + } + /** + * Indicates the version of the Blob service used + * to execute the request. + * + * @readonly + */ + get version() { + return this.originalResponse.version; + } + /** + * Indicates the versionId of the downloaded blob version. + * + * @readonly + */ + get versionId() { + return this.originalResponse.versionId; + } + /** + * Indicates whether version of this blob is a current version. + * + * @readonly + */ + get isCurrentVersion() { + return this.originalResponse.isCurrentVersion; + } + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + */ + get encryptionKeySha256() { + return this.originalResponse.encryptionKeySha256; + } + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + get contentCrc64() { + return this.originalResponse.contentCrc64; + } + /** + * Object Replication Policy Id of the destination blob. + * + * @readonly + */ + get objectReplicationDestinationPolicyId() { + return this.originalResponse.objectReplicationDestinationPolicyId; + } + /** + * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob. + * + * @readonly + */ + get objectReplicationSourceProperties() { + return this.originalResponse.objectReplicationSourceProperties; + } + /** + * If this blob has been sealed. + * + * @readonly + */ + get isSealed() { + return this.originalResponse.isSealed; + } + /** + * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire. + * + * @readonly + */ + get immutabilityPolicyExpiresOn() { + return this.originalResponse.immutabilityPolicyExpiresOn; + } + /** + * Indicates immutability policy mode. + * + * @readonly + */ + get immutabilityPolicyMode() { + return this.originalResponse.immutabilityPolicyMode; + } + /** + * Indicates if a legal hold is present on the blob. + * + * @readonly + */ + get legalHold() { + return this.originalResponse.legalHold; + } /** - * Initializes a new instance of `ObjectWriter`. + * The response body as a browser Blob. + * Always undefined in node.js. * - * @param builderOptions - XML builder options - * @param writerOptions - serialization options + * @readonly */ - function ObjectWriter(builderOptions, writerOptions) { - var _this = _super.call(this, builderOptions) || this; - _this._writerOptions = util_1.applyDefaults(writerOptions, { - format: "object", - wellFormed: false, - noDoubleEncoding: false, - group: false, - verbose: false - }); - return _this; + get contentAsBlob() { + return this.originalResponse.blobBody; } /** - * Produces an XML serialization of the given node. + * The response body as a node.js Readable stream. + * Always undefined in the browser. * - * @param node - node to serialize + * It will automatically retry when internal read stream unexpected ends. + * + * @readonly */ - ObjectWriter.prototype.serialize = function (node) { - this._currentList = []; - this._currentIndex = 0; - this._listRegister = [this._currentList]; - /** - * First pass, serialize nodes - * This creates a list of nodes grouped under node types while preserving - * insertion order. For example: - * [ - * root: [ - * node: [ - * { "@" : { "att1": "val1", "att2": "val2" } - * { "#": "node text" } - * { childNode: [] } - * { "#": "more text" } - * ], - * node: [ - * { "@" : { "att": "val" } - * { "#": [ "text line1", "text line2" ] } - * ] - * ] - * ] - */ - this.serializeNode(node, this._writerOptions.wellFormed, this._writerOptions.noDoubleEncoding); - /** - * Second pass, process node lists. Above example becomes: - * { - * root: { - * node: [ - * { - * "@att1": "val1", - * "@att2": "val2", - * "#1": "node text", - * childNode: {}, - * "#2": "more text" - * }, - * { - * "@att": "val", - * "#": [ "text line1", "text line2" ] - * } - * ] - * } - * } - */ - return this._process(this._currentList, this._writerOptions); - }; - ObjectWriter.prototype._process = function (items, options) { - var _a, _b, _c, _d, _e, _f, _g; - if (items.length === 0) - return {}; - // determine if there are non-unique element names - var namesSeen = {}; - var hasNonUniqueNames = false; - var textCount = 0; - var commentCount = 0; - var instructionCount = 0; - var cdataCount = 0; - for (var i = 0; i < items.length; i++) { - var item = items[i]; - var key = Object.keys(item)[0]; - switch (key) { - case "@": - continue; - case "#": - textCount++; - break; - case "!": - commentCount++; - break; - case "?": - instructionCount++; - break; - case "$": - cdataCount++; - break; - default: - if (namesSeen[key]) { - hasNonUniqueNames = true; - } - else { - namesSeen[key] = true; - } - break; - } - } - var defAttrKey = this._getAttrKey(); - var defTextKey = this._getNodeKey(interfaces_1.NodeType.Text); - var defCommentKey = this._getNodeKey(interfaces_1.NodeType.Comment); - var defInstructionKey = this._getNodeKey(interfaces_1.NodeType.ProcessingInstruction); - var defCdataKey = this._getNodeKey(interfaces_1.NodeType.CData); - if (textCount === 1 && items.length === 1 && util_1.isString(items[0]["#"])) { - // special case of an element node with a single text node - return items[0]["#"]; - } - else if (hasNonUniqueNames) { - var obj = {}; - // process attributes first - for (var i = 0; i < items.length; i++) { - var item = items[i]; - var key = Object.keys(item)[0]; - if (key === "@") { - var attrs = item["@"]; - var attrKeys = Object.keys(attrs); - if (attrKeys.length === 1) { - obj[defAttrKey + attrKeys[0]] = attrs[attrKeys[0]]; - } - else { - obj[defAttrKey] = item["@"]; - } - } - } - // list contains element nodes with non-unique names - // return an array with mixed content notation - var result = []; - for (var i = 0; i < items.length; i++) { - var item = items[i]; - var key = Object.keys(item)[0]; - switch (key) { - case "@": - // attributes were processed above - break; - case "#": - result.push((_a = {}, _a[defTextKey] = item["#"], _a)); - break; - case "!": - result.push((_b = {}, _b[defCommentKey] = item["!"], _b)); - break; - case "?": - result.push((_c = {}, _c[defInstructionKey] = item["?"], _c)); - break; - case "$": - result.push((_d = {}, _d[defCdataKey] = item["$"], _d)); - break; - default: - // element node - var ele = item; - if (ele[key].length !== 0 && util_1.isArray(ele[key][0])) { - // group of element nodes - var eleGroup = []; - var listOfLists = ele[key]; - for (var i_1 = 0; i_1 < listOfLists.length; i_1++) { - eleGroup.push(this._process(listOfLists[i_1], options)); - } - result.push((_e = {}, _e[key] = eleGroup, _e)); - } - else { - // single element node - if (options.verbose) { - result.push((_f = {}, _f[key] = [this._process(ele[key], options)], _f)); - } - else { - result.push((_g = {}, _g[key] = this._process(ele[key], options), _g)); - } - } - break; - } - } - obj[defTextKey] = result; - return obj; - } - else { - // all element nodes have unique names - // return an object while prefixing data node keys - var textId = 1; - var commentId = 1; - var instructionId = 1; - var cdataId = 1; - var obj = {}; - for (var i = 0; i < items.length; i++) { - var item = items[i]; - var key = Object.keys(item)[0]; - switch (key) { - case "@": - var attrs = item["@"]; - var attrKeys = Object.keys(attrs); - if (!options.group || attrKeys.length === 1) { - for (var attrName in attrs) { - obj[defAttrKey + attrName] = attrs[attrName]; - } - } - else { - obj[defAttrKey] = attrs; - } - break; - case "#": - textId = this._processSpecItem(item["#"], obj, options.group, defTextKey, textCount, textId); - break; - case "!": - commentId = this._processSpecItem(item["!"], obj, options.group, defCommentKey, commentCount, commentId); - break; - case "?": - instructionId = this._processSpecItem(item["?"], obj, options.group, defInstructionKey, instructionCount, instructionId); - break; - case "$": - cdataId = this._processSpecItem(item["$"], obj, options.group, defCdataKey, cdataCount, cdataId); - break; - default: - // element node - var ele = item; - if (ele[key].length !== 0 && util_1.isArray(ele[key][0])) { - // group of element nodes - var eleGroup = []; - var listOfLists = ele[key]; - for (var i_2 = 0; i_2 < listOfLists.length; i_2++) { - eleGroup.push(this._process(listOfLists[i_2], options)); - } - obj[key] = eleGroup; - } - else { - // single element node - if (options.verbose) { - obj[key] = [this._process(ele[key], options)]; - } - else { - obj[key] = this._process(ele[key], options); - } - } - break; - } - } - return obj; - } - }; - ObjectWriter.prototype._processSpecItem = function (item, obj, group, defKey, count, id) { - var e_1, _a; - if (!group && util_1.isArray(item) && count + item.length > 2) { - try { - for (var item_1 = __values(item), item_1_1 = item_1.next(); !item_1_1.done; item_1_1 = item_1.next()) { - var subItem = item_1_1.value; - var key = defKey + (id++).toString(); - obj[key] = subItem; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (item_1_1 && !item_1_1.done && (_a = item_1.return)) _a.call(item_1); - } - finally { if (e_1) throw e_1.error; } - } - } - else { - var key = count > 1 ? defKey + (id++).toString() : defKey; - obj[key] = item; - } - return id; - }; - /** @inheritdoc */ - ObjectWriter.prototype.beginElement = function (name) { - var _a, _b; - var childItems = []; - if (this._currentList.length === 0) { - this._currentList.push((_a = {}, _a[name] = childItems, _a)); - } - else { - var lastItem = this._currentList[this._currentList.length - 1]; - if (this._isElementNode(lastItem, name)) { - if (lastItem[name].length !== 0 && util_1.isArray(lastItem[name][0])) { - var listOfLists = lastItem[name]; - listOfLists.push(childItems); - } - else { - lastItem[name] = [lastItem[name], childItems]; - } - } - else { - this._currentList.push((_b = {}, _b[name] = childItems, _b)); - } - } - this._currentIndex++; - if (this._listRegister.length > this._currentIndex) { - this._listRegister[this._currentIndex] = childItems; - } - else { - this._listRegister.push(childItems); - } - this._currentList = childItems; - }; - /** @inheritdoc */ - ObjectWriter.prototype.endElement = function () { - this._currentList = this._listRegister[--this._currentIndex]; - }; - /** @inheritdoc */ - ObjectWriter.prototype.attribute = function (name, value) { - var _a, _b; - if (this._currentList.length === 0) { - this._currentList.push({ "@": (_a = {}, _a[name] = value, _a) }); - } - else { - var lastItem = this._currentList[this._currentList.length - 1]; - /* istanbul ignore else */ - if (this._isAttrNode(lastItem)) { - lastItem["@"][name] = value; - } - else { - this._currentList.push({ "@": (_b = {}, _b[name] = value, _b) }); - } - } - }; - /** @inheritdoc */ - ObjectWriter.prototype.comment = function (data) { - if (this._currentList.length === 0) { - this._currentList.push({ "!": data }); - } - else { - var lastItem = this._currentList[this._currentList.length - 1]; - if (this._isCommentNode(lastItem)) { - if (util_1.isArray(lastItem["!"])) { - lastItem["!"].push(data); - } - else { - lastItem["!"] = [lastItem["!"], data]; - } - } - else { - this._currentList.push({ "!": data }); - } - } - }; - /** @inheritdoc */ - ObjectWriter.prototype.text = function (data) { - if (this._currentList.length === 0) { - this._currentList.push({ "#": data }); - } - else { - var lastItem = this._currentList[this._currentList.length - 1]; - if (this._isTextNode(lastItem)) { - if (util_1.isArray(lastItem["#"])) { - lastItem["#"].push(data); - } - else { - lastItem["#"] = [lastItem["#"], data]; - } - } - else { - this._currentList.push({ "#": data }); - } - } - }; - /** @inheritdoc */ - ObjectWriter.prototype.instruction = function (target, data) { - var value = (data === "" ? target : target + " " + data); - if (this._currentList.length === 0) { - this._currentList.push({ "?": value }); - } - else { - var lastItem = this._currentList[this._currentList.length - 1]; - if (this._isInstructionNode(lastItem)) { - if (util_1.isArray(lastItem["?"])) { - lastItem["?"].push(value); - } - else { - lastItem["?"] = [lastItem["?"], value]; - } - } - else { - this._currentList.push({ "?": value }); - } - } - }; - /** @inheritdoc */ - ObjectWriter.prototype.cdata = function (data) { - if (this._currentList.length === 0) { - this._currentList.push({ "$": data }); - } - else { - var lastItem = this._currentList[this._currentList.length - 1]; - if (this._isCDATANode(lastItem)) { - if (util_1.isArray(lastItem["$"])) { - lastItem["$"].push(data); - } - else { - lastItem["$"] = [lastItem["$"], data]; - } - } - else { - this._currentList.push({ "$": data }); - } - } - }; - ObjectWriter.prototype._isAttrNode = function (x) { - return "@" in x; - }; - ObjectWriter.prototype._isTextNode = function (x) { - return "#" in x; - }; - ObjectWriter.prototype._isCommentNode = function (x) { - return "!" in x; - }; - ObjectWriter.prototype._isInstructionNode = function (x) { - return "?" in x; - }; - ObjectWriter.prototype._isCDATANode = function (x) { - return "$" in x; - }; - ObjectWriter.prototype._isElementNode = function (x, name) { - return name in x; - }; + get readableStreamBody() { + return core_util_1.isNodeLike ? this.blobDownloadStream : undefined; + } /** - * Returns an object key for an attribute or namespace declaration. + * The HTTP response. */ - ObjectWriter.prototype._getAttrKey = function () { - return this._builderOptions.convert.att; - }; + get _response() { + return this.originalResponse._response; + } + originalResponse; + blobDownloadStream; /** - * Returns an object key for the given node type. + * Creates an instance of BlobDownloadResponse. * - * @param nodeType - node type to get a key for + * @param originalResponse - + * @param getter - + * @param offset - + * @param count - + * @param options - */ - ObjectWriter.prototype._getNodeKey = function (nodeType) { - switch (nodeType) { - case interfaces_1.NodeType.Comment: - return this._builderOptions.convert.comment; - case interfaces_1.NodeType.Text: - return this._builderOptions.convert.text; - case interfaces_1.NodeType.ProcessingInstruction: - return this._builderOptions.convert.ins; - case interfaces_1.NodeType.CData: - return this._builderOptions.convert.cdata; - /* istanbul ignore next */ - default: - throw new Error("Invalid node type."); - } - }; - return ObjectWriter; -}(BaseWriter_1.BaseWriter)); -exports.ObjectWriter = ObjectWriter; -//# sourceMappingURL=ObjectWriter.js.map + constructor(originalResponse, getter, offset, count, options = {}) { + this.originalResponse = originalResponse; + this.blobDownloadStream = new RetriableReadableStream_js_1.RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options); + } +} +exports.BlobDownloadResponse = BlobDownloadResponse; +//# sourceMappingURL=BlobDownloadResponse.js.map /***/ }), -/***/ 77572: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 20106: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var BaseCBWriter_1 = __nccwpck_require__(50708); +exports.BlobLeaseClient = void 0; +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); +const tracing_js_1 = __nccwpck_require__(53683); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * Serializes XML nodes. + * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}. */ -var XMLCBWriter = /** @class */ (function (_super) { - __extends(XMLCBWriter, _super); +class BlobLeaseClient { + _leaseId; + _url; + _containerOrBlobOperation; + _isContainer; /** - * Initializes a new instance of `XMLCBWriter`. + * Gets the lease Id. * - * @param builderOptions - XML builder options + * @readonly */ - function XMLCBWriter(builderOptions) { - var _this = _super.call(this, builderOptions) || this; - _this._lineLength = 0; - return _this; + get leaseId() { + return this._leaseId; } - /** @inheritdoc */ - XMLCBWriter.prototype.frontMatter = function () { - return ""; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.declaration = function (version, encoding, standalone) { - var markup = this._beginLine() + ""; - return markup; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.docType = function (name, publicId, systemId) { - var markup = this._beginLine(); - if (publicId && systemId) { - markup += ""; - } - else if (publicId) { - markup += ""; - } - else if (systemId) { - markup += ""; - } - else { - markup += ""; - } - return markup; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.comment = function (data) { - return this._beginLine() + ""; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.text = function (data) { - return this._beginLine() + data; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.instruction = function (target, data) { - if (data) { - return this._beginLine() + ""; - } - else { - return this._beginLine() + ""; - } - }; - /** @inheritdoc */ - XMLCBWriter.prototype.cdata = function (data) { - return this._beginLine() + ""; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.openTagBegin = function (name) { - this._lineLength += 1 + name.length; - return this._beginLine() + "<" + name; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { - if (voidElement) { - return " />"; - } - else if (selfClosing) { - if (this._writerOptions.allowEmptyTags) { - return ">"; - } - else if (this._writerOptions.spaceBeforeSlash) { - return " />"; - } - else { - return "/>"; - } + /** + * Gets the url. + * + * @readonly + */ + get url() { + return this._url; + } + /** + * Creates an instance of BlobLeaseClient. + * @param client - The client to make the lease operation requests. + * @param leaseId - Initial proposed lease id. + */ + constructor(client, leaseId) { + const clientContext = client.storageClientContext; + this._url = client.url; + if (client.name === undefined) { + this._isContainer = true; + this._containerOrBlobOperation = clientContext.container; } else { - return ">"; + this._isContainer = false; + this._containerOrBlobOperation = clientContext.blob; } - }; - /** @inheritdoc */ - XMLCBWriter.prototype.closeTag = function (name) { - return this._beginLine() + ""; - }; - /** @inheritdoc */ - XMLCBWriter.prototype.attribute = function (name, value) { - var str = name + "=\"" + value + "\""; - if (this._writerOptions.prettyPrint && this._writerOptions.width > 0 && - this._lineLength + 1 + str.length > this._writerOptions.width) { - str = this._beginLine() + this._indent(1) + str; - this._lineLength = str.length; - return str; + if (!leaseId) { + leaseId = (0, core_util_1.randomUUID)(); } - else { - this._lineLength += 1 + str.length; - return " " + str; + this._leaseId = leaseId; + } + /** + * Establishes and manages a lock on a container for delete operations, or on a blob + * for write and delete operations. + * The lock duration can be 15 to 60 seconds, or can be infinite. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param duration - Must be between 15 to 60 seconds, or infinite (-1) + * @param options - option to configure lease management operations. + * @returns Response data for acquire lease operation. + */ + async acquireLease(duration, options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - }; - /** @inheritdoc */ - XMLCBWriter.prototype.beginElement = function (name) { }; - /** @inheritdoc */ - XMLCBWriter.prototype.endElement = function (name) { }; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.acquireLease({ + abortSignal: options.abortSignal, + duration, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + proposedLeaseId: this._leaseId, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } /** - * Produces characters to be prepended to a line of string in pretty-print - * mode. + * To change the ID of the lease. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param proposedLeaseId - the proposed new lease Id. + * @param options - option to configure lease management operations. + * @returns Response data for change lease operation. */ - XMLCBWriter.prototype._beginLine = function () { - if (this._writerOptions.prettyPrint) { - var str = (this.hasData ? this._writerOptions.newline : "") + - this._indent(this._writerOptions.offset + this.level); - this._lineLength = str.length; - return str; + async changeLease(proposedLeaseId, options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - else { - return ""; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + this._leaseId = proposedLeaseId; + return response; + }); + } + /** + * To free the lease if it is no longer needed so that another client may + * immediately acquire a lease against the container or the blob. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param options - option to configure lease management operations. + * @returns Response data for release lease operation. + */ + async releaseLease(options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - }; + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.releaseLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } /** - * Produces an indentation string. + * To renew the lease. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob * - * @param level - depth of the tree + * @param options - Optional option to configure lease management operations. + * @returns Response data for renew lease operation. */ - XMLCBWriter.prototype._indent = function (level) { - if (level <= 0) { - return ""; + async renewLease(options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - else { - return this._writerOptions.indent.repeat(level); + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => { + return this._containerOrBlobOperation.renewLease(this._leaseId, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + }); + }); + } + /** + * To end the lease but ensure that another client cannot acquire a new lease + * until the current lease period has expired. + * @see https://learn.microsoft.com/rest/api/storageservices/lease-container + * and + * @see https://learn.microsoft.com/rest/api/storageservices/lease-blob + * + * @param breakPeriod - Break period + * @param options - Optional options to configure lease management operations. + * @returns Response data for break lease operation. + */ + async breakLease(breakPeriod, options = {}) { + if (this._isContainer && + ((options.conditions?.ifMatch && options.conditions?.ifMatch !== constants_js_1.ETagNone) || + (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== constants_js_1.ETagNone) || + options.conditions?.tagConditions)) { + throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable."); } - }; - return XMLCBWriter; -}(BaseCBWriter_1.BaseCBWriter)); -exports.XMLCBWriter = XMLCBWriter; -//# sourceMappingURL=XMLCBWriter.js.map + return tracing_js_1.tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => { + const operationOptions = { + abortSignal: options.abortSignal, + breakPeriod, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + }; + return (0, utils_common_js_1.assertResponse)(await this._containerOrBlobOperation.breakLease(operationOptions)); + }); + } +} +exports.BlobLeaseClient = BlobLeaseClient; +//# sourceMappingURL=BlobLeaseClient.js.map /***/ }), -/***/ 59606: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 83751: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -var util_1 = __nccwpck_require__(76195); -var interfaces_1 = __nccwpck_require__(27305); -var BaseWriter_1 = __nccwpck_require__(37644); -var util_2 = __nccwpck_require__(65282); +exports.BlobQueryResponse = void 0; +const core_util_1 = __nccwpck_require__(80637); +const BlobQuickQueryStream_js_1 = __nccwpck_require__(59028); /** - * Serializes XML nodes into strings. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will + * parse avro data returned by blob query. */ -var XMLWriter = /** @class */ (function (_super) { - __extends(XMLWriter, _super); +class BlobQueryResponse { /** - * Initializes a new instance of `XMLWriter`. + * Indicates that the service supports + * requests for partial file content. * - * @param builderOptions - XML builder options - * @param writerOptions - serialization options + * @readonly */ - function XMLWriter(builderOptions, writerOptions) { - var _this = _super.call(this, builderOptions) || this; - _this._indentation = {}; - _this._lengthToLastNewline = 0; - // provide default options - _this._writerOptions = util_1.applyDefaults(writerOptions, { - wellFormed: false, - noDoubleEncoding: false, - headless: false, - prettyPrint: false, - indent: " ", - newline: "\n", - offset: 0, - width: 0, - allowEmptyTags: false, - indentTextOnlyNodes: false, - spaceBeforeSlash: false - }); - return _this; + get acceptRanges() { + return this.originalResponse.acceptRanges; } /** - * Produces an XML serialization of the given node. + * Returns if it was previously specified + * for the file. * - * @param node - node to serialize + * @readonly */ - XMLWriter.prototype.serialize = function (node) { - this._refs = { suppressPretty: false, emptyNode: false, markup: "" }; - // Serialize XML declaration - if (node.nodeType === interfaces_1.NodeType.Document && !this._writerOptions.headless) { - this.declaration(this._builderOptions.version, this._builderOptions.encoding, this._builderOptions.standalone); - } - // recursively serialize node - this.serializeNode(node, this._writerOptions.wellFormed, this._writerOptions.noDoubleEncoding); - // remove trailing newline - if (this._writerOptions.prettyPrint && - this._refs.markup.slice(-this._writerOptions.newline.length) === this._writerOptions.newline) { - this._refs.markup = this._refs.markup.slice(0, -this._writerOptions.newline.length); - } - return this._refs.markup; - }; - /** @inheritdoc */ - XMLWriter.prototype.declaration = function (version, encoding, standalone) { - this._beginLine(); - this._refs.markup += ""; - this._endLine(); - }; - /** @inheritdoc */ - XMLWriter.prototype.docType = function (name, publicId, systemId) { - this._beginLine(); - if (publicId && systemId) { - this._refs.markup += ""; - } - else if (publicId) { - this._refs.markup += ""; - } - else if (systemId) { - this._refs.markup += ""; - } - else { - this._refs.markup += ""; - } - this._endLine(); - }; - /** @inheritdoc */ - XMLWriter.prototype.openTagBegin = function (name) { - this._beginLine(); - this._refs.markup += "<" + name; - }; - /** @inheritdoc */ - XMLWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { - // do not indent text only elements or elements with empty text nodes - this._refs.suppressPretty = false; - this._refs.emptyNode = false; - if (this._writerOptions.prettyPrint && !selfClosing && !voidElement) { - var textOnlyNode = true; - var emptyNode = true; - var childNode = this.currentNode.firstChild; - var cdataCount = 0; - var textCount = 0; - while (childNode) { - if (util_2.Guard.isExclusiveTextNode(childNode)) { - textCount++; - } - else if (util_2.Guard.isCDATASectionNode(childNode)) { - cdataCount++; - } - else { - textOnlyNode = false; - emptyNode = false; - break; - } - if (childNode.data !== '') { - emptyNode = false; - } - childNode = childNode.nextSibling; - } - this._refs.suppressPretty = !this._writerOptions.indentTextOnlyNodes && textOnlyNode && ((cdataCount <= 1 && textCount === 0) || cdataCount === 0); - this._refs.emptyNode = emptyNode; - } - if ((voidElement || selfClosing || this._refs.emptyNode) && this._writerOptions.allowEmptyTags) { - this._refs.markup += ">"; - } - else { - this._refs.markup += voidElement ? " />" : - (selfClosing || this._refs.emptyNode) ? (this._writerOptions.spaceBeforeSlash ? " />" : "/>") : ">"; - } - this._endLine(); - }; - /** @inheritdoc */ - XMLWriter.prototype.closeTag = function (name) { - if (!this._refs.emptyNode) { - this._beginLine(); - this._refs.markup += ""; - } - this._refs.suppressPretty = false; - this._refs.emptyNode = false; - this._endLine(); - }; - /** @inheritdoc */ - XMLWriter.prototype.attribute = function (name, value) { - var str = name + "=\"" + value + "\""; - if (this._writerOptions.prettyPrint && this._writerOptions.width > 0 && - this._refs.markup.length - this._lengthToLastNewline + 1 + str.length > this._writerOptions.width) { - this._endLine(); - this._beginLine(); - this._refs.markup += this._indent(1) + str; - } - else { - this._refs.markup += " " + str; - } - }; - /** @inheritdoc */ - XMLWriter.prototype.text = function (data) { - if (data !== '') { - this._beginLine(); - this._refs.markup += data; - this._endLine(); - } - }; - /** @inheritdoc */ - XMLWriter.prototype.cdata = function (data) { - if (data !== '') { - this._beginLine(); - this._refs.markup += ""; - this._endLine(); - } - }; - /** @inheritdoc */ - XMLWriter.prototype.comment = function (data) { - this._beginLine(); - this._refs.markup += ""; - this._endLine(); - }; - /** @inheritdoc */ - XMLWriter.prototype.instruction = function (target, data) { - this._beginLine(); - this._refs.markup += ""; - this._endLine(); - }; + get cacheControl() { + return this.originalResponse.cacheControl; + } + /** + * Returns the value that was specified + * for the 'x-ms-content-disposition' header and specifies how to process the + * response. + * + * @readonly + */ + get contentDisposition() { + return this.originalResponse.contentDisposition; + } + /** + * Returns the value that was specified + * for the Content-Encoding request header. + * + * @readonly + */ + get contentEncoding() { + return this.originalResponse.contentEncoding; + } + /** + * Returns the value that was specified + * for the Content-Language request header. + * + * @readonly + */ + get contentLanguage() { + return this.originalResponse.contentLanguage; + } + /** + * The current sequence number for a + * page blob. This header is not returned for block blobs or append blobs. + * + * @readonly + */ + get blobSequenceNumber() { + return this.originalResponse.blobSequenceNumber; + } + /** + * The blob's type. Possible values include: + * 'BlockBlob', 'PageBlob', 'AppendBlob'. + * + * @readonly + */ + get blobType() { + return this.originalResponse.blobType; + } + /** + * The number of bytes present in the + * response body. + * + * @readonly + */ + get contentLength() { + return this.originalResponse.contentLength; + } + /** + * If the file has an MD5 hash and the + * request is to read the full file, this response header is returned so that + * the client can check for message content integrity. If the request is to + * read a specified range and the 'x-ms-range-get-content-md5' is set to + * true, then the request returns an MD5 hash for the range, as long as the + * range size is less than or equal to 4 MB. If neither of these sets of + * conditions is true, then no value is returned for the 'Content-MD5' + * header. + * + * @readonly + */ + get contentMD5() { + return this.originalResponse.contentMD5; + } + /** + * Indicates the range of bytes returned if + * the client requested a subset of the file by setting the Range request + * header. + * + * @readonly + */ + get contentRange() { + return this.originalResponse.contentRange; + } /** - * Produces characters to be prepended to a line of string in pretty-print - * mode. + * The content type specified for the file. + * The default content type is 'application/octet-stream' + * + * @readonly */ - XMLWriter.prototype._beginLine = function () { - if (this._writerOptions.prettyPrint && !this._refs.suppressPretty) { - this._refs.markup += this._indent(this._writerOptions.offset + this.level); - } - }; + get contentType() { + return this.originalResponse.contentType; + } /** - * Produces characters to be appended to a line of string in pretty-print - * mode. + * Conclusion time of the last attempted + * Copy File operation where this file was the destination file. This value + * can specify the time of a completed, aborted, or failed copy attempt. + * + * @readonly */ - XMLWriter.prototype._endLine = function () { - if (this._writerOptions.prettyPrint && !this._refs.suppressPretty) { - this._refs.markup += this._writerOptions.newline; - this._lengthToLastNewline = this._refs.markup.length; - } - }; + get copyCompletedOn() { + return undefined; + } /** - * Produces an indentation string. + * String identifier for the last attempted Copy + * File operation where this file was the destination file. * - * @param level - depth of the tree + * @readonly */ - XMLWriter.prototype._indent = function (level) { - if (level <= 0) { - return ""; - } - else if (this._indentation[level] !== undefined) { - return this._indentation[level]; - } - else { - var str = this._writerOptions.indent.repeat(level); - this._indentation[level] = str; - return str; - } - }; - return XMLWriter; -}(BaseWriter_1.BaseWriter)); -exports.XMLWriter = XMLWriter; -//# sourceMappingURL=XMLWriter.js.map - -/***/ }), - -/***/ 42444: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", ({ value: true })); -var BaseCBWriter_1 = __nccwpck_require__(50708); -/** - * Serializes XML nodes. - */ -var YAMLCBWriter = /** @class */ (function (_super) { - __extends(YAMLCBWriter, _super); + get copyId() { + return this.originalResponse.copyId; + } /** - * Initializes a new instance of `BaseCBWriter`. + * Contains the number of bytes copied and + * the total bytes in the source in the last attempted Copy File operation + * where this file was the destination file. Can show between 0 and + * Content-Length bytes copied. * - * @param builderOptions - XML builder options + * @readonly */ - function YAMLCBWriter(builderOptions) { - var _this = _super.call(this, builderOptions) || this; - _this._rootWritten = false; - _this._additionalLevel = 0; - if (builderOptions.indent.length < 2) { - throw new Error("YAML indententation string must be at least two characters long."); - } - if (builderOptions.offset < 0) { - throw new Error("YAML offset should be zero or a positive number."); - } - return _this; + get copyProgress() { + return this.originalResponse.copyProgress; } - /** @inheritdoc */ - YAMLCBWriter.prototype.frontMatter = function () { - return this._beginLine() + "---"; - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.declaration = function (version, encoding, standalone) { - return ""; - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.docType = function (name, publicId, systemId) { - return ""; - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.comment = function (data) { - // "!": "hello" - return this._beginLine() + - this._key(this._builderOptions.convert.comment) + " " + - this._val(data); - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.text = function (data) { - // "#": "hello" - return this._beginLine() + - this._key(this._builderOptions.convert.text) + " " + - this._val(data); - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.instruction = function (target, data) { - // "?": "target hello" - return this._beginLine() + - this._key(this._builderOptions.convert.ins) + " " + - this._val(data ? target + " " + data : target); - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.cdata = function (data) { - // "$": "hello" - return this._beginLine() + - this._key(this._builderOptions.convert.cdata) + " " + - this._val(data); - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.attribute = function (name, value) { - // "@name": "val" - this._additionalLevel++; - var str = this._beginLine() + - this._key(this._builderOptions.convert.att + name) + " " + - this._val(value); - this._additionalLevel--; - return str; - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.openTagBegin = function (name) { - // "node": - // "#": - // - - var str = this._beginLine() + this._key(name); - if (!this._rootWritten) { - this._rootWritten = true; - } - this.hasData = true; - this._additionalLevel++; - str += this._beginLine(true) + this._key(this._builderOptions.convert.text); - return str; - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.openTagEnd = function (name, selfClosing, voidElement) { - if (selfClosing) { - return " " + this._val(""); - } - return ""; - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.closeTag = function (name) { - this._additionalLevel--; - return ""; - }; - /** @inheritdoc */ - YAMLCBWriter.prototype.beginElement = function (name) { }; - /** @inheritdoc */ - YAMLCBWriter.prototype.endElement = function (name) { }; /** - * Produces characters to be prepended to a line of string in pretty-print - * mode. + * URL up to 2KB in length that specifies the + * source file used in the last attempted Copy File operation where this file + * was the destination file. + * + * @readonly */ - YAMLCBWriter.prototype._beginLine = function (suppressArray) { - if (suppressArray === void 0) { suppressArray = false; } - return (this.hasData ? this._writerOptions.newline : "") + - this._indent(this._writerOptions.offset + this.level, suppressArray); - }; + get copySource() { + return this.originalResponse.copySource; + } /** - * Produces an indentation string. + * State of the copy operation + * identified by 'x-ms-copy-id'. Possible values include: 'pending', + * 'success', 'aborted', 'failed' * - * @param level - depth of the tree - * @param suppressArray - whether the suppress array marker + * @readonly */ - YAMLCBWriter.prototype._indent = function (level, suppressArray) { - if (level + this._additionalLevel <= 0) { - return ""; - } - else { - var chars = this._writerOptions.indent.repeat(level + this._additionalLevel); - if (!suppressArray && this._rootWritten) { - return chars.substr(0, chars.length - 2) + '-' + chars.substr(-1, 1); - } - return chars; - } - }; + get copyStatus() { + return this.originalResponse.copyStatus; + } /** - * Produces a YAML key string delimited with double quotes. + * Only appears when + * x-ms-copy-status is failed or pending. Describes cause of fatal or + * non-fatal copy operation failure. + * + * @readonly */ - YAMLCBWriter.prototype._key = function (key) { - return "\"" + key + "\":"; - }; + get copyStatusDescription() { + return this.originalResponse.copyStatusDescription; + } /** - * Produces a YAML value string delimited with double quotes. + * When a blob is leased, + * specifies whether the lease is of infinite or fixed duration. Possible + * values include: 'infinite', 'fixed'. + * + * @readonly */ - YAMLCBWriter.prototype._val = function (val) { - return JSON.stringify(val); - }; - return YAMLCBWriter; -}(BaseCBWriter_1.BaseCBWriter)); -exports.YAMLCBWriter = YAMLCBWriter; -//# sourceMappingURL=YAMLCBWriter.js.map - -/***/ }), - -/***/ 96517: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var ObjectWriter_1 = __nccwpck_require__(50243); -var util_1 = __nccwpck_require__(76195); -var BaseWriter_1 = __nccwpck_require__(37644); -/** - * Serializes XML nodes into a YAML string. - */ -var YAMLWriter = /** @class */ (function (_super) { - __extends(YAMLWriter, _super); + get leaseDuration() { + return this.originalResponse.leaseDuration; + } /** - * Initializes a new instance of `YAMLWriter`. + * Lease state of the blob. Possible + * values include: 'available', 'leased', 'expired', 'breaking', 'broken'. * - * @param builderOptions - XML builder options - * @param writerOptions - serialization options + * @readonly */ - function YAMLWriter(builderOptions, writerOptions) { - var _this = _super.call(this, builderOptions) || this; - // provide default options - _this._writerOptions = util_1.applyDefaults(writerOptions, { - wellFormed: false, - noDoubleEncoding: false, - indent: ' ', - newline: '\n', - offset: 0, - group: false, - verbose: false - }); - if (_this._writerOptions.indent.length < 2) { - throw new Error("YAML indententation string must be at least two characters long."); - } - if (_this._writerOptions.offset < 0) { - throw new Error("YAML offset should be zero or a positive number."); - } - return _this; + get leaseState() { + return this.originalResponse.leaseState; } /** - * Produces an XML serialization of the given node. + * The current lease status of the + * blob. Possible values include: 'locked', 'unlocked'. * - * @param node - node to serialize - * @param writerOptions - serialization options + * @readonly */ - YAMLWriter.prototype.serialize = function (node) { - // convert to object - var objectWriterOptions = util_1.applyDefaults(this._writerOptions, { - format: "object", - wellFormed: false, - noDoubleEncoding: false, - }); - var objectWriter = new ObjectWriter_1.ObjectWriter(this._builderOptions, objectWriterOptions); - var val = objectWriter.serialize(node); - var markup = this._beginLine(this._writerOptions, 0) + '---' + this._endLine(this._writerOptions) + - this._convertObject(val, this._writerOptions, 0); - // remove trailing newline - /* istanbul ignore else */ - if (markup.slice(-this._writerOptions.newline.length) === this._writerOptions.newline) { - markup = markup.slice(0, -this._writerOptions.newline.length); - } - return markup; - }; + get leaseStatus() { + return this.originalResponse.leaseStatus; + } /** - * Produces an XML serialization of the given object. + * A UTC date/time value generated by the service that + * indicates the time at which the response was initiated. * - * @param obj - object to serialize - * @param options - serialization options - * @param level - depth of the XML tree - * @param indentLeaf - indents leaf nodes + * @readonly */ - YAMLWriter.prototype._convertObject = function (obj, options, level, suppressIndent) { - var e_1, _a; - var _this = this; - if (suppressIndent === void 0) { suppressIndent = false; } - var markup = ''; - if (util_1.isArray(obj)) { - try { - for (var obj_1 = __values(obj), obj_1_1 = obj_1.next(); !obj_1_1.done; obj_1_1 = obj_1.next()) { - var val = obj_1_1.value; - markup += this._beginLine(options, level, true); - if (!util_1.isObject(val)) { - markup += this._val(val) + this._endLine(options); - } - else if (util_1.isEmpty(val)) { - markup += '""' + this._endLine(options); - } - else { - markup += this._convertObject(val, options, level, true); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (obj_1_1 && !obj_1_1.done && (_a = obj_1.return)) _a.call(obj_1); - } - finally { if (e_1) throw e_1.error; } - } - } - else /* if (isObject(obj)) */ { - util_1.forEachObject(obj, function (key, val) { - if (suppressIndent) { - markup += _this._key(key); - suppressIndent = false; - } - else { - markup += _this._beginLine(options, level) + _this._key(key); - } - if (!util_1.isObject(val)) { - markup += ' ' + _this._val(val) + _this._endLine(options); - } - else if (util_1.isEmpty(val)) { - markup += ' ""' + _this._endLine(options); - } - else { - markup += _this._endLine(options) + - _this._convertObject(val, options, level + 1); - } - }, this); - } - return markup; - }; + get date() { + return this.originalResponse.date; + } /** - * Produces characters to be prepended to a line of string in pretty-print - * mode. + * The number of committed blocks + * present in the blob. This header is returned only for append blobs. * - * @param options - serialization options - * @param level - current depth of the XML tree - * @param isArray - whether this line is an array item + * @readonly */ - YAMLWriter.prototype._beginLine = function (options, level, isArray) { - if (isArray === void 0) { isArray = false; } - var indentLevel = options.offset + level + 1; - var chars = new Array(indentLevel).join(options.indent); - if (isArray) { - return chars.substr(0, chars.length - 2) + '-' + chars.substr(-1, 1); - } - else { - return chars; - } - }; + get blobCommittedBlockCount() { + return this.originalResponse.blobCommittedBlockCount; + } /** - * Produces characters to be appended to a line of string in pretty-print - * mode. + * The ETag contains a value that you can use to + * perform operations conditionally, in quotes. * - * @param options - serialization options + * @readonly */ - YAMLWriter.prototype._endLine = function (options) { - return options.newline; - }; + get etag() { + return this.originalResponse.etag; + } /** - * Produces a YAML key string delimited with double quotes. + * The error code. + * + * @readonly */ - YAMLWriter.prototype._key = function (key) { - return "\"" + key + "\":"; - }; + get errorCode() { + return this.originalResponse.errorCode; + } /** - * Produces a YAML value string delimited with double quotes. + * The value of this header is set to + * true if the file data and application metadata are completely encrypted + * using the specified algorithm. Otherwise, the value is set to false (when + * the file is unencrypted, or if only parts of the file/application metadata + * are encrypted). + * + * @readonly */ - YAMLWriter.prototype._val = function (val) { - return JSON.stringify(val); - }; - return YAMLWriter; -}(BaseWriter_1.BaseWriter)); -exports.YAMLWriter = YAMLWriter; -//# sourceMappingURL=YAMLWriter.js.map - -/***/ }), - -/***/ 17476: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -var MapWriter_1 = __nccwpck_require__(41397); -exports.MapWriter = MapWriter_1.MapWriter; -var XMLWriter_1 = __nccwpck_require__(59606); -exports.XMLWriter = XMLWriter_1.XMLWriter; -var ObjectWriter_1 = __nccwpck_require__(50243); -exports.ObjectWriter = ObjectWriter_1.ObjectWriter; -var JSONWriter_1 = __nccwpck_require__(37510); -exports.JSONWriter = JSONWriter_1.JSONWriter; -var YAMLWriter_1 = __nccwpck_require__(96517); -exports.YAMLWriter = YAMLWriter_1.YAMLWriter; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 10829: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - - -var yaml = __nccwpck_require__(59625); - - -module.exports = yaml; - - -/***/ }), - -/***/ 59625: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - - -var loader = __nccwpck_require__(40342); -var dumper = __nccwpck_require__(98069); - - -function deprecated(name) { - return function () { - throw new Error('Function ' + name + ' is deprecated and cannot be used.'); - }; -} - - -module.exports.Type = __nccwpck_require__(90256); -module.exports.Schema = __nccwpck_require__(66280); -module.exports.FAILSAFE_SCHEMA = __nccwpck_require__(70026); -module.exports.JSON_SCHEMA = __nccwpck_require__(2168); -module.exports.CORE_SCHEMA = __nccwpck_require__(11950); -module.exports.DEFAULT_SAFE_SCHEMA = __nccwpck_require__(42881); -module.exports.DEFAULT_FULL_SCHEMA = __nccwpck_require__(145); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.safeLoad = loader.safeLoad; -module.exports.safeLoadAll = loader.safeLoadAll; -module.exports.dump = dumper.dump; -module.exports.safeDump = dumper.safeDump; -module.exports.YAMLException = __nccwpck_require__(29291); - -// Deprecated schema names from JS-YAML 2.0.x -module.exports.MINIMAL_SCHEMA = __nccwpck_require__(70026); -module.exports.SAFE_SCHEMA = __nccwpck_require__(42881); -module.exports.DEFAULT_SCHEMA = __nccwpck_require__(145); - -// Deprecated functions from JS-YAML 1.x.x -module.exports.scan = deprecated('scan'); -module.exports.parse = deprecated('parse'); -module.exports.compose = deprecated('compose'); -module.exports.addConstructor = deprecated('addConstructor'); - - -/***/ }), - -/***/ 59941: -/***/ ((module) => { - -"use strict"; - - - -function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); -} - - -function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); -} - - -function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - - return [ sequence ]; -} - - -function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; + get isServerEncrypted() { + return this.originalResponse.isServerEncrypted; } - } - - return target; -} - - -function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; -} - - -function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); -} - - -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.isNegativeZero = isNegativeZero; -module.exports.extend = extend; - - -/***/ }), - -/***/ 98069: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable no-use-before-define*/ - -var common = __nccwpck_require__(59941); -var YAMLException = __nccwpck_require__(29291); -var DEFAULT_FULL_SCHEMA = __nccwpck_require__(145); -var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(42881); - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_EQUALS = 0x3D; /* = */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); + /** + * If the blob has a MD5 hash, and if + * request contains range header (Range or x-ms-range), this response header + * is returned with the value of the whole blob's MD5 value. This value may + * or may not be equal to the value returned in Content-MD5 header, with the + * latter calculated from the requested range. + * + * @readonly + */ + get blobContentMD5() { + return this.originalResponse.blobContentMD5; } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; + /** + * Returns the date and time the file was last + * modified. Any operation that modifies the file or its properties updates + * the last modified time. + * + * @readonly + */ + get lastModified() { + return this.originalResponse.lastModified; } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - -function State(options) { - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; + /** + * A name-value pair + * to associate with a file storage object. + * + * @readonly + */ + get metadata() { + return this.originalResponse.metadata; } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; + /** + * This header uniquely identifies the request + * that was made and can be used for troubleshooting the request. + * + * @readonly + */ + get requestId() { + return this.originalResponse.requestId; } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// [24] b-line-feed ::= #xA /* LF */ -// [25] b-carriage-return ::= #xD /* CR */ -// [3] c-byte-order-mark ::= #xFEFF -function isNsChar(c) { - return isPrintable(c) && !isWhitespace(c) - // byte-order-mark - && c !== 0xFEFF - // b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; -} - -// Simplified test for values allowed after the first character in plain style. -function isPlainSafe(c, prev) { - // Uses a subset of nb-char - c-flow-indicator - ":" - "#" - // where nb-char ::= c-printable - b-char - c-byte-order-mark. - return isPrintable(c) && c !== 0xFEFF - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // - ":" - "#" - // /* An ns-char preceding */ "#" - && c !== CHAR_COLON - && ((c !== CHAR_SHARP) || (prev && isNsChar(prev))); -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - return isPrintable(c) && c !== 0xFEFF - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { - var i; - var char, prev_char; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(string.charCodeAt(0)) - && !isWhitespace(string.charCodeAt(string.length - 1)); - - if (singleLineOnly) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - prev_char = i > 0 ? string.charCodeAt(i - 1) : null; - plain = plain && isPlainSafe(char, prev_char); + /** + * If a client request id header is sent in the request, this header will be present in the + * response with the same value. + * + * @readonly + */ + get clientRequestId() { + return this.originalResponse.clientRequestId; } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - prev_char = i > 0 ? string.charCodeAt(i - 1) : null; - plain = plain && isPlainSafe(char, prev_char); + /** + * Indicates the version of the File service used + * to execute the request. + * + * @readonly + */ + get version() { + return this.originalResponse.version; } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - return plain && !testAmbiguousType(string) - ? STYLE_PLAIN : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey) { - state.dump = (function () { - if (string.length === 0) { - return "''"; + /** + * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned + * when the blob was encrypted with a customer-provided key. + * + * @readonly + */ + get encryptionKeySha256() { + return this.originalResponse.encryptionKeySha256; } - if (!state.noCompatMode && - DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { - return "'" + string + "'"; + /** + * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to + * true, then the request returns a crc64 for the range, as long as the range size is less than + * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is + * specified in the same request, it will fail with 400(Bad Request) + */ + get contentCrc64() { + return this.originalResponse.contentCrc64; } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); + /** + * The response body as a browser Blob. + * Always undefined in node.js. + * + * @readonly + */ + get blobBody() { + return undefined; } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); + /** + * The response body as a node.js Readable stream. + * Always undefined in the browser. + * + * It will parse avor data returned by blob query. + * + * @readonly + */ + get readableStreamBody() { + return core_util_1.isNodeLike ? this.blobDownloadStream : undefined; + } + /** + * The HTTP response. + */ + get _response() { + return this.originalResponse._response; + } + originalResponse; + blobDownloadStream; + /** + * Creates an instance of BlobQueryResponse. + * + * @param originalResponse - + * @param options - + */ + constructor(originalResponse, options = {}) { + this.originalResponse = originalResponse; + this.blobDownloadStream = new BlobQuickQueryStream_js_1.BlobQuickQueryStream(this.originalResponse.readableStreamBody, options); } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; } +exports.BlobQueryResponse = BlobQueryResponse; +//# sourceMappingURL=BlobQueryResponse.js.map -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} +/***/ }), -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; +/***/ 12679: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; +"use strict"; - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobServiceClient = void 0; +const core_auth_1 = __nccwpck_require__(98834); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const Pipeline_js_1 = __nccwpck_require__(33781); +const ContainerClient_js_1 = __nccwpck_require__(63750); +const utils_common_js_1 = __nccwpck_require__(16673); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const utils_common_js_2 = __nccwpck_require__(16673); +const tracing_js_1 = __nccwpck_require__(53683); +const BlobBatchClient_js_1 = __nccwpck_require__(71861); +const StorageClient_js_1 = __nccwpck_require__(39484); +const AccountSASPermissions_js_1 = __nccwpck_require__(70793); +const AccountSASSignatureValues_js_1 = __nccwpck_require__(72763); +const AccountSASServices_js_1 = __nccwpck_require__(34606); +/** + * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you + * to manipulate blob containers. + */ +class BlobServiceClient extends StorageClient_js_1.StorageClient { + /** + * serviceContext provided by protocol layer. + */ + serviceContext; + /** + * + * Creates an instance of BlobServiceClient from connection string. + * + * @param connectionString - Account connection string or a SAS connection string of an Azure storage account. + * [ Note - Account connection string can only be used in NODE.JS runtime. ] + * Account connection string example - + * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net` + * SAS connection string example - + * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString` + * @param options - Optional. Options to configure the HTTP pipeline. + */ + static fromConnectionString(connectionString, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + options = options || {}; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + return new BlobServiceClient(extractedCreds.url, pipeline); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + const pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char, nextChar; - var escapeSeq; - - for (var i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). - if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { - nextChar = string.charCodeAt(i + 1); - if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { - // Combine the surrogate pair and store it escaped. - result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); - // Advance index one extra since we already used that char here. - i++; continue; - } + constructor(url, credentialOrPipeline, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + let pipeline; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) { + pipeline = credentialOrPipeline; + } + else if ((core_util_1.isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipeline instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) { + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); + } + else { + // The second parameter is undefined. Use anonymous credential + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + super(url, pipeline); + this.serviceContext = this.storageClientContext.service; } - escapeSeq = ESCAPE_SEQUENCES[char]; - result += !escapeSeq && isPrintable(char) - ? string[i] - : escapeSeq || encodeHex(char); - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level, object[index], false, false)) { - if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; + /** + * Creates a {@link ContainerClient} object + * + * @param containerName - A container name + * @returns A new ContainerClient object for the given container name. + * + * Example usage: + * + * ```ts snippet:BlobServiceClientGetContainerClient + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerClient = blobServiceClient.getContainerClient(""); + * ``` + */ + getContainerClient(containerName) { + return new ContainerClient_js_1.ContainerClient((0, utils_common_js_1.appendToURLPath)(this.url, encodeURIComponent(containerName)), this.pipeline); } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level + 1, object[index], true, true)) { - if (!compact || index !== 0) { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; + /** + * Create a Blob container. @see https://learn.microsoft.com/rest/api/storageservices/create-container + * + * @param containerName - Name of the container to create. + * @param options - Options to configure Container Create operation. + * @returns Container creation response and the corresponding container client. + */ + async createContainer(containerName, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(containerName); + const containerCreateResponse = await containerClient.create(updatedOptions); + return { + containerClient, + containerCreateResponse, + }; + }); } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (index !== 0) pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; + /** + * Deletes a Blob container. + * + * @param containerName - Name of the container to delete. + * @param options - Options to configure Container Delete operation. + * @returns Container deletion response. + */ + async deleteContainer(containerName, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(containerName); + return containerClient.delete(updatedOptions); + }); } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. + /** + * Restore a previously deleted Blob container. + * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container. + * + * @param deletedContainerName - Name of the previously deleted container. + * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container. + * @param options - Options to configure Container Restore operation. + * @returns Container deletion response. + */ + async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => { + const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName); + // Hack to access a protected member. + const containerContext = containerClient["storageClientContext"].container; + const containerUndeleteResponse = (0, utils_common_js_2.assertResponse)(await containerContext.restore({ + deletedContainerName, + deletedContainerVersion, + tracingOptions: updatedOptions.tracingOptions, + })); + return { containerClient, containerUndeleteResponse }; + }); } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || index !== 0) { - pairBuffer += generateNextLine(state, level); + /** + * Gets the properties of a storage account’s Blob service, including properties + * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties + * + * @param options - Options to the Service Get Properties operation. + * @returns Response data for the Service Get Properties operation. + */ + async getProperties(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. + /** + * Sets properties for a storage account’s Blob service endpoint, including properties + * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-service-properties + * + * @param properties - + * @param options - Options to the Service Set Properties operation. + * @returns Response data for the Service Set Properties operation. + */ + async setProperties(properties, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.setProperties(properties, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } + /** + * Retrieves statistics related to replication for the Blob service. It is only + * available on the secondary location endpoint when read-access geo-redundant + * replication is enabled for the storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-stats + * + * @param options - Options to the Service Get Statistics operation. + * @returns Response data for the Service Get Statistics operation. + */ + async getStatistics(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getStatistics({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. + /** + * Returns a list of the containers under the specified account. + * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2 + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to the Service List Container Segment operation. + * @returns Response data for the Service List Container Segment operation. + */ + async listContainersSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => { + return (0, utils_common_js_2.assertResponse)(await this.serviceContext.listContainersSegment({ + abortSignal: options.abortSignal, + marker, + ...options, + include: typeof options.include === "string" ? [options.include] : options.include, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags + * match a given search expression. Filter blobs searches across all containers within a + * storage account but can be scoped within the expression to a single container. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: response._response, // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }), + }; + return wrappedResponse; + }); } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - state.tag = explicit ? type.tag : '?'; - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + /** + * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === undefined) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); } - - state.dump = _result; - } - - return true; } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties + * + * ```ts snippet:BlobServiceClientFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the blobs + * let i = 1; + * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Use iter.next() to iterate the blobs + * i = 1; + * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'"); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Use byPage() to iterate the blobs + * i = 1; + * for await (const page of blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Use paging with a marker + * i = 1; + * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + // AsyncIterableIterator to iterate over blobs + const listSegmentOptions = { + ...options, + }; + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions, + }); + }, + }; + } + /** + * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses + * + * @param marker - A string value that identifies the portion of + * the list of containers to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all containers remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list containers operation. + */ + async *listSegments(marker, options = {}) { + let listContainersSegmentResponse; + if (!!marker || marker === undefined) { + do { + listContainersSegmentResponse = await this.listContainersSegment(marker, options); + listContainersSegmentResponse.containerItems = + listContainersSegmentResponse.containerItems || []; + marker = listContainersSegmentResponse.continuationToken; + yield await listContainersSegmentResponse; + } while (marker); } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + /** + * Returns an AsyncIterableIterator for Container Items + * + * @param options - Options to list containers operation. + */ + async *listItems(options = {}) { + let marker; + for await (const segment of this.listSegments(marker, options)) { + yield* segment.containerItems; } - } - } else if (type === '[object Array]') { - var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; - if (block && (state.dump.length !== 0)) { - writeBlockSequence(state, arrayLevel, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; + } + /** + * Returns an async iterable iterator to list all the containers + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the containers in pages. + * + * ```ts snippet:BlobServiceClientListContainers + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * // Use for await to iterate the containers + * let i = 1; + * for await (const container of blobServiceClient.listContainers()) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * + * // Use iter.next() to iterate the containers + * i = 1; + * const iter = blobServiceClient.listContainers(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Container ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Use byPage() to iterate the containers + * i = 1; + * for await (const page of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) { + * for (const container of page.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Use paging with a marker + * i = 1; + * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * + * // Prints 2 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = blobServiceClient + * .listContainers() + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * + * // Prints 10 container names + * if (response.containerItems) { + * for (const container of response.containerItems) { + * console.log(`Container ${i++}: ${container.name}`); + * } + * } + * ``` + * + * @param options - Options to list containers. + * @returns An asyncIterableIterator that supports paging. + */ + listContainers(options = {}) { + if (options.prefix === "") { + options.prefix = undefined; } - } else { - writeFlowSequence(state, arrayLevel, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + const include = []; + if (options.includeDeleted) { + include.push("deleted"); } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey); - } - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - state.dump = '!<' + state.tag + '> ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); + if (options.includeMetadata) { + include.push("metadata"); } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + if (options.includeSystem) { + include.push("system"); } - } + // AsyncIterableIterator to iterate over containers + const listSegmentOptions = { + ...options, + ...(include.length > 0 ? { include } : {}), + }; + const iter = this.listItems(listSegmentOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions, + }); + }, + }; + } + /** + * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential). + * + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key + * + * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time + * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time + */ + async getUserDelegationKey(startsOn, expiresOn, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => { + const response = (0, utils_common_js_2.assertResponse)(await this.serviceContext.getUserDelegationKey({ + startsOn: (0, utils_common_js_2.truncatedISO8061Date)(startsOn, false), + expiresOn: (0, utils_common_js_2.truncatedISO8061Date)(expiresOn, false), + }, { + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + const userDelegationKey = { + signedObjectId: response.signedObjectId, + signedTenantId: response.signedTenantId, + signedStartsOn: new Date(response.signedStartsOn), + signedExpiresOn: new Date(response.signedExpiresOn), + signedService: response.signedService, + signedVersion: response.signedVersion, + value: response.value, + }; + const res = { + _response: response._response, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + version: response.version, + date: response.date, + errorCode: response.errorCode, + ...userDelegationKey, + }; + return res; + }); + } + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this service. + */ + getBlobBatchClient() { + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); + } + /** + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + } + if (expiresOn === undefined) { + const now = new Date(); + expiresOn = new Date(now.getTime() + 3600 * 1000); + } + const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({ + permissions, + expiresOn, + resourceTypes, + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options, + }, this.credential).toString(); + return (0, utils_common_js_1.appendToURLQuery)(this.url, sas); + } + /** + * Only available for BlobServiceClient constructed with a shared key credential. + * + * Generates string to sign for a Blob account Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas + * + * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided. + * @param permissions - Specifies the list of permissions to be associated with the SAS. + * @param resourceTypes - Specifies the resource types associated with the shared access signature. + * @param options - Optional parameters. + * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential"); + } + if (expiresOn === undefined) { + const now = new Date(); + expiresOn = new Date(now.getTime() + 3600 * 1000); + } + return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({ + permissions, + expiresOn, + resourceTypes, + services: AccountSASServices_js_1.AccountSASServices.parse("b").toString(), + ...options, + }, this.credential).stringToSign; } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; - - return ''; -} - -function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - -module.exports.dump = dump; -module.exports.safeDump = safeDump; - - -/***/ }), - -/***/ 29291: -/***/ ((module) => { - -"use strict"; -// YAML error class. http://stackoverflow.com/questions/8458984 -// - - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } } - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - var result = this.name + ': '; - - result += this.reason || '(unknown reason)'; - - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); - } - - return result; -}; - - -module.exports = YAMLException; - +exports.BlobServiceClient = BlobServiceClient; +//# sourceMappingURL=BlobServiceClient.js.map /***/ }), -/***/ 40342: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 54437: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -/*eslint-disable max-len,no-use-before-define*/ - -var common = __nccwpck_require__(59941); -var YAMLException = __nccwpck_require__(29291); -var Mark = __nccwpck_require__(77262); -var DEFAULT_SAFE_SCHEMA = __nccwpck_require__(42881); -var DEFAULT_FULL_SCHEMA = __nccwpck_require__(145); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.onWarning = options['onWarning'] || null; - this.legacy = options['legacy'] || false; - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - return new YAMLException( - message, - new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PageBlobClient = exports.BlockBlobClient = exports.AppendBlobClient = exports.BlobClient = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_auth_1 = __nccwpck_require__(98834); +const core_util_1 = __nccwpck_require__(80637); +const core_util_2 = __nccwpck_require__(80637); +const BlobDownloadResponse_js_1 = __nccwpck_require__(88710); +const BlobQueryResponse_js_1 = __nccwpck_require__(83751); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const models_js_1 = __nccwpck_require__(64526); +const PageBlobRangeResponse_js_1 = __nccwpck_require__(12526); +const Pipeline_js_1 = __nccwpck_require__(33781); +const BlobStartCopyFromUrlPoller_js_1 = __nccwpck_require__(9846); +const Range_js_1 = __nccwpck_require__(84573); +const StorageClient_js_1 = __nccwpck_require__(39484); +const Batch_js_1 = __nccwpck_require__(93996); +const storage_common_1 = __nccwpck_require__(83667); +const constants_js_1 = __nccwpck_require__(81865); +const tracing_js_1 = __nccwpck_require__(53683); +const utils_common_js_1 = __nccwpck_require__(16673); +const utils_js_1 = __nccwpck_require__(85157); +const BlobSASSignatureValues_js_1 = __nccwpck_require__(48921); +const BlobLeaseClient_js_1 = __nccwpck_require__(20106); +/** + * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, + * append blob, or page blob. + */ +class BlobClient extends StorageClient_js_1.StorageClient { + /** + * blobContext provided by protocol layer. + */ + blobContext; + _name; + _containerName; + _versionId; + _snapshot; + /** + * The name of the blob. + */ + get name() { + return this._name; } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); + /** + * The name of the storage container the blob is associated with. + */ + get containerName() { + return this._containerName; } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + options = options || {}; + let pipeline; + let url; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { + options = blobNameOrOptions; + } + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + super(url, pipeline); + ({ blobName: this._name, containerName: this._containerName } = + this.getBlobAndContainerNamesFromUrl()); + this.blobContext = this.storageClientContext.blob; + this._snapshot = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT); + this._versionId = (0, utils_common_js_1.getURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID); } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); + /** + * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp + */ + withSnapshot(snapshot) { + return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); + /** + * Creates a new BlobClient object pointing to a version of this blob. + * Provide "" will remove the versionId and return a Client to the base blob. + * + * @param versionId - The versionId. + * @returns A new BlobClient object pointing to the version of this blob. + */ + withVersion(versionId) { + return new BlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline); } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); + /** + * Creates a AppendBlobClient object. + * + */ + getAppendBlobClient() { + return new AppendBlobClient(this.url, this.pipeline); } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + /** + * Creates a BlockBlobClient object. + * + */ + getBlockBlobClient() { + return new BlockBlobClient(this.url, this.pipeline); } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + /** + * Creates a PageBlobClient object. + * + */ + getPageBlobClient() { + return new PageBlobClient(this.url, this.pipeline); } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + /** + * Reads or downloads a blob from the system, including its metadata and properties. + * You can also call Get Blob to read a snapshot. + * + * * In Node.js, data returns in a Readable stream readableStreamBody + * * In browsers, data returns in a promise blobBody + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob + * + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Optional options to Blob Download operation. + * + * + * Example usage (Node.js): + * + * ```ts snippet:ReadmeSampleDownloadBlob_Node + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In Node.js, get downloaded data by accessing downloadBlockBlobResponse.readableStreamBody + * const downloadBlockBlobResponse = await blobClient.download(); + * if (downloadBlockBlobResponse.readableStreamBody) { + * const downloaded = await streamToString(downloadBlockBlobResponse.readableStreamBody); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * + * async function streamToString(stream: NodeJS.ReadableStream): Promise { + * const result = await new Promise>((resolve, reject) => { + * const chunks: Buffer[] = []; + * stream.on("data", (data) => { + * chunks.push(Buffer.isBuffer(data) ? data : Buffer.from(data)); + * }); + * stream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * stream.on("error", reject); + * }); + * return result.toString(); + * } + * ``` + * + * Example usage (browser): + * + * ```ts snippet:ReadmeSampleDownloadBlob_Browser + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Get blob content from position 0 to the end + * // In browsers, get downloaded data by accessing downloadBlockBlobResponse.blobBody + * const downloadBlockBlobResponse = await blobClient.download(); + * const blobBody = await downloadBlockBlobResponse.blobBody; + * if (blobBody) { + * const downloaded = await blobBody.text(); + * console.log(`Downloaded blob content: ${downloaded}`); + * } + * ``` + */ + async download(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-download", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.download({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onDownloadProgress: core_util_1.isNodeLike ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream + }, + range: offset === 0 && !count ? undefined : (0, Range_js_1.rangeToString)({ offset, count }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedRes = { + ...res, + _response: res._response, // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules), + }; + // Return browser response immediately + if (!core_util_1.isNodeLike) { + return wrappedRes; + } + // We support retrying when download stream unexpected ends in Node.js runtime + // Following code shouldn't be bundled into browser build, however some + // bundlers may try to bundle following code and "FileReadResponse.ts". + // In this case, "FileDownloadResponse.browser.ts" will be used as a shim of "FileDownloadResponse.ts" + // The config is in package.json "browser" field + if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) { + // TODO: Default value or make it a required parameter? + options.maxRetryRequests = constants_js_1.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS; + } + if (res.contentLength === undefined) { + throw new RangeError(`File download response doesn't contain valid content length header`); + } + if (!res.etag) { + throw new RangeError(`File download response doesn't contain valid etag header`); + } + return new BlobDownloadResponse_js_1.BlobDownloadResponse(wrappedRes, async (start) => { + const updatedDownloadOptions = { + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ifMatch: options.conditions.ifMatch || res.etag, + ifModifiedSince: options.conditions.ifModifiedSince, + ifNoneMatch: options.conditions.ifNoneMatch, + ifUnmodifiedSince: options.conditions.ifUnmodifiedSince, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ + count: offset + res.contentLength - start, + offset: start, + }), + rangeGetContentMD5: options.rangeGetContentMD5, + rangeGetContentCRC64: options.rangeGetContentCrc64, + snapshot: options.snapshot, + cpkInfo: options.customerProvidedKey, + }; + // Debug purpose only + // console.log( + // `Read from internal stream, range: ${ + // updatedOptions.range + // }, options: ${JSON.stringify(updatedOptions)}` + // ); + return (await this.blobContext.download({ + abortSignal: options.abortSignal, + ...updatedDownloadOptions, + })).readableStreamBody; + }, offset, res.contentLength, { + maxRetryRequests: options.maxRetryRequests, + onProgress: options.onProgress, + }); + }); } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); + /** + * Returns true if the Azure blob resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing blob might be deleted by other clients or + * applications. Vice versa new blobs might be added by other clients or applications after this + * function completes. + * + * @param options - options to Exists operation. + */ + async exists(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-exists", options, async (updatedOptions) => { + try { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + await this.getProperties({ + abortSignal: options.abortSignal, + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + }); + return true; + } + catch (e) { + if (e.statusCode === 404) { + // Expected exception when checking blob existence + return false; + } + else if (e.statusCode === 409 && + (e.details.errorCode === constants_js_1.BlobUsesCustomerSpecifiedEncryptionMsg || + e.details.errorCode === constants_js_1.BlobDoesNotUseCustomerSpecifiedEncryption)) { + // Expected exception when checking blob existence + return true; + } + throw e; + } + }); } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; + /** + * Returns all user-defined metadata, standard HTTP properties, and system properties + * for the blob. It does not return the content of the blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Optional options to Get Properties operation. + */ + async getProperties(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-getProperties", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blobContext.getProperties({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + })); + return { + ...res, + _response: res._response, // _response is made non-enumerable + objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(res.objectReplicationRules), + }; + }); } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob + * + * @param options - Optional options to Blob Delete operation. + */ + async delete(options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("BlobClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.delete({ + abortSignal: options.abortSignal, + deleteSnapshots: options.deleteSnapshots, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); + /** + * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob + * + * @param options - Optional options to Blob Delete operation. + */ + async deleteIfExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteIfExists", options, async (updatedOptions) => { + try { + const res = (0, utils_common_js_1.assertResponse)(await this.delete(updatedOptions)); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "BlobNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + throw e; + } + }); } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); + /** + * Restores the contents and metadata of soft deleted blob and any associated + * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29 + * or later. + * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob + * + * @param options - Optional options to Blob Undelete operation. + */ + async undelete(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-undelete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.undelete({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - _result[keyNode] = valueNode; - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; + /** + * Sets system properties on the blob. + * + * If no value provided, or no value provided for the specified blob HTTP headers, + * these blob HTTP headers without a value will be cleared. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param blobHTTPHeaders - If no value provided, or no value provided for + * the specified blob HTTP headers, these blob HTTP + * headers without a value will be cleared. + * A common header to set is `blobContentType` + * enabling the browser to provide functionality + * based on file type. + * @param options - Optional options to Blob Set HTTP Headers operation. + */ + async setHTTPHeaders(blobHTTPHeaders, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setHTTPHeaders", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setHttpHeaders({ + abortSignal: options.abortSignal, + blobHttpHeaders: blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + // cpkInfo: options.customerProvidedKey, // CPK is not included in Swagger, should change this back when this issue is fixed in Swagger. + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets user-defined metadata for the specified blob as one or more name-value pairs. + * + * If no option provided, or no metadata defined in the parameter, the blob + * metadata will be removed. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-metadata + * + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Optional options to Set Metadata operation. + */ + async setMetadata(metadata, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets tags on the underlying blob. + * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. + * Valid tag key and value characters include lower and upper case letters, digits (0-9), + * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_'). + * + * @param tags - + * @param options - + */ + async setTags(tags, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setTags", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + tags: (0, utils_common_js_1.toBlobTags)(tags), + })); + }); + } + /** + * Gets the tags associated with the underlying blob. + * + * @param options - + */ + async getTags(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-getTags", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.blobContext.getTags({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: response._response, // _response is made non-enumerable + tags: (0, utils_common_js_1.toTags)({ blobTagSet: response.blobTagSet }) || {}, + }; + return wrappedResponse; + }); + } + /** + * Get a {@link BlobLeaseClient} that manages leases on the blob. + * + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the blob. + */ + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); + } + /** + * Creates a read-only snapshot of a blob. + * @see https://learn.microsoft.com/rest/api/storageservices/snapshot-blob + * + * @param options - Optional options to the Blob Create Snapshot operation. + */ + async createSnapshot(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlobClient-createSnapshot", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.createSnapshot({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Asynchronously copies a blob to a destination within the storage account. + * This method returns a long running operation poller that allows you to wait + * indefinitely until the copy is completed. + * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller. + * Note that the onProgress callback will not be invoked if the operation completes in the first + * request, and attempting to cancel a completed copy will result in an error being thrown. + * + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob + * + * ```ts snippet:ClientsBeginCopyFromURL + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blobClient = containerClient.getBlobClient(blobName); + * + * // Example using automatic polling + * const automaticCopyPoller = await blobClient.beginCopyFromURL("url"); + * const automaticResult = await automaticCopyPoller.pollUntilDone(); + * + * // Example using manual polling + * const manualCopyPoller = await blobClient.beginCopyFromURL("url"); + * while (!manualCopyPoller.isDone()) { + * await manualCopyPoller.poll(); + * } + * const manualResult = manualCopyPoller.getResult(); + * + * // Example using progress updates + * const progressUpdatesCopyPoller = await blobClient.beginCopyFromURL("url", { + * onProgress(state) { + * console.log(`Progress: ${state.copyProgress}`); + * }, + * }); + * const progressUpdatesResult = await progressUpdatesCopyPoller.pollUntilDone(); + * + * // Example using a changing polling interval (default 15 seconds) + * const pollingIntervalCopyPoller = await blobClient.beginCopyFromURL("url", { + * intervalInMs: 1000, // poll blob every 1 second for copy progress + * }); + * const pollingIntervalResult = await pollingIntervalCopyPoller.pollUntilDone(); + * + * // Example using copy cancellation: + * const cancelCopyPoller = await blobClient.beginCopyFromURL("url"); + * // cancel operation after starting it. + * try { + * await cancelCopyPoller.cancelOperation(); + * // calls to get the result now throw PollerCancelledError + * cancelCopyPoller.getResult(); + * } catch (err: any) { + * if (err.name === "PollerCancelledError") { + * console.log("The copy was cancelled."); + * } + * } + * ``` + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. + */ + async beginCopyFromURL(copySource, options = {}) { + const client = { + abortCopyFromURL: (...args) => this.abortCopyFromURL(...args), + getProperties: (...args) => this.getProperties(...args), + startCopyFromURL: (...args) => this.startCopyFromURL(...args), + }; + const poller = new BlobStartCopyFromUrlPoller_js_1.BlobBeginCopyFromUrlPoller({ + blobClient: client, + copySource, + intervalInMs: options.intervalInMs, + onProgress: options.onProgress, + resumeFrom: options.resumeFrom, + startCopyFromURLOptions: options, + }); + // Trigger the startCopyFromURL call by calling poll. + // Any errors from this method should be surfaced to the user. + await poller.poll(); + return poller; + } + /** + * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero + * length and full metadata. Version 2012-02-12 and newer. + * @see https://learn.microsoft.com/rest/api/storageservices/abort-copy-blob + * + * @param copyId - Id of the Copy From URL operation. + * @param options - Optional options to the Blob Abort Copy From URL operation. + */ + async abortCopyFromURL(copyId, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-abortCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not + * return a response until the copy is complete. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob-from-url + * + * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication + * @param options - + */ + async syncCopyFromURL(copySource, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return tracing_js_1.tracingClient.withSpan("BlobClient-syncCopyFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.copyFromURL(copySource, { + abortSignal: options.abortSignal, + metadata: options.metadata, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + }, + sourceContentMD5: options.sourceContentMD5, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + encryptionScope: options.encryptionScope, + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant + * storage only). A premium page blob's tier determines the allowed size, IOPS, + * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive + * storage type. This operation does not update the blob's ETag. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-tier + * + * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive. + * @param options - Optional options to the Blob Set Tier operation. + */ + async setAccessTier(tier, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setAccessTier", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setTier((0, models_js_1.toAccessTier)(tier), { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + rehydratePriority: options.rehydratePriority, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + async downloadToBuffer(param1, param2, param3, param4 = {}) { + let buffer; + let offset = 0; + let count = 0; + let options = param4; + if (param1 instanceof Buffer) { + buffer = param1; + offset = param2 || 0; + count = typeof param3 === "number" ? param3 : 0; + } + else { + offset = typeof param1 === "number" ? param1 : 0; + count = typeof param2 === "number" ? param2 : 0; + options = param3 || {}; + } + let blockSize = options.blockSize ?? 0; + if (blockSize < 0) { + throw new RangeError("blockSize option must be >= 0"); + } + if (blockSize === 0) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + if (offset < 0) { + throw new RangeError("offset option must be >= 0"); + } + if (count && count <= 0) { + throw new RangeError("count option must be greater than 0"); + } + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToBuffer", options, async (updatedOptions) => { + // Customer doesn't specify length, get it + if (!count) { + const response = await this.getProperties({ + ...options, + tracingOptions: updatedOptions.tracingOptions, + }); + count = response.contentLength - offset; + if (count < 0) { + throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`); + } + } + // Allocate the buffer of size = count if the buffer is not provided + if (!buffer) { + try { + buffer = Buffer.alloc(count); + } + catch (error) { + throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile".\t ${error.message}`); + } + } + if (buffer.length < count) { + throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`); + } + let transferProgress = 0; + const batch = new Batch_js_1.Batch(options.concurrency); + for (let off = offset; off < offset + count; off = off + blockSize) { + batch.addOperation(async () => { + // Exclusive chunk end position + let chunkEnd = offset + count; + if (off + blockSize < chunkEnd) { + chunkEnd = off + blockSize; + } + const response = await this.download(off, chunkEnd - off, { + abortSignal: options.abortSignal, + conditions: options.conditions, + maxRetryRequests: options.maxRetryRequestsPerBlock, + customerProvidedKey: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + }); + const stream = response.readableStreamBody; + await (0, utils_js_1.streamToBuffer)(stream, buffer, off - offset, chunkEnd - offset); + // Update progress after block is downloaded, in case of block trying + // Could provide finer grained progress updating inside HTTP requests, + // only if convenience layer download try is enabled + transferProgress += chunkEnd - off; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress }); + } + }); + } + await batch.do(); + return buffer; + }); + } + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Downloads an Azure Blob to a local file. + * Fails if the the given file path already exits. + * Offset and count are optional, pass 0 and undefined respectively to download the entire blob. + * + * @param filePath - + * @param offset - From which position of the block blob to download. + * @param count - How much data to be downloaded. Will download to the end when passing undefined. + * @param options - Options to Blob download options. + * @returns The response data for blob download operation, + * but with readableStreamBody set to undefined since its + * content is already read and written into a local file + * at the specified path. + */ + async downloadToFile(filePath, offset = 0, count, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-downloadToFile", options, async (updatedOptions) => { + const response = await this.download(offset, count, { + ...options, + tracingOptions: updatedOptions.tracingOptions, + }); + if (response.readableStreamBody) { + await (0, utils_js_1.readStreamToLocalFile)(response.readableStreamBody, filePath); + } + // The stream is no longer accessible so setting it to undefined. + response.blobDownloadStream = undefined; + return response; + }); } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); + getBlobAndContainerNamesFromUrl() { + let containerName; + let blobName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer/blob?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob` + // http://localhost:10001/devstoreaccount1/containername/blob + const parsedUrl = new URL(this.url); + if (parsedUrl.host.split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername/blob". + // .getPath() -> /containername/blob + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob + // .getPath() -> /devstoreaccount1/containername/blob + const pathComponents = parsedUrl.pathname.match("/([^/]*)/([^/]*)(/(.*))?"); + containerName = pathComponents[2]; + blobName = pathComponents[4]; + } + else { + // "https://customdomain.com/containername/blob". + // .getPath() -> /containername/blob + const pathComponents = parsedUrl.pathname.match("/([^/]*)(/(.*))?"); + containerName = pathComponents[1]; + blobName = pathComponents[3]; + } + // decode the encoded blobName, containerName - to get all the special characters that might be present in them + containerName = decodeURIComponent(containerName); + blobName = decodeURIComponent(blobName); + // Azure Storage Server will replace "\" with "/" in the blob names + // doing the same in the SDK side so that the user doesn't have to replace "\" instances in the blobName + blobName = blobName.replace(/\\/g, "/"); + if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return { blobName, containerName }; + } + catch (error) { + throw new Error("Unable to extract blobName and containerName with provided information."); + } } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + /** + * Asynchronously copies a blob to a destination within the storage account. + * In version 2012-02-12 and later, the source for a Copy Blob operation can be + * a committed blob in any Azure storage account. + * Beginning with version 2015-02-21, the source for a Copy Blob operation can be + * an Azure file in any Azure storage account. + * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob + * operation to copy from another storage account. + * @see https://learn.microsoft.com/rest/api/storageservices/copy-blob + * + * @param copySource - url to the source Azure Blob/File. + * @param options - Optional options to the Blob Start Copy From URL operation. + */ + async startCopyFromURL(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-startCopyFromURL", options, async (updatedOptions) => { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + return (0, utils_common_js_1.assertResponse)(await this.blobContext.startCopyFromURL(copySource, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions.ifMatch, + sourceIfModifiedSince: options.sourceConditions.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions.tagConditions, + }, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + rehydratePriority: options.rehydratePriority, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + sealBlob: options.sealBlob, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + generateSasStringToSign(options) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, this.credential).stringToSign; } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; + /** + * + * Generates a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, userDelegationKey, this.accountName).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } + /** + * Only available for BlobClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on + * the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + blobName: this._name, + snapshotTime: this._snapshot, + versionId: this._versionId, + ...options, + }, userDelegationKey, this.accountName).stringToSign; } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; + /** + * Delete the immutablility policy on the blob. + * + * @param options - Optional options to delete immutability policy on the blob. + */ + async deleteImmutabilityPolicy(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-deleteImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.deleteImmutabilityPolicy({ + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; + /** + * Set immutability policy on the blob. + * + * @param options - Optional options to set immutability policy on the blob. + */ + async setImmutabilityPolicy(immutabilityPolicy, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setImmutabilityPolicy", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setImmutabilityPolicy({ + immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, + immutabilityPolicyMode: immutabilityPolicy.policyMode, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; + /** + * Set legal hold on the blob. + * + * @param options - Optional options to set legal hold on the blob. + */ + async setLegalHold(legalHoldEnabled, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-setLegalHold", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.setLegalHold(legalHoldEnabled, { + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("BlobClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blobContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); } - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } +exports.BlobClient = BlobClient; +/** + * AppendBlobClient defines a set of operations applicable to append blobs. + */ +class AppendBlobClient extends BlobClient { + /** + * appendBlobsContext provided by protocol layer. + */ + appendBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString; + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + // The second parameter is undefined. Use anonymous credential. + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + super(url, pipeline); + this.appendBlobContext = this.storageClientContext.appendBlob; } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = {}, - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); + /** + * Creates a new AppendBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot) { + return new AppendBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param options - Options to the Append Block Create operation. + * + * + * Example usage: + * + * ```ts snippet:ClientsCreateAppendBlob + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const appendBlobClient = containerClient.getAppendBlobClient(blobName); + * await appendBlobClient.create(); + * ``` + */ + async create(options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.create(0, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; + /** + * Creates a 0-length append blob. Call AppendBlock to append data to an append blob. + * If the blob with the same name already exists, the content of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param options - + */ + async createIfNotExists(options = {}) { + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-createIfNotExists", options, async (updatedOptions) => { + try { + const res = (0, utils_common_js_1.assertResponse)(await this.create({ + ...updatedOptions, + conditions, + })); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + throw e; + } + }); } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); - } else { - _result.push(keyNode); + /** + * Seals the append blob, making it read only. + * + * @param options - + */ + async seal(options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-seal", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.seal({ + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; + /** + * Commits a new block of data to the end of the existing append blob. + * @see https://learn.microsoft.com/rest/api/storageservices/append-block + * + * @param body - Data to be appended. + * @param contentLength - Length of the body in bytes. + * @param options - Options to the Append Block operation. + * + * + * Example usage: + * + * ```ts snippet:ClientsAppendBlock + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * const content = "Hello World!"; + * + * // Create a new append blob and append data to the blob. + * const newAppendBlobClient = containerClient.getAppendBlobClient(blobName); + * await newAppendBlobClient.create(); + * await newAppendBlobClient.appendBlock(content, content.length); + * + * // Append data to an existing append blob. + * const existingAppendBlobClient = containerClient.getAppendBlobClient(blobName); + * await existingAppendBlobClient.appendBlock(content, content.length); + * ``` + */ + async appendBlock(body, contentLength, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlock(contentLength, body, { + abortSignal: options.abortSignal, + appendPositionAccessConditions: options.conditions, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onUploadProgress: options.onProgress, + }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; + /** + * The Append Block operation commits a new block of data to the end of an existing append blob + * where the contents are read from a source url. + * @see https://learn.microsoft.com/rest/api/storageservices/append-block-from-url + * + * @param sourceURL - + * The url to the blob that will be the source of the copy. A source blob in the same storage account can + * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob + * must either be public or must be authenticated via a shared access signature. If the source blob is + * public, no authentication is required to perform the operation. + * @param sourceOffset - Offset in source to be appended + * @param count - Number of bytes to be appended as a block + * @param options - + */ + async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("AppendBlobClient-appendBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, { + abortSignal: options.abortSignal, + sourceRange: (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + appendPositionAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + }, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); +} +exports.AppendBlobClient = AppendBlobClient; +/** + * BlockBlobClient defines a set of operations applicable to block blobs. + */ +class BlockBlobClient extends BlobClient { + /** + * blobContext provided by protocol layer. + * + * Note. Ideally BlobClient should set BlobClient.blobContext to protected. However, API + * extractor has issue blocking that. Here we redecelare _blobContext in BlockBlobClient. + */ + _blobContext; + /** + * blockBlobContext provided by protocol layer. + */ + blockBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { + options = blobNameOrOptions; + } + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); + } + super(url, pipeline); + this.blockBlobContext = this.storageClientContext.blockBlob; + this._blobContext = this.storageClientContext.blob; } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); + /** + * Creates a new BlockBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a URL to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot) { + return new BlockBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Quick query for a JSON or CSV formatted blob. + * + * Example usage (Node.js): + * + * ```ts snippet:ClientsQuery + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * // Query and convert a blob to a string + * const queryBlockBlobResponse = await blockBlobClient.query("select from BlobStorage"); + * if (queryBlockBlobResponse.readableStreamBody) { + * const downloadedBuffer = await streamToBuffer(queryBlockBlobResponse.readableStreamBody); + * const downloaded = downloadedBuffer.toString(); + * console.log(`Query blob content: ${downloaded}`); + * } + * + * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise { + * return new Promise((resolve, reject) => { + * const chunks: Buffer[] = []; + * readableStream.on("data", (data) => { + * chunks.push(data instanceof Buffer ? data : Buffer.from(data)); + * }); + * readableStream.on("end", () => { + * resolve(Buffer.concat(chunks)); + * }); + * readableStream.on("error", reject); + * }); + * } + * ``` + * + * @param query - + * @param options - + */ + async query(query, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + if (!core_util_1.isNodeLike) { + throw new Error("This operation currently is only supported in Node.js."); + } + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-query", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this._blobContext.query({ + abortSignal: options.abortSignal, + queryRequest: { + queryType: "SQL", + expression: query, + inputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.inputTextConfiguration), + outputSerialization: (0, utils_common_js_1.toQuerySerialization)(options.outputTextConfiguration), + }, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + tracingOptions: updatedOptions.tracingOptions, + })); + return new BlobQueryResponse_js_1.BlobQueryResponse(response, { + abortSignal: options.abortSignal, + onProgress: options.onProgress, + onError: options.onError, + }); + }); } - - if (is_EOL(ch)) { - emptyLines++; - continue; + /** + * Creates a new block blob, or updates the content of an existing block blob. + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link stageBlock} and {@link commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link uploadFile}, + * {@link uploadStream} or {@link uploadBrowserData} for better performance + * with concurrency uploading. + * + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to the Block Blob Upload operation. + * @returns Response data for the Block Blob Upload operation. + * + * Example usage: + * + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + async upload(body, contentLength, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-upload", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.upload(contentLength, body, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onUploadProgress: options.onProgress, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; + /** + * Creates a new Block Blob where the contents of the blob are read from a given URL. + * This API is supported beginning with the 2020-04-08 version. Partial updates + * are not supported with Put Blob from URL; the content of an existing blob is overwritten with + * the content of the new blob. To perform partial updates to a block blob’s contents using a + * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}. + * + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Optional parameters. + */ + async syncUploadFromURL(sourceURL, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-syncUploadFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.putBlobFromUrl(0, sourceURL, { + ...options, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + sourceIfTags: options.sourceConditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + copySourceTags: options.copySourceTags, + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + /** + * Uploads the specified block to the block blob's "staging area" to be later + * committed by a call to commitBlockList. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block + * + * @param blockId - A 64-byte value that is base64-encoded + * @param body - Data to upload to the staging area. + * @param contentLength - Number of bytes to upload. + * @param options - Options to the Block Blob Stage Block operation. + * @returns Response data for the Block Blob Stage Block operation. + */ + async stageBlock(blockId, body, contentLength, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlock", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlock(blockId, contentLength, body, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + requestOptions: { + onUploadProgress: options.onProgress, + }, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); + /** + * The Stage Block From URL operation creates a new block to be committed as part + * of a blob where the contents are read from a URL. + * This API is available starting in version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-from-url + * + * @param blockId - A 64-byte value that is base64-encoded + * @param sourceURL - Specifies the URL of the blob. The value + * may be a URL of up to 2 KB in length that specifies a blob. + * The value should be URL-encoded as it would appear + * in a request URI. The source blob must either be public + * or must be authenticated via a shared access signature. + * If the source blob is public, no authentication is required + * to perform the operation. Here are some examples of source object URLs: + * - https://myaccount.blob.core.windows.net/mycontainer/myblob + * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param offset - From which position of the blob to download, greater than or equal to 0 + * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined + * @param options - Options to the Block Blob Stage Block From URL operation. + * @returns Response data for the Block Blob Stage Block From URL operation. + */ + async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) { + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-stageBlockFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + sourceRange: offset === 0 && !count ? undefined : (0, Range_js_1.rangeToString)({ offset, count }), + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - - if (ch !== 0x2D/* - */) { - break; + /** + * Writes a blob by specifying the list of block IDs that make up the blob. + * In order to be written as part of a blob, a block must have been successfully written + * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to + * update a blob by uploading only those blocks that have changed, then committing the new and existing + * blocks together. Any blocks not specified in the block list and permanently deleted. + * @see https://learn.microsoft.com/rest/api/storageservices/put-block-list + * + * @param blocks - Array of 64-byte value that is base64-encoded + * @param options - Options to the Block Blob Commit Block List operation. + * @returns Response data for the Block Blob Commit Block List operation. + */ + async commitBlockList(blocks, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-commitBlockList", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.commitBlockList({ latest: blocks }, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; + /** + * Returns the list of blocks that have been uploaded as part of a block blob + * using the specified block list filter. + * @see https://learn.microsoft.com/rest/api/storageservices/get-block-list + * + * @param listType - Specifies whether to return the list of committed blocks, + * the list of uncommitted blocks, or both lists together. + * @param options - Options to the Block Blob Get Block List operation. + * @returns Response data for the Block Blob Get Block List operation. + */ + async getBlockList(listType, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-getBlockList", options, async (updatedOptions) => { + const res = (0, utils_common_js_1.assertResponse)(await this.blockBlobContext.getBlockList(listType, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + if (!res.committedBlocks) { + res.committedBlocks = []; + } + if (!res.uncommittedBlocks) { + res.uncommittedBlocks = []; + } + return res; + }); } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } + // High level functions + /** + * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob. + * + * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. + * + * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView + * @param options - + */ + async uploadData(data, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadData", options, async (updatedOptions) => { + if (core_util_1.isNodeLike) { + let buffer; + if (data instanceof Buffer) { + buffer = data; + } + else if (data instanceof ArrayBuffer) { + buffer = Buffer.from(data); + } + else { + data = data; + buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength); + } + return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions); + } + else { + const browserBlob = new Blob([data]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); + } + }); } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; + /** + * ONLY AVAILABLE IN BROWSERS. + * + * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob. + * + * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call + * {@link commitBlockList} to commit the block list. + * + * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is + * `blobContentType`, enabling the browser to provide + * functionality based on file type. + * + * @deprecated Use {@link uploadData} instead. + * + * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView + * @param options - Options to upload browser data. + * @returns Response data for the Blob Upload operation. + */ + async uploadBrowserData(browserData, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadBrowserData", options, async (updatedOptions) => { + const browserBlob = new Blob([browserData]); + return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions); + }); } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _pos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = {}, - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - _pos = state.position; - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; + /** + * + * Uploads data to block blob. Requires a bodyFactory as the data source, + * which need to return a {@link HttpRequestBody} object with the offset and size provided. + * + * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is + * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload. + * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList} + * to commit the block list. + * + * @param bodyFactory - + * @param size - size of the data to upload. + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadSeekableInternal(bodyFactory, size, options = {}) { + let blockSize = options.blockSize ?? 0; + if (blockSize < 0 || blockSize > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) { + throw new RangeError(`blockSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`); } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); + const maxSingleShotSize = options.maxSingleShotSize ?? constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES; + if (maxSingleShotSize < 0 || maxSingleShotSize > constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) { + throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${constants_js_1.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`); } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. + if (blockSize === 0) { + if (size > constants_js_1.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`${size} is too larger to upload to a block blob.`); + } + if (size > maxSingleShotSize) { + blockSize = Math.ceil(size / constants_js_1.BLOCK_BLOB_MAX_BLOCKS); + if (blockSize < constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) { + blockSize = constants_js_1.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES; + } + } } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else { - break; // Reading is done. Go to the epilogue. - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if (state.lineIndent > nodeIndent && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadSeekableInternal", options, async (updatedOptions) => { + if (size <= maxSingleShotSize) { + return (0, utils_common_js_1.assertResponse)(await this.upload(bodyFactory(0, size), size, updatedOptions)); + } + const numBlocks = Math.floor((size - 1) / blockSize) + 1; + if (numBlocks > constants_js_1.BLOCK_BLOB_MAX_BLOCKS) { + throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` + + `the number of blocks must be <= ${constants_js_1.BLOCK_BLOB_MAX_BLOCKS}`); + } + const blockList = []; + const blockIDPrefix = (0, core_util_2.randomUUID)(); + let transferProgress = 0; + const batch = new Batch_js_1.Batch(options.concurrency); + for (let i = 0; i < numBlocks; i++) { + batch.addOperation(async () => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, i); + const start = blockSize * i; + const end = i === numBlocks - 1 ? size : start + blockSize; + const contentLength = end - start; + blockList.push(blockID); + await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, { + abortSignal: options.abortSignal, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + }); + // Update progress after block is successfully uploaded to server, in case of block trying + // TODO: Hook with convenience layer progress event in finer level + transferProgress += contentLength; + if (options.onProgress) { + options.onProgress({ + loadedBytes: transferProgress, + }); + } + }); + } + await batch.do(); + return this.commitBlockList(blockList, updatedOptions); + }); } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a local file in blocks to a block blob. + * + * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload. + * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList + * to commit the block list. + * + * @param filePath - Full path of local file + * @param options - Options to Upload to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadFile(filePath, options = {}) { + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadFile", options, async (updatedOptions) => { + const size = (await (0, utils_js_1.fsStat)(filePath)).size; + return this.uploadSeekableInternal((offset, count) => { + return () => (0, utils_js_1.fsCreateReadStream)(filePath, { + autoClose: true, + end: count ? offset + count - 1 : Infinity, + start: offset, + }); + }, size, { + ...options, + tracingOptions: updatedOptions.tracingOptions, + }); + }); } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); + /** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Uploads a Node.js Readable stream into block blob. + * + * PERFORMANCE IMPROVEMENT TIPS: + * * Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * + * @param stream - Node.js Readable stream + * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB + * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated, + * positive correlation with max uploading concurrency. Default value is 5 + * @param options - Options to Upload Stream to Block Blob operation. + * @returns Response data for the Blob Upload operation. + */ + async uploadStream(stream, bufferSize = constants_js_1.DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) { + if (!options.blobHTTPHeaders) { + options.blobHTTPHeaders = {}; } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { + let blockNum = 0; + const blockIDPrefix = (0, core_util_2.randomUUID)(); + let transferProgress = 0; + const blockList = []; + const scheduler = new storage_common_1.BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => { + const blockID = (0, utils_common_js_1.generateBlockID)(blockIDPrefix, blockNum); + blockList.push(blockID); + blockNum++; + await this.stageBlock(blockID, body, length, { + customerProvidedKey: options.customerProvidedKey, + conditions: options.conditions, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + }); + // Update progress after block is successfully uploaded to server, in case of block trying + transferProgress += length; + if (options.onProgress) { + options.onProgress({ loadedBytes: transferProgress }); + } + }, + // concurrency should set a smaller value than maxConcurrency, which is helpful to + // reduce the possibility when a outgoing handler waits for stream data, in + // this situation, outgoing handlers are blocked. + // Outgoing queue shouldn't be empty. + Math.ceil((maxConcurrency / 4) * 3)); + await scheduler.do(); + return (0, utils_common_js_1.assertResponse)(await this.commitBlockList(blockList, { + ...options, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!state.anchorMap.hasOwnProperty(alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; } - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; +exports.BlockBlobClient = BlockBlobClient; +/** + * PageBlobClient defines a set of operations applicable to page blobs. + */ +class PageBlobClient extends BlobClient { + /** + * pageBlobsContext provided by protocol layer. + */ + pageBlobContext; + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead. + // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options); + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + options = blobNameOrOptions; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag !== null && state.tag !== '!') { - if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string" && + blobNameOrOptions && + typeof blobNameOrOptions === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const blobName = blobNameOrOptions; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)((0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } } - } - } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; + else { + throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - } - } else { - throwError(state, 'unknown tag !<' + state.tag + '>'); + super(url, pipeline); + this.pageBlobContext = this.storageClientContext.pageBlob; + } + /** + * Creates a new PageBlobClient object identical to the source but with the + * specified snapshot timestamp. + * Provide "" will remove the snapshot and return a Client to the base blob. + * + * @param snapshot - The snapshot timestamp. + * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp. + */ + withSnapshot(snapshot) { + return new PageBlobClient((0, utils_common_js_1.setURLParameter)(this.url, constants_js_1.URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline); + } + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param size - size of the page blob. + * @param options - Options to the Page Blob Create operation. + * @returns Response data for the Page Blob Create operation. + */ + async create(size, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.create(0, size, { + abortSignal: options.abortSignal, + blobHttpHeaders: options.blobHTTPHeaders, + blobSequenceNumber: options.blobSequenceNumber, + leaseAccessConditions: options.conditions, + metadata: options.metadata, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + immutabilityPolicyExpiry: options.immutabilityPolicy?.expiriesOn, + immutabilityPolicyMode: options.immutabilityPolicy?.policyMode, + legalHold: options.legalHold, + tier: (0, models_js_1.toAccessTier)(options.tier), + blobTagsString: (0, utils_common_js_1.toBlobTagsString)(options.tags), + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Creates a page blob of the specified length. Call uploadPages to upload data + * data to a page blob. If the blob with the same name already exists, the content + * of the existing blob will remain unchanged. + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param size - size of the page blob. + * @param options - + */ + async createIfNotExists(size, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-createIfNotExists", options, async (updatedOptions) => { + try { + const conditions = { ifNoneMatch: constants_js_1.ETagAny }; + const res = (0, utils_common_js_1.assertResponse)(await this.create(size, { + ...options, + conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "BlobAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + throw e; + } + }); + } + /** + * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page + * + * @param body - Data to upload + * @param offset - Offset of destination page blob + * @param count - Content length of the body, also number of bytes to be uploaded + * @param options - Options to the Page Blob Upload Pages operation. + * @returns Response data for the Page Blob Upload Pages operation. + */ + async uploadPages(body, offset, count, options = {}) { + options.conditions = options.conditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPages(count, body, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + requestOptions: { + onUploadProgress: options.onProgress, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + sequenceNumberAccessConditions: options.conditions, + transactionalContentMD5: options.transactionalContentMD5, + transactionalContentCrc64: options.transactionalContentCrc64, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = {}; - state.anchorMap = {}; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; + /** + * The Upload Pages operation writes a range of pages to a page blob where the + * contents are read from a URL. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page-from-url + * + * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication + * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob + * @param destOffset - Offset of destination page blob + * @param count - Number of bytes to be uploaded from source page blob + * @param options - + */ + async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) { + options.conditions = options.conditions || {}; + options.sourceConditions = options.sourceConditions || {}; + (0, models_js_1.ensureCpkIfSpecified)(options.customerProvidedKey, this.isHttps); + return tracing_js_1.tracingClient.withSpan("PageBlobClient-uploadPagesFromURL", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.uploadPagesFromURL(sourceURL, (0, Range_js_1.rangeToString)({ offset: sourceOffset, count }), 0, (0, Range_js_1.rangeToString)({ offset: destOffset, count }), { + abortSignal: options.abortSignal, + sourceContentMD5: options.sourceContentMD5, + sourceContentCrc64: options.sourceContentCrc64, + leaseAccessConditions: options.conditions, + sequenceNumberAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + sourceModifiedAccessConditions: { + sourceIfMatch: options.sourceConditions?.ifMatch, + sourceIfModifiedSince: options.sourceConditions?.ifModifiedSince, + sourceIfNoneMatch: options.sourceConditions?.ifNoneMatch, + sourceIfUnmodifiedSince: options.sourceConditions?.ifUnmodifiedSince, + }, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + copySourceAuthorization: (0, utils_common_js_1.httpAuthorizationToString)(options.sourceAuthorization), + fileRequestIntent: options.sourceShareTokenIntent, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); + /** + * Frees the specified pages from the page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/put-page + * + * @param offset - Starting byte position of the pages to clear. + * @param count - Number of bytes to clear. + * @param options - Options to the Page Blob Clear Pages operation. + * @returns Response data for the Page Blob Clear Pages operation. + */ + async clearPages(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-clearPages", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.clearPages(0, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + sequenceNumberAccessConditions: options.conditions, + cpkInfo: options.customerProvidedKey, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); + /** + * Returns the list of valid page ranges for a page blob or snapshot of a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns Response data for the Page Blob Get Ranges operation. + */ + async getPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRanges", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + tracingOptions: updatedOptions.tracingOptions, + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); + }); } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); + /** + * getPageRangesSegment returns a single segment of page ranges starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to PageBlob Get Page Ranges Segment operation. + */ + async listPageRangesSegment(offset = 0, count, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRanges({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + range: (0, Range_js_1.rangeToString)({ offset, count }), + marker: marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); + /** + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel} + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param marker - A string value that identifies the portion of + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get + * items. The marker value is opaque to the client. + * @param options - Options to List Page Ranges operation. + */ + async *listPageRangeItemSegments(offset = 0, count, marker, options = {}) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === undefined) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesSegment(offset, count, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); + /** + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to List Page Ranges operation. + */ + async *listPageRangeItems(offset = 0, count, options = {}) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeItemSegments(offset, count, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; + /** + * Returns an async iterable iterator to list of page ranges for a page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * .byPage() returns an async iterable iterator to list of page ranges for a page blob. + * + * ```ts snippet:ClientsListPageBlobs + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * // Example using `for await` syntax + * let i = 1; + * for await (const pageRange of pageBlobClient.listPageRanges()) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRanges(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * ``` + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns An asyncIterableIterator that supports paging. + */ + listPageRanges(offset = 0, count, options = {}) { + options.conditions = options.conditions || {}; + // AsyncIterableIterator to iterate over blobs + const iter = this.listPageRangeItems(offset, count, options); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listPageRangeItemSegments(offset, count, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options, + }); + }, + }; } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. + */ + async getPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiff", options, async (updatedOptions) => { + const result = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + prevsnapshot: prevSnapshot, + range: (0, Range_js_1.rangeToString)({ offset, count }), + tracingOptions: updatedOptions.tracingOptions, + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(result); + }); } - } - - var state = new State(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -function safeLoadAll(input, iterator, options) { - if (typeof iterator === 'object' && iterator !== null && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -function safeLoad(input, options) { - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; - - -/***/ }), - -/***/ 77262: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - - -var common = __nccwpck_require__(59941); - - -function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; -} - - -Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { - var head, start, tail, end, snippet; - - if (!this.buffer) return null; - - indent = indent || 4; - maxLength = maxLength || 75; - - head = ''; - start = this.position; - - while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; + /** + * getPageRangesDiffSegment returns a single segment of page ranges starting from the + * specified Marker for difference between previous snapshot and the target page blob. + * Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call getPageRangesDiffSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of the get to be returned with the next get operation. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-getPageRangesDiffSegment", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options?.abortSignal, + leaseAccessConditions: options?.conditions, + modifiedAccessConditions: { + ...options?.conditions, + ifTags: options?.conditions?.tagConditions, + }, + prevsnapshot: prevSnapshotOrUrl, + range: (0, Range_js_1.rangeToString)({ + offset: offset, + count: count, + }), + marker: marker, + maxPageSize: options?.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - } - - tail = ''; - end = this.position; - - while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; + /** + * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel} + * + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param marker - A string value that identifies the portion of + * the get of page ranges to be returned with the next getting operation. The + * operation returns the ContinuationToken value within the response body if the + * getting operation did not return all page ranges remaining within the current page. + * The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of get + * items. The marker value is opaque to the client. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async *listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) { + let getPageRangeItemSegmentsResponse; + if (!!marker || marker === undefined) { + do { + getPageRangeItemSegmentsResponse = await this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options); + marker = getPageRangeItemSegmentsResponse.continuationToken; + yield await getPageRangeItemSegmentsResponse; + } while (marker); + } } - } - - snippet = this.buffer.slice(start, end); - - return common.repeat(' ', indent) + head + snippet + tail + '\n' + - common.repeat(' ', indent + this.position - start + head.length) + '^'; -}; - - -Mark.prototype.toString = function toString(compact) { - var snippet, where = ''; - - if (this.name) { - where += 'in "' + this.name + '" '; - } - - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - - if (!compact) { - snippet = this.getSnippet(); - - if (snippet) { - where += ':\n' + snippet; + /** + * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + */ + async *listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) { + let marker; + for await (const getPageRangesSegment of this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)) { + yield* (0, utils_common_js_1.ExtractPageRangeInfoItems)(getPageRangesSegment); + } } - } - - return where; -}; - - -module.exports = Mark; - - -/***/ }), - -/***/ 66280: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable max-len*/ - -var common = __nccwpck_require__(59941); -var YAMLException = __nccwpck_require__(29291); -var Type = __nccwpck_require__(90256); - - -function compileList(schema, name, result) { - var exclude = []; - - schema.include.forEach(function (includedSchema) { - result = compileList(includedSchema, name, result); - }); - - schema[name].forEach(function (currentType) { - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { - exclude.push(previousIndex); - } - }); - - result.push(currentType); - }); - - return result.filter(function (type, index) { - return exclude.indexOf(index) === -1; - }); -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {} - }, index, length; - - function collectType(type) { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; - - this.implicit.forEach(function (type) { - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + /** + * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob. + * + * ```ts snippet:ClientsListPageBlobsDiff + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const pageBlobClient = containerClient.getPageBlobClient(blobName); + * + * const offset = 0; + * const count = 1024; + * const previousSnapshot = ""; + * // Example using `for await` syntax + * let i = 1; + * for await (const pageRange of pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot)) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = pageBlobClient.listPageRangesDiff(offset, count, previousSnapshot); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Page range ${i++}: ${value.start} - ${value.end}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 20 })) { + * for (const pageRange of page.pageRange || []) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = pageBlobClient + * .listPageRangesDiff(offset, count, previousSnapshot) + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 page ranges + * if (response.pageRange) { + * for (const pageRange of response.pageRange) { + * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`); + * } + * } + * ``` + * + * @param offset - Starting byte position of the page ranges. + * @param count - Number of bytes to get. + * @param prevSnapshot - Timestamp of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Ranges operation. + * @returns An asyncIterableIterator that supports paging. + */ + listPageRangesDiff(offset, count, prevSnapshot, options = {}) { + options.conditions = options.conditions || {}; + // AsyncIterableIterator to iterate over blobs + const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, { + ...options, + }); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...options, + }); + }, + }; } - }); - - this.compiledImplicit = compileList(this, 'implicit', []); - this.compiledExplicit = compileList(this, 'explicit', []); - this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); -} - - -Schema.DEFAULT = null; - - -Schema.create = function createSchema() { - var schemas, types; - - switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; - - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; - - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); - } - - schemas = common.toArray(schemas); - types = common.toArray(types); - - if (!schemas.every(function (schema) { return schema instanceof Schema; })) { - throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); - } - - if (!types.every(function (type) { return type instanceof Type; })) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - return new Schema({ - include: schemas, - explicit: types - }); -}; - - -module.exports = Schema; - - -/***/ }), - -/***/ 11950: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - - - - -var Schema = __nccwpck_require__(66280); - - -module.exports = new Schema({ - include: [ - __nccwpck_require__(2168) - ] -}); - - -/***/ }), - -/***/ 145: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// JS-YAML's default schema for `load` function. -// It is not described in the YAML specification. -// -// This schema is based on JS-YAML's default safe schema and includes -// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. -// -// Also this schema is used as default base schema at `Schema.create` function. - - - - - -var Schema = __nccwpck_require__(66280); - - -module.exports = Schema.DEFAULT = new Schema({ - include: [ - __nccwpck_require__(42881) - ], - explicit: [ - __nccwpck_require__(34801), - __nccwpck_require__(77234), - __nccwpck_require__(35361) - ] -}); - - -/***/ }), - -/***/ 42881: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - - - - -var Schema = __nccwpck_require__(66280); - - -module.exports = new Schema({ - include: [ - __nccwpck_require__(11950) - ], - implicit: [ - __nccwpck_require__(82018), - __nccwpck_require__(60194) - ], - explicit: [ - __nccwpck_require__(21716), - __nccwpck_require__(96439), - __nccwpck_require__(33730), - __nccwpck_require__(9047) - ] -}); - - -/***/ }), - -/***/ 70026: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - - - - -var Schema = __nccwpck_require__(66280); - - -module.exports = new Schema({ - explicit: [ - __nccwpck_require__(24649), - __nccwpck_require__(65629), - __nccwpck_require__(15938) - ] -}); - - -/***/ }), - -/***/ 2168: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - - - - -var Schema = __nccwpck_require__(66280); - - -module.exports = new Schema({ - include: [ - __nccwpck_require__(70026) - ], - implicit: [ - __nccwpck_require__(26058), - __nccwpck_require__(93195), - __nccwpck_require__(76865), - __nccwpck_require__(16480) - ] -}); - - -/***/ }), - -/***/ 90256: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var YAMLException = __nccwpck_require__(29291); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + /** + * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks. + * @see https://learn.microsoft.com/rest/api/storageservices/get-page-ranges + * + * @param offset - Starting byte position of the page blob + * @param count - Number of bytes to get ranges diff. + * @param prevSnapshotUrl - URL of snapshot to retrieve the difference. + * @param options - Options to the Page Blob Get Page Ranges Diff operation. + * @returns Response data for the Page Blob Get Page Range Diff operation. + */ + async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.getPageRangesDiff({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + prevSnapshotUrl, + range: (0, Range_js_1.rangeToString)({ offset, count }), + tracingOptions: updatedOptions.tracingOptions, + })); + return (0, PageBlobRangeResponse_js_1.rangeResponseFromModel)(response); + }); } - }); - - // TODO: Add tag format check. - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; - - -/***/ }), - -/***/ 21716: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/*eslint-disable no-bitwise*/ - -var NodeBuffer; - -try { - // A trick for browserified version, to not include `Buffer` shim - var _require = require; - NodeBuffer = _require('buffer').Buffer; -} catch (__) {} - -var Type = __nccwpck_require__(90256); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); + /** + * Resizes the page blob to the specified size (which must be a multiple of 512). + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param size - Target size + * @param options - Options to the Page Blob Resize operation. + * @returns Response data for the Page Blob Resize operation. + */ + async resize(size, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-resize", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.resize(size, { + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + encryptionScope: options.encryptionScope, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - // Wrap into Buffer for NodeJS and leave Array for browser - if (NodeBuffer) { - // Support node 6.+ Buffer API when available - return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); - } - - return result; -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; + /** + * Sets a page blob's sequence number. + * @see https://learn.microsoft.com/rest/api/storageservices/set-blob-properties + * + * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number. + * @param sequenceNumber - Required if sequenceNumberAction is max or update + * @param options - Options to the Page Blob Update Sequence Number operation. + * @returns Response data for the Page Blob Update Sequence Number operation. + */ + async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("PageBlobClient-updateSequenceNumber", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, { + abortSignal: options.abortSignal, + blobSequenceNumber: sequenceNumber, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob. + * The snapshot is copied such that only the differential changes between the previously + * copied snapshot are transferred to the destination. + * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. + * @see https://learn.microsoft.com/rest/api/storageservices/incremental-copy-blob + * @see https://learn.microsoft.com/azure/virtual-machines/windows/incremental-snapshots + * + * @param copySource - Specifies the name of the source page blob snapshot. For example, + * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot= + * @param options - Options to the Page Blob Copy Incremental operation. + * @returns Response data for the Page Blob Copy Incremental operation. + */ + async startCopyIncremental(copySource, options = {}) { + return tracing_js_1.tracingClient.withSpan("PageBlobClient-startCopyIncremental", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.pageBlobContext.copyIncremental(copySource, { + abortSignal: options.abortSignal, + modifiedAccessConditions: { + ...options.conditions, + ifTags: options.conditions?.tagConditions, + }, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(object) { - return NodeBuffer && NodeBuffer.isBuffer(object); -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); - - -/***/ }), - -/***/ 93195: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(90256); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; } - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); - +exports.PageBlobClient = PageBlobClient; +//# sourceMappingURL=Clients.js.map /***/ }), -/***/ 16480: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 63750: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var common = __nccwpck_require__(59941); -var Type = __nccwpck_require__(90256); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // 20:59 - '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign, base, digits; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - digits = []; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - - } else if (value.indexOf(':') >= 0) { - value.split(':').forEach(function (v) { - digits.unshift(parseFloat(v, 10)); - }); - - value = 0.0; - base = 1; - - digits.forEach(function (d) { - value += d * base; - base *= 60; - }); - - return sign * value; - - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ContainerClient = void 0; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const core_auth_1 = __nccwpck_require__(98834); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const Pipeline_js_1 = __nccwpck_require__(33781); +const StorageClient_js_1 = __nccwpck_require__(39484); +const tracing_js_1 = __nccwpck_require__(53683); +const utils_common_js_1 = __nccwpck_require__(16673); +const BlobSASSignatureValues_js_1 = __nccwpck_require__(48921); +const BlobLeaseClient_js_1 = __nccwpck_require__(20106); +const Clients_js_1 = __nccwpck_require__(54437); +const BlobBatchClient_js_1 = __nccwpck_require__(71861); +/** + * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs. + */ +class ContainerClient extends StorageClient_js_1.StorageClient { + /** + * containerContext provided by protocol layer. + */ + containerContext; + _containerName; + /** + * The name of the container. + */ + get containerName() { + return this._containerName; + } + constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, + // Legacy, no fix for eslint error without breaking. Disable it for this interface. + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + options) { + let pipeline; + let url; + options = options || {}; + if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipelineOrContainerName)) { + // (url: string, pipeline: Pipeline) + url = urlOrConnectionString; + pipeline = credentialOrPipelineOrContainerName; + } + else if ((core_util_1.isNodeLike && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) || + credentialOrPipelineOrContainerName instanceof AnonymousCredential_js_1.AnonymousCredential || + (0, core_auth_1.isTokenCredential)(credentialOrPipelineOrContainerName)) { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipelineOrContainerName, options); + } + else if (!credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName !== "string") { + // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) + // The second parameter is undefined. Use anonymous credential. + url = urlOrConnectionString; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else if (credentialOrPipelineOrContainerName && + typeof credentialOrPipelineOrContainerName === "string") { + // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions) + const containerName = credentialOrPipelineOrContainerName; + const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(urlOrConnectionString); + if (extractedCreds.kind === "AccountConnString") { + if (core_util_1.isNodeLike) { + const sharedKeyCredential = new StorageSharedKeyCredential_js_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); + url = (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)); + if (!options.proxyOptions) { + options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri); + } + pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options); + } + else { + throw new Error("Account connection string is only supported in Node.js environment"); + } + } + else if (extractedCreds.kind === "SASConnString") { + url = + (0, utils_common_js_1.appendToURLPath)(extractedCreds.url, encodeURIComponent(containerName)) + + "?" + + extractedCreds.accountSas; + pipeline = (0, Pipeline_js_1.newPipeline)(new AnonymousCredential_js_1.AnonymousCredential(), options); + } + else { + throw new Error("Connection string must be either an Account connection string or a SAS connection string"); + } + } + else { + throw new Error("Expecting non-empty strings for containerName parameter"); + } + super(url, pipeline); + this._containerName = this.getContainerNameFromUrl(); + this.containerContext = this.storageClientContext.container; + } + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, the operation fails. + * @see https://learn.microsoft.com/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * + * @param options - Options to Container Create operation. + * + * + * Example usage: + * + * ```ts snippet:ContainerClientCreate + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const createContainerResponse = await containerClient.create(); + * console.log("Container was created successfully", createContainerResponse.requestId); + * ``` + */ + async create(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-create", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.create(updatedOptions)); + }); + } + /** + * Creates a new container under the specified account. If the container with + * the same name already exists, it is not changed. + * @see https://learn.microsoft.com/rest/api/storageservices/create-container + * Naming rules: @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * + * @param options - + */ + async createIfNotExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-createIfNotExists", options, async (updatedOptions) => { + try { + const res = await this.create(updatedOptions); + return { + succeeded: true, + ...res, + _response: res._response, // _response is made non-enumerable + }; + } + catch (e) { + if (e.details?.errorCode === "ContainerAlreadyExists") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + else { + throw e; + } + } + }); + } + /** + * Returns true if the Azure container resource represented by this client exists; false otherwise. + * + * NOTE: use this function with care since an existing container might be deleted by other clients or + * applications. Vice versa new containers with the same name might be added by other clients or + * applications after this function completes. + * + * @param options - + */ + async exists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-exists", options, async (updatedOptions) => { + try { + await this.getProperties({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + }); + return true; + } + catch (e) { + if (e.statusCode === 404) { + return false; + } + throw e; + } + }); + } + /** + * Creates a {@link BlobClient} + * + * @param blobName - A blob name + * @returns A new BlobClient object for the given blob name. + */ + getBlobClient(blobName) { + return new Clients_js_1.BlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Creates an {@link AppendBlobClient} + * + * @param blobName - An append blob name + */ + getAppendBlobClient(blobName) { + return new Clients_js_1.AppendBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Creates a {@link BlockBlobClient} + * + * @param blobName - A block blob name + * + * + * Example usage: + * + * ```ts snippet:ClientsUpload + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const blobName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * const blockBlobClient = containerClient.getBlockBlobClient(blobName); + * + * const content = "Hello world!"; + * const uploadBlobResponse = await blockBlobClient.upload(content, content.length); + * ``` + */ + getBlockBlobClient(blobName) { + return new Clients_js_1.BlockBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Creates a {@link PageBlobClient} + * + * @param blobName - A page blob name + */ + getPageBlobClient(blobName) { + return new Clients_js_1.PageBlobClient((0, utils_common_js_1.appendToURLPath)(this.url, (0, utils_common_js_1.EscapePath)(blobName)), this.pipeline); + } + /** + * Returns all user-defined metadata and system properties for the specified + * container. The data returned does not include the container's list of blobs. + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties + * + * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if + * they originally contained uppercase characters. This differs from the metadata keys returned by + * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which + * will retain their original casing. + * + * @param options - Options to Container Get Properties operation. + */ + async getProperties(options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-getProperties", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getProperties({ + abortSignal: options.abortSignal, + ...options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Marks the specified container for deletion. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container + * + * @param options - Options to Container Delete operation. + */ + async delete(options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-delete", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.delete({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Marks the specified container for deletion if it exists. The container and any blobs + * contained within it are later deleted during garbage collection. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-container + * + * @param options - Options to Container Delete operation. + */ + async deleteIfExists(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteIfExists", options, async (updatedOptions) => { + try { + const res = await this.delete(updatedOptions); + return { + succeeded: true, + ...res, + _response: res._response, + }; + } + catch (e) { + if (e.details?.errorCode === "ContainerNotFound") { + return { + succeeded: false, + ...e.response?.parsedHeaders, + _response: e.response, + }; + } + throw e; + } + }); + } + /** + * Sets one or more user-defined name-value pairs for the specified container. + * + * If no option provided, or no metadata defined in the parameter, the container + * metadata will be removed. + * + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata + * + * @param metadata - Replace existing metadata with this value. + * If no value provided the existing metadata will be removed. + * @param options - Options to Container Set Metadata operation. + */ + async setMetadata(metadata, options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + if (options.conditions.ifUnmodifiedSince) { + throw new RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service"); + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-setMetadata", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setMetadata({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + metadata, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Gets the permissions for the specified container. The permissions indicate + * whether container data may be accessed publicly. + * + * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings. + * For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z". + * + * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl + * + * @param options - Options to Container Get Access Policy operation. + */ + async getAccessPolicy(options = {}) { + if (!options.conditions) { + options.conditions = {}; + } + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccessPolicy", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccessPolicy({ + abortSignal: options.abortSignal, + leaseAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + const res = { + _response: response._response, + blobPublicAccess: response.blobPublicAccess, + date: response.date, + etag: response.etag, + errorCode: response.errorCode, + lastModified: response.lastModified, + requestId: response.requestId, + clientRequestId: response.clientRequestId, + signedIdentifiers: [], + version: response.version, + }; + for (const identifier of response) { + let accessPolicy = undefined; + if (identifier.accessPolicy) { + accessPolicy = { + permissions: identifier.accessPolicy.permissions, + }; + if (identifier.accessPolicy.expiresOn) { + accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn); + } + if (identifier.accessPolicy.startsOn) { + accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn); + } + } + res.signedIdentifiers.push({ + accessPolicy, + id: identifier.id, + }); + } + return res; + }); + } + /** + * Sets the permissions for the specified container. The permissions indicate + * whether blobs in a container may be accessed publicly. + * + * When you set permissions for a container, the existing permissions are replaced. + * If no access or containerAcl provided, the existing container ACL will be + * removed. + * + * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect. + * During this interval, a shared access signature that is associated with the stored access policy will + * fail with status code 403 (Forbidden), until the access policy becomes active. + * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl + * + * @param access - The level of public access to data in the container. + * @param containerAcl - Array of elements each having a unique Id and details of the access policy. + * @param options - Options to Container Set Access Policy operation. + */ + async setAccessPolicy(access, containerAcl, options = {}) { + options.conditions = options.conditions || {}; + return tracing_js_1.tracingClient.withSpan("ContainerClient-setAccessPolicy", options, async (updatedOptions) => { + const acl = []; + for (const identifier of containerAcl || []) { + acl.push({ + accessPolicy: { + expiresOn: identifier.accessPolicy.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.expiresOn) + : "", + permissions: identifier.accessPolicy.permissions, + startsOn: identifier.accessPolicy.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(identifier.accessPolicy.startsOn) + : "", + }, + id: identifier.id, + }); + } + return (0, utils_common_js_1.assertResponse)(await this.containerContext.setAccessPolicy({ + abortSignal: options.abortSignal, + access, + containerAcl: acl, + leaseAccessConditions: options.conditions, + modifiedAccessConditions: options.conditions, + tracingOptions: updatedOptions.tracingOptions, + })); + }); + } + /** + * Get a {@link BlobLeaseClient} that manages leases on the container. + * + * @param proposeLeaseId - Initial proposed lease Id. + * @returns A new BlobLeaseClient object for managing leases on the container. + */ + getBlobLeaseClient(proposeLeaseId) { + return new BlobLeaseClient_js_1.BlobLeaseClient(this, proposeLeaseId); + } + /** + * Creates a new block blob, or updates the content of an existing block blob. + * + * Updating an existing block blob overwrites any existing metadata on the blob. + * Partial updates are not supported; the content of the existing blob is + * overwritten with the new content. To perform a partial update of a block blob's, + * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}. + * + * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile}, + * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better + * performance with concurrency uploading. + * + * @see https://learn.microsoft.com/rest/api/storageservices/put-blob + * + * @param blobName - Name of the block blob to create or update. + * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function + * which returns a new Readable stream whose offset is from data source beginning. + * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a + * string including non non-Base64/Hex-encoded characters. + * @param options - Options to configure the Block Blob Upload operation. + * @returns Block Blob upload response data and the corresponding BlockBlobClient instance. + */ + async uploadBlockBlob(blobName, body, contentLength, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-uploadBlockBlob", options, async (updatedOptions) => { + const blockBlobClient = this.getBlockBlobClient(blobName); + const response = await blockBlobClient.upload(body, contentLength, updatedOptions); + return { + blockBlobClient, + response, + }; + }); + } + /** + * Marks the specified blob or snapshot for deletion. The blob is later deleted + * during garbage collection. Note that in order to delete a blob, you must delete + * all of its snapshots. You can delete both at the same time with the Delete + * Blob operation. + * @see https://learn.microsoft.com/rest/api/storageservices/delete-blob + * + * @param blobName - + * @param options - Options to Blob Delete operation. + * @returns Block blob deletion response data. + */ + async deleteBlob(blobName, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-deleteBlob", options, async (updatedOptions) => { + let blobClient = this.getBlobClient(blobName); + if (options.versionId) { + blobClient = blobClient.withVersion(options.versionId); + } + return blobClient.delete(updatedOptions); + }); + } + /** + * listBlobFlatSegment returns a single segment of blobs starting from the + * specified Marker. Use an empty Marker to start enumeration from the beginning. + * After getting a segment, process it, and then call listBlobsFlatSegment again + * (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Flat Segment operation. + */ + async listBlobFlatSegment(marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobFlatSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobFlatSegment({ + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobFlat)(response._response.parsedBody), + }, // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata), + }; + return blobItem; + }), + }, + }; + return wrappedResponse; + }); + } + /** + * listBlobHierarchySegment returns a single segment of blobs starting from + * the specified Marker. Use an empty Marker to start enumeration from the + * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment + * again (passing the the previously-returned Marker) to get the next segment. + * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of the list to be returned with the next list operation. + * @param options - Options to Container List Blob Hierarchy Segment operation. + */ + async listBlobHierarchySegment(delimiter, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-listBlobHierarchySegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.listBlobHierarchySegment(delimiter, { + marker, + ...options, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: { + ...response._response, + parsedBody: (0, utils_common_js_1.ConvertInternalResponseOfListBlobHierarchy)(response._response.parsedBody), + }, // _response is made non-enumerable + segment: { + ...response.segment, + blobItems: response.segment.blobItems.map((blobItemInternal) => { + const blobItem = { + ...blobItemInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobItemInternal.name), + tags: (0, utils_common_js_1.toTags)(blobItemInternal.blobTags), + objectReplicationSourceProperties: (0, utils_common_js_1.parseObjectReplicationRecord)(blobItemInternal.objectReplicationMetadata), + }; + return blobItem; + }), + blobPrefixes: response.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: (0, utils_common_js_1.BlobNameToString)(blobPrefixInternal.name), + }; + return blobPrefix; + }), + }, + }; + return wrappedResponse; + }); + } + /** + * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse + * + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. + */ + async *listSegments(marker, options = {}) { + let listBlobsFlatSegmentResponse; + if (!!marker || marker === undefined) { + do { + listBlobsFlatSegmentResponse = await this.listBlobFlatSegment(marker, options); + marker = listBlobsFlatSegmentResponse.continuationToken; + yield await listBlobsFlatSegmentResponse; + } while (marker); + } + } + /** + * Returns an AsyncIterableIterator of {@link BlobItem} objects + * + * @param options - Options to list blobs operation. + */ + async *listItems(options = {}) { + let marker; + for await (const listBlobsFlatSegmentResponse of this.listSegments(marker, options)) { + yield* listBlobsFlatSegmentResponse.segment.blobItems; + } + } + /** + * Returns an async iterable iterator to list all the blobs + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * ```ts snippet:ReadmeSampleListBlobs_Multiple + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * const blobs = containerClient.listBlobsFlat(); + * for await (const blob of blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsFlat(); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) { + * for (const blob of page.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param options - Options to list blobs. + * @returns An asyncIterableIterator that supports paging. + */ + listBlobsFlat(options = {}) { + const include = []; + if (options.includeCopy) { + include.push("copy"); + } + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSnapshots) { + include.push("snapshots"); + } + if (options.includeVersions) { + include.push("versions"); + } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); + } + if (options.includeTags) { + include.push("tags"); + } + if (options.includeDeletedWithVersions) { + include.push("deletedwithversions"); + } + if (options.includeImmutabilityPolicy) { + include.push("immutabilitypolicy"); + } + if (options.includeLegalHold) { + include.push("legalhold"); + } + if (options.prefix === "") { + options.prefix = undefined; + } + const updatedOptions = { + ...options, + ...(include.length > 0 ? { include: include } : {}), + }; + // AsyncIterableIterator to iterate over blobs + const iter = this.listItems(updatedOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listSegments(settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions, + }); + }, + }; + } + /** + * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the ContinuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The ContinuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to list blobs operation. + */ + async *listHierarchySegments(delimiter, marker, options = {}) { + let listBlobsHierarchySegmentResponse; + if (!!marker || marker === undefined) { + do { + listBlobsHierarchySegmentResponse = await this.listBlobHierarchySegment(delimiter, marker, options); + marker = listBlobsHierarchySegmentResponse.continuationToken; + yield await listBlobsHierarchySegmentResponse; + } while (marker); + } + } + /** + * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects. + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. + */ + async *listItemsByHierarchy(delimiter, options = {}) { + let marker; + for await (const listBlobsHierarchySegmentResponse of this.listHierarchySegments(delimiter, marker, options)) { + const segment = listBlobsHierarchySegmentResponse.segment; + if (segment.blobPrefixes) { + for (const prefix of segment.blobPrefixes) { + yield { + kind: "prefix", + ...prefix, + }; + } + } + for (const blob of segment.blobItems) { + yield { kind: "blob", ...blob }; + } + } + } + /** + * Returns an async iterable iterator to list all the blobs by hierarchy. + * under the specified account. + * + * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages. + * + * ```ts snippet:ReadmeSampleListBlobsByHierarchy + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * const blobs = containerClient.listBlobsByHierarchy("/"); + * for await (const blob of blobs) { + * if (blob.kind === "prefix") { + * console.log(`\tBlobPrefix: ${blob.name}`); + * } else { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.listBlobsByHierarchy("/"); + * let { value, done } = await iter.next(); + * while (!done) { + * if (value.kind === "prefix") { + * console.log(`\tBlobPrefix: ${value.name}`); + * } else { + * console.log(`\tBlobItem: name - ${value.name}`); + * } + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 20 })) { + * const segment = page.segment; + * if (segment.blobPrefixes) { + * for (const prefix of segment.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * for (const blob of page.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.listBlobsByHierarchy("/").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`\tBlobItem: name - ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .listBlobsByHierarchy("/") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobPrefixes) { + * for (const prefix of response.blobPrefixes) { + * console.log(`\tBlobPrefix: ${prefix.name}`); + * } + * } + * if (response.segment.blobItems) { + * for (const blob of response.segment.blobItems) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param delimiter - The character or string used to define the virtual hierarchy + * @param options - Options to list blobs operation. + */ + listBlobsByHierarchy(delimiter, options = {}) { + if (delimiter === "") { + throw new RangeError("delimiter should contain one or more characters"); + } + const include = []; + if (options.includeCopy) { + include.push("copy"); + } + if (options.includeDeleted) { + include.push("deleted"); + } + if (options.includeMetadata) { + include.push("metadata"); + } + if (options.includeSnapshots) { + include.push("snapshots"); + } + if (options.includeVersions) { + include.push("versions"); + } + if (options.includeUncommitedBlobs) { + include.push("uncommittedblobs"); + } + if (options.includeTags) { + include.push("tags"); + } + if (options.includeDeletedWithVersions) { + include.push("deletedwithversions"); + } + if (options.includeImmutabilityPolicy) { + include.push("immutabilitypolicy"); + } + if (options.includeLegalHold) { + include.push("legalhold"); + } + if (options.prefix === "") { + options.prefix = undefined; + } + const updatedOptions = { + ...options, + ...(include.length > 0 ? { include: include } : {}), + }; + // AsyncIterableIterator to iterate over blob prefixes and blobs + const iter = this.listItemsByHierarchy(delimiter, updatedOptions); + return { + /** + * The next method, part of the iteration protocol + */ + async next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.listHierarchySegments(delimiter, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...updatedOptions, + }); + }, + }; + } + /** + * The Filter Blobs operation enables callers to list blobs in the container whose tags + * match a given search expression. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-findBlobsByTagsSegment", options, async (updatedOptions) => { + const response = (0, utils_common_js_1.assertResponse)(await this.containerContext.filterBlobs({ + abortSignal: options.abortSignal, + where: tagFilterSqlExpression, + marker, + maxPageSize: options.maxPageSize, + tracingOptions: updatedOptions.tracingOptions, + })); + const wrappedResponse = { + ...response, + _response: response._response, // _response is made non-enumerable + blobs: response.blobs.map((blob) => { + let tagValue = ""; + if (blob.tags?.blobTagSet.length === 1) { + tagValue = blob.tags.blobTagSet[0].value; + } + return { ...blob, tags: (0, utils_common_js_1.toTags)(blob.tags), tagValue }; + }), + }; + return wrappedResponse; + }); + } + /** + * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param marker - A string value that identifies the portion of + * the list of blobs to be returned with the next listing operation. The + * operation returns the continuationToken value within the response body if the + * listing operation did not return all blobs remaining to be listed + * with the current page. The continuationToken value can be used as the value for + * the marker parameter in a subsequent call to request the next page of list + * items. The marker value is opaque to the client. + * @param options - Options to find blobs by tags. + */ + async *findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) { + let response; + if (!!marker || marker === undefined) { + do { + response = await this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options); + response.blobs = response.blobs || []; + marker = response.continuationToken; + yield response; + } while (marker); + } } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; + /** + * Returns an AsyncIterableIterator for blobs. + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to findBlobsByTagsItems. + */ + async *findBlobsByTagsItems(tagFilterSqlExpression, options = {}) { + let marker; + for await (const segment of this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)) { + yield* segment.blobs; + } } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; + /** + * Returns an async iterable iterator to find all blobs with specified tag + * under the specified container. + * + * .byPage() returns an async iterable iterator to list the blobs in pages. + * + * Example using `for await` syntax: + * + * ```ts snippet:ReadmeSampleFindBlobsByTags + * import { BlobServiceClient } from "@azure/storage-blob"; + * import { DefaultAzureCredential } from "@azure/identity"; + * + * const account = ""; + * const blobServiceClient = new BlobServiceClient( + * `https://${account}.blob.core.windows.net`, + * new DefaultAzureCredential(), + * ); + * + * const containerName = ""; + * const containerClient = blobServiceClient.getContainerClient(containerName); + * + * // Example using `for await` syntax + * let i = 1; + * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * + * // Example using `iter.next()` syntax + * i = 1; + * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'"); + * let { value, done } = await iter.next(); + * while (!done) { + * console.log(`Blob ${i++}: ${value.name}`); + * ({ value, done } = await iter.next()); + * } + * + * // Example using `byPage()` syntax + * i = 1; + * for await (const page of containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ maxPageSize: 20 })) { + * for (const blob of page.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * + * // Example using paging with a marker + * i = 1; + * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 }); + * let response = (await iterator.next()).value; + * // Prints 2 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * // Gets next marker + * let marker = response.continuationToken; + * // Passing next marker as continuationToken + * iterator = containerClient + * .findBlobsByTags("tagkey='tagvalue'") + * .byPage({ continuationToken: marker, maxPageSize: 10 }); + * response = (await iterator.next()).value; + * // Prints 10 blob names + * if (response.blobs) { + * for (const blob of response.blobs) { + * console.log(`Blob ${i++}: ${blob.name}`); + * } + * } + * ``` + * + * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression. + * The given expression must evaluate to true for a blob to be returned in the results. + * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter; + * however, only a subset of the OData filter syntax is supported in the Blob service. + * @param options - Options to find blobs by tags. + */ + findBlobsByTags(tagFilterSqlExpression, options = {}) { + // AsyncIterableIterator to iterate over blobs + const listSegmentOptions = { + ...options, + }; + const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions); + return { + /** + * The next method, part of the iteration protocol + */ + next() { + return iter.next(); + }, + /** + * The connection to the async iterator, part of the iteration protocol + */ + [Symbol.asyncIterator]() { + return this; + }, + /** + * Return an AsyncIterableIterator that works a page at a time + */ + byPage: (settings = {}) => { + return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, { + maxPageSize: settings.maxPageSize, + ...listSegmentOptions, + }); + }, + }; } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 76865: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var common = __nccwpck_require__(59941); -var Type = __nccwpck_require__(90256); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; + /** + * The Get Account Information operation returns the sku name and account kind + * for the specified account. + * The Get Account Information operation is available on service versions beginning + * with version 2018-03-28. + * @see https://learn.microsoft.com/rest/api/storageservices/get-account-information + * + * @param options - Options to the Service Get Account Info operation. + * @returns Response data for the Service Get Account Info operation. + */ + async getAccountInfo(options = {}) { + return tracing_js_1.tracingClient.withSpan("ContainerClient-getAccountInfo", options, async (updatedOptions) => { + return (0, utils_common_js_1.assertResponse)(await this.containerContext.getAccountInfo({ + abortSignal: options.abortSignal, + tracingOptions: updatedOptions.tracingOptions, + })); + }); } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; + getContainerNameFromUrl() { + let containerName; + try { + // URL may look like the following + // "https://myaccount.blob.core.windows.net/mycontainer?sasString"; + // "https://myaccount.blob.core.windows.net/mycontainer"; + // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername` + // http://localhost:10001/devstoreaccount1/containername + const parsedUrl = new URL(this.url); + if (parsedUrl.hostname.split(".")[1] === "blob") { + // "https://myaccount.blob.core.windows.net/containername". + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.pathname.split("/")[1]; + } + else if ((0, utils_common_js_1.isIpEndpointStyle)(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername + // .getPath() -> /devstoreaccount1/containername + containerName = parsedUrl.pathname.split("/")[2]; + } + else { + // "https://customdomain.com/containername". + // .getPath() -> /containername + containerName = parsedUrl.pathname.split("/")[1]; + } + // decode the encoded containerName - to get all the special characters that might be present in it + containerName = decodeURIComponent(containerName); + if (!containerName) { + throw new Error("Provided containerName is invalid."); + } + return containerName; + } + catch (error) { + throw new Error("Unable to extract containerName with provided information."); + } } - - // base 8 - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateSasUrl(options) { + return new Promise((resolve) => { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options, + }, this.credential).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); } - return hasDigits && ch !== '_'; - } - - // base 10 (except 0) or base 60 - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch === ':') break; - if (!isDecCode(data.charCodeAt(index))) { - return false; + /** + * Only available for ContainerClient constructed with a shared key credential. + * + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/ + generateSasStringToSign(options) { + if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { + throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); + } + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options, + }, this.credential).stringToSign; } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - // if !base60 - done; - if (ch !== ':') return true; - - // base60 almost not used, no needs to optimize - return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch, base, digits = []; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value, 16); - return sign * parseInt(value, 8); - } - - if (value.indexOf(':') !== -1) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); - }); - - value = 0; - base = 1; - - digits.forEach(function (d) { - value += (d * base); - base *= 60; - }); - - return sign * value; - - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); - - -/***/ }), - -/***/ 35361: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var esprima; - -// Browserified version does not have esprima -// -// 1. For node.js just require module as deps -// 2. For browser try to require mudule via external AMD system. -// If not found - try to fallback to window.esprima. If not -// found too - then fail to parse. -// -try { - // workaround to exclude package from browserify list. - var _require = require; - esprima = _require('esprima'); -} catch (_) { - /* eslint-disable no-redeclare */ - /* global window */ - if (typeof window !== 'undefined') esprima = window.esprima; -} - -var Type = __nccwpck_require__(90256); - -function resolveJavascriptFunction(data) { - if (data === null) return false; - - try { - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }); - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - return false; + /** + * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties + * and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasUrl(options, userDelegationKey) { + return new Promise((resolve) => { + const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ + containerName: this._containerName, + ...options, + }, userDelegationKey, this.accountName).toString(); + resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + }); + } + /** + * Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI + * based on the client properties and parameters passed in. The SAS is signed by the input user delegation key. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + * @param options - Optional parameters. + * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()` + * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. + */ + generateUserDelegationSasStringToSign(options, userDelegationKey) { + return (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParametersInternal)({ + containerName: this._containerName, + ...options, + }, userDelegationKey, this.accountName).stringToSign; + } + /** + * Creates a BlobBatchClient object to conduct batch operations. + * + * @see https://learn.microsoft.com/rest/api/storageservices/blob-batch + * + * @returns A new BlobBatchClient object for this container. + */ + getBlobBatchClient() { + return new BlobBatchClient_js_1.BlobBatchClient(this.url, this.pipeline); } - - return true; - } catch (err) { - return false; - } -} - -function constructJavascriptFunction(data) { - /*jslint evil:true*/ - - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - throw new Error('Failed to resolve function'); - } - - ast.body[0].expression.params.forEach(function (param) { - params.push(param.name); - }); - - body = ast.body[0].expression.body.range; - - // Esprima's ranges include the first '{' and the last '}' characters on - // function expressions. So cut them out. - if (ast.body[0].expression.body.type === 'BlockStatement') { - /*eslint-disable no-new-func*/ - return new Function(params, source.slice(body[0] + 1, body[1] - 1)); - } - // ES6 arrow functions can omit the BlockStatement. In that case, just return - // the body. - /*eslint-disable no-new-func*/ - return new Function(params, 'return ' + source.slice(body[0], body[1])); -} - -function representJavascriptFunction(object /*, style*/) { - return object.toString(); -} - -function isFunction(object) { - return Object.prototype.toString.call(object) === '[object Function]'; } - -module.exports = new Type('tag:yaml.org,2002:js/function', { - kind: 'scalar', - resolve: resolveJavascriptFunction, - construct: constructJavascriptFunction, - predicate: isFunction, - represent: representJavascriptFunction -}); - +exports.ContainerClient = ContainerClient; +//# sourceMappingURL=ContainerClient.js.map /***/ }), -/***/ 77234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 12526: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -var Type = __nccwpck_require__(90256); - -function resolveJavascriptRegExp(data) { - if (data === null) return false; - if (data.length === 0) return false; - - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // if regexp starts with '/' it can have modifiers and must be properly closed - // `/foo/gim` - modifiers tail can be maximum 3 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - - if (modifiers.length > 3) return false; - // if expression starts with /, is should be properly terminated - if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; - } - - return true; -} - -function constructJavascriptRegExp(data) { - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // `/foo/gim` - tail can be maximum 4 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - - return new RegExp(regexp, modifiers); -} - -function representJavascriptRegExp(object /*, style*/) { - var result = '/' + object.source + '/'; - - if (object.global) result += 'g'; - if (object.multiline) result += 'm'; - if (object.ignoreCase) result += 'i'; - - return result; -} - -function isRegExp(object) { - return Object.prototype.toString.call(object) === '[object RegExp]'; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.rangeResponseFromModel = rangeResponseFromModel; +/** + * Function that converts PageRange and ClearRange to a common Range object. + * PageRange and ClearRange have start and end while Range offset and count + * this function normalizes to Range. + * @param response - Model PageBlob Range response + */ +function rangeResponseFromModel(response) { + const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start, + })); + const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({ + offset: x.start, + count: x.end - x.start, + })); + return { + ...response, + pageRange, + clearRange, + _response: { + ...response._response, + parsedBody: { + pageRange, + clearRange, + }, + }, + }; } - -module.exports = new Type('tag:yaml.org,2002:js/regexp', { - kind: 'scalar', - resolve: resolveJavascriptRegExp, - construct: constructJavascriptRegExp, - predicate: isRegExp, - represent: representJavascriptRegExp -}); - +//# sourceMappingURL=PageBlobRangeResponse.js.map /***/ }), -/***/ 34801: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 33781: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var Type = __nccwpck_require__(90256); - -function resolveJavascriptUndefined() { - return true; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Pipeline = exports.StorageOAuthScopes = void 0; +exports.isPipelineLike = isPipelineLike; +exports.newPipeline = newPipeline; +exports.getCoreClientOptions = getCoreClientOptions; +exports.getCredentialFromPipeline = getCredentialFromPipeline; +const core_http_compat_1 = __nccwpck_require__(25083); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_client_1 = __nccwpck_require__(7611); +const core_xml_1 = __nccwpck_require__(17309); +const core_auth_1 = __nccwpck_require__(98834); +const log_js_1 = __nccwpck_require__(53282); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(98637); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const AnonymousCredential_js_1 = __nccwpck_require__(42803); +const constants_js_1 = __nccwpck_require__(81865); +Object.defineProperty(exports, "StorageOAuthScopes", ({ enumerable: true, get: function () { return constants_js_1.StorageOAuthScopes; } })); +const storage_common_1 = __nccwpck_require__(83667); +const StorageBrowserPolicyV2_js_1 = __nccwpck_require__(29090); +const StorageRetryPolicyV2_js_1 = __nccwpck_require__(68031); +const StorageSharedKeyCredentialPolicyV2_js_1 = __nccwpck_require__(93846); +const StorageBrowserPolicyFactory_js_1 = __nccwpck_require__(86562); +const StorageCorrectContentLengthPolicy_js_1 = __nccwpck_require__(73623); +/** + * A helper to decide if a given argument satisfies the Pipeline contract + * @param pipeline - An argument that may be a Pipeline + * @returns true when the argument satisfies the Pipeline contract + */ +function isPipelineLike(pipeline) { + if (!pipeline || typeof pipeline !== "object") { + return false; + } + const castPipeline = pipeline; + return (Array.isArray(castPipeline.factories) && + typeof castPipeline.options === "object" && + typeof castPipeline.toServiceClientOptions === "function"); } - -function constructJavascriptUndefined() { - /*eslint-disable no-undefined*/ - return undefined; +/** + * A Pipeline class containing HTTP request policies. + * You can create a default Pipeline by calling {@link newPipeline}. + * Or you can create a Pipeline with your own policies by the constructor of Pipeline. + * + * Refer to {@link newPipeline} and provided policies before implementing your + * customized Pipeline. + */ +class Pipeline { + /** + * A list of chained request policy factories. + */ + factories; + /** + * Configures pipeline logger and HTTP client. + */ + options; + /** + * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface. + * + * @param factories - + * @param options - + */ + constructor(factories, options = {}) { + this.factories = factories; + this.options = options; + } + /** + * Transfer Pipeline object to ServiceClientOptions object which is required by + * ServiceClient constructor. + * + * @returns The ServiceClientOptions object from this Pipeline. + */ + toServiceClientOptions() { + return { + httpClient: this.options.httpClient, + requestPolicyFactories: this.factories, + }; + } } - -function representJavascriptUndefined() { - return ''; +exports.Pipeline = Pipeline; +/** + * Creates a new Pipeline object with Credential provided. + * + * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + * @param pipelineOptions - Optional. Options. + * @returns A new Pipeline object. + */ +function newPipeline(credential, pipelineOptions = {}) { + if (!credential) { + credential = new AnonymousCredential_js_1.AnonymousCredential(); + } + const pipeline = new Pipeline([], pipelineOptions); + pipeline._credential = credential; + return pipeline; } - -function isUndefined(object) { - return typeof object === 'undefined'; +function processDownlevelPipeline(pipeline) { + const knownFactoryFunctions = [ + isAnonymousCredential, + isStorageSharedKeyCredential, + isCoreHttpBearerTokenFactory, + isStorageBrowserPolicyFactory, + isStorageRetryPolicyFactory, + isStorageTelemetryPolicyFactory, + isCoreHttpPolicyFactory, + ]; + if (pipeline.factories.length) { + const novelFactories = pipeline.factories.filter((factory) => { + return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory)); + }); + if (novelFactories.length) { + const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory)); + // if there are any left over, wrap in a requestPolicyFactoryPolicy + return { + wrappedPolicies: (0, core_http_compat_1.createRequestPolicyFactoryPolicy)(novelFactories), + afterRetry: hasInjector, + }; + } + } + return undefined; } - -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); - - -/***/ }), - -/***/ 15938: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(90256); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - - -/***/ }), - -/***/ 60194: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(90256); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; +function getCoreClientOptions(pipeline) { + const { httpClient: v1Client, ...restOptions } = pipeline.options; + let httpClient = pipeline._coreHttpClient; + if (!httpClient) { + httpClient = v1Client ? (0, core_http_compat_1.convertHttpClient)(v1Client) : (0, storage_common_1.getCachedDefaultHttpClient)(); + pipeline._coreHttpClient = httpClient; + } + let corePipeline = pipeline._corePipeline; + if (!corePipeline) { + const packageDetails = `azsdk-js-azure-storage-blob/${constants_js_1.SDK_VERSION}`; + const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix + ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + corePipeline = (0, core_client_1.createClientPipeline)({ + ...restOptions, + loggingOptions: { + additionalAllowedHeaderNames: constants_js_1.StorageBlobLoggingAllowedHeaderNames, + additionalAllowedQueryParameters: constants_js_1.StorageBlobLoggingAllowedQueryParameters, + logger: log_js_1.logger.info, + }, + userAgentOptions: { + userAgentPrefix, + }, + serializationOptions: { + stringifyXML: core_xml_1.stringifyXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#", + }, + }, + }, + deserializationOptions: { + parseXML: core_xml_1.parseXML, + serializerOptions: { + xml: { + // Use customized XML char key of "#" so we can deserialize metadata + // with "_" key + xmlCharKey: "#", + }, + }, + }, + }); + corePipeline.removePolicy({ phase: "Retry" }); + corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName }); + corePipeline.addPolicy((0, StorageCorrectContentLengthPolicy_js_1.storageCorrectContentLengthPolicy)()); + corePipeline.addPolicy((0, StorageRetryPolicyV2_js_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" }); + corePipeline.addPolicy((0, storage_common_1.storageRequestFailureDetailsParserPolicy)()); + corePipeline.addPolicy((0, StorageBrowserPolicyV2_js_1.storageBrowserPolicy)()); + const downlevelResults = processDownlevelPipeline(pipeline); + if (downlevelResults) { + corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : undefined); + } + const credential = getCredentialFromPipeline(pipeline); + if ((0, core_auth_1.isTokenCredential)(credential)) { + corePipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ + credential, + scopes: restOptions.audience ?? constants_js_1.StorageOAuthScopes, + challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge }, + }), { phase: "Sign" }); + } + else if (credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + corePipeline.addPolicy((0, StorageSharedKeyCredentialPolicyV2_js_1.storageSharedKeyCredentialPolicy)({ + accountName: credential.accountName, + accountKey: credential.accountKey, + }), { phase: "Sign" }); + } + pipeline._corePipeline = corePipeline; + } + return { + ...restOptions, + allowInsecureConnection: true, + httpClient, + pipeline: corePipeline, + }; } - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - - -/***/ }), - -/***/ 26058: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(90256); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +function getCredentialFromPipeline(pipeline) { + // see if we squirreled one away on the type itself + if (pipeline._credential) { + return pipeline._credential; + } + // if it came from another package, loop over the factories and look for one like before + let credential = new AnonymousCredential_js_1.AnonymousCredential(); + for (const factory of pipeline.factories) { + if ((0, core_auth_1.isTokenCredential)(factory.credential)) { + // Only works if the factory has been attached a "credential" property. + // We do that in newPipeline() when using TokenCredential. + credential = factory.credential; + } + else if (isStorageSharedKeyCredential(factory)) { + return factory; + } + } + return credential; } - -function constructYamlNull() { - return null; +function isStorageSharedKeyCredential(factory) { + if (factory instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential) { + return true; + } + return factory.constructor.name === "StorageSharedKeyCredential"; } - -function isNull(object) { - return object === null; +function isAnonymousCredential(factory) { + if (factory instanceof AnonymousCredential_js_1.AnonymousCredential) { + return true; + } + return factory.constructor.name === "AnonymousCredential"; } - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; } - }, - defaultStyle: 'lowercase' -}); - - -/***/ }), - -/***/ 96439: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(90256); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } +function isCoreHttpBearerTokenFactory(factory) { + return (0, core_auth_1.isTokenCredential)(factory.credential); +} +function isStorageBrowserPolicyFactory(factory) { + if (factory instanceof StorageBrowserPolicyFactory_js_1.StorageBrowserPolicyFactory) { + return true; } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; + return factory.constructor.name === "StorageBrowserPolicyFactory"; } - -function constructYamlOmap(data) { - return data !== null ? data : []; +function isStorageRetryPolicyFactory(factory) { + if (factory instanceof StorageRetryPolicyFactory_js_1.StorageRetryPolicyFactory) { + return true; + } + return factory.constructor.name === "StorageRetryPolicyFactory"; } - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); - - -/***/ }), - -/***/ 33730: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Type = __nccwpck_require__(90256); - -var _toString = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; +function isStorageTelemetryPolicyFactory(factory) { + return factory.constructor.name === "TelemetryPolicyFactory"; } - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; +function isInjectorPolicyFactory(factory) { + return factory.constructor.name === "InjectorPolicyFactory"; } - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); - +function isCoreHttpPolicyFactory(factory) { + const knownPolicies = [ + "GenerateClientRequestIdPolicy", + "TracingPolicy", + "LogPolicy", + "ProxyPolicy", + "DisableResponseDecompressionPolicy", + "KeepAlivePolicy", + "DeserializationPolicy", + ]; + const mockHttpClient = { + sendRequest: async (request) => { + return { + request, + headers: request.headers.clone(), + status: 500, + }; + }, + }; + const mockRequestPolicyOptions = { + log(_logLevel, _message) { + /* do nothing */ + }, + shouldLog(_logLevel) { + return false; + }, + }; + const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions); + const policyName = policyInstance.constructor.name; + // bundlers sometimes add a custom suffix to the class name to make it unique + return knownPolicies.some((knownPolicyName) => { + return policyName.startsWith(knownPolicyName); + }); +} +//# sourceMappingURL=Pipeline.js.map /***/ }), -/***/ 65629: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 84573: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -var Type = __nccwpck_require__(90256); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.rangeToString = rangeToString; +/** + * Generate a range string. For example: + * + * "bytes=255-" or "bytes=0-511" + * + * @param iRange - + */ +function rangeToString(iRange) { + if (iRange.offset < 0) { + throw new RangeError(`Range.offset cannot be smaller than 0.`); + } + if (iRange.count && iRange.count <= 0) { + throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`); + } + return iRange.count + ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}` + : `bytes=${iRange.offset}-`; +} +//# sourceMappingURL=Range.js.map /***/ }), -/***/ 9047: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 86562: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var Type = __nccwpck_require__(90256); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0; +const StorageBrowserPolicy_js_1 = __nccwpck_require__(6602); +Object.defineProperty(exports, "StorageBrowserPolicy", ({ enumerable: true, get: function () { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } })); +/** + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. + */ +class StorageBrowserPolicyFactory { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; } - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); - +exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; +//# sourceMappingURL=StorageBrowserPolicyFactory.js.map /***/ }), -/***/ 24649: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 39484: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var Type = __nccwpck_require__(90256); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageClient = void 0; +const StorageContextClient_js_1 = __nccwpck_require__(50557); +const Pipeline_js_1 = __nccwpck_require__(33781); +const utils_common_js_1 = __nccwpck_require__(16673); +/** + * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient} + * and etc. + */ +class StorageClient { + /** + * Encoded URL string value. + */ + url; + accountName; + /** + * Request policy pipeline. + * + * @internal + */ + pipeline; + /** + * Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used. + */ + credential; + /** + * StorageClient is a reference to protocol layer operations entry, which is + * generated by AutoRest generator. + */ + storageClientContext; + /** + */ + isHttps; + /** + * Creates an instance of StorageClient. + * @param url - url to resource + * @param pipeline - request policy pipeline. + */ + constructor(url, pipeline) { + // URL should be encoded and only once, protocol layer shouldn't encode URL again + this.url = (0, utils_common_js_1.escapeURLPath)(url); + this.accountName = (0, utils_common_js_1.getAccountNameFromUrl)(url); + this.pipeline = pipeline; + this.storageClientContext = new StorageContextClient_js_1.StorageContextClient(this.url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); + this.isHttps = (0, utils_common_js_1.iEqual)((0, utils_common_js_1.getURLScheme)(this.url) || "", "https"); + this.credential = (0, Pipeline_js_1.getCredentialFromPipeline)(pipeline); + // Override protocol layer's default content-type + const storageClientContext = this.storageClientContext; + storageClientContext.requestContentType = undefined; + } +} +exports.StorageClient = StorageClient; +//# sourceMappingURL=StorageClient.js.map /***/ }), -/***/ 82018: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 50557: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageContextClient = void 0; +const index_js_1 = __nccwpck_require__(57955); +/** + * @internal + */ +class StorageContextClient extends index_js_1.StorageClient { + async sendOperationRequest(operationArguments, operationSpec) { + const operationSpecToSend = { ...operationSpec }; + if (operationSpecToSend.path === "/{containerName}" || + operationSpecToSend.path === "/{containerName}/{blob}") { + operationSpecToSend.path = ""; + } + return super.sendOperationRequest(operationArguments, operationSpecToSend); + } +} +exports.StorageContextClient = StorageContextClient; +//# sourceMappingURL=StorageContextClient.js.map -var Type = __nccwpck_require__(90256); +/***/ }), -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day +/***/ 98637: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute +"use strict"; -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0; +const StorageRetryPolicy_js_1 = __nccwpck_require__(34419); +Object.defineProperty(exports, "StorageRetryPolicy", ({ enumerable: true, get: function () { return StorageRetryPolicy_js_1.StorageRetryPolicy; } })); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(51772); +Object.defineProperty(exports, "StorageRetryPolicyType", ({ enumerable: true, get: function () { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } })); +/** + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. + */ +class StorageRetryPolicyFactory { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } } +exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; +//# sourceMappingURL=StorageRetryPolicyFactory.js.map -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); +/***/ }), - if (match === null) throw new Error('Date resolve error'); +/***/ 42803: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // match: [1] year [2] month [3] day +"use strict"; - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AnonymousCredential = void 0; +const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(51870); +const Credential_js_1 = __nccwpck_require__(35778); +/** + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). + */ +class AnonymousCredential extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); + } +} +exports.AnonymousCredential = AnonymousCredential; +//# sourceMappingURL=AnonymousCredential.js.map - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } +/***/ }), - // match: [4] hour [5] minute [6] second [7] fraction +/***/ 35778: +/***/ ((__unused_webpack_module, exports) => { - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); +"use strict"; - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Credential = void 0; +/** + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. + */ +class Credential { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } +} +exports.Credential = Credential; +//# sourceMappingURL=Credential.js.map - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); +/***/ }), - if (delta) date.setTime(date.getTime() - delta); +/***/ 59155: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return date; -} +"use strict"; -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageSharedKeyCredential = void 0; +const node_crypto_1 = __nccwpck_require__(6005); +const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(66776); +const Credential_js_1 = __nccwpck_require__(35778); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. + */ +class StorageSharedKeyCredential extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } } - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); - +exports.StorageSharedKeyCredential = StorageSharedKeyCredential; +//# sourceMappingURL=StorageSharedKeyCredential.js.map /***/ }), -/***/ 15185: -/***/ ((module) => { - -class Node { - /// value; - /// next; +/***/ 50822: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - constructor(value) { - this.value = value; +"use strict"; - // TODO: Remove this when targeting Node.js 12. - this.next = undefined; - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UserDelegationKeyCredential = void 0; +const node_crypto_1 = __nccwpck_require__(6005); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * UserDelegationKeyCredential is only used for generation of user delegation SAS. + * @see https://learn.microsoft.com/rest/api/storageservices/create-user-delegation-sas + */ +class UserDelegationKeyCredential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage user delegation key; readonly. + */ + userDelegationKey; + /** + * Key value in Buffer type. + */ + key; + /** + * Creates an instance of UserDelegationKeyCredential. + * @param accountName - + * @param userDelegationKey - + */ + constructor(accountName, userDelegationKey) { + this.accountName = accountName; + this.userDelegationKey = userDelegationKey; + this.key = Buffer.from(userDelegationKey.value, "base64"); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`); + return (0, node_crypto_1.createHmac)("sha256", this.key).update(stringToSign, "utf8").digest("base64"); + } } +exports.UserDelegationKeyCredential = UserDelegationKeyCredential; +//# sourceMappingURL=UserDelegationKeyCredential.js.map -class Queue { - // TODO: Use private class fields when targeting Node.js 12. - // #_head; - // #_tail; - // #_size; - - constructor() { - this.clear(); - } +/***/ }), - enqueue(value) { - const node = new Node(value); +/***/ 57955: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (this._head) { - this._tail.next = node; - this._tail = node; - } else { - this._head = node; - this._tail = node; - } +"use strict"; - this._size++; - } +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageClient = void 0; +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(73758), exports); +var storageClient_js_1 = __nccwpck_require__(92252); +Object.defineProperty(exports, "StorageClient", ({ enumerable: true, get: function () { return storageClient_js_1.StorageClient; } })); +tslib_1.__exportStar(__nccwpck_require__(68529), exports); +//# sourceMappingURL=index.js.map - dequeue() { - const current = this._head; - if (!current) { - return; - } +/***/ }), - this._head = this._head.next; - this._size--; - return current.value; - } +/***/ 73758: +/***/ ((__unused_webpack_module, exports) => { - clear() { - this._head = undefined; - this._tail = undefined; - this._size = 0; - } +"use strict"; - get size() { - return this._size; - } +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.KnownStorageErrorCode = exports.KnownBlobExpiryOptions = exports.KnownFileShareTokenIntent = exports.KnownEncryptionAlgorithmType = void 0; +/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ +var KnownEncryptionAlgorithmType; +(function (KnownEncryptionAlgorithmType) { + /** AES256 */ + KnownEncryptionAlgorithmType["AES256"] = "AES256"; +})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); +/** Known values of {@link FileShareTokenIntent} that the service accepts. */ +var KnownFileShareTokenIntent; +(function (KnownFileShareTokenIntent) { + /** Backup */ + KnownFileShareTokenIntent["Backup"] = "backup"; +})(KnownFileShareTokenIntent || (exports.KnownFileShareTokenIntent = KnownFileShareTokenIntent = {})); +/** Known values of {@link BlobExpiryOptions} that the service accepts. */ +var KnownBlobExpiryOptions; +(function (KnownBlobExpiryOptions) { + /** NeverExpire */ + KnownBlobExpiryOptions["NeverExpire"] = "NeverExpire"; + /** RelativeToCreation */ + KnownBlobExpiryOptions["RelativeToCreation"] = "RelativeToCreation"; + /** RelativeToNow */ + KnownBlobExpiryOptions["RelativeToNow"] = "RelativeToNow"; + /** Absolute */ + KnownBlobExpiryOptions["Absolute"] = "Absolute"; +})(KnownBlobExpiryOptions || (exports.KnownBlobExpiryOptions = KnownBlobExpiryOptions = {})); +/** Known values of {@link StorageErrorCode} that the service accepts. */ +var KnownStorageErrorCode; +(function (KnownStorageErrorCode) { + /** AccountAlreadyExists */ + KnownStorageErrorCode["AccountAlreadyExists"] = "AccountAlreadyExists"; + /** AccountBeingCreated */ + KnownStorageErrorCode["AccountBeingCreated"] = "AccountBeingCreated"; + /** AccountIsDisabled */ + KnownStorageErrorCode["AccountIsDisabled"] = "AccountIsDisabled"; + /** AuthenticationFailed */ + KnownStorageErrorCode["AuthenticationFailed"] = "AuthenticationFailed"; + /** AuthorizationFailure */ + KnownStorageErrorCode["AuthorizationFailure"] = "AuthorizationFailure"; + /** ConditionHeadersNotSupported */ + KnownStorageErrorCode["ConditionHeadersNotSupported"] = "ConditionHeadersNotSupported"; + /** ConditionNotMet */ + KnownStorageErrorCode["ConditionNotMet"] = "ConditionNotMet"; + /** EmptyMetadataKey */ + KnownStorageErrorCode["EmptyMetadataKey"] = "EmptyMetadataKey"; + /** InsufficientAccountPermissions */ + KnownStorageErrorCode["InsufficientAccountPermissions"] = "InsufficientAccountPermissions"; + /** InternalError */ + KnownStorageErrorCode["InternalError"] = "InternalError"; + /** InvalidAuthenticationInfo */ + KnownStorageErrorCode["InvalidAuthenticationInfo"] = "InvalidAuthenticationInfo"; + /** InvalidHeaderValue */ + KnownStorageErrorCode["InvalidHeaderValue"] = "InvalidHeaderValue"; + /** InvalidHttpVerb */ + KnownStorageErrorCode["InvalidHttpVerb"] = "InvalidHttpVerb"; + /** InvalidInput */ + KnownStorageErrorCode["InvalidInput"] = "InvalidInput"; + /** InvalidMd5 */ + KnownStorageErrorCode["InvalidMd5"] = "InvalidMd5"; + /** InvalidMetadata */ + KnownStorageErrorCode["InvalidMetadata"] = "InvalidMetadata"; + /** InvalidQueryParameterValue */ + KnownStorageErrorCode["InvalidQueryParameterValue"] = "InvalidQueryParameterValue"; + /** InvalidRange */ + KnownStorageErrorCode["InvalidRange"] = "InvalidRange"; + /** InvalidResourceName */ + KnownStorageErrorCode["InvalidResourceName"] = "InvalidResourceName"; + /** InvalidUri */ + KnownStorageErrorCode["InvalidUri"] = "InvalidUri"; + /** InvalidXmlDocument */ + KnownStorageErrorCode["InvalidXmlDocument"] = "InvalidXmlDocument"; + /** InvalidXmlNodeValue */ + KnownStorageErrorCode["InvalidXmlNodeValue"] = "InvalidXmlNodeValue"; + /** Md5Mismatch */ + KnownStorageErrorCode["Md5Mismatch"] = "Md5Mismatch"; + /** MetadataTooLarge */ + KnownStorageErrorCode["MetadataTooLarge"] = "MetadataTooLarge"; + /** MissingContentLengthHeader */ + KnownStorageErrorCode["MissingContentLengthHeader"] = "MissingContentLengthHeader"; + /** MissingRequiredQueryParameter */ + KnownStorageErrorCode["MissingRequiredQueryParameter"] = "MissingRequiredQueryParameter"; + /** MissingRequiredHeader */ + KnownStorageErrorCode["MissingRequiredHeader"] = "MissingRequiredHeader"; + /** MissingRequiredXmlNode */ + KnownStorageErrorCode["MissingRequiredXmlNode"] = "MissingRequiredXmlNode"; + /** MultipleConditionHeadersNotSupported */ + KnownStorageErrorCode["MultipleConditionHeadersNotSupported"] = "MultipleConditionHeadersNotSupported"; + /** OperationTimedOut */ + KnownStorageErrorCode["OperationTimedOut"] = "OperationTimedOut"; + /** OutOfRangeInput */ + KnownStorageErrorCode["OutOfRangeInput"] = "OutOfRangeInput"; + /** OutOfRangeQueryParameterValue */ + KnownStorageErrorCode["OutOfRangeQueryParameterValue"] = "OutOfRangeQueryParameterValue"; + /** RequestBodyTooLarge */ + KnownStorageErrorCode["RequestBodyTooLarge"] = "RequestBodyTooLarge"; + /** ResourceTypeMismatch */ + KnownStorageErrorCode["ResourceTypeMismatch"] = "ResourceTypeMismatch"; + /** RequestUrlFailedToParse */ + KnownStorageErrorCode["RequestUrlFailedToParse"] = "RequestUrlFailedToParse"; + /** ResourceAlreadyExists */ + KnownStorageErrorCode["ResourceAlreadyExists"] = "ResourceAlreadyExists"; + /** ResourceNotFound */ + KnownStorageErrorCode["ResourceNotFound"] = "ResourceNotFound"; + /** ServerBusy */ + KnownStorageErrorCode["ServerBusy"] = "ServerBusy"; + /** UnsupportedHeader */ + KnownStorageErrorCode["UnsupportedHeader"] = "UnsupportedHeader"; + /** UnsupportedXmlNode */ + KnownStorageErrorCode["UnsupportedXmlNode"] = "UnsupportedXmlNode"; + /** UnsupportedQueryParameter */ + KnownStorageErrorCode["UnsupportedQueryParameter"] = "UnsupportedQueryParameter"; + /** UnsupportedHttpVerb */ + KnownStorageErrorCode["UnsupportedHttpVerb"] = "UnsupportedHttpVerb"; + /** AppendPositionConditionNotMet */ + KnownStorageErrorCode["AppendPositionConditionNotMet"] = "AppendPositionConditionNotMet"; + /** BlobAlreadyExists */ + KnownStorageErrorCode["BlobAlreadyExists"] = "BlobAlreadyExists"; + /** BlobImmutableDueToPolicy */ + KnownStorageErrorCode["BlobImmutableDueToPolicy"] = "BlobImmutableDueToPolicy"; + /** BlobNotFound */ + KnownStorageErrorCode["BlobNotFound"] = "BlobNotFound"; + /** BlobOverwritten */ + KnownStorageErrorCode["BlobOverwritten"] = "BlobOverwritten"; + /** BlobTierInadequateForContentLength */ + KnownStorageErrorCode["BlobTierInadequateForContentLength"] = "BlobTierInadequateForContentLength"; + /** BlobUsesCustomerSpecifiedEncryption */ + KnownStorageErrorCode["BlobUsesCustomerSpecifiedEncryption"] = "BlobUsesCustomerSpecifiedEncryption"; + /** BlockCountExceedsLimit */ + KnownStorageErrorCode["BlockCountExceedsLimit"] = "BlockCountExceedsLimit"; + /** BlockListTooLong */ + KnownStorageErrorCode["BlockListTooLong"] = "BlockListTooLong"; + /** CannotChangeToLowerTier */ + KnownStorageErrorCode["CannotChangeToLowerTier"] = "CannotChangeToLowerTier"; + /** CannotVerifyCopySource */ + KnownStorageErrorCode["CannotVerifyCopySource"] = "CannotVerifyCopySource"; + /** ContainerAlreadyExists */ + KnownStorageErrorCode["ContainerAlreadyExists"] = "ContainerAlreadyExists"; + /** ContainerBeingDeleted */ + KnownStorageErrorCode["ContainerBeingDeleted"] = "ContainerBeingDeleted"; + /** ContainerDisabled */ + KnownStorageErrorCode["ContainerDisabled"] = "ContainerDisabled"; + /** ContainerNotFound */ + KnownStorageErrorCode["ContainerNotFound"] = "ContainerNotFound"; + /** ContentLengthLargerThanTierLimit */ + KnownStorageErrorCode["ContentLengthLargerThanTierLimit"] = "ContentLengthLargerThanTierLimit"; + /** CopyAcrossAccountsNotSupported */ + KnownStorageErrorCode["CopyAcrossAccountsNotSupported"] = "CopyAcrossAccountsNotSupported"; + /** CopyIdMismatch */ + KnownStorageErrorCode["CopyIdMismatch"] = "CopyIdMismatch"; + /** FeatureVersionMismatch */ + KnownStorageErrorCode["FeatureVersionMismatch"] = "FeatureVersionMismatch"; + /** IncrementalCopyBlobMismatch */ + KnownStorageErrorCode["IncrementalCopyBlobMismatch"] = "IncrementalCopyBlobMismatch"; + /** IncrementalCopyOfEarlierVersionSnapshotNotAllowed */ + KnownStorageErrorCode["IncrementalCopyOfEarlierVersionSnapshotNotAllowed"] = "IncrementalCopyOfEarlierVersionSnapshotNotAllowed"; + /** IncrementalCopySourceMustBeSnapshot */ + KnownStorageErrorCode["IncrementalCopySourceMustBeSnapshot"] = "IncrementalCopySourceMustBeSnapshot"; + /** InfiniteLeaseDurationRequired */ + KnownStorageErrorCode["InfiniteLeaseDurationRequired"] = "InfiniteLeaseDurationRequired"; + /** InvalidBlobOrBlock */ + KnownStorageErrorCode["InvalidBlobOrBlock"] = "InvalidBlobOrBlock"; + /** InvalidBlobTier */ + KnownStorageErrorCode["InvalidBlobTier"] = "InvalidBlobTier"; + /** InvalidBlobType */ + KnownStorageErrorCode["InvalidBlobType"] = "InvalidBlobType"; + /** InvalidBlockId */ + KnownStorageErrorCode["InvalidBlockId"] = "InvalidBlockId"; + /** InvalidBlockList */ + KnownStorageErrorCode["InvalidBlockList"] = "InvalidBlockList"; + /** InvalidOperation */ + KnownStorageErrorCode["InvalidOperation"] = "InvalidOperation"; + /** InvalidPageRange */ + KnownStorageErrorCode["InvalidPageRange"] = "InvalidPageRange"; + /** InvalidSourceBlobType */ + KnownStorageErrorCode["InvalidSourceBlobType"] = "InvalidSourceBlobType"; + /** InvalidSourceBlobUrl */ + KnownStorageErrorCode["InvalidSourceBlobUrl"] = "InvalidSourceBlobUrl"; + /** InvalidVersionForPageBlobOperation */ + KnownStorageErrorCode["InvalidVersionForPageBlobOperation"] = "InvalidVersionForPageBlobOperation"; + /** LeaseAlreadyPresent */ + KnownStorageErrorCode["LeaseAlreadyPresent"] = "LeaseAlreadyPresent"; + /** LeaseAlreadyBroken */ + KnownStorageErrorCode["LeaseAlreadyBroken"] = "LeaseAlreadyBroken"; + /** LeaseIdMismatchWithBlobOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithBlobOperation"] = "LeaseIdMismatchWithBlobOperation"; + /** LeaseIdMismatchWithContainerOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithContainerOperation"] = "LeaseIdMismatchWithContainerOperation"; + /** LeaseIdMismatchWithLeaseOperation */ + KnownStorageErrorCode["LeaseIdMismatchWithLeaseOperation"] = "LeaseIdMismatchWithLeaseOperation"; + /** LeaseIdMissing */ + KnownStorageErrorCode["LeaseIdMissing"] = "LeaseIdMissing"; + /** LeaseIsBreakingAndCannotBeAcquired */ + KnownStorageErrorCode["LeaseIsBreakingAndCannotBeAcquired"] = "LeaseIsBreakingAndCannotBeAcquired"; + /** LeaseIsBreakingAndCannotBeChanged */ + KnownStorageErrorCode["LeaseIsBreakingAndCannotBeChanged"] = "LeaseIsBreakingAndCannotBeChanged"; + /** LeaseIsBrokenAndCannotBeRenewed */ + KnownStorageErrorCode["LeaseIsBrokenAndCannotBeRenewed"] = "LeaseIsBrokenAndCannotBeRenewed"; + /** LeaseLost */ + KnownStorageErrorCode["LeaseLost"] = "LeaseLost"; + /** LeaseNotPresentWithBlobOperation */ + KnownStorageErrorCode["LeaseNotPresentWithBlobOperation"] = "LeaseNotPresentWithBlobOperation"; + /** LeaseNotPresentWithContainerOperation */ + KnownStorageErrorCode["LeaseNotPresentWithContainerOperation"] = "LeaseNotPresentWithContainerOperation"; + /** LeaseNotPresentWithLeaseOperation */ + KnownStorageErrorCode["LeaseNotPresentWithLeaseOperation"] = "LeaseNotPresentWithLeaseOperation"; + /** MaxBlobSizeConditionNotMet */ + KnownStorageErrorCode["MaxBlobSizeConditionNotMet"] = "MaxBlobSizeConditionNotMet"; + /** NoAuthenticationInformation */ + KnownStorageErrorCode["NoAuthenticationInformation"] = "NoAuthenticationInformation"; + /** NoPendingCopyOperation */ + KnownStorageErrorCode["NoPendingCopyOperation"] = "NoPendingCopyOperation"; + /** OperationNotAllowedOnIncrementalCopyBlob */ + KnownStorageErrorCode["OperationNotAllowedOnIncrementalCopyBlob"] = "OperationNotAllowedOnIncrementalCopyBlob"; + /** PendingCopyOperation */ + KnownStorageErrorCode["PendingCopyOperation"] = "PendingCopyOperation"; + /** PreviousSnapshotCannotBeNewer */ + KnownStorageErrorCode["PreviousSnapshotCannotBeNewer"] = "PreviousSnapshotCannotBeNewer"; + /** PreviousSnapshotNotFound */ + KnownStorageErrorCode["PreviousSnapshotNotFound"] = "PreviousSnapshotNotFound"; + /** PreviousSnapshotOperationNotSupported */ + KnownStorageErrorCode["PreviousSnapshotOperationNotSupported"] = "PreviousSnapshotOperationNotSupported"; + /** SequenceNumberConditionNotMet */ + KnownStorageErrorCode["SequenceNumberConditionNotMet"] = "SequenceNumberConditionNotMet"; + /** SequenceNumberIncrementTooLarge */ + KnownStorageErrorCode["SequenceNumberIncrementTooLarge"] = "SequenceNumberIncrementTooLarge"; + /** SnapshotCountExceeded */ + KnownStorageErrorCode["SnapshotCountExceeded"] = "SnapshotCountExceeded"; + /** SnapshotOperationRateExceeded */ + KnownStorageErrorCode["SnapshotOperationRateExceeded"] = "SnapshotOperationRateExceeded"; + /** SnapshotsPresent */ + KnownStorageErrorCode["SnapshotsPresent"] = "SnapshotsPresent"; + /** SourceConditionNotMet */ + KnownStorageErrorCode["SourceConditionNotMet"] = "SourceConditionNotMet"; + /** SystemInUse */ + KnownStorageErrorCode["SystemInUse"] = "SystemInUse"; + /** TargetConditionNotMet */ + KnownStorageErrorCode["TargetConditionNotMet"] = "TargetConditionNotMet"; + /** UnauthorizedBlobOverwrite */ + KnownStorageErrorCode["UnauthorizedBlobOverwrite"] = "UnauthorizedBlobOverwrite"; + /** BlobBeingRehydrated */ + KnownStorageErrorCode["BlobBeingRehydrated"] = "BlobBeingRehydrated"; + /** BlobArchived */ + KnownStorageErrorCode["BlobArchived"] = "BlobArchived"; + /** BlobNotArchived */ + KnownStorageErrorCode["BlobNotArchived"] = "BlobNotArchived"; + /** AuthorizationSourceIPMismatch */ + KnownStorageErrorCode["AuthorizationSourceIPMismatch"] = "AuthorizationSourceIPMismatch"; + /** AuthorizationProtocolMismatch */ + KnownStorageErrorCode["AuthorizationProtocolMismatch"] = "AuthorizationProtocolMismatch"; + /** AuthorizationPermissionMismatch */ + KnownStorageErrorCode["AuthorizationPermissionMismatch"] = "AuthorizationPermissionMismatch"; + /** AuthorizationServiceMismatch */ + KnownStorageErrorCode["AuthorizationServiceMismatch"] = "AuthorizationServiceMismatch"; + /** AuthorizationResourceTypeMismatch */ + KnownStorageErrorCode["AuthorizationResourceTypeMismatch"] = "AuthorizationResourceTypeMismatch"; + /** BlobAccessTierNotSupportedForAccountType */ + KnownStorageErrorCode["BlobAccessTierNotSupportedForAccountType"] = "BlobAccessTierNotSupportedForAccountType"; +})(KnownStorageErrorCode || (exports.KnownStorageErrorCode = KnownStorageErrorCode = {})); +//# sourceMappingURL=index.js.map - * [Symbol.iterator]() { - let current = this._head; +/***/ }), - while (current) { - yield current.value; - current = current.next; - } - } -} +/***/ 52486: +/***/ ((__unused_webpack_module, exports) => { -module.exports = Queue; +"use strict"; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceGetUserDelegationKeyHeaders = exports.ServiceListContainersSegmentExceptionHeaders = exports.ServiceListContainersSegmentHeaders = exports.ServiceGetStatisticsExceptionHeaders = exports.ServiceGetStatisticsHeaders = exports.ServiceGetPropertiesExceptionHeaders = exports.ServiceGetPropertiesHeaders = exports.ServiceSetPropertiesExceptionHeaders = exports.ServiceSetPropertiesHeaders = exports.ArrowField = exports.ArrowConfiguration = exports.JsonTextConfiguration = exports.DelimitedTextConfiguration = exports.QueryFormat = exports.QuerySerialization = exports.QueryRequest = exports.ClearRange = exports.PageRange = exports.PageList = exports.Block = exports.BlockList = exports.BlockLookupList = exports.BlobPrefix = exports.BlobHierarchyListSegment = exports.ListBlobsHierarchySegmentResponse = exports.BlobPropertiesInternal = exports.BlobName = exports.BlobItemInternal = exports.BlobFlatListSegment = exports.ListBlobsFlatSegmentResponse = exports.AccessPolicy = exports.SignedIdentifier = exports.BlobTag = exports.BlobTags = exports.FilterBlobItem = exports.FilterBlobSegment = exports.UserDelegationKey = exports.KeyInfo = exports.ContainerProperties = exports.ContainerItem = exports.ListContainersSegmentResponse = exports.GeoReplication = exports.BlobServiceStatistics = exports.StorageError = exports.StaticWebsite = exports.CorsRule = exports.Metrics = exports.RetentionPolicy = exports.Logging = exports.BlobServiceProperties = void 0; +exports.BlobUndeleteHeaders = exports.BlobDeleteExceptionHeaders = exports.BlobDeleteHeaders = exports.BlobGetPropertiesExceptionHeaders = exports.BlobGetPropertiesHeaders = exports.BlobDownloadExceptionHeaders = exports.BlobDownloadHeaders = exports.ContainerGetAccountInfoExceptionHeaders = exports.ContainerGetAccountInfoHeaders = exports.ContainerListBlobHierarchySegmentExceptionHeaders = exports.ContainerListBlobHierarchySegmentHeaders = exports.ContainerListBlobFlatSegmentExceptionHeaders = exports.ContainerListBlobFlatSegmentHeaders = exports.ContainerChangeLeaseExceptionHeaders = exports.ContainerChangeLeaseHeaders = exports.ContainerBreakLeaseExceptionHeaders = exports.ContainerBreakLeaseHeaders = exports.ContainerRenewLeaseExceptionHeaders = exports.ContainerRenewLeaseHeaders = exports.ContainerReleaseLeaseExceptionHeaders = exports.ContainerReleaseLeaseHeaders = exports.ContainerAcquireLeaseExceptionHeaders = exports.ContainerAcquireLeaseHeaders = exports.ContainerFilterBlobsExceptionHeaders = exports.ContainerFilterBlobsHeaders = exports.ContainerSubmitBatchExceptionHeaders = exports.ContainerSubmitBatchHeaders = exports.ContainerRenameExceptionHeaders = exports.ContainerRenameHeaders = exports.ContainerRestoreExceptionHeaders = exports.ContainerRestoreHeaders = exports.ContainerSetAccessPolicyExceptionHeaders = exports.ContainerSetAccessPolicyHeaders = exports.ContainerGetAccessPolicyExceptionHeaders = exports.ContainerGetAccessPolicyHeaders = exports.ContainerSetMetadataExceptionHeaders = exports.ContainerSetMetadataHeaders = exports.ContainerDeleteExceptionHeaders = exports.ContainerDeleteHeaders = exports.ContainerGetPropertiesExceptionHeaders = exports.ContainerGetPropertiesHeaders = exports.ContainerCreateExceptionHeaders = exports.ContainerCreateHeaders = exports.ServiceFilterBlobsExceptionHeaders = exports.ServiceFilterBlobsHeaders = exports.ServiceSubmitBatchExceptionHeaders = exports.ServiceSubmitBatchHeaders = exports.ServiceGetAccountInfoExceptionHeaders = exports.ServiceGetAccountInfoHeaders = exports.ServiceGetUserDelegationKeyExceptionHeaders = void 0; +exports.PageBlobGetPageRangesHeaders = exports.PageBlobUploadPagesFromURLExceptionHeaders = exports.PageBlobUploadPagesFromURLHeaders = exports.PageBlobClearPagesExceptionHeaders = exports.PageBlobClearPagesHeaders = exports.PageBlobUploadPagesExceptionHeaders = exports.PageBlobUploadPagesHeaders = exports.PageBlobCreateExceptionHeaders = exports.PageBlobCreateHeaders = exports.BlobSetTagsExceptionHeaders = exports.BlobSetTagsHeaders = exports.BlobGetTagsExceptionHeaders = exports.BlobGetTagsHeaders = exports.BlobQueryExceptionHeaders = exports.BlobQueryHeaders = exports.BlobGetAccountInfoExceptionHeaders = exports.BlobGetAccountInfoHeaders = exports.BlobSetTierExceptionHeaders = exports.BlobSetTierHeaders = exports.BlobAbortCopyFromURLExceptionHeaders = exports.BlobAbortCopyFromURLHeaders = exports.BlobCopyFromURLExceptionHeaders = exports.BlobCopyFromURLHeaders = exports.BlobStartCopyFromURLExceptionHeaders = exports.BlobStartCopyFromURLHeaders = exports.BlobCreateSnapshotExceptionHeaders = exports.BlobCreateSnapshotHeaders = exports.BlobBreakLeaseExceptionHeaders = exports.BlobBreakLeaseHeaders = exports.BlobChangeLeaseExceptionHeaders = exports.BlobChangeLeaseHeaders = exports.BlobRenewLeaseExceptionHeaders = exports.BlobRenewLeaseHeaders = exports.BlobReleaseLeaseExceptionHeaders = exports.BlobReleaseLeaseHeaders = exports.BlobAcquireLeaseExceptionHeaders = exports.BlobAcquireLeaseHeaders = exports.BlobSetMetadataExceptionHeaders = exports.BlobSetMetadataHeaders = exports.BlobSetLegalHoldExceptionHeaders = exports.BlobSetLegalHoldHeaders = exports.BlobDeleteImmutabilityPolicyExceptionHeaders = exports.BlobDeleteImmutabilityPolicyHeaders = exports.BlobSetImmutabilityPolicyExceptionHeaders = exports.BlobSetImmutabilityPolicyHeaders = exports.BlobSetHttpHeadersExceptionHeaders = exports.BlobSetHttpHeadersHeaders = exports.BlobSetExpiryExceptionHeaders = exports.BlobSetExpiryHeaders = exports.BlobUndeleteExceptionHeaders = void 0; +exports.BlockBlobGetBlockListExceptionHeaders = exports.BlockBlobGetBlockListHeaders = exports.BlockBlobCommitBlockListExceptionHeaders = exports.BlockBlobCommitBlockListHeaders = exports.BlockBlobStageBlockFromURLExceptionHeaders = exports.BlockBlobStageBlockFromURLHeaders = exports.BlockBlobStageBlockExceptionHeaders = exports.BlockBlobStageBlockHeaders = exports.BlockBlobPutBlobFromUrlExceptionHeaders = exports.BlockBlobPutBlobFromUrlHeaders = exports.BlockBlobUploadExceptionHeaders = exports.BlockBlobUploadHeaders = exports.AppendBlobSealExceptionHeaders = exports.AppendBlobSealHeaders = exports.AppendBlobAppendBlockFromUrlExceptionHeaders = exports.AppendBlobAppendBlockFromUrlHeaders = exports.AppendBlobAppendBlockExceptionHeaders = exports.AppendBlobAppendBlockHeaders = exports.AppendBlobCreateExceptionHeaders = exports.AppendBlobCreateHeaders = exports.PageBlobCopyIncrementalExceptionHeaders = exports.PageBlobCopyIncrementalHeaders = exports.PageBlobUpdateSequenceNumberExceptionHeaders = exports.PageBlobUpdateSequenceNumberHeaders = exports.PageBlobResizeExceptionHeaders = exports.PageBlobResizeHeaders = exports.PageBlobGetPageRangesDiffExceptionHeaders = exports.PageBlobGetPageRangesDiffHeaders = exports.PageBlobGetPageRangesExceptionHeaders = void 0; +exports.BlobServiceProperties = { + serializedName: "BlobServiceProperties", + xmlName: "StorageServiceProperties", + type: { + name: "Composite", + className: "BlobServiceProperties", + modelProperties: { + blobAnalyticsLogging: { + serializedName: "Logging", + xmlName: "Logging", + type: { + name: "Composite", + className: "Logging", + }, + }, + hourMetrics: { + serializedName: "HourMetrics", + xmlName: "HourMetrics", + type: { + name: "Composite", + className: "Metrics", + }, + }, + minuteMetrics: { + serializedName: "MinuteMetrics", + xmlName: "MinuteMetrics", + type: { + name: "Composite", + className: "Metrics", + }, + }, + cors: { + serializedName: "Cors", + xmlName: "Cors", + xmlIsWrapped: true, + xmlElementName: "CorsRule", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsRule", + }, + }, + }, + }, + defaultServiceVersion: { + serializedName: "DefaultServiceVersion", + xmlName: "DefaultServiceVersion", + type: { + name: "String", + }, + }, + deleteRetentionPolicy: { + serializedName: "DeleteRetentionPolicy", + xmlName: "DeleteRetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + }, + }, + staticWebsite: { + serializedName: "StaticWebsite", + xmlName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + }, + }, + }, + }, +}; +exports.Logging = { + serializedName: "Logging", + type: { + name: "Composite", + className: "Logging", + modelProperties: { + version: { + serializedName: "Version", + required: true, + xmlName: "Version", + type: { + name: "String", + }, + }, + deleteProperty: { + serializedName: "Delete", + required: true, + xmlName: "Delete", + type: { + name: "Boolean", + }, + }, + read: { + serializedName: "Read", + required: true, + xmlName: "Read", + type: { + name: "Boolean", + }, + }, + write: { + serializedName: "Write", + required: true, + xmlName: "Write", + type: { + name: "Boolean", + }, + }, + retentionPolicy: { + serializedName: "RetentionPolicy", + xmlName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + }, + }, + }, + }, +}; +exports.RetentionPolicy = { + serializedName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + modelProperties: { + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { + name: "Boolean", + }, + }, + days: { + constraints: { + InclusiveMinimum: 1, + }, + serializedName: "Days", + xmlName: "Days", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.Metrics = { + serializedName: "Metrics", + type: { + name: "Composite", + className: "Metrics", + modelProperties: { + version: { + serializedName: "Version", + xmlName: "Version", + type: { + name: "String", + }, + }, + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { + name: "Boolean", + }, + }, + includeAPIs: { + serializedName: "IncludeAPIs", + xmlName: "IncludeAPIs", + type: { + name: "Boolean", + }, + }, + retentionPolicy: { + serializedName: "RetentionPolicy", + xmlName: "RetentionPolicy", + type: { + name: "Composite", + className: "RetentionPolicy", + }, + }, + }, + }, +}; +exports.CorsRule = { + serializedName: "CorsRule", + type: { + name: "Composite", + className: "CorsRule", + modelProperties: { + allowedOrigins: { + serializedName: "AllowedOrigins", + required: true, + xmlName: "AllowedOrigins", + type: { + name: "String", + }, + }, + allowedMethods: { + serializedName: "AllowedMethods", + required: true, + xmlName: "AllowedMethods", + type: { + name: "String", + }, + }, + allowedHeaders: { + serializedName: "AllowedHeaders", + required: true, + xmlName: "AllowedHeaders", + type: { + name: "String", + }, + }, + exposedHeaders: { + serializedName: "ExposedHeaders", + required: true, + xmlName: "ExposedHeaders", + type: { + name: "String", + }, + }, + maxAgeInSeconds: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "MaxAgeInSeconds", + required: true, + xmlName: "MaxAgeInSeconds", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.StaticWebsite = { + serializedName: "StaticWebsite", + type: { + name: "Composite", + className: "StaticWebsite", + modelProperties: { + enabled: { + serializedName: "Enabled", + required: true, + xmlName: "Enabled", + type: { + name: "Boolean", + }, + }, + indexDocument: { + serializedName: "IndexDocument", + xmlName: "IndexDocument", + type: { + name: "String", + }, + }, + errorDocument404Path: { + serializedName: "ErrorDocument404Path", + xmlName: "ErrorDocument404Path", + type: { + name: "String", + }, + }, + defaultIndexDocumentPath: { + serializedName: "DefaultIndexDocumentPath", + xmlName: "DefaultIndexDocumentPath", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.StorageError = { + serializedName: "StorageError", + type: { + name: "Composite", + className: "StorageError", + modelProperties: { + message: { + serializedName: "Message", + xmlName: "Message", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "CopySourceStatusCode", + xmlName: "CopySourceStatusCode", + type: { + name: "Number", + }, + }, + copySourceErrorCode: { + serializedName: "CopySourceErrorCode", + xmlName: "CopySourceErrorCode", + type: { + name: "String", + }, + }, + copySourceErrorMessage: { + serializedName: "CopySourceErrorMessage", + xmlName: "CopySourceErrorMessage", + type: { + name: "String", + }, + }, + code: { + serializedName: "Code", + xmlName: "Code", + type: { + name: "String", + }, + }, + authenticationErrorDetail: { + serializedName: "AuthenticationErrorDetail", + xmlName: "AuthenticationErrorDetail", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobServiceStatistics = { + serializedName: "BlobServiceStatistics", + xmlName: "StorageServiceStats", + type: { + name: "Composite", + className: "BlobServiceStatistics", + modelProperties: { + geoReplication: { + serializedName: "GeoReplication", + xmlName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication", + }, + }, + }, + }, +}; +exports.GeoReplication = { + serializedName: "GeoReplication", + type: { + name: "Composite", + className: "GeoReplication", + modelProperties: { + status: { + serializedName: "Status", + required: true, + xmlName: "Status", + type: { + name: "Enum", + allowedValues: ["live", "bootstrap", "unavailable"], + }, + }, + lastSyncOn: { + serializedName: "LastSyncTime", + required: true, + xmlName: "LastSyncTime", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ListContainersSegmentResponse = { + serializedName: "ListContainersSegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListContainersSegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { + name: "String", + }, + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { + name: "String", + }, + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { + name: "Number", + }, + }, + containerItems: { + serializedName: "ContainerItems", + required: true, + xmlName: "Containers", + xmlIsWrapped: true, + xmlElementName: "Container", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerItem", + }, + }, + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerItem = { + serializedName: "ContainerItem", + xmlName: "Container", + type: { + name: "Composite", + className: "ContainerItem", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { + name: "String", + }, + }, + deleted: { + serializedName: "Deleted", + xmlName: "Deleted", + type: { + name: "Boolean", + }, + }, + version: { + serializedName: "Version", + xmlName: "Version", + type: { + name: "String", + }, + }, + properties: { + serializedName: "Properties", + xmlName: "Properties", + type: { + name: "Composite", + className: "ContainerProperties", + }, + }, + metadata: { + serializedName: "Metadata", + xmlName: "Metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; +exports.ContainerProperties = { + serializedName: "ContainerProperties", + type: { + name: "Composite", + className: "ContainerProperties", + modelProperties: { + lastModified: { + serializedName: "Last-Modified", + required: true, + xmlName: "Last-Modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "Etag", + required: true, + xmlName: "Etag", + type: { + name: "String", + }, + }, + leaseStatus: { + serializedName: "LeaseStatus", + xmlName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + leaseState: { + serializedName: "LeaseState", + xmlName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseDuration: { + serializedName: "LeaseDuration", + xmlName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + publicAccess: { + serializedName: "PublicAccess", + xmlName: "PublicAccess", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, + hasImmutabilityPolicy: { + serializedName: "HasImmutabilityPolicy", + xmlName: "HasImmutabilityPolicy", + type: { + name: "Boolean", + }, + }, + hasLegalHold: { + serializedName: "HasLegalHold", + xmlName: "HasLegalHold", + type: { + name: "Boolean", + }, + }, + defaultEncryptionScope: { + serializedName: "DefaultEncryptionScope", + xmlName: "DefaultEncryptionScope", + type: { + name: "String", + }, + }, + preventEncryptionScopeOverride: { + serializedName: "DenyEncryptionScopeOverride", + xmlName: "DenyEncryptionScopeOverride", + type: { + name: "Boolean", + }, + }, + deletedOn: { + serializedName: "DeletedTime", + xmlName: "DeletedTime", + type: { + name: "DateTimeRfc1123", + }, + }, + remainingRetentionDays: { + serializedName: "RemainingRetentionDays", + xmlName: "RemainingRetentionDays", + type: { + name: "Number", + }, + }, + isImmutableStorageWithVersioningEnabled: { + serializedName: "ImmutableStorageWithVersioningEnabled", + xmlName: "ImmutableStorageWithVersioningEnabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.KeyInfo = { + serializedName: "KeyInfo", + type: { + name: "Composite", + className: "KeyInfo", + modelProperties: { + startsOn: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { + name: "String", + }, + }, + expiresOn: { + serializedName: "Expiry", + required: true, + xmlName: "Expiry", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.UserDelegationKey = { + serializedName: "UserDelegationKey", + type: { + name: "Composite", + className: "UserDelegationKey", + modelProperties: { + signedObjectId: { + serializedName: "SignedOid", + required: true, + xmlName: "SignedOid", + type: { + name: "String", + }, + }, + signedTenantId: { + serializedName: "SignedTid", + required: true, + xmlName: "SignedTid", + type: { + name: "String", + }, + }, + signedStartsOn: { + serializedName: "SignedStart", + required: true, + xmlName: "SignedStart", + type: { + name: "String", + }, + }, + signedExpiresOn: { + serializedName: "SignedExpiry", + required: true, + xmlName: "SignedExpiry", + type: { + name: "String", + }, + }, + signedService: { + serializedName: "SignedService", + required: true, + xmlName: "SignedService", + type: { + name: "String", + }, + }, + signedVersion: { + serializedName: "SignedVersion", + required: true, + xmlName: "SignedVersion", + type: { + name: "String", + }, + }, + value: { + serializedName: "Value", + required: true, + xmlName: "Value", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.FilterBlobSegment = { + serializedName: "FilterBlobSegment", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "FilterBlobSegment", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + where: { + serializedName: "Where", + required: true, + xmlName: "Where", + type: { + name: "String", + }, + }, + blobs: { + serializedName: "Blobs", + required: true, + xmlName: "Blobs", + xmlIsWrapped: true, + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FilterBlobItem", + }, + }, + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.FilterBlobItem = { + serializedName: "FilterBlobItem", + xmlName: "Blob", + type: { + name: "Composite", + className: "FilterBlobItem", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { + name: "String", + }, + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + type: { + name: "String", + }, + }, + tags: { + serializedName: "Tags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags", + }, + }, + }, + }, +}; +exports.BlobTags = { + serializedName: "BlobTags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags", + modelProperties: { + blobTagSet: { + serializedName: "BlobTagSet", + required: true, + xmlName: "TagSet", + xmlIsWrapped: true, + xmlElementName: "Tag", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobTag", + }, + }, + }, + }, + }, + }, +}; +exports.BlobTag = { + serializedName: "BlobTag", + xmlName: "Tag", + type: { + name: "Composite", + className: "BlobTag", + modelProperties: { + key: { + serializedName: "Key", + required: true, + xmlName: "Key", + type: { + name: "String", + }, + }, + value: { + serializedName: "Value", + required: true, + xmlName: "Value", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.SignedIdentifier = { + serializedName: "SignedIdentifier", + xmlName: "SignedIdentifier", + type: { + name: "Composite", + className: "SignedIdentifier", + modelProperties: { + id: { + serializedName: "Id", + required: true, + xmlName: "Id", + type: { + name: "String", + }, + }, + accessPolicy: { + serializedName: "AccessPolicy", + xmlName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy", + }, + }, + }, + }, +}; +exports.AccessPolicy = { + serializedName: "AccessPolicy", + type: { + name: "Composite", + className: "AccessPolicy", + modelProperties: { + startsOn: { + serializedName: "Start", + xmlName: "Start", + type: { + name: "String", + }, + }, + expiresOn: { + serializedName: "Expiry", + xmlName: "Expiry", + type: { + name: "String", + }, + }, + permissions: { + serializedName: "Permission", + xmlName: "Permission", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ListBlobsFlatSegmentResponse = { + serializedName: "ListBlobsFlatSegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListBlobsFlatSegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { + name: "String", + }, + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { + name: "String", + }, + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { + name: "Number", + }, + }, + segment: { + serializedName: "Segment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobFlatListSegment", + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobFlatListSegment = { + serializedName: "BlobFlatListSegment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobFlatListSegment", + modelProperties: { + blobItems: { + serializedName: "BlobItems", + required: true, + xmlName: "BlobItems", + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal", + }, + }, + }, + }, + }, + }, +}; +exports.BlobItemInternal = { + serializedName: "BlobItemInternal", + xmlName: "Blob", + type: { + name: "Composite", + className: "BlobItemInternal", + modelProperties: { + name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "Composite", + className: "BlobName", + }, + }, + deleted: { + serializedName: "Deleted", + required: true, + xmlName: "Deleted", + type: { + name: "Boolean", + }, + }, + snapshot: { + serializedName: "Snapshot", + required: true, + xmlName: "Snapshot", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "VersionId", + xmlName: "VersionId", + type: { + name: "String", + }, + }, + isCurrentVersion: { + serializedName: "IsCurrentVersion", + xmlName: "IsCurrentVersion", + type: { + name: "Boolean", + }, + }, + properties: { + serializedName: "Properties", + xmlName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal", + }, + }, + metadata: { + serializedName: "Metadata", + xmlName: "Metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + blobTags: { + serializedName: "BlobTags", + xmlName: "Tags", + type: { + name: "Composite", + className: "BlobTags", + }, + }, + objectReplicationMetadata: { + serializedName: "ObjectReplicationMetadata", + xmlName: "OrMetadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + hasVersionsOnly: { + serializedName: "HasVersionsOnly", + xmlName: "HasVersionsOnly", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.BlobName = { + serializedName: "BlobName", + type: { + name: "Composite", + className: "BlobName", + modelProperties: { + encoded: { + serializedName: "Encoded", + xmlName: "Encoded", + xmlIsAttribute: true, + type: { + name: "Boolean", + }, + }, + content: { + serializedName: "content", + xmlName: "content", + xmlIsMsText: true, + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobPropertiesInternal = { + serializedName: "BlobPropertiesInternal", + xmlName: "Properties", + type: { + name: "Composite", + className: "BlobPropertiesInternal", + modelProperties: { + createdOn: { + serializedName: "Creation-Time", + xmlName: "Creation-Time", + type: { + name: "DateTimeRfc1123", + }, + }, + lastModified: { + serializedName: "Last-Modified", + required: true, + xmlName: "Last-Modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "Etag", + required: true, + xmlName: "Etag", + type: { + name: "String", + }, + }, + contentLength: { + serializedName: "Content-Length", + xmlName: "Content-Length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "Content-Type", + xmlName: "Content-Type", + type: { + name: "String", + }, + }, + contentEncoding: { + serializedName: "Content-Encoding", + xmlName: "Content-Encoding", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "Content-Language", + xmlName: "Content-Language", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "Content-MD5", + xmlName: "Content-MD5", + type: { + name: "ByteArray", + }, + }, + contentDisposition: { + serializedName: "Content-Disposition", + xmlName: "Content-Disposition", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "Cache-Control", + xmlName: "Cache-Control", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + blobType: { + serializedName: "BlobType", + xmlName: "BlobType", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + leaseStatus: { + serializedName: "LeaseStatus", + xmlName: "LeaseStatus", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + leaseState: { + serializedName: "LeaseState", + xmlName: "LeaseState", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseDuration: { + serializedName: "LeaseDuration", + xmlName: "LeaseDuration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + copyId: { + serializedName: "CopyId", + xmlName: "CopyId", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "CopyStatus", + xmlName: "CopyStatus", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + copySource: { + serializedName: "CopySource", + xmlName: "CopySource", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "CopyProgress", + xmlName: "CopyProgress", + type: { + name: "String", + }, + }, + copyCompletedOn: { + serializedName: "CopyCompletionTime", + xmlName: "CopyCompletionTime", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "CopyStatusDescription", + xmlName: "CopyStatusDescription", + type: { + name: "String", + }, + }, + serverEncrypted: { + serializedName: "ServerEncrypted", + xmlName: "ServerEncrypted", + type: { + name: "Boolean", + }, + }, + incrementalCopy: { + serializedName: "IncrementalCopy", + xmlName: "IncrementalCopy", + type: { + name: "Boolean", + }, + }, + destinationSnapshot: { + serializedName: "DestinationSnapshot", + xmlName: "DestinationSnapshot", + type: { + name: "String", + }, + }, + deletedOn: { + serializedName: "DeletedTime", + xmlName: "DeletedTime", + type: { + name: "DateTimeRfc1123", + }, + }, + remainingRetentionDays: { + serializedName: "RemainingRetentionDays", + xmlName: "RemainingRetentionDays", + type: { + name: "Number", + }, + }, + accessTier: { + serializedName: "AccessTier", + xmlName: "AccessTier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold", + ], + }, + }, + accessTierInferred: { + serializedName: "AccessTierInferred", + xmlName: "AccessTierInferred", + type: { + name: "Boolean", + }, + }, + archiveStatus: { + serializedName: "ArchiveStatus", + xmlName: "ArchiveStatus", + type: { + name: "Enum", + allowedValues: [ + "rehydrate-pending-to-hot", + "rehydrate-pending-to-cool", + "rehydrate-pending-to-cold", + ], + }, + }, + customerProvidedKeySha256: { + serializedName: "CustomerProvidedKeySha256", + xmlName: "CustomerProvidedKeySha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "EncryptionScope", + xmlName: "EncryptionScope", + type: { + name: "String", + }, + }, + accessTierChangedOn: { + serializedName: "AccessTierChangeTime", + xmlName: "AccessTierChangeTime", + type: { + name: "DateTimeRfc1123", + }, + }, + tagCount: { + serializedName: "TagCount", + xmlName: "TagCount", + type: { + name: "Number", + }, + }, + expiresOn: { + serializedName: "Expiry-Time", + xmlName: "Expiry-Time", + type: { + name: "DateTimeRfc1123", + }, + }, + isSealed: { + serializedName: "Sealed", + xmlName: "Sealed", + type: { + name: "Boolean", + }, + }, + rehydratePriority: { + serializedName: "RehydratePriority", + xmlName: "RehydratePriority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"], + }, + }, + lastAccessedOn: { + serializedName: "LastAccessTime", + xmlName: "LastAccessTime", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiresOn: { + serializedName: "ImmutabilityPolicyUntilDate", + xmlName: "ImmutabilityPolicyUntilDate", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "ImmutabilityPolicyMode", + xmlName: "ImmutabilityPolicyMode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + legalHold: { + serializedName: "LegalHold", + xmlName: "LegalHold", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.ListBlobsHierarchySegmentResponse = { + serializedName: "ListBlobsHierarchySegmentResponse", + xmlName: "EnumerationResults", + type: { + name: "Composite", + className: "ListBlobsHierarchySegmentResponse", + modelProperties: { + serviceEndpoint: { + serializedName: "ServiceEndpoint", + required: true, + xmlName: "ServiceEndpoint", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + containerName: { + serializedName: "ContainerName", + required: true, + xmlName: "ContainerName", + xmlIsAttribute: true, + type: { + name: "String", + }, + }, + prefix: { + serializedName: "Prefix", + xmlName: "Prefix", + type: { + name: "String", + }, + }, + marker: { + serializedName: "Marker", + xmlName: "Marker", + type: { + name: "String", + }, + }, + maxPageSize: { + serializedName: "MaxResults", + xmlName: "MaxResults", + type: { + name: "Number", + }, + }, + delimiter: { + serializedName: "Delimiter", + xmlName: "Delimiter", + type: { + name: "String", + }, + }, + segment: { + serializedName: "Segment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobHierarchyListSegment", + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobHierarchyListSegment = { + serializedName: "BlobHierarchyListSegment", + xmlName: "Blobs", + type: { + name: "Composite", + className: "BlobHierarchyListSegment", + modelProperties: { + blobPrefixes: { + serializedName: "BlobPrefixes", + xmlName: "BlobPrefixes", + xmlElementName: "BlobPrefix", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobPrefix", + }, + }, + }, + }, + blobItems: { + serializedName: "BlobItems", + required: true, + xmlName: "BlobItems", + xmlElementName: "Blob", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BlobItemInternal", + }, + }, + }, + }, + }, + }, +}; +exports.BlobPrefix = { + serializedName: "BlobPrefix", + type: { + name: "Composite", + className: "BlobPrefix", + modelProperties: { + name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "Composite", + className: "BlobName", + }, + }, + }, + }, +}; +exports.BlockLookupList = { + serializedName: "BlockLookupList", + xmlName: "BlockList", + type: { + name: "Composite", + className: "BlockLookupList", + modelProperties: { + committed: { + serializedName: "Committed", + xmlName: "Committed", + xmlElementName: "Committed", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + uncommitted: { + serializedName: "Uncommitted", + xmlName: "Uncommitted", + xmlElementName: "Uncommitted", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + latest: { + serializedName: "Latest", + xmlName: "Latest", + xmlElementName: "Latest", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; +exports.BlockList = { + serializedName: "BlockList", + type: { + name: "Composite", + className: "BlockList", + modelProperties: { + committedBlocks: { + serializedName: "CommittedBlocks", + xmlName: "CommittedBlocks", + xmlIsWrapped: true, + xmlElementName: "Block", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block", + }, + }, + }, + }, + uncommittedBlocks: { + serializedName: "UncommittedBlocks", + xmlName: "UncommittedBlocks", + xmlIsWrapped: true, + xmlElementName: "Block", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Block", + }, + }, + }, + }, + }, + }, +}; +exports.Block = { + serializedName: "Block", + type: { + name: "Composite", + className: "Block", + modelProperties: { + name: { + serializedName: "Name", + required: true, + xmlName: "Name", + type: { + name: "String", + }, + }, + size: { + serializedName: "Size", + required: true, + xmlName: "Size", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.PageList = { + serializedName: "PageList", + type: { + name: "Composite", + className: "PageList", + modelProperties: { + pageRange: { + serializedName: "PageRange", + xmlName: "PageRange", + xmlElementName: "PageRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PageRange", + }, + }, + }, + }, + clearRange: { + serializedName: "ClearRange", + xmlName: "ClearRange", + xmlElementName: "ClearRange", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClearRange", + }, + }, + }, + }, + continuationToken: { + serializedName: "NextMarker", + xmlName: "NextMarker", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageRange = { + serializedName: "PageRange", + xmlName: "PageRange", + type: { + name: "Composite", + className: "PageRange", + modelProperties: { + start: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { + name: "Number", + }, + }, + end: { + serializedName: "End", + required: true, + xmlName: "End", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.ClearRange = { + serializedName: "ClearRange", + xmlName: "ClearRange", + type: { + name: "Composite", + className: "ClearRange", + modelProperties: { + start: { + serializedName: "Start", + required: true, + xmlName: "Start", + type: { + name: "Number", + }, + }, + end: { + serializedName: "End", + required: true, + xmlName: "End", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.QueryRequest = { + serializedName: "QueryRequest", + xmlName: "QueryRequest", + type: { + name: "Composite", + className: "QueryRequest", + modelProperties: { + queryType: { + serializedName: "QueryType", + required: true, + xmlName: "QueryType", + type: { + name: "String", + }, + }, + expression: { + serializedName: "Expression", + required: true, + xmlName: "Expression", + type: { + name: "String", + }, + }, + inputSerialization: { + serializedName: "InputSerialization", + xmlName: "InputSerialization", + type: { + name: "Composite", + className: "QuerySerialization", + }, + }, + outputSerialization: { + serializedName: "OutputSerialization", + xmlName: "OutputSerialization", + type: { + name: "Composite", + className: "QuerySerialization", + }, + }, + }, + }, +}; +exports.QuerySerialization = { + serializedName: "QuerySerialization", + type: { + name: "Composite", + className: "QuerySerialization", + modelProperties: { + format: { + serializedName: "Format", + xmlName: "Format", + type: { + name: "Composite", + className: "QueryFormat", + }, + }, + }, + }, +}; +exports.QueryFormat = { + serializedName: "QueryFormat", + type: { + name: "Composite", + className: "QueryFormat", + modelProperties: { + type: { + serializedName: "Type", + required: true, + xmlName: "Type", + type: { + name: "Enum", + allowedValues: ["delimited", "json", "arrow", "parquet"], + }, + }, + delimitedTextConfiguration: { + serializedName: "DelimitedTextConfiguration", + xmlName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + }, + }, + jsonTextConfiguration: { + serializedName: "JsonTextConfiguration", + xmlName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + }, + }, + arrowConfiguration: { + serializedName: "ArrowConfiguration", + xmlName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration", + }, + }, + parquetTextConfiguration: { + serializedName: "ParquetTextConfiguration", + xmlName: "ParquetTextConfiguration", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, +}; +exports.DelimitedTextConfiguration = { + serializedName: "DelimitedTextConfiguration", + xmlName: "DelimitedTextConfiguration", + type: { + name: "Composite", + className: "DelimitedTextConfiguration", + modelProperties: { + columnSeparator: { + serializedName: "ColumnSeparator", + xmlName: "ColumnSeparator", + type: { + name: "String", + }, + }, + fieldQuote: { + serializedName: "FieldQuote", + xmlName: "FieldQuote", + type: { + name: "String", + }, + }, + recordSeparator: { + serializedName: "RecordSeparator", + xmlName: "RecordSeparator", + type: { + name: "String", + }, + }, + escapeChar: { + serializedName: "EscapeChar", + xmlName: "EscapeChar", + type: { + name: "String", + }, + }, + headersPresent: { + serializedName: "HeadersPresent", + xmlName: "HasHeaders", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.JsonTextConfiguration = { + serializedName: "JsonTextConfiguration", + xmlName: "JsonTextConfiguration", + type: { + name: "Composite", + className: "JsonTextConfiguration", + modelProperties: { + recordSeparator: { + serializedName: "RecordSeparator", + xmlName: "RecordSeparator", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ArrowConfiguration = { + serializedName: "ArrowConfiguration", + xmlName: "ArrowConfiguration", + type: { + name: "Composite", + className: "ArrowConfiguration", + modelProperties: { + schema: { + serializedName: "Schema", + required: true, + xmlName: "Schema", + xmlIsWrapped: true, + xmlElementName: "Field", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ArrowField", + }, + }, + }, + }, + }, + }, +}; +exports.ArrowField = { + serializedName: "ArrowField", + xmlName: "Field", + type: { + name: "Composite", + className: "ArrowField", + modelProperties: { + type: { + serializedName: "Type", + required: true, + xmlName: "Type", + type: { + name: "String", + }, + }, + name: { + serializedName: "Name", + xmlName: "Name", + type: { + name: "String", + }, + }, + precision: { + serializedName: "Precision", + xmlName: "Precision", + type: { + name: "Number", + }, + }, + scale: { + serializedName: "Scale", + xmlName: "Scale", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.ServiceSetPropertiesHeaders = { + serializedName: "Service_setPropertiesHeaders", + type: { + name: "Composite", + className: "ServiceSetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceSetPropertiesExceptionHeaders = { + serializedName: "Service_setPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ServiceSetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetPropertiesHeaders = { + serializedName: "Service_getPropertiesHeaders", + type: { + name: "Composite", + className: "ServiceGetPropertiesHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetPropertiesExceptionHeaders = { + serializedName: "Service_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetStatisticsHeaders = { + serializedName: "Service_getStatisticsHeaders", + type: { + name: "Composite", + className: "ServiceGetStatisticsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetStatisticsExceptionHeaders = { + serializedName: "Service_getStatisticsExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetStatisticsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceListContainersSegmentHeaders = { + serializedName: "Service_listContainersSegmentHeaders", + type: { + name: "Composite", + className: "ServiceListContainersSegmentHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceListContainersSegmentExceptionHeaders = { + serializedName: "Service_listContainersSegmentExceptionHeaders", + type: { + name: "Composite", + className: "ServiceListContainersSegmentExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetUserDelegationKeyHeaders = { + serializedName: "Service_getUserDelegationKeyHeaders", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetUserDelegationKeyExceptionHeaders = { + serializedName: "Service_getUserDelegationKeyExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetUserDelegationKeyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetAccountInfoHeaders = { + serializedName: "Service_getAccountInfoHeaders", + type: { + name: "Composite", + className: "ServiceGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + ], + }, + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage", + ], + }, + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceGetAccountInfoExceptionHeaders = { + serializedName: "Service_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "ServiceGetAccountInfoExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceSubmitBatchHeaders = { + serializedName: "Service_submitBatchHeaders", + type: { + name: "Composite", + className: "ServiceSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceSubmitBatchExceptionHeaders = { + serializedName: "Service_submitBatchExceptionHeaders", + type: { + name: "Composite", + className: "ServiceSubmitBatchExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceFilterBlobsHeaders = { + serializedName: "Service_filterBlobsHeaders", + type: { + name: "Composite", + className: "ServiceFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ServiceFilterBlobsExceptionHeaders = { + serializedName: "Service_filterBlobsExceptionHeaders", + type: { + name: "Composite", + className: "ServiceFilterBlobsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerCreateHeaders = { + serializedName: "Container_createHeaders", + type: { + name: "Composite", + className: "ContainerCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerCreateExceptionHeaders = { + serializedName: "Container_createExceptionHeaders", + type: { + name: "Composite", + className: "ContainerCreateExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetPropertiesHeaders = { + serializedName: "Container_getPropertiesHeaders", + type: { + name: "Composite", + className: "ContainerGetPropertiesHeaders", + modelProperties: { + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, + hasImmutabilityPolicy: { + serializedName: "x-ms-has-immutability-policy", + xmlName: "x-ms-has-immutability-policy", + type: { + name: "Boolean", + }, + }, + hasLegalHold: { + serializedName: "x-ms-has-legal-hold", + xmlName: "x-ms-has-legal-hold", + type: { + name: "Boolean", + }, + }, + defaultEncryptionScope: { + serializedName: "x-ms-default-encryption-scope", + xmlName: "x-ms-default-encryption-scope", + type: { + name: "String", + }, + }, + denyEncryptionScopeOverride: { + serializedName: "x-ms-deny-encryption-scope-override", + xmlName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean", + }, + }, + isImmutableStorageWithVersioningEnabled: { + serializedName: "x-ms-immutable-storage-with-versioning-enabled", + xmlName: "x-ms-immutable-storage-with-versioning-enabled", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetPropertiesExceptionHeaders = { + serializedName: "Container_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerDeleteHeaders = { + serializedName: "Container_deleteHeaders", + type: { + name: "Composite", + className: "ContainerDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerDeleteExceptionHeaders = { + serializedName: "Container_deleteExceptionHeaders", + type: { + name: "Composite", + className: "ContainerDeleteExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetMetadataHeaders = { + serializedName: "Container_setMetadataHeaders", + type: { + name: "Composite", + className: "ContainerSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetMetadataExceptionHeaders = { + serializedName: "Container_setMetadataExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSetMetadataExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetAccessPolicyHeaders = { + serializedName: "Container_getAccessPolicyHeaders", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyHeaders", + modelProperties: { + blobPublicAccess: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetAccessPolicyExceptionHeaders = { + serializedName: "Container_getAccessPolicyExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetAccessPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetAccessPolicyHeaders = { + serializedName: "Container_setAccessPolicyHeaders", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSetAccessPolicyExceptionHeaders = { + serializedName: "Container_setAccessPolicyExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSetAccessPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRestoreHeaders = { + serializedName: "Container_restoreHeaders", + type: { + name: "Composite", + className: "ContainerRestoreHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRestoreExceptionHeaders = { + serializedName: "Container_restoreExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRestoreExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRenameHeaders = { + serializedName: "Container_renameHeaders", + type: { + name: "Composite", + className: "ContainerRenameHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRenameExceptionHeaders = { + serializedName: "Container_renameExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRenameExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSubmitBatchHeaders = { + serializedName: "Container_submitBatchHeaders", + type: { + name: "Composite", + className: "ContainerSubmitBatchHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerSubmitBatchExceptionHeaders = { + serializedName: "Container_submitBatchExceptionHeaders", + type: { + name: "Composite", + className: "ContainerSubmitBatchExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerFilterBlobsHeaders = { + serializedName: "Container_filterBlobsHeaders", + type: { + name: "Composite", + className: "ContainerFilterBlobsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerFilterBlobsExceptionHeaders = { + serializedName: "Container_filterBlobsExceptionHeaders", + type: { + name: "Composite", + className: "ContainerFilterBlobsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerAcquireLeaseHeaders = { + serializedName: "Container_acquireLeaseHeaders", + type: { + name: "Composite", + className: "ContainerAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerAcquireLeaseExceptionHeaders = { + serializedName: "Container_acquireLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerAcquireLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerReleaseLeaseHeaders = { + serializedName: "Container_releaseLeaseHeaders", + type: { + name: "Composite", + className: "ContainerReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerReleaseLeaseExceptionHeaders = { + serializedName: "Container_releaseLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerReleaseLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerRenewLeaseHeaders = { + serializedName: "Container_renewLeaseHeaders", + type: { + name: "Composite", + className: "ContainerRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerRenewLeaseExceptionHeaders = { + serializedName: "Container_renewLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerRenewLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerBreakLeaseHeaders = { + serializedName: "Container_breakLeaseHeaders", + type: { + name: "Composite", + className: "ContainerBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseTime: { + serializedName: "x-ms-lease-time", + xmlName: "x-ms-lease-time", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerBreakLeaseExceptionHeaders = { + serializedName: "Container_breakLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerBreakLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerChangeLeaseHeaders = { + serializedName: "Container_changeLeaseHeaders", + type: { + name: "Composite", + className: "ContainerChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.ContainerChangeLeaseExceptionHeaders = { + serializedName: "Container_changeLeaseExceptionHeaders", + type: { + name: "Composite", + className: "ContainerChangeLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobFlatSegmentHeaders = { + serializedName: "Container_listBlobFlatSegmentHeaders", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobFlatSegmentExceptionHeaders = { + serializedName: "Container_listBlobFlatSegmentExceptionHeaders", + type: { + name: "Composite", + className: "ContainerListBlobFlatSegmentExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobHierarchySegmentHeaders = { + serializedName: "Container_listBlobHierarchySegmentHeaders", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentHeaders", + modelProperties: { + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerListBlobHierarchySegmentExceptionHeaders = { + serializedName: "Container_listBlobHierarchySegmentExceptionHeaders", + type: { + name: "Composite", + className: "ContainerListBlobHierarchySegmentExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.ContainerGetAccountInfoHeaders = { + serializedName: "Container_getAccountInfoHeaders", + type: { + name: "Composite", + className: "ContainerGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + ], + }, + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage", + ], + }, + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.ContainerGetAccountInfoExceptionHeaders = { + serializedName: "Container_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "ContainerGetAccountInfoExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDownloadHeaders = { + serializedName: "Blob_downloadHeaders", + type: { + name: "Composite", + className: "BlobDownloadHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + createdOn: { + serializedName: "x-ms-creation-time", + xmlName: "x-ms-creation-time", + type: { + name: "DateTimeRfc1123", + }, + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + xmlName: "x-ms-or-policy-id", + type: { + name: "String", + }, + }, + objectReplicationRules: { + serializedName: "x-ms-or", + headerCollectionPrefix: "x-ms-or-", + xmlName: "x-ms-or", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + contentRange: { + serializedName: "content-range", + xmlName: "content-range", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { + name: "String", + }, + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { + name: "String", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { + name: "String", + }, + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + xmlName: "x-ms-is-current-version", + type: { + name: "Boolean", + }, + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { + name: "ByteArray", + }, + }, + tagCount: { + serializedName: "x-ms-tag-count", + xmlName: "x-ms-tag-count", + type: { + name: "Number", + }, + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { + name: "Boolean", + }, + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + xmlName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiresOn: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + }, + }, +}; +exports.BlobDownloadExceptionHeaders = { + serializedName: "Blob_downloadExceptionHeaders", + type: { + name: "Composite", + className: "BlobDownloadExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetPropertiesHeaders = { + serializedName: "Blob_getPropertiesHeaders", + type: { + name: "Composite", + className: "BlobGetPropertiesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + createdOn: { + serializedName: "x-ms-creation-time", + xmlName: "x-ms-creation-time", + type: { + name: "DateTimeRfc1123", + }, + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + objectReplicationPolicyId: { + serializedName: "x-ms-or-policy-id", + xmlName: "x-ms-or-policy-id", + type: { + name: "String", + }, + }, + objectReplicationRules: { + serializedName: "x-ms-or", + headerCollectionPrefix: "x-ms-or-", + xmlName: "x-ms-or", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + copyCompletedOn: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { + name: "String", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { + name: "String", + }, + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + isIncrementalCopy: { + serializedName: "x-ms-incremental-copy", + xmlName: "x-ms-incremental-copy", + type: { + name: "Boolean", + }, + }, + destinationSnapshot: { + serializedName: "x-ms-copy-destination-snapshot", + xmlName: "x-ms-copy-destination-snapshot", + type: { + name: "String", + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { + name: "String", + }, + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { + name: "String", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + accessTier: { + serializedName: "x-ms-access-tier", + xmlName: "x-ms-access-tier", + type: { + name: "String", + }, + }, + accessTierInferred: { + serializedName: "x-ms-access-tier-inferred", + xmlName: "x-ms-access-tier-inferred", + type: { + name: "Boolean", + }, + }, + archiveStatus: { + serializedName: "x-ms-archive-status", + xmlName: "x-ms-archive-status", + type: { + name: "String", + }, + }, + accessTierChangedOn: { + serializedName: "x-ms-access-tier-change-time", + xmlName: "x-ms-access-tier-change-time", + type: { + name: "DateTimeRfc1123", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + isCurrentVersion: { + serializedName: "x-ms-is-current-version", + xmlName: "x-ms-is-current-version", + type: { + name: "Boolean", + }, + }, + tagCount: { + serializedName: "x-ms-tag-count", + xmlName: "x-ms-tag-count", + type: { + name: "Number", + }, + }, + expiresOn: { + serializedName: "x-ms-expiry-time", + xmlName: "x-ms-expiry-time", + type: { + name: "DateTimeRfc1123", + }, + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { + name: "Boolean", + }, + }, + rehydratePriority: { + serializedName: "x-ms-rehydrate-priority", + xmlName: "x-ms-rehydrate-priority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"], + }, + }, + lastAccessed: { + serializedName: "x-ms-last-access-time", + xmlName: "x-ms-last-access-time", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiresOn: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetPropertiesExceptionHeaders = { + serializedName: "Blob_getPropertiesExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetPropertiesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDeleteHeaders = { + serializedName: "Blob_deleteHeaders", + type: { + name: "Composite", + className: "BlobDeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDeleteExceptionHeaders = { + serializedName: "Blob_deleteExceptionHeaders", + type: { + name: "Composite", + className: "BlobDeleteExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobUndeleteHeaders = { + serializedName: "Blob_undeleteHeaders", + type: { + name: "Composite", + className: "BlobUndeleteHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobUndeleteExceptionHeaders = { + serializedName: "Blob_undeleteExceptionHeaders", + type: { + name: "Composite", + className: "BlobUndeleteExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetExpiryHeaders = { + serializedName: "Blob_setExpiryHeaders", + type: { + name: "Composite", + className: "BlobSetExpiryHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobSetExpiryExceptionHeaders = { + serializedName: "Blob_setExpiryExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetExpiryExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetHttpHeadersHeaders = { + serializedName: "Blob_setHttpHeadersHeaders", + type: { + name: "Composite", + className: "BlobSetHttpHeadersHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetHttpHeadersExceptionHeaders = { + serializedName: "Blob_setHttpHeadersExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetHttpHeadersExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetImmutabilityPolicyHeaders = { + serializedName: "Blob_setImmutabilityPolicyHeaders", + type: { + name: "Composite", + className: "BlobSetImmutabilityPolicyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyExpiry: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, + immutabilityPolicyMode: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, + }, + }, +}; +exports.BlobSetImmutabilityPolicyExceptionHeaders = { + serializedName: "Blob_setImmutabilityPolicyExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetImmutabilityPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobDeleteImmutabilityPolicyHeaders = { + serializedName: "Blob_deleteImmutabilityPolicyHeaders", + type: { + name: "Composite", + className: "BlobDeleteImmutabilityPolicyHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobDeleteImmutabilityPolicyExceptionHeaders = { + serializedName: "Blob_deleteImmutabilityPolicyExceptionHeaders", + type: { + name: "Composite", + className: "BlobDeleteImmutabilityPolicyExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetLegalHoldHeaders = { + serializedName: "Blob_setLegalHoldHeaders", + type: { + name: "Composite", + className: "BlobSetLegalHoldHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + legalHold: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.BlobSetLegalHoldExceptionHeaders = { + serializedName: "Blob_setLegalHoldExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetLegalHoldExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetMetadataHeaders = { + serializedName: "Blob_setMetadataHeaders", + type: { + name: "Composite", + className: "BlobSetMetadataHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetMetadataExceptionHeaders = { + serializedName: "Blob_setMetadataExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetMetadataExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobAcquireLeaseHeaders = { + serializedName: "Blob_acquireLeaseHeaders", + type: { + name: "Composite", + className: "BlobAcquireLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobAcquireLeaseExceptionHeaders = { + serializedName: "Blob_acquireLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobAcquireLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobReleaseLeaseHeaders = { + serializedName: "Blob_releaseLeaseHeaders", + type: { + name: "Composite", + className: "BlobReleaseLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobReleaseLeaseExceptionHeaders = { + serializedName: "Blob_releaseLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobReleaseLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobRenewLeaseHeaders = { + serializedName: "Blob_renewLeaseHeaders", + type: { + name: "Composite", + className: "BlobRenewLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobRenewLeaseExceptionHeaders = { + serializedName: "Blob_renewLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobRenewLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobChangeLeaseHeaders = { + serializedName: "Blob_changeLeaseHeaders", + type: { + name: "Composite", + className: "BlobChangeLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + leaseId: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobChangeLeaseExceptionHeaders = { + serializedName: "Blob_changeLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobChangeLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobBreakLeaseHeaders = { + serializedName: "Blob_breakLeaseHeaders", + type: { + name: "Composite", + className: "BlobBreakLeaseHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + leaseTime: { + serializedName: "x-ms-lease-time", + xmlName: "x-ms-lease-time", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + }, + }, +}; +exports.BlobBreakLeaseExceptionHeaders = { + serializedName: "Blob_breakLeaseExceptionHeaders", + type: { + name: "Composite", + className: "BlobBreakLeaseExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobCreateSnapshotHeaders = { + serializedName: "Blob_createSnapshotHeaders", + type: { + name: "Composite", + className: "BlobCreateSnapshotHeaders", + modelProperties: { + snapshot: { + serializedName: "x-ms-snapshot", + xmlName: "x-ms-snapshot", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobCreateSnapshotExceptionHeaders = { + serializedName: "Blob_createSnapshotExceptionHeaders", + type: { + name: "Composite", + className: "BlobCreateSnapshotExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobStartCopyFromURLHeaders = { + serializedName: "Blob_startCopyFromURLHeaders", + type: { + name: "Composite", + className: "BlobStartCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobStartCopyFromURLExceptionHeaders = { + serializedName: "Blob_startCopyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobStartCopyFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlobCopyFromURLHeaders = { + serializedName: "Blob_copyFromURLHeaders", + type: { + name: "Composite", + className: "BlobCopyFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyStatus: { + defaultValue: "success", + isConstant: true, + serializedName: "x-ms-copy-status", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobCopyFromURLExceptionHeaders = { + serializedName: "Blob_copyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobCopyFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlobAbortCopyFromURLHeaders = { + serializedName: "Blob_abortCopyFromURLHeaders", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobAbortCopyFromURLExceptionHeaders = { + serializedName: "Blob_abortCopyFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlobAbortCopyFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTierHeaders = { + serializedName: "Blob_setTierHeaders", + type: { + name: "Composite", + className: "BlobSetTierHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTierExceptionHeaders = { + serializedName: "Blob_setTierExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetTierExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetAccountInfoHeaders = { + serializedName: "Blob_getAccountInfoHeaders", + type: { + name: "Composite", + className: "BlobGetAccountInfoHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + skuName: { + serializedName: "x-ms-sku-name", + xmlName: "x-ms-sku-name", + type: { + name: "Enum", + allowedValues: [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + ], + }, + }, + accountKind: { + serializedName: "x-ms-account-kind", + xmlName: "x-ms-account-kind", + type: { + name: "Enum", + allowedValues: [ + "Storage", + "BlobStorage", + "StorageV2", + "FileStorage", + "BlockBlobStorage", + ], + }, + }, + isHierarchicalNamespaceEnabled: { + serializedName: "x-ms-is-hns-enabled", + xmlName: "x-ms-is-hns-enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.BlobGetAccountInfoExceptionHeaders = { + serializedName: "Blob_getAccountInfoExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetAccountInfoExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobQueryHeaders = { + serializedName: "Blob_queryHeaders", + type: { + name: "Composite", + className: "BlobQueryHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + metadata: { + serializedName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + xmlName: "x-ms-meta", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + contentLength: { + serializedName: "content-length", + xmlName: "content-length", + type: { + name: "Number", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + contentRange: { + serializedName: "content-range", + xmlName: "content-range", + type: { + name: "String", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + contentEncoding: { + serializedName: "content-encoding", + xmlName: "content-encoding", + type: { + name: "String", + }, + }, + cacheControl: { + serializedName: "cache-control", + xmlName: "cache-control", + type: { + name: "String", + }, + }, + contentDisposition: { + serializedName: "content-disposition", + xmlName: "content-disposition", + type: { + name: "String", + }, + }, + contentLanguage: { + serializedName: "content-language", + xmlName: "content-language", + type: { + name: "String", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + blobType: { + serializedName: "x-ms-blob-type", + xmlName: "x-ms-blob-type", + type: { + name: "Enum", + allowedValues: ["BlockBlob", "PageBlob", "AppendBlob"], + }, + }, + copyCompletionTime: { + serializedName: "x-ms-copy-completion-time", + xmlName: "x-ms-copy-completion-time", + type: { + name: "DateTimeRfc1123", + }, + }, + copyStatusDescription: { + serializedName: "x-ms-copy-status-description", + xmlName: "x-ms-copy-status-description", + type: { + name: "String", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyProgress: { + serializedName: "x-ms-copy-progress", + xmlName: "x-ms-copy-progress", + type: { + name: "String", + }, + }, + copySource: { + serializedName: "x-ms-copy-source", + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + leaseDuration: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Enum", + allowedValues: ["infinite", "fixed"], + }, + }, + leaseState: { + serializedName: "x-ms-lease-state", + xmlName: "x-ms-lease-state", + type: { + name: "Enum", + allowedValues: [ + "available", + "leased", + "expired", + "breaking", + "broken", + ], + }, + }, + leaseStatus: { + serializedName: "x-ms-lease-status", + xmlName: "x-ms-lease-status", + type: { + name: "Enum", + allowedValues: ["locked", "unlocked"], + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + acceptRanges: { + serializedName: "accept-ranges", + xmlName: "accept-ranges", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-server-encrypted", + xmlName: "x-ms-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + blobContentMD5: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { + name: "ByteArray", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + contentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + }, + }, +}; +exports.BlobQueryExceptionHeaders = { + serializedName: "Blob_queryExceptionHeaders", + type: { + name: "Composite", + className: "BlobQueryExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetTagsHeaders = { + serializedName: "Blob_getTagsHeaders", + type: { + name: "Composite", + className: "BlobGetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobGetTagsExceptionHeaders = { + serializedName: "Blob_getTagsExceptionHeaders", + type: { + name: "Composite", + className: "BlobGetTagsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTagsHeaders = { + serializedName: "Blob_setTagsHeaders", + type: { + name: "Composite", + className: "BlobSetTagsHeaders", + modelProperties: { + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlobSetTagsExceptionHeaders = { + serializedName: "Blob_setTagsExceptionHeaders", + type: { + name: "Composite", + className: "BlobSetTagsExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCreateHeaders = { + serializedName: "PageBlob_createHeaders", + type: { + name: "Composite", + className: "PageBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCreateExceptionHeaders = { + serializedName: "PageBlob_createExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobCreateExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesHeaders = { + serializedName: "PageBlob_uploadPagesHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesExceptionHeaders = { + serializedName: "PageBlob_uploadPagesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobClearPagesHeaders = { + serializedName: "PageBlob_clearPagesHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobClearPagesExceptionHeaders = { + serializedName: "PageBlob_clearPagesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobClearPagesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesFromURLHeaders = { + serializedName: "PageBlob_uploadPagesFromURLHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUploadPagesFromURLExceptionHeaders = { + serializedName: "PageBlob_uploadPagesFromURLExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUploadPagesFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesHeaders = { + serializedName: "PageBlob_getPageRangesHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesExceptionHeaders = { + serializedName: "PageBlob_getPageRangesExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesDiffHeaders = { + serializedName: "PageBlob_getPageRangesDiffHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobGetPageRangesDiffExceptionHeaders = { + serializedName: "PageBlob_getPageRangesDiffExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobGetPageRangesDiffExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobResizeHeaders = { + serializedName: "PageBlob_resizeHeaders", + type: { + name: "Composite", + className: "PageBlobResizeHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobResizeExceptionHeaders = { + serializedName: "PageBlob_resizeExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobResizeExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUpdateSequenceNumberHeaders = { + serializedName: "PageBlob_updateSequenceNumberHeaders", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + blobSequenceNumber: { + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobUpdateSequenceNumberExceptionHeaders = { + serializedName: "PageBlob_updateSequenceNumberExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobUpdateSequenceNumberExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCopyIncrementalHeaders = { + serializedName: "PageBlob_copyIncrementalHeaders", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + copyId: { + serializedName: "x-ms-copy-id", + xmlName: "x-ms-copy-id", + type: { + name: "String", + }, + }, + copyStatus: { + serializedName: "x-ms-copy-status", + xmlName: "x-ms-copy-status", + type: { + name: "Enum", + allowedValues: ["pending", "success", "aborted", "failed"], + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.PageBlobCopyIncrementalExceptionHeaders = { + serializedName: "PageBlob_copyIncrementalExceptionHeaders", + type: { + name: "Composite", + className: "PageBlobCopyIncrementalExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobCreateHeaders = { + serializedName: "AppendBlob_createHeaders", + type: { + name: "Composite", + className: "AppendBlobCreateHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobCreateExceptionHeaders = { + serializedName: "AppendBlob_createExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobCreateExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockHeaders = { + serializedName: "AppendBlob_appendBlockHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + xmlName: "x-ms-blob-append-offset", + type: { + name: "String", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockExceptionHeaders = { + serializedName: "AppendBlob_appendBlockExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockFromUrlHeaders = { + serializedName: "AppendBlob_appendBlockFromUrlHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + blobAppendOffset: { + serializedName: "x-ms-blob-append-offset", + xmlName: "x-ms-blob-append-offset", + type: { + name: "String", + }, + }, + blobCommittedBlockCount: { + serializedName: "x-ms-blob-committed-block-count", + xmlName: "x-ms-blob-committed-block-count", + type: { + name: "Number", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.AppendBlobAppendBlockFromUrlExceptionHeaders = { + serializedName: "AppendBlob_appendBlockFromUrlExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobAppendBlockFromUrlExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.AppendBlobSealHeaders = { + serializedName: "AppendBlob_sealHeaders", + type: { + name: "Composite", + className: "AppendBlobSealHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isSealed: { + serializedName: "x-ms-blob-sealed", + xmlName: "x-ms-blob-sealed", + type: { + name: "Boolean", + }, + }, + }, + }, +}; +exports.AppendBlobSealExceptionHeaders = { + serializedName: "AppendBlob_sealExceptionHeaders", + type: { + name: "Composite", + className: "AppendBlobSealExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobUploadHeaders = { + serializedName: "BlockBlob_uploadHeaders", + type: { + name: "Composite", + className: "BlockBlobUploadHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobUploadExceptionHeaders = { + serializedName: "BlockBlob_uploadExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobUploadExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobPutBlobFromUrlHeaders = { + serializedName: "BlockBlob_putBlobFromUrlHeaders", + type: { + name: "Composite", + className: "BlockBlobPutBlobFromUrlHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobPutBlobFromUrlExceptionHeaders = { + serializedName: "BlockBlob_putBlobFromUrlExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobPutBlobFromUrlExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockHeaders = { + serializedName: "BlockBlob_stageBlockHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockExceptionHeaders = { + serializedName: "BlockBlob_stageBlockExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockFromURLHeaders = { + serializedName: "BlockBlob_stageBlockFromURLHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLHeaders", + modelProperties: { + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobStageBlockFromURLExceptionHeaders = { + serializedName: "BlockBlob_stageBlockFromURLExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobStageBlockFromURLExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + copySourceErrorCode: { + serializedName: "x-ms-copy-source-error-code", + xmlName: "x-ms-copy-source-error-code", + type: { + name: "String", + }, + }, + copySourceStatusCode: { + serializedName: "x-ms-copy-source-status-code", + xmlName: "x-ms-copy-source-status-code", + type: { + name: "Number", + }, + }, + }, + }, +}; +exports.BlockBlobCommitBlockListHeaders = { + serializedName: "BlockBlob_commitBlockListHeaders", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListHeaders", + modelProperties: { + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + contentMD5: { + serializedName: "content-md5", + xmlName: "content-md5", + type: { + name: "ByteArray", + }, + }, + xMsContentCrc64: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + versionId: { + serializedName: "x-ms-version-id", + xmlName: "x-ms-version-id", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + isServerEncrypted: { + serializedName: "x-ms-request-server-encrypted", + xmlName: "x-ms-request-server-encrypted", + type: { + name: "Boolean", + }, + }, + encryptionKeySha256: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, + encryptionScope: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobCommitBlockListExceptionHeaders = { + serializedName: "BlockBlob_commitBlockListExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobCommitBlockListExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobGetBlockListHeaders = { + serializedName: "BlockBlob_getBlockListHeaders", + type: { + name: "Composite", + className: "BlockBlobGetBlockListHeaders", + modelProperties: { + lastModified: { + serializedName: "last-modified", + xmlName: "last-modified", + type: { + name: "DateTimeRfc1123", + }, + }, + etag: { + serializedName: "etag", + xmlName: "etag", + type: { + name: "String", + }, + }, + contentType: { + serializedName: "content-type", + xmlName: "content-type", + type: { + name: "String", + }, + }, + blobContentLength: { + serializedName: "x-ms-blob-content-length", + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, + clientRequestId: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, + requestId: { + serializedName: "x-ms-request-id", + xmlName: "x-ms-request-id", + type: { + name: "String", + }, + }, + version: { + serializedName: "x-ms-version", + xmlName: "x-ms-version", + type: { + name: "String", + }, + }, + date: { + serializedName: "date", + xmlName: "date", + type: { + name: "DateTimeRfc1123", + }, + }, + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +exports.BlockBlobGetBlockListExceptionHeaders = { + serializedName: "BlockBlob_getBlockListExceptionHeaders", + type: { + name: "Composite", + className: "BlockBlobGetBlockListExceptionHeaders", + modelProperties: { + errorCode: { + serializedName: "x-ms-error-code", + xmlName: "x-ms-error-code", + type: { + name: "String", + }, + }, + }, + }, +}; +//# sourceMappingURL=mappers.js.map /***/ }), -/***/ 53497: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 54142: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.action3 = exports.action2 = exports.leaseId1 = exports.action1 = exports.proposedLeaseId = exports.duration = exports.action = exports.comp10 = exports.sourceLeaseId = exports.sourceContainerName = exports.comp9 = exports.deletedContainerVersion = exports.deletedContainerName = exports.comp8 = exports.containerAcl = exports.comp7 = exports.comp6 = exports.ifUnmodifiedSince = exports.ifModifiedSince = exports.leaseId = exports.preventEncryptionScopeOverride = exports.defaultEncryptionScope = exports.access = exports.metadata = exports.restype2 = exports.where = exports.comp5 = exports.multipartContentType = exports.contentLength = exports.comp4 = exports.body = exports.restype1 = exports.comp3 = exports.keyInfo = exports.include = exports.maxPageSize = exports.marker = exports.prefix = exports.comp2 = exports.comp1 = exports.accept1 = exports.requestId = exports.version = exports.timeoutInSeconds = exports.comp = exports.restype = exports.url = exports.accept = exports.blobServiceProperties = exports.contentType = void 0; +exports.fileRequestIntent = exports.copySourceTags = exports.copySourceAuthorization = exports.sourceContentMD5 = exports.xMsRequiresSync = exports.legalHold1 = exports.sealBlob = exports.blobTagsString = exports.copySource = exports.sourceIfTags = exports.sourceIfNoneMatch = exports.sourceIfMatch = exports.sourceIfUnmodifiedSince = exports.sourceIfModifiedSince = exports.rehydratePriority = exports.tier = exports.comp14 = exports.encryptionScope = exports.legalHold = exports.comp13 = exports.immutabilityPolicyMode = exports.immutabilityPolicyExpiry = exports.comp12 = exports.blobContentDisposition = exports.blobContentLanguage = exports.blobContentEncoding = exports.blobContentMD5 = exports.blobContentType = exports.blobCacheControl = exports.expiresOn = exports.expiryOptions = exports.comp11 = exports.blobDeleteType = exports.deleteSnapshots = exports.ifTags = exports.ifNoneMatch = exports.ifMatch = exports.encryptionAlgorithm = exports.encryptionKeySha256 = exports.encryptionKey = exports.rangeGetContentCRC64 = exports.rangeGetContentMD5 = exports.range = exports.versionId = exports.snapshot = exports.delimiter = exports.include1 = exports.proposedLeaseId1 = exports.action4 = exports.breakPeriod = void 0; +exports.listType = exports.comp25 = exports.blocks = exports.blockId = exports.comp24 = exports.copySourceBlobProperties = exports.blobType2 = exports.comp23 = exports.sourceRange1 = exports.appendPosition = exports.maxSize = exports.comp22 = exports.blobType1 = exports.comp21 = exports.sequenceNumberAction = exports.prevSnapshotUrl = exports.prevsnapshot = exports.comp20 = exports.range1 = exports.sourceContentCrc64 = exports.sourceRange = exports.sourceUrl = exports.pageWrite1 = exports.ifSequenceNumberEqualTo = exports.ifSequenceNumberLessThan = exports.ifSequenceNumberLessThanOrEqualTo = exports.pageWrite = exports.comp19 = exports.accept2 = exports.body1 = exports.contentType1 = exports.blobSequenceNumber = exports.blobContentLength = exports.blobType = exports.transactionalContentCrc64 = exports.transactionalContentMD5 = exports.tags = exports.comp18 = exports.comp17 = exports.queryRequest = exports.tier1 = exports.comp16 = exports.copyId = exports.copyActionAbortConstant = exports.comp15 = void 0; +const mappers_js_1 = __nccwpck_require__(52486); +exports.contentType = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String", + }, + }, +}; +exports.blobServiceProperties = { + parameterPath: "blobServiceProperties", + mapper: mappers_js_1.BlobServiceProperties, +}; +exports.accept = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String", + }, + }, +}; +exports.url = { + parameterPath: "url", + mapper: { + serializedName: "url", + required: true, + xmlName: "url", + type: { + name: "String", + }, + }, + skipEncoding: true, +}; +exports.restype = { + parameterPath: "restype", + mapper: { + defaultValue: "service", + isConstant: true, + serializedName: "restype", + type: { + name: "String", + }, + }, +}; +exports.comp = { + parameterPath: "comp", + mapper: { + defaultValue: "properties", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.timeoutInSeconds = { + parameterPath: ["options", "timeoutInSeconds"], + mapper: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "timeout", + xmlName: "timeout", + type: { + name: "Number", + }, + }, +}; +exports.version = { + parameterPath: "version", + mapper: { + defaultValue: "2025-11-05", + isConstant: true, + serializedName: "x-ms-version", + type: { + name: "String", + }, + }, +}; +exports.requestId = { + parameterPath: ["options", "requestId"], + mapper: { + serializedName: "x-ms-client-request-id", + xmlName: "x-ms-client-request-id", + type: { + name: "String", + }, + }, +}; +exports.accept1 = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String", + }, + }, +}; +exports.comp1 = { + parameterPath: "comp", + mapper: { + defaultValue: "stats", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.comp2 = { + parameterPath: "comp", + mapper: { + defaultValue: "list", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.prefix = { + parameterPath: ["options", "prefix"], + mapper: { + serializedName: "prefix", + xmlName: "prefix", + type: { + name: "String", + }, + }, +}; +exports.marker = { + parameterPath: ["options", "marker"], + mapper: { + serializedName: "marker", + xmlName: "marker", + type: { + name: "String", + }, + }, +}; +exports.maxPageSize = { + parameterPath: ["options", "maxPageSize"], + mapper: { + constraints: { + InclusiveMinimum: 1, + }, + serializedName: "maxresults", + xmlName: "maxresults", + type: { + name: "Number", + }, + }, +}; +exports.include = { + parameterPath: ["options", "include"], + mapper: { + serializedName: "include", + xmlName: "include", + xmlElementName: "ListContainersIncludeType", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: ["metadata", "deleted", "system"], + }, + }, + }, + }, + collectionFormat: "CSV", +}; +exports.keyInfo = { + parameterPath: "keyInfo", + mapper: mappers_js_1.KeyInfo, +}; +exports.comp3 = { + parameterPath: "comp", + mapper: { + defaultValue: "userdelegationkey", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.restype1 = { + parameterPath: "restype", + mapper: { + defaultValue: "account", + isConstant: true, + serializedName: "restype", + type: { + name: "String", + }, + }, +}; +exports.body = { + parameterPath: "body", + mapper: { + serializedName: "body", + required: true, + xmlName: "body", + type: { + name: "Stream", + }, + }, +}; +exports.comp4 = { + parameterPath: "comp", + mapper: { + defaultValue: "batch", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.contentLength = { + parameterPath: "contentLength", + mapper: { + serializedName: "Content-Length", + required: true, + xmlName: "Content-Length", + type: { + name: "Number", + }, + }, +}; +exports.multipartContentType = { + parameterPath: "multipartContentType", + mapper: { + serializedName: "Content-Type", + required: true, + xmlName: "Content-Type", + type: { + name: "String", + }, + }, +}; +exports.comp5 = { + parameterPath: "comp", + mapper: { + defaultValue: "blobs", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.where = { + parameterPath: ["options", "where"], + mapper: { + serializedName: "where", + xmlName: "where", + type: { + name: "String", + }, + }, +}; +exports.restype2 = { + parameterPath: "restype", + mapper: { + defaultValue: "container", + isConstant: true, + serializedName: "restype", + type: { + name: "String", + }, + }, +}; +exports.metadata = { + parameterPath: ["options", "metadata"], + mapper: { + serializedName: "x-ms-meta", + xmlName: "x-ms-meta", + headerCollectionPrefix: "x-ms-meta-", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, +}; +exports.access = { + parameterPath: ["options", "access"], + mapper: { + serializedName: "x-ms-blob-public-access", + xmlName: "x-ms-blob-public-access", + type: { + name: "Enum", + allowedValues: ["container", "blob"], + }, + }, +}; +exports.defaultEncryptionScope = { + parameterPath: [ + "options", + "containerEncryptionScope", + "defaultEncryptionScope", + ], + mapper: { + serializedName: "x-ms-default-encryption-scope", + xmlName: "x-ms-default-encryption-scope", + type: { + name: "String", + }, + }, +}; +exports.preventEncryptionScopeOverride = { + parameterPath: [ + "options", + "containerEncryptionScope", + "preventEncryptionScopeOverride", + ], + mapper: { + serializedName: "x-ms-deny-encryption-scope-override", + xmlName: "x-ms-deny-encryption-scope-override", + type: { + name: "Boolean", + }, + }, +}; +exports.leaseId = { + parameterPath: ["options", "leaseAccessConditions", "leaseId"], + mapper: { + serializedName: "x-ms-lease-id", + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, +}; +exports.ifModifiedSince = { + parameterPath: ["options", "modifiedAccessConditions", "ifModifiedSince"], + mapper: { + serializedName: "If-Modified-Since", + xmlName: "If-Modified-Since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.ifUnmodifiedSince = { + parameterPath: ["options", "modifiedAccessConditions", "ifUnmodifiedSince"], + mapper: { + serializedName: "If-Unmodified-Since", + xmlName: "If-Unmodified-Since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.comp6 = { + parameterPath: "comp", + mapper: { + defaultValue: "metadata", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.comp7 = { + parameterPath: "comp", + mapper: { + defaultValue: "acl", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.containerAcl = { + parameterPath: ["options", "containerAcl"], + mapper: { + serializedName: "containerAcl", + xmlName: "SignedIdentifiers", + xmlIsWrapped: true, + xmlElementName: "SignedIdentifier", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignedIdentifier", + }, + }, + }, + }, +}; +exports.comp8 = { + parameterPath: "comp", + mapper: { + defaultValue: "undelete", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.deletedContainerName = { + parameterPath: ["options", "deletedContainerName"], + mapper: { + serializedName: "x-ms-deleted-container-name", + xmlName: "x-ms-deleted-container-name", + type: { + name: "String", + }, + }, +}; +exports.deletedContainerVersion = { + parameterPath: ["options", "deletedContainerVersion"], + mapper: { + serializedName: "x-ms-deleted-container-version", + xmlName: "x-ms-deleted-container-version", + type: { + name: "String", + }, + }, +}; +exports.comp9 = { + parameterPath: "comp", + mapper: { + defaultValue: "rename", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.sourceContainerName = { + parameterPath: "sourceContainerName", + mapper: { + serializedName: "x-ms-source-container-name", + required: true, + xmlName: "x-ms-source-container-name", + type: { + name: "String", + }, + }, +}; +exports.sourceLeaseId = { + parameterPath: ["options", "sourceLeaseId"], + mapper: { + serializedName: "x-ms-source-lease-id", + xmlName: "x-ms-source-lease-id", + type: { + name: "String", + }, + }, +}; +exports.comp10 = { + parameterPath: "comp", + mapper: { + defaultValue: "lease", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.action = { + parameterPath: "action", + mapper: { + defaultValue: "acquire", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.duration = { + parameterPath: ["options", "duration"], + mapper: { + serializedName: "x-ms-lease-duration", + xmlName: "x-ms-lease-duration", + type: { + name: "Number", + }, + }, +}; +exports.proposedLeaseId = { + parameterPath: ["options", "proposedLeaseId"], + mapper: { + serializedName: "x-ms-proposed-lease-id", + xmlName: "x-ms-proposed-lease-id", + type: { + name: "String", + }, + }, +}; +exports.action1 = { + parameterPath: "action", + mapper: { + defaultValue: "release", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.leaseId1 = { + parameterPath: "leaseId", + mapper: { + serializedName: "x-ms-lease-id", + required: true, + xmlName: "x-ms-lease-id", + type: { + name: "String", + }, + }, +}; +exports.action2 = { + parameterPath: "action", + mapper: { + defaultValue: "renew", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.action3 = { + parameterPath: "action", + mapper: { + defaultValue: "break", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.breakPeriod = { + parameterPath: ["options", "breakPeriod"], + mapper: { + serializedName: "x-ms-lease-break-period", + xmlName: "x-ms-lease-break-period", + type: { + name: "Number", + }, + }, +}; +exports.action4 = { + parameterPath: "action", + mapper: { + defaultValue: "change", + isConstant: true, + serializedName: "x-ms-lease-action", + type: { + name: "String", + }, + }, +}; +exports.proposedLeaseId1 = { + parameterPath: "proposedLeaseId", + mapper: { + serializedName: "x-ms-proposed-lease-id", + required: true, + xmlName: "x-ms-proposed-lease-id", + type: { + name: "String", + }, + }, +}; +exports.include1 = { + parameterPath: ["options", "include"], + mapper: { + serializedName: "include", + xmlName: "include", + xmlElementName: "ListBlobsIncludeItem", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "copy", + "deleted", + "metadata", + "snapshots", + "uncommittedblobs", + "versions", + "tags", + "immutabilitypolicy", + "legalhold", + "deletedwithversions", + ], + }, + }, + }, + }, + collectionFormat: "CSV", +}; +exports.delimiter = { + parameterPath: "delimiter", + mapper: { + serializedName: "delimiter", + required: true, + xmlName: "delimiter", + type: { + name: "String", + }, + }, +}; +exports.snapshot = { + parameterPath: ["options", "snapshot"], + mapper: { + serializedName: "snapshot", + xmlName: "snapshot", + type: { + name: "String", + }, + }, +}; +exports.versionId = { + parameterPath: ["options", "versionId"], + mapper: { + serializedName: "versionid", + xmlName: "versionid", + type: { + name: "String", + }, + }, +}; +exports.range = { + parameterPath: ["options", "range"], + mapper: { + serializedName: "x-ms-range", + xmlName: "x-ms-range", + type: { + name: "String", + }, + }, +}; +exports.rangeGetContentMD5 = { + parameterPath: ["options", "rangeGetContentMD5"], + mapper: { + serializedName: "x-ms-range-get-content-md5", + xmlName: "x-ms-range-get-content-md5", + type: { + name: "Boolean", + }, + }, +}; +exports.rangeGetContentCRC64 = { + parameterPath: ["options", "rangeGetContentCRC64"], + mapper: { + serializedName: "x-ms-range-get-content-crc64", + xmlName: "x-ms-range-get-content-crc64", + type: { + name: "Boolean", + }, + }, +}; +exports.encryptionKey = { + parameterPath: ["options", "cpkInfo", "encryptionKey"], + mapper: { + serializedName: "x-ms-encryption-key", + xmlName: "x-ms-encryption-key", + type: { + name: "String", + }, + }, +}; +exports.encryptionKeySha256 = { + parameterPath: ["options", "cpkInfo", "encryptionKeySha256"], + mapper: { + serializedName: "x-ms-encryption-key-sha256", + xmlName: "x-ms-encryption-key-sha256", + type: { + name: "String", + }, + }, +}; +exports.encryptionAlgorithm = { + parameterPath: ["options", "cpkInfo", "encryptionAlgorithm"], + mapper: { + serializedName: "x-ms-encryption-algorithm", + xmlName: "x-ms-encryption-algorithm", + type: { + name: "String", + }, + }, +}; +exports.ifMatch = { + parameterPath: ["options", "modifiedAccessConditions", "ifMatch"], + mapper: { + serializedName: "If-Match", + xmlName: "If-Match", + type: { + name: "String", + }, + }, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.ifNoneMatch = { + parameterPath: ["options", "modifiedAccessConditions", "ifNoneMatch"], + mapper: { + serializedName: "If-None-Match", + xmlName: "If-None-Match", + type: { + name: "String", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.generate = exports.createAuthenticationSettings = exports.configureAuthentication = void 0; -const path = __importStar(__nccwpck_require__(71017)); -const core = __importStar(__nccwpck_require__(42186)); -const io = __importStar(__nccwpck_require__(47351)); -const fs = __importStar(__nccwpck_require__(57147)); -const os = __importStar(__nccwpck_require__(22037)); -const xmlbuilder2_1 = __nccwpck_require__(70151); -const constants = __importStar(__nccwpck_require__(69042)); -const gpg = __importStar(__nccwpck_require__(23759)); -const util_1 = __nccwpck_require__(92629); -function configureAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - const id = core.getInput(constants.INPUT_SERVER_ID); - const username = core.getInput(constants.INPUT_SERVER_USERNAME); - const password = core.getInput(constants.INPUT_SERVER_PASSWORD); - const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || - path.join(os.homedir(), constants.M2_DIR); - const overwriteSettings = (0, util_1.getBooleanInput)(constants.INPUT_OVERWRITE_SETTINGS, true); - const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY) || - constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; - const gpgPassphrase = core.getInput(constants.INPUT_GPG_PASSPHRASE) || - (gpgPrivateKey ? constants.INPUT_DEFAULT_GPG_PASSPHRASE : undefined); - if (gpgPrivateKey) { - core.setSecret(gpgPrivateKey); - } - yield createAuthenticationSettings(id, username, password, settingsDirectory, overwriteSettings, gpgPassphrase); - if (gpgPrivateKey) { - core.info('Importing private gpg key'); - const keyFingerprint = (yield gpg.importKey(gpgPrivateKey)) || ''; - core.saveState(constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT, keyFingerprint); - } - }); -} -exports.configureAuthentication = configureAuthentication; -function createAuthenticationSettings(id, username, password, settingsDirectory, overwriteSettings, gpgPassphrase = undefined) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Creating ${constants.MVN_SETTINGS_FILE} with server-id: ${id}`); - // when an alternate m2 location is specified use only that location (no .m2 directory) - // otherwise use the home/.m2/ path - yield io.mkdirP(settingsDirectory); - yield write(settingsDirectory, generate(id, username, password, gpgPassphrase), overwriteSettings); - }); -} -exports.createAuthenticationSettings = createAuthenticationSettings; -// only exported for testing purposes -function generate(id, username, password, gpgPassphrase) { - const xmlObj = { - settings: { - '@xmlns': 'http://maven.apache.org/SETTINGS/1.0.0', - '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', - '@xsi:schemaLocation': 'http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd', - servers: { - server: [ - { - id: id, - username: `\${env.${username}}`, - password: `\${env.${password}}` - } - ] - } - } - }; - if (gpgPassphrase) { - const gpgServer = { - id: 'gpg.passphrase', - passphrase: `\${env.${gpgPassphrase}}` - }; - xmlObj.settings.servers.server.push(gpgServer); - } - return (0, xmlbuilder2_1.create)(xmlObj).end({ - headless: true, - prettyPrint: true, - width: 80 - }); -} -exports.generate = generate; -function write(directory, settings, overwriteSettings) { - return __awaiter(this, void 0, void 0, function* () { - const location = path.join(directory, constants.MVN_SETTINGS_FILE); - const settingsExists = fs.existsSync(location); - if (settingsExists && overwriteSettings) { - core.info(`Overwriting existing file ${location}`); - } - else if (!settingsExists) { - core.info(`Writing to ${location}`); - } - else { - core.info(`Skipping generation ${location} because file already exists and overwriting is not required`); - return; - } - return fs.writeFileSync(location, settings, { - encoding: 'utf-8', - flag: 'w' - }); - }); -} - - -/***/ }), - -/***/ 64810: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/** - * @fileoverview this file provides methods handling dependency cache - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +exports.ifTags = { + parameterPath: ["options", "modifiedAccessConditions", "ifTags"], + mapper: { + serializedName: "x-ms-if-tags", + xmlName: "x-ms-if-tags", + type: { + name: "String", + }, + }, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.deleteSnapshots = { + parameterPath: ["options", "deleteSnapshots"], + mapper: { + serializedName: "x-ms-delete-snapshots", + xmlName: "x-ms-delete-snapshots", + type: { + name: "Enum", + allowedValues: ["include", "only"], + }, + }, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.blobDeleteType = { + parameterPath: ["options", "blobDeleteType"], + mapper: { + serializedName: "deletetype", + xmlName: "deletetype", + type: { + name: "String", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.save = exports.restore = void 0; -const path_1 = __nccwpck_require__(71017); -const os_1 = __importDefault(__nccwpck_require__(22037)); -const cache = __importStar(__nccwpck_require__(27799)); -const core = __importStar(__nccwpck_require__(42186)); -const glob = __importStar(__nccwpck_require__(28090)); -const STATE_CACHE_PRIMARY_KEY = 'cache-primary-key'; -const CACHE_MATCHED_KEY = 'cache-matched-key'; -const CACHE_KEY_PREFIX = 'setup-java'; -const supportedPackageManager = [ - { - id: 'maven', - path: [(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository')], - // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven - pattern: ['**/pom.xml'] +exports.comp11 = { + parameterPath: "comp", + mapper: { + defaultValue: "expiry", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, }, - { - id: 'gradle', - path: [ - (0, path_1.join)(os_1.default.homedir(), '.gradle', 'caches'), - (0, path_1.join)(os_1.default.homedir(), '.gradle', 'wrapper') - ], - // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle - pattern: [ - '**/*.gradle*', - '**/gradle-wrapper.properties', - 'buildSrc/**/Versions.kt', - 'buildSrc/**/Dependencies.kt', - 'gradle/*.versions.toml', - '**/versions.properties' - ] +}; +exports.expiryOptions = { + parameterPath: "expiryOptions", + mapper: { + serializedName: "x-ms-expiry-option", + required: true, + xmlName: "x-ms-expiry-option", + type: { + name: "String", + }, }, - { - id: 'sbt', - path: [ - (0, path_1.join)(os_1.default.homedir(), '.ivy2', 'cache'), - (0, path_1.join)(os_1.default.homedir(), '.sbt'), - getCoursierCachePath(), - // Some files should not be cached to avoid resolution problems. - // In particular the resolution of snapshots (ideological gap between maven/ivy). - '!' + (0, path_1.join)(os_1.default.homedir(), '.sbt', '*.lock'), - '!' + (0, path_1.join)(os_1.default.homedir(), '**', 'ivydata-*.properties') - ], - pattern: [ - '**/*.sbt', - '**/project/build.properties', - '**/project/**.scala', - '**/project/**.sbt' - ] - } -]; -function getCoursierCachePath() { - if (os_1.default.type() === 'Linux') - return (0, path_1.join)(os_1.default.homedir(), '.cache', 'coursier'); - if (os_1.default.type() === 'Darwin') - return (0, path_1.join)(os_1.default.homedir(), 'Library', 'Caches', 'Coursier'); - return (0, path_1.join)(os_1.default.homedir(), 'AppData', 'Local', 'Coursier', 'Cache'); -} -function findPackageManager(id) { - const packageManager = supportedPackageManager.find(packageManager => packageManager.id === id); - if (packageManager === undefined) { - throw new Error(`unknown package manager specified: ${id}`); - } - return packageManager; -} -/** - * A function that generates a cache key to use. - * Format of the generated key will be "${{ platform }}-${{ id }}-${{ fileHash }}"". - * @see {@link https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key|spec of cache key} - */ -function computeCacheKey(packageManager, cacheDependencyPath) { - return __awaiter(this, void 0, void 0, function* () { - const pattern = cacheDependencyPath - ? cacheDependencyPath.trim().split('\n') - : packageManager.pattern; - const fileHash = yield glob.hashFiles(pattern.join('\n')); - if (!fileHash) { - throw new Error(`No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository`); - } - return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`; - }); -} -/** - * Restore the dependency cache - * @param id ID of the package manager, should be "maven" or "gradle" - * @param cacheDependencyPath The path to a dependency file - */ -function restore(id, cacheDependencyPath) { - return __awaiter(this, void 0, void 0, function* () { - const packageManager = findPackageManager(id); - const primaryKey = yield computeCacheKey(packageManager, cacheDependencyPath); - core.debug(`primary key is ${primaryKey}`); - core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey); - // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269) - const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey); - if (matchedKey) { - core.saveState(CACHE_MATCHED_KEY, matchedKey); - core.setOutput('cache-hit', matchedKey === primaryKey); - core.info(`Cache restored from key: ${matchedKey}`); - } - else { - core.setOutput('cache-hit', false); - core.info(`${packageManager.id} cache is not found`); - } - }); -} -exports.restore = restore; -/** - * Save the dependency cache - * @param id ID of the package manager, should be "maven" or "gradle" - */ -function save(id) { - return __awaiter(this, void 0, void 0, function* () { - const packageManager = findPackageManager(id); - const matchedKey = core.getState(CACHE_MATCHED_KEY); - // Inputs are re-evaluated before the post action, so we want the original key used for restore - const primaryKey = core.getState(STATE_CACHE_PRIMARY_KEY); - if (!primaryKey) { - core.warning('Error retrieving key from state.'); - return; - } - else if (matchedKey === primaryKey) { - // no change in target directories - core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); - return; - } - try { - yield cache.saveCache(packageManager.path, primaryKey); - core.info(`Cache saved with the key: ${primaryKey}`); - } - catch (error) { - const err = error; - if (err.name === cache.ReserveCacheError.name) { - core.info(err.message); - } - else { - if (isProbablyGradleDaemonProblem(packageManager, err)) { - core.warning('Failed to save Gradle cache on Windows. If tar.exe reported "Permission denied", try to run Gradle with `--no-daemon` option. Refer to https://github.com/actions/cache/issues/454 for details.'); - } - throw error; - } - } - }); -} -exports.save = save; -/** - * @param packageManager the specified package manager by user - * @param error the error thrown by the saveCache - * @returns true if the given error seems related to the {@link https://github.com/actions/cache/issues/454|running Gradle Daemon issue}. - * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} - */ -function isProbablyGradleDaemonProblem(packageManager, error) { - if (packageManager.id !== 'gradle' || - process.env['RUNNER_OS'] !== 'Windows') { - return false; - } - const message = error.message || ''; - return message.startsWith('Tar failed with error: '); -} - - -/***/ }), - -/***/ 69042: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE_DEPENDENCY_PATH = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; -exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home'; -exports.INPUT_JAVA_VERSION = 'java-version'; -exports.INPUT_JAVA_VERSION_FILE = 'java-version-file'; -exports.INPUT_ARCHITECTURE = 'architecture'; -exports.INPUT_JAVA_PACKAGE = 'java-package'; -exports.INPUT_DISTRIBUTION = 'distribution'; -exports.INPUT_JDK_FILE = 'jdkFile'; -exports.INPUT_CHECK_LATEST = 'check-latest'; -exports.INPUT_SERVER_ID = 'server-id'; -exports.INPUT_SERVER_USERNAME = 'server-username'; -exports.INPUT_SERVER_PASSWORD = 'server-password'; -exports.INPUT_SETTINGS_PATH = 'settings-path'; -exports.INPUT_OVERWRITE_SETTINGS = 'overwrite-settings'; -exports.INPUT_GPG_PRIVATE_KEY = 'gpg-private-key'; -exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; -exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; -exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; -exports.INPUT_CACHE = 'cache'; -exports.INPUT_CACHE_DEPENDENCY_PATH = 'cache-dependency-path'; -exports.INPUT_JOB_STATUS = 'job-status'; -exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; -exports.M2_DIR = '.m2'; -exports.MVN_SETTINGS_FILE = 'settings.xml'; -exports.MVN_TOOLCHAINS_FILE = 'toolchains.xml'; -exports.INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id'; -exports.INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor'; -exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto']; - - -/***/ }), - -/***/ 68766: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.expiresOn = { + parameterPath: ["options", "expiresOn"], + mapper: { + serializedName: "x-ms-expiry-time", + xmlName: "x-ms-expiry-time", + type: { + name: "String", + }, + }, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.blobCacheControl = { + parameterPath: ["options", "blobHttpHeaders", "blobCacheControl"], + mapper: { + serializedName: "x-ms-blob-cache-control", + xmlName: "x-ms-blob-cache-control", + type: { + name: "String", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AdoptDistribution = exports.AdoptImplementation = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const semver_1 = __importDefault(__nccwpck_require__(11383)); -const base_installer_1 = __nccwpck_require__(59741); -const util_1 = __nccwpck_require__(92629); -var AdoptImplementation; -(function (AdoptImplementation) { - AdoptImplementation["Hotspot"] = "Hotspot"; - AdoptImplementation["OpenJ9"] = "OpenJ9"; -})(AdoptImplementation || (exports.AdoptImplementation = AdoptImplementation = {})); -class AdoptDistribution extends base_installer_1.JavaBase { - constructor(installerOptions, jvmImpl) { - super(`Adopt-${jvmImpl}`, installerOptions); - this.jvmImpl = jvmImpl; - } - findPackageForDownload(version) { - return __awaiter(this, void 0, void 0, function* () { - const availableVersionsRaw = yield this.getAvailableVersions(); - const availableVersionsWithBinaries = availableVersionsRaw - .filter(item => item.binaries.length > 0) - .map(item => { - return { - version: item.version_data.semver, - url: item.binaries[0].package.link - }; - }); - const satisfiedVersions = availableVersionsWithBinaries - .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) - .sort((a, b) => { - return -semver_1.default.compareBuild(a.version, b.version); - }); - const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; - if (!resolvedFullVersion) { - const availableOptions = availableVersionsWithBinaries - .map(item => item.version) - .join(', '); - const availableOptionsMessage = availableOptions - ? `\nAvailable versions: ${availableOptions}` - : ''; - throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); - } - return resolvedFullVersion; - }); - } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - const javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extension = (0, util_1.getDownloadArchiveExtension)(); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const version = this.getToolcacheVersionName(javaRelease.version); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); - } - get toolcacheFolderName() { - if (this.jvmImpl === AdoptImplementation.Hotspot) { - // exclude Hotspot postfix from distribution name because Hosted runners have pre-cached Adopt OpenJDK under "Java_Adopt_jdk" - // for more information see: https://github.com/actions/setup-java/pull/155#discussion_r610451063 - return `Java_Adopt_${this.packageType}`; - } - return super.toolcacheFolderName; - } - getAvailableVersions() { - return __awaiter(this, void 0, void 0, function* () { - const platform = this.getPlatformOption(); - const arch = this.distributionArchitecture(); - const imageType = this.packageType; - const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions - const releaseType = this.stable ? 'ga' : 'ea'; - if (core.isDebug()) { - console.time('Retrieving available versions for Adopt took'); // eslint-disable-line no-console - } - const baseRequestArguments = [ - `project=jdk`, - 'vendor=adoptopenjdk', - `heap_size=normal`, - 'sort_method=DEFAULT', - 'sort_order=DESC', - `os=${platform}`, - `architecture=${arch}`, - `image_type=${imageType}`, - `release_type=${releaseType}`, - `jvm_impl=${this.jvmImpl.toLowerCase()}` - ].join('&'); - // need to iterate through all pages to retrieve the list of all versions - // Adopt API doesn't provide way to retrieve the count of pages to iterate so infinity loop - let page_index = 0; - const availableVersions = []; - while (true) { - const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; - const availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`; - if (core.isDebug() && page_index === 0) { - // url is identical except page_index so print it once for debug - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); - } - const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result; - if (paginationPage === null || paginationPage.length === 0) { - // break infinity loop because we have reached end of pagination - break; - } - availableVersions.push(...paginationPage); - page_index++; - } - if (core.isDebug()) { - core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Adopt took'); // eslint-disable-line no-console - core.debug(`Available versions: [${availableVersions.length}]`); - core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); - core.endGroup(); - } - return availableVersions; - }); - } - getPlatformOption() { - // Adopt has own platform names so need to map them - switch (process.platform) { - case 'darwin': - return 'mac'; - case 'win32': - return 'windows'; - default: - return process.platform; - } - } -} -exports.AdoptDistribution = AdoptDistribution; - - -/***/ }), - -/***/ 59741: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +exports.blobContentType = { + parameterPath: ["options", "blobHttpHeaders", "blobContentType"], + mapper: { + serializedName: "x-ms-blob-content-type", + xmlName: "x-ms-blob-content-type", + type: { + name: "String", + }, + }, +}; +exports.blobContentMD5 = { + parameterPath: ["options", "blobHttpHeaders", "blobContentMD5"], + mapper: { + serializedName: "x-ms-blob-content-md5", + xmlName: "x-ms-blob-content-md5", + type: { + name: "ByteArray", + }, + }, +}; +exports.blobContentEncoding = { + parameterPath: ["options", "blobHttpHeaders", "blobContentEncoding"], + mapper: { + serializedName: "x-ms-blob-content-encoding", + xmlName: "x-ms-blob-content-encoding", + type: { + name: "String", + }, + }, +}; +exports.blobContentLanguage = { + parameterPath: ["options", "blobHttpHeaders", "blobContentLanguage"], + mapper: { + serializedName: "x-ms-blob-content-language", + xmlName: "x-ms-blob-content-language", + type: { + name: "String", + }, + }, +}; +exports.blobContentDisposition = { + parameterPath: ["options", "blobHttpHeaders", "blobContentDisposition"], + mapper: { + serializedName: "x-ms-blob-content-disposition", + xmlName: "x-ms-blob-content-disposition", + type: { + name: "String", + }, + }, +}; +exports.comp12 = { + parameterPath: "comp", + mapper: { + defaultValue: "immutabilityPolicies", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.immutabilityPolicyExpiry = { + parameterPath: ["options", "immutabilityPolicyExpiry"], + mapper: { + serializedName: "x-ms-immutability-policy-until-date", + xmlName: "x-ms-immutability-policy-until-date", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.immutabilityPolicyMode = { + parameterPath: ["options", "immutabilityPolicyMode"], + mapper: { + serializedName: "x-ms-immutability-policy-mode", + xmlName: "x-ms-immutability-policy-mode", + type: { + name: "Enum", + allowedValues: ["Mutable", "Unlocked", "Locked"], + }, + }, +}; +exports.comp13 = { + parameterPath: "comp", + mapper: { + defaultValue: "legalhold", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.legalHold = { + parameterPath: "legalHold", + mapper: { + serializedName: "x-ms-legal-hold", + required: true, + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, +}; +exports.encryptionScope = { + parameterPath: ["options", "encryptionScope"], + mapper: { + serializedName: "x-ms-encryption-scope", + xmlName: "x-ms-encryption-scope", + type: { + name: "String", + }, + }, +}; +exports.comp14 = { + parameterPath: "comp", + mapper: { + defaultValue: "snapshot", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.tier = { + parameterPath: ["options", "tier"], + mapper: { + serializedName: "x-ms-access-tier", + xmlName: "x-ms-access-tier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold", + ], + }, + }, +}; +exports.rehydratePriority = { + parameterPath: ["options", "rehydratePriority"], + mapper: { + serializedName: "x-ms-rehydrate-priority", + xmlName: "x-ms-rehydrate-priority", + type: { + name: "Enum", + allowedValues: ["High", "Standard"], + }, + }, +}; +exports.sourceIfModifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfModifiedSince", + ], + mapper: { + serializedName: "x-ms-source-if-modified-since", + xmlName: "x-ms-source-if-modified-since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.sourceIfUnmodifiedSince = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfUnmodifiedSince", + ], + mapper: { + serializedName: "x-ms-source-if-unmodified-since", + xmlName: "x-ms-source-if-unmodified-since", + type: { + name: "DateTimeRfc1123", + }, + }, +}; +exports.sourceIfMatch = { + parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfMatch"], + mapper: { + serializedName: "x-ms-source-if-match", + xmlName: "x-ms-source-if-match", + type: { + name: "String", + }, + }, +}; +exports.sourceIfNoneMatch = { + parameterPath: [ + "options", + "sourceModifiedAccessConditions", + "sourceIfNoneMatch", + ], + mapper: { + serializedName: "x-ms-source-if-none-match", + xmlName: "x-ms-source-if-none-match", + type: { + name: "String", + }, + }, +}; +exports.sourceIfTags = { + parameterPath: ["options", "sourceModifiedAccessConditions", "sourceIfTags"], + mapper: { + serializedName: "x-ms-source-if-tags", + xmlName: "x-ms-source-if-tags", + type: { + name: "String", + }, + }, +}; +exports.copySource = { + parameterPath: "copySource", + mapper: { + serializedName: "x-ms-copy-source", + required: true, + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, +}; +exports.blobTagsString = { + parameterPath: ["options", "blobTagsString"], + mapper: { + serializedName: "x-ms-tags", + xmlName: "x-ms-tags", + type: { + name: "String", + }, + }, +}; +exports.sealBlob = { + parameterPath: ["options", "sealBlob"], + mapper: { + serializedName: "x-ms-seal-blob", + xmlName: "x-ms-seal-blob", + type: { + name: "Boolean", + }, + }, +}; +exports.legalHold1 = { + parameterPath: ["options", "legalHold"], + mapper: { + serializedName: "x-ms-legal-hold", + xmlName: "x-ms-legal-hold", + type: { + name: "Boolean", + }, + }, +}; +exports.xMsRequiresSync = { + parameterPath: "xMsRequiresSync", + mapper: { + defaultValue: "true", + isConstant: true, + serializedName: "x-ms-requires-sync", + type: { + name: "String", + }, + }, +}; +exports.sourceContentMD5 = { + parameterPath: ["options", "sourceContentMD5"], + mapper: { + serializedName: "x-ms-source-content-md5", + xmlName: "x-ms-source-content-md5", + type: { + name: "ByteArray", + }, + }, +}; +exports.copySourceAuthorization = { + parameterPath: ["options", "copySourceAuthorization"], + mapper: { + serializedName: "x-ms-copy-source-authorization", + xmlName: "x-ms-copy-source-authorization", + type: { + name: "String", + }, + }, +}; +exports.copySourceTags = { + parameterPath: ["options", "copySourceTags"], + mapper: { + serializedName: "x-ms-copy-source-tag-option", + xmlName: "x-ms-copy-source-tag-option", + type: { + name: "Enum", + allowedValues: ["REPLACE", "COPY"], + }, + }, +}; +exports.fileRequestIntent = { + parameterPath: ["options", "fileRequestIntent"], + mapper: { + serializedName: "x-ms-file-request-intent", + xmlName: "x-ms-file-request-intent", + type: { + name: "String", + }, + }, +}; +exports.comp15 = { + parameterPath: "comp", + mapper: { + defaultValue: "copy", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.copyActionAbortConstant = { + parameterPath: "copyActionAbortConstant", + mapper: { + defaultValue: "abort", + isConstant: true, + serializedName: "x-ms-copy-action", + type: { + name: "String", + }, + }, +}; +exports.copyId = { + parameterPath: "copyId", + mapper: { + serializedName: "copyid", + required: true, + xmlName: "copyid", + type: { + name: "String", + }, + }, +}; +exports.comp16 = { + parameterPath: "comp", + mapper: { + defaultValue: "tier", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.tier1 = { + parameterPath: "tier", + mapper: { + serializedName: "x-ms-access-tier", + required: true, + xmlName: "x-ms-access-tier", + type: { + name: "Enum", + allowedValues: [ + "P4", + "P6", + "P10", + "P15", + "P20", + "P30", + "P40", + "P50", + "P60", + "P70", + "P80", + "Hot", + "Cool", + "Archive", + "Cold", + ], + }, + }, +}; +exports.queryRequest = { + parameterPath: ["options", "queryRequest"], + mapper: mappers_js_1.QueryRequest, +}; +exports.comp17 = { + parameterPath: "comp", + mapper: { + defaultValue: "query", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.comp18 = { + parameterPath: "comp", + mapper: { + defaultValue: "tags", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.tags = { + parameterPath: ["options", "tags"], + mapper: mappers_js_1.BlobTags, +}; +exports.transactionalContentMD5 = { + parameterPath: ["options", "transactionalContentMD5"], + mapper: { + serializedName: "Content-MD5", + xmlName: "Content-MD5", + type: { + name: "ByteArray", + }, + }, +}; +exports.transactionalContentCrc64 = { + parameterPath: ["options", "transactionalContentCrc64"], + mapper: { + serializedName: "x-ms-content-crc64", + xmlName: "x-ms-content-crc64", + type: { + name: "ByteArray", + }, + }, +}; +exports.blobType = { + parameterPath: "blobType", + mapper: { + defaultValue: "PageBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { + name: "String", + }, + }, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.blobContentLength = { + parameterPath: "blobContentLength", + mapper: { + serializedName: "x-ms-blob-content-length", + required: true, + xmlName: "x-ms-blob-content-length", + type: { + name: "Number", + }, + }, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.blobSequenceNumber = { + parameterPath: ["options", "blobSequenceNumber"], + mapper: { + defaultValue: 0, + serializedName: "x-ms-blob-sequence-number", + xmlName: "x-ms-blob-sequence-number", + type: { + name: "Number", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.JavaBase = void 0; -const tc = __importStar(__nccwpck_require__(27784)); -const core = __importStar(__nccwpck_require__(42186)); -const fs = __importStar(__nccwpck_require__(57147)); -const semver_1 = __importDefault(__nccwpck_require__(11383)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const httpm = __importStar(__nccwpck_require__(96255)); -const util_1 = __nccwpck_require__(92629); -const constants_1 = __nccwpck_require__(69042); -const os_1 = __importDefault(__nccwpck_require__(22037)); -class JavaBase { - constructor(distribution, installerOptions) { - this.distribution = distribution; - this.http = new httpm.HttpClient('actions/setup-java', undefined, { - allowRetries: true, - maxRetries: 3 - }); - ({ version: this.version, stable: this.stable } = this.normalizeVersion(installerOptions.version)); - this.architecture = installerOptions.architecture || os_1.default.arch(); - this.packageType = installerOptions.packageType; - this.checkLatest = installerOptions.checkLatest; - } - setupJava() { - return __awaiter(this, void 0, void 0, function* () { - let foundJava = this.findInToolcache(); - if (foundJava && !this.checkLatest) { - core.info(`Resolved Java ${foundJava.version} from tool-cache`); - } - else { - core.info('Trying to resolve the latest version from remote'); - const javaRelease = yield this.findPackageForDownload(this.version); - core.info(`Resolved latest version as ${javaRelease.version}`); - if ((foundJava === null || foundJava === void 0 ? void 0 : foundJava.version) === javaRelease.version) { - core.info(`Resolved Java ${foundJava.version} from tool-cache`); - } - else { - core.info('Trying to download...'); - foundJava = yield this.downloadTool(javaRelease); - core.info(`Java ${foundJava.version} was downloaded`); - } - } - // JDK folder may contain postfix "Contents/Home" on macOS - const macOSPostfixPath = path_1.default.join(foundJava.path, constants_1.MACOS_JAVA_CONTENT_POSTFIX); - if (process.platform === 'darwin' && fs.existsSync(macOSPostfixPath)) { - foundJava.path = macOSPostfixPath; - } - core.info(`Setting Java ${foundJava.version} as the default`); - this.setJavaDefault(foundJava.version, foundJava.path); - return foundJava; - }); - } - get toolcacheFolderName() { - return `Java_${this.distribution}_${this.packageType}`; - } - getToolcacheVersionName(version) { - if (!this.stable) { - if (version.includes('+')) { - return version.replace('+', '-ea.'); - } - else { - return `${version}-ea`; - } - } - // Kotlin and some Java dependencies don't work properly when Java path contains "+" sign - // so replace "/hostedtoolcache/Java/11.0.3+4/x64" to "/hostedtoolcache/Java/11.0.3-4/x64" when saves to cache - // related issue: https://github.com/actions/virtual-environments/issues/3014 - return version.replace('+', '-'); - } - findInToolcache() { - // we can't use tc.find directly because firstly, we need to filter versions by stability flag - // if *-ea is provided, take only ea versions from toolcache, otherwise - only stable versions - const availableVersions = tc - .findAllVersions(this.toolcacheFolderName, this.architecture) - .map(item => { - return { - version: item - .replace('-ea.', '+') - .replace(/-ea$/, '') - // Kotlin and some Java dependencies don't work properly when Java path contains "+" sign - // so replace "/hostedtoolcache/Java/11.0.3-4/x64" to "/hostedtoolcache/Java/11.0.3+4/x64" when retrieves to cache - // related issue: https://github.com/actions/virtual-environments/issues/3014 - .replace('-', '+'), - path: (0, util_1.getToolcachePath)(this.toolcacheFolderName, item, this.architecture) || '', - stable: !item.includes('-ea') - }; - }) - .filter(item => item.stable === this.stable); - const satisfiedVersions = availableVersions - .filter(item => (0, util_1.isVersionSatisfies)(this.version, item.version)) - .filter(item => item.path) - .sort((a, b) => { - return -semver_1.default.compareBuild(a.version, b.version); - }); - if (!satisfiedVersions || satisfiedVersions.length === 0) { - return null; - } - return { - version: satisfiedVersions[0].version, - path: satisfiedVersions[0].path - }; - } - normalizeVersion(version) { - let stable = true; - if (version.endsWith('-ea')) { - version = version.replace(/-ea$/, ''); - stable = false; - } - else if (version.includes('-ea.')) { - // transform '11.0.3-ea.2' -> '11.0.3+2' - version = version.replace('-ea.', '+'); - stable = false; - } - if (!semver_1.default.validRange(version)) { - throw new Error(`The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information`); - } - return { - version, - stable - }; - } - setJavaDefault(version, toolPath) { - const majorVersion = version.split('.')[0]; - core.exportVariable('JAVA_HOME', toolPath); - core.addPath(path_1.default.join(toolPath, 'bin')); - core.setOutput('distribution', this.distribution); - core.setOutput('path', toolPath); - core.setOutput('version', version); - core.exportVariable(`JAVA_HOME_${majorVersion}_${this.architecture.toUpperCase()}`, toolPath); - } - distributionArchitecture() { - // default mappings of config architectures to distribution architectures - // override if a distribution uses any different names; see liberica for an example - // node's os.arch() - which this defaults to - can return any of: - // 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', and 'x64' - // so we need to map these to java distribution architectures - // 'amd64' is included here too b/c it's a common alias for 'x64' people might use explicitly - switch (this.architecture) { - case 'amd64': - return 'x64'; - case 'ia32': - return 'x86'; - case 'arm64': - return 'aarch64'; - default: - return this.architecture; - } - } -} -exports.JavaBase = JavaBase; - - -/***/ }), - -/***/ 34750: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +exports.contentType1 = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/octet-stream", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String", + }, + }, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.body1 = { + parameterPath: "body", + mapper: { + serializedName: "body", + required: true, + xmlName: "body", + type: { + name: "Stream", + }, + }, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.accept2 = { + parameterPath: "accept", + mapper: { + defaultValue: "application/xml", + isConstant: true, + serializedName: "Accept", + type: { + name: "String", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CorrettoDistribution = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const util_1 = __nccwpck_require__(92629); -const base_installer_1 = __nccwpck_require__(59741); -class CorrettoDistribution extends base_installer_1.JavaBase { - constructor(installerOptions) { - super('Corretto', installerOptions); - } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - const javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, (0, util_1.getDownloadArchiveExtension)()); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const version = this.getToolcacheVersionName(javaRelease.version); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); - } - findPackageForDownload(version) { - return __awaiter(this, void 0, void 0, function* () { - if (!this.stable) { - throw new Error('Early access versions are not supported'); - } - if (version.includes('.')) { - throw new Error('Only major versions are supported'); - } - const availableVersions = yield this.getAvailableVersions(); - const matchingVersions = availableVersions - .filter(item => item.version == version) - .map(item => { - return { - version: (0, util_1.convertVersionToSemver)(item.correttoVersion), - url: item.downloadLink - }; - }); - const resolvedVersion = matchingVersions.length > 0 ? matchingVersions[0] : null; - if (!resolvedVersion) { - const availableOptions = availableVersions - .map(item => item.version) - .join(', '); - const availableOptionsMessage = availableOptions - ? `\nAvailable versions: ${availableOptions}` - : ''; - throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); - } - return resolvedVersion; - }); - } - getAvailableVersions() { - var _a, _b; - return __awaiter(this, void 0, void 0, function* () { - const platform = this.getPlatformOption(); - const arch = this.distributionArchitecture(); - const imageType = this.packageType; - if (core.isDebug()) { - console.time('Retrieving available versions for Coretto took'); // eslint-disable-line no-console - } - const availableVersionsUrl = 'https://corretto.github.io/corretto-downloads/latest_links/indexmap_with_checksum.json'; - const fetchCurrentVersions = yield this.http.getJson(availableVersionsUrl); - const fetchedCurrentVersions = fetchCurrentVersions.result; - if (!fetchedCurrentVersions) { - throw Error(`Could not fetch latest corretto versions from ${availableVersionsUrl}`); - } - const eligibleVersions = (_b = (_a = fetchedCurrentVersions === null || fetchedCurrentVersions === void 0 ? void 0 : fetchedCurrentVersions[platform]) === null || _a === void 0 ? void 0 : _a[arch]) === null || _b === void 0 ? void 0 : _b[imageType]; - const availableVersions = this.getAvailableVersionsForPlatform(eligibleVersions); - if (core.isDebug()) { - core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Coretto took'); // eslint-disable-line no-console - core.debug(`Available versions: [${availableVersions.length}]`); - core.debug(availableVersions - .map(item => `${item.version}: ${item.correttoVersion}`) - .join(', ')); - core.endGroup(); - } - return availableVersions; - }); - } - getAvailableVersionsForPlatform(eligibleVersions) { - const availableVersions = []; - for (const version in eligibleVersions) { - const availableVersion = eligibleVersions[version]; - for (const fileType in availableVersion) { - const skipNonExtractableBinaries = fileType != (0, util_1.getDownloadArchiveExtension)(); - if (skipNonExtractableBinaries) { - continue; - } - const availableVersionDetails = availableVersion[fileType]; - const correttoVersion = this.getCorrettoVersion(availableVersionDetails.resource); - availableVersions.push({ - checksum: availableVersionDetails.checksum, - checksum_sha256: availableVersionDetails.checksum_sha256, - fileType, - resource: availableVersionDetails.resource, - downloadLink: `https://corretto.aws${availableVersionDetails.resource}`, - version: version, - correttoVersion - }); - } - } - return availableVersions; - } - getPlatformOption() { - // Corretto has its own platform names so we need to map them - switch (process.platform) { - case 'darwin': - return 'macos'; - case 'win32': - return 'windows'; - default: - return process.platform; - } - } - getCorrettoVersion(resource) { - const regex = /(\d+.+)\//; - const match = regex.exec(resource); - if (match === null) { - throw Error(`Could not parse corretto version from ${resource}`); - } - return match[1]; - } -} -exports.CorrettoDistribution = CorrettoDistribution; - - -/***/ }), - -/***/ 10924: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getJavaDistribution = void 0; -const installer_1 = __nccwpck_require__(19917); -const installer_2 = __nccwpck_require__(82005); -const installer_3 = __nccwpck_require__(68766); -const installer_4 = __nccwpck_require__(18579); -const installer_5 = __nccwpck_require__(40883); -const installer_6 = __nccwpck_require__(73613); -const installer_7 = __nccwpck_require__(41121); -const installer_8 = __nccwpck_require__(34750); -const installer_9 = __nccwpck_require__(64298); -const installer_10 = __nccwpck_require__(16132); -var JavaDistribution; -(function (JavaDistribution) { - JavaDistribution["Adopt"] = "adopt"; - JavaDistribution["AdoptHotspot"] = "adopt-hotspot"; - JavaDistribution["AdoptOpenJ9"] = "adopt-openj9"; - JavaDistribution["Temurin"] = "temurin"; - JavaDistribution["Zulu"] = "zulu"; - JavaDistribution["Liberica"] = "liberica"; - JavaDistribution["JdkFile"] = "jdkfile"; - JavaDistribution["Microsoft"] = "microsoft"; - JavaDistribution["Semeru"] = "semeru"; - JavaDistribution["Corretto"] = "corretto"; - JavaDistribution["Oracle"] = "oracle"; - JavaDistribution["Dragonwell"] = "dragonwell"; -})(JavaDistribution || (JavaDistribution = {})); -function getJavaDistribution(distributionName, installerOptions, jdkFile) { - switch (distributionName) { - case JavaDistribution.JdkFile: - return new installer_1.LocalDistribution(installerOptions, jdkFile); - case JavaDistribution.Adopt: - case JavaDistribution.AdoptHotspot: - return new installer_3.AdoptDistribution(installerOptions, installer_3.AdoptImplementation.Hotspot); - case JavaDistribution.AdoptOpenJ9: - return new installer_3.AdoptDistribution(installerOptions, installer_3.AdoptImplementation.OpenJ9); - case JavaDistribution.Temurin: - return new installer_4.TemurinDistribution(installerOptions, installer_4.TemurinImplementation.Hotspot); - case JavaDistribution.Zulu: - return new installer_2.ZuluDistribution(installerOptions); - case JavaDistribution.Liberica: - return new installer_5.LibericaDistributions(installerOptions); - case JavaDistribution.Microsoft: - return new installer_6.MicrosoftDistributions(installerOptions); - case JavaDistribution.Semeru: - return new installer_7.SemeruDistribution(installerOptions); - case JavaDistribution.Corretto: - return new installer_8.CorrettoDistribution(installerOptions); - case JavaDistribution.Oracle: - return new installer_9.OracleDistribution(installerOptions); - case JavaDistribution.Dragonwell: - return new installer_10.DragonwellDistribution(installerOptions); - default: - return null; - } -} -exports.getJavaDistribution = getJavaDistribution; - - -/***/ }), - -/***/ 16132: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +exports.comp19 = { + parameterPath: "comp", + mapper: { + defaultValue: "page", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.pageWrite = { + parameterPath: "pageWrite", + mapper: { + defaultValue: "update", + isConstant: true, + serializedName: "x-ms-page-write", + type: { + name: "String", + }, + }, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.ifSequenceNumberLessThanOrEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThanOrEqualTo", + ], + mapper: { + serializedName: "x-ms-if-sequence-number-le", + xmlName: "x-ms-if-sequence-number-le", + type: { + name: "Number", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DragonwellDistribution = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const semver_1 = __importDefault(__nccwpck_require__(11383)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const base_installer_1 = __nccwpck_require__(59741); -const util_1 = __nccwpck_require__(92629); -class DragonwellDistribution extends base_installer_1.JavaBase { - constructor(installerOptions) { - super('Dragonwell', installerOptions); - } - findPackageForDownload(version) { - return __awaiter(this, void 0, void 0, function* () { - if (!this.stable) { - throw new Error('Early access versions are not supported by Dragonwell'); - } - if (this.packageType !== 'jdk') { - throw new Error('Dragonwell provides only the `jdk` package type'); - } - const availableVersions = yield this.getAvailableVersions(); - const matchedVersions = availableVersions - .filter(item => { - return (0, util_1.isVersionSatisfies)(version, item.jdk_version); - }) - .map(item => { - return { - version: item.jdk_version, - url: item.download_link - }; - }); - if (!matchedVersions.length) { - throw new Error(`Couldn't find any satisfied version for the specified java-version: "${version}" and architecture: "${this.architecture}".`); - } - const resolvedVersion = matchedVersions[0]; - return resolvedVersion; - }); - } - getAvailableVersions() { - return __awaiter(this, void 0, void 0, function* () { - const platform = this.getPlatformOption(); - const arch = this.distributionArchitecture(); - let fetchedDragonwellJson = yield this.fetchJsonFromPrimaryUrl(); - if (!fetchedDragonwellJson) { - fetchedDragonwellJson = yield this.fetchJsonFromBackupUrl(); - } - if (!fetchedDragonwellJson) { - throw new Error(`Couldn't fetch Dragonwell versions information from both primary and backup urls`); - } - core.debug('Successfully fetched information about available Dragonwell versions'); - const availableVersions = this.parseVersions(platform, arch, fetchedDragonwellJson); - if (core.isDebug()) { - core.startGroup('Print information about available versions'); - core.debug(availableVersions.map(item => item.jdk_version).join(', ')); - core.endGroup(); - } - return availableVersions; - }); - } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - const javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, (0, util_1.getDownloadArchiveExtension)()); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const version = this.getToolcacheVersionName(javaRelease.version); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); - } - parseVersions(platform, arch, dragonwellVersions) { - var _a; - const eligibleVersions = []; - for (const majorVersion in dragonwellVersions) { - const majorVersionMap = dragonwellVersions[majorVersion]; - for (let jdkVersion in majorVersionMap) { - const jdkVersionMap = majorVersionMap[jdkVersion]; - if (!(platform in jdkVersionMap)) { - continue; - } - const platformMap = jdkVersionMap[platform]; - if (!(arch in platformMap)) { - continue; - } - const archMap = platformMap[arch]; - if (jdkVersion === 'latest') { - continue; - } - // Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits). - // Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools. - if (jdkVersion.split('.').length > 3) { - jdkVersion = (0, util_1.convertVersionToSemver)(jdkVersion); - } - for (const edition in archMap) { - eligibleVersions.push({ - os: platform, - architecture: arch, - jdk_version: jdkVersion, - checksum: (_a = archMap[edition].sha256) !== null && _a !== void 0 ? _a : '', - download_link: archMap[edition].download_url, - edition: edition, - image_type: 'jdk' - }); - break; // Get the first available link to the JDK. In most cases it should point to the Extended version of JDK, in rare cases like with v17 it points to the Standard version (the only available). - } - } - } - const sortedVersions = this.sortParsedVersions(eligibleVersions); - return sortedVersions; - } - // Sorts versions in descending order as by default data in JSON isn't sorted - sortParsedVersions(eligibleVersions) { - const sortedVersions = eligibleVersions.sort((versionObj1, versionObj2) => { - const version1 = versionObj1.jdk_version; - const version2 = versionObj2.jdk_version; - return semver_1.default.compareBuild(version1, version2); - }); - return sortedVersions.reverse(); - } - getPlatformOption() { - switch (process.platform) { - case 'win32': - return 'windows'; - default: - return process.platform; - } - } - fetchJsonFromPrimaryUrl() { - return __awaiter(this, void 0, void 0, function* () { - const primaryUrl = 'https://dragonwell-jdk.io/map_with_checksum.json'; - try { - core.debug(`Trying to fetch available Dragonwell versions info from the primary url: ${primaryUrl}`); - const fetchedDragonwellJson = (yield this.http.getJson(primaryUrl)).result; - return fetchedDragonwellJson; - } - catch (err) { - core.debug(`Fetching Dragonwell versions info from the primary link: ${primaryUrl} ended up with the error: ${err.message}`); - return null; - } - }); - } - fetchJsonFromBackupUrl() { - return __awaiter(this, void 0, void 0, function* () { - const owner = 'dragonwell-releng'; - const repository = 'dragonwell-setup-java'; - const branch = 'main'; - const filePath = 'releases.json'; - const backupUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; - const headers = (0, util_1.getGitHubHttpHeaders)(); - try { - core.debug(`Trying to fetch available Dragonwell versions info from the backup url: ${backupUrl}`); - const fetchedDragonwellJson = (yield this.http.getJson(backupUrl, headers)).result; - return fetchedDragonwellJson; - } - catch (err) { - core.debug(`Fetching Dragonwell versions info from the backup url: ${backupUrl} ended up with the error: ${err.message}`); - return null; - } - }); - } -} -exports.DragonwellDistribution = DragonwellDistribution; - - -/***/ }), - -/***/ 40883: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +exports.ifSequenceNumberLessThan = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberLessThan", + ], + mapper: { + serializedName: "x-ms-if-sequence-number-lt", + xmlName: "x-ms-if-sequence-number-lt", + type: { + name: "Number", + }, + }, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.ifSequenceNumberEqualTo = { + parameterPath: [ + "options", + "sequenceNumberAccessConditions", + "ifSequenceNumberEqualTo", + ], + mapper: { + serializedName: "x-ms-if-sequence-number-eq", + xmlName: "x-ms-if-sequence-number-eq", + type: { + name: "Number", + }, + }, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.pageWrite1 = { + parameterPath: "pageWrite", + mapper: { + defaultValue: "clear", + isConstant: true, + serializedName: "x-ms-page-write", + type: { + name: "String", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LibericaDistributions = void 0; -const base_installer_1 = __nccwpck_require__(59741); -const semver_1 = __importDefault(__nccwpck_require__(11383)); -const util_1 = __nccwpck_require__(92629); -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const supportedPlatform = `'linux', 'linux-musl', 'macos', 'solaris', 'windows'`; -const supportedArchitectures = `'x86', 'x64', 'armv7', 'aarch64', 'ppc64le'`; -class LibericaDistributions extends base_installer_1.JavaBase { - constructor(installerOptions) { - super('Liberica', installerOptions); - } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - let javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extension = (0, util_1.getDownloadArchiveExtension)(); - if (process.platform === 'win32' && - (this.architecture === 'arm64' || this.architecture === 'aarch64')) { - const javaArchivePathRenamed = `${javaArchivePath}.zip`; - yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed); - javaArchivePath = javaArchivePathRenamed; - } - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); - } - findPackageForDownload(range) { - return __awaiter(this, void 0, void 0, function* () { - const availableVersionsRaw = yield this.getAvailableVersions(); - const availableVersions = availableVersionsRaw.map(item => ({ - url: item.downloadUrl, - version: this.convertVersionToSemver(item) - })); - const satisfiedVersion = availableVersions - .filter(item => (0, util_1.isVersionSatisfies)(range, item.version)) - .sort((a, b) => -semver_1.default.compareBuild(a.version, b.version))[0]; - if (!satisfiedVersion) { - const availableOptions = availableVersions - .map(item => item.version) - .join(', '); - const availableOptionsMessage = availableOptions - ? `\nAvailable versions: ${availableOptions}` - : ''; - throw new Error(`Could not find satisfied version for semver ${range}. ${availableOptionsMessage}`); - } - return satisfiedVersion; - }); - } - getAvailableVersions() { - var _a; - return __awaiter(this, void 0, void 0, function* () { - if (core.isDebug()) { - console.time('Retrieving available versions for Liberica took'); // eslint-disable-line no-console - } - const url = this.prepareAvailableVersionsUrl(); - core.debug(`Gathering available versions from '${url}'`); - const availableVersions = (_a = (yield this.http.getJson(url)).result) !== null && _a !== void 0 ? _a : []; - if (core.isDebug()) { - core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Liberica took'); // eslint-disable-line no-console - core.debug(`Available versions: [${availableVersions.length}]`); - core.debug(availableVersions.map(item => item.version).join(', ')); - core.endGroup(); - } - return availableVersions; - }); - } - prepareAvailableVersionsUrl() { - const urlOptions = Object.assign(Object.assign({ os: this.getPlatformOption(), 'bundle-type': this.getBundleType() }, this.getArchitectureOptions()), { 'build-type': this.stable ? 'all' : 'ea', 'installation-type': 'archive', fields: 'downloadUrl,version,featureVersion,interimVersion,updateVersion,buildVersion' }); - const searchParams = new URLSearchParams(urlOptions).toString(); - return `https://api.bell-sw.com/v1/liberica/releases?${searchParams}`; - } - getBundleType() { - const [bundleType, feature] = this.packageType.split('+'); - if (feature === null || feature === void 0 ? void 0 : feature.includes('fx')) { - return bundleType + '-full'; - } - return bundleType; - } - getArchitectureOptions() { - const arch = this.distributionArchitecture(); - switch (arch) { - case 'x86': - return { bitness: '32', arch: 'x86' }; - case 'x64': - return { bitness: '64', arch: 'x86' }; - case 'armv7': - return { bitness: '32', arch: 'arm' }; - case 'aarch64': - return { bitness: '64', arch: 'arm' }; - case 'ppc64le': - return { bitness: '64', arch: 'ppc' }; - default: - throw new Error(`Architecture '${this.architecture}' is not supported. Supported architectures: ${supportedArchitectures}`); - } - } - getPlatformOption(platform = process.platform) { - switch (platform) { - case 'darwin': - return 'macos'; - case 'win32': - case 'cygwin': - return 'windows'; - case 'linux': - return 'linux'; - case 'sunos': - return 'solaris'; - default: - throw new Error(`Platform '${platform}' is not supported. Supported platforms: ${supportedPlatform}`); - } - } - convertVersionToSemver(version) { - const { buildVersion, featureVersion, interimVersion, updateVersion } = version; - const mainVersion = [featureVersion, interimVersion, updateVersion].join('.'); - if (buildVersion != 0) { - return `${mainVersion}+${buildVersion}`; - } - return mainVersion; - } - distributionArchitecture() { - const arch = super.distributionArchitecture(); - switch (arch) { - case 'arm': - return 'armv7'; - default: - return arch; - } - } -} -exports.LibericaDistributions = LibericaDistributions; - - -/***/ }), - -/***/ 19917: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +exports.sourceUrl = { + parameterPath: "sourceUrl", + mapper: { + serializedName: "x-ms-copy-source", + required: true, + xmlName: "x-ms-copy-source", + type: { + name: "String", + }, + }, +}; +exports.sourceRange = { + parameterPath: "sourceRange", + mapper: { + serializedName: "x-ms-source-range", + required: true, + xmlName: "x-ms-source-range", + type: { + name: "String", + }, + }, +}; +exports.sourceContentCrc64 = { + parameterPath: ["options", "sourceContentCrc64"], + mapper: { + serializedName: "x-ms-source-content-crc64", + xmlName: "x-ms-source-content-crc64", + type: { + name: "ByteArray", + }, + }, +}; +exports.range1 = { + parameterPath: "range", + mapper: { + serializedName: "x-ms-range", + required: true, + xmlName: "x-ms-range", + type: { + name: "String", + }, + }, +}; +exports.comp20 = { + parameterPath: "comp", + mapper: { + defaultValue: "pagelist", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.prevsnapshot = { + parameterPath: ["options", "prevsnapshot"], + mapper: { + serializedName: "prevsnapshot", + xmlName: "prevsnapshot", + type: { + name: "String", + }, + }, +}; +exports.prevSnapshotUrl = { + parameterPath: ["options", "prevSnapshotUrl"], + mapper: { + serializedName: "x-ms-previous-snapshot-url", + xmlName: "x-ms-previous-snapshot-url", + type: { + name: "String", + }, + }, +}; +exports.sequenceNumberAction = { + parameterPath: "sequenceNumberAction", + mapper: { + serializedName: "x-ms-sequence-number-action", + required: true, + xmlName: "x-ms-sequence-number-action", + type: { + name: "Enum", + allowedValues: ["max", "update", "increment"], + }, + }, +}; +exports.comp21 = { + parameterPath: "comp", + mapper: { + defaultValue: "incrementalcopy", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.blobType1 = { + parameterPath: "blobType", + mapper: { + defaultValue: "AppendBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { + name: "String", + }, + }, +}; +exports.comp22 = { + parameterPath: "comp", + mapper: { + defaultValue: "appendblock", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.maxSize = { + parameterPath: ["options", "appendPositionAccessConditions", "maxSize"], + mapper: { + serializedName: "x-ms-blob-condition-maxsize", + xmlName: "x-ms-blob-condition-maxsize", + type: { + name: "Number", + }, + }, +}; +exports.appendPosition = { + parameterPath: [ + "options", + "appendPositionAccessConditions", + "appendPosition", + ], + mapper: { + serializedName: "x-ms-blob-condition-appendpos", + xmlName: "x-ms-blob-condition-appendpos", + type: { + name: "Number", + }, + }, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +exports.sourceRange1 = { + parameterPath: ["options", "sourceRange"], + mapper: { + serializedName: "x-ms-source-range", + xmlName: "x-ms-source-range", + type: { + name: "String", + }, + }, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +exports.comp23 = { + parameterPath: "comp", + mapper: { + defaultValue: "seal", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LocalDistribution = void 0; -const tc = __importStar(__nccwpck_require__(27784)); -const core = __importStar(__nccwpck_require__(42186)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const base_installer_1 = __nccwpck_require__(59741); -const util_1 = __nccwpck_require__(92629); -const constants_1 = __nccwpck_require__(69042); -class LocalDistribution extends base_installer_1.JavaBase { - constructor(installerOptions, jdkFile) { - super('jdkfile', installerOptions); - this.jdkFile = jdkFile; - } - setupJava() { - return __awaiter(this, void 0, void 0, function* () { - let foundJava = this.findInToolcache(); - if (foundJava) { - core.info(`Resolved Java ${foundJava.version} from tool-cache`); - } - else { - core.info(`Java ${this.version} was not found in tool-cache. Trying to unpack JDK file...`); - if (!this.jdkFile) { - throw new Error("'jdkFile' is not specified"); - } - const jdkFilePath = path_1.default.resolve(this.jdkFile); - const stats = fs_1.default.statSync(jdkFilePath); - if (!stats.isFile()) { - throw new Error(`JDK file was not found in path '${jdkFilePath}'`); - } - core.info(`Extracting Java from '${jdkFilePath}'`); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(jdkFilePath); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const javaVersion = this.version; - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaVersion), this.architecture); - foundJava = { - version: javaVersion, - path: javaPath - }; - } - // JDK folder may contain postfix "Contents/Home" on macOS - const macOSPostfixPath = path_1.default.join(foundJava.path, constants_1.MACOS_JAVA_CONTENT_POSTFIX); - if (process.platform === 'darwin' && fs_1.default.existsSync(macOSPostfixPath)) { - foundJava.path = macOSPostfixPath; - } - core.info(`Setting Java ${foundJava.version} as default`); - this.setJavaDefault(foundJava.version, foundJava.path); - return foundJava; - }); - } - findPackageForDownload(version // eslint-disable-line @typescript-eslint/no-unused-vars - ) { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('This method should not be implemented in local file provider'); - }); - } - downloadTool(javaRelease // eslint-disable-line @typescript-eslint/no-unused-vars - ) { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('This method should not be implemented in local file provider'); - }); - } -} -exports.LocalDistribution = LocalDistribution; - +exports.blobType2 = { + parameterPath: "blobType", + mapper: { + defaultValue: "BlockBlob", + isConstant: true, + serializedName: "x-ms-blob-type", + type: { + name: "String", + }, + }, +}; +exports.copySourceBlobProperties = { + parameterPath: ["options", "copySourceBlobProperties"], + mapper: { + serializedName: "x-ms-copy-source-blob-properties", + xmlName: "x-ms-copy-source-blob-properties", + type: { + name: "Boolean", + }, + }, +}; +exports.comp24 = { + parameterPath: "comp", + mapper: { + defaultValue: "block", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.blockId = { + parameterPath: "blockId", + mapper: { + serializedName: "blockid", + required: true, + xmlName: "blockid", + type: { + name: "String", + }, + }, +}; +exports.blocks = { + parameterPath: "blocks", + mapper: mappers_js_1.BlockLookupList, +}; +exports.comp25 = { + parameterPath: "comp", + mapper: { + defaultValue: "blocklist", + isConstant: true, + serializedName: "comp", + type: { + name: "String", + }, + }, +}; +exports.listType = { + parameterPath: "listType", + mapper: { + defaultValue: "committed", + serializedName: "blocklisttype", + required: true, + xmlName: "blocklisttype", + type: { + name: "Enum", + allowedValues: ["committed", "uncommitted", "all"], + }, + }, +}; +//# sourceMappingURL=parameters.js.map /***/ }), -/***/ 73613: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 80313: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MicrosoftDistributions = void 0; -const base_installer_1 = __nccwpck_require__(59741); -const util_1 = __nccwpck_require__(92629); -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -class MicrosoftDistributions extends base_installer_1.JavaBase { - constructor(installerOptions) { - super('Microsoft', installerOptions); +exports.AppendBlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing AppendBlob operations. */ +class AppendBlobImpl { + client; + /** + * Initialize a new instance of the class AppendBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - let javaArchivePath = yield tc.downloadTool(javaRelease.url); - // Rename archive to add extension because after downloading - // archive does not contain extension type and it leads to some issues - // on Windows runners without PowerShell Core. - // - // For default PowerShell Windows it should contain extension type to unpack it. - if (process.platform === 'win32' && - (this.architecture === 'arm64' || this.architecture === 'aarch64')) { - const javaArchivePathRenamed = `${javaArchivePath}.zip`; - yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed); - javaArchivePath = javaArchivePathRenamed; - } - core.info(`Extracting Java archive...`); - const extension = (0, util_1.getDownloadArchiveExtension)(); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); + /** + * The Create Append Blob operation creates a new append blob. + * @param contentLength The length of the request. + * @param options The options parameters. + */ + create(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, createOperationSpec); } - findPackageForDownload(range) { - return __awaiter(this, void 0, void 0, function* () { - const arch = this.distributionArchitecture(); - if (arch !== 'x64' && arch !== 'aarch64') { - throw new Error(`Unsupported architecture: ${this.architecture}`); - } - if (!this.stable) { - throw new Error('Early access versions are not supported'); - } - if (this.packageType !== 'jdk') { - throw new Error('Microsoft Build of OpenJDK provides only the `jdk` package type'); - } - const manifest = yield this.getAvailableVersions(); - if (!manifest) { - throw new Error('Could not load manifest for Microsoft Build of OpenJDK'); - } - const foundRelease = yield tc.findFromManifest(range, true, manifest, arch); - if (!foundRelease) { - throw new Error(`Could not find satisfied version for SemVer ${range}.\nAvailable versions: ${manifest - .map(item => item.version) - .join(', ')}`); - } - return { - url: foundRelease.files[0].download_url, - version: foundRelease.version - }; - }); + /** + * The Append Block operation commits a new block of data to the end of an existing append blob. The + * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to + * AppendBlob. Append Block is supported only on version 2015-02-21 version or later. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + appendBlock(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, appendBlockOperationSpec); } - getAvailableVersions() { - return __awaiter(this, void 0, void 0, function* () { - // TODO get these dynamically! - // We will need Microsoft to add an endpoint where we can query for versions. - const owner = 'actions'; - const repository = 'setup-java'; - const branch = 'main'; - const filePath = 'src/distributions/microsoft/microsoft-openjdk-versions.json'; - let releases = null; - const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; - const headers = (0, util_1.getGitHubHttpHeaders)(); - let response = null; - if (core.isDebug()) { - console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console - } - try { - response = yield this.http.getJson(fileUrl, headers); - if (!response.result) { - return null; - } - } - catch (err) { - core.debug(`Http request for microsoft-openjdk-versions.json failed with status code: ${response === null || response === void 0 ? void 0 : response.statusCode}`); - return null; - } - if (response.result) { - releases = response.result; - } - if (core.isDebug() && releases) { - core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console - core.debug(`Available versions: [${releases.length}]`); - core.debug(releases.map(item => item.version).join(', ')); - core.endGroup(); - } - return releases; - }); + /** + * The Append Block operation commits a new block of data to the end of an existing append blob where + * the contents are read from a source url. The Append Block operation is permitted only if the blob + * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version + * 2015-02-21 version or later. + * @param sourceUrl Specify a URL to the copy source. + * @param contentLength The length of the request. + * @param options The options parameters. + */ + appendBlockFromUrl(sourceUrl, contentLength, options) { + return this.client.sendOperationRequest({ sourceUrl, contentLength, options }, appendBlockFromUrlOperationSpec); + } + /** + * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version + * 2019-12-12 version or later. + * @param options The options parameters. + */ + seal(options) { + return this.client.sendOperationRequest({ options }, sealOperationSpec); } } -exports.MicrosoftDistributions = MicrosoftDistributions; - +exports.AppendBlobImpl = AppendBlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const createOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.AppendBlobCreateHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobCreateExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const appendBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.AppendBlobAppendBlockHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.maxSize, + Parameters.appendPosition, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const appendBlockFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.AppendBlobAppendBlockFromUrlHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobAppendBlockFromUrlExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp22], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.maxSize, + Parameters.appendPosition, + Parameters.sourceRange1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const sealOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.AppendBlobSealHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.AppendBlobSealExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp23], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.appendPosition, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=appendBlob.js.map /***/ }), -/***/ 64298: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 8296: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OracleDistribution = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const base_installer_1 = __nccwpck_require__(59741); -const util_1 = __nccwpck_require__(92629); -const http_client_1 = __nccwpck_require__(96255); -const ORACLE_DL_BASE = 'https://download.oracle.com/java'; -class OracleDistribution extends base_installer_1.JavaBase { - constructor(installerOptions) { - super('Oracle', installerOptions); - } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - const javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extension = (0, util_1.getDownloadArchiveExtension)(); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const version = this.getToolcacheVersionName(javaRelease.version); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); +exports.BlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing Blob operations. */ +class BlobImpl { + client; + /** + * Initialize a new instance of the class Blob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - findPackageForDownload(range) { - return __awaiter(this, void 0, void 0, function* () { - const arch = this.distributionArchitecture(); - if (arch !== 'x64' && arch !== 'aarch64') { - throw new Error(`Unsupported architecture: ${this.architecture}`); - } - if (!this.stable) { - throw new Error('Early access versions are not supported'); - } - if (this.packageType !== 'jdk') { - throw new Error('Oracle JDK provides only the `jdk` package type'); - } - const platform = this.getPlatform(); - const extension = (0, util_1.getDownloadArchiveExtension)(); - const isOnlyMajorProvided = !range.includes('.'); - const major = isOnlyMajorProvided ? range : range.split('.')[0]; - const possibleUrls = []; - /** - * NOTE - * If only major version was provided we will check it under /latest first - * in order to retrieve the latest possible version if possible, - * otherwise we will fall back to /archive where we are guaranteed to - * find any version if it exists - */ - if (isOnlyMajorProvided) { - possibleUrls.push(`${ORACLE_DL_BASE}/${major}/latest/jdk-${major}_${platform}-${arch}_bin.${extension}`); - } - possibleUrls.push(`${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`); - if (parseInt(major) < 17) { - throw new Error('Oracle JDK is only supported for JDK 17 and later'); - } - for (const url of possibleUrls) { - const response = yield this.http.head(url); - if (response.message.statusCode === http_client_1.HttpCodes.OK) { - return { url, version: range }; - } - if (response.message.statusCode !== http_client_1.HttpCodes.NotFound) { - throw new Error(`Http request for Oracle JDK failed with status code: ${response.message.statusCode}`); - } - } - throw new Error(`Could not find Oracle JDK for SemVer ${range}`); - }); + /** + * The Download operation reads or downloads a blob from the system, including its metadata and + * properties. You can also call Download to read a snapshot. + * @param options The options parameters. + */ + download(options) { + return this.client.sendOperationRequest({ options }, downloadOperationSpec); } - getPlatform(platform = process.platform) { - switch (platform) { - case 'darwin': - return 'macos'; - case 'win32': - return 'windows'; - case 'linux': - return 'linux'; - default: - throw new Error(`Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'`); - } + /** + * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system + * properties for the blob. It does not return the content of the blob. + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } -} -exports.OracleDistribution = OracleDistribution; - - -/***/ }), - -/***/ 41121: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; + /** + * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is + * permanently removed from the storage account. If the storage account's soft delete feature is + * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible + * immediately. However, the blob service retains the blob or snapshot for the number of days specified + * by the DeleteRetentionPolicy section of [Storage service properties] + * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is + * permanently removed from the storage account. Note that you continue to be charged for the + * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the + * "include=deleted" query parameter to discover which blobs and snapshots have been soft deleted. You + * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a + * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404 + * (ResourceNotFound). + * @param options The options parameters. + */ + delete(options) { + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SemeruDistribution = void 0; -const base_installer_1 = __nccwpck_require__(59741); -const semver_1 = __importDefault(__nccwpck_require__(11383)); -const util_1 = __nccwpck_require__(92629); -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const supportedArchitectures = [ - 'x64', - 'x86', - 'ppc64le', - 'ppc64', - 's390x', - 'aarch64' -]; -class SemeruDistribution extends base_installer_1.JavaBase { - constructor(installerOptions) { - super('IBM_Semeru', installerOptions); + /** + * Undelete a blob that was previously soft deleted + * @param options The options parameters. + */ + undelete(options) { + return this.client.sendOperationRequest({ options }, undeleteOperationSpec); } - findPackageForDownload(version) { - return __awaiter(this, void 0, void 0, function* () { - if (!supportedArchitectures.includes(this.architecture)) { - throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture}, the following are supported: ${supportedArchitectures.join(', ')}`); - } - if (!this.stable) { - throw new Error('IBM Semeru does not provide builds for early access versions'); - } - if (this.packageType !== 'jdk' && this.packageType !== 'jre') { - throw new Error('IBM Semeru only provide `jdk` and `jre` package types'); - } - const availableVersionsRaw = yield this.getAvailableVersions(); - const availableVersionsWithBinaries = availableVersionsRaw - .filter(item => item.binaries.length > 0) - .map(item => { - // normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions - const formattedVersion = this.stable - ? item.version_data.semver - : item.version_data.semver.replace('-beta+', '+'); - return { - version: formattedVersion, - url: item.binaries[0].package.link - }; - }); - const satisfiedVersions = availableVersionsWithBinaries - .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) - .sort((a, b) => { - return -semver_1.default.compareBuild(a.version, b.version); - }); - const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; - if (!resolvedFullVersion) { - const availableOptions = availableVersionsWithBinaries - .map(item => item.version) - .join(', '); - const availableOptionsMessage = availableOptions - ? `\nAvailable versions: ${availableOptions}` - : ''; - throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); - } - return resolvedFullVersion; - }); + /** + * Sets the time a blob will expire and be deleted. + * @param expiryOptions Required. Indicates mode of the expiry time + * @param options The options parameters. + */ + setExpiry(expiryOptions, options) { + return this.client.sendOperationRequest({ expiryOptions, options }, setExpiryOperationSpec); } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - const javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extension = (0, util_1.getDownloadArchiveExtension)(); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const version = this.getToolcacheVersionName(javaRelease.version); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); + /** + * The Set HTTP Headers operation sets system properties on the blob + * @param options The options parameters. + */ + setHttpHeaders(options) { + return this.client.sendOperationRequest({ options }, setHttpHeadersOperationSpec); } - get toolcacheFolderName() { - return super.toolcacheFolderName; + /** + * The Set Immutability Policy operation sets the immutability policy on the blob + * @param options The options parameters. + */ + setImmutabilityPolicy(options) { + return this.client.sendOperationRequest({ options }, setImmutabilityPolicyOperationSpec); } - getAvailableVersions() { - return __awaiter(this, void 0, void 0, function* () { - const platform = this.getPlatformOption(); - const arch = this.architecture; - const imageType = this.packageType; - const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions - const releaseType = this.stable ? 'ga' : 'ea'; - if (core.isDebug()) { - console.time('Retrieving available versions for Semeru took'); // eslint-disable-line no-console - } - const baseRequestArguments = [ - `project=jdk`, - 'vendor=ibm', - `heap_size=normal`, - 'sort_method=DEFAULT', - 'sort_order=DESC', - `os=${platform}`, - `architecture=${arch}`, - `image_type=${imageType}`, - `release_type=${releaseType}`, - `jvm_impl=openj9` - ].join('&'); - // need to iterate through all pages to retrieve the list of all versions - // Adoptium API doesn't provide way to retrieve the count of pages to iterate so infinity loop - let page_index = 0; - const availableVersions = []; - while (true) { - const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; - const availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`; - if (core.isDebug() && page_index === 0) { - // url is identical except page_index so print it once for debug - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); - } - const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result; - if (paginationPage === null || paginationPage.length === 0) { - // break infinity loop because we have reached end of pagination - break; - } - availableVersions.push(...paginationPage); - page_index++; - } - if (core.isDebug()) { - core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Semeru took'); // eslint-disable-line no-console - core.debug(`Available versions: [${availableVersions.length}]`); - core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); - core.endGroup(); - } - return availableVersions; - }); + /** + * The Delete Immutability Policy operation deletes the immutability policy on the blob + * @param options The options parameters. + */ + deleteImmutabilityPolicy(options) { + return this.client.sendOperationRequest({ options }, deleteImmutabilityPolicyOperationSpec); } - getPlatformOption() { - // Adopt has own platform names so need to map them - switch (process.platform) { - case 'darwin': - return 'mac'; - case 'win32': - return 'windows'; - default: - return process.platform; - } + /** + * The Set Legal Hold operation sets a legal hold on the blob. + * @param legalHold Specified if a legal hold should be set on the blob. + * @param options The options parameters. + */ + setLegalHold(legalHold, options) { + return this.client.sendOperationRequest({ legalHold, options }, setLegalHoldOperationSpec); } -} -exports.SemeruDistribution = SemeruDistribution; - - -/***/ }), - -/***/ 18579: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; + /** + * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more + * name-value pairs + * @param options The options parameters. + */ + setMetadata(options) { + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TemurinDistribution = exports.TemurinImplementation = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const semver_1 = __importDefault(__nccwpck_require__(11383)); -const base_installer_1 = __nccwpck_require__(59741); -const util_1 = __nccwpck_require__(92629); -var TemurinImplementation; -(function (TemurinImplementation) { - TemurinImplementation["Hotspot"] = "Hotspot"; -})(TemurinImplementation || (exports.TemurinImplementation = TemurinImplementation = {})); -class TemurinDistribution extends base_installer_1.JavaBase { - constructor(installerOptions, jvmImpl) { - super(`Temurin-${jvmImpl}`, installerOptions); - this.jvmImpl = jvmImpl; + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param options The options parameters. + */ + acquireLease(options) { + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } - findPackageForDownload(version) { - return __awaiter(this, void 0, void 0, function* () { - const availableVersionsRaw = yield this.getAvailableVersions(); - const availableVersionsWithBinaries = availableVersionsRaw - .filter(item => item.binaries.length > 0) - .map(item => { - // normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions - const formattedVersion = this.stable - ? item.version_data.semver - : item.version_data.semver.replace('-beta+', '+'); - return { - version: formattedVersion, - url: item.binaries[0].package.link - }; - }); - const satisfiedVersions = availableVersionsWithBinaries - .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) - .sort((a, b) => { - return -semver_1.default.compareBuild(a.version, b.version); - }); - const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; - if (!resolvedFullVersion) { - const availableOptions = availableVersionsWithBinaries - .map(item => item.version) - .join(', '); - const availableOptionsMessage = availableOptions - ? `\nAvailable versions: ${availableOptions}` - : ''; - throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); - } - return resolvedFullVersion; - }); + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - const javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extension = (0, util_1.getDownloadArchiveExtension)(); - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const version = this.getToolcacheVersionName(javaRelease.version); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); } - get toolcacheFolderName() { - return super.toolcacheFolderName; + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 + * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor + * (String) for a list of valid GUID string formats. + * @param options The options parameters. + */ + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); } - getAvailableVersions() { - return __awaiter(this, void 0, void 0, function* () { - const platform = this.getPlatformOption(); - const arch = this.distributionArchitecture(); - const imageType = this.packageType; - const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions - const releaseType = this.stable ? 'ga' : 'ea'; - if (core.isDebug()) { - console.time('Retrieving available versions for Temurin took'); // eslint-disable-line no-console - } - const baseRequestArguments = [ - `project=jdk`, - 'vendor=adoptium', - `heap_size=normal`, - 'sort_method=DEFAULT', - 'sort_order=DESC', - `os=${platform}`, - `architecture=${arch}`, - `image_type=${imageType}`, - `release_type=${releaseType}`, - `jvm_impl=${this.jvmImpl.toLowerCase()}` - ].join('&'); - // need to iterate through all pages to retrieve the list of all versions - // Adoptium API doesn't provide way to retrieve the count of pages to iterate so infinity loop - let page_index = 0; - const availableVersions = []; - while (true) { - const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; - const availableVersionsUrl = `https://api.adoptium.net/v3/assets/version/${versionRange}?${requestArguments}`; - if (core.isDebug() && page_index === 0) { - // url is identical except page_index so print it once for debug - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); - } - const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result; - if (paginationPage === null || paginationPage.length === 0) { - // break infinity loop because we have reached end of pagination - break; - } - availableVersions.push(...paginationPage); - page_index++; - } - if (core.isDebug()) { - core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Temurin took'); // eslint-disable-line no-console - core.debug(`Available versions: [${availableVersions.length}]`); - core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); - core.endGroup(); - } - return availableVersions; - }); + /** + * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete + * operations + * @param options The options parameters. + */ + breakLease(options) { + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); } - getPlatformOption() { - // Adoptium has own platform names so need to map them - switch (process.platform) { - case 'darwin': - return 'mac'; - case 'win32': - return 'windows'; - default: - return process.platform; - } + /** + * The Create Snapshot operation creates a read-only snapshot of a blob + * @param options The options parameters. + */ + createSnapshot(options) { + return this.client.sendOperationRequest({ options }, createSnapshotOperationSpec); } -} -exports.TemurinDistribution = TemurinDistribution; - - -/***/ }), - -/***/ 82005: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; + /** + * The Start Copy From URL operation copies a blob or an internet resource to a new blob. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + startCopyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, startCopyFromURLOperationSpec); } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ZuluDistribution = void 0; -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const semver_1 = __importDefault(__nccwpck_require__(11383)); -const base_installer_1 = __nccwpck_require__(59741); -const util_1 = __nccwpck_require__(92629); -class ZuluDistribution extends base_installer_1.JavaBase { - constructor(installerOptions) { - super('Zulu', installerOptions); + /** + * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return + * a response until the copy is complete. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + copyFromURL(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyFromURLOperationSpec); } - findPackageForDownload(version) { - return __awaiter(this, void 0, void 0, function* () { - const availableVersionsRaw = yield this.getAvailableVersions(); - const availableVersions = availableVersionsRaw.map(item => { - return { - version: (0, util_1.convertVersionToSemver)(item.jdk_version), - url: item.url, - zuluVersion: (0, util_1.convertVersionToSemver)(item.zulu_version) - }; - }); - const satisfiedVersions = availableVersions - .filter(item => (0, util_1.isVersionSatisfies)(version, item.version)) - .sort((a, b) => { - // Azul provides two versions: jdk_version and azul_version - // we should sort by both fields by descending - return (-semver_1.default.compareBuild(a.version, b.version) || - -semver_1.default.compareBuild(a.zuluVersion, b.zuluVersion)); - }) - .map(item => { - return { - version: item.version, - url: item.url - }; - }); - const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; - if (!resolvedFullVersion) { - const availableOptions = availableVersions - .map(item => item.version) - .join(', '); - const availableOptionsMessage = availableOptions - ? `\nAvailable versions: ${availableOptions}` - : ''; - throw new Error(`Could not find satisfied version for semver ${version}. ${availableOptionsMessage}`); - } - return resolvedFullVersion; - }); + /** + * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination + * blob with zero length and full metadata. + * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob + * operation. + * @param options The options parameters. + */ + abortCopyFromURL(copyId, options) { + return this.client.sendOperationRequest({ copyId, options }, abortCopyFromURLOperationSpec); } - downloadTool(javaRelease) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); - let javaArchivePath = yield tc.downloadTool(javaRelease.url); - core.info(`Extracting Java archive...`); - const extension = (0, util_1.getDownloadArchiveExtension)(); - if (process.platform === 'win32' && - (this.architecture === 'arm64' || this.architecture === 'aarch64')) { - const javaArchivePathRenamed = `${javaArchivePath}.zip`; - yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed); - javaArchivePath = javaArchivePathRenamed; - } - const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension); - const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; - const archivePath = path_1.default.join(extractedJavaPath, archiveName); - const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture); - return { version: javaRelease.version, path: javaPath }; - }); + /** + * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium + * storage account and on a block blob in a blob storage account (locally redundant storage only). A + * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block + * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's + * ETag. + * @param tier Indicates the tier to be set on the blob. + * @param options The options parameters. + */ + setTier(tier, options) { + return this.client.sendOperationRequest({ tier, options }, setTierOperationSpec); } - getAvailableVersions() { - var _a, _b; - return __awaiter(this, void 0, void 0, function* () { - const { arch, hw_bitness, abi } = this.getArchitectureOptions(); - const [bundleType, features] = this.packageType.split('+'); - const platform = this.getPlatformOption(); - const extension = (0, util_1.getDownloadArchiveExtension)(); - const javafx = (_a = features === null || features === void 0 ? void 0 : features.includes('fx')) !== null && _a !== void 0 ? _a : false; - const releaseStatus = this.stable ? 'ga' : 'ea'; - if (core.isDebug()) { - console.time('Retrieving available versions for Zulu took'); // eslint-disable-line no-console - } - const requestArguments = [ - `os=${platform}`, - `ext=${extension}`, - `bundle_type=${bundleType}`, - `javafx=${javafx}`, - `arch=${arch}`, - `hw_bitness=${hw_bitness}`, - `release_status=${releaseStatus}`, - abi ? `abi=${abi}` : null, - features ? `features=${features}` : null - ] - .filter(Boolean) - .join('&'); - const availableVersionsUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?${requestArguments}`; - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); - const availableVersions = (_b = (yield this.http.getJson(availableVersionsUrl)) - .result) !== null && _b !== void 0 ? _b : []; - if (core.isDebug()) { - core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Zulu took'); // eslint-disable-line no-console - core.debug(`Available versions: [${availableVersions.length}]`); - core.debug(availableVersions.map(item => item.jdk_version.join('.')).join(', ')); - core.endGroup(); - } - return availableVersions; - }); + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } - getArchitectureOptions() { - const arch = this.distributionArchitecture(); - switch (arch) { - case 'x64': - return { arch: 'x86', hw_bitness: '64', abi: '' }; - case 'x86': - return { arch: 'x86', hw_bitness: '32', abi: '' }; - case 'aarch64': - case 'arm64': - return { arch: 'arm', hw_bitness: '64', abi: '' }; - default: - return { arch: arch, hw_bitness: '', abi: '' }; - } + /** + * The Query operation enables users to select/project on blob data by providing simple query + * expressions. + * @param options The options parameters. + */ + query(options) { + return this.client.sendOperationRequest({ options }, queryOperationSpec); } - getPlatformOption() { - // Azul has own platform names so need to map them - switch (process.platform) { - case 'darwin': - return 'macos'; - case 'win32': - return 'windows'; - default: - return process.platform; - } + /** + * The Get Tags operation enables users to get the tags associated with a blob. + * @param options The options parameters. + */ + getTags(options) { + return this.client.sendOperationRequest({ options }, getTagsOperationSpec); } -} -exports.ZuluDistribution = ZuluDistribution; - - -/***/ }), - -/***/ 23759: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; + /** + * The Set Tags operation enables users to set tags on a blob. + * @param options The options parameters. + */ + setTags(options) { + return this.client.sendOperationRequest({ options }, setTagsOperationSpec); } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +} +exports.BlobImpl = BlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const downloadOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobDownloadHeaders, + }, + 206: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobDownloadHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDownloadExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.rangeGetContentMD5, + Parameters.rangeGetContentCRC64, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +const getPropertiesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "HEAD", + responses: { + 200: { + headersMapper: Mappers.BlobGetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetPropertiesExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deleteKey = exports.importKey = exports.PRIVATE_KEY_FILE = void 0; -const fs = __importStar(__nccwpck_require__(57147)); -const path = __importStar(__nccwpck_require__(71017)); -const io = __importStar(__nccwpck_require__(47351)); -const exec = __importStar(__nccwpck_require__(71514)); -const util = __importStar(__nccwpck_require__(92629)); -exports.PRIVATE_KEY_FILE = path.join(util.getTempDir(), 'private-key.asc'); -const PRIVATE_KEY_FINGERPRINT_REGEX = /\w{40}/; -function importKey(privateKey) { - return __awaiter(this, void 0, void 0, function* () { - fs.writeFileSync(exports.PRIVATE_KEY_FILE, privateKey, { - encoding: 'utf-8', - flag: 'w' - }); - let output = ''; - const options = { - silent: true, - listeners: { - stdout: (data) => { - output += data.toString(); - } - } - }; - yield exec.exec('gpg', [ - '--batch', - '--import-options', - 'import-show', - '--import', - exports.PRIVATE_KEY_FILE - ], options); - yield io.rmRF(exports.PRIVATE_KEY_FILE); - const match = output.match(PRIVATE_KEY_FINGERPRINT_REGEX); - return match && match[0]; - }); -} -exports.importKey = importKey; -function deleteKey(keyFingerprint) { - return __awaiter(this, void 0, void 0, function* () { - yield exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], { - silent: true - }); - }); -} -exports.deleteKey = deleteKey; - - -/***/ }), - -/***/ 20994: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +const deleteOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "DELETE", + responses: { + 202: { + headersMapper: Mappers.BlobDeleteHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.blobDeleteType, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.deleteSnapshots, + ], + isXML: true, + serializer: xmlSerializer, }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +const undeleteOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobUndeleteHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobUndeleteExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp8], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, }; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; +const setExpiryOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetExpiryHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetExpiryExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp11], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.expiryOptions, + Parameters.expiresOn, + ], + isXML: true, + serializer: xmlSerializer, }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const core = __importStar(__nccwpck_require__(42186)); -const auth = __importStar(__nccwpck_require__(53497)); -const util_1 = __nccwpck_require__(92629); -const toolchains = __importStar(__nccwpck_require__(79322)); -const constants = __importStar(__nccwpck_require__(69042)); -const cache_1 = __nccwpck_require__(64810); -const path = __importStar(__nccwpck_require__(71017)); -const distribution_factory_1 = __nccwpck_require__(10924); -function run() { - return __awaiter(this, void 0, void 0, function* () { - try { - const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION); - const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { - required: true - }); - const versionFile = core.getInput(constants.INPUT_JAVA_VERSION_FILE); - const architecture = core.getInput(constants.INPUT_ARCHITECTURE); - const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE); - const jdkFile = core.getInput(constants.INPUT_JDK_FILE); - const cache = core.getInput(constants.INPUT_CACHE); - const cacheDependencyPath = core.getInput(constants.INPUT_CACHE_DEPENDENCY_PATH); - const checkLatest = (0, util_1.getBooleanInput)(constants.INPUT_CHECK_LATEST, false); - let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID); - core.startGroup('Installed distributions'); - if (versions.length !== toolchainIds.length) { - toolchainIds = []; - } - if (!versions.length && !versionFile) { - throw new Error('java-version or java-version-file input expected'); - } - const installerInputsOptions = { - architecture, - packageType, - checkLatest, - distributionName, - jdkFile, - toolchainIds - }; - if (!versions.length) { - core.debug('java-version input is empty, looking for java-version-file input'); - const content = fs_1.default.readFileSync(versionFile).toString().trim(); - const version = (0, util_1.getVersionFromFileContent)(content, distributionName, versionFile); - core.debug(`Parsed version from file '${version}'`); - if (!version) { - throw new Error(`No supported version was found in file ${versionFile}`); - } - yield installVersion(version, installerInputsOptions); - } - for (const [index, version] of versions.entries()) { - yield installVersion(version, installerInputsOptions, index); - } - core.endGroup(); - const matchersPath = path.join(__dirname, '..', '..', '.github'); - core.info(`##[add-matcher]${path.join(matchersPath, 'java.json')}`); - yield auth.configureAuthentication(); - if (cache && (0, util_1.isCacheFeatureAvailable)()) { - yield (0, cache_1.restore)(cache, cacheDependencyPath); - } - } - catch (error) { - core.setFailed(error.message); - } - }); -} -run(); -function installVersion(version, options, toolchainId = 0) { - return __awaiter(this, void 0, void 0, function* () { - const { distributionName, jdkFile, architecture, packageType, checkLatest, toolchainIds } = options; - const installerOptions = { - architecture, - packageType, - checkLatest, - version - }; - const distribution = (0, distribution_factory_1.getJavaDistribution)(distributionName, installerOptions, jdkFile); - if (!distribution) { - throw new Error(`No supported distribution was found for input ${distributionName}`); - } - const result = yield distribution.setupJava(); - yield toolchains.configureToolchains(version, distributionName, result.path, toolchainIds[toolchainId]); - core.info(''); - core.info('Java configuration:'); - core.info(` Distribution: ${distributionName}`); - core.info(` Version: ${result.version}`); - core.info(` Path: ${result.path}`); - core.info(''); - }); -} - +const setHttpHeadersOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetHttpHeadersHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetHttpHeadersExceptionHeaders, + }, + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setImmutabilityPolicyOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetImmutabilityPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetImmutabilityPolicyExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifUnmodifiedSince, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + ], + isXML: true, + serializer: xmlSerializer, +}; +const deleteImmutabilityPolicyOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.BlobDeleteImmutabilityPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobDeleteImmutabilityPolicyExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp12, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setLegalHoldOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetLegalHoldHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetLegalHoldExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp13, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.legalHold, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setMetadataOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetMetadataHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetMetadataExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp6], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + ], + isXML: true, + serializer: xmlSerializer, +}; +const acquireLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlobAcquireLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAcquireLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const releaseLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobReleaseLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobReleaseLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const renewLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobRenewLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobRenewLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const changeLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobChangeLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobChangeLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const breakLeaseOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.BlobBreakLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobBreakLeaseExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp10], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const createSnapshotOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlobCreateSnapshotHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCreateSnapshotExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp14], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + ], + isXML: true, + serializer: xmlSerializer, +}; +const startCopyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.BlobStartCopyFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobStartCopyFromURLExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.tier, + Parameters.rehydratePriority, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sealBlob, + Parameters.legalHold1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const copyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.BlobCopyFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobCopyFromURLExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.xMsRequiresSync, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + ], + isXML: true, + serializer: xmlSerializer, +}; +const abortCopyFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 204: { + headersMapper: Mappers.BlobAbortCopyFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobAbortCopyFromURLExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp15, + Parameters.copyId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.copyActionAbortConstant, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setTierOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.BlobSetTierHeaders, + }, + 202: { + headersMapper: Mappers.BlobSetTierHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTierExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp16, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + Parameters.rehydratePriority, + Parameters.tier1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getAccountInfoOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.BlobGetAccountInfoHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetAccountInfoExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const queryOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobQueryHeaders, + }, + 206: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.BlobQueryHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobQueryExceptionHeaders, + }, + }, + requestBody: Parameters.queryRequest, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp17, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getTagsOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlobTags, + headersMapper: Mappers.BlobGetTagsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobGetTagsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.versionId, + Parameters.comp18, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setTagsOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 204: { + headersMapper: Mappers.BlobSetTagsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlobSetTagsExceptionHeaders, + }, + }, + requestBody: Parameters.tags, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.versionId, + Parameters.comp18, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.leaseId, + Parameters.ifTags, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +//# sourceMappingURL=blob.js.map /***/ }), -/***/ 79322: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 48652: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.generateToolchainDefinition = exports.createToolchainsSettings = exports.configureToolchains = void 0; -const fs = __importStar(__nccwpck_require__(57147)); -const os = __importStar(__nccwpck_require__(22037)); -const path = __importStar(__nccwpck_require__(71017)); -const core = __importStar(__nccwpck_require__(42186)); -const io = __importStar(__nccwpck_require__(47351)); -const constants = __importStar(__nccwpck_require__(69042)); -const util_1 = __nccwpck_require__(92629); -const xmlbuilder2_1 = __nccwpck_require__(70151); -function configureToolchains(version, distributionName, jdkHome, toolchainId) { - return __awaiter(this, void 0, void 0, function* () { - const vendor = core.getInput(constants.INPUT_MVN_TOOLCHAIN_VENDOR) || distributionName; - const id = toolchainId || `${vendor}_${version}`; - const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || - path.join(os.homedir(), constants.M2_DIR); - const overwriteSettings = (0, util_1.getBooleanInput)(constants.INPUT_OVERWRITE_SETTINGS, true); - yield createToolchainsSettings({ - jdkInfo: { - version, - vendor, - id, - jdkHome - }, - settingsDirectory, - overwriteSettings - }); - }); -} -exports.configureToolchains = configureToolchains; -function createToolchainsSettings({ jdkInfo, settingsDirectory, overwriteSettings }) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Creating ${constants.MVN_TOOLCHAINS_FILE} for JDK version ${jdkInfo.version} from ${jdkInfo.vendor}`); - // when an alternate m2 location is specified use only that location (no .m2 directory) - // otherwise use the home/.m2/ path - yield io.mkdirP(settingsDirectory); - const originalToolchains = yield readExistingToolchainsFile(settingsDirectory); - const updatedToolchains = generateToolchainDefinition(originalToolchains, jdkInfo.version, jdkInfo.vendor, jdkInfo.id, jdkInfo.jdkHome); - yield writeToolchainsFileToDisk(settingsDirectory, updatedToolchains, overwriteSettings); - }); -} -exports.createToolchainsSettings = createToolchainsSettings; -// only exported for testing purposes -function generateToolchainDefinition(original, version, vendor, id, jdkHome) { - let xmlObj; - if (original === null || original === void 0 ? void 0 : original.length) { - xmlObj = (0, xmlbuilder2_1.create)(original) - .root() - .ele({ - toolchain: { - type: 'jdk', - provides: { - version: `${version}`, - vendor: `${vendor}`, - id: `${id}` - }, - configuration: { - jdkHome: `${jdkHome}` - } - } - }); +exports.BlockBlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing BlockBlob operations. */ +class BlockBlobImpl { + client; + /** + * Initialize a new instance of the class BlockBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing + * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put + * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a + * partial update of the content of a block blob, use the Put Block List operation. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + upload(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadOperationSpec); + } + /** + * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read + * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are + * not supported with Put Blob from URL; the content of an existing blob is overwritten with the + * content of the new blob. To perform partial updates to a block blob’s contents using a source URL, + * use the Put Block from URL API in conjunction with Put Block List. + * @param contentLength The length of the request. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + putBlobFromUrl(contentLength, copySource, options) { + return this.client.sendOperationRequest({ contentLength, copySource, options }, putBlobFromUrlOperationSpec); + } + /** + * The Stage Block operation creates a new block to be committed as part of a blob + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + stageBlock(blockId, contentLength, body, options) { + return this.client.sendOperationRequest({ blockId, contentLength, body, options }, stageBlockOperationSpec); + } + /** + * The Stage Block operation creates a new block to be committed as part of a blob where the contents + * are read from a URL. + * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string + * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified + * for the blockid parameter must be the same size for each block. + * @param contentLength The length of the request. + * @param sourceUrl Specify a URL to the copy source. + * @param options The options parameters. + */ + stageBlockFromURL(blockId, contentLength, sourceUrl, options) { + return this.client.sendOperationRequest({ blockId, contentLength, sourceUrl, options }, stageBlockFromURLOperationSpec); + } + /** + * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the + * blob. In order to be written as part of a blob, a block must have been successfully written to the + * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading + * only those blocks that have changed, then committing the new and existing blocks together. You can + * do this by specifying whether to commit a block from the committed block list or from the + * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list + * it may belong to. + * @param blocks Blob Blocks. + * @param options The options parameters. + */ + commitBlockList(blocks, options) { + return this.client.sendOperationRequest({ blocks, options }, commitBlockListOperationSpec); + } + /** + * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block + * blob + * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted + * blocks, or both lists together. + * @param options The options parameters. + */ + getBlockList(listType, options) { + return this.client.sendOperationRequest({ listType, options }, getBlockListOperationSpec); } - else - xmlObj = (0, xmlbuilder2_1.create)({ - toolchains: { - '@xmlns': 'http://maven.apache.org/TOOLCHAINS/1.1.0', - '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', - '@xsi:schemaLocation': 'http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd', - toolchain: [ - { - type: 'jdk', - provides: { - version: `${version}`, - vendor: `${vendor}`, - id: `${id}` - }, - configuration: { - jdkHome: `${jdkHome}` - } - } - ] - } - }); - return xmlObj.end({ - format: 'xml', - wellFormed: false, - headless: false, - prettyPrint: true, - width: 80 - }); -} -exports.generateToolchainDefinition = generateToolchainDefinition; -function readExistingToolchainsFile(directory) { - return __awaiter(this, void 0, void 0, function* () { - const location = path.join(directory, constants.MVN_TOOLCHAINS_FILE); - if (fs.existsSync(location)) { - return fs.readFileSync(location, { - encoding: 'utf-8', - flag: 'r' - }); - } - return ''; - }); -} -function writeToolchainsFileToDisk(directory, settings, overwriteSettings) { - return __awaiter(this, void 0, void 0, function* () { - const location = path.join(directory, constants.MVN_TOOLCHAINS_FILE); - const settingsExists = fs.existsSync(location); - if (settingsExists && overwriteSettings) { - core.info(`Overwriting existing file ${location}`); - } - else if (!settingsExists) { - core.info(`Writing to ${location}`); - } - else { - core.info(`Skipping generation of ${location} because file already exists and overwriting is not enabled`); - return; - } - return fs.writeFileSync(location, settings, { - encoding: 'utf-8', - flag: 'w' - }); - }); } - +exports.BlockBlobImpl = BlockBlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const uploadOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobUploadHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobUploadExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.blobType2, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const putBlobFromUrlOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobPutBlobFromUrlHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobPutBlobFromUrlExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.encryptionScope, + Parameters.tier, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceIfTags, + Parameters.copySource, + Parameters.blobTagsString, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.copySourceTags, + Parameters.fileRequestIntent, + Parameters.transactionalContentMD5, + Parameters.blobType2, + Parameters.copySourceBlobProperties, + ], + isXML: true, + serializer: xmlSerializer, +}; +const stageBlockOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobStageBlockHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const stageBlockFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobStageBlockFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobStageBlockFromURLExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp24, + Parameters.blockId, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.sourceUrl, + Parameters.sourceContentCrc64, + Parameters.sourceRange1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const commitBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.BlockBlobCommitBlockListHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobCommitBlockListExceptionHeaders, + }, + }, + requestBody: Parameters.blocks, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp25], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getBlockListOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlockList, + headersMapper: Mappers.BlockBlobGetBlockListHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.BlockBlobGetBlockListExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.snapshot, + Parameters.comp25, + Parameters.listType, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=blockBlob.js.map /***/ }), -/***/ 92629: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 3269: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getGitHubHttpHeaders = exports.convertVersionToSemver = exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; -const os_1 = __importDefault(__nccwpck_require__(22037)); -const path_1 = __importDefault(__nccwpck_require__(71017)); -const fs = __importStar(__nccwpck_require__(57147)); -const semver = __importStar(__nccwpck_require__(11383)); -const cache = __importStar(__nccwpck_require__(27799)); -const core = __importStar(__nccwpck_require__(42186)); -const tc = __importStar(__nccwpck_require__(27784)); -const constants_1 = __nccwpck_require__(69042); -function getTempDir() { - const tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); - return tempDirectory; -} -exports.getTempDir = getTempDir; -function getBooleanInput(inputName, defaultValue = false) { - return ((core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'); -} -exports.getBooleanInput = getBooleanInput; -function getVersionFromToolcachePath(toolPath) { - if (toolPath) { - return path_1.default.basename(path_1.default.dirname(toolPath)); +exports.ContainerImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing Container operations. */ +class ContainerImpl { + client; + /** + * Initialize a new instance of the class Container class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; } - return toolPath; -} -exports.getVersionFromToolcachePath = getVersionFromToolcachePath; -function extractJdkFile(toolPath, extension) { - return __awaiter(this, void 0, void 0, function* () { - if (!extension) { - extension = toolPath.endsWith('.tar.gz') - ? 'tar.gz' - : path_1.default.extname(toolPath); - if (extension.startsWith('.')) { - extension = extension.substring(1); - } - } - switch (extension) { - case 'tar.gz': - case 'tar': - return yield tc.extractTar(toolPath); - case 'zip': - return yield tc.extractZip(toolPath); - default: - return yield tc.extract7z(toolPath); - } - }); -} -exports.extractJdkFile = extractJdkFile; -function getDownloadArchiveExtension() { - return process.platform === 'win32' ? 'zip' : 'tar.gz'; -} -exports.getDownloadArchiveExtension = getDownloadArchiveExtension; -function isVersionSatisfies(range, version) { - var _a; - if (semver.valid(range)) { - // if full version with build digit is provided as a range (such as '1.2.3+4') - // we should check for exact equal via compareBuild - // since semver.satisfies doesn't handle 4th digit - const semRange = semver.parse(range); - if (semRange && ((_a = semRange.build) === null || _a === void 0 ? void 0 : _a.length) > 0) { - return semver.compareBuild(range, version) === 0; - } + /** + * creates a new container under the specified account. If the container with the same name already + * exists, the operation fails + * @param options The options parameters. + */ + create(options) { + return this.client.sendOperationRequest({ options }, createOperationSpec); } - return semver.satisfies(version, range); -} -exports.isVersionSatisfies = isVersionSatisfies; -function getToolcachePath(toolName, version, architecture) { - var _a; - const toolcacheRoot = (_a = process.env['RUNNER_TOOL_CACHE']) !== null && _a !== void 0 ? _a : ''; - const fullPath = path_1.default.join(toolcacheRoot, toolName, version, architecture); - if (fs.existsSync(fullPath)) { - return fullPath; + /** + * returns all user-defined metadata and system properties for the specified container. The data + * returned does not include the container's list of blobs + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); } - return null; -} -exports.getToolcachePath = getToolcachePath; -function isJobStatusSuccess() { - const jobStatus = core.getInput(constants_1.INPUT_JOB_STATUS); - return jobStatus === 'success'; -} -exports.isJobStatusSuccess = isJobStatusSuccess; -function isGhes() { - const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); - return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'; -} -exports.isGhes = isGhes; -function isCacheFeatureAvailable() { - if (cache.isFeatureAvailable()) { - return true; + /** + * operation marks the specified container for deletion. The container and any blobs contained within + * it are later deleted during garbage collection + * @param options The options parameters. + */ + delete(options) { + return this.client.sendOperationRequest({ options }, deleteOperationSpec); } - if (isGhes()) { - core.warning('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); - return false; + /** + * operation sets one or more user-defined name-value pairs for the specified container. + * @param options The options parameters. + */ + setMetadata(options) { + return this.client.sendOperationRequest({ options }, setMetadataOperationSpec); } - core.warning('The runner was not able to contact the cache service. Caching will be skipped'); - return false; -} -exports.isCacheFeatureAvailable = isCacheFeatureAvailable; -function getVersionFromFileContent(content, distributionName, versionFile) { - var _a, _b, _c, _d, _e; - let javaVersionRegExp; - function getFileName(versionFile) { - return path_1.default.basename(versionFile); + /** + * gets the permissions for the specified container. The permissions indicate whether container data + * may be accessed publicly. + * @param options The options parameters. + */ + getAccessPolicy(options) { + return this.client.sendOperationRequest({ options }, getAccessPolicyOperationSpec); } - const versionFileName = getFileName(versionFile); - if (versionFileName == '.tool-versions') { - javaVersionRegExp = - /^(java\s+)(?:\S*-)?v?(?(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m; + /** + * sets the permissions for the specified container. The permissions indicate whether blobs in a + * container may be accessed publicly. + * @param options The options parameters. + */ + setAccessPolicy(options) { + return this.client.sendOperationRequest({ options }, setAccessPolicyOperationSpec); } - else { - javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; + /** + * Restores a previously-deleted container. + * @param options The options parameters. + */ + restore(options) { + return this.client.sendOperationRequest({ options }, restoreOperationSpec); } - const fileContent = ((_b = (_a = content.match(javaVersionRegExp)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.version) - ? (_d = (_c = content.match(javaVersionRegExp)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.version - : ''; - if (!fileContent) { - return null; + /** + * Renames an existing container. + * @param sourceContainerName Required. Specifies the name of the container to rename. + * @param options The options parameters. + */ + rename(sourceContainerName, options) { + return this.client.sendOperationRequest({ sourceContainerName, options }, renameOperationSpec); } - core.debug(`Version from file '${fileContent}'`); - const tentativeVersion = avoidOldNotation(fileContent); - const rawVersion = tentativeVersion.split('-')[0]; - let version = semver.validRange(rawVersion) - ? tentativeVersion - : semver.coerce(tentativeVersion); - core.debug(`Range version from file is '${version}'`); - if (!version) { - return null; + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch + * boundary. Example header value: multipart/mixed; boundary=batch_ + * @param body Initial data + * @param options The options parameters. + */ + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); } - if (constants_1.DISTRIBUTIONS_ONLY_MAJOR_VERSION.includes(distributionName)) { - const coerceVersion = (_e = semver.coerce(version)) !== null && _e !== void 0 ? _e : version; - version = semver.major(coerceVersion).toString(); + /** + * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given + * search expression. Filter blobs searches within the given container. + * @param options The options parameters. + */ + filterBlobs(options) { + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); } - return version.toString(); -} -exports.getVersionFromFileContent = getVersionFromFileContent; -// By convention, action expects version 8 in the format `8.*` instead of `1.8` -function avoidOldNotation(content) { - return content.startsWith('1.') ? content.substring(2) : content; -} -function convertVersionToSemver(version) { - // Some distributions may use semver-like notation (12.10.2.1, 12.10.2.1.1) - const versionArray = Array.isArray(version) ? version : version.split('.'); - const mainVersion = versionArray.slice(0, 3).join('.'); - if (versionArray.length > 3) { - return `${mainVersion}+${versionArray.slice(3).join('.')}`; + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param options The options parameters. + */ + acquireLease(options) { + return this.client.sendOperationRequest({ options }, acquireLeaseOperationSpec); } - return mainVersion; -} -exports.convertVersionToSemver = convertVersionToSemver; -function getGitHubHttpHeaders() { - const token = core.getInput('token'); - const auth = !token ? undefined : `token ${token}`; - const headers = { - accept: 'application/vnd.github.VERSION.raw' - }; - if (auth) { - headers.authorization = auth; + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + releaseLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, releaseLeaseOperationSpec); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param options The options parameters. + */ + renewLease(leaseId, options) { + return this.client.sendOperationRequest({ leaseId, options }, renewLeaseOperationSpec); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param options The options parameters. + */ + breakLease(options) { + return this.client.sendOperationRequest({ options }, breakLeaseOperationSpec); + } + /** + * [Update] establishes and manages a lock on a container for delete operations. The lock duration can + * be 15 to 60 seconds, or can be infinite + * @param leaseId Specifies the current lease ID on the resource. + * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400 + * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor + * (String) for a list of valid GUID string formats. + * @param options The options parameters. + */ + changeLease(leaseId, proposedLeaseId, options) { + return this.client.sendOperationRequest({ leaseId, proposedLeaseId, options }, changeLeaseOperationSpec); + } + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param options The options parameters. + */ + listBlobFlatSegment(options) { + return this.client.sendOperationRequest({ options }, listBlobFlatSegmentOperationSpec); + } + /** + * [Update] The List Blobs operation returns a list of the blobs under the specified container + * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix + * element in the response body that acts as a placeholder for all blobs whose names begin with the + * same substring up to the appearance of the delimiter character. The delimiter may be a single + * character or a string. + * @param options The options parameters. + */ + listBlobHierarchySegment(delimiter, options) { + return this.client.sendOperationRequest({ delimiter, options }, listBlobHierarchySegmentOperationSpec); + } + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); } - return headers; } -exports.getGitHubHttpHeaders = getGitHubHttpHeaders; - - -/***/ }), - -/***/ 22877: -/***/ ((module) => { - -module.exports = eval("require")("encoding"); - - -/***/ }), - -/***/ 39491: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert"); - -/***/ }), - -/***/ 50852: -/***/ ((module) => { - -"use strict"; -module.exports = require("async_hooks"); - -/***/ }), - -/***/ 14300: -/***/ ((module) => { - -"use strict"; -module.exports = require("buffer"); - -/***/ }), - -/***/ 32081: -/***/ ((module) => { - -"use strict"; -module.exports = require("child_process"); - -/***/ }), - -/***/ 96206: -/***/ ((module) => { - -"use strict"; -module.exports = require("console"); - -/***/ }), - -/***/ 6113: -/***/ ((module) => { - -"use strict"; -module.exports = require("crypto"); - -/***/ }), - -/***/ 67643: -/***/ ((module) => { - -"use strict"; -module.exports = require("diagnostics_channel"); - -/***/ }), - -/***/ 82361: -/***/ ((module) => { - -"use strict"; -module.exports = require("events"); - -/***/ }), - -/***/ 57147: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs"); - -/***/ }), - -/***/ 13685: -/***/ ((module) => { - -"use strict"; -module.exports = require("http"); - -/***/ }), - -/***/ 85158: -/***/ ((module) => { - -"use strict"; -module.exports = require("http2"); - -/***/ }), - -/***/ 95687: -/***/ ((module) => { - -"use strict"; -module.exports = require("https"); - -/***/ }), - -/***/ 41808: -/***/ ((module) => { - -"use strict"; -module.exports = require("net"); - -/***/ }), - -/***/ 15673: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:events"); - -/***/ }), - -/***/ 88849: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:http"); - -/***/ }), - -/***/ 22286: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:https"); - -/***/ }), - -/***/ 70612: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:os"); - -/***/ }), - -/***/ 97742: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:process"); - -/***/ }), - -/***/ 84492: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:stream"); - -/***/ }), - -/***/ 47261: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:util"); - -/***/ }), - -/***/ 65628: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:zlib"); +exports.ContainerImpl = ContainerImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const createOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.ContainerCreateHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerCreateExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.access, + Parameters.defaultEncryptionScope, + Parameters.preventEncryptionScopeOverride, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getPropertiesOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.ContainerGetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetPropertiesExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const deleteOperationSpec = { + path: "/{containerName}", + httpMethod: "DELETE", + responses: { + 202: { + headersMapper: Mappers.ContainerDeleteHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerDeleteExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.restype2], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setMetadataOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerSetMetadataHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetMetadataExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp6, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getAccessPolicyOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: { + type: { + name: "Sequence", + element: { + type: { name: "Composite", className: "SignedIdentifier" }, + }, + }, + serializedName: "SignedIdentifiers", + xmlName: "SignedIdentifiers", + xmlIsWrapped: true, + xmlElementName: "SignedIdentifier", + }, + headersMapper: Mappers.ContainerGetAccessPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccessPolicyExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const setAccessPolicyOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerSetAccessPolicyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSetAccessPolicyExceptionHeaders, + }, + }, + requestBody: Parameters.containerAcl, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp7, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.access, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const restoreOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.ContainerRestoreHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRestoreExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp8, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.deletedContainerName, + Parameters.deletedContainerVersion, + ], + isXML: true, + serializer: xmlSerializer, +}; +const renameOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerRenameHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenameExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp9, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.sourceContainerName, + Parameters.sourceLeaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const submitBatchOperationSpec = { + path: "/{containerName}", + httpMethod: "POST", + responses: { + 202: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.ContainerSubmitBatchHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerSubmitBatchExceptionHeaders, + }, + }, + requestBody: Parameters.body, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp4, + Parameters.restype2, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const filterBlobsOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ContainerFilterBlobsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerFilterBlobsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + Parameters.restype2, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const acquireLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.ContainerAcquireLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerAcquireLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action, + Parameters.duration, + Parameters.proposedLeaseId, + ], + isXML: true, + serializer: xmlSerializer, +}; +const releaseLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerReleaseLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerReleaseLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action1, + Parameters.leaseId1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const renewLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerRenewLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerRenewLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action2, + ], + isXML: true, + serializer: xmlSerializer, +}; +const breakLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.ContainerBreakLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerBreakLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.action3, + Parameters.breakPeriod, + ], + isXML: true, + serializer: xmlSerializer, +}; +const changeLeaseOperationSpec = { + path: "/{containerName}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.ContainerChangeLeaseHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerChangeLeaseExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.restype2, + Parameters.comp10, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.leaseId1, + Parameters.action4, + Parameters.proposedLeaseId1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const listBlobFlatSegmentOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListBlobsFlatSegmentResponse, + headersMapper: Mappers.ContainerListBlobFlatSegmentHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobFlatSegmentExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const listBlobHierarchySegmentOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListBlobsHierarchySegmentResponse, + headersMapper: Mappers.ContainerListBlobHierarchySegmentHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerListBlobHierarchySegmentExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.restype2, + Parameters.include1, + Parameters.delimiter, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getAccountInfoOperationSpec = { + path: "/{containerName}", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.ContainerGetAccountInfoHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ContainerGetAccountInfoExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=container.js.map /***/ }), -/***/ 22037: -/***/ ((module) => { +/***/ 13759: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("os"); -/***/ }), - -/***/ 71017: -/***/ ((module) => { - -"use strict"; -module.exports = require("path"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(1746), exports); +tslib_1.__exportStar(__nccwpck_require__(3269), exports); +tslib_1.__exportStar(__nccwpck_require__(8296), exports); +tslib_1.__exportStar(__nccwpck_require__(69477), exports); +tslib_1.__exportStar(__nccwpck_require__(80313), exports); +tslib_1.__exportStar(__nccwpck_require__(48652), exports); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 4074: -/***/ ((module) => { +/***/ 69477: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("perf_hooks"); - -/***/ }), - -/***/ 85477: -/***/ ((module) => { -"use strict"; -module.exports = require("punycode"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PageBlobImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing PageBlob operations. */ +class PageBlobImpl { + client; + /** + * Initialize a new instance of the class PageBlob class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * The Create operation creates a new page blob. + * @param contentLength The length of the request. + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. + * @param options The options parameters. + */ + create(contentLength, blobContentLength, options) { + return this.client.sendOperationRequest({ contentLength, blobContentLength, options }, createOperationSpec); + } + /** + * The Upload Pages operation writes a range of pages to a page blob + * @param contentLength The length of the request. + * @param body Initial data + * @param options The options parameters. + */ + uploadPages(contentLength, body, options) { + return this.client.sendOperationRequest({ contentLength, body, options }, uploadPagesOperationSpec); + } + /** + * The Clear Pages operation clears a set of pages from a page blob + * @param contentLength The length of the request. + * @param options The options parameters. + */ + clearPages(contentLength, options) { + return this.client.sendOperationRequest({ contentLength, options }, clearPagesOperationSpec); + } + /** + * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a + * URL + * @param sourceUrl Specify a URL to the copy source. + * @param sourceRange Bytes of source data in the specified range. The length of this range should + * match the ContentLength header and x-ms-range/Range destination range header. + * @param contentLength The length of the request. + * @param range The range of bytes to which the source range would be written. The range should be 512 + * aligned and range-end is required. + * @param options The options parameters. + */ + uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) { + return this.client.sendOperationRequest({ sourceUrl, sourceRange, contentLength, range, options }, uploadPagesFromURLOperationSpec); + } + /** + * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a + * page blob + * @param options The options parameters. + */ + getPageRanges(options) { + return this.client.sendOperationRequest({ options }, getPageRangesOperationSpec); + } + /** + * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were + * changed between target blob and previous snapshot. + * @param options The options parameters. + */ + getPageRangesDiff(options) { + return this.client.sendOperationRequest({ options }, getPageRangesDiffOperationSpec); + } + /** + * Resize the Blob + * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The + * page blob size must be aligned to a 512-byte boundary. + * @param options The options parameters. + */ + resize(blobContentLength, options) { + return this.client.sendOperationRequest({ blobContentLength, options }, resizeOperationSpec); + } + /** + * Update the sequence number of the blob + * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request. + * This property applies to page blobs only. This property indicates how the service should modify the + * blob's sequence number + * @param options The options parameters. + */ + updateSequenceNumber(sequenceNumberAction, options) { + return this.client.sendOperationRequest({ sequenceNumberAction, options }, updateSequenceNumberOperationSpec); + } + /** + * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob. + * The snapshot is copied such that only the differential changes between the previously copied + * snapshot are transferred to the destination. The copied snapshots are complete copies of the + * original snapshot and can be read or copied from as usual. This API is supported since REST version + * 2016-05-31. + * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to + * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would + * appear in a request URI. The source blob must either be public or must be authenticated via a shared + * access signature. + * @param options The options parameters. + */ + copyIncremental(copySource, options) { + return this.client.sendOperationRequest({ copySource, options }, copyIncrementalOperationSpec); + } +} +exports.PageBlobImpl = PageBlobImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const createOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobCreateHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCreateExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.metadata, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobCacheControl, + Parameters.blobContentType, + Parameters.blobContentMD5, + Parameters.blobContentEncoding, + Parameters.blobContentLanguage, + Parameters.blobContentDisposition, + Parameters.immutabilityPolicyExpiry, + Parameters.immutabilityPolicyMode, + Parameters.encryptionScope, + Parameters.tier, + Parameters.blobTagsString, + Parameters.legalHold1, + Parameters.blobType, + Parameters.blobContentLength, + Parameters.blobSequenceNumber, + ], + isXML: true, + serializer: xmlSerializer, +}; +const uploadPagesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobUploadPagesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesExceptionHeaders, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.transactionalContentMD5, + Parameters.transactionalContentCrc64, + Parameters.contentType1, + Parameters.accept2, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "binary", + serializer: xmlSerializer, +}; +const clearPagesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobClearPagesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobClearPagesExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.pageWrite1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const uploadPagesFromURLOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 201: { + headersMapper: Mappers.PageBlobUploadPagesFromURLHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUploadPagesFromURLExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp19], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.contentLength, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.sourceIfModifiedSince, + Parameters.sourceIfUnmodifiedSince, + Parameters.sourceIfMatch, + Parameters.sourceIfNoneMatch, + Parameters.sourceContentMD5, + Parameters.copySourceAuthorization, + Parameters.fileRequestIntent, + Parameters.pageWrite, + Parameters.ifSequenceNumberLessThanOrEqualTo, + Parameters.ifSequenceNumberLessThan, + Parameters.ifSequenceNumberEqualTo, + Parameters.sourceUrl, + Parameters.sourceRange, + Parameters.sourceContentCrc64, + Parameters.range1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getPageRangesOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getPageRangesDiffOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PageList, + headersMapper: Mappers.PageBlobGetPageRangesDiffHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobGetPageRangesDiffExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.snapshot, + Parameters.comp20, + Parameters.prevsnapshot, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.range, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.prevSnapshotUrl, + ], + isXML: true, + serializer: xmlSerializer, +}; +const resizeOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.PageBlobResizeHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobResizeExceptionHeaders, + }, + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.encryptionKey, + Parameters.encryptionKeySha256, + Parameters.encryptionAlgorithm, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.encryptionScope, + Parameters.blobContentLength, + ], + isXML: true, + serializer: xmlSerializer, +}; +const updateSequenceNumberOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 200: { + headersMapper: Mappers.PageBlobUpdateSequenceNumberHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobUpdateSequenceNumberExceptionHeaders, + }, + }, + queryParameters: [Parameters.comp, Parameters.timeoutInSeconds], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.leaseId, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.blobSequenceNumber, + Parameters.sequenceNumberAction, + ], + isXML: true, + serializer: xmlSerializer, +}; +const copyIncrementalOperationSpec = { + path: "/{containerName}/{blob}", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.PageBlobCopyIncrementalHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.PageBlobCopyIncrementalExceptionHeaders, + }, + }, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp21], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + Parameters.ifModifiedSince, + Parameters.ifUnmodifiedSince, + Parameters.ifMatch, + Parameters.ifNoneMatch, + Parameters.ifTags, + Parameters.copySource, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=pageBlob.js.map /***/ }), -/***/ 63477: -/***/ ((module) => { +/***/ 1746: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("querystring"); - -/***/ }), - -/***/ 12781: -/***/ ((module) => { -"use strict"; -module.exports = require("stream"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceImpl = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreClient = tslib_1.__importStar(__nccwpck_require__(7611)); +const Mappers = tslib_1.__importStar(__nccwpck_require__(52486)); +const Parameters = tslib_1.__importStar(__nccwpck_require__(54142)); +/** Class containing Service operations. */ +class ServiceImpl { + client; + /** + * Initialize a new instance of the class Service class. + * @param client Reference to the service client + */ + constructor(client) { + this.client = client; + } + /** + * Sets properties for a storage account's Blob service endpoint, including properties for Storage + * Analytics and CORS (Cross-Origin Resource Sharing) rules + * @param blobServiceProperties The StorageService properties. + * @param options The options parameters. + */ + setProperties(blobServiceProperties, options) { + return this.client.sendOperationRequest({ blobServiceProperties, options }, setPropertiesOperationSpec); + } + /** + * gets the properties of a storage account's Blob service, including properties for Storage Analytics + * and CORS (Cross-Origin Resource Sharing) rules. + * @param options The options parameters. + */ + getProperties(options) { + return this.client.sendOperationRequest({ options }, getPropertiesOperationSpec); + } + /** + * Retrieves statistics related to replication for the Blob service. It is only available on the + * secondary location endpoint when read-access geo-redundant replication is enabled for the storage + * account. + * @param options The options parameters. + */ + getStatistics(options) { + return this.client.sendOperationRequest({ options }, getStatisticsOperationSpec); + } + /** + * The List Containers Segment operation returns a list of the containers under the specified account + * @param options The options parameters. + */ + listContainersSegment(options) { + return this.client.sendOperationRequest({ options }, listContainersSegmentOperationSpec); + } + /** + * Retrieves a user delegation key for the Blob service. This is only a valid operation when using + * bearer token authentication. + * @param keyInfo Key information + * @param options The options parameters. + */ + getUserDelegationKey(keyInfo, options) { + return this.client.sendOperationRequest({ keyInfo, options }, getUserDelegationKeyOperationSpec); + } + /** + * Returns the sku name and account kind + * @param options The options parameters. + */ + getAccountInfo(options) { + return this.client.sendOperationRequest({ options }, getAccountInfoOperationSpec); + } + /** + * The Batch operation allows multiple API calls to be embedded into a single HTTP request. + * @param contentLength The length of the request. + * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch + * boundary. Example header value: multipart/mixed; boundary=batch_ + * @param body Initial data + * @param options The options parameters. + */ + submitBatch(contentLength, multipartContentType, body, options) { + return this.client.sendOperationRequest({ contentLength, multipartContentType, body, options }, submitBatchOperationSpec); + } + /** + * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a + * given search expression. Filter blobs searches across all containers within a storage account but + * can be scoped within the expression to a single container. + * @param options The options parameters. + */ + filterBlobs(options) { + return this.client.sendOperationRequest({ options }, filterBlobsOperationSpec); + } +} +exports.ServiceImpl = ServiceImpl; +// Operation Specifications +const xmlSerializer = coreClient.createSerializer(Mappers, /* isXml */ true); +const setPropertiesOperationSpec = { + path: "/", + httpMethod: "PUT", + responses: { + 202: { + headersMapper: Mappers.ServiceSetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSetPropertiesExceptionHeaders, + }, + }, + requestBody: Parameters.blobServiceProperties, + queryParameters: [ + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getPropertiesOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlobServiceProperties, + headersMapper: Mappers.ServiceGetPropertiesHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetPropertiesExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.restype, + Parameters.comp, + Parameters.timeoutInSeconds, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getStatisticsOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BlobServiceStatistics, + headersMapper: Mappers.ServiceGetStatisticsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetStatisticsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const listContainersSegmentOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListContainersSegmentResponse, + headersMapper: Mappers.ServiceListContainersSegmentHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceListContainersSegmentExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.comp2, + Parameters.prefix, + Parameters.marker, + Parameters.maxPageSize, + Parameters.include, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const getUserDelegationKeyOperationSpec = { + path: "/", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.UserDelegationKey, + headersMapper: Mappers.ServiceGetUserDelegationKeyHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetUserDelegationKeyExceptionHeaders, + }, + }, + requestBody: Parameters.keyInfo, + queryParameters: [ + Parameters.restype, + Parameters.timeoutInSeconds, + Parameters.comp3, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.version, + Parameters.requestId, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const getAccountInfoOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + headersMapper: Mappers.ServiceGetAccountInfoHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceGetAccountInfoExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.comp, + Parameters.timeoutInSeconds, + Parameters.restype1, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +const submitBatchOperationSpec = { + path: "/", + httpMethod: "POST", + responses: { + 202: { + bodyMapper: { + type: { name: "Stream" }, + serializedName: "parsedResponse", + }, + headersMapper: Mappers.ServiceSubmitBatchHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceSubmitBatchExceptionHeaders, + }, + }, + requestBody: Parameters.body, + queryParameters: [Parameters.timeoutInSeconds, Parameters.comp4], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.accept, + Parameters.version, + Parameters.requestId, + Parameters.contentLength, + Parameters.multipartContentType, + ], + isXML: true, + contentType: "application/xml; charset=utf-8", + mediaType: "xml", + serializer: xmlSerializer, +}; +const filterBlobsOperationSpec = { + path: "/", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FilterBlobSegment, + headersMapper: Mappers.ServiceFilterBlobsHeaders, + }, + default: { + bodyMapper: Mappers.StorageError, + headersMapper: Mappers.ServiceFilterBlobsExceptionHeaders, + }, + }, + queryParameters: [ + Parameters.timeoutInSeconds, + Parameters.marker, + Parameters.maxPageSize, + Parameters.comp5, + Parameters.where, + ], + urlParameters: [Parameters.url], + headerParameters: [ + Parameters.version, + Parameters.requestId, + Parameters.accept1, + ], + isXML: true, + serializer: xmlSerializer, +}; +//# sourceMappingURL=service.js.map /***/ }), -/***/ 35356: -/***/ ((module) => { +/***/ 24763: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = require("stream/web"); - -/***/ }), - -/***/ 71576: -/***/ ((module) => { -"use strict"; -module.exports = require("string_decoder"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=appendBlob.js.map /***/ }), -/***/ 39512: -/***/ ((module) => { +/***/ 57427: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = require("timers"); - -/***/ }), - -/***/ 24404: -/***/ ((module) => { -"use strict"; -module.exports = require("tls"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=blob.js.map /***/ }), -/***/ 76224: -/***/ ((module) => { +/***/ 56945: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = require("tty"); - -/***/ }), -/***/ 57310: -/***/ ((module) => { - -"use strict"; -module.exports = require("url"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=blockBlob.js.map /***/ }), -/***/ 73837: -/***/ ((module) => { +/***/ 43634: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -module.exports = require("util"); - -/***/ }), - -/***/ 29830: -/***/ ((module) => { -"use strict"; -module.exports = require("util/types"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=container.js.map /***/ }), -/***/ 71267: -/***/ ((module) => { +/***/ 68529: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -module.exports = require("worker_threads"); -/***/ }), - -/***/ 59796: -/***/ ((module) => { - -"use strict"; -module.exports = require("zlib"); +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(75650), exports); +tslib_1.__exportStar(__nccwpck_require__(43634), exports); +tslib_1.__exportStar(__nccwpck_require__(57427), exports); +tslib_1.__exportStar(__nccwpck_require__(76425), exports); +tslib_1.__exportStar(__nccwpck_require__(24763), exports); +tslib_1.__exportStar(__nccwpck_require__(56945), exports); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 31875: +/***/ 76425: /***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureKeyCredential = void 0; -/** - * A static-key-based credential that supports updating - * the underlying key value. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -class AzureKeyCredential { - /** - * The value of the key to be used in authentication - */ - get key() { - return this._key; - } - /** - * Create an instance of an AzureKeyCredential for use - * with a service client. - * - * @param key - The initial value of the key to use in authentication - */ - constructor(key) { - if (!key) { - throw new Error("key must be a non-empty string"); - } - this._key = key; - } - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newKey - The new key value to be used - */ - update(newKey) { - this._key = newKey; - } -} -exports.AzureKeyCredential = AzureKeyCredential; -//# sourceMappingURL=azureKeyCredential.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=pageBlob.js.map /***/ }), -/***/ 51377: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 75650: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureNamedKeyCredential = void 0; -exports.isNamedKeyCredential = isNamedKeyCredential; -const core_util_1 = __nccwpck_require__(80637); -/** - * A static name/key-based credential that supports updating - * the underlying name and key values. - */ -class AzureNamedKeyCredential { - /** - * The value of the key to be used in authentication. - */ - get key() { - return this._key; - } - /** - * The value of the name to be used in authentication. - */ - get name() { - return this._name; - } - /** - * Create an instance of an AzureNamedKeyCredential for use - * with a service client. - * - * @param name - The initial value of the name to use in authentication. - * @param key - The initial value of the key to use in authentication. - */ - constructor(name, key) { - if (!name || !key) { - throw new TypeError("name and key must be non-empty strings"); - } - this._name = name; - this._key = key; - } - /** - * Change the value of the key. - * - * Updates will take effect upon the next request after - * updating the key value. - * - * @param newName - The new name value to be used. - * @param newKey - The new key value to be used. - */ - update(newName, newKey) { - if (!newName || !newKey) { - throw new TypeError("newName and newKey must be non-empty strings"); - } - this._name = newName; - this._key = newKey; - } -} -exports.AzureNamedKeyCredential = AzureNamedKeyCredential; -/** - * Tests an object to determine whether it implements NamedKeyCredential. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * - * @param credential - The assumed NamedKeyCredential to be tested. + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -function isNamedKeyCredential(credential) { - return ((0, core_util_1.isObjectWithProperties)(credential, ["name", "key"]) && - typeof credential.key === "string" && - typeof credential.name === "string"); -} -//# sourceMappingURL=azureNamedKeyCredential.js.map +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=service.js.map /***/ }), -/***/ 27182: +/***/ 92252: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureSASCredential = void 0; -exports.isSASCredential = isSASCredential; -const core_util_1 = __nccwpck_require__(80637); -/** - * A static-signature-based credential that supports updating - * the underlying signature value. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -class AzureSASCredential { - /** - * The value of the shared access signature to be used in authentication - */ - get signature() { - return this._signature; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageClient = void 0; +const tslib_1 = __nccwpck_require__(4351); +const coreHttpCompat = tslib_1.__importStar(__nccwpck_require__(25083)); +const index_js_1 = __nccwpck_require__(13759); +class StorageClient extends coreHttpCompat.ExtendedServiceClient { + url; + version; /** - * Create an instance of an AzureSASCredential for use - * with a service client. - * - * @param signature - The initial value of the shared access signature to use in authentication + * Initializes a new instance of the StorageClient class. + * @param url The URL of the service account, container, or blob that is the target of the desired + * operation. + * @param options The parameter options */ - constructor(signature) { - if (!signature) { - throw new Error("shared access signature must be a non-empty string"); + constructor(url, options) { + if (url === undefined) { + throw new Error("'url' cannot be null"); } - this._signature = signature; - } - /** - * Change the value of the signature. - * - * Updates will take effect upon the next request after - * updating the signature value. - * - * @param newSignature - The new shared access signature value to be used - */ - update(newSignature) { - if (!newSignature) { - throw new Error("shared access signature must be a non-empty string"); + // Initializing default values for options + if (!options) { + options = {}; } - this._signature = newSignature; + const defaults = { + requestContentType: "application/json; charset=utf-8", + }; + const packageDetails = `azsdk-js-azure-storage-blob/12.29.1`; + const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix, + }, + endpoint: options.endpoint ?? options.baseUri ?? "{url}", + }; + super(optionsWithDefaults); + // Parameter assignments + this.url = url; + // Assigning values to Constant parameters + this.version = options.version || "2025-11-05"; + this.service = new index_js_1.ServiceImpl(this); + this.container = new index_js_1.ContainerImpl(this); + this.blob = new index_js_1.BlobImpl(this); + this.pageBlob = new index_js_1.PageBlobImpl(this); + this.appendBlob = new index_js_1.AppendBlobImpl(this); + this.blockBlob = new index_js_1.BlockBlobImpl(this); } + service; + container; + blob; + pageBlob; + appendBlob; + blockBlob; } -exports.AzureSASCredential = AzureSASCredential; -/** - * Tests an object to determine whether it implements SASCredential. - * - * @param credential - The assumed SASCredential to be tested. - */ -function isSASCredential(credential) { - return ((0, core_util_1.isObjectWithProperties)(credential, ["signature"]) && typeof credential.signature === "string"); -} -//# sourceMappingURL=azureSASCredential.js.map +exports.StorageClient = StorageClient; +//# sourceMappingURL=storageClient.js.map /***/ }), -/***/ 98834: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 39241: +/***/ ((__unused_webpack_module, exports) => { "use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isTokenCredential = exports.isSASCredential = exports.AzureSASCredential = exports.isNamedKeyCredential = exports.AzureNamedKeyCredential = exports.isKeyCredential = exports.AzureKeyCredential = void 0; -var azureKeyCredential_js_1 = __nccwpck_require__(31875); -Object.defineProperty(exports, "AzureKeyCredential", ({ enumerable: true, get: function () { return azureKeyCredential_js_1.AzureKeyCredential; } })); -var keyCredential_js_1 = __nccwpck_require__(59122); -Object.defineProperty(exports, "isKeyCredential", ({ enumerable: true, get: function () { return keyCredential_js_1.isKeyCredential; } })); -var azureNamedKeyCredential_js_1 = __nccwpck_require__(51377); -Object.defineProperty(exports, "AzureNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.AzureNamedKeyCredential; } })); -Object.defineProperty(exports, "isNamedKeyCredential", ({ enumerable: true, get: function () { return azureNamedKeyCredential_js_1.isNamedKeyCredential; } })); -var azureSASCredential_js_1 = __nccwpck_require__(27182); -Object.defineProperty(exports, "AzureSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.AzureSASCredential; } })); -Object.defineProperty(exports, "isSASCredential", ({ enumerable: true, get: function () { return azureSASCredential_js_1.isSASCredential; } })); -var tokenCredential_js_1 = __nccwpck_require__(39162); -Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: function () { return tokenCredential_js_1.isTokenCredential; } })); -//# sourceMappingURL=index.js.map +exports.KnownEncryptionAlgorithmType = void 0; +/** Known values of {@link EncryptionAlgorithmType} that the service accepts. */ +var KnownEncryptionAlgorithmType; +(function (KnownEncryptionAlgorithmType) { + KnownEncryptionAlgorithmType["AES256"] = "AES256"; +})(KnownEncryptionAlgorithmType || (exports.KnownEncryptionAlgorithmType = KnownEncryptionAlgorithmType = {})); +//# sourceMappingURL=generatedModels.js.map /***/ }), -/***/ 59122: +/***/ 37168: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141100,21 +143404,56 @@ Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: fu // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isKeyCredential = isKeyCredential; -const core_util_1 = __nccwpck_require__(80637); -/** - * Tests an object to determine whether it implements KeyCredential. - * - * @param credential - The assumed KeyCredential to be tested. - */ -function isKeyCredential(credential) { - return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string"; -} -//# sourceMappingURL=keyCredential.js.map +exports.logger = exports.RestError = exports.BaseRequestPolicy = exports.StorageOAuthScopes = exports.newPipeline = exports.isPipelineLike = exports.Pipeline = exports.getBlobServiceAccountAudience = exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTier = exports.generateBlobSASQueryParameters = exports.generateAccountSASQueryParameters = void 0; +const tslib_1 = __nccwpck_require__(4351); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return core_rest_pipeline_1.RestError; } })); +tslib_1.__exportStar(__nccwpck_require__(12679), exports); +tslib_1.__exportStar(__nccwpck_require__(54437), exports); +tslib_1.__exportStar(__nccwpck_require__(63750), exports); +tslib_1.__exportStar(__nccwpck_require__(20106), exports); +tslib_1.__exportStar(__nccwpck_require__(70793), exports); +tslib_1.__exportStar(__nccwpck_require__(70790), exports); +tslib_1.__exportStar(__nccwpck_require__(34606), exports); +var AccountSASSignatureValues_js_1 = __nccwpck_require__(72763); +Object.defineProperty(exports, "generateAccountSASQueryParameters", ({ enumerable: true, get: function () { return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; } })); +tslib_1.__exportStar(__nccwpck_require__(73689), exports); +tslib_1.__exportStar(__nccwpck_require__(71861), exports); +tslib_1.__exportStar(__nccwpck_require__(1227), exports); +tslib_1.__exportStar(__nccwpck_require__(87393), exports); +var BlobSASSignatureValues_js_1 = __nccwpck_require__(48921); +Object.defineProperty(exports, "generateBlobSASQueryParameters", ({ enumerable: true, get: function () { return BlobSASSignatureValues_js_1.generateBlobSASQueryParameters; } })); +tslib_1.__exportStar(__nccwpck_require__(86562), exports); +tslib_1.__exportStar(__nccwpck_require__(27579), exports); +tslib_1.__exportStar(__nccwpck_require__(42803), exports); +tslib_1.__exportStar(__nccwpck_require__(35778), exports); +tslib_1.__exportStar(__nccwpck_require__(59155), exports); +var models_js_1 = __nccwpck_require__(64526); +Object.defineProperty(exports, "BlockBlobTier", ({ enumerable: true, get: function () { return models_js_1.BlockBlobTier; } })); +Object.defineProperty(exports, "PremiumPageBlobTier", ({ enumerable: true, get: function () { return models_js_1.PremiumPageBlobTier; } })); +Object.defineProperty(exports, "StorageBlobAudience", ({ enumerable: true, get: function () { return models_js_1.StorageBlobAudience; } })); +Object.defineProperty(exports, "getBlobServiceAccountAudience", ({ enumerable: true, get: function () { return models_js_1.getBlobServiceAccountAudience; } })); +var Pipeline_js_1 = __nccwpck_require__(33781); +Object.defineProperty(exports, "Pipeline", ({ enumerable: true, get: function () { return Pipeline_js_1.Pipeline; } })); +Object.defineProperty(exports, "isPipelineLike", ({ enumerable: true, get: function () { return Pipeline_js_1.isPipelineLike; } })); +Object.defineProperty(exports, "newPipeline", ({ enumerable: true, get: function () { return Pipeline_js_1.newPipeline; } })); +Object.defineProperty(exports, "StorageOAuthScopes", ({ enumerable: true, get: function () { return Pipeline_js_1.StorageOAuthScopes; } })); +tslib_1.__exportStar(__nccwpck_require__(98637), exports); +var RequestPolicy_js_1 = __nccwpck_require__(33847); +Object.defineProperty(exports, "BaseRequestPolicy", ({ enumerable: true, get: function () { return RequestPolicy_js_1.BaseRequestPolicy; } })); +tslib_1.__exportStar(__nccwpck_require__(51870), exports); +tslib_1.__exportStar(__nccwpck_require__(15513), exports); +tslib_1.__exportStar(__nccwpck_require__(98637), exports); +tslib_1.__exportStar(__nccwpck_require__(66776), exports); +tslib_1.__exportStar(__nccwpck_require__(21969), exports); +tslib_1.__exportStar(__nccwpck_require__(39241), exports); +var log_js_1 = __nccwpck_require__(53282); +Object.defineProperty(exports, "logger", ({ enumerable: true, get: function () { return log_js_1.logger; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 39162: +/***/ 583: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -141122,255 +143461,351 @@ function isKeyCredential(credential) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBearerToken = isBearerToken; -exports.isPopToken = isPopToken; -exports.isTokenCredential = isTokenCredential; -/** - * @internal - * @param accessToken - Access token - * @returns Whether a token is bearer type or not - */ -function isBearerToken(accessToken) { - return !accessToken.tokenType || accessToken.tokenType === "Bearer"; -} -/** - * @internal - * @param accessToken - Access token - * @returns Whether a token is Pop token or not - */ -function isPopToken(accessToken) { - return accessToken.tokenType === "pop"; -} -/** - * Tests an object to determine whether it implements TokenCredential. - * - * @param credential - The assumed TokenCredential to be tested. - */ -function isTokenCredential(credential) { - // Check for an object with a 'getToken' function and possibly with - // a 'signRequest' function. We do this check to make sure that - // a ServiceClientCredentials implementor (like TokenClientCredentials - // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if - // it doesn't actually implement TokenCredential also. - const castCredential = credential; - return (castCredential && - typeof castCredential.getToken === "function" && - (castCredential.signRequest === undefined || castCredential.getToken.length > 0)); -} -//# sourceMappingURL=tokenCredential.js.map +exports.AVRO_SCHEMA_KEY = exports.AVRO_CODEC_KEY = exports.AVRO_INIT_BYTES = exports.AVRO_SYNC_MARKER_SIZE = void 0; +exports.AVRO_SYNC_MARKER_SIZE = 16; +exports.AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]); +exports.AVRO_CODEC_KEY = "avro.codec"; +exports.AVRO_SCHEMA_KEY = "avro.schema"; +//# sourceMappingURL=AvroConstants.js.map /***/ }), -/***/ 94873: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 58119: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseCAEChallenge = parseCAEChallenge; -exports.authorizeRequestOnClaimChallenge = authorizeRequestOnClaimChallenge; -const log_js_1 = __nccwpck_require__(53776); -const base64_js_1 = __nccwpck_require__(23442); -/** - * Converts: `Bearer a="b", c="d", Bearer d="e", f="g"`. - * Into: `[ { a: 'b', c: 'd' }, { d: 'e', f: 'g' } ]`. - * - * @internal - */ -function parseCAEChallenge(challenges) { - const bearerChallenges = `, ${challenges.trim()}`.split(", Bearer ").filter((x) => x); - return bearerChallenges.map((challenge) => { - const challengeParts = `${challenge.trim()}, `.split('", ').filter((x) => x); - const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split('="'))); - // Key-value pairs to plain object: - return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {}); - }); +exports.AvroType = exports.AvroParser = void 0; +class AvroParser { + /** + * Reads a fixed number of bytes from the stream. + * + * @param stream - + * @param length - + * @param options - + */ + static async readFixedBytes(stream, length, options = {}) { + const bytes = await stream.read(length, { abortSignal: options.abortSignal }); + if (bytes.length !== length) { + throw new Error("Hit stream end."); + } + return bytes; + } + /** + * Reads a single byte from the stream. + * + * @param stream - + * @param options - + */ + static async readByte(stream, options = {}) { + const buf = await AvroParser.readFixedBytes(stream, 1, options); + return buf[0]; + } + // int and long are stored in variable-length zig-zag coding. + // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt + // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types + static async readZigZagLong(stream, options = {}) { + let zigZagEncoded = 0; + let significanceInBit = 0; + let byte, haveMoreByte, significanceInFloat; + do { + byte = await AvroParser.readByte(stream, options); + haveMoreByte = byte & 0x80; + zigZagEncoded |= (byte & 0x7f) << significanceInBit; + significanceInBit += 7; + } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers + if (haveMoreByte) { + // Switch to float arithmetic + // eslint-disable-next-line no-self-assign + zigZagEncoded = zigZagEncoded; + significanceInFloat = 268435456; // 2 ** 28. + do { + byte = await AvroParser.readByte(stream, options); + zigZagEncoded += (byte & 0x7f) * significanceInFloat; + significanceInFloat *= 128; // 2 ** 7 + } while (byte & 0x80); + const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2; + if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) { + throw new Error("Integer overflow."); + } + return res; + } + return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1); + } + static async readLong(stream, options = {}) { + return AvroParser.readZigZagLong(stream, options); + } + static async readInt(stream, options = {}) { + return AvroParser.readZigZagLong(stream, options); + } + static async readNull() { + return null; + } + static async readBoolean(stream, options = {}) { + const b = await AvroParser.readByte(stream, options); + if (b === 1) { + return true; + } + else if (b === 0) { + return false; + } + else { + throw new Error("Byte was not a boolean."); + } + } + static async readFloat(stream, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream, 4, options); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat32(0, true); // littleEndian = true + } + static async readDouble(stream, options = {}) { + const u8arr = await AvroParser.readFixedBytes(stream, 8, options); + const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength); + return view.getFloat64(0, true); // littleEndian = true + } + static async readBytes(stream, options = {}) { + const size = await AvroParser.readLong(stream, options); + if (size < 0) { + throw new Error("Bytes size was negative."); + } + return stream.read(size, { abortSignal: options.abortSignal }); + } + static async readString(stream, options = {}) { + const u8arr = await AvroParser.readBytes(stream, options); + const utf8decoder = new TextDecoder(); + return utf8decoder.decode(u8arr); + } + static async readMapPair(stream, readItemMethod, options = {}) { + const key = await AvroParser.readString(stream, options); + // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter. + const value = await readItemMethod(stream, options); + return { key, value }; + } + static async readMap(stream, readItemMethod, options = {}) { + const readPairMethod = (s, opts = {}) => { + return AvroParser.readMapPair(s, readItemMethod, opts); + }; + const pairs = await AvroParser.readArray(stream, readPairMethod, options); + const dict = {}; + for (const pair of pairs) { + dict[pair.key] = pair.value; + } + return dict; + } + static async readArray(stream, readItemMethod, options = {}) { + const items = []; + for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) { + if (count < 0) { + // Ignore block sizes + await AvroParser.readLong(stream, options); + count = -count; + } + while (count--) { + const item = await readItemMethod(stream, options); + items.push(item); + } + } + return items; + } } -/** - * This function can be used as a callback for the `bearerTokenAuthenticationPolicy` of `@azure/core-rest-pipeline`, to support CAE challenges: - * [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation). - * - * Call the `bearerTokenAuthenticationPolicy` with the following options: - * - * ```ts snippet:AuthorizeRequestOnClaimChallenge - * import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; - * import { authorizeRequestOnClaimChallenge } from "@azure/core-client"; - * - * const policy = bearerTokenAuthenticationPolicy({ - * challengeCallbacks: { - * authorizeRequestOnChallenge: authorizeRequestOnClaimChallenge, - * }, - * scopes: ["https://service/.default"], - * }); - * ``` - * - * Once provided, the `bearerTokenAuthenticationPolicy` policy will internally handle Continuous Access Evaluation (CAE) challenges. - * When it can't complete a challenge it will return the 401 (unauthorized) response from ARM. - * - * Example challenge with claims: - * - * ``` - * Bearer authorization_uri="https://login.windows-ppe.net/", error="invalid_token", - * error_description="User session has been revoked", - * claims="eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwgInZhbHVlIjoiMTYwMzc0MjgwMCJ9fX0=" - * ``` - */ -async function authorizeRequestOnClaimChallenge(onChallengeOptions) { - var _a; - const { scopes, response } = onChallengeOptions; - const logger = onChallengeOptions.logger || log_js_1.logger; - const challenge = response.headers.get("WWW-Authenticate"); - if (!challenge) { - logger.info(`The WWW-Authenticate header was missing. Failed to perform the Continuous Access Evaluation authentication flow.`); - return false; +exports.AvroParser = AvroParser; +var AvroComplex; +(function (AvroComplex) { + AvroComplex["RECORD"] = "record"; + AvroComplex["ENUM"] = "enum"; + AvroComplex["ARRAY"] = "array"; + AvroComplex["MAP"] = "map"; + AvroComplex["UNION"] = "union"; + AvroComplex["FIXED"] = "fixed"; +})(AvroComplex || (AvroComplex = {})); +var AvroPrimitive; +(function (AvroPrimitive) { + AvroPrimitive["NULL"] = "null"; + AvroPrimitive["BOOLEAN"] = "boolean"; + AvroPrimitive["INT"] = "int"; + AvroPrimitive["LONG"] = "long"; + AvroPrimitive["FLOAT"] = "float"; + AvroPrimitive["DOUBLE"] = "double"; + AvroPrimitive["BYTES"] = "bytes"; + AvroPrimitive["STRING"] = "string"; +})(AvroPrimitive || (AvroPrimitive = {})); +class AvroType { + /** + * Determines the AvroType from the Avro Schema. + */ + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + static fromSchema(schema) { + if (typeof schema === "string") { + return AvroType.fromStringSchema(schema); + } + else if (Array.isArray(schema)) { + return AvroType.fromArraySchema(schema); + } + else { + return AvroType.fromObjectSchema(schema); + } } - const challenges = parseCAEChallenge(challenge) || []; - const parsedChallenge = challenges.find((x) => x.claims); - if (!parsedChallenge) { - logger.info(`The WWW-Authenticate header was missing the necessary "claims" to perform the Continuous Access Evaluation authentication flow.`); - return false; + static fromStringSchema(schema) { + switch (schema) { + case AvroPrimitive.NULL: + case AvroPrimitive.BOOLEAN: + case AvroPrimitive.INT: + case AvroPrimitive.LONG: + case AvroPrimitive.FLOAT: + case AvroPrimitive.DOUBLE: + case AvroPrimitive.BYTES: + case AvroPrimitive.STRING: + return new AvroPrimitiveType(schema); + default: + throw new Error(`Unexpected Avro type ${schema}`); + } } - const accessToken = await onChallengeOptions.getAccessToken(parsedChallenge.scope ? [parsedChallenge.scope] : scopes, { - claims: (0, base64_js_1.decodeStringToString)(parsedChallenge.claims), - }); - if (!accessToken) { - return false; + static fromArraySchema(schema) { + return new AvroUnionType(schema.map(AvroType.fromSchema)); } - onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); - return true; -} -//# sourceMappingURL=authorizeRequestOnClaimChallenge.js.map - -/***/ }), - -/***/ 16576: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.authorizeRequestOnTenantChallenge = void 0; -/** - * A set of constants used internally when processing requests. - */ -const Constants = { - DefaultScope: "/.default", - /** - * Defines constants for use with HTTP headers. - */ - HeaderConstants: { - /** - * The Authorization header. - */ - AUTHORIZATION: "authorization", - }, -}; -function isUuid(text) { - return /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/.test(text); -} -/** - * Defines a callback to handle auth challenge for Storage APIs. - * This implements the bearer challenge process described here: https://learn.microsoft.com/rest/api/storageservices/authorize-with-azure-active-directory#bearer-challenge - * Handling has specific features for storage that departs to the general AAD challenge docs. - **/ -const authorizeRequestOnTenantChallenge = async (challengeOptions) => { - var _a; - const requestOptions = requestToOptions(challengeOptions.request); - const challenge = getChallenge(challengeOptions.response); - if (challenge) { - const challengeInfo = parseChallenge(challenge); - const challengeScopes = buildScopes(challengeOptions, challengeInfo); - const tenantId = extractTenantId(challengeInfo); - if (!tenantId) { - return false; + static fromObjectSchema(schema) { + const type = schema.type; + // Primitives can be defined as strings or objects + try { + return AvroType.fromStringSchema(type); } - const accessToken = await challengeOptions.getAccessToken(challengeScopes, Object.assign(Object.assign({}, requestOptions), { tenantId })); - if (!accessToken) { - return false; + catch { + // no-op + } + switch (type) { + case AvroComplex.RECORD: + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); + } + if (!schema.name) { + throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`); + } + // eslint-disable-next-line no-case-declarations + const fields = {}; + if (!schema.fields) { + throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`); + } + for (const field of schema.fields) { + fields[field.name] = AvroType.fromSchema(field.type); + } + return new AvroRecordType(fields, schema.name); + case AvroComplex.ENUM: + if (schema.aliases) { + throw new Error(`aliases currently is not supported, schema: ${schema}`); + } + if (!schema.symbols) { + throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`); + } + return new AvroEnumType(schema.symbols); + case AvroComplex.MAP: + if (!schema.values) { + throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`); + } + return new AvroMapType(AvroType.fromSchema(schema.values)); + case AvroComplex.ARRAY: // Unused today + case AvroComplex.FIXED: // Unused today + default: + throw new Error(`Unexpected Avro type ${type} in ${schema}`); } - challengeOptions.request.headers.set(Constants.HeaderConstants.AUTHORIZATION, `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); - return true; } - return false; -}; -exports.authorizeRequestOnTenantChallenge = authorizeRequestOnTenantChallenge; -/** - * Extracts the tenant id from the challenge information - * The tenant id is contained in the authorization_uri as the first - * path part. - */ -function extractTenantId(challengeInfo) { - const parsedAuthUri = new URL(challengeInfo.authorization_uri); - const pathSegments = parsedAuthUri.pathname.split("/"); - const tenantId = pathSegments[1]; - if (tenantId && isUuid(tenantId)) { - return tenantId; +} +exports.AvroType = AvroType; +class AvroPrimitiveType extends AvroType { + _primitive; + constructor(primitive) { + super(); + this._primitive = primitive; + } + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + read(stream, options = {}) { + switch (this._primitive) { + case AvroPrimitive.NULL: + return AvroParser.readNull(); + case AvroPrimitive.BOOLEAN: + return AvroParser.readBoolean(stream, options); + case AvroPrimitive.INT: + return AvroParser.readInt(stream, options); + case AvroPrimitive.LONG: + return AvroParser.readLong(stream, options); + case AvroPrimitive.FLOAT: + return AvroParser.readFloat(stream, options); + case AvroPrimitive.DOUBLE: + return AvroParser.readDouble(stream, options); + case AvroPrimitive.BYTES: + return AvroParser.readBytes(stream, options); + case AvroPrimitive.STRING: + return AvroParser.readString(stream, options); + default: + throw new Error("Unknown Avro Primitive"); + } } - return undefined; } -/** - * Builds the authentication scopes based on the information that comes in the - * challenge information. Scopes url is present in the resource_id, if it is empty - * we keep using the original scopes. - */ -function buildScopes(challengeOptions, challengeInfo) { - if (!challengeInfo.resource_id) { - return challengeOptions.scopes; +class AvroEnumType extends AvroType { + _symbols; + constructor(symbols) { + super(); + this._symbols = symbols; } - const challengeScopes = new URL(challengeInfo.resource_id); - challengeScopes.pathname = Constants.DefaultScope; - let scope = challengeScopes.toString(); - if (scope === "https://disk.azure.com/.default") { - // the extra slash is required by the service - scope = "https://disk.azure.com//.default"; + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + async read(stream, options = {}) { + const value = await AvroParser.readInt(stream, options); + return this._symbols[value]; } - return [scope]; } -/** - * We will retrieve the challenge only if the response status code was 401, - * and if the response contained the header "WWW-Authenticate" with a non-empty value. - */ -function getChallenge(response) { - const challenge = response.headers.get("WWW-Authenticate"); - if (response.status === 401 && challenge) { - return challenge; +class AvroUnionType extends AvroType { + _types; + constructor(types) { + super(); + this._types = types; + } + async read(stream, options = {}) { + const typeIndex = await AvroParser.readInt(stream, options); + return this._types[typeIndex].read(stream, options); } - return; } -/** - * Converts: `Bearer a="b" c="d"`. - * Into: `[ { a: 'b', c: 'd' }]`. - * - * @internal - */ -function parseChallenge(challenge) { - const bearerChallenge = challenge.slice("Bearer ".length); - const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x); - const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("="))); - // Key-value pairs to plain object: - return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {}); +class AvroMapType extends AvroType { + _itemType; + constructor(itemType) { + super(); + this._itemType = itemType; + } + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + read(stream, options = {}) { + const readItemMethod = (s, opts) => { + return this._itemType.read(s, opts); + }; + return AvroParser.readMap(stream, readItemMethod, options); + } } -/** - * Extracts the options form a Pipeline Request for later re-use - */ -function requestToOptions(request) { - return { - abortSignal: request.abortSignal, - requestOptions: { - timeout: request.timeout, - }, - tracingOptions: request.tracingOptions, - }; +class AvroRecordType extends AvroType { + _name; + _fields; + constructor(fields, name) { + super(); + this._fields = fields; + this._name = name; + } + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + async read(stream, options = {}) { + // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types + const record = {}; + record["$schema"] = this._name; + for (const key in this._fields) { + if (Object.prototype.hasOwnProperty.call(this._fields, key)) { + record[key] = await this._fields[key].read(stream, options); + } + } + return record; + } } -//# sourceMappingURL=authorizeRequestOnTenantChallenge.js.map +//# sourceMappingURL=AvroParser.js.map /***/ }), -/***/ 23442: +/***/ 15192: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -141378,48 +143813,15 @@ function requestToOptions(request) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.encodeString = encodeString; -exports.encodeByteArray = encodeByteArray; -exports.decodeString = decodeString; -exports.decodeStringToString = decodeStringToString; -/** - * Encodes a string in base64 format. - * @param value - the string to encode - * @internal - */ -function encodeString(value) { - return Buffer.from(value).toString("base64"); -} -/** - * Encodes a byte array in base64 format. - * @param value - the Uint8Aray to encode - * @internal - */ -function encodeByteArray(value) { - const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer); - return bufferValue.toString("base64"); -} -/** - * Decodes a base64 string into a byte array. - * @param value - the base64 string to decode - * @internal - */ -function decodeString(value) { - return Buffer.from(value, "base64"); -} -/** - * Decodes a base64 string into a string. - * @param value - the base64 string to decode - * @internal - */ -function decodeStringToString(value) { - return Buffer.from(value, "base64").toString(); +exports.AvroReadable = void 0; +class AvroReadable { } -//# sourceMappingURL=base64.js.map +exports.AvroReadable = AvroReadable; +//# sourceMappingURL=AvroReadable.js.map /***/ }), -/***/ 25315: +/***/ 53027: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141427,243 +143829,223 @@ function decodeStringToString(value) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.deserializationPolicyName = void 0; -exports.deserializationPolicy = deserializationPolicy; -const interfaces_js_1 = __nccwpck_require__(8153); -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const serializer_js_1 = __nccwpck_require__(63566); -const operationHelpers_js_1 = __nccwpck_require__(62074); -const defaultJsonContentTypes = ["application/json", "text/json"]; -const defaultXmlContentTypes = ["application/xml", "application/atom+xml"]; -/** - * The programmatic identifier of the deserializationPolicy. - */ -exports.deserializationPolicyName = "deserializationPolicy"; -/** - * This policy handles parsing out responses according to OperationSpecs on the request. - */ -function deserializationPolicy(options = {}) { - var _a, _b, _c, _d, _e, _f, _g; - const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes; - const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes; - const parseXML = options.parseXML; - const serializerOptions = options.serializerOptions; - const updatedOptions = { - xml: { - rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : "", - includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false, - xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : interfaces_js_1.XML_CHARKEY, - }, - }; - return { - name: exports.deserializationPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML); - }, - }; -} -function getOperationResponseMap(parsedResponse) { - let result; - const request = parsedResponse.request; - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - if (operationSpec) { - if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) { - result = operationSpec.responses[parsedResponse.status]; - } - else { - result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse); +exports.AvroReadableFromStream = void 0; +const AvroReadable_js_1 = __nccwpck_require__(15192); +const abort_controller_1 = __nccwpck_require__(1753); +const buffer_1 = __nccwpck_require__(14300); +const ABORT_ERROR = new abort_controller_1.AbortError("Reading from the avro stream was aborted."); +class AvroReadableFromStream extends AvroReadable_js_1.AvroReadable { + _position; + _readable; + toUint8Array(data) { + if (typeof data === "string") { + return buffer_1.Buffer.from(data); } + return data; } - return result; -} -function shouldDeserializeResponse(parsedResponse) { - const request = parsedResponse.request; - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize; - let result; - if (shouldDeserialize === undefined) { - result = true; + constructor(readable) { + super(); + this._readable = readable; + this._position = 0; } - else if (typeof shouldDeserialize === "boolean") { - result = shouldDeserialize; + get position() { + return this._position; } - else { - result = shouldDeserialize(parsedResponse); + async read(size, options = {}) { + if (options.abortSignal?.aborted) { + throw ABORT_ERROR; + } + if (size < 0) { + throw new Error(`size parameter should be positive: ${size}`); + } + if (size === 0) { + return new Uint8Array(); + } + if (!this._readable.readable) { + throw new Error("Stream no longer readable."); + } + // See if there is already enough data. + const chunk = this._readable.read(size); + if (chunk) { + this._position += chunk.length; + // chunk.length maybe less than desired size if the stream ends. + return this.toUint8Array(chunk); + } + else { + // register callback to wait for enough data to read + return new Promise((resolve, reject) => { + /* eslint-disable @typescript-eslint/no-use-before-define */ + const cleanUp = () => { + this._readable.removeListener("readable", readableCallback); + this._readable.removeListener("error", rejectCallback); + this._readable.removeListener("end", rejectCallback); + this._readable.removeListener("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.removeEventListener("abort", abortHandler); + } + }; + const readableCallback = () => { + const callbackChunk = this._readable.read(size); + if (callbackChunk) { + this._position += callbackChunk.length; + cleanUp(); + // callbackChunk.length maybe less than desired size if the stream ends. + resolve(this.toUint8Array(callbackChunk)); + } + }; + const rejectCallback = () => { + cleanUp(); + reject(); + }; + const abortHandler = () => { + cleanUp(); + reject(ABORT_ERROR); + }; + this._readable.on("readable", readableCallback); + this._readable.once("error", rejectCallback); + this._readable.once("end", rejectCallback); + this._readable.once("close", rejectCallback); + if (options.abortSignal) { + options.abortSignal.addEventListener("abort", abortHandler); + } + /* eslint-enable @typescript-eslint/no-use-before-define */ + }); + } } - return result; } -async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) { - const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML); - if (!shouldDeserializeResponse(parsedResponse)) { - return parsedResponse; - } - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(parsedResponse.request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - if (!operationSpec || !operationSpec.responses) { - return parsedResponse; +exports.AvroReadableFromStream = AvroReadableFromStream; +//# sourceMappingURL=AvroReadableFromStream.js.map + +/***/ }), + +/***/ 64331: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AvroReader = void 0; +// TODO: Do a review of non-interfaces +/* eslint-disable @azure/azure-sdk/ts-use-interface-parameters */ +const AvroConstants_js_1 = __nccwpck_require__(583); +const AvroParser_js_1 = __nccwpck_require__(58119); +const utils_common_js_1 = __nccwpck_require__(32617); +class AvroReader { + _dataStream; + _headerStream; + _syncMarker; + _metadata; + _itemType; + _itemsRemainingInBlock; + // Remembers where we started if partial data stream was provided. + _initialBlockOffset; + /// The byte offset within the Avro file (both header and data) + /// of the start of the current block. + _blockOffset; + get blockOffset() { + return this._blockOffset; } - const responseSpec = getOperationResponseMap(parsedResponse); - const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); - if (error) { - throw error; + _objectIndex; + get objectIndex() { + return this._objectIndex; } - else if (shouldReturnResponse) { - return parsedResponse; + _initialized; + constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) { + this._dataStream = dataStream; + this._headerStream = headerStream || dataStream; + this._initialized = false; + this._blockOffset = currentBlockOffset || 0; + this._objectIndex = indexWithinCurrentBlock || 0; + this._initialBlockOffset = currentBlockOffset || 0; } - // An operation response spec does exist for current status code, so - // use it to deserialize the response. - if (responseSpec) { - if (responseSpec.bodyMapper) { - let valueToDeserialize = parsedResponse.parsedBody; - if (operationSpec.isXML && responseSpec.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { - valueToDeserialize = - typeof valueToDeserialize === "object" - ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName] - : []; - } - try { - parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, "operationRes.parsedBody", options); - } - catch (deserializeError) { - const restError = new core_rest_pipeline_1.RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, { - statusCode: parsedResponse.status, - request: parsedResponse.request, - response: parsedResponse, - }); - throw restError; - } + async initialize(options = {}) { + const header = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_INIT_BYTES.length, { + abortSignal: options.abortSignal, + }); + if (!(0, utils_common_js_1.arraysEqual)(header, AvroConstants_js_1.AVRO_INIT_BYTES)) { + throw new Error("Stream is not an Avro file."); } - else if (operationSpec.httpMethod === "HEAD") { - // head methods never have a body, but we return a boolean to indicate presence/absence of the resource - parsedResponse.parsedBody = response.status >= 200 && response.status < 300; + // File metadata is written as if defined by the following map schema: + // { "type": "map", "values": "bytes"} + this._metadata = await AvroParser_js_1.AvroParser.readMap(this._headerStream, AvroParser_js_1.AvroParser.readString, { + abortSignal: options.abortSignal, + }); + // Validate codec + const codec = this._metadata[AvroConstants_js_1.AVRO_CODEC_KEY]; + if (!(codec === undefined || codec === null || codec === "null")) { + throw new Error("Codecs are not supported"); } - if (responseSpec.headersMapper) { - parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders", { xml: {}, ignoreUnknownProperties: true }); + // The 16-byte, randomly-generated sync marker for this file. + this._syncMarker = await AvroParser_js_1.AvroParser.readFixedBytes(this._headerStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal, + }); + // Parse the schema + const schema = JSON.parse(this._metadata[AvroConstants_js_1.AVRO_SCHEMA_KEY]); + this._itemType = AvroParser_js_1.AvroType.fromSchema(schema); + if (this._blockOffset === 0) { + this._blockOffset = this._initialBlockOffset + this._dataStream.position; } - } - return parsedResponse; -} -function isOperationSpecEmpty(operationSpec) { - const expectedStatusCodes = Object.keys(operationSpec.responses); - return (expectedStatusCodes.length === 0 || - (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === "default")); -} -function handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) { - var _a, _b, _c, _d, _e; - const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300; - const isExpectedStatusCode = isOperationSpecEmpty(operationSpec) - ? isSuccessByStatus - : !!responseSpec; - if (isExpectedStatusCode) { - if (responseSpec) { - if (!responseSpec.isError) { - return { error: null, shouldReturnResponse: false }; + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal, + }); + // skip block length + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); + this._initialized = true; + if (this._objectIndex && this._objectIndex > 0) { + for (let i = 0; i < this._objectIndex; i++) { + await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal }); + this._itemsRemainingInBlock--; } } - else { - return { error: null, shouldReturnResponse: false }; - } } - const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default; - const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) - ? `Unexpected status code: ${parsedResponse.status}` - : parsedResponse.bodyAsText; - const error = new core_rest_pipeline_1.RestError(initialErrorMessage, { - statusCode: parsedResponse.status, - request: parsedResponse.request, - response: parsedResponse, - }); - // If the item failed but there's no error spec or default spec to deserialize the error, - // and the parsed body doesn't look like an error object, - // we should fail so we just throw the parsed response - if (!errorResponseSpec && - !(((_c = (_b = parsedResponse.parsedBody) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.code) && ((_e = (_d = parsedResponse.parsedBody) === null || _d === void 0 ? void 0 : _d.error) === null || _e === void 0 ? void 0 : _e.message))) { - throw error; + hasNext() { + return !this._initialized || this._itemsRemainingInBlock > 0; } - const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper; - const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper; - try { - // If error response has a body, try to deserialize it using default body mapper. - // Then try to extract error code & message from it - if (parsedResponse.parsedBody) { - const parsedBody = parsedResponse.parsedBody; - let deserializedError; - if (defaultBodyMapper) { - let valueToDeserialize = parsedBody; - if (operationSpec.isXML && defaultBodyMapper.type.name === serializer_js_1.MapperTypeNames.Sequence) { - valueToDeserialize = []; - const elementName = defaultBodyMapper.xmlElementName; - if (typeof parsedBody === "object" && elementName) { - valueToDeserialize = parsedBody[elementName]; - } - } - deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options); - } - const internalError = parsedBody.error || deserializedError || parsedBody; - error.code = internalError.code; - if (internalError.message) { - error.message = internalError.message; - } - if (defaultBodyMapper) { - error.response.parsedBody = deserializedError; - } - } - // If error response has headers, try to deserialize it using default header mapper - if (parsedResponse.headers && defaultHeadersMapper) { - error.response.parsedHeaders = - operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); + async *parseObjects(options = {}) { + if (!this._initialized) { + await this.initialize(options); } - } - catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; - } - return { error, shouldReturnResponse: false }; -} -async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) { - var _a; - if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) && - operationResponse.bodyAsText) { - const text = operationResponse.bodyAsText; - const contentType = operationResponse.headers.get("Content-Type") || ""; - const contentComponents = !contentType - ? [] - : contentType.split(";").map((component) => component.toLowerCase()); - try { - if (contentComponents.length === 0 || - contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) { - operationResponse.parsedBody = JSON.parse(text); - return operationResponse; - } - else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) { - if (!parseXML) { - throw new Error("Parsing XML not supported."); + while (this.hasNext()) { + const result = await this._itemType.read(this._dataStream, { + abortSignal: options.abortSignal, + }); + this._itemsRemainingInBlock--; + this._objectIndex++; + if (this._itemsRemainingInBlock === 0) { + const marker = await AvroParser_js_1.AvroParser.readFixedBytes(this._dataStream, AvroConstants_js_1.AVRO_SYNC_MARKER_SIZE, { + abortSignal: options.abortSignal, + }); + this._blockOffset = this._initialBlockOffset + this._dataStream.position; + this._objectIndex = 0; + if (!(0, utils_common_js_1.arraysEqual)(this._syncMarker, marker)) { + throw new Error("Stream is not a valid Avro file."); + } + try { + this._itemsRemainingInBlock = await AvroParser_js_1.AvroParser.readLong(this._dataStream, { + abortSignal: options.abortSignal, + }); + } + catch { + // We hit the end of the stream. + this._itemsRemainingInBlock = 0; + } + if (this._itemsRemainingInBlock > 0) { + // Ignore block size + await AvroParser_js_1.AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }); } - const body = await parseXML(text, opts.xml); - operationResponse.parsedBody = body; - return operationResponse; } - } - catch (err) { - const msg = `Error "${err}" occurred while parsing the response body - ${operationResponse.bodyAsText}.`; - const errCode = err.code || core_rest_pipeline_1.RestError.PARSE_ERROR; - const e = new core_rest_pipeline_1.RestError(msg, { - code: errCode, - statusCode: operationResponse.status, - request: operationResponse.request, - response: operationResponse, - }); - throw e; + yield result; } } - return operationResponse; } -//# sourceMappingURL=deserializationPolicy.js.map +exports.AvroReader = AvroReader; +//# sourceMappingURL=AvroReader.js.map /***/ }), -/***/ 30308: +/***/ 94382: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141671,20 +144053,44 @@ async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -let cachedHttpClient; -function getCachedDefaultHttpClient() { - if (!cachedHttpClient) { - cachedHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); +exports.AvroReadableFromStream = exports.AvroReadable = exports.AvroReader = void 0; +var AvroReader_js_1 = __nccwpck_require__(64331); +Object.defineProperty(exports, "AvroReader", ({ enumerable: true, get: function () { return AvroReader_js_1.AvroReader; } })); +var AvroReadable_js_1 = __nccwpck_require__(15192); +Object.defineProperty(exports, "AvroReadable", ({ enumerable: true, get: function () { return AvroReadable_js_1.AvroReadable; } })); +var AvroReadableFromStream_js_1 = __nccwpck_require__(53027); +Object.defineProperty(exports, "AvroReadableFromStream", ({ enumerable: true, get: function () { return AvroReadableFromStream_js_1.AvroReadableFromStream; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 32617: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.arraysEqual = arraysEqual; +function arraysEqual(a, b) { + if (a === b) + return true; + if (a == null || b == null) + return false; + if (a.length !== b.length) + return false; + for (let i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) + return false; } - return cachedHttpClient; + return true; } -//# sourceMappingURL=httpClientCache.js.map +//# sourceMappingURL=utils.common.js.map /***/ }), -/***/ 7611: +/***/ 53282: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141692,32 +144098,17 @@ function getCachedDefaultHttpClient() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.authorizeRequestOnTenantChallenge = exports.authorizeRequestOnClaimChallenge = exports.serializationPolicyName = exports.serializationPolicy = exports.deserializationPolicyName = exports.deserializationPolicy = exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.createClientPipeline = exports.ServiceClient = exports.MapperTypeNames = exports.createSerializer = void 0; -var serializer_js_1 = __nccwpck_require__(63566); -Object.defineProperty(exports, "createSerializer", ({ enumerable: true, get: function () { return serializer_js_1.createSerializer; } })); -Object.defineProperty(exports, "MapperTypeNames", ({ enumerable: true, get: function () { return serializer_js_1.MapperTypeNames; } })); -var serviceClient_js_1 = __nccwpck_require__(28927); -Object.defineProperty(exports, "ServiceClient", ({ enumerable: true, get: function () { return serviceClient_js_1.ServiceClient; } })); -var pipeline_js_1 = __nccwpck_require__(33924); -Object.defineProperty(exports, "createClientPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createClientPipeline; } })); -var interfaces_js_1 = __nccwpck_require__(8153); -Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_ATTRKEY; } })); -Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return interfaces_js_1.XML_CHARKEY; } })); -var deserializationPolicy_js_1 = __nccwpck_require__(25315); -Object.defineProperty(exports, "deserializationPolicy", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicy; } })); -Object.defineProperty(exports, "deserializationPolicyName", ({ enumerable: true, get: function () { return deserializationPolicy_js_1.deserializationPolicyName; } })); -var serializationPolicy_js_1 = __nccwpck_require__(96625); -Object.defineProperty(exports, "serializationPolicy", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicy; } })); -Object.defineProperty(exports, "serializationPolicyName", ({ enumerable: true, get: function () { return serializationPolicy_js_1.serializationPolicyName; } })); -var authorizeRequestOnClaimChallenge_js_1 = __nccwpck_require__(94873); -Object.defineProperty(exports, "authorizeRequestOnClaimChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnClaimChallenge_js_1.authorizeRequestOnClaimChallenge; } })); -var authorizeRequestOnTenantChallenge_js_1 = __nccwpck_require__(16576); -Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerable: true, get: function () { return authorizeRequestOnTenantChallenge_js_1.authorizeRequestOnTenantChallenge; } })); -//# sourceMappingURL=index.js.map +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); +/** + * The `@azure/logger` configuration for this package. + */ +exports.logger = (0, logger_1.createClientLogger)("storage-blob"); +//# sourceMappingURL=log.js.map /***/ }), -/***/ 41459: +/***/ 64526: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141725,70 +144116,158 @@ Object.defineProperty(exports, "authorizeRequestOnTenantChallenge", ({ enumerabl // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getStreamingResponseStatusCodes = getStreamingResponseStatusCodes; -exports.getPathStringFromParameter = getPathStringFromParameter; -const serializer_js_1 = __nccwpck_require__(63566); +exports.StorageBlobAudience = exports.PremiumPageBlobTier = exports.BlockBlobTier = void 0; +exports.toAccessTier = toAccessTier; +exports.ensureCpkIfSpecified = ensureCpkIfSpecified; +exports.getBlobServiceAccountAudience = getBlobServiceAccountAudience; +const constants_js_1 = __nccwpck_require__(81865); /** - * Gets the list of status codes for streaming responses. - * @internal + * Represents the access tier on a blob. + * For detailed information about block blob level tiering see {@link https://learn.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.} */ -function getStreamingResponseStatusCodes(operationSpec) { - const result = new Set(); - for (const statusCode in operationSpec.responses) { - const operationResponse = operationSpec.responses[statusCode]; - if (operationResponse.bodyMapper && - operationResponse.bodyMapper.type.name === serializer_js_1.MapperTypeNames.Stream) { - result.add(Number(statusCode)); - } - } - return result; -} +var BlockBlobTier; +(function (BlockBlobTier) { + /** + * Optimized for storing data that is accessed frequently. + */ + BlockBlobTier["Hot"] = "Hot"; + /** + * Optimized for storing data that is infrequently accessed and stored for at least 30 days. + */ + BlockBlobTier["Cool"] = "Cool"; + /** + * Optimized for storing data that is rarely accessed. + */ + BlockBlobTier["Cold"] = "Cold"; + /** + * Optimized for storing data that is rarely accessed and stored for at least 180 days + * with flexible latency requirements (on the order of hours). + */ + BlockBlobTier["Archive"] = "Archive"; +})(BlockBlobTier || (exports.BlockBlobTier = BlockBlobTier = {})); /** - * Get the path to this parameter's value as a dotted string (a.b.c). - * @param parameter - The parameter to get the path string for. - * @returns The path to this parameter's value as a dotted string. - * @internal + * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts. + * Please see {@link https://learn.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here} + * for detailed information on the corresponding IOPS and throughput per PageBlobTier. */ -function getPathStringFromParameter(parameter) { - const { parameterPath, mapper } = parameter; - let result; - if (typeof parameterPath === "string") { - result = parameterPath; +var PremiumPageBlobTier; +(function (PremiumPageBlobTier) { + /** + * P4 Tier. + */ + PremiumPageBlobTier["P4"] = "P4"; + /** + * P6 Tier. + */ + PremiumPageBlobTier["P6"] = "P6"; + /** + * P10 Tier. + */ + PremiumPageBlobTier["P10"] = "P10"; + /** + * P15 Tier. + */ + PremiumPageBlobTier["P15"] = "P15"; + /** + * P20 Tier. + */ + PremiumPageBlobTier["P20"] = "P20"; + /** + * P30 Tier. + */ + PremiumPageBlobTier["P30"] = "P30"; + /** + * P40 Tier. + */ + PremiumPageBlobTier["P40"] = "P40"; + /** + * P50 Tier. + */ + PremiumPageBlobTier["P50"] = "P50"; + /** + * P60 Tier. + */ + PremiumPageBlobTier["P60"] = "P60"; + /** + * P70 Tier. + */ + PremiumPageBlobTier["P70"] = "P70"; + /** + * P80 Tier. + */ + PremiumPageBlobTier["P80"] = "P80"; +})(PremiumPageBlobTier || (exports.PremiumPageBlobTier = PremiumPageBlobTier = {})); +function toAccessTier(tier) { + if (tier === undefined) { + return undefined; } - else if (Array.isArray(parameterPath)) { - result = parameterPath.join("."); + return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service). +} +function ensureCpkIfSpecified(cpk, isHttps) { + if (cpk && !isHttps) { + throw new RangeError("Customer-provided encryption key must be used over HTTPS."); } - else { - result = mapper.serializedName; + if (cpk && !cpk.encryptionAlgorithm) { + cpk.encryptionAlgorithm = constants_js_1.EncryptionAlgorithmAES25; } - return result; } -//# sourceMappingURL=interfaceHelpers.js.map +/** + * Defines the known cloud audiences for Storage. + */ +var StorageBlobAudience; +(function (StorageBlobAudience) { + /** + * The OAuth scope to use to retrieve an AAD token for Azure Storage. + */ + StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default"; + /** + * The OAuth scope to use to retrieve an AAD token for Azure Disk. + */ + StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default"; +})(StorageBlobAudience || (exports.StorageBlobAudience = StorageBlobAudience = {})); +/** + * + * To get OAuth audience for a storage account for blob service. + */ +function getBlobServiceAccountAudience(storageAccountName) { + return `https://${storageAccountName}.blob.core.windows.net/.default`; +} +//# sourceMappingURL=models.js.map /***/ }), -/***/ 8153: -/***/ ((__unused_webpack_module, exports) => { +/***/ 51870: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; -/** - * Default key used to access the XML attributes. - */ -exports.XML_ATTRKEY = "$"; +exports.AnonymousCredentialPolicy = void 0; +const CredentialPolicy_js_1 = __nccwpck_require__(15513); /** - * Default key used to access the XML value content. + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). */ -exports.XML_CHARKEY = "_"; -//# sourceMappingURL=interfaces.js.map +class AnonymousCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } +} +exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; +//# sourceMappingURL=AnonymousCredentialPolicy.js.map /***/ }), -/***/ 53776: +/***/ 15513: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141796,119 +144275,150 @@ exports.XML_CHARKEY = "_"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logger = void 0; -const logger_1 = __nccwpck_require__(89497); -exports.logger = (0, logger_1.createClientLogger)("core-client"); -//# sourceMappingURL=log.js.map +exports.CredentialPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(33847); +/** + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. + */ +class CredentialPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + // Child classes must override this method with request signing. This method + // will be executed in sendRequest(). + return request; + } +} +exports.CredentialPolicy = CredentialPolicy; +//# sourceMappingURL=CredentialPolicy.js.map /***/ }), -/***/ 62074: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 33847: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOperationArgumentValueFromParameter = getOperationArgumentValueFromParameter; -exports.getOperationRequestInfo = getOperationRequestInfo; -const state_js_1 = __nccwpck_require__(35429); +exports.BaseRequestPolicy = void 0; /** - * @internal - * Retrieves the value to use for a given operation argument - * @param operationArguments - The arguments passed from the generated client - * @param parameter - The parameter description - * @param fallbackObject - If something isn't found in the arguments bag, look here. - * Generally used to look at the service client properties. + * The base class from which all request policies derive. */ -function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) { - let parameterPath = parameter.parameterPath; - const parameterMapper = parameter.mapper; - let value; - if (typeof parameterPath === "string") { - parameterPath = [parameterPath]; +class BaseRequestPolicy { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor( + /** + * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline. + */ + _nextPolicy, + /** + * The options that can be passed to a given request policy. + */ + _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; } - if (Array.isArray(parameterPath)) { - if (parameterPath.length > 0) { - if (parameterMapper.isConstant) { - value = parameterMapper.defaultValue; - } - else { - let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath); - if (!propertySearchResult.propertyFound && fallbackObject) { - propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath); - } - let useDefaultValue = false; - if (!propertySearchResult.propertyFound) { - useDefaultValue = - parameterMapper.required || - (parameterPath[0] === "options" && parameterPath.length === 2); - } - value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue; - } - } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); } - else { - if (parameterMapper.required) { - value = {}; - } - for (const propertyName in parameterPath) { - const propertyMapper = parameterMapper.type.modelProperties[propertyName]; - const propertyPath = parameterPath[propertyName]; - const propertyValue = getOperationArgumentValueFromParameter(operationArguments, { - parameterPath: propertyPath, - mapper: propertyMapper, - }, fallbackObject); - if (propertyValue !== undefined) { - if (!value) { - value = {}; - } - value[propertyName] = propertyValue; - } - } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); } - return value; } -function getPropertyFromParameterPath(parent, parameterPath) { - const result = { propertyFound: false }; - let i = 0; - for (; i < parameterPath.length; ++i) { - const parameterPathPart = parameterPath[i]; - // Make sure to check inherited properties too, so don't use hasOwnProperty(). - if (parent && parameterPathPart in parent) { - parent = parent[parameterPathPart]; +exports.BaseRequestPolicy = BaseRequestPolicy; +//# sourceMappingURL=RequestPolicy.js.map + +/***/ }), + +/***/ 6602: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageBrowserPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(33847); +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +/** + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning + */ +class StorageBrowserPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); } - else { - break; + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); } - if (i === parameterPath.length) { - result.propertyValue = parent; - result.propertyFound = true; - } - return result; -} -const originalRequestSymbol = Symbol.for("@azure/core-client original request"); -function hasOriginalRequest(request) { - return originalRequestSymbol in request; -} -function getOperationRequestInfo(request) { - if (hasOriginalRequest(request)) { - return getOperationRequestInfo(request[originalRequestSymbol]); - } - let info = state_js_1.state.operationRequestMap.get(request); - if (!info) { - info = {}; - state_js_1.state.operationRequestMap.set(request, info); - } - return info; } -//# sourceMappingURL=operationHelpers.js.map +exports.StorageBrowserPolicy = StorageBrowserPolicy; +//# sourceMappingURL=StorageBrowserPolicy.js.map /***/ }), -/***/ 33924: +/***/ 29090: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141916,35 +144426,41 @@ function getOperationRequestInfo(request) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createClientPipeline = createClientPipeline; -const deserializationPolicy_js_1 = __nccwpck_require__(25315); -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const serializationPolicy_js_1 = __nccwpck_require__(96625); +exports.storageBrowserPolicyName = void 0; +exports.storageBrowserPolicy = storageBrowserPolicy; +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * Creates a new Pipeline for use with a Service Client. - * Adds in deserializationPolicy by default. - * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential. - * @param options - Options to customize the created pipeline. + * The programmatic identifier of the StorageBrowserPolicy. */ -function createClientPipeline(options = {}) { - const pipeline = (0, core_rest_pipeline_1.createPipelineFromOptions)(options !== null && options !== void 0 ? options : {}); - if (options.credentialOptions) { - pipeline.addPolicy((0, core_rest_pipeline_1.bearerTokenAuthenticationPolicy)({ - credential: options.credentialOptions.credential, - scopes: options.credentialOptions.credentialScopes, - })); - } - pipeline.addPolicy((0, serializationPolicy_js_1.serializationPolicy)(options.serializationOptions), { phase: "Serialize" }); - pipeline.addPolicy((0, deserializationPolicy_js_1.deserializationPolicy)(options.deserializationOptions), { - phase: "Deserialize", - }); - return pipeline; +exports.storageBrowserPolicyName = "storageBrowserPolicy"; +/** + * storageBrowserPolicy is a policy used to prevent browsers from caching requests + * and to remove cookies and explicit content-length headers. + */ +function storageBrowserPolicy() { + return { + name: exports.storageBrowserPolicyName, + async sendRequest(request, next) { + if (core_util_1.isNodeLike) { + return next(request); + } + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); + }, + }; } -//# sourceMappingURL=pipeline.js.map +//# sourceMappingURL=StorageBrowserPolicyV2.js.map /***/ }), -/***/ 96625: +/***/ 73623: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -141952,165 +144468,37 @@ function createClientPipeline(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serializationPolicyName = void 0; -exports.serializationPolicy = serializationPolicy; -exports.serializeHeaders = serializeHeaders; -exports.serializeRequestBody = serializeRequestBody; -const interfaces_js_1 = __nccwpck_require__(8153); -const operationHelpers_js_1 = __nccwpck_require__(62074); -const serializer_js_1 = __nccwpck_require__(63566); -const interfaceHelpers_js_1 = __nccwpck_require__(41459); +exports.storageCorrectContentLengthPolicyName = void 0; +exports.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; +const constants_js_1 = __nccwpck_require__(81865); /** - * The programmatic identifier of the serializationPolicy. + * The programmatic identifier of the storageCorrectContentLengthPolicy. */ -exports.serializationPolicyName = "serializationPolicy"; +exports.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; /** - * This policy handles assembling the request body and headers using - * an OperationSpec and OperationArguments on the request. + * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. */ -function serializationPolicy(options = {}) { - const stringifyXML = options.stringifyXML; +function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } return { - name: exports.serializationPolicyName, + name: exports.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec; - const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments; - if (operationSpec && operationArguments) { - serializeHeaders(request, operationArguments, operationSpec); - serializeRequestBody(request, operationArguments, operationSpec, stringifyXML); - } + correctContentLength(request); return next(request); }, }; } -/** - * @internal - */ -function serializeHeaders(request, operationArguments, operationSpec) { - var _a, _b; - if (operationSpec.headerParameters) { - for (const headerParameter of operationSpec.headerParameters) { - let headerValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, headerParameter); - if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) { - headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter)); - const headerCollectionPrefix = headerParameter.mapper - .headerCollectionPrefix; - if (headerCollectionPrefix) { - for (const key of Object.keys(headerValue)) { - request.headers.set(headerCollectionPrefix + key, headerValue[key]); - } - } - else { - request.headers.set(headerParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(headerParameter), headerValue); - } - } - } - } - const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders; - if (customHeaders) { - for (const customHeaderName of Object.keys(customHeaders)) { - request.headers.set(customHeaderName, customHeaders[customHeaderName]); - } - } -} -/** - * @internal - */ -function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () { - throw new Error("XML serialization unsupported!"); -}) { - var _a, _b, _c, _d, _e; - const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions; - const updatedOptions = { - xml: { - rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : "", - includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false, - xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : interfaces_js_1.XML_CHARKEY, - }, - }; - const xmlCharKey = updatedOptions.xml.xmlCharKey; - if (operationSpec.requestBody && operationSpec.requestBody.mapper) { - request.body = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, operationSpec.requestBody); - const bodyMapper = operationSpec.requestBody.mapper; - const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable, } = bodyMapper; - const typeName = bodyMapper.type.name; - try { - if ((request.body !== undefined && request.body !== null) || - (nullable && request.body === null) || - required) { - const requestBodyParameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(operationSpec.requestBody); - request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions); - const isStream = typeName === serializer_js_1.MapperTypeNames.Stream; - if (operationSpec.isXML) { - const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : "xmlns"; - const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions); - if (typeName === serializer_js_1.MapperTypeNames.Sequence) { - request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey }); - } - else if (!isStream) { - request.body = stringifyXML(value, { - rootName: xmlName || serializedName, - xmlCharKey, - }); - } - } - else if (typeName === serializer_js_1.MapperTypeNames.String && - (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match("text/plain")) || operationSpec.mediaType === "text")) { - // the String serializer has validated that request body is a string - // so just send the string. - return; - } - else if (!isStream) { - request.body = JSON.stringify(request.body); - } - } - } - catch (error) { - throw new Error(`Error "${error.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, " ")}.`); - } - } - else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { - request.formData = {}; - for (const formDataParameter of operationSpec.formDataParameters) { - const formDataParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, formDataParameter); - if (formDataParameterValue !== undefined && formDataParameterValue !== null) { - const formDataParameterPropertyName = formDataParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter); - request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(formDataParameter), updatedOptions); - } - } - } -} -/** - * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself - */ -function getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) { - // Composite and Sequence schemas already got their root namespace set during serialization - // We just need to add xmlns to the other schema types - if (xmlNamespace && !["Composite", "Sequence", "Dictionary"].includes(typeName)) { - const result = {}; - result[options.xml.xmlCharKey] = serializedValue; - result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace }; - return result; - } - return serializedValue; -} -function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { - if (!Array.isArray(obj)) { - obj = [obj]; - } - if (!xmlNamespaceKey || !xmlNamespace) { - return { [elementName]: obj }; - } - const result = { [elementName]: obj }; - result[interfaces_js_1.XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace }; - return result; -} -//# sourceMappingURL=serializationPolicy.js.map +//# sourceMappingURL=StorageCorrectContentLengthPolicy.js.map /***/ }), -/***/ 63566: +/***/ 34419: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -142118,4331 +144506,5125 @@ function prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MapperTypeNames = void 0; -exports.createSerializer = createSerializer; -const tslib_1 = __nccwpck_require__(4351); -const base64 = tslib_1.__importStar(__nccwpck_require__(23442)); -const interfaces_js_1 = __nccwpck_require__(8153); -const utils_js_1 = __nccwpck_require__(25363); -class SerializerImpl { - constructor(modelMappers = {}, isXML = false) { - this.modelMappers = modelMappers; - this.isXML = isXML; - } +exports.StorageRetryPolicy = void 0; +exports.NewRetryPolicyFactory = NewRetryPolicyFactory; +const abort_controller_1 = __nccwpck_require__(1753); +const RequestPolicy_js_1 = __nccwpck_require__(33847); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const log_js_1 = __nccwpck_require__(53282); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(51772); +/** + * A factory method used to generated a RetryPolicy factory. + * + * @param retryOptions - + */ +function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + }, + }; +} +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy +}; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); +/** + * Retry policy with exponential retry and linear retry implemented. + */ +class StorageRetryPolicy extends RequestPolicy_js_1.BaseRequestPolicy { /** - * @deprecated Removing the constraints validation on client side. + * RetryOptions. */ - validateConstraints(mapper, value, objectName) { - const failValidation = (constraintName, constraintValue) => { - throw new Error(`"${objectName}" with value "${value}" should satisfy the constraint "${constraintName}": ${constraintValue}.`); - }; - if (mapper.constraints && value !== undefined && value !== null) { - const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints; - if (ExclusiveMaximum !== undefined && value >= ExclusiveMaximum) { - failValidation("ExclusiveMaximum", ExclusiveMaximum); - } - if (ExclusiveMinimum !== undefined && value <= ExclusiveMinimum) { - failValidation("ExclusiveMinimum", ExclusiveMinimum); - } - if (InclusiveMaximum !== undefined && value > InclusiveMaximum) { - failValidation("InclusiveMaximum", InclusiveMaximum); - } - if (InclusiveMinimum !== undefined && value < InclusiveMinimum) { - failValidation("InclusiveMinimum", InclusiveMinimum); - } - if (MaxItems !== undefined && value.length > MaxItems) { - failValidation("MaxItems", MaxItems); - } - if (MaxLength !== undefined && value.length > MaxLength) { - failValidation("MaxLength", MaxLength); - } - if (MinItems !== undefined && value.length < MinItems) { - failValidation("MinItems", MinItems); - } - if (MinLength !== undefined && value.length < MinLength) { - failValidation("MinLength", MinLength); - } - if (MultipleOf !== undefined && value % MultipleOf !== 0) { - failValidation("MultipleOf", MultipleOf); - } - if (Pattern) { - const pattern = typeof Pattern === "string" ? new RegExp(Pattern) : Pattern; - if (typeof value !== "string" || value.match(pattern) === null) { - failValidation("Pattern", Pattern); - } - } - if (UniqueItems && - value.some((item, i, ar) => ar.indexOf(item) !== i)) { - failValidation("UniqueItems", UniqueItems); - } - } - } + retryOptions; /** - * Serialize the given object based on its metadata defined in the mapper - * - * @param mapper - The mapper which defines the metadata of the serializable object - * - * @param object - A valid Javascript object to be serialized - * - * @param objectName - Name of the serialized object - * - * @param options - additional options to serialization + * Creates an instance of RetryPolicy. * - * @returns A valid serialized Javascript object + * @param nextPolicy - + * @param options - + * @param retryOptions - */ - serialize(mapper, object, objectName, options = { xml: {} }) { - var _a, _b, _c; - const updatedOptions = { - xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, - }, + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + // Initialize retry options + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType + ? retryOptions.retryPolicyType + : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 + ? Math.floor(retryOptions.maxTries) + : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 + ? retryOptions.tryTimeoutInMs + : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 + ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) + : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost + ? retryOptions.secondaryHost + : DEFAULT_RETRY_OPTIONS.secondaryHost, }; - let payload = {}; - const mapperType = mapper.type.name; - if (!objectName) { - objectName = mapper.serializedName; - } - if (mapperType.match(/^Sequence$/i) !== null) { - payload = []; - } - if (mapper.isConstant) { - object = mapper.defaultValue; - } - // This table of allowed values should help explain - // the mapper.required and mapper.nullable properties. - // X means "neither undefined or null are allowed". - // || required - // || true | false - // nullable || ========================== - // true || null | undefined/null - // false || X | undefined - // undefined || X | undefined/null - const { required, nullable } = mapper; - if (required && nullable && object === undefined) { - throw new Error(`${objectName} cannot be undefined.`); - } - if (required && !nullable && (object === undefined || object === null)) { - throw new Error(`${objectName} cannot be null or undefined.`); - } - if (!required && nullable === false && object === null) { - throw new Error(`${objectName} cannot be null.`); - } - if (object === undefined || object === null) { - payload = object; - } - else { - if (mapperType.match(/^any$/i) !== null) { - payload = object; - } - else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) { - payload = serializeBasicTypes(mapperType, objectName, object); - } - else if (mapperType.match(/^Enum$/i) !== null) { - const enumMapper = mapper; - payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object); - } - else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) { - payload = serializeDateTypes(mapperType, object, objectName); - } - else if (mapperType.match(/^ByteArray$/i) !== null) { - payload = serializeByteArrayType(objectName, object); - } - else if (mapperType.match(/^Base64Url$/i) !== null) { - payload = serializeBase64UrlType(objectName, object); - } - else if (mapperType.match(/^Sequence$/i) !== null) { - payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } - else if (mapperType.match(/^Dictionary$/i) !== null) { - payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } - else if (mapperType.match(/^Composite$/i) !== null) { - payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions); - } - } - return payload; } /** - * Deserialize the given object based on its metadata defined in the mapper - * - * @param mapper - The mapper which defines the metadata of the serializable object - * - * @param responseBody - A valid Javascript entity to be deserialized - * - * @param objectName - Name of the deserialized object - * - * @param options - Controls behavior of XML parser and builder. + * Sends request. * - * @returns A valid deserialized Javascript object + * @param request - */ - deserialize(mapper, responseBody, objectName, options = { xml: {} }) { - var _a, _b, _c, _d; - const updatedOptions = { - xml: { - rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : "", - includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false, - xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : interfaces_js_1.XML_CHARKEY, - }, - ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false, - }; - if (responseBody === undefined || responseBody === null) { - if (this.isXML && mapper.type.name === "Sequence" && !mapper.xmlIsWrapped) { - // Edge case for empty XML non-wrapped lists. xml2js can't distinguish - // between the list being empty versus being missing, - // so let's do the more user-friendly thing and return an empty list. - responseBody = []; - } - // specifically check for undefined as default value can be a falsey value `0, "", false, null` - if (mapper.defaultValue !== undefined) { - responseBody = mapper.defaultValue; - } - return responseBody; - } - let payload; - const mapperType = mapper.type.name; - if (!objectName) { - objectName = mapper.serializedName; - } - if (mapperType.match(/^Composite$/i) !== null) { - payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions); - } - else { - if (this.isXML) { - const xmlCharKey = updatedOptions.xml.xmlCharKey; - /** - * If the mapper specifies this as a non-composite type value but the responseBody contains - * both header ("$" i.e., XML_ATTRKEY) and body ("#" i.e., XML_CHARKEY) properties, - * then just reduce the responseBody value to the body ("#" i.e., XML_CHARKEY) property. - */ - if (responseBody[interfaces_js_1.XML_ATTRKEY] !== undefined && responseBody[xmlCharKey] !== undefined) { - responseBody = responseBody[xmlCharKey]; - } - } - if (mapperType.match(/^Number$/i) !== null) { - payload = parseFloat(responseBody); - if (isNaN(payload)) { - payload = responseBody; - } - } - else if (mapperType.match(/^Boolean$/i) !== null) { - if (responseBody === "true") { - payload = true; - } - else if (responseBody === "false") { - payload = false; - } - else { - payload = responseBody; - } - } - else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) { - payload = responseBody; - } - else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) { - payload = new Date(responseBody); - } - else if (mapperType.match(/^UnixTime$/i) !== null) { - payload = unixTimeToDate(responseBody); - } - else if (mapperType.match(/^ByteArray$/i) !== null) { - payload = base64.decodeString(responseBody); - } - else if (mapperType.match(/^Base64Url$/i) !== null) { - payload = base64UrlToByteArray(responseBody); - } - else if (mapperType.match(/^Sequence$/i) !== null) { - payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions); - } - else if (mapperType.match(/^Dictionary$/i) !== null) { - payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions); - } - } - if (mapper.isConstant) { - payload = mapper.defaultValue; - } - return payload; - } -} -/** - * Method that creates and returns a Serializer. - * @param modelMappers - Known models to map - * @param isXML - If XML should be supported - */ -function createSerializer(modelMappers = {}, isXML = false) { - return new SerializerImpl(modelMappers, isXML); -} -function trimEnd(str, ch) { - let len = str.length; - while (len - 1 >= 0 && str[len - 1] === ch) { - --len; - } - return str.substr(0, len); -} -function bufferToBase64Url(buffer) { - if (!buffer) { - return undefined; - } - if (!(buffer instanceof Uint8Array)) { - throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`); - } - // Uint8Array to Base64. - const str = base64.encodeByteArray(buffer); - // Base64 to Base64Url. - return trimEnd(str, "=").replace(/\+/g, "-").replace(/\//g, "_"); -} -function base64UrlToByteArray(str) { - if (!str) { - return undefined; - } - if (str && typeof str.valueOf() !== "string") { - throw new Error("Please provide an input of type string for converting to Uint8Array"); - } - // Base64Url to Base64. - str = str.replace(/-/g, "+").replace(/_/g, "/"); - // Base64 to Uint8Array. - return base64.decodeString(str); -} -function splitSerializeName(prop) { - const classes = []; - let partialclass = ""; - if (prop) { - const subwords = prop.split("."); - for (const item of subwords) { - if (item.charAt(item.length - 1) === "\\") { - partialclass += item.substr(0, item.length - 1) + "."; - } - else { - partialclass += item; - classes.push(partialclass); - partialclass = ""; - } - } - } - return classes; -} -function dateToUnixTime(d) { - if (!d) { - return undefined; - } - if (typeof d.valueOf() === "string") { - d = new Date(d); - } - return Math.floor(d.getTime() / 1000); -} -function unixTimeToDate(n) { - if (!n) { - return undefined; + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); } - return new Date(n * 1000); -} -function serializeBasicTypes(typeName, objectName, value) { - if (value !== null && value !== undefined) { - if (typeName.match(/^Number$/i) !== null) { - if (typeof value !== "number") { - throw new Error(`${objectName} with value ${value} must be of type number.`); - } - } - else if (typeName.match(/^String$/i) !== null) { - if (typeof value.valueOf() !== "string") { - throw new Error(`${objectName} with value "${value}" must be of type string.`); - } + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || + !this.retryOptions.secondaryHost || + !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || + attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); } - else if (typeName.match(/^Uuid$/i) !== null) { - if (!(typeof value.valueOf() === "string" && (0, utils_js_1.isValidUuid)(value))) { - throw new Error(`${objectName} with value "${value}" must be of type string and a valid uuid.`); - } + // Set the server-side timeout query parameter "timeout=[seconds]" + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); } - else if (typeName.match(/^Boolean$/i) !== null) { - if (typeof value !== "boolean") { - throw new Error(`${objectName} with value ${value} must be of type boolean.`); + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; } + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); } - else if (typeName.match(/^Stream$/i) !== null) { - const objectType = typeof value; - if (objectType !== "string" && - typeof value.pipe !== "function" && // NodeJS.ReadableStream - typeof value.tee !== "function" && // browser ReadableStream - !(value instanceof ArrayBuffer) && - !ArrayBuffer.isView(value) && - // File objects count as a type of Blob, so we want to use instanceof explicitly - !((typeof Blob === "function" || typeof Blob === "object") && value instanceof Blob) && - objectType !== "function") { - throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`); + catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; } } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); } - return value; -} -function serializeEnumType(objectName, allowedValues, value) { - if (!allowedValues) { - throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`); - } - const isPresent = allowedValues.some((item) => { - if (typeof item.valueOf() === "string") { - return item.toLowerCase() === value.toLowerCase(); - } - return item === value; - }); - if (!isPresent) { - throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`); - } - return value; -} -function serializeByteArrayType(objectName, value) { - if (value !== undefined && value !== null) { - if (!(value instanceof Uint8Array)) { - throw new Error(`${objectName} must be of type Uint8Array.`); - } - value = base64.encodeByteArray(value); - } - return value; -} -function serializeBase64UrlType(objectName, value) { - if (value !== undefined && value !== null) { - if (!(value instanceof Uint8Array)) { - throw new Error(`${objectName} must be of type Uint8Array.`); + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions + .maxTries}, no further try.`); + return false; } - value = bufferToBase64Url(value); - } - return value; -} -function serializeDateTypes(typeName, value, objectName) { - if (value !== undefined && value !== null) { - if (typeName.match(/^Date$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + // Handle network failures, you may need to customize the list when you implement + // your own http client + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || + err.message.toUpperCase().includes(retriableError) || + (err.code && err.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } } - value = - value instanceof Date - ? value.toISOString().substring(0, 10) - : new Date(value).toISOString().substring(0, 10); } - else if (typeName.match(/^DateTime$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`); + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; } - value = value instanceof Date ? value.toISOString() : new Date(value).toISOString(); - } - else if (typeName.match(/^DateTimeRfc1123$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`); + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; } - value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString(); } - else if (typeName.match(/^UnixTime$/i) !== null) { - if (!(value instanceof Date || - (typeof value.valueOf() === "string" && !isNaN(Date.parse(value))))) { - throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` + - `for it to be serialized in UnixTime/Epoch format.`); + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } } - value = dateToUnixTime(value); } - else if (typeName.match(/^TimeSpan$/i) !== null) { - if (!(0, utils_js_1.isDuration)(value)) { - throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was "${value}".`); - } + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; } + return false; } - return value; -} -function serializeSequenceType(serializer, mapper, object, objectName, isXml, options) { - var _a; - if (!Array.isArray(object)) { - throw new Error(`${objectName} must be of type Array.`); - } - let elementType = mapper.type.element; - if (!elementType || typeof elementType !== "object") { - throw new Error(`element" metadata for an Array must be defined in the ` + - `mapper and it must of type "object" in ${objectName}.`); - } - // Quirk: Composite mappers referenced by `element` might - // not have *all* properties declared (like uberParent), - // so let's try to look up the full definition by name. - if (elementType.type.name === "Composite" && elementType.type.className) { - elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType; - } - const tempArray = []; - for (let i = 0; i < object.length; i++) { - const serializedValue = serializer.serialize(elementType, object[i], objectName, options); - if (isXml && elementType.xmlNamespace) { - const xmlnsKey = elementType.xmlNamespacePrefix - ? `xmlns:${elementType.xmlNamespacePrefix}` - : "xmlns"; - if (elementType.type.name === "Composite") { - tempArray[i] = Object.assign({}, serializedValue); - tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; - } - else { - tempArray[i] = {}; - tempArray[i][options.xml.xmlCharKey] = serializedValue; - tempArray[i][interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace }; + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; } } else { - tempArray[i] = serializedValue; + delayTimeInMs = Math.random() * 1000; } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } - return tempArray; -} -function serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) { - if (typeof object !== "object") { - throw new Error(`${objectName} must be of type object.`); - } - const valueType = mapper.type.value; - if (!valueType || typeof valueType !== "object") { - throw new Error(`"value" metadata for a Dictionary must be defined in the ` + - `mapper and it must of type "object" in ${objectName}.`); - } - const tempDictionary = {}; - for (const key of Object.keys(object)) { - const serializedValue = serializer.serialize(valueType, object[key], objectName, options); - // If the element needs an XML namespace we need to add it within the $ property - tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options); - } - // Add the namespace to the root element if needed - if (isXml && mapper.xmlNamespace) { - const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : "xmlns"; - const result = tempDictionary; - result[interfaces_js_1.XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace }; - return result; - } - return tempDictionary; } +exports.StorageRetryPolicy = StorageRetryPolicy; +//# sourceMappingURL=StorageRetryPolicy.js.map + +/***/ }), + +/***/ 51772: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageRetryPolicyType = void 0; /** - * Resolves the additionalProperties property from a referenced mapper - * @param serializer - the serializer containing the entire set of mappers - * @param mapper - the composite mapper to resolve - * @param objectName - name of the object being serialized + * RetryPolicy types. */ -function resolveAdditionalProperties(serializer, mapper, objectName) { - const additionalProperties = mapper.type.additionalProperties; - if (!additionalProperties && mapper.type.className) { - const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties; - } - return additionalProperties; -} +var StorageRetryPolicyType; +(function (StorageRetryPolicyType) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; +})(StorageRetryPolicyType || (exports.StorageRetryPolicyType = StorageRetryPolicyType = {})); +//# sourceMappingURL=StorageRetryPolicyType.js.map + +/***/ }), + +/***/ 68031: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.storageRetryPolicyName = void 0; +exports.storageRetryPolicy = storageRetryPolicy; +const abort_controller_1 = __nccwpck_require__(1753); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(98637); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const log_js_1 = __nccwpck_require__(53282); /** - * Finds the mapper referenced by className - * @param serializer - the serializer containing the entire set of mappers - * @param mapper - the composite mapper to resolve - * @param objectName - name of the object being serialized + * Name of the {@link storageRetryPolicy} */ -function resolveReferencedMapper(serializer, mapper, objectName) { - const className = mapper.type.className; - if (!className) { - throw new Error(`Class name for model "${objectName}" is not provided in the mapper "${JSON.stringify(mapper, undefined, 2)}".`); - } - return serializer.modelMappers[className]; -} +exports.storageRetryPolicyName = "storageRetryPolicy"; +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy +}; +const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", +]; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); /** - * Resolves a composite mapper's modelProperties. - * @param serializer - the serializer containing the entire set of mappers - * @param mapper - the composite mapper to resolve + * Retry policy with exponential retry and linear retry implemented. */ -function resolveModelProperties(serializer, mapper, objectName) { - let modelProps = mapper.type.modelProperties; - if (!modelProps) { - const modelMapper = resolveReferencedMapper(serializer, mapper, objectName); - if (!modelMapper) { - throw new Error(`mapper() cannot be null or undefined for model "${mapper.type.className}".`); - } - modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties; - if (!modelProps) { - throw new Error(`modelProperties cannot be null or undefined in the ` + - `mapper "${JSON.stringify(modelMapper)}" of type "${mapper.type.className}" for object "${objectName}".`); - } - } - return modelProps; -} -function serializeCompositeType(serializer, mapper, object, objectName, isXml, options) { - if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { - mapper = getPolymorphicMapper(serializer, mapper, object, "clientName"); - } - if (object !== undefined && object !== null) { - const payload = {}; - const modelProps = resolveModelProperties(serializer, mapper, objectName); - for (const key of Object.keys(modelProps)) { - const propertyMapper = modelProps[key]; - if (propertyMapper.readOnly) { - continue; - } - let propName; - let parentObject = payload; - if (serializer.isXML) { - if (propertyMapper.xmlIsWrapped) { - propName = propertyMapper.xmlName; - } - else { - propName = propertyMapper.xmlElementName || propertyMapper.xmlName; - } - } - else { - const paths = splitSerializeName(propertyMapper.serializedName); - propName = paths.pop(); - for (const pathName of paths) { - const childObject = parentObject[pathName]; - if ((childObject === undefined || childObject === null) && - ((object[key] !== undefined && object[key] !== null) || - propertyMapper.defaultValue !== undefined)) { - parentObject[pathName] = {}; - } - parentObject = parentObject[pathName]; - } - } - if (parentObject !== undefined && parentObject !== null) { - if (isXml && mapper.xmlNamespace) { - const xmlnsKey = mapper.xmlNamespacePrefix - ? `xmlns:${mapper.xmlNamespacePrefix}` - : "xmlns"; - parentObject[interfaces_js_1.XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[interfaces_js_1.XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace }); - } - const propertyObjectName = propertyMapper.serializedName !== "" - ? objectName + "." + propertyMapper.serializedName - : objectName; - let toSerialize = object[key]; - const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); - if (polymorphicDiscriminator && - polymorphicDiscriminator.clientName === key && - (toSerialize === undefined || toSerialize === null)) { - toSerialize = mapper.serializedName; - } - const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options); - if (serializedValue !== undefined && propName !== undefined && propName !== null) { - const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options); - if (isXml && propertyMapper.xmlIsAttribute) { - // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js. - // This keeps things simple while preventing name collision - // with names in user documents. - parentObject[interfaces_js_1.XML_ATTRKEY] = parentObject[interfaces_js_1.XML_ATTRKEY] || {}; - parentObject[interfaces_js_1.XML_ATTRKEY][propName] = serializedValue; - } - else if (isXml && propertyMapper.xmlIsWrapped) { - parentObject[propName] = { [propertyMapper.xmlElementName]: value }; - } - else { - parentObject[propName] = value; - } - } - } - } - const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName); - if (additionalPropertiesMapper) { - const propNames = Object.keys(modelProps); - for (const clientPropName in object) { - const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName); - if (isAdditionalProperty) { - payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '["' + clientPropName + '"]', options); - } - } - } - return payload; - } - return object; -} -function getXmlObjectValue(propertyMapper, serializedValue, isXml, options) { - if (!isXml || !propertyMapper.xmlNamespace) { - return serializedValue; - } - const xmlnsKey = propertyMapper.xmlNamespacePrefix - ? `xmlns:${propertyMapper.xmlNamespacePrefix}` - : "xmlns"; - const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace }; - if (["Composite"].includes(propertyMapper.type.name)) { - if (serializedValue[interfaces_js_1.XML_ATTRKEY]) { - return serializedValue; - } - else { - const result = Object.assign({}, serializedValue); - result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; - return result; - } - } - const result = {}; - result[options.xml.xmlCharKey] = serializedValue; - result[interfaces_js_1.XML_ATTRKEY] = xmlNamespace; - return result; -} -function isSpecialXmlProperty(propertyName, options) { - return [interfaces_js_1.XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName); -} -function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a, _b; - const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : interfaces_js_1.XML_CHARKEY; - if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { - mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); - } - const modelProps = resolveModelProperties(serializer, mapper, objectName); - let instance = {}; - const handledPropertyNames = []; - for (const key of Object.keys(modelProps)) { - const propertyMapper = modelProps[key]; - const paths = splitSerializeName(modelProps[key].serializedName); - handledPropertyNames.push(paths[0]); - const { serializedName, xmlName, xmlElementName } = propertyMapper; - let propertyObjectName = objectName; - if (serializedName !== "" && serializedName !== undefined) { - propertyObjectName = objectName + "." + serializedName; - } - const headerCollectionPrefix = propertyMapper.headerCollectionPrefix; - if (headerCollectionPrefix) { - const dictionary = {}; - for (const headerKey of Object.keys(responseBody)) { - if (headerKey.startsWith(headerCollectionPrefix)) { - dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options); - } - handledPropertyNames.push(headerKey); - } - instance[key] = dictionary; +function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error, }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; } - else if (serializer.isXML) { - if (propertyMapper.xmlIsAttribute && responseBody[interfaces_js_1.XML_ATTRKEY]) { - instance[key] = serializer.deserialize(propertyMapper, responseBody[interfaces_js_1.XML_ATTRKEY][xmlName], propertyObjectName, options); - } - else if (propertyMapper.xmlIsMsText) { - if (responseBody[xmlCharKey] !== undefined) { - instance[key] = responseBody[xmlCharKey]; - } - else if (typeof responseBody === "string") { - // The special case where xml parser parses "content" into JSON of - // `{ name: "content"}` instead of `{ name: { "_": "content" }}` - instance[key] = responseBody; + if (error) { + for (const retriableError of retriableErrors) { + if (error.name.toUpperCase().includes(retriableError) || + error.message.toUpperCase().includes(retriableError) || + (error.code && error.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; } } - else { - const propertyName = xmlElementName || xmlName || serializedName; - if (propertyMapper.xmlIsWrapped) { - /* a list of wrapped by - For the xml example below - - ... - ... - - the responseBody has - { - Cors: { - CorsRule: [{...}, {...}] - } - } - xmlName is "Cors" and xmlElementName is"CorsRule". - */ - const wrapped = responseBody[xmlName]; - const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; - instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); - handledPropertyNames.push(xmlName); - } - else { - const property = responseBody[propertyName]; - instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options); - handledPropertyNames.push(propertyName); - } + if (error?.code === "PARSE_ERROR" && + error?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; } } - else { - // deserialize the property if it is present in the provided responseBody instance - let propertyInstance; - let res = responseBody; - // traversing the object step by step. - let steps = 0; - for (const item of paths) { - if (!res) - break; - steps++; - res = res[item]; - } - // only accept null when reaching the last position of object otherwise it would be undefined - if (res === null && steps < paths.length) { - res = undefined; + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || error) { + const statusCode = response?.status ?? error?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; } - propertyInstance = res; - const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator; - // checking that the model property name (key)(ex: "fishtype") and the - // clientName of the polymorphicDiscriminator {metadata} (ex: "fishtype") - // instead of the serializedName of the polymorphicDiscriminator (ex: "fish.type") - // is a better approach. The generator is not consistent with escaping '\.' in the - // serializedName of the property (ex: "fish\.type") that is marked as polymorphic discriminator - // and the serializedName of the metadata polymorphicDiscriminator (ex: "fish.type"). However, - // the clientName transformation of the polymorphicDiscriminator (ex: "fishtype") and - // the transformation of model property name (ex: "fishtype") is done consistently. - // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator. - if (polymorphicDiscriminator && - key === polymorphicDiscriminator.clientName && - (propertyInstance === undefined || propertyInstance === null)) { - propertyInstance = mapper.serializedName; + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; } - let serializedValue; - // paging - if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === "") { - propertyInstance = responseBody[key]; - const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); - // Copy over any properties that have already been added into the instance, where they do - // not exist on the newly de-serialized array - for (const [k, v] of Object.entries(instance)) { - if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) { - arrayInstance[k] = v; + } + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; } } - instance = arrayInstance; } - else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) { - serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options); - instance[key] = serializedValue; + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; } } + else { + delayTimeInMs = Math.random() * 1000; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; } - const additionalPropertiesMapper = mapper.type.additionalProperties; - if (additionalPropertiesMapper) { - const isAdditionalProperty = (responsePropName) => { - for (const clientPropName in modelProps) { - const paths = splitSerializeName(modelProps[clientPropName].serializedName); - if (paths[0] === responsePropName) { - return false; + return { + name: exports.storageRetryPolicyName, + async sendRequest(request, next) { + // Set the server-side timeout query parameter "timeout=[seconds]" + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : undefined; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; + let response; + let error; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || + !secondaryUrl || + !["GET", "HEAD", "OPTIONS"].includes(request.method) || + attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; + response = undefined; + error = undefined; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await next(request); + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); + } + catch (e) { + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error = e; + } + else { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; + } } + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; } - return true; - }; - for (const responsePropName in responseBody) { - if (isAdditionalProperty(responsePropName)) { - instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '["' + responsePropName + '"]', options); + if (response) { + return response; } + throw error ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); + }, + }; +} +//# sourceMappingURL=StorageRetryPolicyV2.js.map + +/***/ }), + +/***/ 66776: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StorageSharedKeyCredentialPolicy = void 0; +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const CredentialPolicy_js_1 = __nccwpck_require__(15513); +const SharedKeyComparator_js_1 = __nccwpck_require__(35867); +/** + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. + */ +class StorageSharedKeyCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || request.body !== undefined) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + this.getCanonicalizedHeadersString(request) + + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + return request; } - else if (responseBody && !options.ignoreUnknownProperties) { - for (const key of Object.keys(responseBody)) { - if (instance[key] === undefined && - !handledPropertyNames.includes(key) && - !isSpecialXmlProperty(key, options)) { - instance[key] = responseBody[key]; - } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; } + return value; } - return instance; -} -function deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) { - /* jshint validthis: true */ - const value = mapper.type.value; - if (!value || typeof value !== "object") { - throw new Error(`"value" metadata for a Dictionary must be defined in the ` + - `mapper and it must of type "object" in ${objectName}`); + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; } - if (responseBody) { - const tempDictionary = {}; - for (const key of Object.keys(responseBody)) { - tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options); + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } } - return tempDictionary; + return canonicalizedResourceString; } - return responseBody; } -function deserializeSequenceType(serializer, mapper, responseBody, objectName, options) { - var _a; - let element = mapper.type.element; - if (!element || typeof element !== "object") { - throw new Error(`element" metadata for an Array must be defined in the ` + - `mapper and it must of type "object" in ${objectName}`); - } - if (responseBody) { - if (!Array.isArray(responseBody)) { - // xml2js will interpret a single element array as just the element, so force it to be an array - responseBody = [responseBody]; +exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; +//# sourceMappingURL=StorageSharedKeyCredentialPolicy.js.map + +/***/ }), + +/***/ 93846: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.storageSharedKeyCredentialPolicyName = void 0; +exports.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; +const node_crypto_1 = __nccwpck_require__(6005); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +const SharedKeyComparator_js_1 = __nccwpck_require__(35867); +/** + * The programmatic identifier of the storageSharedKeyCredentialPolicy. + */ +exports.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; +/** + * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. + */ +function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); } - // Quirk: Composite mappers referenced by `element` might - // not have *all* properties declared (like uberParent), - // so let's try to look up the full definition by name. - if (element.type.name === "Composite" && element.type.className) { - element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element; + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + getCanonicalizedHeadersString(request) + + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey) + .update(stringToSign, "utf8") + .digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + */ + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; } - const tempArray = []; - for (let i = 0; i < responseBody.length; i++) { - tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options); + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; } - return tempArray; + return value; } - return responseBody; -} -function getIndexDiscriminator(discriminators, discriminatorValue, typeName) { - const typeNamesToCheck = [typeName]; - while (typeNamesToCheck.length) { - const currentName = typeNamesToCheck.shift(); - const indexDiscriminator = discriminatorValue === currentName - ? discriminatorValue - : currentName + "." + discriminatorValue; - if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) { - return discriminators[indexDiscriminator]; + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + */ + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } } - else { - for (const [name, mapper] of Object.entries(discriminators)) { - if (name.startsWith(currentName + ".") && - mapper.type.uberParent === currentName && - mapper.type.className) { - typeNamesToCheck.push(mapper.type.className); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); } } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } } + return canonicalizedResourceString; } - return undefined; + return { + name: exports.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + }, + }; } -function getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) { - var _a; - const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper); - if (polymorphicDiscriminator) { - let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName]; - if (discriminatorName) { - // The serializedName might have \\, which we just want to ignore - if (polymorphicPropertyName === "serializedName") { - discriminatorName = discriminatorName.replace(/\\/gi, ""); +//# sourceMappingURL=StorageSharedKeyCredentialPolicyV2.js.map + +/***/ }), + +/***/ 9846: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BlobBeginCopyFromUrlPoller = void 0; +const core_util_1 = __nccwpck_require__(80637); +const core_lro_1 = __nccwpck_require__(90334); +/** + * This is the poller returned by {@link BlobClient.beginCopyFromURL}. + * This can not be instantiated directly outside of this package. + * + * @hidden + */ +class BlobBeginCopyFromUrlPoller extends core_lro_1.Poller { + intervalInMs; + constructor(options) { + const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options; + let state; + if (resumeFrom) { + state = JSON.parse(resumeFrom).state; + } + const operation = makeBlobBeginCopyFromURLPollOperation({ + ...state, + blobClient, + copySource, + startCopyFromURLOptions, + }); + super(operation); + if (typeof onProgress === "function") { + this.onProgress(onProgress); + } + this.intervalInMs = intervalInMs; + } + delay() { + return (0, core_util_1.delay)(this.intervalInMs); + } +} +exports.BlobBeginCopyFromUrlPoller = BlobBeginCopyFromUrlPoller; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ +const cancel = async function cancel(options = {}) { + const state = this.state; + const { copyId } = state; + if (state.isCompleted) { + return makeBlobBeginCopyFromURLPollOperation(state); + } + if (!copyId) { + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); + } + // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call + await state.blobClient.abortCopyFromURL(copyId, { + abortSignal: options.abortSignal, + }); + state.isCancelled = true; + return makeBlobBeginCopyFromURLPollOperation(state); +}; +/** + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden + */ +const update = async function update(options = {}) { + const state = this.state; + const { blobClient, copySource, startCopyFromURLOptions } = state; + if (!state.isStarted) { + state.isStarted = true; + const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions); + // copyId is needed to abort + state.copyId = result.copyId; + if (result.copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + } + else if (!state.isCompleted) { + try { + const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal }); + const { copyStatus, copyProgress } = result; + const prevCopyProgress = state.copyProgress; + if (copyProgress) { + state.copyProgress = copyProgress; } - const discriminatorValue = object[discriminatorName]; - const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className; - if (typeof discriminatorValue === "string" && typeName) { - const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName); - if (polymorphicMapper) { - mapper = polymorphicMapper; - } + if (copyStatus === "pending" && + copyProgress !== prevCopyProgress && + typeof options.fireProgress === "function") { + // trigger in setTimeout, or swallow error? + options.fireProgress(state); + } + else if (copyStatus === "success") { + state.result = result; + state.isCompleted = true; + } + else if (copyStatus === "failed") { + state.error = new Error(`Blob copy failed with reason: "${result.copyStatusDescription || "unknown"}"`); + state.isCompleted = true; } } + catch (err) { + state.error = err; + state.isCompleted = true; + } } - return mapper; -} -function getPolymorphicDiscriminatorRecursively(serializer, mapper) { - return (mapper.type.polymorphicDiscriminator || - getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) || - getPolymorphicDiscriminatorSafely(serializer, mapper.type.className)); -} -function getPolymorphicDiscriminatorSafely(serializer, typeName) { - return (typeName && - serializer.modelMappers[typeName] && - serializer.modelMappers[typeName].type.polymorphicDiscriminator); -} + return makeBlobBeginCopyFromURLPollOperation(state); +}; /** - * Known types of Mappers + * Note: Intentionally using function expression over arrow function expression + * so that the function can be invoked with a different context. + * This affects what `this` refers to. + * @hidden */ -exports.MapperTypeNames = { - Base64Url: "Base64Url", - Boolean: "Boolean", - ByteArray: "ByteArray", - Composite: "Composite", - Date: "Date", - DateTime: "DateTime", - DateTimeRfc1123: "DateTimeRfc1123", - Dictionary: "Dictionary", - Enum: "Enum", - Number: "Number", - Object: "Object", - Sequence: "Sequence", - String: "String", - Stream: "Stream", - TimeSpan: "TimeSpan", - UnixTime: "UnixTime", +const toString = function toString() { + return JSON.stringify({ state: this.state }, (key, value) => { + // remove blobClient from serialized state since a client can't be hydrated from this info. + if (key === "blobClient") { + return undefined; + } + return value; + }); }; -//# sourceMappingURL=serializer.js.map +/** + * Creates a poll operation given the provided state. + * @hidden + */ +function makeBlobBeginCopyFromURLPollOperation(state) { + return { + state: { ...state }, + cancel, + toString, + update, + }; +} +//# sourceMappingURL=BlobStartCopyFromUrlPoller.js.map /***/ }), -/***/ 28927: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 70793: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServiceClient = void 0; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const pipeline_js_1 = __nccwpck_require__(33924); -const utils_js_1 = __nccwpck_require__(25363); -const httpClientCache_js_1 = __nccwpck_require__(30308); -const operationHelpers_js_1 = __nccwpck_require__(62074); -const urlHelpers_js_1 = __nccwpck_require__(98258); -const interfaceHelpers_js_1 = __nccwpck_require__(41459); -const log_js_1 = __nccwpck_require__(53776); +exports.AccountSASPermissions = void 0; /** - * Initializes a new instance of the ServiceClient. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the + * values are set, this should be serialized with toString and set as the permissions field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. */ -class ServiceClient { +class AccountSASPermissions { /** - * The ServiceClient constructor - * @param options - The service client options that govern the behavior of the client. + * Parse initializes the AccountSASPermissions fields from a string. + * + * @param permissions - */ - constructor(options = {}) { - var _a, _b; - this._requestContentType = options.requestContentType; - this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri; - if (options.baseUri) { - log_js_1.logger.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."); - } - this._allowInsecureConnection = options.allowInsecureConnection; - this._httpClient = options.httpClient || (0, httpClientCache_js_1.getCachedDefaultHttpClient)(); - this.pipeline = options.pipeline || createDefaultPipeline(options); - if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) { - for (const { policy, position } of options.additionalPolicies) { - // Sign happens after Retry and is commonly needed to occur - // before policies that intercept post-retry. - const afterPhase = position === "perRetry" ? "Sign" : undefined; - this.pipeline.addPolicy(policy, { - afterPhase, - }); + static parse(permissions) { + const accountSASPermissions = new AccountSASPermissions(); + for (const c of permissions) { + switch (c) { + case "r": + accountSASPermissions.read = true; + break; + case "w": + accountSASPermissions.write = true; + break; + case "d": + accountSASPermissions.delete = true; + break; + case "x": + accountSASPermissions.deleteVersion = true; + break; + case "l": + accountSASPermissions.list = true; + break; + case "a": + accountSASPermissions.add = true; + break; + case "c": + accountSASPermissions.create = true; + break; + case "u": + accountSASPermissions.update = true; + break; + case "p": + accountSASPermissions.process = true; + break; + case "t": + accountSASPermissions.tag = true; + break; + case "f": + accountSASPermissions.filter = true; + break; + case "i": + accountSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + accountSASPermissions.permanentDelete = true; + break; + default: + throw new RangeError(`Invalid permission character: ${c}`); } } + return accountSASPermissions; } /** - * Send the provided httpRequest. + * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - */ - async sendRequest(request) { - return this.pipeline.sendRequest(this._httpClient, request); + static from(permissionLike) { + const accountSASPermissions = new AccountSASPermissions(); + if (permissionLike.read) { + accountSASPermissions.read = true; + } + if (permissionLike.write) { + accountSASPermissions.write = true; + } + if (permissionLike.delete) { + accountSASPermissions.delete = true; + } + if (permissionLike.deleteVersion) { + accountSASPermissions.deleteVersion = true; + } + if (permissionLike.filter) { + accountSASPermissions.filter = true; + } + if (permissionLike.tag) { + accountSASPermissions.tag = true; + } + if (permissionLike.list) { + accountSASPermissions.list = true; + } + if (permissionLike.add) { + accountSASPermissions.add = true; + } + if (permissionLike.create) { + accountSASPermissions.create = true; + } + if (permissionLike.update) { + accountSASPermissions.update = true; + } + if (permissionLike.process) { + accountSASPermissions.process = true; + } + if (permissionLike.setImmutabilityPolicy) { + accountSASPermissions.setImmutabilityPolicy = true; + } + if (permissionLike.permanentDelete) { + accountSASPermissions.permanentDelete = true; + } + return accountSASPermissions; } /** - * Send an HTTP request that is populated using the provided OperationSpec. - * @typeParam T - The typed result of the request, based on the OperationSpec. - * @param operationArguments - The arguments that the HTTP request's templated values will be populated from. - * @param operationSpec - The OperationSpec to use to populate the httpRequest. + * Permission to read resources and list queues and tables granted. */ - async sendOperationRequest(operationArguments, operationSpec) { - const endpoint = operationSpec.baseUrl || this._endpoint; - if (!endpoint) { - throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); + read = false; + /** + * Permission to write resources granted. + */ + write = false; + /** + * Permission to delete blobs and files granted. + */ + delete = false; + /** + * Permission to delete versions granted. + */ + deleteVersion = false; + /** + * Permission to list blob containers, blobs, shares, directories, and files granted. + */ + list = false; + /** + * Permission to add messages, table entities, and append to blobs granted. + */ + add = false; + /** + * Permission to create blobs and files granted. + */ + create = false; + /** + * Permissions to update messages and table entities granted. + */ + update = false; + /** + * Permission to get and delete messages granted. + */ + process = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Permission to filter blobs. + */ + filter = false; + /** + * Permission to set immutability policy. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Produces the SAS permissions string for an Azure Storage account. + * Call this method to set AccountSASSignatureValues Permissions field. + * + * Using this method will guarantee the resource types are in + * an order accepted by the service. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + */ + toString() { + // The order of the characters should be as specified here to ensure correctness: + // https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + // Use a string array instead of string concatenating += operator for performance + const permissions = []; + if (this.read) { + permissions.push("r"); } - // Templatized URLs sometimes reference properties on the ServiceClient child class, - // so we have to pass `this` below in order to search these properties if they're - // not part of OperationArguments - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); - const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url, - }); - request.method = operationSpec.httpMethod; - const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); - operationInfo.operationSpec = operationSpec; - operationInfo.operationArguments = operationArguments; - const contentType = operationSpec.contentType || this._requestContentType; - if (contentType && operationSpec.requestBody) { - request.headers.set("Content-Type", contentType); + if (this.write) { + permissions.push("w"); } - const options = operationArguments.options; - if (options) { - const requestOptions = options.requestOptions; - if (requestOptions) { - if (requestOptions.timeout) { - request.timeout = requestOptions.timeout; - } - if (requestOptions.onUploadProgress) { - request.onUploadProgress = requestOptions.onUploadProgress; - } - if (requestOptions.onDownloadProgress) { - request.onDownloadProgress = requestOptions.onDownloadProgress; - } - if (requestOptions.shouldDeserialize !== undefined) { - operationInfo.shouldDeserialize = requestOptions.shouldDeserialize; - } - if (requestOptions.allowInsecureConnection) { - request.allowInsecureConnection = true; - } - } - if (options.abortSignal) { - request.abortSignal = options.abortSignal; - } - if (options.tracingOptions) { - request.tracingOptions = options.tracingOptions; - } + if (this.delete) { + permissions.push("d"); } - if (this._allowInsecureConnection) { - request.allowInsecureConnection = true; + if (this.deleteVersion) { + permissions.push("x"); } - if (request.streamResponseStatusCodes === undefined) { - request.streamResponseStatusCodes = (0, interfaceHelpers_js_1.getStreamingResponseStatusCodes)(operationSpec); + if (this.filter) { + permissions.push("f"); } - try { - const rawResponse = await this.sendRequest(request); - const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[rawResponse.status]); - if (options === null || options === void 0 ? void 0 : options.onResponse) { - options.onResponse(rawResponse, flatResponse); - } - return flatResponse; + if (this.tag) { + permissions.push("t"); } - catch (error) { - if (typeof error === "object" && (error === null || error === void 0 ? void 0 : error.response)) { - const rawResponse = error.response; - const flatResponse = (0, utils_js_1.flattenResponse)(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses["default"]); - error.details = flatResponse; - if (options === null || options === void 0 ? void 0 : options.onResponse) { - options.onResponse(rawResponse, flatResponse, error); - } - } - throw error; + if (this.list) { + permissions.push("l"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.update) { + permissions.push("u"); + } + if (this.process) { + permissions.push("p"); } + if (this.setImmutabilityPolicy) { + permissions.push("i"); + } + if (this.permanentDelete) { + permissions.push("y"); + } + return permissions.join(""); } } -exports.ServiceClient = ServiceClient; -function createDefaultPipeline(options) { - const credentialScopes = getCredentialScopes(options); - const credentialOptions = options.credential && credentialScopes - ? { credentialScopes, credential: options.credential } - : undefined; - return (0, pipeline_js_1.createClientPipeline)(Object.assign(Object.assign({}, options), { credentialOptions })); -} -function getCredentialScopes(options) { - if (options.credentialScopes) { - return options.credentialScopes; +exports.AccountSASPermissions = AccountSASPermissions; +//# sourceMappingURL=AccountSASPermissions.js.map + +/***/ }), + +/***/ 70790: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AccountSASResourceTypes = void 0; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the + * values are set, this should be serialized with toString and set as the resources field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but + * the order of the resources is particular and this class guarantees correctness. + */ +class AccountSASResourceTypes { + /** + * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an + * Error if it encounters a character that does not correspond to a valid resource type. + * + * @param resourceTypes - + */ + static parse(resourceTypes) { + const accountSASResourceTypes = new AccountSASResourceTypes(); + for (const c of resourceTypes) { + switch (c) { + case "s": + accountSASResourceTypes.service = true; + break; + case "c": + accountSASResourceTypes.container = true; + break; + case "o": + accountSASResourceTypes.object = true; + break; + default: + throw new RangeError(`Invalid resource type: ${c}`); + } + } + return accountSASResourceTypes; } - if (options.endpoint) { - return `${options.endpoint}/.default`; + /** + * Permission to access service level APIs granted. + */ + service = false; + /** + * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted. + */ + container = false; + /** + * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted. + */ + object = false; + /** + * Converts the given resource types to a string. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + */ + toString() { + const resourceTypes = []; + if (this.service) { + resourceTypes.push("s"); + } + if (this.container) { + resourceTypes.push("c"); + } + if (this.object) { + resourceTypes.push("o"); + } + return resourceTypes.join(""); } - if (options.baseUri) { - return `${options.baseUri}/.default`; +} +exports.AccountSASResourceTypes = AccountSASResourceTypes; +//# sourceMappingURL=AccountSASResourceTypes.js.map + +/***/ }), + +/***/ 34606: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AccountSASServices = void 0; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value + * to true means that any SAS which uses these permissions will grant access to that service. Once all the + * values are set, this should be serialized with toString and set as the services field on an + * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but + * the order of the services is particular and this class guarantees correctness. + */ +class AccountSASServices { + /** + * Creates an {@link AccountSASServices} from the specified services string. This method will throw an + * Error if it encounters a character that does not correspond to a valid service. + * + * @param services - + */ + static parse(services) { + const accountSASServices = new AccountSASServices(); + for (const c of services) { + switch (c) { + case "b": + accountSASServices.blob = true; + break; + case "f": + accountSASServices.file = true; + break; + case "q": + accountSASServices.queue = true; + break; + case "t": + accountSASServices.table = true; + break; + default: + throw new RangeError(`Invalid service character: ${c}`); + } + } + return accountSASServices; } - if (options.credential && !options.credentialScopes) { - throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`); + /** + * Permission to access blob resources granted. + */ + blob = false; + /** + * Permission to access file resources granted. + */ + file = false; + /** + * Permission to access queue resources granted. + */ + queue = false; + /** + * Permission to access table resources granted. + */ + table = false; + /** + * Converts the given services to a string. + * + */ + toString() { + const services = []; + if (this.blob) { + services.push("b"); + } + if (this.table) { + services.push("t"); + } + if (this.queue) { + services.push("q"); + } + if (this.file) { + services.push("f"); + } + return services.join(""); } - return undefined; } -//# sourceMappingURL=serviceClient.js.map +exports.AccountSASServices = AccountSASServices; +//# sourceMappingURL=AccountSASServices.js.map /***/ }), -/***/ 35429: -/***/ ((__unused_webpack_module, exports) => { +/***/ 72763: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.state = void 0; +exports.generateAccountSASQueryParameters = generateAccountSASQueryParameters; +exports.generateAccountSASQueryParametersInternal = generateAccountSASQueryParametersInternal; +const AccountSASPermissions_js_1 = __nccwpck_require__(70793); +const AccountSASResourceTypes_js_1 = __nccwpck_require__(70790); +const AccountSASServices_js_1 = __nccwpck_require__(34606); +const SasIPRange_js_1 = __nccwpck_require__(80914); +const SASQueryParameters_js_1 = __nccwpck_require__(21969); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * Holds the singleton operationRequestMap, to be shared across CJS and ESM imports. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual + * REST request. + * + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas + * + * @param accountSASSignatureValues - + * @param sharedKeyCredential - */ -exports.state = { - operationRequestMap: new WeakMap(), -}; -//# sourceMappingURL=state-cjs.cjs.map +function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) { + return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) + .sasQueryParameters; +} +function generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential) { + const version = accountSASSignatureValues.version + ? accountSASSignatureValues.version + : constants_js_1.SERVICE_VERSION; + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.setImmutabilityPolicy && + version < "2020-08-04") { + throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.permanentDelete && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission."); + } + if (accountSASSignatureValues.permissions && + accountSASSignatureValues.permissions.filter && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission."); + } + if (accountSASSignatureValues.encryptionScope && version < "2020-12-06") { + throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); + } + const parsedPermissions = AccountSASPermissions_js_1.AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString()); + const parsedServices = AccountSASServices_js_1.AccountSASServices.parse(accountSASSignatureValues.services).toString(); + const parsedResourceTypes = AccountSASResourceTypes_js_1.AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString(); + let stringToSign; + if (version >= "2020-12-06") { + stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) + : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "", + "", // Account SAS requires an additional newline character + ].join("\n"); + } + else { + stringToSign = [ + sharedKeyCredential.accountName, + parsedPermissions, + parsedServices, + parsedResourceTypes, + accountSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.startsOn, false) + : "", + (0, utils_common_js_1.truncatedISO8061Date)(accountSASSignatureValues.expiresOn, false), + accountSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(accountSASSignatureValues.ipRange) : "", + accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "", + version, + "", // Account SAS requires an additional newline character + ].join("\n"); + } + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope), + stringToSign: stringToSign, + }; +} +//# sourceMappingURL=AccountSASSignatureValues.js.map /***/ }), -/***/ 98258: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 87393: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRequestUrl = getRequestUrl; -exports.appendQueryParams = appendQueryParams; -const operationHelpers_js_1 = __nccwpck_require__(62074); -const interfaceHelpers_js_1 = __nccwpck_require__(41459); -const CollectionFormatToDelimiterMap = { - CSV: ",", - SSV: " ", - Multi: "Multi", - TSV: "\t", - Pipes: "|", -}; -function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) { - const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject); - let isAbsolutePath = false; - let requestUrl = replaceAll(baseUri, urlReplacements); - if (operationSpec.path) { - let path = replaceAll(operationSpec.path, urlReplacements); - // QUIRK: sometimes we get a path component like /{nextLink} - // which may be a fully formed URL with a leading /. In that case, we should - // remove the leading / - if (operationSpec.path === "/{nextLink}" && path.startsWith("/")) { - path = path.substring(1); +exports.BlobSASPermissions = void 0; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting + * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all + * the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. + */ +class BlobSASPermissions { + /** + * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @param permissions - + */ + static parse(permissions) { + const blobSASPermissions = new BlobSASPermissions(); + for (const char of permissions) { + switch (char) { + case "r": + blobSASPermissions.read = true; + break; + case "a": + blobSASPermissions.add = true; + break; + case "c": + blobSASPermissions.create = true; + break; + case "w": + blobSASPermissions.write = true; + break; + case "d": + blobSASPermissions.delete = true; + break; + case "x": + blobSASPermissions.deleteVersion = true; + break; + case "t": + blobSASPermissions.tag = true; + break; + case "m": + blobSASPermissions.move = true; + break; + case "e": + blobSASPermissions.execute = true; + break; + case "i": + blobSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + blobSASPermissions.permanentDelete = true; + break; + default: + throw new RangeError(`Invalid permission: ${char}`); + } } - // QUIRK: sometimes we get a path component like {nextLink} - // which may be a fully formed URL. In that case, we should - // ignore the baseUri. - if (isAbsoluteUrl(path)) { - requestUrl = path; - isAbsolutePath = true; + return blobSASPermissions; + } + /** + * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - + */ + static from(permissionLike) { + const blobSASPermissions = new BlobSASPermissions(); + if (permissionLike.read) { + blobSASPermissions.read = true; } - else { - requestUrl = appendPath(requestUrl, path); + if (permissionLike.add) { + blobSASPermissions.add = true; + } + if (permissionLike.create) { + blobSASPermissions.create = true; + } + if (permissionLike.write) { + blobSASPermissions.write = true; + } + if (permissionLike.delete) { + blobSASPermissions.delete = true; + } + if (permissionLike.deleteVersion) { + blobSASPermissions.deleteVersion = true; + } + if (permissionLike.tag) { + blobSASPermissions.tag = true; + } + if (permissionLike.move) { + blobSASPermissions.move = true; + } + if (permissionLike.execute) { + blobSASPermissions.execute = true; + } + if (permissionLike.setImmutabilityPolicy) { + blobSASPermissions.setImmutabilityPolicy = true; + } + if (permissionLike.permanentDelete) { + blobSASPermissions.permanentDelete = true; } + return blobSASPermissions; } - const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); /** - * Notice that this call sets the `noOverwrite` parameter to true if the `requestUrl` - * is an absolute path. This ensures that existing query parameter values in `requestUrl` - * do not get overwritten. On the other hand when `requestUrl` is not absolute path, it - * is still being built so there is nothing to overwrite. + * Specifies Read access granted. */ - requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath); - return requestUrl; -} -function replaceAll(input, replacements) { - let result = input; - for (const [searchValue, replaceValue] of replacements) { - result = result.split(searchValue).join(replaceValue); - } - return result; -} -function calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) { - var _a; - const result = new Map(); - if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) { - for (const urlParameter of operationSpec.urlParameters) { - let urlParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, urlParameter, fallbackObject); - const parameterPathString = (0, interfaceHelpers_js_1.getPathStringFromParameter)(urlParameter); - urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString); - if (!urlParameter.skipEncoding) { - urlParameterValue = encodeURIComponent(urlParameterValue); - } - result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue); + read = false; + /** + * Specifies Add access granted. + */ + add = false; + /** + * Specifies Create access granted. + */ + create = false; + /** + * Specifies Write access granted. + */ + write = false; + /** + * Specifies Delete access granted. + */ + delete = false; + /** + * Specifies Delete version access granted. + */ + deleteVersion = false; + /** + * Specfies Tag access granted. + */ + tag = false; + /** + * Specifies Move access granted. + */ + move = false; + /** + * Specifies Execute access granted. + */ + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * @returns A string which represents the BlobSASPermissions + */ + toString() { + const permissions = []; + if (this.read) { + permissions.push("r"); + } + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); } + if (this.execute) { + permissions.push("e"); + } + if (this.setImmutabilityPolicy) { + permissions.push("i"); + } + if (this.permanentDelete) { + permissions.push("y"); + } + return permissions.join(""); } - return result; } -function isAbsoluteUrl(url) { - return url.includes("://"); +exports.BlobSASPermissions = BlobSASPermissions; +//# sourceMappingURL=BlobSASPermissions.js.map + +/***/ }), + +/***/ 48921: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.generateBlobSASQueryParameters = generateBlobSASQueryParameters; +exports.generateBlobSASQueryParametersInternal = generateBlobSASQueryParametersInternal; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const BlobSASPermissions_js_1 = __nccwpck_require__(87393); +const ContainerSASPermissions_js_1 = __nccwpck_require__(27579); +const StorageSharedKeyCredential_js_1 = __nccwpck_require__(59155); +const UserDelegationKeyCredential_js_1 = __nccwpck_require__(50822); +const SasIPRange_js_1 = __nccwpck_require__(80914); +const SASQueryParameters_js_1 = __nccwpck_require__(21969); +const constants_js_1 = __nccwpck_require__(81865); +const utils_common_js_1 = __nccwpck_require__(16673); +function generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + return generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters; } -function appendPath(url, pathToAppend) { - if (!pathToAppend) { - return url; - } - const parsedUrl = new URL(url); - let newPath = parsedUrl.pathname; - if (!newPath.endsWith("/")) { - newPath = `${newPath}/`; +function generateBlobSASQueryParametersInternal(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential + ? sharedKeyCredentialOrUserDelegationKey + : undefined; + let userDelegationKeyCredential; + if (sharedKeyCredential === undefined && accountName !== undefined) { + userDelegationKeyCredential = new UserDelegationKeyCredential_js_1.UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey); } - if (pathToAppend.startsWith("/")) { - pathToAppend = pathToAppend.substring(1); + if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) { + throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName."); } - const searchStart = pathToAppend.indexOf("?"); - if (searchStart !== -1) { - const path = pathToAppend.substring(0, searchStart); - const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path; - if (search) { - parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; + // Version 2020-12-06 adds support for encryptionscope in SAS. + if (version >= "2020-12-06") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential); } - } - else { - newPath = newPath + pathToAppend; - } - parsedUrl.pathname = newPath; - return parsedUrl.toString(); -} -function calculateQueryParameters(operationSpec, operationArguments, fallbackObject) { - var _a; - const result = new Map(); - const sequenceParams = new Set(); - if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) { - for (const queryParameter of operationSpec.queryParameters) { - if (queryParameter.mapper.type.name === "Sequence" && queryParameter.mapper.serializedName) { - sequenceParams.add(queryParameter.mapper.serializedName); + else { + if (version >= "2025-07-05") { + return generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential); } - let queryParameterValue = (0, operationHelpers_js_1.getOperationArgumentValueFromParameter)(operationArguments, queryParameter, fallbackObject); - if ((queryParameterValue !== undefined && queryParameterValue !== null) || - queryParameter.mapper.required) { - queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter)); - const delimiter = queryParameter.collectionFormat - ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat] - : ""; - if (Array.isArray(queryParameterValue)) { - // replace null and undefined - queryParameterValue = queryParameterValue.map((item) => { - if (item === null || item === undefined) { - return ""; - } - return item; - }); - } - if (queryParameter.collectionFormat === "Multi" && queryParameterValue.length === 0) { - continue; - } - else if (Array.isArray(queryParameterValue) && - (queryParameter.collectionFormat === "SSV" || queryParameter.collectionFormat === "TSV")) { - queryParameterValue = queryParameterValue.join(delimiter); - } - if (!queryParameter.skipEncoding) { - if (Array.isArray(queryParameterValue)) { - queryParameterValue = queryParameterValue.map((item) => { - return encodeURIComponent(item); - }); - } - else { - queryParameterValue = encodeURIComponent(queryParameterValue); - } - } - // Join pipes and CSV *after* encoding, or the server will be upset. - if (Array.isArray(queryParameterValue) && - (queryParameter.collectionFormat === "CSV" || queryParameter.collectionFormat === "Pipes")) { - queryParameterValue = queryParameterValue.join(delimiter); - } - result.set(queryParameter.mapper.serializedName || (0, interfaceHelpers_js_1.getPathStringFromParameter)(queryParameter), queryParameterValue); + else { + return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential); } } } - return { - queryParams: result, - sequenceParams, - }; -} -function simpleParseQueryParams(queryString) { - const result = new Map(); - if (!queryString || queryString[0] !== "?") { - return result; - } - // remove the leading ? - queryString = queryString.slice(1); - const pairs = queryString.split("&"); - for (const pair of pairs) { - const [name, value] = pair.split("=", 2); - const existingValue = result.get(name); - if (existingValue) { - if (Array.isArray(existingValue)) { - existingValue.push(value); + // Version 2019-12-12 adds support for the blob tags permission. + // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields. + // https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string + if (version >= "2018-11-09") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential); + } + else { + // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId. + if (version >= "2020-02-10") { + return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential); } else { - result.set(name, [existingValue, value]); + return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential); } } + } + if (version >= "2015-04-05") { + if (sharedKeyCredential !== undefined) { + return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential); + } else { - result.set(name, value); + throw new RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key."); } } - return result; + throw new RangeError("'version' must be >= '2015-04-05'."); } -/** @internal */ -function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { - if (queryParams.size === 0) { - return url; +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ +function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); } - const parsedUrl = new URL(url); - // QUIRK: parsedUrl.searchParams will have their name/value pairs decoded, which - // can change their meaning to the server, such as in the case of a SAS signature. - // To avoid accidentally un-encoding a query param, we parse the key/values ourselves - const combinedParams = simpleParseQueryParams(parsedUrl.search); - for (const [name, value] of queryParams) { - const existingValue = combinedParams.get(name); - if (Array.isArray(existingValue)) { - if (Array.isArray(value)) { - existingValue.push(...value); - const valueSet = new Set(existingValue); - combinedParams.set(name, Array.from(valueSet)); - } - else { - existingValue.push(value); - } - } - else if (existingValue) { - if (Array.isArray(value)) { - value.unshift(existingValue); - } - else if (sequenceParams.has(name)) { - combinedParams.set(name, [existingValue, value]); - } - if (!noOverwrite) { - combinedParams.set(name, value); - } + let resource = "c"; + if (blobSASSignatureValues.blobName) { + resource = "b"; + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - combinedParams.set(name, value); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } - const searchPieces = []; - for (const [name, value] of combinedParams) { - if (typeof value === "string") { - searchPieces.push(`${name}=${value}`); + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign: stringToSign, + }; +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. + * + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - + */ +function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; } - else if (Array.isArray(value)) { - // QUIRK: If we get an array of values, include multiple key/value pairs - for (const subValue of value) { - searchPieces.push(`${name}=${subValue}`); - } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } else { - searchPieces.push(`${name}=${value}`); + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } } - // QUIRK: we have to set search manually as searchParams will encode comma when it shouldn't. - parsedUrl.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; - return parsedUrl.toString(); + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType), + stringToSign: stringToSign, + }; } -//# sourceMappingURL=urlHelpers.js.map - -/***/ }), - -/***/ 25363: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isPrimitiveBody = isPrimitiveBody; -exports.isDuration = isDuration; -exports.isValidUuid = isValidUuid; -exports.flattenResponse = flattenResponse; /** - * A type guard for a primitive response body. - * @param value - Value to test + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. * - * @internal - */ -function isPrimitiveBody(value, mapperTypeName) { - return (mapperTypeName !== "Composite" && - mapperTypeName !== "Dictionary" && - (typeof value === "string" || - typeof value === "number" || - typeof value === "boolean" || - (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !== - null || - value === undefined || - value === null)); -} -const validateISODuration = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; -/** - * Returns true if the given string is in ISO 8601 format. - * @param value - The value to be validated for ISO 8601 duration format. - * @internal - */ -function isDuration(value) { - return validateISODuration.test(value); -} -const validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i; -/** - * Returns true if the provided uuid is valid. + * Creates an instance of SASQueryParameters. * - * @param uuid - The uuid that needs to be validated. + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn and identifier. * - * @internal + * WARNING: When identifier is not provided, permissions and expiresOn are required. + * You MUST assign value to identifier or expiresOn & permissions manually if you initial with + * this constructor. + * + * @param blobSASSignatureValues - + * @param sharedKeyCredential - */ -function isValidUuid(uuid) { - return validUuidRegex.test(uuid); +function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + if (!blobSASSignatureValues.identifier && + !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + blobSASSignatureValues.identifier, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : "", + blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "", + blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "", + blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "", + blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "", + ].join("\n"); + const signature = sharedKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope), + stringToSign: stringToSign, + }; } /** - * Maps the response as follows: - * - wraps the response body if needed (typically if its type is primitive). - * - returns null if the combination of the headers and the body is empty. - * - otherwise, returns the combination of the headers and the body. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2018-11-09. * - * @param responseObject - a representation of the parsed response - * @returns the response that will be returned to the user which can be null and/or wrapped + * Creates an instance of SASQueryParameters. * - * @internal + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - */ -function handleNullableResponseAndWrappableBody(responseObject) { - const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body); - if (responseObject.hasNullableType && - Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) { - return responseObject.shouldWrapBody ? { body: null } : null; +function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } - else { - return responseObject.shouldWrapBody - ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody; + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey), + stringToSign: stringToSign, + }; } /** - * Take a `FullOperationResponse` and turn it into a flat - * response object to hand back to the consumer. - * @param fullResponse - The processed response from the operation request - * @param responseSpec - The response map from the OperationSpec + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-02-10. * - * @internal + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - */ -function flattenResponse(fullResponse, responseSpec) { - var _a, _b; - const parsedHeaders = fullResponse.parsedHeaders; - // head methods never have a body, but we return a boolean set to body property - // to indicate presence/absence of the resource - if (fullResponse.request.method === "HEAD") { - return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody }); +function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); } - const bodyMapper = responseSpec && responseSpec.bodyMapper; - const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable); - const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name; - /** If the body is asked for, we look at the expected body type to handle it */ - if (expectedBodyTypeName === "Stream") { - return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody }); + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } } - const modelProperties = (expectedBodyTypeName === "Composite" && - bodyMapper.type.modelProperties) || - {}; - const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === ""); - if (expectedBodyTypeName === "Sequence" || isPageableResponse) { - const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : []; - for (const key of Object.keys(modelProperties)) { - if (modelProperties[key].serializedName) { - arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key]; - } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } - if (parsedHeaders) { - for (const key of Object.keys(parsedHeaders)) { - arrayResponse[key] = parsedHeaders[key]; - } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } - return isNullable && - !fullResponse.parsedBody && - !parsedHeaders && - Object.getOwnPropertyNames(modelProperties).length === 0 - ? null - : arrayResponse; } - return handleNullableResponseAndWrappableBody({ - body: fullResponse.parsedBody, - headers: parsedHeaders, - hasNullableType: isNullable, - shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName), - }); + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, // agentObjectId + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); + return { + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId), + stringToSign: stringToSign, + }; } -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 35064: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ExtendedServiceClient = void 0; -const disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const core_client_1 = __nccwpck_require__(7611); -const response_js_1 = __nccwpck_require__(49283); /** - * Client to provide compatability between core V1 & V2. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. + * + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - */ -class ExtendedServiceClient extends core_client_1.ServiceClient { - constructor(options) { - var _a, _b; - super(options); - if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false && - !(0, disableKeepAlivePolicy_js_1.pipelineContainsDisableKeepAlivePolicy)(this.pipeline)) { - this.pipeline.addPolicy((0, disableKeepAlivePolicy_js_1.createDisableKeepAlivePolicy)()); +function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; } - if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) { - this.pipeline.removePolicy({ - name: core_rest_pipeline_1.redirectPolicyName, - }); + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; } } - /** - * Compatible send operation request function. - * - * @param operationArguments - Operation arguments - * @param operationSpec - Operation Spec - * @returns - */ - async sendOperationRequest(operationArguments, operationSpec) { - var _a; - const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse; - let lastResponse; - function onResponse(rawResponse, flatResponse, error) { - lastResponse = rawResponse; - if (userProvidedCallBack) { - userProvidedCallBack(rawResponse, flatResponse, error); - } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } - operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse }); - const result = await super.sendOperationRequest(operationArguments, operationSpec); - if (lastResponse) { - Object.defineProperty(result, "_response", { - value: (0, response_js_1.toCompatResponse)(lastResponse), - }); + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); } - return result; } -} -exports.ExtendedServiceClient = ExtendedServiceClient; -//# sourceMappingURL=extendedClient.js.map - -/***/ }), - -/***/ 23256: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.convertHttpClient = convertHttpClient; -const response_js_1 = __nccwpck_require__(49283); -const util_js_1 = __nccwpck_require__(43732); -/** - * Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient. - * @param requestPolicyClient - A HttpClient compatible with core-http - * @returns A HttpClient compatible with core-rest-pipeline - */ -function convertHttpClient(requestPolicyClient) { + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, // agentObjectId + blobSASSignatureValues.correlationId, + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - sendRequest: async (request) => { - const response = await requestPolicyClient.sendRequest((0, util_js_1.toWebResourceLike)(request, { createProxy: true })); - return (0, response_js_1.toPipelineResponse)(response); - }, + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign: stringToSign, }; } -//# sourceMappingURL=httpClientAdapter.js.map - -/***/ }), - -/***/ 25083: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toHttpHeadersLike = exports.convertHttpClient = exports.disableKeepAlivePolicyName = exports.HttpPipelineLogLevel = exports.createRequestPolicyFactoryPolicy = exports.requestPolicyFactoryPolicyName = exports.ExtendedServiceClient = void 0; /** - * A Shim Library that provides compatibility between Core V1 & V2 Packages. + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * IMPLEMENTATION FOR API VERSION FROM 2020-12-06. * - * @packageDocumentation + * Creates an instance of SASQueryParameters. + * + * Only accepts required settings needed to create a SAS. For optional settings please + * set corresponding properties directly, such as permissions, startsOn. + * + * WARNING: identifier will be ignored, permissions and expiresOn are required. + * + * @param blobSASSignatureValues - + * @param userDelegationKeyCredential - */ -var extendedClient_js_1 = __nccwpck_require__(35064); -Object.defineProperty(exports, "ExtendedServiceClient", ({ enumerable: true, get: function () { return extendedClient_js_1.ExtendedServiceClient; } })); -var requestPolicyFactoryPolicy_js_1 = __nccwpck_require__(98241); -Object.defineProperty(exports, "requestPolicyFactoryPolicyName", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.requestPolicyFactoryPolicyName; } })); -Object.defineProperty(exports, "createRequestPolicyFactoryPolicy", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.createRequestPolicyFactoryPolicy; } })); -Object.defineProperty(exports, "HttpPipelineLogLevel", ({ enumerable: true, get: function () { return requestPolicyFactoryPolicy_js_1.HttpPipelineLogLevel; } })); -var disableKeepAlivePolicy_js_1 = __nccwpck_require__(75840); -Object.defineProperty(exports, "disableKeepAlivePolicyName", ({ enumerable: true, get: function () { return disableKeepAlivePolicy_js_1.disableKeepAlivePolicyName; } })); -var httpClientAdapter_js_1 = __nccwpck_require__(23256); -Object.defineProperty(exports, "convertHttpClient", ({ enumerable: true, get: function () { return httpClientAdapter_js_1.convertHttpClient; } })); -var util_js_1 = __nccwpck_require__(43732); -Object.defineProperty(exports, "toHttpHeadersLike", ({ enumerable: true, get: function () { return util_js_1.toHttpHeadersLike; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 75840: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.disableKeepAlivePolicyName = void 0; -exports.createDisableKeepAlivePolicy = createDisableKeepAlivePolicy; -exports.pipelineContainsDisableKeepAlivePolicy = pipelineContainsDisableKeepAlivePolicy; -exports.disableKeepAlivePolicyName = "DisableKeepAlivePolicy"; -function createDisableKeepAlivePolicy() { +function generateBlobSASQueryParametersUDK20250705(blobSASSignatureValues, userDelegationKeyCredential) { + blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues); + // Stored access policies are not supported for a user delegation SAS. + if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) { + throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS."); + } + let resource = "c"; + let timestamp = blobSASSignatureValues.snapshotTime; + if (blobSASSignatureValues.blobName) { + resource = "b"; + if (blobSASSignatureValues.snapshotTime) { + resource = "bs"; + } + else if (blobSASSignatureValues.versionId) { + resource = "bv"; + timestamp = blobSASSignatureValues.versionId; + } + } + // Calling parse and toString guarantees the proper ordering and throws on invalid characters. + let verifiedPermissions; + if (blobSASSignatureValues.permissions) { + if (blobSASSignatureValues.blobName) { + verifiedPermissions = BlobSASPermissions_js_1.BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + else { + verifiedPermissions = ContainerSASPermissions_js_1.ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString(); + } + } + // Signature is generated on the un-url-encoded values. + const stringToSign = [ + verifiedPermissions ? verifiedPermissions : "", + blobSASSignatureValues.startsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.startsOn, false) + : "", + blobSASSignatureValues.expiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(blobSASSignatureValues.expiresOn, false) + : "", + getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName), + userDelegationKeyCredential.userDelegationKey.signedObjectId, + userDelegationKeyCredential.userDelegationKey.signedTenantId, + userDelegationKeyCredential.userDelegationKey.signedStartsOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedExpiresOn + ? (0, utils_common_js_1.truncatedISO8061Date)(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false) + : "", + userDelegationKeyCredential.userDelegationKey.signedService, + userDelegationKeyCredential.userDelegationKey.signedVersion, + blobSASSignatureValues.preauthorizedAgentObjectId, + undefined, // agentObjectId + blobSASSignatureValues.correlationId, + undefined, // SignedKeyDelegatedUserTenantId, will be added in a future release. + undefined, // SignedDelegatedUserObjectId, will be added in future release. + blobSASSignatureValues.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(blobSASSignatureValues.ipRange) : "", + blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : "", + blobSASSignatureValues.version, + resource, + timestamp, + blobSASSignatureValues.encryptionScope, + blobSASSignatureValues.cacheControl, + blobSASSignatureValues.contentDisposition, + blobSASSignatureValues.contentEncoding, + blobSASSignatureValues.contentLanguage, + blobSASSignatureValues.contentType, + ].join("\n"); + const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign); return { - name: exports.disableKeepAlivePolicyName, - async sendRequest(request, next) { - request.disableKeepAlive = true; - return next(request); - }, + sasQueryParameters: new SASQueryParameters_js_1.SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope), + stringToSign: stringToSign, }; } -/** - * @internal - */ -function pipelineContainsDisableKeepAlivePolicy(pipeline) { - return pipeline.getOrderedPolicies().some((policy) => policy.name === exports.disableKeepAlivePolicyName); -} -//# sourceMappingURL=disableKeepAlivePolicy.js.map - -/***/ }), - -/***/ 98241: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.requestPolicyFactoryPolicyName = exports.HttpPipelineLogLevel = void 0; -exports.createRequestPolicyFactoryPolicy = createRequestPolicyFactoryPolicy; -const util_js_1 = __nccwpck_require__(43732); -const response_js_1 = __nccwpck_require__(49283); -/** - * An enum for compatibility with RequestPolicy - */ -var HttpPipelineLogLevel; -(function (HttpPipelineLogLevel) { - HttpPipelineLogLevel[HttpPipelineLogLevel["ERROR"] = 1] = "ERROR"; - HttpPipelineLogLevel[HttpPipelineLogLevel["INFO"] = 3] = "INFO"; - HttpPipelineLogLevel[HttpPipelineLogLevel["OFF"] = 0] = "OFF"; - HttpPipelineLogLevel[HttpPipelineLogLevel["WARNING"] = 2] = "WARNING"; -})(HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = HttpPipelineLogLevel = {})); -const mockRequestPolicyOptions = { - log(_logLevel, _message) { - /* do nothing */ - }, - shouldLog(_logLevel) { - return false; - }, -}; -/** - * The name of the RequestPolicyFactoryPolicy - */ -exports.requestPolicyFactoryPolicyName = "RequestPolicyFactoryPolicy"; -/** - * A policy that wraps policies written for core-http. - * @param factories - An array of `RequestPolicyFactory` objects from a core-http pipeline - */ -function createRequestPolicyFactoryPolicy(factories) { - const orderedFactories = factories.slice().reverse(); - return { - name: exports.requestPolicyFactoryPolicyName, - async sendRequest(request, next) { - let httpPipeline = { - async sendRequest(httpRequest) { - const response = await next((0, util_js_1.toPipelineRequest)(httpRequest)); - return (0, response_js_1.toCompatResponse)(response, { createProxy: true }); - }, - }; - for (const factory of orderedFactories) { - httpPipeline = factory.create(httpPipeline, mockRequestPolicyOptions); - } - const webResourceLike = (0, util_js_1.toWebResourceLike)(request, { createProxy: true }); - const response = await httpPipeline.sendRequest(webResourceLike); - return (0, response_js_1.toPipelineResponse)(response); - }, - }; +function getCanonicalName(accountName, containerName, blobName) { + // Container: "/blob/account/containerName" + // Blob: "/blob/account/containerName/blobName" + const elements = [`/blob/${accountName}/${containerName}`]; + if (blobName) { + elements.push(`/${blobName}`); + } + return elements.join(""); } -//# sourceMappingURL=requestPolicyFactoryPolicy.js.map - -/***/ }), - -/***/ 49283: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCompatResponse = toCompatResponse; -exports.toPipelineResponse = toPipelineResponse; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -const util_js_1 = __nccwpck_require__(43732); -const originalResponse = Symbol("Original FullOperationResponse"); -/** - * A helper to convert response objects from the new pipeline back to the old one. - * @param response - A response object from core-client. - * @returns A response compatible with `HttpOperationResponse` from core-http. - */ -function toCompatResponse(response, options) { - let request = (0, util_js_1.toWebResourceLike)(response.request); - let headers = (0, util_js_1.toHttpHeadersLike)(response.headers); - if (options === null || options === void 0 ? void 0 : options.createProxy) { - return new Proxy(response, { - get(target, prop, receiver) { - if (prop === "headers") { - return headers; - } - else if (prop === "request") { - return request; - } - else if (prop === originalResponse) { - return response; - } - return Reflect.get(target, prop, receiver); - }, - set(target, prop, value, receiver) { - if (prop === "headers") { - headers = value; - } - else if (prop === "request") { - request = value; - } - return Reflect.set(target, prop, value, receiver); - }, - }); +function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) { + const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : constants_js_1.SERVICE_VERSION; + if (blobSASSignatureValues.snapshotTime && version < "2018-11-09") { + throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'."); } - else { - return Object.assign(Object.assign({}, response), { request, - headers }); + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) { + throw RangeError("Must provide 'blobName' when providing 'snapshotTime'."); } -} -/** - * A helper to convert back to a PipelineResponse - * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http. - */ -function toPipelineResponse(compatResponse) { - const extendedCompatResponse = compatResponse; - const response = extendedCompatResponse[originalResponse]; - const headers = (0, core_rest_pipeline_1.createHttpHeaders)(compatResponse.headers.toJson({ preserveCase: true })); - if (response) { - response.headers = headers; - return response; + if (blobSASSignatureValues.versionId && version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'."); } - else { - return Object.assign(Object.assign({}, compatResponse), { headers, request: (0, util_js_1.toPipelineRequest)(compatResponse.request) }); + if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) { + throw RangeError("Must provide 'blobName' when providing 'versionId'."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.setImmutabilityPolicy && + version < "2020-08-04") { + throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.deleteVersion && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.permanentDelete && + version < "2019-10-10") { + throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission."); + } + if (blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.tag && + version < "2019-12-12") { + throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission."); + } + if (version < "2020-02-10" && + blobSASSignatureValues.permissions && + (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) { + throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission."); + } + if (version < "2021-04-10" && + blobSASSignatureValues.permissions && + blobSASSignatureValues.permissions.filterByTags) { + throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission."); + } + if (version < "2020-02-10" && + (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) { + throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'."); + } + if (blobSASSignatureValues.encryptionScope && version < "2020-12-06") { + throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS."); } + blobSASSignatureValues.version = version; + return blobSASSignatureValues; } -//# sourceMappingURL=response.js.map +//# sourceMappingURL=BlobSASSignatureValues.js.map /***/ }), -/***/ 43732: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 27579: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpHeaders = void 0; -exports.toPipelineRequest = toPipelineRequest; -exports.toWebResourceLike = toWebResourceLike; -exports.toHttpHeadersLike = toHttpHeadersLike; -const core_rest_pipeline_1 = __nccwpck_require__(29146); -// We use a custom symbol to cache a reference to the original request without -// exposing it on the public interface. -const originalRequestSymbol = Symbol("Original PipelineRequest"); -// Symbol.for() will return the same symbol if it's already been created -// This particular one is used in core-client to handle the case of when a request is -// cloned but we need to retrieve the OperationSpec and OperationArguments from the -// original request. -const originalClientRequestSymbol = Symbol.for("@azure/core-client original request"); -function toPipelineRequest(webResource, options = {}) { - const compatWebResource = webResource; - const request = compatWebResource[originalRequestSymbol]; - const headers = (0, core_rest_pipeline_1.createHttpHeaders)(webResource.headers.toJson({ preserveCase: true })); - if (request) { - request.headers = headers; - return request; - } - else { - const newRequest = (0, core_rest_pipeline_1.createPipelineRequest)({ - url: webResource.url, - method: webResource.method, - headers, - withCredentials: webResource.withCredentials, - timeout: webResource.timeout, - requestId: webResource.requestId, - abortSignal: webResource.abortSignal, - body: webResource.body, - formData: webResource.formData, - disableKeepAlive: !!webResource.keepAlive, - onDownloadProgress: webResource.onDownloadProgress, - onUploadProgress: webResource.onUploadProgress, - proxySettings: webResource.proxySettings, - streamResponseStatusCodes: webResource.streamResponseStatusCodes, - agent: webResource.agent, - }); - if (options.originalRequest) { - newRequest[originalClientRequestSymbol] = - options.originalRequest; - } - return newRequest; - } -} -function toWebResourceLike(request, options) { - var _a; - const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request; - const webResource = { - url: request.url, - method: request.method, - headers: toHttpHeadersLike(request.headers), - withCredentials: request.withCredentials, - timeout: request.timeout, - requestId: request.headers.get("x-ms-client-request-id") || request.requestId, - abortSignal: request.abortSignal, - body: request.body, - formData: request.formData, - keepAlive: !!request.disableKeepAlive, - onDownloadProgress: request.onDownloadProgress, - onUploadProgress: request.onUploadProgress, - proxySettings: request.proxySettings, - streamResponseStatusCodes: request.streamResponseStatusCodes, - agent: request.agent, - clone() { - throw new Error("Cannot clone a non-proxied WebResourceLike"); - }, - prepare() { - throw new Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat"); - }, - validateRequestProperties() { - /** do nothing */ - }, - }; - if (options === null || options === void 0 ? void 0 : options.createProxy) { - return new Proxy(webResource, { - get(target, prop, receiver) { - if (prop === originalRequestSymbol) { - return request; - } - else if (prop === "clone") { - return () => { - return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), { - createProxy: true, - originalRequest, - }); - }; - } - return Reflect.get(target, prop, receiver); - }, - set(target, prop, value, receiver) { - if (prop === "keepAlive") { - request.disableKeepAlive = !value; - } - const passThroughProps = [ - "url", - "method", - "withCredentials", - "timeout", - "requestId", - "abortSignal", - "body", - "formData", - "onDownloadProgress", - "onUploadProgress", - "proxySettings", - "streamResponseStatusCodes", - "agent", - ]; - if (typeof prop === "string" && passThroughProps.includes(prop)) { - request[prop] = value; - } - return Reflect.set(target, prop, value, receiver); - }, - }); - } - else { - return webResource; - } -} -/** - * Converts HttpHeaders from core-rest-pipeline to look like - * HttpHeaders from core-http. - * @param headers - HttpHeaders from core-rest-pipeline - * @returns HttpHeaders as they looked in core-http - */ -function toHttpHeadersLike(headers) { - return new HttpHeaders(headers.toJSON({ preserveCase: true })); -} -/** - * A collection of HttpHeaders that can be sent with a HTTP request. - */ -function getHeaderKey(headerName) { - return headerName.toLowerCase(); -} +exports.ContainerSASPermissions = void 0; /** - * A collection of HTTP header key/value pairs. + * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. + * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. + * Once all the values are set, this should be serialized with toString and set as the permissions field on a + * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but + * the order of the permissions is particular and this class guarantees correctness. */ -class HttpHeaders { - constructor(rawHeaders) { - this._headersMap = {}; - if (rawHeaders) { - for (const headerName in rawHeaders) { - this.set(headerName, rawHeaders[headerName]); +class ContainerSASPermissions { + /** + * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an + * Error if it encounters a character that does not correspond to a valid permission. + * + * @param permissions - + */ + static parse(permissions) { + const containerSASPermissions = new ContainerSASPermissions(); + for (const char of permissions) { + switch (char) { + case "r": + containerSASPermissions.read = true; + break; + case "a": + containerSASPermissions.add = true; + break; + case "c": + containerSASPermissions.create = true; + break; + case "w": + containerSASPermissions.write = true; + break; + case "d": + containerSASPermissions.delete = true; + break; + case "l": + containerSASPermissions.list = true; + break; + case "t": + containerSASPermissions.tag = true; + break; + case "x": + containerSASPermissions.deleteVersion = true; + break; + case "m": + containerSASPermissions.move = true; + break; + case "e": + containerSASPermissions.execute = true; + break; + case "i": + containerSASPermissions.setImmutabilityPolicy = true; + break; + case "y": + containerSASPermissions.permanentDelete = true; + break; + case "f": + containerSASPermissions.filterByTags = true; + break; + default: + throw new RangeError(`Invalid permission ${char}`); } } + return containerSASPermissions; } /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param headerName - The name of the header to set. This value is case-insensitive. - * @param headerValue - The value of the header to set. + * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it + * and boolean values for them. + * + * @param permissionLike - */ - set(headerName, headerValue) { - this._headersMap[getHeaderKey(headerName)] = { - name: headerName, - value: headerValue.toString(), - }; + static from(permissionLike) { + const containerSASPermissions = new ContainerSASPermissions(); + if (permissionLike.read) { + containerSASPermissions.read = true; + } + if (permissionLike.add) { + containerSASPermissions.add = true; + } + if (permissionLike.create) { + containerSASPermissions.create = true; + } + if (permissionLike.write) { + containerSASPermissions.write = true; + } + if (permissionLike.delete) { + containerSASPermissions.delete = true; + } + if (permissionLike.list) { + containerSASPermissions.list = true; + } + if (permissionLike.deleteVersion) { + containerSASPermissions.deleteVersion = true; + } + if (permissionLike.tag) { + containerSASPermissions.tag = true; + } + if (permissionLike.move) { + containerSASPermissions.move = true; + } + if (permissionLike.execute) { + containerSASPermissions.execute = true; + } + if (permissionLike.setImmutabilityPolicy) { + containerSASPermissions.setImmutabilityPolicy = true; + } + if (permissionLike.permanentDelete) { + containerSASPermissions.permanentDelete = true; + } + if (permissionLike.filterByTags) { + containerSASPermissions.filterByTags = true; + } + return containerSASPermissions; } /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param headerName - The name of the header. + * Specifies Read access granted. */ - get(headerName) { - const header = this._headersMap[getHeaderKey(headerName)]; - return !header ? undefined : header.value; - } + read = false; /** - * Get whether or not this header collection contains a header entry for the provided header name. + * Specifies Add access granted. */ - contains(headerName) { - return !!this._headersMap[getHeaderKey(headerName)]; - } + add = false; /** - * Remove the header with the provided headerName. Return whether or not the header existed and - * was removed. - * @param headerName - The name of the header to remove. + * Specifies Create access granted. */ - remove(headerName) { - const result = this.contains(headerName); - delete this._headersMap[getHeaderKey(headerName)]; - return result; - } + create = false; /** - * Get the headers that are contained this collection as an object. + * Specifies Write access granted. */ - rawHeaders() { - return this.toJson({ preserveCase: true }); - } + write = false; /** - * Get the headers that are contained in this collection as an array. + * Specifies Delete access granted. */ - headersArray() { - const headers = []; - for (const headerKey in this._headersMap) { - headers.push(this._headersMap[headerKey]); - } - return headers; - } + delete = false; /** - * Get the header names that are contained in this collection. + * Specifies Delete version access granted. */ - headerNames() { - const headerNames = []; - const headers = this.headersArray(); - for (let i = 0; i < headers.length; ++i) { - headerNames.push(headers[i].name); - } - return headerNames; - } + deleteVersion = false; /** - * Get the header values that are contained in this collection. + * Specifies List access granted. */ - headerValues() { - const headerValues = []; - const headers = this.headersArray(); - for (let i = 0; i < headers.length; ++i) { - headerValues.push(headers[i].value); - } - return headerValues; - } + list = false; /** - * Get the JSON object representation of this HTTP header collection. + * Specfies Tag access granted. */ - toJson(options = {}) { - const result = {}; - if (options.preserveCase) { - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - result[header.name] = header.value; - } - } - else { - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - result[getHeaderKey(header.name)] = header.value; - } - } - return result; - } + tag = false; /** - * Get the string representation of this HTTP header collection. + * Specifies Move access granted. */ - toString() { - return JSON.stringify(this.toJson({ preserveCase: true })); - } + move = false; /** - * Create a deep clone/copy of this HttpHeaders collection. + * Specifies Execute access granted. */ - clone() { - const resultPreservingCasing = {}; - for (const headerKey in this._headersMap) { - const header = this._headersMap[headerKey]; - resultPreservingCasing[header.name] = header.value; + execute = false; + /** + * Specifies SetImmutabilityPolicy access granted. + */ + setImmutabilityPolicy = false; + /** + * Specifies that Permanent Delete is permitted. + */ + permanentDelete = false; + /** + * Specifies that Filter Blobs by Tags is permitted. + */ + filterByTags = false; + /** + * Converts the given permissions to a string. Using this method will guarantee the permissions are in an + * order accepted by the service. + * + * The order of the characters should be as specified here to ensure correctness. + * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas + * + */ + toString() { + const permissions = []; + if (this.read) { + permissions.push("r"); } - return new HttpHeaders(resultPreservingCasing); + if (this.add) { + permissions.push("a"); + } + if (this.create) { + permissions.push("c"); + } + if (this.write) { + permissions.push("w"); + } + if (this.delete) { + permissions.push("d"); + } + if (this.deleteVersion) { + permissions.push("x"); + } + if (this.list) { + permissions.push("l"); + } + if (this.tag) { + permissions.push("t"); + } + if (this.move) { + permissions.push("m"); + } + if (this.execute) { + permissions.push("e"); + } + if (this.setImmutabilityPolicy) { + permissions.push("i"); + } + if (this.permanentDelete) { + permissions.push("y"); + } + if (this.filterByTags) { + permissions.push("f"); + } + return permissions.join(""); } } -exports.HttpHeaders = HttpHeaders; -//# sourceMappingURL=util.js.map +exports.ContainerSASPermissions = ContainerSASPermissions; +//# sourceMappingURL=ContainerSASPermissions.js.map /***/ }), -/***/ 57759: +/***/ 21969: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pollHttpOperation = exports.isOperationError = exports.getResourceLocation = exports.getOperationStatus = exports.getOperationLocation = exports.initHttpOperation = exports.getStatusFromInitialResponse = exports.getErrorFromResponse = exports.parseRetryAfter = exports.inferLroMode = void 0; -const operation_js_1 = __nccwpck_require__(70281); -const logger_js_1 = __nccwpck_require__(28121); -function getOperationLocationPollingUrl(inputs) { - const { azureAsyncOperation, operationLocation } = inputs; - return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation; -} -function getLocationHeader(rawResponse) { - return rawResponse.headers["location"]; -} -function getOperationLocationHeader(rawResponse) { - return rawResponse.headers["operation-location"]; -} -function getAzureAsyncOperationHeader(rawResponse) { - return rawResponse.headers["azure-asyncoperation"]; -} -function findResourceLocation(inputs) { - var _a; - const { location, requestMethod, requestPath, resourceLocationConfig } = inputs; - switch (requestMethod) { - case "PUT": { - return requestPath; - } - case "DELETE": { - return undefined; - } - case "PATCH": { - return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath; - } - default: { - return getDefault(); - } - } - function getDefault() { - switch (resourceLocationConfig) { - case "azure-async-operation": { - return undefined; - } - case "original-uri": { - return requestPath; - } - case "location": - default: { - return location; - } - } - } -} -function inferLroMode(inputs) { - const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs; - const operationLocation = getOperationLocationHeader(rawResponse); - const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse); - const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation }); - const location = getLocationHeader(rawResponse); - const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase(); - if (pollingUrl !== undefined) { - return { - mode: "OperationLocation", - operationLocation: pollingUrl, - resourceLocation: findResourceLocation({ - requestMethod: normalizedRequestMethod, - location, - requestPath, - resourceLocationConfig, - }), - }; - } - else if (location !== undefined) { - return { - mode: "ResourceLocation", - operationLocation: location, - }; - } - else if (normalizedRequestMethod === "PUT" && requestPath) { - return { - mode: "Body", - operationLocation: requestPath, - }; - } - else { - return undefined; - } -} -exports.inferLroMode = inferLroMode; -function transformStatus(inputs) { - const { status, statusCode } = inputs; - if (typeof status !== "string" && status !== undefined) { - throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`); - } - switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) { - case undefined: - return toOperationStatus(statusCode); - case "succeeded": - return "succeeded"; - case "failed": - return "failed"; - case "running": - case "accepted": - case "started": - case "canceling": - case "cancelling": - return "running"; - case "canceled": - case "cancelled": - return "canceled"; - default: { - logger_js_1.logger.verbose(`LRO: unrecognized operation status: ${status}`); - return status; - } - } -} -function getStatus(rawResponse) { - var _a; - const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - return transformStatus({ status, statusCode: rawResponse.statusCode }); -} -function getProvisioningState(rawResponse) { - var _a, _b; - const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {}; - const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState; - return transformStatus({ status, statusCode: rawResponse.statusCode }); -} -function toOperationStatus(statusCode) { - if (statusCode === 202) { - return "running"; - } - else if (statusCode < 300) { - return "succeeded"; - } - else { - return "failed"; - } -} -function parseRetryAfter({ rawResponse }) { - const retryAfter = rawResponse.headers["retry-after"]; - if (retryAfter !== undefined) { - // Retry-After header value is either in HTTP date format, or in seconds - const retryAfterInSeconds = parseInt(retryAfter); - return isNaN(retryAfterInSeconds) - ? calculatePollingIntervalFromDate(new Date(retryAfter)) - : retryAfterInSeconds * 1000; - } - return undefined; -} -exports.parseRetryAfter = parseRetryAfter; -function getErrorFromResponse(response) { - const error = accessBodyProperty(response, "error"); - if (!error) { - logger_js_1.logger.warning(`The long-running operation failed but there is no error property in the response's body`); - return; - } - if (!error.code || !error.message) { - logger_js_1.logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`); - return; - } - return error; -} -exports.getErrorFromResponse = getErrorFromResponse; -function calculatePollingIntervalFromDate(retryAfterDate) { - const timeNow = Math.floor(new Date().getTime()); - const retryAfterTime = retryAfterDate.getTime(); - if (timeNow < retryAfterTime) { - return retryAfterTime - timeNow; - } - return undefined; -} -function getStatusFromInitialResponse(inputs) { - const { response, state, operationLocation } = inputs; - function helper() { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case undefined: - return toOperationStatus(response.rawResponse.statusCode); - case "Body": - return getOperationStatus(response, state); - default: - return "running"; - } - } - const status = helper(); - return status === "running" && operationLocation === undefined ? "succeeded" : status; -} -exports.getStatusFromInitialResponse = getStatusFromInitialResponse; +exports.SASQueryParameters = exports.SASProtocol = void 0; +const SasIPRange_js_1 = __nccwpck_require__(80914); +const utils_common_js_1 = __nccwpck_require__(16673); /** - * Initiates the long-running operation. + * Protocols for generated SAS. */ -async function initHttpOperation(inputs) { - const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs; - return (0, operation_js_1.initOperation)({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = inferLroMode({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig, - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); - }, - stateProxy, - processResult: processResult - ? ({ flatResponse }, state) => processResult(flatResponse, state) - : ({ flatResponse }) => flatResponse, - getOperationStatus: getStatusFromInitialResponse, - setErrorAsResult, - }); -} -exports.initHttpOperation = initHttpOperation; -function getOperationLocation({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getOperationLocationPollingUrl({ - operationLocation: getOperationLocationHeader(rawResponse), - azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse), - }); +var SASProtocol; +(function (SASProtocol) { + /** + * Protocol that allows HTTPS only + */ + SASProtocol["Https"] = "https"; + /** + * Protocol that allows both HTTPS and HTTP + */ + SASProtocol["HttpsAndHttp"] = "https,http"; +})(SASProtocol || (exports.SASProtocol = SASProtocol = {})); +/** + * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly + * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues} + * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should + * be taken here in case there are existing query parameters, which might affect the appropriate means of appending + * these query parameters). + * + * NOTE: Instances of this class are immutable. + */ +class SASQueryParameters { + /** + * The storage API version. + */ + version; + /** + * Optional. The allowed HTTP protocol(s). + */ + protocol; + /** + * Optional. The start time for this SAS token. + */ + startsOn; + /** + * Optional only when identifier is provided. The expiry time for this SAS token. + */ + expiresOn; + /** + * Optional only when identifier is provided. + * Please refer to {@link AccountSASPermissions}, {@link BlobSASPermissions}, or {@link ContainerSASPermissions} for + * more details. + */ + permissions; + /** + * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices} + * for more details. + */ + services; + /** + * Optional. The storage resource types being accessed (only for Account SAS). Please refer to + * {@link AccountSASResourceTypes} for more details. + */ + resourceTypes; + /** + * Optional. The signed identifier (only for {@link BlobSASSignatureValues}). + * + * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy + */ + identifier; + /** + * Optional. Encryption scope to use when sending requests authorized with this SAS URI. + */ + encryptionScope; + /** + * Optional. Specifies which resources are accessible via the SAS (only for {@link BlobSASSignatureValues}). + * @see https://learn.microsoft.com/rest/api/storageservices/create-service-sas#specifying-the-signed-resource-blob-service-only + */ + resource; + /** + * The signature for the SAS token. + */ + signature; + /** + * Value for cache-control header in Blob/File Service SAS. + */ + cacheControl; + /** + * Value for content-disposition header in Blob/File Service SAS. + */ + contentDisposition; + /** + * Value for content-encoding header in Blob/File Service SAS. + */ + contentEncoding; + /** + * Value for content-length header in Blob/File Service SAS. + */ + contentLanguage; + /** + * Value for content-type header in Blob/File Service SAS. + */ + contentType; + /** + * Inner value of getter ipRange. + */ + ipRangeInner; + /** + * The Azure Active Directory object ID in GUID format. + * Property of user delegation key. + */ + signedOid; + /** + * The Azure Active Directory tenant ID in GUID format. + * Property of user delegation key. + */ + signedTenantId; + /** + * The date-time the key is active. + * Property of user delegation key. + */ + signedStartsOn; + /** + * The date-time the key expires. + * Property of user delegation key. + */ + signedExpiresOn; + /** + * Abbreviation of the Azure Storage service that accepts the user delegation key. + * Property of user delegation key. + */ + signedService; + /** + * The service version that created the user delegation key. + * Property of user delegation key. + */ + signedVersion; + /** + * Authorized AAD Object ID in GUID format. The AAD Object ID of a user authorized by the owner of the User Delegation Key + * to perform the action granted by the SAS. The Azure Storage service will ensure that the owner of the user delegation key + * has the required permissions before granting access but no additional permission check for the user specified in + * this value will be performed. This is only used for User Delegation SAS. + */ + preauthorizedAgentObjectId; + /** + * A GUID value that will be logged in the storage diagnostic logs and can be used to correlate SAS generation with storage resource access. + * This is only used for User Delegation SAS. + */ + correlationId; + /** + * Optional. IP range allowed for this SAS. + * + * @readonly + */ + get ipRange() { + if (this.ipRangeInner) { + return { + end: this.ipRangeInner.end, + start: this.ipRangeInner.start, + }; } - case "ResourceLocation": { - return getLocationHeader(rawResponse); + return undefined; + } + constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) { + this.version = version; + this.signature = signature; + if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== "string") { + // SASQueryParametersOptions + this.permissions = permissionsOrOptions.permissions; + this.services = permissionsOrOptions.services; + this.resourceTypes = permissionsOrOptions.resourceTypes; + this.protocol = permissionsOrOptions.protocol; + this.startsOn = permissionsOrOptions.startsOn; + this.expiresOn = permissionsOrOptions.expiresOn; + this.ipRangeInner = permissionsOrOptions.ipRange; + this.identifier = permissionsOrOptions.identifier; + this.encryptionScope = permissionsOrOptions.encryptionScope; + this.resource = permissionsOrOptions.resource; + this.cacheControl = permissionsOrOptions.cacheControl; + this.contentDisposition = permissionsOrOptions.contentDisposition; + this.contentEncoding = permissionsOrOptions.contentEncoding; + this.contentLanguage = permissionsOrOptions.contentLanguage; + this.contentType = permissionsOrOptions.contentType; + if (permissionsOrOptions.userDelegationKey) { + this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId; + this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId; + this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn; + this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn; + this.signedService = permissionsOrOptions.userDelegationKey.signedService; + this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId; + this.correlationId = permissionsOrOptions.correlationId; + } } - case "Body": - default: { - return undefined; + else { + this.services = services; + this.resourceTypes = resourceTypes; + this.expiresOn = expiresOn; + this.permissions = permissionsOrOptions; + this.protocol = protocol; + this.startsOn = startsOn; + this.ipRangeInner = ipRange; + this.encryptionScope = encryptionScope; + this.identifier = identifier; + this.resource = resource; + this.cacheControl = cacheControl; + this.contentDisposition = contentDisposition; + this.contentEncoding = contentEncoding; + this.contentLanguage = contentLanguage; + this.contentType = contentType; + if (userDelegationKey) { + this.signedOid = userDelegationKey.signedObjectId; + this.signedTenantId = userDelegationKey.signedTenantId; + this.signedStartsOn = userDelegationKey.signedStartsOn; + this.signedExpiresOn = userDelegationKey.signedExpiresOn; + this.signedService = userDelegationKey.signedService; + this.signedVersion = userDelegationKey.signedVersion; + this.preauthorizedAgentObjectId = preauthorizedAgentObjectId; + this.correlationId = correlationId; + } } } -} -exports.getOperationLocation = getOperationLocation; -function getOperationStatus({ rawResponse }, state) { - var _a; - const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a["mode"]; - switch (mode) { - case "OperationLocation": { - return getStatus(rawResponse); + /** + * Encodes all SAS query parameters into a string that can be appended to a URL. + * + */ + toString() { + const params = [ + "sv", + "ss", + "srt", + "spr", + "st", + "se", + "sip", + "si", + "ses", + "skoid", // Signed object ID + "sktid", // Signed tenant ID + "skt", // Signed key start time + "ske", // Signed key expiry time + "sks", // Signed key service + "skv", // Signed key version + "sr", + "sp", + "sig", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "saoid", + "scid", + ]; + const queries = []; + for (const param of params) { + switch (param) { + case "sv": + this.tryAppendQueryParameter(queries, param, this.version); + break; + case "ss": + this.tryAppendQueryParameter(queries, param, this.services); + break; + case "srt": + this.tryAppendQueryParameter(queries, param, this.resourceTypes); + break; + case "spr": + this.tryAppendQueryParameter(queries, param, this.protocol); + break; + case "st": + this.tryAppendQueryParameter(queries, param, this.startsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.startsOn, false) : undefined); + break; + case "se": + this.tryAppendQueryParameter(queries, param, this.expiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.expiresOn, false) : undefined); + break; + case "sip": + this.tryAppendQueryParameter(queries, param, this.ipRange ? (0, SasIPRange_js_1.ipRangeToString)(this.ipRange) : undefined); + break; + case "si": + this.tryAppendQueryParameter(queries, param, this.identifier); + break; + case "ses": + this.tryAppendQueryParameter(queries, param, this.encryptionScope); + break; + case "skoid": // Signed object ID + this.tryAppendQueryParameter(queries, param, this.signedOid); + break; + case "sktid": // Signed tenant ID + this.tryAppendQueryParameter(queries, param, this.signedTenantId); + break; + case "skt": // Signed key start time + this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedStartsOn, false) : undefined); + break; + case "ske": // Signed key expiry time + this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? (0, utils_common_js_1.truncatedISO8061Date)(this.signedExpiresOn, false) : undefined); + break; + case "sks": // Signed key service + this.tryAppendQueryParameter(queries, param, this.signedService); + break; + case "skv": // Signed key version + this.tryAppendQueryParameter(queries, param, this.signedVersion); + break; + case "sr": + this.tryAppendQueryParameter(queries, param, this.resource); + break; + case "sp": + this.tryAppendQueryParameter(queries, param, this.permissions); + break; + case "sig": + this.tryAppendQueryParameter(queries, param, this.signature); + break; + case "rscc": + this.tryAppendQueryParameter(queries, param, this.cacheControl); + break; + case "rscd": + this.tryAppendQueryParameter(queries, param, this.contentDisposition); + break; + case "rsce": + this.tryAppendQueryParameter(queries, param, this.contentEncoding); + break; + case "rscl": + this.tryAppendQueryParameter(queries, param, this.contentLanguage); + break; + case "rsct": + this.tryAppendQueryParameter(queries, param, this.contentType); + break; + case "saoid": + this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId); + break; + case "scid": + this.tryAppendQueryParameter(queries, param, this.correlationId); + break; + } } - case "ResourceLocation": { - return toOperationStatus(rawResponse.statusCode); + return queries.join("&"); + } + /** + * A private helper method used to filter and append query key/value pairs into an array. + * + * @param queries - + * @param key - + * @param value - + */ + tryAppendQueryParameter(queries, key, value) { + if (!value) { + return; } - case "Body": { - return getProvisioningState(rawResponse); + key = encodeURIComponent(key); + value = encodeURIComponent(value); + if (key.length > 0 && value.length > 0) { + queries.push(`${key}=${value}`); } - default: - throw new Error(`Internal error: Unexpected operation mode: ${mode}`); - } -} -exports.getOperationStatus = getOperationStatus; -function accessBodyProperty({ flatResponse, rawResponse }, prop) { - var _a, _b; - return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop]; -} -function getResourceLocation(res, state) { - const loc = accessBodyProperty(res, "resourceLocation"); - if (loc && typeof loc === "string") { - state.config.resourceLocation = loc; } - return state.config.resourceLocation; -} -exports.getResourceLocation = getResourceLocation; -function isOperationError(e) { - return e.name === "RestError"; -} -exports.isOperationError = isOperationError; -/** Polls the long-running operation. */ -async function pollHttpOperation(inputs) { - const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs; - return (0, operation_js_1.pollOperation)({ - state, - stateProxy, - setDelay, - processResult: processResult - ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState) - : ({ flatResponse }) => flatResponse, - getError: getErrorFromResponse, - updateState, - getPollingInterval: parseRetryAfter, - getOperationLocation, - getOperationStatus, - isOperationError, - getResourceLocation, - options, - /** - * The expansion here is intentional because `lro` could be an object that - * references an inner this, so we need to preserve a reference to it. - */ - poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions), - setErrorAsResult, - }); } -exports.pollHttpOperation = pollHttpOperation; -//# sourceMappingURL=operation.js.map +exports.SASQueryParameters = SASQueryParameters; +//# sourceMappingURL=SASQueryParameters.js.map /***/ }), -/***/ 78412: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 80914: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpPoller = void 0; -const operation_js_1 = __nccwpck_require__(57759); -const poller_js_1 = __nccwpck_require__(76713); +exports.ipRangeToString = ipRangeToString; /** - * Creates a poller that can be used to poll a long-running operation. - * @param lro - Description of the long-running operation - * @param options - options to configure the poller - * @returns an initialized poller + * Generate SasIPRange format string. For example: + * + * "8.8.8.8" or "1.1.1.1-255.255.255.255" + * + * @param ipRange - */ -async function createHttpPoller(lro, options) { - const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {}; - return (0, poller_js_1.buildCreatePoller)({ - getStatusFromInitialResponse: operation_js_1.getStatusFromInitialResponse, - getStatusFromPollResponse: operation_js_1.getOperationStatus, - isOperationError: operation_js_1.isOperationError, - getOperationLocation: operation_js_1.getOperationLocation, - getResourceLocation: operation_js_1.getResourceLocation, - getPollingInterval: operation_js_1.parseRetryAfter, - getError: operation_js_1.getErrorFromResponse, - resolveOnUnsuccessful, - })({ - init: async () => { - const response = await lro.sendInitialRequest(); - const config = (0, operation_js_1.inferLroMode)({ - rawResponse: response.rawResponse, - requestPath: lro.requestPath, - requestMethod: lro.requestMethod, - resourceLocationConfig, - }); - return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {})); - }, - poll: lro.sendPollRequest, - }, { - intervalInMs, - withOperationLocation, - restoreFrom, - updateState, - processResult: processResult - ? ({ flatResponse }, state) => processResult(flatResponse, state) - : ({ flatResponse }) => flatResponse, - }); +function ipRangeToString(ipRange) { + return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start; } -exports.createHttpPoller = createHttpPoller; -//# sourceMappingURL=poller.js.map +//# sourceMappingURL=SasIPRange.js.map /***/ }), -/***/ 90334: +/***/ 93996: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpPoller = void 0; -const tslib_1 = __nccwpck_require__(4351); -var poller_js_1 = __nccwpck_require__(78412); -Object.defineProperty(exports, "createHttpPoller", ({ enumerable: true, get: function () { return poller_js_1.createHttpPoller; } })); +exports.Batch = void 0; +// In browser, during webpack or browserify bundling, this module will be replaced by 'events' +// https://github.com/Gozala/events +const events_1 = __nccwpck_require__(82361); /** - * This can be uncommented to expose the protocol-agnostic poller + * States for Batch. */ -// export { -// BuildCreatePollerOptions, -// Operation, -// CreatePollerOptions, -// OperationConfig, -// RestorableOperationState, -// } from "./poller/models"; -// export { buildCreatePoller } from "./poller/poller"; -/** legacy */ -tslib_1.__exportStar(__nccwpck_require__(52260), exports); -tslib_1.__exportStar(__nccwpck_require__(17270), exports); -tslib_1.__exportStar(__nccwpck_require__(93586), exports); -//# sourceMappingURL=index.js.map +var BatchStates; +(function (BatchStates) { + BatchStates[BatchStates["Good"] = 0] = "Good"; + BatchStates[BatchStates["Error"] = 1] = "Error"; +})(BatchStates || (BatchStates = {})); +/** + * Batch provides basic parallel execution with concurrency limits. + * Will stop execute left operations when one of the executed operation throws an error. + * But Batch cannot cancel ongoing operations, you need to cancel them by yourself. + */ +class Batch { + /** + * Concurrency. Must be lager than 0. + */ + concurrency; + /** + * Number of active operations under execution. + */ + actives = 0; + /** + * Number of completed operations under execution. + */ + completed = 0; + /** + * Offset of next operation to be executed. + */ + offset = 0; + /** + * Operation array to be executed. + */ + operations = []; + /** + * States of Batch. When an error happens, state will turn into error. + * Batch will stop execute left operations. + */ + state = BatchStates.Good; + /** + * A private emitter used to pass events inside this class. + */ + emitter; + /** + * Creates an instance of Batch. + * @param concurrency - + */ + constructor(concurrency = 5) { + if (concurrency < 1) { + throw new RangeError("concurrency must be larger than 0"); + } + this.concurrency = concurrency; + this.emitter = new events_1.EventEmitter(); + } + /** + * Add a operation into queue. + * + * @param operation - + */ + addOperation(operation) { + this.operations.push(async () => { + try { + this.actives++; + await operation(); + this.actives--; + this.completed++; + this.parallelExecute(); + } + catch (error) { + this.emitter.emit("error", error); + } + }); + } + /** + * Start execute operations in the queue. + * + */ + async do() { + if (this.operations.length === 0) { + return Promise.resolve(); + } + this.parallelExecute(); + return new Promise((resolve, reject) => { + this.emitter.on("finish", resolve); + this.emitter.on("error", (error) => { + this.state = BatchStates.Error; + reject(error); + }); + }); + } + /** + * Get next operation to be executed. Return null when reaching ends. + * + */ + nextOperation() { + if (this.offset < this.operations.length) { + return this.operations[this.offset++]; + } + return null; + } + /** + * Start execute operations. One one the most important difference between + * this method with do() is that do() wraps as an sync method. + * + */ + parallelExecute() { + if (this.state === BatchStates.Error) { + return; + } + if (this.completed >= this.operations.length) { + this.emitter.emit("finish"); + return; + } + while (this.actives < this.concurrency) { + const operation = this.nextOperation(); + if (operation) { + operation(); + } + else { + return; + } + } + } +} +exports.Batch = Batch; +//# sourceMappingURL=Batch.js.map /***/ }), -/***/ 52260: +/***/ 59028: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LroEngine = void 0; -var lroEngine_js_1 = __nccwpck_require__(35780); -Object.defineProperty(exports, "LroEngine", ({ enumerable: true, get: function () { return lroEngine_js_1.LroEngine; } })); -//# sourceMappingURL=index.js.map +exports.BlobQuickQueryStream = void 0; +const node_stream_1 = __nccwpck_require__(84492); +const index_js_1 = __nccwpck_require__(94382); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query. + */ +class BlobQuickQueryStream extends node_stream_1.Readable { + source; + avroReader; + avroIter; + avroPaused = true; + onProgress; + onError; + /** + * Creates an instance of BlobQuickQueryStream. + * + * @param source - The current ReadableStream returned from getter + * @param options - + */ + constructor(source, options = {}) { + super(); + this.source = source; + this.onProgress = options.onProgress; + this.onError = options.onError; + this.avroReader = new index_js_1.AvroReader(new index_js_1.AvroReadableFromStream(this.source)); + this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal }); + } + _read() { + if (this.avroPaused) { + this.readInternal().catch((err) => { + this.emit("error", err); + }); + } + } + async readInternal() { + this.avroPaused = false; + let avroNext; + do { + avroNext = await this.avroIter.next(); + if (avroNext.done) { + break; + } + const obj = avroNext.value; + const schema = obj.$schema; + if (typeof schema !== "string") { + throw Error("Missing schema in avro record."); + } + switch (schema) { + case "com.microsoft.azure.storage.queryBlobContents.resultData": + { + const data = obj.data; + if (data instanceof Uint8Array === false) { + throw Error("Invalid data in avro result record."); + } + if (!this.push(Buffer.from(data))) { + this.avroPaused = true; + } + } + break; + case "com.microsoft.azure.storage.queryBlobContents.progress": + { + const bytesScanned = obj.bytesScanned; + if (typeof bytesScanned !== "number") { + throw Error("Invalid bytesScanned in avro progress record."); + } + if (this.onProgress) { + this.onProgress({ loadedBytes: bytesScanned }); + } + } + break; + case "com.microsoft.azure.storage.queryBlobContents.end": + if (this.onProgress) { + const totalBytes = obj.totalBytes; + if (typeof totalBytes !== "number") { + throw Error("Invalid totalBytes in avro end record."); + } + this.onProgress({ loadedBytes: totalBytes }); + } + this.push(null); + break; + case "com.microsoft.azure.storage.queryBlobContents.error": + if (this.onError) { + const fatal = obj.fatal; + if (typeof fatal !== "boolean") { + throw Error("Invalid fatal in avro error record."); + } + const name = obj.name; + if (typeof name !== "string") { + throw Error("Invalid name in avro error record."); + } + const description = obj.description; + if (typeof description !== "string") { + throw Error("Invalid description in avro error record."); + } + const position = obj.position; + if (typeof position !== "number") { + throw Error("Invalid position in avro error record."); + } + this.onError({ + position, + name, + isFatal: fatal, + description, + }); + } + break; + default: + throw Error(`Unknown schema ${schema} in avro progress record.`); + } + } while (!avroNext.done && !this.avroPaused); + } +} +exports.BlobQuickQueryStream = BlobQuickQueryStream; +//# sourceMappingURL=BlobQuickQueryStream.js.map /***/ }), -/***/ 35780: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 25300: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LroEngine = void 0; -const operation_js_1 = __nccwpck_require__(77954); -const constants_js_1 = __nccwpck_require__(53846); -const poller_js_1 = __nccwpck_require__(17270); -const operation_js_2 = __nccwpck_require__(70281); +exports.Mutex = void 0; +var MutexLockStatus; +(function (MutexLockStatus) { + MutexLockStatus[MutexLockStatus["LOCKED"] = 0] = "LOCKED"; + MutexLockStatus[MutexLockStatus["UNLOCKED"] = 1] = "UNLOCKED"; +})(MutexLockStatus || (MutexLockStatus = {})); /** - * The LRO Engine, a class that performs polling. + * An async mutex lock. */ -class LroEngine extends poller_js_1.Poller { - constructor(lro, options) { - const { intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState, } = options || {}; - const state = resumeFrom - ? (0, operation_js_2.deserializeState)(resumeFrom) - : {}; - const operation = new operation_js_1.GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone); - super(operation); - this.resolveOnUnsuccessful = resolveOnUnsuccessful; - this.config = { intervalInMs: intervalInMs }; - operation.setPollerConfig(this.config); +class Mutex { + /** + * Lock for a specific key. If the lock has been acquired by another customer, then + * will wait until getting the lock. + * + * @param key - lock key + */ + static async lock(key) { + return new Promise((resolve) => { + if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + } + else { + this.onUnlockEvent(key, () => { + this.keys[key] = MutexLockStatus.LOCKED; + resolve(); + }); + } + }); } /** - * The method used by the poller to wait before attempting to update its operation. + * Unlock a key. + * + * @param key - */ - delay() { - return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs)); + static async unlock(key) { + return new Promise((resolve) => { + if (this.keys[key] === MutexLockStatus.LOCKED) { + this.emitUnlockEvent(key); + } + delete this.keys[key]; + resolve(); + }); + } + static keys = {}; + static listeners = {}; + static onUnlockEvent(key, handler) { + if (this.listeners[key] === undefined) { + this.listeners[key] = [handler]; + } + else { + this.listeners[key].push(handler); + } + } + static emitUnlockEvent(key) { + if (this.listeners[key] !== undefined && this.listeners[key].length > 0) { + const handler = this.listeners[key].shift(); + setImmediate(() => { + handler.call(this); + }); + } } } -exports.LroEngine = LroEngine; -//# sourceMappingURL=lroEngine.js.map +exports.Mutex = Mutex; +//# sourceMappingURL=Mutex.js.map /***/ }), -/***/ 77954: +/***/ 88251: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.GenericPollOperation = void 0; -const operation_js_1 = __nccwpck_require__(57759); -const logger_js_1 = __nccwpck_require__(28121); -const createStateProxy = () => ({ - initState: (config) => ({ config, isStarted: true }), - setCanceled: (state) => (state.isCancelled = true), - setError: (state, error) => (state.error = error), - setResult: (state, result) => (state.result = result), - setRunning: (state) => (state.isStarted = true), - setSucceeded: (state) => (state.isCompleted = true), - setFailed: () => { - /** empty body */ - }, - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => !!state.isCancelled, - isFailed: (state) => !!state.error, - isRunning: (state) => !!state.isStarted, - isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error), -}); -class GenericPollOperation { - constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) { - this.state = state; - this.lro = lro; - this.setErrorAsResult = setErrorAsResult; - this.lroResourceLocationConfig = lroResourceLocationConfig; - this.processResult = processResult; - this.updateState = updateState; - this.isDone = isDone; +exports.RetriableReadableStream = void 0; +const abort_controller_1 = __nccwpck_require__(1753); +const node_stream_1 = __nccwpck_require__(84492); +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends. + */ +class RetriableReadableStream extends node_stream_1.Readable { + start; + offset; + end; + getter; + source; + retries = 0; + maxRetryRequests; + onProgress; + options; + /** + * Creates an instance of RetriableReadableStream. + * + * @param source - The current ReadableStream returned from getter + * @param getter - A method calling downloading request returning + * a new ReadableStream from specified offset + * @param offset - Offset position in original data source to read + * @param count - How much data in original data source to read + * @param options - + */ + constructor(source, getter, offset, count, options = {}) { + super({ highWaterMark: options.highWaterMark }); + this.getter = getter; + this.source = source; + this.start = offset; + this.offset = offset; + this.end = offset + count - 1; + this.maxRetryRequests = + options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0; + this.onProgress = options.onProgress; + this.options = options; + this.setSourceEventHandlers(); } - setPollerConfig(pollerConfig) { - this.pollerConfig = pollerConfig; + _read() { + this.source.resume(); } - async update(options) { - var _a; - const stateProxy = createStateProxy(); - if (!this.state.isStarted) { - this.state = Object.assign(Object.assign({}, this.state), (await (0, operation_js_1.initHttpOperation)({ - lro: this.lro, - stateProxy, - resourceLocationConfig: this.lroResourceLocationConfig, - processResult: this.processResult, - setErrorAsResult: this.setErrorAsResult, - }))); + setSourceEventHandlers() { + this.source.on("data", this.sourceDataHandler); + this.source.on("end", this.sourceErrorOrEndHandler); + this.source.on("error", this.sourceErrorOrEndHandler); + // needed for Node14 + this.source.on("aborted", this.sourceAbortedHandler); + } + removeSourceEventHandlers() { + this.source.removeListener("data", this.sourceDataHandler); + this.source.removeListener("end", this.sourceErrorOrEndHandler); + this.source.removeListener("error", this.sourceErrorOrEndHandler); + this.source.removeListener("aborted", this.sourceAbortedHandler); + } + sourceDataHandler = (data) => { + if (this.options.doInjectErrorOnce) { + this.options.doInjectErrorOnce = undefined; + this.source.pause(); + this.sourceErrorOrEndHandler(); + this.source.destroy(); + return; } - const updateState = this.updateState; - const isDone = this.isDone; - if (!this.state.isCompleted && this.state.error === undefined) { - await (0, operation_js_1.pollHttpOperation)({ - lro: this.lro, - state: this.state, - stateProxy, - processResult: this.processResult, - updateState: updateState - ? (state, { rawResponse }) => updateState(state, rawResponse) - : undefined, - isDone: isDone - ? ({ flatResponse }, state) => isDone(flatResponse, state) - : undefined, - options, - setDelay: (intervalInMs) => { - this.pollerConfig.intervalInMs = intervalInMs; - }, - setErrorAsResult: this.setErrorAsResult, - }); + // console.log( + // `Offset: ${this.offset}, Received ${data.length} from internal stream` + // ); + this.offset += data.length; + if (this.onProgress) { + this.onProgress({ loadedBytes: this.offset - this.start }); } - (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state); - return this; - } - async cancel() { - logger_js_1.logger.error("`cancelOperation` is deprecated because it wasn't implemented"); - return this; + if (!this.push(data)) { + this.source.pause(); + } + }; + sourceAbortedHandler = () => { + const abortError = new abort_controller_1.AbortError("The operation was aborted."); + this.destroy(abortError); + }; + sourceErrorOrEndHandler = (err) => { + if (err && err.name === "AbortError") { + this.destroy(err); + return; + } + // console.log( + // `Source stream emits end or error, offset: ${ + // this.offset + // }, dest end : ${this.end}` + // ); + this.removeSourceEventHandlers(); + if (this.offset - 1 === this.end) { + this.push(null); + } + else if (this.offset <= this.end) { + // console.log( + // `retries: ${this.retries}, max retries: ${this.maxRetries}` + // ); + if (this.retries < this.maxRetryRequests) { + this.retries += 1; + this.getter(this.offset) + .then((newSource) => { + this.source = newSource; + this.setSourceEventHandlers(); + return; + }) + .catch((error) => { + this.destroy(error); + }); + } + else { + this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); + } + } + else { + this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); + } + }; + _destroy(error, callback) { + // remove listener from source and release source + this.removeSourceEventHandlers(); + this.source.destroy(); + callback(error === null ? undefined : error); } - /** - * Serializes the Poller operation. - */ - toString() { - return JSON.stringify({ - state: this.state, - }); +} +exports.RetriableReadableStream = RetriableReadableStream; +//# sourceMappingURL=RetriableReadableStream.js.map + +/***/ }), + +/***/ 35867: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.compareHeader = compareHeader; +/* + * We need to imitate .Net culture-aware sorting, which is used in storage service. + * Below tables contain sort-keys for en-US culture. + */ +const table_lv0 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721, + 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e, + 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a, + 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89, + 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748, + 0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, + 0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c, + 0x0, 0x750, 0x0, +]); +const table_lv2 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +const table_lv4 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; +} +function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1; + if (weight1 === 0x1 && weight2 === 0x1) { + i = 0; + j = 0; + ++curr_level; + } + else if (weight1 === weight2) { + ++i; + ++j; + } + else if (weight1 === 0) { + ++i; + } + else if (weight2 === 0) { + ++j; + } + else { + return weight1 < weight2; + } } + return false; } -exports.GenericPollOperation = GenericPollOperation; -//# sourceMappingURL=operation.js.map +//# sourceMappingURL=SharedKeyComparator.js.map /***/ }), -/***/ 93586: +/***/ 81865: /***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.PathStylePorts = exports.BlobDoesNotUseCustomerSpecifiedEncryption = exports.BlobUsesCustomerSpecifiedEncryptionMsg = exports.StorageBlobLoggingAllowedQueryParameters = exports.StorageBlobLoggingAllowedHeaderNames = exports.DevelopmentConnectionString = exports.EncryptionAlgorithmAES25 = exports.HTTP_VERSION_1_1 = exports.HTTP_LINE_ENDING = exports.BATCH_MAX_PAYLOAD_IN_BYTES = exports.BATCH_MAX_REQUEST = exports.SIZE_1_MB = exports.ETagAny = exports.ETagNone = exports.HeaderConstants = exports.HTTPURLConnection = exports.URLConstants = exports.StorageOAuthScopes = exports.REQUEST_TIMEOUT = exports.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = exports.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = exports.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = exports.BLOCK_BLOB_MAX_BLOCKS = exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = exports.SERVICE_VERSION = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "12.29.1"; +exports.SERVICE_VERSION = "2025-11-05"; +exports.BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB +exports.BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB +exports.BLOCK_BLOB_MAX_BLOCKS = 50000; +exports.DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB +exports.DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB +exports.DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; +exports.REQUEST_TIMEOUT = 100 * 1000; // In ms +/** + * The OAuth scope to use with Azure Storage. + */ +exports.StorageOAuthScopes = "https://storage.azure.com/.default"; +exports.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout", + }, +}; +exports.HTTPURLConnection = { + HTTP_ACCEPTED: 202, + HTTP_CONFLICT: 409, + HTTP_NOT_FOUND: 404, + HTTP_PRECON_FAILED: 412, + HTTP_RANGE_NOT_SATISFIABLE: 416, +}; +exports.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code", +}; +exports.ETagNone = ""; +exports.ETagAny = "*"; +exports.SIZE_1_MB = 1 * 1024 * 1024; +exports.BATCH_MAX_REQUEST = 256; +exports.BATCH_MAX_PAYLOAD_IN_BYTES = 4 * exports.SIZE_1_MB; +exports.HTTP_LINE_ENDING = "\r\n"; +exports.HTTP_VERSION_1_1 = "HTTP/1.1"; +exports.EncryptionAlgorithmAES25 = "AES256"; +exports.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; +exports.StorageBlobLoggingAllowedHeaderNames = [ + "Access-Control-Allow-Origin", + "Cache-Control", + "Content-Length", + "Content-Type", + "Date", + "Request-Id", + "traceparent", + "Transfer-Encoding", + "User-Agent", + "x-ms-client-request-id", + "x-ms-date", + "x-ms-error-code", + "x-ms-request-id", + "x-ms-return-client-request-id", + "x-ms-version", + "Accept-Ranges", + "Content-Disposition", + "Content-Encoding", + "Content-Language", + "Content-MD5", + "Content-Range", + "ETag", + "Last-Modified", + "Server", + "Vary", + "x-ms-content-crc64", + "x-ms-copy-action", + "x-ms-copy-completion-time", + "x-ms-copy-id", + "x-ms-copy-progress", + "x-ms-copy-status", + "x-ms-has-immutability-policy", + "x-ms-has-legal-hold", + "x-ms-lease-state", + "x-ms-lease-status", + "x-ms-range", + "x-ms-request-server-encrypted", + "x-ms-server-encrypted", + "x-ms-snapshot", + "x-ms-source-range", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Unmodified-Since", + "x-ms-access-tier", + "x-ms-access-tier-change-time", + "x-ms-access-tier-inferred", + "x-ms-account-kind", + "x-ms-archive-status", + "x-ms-blob-append-offset", + "x-ms-blob-cache-control", + "x-ms-blob-committed-block-count", + "x-ms-blob-condition-appendpos", + "x-ms-blob-condition-maxsize", + "x-ms-blob-content-disposition", + "x-ms-blob-content-encoding", + "x-ms-blob-content-language", + "x-ms-blob-content-length", + "x-ms-blob-content-md5", + "x-ms-blob-content-type", + "x-ms-blob-public-access", + "x-ms-blob-sequence-number", + "x-ms-blob-type", + "x-ms-copy-destination-snapshot", + "x-ms-creation-time", + "x-ms-default-encryption-scope", + "x-ms-delete-snapshots", + "x-ms-delete-type-permanent", + "x-ms-deny-encryption-scope-override", + "x-ms-encryption-algorithm", + "x-ms-if-sequence-number-eq", + "x-ms-if-sequence-number-le", + "x-ms-if-sequence-number-lt", + "x-ms-incremental-copy", + "x-ms-lease-action", + "x-ms-lease-break-period", + "x-ms-lease-duration", + "x-ms-lease-id", + "x-ms-lease-time", + "x-ms-page-write", + "x-ms-proposed-lease-id", + "x-ms-range-get-content-md5", + "x-ms-rehydrate-priority", + "x-ms-sequence-number-action", + "x-ms-sku-name", + "x-ms-source-content-md5", + "x-ms-source-if-match", + "x-ms-source-if-modified-since", + "x-ms-source-if-none-match", + "x-ms-source-if-unmodified-since", + "x-ms-tag-count", + "x-ms-encryption-key-sha256", + "x-ms-copy-source-error-code", + "x-ms-copy-source-status-code", + "x-ms-if-tags", + "x-ms-source-if-tags", +]; +exports.StorageBlobLoggingAllowedQueryParameters = [ + "comp", + "maxresults", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "se", + "si", + "sip", + "sp", + "spr", + "sr", + "srt", + "ss", + "st", + "sv", + "include", + "marker", + "prefix", + "copyid", + "restype", + "blockid", + "blocklisttype", + "delimiter", + "prevsnapshot", + "ske", + "skoid", + "sks", + "skt", + "sktid", + "skv", + "snapshot", +]; +exports.BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; +exports.BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; +/// List of ports used for path style addressing. +/// Path style addressing means that storage account is put in URI's Path segment in instead of in host. +exports.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104", +]; +//# sourceMappingURL=constants.js.map + +/***/ }), + +/***/ 53683: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=pollOperation.js.map +exports.tracingClient = void 0; +const core_tracing_1 = __nccwpck_require__(19363); +const constants_js_1 = __nccwpck_require__(81865); +/** + * Creates a span using the global tracer. + * @internal + */ +exports.tracingClient = (0, core_tracing_1.createTracingClient)({ + packageName: "@azure/storage-blob", + packageVersion: constants_js_1.SDK_VERSION, + namespace: "Microsoft.Storage", +}); +//# sourceMappingURL=tracing.js.map /***/ }), -/***/ 17270: -/***/ ((__unused_webpack_module, exports) => { +/***/ 16673: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Poller = exports.PollerCancelledError = exports.PollerStoppedError = void 0; +exports.escapeURLPath = escapeURLPath; +exports.getValueInConnString = getValueInConnString; +exports.extractConnectionStringParts = extractConnectionStringParts; +exports.appendToURLPath = appendToURLPath; +exports.setURLParameter = setURLParameter; +exports.getURLParameter = getURLParameter; +exports.setURLHost = setURLHost; +exports.getURLPath = getURLPath; +exports.getURLScheme = getURLScheme; +exports.getURLPathAndQuery = getURLPathAndQuery; +exports.getURLQueries = getURLQueries; +exports.appendToURLQuery = appendToURLQuery; +exports.truncatedISO8061Date = truncatedISO8061Date; +exports.base64encode = base64encode; +exports.base64decode = base64decode; +exports.generateBlockID = generateBlockID; +exports.delay = delay; +exports.padStart = padStart; +exports.sanitizeURL = sanitizeURL; +exports.sanitizeHeaders = sanitizeHeaders; +exports.iEqual = iEqual; +exports.getAccountNameFromUrl = getAccountNameFromUrl; +exports.isIpEndpointStyle = isIpEndpointStyle; +exports.toBlobTagsString = toBlobTagsString; +exports.toBlobTags = toBlobTags; +exports.toTags = toTags; +exports.toQuerySerialization = toQuerySerialization; +exports.parseObjectReplicationRecord = parseObjectReplicationRecord; +exports.attachCredential = attachCredential; +exports.httpAuthorizationToString = httpAuthorizationToString; +exports.BlobNameToString = BlobNameToString; +exports.ConvertInternalResponseOfListBlobFlat = ConvertInternalResponseOfListBlobFlat; +exports.ConvertInternalResponseOfListBlobHierarchy = ConvertInternalResponseOfListBlobHierarchy; +exports.ExtractPageRangeInfoItems = ExtractPageRangeInfoItems; +exports.EscapePath = EscapePath; +exports.assertResponse = assertResponse; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(81865); /** - * When a poller is manually stopped through the `stopPolling` method, - * the poller will be rejected with an instance of the PollerStoppedError. + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @param url - */ -class PollerStoppedError extends Error { - constructor(message) { - super(message); - this.name = "PollerStoppedError"; - Object.setPrototypeOf(this, PollerStoppedError.prototype); +function escapeURLPath(url) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path || "/"; + path = escape(path); + urlParsed.pathname = path; + return urlParsed.toString(); +} +function getProxyUriFromDevConnString(connectionString) { + // Development Connection String + // https://learn.microsoft.com/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } + } } + return proxyUri; +} +function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; + } + } + return ""; } -exports.PollerStoppedError = PollerStoppedError; /** - * When the operation is cancelled, the poller will be rejected with an instance - * of the PollerCancelledError. + * Extracts the parts of an Azure Storage account connection string. + * + * @param connectionString - Connection string. + * @returns String key value pairs of the storage account's url and credentials. */ -class PollerCancelledError extends Error { - constructor(message) { - super(message); - this.name = "PollerCancelledError"; - Object.setPrototypeOf(this, PollerCancelledError.prototype); +function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + // Development connection string + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + // Matching BlobEndpoint in the Account connection string + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + // Slicing off '/' at the end if exists + // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && + connectionString.search("AccountKey=") !== -1) { + // Account connection string + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + // Get account name and key + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + // BlobEndpoint is not present in the Account connection string + // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + } + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); + } + else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri, + }; + } + else { + // SAS connection string + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + // if accountName is empty, try to read it from BlobEndpoint + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } + else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + // client constructors assume accountSas does *not* start with ? + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } -exports.PollerCancelledError = PollerCancelledError; /** - * A class that represents the definition of a program that polls through consecutive requests - * until it reaches a state of completion. + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. * - * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed. - * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes. - * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation. + * @param text - + */ +function escape(text) { + return encodeURIComponent(text) + .replace(/%2F/g, "/") // Don't escape for "/" + .replace(/'/g, "%27") // Escape for "'" + .replace(/\+/g, "%20") + .replace(/%25/g, "%"); // Revert encoded "%" +} +/** + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". * - * ```ts - * const poller = new MyPoller(); + * @param url - Source URL string + * @param name - String to be appended to URL + * @returns An updated URL string + */ +function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name; + urlParsed.pathname = path; + return urlParsed.toString(); +} +/** + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. * - * // Polling just once: - * await poller.poll(); + * @param url - Source URL string + * @param name - Parameter name + * @param value - Parameter value + * @returns An updated URL string + */ +function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : undefined; + // mutating searchParams will change the encoding, so we have to do this ourselves + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } + } + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); + } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); +} +/** + * Get URL parameter by name. * - * // We can try to cancel the request here, by calling: - * // - * // await poller.cancelOperation(); - * // + * @param url - + * @param name - + */ +function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? undefined; +} +/** + * Set URL host. * - * // Getting the final result: - * const result = await poller.pollUntilDone(); - * ``` + * @param url - Source URL string + * @param host - New host string + * @returns An updated URL string + */ +function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); +} +/** + * Get URL path from an URL string. * - * The Poller is defined by two types, a type representing the state of the poller, which - * must include a basic set of properties from `PollOperationState`, - * and a return type defined by `TResult`, which can be anything. + * @param url - Source URL string + */ +function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } + catch (e) { + return undefined; + } +} +/** + * Get URL scheme from an URL string. * - * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having - * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type. + * @param url - Source URL string + */ +function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } + catch (e) { + return undefined; + } +} +/** + * Get URL path and query from an URL string. * - * ```ts - * class Client { - * public async makePoller: PollerLike { - * const poller = new MyPoller({}); - * // It might be preferred to return the poller after the first request is made, - * // so that some information can be obtained right away. - * await poller.poll(); - * return poller; - * } - * } + * @param url - Source URL string + */ +function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?' + } + return `${pathString}${queryString}`; +} +/** + * Get URL query key value pairs from an URL string. * - * const poller: PollerLike = myClient.makePoller(); - * ``` + * @param url - + */ +function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; + } + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; +} +/** + * Append a string to URL query. * - * A poller can be created through its constructor, then it can be polled until it's completed. - * At any point in time, the state of the poller can be obtained without delay through the getOperationState method. - * At any point in time, the intermediate forms of the result type can be requested without delay. - * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned. + * @param url - Source URL string. + * @param queryParts - String to be appended to the URL query. + * @returns An updated URL string. + */ +function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } + else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); +} +/** + * Rounds a date off to seconds. * - * ```ts - * const poller = myClient.makePoller(); - * const state: MyOperationState = poller.getOperationState(); + * @param date - + * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns Date string in ISO8061 format, with or without 7 milliseconds component + */ +function truncatedISO8061Date(date, withMilliseconds = true) { + // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" + const dateString = date.toISOString(); + return withMilliseconds + ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" + : dateString.substring(0, dateString.length - 5) + "Z"; +} +/** + * Base64 encode. * - * // The intermediate result can be obtained at any time. - * const result: MyResult | undefined = poller.getResult(); + * @param content - + */ +function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); +} +/** + * Base64 decode. * - * // The final result can only be obtained after the poller finishes. - * const result: MyResult = await poller.pollUntilDone(); - * ``` + * @param encodedString - + */ +function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); +} +/** + * Generate a 64 bytes base64 block ID string. * + * @param blockIndex - */ -// eslint-disable-next-line no-use-before-define -class Poller { - /** - * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`. - * - * When writing an implementation of a Poller, this implementation needs to deal with the initialization - * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's - * operation has already been defined, at least its basic properties. The code below shows how to approach - * the definition of the constructor of a new custom poller. - * - * ```ts - * export class MyPoller extends Poller { - * constructor({ - * // Anything you might need outside of the basics - * }) { - * let state: MyOperationState = { - * privateProperty: private, - * publicProperty: public, - * }; - * - * const operation = { - * state, - * update, - * cancel, - * toString - * } - * - * // Sending the operation to the parent's constructor. - * super(operation); - * - * // You can assign more local properties here. - * } - * } - * ``` - * - * Inside of this constructor, a new promise is created. This will be used to - * tell the user when the poller finishes (see `pollUntilDone()`). The promise's - * resolve and reject methods are also used internally to control when to resolve - * or reject anyone waiting for the poller to finish. - * - * The constructor of a custom implementation of a poller is where any serialized version of - * a previous poller's operation should be deserialized into the operation sent to the - * base constructor. For example: - * - * ```ts - * export class MyPoller extends Poller { - * constructor( - * baseOperation: string | undefined - * ) { - * let state: MyOperationState = {}; - * if (baseOperation) { - * state = { - * ...JSON.parse(baseOperation).state, - * ...state - * }; - * } - * const operation = { - * state, - * // ... - * } - * super(operation); - * } - * } - * ``` - * - * @param operation - Must contain the basic properties of `PollOperation`. - */ - constructor(operation) { - /** controls whether to throw an error if the operation failed or was canceled. */ - this.resolveOnUnsuccessful = false; - this.stopped = true; - this.pollProgressCallbacks = []; - this.operation = operation; - this.promise = new Promise((resolve, reject) => { - this.resolve = resolve; - this.reject = reject; - }); - // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown. - // The above warning would get thrown if `poller.poll` is called, it returns an error, - // and pullUntilDone did not have a .catch or await try/catch on it's return value. - this.promise.catch(() => { - /* intentionally blank */ - }); +function generateBlockID(blockIDPrefix, blockIndex) { + // To generate a 64 bytes base64 string, source string should be 48 + const maxSourceStringLength = 48; + // A blob can have a maximum of 100,000 uncommitted blocks at any given time + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); } - /** - * Starts a loop that will break only if the poller is done - * or if the poller is stopped. - */ - async startPolling(pollOptions = {}) { - if (this.stopped) { - this.stopped = false; - } - while (!this.isStopped() && !this.isDone()) { - await this.poll(pollOptions); - await this.delay(); + const res = blockIDPrefix + + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); +} +/** + * Delay specified time interval. + * + * @param timeInMs - + * @param aborter - + * @param abortError - + */ +async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + /* eslint-disable-next-line prefer-const */ + let timeout; + const abortHandler = () => { + if (timeout !== undefined) { + clearTimeout(timeout); + } + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== undefined) { + aborter.removeEventListener("abort", abortHandler); + } + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== undefined) { + aborter.addEventListener("abort", abortHandler); } + }); +} +/** + * String.prototype.padStart() + * + * @param currentString - + * @param targetLength - + * @param padString - + */ +function padStart(currentString, targetLength, padString = " ") { + // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); } - /** - * pollOnce does one polling, by calling to the update method of the underlying - * poll operation to make any relevant change effective. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - async pollOnce(options = {}) { - if (!this.isDone()) { - this.operation = await this.operation.update({ - abortSignal: options.abortSignal, - fireProgress: this.fireProgress.bind(this), - }); - } - this.processUpdatedState(); + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; } - /** - * fireProgress calls the functions passed in via onProgress the method of the poller. - * - * It loops over all of the callbacks received from onProgress, and executes them, sending them - * the current operation state. - * - * @param state - The current operation state. - */ - fireProgress(state) { - for (const callback of this.pollProgressCallbacks) { - callback(state); + else { + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); } + return padString.slice(0, targetLength) + currentString; } - /** - * Invokes the underlying operation's cancel method. - */ - async cancelOnce(options = {}) { - this.operation = await this.operation.cancel(options); - } - /** - * Returns a promise that will resolve once a single polling request finishes. - * It does this by calling the update method of the Poller's operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * @param options - Optional properties passed to the operation's update method. - */ - poll(options = {}) { - if (!this.pollOncePromise) { - this.pollOncePromise = this.pollOnce(options); - const clearPollOncePromise = () => { - this.pollOncePromise = undefined; - }; - this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject); - } - return this.pollOncePromise; +} +function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); } - processUpdatedState() { - if (this.operation.state.error) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - this.reject(this.operation.state.error); - throw this.operation.state.error; - } - } - if (this.operation.state.isCancelled) { - this.stopped = true; - if (!this.resolveOnUnsuccessful) { - const error = new PollerCancelledError("Operation was canceled"); - this.reject(error); - throw error; - } + return safeURL; +} +function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); } - if (this.isDone() && this.resolve) { - // If the poller has finished polling, this means we now have a result. - // However, it can be the case that TResult is instantiated to void, so - // we are not expecting a result anyway. To assert that we might not - // have a result eventually after finishing polling, we cast the result - // to TResult. - this.resolve(this.getResult()); + else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); } - } - /** - * Returns a promise that will resolve once the underlying operation is completed. - */ - async pollUntilDone(pollOptions = {}) { - if (this.stopped) { - this.startPolling(pollOptions).catch(this.reject); + else { + headers.set(name, value); } - // This is needed because the state could have been updated by - // `cancelOperation`, e.g. the operation is canceled or an error occurred. - this.processUpdatedState(); - return this.promise; - } - /** - * Invokes the provided callback after each polling is completed, - * sending the current state of the poller's operation. - * - * It returns a method that can be used to stop receiving updates on the given callback function. - */ - onProgress(callback) { - this.pollProgressCallbacks.push(callback); - return () => { - this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback); - }; - } - /** - * Returns true if the poller has finished polling. - */ - isDone() { - const state = this.operation.state; - return Boolean(state.isCompleted || state.isCancelled || state.error); } - /** - * Stops the poller from continuing to poll. - */ - stopPolling() { - if (!this.stopped) { - this.stopped = true; - if (this.reject) { - this.reject(new PollerStoppedError("This poller is already stopped")); - } + return headers; +} +/** + * If two strings are equal when compared case insensitive. + * + * @param str1 - + * @param str2 - + */ +function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); +} +/** + * Extracts account name from the url + * @param url - url to extract the account name from + * @returns with the account name + */ +function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + accountName = parsedUrl.hostname.split(".")[0]; } - } - /** - * Returns true if the poller is stopped. - */ - isStopped() { - return this.stopped; - } - /** - * Attempts to cancel the underlying operation. - * - * It only optionally receives an object with an abortSignal property, from \@azure/abort-controller's AbortSignalLike. - * - * If it's called again before it finishes, it will throw an error. - * - * @param options - Optional properties passed to the operation's update method. - */ - cancelOperation(options = {}) { - if (!this.cancelPromise) { - this.cancelPromise = this.cancelOnce(options); + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ + // .getPath() -> /devstoreaccount1/ + accountName = parsedUrl.pathname.split("/")[1]; } - else if (options.abortSignal) { - throw new Error("A cancel request is currently pending"); + else { + // Custom domain case: "https://customdomain.com/containername/blob". + accountName = ""; } - return this.cancelPromise; - } - /** - * Returns the state of the operation. - * - * Even though TState will be the same type inside any of the methods of any extension of the Poller class, - * implementations of the pollers can customize what's shared with the public by writing their own - * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller - * and a public type representing a safe to share subset of the properties of the internal state. - * Their definition of getOperationState can then return their public type. - * - * Example: - * - * ```ts - * // Let's say we have our poller's operation state defined as: - * interface MyOperationState extends PollOperationState { - * privateProperty?: string; - * publicProperty?: string; - * } - * - * // To allow us to have a true separation of public and private state, we have to define another interface: - * interface PublicState extends PollOperationState { - * publicProperty?: string; - * } - * - * // Then, we define our Poller as follows: - * export class MyPoller extends Poller { - * // ... More content is needed here ... - * - * public getOperationState(): PublicState { - * const state: PublicState = this.operation.state; - * return { - * // Properties from PollOperationState - * isStarted: state.isStarted, - * isCompleted: state.isCompleted, - * isCancelled: state.isCancelled, - * error: state.error, - * result: state.result, - * - * // The only other property needed by PublicState. - * publicProperty: state.publicProperty - * } - * } - * } - * ``` - * - * You can see this in the tests of this repository, go to the file: - * `../test/utils/testPoller.ts` - * and look for the getOperationState implementation. - */ - getOperationState() { - return this.operation.state; - } - /** - * Returns the result value of the operation, - * regardless of the state of the poller. - * It can return undefined or an incomplete form of the final TResult value - * depending on the implementation. - */ - getResult() { - const state = this.operation.state; - return state.result; + return accountName; } - /** - * Returns a serialized version of the poller's operation - * by invoking the operation's toString method. - */ - toString() { - return this.operation.toString(); + catch (error) { + throw new Error("Unable to extract accountName with provided information."); } } -exports.Poller = Poller; -//# sourceMappingURL=poller.js.map - -/***/ }), - -/***/ 28121: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logger = void 0; -const logger_1 = __nccwpck_require__(89497); +function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. + // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part. + // Case 3: Ipv4, use broad regex which just check if host contains Ipv4. + // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html. + return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || + (Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port))); +} /** - * The `@azure/logger` configuration for this package. - * @internal + * Convert Tags to encoded string. + * + * @param tags - */ -exports.logger = (0, logger_1.createClientLogger)("core-lro"); -//# sourceMappingURL=logger.js.map - -/***/ }), - -/***/ 53846: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.terminalStates = exports.POLL_INTERVAL_IN_MS = void 0; +function toBlobTagsString(tags) { + if (tags === undefined) { + return undefined; + } + const tagPairs = []; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; + tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`); + } + } + return tagPairs.join("&"); +} /** - * The default time interval to wait before sending the next polling request. + * Convert Tags type to BlobTags. + * + * @param tags - */ -exports.POLL_INTERVAL_IN_MS = 2000; +function toBlobTags(tags) { + if (tags === undefined) { + return undefined; + } + const res = { + blobTagSet: [], + }; + for (const key in tags) { + if (Object.prototype.hasOwnProperty.call(tags, key)) { + const value = tags[key]; + res.blobTagSet.push({ + key, + value, + }); + } + } + return res; +} /** - * The closed set of terminal states. + * Covert BlobTags to Tags type. + * + * @param tags - */ -exports.terminalStates = ["succeeded", "canceled", "failed"]; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 70281: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pollOperation = exports.initOperation = exports.deserializeState = void 0; -const logger_js_1 = __nccwpck_require__(28121); -const constants_js_1 = __nccwpck_require__(53846); +function toTags(tags) { + if (tags === undefined) { + return undefined; + } + const res = {}; + for (const blobTag of tags.blobTagSet) { + res[blobTag.key] = blobTag.value; + } + return res; +} /** - * Deserializes the state + * Convert BlobQueryTextConfiguration to QuerySerialization type. + * + * @param textConfiguration - */ -function deserializeState(serializedState) { - try { - return JSON.parse(serializedState).state; +function toQuerySerialization(textConfiguration) { + if (textConfiguration === undefined) { + return undefined; } - catch (e) { - throw new Error(`Unable to deserialize input state: ${serializedState}`); + switch (textConfiguration.kind) { + case "csv": + return { + format: { + type: "delimited", + delimitedTextConfiguration: { + columnSeparator: textConfiguration.columnSeparator || ",", + fieldQuote: textConfiguration.fieldQuote || "", + recordSeparator: textConfiguration.recordSeparator, + escapeChar: textConfiguration.escapeCharacter || "", + headersPresent: textConfiguration.hasHeaders || false, + }, + }, + }; + case "json": + return { + format: { + type: "json", + jsonTextConfiguration: { + recordSeparator: textConfiguration.recordSeparator, + }, + }, + }; + case "arrow": + return { + format: { + type: "arrow", + arrowConfiguration: { + schema: textConfiguration.schema, + }, + }, + }; + case "parquet": + return { + format: { + type: "parquet", + }, + }; + default: + throw Error("Invalid BlobQueryTextConfiguration."); } } -exports.deserializeState = deserializeState; -function setStateError(inputs) { - const { state, stateProxy, isOperationError } = inputs; - return (error) => { - if (isOperationError(error)) { - stateProxy.setError(state, error); - stateProxy.setFailed(state); +function parseObjectReplicationRecord(objectReplicationRecord) { + if (!objectReplicationRecord) { + return undefined; + } + if ("policy-id" in objectReplicationRecord) { + // If the dictionary contains a key with policy id, we are not required to do any parsing since + // the policy id should already be stored in the ObjectReplicationDestinationPolicyId. + return undefined; + } + const orProperties = []; + for (const key in objectReplicationRecord) { + const ids = key.split("_"); + const policyPrefix = "or-"; + if (ids[0].startsWith(policyPrefix)) { + ids[0] = ids[0].substring(policyPrefix.length); } - throw error; - }; + const rule = { + ruleId: ids[1], + replicationStatus: objectReplicationRecord[key], + }; + const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]); + if (policyIndex > -1) { + orProperties[policyIndex].rules.push(rule); + } + else { + orProperties.push({ + policyId: ids[0], + rules: [rule], + }); + } + } + return orProperties; } -function appendReadableErrorMessage(currentMessage, innerMessage) { - let message = currentMessage; - if (message.slice(-1) !== ".") { - message = message + "."; +/** + * Attach a TokenCredential to an object. + * + * @param thing - + * @param credential - + */ +function attachCredential(thing, credential) { + thing.credential = credential; + return thing; +} +function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; +} +function BlobNameToString(name) { + if (name.encoded) { + return decodeURIComponent(name.content); + } + else { + return name.content; } - return message + " " + innerMessage; } -function simplifyError(err) { - let message = err.message; - let code = err.code; - let curErr = err; - while (curErr.innererror) { - curErr = curErr.innererror; - code = curErr.code; - message = appendReadableErrorMessage(message, curErr.message); - } +function ConvertInternalResponseOfListBlobFlat(internalResponse) { return { - code, - message, + ...internalResponse, + segment: { + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name), + }; + return blobItem; + }), + }, }; } -function processOperationStatus(result) { - const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result; - switch (status) { - case "succeeded": { - stateProxy.setSucceeded(state); - break; - } - case "failed": { - const err = getError === null || getError === void 0 ? void 0 : getError(response); - let postfix = ""; - if (err) { - const { code, message } = simplifyError(err); - postfix = `. ${code}. ${message}`; - } - const errStr = `The long-running operation has failed${postfix}`; - stateProxy.setError(state, new Error(errStr)); - stateProxy.setFailed(state); - logger_js_1.logger.warning(errStr); - break; +function ConvertInternalResponseOfListBlobHierarchy(internalResponse) { + return { + ...internalResponse, + segment: { + blobPrefixes: internalResponse.segment.blobPrefixes?.map((blobPrefixInternal) => { + const blobPrefix = { + ...blobPrefixInternal, + name: BlobNameToString(blobPrefixInternal.name), + }; + return blobPrefix; + }), + blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => { + const blobItem = { + ...blobItemInteral, + name: BlobNameToString(blobItemInteral.name), + }; + return blobItem; + }), + }, + }; +} +function* ExtractPageRangeInfoItems(getPageRangesSegment) { + let pageRange = []; + let clearRange = []; + if (getPageRangesSegment.pageRange) + pageRange = getPageRangesSegment.pageRange; + if (getPageRangesSegment.clearRange) + clearRange = getPageRangesSegment.clearRange; + let pageRangeIndex = 0; + let clearRangeIndex = 0; + while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) { + if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false, + }; + ++pageRangeIndex; } - case "canceled": { - stateProxy.setCanceled(state); - break; + else { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true, + }; + ++clearRangeIndex; } } - if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) || - (isDone === undefined && - ["succeeded", "canceled"].concat(setErrorAsResult ? [] : ["failed"]).includes(status))) { - stateProxy.setResult(state, buildResult({ - response, - state, - processResult, - })); + for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) { + yield { + start: pageRange[pageRangeIndex].start, + end: pageRange[pageRangeIndex].end, + isClear: false, + }; + } + for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) { + yield { + start: clearRange[clearRangeIndex].start, + end: clearRange[clearRangeIndex].end, + isClear: true, + }; } -} -function buildResult(inputs) { - const { processResult, response, state } = inputs; - return processResult ? processResult(response, state) : response; } /** - * Initiates the long-running operation. + * Escape the blobName but keep path separator ('/'). */ -async function initOperation(inputs) { - const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs; - const { operationLocation, resourceLocation, metadata, response } = await init(); - if (operationLocation) - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - const config = { - metadata, - operationLocation, - resourceLocation, - }; - logger_js_1.logger.verbose(`LRO: Operation description:`, config); - const state = stateProxy.initState(config); - const status = getOperationStatus({ response, state, operationLocation }); - processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult }); - return state; -} -exports.initOperation = initOperation; -async function pollOperationHelper(inputs) { - const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs; - const response = await poll(operationLocation, options).catch(setStateError({ - state, - stateProxy, - isOperationError, - })); - const status = getOperationStatus(response, state); - logger_js_1.logger.verbose(`LRO: Status:\n\tPolling from: ${state.config.operationLocation}\n\tOperation status: ${status}\n\tPolling status: ${constants_js_1.terminalStates.includes(status) ? "Stopped" : "Running"}`); - if (status === "succeeded") { - const resourceLocation = getResourceLocation(response, state); - if (resourceLocation !== undefined) { - return { - response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })), - status, - }; - } +function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); } - return { response, status }; + return split.join("/"); } -/** Polls the long-running operation. */ -async function pollOperation(inputs) { - const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult, } = inputs; - const { operationLocation } = state.config; - if (operationLocation !== undefined) { - const { response, status } = await pollOperationHelper({ - poll, - getOperationStatus, - state, - stateProxy, - operationLocation, - getResourceLocation, - isOperationError, - options, - }); - processOperationStatus({ - status, - response, - state, - stateProxy, - isDone, - processResult, - getError, - setErrorAsResult, - }); - if (!constants_js_1.terminalStates.includes(status)) { - const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response); - if (intervalInMs) - setDelay(intervalInMs); - const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state); - if (location !== undefined) { - const isUpdated = operationLocation !== location; - state.config.operationLocation = location; - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated); - } - else - withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false); - } - updateState === null || updateState === void 0 ? void 0 : updateState(state, response); +/** + * A typesafe helper for ensuring that a given response object has + * the original _response attached. + * @param response - A response object from calling a client operation + * @returns The same object, but with known _response property + */ +function assertResponse(response) { + if (`_response` in response) { + return response; } + throw new TypeError(`Unexpected response object ${response}`); } -exports.pollOperation = pollOperation; -//# sourceMappingURL=operation.js.map +//# sourceMappingURL=utils.common.js.map /***/ }), -/***/ 76713: +/***/ 85157: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.buildCreatePoller = void 0; -const operation_js_1 = __nccwpck_require__(70281); -const constants_js_1 = __nccwpck_require__(53846); -const core_util_1 = __nccwpck_require__(80637); -const createStateProxy = () => ({ - /** - * The state at this point is created to be of type OperationState. - * It will be updated later to be of type TState when the - * customer-provided callback, `updateState`, is called during polling. - */ - initState: (config) => ({ status: "running", config }), - setCanceled: (state) => (state.status = "canceled"), - setError: (state, error) => (state.error = error), - setResult: (state, result) => (state.result = result), - setRunning: (state) => (state.status = "running"), - setSucceeded: (state) => (state.status = "succeeded"), - setFailed: (state) => (state.status = "failed"), - getError: (state) => state.error, - getResult: (state) => state.result, - isCanceled: (state) => state.status === "canceled", - isFailed: (state) => state.status === "failed", - isRunning: (state) => state.status === "running", - isSucceeded: (state) => state.status === "succeeded", -}); +exports.fsCreateReadStream = exports.fsStat = void 0; +exports.streamToBuffer = streamToBuffer; +exports.streamToBuffer2 = streamToBuffer2; +exports.streamToBuffer3 = streamToBuffer3; +exports.readStreamToLocalFile = readStreamToLocalFile; +const tslib_1 = __nccwpck_require__(4351); +const node_fs_1 = tslib_1.__importDefault(__nccwpck_require__(87561)); +const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(47261)); +const constants_js_1 = __nccwpck_require__(81865); /** - * Returns a poller factory. + * Reads a readable stream into buffer. Fill the buffer from offset to end. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param offset - From which position in the buffer to be filled, inclusive + * @param end - To which position in the buffer to be filled, exclusive + * @param encoding - Encoding of the Readable stream */ -function buildCreatePoller(inputs) { - const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful, } = inputs; - return async ({ init, poll }, options) => { - const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = constants_js_1.POLL_INTERVAL_IN_MS, restoreFrom, } = options || {}; - const stateProxy = createStateProxy(); - const withOperationLocation = withOperationLocationCallback - ? (() => { - let called = false; - return (operationLocation, isUpdated) => { - if (isUpdated) - withOperationLocationCallback(operationLocation); - else if (!called) - withOperationLocationCallback(operationLocation); - called = true; - }; - })() - : undefined; - const state = restoreFrom - ? (0, operation_js_1.deserializeState)(restoreFrom) - : await (0, operation_js_1.initOperation)({ - init, - stateProxy, - processResult, - getOperationStatus: getStatusFromInitialResponse, - withOperationLocation, - setErrorAsResult: !resolveOnUnsuccessful, - }); - let resultPromise; - const abortController = new AbortController(); - const handlers = new Map(); - const handleProgressEvents = async () => handlers.forEach((h) => h(state)); - const cancelErrMsg = "Operation was canceled"; - let currentPollIntervalInMs = intervalInMs; - const poller = { - getOperationState: () => state, - getResult: () => state.result, - isDone: () => ["succeeded", "failed", "canceled"].includes(state.status), - isStopped: () => resultPromise === undefined, - stopPolling: () => { - abortController.abort(); - }, - toString: () => JSON.stringify({ - state, - }), - onProgress: (callback) => { - const s = Symbol(); - handlers.set(s, callback); - return () => handlers.delete(s); - }, - pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - // In the future we can use AbortSignal.any() instead - function abortListener() { - abortController.abort(); - } - const abortSignal = abortController.signal; - if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) { - abortController.abort(); - } - else if (!abortSignal.aborted) { - inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true }); - } - try { - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - await (0, core_util_1.delay)(currentPollIntervalInMs, { abortSignal }); - await poller.poll({ abortSignal }); - } - } - } - finally { - inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener); - } - if (resolveOnUnsuccessful) { - return poller.getResult(); - } - else { - switch (state.status) { - case "succeeded": - return poller.getResult(); - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - case "notStarted": - case "running": - throw new Error(`Polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = undefined; - }))), - async poll(pollOptions) { - if (resolveOnUnsuccessful) { - if (poller.isDone()) - return; - } - else { - switch (state.status) { - case "succeeded": - return; - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - await (0, operation_js_1.pollOperation)({ - poll, - state, - stateProxy, - getOperationLocation, - isOperationError, - withOperationLocation, - getPollingInterval, - getOperationStatus: getStatusFromPollResponse, - getResourceLocation, - processResult, - getError, - updateState, - options: pollOptions, - setDelay: (pollIntervalInMs) => { - currentPollIntervalInMs = pollIntervalInMs; - }, - setErrorAsResult: !resolveOnUnsuccessful, - }); - await handleProgressEvents(); - if (!resolveOnUnsuccessful) { - switch (state.status) { - case "canceled": - throw new Error(cancelErrMsg); - case "failed": - throw state.error; - } - } - }, - }; - return poller; - }; +async function streamToBuffer(stream, buffer, offset, end, encoding) { + let pos = 0; // Position in stream + const count = end - offset; // Total amount of data needed in stream + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); + stream.on("readable", () => { + if (pos >= count) { + clearTimeout(timeout); + resolve(); + return; + } + let chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + // How much data needed in this chunk + const chunkLength = pos + chunk.length > count ? count - pos : chunk.length; + buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength); + pos += chunkLength; + }); + stream.on("end", () => { + clearTimeout(timeout); + if (pos < count) { + reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); + } + resolve(); + }); + stream.on("error", (msg) => { + clearTimeout(timeout); + reject(msg); + }); + }); } -exports.buildCreatePoller = buildCreatePoller; -//# sourceMappingURL=poller.js.map +/** + * Reads a readable stream into buffer entirely. + * + * @param stream - A Node.js Readable stream + * @param buffer - Buffer to be filled, length must greater than or equal to offset + * @param encoding - Encoding of the Readable stream + * @returns with the count of bytes read. + * @throws `RangeError` If buffer size is not big enough. + */ +async function streamToBuffer2(stream, buffer, encoding) { + let pos = 0; // Position in stream + const bufferSize = buffer.length; + return new Promise((resolve, reject) => { + stream.on("readable", () => { + let chunk = stream.read(); + if (!chunk) { + return; + } + if (typeof chunk === "string") { + chunk = Buffer.from(chunk, encoding); + } + if (pos + chunk.length > bufferSize) { + reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`)); + return; + } + buffer.fill(chunk, pos, pos + chunk.length); + pos += chunk.length; + }); + stream.on("end", () => { + resolve(pos); + }); + stream.on("error", reject); + }); +} +/** + * Reads a readable stream into a buffer. + * + * @param stream - A Node.js Readable stream + * @param encoding - Encoding of the Readable stream + * @returns with the count of bytes read. + */ +async function streamToBuffer3(readableStream, encoding) { + return new Promise((resolve, reject) => { + const chunks = []; + readableStream.on("data", (data) => { + chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); + }); + readableStream.on("end", () => { + resolve(Buffer.concat(chunks)); + }); + readableStream.on("error", reject); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed. + * + * @param rs - The read stream. + * @param file - Destination file path. + */ +async function readStreamToLocalFile(rs, file) { + return new Promise((resolve, reject) => { + const ws = node_fs_1.default.createWriteStream(file); + rs.on("error", (err) => { + reject(err); + }); + ws.on("error", (err) => { + reject(err); + }); + ws.on("close", resolve); + rs.pipe(ws); + }); +} +/** + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * Promisified version of fs.stat(). + */ +exports.fsStat = node_util_1.default.promisify(node_fs_1.default.stat); +exports.fsCreateReadStream = node_fs_1.default.createReadStream; +//# sourceMappingURL=utils.js.map /***/ }), -/***/ 43171: +/***/ 58412: /***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; -exports.SDK_VERSION = "1.19.1"; -exports.DEFAULT_RETRY_POLICY_COUNT = 3; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 81060: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createPipelineFromOptions = createPipelineFromOptions; -const logPolicy_js_1 = __nccwpck_require__(46821); -const pipeline_js_1 = __nccwpck_require__(83906); -const redirectPolicy_js_1 = __nccwpck_require__(98526); -const userAgentPolicy_js_1 = __nccwpck_require__(88935); -const multipartPolicy_js_1 = __nccwpck_require__(19042); -const decompressResponsePolicy_js_1 = __nccwpck_require__(57618); -const defaultRetryPolicy_js_1 = __nccwpck_require__(48549); -const formDataPolicy_js_1 = __nccwpck_require__(16501); -const core_util_1 = __nccwpck_require__(80637); -const proxyPolicy_js_1 = __nccwpck_require__(94761); -const setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); -const agentPolicy_js_1 = __nccwpck_require__(15093); -const tlsPolicy_js_1 = __nccwpck_require__(88446); -const tracingPolicy_js_1 = __nccwpck_require__(80606); +exports.AbortError = void 0; /** - * Create a new pipeline with a default set of customizable policies. - * @param options - Options to configure a custom pipeline. + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` */ -function createPipelineFromOptions(options) { - var _a; - const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); - if (core_util_1.isNodeLike) { - if (options.agent) { - pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); - } - if (options.tlsOptions) { - pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); - } - pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); - pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); - } - pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); - pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); - pipeline.addPolicy((0, setClientRequestIdPolicy_js_1.setClientRequestIdPolicy)((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName)); - // The multipart policy is added after policies with no phase, so that - // policies can be added between it and formDataPolicy to modify - // properties (e.g., making the boundary constant in recorded tests). - pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); - pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); - pipeline.addPolicy((0, tracingPolicy_js_1.tracingPolicy)(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), { - afterPhase: "Retry", - }); - if (core_util_1.isNodeLike) { - // Both XHR and Fetch expect to handle redirects automatically, - // so only include this policy when we're in Node. - pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; } - pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); - return pipeline; } -//# sourceMappingURL=createPipelineFromOptions.js.map +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map /***/ }), -/***/ 88609: +/***/ 1753: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDefaultHttpClient = createDefaultHttpClient; -const nodeHttpClient_js_1 = __nccwpck_require__(49463); -/** - * Create the correct HttpClient for the current environment. - */ -function createDefaultHttpClient() { - return (0, nodeHttpClient_js_1.createNodeHttpClient)(); -} -//# sourceMappingURL=defaultHttpClient.js.map +exports.AbortError = void 0; +var AbortError_js_1 = __nccwpck_require__(58412); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 60118: -/***/ ((__unused_webpack_module, exports) => { +/***/ 80974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createHttpHeaders = createHttpHeaders; -function normalizeName(name) { - return name.toLowerCase(); -} -function* headerIterator(map) { - for (const entry of map.values()) { - yield [entry.name, entry.value]; - } -} -class HttpHeadersImpl { - constructor(rawHeaders) { - this._headersMap = new Map(); - if (rawHeaders) { - for (const headerName of Object.keys(rawHeaders)) { - this.set(headerName, rawHeaders[headerName]); - } - } - } +exports.BufferScheduler = void 0; +const events_1 = __nccwpck_require__(82361); +const PooledBuffer_js_1 = __nccwpck_require__(39474); +/** + * This class accepts a Node.js Readable stream as input, and keeps reading data + * from the stream into the internal buffer structure, until it reaches maxBuffers. + * Every available buffer will try to trigger outgoingHandler. + * + * The internal buffer structure includes an incoming buffer array, and a outgoing + * buffer array. The incoming buffer array includes the "empty" buffers can be filled + * with new incoming data. The outgoing array includes the filled buffers to be + * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize. + * + * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING + * + * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers + * + * PERFORMANCE IMPROVEMENT TIPS: + * 1. Input stream highWaterMark is better to set a same value with bufferSize + * parameter, which will avoid Buffer.concat() operations. + * 2. concurrency should set a smaller value than maxBuffers, which is helpful to + * reduce the possibility when a outgoing handler waits for the stream data. + * in this situation, outgoing handlers are blocked. + * Outgoing queue shouldn't be empty. + */ +class BufferScheduler { /** - * Set a header in this collection with the provided name and value. The name is - * case-insensitive. - * @param name - The name of the header to set. This value is case-insensitive. - * @param value - The value of the header to set. + * Size of buffers in incoming and outgoing queues. This class will try to align + * data read from Readable stream into buffer chunks with bufferSize defined. */ - set(name, value) { - this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); - } + bufferSize; /** - * Get the header value for the provided header name, or undefined if no header exists in this - * collection with the provided name. - * @param name - The name of the header. This value is case-insensitive. + * How many buffers can be created or maintained. */ - get(name) { - var _a; - return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value; - } + maxBuffers; /** - * Get whether or not this header collection contains a header entry for the provided header name. - * @param name - The name of the header to set. This value is case-insensitive. + * A Node.js Readable stream. */ - has(name) { - return this._headersMap.has(normalizeName(name)); - } + readable; /** - * Remove the header with the provided headerName. - * @param name - The name of the header to remove. + * OutgoingHandler is an async function triggered by BufferScheduler when there + * are available buffers in outgoing array. */ - delete(name) { - this._headersMap.delete(normalizeName(name)); - } + outgoingHandler; /** - * Get the JSON object representation of this HTTP header collection. + * An internal event emitter. */ - toJSON(options = {}) { - const result = {}; - if (options.preserveCase) { - for (const entry of this._headersMap.values()) { - result[entry.name] = entry.value; - } - } - else { - for (const [normalizedName, entry] of this._headersMap) { - result[normalizedName] = entry.value; - } - } - return result; - } + emitter = new events_1.EventEmitter(); /** - * Get the string representation of this HTTP header collection. + * Concurrency of executing outgoingHandlers. (0 lesser than concurrency lesser than or equal to maxBuffers) */ - toString() { - return JSON.stringify(this.toJSON({ preserveCase: true })); - } + concurrency; /** - * Iterate over tuples of header [name, value] pairs. + * An internal offset marker to track data offset in bytes of next outgoingHandler. */ - [Symbol.iterator]() { - return headerIterator(this._headersMap); - } -} -/** - * Creates an object that satisfies the `HttpHeaders` interface. - * @param rawHeaders - A simple object representing initial headers - */ -function createHttpHeaders(rawHeaders) { - return new HttpHeadersImpl(rawHeaders); -} -//# sourceMappingURL=httpHeaders.js.map - -/***/ }), - -/***/ 29146: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createFileFromStream = exports.createFile = exports.agentPolicyName = exports.agentPolicy = exports.auxiliaryAuthenticationHeaderPolicyName = exports.auxiliaryAuthenticationHeaderPolicy = exports.ndJsonPolicyName = exports.ndJsonPolicy = exports.bearerTokenAuthenticationPolicyName = exports.bearerTokenAuthenticationPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.userAgentPolicyName = exports.userAgentPolicy = exports.defaultRetryPolicy = exports.tracingPolicyName = exports.tracingPolicy = exports.retryPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.setClientRequestIdPolicyName = exports.setClientRequestIdPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.isRestError = exports.RestError = exports.createPipelineRequest = exports.createHttpHeaders = exports.createDefaultHttpClient = exports.createPipelineFromOptions = exports.createEmptyPipeline = void 0; -var pipeline_js_1 = __nccwpck_require__(83906); -Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); -var createPipelineFromOptions_js_1 = __nccwpck_require__(81060); -Object.defineProperty(exports, "createPipelineFromOptions", ({ enumerable: true, get: function () { return createPipelineFromOptions_js_1.createPipelineFromOptions; } })); -var defaultHttpClient_js_1 = __nccwpck_require__(88609); -Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); -var httpHeaders_js_1 = __nccwpck_require__(60118); -Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); -var pipelineRequest_js_1 = __nccwpck_require__(93536); -Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); -var restError_js_1 = __nccwpck_require__(61036); -Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); -Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); -var decompressResponsePolicy_js_1 = __nccwpck_require__(57618); -Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); -Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); -var exponentialRetryPolicy_js_1 = __nccwpck_require__(1598); -Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); -Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); -var setClientRequestIdPolicy_js_1 = __nccwpck_require__(93860); -Object.defineProperty(exports, "setClientRequestIdPolicy", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicy; } })); -Object.defineProperty(exports, "setClientRequestIdPolicyName", ({ enumerable: true, get: function () { return setClientRequestIdPolicy_js_1.setClientRequestIdPolicyName; } })); -var logPolicy_js_1 = __nccwpck_require__(46821); -Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); -Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); -var multipartPolicy_js_1 = __nccwpck_require__(19042); -Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); -Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); -var proxyPolicy_js_1 = __nccwpck_require__(94761); -Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); -Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); -Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); -var redirectPolicy_js_1 = __nccwpck_require__(98526); -Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); -Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); -var systemErrorRetryPolicy_js_1 = __nccwpck_require__(72470); -Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); -Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); -var throttlingRetryPolicy_js_1 = __nccwpck_require__(54802); -Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); -Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); -var retryPolicy_js_1 = __nccwpck_require__(39700); -Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); -var tracingPolicy_js_1 = __nccwpck_require__(80606); -Object.defineProperty(exports, "tracingPolicy", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicy; } })); -Object.defineProperty(exports, "tracingPolicyName", ({ enumerable: true, get: function () { return tracingPolicy_js_1.tracingPolicyName; } })); -var defaultRetryPolicy_js_1 = __nccwpck_require__(48549); -Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); -var userAgentPolicy_js_1 = __nccwpck_require__(88935); -Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); -Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); -var tlsPolicy_js_1 = __nccwpck_require__(88446); -Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); -Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); -var formDataPolicy_js_1 = __nccwpck_require__(16501); -Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); -Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); -var bearerTokenAuthenticationPolicy_js_1 = __nccwpck_require__(11319); -Object.defineProperty(exports, "bearerTokenAuthenticationPolicy", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicy; } })); -Object.defineProperty(exports, "bearerTokenAuthenticationPolicyName", ({ enumerable: true, get: function () { return bearerTokenAuthenticationPolicy_js_1.bearerTokenAuthenticationPolicyName; } })); -var ndJsonPolicy_js_1 = __nccwpck_require__(82032); -Object.defineProperty(exports, "ndJsonPolicy", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicy; } })); -Object.defineProperty(exports, "ndJsonPolicyName", ({ enumerable: true, get: function () { return ndJsonPolicy_js_1.ndJsonPolicyName; } })); -var auxiliaryAuthenticationHeaderPolicy_js_1 = __nccwpck_require__(68152); -Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicy", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicy; } })); -Object.defineProperty(exports, "auxiliaryAuthenticationHeaderPolicyName", ({ enumerable: true, get: function () { return auxiliaryAuthenticationHeaderPolicy_js_1.auxiliaryAuthenticationHeaderPolicyName; } })); -var agentPolicy_js_1 = __nccwpck_require__(15093); -Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); -Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); -var file_js_1 = __nccwpck_require__(3224); -Object.defineProperty(exports, "createFile", ({ enumerable: true, get: function () { return file_js_1.createFile; } })); -Object.defineProperty(exports, "createFileFromStream", ({ enumerable: true, get: function () { return file_js_1.createFileFromStream; } })); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 30648: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logger = void 0; -const logger_1 = __nccwpck_require__(89497); -exports.logger = (0, logger_1.createClientLogger)("core-rest-pipeline"); -//# sourceMappingURL=log.js.map - -/***/ }), - -/***/ 49463: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getBodyLength = getBodyLength; -exports.createNodeHttpClient = createNodeHttpClient; -const tslib_1 = __nccwpck_require__(4351); -const http = tslib_1.__importStar(__nccwpck_require__(88849)); -const https = tslib_1.__importStar(__nccwpck_require__(22286)); -const zlib = tslib_1.__importStar(__nccwpck_require__(65628)); -const node_stream_1 = __nccwpck_require__(84492); -const abort_controller_1 = __nccwpck_require__(11514); -const httpHeaders_js_1 = __nccwpck_require__(60118); -const restError_js_1 = __nccwpck_require__(61036); -const log_js_1 = __nccwpck_require__(30648); -const sanitizer_js_1 = __nccwpck_require__(34472); -const DEFAULT_TLS_SETTINGS = {}; -function isReadableStream(body) { - return body && typeof body.pipe === "function"; -} -function isStreamComplete(stream) { - if (stream.readable === false) { - return Promise.resolve(); - } - return new Promise((resolve) => { - const handler = () => { - resolve(); - stream.removeListener("close", handler); - stream.removeListener("end", handler); - stream.removeListener("error", handler); - }; - stream.on("close", handler); - stream.on("end", handler); - stream.on("error", handler); - }); -} -function isArrayBuffer(body) { - return body && typeof body.byteLength === "number"; -} -class ReportTransform extends node_stream_1.Transform { - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - _transform(chunk, _encoding, callback) { - this.push(chunk); - this.loadedBytes += chunk.length; - try { - this.progressCallback({ loadedBytes: this.loadedBytes }); - callback(); - } - catch (e) { - callback(e); - } - } - constructor(progressCallback) { - super(); - this.loadedBytes = 0; - this.progressCallback = progressCallback; - } -} -/** - * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. - * @internal - */ -class NodeHttpClient { - constructor() { - this.cachedHttpsAgents = new WeakMap(); - } + offset = 0; /** - * Makes a request over an underlying transport layer and returns the response. - * @param request - The request to be made. + * An internal marker to track whether stream is end. */ - async sendRequest(request) { - var _a, _b, _c; - const abortController = new AbortController(); - let abortListener; - if (request.abortSignal) { - if (request.abortSignal.aborted) { - throw new abort_controller_1.AbortError("The operation was aborted. Request has already been canceled."); - } - abortListener = (event) => { - if (event.type === "abort") { - abortController.abort(); - } - }; - request.abortSignal.addEventListener("abort", abortListener); - } - let timeoutId; - if (request.timeout > 0) { - timeoutId = setTimeout(() => { - const sanitizer = new sanitizer_js_1.Sanitizer(); - log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); - abortController.abort(); - }, request.timeout); - } - const acceptEncoding = request.headers.get("Accept-Encoding"); - const shouldDecompress = (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("gzip")) || (acceptEncoding === null || acceptEncoding === void 0 ? void 0 : acceptEncoding.includes("deflate")); - let body = typeof request.body === "function" ? request.body() : request.body; - if (body && !request.headers.has("Content-Length")) { - const bodyLength = getBodyLength(body); - if (bodyLength !== null) { - request.headers.set("Content-Length", bodyLength); - } + isStreamEnd = false; + /** + * An internal marker to track whether stream or outgoingHandler returns error. + */ + isError = false; + /** + * How many handlers are executing. + */ + executingOutgoingHandlers = 0; + /** + * Encoding of the input Readable stream which has string data type instead of Buffer. + */ + encoding; + /** + * How many buffers have been allocated. + */ + numBuffers = 0; + /** + * Because this class doesn't know how much data every time stream pops, which + * is defined by highWaterMarker of the stream. So BufferScheduler will cache + * data received from the stream, when data in unresolvedDataArray exceeds the + * blockSize defined, it will try to concat a blockSize of buffer, fill into available + * buffers from incoming and push to outgoing array. + */ + unresolvedDataArray = []; + /** + * How much data consisted in unresolvedDataArray. + */ + unresolvedLength = 0; + /** + * The array includes all the available buffers can be used to fill data from stream. + */ + incoming = []; + /** + * The array (queue) includes all the buffers filled from stream data. + */ + outgoing = []; + /** + * Creates an instance of BufferScheduler. + * + * @param readable - A Node.js Readable stream + * @param bufferSize - Buffer size of every maintained buffer + * @param maxBuffers - How many buffers can be allocated + * @param outgoingHandler - An async function scheduled to be + * triggered when a buffer fully filled + * with stream data + * @param concurrency - Concurrency of executing outgoingHandlers (>0) + * @param encoding - [Optional] Encoding of Readable stream when it's a string stream + */ + constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) { + if (bufferSize <= 0) { + throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`); } - let responseStream; - try { - if (body && request.onUploadProgress) { - const onUploadProgress = request.onUploadProgress; - const uploadReportStream = new ReportTransform(onUploadProgress); - uploadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in upload progress", e); - }); - if (isReadableStream(body)) { - body.pipe(uploadReportStream); - } - else { - uploadReportStream.end(body); - } - body = uploadReportStream; - } - const res = await this.makeRequest(request, abortController, body); - if (timeoutId !== undefined) { - clearTimeout(timeoutId); - } - const headers = getResponseHeaders(res); - const status = (_a = res.statusCode) !== null && _a !== void 0 ? _a : 0; - const response = { - status, - headers, - request, - }; - // Responses to HEAD must not have a body. - // If they do return a body, that body must be ignored. - if (request.method === "HEAD") { - // call resume() and not destroy() to avoid closing the socket - // and losing keep alive - res.resume(); - return response; - } - responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; - const onDownloadProgress = request.onDownloadProgress; - if (onDownloadProgress) { - const downloadReportStream = new ReportTransform(onDownloadProgress); - downloadReportStream.on("error", (e) => { - log_js_1.logger.error("Error in download progress", e); - }); - responseStream.pipe(downloadReportStream); - responseStream = downloadReportStream; - } - if ( - // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code - ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(Number.POSITIVE_INFINITY)) || - ((_c = request.streamResponseStatusCodes) === null || _c === void 0 ? void 0 : _c.has(response.status))) { - response.readableStreamBody = responseStream; - } - else { - response.bodyAsText = await streamToText(responseStream); - } - return response; + if (maxBuffers <= 0) { + throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`); } - finally { - // clean up event listener - if (request.abortSignal && abortListener) { - let uploadStreamDone = Promise.resolve(); - if (isReadableStream(body)) { - uploadStreamDone = isStreamComplete(body); - } - let downloadStreamDone = Promise.resolve(); - if (isReadableStream(responseStream)) { - downloadStreamDone = isStreamComplete(responseStream); - } - Promise.all([uploadStreamDone, downloadStreamDone]) - .then(() => { - var _a; - // eslint-disable-next-line promise/always-return - if (abortListener) { - (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener("abort", abortListener); - } - }) - .catch((e) => { - log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); - }); - } + if (concurrency <= 0) { + throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`); } + this.bufferSize = bufferSize; + this.maxBuffers = maxBuffers; + this.readable = readable; + this.outgoingHandler = outgoingHandler; + this.concurrency = concurrency; + this.encoding = encoding; } - makeRequest(request, abortController, body) { - var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (isInsecure && !request.allowInsecureConnection) { - throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); - } - const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); - const options = { - agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, - method: request.method, - headers: request.headers.toJSON({ preserveCase: true }), - }; + /** + * Start the scheduler, will return error when stream of any of the outgoingHandlers + * returns error. + * + */ + async do() { return new Promise((resolve, reject) => { - const req = isInsecure ? http.request(options, resolve) : https.request(options, resolve); - req.once("error", (err) => { - var _a; - reject(new restError_js_1.RestError(err.message, { code: (_a = err.code) !== null && _a !== void 0 ? _a : restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + this.readable.on("data", (data) => { + data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; + this.appendUnresolvedData(data); + if (!this.resolveData()) { + this.readable.pause(); + } + }); + this.readable.on("error", (err) => { + this.emitter.emit("error", err); + }); + this.readable.on("end", () => { + this.isStreamEnd = true; + this.emitter.emit("checkEnd"); }); - abortController.signal.addEventListener("abort", () => { - const abortError = new abort_controller_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); - req.destroy(abortError); - reject(abortError); + this.emitter.on("error", (err) => { + this.isError = true; + this.readable.pause(); + reject(err); }); - if (body && isReadableStream(body)) { - body.pipe(req); - } - else if (body) { - if (typeof body === "string" || Buffer.isBuffer(body)) { - req.end(body); - } - else if (isArrayBuffer(body)) { - req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + this.emitter.on("checkEnd", () => { + if (this.outgoing.length > 0) { + this.triggerOutgoingHandlers(); + return; } - else { - log_js_1.logger.error("Unrecognized body type", body); - reject(new restError_js_1.RestError("Unrecognized body type")); + if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { + if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { + const buffer = this.shiftBufferFromUnresolvedDataArray(); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset) + .then(resolve) + .catch(reject); + } + else if (this.unresolvedLength >= this.bufferSize) { + return; + } + else { + resolve(); + } } - } - else { - // streams don't like "undefined" being passed as data - req.end(); - } + }); }); } - getOrCreateAgent(request, isInsecure) { - var _a; - const disableKeepAlive = request.disableKeepAlive; - // Handle Insecure requests first - if (isInsecure) { - if (disableKeepAlive) { - // keepAlive:false is the default so we don't need a custom Agent - return http.globalAgent; - } - if (!this.cachedHttpAgent) { - // If there is no cached agent create a new one and cache it. - this.cachedHttpAgent = new http.Agent({ keepAlive: true }); - } - return this.cachedHttpAgent; - } - else { - if (disableKeepAlive && !request.tlsSettings) { - // When there are no tlsSettings and keepAlive is false - // we don't need a custom agent - return https.globalAgent; - } - // We use the tlsSettings to index cached clients - const tlsSettings = (_a = request.tlsSettings) !== null && _a !== void 0 ? _a : DEFAULT_TLS_SETTINGS; - // Get the cached agent or create a new one with the - // provided values for keepAlive and tlsSettings - let agent = this.cachedHttpsAgents.get(tlsSettings); - if (agent && agent.options.keepAlive === !disableKeepAlive) { - return agent; - } - log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); - agent = new https.Agent(Object.assign({ - // keepAlive is true if disableKeepAlive is false. - keepAlive: !disableKeepAlive }, tlsSettings)); - this.cachedHttpsAgents.set(tlsSettings, agent); - return agent; - } + /** + * Insert a new data into unresolved array. + * + * @param data - + */ + appendUnresolvedData(data) { + this.unresolvedDataArray.push(data); + this.unresolvedLength += data.length; } -} -function getResponseHeaders(res) { - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - for (const header of Object.keys(res.headers)) { - const value = res.headers[header]; - if (Array.isArray(value)) { - if (value.length > 0) { - headers.set(header, value[0]); - } + /** + * Try to shift a buffer with size in blockSize. The buffer returned may be less + * than blockSize when data in unresolvedDataArray is less than bufferSize. + * + */ + shiftBufferFromUnresolvedDataArray(buffer) { + if (!buffer) { + buffer = new PooledBuffer_js_1.PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength); } - else if (value) { - headers.set(header, value); + else { + buffer.fill(this.unresolvedDataArray, this.unresolvedLength); } + this.unresolvedLength -= buffer.size; + return buffer; } - return headers; -} -function getDecodedResponseStream(stream, headers) { - const contentEncoding = headers.get("Content-Encoding"); - if (contentEncoding === "gzip") { - const unzip = zlib.createGunzip(); - stream.pipe(unzip); - return unzip; - } - else if (contentEncoding === "deflate") { - const inflate = zlib.createInflate(); - stream.pipe(inflate); - return inflate; - } - return stream; -} -function streamToText(stream) { - return new Promise((resolve, reject) => { - const buffer = []; - stream.on("data", (chunk) => { - if (Buffer.isBuffer(chunk)) { - buffer.push(chunk); + /** + * Resolve data in unresolvedDataArray. For every buffer with size in blockSize + * shifted, it will try to get (or allocate a buffer) from incoming, and fill it, + * then push it into outgoing to be handled by outgoing handler. + * + * Return false when available buffers in incoming are not enough, else true. + * + * @returns Return false when buffers in incoming are not enough, else true. + */ + resolveData() { + while (this.unresolvedLength >= this.bufferSize) { + let buffer; + if (this.incoming.length > 0) { + buffer = this.incoming.shift(); + this.shiftBufferFromUnresolvedDataArray(buffer); } else { - buffer.push(Buffer.from(chunk)); + if (this.numBuffers < this.maxBuffers) { + buffer = this.shiftBufferFromUnresolvedDataArray(); + this.numBuffers++; + } + else { + // No available buffer, wait for buffer returned + return false; + } } - }); - stream.on("end", () => { - resolve(Buffer.concat(buffer).toString("utf8")); - }); - stream.on("error", (e) => { - if (e && (e === null || e === void 0 ? void 0 : e.name) === "AbortError") { - reject(e); + this.outgoing.push(buffer); + this.triggerOutgoingHandlers(); + } + return true; + } + /** + * Try to trigger a outgoing handler for every buffer in outgoing. Stop when + * concurrency reaches. + */ + async triggerOutgoingHandlers() { + let buffer; + do { + if (this.executingOutgoingHandlers >= this.concurrency) { + return; } - else { - reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { - code: restError_js_1.RestError.PARSE_ERROR, - })); + buffer = this.outgoing.shift(); + if (buffer) { + this.triggerOutgoingHandler(buffer); } - }); - }); -} -/** @internal */ -function getBodyLength(body) { - if (!body) { - return 0; - } - else if (Buffer.isBuffer(body)) { - return body.length; - } - else if (isReadableStream(body)) { - return null; - } - else if (isArrayBuffer(body)) { - return body.byteLength; + } while (buffer); } - else if (typeof body === "string") { - return Buffer.from(body).length; + /** + * Trigger a outgoing handler for a buffer shifted from outgoing. + * + * @param buffer - + */ + async triggerOutgoingHandler(buffer) { + const bufferLength = buffer.size; + this.executingOutgoingHandlers++; + this.offset += bufferLength; + try { + await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength); + } + catch (err) { + this.emitter.emit("error", err); + return; + } + this.executingOutgoingHandlers--; + this.reuseBuffer(buffer); + this.emitter.emit("checkEnd"); } - else { - return null; + /** + * Return buffer used by outgoing handler into incoming. + * + * @param buffer - + */ + reuseBuffer(buffer) { + this.incoming.push(buffer); + if (!this.isError && this.resolveData() && !this.isStreamEnd) { + this.readable.resume(); + } } } -/** - * Create a new HttpClient instance for the NodeJS environment. - * @internal - */ -function createNodeHttpClient() { - return new NodeHttpClient(); -} -//# sourceMappingURL=nodeHttpClient.js.map +exports.BufferScheduler = BufferScheduler; +//# sourceMappingURL=BufferScheduler.js.map /***/ }), -/***/ 83906: -/***/ ((__unused_webpack_module, exports) => { +/***/ 82202: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createEmptyPipeline = createEmptyPipeline; -const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); +exports.BuffersStream = void 0; +const node_stream_1 = __nccwpck_require__(84492); /** - * A private implementation of Pipeline. - * Do not export this class from the package. - * @internal + * This class generates a readable stream from the data in an array of buffers. */ -class HttpPipeline { - constructor(policies) { - var _a; - this._policies = []; - this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : []; - this._orderedPolicies = undefined; - } - addPolicy(policy, options = {}) { - if (options.phase && options.afterPhase) { - throw new Error("Policies inside a phase cannot specify afterPhase."); - } - if (options.phase && !ValidPhaseNames.has(options.phase)) { - throw new Error(`Invalid phase name: ${options.phase}`); +class BuffersStream extends node_stream_1.Readable { + buffers; + byteLength; + /** + * The offset of data to be read in the current buffer. + */ + byteOffsetInCurrentBuffer; + /** + * The index of buffer to be read in the array of buffers. + */ + bufferIndex; + /** + * The total length of data already read. + */ + pushedBytesLength; + /** + * Creates an instance of BuffersStream that will emit the data + * contained in the array of buffers. + * + * @param buffers - Array of buffers containing the data + * @param byteLength - The total length of data contained in the buffers + */ + constructor(buffers, byteLength, options) { + super(options); + this.buffers = buffers; + this.byteLength = byteLength; + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex = 0; + this.pushedBytesLength = 0; + // check byteLength is no larger than buffers[] total length + let buffersLength = 0; + for (const buf of this.buffers) { + buffersLength += buf.byteLength; } - if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { - throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + if (buffersLength < this.byteLength) { + throw new Error("Data size shouldn't be larger than the total length of buffers."); } - this._policies.push({ - policy, - options, - }); - this._orderedPolicies = undefined; - } - removePolicy(options) { - const removedPolicies = []; - this._policies = this._policies.filter((policyDescriptor) => { - if ((options.name && policyDescriptor.policy.name === options.name) || - (options.phase && policyDescriptor.options.phase === options.phase)) { - removedPolicies.push(policyDescriptor.policy); - return false; - } - else { - return true; - } - }); - this._orderedPolicies = undefined; - return removedPolicies; - } - sendRequest(httpClient, request) { - const policies = this.getOrderedPolicies(); - const pipeline = policies.reduceRight((next, policy) => { - return (req) => { - return policy.sendRequest(req, next); - }; - }, (req) => httpClient.sendRequest(req)); - return pipeline(request); } - getOrderedPolicies() { - if (!this._orderedPolicies) { - this._orderedPolicies = this.orderPolicies(); + /** + * Internal _read() that will be called when the stream wants to pull more data in. + * + * @param size - Optional. The size of data to be read + */ + _read(size) { + if (this.pushedBytesLength >= this.byteLength) { + this.push(null); } - return this._orderedPolicies; - } - clone() { - return new HttpPipeline(this._policies); - } - static create() { - return new HttpPipeline(); - } - orderPolicies() { - /** - * The goal of this method is to reliably order pipeline policies - * based on their declared requirements when they were added. - * - * Order is first determined by phase: - * - * 1. Serialize Phase - * 2. Policies not in a phase - * 3. Deserialize Phase - * 4. Retry Phase - * 5. Sign Phase - * - * Within each phase, policies are executed in the order - * they were added unless they were specified to execute - * before/after other policies or after a particular phase. - * - * To determine the final order, we will walk the policy list - * in phase order multiple times until all dependencies are - * satisfied. - * - * `afterPolicies` are the set of policies that must be - * executed before a given policy. This requirement is - * considered satisfied when each of the listed policies - * have been scheduled. - * - * `beforePolicies` are the set of policies that must be - * executed after a given policy. Since this dependency - * can be expressed by converting it into a equivalent - * `afterPolicies` declarations, they are normalized - * into that form for simplicity. - * - * An `afterPhase` dependency is considered satisfied when all - * policies in that phase have scheduled. - * - */ - const result = []; - // Track all policies we know about. - const policyMap = new Map(); - function createPhase(name) { - return { - name, - policies: new Set(), - hasRun: false, - hasAfterPolicies: false, - }; + if (!size) { + size = this.readableHighWaterMark; } - // Track policies for each phase. - const serializePhase = createPhase("Serialize"); - const noPhase = createPhase("None"); - const deserializePhase = createPhase("Deserialize"); - const retryPhase = createPhase("Retry"); - const signPhase = createPhase("Sign"); - // a list of phases in order - const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; - // Small helper function to map phase name to each Phase - function getPhase(phase) { - if (phase === "Retry") { - return retryPhase; - } - else if (phase === "Serialize") { - return serializePhase; - } - else if (phase === "Deserialize") { - return deserializePhase; - } - else if (phase === "Sign") { - return signPhase; + const outBuffers = []; + let i = 0; + while (i < size && this.pushedBytesLength < this.byteLength) { + // The last buffer may be longer than the data it contains. + const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength; + const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer; + const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers); + if (remaining > size - i) { + // chunkSize = size - i + const end = this.byteOffsetInCurrentBuffer + size - i; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + this.pushedBytesLength += size - i; + this.byteOffsetInCurrentBuffer = end; + i = size; + break; } else { - return noPhase; - } - } - // First walk each policy and create a node to track metadata. - for (const descriptor of this._policies) { - const policy = descriptor.policy; - const options = descriptor.options; - const policyName = policy.name; - if (policyMap.has(policyName)) { - throw new Error("Duplicate policy names not allowed in pipeline"); - } - const node = { - policy, - dependsOn: new Set(), - dependants: new Set(), - }; - if (options.afterPhase) { - node.afterPhase = getPhase(options.afterPhase); - node.afterPhase.hasAfterPolicies = true; - } - policyMap.set(policyName, node); - const phase = getPhase(options.phase); - phase.policies.add(node); - } - // Now that each policy has a node, connect dependency references. - for (const descriptor of this._policies) { - const { policy, options } = descriptor; - const policyName = policy.name; - const node = policyMap.get(policyName); - if (!node) { - throw new Error(`Missing node for policy ${policyName}`); - } - if (options.afterPolicies) { - for (const afterPolicyName of options.afterPolicies) { - const afterNode = policyMap.get(afterPolicyName); - if (afterNode) { - // Linking in both directions helps later - // when we want to notify dependants. - node.dependsOn.add(afterNode); - afterNode.dependants.add(node); - } - } - } - if (options.beforePolicies) { - for (const beforePolicyName of options.beforePolicies) { - const beforeNode = policyMap.get(beforePolicyName); - if (beforeNode) { - // To execute before another node, make it - // depend on the current node. - beforeNode.dependsOn.add(node); - node.dependants.add(beforeNode); - } - } - } - } - function walkPhase(phase) { - phase.hasRun = true; - // Sets iterate in insertion order - for (const node of phase.policies) { - if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { - // If this node is waiting on a phase to complete, - // we need to skip it for now. - // Even if the phase is empty, we should wait for it - // to be walked to avoid re-ordering policies. - continue; + // chunkSize = remaining + const end = this.byteOffsetInCurrentBuffer + remaining; + outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end)); + if (remaining === remainingCapacityInThisBuffer) { + // this.buffers[this.bufferIndex] used up, shift to next one + this.byteOffsetInCurrentBuffer = 0; + this.bufferIndex++; } - if (node.dependsOn.size === 0) { - // If there's nothing else we're waiting for, we can - // add this policy to the result list. - result.push(node.policy); - // Notify anything that depends on this policy that - // the policy has been scheduled. - for (const dependant of node.dependants) { - dependant.dependsOn.delete(node); - } - policyMap.delete(node.policy.name); - phase.policies.delete(node); + else { + this.byteOffsetInCurrentBuffer = end; } + this.pushedBytesLength += remaining; + i += remaining; } } - function walkPhases() { - for (const phase of orderedPhases) { - walkPhase(phase); - // if the phase isn't complete - if (phase.policies.size > 0 && phase !== noPhase) { - if (!noPhase.hasRun) { - // Try running noPhase to see if that unblocks this phase next tick. - // This can happen if a phase that happens before noPhase - // is waiting on a noPhase policy to complete. - walkPhase(noPhase); - } - // Don't proceed to the next phase until this phase finishes. - return; - } - if (phase.hasAfterPolicies) { - // Run any policies unblocked by this phase - walkPhase(noPhase); - } - } + if (outBuffers.length > 1) { + this.push(Buffer.concat(outBuffers)); } - // Iterate until we've put every node in the result list. - let iteration = 0; - while (policyMap.size > 0) { - iteration++; - const initialResultLength = result.length; - // Keep walking each phase in order until we can order every node. - walkPhases(); - // The result list *should* get at least one larger each time - // after the first full pass. - // Otherwise, we're going to loop forever. - if (result.length <= initialResultLength && iteration > 1) { - throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); - } + else if (outBuffers.length === 1) { + this.push(outBuffers[0]); } - return result; } } -/** - * Creates a totally empty pipeline. - * Useful for testing or creating a custom one. - */ -function createEmptyPipeline() { - return HttpPipeline.create(); -} -//# sourceMappingURL=pipeline.js.map +exports.BuffersStream = BuffersStream; +//# sourceMappingURL=BuffersStream.js.map /***/ }), -/***/ 93536: +/***/ 39474: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -146450,80 +149632,136 @@ function createEmptyPipeline() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createPipelineRequest = createPipelineRequest; -const httpHeaders_js_1 = __nccwpck_require__(60118); -const core_util_1 = __nccwpck_require__(80637); -class PipelineRequestImpl { - constructor(options) { - var _a, _b, _c, _d, _e, _f, _g; - this.url = options.url; - this.body = options.body; - this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : (0, httpHeaders_js_1.createHttpHeaders)(); - this.method = (_b = options.method) !== null && _b !== void 0 ? _b : "GET"; - this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0; - this.multipartBody = options.multipartBody; - this.formData = options.formData; - this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false; - this.proxySettings = options.proxySettings; - this.streamResponseStatusCodes = options.streamResponseStatusCodes; - this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false; - this.abortSignal = options.abortSignal; - this.tracingOptions = options.tracingOptions; - this.onUploadProgress = options.onUploadProgress; - this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || (0, core_util_1.randomUUID)(); - this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false; - this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false; - this.agent = options.agent; - this.tlsSettings = options.tlsSettings; - } -} +exports.PooledBuffer = void 0; +const tslib_1 = __nccwpck_require__(4351); +const BuffersStream_js_1 = __nccwpck_require__(82202); +const node_buffer_1 = tslib_1.__importDefault(__nccwpck_require__(72254)); /** - * Creates a new pipeline request with the given options. - * This method is to allow for the easy setting of default values and not required. - * @param options - The options to create the request with. + * maxBufferLength is max size of each buffer in the pooled buffers. */ -function createPipelineRequest(options) { - return new PipelineRequestImpl(options); +const maxBufferLength = node_buffer_1.default.constants.MAX_LENGTH; +/** + * This class provides a buffer container which conceptually has no hard size limit. + * It accepts a capacity, an array of input buffers and the total length of input data. + * It will allocate an internal "buffer" of the capacity and fill the data in the input buffers + * into the internal "buffer" serially with respect to the total length. + * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream + * assembled from all the data in the internal "buffer". + */ +class PooledBuffer { + /** + * Internal buffers used to keep the data. + * Each buffer has a length of the maxBufferLength except last one. + */ + buffers = []; + /** + * The total size of internal buffers. + */ + capacity; + /** + * The total size of data contained in internal buffers. + */ + _size; + /** + * The size of the data contained in the pooled buffers. + */ + get size() { + return this._size; + } + constructor(capacity, buffers, totalLength) { + this.capacity = capacity; + this._size = 0; + // allocate + const bufferNum = Math.ceil(capacity / maxBufferLength); + for (let i = 0; i < bufferNum; i++) { + let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength; + if (len === 0) { + len = maxBufferLength; + } + this.buffers.push(Buffer.allocUnsafe(len)); + } + if (buffers) { + this.fill(buffers, totalLength); + } + } + /** + * Fill the internal buffers with data in the input buffers serially + * with respect to the total length and the total capacity of the internal buffers. + * Data copied will be shift out of the input buffers. + * + * @param buffers - Input buffers containing the data to be filled in the pooled buffer + * @param totalLength - Total length of the data to be filled in. + * + */ + fill(buffers, totalLength) { + this._size = Math.min(this.capacity, totalLength); + let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0; + while (totalCopiedNum < this._size) { + const source = buffers[i]; + const target = this.buffers[j]; + const copiedNum = source.copy(target, targetOffset, sourceOffset); + totalCopiedNum += copiedNum; + sourceOffset += copiedNum; + targetOffset += copiedNum; + if (sourceOffset === source.length) { + i++; + sourceOffset = 0; + } + if (targetOffset === target.length) { + j++; + targetOffset = 0; + } + } + // clear copied from source buffers + buffers.splice(0, i); + if (buffers.length > 0) { + buffers[0] = buffers[0].slice(sourceOffset); + } + } + /** + * Get the readable stream assembled from all the data in the internal buffers. + * + */ + getReadableStream() { + return new BuffersStream_js_1.BuffersStream(this.buffers, this.size); + } } -//# sourceMappingURL=pipelineRequest.js.map +exports.PooledBuffer = PooledBuffer; +//# sourceMappingURL=PooledBuffer.js.map /***/ }), -/***/ 15093: -/***/ ((__unused_webpack_module, exports) => { +/***/ 83269: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.agentPolicyName = void 0; -exports.agentPolicy = agentPolicy; -/** - * Name of the Agent Policy - */ -exports.agentPolicyName = "agentPolicy"; +exports.StorageBrowserPolicyFactory = exports.StorageBrowserPolicy = void 0; +const StorageBrowserPolicy_js_1 = __nccwpck_require__(69277); +Object.defineProperty(exports, "StorageBrowserPolicy", ({ enumerable: true, get: function () { return StorageBrowserPolicy_js_1.StorageBrowserPolicy; } })); /** - * Gets a pipeline policy that sets http.agent + * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects. */ -function agentPolicy(agent) { - return { - name: exports.agentPolicyName, - sendRequest: async (req, next) => { - // Users may define an agent on the request, honor it over the client level one - if (!req.agent) { - req.agent = agent; - } - return next(req); - }, - }; +class StorageBrowserPolicyFactory { + /** + * Creates a StorageBrowserPolicyFactory object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageBrowserPolicy_js_1.StorageBrowserPolicy(nextPolicy, options); + } } -//# sourceMappingURL=agentPolicy.js.map +exports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory; +//# sourceMappingURL=StorageBrowserPolicyFactory.js.map /***/ }), -/***/ 68152: +/***/ 26508: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -146531,73 +149769,39 @@ function agentPolicy(agent) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.auxiliaryAuthenticationHeaderPolicyName = void 0; -exports.auxiliaryAuthenticationHeaderPolicy = auxiliaryAuthenticationHeaderPolicy; -const tokenCycler_js_1 = __nccwpck_require__(50601); -const log_js_1 = __nccwpck_require__(30648); -/** - * The programmatic identifier of the auxiliaryAuthenticationHeaderPolicy. - */ -exports.auxiliaryAuthenticationHeaderPolicyName = "auxiliaryAuthenticationHeaderPolicy"; -const AUTHORIZATION_AUXILIARY_HEADER = "x-ms-authorization-auxiliary"; -async function sendAuthorizeRequest(options) { - var _a, _b; - const { scopes, getAccessToken, request } = options; - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - }; - return (_b = (_a = (await getAccessToken(scopes, getTokenOptions))) === null || _a === void 0 ? void 0 : _a.token) !== null && _b !== void 0 ? _b : ""; -} +exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = void 0; +const StorageRetryPolicy_js_1 = __nccwpck_require__(1114); +Object.defineProperty(exports, "StorageRetryPolicy", ({ enumerable: true, get: function () { return StorageRetryPolicy_js_1.StorageRetryPolicy; } })); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(21483); +Object.defineProperty(exports, "StorageRetryPolicyType", ({ enumerable: true, get: function () { return StorageRetryPolicyType_js_1.StorageRetryPolicyType; } })); /** - * A policy for external tokens to `x-ms-authorization-auxiliary` header. - * This header will be used when creating a cross-tenant application we may need to handle authentication requests - * for resources that are in different tenants. - * You could see [ARM docs](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant) for a rundown of how this feature works + * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects. */ -function auxiliaryAuthenticationHeaderPolicy(options) { - const { credentials, scopes } = options; - const logger = options.logger || log_js_1.logger; - const tokenCyclerMap = new WeakMap(); - return { - name: exports.auxiliaryAuthenticationHeaderPolicyName, - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication for auxiliary header is not permitted for non-TLS protected (non-https) URLs."); - } - if (!credentials || credentials.length === 0) { - logger.info(`${exports.auxiliaryAuthenticationHeaderPolicyName} header will not be set due to empty credentials.`); - return next(request); - } - const tokenPromises = []; - for (const credential of credentials) { - let getAccessToken = tokenCyclerMap.get(credential); - if (!getAccessToken) { - getAccessToken = (0, tokenCycler_js_1.createTokenCycler)(credential); - tokenCyclerMap.set(credential, getAccessToken); - } - tokenPromises.push(sendAuthorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger, - })); - } - const auxiliaryTokens = (await Promise.all(tokenPromises)).filter((token) => Boolean(token)); - if (auxiliaryTokens.length === 0) { - logger.warning(`None of the auxiliary tokens are valid. ${AUTHORIZATION_AUXILIARY_HEADER} header will not be set.`); - return next(request); - } - request.headers.set(AUTHORIZATION_AUXILIARY_HEADER, auxiliaryTokens.map((token) => `Bearer ${token}`).join(", ")); - return next(request); - }, - }; +class StorageRetryPolicyFactory { + retryOptions; + /** + * Creates an instance of StorageRetryPolicyFactory. + * @param retryOptions - + */ + constructor(retryOptions) { + this.retryOptions = retryOptions; + } + /** + * Creates a StorageRetryPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageRetryPolicy_js_1.StorageRetryPolicy(nextPolicy, options, this.retryOptions); + } } -//# sourceMappingURL=auxiliaryAuthenticationHeaderPolicy.js.map +exports.StorageRetryPolicyFactory = StorageRetryPolicyFactory; +//# sourceMappingURL=StorageRetryPolicyFactory.js.map /***/ }), -/***/ 11319: +/***/ 92599: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -146605,283 +149809,141 @@ function auxiliaryAuthenticationHeaderPolicy(options) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.bearerTokenAuthenticationPolicyName = void 0; -exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; -exports.parseChallenges = parseChallenges; -const tokenCycler_js_1 = __nccwpck_require__(50601); -const log_js_1 = __nccwpck_require__(30648); -const restError_js_1 = __nccwpck_require__(61036); -/** - * The programmatic identifier of the bearerTokenAuthenticationPolicy. - */ -exports.bearerTokenAuthenticationPolicyName = "bearerTokenAuthenticationPolicy"; -/** - * Try to send the given request. - * - * When a response is received, returns a tuple of the response received and, if the response was received - * inside a thrown RestError, the RestError that was thrown. - * - * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it - * will be rethrown. - */ -async function trySendRequest(request, next) { - try { - return [await next(request), undefined]; - } - catch (e) { - if ((0, restError_js_1.isRestError)(e) && e.response) { - return [e.response, e]; - } - else { - throw e; - } - } -} -/** - * Default authorize request handler - */ -async function defaultAuthorizeRequest(options) { - const { scopes, getAccessToken, request } = options; - // Enable CAE true by default - const getTokenOptions = { - abortSignal: request.abortSignal, - tracingOptions: request.tracingOptions, - enableCae: true, - }; - const accessToken = await getAccessToken(scopes, getTokenOptions); - if (accessToken) { - options.request.headers.set("Authorization", `Bearer ${accessToken.token}`); - } -} -/** - * We will retrieve the challenge only if the response status code was 401, - * and if the response contained the header "WWW-Authenticate" with a non-empty value. - */ -function isChallengeResponse(response) { - return response.status === 401 && response.headers.has("WWW-Authenticate"); -} -/** - * Re-authorize the request for CAE challenge. - * The response containing the challenge is `options.response`. - * If this method returns true, the underlying request will be sent once again. - */ -async function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) { - var _a; - const { scopes } = onChallengeOptions; - const accessToken = await onChallengeOptions.getAccessToken(scopes, { - enableCae: true, - claims: caeClaims, - }); - if (!accessToken) { - return false; +exports.getCachedDefaultHttpClient = getCachedDefaultHttpClient; +const core_rest_pipeline_1 = __nccwpck_require__(29146); +let _defaultHttpClient; +function getCachedDefaultHttpClient() { + if (!_defaultHttpClient) { + _defaultHttpClient = (0, core_rest_pipeline_1.createDefaultHttpClient)(); } - onChallengeOptions.request.headers.set("Authorization", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : "Bearer"} ${accessToken.token}`); - return true; -} -/** - * A policy that can request a token from a TokenCredential implementation and - * then apply it to the Authorization header of a request as a Bearer token. - */ -function bearerTokenAuthenticationPolicy(options) { - var _a, _b, _c; - const { credential, scopes, challengeCallbacks } = options; - const logger = options.logger || log_js_1.logger; - const callbacks = { - authorizeRequest: (_b = (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a === void 0 ? void 0 : _a.bind(challengeCallbacks)) !== null && _b !== void 0 ? _b : defaultAuthorizeRequest, - authorizeRequestOnChallenge: (_c = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c === void 0 ? void 0 : _c.bind(challengeCallbacks), - }; - // This function encapsulates the entire process of reliably retrieving the token - // The options are left out of the public API until there's demand to configure this. - // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions` - // in order to pass through the `options` object. - const getAccessToken = credential - ? (0, tokenCycler_js_1.createTokenCycler)(credential /* , options */) - : () => Promise.resolve(null); - return { - name: exports.bearerTokenAuthenticationPolicyName, - /** - * If there's no challenge parameter: - * - It will try to retrieve the token using the cache, or the credential's getToken. - * - Then it will try the next policy with or without the retrieved token. - * - * It uses the challenge parameters to: - * - Skip a first attempt to get the token from the credential if there's no cached token, - * since it expects the token to be retrievable only after the challenge. - * - Prepare the outgoing request if the `prepareRequest` method has been provided. - * - Send an initial request to receive the challenge if it fails. - * - Process a challenge if the response contains it. - * - Retrieve a token with the challenge information, then re-send the request. - */ - async sendRequest(request, next) { - if (!request.url.toLowerCase().startsWith("https://")) { - throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs."); - } - await callbacks.authorizeRequest({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - getAccessToken, - logger, - }); - let response; - let error; - let shouldSendRequest; - [response, error] = await trySendRequest(request, next); - if (isChallengeResponse(response)) { - let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); - // Handle CAE by default when receive CAE claim - if (claims) { - let parsedClaim; - // Return the response immediately if claims is not a valid base64 encoded string - try { - parsedClaim = atob(claims); - } - catch (e) { - logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); - return response; - } - shouldSendRequest = await authorizeRequestOnCaeChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - response, - request, - getAccessToken, - logger, - }, parsedClaim); - // Send updated request and handle response for RestError - if (shouldSendRequest) { - [response, error] = await trySendRequest(request, next); - } - } - else if (callbacks.authorizeRequestOnChallenge) { - // Handle custom challenges when client provides custom callback - shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - request, - response, - getAccessToken, - logger, - }); - // Send updated request and handle response for RestError - if (shouldSendRequest) { - [response, error] = await trySendRequest(request, next); - } - // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this - if (isChallengeResponse(response)) { - claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); - if (claims) { - let parsedClaim; - try { - parsedClaim = atob(claims); - } - catch (e) { - logger.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`); - return response; - } - shouldSendRequest = await authorizeRequestOnCaeChallenge({ - scopes: Array.isArray(scopes) ? scopes : [scopes], - response, - request, - getAccessToken, - logger, - }, parsedClaim); - // Send updated request and handle response for RestError - if (shouldSendRequest) { - [response, error] = await trySendRequest(request, next); - } - } - } - } - } - if (error) { - throw error; - } - else { - return response; - } - }, - }; + return _defaultHttpClient; } +//# sourceMappingURL=cache.js.map + +/***/ }), + +/***/ 17662: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AnonymousCredential = void 0; +const AnonymousCredentialPolicy_js_1 = __nccwpck_require__(85969); +const Credential_js_1 = __nccwpck_require__(34936); /** - * Converts: `Bearer a="b", c="d", Pop e="f", g="h"`. - * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`. - * - * @internal + * AnonymousCredential provides a credentialPolicyCreator member used to create + * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with + * HTTP(S) requests that read public resources or for use with Shared Access + * Signatures (SAS). */ -function parseChallenges(challenges) { - // Challenge regex seperates the string to individual challenges with different schemes in the format `Scheme a="b", c=d` - // The challenge regex captures parameteres with either quotes values or unquoted values - const challengeRegex = /(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g; - // Parameter regex captures the claims group removed from the scheme in the format `a="b"` and `c="d"` - // CAE challenge always have quoted parameters. For more reference, https://learn.microsoft.com/entra/identity-platform/claims-challenge - const paramRegex = /(\w+)="([^"]*)"/g; - const parsedChallenges = []; - let match; - // Iterate over each challenge match - while ((match = challengeRegex.exec(challenges)) !== null) { - const scheme = match[1]; - const paramsString = match[2]; - const params = {}; - let paramMatch; - // Iterate over each parameter match - while ((paramMatch = paramRegex.exec(paramsString)) !== null) { - params[paramMatch[1]] = paramMatch[2]; - } - parsedChallenges.push({ scheme, params }); +class AnonymousCredential extends Credential_js_1.Credential { + /** + * Creates an {@link AnonymousCredentialPolicy} object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new AnonymousCredentialPolicy_js_1.AnonymousCredentialPolicy(nextPolicy, options); } - return parsedChallenges; } +exports.AnonymousCredential = AnonymousCredential; +//# sourceMappingURL=AnonymousCredential.js.map + +/***/ }), + +/***/ 34936: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Credential = void 0; /** - * Parse a pipeline response and look for a CAE challenge with "Bearer" scheme - * Return the value in the header without parsing the challenge - * @internal + * Credential is an abstract class for Azure Storage HTTP requests signing. This + * class will host an credentialPolicyCreator factory which generates CredentialPolicy. */ -function getCaeChallengeClaims(challenges) { - var _a; - if (!challenges) { - return; +class Credential { + /** + * Creates a RequestPolicy object. + * + * @param _nextPolicy - + * @param _options - + */ + create(_nextPolicy, _options) { + throw new Error("Method should be implemented in children classes."); } - // Find all challenges present in the header - const parsedChallenges = parseChallenges(challenges); - return (_a = parsedChallenges.find((x) => x.scheme === "Bearer" && x.params.claims && x.params.error === "insufficient_claims")) === null || _a === void 0 ? void 0 : _a.params.claims; } -//# sourceMappingURL=bearerTokenAuthenticationPolicy.js.map +exports.Credential = Credential; +//# sourceMappingURL=Credential.js.map /***/ }), -/***/ 57618: -/***/ ((__unused_webpack_module, exports) => { +/***/ 92782: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decompressResponsePolicyName = void 0; -exports.decompressResponsePolicy = decompressResponsePolicy; -/** - * The programmatic identifier of the decompressResponsePolicy. - */ -exports.decompressResponsePolicyName = "decompressResponsePolicy"; +exports.StorageSharedKeyCredential = void 0; +const node_crypto_1 = __nccwpck_require__(6005); +const StorageSharedKeyCredentialPolicy_js_1 = __nccwpck_require__(40755); +const Credential_js_1 = __nccwpck_require__(34936); /** - * A policy to enable response decompression according to Accept-Encoding header - * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + * ONLY AVAILABLE IN NODE.JS RUNTIME. + * + * StorageSharedKeyCredential for account key authorization of Azure Storage service. */ -function decompressResponsePolicy() { - return { - name: exports.decompressResponsePolicyName, - async sendRequest(request, next) { - // HEAD requests have no body - if (request.method !== "HEAD") { - request.headers.set("Accept-Encoding", "gzip,deflate"); - } - return next(request); - }, - }; +class StorageSharedKeyCredential extends Credential_js_1.Credential { + /** + * Azure Storage account name; readonly. + */ + accountName; + /** + * Azure Storage account key; readonly. + */ + accountKey; + /** + * Creates an instance of StorageSharedKeyCredential. + * @param accountName - + * @param accountKey - + */ + constructor(accountName, accountKey) { + super(); + this.accountName = accountName; + this.accountKey = Buffer.from(accountKey, "base64"); + } + /** + * Creates a StorageSharedKeyCredentialPolicy object. + * + * @param nextPolicy - + * @param options - + */ + create(nextPolicy, options) { + return new StorageSharedKeyCredentialPolicy_js_1.StorageSharedKeyCredentialPolicy(nextPolicy, options, this); + } + /** + * Generates a hash signature for an HTTP request or for a SAS. + * + * @param stringToSign - + */ + computeHMACSHA256(stringToSign) { + return (0, node_crypto_1.createHmac)("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64"); + } } -//# sourceMappingURL=decompressResponsePolicy.js.map +exports.StorageSharedKeyCredential = StorageSharedKeyCredential; +//# sourceMappingURL=StorageSharedKeyCredential.js.map /***/ }), -/***/ 48549: +/***/ 83667: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -146889,36 +149951,84 @@ function decompressResponsePolicy() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.defaultRetryPolicyName = void 0; -exports.defaultRetryPolicy = defaultRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(843); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(66645); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); +exports.BaseRequestPolicy = exports.getCachedDefaultHttpClient = void 0; +const tslib_1 = __nccwpck_require__(4351); +tslib_1.__exportStar(__nccwpck_require__(80974), exports); +var cache_js_1 = __nccwpck_require__(92599); +Object.defineProperty(exports, "getCachedDefaultHttpClient", ({ enumerable: true, get: function () { return cache_js_1.getCachedDefaultHttpClient; } })); +tslib_1.__exportStar(__nccwpck_require__(83269), exports); +tslib_1.__exportStar(__nccwpck_require__(17662), exports); +tslib_1.__exportStar(__nccwpck_require__(34936), exports); +tslib_1.__exportStar(__nccwpck_require__(92782), exports); +tslib_1.__exportStar(__nccwpck_require__(26508), exports); +var RequestPolicy_js_1 = __nccwpck_require__(76584); +Object.defineProperty(exports, "BaseRequestPolicy", ({ enumerable: true, get: function () { return RequestPolicy_js_1.BaseRequestPolicy; } })); +tslib_1.__exportStar(__nccwpck_require__(85969), exports); +tslib_1.__exportStar(__nccwpck_require__(13615), exports); +tslib_1.__exportStar(__nccwpck_require__(69277), exports); +tslib_1.__exportStar(__nccwpck_require__(89782), exports); +tslib_1.__exportStar(__nccwpck_require__(37740), exports); +tslib_1.__exportStar(__nccwpck_require__(21483), exports); +tslib_1.__exportStar(__nccwpck_require__(1114), exports); +tslib_1.__exportStar(__nccwpck_require__(3353), exports); +tslib_1.__exportStar(__nccwpck_require__(40755), exports); +tslib_1.__exportStar(__nccwpck_require__(89020), exports); +tslib_1.__exportStar(__nccwpck_require__(26508), exports); +tslib_1.__exportStar(__nccwpck_require__(72426), exports); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 89818: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_1 = __nccwpck_require__(89497); /** - * Name of the {@link defaultRetryPolicy} + * The `@azure/logger` configuration for this package. */ -exports.defaultRetryPolicyName = "defaultRetryPolicy"; +exports.logger = (0, logger_1.createClientLogger)("storage-common"); +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 85969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AnonymousCredentialPolicy = void 0; +const CredentialPolicy_js_1 = __nccwpck_require__(13615); /** - * A policy that retries according to three strategies: - * - When the server sends a 429 response with a Retry-After header. - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources + * or for use with Shared Access Signatures (SAS). */ -function defaultRetryPolicy(options = {}) { - var _a; - return { - name: exports.defaultRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; +class AnonymousCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Creates an instance of AnonymousCredentialPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); + } } -//# sourceMappingURL=defaultRetryPolicy.js.map +exports.AnonymousCredentialPolicy = AnonymousCredentialPolicy; +//# sourceMappingURL=AnonymousCredentialPolicy.js.map /***/ }), -/***/ 1598: +/***/ 13615: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -146926,32 +150036,92 @@ function defaultRetryPolicy(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.exponentialRetryPolicyName = void 0; -exports.exponentialRetryPolicy = exponentialRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(843); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); +exports.CredentialPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(76584); /** - * The programmatic identifier of the exponentialRetryPolicy. + * Credential policy used to sign HTTP(S) requests before sending. This is an + * abstract class. */ -exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; +class CredentialPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Sends out request. + * + * @param request - + */ + sendRequest(request) { + return this._nextPolicy.sendRequest(this.signRequest(request)); + } + /** + * Child classes must implement this method with request signing. This method + * will be executed in {@link sendRequest}. + * + * @param request - + */ + signRequest(request) { + // Child classes must override this method with request signing. This method + // will be executed in sendRequest(). + return request; + } +} +exports.CredentialPolicy = CredentialPolicy; +//# sourceMappingURL=CredentialPolicy.js.map + +/***/ }), + +/***/ 76584: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BaseRequestPolicy = void 0; /** - * A policy that attempts to retry requests while introducing an exponentially increasing delay. - * @param options - Options that configure retry logic. + * The base class from which all request policies derive. */ -function exponentialRetryPolicy(options = {}) { - var _a; - return (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreSystemErrors: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }); +class BaseRequestPolicy { + _nextPolicy; + _options; + /** + * The main method to implement that manipulates a request/response. + */ + constructor( + /** + * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline. + */ + _nextPolicy, + /** + * The options that can be passed to a given request policy. + */ + _options) { + this._nextPolicy = _nextPolicy; + this._options = _options; + } + /** + * Get whether or not a log with the provided log level should be logged. + * @param logLevel - The log level of the log that will be logged. + * @returns Whether or not a log with the provided log level should be logged. + */ + shouldLog(logLevel) { + return this._options.shouldLog(logLevel); + } + /** + * Attempt to log the provided message to the provided logger. If no logger was provided or if + * the log level does not meat the logger's threshold, then nothing will be logged. + * @param logLevel - The log level of this log. + * @param message - The message of this log. + */ + log(logLevel, message) { + this._options.log(logLevel, message); + } } -//# sourceMappingURL=exponentialRetryPolicy.js.map +exports.BaseRequestPolicy = BaseRequestPolicy; +//# sourceMappingURL=RequestPolicy.js.map /***/ }), -/***/ 16501: +/***/ 69277: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -146959,106 +150129,57 @@ function exponentialRetryPolicy(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.formDataPolicyName = void 0; -exports.formDataPolicy = formDataPolicy; +exports.StorageBrowserPolicy = void 0; +const RequestPolicy_js_1 = __nccwpck_require__(76584); const core_util_1 = __nccwpck_require__(80637); -const httpHeaders_js_1 = __nccwpck_require__(60118); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); /** - * The programmatic identifier of the formDataPolicy. + * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including: + * + * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. + * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL + * thus avoid the browser cache. + * + * 2. Remove cookie header for security + * + * 3. Remove content-length header to avoid browsers warning */ -exports.formDataPolicyName = "formDataPolicy"; -function formDataToFormDataMap(formData) { - var _a; - const formDataMap = {}; - for (const [key, value] of formData.entries()) { - (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : (formDataMap[key] = []); - formDataMap[key].push(value); +class StorageBrowserPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * Creates an instance of StorageBrowserPolicy. + * @param nextPolicy - + * @param options - + */ + // The base class has a protected constructor. Adding a public one to enable constructing of this class. + /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/ + constructor(nextPolicy, options) { + super(nextPolicy, options); } - return formDataMap; -} -/** - * A policy that encodes FormData on the request into the body. - */ -function formDataPolicy() { - return { - name: exports.formDataPolicyName, - async sendRequest(request, next) { - if (core_util_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { - request.formData = formDataToFormDataMap(request.body); - request.body = undefined; - } - if (request.formData) { - const contentType = request.headers.get("Content-Type"); - if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { - request.body = wwwFormUrlEncode(request.formData); - } - else { - await prepareFormData(request.formData, request); - } - request.formData = undefined; - } - return next(request); - }, - }; -} -function wwwFormUrlEncode(formData) { - const urlSearchParams = new URLSearchParams(); - for (const [key, value] of Object.entries(formData)) { - if (Array.isArray(value)) { - for (const subValue of value) { - urlSearchParams.append(key, subValue.toString()); - } - } - else { - urlSearchParams.append(key, value.toString()); + /** + * Sends out request. + * + * @param request - + */ + async sendRequest(request) { + if (core_util_1.isNodeLike) { + return this._nextPolicy.sendRequest(request); } - } - return urlSearchParams.toString(); -} -async function prepareFormData(formData, request) { - // validate content type (multipart/form-data) - const contentType = request.headers.get("Content-Type"); - if (contentType && !contentType.startsWith("multipart/form-data")) { - // content type is specified and is not multipart/form-data. Exit. - return; - } - request.headers.set("Content-Type", contentType !== null && contentType !== void 0 ? contentType : "multipart/form-data"); - // set body to MultipartRequestBody using content from FormDataMap - const parts = []; - for (const [fieldName, values] of Object.entries(formData)) { - for (const value of Array.isArray(values) ? values : [values]) { - if (typeof value === "string") { - parts.push({ - headers: (0, httpHeaders_js_1.createHttpHeaders)({ - "Content-Disposition": `form-data; name="${fieldName}"`, - }), - body: (0, core_util_1.stringToUint8Array)(value, "utf-8"), - }); - } - else if (value === undefined || value === null || typeof value !== "object") { - throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); - } - else { - // using || instead of ?? here since if value.name is empty we should create a file name - const fileName = value.name || "blob"; - const headers = (0, httpHeaders_js_1.createHttpHeaders)(); - headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); - // again, || is used since an empty value.type means the content type is unset - headers.set("Content-Type", value.type || "application/octet-stream"); - parts.push({ - headers, - body: value, - }); - } + if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); } + request.headers.remove(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.remove(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return this._nextPolicy.sendRequest(request); } - request.multipartBody = { parts }; } -//# sourceMappingURL=formDataPolicy.js.map +exports.StorageBrowserPolicy = StorageBrowserPolicy; +//# sourceMappingURL=StorageBrowserPolicy.js.map /***/ }), -/***/ 46821: +/***/ 89782: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -147066,44 +150187,41 @@ async function prepareFormData(formData, request) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.logPolicyName = void 0; -exports.logPolicy = logPolicy; -const log_js_1 = __nccwpck_require__(30648); -const sanitizer_js_1 = __nccwpck_require__(34472); +exports.storageBrowserPolicyName = void 0; +exports.storageBrowserPolicy = storageBrowserPolicy; +const core_util_1 = __nccwpck_require__(80637); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); /** - * The programmatic identifier of the logPolicy. + * The programmatic identifier of the StorageBrowserPolicy. */ -exports.logPolicyName = "logPolicy"; +exports.storageBrowserPolicyName = "storageBrowserPolicy"; /** - * A policy that logs all requests and responses. - * @param options - Options to configure logPolicy. + * storageBrowserPolicy is a policy used to prevent browsers from caching requests + * and to remove cookies and explicit content-length headers. */ -function logPolicy(options = {}) { - var _a; - const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : log_js_1.logger.info; - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, - }); +function storageBrowserPolicy() { return { - name: exports.logPolicyName, + name: exports.storageBrowserPolicyName, async sendRequest(request, next) { - if (!logger.enabled) { + if (core_util_1.isNodeLike) { return next(request); } - logger(`Request: ${sanitizer.sanitize(request)}`); - const response = await next(request); - logger(`Response status code: ${response.status}`); - logger(`Headers: ${sanitizer.sanitize(response.headers)}`); - return response; + if (request.method === "GET" || request.method === "HEAD") { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString()); + } + request.headers.delete(constants_js_1.HeaderConstants.COOKIE); + // According to XHR standards, content-length should be fully controlled by browsers + request.headers.delete(constants_js_1.HeaderConstants.CONTENT_LENGTH); + return next(request); }, }; } -//# sourceMappingURL=logPolicy.js.map +//# sourceMappingURL=StorageBrowserPolicyV2.js.map /***/ }), -/***/ 19042: +/***/ 37740: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -147111,121 +150229,37 @@ function logPolicy(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.multipartPolicyName = void 0; -exports.multipartPolicy = multipartPolicy; -const core_util_1 = __nccwpck_require__(80637); -const concat_js_1 = __nccwpck_require__(80107); -const typeGuards_js_1 = __nccwpck_require__(58520); -function generateBoundary() { - return `----AzSDKFormBoundary${(0, core_util_1.randomUUID)()}`; -} -function encodeHeaders(headers) { - let result = ""; - for (const [key, value] of headers) { - result += `${key}: ${value}\r\n`; - } - return result; -} -function getLength(source) { - if (source instanceof Uint8Array) { - return source.byteLength; - } - else if ((0, typeGuards_js_1.isBlob)(source)) { - // if was created using createFile then -1 means we have an unknown size - return source.size === -1 ? undefined : source.size; - } - else { - return undefined; - } -} -function getTotalLength(sources) { - let total = 0; - for (const source of sources) { - const partLength = getLength(source); - if (partLength === undefined) { - return undefined; - } - else { - total += partLength; - } - } - return total; -} -async function buildRequestBody(request, parts, boundary) { - const sources = [ - (0, core_util_1.stringToUint8Array)(`--${boundary}`, "utf-8"), - ...parts.flatMap((part) => [ - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - (0, core_util_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), - (0, core_util_1.stringToUint8Array)("\r\n", "utf-8"), - part.body, - (0, core_util_1.stringToUint8Array)(`\r\n--${boundary}`, "utf-8"), - ]), - (0, core_util_1.stringToUint8Array)("--\r\n\r\n", "utf-8"), - ]; - const contentLength = getTotalLength(sources); - if (contentLength) { - request.headers.set("Content-Length", contentLength); - } - request.body = await (0, concat_js_1.concat)(sources); -} +exports.storageCorrectContentLengthPolicyName = void 0; +exports.storageCorrectContentLengthPolicy = storageCorrectContentLengthPolicy; +const constants_js_1 = __nccwpck_require__(77807); /** - * Name of multipart policy + * The programmatic identifier of the storageCorrectContentLengthPolicy. */ -exports.multipartPolicyName = "multipartPolicy"; -const maxBoundaryLength = 70; -const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); -function assertValidBoundary(boundary) { - if (boundary.length > maxBoundaryLength) { - throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); - } - if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { - throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); - } -} +exports.storageCorrectContentLengthPolicyName = "StorageCorrectContentLengthPolicy"; /** - * Pipeline policy for multipart requests + * storageCorrectContentLengthPolicy to correctly set Content-Length header with request body length. */ -function multipartPolicy() { +function storageCorrectContentLengthPolicy() { + function correctContentLength(request) { + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + } return { - name: exports.multipartPolicyName, + name: exports.storageCorrectContentLengthPolicyName, async sendRequest(request, next) { - var _a; - if (!request.multipartBody) { - return next(request); - } - if (request.body) { - throw new Error("multipartBody and regular body cannot be set at the same time"); - } - let boundary = request.multipartBody.boundary; - const contentTypeHeader = (_a = request.headers.get("Content-Type")) !== null && _a !== void 0 ? _a : "multipart/mixed"; - const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); - if (!parsedHeader) { - throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); - } - const [, contentType, parsedBoundary] = parsedHeader; - if (parsedBoundary && boundary && parsedBoundary !== boundary) { - throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); - } - boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary); - if (boundary) { - assertValidBoundary(boundary); - } - else { - boundary = generateBoundary(); - } - request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); - await buildRequestBody(request, request.multipartBody.parts, boundary); - request.multipartBody = undefined; + correctContentLength(request); return next(request); }, }; } -//# sourceMappingURL=multipartPolicy.js.map +//# sourceMappingURL=StorageCorrectContentLengthPolicy.js.map /***/ }), -/***/ 82032: +/***/ 72426: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -147233,35 +150267,44 @@ function multipartPolicy() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ndJsonPolicyName = void 0; -exports.ndJsonPolicy = ndJsonPolicy; +exports.storageRequestFailureDetailsParserPolicyName = void 0; +exports.storageRequestFailureDetailsParserPolicy = storageRequestFailureDetailsParserPolicy; /** - * The programmatic identifier of the ndJsonPolicy. + * The programmatic identifier of the StorageRequestFailureDetailsParserPolicy. */ -exports.ndJsonPolicyName = "ndJsonPolicy"; +exports.storageRequestFailureDetailsParserPolicyName = "storageRequestFailureDetailsParserPolicy"; /** - * ndJsonPolicy is a policy used to control keep alive settings for every request. + * StorageRequestFailureDetailsParserPolicy */ -function ndJsonPolicy() { +function storageRequestFailureDetailsParserPolicy() { return { - name: exports.ndJsonPolicyName, + name: exports.storageRequestFailureDetailsParserPolicyName, async sendRequest(request, next) { - // There currently isn't a good way to bypass the serializer - if (typeof request.body === "string" && request.body.startsWith("[")) { - const body = JSON.parse(request.body); - if (Array.isArray(body)) { - request.body = body.map((item) => JSON.stringify(item) + "\n").join(""); + try { + const response = await next(request); + return response; + } + catch (err) { + if (typeof err === "object" && + err !== null && + err.response && + err.response.parsedBody) { + if (err.response.parsedBody.code === "InvalidHeaderValue" && + err.response.parsedBody.HeaderName === "x-ms-version") { + err.message = + "The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.\n"; + } } + throw err; } - return next(request); }, }; } -//# sourceMappingURL=ndJsonPolicy.js.map +//# sourceMappingURL=StorageRequestFailureDetailsParserPolicy.js.map /***/ }), -/***/ 94761: +/***/ 1114: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -147269,203 +150312,230 @@ function ndJsonPolicy() { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.globalNoProxyList = exports.proxyPolicyName = void 0; -exports.loadNoProxy = loadNoProxy; -exports.getDefaultProxySettings = getDefaultProxySettings; -exports.proxyPolicy = proxyPolicy; -const https_proxy_agent_1 = __nccwpck_require__(77219); -const http_proxy_agent_1 = __nccwpck_require__(4654); -const log_js_1 = __nccwpck_require__(30648); -const HTTPS_PROXY = "HTTPS_PROXY"; -const HTTP_PROXY = "HTTP_PROXY"; -const ALL_PROXY = "ALL_PROXY"; -const NO_PROXY = "NO_PROXY"; -/** - * The programmatic identifier of the proxyPolicy. - */ -exports.proxyPolicyName = "proxyPolicy"; +exports.StorageRetryPolicy = void 0; +exports.NewRetryPolicyFactory = NewRetryPolicyFactory; +const abort_controller_1 = __nccwpck_require__(31514); +const RequestPolicy_js_1 = __nccwpck_require__(76584); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const log_js_1 = __nccwpck_require__(89818); +const StorageRetryPolicyType_js_1 = __nccwpck_require__(21483); /** - * Stores the patterns specified in NO_PROXY environment variable. - * @internal + * A factory method used to generated a RetryPolicy factory. + * + * @param retryOptions - */ -exports.globalNoProxyList = []; -let noProxyListLoaded = false; -/** A cache of whether a host should bypass the proxy. */ -const globalBypassedMap = new Map(); -function getEnvironmentValue(name) { - if (process.env[name]) { - return process.env[name]; - } - else if (process.env[name.toLowerCase()]) { - return process.env[name.toLowerCase()]; - } - return undefined; -} -function loadEnvironmentProxyValue() { - if (!process) { - return undefined; - } - const httpsProxy = getEnvironmentValue(HTTPS_PROXY); - const allProxy = getEnvironmentValue(ALL_PROXY); - const httpProxy = getEnvironmentValue(HTTP_PROXY); - return httpsProxy || allProxy || httpProxy; +function NewRetryPolicyFactory(retryOptions) { + return { + create: (nextPolicy, options) => { + return new StorageRetryPolicy(nextPolicy, options, retryOptions); + }, + }; } +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy +}; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); /** - * Check whether the host of a given `uri` matches any pattern in the no proxy list. - * If there's a match, any request sent to the same host shouldn't have the proxy settings set. - * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 + * Retry policy with exponential retry and linear retry implemented. */ -function isBypassed(uri, noProxyList, bypassedMap) { - if (noProxyList.length === 0) { - return false; +class StorageRetryPolicy extends RequestPolicy_js_1.BaseRequestPolicy { + /** + * RetryOptions. + */ + retryOptions; + /** + * Creates an instance of RetryPolicy. + * + * @param nextPolicy - + * @param options - + * @param retryOptions - + */ + constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) { + super(nextPolicy, options); + // Initialize retry options + this.retryOptions = { + retryPolicyType: retryOptions.retryPolicyType + ? retryOptions.retryPolicyType + : DEFAULT_RETRY_OPTIONS.retryPolicyType, + maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1 + ? Math.floor(retryOptions.maxTries) + : DEFAULT_RETRY_OPTIONS.maxTries, + tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0 + ? retryOptions.tryTimeoutInMs + : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs, + retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0 + ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs) + : DEFAULT_RETRY_OPTIONS.retryDelayInMs, + maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0 + ? retryOptions.maxRetryDelayInMs + : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs, + secondaryHost: retryOptions.secondaryHost + ? retryOptions.secondaryHost + : DEFAULT_RETRY_OPTIONS.secondaryHost, + }; } - const host = new URL(uri).hostname; - if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { - return bypassedMap.get(host); + /** + * Sends request. + * + * @param request - + */ + async sendRequest(request) { + return this.attemptSendRequest(request, false, 1); } - let isBypassedFlag = false; - for (const pattern of noProxyList) { - if (pattern[0] === ".") { - // This should match either domain it self or any subdomain or host - // .foo.com will match foo.com it self or *.foo.com - if (host.endsWith(pattern)) { - isBypassedFlag = true; + /** + * Decide and perform next retry. Won't mutate request parameter. + * + * @param request - + * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then + * the resource was not found. This may be due to replication delay. So, in this + * case, we'll never try the secondary again for this operation. + * @param attempt - How many retries has been attempted to performed, starting from 1, which includes + * the attempt will be performed by this method call. + */ + async attemptSendRequest(request, secondaryHas404, attempt) { + const newRequest = request.clone(); + const isPrimaryRetry = secondaryHas404 || + !this.retryOptions.secondaryHost || + !(request.method === "GET" || request.method === "HEAD" || request.method === "OPTIONS") || + attempt % 2 === 1; + if (!isPrimaryRetry) { + newRequest.url = (0, utils_common_js_1.setURLHost)(newRequest.url, this.retryOptions.secondaryHost); + } + // Set the server-side timeout query parameter "timeout=[seconds]" + if (this.retryOptions.tryTimeoutInMs) { + newRequest.url = (0, utils_common_js_1.setURLParameter)(newRequest.url, constants_js_1.URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString()); + } + let response; + try { + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); + response = await this._nextPolicy.sendRequest(newRequest); + if (!this.shouldRetry(isPrimaryRetry, attempt, response)) { + return response; } - else { - if (host.length === pattern.length - 1 && host === pattern.slice(1)) { - isBypassedFlag = true; + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); + } + catch (err) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`); + if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) { + throw err; + } + } + await this.delay(isPrimaryRetry, attempt, request.abortSignal); + return this.attemptSendRequest(request, secondaryHas404, ++attempt); + } + /** + * Decide whether to retry according to last HTTP response and retry counters. + * + * @param isPrimaryRetry - + * @param attempt - + * @param response - + * @param err - + */ + shouldRetry(isPrimaryRetry, attempt, response, err) { + if (attempt >= this.retryOptions.maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions + .maxTries}, no further try.`); + return false; + } + // Handle network failures, you may need to customize the list when you implement + // your own http client + const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js + ]; + if (err) { + for (const retriableError of retriableErrors) { + if (err.name.toUpperCase().includes(retriableError) || + err.message.toUpperCase().includes(retriableError) || + (err.code && err.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; } } } - else { - if (host === pattern) { - isBypassedFlag = true; + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || err) { + const statusCode = response ? response.status : err ? err.statusCode : 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; } } - } - bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag); - return isBypassedFlag; -} -function loadNoProxy() { - const noProxy = getEnvironmentValue(NO_PROXY); - noProxyListLoaded = true; - if (noProxy) { - return noProxy - .split(",") - .map((item) => item.trim()) - .filter((item) => item.length); - } - return []; -} -/** - * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. - * If no argument is given, it attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - * @param proxyUrl - The url of the proxy to use. May contain authentication information. - * @deprecated - Internally this method is no longer necessary when setting proxy information. - */ -function getDefaultProxySettings(proxyUrl) { - if (!proxyUrl) { - proxyUrl = loadEnvironmentProxyValue(); - if (!proxyUrl) { - return undefined; + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } } - } - const parsedUrl = new URL(proxyUrl); - const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; - return { - host: schema + parsedUrl.hostname, - port: Number.parseInt(parsedUrl.port || "80"), - username: parsedUrl.username, - password: parsedUrl.password, - }; -} -/** - * This method attempts to parse a proxy URL from the environment - * variables `HTTPS_PROXY` or `HTTP_PROXY`. - */ -function getDefaultProxySettingsInternal() { - const envProxy = loadEnvironmentProxyValue(); - return envProxy ? new URL(envProxy) : undefined; -} -function getUrlFromProxySettings(settings) { - let parsedProxyUrl; - try { - parsedProxyUrl = new URL(settings.host); - } - catch (_a) { - throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); - } - parsedProxyUrl.port = String(settings.port); - if (settings.username) { - parsedProxyUrl.username = settings.username; - } - if (settings.password) { - parsedProxyUrl.password = settings.password; - } - return parsedProxyUrl; -} -function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { - // Custom Agent should take precedence so if one is present - // we should skip to avoid overwriting it. - if (request.agent) { - return; - } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; - if (request.tlsSettings) { - log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); - } - const headers = request.headers.toJSON(); - if (isInsecure) { - if (!cachedAgents.httpProxyAgent) { - cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); + if (err?.code === "PARSE_ERROR" && err?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; } - request.agent = cachedAgents.httpProxyAgent; + return false; } - else { - if (!cachedAgents.httpsProxyAgent) { - cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); + /** + * Delay a calculated time between retries. + * + * @param isPrimaryRetry - + * @param attempt - + * @param abortSignal - + */ + async delay(isPrimaryRetry, attempt, abortSignal) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (this.retryOptions.retryPolicyType) { + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs); + break; + case StorageRetryPolicyType_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = this.retryOptions.retryDelayInMs; + break; + } } - request.agent = cachedAgents.httpsProxyAgent; - } -} -/** - * A policy that allows one to apply proxy settings to all requests. - * If not passed static settings, they will be retrieved from the HTTPS_PROXY - * or HTTP_PROXY environment variables. - * @param proxySettings - ProxySettings to use on each request. - * @param options - additional settings, for example, custom NO_PROXY patterns - */ -function proxyPolicy(proxySettings, options) { - if (!noProxyListLoaded) { - exports.globalNoProxyList.push(...loadNoProxy()); + else { + delayTimeInMs = Math.random() * 1000; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return (0, utils_common_js_1.delay)(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR); } - const defaultProxy = proxySettings - ? getUrlFromProxySettings(proxySettings) - : getDefaultProxySettingsInternal(); - const cachedAgents = {}; - return { - name: exports.proxyPolicyName, - async sendRequest(request, next) { - var _a; - if (!request.proxySettings && - defaultProxy && - !isBypassed(request.url, (_a = options === null || options === void 0 ? void 0 : options.customNoProxyList) !== null && _a !== void 0 ? _a : exports.globalNoProxyList, (options === null || options === void 0 ? void 0 : options.customNoProxyList) ? undefined : globalBypassedMap)) { - setProxyAgentOnRequest(request, cachedAgents, defaultProxy); - } - else if (request.proxySettings) { - setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); - } - return next(request); - }, - }; } -//# sourceMappingURL=proxyPolicy.js.map +exports.StorageRetryPolicy = StorageRetryPolicy; +//# sourceMappingURL=StorageRetryPolicy.js.map /***/ }), -/***/ 98526: +/***/ 21483: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -147473,62 +150543,26 @@ function proxyPolicy(proxySettings, options) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.redirectPolicyName = void 0; -exports.redirectPolicy = redirectPolicy; -/** - * The programmatic identifier of the redirectPolicy. - */ -exports.redirectPolicyName = "redirectPolicy"; -/** - * Methods that are allowed to follow redirects 301 and 302 - */ -const allowedRedirect = ["GET", "HEAD"]; +exports.StorageRetryPolicyType = void 0; /** - * A policy to follow Location headers from the server in order - * to support server-side redirection. - * In the browser, this policy is not used. - * @param options - Options to control policy behavior. + * RetryPolicy types. */ -function redirectPolicy(options = {}) { - const { maxRetries = 20 } = options; - return { - name: exports.redirectPolicyName, - async sendRequest(request, next) { - const response = await next(request); - return handleRedirect(next, response, maxRetries); - }, - }; -} -async function handleRedirect(next, response, maxRetries, currentRetries = 0) { - const { request, status, headers } = response; - const locationHeader = headers.get("location"); - if (locationHeader && - (status === 300 || - (status === 301 && allowedRedirect.includes(request.method)) || - (status === 302 && allowedRedirect.includes(request.method)) || - (status === 303 && request.method === "POST") || - status === 307) && - currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); - // POST request with Status code 303 should be converted into a - // redirected GET request if the redirect url is present in the location header - if (status === 303) { - request.method = "GET"; - request.headers.delete("Content-Length"); - delete request.body; - } - request.headers.delete("Authorization"); - const res = await next(request); - return handleRedirect(next, res, maxRetries, currentRetries + 1); - } - return response; -} -//# sourceMappingURL=redirectPolicy.js.map +var StorageRetryPolicyType; +(function (StorageRetryPolicyType) { + /** + * Exponential retry. Retry time delay grows exponentially. + */ + StorageRetryPolicyType[StorageRetryPolicyType["EXPONENTIAL"] = 0] = "EXPONENTIAL"; + /** + * Linear retry. Retry time delay grows linearly. + */ + StorageRetryPolicyType[StorageRetryPolicyType["FIXED"] = 1] = "FIXED"; +})(StorageRetryPolicyType || (exports.StorageRetryPolicyType = StorageRetryPolicyType = {})); +//# sourceMappingURL=StorageRetryPolicyType.js.map /***/ }), -/***/ 39700: +/***/ 3353: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -147536,149 +150570,330 @@ async function handleRedirect(next, response, maxRetries, currentRetries = 0) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.retryPolicy = retryPolicy; -const helpers_js_1 = __nccwpck_require__(21333); -const logger_1 = __nccwpck_require__(89497); -const abort_controller_1 = __nccwpck_require__(11514); -const constants_js_1 = __nccwpck_require__(43171); -const retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); +exports.storageRetryPolicyName = void 0; +exports.storageRetryPolicy = storageRetryPolicy; +const abort_controller_1 = __nccwpck_require__(31514); +const core_rest_pipeline_1 = __nccwpck_require__(29146); +const core_util_1 = __nccwpck_require__(80637); +const StorageRetryPolicyFactory_js_1 = __nccwpck_require__(26508); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const log_js_1 = __nccwpck_require__(89818); /** - * The programmatic identifier of the retryPolicy. + * Name of the {@link storageRetryPolicy} */ -const retryPolicyName = "retryPolicy"; +exports.storageRetryPolicyName = "storageRetryPolicy"; +// Default values of StorageRetryOptions +const DEFAULT_RETRY_OPTIONS = { + maxRetryDelayInMs: 120 * 1000, + maxTries: 4, + retryDelayInMs: 4 * 1000, + retryPolicyType: StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL, + secondaryHost: "", + tryTimeoutInMs: undefined, // Use server side default timeout strategy +}; +const retriableErrors = [ + "ETIMEDOUT", + "ESOCKETTIMEDOUT", + "ECONNREFUSED", + "ECONNRESET", + "ENOENT", + "ENOTFOUND", + "TIMEOUT", + "EPIPE", + "REQUEST_SEND_ERROR", +]; +const RETRY_ABORT_ERROR = new abort_controller_1.AbortError("The operation was aborted."); /** - * retryPolicy is a generic policy to enable retrying requests when certain conditions are met + * Retry policy with exponential retry and linear retry implemented. */ -function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { - const logger = options.logger || retryPolicyLogger; +function storageRetryPolicy(options = {}) { + const retryPolicyType = options.retryPolicyType ?? DEFAULT_RETRY_OPTIONS.retryPolicyType; + const maxTries = options.maxTries ?? DEFAULT_RETRY_OPTIONS.maxTries; + const retryDelayInMs = options.retryDelayInMs ?? DEFAULT_RETRY_OPTIONS.retryDelayInMs; + const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs; + const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS.secondaryHost; + const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS.tryTimeoutInMs; + function shouldRetry({ isPrimaryRetry, attempt, response, error, }) { + if (attempt >= maxTries) { + log_js_1.logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); + return false; + } + if (error) { + for (const retriableError of retriableErrors) { + if (error.name.toUpperCase().includes(retriableError) || + error.message.toUpperCase().includes(retriableError) || + (error.code && error.code.toString().toUpperCase() === retriableError)) { + log_js_1.logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); + return true; + } + } + if (error?.code === "PARSE_ERROR" && + error?.message.startsWith(`Error "Error: Unclosed root tag`)) { + log_js_1.logger.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); + return true; + } + } + // If attempt was against the secondary & it returned a StatusNotFound (404), then + // the resource was not found. This may be due to replication delay. So, in this + // case, we'll never try the secondary again for this operation. + if (response || error) { + const statusCode = response?.status ?? error?.statusCode ?? 0; + if (!isPrimaryRetry && statusCode === 404) { + log_js_1.logger.info(`RetryPolicy: Secondary access with 404, will retry.`); + return true; + } + // Server internal error or server timeout + if (statusCode === 503 || statusCode === 500) { + log_js_1.logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`); + return true; + } + } + if (response) { + // Retry select Copy Source Error Codes. + if (response?.status >= 400) { + const copySourceError = response.headers.get(constants_js_1.HeaderConstants.X_MS_CopySourceErrorCode); + if (copySourceError !== undefined) { + switch (copySourceError) { + case "InternalError": + case "OperationTimedOut": + case "ServerBusy": + return true; + } + } + } + } + return false; + } + function calculateDelay(isPrimaryRetry, attempt) { + let delayTimeInMs = 0; + if (isPrimaryRetry) { + switch (retryPolicyType) { + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.EXPONENTIAL: + delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * retryDelayInMs, maxRetryDelayInMs); + break; + case StorageRetryPolicyFactory_js_1.StorageRetryPolicyType.FIXED: + delayTimeInMs = retryDelayInMs; + break; + } + } + else { + delayTimeInMs = Math.random() * 1000; + } + log_js_1.logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`); + return delayTimeInMs; + } return { - name: retryPolicyName, + name: exports.storageRetryPolicyName, async sendRequest(request, next) { - var _a, _b; + // Set the server-side timeout query parameter "timeout=[seconds]" + if (tryTimeoutInMs) { + request.url = (0, utils_common_js_1.setURLParameter)(request.url, constants_js_1.URLConstants.Parameters.TIMEOUT, String(Math.floor(tryTimeoutInMs / 1000))); + } + const primaryUrl = request.url; + const secondaryUrl = secondaryHost ? (0, utils_common_js_1.setURLHost)(request.url, secondaryHost) : undefined; + let secondaryHas404 = false; + let attempt = 1; + let retryAgain = true; let response; - let responseError; - let retryCount = -1; - retryRequest: while (true) { - retryCount += 1; + let error; + while (retryAgain) { + const isPrimaryRetry = secondaryHas404 || + !secondaryUrl || + !["GET", "HEAD", "OPTIONS"].includes(request.method) || + attempt % 2 === 1; + request.url = isPrimaryRetry ? primaryUrl : secondaryUrl; response = undefined; - responseError = undefined; + error = undefined; try { - logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + log_js_1.logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request); - logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404); } catch (e) { - logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); - // RestErrors are valid targets for the retry strategies. - // If none of the retry strategies can work with them, they will be thrown later in this policy. - // If the received error is not a RestError, it is immediately thrown. - responseError = e; - if (!e || responseError.name !== "RestError") { - throw e; - } - response = responseError.response; - } - if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) { - logger.error(`Retry ${retryCount}: Request aborted.`); - const abortError = new abort_controller_1.AbortError(); - throw abortError; - } - if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { - logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); - if (responseError) { - throw responseError; - } - else if (response) { - return response; + if ((0, core_rest_pipeline_1.isRestError)(e)) { + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); + error = e; } else { - throw new Error("Maximum retries reached with no response or error to throw"); - } - } - logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); - strategiesLoop: for (const strategy of strategies) { - const strategyLogger = strategy.logger || retryPolicyLogger; - strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); - const modifiers = strategy.retry({ - retryCount, - response, - responseError, - }); - if (modifiers.skipStrategy) { - strategyLogger.info(`Retry ${retryCount}: Skipped.`); - continue strategiesLoop; - } - const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; - if (errorToThrow) { - strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); - throw errorToThrow; - } - if (retryAfterInMs || retryAfterInMs === 0) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); - await (0, helpers_js_1.delay)(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); - continue retryRequest; - } - if (redirectTo) { - strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); - request.url = redirectTo; - continue retryRequest; + log_js_1.logger.error(`RetryPolicy: Caught error, message: ${(0, core_util_1.getErrorMessage)(e)}`); + throw e; } } - if (responseError) { - logger.info(`None of the retry strategies could work with the received error. Throwing it.`); - throw responseError; - } - if (response) { - logger.info(`None of the retry strategies could work with the received response. Returning it.`); - return response; - } - // If all the retries skip and there's no response, - // we're still in the retry loop, so a new request will be sent - // until `maxRetries` is reached. + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error }); + if (retryAgain) { + await (0, utils_common_js_1.delay)(calculateDelay(isPrimaryRetry, attempt), request.abortSignal, RETRY_ABORT_ERROR); + } + attempt++; + } + if (response) { + return response; } + throw error ?? new core_rest_pipeline_1.RestError("RetryPolicy failed without known error."); }, }; } -//# sourceMappingURL=retryPolicy.js.map +//# sourceMappingURL=StorageRetryPolicyV2.js.map /***/ }), -/***/ 93860: -/***/ ((__unused_webpack_module, exports) => { +/***/ 40755: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.setClientRequestIdPolicyName = void 0; -exports.setClientRequestIdPolicy = setClientRequestIdPolicy; -/** - * The programmatic identifier of the setClientRequestIdPolicy. - */ -exports.setClientRequestIdPolicyName = "setClientRequestIdPolicy"; +exports.StorageSharedKeyCredentialPolicy = void 0; +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const CredentialPolicy_js_1 = __nccwpck_require__(13615); +const SharedKeyComparator_js_1 = __nccwpck_require__(4482); /** - * Each PipelineRequest gets a unique id upon creation. - * This policy passes that unique id along via an HTTP header to enable better - * telemetry and tracing. - * @param requestIdHeaderName - The name of the header to pass the request ID to. + * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key. */ -function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id") { - return { - name: exports.setClientRequestIdPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(requestIdHeaderName)) { - request.headers.set(requestIdHeaderName, request.requestId); +class StorageSharedKeyCredentialPolicy extends CredentialPolicy_js_1.CredentialPolicy { + /** + * Reference to StorageSharedKeyCredential which generates StorageSharedKeyCredentialPolicy + */ + factory; + /** + * Creates an instance of StorageSharedKeyCredentialPolicy. + * @param nextPolicy - + * @param options - + * @param factory - + */ + constructor(nextPolicy, options, factory) { + super(nextPolicy, options); + this.factory = factory; + } + /** + * Signs request. + * + * @param request - + */ + signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || request.body !== undefined) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + this.getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + this.getCanonicalizedHeadersString(request) + + this.getCanonicalizedResourceString(request); + const signature = this.factory.computeHMACSHA256(stringToSign); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + return request; + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + * + * @param request - + * @param headerName - + */ + getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + * @param request - + */ + getCanonicalizedHeadersString(request) { + let headersArray = request.headers.headersArray().filter((value) => { + return value.name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE); + }); + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; } - return next(request); - }, - }; + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; + } + /** + * Retrieves the webResource canonicalized resource string. + * + * @param request - + */ + getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${this.factory.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } } -//# sourceMappingURL=setClientRequestIdPolicy.js.map +exports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy; +//# sourceMappingURL=StorageSharedKeyCredentialPolicy.js.map /***/ }), -/***/ 72470: +/***/ 89020: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -147686,77 +150901,225 @@ function setClientRequestIdPolicy(requestIdHeaderName = "x-ms-client-request-id" // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.systemErrorRetryPolicyName = void 0; -exports.systemErrorRetryPolicy = systemErrorRetryPolicy; -const exponentialRetryStrategy_js_1 = __nccwpck_require__(843); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); +exports.storageSharedKeyCredentialPolicyName = void 0; +exports.storageSharedKeyCredentialPolicy = storageSharedKeyCredentialPolicy; +const node_crypto_1 = __nccwpck_require__(6005); +const constants_js_1 = __nccwpck_require__(77807); +const utils_common_js_1 = __nccwpck_require__(61876); +const SharedKeyComparator_js_1 = __nccwpck_require__(4482); /** - * Name of the {@link systemErrorRetryPolicy} + * The programmatic identifier of the storageSharedKeyCredentialPolicy. */ -exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; +exports.storageSharedKeyCredentialPolicyName = "storageSharedKeyCredentialPolicy"; /** - * A retry policy that specifically seeks to handle errors in the - * underlying transport layer (e.g. DNS lookup failures) rather than - * retryable error codes from the server itself. - * @param options - Options that customize the policy. + * storageSharedKeyCredentialPolicy handles signing requests using storage account keys. */ -function systemErrorRetryPolicy(options = {}) { - var _a; +function storageSharedKeyCredentialPolicy(options) { + function signRequest(request) { + request.headers.set(constants_js_1.HeaderConstants.X_MS_DATE, new Date().toUTCString()); + if (request.body && + (typeof request.body === "string" || Buffer.isBuffer(request.body)) && + request.body.length > 0) { + request.headers.set(constants_js_1.HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body)); + } + const stringToSign = [ + request.method.toUpperCase(), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LANGUAGE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_ENCODING), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_LENGTH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_MD5), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.CONTENT_TYPE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.DATE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_NONE_MATCH), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.IF_UNMODIFIED_SINCE), + getHeaderValueToSign(request, constants_js_1.HeaderConstants.RANGE), + ].join("\n") + + "\n" + + getCanonicalizedHeadersString(request) + + getCanonicalizedResourceString(request); + const signature = (0, node_crypto_1.createHmac)("sha256", options.accountKey) + .update(stringToSign, "utf8") + .digest("base64"); + request.headers.set(constants_js_1.HeaderConstants.AUTHORIZATION, `SharedKey ${options.accountName}:${signature}`); + // console.log(`[URL]:${request.url}`); + // console.log(`[HEADERS]:${request.headers.toString()}`); + // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`); + // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`); + } + /** + * Retrieve header value according to shared key sign rules. + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + */ + function getHeaderValueToSign(request, headerName) { + const value = request.headers.get(headerName); + if (!value) { + return ""; + } + // When using version 2015-02-21 or later, if Content-Length is zero, then + // set the Content-Length part of the StringToSign to an empty string. + // https://learn.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key + if (headerName === constants_js_1.HeaderConstants.CONTENT_LENGTH && value === "0") { + return ""; + } + return value; + } + /** + * To construct the CanonicalizedHeaders portion of the signature string, follow these steps: + * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header. + * 2. Convert each HTTP header name to lowercase. + * 3. Sort the headers lexicographically by header name, in ascending order. + * Each header may appear only once in the string. + * 4. Replace any linear whitespace in the header value with a single space. + * 5. Trim any whitespace around the colon in the header. + * 6. Finally, append a new-line character to each canonicalized header in the resulting list. + * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string. + * + */ + function getCanonicalizedHeadersString(request) { + let headersArray = []; + for (const [name, value] of request.headers) { + if (name.toLowerCase().startsWith(constants_js_1.HeaderConstants.PREFIX_FOR_STORAGE)) { + headersArray.push({ name, value }); + } + } + headersArray.sort((a, b) => { + return (0, SharedKeyComparator_js_1.compareHeader)(a.name.toLowerCase(), b.name.toLowerCase()); + }); + // Remove duplicate headers + headersArray = headersArray.filter((value, index, array) => { + if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) { + return false; + } + return true; + }); + let canonicalizedHeadersStringToSign = ""; + headersArray.forEach((header) => { + canonicalizedHeadersStringToSign += `${header.name + .toLowerCase() + .trimRight()}:${header.value.trimLeft()}\n`; + }); + return canonicalizedHeadersStringToSign; + } + function getCanonicalizedResourceString(request) { + const path = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + let canonicalizedResourceString = ""; + canonicalizedResourceString += `/${options.accountName}${path}`; + const queries = (0, utils_common_js_1.getURLQueries)(request.url); + const lowercaseQueries = {}; + if (queries) { + const queryKeys = []; + for (const key in queries) { + if (Object.prototype.hasOwnProperty.call(queries, key)) { + const lowercaseKey = key.toLowerCase(); + lowercaseQueries[lowercaseKey] = queries[key]; + queryKeys.push(lowercaseKey); + } + } + queryKeys.sort(); + for (const key of queryKeys) { + canonicalizedResourceString += `\n${key}:${decodeURIComponent(lowercaseQueries[key])}`; + } + } + return canonicalizedResourceString; + } return { - name: exports.systemErrorRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([ - (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(Object.assign(Object.assign({}, options), { ignoreHttpStatusCodes: true })), - ], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, + name: exports.storageSharedKeyCredentialPolicyName, + async sendRequest(request, next) { + signRequest(request); + return next(request); + }, }; } -//# sourceMappingURL=systemErrorRetryPolicy.js.map +//# sourceMappingURL=StorageSharedKeyCredentialPolicyV2.js.map /***/ }), -/***/ 54802: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 4482: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.throttlingRetryPolicyName = void 0; -exports.throttlingRetryPolicy = throttlingRetryPolicy; -const throttlingRetryStrategy_js_1 = __nccwpck_require__(66645); -const retryPolicy_js_1 = __nccwpck_require__(39700); -const constants_js_1 = __nccwpck_require__(43171); -/** - * Name of the {@link throttlingRetryPolicy} - */ -exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; -/** - * A policy that retries when the server sends a 429 response with a Retry-After header. - * - * To learn more, please refer to - * https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits, - * https://learn.microsoft.com/en-us/azure/azure-subscription-service-limits and - * https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors - * - * @param options - Options that configure retry logic. +exports.compareHeader = compareHeader; +/* + * We need to imitate .Net culture-aware sorting, which is used in storage service. + * Below tables contain sort-keys for en-US culture. */ -function throttlingRetryPolicy(options = {}) { - var _a; - return { - name: exports.throttlingRetryPolicyName, - sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { - maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : constants_js_1.DEFAULT_RETRY_POLICY_COUNT, - }).sendRequest, - }; +const table_lv0 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x71c, 0x0, 0x71f, 0x721, + 0x723, 0x725, 0x0, 0x0, 0x0, 0x72d, 0x803, 0x0, 0x0, 0x733, 0x0, 0xd03, 0xd1a, 0xd1c, 0xd1e, + 0xd20, 0xd22, 0xd24, 0xd26, 0xd28, 0xd2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe02, 0xe09, 0xe0a, + 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, 0xe7c, 0xe7e, 0xe89, + 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x0, 0x0, 0x743, 0x744, 0x748, + 0xe02, 0xe09, 0xe0a, 0xe1a, 0xe21, 0xe23, 0xe25, 0xe2c, 0xe32, 0xe35, 0xe36, 0xe48, 0xe51, 0xe70, + 0xe7c, 0xe7e, 0xe89, 0xe8a, 0xe91, 0xe99, 0xe9f, 0xea2, 0xea4, 0xea6, 0xea7, 0xea9, 0x0, 0x74c, + 0x0, 0x750, 0x0, +]); +const table_lv2 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, + 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +const table_lv4 = new Uint32Array([ + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x8012, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8212, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, +]); +function compareHeader(lhs, rhs) { + if (isLessThan(lhs, rhs)) + return -1; + return 1; } -//# sourceMappingURL=throttlingRetryPolicy.js.map +function isLessThan(lhs, rhs) { + const tables = [table_lv0, table_lv2, table_lv4]; + let curr_level = 0; + let i = 0; + let j = 0; + while (curr_level < tables.length) { + if (curr_level === tables.length - 1 && i !== j) { + return i > j; + } + const weight1 = i < lhs.length ? tables[curr_level][lhs[i].charCodeAt(0)] : 0x1; + const weight2 = j < rhs.length ? tables[curr_level][rhs[j].charCodeAt(0)] : 0x1; + if (weight1 === 0x1 && weight2 === 0x1) { + i = 0; + j = 0; + ++curr_level; + } + else if (weight1 === weight2) { + ++i; + ++j; + } + else if (weight1 === 0) { + ++i; + } + else if (weight2 === 0) { + ++j; + } + else { + return weight1 < weight2; + } + } + return false; +} +//# sourceMappingURL=SharedKeyComparator.js.map /***/ }), -/***/ 88446: +/***/ 77807: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -147764,32 +151127,73 @@ function throttlingRetryPolicy(options = {}) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.tlsPolicyName = void 0; -exports.tlsPolicy = tlsPolicy; -/** - * Name of the TLS Policy - */ -exports.tlsPolicyName = "tlsPolicy"; -/** - * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. - */ -function tlsPolicy(tlsSettings) { - return { - name: exports.tlsPolicyName, - sendRequest: async (req, next) => { - // Users may define a request tlsSettings, honor those over the client level one - if (!req.tlsSettings) { - req.tlsSettings = tlsSettings; - } - return next(req); - }, - }; -} -//# sourceMappingURL=tlsPolicy.js.map +exports.PathStylePorts = exports.DevelopmentConnectionString = exports.HeaderConstants = exports.URLConstants = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "1.0.0"; +exports.URLConstants = { + Parameters: { + FORCE_BROWSER_NO_CACHE: "_", + SIGNATURE: "sig", + SNAPSHOT: "snapshot", + VERSIONID: "versionid", + TIMEOUT: "timeout", + }, +}; +exports.HeaderConstants = { + AUTHORIZATION: "Authorization", + AUTHORIZATION_SCHEME: "Bearer", + CONTENT_ENCODING: "Content-Encoding", + CONTENT_ID: "Content-ID", + CONTENT_LANGUAGE: "Content-Language", + CONTENT_LENGTH: "Content-Length", + CONTENT_MD5: "Content-Md5", + CONTENT_TRANSFER_ENCODING: "Content-Transfer-Encoding", + CONTENT_TYPE: "Content-Type", + COOKIE: "Cookie", + DATE: "date", + IF_MATCH: "if-match", + IF_MODIFIED_SINCE: "if-modified-since", + IF_NONE_MATCH: "if-none-match", + IF_UNMODIFIED_SINCE: "if-unmodified-since", + PREFIX_FOR_STORAGE: "x-ms-", + RANGE: "Range", + USER_AGENT: "User-Agent", + X_MS_CLIENT_REQUEST_ID: "x-ms-client-request-id", + X_MS_COPY_SOURCE: "x-ms-copy-source", + X_MS_DATE: "x-ms-date", + X_MS_ERROR_CODE: "x-ms-error-code", + X_MS_VERSION: "x-ms-version", + X_MS_CopySourceErrorCode: "x-ms-copy-source-error-code", +}; +exports.DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`; +/// List of ports used for path style addressing. +/// Path style addressing means that storage account is put in URI's Path segment in instead of in host. +exports.PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104", +]; +//# sourceMappingURL=constants.js.map /***/ }), -/***/ 80606: +/***/ 61876: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -147797,4727 +151201,6934 @@ function tlsPolicy(tlsSettings) { // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.tracingPolicyName = void 0; -exports.tracingPolicy = tracingPolicy; -const core_tracing_1 = __nccwpck_require__(19363); -const constants_js_1 = __nccwpck_require__(43171); -const userAgent_js_1 = __nccwpck_require__(96158); -const log_js_1 = __nccwpck_require__(30648); +exports.escapeURLPath = escapeURLPath; +exports.getValueInConnString = getValueInConnString; +exports.extractConnectionStringParts = extractConnectionStringParts; +exports.appendToURLPath = appendToURLPath; +exports.setURLParameter = setURLParameter; +exports.getURLParameter = getURLParameter; +exports.setURLHost = setURLHost; +exports.getURLPath = getURLPath; +exports.getURLScheme = getURLScheme; +exports.getURLPathAndQuery = getURLPathAndQuery; +exports.getURLQueries = getURLQueries; +exports.appendToURLQuery = appendToURLQuery; +exports.truncatedISO8061Date = truncatedISO8061Date; +exports.base64encode = base64encode; +exports.base64decode = base64decode; +exports.generateBlockID = generateBlockID; +exports.delay = delay; +exports.padStart = padStart; +exports.sanitizeURL = sanitizeURL; +exports.sanitizeHeaders = sanitizeHeaders; +exports.iEqual = iEqual; +exports.getAccountNameFromUrl = getAccountNameFromUrl; +exports.isIpEndpointStyle = isIpEndpointStyle; +exports.attachCredential = attachCredential; +exports.httpAuthorizationToString = httpAuthorizationToString; +exports.EscapePath = EscapePath; +exports.assertResponse = assertResponse; +const core_rest_pipeline_1 = __nccwpck_require__(29146); const core_util_1 = __nccwpck_require__(80637); -const restError_js_1 = __nccwpck_require__(61036); -const sanitizer_js_1 = __nccwpck_require__(34472); -/** - * The programmatic identifier of the tracingPolicy. - */ -exports.tracingPolicyName = "tracingPolicy"; +const constants_js_1 = __nccwpck_require__(77807); /** - * A simple policy to create OpenTelemetry Spans for each request made by the pipeline - * that has SpanOptions with a parent. - * Requests made without a parent Span will not be recorded. - * @param options - Options to configure the telemetry logged by the tracing policy. + * Reserved URL characters must be properly escaped for Storage services like Blob or File. + * + * ## URL encode and escape strategy for JS SDKs + * + * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not. + * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL + * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors. + * + * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK. + * + * This is what legacy V2 SDK does, simple and works for most of the cases. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * SDK will encode it to "http://account.blob.core.windows.net/con/b%253A" and send to server. A blob named "b%3A" will be created. + * + * But this strategy will make it not possible to create a blob with "?" in it's name. Because when customer URL string is + * "http://account.blob.core.windows.net/con/blob?name", the "?name" will be treated as URL paramter instead of blob name. + * If customer URL string is "http://account.blob.core.windows.net/con/blob%3Fname", a blob named "blob%3Fname" will be created. + * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it. + * We cannot accept a SDK cannot create a blob name with "?". So we implement strategy two: + * + * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters. + * + * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped. + * - When customer URL string is "http://account.blob.core.windows.net/con/b:", + * SDK will escape ":" like "http://account.blob.core.windows.net/con/b%3A" and send to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%3A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%3A" to server. A blob named "b:" will be created. + * - When customer URL string is "http://account.blob.core.windows.net/con/b%253A", + * There is no special characters, so send "http://account.blob.core.windows.net/con/b%253A" to server. A blob named "b%3A" will be created. + * + * This strategy gives us flexibility to create with any special characters. But "%" will be treated as a special characters, if the URL string + * is not encoded, there shouldn't a "%" in the URL string, otherwise the URL is not a valid URL. + * If customer needs to create a blob with "%" in it's blob name, use "%25" instead of "%". Just like above 3rd sample. + * And following URL strings are invalid: + * - "http://account.blob.core.windows.net/con/b%" + * - "http://account.blob.core.windows.net/con/b%2" + * - "http://account.blob.core.windows.net/con/b%G" + * + * Another special character is "?", use "%2F" to represent a blob name with "?" in a URL string. + * + * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)` + * + * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL. + * + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata + * @see https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata + * + * @param url - */ -function tracingPolicy(options = {}) { - const userAgentPromise = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - const sanitizer = new sanitizer_js_1.Sanitizer({ - additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, - }); - const tracingClient = tryCreateTracingClient(); - return { - name: exports.tracingPolicyName, - async sendRequest(request, next) { - var _a; - if (!tracingClient) { - return next(request); - } - const userAgent = await userAgentPromise; - const spanAttributes = { - "http.url": sanitizer.sanitizeUrl(request.url), - "http.method": request.method, - "http.user_agent": userAgent, - requestId: request.requestId, - }; - if (userAgent) { - spanAttributes["http.user_agent"] = userAgent; - } - const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {}; - if (!span || !tracingContext) { - return next(request); - } - try { - const response = await tracingClient.withContext(tracingContext, next, request); - tryProcessResponse(span, response); - return response; - } - catch (err) { - tryProcessError(span, err); - throw err; - } - }, - }; -} -function tryCreateTracingClient() { - try { - return (0, core_tracing_1.createTracingClient)({ - namespace: "", - packageName: "@azure/core-rest-pipeline", - packageVersion: constants_js_1.SDK_VERSION, - }); - } - catch (e) { - log_js_1.logger.warning(`Error when creating the TracingClient: ${(0, core_util_1.getErrorMessage)(e)}`); - return undefined; - } +function escapeURLPath(url) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path || "/"; + path = escape(path); + urlParsed.pathname = path; + return urlParsed.toString(); } -function tryCreateSpan(tracingClient, request, spanAttributes) { - try { - // As per spec, we do not need to differentiate between HTTP and HTTPS in span name. - const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, { - spanKind: "client", - spanAttributes, - }); - // If the span is not recording, don't do any more work. - if (!span.isRecording()) { - span.end(); - return undefined; - } - // set headers - const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext); - for (const [key, value] of Object.entries(headers)) { - request.headers.set(key, value); +function getProxyUriFromDevConnString(connectionString) { + // Development Connection String + // https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key + let proxyUri = ""; + if (connectionString.search("DevelopmentStorageProxyUri=") !== -1) { + // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri + const matchCredentials = connectionString.split(";"); + for (const element of matchCredentials) { + if (element.trim().startsWith("DevelopmentStorageProxyUri=")) { + proxyUri = element.trim().match("DevelopmentStorageProxyUri=(.*)")[1]; + } } - return { span, tracingContext: updatedOptions.tracingOptions.tracingContext }; - } - catch (e) { - log_js_1.logger.warning(`Skipping creating a tracing span due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); - return undefined; } + return proxyUri; } -function tryProcessError(span, error) { - try { - span.setStatus({ - status: "error", - error: (0, core_util_1.isError)(error) ? error : undefined, - }); - if ((0, restError_js_1.isRestError)(error) && error.statusCode) { - span.setAttribute("http.status_code", error.statusCode); +function getValueInConnString(connectionString, argument) { + const elements = connectionString.split(";"); + for (const element of elements) { + if (element.trim().startsWith(argument)) { + return element.trim().match(argument + "=(.*)")[1]; } - span.end(); - } - catch (e) { - log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); } + return ""; } -function tryProcessResponse(span, response) { - try { - span.setAttribute("http.status_code", response.status); - const serviceRequestId = response.headers.get("x-ms-request-id"); - if (serviceRequestId) { - span.setAttribute("serviceRequestId", serviceRequestId); +/** + * Extracts the parts of an Azure Storage account connection string. + * + * @param connectionString - Connection string. + * @returns String key value pairs of the storage account's url and credentials. + */ +function extractConnectionStringParts(connectionString) { + let proxyUri = ""; + if (connectionString.startsWith("UseDevelopmentStorage=true")) { + // Development connection string + proxyUri = getProxyUriFromDevConnString(connectionString); + connectionString = constants_js_1.DevelopmentConnectionString; + } + // Matching BlobEndpoint in the Account connection string + let blobEndpoint = getValueInConnString(connectionString, "BlobEndpoint"); + // Slicing off '/' at the end if exists + // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end) + blobEndpoint = blobEndpoint.endsWith("/") ? blobEndpoint.slice(0, -1) : blobEndpoint; + if (connectionString.search("DefaultEndpointsProtocol=") !== -1 && + connectionString.search("AccountKey=") !== -1) { + // Account connection string + let defaultEndpointsProtocol = ""; + let accountName = ""; + let accountKey = Buffer.from("accountKey", "base64"); + let endpointSuffix = ""; + // Get account name and key + accountName = getValueInConnString(connectionString, "AccountName"); + accountKey = Buffer.from(getValueInConnString(connectionString, "AccountKey"), "base64"); + if (!blobEndpoint) { + // BlobEndpoint is not present in the Account connection string + // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}` + defaultEndpointsProtocol = getValueInConnString(connectionString, "DefaultEndpointsProtocol"); + const protocol = defaultEndpointsProtocol.toLowerCase(); + if (protocol !== "https" && protocol !== "http") { + throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'"); + } + endpointSuffix = getValueInConnString(connectionString, "EndpointSuffix"); + if (!endpointSuffix) { + throw new Error("Invalid EndpointSuffix in the provided Connection String"); + } + blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; } - // Per semantic conventions, only set the status to error if the status code is 4xx or 5xx. - // Otherwise, the status MUST remain unset. - // https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status - if (response.status >= 400) { - span.setStatus({ - status: "error", - }); + if (!accountName) { + throw new Error("Invalid AccountName in the provided Connection String"); } - span.end(); + else if (accountKey.length === 0) { + throw new Error("Invalid AccountKey in the provided Connection String"); + } + return { + kind: "AccountConnString", + url: blobEndpoint, + accountName, + accountKey, + proxyUri, + }; } - catch (e) { - log_js_1.logger.warning(`Skipping tracing span processing due to an error: ${(0, core_util_1.getErrorMessage)(e)}`); + else { + // SAS connection string + let accountSas = getValueInConnString(connectionString, "SharedAccessSignature"); + let accountName = getValueInConnString(connectionString, "AccountName"); + // if accountName is empty, try to read it from BlobEndpoint + if (!accountName) { + accountName = getAccountNameFromUrl(blobEndpoint); + } + if (!blobEndpoint) { + throw new Error("Invalid BlobEndpoint in the provided SAS Connection String"); + } + else if (!accountSas) { + throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String"); + } + // client constructors assume accountSas does *not* start with ? + if (accountSas.startsWith("?")) { + accountSas = accountSas.substring(1); + } + return { kind: "SASConnString", url: blobEndpoint, accountName, accountSas }; } } -//# sourceMappingURL=tracingPolicy.js.map - -/***/ }), - -/***/ 88935: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.userAgentPolicyName = void 0; -exports.userAgentPolicy = userAgentPolicy; -const userAgent_js_1 = __nccwpck_require__(96158); -const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** - * The programmatic identifier of the userAgentPolicy. + * Internal escape method implemented Strategy Two mentioned in escapeURL() description. + * + * @param text - */ -exports.userAgentPolicyName = "userAgentPolicy"; +function escape(text) { + return encodeURIComponent(text) + .replace(/%2F/g, "/") // Don't escape for "/" + .replace(/'/g, "%27") // Escape for "'" + .replace(/\+/g, "%20") + .replace(/%25/g, "%"); // Revert encoded "%" +} /** - * A policy that sets the User-Agent header (or equivalent) to reflect - * the library version. - * @param options - Options to customize the user agent value. + * Append a string to URL path. Will remove duplicated "/" in front of the string + * when URL path ends with a "/". + * + * @param url - Source URL string + * @param name - String to be appended to URL + * @returns An updated URL string */ -function userAgentPolicy(options = {}) { - const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); - return { - name: exports.userAgentPolicyName, - async sendRequest(request, next) { - if (!request.headers.has(UserAgentHeaderName)) { - request.headers.set(UserAgentHeaderName, await userAgentValue); - } - return next(request); - }, - }; +function appendToURLPath(url, name) { + const urlParsed = new URL(url); + let path = urlParsed.pathname; + path = path ? (path.endsWith("/") ? `${path}${name}` : `${path}/${name}`) : name; + urlParsed.pathname = path; + return urlParsed.toString(); } -//# sourceMappingURL=userAgentPolicy.js.map - -/***/ }), - -/***/ 61036: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.RestError = void 0; -exports.isRestError = isRestError; -const core_util_1 = __nccwpck_require__(80637); -const inspect_js_1 = __nccwpck_require__(33106); -const sanitizer_js_1 = __nccwpck_require__(34472); -const errorSanitizer = new sanitizer_js_1.Sanitizer(); /** - * A custom error type for failed pipeline requests. + * Set URL parameter name and value. If name exists in URL parameters, old value + * will be replaced by name key. If not provide value, the parameter will be deleted. + * + * @param url - Source URL string + * @param name - Parameter name + * @param value - Parameter value + * @returns An updated URL string */ -class RestError extends Error { - constructor(message, options = {}) { - super(message); - this.name = "RestError"; - this.code = options.code; - this.statusCode = options.statusCode; - // The request and response may contain sensitive information in the headers or body. - // To help prevent this sensitive information being accidentally logged, the request and response - // properties are marked as non-enumerable here. This prevents them showing up in the output of - // JSON.stringify and console.log. - Object.defineProperty(this, "request", { value: options.request, enumerable: false }); - Object.defineProperty(this, "response", { value: options.response, enumerable: false }); - Object.setPrototypeOf(this, RestError.prototype); +function setURLParameter(url, name, value) { + const urlParsed = new URL(url); + const encodedName = encodeURIComponent(name); + const encodedValue = value ? encodeURIComponent(value) : undefined; + // mutating searchParams will change the encoding, so we have to do this ourselves + const searchString = urlParsed.search === "" ? "?" : urlParsed.search; + const searchPieces = []; + for (const pair of searchString.slice(1).split("&")) { + if (pair) { + const [key] = pair.split("=", 2); + if (key !== encodedName) { + searchPieces.push(pair); + } + } } - /** - * Logging method for util.inspect in Node - */ - [inspect_js_1.custom]() { - // Extract non-enumerable properties and add them back. This is OK since in this output the request and - // response get sanitized. - return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; + if (encodedValue) { + searchPieces.push(`${encodedName}=${encodedValue}`); } + urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; + return urlParsed.toString(); } -exports.RestError = RestError; /** - * Something went wrong when making the request. - * This means the actual request failed for some reason, - * such as a DNS issue or the connection being lost. + * Get URL parameter by name. + * + * @param url - + * @param name - */ -RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; +function getURLParameter(url, name) { + const urlParsed = new URL(url); + return urlParsed.searchParams.get(name) ?? undefined; +} /** - * This means that parsing the response from the server failed. - * It may have been malformed. + * Set URL host. + * + * @param url - Source URL string + * @param host - New host string + * @returns An updated URL string */ -RestError.PARSE_ERROR = "PARSE_ERROR"; +function setURLHost(url, host) { + const urlParsed = new URL(url); + urlParsed.hostname = host; + return urlParsed.toString(); +} /** - * Typeguard for RestError - * @param e - Something caught by a catch clause. + * Get URL path from an URL string. + * + * @param url - Source URL string */ -function isRestError(e) { - if (e instanceof RestError) { - return true; +function getURLPath(url) { + try { + const urlParsed = new URL(url); + return urlParsed.pathname; + } + catch (e) { + return undefined; } - return (0, core_util_1.isError)(e) && e.name === "RestError"; } -//# sourceMappingURL=restError.js.map - -/***/ }), - -/***/ 843: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.exponentialRetryStrategy = exponentialRetryStrategy; -exports.isExponentialRetryResponse = isExponentialRetryResponse; -exports.isSystemError = isSystemError; -const core_util_1 = __nccwpck_require__(80637); -const throttlingRetryStrategy_js_1 = __nccwpck_require__(66645); -// intervals are in milliseconds -const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; -const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; /** - * A retry strategy that retries with an exponentially increasing delay in these two cases: - * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). - * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). + * Get URL scheme from an URL string. + * + * @param url - Source URL string */ -function exponentialRetryStrategy(options = {}) { - var _a, _b; - const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL; - const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL; - return { - name: "exponentialRetryStrategy", - retry({ retryCount, response, responseError }) { - const matchedSystemError = isSystemError(responseError); - const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; - const isExponential = isExponentialRetryResponse(response); - const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; - const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); - if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { - return { skipStrategy: true }; - } - if (responseError && !matchedSystemError && !isExponential) { - return { errorToThrow: responseError }; - } - return (0, core_util_1.calculateRetryDelay)(retryCount, { - retryDelayInMs: retryInterval, - maxRetryDelayInMs: maxRetryInterval, - }); - }, - }; +function getURLScheme(url) { + try { + const urlParsed = new URL(url); + return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; + } + catch (e) { + return undefined; + } } /** - * A response is a retry response if it has status codes: - * - 408, or - * - Greater or equal than 500, except for 501 and 505. + * Get URL path and query from an URL string. + * + * @param url - Source URL string */ -function isExponentialRetryResponse(response) { - return Boolean(response && - response.status !== undefined && - (response.status >= 500 || response.status === 408) && - response.status !== 501 && - response.status !== 505); +function getURLPathAndQuery(url) { + const urlParsed = new URL(url); + const pathString = urlParsed.pathname; + if (!pathString) { + throw new RangeError("Invalid url without valid path."); + } + let queryString = urlParsed.search || ""; + queryString = queryString.trim(); + if (queryString !== "") { + queryString = queryString.startsWith("?") ? queryString : `?${queryString}`; // Ensure query string start with '?' + } + return `${pathString}${queryString}`; } /** - * Determines whether an error from a pipeline response was triggered in the network layer. + * Get URL query key value pairs from an URL string. + * + * @param url - */ -function isSystemError(err) { - if (!err) { - return false; +function getURLQueries(url) { + let queryString = new URL(url).search; + if (!queryString) { + return {}; } - return (err.code === "ETIMEDOUT" || - err.code === "ESOCKETTIMEDOUT" || - err.code === "ECONNREFUSED" || - err.code === "ECONNRESET" || - err.code === "ENOENT" || - err.code === "ENOTFOUND"); + queryString = queryString.trim(); + queryString = queryString.startsWith("?") ? queryString.substring(1) : queryString; + let querySubStrings = queryString.split("&"); + querySubStrings = querySubStrings.filter((value) => { + const indexOfEqual = value.indexOf("="); + const lastIndexOfEqual = value.lastIndexOf("="); + return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1); + }); + const queries = {}; + for (const querySubString of querySubStrings) { + const splitResults = querySubString.split("="); + const key = splitResults[0]; + const value = splitResults[1]; + queries[key] = value; + } + return queries; } -//# sourceMappingURL=exponentialRetryStrategy.js.map - -/***/ }), - -/***/ 66645: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isThrottlingRetryResponse = isThrottlingRetryResponse; -exports.throttlingRetryStrategy = throttlingRetryStrategy; -const helpers_js_1 = __nccwpck_require__(21333); /** - * The header that comes back from Azure services representing - * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). + * Append a string to URL query. + * + * @param url - Source URL string. + * @param queryParts - String to be appended to the URL query. + * @returns An updated URL string. */ -const RetryAfterHeader = "Retry-After"; +function appendToURLQuery(url, queryParts) { + const urlParsed = new URL(url); + let query = urlParsed.search; + if (query) { + query += "&" + queryParts; + } + else { + query = queryParts; + } + urlParsed.search = query; + return urlParsed.toString(); +} /** - * The headers that come back from Azure services representing - * the amount of time (minimum) to wait to retry. + * Rounds a date off to seconds. * - * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds - * "Retry-After" : seconds or timestamp + * @param date - + * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned; + * If false, YYYY-MM-DDThh:mm:ssZ will be returned. + * @returns Date string in ISO8061 format, with or without 7 milliseconds component */ -const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; +function truncatedISO8061Date(date, withMilliseconds = true) { + // Date.toISOString() will return like "2018-10-29T06:34:36.139Z" + const dateString = date.toISOString(); + return withMilliseconds + ? dateString.substring(0, dateString.length - 1) + "0000" + "Z" + : dateString.substring(0, dateString.length - 5) + "Z"; +} /** - * A response is a throttling retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + * Base64 encode. * - * Returns the `retryAfterInMs` value if the response is a throttling retry response. - * If not throttling retry response, returns `undefined`. + * @param content - + */ +function base64encode(content) { + return !core_util_1.isNodeLike ? btoa(content) : Buffer.from(content).toString("base64"); +} +/** + * Base64 decode. * - * @internal + * @param encodedString - */ -function getRetryAfterInMs(response) { - if (!(response && [429, 503].includes(response.status))) - return undefined; - try { - // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" - for (const header of AllRetryAfterHeaders) { - const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); - if (retryAfterValue === 0 || retryAfterValue) { - // "Retry-After" header ==> seconds - // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds - const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; - return retryAfterValue * multiplyingFactor; // in milli-seconds - } - } - // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds - const retryAfterHeader = response.headers.get(RetryAfterHeader); - if (!retryAfterHeader) - return; - const date = Date.parse(retryAfterHeader); - const diff = date - Date.now(); - // negative diff would mean a date in the past, so retry asap with 0 milliseconds - return Number.isFinite(diff) ? Math.max(0, diff) : undefined; - } - catch (_a) { - return undefined; +function base64decode(encodedString) { + return !core_util_1.isNodeLike ? atob(encodedString) : Buffer.from(encodedString, "base64").toString(); +} +/** + * Generate a 64 bytes base64 block ID string. + * + * @param blockIndex - + */ +function generateBlockID(blockIDPrefix, blockIndex) { + // To generate a 64 bytes base64 string, source string should be 48 + const maxSourceStringLength = 48; + // A blob can have a maximum of 100,000 uncommitted blocks at any given time + const maxBlockIndexLength = 6; + const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength; + if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) { + blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength); } + const res = blockIDPrefix + + padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, "0"); + return base64encode(res); } /** - * A response is a retry response if it has a throttling status code (429 or 503), - * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. + * Delay specified time interval. + * + * @param timeInMs - + * @param aborter - + * @param abortError - */ -function isThrottlingRetryResponse(response) { - return Number.isFinite(getRetryAfterInMs(response)); -} -function throttlingRetryStrategy() { - return { - name: "throttlingRetryStrategy", - retry({ response }) { - const retryAfterInMs = getRetryAfterInMs(response); - if (!Number.isFinite(retryAfterInMs)) { - return { skipStrategy: true }; +async function delay(timeInMs, aborter, abortError) { + return new Promise((resolve, reject) => { + /* eslint-disable-next-line prefer-const */ + let timeout; + const abortHandler = () => { + if (timeout !== undefined) { + clearTimeout(timeout); } - return { - retryAfterInMs, - }; - }, - }; -} -//# sourceMappingURL=throttlingRetryStrategy.js.map - -/***/ }), - -/***/ 80107: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.concat = concat; -const tslib_1 = __nccwpck_require__(4351); -const node_stream_1 = __nccwpck_require__(84492); -const typeGuards_js_1 = __nccwpck_require__(58520); -const file_js_1 = __nccwpck_require__(3224); -function streamAsyncIterator() { - return tslib_1.__asyncGenerator(this, arguments, function* streamAsyncIterator_1() { - const reader = this.getReader(); - try { - while (true) { - const { done, value } = yield tslib_1.__await(reader.read()); - if (done) { - return yield tslib_1.__await(void 0); - } - yield yield tslib_1.__await(value); + reject(abortError); + }; + const resolveHandler = () => { + if (aborter !== undefined) { + aborter.removeEventListener("abort", abortHandler); } - } - finally { - reader.releaseLock(); + resolve(); + }; + timeout = setTimeout(resolveHandler, timeInMs); + if (aborter !== undefined) { + aborter.addEventListener("abort", abortHandler); } }); } -function makeAsyncIterable(webStream) { - if (!webStream[Symbol.asyncIterator]) { - webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); - } - if (!webStream.values) { - webStream.values = streamAsyncIterator.bind(webStream); +/** + * String.prototype.padStart() + * + * @param currentString - + * @param targetLength - + * @param padString - + */ +function padStart(currentString, targetLength, padString = " ") { + // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes + if (String.prototype.padStart) { + return currentString.padStart(targetLength, padString); } -} -function ensureNodeStream(stream) { - if (stream instanceof ReadableStream) { - makeAsyncIterable(stream); - return node_stream_1.Readable.fromWeb(stream); + padString = padString || " "; + if (currentString.length > targetLength) { + return currentString; } else { - return stream; + targetLength = targetLength - currentString.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); + } + return padString.slice(0, targetLength) + currentString; } } -function toStream(source) { - if (source instanceof Uint8Array) { - return node_stream_1.Readable.from(Buffer.from(source)); - } - else if ((0, typeGuards_js_1.isBlob)(source)) { - return toStream((0, file_js_1.getRawContent)(source)); - } - else { - return ensureNodeStream(source); +function sanitizeURL(url) { + let safeURL = url; + if (getURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE)) { + safeURL = setURLParameter(safeURL, constants_js_1.URLConstants.Parameters.SIGNATURE, "*****"); } + return safeURL; } -/** - * Utility function that concatenates a set of binary inputs into one combined output. - * - * @param sources - array of sources for the concatenation - * @returns - in Node, a (() =\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs. - * In browser, returns a `Blob` representing all the concatenated inputs. - * - * @internal - */ -async function concat(sources) { - return function () { - const streams = sources.map((x) => (typeof x === "function" ? x() : x)).map(toStream); - return node_stream_1.Readable.from((function () { - return tslib_1.__asyncGenerator(this, arguments, function* () { - var _a, e_1, _b, _c; - for (const stream of streams) { - try { - for (var _d = true, stream_1 = (e_1 = void 0, tslib_1.__asyncValues(stream)), stream_1_1; stream_1_1 = yield tslib_1.__await(stream_1.next()), _a = stream_1_1.done, !_a; _d = true) { - _c = stream_1_1.value; - _d = false; - const chunk = _c; - yield yield tslib_1.__await(chunk); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = stream_1.return)) yield tslib_1.__await(_b.call(stream_1)); - } - finally { if (e_1) throw e_1.error; } - } - } - }); - })()); - }; +function sanitizeHeaders(originalHeader) { + const headers = (0, core_rest_pipeline_1.createHttpHeaders)(); + for (const [name, value] of originalHeader) { + if (name.toLowerCase() === constants_js_1.HeaderConstants.AUTHORIZATION.toLowerCase()) { + headers.set(name, "*****"); + } + else if (name.toLowerCase() === constants_js_1.HeaderConstants.X_MS_COPY_SOURCE) { + headers.set(name, sanitizeURL(value)); + } + else { + headers.set(name, value); + } + } + return headers; } -//# sourceMappingURL=concat.js.map - -/***/ }), - -/***/ 3224: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRawContent = getRawContent; -exports.createFileFromStream = createFileFromStream; -exports.createFile = createFile; -const core_util_1 = __nccwpck_require__(80637); -const typeGuards_js_1 = __nccwpck_require__(58520); -const unimplementedMethods = { - arrayBuffer: () => { - throw new Error("Not implemented"); - }, - bytes: () => { - throw new Error("Not implemented"); - }, - slice: () => { - throw new Error("Not implemented"); - }, - text: () => { - throw new Error("Not implemented"); - }, -}; /** - * Private symbol used as key on objects created using createFile containing the - * original source of the file object. - * - * This is used in Node to access the original Node stream without using Blob#stream, which - * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and - * Readable#to/fromWeb in Node versions we support: - * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14) - * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6) - * - * Once these versions are no longer supported, we may be able to stop doing this. + * If two strings are equal when compared case insensitive. * - * @internal + * @param str1 - + * @param str2 - */ -const rawContent = Symbol("rawContent"); -function hasRawContent(x) { - return typeof x[rawContent] === "function"; +function iEqual(str1, str2) { + return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } /** - * Extract the raw content from a given blob-like object. If the input was created using createFile - * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used. - * For true instances of Blob and File, returns the blob's content as a Web ReadableStream. - * - * @internal + * Extracts account name from the url + * @param url - url to extract the account name from + * @returns with the account name */ -function getRawContent(blob) { - if (hasRawContent(blob)) { - return blob[rawContent](); +function getAccountNameFromUrl(url) { + const parsedUrl = new URL(url); + let accountName; + try { + if (parsedUrl.hostname.split(".")[1] === "blob") { + // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`; + accountName = parsedUrl.hostname.split(".")[0]; + } + else if (isIpEndpointStyle(parsedUrl)) { + // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/ + // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/ + // .getPath() -> /devstoreaccount1/ + accountName = parsedUrl.pathname.split("/")[1]; + } + else { + // Custom domain case: "https://customdomain.com/containername/blob". + accountName = ""; + } + return accountName; } - else { - return blob.stream(); + catch (error) { + throw new Error("Unable to extract accountName with provided information."); } } +function isIpEndpointStyle(parsedUrl) { + const host = parsedUrl.host; + // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'. + // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part. + // Case 3: Ipv4, use broad regex which just check if host contains Ipv4. + // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html. + return (/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || + (Boolean(parsedUrl.port) && constants_js_1.PathStylePorts.includes(parsedUrl.port))); +} /** - * Create an object that implements the File interface. This object is intended to be - * passed into RequestBodyType.formData, and is not guaranteed to work as expected in - * other situations. - * - * Use this function to: - * - Create a File object for use in RequestBodyType.formData in environments where the - * global File object is unavailable. - * - Create a File-like object from a readable stream without reading the stream into memory. + * Attach a TokenCredential to an object. * - * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is - * passed in a request's form data map, the stream will not be read into memory - * and instead will be streamed when the request is made. In the event of a retry, the - * stream needs to be read again, so this callback SHOULD return a fresh stream if possible. - * @param name - the name of the file. - * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + * @param thing - + * @param credential - */ -function createFileFromStream(stream, name, options = {}) { - var _a, _b, _c, _d; - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => { - const s = stream(); - if ((0, typeGuards_js_1.isNodeReadableStream)(s)) { - throw new Error("Not supported: a Node stream was provided as input to createFileFromStream."); - } - return s; - }, [rawContent]: stream }); +function attachCredential(thing, credential) { + thing.credential = credential; + return thing; +} +function httpAuthorizationToString(httpAuthorization) { + return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined; } /** - * Create an object that implements the File interface. This object is intended to be - * passed into RequestBodyType.formData, and is not guaranteed to work as expected in - * other situations. - * - * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable. - * - * @param content - the content of the file as a Uint8Array in memory. - * @param name - the name of the file. - * @param options - optional metadata about the file, e.g. file name, file size, MIME type. + * Escape the blobName but keep path separator ('/'). */ -function createFile(content, name, options = {}) { - var _a, _b, _c; - if (core_util_1.isNodeLike) { - return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : "", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content }); +function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); } - else { - return new File([content], name, options); + return split.join("/"); +} +/** + * A typesafe helper for ensuring that a given response object has + * the original _response attached. + * @param response - A response object from calling a client operation + * @returns The same object, but with known _response property + */ +function assertResponse(response) { + if (`_response` in response) { + return response; } + throw new TypeError(`Unexpected response object ${response}`); } -//# sourceMappingURL=file.js.map +//# sourceMappingURL=utils.common.js.map /***/ }), -/***/ 21333: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 81577: +/***/ ((__unused_webpack_module, exports) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.delay = delay; -exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; -const abort_controller_1 = __nccwpck_require__(11514); -const StandardAbortMessage = "The operation was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. - * @param delayInMs - The number of milliseconds to be delayed. - * @param value - The value to be resolved with after a timeout of t milliseconds. - * @param options - The options for delay - currently abort options - * - abortSignal - The abortSignal associated with containing operation. - * - abortErrorMsg - The abort error message associated with containing operation. - * @returns Resolved promise - */ -function delay(delayInMs, value, options) { - return new Promise((resolve, reject) => { - let timer = undefined; - let onAborted = undefined; - const rejectOnAbort = () => { - return reject(new abort_controller_1.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (timer) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); - } - timer = setTimeout(() => { - removeListeners(); - resolve(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); - } - }); -} +exports.AbortError = void 0; /** - * @internal - * @returns the parsed value or undefined if the parsed value is invalid. + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. + * + * @example + * ```ts + * const controller = new AbortController(); + * controller.abort(); + * try { + * doAsyncWork(controller.signal) + * } catch (e) { + * if (e.name === 'AbortError') { + * // handle abort error here. + * } + * } + * ``` */ -function parseHeaderValueAsNumber(response, headerName) { - const value = response.headers.get(headerName); - if (!value) - return; - const valueAsNum = Number(value); - if (Number.isNaN(valueAsNum)) - return; - return valueAsNum; +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } } -//# sourceMappingURL=helpers.js.map +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map /***/ }), -/***/ 33106: +/***/ 31514: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; // Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +// Licensed under the MIT license. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.custom = void 0; -const node_util_1 = __nccwpck_require__(47261); -exports.custom = node_util_1.inspect.custom; -//# sourceMappingURL=inspect.js.map +exports.AbortError = void 0; +var AbortError_js_1 = __nccwpck_require__(81577); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 34472: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 92960: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Sanitizer = void 0; -const core_util_1 = __nccwpck_require__(80637); -const RedactedString = "REDACTED"; -// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts -const defaultAllowedHeaderNames = [ - "x-ms-client-request-id", - "x-ms-return-client-request-id", - "x-ms-useragent", - "x-ms-correlation-request-id", - "x-ms-request-id", - "client-request-id", - "ms-cv", - "return-client-request-id", - "traceparent", - "Access-Control-Allow-Credentials", - "Access-Control-Allow-Headers", - "Access-Control-Allow-Methods", - "Access-Control-Allow-Origin", - "Access-Control-Expose-Headers", - "Access-Control-Max-Age", - "Access-Control-Request-Headers", - "Access-Control-Request-Method", - "Origin", - "Accept", - "Accept-Encoding", - "Cache-Control", - "Connection", - "Content-Length", - "Content-Type", - "Date", - "ETag", - "Expires", - "If-Match", - "If-Modified-Since", - "If-None-Match", - "If-Unmodified-Since", - "Last-Modified", - "Pragma", - "Request-Id", - "Retry-After", - "Server", - "Transfer-Encoding", - "User-Agent", - "WWW-Authenticate", -]; -const defaultAllowedQueryParameters = ["api-version"]; -/** - * @internal - */ -class Sanitizer { - constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) { - allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames); - allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters); - this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase())); - this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); - } - sanitize(obj) { - const seen = new Set(); - return JSON.stringify(obj, (key, value) => { - // Ensure Errors include their interesting non-enumerable members - if (value instanceof Error) { - return Object.assign(Object.assign({}, value), { name: value.name, message: value.message }); - } - if (key === "headers") { - return this.sanitizeHeaders(value); - } - else if (key === "url") { - return this.sanitizeUrl(value); - } - else if (key === "query") { - return this.sanitizeQuery(value); - } - else if (key === "body") { - // Don't log the request body - return undefined; - } - else if (key === "response") { - // Don't log response again - return undefined; - } - else if (key === "operationSpec") { - // When using sendOperationRequest, the request carries a massive - // field with the autorest spec. No need to log it. - return undefined; - } - else if (Array.isArray(value) || (0, core_util_1.isObject)(value)) { - if (seen.has(value)) { - return "[Circular]"; - } - seen.add(value); - } - return value; - }, 2); - } - sanitizeUrl(value) { - if (typeof value !== "string" || value === null || value === "") { - return value; - } - const url = new URL(value); - if (!url.search) { - return value; - } - for (const [key] of url.searchParams) { - if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); - } - } - return url.toString(); - } - sanitizeHeaders(obj) { - const sanitized = {}; - for (const key of Object.keys(obj)) { - if (this.allowedHeaderNames.has(key.toLowerCase())) { - sanitized[key] = obj[key]; - } - else { - sanitized[key] = RedactedString; - } + +const WritableStream = (__nccwpck_require__(84492).Writable) +const inherits = (__nccwpck_require__(47261).inherits) + +const StreamSearch = __nccwpck_require__(51142) + +const PartStream = __nccwpck_require__(81620) +const HeaderParser = __nccwpck_require__(92032) + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.call(this, cfg) + + if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } + + if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } + + this._headerFirst = cfg.headerFirst + + this._dashes = 0 + this._parts = 0 + this._finished = false + this._realFinish = false + this._isPreamble = true + this._justMatched = false + this._firstWrite = true + this._inHeader = true + this._part = undefined + this._cb = undefined + this._ignoreData = false + this._partOpts = { highWaterMark: cfg.partHwm } + this._pause = false + + const self = this + this._hparser = new HeaderParser(cfg) + this._hparser.on('header', function (header) { + self._inHeader = false + self._part.emit('header', header) + }) +} +inherits(Dicer, WritableStream) + +Dicer.prototype.emit = function (ev) { + if (ev === 'finish' && !this._realFinish) { + if (!this._finished) { + const self = this + process.nextTick(function () { + self.emit('error', new Error('Unexpected end of multipart data')) + if (self._part && !self._ignoreData) { + const type = (self._isPreamble ? 'Preamble' : 'Part') + self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) + self._part.push(null) + process.nextTick(function () { + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + return } - return sanitized; + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) } - sanitizeQuery(value) { - if (typeof value !== "object" || value === null) { - return value; - } - const sanitized = {}; - for (const k of Object.keys(value)) { - if (this.allowedQueryParameters.has(k.toLowerCase())) { - sanitized[k] = value[k]; - } - else { - sanitized[k] = RedactedString; - } - } - return sanitized; + } else { WritableStream.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() } } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } } -exports.Sanitizer = Sanitizer; -//# sourceMappingURL=sanitizer.js.map -/***/ }), +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} -/***/ 50601: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +Dicer.prototype.setBoundary = function (boundary) { + const self = this + this._bparser = new StreamSearch('\r\n--' + boundary) + this._bparser.on('info', function (isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end) + }) +} -"use strict"; +Dicer.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.DEFAULT_CYCLER_OPTIONS = void 0; -exports.createTokenCycler = createTokenCycler; -const helpers_js_1 = __nccwpck_require__(21333); -// Default options for the cycler if none are provided -exports.DEFAULT_CYCLER_OPTIONS = { - forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires - retryIntervalInMs: 3000, // Allow refresh attempts every 3s - refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry -}; -/** - * Converts an an unreliable access token getter (which may resolve with null) - * into an AccessTokenGetter by retrying the unreliable getter in a regular - * interval. - * - * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null. - * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts. - * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception. - * @returns - A promise that, if it resolves, will resolve with an access token. - */ -async function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) { - // This wrapper handles exceptions gracefully as long as we haven't exceeded - // the timeout. - async function tryGetAccessToken() { - if (Date.now() < refreshTimeout) { - try { - return await getAccessToken(); - } - catch (_a) { - return null; - } - } - else { - const finalToken = await getAccessToken(); - // Timeout is up, so throw if it's still null - if (finalToken === null) { - throw new Error("Failed to refresh access token."); - } - return finalToken; - } +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } } - let token = await tryGetAccessToken(); - while (token === null) { - await (0, helpers_js_1.delay)(retryIntervalInMs); - token = await tryGetAccessToken(); + if (this._dashes === 2) { + if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + if (self._parts === 0) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } } - return token; -} -/** - * Creates a token cycler from a credential, scopes, and optional settings. - * - * A token cycler represents a way to reliably retrieve a valid access token - * from a TokenCredential. It will handle initializing the token, refreshing it - * when it nears expiration, and synchronizes refresh attempts to avoid - * concurrency hazards. - * - * @param credential - the underlying TokenCredential that provides the access - * token - * @param tokenCyclerOptions - optionally override default settings for the cycler - * - * @returns - a function that reliably produces a valid access token - */ -function createTokenCycler(credential, tokenCyclerOptions) { - let refreshWorker = null; - let token = null; - let tenantId; - const options = Object.assign(Object.assign({}, exports.DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions); - /** - * This little holder defines several predicates that we use to construct - * the rules of refreshing the token. - */ - const cycler = { - /** - * Produces true if a refresh job is currently in progress. - */ - get isRefreshing() { - return refreshWorker !== null; - }, - /** - * Produces true if the cycler SHOULD refresh (we are within the refresh - * window and not already refreshing) - */ - get shouldRefresh() { - var _a; - if (cycler.isRefreshing) { - return false; - } - if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) { - return true; + if (this._dashes) { return } + } + if (this._justMatched) { this._justMatched = false } + if (!this._part) { + this._part = new PartStream(this._partOpts) + this._part._read = function (n) { + self._unpause() + } + if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() } + if (!this._isPreamble) { this._inHeader = true } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { shouldWriteMore = this._part.push(buf) } + shouldWriteMore = this._part.push(data.slice(start, end)) + if (!shouldWriteMore) { this._pause = true } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { this._hparser.push(buf) } + r = this._hparser.push(data.slice(start, end)) + if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + } + } + if (isMatch) { + this._hparser.reset() + if (this._isPreamble) { this._isPreamble = false } else { + if (start !== end) { + ++this._parts + this._part.on('end', function () { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } else { + self._unpause() } - return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now(); - }, - /** - * Produces true if the cycler MUST refresh (null or nearly-expired - * token). - */ - get mustRefresh() { - return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now()); - }, - }; - /** - * Starts a refresh job or returns the existing job if one is already - * running. - */ - function refresh(scopes, getTokenOptions) { - var _a; - if (!cycler.isRefreshing) { - // We bind `scopes` here to avoid passing it around a lot - const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions); - // Take advantage of promise chaining to insert an assignment to `token` - // before the refresh can be considered done. - refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, - // If we don't have a token, then we should timeout immediately - (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now()) - .then((_token) => { - refreshWorker = null; - token = _token; - tenantId = getTokenOptions.tenantId; - return token; - }) - .catch((reason) => { - // We also should reset the refresher if we enter a failed state. All - // existing awaiters will throw, but subsequent requests will start a - // new retry chain. - refreshWorker = null; - token = null; - tenantId = undefined; - throw reason; - }); - } - return refreshWorker; + } + }) + } } - return async (scopes, tokenOptions) => { - // - // Simple rules: - // - If we MUST refresh, then return the refresh task, blocking - // the pipeline until a token is available. - // - If we SHOULD refresh, then run refresh but don't return it - // (we can still use the cached token). - // - Return the token, since it's fine if we didn't return in - // step 1. - // - const hasClaimChallenge = Boolean(tokenOptions.claims); - const tenantIdChanged = tenantId !== tokenOptions.tenantId; - if (hasClaimChallenge) { - // If we've received a claim, we know the existing token isn't valid - // We want to clear it so that that refresh worker won't use the old expiration time as a timeout - token = null; - } - // If the tenantId passed in token options is different to the one we have - // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to - // refresh the token with the new tenantId or token. - const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh; - if (mustRefresh) { - return refresh(scopes, tokenOptions); - } - if (cycler.shouldRefresh) { - refresh(scopes, tokenOptions); - } - return token; - }; + this._part.push(null) + this._part = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } } -//# sourceMappingURL=tokenCycler.js.map -/***/ }), +Dicer.prototype._unpause = function () { + if (!this._pause) { return } -/***/ 58520: -/***/ ((__unused_webpack_module, exports) => { + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} -"use strict"; +module.exports = Dicer -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isNodeReadableStream = isNodeReadableStream; -exports.isWebReadableStream = isWebReadableStream; -exports.isReadableStream = isReadableStream; -exports.isBlob = isBlob; -function isNodeReadableStream(x) { - return Boolean(x && typeof x["pipe"] === "function"); -} -function isWebReadableStream(x) { - return Boolean(x && - typeof x.getReader === "function" && - typeof x.tee === "function"); -} -function isReadableStream(x) { - return isNodeReadableStream(x) || isWebReadableStream(x); -} -function isBlob(x) { - return typeof x.stream === "function"; -} -//# sourceMappingURL=typeGuards.js.map /***/ }), -/***/ 96158: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 92032: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getUserAgentHeaderName = getUserAgentHeaderName; -exports.getUserAgentValue = getUserAgentValue; -const userAgentPlatform_js_1 = __nccwpck_require__(15316); -const constants_js_1 = __nccwpck_require__(43171); -function getUserAgentString(telemetryInfo) { - const parts = []; - for (const [key, value] of telemetryInfo) { - const token = value ? `${key}/${value}` : key; - parts.push(token); + +const EventEmitter = (__nccwpck_require__(15673).EventEmitter) +const inherits = (__nccwpck_require__(47261).inherits) +const getLimit = __nccwpck_require__(21467) + +const StreamSearch = __nccwpck_require__(51142) + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) } - return parts.join(" "); + if (isMatch) { self._finish() } + }) } -/** - * @internal - */ -function getUserAgentHeaderName() { - return (0, userAgentPlatform_js_1.getHeaderName)(); +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } } -/** - * @internal - */ -async function getUserAgentValue(prefix) { - const runtimeInfo = new Map(); - runtimeInfo.set("core-rest-pipeline", constants_js_1.SDK_VERSION); - await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); - const defaultAgent = getUserAgentString(runtimeInfo); - const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; - return userAgentValue; + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() } -//# sourceMappingURL=userAgent.js.map -/***/ }), +HeaderParser.prototype._finish = function () { + if (this.buffer) { this._parseHeader() } + this.ss.matches = this.ss.maxMatches + const header = this.header + this.header = {} + this.buffer = '' + this.finished = true + this.nread = this.npairs = 0 + this.maxed = false + this.emit('header', header) +} -/***/ 15316: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +HeaderParser.prototype._parseHeader = function () { + if (this.npairs === this.maxHeaderPairs) { return } -"use strict"; + const lines = this.buffer.split(RE_CRLF) + const len = lines.length + let m, h -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHeaderName = getHeaderName; -exports.setPlatformSpecificData = setPlatformSpecificData; -const tslib_1 = __nccwpck_require__(4351); -const os = tslib_1.__importStar(__nccwpck_require__(70612)); -const process = tslib_1.__importStar(__nccwpck_require__(97742)); -/** - * @internal - */ -function getHeaderName() { - return "User-Agent"; -} -/** - * @internal - */ -async function setPlatformSpecificData(map) { - if (process && process.versions) { - const versions = process.versions; - if (versions.bun) { - map.set("Bun", versions.bun); - } - else if (versions.deno) { - map.set("Deno", versions.deno); - } - else if (versions.node) { - map.set("Node", versions.node); - } + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } + } + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return } - map.set("OS", `(${os.arch()}-${os.type()}-${os.release()})`); + m = RE_HDR.exec(lines[i]) + h = m[1].toLowerCase() + this.header[h] = this.header[h] || [] + this.header[h].push((m[2] || '')) + if (++this.npairs === this.maxHeaderPairs) { break } + } } -//# sourceMappingURL=userAgentPlatform.js.map - -/***/ }), - -/***/ 59390: -/***/ ((__unused_webpack_module, exports) => { -"use strict"; +module.exports = HeaderParser -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -class AbortError extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } -} -exports.AbortError = AbortError; -//# sourceMappingURL=AbortError.js.map /***/ }), -/***/ 11514: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 81620: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -var AbortError_js_1 = __nccwpck_require__(59390); -Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); -//# sourceMappingURL=index.js.map -/***/ }), +const inherits = (__nccwpck_require__(47261).inherits) +const ReadableStream = (__nccwpck_require__(84492).Readable) -/***/ 19363: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) -"use strict"; +PartStream.prototype._read = function (n) {} + +module.exports = PartStream -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createTracingClient = exports.useInstrumenter = void 0; -var instrumenter_js_1 = __nccwpck_require__(63418); -Object.defineProperty(exports, "useInstrumenter", ({ enumerable: true, get: function () { return instrumenter_js_1.useInstrumenter; } })); -var tracingClient_js_1 = __nccwpck_require__(69254); -Object.defineProperty(exports, "createTracingClient", ({ enumerable: true, get: function () { return tracingClient_js_1.createTracingClient; } })); -//# sourceMappingURL=index.js.map /***/ }), -/***/ 63418: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 51142: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createDefaultTracingSpan = createDefaultTracingSpan; -exports.createDefaultInstrumenter = createDefaultInstrumenter; -exports.useInstrumenter = useInstrumenter; -exports.getInstrumenter = getInstrumenter; -const tracingContext_js_1 = __nccwpck_require__(18110); -const state_js_1 = __nccwpck_require__(81241); -function createDefaultTracingSpan() { - return { - end: () => { - // noop - }, - isRecording: () => false, - recordException: () => { - // noop - }, - setAttribute: () => { - // noop - }, - setStatus: () => { - // noop - }, - addEvent: () => { - // noop - }, - }; -} -function createDefaultInstrumenter() { - return { - createRequestHeaders: () => { - return {}; - }, - parseTraceparentHeader: () => { - return undefined; - }, - startSpan: (_name, spanOptions) => { - return { - span: createDefaultTracingSpan(), - tracingContext: (0, tracingContext_js_1.createTracingContext)({ parentContext: spanOptions.tracingContext }), - }; - }, - withContext(_context, callback, ...callbackArgs) { - return callback(...callbackArgs); - }, - }; -} + /** - * Extends the Azure SDK with support for a given instrumenter implementation. + * Copyright Brian White. All rights reserved. * - * @param instrumenter - The instrumenter implementation to use. - */ -function useInstrumenter(instrumenter) { - state_js_1.state.instrumenterImplementation = instrumenter; -} -/** - * Gets the currently set instrumenter, a No-Op instrumenter by default. + * @see https://github.com/mscdex/streamsearch * - * @returns The currently set instrumenter + * 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. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool */ -function getInstrumenter() { - if (!state_js_1.state.instrumenterImplementation) { - state_js_1.state.instrumenterImplementation = createDefaultInstrumenter(); - } - return state_js_1.state.instrumenterImplementation; -} -//# sourceMappingURL=instrumenter.js.map +const EventEmitter = (__nccwpck_require__(15673).EventEmitter) +const inherits = (__nccwpck_require__(47261).inherits) -/***/ }), +function SBMH (needle) { + if (typeof needle === 'string') { + needle = Buffer.from(needle) + } -/***/ 81241: -/***/ ((__unused_webpack_module, exports) => { + if (!Buffer.isBuffer(needle)) { + throw new TypeError('The needle has to be a String or a Buffer.') + } -"use strict"; + const needleLength = needle.length -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.state = void 0; -/** - * @internal - * - * Holds the singleton instrumenter, to be shared across CJS and ESM imports. - */ -exports.state = { - instrumenterImplementation: undefined, -}; -//# sourceMappingURL=state-cjs.cjs.map + if (needleLength === 0) { + throw new Error('The needle cannot be an empty String/Buffer.') + } -/***/ }), + if (needleLength > 256) { + throw new Error('The needle cannot have a length bigger than 256.') + } -/***/ 69254: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + this.maxMatches = Infinity + this.matches = 0 -"use strict"; + this._occ = new Array(256) + .fill(needleLength) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createTracingClient = createTracingClient; -const instrumenter_js_1 = __nccwpck_require__(63418); -const tracingContext_js_1 = __nccwpck_require__(18110); -/** - * Creates a new tracing client. - * - * @param options - Options used to configure the tracing client. - * @returns - An instance of {@link TracingClient}. - */ -function createTracingClient(options) { - const { namespace, packageName, packageVersion } = options; - function startSpan(name, operationOptions, spanOptions) { - var _a; - const startSpanResult = (0, instrumenter_js_1.getInstrumenter)().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext })); - let tracingContext = startSpanResult.tracingContext; - const span = startSpanResult.span; - if (!tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)) { - tracingContext = tracingContext.setValue(tracingContext_js_1.knownContextKeys.namespace, namespace); - } - span.setAttribute("az.namespace", tracingContext.getValue(tracingContext_js_1.knownContextKeys.namespace)); - const updatedOptions = Object.assign({}, operationOptions, { - tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }), - }); - return { - span, - updatedOptions, - }; - } - async function withSpan(name, operationOptions, callback, spanOptions) { - const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions); - try { - const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span))); - span.setStatus({ status: "success" }); - return result; - } - catch (err) { - span.setStatus({ status: "error", error: err }); - throw err; - } - finally { - span.end(); - } - } - function withContext(context, callback, ...callbackArgs) { - return (0, instrumenter_js_1.getInstrumenter)().withContext(context, callback, ...callbackArgs); - } - /** - * Parses a traceparent header value into a span identifier. - * - * @param traceparentHeader - The traceparent header to parse. - * @returns An implementation-specific identifier for the span. - */ - function parseTraceparentHeader(traceparentHeader) { - return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader); - } - /** - * Creates a set of request headers to propagate tracing information to a backend. - * - * @param tracingContext - The context containing the span to serialize. - * @returns The set of headers to add to a request. - */ - function createRequestHeaders(tracingContext) { - return (0, instrumenter_js_1.getInstrumenter)().createRequestHeaders(tracingContext); - } - return { - startSpan, - withSpan, - withContext, - parseTraceparentHeader, - createRequestHeaders, - }; + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } } -//# sourceMappingURL=tracingClient.js.map +inherits(SBMH, EventEmitter) -/***/ }), +SBMH.prototype.reset = function () { + this._lookbehind_size = 0 + this.matches = 0 + this._bufpos = 0 +} -/***/ 18110: -/***/ ((__unused_webpack_module, exports) => { +SBMH.prototype.push = function (chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, 'binary') + } + const chlen = chunk.length + this._bufpos = pos || 0 + let r + while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } + return r +} -"use strict"; +SBMH.prototype._sbmh_feed = function (data) { + const len = data.length + const needle = this._needle + const needleLength = needle.length + const lastNeedleChar = needle[needleLength - 1] -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TracingContextImpl = exports.knownContextKeys = void 0; -exports.createTracingContext = createTracingContext; -/** @internal */ -exports.knownContextKeys = { - span: Symbol.for("@azure/core-tracing span"), - namespace: Symbol.for("@azure/core-tracing namespace"), -}; -/** - * Creates a new {@link TracingContext} with the given options. - * @param options - A set of known keys that may be set on the context. - * @returns A new {@link TracingContext} with the given options. - * - * @internal - */ -function createTracingContext(options = {}) { - let context = new TracingContextImpl(options.parentContext); - if (options.span) { - context = context.setValue(exports.knownContextKeys.span, options.span); - } - if (options.namespace) { - context = context.setValue(exports.knownContextKeys.namespace, options.namespace); - } - return context; -} -/** @internal */ -class TracingContextImpl { - constructor(initialContext) { - this._contextMap = - initialContext instanceof TracingContextImpl - ? new Map(initialContext._contextMap) - : new Map(); - } - setValue(key, value) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.set(key, value); - return newContext; - } - getValue(key) { - return this._contextMap.get(key); + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch + + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1) + + if ( + ch === lastNeedleChar && + this._sbmh_memcmp(data, pos, needleLength - 1) + ) { + this._lookbehind_size = 0 + ++this.matches + this.emit('info', true) + + return (this._bufpos = pos + needleLength) + } + pos += this._occ[ch] } - deleteValue(key) { - const newContext = new TracingContextImpl(this); - newContext._contextMap.delete(key); - return newContext; + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } } -} -exports.TracingContextImpl = TracingContextImpl; -//# sourceMappingURL=tracingContext.js.map -/***/ }), + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + this.emit('info', false, this._lookbehind, 0, bytesToCutOff) + } -/***/ 87205: -/***/ ((__unused_webpack_module, exports) => { + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, + this._lookbehind_size - bytesToCutOff) + this._lookbehind_size -= bytesToCutOff -"use strict"; + data.copy(this._lookbehind, this._lookbehind_size) + this._lookbehind_size += len -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.cancelablePromiseRace = cancelablePromiseRace; -/** - * promise.race() wrapper that aborts rest of promises as soon as the first promise settles. - */ -async function cancelablePromiseRace(abortablePromiseBuilders, options) { - var _a, _b; - const aborter = new AbortController(); - function abortHandler() { - aborter.abort(); - } - (_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.addEventListener("abort", abortHandler); - try { - return await Promise.race(abortablePromiseBuilders.map((p) => p({ abortSignal: aborter.signal }))); - } - finally { - aborter.abort(); - (_b = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _b === void 0 ? void 0 : _b.removeEventListener("abort", abortHandler); + this._bufpos = len + return len } -} -//# sourceMappingURL=aborterUtils.js.map + } -/***/ }), + pos += (pos >= 0) * this._bufpos -/***/ 9972: -/***/ ((__unused_webpack_module, exports) => { + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos) + ++this.matches + if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } -"use strict"; + return (this._bufpos = pos + needleLength) + } else { + pos = len - needleLength + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uint8ArrayToString = uint8ArrayToString; -exports.stringToUint8Array = stringToUint8Array; -/** - * The helper that transforms bytes with specific character encoding into string - * @param bytes - the uint8array bytes - * @param format - the format we use to encode the byte - * @returns a string of the encoded string - */ -function uint8ArrayToString(bytes, format) { - return Buffer.from(bytes).toString(format); + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + while ( + pos < len && + ( + data[pos] !== needle[0] || + ( + (Buffer.compare( + data.subarray(pos, pos + len - pos), + needle.subarray(0, len - pos) + ) !== 0) + ) + ) + ) { + ++pos + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)) + this._lookbehind_size = len - pos + } + + // Everything until pos is guaranteed not to contain needle data. + if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } + + this._bufpos = len + return len } -/** - * The helper that transforms string to specific character encoded bytes array. - * @param value - the string to be converted - * @param format - the format we use to decode the value - * @returns a uint8array - */ -function stringToUint8Array(value, format) { - return Buffer.from(value, format); + +SBMH.prototype._sbmh_lookup_char = function (data, pos) { + return (pos < 0) + ? this._lookbehind[this._lookbehind_size + pos] + : data[pos] } -//# sourceMappingURL=bytesEncoding.js.map + +SBMH.prototype._sbmh_memcmp = function (data, pos, len) { + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH + /***/ }), -/***/ 97980: -/***/ ((__unused_webpack_module, exports) => { +/***/ 50727: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var _a, _b, _c, _d; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isReactNative = exports.isNodeRuntime = exports.isNode = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; -/** - * A constant that indicates whether the environment the code is running is a Web Browser. - */ -// eslint-disable-next-line @azure/azure-sdk/ts-no-window -exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Web Worker. - */ -exports.isWebWorker = typeof self === "object" && - typeof (self === null || self === void 0 ? void 0 : self.importScripts) === "function" && - (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === "DedicatedWorkerGlobalScope" || - ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === "ServiceWorkerGlobalScope" || - ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === "SharedWorkerGlobalScope"); -/** - * A constant that indicates whether the environment the code is running is Deno. - */ -exports.isDeno = typeof Deno !== "undefined" && - typeof Deno.version !== "undefined" && - typeof Deno.version.deno !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is Bun.sh. - */ -exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; -/** - * A constant that indicates whether the environment the code is running is a Node.js compatible environment. - */ -exports.isNodeLike = typeof globalThis.process !== "undefined" && - Boolean(globalThis.process.version) && - Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node); -/** - * A constant that indicates whether the environment the code is running is a Node.js compatible environment. - * @deprecated Use `isNodeLike` instead. - */ -exports.isNode = exports.isNodeLike; -/** - * A constant that indicates whether the environment the code is running is Node.JS. - */ -exports.isNodeRuntime = exports.isNodeLike && !exports.isBun && !exports.isDeno; -/** - * A constant that indicates whether the environment the code is running is in React-Native. - */ -// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js -exports.isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative"; -//# sourceMappingURL=checkEnvironment.js.map -/***/ }), +const WritableStream = (__nccwpck_require__(84492).Writable) +const { inherits } = __nccwpck_require__(47261) +const Dicer = __nccwpck_require__(92960) -/***/ 12376: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const MultipartParser = __nccwpck_require__(32183) +const UrlencodedParser = __nccwpck_require__(78306) +const parseParams = __nccwpck_require__(31854) -"use strict"; +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(opts) } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createAbortablePromise = createAbortablePromise; -const abort_controller_1 = __nccwpck_require__(54812); -/** - * Creates an abortable promise. - * @param buildPromise - A function that takes the resolve and reject functions as parameters. - * @param options - The options for the abortable promise. - * @returns A promise that can be aborted. - */ -function createAbortablePromise(buildPromise, options) { - const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve, reject) => { - function rejectOnAbort() { - reject(new abort_controller_1.AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : "The operation was aborted.")); - } - function removeListeners() { - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener("abort", onAbort); - } - function onAbort() { - cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort(); - removeListeners(); - rejectOnAbort(); - } - if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { - return rejectOnAbort(); - } - try { - buildPromise((x) => { - removeListeners(); - resolve(x); - }, (x) => { - removeListeners(); - reject(x); - }); - } - catch (err) { - reject(err); - } - abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener("abort", onAbort); - }); + if (typeof opts !== 'object') { + throw new TypeError('Busboy expected an options-Object.') + } + if (typeof opts.headers !== 'object') { + throw new TypeError('Busboy expected an options-Object with headers-attribute.') + } + if (typeof opts.headers['content-type'] !== 'string') { + throw new TypeError('Missing Content-Type-header.') + } + + const { + headers, + ...streamOptions + } = opts + + this.opts = { + autoDestroy: false, + ...streamOptions + } + WritableStream.call(this, this.opts) + + this._done = false + this._parser = this.getParserByHeaders(headers) + this._finished = false } -//# sourceMappingURL=createAbortablePromise.js.map +inherits(Busboy, WritableStream) -/***/ }), +Busboy.prototype.emit = function (ev) { + if (ev === 'finish') { + if (!this._done) { + this._parser?.end() + return + } else if (this._finished) { + return + } + this._finished = true + } + WritableStream.prototype.emit.apply(this, arguments) +} -/***/ 19259: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +Busboy.prototype.getParserByHeaders = function (headers) { + const parsed = parseParams(headers['content-type']) -"use strict"; + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.delay = delay; -exports.calculateRetryDelay = calculateRetryDelay; -const createAbortablePromise_js_1 = __nccwpck_require__(12376); -const random_js_1 = __nccwpck_require__(93710); -const StandardAbortMessage = "The delay was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds. - * @param timeInMs - The number of milliseconds to be delayed. - * @param options - The options for delay - currently abort options - * @returns Promise that is resolved after timeInMs - */ -function delay(timeInMs, options) { - let token; - const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve) => { - token = setTimeout(resolve, timeInMs); - }, { - cleanupBeforeAbort: () => clearTimeout(token), - abortSignal, - abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage, - }); + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg) + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg) + } + throw new Error('Unsupported Content-Type.') } -/** - * Calculates the delay interval for retry attempts using exponential delay with jitter. - * @param retryAttempt - The current retry attempt number. - * @param config - The exponential retry configuration. - * @returns An object containing the calculated retry delay. - */ -function calculateRetryDelay(retryAttempt, config) { - // Exponentially increase the delay each time - const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); - // Don't let the delay exceed the maximum - const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); - // Allow the final value to have some "jitter" (within 50% of the delay size) so - // that retries across multiple clients don't occur simultaneously. - const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); - return { retryAfterInMs }; + +Busboy.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) } -//# sourceMappingURL=delay.js.map + +module.exports = Busboy +module.exports["default"] = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer + /***/ }), -/***/ 46734: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 32183: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isError = isError; -exports.getErrorMessage = getErrorMessage; -const object_js_1 = __nccwpck_require__(56538); -/** - * Typeguard for an error object shape (has name and message) - * @param e - Something caught by a catch clause. - */ -function isError(e) { - if ((0, object_js_1.isObject)(e)) { - const hasName = typeof e.name === "string"; - const hasMessage = typeof e.message === "string"; - return hasName && hasMessage; + +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams + +const { Readable } = __nccwpck_require__(84492) +const { inherits } = __nccwpck_require__(47261) + +const Dicer = __nccwpck_require__(92960) + +const parseParams = __nccwpck_require__(31854) +const decodeText = __nccwpck_require__(84619) +const basename = __nccwpck_require__(48647) +const getLimit = __nccwpck_require__(21467) + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break } - return false; -} -/** - * Given what is thought to be an error object, return the message if possible. - * If the message is missing, returns a stringified version of the input. - * @param e - Something thrown from a try block - * @returns The error message or a string of the input - */ -function getErrorMessage(e) { - if (isError(e)) { - return e.message; + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() } - else { - let stringified; - try { - if (typeof e === "object" && e) { - stringified = JSON.stringify(e); - } - else { - stringified = String(e); + } + + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } + + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) + + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false + + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy + + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } + + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + cb() + } + }).on('part', function onPart (part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener('part', onPart) + self.parser.on('part', skipPart) + boy.hitPartsLimit = true + boy.emit('partsLimit') + return skipPart(part) + } + + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next part + if (curField) { + const field = curField + field.emit('end') + field.removeAllListeners('end') + } + + part.on('header', function (header) { + let contype + let fieldname + let parsed + let charset + let encoding + let filename + let nsize = 0 + + if (header['content-type']) { + parsed = parseParams(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break } + } } - catch (err) { - stringified = "[unable to stringify input]"; + } + + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } + + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1] + if (!preservePath) { filename = basename(filename) } + } } - return `Unknown error ${stringified}`; - } -} -//# sourceMappingURL=error.js.map + } else { return skipPart(part) } -/***/ }), + if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } -/***/ 80637: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + let onData, + onEnd -"use strict"; + if (isPartAFile(fieldname, contype, filename)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stringToUint8Array = exports.uint8ArrayToString = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isNode = exports.isBun = exports.isBrowser = exports.randomUUID = exports.objectHasProperty = exports.isObjectWithProperties = exports.isDefined = exports.computeSha256Hmac = exports.computeSha256Hash = exports.getErrorMessage = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.createAbortablePromise = exports.cancelablePromiseRace = exports.calculateRetryDelay = exports.delay = void 0; -var delay_js_1 = __nccwpck_require__(19259); -Object.defineProperty(exports, "delay", ({ enumerable: true, get: function () { return delay_js_1.delay; } })); -Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); -var aborterUtils_js_1 = __nccwpck_require__(87205); -Object.defineProperty(exports, "cancelablePromiseRace", ({ enumerable: true, get: function () { return aborterUtils_js_1.cancelablePromiseRace; } })); -var createAbortablePromise_js_1 = __nccwpck_require__(12376); -Object.defineProperty(exports, "createAbortablePromise", ({ enumerable: true, get: function () { return createAbortablePromise_js_1.createAbortablePromise; } })); -var random_js_1 = __nccwpck_require__(93710); -Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); -var object_js_1 = __nccwpck_require__(56538); -Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); -var error_js_1 = __nccwpck_require__(46734); -Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); -Object.defineProperty(exports, "getErrorMessage", ({ enumerable: true, get: function () { return error_js_1.getErrorMessage; } })); -var sha256_js_1 = __nccwpck_require__(94793); -Object.defineProperty(exports, "computeSha256Hash", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hash; } })); -Object.defineProperty(exports, "computeSha256Hmac", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hmac; } })); -var typeGuards_js_1 = __nccwpck_require__(1187); -Object.defineProperty(exports, "isDefined", ({ enumerable: true, get: function () { return typeGuards_js_1.isDefined; } })); -Object.defineProperty(exports, "isObjectWithProperties", ({ enumerable: true, get: function () { return typeGuards_js_1.isObjectWithProperties; } })); -Object.defineProperty(exports, "objectHasProperty", ({ enumerable: true, get: function () { return typeGuards_js_1.objectHasProperty; } })); -var uuidUtils_js_1 = __nccwpck_require__(17658); -Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); -var checkEnvironment_js_1 = __nccwpck_require__(97980); -Object.defineProperty(exports, "isBrowser", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBrowser; } })); -Object.defineProperty(exports, "isBun", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBun; } })); -Object.defineProperty(exports, "isNode", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNode; } })); -Object.defineProperty(exports, "isNodeLike", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeLike; } })); -Object.defineProperty(exports, "isNodeRuntime", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeRuntime; } })); -Object.defineProperty(exports, "isDeno", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isDeno; } })); -Object.defineProperty(exports, "isReactNative", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isReactNative; } })); -Object.defineProperty(exports, "isWebWorker", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isWebWorker; } })); -var bytesEncoding_js_1 = __nccwpck_require__(9972); -Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); -Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); -//# sourceMappingURL=index.js.map + ++nfiles + + if (!boy._events.file) { + self.parser._ignore() + return + } + + ++nends + const file = new FileStream(fileOpts) + curFile = file + file.on('end', function () { + --nends + self._pause = false + checkFinished() + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + } + boy.emit('file', fieldname, file, filename, encoding, contype) + + onData = function (data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length + if (extralen > 0) { file.push(data.slice(0, extralen)) } + file.truncated = true + file.bytesRead = fileSizeLimit + part.removeAllListeners('data') + file.emit('limit') + return + } else if (!file.push(data)) { self._pause = true } + + file.bytesRead = nsize + } + + onEnd = function () { + curFile = undefined + file.push(null) + } + } else { + // non-file field + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true + boy.emit('fieldsLimit') + } + return skipPart(part) + } -/***/ }), + ++nfields + ++nends + let buffer = '' + let truncated = false + curField = part -/***/ 56538: -/***/ ((__unused_webpack_module, exports) => { + onData = function (data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = (fieldSizeLimit - (nsize - data.length)) + buffer += data.toString('binary', 0, extralen) + truncated = true + part.removeAllListeners('data') + } else { buffer += data.toString('binary') } + } -"use strict"; + onEnd = function () { + curField = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isObject = isObject; -/** - * Helper to determine when an input is a generic JS object. - * @returns true when input is an object type that is not null, Array, RegExp, or Date. - */ -function isObject(input) { - return (typeof input === "object" && - input !== null && - !Array.isArray(input) && - !(input instanceof RegExp) && - !(input instanceof Date)); -} -//# sourceMappingURL=object.js.map + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + part._readableState.sync = false -/***/ }), + part.on('data', onData) + part.on('end', onEnd) + }).on('error', function (err) { + if (curFile) { curFile.emit('error', err) } + }) + }).on('error', function (err) { + boy.emit('error', err) + }).on('finish', function () { + finished = true + checkFinished() + }) +} -/***/ 93710: -/***/ ((__unused_webpack_module, exports) => { +Multipart.prototype.write = function (chunk, cb) { + const r = this.parser.write(chunk) + if (r && !this._pause) { + cb() + } else { + this._needDrain = !r + this._cb = cb + } +} -"use strict"; +Multipart.prototype.end = function () { + const self = this -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRandomIntegerInclusive = getRandomIntegerInclusive; -/** - * Returns a random integer value between a lower and upper bound, - * inclusive of both bounds. - * Note that this uses Math.random and isn't secure. If you need to use - * this for any kind of security purpose, find a better source of random. - * @param min - The smallest integer value allowed. - * @param max - The largest integer value allowed. - */ -function getRandomIntegerInclusive(min, max) { - // Make sure inputs are integers. - min = Math.ceil(min); - max = Math.floor(max); - // Pick a random offset from zero to the size of the range. - // Since Math.random() can never return 1, we have to make the range one larger - // in order to be inclusive of the maximum value after we take the floor. - const offset = Math.floor(Math.random() * (max - min + 1)); - return offset + min; + if (self.parser.writable) { + self.parser.end() + } else if (!self._boy._done) { + process.nextTick(function () { + self._boy._done = true + self._boy.emit('finish') + }) + } } -//# sourceMappingURL=random.js.map -/***/ }), +function skipPart (part) { + part.resume() +} -/***/ 94793: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function FileStream (opts) { + Readable.call(this, opts) -"use strict"; + this.bytesRead = 0 -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.computeSha256Hmac = computeSha256Hmac; -exports.computeSha256Hash = computeSha256Hash; -const crypto_1 = __nccwpck_require__(6113); -/** - * Generates a SHA-256 HMAC signature. - * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. - * @param stringToSign - The data to be signed. - * @param encoding - The textual encoding to use for the returned HMAC digest. - */ -async function computeSha256Hmac(key, stringToSign, encoding) { - const decodedKey = Buffer.from(key, "base64"); - return (0, crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); -} -/** - * Generates a SHA-256 hash. - * @param content - The data to be included in the hash. - * @param encoding - The textual encoding to use for the returned hash. - */ -async function computeSha256Hash(content, encoding) { - return (0, crypto_1.createHash)("sha256").update(content).digest(encoding); + this.truncated = false } -//# sourceMappingURL=sha256.js.map -/***/ }), +inherits(FileStream, Readable) -/***/ 1187: -/***/ ((__unused_webpack_module, exports) => { +FileStream.prototype._read = function (n) {} -"use strict"; +module.exports = Multipart -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isDefined = isDefined; -exports.isObjectWithProperties = isObjectWithProperties; -exports.objectHasProperty = objectHasProperty; -/** - * Helper TypeGuard that checks if something is defined or not. - * @param thing - Anything - */ -function isDefined(thing) { - return typeof thing !== "undefined" && thing !== null; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified properties. - * @param thing - Anything. - * @param properties - The name of the properties that should appear in the object. - */ -function isObjectWithProperties(thing, properties) { - if (!isDefined(thing) || typeof thing !== "object") { - return false; - } - for (const property of properties) { - if (!objectHasProperty(thing, property)) { - return false; - } - } - return true; -} -/** - * Helper TypeGuard that checks if the input is an object with the specified property. - * @param thing - Any object. - * @param property - The name of the property that should appear in the object. - */ -function objectHasProperty(thing, property) { - return (isDefined(thing) && typeof thing === "object" && property in thing); -} -//# sourceMappingURL=typeGuards.js.map /***/ }), -/***/ 17658: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 78306: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.randomUUID = randomUUID; -const crypto_1 = __nccwpck_require__(6113); -// NOTE: This is a workaround until we can use `globalThis.crypto.randomUUID` in Node.js 19+. -const uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === "function" - ? globalThis.crypto.randomUUID.bind(globalThis.crypto) - : crypto_1.randomUUID; -/** - * Generated Universally Unique Identifier - * - * @returns RFC4122 v4 UUID. - */ -function randomUUID() { - return uuidFunction(); -} -//# sourceMappingURL=uuidUtils.js.map - -/***/ }), -/***/ 42118: -/***/ ((__unused_webpack_module, exports) => { +const Decoder = __nccwpck_require__(27100) +const decodeText = __nccwpck_require__(84619) +const getLimit = __nccwpck_require__(21467) -"use strict"; +const RE_CHARSET = /^charset$/i -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -class AbortError extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; - } -} -exports.AbortError = AbortError; -//# sourceMappingURL=AbortError.js.map +UrlEncoded.detect = /^application\/x-www-form-urlencoded/i +function UrlEncoded (boy, cfg) { + const limits = cfg.limits + const parsedConType = cfg.parsedConType + this.boy = boy -/***/ }), + this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) + this.fieldsLimit = getLimit(limits, 'fields', Infinity) -/***/ 54812: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + let charset + for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } -"use strict"; + if (charset === undefined) { charset = cfg.defCharset || 'utf8' } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -var AbortError_js_1 = __nccwpck_require__(42118); -Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); -//# sourceMappingURL=index.js.map + this.decoder = new Decoder() + this.charset = charset + this._fields = 0 + this._state = 'key' + this._checkingBytes = true + this._bytesKey = 0 + this._bytesVal = 0 + this._key = '' + this._val = '' + this._keyTrunc = false + this._valTrunc = false + this._hitLimit = false +} -/***/ }), +UrlEncoded.prototype.write = function (data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true + this.boy.emit('fieldsLimit') + } + return cb() + } -/***/ 17309: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + let idxeq; let idxamp; let i; let p = 0; const len = data.length -"use strict"; + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.XML_CHARKEY = exports.XML_ATTRKEY = exports.parseXML = exports.stringifyXML = void 0; -var xml_js_1 = __nccwpck_require__(39170); -Object.defineProperty(exports, "stringifyXML", ({ enumerable: true, get: function () { return xml_js_1.stringifyXML; } })); -Object.defineProperty(exports, "parseXML", ({ enumerable: true, get: function () { return xml_js_1.parseXML; } })); -var xml_common_js_1 = __nccwpck_require__(62060); -Object.defineProperty(exports, "XML_ATTRKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_ATTRKEY; } })); -Object.defineProperty(exports, "XML_CHARKEY", ({ enumerable: true, get: function () { return xml_common_js_1.XML_CHARKEY; } })); -//# sourceMappingURL=index.js.map + if (idxeq !== undefined) { + // key with assignment + if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } + this._state = 'val' -/***/ }), + this._hitLimit = false + this._checkingBytes = true + this._val = '' + this._bytesVal = 0 + this._valTrunc = false + this.decoder.reset() -/***/ 62060: -/***/ ((__unused_webpack_module, exports) => { + p = idxeq + 1 + } else if (idxamp !== undefined) { + // key with no assignment + ++this._fields + let key; const keyTrunc = this._keyTrunc + if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } -"use strict"; + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.XML_CHARKEY = exports.XML_ATTRKEY = void 0; -/** - * Default key used to access the XML attributes. - */ -exports.XML_ATTRKEY = "$"; -/** - * Default key used to access the XML value content. - */ -exports.XML_CHARKEY = "_"; -//# sourceMappingURL=xml.common.js.map + if (key.length) { + this.boy.emit('field', decodeText(key, 'binary', this.charset), + '', + keyTrunc, + false) + } -/***/ }), + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true + } + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } -/***/ 39170: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (idxamp !== undefined) { + ++this._fields + if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + this._state = 'key' -"use strict"; + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.stringifyXML = stringifyXML; -exports.parseXML = parseXML; -const fast_xml_parser_1 = __nccwpck_require__(95430); -const xml_common_js_1 = __nccwpck_require__(62060); -function getCommonOptions(options) { - var _a; - return { - attributesGroupName: xml_common_js_1.XML_ATTRKEY, - textNodeName: (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : xml_common_js_1.XML_CHARKEY, - ignoreAttributes: false, - suppressBooleanAttributes: false, - }; -} -function getSerializerOptions(options = {}) { - var _a, _b; - return Object.assign(Object.assign({}, getCommonOptions(options)), { attributeNamePrefix: "@_", format: true, suppressEmptyNode: true, indentBy: "", rootNodeName: (_a = options.rootName) !== null && _a !== void 0 ? _a : "root", cdataPropName: (_b = options.cdataPropName) !== null && _b !== void 0 ? _b : "__cdata" }); -} -function getParserOptions(options = {}) { - return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true, trimValues: false }); -} -/** - * Converts given JSON object to XML string - * @param obj - JSON object to be converted into XML string - * @param opts - Options that govern the XML building of given JSON object - * `rootName` indicates the name of the root element in the resulting XML - */ -function stringifyXML(obj, opts = {}) { - const parserOptions = getSerializerOptions(opts); - const j2x = new fast_xml_parser_1.XMLBuilder(parserOptions); - const node = { [parserOptions.rootNodeName]: obj }; - const xmlData = j2x.build(node); - return `${xmlData}`.replace(/\n/g, ""); -} -/** - * Converts given XML string into JSON - * @param str - String containing the XML content to be parsed into JSON - * @param opts - Options that govern the parsing of given xml string - * `includeRoot` indicates whether the root element is to be included or not in the output - */ -async function parseXML(str, opts = {}) { - if (!str) { - throw new Error("Document is empty"); - } - const validation = fast_xml_parser_1.XMLValidator.validate(str); - if (validation !== true) { - throw validation; - } - const parser = new fast_xml_parser_1.XMLParser(getParserOptions(opts)); - const parsedXml = parser.parse(str); - // Remove the node. - // This is a change in behavior on fxp v4. Issue #424 - if (parsedXml["?xml"]) { - delete parsedXml["?xml"]; - } - if (!opts.includeRoot) { - for (const key of Object.keys(parsedXml)) { - const value = parsedXml[key]; - return typeof value === "object" ? Object.assign({}, value) : value; + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._valTrunc = true } + } else { + if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } + p = len + } } - return parsedXml; + } + cb() } -//# sourceMappingURL=xml.js.map -/***/ }), +UrlEncoded.prototype.end = function () { + if (this.boy._done) { return } -/***/ 80162: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (this._state === 'key' && this._key.length > 0) { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + '', + this._keyTrunc, + false) + } else if (this._state === 'val') { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + } + this.boy._done = true + this.boy.emit('finish') +} -"use strict"; +module.exports = UrlEncoded -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -const log_js_1 = __nccwpck_require__(18898); -const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; -let enabledString; -let enabledNamespaces = []; -let skippedNamespaces = []; -const debuggers = []; -if (debugEnvVariable) { - enable(debugEnvVariable); -} -const debugObj = Object.assign((namespace) => { - return createDebugger(namespace); -}, { - enable, - enabled, - disable, - log: log_js_1.log, -}); -function enable(namespaces) { - enabledString = namespaces; - enabledNamespaces = []; - skippedNamespaces = []; - const wildcard = /\*/g; - const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?")); - for (const ns of namespaceList) { - if (ns.startsWith("-")) { - skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`)); - } - else { - enabledNamespaces.push(new RegExp(`^${ns}$`)); - } - } - for (const instance of debuggers) { - instance.enabled = enabled(instance.namespace); - } -} -function enabled(namespace) { - if (namespace.endsWith("*")) { - return true; - } - for (const skipped of skippedNamespaces) { - if (skipped.test(namespace)) { - return false; - } - } - for (const enabledNamespace of enabledNamespaces) { - if (enabledNamespace.test(namespace)) { - return true; - } - } - return false; -} -function disable() { - const result = enabledString || ""; - enable(""); - return result; -} -function createDebugger(namespace) { - const newDebugger = Object.assign(debug, { - enabled: enabled(namespace), - destroy, - log: debugObj.log, - namespace, - extend, - }); - function debug(...args) { - if (!newDebugger.enabled) { - return; - } - if (args.length > 0) { - args[0] = `${namespace} ${args[0]}`; - } - newDebugger.log(...args); - } - debuggers.push(newDebugger); - return newDebugger; -} -function destroy() { - const index = debuggers.indexOf(this); - if (index >= 0) { - debuggers.splice(index, 1); - return true; - } - return false; -} -function extend(namespace) { - const newDebugger = createDebugger(`${this.namespace}:${namespace}`); - newDebugger.log = this.log; - return newDebugger; -} -exports["default"] = debugObj; -//# sourceMappingURL=debug.js.map /***/ }), -/***/ 89497: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 27100: +/***/ ((module) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AzureLogger = void 0; -exports.setLogLevel = setLogLevel; -exports.getLogLevel = getLogLevel; -exports.createClientLogger = createClientLogger; -const tslib_1 = __nccwpck_require__(4351); -const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(80162)); -const registeredLoggers = new Set(); -const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env.AZURE_LOG_LEVEL) || undefined; -let azureLogLevel; -/** - * The AzureLogger provides a mechanism for overriding where logs are output to. - * By default, logs are sent to stderr. - * Override the `log` method to redirect logs to another location. - */ -exports.AzureLogger = (0, debug_js_1.default)("azure"); -exports.AzureLogger.log = (...args) => { - debug_js_1.default.log(...args); -}; -const AZURE_LOG_LEVELS = ["verbose", "info", "warning", "error"]; -if (logLevelFromEnv) { - // avoid calling setLogLevel because we don't want a mis-set environment variable to crash - if (isAzureLogLevel(logLevelFromEnv)) { - setLogLevel(logLevelFromEnv); - } - else { - console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`); - } + +const RE_PLUS = /\+/g + +const HEX = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +] + +function Decoder () { + this.buffer = undefined } -/** - * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. - * @param level - The log level to enable for logging. - * Options from most verbose to least verbose are: - * - verbose - * - info - * - warning - * - error - */ -function setLogLevel(level) { - if (level && !isAzureLogLevel(level)) { - throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(",")}`); - } - azureLogLevel = level; - const enabledNamespaces = []; - for (const logger of registeredLoggers) { - if (shouldEnable(logger)) { - enabledNamespaces.push(logger.namespace); +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p } - debug_js_1.default.enable(enabledNamespaces.join(",")); -} -/** - * Retrieves the currently specified log level. - */ -function getLogLevel() { - return azureLogLevel; -} -const levelMap = { - verbose: 400, - info: 300, - warning: 200, - error: 100, -}; -/** - * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`. - * @param namespace - The name of the SDK package. - * @hidden - */ -function createClientLogger(namespace) { - const clientRootLogger = exports.AzureLogger.extend(namespace); - patchLogMethod(exports.AzureLogger, clientRootLogger); - return { - error: createLogger(clientRootLogger, "error"), - warning: createLogger(clientRootLogger, "warning"), - info: createLogger(clientRootLogger, "info"), - verbose: createLogger(clientRootLogger, "verbose"), - }; -} -function patchLogMethod(parent, child) { - child.log = (...args) => { - parent.log(...args); - }; -} -function createLogger(parent, level) { - const logger = Object.assign(parent.extend(level), { - level, - }); - patchLogMethod(parent, logger); - if (shouldEnable(logger)) { - const enabledNamespaces = debug_js_1.default.disable(); - debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); - } - registeredLoggers.add(logger); - return logger; -} -function shouldEnable(logger) { - return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]); + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res } -function isAzureLogLevel(logLevel) { - return AZURE_LOG_LEVELS.includes(logLevel); +Decoder.prototype.reset = function () { + this.buffer = undefined } -//# sourceMappingURL=index.js.map -/***/ }), - -/***/ 18898: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +module.exports = Decoder -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.log = log; -const tslib_1 = __nccwpck_require__(4351); -const node_os_1 = __nccwpck_require__(70612); -const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(47261)); -const process = tslib_1.__importStar(__nccwpck_require__(97742)); -function log(message, ...args) { - process.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); -} -//# sourceMappingURL=log.js.map /***/ }), -/***/ 58412: -/***/ ((__unused_webpack_module, exports) => { +/***/ 48647: +/***/ ((module) => { "use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -/** - * This error is thrown when an asynchronous operation has been aborted. - * Check for this error by testing the `name` that the name property of the - * error matches `"AbortError"`. - * - * @example - * ```ts - * const controller = new AbortController(); - * controller.abort(); - * try { - * doAsyncWork(controller.signal) - * } catch (e) { - * if (e.name === 'AbortError') { - * // handle abort error here. - * } - * } - * ``` - */ -class AbortError extends Error { - constructor(message) { - super(message); - this.name = "AbortError"; + +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) } + } + return (path === '..' || path === '.' ? '' : path) } -exports.AbortError = AbortError; -//# sourceMappingURL=AbortError.js.map - -/***/ }), - -/***/ 1753: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AbortError = void 0; -var AbortError_js_1 = __nccwpck_require__(58412); -Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); -//# sourceMappingURL=index.js.map /***/ }), -/***/ 92960: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 84619: +/***/ (function(module) { "use strict"; -const WritableStream = (__nccwpck_require__(84492).Writable) -const inherits = (__nccwpck_require__(47261).inherits) - -const StreamSearch = __nccwpck_require__(51142) - -const PartStream = __nccwpck_require__(81620) -const HeaderParser = __nccwpck_require__(92032) - -const DASH = 45 -const B_ONEDASH = Buffer.from('-') -const B_CRLF = Buffer.from('\r\n') -const EMPTY_FN = function () {} - -function Dicer (cfg) { - if (!(this instanceof Dicer)) { return new Dicer(cfg) } - WritableStream.call(this, cfg) - - if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } - - if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } - - this._headerFirst = cfg.headerFirst - - this._dashes = 0 - this._parts = 0 - this._finished = false - this._realFinish = false - this._isPreamble = true - this._justMatched = false - this._firstWrite = true - this._inHeader = true - this._part = undefined - this._cb = undefined - this._ignoreData = false - this._partOpts = { highWaterMark: cfg.partHwm } - this._pause = false - - const self = this - this._hparser = new HeaderParser(cfg) - this._hparser.on('header', function (header) { - self._inHeader = false - self._part.emit('header', header) - }) -} -inherits(Dicer, WritableStream) +// Node has always utf-8 +const utf8Decoder = new TextDecoder('utf-8') +const textDecoders = new Map([ + ['utf-8', utf8Decoder], + ['utf8', utf8Decoder] +]) -Dicer.prototype.emit = function (ev) { - if (ev === 'finish' && !this._realFinish) { - if (!this._finished) { - const self = this - process.nextTick(function () { - self.emit('error', new Error('Unexpected end of multipart data')) - if (self._part && !self._ignoreData) { - const type = (self._isPreamble ? 'Preamble' : 'Part') - self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) - self._part.push(null) - process.nextTick(function () { - self._realFinish = true - self.emit('finish') - self._realFinish = false - }) - return +function getDecoder (charset) { + let lc + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8 + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1 + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le + case 'base64': + return decoders.base64 + default: + if (lc === undefined) { + lc = true + charset = charset.toLowerCase() + continue } - self._realFinish = true - self.emit('finish') - self._realFinish = false - }) - } - } else { WritableStream.prototype.emit.apply(this, arguments) } -} - -Dicer.prototype._write = function (data, encoding, cb) { - // ignore unexpected data (e.g. extra trailer data after finished) - if (!this._hparser && !this._bparser) { return cb() } - - if (this._headerFirst && this._isPreamble) { - if (!this._part) { - this._part = new PartStream(this._partOpts) - if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() } + return decoders.other.bind(charset) } - const r = this._hparser.push(data) - if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } - } - - // allows for "easier" testing - if (this._firstWrite) { - this._bparser.push(B_CRLF) - this._firstWrite = false } - - this._bparser.push(data) - - if (this._pause) { this._cb = cb } else { cb() } -} - -Dicer.prototype.reset = function () { - this._part = undefined - this._bparser = undefined - this._hparser = undefined -} - -Dicer.prototype.setBoundary = function (boundary) { - const self = this - this._bparser = new StreamSearch('\r\n--' + boundary) - this._bparser.on('info', function (isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end) - }) } -Dicer.prototype._ignore = function () { - if (this._part && !this._ignoreData) { - this._ignoreData = true - this._part.on('error', EMPTY_FN) - // we must perform some kind of read on the stream even though we are - // ignoring the data, otherwise node's Readable stream will not emit 'end' - // after pushing null to the stream - this._part.resume() - } -} +const decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.utf8Slice(0, data.length) + }, -Dicer.prototype._oninfo = function (isMatch, data, start, end) { - let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + return data + } + return data.latin1Slice(0, data.length) + }, - if (!this._part && this._justMatched && data) { - while (this._dashes < 2 && (start + i) < end) { - if (data[start + i] === DASH) { - ++i - ++this._dashes - } else { - if (this._dashes) { buf = B_ONEDASH } - this._dashes = 0 - break - } + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return '' } - if (this._dashes === 2) { - if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) } - this.reset() - this._finished = true - // no more parts will be added - if (self._parts === 0) { - self._realFinish = true - self.emit('finish') - self._realFinish = false - } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) } - if (this._dashes) { return } - } - if (this._justMatched) { this._justMatched = false } - if (!this._part) { - this._part = new PartStream(this._partOpts) - this._part._read = function (n) { - self._unpause() + return data.ucs2Slice(0, data.length) + }, + + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return '' } - if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() } - if (!this._isPreamble) { this._inHeader = true } - } - if (data && start < end && !this._ignoreData) { - if (this._isPreamble || !this._inHeader) { - if (buf) { shouldWriteMore = this._part.push(buf) } - shouldWriteMore = this._part.push(data.slice(start, end)) - if (!shouldWriteMore) { this._pause = true } - } else if (!this._isPreamble && this._inHeader) { - if (buf) { this._hparser.push(buf) } - r = this._hparser.push(data.slice(start, end)) - if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) } - } - if (isMatch) { - this._hparser.reset() - if (this._isPreamble) { this._isPreamble = false } else { - if (start !== end) { - ++this._parts - this._part.on('end', function () { - if (--self._parts === 0) { - if (self._finished) { - self._realFinish = true - self.emit('finish') - self._realFinish = false - } else { - self._unpause() - } - } - }) - } + return data.base64Slice(0, data.length) + }, + + other: (data, sourceEncoding) => { + if (data.length === 0) { + return '' } - this._part.push(null) - this._part = undefined - this._ignoreData = false - this._justMatched = true - this._dashes = 0 + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + + if (textDecoders.has(this.toString())) { + try { + return textDecoders.get(this).decode(data) + } catch (e) { } + } + return typeof data === 'string' + ? data + : data.toString() } } -Dicer.prototype._unpause = function () { - if (!this._pause) { return } - - this._pause = false - if (this._cb) { - const cb = this._cb - this._cb = undefined - cb() +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) } + return text } -module.exports = Dicer +module.exports = decodeText /***/ }), -/***/ 92032: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 21467: +/***/ ((module) => { "use strict"; -const EventEmitter = (__nccwpck_require__(15673).EventEmitter) -const inherits = (__nccwpck_require__(47261).inherits) -const getLimit = __nccwpck_require__(21467) +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + limits[name] === null + ) { return defaultLimit } -const StreamSearch = __nccwpck_require__(51142) + if ( + typeof limits[name] !== 'number' || + isNaN(limits[name]) + ) { throw new TypeError('Limit ' + name + ' is not a valid number') } -const B_DCRLF = Buffer.from('\r\n\r\n') -const RE_CRLF = /\r\n/g -const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + return limits[name] +} -function HeaderParser (cfg) { - EventEmitter.call(this) - cfg = cfg || {} - const self = this - this.nread = 0 - this.maxed = false - this.npairs = 0 - this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) - this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) - this.buffer = '' - this.header = {} - this.finished = false - this.ss = new StreamSearch(B_DCRLF) - this.ss.on('info', function (isMatch, data, start, end) { - if (data && !self.maxed) { - if (self.nread + end - start >= self.maxHeaderSize) { - end = self.maxHeaderSize - self.nread + start - self.nread = self.maxHeaderSize - self.maxed = true - } else { self.nread += (end - start) } +/***/ }), - self.buffer += data.toString('binary', start, end) - } - if (isMatch) { self._finish() } - }) -} -inherits(HeaderParser, EventEmitter) +/***/ 31854: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -HeaderParser.prototype.push = function (data) { - const r = this.ss.push(data) - if (this.finished) { return r } -} +"use strict"; +/* eslint-disable object-property-newline */ -HeaderParser.prototype.reset = function () { - this.finished = false - this.buffer = '' - this.header = {} - this.ss.reset() + +const decodeText = __nccwpck_require__(84619) + +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g + +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' } -HeaderParser.prototype._finish = function () { - if (this.buffer) { this._parseHeader() } - this.ss.matches = this.ss.maxMatches - const header = this.header - this.header = {} - this.buffer = '' - this.finished = true - this.nread = this.npairs = 0 - this.maxed = false - this.emit('header', header) +function encodedReplacer (match) { + return EncodedLookup[match] } -HeaderParser.prototype._parseHeader = function () { - if (this.npairs === this.maxHeaderPairs) { return } +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 - const lines = this.buffer.split(RE_CRLF) - const len = lines.length - let m, h +function parseParams (str) { + const res = [] + let state = STATE_KEY + let charset = '' + let inquote = false + let escaping = false + let p = 0 + let tmp = '' + const len = str.length for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (lines[i].length === 0) { continue } - if (lines[i][0] === '\t' || lines[i][0] === ' ') { - // folded header content - // RFC2822 says to just remove the CRLF and not the whitespace following - // it, so we follow the RFC and include the leading whitespace ... - if (h) { - this.header[h][this.header[h].length - 1] += lines[i] + const char = str[i] + if (char === '\\' && inquote) { + if (escaping) { escaping = false } else { + escaping = true continue } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false + state = STATE_KEY + } else { inquote = true } + continue + } else { escaping = false } + } else { + if (escaping && inquote) { tmp += '\\' } + escaping = false + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG + charset = tmp.substring(1) + } else { state = STATE_VALUE } + tmp = '' + continue + } else if (state === STATE_KEY && + (char === '*' || char === '=') && + res.length) { + state = char === '*' + ? STATE_CHARSET + : STATE_VALUE + res[p] = [tmp, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = STATE_KEY + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') + } - const posColon = lines[i].indexOf(':') - if ( - posColon === -1 || - posColon === 0 - ) { - return + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } + + return res +} + +module.exports = parseParams + + +/***/ }), + +/***/ 22989: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AclRoleAccessorMethods = exports.Acl = void 0; +const promisify_1 = __nccwpck_require__(19203); +/** + * Attach functionality to a {@link Storage.acl} instance. This will add an + * object for each role group (owners, readers, and writers), with each object + * containing methods to add or delete a type of entity. + * + * As an example, here are a few methods that are created. + * + * myBucket.acl.readers.deleteGroup('groupId', function(err) {}); + * + * myBucket.acl.owners.addUser('email@example.com', function(err, acl) {}); + * + * myBucket.acl.writers.addDomain('example.com', function(err, acl) {}); + * + * @private + */ +class AclRoleAccessorMethods { + constructor() { + this.owners = {}; + this.readers = {}; + this.writers = {}; + /** + * An object of convenience methods to add or delete owner ACL permissions + * for a given entity. + * + * The supported methods include: + * + * - `myFile.acl.owners.addAllAuthenticatedUsers` + * - `myFile.acl.owners.deleteAllAuthenticatedUsers` + * - `myFile.acl.owners.addAllUsers` + * - `myFile.acl.owners.deleteAllUsers` + * - `myFile.acl.owners.addDomain` + * - `myFile.acl.owners.deleteDomain` + * - `myFile.acl.owners.addGroup` + * - `myFile.acl.owners.deleteGroup` + * - `myFile.acl.owners.addProject` + * - `myFile.acl.owners.deleteProject` + * - `myFile.acl.owners.addUser` + * - `myFile.acl.owners.deleteUser` + * + * @name Acl#owners + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * //- + * // Add a user as an owner of a file. + * //- + * const myBucket = gcs.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * myFile.acl.owners.addUser('email@example.com', function(err, aclObject) + * {}); + * + * //- + * // For reference, the above command is the same as running the following. + * //- + * myFile.acl.add({ + * entity: 'user-email@example.com', + * role: gcs.acl.OWNER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.owners.addUser('email@example.com').then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + this.owners = {}; + /** + * An object of convenience methods to add or delete reader ACL permissions + * for a given entity. + * + * The supported methods include: + * + * - `myFile.acl.readers.addAllAuthenticatedUsers` + * - `myFile.acl.readers.deleteAllAuthenticatedUsers` + * - `myFile.acl.readers.addAllUsers` + * - `myFile.acl.readers.deleteAllUsers` + * - `myFile.acl.readers.addDomain` + * - `myFile.acl.readers.deleteDomain` + * - `myFile.acl.readers.addGroup` + * - `myFile.acl.readers.deleteGroup` + * - `myFile.acl.readers.addProject` + * - `myFile.acl.readers.deleteProject` + * - `myFile.acl.readers.addUser` + * - `myFile.acl.readers.deleteUser` + * + * @name Acl#readers + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * //- + * // Add a user as a reader of a file. + * //- + * myFile.acl.readers.addUser('email@example.com', function(err, aclObject) + * {}); + * + * //- + * // For reference, the above command is the same as running the following. + * //- + * myFile.acl.add({ + * entity: 'user-email@example.com', + * role: gcs.acl.READER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.readers.addUser('email@example.com').then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + this.readers = {}; + /** + * An object of convenience methods to add or delete writer ACL permissions + * for a given entity. + * + * The supported methods include: + * + * - `myFile.acl.writers.addAllAuthenticatedUsers` + * - `myFile.acl.writers.deleteAllAuthenticatedUsers` + * - `myFile.acl.writers.addAllUsers` + * - `myFile.acl.writers.deleteAllUsers` + * - `myFile.acl.writers.addDomain` + * - `myFile.acl.writers.deleteDomain` + * - `myFile.acl.writers.addGroup` + * - `myFile.acl.writers.deleteGroup` + * - `myFile.acl.writers.addProject` + * - `myFile.acl.writers.deleteProject` + * - `myFile.acl.writers.addUser` + * - `myFile.acl.writers.deleteUser` + * + * @name Acl#writers + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * //- + * // Add a user as a writer of a file. + * //- + * myFile.acl.writers.addUser('email@example.com', function(err, aclObject) + * {}); + * + * //- + * // For reference, the above command is the same as running the following. + * //- + * myFile.acl.add({ + * entity: 'user-email@example.com', + * role: gcs.acl.WRITER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.writers.addUser('email@example.com').then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + this.writers = {}; + AclRoleAccessorMethods.roles.forEach(this._assignAccessMethods.bind(this)); + } + _assignAccessMethods(role) { + const accessMethods = AclRoleAccessorMethods.accessMethods; + const entities = AclRoleAccessorMethods.entities; + const roleGroup = role.toLowerCase() + 's'; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this[roleGroup] = entities.reduce((acc, entity) => { + const isPrefix = entity.charAt(entity.length - 1) === '-'; + accessMethods.forEach(accessMethod => { + let method = accessMethod + entity[0].toUpperCase() + entity.substring(1); + if (isPrefix) { + method = method.replace('-', ''); + } + // Wrap the parent accessor method (e.g. `add` or `delete`) to avoid the + // more complex API of specifying an `entity` and `role`. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + acc[method] = (entityId, options, callback) => { + let apiEntity; + if (typeof options === 'function') { + callback = options; + options = {}; + } + if (isPrefix) { + apiEntity = entity + entityId; + } + else { + // If the entity is not a prefix, it is a special entity group + // that does not require further details. The accessor methods + // only accept a callback. + apiEntity = entity; + callback = entityId; + } + options = Object.assign({ + entity: apiEntity, + role, + }, options); + const args = [options]; + if (typeof callback === 'function') { + args.push(callback); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return this[accessMethod].apply(this, args); + }; + }); + return acc; + }, {}); + } +} +exports.AclRoleAccessorMethods = AclRoleAccessorMethods; +AclRoleAccessorMethods.accessMethods = ['add', 'delete']; +AclRoleAccessorMethods.entities = [ + // Special entity groups that do not require further specification. + 'allAuthenticatedUsers', + 'allUsers', + // Entity groups that require specification, e.g. `user-email@example.com`. + 'domain-', + 'group-', + 'project-', + 'user-', +]; +AclRoleAccessorMethods.roles = ['OWNER', 'READER', 'WRITER']; +/** + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. + * + * An ACL consists of one or more entries, where each entry grants permissions + * to an entity. Permissions define the actions that can be performed against an + * object or bucket (for example, `READ` or `WRITE`); the entity defines who the + * permission applies to (for example, a specific user or group of users). + * + * Where an `entity` value is accepted, we follow the format the Cloud Storage + * API expects. + * + * Refer to + * https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls + * for the most up-to-date values. + * + * - `user-userId` + * - `user-email` + * - `group-groupId` + * - `group-email` + * - `domain-domain` + * - `project-team-projectId` + * - `allUsers` + * - `allAuthenticatedUsers` + * + * Examples: + * + * - The user "liz@example.com" would be `user-liz@example.com`. + * - The group "example@googlegroups.com" would be + * `group-example@googlegroups.com`. + * - To refer to all members of the Google Apps for Business domain + * "example.com", the entity would be `domain-example.com`. + * + * For more detailed information, see + * {@link http://goo.gl/6qBBPO| About Access Control Lists}. + * + * @constructor Acl + * @mixin + * @param {object} options Configuration options. + */ +class Acl extends AclRoleAccessorMethods { + constructor(options) { + super(); + this.pathPrefix = options.pathPrefix; + this.request_ = options.request; + } + /** + * @typedef {array} AddAclResponse + * @property {object} 0 The Acl Objects. + * @property {object} 1 The full API response. + */ + /** + * @callback AddAclCallback + * @param {?Error} err Request error, if any. + * @param {object} acl The Acl Objects. + * @param {object} apiResponse The full API response. + */ + /** + * Add access controls on a {@link Bucket} or {@link File}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert| BucketAccessControls: insert API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} + * + * @param {object} options Configuration options. + * @param {string} options.entity Whose permissions will be added. + * @param {string} options.role Permissions allowed for the defined entity. + * See {@link https://cloud.google.com/storage/docs/access-control Access + * Control}. + * @param {number} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {AddAclCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * const options = { + * entity: 'user-useremail@example.com', + * role: gcs.acl.OWNER_ROLE + * }; + * + * myBucket.acl.add(options, function(err, aclObject, apiResponse) {}); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * // Here is how you would grant ownership permissions to a user on a + * specific + * // revision of a file. + * //- + * myFile.acl.add({ + * entity: 'user-useremail@example.com', + * role: gcs.acl.OWNER_ROLE, + * generation: 1 + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_add_file_owner + * Example of adding an owner to a file: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_owner + * Example of adding an owner to a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_default_owner + * Example of adding a default owner to a bucket: + */ + add(options, callback) { + const query = {}; + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + this.request({ + method: 'POST', + uri: '', + qs: query, + maxRetries: 0, //explicitly set this value since this is a non-idempotent function + json: { + entity: options.entity, + role: options.role.toUpperCase(), + }, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + callback(null, this.makeAclObject_(resp), resp); + }); + } + /** + * @typedef {array} RemoveAclResponse + * @property {object} 0 The full API response. + */ + /** + * @callback RemoveAclCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Delete access controls on a {@link Bucket} or {@link File}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete| BucketAccessControls: delete API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete| ObjectAccessControls: delete API Documentation} + * + * @param {object} options Configuration object. + * @param {string} options.entity Whose permissions will be revoked. + * @param {int} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {RemoveAclCallback} callback The callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * myBucket.acl.delete({ + * entity: 'user-useremail@example.com' + * }, function(err, apiResponse) {}); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * //- + * myFile.acl.delete({ + * entity: 'user-useremail@example.com', + * generation: 1 + * }, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_owner + * Example of removing an owner from a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_default_owner + * Example of removing a default owner from a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_file_owner + * Example of removing an owner from a bucket: + */ + delete(options, callback) { + const query = {}; + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + this.request({ + method: 'DELETE', + uri: '/' + encodeURIComponent(options.entity), + qs: query, + }, (err, resp) => { + callback(err, resp); + }); + } + /** + * @typedef {array} GetAclResponse + * @property {object|object[]} 0 Single or array of Acl Objects. + * @property {object} 1 The full API response. + */ + /** + * @callback GetAclCallback + * @param {?Error} err Request error, if any. + * @param {object|object[]} acl Single or array of Acl Objects. + * @param {object} apiResponse The full API response. + */ + /** + * Get access controls on a {@link Bucket} or {@link File}. If + * an entity is omitted, you will receive an array of all applicable access + * controls. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get| BucketAccessControls: get API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get| ObjectAccessControls: get API Documentation} + * + * @param {object|function} [options] Configuration options. If you want to + * receive a list of all access controls, pass the callback function as + * the only argument. + * @param {string} options.entity Whose permissions will be fetched. + * @param {number} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetAclCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * myBucket.acl.get({ + * entity: 'user-useremail@example.com' + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // Get all access controls. + * //- + * myBucket.acl.get(function(err, aclObjects, apiResponse) { + * // aclObjects = [ + * // { + * // entity: 'user-useremail@example.com', + * // role: 'owner' + * // } + * // ] + * }); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * //- + * myFile.acl.get({ + * entity: 'user-useremail@example.com', + * generation: 1 + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.acl.get().then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_print_file_acl + * Example of printing a file's ACL: + * + * @example include:samples/acl.js + * region_tag:storage_print_file_acl_for_user + * Example of printing a file's ACL for a specific user: + * + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl + * Example of printing a bucket's ACL: + * + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl_for_user + * Example of printing a bucket's ACL for a specific user: + */ + get(optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : null; + const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + let path = ''; + const query = {}; + if (options) { + path = '/' + encodeURIComponent(options.entity); + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + } + this.request({ + uri: path, + qs: query, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + let results; + if (resp.items) { + results = resp.items.map(this.makeAclObject_); + } + else { + results = this.makeAclObject_(resp); + } + callback(null, results, resp); + }); + } + /** + * @typedef {array} UpdateAclResponse + * @property {object} 0 The updated Acl Objects. + * @property {object} 1 The full API response. + */ + /** + * @callback UpdateAclCallback + * @param {?Error} err Request error, if any. + * @param {object} acl The updated Acl Objects. + * @param {object} apiResponse The full API response. + */ + /** + * Update access controls on a {@link Bucket} or {@link File}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update| BucketAccessControls: update API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update| ObjectAccessControls: update API Documentation} + * + * @param {object} options Configuration options. + * @param {string} options.entity Whose permissions will be updated. + * @param {string} options.role Permissions allowed for the defined entity. + * See {@link Storage.acl}. + * @param {number} [options.generation] **File Objects Only** Select a specific + * revision of this file (as opposed to the latest version, the default). + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {UpdateAclCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); + * const myFile = myBucket.file('my-file'); + * + * const options = { + * entity: 'user-useremail@example.com', + * role: gcs.acl.WRITER_ROLE + * }; + * + * myBucket.acl.update(options, function(err, aclObject, apiResponse) {}); + * + * //- + * // For file ACL operations, you can also specify a `generation` property. + * //- + * myFile.acl.update({ + * entity: 'user-useremail@example.com', + * role: gcs.acl.WRITER_ROLE, + * generation: 1 + * }, function(err, aclObject, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myFile.acl.update(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + update(options, callback) { + const query = {}; + if (options.generation) { + query.generation = options.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + this.request({ + method: 'PUT', + uri: '/' + encodeURIComponent(options.entity), + qs: query, + json: { + role: options.role.toUpperCase(), + }, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + callback(null, this.makeAclObject_(resp), resp); + }); + } + /** + * Transform API responses to a consistent object format. + * + * @private + */ + makeAclObject_(accessControlObject) { + const obj = { + entity: accessControlObject.entity, + role: accessControlObject.role, + }; + if (accessControlObject.projectTeam) { + obj.projectTeam = accessControlObject.projectTeam; + } + return obj; + } + /** + * Patch requests up to the bucket's request object. + * + * @private + * + * @param {string} method Action. + * @param {string} path Request path. + * @param {*} query Request query object. + * @param {*} body Request body contents. + * @param {function} callback Callback function. + */ + request(reqOpts, callback) { + reqOpts.uri = this.pathPrefix + reqOpts.uri; + this.request_(reqOpts, callback); } - m = RE_HDR.exec(lines[i]) - h = m[1].toLowerCase() - this.header[h] = this.header[h] || [] - this.header[h].push((m[2] || '')) - if (++this.npairs === this.maxHeaderPairs) { break } - } -} - -module.exports = HeaderParser - - -/***/ }), - -/***/ 81620: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const inherits = (__nccwpck_require__(47261).inherits) -const ReadableStream = (__nccwpck_require__(84492).Readable) - -function PartStream (opts) { - ReadableStream.call(this, opts) } -inherits(PartStream, ReadableStream) - -PartStream.prototype._read = function (n) {} - -module.exports = PartStream +exports.Acl = Acl; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Acl, { + exclude: ['request'], +}); /***/ }), -/***/ 51142: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 23973: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - +// Copyright 2019 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Bucket = exports.BucketExceptionMessages = exports.AvailableServiceObjectMethods = exports.BucketActionToHTTPMethod = void 0; +const index_js_1 = __nccwpck_require__(4052); +const paginator_1 = __nccwpck_require__(46412); +const promisify_1 = __nccwpck_require__(19203); +const fs = __importStar(__nccwpck_require__(57147)); +const mime_1 = __importDefault(__nccwpck_require__(29994)); +const path = __importStar(__nccwpck_require__(71017)); +const p_limit_1 = __importDefault(__nccwpck_require__(57684)); +const util_1 = __nccwpck_require__(73837); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +const util_js_1 = __nccwpck_require__(59258); +const acl_js_1 = __nccwpck_require__(22989); +const file_js_1 = __nccwpck_require__(4713); +const iam_js_1 = __nccwpck_require__(80352); +const notification_js_1 = __nccwpck_require__(21178); +const storage_js_1 = __nccwpck_require__(33030); +const signer_js_1 = __nccwpck_require__(59019); +const stream_1 = __nccwpck_require__(12781); +const url_1 = __nccwpck_require__(57310); +var BucketActionToHTTPMethod; +(function (BucketActionToHTTPMethod) { + BucketActionToHTTPMethod["list"] = "GET"; +})(BucketActionToHTTPMethod || (exports.BucketActionToHTTPMethod = BucketActionToHTTPMethod = {})); +var AvailableServiceObjectMethods; +(function (AvailableServiceObjectMethods) { + AvailableServiceObjectMethods[AvailableServiceObjectMethods["setMetadata"] = 0] = "setMetadata"; + AvailableServiceObjectMethods[AvailableServiceObjectMethods["delete"] = 1] = "delete"; +})(AvailableServiceObjectMethods || (exports.AvailableServiceObjectMethods = AvailableServiceObjectMethods = {})); +var BucketExceptionMessages; +(function (BucketExceptionMessages) { + BucketExceptionMessages["PROVIDE_SOURCE_FILE"] = "You must provide at least one source file."; + BucketExceptionMessages["DESTINATION_FILE_NOT_SPECIFIED"] = "A destination file must be specified."; + BucketExceptionMessages["CHANNEL_ID_REQUIRED"] = "An ID is required to create a channel."; + BucketExceptionMessages["TOPIC_NAME_REQUIRED"] = "A valid topic name is required."; + BucketExceptionMessages["CONFIGURATION_OBJECT_PREFIX_REQUIRED"] = "A configuration object with a prefix is required."; + BucketExceptionMessages["SPECIFY_FILE_NAME"] = "A file name must be specified."; + BucketExceptionMessages["METAGENERATION_NOT_PROVIDED"] = "A metageneration must be provided."; + BucketExceptionMessages["SUPPLY_NOTIFICATION_ID"] = "You must supply a notification ID."; +})(BucketExceptionMessages || (exports.BucketExceptionMessages = BucketExceptionMessages = {})); /** - * Copyright Brian White. All rights reserved. + * @callback Crc32cGeneratorToStringCallback + * A method returning the CRC32C as a base64-encoded string. * - * @see https://github.com/mscdex/streamsearch + * @returns {string} * - * 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: + * @example + * Hashing the string 'data' should return 'rth90Q==' * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.toString(); // 'rth90Q==' + * ``` + **/ +/** + * @callback Crc32cGeneratorValidateCallback + * A method validating a base64-encoded CRC32C string. * - * 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. + * @param {string} [value] base64-encoded CRC32C string to validate + * @returns {boolean} * - * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + * @example + * Should return `true` if the value matches, `false` otherwise + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.validate('DkjKuA=='); // false + * crc32c.validate('rth90Q=='); // true + * ``` + **/ +/** + * @callback Crc32cGeneratorUpdateCallback + * A method for passing `Buffer`s for CRC32C generation. + * + * @param {Buffer} [data] data to update CRC32C value with + * @returns {undefined} + * + * @example + * Hashing buffers from 'some ' and 'text\n' + * + * ```js + * const buffer1 = Buffer.from('some '); + * crc32c.update(buffer1); + * + * const buffer2 = Buffer.from('text\n'); + * crc32c.update(buffer2); + * + * crc32c.toString(); // 'DkjKuA==' + * ``` + **/ +/** + * @typedef {object} CRC32CValidator + * @property {Crc32cGeneratorToStringCallback} + * @property {Crc32cGeneratorValidateCallback} + * @property {Crc32cGeneratorUpdateCallback} */ -const EventEmitter = (__nccwpck_require__(15673).EventEmitter) -const inherits = (__nccwpck_require__(47261).inherits) - -function SBMH (needle) { - if (typeof needle === 'string') { - needle = Buffer.from(needle) - } - - if (!Buffer.isBuffer(needle)) { - throw new TypeError('The needle has to be a String or a Buffer.') - } - - const needleLength = needle.length - - if (needleLength === 0) { - throw new Error('The needle cannot be an empty String/Buffer.') - } - - if (needleLength > 256) { - throw new Error('The needle cannot have a length bigger than 256.') - } - - this.maxMatches = Infinity - this.matches = 0 - - this._occ = new Array(256) - .fill(needleLength) // Initialize occurrence table. - this._lookbehind_size = 0 - this._needle = needle - this._bufpos = 0 - - this._lookbehind = Buffer.alloc(needleLength) - - // Populate occurrence table with analysis of the needle, - // ignoring last letter. - for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var - this._occ[needle[i]] = needleLength - 1 - i - } -} -inherits(SBMH, EventEmitter) - -SBMH.prototype.reset = function () { - this._lookbehind_size = 0 - this.matches = 0 - this._bufpos = 0 -} - -SBMH.prototype.push = function (chunk, pos) { - if (!Buffer.isBuffer(chunk)) { - chunk = Buffer.from(chunk, 'binary') - } - const chlen = chunk.length - this._bufpos = pos || 0 - let r - while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } - return r -} - -SBMH.prototype._sbmh_feed = function (data) { - const len = data.length - const needle = this._needle - const needleLength = needle.length - const lastNeedleChar = needle[needleLength - 1] - - // Positive: points to a position in `data` - // pos == 3 points to data[3] - // Negative: points to a position in the lookbehind buffer - // pos == -2 points to lookbehind[lookbehind_size - 2] - let pos = -this._lookbehind_size - let ch - - if (pos < 0) { - // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool - // search with character lookup code that considers both the - // lookbehind buffer and the current round's haystack data. - // - // Loop until - // there is a match. - // or until - // we've moved past the position that requires the - // lookbehind buffer. In this case we switch to the - // optimized loop. - // or until - // the character to look at lies outside the haystack. - while (pos < 0 && pos <= len - needleLength) { - ch = this._sbmh_lookup_char(data, pos + needleLength - 1) - - if ( - ch === lastNeedleChar && - this._sbmh_memcmp(data, pos, needleLength - 1) - ) { - this._lookbehind_size = 0 - ++this.matches - this.emit('info', true) - - return (this._bufpos = pos + needleLength) - } - pos += this._occ[ch] +/** + * A function that generates a CRC32C Validator. Defaults to {@link CRC32C} + * + * @name Bucket#crc32cGenerator + * @type {CRC32CValidator} + */ +/** + * Get and set IAM policies for your bucket. + * + * @name Bucket#iam + * @mixes Iam + * + * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} + * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} + * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Get the IAM policy for your bucket. + * //- + * bucket.iam.getPolicy(function(err, policy) { + * console.log(policy); + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.iam.getPolicy().then(function(data) { + * const policy = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/iam.js + * region_tag:storage_view_bucket_iam_members + * Example of retrieving a bucket's IAM policy: + * + * @example include:samples/iam.js + * region_tag:storage_add_bucket_iam_member + * Example of adding to a bucket's IAM policy: + * + * @example include:samples/iam.js + * region_tag:storage_remove_bucket_iam_member + * Example of removing from a bucket's IAM policy: + */ +/** + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. + * + * An ACL consists of one or more entries, where each entry grants permissions + * to an entity. Permissions define the actions that can be performed against + * an object or bucket (for example, `READ` or `WRITE`); the entity defines + * who the permission applies to (for example, a specific user or group of + * users). + * + * The `acl` object on a Bucket instance provides methods to get you a list of + * the ACLs defined on your bucket, as well as set, update, and delete them. + * + * Buckets also have + * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} + * for all created files. Default ACLs specify permissions that all new + * objects added to the bucket will inherit by default. You can add, delete, + * get, and update entities and permissions for these as well with + * {@link Bucket#acl.default}. + * + * See {@link http://goo.gl/6qBBPO| About Access Control Lists} + * See {@link https://cloud.google.com/storage/docs/access-control/lists#default| Default ACLs} + * + * @name Bucket#acl + * @mixes Acl + * @property {Acl} default Cloud Storage Buckets have + * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} + * for all created files. You can add, delete, get, and update entities and + * permissions for these as well. The method signatures and examples are all + * the same, after only prefixing the method call with `default`. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * + * //- + * // Make a bucket's contents publicly readable. + * //- + * const myBucket = storage.bucket('my-bucket'); + * + * const options = { + * entity: 'allUsers', + * role: storage.acl.READER_ROLE + * }; + * + * myBucket.acl.add(options, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl + * Example of printing a bucket's ACL: + * + * @example include:samples/acl.js + * region_tag:storage_print_bucket_acl_for_user + * Example of printing a bucket's ACL for a specific user: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_owner + * Example of adding an owner to a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_owner + * Example of removing an owner from a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_add_bucket_default_owner + * Example of adding a default owner to a bucket: + * + * @example include:samples/acl.js + * region_tag:storage_remove_bucket_default_owner + * Example of removing a default owner from a bucket: + */ +/** + * The API-formatted resource description of the bucket. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name Bucket#metadata + * @type {object} + */ +/** + * The bucket's name. + * @name Bucket#name + * @type {string} + */ +/** + * Get {@link File} objects for the files currently in the bucket as a + * readable object stream. + * + * @method Bucket#getFilesStream + * @param {GetFilesOptions} [query] Query object for listing files. + * @returns {ReadableStream} A readable stream that emits {@link File} instances. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getFilesStream() + * .on('error', console.error) + * .on('data', function(file) { + * // file is a File object. + * }) + * .on('end', function() { + * // All files retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * bucket.getFilesStream() + * .on('data', function(file) { + * this.end(); + * }); + * + * //- + * // If you're filtering files with a delimiter, you should use + * // {@link Bucket#getFiles} and set `autoPaginate: false` in order to + * // preserve the `apiResponse` argument. + * //- + * const prefixes = []; + * + * function callback(err, files, nextQuery, apiResponse) { + * prefixes = prefixes.concat(apiResponse.prefixes); + * + * if (nextQuery) { + * bucket.getFiles(nextQuery, callback); + * } else { + * // prefixes = The finished array of prefixes. + * } + * } + * + * bucket.getFiles({ + * autoPaginate: false, + * delimiter: '/' + * }, callback); + * ``` + */ +/** + * Create a Bucket object to interact with a Cloud Storage bucket. + * + * @class + * @hideconstructor + * + * @param {Storage} storage A {@link Storage} instance. + * @param {string} name The name of the bucket. + * @param {object} [options] Configuration object. + * @param {string} [options.userProject] User project. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * ``` + */ +class Bucket extends index_js_1.ServiceObject { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + getFilesStream(query) { + // placeholder body, overwritten in constructor + return new stream_1.Readable(); } - - // No match. - - if (pos < 0) { - // There's too few data for Boyer-Moore-Horspool to run, - // so let's use a different algorithm to skip as much as - // we can. - // Forward pos until - // the trailing part of lookbehind + data - // looks like the beginning of the needle - // or until - // pos == 0 - while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + constructor(storage, name, options) { + var _a, _b, _c, _d; + options = options || {}; + // Allow for "gs://"-style input, and strip any trailing slashes. + name = name.replace(/^gs:\/\//, '').replace(/\/+$/, ''); + const requestQueryObject = {}; + if ((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { + requestQueryObject.ifGenerationMatch = + options.preconditionOpts.ifGenerationMatch; + } + if ((_b = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { + requestQueryObject.ifGenerationNotMatch = + options.preconditionOpts.ifGenerationNotMatch; + } + if ((_c = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { + requestQueryObject.ifMetagenerationMatch = + options.preconditionOpts.ifMetagenerationMatch; + } + if ((_d = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { + requestQueryObject.ifMetagenerationNotMatch = + options.preconditionOpts.ifMetagenerationNotMatch; + } + const userProject = options.userProject; + if (typeof userProject === 'string') { + requestQueryObject.userProject = userProject; + } + const methods = { + /** + * Create a bucket. + * + * @method Bucket#create + * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. + * @param {CreateBucketCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * bucket.create(function(err, bucket, apiResponse) { + * if (!err) { + * // The bucket was created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.create().then(function(data) { + * const bucket = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + create: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * IamDeleteBucketOptions Configuration options. + * @property {boolean} [ignoreNotFound = false] Ignore an error if + * the bucket does not exist. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} DeleteBucketResponse + * @property {object} 0 The full API response. + */ + /** + * @callback DeleteBucketCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Delete the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/delete| Buckets: delete API Documentation} + * + * @method Bucket#delete + * @param {DeleteBucketOptions} [options] Configuration options. + * @param {boolean} [options.ignoreNotFound = false] Ignore an error if + * the bucket does not exist. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {DeleteBucketCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * bucket.delete(function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/buckets.js + * region_tag:storage_delete_bucket + * Another example: + */ + delete: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {object} BucketExistsOptions Configuration options for Bucket#exists(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} BucketExistsResponse + * @property {boolean} 0 Whether the {@link Bucket} exists. + */ + /** + * @callback BucketExistsCallback + * @param {?Error} err Request error, if any. + * @param {boolean} exists Whether the {@link Bucket} exists. + */ + /** + * Check if the bucket exists. + * + * @method Bucket#exists + * @param {BucketExistsOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {BucketExistsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.exists(function(err, exists) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.exists().then(function(data) { + * const exists = data[0]; + * }); + * ``` + */ + exists: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {object} [GetBucketOptions] Configuration options for Bucket#get() + * @property {boolean} [autoCreate] Automatically create the object if + * it does not exist. Default: `false` + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} GetBucketResponse + * @property {Bucket} 0 The {@link Bucket}. + * @property {object} 1 The full API response. + */ + /** + * @callback GetBucketCallback + * @param {?Error} err Request error, if any. + * @param {Bucket} bucket The {@link Bucket}. + * @param {object} apiResponse The full API response. + */ + /** + * Get a bucket if it exists. + * + * You may optionally use this to "get or create" an object by providing + * an object with `autoCreate` set to `true`. Any extra configuration that + * is normally required for the `create` method must be contained within + * this object as well. + * + * @method Bucket#get + * @param {GetBucketOptions} [options] Configuration options. + * @param {boolean} [options.autoCreate] Automatically create the object if + * it does not exist. Default: `false` + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetBucketCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.get(function(err, bucket, apiResponse) { + * // `bucket.metadata` has been populated. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.get().then(function(data) { + * const bucket = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + get: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {array} GetBucketMetadataResponse + * @property {object} 0 The bucket metadata. + * @property {object} 1 The full API response. + */ + /** + * @callback GetBucketMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The bucket metadata. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {object} GetBucketMetadataOptions Configuration options for Bucket#getMetadata(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Get the bucket's metadata. + * + * To set metadata, see {@link Bucket#setMetadata}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/get| Buckets: get API Documentation} + * + * @method Bucket#getMetadata + * @param {GetBucketMetadataOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getMetadata().then(function(data) { + * const metadata = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/requesterPays.js + * region_tag:storage_get_requester_pays_status + * Example of retrieving the requester pays status of a bucket: + */ + getMetadata: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * @typedef {object} SetBucketMetadataOptions Configuration options for Bucket#setMetadata(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} SetBucketMetadataResponse + * @property {object} apiResponse The full API response. + */ + /** + * @callback SetBucketMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The bucket metadata. + */ + /** + * Set the bucket's metadata. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @method Bucket#setMetadata + * @param {object} metadata The metadata you wish to set. + * @param {SetBucketMetadataOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Set website metadata field on the bucket. + * //- + * const metadata = { + * website: { + * mainPageSuffix: 'http://example.com', + * notFoundPage: 'http://example.com/404.html' + * } + * }; + * + * bucket.setMetadata(metadata, function(err, apiResponse) {}); + * + * //- + * // Enable versioning for your bucket. + * //- + * bucket.setMetadata({ + * versioning: { + * enabled: true + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Enable KMS encryption for objects within this bucket. + * //- + * bucket.setMetadata({ + * encryption: { + * defaultKmsKeyName: 'projects/grape-spaceship-123/...' + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Set the default event-based hold value for new objects in this + * // bucket. + * //- + * bucket.setMetadata({ + * defaultEventBasedHold: true + * }, function(err, apiResponse) {}); + * + * //- + * // Remove object lifecycle rules. + * //- + * bucket.setMetadata({ + * lifecycle: null + * }, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setMetadata(metadata).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + setMetadata: { + reqOpts: { + qs: requestQueryObject, + }, + }, + }; + super({ + parent: storage, + baseUrl: '/b', + id: name, + createMethod: storage.createBucket.bind(storage), + methods, + }); + /** + * Indicates whether this Bucket object is a placeholder for an item + * that the API failed to retrieve (unreachable) due to partial failure. + * Consumers must check this flag before accessing other properties. + */ + this.unreachable = false; + this.name = name; + this.storage = storage; + this.userProject = options.userProject; + this.acl = new acl_js_1.Acl({ + request: this.request.bind(this), + pathPrefix: '/acl', + }); + this.acl.default = new acl_js_1.Acl({ + request: this.request.bind(this), + pathPrefix: '/defaultObjectAcl', + }); + this.crc32cGenerator = + options.crc32cGenerator || this.storage.crc32cGenerator; + this.iam = new iam_js_1.Iam(this); + this.getFilesStream = paginator_1.paginator.streamify('getFiles'); + this.instanceRetryValue = storage.retryOptions.autoRetry; + this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts; } - - if (pos >= 0) { - // Discard lookbehind buffer. - this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) - this._lookbehind_size = 0 - } else { - // Cut off part of the lookbehind buffer that has - // been processed and append the entire haystack - // into it. - const bytesToCutOff = this._lookbehind_size + pos - if (bytesToCutOff > 0) { - // The cut off data is guaranteed not to contain the needle. - this.emit('info', false, this._lookbehind, 0, bytesToCutOff) - } - - this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, - this._lookbehind_size - bytesToCutOff) - this._lookbehind_size -= bytesToCutOff - - data.copy(this._lookbehind, this._lookbehind_size) - this._lookbehind_size += len - - this._bufpos = len - return len + /** + * The bucket's Cloud Storage URI (`gs://`) + * + * @example + * ```ts + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * + * // `gs://my-bucket` + * const href = bucket.cloudStorageURI.href; + * ``` + */ + get cloudStorageURI() { + const uri = new url_1.URL('gs://'); + uri.host = this.name; + return uri; + } + /** + * @typedef {object} AddLifecycleRuleOptions Configuration options for Bucket#addLifecycleRule(). + * @property {boolean} [append=true] The new rules will be appended to any + * pre-existing rules. + */ + /** + * + * @typedef {object} LifecycleRule The new lifecycle rule to be added to objects + * in this bucket. + * @property {string|object} action The action to be taken upon matching of + * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. + * **Note**: For configuring a raw-formatted rule object to be passed as `action` + * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. + * @property {object} condition Condition a bucket must meet before the + * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. + * @property {string} [storageClass] When using the `setStorageClass` + * action, provide this option to dictate which storage class the object + * should update to. Please see + * [SetStorageClass option documentation]{@link https://cloud.google.com/storage/docs/lifecycle#setstorageclass} for supported transitions. + */ + /** + * Add an object lifecycle management rule to the bucket. + * + * By default, an Object Lifecycle Management rule provided to this method + * will be included to the existing policy. To replace all existing rules, + * supply the `options` argument, setting `append` to `false`. + * + * To add multiple rules, pass a list to the `rule` parameter. Calling this + * function multiple times asynchronously does not guarantee that all rules + * are added correctly. + * + * See {@link https://cloud.google.com/storage/docs/lifecycle| Object Lifecycle Management} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @param {LifecycleRule|LifecycleRule[]} rule The new lifecycle rule or rules to be added to objects + * in this bucket. + * @param {string|object} rule.action The action to be taken upon matching of + * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. + * **Note**: For configuring a raw-formatted rule object to be passed as `action` + * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. + * @param {object} rule.condition Condition a bucket must meet before the + * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. + * @param {string} [rule.storageClass] When using the `setStorageClass` + * action, provide this option to dictate which storage class the object + * should update to. + * @param {AddLifecycleRuleOptions} [options] Configuration object. + * @param {boolean} [options.append=true] Append the new rule to the existing + * policy. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Automatically have an object deleted from this bucket once it is 3 years + * // of age. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * age: 365 * 3 // Specified in days. + * } + * }, function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * const lifecycleRules = bucket.metadata.lifecycle.rule; + * + * // Iterate over the Object Lifecycle Management rules on this bucket. + * lifecycleRules.forEach(lifecycleRule => {}); + * }); + * + * //- + * // By default, the rule you provide will be added to the existing policy. + * // Optionally, you can disable this behavior to replace all of the + * // pre-existing rules. + * //- + * const options = { + * append: false + * }; + * + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * age: 365 * 3 // Specified in days. + * } + * }, options, function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * // All rules have been replaced with the new "delete" rule. + * + * // Iterate over the Object Lifecycle Management rules on this bucket. + * lifecycleRules.forEach(lifecycleRule => {}); + * }); + * + * //- + * // For objects created before 2018, "downgrade" the storage class. + * //- + * bucket.addLifecycleRule({ + * action: 'setStorageClass', + * storageClass: 'COLDLINE', + * condition: { + * createdBefore: new Date('2018') + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete objects created before 2016 which have the Coldline storage + * // class. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * matchesStorageClass: [ + * 'COLDLINE' + * ], + * createdBefore: new Date('2016') + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete object that has a noncurrent timestamp that is at least 100 days. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * daysSinceNoncurrentTime: 100 + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete object that has a noncurrent timestamp before 2020-01-01. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * noncurrentTimeBefore: new Date('2020-01-01') + * } + * }, function(err, apiResponse) {}); + * + * //- + * // Delete object that has a customTime that is at least 100 days. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * daysSinceCustomTime: 100 + * } + * }, function(err, apiResponse) ()); + * + * //- + * // Delete object that has a customTime before 2020-01-01. + * //- + * bucket.addLifecycleRule({ + * action: 'delete', + * condition: { + * customTimeBefore: new Date('2020-01-01') + * } + * }, function(err, apiResponse) {}); + * ``` + */ + addLifecycleRule(rule, optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + options = options || {}; + const rules = Array.isArray(rule) ? rule : [rule]; + for (const curRule of rules) { + if (curRule.condition.createdBefore instanceof Date) { + curRule.condition.createdBefore = curRule.condition.createdBefore + .toISOString() + .replace(/T.+$/, ''); + } + if (curRule.condition.customTimeBefore instanceof Date) { + curRule.condition.customTimeBefore = curRule.condition.customTimeBefore + .toISOString() + .replace(/T.+$/, ''); + } + if (curRule.condition.noncurrentTimeBefore instanceof Date) { + curRule.condition.noncurrentTimeBefore = + curRule.condition.noncurrentTimeBefore + .toISOString() + .replace(/T.+$/, ''); + } + } + if (options.append === false) { + this.setMetadata({ lifecycle: { rule: rules } }, options, callback); + return; + } + // The default behavior appends the previously-defined lifecycle rules with + // the new ones just passed in by the user. + this.getMetadata((err, metadata) => { + var _a, _b; + if (err) { + callback(err); + return; + } + const currentLifecycleRules = Array.isArray((_a = metadata.lifecycle) === null || _a === void 0 ? void 0 : _a.rule) + ? (_b = metadata.lifecycle) === null || _b === void 0 ? void 0 : _b.rule + : []; + this.setMetadata({ + lifecycle: { rule: currentLifecycleRules.concat(rules) }, + }, options, callback); + }); } - } - - pos += (pos >= 0) * this._bufpos - - // Lookbehind buffer is now empty. We only need to check if the - // needle is in the haystack. - if (data.indexOf(needle, pos) !== -1) { - pos = data.indexOf(needle, pos) - ++this.matches - if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } - - return (this._bufpos = pos + needleLength) - } else { - pos = len - needleLength - } - - // There was no match. If there's trailing haystack data that we cannot - // match yet using the Boyer-Moore-Horspool algorithm (because the trailing - // data is less than the needle size) then match using a modified - // algorithm that starts matching from the beginning instead of the end. - // Whatever trailing data is left after running this algorithm is added to - // the lookbehind buffer. - while ( - pos < len && - ( - data[pos] !== needle[0] || - ( - (Buffer.compare( - data.subarray(pos, pos + len - pos), - needle.subarray(0, len - pos) - ) !== 0) - ) - ) - ) { - ++pos - } - if (pos < len) { - data.copy(this._lookbehind, 0, pos, pos + (len - pos)) - this._lookbehind_size = len - pos - } - - // Everything until pos is guaranteed not to contain needle data. - if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } - - this._bufpos = len - return len -} - -SBMH.prototype._sbmh_lookup_char = function (data, pos) { - return (pos < 0) - ? this._lookbehind[this._lookbehind_size + pos] - : data[pos] -} - -SBMH.prototype._sbmh_memcmp = function (data, pos, len) { - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } - } - return true -} - -module.exports = SBMH - - -/***/ }), - -/***/ 50727: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const WritableStream = (__nccwpck_require__(84492).Writable) -const { inherits } = __nccwpck_require__(47261) -const Dicer = __nccwpck_require__(92960) - -const MultipartParser = __nccwpck_require__(32183) -const UrlencodedParser = __nccwpck_require__(78306) -const parseParams = __nccwpck_require__(31854) - -function Busboy (opts) { - if (!(this instanceof Busboy)) { return new Busboy(opts) } - - if (typeof opts !== 'object') { - throw new TypeError('Busboy expected an options-Object.') - } - if (typeof opts.headers !== 'object') { - throw new TypeError('Busboy expected an options-Object with headers-attribute.') - } - if (typeof opts.headers['content-type'] !== 'string') { - throw new TypeError('Missing Content-Type-header.') - } - - const { - headers, - ...streamOptions - } = opts - - this.opts = { - autoDestroy: false, - ...streamOptions - } - WritableStream.call(this, this.opts) - - this._done = false - this._parser = this.getParserByHeaders(headers) - this._finished = false -} -inherits(Busboy, WritableStream) - -Busboy.prototype.emit = function (ev) { - if (ev === 'finish') { - if (!this._done) { - this._parser?.end() - return - } else if (this._finished) { - return + /** + * @typedef {object} CombineOptions + * @property {string} [kmsKeyName] Resource name of the Cloud KMS key, of + * the form + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, + * that will be used to encrypt the object. Overwrites the object + * metadata's `kms_key_name` value, if any. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @callback CombineCallback + * @param {?Error} err Request error, if any. + * @param {File} newFile The new {@link File}. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {array} CombineResponse + * @property {File} 0 The new {@link File}. + * @property {object} 1 The full API response. + */ + /** + * Combine multiple files into one new file. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/compose| Objects: compose API Documentation} + * + * @throws {Error} if a non-array is provided as sources argument. + * @throws {Error} if no sources are provided. + * @throws {Error} if no destination is provided. + * + * @param {string[]|File[]} sources The source files that will be + * combined. + * @param {string|File} destination The file you would like the + * source files combined into. + * @param {CombineOptions} [options] Configuration options. + * @param {string} [options.kmsKeyName] Resource name of the Cloud KMS key, of + * the form + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, + * that will be used to encrypt the object. Overwrites the object + * metadata's `kms_key_name` value, if any. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + + * @param {CombineCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const logBucket = storage.bucket('log-bucket'); + * + * const sources = [ + * logBucket.file('2013-logs.txt'), + * logBucket.file('2014-logs.txt') + * ]; + * + * const allLogs = logBucket.file('all-logs.txt'); + * + * logBucket.combine(sources, allLogs, function(err, newFile, apiResponse) { + * // newFile === allLogs + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * logBucket.combine(sources, allLogs).then(function(data) { + * const newFile = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + combine(sources, destination, optionsOrCallback, callback) { + var _a; + if (!Array.isArray(sources) || sources.length === 0) { + throw new Error(BucketExceptionMessages.PROVIDE_SOURCE_FILE); + } + if (!destination) { + throw new Error(BucketExceptionMessages.DESTINATION_FILE_NOT_SPECIFIED); + } + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, // Not relevant but param is required + AvailableServiceObjectMethods.setMetadata, // Same as above + options); + const convertToFile = (file) => { + if (file instanceof file_js_1.File) { + return file; + } + return this.file(file); + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + sources = sources.map(convertToFile); + const destinationFile = convertToFile(destination); + callback = callback || index_js_1.util.noop; + if (!destinationFile.metadata.contentType) { + const destinationContentType = mime_1.default.getType(destinationFile.name) || undefined; + if (destinationContentType) { + destinationFile.metadata.contentType = destinationContentType; + } + } + let maxRetries = this.storage.retryOptions.maxRetries; + if ((((_a = destinationFile === null || destinationFile === void 0 ? void 0 : destinationFile.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === + undefined && + options.ifGenerationMatch === undefined && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + maxRetries = 0; + } + if (options.ifGenerationMatch === undefined) { + Object.assign(options, destinationFile.instancePreconditionOpts, options); + } + // Make the request from the destination File object. + destinationFile.request({ + method: 'POST', + uri: '/compose', + maxRetries, + json: { + destination: { + contentType: destinationFile.metadata.contentType, + contentEncoding: destinationFile.metadata.contentEncoding, + }, + sourceObjects: sources.map(source => { + const sourceObject = { + name: source.name, + }; + if (source.metadata && source.metadata.generation) { + sourceObject.generation = parseInt(source.metadata.generation.toString()); + } + return sourceObject; + }), + }, + qs: options, + }, (err, resp) => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + if (err) { + callback(err, null, resp); + return; + } + callback(null, destinationFile, resp); + }); } - this._finished = true - } - WritableStream.prototype.emit.apply(this, arguments) -} - -Busboy.prototype.getParserByHeaders = function (headers) { - const parsed = parseParams(headers['content-type']) - - const cfg = { - defCharset: this.opts.defCharset, - fileHwm: this.opts.fileHwm, - headers, - highWaterMark: this.opts.highWaterMark, - isPartAFile: this.opts.isPartAFile, - limits: this.opts.limits, - parsedConType: parsed, - preservePath: this.opts.preservePath - } - - if (MultipartParser.detect.test(parsed[0])) { - return new MultipartParser(this, cfg) - } - if (UrlencodedParser.detect.test(parsed[0])) { - return new UrlencodedParser(this, cfg) - } - throw new Error('Unsupported Content-Type.') -} - -Busboy.prototype._write = function (chunk, encoding, cb) { - this._parser.write(chunk, cb) -} - -module.exports = Busboy -module.exports["default"] = Busboy -module.exports.Busboy = Busboy - -module.exports.Dicer = Dicer - - -/***/ }), - -/***/ 32183: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// TODO: -// * support 1 nested multipart level -// (see second multipart example here: -// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) -// * support limits.fieldNameSize -// -- this will require modifications to utils.parseParams - -const { Readable } = __nccwpck_require__(84492) -const { inherits } = __nccwpck_require__(47261) - -const Dicer = __nccwpck_require__(92960) - -const parseParams = __nccwpck_require__(31854) -const decodeText = __nccwpck_require__(84619) -const basename = __nccwpck_require__(48647) -const getLimit = __nccwpck_require__(21467) - -const RE_BOUNDARY = /^boundary$/i -const RE_FIELD = /^form-data$/i -const RE_CHARSET = /^charset$/i -const RE_FILENAME = /^filename$/i -const RE_NAME = /^name$/i - -Multipart.detect = /^multipart\/form-data/i -function Multipart (boy, cfg) { - let i - let len - const self = this - let boundary - const limits = cfg.limits - const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) - const parsedConType = cfg.parsedConType || [] - const defCharset = cfg.defCharset || 'utf8' - const preservePath = cfg.preservePath - const fileOpts = { highWaterMark: cfg.fileHwm } - - for (i = 0, len = parsedConType.length; i < len; ++i) { - if (Array.isArray(parsedConType[i]) && - RE_BOUNDARY.test(parsedConType[i][0])) { - boundary = parsedConType[i][1] - break + /** + * See a {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll request body}. + * + * @typedef {object} CreateChannelConfig + * @property {string} address The address where notifications are + * delivered for this channel. + * @property {string} [delimiter] Returns results in a directory-like mode. + * @property {number} [maxResults] Maximum number of `items` plus `prefixes` + * to return in a single page of responses. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @property {string} [prefix] Filter results to objects whose names begin + * with this prefix. + * @property {string} [projection=noAcl] Set of properties to return. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {boolean} [versions=false] If `true`, lists all versions of an object + * as distinct results. + */ + /** + * @typedef {object} CreateChannelOptions + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @typedef {array} CreateChannelResponse + * @property {Channel} 0 The new {@link Channel}. + * @property {object} 1 The full API response. + */ + /** + * @callback CreateChannelCallback + * @param {?Error} err Request error, if any. + * @param {Channel} channel The new {@link Channel}. + * @param {object} apiResponse The full API response. + */ + /** + * Create a channel that will be notified when objects in this bucket changes. + * + * @throws {Error} If an ID is not provided. + * @throws {Error} If an address is not provided. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll API Documentation} + * + * @param {string} id The ID of the channel to create. + * @param {CreateChannelConfig} config Configuration for creating channel. + * @param {string} config.address The address where notifications are + * delivered for this channel. + * @param {string} [config.delimiter] Returns results in a directory-like mode. + * @param {number} [config.maxResults] Maximum number of `items` plus `prefixes` + * to return in a single page of responses. + * @param {string} [config.pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @param {string} [config.prefix] Filter results to objects whose names begin + * with this prefix. + * @param {string} [config.projection=noAcl] Set of properties to return. + * @param {string} [config.userProject] The ID of the project which will be + * billed for the request. + * @param {boolean} [config.versions=false] If `true`, lists all versions of an object + * as distinct results. + * @param {CreateChannelOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {CreateChannelCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * const id = 'new-channel-id'; + * + * const config = { + * address: 'https://...' + * }; + * + * bucket.createChannel(id, config, function(err, channel, apiResponse) { + * if (!err) { + * // Channel created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.createChannel(id, config).then(function(data) { + * const channel = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + createChannel(id, config, optionsOrCallback, callback) { + if (typeof id !== 'string') { + throw new Error(BucketExceptionMessages.CHANNEL_ID_REQUIRED); + } + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.request({ + method: 'POST', + uri: '/o/watch', + json: Object.assign({ + id, + type: 'web_hook', + }, config), + qs: options, + }, (err, apiResponse) => { + if (err) { + callback(err, null, apiResponse); + return; + } + const resourceId = apiResponse.resourceId; + const channel = this.storage.channel(id, resourceId); + channel.metadata = apiResponse; + callback(null, channel, apiResponse); + }); } - } - - function checkFinished () { - if (nends === 0 && finished && !boy._done) { - finished = false - self.end() + /** + * Metadata to set for the Notification. + * + * @typedef {object} CreateNotificationOptions + * @property {object} [customAttributes] An optional list of additional + * attributes to attach to each Cloud PubSub message published for this + * notification subscription. + * @property {string[]} [eventTypes] If present, only send notifications about + * listed event types. If empty, sent notifications for all event types. + * @property {string} [objectNamePrefix] If present, only apply this + * notification configuration to object names that begin with this prefix. + * @property {string} [payloadFormat] The desired content of the Payload. + * Defaults to `JSON_API_V1`. + * + * Acceptable values are: + * - `JSON_API_V1` + * + * - `NONE` + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @callback CreateNotificationCallback + * @param {?Error} err Request error, if any. + * @param {Notification} notification The new {@link Notification}. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {array} CreateNotificationResponse + * @property {Notification} 0 The new {@link Notification}. + * @property {object} 1 The full API response. + */ + /** + * Creates a notification subscription for the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} + * + * @param {Topic|string} topic The Cloud PubSub topic to which this + * subscription publishes. If the project ID is omitted, the current + * project ID will be used. + * + * Acceptable formats are: + * - `projects/grape-spaceship-123/topics/my-topic` + * + * - `my-topic` + * @param {CreateNotificationOptions} [options] Metadata to set for the + * notification. + * @param {object} [options.customAttributes] An optional list of additional + * attributes to attach to each Cloud PubSub message published for this + * notification subscription. + * @param {string[]} [options.eventTypes] If present, only send notifications about + * listed event types. If empty, sent notifications for all event types. + * @param {string} [options.objectNamePrefix] If present, only apply this + * notification configuration to object names that begin with this prefix. + * @param {string} [options.payloadFormat] The desired content of the Payload. + * Defaults to `JSON_API_V1`. + * + * Acceptable values are: + * - `JSON_API_V1` + * + * - `NONE` + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {CreateNotificationCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a valid topic is not provided. + * @see Notification#create + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const callback = function(err, notification, apiResponse) { + * if (!err) { + * // The notification was created successfully. + * } + * }; + * + * myBucket.createNotification('my-topic', callback); + * + * //- + * // Configure the notification by providing Notification metadata. + * //- + * const metadata = { + * objectNamePrefix: 'prefix-' + * }; + * + * myBucket.createNotification('my-topic', metadata, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * myBucket.createNotification('my-topic').then(function(data) { + * const notification = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/createNotification.js + * region_tag:storage_create_bucket_notifications + * Another example: + */ + createNotification(topic, optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + const topicIsObject = topic !== null && typeof topic === 'object'; + if (topicIsObject && index_js_1.util.isCustomType(topic, 'pubsub/topic')) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + topic = topic.name; + } + if (typeof topic !== 'string') { + throw new Error(BucketExceptionMessages.TOPIC_NAME_REQUIRED); + } + const body = Object.assign({ topic }, options); + if (body.topic.indexOf('projects') !== 0) { + body.topic = 'projects/{{projectId}}/topics/' + body.topic; + } + body.topic = `//pubsub.${this.storage.universeDomain}/` + body.topic; + if (!body.payloadFormat) { + body.payloadFormat = 'JSON_API_V1'; + } + const query = {}; + if (body.userProject) { + query.userProject = body.userProject; + delete body.userProject; + } + this.request({ + method: 'POST', + uri: '/notificationConfigs', + json: (0, util_js_1.convertObjKeysToSnakeCase)(body), + qs: query, + maxRetries: 0, //explicitly set this value since this is a non-idempotent function + }, (err, apiResponse) => { + if (err) { + callback(err, null, apiResponse); + return; + } + const notification = this.notification(apiResponse.id); + notification.metadata = apiResponse; + callback(null, notification, apiResponse); + }); } - } - - if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } - - const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) - const filesLimit = getLimit(limits, 'files', Infinity) - const fieldsLimit = getLimit(limits, 'fields', Infinity) - const partsLimit = getLimit(limits, 'parts', Infinity) - const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) - const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) - - let nfiles = 0 - let nfields = 0 - let nends = 0 - let curFile - let curField - let finished = false - - this._needDrain = false - this._pause = false - this._cb = undefined - this._nparts = 0 - this._boy = boy - - const parserCfg = { - boundary, - maxHeaderPairs: headerPairsLimit, - maxHeaderSize: headerSizeLimit, - partHwm: fileOpts.highWaterMark, - highWaterMark: cfg.highWaterMark - } - - this.parser = new Dicer(parserCfg) - this.parser.on('drain', function () { - self._needDrain = false - if (self._cb && !self._pause) { - const cb = self._cb - self._cb = undefined - cb() + /** + * @typedef {object} DeleteFilesOptions Query object. See {@link Bucket#getFiles} + * for all of the supported properties. + * @property {boolean} [force] Suppress errors until all files have been + * processed. + */ + /** + * @callback DeleteFilesCallback + * @param {?Error|?Error[]} err Request error, if any, or array of errors from + * files that were not able to be deleted. + * @param {object} [apiResponse] The full API response. + */ + /** + * Iterate over the bucket's files, calling `file.delete()` on each. + * + * This is not an atomic request. A delete attempt will be + * made for each file individually. Any one can fail, in which case only a + * portion of the files you intended to be deleted would have. + * + * Operations are performed in parallel, up to 10 at once. The first error + * breaks the loop and will execute the provided callback with it. Specify + * `{ force: true }` to suppress the errors until all files have had a chance + * to be processed. + * + * File preconditions cannot be passed to this function. It will not retry unless + * the idempotency strategy is set to retry always. + * + * The `query` object passed as the first argument will also be passed to + * {@link Bucket#getFiles}. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} + * + * @param {DeleteFilesOptions} [query] Query object. See {@link Bucket#getFiles} + * @param {boolean} [query.force] Suppress errors until all files have been + * processed. + * @param {DeleteFilesCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Delete all of the files in the bucket. + * //- + * bucket.deleteFiles(function(err) {}); + * + * //- + * // By default, if a file cannot be deleted, this method will stop deleting + * // files from your bucket. You can override this setting with `force: + * // true`. + * //- + * bucket.deleteFiles({ + * force: true + * }, function(errors) { + * // `errors`: + * // Array of errors if any occurred, otherwise null. + * }); + * + * //- + * // The first argument to this method acts as a query to + * // {@link Bucket#getFiles}. As an example, you can delete files + * // which match a prefix. + * //- + * bucket.deleteFiles({ + * prefix: 'images/' + * }, function(err) { + * if (!err) { + * // All files in the `images` directory have been deleted. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.deleteFiles().then(function() {}); + * ``` + */ + deleteFiles(queryOrCallback, callback) { + let query = {}; + if (typeof queryOrCallback === 'function') { + callback = queryOrCallback; + } + else if (queryOrCallback) { + query = queryOrCallback; + } + const MAX_PARALLEL_LIMIT = 10; + const MAX_QUEUE_SIZE = 1000; + const errors = []; + const deleteFile = (file) => { + return file.delete(query).catch(err => { + if (!query.force) { + throw err; + } + errors.push(err); + }); + }; + (async () => { + try { + let promises = []; + const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); + const filesStream = this.getFilesStream(query); + for await (const curFile of filesStream) { + if (promises.length >= MAX_QUEUE_SIZE) { + await Promise.all(promises); + promises = []; + } + promises.push(limit(() => deleteFile(curFile)).catch(e => { + filesStream.destroy(); + throw e; + })); + } + await Promise.all(promises); + callback(errors.length > 0 ? errors : null); + } + catch (e) { + callback(e); + return; + } + })(); } - }).on('part', function onPart (part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener('part', onPart) - self.parser.on('part', skipPart) - boy.hitPartsLimit = true - boy.emit('partsLimit') - return skipPart(part) + /** + * @deprecated + * @typedef {array} DeleteLabelsResponse + * @property {object} 0 The full API response. + */ + /** + * @deprecated + * @callback DeleteLabelsCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata Bucket's metadata. + */ + /** + * @deprecated Use setMetadata directly + * Delete one or more labels from this bucket. + * + * @param {string|string[]} [labels] The labels to delete. If no labels are + * provided, all of the labels are removed. + * @param {DeleteLabelsCallback} [callback] Callback function. + * @param {DeleteLabelsOptions} [options] Options, including precondition options + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Delete all of the labels from this bucket. + * //- + * bucket.deleteLabels(function(err, apiResponse) {}); + * + * //- + * // Delete a single label. + * //- + * bucket.deleteLabels('labelone', function(err, apiResponse) {}); + * + * //- + * // Delete a specific set of labels. + * //- + * bucket.deleteLabels([ + * 'labelone', + * 'labeltwo' + * ], function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.deleteLabels().then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + deleteLabels(labelsOrCallbackOrOptions, optionsOrCallback, callback) { + let labels = new Array(); + let options = {}; + if (typeof labelsOrCallbackOrOptions === 'function') { + callback = labelsOrCallbackOrOptions; + } + else if (typeof labelsOrCallbackOrOptions === 'string') { + labels = [labelsOrCallbackOrOptions]; + } + else if (Array.isArray(labelsOrCallbackOrOptions)) { + labels = labelsOrCallbackOrOptions; + } + else if (labelsOrCallbackOrOptions) { + options = labelsOrCallbackOrOptions; + } + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + const deleteLabels = (labels) => { + const nullLabelMap = labels.reduce((nullLabelMap, labelKey) => { + nullLabelMap[labelKey] = null; + return nullLabelMap; + }, {}); + if ((options === null || options === void 0 ? void 0 : options.ifMetagenerationMatch) !== undefined) { + this.setLabels(nullLabelMap, options, callback); + } + else { + this.setLabels(nullLabelMap, callback); + } + }; + if (labels.length === 0) { + this.getLabels((err, labels) => { + if (err) { + callback(err); + return; + } + deleteLabels(Object.keys(labels)); + }); + } + else { + deleteLabels(labels); + } } - - // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let - // us emit 'end' early since we know the part has ended if we are already - // seeing the next part - if (curField) { - const field = curField - field.emit('end') - field.removeAllListeners('end') + /** + * @typedef {array} DisableRequesterPaysResponse + * @property {object} 0 The full API response. + */ + /** + * @callback DisableRequesterPaysCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + *

+ * Early Access Testers Only + *

+ * This feature is not yet widely-available. + *

+ *
+ * + * Disable `requesterPays` functionality from this bucket. + * + * @param {DisableRequesterPaysCallback} [callback] Callback function. + * @param {DisableRequesterPaysOptions} [options] Options, including precondition options + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.disableRequesterPays(function(err, apiResponse) { + * if (!err) { + * // requesterPays functionality disabled successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.disableRequesterPays().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/requesterPays.js + * region_tag:storage_disable_requester_pays + * Example of disabling requester pays: + */ + disableRequesterPays(optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.setMetadata({ + billing: { + requesterPays: false, + }, + }, options, callback); } - - part.on('header', function (header) { - let contype - let fieldname - let parsed - let charset - let encoding - let filename - let nsize = 0 - - if (header['content-type']) { - parsed = parseParams(header['content-type'][0]) - if (parsed[0]) { - contype = parsed[0].toLowerCase() - for (i = 0, len = parsed.length; i < len; ++i) { - if (RE_CHARSET.test(parsed[i][0])) { - charset = parsed[i][1].toLowerCase() - break - } - } + /** + * Configuration object for enabling logging. + * + * @typedef {object} EnableLoggingOptions + * @property {string|Bucket} [bucket] The bucket for the log entries. By + * default, the current bucket is used. + * @property {string} prefix A unique prefix for log object names. + */ + /** + * Enable logging functionality for this bucket. This will make two API + * requests, first to grant Cloud Storage WRITE permission to the bucket, then + * to set the appropriate configuration on the Bucket's metadata. + * + * @param {EnableLoggingOptions} config Configuration options. + * @param {string|Bucket} [config.bucket] The bucket for the log entries. By + * default, the current bucket is used. + * @param {string} config.prefix A unique prefix for log object names. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * const config = { + * prefix: 'log' + * }; + * + * bucket.enableLogging(config, function(err, apiResponse) { + * if (!err) { + * // Logging functionality enabled successfully. + * } + * }); + * + * ``` + * @example + * Optionally, provide a destination bucket. + * ``` + * const config = { + * prefix: 'log', + * bucket: 'destination-bucket' + * }; + * + * bucket.enableLogging(config, function(err, apiResponse) {}); + * ``` + * + * @example + * If the callback is omitted, we'll return a Promise. + * ``` + * bucket.enableLogging(config).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + enableLogging(config, callback) { + if (!config || + typeof config === 'function' || + typeof config.prefix === 'undefined') { + throw new Error(BucketExceptionMessages.CONFIGURATION_OBJECT_PREFIX_REQUIRED); } - } - - if (contype === undefined) { contype = 'text/plain' } - if (charset === undefined) { charset = defCharset } - - if (header['content-disposition']) { - parsed = parseParams(header['content-disposition'][0]) - if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } - for (i = 0, len = parsed.length; i < len; ++i) { - if (RE_NAME.test(parsed[i][0])) { - fieldname = parsed[i][1] - } else if (RE_FILENAME.test(parsed[i][0])) { - filename = parsed[i][1] - if (!preservePath) { filename = basename(filename) } - } + let logBucket = this.id; + if (config.bucket && config.bucket instanceof Bucket) { + logBucket = config.bucket.id; } - } else { return skipPart(part) } - - if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } - - let onData, - onEnd - - if (isPartAFile(fieldname, contype, filename)) { - // file/binary field - if (nfiles === filesLimit) { - if (!boy.hitFilesLimit) { - boy.hitFilesLimit = true - boy.emit('filesLimit') - } - return skipPart(part) + else if (config.bucket && typeof config.bucket === 'string') { + logBucket = config.bucket; } - - ++nfiles - - if (!boy._events.file) { - self.parser._ignore() - return + const options = {}; + if (config === null || config === void 0 ? void 0 : config.ifMetagenerationMatch) { + options.ifMetagenerationMatch = config.ifMetagenerationMatch; } - - ++nends - const file = new FileStream(fileOpts) - curFile = file - file.on('end', function () { - --nends - self._pause = false - checkFinished() - if (self._cb && !self._needDrain) { - const cb = self._cb - self._cb = undefined - cb() - } - }) - file._read = function (n) { - if (!self._pause) { return } - self._pause = false - if (self._cb && !self._needDrain) { - const cb = self._cb - self._cb = undefined - cb() - } + if (config === null || config === void 0 ? void 0 : config.ifMetagenerationNotMatch) { + options.ifMetagenerationNotMatch = config.ifMetagenerationNotMatch; } - boy.emit('file', fieldname, file, filename, encoding, contype) - - onData = function (data) { - if ((nsize += data.length) > fileSizeLimit) { - const extralen = fileSizeLimit - nsize + data.length - if (extralen > 0) { file.push(data.slice(0, extralen)) } - file.truncated = true - file.bytesRead = fileSizeLimit - part.removeAllListeners('data') - file.emit('limit') - return - } else if (!file.push(data)) { self._pause = true } - - file.bytesRead = nsize + (async () => { + try { + const [policy] = await this.iam.getPolicy(); + policy.bindings.push({ + members: ['group:cloud-storage-analytics@google.com'], + role: 'roles/storage.objectCreator', + }); + await this.iam.setPolicy(policy); + this.setMetadata({ + logging: { + logBucket, + logObjectPrefix: config.prefix, + }, + }, options, callback); + } + catch (e) { + callback(e); + return; + } + })(); + } + /** + * @typedef {array} EnableRequesterPaysResponse + * @property {object} 0 The full API response. + */ + /** + * @callback EnableRequesterPaysCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + *
+ * Early Access Testers Only + *

+ * This feature is not yet widely-available. + *

+ *
+ * + * Enable `requesterPays` functionality for this bucket. This enables you, the + * bucket owner, to have the requesting user assume the charges for the access + * to your bucket and its contents. + * + * @param {EnableRequesterPaysCallback | EnableRequesterPaysOptions} [optionsOrCallback] + * Callback function or precondition options. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.enableRequesterPays(function(err, apiResponse) { + * if (!err) { + * // requesterPays functionality enabled successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.enableRequesterPays().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/requesterPays.js + * region_tag:storage_enable_requester_pays + * Example of enabling requester pays: + */ + enableRequesterPays(optionsOrCallback, cb) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + cb = optionsOrCallback; } - - onEnd = function () { - curFile = undefined - file.push(null) + else if (optionsOrCallback) { + options = optionsOrCallback; } - } else { - // non-file field - if (nfields === fieldsLimit) { - if (!boy.hitFieldsLimit) { - boy.hitFieldsLimit = true - boy.emit('fieldsLimit') - } - return skipPart(part) + this.setMetadata({ + billing: { + requesterPays: true, + }, + }, options, cb); + } + /** + * Create a {@link File} object. See {@link File} to see how to handle + * the different use cases you may have. + * + * @param {string} name The name of the file in this bucket. + * @param {FileOptions} [options] Configuration options. + * @param {string|number} [options.generation] Only use a specific revision of + * this file. + * @param {string} [options.encryptionKey] A custom encryption key. See + * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. + * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will + * be used to encrypt the object. Must be in the format: + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. + * KMS key ring must use the same location as the bucket. + * @param {string} [options.userProject] The ID of the project which will be + * billed for all requests made from File object. + * @returns {File} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * const file = bucket.file('my-existing-file.png'); + * ``` + */ + file(name, options) { + if (!name) { + throw Error(BucketExceptionMessages.SPECIFY_FILE_NAME); } - - ++nfields - ++nends - let buffer = '' - let truncated = false - curField = part - - onData = function (data) { - if ((nsize += data.length) > fieldSizeLimit) { - const extralen = (fieldSizeLimit - (nsize - data.length)) - buffer += data.toString('binary', 0, extralen) - truncated = true - part.removeAllListeners('data') - } else { buffer += data.toString('binary') } + return new file_js_1.File(this, name, options); + } + /** + * @typedef {array} GetFilesResponse + * @property {File[]} 0 Array of {@link File} instances. + * @param {object} nextQuery 1 A query object to receive more results. + * @param {object} apiResponse 2 The full API response. + */ + /** + * @callback GetFilesCallback + * @param {?Error} err Request error, if any. + * @param {File[]} files Array of {@link File} instances. + * @param {object} nextQuery A query object to receive more results. + * @param {object} apiResponse The full API response. + */ + /** + * Query object for listing files. + * + * @typedef {object} GetFilesOptions + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {string} [delimiter] Results will contain only objects whose + * names, aside from the prefix, do not contain delimiter. Objects whose + * names, aside from the prefix, contain delimiter will have their name + * truncated after the delimiter, returned in `apiResponse.prefixes`. + * Duplicate prefixes are omitted. + * @property {string} [endOffset] Filter results to objects whose names are + * lexicographically before endOffset. If startOffset is also set, the objects + * listed have names between startOffset (inclusive) and endOffset (exclusive). + * @property {boolean} [includeFoldersAsPrefixes] If true, includes folders and + * managed folders in the set of prefixes returned by the query. Only applicable if + * delimiter is set to / and autoPaginate is set to false. + * See: https://cloud.google.com/storage/docs/managed-folders + * @property {boolean} [includeTrailingDelimiter] If true, objects that end in + * exactly one instance of delimiter have their metadata included in items[] + * in addition to the relevant part of the object name appearing in prefixes[]. + * @property {string} [prefix] Filter results to objects whose names begin + * with this prefix. + * @property {string} [matchGlob] A glob pattern used to filter results, + * for example foo*bar + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return per call. + * Note: By default will handle pagination automatically + * if more than 1 page worth of results are requested per call. + * When `autoPaginate` is set to `false` the smaller of `maxResults` + * or 1 page of results will be returned per call. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @property {boolean} [softDeleted] If true, only soft-deleted object versions will be + * listed as distinct results in order of generation number. Note `soft_deleted` and + * `versions` cannot be set to true simultaneously. + * @property {string} [startOffset] Filter results to objects whose names are + * lexicographically equal to or after startOffset. If endOffset is also set, + * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {boolean} [versions] If true, returns File objects scoped to + * their versions. + */ + /** + * Get {@link File} objects for the files currently in the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/list| Objects: list API Documentation} + * + * @param {GetFilesOptions} [query] Query object for listing files. + * @param {boolean} [query.autoPaginate=true] Have pagination handled + * automatically. + * @param {string} [query.delimiter] Results will contain only objects whose + * names, aside from the prefix, do not contain delimiter. Objects whose + * names, aside from the prefix, contain delimiter will have their name + * truncated after the delimiter, returned in `apiResponse.prefixes`. + * Duplicate prefixes are omitted. + * @param {string} [query.endOffset] Filter results to objects whose names are + * lexicographically before endOffset. If startOffset is also set, the objects + * listed have names between startOffset (inclusive) and endOffset (exclusive). + * @param {boolean} [query.includeFoldersAsPrefixes] If true, includes folders and + * managed folders in the set of prefixes returned by the query. Only applicable if + * delimiter is set to / and autoPaginate is set to false. + * See: https://cloud.google.com/storage/docs/managed-folders + * @param {boolean} [query.includeTrailingDelimiter] If true, objects that end in + * exactly one instance of delimiter have their metadata included in items[] + * in addition to the relevant part of the object name appearing in prefixes[]. + * @param {string} [query.prefix] Filter results to objects whose names begin + * with this prefix. + * @param {number} [query.maxApiCalls] Maximum number of API calls to make. + * @param {number} [query.maxResults] Maximum number of items plus prefixes to + * return per call. + * Note: By default will handle pagination automatically + * if more than 1 page worth of results are requested per call. + * When `autoPaginate` is set to `false` the smaller of `maxResults` + * or 1 page of results will be returned per call. + * @param {string} [query.pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @param {boolean} [query.softDeleted] If true, only soft-deleted object versions will be + * listed as distinct results in order of generation number. Note `soft_deleted` and + * `versions` cannot be set to true simultaneously. + * @param {string} [query.startOffset] Filter results to objects whose names are + * lexicographically equal to or after startOffset. If endOffset is also set, + * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). + * @param {string} [query.userProject] The ID of the project which will be + * billed for the request. + * @param {boolean} [query.versions] If true, returns File objects scoped to + * their versions. + * @param {GetFilesCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getFiles(function(err, files) { + * if (!err) { + * // files is an array of File objects. + * } + * }); + * + * //- + * // If your bucket has versioning enabled, you can get all of your files + * // scoped to their generation. + * //- + * bucket.getFiles({ + * versions: true + * }, function(err, files) { + * // Each file is scoped to its generation. + * }); + * + * //- + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. + * //- + * const callback = function(err, files, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * bucket.getFiles(nextQuery, callback); + * } + * + * // The `metadata` property is populated for you with the metadata at the + * // time of fetching. + * files[0].metadata; + * + * // However, in cases where you are concerned the metadata could have + * // changed, use the `getMetadata` method. + * files[0].getMetadata(function(err, metadata) {}); + * }; + * + * bucket.getFiles({ + * autoPaginate: false + * }, callback); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getFiles().then(function(data) { + * const files = data[0]; + * }); + * + * ``` + * @example + *
Simulating a File System

With `autoPaginate: false`, it's possible to iterate over files which incorporate a common structure using a delimiter.

Consider the following remote objects:

  1. "a"
  2. "a/b/c/d"
  3. "b/d/e"

Using a delimiter of `/` will return a single file, "a".

`apiResponse.prefixes` will return the "sub-directories" that were found:

  1. "a/"
  2. "b/"
+ * ``` + * bucket.getFiles({ + * autoPaginate: false, + * delimiter: '/' + * }, function(err, files, nextQuery, apiResponse) { + * // files = [ + * // {File} // File object for file "a" + * // ] + * + * // apiResponse.prefixes = [ + * // 'a/', + * // 'b/' + * // ] + * }); + * ``` + * + * @example + * Using prefixes, it's now possible to simulate a file system with follow-up requests. + * ``` + * bucket.getFiles({ + * autoPaginate: false, + * delimiter: '/', + * prefix: 'a/' + * }, function(err, files, nextQuery, apiResponse) { + * // No files found within "directory" a. + * // files = [] + * + * // However, a "sub-directory" was found. + * // This prefix can be used to continue traversing the "file system". + * // apiResponse.prefixes = [ + * // 'a/b/' + * // ] + * }); + * ``` + * + * @example include:samples/files.js + * region_tag:storage_list_files + * Another example: + * + * @example include:samples/files.js + * region_tag:storage_list_files_with_prefix + * Example of listing files, filtered by a prefix: + */ + getFiles(queryOrCallback, callback) { + let query = typeof queryOrCallback === 'object' ? queryOrCallback : {}; + if (!callback) { + callback = queryOrCallback; } - - onEnd = function () { - curField = undefined - if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } - boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) - --nends - checkFinished() + query = Object.assign({}, query); + if (query.fields && + query.autoPaginate && + !query.fields.includes('nextPageToken')) { + query.fields = `${query.fields},nextPageToken`; } - } - - /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become - broken. Streams2/streams3 is a huge black box of confusion, but - somehow overriding the sync state seems to fix things again (and still - seems to work for previous node versions). - */ - part._readableState.sync = false - - part.on('data', onData) - part.on('end', onEnd) - }).on('error', function (err) { - if (curFile) { curFile.emit('error', err) } - }) - }).on('error', function (err) { - boy.emit('error', err) - }).on('finish', function () { - finished = true - checkFinished() - }) -} - -Multipart.prototype.write = function (chunk, cb) { - const r = this.parser.write(chunk) - if (r && !this._pause) { - cb() - } else { - this._needDrain = !r - this._cb = cb - } -} - -Multipart.prototype.end = function () { - const self = this - - if (self.parser.writable) { - self.parser.end() - } else if (!self._boy._done) { - process.nextTick(function () { - self._boy._done = true - self._boy.emit('finish') - }) - } -} - -function skipPart (part) { - part.resume() -} - -function FileStream (opts) { - Readable.call(this, opts) - - this.bytesRead = 0 - - this.truncated = false -} - -inherits(FileStream, Readable) - -FileStream.prototype._read = function (n) {} - -module.exports = Multipart - - -/***/ }), - -/***/ 78306: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Decoder = __nccwpck_require__(27100) -const decodeText = __nccwpck_require__(84619) -const getLimit = __nccwpck_require__(21467) - -const RE_CHARSET = /^charset$/i - -UrlEncoded.detect = /^application\/x-www-form-urlencoded/i -function UrlEncoded (boy, cfg) { - const limits = cfg.limits - const parsedConType = cfg.parsedConType - this.boy = boy - - this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) - this.fieldsLimit = getLimit(limits, 'fields', Infinity) - - let charset - for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var - if (Array.isArray(parsedConType[i]) && - RE_CHARSET.test(parsedConType[i][0])) { - charset = parsedConType[i][1].toLowerCase() - break + this.request({ + uri: '/o', + qs: query, + }, (err, resp) => { + if (err) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback(err, null, null, resp); + return; + } + const itemsArray = resp.items ? resp.items : []; + const files = itemsArray.map((file) => { + const options = {}; + if (query.fields) { + const fileInstance = file; + return fileInstance; + } + if (query.versions) { + options.generation = file.generation; + } + if (file.kmsKeyName) { + options.kmsKeyName = file.kmsKeyName; + } + const fileInstance = this.file(file.name, options); + fileInstance.metadata = file; + return fileInstance; + }); + let nextQuery = null; + if (resp.nextPageToken) { + nextQuery = Object.assign({}, query, { + pageToken: resp.nextPageToken, + }); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + callback(null, files, nextQuery, resp); + }); } - } - - if (charset === undefined) { charset = cfg.defCharset || 'utf8' } - - this.decoder = new Decoder() - this.charset = charset - this._fields = 0 - this._state = 'key' - this._checkingBytes = true - this._bytesKey = 0 - this._bytesVal = 0 - this._key = '' - this._val = '' - this._keyTrunc = false - this._valTrunc = false - this._hitLimit = false -} - -UrlEncoded.prototype.write = function (data, cb) { - if (this._fields === this.fieldsLimit) { - if (!this.boy.hitFieldsLimit) { - this.boy.hitFieldsLimit = true - this.boy.emit('fieldsLimit') + /** + * @deprecated + * @typedef {object} GetLabelsOptions Configuration options for Bucket#getLabels(). + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @deprecated + * @typedef {array} GetLabelsResponse + * @property {object} 0 Object of labels currently set on this bucket. + */ + /** + * @deprecated + * @callback GetLabelsCallback + * @param {?Error} err Request error, if any. + * @param {object} labels Object of labels currently set on this bucket. + */ + /** + * @deprecated Use getMetadata directly. + * Get the labels currently set on this bucket. + * + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetLabelsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.getLabels(function(err, labels) { + * if (err) { + * // Error handling omitted. + * } + * + * // labels = { + * // label: 'labelValue', + * // ... + * // } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getLabels().then(function(data) { + * const labels = data[0]; + * }); + * ``` + */ + getLabels(optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.getMetadata(options, (err, metadata) => { + if (err) { + callback(err, null); + return; + } + callback(null, (metadata === null || metadata === void 0 ? void 0 : metadata.labels) || {}); + }); + } + /** + * @typedef {object} GetNotificationsOptions Configuration options for Bucket#getNotification(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @callback GetNotificationsCallback + * @param {?Error} err Request error, if any. + * @param {Notification[]} notifications Array of {@link Notification} + * instances. + * @param {object} apiResponse The full API response. + */ + /** + * @typedef {array} GetNotificationsResponse + * @property {Notification[]} 0 Array of {@link Notification} instances. + * @property {object} 1 The full API response. + */ + /** + * Retrieves a list of notification subscriptions for a given bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/list| Notifications: list} + * + * @param {GetNotificationsOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetNotificationsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * + * bucket.getNotifications(function(err, notifications, apiResponse) { + * if (!err) { + * // notifications is an array of Notification objects. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getNotifications().then(function(data) { + * const notifications = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/listNotifications.js + * region_tag:storage_list_bucket_notifications + * Another example: + */ + getNotifications(optionsOrCallback, callback) { + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = optionsOrCallback; + } + this.request({ + uri: '/notificationConfigs', + qs: options, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + const itemsArray = resp.items ? resp.items : []; + const notifications = itemsArray.map((notification) => { + const notificationInstance = this.notification(notification.id); + notificationInstance.metadata = notification; + return notificationInstance; + }); + callback(null, notifications, resp); + }); + } + /** + * @typedef {array} GetSignedUrlResponse + * @property {object} 0 The signed URL. + */ + /** + * @callback GetSignedUrlCallback + * @param {?Error} err Request error, if any. + * @param {object} url The signed URL. + */ + /** + * @typedef {object} GetBucketSignedUrlConfig + * @property {string} action Only listing objects within a bucket (HTTP: GET) is supported for bucket-level signed URLs. + * @property {*} expires A timestamp when this link will expire. Any value + * given is passed to `new Date()`. + * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. + * @property {string} [version='v2'] The signing version to use, either + * 'v2' or 'v4'. + * @property {boolean} [virtualHostedStyle=false] Use virtual hosted-style + * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style + * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. + * Currently defaults to `false` for path-style, although this may change in a + * future major-version release. + * @property {string} [cname] The cname for this bucket, i.e., + * "https://cdn.example.com". + * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} + * @property {object} [extensionHeaders] If these headers are used, the + * server will check to make sure that the client provides matching + * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} + * for the requirements of this feature, most notably: + * - The header name must be prefixed with `x-goog-` + * - The header name must be all lowercase + * + * Note: Multi-valued header passed as an array in the extensionHeaders + * object is converted into a string, delimited by `,` with + * no space. Requests made using the signed URL will need to + * delimit multi-valued headers using a single `,` as well, or + * else the server will report a mismatched signature. + * @property {object} [queryParams] Additional query parameters to include + * in the signed URL. + */ + /** + * Get a signed URL to allow limited time access to a bucket. + * + * In Google Cloud Platform environments, such as Cloud Functions and App + * Engine, you usually don't provide a `keyFilename` or `credentials` during + * instantiation. In those environments, we call the + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} + * to create a signed URL. That API requires either the + * `https://www.googleapis.com/auth/iam` or + * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are + * enabled. + * + * See {@link https://cloud.google.com/storage/docs/access-control/signed-urls| Signed URLs Reference} + * + * @throws {Error} if an expiration timestamp from the past is given. + * + * @param {GetBucketSignedUrlConfig} config Configuration object. + * @param {string} config.action Currently only supports "list" (HTTP: GET). + * @param {*} config.expires A timestamp when this link will expire. Any value + * given is passed to `new Date()`. + * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. + * @param {string} [config.version='v2'] The signing version to use, either + * 'v2' or 'v4'. + * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style + * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style + * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. + * Currently defaults to `false` for path-style, although this may change in a + * future major-version release. + * @param {string} [config.cname] The cname for this bucket, i.e., + * "https://cdn.example.com". + * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} + * @param {object} [config.extensionHeaders] If these headers are used, the + * server will check to make sure that the client provides matching + * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} + * for the requirements of this feature, most notably: + * - The header name must be prefixed with `x-goog-` + * - The header name must be all lowercase + * + * Note: Multi-valued header passed as an array in the extensionHeaders + * object is converted into a string, delimited by `,` with + * no space. Requests made using the signed URL will need to + * delimit multi-valued headers using a single `,` as well, or + * else the server will report a mismatched signature. + * @property {object} [config.queryParams] Additional query parameters to include + * in the signed URL. + * @param {GetSignedUrlCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * //- + * // Generate a URL that allows temporary access to list files in a bucket. + * //- + * const request = require('request'); + * + * const config = { + * action: 'list', + * expires: '03-17-2025' + * }; + * + * bucket.getSignedUrl(config, function(err, url) { + * if (err) { + * console.error(err); + * return; + * } + * + * // The bucket is now available to be listed from this URL. + * request(url, function(err, resp) { + * // resp.statusCode = 200 + * }); + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.getSignedUrl(config).then(function(data) { + * const url = data[0]; + * }); + * ``` + */ + getSignedUrl(cfg, callback) { + const method = BucketActionToHTTPMethod[cfg.action]; + const signConfig = { + method, + expires: cfg.expires, + version: cfg.version, + cname: cfg.cname, + extensionHeaders: cfg.extensionHeaders || {}, + queryParams: cfg.queryParams || {}, + host: cfg.host, + signingEndpoint: cfg.signingEndpoint, + }; + if (!this.signer) { + this.signer = new signer_js_1.URLSigner(this.storage.authClient, this, undefined, this.storage); + } + this.signer + .getSignedUrl(signConfig) + .then(signedUrl => callback(null, signedUrl), callback); } - return cb() - } - - let idxeq; let idxamp; let i; let p = 0; const len = data.length - - while (p < len) { - if (this._state === 'key') { - idxeq = idxamp = undefined - for (i = p; i < len; ++i) { - if (!this._checkingBytes) { ++p } - if (data[i] === 0x3D/* = */) { - idxeq = i - break - } else if (data[i] === 0x26/* & */) { - idxamp = i - break + /** + * @callback BucketLockCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. + */ + /** + * Lock a previously-defined retention policy. This will prevent changes to + * the policy. + * + * @throws {Error} if a metageneration is not provided. + * + * @param {number|string} metageneration The bucket's metageneration. This is + * accessible from calling {@link File#getMetadata}. + * @param {BucketLockCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * const metageneration = 2; + * + * bucket.lock(metageneration, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.lock(metageneration).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + lock(metageneration, callback) { + const metatype = typeof metageneration; + if (metatype !== 'number' && metatype !== 'string') { + throw new Error(BucketExceptionMessages.METAGENERATION_NOT_PROVIDED); } - if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { - this._hitLimit = true - break - } else if (this._checkingBytes) { ++this._bytesKey } - } - - if (idxeq !== undefined) { - // key with assignment - if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } - this._state = 'val' - - this._hitLimit = false - this._checkingBytes = true - this._val = '' - this._bytesVal = 0 - this._valTrunc = false - this.decoder.reset() - - p = idxeq + 1 - } else if (idxamp !== undefined) { - // key with no assignment - ++this._fields - let key; const keyTrunc = this._keyTrunc - if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } - - this._hitLimit = false - this._checkingBytes = true - this._key = '' - this._bytesKey = 0 - this._keyTrunc = false - this.decoder.reset() - - if (key.length) { - this.boy.emit('field', decodeText(key, 'binary', this.charset), - '', - keyTrunc, - false) + this.request({ + method: 'POST', + uri: '/lockRetentionPolicy', + qs: { + ifMetagenerationMatch: metageneration, + }, + }, callback); + } + /** + * @typedef {object} RestoreOptions Options for Bucket#restore(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/restore#resource| Object resource}. + * @param {number} [generation] If present, selects a specific revision of this object. + * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'. + */ + /** + * Restores a soft-deleted bucket + * @param {RestoreOptions} options Restore options. + * @returns {Promise} + */ + async restore(options) { + const [bucket] = await this.request({ + method: 'POST', + uri: '/restore', + qs: options, + }); + return bucket; + } + /** + * @typedef {array} MakeBucketPrivateResponse + * @property {File[]} 0 List of files made private. + */ + /** + * @callback MakeBucketPrivateCallback + * @param {?Error} err Request error, if any. + * @param {File[]} files List of files made private. + */ + /** + * @typedef {object} MakeBucketPrivateOptions + * @property {boolean} [includeFiles=false] Make each file in the bucket + * private. + * @property {Metadata} [metadata] Define custom metadata properties to define + * along with the operation. + * @property {boolean} [force] Queue errors occurred while making files + * private until all files have been processed. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Make the bucket listing private. + * + * You may also choose to make the contents of the bucket private by + * specifying `includeFiles: true`. This will automatically run + * {@link File#makePrivate} for every file in the bucket. + * + * When specifying `includeFiles: true`, use `force: true` to delay execution + * of your callback until all files have been processed. By default, the + * callback is executed after the first error. Use `force` to queue such + * errors until all files have been processed, after which they will be + * returned as an array as the first argument to your callback. + * + * NOTE: This may cause the process to be long-running and use a high number + * of requests. Use with caution. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @param {MakeBucketPrivateOptions} [options] Configuration options. + * @param {boolean} [options.includeFiles=false] Make each file in the bucket + * private. + * @param {Metadata} [options.metadata] Define custom metadata properties to define + * along with the operation. + * @param {boolean} [options.force] Queue errors occurred while making files + * private until all files have been processed. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {MakeBucketPrivateCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Make the bucket private. + * //- + * bucket.makePrivate(function(err) {}); + * + * //- + * // Make the bucket and its contents private. + * //- + * const opts = { + * includeFiles: true + * }; + * + * bucket.makePrivate(opts, function(err, files) { + * // `err`: + * // The first error to occur, otherwise null. + * // + * // `files`: + * // Array of files successfully made private in the bucket. + * }); + * + * //- + * // Make the bucket and its contents private, using force to suppress errors + * // until all files have been processed. + * //- + * const opts = { + * includeFiles: true, + * force: true + * }; + * + * bucket.makePrivate(opts, function(errors, files) { + * // `errors`: + * // Array of errors if any occurred, otherwise null. + * // + * // `files`: + * // Array of files successfully made private in the bucket. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.makePrivate(opts).then(function(data) { + * const files = data[0]; + * }); + * ``` + */ + makePrivate(optionsOrCallback, callback) { + var _a, _b, _c, _d; + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + options.private = true; + const query = { + predefinedAcl: 'projectPrivate', + }; + if (options.userProject) { + query.userProject = options.userProject; } - - p = idxamp + 1 - if (this._fields === this.fieldsLimit) { return cb() } - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } - p = i - if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false - this._keyTrunc = true + if ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { + query.ifGenerationMatch = options.preconditionOpts.ifGenerationMatch; } - } else { - if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } - p = len - } - } else { - idxamp = undefined - for (i = p; i < len; ++i) { - if (!this._checkingBytes) { ++p } - if (data[i] === 0x26/* & */) { - idxamp = i - break + if ((_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { + query.ifGenerationNotMatch = + options.preconditionOpts.ifGenerationNotMatch; } - if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { - this._hitLimit = true - break - } else if (this._checkingBytes) { ++this._bytesVal } - } - - if (idxamp !== undefined) { - ++this._fields - if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - decodeText(this._val, 'binary', this.charset), - this._keyTrunc, - this._valTrunc) - this._state = 'key' - - this._hitLimit = false - this._checkingBytes = true - this._key = '' - this._bytesKey = 0 - this._keyTrunc = false - this.decoder.reset() - - p = idxamp + 1 - if (this._fields === this.fieldsLimit) { return cb() } - } else if (this._hitLimit) { - // we may not have hit the actual limit if there are encoded bytes... - if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } - p = i - if ((this._val === '' && this.fieldSizeLimit === 0) || - (this._bytesVal = this._val.length) === this.fieldSizeLimit) { - // yep, we actually did hit the limit - this._checkingBytes = false - this._valTrunc = true + if ((_c = options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { + query.ifMetagenerationMatch = + options.preconditionOpts.ifMetagenerationMatch; } - } else { - if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } - p = len - } - } - } - cb() -} - -UrlEncoded.prototype.end = function () { - if (this.boy._done) { return } - - if (this._state === 'key' && this._key.length > 0) { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - '', - this._keyTrunc, - false) - } else if (this._state === 'val') { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - decodeText(this._val, 'binary', this.charset), - this._keyTrunc, - this._valTrunc) - } - this.boy._done = true - this.boy.emit('finish') -} - -module.exports = UrlEncoded - - -/***/ }), - -/***/ 27100: -/***/ ((module) => { - -"use strict"; - - -const RE_PLUS = /\+/g - -const HEX = [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -] - -function Decoder () { - this.buffer = undefined -} -Decoder.prototype.write = function (str) { - // Replace '+' with ' ' before decoding - str = str.replace(RE_PLUS, ' ') - let res = '' - let i = 0; let p = 0; const len = str.length - for (; i < len; ++i) { - if (this.buffer !== undefined) { - if (!HEX[str.charCodeAt(i)]) { - res += '%' + this.buffer - this.buffer = undefined - --i // retry character - } else { - this.buffer += str[i] - ++p - if (this.buffer.length === 2) { - res += String.fromCharCode(parseInt(this.buffer, 16)) - this.buffer = undefined + if ((_d = options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { + query.ifMetagenerationNotMatch = + options.preconditionOpts.ifMetagenerationNotMatch; } - } - } else if (str[i] === '%') { - if (i > p) { - res += str.substring(p, i) - p = i - } - this.buffer = '' - ++p + // You aren't allowed to set both predefinedAcl & acl properties on a bucket + // so acl must explicitly be nullified. + const metadata = { ...options.metadata, acl: null }; + this.setMetadata(metadata, query, (err) => { + if (err) { + callback(err); + } + const internalCall = () => { + if (options.includeFiles) { + return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, options); + } + return Promise.resolve([]); + }; + internalCall() + .then(files => callback(null, files)) + .catch(callback); + }); } - } - if (p < len && this.buffer === undefined) { res += str.substring(p) } - return res -} -Decoder.prototype.reset = function () { - this.buffer = undefined -} - -module.exports = Decoder - - -/***/ }), - -/***/ 48647: -/***/ ((module) => { - -"use strict"; - - -module.exports = function basename (path) { - if (typeof path !== 'string') { return '' } - for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var - switch (path.charCodeAt(i)) { - case 0x2F: // '/' - case 0x5C: // '\' - path = path.slice(i + 1) - return (path === '..' || path === '.' ? '' : path) + /** + * @typedef {object} MakeBucketPublicOptions + * @property {boolean} [includeFiles=false] Make each file in the bucket + * private. + * @property {boolean} [force] Queue errors occurred while making files + * private until all files have been processed. + */ + /** + * @callback MakeBucketPublicCallback + * @param {?Error} err Request error, if any. + * @param {File[]} files List of files made public. + */ + /** + * @typedef {array} MakeBucketPublicResponse + * @property {File[]} 0 List of files made public. + */ + /** + * Make the bucket publicly readable. + * + * You may also choose to make the contents of the bucket publicly readable by + * specifying `includeFiles: true`. This will automatically run + * {@link File#makePublic} for every file in the bucket. + * + * When specifying `includeFiles: true`, use `force: true` to delay execution + * of your callback until all files have been processed. By default, the + * callback is executed after the first error. Use `force` to queue such + * errors until all files have been processed, after which they will be + * returned as an array as the first argument to your callback. + * + * NOTE: This may cause the process to be long-running and use a high number + * of requests. Use with caution. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * + * @param {MakeBucketPublicOptions} [options] Configuration options. + * @param {boolean} [options.includeFiles=false] Make each file in the bucket + * private. + * @param {boolean} [options.force] Queue errors occurred while making files + * private until all files have been processed. + * @param {MakeBucketPublicCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Make the bucket publicly readable. + * //- + * bucket.makePublic(function(err) {}); + * + * //- + * // Make the bucket and its contents publicly readable. + * //- + * const opts = { + * includeFiles: true + * }; + * + * bucket.makePublic(opts, function(err, files) { + * // `err`: + * // The first error to occur, otherwise null. + * // + * // `files`: + * // Array of files successfully made public in the bucket. + * }); + * + * //- + * // Make the bucket and its contents publicly readable, using force to + * // suppress errors until all files have been processed. + * //- + * const opts = { + * includeFiles: true, + * force: true + * }; + * + * bucket.makePublic(opts, function(errors, files) { + * // `errors`: + * // Array of errors if any occurred, otherwise null. + * // + * // `files`: + * // Array of files successfully made public in the bucket. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.makePublic(opts).then(function(data) { + * const files = data[0]; + * }); + * ``` + */ + makePublic(optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + const req = { public: true, ...options }; + this.acl + .add({ + entity: 'allUsers', + role: 'READER', + }) + .then(() => { + return this.acl.default.add({ + entity: 'allUsers', + role: 'READER', + }); + }) + .then(() => { + if (req.includeFiles) { + return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, req); + } + return []; + }) + .then(files => callback(null, files), callback); } - } - return (path === '..' || path === '.' ? '' : path) -} - - -/***/ }), - -/***/ 84619: -/***/ (function(module) { - -"use strict"; - - -// Node has always utf-8 -const utf8Decoder = new TextDecoder('utf-8') -const textDecoders = new Map([ - ['utf-8', utf8Decoder], - ['utf8', utf8Decoder] -]) - -function getDecoder (charset) { - let lc - while (true) { - switch (charset) { - case 'utf-8': - case 'utf8': - return decoders.utf8 - case 'latin1': - case 'ascii': // TODO: Make these a separate, strict decoder? - case 'us-ascii': - case 'iso-8859-1': - case 'iso8859-1': - case 'iso88591': - case 'iso_8859-1': - case 'windows-1252': - case 'iso_8859-1:1987': - case 'cp1252': - case 'x-cp1252': - return decoders.latin1 - case 'utf16le': - case 'utf-16le': - case 'ucs2': - case 'ucs-2': - return decoders.utf16le - case 'base64': - return decoders.base64 - default: - if (lc === undefined) { - lc = true - charset = charset.toLowerCase() - continue + /** + * Get a reference to a Cloud Pub/Sub Notification. + * + * @param {string} id ID of notification. + * @returns {Notification} + * @see Notification + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const notification = bucket.notification('1'); + * ``` + */ + notification(id) { + if (!id) { + throw new Error(BucketExceptionMessages.SUPPLY_NOTIFICATION_ID); } - return decoders.other.bind(charset) - } - } -} - -const decoders = { - utf8: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) - } - return data.utf8Slice(0, data.length) - }, - - latin1: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - return data - } - return data.latin1Slice(0, data.length) - }, - - utf16le: (data, sourceEncoding) => { - if (data.length === 0) { - return '' - } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) - } - return data.ucs2Slice(0, data.length) - }, - - base64: (data, sourceEncoding) => { - if (data.length === 0) { - return '' + return new notification_js_1.Notification(this, id); } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) + /** + * Remove an already-existing retention policy from this bucket, if it is not + * locked. + * + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @param {SetBucketMetadataOptions} [options] Options, including precondition options + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * bucket.removeRetentionPeriod(function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.removeRetentionPeriod().then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + removeRetentionPeriod(optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + this.setMetadata({ + retentionPolicy: null, + }, options, callback); } - return data.base64Slice(0, data.length) - }, - - other: (data, sourceEncoding) => { - if (data.length === 0) { - return '' + /** + * Makes request and applies userProject query parameter if necessary. + * + * @private + * + * @param {object} reqOpts - The request options. + * @param {function} callback - The callback function. + */ + request(reqOpts, callback) { + if (this.userProject && (!reqOpts.qs || !reqOpts.qs.userProject)) { + reqOpts.qs = { ...reqOpts.qs, userProject: this.userProject }; + } + return super.request(reqOpts, callback); } - if (typeof data === 'string') { - data = Buffer.from(data, sourceEncoding) + /** + * @deprecated + * @typedef {array} SetLabelsResponse + * @property {object} 0 The bucket metadata. + */ + /** + * @deprecated + * @callback SetLabelsCallback + * @param {?Error} err Request error, if any. + * @param {object} metadata The bucket metadata. + */ + /** + * @deprecated + * @typedef {object} SetLabelsOptions Configuration options for Bucket#setLabels(). + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * @deprecated Use setMetadata directly. + * Set labels on the bucket. + * + * This makes an underlying call to {@link Bucket#setMetadata}, which + * is a PATCH request. This means an individual label can be overwritten, but + * unmentioned labels will not be touched. + * + * @param {object} labels Labels to set on the bucket. + * @param {SetLabelsOptions} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {SetLabelsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * const labels = { + * labelone: 'labelonevalue', + * labeltwo: 'labeltwovalue' + * }; + * + * bucket.setLabels(labels, function(err, metadata) { + * if (!err) { + * // Labels set successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setLabels(labels).then(function(data) { + * const metadata = data[0]; + * }); + * ``` + */ + setLabels(labels, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + callback = callback || index_js_1.util.noop; + this.setMetadata({ labels }, options, callback); } - - if (textDecoders.has(this.toString())) { - try { - return textDecoders.get(this).decode(data) - } catch (e) { } + setMetadata(metadata, optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, AvailableServiceObjectMethods.setMetadata, options); + super + .setMetadata(metadata, options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + }); } - return typeof data === 'string' - ? data - : data.toString() - } -} - -function decodeText (text, sourceEncoding, destEncoding) { - if (text) { - return getDecoder(destEncoding)(text, sourceEncoding) - } - return text -} - -module.exports = decodeText - - -/***/ }), - -/***/ 21467: -/***/ ((module) => { - -"use strict"; - - -module.exports = function getLimit (limits, name, defaultLimit) { - if ( - !limits || - limits[name] === undefined || - limits[name] === null - ) { return defaultLimit } - - if ( - typeof limits[name] !== 'number' || - isNaN(limits[name]) - ) { throw new TypeError('Limit ' + name + ' is not a valid number') } - - return limits[name] -} - - -/***/ }), - -/***/ 31854: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint-disable object-property-newline */ - - -const decodeText = __nccwpck_require__(84619) - -const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g - -const EncodedLookup = { - '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', - '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', - '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', - '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', - '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', - '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', - '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', - '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', - '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', - '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', - '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', - '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', - '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', - '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', - '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', - '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', - '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', - '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', - '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', - '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', - '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', - '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', - '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', - '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', - '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', - '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', - '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', - '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', - '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', - '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', - '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', - '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', - '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', - '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', - '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', - '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', - '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', - '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', - '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', - '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', - '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', - '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', - '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', - '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', - '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', - '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', - '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', - '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', - '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', - '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', - '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', - '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', - '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', - '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', - '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', - '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', - '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', - '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', - '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', - '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', - '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', - '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', - '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', - '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', - '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', - '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', - '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', - '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', - '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', - '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', - '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', - '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', - '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', - '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', - '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', - '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', - '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', - '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', - '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', - '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', - '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', - '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', - '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', - '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', - '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', - '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', - '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', - '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', - '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', - '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', - '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', - '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', - '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', - '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', - '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', - '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', - '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' -} - -function encodedReplacer (match) { - return EncodedLookup[match] -} - -const STATE_KEY = 0 -const STATE_VALUE = 1 -const STATE_CHARSET = 2 -const STATE_LANG = 3 - -function parseParams (str) { - const res = [] - let state = STATE_KEY - let charset = '' - let inquote = false - let escaping = false - let p = 0 - let tmp = '' - const len = str.length - - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - const char = str[i] - if (char === '\\' && inquote) { - if (escaping) { escaping = false } else { - escaping = true - continue - } - } else if (char === '"') { - if (!escaping) { - if (inquote) { - inquote = false - state = STATE_KEY - } else { inquote = true } - continue - } else { escaping = false } - } else { - if (escaping && inquote) { tmp += '\\' } - escaping = false - if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { - if (state === STATE_CHARSET) { - state = STATE_LANG - charset = tmp.substring(1) - } else { state = STATE_VALUE } - tmp = '' - continue - } else if (state === STATE_KEY && - (char === '*' || char === '=') && - res.length) { - state = char === '*' - ? STATE_CHARSET - : STATE_VALUE - res[p] = [tmp, undefined] - tmp = '' - continue - } else if (!inquote && char === ';') { - state = STATE_KEY - if (charset) { - if (tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } - charset = '' - } else if (tmp.length) { - tmp = decodeText(tmp, 'binary', 'utf8') - } - if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } - tmp = '' - ++p - continue - } else if (!inquote && (char === ' ' || char === '\t')) { continue } + /** + * Lock all objects contained in the bucket, based on their creation time. Any + * attempt to overwrite or delete objects younger than the retention period + * will result in a `PERMISSION_DENIED` error. + * + * An unlocked retention policy can be modified or removed from the bucket via + * {@link File#removeRetentionPeriod} and {@link File#setRetentionPeriod}. A + * locked retention policy cannot be removed or shortened in duration for the + * lifetime of the bucket. Attempting to remove or decrease period of a locked + * retention policy will result in a `PERMISSION_DENIED` error. You can still + * increase the policy. + * + * @param {*} duration In seconds, the minimum retention time for all objects + * contained in this bucket. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @param {SetBucketMetadataCallback} [options] Options, including precondition options. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * const DURATION_SECONDS = 15780000; // 6 months. + * + * //- + * // Lock the objects in this bucket for 6 months. + * //- + * bucket.setRetentionPeriod(DURATION_SECONDS, function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setRetentionPeriod(DURATION_SECONDS).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + setRetentionPeriod(duration, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + this.setMetadata({ + retentionPolicy: { + retentionPeriod: duration.toString(), + }, + }, options, callback); } - tmp += char - } - if (charset && tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } else if (tmp) { - tmp = decodeText(tmp, 'binary', 'utf8') - } - - if (res[p] === undefined) { - if (tmp) { res[p] = tmp } - } else { res[p][1] = tmp } - - return res -} - -module.exports = parseParams - - -/***/ }), - -/***/ 22989: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AclRoleAccessorMethods = exports.Acl = void 0; -const promisify_1 = __nccwpck_require__(19203); -/** - * Attach functionality to a {@link Storage.acl} instance. This will add an - * object for each role group (owners, readers, and writers), with each object - * containing methods to add or delete a type of entity. - * - * As an example, here are a few methods that are created. - * - * myBucket.acl.readers.deleteGroup('groupId', function(err) {}); - * - * myBucket.acl.owners.addUser('email@example.com', function(err, acl) {}); - * - * myBucket.acl.writers.addDomain('example.com', function(err, acl) {}); - * - * @private - */ -class AclRoleAccessorMethods { - constructor() { - this.owners = {}; - this.readers = {}; - this.writers = {}; - /** - * An object of convenience methods to add or delete owner ACL permissions - * for a given entity. - * - * The supported methods include: - * - * - `myFile.acl.owners.addAllAuthenticatedUsers` - * - `myFile.acl.owners.deleteAllAuthenticatedUsers` - * - `myFile.acl.owners.addAllUsers` - * - `myFile.acl.owners.deleteAllUsers` - * - `myFile.acl.owners.addDomain` - * - `myFile.acl.owners.deleteDomain` - * - `myFile.acl.owners.addGroup` - * - `myFile.acl.owners.deleteGroup` - * - `myFile.acl.owners.addProject` - * - `myFile.acl.owners.deleteProject` - * - `myFile.acl.owners.addUser` - * - `myFile.acl.owners.deleteUser` - * - * @name Acl#owners - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * //- - * // Add a user as an owner of a file. - * //- - * const myBucket = gcs.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * myFile.acl.owners.addUser('email@example.com', function(err, aclObject) - * {}); - * - * //- - * // For reference, the above command is the same as running the following. - * //- - * myFile.acl.add({ - * entity: 'user-email@example.com', - * role: gcs.acl.OWNER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myFile.acl.owners.addUser('email@example.com').then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - this.owners = {}; - /** - * An object of convenience methods to add or delete reader ACL permissions - * for a given entity. - * - * The supported methods include: - * - * - `myFile.acl.readers.addAllAuthenticatedUsers` - * - `myFile.acl.readers.deleteAllAuthenticatedUsers` - * - `myFile.acl.readers.addAllUsers` - * - `myFile.acl.readers.deleteAllUsers` - * - `myFile.acl.readers.addDomain` - * - `myFile.acl.readers.deleteDomain` - * - `myFile.acl.readers.addGroup` - * - `myFile.acl.readers.deleteGroup` - * - `myFile.acl.readers.addProject` - * - `myFile.acl.readers.deleteProject` - * - `myFile.acl.readers.addUser` - * - `myFile.acl.readers.deleteUser` - * - * @name Acl#readers - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * //- - * // Add a user as a reader of a file. - * //- - * myFile.acl.readers.addUser('email@example.com', function(err, aclObject) - * {}); - * - * //- - * // For reference, the above command is the same as running the following. - * //- - * myFile.acl.add({ - * entity: 'user-email@example.com', - * role: gcs.acl.READER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myFile.acl.readers.addUser('email@example.com').then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - this.readers = {}; - /** - * An object of convenience methods to add or delete writer ACL permissions - * for a given entity. - * - * The supported methods include: - * - * - `myFile.acl.writers.addAllAuthenticatedUsers` - * - `myFile.acl.writers.deleteAllAuthenticatedUsers` - * - `myFile.acl.writers.addAllUsers` - * - `myFile.acl.writers.deleteAllUsers` - * - `myFile.acl.writers.addDomain` - * - `myFile.acl.writers.deleteDomain` - * - `myFile.acl.writers.addGroup` - * - `myFile.acl.writers.deleteGroup` - * - `myFile.acl.writers.addProject` - * - `myFile.acl.writers.deleteProject` - * - `myFile.acl.writers.addUser` - * - `myFile.acl.writers.deleteUser` - * - * @name Acl#writers - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * //- - * // Add a user as a writer of a file. - * //- - * myFile.acl.writers.addUser('email@example.com', function(err, aclObject) - * {}); - * - * //- - * // For reference, the above command is the same as running the following. - * //- - * myFile.acl.add({ - * entity: 'user-email@example.com', - * role: gcs.acl.WRITER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myFile.acl.writers.addUser('email@example.com').then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - this.writers = {}; - AclRoleAccessorMethods.roles.forEach(this._assignAccessMethods.bind(this)); + /** + * + * @typedef {object} Cors + * @property {number} [maxAgeSeconds] The number of seconds the browser is + * allowed to make requests before it must repeat the preflight request. + * @property {string[]} [method] HTTP method allowed for cross origin resource + * sharing with this bucket. + * @property {string[]} [origin] an origin allowed for cross origin resource + * sharing with this bucket. + * @property {string[]} [responseHeader] A header allowed for cross origin + * resource sharing with this bucket. + */ + /** + * This can be used to set the CORS configuration on the bucket. + * + * The configuration will be overwritten with the value passed into this. + * + * @param {Cors[]} corsConfiguration The new CORS configuration to set + * @param {number} [corsConfiguration.maxAgeSeconds] The number of seconds the browser is + * allowed to make requests before it must repeat the preflight request. + * @param {string[]} [corsConfiguration.method] HTTP method allowed for cross origin resource + * sharing with this bucket. + * @param {string[]} [corsConfiguration.origin] an origin allowed for cross origin resource + * sharing with this bucket. + * @param {string[]} [corsConfiguration.responseHeader] A header allowed for cross origin + * resource sharing with this bucket. + * @param {SetBucketMetadataCallback} [callback] Callback function. + * @param {SetBucketMetadataOptions} [options] Options, including precondition options. + * @returns {Promise} + * + * @example + * ``` + * const storage = require('@google-cloud/storage')(); + * const bucket = storage.bucket('albums'); + * + * const corsConfiguration = [{maxAgeSeconds: 3600}]; // 1 hour + * bucket.setCorsConfiguration(corsConfiguration); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setCorsConfiguration(corsConfiguration).then(function(data) { + * const apiResponse = data[0]; + * }); + * ``` + */ + setCorsConfiguration(corsConfiguration, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + this.setMetadata({ + cors: corsConfiguration, + }, options, callback); } - _assignAccessMethods(role) { - const accessMethods = AclRoleAccessorMethods.accessMethods; - const entities = AclRoleAccessorMethods.entities; - const roleGroup = role.toLowerCase() + 's'; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this[roleGroup] = entities.reduce((acc, entity) => { - const isPrefix = entity.charAt(entity.length - 1) === '-'; - accessMethods.forEach(accessMethod => { - let method = accessMethod + entity[0].toUpperCase() + entity.substring(1); - if (isPrefix) { - method = method.replace('-', ''); - } - // Wrap the parent accessor method (e.g. `add` or `delete`) to avoid the - // more complex API of specifying an `entity` and `role`. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - acc[method] = (entityId, options, callback) => { - let apiEntity; - if (typeof options === 'function') { - callback = options; - options = {}; - } - if (isPrefix) { - apiEntity = entity + entityId; - } - else { - // If the entity is not a prefix, it is a special entity group - // that does not require further details. The accessor methods - // only accept a callback. - apiEntity = entity; - callback = entityId; - } - options = Object.assign({ - entity: apiEntity, - role, - }, options); - const args = [options]; - if (typeof callback === 'function') { - args.push(callback); - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return this[accessMethod].apply(this, args); - }; - }); - return acc; - }, {}); + /** + * @typedef {object} SetBucketStorageClassOptions + * @property {string} [userProject] - The ID of the project which will be + * billed for the request. + */ + /** + * @callback SetBucketStorageClassCallback + * @param {?Error} err Request error, if any. + */ + /** + * Set the default storage class for new files in this bucket. + * + * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} + * + * @param {string} storageClass The new storage class. (`standard`, + * `nearline`, `coldline`, or `archive`). + * **Note:** The storage classes `multi_regional`, `regional`, and + * `durable_reduced_availability` are now legacy and will be deprecated in + * the future. + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] - The ID of the project which will be + * billed for the request. + * @param {SetStorageClassCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.setStorageClass('nearline', function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * // The storage class was updated successfully. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * bucket.setStorageClass('nearline').then(function() {}); + * ``` + */ + setStorageClass(storageClass, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + // In case we get input like `storageClass`, convert to `storage_class`. + storageClass = storageClass + .replace(/-/g, '_') + .replace(/([a-z])([A-Z])/g, (_, low, up) => { + return low + '_' + up; + }) + .toUpperCase(); + this.setMetadata({ storageClass }, options, callback); } -} -exports.AclRoleAccessorMethods = AclRoleAccessorMethods; -AclRoleAccessorMethods.accessMethods = ['add', 'delete']; -AclRoleAccessorMethods.entities = [ - // Special entity groups that do not require further specification. - 'allAuthenticatedUsers', - 'allUsers', - // Entity groups that require specification, e.g. `user-email@example.com`. - 'domain-', - 'group-', - 'project-', - 'user-', -]; -AclRoleAccessorMethods.roles = ['OWNER', 'READER', 'WRITER']; -/** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * An ACL consists of one or more entries, where each entry grants permissions - * to an entity. Permissions define the actions that can be performed against an - * object or bucket (for example, `READ` or `WRITE`); the entity defines who the - * permission applies to (for example, a specific user or group of users). - * - * Where an `entity` value is accepted, we follow the format the Cloud Storage - * API expects. - * - * Refer to - * https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls - * for the most up-to-date values. - * - * - `user-userId` - * - `user-email` - * - `group-groupId` - * - `group-email` - * - `domain-domain` - * - `project-team-projectId` - * - `allUsers` - * - `allAuthenticatedUsers` - * - * Examples: - * - * - The user "liz@example.com" would be `user-liz@example.com`. - * - The group "example@googlegroups.com" would be - * `group-example@googlegroups.com`. - * - To refer to all members of the Google Apps for Business domain - * "example.com", the entity would be `domain-example.com`. - * - * For more detailed information, see - * {@link http://goo.gl/6qBBPO| About Access Control Lists}. - * - * @constructor Acl - * @mixin - * @param {object} options Configuration options. - */ -class Acl extends AclRoleAccessorMethods { - constructor(options) { - super(); - this.pathPrefix = options.pathPrefix; - this.request_ = options.request; + /** + * Set a user project to be billed for all requests made from this Bucket + * object and any files referenced from this Bucket object. + * + * @param {string} userProject The user project. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * bucket.setUserProject('grape-spaceship-123'); + * ``` + */ + setUserProject(userProject) { + this.userProject = userProject; + const methods = [ + 'create', + 'delete', + 'exists', + 'get', + 'getMetadata', + 'setMetadata', + ]; + methods.forEach(method => { + const methodConfig = this.methods[method]; + if (typeof methodConfig === 'object') { + if (typeof methodConfig.reqOpts === 'object') { + Object.assign(methodConfig.reqOpts.qs, { userProject }); + } + else { + methodConfig.reqOpts = { + qs: { userProject }, + }; + } + } + }); } /** - * @typedef {array} AddAclResponse - * @property {object} 0 The Acl Objects. + * @typedef {object} UploadOptions Configuration options for Bucket#upload(). + * @property {string|File} [destination] The place to save + * your file. If given a string, the file will be uploaded to the bucket + * using the string as a filename. When given a File object, your local + * file will be uploaded to the File object's bucket and under the File + * object's name. Lastly, when this argument is omitted, the file is uploaded + * to your bucket using the name of the local file. + * @property {string} [encryptionKey] A custom encryption key. See + * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. + * @property {boolean} [gzip] Automatically gzip the file. This will set + * `options.metadata.contentEncoding` to `gzip`. + * @property {string} [kmsKeyName] The name of the Cloud KMS key that will + * be used to encrypt the object. Must be in the format: + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. + * @property {object} [metadata] See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. + * @property {string} [offset] The starting byte of the upload stream, for + * resuming an interrupted upload. Defaults to 0. + * @property {string} [predefinedAcl] Apply a predefined set of access + * controls to this object. + * + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @property {boolean} [private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @property {boolean} [public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @property {boolean} [resumable=true] Resumable uploads are automatically + * enabled and must be shut off explicitly by setting to false. + * @property {number} [timeout=60000] Set the HTTP request timeout in + * milliseconds. This option is not available for resumable uploads. + * Default: `60000` + * @property {string} [uri] The URI for an already-created resumable + * upload. See {@link File#createResumableUpload}. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string|boolean} [validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with an + * MD5 checksum for maximum reliability. CRC32c will provide better + * performance with less reliability. You may also choose to skip + * validation completely, however this is **not recommended**. + */ + /** + * @typedef {array} UploadResponse + * @property {object} 0 The uploaded {@link File}. * @property {object} 1 The full API response. */ /** - * @callback AddAclCallback + * @callback UploadCallback * @param {?Error} err Request error, if any. - * @param {object} acl The Acl Objects. + * @param {object} file The uploaded {@link File}. * @param {object} apiResponse The full API response. */ /** - * Add access controls on a {@link Bucket} or {@link File}. + * Upload a file to the bucket. This is a convenience method that wraps + * {@link File#createWriteStream}. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert| BucketAccessControls: insert API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} + * Resumable uploads are enabled by default * - * @param {object} options Configuration options. - * @param {string} options.entity Whose permissions will be added. - * @param {string} options.role Permissions allowed for the defined entity. - * See {@link https://cloud.google.com/storage/docs/access-control Access - * Control}. - * @param {number} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). + * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#uploads| Upload Options (Simple or Resumable)} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert| Objects: insert API Documentation} + * + * @param {string} pathString The fully qualified path to the file you + * wish to upload to your bucket. + * @param {UploadOptions} [options] Configuration options. + * @param {string|File} [options.destination] The place to save + * your file. If given a string, the file will be uploaded to the bucket + * using the string as a filename. When given a File object, your local + * file will be uploaded to the File object's bucket and under the File + * object's name. Lastly, when this argument is omitted, the file is uploaded + * to your bucket using the name of the local file. + * @param {string} [options.encryptionKey] A custom encryption key. See + * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. + * @param {boolean} [options.gzip] Automatically gzip the file. This will set + * `options.metadata.contentEncoding` to `gzip`. + * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will + * be used to encrypt the object. Must be in the format: + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. + * @param {object} [options.metadata] See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. + * @param {string} [options.offset] The starting byte of the upload stream, for + * resuming an interrupted upload. Defaults to 0. + * @param {string} [options.predefinedAcl] Apply a predefined set of access + * controls to this object. + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @param {boolean} [options.private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @param {boolean} [options.public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @param {boolean} [options.resumable=true] Resumable uploads are automatically + * enabled and must be shut off explicitly by setting to false. + * @param {number} [options.timeout=60000] Set the HTTP request timeout in + * milliseconds. This option is not available for resumable uploads. + * Default: `60000` + * @param {string} [options.uri] The URI for an already-created resumable + * upload. See {@link File#createResumableUpload}. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {AddAclCallback} [callback] Callback function. - * @returns {Promise} + * @param {string|boolean} [options.validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with an + * MD5 checksum for maximum reliability. CRC32c will provide better + * performance with less reliability. You may also choose to skip + * validation completely, however this is **not recommended**. + * @param {UploadCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * + * //- + * // Upload a file from a local path. + * //- + * bucket.upload('/local/path/image.png', function(err, file, apiResponse) { + * // Your bucket now contains: + * // - "image.png" (with the contents of `/local/path/image.png') + * + * // `file` is an instance of a File object that refers to your new file. + * }); * + * + * //- + * // It's not always that easy. You will likely want to specify the filename + * // used when your new file lands in your bucket. + * // + * // You may also want to set metadata or customize other options. + * //- * const options = { - * entity: 'user-useremail@example.com', - * role: gcs.acl.OWNER_ROLE + * destination: 'new-image.png', + * validation: 'crc32c', + * metadata: { + * metadata: { + * event: 'Fall trip to the zoo' + * } + * } * }; * - * myBucket.acl.add(options, function(err, aclObject, apiResponse) {}); + * bucket.upload('local-image.png', options, function(err, file) { + * // Your bucket now contains: + * // - "new-image.png" (with the contents of `local-image.png') + * + * // `file` is an instance of a File object that refers to your new file. + * }); * * //- - * // For file ACL operations, you can also specify a `generation` property. - * // Here is how you would grant ownership permissions to a user on a - * specific - * // revision of a file. + * // You can also have a file gzip'd on the fly. * //- - * myFile.acl.add({ - * entity: 'user-useremail@example.com', - * role: gcs.acl.OWNER_ROLE, - * generation: 1 - * }, function(err, aclObject, apiResponse) {}); + * bucket.upload('index.html', { gzip: true }, function(err, file) { + * // Your bucket now contains: + * // - "index.html" (automatically compressed with gzip) + * + * // Downloading the file with `file.download` will automatically decode + * the + * // file. + * }); + * + * //- + * // You may also re-use a File object, {File}, that references + * // the file you wish to create or overwrite. + * //- + * const options = { + * destination: bucket.file('existing-file.png'), + * resumable: false + * }; + * + * bucket.upload('local-img.png', options, function(err, newFile) { + * // Your bucket now contains: + * // - "existing-file.png" (with the contents of `local-img.png') + * + * // Note: + * // The `newFile` parameter is equal to `file`. + * }); + * + * //- + * // To use + * // + * // Customer-supplied Encryption Keys, provide the `encryptionKey` + * option. + * //- + * const crypto = require('crypto'); + * const encryptionKey = crypto.randomBytes(32); + * + * bucket.upload('img.png', { + * encryptionKey: encryptionKey + * }, function(err, newFile) { + * // `img.png` was uploaded with your custom encryption key. + * + * // `newFile` is already configured to use the encryption key when making + * // operations on the remote object. + * + * // However, to use your encryption key later, you must create a `File` + * // instance with the `key` supplied: + * const file = bucket.file('img.png', { + * encryptionKey: encryptionKey + * }); + * + * // Or with `file#setEncryptionKey`: + * const file = bucket.file('img.png'); + * file.setEncryptionKey(encryptionKey); + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * myBucket.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; + * bucket.upload('local-image.png').then(function(data) { + * const file = data[0]; * }); * + * To upload a file from a URL, use {@link File#createWriteStream}. + * * ``` - * @example include:samples/acl.js - * region_tag:storage_add_file_owner - * Example of adding an owner to a file: + * @example include:samples/files.js + * region_tag:storage_upload_file + * Another example: * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_owner - * Example of adding an owner to a bucket: + * @example include:samples/encryption.js + * region_tag:storage_upload_encrypted_file + * Example of uploading an encrypted file: + */ + upload(pathString, optionsOrCallback, callback) { + var _a, _b; + const upload = (numberOfRetries) => { + const returnValue = (0, async_retry_1.default)(async (bail) => { + await new Promise((resolve, reject) => { + var _a, _b; + if (numberOfRetries === 0 && + ((_b = (_a = newFile === null || newFile === void 0 ? void 0 : newFile.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry)) { + newFile.storage.retryOptions.autoRetry = false; + } + const writable = newFile.createWriteStream(options); + if (options.onUploadProgress) { + writable.on('progress', options.onUploadProgress); + } + fs.createReadStream(pathString) + .on('error', bail) + .pipe(writable) + .on('error', err => { + if (this.storage.retryOptions.autoRetry && + this.storage.retryOptions.retryableErrorFn(err)) { + return reject(err); + } + else { + return bail(err); + } + }) + .on('finish', () => { + return resolve(); + }); + }); + }, { + retries: numberOfRetries, + factor: this.storage.retryOptions.retryDelayMultiplier, + maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds + maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds + }); + if (!callback) { + return returnValue; + } + else { + return returnValue + .then(() => { + if (callback) { + return callback(null, newFile, newFile.metadata); + } + }) + .catch(callback); + } + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + if (global['GCLOUD_SANDBOX_ENV']) { + return; + } + let options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + options = Object.assign({ + metadata: {}, + }, options); + // Do not retry if precondition option ifGenerationMatch is not set + // because this is a file operation + let maxRetries = this.storage.retryOptions.maxRetries; + if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && + ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + maxRetries = 0; + } + let newFile; + if (options.destination instanceof file_js_1.File) { + newFile = options.destination; + } + else if (options.destination !== null && + typeof options.destination === 'string') { + // Use the string as the name of the file. + newFile = this.file(options.destination, { + encryptionKey: options.encryptionKey, + kmsKeyName: options.kmsKeyName, + preconditionOpts: this.instancePreconditionOpts, + }); + } + else { + // Resort to using the name of the incoming file. + const destination = path.basename(pathString); + newFile = this.file(destination, { + encryptionKey: options.encryptionKey, + kmsKeyName: options.kmsKeyName, + preconditionOpts: this.instancePreconditionOpts, + }); + } + upload(maxRetries); + } + /** + * @private * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_default_owner - * Example of adding a default owner to a bucket: + * @typedef {object} MakeAllFilesPublicPrivateOptions + * @property {boolean} [force] Suppress errors until all files have been + * processed. + * @property {boolean} [private] Make files private. + * @property {boolean} [public] Make files public. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. */ - add(options, callback) { - const query = {}; - if (options.generation) { - query.generation = options.generation; + /** + * @private + * + * @callback SetBucketMetadataCallback + * @param {?Error} err Request error, if any. + * @param {File[]} files Files that were updated. + */ + /** + * @typedef {array} MakeAllFilesPublicPrivateResponse + * @property {File[]} 0 List of files affected. + */ + /** + * Iterate over all of a bucket's files, calling `file.makePublic()` (public) + * or `file.makePrivate()` (private) on each. + * + * Operations are performed in parallel, up to 10 at once. The first error + * breaks the loop, and will execute the provided callback with it. Specify + * `{ force: true }` to suppress the errors. + * + * @private + * + * @param {MakeAllFilesPublicPrivateOptions} [options] Configuration options. + * @param {boolean} [options.force] Suppress errors until all files have been + * processed. + * @param {boolean} [options.private] Make files private. + * @param {boolean} [options.public] Make files public. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + + * @param {MakeAllFilesPublicPrivateCallback} callback Callback function. + * + * @return {Promise} + */ + makeAllFilesPublicPrivate_(optionsOrCallback, callback) { + const MAX_PARALLEL_LIMIT = 10; + const errors = []; + const updatedFiles = []; + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + const processFile = async (file) => { + try { + await (options.public ? file.makePublic() : file.makePrivate(options)); + updatedFiles.push(file); + } + catch (e) { + if (!options.force) { + throw e; + } + errors.push(e); + } + }; + this.getFiles(options) + .then(([files]) => { + const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); + const promises = files.map(file => { + return limit(() => processFile(file)); + }); + return Promise.all(promises); + }) + .then(() => callback(errors.length > 0 ? errors : null, updatedFiles), err => callback(err, updatedFiles)); + } + getId() { + return this.id; + } + disableAutoRetryConditionallyIdempotent_( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + coreOpts, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + methodType, localPreconditionOptions) { + var _a, _b; + if (typeof coreOpts === 'object' && + ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch) === undefined && + (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && + (methodType === AvailableServiceObjectMethods.setMetadata || + methodType === AvailableServiceObjectMethods.delete) && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) { + this.storage.retryOptions.autoRetry = false; } - if (options.userProject) { - query.userProject = options.userProject; + else if (this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + this.storage.retryOptions.autoRetry = false; } - this.request({ - method: 'POST', - uri: '', - qs: query, - maxRetries: 0, //explicitly set this value since this is a non-idempotent function - json: { - entity: options.entity, - role: options.role.toUpperCase(), + } +} +exports.Bucket = Bucket; +/*! Developer Documentation + * + * These methods can be auto-paginated. + */ +paginator_1.paginator.extend(Bucket, 'getFiles'); +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Bucket, { + exclude: ['cloudStorageURI', 'request', 'file', 'notification', 'restore'], +}); + + +/***/ }), + +/***/ 62665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Channel = void 0; +const index_js_1 = __nccwpck_require__(4052); +const promisify_1 = __nccwpck_require__(19203); +/** + * Create a channel object to interact with a Cloud Storage channel. + * + * See {@link https://cloud.google.com/storage/docs/object-change-notification| Object Change Notification} + * + * @class + * + * @param {string} id The ID of the channel. + * @param {string} resourceId The resource ID of the channel. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const channel = storage.channel('id', 'resource-id'); + * ``` + */ +class Channel extends index_js_1.ServiceObject { + constructor(storage, id, resourceId) { + const config = { + parent: storage, + baseUrl: '/channels', + // An ID shouldn't be included in the API requests. + // RE: + // https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1145 + id: '', + methods: { + // Only need `request`. }, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - callback(null, this.makeAclObject_(resp), resp); - }); + }; + super(config); + this.metadata.id = id; + this.metadata.resourceId = resourceId; } /** - * @typedef {array} RemoveAclResponse + * @typedef {array} StopResponse * @property {object} 0 The full API response. */ /** - * @callback RemoveAclCallback + * @callback StopCallback * @param {?Error} err Request error, if any. * @param {object} apiResponse The full API response. */ /** - * Delete access controls on a {@link Bucket} or {@link File}. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete| BucketAccessControls: delete API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete| ObjectAccessControls: delete API Documentation} + * Stop this channel. * - * @param {object} options Configuration object. - * @param {string} options.entity Whose permissions will be revoked. - * @param {int} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {RemoveAclCallback} callback The callback function. - * @returns {Promise} + * @param {StopCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * myBucket.acl.delete({ - * entity: 'user-useremail@example.com' - * }, function(err, apiResponse) {}); - * - * //- - * // For file ACL operations, you can also specify a `generation` property. - * //- - * myFile.acl.delete({ - * entity: 'user-useremail@example.com', - * generation: 1 - * }, function(err, apiResponse) {}); + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const channel = storage.channel('id', 'resource-id'); + * channel.stop(function(err, apiResponse) { + * if (!err) { + * // Channel stopped successfully. + * } + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * myFile.acl.delete().then(function(data) { + * channel.stop().then(function(data) { * const apiResponse = data[0]; * }); - * * ``` - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_owner - * Example of removing an owner from a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_default_owner - * Example of removing a default owner from a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_remove_file_owner - * Example of removing an owner from a bucket: */ - delete(options, callback) { - const query = {}; - if (options.generation) { - query.generation = options.generation; - } - if (options.userProject) { - query.userProject = options.userProject; - } + stop(callback) { + callback = callback || index_js_1.util.noop; this.request({ - method: 'DELETE', - uri: '/' + encodeURIComponent(options.entity), - qs: query, - }, (err, resp) => { - callback(err, resp); + method: 'POST', + uri: '/stop', + json: this.metadata, + }, (err, apiResponse) => { + callback(err, apiResponse); }); } +} +exports.Channel = Channel; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Channel); + + +/***/ }), + +/***/ 55810: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2022 Google LLC +// +// 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. +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _CRC32C_crc32c; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CRC32C_EXTENSION_TABLE = exports.CRC32C_EXTENSIONS = exports.CRC32C_EXCEPTION_MESSAGES = exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = exports.CRC32C = void 0; +const fs_1 = __nccwpck_require__(57147); +/** + * Ported from {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc#L16-L59 github.com/google/crc32c} + */ +const CRC32C_EXTENSIONS = [ + 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, + 0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, + 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c, + 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, + 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc, + 0xbc267848, 0x4e4dfb4b, 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, + 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, 0xaa64d611, 0x580f5512, + 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, + 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad, + 0x1642ae59, 0xe4292d5a, 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, + 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, 0x417b1dbc, 0xb3109ebf, + 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, + 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f, + 0xed03a29b, 0x1f682198, 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, + 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, 0xdbfc821c, 0x2997011f, + 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, + 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e, + 0x4767748a, 0xb50cf789, 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, + 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, 0x7198540d, 0x83f3d70e, + 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, + 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de, + 0xdde0eb2a, 0x2f8b6829, 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, + 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, 0x082f63b7, 0xfa44e0b4, + 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, + 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b, + 0xb4091bff, 0x466298fc, 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, + 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, 0xa24bb5a6, 0x502036a5, + 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, + 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975, + 0x0e330a81, 0xfc588982, 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, + 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, 0x38cc2a06, 0xcaa7a905, + 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, + 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8, + 0xe52cc12c, 0x1747422f, 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, + 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, 0xd3d3e1ab, 0x21b862a8, + 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, + 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78, + 0x7fab5e8c, 0x8dc0dd8f, 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, + 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, 0x69e9f0d5, 0x9b8273d6, + 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, + 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69, + 0xd5cf889d, 0x27a40b9e, 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, + 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351, +]; +exports.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; +const CRC32C_EXTENSION_TABLE = new Int32Array(CRC32C_EXTENSIONS); +exports.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; +const CRC32C_DEFAULT_VALIDATOR_GENERATOR = () => new CRC32C(); +exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = CRC32C_DEFAULT_VALIDATOR_GENERATOR; +const CRC32C_EXCEPTION_MESSAGES = { + INVALID_INIT_BASE64_RANGE: (l) => `base64-encoded data expected to equal 4 bytes, not ${l}`, + INVALID_INIT_BUFFER_LENGTH: (l) => `Buffer expected to equal 4 bytes, not ${l}`, + INVALID_INIT_INTEGER: (l) => `Number expected to be a safe, unsigned 32-bit integer, not ${l}`, +}; +exports.CRC32C_EXCEPTION_MESSAGES = CRC32C_EXCEPTION_MESSAGES; +class CRC32C { /** - * @typedef {array} GetAclResponse - * @property {object|object[]} 0 Single or array of Acl Objects. - * @property {object} 1 The full API response. - */ - /** - * @callback GetAclCallback - * @param {?Error} err Request error, if any. - * @param {object|object[]} acl Single or array of Acl Objects. - * @param {object} apiResponse The full API response. - */ - /** - * Get access controls on a {@link Bucket} or {@link File}. If - * an entity is omitted, you will receive an array of all applicable access - * controls. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get| BucketAccessControls: get API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get| ObjectAccessControls: get API Documentation} - * - * @param {object|function} [options] Configuration options. If you want to - * receive a list of all access controls, pass the callback function as - * the only argument. - * @param {string} options.entity Whose permissions will be fetched. - * @param {number} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetAclCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); - * - * myBucket.acl.get({ - * entity: 'user-useremail@example.com' - * }, function(err, aclObject, apiResponse) {}); - * - * //- - * // Get all access controls. - * //- - * myBucket.acl.get(function(err, aclObjects, apiResponse) { - * // aclObjects = [ - * // { - * // entity: 'user-useremail@example.com', - * // role: 'owner' - * // } - * // ] - * }); - * - * //- - * // For file ACL operations, you can also specify a `generation` property. - * //- - * myFile.acl.get({ - * entity: 'user-useremail@example.com', - * generation: 1 - * }, function(err, aclObject, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myBucket.acl.get().then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); + * Constructs a new `CRC32C` object. * - * ``` - * @example include:samples/acl.js - * region_tag:storage_print_file_acl - * Example of printing a file's ACL: + * Reconstruction is recommended via the `CRC32C.from` static method. * - * @example include:samples/acl.js - * region_tag:storage_print_file_acl_for_user - * Example of printing a file's ACL for a specific user: + * @param initialValue An initial CRC32C value - a signed 32-bit integer. + */ + constructor(initialValue = 0) { + /** Current CRC32C value */ + _CRC32C_crc32c.set(this, 0); + __classPrivateFieldSet(this, _CRC32C_crc32c, initialValue, "f"); + } + /** + * Calculates a CRC32C from a provided buffer. * - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl - * Example of printing a bucket's ACL: + * Implementation inspired from: + * - {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc github.com/google/crc32c} + * - {@link https://github.com/googleapis/python-crc32c/blob/a595e758c08df445a99c3bf132ee8e80a3ec4308/src/google_crc32c/python.py github.com/googleapis/python-crc32c} + * - {@link https://github.com/googleapis/java-storage/pull/1376/files github.com/googleapis/java-storage} * - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl_for_user - * Example of printing a bucket's ACL for a specific user: + * @param data The `Buffer` to generate the CRC32C from */ - get(optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : null; - const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - let path = ''; - const query = {}; - if (options) { - path = '/' + encodeURIComponent(options.entity); - if (options.generation) { - query.generation = options.generation; - } - if (options.userProject) { - query.userProject = options.userProject; - } + update(data) { + let current = __classPrivateFieldGet(this, _CRC32C_crc32c, "f") ^ 0xffffffff; + for (const d of data) { + const tablePoly = CRC32C.CRC32C_EXTENSION_TABLE[(d ^ current) & 0xff]; + current = tablePoly ^ (current >>> 8); } - this.request({ - uri: path, - qs: query, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - let results; - if (resp.items) { - results = resp.items.map(this.makeAclObject_); - } - else { - results = this.makeAclObject_(resp); - } - callback(null, results, resp); - }); + __classPrivateFieldSet(this, _CRC32C_crc32c, current ^ 0xffffffff, "f"); } /** - * @typedef {array} UpdateAclResponse - * @property {object} 0 The updated Acl Objects. - * @property {object} 1 The full API response. + * Validates a provided input to the current CRC32C value. + * + * @param input A Buffer, `CRC32C`-compatible object, base64-encoded data (string), or signed 32-bit integer */ + validate(input) { + if (typeof input === 'number') { + return input === __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); + } + else if (typeof input === 'string') { + return input === this.toString(); + } + else if (Buffer.isBuffer(input)) { + return Buffer.compare(input, this.toBuffer()) === 0; + } + else { + // `CRC32C`-like object + return input.toString() === this.toString(); + } + } /** - * @callback UpdateAclCallback - * @param {?Error} err Request error, if any. - * @param {object} acl The updated Acl Objects. - * @param {object} apiResponse The full API response. + * Returns a `Buffer` representation of the CRC32C value */ + toBuffer() { + const buffer = Buffer.alloc(4); + buffer.writeInt32BE(__classPrivateFieldGet(this, _CRC32C_crc32c, "f")); + return buffer; + } /** - * Update access controls on a {@link Bucket} or {@link File}. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/update| BucketAccessControls: update API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/update| ObjectAccessControls: update API Documentation} - * - * @param {object} options Configuration options. - * @param {string} options.entity Whose permissions will be updated. - * @param {string} options.role Permissions allowed for the defined entity. - * See {@link Storage.acl}. - * @param {number} [options.generation] **File Objects Only** Select a specific - * revision of this file (as opposed to the latest version, the default). - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {UpdateAclCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * const myFile = myBucket.file('my-file'); + * Returns a JSON-compatible, base64-encoded representation of the CRC32C value. * - * const options = { - * entity: 'user-useremail@example.com', - * role: gcs.acl.WRITER_ROLE - * }; + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify `JSON#stringify`} + */ + toJSON() { + return this.toString(); + } + /** + * Returns a base64-encoded representation of the CRC32C value. * - * myBucket.acl.update(options, function(err, aclObject, apiResponse) {}); + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString `Object#toString`} + */ + toString() { + return this.toBuffer().toString('base64'); + } + /** + * Returns the `number` representation of the CRC32C value as a signed 32-bit integer * - * //- - * // For file ACL operations, you can also specify a `generation` property. - * //- - * myFile.acl.update({ - * entity: 'user-useremail@example.com', - * role: gcs.acl.WRITER_ROLE, - * generation: 1 - * }, function(err, aclObject, apiResponse) {}); + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf `Object#valueOf`} + */ + valueOf() { + return __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); + } + /** + * Generates a `CRC32C` from a compatible buffer format. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myFile.acl.update(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` + * @param value 4-byte `ArrayBufferView`/`Buffer`/`TypedArray` */ - update(options, callback) { - const query = {}; - if (options.generation) { - query.generation = options.generation; + static fromBuffer(value) { + let buffer; + if (Buffer.isBuffer(value)) { + buffer = value; } - if (options.userProject) { - query.userProject = options.userProject; + else if ('buffer' in value) { + // `ArrayBufferView` + buffer = Buffer.from(value.buffer); } - this.request({ - method: 'PUT', - uri: '/' + encodeURIComponent(options.entity), - qs: query, - json: { - role: options.role.toUpperCase(), - }, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - callback(null, this.makeAclObject_(resp), resp); + else { + // `ArrayBuffer` + buffer = Buffer.from(value); + } + if (buffer.byteLength !== 4) { + throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BUFFER_LENGTH(buffer.byteLength)); + } + return new CRC32C(buffer.readInt32BE()); + } + static async fromFile(file) { + const crc32c = new CRC32C(); + await new Promise((resolve, reject) => { + (0, fs_1.createReadStream)(file) + .on('data', (d) => { + if (typeof d === 'string') { + crc32c.update(Buffer.from(d)); + } + else { + crc32c.update(d); + } + }) + .on('end', () => resolve()) + .on('error', reject); }); + return crc32c; } /** - * Transform API responses to a consistent object format. + * Generates a `CRC32C` from 4-byte base64-encoded data (string). * - * @private + * @param value 4-byte base64-encoded data (string) */ - makeAclObject_(accessControlObject) { - const obj = { - entity: accessControlObject.entity, - role: accessControlObject.role, - }; - if (accessControlObject.projectTeam) { - obj.projectTeam = accessControlObject.projectTeam; + static fromString(value) { + const buffer = Buffer.from(value, 'base64'); + if (buffer.byteLength !== 4) { + throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BASE64_RANGE(buffer.byteLength)); } - return obj; + return this.fromBuffer(buffer); } /** - * Patch requests up to the bucket's request object. + * Generates a `CRC32C` from a safe, unsigned 32-bit integer. * - * @private + * @param value an unsigned 32-bit integer + */ + static fromNumber(value) { + if (!Number.isSafeInteger(value) || value > 2 ** 32 || value < -(2 ** 32)) { + throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_INTEGER(value)); + } + return new CRC32C(value); + } + /** + * Generates a `CRC32C` from a variety of compatable types. + * Note: strings are treated as input, not as file paths to read from. * - * @param {string} method Action. - * @param {string} path Request path. - * @param {*} query Request query object. - * @param {*} body Request body contents. - * @param {function} callback Callback function. + * @param value A number, 4-byte `ArrayBufferView`/`Buffer`/`TypedArray`, or 4-byte base64-encoded data (string) */ - request(reqOpts, callback) { - reqOpts.uri = this.pathPrefix + reqOpts.uri; - this.request_(reqOpts, callback); + static from(value) { + if (typeof value === 'number') { + return this.fromNumber(value); + } + else if (typeof value === 'string') { + return this.fromString(value); + } + else if ('byteLength' in value) { + // `ArrayBuffer` | `Buffer` | `ArrayBufferView` + return this.fromBuffer(value); + } + else { + // `CRC32CValidator`/`CRC32C`-like + return this.fromString(value.toString()); + } } } -exports.Acl = Acl; -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(Acl, { - exclude: ['request'], -}); +exports.CRC32C = CRC32C; +_CRC32C_crc32c = new WeakMap(); +CRC32C.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; +CRC32C.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; /***/ }), -/***/ 23973: +/***/ 4713: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -152551,446 +158162,323 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var _File_instances, _File_validateIntegrity; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Bucket = exports.BucketExceptionMessages = exports.AvailableServiceObjectMethods = exports.BucketActionToHTTPMethod = void 0; +exports.File = exports.FileExceptionMessages = exports.RequestError = exports.STORAGE_POST_POLICY_BASE_URL = exports.ActionToHTTPMethod = void 0; const index_js_1 = __nccwpck_require__(4052); -const paginator_1 = __nccwpck_require__(46412); const promisify_1 = __nccwpck_require__(19203); +const crypto = __importStar(__nccwpck_require__(6113)); const fs = __importStar(__nccwpck_require__(57147)); const mime_1 = __importDefault(__nccwpck_require__(29994)); -const path = __importStar(__nccwpck_require__(71017)); -const p_limit_1 = __importDefault(__nccwpck_require__(57684)); -const util_1 = __nccwpck_require__(73837); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -const util_js_1 = __nccwpck_require__(59258); -const acl_js_1 = __nccwpck_require__(22989); -const file_js_1 = __nccwpck_require__(4713); -const iam_js_1 = __nccwpck_require__(80352); -const notification_js_1 = __nccwpck_require__(21178); +const resumableUpload = __importStar(__nccwpck_require__(42851)); +const stream_1 = __nccwpck_require__(12781); +const zlib = __importStar(__nccwpck_require__(59796)); const storage_js_1 = __nccwpck_require__(33030); +const bucket_js_1 = __nccwpck_require__(23973); +const acl_js_1 = __nccwpck_require__(22989); const signer_js_1 = __nccwpck_require__(59019); -const stream_1 = __nccwpck_require__(12781); -const url_1 = __nccwpck_require__(57310); -var BucketActionToHTTPMethod; -(function (BucketActionToHTTPMethod) { - BucketActionToHTTPMethod["list"] = "GET"; -})(BucketActionToHTTPMethod || (exports.BucketActionToHTTPMethod = BucketActionToHTTPMethod = {})); -var AvailableServiceObjectMethods; -(function (AvailableServiceObjectMethods) { - AvailableServiceObjectMethods[AvailableServiceObjectMethods["setMetadata"] = 0] = "setMetadata"; - AvailableServiceObjectMethods[AvailableServiceObjectMethods["delete"] = 1] = "delete"; -})(AvailableServiceObjectMethods || (exports.AvailableServiceObjectMethods = AvailableServiceObjectMethods = {})); -var BucketExceptionMessages; -(function (BucketExceptionMessages) { - BucketExceptionMessages["PROVIDE_SOURCE_FILE"] = "You must provide at least one source file."; - BucketExceptionMessages["DESTINATION_FILE_NOT_SPECIFIED"] = "A destination file must be specified."; - BucketExceptionMessages["CHANNEL_ID_REQUIRED"] = "An ID is required to create a channel."; - BucketExceptionMessages["TOPIC_NAME_REQUIRED"] = "A valid topic name is required."; - BucketExceptionMessages["CONFIGURATION_OBJECT_PREFIX_REQUIRED"] = "A configuration object with a prefix is required."; - BucketExceptionMessages["SPECIFY_FILE_NAME"] = "A file name must be specified."; - BucketExceptionMessages["METAGENERATION_NOT_PROVIDED"] = "A metageneration must be provided."; - BucketExceptionMessages["SUPPLY_NOTIFICATION_ID"] = "You must supply a notification ID."; -})(BucketExceptionMessages || (exports.BucketExceptionMessages = BucketExceptionMessages = {})); -/** - * @callback Crc32cGeneratorToStringCallback - * A method returning the CRC32C as a base64-encoded string. - * - * @returns {string} - * - * @example - * Hashing the string 'data' should return 'rth90Q==' - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.toString(); // 'rth90Q==' - * ``` - **/ -/** - * @callback Crc32cGeneratorValidateCallback - * A method validating a base64-encoded CRC32C string. - * - * @param {string} [value] base64-encoded CRC32C string to validate - * @returns {boolean} - * - * @example - * Should return `true` if the value matches, `false` otherwise - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.validate('DkjKuA=='); // false - * crc32c.validate('rth90Q=='); // true - * ``` - **/ -/** - * @callback Crc32cGeneratorUpdateCallback - * A method for passing `Buffer`s for CRC32C generation. - * - * @param {Buffer} [data] data to update CRC32C value with - * @returns {undefined} - * - * @example - * Hashing buffers from 'some ' and 'text\n' - * - * ```js - * const buffer1 = Buffer.from('some '); - * crc32c.update(buffer1); - * - * const buffer2 = Buffer.from('text\n'); - * crc32c.update(buffer2); - * - * crc32c.toString(); // 'DkjKuA==' - * ``` - **/ -/** - * @typedef {object} CRC32CValidator - * @property {Crc32cGeneratorToStringCallback} - * @property {Crc32cGeneratorValidateCallback} - * @property {Crc32cGeneratorUpdateCallback} - */ -/** - * A function that generates a CRC32C Validator. Defaults to {@link CRC32C} - * - * @name Bucket#crc32cGenerator - * @type {CRC32CValidator} - */ -/** - * Get and set IAM policies for your bucket. - * - * @name Bucket#iam - * @mixes Iam - * - * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} - * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} - * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Get the IAM policy for your bucket. - * //- - * bucket.iam.getPolicy(function(err, policy) { - * console.log(policy); - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.iam.getPolicy().then(function(data) { - * const policy = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/iam.js - * region_tag:storage_view_bucket_iam_members - * Example of retrieving a bucket's IAM policy: - * - * @example include:samples/iam.js - * region_tag:storage_add_bucket_iam_member - * Example of adding to a bucket's IAM policy: - * - * @example include:samples/iam.js - * region_tag:storage_remove_bucket_iam_member - * Example of removing from a bucket's IAM policy: - */ -/** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * An ACL consists of one or more entries, where each entry grants permissions - * to an entity. Permissions define the actions that can be performed against - * an object or bucket (for example, `READ` or `WRITE`); the entity defines - * who the permission applies to (for example, a specific user or group of - * users). - * - * The `acl` object on a Bucket instance provides methods to get you a list of - * the ACLs defined on your bucket, as well as set, update, and delete them. - * - * Buckets also have - * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} - * for all created files. Default ACLs specify permissions that all new - * objects added to the bucket will inherit by default. You can add, delete, - * get, and update entities and permissions for these as well with - * {@link Bucket#acl.default}. - * - * See {@link http://goo.gl/6qBBPO| About Access Control Lists} - * See {@link https://cloud.google.com/storage/docs/access-control/lists#default| Default ACLs} - * - * @name Bucket#acl - * @mixes Acl - * @property {Acl} default Cloud Storage Buckets have - * {@link https://cloud.google.com/storage/docs/access-control/lists#default| default ACLs} - * for all created files. You can add, delete, get, and update entities and - * permissions for these as well. The method signatures and examples are all - * the same, after only prefixing the method call with `default`. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Make a bucket's contents publicly readable. - * //- - * const myBucket = storage.bucket('my-bucket'); - * - * const options = { - * entity: 'allUsers', - * role: storage.acl.READER_ROLE - * }; - * - * myBucket.acl.add(options, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * myBucket.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl - * Example of printing a bucket's ACL: - * - * @example include:samples/acl.js - * region_tag:storage_print_bucket_acl_for_user - * Example of printing a bucket's ACL for a specific user: - * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_owner - * Example of adding an owner to a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_owner - * Example of removing an owner from a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_add_bucket_default_owner - * Example of adding a default owner to a bucket: - * - * @example include:samples/acl.js - * region_tag:storage_remove_bucket_default_owner - * Example of removing a default owner from a bucket: - */ +const util_js_1 = __nccwpck_require__(38064); +const duplexify_1 = __importDefault(__nccwpck_require__(76599)); +const util_js_2 = __nccwpck_require__(59258); +const crc32c_js_1 = __nccwpck_require__(55810); +const hash_stream_validator_js_1 = __nccwpck_require__(40725); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +var ActionToHTTPMethod; +(function (ActionToHTTPMethod) { + ActionToHTTPMethod["read"] = "GET"; + ActionToHTTPMethod["write"] = "PUT"; + ActionToHTTPMethod["delete"] = "DELETE"; + ActionToHTTPMethod["resumable"] = "POST"; +})(ActionToHTTPMethod || (exports.ActionToHTTPMethod = ActionToHTTPMethod = {})); /** - * The API-formatted resource description of the bucket. - * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. - * - * @name Bucket#metadata - * @type {object} + * @deprecated - no longer used */ +exports.STORAGE_POST_POLICY_BASE_URL = 'https://storage.googleapis.com'; /** - * The bucket's name. - * @name Bucket#name - * @type {string} + * @private */ +const GS_URL_REGEXP = /^gs:\/\/([a-z0-9_.-]+)\/(.+)$/; /** - * Get {@link File} objects for the files currently in the bucket as a - * readable object stream. - * - * @method Bucket#getFilesStream - * @param {GetFilesOptions} [query] Query object for listing files. - * @returns {ReadableStream} A readable stream that emits {@link File} instances. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * bucket.getFilesStream() - * .on('error', console.error) - * .on('data', function(file) { - * // file is a File object. - * }) - * .on('end', function() { - * // All files retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * bucket.getFilesStream() - * .on('data', function(file) { - * this.end(); - * }); - * - * //- - * // If you're filtering files with a delimiter, you should use - * // {@link Bucket#getFiles} and set `autoPaginate: false` in order to - * // preserve the `apiResponse` argument. - * //- - * const prefixes = []; - * - * function callback(err, files, nextQuery, apiResponse) { - * prefixes = prefixes.concat(apiResponse.prefixes); - * - * if (nextQuery) { - * bucket.getFiles(nextQuery, callback); - * } else { - * // prefixes = The finished array of prefixes. - * } - * } - * - * bucket.getFiles({ - * autoPaginate: false, - * delimiter: '/' - * }, callback); - * ``` + * @private + * This regex will match compressible content types. These are primarily text/*, +json, +text, +xml content types. + * This was based off of mime-db and may periodically need to be updated if new compressible content types become + * standards. */ +const COMPRESSIBLE_MIME_REGEX = new RegExp([ + /^text\/|application\/ecmascript|application\/javascript|application\/json/, + /|application\/postscript|application\/rtf|application\/toml|application\/vnd.dart/, + /|application\/vnd.ms-fontobject|application\/wasm|application\/x-httpd-php|application\/x-ns-proxy-autoconfig/, + /|application\/x-sh(?!ockwave-flash)|application\/x-tar|application\/x-virtualbox-hdd|application\/x-virtualbox-ova|application\/x-virtualbox-ovf/, + /|^application\/x-virtualbox-vbox$|application\/x-virtualbox-vdi|application\/x-virtualbox-vhd|application\/x-virtualbox-vmdk/, + /|application\/xml|application\/xml-dtd|font\/otf|font\/ttf|image\/bmp|image\/vnd.adobe.photoshop|image\/vnd.microsoft.icon/, + /|image\/vnd.ms-dds|image\/x-icon|image\/x-ms-bmp|message\/rfc822|model\/gltf-binary|\+json|\+text|\+xml|\+yaml/, +] + .map(r => r.source) + .join(''), 'i'); +class RequestError extends Error { +} +exports.RequestError = RequestError; +const SEVEN_DAYS = 7 * 24 * 60 * 60; +const GS_UTIL_URL_REGEX = /(gs):\/\/([a-z0-9_.-]+)\/(.+)/g; +const HTTPS_PUBLIC_URL_REGEX = /(https):\/\/(storage\.googleapis\.com)\/([a-z0-9_.-]+)\/(.+)/g; +var FileExceptionMessages; +(function (FileExceptionMessages) { + FileExceptionMessages["EXPIRATION_TIME_NA"] = "An expiration time is not available."; + FileExceptionMessages["DESTINATION_NO_NAME"] = "Destination file should have a name."; + FileExceptionMessages["INVALID_VALIDATION_FILE_RANGE"] = "Cannot use validation with file ranges (start/end)."; + FileExceptionMessages["MD5_NOT_AVAILABLE"] = "MD5 verification was specified, but is not available for the requested object. MD5 is not available for composite objects."; + FileExceptionMessages["EQUALS_CONDITION_TWO_ELEMENTS"] = "Equals condition must be an array of 2 elements."; + FileExceptionMessages["STARTS_WITH_TWO_ELEMENTS"] = "StartsWith condition must be an array of 2 elements."; + FileExceptionMessages["CONTENT_LENGTH_RANGE_MIN_MAX"] = "ContentLengthRange must have numeric min & max fields."; + FileExceptionMessages["DOWNLOAD_MISMATCH"] = "The downloaded data did not match the data from the server. To be sure the content is the same, you should download the file again."; + FileExceptionMessages["UPLOAD_MISMATCH_DELETE_FAIL"] = "The uploaded data did not match the data from the server.\n As a precaution, we attempted to delete the file, but it was not successful.\n To be sure the content is the same, you should try removing the file manually,\n then uploading the file again.\n \n\nThe delete attempt failed with this message:\n\n "; + FileExceptionMessages["UPLOAD_MISMATCH"] = "The uploaded data did not match the data from the server.\n As a precaution, the file has been deleted.\n To be sure the content is the same, you should try uploading the file again."; + FileExceptionMessages["MD5_RESUMED_UPLOAD"] = "MD5 cannot be used with a continued resumable upload as MD5 cannot be extended from an existing value"; + FileExceptionMessages["MISSING_RESUME_CRC32C_FINAL_UPLOAD"] = "The CRC32C is missing for the final portion of a resumed upload, which is required for validation. Please provide `resumeCRC32C` if validation is required, or disable `validation`."; +})(FileExceptionMessages || (exports.FileExceptionMessages = FileExceptionMessages = {})); /** - * Create a Bucket object to interact with a Cloud Storage bucket. + * A File object is created from your {@link Bucket} object using + * {@link Bucket#file}. * * @class - * @hideconstructor - * - * @param {Storage} storage A {@link Storage} instance. - * @param {string} name The name of the bucket. - * @param {object} [options] Configuration object. - * @param {string} [options.userProject] User project. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * ``` */ -class Bucket extends index_js_1.ServiceObject { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - getFilesStream(query) { - // placeholder body, overwritten in constructor - return new stream_1.Readable(); - } - constructor(storage, name, options) { - var _a, _b, _c, _d; - options = options || {}; - // Allow for "gs://"-style input, and strip any trailing slashes. - name = name.replace(/^gs:\/\//, '').replace(/\/+$/, ''); +class File extends index_js_1.ServiceObject { + /** + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. + * + * An ACL consists of one or more entries, where each entry grants permissions + * to an entity. Permissions define the actions that can be performed against + * an object or bucket (for example, `READ` or `WRITE`); the entity defines + * who the permission applies to (for example, a specific user or group of + * users). + * + * The `acl` object on a File instance provides methods to get you a list of + * the ACLs defined on your bucket, as well as set, update, and delete them. + * + * See {@link http://goo.gl/6qBBPO| About Access Control lists} + * + * @name File#acl + * @mixes Acl + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * //- + * // Make a file publicly readable. + * //- + * const options = { + * entity: 'allUsers', + * role: storage.acl.READER_ROLE + * }; + * + * file.acl.add(options, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + /** + * The API-formatted resource description of the file. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name File#metadata + * @type {object} + */ + /** + * The file's name. + * @name File#name + * @type {string} + */ + /** + * @callback Crc32cGeneratorToStringCallback + * A method returning the CRC32C as a base64-encoded string. + * + * @returns {string} + * + * @example + * Hashing the string 'data' should return 'rth90Q==' + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.toString(); // 'rth90Q==' + * ``` + **/ + /** + * @callback Crc32cGeneratorValidateCallback + * A method validating a base64-encoded CRC32C string. + * + * @param {string} [value] base64-encoded CRC32C string to validate + * @returns {boolean} + * + * @example + * Should return `true` if the value matches, `false` otherwise + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.validate('DkjKuA=='); // false + * crc32c.validate('rth90Q=='); // true + * ``` + **/ + /** + * @callback Crc32cGeneratorUpdateCallback + * A method for passing `Buffer`s for CRC32C generation. + * + * @param {Buffer} [data] data to update CRC32C value with + * @returns {undefined} + * + * @example + * Hashing buffers from 'some ' and 'text\n' + * + * ```js + * const buffer1 = Buffer.from('some '); + * crc32c.update(buffer1); + * + * const buffer2 = Buffer.from('text\n'); + * crc32c.update(buffer2); + * + * crc32c.toString(); // 'DkjKuA==' + * ``` + **/ + /** + * @typedef {object} CRC32CValidator + * @property {Crc32cGeneratorToStringCallback} + * @property {Crc32cGeneratorValidateCallback} + * @property {Crc32cGeneratorUpdateCallback} + */ + /** + * @callback Crc32cGeneratorCallback + * @returns {CRC32CValidator} + */ + /** + * @typedef {object} FileOptions Options passed to the File constructor. + * @property {string} [encryptionKey] A custom encryption key. + * @property {number} [generation] Generation to scope the file to. + * @property {string} [kmsKeyName] Cloud KMS Key used to encrypt this + * object, if the object is encrypted by such a key. Limited availability; + * usable only by enabled projects. + * @property {string} [userProject] The ID of the project which will be + * billed for all requests made from File object. + * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} + */ + /** + * Constructs a file object. + * + * @param {Bucket} bucket The Bucket instance this file is + * attached to. + * @param {string} name The name of the remote file. + * @param {FileOptions} [options] Configuration options. + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * ``` + */ + constructor(bucket, name, options = {}) { + var _a, _b; const requestQueryObject = {}; - if ((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { - requestQueryObject.ifGenerationMatch = - options.preconditionOpts.ifGenerationMatch; - } - if ((_b = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { - requestQueryObject.ifGenerationNotMatch = - options.preconditionOpts.ifGenerationNotMatch; - } - if ((_c = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { - requestQueryObject.ifMetagenerationMatch = - options.preconditionOpts.ifMetagenerationMatch; - } - if ((_d = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { - requestQueryObject.ifMetagenerationNotMatch = - options.preconditionOpts.ifMetagenerationNotMatch; + let generation; + if (options.generation !== null) { + if (typeof options.generation === 'string') { + generation = Number(options.generation); + } + else { + generation = options.generation; + } + if (!isNaN(generation)) { + requestQueryObject.generation = generation; + } } - const userProject = options.userProject; + Object.assign(requestQueryObject, options.preconditionOpts); + const userProject = options.userProject || bucket.userProject; if (typeof userProject === 'string') { requestQueryObject.userProject = userProject; } const methods = { /** - * Create a bucket. - * - * @method Bucket#create - * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. - * @param {CreateBucketCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * bucket.create(function(err, bucket, apiResponse) { - * if (!err) { - * // The bucket was created successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.create().then(function(data) { - * const bucket = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - create: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * IamDeleteBucketOptions Configuration options. - * @property {boolean} [ignoreNotFound = false] Ignore an error if - * the bucket does not exist. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} DeleteBucketResponse + * @typedef {array} DeleteFileResponse * @property {object} 0 The full API response. */ /** - * @callback DeleteBucketCallback + * @callback DeleteFileCallback * @param {?Error} err Request error, if any. * @param {object} apiResponse The full API response. */ /** - * Delete the bucket. + * Delete the file. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/delete| Buckets: delete API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} * - * @method Bucket#delete - * @param {DeleteBucketOptions} [options] Configuration options. + * @method File#delete + * @param {object} [options] Configuration options. * @param {boolean} [options.ignoreNotFound = false] Ignore an error if - * the bucket does not exist. + * the file does not exist. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {DeleteBucketCallback} [callback] Callback function. - * @returns {Promise} + * @param {DeleteFileCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * bucket.delete(function(err, apiResponse) {}); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * file.delete(function(err, apiResponse) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.delete().then(function(data) { + * file.delete().then(function(data) { * const apiResponse = data[0]; * }); * * ``` - * @example include:samples/buckets.js - * region_tag:storage_delete_bucket + * @example include:samples/files.js + * region_tag:storage_delete_file * Another example: */ delete: { @@ -152999,41 +158487,38 @@ class Bucket extends index_js_1.ServiceObject { }, }, /** - * @typedef {object} BucketExistsOptions Configuration options for Bucket#exists(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} BucketExistsResponse - * @property {boolean} 0 Whether the {@link Bucket} exists. + * @typedef {array} FileExistsResponse + * @property {boolean} 0 Whether the {@link File} exists. */ /** - * @callback BucketExistsCallback + * @callback FileExistsCallback * @param {?Error} err Request error, if any. - * @param {boolean} exists Whether the {@link Bucket} exists. + * @param {boolean} exists Whether the {@link File} exists. */ /** - * Check if the bucket exists. + * Check if the file exists. * - * @method Bucket#exists - * @param {BucketExistsOptions} [options] Configuration options. + * @method File#exists + * @param {options} [options] Configuration options. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {BucketExistsCallback} [callback] Callback function. - * @returns {Promise} + * @param {FileExistsCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.exists(function(err, exists) {}); + * const file = myBucket.file('my-file'); + * + * file.exists(function(err, exists) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.exists().then(function(data) { + * file.exists().then(function(data) { * const exists = data[0]; * }); * ``` @@ -153044,55 +158529,48 @@ class Bucket extends index_js_1.ServiceObject { }, }, /** - * @typedef {object} [GetBucketOptions] Configuration options for Bucket#get() - * @property {boolean} [autoCreate] Automatically create the object if - * it does not exist. Default: `false` - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} GetBucketResponse - * @property {Bucket} 0 The {@link Bucket}. + * @typedef {array} GetFileResponse + * @property {File} 0 The {@link File}. * @property {object} 1 The full API response. */ /** - * @callback GetBucketCallback + * @callback GetFileCallback * @param {?Error} err Request error, if any. - * @param {Bucket} bucket The {@link Bucket}. + * @param {File} file The {@link File}. * @param {object} apiResponse The full API response. */ /** - * Get a bucket if it exists. - * - * You may optionally use this to "get or create" an object by providing - * an object with `autoCreate` set to `true`. Any extra configuration that - * is normally required for the `create` method must be contained within - * this object as well. + * Get a file object and its metadata if it exists. * - * @method Bucket#get - * @param {GetBucketOptions} [options] Configuration options. - * @param {boolean} [options.autoCreate] Automatically create the object if - * it does not exist. Default: `false` + * @method File#get + * @param {options} [options] Configuration options. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {GetBucketCallback} [callback] Callback function. - * @returns {Promise} + * @param {number} [options.generation] The generation number to get + * @param {string} [options.restoreToken] If this is a soft-deleted object in an HNS-enabled bucket, returns the restore token which will + * be necessary to restore it if there's a name conflict with another object. + * @param {boolean} [options.softDeleted] If true, returns the soft-deleted object. + Object `generation` is required if `softDeleted` is set to True. + * @param {GetFileCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.get(function(err, bucket, apiResponse) { - * // `bucket.metadata` has been populated. + * const file = myBucket.file('my-file'); + * + * file.get(function(err, file, apiResponse) { + * // file.metadata` has been populated. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.get().then(function(data) { - * const bucket = data[0]; + * file.get().then(function(data) { + * const file = data[0]; * const apiResponse = data[1]; * }); * ``` @@ -153103,55 +158581,50 @@ class Bucket extends index_js_1.ServiceObject { }, }, /** - * @typedef {array} GetBucketMetadataResponse - * @property {object} 0 The bucket metadata. + * @typedef {array} GetFileMetadataResponse + * @property {object} 0 The {@link File} metadata. * @property {object} 1 The full API response. */ /** - * @callback GetBucketMetadataCallback + * @callback GetFileMetadataCallback * @param {?Error} err Request error, if any. - * @param {object} metadata The bucket metadata. + * @param {object} metadata The {@link File} metadata. * @param {object} apiResponse The full API response. */ /** - * @typedef {object} GetBucketMetadataOptions Configuration options for Bucket#getMetadata(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * Get the bucket's metadata. - * - * To set metadata, see {@link Bucket#setMetadata}. + * Get the file's metadata. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/get| Buckets: get API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/get| Objects: get API Documentation} * - * @method Bucket#getMetadata - * @param {GetBucketMetadataOptions} [options] Configuration options. + * @method File#getMetadata + * @param {object} [options] Configuration options. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - * @param {GetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} + * @param {GetFileMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.getMetadata(function(err, metadata, apiResponse) {}); + * const file = myBucket.file('my-file'); + * + * file.getMetadata(function(err, metadata, apiResponse) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getMetadata().then(function(data) { + * file.getMetadata().then(function(data) { * const metadata = data[0]; * const apiResponse = data[1]; * }); * * ``` - * @example include:samples/requesterPays.js - * region_tag:storage_get_requester_pays_status - * Example of retrieving the requester pays status of a bucket: + * @example include:samples/files.js + * region_tag:storage_get_metadata + * Another example: */ getMetadata: { reqOpts: { @@ -153159,87 +158632,89 @@ class Bucket extends index_js_1.ServiceObject { }, }, /** - * @typedef {object} SetBucketMetadataOptions Configuration options for Bucket#setMetadata(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * @typedef {object} SetFileMetadataOptions Configuration options for File#setMetadata(). + * @param {string} [userProject] The ID of the project which will be billed for the request. */ /** - * @typedef {array} SetBucketMetadataResponse - * @property {object} apiResponse The full API response. + * @callback SetFileMetadataCallback + * @param {?Error} err Request error, if any. + * @param {object} apiResponse The full API response. */ /** - * @callback SetBucketMetadataCallback - * @param {?Error} err Request error, if any. - * @param {object} metadata The bucket metadata. + * @typedef {array} SetFileMetadataResponse + * @property {object} 0 The full API response. */ /** - * Set the bucket's metadata. + * Merge the given metadata with the current remote file's metadata. This + * will set metadata if it was previously unset or update previously set + * metadata. To unset previously set metadata, set its value to null. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * You can set custom key/value pairs in the metadata key of the given + * object, however the other properties outside of this object must adhere + * to the {@link https://goo.gl/BOnnCK| official API documentation}. * - * @method Bucket#setMetadata - * @param {object} metadata The metadata you wish to set. - * @param {SetBucketMetadataOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} + * + * See the examples below for more information. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} + * + * @method File#setMetadata + * @param {object} [metadata] The metadata you wish to update. + * @param {SetFileMetadataOptions} [options] Configuration options. + * @param {SetFileMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); * - * //- - * // Set website metadata field on the bucket. - * //- * const metadata = { - * website: { - * mainPageSuffix: 'http://example.com', - * notFoundPage: 'http://example.com/404.html' + * contentType: 'application/x-font-ttf', + * metadata: { + * my: 'custom', + * properties: 'go here' * } * }; * - * bucket.setMetadata(metadata, function(err, apiResponse) {}); - * - * //- - * // Enable versioning for your bucket. - * //- - * bucket.setMetadata({ - * versioning: { - * enabled: true - * } - * }, function(err, apiResponse) {}); + * file.setMetadata(metadata, function(err, apiResponse) {}); * - * //- - * // Enable KMS encryption for objects within this bucket. - * //- - * bucket.setMetadata({ - * encryption: { - * defaultKmsKeyName: 'projects/grape-spaceship-123/...' + * // Assuming current metadata = { hello: 'world', unsetMe: 'will do' } + * file.setMetadata({ + * metadata: { + * abc: '123', // will be set. + * unsetMe: null, // will be unset (deleted). + * hello: 'goodbye' // will be updated from 'world' to 'goodbye'. * } - * }, function(err, apiResponse) {}); + * }, function(err, apiResponse) { + * // metadata should now be { abc: '123', hello: 'goodbye' } + * }); * * //- - * // Set the default event-based hold value for new objects in this - * // bucket. - * //- - * bucket.setMetadata({ - * defaultEventBasedHold: true + * // Set a temporary hold on this file from its bucket's retention period + * // configuration. + * // + * file.setMetadata({ + * temporaryHold: true * }, function(err, apiResponse) {}); * * //- - * // Remove object lifecycle rules. + * // Alternatively, you may set a temporary hold. This will follow the + * // same behavior as an event-based hold, with the exception that the + * // bucket's retention policy will not renew for this file from the time + * // the hold is released. * //- - * bucket.setMetadata({ - * lifecycle: null + * file.setMetadata({ + * eventBasedHold: true * }, function(err, apiResponse) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.setMetadata(metadata).then(function(data) { + * file.setMetadata(metadata).then(function(data) { * const apiResponse = data[0]; * }); * ``` @@ -153251,1542 +158726,1619 @@ class Bucket extends index_js_1.ServiceObject { }, }; super({ - parent: storage, - baseUrl: '/b', - id: name, - createMethod: storage.createBucket.bind(storage), + parent: bucket, + baseUrl: '/o', + id: encodeURIComponent(name), methods, }); + _File_instances.add(this); + this.bucket = bucket; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this.storage = bucket.parent; + // @TODO Can this duplicate code from above be avoided? + if (options.generation !== null) { + let generation; + if (typeof options.generation === 'string') { + generation = Number(options.generation); + } + else { + generation = options.generation; + } + if (!isNaN(generation)) { + this.generation = generation; + } + } + this.kmsKeyName = options.kmsKeyName; + this.userProject = userProject; this.name = name; - this.storage = storage; - this.userProject = options.userProject; + if (options.encryptionKey) { + this.setEncryptionKey(options.encryptionKey); + } this.acl = new acl_js_1.Acl({ request: this.request.bind(this), pathPrefix: '/acl', }); - this.acl.default = new acl_js_1.Acl({ - request: this.request.bind(this), - pathPrefix: '/defaultObjectAcl', - }); this.crc32cGenerator = - options.crc32cGenerator || this.storage.crc32cGenerator; - this.iam = new iam_js_1.Iam(this); - this.getFilesStream = paginator_1.paginator.streamify('getFiles'); - this.instanceRetryValue = storage.retryOptions.autoRetry; + options.crc32cGenerator || this.bucket.crc32cGenerator; + this.instanceRetryValue = (_b = (_a = this.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry; this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts; } /** - * The bucket's Cloud Storage URI (`gs://`) + * The object's Cloud Storage URI (`gs://`) * * @example * ```ts * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('image.png'); * - * // `gs://my-bucket` - * const href = bucket.cloudStorageURI.href; + * // `gs://my-bucket/image.png` + * const href = file.cloudStorageURI.href; * ``` */ get cloudStorageURI() { - const uri = new url_1.URL('gs://'); - uri.host = this.name; + const uri = this.bucket.cloudStorageURI; + uri.pathname = this.name; return uri; } /** - * @typedef {object} AddLifecycleRuleOptions Configuration options for Bucket#addLifecycleRule(). - * @property {boolean} [append=true] The new rules will be appended to any - * pre-existing rules. - */ - /** - * - * @typedef {object} LifecycleRule The new lifecycle rule to be added to objects - * in this bucket. - * @property {string|object} action The action to be taken upon matching of - * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. - * **Note**: For configuring a raw-formatted rule object to be passed as `action` - * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. - * @property {object} condition Condition a bucket must meet before the - * action occurs on the bucket. Refer to following supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. - * @property {string} [storageClass] When using the `setStorageClass` - * action, provide this option to dictate which storage class the object - * should update to. Please see - * [SetStorageClass option documentation]{@link https://cloud.google.com/storage/docs/lifecycle#setstorageclass} for supported transitions. - */ - /** - * Add an object lifecycle management rule to the bucket. - * - * By default, an Object Lifecycle Management rule provided to this method - * will be included to the existing policy. To replace all existing rules, - * supply the `options` argument, setting `append` to `false`. - * - * To add multiple rules, pass a list to the `rule` parameter. Calling this - * function multiple times asynchronously does not guarantee that all rules - * are added correctly. - * - * See {@link https://cloud.google.com/storage/docs/lifecycle| Object Lifecycle Management} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} - * - * @param {LifecycleRule|LifecycleRule[]} rule The new lifecycle rule or rules to be added to objects - * in this bucket. - * @param {string|object} rule.action The action to be taken upon matching of - * all the conditions 'delete', 'setStorageClass', or 'AbortIncompleteMultipartUpload'. - * **Note**: For configuring a raw-formatted rule object to be passed as `action` - * please refer to the [examples]{@link https://cloud.google.com/storage/docs/managing-lifecycles#configexamples}. - * @param {object} rule.condition Condition a bucket must meet before the - * action occurson the bucket. Refer to followitn supported [conditions]{@link https://cloud.google.com/storage/docs/lifecycle#conditions}. - * @param {string} [rule.storageClass] When using the `setStorageClass` - * action, provide this option to dictate which storage class the object - * should update to. - * @param {AddLifecycleRuleOptions} [options] Configuration object. - * @param {boolean} [options.append=true] Append the new rule to the existing - * policy. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Automatically have an object deleted from this bucket once it is 3 years - * // of age. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * age: 365 * 3 // Specified in days. - * } - * }, function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } - * - * const lifecycleRules = bucket.metadata.lifecycle.rule; - * - * // Iterate over the Object Lifecycle Management rules on this bucket. - * lifecycleRules.forEach(lifecycleRule => {}); - * }); - * - * //- - * // By default, the rule you provide will be added to the existing policy. - * // Optionally, you can disable this behavior to replace all of the - * // pre-existing rules. - * //- - * const options = { - * append: false - * }; - * - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * age: 365 * 3 // Specified in days. - * } - * }, options, function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } - * - * // All rules have been replaced with the new "delete" rule. - * - * // Iterate over the Object Lifecycle Management rules on this bucket. - * lifecycleRules.forEach(lifecycleRule => {}); - * }); - * - * //- - * // For objects created before 2018, "downgrade" the storage class. - * //- - * bucket.addLifecycleRule({ - * action: 'setStorageClass', - * storageClass: 'COLDLINE', - * condition: { - * createdBefore: new Date('2018') - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete objects created before 2016 which have the Coldline storage - * // class. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * matchesStorageClass: [ - * 'COLDLINE' - * ], - * createdBefore: new Date('2016') - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete object that has a noncurrent timestamp that is at least 100 days. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * daysSinceNoncurrentTime: 100 - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete object that has a noncurrent timestamp before 2020-01-01. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * noncurrentTimeBefore: new Date('2020-01-01') - * } - * }, function(err, apiResponse) {}); - * - * //- - * // Delete object that has a customTime that is at least 100 days. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * daysSinceCustomTime: 100 - * } - * }, function(err, apiResponse) ()); - * - * //- - * // Delete object that has a customTime before 2020-01-01. - * //- - * bucket.addLifecycleRule({ - * action: 'delete', - * condition: { - * customTimeBefore: new Date('2020-01-01') - * } - * }, function(err, apiResponse) {}); - * ``` - */ - addLifecycleRule(rule, optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - options = options || {}; - const rules = Array.isArray(rule) ? rule : [rule]; - for (const curRule of rules) { - if (curRule.condition.createdBefore instanceof Date) { - curRule.condition.createdBefore = curRule.condition.createdBefore - .toISOString() - .replace(/T.+$/, ''); - } - if (curRule.condition.customTimeBefore instanceof Date) { - curRule.condition.customTimeBefore = curRule.condition.customTimeBefore - .toISOString() - .replace(/T.+$/, ''); - } - if (curRule.condition.noncurrentTimeBefore instanceof Date) { - curRule.condition.noncurrentTimeBefore = - curRule.condition.noncurrentTimeBefore - .toISOString() - .replace(/T.+$/, ''); - } - } - if (options.append === false) { - this.setMetadata({ lifecycle: { rule: rules } }, options, callback); - return; - } - // The default behavior appends the previously-defined lifecycle rules with - // the new ones just passed in by the user. - this.getMetadata((err, metadata) => { - var _a, _b; - if (err) { - callback(err); - return; - } - const currentLifecycleRules = Array.isArray((_a = metadata.lifecycle) === null || _a === void 0 ? void 0 : _a.rule) - ? (_b = metadata.lifecycle) === null || _b === void 0 ? void 0 : _b.rule - : []; - this.setMetadata({ - lifecycle: { rule: currentLifecycleRules.concat(rules) }, - }, options, callback); - }); - } - /** - * @typedef {object} CombineOptions - * @property {string} [kmsKeyName] Resource name of the Cloud KMS key, of - * the form - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, - * that will be used to encrypt the object. Overwrites the object - * metadata's `kms_key_name` value, if any. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @callback CombineCallback - * @param {?Error} err Request error, if any. - * @param {File} newFile The new {@link File}. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} CombineResponse - * @property {File} 0 The new {@link File}. - * @property {object} 1 The full API response. - */ - /** - * Combine multiple files into one new file. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/compose| Objects: compose API Documentation} - * - * @throws {Error} if a non-array is provided as sources argument. - * @throws {Error} if no sources are provided. - * @throws {Error} if no destination is provided. - * - * @param {string[]|File[]} sources The source files that will be - * combined. - * @param {string|File} destination The file you would like the - * source files combined into. - * @param {CombineOptions} [options] Configuration options. - * @param {string} [options.kmsKeyName] Resource name of the Cloud KMS key, of - * the form - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, - * that will be used to encrypt the object. Overwrites the object - * metadata's `kms_key_name` value, if any. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - - * @param {CombineCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const logBucket = storage.bucket('log-bucket'); - * - * const sources = [ - * logBucket.file('2013-logs.txt'), - * logBucket.file('2014-logs.txt') - * ]; - * - * const allLogs = logBucket.file('all-logs.txt'); - * - * logBucket.combine(sources, allLogs, function(err, newFile, apiResponse) { - * // newFile === allLogs - * }); + * A helper method for determining if a request should be retried based on preconditions. + * This should only be used for methods where the idempotency is determined by + * `ifGenerationMatch` + * @private * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * logBucket.combine(sources, allLogs).then(function(data) { - * const newFile = data[0]; - * const apiResponse = data[1]; - * }); - * ``` + * A request should not be retried under the following conditions: + * - if precondition option `ifGenerationMatch` is not set OR + * - if `idempotencyStrategy` is set to `RetryNever` */ - combine(sources, destination, optionsOrCallback, callback) { + shouldRetryBasedOnPreconditionAndIdempotencyStrat(options) { var _a; - if (!Array.isArray(sources) || sources.length === 0) { - throw new Error(BucketExceptionMessages.PROVIDE_SOURCE_FILE); - } - if (!destination) { - throw new Error(BucketExceptionMessages.DESTINATION_FILE_NOT_SPECIFIED); - } - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, // Not relevant but param is required - AvailableServiceObjectMethods.setMetadata, // Same as above - options); - const convertToFile = (file) => { - if (file instanceof file_js_1.File) { - return file; - } - return this.file(file); - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - sources = sources.map(convertToFile); - const destinationFile = convertToFile(destination); - callback = callback || index_js_1.util.noop; - if (!destinationFile.metadata.contentType) { - const destinationContentType = mime_1.default.getType(destinationFile.name) || undefined; - if (destinationContentType) { - destinationFile.metadata.contentType = destinationContentType; - } - } - let maxRetries = this.storage.retryOptions.maxRetries; - if ((((_a = destinationFile === null || destinationFile === void 0 ? void 0 : destinationFile.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === - undefined && - options.ifGenerationMatch === undefined && + return !(((options === null || options === void 0 ? void 0 : options.ifGenerationMatch) === undefined && + ((_a = this.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && this.storage.retryOptions.idempotencyStrategy === storage_js_1.IdempotencyStrategy.RetryConditional) || this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - maxRetries = 0; - } - if (options.ifGenerationMatch === undefined) { - Object.assign(options, destinationFile.instancePreconditionOpts, options); - } - // Make the request from the destination File object. - destinationFile.request({ - method: 'POST', - uri: '/compose', - maxRetries, - json: { - destination: { - contentType: destinationFile.metadata.contentType, - contentEncoding: destinationFile.metadata.contentEncoding, - }, - sourceObjects: sources.map(source => { - const sourceObject = { - name: source.name, - }; - if (source.metadata && source.metadata.generation) { - sourceObject.generation = parseInt(source.metadata.generation.toString()); - } - return sourceObject; - }), - }, - qs: options, - }, (err, resp) => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - if (err) { - callback(err, null, resp); - return; - } - callback(null, destinationFile, resp); - }); + storage_js_1.IdempotencyStrategy.RetryNever); } /** - * See a {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll request body}. - * - * @typedef {object} CreateChannelConfig - * @property {string} address The address where notifications are - * delivered for this channel. - * @property {string} [delimiter] Returns results in a directory-like mode. - * @property {number} [maxResults] Maximum number of `items` plus `prefixes` - * to return in a single page of responses. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @property {string} [prefix] Filter results to objects whose names begin - * with this prefix. - * @property {string} [projection=noAcl] Set of properties to return. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {boolean} [versions=false] If `true`, lists all versions of an object - * as distinct results. - */ - /** - * @typedef {object} CreateChannelOptions - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @typedef {array} CreateChannelResponse - * @property {Channel} 0 The new {@link Channel}. + * @typedef {array} CopyResponse + * @property {File} 0 The copied {@link File}. * @property {object} 1 The full API response. */ /** - * @callback CreateChannelCallback + * @callback CopyCallback * @param {?Error} err Request error, if any. - * @param {Channel} channel The new {@link Channel}. + * @param {File} copiedFile The copied {@link File}. * @param {object} apiResponse The full API response. */ /** - * Create a channel that will be notified when objects in this bucket changes. - * - * @throws {Error} If an ID is not provided. - * @throws {Error} If an address is not provided. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/watchAll| Objects: watchAll API Documentation} - * - * @param {string} id The ID of the channel to create. - * @param {CreateChannelConfig} config Configuration for creating channel. - * @param {string} config.address The address where notifications are - * delivered for this channel. - * @param {string} [config.delimiter] Returns results in a directory-like mode. - * @param {number} [config.maxResults] Maximum number of `items` plus `prefixes` - * to return in a single page of responses. - * @param {string} [config.pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @param {string} [config.prefix] Filter results to objects whose names begin - * with this prefix. - * @param {string} [config.projection=noAcl] Set of properties to return. - * @param {string} [config.userProject] The ID of the project which will be - * billed for the request. - * @param {boolean} [config.versions=false] If `true`, lists all versions of an object - * as distinct results. - * @param {CreateChannelOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {CreateChannelCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const id = 'new-channel-id'; - * - * const config = { - * address: 'https://...' - * }; - * - * bucket.createChannel(id, config, function(err, channel, apiResponse) { - * if (!err) { - * // Channel created successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.createChannel(id, config).then(function(data) { - * const channel = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - createChannel(id, config, optionsOrCallback, callback) { - if (typeof id !== 'string') { - throw new Error(BucketExceptionMessages.CHANNEL_ID_REQUIRED); - } - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - this.request({ - method: 'POST', - uri: '/o/watch', - json: Object.assign({ - id, - type: 'web_hook', - }, config), - qs: options, - }, (err, apiResponse) => { - if (err) { - callback(err, null, apiResponse); - return; - } - const resourceId = apiResponse.resourceId; - const channel = this.storage.channel(id, resourceId); - channel.metadata = apiResponse; - callback(null, channel, apiResponse); - }); - } - /** - * Metadata to set for the Notification. - * - * @typedef {object} CreateNotificationOptions - * @property {object} [customAttributes] An optional list of additional - * attributes to attach to each Cloud PubSub message published for this - * notification subscription. - * @property {string[]} [eventTypes] If present, only send notifications about - * listed event types. If empty, sent notifications for all event types. - * @property {string} [objectNamePrefix] If present, only apply this - * notification configuration to object names that begin with this prefix. - * @property {string} [payloadFormat] The desired content of the Payload. - * Defaults to `JSON_API_V1`. - * - * Acceptable values are: - * - `JSON_API_V1` - * - * - `NONE` + * @typedef {object} CopyOptions Configuration options for File#copy(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @property {string} [cacheControl] The cacheControl setting for the new file. + * @property {string} [contentEncoding] The contentEncoding setting for the new file. + * @property {string} [contentType] The contentType setting for the new file. + * @property {string} [destinationKmsKeyName] Resource name of the Cloud + * KMS key, of the form + * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, + * that will be used to encrypt the object. Overwrites the object + * metadata's `kms_key_name` value, if any. + * @property {Metadata} [metadata] Metadata to specify on the copied file. + * @property {string} [predefinedAcl] Set the ACL for the new file. + * @property {string} [token] A previously-returned `rewriteToken` from an + * unfinished rewrite request. * @property {string} [userProject] The ID of the project which will be * billed for the request. */ /** - * @callback CreateNotificationCallback - * @param {?Error} err Request error, if any. - * @param {Notification} notification The new {@link Notification}. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} CreateNotificationResponse - * @property {Notification} 0 The new {@link Notification}. - * @property {object} 1 The full API response. - */ - /** - * Creates a notification subscription for the bucket. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} - * - * @param {Topic|string} topic The Cloud PubSub topic to which this - * subscription publishes. If the project ID is omitted, the current - * project ID will be used. - * - * Acceptable formats are: - * - `projects/grape-spaceship-123/topics/my-topic` + * Copy this file to another file. By default, this will copy the file to the + * same bucket, but you can choose to copy it to another Bucket by providing + * a Bucket or File object or a URL starting with "gs://". + * The generation of the file will not be preserved. * - * - `my-topic` - * @param {CreateNotificationOptions} [options] Metadata to set for the - * notification. - * @param {object} [options.customAttributes] An optional list of additional - * attributes to attach to each Cloud PubSub message published for this - * notification subscription. - * @param {string[]} [options.eventTypes] If present, only send notifications about - * listed event types. If empty, sent notifications for all event types. - * @param {string} [options.objectNamePrefix] If present, only apply this - * notification configuration to object names that begin with this prefix. - * @param {string} [options.payloadFormat] The desired content of the Payload. - * Defaults to `JSON_API_V1`. + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite| Objects: rewrite API Documentation} * - * Acceptable values are: - * - `JSON_API_V1` + * @throws {Error} If the destination file is not provided. * - * - `NONE` - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {CreateNotificationCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} If a valid topic is not provided. - * @see Notification#create + * @param {string|Bucket|File} destination Destination file. + * @param {CopyOptions} [options] Configuration options. See an + * @param {CopyCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); * - * const callback = function(err, notification, apiResponse) { - * if (!err) { - * // The notification was created successfully. - * } - * }; + * //- + * // You can pass in a variety of types for the destination. + * // + * // For all of the below examples, assume we are working with the following + * // Bucket and File objects. + * //- + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); * - * myBucket.createNotification('my-topic', callback); + * //- + * // If you pass in a string for the destination, the file is copied to its + * // current bucket, under the new name provided. + * //- + * file.copy('my-image-copy.png', function(err, copiedFile, apiResponse) { + * // `my-bucket` now contains: + * // - "my-image.png" + * // - "my-image-copy.png" + * + * // `copiedFile` is an instance of a File object that refers to your new + * // file. + * }); * * //- - * // Configure the nofiication by providing Notification metadata. + * // If you pass in a string starting with "gs://" for the destination, the + * // file is copied to the other bucket and under the new name provided. * //- - * const metadata = { - * objectNamePrefix: 'prefix-' - * }; + * const newLocation = 'gs://another-bucket/my-image-copy.png'; + * file.copy(newLocation, function(err, copiedFile, apiResponse) { + * // `my-bucket` still contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image-copy.png" * - * myBucket.createNotification('my-topic', metadata, callback); + * // `copiedFile` is an instance of a File object that refers to your new + * // file. + * }); + * + * //- + * // If you pass in a Bucket object, the file will be copied to that bucket + * // using the same name. + * //- + * const anotherBucket = storage.bucket('another-bucket'); + * file.copy(anotherBucket, function(err, copiedFile, apiResponse) { + * // `my-bucket` still contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image.png" + * + * // `copiedFile` is an instance of a File object that refers to your new + * // file. + * }); + * + * //- + * // If you pass in a File object, you have complete control over the new + * // bucket and filename. + * //- + * const anotherFile = anotherBucket.file('my-awesome-image.png'); + * file.copy(anotherFile, function(err, copiedFile, apiResponse) { + * // `my-bucket` still contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-awesome-image.png" + * + * // Note: + * // The `copiedFile` parameter is equal to `anotherFile`. + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * myBucket.createNotification('my-topic').then(function(data) { - * const notification = data[0]; + * file.copy(newLocation).then(function(data) { + * const newFile = data[0]; * const apiResponse = data[1]; * }); * * ``` - * @example include:samples/createNotification.js - * region_tag:storage_create_bucket_notifications + * @example include:samples/files.js + * region_tag:storage_copy_file * Another example: */ - createNotification(topic, optionsOrCallback, callback) { + copy(destination, optionsOrCallback, callback) { + var _a, _b; + const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME); + if (!destination) { + throw noDestinationError; + } let options = {}; if (typeof optionsOrCallback === 'function') { callback = optionsOrCallback; } else if (optionsOrCallback) { - options = optionsOrCallback; + options = { ...optionsOrCallback }; } - const topicIsObject = topic !== null && typeof topic === 'object'; - if (topicIsObject && index_js_1.util.isCustomType(topic, 'pubsub/topic')) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - topic = topic.name; + callback = callback || index_js_1.util.noop; + let destBucket; + let destName; + let newFile; + if (typeof destination === 'string') { + const parsedDestination = GS_URL_REGEXP.exec(destination); + if (parsedDestination !== null && parsedDestination.length === 3) { + destBucket = this.storage.bucket(parsedDestination[1]); + destName = parsedDestination[2]; + } + else { + destBucket = this.bucket; + destName = destination; + } } - if (typeof topic !== 'string') { - throw new Error(BucketExceptionMessages.TOPIC_NAME_REQUIRED); + else if (destination instanceof bucket_js_1.Bucket) { + destBucket = destination; + destName = this.name; } - const body = Object.assign({ topic }, options); - if (body.topic.indexOf('projects') !== 0) { - body.topic = 'projects/{{projectId}}/topics/' + body.topic; + else if (destination instanceof File) { + destBucket = destination.bucket; + destName = destination.name; + newFile = destination; } - body.topic = `//pubsub.${this.storage.universeDomain}/` + body.topic; - if (!body.payloadFormat) { - body.payloadFormat = 'JSON_API_V1'; + else { + throw noDestinationError; } const query = {}; - if (body.userProject) { - query.userProject = body.userProject; - delete body.userProject; + if (this.generation !== undefined) { + query.sourceGeneration = this.generation; + } + if (options.token !== undefined) { + query.rewriteToken = options.token; + } + if (options.userProject !== undefined) { + query.userProject = options.userProject; + delete options.userProject; + } + if (options.predefinedAcl !== undefined) { + query.destinationPredefinedAcl = options.predefinedAcl; + delete options.predefinedAcl; + } + newFile = newFile || destBucket.file(destName); + const headers = {}; + if (this.encryptionKey !== undefined) { + headers['x-goog-copy-source-encryption-algorithm'] = 'AES256'; + headers['x-goog-copy-source-encryption-key'] = this.encryptionKeyBase64; + headers['x-goog-copy-source-encryption-key-sha256'] = + this.encryptionKeyHash; + } + if (newFile.encryptionKey !== undefined) { + this.setEncryptionKey(newFile.encryptionKey); + } + else if (options.destinationKmsKeyName !== undefined) { + query.destinationKmsKeyName = options.destinationKmsKeyName; + delete options.destinationKmsKeyName; + } + else if (newFile.kmsKeyName !== undefined) { + query.destinationKmsKeyName = newFile.kmsKeyName; + } + if (query.destinationKmsKeyName) { + this.kmsKeyName = query.destinationKmsKeyName; + const keyIndex = this.interceptors.indexOf(this.encryptionKeyInterceptor); + if (keyIndex > -1) { + this.interceptors.splice(keyIndex, 1); + } + } + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { + this.storage.retryOptions.autoRetry = false; + } + if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) { + query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch; + delete options.preconditionOpts; } this.request({ method: 'POST', - uri: '/notificationConfigs', - json: (0, util_js_1.convertObjKeysToSnakeCase)(body), + uri: `/rewriteTo/b/${destBucket.name}/o/${encodeURIComponent(newFile.name)}`, qs: query, - maxRetries: 0, //explicitly set this value since this is a non-idempotent function - }, (err, apiResponse) => { + json: options, + headers, + }, (err, resp) => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; if (err) { - callback(err, null, apiResponse); + callback(err, null, resp); return; } - const notification = this.notification(apiResponse.id); - notification.metadata = apiResponse; - callback(null, notification, apiResponse); + if (resp.rewriteToken) { + const options = { + token: resp.rewriteToken, + }; + if (query.userProject) { + options.userProject = query.userProject; + } + if (query.destinationKmsKeyName) { + options.destinationKmsKeyName = query.destinationKmsKeyName; + } + this.copy(newFile, options, callback); + return; + } + callback(null, newFile, resp); }); } /** - * @typedef {object} DeleteFilesOptions Query object. See {@link Bucket#getFiles} - * for all of the supported properties. - * @property {boolean} [force] Suppress errors until all files have been - * processed. - */ - /** - * @callback DeleteFilesCallback - * @param {?Error|?Error[]} err Request error, if any, or array of errors from - * files that were not able to be deleted. - * @param {object} [apiResponse] The full API response. + * @typedef {object} CreateReadStreamOptions Configuration options for File#createReadStream. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string|boolean} [validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with a + * CRC32c checksum. You may use MD5 if preferred, but that hash is not + * supported for composite objects. An error will be raised if MD5 is + * specified but is not available. You may also choose to skip validation + * completely, however this is **not recommended**. + * @property {number} [start] A byte offset to begin the file's download + * from. Default is 0. NOTE: Byte ranges are inclusive; that is, + * `options.start = 0` and `options.end = 999` represent the first 1000 + * bytes in a file or object. NOTE: when specifying a byte range, data + * integrity is not available. + * @property {number} [end] A byte offset to stop reading the file at. + * NOTE: Byte ranges are inclusive; that is, `options.start = 0` and + * `options.end = 999` represent the first 1000 bytes in a file or object. + * NOTE: when specifying a byte range, data integrity is not available. + * @property {boolean} [decompress=true] Disable auto decompression of the + * received data. By default this option is set to `true`. + * Applicable in cases where the data was uploaded with + * `gzip: true` option. See {@link File#createWriteStream}. */ /** - * Iterate over the bucket's files, calling `file.delete()` on each. - * - * This is not an atomic request. A delete attempt will be - * made for each file individually. Any one can fail, in which case only a - * portion of the files you intended to be deleted would have. - * - * Operations are performed in parallel, up to 10 at once. The first error - * breaks the loop and will execute the provided callback with it. Specify - * `{ force: true }` to suppress the errors until all files have had a chance - * to be processed. - * - * File preconditions cannot be passed to this function. It will not retry unless - * the idempotency strategy is set to retry always. + * Create a readable stream to read the contents of the remote file. It can be + * piped to a writable stream or listened to for 'data' events to read a + * file's contents. * - * The `query` object passed as the first argument will also be passed to - * {@link Bucket#getFiles}. + * In the unlikely event there is a mismatch between what you downloaded and + * the version in your Bucket, your error handler will receive an error with + * code "CONTENT_DOWNLOAD_MISMATCH". If you receive this error, the best + * recourse is to try downloading the file again. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} + * NOTE: Readable streams will emit the `end` event when the file is fully + * downloaded. * - * @param {DeleteFilesOptions} [query] Query object. See {@link Bucket#getFiles} - * @param {boolean} [query.force] Suppress errors until all files have been - * processed. - * @param {DeleteFilesCallback} [callback] Callback function. - * @returns {Promise} + * @param {CreateReadStreamOptions} [options] Configuration options. + * @returns {ReadableStream} * * @example * ``` + * //- + * //

Downloading a File

+ * // + * // The example below demonstrates how we can reference a remote file, then + * // pipe its contents to a local file. This is effectively creating a local + * // backup of your remote data. + * //- * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const bucket = storage.bucket('my-bucket'); * - * //- - * // Delete all of the files in the bucket. - * //- - * bucket.deleteFiles(function(err) {}); + * const fs = require('fs'); + * const remoteFile = bucket.file('image.png'); + * const localFilename = '/Users/stephen/Photos/image.png'; * - * //- - * // By default, if a file cannot be deleted, this method will stop deleting - * // files from your bucket. You can override this setting with `force: - * // true`. - * //- - * bucket.deleteFiles({ - * force: true - * }, function(errors) { - * // `errors`: - * // Array of errors if any occurred, otherwise null. - * }); + * remoteFile.createReadStream() + * .on('error', function(err) {}) + * .on('response', function(response) { + * // Server connected and responded with the specified status and headers. + * }) + * .on('end', function() { + * // The file is fully downloaded. + * }) + * .pipe(fs.createWriteStream(localFilename)); * * //- - * // The first argument to this method acts as a query to - * // {@link Bucket#getFiles}. As an example, you can delete files - * // which match a prefix. + * // To limit the downloaded data to only a byte range, pass an options + * // object. * //- - * bucket.deleteFiles({ - * prefix: 'images/' - * }, function(err) { - * if (!err) { - * // All files in the `images` directory have been deleted. - * } - * }); + * const logFile = myBucket.file('access_log'); + * logFile.createReadStream({ + * start: 10000, + * end: 20000 + * }) + * .on('error', function(err) {}) + * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); * * //- - * // If the callback is omitted, we'll return a Promise. + * // To read a tail byte range, specify only `options.end` as a negative + * // number. * //- - * bucket.deleteFiles().then(function() {}); + * const logFile = myBucket.file('access_log'); + * logFile.createReadStream({ + * end: -100 + * }) + * .on('error', function(err) {}) + * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); * ``` */ - deleteFiles(queryOrCallback, callback) { - let query = {}; - if (typeof queryOrCallback === 'function') { - callback = queryOrCallback; + createReadStream(options = {}) { + options = Object.assign({ decompress: true }, options); + const rangeRequest = typeof options.start === 'number' || typeof options.end === 'number'; + const tailRequest = options.end < 0; + let validateStream = undefined; + let request = undefined; + const throughStream = new util_js_2.PassThroughShim(); + let crc32c = true; + let md5 = false; + if (typeof options.validation === 'string') { + const value = options.validation.toLowerCase().trim(); + crc32c = value === 'crc32c'; + md5 = value === 'md5'; } - else if (queryOrCallback) { - query = queryOrCallback; + else if (options.validation === false) { + crc32c = false; } - const MAX_PARALLEL_LIMIT = 10; - const MAX_QUEUE_SIZE = 1000; - const errors = []; - const deleteFile = (file) => { - return file.delete(query).catch(err => { - if (!query.force) { - throw err; + const shouldRunValidation = !rangeRequest && (crc32c || md5); + if (rangeRequest) { + if (typeof options.validation === 'string' || + options.validation === true) { + throw new Error(FileExceptionMessages.INVALID_VALIDATION_FILE_RANGE); + } + // Range requests can't receive data integrity checks. + crc32c = false; + md5 = false; + } + const onComplete = (err) => { + if (err) { + // There is an issue with node-fetch 2.x that if the stream errors the underlying socket connection is not closed. + // This causes a memory leak, so cleanup the sockets manually here by destroying the agent. + if (request === null || request === void 0 ? void 0 : request.agent) { + request.agent.destroy(); } - errors.push(err); - }); + throughStream.destroy(err); + } }; - (async () => { - try { - let promises = []; - const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); - const filesStream = this.getFilesStream(query); - for await (const curFile of filesStream) { - if (promises.length >= MAX_QUEUE_SIZE) { - await Promise.all(promises); - promises = []; - } - promises.push(limit(() => deleteFile(curFile)).catch(e => { - filesStream.destroy(); - throw e; - })); + // We listen to the response event from the request stream so that we + // can... + // + // 1) Intercept any data from going to the user if an error occurred. + // 2) Calculate the hashes from the http.IncomingMessage response + // stream, + // which will return the bytes from the source without decompressing + // gzip'd content. We then send it through decompressed, if + // applicable, to the user. + const onResponse = (err, _body, rawResponseStream) => { + if (err) { + // Get error message from the body. + this.getBufferFromReadable(rawResponseStream).then(body => { + err.message = body.toString('utf8'); + throughStream.destroy(err); + }); + return; + } + request = rawResponseStream.request; + const headers = rawResponseStream.toJSON().headers; + const isCompressed = headers['content-encoding'] === 'gzip'; + const hashes = {}; + // The object is safe to validate if: + // 1. It was stored gzip and returned to us gzip OR + // 2. It was never stored as gzip + const safeToValidate = (headers['x-goog-stored-content-encoding'] === 'gzip' && + isCompressed) || + headers['x-goog-stored-content-encoding'] === 'identity'; + const transformStreams = []; + if (shouldRunValidation) { + // The x-goog-hash header should be set with a crc32c and md5 hash. + // ex: headers['x-goog-hash'] = 'crc32c=xxxx,md5=xxxx' + if (typeof headers['x-goog-hash'] === 'string') { + headers['x-goog-hash'] + .split(',') + .forEach((hashKeyValPair) => { + const delimiterIndex = hashKeyValPair.indexOf('='); + const hashType = hashKeyValPair.substring(0, delimiterIndex); + const hashValue = hashKeyValPair.substring(delimiterIndex + 1); + hashes[hashType] = hashValue; + }); } - await Promise.all(promises); - callback(errors.length > 0 ? errors : null); + validateStream = new hash_stream_validator_js_1.HashStreamValidator({ + crc32c, + md5, + crc32cGenerator: this.crc32cGenerator, + crc32cExpected: hashes.crc32c, + md5Expected: hashes.md5, + }); } - catch (e) { - callback(e); + if (md5 && !hashes.md5) { + const hashError = new RequestError(FileExceptionMessages.MD5_NOT_AVAILABLE); + hashError.code = 'MD5_NOT_AVAILABLE'; + throughStream.destroy(hashError); return; } - })(); + if (safeToValidate && shouldRunValidation && validateStream) { + transformStreams.push(validateStream); + } + if (isCompressed && options.decompress) { + transformStreams.push(zlib.createGunzip()); + } + (0, stream_1.pipeline)(rawResponseStream, ...transformStreams, throughStream, onComplete); + }; + // Authenticate the request, then pipe the remote API request to the stream + // returned to the user. + const makeRequest = () => { + const query = { alt: 'media' }; + if (this.generation) { + query.generation = this.generation; + } + if (options.userProject) { + query.userProject = options.userProject; + } + const headers = { + 'Accept-Encoding': 'gzip', + 'Cache-Control': 'no-store', + }; + if (rangeRequest) { + const start = typeof options.start === 'number' ? options.start : '0'; + const end = typeof options.end === 'number' ? options.end : ''; + headers.Range = `bytes=${tailRequest ? end : `${start}-${end}`}`; + } + const reqOpts = { + uri: '', + headers, + qs: query, + }; + if (options[util_js_1.GCCL_GCS_CMD_KEY]) { + reqOpts[util_js_1.GCCL_GCS_CMD_KEY] = options[util_js_1.GCCL_GCS_CMD_KEY]; + } + this.requestStream(reqOpts) + .on('error', err => { + throughStream.destroy(err); + }) + .on('response', res => { + throughStream.emit('response', res); + index_js_1.util.handleResp(null, res, null, onResponse); + }) + .resume(); + }; + throughStream.on('reading', makeRequest); + return throughStream; } /** - * @deprecated - * @typedef {array} DeleteLabelsResponse - * @property {object} 0 The full API response. + * @callback CreateResumableUploadCallback + * @param {?Error} err Request error, if any. + * @param {string} uri The resumable upload's unique session URI. */ /** - * @deprecated - * @callback DeleteLabelsCallback - * @param {?Error} err Request error, if any. - * @param {object} metadata Bucket's metadata. + * @typedef {array} CreateResumableUploadResponse + * @property {string} 0 The resumable upload's unique session URI. */ /** - * @deprecated Use setMetadata directly - * Delete one or more labels from this bucket. + * @typedef {object} CreateResumableUploadOptions + * @property {object} [metadata] Metadata to set on the file. + * @property {number} [offset] The starting byte of the upload stream for resuming an interrupted upload. + * @property {string} [origin] Origin header to set for the upload. + * @property {string} [predefinedAcl] Apply a predefined set of access + * controls to this object. * - * @param {string|string[]} [labels] The labels to delete. If no labels are - * provided, all of the labels are removed. - * @param {DeleteLabelsCallback} [callback] Callback function. - * @param {DeleteLabelsOptions} [options] Options, including precondition options - * @returns {Promise} + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @property {boolean} [private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @property {boolean} [public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string} [chunkSize] Create a separate request per chunk. This + * value is in bytes and should be a multiple of 256 KiB (2^18). + * {@link https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload| We recommend using at least 8 MiB for the chunk size.} + */ + /** + * Create a unique resumable upload session URI. This is the first step when + * performing a resumable upload. + * + * See the {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} + * for more on how the entire process works. + * + *

Note

+ * + * If you are just looking to perform a resumable upload without worrying + * about any of the details, see {@link File#createWriteStream}. Resumable + * uploads are performed by default. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} + * + * @param {CreateResumableUploadOptions} [options] Configuration options. + * @param {CreateResumableUploadCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Delete all of the labels from this bucket. - * //- - * bucket.deleteLabels(function(err, apiResponse) {}); - * - * //- - * // Delete a single label. - * //- - * bucket.deleteLabels('labelone', function(err, apiResponse) {}); + * const myBucket = storage.bucket('my-bucket'); * - * //- - * // Delete a specific set of labels. - * //- - * bucket.deleteLabels([ - * 'labelone', - * 'labeltwo' - * ], function(err, apiResponse) {}); + * const file = myBucket.file('my-file'); + * file.createResumableUpload(function(err, uri) { + * if (!err) { + * // `uri` can be used to PUT data to. + * } + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.deleteLabels().then(function(data) { - * const apiResponse = data[0]; + * file.createResumableUpload().then(function(data) { + * const uri = data[0]; * }); * ``` */ - deleteLabels(labelsOrCallbackOrOptions, optionsOrCallback, callback) { - let labels = new Array(); - let options = {}; - if (typeof labelsOrCallbackOrOptions === 'function') { - callback = labelsOrCallbackOrOptions; - } - else if (typeof labelsOrCallbackOrOptions === 'string') { - labels = [labelsOrCallbackOrOptions]; - } - else if (Array.isArray(labelsOrCallbackOrOptions)) { - labels = labelsOrCallbackOrOptions; - } - else if (labelsOrCallbackOrOptions) { - options = labelsOrCallbackOrOptions; - } - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - const deleteLabels = (labels) => { - const nullLabelMap = labels.reduce((nullLabelMap, labelKey) => { - nullLabelMap[labelKey] = null; - return nullLabelMap; - }, {}); - if ((options === null || options === void 0 ? void 0 : options.ifMetagenerationMatch) !== undefined) { - this.setLabels(nullLabelMap, options, callback); - } - else { - this.setLabels(nullLabelMap, callback); - } - }; - if (labels.length === 0) { - this.getLabels((err, labels) => { - if (err) { - callback(err); - return; - } - deleteLabels(Object.keys(labels)); - }); - } - else { - deleteLabels(labels); + createResumableUpload(optionsOrCallback, callback) { + var _a, _b; + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + const retryOptions = this.storage.retryOptions; + if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && + ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { + retryOptions.autoRetry = false; } + resumableUpload.createURI({ + authClient: this.storage.authClient, + apiEndpoint: this.storage.apiEndpoint, + bucket: this.bucket.name, + customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), + file: this.name, + generation: this.generation, + key: this.encryptionKey, + kmsKeyName: this.kmsKeyName, + metadata: options.metadata, + offset: options.offset, + origin: options.origin, + predefinedAcl: options.predefinedAcl, + private: options.private, + public: options.public, + userProject: options.userProject || this.userProject, + retryOptions: retryOptions, + params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, + universeDomain: this.bucket.storage.universeDomain, + useAuthWithCustomEndpoint: this.storage.useAuthWithCustomEndpoint, + [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], + }, callback); + this.storage.retryOptions.autoRetry = this.instanceRetryValue; } /** - * @typedef {array} DisableRequesterPaysResponse - * @property {object} 0 The full API response. - */ - /** - * @callback DisableRequesterPaysCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. + * @typedef {object} CreateWriteStreamOptions Configuration options for File#createWriteStream(). + * @property {string} [contentType] Alias for + * `options.metadata.contentType`. If set to `auto`, the file name is used + * to determine the contentType. + * @property {string|boolean} [gzip] If true, automatically gzip the file. + * If set to `auto`, the contentType is used to determine if the file + * should be gzipped. This will set `options.metadata.contentEncoding` to + * `gzip` if necessary. + * @property {object} [metadata] See the examples below or + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body} + * for more details. + * @property {number} [offset] The starting byte of the upload stream, for + * resuming an interrupted upload. Defaults to 0. + * @property {string} [predefinedAcl] Apply a predefined set of access + * controls to this object. + * + * Acceptable values are: + * - **`authenticatedRead`** - Object owner gets `OWNER` access, and + * `allAuthenticatedUsers` get `READER` access. + * + * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and + * project team owners get `OWNER` access. + * + * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project + * team owners get `READER` access. + * + * - **`private`** - Object owner gets `OWNER` access. + * + * - **`projectPrivate`** - Object owner gets `OWNER` access, and project + * team members get access according to their roles. + * + * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` + * get `READER` access. + * @property {boolean} [private] Make the uploaded file private. (Alias for + * `options.predefinedAcl = 'private'`) + * @property {boolean} [public] Make the uploaded file public. (Alias for + * `options.predefinedAcl = 'publicRead'`) + * @property {boolean} [resumable] Force a resumable upload. NOTE: When + * working with streams, the file format and size is unknown until it's + * completely consumed. Because of this, it's best for you to be explicit + * for what makes sense given your input. + * @property {number} [timeout=60000] Set the HTTP request timeout in + * milliseconds. This option is not available for resumable uploads. + * Default: `60000` + * @property {string} [uri] The URI for an already-created resumable + * upload. See {@link File#createResumableUpload}. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. + * @property {string|boolean} [validation] Possible values: `"md5"`, + * `"crc32c"`, or `false`. By default, data integrity is validated with a + * CRC32c checksum. You may use MD5 if preferred, but that hash is not + * supported for composite objects. An error will be raised if MD5 is + * specified but is not available. You may also choose to skip validation + * completely, however this is **not recommended**. In addition to specifying + * validation type, providing `metadata.crc32c` or `metadata.md5Hash` will + * cause the server to perform validation in addition to client validation. + * NOTE: Validation is automatically skipped for objects that were + * uploaded using the `gzip` option and have already compressed content. */ /** - *
- * Early Access Testers Only - *

- * This feature is not yet widely-available. - *

- *
+ * Create a writable stream to overwrite the contents of the file in your + * bucket. * - * Disable `requesterPays` functionality from this bucket. + * A File object can also be used to create files for the first time. * - * @param {DisableRequesterPaysCallback} [callback] Callback function. - * @param {DisableRequesterPaysOptions} [options] Options, including precondition options - * @returns {Promise} + * Resumable uploads are automatically enabled and must be shut off explicitly + * by setting `options.resumable` to `false`. + * + * + *

+ * There is some overhead when using a resumable upload that can cause + * noticeable performance degradation while uploading a series of small + * files. When uploading files less than 10MB, it is recommended that the + * resumable feature is disabled. + *

+ * + * NOTE: Writable streams will emit the `finish` event when the file is fully + * uploaded. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload Upload Options (Simple or Resumable)} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert Objects: insert API Documentation} + * + * @param {CreateWriteStreamOptions} [options] Configuration options. + * @returns {WritableStream} * * @example * ``` + * const fs = require('fs'); * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.disableRequesterPays(function(err, apiResponse) { - * if (!err) { - * // requesterPays functionality disabled successfully. - * } - * }); + * const file = myBucket.file('my-file'); * * //- - * // If the callback is omitted, we'll return a Promise. + * //

Uploading a File

+ * // + * // Now, consider a case where we want to upload a file to your bucket. You + * // have the option of using {@link Bucket#upload}, but that is just + * // a convenience method which will do the following. + * //- + * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') + * .pipe(file.createWriteStream()) + * .on('error', function(err) {}) + * .on('finish', function() { + * // The file upload is complete. + * }); + * + * //- + * //

Uploading a File with gzip compression

+ * //- + * fs.createReadStream('/Users/stephen/site/index.html') + * .pipe(file.createWriteStream({ gzip: true })) + * .on('error', function(err) {}) + * .on('finish', function() { + * // The file upload is complete. + * }); + * + * //- + * // Downloading the file with `createReadStream` will automatically decode + * // the file. * //- - * bucket.disableRequesterPays().then(function(data) { - * const apiResponse = data[0]; - * }); * + * //- + * //

Uploading a File with Metadata

+ * // + * // One last case you may run into is when you want to upload a file to your + * // bucket and set its metadata at the same time. Like above, you can use + * // {@link Bucket#upload} to do this, which is just a wrapper around + * // the following. + * //- + * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') + * .pipe(file.createWriteStream({ + * metadata: { + * contentType: 'image/jpeg', + * metadata: { + * custom: 'metadata' + * } + * } + * })) + * .on('error', function(err) {}) + * .on('finish', function() { + * // The file upload is complete. + * }); * ``` - * @example include:samples/requesterPays.js - * region_tag:storage_disable_requester_pays - * Example of disabling requester pays: + * + * //- + * //

Continuing a Resumable Upload

+ * // + * // One can capture a `uri` from a resumable upload to reuse later. + * // Additionally, for validation, one can also capture and pass `crc32c`. + * //- + * let uri: string | undefined = undefined; + * let resumeCRC32C: string | undefined = undefined; + * + * fs.createWriteStream() + * .on('uri', link => {uri = link}) + * .on('crc32', crc32c => {resumeCRC32C = crc32c}); + * + * // later... + * fs.createWriteStream({uri, resumeCRC32C}); */ - disableRequesterPays(optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + createWriteStream(options = {}) { + var _a; + (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); + if (options.contentType) { + options.metadata.contentType = options.contentType; } - else if (optionsOrCallback) { - options = optionsOrCallback; + if (!options.metadata.contentType || + options.metadata.contentType === 'auto') { + const detectedContentType = mime_1.default.getType(this.name); + if (detectedContentType) { + options.metadata.contentType = detectedContentType; + } } - this.setMetadata({ - billing: { - requesterPays: false, + let gzip = options.gzip; + if (gzip === 'auto') { + gzip = COMPRESSIBLE_MIME_REGEX.test(options.metadata.contentType || ''); + } + if (gzip) { + options.metadata.contentEncoding = 'gzip'; + } + let crc32c = true; + let md5 = false; + if (typeof options.validation === 'string') { + options.validation = options.validation.toLowerCase(); + crc32c = options.validation === 'crc32c'; + md5 = options.validation === 'md5'; + } + else if (options.validation === false) { + crc32c = false; + md5 = false; + } + if (options.offset) { + if (md5) { + throw new RangeError(FileExceptionMessages.MD5_RESUMED_UPLOAD); + } + if (crc32c && !options.isPartialUpload && !options.resumeCRC32C) { + throw new RangeError(FileExceptionMessages.MISSING_RESUME_CRC32C_FINAL_UPLOAD); + } + } + /** + * A callback for determining when the underlying pipeline is complete. + * It's possible the pipeline callback could error before the write stream + * calls `final` so by default this will destroy the write stream unless the + * write stream sets this callback via its `final` handler. + * @param error An optional error + */ + let pipelineCallback = error => { + writeStream.destroy(error || undefined); + }; + // A stream for consumer to write to + const writeStream = new stream_1.Writable({ + final(cb) { + // Set the pipeline callback to this callback so the pipeline's results + // can be populated to the consumer + pipelineCallback = cb; + emitStream.end(); }, - }, options, callback); + write(chunk, encoding, cb) { + emitStream.write(chunk, encoding, cb); + }, + }); + // If the write stream, which is returned to the caller, catches an error we need to make sure that + // at least one of the streams in the pipeline below gets notified so that they + // all get cleaned up / destroyed. + writeStream.once('error', e => { + emitStream.destroy(e); + }); + // If the write stream is closed, cleanup the pipeline below by calling destroy on one of the streams. + writeStream.once('close', () => { + emitStream.destroy(); + }); + const transformStreams = []; + if (gzip) { + transformStreams.push(zlib.createGzip()); + } + const emitStream = new util_js_2.PassThroughShim(); + // If `writeStream` is destroyed before the `writing` event, `emitStream` will not have any listeners. This prevents an unhandled error. + const noop = () => { }; + emitStream.on('error', noop); + let hashCalculatingStream = null; + if (crc32c || md5) { + const crc32cInstance = options.resumeCRC32C + ? crc32c_js_1.CRC32C.from(options.resumeCRC32C) + : undefined; + hashCalculatingStream = new hash_stream_validator_js_1.HashStreamValidator({ + crc32c, + crc32cInstance, + md5, + crc32cGenerator: this.crc32cGenerator, + updateHashesOnly: true, + }); + transformStreams.push(hashCalculatingStream); + } + const fileWriteStream = (0, duplexify_1.default)(); + let fileWriteStreamMetadataReceived = false; + // Handing off emitted events to users + emitStream.on('reading', () => writeStream.emit('reading')); + emitStream.on('writing', () => writeStream.emit('writing')); + fileWriteStream.on('uri', evt => writeStream.emit('uri', evt)); + fileWriteStream.on('progress', evt => writeStream.emit('progress', evt)); + fileWriteStream.on('response', resp => writeStream.emit('response', resp)); + fileWriteStream.once('metadata', () => { + fileWriteStreamMetadataReceived = true; + }); + writeStream.once('writing', () => { + if (options.resumable === false) { + this.startSimpleUpload_(fileWriteStream, options); + } + else { + this.startResumableUpload_(fileWriteStream, options); + } + // remove temporary noop listener as we now create a pipeline that handles the errors + emitStream.removeListener('error', noop); + (0, stream_1.pipeline)(emitStream, ...transformStreams, fileWriteStream, async (e) => { + if (e) { + return pipelineCallback(e); + } + // If this is a partial upload, we don't expect final metadata yet. + if (options.isPartialUpload) { + // Emit CRC32c for this completed chunk if hash validation is active. + if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) { + writeStream.emit('crc32c', hashCalculatingStream.crc32c); + } + // Resolve the pipeline for this *partial chunk*. + return pipelineCallback(); + } + // We want to make sure we've received the metadata from the server in order + // to properly validate the object's integrity. Depending on the type of upload, + // the stream could close before the response is returned. + if (!fileWriteStreamMetadataReceived) { + try { + await new Promise((resolve, reject) => { + fileWriteStream.once('metadata', resolve); + fileWriteStream.once('error', reject); + }); + } + catch (e) { + return pipelineCallback(e); + } + } + // Emit the local CRC32C value for future validation, if validation is enabled. + if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) { + writeStream.emit('crc32c', hashCalculatingStream.crc32c); + } + try { + // Metadata may not be ready if the upload is a partial upload, + // nothing to validate yet. + const metadataNotReady = options.isPartialUpload && !this.metadata; + if (hashCalculatingStream && !metadataNotReady) { + await __classPrivateFieldGet(this, _File_instances, "m", _File_validateIntegrity).call(this, hashCalculatingStream, { + crc32c, + md5, + }); + } + pipelineCallback(); + } + catch (e) { + pipelineCallback(e); + } + }); + }); + return writeStream; + } + delete(optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + this.disableAutoRetryConditionallyIdempotent_(this.methods.delete, bucket_js_1.AvailableServiceObjectMethods.delete, options); + super + .delete(options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + }); } /** - * Configuration object for enabling logging. - * - * @typedef {object} EnableLoggingOptions - * @property {string|Bucket} [bucket] The bucket for the log entries. By - * default, the current bucket is used. - * @property {string} prefix A unique prefix for log object names. + * @typedef {array} DownloadResponse + * @property [0] The contents of a File. */ /** - * Enable logging functionality for this bucket. This will make two API - * requests, first to grant Cloud Storage WRITE permission to the bucket, then - * to set the appropriate configuration on the Bucket's metadata. + * @callback DownloadCallback + * @param err Request error, if any. + * @param contents The contents of a File. + */ + /** + * Convenience method to download a file into memory or to a local + * destination. * - * @param {EnableLoggingOptions} config Configuration options. - * @param {string|Bucket} [config.bucket] The bucket for the log entries. By - * default, the current bucket is used. - * @param {string} config.prefix A unique prefix for log object names. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @returns {Promise} + * @param {object} [options] Configuration options. The arguments match those + * passed to {@link File#createReadStream}. + * @param {string} [options.destination] Local file path to write the file's + * contents to. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {DownloadCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * const config = { - * prefix: 'log' - * }; + * const file = myBucket.file('my-file'); * - * bucket.enableLogging(config, function(err, apiResponse) { - * if (!err) { - * // Logging functionality enabled successfully. - * } + * //- + * // Download a file into memory. The contents will be available as the + * second + * // argument in the demonstration below, `contents`. + * //- + * file.download(function(err, contents) {}); + * + * //- + * // Download a file to a local destination. + * //- + * file.download({ + * destination: '/Users/me/Desktop/file-backup.txt' + * }, function(err) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.download().then(function(data) { + * const contents = data[0]; * }); * * ``` - * @example - * Optionally, provide a destination bucket. - * ``` - * const config = { - * prefix: 'log', - * bucket: 'destination-bucket' - * }; + * @example include:samples/files.js + * region_tag:storage_download_file + * Another example: * - * bucket.enableLogging(config, function(err, apiResponse) {}); - * ``` + * @example include:samples/encryption.js + * region_tag:storage_download_encrypted_file + * Example of downloading an encrypted file: * - * @example - * If the callback is omitted, we'll return a Promise. - * ``` - * bucket.enableLogging(config).then(function(data) { - * const apiResponse = data[0]; - * }); - * ``` + * @example include:samples/requesterPays.js + * region_tag:storage_download_file_requester_pays + * Example of downloading a file where the requester pays: */ - enableLogging(config, callback) { - if (!config || - typeof config === 'function' || - typeof config.prefix === 'undefined') { - throw new Error(BucketExceptionMessages.CONFIGURATION_OBJECT_PREFIX_REQUIRED); + download(optionsOrCallback, cb) { + let options; + if (typeof optionsOrCallback === 'function') { + cb = optionsOrCallback; + options = {}; } - let logBucket = this.id; - if (config.bucket && config.bucket instanceof Bucket) { - logBucket = config.bucket.id; + else { + options = Object.assign({}, optionsOrCallback); } - else if (config.bucket && typeof config.bucket === 'string') { - logBucket = config.bucket; + let called = false; + const callback = ((...args) => { + if (!called) + cb(...args); + called = true; + }); + const destination = options.destination; + delete options.destination; + if (options.encryptionKey) { + this.setEncryptionKey(options.encryptionKey); + delete options.encryptionKey; } - const options = {}; - if (config === null || config === void 0 ? void 0 : config.ifMetagenerationMatch) { - options.ifMetagenerationMatch = config.ifMetagenerationMatch; + const fileStream = this.createReadStream(options); + let receivedData = false; + if (destination) { + fileStream + .on('error', callback) + .once('data', data => { + receivedData = true; + // We know that the file exists the server - now we can truncate/write to a file + const writable = fs.createWriteStream(destination); + writable.write(data); + fileStream + .pipe(writable) + .on('error', (err) => { + callback(err, Buffer.from('')); + }) + .on('finish', () => { + callback(null, data); + }); + }) + .on('end', () => { + // In the case of an empty file no data will be received before the end event fires + if (!receivedData) { + const data = Buffer.alloc(0); + try { + fs.writeFileSync(destination, data); + callback(null, data); + } + catch (e) { + callback(e, data); + } + } + }); } - if (config === null || config === void 0 ? void 0 : config.ifMetagenerationNotMatch) { - options.ifMetagenerationNotMatch = config.ifMetagenerationNotMatch; + else { + this.getBufferFromReadable(fileStream) + .then(contents => callback === null || callback === void 0 ? void 0 : callback(null, contents)) + .catch(callback); } - (async () => { - try { - const [policy] = await this.iam.getPolicy(); - policy.bindings.push({ - members: ['group:cloud-storage-analytics@google.com'], - role: 'roles/storage.objectCreator', - }); - await this.iam.setPolicy(policy); - this.setMetadata({ - logging: { - logBucket, - logObjectPrefix: config.prefix, - }, - }, options, callback); - } - catch (e) { - callback(e); - return; - } - })(); } /** - * @typedef {array} EnableRequesterPaysResponse - * @property {object} 0 The full API response. - */ - /** - * @callback EnableRequesterPaysCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - *
- * Early Access Testers Only - *

- * This feature is not yet widely-available. - *

- *
+ * The Storage API allows you to use a custom key for server-side encryption. * - * Enable `requesterPays` functionality for this bucket. This enables you, the - * bucket owner, to have the requesting user assume the charges for the access - * to your bucket and its contents. + * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} * - * @param {EnableRequesterPaysCallback | EnableRequesterPaysOptions} [optionsOrCallback] - * Callback function or precondition options. - * @returns {Promise} + * @param {string|buffer} encryptionKey An AES-256 encryption key. + * @returns {File} * * @example * ``` + * const crypto = require('crypto'); * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.enableRequesterPays(function(err, apiResponse) { - * if (!err) { - * // requesterPays functionality enabled successfully. - * } - * }); + * const encryptionKey = crypto.randomBytes(32); * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.enableRequesterPays().then(function(data) { - * const apiResponse = data[0]; + * const fileWithCustomEncryption = myBucket.file('my-file'); + * fileWithCustomEncryption.setEncryptionKey(encryptionKey); + * + * const fileWithoutCustomEncryption = myBucket.file('my-file'); + * + * fileWithCustomEncryption.save('data', function(err) { + * // Try to download with the File object that hasn't had + * // `setEncryptionKey()` called: + * fileWithoutCustomEncryption.download(function(err) { + * // We will receive an error: + * // err.message === 'Bad Request' + * + * // Try again with the File object we called `setEncryptionKey()` on: + * fileWithCustomEncryption.download(function(err, contents) { + * // contents.toString() === 'data' + * }); + * }); * }); * * ``` - * @example include:samples/requesterPays.js - * region_tag:storage_enable_requester_pays - * Example of enabling requester pays: + * @example include:samples/encryption.js + * region_tag:storage_upload_encrypted_file + * Example of uploading an encrypted file: + * + * @example include:samples/encryption.js + * region_tag:storage_download_encrypted_file + * Example of downloading an encrypted file: */ - enableRequesterPays(optionsOrCallback, cb) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - cb = optionsOrCallback; - } - else if (optionsOrCallback) { - options = optionsOrCallback; - } - this.setMetadata({ - billing: { - requesterPays: true, + setEncryptionKey(encryptionKey) { + this.encryptionKey = encryptionKey; + this.encryptionKeyBase64 = Buffer.from(encryptionKey).toString('base64'); + this.encryptionKeyHash = crypto + .createHash('sha256') + // eslint-disable-next-line @typescript-eslint/no-explicit-any + .update(this.encryptionKeyBase64, 'base64') + .digest('base64'); + this.encryptionKeyInterceptor = { + request: reqOpts => { + reqOpts.headers = reqOpts.headers || {}; + reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; + reqOpts.headers['x-goog-encryption-key'] = this.encryptionKeyBase64; + reqOpts.headers['x-goog-encryption-key-sha256'] = + this.encryptionKeyHash; + return reqOpts; }, - }, options, cb); + }; + this.interceptors.push(this.encryptionKeyInterceptor); + return this; } /** - * Create a {@link File} object. See {@link File} to see how to handle - * the different use cases you may have. - * - * @param {string} name The name of the file in this bucket. - * @param {FileOptions} [options] Configuration options. - * @param {string|number} [options.generation] Only use a specific revision of - * this file. - * @param {string} [options.encryptionKey] A custom encryption key. See - * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. - * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will - * be used to encrypt the object. Must be in the format: - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. - * KMS key ring must use the same location as the bucket. - * @param {string} [options.userProject] The ID of the project which will be - * billed for all requests made from File object. + * Gets a reference to a Cloud Storage {@link File} file from the provided URL in string format. + * @param {string} publicUrlOrGsUrl the URL as a string. Must be of the format gs://bucket/file + * or https://storage.googleapis.com/bucket/file. + * @param {Storage} storageInstance an instance of a Storage object. + * @param {FileOptions} [options] Configuration options * @returns {File} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const file = bucket.file('my-existing-file.png'); - * ``` */ - file(name, options) { - if (!name) { - throw Error(BucketExceptionMessages.SPECIFY_FILE_NAME); + static from(publicUrlOrGsUrl, storageInstance, options) { + const gsMatches = [...publicUrlOrGsUrl.matchAll(GS_UTIL_URL_REGEX)]; + const httpsMatches = [...publicUrlOrGsUrl.matchAll(HTTPS_PUBLIC_URL_REGEX)]; + if (gsMatches.length > 0) { + const bucket = new bucket_js_1.Bucket(storageInstance, gsMatches[0][2]); + return new File(bucket, gsMatches[0][3], options); } - return new file_js_1.File(this, name, options); + else if (httpsMatches.length > 0) { + const bucket = new bucket_js_1.Bucket(storageInstance, httpsMatches[0][3]); + return new File(bucket, httpsMatches[0][4], options); + } + else { + throw new Error('URL string must be of format gs://bucket/file or https://storage.googleapis.com/bucket/file'); + } + } + get(optionsOrCallback, cb) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + super + .get(options) + .then(resp => cb(null, ...resp)) + .catch(cb); } /** - * @typedef {array} GetFilesResponse - * @property {File[]} 0 Array of {@link File} instances. - * @param {object} nextQuery 1 A query object to receive more results. - * @param {object} apiResponse 2 The full API response. + * @typedef {array} GetExpirationDateResponse + * @property {date} 0 A Date object representing the earliest time this file's + * retention policy will expire. */ /** - * @callback GetFilesCallback + * @callback GetExpirationDateCallback * @param {?Error} err Request error, if any. - * @param {File[]} files Array of {@link File} instances. - * @param {object} nextQuery A query object to receive more results. - * @param {object} apiResponse The full API response. - */ - /** - * Query object for listing files. - * - * @typedef {object} GetFilesOptions - * @property {boolean} [autoPaginate=true] Have pagination handled - * automatically. - * @property {string} [delimiter] Results will contain only objects whose - * names, aside from the prefix, do not contain delimiter. Objects whose - * names, aside from the prefix, contain delimiter will have their name - * truncated after the delimiter, returned in `apiResponse.prefixes`. - * Duplicate prefixes are omitted. - * @property {string} [endOffset] Filter results to objects whose names are - * lexicographically before endOffset. If startOffset is also set, the objects - * listed have names between startOffset (inclusive) and endOffset (exclusive). - * @property {boolean} [includeFoldersAsPrefixes] If true, includes folders and - * managed folders in the set of prefixes returned by the query. Only applicable if - * delimiter is set to / and autoPaginate is set to false. - * See: https://cloud.google.com/storage/docs/managed-folders - * @property {boolean} [includeTrailingDelimiter] If true, objects that end in - * exactly one instance of delimiter have their metadata included in items[] - * in addition to the relevant part of the object name appearing in prefixes[]. - * @property {string} [prefix] Filter results to objects whose names begin - * with this prefix. - * @property {string} [matchGlob] A glob pattern used to filter results, - * for example foo*bar - * @property {number} [maxApiCalls] Maximum number of API calls to make. - * @property {number} [maxResults] Maximum number of items plus prefixes to - * return per call. - * Note: By default will handle pagination automatically - * if more than 1 page worth of results are requested per call. - * When `autoPaginate` is set to `false` the smaller of `maxResults` - * or 1 page of results will be returned per call. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @property {boolean} [softDeleted] If true, only soft-deleted object versions will be - * listed as distinct results in order of generation number. Note `soft_deleted` and - * `versions` cannot be set to true simultaneously. - * @property {string} [startOffset] Filter results to objects whose names are - * lexicographically equal to or after startOffset. If endOffset is also set, - * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {boolean} [versions] If true, returns File objects scoped to - * their versions. + * @param {date} expirationDate A Date object representing the earliest time + * this file's retention policy will expire. */ /** - * Get {@link File} objects for the files currently in the bucket. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/list| Objects: list API Documentation} - * - * @param {GetFilesOptions} [query] Query object for listing files. - * @param {boolean} [query.autoPaginate=true] Have pagination handled - * automatically. - * @param {string} [query.delimiter] Results will contain only objects whose - * names, aside from the prefix, do not contain delimiter. Objects whose - * names, aside from the prefix, contain delimiter will have their name - * truncated after the delimiter, returned in `apiResponse.prefixes`. - * Duplicate prefixes are omitted. - * @param {string} [query.endOffset] Filter results to objects whose names are - * lexicographically before endOffset. If startOffset is also set, the objects - * listed have names between startOffset (inclusive) and endOffset (exclusive). - * @param {boolean} [query.includeFoldersAsPrefixes] If true, includes folders and - * managed folders in the set of prefixes returned by the query. Only applicable if - * delimiter is set to / and autoPaginate is set to false. - * See: https://cloud.google.com/storage/docs/managed-folders - * @param {boolean} [query.includeTrailingDelimiter] If true, objects that end in - * exactly one instance of delimiter have their metadata included in items[] - * in addition to the relevant part of the object name appearing in prefixes[]. - * @param {string} [query.prefix] Filter results to objects whose names begin - * with this prefix. - * @param {number} [query.maxApiCalls] Maximum number of API calls to make. - * @param {number} [query.maxResults] Maximum number of items plus prefixes to - * return per call. - * Note: By default will handle pagination automatically - * if more than 1 page worth of results are requested per call. - * When `autoPaginate` is set to `false` the smaller of `maxResults` - * or 1 page of results will be returned per call. - * @param {string} [query.pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @param {boolean} [query.softDeleted] If true, only soft-deleted object versions will be - * listed as distinct results in order of generation number. Note `soft_deleted` and - * `versions` cannot be set to true simultaneously. - * @param {string} [query.startOffset] Filter results to objects whose names are - * lexicographically equal to or after startOffset. If endOffset is also set, - * the objects listed have names between startOffset (inclusive) and endOffset (exclusive). - * @param {string} [query.userProject] The ID of the project which will be - * billed for the request. - * @param {boolean} [query.versions] If true, returns File objects scoped to - * their versions. - * @param {GetFilesCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * bucket.getFiles(function(err, files) { - * if (!err) { - * // files is an array of File objects. - * } - * }); - * - * //- - * // If your bucket has versioning enabled, you can get all of your files - * // scoped to their generation. - * //- - * bucket.getFiles({ - * versions: true - * }, function(err, files) { - * // Each file is scoped to its generation. - * }); - * - * //- - * // To control how many API requests are made and page through the results - * // manually, set `autoPaginate` to `false`. - * //- - * const callback = function(err, files, nextQuery, apiResponse) { - * if (nextQuery) { - * // More results exist. - * bucket.getFiles(nextQuery, callback); - * } - * - * // The `metadata` property is populated for you with the metadata at the - * // time of fetching. - * files[0].metadata; - * - * // However, in cases where you are concerned the metadata could have - * // changed, use the `getMetadata` method. - * files[0].getMetadata(function(err, metadata) {}); - * }; - * - * bucket.getFiles({ - * autoPaginate: false - * }, callback); + * If this bucket has a retention policy defined, use this method to get a + * Date object representing the earliest time this file will expire. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.getFiles().then(function(data) { - * const files = data[0]; - * }); + * @param {GetExpirationDateCallback} [callback] Callback function. + * @returns {Promise} * - * ``` * @example - *
Simulating a File System

With `autoPaginate: false`, it's possible to iterate over files which incorporate a common structure using a delimiter.

Consider the following remote objects:

  1. "a"
  2. "a/b/c/d"
  3. "b/d/e"

Using a delimiter of `/` will return a single file, "a".

`apiResponse.prefixes` will return the "sub-directories" that were found:

  1. "a/"
  2. "b/"
- * ``` - * bucket.getFiles({ - * autoPaginate: false, - * delimiter: '/' - * }, function(err, files, nextQuery, apiResponse) { - * // files = [ - * // {File} // File object for file "a" - * // ] - * - * // apiResponse.prefixes = [ - * // 'a/', - * // 'b/' - * // ] - * }); * ``` + * const storage = require('@google-cloud/storage')(); + * const myBucket = storage.bucket('my-bucket'); * - * @example - * Using prefixes, it's now possible to simulate a file system with follow-up requests. - * ``` - * bucket.getFiles({ - * autoPaginate: false, - * delimiter: '/', - * prefix: 'a/' - * }, function(err, files, nextQuery, apiResponse) { - * // No files found within "directory" a. - * // files = [] + * const file = myBucket.file('my-file'); * - * // However, a "sub-directory" was found. - * // This prefix can be used to continue traversing the "file system". - * // apiResponse.prefixes = [ - * // 'a/b/' - * // ] + * file.getExpirationDate(function(err, expirationDate) { + * // expirationDate is a Date object. * }); * ``` - * - * @example include:samples/files.js - * region_tag:storage_list_files - * Another example: - * - * @example include:samples/files.js - * region_tag:storage_list_files_with_prefix - * Example of listing files, filtered by a prefix: */ - getFiles(queryOrCallback, callback) { - let query = typeof queryOrCallback === 'object' ? queryOrCallback : {}; - if (!callback) { - callback = queryOrCallback; - } - query = Object.assign({}, query); - this.request({ - uri: '/o', - qs: query, - }, (err, resp) => { + getExpirationDate(callback) { + this.getMetadata((err, metadata, apiResponse) => { if (err) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback(err, null, null, resp); + callback(err, null, apiResponse); return; } - const itemsArray = resp.items ? resp.items : []; - const files = itemsArray.map((file) => { - const options = {}; - if (query.versions) { - options.generation = file.generation; - } - if (file.kmsKeyName) { - options.kmsKeyName = file.kmsKeyName; - } - const fileInstance = this.file(file.name, options); - fileInstance.metadata = file; - return fileInstance; - }); - let nextQuery = null; - if (resp.nextPageToken) { - nextQuery = Object.assign({}, query, { - pageToken: resp.nextPageToken, - }); + if (!metadata.retentionExpirationTime) { + const error = new Error(FileExceptionMessages.EXPIRATION_TIME_NA); + callback(error, null, apiResponse); + return; } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - callback(null, files, nextQuery, resp); + callback(null, new Date(metadata.retentionExpirationTime), apiResponse); }); } /** - * @deprecated - * @typedef {object} GetLabelsOptions Configuration options for Bucket#getLabels(). - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @deprecated - * @typedef {array} GetLabelsResponse - * @property {object} 0 Object of labels currently set on this bucket. + * @typedef {array} GenerateSignedPostPolicyV2Response + * @property {object} 0 The document policy. */ /** - * @deprecated - * @callback GetLabelsCallback + * @callback GenerateSignedPostPolicyV2Callback * @param {?Error} err Request error, if any. - * @param {object} labels Object of labels currently set on this bucket. + * @param {object} policy The document policy. */ /** - * @deprecated Use getMetadata directly. - * Get the labels currently set on this bucket. + * Get a signed policy document to allow a user to upload data with a POST + * request. * - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetLabelsCallback} [callback] Callback function. - * @returns {Promise} + * In Google Cloud Platform environments, such as Cloud Functions and App + * Engine, you usually don't provide a `keyFilename` or `credentials` during + * instantiation. In those environments, we call the + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} + * to create a signed policy. That API requires either the + * `https://www.googleapis.com/auth/iam` or + * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are + * enabled. + * + * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-v2| POST Object with the V2 signing process} + * + * @throws {Error} If an expiration timestamp from the past is given. + * @throws {Error} If options.equals has an array with less or more than two + * members. + * @throws {Error} If options.startsWith has an array with less or more than two + * members. + * + * @param {object} options Configuration options. + * @param {array|array[]} [options.equals] Array of request parameters and + * their expected value (e.g. [['$', '']]). Values are + * translated into equality constraints in the conditions field of the + * policy document (e.g. ['eq', '$', '']). If only one + * equality condition is to be specified, options.equals can be a one- + * dimensional array (e.g. ['$', '']). + * @param {*} options.expires - A timestamp when this policy will expire. Any + * value given is passed to `new Date()`. + * @param {array|array[]} [options.startsWith] Array of request parameters and + * their expected prefixes (e.g. [['$', '']). Values are + * translated into starts-with constraints in the conditions field of the + * policy document (e.g. ['starts-with', '$', '']). If only + * one prefix condition is to be specified, options.startsWith can be a + * one- dimensional array (e.g. ['$', '']). + * @param {string} [options.acl] ACL for the object from possibly predefined + * ACLs. + * @param {string} [options.successRedirect] The URL to which the user client + * is redirected if the upload is successful. + * @param {string} [options.successStatus] - The status of the Google Storage + * response if the upload is successful (must be string). + * @param {object} [options.contentLengthRange] + * @param {number} [options.contentLengthRange.min] Minimum value for the + * request's content length. + * @param {number} [options.contentLengthRange.max] Maximum value for the + * request's content length. + * @param {GenerateSignedPostPolicyV2Callback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.getLabels(function(err, labels) { - * if (err) { - * // Error handling omitted. + * const file = myBucket.file('my-file'); + * const options = { + * equals: ['$Content-Type', 'image/jpeg'], + * expires: '10-25-2022', + * contentLengthRange: { + * min: 0, + * max: 1024 * } + * }; * - * // labels = { - * // label: 'labelValue', - * // ... - * // } + * file.generateSignedPostPolicyV2(options, function(err, policy) { + * // policy.string: the policy document in plain text. + * // policy.base64: the policy document in base64. + * // policy.signature: the policy signature in base64. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getLabels().then(function(data) { - * const labels = data[0]; + * file.generateSignedPostPolicyV2(options).then(function(data) { + * const policy = data[0]; * }); * ``` */ - getLabels(optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + generateSignedPostPolicyV2(optionsOrCallback, cb) { + const args = (0, util_js_2.normalize)(optionsOrCallback, cb); + let options = args.options; + const callback = args.callback; + const expires = new Date(options.expires); + if (isNaN(expires.getTime())) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); } - else if (optionsOrCallback) { - options = optionsOrCallback; + if (expires.valueOf() < Date.now()) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); } - this.getMetadata(options, (err, metadata) => { - if (err) { - callback(err, null); - return; + options = Object.assign({}, options); + const conditions = [ + ['eq', '$key', this.name], + { + bucket: this.bucket.name, + }, + ]; + if (Array.isArray(options.equals)) { + if (!Array.isArray(options.equals[0])) { + options.equals = [options.equals]; } - callback(null, (metadata === null || metadata === void 0 ? void 0 : metadata.labels) || {}); + options.equals.forEach(condition => { + if (!Array.isArray(condition) || condition.length !== 2) { + throw new Error(FileExceptionMessages.EQUALS_CONDITION_TWO_ELEMENTS); + } + conditions.push(['eq', condition[0], condition[1]]); + }); + } + if (Array.isArray(options.startsWith)) { + if (!Array.isArray(options.startsWith[0])) { + options.startsWith = [options.startsWith]; + } + options.startsWith.forEach(condition => { + if (!Array.isArray(condition) || condition.length !== 2) { + throw new Error(FileExceptionMessages.STARTS_WITH_TWO_ELEMENTS); + } + conditions.push(['starts-with', condition[0], condition[1]]); + }); + } + if (options.acl) { + conditions.push({ + acl: options.acl, + }); + } + if (options.successRedirect) { + conditions.push({ + success_action_redirect: options.successRedirect, + }); + } + if (options.successStatus) { + conditions.push({ + success_action_status: options.successStatus, + }); + } + if (options.contentLengthRange) { + const min = options.contentLengthRange.min; + const max = options.contentLengthRange.max; + if (typeof min !== 'number' || typeof max !== 'number') { + throw new Error(FileExceptionMessages.CONTENT_LENGTH_RANGE_MIN_MAX); + } + conditions.push(['content-length-range', min, max]); + } + const policy = { + expiration: expires.toISOString(), + conditions, + }; + const policyString = JSON.stringify(policy); + const policyBase64 = Buffer.from(policyString).toString('base64'); + this.storage.authClient.sign(policyBase64, options.signingEndpoint).then(signature => { + callback(null, { + string: policyString, + base64: policyBase64, + signature, + }); + }, err => { + callback(new signer_js_1.SigningError(err.message)); }); } /** - * @typedef {object} GetNotificationsOptions Configuration options for Bucket#getNotification(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * @typedef {object} SignedPostPolicyV4Output + * @property {string} url The request URL. + * @property {object} fields The form fields to include in the POST request. */ /** - * @callback GetNotificationsCallback - * @param {?Error} err Request error, if any. - * @param {Notification[]} notifications Array of {@link Notification} - * instances. - * @param {object} apiResponse The full API response. + * @typedef {array} GenerateSignedPostPolicyV4Response + * @property {SignedPostPolicyV4Output} 0 An object containing the request URL and form fields. */ /** - * @typedef {array} GetNotificationsResponse - * @property {Notification[]} 0 Array of {@link Notification} instances. - * @property {object} 1 The full API response. + * @callback GenerateSignedPostPolicyV4Callback + * @param {?Error} err Request error, if any. + * @param {SignedPostPolicyV4Output} output An object containing the request URL and form fields. */ /** - * Retrieves a list of notification subscriptions for a given bucket. + * Get a v4 signed policy document to allow a user to upload data with a POST + * request. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/list| Notifications: list} + * In Google Cloud Platform environments, such as Cloud Functions and App + * Engine, you usually don't provide a `keyFilename` or `credentials` during + * instantiation. In those environments, we call the + * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} + * to create a signed policy. That API requires either the + * `https://www.googleapis.com/auth/iam` or + * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are + * enabled. * - * @param {GetNotificationsOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetNotificationsCallback} [callback] Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument| Policy Document Reference} + * + * @param {object} options Configuration options. + * @param {Date|number|string} options.expires - A timestamp when this policy will expire. Any + * value given is passed to `new Date()`. + * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style + * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style + * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. + * Currently defaults to `false` for path-style, although this may change in a + * future major-version release. + * @param {string} [config.bucketBoundHostname] The bucket-bound hostname to return in + * the result, e.g. "https://cdn.example.com". + * @param {object} [config.fields] [Form fields]{@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument} + * to include in the signed policy. Any fields with key beginning with 'x-ignore-' + * will not be included in the policy to be signed. + * @param {object[]} [config.conditions] [Conditions]{@link https://cloud.google.com/storage/docs/authentication/signatures#policy-document} + * to include in the signed policy. All fields given in `config.fields` are + * automatically included in the conditions array, adding the same entry + * in both `fields` and `conditions` will result in duplicate entries. + * + * @param {GenerateSignedPostPolicyV4Callback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.getNotifications(function(err, notifications, apiResponse) { - * if (!err) { - * // notifications is an array of Notification objects. + * const file = myBucket.file('my-file'); + * const options = { + * expires: '10-25-2022', + * conditions: [ + * ['eq', '$Content-Type', 'image/jpeg'], + * ['content-length-range', 0, 1024], + * ], + * fields: { + * acl: 'public-read', + * 'x-goog-meta-foo': 'bar', + * 'x-ignore-mykey': 'data' * } + * }; + * + * file.generateSignedPostPolicyV4(options, function(err, response) { + * // response.url The request URL + * // response.fields The form fields (including the signature) to include + * // to be used to upload objects by HTML forms. * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getNotifications().then(function(data) { - * const notifications = data[0]; - * const apiResponse = data[1]; + * file.generateSignedPostPolicyV4(options).then(function(data) { + * const response = data[0]; + * // response.url The request URL + * // response.fields The form fields (including the signature) to include + * // to be used to upload objects by HTML forms. * }); - * * ``` - * @example include:samples/listNotifications.js - * region_tag:storage_list_bucket_notifications - * Another example: */ - getNotifications(optionsOrCallback, callback) { - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; + generateSignedPostPolicyV4(optionsOrCallback, cb) { + const args = (0, util_js_2.normalize)(optionsOrCallback, cb); + let options = args.options; + const callback = args.callback; + const expires = new Date(options.expires); + if (isNaN(expires.getTime())) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); } - else if (optionsOrCallback) { - options = optionsOrCallback; + if (expires.valueOf() < Date.now()) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); } - this.request({ - uri: '/notificationConfigs', - qs: options, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; - } - const itemsArray = resp.items ? resp.items : []; - const notifications = itemsArray.map((notification) => { - const notificationInstance = this.notification(notification.id); - notificationInstance.metadata = notification; - return notificationInstance; + if (expires.valueOf() - Date.now() > SEVEN_DAYS * 1000) { + throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); + } + options = Object.assign({}, options); + let fields = Object.assign({}, options.fields); + const now = new Date(); + const nowISO = (0, util_js_2.formatAsUTCISO)(now, true); + const todayISO = (0, util_js_2.formatAsUTCISO)(now); + const sign = async () => { + const { client_email } = await this.storage.authClient.getCredentials(); + const credential = `${client_email}/${todayISO}/auto/storage/goog4_request`; + fields = { + ...fields, + bucket: this.bucket.name, + key: this.name, + 'x-goog-date': nowISO, + 'x-goog-credential': credential, + 'x-goog-algorithm': 'GOOG4-RSA-SHA256', + }; + const conditions = options.conditions || []; + Object.entries(fields).forEach(([key, value]) => { + if (!key.startsWith('x-ignore-')) { + conditions.push({ [key]: value }); + } }); - callback(null, notifications, resp); - }); + delete fields.bucket; + const expiration = (0, util_js_2.formatAsUTCISO)(expires, true, '-', ':'); + const policy = { + conditions, + expiration, + }; + const policyString = (0, util_js_2.unicodeJSONStringify)(policy); + const policyBase64 = Buffer.from(policyString).toString('base64'); + try { + const signature = await this.storage.authClient.sign(policyBase64, options.signingEndpoint); + const signatureHex = Buffer.from(signature, 'base64').toString('hex'); + const universe = this.parent.storage.universeDomain; + fields['policy'] = policyBase64; + fields['x-goog-signature'] = signatureHex; + let url; + if (this.storage.customEndpoint) { + url = this.storage.apiEndpoint; + } + else if (options.virtualHostedStyle) { + url = `https://${this.bucket.name}.storage.${universe}/`; + } + else if (options.bucketBoundHostname) { + url = `${options.bucketBoundHostname}/`; + } + else { + url = `https://storage.${universe}/${this.bucket.name}/`; + } + return { + url, + fields, + }; + } + catch (err) { + throw new signer_js_1.SigningError(err.message); + } + }; + sign().then(res => callback(null, res), callback); } /** * @typedef {array} GetSignedUrlResponse @@ -154798,39 +160350,7 @@ class Bucket extends index_js_1.ServiceObject { * @param {object} url The signed URL. */ /** - * @typedef {object} GetBucketSignedUrlConfig - * @property {string} action Only listing objects within a bucket (HTTP: GET) is supported for bucket-level signed URLs. - * @property {*} expires A timestamp when this link will expire. Any value - * given is passed to `new Date()`. - * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. - * @property {string} [version='v2'] The signing version to use, either - * 'v2' or 'v4'. - * @property {boolean} [virtualHostedStyle=false] Use virtual hosted-style - * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style - * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instaed of path-style URL. - * Currently defaults to `false` for path-style, although this may change in a - * future major-version release. - * @property {string} [cname] The cname for this bucket, i.e., - * "https://cdn.example.com". - * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} - * @property {object} [extensionHeaders] If these headers are used, the - * server will check to make sure that the client provides matching - * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} - * for the requirements of this feature, most notably: - * - The header name must be prefixed with `x-goog-` - * - The header name must be all lowercase - * - * Note: Multi-valued header passed as an array in the extensionHeaders - * object is converted into a string, delimited by `,` with - * no space. Requests made using the signed URL will need to - * delimit multi-valued headers using a single `,` as well, or - * else the server will report a mismatched signature. - * @property {object} [queryParams] Additional query parameters to include - * in the signed URL. - */ - /** - * Get a signed URL to allow limited time access to a bucket. + * Get a signed URL to allow limited time access to the file. * * In Google Cloud Platform environments, such as Cloud Functions and App * Engine, you usually don't provide a `keyFilename` or `credentials` during @@ -154845,22 +160365,33 @@ class Bucket extends index_js_1.ServiceObject { * * @throws {Error} if an expiration timestamp from the past is given. * - * @param {GetBucketSignedUrlConfig} config Configuration object. - * @param {string} config.action Currently only supports "list" (HTTP: GET). + * @param {object} config Configuration object. + * @param {string} config.action "read" (HTTP: GET), "write" (HTTP: PUT), or + * "delete" (HTTP: DELETE), "resumable" (HTTP: POST). + * When using "resumable", the header `X-Goog-Resumable: start` has + * to be sent when making a request with the signed URL. * @param {*} config.expires A timestamp when this link will expire. Any value * given is passed to `new Date()`. * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. + * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} * @param {string} [config.version='v2'] The signing version to use, either * 'v2' or 'v4'. * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style - * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style - * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instaed of path-style URL. + * URLs (e.g. 'https://mybucket.storage.googleapis.com/...') instead of path-style + * (e.g. 'https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs + * should generally be preferred instead of path-style URL. * Currently defaults to `false` for path-style, although this may change in a * future major-version release. * @param {string} [config.cname] The cname for this bucket, i.e., * "https://cdn.example.com". - * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} + * @param {string} [config.contentMd5] The MD5 digest value in base64. Just like + * if you provide this, the client must provide this HTTP header with this same + * value in its request, so to if this parameter is not provided here, + * the client must not provide any value for this HTTP header in its request. + * @param {string} [config.contentType] Just like if you provide this, the client + * must provide this HTTP header with this same value in its request, so to if + * this parameter is not provided here, the client must not provide any value + * for this HTTP header in its request. * @param {object} [config.extensionHeaders] If these headers are used, the * server will check to make sure that the client provides matching * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} @@ -154873,8 +160404,19 @@ class Bucket extends index_js_1.ServiceObject { * no space. Requests made using the signed URL will need to * delimit multi-valued headers using a single `,` as well, or * else the server will report a mismatched signature. - * @property {object} [config.queryParams] Additional query parameters to include + * @param {object} [config.queryParams] Additional query parameters to include * in the signed URL. + * @param {string} [config.promptSaveAs] The filename to prompt the user to + * save the file as when the signed url is accessed. This is ignored if + * `config.responseDisposition` is set. + * @param {string} [config.responseDisposition] The + * {@link http://goo.gl/yMWxQV| response-content-disposition parameter} of the + * signed url. + * @param {*} [config.accessibleAt=Date.now()] A timestamp when this link became usable. Any value + * given is passed to `new Date()`. + * Note: Use for 'v4' only. + * @param {string} [config.responseType] The response-content-type parameter + * of the signed url. * @param {GetSignedUrlCallback} [callback] Callback function. * @returns {Promise} * @@ -154884,1284 +160426,1318 @@ class Bucket extends index_js_1.ServiceObject { * const storage = new Storage(); * const myBucket = storage.bucket('my-bucket'); * + * const file = myBucket.file('my-file'); + * * //- - * // Generate a URL that allows temporary access to list files in a bucket. + * // Generate a URL that allows temporary access to download your file. + * //- + * const request = require('request'); + * + * const config = { + * action: 'read', + * expires: '03-17-2025', + * }; + * + * file.getSignedUrl(config, function(err, url) { + * if (err) { + * console.error(err); + * return; + * } + * + * // The file is now available to read from this URL. + * request(url, function(err, resp) { + * // resp.statusCode = 200 + * }); + * }); + * + * //- + * // Generate a URL that allows temporary access to download your file. + * // Access will begin at accessibleAt and end at expires. * //- * const request = require('request'); * * const config = { - * action: 'list', - * expires: '03-17-2025' + * action: 'read', + * expires: '03-17-2025', + * accessibleAt: '03-13-2025' * }; * - * bucket.getSignedUrl(config, function(err, url) { + * file.getSignedUrl(config, function(err, url) { * if (err) { * console.error(err); * return; * } * - * // The bucket is now available to be listed from this URL. + * // The file will be available to read from this URL from 03-13-2025 to 03-17-2025. * request(url, function(err, resp) { * // resp.statusCode = 200 * }); * }); * * //- + * // Generate a URL to allow write permissions. This means anyone with this + * URL + * // can send a POST request with new data that will overwrite the file. + * //- + * file.getSignedUrl({ + * action: 'write', + * expires: '03-17-2025' + * }, function(err, url) { + * if (err) { + * console.error(err); + * return; + * } + * + * // The file is now available to be written to. + * const writeStream = request.put(url); + * writeStream.end('New data'); + * + * writeStream.on('complete', function(resp) { + * // Confirm the new content was saved. + * file.download(function(err, fileContents) { + * console.log('Contents:', fileContents.toString()); + * // Contents: New data + * }); + * }); + * }); + * + * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.getSignedUrl(config).then(function(data) { + * file.getSignedUrl(config).then(function(data) { * const url = data[0]; * }); + * * ``` + * @example include:samples/files.js + * region_tag:storage_generate_signed_url + * Another example: */ getSignedUrl(cfg, callback) { - const method = BucketActionToHTTPMethod[cfg.action]; + const method = ActionToHTTPMethod[cfg.action]; + const extensionHeaders = (0, util_js_2.objectKeyToLowercase)(cfg.extensionHeaders || {}); + if (cfg.action === 'resumable') { + extensionHeaders['x-goog-resumable'] = 'start'; + } + const queryParams = Object.assign({}, cfg.queryParams); + if (typeof cfg.responseType === 'string') { + queryParams['response-content-type'] = cfg.responseType; + } + if (typeof cfg.promptSaveAs === 'string') { + queryParams['response-content-disposition'] = + 'attachment; filename="' + cfg.promptSaveAs + '"'; + } + if (typeof cfg.responseDisposition === 'string') { + queryParams['response-content-disposition'] = cfg.responseDisposition; + } + if (this.generation) { + queryParams['generation'] = this.generation.toString(); + } const signConfig = { method, expires: cfg.expires, - version: cfg.version, - cname: cfg.cname, - extensionHeaders: cfg.extensionHeaders || {}, - queryParams: cfg.queryParams || {}, + accessibleAt: cfg.accessibleAt, + extensionHeaders, + queryParams, + contentMd5: cfg.contentMd5, + contentType: cfg.contentType, host: cfg.host, - signingEndpoint: cfg.signingEndpoint, }; + if (cfg.cname) { + signConfig.cname = cfg.cname; + } + if (cfg.version) { + signConfig.version = cfg.version; + } + if (cfg.virtualHostedStyle) { + signConfig.virtualHostedStyle = cfg.virtualHostedStyle; + } if (!this.signer) { - this.signer = new signer_js_1.URLSigner(this.storage.authClient, this, undefined, this.storage); + this.signer = new signer_js_1.URLSigner(this.storage.authClient, this.bucket, this, this.storage); } this.signer .getSignedUrl(signConfig) .then(signedUrl => callback(null, signedUrl), callback); } /** - * @callback BucketLockCallback + * @callback IsPublicCallback * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. + * @param {boolean} resp Whether file is public or not. */ /** - * Lock a previously-defined retention policy. This will prevent changes to - * the policy. - * - * @throws {Error} if a metageneration is not provided. + * @typedef {array} IsPublicResponse + * @property {boolean} 0 Whether file is public or not. + */ + /** + * Check whether this file is public or not by sending + * a HEAD request without credentials. + * No errors from the server indicates that the current + * file is public. + * A 403-Forbidden error {@link https://cloud.google.com/storage/docs/json_api/v1/status-codes#403_Forbidden} + * indicates that file is private. + * Any other non 403 error is propagated to user. * - * @param {number|string} metageneration The bucket's metageneration. This is - * accesssible from calling {@link File#getMetadata}. - * @param {BucketLockCallback} [callback] Callback function. - * @returns {Promise} + * @param {IsPublicCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` - * const storage = require('@google-cloud/storage')(); - * const bucket = storage.bucket('albums'); - * - * const metageneration = 2; + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); * - * bucket.lock(metageneration, function(err, apiResponse) {}); + * const file = myBucket.file('my-file'); * * //- + * // Check whether the file is publicly accessible. + * //- + * file.isPublic(function(err, resp) { + * if (err) { + * console.error(err); + * return; + * } + * console.log(`the file ${file.id} is public: ${resp}`) ; + * }) + * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.lock(metageneration).then(function(data) { - * const apiResponse = data[0]; + * file.isPublic().then(function(data) { + * const resp = data[0]; * }); * ``` */ - lock(metageneration, callback) { - const metatype = typeof metageneration; - if (metatype !== 'number' && metatype !== 'string') { - throw new Error(BucketExceptionMessages.METAGENERATION_NOT_PROVIDED); - } - this.request({ - method: 'POST', - uri: '/lockRetentionPolicy', - qs: { - ifMetagenerationMatch: metageneration, - }, - }, callback); + isPublic(callback) { + var _a; + // Build any custom headers based on the defined interceptors on the parent + // storage object and this object + const storageInterceptors = ((_a = this.storage) === null || _a === void 0 ? void 0 : _a.interceptors) || []; + const fileInterceptors = this.interceptors || []; + const allInterceptors = storageInterceptors.concat(fileInterceptors); + const headers = allInterceptors.reduce((acc, curInterceptor) => { + const currentHeaders = curInterceptor.request({ + uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, + }); + Object.assign(acc, currentHeaders.headers); + return acc; + }, {}); + index_js_1.util.makeRequest({ + method: 'GET', + uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, + headers, + }, { + retryOptions: this.storage.retryOptions, + }, (err) => { + if (err) { + const apiError = err; + if (apiError.code === 403) { + callback(null, false); + } + else { + callback(err); + } + } + else { + callback(null, true); + } + }); } /** - * @typedef {array} MakeBucketPrivateResponse - * @property {File[]} 0 List of files made private. + * @typedef {object} MakeFilePrivateOptions Configuration options for File#makePrivate(). + * @property {Metadata} [metadata] Define custom metadata properties to define + * along with the operation. + * @property {boolean} [strict] If true, set the file to be private to + * only the owner user. Otherwise, it will be private to the project. + * @property {string} [userProject] The ID of the project which will be + * billed for the request. */ /** - * @callback MakeBucketPrivateCallback + * @callback MakeFilePrivateCallback * @param {?Error} err Request error, if any. - * @param {File[]} files List of files made private. + * @param {object} apiResponse The full API response. */ /** - * @typedef {object} MakeBucketPrivateOptions - * @property {boolean} [includeFiles=false] Make each file in the bucket - * private. - * @property {Metadata} [metadata] Define custom metadata properties to define - * along with the operation. - * @property {boolean} [force] Queue errors occurred while making files - * private until all files have been processed. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * @typedef {array} MakeFilePrivateResponse + * @property {object} 0 The full API response. */ /** - * Make the bucket listing private. - * - * You may also choose to make the contents of the bucket private by - * specifying `includeFiles: true`. This will automatically run - * {@link File#makePrivate} for every file in the bucket. - * - * When specifying `includeFiles: true`, use `force: true` to delay execution - * of your callback until all files have been processed. By default, the - * callback is executed after the first error. Use `force` to queue such - * errors until all files have been processed, after which they will be - * returned as an array as the first argument to your callback. - * - * NOTE: This may cause the process to be long-running and use a high number - * of requests. Use with caution. + * Make a file private to the project and remove all other permissions. + * Set `options.strict` to true to make the file private to only the owner. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} * - * @param {MakeBucketPrivateOptions} [options] Configuration options. - * @param {boolean} [options.includeFiles=false] Make each file in the bucket - * private. - * @param {Metadata} [options.metadata] Define custom metadata properties to define - * along with the operation. - * @param {boolean} [options.force] Queue errors occurred while making files - * private until all files have been processed. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {MakeBucketPrivateCallback} [callback] Callback function. - * @returns {Promise} + * @param {MakeFilePrivateOptions} [options] Configuration options. + * @param {MakeFilePrivateCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * const myBucket = storage.bucket('my-bucket'); * - * //- - * // Make the bucket private. - * //- - * bucket.makePrivate(function(err) {}); + * const file = myBucket.file('my-file'); * * //- - * // Make the bucket and its contents private. + * // Set the file private so only project maintainers can see and modify it. * //- - * const opts = { - * includeFiles: true - * }; - * - * bucket.makePrivate(opts, function(err, files) { - * // `err`: - * // The first error to occur, otherwise null. - * // - * // `files`: - * // Array of files successfully made private in the bucket. - * }); + * file.makePrivate(function(err) {}); * * //- - * // Make the bucket and its contents private, using force to suppress errors - * // until all files have been processed. + * // Set the file private so only the owner can see and modify it. * //- - * const opts = { - * includeFiles: true, - * force: true - * }; - * - * bucket.makePrivate(opts, function(errors, files) { - * // `errors`: - * // Array of errors if any occurred, otherwise null. - * // - * // `files`: - * // Array of files successfully made private in the bucket. - * }); + * file.makePrivate({ strict: true }, function(err) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.makePrivate(opts).then(function(data) { - * const files = data[0]; + * file.makePrivate().then(function(data) { + * const apiResponse = data[0]; * }); * ``` */ makePrivate(optionsOrCallback, callback) { - var _a, _b, _c, _d; + var _a, _b; const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - options.private = true; const query = { - predefinedAcl: 'projectPrivate', + predefinedAcl: options.strict ? 'private' : 'projectPrivate', + // eslint-disable-next-line @typescript-eslint/no-explicit-any }; - if (options.userProject) { - query.userProject = options.userProject; - } - if ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) { - query.ifGenerationMatch = options.preconditionOpts.ifGenerationMatch; - } - if ((_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationNotMatch) { - query.ifGenerationNotMatch = - options.preconditionOpts.ifGenerationNotMatch; - } - if ((_c = options.preconditionOpts) === null || _c === void 0 ? void 0 : _c.ifMetagenerationMatch) { + if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifMetagenerationMatch) !== undefined) { query.ifMetagenerationMatch = - options.preconditionOpts.ifMetagenerationMatch; + (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch; + delete options.preconditionOpts; } - if ((_d = options.preconditionOpts) === null || _d === void 0 ? void 0 : _d.ifMetagenerationNotMatch) { - query.ifMetagenerationNotMatch = - options.preconditionOpts.ifMetagenerationNotMatch; + if (options.userProject) { + query.userProject = options.userProject; } - // You aren't allowed to set both predefinedAcl & acl properties on a bucket - // so acl must explicitly be nullified. + // You aren't allowed to set both predefinedAcl & acl properties on a file, + // so acl must explicitly be nullified, destroying all previous acls on the + // file. const metadata = { ...options.metadata, acl: null }; - this.setMetadata(metadata, query, (err) => { - if (err) { - callback(err); - } - const internalCall = () => { - if (options.includeFiles) { - return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, options); - } - return Promise.resolve([]); - }; - internalCall() - .then(files => callback(null, files)) - .catch(callback); - }); + this.setMetadata(metadata, query, callback); } /** - * @typedef {object} MakeBucketPublicOptions - * @property {boolean} [includeFiles=false] Make each file in the bucket - * private. - * @property {boolean} [force] Queue errors occurred while making files - * private until all files have been processed. + * @typedef {array} MakeFilePublicResponse + * @property {object} 0 The full API response. */ /** - * @callback MakeBucketPublicCallback + * @callback MakeFilePublicCallback * @param {?Error} err Request error, if any. - * @param {File[]} files List of files made public. - */ - /** - * @typedef {array} MakeBucketPublicResponse - * @property {File[]} 0 List of files made public. + * @param {object} apiResponse The full API response. */ /** - * Make the bucket publicly readable. - * - * You may also choose to make the contents of the bucket publicly readable by - * specifying `includeFiles: true`. This will automatically run - * {@link File#makePublic} for every file in the bucket. - * - * When specifying `includeFiles: true`, use `force: true` to delay execution - * of your callback until all files have been processed. By default, the - * callback is executed after the first error. Use `force` to queue such - * errors until all files have been processed, after which they will be - * returned as an array as the first argument to your callback. - * - * NOTE: This may cause the process to be long-running and use a high number - * of requests. Use with caution. + * Set a file to be publicly readable and maintain all previous permissions. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/patch| Buckets: patch API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} * - * @param {MakeBucketPublicOptions} [options] Configuration options. - * @param {boolean} [options.includeFiles=false] Make each file in the bucket - * private. - * @param {boolean} [options.force] Queue errors occurred while making files - * private until all files have been processed. - * @param {MakeBucketPublicCallback} [callback] Callback function. - * @returns {Promise} + * @param {MakeFilePublicCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Make the bucket publicly readable. - * //- - * bucket.makePublic(function(err) {}); - * - * //- - * // Make the bucket and its contents publicly readable. - * //- - * const opts = { - * includeFiles: true - * }; - * - * bucket.makePublic(opts, function(err, files) { - * // `err`: - * // The first error to occur, otherwise null. - * // - * // `files`: - * // Array of files successfully made public in the bucket. - * }); + * const myBucket = storage.bucket('my-bucket'); * - * //- - * // Make the bucket and its contents publicly readable, using force to - * // suppress errors until all files have been processed. - * //- - * const opts = { - * includeFiles: true, - * force: true - * }; + * const file = myBucket.file('my-file'); * - * bucket.makePublic(opts, function(errors, files) { - * // `errors`: - * // Array of errors if any occurred, otherwise null. - * // - * // `files`: - * // Array of files successfully made public in the bucket. - * }); + * file.makePublic(function(err, apiResponse) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.makePublic(opts).then(function(data) { - * const files = data[0]; + * file.makePublic().then(function(data) { + * const apiResponse = data[0]; * }); + * * ``` + * @example include:samples/files.js + * region_tag:storage_make_public + * Another example: */ - makePublic(optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const req = { public: true, ...options }; - this.acl - .add({ + makePublic(callback) { + callback = callback || index_js_1.util.noop; + this.acl.add({ entity: 'allUsers', role: 'READER', - }) - .then(() => { - return this.acl.default.add({ - entity: 'allUsers', - role: 'READER', - }); - }) - .then(() => { - if (req.includeFiles) { - return (0, util_1.promisify)(this.makeAllFilesPublicPrivate_).call(this, req); - } - return []; - }) - .then(files => callback(null, files), callback); + }, (err, acl, resp) => { + callback(err, resp); + }); } /** - * Get a reference to a Cloud Pub/Sub Notification. + * The public URL of this File + * Use {@link File#makePublic} to enable anonymous access via the returned URL. * - * @param {string} id ID of notification. - * @returns {Notification} - * @see Notification + * @returns {string} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const notification = bucket.notification('1'); - * ``` - */ - notification(id) { - if (!id) { - throw new Error(BucketExceptionMessages.SUPPLY_NOTIFICATION_ID); - } - return new notification_js_1.Notification(this, id); - } - /** - * Remove an already-existing retention policy from this bucket, if it is not - * locked. - * - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @param {SetBucketMetadataOptions} [options] Options, including precondition options - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); * const bucket = storage.bucket('albums'); + * const file = bucket.file('my-file'); * - * bucket.removeRetentionPeriod(function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * bucket.removeRetentionPeriod().then(function(data) { - * const apiResponse = data[0]; - * }); + * // publicUrl will be "https://storage.googleapis.com/albums/my-file" + * const publicUrl = file.publicUrl(); * ``` */ - removeRetentionPeriod(optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - this.setMetadata({ - retentionPolicy: null, - }, options, callback); - } - /** - * Makes request and applies userProject query parameter if necessary. - * - * @private - * - * @param {object} reqOpts - The request options. - * @param {function} callback - The callback function. - */ - request(reqOpts, callback) { - if (this.userProject && (!reqOpts.qs || !reqOpts.qs.userProject)) { - reqOpts.qs = { ...reqOpts.qs, userProject: this.userProject }; - } - return super.request(reqOpts, callback); + publicUrl() { + return `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`; } /** - * @deprecated - * @typedef {array} SetLabelsResponse - * @property {object} 0 The bucket metadata. + * @typedef {array} MoveFileAtomicResponse + * @property {File} 0 The moved {@link File}. + * @property {object} 1 The full API response. */ /** - * @deprecated - * @callback SetLabelsCallback + * @callback MoveFileAtomicCallback * @param {?Error} err Request error, if any. - * @param {object} metadata The bucket metadata. + * @param {File} movedFile The moved {@link File}. + * @param {object} apiResponse The full API response. */ /** - * @deprecated - * @typedef {object} SetLabelsOptions Configuration options for Bucket#setLabels(). + * @typedef {object} MoveFileAtomicOptions Configuration options for File#moveFileAtomic(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. * @property {string} [userProject] The ID of the project which will be * billed for the request. + * @property {object} [preconditionOpts] Precondition options. + * @property {number} [preconditionOpts.ifGenerationMatch] Makes the operation conditional on whether the object's current generation matches the given value. */ /** - * @deprecated Use setMetadata directly. - * Set labels on the bucket. + * Move this file within the same bucket. + * The source object must exist and be a live object. + * The source and destination object IDs must be different. + * Overwriting the destination object is allowed by default, but can be prevented + * using preconditions. + * If the destination path includes non-existent parent folders, they will be created. * - * This makes an underlying call to {@link Bucket#setMetadata}, which - * is a PATCH request. This means an individual label can be overwritten, but - * unmentioned labels will not be touched. + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/move| Objects: move API Documentation} * - * @param {object} labels Labels to set on the bucket. - * @param {SetLabelsOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {SetLabelsCallback} [callback] Callback function. - * @returns {Promise} + * @throws {Error} If the destination file is not provided. + * + * @param {string|File} destination Destination file name or File object within the same bucket.. + * @param {MoveFileAtomicOptions} [options] Configuration options. See an + * @param {MoveFileAtomicCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * const labels = { - * labelone: 'labelonevalue', - * labeltwo: 'labeltwovalue' - * }; - * - * bucket.setLabels(labels, function(err, metadata) { - * if (!err) { - * // Labels set successfully. - * } - * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // Assume 'my-bucket' is a bucket. * //- - * bucket.setLabels(labels).then(function(data) { - * const metadata = data[0]; - * }); - * ``` - */ - setLabels(labels, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - callback = callback || index_js_1.util.noop; - this.setMetadata({ labels }, options, callback); - } - setMetadata(metadata, optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, AvailableServiceObjectMethods.setMetadata, options); - super - .setMetadata(metadata, options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - }); - } - /** - * Lock all objects contained in the bucket, based on their creation time. Any - * attempt to overwrite or delete objects younger than the retention period - * will result in a `PERMISSION_DENIED` error. - * - * An unlocked retention policy can be modified or removed from the bucket via - * {@link File#removeRetentionPeriod} and {@link File#setRetentionPeriod}. A - * locked retention policy cannot be removed or shortened in duration for the - * lifetime of the bucket. Attempting to remove or decrease period of a locked - * retention policy will result in a `PERMISSION_DENIED` error. You can still - * increase the policy. - * - * @param {*} duration In seconds, the minimum retention time for all objects - * contained in this bucket. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @param {SetBucketMetadataCallback} [options] Options, including precondition options. - * @returns {Promise} + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const bucket = storage.bucket('albums'); + * //- + * // If you pass in a string for the destination, the file is copied to its + * // current bucket, under the new name provided. + * //- + * file.moveFileAtomic('moved-image.png', function(err, movedFile, apiResponse) { + * // `my-bucket` now contains: + * // - "moved-image.png" * - * const DURATION_SECONDS = 15780000; // 6 months. + * // `movedFile` is an instance of a File object that refers to your new + * // file. + * }); * * //- - * // Lock the objects in this bucket for 6 months. + * // Move the file to a subdirectory, creating parent folders if necessary. * //- - * bucket.setRetentionPeriod(DURATION_SECONDS, function(err, apiResponse) {}); + * file.moveFileAtomic('new-folder/subfolder/moved-image.png', function(err, movedFile, apiResponse) { + * // `my-bucket` now contains: + * // - "new-folder/subfolder/moved-image.png" + * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // Prevent overwriting an existing destination object using preconditions. * //- - * bucket.setRetentionPeriod(DURATION_SECONDS).then(function(data) { - * const apiResponse = data[0]; + * file.moveFileAtomic('existing-destination.png', { + * preconditionOpts: { + * ifGenerationMatch: 0 // Fails if the destination object exists. + * } + * }, function(err, movedFile, apiResponse) { + * if (err) { + * // Handle the error (e.g., the destination object already exists). + * } else { + * // Move successful. + * } * }); - * ``` - */ - setRetentionPeriod(duration, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - this.setMetadata({ - retentionPolicy: { - retentionPeriod: duration.toString(), - }, - }, options, callback); - } - /** - * - * @typedef {object} Cors - * @property {number} [maxAgeSeconds] The number of seconds the browser is - * allowed to make requests before it must repeat the preflight request. - * @property {string[]} [method] HTTP method allowed for cross origin resource - * sharing with this bucket. - * @property {string[]} [origin] an origin allowed for cross origin resource - * sharing with this bucket. - * @property {string[]} [responseHeader] A header allowed for cross origin - * resource sharing with this bucket. - */ - /** - * This can be used to set the CORS configuration on the bucket. - * - * The configuration will be overwritten with the value passed into this. - * - * @param {Cors[]} corsConfiguration The new CORS configuration to set - * @param {number} [corsConfiguration.maxAgeSeconds] The number of seconds the browser is - * allowed to make requests before it must repeat the preflight request. - * @param {string[]} [corsConfiguration.method] HTTP method allowed for cross origin resource - * sharing with this bucket. - * @param {string[]} [corsConfiguration.origin] an origin allowed for cross origin resource - * sharing with this bucket. - * @param {string[]} [corsConfiguration.responseHeader] A header allowed for cross origin - * resource sharing with this bucket. - * @param {SetBucketMetadataCallback} [callback] Callback function. - * @param {SetBucketMetadataOptions} [options] Options, including precondition options. - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const bucket = storage.bucket('albums'); - * - * const corsConfiguration = [{maxAgeSeconds: 3600}]; // 1 hour - * bucket.setCorsConfiguration(corsConfiguration); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.setCorsConfiguration(corsConfiguration).then(function(data) { - * const apiResponse = data[0]; + * file.moveFileAtomic('moved-image.png).then(function(data) { + * const newFile = data[0]; + * const apiResponse = data[1]; * }); + * * ``` + * @example include:samples/files.js + * region_tag:storage_move_file + * Another example: */ - setCorsConfiguration(corsConfiguration, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - this.setMetadata({ - cors: corsConfiguration, - }, options, callback); + moveFileAtomic(destination, optionsOrCallback, callback) { + var _a, _b; + const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME); + if (!destination) { + throw noDestinationError; + } + let options = {}; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + else if (optionsOrCallback) { + options = { ...optionsOrCallback }; + } + callback = callback || index_js_1.util.noop; + let destName; + let newFile; + if (typeof destination === 'string') { + const parsedDestination = GS_URL_REGEXP.exec(destination); + if (parsedDestination !== null && parsedDestination.length === 3) { + destName = parsedDestination[2]; + } + else { + destName = destination; + } + } + else if (destination instanceof File) { + destName = destination.name; + newFile = destination; + } + else { + throw noDestinationError; + } + newFile = newFile || this.bucket.file(destName); + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { + this.storage.retryOptions.autoRetry = false; + } + const query = {}; + if (options.userProject !== undefined) { + query.userProject = options.userProject; + delete options.userProject; + } + if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) { + query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch; + delete options.preconditionOpts; + } + this.request({ + method: 'POST', + uri: `/moveTo/o/${encodeURIComponent(newFile.name)}`, + qs: query, + json: options, + }, (err, resp) => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + if (err) { + callback(err, null, resp); + return; + } + callback(null, newFile, resp); + }); } /** - * @typedef {object} SetBucketStorageClassOptions - * @property {string} [userProject] - The ID of the project which will be - * billed for the request. + * @typedef {array} MoveResponse + * @property {File} 0 The destination File. + * @property {object} 1 The full API response. */ /** - * @callback SetBucketStorageClassCallback + * @callback MoveCallback * @param {?Error} err Request error, if any. + * @param {?File} destinationFile The destination File. + * @param {object} apiResponse The full API response. */ /** - * Set the default storage class for new files in this bucket. + * @typedef {object} MoveOptions Configuration options for File#move(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Move this file to another location. By default, this will rename the file + * and keep it in the same bucket, but you can choose to move it to another + * Bucket by providing a Bucket or File object or a URL beginning with + * "gs://". * - * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} + * **Warning**: + * There is currently no atomic `move` method in the Cloud Storage API, + * so this method is a composition of {@link File#copy} (to the new + * location) and {@link File#delete} (from the old location). While + * unlikely, it is possible that an error returned to your callback could be + * triggered from either one of these API calls failing, which could leave a + * duplicate file lingering. The error message will indicate what operation + * has failed. * - * @param {string} storageClass The new storage class. (`standard`, - * `nearline`, `coldline`, or `archive`). - * **Note:** The storage classes `multi_regional`, `regional`, and - * `durable_reduced_availability` are now legacy and will be deprecated in - * the future. - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] - The ID of the project which will be - * billed for the request. - * @param {SetStorageClassCallback} [callback] Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/copy| Objects: copy API Documentation} + * + * @throws {Error} If the destination file is not provided. + * + * @param {string|Bucket|File} destination Destination file. + * @param {MoveCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * //- + * // You can pass in a variety of types for the destination. + * // + * // For all of the below examples, assume we are working with the following + * // Bucket and File objects. + * //- + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); * - * bucket.setStorageClass('nearline', function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } + * //- + * // If you pass in a string for the destination, the file is moved to its + * // current bucket, under the new name provided. + * //- + * file.move('my-image-new.png', function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // but contains instead: + * // - "my-image-new.png" * - * // The storage class was updated successfully. + * // `destinationFile` is an instance of a File object that refers to your + * // new file. * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // If you pass in a string starting with "gs://" for the destination, the + * // file is copied to the other bucket and under the new name provided. * //- - * bucket.setStorageClass('nearline').then(function() {}); - * ``` - */ - setStorageClass(storageClass, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - // In case we get input like `storageClass`, convert to `storage_class`. - storageClass = storageClass - .replace(/-/g, '_') - .replace(/([a-z])([A-Z])/g, (_, low, up) => { - return low + '_' + up; - }) - .toUpperCase(); - this.setMetadata({ storageClass }, options, callback); - } - /** - * Set a user project to be billed for all requests made from this Bucket - * object and any files referenced from this Bucket object. + * const newLocation = 'gs://another-bucket/my-image-new.png'; + * file.move(newLocation, function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image-new.png" * - * @param {string} userProject The user project. + * // `destinationFile` is an instance of a File object that refers to your + * // new file. + * }); * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); + * //- + * // If you pass in a Bucket object, the file will be moved to that bucket + * // using the same name. + * //- + * const anotherBucket = gcs.bucket('another-bucket'); * - * bucket.setUserProject('grape-spaceship-123'); - * ``` - */ - setUserProject(userProject) { - this.userProject = userProject; - const methods = [ - 'create', - 'delete', - 'exists', - 'get', - 'getMetadata', - 'setMetadata', - ]; - methods.forEach(method => { - const methodConfig = this.methods[method]; - if (typeof methodConfig === 'object') { - if (typeof methodConfig.reqOpts === 'object') { - Object.assign(methodConfig.reqOpts.qs, { userProject }); - } - else { - methodConfig.reqOpts = { - qs: { userProject }, - }; - } - } - }); - } - /** - * @typedef {object} UploadOptions Configuration options for Bucket#upload(). - * @property {string|File} [destination] The place to save - * your file. If given a string, the file will be uploaded to the bucket - * using the string as a filename. When given a File object, your local - * file will be uploaded to the File object's bucket and under the File - * object's name. Lastly, when this argument is omitted, the file is uploaded - * to your bucket using the name of the local file. - * @property {string} [encryptionKey] A custom encryption key. See - * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. - * @property {boolean} [gzip] Automatically gzip the file. This will set - * `options.metadata.contentEncoding` to `gzip`. - * @property {string} [kmsKeyName] The name of the Cloud KMS key that will - * be used to encrypt the object. Must be in the format: - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. - * @property {object} [metadata] See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. - * @property {string} [offset] The starting byte of the upload stream, for - * resuming an interrupted upload. Defaults to 0. - * @property {string} [predefinedAcl] Apply a predefined set of access - * controls to this object. + * file.move(anotherBucket, function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-image.png" * - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. + * // `destinationFile` is an instance of a File object that refers to your + * // new file. + * }); * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. + * //- + * // If you pass in a File object, you have complete control over the new + * // bucket and filename. + * //- + * const anotherFile = anotherBucket.file('my-awesome-image.png'); * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. + * file.move(anotherFile, function(err, destinationFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // + * // `another-bucket` now contains: + * // - "my-awesome-image.png" * - * - **`private`** - Object owner gets `OWNER` access. + * // Note: + * // The `destinationFile` parameter is equal to `anotherFile`. + * }); * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.move('my-image-new.png').then(function(data) { + * const destinationFile = data[0]; + * const apiResponse = data[1]; + * }); * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @property {boolean} [private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @property {boolean} [public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @property {boolean} [resumable=true] Resumable uploads are automatically - * enabled and must be shut off explicitly by setting to false. - * @property {number} [timeout=60000] Set the HTTP request timeout in - * milliseconds. This option is not available for resumable uploads. - * Default: `60000` - * @property {string} [uri] The URI for an already-created resumable - * upload. See {@link File#createResumableUpload}. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string|boolean} [validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with an - * MD5 checksum for maximum reliability. CRC32c will provide better - * performance with less reliability. You may also choose to skip - * validation completely, however this is **not recommended**. + * ``` + * @example include:samples/files.js + * region_tag:storage_move_file + * Another example: */ + move(destination, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + callback = callback || index_js_1.util.noop; + this.copy(destination, options, (err, destinationFile, copyApiResponse) => { + if (err) { + err.message = 'file#copy failed with an error - ' + err.message; + callback(err, null, copyApiResponse); + return; + } + if (this.name !== destinationFile.name || + this.bucket.name !== destinationFile.bucket.name) { + this.delete(options, (err, apiResponse) => { + if (err) { + err.message = 'file#delete failed with an error - ' + err.message; + callback(err, destinationFile, apiResponse); + return; + } + callback(null, destinationFile, copyApiResponse); + }); + } + else { + callback(null, destinationFile, copyApiResponse); + } + }); + } /** - * @typedef {array} UploadResponse - * @property {object} 0 The uploaded {@link File}. + * @typedef {array} RenameResponse + * @property {File} 0 The destination File. * @property {object} 1 The full API response. */ /** - * @callback UploadCallback + * @callback RenameCallback * @param {?Error} err Request error, if any. - * @param {object} file The uploaded {@link File}. + * @param {?File} destinationFile The destination File. * @param {object} apiResponse The full API response. */ /** - * Upload a file to the bucket. This is a convenience method that wraps - * {@link File#createWriteStream}. - * - * Resumable uploads are enabled by default - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload#uploads| Upload Options (Simple or Resumable)} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert| Objects: insert API Documentation} - * - * @param {string} pathString The fully qualified path to the file you - * wish to upload to your bucket. - * @param {UploadOptions} [options] Configuration options. - * @param {string|File} [options.destination] The place to save - * your file. If given a string, the file will be uploaded to the bucket - * using the string as a filename. When given a File object, your local - * file will be uploaded to the File object's bucket and under the File - * object's name. Lastly, when this argument is omitted, the file is uploaded - * to your bucket using the name of the local file. - * @param {string} [options.encryptionKey] A custom encryption key. See - * {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys}. - * @param {boolean} [options.gzip] Automatically gzip the file. This will set - * `options.metadata.contentEncoding` to `gzip`. - * @param {string} [options.kmsKeyName] The name of the Cloud KMS key that will - * be used to encrypt the object. Must be in the format: - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`. - * @param {object} [options.metadata] See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body}. - * @param {string} [options.offset] The starting byte of the upload stream, for - * resuming an interrupted upload. Defaults to 0. - * @param {string} [options.predefinedAcl] Apply a predefined set of access - * controls to this object. - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. - * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. - * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. - * - * - **`private`** - Object owner gets `OWNER` access. + * @typedef {object} RenameOptions Configuration options for File#move(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + */ + /** + * Rename this file. * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. + * **Warning**: + * There is currently no atomic `rename` method in the Cloud Storage API, + * so this method is an alias of {@link File#move}, which in turn is a + * composition of {@link File#copy} (to the new location) and + * {@link File#delete} (from the old location). While + * unlikely, it is possible that an error returned to your callback could be + * triggered from either one of these API calls failing, which could leave a + * duplicate file lingering. The error message will indicate what operation + * has failed. * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @param {boolean} [options.private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @param {boolean} [options.public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @param {boolean} [options.resumable=true] Resumable uploads are automatically - * enabled and must be shut off explicitly by setting to false. - * @param {number} [options.timeout=60000] Set the HTTP request timeout in - * milliseconds. This option is not available for resumable uploads. - * Default: `60000` - * @param {string} [options.uri] The URI for an already-created resumable - * upload. See {@link File#createResumableUpload}. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {string|boolean} [options.validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with an - * MD5 checksum for maximum reliability. CRC32c will provide better - * performance with less reliability. You may also choose to skip - * validation completely, however this is **not recommended**. - * @param {UploadCallback} [callback] Callback function. - * @returns {Promise} + * @param {string|File} destinationFile Destination file. + * @param {RenameCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * - * //- - * // Upload a file from a local path. - * //- - * bucket.upload('/local/path/image.png', function(err, file, apiResponse) { - * // Your bucket now contains: - * // - "image.png" (with the contents of `/local/path/image.png') - * - * // `file` is an instance of a File object that refers to your new file. - * }); - * * * //- - * // It's not always that easy. You will likely want to specify the filename - * // used when your new file lands in your bucket. + * // You can pass in a string or a File object. * // - * // You may also want to set metadata or customize other options. + * // For all of the below examples, assume we are working with the following + * // Bucket and File objects. * //- - * const options = { - * destination: 'new-image.png', - * validation: 'crc32c', - * metadata: { - * metadata: { - * event: 'Fall trip to the zoo' - * } - * } - * }; - * - * bucket.upload('local-image.png', options, function(err, file) { - * // Your bucket now contains: - * // - "new-image.png" (with the contents of `local-image.png') * - * // `file` is an instance of a File object that refers to your new file. - * }); + * const bucket = storage.bucket('my-bucket'); + * const file = bucket.file('my-image.png'); * * //- - * // You can also have a file gzip'd on the fly. + * // You can pass in a string for the destinationFile. * //- - * bucket.upload('index.html', { gzip: true }, function(err, file) { - * // Your bucket now contains: - * // - "index.html" (automatically compressed with gzip) + * file.rename('renamed-image.png', function(err, renamedFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" + * // but contains instead: + * // - "renamed-image.png" * - * // Downloading the file with `file.download` will automatically decode - * the - * // file. + * // `renamedFile` is an instance of a File object that refers to your + * // renamed file. * }); * * //- - * // You may also re-use a File object, {File}, that references - * // the file you wish to create or overwrite. + * // You can pass in a File object. * //- - * const options = { - * destination: bucket.file('existing-file.png'), - * resumable: false - * }; + * const anotherFile = anotherBucket.file('my-awesome-image.png'); * - * bucket.upload('local-img.png', options, function(err, newFile) { - * // Your bucket now contains: - * // - "existing-file.png" (with the contents of `local-img.png') + * file.rename(anotherFile, function(err, renamedFile, apiResponse) { + * // `my-bucket` no longer contains: + * // - "my-image.png" * * // Note: - * // The `newFile` parameter is equal to `file`. + * // The `renamedFile` parameter is equal to `anotherFile`. * }); * * //- - * // To use - * // - * // Customer-supplied Encryption Keys, provide the `encryptionKey` - * option. + * // If the callback is omitted, we'll return a Promise. * //- - * const crypto = require('crypto'); - * const encryptionKey = crypto.randomBytes(32); + * file.rename('my-renamed-image.png').then(function(data) { + * const renamedFile = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + rename(destinationFile, optionsOrCallback, callback) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + callback = callback || index_js_1.util.noop; + this.move(destinationFile, options, callback); + } + /** + * @typedef {object} RestoreOptions Options for File#restore(). See an + * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. + * @param {string} [userProject] The ID of the project which will be + * billed for the request. + * @param {number} [generation] If present, selects a specific revision of this object. + * @param {string} [restoreToken] Returns an option that must be specified when getting a soft-deleted object from an HNS-enabled + * bucket that has a naming and generation conflict with another object in the same bucket. + * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'. + * @param {string | number} [ifGenerationMatch] Request proceeds if the generation of the target resource + * matches the value used in the precondition. + * If the values don't match, the request fails with a 412 Precondition Failed response. + * @param {string | number} [ifGenerationNotMatch] Request proceeds if the generation of the target resource does + * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. + * @param {string | number} [ifMetagenerationMatch] Request proceeds if the meta-generation of the target resource + * matches the value used in the precondition. + * If the values don't match, the request fails with a 412 Precondition Failed response. + * @param {string | number} [ifMetagenerationNotMatch] Request proceeds if the meta-generation of the target resource does + * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. + */ + /** + * Restores a soft-deleted file + * @param {RestoreOptions} options Restore options. + * @returns {Promise} + */ + async restore(options) { + const [file] = await this.request({ + method: 'POST', + uri: '/restore', + qs: options, + }); + return file; + } + /** + * Makes request and applies userProject query parameter if necessary. * - * bucket.upload('img.png', { - * encryptionKey: encryptionKey - * }, function(err, newFile) { - * // `img.png` was uploaded with your custom encryption key. + * @private * - * // `newFile` is already configured to use the encryption key when making - * // operations on the remote object. + * @param {object} reqOpts - The request options. + * @param {function} callback - The callback function. + */ + request(reqOpts, callback) { + return this.parent.request.call(this, reqOpts, callback); + } + /** + * @callback RotateEncryptionKeyCallback + * @extends CopyCallback + */ + /** + * @typedef RotateEncryptionKeyResponse + * @extends CopyResponse + */ + /** + * @param {string|buffer|object} RotateEncryptionKeyOptions Configuration options + * for File#rotateEncryptionKey(). + * If a string or Buffer is provided, it is interpreted as an AES-256, + * customer-supplied encryption key. If you'd like to use a Cloud KMS key + * name, you must specify an options object with the property name: + * `kmsKeyName`. + * @param {string|buffer} [options.encryptionKey] An AES-256 encryption key. + * @param {string} [options.kmsKeyName] A Cloud KMS key name. + */ + /** + * This method allows you to update the encryption key associated with this + * file. * - * // However, to use your encryption key later, you must create a `File` - * // instance with the `key` supplied: - * const file = bucket.file('img.png', { - * encryptionKey: encryptionKey - * }); + * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} * - * // Or with `file#setEncryptionKey`: - * const file = bucket.file('img.png'); - * file.setEncryptionKey(encryptionKey); + * @param {RotateEncryptionKeyOptions} [options] - Configuration options. + * @param {RotateEncryptionKeyCallback} [callback] + * @returns {Promise} + * + * @example include:samples/encryption.js + * region_tag:storage_rotate_encryption_key + * Example of rotating the encryption key for this file: + */ + rotateEncryptionKey(optionsOrCallback, callback) { + var _a; + callback = + typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; + let options = {}; + if (typeof optionsOrCallback === 'string' || + optionsOrCallback instanceof Buffer) { + options = { + encryptionKey: optionsOrCallback, + }; + } + else if (typeof optionsOrCallback === 'object') { + options = optionsOrCallback; + } + const newFile = this.bucket.file(this.id, options); + const copyOptions = ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined + ? { preconditionOpts: options.preconditionOpts } + : {}; + this.copy(newFile, copyOptions, callback); + } + /** + * @typedef {object} SaveOptions + * @extends CreateWriteStreamOptions + */ + /** + * @callback SaveCallback + * @param {?Error} err Request error, if any. + */ + /** + * Write strings or buffers to a file. + * + * *This is a convenience method which wraps {@link File#createWriteStream}.* + * To upload arbitrary data to a file, please use {@link File#createWriteStream} directly. + * + * Resumable uploads are automatically enabled and must be shut off explicitly + * by setting `options.resumable` to `false`. + * + * Multipart uploads with retryable error codes will be retried 3 times with exponential backoff. + * + *

+ * There is some overhead when using a resumable upload that can cause + * noticeable performance degradation while uploading a series of small + * files. When uploading files less than 10MB, it is recommended that the + * resumable feature is disabled. + *

+ * + * @param {SaveData} data The data to write to a file. + * @param {SaveOptions} [options] See {@link File#createWriteStream}'s `options` + * parameter. + * @param {SaveCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const file = myBucket.file('my-file'); + * const contents = 'This is the contents of the file.'; + * + * file.save(contents, function(err) { + * if (!err) { + * // File written successfully. + * } * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.upload('local-image.png').then(function(data) { - * const file = data[0]; - * }); - * - * To upload a file from a URL, use {@link File#createWriteStream}. - * + * file.save(contents).then(function() {}); * ``` - * @example include:samples/files.js - * region_tag:storage_upload_file - * Another example: - * - * @example include:samples/encryption.js - * region_tag:storage_upload_encrypted_file - * Example of uploading an encrypted file: */ - upload(pathString, optionsOrCallback, callback) { - var _a, _b; - const upload = (numberOfRetries) => { - const returnValue = (0, async_retry_1.default)(async (bail) => { - await new Promise((resolve, reject) => { - var _a, _b; - if (numberOfRetries === 0 && - ((_b = (_a = newFile === null || newFile === void 0 ? void 0 : newFile.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry)) { - newFile.storage.retryOptions.autoRetry = false; - } - const writable = newFile.createWriteStream(options); - if (options.onUploadProgress) { - writable.on('progress', options.onUploadProgress); - } - fs.createReadStream(pathString) - .on('error', bail) - .pipe(writable) - .on('error', err => { - if (this.storage.retryOptions.autoRetry && - this.storage.retryOptions.retryableErrorFn(err)) { - return reject(err); - } - else { - return bail(err); - } - }) - .on('finish', () => { - return resolve(); - }); - }); - }, { - retries: numberOfRetries, - factor: this.storage.retryOptions.retryDelayMultiplier, - maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds - maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds - }); - if (!callback) { - return returnValue; - } - else { - return returnValue - .then(() => { - if (callback) { - return callback(null, newFile, newFile.metadata); - } - }) - .catch(callback); - } - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (global['GCLOUD_SANDBOX_ENV']) { - return; - } - let options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + save(data, optionsOrCallback, callback) { + // tslint:enable:no-any callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - options = Object.assign({ - metadata: {}, - }, options); - // Do not retry if precondition option ifGenerationMatch is not set - // because this is a file operation + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; let maxRetries = this.storage.retryOptions.maxRetries; - if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && - ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { maxRetries = 0; } - let newFile; - if (options.destination instanceof file_js_1.File) { - newFile = options.destination; - } - else if (options.destination !== null && - typeof options.destination === 'string') { - // Use the string as the name of the file. - newFile = this.file(options.destination, { - encryptionKey: options.encryptionKey, - kmsKeyName: options.kmsKeyName, - preconditionOpts: this.instancePreconditionOpts, + const returnValue = (0, async_retry_1.default)(async (bail) => { + return new Promise((resolve, reject) => { + if (maxRetries === 0) { + this.storage.retryOptions.autoRetry = false; + } + const writable = this.createWriteStream(options); + if (options.onUploadProgress) { + writable.on('progress', options.onUploadProgress); + } + const handleError = (err) => { + if (this.storage.retryOptions.autoRetry && + this.storage.retryOptions.retryableErrorFn(err)) { + return reject(err); + } + return bail(err); + }; + if (typeof data === 'string' || + Buffer.isBuffer(data) || + data instanceof Uint8Array) { + writable + .on('error', handleError) + .on('finish', () => resolve()) + .end(data); + } + else { + (0, stream_1.pipeline)(data, writable, err => { + if (err) { + if (typeof data !== 'function') { + // Only PipelineSourceFunction can be retried. Async-iterables + // and Readable streams can only be consumed once. + return bail(err); + } + handleError(err); + } + else { + resolve(); + } + }); + } }); + }, { + retries: maxRetries, + factor: this.storage.retryOptions.retryDelayMultiplier, + maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds + maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds + }); + if (!callback) { + return returnValue; } else { - // Resort to using the name of the incoming file. - const destination = path.basename(pathString); - newFile = this.file(destination, { - encryptionKey: options.encryptionKey, - kmsKeyName: options.kmsKeyName, - preconditionOpts: this.instancePreconditionOpts, - }); + return returnValue + .then(() => { + if (callback) { + return callback(); + } + }) + .catch(callback); } - upload(maxRetries); + } + setMetadata(metadata, optionsOrCallback, cb) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, bucket_js_1.AvailableServiceObjectMethods.setMetadata, options); + super + .setMetadata(metadata, options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + }); } /** - * @private - * - * @typedef {object} MakeAllFilesPublicPrivateOptions - * @property {boolean} [force] Suppress errors until all files have been - * processed. - * @property {boolean} [private] Make files private. - * @property {boolean} [public] Make files public. + * @typedef {array} SetStorageClassResponse + * @property {object} 0 The full API response. + */ + /** + * @typedef {object} SetStorageClassOptions Configuration options for File#setStorageClass(). * @property {string} [userProject] The ID of the project which will be * billed for the request. */ /** - * @private - * - * @callback SetBucketMetadataCallback + * @callback SetStorageClassCallback * @param {?Error} err Request error, if any. - * @param {File[]} files Files that were updated. - */ - /** - * @typedef {array} MakeAllFilesPublicPrivateResponse - * @property {File[]} 0 List of files affected. + * @param {object} apiResponse The full API response. */ /** - * Iterate over all of a bucket's files, calling `file.makePublic()` (public) - * or `file.makePrivate()` (private) on each. - * - * Operations are performed in parallel, up to 10 at once. The first error - * breaks the loop, and will execute the provided callback with it. Specify - * `{ force: true }` to suppress the errors. + * Set the storage class for this file. * - * @private + * See {@link https://cloud.google.com/storage/docs/per-object-storage-class| Per-Object Storage Class} + * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} * - * @param {MakeAllFilesPublicPrivateOptions} [options] Configuration options. - * @param {boolean} [options.force] Suppress errors until all files have been - * processed. - * @param {boolean} [options.private] Make files private. - * @param {boolean} [options.public] Make files public. + * @param {string} storageClass The new storage class. (`standard`, + * `nearline`, `coldline`, or `archive`) + * **Note:** The storage classes `multi_regional` and `regional` + * are now legacy and will be deprecated in the future. + * @param {SetStorageClassOptions} [options] Configuration options. * @param {string} [options.userProject] The ID of the project which will be * billed for the request. - - * @param {MakeAllFilesPublicPrivateCallback} callback Callback function. + * @param {SetStorageClassCallback} [callback] Callback function. + * @returns {Promise} * - * @return {Promise} + * @example + * ``` + * file.setStorageClass('nearline', function(err, apiResponse) { + * if (err) { + * // Error handling omitted. + * } + * + * // The storage class was updated successfully. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * file.setStorageClass('nearline').then(function() {}); + * ``` */ - makeAllFilesPublicPrivate_(optionsOrCallback, callback) { - const MAX_PARALLEL_LIMIT = 10; - const errors = []; - const updatedFiles = []; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + setStorageClass(storageClass, optionsOrCallback, callback) { callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const processFile = async (file) => { - try { - await (options.public ? file.makePublic() : file.makePrivate(options)); - updatedFiles.push(file); - } - catch (e) { - if (!options.force) { - throw e; - } - errors.push(e); + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const req = { + ...options, + // In case we get input like `storageClass`, convert to `storage_class`. + storageClass: storageClass + .replace(/-/g, '_') + .replace(/([a-z])([A-Z])/g, (_, low, up) => { + return low + '_' + up; + }) + .toUpperCase(), + }; + this.copy(this, req, (err, file, apiResponse) => { + if (err) { + callback(err, apiResponse); + return; } + this.metadata = file.metadata; + callback(null, apiResponse); + }); + } + /** + * Set a user project to be billed for all requests made from this File + * object. + * + * @param {string} userProject The user project. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('albums'); + * const file = bucket.file('my-file'); + * + * file.setUserProject('grape-spaceship-123'); + * ``` + */ + setUserProject(userProject) { + this.bucket.setUserProject.call(this, userProject); + } + /** + * This creates a resumable-upload upload stream. + * + * @param {Duplexify} stream - Duplexify stream of data to pipe to the file. + * @param {object=} options - Configuration object. + * + * @private + */ + startResumableUpload_(dup, options = {}) { + var _a; + (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); + const retryOptions = this.storage.retryOptions; + if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options.preconditionOpts)) { + retryOptions.autoRetry = false; + } + const cfg = { + authClient: this.storage.authClient, + apiEndpoint: this.storage.apiEndpoint, + bucket: this.bucket.name, + customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), + file: this.name, + generation: this.generation, + isPartialUpload: options.isPartialUpload, + key: this.encryptionKey, + kmsKeyName: this.kmsKeyName, + metadata: options.metadata, + offset: options.offset, + predefinedAcl: options.predefinedAcl, + private: options.private, + public: options.public, + uri: options.uri, + userProject: options.userProject || this.userProject, + retryOptions: { ...retryOptions }, + params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, + chunkSize: options === null || options === void 0 ? void 0 : options.chunkSize, + highWaterMark: options === null || options === void 0 ? void 0 : options.highWaterMark, + universeDomain: this.bucket.storage.universeDomain, + [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], }; - this.getFiles(options) - .then(([files]) => { - const limit = (0, p_limit_1.default)(MAX_PARALLEL_LIMIT); - const promises = files.map(file => { - return limit(() => processFile(file)); - }); - return Promise.all(promises); + let uploadStream; + try { + uploadStream = resumableUpload.upload(cfg); + } + catch (error) { + dup.destroy(error); + this.storage.retryOptions.autoRetry = this.instanceRetryValue; + return; + } + uploadStream + .on('response', resp => { + dup.emit('response', resp); }) - .then(() => callback(errors.length > 0 ? errors : null, updatedFiles), err => callback(err, updatedFiles)); + .on('uri', uri => { + dup.emit('uri', uri); + }) + .on('metadata', metadata => { + this.metadata = metadata; + dup.emit('metadata'); + }) + .on('finish', () => { + dup.emit('complete'); + }) + .on('progress', evt => dup.emit('progress', evt)); + dup.setWritable(uploadStream); + this.storage.retryOptions.autoRetry = this.instanceRetryValue; } - getId() { - return this.id; + /** + * Takes a readable stream and pipes it to a remote file. Unlike + * `startResumableUpload_`, which uses the resumable upload technique, this + * method uses a simple upload (all or nothing). + * + * @param {Duplexify} dup - Duplexify stream of data to pipe to the file. + * @param {object=} options - Configuration object. + * + * @private + */ + startSimpleUpload_(dup, options = {}) { + var _a; + (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); + const apiEndpoint = this.storage.apiEndpoint; + const bucketName = this.bucket.name; + const uri = `${apiEndpoint}/upload/storage/v1/b/${bucketName}/o`; + const reqOpts = { + qs: { + name: this.name, + }, + uri: uri, + [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], + }; + if (this.generation !== undefined) { + reqOpts.qs.ifGenerationMatch = this.generation; + } + if (this.kmsKeyName !== undefined) { + reqOpts.qs.kmsKeyName = this.kmsKeyName; + } + if (typeof options.timeout === 'number') { + reqOpts.timeout = options.timeout; + } + if (options.userProject || this.userProject) { + reqOpts.qs.userProject = options.userProject || this.userProject; + } + if (options.predefinedAcl) { + reqOpts.qs.predefinedAcl = options.predefinedAcl; + } + else if (options.private) { + reqOpts.qs.predefinedAcl = 'private'; + } + else if (options.public) { + reqOpts.qs.predefinedAcl = 'publicRead'; + } + Object.assign(reqOpts.qs, this.instancePreconditionOpts, options.preconditionOpts); + index_js_1.util.makeWritableStream(dup, { + makeAuthenticatedRequest: (reqOpts) => { + this.request(reqOpts, (err, body, resp) => { + if (err) { + dup.destroy(err); + return; + } + this.metadata = body; + dup.emit('metadata', body); + dup.emit('response', resp); + dup.emit('complete'); + }); + }, + metadata: options.metadata, + request: reqOpts, + }); } disableAutoRetryConditionallyIdempotent_( // eslint-disable-next-line @typescript-eslint/no-explicit-any - coreOpts, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - methodType, localPreconditionOptions) { - var _a, _b; - if (typeof coreOpts === 'object' && - ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch) === undefined && - (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && - (methodType === AvailableServiceObjectMethods.setMetadata || - methodType === AvailableServiceObjectMethods.delete) && + coreOpts, methodType, localPreconditionOptions) { + var _a, _b, _c, _d; + if ((typeof coreOpts === 'object' && + ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && + (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifGenerationMatch) === undefined && + methodType === bucket_js_1.AvailableServiceObjectMethods.delete && this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) { + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { this.storage.retryOptions.autoRetry = false; } - else if (this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { + if ((typeof coreOpts === 'object' && + ((_d = (_c = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _c === void 0 ? void 0 : _c.qs) === null || _d === void 0 ? void 0 : _d.ifMetagenerationMatch) === undefined && + (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && + methodType === bucket_js_1.AvailableServiceObjectMethods.setMetadata && + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryConditional) || + this.storage.retryOptions.idempotencyStrategy === + storage_js_1.IdempotencyStrategy.RetryNever) { this.storage.retryOptions.autoRetry = false; } } + async getBufferFromReadable(readable) { + const buf = []; + for await (const chunk of readable) { + buf.push(chunk); + } + return Buffer.concat(buf); + } } -exports.Bucket = Bucket; -/*! Developer Documentation - * - * These methods can be auto-paginated. - */ -paginator_1.paginator.extend(Bucket, 'getFiles'); -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(Bucket, { - exclude: ['cloudStorageURI', 'request', 'file', 'notification'], -}); - - -/***/ }), - -/***/ 62665: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Channel = void 0; -const index_js_1 = __nccwpck_require__(4052); -const promisify_1 = __nccwpck_require__(19203); +exports.File = File; +_File_instances = new WeakSet(), _File_validateIntegrity = /** - * Create a channel object to interact with a Cloud Storage channel. - * - * See {@link https://cloud.google.com/storage/docs/object-change-notification| Object Change Notification} - * - * @class - * - * @param {string} id The ID of the channel. - * @param {string} resourceId The resource ID of the channel. * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const channel = storage.channel('id', 'resource-id'); - * ``` + * @param hashCalculatingStream + * @param verify + * @returns {boolean} Returns `true` if valid, throws with error otherwise */ -class Channel extends index_js_1.ServiceObject { - constructor(storage, id, resourceId) { - const config = { - parent: storage, - baseUrl: '/channels', - // An ID shouldn't be included in the API requests. - // RE: - // https://github.com/GoogleCloudPlatform/google-cloud-node/issues/1145 - id: '', - methods: { - // Only need `request`. - }, - }; - super(config); - this.metadata.id = id; - this.metadata.resourceId = resourceId; +async function _File_validateIntegrity(hashCalculatingStream, verify = {}) { + const metadata = this.metadata; + // If we're doing validation, assume the worst + let dataMismatch = !!(verify.crc32c || verify.md5); + if (verify.crc32c && metadata.crc32c) { + dataMismatch = !hashCalculatingStream.test('crc32c', metadata.crc32c); } - /** - * @typedef {array} StopResponse - * @property {object} 0 The full API response. - */ - /** - * @callback StopCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Stop this channel. - * - * @param {StopCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const channel = storage.channel('id', 'resource-id'); - * channel.stop(function(err, apiResponse) { - * if (!err) { - * // Channel stopped successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * channel.stop().then(function(data) { - * const apiResponse = data[0]; - * }); - * ``` - */ - stop(callback) { - callback = callback || index_js_1.util.noop; - this.request({ - method: 'POST', - uri: '/stop', - json: this.metadata, - }, (err, apiResponse) => { - callback(err, apiResponse); - }); + if (verify.md5 && metadata.md5Hash) { + dataMismatch = !hashCalculatingStream.test('md5', metadata.md5Hash); } -} -exports.Channel = Channel; + if (dataMismatch) { + const errors = []; + let code = ''; + let message = ''; + try { + await this.delete(); + if (verify.md5 && !metadata.md5Hash) { + code = 'MD5_NOT_AVAILABLE'; + message = FileExceptionMessages.MD5_NOT_AVAILABLE; + } + else { + code = 'FILE_NO_UPLOAD'; + message = FileExceptionMessages.UPLOAD_MISMATCH; + } + } + catch (e) { + const error = e; + code = 'FILE_NO_UPLOAD_DELETE'; + message = `${FileExceptionMessages.UPLOAD_MISMATCH_DELETE_FAIL}${error.message}`; + errors.push(error); + } + const error = new RequestError(message); + error.code = code; + error.errors = errors; + throw error; + } + return true; +}; /*! Developer Documentation * * All async methods (except for streams) will return a Promise in the event * that a callback is omitted. */ -(0, promisify_1.promisifyAll)(Channel); +(0, promisify_1.promisifyAll)(File, { + exclude: [ + 'cloudStorageURI', + 'publicUrl', + 'request', + 'save', + 'setEncryptionKey', + 'shouldRetryBasedOnPreconditionAndIdempotencyStrat', + 'getBufferFromReadable', + 'restore', + ], +}); /***/ }), -/***/ 55810: +/***/ 40725: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -156172,259 +161748,132 @@ exports.Channel = Channel; // 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. -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _CRC32C_crc32c; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.CRC32C_EXTENSION_TABLE = exports.CRC32C_EXTENSIONS = exports.CRC32C_EXCEPTION_MESSAGES = exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = exports.CRC32C = void 0; -const fs_1 = __nccwpck_require__(57147); -/** - * Ported from {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc#L16-L59 github.com/google/crc32c} - */ -const CRC32C_EXTENSIONS = [ - 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, - 0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, - 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c, - 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, - 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc, - 0xbc267848, 0x4e4dfb4b, 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, - 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, 0xaa64d611, 0x580f5512, - 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, - 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad, - 0x1642ae59, 0xe4292d5a, 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, - 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, 0x417b1dbc, 0xb3109ebf, - 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, - 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f, - 0xed03a29b, 0x1f682198, 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, - 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, 0xdbfc821c, 0x2997011f, - 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, - 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e, - 0x4767748a, 0xb50cf789, 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, - 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, 0x7198540d, 0x83f3d70e, - 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, - 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de, - 0xdde0eb2a, 0x2f8b6829, 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, - 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, 0x082f63b7, 0xfa44e0b4, - 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, - 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b, - 0xb4091bff, 0x466298fc, 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, - 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, 0xa24bb5a6, 0x502036a5, - 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, - 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975, - 0x0e330a81, 0xfc588982, 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, - 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, 0x38cc2a06, 0xcaa7a905, - 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, - 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8, - 0xe52cc12c, 0x1747422f, 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, - 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, 0xd3d3e1ab, 0x21b862a8, - 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, - 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78, - 0x7fab5e8c, 0x8dc0dd8f, 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, - 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, 0x69e9f0d5, 0x9b8273d6, - 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, - 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69, - 0xd5cf889d, 0x27a40b9e, 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, - 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351, -]; -exports.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; -const CRC32C_EXTENSION_TABLE = new Int32Array(CRC32C_EXTENSIONS); -exports.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; -const CRC32C_DEFAULT_VALIDATOR_GENERATOR = () => new CRC32C(); -exports.CRC32C_DEFAULT_VALIDATOR_GENERATOR = CRC32C_DEFAULT_VALIDATOR_GENERATOR; -const CRC32C_EXCEPTION_MESSAGES = { - INVALID_INIT_BASE64_RANGE: (l) => `base64-encoded data expected to equal 4 bytes, not ${l}`, - INVALID_INIT_BUFFER_LENGTH: (l) => `Buffer expected to equal 4 bytes, not ${l}`, - INVALID_INIT_INTEGER: (l) => `Number expected to be a safe, unsigned 32-bit integer, not ${l}`, -}; -exports.CRC32C_EXCEPTION_MESSAGES = CRC32C_EXCEPTION_MESSAGES; -class CRC32C { - /** - * Constructs a new `CRC32C` object. - * - * Reconstruction is recommended via the `CRC32C.from` static method. - * - * @param initialValue An initial CRC32C value - a signed 32-bit integer. - */ - constructor(initialValue = 0) { - /** Current CRC32C value */ - _CRC32C_crc32c.set(this, 0); - __classPrivateFieldSet(this, _CRC32C_crc32c, initialValue, "f"); - } - /** - * Calculates a CRC32C from a provided buffer. - * - * Implementation inspired from: - * - {@link https://github.com/google/crc32c/blob/21fc8ef30415a635e7351ffa0e5d5367943d4a94/src/crc32c_portable.cc github.com/google/crc32c} - * - {@link https://github.com/googleapis/python-crc32c/blob/a595e758c08df445a99c3bf132ee8e80a3ec4308/src/google_crc32c/python.py github.com/googleapis/python-crc32c} - * - {@link https://github.com/googleapis/java-storage/pull/1376/files github.com/googleapis/java-storage} - * - * @param data The `Buffer` to generate the CRC32C from - */ - update(data) { - let current = __classPrivateFieldGet(this, _CRC32C_crc32c, "f") ^ 0xffffffff; - for (const d of data) { - const tablePoly = CRC32C.CRC32C_EXTENSION_TABLE[(d ^ current) & 0xff]; - current = tablePoly ^ (current >>> 8); - } - __classPrivateFieldSet(this, _CRC32C_crc32c, current ^ 0xffffffff, "f"); - } - /** - * Validates a provided input to the current CRC32C value. - * - * @param input A Buffer, `CRC32C`-compatible object, base64-encoded data (string), or signed 32-bit integer - */ - validate(input) { - if (typeof input === 'number') { - return input === __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); - } - else if (typeof input === 'string') { - return input === this.toString(); - } - else if (Buffer.isBuffer(input)) { - return Buffer.compare(input, this.toBuffer()) === 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. +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _HashStreamValidator_crc32cHash, _HashStreamValidator_md5Hash, _HashStreamValidator_md5Digest; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HashStreamValidator = void 0; +const crypto_1 = __nccwpck_require__(6113); +const stream_1 = __nccwpck_require__(12781); +const crc32c_js_1 = __nccwpck_require__(55810); +const file_js_1 = __nccwpck_require__(4713); +class HashStreamValidator extends stream_1.Transform { + constructor(options = {}) { + super(); + this.updateHashesOnly = false; + _HashStreamValidator_crc32cHash.set(this, undefined); + _HashStreamValidator_md5Hash.set(this, undefined); + _HashStreamValidator_md5Digest.set(this, ''); + this.crc32cEnabled = !!options.crc32c; + this.md5Enabled = !!options.md5; + this.updateHashesOnly = !!options.updateHashesOnly; + this.crc32cExpected = options.crc32cExpected; + this.md5Expected = options.md5Expected; + if (this.crc32cEnabled) { + if (options.crc32cInstance) { + __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, options.crc32cInstance, "f"); + } + else { + const crc32cGenerator = options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; + __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, crc32cGenerator(), "f"); + } } - else { - // `CRC32C`-like object - return input.toString() === this.toString(); + if (this.md5Enabled) { + __classPrivateFieldSet(this, _HashStreamValidator_md5Hash, (0, crypto_1.createHash)('md5'), "f"); } } /** - * Returns a `Buffer` representation of the CRC32C value - */ - toBuffer() { - const buffer = Buffer.alloc(4); - buffer.writeInt32BE(__classPrivateFieldGet(this, _CRC32C_crc32c, "f")); - return buffer; - } - /** - * Returns a JSON-compatible, base64-encoded representation of the CRC32C value. - * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify `JSON#stringify`} - */ - toJSON() { - return this.toString(); - } - /** - * Returns a base64-encoded representation of the CRC32C value. - * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString `Object#toString`} - */ - toString() { - return this.toBuffer().toString('base64'); - } - /** - * Returns the `number` representation of the CRC32C value as a signed 32-bit integer - * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf `Object#valueOf`} + * Return the current CRC32C value, if available. */ - valueOf() { - return __classPrivateFieldGet(this, _CRC32C_crc32c, "f"); + get crc32c() { + var _a; + return (_a = __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) === null || _a === void 0 ? void 0 : _a.toString(); } /** - * Generates a `CRC32C` from a compatible buffer format. - * - * @param value 4-byte `ArrayBufferView`/`Buffer`/`TypedArray` + * Return the calculated MD5 value, if available. */ - static fromBuffer(value) { - let buffer; - if (Buffer.isBuffer(value)) { - buffer = value; + get md5Digest() { + if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f") && !__classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f")) { + __classPrivateFieldSet(this, _HashStreamValidator_md5Digest, __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").digest('base64'), "f"); } - else if ('buffer' in value) { - // `ArrayBufferView` - buffer = Buffer.from(value.buffer); + return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f"); + } + _flush(callback) { + // Triggers the getter logic to finalize and cache the MD5 digest + this.md5Digest; + if (this.updateHashesOnly) { + callback(); + return; } - else { - // `ArrayBuffer` - buffer = Buffer.from(value); + // If we're doing validation, assume the worst-- a data integrity + // mismatch. If not, these tests won't be performed, and we can assume + // the best. + // We must check if the server decompressed the data on serve because hash + // validation is not possible in this case. + let failed = this.crc32cEnabled || this.md5Enabled; + if (this.crc32cEnabled && this.crc32cExpected) { + failed = !this.test('crc32c', this.crc32cExpected); } - if (buffer.byteLength !== 4) { - throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BUFFER_LENGTH(buffer.byteLength)); + if (this.md5Enabled && this.md5Expected) { + failed = !this.test('md5', this.md5Expected); } - return new CRC32C(buffer.readInt32BE()); - } - static async fromFile(file) { - const crc32c = new CRC32C(); - await new Promise((resolve, reject) => { - (0, fs_1.createReadStream)(file) - .on('data', (d) => crc32c.update(d)) - .on('end', resolve) - .on('error', reject); - }); - return crc32c; - } - /** - * Generates a `CRC32C` from 4-byte base64-encoded data (string). - * - * @param value 4-byte base64-encoded data (string) - */ - static fromString(value) { - const buffer = Buffer.from(value, 'base64'); - if (buffer.byteLength !== 4) { - throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_BASE64_RANGE(buffer.byteLength)); + if (failed) { + const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); + mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; + callback(mismatchError); } - return this.fromBuffer(buffer); - } - /** - * Generates a `CRC32C` from a safe, unsigned 32-bit integer. - * - * @param value an unsigned 32-bit integer - */ - static fromNumber(value) { - if (!Number.isSafeInteger(value) || value > 2 ** 32 || value < -(2 ** 32)) { - throw new RangeError(CRC32C_EXCEPTION_MESSAGES.INVALID_INIT_INTEGER(value)); + else { + callback(); } - return new CRC32C(value); } - /** - * Generates a `CRC32C` from a variety of compatable types. - * Note: strings are treated as input, not as file paths to read from. - * - * @param value A number, 4-byte `ArrayBufferView`/`Buffer`/`TypedArray`, or 4-byte base64-encoded data (string) - */ - static from(value) { - if (typeof value === 'number') { - return this.fromNumber(value); + _transform(chunk, encoding, callback) { + this.push(chunk, encoding); + try { + if (__classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) + __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").update(chunk); + if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) + __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").update(chunk); + callback(); } - else if (typeof value === 'string') { - return this.fromString(value); + catch (e) { + callback(e); } - else if ('byteLength' in value) { - // `ArrayBuffer` | `Buffer` | `ArrayBufferView` - return this.fromBuffer(value); + } + test(hash, sum) { + const check = Buffer.isBuffer(sum) ? sum.toString('base64') : sum; + if (hash === 'crc32c' && __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) { + return __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").validate(check); } - else { - // `CRC32CValidator`/`CRC32C`-like - return this.fromString(value.toString()); + if (hash === 'md5' && __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) { + return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f") === check; } + return false; } } -exports.CRC32C = CRC32C; -_CRC32C_crc32c = new WeakMap(); -CRC32C.CRC32C_EXTENSIONS = CRC32C_EXTENSIONS; -CRC32C.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; +exports.HashStreamValidator = HashStreamValidator; +_HashStreamValidator_crc32cHash = new WeakMap(), _HashStreamValidator_md5Hash = new WeakMap(), _HashStreamValidator_md5Digest = new WeakMap(); /***/ }), -/***/ 4713: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 64654: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -156441,3401 +161890,3641 @@ CRC32C.CRC32C_EXTENSION_TABLE = CRC32C_EXTENSION_TABLE; // 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _File_instances, _File_validateIntegrity; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.File = exports.FileExceptionMessages = exports.RequestError = exports.STORAGE_POST_POLICY_BASE_URL = exports.ActionToHTTPMethod = void 0; +exports.HmacKey = void 0; const index_js_1 = __nccwpck_require__(4052); -const promisify_1 = __nccwpck_require__(19203); -const crypto = __importStar(__nccwpck_require__(6113)); -const fs = __importStar(__nccwpck_require__(57147)); -const mime_1 = __importDefault(__nccwpck_require__(29994)); -const resumableUpload = __importStar(__nccwpck_require__(42851)); -const stream_1 = __nccwpck_require__(12781); -const zlib = __importStar(__nccwpck_require__(59796)); const storage_js_1 = __nccwpck_require__(33030); -const bucket_js_1 = __nccwpck_require__(23973); -const acl_js_1 = __nccwpck_require__(22989); -const signer_js_1 = __nccwpck_require__(59019); -const util_js_1 = __nccwpck_require__(38064); -const duplexify_1 = __importDefault(__nccwpck_require__(76599)); -const util_js_2 = __nccwpck_require__(59258); -const crc32c_js_1 = __nccwpck_require__(55810); -const hash_stream_validator_js_1 = __nccwpck_require__(40725); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -var ActionToHTTPMethod; -(function (ActionToHTTPMethod) { - ActionToHTTPMethod["read"] = "GET"; - ActionToHTTPMethod["write"] = "PUT"; - ActionToHTTPMethod["delete"] = "DELETE"; - ActionToHTTPMethod["resumable"] = "POST"; -})(ActionToHTTPMethod || (exports.ActionToHTTPMethod = ActionToHTTPMethod = {})); -/** - * @deprecated - no longer used - */ -exports.STORAGE_POST_POLICY_BASE_URL = 'https://storage.googleapis.com'; -/** - * @private - */ -const GS_URL_REGEXP = /^gs:\/\/([a-z0-9_.-]+)\/(.+)$/; +const promisify_1 = __nccwpck_require__(19203); /** - * @private - * This regex will match compressible content types. These are primarily text/*, +json, +text, +xml content types. - * This was based off of mime-db and may periodically need to be updated if new compressible content types become - * standards. + * The API-formatted resource description of the HMAC key. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name HmacKey#metadata + * @type {object} */ -const COMPRESSIBLE_MIME_REGEX = new RegExp([ - /^text\/|application\/ecmascript|application\/javascript|application\/json/, - /|application\/postscript|application\/rtf|application\/toml|application\/vnd.dart/, - /|application\/vnd.ms-fontobject|application\/wasm|application\/x-httpd-php|application\/x-ns-proxy-autoconfig/, - /|application\/x-sh(?!ockwave-flash)|application\/x-tar|application\/x-virtualbox-hdd|application\/x-virtualbox-ova|application\/x-virtualbox-ovf/, - /|^application\/x-virtualbox-vbox$|application\/x-virtualbox-vdi|application\/x-virtualbox-vhd|application\/x-virtualbox-vmdk/, - /|application\/xml|application\/xml-dtd|font\/otf|font\/ttf|image\/bmp|image\/vnd.adobe.photoshop|image\/vnd.microsoft.icon/, - /|image\/vnd.ms-dds|image\/x-icon|image\/x-ms-bmp|message\/rfc822|model\/gltf-binary|\+json|\+text|\+xml|\+yaml/, -] - .map(r => r.source) - .join(''), 'i'); -class RequestError extends Error { -} -exports.RequestError = RequestError; -const SEVEN_DAYS = 7 * 24 * 60 * 60; -const GS_UTIL_URL_REGEX = /(gs):\/\/([a-z0-9_.-]+)\/(.+)/g; -const HTTPS_PUBLIC_URL_REGEX = /(https):\/\/(storage\.googleapis\.com)\/([a-z0-9_.-]+)\/(.+)/g; -var FileExceptionMessages; -(function (FileExceptionMessages) { - FileExceptionMessages["EXPIRATION_TIME_NA"] = "An expiration time is not available."; - FileExceptionMessages["DESTINATION_NO_NAME"] = "Destination file should have a name."; - FileExceptionMessages["INVALID_VALIDATION_FILE_RANGE"] = "Cannot use validation with file ranges (start/end)."; - FileExceptionMessages["MD5_NOT_AVAILABLE"] = "MD5 verification was specified, but is not available for the requested object. MD5 is not available for composite objects."; - FileExceptionMessages["EQUALS_CONDITION_TWO_ELEMENTS"] = "Equals condition must be an array of 2 elements."; - FileExceptionMessages["STARTS_WITH_TWO_ELEMENTS"] = "StartsWith condition must be an array of 2 elements."; - FileExceptionMessages["CONTENT_LENGTH_RANGE_MIN_MAX"] = "ContentLengthRange must have numeric min & max fields."; - FileExceptionMessages["DOWNLOAD_MISMATCH"] = "The downloaded data did not match the data from the server. To be sure the content is the same, you should download the file again."; - FileExceptionMessages["UPLOAD_MISMATCH_DELETE_FAIL"] = "The uploaded data did not match the data from the server.\n As a precaution, we attempted to delete the file, but it was not successful.\n To be sure the content is the same, you should try removing the file manually,\n then uploading the file again.\n \n\nThe delete attempt failed with this message:\n\n "; - FileExceptionMessages["UPLOAD_MISMATCH"] = "The uploaded data did not match the data from the server.\n As a precaution, the file has been deleted.\n To be sure the content is the same, you should try uploading the file again."; - FileExceptionMessages["MD5_RESUMED_UPLOAD"] = "MD5 cannot be used with a continued resumable upload as MD5 cannot be extended from an existing value"; - FileExceptionMessages["MISSING_RESUME_CRC32C_FINAL_UPLOAD"] = "The CRC32C is missing for the final portion of a resumed upload, which is required for validation. Please provide `resumeCRC32C` if validation is required, or disable `validation`."; -})(FileExceptionMessages || (exports.FileExceptionMessages = FileExceptionMessages = {})); /** - * A File object is created from your {@link Bucket} object using - * {@link Bucket#file}. + * An HmacKey object contains metadata of an HMAC key created from a + * service account through the {@link Storage} client using + * {@link Storage#createHmacKey}. + * + * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} * * @class */ -class File extends index_js_1.ServiceObject { - /** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * An ACL consists of one or more entries, where each entry grants permissions - * to an entity. Permissions define the actions that can be performed against - * an object or bucket (for example, `READ` or `WRITE`); the entity defines - * who the permission applies to (for example, a specific user or group of - * users). - * - * The `acl` object on a File instance provides methods to get you a list of - * the ACLs defined on your bucket, as well as set, update, and delete them. - * - * See {@link http://goo.gl/6qBBPO| About Access Control lists} - * - * @name File#acl - * @mixes Acl - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * //- - * // Make a file publicly readable. - * //- - * const options = { - * entity: 'allUsers', - * role: storage.acl.READER_ROLE - * }; - * - * file.acl.add(options, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - /** - * The API-formatted resource description of the file. - * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. - * - * @name File#metadata - * @type {object} - */ +class HmacKey extends index_js_1.ServiceObject { /** - * The file's name. - * @name File#name - * @type {string} + * @typedef {object} HmacKeyOptions + * @property {string} [projectId] The project ID of the project that owns + * the service account of the requested HMAC key. If not provided, + * the project ID used to instantiate the Storage client will be used. */ /** - * @callback Crc32cGeneratorToStringCallback - * A method returning the CRC32C as a base64-encoded string. - * - * @returns {string} - * - * @example - * Hashing the string 'data' should return 'rth90Q==' - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.toString(); // 'rth90Q==' - * ``` - **/ - /** - * @callback Crc32cGeneratorValidateCallback - * A method validating a base64-encoded CRC32C string. - * - * @param {string} [value] base64-encoded CRC32C string to validate - * @returns {boolean} - * - * @example - * Should return `true` if the value matches, `false` otherwise - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.validate('DkjKuA=='); // false - * crc32c.validate('rth90Q=='); // true - * ``` - **/ - /** - * @callback Crc32cGeneratorUpdateCallback - * A method for passing `Buffer`s for CRC32C generation. - * - * @param {Buffer} [data] data to update CRC32C value with - * @returns {undefined} - * - * @example - * Hashing buffers from 'some ' and 'text\n' - * - * ```js - * const buffer1 = Buffer.from('some '); - * crc32c.update(buffer1); - * - * const buffer2 = Buffer.from('text\n'); - * crc32c.update(buffer2); + * Constructs an HmacKey object. * - * crc32c.toString(); // 'DkjKuA==' - * ``` - **/ - /** - * @typedef {object} CRC32CValidator - * @property {Crc32cGeneratorToStringCallback} - * @property {Crc32cGeneratorValidateCallback} - * @property {Crc32cGeneratorUpdateCallback} - */ - /** - * @callback Crc32cGeneratorCallback - * @returns {CRC32CValidator} - */ - /** - * @typedef {object} FileOptions Options passed to the File constructor. - * @property {string} [encryptionKey] A custom encryption key. - * @property {number} [generation] Generation to scope the file to. - * @property {string} [kmsKeyName] Cloud KMS Key used to encrypt this - * object, if the object is encrypted by such a key. Limited availability; - * usable only by enabled projects. - * @property {string} [userProject] The ID of the project which will be - * billed for all requests made from File object. - * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} - */ - /** - * Constructs a file object. + * Note: this only create a local reference to an HMAC key, to create + * an HMAC key, use {@link Storage#createHmacKey}. * - * @param {Bucket} bucket The Bucket instance this file is + * @param {Storage} storage The Storage instance this HMAC key is * attached to. - * @param {string} name The name of the remote file. - * @param {FileOptions} [options] Configuration options. + * @param {string} accessId The unique accessId for this HMAC key. + * @param {HmacKeyOptions} options Constructor configurations. * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); + * const hmacKey = storage.hmacKey('access-id'); * ``` */ - constructor(bucket, name, options = {}) { - var _a, _b; - const requestQueryObject = {}; - let generation; - if (options.generation !== null) { - if (typeof options.generation === 'string') { - generation = Number(options.generation); - } - else { - generation = options.generation; - } - if (!isNaN(generation)) { - requestQueryObject.generation = generation; - } - } - Object.assign(requestQueryObject, options.preconditionOpts); - const userProject = options.userProject || bucket.userProject; - if (typeof userProject === 'string') { - requestQueryObject.userProject = userProject; - } + constructor(storage, accessId, options) { const methods = { /** - * @typedef {array} DeleteFileResponse + * @typedef {object} DeleteHmacKeyOptions + * @property {string} [userProject] This parameter is currently ignored. + */ + /** + * @typedef {array} DeleteHmacKeyResponse * @property {object} 0 The full API response. */ /** - * @callback DeleteFileCallback + * @callback DeleteHmacKeyCallback * @param {?Error} err Request error, if any. * @param {object} apiResponse The full API response. */ /** - * Delete the file. + * Deletes an HMAC key. + * Key state must be set to `INACTIVE` prior to deletion. + * Caution: HMAC keys cannot be recovered once you delete them. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/delete| Objects: delete API Documentation} + * The authenticated user must have `storage.hmacKeys.delete` permission for the project in which the key exists. * - * @method File#delete - * @param {object} [options] Configuration options. - * @param {boolean} [options.ignoreNotFound = false] Ignore an error if - * the file does not exist. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {DeleteFileCallback} [callback] Callback function. - * @returns {Promise} + * @method HmacKey#delete + * @param {DeleteHmacKeyOptions} [options] Configuration options. + * @param {DeleteHmacKeyCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * file.delete(function(err, apiResponse) {}); * * //- - * // If the callback is omitted, we'll return a Promise. + * // Delete HMAC key after making the key inactive. * //- - * file.delete().then(function(data) { - * const apiResponse = data[0]; - * }); + * const hmacKey = storage.hmacKey('ACCESS_ID'); + * hmacKey.setMetadata({state: 'INACTIVE'}, (err, hmacKeyMetadata) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * hmacKey.delete((err) => { + * if (err) { + * console.error(err); + * return; + * } + * // The HMAC key is deleted. + * }); + * }); * + * //- + * // If the callback is omitted, a promise is returned. + * //- + * const hmacKey = storage.hmacKey('ACCESS_ID'); + * hmacKey + * .setMetadata({state: 'INACTIVE'}) + * .then(() => { + * return hmacKey.delete(); + * }); * ``` - * @example include:samples/files.js - * region_tag:storage_delete_file - * Another example: - */ - delete: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {array} FileExistsResponse - * @property {boolean} 0 Whether the {@link File} exists. */ + delete: true, /** - * @callback FileExistsCallback + * @callback GetHmacKeyCallback * @param {?Error} err Request error, if any. - * @param {boolean} exists Whether the {@link File} exists. - */ - /** - * Check if the file exists. - * - * @method File#exists - * @param {options} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {FileExistsCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * file.exists(function(err, exists) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.exists().then(function(data) { - * const exists = data[0]; - * }); - * ``` + * @param {HmacKey} hmacKey this {@link HmacKey} instance. + * @param {object} apiResponse The full API response. */ - exists: { - reqOpts: { - qs: requestQueryObject, - }, - }, /** - * @typedef {array} GetFileResponse - * @property {File} 0 The {@link File}. + * @typedef {array} GetHmacKeyResponse + * @property {HmacKey} 0 This {@link HmacKey} instance. * @property {object} 1 The full API response. */ /** - * @callback GetFileCallback - * @param {?Error} err Request error, if any. - * @param {File} file The {@link File}. - * @param {object} apiResponse The full API response. + * @typedef {object} GetHmacKeyOptions + * @property {string} [userProject] This parameter is currently ignored. */ /** - * Get a file object and its metadata if it exists. + * Retrieves and populate an HMAC key's metadata, and return + * this {@link HmacKey} instance. * - * @method File#get - * @param {options} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {number} [options.generation] The generation number to get - * @param {boolean} [options.softDeleted] If true, returns the soft-deleted object. - Object `generation` is required if `softDeleted` is set to True. - * @param {GetFileCallback} [callback] Callback function. - * @returns {Promise} + * HmacKey.get() does not give the HMAC key secret, as + * it is only returned on creation. + * + * The authenticated user must have `storage.hmacKeys.get` permission + * for the project in which the key exists. + * + * @method HmacKey#get + * @param {GetHmacKeyOptions} [options] Configuration options. + * @param {GetHmacKeyCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); * - * const file = myBucket.file('my-file'); - * - * file.get(function(err, file, apiResponse) { - * // file.metadata` has been populated. - * }); + * //- + * // Get the HmacKey's Metadata. + * //- + * storage.hmacKey('ACCESS_ID') + * .get((err, hmacKey) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * // do something with the returned HmacKey object. + * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // If the callback is omitted, a promise is returned. * //- - * file.get().then(function(data) { - * const file = data[0]; - * const apiResponse = data[1]; - * }); + * storage.hmacKey('ACCESS_ID') + * .get() + * .then((data) => { + * const hmacKey = data[0]; + * }); * ``` */ - get: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {array} GetFileMetadataResponse - * @property {object} 0 The {@link File} metadata. - * @property {object} 1 The full API response. - */ + get: true, /** - * @callback GetFileMetadataCallback - * @param {?Error} err Request error, if any. - * @param {object} metadata The {@link File} metadata. - * @param {object} apiResponse The full API response. + * @typedef {object} GetHmacKeyMetadataOptions + * @property {string} [userProject] This parameter is currently ignored. */ /** - * Get the file's metadata. + * Retrieves and populate an HMAC key's metadata, and return + * the HMAC key's metadata as an object. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/get| Objects: get API Documentation} + * HmacKey.getMetadata() does not give the HMAC key secret, as + * it is only returned on creation. * - * @method File#getMetadata - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetFileMetadataCallback} [callback] Callback function. - * @returns {Promise} + * The authenticated user must have `storage.hmacKeys.get` permission + * for the project in which the key exists. + * + * @method HmacKey#getMetadata + * @param {GetHmacKeyMetadataOptions} [options] Configuration options. + * @param {HmacKeyMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * file.getMetadata(function(err, metadata, apiResponse) {}); * * //- - * // If the callback is omitted, we'll return a Promise. + * // Get the HmacKey's metadata and populate to the metadata property. * //- - * file.getMetadata().then(function(data) { - * const metadata = data[0]; - * const apiResponse = data[1]; - * }); + * storage.hmacKey('ACCESS_ID') + * .getMetadata((err, hmacKeyMetadata) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * console.log(hmacKeyMetadata); + * }); * + * //- + * // If the callback is omitted, a promise is returned. + * //- + * storage.hmacKey('ACCESS_ID') + * .getMetadata() + * .then((data) => { + * const hmacKeyMetadata = data[0]; + * console.log(hmacKeyMetadata); + * }); * ``` - * @example include:samples/files.js - * region_tag:storage_get_metadata - * Another example: */ - getMetadata: { - reqOpts: { - qs: requestQueryObject, - }, - }, + getMetadata: true, /** - * @typedef {object} SetFileMetadataOptions Configuration options for File#setMetadata(). - * @param {string} [userProject] The ID of the project which will be billed for the request. + * @typedef {object} SetHmacKeyMetadata Subset of {@link HmacKeyMetadata} to update. + * @property {string} state New state of the HmacKey. Either 'ACTIVE' or 'INACTIVE'. + * @property {string} [etag] Include an etag from a previous get HMAC key request + * to perform safe read-modify-write. */ /** - * @callback SetFileMetadataCallback + * @typedef {object} SetHmacKeyMetadataOptions + * @property {string} [userProject] This parameter is currently ignored. + */ + /** + * @callback HmacKeyMetadataCallback * @param {?Error} err Request error, if any. + * @param {HmacKeyMetadata} metadata The updated {@link HmacKeyMetadata} object. * @param {object} apiResponse The full API response. */ /** - * @typedef {array} SetFileMetadataResponse - * @property {object} 0 The full API response. + * @typedef {array} HmacKeyMetadataResponse + * @property {HmacKeyMetadata} 0 The updated {@link HmacKeyMetadata} object. + * @property {object} 1 The full API response. */ /** - * Merge the given metadata with the current remote file's metadata. This - * will set metadata if it was previously unset or update previously set - * metadata. To unset previously set metadata, set its value to null. - * - * You can set custom key/value pairs in the metadata key of the given - * object, however the other properties outside of this object must adhere - * to the {@link https://goo.gl/BOnnCK| official API documentation}. - * - * - * See the examples below for more information. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} + * Updates the state of an HMAC key. See {@link SetHmacKeyMetadata} for + * valid states. * - * @method File#setMetadata - * @param {object} [metadata] The metadata you wish to update. - * @param {SetFileMetadataOptions} [options] Configuration options. - * @param {SetFileMetadataCallback} [callback] Callback function. - * @returns {Promise} + * @method HmacKey#setMetadata + * @param {SetHmacKeyMetadata} metadata The new metadata. + * @param {SetHmacKeyMetadataOptions} [options] Configuration options. + * @param {HmacKeyMetadataCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); * * const metadata = { - * contentType: 'application/x-font-ttf', - * metadata: { - * my: 'custom', - * properties: 'go here' - * } + * state: 'INACTIVE', * }; * - * file.setMetadata(metadata, function(err, apiResponse) {}); - * - * // Assuming current metadata = { hello: 'world', unsetMe: 'will do' } - * file.setMetadata({ - * metadata: { - * abc: '123', // will be set. - * unsetMe: null, // will be unset (deleted). - * hello: 'goodbye' // will be updated from 'world' to 'goodbye'. - * } - * }, function(err, apiResponse) { - * // metadata should now be { abc: '123', hello: 'goodbye' } - * }); - * - * //- - * // Set a temporary hold on this file from its bucket's retention period - * // configuration. - * // - * file.setMetadata({ - * temporaryHold: true - * }, function(err, apiResponse) {}); - * - * //- - * // Alternatively, you may set a temporary hold. This will follow the - * // same behavior as an event-based hold, with the exception that the - * // bucket's retention policy will not renew for this file from the time - * // the hold is released. - * //- - * file.setMetadata({ - * eventBasedHold: true - * }, function(err, apiResponse) {}); + * storage.hmacKey('ACCESS_ID') + * .setMetadata(metadata, (err, hmacKeyMetadata) => { + * if (err) { + * // The request was an error. + * console.error(err); + * return; + * } + * console.log(hmacKeyMetadata); + * }); * * //- - * // If the callback is omitted, we'll return a Promise. + * // If the callback is omitted, a promise is returned. * //- - * file.setMetadata(metadata).then(function(data) { - * const apiResponse = data[0]; - * }); + * storage.hmacKey('ACCESS_ID') + * .setMetadata(metadata) + * .then((data) => { + * const hmacKeyMetadata = data[0]; + * console.log(hmacKeyMetadata); + * }); * ``` */ setMetadata: { reqOpts: { - qs: requestQueryObject, + method: 'PUT', }, }, }; + const projectId = (options && options.projectId) || storage.projectId; super({ - parent: bucket, - baseUrl: '/o', - id: encodeURIComponent(name), + parent: storage, + id: accessId, + baseUrl: `/projects/${projectId}/hmacKeys`, methods, }); - _File_instances.add(this); - this.bucket = bucket; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this.storage = bucket.parent; - // @TODO Can this duplicate code from above be avoided? - if (options.generation !== null) { - let generation; - if (typeof options.generation === 'string') { - generation = Number(options.generation); - } - else { - generation = options.generation; - } - if (!isNaN(generation)) { - this.generation = generation; - } - } - this.kmsKeyName = options.kmsKeyName; - this.userProject = userProject; - this.name = name; - if (options.encryptionKey) { - this.setEncryptionKey(options.encryptionKey); + this.storage = storage; + this.instanceRetryValue = storage.retryOptions.autoRetry; + } + setMetadata(metadata, optionsOrCallback, cb) { + // ETag preconditions are not currently supported. Retries should be disabled if the idempotency strategy is not set to RetryAlways + if (this.storage.retryOptions.idempotencyStrategy !== + storage_js_1.IdempotencyStrategy.RetryAlways) { + this.storage.retryOptions.autoRetry = false; } - this.acl = new acl_js_1.Acl({ - request: this.request.bind(this), - pathPrefix: '/acl', + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + cb = + typeof optionsOrCallback === 'function' + ? optionsOrCallback + : cb; + super + .setMetadata(metadata, options) + .then(resp => cb(null, ...resp)) + .catch(cb) + .finally(() => { + this.storage.retryOptions.autoRetry = this.instanceRetryValue; }); - this.crc32cGenerator = - options.crc32cGenerator || this.bucket.crc32cGenerator; - this.instanceRetryValue = (_b = (_a = this.storage) === null || _a === void 0 ? void 0 : _a.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry; - this.instancePreconditionOpts = options === null || options === void 0 ? void 0 : options.preconditionOpts; } - /** - * The object's Cloud Storage URI (`gs://`) - * - * @example - * ```ts - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('image.png'); - * - * // `gs://my-bucket/image.png` - * const href = file.cloudStorageURI.href; - * ``` - */ - get cloudStorageURI() { - const uri = this.bucket.cloudStorageURI; - uri.pathname = this.name; - return uri; +} +exports.HmacKey = HmacKey; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(HmacKey); + + +/***/ }), + +/***/ 80352: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Iam = exports.IAMExceptionMessages = void 0; +const promisify_1 = __nccwpck_require__(19203); +const util_js_1 = __nccwpck_require__(59258); +var IAMExceptionMessages; +(function (IAMExceptionMessages) { + IAMExceptionMessages["POLICY_OBJECT_REQUIRED"] = "A policy object is required."; + IAMExceptionMessages["PERMISSIONS_REQUIRED"] = "Permissions are required."; +})(IAMExceptionMessages || (exports.IAMExceptionMessages = IAMExceptionMessages = {})); +/** + * Get and set IAM policies for your Cloud Storage bucket. + * + * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} + * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} + * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} + * + * @constructor Iam + * + * @param {Bucket} bucket The parent instance. + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * // bucket.iam + * ``` + */ +class Iam { + constructor(bucket) { + this.request_ = bucket.request.bind(bucket); + this.resourceId_ = 'buckets/' + bucket.getId(); } /** - * A helper method for determining if a request should be retried based on preconditions. - * This should only be used for methods where the idempotency is determined by - * `ifGenerationMatch` - * @private - * - * A request should not be retried under the following conditions: - * - if precondition option `ifGenerationMatch` is not set OR - * - if `idempotencyStrategy` is set to `RetryNever` + * @typedef {object} GetPolicyOptions Requested options for IAM#getPolicy(). + * @property {number} [requestedPolicyVersion] The version of IAM policies to + * request. If a policy with a condition is requested without setting + * this, the server will return an error. This must be set to a value + * of 3 to retrieve IAM policies containing conditions. This is to + * prevent client code that isn't aware of IAM conditions from + * interpreting and modifying policies incorrectly. The service might + * return a policy with version lower than the one that was requested, + * based on the feature syntax in the policy fetched. + * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} + * @property {string} [userProject] The ID of the project which will be + * billed for the request. */ - shouldRetryBasedOnPreconditionAndIdempotencyStrat(options) { - var _a; - return !(((options === null || options === void 0 ? void 0 : options.ifGenerationMatch) === undefined && - ((_a = this.instancePreconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever); - } /** - * @typedef {array} CopyResponse - * @property {File} 0 The copied {@link File}. + * @typedef {array} GetPolicyResponse + * @property {Policy} 0 The policy. * @property {object} 1 The full API response. */ /** - * @callback CopyCallback - * @param {?Error} err Request error, if any. - * @param {File} copiedFile The copied {@link File}. - * @param {object} apiResponse The full API response. + * @typedef {object} Policy + * @property {PolicyBinding[]} policy.bindings Bindings associate members with roles. + * @property {string} [policy.etag] Etags are used to perform a read-modify-write. + * @property {number} [policy.version] The syntax schema version of the Policy. + * To set an IAM policy with conditional binding, this field must be set to + * 3 or greater. + * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} */ - /** - * @typedef {object} CopyOptions Configuration options for File#copy(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @property {string} [cacheControl] The cacheControl setting for the new file. - * @property {string} [contentEncoding] The contentEncoding setting for the new file. - * @property {string} [contentType] The contentType setting for the new file. - * @property {string} [destinationKmsKeyName] Resource name of the Cloud - * KMS key, of the form - * `projects/my-project/locations/location/keyRings/my-kr/cryptoKeys/my-key`, - * that will be used to encrypt the object. Overwrites the object - * metadata's `kms_key_name` value, if any. - * @property {Metadata} [metadata] Metadata to specify on the copied file. - * @property {string} [predefinedAcl] Set the ACL for the new file. - * @property {string} [token] A previously-returned `rewriteToken` from an - * unfinished rewrite request. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + /** + * @typedef {object} PolicyBinding + * @property {string} role Role that is assigned to members. + * @property {string[]} members Specifies the identities requesting access for the bucket. + * @property {Expr} [condition] The condition that is associated with this binding. */ /** - * Copy this file to another file. By default, this will copy the file to the - * same bucket, but you can choose to copy it to another Bucket by providing - * a Bucket or File object or a URL starting with "gs://". - * The generation of the file will not be preserved. + * @typedef {object} Expr + * @property {string} [title] An optional title for the expression, i.e. a + * short string describing its purpose. This can be used e.g. in UIs + * which allow to enter the expression. + * @property {string} [description] An optional description of the + * expression. This is a longer text which describes the expression, + * e.g. when hovered over it in a UI. + * @property {string} expression Textual representation of an expression in + * Common Expression Language syntax. The application context of the + * containing message determines which well-known feature set of CEL + * is supported.The condition that is associated with this binding. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite| Objects: rewrite API Documentation} + * @see [Condition] https://cloud.google.com/storage/docs/access-control/iam#conditions + */ + /** + * Get the IAM policy. * - * @throws {Error} If the destination file is not provided. + * @param {GetPolicyOptions} [options] Request options. + * @param {GetPolicyCallback} [callback] Callback function. + * @returns {Promise} * - * @param {string|Bucket|File} destination Destination file. - * @param {CopyOptions} [options] Configuration options. See an - * @param {CopyCallback} [callback] Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/getIamPolicy| Buckets: setIamPolicy API Documentation} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * - * //- - * // You can pass in a variety of types for the destination. - * // - * // For all of the below examples, assume we are working with the following - * // Bucket and File objects. - * //- * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('my-image.png'); * - * //- - * // If you pass in a string for the destination, the file is copied to its - * // current bucket, under the new name provided. - * //- - * file.copy('my-image-copy.png', function(err, copiedFile, apiResponse) { - * // `my-bucket` now contains: - * // - "my-image.png" - * // - "my-image-copy.png" + * bucket.iam.getPolicy( + * {requestedPolicyVersion: 3}, + * function(err, policy, apiResponse) { * - * // `copiedFile` is an instance of a File object that refers to your new - * // file. - * }); + * }, + * ); * * //- - * // If you pass in a string starting with "gs://" for the destination, the - * // file is copied to the other bucket and under the new name provided. + * // If the callback is omitted, we'll return a Promise. * //- - * const newLocation = 'gs://another-bucket/my-image-copy.png'; - * file.copy(newLocation, function(err, copiedFile, apiResponse) { - * // `my-bucket` still contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image-copy.png" + * bucket.iam.getPolicy({requestedPolicyVersion: 3}) + * .then(function(data) { + * const policy = data[0]; + * const apiResponse = data[1]; + * }); * - * // `copiedFile` is an instance of a File object that refers to your new - * // file. - * }); + * ``` + * @example include:samples/iam.js + * region_tag:storage_view_bucket_iam_members + * Example of retrieving a bucket's IAM policy: + */ + getPolicy(optionsOrCallback, callback) { + const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); + const qs = {}; + if (options.userProject) { + qs.userProject = options.userProject; + } + if (options.requestedPolicyVersion !== null && + options.requestedPolicyVersion !== undefined) { + qs.optionsRequestedPolicyVersion = options.requestedPolicyVersion; + } + this.request_({ + uri: '/iam', + qs, + }, cb); + } + /** + * Set the IAM policy. * - * //- - * // If you pass in a Bucket object, the file will be copied to that bucket - * // using the same name. - * //- - * const anotherBucket = storage.bucket('another-bucket'); - * file.copy(anotherBucket, function(err, copiedFile, apiResponse) { - * // `my-bucket` still contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image.png" + * @throws {Error} If no policy is provided. * - * // `copiedFile` is an instance of a File object that refers to your new - * // file. - * }); + * @param {Policy} policy The policy. + * @param {SetPolicyOptions} [options] Configuration options. + * @param {SetPolicyCallback} callback Callback function. + * @returns {Promise} * - * //- - * // If you pass in a File object, you have complete control over the new - * // bucket and filename. - * //- - * const anotherFile = anotherBucket.file('my-awesome-image.png'); - * file.copy(anotherFile, function(err, copiedFile, apiResponse) { - * // `my-bucket` still contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-awesome-image.png" + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy| Buckets: setIamPolicy API Documentation} + * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} * - * // Note: - * // The `copiedFile` parameter is equal to `anotherFile`. - * }); + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * + * const myPolicy = { + * bindings: [ + * { + * role: 'roles/storage.admin', + * members: + * ['serviceAccount:myotherproject@appspot.gserviceaccount.com'] + * } + * ] + * }; + * + * bucket.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {}); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * file.copy(newLocation).then(function(data) { - * const newFile = data[0]; + * bucket.iam.setPolicy(myPolicy).then(function(data) { + * const policy = data[0]; * const apiResponse = data[1]; * }); * * ``` - * @example include:samples/files.js - * region_tag:storage_copy_file - * Another example: + * @example include:samples/iam.js + * region_tag:storage_add_bucket_iam_member + * Example of adding to a bucket's IAM policy: + * + * @example include:samples/iam.js + * region_tag:storage_remove_bucket_iam_member + * Example of removing from a bucket's IAM policy: */ - copy(destination, optionsOrCallback, callback) { - var _a, _b; - const noDestinationError = new Error(FileExceptionMessages.DESTINATION_NO_NAME); - if (!destination) { - throw noDestinationError; - } - let options = {}; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - else if (optionsOrCallback) { - options = { ...optionsOrCallback }; - } - callback = callback || index_js_1.util.noop; - let destBucket; - let destName; - let newFile; - if (typeof destination === 'string') { - const parsedDestination = GS_URL_REGEXP.exec(destination); - if (parsedDestination !== null && parsedDestination.length === 3) { - destBucket = this.storage.bucket(parsedDestination[1]); - destName = parsedDestination[2]; - } - else { - destBucket = this.bucket; - destName = destination; - } - } - else if (destination instanceof bucket_js_1.Bucket) { - destBucket = destination; - destName = this.name; - } - else if (destination instanceof File) { - destBucket = destination.bucket; - destName = destination.name; - newFile = destination; - } - else { - throw noDestinationError; - } - const query = {}; - if (this.generation !== undefined) { - query.sourceGeneration = this.generation; - } - if (options.token !== undefined) { - query.rewriteToken = options.token; - } - if (options.userProject !== undefined) { - query.userProject = options.userProject; - delete options.userProject; - } - if (options.predefinedAcl !== undefined) { - query.destinationPredefinedAcl = options.predefinedAcl; - delete options.predefinedAcl; - } - newFile = newFile || destBucket.file(destName); - const headers = {}; - if (this.encryptionKey !== undefined) { - headers['x-goog-copy-source-encryption-algorithm'] = 'AES256'; - headers['x-goog-copy-source-encryption-key'] = this.encryptionKeyBase64; - headers['x-goog-copy-source-encryption-key-sha256'] = - this.encryptionKeyHash; - } - if (newFile.encryptionKey !== undefined) { - this.setEncryptionKey(newFile.encryptionKey); - } - else if (options.destinationKmsKeyName !== undefined) { - query.destinationKmsKeyName = options.destinationKmsKeyName; - delete options.destinationKmsKeyName; - } - else if (newFile.kmsKeyName !== undefined) { - query.destinationKmsKeyName = newFile.kmsKeyName; - } - if (query.destinationKmsKeyName) { - this.kmsKeyName = query.destinationKmsKeyName; - const keyIndex = this.interceptors.indexOf(this.encryptionKeyInterceptor); - if (keyIndex > -1) { - this.interceptors.splice(keyIndex, 1); - } - } - if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { - this.storage.retryOptions.autoRetry = false; + setPolicy(policy, optionsOrCallback, callback) { + if (policy === null || typeof policy !== 'object') { + throw new Error(IAMExceptionMessages.POLICY_OBJECT_REQUIRED); } - if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined) { - query.ifGenerationMatch = (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch; - delete options.preconditionOpts; + const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); + let maxRetries; + if (policy.etag === undefined) { + maxRetries = 0; } - this.request({ - method: 'POST', - uri: `/rewriteTo/b/${destBucket.name}/o/${encodeURIComponent(newFile.name)}`, - qs: query, - json: options, - headers, - }, (err, resp) => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - if (err) { - callback(err, null, resp); - return; - } - if (resp.rewriteToken) { - const options = { - token: resp.rewriteToken, - }; - if (query.userProject) { - options.userProject = query.userProject; - } - if (query.destinationKmsKeyName) { - options.destinationKmsKeyName = query.destinationKmsKeyName; - } - this.copy(newFile, options, callback); - return; - } - callback(null, newFile, resp); - }); + this.request_({ + method: 'PUT', + uri: '/iam', + maxRetries, + json: Object.assign({ + resourceId: this.resourceId_, + }, policy), + qs: options, + }, cb); } /** - * @typedef {object} CreateReadStreamOptions Configuration options for File#createReadStream. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string|boolean} [validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with a - * CRC32c checksum. You may use MD5 if preferred, but that hash is not - * supported for composite objects. An error will be raised if MD5 is - * specified but is not available. You may also choose to skip validation - * completely, however this is **not recommended**. - * @property {number} [start] A byte offset to begin the file's download - * from. Default is 0. NOTE: Byte ranges are inclusive; that is, - * `options.start = 0` and `options.end = 999` represent the first 1000 - * bytes in a file or object. NOTE: when specifying a byte range, data - * integrity is not available. - * @property {number} [end] A byte offset to stop reading the file at. - * NOTE: Byte ranges are inclusive; that is, `options.start = 0` and - * `options.end = 999` represent the first 1000 bytes in a file or object. - * NOTE: when specifying a byte range, data integrity is not available. - * @property {boolean} [decompress=true] Disable auto decompression of the - * received data. By default this option is set to `true`. - * Applicable in cases where the data was uploaded with - * `gzip: true` option. See {@link File#createWriteStream}. - */ - /** - * Create a readable stream to read the contents of the remote file. It can be - * piped to a writable stream or listened to for 'data' events to read a - * file's contents. + * Test a set of permissions for a resource. * - * In the unlikely event there is a mismatch between what you downloaded and - * the version in your Bucket, your error handler will receive an error with - * code "CONTENT_DOWNLOAD_MISMATCH". If you receive this error, the best - * recourse is to try downloading the file again. + * @throws {Error} If permissions are not provided. * - * NOTE: Readable streams will emit the `end` event when the file is fully - * downloaded. + * @param {string|string[]} permissions The permission(s) to test for. + * @param {TestIamPermissionsOptions} [options] Configuration object. + * @param {TestIamPermissionsCallback} [callback] Callback function. + * @returns {Promise} * - * @param {CreateReadStreamOptions} [options] Configuration options. - * @returns {ReadableStream} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/testIamPermissions| Buckets: testIamPermissions API Documentation} * * @example * ``` - * //- - * //

Downloading a File

- * // - * // The example below demonstrates how we can reference a remote file, then - * // pipe its contents to a local file. This is effectively creating a local - * // backup of your remote data. - * //- * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); * const bucket = storage.bucket('my-bucket'); * - * const fs = require('fs'); - * const remoteFile = bucket.file('image.png'); - * const localFilename = '/Users/stephen/Photos/image.png'; + * //- + * // Test a single permission. + * //- + * const test = 'storage.buckets.delete'; * - * remoteFile.createReadStream() - * .on('error', function(err) {}) - * .on('response', function(response) { - * // Server connected and responded with the specified status and headers. - * }) - * .on('end', function() { - * // The file is fully downloaded. - * }) - * .pipe(fs.createWriteStream(localFilename)); + * bucket.iam.testPermissions(test, function(err, permissions, apiResponse) { + * console.log(permissions); + * // { + * // "storage.buckets.delete": true + * // } + * }); * * //- - * // To limit the downloaded data to only a byte range, pass an options - * // object. + * // Test several permissions at once. * //- - * const logFile = myBucket.file('access_log'); - * logFile.createReadStream({ - * start: 10000, - * end: 20000 - * }) - * .on('error', function(err) {}) - * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); + * const tests = [ + * 'storage.buckets.delete', + * 'storage.buckets.get' + * ]; + * + * bucket.iam.testPermissions(tests, function(err, permissions) { + * console.log(permissions); + * // { + * // "storage.buckets.delete": false, + * // "storage.buckets.get": true + * // } + * }); * * //- - * // To read a tail byte range, specify only `options.end` as a negative - * // number. + * // If the callback is omitted, we'll return a Promise. * //- - * const logFile = myBucket.file('access_log'); - * logFile.createReadStream({ - * end: -100 - * }) - * .on('error', function(err) {}) - * .pipe(fs.createWriteStream('/Users/stephen/logfile.txt')); + * bucket.iam.testPermissions(test).then(function(data) { + * const permissions = data[0]; + * const apiResponse = data[1]; + * }); * ``` */ - createReadStream(options = {}) { - options = Object.assign({ decompress: true }, options); - const rangeRequest = typeof options.start === 'number' || typeof options.end === 'number'; - const tailRequest = options.end < 0; - let validateStream = undefined; - let request = undefined; - const throughStream = new util_js_2.PassThroughShim(); - let crc32c = true; - let md5 = false; - if (typeof options.validation === 'string') { - const value = options.validation.toLowerCase().trim(); - crc32c = value === 'crc32c'; - md5 = value === 'md5'; + testPermissions(permissions, optionsOrCallback, callback) { + if (!Array.isArray(permissions) && typeof permissions !== 'string') { + throw new Error(IAMExceptionMessages.PERMISSIONS_REQUIRED); } - else if (options.validation === false) { - crc32c = false; + const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); + const permissionsArray = Array.isArray(permissions) + ? permissions + : [permissions]; + const req = Object.assign({ + permissions: permissionsArray, + }, options); + this.request_({ + uri: '/iam/testPermissions', + qs: req, + useQuerystring: true, + }, (err, resp) => { + if (err) { + cb(err, null, resp); + return; + } + const availablePermissions = Array.isArray(resp.permissions) + ? resp.permissions + : []; + const permissionsHash = permissionsArray.reduce((acc, permission) => { + acc[permission] = availablePermissions.indexOf(permission) > -1; + return acc; + }, {}); + cb(null, permissionsHash, resp); + }); + } +} +exports.Iam = Iam; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Iam); + + +/***/ }), + +/***/ 27577: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Notification = exports.Iam = exports.HmacKey = exports.File = exports.Channel = exports.Bucket = exports.Storage = exports.RETRYABLE_ERR_FN_DEFAULT = exports.IdempotencyStrategy = exports.ApiError = void 0; +/** + * The `@google-cloud/storage` package has a single named export which is the + * {@link Storage} (ES6) class, which should be instantiated with `new`. + * + * See {@link Storage} and {@link ClientConfig} for client methods and + * configuration options. + * + * @module {Storage} @google-cloud/storage + * @alias nodejs-storage + * + * @example + * Install the client library with npm: + * ``` + * npm install --save @google-cloud/storage + * ``` + * + * @example + * Import the client library + * ``` + * const {Storage} = require('@google-cloud/storage'); + * ``` + * + * @example + * Create a client that uses Application + * Default Credentials (ADC): + * ``` + * const storage = new Storage(); + * ``` + * + * @example + * Create a client with explicit + * credentials: + * ``` + * const storage = new Storage({ projectId: + * 'your-project-id', keyFilename: '/path/to/keyfile.json' + * }); + * ``` + * + * @example include:samples/quickstart.js + * region_tag:storage_quickstart + * Full quickstart example: + */ +var index_js_1 = __nccwpck_require__(4052); +Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return index_js_1.ApiError; } })); +var storage_js_1 = __nccwpck_require__(33030); +Object.defineProperty(exports, "IdempotencyStrategy", ({ enumerable: true, get: function () { return storage_js_1.IdempotencyStrategy; } })); +Object.defineProperty(exports, "RETRYABLE_ERR_FN_DEFAULT", ({ enumerable: true, get: function () { return storage_js_1.RETRYABLE_ERR_FN_DEFAULT; } })); +Object.defineProperty(exports, "Storage", ({ enumerable: true, get: function () { return storage_js_1.Storage; } })); +var bucket_js_1 = __nccwpck_require__(23973); +Object.defineProperty(exports, "Bucket", ({ enumerable: true, get: function () { return bucket_js_1.Bucket; } })); +__exportStar(__nccwpck_require__(55810), exports); +var channel_js_1 = __nccwpck_require__(62665); +Object.defineProperty(exports, "Channel", ({ enumerable: true, get: function () { return channel_js_1.Channel; } })); +var file_js_1 = __nccwpck_require__(4713); +Object.defineProperty(exports, "File", ({ enumerable: true, get: function () { return file_js_1.File; } })); +__exportStar(__nccwpck_require__(40725), exports); +var hmacKey_js_1 = __nccwpck_require__(64654); +Object.defineProperty(exports, "HmacKey", ({ enumerable: true, get: function () { return hmacKey_js_1.HmacKey; } })); +var iam_js_1 = __nccwpck_require__(80352); +Object.defineProperty(exports, "Iam", ({ enumerable: true, get: function () { return iam_js_1.Iam; } })); +var notification_js_1 = __nccwpck_require__(21178); +Object.defineProperty(exports, "Notification", ({ enumerable: true, get: function () { return notification_js_1.Notification; } })); +__exportStar(__nccwpck_require__(45594), exports); + + +/***/ }), + +/***/ 4052: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.util = exports.ApiError = exports.ServiceObject = exports.Service = void 0; +var service_js_1 = __nccwpck_require__(17370); +Object.defineProperty(exports, "Service", ({ enumerable: true, get: function () { return service_js_1.Service; } })); +var service_object_js_1 = __nccwpck_require__(73409); +Object.defineProperty(exports, "ServiceObject", ({ enumerable: true, get: function () { return service_object_js_1.ServiceObject; } })); +var util_js_1 = __nccwpck_require__(38064); +Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return util_js_1.ApiError; } })); +Object.defineProperty(exports, "util", ({ enumerable: true, get: function () { return util_js_1.util; } })); + + +/***/ }), + +/***/ 73409: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ServiceObject = void 0; +/*! + * Copyright 2022 Google LLC. All Rights Reserved. + * + * 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. + */ +const promisify_1 = __nccwpck_require__(19203); +const events_1 = __nccwpck_require__(82361); +const util_js_1 = __nccwpck_require__(38064); +/** + * ServiceObject is a base class, meant to be inherited from by a "service + * object," like a BigQuery dataset or Storage bucket. + * + * Most of the time, these objects share common functionality; they can be + * created or deleted, and you can get or set their metadata. + * + * By inheriting from this class, a service object will be extended with these + * shared behaviors. Note that any method can be overridden when the service + * object requires specific behavior. + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +class ServiceObject extends events_1.EventEmitter { + /* + * @constructor + * @alias module:common/service-object + * + * @private + * + * @param {object} config - Configuration object. + * @param {string} config.baseUrl - The base URL to make API requests to. + * @param {string} config.createMethod - The method which creates this object. + * @param {string=} config.id - The identifier of the object. For example, the + * name of a Storage bucket or Pub/Sub topic. + * @param {object=} config.methods - A map of each method name that should be inherited. + * @param {object} config.methods[].reqOpts - Default request options for this + * particular method. A common use case is when `setMetadata` requires a + * `PUT` method to override the default `PATCH`. + * @param {object} config.parent - The parent service instance. For example, an + * instance of Storage if the object is Bucket. + */ + constructor(config) { + super(); + this.metadata = {}; + this.baseUrl = config.baseUrl; + this.parent = config.parent; // Parent class. + this.id = config.id; // Name or ID (e.g. dataset ID, bucket name, etc). + this.createMethod = config.createMethod; + this.methods = config.methods || {}; + this.interceptors = []; + this.projectId = config.projectId; + if (config.methods) { + // This filters the ServiceObject instance (e.g. a "File") to only have + // the configured methods. We make a couple of exceptions for core- + // functionality ("request()" and "getRequestInterceptors()") + Object.getOwnPropertyNames(ServiceObject.prototype) + .filter(methodName => { + return ( + // All ServiceObjects need `request` and `getRequestInterceptors`. + // clang-format off + !/^request/.test(methodName) && + !/^getRequestInterceptors/.test(methodName) && + // clang-format on + // The ServiceObject didn't redefine the method. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this[methodName] === + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ServiceObject.prototype[methodName] && + // This method isn't wanted. + !config.methods[methodName]); + }) + .forEach(methodName => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + this[methodName] = undefined; + }); } - const shouldRunValidation = !rangeRequest && (crc32c || md5); - if (rangeRequest) { - if (typeof options.validation === 'string' || - options.validation === true) { - throw new Error(FileExceptionMessages.INVALID_VALIDATION_FILE_RANGE); + } + create(optionsOrCallback, callback) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + const args = [this.id]; + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } + if (typeof optionsOrCallback === 'object') { + args.push(optionsOrCallback); + } + // Wrap the callback to return *this* instance of the object, not the + // newly-created one. + // tslint: disable-next-line no-any + function onCreate(...args) { + const [err, instance] = args; + if (!err) { + self.metadata = instance.metadata; + if (self.id && instance.metadata) { + self.id = instance.metadata.id; + } + args[1] = self; // replace the created `instance` with this one. } - // Range requests can't receive data integrity checks. - crc32c = false; - md5 = false; + callback(...args); } - const onComplete = (err) => { + args.push(onCreate); + // eslint-disable-next-line prefer-spread + this.createMethod.apply(null, args); + } + delete(optionsOrCallback, cb) { + var _a; + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const ignoreNotFound = options.ignoreNotFound; + delete options.ignoreNotFound; + const methodConfig = (typeof this.methods.delete === 'object' && this.methods.delete) || {}; + const reqOpts = { + method: 'DELETE', + uri: '', + ...methodConfig.reqOpts, + qs: { + ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, + ...options, + }, + }; + // The `request` method may have been overridden to hold any special + // behavior. Ensure we call the original `request` method. + ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { if (err) { - // There is an issue with node-fetch 2.x that if the stream errors the underlying socket connection is not closed. - // This causes a memory leak, so cleanup the sockets manually here by destroying the agent. - if (request === null || request === void 0 ? void 0 : request.agent) { - request.agent.destroy(); + if (err.code === 404 && ignoreNotFound) { + err = null; } - throughStream.destroy(err); } - }; - // We listen to the response event from the request stream so that we - // can... - // - // 1) Intercept any data from going to the user if an error occurred. - // 2) Calculate the hashes from the http.IncomingMessage response - // stream, - // which will return the bytes from the source without decompressing - // gzip'd content. We then send it through decompressed, if - // applicable, to the user. - const onResponse = (err, _body, rawResponseStream) => { + callback(err, res); + }); + } + exists(optionsOrCallback, cb) { + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + this.get(options, err => { if (err) { - // Get error message from the body. - this.getBufferFromReadable(rawResponseStream).then(body => { - err.message = body.toString('utf8'); - throughStream.destroy(err); - }); + if (err.code === 404) { + callback(null, false); + } + else { + callback(err); + } return; } - request = rawResponseStream.request; - const headers = rawResponseStream.toJSON().headers; - const isCompressed = headers['content-encoding'] === 'gzip'; - const hashes = {}; - // The object is safe to validate if: - // 1. It was stored gzip and returned to us gzip OR - // 2. It was never stored as gzip - const safeToValidate = (headers['x-goog-stored-content-encoding'] === 'gzip' && - isCompressed) || - headers['x-goog-stored-content-encoding'] === 'identity'; - const transformStreams = []; - if (shouldRunValidation) { - // The x-goog-hash header should be set with a crc32c and md5 hash. - // ex: headers['x-goog-hash'] = 'crc32c=xxxx,md5=xxxx' - if (typeof headers['x-goog-hash'] === 'string') { - headers['x-goog-hash'] - .split(',') - .forEach((hashKeyValPair) => { - const delimiterIndex = hashKeyValPair.indexOf('='); - const hashType = hashKeyValPair.substring(0, delimiterIndex); - const hashValue = hashKeyValPair.substring(delimiterIndex + 1); - hashes[hashType] = hashValue; - }); + callback(null, true); + }); + } + get(optionsOrCallback, cb) { + // eslint-disable-next-line @typescript-eslint/no-this-alias + const self = this; + const [opts, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const options = Object.assign({}, opts); + const autoCreate = options.autoCreate && typeof this.create === 'function'; + delete options.autoCreate; + function onCreate(err, instance, apiResponse) { + if (err) { + if (err.code === 409) { + self.get(options, callback); + return; } - validateStream = new hash_stream_validator_js_1.HashStreamValidator({ - crc32c, - md5, - crc32cGenerator: this.crc32cGenerator, - crc32cExpected: hashes.crc32c, - md5Expected: hashes.md5, - }); - } - if (md5 && !hashes.md5) { - const hashError = new RequestError(FileExceptionMessages.MD5_NOT_AVAILABLE); - hashError.code = 'MD5_NOT_AVAILABLE'; - throughStream.destroy(hashError); + callback(err, null, apiResponse); return; } - if (safeToValidate && shouldRunValidation && validateStream) { - transformStreams.push(validateStream); - } - if (isCompressed && options.decompress) { - transformStreams.push(zlib.createGunzip()); + callback(null, instance, apiResponse); + } + this.getMetadata(options, (err, metadata) => { + if (err) { + if (err.code === 404 && autoCreate) { + const args = []; + if (Object.keys(options).length > 0) { + args.push(options); + } + args.push(onCreate); + self.create(...args); + return; + } + callback(err, null, metadata); + return; } - (0, stream_1.pipeline)(rawResponseStream, ...transformStreams, throughStream, onComplete); + callback(null, self, metadata); + }); + } + getMetadata(optionsOrCallback, cb) { + var _a; + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const methodConfig = (typeof this.methods.getMetadata === 'object' && + this.methods.getMetadata) || + {}; + const reqOpts = { + uri: '', + ...methodConfig.reqOpts, + qs: { + ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, + ...options, + }, }; - // Authenticate the request, then pipe the remote API request to the stream - // returned to the user. - const makeRequest = () => { - const query = { alt: 'media' }; - if (this.generation) { - query.generation = this.generation; - } - if (options.userProject) { - query.userProject = options.userProject; + // The `request` method may have been overridden to hold any special + // behavior. Ensure we call the original `request` method. + ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { + this.metadata = body; + callback(err, this.metadata, res); + }); + } + /** + * Return the user's custom request interceptors. + */ + getRequestInterceptors() { + // Interceptors should be returned in the order they were assigned. + const localInterceptors = this.interceptors + .filter(interceptor => typeof interceptor.request === 'function') + .map(interceptor => interceptor.request); + return this.parent.getRequestInterceptors().concat(localInterceptors); + } + setMetadata(metadata, optionsOrCallback, cb) { + var _a, _b; + const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); + const methodConfig = (typeof this.methods.setMetadata === 'object' && + this.methods.setMetadata) || + {}; + const reqOpts = { + method: 'PATCH', + uri: '', + ...methodConfig.reqOpts, + json: { + ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.json, + ...metadata, + }, + qs: { + ...(_b = methodConfig.reqOpts) === null || _b === void 0 ? void 0 : _b.qs, + ...options, + }, + }; + // The `request` method may have been overridden to hold any special + // behavior. Ensure we call the original `request` method. + ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { + this.metadata = body; + callback(err, this.metadata, res); + }); + } + request_(reqOpts, callback) { + reqOpts = { ...reqOpts }; + if (this.projectId) { + reqOpts.projectId = this.projectId; + } + const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; + const uriComponents = [this.baseUrl, this.id || '', reqOpts.uri]; + if (isAbsoluteUrl) { + uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); + } + reqOpts.uri = uriComponents + .filter(x => x.trim()) // Limit to non-empty strings. + .map(uriComponent => { + const trimSlashesRegex = /^\/*|\/*$/g; + return uriComponent.replace(trimSlashesRegex, ''); + }) + .join('/'); + const childInterceptors = Array.isArray(reqOpts.interceptors_) + ? reqOpts.interceptors_ + : []; + const localInterceptors = [].slice.call(this.interceptors); + reqOpts.interceptors_ = childInterceptors.concat(localInterceptors); + if (reqOpts.shouldReturnStream) { + return this.parent.requestStream(reqOpts); + } + this.parent.request(reqOpts, callback); + } + request(reqOpts, callback) { + this.request_(reqOpts, callback); + } + /** + * Make an authenticated API request. + * + * @param {object} reqOpts - Request options that are passed to `request`. + * @param {string} reqOpts.uri - A URI relative to the baseUrl. + */ + requestStream(reqOpts) { + const opts = { ...reqOpts, shouldReturnStream: true }; + return this.request_(opts); + } +} +exports.ServiceObject = ServiceObject; +(0, promisify_1.promisifyAll)(ServiceObject, { exclude: ['getRequestInterceptors'] }); + + +/***/ }), + +/***/ 17370: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Service = exports.DEFAULT_PROJECT_ID_TOKEN = void 0; +/*! + * Copyright 2022 Google LLC. All Rights Reserved. + * + * 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. + */ +const google_auth_library_1 = __nccwpck_require__(20810); +const uuid = __importStar(__nccwpck_require__(44458)); +const util_js_1 = __nccwpck_require__(38064); +const util_js_2 = __nccwpck_require__(59258); +exports.DEFAULT_PROJECT_ID_TOKEN = '{{projectId}}'; +class Service { + /** + * Service is a base class, meant to be inherited from by a "service," like + * BigQuery or Storage. + * + * This handles making authenticated requests by exposing a `makeReq_` + * function. + * + * @constructor + * @alias module:common/service + * + * @param {object} config - Configuration object. + * @param {string} config.baseUrl - The base URL to make API requests to. + * @param {string[]} config.scopes - The scopes required for the request. + * @param {object=} options - [Configuration object](#/docs). + */ + constructor(config, options = {}) { + this.baseUrl = config.baseUrl; + this.apiEndpoint = config.apiEndpoint; + this.timeout = options.timeout; + this.globalInterceptors = Array.isArray(options.interceptors_) + ? options.interceptors_ + : []; + this.interceptors = []; + this.packageJson = config.packageJson; + this.projectId = options.projectId || exports.DEFAULT_PROJECT_ID_TOKEN; + this.projectIdRequired = config.projectIdRequired !== false; + this.providedUserAgent = options.userAgent; + this.universeDomain = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; + this.customEndpoint = config.customEndpoint || false; + this.useAuthWithCustomEndpoint = config.useAuthWithCustomEndpoint; + this.makeAuthenticatedRequest = util_js_1.util.makeAuthenticatedRequestFactory({ + ...config, + projectIdRequired: this.projectIdRequired, + projectId: this.projectId, + authClient: options.authClient || config.authClient, + credentials: options.credentials, + keyFile: options.keyFilename, + email: options.email, + clientOptions: { + universeDomain: options.universeDomain, + ...options.clientOptions, + }, + }); + this.authClient = this.makeAuthenticatedRequest.authClient; + const isCloudFunctionEnv = !!process.env.FUNCTION_NAME; + if (isCloudFunctionEnv) { + this.interceptors.push({ + request(reqOpts) { + reqOpts.forever = false; + return reqOpts; + }, + }); + } + } + /** + * Return the user's custom request interceptors. + */ + getRequestInterceptors() { + // Interceptors should be returned in the order they were assigned. + return [].slice + .call(this.globalInterceptors) + .concat(this.interceptors) + .filter(interceptor => typeof interceptor.request === 'function') + .map(interceptor => interceptor.request); + } + getProjectId(callback) { + if (!callback) { + return this.getProjectIdAsync(); + } + this.getProjectIdAsync().then(p => callback(null, p), callback); + } + async getProjectIdAsync() { + const projectId = await this.authClient.getProjectId(); + if (this.projectId === exports.DEFAULT_PROJECT_ID_TOKEN && projectId) { + this.projectId = projectId; + } + return this.projectId; + } + request_(reqOpts, callback) { + reqOpts = { ...reqOpts, timeout: this.timeout }; + const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; + const uriComponents = [this.baseUrl]; + if (this.projectIdRequired) { + if (reqOpts.projectId) { + uriComponents.push('projects'); + uriComponents.push(reqOpts.projectId); } - const headers = { - 'Accept-Encoding': 'gzip', - 'Cache-Control': 'no-store', - }; - if (rangeRequest) { - const start = typeof options.start === 'number' ? options.start : '0'; - const end = typeof options.end === 'number' ? options.end : ''; - headers.Range = `bytes=${tailRequest ? end : `${start}-${end}`}`; + else { + uriComponents.push('projects'); + uriComponents.push(this.projectId); } - const reqOpts = { - uri: '', - headers, - qs: query, - }; - if (options[util_js_1.GCCL_GCS_CMD_KEY]) { - reqOpts[util_js_1.GCCL_GCS_CMD_KEY] = options[util_js_1.GCCL_GCS_CMD_KEY]; + } + uriComponents.push(reqOpts.uri); + if (isAbsoluteUrl) { + uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); + } + reqOpts.uri = uriComponents + .map(uriComponent => { + const trimSlashesRegex = /^\/*|\/*$/g; + return uriComponent.replace(trimSlashesRegex, ''); + }) + .join('/') + // Some URIs have colon separators. + // Bad: https://.../projects/:list + // Good: https://.../projects:list + .replace(/\/:/g, ':'); + const requestInterceptors = this.getRequestInterceptors(); + const interceptorArray = Array.isArray(reqOpts.interceptors_) + ? reqOpts.interceptors_ + : []; + interceptorArray.forEach(interceptor => { + if (typeof interceptor.request === 'function') { + requestInterceptors.push(interceptor.request); } - this.requestStream(reqOpts) - .on('error', err => { - throughStream.destroy(err); - }) - .on('response', res => { - throughStream.emit('response', res); - index_js_1.util.handleResp(null, res, null, onResponse); - }) - .resume(); + }); + requestInterceptors.forEach(requestInterceptor => { + reqOpts = requestInterceptor(reqOpts); + }); + delete reqOpts.interceptors_; + const pkg = this.packageJson; + let userAgent = (0, util_js_2.getUserAgentString)(); + if (this.providedUserAgent) { + userAgent = `${this.providedUserAgent} ${userAgent}`; + } + reqOpts.headers = { + ...reqOpts.headers, + 'User-Agent': userAgent, + 'x-goog-api-client': `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${pkg.version}-${(0, util_js_2.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, }; - throughStream.on('reading', makeRequest); - return throughStream; + if (reqOpts[util_js_1.GCCL_GCS_CMD_KEY]) { + reqOpts.headers['x-goog-api-client'] += + ` gccl-gcs-cmd/${reqOpts[util_js_1.GCCL_GCS_CMD_KEY]}`; + } + if (reqOpts.shouldReturnStream) { + return this.makeAuthenticatedRequest(reqOpts); + } + else { + this.makeAuthenticatedRequest(reqOpts, callback); + } } /** - * @callback CreateResumableUploadCallback - * @param {?Error} err Request error, if any. - * @param {string} uri The resumable upload's unique session URI. + * Make an authenticated API request. + * + * @param {object} reqOpts - Request options that are passed to `request`. + * @param {string} reqOpts.uri - A URI relative to the baseUrl. + * @param {function} callback - The callback function passed to `request`. */ + request(reqOpts, callback) { + Service.prototype.request_.call(this, reqOpts, callback); + } /** - * @typedef {array} CreateResumableUploadResponse - * @property {string} 0 The resumable upload's unique session URI. + * Make an authenticated API request. + * + * @param {object} reqOpts - Request options that are passed to `request`. + * @param {string} reqOpts.uri - A URI relative to the baseUrl. */ + requestStream(reqOpts) { + const opts = { ...reqOpts, shouldReturnStream: true }; + return Service.prototype.request_.call(this, opts); + } +} +exports.Service = Service; + + +/***/ }), + +/***/ 38064: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/*! + * Copyright 2022 Google LLC. All Rights Reserved. + * + * 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. + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.util = exports.Util = exports.PartialFailureError = exports.ApiError = exports.GCCL_GCS_CMD_KEY = void 0; +/*! + * @module common/util + */ +const projectify_1 = __nccwpck_require__(3497); +const htmlEntities = __importStar(__nccwpck_require__(1263)); +const google_auth_library_1 = __nccwpck_require__(20810); +const retry_request_1 = __importDefault(__nccwpck_require__(63515)); +const stream_1 = __nccwpck_require__(12781); +const teeny_request_1 = __nccwpck_require__(6886); +const uuid = __importStar(__nccwpck_require__(44458)); +const service_js_1 = __nccwpck_require__(17370); +const util_js_1 = __nccwpck_require__(59258); +const duplexify_1 = __importDefault(__nccwpck_require__(76599)); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const package_json_helper_cjs_1 = __nccwpck_require__(28568); +const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); +/** + * A unique symbol for providing a `gccl-gcs-cmd` value + * for the `X-Goog-API-Client` header. + * + * E.g. the `V` in `X-Goog-API-Client: gccl-gcs-cmd/V` + **/ +exports.GCCL_GCS_CMD_KEY = Symbol.for('GCCL_GCS_CMD'); +const requestDefaults = { + timeout: 60000, + gzip: true, + forever: true, + pool: { + maxSockets: Infinity, + }, +}; +/** + * Default behavior: Automatically retry retriable server errors. + * + * @const {boolean} + * @private + */ +const AUTO_RETRY_DEFAULT = true; +/** + * Default behavior: Only attempt to retry retriable errors 3 times. + * + * @const {number} + * @private + */ +const MAX_RETRY_DEFAULT = 3; +/** + * Custom error type for API errors. + * + * @param {object} errorBody - Error object. + */ +class ApiError extends Error { + constructor(errorBodyOrMessage) { + super(); + if (typeof errorBodyOrMessage !== 'object') { + this.message = errorBodyOrMessage || ''; + return; + } + const errorBody = errorBodyOrMessage; + this.code = errorBody.code; + this.errors = errorBody.errors; + this.response = errorBody.response; + try { + this.errors = JSON.parse(this.response.body).error.errors; + } + catch (e) { + this.errors = errorBody.errors; + } + this.message = ApiError.createMultiErrorMessage(errorBody, this.errors); + Error.captureStackTrace(this); + } /** - * @typedef {object} CreateResumableUploadOptions - * @property {object} [metadata] Metadata to set on the file. - * @property {number} [offset] The starting byte of the upload stream for resuming an interrupted upload. - * @property {string} [origin] Origin header to set for the upload. - * @property {string} [predefinedAcl] Apply a predefined set of access - * controls to this object. - * - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. - * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. - * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. - * - * - **`private`** - Object owner gets `OWNER` access. + * Pieces together an error message by combining all unique error messages + * returned from a single GoogleError * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. + * @private * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @property {boolean} [private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @property {boolean} [public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string} [chunkSize] Create a separate request per chunk. This - * value is in bytes and should be a multiple of 256 KiB (2^18). - * {@link https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload| We recommend using at least 8 MiB for the chunk size.} + * @param {GoogleErrorBody} err The original error. + * @param {GoogleInnerError[]} [errors] Inner errors, if any. + * @returns {string} */ + static createMultiErrorMessage(err, errors) { + const messages = new Set(); + if (err.message) { + messages.add(err.message); + } + if (errors && errors.length) { + errors.forEach(({ message }) => messages.add(message)); + } + else if (err.response && err.response.body) { + messages.add(htmlEntities.decode(err.response.body.toString())); + } + else if (!err.message) { + messages.add('A failure occurred during this request.'); + } + let messageArr = Array.from(messages); + if (messageArr.length > 1) { + messageArr = messageArr.map((message, i) => ` ${i + 1}. ${message}`); + messageArr.unshift('Multiple errors occurred during the request. Please see the `errors` array for complete details.\n'); + messageArr.push('\n'); + } + return messageArr.join('\n'); + } +} +exports.ApiError = ApiError; +/** + * Custom error type for partial errors returned from the API. + * + * @param {object} b - Error object. + */ +class PartialFailureError extends Error { + constructor(b) { + super(); + const errorObject = b; + this.errors = errorObject.errors; + this.name = 'PartialFailureError'; + this.response = errorObject.response; + this.message = ApiError.createMultiErrorMessage(errorObject, this.errors); + } +} +exports.PartialFailureError = PartialFailureError; +class Util { + constructor() { + this.ApiError = ApiError; + this.PartialFailureError = PartialFailureError; + } /** - * Create a unique resumable upload session URI. This is the first step when - * performing a resumable upload. - * - * See the {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} - * for more on how the entire process works. - * - *

Note

- * - * If you are just looking to perform a resumable upload without worrying - * about any of the details, see {@link File#createWriteStream}. Resumable - * uploads are performed by default. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload| Resumable upload guide} - * - * @param {CreateResumableUploadOptions} [options] Configuration options. - * @param {CreateResumableUploadCallback} [callback] Callback function. - * @returns {Promise} + * No op. * * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * file.createResumableUpload(function(err, uri) { - * if (!err) { - * // `uri` can be used to PUT data to. - * } - * }); + * function doSomething(callback) { + * callback = callback || noop; + * } + */ + noop() { } + /** + * Uniformly process an API response. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.createResumableUpload().then(function(data) { - * const uri = data[0]; - * }); - * ``` + * @param {*} err - Error value. + * @param {*} resp - Response value. + * @param {*} body - Body value. + * @param {function} callback - The callback function. */ - createResumableUpload(optionsOrCallback, callback) { - var _a, _b; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const retryOptions = this.storage.retryOptions; - if ((((_a = options === null || options === void 0 ? void 0 : options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) === undefined && - ((_b = this.instancePreconditionOpts) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - retryOptions.autoRetry = false; + handleResp(err, resp, body, callback) { + callback = callback || util.noop; + const parsedResp = { + err: err || null, + ...(resp && util.parseHttpRespMessage(resp)), + ...(body && util.parseHttpRespBody(body)), + }; + // Assign the parsed body to resp.body, even if { json: false } was passed + // as a request option. + // We assume that nobody uses the previously unparsed value of resp.body. + if (!parsedResp.err && resp && typeof parsedResp.body === 'object') { + parsedResp.resp.body = parsedResp.body; } - resumableUpload.createURI({ - authClient: this.storage.authClient, - apiEndpoint: this.storage.apiEndpoint, - bucket: this.bucket.name, - customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), - file: this.name, - generation: this.generation, - key: this.encryptionKey, - kmsKeyName: this.kmsKeyName, - metadata: options.metadata, - offset: options.offset, - origin: options.origin, - predefinedAcl: options.predefinedAcl, - private: options.private, - public: options.public, - userProject: options.userProject || this.userProject, - retryOptions: retryOptions, - params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, - universeDomain: this.bucket.storage.universeDomain, - [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], - }, callback); - this.storage.retryOptions.autoRetry = this.instanceRetryValue; + if (parsedResp.err && resp) { + parsedResp.err.response = resp; + } + callback(parsedResp.err, parsedResp.body, parsedResp.resp); } /** - * @typedef {object} CreateWriteStreamOptions Configuration options for File#createWriteStream(). - * @property {string} [contentType] Alias for - * `options.metadata.contentType`. If set to `auto`, the file name is used - * to determine the contentType. - * @property {string|boolean} [gzip] If true, automatically gzip the file. - * If set to `auto`, the contentType is used to determine if the file - * should be gzipped. This will set `options.metadata.contentEncoding` to - * `gzip` if necessary. - * @property {object} [metadata] See the examples below or - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert#request_properties_JSON| Objects: insert request body} - * for more details. - * @property {number} [offset] The starting byte of the upload stream, for - * resuming an interrupted upload. Defaults to 0. - * @property {string} [predefinedAcl] Apply a predefined set of access - * controls to this object. - * - * Acceptable values are: - * - **`authenticatedRead`** - Object owner gets `OWNER` access, and - * `allAuthenticatedUsers` get `READER` access. - * - * - **`bucketOwnerFullControl`** - Object owner gets `OWNER` access, and - * project team owners get `OWNER` access. - * - * - **`bucketOwnerRead`** - Object owner gets `OWNER` access, and project - * team owners get `READER` access. - * - * - **`private`** - Object owner gets `OWNER` access. - * - * - **`projectPrivate`** - Object owner gets `OWNER` access, and project - * team members get access according to their roles. + * Sniff an incoming HTTP response message for errors. * - * - **`publicRead`** - Object owner gets `OWNER` access, and `allUsers` - * get `READER` access. - * @property {boolean} [private] Make the uploaded file private. (Alias for - * `options.predefinedAcl = 'private'`) - * @property {boolean} [public] Make the uploaded file public. (Alias for - * `options.predefinedAcl = 'publicRead'`) - * @property {boolean} [resumable] Force a resumable upload. NOTE: When - * working with streams, the file format and size is unknown until it's - * completely consumed. Because of this, it's best for you to be explicit - * for what makes sense given your input. - * @property {number} [timeout=60000] Set the HTTP request timeout in - * milliseconds. This option is not available for resumable uploads. - * Default: `60000` - * @property {string} [uri] The URI for an already-created resumable - * upload. See {@link File#createResumableUpload}. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - * @property {string|boolean} [validation] Possible values: `"md5"`, - * `"crc32c"`, or `false`. By default, data integrity is validated with a - * CRC32c checksum. You may use MD5 if preferred, but that hash is not - * supported for composite objects. An error will be raised if MD5 is - * specified but is not available. You may also choose to skip validation - * completely, however this is **not recommended**. In addition to specifying - * validation type, providing `metadata.crc32c` or `metadata.md5Hash` will - * cause the server to perform validation in addition to client validation. - * NOTE: Validation is automatically skipped for objects that were - * uploaded using the `gzip` option and have already compressed content. + * @param {object} httpRespMessage - An incoming HTTP response message from `request`. + * @return {object} parsedHttpRespMessage - The parsed response. + * @param {?error} parsedHttpRespMessage.err - An error detected. + * @param {object} parsedHttpRespMessage.resp - The original response object. */ + parseHttpRespMessage(httpRespMessage) { + const parsedHttpRespMessage = { + resp: httpRespMessage, + }; + if (httpRespMessage.statusCode < 200 || httpRespMessage.statusCode > 299) { + // Unknown error. Format according to ApiError standard. + parsedHttpRespMessage.err = new ApiError({ + errors: new Array(), + code: httpRespMessage.statusCode, + message: httpRespMessage.statusMessage, + response: httpRespMessage, + }); + } + return parsedHttpRespMessage; + } /** - * Create a writable stream to overwrite the contents of the file in your - * bucket. - * - * A File object can also be used to create files for the first time. - * - * Resumable uploads are automatically enabled and must be shut off explicitly - * by setting `options.resumable` to `false`. - * - * - *

- * There is some overhead when using a resumable upload that can cause - * noticeable performance degradation while uploading a series of small - * files. When uploading files less than 10MB, it is recommended that the - * resumable feature is disabled. - *

- * - * NOTE: Writable streams will emit the `finish` event when the file is fully - * uploaded. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload Upload Options (Simple or Resumable)} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/insert Objects: insert API Documentation} - * - * @param {CreateWriteStreamOptions} [options] Configuration options. - * @returns {WritableStream} - * - * @example - * ``` - * const fs = require('fs'); - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * //

Uploading a File

- * // - * // Now, consider a case where we want to upload a file to your bucket. You - * // have the option of using {@link Bucket#upload}, but that is just - * // a convenience method which will do the following. - * //- - * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') - * .pipe(file.createWriteStream()) - * .on('error', function(err) {}) - * .on('finish', function() { - * // The file upload is complete. - * }); - * - * //- - * //

Uploading a File with gzip compression

- * //- - * fs.createReadStream('/Users/stephen/site/index.html') - * .pipe(file.createWriteStream({ gzip: true })) - * .on('error', function(err) {}) - * .on('finish', function() { - * // The file upload is complete. - * }); - * - * //- - * // Downloading the file with `createReadStream` will automatically decode - * // the file. - * //- - * - * //- - * //

Uploading a File with Metadata

- * // - * // One last case you may run into is when you want to upload a file to your - * // bucket and set its metadata at the same time. Like above, you can use - * // {@link Bucket#upload} to do this, which is just a wrapper around - * // the following. - * //- - * fs.createReadStream('/Users/stephen/Photos/birthday-at-the-zoo/panda.jpg') - * .pipe(file.createWriteStream({ - * metadata: { - * contentType: 'image/jpeg', - * metadata: { - * custom: 'metadata' - * } - * } - * })) - * .on('error', function(err) {}) - * .on('finish', function() { - * // The file upload is complete. - * }); - * ``` - * - * //- - * //

Continuing a Resumable Upload

- * // - * // One can capture a `uri` from a resumable upload to reuse later. - * // Additionally, for validation, one can also capture and pass `crc32c`. - * //- - * let uri: string | undefined = undefined; - * let resumeCRC32C: string | undefined = undefined; - * - * fs.createWriteStream() - * .on('uri', link => {uri = link}) - * .on('crc32', crc32c => {resumeCRC32C = crc32c}); + * Parse the response body from an HTTP request. * - * // later... - * fs.createWriteStream({uri, resumeCRC32C}); + * @param {object} body - The response body. + * @return {object} parsedHttpRespMessage - The parsed response. + * @param {?error} parsedHttpRespMessage.err - An error detected. + * @param {object} parsedHttpRespMessage.body - The original body value provided + * will try to be JSON.parse'd. If it's successful, the parsed value will + * be returned here, otherwise the original value and an error will be returned. */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - createWriteStream(options = {}) { - var _a; - (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); - if (options.contentType) { - options.metadata.contentType = options.contentType; - } - if (!options.metadata.contentType || - options.metadata.contentType === 'auto') { - const detectedContentType = mime_1.default.getType(this.name); - if (detectedContentType) { - options.metadata.contentType = detectedContentType; - } - } - let gzip = options.gzip; - if (gzip === 'auto') { - gzip = COMPRESSIBLE_MIME_REGEX.test(options.metadata.contentType || ''); - } - if (gzip) { - options.metadata.contentEncoding = 'gzip'; - } - let crc32c = true; - let md5 = false; - if (typeof options.validation === 'string') { - options.validation = options.validation.toLowerCase(); - crc32c = options.validation === 'crc32c'; - md5 = options.validation === 'md5'; - } - else if (options.validation === false) { - crc32c = false; - md5 = false; - } - if (options.offset) { - if (md5) { - throw new RangeError(FileExceptionMessages.MD5_RESUMED_UPLOAD); + parseHttpRespBody(body) { + const parsedHttpRespBody = { + body, + }; + if (typeof body === 'string') { + try { + parsedHttpRespBody.body = JSON.parse(body); } - if (crc32c && !options.isPartialUpload && !options.resumeCRC32C) { - throw new RangeError(FileExceptionMessages.MISSING_RESUME_CRC32C_FINAL_UPLOAD); + catch (err) { + parsedHttpRespBody.body = body; } } - /** - * A callback for determining when the underlying pipeline is complete. - * It's possible the pipeline callback could error before the write stream - * calls `final` so by default this will destroy the write stream unless the - * write stream sets this callback via its `final` handler. - * @param error An optional error - */ - let pipelineCallback = error => { - writeStream.destroy(error || undefined); + if (parsedHttpRespBody.body && parsedHttpRespBody.body.error) { + // Error from JSON API. + parsedHttpRespBody.err = new ApiError(parsedHttpRespBody.body.error); + } + return parsedHttpRespBody; + } + /** + * Take a Duplexify stream, fetch an authenticated connection header, and + * create an outgoing writable stream. + * + * @param {Duplexify} dup - Duplexify stream. + * @param {object} options - Configuration object. + * @param {module:common/connection} options.connection - A connection instance used to get a token with and send the request through. + * @param {object} options.metadata - Metadata to send at the head of the request. + * @param {object} options.request - Request object, in the format of a standard Node.js http.request() object. + * @param {string=} options.request.method - Default: "POST". + * @param {string=} options.request.qs.uploadType - Default: "multipart". + * @param {string=} options.streamContentType - Default: "application/octet-stream". + * @param {function} onComplete - Callback, executed after the writable Request stream has completed. + */ + makeWritableStream(dup, options, onComplete) { + var _a; + onComplete = onComplete || util.noop; + const writeStream = new ProgressStream(); + writeStream.on('progress', evt => dup.emit('progress', evt)); + dup.setWritable(writeStream); + const defaultReqOpts = { + method: 'POST', + qs: { + uploadType: 'multipart', + }, + timeout: 0, + maxRetries: 0, }; - // A stream for consumer to write to - const writeStream = new stream_1.Writable({ - final(cb) { - // Set the pipeline callback to this callback so the pipeline's results - // can be populated to the consumer - pipelineCallback = cb; - emitStream.end(); + const metadata = options.metadata || {}; + const reqOpts = { + ...defaultReqOpts, + ...options.request, + qs: { + ...defaultReqOpts.qs, + ...(_a = options.request) === null || _a === void 0 ? void 0 : _a.qs, }, - write(chunk, encoding, cb) { - emitStream.write(chunk, encoding, cb); + multipart: [ + { + 'Content-Type': 'application/json', + body: JSON.stringify(metadata), + }, + { + 'Content-Type': metadata.contentType || 'application/octet-stream', + body: writeStream, + }, + ], + }; + options.makeAuthenticatedRequest(reqOpts, { + onAuthenticated(err, authenticatedReqOpts) { + if (err) { + dup.destroy(err); + return; + } + requestDefaults.headers = util._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); + const request = teeny_request_1.teenyRequest.defaults(requestDefaults); + request(authenticatedReqOpts, (err, resp, body) => { + util.handleResp(err, resp, body, (err, data) => { + if (err) { + dup.destroy(err); + return; + } + dup.emit('response', resp); + onComplete(data); + }); + }); }, }); - // If the write stream, which is returned to the caller, catches an error we need to make sure that - // at least one of the streams in the pipeline below gets notified so that they - // all get cleaned up / destroyed. - writeStream.once('error', e => { - emitStream.destroy(e); - }); - // If the write stream is closed, cleanup the pipeline below by calling destroy on one of the streams. - writeStream.once('close', () => { - emitStream.destroy(); - }); - const transformStreams = []; - if (gzip) { - transformStreams.push(zlib.createGzip()); - } - const emitStream = new util_js_2.PassThroughShim(); - let hashCalculatingStream = null; - if (crc32c || md5) { - const crc32cInstance = options.resumeCRC32C - ? crc32c_js_1.CRC32C.from(options.resumeCRC32C) - : undefined; - hashCalculatingStream = new hash_stream_validator_js_1.HashStreamValidator({ - crc32c, - crc32cInstance, - md5, - crc32cGenerator: this.crc32cGenerator, - updateHashesOnly: true, - }); - transformStreams.push(hashCalculatingStream); - } - const fileWriteStream = (0, duplexify_1.default)(); - let fileWriteStreamMetadataReceived = false; - // Handing off emitted events to users - emitStream.on('reading', () => writeStream.emit('reading')); - emitStream.on('writing', () => writeStream.emit('writing')); - fileWriteStream.on('uri', evt => writeStream.emit('uri', evt)); - fileWriteStream.on('progress', evt => writeStream.emit('progress', evt)); - fileWriteStream.on('response', resp => writeStream.emit('response', resp)); - fileWriteStream.once('metadata', () => { - fileWriteStreamMetadataReceived = true; - }); - writeStream.once('writing', () => { - if (options.resumable === false) { - this.startSimpleUpload_(fileWriteStream, options); - } - else { - this.startResumableUpload_(fileWriteStream, options); + } + /** + * Returns true if the API request should be retried, given the error that was + * given the first time the request was attempted. This is used for rate limit + * related errors as well as intermittent server errors. + * + * @param {error} err - The API error to check if it is appropriate to retry. + * @return {boolean} True if the API request should be retried, false otherwise. + */ + shouldRetryRequest(err) { + if (err) { + if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { + return true; } - (0, stream_1.pipeline)(emitStream, ...transformStreams, fileWriteStream, async (e) => { - if (e) { - return pipelineCallback(e); - } - // We want to make sure we've received the metadata from the server in order - // to properly validate the object's integrity. Depending on the type of upload, - // the stream could close before the response is returned. - if (!fileWriteStreamMetadataReceived) { - try { - await new Promise((resolve, reject) => { - fileWriteStream.once('metadata', resolve); - fileWriteStream.once('error', reject); - }); + if (err.errors) { + for (const e of err.errors) { + const reason = e.reason; + if (reason === 'rateLimitExceeded') { + return true; } - catch (e) { - return pipelineCallback(e); + if (reason === 'userRateLimitExceeded') { + return true; } - } - // Emit the local CRC32C value for future validation, if validation is enabled. - if (hashCalculatingStream === null || hashCalculatingStream === void 0 ? void 0 : hashCalculatingStream.crc32c) { - writeStream.emit('crc32c', hashCalculatingStream.crc32c); - } - try { - // Metadata may not be ready if the upload is a partial upload, - // nothing to validate yet. - const metadataNotReady = options.isPartialUpload && !this.metadata; - if (hashCalculatingStream && !metadataNotReady) { - await __classPrivateFieldGet(this, _File_instances, "m", _File_validateIntegrity).call(this, hashCalculatingStream, { - crc32c, - md5, - }); + if (reason && reason.includes('EAI_AGAIN')) { + return true; } - pipelineCallback(); - } - catch (e) { - pipelineCallback(e); } - }); - }); - return writeStream; - } - delete(optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - this.disableAutoRetryConditionallyIdempotent_(this.methods.delete, bucket_js_1.AvailableServiceObjectMethods.delete, options); - super - .delete(options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - }); + } + } + return false; } /** - * @typedef {array} DownloadResponse - * @property [0] The contents of a File. - */ - /** - * @callback DownloadCallback - * @param err Request error, if any. - * @param contents The contents of a File. - */ - /** - * Convenience method to download a file into memory or to a local - * destination. - * - * @param {object} [options] Configuration options. The arguments match those - * passed to {@link File#createReadStream}. - * @param {string} [options.destination] Local file path to write the file's - * contents to. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {DownloadCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Download a file into memory. The contents will be available as the - * second - * // argument in the demonstration below, `contents`. - * //- - * file.download(function(err, contents) {}); - * - * //- - * // Download a file to a local destination. - * //- - * file.download({ - * destination: '/Users/me/Desktop/file-backup.txt' - * }, function(err) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.download().then(function(data) { - * const contents = data[0]; - * }); - * - * ``` - * @example include:samples/files.js - * region_tag:storage_download_file - * Another example: - * - * @example include:samples/encryption.js - * region_tag:storage_download_encrypted_file - * Example of downloading an encrypted file: + * Get a function for making authenticated requests. * - * @example include:samples/requesterPays.js - * region_tag:storage_download_file_requester_pays - * Example of downloading a file where the requester pays: + * @param {object} config - Configuration object. + * @param {boolean=} config.autoRetry - Automatically retry requests if the + * response is related to rate limits or certain intermittent server + * errors. We will exponentially backoff subsequent requests by default. + * (default: true) + * @param {object=} config.credentials - Credentials object. + * @param {boolean=} config.customEndpoint - If true, just return the provided request options. Default: false. + * @param {boolean=} config.useAuthWithCustomEndpoint - If true, will authenticate when using a custom endpoint. Default: false. + * @param {string=} config.email - Account email address, required for PEM/P12 usage. + * @param {number=} config.maxRetries - Maximum number of automatic retries attempted before returning the error. (default: 3) + * @param {string=} config.keyFile - Path to a .json, .pem, or .p12 keyfile. + * @param {array} config.scopes - Array of scopes required for the API. */ - download(optionsOrCallback, cb) { - let options; - if (typeof optionsOrCallback === 'function') { - cb = optionsOrCallback; - options = {}; + makeAuthenticatedRequestFactory(config) { + const googleAutoAuthConfig = { ...config }; + if (googleAutoAuthConfig.projectId === service_js_1.DEFAULT_PROJECT_ID_TOKEN) { + delete googleAutoAuthConfig.projectId; + } + let authClient; + if (googleAutoAuthConfig.authClient instanceof google_auth_library_1.GoogleAuth) { + // Use an existing `GoogleAuth` + authClient = googleAutoAuthConfig.authClient; } else { - options = optionsOrCallback; + // Pass an `AuthClient` & `clientOptions` to `GoogleAuth`, if available + authClient = new google_auth_library_1.GoogleAuth({ + ...googleAutoAuthConfig, + authClient: googleAutoAuthConfig.authClient, + clientOptions: googleAutoAuthConfig.clientOptions, + }); } - let called = false; - const callback = ((...args) => { - if (!called) - cb(...args); - called = true; - }); - const destination = options.destination; - delete options.destination; - const fileStream = this.createReadStream(options); - let receivedData = false; - if (destination) { - fileStream - .on('error', callback) - .once('data', data => { - receivedData = true; - // We know that the file exists the server - now we can truncate/write to a file - const writable = fs.createWriteStream(destination); - writable.write(data); - fileStream - .pipe(writable) - .on('error', callback) - .on('finish', callback); - }) - .on('end', () => { - // In the case of an empty file no data will be received before the end event fires - if (!receivedData) { - const data = Buffer.alloc(0); + function makeAuthenticatedRequest(reqOpts, optionsOrCallback) { + let stream; + let projectId; + const reqConfig = { ...config }; + let activeRequest_; + if (!optionsOrCallback) { + stream = (0, duplexify_1.default)(); + reqConfig.stream = stream; + } + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : undefined; + const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : undefined; + async function setProjectId() { + projectId = await authClient.getProjectId(); + } + const onAuthenticated = async (err, authenticatedReqOpts) => { + const authLibraryError = err; + const autoAuthFailed = err && + typeof err.message === 'string' && + err.message.indexOf('Could not load the default credentials') > -1; + if (autoAuthFailed) { + // Even though authentication failed, the API might not actually + // care. + authenticatedReqOpts = reqOpts; + } + if (!err || autoAuthFailed) { try { - fs.writeFileSync(destination, data); - callback(null, data); + // Try with existing `projectId` value + authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); + err = null; } catch (e) { - callback(e, data); + if (e instanceof projectify_1.MissingProjectIdError) { + // A `projectId` was required, but we don't have one. + try { + // Attempt to get the `projectId` + await setProjectId(); + authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); + err = null; + } + catch (e) { + // Re-use the "Could not load the default credentials error" if + // auto auth failed. + err = err || e; + } + } + else { + // Some other error unrelated to missing `projectId` + err = err || e; + } } } - }); - } - else { - this.getBufferFromReadable(fileStream) - .then(contents => callback === null || callback === void 0 ? void 0 : callback(null, contents)) - .catch(callback); + if (err) { + if (stream) { + stream.destroy(err); + } + else { + const fn = options && options.onAuthenticated + ? options.onAuthenticated + : callback; + fn(err); + } + return; + } + if (options && options.onAuthenticated) { + options.onAuthenticated(null, authenticatedReqOpts); + } + else { + activeRequest_ = util.makeRequest(authenticatedReqOpts, reqConfig, (apiResponseError, ...params) => { + if (apiResponseError && + apiResponseError.code === 401 && + authLibraryError) { + // Re-use the "Could not load the default credentials error" if + // the API request failed due to missing credentials. + apiResponseError = authLibraryError; + } + callback(apiResponseError, ...params); + }); + } + }; + const prepareRequest = async () => { + try { + const getProjectId = async () => { + if (config.projectId && + config.projectId !== service_js_1.DEFAULT_PROJECT_ID_TOKEN) { + // The user provided a project ID. We don't need to check with the + // auth client, it could be incorrect. + return config.projectId; + } + if (config.projectIdRequired === false) { + // A projectId is not required. Return the default. + return service_js_1.DEFAULT_PROJECT_ID_TOKEN; + } + return setProjectId(); + }; + const authorizeRequest = async () => { + if (reqConfig.customEndpoint && + !reqConfig.useAuthWithCustomEndpoint) { + // Using a custom API override. Do not use `google-auth-library` for + // authentication. (ex: connecting to a local Datastore server) + return reqOpts; + } + else { + return authClient.authorizeRequest(reqOpts); + } + }; + const [_projectId, authorizedReqOpts] = await Promise.all([ + getProjectId(), + authorizeRequest(), + ]); + if (_projectId) { + projectId = _projectId; + } + return onAuthenticated(null, authorizedReqOpts); + } + catch (e) { + return onAuthenticated(e); + } + }; + prepareRequest(); + if (stream) { + return stream; + } + return { + abort() { + setImmediate(() => { + if (activeRequest_) { + activeRequest_.abort(); + activeRequest_ = null; + } + }); + }, + }; } + const mar = makeAuthenticatedRequest; + mar.getCredentials = authClient.getCredentials.bind(authClient); + mar.authClient = authClient; + return mar; } /** - * The Storage API allows you to use a custom key for server-side encryption. - * - * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} - * - * @param {string|buffer} encryptionKey An AES-256 encryption key. - * @returns {File} - * - * @example - * ``` - * const crypto = require('crypto'); - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const encryptionKey = crypto.randomBytes(32); - * - * const fileWithCustomEncryption = myBucket.file('my-file'); - * fileWithCustomEncryption.setEncryptionKey(encryptionKey); - * - * const fileWithoutCustomEncryption = myBucket.file('my-file'); - * - * fileWithCustomEncryption.save('data', function(err) { - * // Try to download with the File object that hasn't had - * // `setEncryptionKey()` called: - * fileWithoutCustomEncryption.download(function(err) { - * // We will receive an error: - * // err.message === 'Bad Request' - * - * // Try again with the File object we called `setEncryptionKey()` on: - * fileWithCustomEncryption.download(function(err, contents) { - * // contents.toString() === 'data' - * }); - * }); - * }); - * - * ``` - * @example include:samples/encryption.js - * region_tag:storage_upload_encrypted_file - * Example of uploading an encrypted file: + * Make a request through the `retryRequest` module with built-in error + * handling and exponential back off. * - * @example include:samples/encryption.js - * region_tag:storage_download_encrypted_file - * Example of downloading an encrypted file: + * @param {object} reqOpts - Request options in the format `request` expects. + * @param {object=} config - Configuration object. + * @param {boolean=} config.autoRetry - Automatically retry requests if the + * response is related to rate limits or certain intermittent server + * errors. We will exponentially backoff subsequent requests by default. + * (default: true) + * @param {number=} config.maxRetries - Maximum number of automatic retries + * attempted before returning the error. (default: 3) + * @param {object=} config.request - HTTP module for request calls. + * @param {function} callback - The callback function. */ - setEncryptionKey(encryptionKey) { - this.encryptionKey = encryptionKey; - this.encryptionKeyBase64 = Buffer.from(encryptionKey).toString('base64'); - this.encryptionKeyHash = crypto - .createHash('sha256') - // eslint-disable-next-line @typescript-eslint/no-explicit-any - .update(this.encryptionKeyBase64, 'base64') - .digest('base64'); - this.encryptionKeyInterceptor = { - request: reqOpts => { - reqOpts.headers = reqOpts.headers || {}; - reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; - reqOpts.headers['x-goog-encryption-key'] = this.encryptionKeyBase64; - reqOpts.headers['x-goog-encryption-key-sha256'] = - this.encryptionKeyHash; - return reqOpts; + makeRequest(reqOpts, config, callback) { + var _a, _b, _c, _d, _e; + let autoRetryValue = AUTO_RETRY_DEFAULT; + if (config.autoRetry !== undefined) { + autoRetryValue = config.autoRetry; + } + else if (((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined) { + autoRetryValue = config.retryOptions.autoRetry; + } + let maxRetryValue = MAX_RETRY_DEFAULT; + if (config.maxRetries !== undefined) { + maxRetryValue = config.maxRetries; + } + else if (((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.maxRetries) !== undefined) { + maxRetryValue = config.retryOptions.maxRetries; + } + requestDefaults.headers = this._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); + const options = { + request: teeny_request_1.teenyRequest.defaults(requestDefaults), + retries: autoRetryValue !== false ? maxRetryValue : 0, + noResponseRetries: autoRetryValue !== false ? maxRetryValue : 0, + shouldRetryFn(httpRespMessage) { + var _a, _b; + const err = util.parseHttpRespMessage(httpRespMessage).err; + if ((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.retryableErrorFn) { + return err && ((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.retryableErrorFn(err)); + } + return err && util.shouldRetryRequest(err); }, + maxRetryDelay: (_c = config.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetryDelay, + retryDelayMultiplier: (_d = config.retryOptions) === null || _d === void 0 ? void 0 : _d.retryDelayMultiplier, + totalTimeout: (_e = config.retryOptions) === null || _e === void 0 ? void 0 : _e.totalTimeout, }; - this.interceptors.push(this.encryptionKeyInterceptor); - return this; - } - /** - * Gets a reference to a Cloud Storage {@link File} file from the provided URL in string format. - * @param {string} publicUrlOrGsUrl the URL as a string. Must be of the format gs://bucket/file - * or https://storage.googleapis.com/bucket/file. - * @param {Storage} storageInstance an instance of a Storage object. - * @param {FileOptions} [options] Configuration options - * @returns {File} - */ - static from(publicUrlOrGsUrl, storageInstance, options) { - const gsMatches = [...publicUrlOrGsUrl.matchAll(GS_UTIL_URL_REGEX)]; - const httpsMatches = [...publicUrlOrGsUrl.matchAll(HTTPS_PUBLIC_URL_REGEX)]; - if (gsMatches.length > 0) { - const bucket = new bucket_js_1.Bucket(storageInstance, gsMatches[0][2]); - return new File(bucket, gsMatches[0][3], options); + if (typeof reqOpts.maxRetries === 'number') { + options.retries = reqOpts.maxRetries; + options.noResponseRetries = reqOpts.maxRetries; } - else if (httpsMatches.length > 0) { - const bucket = new bucket_js_1.Bucket(storageInstance, httpsMatches[0][3]); - return new File(bucket, httpsMatches[0][4], options); + if (!config.stream) { + return (0, retry_request_1.default)(reqOpts, options, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (err, response, body) => { + util.handleResp(err, response, body, callback); + }); + } + const dup = config.stream; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let requestStream; + const isGetRequest = (reqOpts.method || 'GET').toUpperCase() === 'GET'; + if (isGetRequest) { + requestStream = (0, retry_request_1.default)(reqOpts, options); + dup.setReadable(requestStream); } else { - throw new Error('URL string must be of format gs://bucket/file or https://storage.googleapis.com/bucket/file'); + // Streaming writable HTTP requests cannot be retried. + requestStream = options.request(reqOpts); + dup.setWritable(requestStream); } + // Replay the Request events back to the stream. + requestStream + .on('error', dup.destroy.bind(dup)) + .on('response', dup.emit.bind(dup, 'response')) + .on('complete', dup.emit.bind(dup, 'complete')); + dup.abort = requestStream.abort; + return dup; } - get(optionsOrCallback, cb) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - super - .get(options) - .then(resp => cb(null, ...resp)) - .catch(cb); - } - /** - * @typedef {array} GetExpirationDateResponse - * @property {date} 0 A Date object representing the earliest time this file's - * retention policy will expire. - */ - /** - * @callback GetExpirationDateCallback - * @param {?Error} err Request error, if any. - * @param {date} expirationDate A Date object representing the earliest time - * this file's retention policy will expire. - */ /** - * If this bucket has a retention policy defined, use this method to get a - * Date object representing the earliest time this file will expire. - * - * @param {GetExpirationDateCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const storage = require('@google-cloud/storage')(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); + * Decorate the options about to be made in a request. * - * file.getExpirationDate(function(err, expirationDate) { - * // expirationDate is a Date object. - * }); - * ``` + * @param {object} reqOpts - The options to be passed to `request`. + * @param {string} projectId - The project ID. + * @return {object} reqOpts - The decorated reqOpts. */ - getExpirationDate(callback) { - this.getMetadata((err, metadata, apiResponse) => { - if (err) { - callback(err, null, apiResponse); - return; + decorateRequest(reqOpts, projectId) { + delete reqOpts.autoPaginate; + delete reqOpts.autoPaginateVal; + delete reqOpts.objectMode; + if (reqOpts.qs !== null && typeof reqOpts.qs === 'object') { + delete reqOpts.qs.autoPaginate; + delete reqOpts.qs.autoPaginateVal; + reqOpts.qs = (0, projectify_1.replaceProjectIdToken)(reqOpts.qs, projectId); + } + if (Array.isArray(reqOpts.multipart)) { + reqOpts.multipart = reqOpts.multipart.map(part => { + return (0, projectify_1.replaceProjectIdToken)(part, projectId); + }); + } + if (reqOpts.json !== null && typeof reqOpts.json === 'object') { + delete reqOpts.json.autoPaginate; + delete reqOpts.json.autoPaginateVal; + reqOpts.json = (0, projectify_1.replaceProjectIdToken)(reqOpts.json, projectId); + } + reqOpts.uri = (0, projectify_1.replaceProjectIdToken)(reqOpts.uri, projectId); + return reqOpts; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + isCustomType(unknown, module) { + function getConstructorName(obj) { + return obj.constructor && obj.constructor.name.toLowerCase(); + } + const moduleNameParts = module.split('/'); + const parentModuleName = moduleNameParts[0] && moduleNameParts[0].toLowerCase(); + const subModuleName = moduleNameParts[1] && moduleNameParts[1].toLowerCase(); + if (subModuleName && getConstructorName(unknown) !== subModuleName) { + return false; + } + let walkingModule = unknown; + // eslint-disable-next-line no-constant-condition + while (true) { + if (getConstructorName(walkingModule) === parentModuleName) { + return true; } - if (!metadata.retentionExpirationTime) { - const error = new Error(FileExceptionMessages.EXPIRATION_TIME_NA); - callback(error, null, apiResponse); - return; + walkingModule = walkingModule.parent; + if (!walkingModule) { + return false; } - callback(null, new Date(metadata.retentionExpirationTime), apiResponse); - }); + } } /** - * @typedef {array} GenerateSignedPostPolicyV2Response - * @property {object} 0 The document policy. - */ - /** - * @callback GenerateSignedPostPolicyV2Callback - * @param {?Error} err Request error, if any. - * @param {object} policy The document policy. - */ - /** - * Get a signed policy document to allow a user to upload data with a POST - * request. - * - * In Google Cloud Platform environments, such as Cloud Functions and App - * Engine, you usually don't provide a `keyFilename` or `credentials` during - * instantiation. In those environments, we call the - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} - * to create a signed policy. That API requires either the - * `https://www.googleapis.com/auth/iam` or - * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are - * enabled. - * - * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-v2| POST Object with the V2 signing process} - * - * @throws {Error} If an expiration timestamp from the past is given. - * @throws {Error} If options.equals has an array with less or more than two - * members. - * @throws {Error} If options.startsWith has an array with less or more than two - * members. - * - * @param {object} options Configuration options. - * @param {array|array[]} [options.equals] Array of request parameters and - * their expected value (e.g. [['$', '']]). Values are - * translated into equality constraints in the conditions field of the - * policy document (e.g. ['eq', '$', '']). If only one - * equality condition is to be specified, options.equals can be a one- - * dimensional array (e.g. ['$', '']). - * @param {*} options.expires - A timestamp when this policy will expire. Any - * value given is passed to `new Date()`. - * @param {array|array[]} [options.startsWith] Array of request parameters and - * their expected prefixes (e.g. [['$', '']). Values are - * translated into starts-with constraints in the conditions field of the - * policy document (e.g. ['starts-with', '$', '']). If only - * one prefix condition is to be specified, options.startsWith can be a - * one- dimensional array (e.g. ['$', '']). - * @param {string} [options.acl] ACL for the object from possibly predefined - * ACLs. - * @param {string} [options.successRedirect] The URL to which the user client - * is redirected if the upload is successful. - * @param {string} [options.successStatus] - The status of the Google Storage - * response if the upload is successful (must be string). - * @param {object} [options.contentLengthRange] - * @param {number} [options.contentLengthRange.min] Minimum value for the - * request's content length. - * @param {number} [options.contentLengthRange.max] Maximum value for the - * request's content length. - * @param {GenerateSignedPostPolicyV2Callback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * const options = { - * equals: ['$Content-Type', 'image/jpeg'], - * expires: '10-25-2022', - * contentLengthRange: { - * min: 0, - * max: 1024 - * } - * }; - * - * file.generateSignedPostPolicyV2(options, function(err, policy) { - * // policy.string: the policy document in plain text. - * // policy.base64: the policy document in base64. - * // policy.signature: the policy signature in base64. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.generateSignedPostPolicyV2(options).then(function(data) { - * const policy = data[0]; - * }); - * ``` + * Given two parameters, figure out if this is either: + * - Just a callback function + * - An options object, and then a callback function + * @param optionsOrCallback An options object or callback. + * @param cb A potentially undefined callback. */ - generateSignedPostPolicyV2(optionsOrCallback, cb) { - const args = (0, util_js_2.normalize)(optionsOrCallback, cb); - let options = args.options; - const callback = args.callback; - const expires = new Date(options.expires); - if (isNaN(expires.getTime())) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); - } - if (expires.valueOf() < Date.now()) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); + maybeOptionsOrCallback(optionsOrCallback, cb) { + return typeof optionsOrCallback === 'function' + ? [{}, optionsOrCallback] + : [optionsOrCallback, cb]; + } + _getDefaultHeaders(gcclGcsCmd) { + const headers = { + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, + }; + if (gcclGcsCmd) { + headers['x-goog-api-client'] += ` gccl-gcs-cmd/${gcclGcsCmd}`; } - options = Object.assign({}, options); - const conditions = [ - ['eq', '$key', this.name], - { - bucket: this.bucket.name, + return headers; + } +} +exports.Util = Util; +/** + * Basic Passthrough Stream that records the number of bytes read + * every time the cursor is moved. + */ +class ProgressStream extends stream_1.Transform { + constructor() { + super(...arguments); + this.bytesRead = 0; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _transform(chunk, encoding, callback) { + this.bytesRead += chunk.length; + this.emit('progress', { bytesWritten: this.bytesRead, contentLength: '*' }); + this.push(chunk); + callback(); + } +} +const util = new Util(); +exports.util = util; + + +/***/ }), + +/***/ 21178: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright 2019 Google LLC +// +// 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. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Notification = void 0; +const index_js_1 = __nccwpck_require__(4052); +const promisify_1 = __nccwpck_require__(19203); +/** + * The API-formatted resource description of the notification. + * + * Note: This is not guaranteed to be up-to-date when accessed. To get the + * latest record, call the `getMetadata()` method. + * + * @name Notification#metadata + * @type {object} + */ +/** + * A Notification object is created from your {@link Bucket} object using + * {@link Bucket#notification}. Use it to interact with Cloud Pub/Sub + * notifications. + * + * See {@link https://cloud.google.com/storage/docs/pubsub-notifications| Cloud Pub/Sub Notifications for Google Cloud Storage} + * + * @class + * @hideconstructor + * + * @param {Bucket} bucket The bucket instance this notification is attached to. + * @param {string} id The ID of the notification. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * + * const notification = myBucket.notification('1'); + * ``` + */ +class Notification extends index_js_1.ServiceObject { + constructor(bucket, id) { + const requestQueryObject = {}; + const methods = { + /** + * Creates a notification subscription for the bucket. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} + * @method Notification#create + * + * @param {Topic|string} topic The Cloud PubSub topic to which this + * subscription publishes. If the project ID is omitted, the current + * project ID will be used. + * + * Acceptable formats are: + * - `projects/grape-spaceship-123/topics/my-topic` + * + * - `my-topic` + * @param {CreateNotificationRequest} [options] Metadata to set for + * the notification. + * @param {CreateNotificationCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a valid topic is not provided. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.create(function(err, notification, apiResponse) { + * if (!err) { + * // The notification was created successfully. + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.create().then(function(data) { + * const notification = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + create: true, + /** + * @typedef {array} DeleteNotificationResponse + * @property {object} 0 The full API response. + */ + /** + * Permanently deletes a notification subscription. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/delete| Notifications: delete API Documentation} + * + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {DeleteNotificationCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.delete(function(err, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.delete().then(function(data) { + * const apiResponse = data[0]; + * }); + * + * ``` + * @example include:samples/deleteNotification.js + * region_tag:storage_delete_bucket_notification + * Another example: + */ + delete: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * Get a notification and its metadata if it exists. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} + * + * @param {object} [options] Configuration options. + * See {@link Bucket#createNotification} for create options. + * @param {boolean} [options.autoCreate] Automatically create the object if + * it does not exist. Default: `false`. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetNotificationCallback} [callback] Callback function. + * @return {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.get(function(err, notification, apiResponse) { + * // `notification.metadata` has been populated. + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.get().then(function(data) { + * const notification = data[0]; + * const apiResponse = data[1]; + * }); + * ``` + */ + get: { + reqOpts: { + qs: requestQueryObject, + }, + }, + /** + * Get the notification's metadata. + * + * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} + * + * @param {object} [options] Configuration options. + * @param {string} [options.userProject] The ID of the project which will be + * billed for the request. + * @param {GetNotificationMetadataCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.getMetadata(function(err, metadata, apiResponse) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.getMetadata().then(function(data) { + * const metadata = data[0]; + * const apiResponse = data[1]; + * }); + * + * ``` + * @example include:samples/getMetadataNotifications.js + * region_tag:storage_print_pubsub_bucket_notification + * Another example: + */ + getMetadata: { + reqOpts: { + qs: requestQueryObject, + }, }, + /** + * @typedef {array} NotificationExistsResponse + * @property {boolean} 0 Whether the notification exists or not. + */ + /** + * @callback NotificationExistsCallback + * @param {?Error} err Request error, if any. + * @param {boolean} exists Whether the notification exists or not. + */ + /** + * Check if the notification exists. + * + * @method Notification#exists + * @param {NotificationExistsCallback} [callback] Callback function. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const myBucket = storage.bucket('my-bucket'); + * const notification = myBucket.notification('1'); + * + * notification.exists(function(err, exists) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * notification.exists().then(function(data) { + * const exists = data[0]; + * }); + * ``` + */ + exists: true, + }; + super({ + parent: bucket, + baseUrl: '/notificationConfigs', + id: id.toString(), + createMethod: bucket.createNotification.bind(bucket), + methods, + }); + } +} +exports.Notification = Notification; +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Notification); + + +/***/ }), + +/***/ 42851: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2022 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +var _Upload_instances, _Upload_hashValidator, _Upload_clientCrc32c, _Upload_clientMd5Hash, _Upload_gcclGcsCmd, _Upload_resetLocalBuffersCache, _Upload_addLocalBufferCache, _Upload_validateChecksum, _Upload_applyChecksumHeaders; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Upload = exports.PROTOCOL_REGEX = void 0; +exports.upload = upload; +exports.createURI = createURI; +exports.checkUploadStatus = checkUploadStatus; +const abort_controller_1 = __importDefault(__nccwpck_require__(61659)); +const crypto_1 = __nccwpck_require__(6113); +const gaxios = __importStar(__nccwpck_require__(59555)); +const google_auth_library_1 = __nccwpck_require__(20810); +const stream_1 = __nccwpck_require__(12781); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +const uuid = __importStar(__nccwpck_require__(44458)); +const util_js_1 = __nccwpck_require__(59258); +const util_js_2 = __nccwpck_require__(38064); +const file_js_1 = __nccwpck_require__(4713); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const package_json_helper_cjs_1 = __nccwpck_require__(28568); +const hash_stream_validator_js_1 = __nccwpck_require__(40725); +const NOT_FOUND_STATUS_CODE = 404; +const RESUMABLE_INCOMPLETE_STATUS_CODE = 308; +const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); +exports.PROTOCOL_REGEX = /^(\w*):\/\//; +class Upload extends stream_1.Writable { + constructor(cfg) { + var _a; + super(cfg); + _Upload_instances.add(this); + this.numBytesWritten = 0; + this.numRetries = 0; + this.currentInvocationId = { + checkUploadStatus: uuid.v4(), + chunk: uuid.v4(), + uri: uuid.v4(), + }; + /** + * A cache of buffers written to this instance, ready for consuming + */ + this.writeBuffers = []; + this.numChunksReadInRequest = 0; + _Upload_hashValidator.set(this, void 0); + _Upload_clientCrc32c.set(this, void 0); + _Upload_clientMd5Hash.set(this, void 0); + /** + * An array of buffers used for caching the most recent upload chunk. + * We should not assume that the server received all bytes sent in the request. + * - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + */ + this.localWriteCache = []; + this.localWriteCacheByteLength = 0; + this.upstreamEnded = false; + _Upload_gcclGcsCmd.set(this, void 0); + cfg = cfg || {}; + if (!cfg.bucket || !cfg.file) { + throw new Error('A bucket and file name are required'); + } + if (cfg.offset && !cfg.uri) { + throw new RangeError('Cannot provide an `offset` without providing a `uri`'); + } + if (cfg.isPartialUpload && !cfg.chunkSize) { + throw new RangeError('Cannot set `isPartialUpload` without providing a `chunkSize`'); + } + cfg.authConfig = cfg.authConfig || {}; + cfg.authConfig.scopes = [ + 'https://www.googleapis.com/auth/devstorage.full_control', ]; - if (Array.isArray(options.equals)) { - if (!Array.isArray(options.equals[0])) { - options.equals = [options.equals]; - } - options.equals.forEach(condition => { - if (!Array.isArray(condition) || condition.length !== 2) { - throw new Error(FileExceptionMessages.EQUALS_CONDITION_TWO_ELEMENTS); + this.authClient = cfg.authClient || new google_auth_library_1.GoogleAuth(cfg.authConfig); + const universe = cfg.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; + this.apiEndpoint = `https://storage.${universe}`; + if (cfg.apiEndpoint && cfg.apiEndpoint !== this.apiEndpoint) { + this.apiEndpoint = this.sanitizeEndpoint(cfg.apiEndpoint); + const hostname = new URL(this.apiEndpoint).hostname; + // check if it is a domain of a known universe + const isDomain = hostname === universe; + const isDefaultUniverseDomain = hostname === google_auth_library_1.DEFAULT_UNIVERSE; + // check if it is a subdomain of a known universe + // by checking a last (universe's length + 1) of a hostname + const isSubDomainOfUniverse = hostname.slice(-(universe.length + 1)) === `.${universe}`; + const isSubDomainOfDefaultUniverse = hostname.slice(-(google_auth_library_1.DEFAULT_UNIVERSE.length + 1)) === + `.${google_auth_library_1.DEFAULT_UNIVERSE}`; + if (!isDomain && + !isDefaultUniverseDomain && + !isSubDomainOfUniverse && + !isSubDomainOfDefaultUniverse) { + // Check if we should use auth with custom endpoint + if (cfg.useAuthWithCustomEndpoint !== true) { + // Only bypass auth if explicitly not requested + this.authClient = gaxios; } - conditions.push(['eq', condition[0], condition[1]]); - }); - } - if (Array.isArray(options.startsWith)) { - if (!Array.isArray(options.startsWith[0])) { - options.startsWith = [options.startsWith]; + // Otherwise keep the authenticated client } - options.startsWith.forEach(condition => { - if (!Array.isArray(condition) || condition.length !== 2) { - throw new Error(FileExceptionMessages.STARTS_WITH_TWO_ELEMENTS); - } - conditions.push(['starts-with', condition[0], condition[1]]); - }); } - if (options.acl) { - conditions.push({ - acl: options.acl, - }); + this.baseURI = `${this.apiEndpoint}/upload/storage/v1/b`; + this.bucket = cfg.bucket; + const cacheKeyElements = [cfg.bucket, cfg.file]; + if (typeof cfg.generation === 'number') { + cacheKeyElements.push(`${cfg.generation}`); } - if (options.successRedirect) { - conditions.push({ - success_action_redirect: options.successRedirect, - }); + this.cacheKey = cacheKeyElements.join('/'); + this.customRequestOptions = cfg.customRequestOptions || {}; + this.file = cfg.file; + this.generation = cfg.generation; + this.kmsKeyName = cfg.kmsKeyName; + this.metadata = cfg.metadata || {}; + this.offset = cfg.offset; + this.origin = cfg.origin; + this.params = cfg.params || {}; + this.userProject = cfg.userProject; + this.chunkSize = cfg.chunkSize; + this.retryOptions = cfg.retryOptions; + this.isPartialUpload = (_a = cfg.isPartialUpload) !== null && _a !== void 0 ? _a : false; + __classPrivateFieldSet(this, _Upload_clientCrc32c, cfg.clientCrc32c, "f"); + __classPrivateFieldSet(this, _Upload_clientMd5Hash, cfg.clientMd5Hash, "f"); + const calculateCrc32c = !cfg.clientCrc32c && cfg.crc32c; + const calculateMd5 = !cfg.clientMd5Hash && cfg.md5; + if (calculateCrc32c || calculateMd5) { + __classPrivateFieldSet(this, _Upload_hashValidator, new hash_stream_validator_js_1.HashStreamValidator({ + crc32c: calculateCrc32c, + md5: calculateMd5, + updateHashesOnly: true, + }), "f"); } - if (options.successStatus) { - conditions.push({ - success_action_status: options.successStatus, - }); + if (cfg.key) { + if (typeof cfg.key === 'string') { + const base64Key = Buffer.from(cfg.key).toString('base64'); + this.encryption = { + key: base64Key, + hash: (0, crypto_1.createHash)('sha256').update(cfg.key).digest('base64'), + }; + } + else { + const base64Key = cfg.key.toString('base64'); + this.encryption = { + key: base64Key, + hash: (0, crypto_1.createHash)('sha256').update(cfg.key).digest('base64'), + }; + } } - if (options.contentLengthRange) { - const min = options.contentLengthRange.min; - const max = options.contentLengthRange.max; - if (typeof min !== 'number' || typeof max !== 'number') { - throw new Error(FileExceptionMessages.CONTENT_LENGTH_RANGE_MIN_MAX); + this.predefinedAcl = cfg.predefinedAcl; + if (cfg.private) + this.predefinedAcl = 'private'; + if (cfg.public) + this.predefinedAcl = 'publicRead'; + const autoRetry = cfg.retryOptions.autoRetry; + this.uriProvidedManually = !!cfg.uri; + this.uri = cfg.uri; + if (this.offset) { + // we're resuming an incomplete upload + this.numBytesWritten = this.offset; + } + this.numRetries = 0; // counter for number of retries currently executed + if (!autoRetry) { + cfg.retryOptions.maxRetries = 0; + } + this.timeOfFirstRequest = Date.now(); + const contentLength = cfg.metadata + ? Number(cfg.metadata.contentLength) + : NaN; + this.contentLength = isNaN(contentLength) ? '*' : contentLength; + __classPrivateFieldSet(this, _Upload_gcclGcsCmd, cfg[util_js_2.GCCL_GCS_CMD_KEY], "f"); + this.once('writing', () => { + if (this.uri) { + this.continueUploading(); + } + else { + this.createURI(err => { + if (err) { + return this.destroy(err); + } + this.startUploading(); + return; + }); } - conditions.push(['content-length-range', min, max]); - } - const policy = { - expiration: expires.toISOString(), - conditions, - }; - const policyString = JSON.stringify(policy); - const policyBase64 = Buffer.from(policyString).toString('base64'); - this.storage.authClient.sign(policyBase64, options.signingEndpoint).then(signature => { - callback(null, { - string: policyString, - base64: policyBase64, - signature, - }); - }, err => { - callback(new signer_js_1.SigningError(err.message)); }); } /** - * @typedef {object} SignedPostPolicyV4Output - * @property {string} url The request URL. - * @property {object} fields The form fields to include in the POST request. - */ - /** - * @typedef {array} GenerateSignedPostPolicyV4Response - * @property {SignedPostPolicyV4Output} 0 An object containing the request URL and form fields. + * Prevent 'finish' event until the upload has succeeded. + * + * @param fireFinishEvent The finish callback */ + _final(fireFinishEvent = () => { }) { + this.upstreamEnded = true; + this.once('uploadFinished', fireFinishEvent); + process.nextTick(() => { + this.emit('upstreamFinished'); + // it's possible `_write` may not be called - namely for empty object uploads + this.emit('writing'); + }); + } /** - * @callback GenerateSignedPostPolicyV4Callback - * @param {?Error} err Request error, if any. - * @param {SignedPostPolicyV4Output} output An object containing the request URL and form fields. + * Handles incoming data from upstream + * + * @param chunk The chunk to append to the buffer + * @param encoding The encoding of the chunk + * @param readCallback A callback for when the buffer has been read downstream */ + _write(chunk, encoding, readCallback = () => { }) { + // Backwards-compatible event + this.emit('writing'); + const bufferChunk = typeof chunk === 'string' ? Buffer.from(chunk, encoding) : chunk; + if (__classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + try { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").write(bufferChunk); + } + catch (e) { + this.destroy(e); + return; + } + } + this.writeBuffers.push(bufferChunk); + this.once('readFromChunkBuffer', readCallback); + process.nextTick(() => this.emit('wroteToChunkBuffer')); + } /** - * Get a v4 signed policy document to allow a user to upload data with a POST - * request. - * - * In Google Cloud Platform environments, such as Cloud Functions and App - * Engine, you usually don't provide a `keyFilename` or `credentials` during - * instantiation. In those environments, we call the - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} - * to create a signed policy. That API requires either the - * `https://www.googleapis.com/auth/iam` or - * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are - * enabled. - * - * See {@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument| Policy Document Reference} - * - * @param {object} options Configuration options. - * @param {Date|number|string} options.expires - A timestamp when this policy will expire. Any - * value given is passed to `new Date()`. - * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style - * URLs ('https://mybucket.storage.googleapis.com/...') instead of path-style - * ('https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instead of path-style URL. - * Currently defaults to `false` for path-style, although this may change in a - * future major-version release. - * @param {string} [config.bucketBoundHostname] The bucket-bound hostname to return in - * the result, e.g. "https://cdn.example.com". - * @param {object} [config.fields] [Form fields]{@link https://cloud.google.com/storage/docs/xml-api/post-object#policydocument} - * to include in the signed policy. Any fields with key beginning with 'x-ignore-' - * will not be included in the policy to be signed. - * @param {object[]} [config.conditions] [Conditions]{@link https://cloud.google.com/storage/docs/authentication/signatures#policy-document} - * to include in the signed policy. All fields given in `config.fields` are - * automatically included in the conditions array, adding the same entry - * in both `fields` and `conditions` will result in duplicate entries. - * - * @param {GenerateSignedPostPolicyV4Callback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * const options = { - * expires: '10-25-2022', - * conditions: [ - * ['eq', '$Content-Type', 'image/jpeg'], - * ['content-length-range', 0, 1024], - * ], - * fields: { - * acl: 'public-read', - * 'x-goog-meta-foo': 'bar', - * 'x-ignore-mykey': 'data' - * } - * }; - * - * file.generateSignedPostPolicyV4(options, function(err, response) { - * // response.url The request URL - * // response.fields The form fields (including the signature) to include - * // to be used to upload objects by HTML forms. - * }); + * Prepends the local buffer to write buffer and resets it. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.generateSignedPostPolicyV4(options).then(function(data) { - * const response = data[0]; - * // response.url The request URL - * // response.fields The form fields (including the signature) to include - * // to be used to upload objects by HTML forms. - * }); - * ``` + * @param keepLastBytes number of bytes to keep from the end of the local buffer. */ - generateSignedPostPolicyV4(optionsOrCallback, cb) { - const args = (0, util_js_2.normalize)(optionsOrCallback, cb); - let options = args.options; - const callback = args.callback; - const expires = new Date(options.expires); - if (isNaN(expires.getTime())) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); + prependLocalBufferToUpstream(keepLastBytes) { + // Typically, the upstream write buffers should be smaller than the local + // cache, so we can save time by setting the local cache as the new + // upstream write buffer array and appending the old array to it + let initialBuffers = []; + if (keepLastBytes) { + // we only want the last X bytes + let bytesKept = 0; + while (keepLastBytes > bytesKept) { + // load backwards because we want the last X bytes + // note: `localWriteCacheByteLength` is reset below + let buf = this.localWriteCache.pop(); + if (!buf) + break; + bytesKept += buf.byteLength; + if (bytesKept > keepLastBytes) { + // we have gone over the amount desired, let's keep the last X bytes + // of this buffer + const diff = bytesKept - keepLastBytes; + buf = buf.subarray(diff); + bytesKept -= diff; + } + initialBuffers.unshift(buf); + } } - if (expires.valueOf() < Date.now()) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); + else { + // we're keeping all of the local cache, simply use it as the initial buffer + initialBuffers = this.localWriteCache; } - if (expires.valueOf() - Date.now() > SEVEN_DAYS * 1000) { - throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); + // Append the old upstream to the new + const append = this.writeBuffers; + this.writeBuffers = initialBuffers; + for (const buf of append) { + this.writeBuffers.push(buf); } - options = Object.assign({}, options); - let fields = Object.assign({}, options.fields); - const now = new Date(); - const nowISO = (0, util_js_2.formatAsUTCISO)(now, true); - const todayISO = (0, util_js_2.formatAsUTCISO)(now); - const sign = async () => { - const { client_email } = await this.storage.authClient.getCredentials(); - const credential = `${client_email}/${todayISO}/auto/storage/goog4_request`; - fields = { - ...fields, - bucket: this.bucket.name, - key: this.name, - 'x-goog-date': nowISO, - 'x-goog-credential': credential, - 'x-goog-algorithm': 'GOOG4-RSA-SHA256', - }; - const conditions = options.conditions || []; - Object.entries(fields).forEach(([key, value]) => { - if (!key.startsWith('x-ignore-')) { - conditions.push({ [key]: value }); - } - }); - delete fields.bucket; - const expiration = (0, util_js_2.formatAsUTCISO)(expires, true, '-', ':'); - const policy = { - conditions, - expiration, - }; - const policyString = (0, util_js_2.unicodeJSONStringify)(policy); - const policyBase64 = Buffer.from(policyString).toString('base64'); - try { - const signature = await this.storage.authClient.sign(policyBase64, options.signingEndpoint); - const signatureHex = Buffer.from(signature, 'base64').toString('hex'); - const universe = this.parent.storage.universeDomain; - fields['policy'] = policyBase64; - fields['x-goog-signature'] = signatureHex; - let url; - if (this.storage.customEndpoint) { - url = this.storage.apiEndpoint; - } - else if (options.virtualHostedStyle) { - url = `https://${this.bucket.name}.storage.${universe}/`; - } - else if (options.bucketBoundHostname) { - url = `${options.bucketBoundHostname}/`; - } - else { - url = `https://storage.${universe}/${this.bucket.name}/`; - } - return { - url, - fields, - }; - } - catch (err) { - throw new signer_js_1.SigningError(err.message); - } - }; - sign().then(res => callback(null, res), callback); + // reset last buffers sent + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); } /** - * @typedef {array} GetSignedUrlResponse - * @property {object} 0 The signed URL. + * Retrieves data from upstream's buffer. + * + * @param limit The maximum amount to return from the buffer. */ + *pullFromChunkBuffer(limit) { + while (limit) { + const buf = this.writeBuffers.shift(); + if (!buf) + break; + let bufToYield = buf; + if (buf.byteLength > limit) { + bufToYield = buf.subarray(0, limit); + this.writeBuffers.unshift(buf.subarray(limit)); + limit = 0; + } + else { + limit -= buf.byteLength; + } + yield bufToYield; + // Notify upstream we've read from the buffer and we're able to consume + // more. It can also potentially send more data down as we're currently + // iterating. + this.emit('readFromChunkBuffer'); + } + } /** - * @callback GetSignedUrlCallback - * @param {?Error} err Request error, if any. - * @param {object} url The signed URL. + * A handler for determining if data is ready to be read from upstream. + * + * @returns If there will be more chunks to read in the future */ + async waitForNextChunk() { + const willBeMoreChunks = await new Promise(resolve => { + // There's data available - it should be digested + if (this.writeBuffers.length) { + return resolve(true); + } + // The upstream writable ended, we shouldn't expect any more data. + if (this.upstreamEnded) { + return resolve(false); + } + // Nothing immediate seems to be determined. We need to prepare some + // listeners to determine next steps... + const wroteToChunkBufferCallback = () => { + removeListeners(); + return resolve(true); + }; + const upstreamFinishedCallback = () => { + removeListeners(); + // this should be the last chunk, if there's anything there + if (this.writeBuffers.length) + return resolve(true); + return resolve(false); + }; + // Remove listeners when we're ready to callback. + const removeListeners = () => { + this.removeListener('wroteToChunkBuffer', wroteToChunkBufferCallback); + this.removeListener('upstreamFinished', upstreamFinishedCallback); + }; + // If there's data recently written it should be digested + this.once('wroteToChunkBuffer', wroteToChunkBufferCallback); + // If the upstream finishes let's see if there's anything to grab + this.once('upstreamFinished', upstreamFinishedCallback); + }); + return willBeMoreChunks; + } /** - * Get a signed URL to allow limited time access to the file. - * - * In Google Cloud Platform environments, such as Cloud Functions and App - * Engine, you usually don't provide a `keyFilename` or `credentials` during - * instantiation. In those environments, we call the - * {@link https://cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob| signBlob API} - * to create a signed URL. That API requires either the - * `https://www.googleapis.com/auth/iam` or - * `https://www.googleapis.com/auth/cloud-platform` scope, so be sure they are - * enabled. - * - * See {@link https://cloud.google.com/storage/docs/access-control/signed-urls| Signed URLs Reference} - * - * @throws {Error} if an expiration timestamp from the past is given. - * - * @param {object} config Configuration object. - * @param {string} config.action "read" (HTTP: GET), "write" (HTTP: PUT), or - * "delete" (HTTP: DELETE), "resumable" (HTTP: POST). - * When using "resumable", the header `X-Goog-Resumable: start` has - * to be sent when making a request with the signed URL. - * @param {*} config.expires A timestamp when this link will expire. Any value - * given is passed to `new Date()`. - * Note: 'v4' supports maximum duration of 7 days (604800 seconds) from now. - * See [reference]{@link https://cloud.google.com/storage/docs/access-control/signed-urls#example} - * @param {string} [config.version='v2'] The signing version to use, either - * 'v2' or 'v4'. - * @param {boolean} [config.virtualHostedStyle=false] Use virtual hosted-style - * URLs (e.g. 'https://mybucket.storage.googleapis.com/...') instead of path-style - * (e.g. 'https://storage.googleapis.com/mybucket/...'). Virtual hosted-style URLs - * should generally be preferred instaed of path-style URL. - * Currently defaults to `false` for path-style, although this may change in a - * future major-version release. - * @param {string} [config.cname] The cname for this bucket, i.e., - * "https://cdn.example.com". - * @param {string} [config.contentMd5] The MD5 digest value in base64. Just like - * if you provide this, the client must provide this HTTP header with this same - * value in its request, so to if this parameter is not provided here, - * the client must not provide any value for this HTTP header in its request. - * @param {string} [config.contentType] Just like if you provide this, the client - * must provide this HTTP header with this same value in its request, so to if - * this parameter is not provided here, the client must not provide any value - * for this HTTP header in its request. - * @param {object} [config.extensionHeaders] If these headers are used, the - * server will check to make sure that the client provides matching - * values. See {@link https://cloud.google.com/storage/docs/access-control/signed-urls#about-canonical-extension-headers| Canonical extension headers} - * for the requirements of this feature, most notably: - * - The header name must be prefixed with `x-goog-` - * - The header name must be all lowercase - * - * Note: Multi-valued header passed as an array in the extensionHeaders - * object is converted into a string, delimited by `,` with - * no space. Requests made using the signed URL will need to - * delimit multi-valued headers using a single `,` as well, or - * else the server will report a mismatched signature. - * @param {object} [config.queryParams] Additional query parameters to include - * in the signed URL. - * @param {string} [config.promptSaveAs] The filename to prompt the user to - * save the file as when the signed url is accessed. This is ignored if - * `config.responseDisposition` is set. - * @param {string} [config.responseDisposition] The - * {@link http://goo.gl/yMWxQV| response-content-disposition parameter} of the - * signed url. - * @param {*} [config.accessibleAt=Date.now()] A timestamp when this link became usable. Any value - * given is passed to `new Date()`. - * Note: Use for 'v4' only. - * @param {string} [config.responseType] The response-content-type parameter - * of the signed url. - * @param {GetSignedUrlCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Generate a URL that allows temporary access to download your file. - * //- - * const request = require('request'); - * - * const config = { - * action: 'read', - * expires: '03-17-2025', - * }; - * - * file.getSignedUrl(config, function(err, url) { - * if (err) { - * console.error(err); - * return; - * } - * - * // The file is now available to read from this URL. - * request(url, function(err, resp) { - * // resp.statusCode = 200 - * }); - * }); - * - * //- - * // Generate a URL that allows temporary access to download your file. - * // Access will begin at accessibleAt and end at expires. - * //- - * const request = require('request'); - * - * const config = { - * action: 'read', - * expires: '03-17-2025', - * accessibleAt: '03-13-2025' - * }; - * - * file.getSignedUrl(config, function(err, url) { - * if (err) { - * console.error(err); - * return; - * } - * - * // The file will be available to read from this URL from 03-13-2025 to 03-17-2025. - * request(url, function(err, resp) { - * // resp.statusCode = 200 - * }); - * }); - * - * //- - * // Generate a URL to allow write permissions. This means anyone with this - * URL - * // can send a POST request with new data that will overwrite the file. - * //- - * file.getSignedUrl({ - * action: 'write', - * expires: '03-17-2025' - * }, function(err, url) { - * if (err) { - * console.error(err); - * return; - * } - * - * // The file is now available to be written to. - * const writeStream = request.put(url); - * writeStream.end('New data'); - * - * writeStream.on('complete', function(resp) { - * // Confirm the new content was saved. - * file.download(function(err, fileContents) { - * console.log('Contents:', fileContents.toString()); - * // Contents: New data - * }); - * }); - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.getSignedUrl(config).then(function(data) { - * const url = data[0]; - * }); + * Reads data from upstream up to the provided `limit`. + * Ends when the limit has reached or no data is expected to be pushed from upstream. * - * ``` - * @example include:samples/files.js - * region_tag:storage_generate_signed_url - * Another example: + * @param limit The most amount of data this iterator should return. `Infinity` by default. */ - getSignedUrl(cfg, callback) { - const method = ActionToHTTPMethod[cfg.action]; - const extensionHeaders = (0, util_js_2.objectKeyToLowercase)(cfg.extensionHeaders || {}); - if (cfg.action === 'resumable') { - extensionHeaders['x-goog-resumable'] = 'start'; + async *upstreamIterator(limit = Infinity) { + // read from upstream chunk buffer + while (limit && (await this.waitForNextChunk())) { + // read until end or limit has been reached + for (const chunk of this.pullFromChunkBuffer(limit)) { + limit -= chunk.byteLength; + yield chunk; + } } - const queryParams = Object.assign({}, cfg.queryParams); - if (typeof cfg.responseType === 'string') { - queryParams['response-content-type'] = cfg.responseType; + } + createURI(callback) { + if (!callback) { + return this.createURIAsync(); } - if (typeof cfg.promptSaveAs === 'string') { - queryParams['response-content-disposition'] = - 'attachment; filename="' + cfg.promptSaveAs + '"'; + this.createURIAsync().then(r => callback(null, r), callback); + } + async createURIAsync() { + const metadata = { ...this.metadata }; + const headers = {}; + // Delete content length and content type from metadata if they exist. + // These are headers and should not be sent as part of the metadata. + if (metadata.contentLength) { + headers['X-Upload-Content-Length'] = metadata.contentLength.toString(); + delete metadata.contentLength; } - if (typeof cfg.responseDisposition === 'string') { - queryParams['response-content-disposition'] = cfg.responseDisposition; + if (metadata.contentType) { + headers['X-Upload-Content-Type'] = metadata.contentType; + delete metadata.contentType; } - if (this.generation) { - queryParams['generation'] = this.generation.toString(); + let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.uri}`; + if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { + googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; } - const signConfig = { - method, - expires: cfg.expires, - accessibleAt: cfg.accessibleAt, - extensionHeaders, - queryParams, - contentMd5: cfg.contentMd5, - contentType: cfg.contentType, - host: cfg.host, + // Check if headers already exist before creating new ones + const reqOpts = { + method: 'POST', + url: [this.baseURI, this.bucket, 'o'].join('/'), + params: Object.assign({ + name: this.file, + uploadType: 'resumable', + }, this.params), + data: metadata, + headers: { + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': googAPIClient, + ...headers, + }, }; - if (cfg.cname) { - signConfig.cname = cfg.cname; + if (metadata.contentLength) { + reqOpts.headers['X-Upload-Content-Length'] = + metadata.contentLength.toString(); } - if (cfg.version) { - signConfig.version = cfg.version; + if (metadata.contentType) { + reqOpts.headers['X-Upload-Content-Type'] = metadata.contentType; } - if (cfg.virtualHostedStyle) { - signConfig.virtualHostedStyle = cfg.virtualHostedStyle; + if (typeof this.generation !== 'undefined') { + reqOpts.params.ifGenerationMatch = this.generation; } - if (!this.signer) { - this.signer = new signer_js_1.URLSigner(this.storage.authClient, this.bucket, this, this.storage); + if (this.kmsKeyName) { + reqOpts.params.kmsKeyName = this.kmsKeyName; } - this.signer - .getSignedUrl(signConfig) - .then(signedUrl => callback(null, signedUrl), callback); - } - /** - * @callback IsPublicCallback - * @param {?Error} err Request error, if any. - * @param {boolean} resp Whether file is public or not. - */ - /** - * @typedef {array} IsPublicResponse - * @property {boolean} 0 Whether file is public or not. - */ - /** - * Check whether this file is public or not by sending - * a HEAD request without credentials. - * No errors from the server indicates that the current - * file is public. - * A 403-Forbidden error {@link https://cloud.google.com/storage/docs/json_api/v1/status-codes#403_Forbidden} - * indicates that file is private. - * Any other non 403 error is propagated to user. - * - * @param {IsPublicCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Check whether the file is publicly accessible. - * //- - * file.isPublic(function(err, resp) { - * if (err) { - * console.error(err); - * return; - * } - * console.log(`the file ${file.id} is public: ${resp}`) ; - * }) - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.isPublic().then(function(data) { - * const resp = data[0]; - * }); - * ``` - */ - isPublic(callback) { - var _a; - // Build any custom headers based on the defined interceptors on the parent - // storage object and this object - const storageInterceptors = ((_a = this.storage) === null || _a === void 0 ? void 0 : _a.interceptors) || []; - const fileInterceptors = this.interceptors || []; - const allInterceptors = storageInterceptors.concat(fileInterceptors); - const headers = allInterceptors.reduce((acc, curInterceptor) => { - const currentHeaders = curInterceptor.request({ - uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, - }); - Object.assign(acc, currentHeaders.headers); - return acc; - }, {}); - index_js_1.util.makeRequest({ - method: 'GET', - uri: `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`, - headers, - }, { - retryOptions: this.storage.retryOptions, - }, (err) => { - if (err) { - const apiError = err; - if (apiError.code === 403) { - callback(null, false); + if (this.predefinedAcl) { + reqOpts.params.predefinedAcl = this.predefinedAcl; + } + if (this.origin) { + reqOpts.headers.Origin = this.origin; + } + const uri = await (0, async_retry_1.default)(async (bail) => { + var _a, _b, _c; + try { + const res = await this.makeRequest(reqOpts); + // We have successfully got a URI we can now create a new invocation id + this.currentInvocationId.uri = uuid.v4(); + return res.headers.location; + } + catch (err) { + const e = err; + const apiError = { + code: (_a = e.response) === null || _a === void 0 ? void 0 : _a.status, + name: (_b = e.response) === null || _b === void 0 ? void 0 : _b.statusText, + message: (_c = e.response) === null || _c === void 0 ? void 0 : _c.statusText, + errors: [ + { + reason: e.code, + }, + ], + }; + if (this.retryOptions.maxRetries > 0 && + this.retryOptions.retryableErrorFn(apiError)) { + throw e; } else { - callback(err); + return bail(e); } } - else { - callback(null, true); - } + }, { + retries: this.retryOptions.maxRetries, + factor: this.retryOptions.retryDelayMultiplier, + maxTimeout: this.retryOptions.maxRetryDelay * 1000, //convert to milliseconds + maxRetryTime: this.retryOptions.totalTimeout * 1000, //convert to milliseconds }); + this.uri = uri; + this.offset = 0; + // emit the newly generated URI for future reuse, if necessary. + this.emit('uri', uri); + return uri; } - /** - * @typedef {object} MakeFilePrivateOptions Configuration options for File#makePrivate(). - * @property {Metadata} [metadata] Define custom metadata properties to define - * along with the operation. - * @property {boolean} [strict] If true, set the file to be private to - * only the owner user. Otherwise, it will be private to the project. - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @callback MakeFilePrivateCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} MakeFilePrivateResponse - * @property {object} 0 The full API response. - */ - /** - * Make a file private to the project and remove all other permissions. - * Set `options.strict` to true to make the file private to only the owner. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/patch| Objects: patch API Documentation} - * - * @param {MakeFilePrivateOptions} [options] Configuration options. - * @param {MakeFilePrivateCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * //- - * // Set the file private so only project maintainers can see and modify it. - * //- - * file.makePrivate(function(err) {}); - * - * //- - * // Set the file private so only the owner can see and modify it. - * //- - * file.makePrivate({ strict: true }, function(err) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.makePrivate().then(function(data) { - * const apiResponse = data[0]; - * }); - * ``` - */ - makePrivate(optionsOrCallback, callback) { - var _a, _b; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const query = { - predefinedAcl: options.strict ? 'private' : 'projectPrivate', - // eslint-disable-next-line @typescript-eslint/no-explicit-any - }; - if (((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifMetagenerationMatch) !== undefined) { - query.ifMetagenerationMatch = - (_b = options.preconditionOpts) === null || _b === void 0 ? void 0 : _b.ifMetagenerationMatch; - delete options.preconditionOpts; + async continueUploading() { + var _a; + (_a = this.offset) !== null && _a !== void 0 ? _a : (await this.getAndSetOffset()); + return this.startUploading(); + } + async startUploading() { + const multiChunkMode = !!this.chunkSize; + let responseReceived = false; + this.numChunksReadInRequest = 0; + if (!this.offset) { + this.offset = 0; } - if (options.userProject) { - query.userProject = options.userProject; + // Check if the offset (server) is too far behind the current stream + if (this.offset < this.numBytesWritten) { + const delta = this.numBytesWritten - this.offset; + const message = `The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${delta} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`; + this.emit('error', new RangeError(message)); + return; } - // You aren't allowed to set both predefinedAcl & acl properties on a file, - // so acl must explicitly be nullified, destroying all previous acls on the - // file. - const metadata = { ...options.metadata, acl: null }; - this.setMetadata(metadata, query, callback); - } - /** - * @typedef {array} MakeFilePublicResponse - * @property {object} 0 The full API response. - */ - /** - * @callback MakeFilePublicCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Set a file to be publicly readable and maintain all previous permissions. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert| ObjectAccessControls: insert API Documentation} - * - * @param {MakeFilePublicCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * - * file.makePublic(function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.makePublic().then(function(data) { - * const apiResponse = data[0]; - * }); - * - * ``` - * @example include:samples/files.js - * region_tag:storage_make_public - * Another example: - */ - makePublic(callback) { - callback = callback || index_js_1.util.noop; - this.acl.add({ - entity: 'allUsers', - role: 'READER', - }, (err, acl, resp) => { - callback(err, resp); - }); - } - /** - * The public URL of this File - * Use {@link File#makePublic} to enable anonymous access via the returned URL. - * - * @returns {string} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const file = bucket.file('my-file'); - * - * // publicUrl will be "https://storage.googleapis.com/albums/my-file" - * const publicUrl = file.publicUrl(); - * ``` - */ - publicUrl() { - return `${this.storage.apiEndpoint}/${this.bucket.name}/${encodeURIComponent(this.name)}`; - } - /** - * @typedef {array} MoveResponse - * @property {File} 0 The destination File. - * @property {object} 1 The full API response. - */ - /** - * @callback MoveCallback - * @param {?Error} err Request error, if any. - * @param {?File} destinationFile The destination File. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {object} MoveOptions Configuration options for File#move(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * Move this file to another location. By default, this will rename the file - * and keep it in the same bucket, but you can choose to move it to another - * Bucket by providing a Bucket or File object or a URL beginning with - * "gs://". - * - * **Warning**: - * There is currently no atomic `move` method in the Cloud Storage API, - * so this method is a composition of {@link File#copy} (to the new - * location) and {@link File#delete} (from the old location). While - * unlikely, it is possible that an error returned to your callback could be - * triggered from either one of these API calls failing, which could leave a - * duplicate file lingering. The error message will indicate what operation - * has failed. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/objects/copy| Objects: copy API Documentation} - * - * @throws {Error} If the destination file is not provided. - * - * @param {string|Bucket|File} destination Destination file. - * @param {MoveCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * //- - * // You can pass in a variety of types for the destination. - * // - * // For all of the below examples, assume we are working with the following - * // Bucket and File objects. - * //- - * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('my-image.png'); - * - * //- - * // If you pass in a string for the destination, the file is moved to its - * // current bucket, under the new name provided. - * //- - * file.move('my-image-new.png', function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // but contains instead: - * // - "my-image-new.png" - * - * // `destinationFile` is an instance of a File object that refers to your - * // new file. - * }); - * - * //- - * // If you pass in a string starting with "gs://" for the destination, the - * // file is copied to the other bucket and under the new name provided. - * //- - * const newLocation = 'gs://another-bucket/my-image-new.png'; - * file.move(newLocation, function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image-new.png" - * - * // `destinationFile` is an instance of a File object that refers to your - * // new file. - * }); - * - * //- - * // If you pass in a Bucket object, the file will be moved to that bucket - * // using the same name. - * //- - * const anotherBucket = gcs.bucket('another-bucket'); - * - * file.move(anotherBucket, function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-image.png" - * - * // `destinationFile` is an instance of a File object that refers to your - * // new file. - * }); - * - * //- - * // If you pass in a File object, you have complete control over the new - * // bucket and filename. - * //- - * const anotherFile = anotherBucket.file('my-awesome-image.png'); - * - * file.move(anotherFile, function(err, destinationFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // - * // `another-bucket` now contains: - * // - "my-awesome-image.png" - * - * // Note: - * // The `destinationFile` parameter is equal to `anotherFile`. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.move('my-image-new.png').then(function(data) { - * const destinationFile = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/files.js - * region_tag:storage_move_file - * Another example: - */ - move(destination, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - callback = callback || index_js_1.util.noop; - this.copy(destination, options, (err, destinationFile, copyApiResponse) => { - if (err) { - err.message = 'file#copy failed with an error - ' + err.message; - callback(err, null, copyApiResponse); - return; + // Check if we should 'fast-forward' to the relevant data to upload + if (this.numBytesWritten < this.offset) { + // 'fast-forward' to the byte where we need to upload. + // only push data from the byte after the one we left off on + const fastForwardBytes = this.offset - this.numBytesWritten; + for await (const _chunk of this.upstreamIterator(fastForwardBytes)) { + _chunk; // discard the data up until the point we want } - if (this.name !== destinationFile.name || - this.bucket.name !== destinationFile.bucket.name) { - this.delete(options, (err, apiResponse) => { - if (err) { - err.message = 'file#delete failed with an error - ' + err.message; - callback(err, destinationFile, apiResponse); - return; + this.numBytesWritten = this.offset; + } + let expectedUploadSize = undefined; + // Set `expectedUploadSize` to `contentLength - this.numBytesWritten`, if available + if (typeof this.contentLength === 'number') { + expectedUploadSize = this.contentLength - this.numBytesWritten; + } + // `expectedUploadSize` should be no more than the `chunkSize`. + // It's possible this is the last chunk request for a multiple + // chunk upload, thus smaller than the chunk size. + if (this.chunkSize) { + expectedUploadSize = expectedUploadSize + ? Math.min(this.chunkSize, expectedUploadSize) + : this.chunkSize; + } + // A queue for the upstream data + const upstreamQueue = this.upstreamIterator(expectedUploadSize); + // The primary read stream for this request. This stream retrieves no more + // than the exact requested amount from upstream. + const requestStream = new stream_1.Readable({ + read: async () => { + // Don't attempt to retrieve data upstream if we already have a response + if (responseReceived) + requestStream.push(null); + const result = await upstreamQueue.next(); + if (result.value) { + this.numChunksReadInRequest++; + if (multiChunkMode) { + // save ever buffer used in the request in multi-chunk mode + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); } - callback(null, destinationFile, copyApiResponse); + else { + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); + } + this.numBytesWritten += result.value.byteLength; + this.emit('progress', { + bytesWritten: this.numBytesWritten, + contentLength: this.contentLength, + }); + requestStream.push(result.value); + } + if (result.done) { + requestStream.push(null); + } + }, + }); + let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.chunk}`; + if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { + googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + } + const headers = { + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': googAPIClient, + }; + // If using multiple chunk upload, set appropriate header + if (multiChunkMode) { + // We need to know how much data is available upstream to set the `Content-Range` header. + // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + for await (const chunk of this.upstreamIterator(expectedUploadSize)) { + // This will conveniently track and keep the size of the buffers. + // We will reach either the expected upload size or the remainder of the stream. + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, chunk); + } + // This is the sum from the `#addLocalBufferCache` calls + const bytesToUpload = this.localWriteCacheByteLength; + // Important: we want to know if the upstream has ended and the queue is empty before + // unshifting data back into the queue. This way we will know if this is the last request or not. + const isLastChunkOfUpload = !(await this.waitForNextChunk()); + if (isLastChunkOfUpload && __classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").end(); + } + // Important: put the data back in the queue for the actual upload + this.prependLocalBufferToUpstream(); + let totalObjectSize = this.contentLength; + if (typeof this.contentLength !== 'number' && + isLastChunkOfUpload && + !this.isPartialUpload) { + // Let's let the server know this is the last chunk of the object since we didn't set it before. + totalObjectSize = bytesToUpload + this.numBytesWritten; + } + // `- 1` as the ending byte is inclusive in the request. + const endingByte = bytesToUpload + this.numBytesWritten - 1; + // `Content-Length` for multiple chunk uploads is the size of the chunk, + // not the overall object + headers['Content-Length'] = bytesToUpload; + headers['Content-Range'] = + `bytes ${this.offset}-${endingByte}/${totalObjectSize}`; + // Apply X-Goog-Hash header ONLY on the final chunk (WriteObject call) + if (isLastChunkOfUpload) { + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_applyChecksumHeaders).call(this, headers); + } + } + else { + headers['Content-Range'] = `bytes ${this.offset}-*/${this.contentLength}`; + if (__classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").end(); + } + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_applyChecksumHeaders).call(this, headers); + } + const reqOpts = { + method: 'PUT', + url: this.uri, + headers, + body: requestStream, + }; + try { + const resp = await this.makeRequestStream(reqOpts); + if (resp) { + responseReceived = true; + await this.responseHandler(resp); + } + } + catch (e) { + const err = e; + if (this.retryOptions.retryableErrorFn(err)) { + this.attemptDelayedRetry({ + status: NaN, + data: err, }); + return; + } + this.destroy(err); + } + } + // Process the API response to look for errors that came in + // the response body. + async responseHandler(resp) { + var _a, _b; + if (resp.data.error) { + this.destroy(resp.data.error); + return; + } + // At this point we can safely create a new id for the chunk + this.currentInvocationId.chunk = uuid.v4(); + const moreDataToUpload = await this.waitForNextChunk(); + const shouldContinueWithNextMultiChunkRequest = this.chunkSize && + resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && + resp.headers.range && + moreDataToUpload; + /** + * This is true when we're expecting to upload more data in a future request, + * yet the upstream for the upload session has been exhausted. + */ + const shouldContinueUploadInAnotherRequest = this.isPartialUpload && + resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && + !moreDataToUpload; + if (shouldContinueWithNextMultiChunkRequest) { + // Use the upper value in this header to determine where to start the next chunk. + // We should not assume that the server received all bytes sent in the request. + // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + const range = resp.headers.range; + this.offset = Number(range.split('-')[1]) + 1; + // We should not assume that the server received all bytes sent in the request. + // - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload + const missingBytes = this.numBytesWritten - this.offset; + if (missingBytes) { + // As multi-chunk uploads send one chunk per request and pulls one + // chunk into the pipeline, prepending the missing bytes back should + // be fine for the next request. + this.prependLocalBufferToUpstream(missingBytes); + this.numBytesWritten -= missingBytes; } else { - callback(null, destinationFile, copyApiResponse); + // No bytes missing - no need to keep the local cache + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); } - }); + // continue uploading next chunk + this.continueUploading(); + } + else if (!this.isSuccessfulResponse(resp.status) && + !shouldContinueUploadInAnotherRequest) { + const err = new Error('Upload failed'); + err.code = resp.status; + err.name = 'Upload failed'; + if (resp === null || resp === void 0 ? void 0 : resp.data) { + err.errors = [resp === null || resp === void 0 ? void 0 : resp.data]; + } + this.destroy(err); + } + else if (this.isSuccessfulResponse(resp.status)) { + const serverCrc32c = resp.data.crc32c; + const serverMd5 = resp.data.md5Hash; + if (__classPrivateFieldGet(this, _Upload_hashValidator, "f")) { + __classPrivateFieldGet(this, _Upload_hashValidator, "f").end(); + } + const clientCrc32cToValidate = ((_a = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _a === void 0 ? void 0 : _a.crc32c) || __classPrivateFieldGet(this, _Upload_clientCrc32c, "f"); + const clientMd5HashToValidate = ((_b = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _b === void 0 ? void 0 : _b.md5Digest) || __classPrivateFieldGet(this, _Upload_clientMd5Hash, "f"); + if (__classPrivateFieldGet(this, _Upload_instances, "m", _Upload_validateChecksum).call(this, clientCrc32cToValidate, serverCrc32c, 'CRC32C') || + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_validateChecksum).call(this, clientMd5HashToValidate, serverMd5, 'MD5')) { + return; + } + // no need to keep the cache + __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); + if (resp && resp.data) { + resp.data.size = Number(resp.data.size); + } + this.emit('metadata', resp.data); + // Allow the object (Upload) to continue naturally so the user's + // "finish" event fires. + this.emit('uploadFinished'); + } + else { + // Handles the case where shouldContinueUploadInAnotherRequest is true + // and the response is not successful (e.g., 308 for a partial upload). + // This is the expected behavior for partial uploads that have finished their chunk. + this.emit('uploadFinished'); + } } /** - * @typedef {array} RenameResponse - * @property {File} 0 The destination File. - * @property {object} 1 The full API response. - */ - /** - * @callback RenameCallback - * @param {?Error} err Request error, if any. - * @param {?File} destinationFile The destination File. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {object} RenameOptions Configuration options for File#move(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * Rename this file. - * - * **Warning**: - * There is currently no atomic `rename` method in the Cloud Storage API, - * so this method is an alias of {@link File#move}, which in turn is a - * composition of {@link File#copy} (to the new location) and - * {@link File#delete} (from the old location). While - * unlikely, it is possible that an error returned to your callback could be - * triggered from either one of these API calls failing, which could leave a - * duplicate file lingering. The error message will indicate what operation - * has failed. - * - * @param {string|File} destinationFile Destination file. - * @param {RenameCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // You can pass in a string or a File object. - * // - * // For all of the below examples, assume we are working with the following - * // Bucket and File objects. - * //- - * - * const bucket = storage.bucket('my-bucket'); - * const file = bucket.file('my-image.png'); - * - * //- - * // You can pass in a string for the destinationFile. - * //- - * file.rename('renamed-image.png', function(err, renamedFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * // but contains instead: - * // - "renamed-image.png" - * - * // `renamedFile` is an instance of a File object that refers to your - * // renamed file. - * }); - * - * //- - * // You can pass in a File object. - * //- - * const anotherFile = anotherBucket.file('my-awesome-image.png'); - * - * file.rename(anotherFile, function(err, renamedFile, apiResponse) { - * // `my-bucket` no longer contains: - * // - "my-image.png" - * - * // Note: - * // The `renamedFile` parameter is equal to `anotherFile`. - * }); + * Check the status of an existing resumable upload. * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.rename('my-renamed-image.png').then(function(data) { - * const renamedFile = data[0]; - * const apiResponse = data[1]; - * }); - * ``` + * @param cfg A configuration to use. `uri` is required. + * @returns the current upload status */ - rename(destinationFile, optionsOrCallback, callback) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - callback = callback || index_js_1.util.noop; - this.move(destinationFile, options, callback); + async checkUploadStatus(config = {}) { + let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.checkUploadStatus}`; + if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { + googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + } + const opts = { + method: 'PUT', + url: this.uri, + headers: { + 'Content-Length': 0, + 'Content-Range': 'bytes */*', + 'User-Agent': (0, util_js_1.getUserAgentString)(), + 'x-goog-api-client': googAPIClient, + }, + }; + try { + const resp = await this.makeRequest(opts); + // Successfully got the offset we can now create a new offset invocation id + this.currentInvocationId.checkUploadStatus = uuid.v4(); + return resp; + } + catch (e) { + if (config.retry === false || + !(e instanceof Error) || + !this.retryOptions.retryableErrorFn(e)) { + throw e; + } + const retryDelay = this.getRetryDelay(); + if (retryDelay <= 0) { + throw e; + } + await new Promise(res => setTimeout(res, retryDelay)); + return this.checkUploadStatus(config); + } + } + async getAndSetOffset() { + try { + // we want to handle retries in this method. + const resp = await this.checkUploadStatus({ retry: false }); + if (resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE) { + if (typeof resp.headers.range === 'string') { + this.offset = Number(resp.headers.range.split('-')[1]) + 1; + return; + } + } + this.offset = 0; + } + catch (e) { + const err = e; + if (this.retryOptions.retryableErrorFn(err)) { + this.attemptDelayedRetry({ + status: NaN, + data: err, + }); + return; + } + this.destroy(err); + } + } + async makeRequest(reqOpts) { + if (this.encryption) { + reqOpts.headers = reqOpts.headers || {}; + reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; + reqOpts.headers['x-goog-encryption-key'] = this.encryption.key.toString(); + reqOpts.headers['x-goog-encryption-key-sha256'] = + this.encryption.hash.toString(); + } + if (this.userProject) { + reqOpts.params = reqOpts.params || {}; + reqOpts.params.userProject = this.userProject; + } + // Let gaxios know we will handle a 308 error code ourselves. + reqOpts.validateStatus = (status) => { + return (this.isSuccessfulResponse(status) || + status === RESUMABLE_INCOMPLETE_STATUS_CODE); + }; + const combinedReqOpts = { + ...this.customRequestOptions, + ...reqOpts, + headers: { + ...this.customRequestOptions.headers, + ...reqOpts.headers, + }, + }; + const res = await this.authClient.request(combinedReqOpts); + if (res.data && res.data.error) { + throw res.data.error; + } + return res; + } + async makeRequestStream(reqOpts) { + const controller = new abort_controller_1.default(); + const errorCallback = () => controller.abort(); + this.once('error', errorCallback); + if (this.userProject) { + reqOpts.params = reqOpts.params || {}; + reqOpts.params.userProject = this.userProject; + } + reqOpts.signal = controller.signal; + reqOpts.validateStatus = () => true; + const combinedReqOpts = { + ...this.customRequestOptions, + ...reqOpts, + headers: { + ...this.customRequestOptions.headers, + ...reqOpts.headers, + }, + }; + const res = await this.authClient.request(combinedReqOpts); + const successfulRequest = this.onResponse(res); + this.removeListener('error', errorCallback); + return successfulRequest ? res : null; } /** - * @typedef {object} RestoreOptions Options for File#restore(). See an - * {@link https://cloud.google.com/storage/docs/json_api/v1/objects#resource| Object resource}. - * @param {string} [userProject] The ID of the project which will be - * billed for the request. - * @param {number} [generation] If present, selects a specific revision of this object. - * @param {string} [projection] Specifies the set of properties to return. If used, must be 'full' or 'noAcl'. - * @param {string | number} [ifGenerationMatch] Request proceeds if the generation of the target resource - * matches the value used in the precondition. - * If the values don't match, the request fails with a 412 Precondition Failed response. - * @param {string | number} [ifGenerationNotMatch] Request proceeds if the generation of the target resource does - * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. - * @param {string | number} [ifMetagenerationMatch] Request proceeds if the meta-generation of the target resource - * matches the value used in the precondition. - * If the values don't match, the request fails with a 412 Precondition Failed response. - * @param {string | number} [ifMetagenerationNotMatch] Request proceeds if the meta-generation of the target resource does - * not match the value used in the precondition. If the values match, the request fails with a 304 Not Modified response. + * @return {bool} is the request good? */ + onResponse(resp) { + if (resp.status !== 200 && + this.retryOptions.retryableErrorFn({ + code: resp.status, + message: resp.statusText, + name: resp.statusText, + })) { + this.attemptDelayedRetry(resp); + return false; + } + this.emit('response', resp); + return true; + } /** - * Restores a soft-deleted file - * @param {RestoreOptions} options Restore options. - * @returns {Promise} + * @param resp GaxiosResponse object from previous attempt */ - async restore(options) { - const [file] = await this.request({ - method: 'POST', - uri: '/restore', - qs: options, - }); - return file; + attemptDelayedRetry(resp) { + if (this.numRetries < this.retryOptions.maxRetries) { + if (resp.status === NOT_FOUND_STATUS_CODE && + this.numChunksReadInRequest === 0) { + this.startUploading(); + } + else { + const retryDelay = this.getRetryDelay(); + if (retryDelay <= 0) { + this.destroy(new Error(`Retry total time limit exceeded - ${JSON.stringify(resp.data)}`)); + return; + } + // Unshift the local cache back in case it's needed for the next request. + this.numBytesWritten -= this.localWriteCacheByteLength; + this.prependLocalBufferToUpstream(); + // We don't know how much data has been received by the server. + // `continueUploading` will recheck the offset via `getAndSetOffset`. + // If `offset` < `numberBytesReceived` then we will raise a RangeError + // as we've streamed too much data that has been missed - this should + // not be the case for multi-chunk uploads as `lastChunkSent` is the + // body of the entire request. + this.offset = undefined; + setTimeout(this.continueUploading.bind(this), retryDelay); + } + this.numRetries++; + } + else { + this.destroy(new Error(`Retry limit exceeded - ${JSON.stringify(resp.data)}`)); + } } /** - * Makes request and applies userProject query parameter if necessary. - * - * @private + * The amount of time to wait before retrying the request, in milliseconds. + * If negative, do not retry. * - * @param {object} reqOpts - The request options. - * @param {function} callback - The callback function. + * @returns the amount of time to wait, in milliseconds. */ - request(reqOpts, callback) { - return this.parent.request.call(this, reqOpts, callback); + getRetryDelay() { + const randomMs = Math.round(Math.random() * 1000); + const waitTime = Math.pow(this.retryOptions.retryDelayMultiplier, this.numRetries) * + 1000 + + randomMs; + const maxAllowableDelayMs = this.retryOptions.totalTimeout * 1000 - + (Date.now() - this.timeOfFirstRequest); + const maxRetryDelayMs = this.retryOptions.maxRetryDelay * 1000; + return Math.min(waitTime, maxRetryDelayMs, maxAllowableDelayMs); } - /** - * @callback RotateEncryptionKeyCallback - * @extends CopyCallback - */ - /** - * @typedef RotateEncryptionKeyResponse - * @extends CopyResponse - */ - /** - * @param {string|buffer|object} RotateEncryptionKeyOptions Configuration options - * for File#rotateEncryptionKey(). - * If a string or Buffer is provided, it is interpreted as an AES-256, - * customer-supplied encryption key. If you'd like to use a Cloud KMS key - * name, you must specify an options object with the property name: - * `kmsKeyName`. - * @param {string|buffer} [options.encryptionKey] An AES-256 encryption key. - * @param {string} [options.kmsKeyName] A Cloud KMS key name. + /* + * Prepare user-defined API endpoint for compatibility with our API. */ + sanitizeEndpoint(url) { + if (!exports.PROTOCOL_REGEX.test(url)) { + url = `https://${url}`; + } + return url.replace(/\/+$/, ''); // Remove trailing slashes + } /** - * This method allows you to update the encryption key associated with this - * file. - * - * See {@link https://cloud.google.com/storage/docs/encryption#customer-supplied| Customer-supplied Encryption Keys} - * - * @param {RotateEncryptionKeyOptions} [options] - Configuration options. - * @param {RotateEncryptionKeyCallback} [callback] - * @returns {Promise} + * Check if a given status code is 2xx * - * @example include:samples/encryption.js - * region_tag:storage_rotate_encryption_key - * Example of rotating the encryption key for this file: + * @param status The status code to check + * @returns if the status is 2xx */ - rotateEncryptionKey(optionsOrCallback, callback) { - var _a; - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - let options = {}; - if (typeof optionsOrCallback === 'string' || - optionsOrCallback instanceof Buffer) { - options = { - encryptionKey: optionsOrCallback, - }; - } - else if (typeof optionsOrCallback === 'object') { - options = optionsOrCallback; + isSuccessfulResponse(status) { + return status >= 200 && status < 300; + } +} +exports.Upload = Upload; +_Upload_hashValidator = new WeakMap(), _Upload_clientCrc32c = new WeakMap(), _Upload_clientMd5Hash = new WeakMap(), _Upload_gcclGcsCmd = new WeakMap(), _Upload_instances = new WeakSet(), _Upload_resetLocalBuffersCache = function _Upload_resetLocalBuffersCache() { + this.localWriteCache = []; + this.localWriteCacheByteLength = 0; +}, _Upload_addLocalBufferCache = function _Upload_addLocalBufferCache(buf) { + this.localWriteCache.push(buf); + this.localWriteCacheByteLength += buf.byteLength; +}, _Upload_validateChecksum = function _Upload_validateChecksum(clientHash, serverHash, hashType) { + // Only validate if both client and server hashes are present. + if (clientHash && serverHash) { + if (clientHash !== serverHash) { + const detailMessage = `${hashType} checksum mismatch. Client calculated: ${clientHash}, Server returned: ${serverHash}`; + const detailError = new Error(detailMessage); + const error = new file_js_1.RequestError(file_js_1.FileExceptionMessages.UPLOAD_MISMATCH); + error.code = 'FILE_NO_UPLOAD'; + error.errors = [detailError]; + this.destroy(error); + return true; } - const newFile = this.bucket.file(this.id, options); - const copyOptions = ((_a = options.preconditionOpts) === null || _a === void 0 ? void 0 : _a.ifGenerationMatch) !== undefined - ? { preconditionOpts: options.preconditionOpts } - : {}; - this.copy(newFile, copyOptions, callback); } + return false; +}, _Upload_applyChecksumHeaders = function _Upload_applyChecksumHeaders(headers) { + var _a, _b; + const checksums = []; + if ((_a = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _a === void 0 ? void 0 : _a.crc32cEnabled) { + checksums.push(`crc32c=${__classPrivateFieldGet(this, _Upload_hashValidator, "f").crc32c}`); + } + else if (__classPrivateFieldGet(this, _Upload_clientCrc32c, "f")) { + checksums.push(`crc32c=${__classPrivateFieldGet(this, _Upload_clientCrc32c, "f")}`); + } + if ((_b = __classPrivateFieldGet(this, _Upload_hashValidator, "f")) === null || _b === void 0 ? void 0 : _b.md5Enabled) { + checksums.push(`md5=${__classPrivateFieldGet(this, _Upload_hashValidator, "f").md5Digest}`); + } + else if (__classPrivateFieldGet(this, _Upload_clientMd5Hash, "f")) { + checksums.push(`md5=${__classPrivateFieldGet(this, _Upload_clientMd5Hash, "f")}`); + } + if (checksums.length > 0) { + headers['X-Goog-Hash'] = checksums.join(','); + } +}; +function upload(cfg) { + return new Upload(cfg); +} +function createURI(cfg, callback) { + const up = new Upload(cfg); + if (!callback) { + return up.createURI(); + } + up.createURI().then(r => callback(null, r), callback); +} +/** + * Check the status of an existing resumable upload. + * + * @param cfg A configuration to use. `uri` is required. + * @returns the current upload status + */ +function checkUploadStatus(cfg) { + const up = new Upload(cfg); + return up.checkUploadStatus(); +} + + +/***/ }), + +/***/ 59019: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright 2020 Google LLC +// +// 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. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SigningError = exports.URLSigner = exports.PATH_STYLED_HOST = exports.SignerExceptionMessages = void 0; +const crypto = __importStar(__nccwpck_require__(6113)); +const url = __importStar(__nccwpck_require__(57310)); +const storage_js_1 = __nccwpck_require__(33030); +const util_js_1 = __nccwpck_require__(59258); +var SignerExceptionMessages; +(function (SignerExceptionMessages) { + SignerExceptionMessages["ACCESSIBLE_DATE_INVALID"] = "The accessible at date provided was invalid."; + SignerExceptionMessages["EXPIRATION_BEFORE_ACCESSIBLE_DATE"] = "An expiration date cannot be before accessible date."; + SignerExceptionMessages["X_GOOG_CONTENT_SHA256"] = "The header X-Goog-Content-SHA256 must be a hexadecimal string."; +})(SignerExceptionMessages || (exports.SignerExceptionMessages = SignerExceptionMessages = {})); +/* + * Default signing version for getSignedUrl is 'v2'. + */ +const DEFAULT_SIGNING_VERSION = 'v2'; +const SEVEN_DAYS = 7 * 24 * 60 * 60; +/** + * @const {string} + * @deprecated - unused + */ +exports.PATH_STYLED_HOST = 'https://storage.googleapis.com'; +class URLSigner { + constructor(auth, bucket, file, /** - * @typedef {object} SaveOptions - * @extends CreateWriteStreamOptions - */ - /** - * @callback SaveCallback - * @param {?Error} err Request error, if any. - */ - /** - * Write strings or buffers to a file. - * - * *This is a convenience method which wraps {@link File#createWriteStream}.* - * To upload arbitrary data to a file, please use {@link File#createWriteStream} directly. - * - * Resumable uploads are automatically enabled and must be shut off explicitly - * by setting `options.resumable` to `false`. - * - * Multipart uploads with retryable error codes will be retried 3 times with exponential backoff. - * - *

- * There is some overhead when using a resumable upload that can cause - * noticeable performance degradation while uploading a series of small - * files. When uploading files less than 10MB, it is recommended that the - * resumable feature is disabled. - *

- * - * @param {SaveData} data The data to write to a file. - * @param {SaveOptions} [options] See {@link File#createWriteStream}'s `options` - * parameter. - * @param {SaveCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * - * const file = myBucket.file('my-file'); - * const contents = 'This is the contents of the file.'; + * A {@link Storage} object. * - * file.save(contents, function(err) { - * if (!err) { - * // File written successfully. - * } - * }); + * @privateRemarks * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.save(contents).then(function() {}); - * ``` + * Technically this is a required field, however it would be a breaking change to + * move it before optional properties. In the next major we should refactor the + * constructor of this class to only accept a config object. */ - save(data, optionsOrCallback, callback) { - // tslint:enable:no-any - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - let maxRetries = this.storage.retryOptions.maxRetries; - if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options === null || options === void 0 ? void 0 : options.preconditionOpts)) { - maxRetries = 0; + storage = new storage_js_1.Storage()) { + this.auth = auth; + this.bucket = bucket; + this.file = file; + this.storage = storage; + } + getSignedUrl(cfg) { + const expiresInSeconds = this.parseExpires(cfg.expires); + const method = cfg.method; + const accessibleAtInSeconds = this.parseAccessibleAt(cfg.accessibleAt); + if (expiresInSeconds < accessibleAtInSeconds) { + throw new Error(SignerExceptionMessages.EXPIRATION_BEFORE_ACCESSIBLE_DATE); } - const returnValue = (0, async_retry_1.default)(async (bail) => { - return new Promise((resolve, reject) => { - if (maxRetries === 0) { - this.storage.retryOptions.autoRetry = false; - } - const writable = this.createWriteStream(options); - if (options.onUploadProgress) { - writable.on('progress', options.onUploadProgress); - } - const handleError = (err) => { - if (this.storage.retryOptions.autoRetry && - this.storage.retryOptions.retryableErrorFn(err)) { - return reject(err); - } - return bail(err); - }; - if (typeof data === 'string' || Buffer.isBuffer(data)) { - writable - .on('error', handleError) - .on('finish', () => resolve()) - .end(data); - } - else { - (0, stream_1.pipeline)(data, writable, err => { - if (err) { - if (typeof data !== 'function') { - // Only PipelineSourceFunction can be retried. Async-iterables - // and Readable streams can only be consumed once. - return bail(err); - } - handleError(err); - } - else { - resolve(); - } - }); - } - }); - }, { - retries: maxRetries, - factor: this.storage.retryOptions.retryDelayMultiplier, - maxTimeout: this.storage.retryOptions.maxRetryDelay * 1000, //convert to milliseconds - maxRetryTime: this.storage.retryOptions.totalTimeout * 1000, //convert to milliseconds + let customHost; + // Default style is `path`. + const isVirtualHostedStyle = cfg.virtualHostedStyle || false; + if (cfg.cname) { + customHost = cfg.cname; + } + else if (isVirtualHostedStyle) { + customHost = `https://${this.bucket.name}.storage.${this.storage.universeDomain}`; + } + const secondsToMilliseconds = 1000; + const config = Object.assign({}, cfg, { + method, + expiration: expiresInSeconds, + accessibleAt: new Date(secondsToMilliseconds * accessibleAtInSeconds), + bucket: this.bucket.name, + file: this.file ? (0, util_js_1.encodeURI)(this.file.name, false) : undefined, }); - if (!callback) { - return returnValue; + if (customHost) { + config.cname = customHost; + } + const version = cfg.version || DEFAULT_SIGNING_VERSION; + let promise; + if (version === 'v2') { + promise = this.getSignedUrlV2(config); + } + else if (version === 'v4') { + promise = this.getSignedUrlV4(config); } else { - return returnValue - .then(() => { - if (callback) { - return callback(); - } - }) - .catch(callback); + throw new Error(`Invalid signed URL version: ${version}. Supported versions are 'v2' and 'v4'.`); } - } - setMetadata(metadata, optionsOrCallback, cb) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - this.disableAutoRetryConditionallyIdempotent_(this.methods.setMetadata, bucket_js_1.AvailableServiceObjectMethods.setMetadata, options); - super - .setMetadata(metadata, options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; + return promise.then(query => { + var _a; + query = Object.assign(query, cfg.queryParams); + const signedUrl = new url.URL(((_a = cfg.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); + signedUrl.pathname = this.getResourcePath(!!config.cname, this.bucket.name, config.file); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + signedUrl.search = (0, util_js_1.qsStringify)(query); + return signedUrl.href; }); } - /** - * @typedef {array} SetStorageClassResponse - * @property {object} 0 The full API response. - */ - /** - * @typedef {object} SetStorageClassOptions Configuration options for File#setStorageClass(). - * @property {string} [userProject] The ID of the project which will be - * billed for the request. - */ - /** - * @callback SetStorageClassCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Set the storage class for this file. - * - * See {@link https://cloud.google.com/storage/docs/per-object-storage-class| Per-Object Storage Class} - * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} - * - * @param {string} storageClass The new storage class. (`standard`, - * `nearline`, `coldline`, or `archive`) - * **Note:** The storage classes `multi_regional` and `regional` - * are now legacy and will be deprecated in the future. - * @param {SetStorageClassOptions} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {SetStorageClassCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * file.setStorageClass('nearline', function(err, apiResponse) { - * if (err) { - * // Error handling omitted. - * } - * - * // The storage class was updated successfully. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * file.setStorageClass('nearline').then(function() {}); - * ``` - */ - setStorageClass(storageClass, optionsOrCallback, callback) { - callback = - typeof optionsOrCallback === 'function' ? optionsOrCallback : callback; - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const req = { - ...options, - // In case we get input like `storageClass`, convert to `storage_class`. - storageClass: storageClass - .replace(/-/g, '_') - .replace(/([a-z])([A-Z])/g, (_, low, up) => { - return low + '_' + up; - }) - .toUpperCase(), - }; - this.copy(this, req, (err, file, apiResponse) => { - if (err) { - callback(err, apiResponse); - return; + getSignedUrlV2(config) { + const canonicalHeadersString = this.getCanonicalHeaders(config.extensionHeaders || {}); + const resourcePath = this.getResourcePath(false, config.bucket, config.file); + const blobToSign = [ + config.method, + config.contentMd5 || '', + config.contentType || '', + config.expiration, + canonicalHeadersString + resourcePath, + ].join('\n'); + const sign = async () => { + var _a; + const auth = this.auth; + try { + const signature = await auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); + const credentials = await auth.getCredentials(); + return { + GoogleAccessId: credentials.client_email, + Expires: config.expiration, + Signature: signature, + }; } - this.metadata = file.metadata; - callback(null, apiResponse); - }); - } - /** - * Set a user project to be billed for all requests made from this File - * object. - * - * @param {string} userProject The user project. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('albums'); - * const file = bucket.file('my-file'); - * - * file.setUserProject('grape-spaceship-123'); - * ``` - */ - setUserProject(userProject) { - this.bucket.setUserProject.call(this, userProject); + catch (err) { + const error = err; + const signingErr = new SigningError(error.message); + signingErr.stack = error.stack; + throw signingErr; + } + }; + return sign(); } - /** - * This creates a resumable-upload upload stream. - * - * @param {Duplexify} stream - Duplexify stream of data to pipe to the file. - * @param {object=} options - Configuration object. - * - * @private - */ - startResumableUpload_(dup, options = {}) { + getSignedUrlV4(config) { var _a; - (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); - const retryOptions = this.storage.retryOptions; - if (!this.shouldRetryBasedOnPreconditionAndIdempotencyStrat(options.preconditionOpts)) { - retryOptions.autoRetry = false; + config.accessibleAt = config.accessibleAt + ? config.accessibleAt + : new Date(); + const millisecondsToSeconds = 1.0 / 1000.0; + const expiresPeriodInSeconds = config.expiration - config.accessibleAt.valueOf() * millisecondsToSeconds; + // v4 limit expiration to be 7 days maximum + if (expiresPeriodInSeconds > SEVEN_DAYS) { + throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); } - const uploadStream = resumableUpload.upload({ - authClient: this.storage.authClient, - apiEndpoint: this.storage.apiEndpoint, - bucket: this.bucket.name, - customRequestOptions: this.getRequestInterceptors().reduce((reqOpts, interceptorFn) => interceptorFn(reqOpts), {}), - file: this.name, - generation: this.generation, - isPartialUpload: options.isPartialUpload, - key: this.encryptionKey, - kmsKeyName: this.kmsKeyName, - metadata: options.metadata, - offset: options.offset, - predefinedAcl: options.predefinedAcl, - private: options.private, - public: options.public, - uri: options.uri, - userProject: options.userProject || this.userProject, - retryOptions: { ...retryOptions }, - params: (options === null || options === void 0 ? void 0 : options.preconditionOpts) || this.instancePreconditionOpts, - chunkSize: options === null || options === void 0 ? void 0 : options.chunkSize, - highWaterMark: options === null || options === void 0 ? void 0 : options.highWaterMark, - universeDomain: this.bucket.storage.universeDomain, - [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], - }); - uploadStream - .on('response', resp => { - dup.emit('response', resp); - }) - .on('uri', uri => { - dup.emit('uri', uri); - }) - .on('metadata', metadata => { - this.metadata = metadata; - dup.emit('metadata'); - }) - .on('finish', () => { - dup.emit('complete'); - }) - .on('progress', evt => dup.emit('progress', evt)); - dup.setWritable(uploadStream); - this.storage.retryOptions.autoRetry = this.instanceRetryValue; + const extensionHeaders = Object.assign({}, config.extensionHeaders); + const fqdn = new url.URL(((_a = config.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); + extensionHeaders.host = fqdn.hostname; + if (config.contentMd5) { + extensionHeaders['content-md5'] = config.contentMd5; + } + if (config.contentType) { + extensionHeaders['content-type'] = config.contentType; + } + let contentSha256; + const sha256Header = extensionHeaders['x-goog-content-sha256']; + if (sha256Header) { + if (typeof sha256Header !== 'string' || + !/[A-Fa-f0-9]{40}/.test(sha256Header)) { + throw new Error(SignerExceptionMessages.X_GOOG_CONTENT_SHA256); + } + contentSha256 = sha256Header; + } + const signedHeaders = Object.keys(extensionHeaders) + .map(header => header.toLowerCase()) + .sort() + .join(';'); + const extensionHeadersString = this.getCanonicalHeaders(extensionHeaders); + const datestamp = (0, util_js_1.formatAsUTCISO)(config.accessibleAt); + const credentialScope = `${datestamp}/auto/storage/goog4_request`; + const sign = async () => { + var _a; + const credentials = await this.auth.getCredentials(); + const credential = `${credentials.client_email}/${credentialScope}`; + const dateISO = (0, util_js_1.formatAsUTCISO)(config.accessibleAt ? config.accessibleAt : new Date(), true); + const queryParams = { + 'X-Goog-Algorithm': 'GOOG4-RSA-SHA256', + 'X-Goog-Credential': credential, + 'X-Goog-Date': dateISO, + 'X-Goog-Expires': expiresPeriodInSeconds.toString(10), + 'X-Goog-SignedHeaders': signedHeaders, + ...(config.queryParams || {}), + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const canonicalQueryParams = this.getCanonicalQueryParams(queryParams); + const canonicalRequest = this.getCanonicalRequest(config.method, this.getResourcePath(!!config.cname, config.bucket, config.file), canonicalQueryParams, extensionHeadersString, signedHeaders, contentSha256); + const hash = crypto + .createHash('sha256') + .update(canonicalRequest) + .digest('hex'); + const blobToSign = [ + 'GOOG4-RSA-SHA256', + dateISO, + credentialScope, + hash, + ].join('\n'); + try { + const signature = await this.auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); + const signatureHex = Buffer.from(signature, 'base64').toString('hex'); + const signedQuery = Object.assign({}, queryParams, { + 'X-Goog-Signature': signatureHex, + }); + return signedQuery; + } + catch (err) { + const error = err; + const signingErr = new SigningError(error.message); + signingErr.stack = error.stack; + throw signingErr; + } + }; + return sign(); } /** - * Takes a readable stream and pipes it to a remote file. Unlike - * `startResumableUpload_`, which uses the resumable upload technique, this - * method uses a simple upload (all or nothing). + * Create canonical headers for signing v4 url. * - * @param {Duplexify} dup - Duplexify stream of data to pipe to the file. - * @param {object=} options - Configuration object. + * The canonical headers for v4-signing a request demands header names are + * first lowercased, followed by sorting the header names. + * Then, construct the canonical headers part of the request: + * + ":" + Trim() + "\n" + * .. + * + ":" + Trim() + "\n" * + * @param headers * @private */ - startSimpleUpload_(dup, options = {}) { - var _a; - (_a = options.metadata) !== null && _a !== void 0 ? _a : (options.metadata = {}); - const apiEndpoint = this.storage.apiEndpoint; - const bucketName = this.bucket.name; - const uri = `${apiEndpoint}/upload/storage/v1/b/${bucketName}/o`; - const reqOpts = { - qs: { - name: this.name, - }, - uri: uri, - [util_js_1.GCCL_GCS_CMD_KEY]: options[util_js_1.GCCL_GCS_CMD_KEY], - }; - if (this.generation !== undefined) { - reqOpts.qs.ifGenerationMatch = this.generation; - } - if (this.kmsKeyName !== undefined) { - reqOpts.qs.kmsKeyName = this.kmsKeyName; - } - if (typeof options.timeout === 'number') { - reqOpts.timeout = options.timeout; - } - if (options.userProject || this.userProject) { - reqOpts.qs.userProject = options.userProject || this.userProject; - } - if (options.predefinedAcl) { - reqOpts.qs.predefinedAcl = options.predefinedAcl; + getCanonicalHeaders(headers) { + // Sort headers by their lowercased names + const sortedHeaders = (0, util_js_1.objectEntries)(headers) + // Convert header names to lowercase + .map(([headerName, value]) => [ + headerName.toLowerCase(), + value, + ]) + .sort((a, b) => a[0].localeCompare(b[0])); + return sortedHeaders + .filter(([, value]) => value !== undefined) + .map(([headerName, value]) => { + // - Convert Array (multi-valued header) into string, delimited by + // ',' (no space). + // - Trim leading and trailing spaces. + // - Convert sequential (2+) spaces into a single space + const canonicalValue = `${value}`.trim().replace(/\s{2,}/g, ' '); + return `${headerName}:${canonicalValue}\n`; + }) + .join(''); + } + getCanonicalRequest(method, path, query, headers, signedHeaders, contentSha256) { + return [ + method, + path, + query, + headers, + signedHeaders, + contentSha256 || 'UNSIGNED-PAYLOAD', + ].join('\n'); + } + getCanonicalQueryParams(query) { + return (0, util_js_1.objectEntries)(query) + .map(([key, value]) => [(0, util_js_1.encodeURI)(key, true), (0, util_js_1.encodeURI)(value, true)]) + .sort((a, b) => (a[0] < b[0] ? -1 : 1)) + .map(([key, value]) => `${key}=${value}`) + .join('&'); + } + getResourcePath(cname, bucket, file) { + if (cname) { + return '/' + (file || ''); } - else if (options.private) { - reqOpts.qs.predefinedAcl = 'private'; + else if (file) { + return `/${bucket}/${file}`; } - else if (options.public) { - reqOpts.qs.predefinedAcl = 'publicRead'; + else { + return `/${bucket}`; } - Object.assign(reqOpts.qs, this.instancePreconditionOpts, options.preconditionOpts); - index_js_1.util.makeWritableStream(dup, { - makeAuthenticatedRequest: (reqOpts) => { - this.request(reqOpts, (err, body, resp) => { - if (err) { - dup.destroy(err); - return; - } - this.metadata = body; - dup.emit('metadata', body); - dup.emit('response', resp); - dup.emit('complete'); - }); - }, - metadata: options.metadata, - request: reqOpts, - }); } - disableAutoRetryConditionallyIdempotent_( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - coreOpts, methodType, localPreconditionOptions) { - var _a, _b, _c, _d; - if ((typeof coreOpts === 'object' && - ((_b = (_a = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _a === void 0 ? void 0 : _a.qs) === null || _b === void 0 ? void 0 : _b.ifGenerationMatch) === undefined && - (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifGenerationMatch) === undefined && - methodType === bucket_js_1.AvailableServiceObjectMethods.delete && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - this.storage.retryOptions.autoRetry = false; + parseExpires(expires, current = new Date()) { + const expiresInMSeconds = new Date(expires).valueOf(); + if (isNaN(expiresInMSeconds)) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); } - if ((typeof coreOpts === 'object' && - ((_d = (_c = coreOpts === null || coreOpts === void 0 ? void 0 : coreOpts.reqOpts) === null || _c === void 0 ? void 0 : _c.qs) === null || _d === void 0 ? void 0 : _d.ifMetagenerationMatch) === undefined && - (localPreconditionOptions === null || localPreconditionOptions === void 0 ? void 0 : localPreconditionOptions.ifMetagenerationMatch) === undefined && - methodType === bucket_js_1.AvailableServiceObjectMethods.setMetadata && - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryConditional) || - this.storage.retryOptions.idempotencyStrategy === - storage_js_1.IdempotencyStrategy.RetryNever) { - this.storage.retryOptions.autoRetry = false; + if (expiresInMSeconds < current.valueOf()) { + throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); } + return Math.floor(expiresInMSeconds / 1000); // The API expects seconds. } - async getBufferFromReadable(readable) { - const buf = []; - for await (const chunk of readable) { - buf.push(chunk); + parseAccessibleAt(accessibleAt) { + const accessibleAtInMSeconds = new Date(accessibleAt || new Date()).valueOf(); + if (isNaN(accessibleAtInMSeconds)) { + throw new Error(SignerExceptionMessages.ACCESSIBLE_DATE_INVALID); } - return Buffer.concat(buf); + return Math.floor(accessibleAtInMSeconds / 1000); // The API expects seconds. } } -exports.File = File; -_File_instances = new WeakSet(), _File_validateIntegrity = +exports.URLSigner = URLSigner; /** + * Custom error type for errors related to getting signed errors and policies. * - * @param hashCalculatingStream - * @param verify - * @returns {boolean} Returns `true` if valid, throws with error otherwise + * @private */ -async function _File_validateIntegrity(hashCalculatingStream, verify = {}) { - const metadata = this.metadata; - // If we're doing validation, assume the worst - let dataMismatch = !!(verify.crc32c || verify.md5); - if (verify.crc32c && metadata.crc32c) { - dataMismatch = !hashCalculatingStream.test('crc32c', metadata.crc32c); - } - if (verify.md5 && metadata.md5Hash) { - dataMismatch = !hashCalculatingStream.test('md5', metadata.md5Hash); - } - if (dataMismatch) { - const errors = []; - let code = ''; - let message = ''; - try { - await this.delete(); - if (verify.md5 && !metadata.md5Hash) { - code = 'MD5_NOT_AVAILABLE'; - message = FileExceptionMessages.MD5_NOT_AVAILABLE; - } - else { - code = 'FILE_NO_UPLOAD'; - message = FileExceptionMessages.UPLOAD_MISMATCH; - } - } - catch (e) { - const error = e; - code = 'FILE_NO_UPLOAD_DELETE'; - message = `${FileExceptionMessages.UPLOAD_MISMATCH_DELETE_FAIL}${error.message}`; - errors.push(error); - } - const error = new RequestError(message); - error.code = code; - error.errors = errors; - throw error; +class SigningError extends Error { + constructor() { + super(...arguments); + this.name = 'SigningError'; } - return true; -}; -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(File, { - exclude: [ - 'cloudStorageURI', - 'publicUrl', - 'request', - 'save', - 'setEncryptionKey', - 'shouldRetryBasedOnPreconditionAndIdempotencyStrat', - 'getBufferFromReadable', - 'restore', - ], -}); +} +exports.SigningError = SigningError; /***/ }), -/***/ 40725: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 33030: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2022 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -159848,1410 +165537,1172 @@ async function _File_validateIntegrity(hashCalculatingStream, verify = {}) { // 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. -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var _HashStreamValidator_crc32cHash, _HashStreamValidator_md5Hash, _HashStreamValidator_md5Digest; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HashStreamValidator = void 0; -const crypto_1 = __nccwpck_require__(6113); +exports.Storage = exports.RETRYABLE_ERR_FN_DEFAULT = exports.MAX_RETRY_DELAY_DEFAULT = exports.TOTAL_TIMEOUT_DEFAULT = exports.RETRY_DELAY_MULTIPLIER_DEFAULT = exports.MAX_RETRY_DEFAULT = exports.AUTO_RETRY_DEFAULT = exports.PROTOCOL_REGEX = exports.StorageExceptionMessages = exports.ExceptionMessages = exports.IdempotencyStrategy = void 0; +const index_js_1 = __nccwpck_require__(4052); +const paginator_1 = __nccwpck_require__(46412); +const promisify_1 = __nccwpck_require__(19203); const stream_1 = __nccwpck_require__(12781); -const crc32c_js_1 = __nccwpck_require__(55810); +const bucket_js_1 = __nccwpck_require__(23973); +const channel_js_1 = __nccwpck_require__(62665); const file_js_1 = __nccwpck_require__(4713); -class HashStreamValidator extends stream_1.Transform { - constructor(options = {}) { - super(); - this.updateHashesOnly = false; - _HashStreamValidator_crc32cHash.set(this, undefined); - _HashStreamValidator_md5Hash.set(this, undefined); - _HashStreamValidator_md5Digest.set(this, ''); - this.crc32cEnabled = !!options.crc32c; - this.md5Enabled = !!options.md5; - this.updateHashesOnly = !!options.updateHashesOnly; - this.crc32cExpected = options.crc32cExpected; - this.md5Expected = options.md5Expected; - if (this.crc32cEnabled) { - if (options.crc32cInstance) { - __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, options.crc32cInstance, "f"); +const util_js_1 = __nccwpck_require__(59258); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const package_json_helper_cjs_1 = __nccwpck_require__(28568); +const hmacKey_js_1 = __nccwpck_require__(64654); +const crc32c_js_1 = __nccwpck_require__(55810); +const google_auth_library_1 = __nccwpck_require__(20810); +var IdempotencyStrategy; +(function (IdempotencyStrategy) { + IdempotencyStrategy[IdempotencyStrategy["RetryAlways"] = 0] = "RetryAlways"; + IdempotencyStrategy[IdempotencyStrategy["RetryConditional"] = 1] = "RetryConditional"; + IdempotencyStrategy[IdempotencyStrategy["RetryNever"] = 2] = "RetryNever"; +})(IdempotencyStrategy || (exports.IdempotencyStrategy = IdempotencyStrategy = {})); +var ExceptionMessages; +(function (ExceptionMessages) { + ExceptionMessages["EXPIRATION_DATE_INVALID"] = "The expiration date provided was invalid."; + ExceptionMessages["EXPIRATION_DATE_PAST"] = "An expiration date cannot be in the past."; +})(ExceptionMessages || (exports.ExceptionMessages = ExceptionMessages = {})); +var StorageExceptionMessages; +(function (StorageExceptionMessages) { + StorageExceptionMessages["BUCKET_NAME_REQUIRED"] = "A bucket name is needed to use Cloud Storage."; + StorageExceptionMessages["BUCKET_NAME_REQUIRED_CREATE"] = "A name is required to create a bucket."; + StorageExceptionMessages["HMAC_SERVICE_ACCOUNT"] = "The first argument must be a service account email to create an HMAC key."; + StorageExceptionMessages["HMAC_ACCESS_ID"] = "An access ID is needed to create an HmacKey object."; +})(StorageExceptionMessages || (exports.StorageExceptionMessages = StorageExceptionMessages = {})); +exports.PROTOCOL_REGEX = /^(\w*):\/\//; +/** + * Default behavior: Automatically retry retriable server errors. + * + * @const {boolean} + */ +exports.AUTO_RETRY_DEFAULT = true; +/** + * Default behavior: Only attempt to retry retriable errors 3 times. + * + * @const {number} + */ +exports.MAX_RETRY_DEFAULT = 3; +/** + * Default behavior: Wait twice as long as previous retry before retrying. + * + * @const {number} + */ +exports.RETRY_DELAY_MULTIPLIER_DEFAULT = 2; +/** + * Default behavior: If the operation doesn't succeed after 600 seconds, + * stop retrying. + * + * @const {number} + */ +exports.TOTAL_TIMEOUT_DEFAULT = 600; +/** + * Default behavior: Wait no more than 64 seconds between retries. + * + * @const {number} + */ +exports.MAX_RETRY_DELAY_DEFAULT = 64; +/** + * Default behavior: Retry conditionally idempotent operations if correct preconditions are set. + * + * @const {enum} + * @private + */ +const IDEMPOTENCY_STRATEGY_DEFAULT = IdempotencyStrategy.RetryConditional; +/** + * Returns true if the API request should be retried, given the error that was + * given the first time the request was attempted. + * @const + * @param {error} err - The API error to check if it is appropriate to retry. + * @return {boolean} True if the API request should be retried, false otherwise. + */ +const RETRYABLE_ERR_FN_DEFAULT = function (err) { + var _a; + const isConnectionProblem = (reason) => { + return (reason.includes('eai_again') || // DNS lookup error + reason === 'econnreset' || + reason === 'unexpected connection closure' || + reason === 'epipe' || + reason === 'socket connection timeout'); + }; + if (err) { + if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { + return true; + } + if (typeof err.code === 'string') { + if (['408', '429', '500', '502', '503', '504'].indexOf(err.code) !== -1) { + return true; } - else { - const crc32cGenerator = options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; - __classPrivateFieldSet(this, _HashStreamValidator_crc32cHash, crc32cGenerator(), "f"); + const reason = err.code.toLowerCase(); + if (isConnectionProblem(reason)) { + return true; } } - if (this.md5Enabled) { - __classPrivateFieldSet(this, _HashStreamValidator_md5Hash, (0, crypto_1.createHash)('md5'), "f"); - } - } - /** - * Return the current CRC32C value, if available. - */ - get crc32c() { - var _a; - return (_a = __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) === null || _a === void 0 ? void 0 : _a.toString(); - } - _flush(callback) { - if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) { - __classPrivateFieldSet(this, _HashStreamValidator_md5Digest, __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").digest('base64'), "f"); - } - if (this.updateHashesOnly) { - callback(); - return; - } - // If we're doing validation, assume the worst-- a data integrity - // mismatch. If not, these tests won't be performed, and we can assume - // the best. - // We must check if the server decompressed the data on serve because hash - // validation is not possible in this case. - let failed = this.crc32cEnabled || this.md5Enabled; - if (this.crc32cEnabled && this.crc32cExpected) { - failed = !this.test('crc32c', this.crc32cExpected); - } - if (this.md5Enabled && this.md5Expected) { - failed = !this.test('md5', this.md5Expected); - } - if (failed) { - const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); - mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; - callback(mismatchError); - } - else { - callback(); - } - } - _transform(chunk, encoding, callback) { - this.push(chunk, encoding); - try { - if (__classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) - __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").update(chunk); - if (__classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) - __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f").update(chunk); - callback(); - } - catch (e) { - callback(e); - } - } - test(hash, sum) { - const check = Buffer.isBuffer(sum) ? sum.toString('base64') : sum; - if (hash === 'crc32c' && __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f")) { - return __classPrivateFieldGet(this, _HashStreamValidator_crc32cHash, "f").validate(check); - } - if (hash === 'md5' && __classPrivateFieldGet(this, _HashStreamValidator_md5Hash, "f")) { - return __classPrivateFieldGet(this, _HashStreamValidator_md5Digest, "f") === check; + if (err.errors) { + for (const e of err.errors) { + const reason = (_a = e === null || e === void 0 ? void 0 : e.reason) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase(); + if (reason && isConnectionProblem(reason)) { + return true; + } + } } - return false; } -} -exports.HashStreamValidator = HashStreamValidator; -_HashStreamValidator_crc32cHash = new WeakMap(), _HashStreamValidator_md5Hash = new WeakMap(), _HashStreamValidator_md5Digest = new WeakMap(); - - -/***/ }), - -/***/ 64654: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HmacKey = void 0; -const index_js_1 = __nccwpck_require__(4052); -const storage_js_1 = __nccwpck_require__(33030); -const promisify_1 = __nccwpck_require__(19203); + return false; +}; +exports.RETRYABLE_ERR_FN_DEFAULT = RETRYABLE_ERR_FN_DEFAULT; +/*! Developer Documentation + * + * Invoke this method to create a new Storage object bound with pre-determined + * configuration options. For each object that can be created (e.g., a bucket), + * there is an equivalent static and instance method. While they are classes, + * they can be instantiated without use of the `new` keyword. + */ /** - * The API-formatted resource description of the HMAC key. + * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share objects with other + * users and allow other users to access your buckets and objects. * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. + * This object provides constants to refer to the three permission levels that + * can be granted to an entity: * - * @name HmacKey#metadata + * - `gcs.acl.OWNER_ROLE` - ("OWNER") + * - `gcs.acl.READER_ROLE` - ("READER") + * - `gcs.acl.WRITER_ROLE` - ("WRITER") + * + * See {@link https://cloud.google.com/storage/docs/access-control/lists| About Access Control Lists} + * + * @name Storage#acl * @type {object} + * @property {string} OWNER_ROLE + * @property {string} READER_ROLE + * @property {string} WRITER_ROLE + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const albums = storage.bucket('albums'); + * + * //- + * // Make all of the files currently in a bucket publicly readable. + * //- + * const options = { + * entity: 'allUsers', + * role: storage.acl.READER_ROLE + * }; + * + * albums.acl.add(options, function(err, aclObject) {}); + * + * //- + * // Make any new objects added to a bucket publicly readable. + * //- + * albums.acl.default.add(options, function(err, aclObject) {}); + * + * //- + * // Grant a user ownership permissions to a bucket. + * //- + * albums.acl.add({ + * entity: 'user-useremail@example.com', + * role: storage.acl.OWNER_ROLE + * }, function(err, aclObject) {}); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * albums.acl.add(options).then(function(data) { + * const aclObject = data[0]; + * const apiResponse = data[1]; + * }); + * ``` */ /** - * An HmacKey object contains metadata of an HMAC key created from a - * service account through the {@link Storage} client using - * {@link Storage#createHmacKey}. + * Get {@link Bucket} objects for all of the buckets in your project as + * a readable object stream. * - * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} + * @method Storage#getBucketsStream + * @param {GetBucketsRequest} [query] Query object for listing buckets. + * @returns {ReadableStream} A readable stream that emits {@link Bucket} + * instances. + * + * @example + * ``` + * storage.getBucketsStream() + * .on('error', console.error) + * .on('data', function(bucket) { + * // bucket is a Bucket object. + * }) + * .on('end', function() { + * // All buckets retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * storage.getBucketsStream() + * .on('data', function(bucket) { + * this.end(); + * }); + * ``` + */ +/** + * Get {@link HmacKey} objects for all of the HMAC keys in the project in a + * readable object stream. + * + * @method Storage#getHmacKeysStream + * @param {GetHmacKeysOptions} [options] Configuration options. + * @returns {ReadableStream} A readable stream that emits {@link HmacKey} + * instances. + * + * @example + * ``` + * storage.getHmacKeysStream() + * .on('error', console.error) + * .on('data', function(hmacKey) { + * // hmacKey is an HmacKey object. + * }) + * .on('end', function() { + * // All HmacKey retrieved. + * }); + * + * //- + * // If you anticipate many results, you can end a stream early to prevent + * // unnecessary processing and API requests. + * //- + * storage.getHmacKeysStream() + * .on('data', function(bucket) { + * this.end(); + * }); + * ``` + */ +/** + *

ACLs

+ * Cloud Storage uses access control lists (ACLs) to manage object and + * bucket access. ACLs are the mechanism you use to share files with other users + * and allow other users to access your buckets and files. + * + * To learn more about ACLs, read this overview on + * {@link https://cloud.google.com/storage/docs/access-control| Access Control}. + * + * See {@link https://cloud.google.com/storage/docs/overview| Cloud Storage overview} + * See {@link https://cloud.google.com/storage/docs/access-control| Access Control} * * @class */ -class HmacKey extends index_js_1.ServiceObject { +class Storage extends index_js_1.Service { + getBucketsStream() { + // placeholder body, overwritten in constructor + return new stream_1.Readable(); + } + getHmacKeysStream() { + // placeholder body, overwritten in constructor + return new stream_1.Readable(); + } /** - * @typedef {object} HmacKeyOptions - * @property {string} [projectId] The project ID of the project that owns - * the service account of the requested HMAC key. If not provided, - * the project ID used to instantiate the Storage client will be used. - */ + * @callback Crc32cGeneratorToStringCallback + * A method returning the CRC32C as a base64-encoded string. + * + * @returns {string} + * + * @example + * Hashing the string 'data' should return 'rth90Q==' + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.toString(); // 'rth90Q==' + * ``` + **/ /** - * Constructs an HmacKey object. + * @callback Crc32cGeneratorValidateCallback + * A method validating a base64-encoded CRC32C string. * - * Note: this only create a local reference to an HMAC key, to create - * an HMAC key, use {@link Storage#createHmacKey}. + * @param {string} [value] base64-encoded CRC32C string to validate + * @returns {boolean} + * + * @example + * Should return `true` if the value matches, `false` otherwise + * + * ```js + * const buffer = Buffer.from('data'); + * crc32c.update(buffer); + * crc32c.validate('DkjKuA=='); // false + * crc32c.validate('rth90Q=='); // true + * ``` + **/ + /** + * @callback Crc32cGeneratorUpdateCallback + * A method for passing `Buffer`s for CRC32C generation. + * + * @param {Buffer} [data] data to update CRC32C value with + * @returns {undefined} + * + * @example + * Hashing buffers from 'some ' and 'text\n' + * + * ```js + * const buffer1 = Buffer.from('some '); + * crc32c.update(buffer1); + * + * const buffer2 = Buffer.from('text\n'); + * crc32c.update(buffer2); + * + * crc32c.toString(); // 'DkjKuA==' + * ``` + **/ + /** + * @typedef {object} CRC32CValidator + * @property {Crc32cGeneratorToStringCallback} + * @property {Crc32cGeneratorValidateCallback} + * @property {Crc32cGeneratorUpdateCallback} + */ + /** + * @callback Crc32cGeneratorCallback + * @returns {CRC32CValidator} + */ + /** + * @typedef {object} StorageOptions + * @property {string} [projectId] The project ID from the Google Developer's + * Console, e.g. 'grape-spaceship-123'. We will also check the environment + * variable `GCLOUD_PROJECT` for your project ID. If your app is running + * in an environment which supports {@link + * https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application + * Application Default Credentials}, your project ID will be detected + * automatically. + * @property {string} [keyFilename] Full path to the a .json, .pem, or .p12 key + * downloaded from the Google Developers Console. If you provide a path to + * a JSON file, the `projectId` option above is not necessary. NOTE: .pem and + * .p12 require you to specify the `email` option as well. + * @property {string} [email] Account email address. Required when using a .pem + * or .p12 keyFilename. + * @property {object} [credentials] Credentials object. + * @property {string} [credentials.client_email] + * @property {string} [credentials.private_key] + * @property {object} [retryOptions] Options for customizing retries. Retriable server errors + * will be retried with exponential delay between them dictated by the formula + * max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout + * has been reached. Retries will only happen if autoRetry is set to true. + * @property {boolean} [retryOptions.autoRetry=true] Automatically retry requests if the + * response is related to rate limits or certain intermittent server + * errors. We will exponentially backoff subsequent requests by default. + * @property {number} [retryOptions.retryDelayMultiplier = 2] the multiplier by which to + * increase the delay time between the completion of failed requests, and the + * initiation of the subsequent retrying request. + * @property {number} [retryOptions.totalTimeout = 600] The total time, starting from + * when the initial request is sent, after which an error will + * be returned, regardless of the retrying attempts made meanwhile. + * @property {number} [retryOptions.maxRetryDelay = 64] The maximum delay time between requests. + * When this value is reached, ``retryDelayMultiplier`` will no longer be used to + * increase delay time. + * @property {number} [retryOptions.maxRetries=3] Maximum number of automatic retries + * attempted before returning the error. + * @property {function} [retryOptions.retryableErrorFn] Function that returns true if a given + * error should be retried and false otherwise. + * @property {enum} [retryOptions.idempotencyStrategy=IdempotencyStrategy.RetryConditional] Enumeration + * controls how conditionally idempotent operations are retried. Possible values are: RetryAlways - + * will respect other retry settings and attempt to retry conditionally idempotent operations. RetryConditional - + * will retry conditionally idempotent operations if the correct preconditions are set. RetryNever - never + * retry a conditionally idempotent operation. + * @property {string} [userAgent] The value to be prepended to the User-Agent + * header in API requests. + * @property {object} [authClient] `AuthClient` or `GoogleAuth` client to reuse instead of creating a new one. + * @property {number} [timeout] The amount of time in milliseconds to wait per http request before timing out. + * @property {object[]} [interceptors_] Array of custom request interceptors to be returned in the order they were assigned. + * @property {string} [apiEndpoint = storage.google.com] The API endpoint of the service used to make requests. + * @property {boolean} [useAuthWithCustomEndpoint = false] Controls whether or not to use authentication when using a custom endpoint. + * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} + */ + /** + * Constructs the Storage client. * - * @param {Storage} storage The Storage instance this HMAC key is - * attached to. - * @param {string} accessId The unique accessId for this HMAC key. - * @param {HmacKeyOptions} options Constructor configurations. * @example + * Create a client that uses Application Default Credentials + * (ADC) * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const hmacKey = storage.hmacKey('access-id'); * ``` - */ - constructor(storage, accessId, options) { - const methods = { - /** - * @typedef {object} DeleteHmacKeyOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * @typedef {array} DeleteHmacKeyResponse - * @property {object} 0 The full API response. - */ - /** - * @callback DeleteHmacKeyCallback - * @param {?Error} err Request error, if any. - * @param {object} apiResponse The full API response. - */ - /** - * Deletes an HMAC key. - * Key state must be set to `INACTIVE` prior to deletion. - * Caution: HMAC keys cannot be recovered once you delete them. - * - * The authenticated user must have `storage.hmacKeys.delete` permission for the project in which the key exists. - * - * @method HmacKey#delete - * @param {DeleteHmacKeyOptions} [options] Configuration options. - * @param {DeleteHmacKeyCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Delete HMAC key after making the key inactive. - * //- - * const hmacKey = storage.hmacKey('ACCESS_ID'); - * hmacKey.setMetadata({state: 'INACTIVE'}, (err, hmacKeyMetadata) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * hmacKey.delete((err) => { - * if (err) { - * console.error(err); - * return; - * } - * // The HMAC key is deleted. - * }); - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * const hmacKey = storage.hmacKey('ACCESS_ID'); - * hmacKey - * .setMetadata({state: 'INACTIVE'}) - * .then(() => { - * return hmacKey.delete(); - * }); - * ``` - */ - delete: true, - /** - * @callback GetHmacKeyCallback - * @param {?Error} err Request error, if any. - * @param {HmacKey} hmacKey this {@link HmacKey} instance. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} GetHmacKeyResponse - * @property {HmacKey} 0 This {@link HmacKey} instance. - * @property {object} 1 The full API response. - */ - /** - * @typedef {object} GetHmacKeyOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * Retrieves and populate an HMAC key's metadata, and return - * this {@link HmacKey} instance. - * - * HmacKey.get() does not give the HMAC key secret, as - * it is only returned on creation. - * - * The authenticated user must have `storage.hmacKeys.get` permission - * for the project in which the key exists. - * - * @method HmacKey#get - * @param {GetHmacKeyOptions} [options] Configuration options. - * @param {GetHmacKeyCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Get the HmacKey's Metadata. - * //- - * storage.hmacKey('ACCESS_ID') - * .get((err, hmacKey) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * // do something with the returned HmacKey object. - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * storage.hmacKey('ACCESS_ID') - * .get() - * .then((data) => { - * const hmacKey = data[0]; - * }); - * ``` - */ - get: true, - /** - * @typedef {object} GetHmacKeyMetadataOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * Retrieves and populate an HMAC key's metadata, and return - * the HMAC key's metadata as an object. - * - * HmacKey.getMetadata() does not give the HMAC key secret, as - * it is only returned on creation. - * - * The authenticated user must have `storage.hmacKeys.get` permission - * for the project in which the key exists. - * - * @method HmacKey#getMetadata - * @param {GetHmacKeyMetadataOptions} [options] Configuration options. - * @param {HmacKeyMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * //- - * // Get the HmacKey's metadata and populate to the metadata property. - * //- - * storage.hmacKey('ACCESS_ID') - * .getMetadata((err, hmacKeyMetadata) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * console.log(hmacKeyMetadata); - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * storage.hmacKey('ACCESS_ID') - * .getMetadata() - * .then((data) => { - * const hmacKeyMetadata = data[0]; - * console.log(hmacKeyMetadata); - * }); - * ``` - */ - getMetadata: true, - /** - * @typedef {object} SetHmacKeyMetadata Subset of {@link HmacKeyMetadata} to update. - * @property {string} state New state of the HmacKey. Either 'ACTIVE' or 'INACTIVE'. - * @property {string} [etag] Include an etag from a previous get HMAC key request - * to perform safe read-modify-write. - */ - /** - * @typedef {object} SetHmacKeyMetadataOptions - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * @callback HmacKeyMetadataCallback - * @param {?Error} err Request error, if any. - * @param {HmacKeyMetadata} metadata The updated {@link HmacKeyMetadata} object. - * @param {object} apiResponse The full API response. - */ - /** - * @typedef {array} HmacKeyMetadataResponse - * @property {HmacKeyMetadata} 0 The updated {@link HmacKeyMetadata} object. - * @property {object} 1 The full API response. - */ - /** - * Updates the state of an HMAC key. See {@link SetHmacKeyMetadata} for - * valid states. - * - * @method HmacKey#setMetadata - * @param {SetHmacKeyMetadata} metadata The new metadata. - * @param {SetHmacKeyMetadataOptions} [options] Configuration options. - * @param {HmacKeyMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * const metadata = { - * state: 'INACTIVE', - * }; - * - * storage.hmacKey('ACCESS_ID') - * .setMetadata(metadata, (err, hmacKeyMetadata) => { - * if (err) { - * // The request was an error. - * console.error(err); - * return; - * } - * console.log(hmacKeyMetadata); - * }); - * - * //- - * // If the callback is omitted, a promise is returned. - * //- - * storage.hmacKey('ACCESS_ID') - * .setMetadata(metadata) - * .then((data) => { - * const hmacKeyMetadata = data[0]; - * console.log(hmacKeyMetadata); - * }); - * ``` - */ - setMetadata: { - reqOpts: { - method: 'PUT', - }, + * + * @example + * Create a client with explicit credentials + * ``` + * const storage = new Storage({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json' + * }); + * ``` + * + * @example + * Create a client with credentials passed + * by value as a JavaScript object + * ``` + * const storage = new Storage({ + * projectId: 'your-project-id', + * credentials: { + * type: 'service_account', + * project_id: 'xxxxxxx', + * private_key_id: 'xxxx', + * private_key:'-----BEGIN PRIVATE KEY-----xxxxxxx\n-----END PRIVATE KEY-----\n', + * client_email: 'xxxx', + * client_id: 'xxx', + * auth_uri: 'https://accounts.google.com/o/oauth2/auth', + * token_uri: 'https://oauth2.googleapis.com/token', + * auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', + * client_x509_cert_url: 'xxx', + * } + * }); + * ``` + * + * @example + * Create a client with credentials passed + * by loading a JSON file directly from disk + * ``` + * const storage = new Storage({ + * projectId: 'your-project-id', + * credentials: require('/path/to-keyfile.json') + * }); + * ``` + * + * @example + * Create a client with an `AuthClient` (e.g. `DownscopedClient`) + * ``` + * const {DownscopedClient} = require('google-auth-library'); + * const authClient = new DownscopedClient({...}); + * + * const storage = new Storage({authClient}); + * ``` + * + * Additional samples: + * - https://github.com/googleapis/google-auth-library-nodejs#sample-usage-1 + * - https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/downscopedclient.js + * + * @param {StorageOptions} [options] Configuration options. + */ + constructor(options = {}) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; + const universe = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; + let apiEndpoint = `https://storage.${universe}`; + let customEndpoint = false; + // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. + const EMULATOR_HOST = process.env.STORAGE_EMULATOR_HOST; + if (typeof EMULATOR_HOST === 'string') { + apiEndpoint = Storage.sanitizeEndpoint(EMULATOR_HOST); + customEndpoint = true; + } + if (options.apiEndpoint && options.apiEndpoint !== apiEndpoint) { + apiEndpoint = Storage.sanitizeEndpoint(options.apiEndpoint); + customEndpoint = true; + } + options = Object.assign({}, options, { apiEndpoint }); + // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. + const baseUrl = EMULATOR_HOST || `${options.apiEndpoint}/storage/v1`; + const config = { + apiEndpoint: options.apiEndpoint, + retryOptions: { + autoRetry: ((_a = options.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined + ? (_b = options.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry + : exports.AUTO_RETRY_DEFAULT, + maxRetries: ((_c = options.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetries) + ? (_d = options.retryOptions) === null || _d === void 0 ? void 0 : _d.maxRetries + : exports.MAX_RETRY_DEFAULT, + retryDelayMultiplier: ((_e = options.retryOptions) === null || _e === void 0 ? void 0 : _e.retryDelayMultiplier) + ? (_f = options.retryOptions) === null || _f === void 0 ? void 0 : _f.retryDelayMultiplier + : exports.RETRY_DELAY_MULTIPLIER_DEFAULT, + totalTimeout: ((_g = options.retryOptions) === null || _g === void 0 ? void 0 : _g.totalTimeout) + ? (_h = options.retryOptions) === null || _h === void 0 ? void 0 : _h.totalTimeout + : exports.TOTAL_TIMEOUT_DEFAULT, + maxRetryDelay: ((_j = options.retryOptions) === null || _j === void 0 ? void 0 : _j.maxRetryDelay) + ? (_k = options.retryOptions) === null || _k === void 0 ? void 0 : _k.maxRetryDelay + : exports.MAX_RETRY_DELAY_DEFAULT, + retryableErrorFn: ((_l = options.retryOptions) === null || _l === void 0 ? void 0 : _l.retryableErrorFn) + ? (_m = options.retryOptions) === null || _m === void 0 ? void 0 : _m.retryableErrorFn + : exports.RETRYABLE_ERR_FN_DEFAULT, + idempotencyStrategy: ((_o = options.retryOptions) === null || _o === void 0 ? void 0 : _o.idempotencyStrategy) !== undefined + ? (_p = options.retryOptions) === null || _p === void 0 ? void 0 : _p.idempotencyStrategy + : IDEMPOTENCY_STRATEGY_DEFAULT, }, + baseUrl, + customEndpoint, + useAuthWithCustomEndpoint: options === null || options === void 0 ? void 0 : options.useAuthWithCustomEndpoint, + projectIdRequired: false, + scopes: [ + 'https://www.googleapis.com/auth/iam', + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/devstorage.full_control', + ], + packageJson: (0, package_json_helper_cjs_1.getPackageJSON)(), }; - const projectId = (options && options.projectId) || storage.projectId; - super({ - parent: storage, - id: accessId, - baseUrl: `/projects/${projectId}/hmacKeys`, - methods, - }); - this.storage = storage; - this.instanceRetryValue = storage.retryOptions.autoRetry; + super(config, options); + /** + * Reference to {@link Storage.acl}. + * + * @name Storage#acl + * @see Storage.acl + */ + this.acl = Storage.acl; + this.crc32cGenerator = + options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; + this.retryOptions = config.retryOptions; + this.getBucketsStream = paginator_1.paginator.streamify('getBuckets'); + this.getHmacKeysStream = paginator_1.paginator.streamify('getHmacKeys'); } - setMetadata(metadata, optionsOrCallback, cb) { - // ETag preconditions are not currently supported. Retries should be disabled if the idempotency strategy is not set to RetryAlways - if (this.storage.retryOptions.idempotencyStrategy !== - storage_js_1.IdempotencyStrategy.RetryAlways) { - this.storage.retryOptions.autoRetry = false; + static sanitizeEndpoint(url) { + if (!exports.PROTOCOL_REGEX.test(url)) { + url = `https://${url}`; } - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - cb = - typeof optionsOrCallback === 'function' - ? optionsOrCallback - : cb; - super - .setMetadata(metadata, options) - .then(resp => cb(null, ...resp)) - .catch(cb) - .finally(() => { - this.storage.retryOptions.autoRetry = this.instanceRetryValue; - }); - } -} -exports.HmacKey = HmacKey; -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(HmacKey); - - -/***/ }), - -/***/ 80352: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Iam = exports.IAMExceptionMessages = void 0; -const promisify_1 = __nccwpck_require__(19203); -const util_js_1 = __nccwpck_require__(59258); -var IAMExceptionMessages; -(function (IAMExceptionMessages) { - IAMExceptionMessages["POLICY_OBJECT_REQUIRED"] = "A policy object is required."; - IAMExceptionMessages["PERMISSIONS_REQUIRED"] = "Permissions are required."; -})(IAMExceptionMessages || (exports.IAMExceptionMessages = IAMExceptionMessages = {})); -/** - * Get and set IAM policies for your Cloud Storage bucket. - * - * See {@link https://cloud.google.com/storage/docs/access-control/iam#short_title_iam_management| Cloud Storage IAM Management} - * See {@link https://cloud.google.com/iam/docs/granting-changing-revoking-access| Granting, Changing, and Revoking Access} - * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} - * - * @constructor Iam - * - * @param {Bucket} bucket The parent instance. - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * // bucket.iam - * ``` - */ -class Iam { - constructor(bucket) { - this.request_ = bucket.request.bind(bucket); - this.resourceId_ = 'buckets/' + bucket.getId(); + return url.replace(/\/+$/, ''); // Remove trailing slashes } /** - * @typedef {object} GetPolicyOptions Requested options for IAM#getPolicy(). - * @property {number} [requestedPolicyVersion] The version of IAM policies to - * request. If a policy with a condition is requested without setting - * this, the server will return an error. This must be set to a value - * of 3 to retrieve IAM policies containing conditions. This is to - * prevent client code that isn't aware of IAM conditions from - * interpreting and modifying policies incorrectly. The service might - * return a policy with version lower than the one that was requested, - * based on the feature syntax in the policy fetched. - * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} - * @property {string} [userProject] The ID of the project which will be - * billed for the request. + * Get a reference to a Cloud Storage bucket. + * + * @param {string} name Name of the bucket. + * @param {object} [options] Configuration object. + * @param {string} [options.kmsKeyName] A Cloud KMS key that will be used to + * encrypt objects inserted into this bucket, if no encryption method is + * specified. + * @param {string} [options.userProject] User project to be billed for all + * requests made from this Bucket object. + * @returns {Bucket} + * @see Bucket + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const albums = storage.bucket('albums'); + * const photos = storage.bucket('photos'); + * ``` */ + bucket(name, options) { + if (!name) { + throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED); + } + return new bucket_js_1.Bucket(this, name, options); + } /** - * @typedef {array} GetPolicyResponse - * @property {Policy} 0 The policy. - * @property {object} 1 The full API response. + * Reference a channel to receive notifications about changes to your bucket. + * + * @param {string} id The ID of the channel. + * @param {string} resourceId The resource ID of the channel. + * @returns {Channel} + * @see Channel + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const channel = storage.channel('id', 'resource-id'); + * ``` */ + channel(id, resourceId) { + return new channel_js_1.Channel(this, id, resourceId); + } /** - * @typedef {object} Policy - * @property {PolicyBinding[]} policy.bindings Bindings associate members with roles. - * @property {string} [policy.etag] Etags are used to perform a read-modify-write. - * @property {number} [policy.version] The syntax schema version of the Policy. - * To set an IAM policy with conditional binding, this field must be set to - * 3 or greater. - * See {@link https://cloud.google.com/iam/docs/policies#versions| IAM Policy versions} + * @typedef {array} CreateBucketResponse + * @property {Bucket} 0 The new {@link Bucket}. + * @property {object} 1 The full API response. */ /** - * @typedef {object} PolicyBinding - * @property {string} role Role that is assigned to members. - * @property {string[]} members Specifies the identities requesting access for the bucket. - * @property {Expr} [condition] The condition that is associated with this binding. + * @callback CreateBucketCallback + * @param {?Error} err Request error, if any. + * @param {Bucket} bucket The new {@link Bucket}. + * @param {object} apiResponse The full API response. */ /** - * @typedef {object} Expr - * @property {string} [title] An optional title for the expression, i.e. a - * short string describing its purpose. This can be used e.g. in UIs - * which allow to enter the expression. - * @property {string} [description] An optional description of the - * expression. This is a longer text which describes the expression, - * e.g. when hovered over it in a UI. - * @property {string} expression Textual representation of an expression in - * Common Expression Language syntax. The application context of the - * containing message determines which well-known feature set of CEL - * is supported.The condition that is associated with this binding. + * Metadata to set for the bucket. * - * @see [Condition] https://cloud.google.com/storage/docs/access-control/iam#conditions + * @typedef {object} CreateBucketRequest + * @property {boolean} [archive=false] Specify the storage class as Archive. + * @property {object} [autoclass.enabled=false] Specify whether Autoclass is + * enabled for the bucket. + * @property {object} [autoclass.terminalStorageClass='NEARLINE'] The storage class that objects in an Autoclass bucket eventually transition to if + * they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE. + * @property {boolean} [coldline=false] Specify the storage class as Coldline. + * @property {Cors[]} [cors=[]] Specify the CORS configuration to use. + * @property {CustomPlacementConfig} [customPlacementConfig={}] Specify the bucket's regions for dual-region buckets. + * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. + * @property {boolean} [dra=false] Specify the storage class as Durable Reduced + * Availability. + * @property {boolean} [enableObjectRetention=false] Specify whether or not object retention should be enabled on this bucket. + * @property {object} [hierarchicalNamespace.enabled=false] Specify whether or not to enable hierarchical namespace on this bucket. + * @property {string} [location] Specify the bucket's location. If specifying + * a dual-region, the `customPlacementConfig` property should be set in conjunction. + * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. + * @property {boolean} [multiRegional=false] Specify the storage class as + * Multi-Regional. + * @property {boolean} [nearline=false] Specify the storage class as Nearline. + * @property {boolean} [regional=false] Specify the storage class as Regional. + * @property {boolean} [requesterPays=false] Force the use of the User Project metadata field to assign operational + * costs when an operation is made on a Bucket and its objects. + * @property {string} [rpo] For dual-region buckets, controls whether turbo + * replication is enabled (`ASYNC_TURBO`) or disabled (`DEFAULT`). + * @property {boolean} [standard=true] Specify the storage class as Standard. + * @property {string} [storageClass] The new storage class. (`standard`, + * `nearline`, `coldline`, or `archive`). + * **Note:** The storage classes `multi_regional`, `regional`, and + * `durable_reduced_availability` are now legacy and will be deprecated in + * the future. + * @property {Versioning} [versioning=undefined] Specify the versioning status. + * @property {string} [userProject] The ID of the project which will be billed + * for the request. */ /** - * Get the IAM policy. + * Create a bucket. * - * @param {GetPolicyOptions} [options] Request options. - * @param {GetPolicyCallback} [callback] Callback function. - * @returns {Promise} + * Cloud Storage uses a flat namespace, so you can't create a bucket with + * a name that is already in use. For more information, see + * {@link https://cloud.google.com/storage/docs/bucketnaming.html#requirements| Bucket Naming Guidelines}. * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/getIamPolicy| Buckets: setIamPolicy API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert| Buckets: insert API Documentation} + * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} + * + * @param {string} name Name of the bucket to create. + * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. + * @param {CreateBucketCallback} [callback] Callback function. + * @returns {Promise} + * @throws {Error} If a name is not provided. + * @see Bucket#create * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); + * const callback = function(err, bucket, apiResponse) { + * // `bucket` is a Bucket object. + * }; * - * bucket.iam.getPolicy( - * {requestedPolicyVersion: 3}, - * function(err, policy, apiResponse) { + * storage.createBucket('new-bucket', callback); * - * }, - * ); + * //- + * // Create a bucket in a specific location and region. See the + * // Official JSON API docs for complete details on the `location` + * option. + * // + * //- + * const metadata = { + * location: 'US-CENTRAL1', + * regional: true + * }; + * + * storage.createBucket('new-bucket', metadata, callback); + * + * //- + * // Create a bucket with a retention policy of 6 months. + * //- + * const metadata = { + * retentionPolicy: { + * retentionPeriod: 15780000 // 6 months in seconds. + * } + * }; + * + * storage.createBucket('new-bucket', metadata, callback); + * + * //- + * // Enable versioning on a new bucket. + * //- + * const metadata = { + * versioning: { + * enabled: true + * } + * }; + * + * storage.createBucket('new-bucket', metadata, callback); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.iam.getPolicy({requestedPolicyVersion: 3}) - * .then(function(data) { - * const policy = data[0]; - * const apiResponse = data[1]; - * }); + * storage.createBucket('new-bucket').then(function(data) { + * const bucket = data[0]; + * const apiResponse = data[1]; + * }); * * ``` - * @example include:samples/iam.js - * region_tag:storage_view_bucket_iam_members - * Example of retrieving a bucket's IAM policy: + * @example include:samples/buckets.js + * region_tag:storage_create_bucket + * Another example: */ - getPolicy(optionsOrCallback, callback) { - const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); - const qs = {}; - if (options.userProject) { - qs.userProject = options.userProject; + createBucket(name, metadataOrCallback, callback) { + if (!name) { + throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED_CREATE); } - if (options.requestedPolicyVersion !== null && - options.requestedPolicyVersion !== undefined) { - qs.optionsRequestedPolicyVersion = options.requestedPolicyVersion; + let metadata; + if (!callback) { + callback = metadataOrCallback; + metadata = {}; } - this.request_({ - uri: '/iam', - qs, - }, cb); + else { + metadata = metadataOrCallback; + } + const body = { + ...metadata, + name, + }; + const storageClasses = { + archive: 'ARCHIVE', + coldline: 'COLDLINE', + dra: 'DURABLE_REDUCED_AVAILABILITY', + multiRegional: 'MULTI_REGIONAL', + nearline: 'NEARLINE', + regional: 'REGIONAL', + standard: 'STANDARD', + }; + const storageClassKeys = Object.keys(storageClasses); + for (const storageClass of storageClassKeys) { + if (body[storageClass]) { + if (metadata.storageClass && metadata.storageClass !== storageClass) { + throw new Error(`Both \`${storageClass}\` and \`storageClass\` were provided.`); + } + body.storageClass = storageClasses[storageClass]; + delete body[storageClass]; + } + } + if (body.requesterPays) { + body.billing = { + requesterPays: body.requesterPays, + }; + delete body.requesterPays; + } + const query = { + project: this.projectId, + }; + if (body.userProject) { + query.userProject = body.userProject; + delete body.userProject; + } + if (body.enableObjectRetention) { + query.enableObjectRetention = body.enableObjectRetention; + delete body.enableObjectRetention; + } + if (body.predefinedAcl) { + query.predefinedAcl = body.predefinedAcl; + delete body.predefinedAcl; + } + if (body.predefinedDefaultObjectAcl) { + query.predefinedDefaultObjectAcl = body.predefinedDefaultObjectAcl; + delete body.predefinedDefaultObjectAcl; + } + if (body.projection) { + query.projection = body.projection; + delete body.projection; + } + this.request({ + method: 'POST', + uri: '/b', + qs: query, + json: body, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; + } + const bucket = this.bucket(name); + bucket.metadata = resp; + callback(null, bucket, resp); + }); } /** - * Set the IAM policy. - * - * @throws {Error} If no policy is provided. + * @typedef {object} CreateHmacKeyOptions + * @property {string} [projectId] The project ID of the project that owns + * the service account of the requested HMAC key. If not provided, + * the project ID used to instantiate the Storage client will be used. + * @property {string} [userProject] This parameter is currently ignored. + */ + /** + * @typedef {object} HmacKeyMetadata + * @property {string} accessId The access id identifies which HMAC key was + * used to sign a request when authenticating with HMAC. + * @property {string} etag Used to perform a read-modify-write of the key. + * @property {string} id The resource name of the HMAC key. + * @property {string} projectId The project ID. + * @property {string} serviceAccountEmail The service account's email this + * HMAC key is created for. + * @property {string} state The state of this HMAC key. One of "ACTIVE", + * "INACTIVE" or "DELETED". + * @property {string} timeCreated The creation time of the HMAC key in + * RFC 3339 format. + * @property {string} [updated] The time this HMAC key was last updated in + * RFC 3339 format. + */ + /** + * @typedef {array} CreateHmacKeyResponse + * @property {HmacKey} 0 The HmacKey instance created from API response. + * @property {string} 1 The HMAC key's secret used to access the XML API. + * @property {object} 3 The raw API response. + */ + /** + * @callback CreateHmacKeyCallback Callback function. + * @param {?Error} err Request error, if any. + * @param {HmacKey} hmacKey The HmacKey instance created from API response. + * @param {string} secret The HMAC key's secret used to access the XML API. + * @param {object} apiResponse The raw API response. + */ + /** + * Create an HMAC key associated with an service account to authenticate + * requests to the Cloud Storage XML API. * - * @param {Policy} policy The policy. - * @param {SetPolicyOptions} [options] Configuration options. - * @param {SetPolicyCallback} callback Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/setIamPolicy| Buckets: setIamPolicy API Documentation} - * See {@link https://cloud.google.com/iam/docs/understanding-roles| IAM Roles} + * @param {string} serviceAccountEmail The service account's email address + * with which the HMAC key is created for. + * @param {CreateHmacKeyCallback} [callback] Callback function. + * @return {Promise} * * @example * ``` - * const {Storage} = require('@google-cloud/storage'); + * const {Storage} = require('google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); * - * const myPolicy = { - * bindings: [ - * { - * role: 'roles/storage.admin', - * members: - * ['serviceAccount:myotherproject@appspot.gserviceaccount.com'] - * } - * ] - * }; + * // Replace with your service account's email address + * const serviceAccountEmail = + * 'my-service-account@appspot.gserviceaccount.com'; * - * bucket.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {}); + * storage.createHmacKey(serviceAccountEmail, function(err, hmacKey, secret) { + * if (!err) { + * // Securely store the secret for use with the XML API. + * } + * }); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.iam.setPolicy(myPolicy).then(function(data) { - * const policy = data[0]; - * const apiResponse = data[1]; - * }); - * + * storage.createHmacKey(serviceAccountEmail) + * .then((response) => { + * const hmacKey = response[0]; + * const secret = response[1]; + * // Securely store the secret for use with the XML API. + * }); * ``` - * @example include:samples/iam.js - * region_tag:storage_add_bucket_iam_member - * Example of adding to a bucket's IAM policy: - * - * @example include:samples/iam.js - * region_tag:storage_remove_bucket_iam_member - * Example of removing from a bucket's IAM policy: */ - setPolicy(policy, optionsOrCallback, callback) { - if (policy === null || typeof policy !== 'object') { - throw new Error(IAMExceptionMessages.POLICY_OBJECT_REQUIRED); - } - const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); - let maxRetries; - if (policy.etag === undefined) { - maxRetries = 0; + createHmacKey(serviceAccountEmail, optionsOrCb, cb) { + if (typeof serviceAccountEmail !== 'string') { + throw new Error(StorageExceptionMessages.HMAC_SERVICE_ACCOUNT); } - this.request_({ - method: 'PUT', - uri: '/iam', - maxRetries, - json: Object.assign({ - resourceId: this.resourceId_, - }, policy), - qs: options, - }, cb); + const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); + const query = Object.assign({}, options, { serviceAccountEmail }); + const projectId = query.projectId || this.projectId; + delete query.projectId; + this.request({ + method: 'POST', + uri: `/projects/${projectId}/hmacKeys`, + qs: query, + maxRetries: 0, //explicitly set this value since this is a non-idempotent function + }, (err, resp) => { + if (err) { + callback(err, null, null, resp); + return; + } + const metadata = resp.metadata; + const hmacKey = this.hmacKey(metadata.accessId, { + projectId: metadata.projectId, + }); + hmacKey.metadata = resp.metadata; + callback(null, hmacKey, resp.secret, resp); + }); } /** - * Test a set of permissions for a resource. + * Query object for listing buckets. * - * @throws {Error} If permissions are not provided. + * @typedef {object} GetBucketsRequest + * @property {boolean} [autoPaginate=true] Have pagination handled + * automatically. + * @property {number} [maxApiCalls] Maximum number of API calls to make. + * @property {number} [maxResults] Maximum number of items plus prefixes to + * return per call. + * Note: By default will handle pagination automatically + * if more than 1 page worth of results are requested per call. + * When `autoPaginate` is set to `false` the smaller of `maxResults` + * or 1 page of results will be returned per call. + * @property {string} [pageToken] A previously-returned page token + * representing part of the larger set of results to view. + * @property {string} [userProject] The ID of the project which will be billed + * for the request. + * @param {boolean} [softDeleted] If true, returns the soft-deleted object. + * Object `generation` is required if `softDeleted` is set to True. + */ + /** + * @typedef {array} GetBucketsResponse + * @property {Bucket[]} 0 Array of {@link Bucket} instances. + * @property {object} 1 nextQuery A query object to receive more results. + * @property {object} 2 The full API response. + */ + /** + * @callback GetBucketsCallback + * @param {?Error} err Request error, if any. + * @param {Bucket[]} buckets Array of {@link Bucket} instances. + * @param {object} nextQuery A query object to receive more results. + * @param {object} apiResponse The full API response. + */ + /** + * Get Bucket objects for all of the buckets in your project. * - * @param {string|string[]} permissions The permission(s) to test for. - * @param {TestIamPermissionsOptions} [options] Configuration object. - * @param {TestIamPermissionsCallback} [callback] Callback function. - * @returns {Promise} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list| Buckets: list API Documentation} * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/testIamPermissions| Buckets: testIamPermissions API Documentation} + * @param {GetBucketsRequest} [query] Query object for listing buckets. + * @param {GetBucketsCallback} [callback] Callback function. + * @returns {Promise} * * @example * ``` * const {Storage} = require('@google-cloud/storage'); * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); + * storage.getBuckets(function(err, buckets) { + * if (!err) { + * // buckets is an array of Bucket objects. + * } + * }); * * //- - * // Test a single permission. + * // To control how many API requests are made and page through the results + * // manually, set `autoPaginate` to `false`. * //- - * const test = 'storage.buckets.delete'; + * const callback = function(err, buckets, nextQuery, apiResponse) { + * if (nextQuery) { + * // More results exist. + * storage.getBuckets(nextQuery, callback); + * } * - * bucket.iam.testPermissions(test, function(err, permissions, apiResponse) { - * console.log(permissions); - * // { - * // "storage.buckets.delete": true - * // } - * }); + * // The `metadata` property is populated for you with the metadata at the + * // time of fetching. + * buckets[0].metadata; * - * //- - * // Test several permissions at once. - * //- - * const tests = [ - * 'storage.buckets.delete', - * 'storage.buckets.get' - * ]; + * // However, in cases where you are concerned the metadata could have + * // changed, use the `getMetadata` method. + * buckets[0].getMetadata(function(err, metadata, apiResponse) {}); + * }; * - * bucket.iam.testPermissions(tests, function(err, permissions) { - * console.log(permissions); - * // { - * // "storage.buckets.delete": false, - * // "storage.buckets.get": true - * // } - * }); + * storage.getBuckets({ + * autoPaginate: false + * }, callback); * * //- * // If the callback is omitted, we'll return a Promise. * //- - * bucket.iam.testPermissions(test).then(function(data) { - * const permissions = data[0]; - * const apiResponse = data[1]; + * storage.getBuckets().then(function(data) { + * const buckets = data[0]; * }); + * * ``` + * @example include:samples/buckets.js + * region_tag:storage_list_buckets + * Another example: */ - testPermissions(permissions, optionsOrCallback, callback) { - if (!Array.isArray(permissions) && typeof permissions !== 'string') { - throw new Error(IAMExceptionMessages.PERMISSIONS_REQUIRED); - } - const { options, callback: cb } = (0, util_js_1.normalize)(optionsOrCallback, callback); - const permissionsArray = Array.isArray(permissions) - ? permissions - : [permissions]; - const req = Object.assign({ - permissions: permissionsArray, - }, options); - this.request_({ - uri: '/iam/testPermissions', - qs: req, - useQuerystring: true, + getBuckets(optionsOrCallback, cb) { + const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); + options.project = options.project || this.projectId; + this.request({ + uri: '/b', + qs: options, }, (err, resp) => { if (err) { - cb(err, null, resp); - return; - } - const availablePermissions = Array.isArray(resp.permissions) - ? resp.permissions - : []; - const permissionsHash = permissionsArray.reduce((acc, permission) => { - acc[permission] = availablePermissions.indexOf(permission) > -1; - return acc; - }, {}); - cb(null, permissionsHash, resp); - }); - } -} -exports.Iam = Iam; -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. - */ -(0, promisify_1.promisifyAll)(Iam); - - -/***/ }), - -/***/ 27577: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// Copyright 2019 Google LLC -// -// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Notification = exports.Iam = exports.HmacKey = exports.File = exports.Channel = exports.Bucket = exports.Storage = exports.IdempotencyStrategy = exports.ApiError = void 0; -/** - * The `@google-cloud/storage` package has a single named export which is the - * {@link Storage} (ES6) class, which should be instantiated with `new`. - * - * See {@link Storage} and {@link ClientConfig} for client methods and - * configuration options. - * - * @module {Storage} @google-cloud/storage - * @alias nodejs-storage - * - * @example - * Install the client library with npm: - * ``` - * npm install --save @google-cloud/storage - * ``` - * - * @example - * Import the client library - * ``` - * const {Storage} = require('@google-cloud/storage'); - * ``` - * - * @example - * Create a client that uses Application - * Default Credentials (ADC): - * ``` - * const storage = new Storage(); - * ``` - * - * @example - * Create a client with explicit - * credentials: - * ``` - * const storage = new Storage({ projectId: - * 'your-project-id', keyFilename: '/path/to/keyfile.json' - * }); - * ``` - * - * @example include:samples/quickstart.js - * region_tag:storage_quickstart - * Full quickstart example: - */ -var index_js_1 = __nccwpck_require__(4052); -Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return index_js_1.ApiError; } })); -var storage_js_1 = __nccwpck_require__(33030); -Object.defineProperty(exports, "IdempotencyStrategy", ({ enumerable: true, get: function () { return storage_js_1.IdempotencyStrategy; } })); -Object.defineProperty(exports, "Storage", ({ enumerable: true, get: function () { return storage_js_1.Storage; } })); -var bucket_js_1 = __nccwpck_require__(23973); -Object.defineProperty(exports, "Bucket", ({ enumerable: true, get: function () { return bucket_js_1.Bucket; } })); -__exportStar(__nccwpck_require__(55810), exports); -var channel_js_1 = __nccwpck_require__(62665); -Object.defineProperty(exports, "Channel", ({ enumerable: true, get: function () { return channel_js_1.Channel; } })); -var file_js_1 = __nccwpck_require__(4713); -Object.defineProperty(exports, "File", ({ enumerable: true, get: function () { return file_js_1.File; } })); -__exportStar(__nccwpck_require__(40725), exports); -var hmacKey_js_1 = __nccwpck_require__(64654); -Object.defineProperty(exports, "HmacKey", ({ enumerable: true, get: function () { return hmacKey_js_1.HmacKey; } })); -var iam_js_1 = __nccwpck_require__(80352); -Object.defineProperty(exports, "Iam", ({ enumerable: true, get: function () { return iam_js_1.Iam; } })); -var notification_js_1 = __nccwpck_require__(21178); -Object.defineProperty(exports, "Notification", ({ enumerable: true, get: function () { return notification_js_1.Notification; } })); -__exportStar(__nccwpck_require__(45594), exports); - - -/***/ }), - -/***/ 4052: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.util = exports.ApiError = exports.ServiceObject = exports.Service = void 0; -var service_js_1 = __nccwpck_require__(17370); -Object.defineProperty(exports, "Service", ({ enumerable: true, get: function () { return service_js_1.Service; } })); -var service_object_js_1 = __nccwpck_require__(73409); -Object.defineProperty(exports, "ServiceObject", ({ enumerable: true, get: function () { return service_object_js_1.ServiceObject; } })); -var util_js_1 = __nccwpck_require__(38064); -Object.defineProperty(exports, "ApiError", ({ enumerable: true, get: function () { return util_js_1.ApiError; } })); -Object.defineProperty(exports, "util", ({ enumerable: true, get: function () { return util_js_1.util; } })); - - -/***/ }), - -/***/ 73409: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServiceObject = void 0; -/*! - * Copyright 2022 Google LLC. All Rights Reserved. - * - * 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. - */ -const promisify_1 = __nccwpck_require__(19203); -const events_1 = __nccwpck_require__(82361); -const util_js_1 = __nccwpck_require__(38064); -/** - * ServiceObject is a base class, meant to be inherited from by a "service - * object," like a BigQuery dataset or Storage bucket. - * - * Most of the time, these objects share common functionality; they can be - * created or deleted, and you can get or set their metadata. - * - * By inheriting from this class, a service object will be extended with these - * shared behaviors. Note that any method can be overridden when the service - * object requires specific behavior. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -class ServiceObject extends events_1.EventEmitter { - /* - * @constructor - * @alias module:common/service-object - * - * @private - * - * @param {object} config - Configuration object. - * @param {string} config.baseUrl - The base URL to make API requests to. - * @param {string} config.createMethod - The method which creates this object. - * @param {string=} config.id - The identifier of the object. For example, the - * name of a Storage bucket or Pub/Sub topic. - * @param {object=} config.methods - A map of each method name that should be inherited. - * @param {object} config.methods[].reqOpts - Default request options for this - * particular method. A common use case is when `setMetadata` requires a - * `PUT` method to override the default `PATCH`. - * @param {object} config.parent - The parent service instance. For example, an - * instance of Storage if the object is Bucket. - */ - constructor(config) { - super(); - this.metadata = {}; - this.baseUrl = config.baseUrl; - this.parent = config.parent; // Parent class. - this.id = config.id; // Name or ID (e.g. dataset ID, bucket name, etc). - this.createMethod = config.createMethod; - this.methods = config.methods || {}; - this.interceptors = []; - this.projectId = config.projectId; - if (config.methods) { - // This filters the ServiceObject instance (e.g. a "File") to only have - // the configured methods. We make a couple of exceptions for core- - // functionality ("request()" and "getRequestInterceptors()") - Object.getOwnPropertyNames(ServiceObject.prototype) - .filter(methodName => { - return ( - // All ServiceObjects need `request` and `getRequestInterceptors`. - // clang-format off - !/^request/.test(methodName) && - !/^getRequestInterceptors/.test(methodName) && - // clang-format on - // The ServiceObject didn't redefine the method. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this[methodName] === - // eslint-disable-next-line @typescript-eslint/no-explicit-any - ServiceObject.prototype[methodName] && - // This method isn't wanted. - !config.methods[methodName]); - }) - .forEach(methodName => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this[methodName] = undefined; - }); - } - } - create(optionsOrCallback, callback) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - const args = [this.id]; - if (typeof optionsOrCallback === 'function') { - callback = optionsOrCallback; - } - if (typeof optionsOrCallback === 'object') { - args.push(optionsOrCallback); - } - // Wrap the callback to return *this* instance of the object, not the - // newly-created one. - // tslint: disable-next-line no-any - function onCreate(...args) { - const [err, instance] = args; - if (!err) { - self.metadata = instance.metadata; - if (self.id && instance.metadata) { - self.id = instance.metadata.id; - } - args[1] = self; // replace the created `instance` with this one. - } - callback(...args); - } - args.push(onCreate); - // eslint-disable-next-line prefer-spread - this.createMethod.apply(null, args); - } - delete(optionsOrCallback, cb) { - var _a; - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const ignoreNotFound = options.ignoreNotFound; - delete options.ignoreNotFound; - const methodConfig = (typeof this.methods.delete === 'object' && this.methods.delete) || {}; - const reqOpts = { - method: 'DELETE', - uri: '', - ...methodConfig.reqOpts, - qs: { - ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, - ...options, - }, - }; - // The `request` method may have been overridden to hold any special - // behavior. Ensure we call the original `request` method. - ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { - if (err) { - if (err.code === 404 && ignoreNotFound) { - err = null; - } - } - callback(err, res); - }); - } - exists(optionsOrCallback, cb) { - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - this.get(options, err => { - if (err) { - if (err.code === 404) { - callback(null, false); - } - else { - callback(err); - } - return; - } - callback(null, true); - }); - } - get(optionsOrCallback, cb) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - const [opts, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const options = Object.assign({}, opts); - const autoCreate = options.autoCreate && typeof this.create === 'function'; - delete options.autoCreate; - function onCreate(err, instance, apiResponse) { - if (err) { - if (err.code === 409) { - self.get(options, callback); - return; - } - callback(err, null, apiResponse); + callback(err, null, null, resp); return; } - callback(null, instance, apiResponse); - } - this.getMetadata(options, (err, metadata) => { - if (err) { - if (err.code === 404 && autoCreate) { - const args = []; - if (Object.keys(options).length > 0) { - args.push(options); - } - args.push(onCreate); - self.create(...args); - return; - } - callback(err, null, metadata); - return; + const itemsArray = resp.items ? resp.items : []; + const unreachableArray = resp.unreachable ? resp.unreachable : []; + const buckets = itemsArray.map((bucket) => { + const bucketInstance = this.bucket(bucket.id); + bucketInstance.metadata = bucket; + return bucketInstance; + }); + if (unreachableArray.length > 0) { + unreachableArray.forEach((fullPath) => { + const name = fullPath.split('/').pop(); + if (name) { + const placeholder = this.bucket(name); + placeholder.unreachable = true; + placeholder.metadata = {}; + buckets.push(placeholder); + } + }); } - callback(null, self, metadata); + const nextQuery = resp.nextPageToken + ? Object.assign({}, options, { pageToken: resp.nextPageToken }) + : null; + callback(null, buckets, nextQuery, resp); }); } - getMetadata(optionsOrCallback, cb) { - var _a; - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const methodConfig = (typeof this.methods.getMetadata === 'object' && - this.methods.getMetadata) || - {}; - const reqOpts = { - uri: '', - ...methodConfig.reqOpts, - qs: { - ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.qs, - ...options, - }, - }; - // The `request` method may have been overridden to hold any special - // behavior. Ensure we call the original `request` method. - ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { - this.metadata = body; - callback(err, this.metadata, res); + getHmacKeys(optionsOrCb, cb) { + const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); + const query = Object.assign({}, options); + const projectId = query.projectId || this.projectId; + delete query.projectId; + this.request({ + uri: `/projects/${projectId}/hmacKeys`, + qs: query, + }, (err, resp) => { + if (err) { + callback(err, null, null, resp); + return; + } + const itemsArray = resp.items ? resp.items : []; + const hmacKeys = itemsArray.map((hmacKey) => { + const hmacKeyInstance = this.hmacKey(hmacKey.accessId, { + projectId: hmacKey.projectId, + }); + hmacKeyInstance.metadata = hmacKey; + return hmacKeyInstance; + }); + const nextQuery = resp.nextPageToken + ? Object.assign({}, options, { pageToken: resp.nextPageToken }) + : null; + callback(null, hmacKeys, nextQuery, resp); }); } /** - * Return the user's custom request interceptors. + * @typedef {array} GetServiceAccountResponse + * @property {object} 0 The service account resource. + * @property {object} 1 The full + * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. */ - getRequestInterceptors() { - // Interceptors should be returned in the order they were assigned. - const localInterceptors = this.interceptors - .filter(interceptor => typeof interceptor.request === 'function') - .map(interceptor => interceptor.request); - return this.parent.getRequestInterceptors().concat(localInterceptors); - } - setMetadata(metadata, optionsOrCallback, cb) { - var _a, _b; - const [options, callback] = util_js_1.util.maybeOptionsOrCallback(optionsOrCallback, cb); - const methodConfig = (typeof this.methods.setMetadata === 'object' && - this.methods.setMetadata) || - {}; - const reqOpts = { - method: 'PATCH', - uri: '', - ...methodConfig.reqOpts, - json: { - ...(_a = methodConfig.reqOpts) === null || _a === void 0 ? void 0 : _a.json, - ...metadata, - }, - qs: { - ...(_b = methodConfig.reqOpts) === null || _b === void 0 ? void 0 : _b.qs, - ...options, - }, - }; - // The `request` method may have been overridden to hold any special - // behavior. Ensure we call the original `request` method. - ServiceObject.prototype.request.call(this, reqOpts, (err, body, res) => { - this.metadata = body; - callback(err, this.metadata, res); - }); - } - request_(reqOpts, callback) { - reqOpts = { ...reqOpts }; - if (this.projectId) { - reqOpts.projectId = this.projectId; - } - const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; - const uriComponents = [this.baseUrl, this.id || '', reqOpts.uri]; - if (isAbsoluteUrl) { - uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); - } - reqOpts.uri = uriComponents - .filter(x => x.trim()) // Limit to non-empty strings. - .map(uriComponent => { - const trimSlashesRegex = /^\/*|\/*$/g; - return uriComponent.replace(trimSlashesRegex, ''); - }) - .join('/'); - const childInterceptors = Array.isArray(reqOpts.interceptors_) - ? reqOpts.interceptors_ - : []; - const localInterceptors = [].slice.call(this.interceptors); - reqOpts.interceptors_ = childInterceptors.concat(localInterceptors); - if (reqOpts.shouldReturnStream) { - return this.parent.requestStream(reqOpts); - } - this.parent.request(reqOpts, callback); - } - request(reqOpts, callback) { - this.request_(reqOpts, callback); - } /** - * Make an authenticated API request. - * - * @param {object} reqOpts - Request options that are passed to `request`. - * @param {string} reqOpts.uri - A URI relative to the baseUrl. + * @callback GetServiceAccountCallback + * @param {?Error} err Request error, if any. + * @param {object} serviceAccount The serviceAccount resource. + * @param {string} serviceAccount.emailAddress The service account email + * address. + * @param {object} apiResponse The full + * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. */ - requestStream(reqOpts) { - const opts = { ...reqOpts, shouldReturnStream: true }; - return this.request_(opts); - } -} -exports.ServiceObject = ServiceObject; -(0, promisify_1.promisifyAll)(ServiceObject, { exclude: ['getRequestInterceptors'] }); - - -/***/ }), - -/***/ 17370: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Service = exports.DEFAULT_PROJECT_ID_TOKEN = void 0; -/*! - * Copyright 2022 Google LLC. All Rights Reserved. - * - * 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. - */ -const google_auth_library_1 = __nccwpck_require__(20810); -const uuid = __importStar(__nccwpck_require__(44458)); -const util_js_1 = __nccwpck_require__(38064); -const util_js_2 = __nccwpck_require__(59258); -exports.DEFAULT_PROJECT_ID_TOKEN = '{{projectId}}'; -class Service { /** - * Service is a base class, meant to be inherited from by a "service," like - * BigQuery or Storage. + * Get the email address of this project's Google Cloud Storage service + * account. * - * This handles making authenticated requests by exposing a `makeReq_` - * function. + * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount/get| Projects.serviceAccount: get API Documentation} + * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| Projects.serviceAccount Resource} * - * @constructor - * @alias module:common/service + * @param {object} [options] Configuration object. + * @param {string} [options.userProject] User project to be billed for this + * request. + * @param {GetServiceAccountCallback} [callback] Callback function. + * @returns {Promise} * - * @param {object} config - Configuration object. - * @param {string} config.baseUrl - The base URL to make API requests to. - * @param {string[]} config.scopes - The scopes required for the request. - * @param {object=} options - [Configuration object](#/docs). - */ - constructor(config, options = {}) { - this.baseUrl = config.baseUrl; - this.apiEndpoint = config.apiEndpoint; - this.timeout = options.timeout; - this.globalInterceptors = Array.isArray(options.interceptors_) - ? options.interceptors_ - : []; - this.interceptors = []; - this.packageJson = config.packageJson; - this.projectId = options.projectId || exports.DEFAULT_PROJECT_ID_TOKEN; - this.projectIdRequired = config.projectIdRequired !== false; - this.providedUserAgent = options.userAgent; - this.universeDomain = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; - this.customEndpoint = config.customEndpoint || false; - this.makeAuthenticatedRequest = util_js_1.util.makeAuthenticatedRequestFactory({ - ...config, - projectIdRequired: this.projectIdRequired, - projectId: this.projectId, - authClient: options.authClient || config.authClient, - credentials: options.credentials, - keyFile: options.keyFilename, - email: options.email, - clientOptions: { - universeDomain: options.universeDomain, - ...options.clientOptions, - }, - }); - this.authClient = this.makeAuthenticatedRequest.authClient; - const isCloudFunctionEnv = !!process.env.FUNCTION_NAME; - if (isCloudFunctionEnv) { - this.interceptors.push({ - request(reqOpts) { - reqOpts.forever = false; - return reqOpts; - }, - }); - } - } - /** - * Return the user's custom request interceptors. + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * + * storage.getServiceAccount(function(err, serviceAccount, apiResponse) { + * if (!err) { + * const serviceAccountEmail = serviceAccount.emailAddress; + * } + * }); + * + * //- + * // If the callback is omitted, we'll return a Promise. + * //- + * storage.getServiceAccount().then(function(data) { + * const serviceAccountEmail = data[0].emailAddress; + * const apiResponse = data[1]; + * }); + * ``` */ - getRequestInterceptors() { - // Interceptors should be returned in the order they were assigned. - return [].slice - .call(this.globalInterceptors) - .concat(this.interceptors) - .filter(interceptor => typeof interceptor.request === 'function') - .map(interceptor => interceptor.request); - } - getProjectId(callback) { - if (!callback) { - return this.getProjectIdAsync(); - } - this.getProjectIdAsync().then(p => callback(null, p), callback); - } - async getProjectIdAsync() { - const projectId = await this.authClient.getProjectId(); - if (this.projectId === exports.DEFAULT_PROJECT_ID_TOKEN && projectId) { - this.projectId = projectId; - } - return this.projectId; - } - request_(reqOpts, callback) { - reqOpts = { ...reqOpts, timeout: this.timeout }; - const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; - const uriComponents = [this.baseUrl]; - if (this.projectIdRequired) { - if (reqOpts.projectId) { - uriComponents.push('projects'); - uriComponents.push(reqOpts.projectId); - } - else { - uriComponents.push('projects'); - uriComponents.push(this.projectId); + getServiceAccount(optionsOrCallback, cb) { + const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); + this.request({ + uri: `/projects/${this.projectId}/serviceAccount`, + qs: options, + }, (err, resp) => { + if (err) { + callback(err, null, resp); + return; } - } - uriComponents.push(reqOpts.uri); - if (isAbsoluteUrl) { - uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); - } - reqOpts.uri = uriComponents - .map(uriComponent => { - const trimSlashesRegex = /^\/*|\/*$/g; - return uriComponent.replace(trimSlashesRegex, ''); - }) - .join('/') - // Some URIs have colon separators. - // Bad: https://.../projects/:list - // Good: https://.../projects:list - .replace(/\/:/g, ':'); - const requestInterceptors = this.getRequestInterceptors(); - const interceptorArray = Array.isArray(reqOpts.interceptors_) - ? reqOpts.interceptors_ - : []; - interceptorArray.forEach(interceptor => { - if (typeof interceptor.request === 'function') { - requestInterceptors.push(interceptor.request); + const camelCaseResponse = {}; + for (const prop in resp) { + // eslint-disable-next-line no-prototype-builtins + if (resp.hasOwnProperty(prop)) { + const camelCaseProp = prop.replace(/_(\w)/g, (_, match) => match.toUpperCase()); + camelCaseResponse[camelCaseProp] = resp[prop]; + } } + callback(null, camelCaseResponse, resp); }); - requestInterceptors.forEach(requestInterceptor => { - reqOpts = requestInterceptor(reqOpts); - }); - delete reqOpts.interceptors_; - const pkg = this.packageJson; - let userAgent = (0, util_js_2.getUserAgentString)(); - if (this.providedUserAgent) { - userAgent = `${this.providedUserAgent} ${userAgent}`; - } - reqOpts.headers = { - ...reqOpts.headers, - 'User-Agent': userAgent, - 'x-goog-api-client': `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${pkg.version}-${(0, util_js_2.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, - }; - if (reqOpts[util_js_1.GCCL_GCS_CMD_KEY]) { - reqOpts.headers['x-goog-api-client'] += - ` gccl-gcs-cmd/${reqOpts[util_js_1.GCCL_GCS_CMD_KEY]}`; - } - if (reqOpts.shouldReturnStream) { - return this.makeAuthenticatedRequest(reqOpts); - } - else { - this.makeAuthenticatedRequest(reqOpts, callback); - } } /** - * Make an authenticated API request. + * Get a reference to an HmacKey object. + * Note: this does not fetch the HMAC key's metadata. Use HmacKey#get() to + * retrieve and populate the metadata. * - * @param {object} reqOpts - Request options that are passed to `request`. - * @param {string} reqOpts.uri - A URI relative to the baseUrl. - * @param {function} callback - The callback function passed to `request`. - */ - request(reqOpts, callback) { - Service.prototype.request_.call(this, reqOpts, callback); - } - /** - * Make an authenticated API request. + * To get a reference to an HMAC key that's not created for a service + * account in the same project used to instantiate the Storage client, + * supply the project's ID as `projectId` in the `options` argument. * - * @param {object} reqOpts - Request options that are passed to `request`. - * @param {string} reqOpts.uri - A URI relative to the baseUrl. + * @param {string} accessId The HMAC key's access ID. + * @param {HmacKeyOptions} options HmacKey constructor options. + * @returns {HmacKey} + * @see HmacKey + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const hmacKey = storage.hmacKey('ACCESS_ID'); + * ``` */ - requestStream(reqOpts) { - const opts = { ...reqOpts, shouldReturnStream: true }; - return Service.prototype.request_.call(this, opts); + hmacKey(accessId, options) { + if (!accessId) { + throw new Error(StorageExceptionMessages.HMAC_ACCESS_ID); + } + return new hmacKey_js_1.HmacKey(this, accessId, options); } } -exports.Service = Service; +exports.Storage = Storage; +/** + * {@link Bucket} class. + * + * @name Storage.Bucket + * @see Bucket + * @type {Constructor} + */ +Storage.Bucket = bucket_js_1.Bucket; +/** + * {@link Channel} class. + * + * @name Storage.Channel + * @see Channel + * @type {Constructor} + */ +Storage.Channel = channel_js_1.Channel; +/** + * {@link File} class. + * + * @name Storage.File + * @see File + * @type {Constructor} + */ +Storage.File = file_js_1.File; +/** + * {@link HmacKey} class. + * + * @name Storage.HmacKey + * @see HmacKey + * @type {Constructor} + */ +Storage.HmacKey = hmacKey_js_1.HmacKey; +Storage.acl = { + OWNER_ROLE: 'OWNER', + READER_ROLE: 'READER', + WRITER_ROLE: 'WRITER', +}; +/*! Developer Documentation + * + * These methods can be auto-paginated. + */ +paginator_1.paginator.extend(Storage, ['getBuckets', 'getHmacKeys']); +/*! Developer Documentation + * + * All async methods (except for streams) will return a Promise in the event + * that a callback is omitted. + */ +(0, promisify_1.promisifyAll)(Storage, { + exclude: ['bucket', 'channel', 'hmacKey'], +}); /***/ }), -/***/ 38064: +/***/ 45594: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -161287,684 +166738,678 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; +var _XMLMultiPartUploadHelper_instances, _XMLMultiPartUploadHelper_setGoogApiClientHeaders, _XMLMultiPartUploadHelper_handleErrorResponse; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.util = exports.Util = exports.PartialFailureError = exports.ApiError = exports.GCCL_GCS_CMD_KEY = void 0; -/*! - * @module common/util - */ -const projectify_1 = __nccwpck_require__(3497); -const htmlEntities = __importStar(__nccwpck_require__(52589)); +exports.TransferManager = exports.MultiPartUploadError = void 0; +const file_js_1 = __nccwpck_require__(4713); +const p_limit_1 = __importDefault(__nccwpck_require__(57684)); +const path = __importStar(__nccwpck_require__(71017)); +const fs_1 = __nccwpck_require__(57147); +const crc32c_js_1 = __nccwpck_require__(55810); const google_auth_library_1 = __nccwpck_require__(20810); -const retry_request_1 = __importDefault(__nccwpck_require__(63515)); -const stream_1 = __nccwpck_require__(12781); -const teeny_request_1 = __nccwpck_require__(6886); -const uuid = __importStar(__nccwpck_require__(44458)); -const service_js_1 = __nccwpck_require__(17370); -const util_js_1 = __nccwpck_require__(59258); -const duplexify_1 = __importDefault(__nccwpck_require__(76599)); +const fast_xml_parser_1 = __nccwpck_require__(74577); +const async_retry_1 = __importDefault(__nccwpck_require__(33415)); +const crypto_1 = __nccwpck_require__(6113); +const util_js_1 = __nccwpck_require__(38064); +const util_js_2 = __nccwpck_require__(59258); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const package_json_helper_cjs_1 = __nccwpck_require__(28568); const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); /** - * A unique symbol for providing a `gccl-gcs-cmd` value - * for the `X-Goog-API-Client` header. + * Default number of concurrently executing promises to use when calling uploadManyFiles. * - * E.g. the `V` in `X-Goog-API-Client: gccl-gcs-cmd/V` - **/ -exports.GCCL_GCS_CMD_KEY = Symbol.for('GCCL_GCS_CMD'); -const requestDefaults = { - timeout: 60000, - gzip: true, - forever: true, - pool: { - maxSockets: Infinity, - }, -}; + */ +const DEFAULT_PARALLEL_UPLOAD_LIMIT = 5; /** - * Default behavior: Automatically retry retriable server errors. + * Default number of concurrently executing promises to use when calling downloadManyFiles. * - * @const {boolean} - * @private */ -const AUTO_RETRY_DEFAULT = true; +const DEFAULT_PARALLEL_DOWNLOAD_LIMIT = 5; /** - * Default behavior: Only attempt to retry retriable errors 3 times. + * Default number of concurrently executing promises to use when calling downloadFileInChunks. * - * @const {number} - * @private */ -const MAX_RETRY_DEFAULT = 3; +const DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT = 5; /** - * Custom error type for API errors. + * The minimum size threshold in bytes at which to apply a chunked download strategy when calling downloadFileInChunks. * - * @param {object} errorBody - Error object. */ -class ApiError extends Error { - constructor(errorBodyOrMessage) { - super(); - if (typeof errorBodyOrMessage !== 'object') { - this.message = errorBodyOrMessage || ''; - return; - } - const errorBody = errorBodyOrMessage; - this.code = errorBody.code; - this.errors = errorBody.errors; - this.response = errorBody.response; - try { - this.errors = JSON.parse(this.response.body).error.errors; - } - catch (e) { - this.errors = errorBody.errors; - } - this.message = ApiError.createMultiErrorMessage(errorBody, this.errors); - Error.captureStackTrace(this); - } - /** - * Pieces together an error message by combining all unique error messages - * returned from a single GoogleError - * - * @private - * - * @param {GoogleErrorBody} err The original error. - * @param {GoogleInnerError[]} [errors] Inner errors, if any. - * @returns {string} - */ - static createMultiErrorMessage(err, errors) { - const messages = new Set(); - if (err.message) { - messages.add(err.message); - } - if (errors && errors.length) { - errors.forEach(({ message }) => messages.add(message)); - } - else if (err.response && err.response.body) { - messages.add(htmlEntities.decode(err.response.body.toString())); - } - else if (!err.message) { - messages.add('A failure occurred during this request.'); - } - let messageArr = Array.from(messages); - if (messageArr.length > 1) { - messageArr = messageArr.map((message, i) => ` ${i + 1}. ${message}`); - messageArr.unshift('Multiple errors occurred during the request. Please see the `errors` array for complete details.\n'); - messageArr.push('\n'); - } - return messageArr.join('\n'); - } -} -exports.ApiError = ApiError; +const DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD = 32 * 1024 * 1024; /** - * Custom error type for partial errors returned from the API. + * The chunk size in bytes to use when calling downloadFileInChunks. * - * @param {object} b - Error object. */ -class PartialFailureError extends Error { - constructor(b) { - super(); - const errorObject = b; - this.errors = errorObject.errors; - this.name = 'PartialFailureError'; - this.response = errorObject.response; - this.message = ApiError.createMultiErrorMessage(errorObject, this.errors); +const DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +/** + * The chunk size in bytes to use when calling uploadFileInChunks. + * + */ +const UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +/** + * Default number of concurrently executing promises to use when calling uploadFileInChunks. + * + */ +const DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT = 5; +const EMPTY_REGEX = '(?:)'; +/** + * The `gccl-gcs-cmd` value for the `X-Goog-API-Client` header. + * Example: `gccl-gcs-cmd/tm.upload_many` + * + * @see {@link GCCL_GCS_CMD}. + * @see {@link GCCL_GCS_CMD_KEY}. + */ +const GCCL_GCS_CMD_FEATURE = { + UPLOAD_MANY: 'tm.upload_many', + DOWNLOAD_MANY: 'tm.download_many', + UPLOAD_SHARDED: 'tm.upload_sharded', + DOWNLOAD_SHARDED: 'tm.download_sharded', +}; +const defaultMultiPartGenerator = (bucket, fileName, uploadId, partsMap) => { + return new XMLMultiPartUploadHelper(bucket, fileName, uploadId, partsMap); +}; +class MultiPartUploadError extends Error { + constructor(message, uploadId, partsMap) { + super(message); + this.uploadId = uploadId; + this.partsMap = partsMap; } } -exports.PartialFailureError = PartialFailureError; -class Util { - constructor() { - this.ApiError = ApiError; - this.PartialFailureError = PartialFailureError; +exports.MultiPartUploadError = MultiPartUploadError; +/** + * Class representing an implementation of MPU in the XML API. This class is not meant for public usage. + * + * @private + * + */ +class XMLMultiPartUploadHelper { + constructor(bucket, fileName, uploadId, partsMap) { + _XMLMultiPartUploadHelper_instances.add(this); + this.authClient = bucket.storage.authClient || new google_auth_library_1.GoogleAuth(); + this.uploadId = uploadId || ''; + this.bucket = bucket; + this.fileName = fileName; + this.baseUrl = `https://${bucket.name}.${new URL(this.bucket.storage.apiEndpoint).hostname}/${fileName}`; + this.xmlBuilder = new fast_xml_parser_1.XMLBuilder({ arrayNodeName: 'Part' }); + this.xmlParser = new fast_xml_parser_1.XMLParser(); + this.partsMap = partsMap || new Map(); + this.retryOptions = { + retries: this.bucket.storage.retryOptions.maxRetries, + factor: this.bucket.storage.retryOptions.retryDelayMultiplier, + maxTimeout: this.bucket.storage.retryOptions.maxRetryDelay * 1000, + maxRetryTime: this.bucket.storage.retryOptions.totalTimeout * 1000, + }; } /** - * No op. + * Initiates a multipart upload (MPU) to the XML API and stores the resultant upload id. * - * @example - * function doSomething(callback) { - * callback = callback || noop; - * } + * @returns {Promise} */ - noop() { } + async initiateUpload(headers = {}) { + const url = `${this.baseUrl}?uploads`; + return (0, async_retry_1.default)(async (bail) => { + try { + const res = await this.authClient.request({ + headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this, headers), + method: 'POST', + url, + }); + if (res.data && res.data.error) { + throw res.data.error; + } + const parsedXML = this.xmlParser.parse(res.data); + this.uploadId = parsedXML.InitiateMultipartUploadResult.UploadId; + } + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + } + }, this.retryOptions); + } /** - * Uniformly process an API response. + * Uploads the provided chunk of data to the XML API using the previously created upload id. * - * @param {*} err - Error value. - * @param {*} resp - Response value. - * @param {*} body - Body value. - * @param {function} callback - The callback function. + * @param {number} partNumber the sequence number of this chunk. + * @param {Buffer} chunk the chunk of data to be uploaded. + * @param {string | false} validation whether or not to include the md5 hash in the headers to cause the server + * to validate the chunk was not corrupted. + * @returns {Promise} */ - handleResp(err, resp, body, callback) { - callback = callback || util.noop; - const parsedResp = { - err: err || null, - ...(resp && util.parseHttpRespMessage(resp)), - ...(body && util.parseHttpRespBody(body)), - }; - // Assign the parsed body to resp.body, even if { json: false } was passed - // as a request option. - // We assume that nobody uses the previously unparsed value of resp.body. - if (!parsedResp.err && resp && typeof parsedResp.body === 'object') { - parsedResp.resp.body = parsedResp.body; - } - if (parsedResp.err && resp) { - parsedResp.err.response = resp; + async uploadPart(partNumber, chunk, validation) { + const url = `${this.baseUrl}?partNumber=${partNumber}&uploadId=${this.uploadId}`; + let headers = __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this); + if (validation === 'md5') { + const hash = (0, crypto_1.createHash)('md5').update(chunk).digest('base64'); + headers = { + 'Content-MD5': hash, + }; } - callback(parsedResp.err, parsedResp.body, parsedResp.resp); + return (0, async_retry_1.default)(async (bail) => { + try { + const res = await this.authClient.request({ + url, + method: 'PUT', + body: chunk, + headers, + }); + if (res.data && res.data.error) { + throw res.data.error; + } + this.partsMap.set(partNumber, res.headers['etag']); + } + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + } + }, this.retryOptions); } /** - * Sniff an incoming HTTP response message for errors. + * Sends the final request of the MPU to tell GCS the upload is now complete. * - * @param {object} httpRespMessage - An incoming HTTP response message from `request`. - * @return {object} parsedHttpRespMessage - The parsed response. - * @param {?error} parsedHttpRespMessage.err - An error detected. - * @param {object} parsedHttpRespMessage.resp - The original response object. + * @returns {Promise} */ - parseHttpRespMessage(httpRespMessage) { - const parsedHttpRespMessage = { - resp: httpRespMessage, - }; - if (httpRespMessage.statusCode < 200 || httpRespMessage.statusCode > 299) { - // Unknown error. Format according to ApiError standard. - parsedHttpRespMessage.err = new ApiError({ - errors: new Array(), - code: httpRespMessage.statusCode, - message: httpRespMessage.statusMessage, - response: httpRespMessage, - }); + async completeUpload() { + const url = `${this.baseUrl}?uploadId=${this.uploadId}`; + const sortedMap = new Map([...this.partsMap.entries()].sort((a, b) => a[0] - b[0])); + const parts = []; + for (const entry of sortedMap.entries()) { + parts.push({ PartNumber: entry[0], ETag: entry[1] }); } - return parsedHttpRespMessage; + const body = `${this.xmlBuilder.build(parts)}`; + return (0, async_retry_1.default)(async (bail) => { + try { + const res = await this.authClient.request({ + headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this), + url, + method: 'POST', + body, + }); + if (res.data && res.data.error) { + throw res.data.error; + } + return res; + } + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + return; + } + }, this.retryOptions); } /** - * Parse the response body from an HTTP request. + * Aborts an multipart upload that is in progress. Once aborted, any parts in the process of being uploaded fail, + * and future requests using the upload ID fail. * - * @param {object} body - The response body. - * @return {object} parsedHttpRespMessage - The parsed response. - * @param {?error} parsedHttpRespMessage.err - An error detected. - * @param {object} parsedHttpRespMessage.body - The original body value provided - * will try to be JSON.parse'd. If it's successful, the parsed value will - * be returned here, otherwise the original value and an error will be returned. + * @returns {Promise} */ - parseHttpRespBody(body) { - const parsedHttpRespBody = { - body, - }; - if (typeof body === 'string') { + async abortUpload() { + const url = `${this.baseUrl}?uploadId=${this.uploadId}`; + return (0, async_retry_1.default)(async (bail) => { try { - parsedHttpRespBody.body = JSON.parse(body); + const res = await this.authClient.request({ + url, + method: 'DELETE', + }); + if (res.data && res.data.error) { + throw res.data.error; + } } - catch (err) { - parsedHttpRespBody.body = body; + catch (e) { + __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); + return; + } + }, this.retryOptions); + } +} +_XMLMultiPartUploadHelper_instances = new WeakSet(), _XMLMultiPartUploadHelper_setGoogApiClientHeaders = function _XMLMultiPartUploadHelper_setGoogApiClientHeaders(headers = {}) { + let headerFound = false; + let userAgentFound = false; + for (const [key, value] of Object.entries(headers)) { + if (key.toLocaleLowerCase().trim() === 'x-goog-api-client') { + headerFound = true; + // Prepend command feature to value, if not already there + if (!value.includes(GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED)) { + headers[key] = + `${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; } } - if (parsedHttpRespBody.body && parsedHttpRespBody.body.error) { - // Error from JSON API. - parsedHttpRespBody.err = new ApiError(parsedHttpRespBody.body.error); + else if (key.toLocaleLowerCase().trim() === 'user-agent') { + userAgentFound = true; } - return parsedHttpRespBody; + } + // If the header isn't present, add it + if (!headerFound) { + headers['x-goog-api-client'] = `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${packageJson.version} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; + } + // If the User-Agent isn't present, add it + if (!userAgentFound) { + headers['User-Agent'] = (0, util_js_2.getUserAgentString)(); + } + return headers; +}, _XMLMultiPartUploadHelper_handleErrorResponse = function _XMLMultiPartUploadHelper_handleErrorResponse(err, bail) { + if (this.bucket.storage.retryOptions.autoRetry && + this.bucket.storage.retryOptions.retryableErrorFn(err)) { + throw err; + } + else { + bail(err); + } +}; +/** + * Create a TransferManager object to perform parallel transfer operations on a Cloud Storage bucket. + * + * @class + * @hideconstructor + * + * @param {Bucket} bucket A {@link Bucket} instance + * + */ +class TransferManager { + constructor(bucket) { + this.bucket = bucket; } /** - * Take a Duplexify stream, fetch an authenticated connection header, and - * create an outgoing writable stream. + * @typedef {object} UploadManyFilesOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when uploading the files. + * @property {Function} [customDestinationBuilder] A function that will take the current path of a local file + * and return a string representing a custom path to be used to upload the file to GCS. + * @property {boolean} [skipIfExists] Do not upload the file if it already exists in + * the bucket. This will set the precondition ifGenerationMatch = 0. + * @property {string} [prefix] A prefix to append to all of the uploaded files. + * @property {object} [passthroughOptions] {@link UploadOptions} Options to be passed through + * to each individual upload operation. * - * @param {Duplexify} dup - Duplexify stream. - * @param {object} options - Configuration object. - * @param {module:common/connection} options.connection - A connection instance used to get a token with and send the request through. - * @param {object} options.metadata - Metadata to send at the head of the request. - * @param {object} options.request - Request object, in the format of a standard Node.js http.request() object. - * @param {string=} options.request.method - Default: "POST". - * @param {string=} options.request.qs.uploadType - Default: "multipart". - * @param {string=} options.streamContentType - Default: "application/octet-stream". - * @param {function} onComplete - Callback, executed after the writable Request stream has completed. */ - makeWritableStream(dup, options, onComplete) { - var _a; - onComplete = onComplete || util.noop; - const writeStream = new ProgressStream(); - writeStream.on('progress', evt => dup.emit('progress', evt)); - dup.setWritable(writeStream); - const defaultReqOpts = { - method: 'POST', - qs: { - uploadType: 'multipart', - }, - timeout: 0, - maxRetries: 0, - }; - const metadata = options.metadata || {}; - const reqOpts = { - ...defaultReqOpts, - ...options.request, - qs: { - ...defaultReqOpts.qs, - ...(_a = options.request) === null || _a === void 0 ? void 0 : _a.qs, - }, - multipart: [ - { - 'Content-Type': 'application/json', - body: JSON.stringify(metadata), - }, - { - 'Content-Type': metadata.contentType || 'application/octet-stream', - body: writeStream, - }, - ], - }; - options.makeAuthenticatedRequest(reqOpts, { - onAuthenticated(err, authenticatedReqOpts) { - if (err) { - dup.destroy(err); - return; - } - requestDefaults.headers = util._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); - const request = teeny_request_1.teenyRequest.defaults(requestDefaults); - request(authenticatedReqOpts, (err, resp, body) => { - util.handleResp(err, resp, body, (err, data) => { - if (err) { - dup.destroy(err); - return; - } - dup.emit('response', resp); - onComplete(data); - }); - }); - }, - }); - } /** - * Returns true if the API request should be retried, given the error that was - * given the first time the request was attempted. This is used for rate limit - * related errors as well as intermittent server errors. + * Upload multiple files in parallel to the bucket. This is a convenience method + * that utilizes {@link Bucket#upload} to perform the upload. + * + * @param {array | string} [filePathsOrDirectory] An array of fully qualified paths to the files or a directory name. + * If a directory name is provided, the directory will be recursively walked and all files will be added to the upload list. + * to be uploaded to the bucket + * @param {UploadManyFilesOptions} [options] Configuration options. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Upload multiple files in parallel. + * //- + * const response = await transferManager.uploadManyFiles(['/local/path/file1.txt, 'local/path/file2.txt']); + * // Your bucket now contains: + * // - "local/path/file1.txt" (with the contents of '/local/path/file1.txt') + * // - "local/path/file2.txt" (with the contents of '/local/path/file2.txt') + * const response = await transferManager.uploadManyFiles('/local/directory'); + * // Your bucket will now contain all files contained in '/local/directory' maintaining the subdirectory structure. + * ``` * - * @param {error} err - The API error to check if it is appropriate to retry. - * @return {boolean} True if the API request should be retried, false otherwise. */ - shouldRetryRequest(err) { - if (err) { - if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { - return true; + async uploadManyFiles(filePathsOrDirectory, options = {}) { + var _a; + if (options.skipIfExists && ((_a = options.passthroughOptions) === null || _a === void 0 ? void 0 : _a.preconditionOpts)) { + options.passthroughOptions.preconditionOpts.ifGenerationMatch = 0; + } + else if (options.skipIfExists && + options.passthroughOptions === undefined) { + options.passthroughOptions = { + preconditionOpts: { + ifGenerationMatch: 0, + }, + }; + } + const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_UPLOAD_LIMIT); + const promises = []; + let allPaths = []; + if (!Array.isArray(filePathsOrDirectory)) { + for await (const curPath of this.getPathsFromDirectory(filePathsOrDirectory)) { + allPaths.push(curPath); } - if (err.errors) { - for (const e of err.errors) { - const reason = e.reason; - if (reason === 'rateLimitExceeded') { - return true; - } - if (reason === 'userRateLimitExceeded') { - return true; - } - if (reason && reason.includes('EAI_AGAIN')) { - return true; - } - } + } + else { + allPaths = filePathsOrDirectory; + } + for (const filePath of allPaths) { + const stat = await fs_1.promises.lstat(filePath); + if (stat.isDirectory()) { + continue; } + const passThroughOptionsCopy = { + ...options.passthroughOptions, + [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.UPLOAD_MANY, + }; + passThroughOptionsCopy.destination = options.customDestinationBuilder + ? options.customDestinationBuilder(filePath, options) + : filePath.split(path.sep).join(path.posix.sep); + if (options.prefix) { + passThroughOptionsCopy.destination = path.posix.join(...options.prefix.split(path.sep), passThroughOptionsCopy.destination); + } + promises.push(limit(() => this.bucket.upload(filePath, passThroughOptionsCopy))); } - return false; + return Promise.all(promises); } /** - * Get a function for making authenticated requests. + * @typedef {object} DownloadManyFilesOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when downloading the files. + * @property {string} [prefix] A prefix to append to all of the downloaded files. + * @property {string} [stripPrefix] A prefix to remove from all of the downloaded files. + * @property {object} [passthroughOptions] {@link DownloadOptions} Options to be passed through + * to each individual download operation. + * @property {boolean} [skipIfExists] Do not download the file if it already exists in + * the destination. * - * @param {object} config - Configuration object. - * @param {boolean=} config.autoRetry - Automatically retry requests if the - * response is related to rate limits or certain intermittent server - * errors. We will exponentially backoff subsequent requests by default. - * (default: true) - * @param {object=} config.credentials - Credentials object. - * @param {boolean=} config.customEndpoint - If true, just return the provided request options. Default: false. - * @param {boolean=} config.useAuthWithCustomEndpoint - If true, will authenticate when using a custom endpoint. Default: false. - * @param {string=} config.email - Account email address, required for PEM/P12 usage. - * @param {number=} config.maxRetries - Maximum number of automatic retries attempted before returning the error. (default: 3) - * @param {string=} config.keyFile - Path to a .json, .pem, or .p12 keyfile. - * @param {array} config.scopes - Array of scopes required for the API. */ - makeAuthenticatedRequestFactory(config) { - const googleAutoAuthConfig = { ...config }; - if (googleAutoAuthConfig.projectId === service_js_1.DEFAULT_PROJECT_ID_TOKEN) { - delete googleAutoAuthConfig.projectId; - } - let authClient; - if (googleAutoAuthConfig.authClient instanceof google_auth_library_1.GoogleAuth) { - // Use an existing `GoogleAuth` - authClient = googleAutoAuthConfig.authClient; + /** + * Download multiple files in parallel to the local filesystem. This is a convenience method + * that utilizes {@link File#download} to perform the download. + * + * @param {array | string} [filesOrFolder] An array of file name strings or file objects to be downloaded. If + * a string is provided this will be treated as a GCS prefix and all files with that prefix will be downloaded. + * @param {DownloadManyFilesOptions} [options] Configuration options. Setting options.prefix or options.stripPrefix + * or options.passthroughOptions.destination will cause the downloaded files to be written to the file system + * instead of being returned as a buffer. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Download multiple files in parallel. + * //- + * const response = await transferManager.downloadManyFiles(['file1.txt', 'file2.txt']); + * // The following files have been downloaded: + * // - "file1.txt" (with the contents from my-bucket.file1.txt) + * // - "file2.txt" (with the contents from my-bucket.file2.txt) + * const response = await transferManager.downloadManyFiles([bucket.File('file1.txt'), bucket.File('file2.txt')]); + * // The following files have been downloaded: + * // - "file1.txt" (with the contents from my-bucket.file1.txt) + * // - "file2.txt" (with the contents from my-bucket.file2.txt) + * const response = await transferManager.downloadManyFiles('test-folder'); + * // All files with GCS prefix of 'test-folder' have been downloaded. + * ``` + * + */ + async downloadManyFiles(filesOrFolder, options = {}) { + const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_DOWNLOAD_LIMIT); + const promises = []; + let files = []; + if (!Array.isArray(filesOrFolder)) { + const directoryFiles = await this.bucket.getFiles({ + prefix: filesOrFolder, + }); + files = directoryFiles[0]; } else { - // Pass an `AuthClient` & `clientOptions` to `GoogleAuth`, if available - authClient = new google_auth_library_1.GoogleAuth({ - ...googleAutoAuthConfig, - authClient: googleAutoAuthConfig.authClient, - clientOptions: googleAutoAuthConfig.clientOptions, + files = filesOrFolder.map(curFile => { + if (typeof curFile === 'string') { + return this.bucket.file(curFile); + } + return curFile; }); } - function makeAuthenticatedRequest(reqOpts, optionsOrCallback) { - let stream; - let projectId; - const reqConfig = { ...config }; - let activeRequest_; - if (!optionsOrCallback) { - stream = (0, duplexify_1.default)(); - reqConfig.stream = stream; + const stripRegexString = options.stripPrefix + ? `^${options.stripPrefix}` + : EMPTY_REGEX; + const regex = new RegExp(stripRegexString, 'g'); + for (const file of files) { + const passThroughOptionsCopy = { + ...options.passthroughOptions, + [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_MANY, + }; + if (options.prefix || passThroughOptionsCopy.destination) { + passThroughOptionsCopy.destination = path.join(options.prefix || '', passThroughOptionsCopy.destination || '', file.name); } - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : undefined; - const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : undefined; - async function setProjectId() { - projectId = await authClient.getProjectId(); + if (options.stripPrefix) { + passThroughOptionsCopy.destination = file.name.replace(regex, ''); } - const onAuthenticated = async (err, authenticatedReqOpts) => { - const authLibraryError = err; - const autoAuthFailed = err && - typeof err.message === 'string' && - err.message.indexOf('Could not load the default credentials') > -1; - if (autoAuthFailed) { - // Even though authentication failed, the API might not actually - // care. - authenticatedReqOpts = reqOpts; - } - if (!err || autoAuthFailed) { - try { - // Try with existing `projectId` value - authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); - err = null; - } - catch (e) { - if (e instanceof projectify_1.MissingProjectIdError) { - // A `projectId` was required, but we don't have one. - try { - // Attempt to get the `projectId` - await setProjectId(); - authenticatedReqOpts = util.decorateRequest(authenticatedReqOpts, projectId); - err = null; - } - catch (e) { - // Re-use the "Could not load the default credentials error" if - // auto auth failed. - err = err || e; - } - } - else { - // Some other error unrelated to missing `projectId` - err = err || e; - } - } - } - if (err) { - if (stream) { - stream.destroy(err); - } - else { - const fn = options && options.onAuthenticated - ? options.onAuthenticated - : callback; - fn(err); - } - return; - } - if (options && options.onAuthenticated) { - options.onAuthenticated(null, authenticatedReqOpts); - } - else { - activeRequest_ = util.makeRequest(authenticatedReqOpts, reqConfig, (apiResponseError, ...params) => { - if (apiResponseError && - apiResponseError.code === 401 && - authLibraryError) { - // Re-use the "Could not load the default credentials error" if - // the API request failed due to missing credentials. - apiResponseError = authLibraryError; - } - callback(apiResponseError, ...params); - }); - } - }; - const prepareRequest = async () => { - try { - const getProjectId = async () => { - if (config.projectId && - config.projectId !== service_js_1.DEFAULT_PROJECT_ID_TOKEN) { - // The user provided a project ID. We don't need to check with the - // auth client, it could be incorrect. - return config.projectId; - } - if (config.projectIdRequired === false) { - // A projectId is not required. Return the default. - return service_js_1.DEFAULT_PROJECT_ID_TOKEN; - } - return setProjectId(); - }; - const authorizeRequest = async () => { - if (reqConfig.customEndpoint && - !reqConfig.useAuthWithCustomEndpoint) { - // Using a custom API override. Do not use `google-auth-library` for - // authentication. (ex: connecting to a local Datastore server) - return reqOpts; - } - else { - return authClient.authorizeRequest(reqOpts); - } - }; - const [_projectId, authorizedReqOpts] = await Promise.all([ - getProjectId(), - authorizeRequest(), + if (options.skipIfExists && + (0, fs_1.existsSync)(passThroughOptionsCopy.destination || '')) { + continue; + } + promises.push(limit(async () => { + const destination = passThroughOptionsCopy.destination; + if (destination && destination.endsWith(path.sep)) { + await fs_1.promises.mkdir(destination, { recursive: true }); + return Promise.resolve([ + Buffer.alloc(0), ]); - if (_projectId) { - projectId = _projectId; - } - return onAuthenticated(null, authorizedReqOpts); - } - catch (e) { - return onAuthenticated(e); } - }; - prepareRequest(); - if (stream) { - return stream; - } - return { - abort() { - setImmediate(() => { - if (activeRequest_) { - activeRequest_.abort(); - activeRequest_ = null; - } - }); - }, - }; + return file.download(passThroughOptionsCopy); + })); } - const mar = makeAuthenticatedRequest; - mar.getCredentials = authClient.getCredentials.bind(authClient); - mar.authClient = authClient; - return mar; + return Promise.all(promises); } /** - * Make a request through the `retryRequest` module with built-in error - * handling and exponential back off. + * @typedef {object} DownloadFileInChunksOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when downloading the file. + * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be downloaded. + * @property {string | boolean} [validation] Whether or not to perform a CRC32C validation check when download is complete. + * @property {boolean} [noReturnData] Whether or not to return the downloaded data. A `true` value here would be useful for files with a size that will not fit into memory. * - * @param {object} reqOpts - Request options in the format `request` expects. - * @param {object=} config - Configuration object. - * @param {boolean=} config.autoRetry - Automatically retry requests if the - * response is related to rate limits or certain intermittent server - * errors. We will exponentially backoff subsequent requests by default. - * (default: true) - * @param {number=} config.maxRetries - Maximum number of automatic retries - * attempted before returning the error. (default: 3) - * @param {object=} config.request - HTTP module for request calls. - * @param {function} callback - The callback function. */ - makeRequest(reqOpts, config, callback) { - var _a, _b, _c, _d, _e; - let autoRetryValue = AUTO_RETRY_DEFAULT; - if (config.autoRetry !== undefined) { - autoRetryValue = config.autoRetry; - } - else if (((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined) { - autoRetryValue = config.retryOptions.autoRetry; - } - let maxRetryValue = MAX_RETRY_DEFAULT; - if (config.maxRetries !== undefined) { - maxRetryValue = config.maxRetries; - } - else if (((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.maxRetries) !== undefined) { - maxRetryValue = config.retryOptions.maxRetries; + /** + * Download a large file in chunks utilizing parallel download operations. This is a convenience method + * that utilizes {@link File#download} to perform the download. + * + * @param {File | string} fileOrName {@link File} to download. + * @param {DownloadFileInChunksOptions} [options] Configuration options. + * @returns {Promise} + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Download a large file in chunks utilizing parallel operations. + * //- + * const response = await transferManager.downloadFileInChunks(bucket.file('large-file.txt'); + * // Your local directory now contains: + * // - "large-file.txt" (with the contents from my-bucket.large-file.txt) + * ``` + * + */ + async downloadFileInChunks(fileOrName, options = {}) { + let chunkSize = options.chunkSizeBytes || DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; + let limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT); + const noReturnData = Boolean(options.noReturnData); + const promises = []; + const file = typeof fileOrName === 'string' + ? this.bucket.file(fileOrName) + : fileOrName; + const fileInfo = await file.get(); + const size = parseInt(fileInfo[0].metadata.size.toString()); + // If the file size does not meet the threshold download it as a single chunk. + if (size < DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD) { + limit = (0, p_limit_1.default)(1); + chunkSize = size; } - requestDefaults.headers = this._getDefaultHeaders(reqOpts[exports.GCCL_GCS_CMD_KEY]); - const options = { - request: teeny_request_1.teenyRequest.defaults(requestDefaults), - retries: autoRetryValue !== false ? maxRetryValue : 0, - noResponseRetries: autoRetryValue !== false ? maxRetryValue : 0, - shouldRetryFn(httpRespMessage) { - var _a, _b; - const err = util.parseHttpRespMessage(httpRespMessage).err; - if ((_a = config.retryOptions) === null || _a === void 0 ? void 0 : _a.retryableErrorFn) { - return err && ((_b = config.retryOptions) === null || _b === void 0 ? void 0 : _b.retryableErrorFn(err)); - } - return err && util.shouldRetryRequest(err); - }, - maxRetryDelay: (_c = config.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetryDelay, - retryDelayMultiplier: (_d = config.retryOptions) === null || _d === void 0 ? void 0 : _d.retryDelayMultiplier, - totalTimeout: (_e = config.retryOptions) === null || _e === void 0 ? void 0 : _e.totalTimeout, - }; - if (typeof reqOpts.maxRetries === 'number') { - options.retries = reqOpts.maxRetries; - options.noResponseRetries = reqOpts.maxRetries; + let start = 0; + const filePath = options.destination || path.basename(file.name); + const fileToWrite = await fs_1.promises.open(filePath, 'w'); + while (start < size) { + const chunkStart = start; + let chunkEnd = start + chunkSize - 1; + chunkEnd = chunkEnd > size ? size : chunkEnd; + promises.push(limit(async () => { + const resp = await file.download({ + start: chunkStart, + end: chunkEnd, + [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_SHARDED, + }); + const result = await fileToWrite.write(resp[0], 0, resp[0].length, chunkStart); + if (noReturnData) + return; + return result.buffer; + })); + start += chunkSize; } - if (!config.stream) { - return (0, retry_request_1.default)(reqOpts, options, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (err, response, body) => { - util.handleResp(err, response, body, callback); - }); + let chunks; + try { + chunks = await Promise.all(promises); } - const dup = config.stream; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - let requestStream; - const isGetRequest = (reqOpts.method || 'GET').toUpperCase() === 'GET'; - if (isGetRequest) { - requestStream = (0, retry_request_1.default)(reqOpts, options); - dup.setReadable(requestStream); + finally { + await fileToWrite.close(); } - else { - // Streaming writable HTTP requests cannot be retried. - requestStream = options.request(reqOpts); - dup.setWritable(requestStream); + if (options.validation === 'crc32c' && fileInfo[0].metadata.crc32c) { + const downloadedCrc32C = await crc32c_js_1.CRC32C.fromFile(filePath); + if (!downloadedCrc32C.validate(fileInfo[0].metadata.crc32c)) { + const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); + mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; + throw mismatchError; + } } - // Replay the Request events back to the stream. - requestStream - .on('error', dup.destroy.bind(dup)) - .on('response', dup.emit.bind(dup, 'response')) - .on('complete', dup.emit.bind(dup, 'complete')); - dup.abort = requestStream.abort; - return dup; + if (noReturnData) + return; + return [Buffer.concat(chunks, size)]; } /** - * Decorate the options about to be made in a request. + * @typedef {object} UploadFileInChunksOptions + * @property {number} [concurrencyLimit] The number of concurrently executing promises + * to use when uploading the file. + * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be uploaded. + * @property {string} [uploadName] Name of the file when saving to GCS. If omitted the name is taken from the file path. + * @property {number} [maxQueueSize] The number of chunks to be uploaded to hold in memory concurrently. If not specified + * defaults to the specified concurrency limit. + * @property {string} [uploadId] If specified attempts to resume a previous upload. + * @property {Map} [partsMap] If specified alongside uploadId, attempts to resume a previous upload from the last chunk + * specified in partsMap + * @property {object} [headers] headers to be sent when initiating the multipart upload. + * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-multipart#request_headers| Request Headers: Initiate a Multipart Upload} + * @property {boolean} [autoAbortFailure] boolean to indicate if an in progress upload session will be automatically aborted upon failure. If not set, + * failures will be automatically aborted. * - * @param {object} reqOpts - The options to be passed to `request`. - * @param {string} projectId - The project ID. - * @return {object} reqOpts - The decorated reqOpts. */ - decorateRequest(reqOpts, projectId) { - delete reqOpts.autoPaginate; - delete reqOpts.autoPaginateVal; - delete reqOpts.objectMode; - if (reqOpts.qs !== null && typeof reqOpts.qs === 'object') { - delete reqOpts.qs.autoPaginate; - delete reqOpts.qs.autoPaginateVal; - reqOpts.qs = (0, projectify_1.replaceProjectIdToken)(reqOpts.qs, projectId); - } - if (Array.isArray(reqOpts.multipart)) { - reqOpts.multipart = reqOpts.multipart.map(part => { - return (0, projectify_1.replaceProjectIdToken)(part, projectId); + /** + * Upload a large file in chunks utilizing parallel upload operations. If the upload fails, an uploadId and + * map containing all the successfully uploaded parts will be returned to the caller. These arguments can be used to + * resume the upload. + * + * @param {string} [filePath] The path of the file to be uploaded + * @param {UploadFileInChunksOptions} [options] Configuration options. + * @param {MultiPartHelperGenerator} [generator] A function that will return a type that implements the MPU interface. Most users will not need to use this. + * @returns {Promise} If successful a promise resolving to void, otherwise a error containing the message, uploadId, and parts map. + * + * @example + * ``` + * const {Storage} = require('@google-cloud/storage'); + * const storage = new Storage(); + * const bucket = storage.bucket('my-bucket'); + * const transferManager = new TransferManager(bucket); + * + * //- + * // Upload a large file in chunks utilizing parallel operations. + * //- + * const response = await transferManager.uploadFileInChunks('large-file.txt'); + * // Your bucket now contains: + * // - "large-file.txt" + * ``` + * + * + */ + async uploadFileInChunks(filePath, options = {}, generator = defaultMultiPartGenerator) { + const chunkSize = options.chunkSizeBytes || UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; + const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT); + const maxQueueSize = options.maxQueueSize || + options.concurrencyLimit || + DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT; + const fileName = options.uploadName || path.basename(filePath); + const mpuHelper = generator(this.bucket, fileName, options.uploadId, options.partsMap); + let partNumber = 1; + let promises = []; + try { + if (options.uploadId === undefined) { + await mpuHelper.initiateUpload(options.headers); + } + const startOrResumptionByte = mpuHelper.partsMap.size * chunkSize; + const readStream = (0, fs_1.createReadStream)(filePath, { + highWaterMark: chunkSize, + start: startOrResumptionByte, }); - } - if (reqOpts.json !== null && typeof reqOpts.json === 'object') { - delete reqOpts.json.autoPaginate; - delete reqOpts.json.autoPaginateVal; - reqOpts.json = (0, projectify_1.replaceProjectIdToken)(reqOpts.json, projectId); - } - reqOpts.uri = (0, projectify_1.replaceProjectIdToken)(reqOpts.uri, projectId); - return reqOpts; - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - isCustomType(unknown, module) { - function getConstructorName(obj) { - return obj.constructor && obj.constructor.name.toLowerCase(); - } - const moduleNameParts = module.split('/'); - const parentModuleName = moduleNameParts[0] && moduleNameParts[0].toLowerCase(); - const subModuleName = moduleNameParts[1] && moduleNameParts[1].toLowerCase(); - if (subModuleName && getConstructorName(unknown) !== subModuleName) { - return false; - } - let walkingModule = unknown; - // eslint-disable-next-line no-constant-condition - while (true) { - if (getConstructorName(walkingModule) === parentModuleName) { - return true; + // p-limit only limits the number of running promises. We do not want to hold an entire + // large file in memory at once so promises acts a queue that will hold only maxQueueSize in memory. + for await (const curChunk of readStream) { + if (promises.length >= maxQueueSize) { + await Promise.all(promises); + promises = []; + } + promises.push(limit(() => mpuHelper.uploadPart(partNumber++, curChunk, options.validation))); } - walkingModule = walkingModule.parent; - if (!walkingModule) { - return false; + await Promise.all(promises); + return await mpuHelper.completeUpload(); + } + catch (e) { + if ((options.autoAbortFailure === undefined || options.autoAbortFailure) && + mpuHelper.uploadId) { + try { + await mpuHelper.abortUpload(); + return; + } + catch (e) { + throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); + } } + throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); } } - /** - * Given two parameters, figure out if this is either: - * - Just a callback function - * - An options object, and then a callback function - * @param optionsOrCallback An options object or callback. - * @param cb A potentially undefined callback. - */ - maybeOptionsOrCallback(optionsOrCallback, cb) { - return typeof optionsOrCallback === 'function' - ? [{}, optionsOrCallback] - : [optionsOrCallback, cb]; - } - _getDefaultHeaders(gcclGcsCmd) { - const headers = { - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${uuid.v4()}`, - }; - if (gcclGcsCmd) { - headers['x-goog-api-client'] += ` gccl-gcs-cmd/${gcclGcsCmd}`; + async *getPathsFromDirectory(directory) { + const filesAndSubdirectories = await fs_1.promises.readdir(directory, { + withFileTypes: true, + }); + for (const curFileOrDirectory of filesAndSubdirectories) { + const fullPath = path.join(directory, curFileOrDirectory.name); + curFileOrDirectory.isDirectory() + ? yield* this.getPathsFromDirectory(fullPath) + : yield fullPath; } - return headers; - } -} -exports.Util = Util; -/** - * Basic Passthrough Stream that records the number of bytes read - * every time the cursor is moved. - */ -class ProgressStream extends stream_1.Transform { - constructor() { - super(...arguments); - this.bytesRead = 0; - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - _transform(chunk, encoding, callback) { - this.bytesRead += chunk.length; - this.emit('progress', { bytesWritten: this.bytesRead, contentLength: '*' }); - this.push(chunk); - callback(); } } -const util = new Util(); -exports.util = util; +exports.TransferManager = TransferManager; /***/ }), -/***/ 21178: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 59258: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; + // Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -161978,3821 +167423,4905 @@ exports.util = util; // 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. -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Notification = void 0; -const index_js_1 = __nccwpck_require__(4052); -const promisify_1 = __nccwpck_require__(19203); +var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { + enumerable: true, + get: function () { + return m[k]; + } + }; + } + Object.defineProperty(o, k2, desc); +} : function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); +var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v + }); +} : function (o, v) { + o["default"] = v; +}); +var __importStar = this && this.__importStar || function () { + var ownKeys = function (o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +}(); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PassThroughShim = void 0; +exports.normalize = normalize; +exports.objectEntries = objectEntries; +exports.fixedEncodeURIComponent = fixedEncodeURIComponent; +exports.encodeURI = encodeURI; +exports.qsStringify = qsStringify; +exports.objectKeyToLowercase = objectKeyToLowercase; +exports.unicodeJSONStringify = unicodeJSONStringify; +exports.convertObjKeysToSnakeCase = convertObjKeysToSnakeCase; +exports.formatAsUTCISO = formatAsUTCISO; +exports.getRuntimeTrackingString = getRuntimeTrackingString; +exports.getUserAgentString = getUserAgentString; +exports.getDirName = getDirName; +exports.getModuleFormat = getModuleFormat; +const path = __importStar(__nccwpck_require__(71017)); +const querystring = __importStar(__nccwpck_require__(63477)); +const stream_1 = __nccwpck_require__(12781); +const url = __importStar(__nccwpck_require__(57310)); +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const package_json_helper_cjs_1 = __nccwpck_require__(28568); +// Done to avoid a problem with mangling of identifiers when using esModuleInterop +const fileURLToPath = url.fileURLToPath; +const isEsm = false; +function normalize(optionsOrCallback, cb) { + const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; + const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; + return { + options, + callback + }; +} /** - * The API-formatted resource description of the notification. - * - * Note: This is not guaranteed to be up-to-date when accessed. To get the - * latest record, call the `getMetadata()` method. - * - * @name Notification#metadata - * @type {object} + * Flatten an object into an Array of arrays, [[key, value], ..]. + * Implements Object.entries() for Node.js <8 + * @internal */ +function objectEntries(obj) { + return Object.keys(obj).map(key => [key, obj[key]]); +} /** - * A Notification object is created from your {@link Bucket} object using - * {@link Bucket#notification}. Use it to interact with Cloud Pub/Sub - * notifications. - * - * See {@link https://cloud.google.com/storage/docs/pubsub-notifications| Cloud Pub/Sub Notifications for Google Cloud Storage} + * Encode `str` with encodeURIComponent, plus these + * reserved characters: `! * ' ( )`. * - * @class - * @hideconstructor + * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent| MDN: fixedEncodeURIComponent} * - * @param {Bucket} bucket The bucket instance this notification is attached to. - * @param {string} id The ID of the notification. + * @param {string} str The URI component to encode. + * @return {string} The encoded string. + */ +function fixedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase()); +} +/** + * URI encode `uri` for generating signed URLs, using fixedEncodeURIComponent. * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); + * Encode every byte except `A-Z a-Z 0-9 ~ - . _`. * - * const notification = myBucket.notification('1'); - * ``` + * @param {string} uri The URI to encode. + * @param [boolean=false] encodeSlash If `true`, the "/" character is not encoded. + * @return {string} The encoded string. */ -class Notification extends index_js_1.ServiceObject { - constructor(bucket, id) { - const requestQueryObject = {}; - const methods = { - /** - * Creates a notification subscription for the bucket. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/insert| Notifications: insert} - * @method Notification#create - * - * @param {Topic|string} topic The Cloud PubSub topic to which this - * subscription publishes. If the project ID is omitted, the current - * project ID will be used. - * - * Acceptable formats are: - * - `projects/grape-spaceship-123/topics/my-topic` - * - * - `my-topic` - * @param {CreateNotificationRequest} [options] Metadata to set for - * the notification. - * @param {CreateNotificationCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} If a valid topic is not provided. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.create(function(err, notification, apiResponse) { - * if (!err) { - * // The notification was created successfully. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.create().then(function(data) { - * const notification = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - create: true, - /** - * @typedef {array} DeleteNotificationResponse - * @property {object} 0 The full API response. - */ - /** - * Permanently deletes a notification subscription. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/delete| Notifications: delete API Documentation} - * - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {DeleteNotificationCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.delete(function(err, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.delete().then(function(data) { - * const apiResponse = data[0]; - * }); - * - * ``` - * @example include:samples/deleteNotification.js - * region_tag:storage_delete_bucket_notification - * Another example: - */ - delete: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * Get a notification and its metadata if it exists. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} - * - * @param {object} [options] Configuration options. - * See {@link Bucket#createNotification} for create options. - * @param {boolean} [options.autoCreate] Automatically create the object if - * it does not exist. Default: `false`. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetNotificationCallback} [callback] Callback function. - * @return {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.get(function(err, notification, apiResponse) { - * // `notification.metadata` has been populated. - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.get().then(function(data) { - * const notification = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ - get: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * Get the notification's metadata. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/notifications/get| Notifications: get API Documentation} - * - * @param {object} [options] Configuration options. - * @param {string} [options.userProject] The ID of the project which will be - * billed for the request. - * @param {GetNotificationMetadataCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.getMetadata(function(err, metadata, apiResponse) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.getMetadata().then(function(data) { - * const metadata = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/getMetadataNotifications.js - * region_tag:storage_print_pubsub_bucket_notification - * Another example: - */ - getMetadata: { - reqOpts: { - qs: requestQueryObject, - }, - }, - /** - * @typedef {array} NotificationExistsResponse - * @property {boolean} 0 Whether the notification exists or not. - */ - /** - * @callback NotificationExistsCallback - * @param {?Error} err Request error, if any. - * @param {boolean} exists Whether the notification exists or not. - */ - /** - * Check if the notification exists. - * - * @method Notification#exists - * @param {NotificationExistsCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const myBucket = storage.bucket('my-bucket'); - * const notification = myBucket.notification('1'); - * - * notification.exists(function(err, exists) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * notification.exists().then(function(data) { - * const exists = data[0]; - * }); - * ``` - */ - exists: true, - }; - super({ - parent: bucket, - baseUrl: '/notificationConfigs', - id: id.toString(), - createMethod: bucket.createNotification.bind(bucket), - methods, - }); +function encodeURI(uri, encodeSlash) { + // Split the string by `/`, and conditionally rejoin them with either + // %2F if encodeSlash is `true`, or '/' if `false`. + return uri.split('/').map(fixedEncodeURIComponent).join(encodeSlash ? '%2F' : '/'); +} +/** + * Serialize an object to a URL query string using util.encodeURI(uri, true). + * @param {string} url The object to serialize. + * @return {string} Serialized string. + */ +function qsStringify(qs) { + return querystring.stringify(qs, '&', '=', { + encodeURIComponent: component => encodeURI(component, true) + }); +} +function objectKeyToLowercase(object) { + const newObj = {}; + for (let key of Object.keys(object)) { + const value = object[key]; + key = key.toLowerCase(); + newObj[key] = value; + } + return newObj; +} +/** + * JSON encode str, with unicode \u+ representation. + * @param {object} obj The object to encode. + * @return {string} Serialized string. + */ +function unicodeJSONStringify(obj) { + return JSON.stringify(obj).replace(/[\u0080-\uFFFF]/g, char => '\\u' + ('0000' + char.charCodeAt(0).toString(16)).slice(-4)); +} +/** + * Converts the given objects keys to snake_case + * @param {object} obj object to convert keys to snake case. + * @returns {object} object with keys converted to snake case. + */ +function convertObjKeysToSnakeCase(obj) { + if (obj instanceof Date || obj instanceof RegExp) { + return obj; + } + if (Array.isArray(obj)) { + return obj.map(convertObjKeysToSnakeCase); + } + if (obj instanceof Object) { + return Object.keys(obj).reduce((acc, cur) => { + const s = cur[0].toLocaleLowerCase() + cur.slice(1).replace(/([A-Z]+)/g, (match, p1) => { + return `_${p1.toLowerCase()}`; + }); + acc[s] = convertObjKeysToSnakeCase(obj[cur]); + return acc; + }, Object()); + } + return obj; +} +/** + * Formats the provided date object as a UTC ISO string. + * @param {Date} dateTimeToFormat date object to be formatted. + * @param {boolean} includeTime flag to include hours, minutes, seconds in output. + * @param {string} dateDelimiter delimiter between date components. + * @param {string} timeDelimiter delimiter between time components. + * @returns {string} UTC ISO format of provided date object. + */ +function formatAsUTCISO(dateTimeToFormat, includeTime = false, dateDelimiter = '', timeDelimiter = '') { + const year = dateTimeToFormat.getUTCFullYear(); + const month = dateTimeToFormat.getUTCMonth() + 1; + const day = dateTimeToFormat.getUTCDate(); + const hour = dateTimeToFormat.getUTCHours(); + const minute = dateTimeToFormat.getUTCMinutes(); + const second = dateTimeToFormat.getUTCSeconds(); + let resultString = `${year.toString().padStart(4, '0')}${dateDelimiter}${month.toString().padStart(2, '0')}${dateDelimiter}${day.toString().padStart(2, '0')}`; + if (includeTime) { + resultString = `${resultString}T${hour.toString().padStart(2, '0')}${timeDelimiter}${minute.toString().padStart(2, '0')}${timeDelimiter}${second.toString().padStart(2, '0')}Z`; + } + return resultString; +} +/** + * Examines the runtime environment and returns the appropriate tracking string. + * @returns {string} metrics tracking string based on the current runtime environment. + */ +function getRuntimeTrackingString() { + if ( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + globalThis.Deno && + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + globalThis.Deno.version && + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + globalThis.Deno.version.deno) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + return `gl-deno/${globalThis.Deno.version.deno}`; + } else { + return `gl-node/${process.versions.node}`; + } +} +/** + * Looks at package.json and creates the user-agent string to be applied to request headers. + * @returns {string} user agent string. + */ +function getUserAgentString() { + const pkg = (0, package_json_helper_cjs_1.getPackageJSON)(); + const hyphenatedPackageName = pkg.name.replace('@google-cloud', 'gcloud-node') // For legacy purposes. + .replace('/', '-'); // For UA spec-compliance purposes. + return hyphenatedPackageName + '/' + pkg.version; +} +function getDirName() { + let dirToUse = ''; + try { + dirToUse = __dirname; + } catch (e) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + dirToUse = __dirname; + } + return dirToUse; +} +function getModuleFormat() { + return isEsm ? 'ESM' : 'CJS'; +} +class PassThroughShim extends stream_1.PassThrough { + constructor() { + super(...arguments); + this.shouldEmitReading = true; + this.shouldEmitWriting = true; + } + _read(size) { + if (this.shouldEmitReading) { + this.emit('reading'); + this.shouldEmitReading = false; + } + super._read(size); + } + _write(chunk, encoding, callback) { + if (this.shouldEmitWriting) { + this.emit('writing'); + this.shouldEmitWriting = false; + } + // Per the nodejs documentation, callback must be invoked on the next tick + process.nextTick(() => { + super._write(chunk, encoding, callback); + }); + } + _final(callback) { + // If the stream is empty (i.e. empty file) final will be invoked before _read / _write + // and we should still emit the proper events. + if (this.shouldEmitReading) { + this.emit('reading'); + this.shouldEmitReading = false; + } + if (this.shouldEmitWriting) { + this.emit('writing'); + this.shouldEmitWriting = false; } + callback(null); + } } -exports.Notification = Notification; -/*! Developer Documentation +exports.PassThroughShim = PassThroughShim; + + +/***/ }), + +/***/ 72033: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AbortError = void 0; +/** + * This error is thrown when an asynchronous operation has been aborted. + * Check for this error by testing the `name` that the name property of the + * error matches `"AbortError"`. * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. + * @example + * ```ts snippet:ReadmeSampleAbortError + * import { AbortError } from "@typespec/ts-http-runtime"; + * + * async function doAsyncWork(options: { abortSignal: AbortSignal }): Promise { + * if (options.abortSignal.aborted) { + * throw new AbortError(); + * } + * + * // do async work + * } + * + * const controller = new AbortController(); + * controller.abort(); + * + * try { + * doAsyncWork({ abortSignal: controller.signal }); + * } catch (e) { + * if (e instanceof Error && e.name === "AbortError") { + * // handle abort error here. + * } + * } + * ``` */ -(0, promisify_1.promisifyAll)(Notification); +class AbortError extends Error { + constructor(message) { + super(message); + this.name = "AbortError"; + } +} +exports.AbortError = AbortError; +//# sourceMappingURL=AbortError.js.map + +/***/ }), +/***/ 5630: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isOAuth2TokenCredential = isOAuth2TokenCredential; +exports.isBearerTokenCredential = isBearerTokenCredential; +exports.isBasicCredential = isBasicCredential; +exports.isApiKeyCredential = isApiKeyCredential; +/** + * Type guard to check if a credential is an OAuth2 token credential. + */ +function isOAuth2TokenCredential(credential) { + return "getOAuth2Token" in credential; +} +/** + * Type guard to check if a credential is a Bearer token credential. + */ +function isBearerTokenCredential(credential) { + return "getBearerToken" in credential; +} +/** + * Type guard to check if a credential is a Basic auth credential. + */ +function isBasicCredential(credential) { + return "username" in credential && "password" in credential; +} +/** + * Type guard to check if a credential is an API key credential. + */ +function isApiKeyCredential(credential) { + return "key" in credential; +} +//# sourceMappingURL=credentials.js.map /***/ }), -/***/ 42851: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 38018: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright 2022 Google LLC -// -// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _Upload_instances, _Upload_gcclGcsCmd, _Upload_resetLocalBuffersCache, _Upload_addLocalBufferCache; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkUploadStatus = exports.createURI = exports.upload = exports.Upload = exports.PROTOCOL_REGEX = void 0; -const abort_controller_1 = __importDefault(__nccwpck_require__(61659)); -const crypto_1 = __nccwpck_require__(6113); -const gaxios = __importStar(__nccwpck_require__(59555)); -const google_auth_library_1 = __nccwpck_require__(20810); -const stream_1 = __nccwpck_require__(12781); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -const uuid = __importStar(__nccwpck_require__(44458)); -const util_js_1 = __nccwpck_require__(59258); -const util_js_2 = __nccwpck_require__(38064); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_helper_cjs_1 = __nccwpck_require__(28568); -const NOT_FOUND_STATUS_CODE = 404; -const RESUMABLE_INCOMPLETE_STATUS_CODE = 308; -const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); -exports.PROTOCOL_REGEX = /^(\w*):\/\//; -class Upload extends stream_1.Writable { - constructor(cfg) { - var _a; - super(cfg); - _Upload_instances.add(this); - this.numBytesWritten = 0; - this.numRetries = 0; - this.currentInvocationId = { - checkUploadStatus: uuid.v4(), - chunk: uuid.v4(), - uri: uuid.v4(), - }; - /** - * A cache of buffers written to this instance, ready for consuming - */ - this.writeBuffers = []; - this.numChunksReadInRequest = 0; - /** - * An array of buffers used for caching the most recent upload chunk. - * We should not assume that the server received all bytes sent in the request. - * - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - */ - this.localWriteCache = []; - this.localWriteCacheByteLength = 0; - this.upstreamEnded = false; - _Upload_gcclGcsCmd.set(this, void 0); - cfg = cfg || {}; - if (!cfg.bucket || !cfg.file) { - throw new Error('A bucket and file name are required'); - } - if (cfg.offset && !cfg.uri) { - throw new RangeError('Cannot provide an `offset` without providing a `uri`'); - } - if (cfg.isPartialUpload && !cfg.chunkSize) { - throw new RangeError('Cannot set `isPartialUpload` without providing a `chunkSize`'); - } - cfg.authConfig = cfg.authConfig || {}; - cfg.authConfig.scopes = [ - 'https://www.googleapis.com/auth/devstorage.full_control', - ]; - this.authClient = cfg.authClient || new google_auth_library_1.GoogleAuth(cfg.authConfig); - const universe = cfg.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; - this.apiEndpoint = `https://storage.${universe}`; - if (cfg.apiEndpoint && cfg.apiEndpoint !== this.apiEndpoint) { - this.apiEndpoint = this.sanitizeEndpoint(cfg.apiEndpoint); - const hostname = new URL(this.apiEndpoint).hostname; - // check if it is a domain of a known universe - const isDomain = hostname === universe; - const isDefaultUniverseDomain = hostname === google_auth_library_1.DEFAULT_UNIVERSE; - // check if it is a subdomain of a known universe - // by checking a last (universe's length + 1) of a hostname - const isSubDomainOfUniverse = hostname.slice(-(universe.length + 1)) === `.${universe}`; - const isSubDomainOfDefaultUniverse = hostname.slice(-(google_auth_library_1.DEFAULT_UNIVERSE.length + 1)) === - `.${google_auth_library_1.DEFAULT_UNIVERSE}`; - if (!isDomain && - !isDefaultUniverseDomain && - !isSubDomainOfUniverse && - !isSubDomainOfDefaultUniverse) { - // a custom, non-universe domain, - // use gaxios - this.authClient = gaxios; +//# sourceMappingURL=oauth2Flows.js.map + +/***/ }), + +/***/ 65546: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=schemes.js.map + +/***/ }), + +/***/ 51648: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiVersionPolicyName = void 0; +exports.apiVersionPolicy = apiVersionPolicy; +exports.apiVersionPolicyName = "ApiVersionPolicy"; +/** + * Creates a policy that sets the apiVersion as a query parameter on every request + * @param options - Client options + * @returns Pipeline policy that sets the apiVersion as a query parameter on every request + */ +function apiVersionPolicy(options) { + return { + name: exports.apiVersionPolicyName, + sendRequest: (req, next) => { + // Use the apiVesion defined in request url directly + // Append one if there is no apiVesion and we have one at client options + const url = new URL(req.url); + if (!url.searchParams.get("api-version") && options.apiVersion) { + req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${options.apiVersion}`; } + return next(req); + }, + }; +} +//# sourceMappingURL=apiVersionPolicy.js.map + +/***/ }), + +/***/ 11687: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultPipeline = createDefaultPipeline; +exports.getCachedDefaultHttpsClient = getCachedDefaultHttpsClient; +const defaultHttpClient_js_1 = __nccwpck_require__(42917); +const createPipelineFromOptions_js_1 = __nccwpck_require__(97239); +const apiVersionPolicy_js_1 = __nccwpck_require__(51648); +const credentials_js_1 = __nccwpck_require__(5630); +const apiKeyAuthenticationPolicy_js_1 = __nccwpck_require__(7937); +const basicAuthenticationPolicy_js_1 = __nccwpck_require__(10068); +const bearerAuthenticationPolicy_js_1 = __nccwpck_require__(73054); +const oauth2AuthenticationPolicy_js_1 = __nccwpck_require__(71305); +let cachedHttpClient; +/** + * Creates a default rest pipeline to re-use accross Rest Level Clients + */ +function createDefaultPipeline(options = {}) { + const pipeline = (0, createPipelineFromOptions_js_1.createPipelineFromOptions)(options); + pipeline.addPolicy((0, apiVersionPolicy_js_1.apiVersionPolicy)(options)); + const { credential, authSchemes, allowInsecureConnection } = options; + if (credential) { + if ((0, credentials_js_1.isApiKeyCredential)(credential)) { + pipeline.addPolicy((0, apiKeyAuthenticationPolicy_js_1.apiKeyAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.baseURI = `${this.apiEndpoint}/upload/storage/v1/b`; - this.bucket = cfg.bucket; - const cacheKeyElements = [cfg.bucket, cfg.file]; - if (typeof cfg.generation === 'number') { - cacheKeyElements.push(`${cfg.generation}`); - } - this.cacheKey = cacheKeyElements.join('/'); - this.customRequestOptions = cfg.customRequestOptions || {}; - this.file = cfg.file; - this.generation = cfg.generation; - this.kmsKeyName = cfg.kmsKeyName; - this.metadata = cfg.metadata || {}; - this.offset = cfg.offset; - this.origin = cfg.origin; - this.params = cfg.params || {}; - this.userProject = cfg.userProject; - this.chunkSize = cfg.chunkSize; - this.retryOptions = cfg.retryOptions; - this.isPartialUpload = (_a = cfg.isPartialUpload) !== null && _a !== void 0 ? _a : false; - if (cfg.key) { - const base64Key = Buffer.from(cfg.key).toString('base64'); - this.encryption = { - key: base64Key, - hash: (0, crypto_1.createHash)('sha256').update(cfg.key).digest('base64'), - }; + else if ((0, credentials_js_1.isBasicCredential)(credential)) { + pipeline.addPolicy((0, basicAuthenticationPolicy_js_1.basicAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.predefinedAcl = cfg.predefinedAcl; - if (cfg.private) - this.predefinedAcl = 'private'; - if (cfg.public) - this.predefinedAcl = 'publicRead'; - const autoRetry = cfg.retryOptions.autoRetry; - this.uriProvidedManually = !!cfg.uri; - this.uri = cfg.uri; - if (this.offset) { - // we're resuming an incomplete upload - this.numBytesWritten = this.offset; + else if ((0, credentials_js_1.isBearerTokenCredential)(credential)) { + pipeline.addPolicy((0, bearerAuthenticationPolicy_js_1.bearerAuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.numRetries = 0; // counter for number of retries currently executed - if (!autoRetry) { - cfg.retryOptions.maxRetries = 0; + else if ((0, credentials_js_1.isOAuth2TokenCredential)(credential)) { + pipeline.addPolicy((0, oauth2AuthenticationPolicy_js_1.oauth2AuthenticationPolicy)({ authSchemes, credential, allowInsecureConnection })); } - this.timeOfFirstRequest = Date.now(); - const contentLength = cfg.metadata - ? Number(cfg.metadata.contentLength) - : NaN; - this.contentLength = isNaN(contentLength) ? '*' : contentLength; - __classPrivateFieldSet(this, _Upload_gcclGcsCmd, cfg[util_js_2.GCCL_GCS_CMD_KEY], "f"); - this.once('writing', () => { - if (this.uri) { - this.continueUploading(); - } - else { - this.createURI(err => { - if (err) { - return this.destroy(err); - } - this.startUploading(); - return; - }); - } - }); - } - /** - * Prevent 'finish' event until the upload has succeeded. - * - * @param fireFinishEvent The finish callback - */ - _final(fireFinishEvent = () => { }) { - this.upstreamEnded = true; - this.once('uploadFinished', fireFinishEvent); - process.nextTick(() => { - this.emit('upstreamFinished'); - // it's possible `_write` may not be called - namely for empty object uploads - this.emit('writing'); - }); } - /** - * Handles incoming data from upstream - * - * @param chunk The chunk to append to the buffer - * @param encoding The encoding of the chunk - * @param readCallback A callback for when the buffer has been read downstream - */ - _write(chunk, encoding, readCallback = () => { }) { - // Backwards-compatible event - this.emit('writing'); - this.writeBuffers.push(typeof chunk === 'string' ? Buffer.from(chunk, encoding) : chunk); - this.once('readFromChunkBuffer', readCallback); - process.nextTick(() => this.emit('wroteToChunkBuffer')); + return pipeline; +} +function getCachedDefaultHttpsClient() { + if (!cachedHttpClient) { + cachedHttpClient = (0, defaultHttpClient_js_1.createDefaultHttpClient)(); } - /** - * Prepends the local buffer to write buffer and resets it. - * - * @param keepLastBytes number of bytes to keep from the end of the local buffer. - */ - prependLocalBufferToUpstream(keepLastBytes) { - // Typically, the upstream write buffers should be smaller than the local - // cache, so we can save time by setting the local cache as the new - // upstream write buffer array and appending the old array to it - let initialBuffers = []; - if (keepLastBytes) { - // we only want the last X bytes - let bytesKept = 0; - while (keepLastBytes > bytesKept) { - // load backwards because we want the last X bytes - // note: `localWriteCacheByteLength` is reset below - let buf = this.localWriteCache.pop(); - if (!buf) - break; - bytesKept += buf.byteLength; - if (bytesKept > keepLastBytes) { - // we have gone over the amount desired, let's keep the last X bytes - // of this buffer - const diff = bytesKept - keepLastBytes; - buf = buf.subarray(diff); - bytesKept -= diff; - } - initialBuffers.unshift(buf); - } - } - else { - // we're keeping all of the local cache, simply use it as the initial buffer - initialBuffers = this.localWriteCache; - } - // Append the old upstream to the new - const append = this.writeBuffers; - this.writeBuffers = initialBuffers; - for (const buf of append) { - this.writeBuffers.push(buf); + return cachedHttpClient; +} +//# sourceMappingURL=clientHelpers.js.map + +/***/ }), + +/***/ 15714: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getClient = getClient; +const clientHelpers_js_1 = __nccwpck_require__(11687); +const sendRequest_js_1 = __nccwpck_require__(87891); +const urlHelpers_js_1 = __nccwpck_require__(91752); +const checkEnvironment_js_1 = __nccwpck_require__(94121); +/** + * Creates a client with a default pipeline + * @param endpoint - Base endpoint for the client + * @param credentials - Credentials to authenticate the requests + * @param options - Client options + */ +function getClient(endpoint, clientOptions = {}) { + const pipeline = clientOptions.pipeline ?? (0, clientHelpers_js_1.createDefaultPipeline)(clientOptions); + if (clientOptions.additionalPolicies?.length) { + for (const { policy, position } of clientOptions.additionalPolicies) { + // Sign happens after Retry and is commonly needed to occur + // before policies that intercept post-retry. + const afterPhase = position === "perRetry" ? "Sign" : undefined; + pipeline.addPolicy(policy, { + afterPhase, + }); } - // reset last buffers sent - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); } - /** - * Retrieves data from upstream's buffer. - * - * @param limit The maximum amount to return from the buffer. - */ - *pullFromChunkBuffer(limit) { - while (limit) { - const buf = this.writeBuffers.shift(); - if (!buf) - break; - let bufToYield = buf; - if (buf.byteLength > limit) { - bufToYield = buf.subarray(0, limit); - this.writeBuffers.unshift(buf.subarray(limit)); - limit = 0; + const { allowInsecureConnection, httpClient } = clientOptions; + const endpointUrl = clientOptions.endpoint ?? endpoint; + const client = (path, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path, args, { allowInsecureConnection, ...requestOptions }); + return { + get: (requestOptions = {}) => { + return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + post: (requestOptions = {}) => { + return buildOperation("POST", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + put: (requestOptions = {}) => { + return buildOperation("PUT", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + patch: (requestOptions = {}) => { + return buildOperation("PATCH", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + delete: (requestOptions = {}) => { + return buildOperation("DELETE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + head: (requestOptions = {}) => { + return buildOperation("HEAD", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + options: (requestOptions = {}) => { + return buildOperation("OPTIONS", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + trace: (requestOptions = {}) => { + return buildOperation("TRACE", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); + }, + }; + }; + return { + path: client, + pathUnchecked: client, + pipeline, + }; +} +function buildOperation(method, url, pipeline, options, allowInsecureConnection, httpClient) { + allowInsecureConnection = options.allowInsecureConnection ?? allowInsecureConnection; + return { + then: function (onFulfilled, onrejected) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection }, httpClient).then(onFulfilled, onrejected); + }, + async asBrowserStream() { + if (checkEnvironment_js_1.isNodeLike) { + throw new Error("`asBrowserStream` is supported only in the browser environment. Use `asNodeStream` instead to obtain the response body stream. If you require a Web stream of the response in Node, consider using `Readable.toWeb` on the result of `asNodeStream`."); } else { - limit -= buf.byteLength; - } - yield bufToYield; - // Notify upstream we've read from the buffer and we're able to consume - // more. It can also potentially send more data down as we're currently - // iterating. - this.emit('readFromChunkBuffer'); - } - } - /** - * A handler for determining if data is ready to be read from upstream. - * - * @returns If there will be more chunks to read in the future - */ - async waitForNextChunk() { - const willBeMoreChunks = await new Promise(resolve => { - // There's data available - it should be digested - if (this.writeBuffers.length) { - return resolve(true); + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } - // The upstream writable ended, we shouldn't expect any more data. - if (this.upstreamEnded) { - return resolve(false); + }, + async asNodeStream() { + if (checkEnvironment_js_1.isNodeLike) { + return (0, sendRequest_js_1.sendRequest)(method, url, pipeline, { ...options, allowInsecureConnection, responseAsStream: true }, httpClient); } - // Nothing immediate seems to be determined. We need to prepare some - // listeners to determine next steps... - const wroteToChunkBufferCallback = () => { - removeListeners(); - return resolve(true); - }; - const upstreamFinishedCallback = () => { - removeListeners(); - // this should be the last chunk, if there's anything there - if (this.writeBuffers.length) - return resolve(true); - return resolve(false); - }; - // Remove listeners when we're ready to callback. - const removeListeners = () => { - this.removeListener('wroteToChunkBuffer', wroteToChunkBufferCallback); - this.removeListener('upstreamFinished', upstreamFinishedCallback); - }; - // If there's data recently written it should be digested - this.once('wroteToChunkBuffer', wroteToChunkBufferCallback); - // If the upstream finishes let's see if there's anything to grab - this.once('upstreamFinished', upstreamFinishedCallback); - }); - return willBeMoreChunks; - } - /** - * Reads data from upstream up to the provided `limit`. - * Ends when the limit has reached or no data is expected to be pushed from upstream. - * - * @param limit The most amount of data this iterator should return. `Infinity` by default. - */ - async *upstreamIterator(limit = Infinity) { - // read from upstream chunk buffer - while (limit && (await this.waitForNextChunk())) { - // read until end or limit has been reached - for (const chunk of this.pullFromChunkBuffer(limit)) { - limit -= chunk.byteLength; - yield chunk; + else { + throw new Error("`isNodeStream` is not supported in the browser environment. Use `asBrowserStream` to obtain the response body stream."); } + }, + }; +} +//# sourceMappingURL=getClient.js.map + +/***/ }), + +/***/ 56985: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildBodyPart = buildBodyPart; +exports.buildMultipartBody = buildMultipartBody; +const restError_js_1 = __nccwpck_require__(42858); +const httpHeaders_js_1 = __nccwpck_require__(66816); +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const typeGuards_js_1 = __nccwpck_require__(61580); +/** + * Get value of a header in the part descriptor ignoring case + */ +function getHeaderValue(descriptor, headerName) { + if (descriptor.headers) { + const actualHeaderName = Object.keys(descriptor.headers).find((x) => x.toLowerCase() === headerName.toLowerCase()); + if (actualHeaderName) { + return descriptor.headers[actualHeaderName]; } } - createURI(callback) { - if (!callback) { - return this.createURIAsync(); - } - this.createURIAsync().then(r => callback(null, r), callback); + return undefined; +} +function getPartContentType(descriptor) { + const contentTypeHeader = getHeaderValue(descriptor, "content-type"); + if (contentTypeHeader) { + return contentTypeHeader; } - async createURIAsync() { - const metadata = { ...this.metadata }; - const headers = {}; - // Delete content length and content type from metadata if they exist. - // These are headers and should not be sent as part of the metadata. - if (metadata.contentLength) { - headers['X-Upload-Content-Length'] = metadata.contentLength.toString(); - delete metadata.contentLength; - } - if (metadata.contentType) { - headers['X-Upload-Content-Type'] = metadata.contentType; - delete metadata.contentType; + // Special value of null means content type is to be omitted + if (descriptor.contentType === null) { + return undefined; + } + if (descriptor.contentType) { + return descriptor.contentType; + } + const { body } = descriptor; + if (body === null || body === undefined) { + return undefined; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return "text/plain; charset=UTF-8"; + } + if (body instanceof Blob) { + return body.type || "application/octet-stream"; + } + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return "application/octet-stream"; + } + // arbitrary non-text object -> generic JSON content type by default. We will try to JSON.stringify the body. + return "application/json"; +} +/** + * Enclose value in quotes and escape special characters, for use in the Content-Disposition header + */ +function escapeDispositionField(value) { + return JSON.stringify(value); +} +function getContentDisposition(descriptor) { + const contentDispositionHeader = getHeaderValue(descriptor, "content-disposition"); + if (contentDispositionHeader) { + return contentDispositionHeader; + } + if (descriptor.dispositionType === undefined && + descriptor.name === undefined && + descriptor.filename === undefined) { + return undefined; + } + const dispositionType = descriptor.dispositionType ?? "form-data"; + let disposition = dispositionType; + if (descriptor.name) { + disposition += `; name=${escapeDispositionField(descriptor.name)}`; + } + let filename = undefined; + if (descriptor.filename) { + filename = descriptor.filename; + } + else if (typeof File !== "undefined" && descriptor.body instanceof File) { + const filenameFromFile = descriptor.body.name; + if (filenameFromFile !== "") { + filename = filenameFromFile; } - let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.uri}`; - if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { - googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + } + if (filename) { + disposition += `; filename=${escapeDispositionField(filename)}`; + } + return disposition; +} +function normalizeBody(body, contentType) { + if (body === undefined) { + // zero-length body + return new Uint8Array([]); + } + // binary and primitives should go straight on the wire regardless of content type + if ((0, typeGuards_js_1.isBinaryBody)(body)) { + return body; + } + if (typeof body === "string" || typeof body === "number" || typeof body === "boolean") { + return (0, bytesEncoding_js_1.stringToUint8Array)(String(body), "utf-8"); + } + // stringify objects for JSON-ish content types e.g. application/json, application/merge-patch+json, application/vnd.oci.manifest.v1+json, application.json; charset=UTF-8 + if (contentType && /application\/(.+\+)?json(;.+)?/i.test(String(contentType))) { + return (0, bytesEncoding_js_1.stringToUint8Array)(JSON.stringify(body), "utf-8"); + } + throw new restError_js_1.RestError(`Unsupported body/content-type combination: ${body}, ${contentType}`); +} +function buildBodyPart(descriptor) { + const contentType = getPartContentType(descriptor); + const contentDisposition = getContentDisposition(descriptor); + const headers = (0, httpHeaders_js_1.createHttpHeaders)(descriptor.headers ?? {}); + if (contentType) { + headers.set("content-type", contentType); + } + if (contentDisposition) { + headers.set("content-disposition", contentDisposition); + } + const body = normalizeBody(descriptor.body, contentType); + return { + headers, + body, + }; +} +function buildMultipartBody(parts) { + return { parts: parts.map(buildBodyPart) }; +} +//# sourceMappingURL=multipart.js.map + +/***/ }), + +/***/ 16857: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.operationOptionsToRequestParameters = operationOptionsToRequestParameters; +/** + * Helper function to convert OperationOptions to RequestParameters + * @param options - the options that are used by Modular layer to send the request + * @returns the result of the conversion in RequestParameters of RLC layer + */ +function operationOptionsToRequestParameters(options) { + return { + allowInsecureConnection: options.requestOptions?.allowInsecureConnection, + timeout: options.requestOptions?.timeout, + skipUrlEncoding: options.requestOptions?.skipUrlEncoding, + abortSignal: options.abortSignal, + onUploadProgress: options.requestOptions?.onUploadProgress, + onDownloadProgress: options.requestOptions?.onDownloadProgress, + headers: { ...options.requestOptions?.headers }, + onResponse: options.onResponse, + }; +} +//# sourceMappingURL=operationOptionHelpers.js.map + +/***/ }), + +/***/ 24193: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createRestError = createRestError; +const restError_js_1 = __nccwpck_require__(42858); +const httpHeaders_js_1 = __nccwpck_require__(66816); +function createRestError(messageOrResponse, response) { + const resp = typeof messageOrResponse === "string" ? response : messageOrResponse; + const internalError = resp.body?.error ?? resp.body; + const message = typeof messageOrResponse === "string" + ? messageOrResponse + : (internalError?.message ?? `Unexpected status code: ${resp.status}`); + return new restError_js_1.RestError(message, { + statusCode: statusCodeToNumber(resp.status), + code: internalError?.code, + request: resp.request, + response: toPipelineResponse(resp), + }); +} +function toPipelineResponse(response) { + return { + headers: (0, httpHeaders_js_1.createHttpHeaders)(response.headers), + request: response.request, + status: statusCodeToNumber(response.status) ?? -1, + }; +} +function statusCodeToNumber(statusCode) { + const status = Number.parseInt(statusCode); + return Number.isNaN(status) ? undefined : status; +} +//# sourceMappingURL=restError.js.map + +/***/ }), + +/***/ 87891: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sendRequest = sendRequest; +const restError_js_1 = __nccwpck_require__(42858); +const httpHeaders_js_1 = __nccwpck_require__(66816); +const pipelineRequest_js_1 = __nccwpck_require__(47983); +const clientHelpers_js_1 = __nccwpck_require__(11687); +const typeGuards_js_1 = __nccwpck_require__(61580); +const multipart_js_1 = __nccwpck_require__(56985); +/** + * Helper function to send request used by the client + * @param method - method to use to send the request + * @param url - url to send the request to + * @param pipeline - pipeline with the policies to run when sending the request + * @param options - request options + * @param customHttpClient - a custom HttpClient to use when making the request + * @returns returns and HttpResponse + */ +async function sendRequest(method, url, pipeline, options = {}, customHttpClient) { + const httpClient = customHttpClient ?? (0, clientHelpers_js_1.getCachedDefaultHttpsClient)(); + const request = buildPipelineRequest(method, url, options); + try { + const response = await pipeline.sendRequest(httpClient, request); + const headers = response.headers.toJSON(); + const stream = response.readableStreamBody ?? response.browserStreamBody; + const parsedBody = options.responseAsStream || stream !== undefined ? undefined : getResponseBody(response); + const body = stream ?? parsedBody; + if (options?.onResponse) { + options.onResponse({ ...response, request, rawHeaders: headers, parsedBody }); } - // Check if headers already exist before creating new ones - const reqOpts = { - method: 'POST', - url: [this.baseURI, this.bucket, 'o'].join('/'), - params: Object.assign({ - name: this.file, - uploadType: 'resumable', - }, this.params), - data: metadata, - headers: { - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': googAPIClient, - ...headers, - }, + return { + request, + headers, + status: `${response.status}`, + body, }; - if (metadata.contentLength) { - reqOpts.headers['X-Upload-Content-Length'] = - metadata.contentLength.toString(); - } - if (metadata.contentType) { - reqOpts.headers['X-Upload-Content-Type'] = metadata.contentType; - } - if (typeof this.generation !== 'undefined') { - reqOpts.params.ifGenerationMatch = this.generation; - } - if (this.kmsKeyName) { - reqOpts.params.kmsKeyName = this.kmsKeyName; + } + catch (e) { + if ((0, restError_js_1.isRestError)(e) && e.response && options.onResponse) { + const { response } = e; + const rawHeaders = response.headers.toJSON(); + // UNBRANDED DIFFERENCE: onResponse callback does not have a second __legacyError property + options?.onResponse({ ...response, request, rawHeaders }, e); } - if (this.predefinedAcl) { - reqOpts.params.predefinedAcl = this.predefinedAcl; + throw e; + } +} +/** + * Function to determine the request content type + * @param options - request options InternalRequestParameters + * @returns returns the content-type + */ +function getRequestContentType(options = {}) { + return (options.contentType ?? + options.headers?.["content-type"] ?? + getContentType(options.body)); +} +/** + * Function to determine the content-type of a body + * this is used if an explicit content-type is not provided + * @param body - body in the request + * @returns returns the content-type + */ +function getContentType(body) { + if (ArrayBuffer.isView(body)) { + return "application/octet-stream"; + } + if (typeof body === "string") { + try { + JSON.parse(body); + return "application/json"; } - if (this.origin) { - reqOpts.headers.Origin = this.origin; + catch (error) { + // If we fail to parse the body, it is not json + return undefined; } - const uri = await (0, async_retry_1.default)(async (bail) => { - var _a, _b, _c; - try { - const res = await this.makeRequest(reqOpts); - // We have successfully got a URI we can now create a new invocation id - this.currentInvocationId.uri = uuid.v4(); - return res.headers.location; + } + // By default return json + return "application/json"; +} +function buildPipelineRequest(method, url, options = {}) { + const requestContentType = getRequestContentType(options); + const { body, multipartBody } = getRequestBody(options.body, requestContentType); + const hasContent = body !== undefined || multipartBody !== undefined; + const headers = (0, httpHeaders_js_1.createHttpHeaders)({ + ...(options.headers ? options.headers : {}), + accept: options.accept ?? options.headers?.accept ?? "application/json", + ...(hasContent && + requestContentType && { + "content-type": requestContentType, + }), + }); + return (0, pipelineRequest_js_1.createPipelineRequest)({ + url, + method, + body, + multipartBody, + headers, + allowInsecureConnection: options.allowInsecureConnection, + abortSignal: options.abortSignal, + onUploadProgress: options.onUploadProgress, + onDownloadProgress: options.onDownloadProgress, + timeout: options.timeout, + enableBrowserStreams: true, + streamResponseStatusCodes: options.responseAsStream + ? new Set([Number.POSITIVE_INFINITY]) + : undefined, + }); +} +/** + * Prepares the body before sending the request + */ +function getRequestBody(body, contentType = "") { + if (body === undefined) { + return { body: undefined }; + } + if (typeof FormData !== "undefined" && body instanceof FormData) { + return { body }; + } + if ((0, typeGuards_js_1.isReadableStream)(body)) { + return { body }; + } + if (ArrayBuffer.isView(body)) { + return { body: body instanceof Uint8Array ? body : JSON.stringify(body) }; + } + const firstType = contentType.split(";")[0]; + switch (firstType) { + case "application/json": + return { body: JSON.stringify(body) }; + case "multipart/form-data": + if (Array.isArray(body)) { + return { multipartBody: (0, multipart_js_1.buildMultipartBody)(body) }; } - catch (err) { - const e = err; - const apiError = { - code: (_a = e.response) === null || _a === void 0 ? void 0 : _a.status, - name: (_b = e.response) === null || _b === void 0 ? void 0 : _b.statusText, - message: (_c = e.response) === null || _c === void 0 ? void 0 : _c.statusText, - errors: [ - { - reason: e.code, - }, - ], - }; - if (this.retryOptions.maxRetries > 0 && - this.retryOptions.retryableErrorFn(apiError)) { - throw e; - } - else { - return bail(e); - } + return { body: JSON.stringify(body) }; + case "text/plain": + return { body: String(body) }; + default: + if (typeof body === "string") { + return { body }; } - }, { - retries: this.retryOptions.maxRetries, - factor: this.retryOptions.retryDelayMultiplier, - maxTimeout: this.retryOptions.maxRetryDelay * 1000, //convert to milliseconds - maxRetryTime: this.retryOptions.totalTimeout * 1000, //convert to milliseconds - }); - this.uri = uri; - this.offset = 0; - // emit the newly generated URI for future reuse, if necessary. - this.emit('uri', uri); - return uri; + return { body: JSON.stringify(body) }; } - async continueUploading() { - var _a; - (_a = this.offset) !== null && _a !== void 0 ? _a : (await this.getAndSetOffset()); - return this.startUploading(); +} +/** + * Prepares the response body + */ +function getResponseBody(response) { + // Set the default response type + const contentType = response.headers.get("content-type") ?? ""; + const firstType = contentType.split(";")[0]; + const bodyToParse = response.bodyAsText ?? ""; + if (firstType === "text/plain") { + return String(bodyToParse); } - async startUploading() { - const multiChunkMode = !!this.chunkSize; - let responseReceived = false; - this.numChunksReadInRequest = 0; - if (!this.offset) { - this.offset = 0; - } - // Check if the offset (server) is too far behind the current stream - if (this.offset < this.numBytesWritten) { - const delta = this.numBytesWritten - this.offset; - const message = `The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${delta} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`; - this.emit('error', new RangeError(message)); - return; - } - // Check if we should 'fast-forward' to the relevant data to upload - if (this.numBytesWritten < this.offset) { - // 'fast-forward' to the byte where we need to upload. - // only push data from the byte after the one we left off on - const fastForwardBytes = this.offset - this.numBytesWritten; - for await (const _chunk of this.upstreamIterator(fastForwardBytes)) { - _chunk; // discard the data up until the point we want - } - this.numBytesWritten = this.offset; + // Default to "application/json" and fallback to string; + try { + return bodyToParse ? JSON.parse(bodyToParse) : undefined; + } + catch (error) { + // If we were supposed to get a JSON object and failed to + // parse, throw a parse error + if (firstType === "application/json") { + throw createParseError(response, error); + } + // We are not sure how to handle the response so we return it as + // plain text. + return String(bodyToParse); + } +} +function createParseError(response, err) { + const msg = `Error "${err}" occurred while parsing the response body - ${response.bodyAsText}.`; + const errCode = err.code ?? restError_js_1.RestError.PARSE_ERROR; + return new restError_js_1.RestError(msg, { + code: errCode, + statusCode: response.status, + request: response.request, + response: response, + }); +} +//# sourceMappingURL=sendRequest.js.map + +/***/ }), + +/***/ 91752: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildRequestUrl = buildRequestUrl; +exports.buildBaseUrl = buildBaseUrl; +exports.replaceAll = replaceAll; +function isQueryParameterWithOptions(x) { + const value = x.value; + return (value !== undefined && value.toString !== undefined && typeof value.toString === "function"); +} +/** + * Builds the request url, filling in query and path parameters + * @param endpoint - base url which can be a template url + * @param routePath - path to append to the endpoint + * @param pathParameters - values of the path parameters + * @param options - request parameters including query parameters + * @returns a full url with path and query parameters + */ +function buildRequestUrl(endpoint, routePath, pathParameters, options = {}) { + if (routePath.startsWith("https://") || routePath.startsWith("http://")) { + return routePath; + } + endpoint = buildBaseUrl(endpoint, options); + routePath = buildRoutePath(routePath, pathParameters, options); + const requestUrl = appendQueryParams(`${endpoint}/${routePath}`, options); + const url = new URL(requestUrl); + return (url + .toString() + // Remove double forward slashes + .replace(/([^:]\/)\/+/g, "$1")); +} +function getQueryParamValue(key, allowReserved, style, param) { + let separator; + if (style === "pipeDelimited") { + separator = "|"; + } + else if (style === "spaceDelimited") { + separator = "%20"; + } + else { + separator = ","; + } + let paramValues; + if (Array.isArray(param)) { + paramValues = param; + } + else if (typeof param === "object" && param.toString === Object.prototype.toString) { + // If the parameter is an object without a custom toString implementation (e.g. a Date), + // then we should deconstruct the object into an array [key1, value1, key2, value2, ...]. + paramValues = Object.entries(param).flat(); + } + else { + paramValues = [param]; + } + const value = paramValues + .map((p) => { + if (p === null || p === undefined) { + return ""; } - let expectedUploadSize = undefined; - // Set `expectedUploadSize` to `contentLength - this.numBytesWritten`, if available - if (typeof this.contentLength === 'number') { - expectedUploadSize = this.contentLength - this.numBytesWritten; + if (!p.toString || typeof p.toString !== "function") { + throw new Error(`Query parameters must be able to be represented as string, ${key} can't`); } - // `expectedUploadSize` should be no more than the `chunkSize`. - // It's possible this is the last chunk request for a multiple - // chunk upload, thus smaller than the chunk size. - if (this.chunkSize) { - expectedUploadSize = expectedUploadSize - ? Math.min(this.chunkSize, expectedUploadSize) - : this.chunkSize; + const rawValue = p.toISOString !== undefined ? p.toISOString() : p.toString(); + return allowReserved ? rawValue : encodeURIComponent(rawValue); + }) + .join(separator); + return `${allowReserved ? key : encodeURIComponent(key)}=${value}`; +} +function appendQueryParams(url, options = {}) { + if (!options.queryParameters) { + return url; + } + const parsedUrl = new URL(url); + const queryParams = options.queryParameters; + const paramStrings = []; + for (const key of Object.keys(queryParams)) { + const param = queryParams[key]; + if (param === undefined || param === null) { + continue; } - // A queue for the upstream data - const upstreamQueue = this.upstreamIterator(expectedUploadSize); - // The primary read stream for this request. This stream retrieves no more - // than the exact requested amount from upstream. - const requestStream = new stream_1.Readable({ - read: async () => { - // Don't attempt to retrieve data upstream if we already have a response - if (responseReceived) - requestStream.push(null); - const result = await upstreamQueue.next(); - if (result.value) { - this.numChunksReadInRequest++; - if (multiChunkMode) { - // save ever buffer used in the request in multi-chunk mode - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); - } - else { - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, result.value); - } - this.numBytesWritten += result.value.byteLength; - this.emit('progress', { - bytesWritten: this.numBytesWritten, - contentLength: this.contentLength, - }); - requestStream.push(result.value); + const hasMetadata = isQueryParameterWithOptions(param); + const rawValue = hasMetadata ? param.value : param; + const explode = hasMetadata ? (param.explode ?? false) : false; + const style = hasMetadata && param.style ? param.style : "form"; + if (explode) { + if (Array.isArray(rawValue)) { + for (const item of rawValue) { + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, item)); } - if (result.done) { - requestStream.push(null); + } + else if (typeof rawValue === "object") { + // For object explode, the name of the query parameter is ignored and we use the object key instead + for (const [actualKey, value] of Object.entries(rawValue)) { + paramStrings.push(getQueryParamValue(actualKey, options.skipUrlEncoding ?? false, style, value)); } - }, - }); - let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.chunk}`; - if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { - googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; - } - const headers = { - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': googAPIClient, - }; - // If using multiple chunk upload, set appropriate header - if (multiChunkMode) { - // We need to know how much data is available upstream to set the `Content-Range` header. - // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - for await (const chunk of this.upstreamIterator(expectedUploadSize)) { - // This will conveniently track and keep the size of the buffers. - // We will reach either the expected upload size or the remainder of the stream. - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_addLocalBufferCache).call(this, chunk); } - // This is the sum from the `#addLocalBufferCache` calls - const bytesToUpload = this.localWriteCacheByteLength; - // Important: we want to know if the upstream has ended and the queue is empty before - // unshifting data back into the queue. This way we will know if this is the last request or not. - const isLastChunkOfUpload = !(await this.waitForNextChunk()); - // Important: put the data back in the queue for the actual upload - this.prependLocalBufferToUpstream(); - let totalObjectSize = this.contentLength; - if (typeof this.contentLength !== 'number' && - isLastChunkOfUpload && - !this.isPartialUpload) { - // Let's let the server know this is the last chunk of the object since we didn't set it before. - totalObjectSize = bytesToUpload + this.numBytesWritten; + else { + // Explode doesn't really make sense for primitives + throw new Error("explode can only be set to true for objects and arrays"); } - // `- 1` as the ending byte is inclusive in the request. - const endingByte = bytesToUpload + this.numBytesWritten - 1; - // `Content-Length` for multiple chunk uploads is the size of the chunk, - // not the overall object - headers['Content-Length'] = bytesToUpload; - headers['Content-Range'] = - `bytes ${this.offset}-${endingByte}/${totalObjectSize}`; } else { - headers['Content-Range'] = `bytes ${this.offset}-*/${this.contentLength}`; + paramStrings.push(getQueryParamValue(key, options.skipUrlEncoding ?? false, style, rawValue)); } - const reqOpts = { - method: 'PUT', - url: this.uri, - headers, - body: requestStream, - }; - try { - const resp = await this.makeRequestStream(reqOpts); - if (resp) { - responseReceived = true; - await this.responseHandler(resp); - } + } + if (parsedUrl.search !== "") { + parsedUrl.search += "&"; + } + parsedUrl.search += paramStrings.join("&"); + return parsedUrl.toString(); +} +function buildBaseUrl(endpoint, options) { + if (!options.pathParameters) { + return endpoint; + } + const pathParams = options.pathParameters; + for (const [key, param] of Object.entries(pathParams)) { + if (param === undefined || param === null) { + throw new Error(`Path parameters ${key} must not be undefined or null`); } - catch (e) { - const err = e; - if (this.retryOptions.retryableErrorFn(err)) { - this.attemptDelayedRetry({ - status: NaN, - data: err, - }); - return; - } - this.destroy(err); + if (!param.toString || typeof param.toString !== "function") { + throw new Error(`Path parameters must be able to be represented as string, ${key} can't`); + } + let value = param.toISOString !== undefined ? param.toISOString() : String(param); + if (!options.skipUrlEncoding) { + value = encodeURIComponent(param); } + endpoint = replaceAll(endpoint, `{${key}}`, value) ?? ""; } - // Process the API response to look for errors that came in - // the response body. - async responseHandler(resp) { - if (resp.data.error) { - this.destroy(resp.data.error); - return; + return endpoint; +} +function buildRoutePath(routePath, pathParameters, options = {}) { + for (const pathParam of pathParameters) { + const allowReserved = typeof pathParam === "object" && (pathParam.allowReserved ?? false); + let value = typeof pathParam === "object" ? pathParam.value : pathParam; + if (!options.skipUrlEncoding && !allowReserved) { + value = encodeURIComponent(value); } - // At this point we can safely create a new id for the chunk - this.currentInvocationId.chunk = uuid.v4(); - const moreDataToUpload = await this.waitForNextChunk(); - const shouldContinueWithNextMultiChunkRequest = this.chunkSize && - resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && - resp.headers.range && - moreDataToUpload; - /** - * This is true when we're expecting to upload more data in a future request, - * yet the upstream for the upload session has been exhausted. - */ - const shouldContinueUploadInAnotherRequest = this.isPartialUpload && - resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE && - !moreDataToUpload; - if (shouldContinueWithNextMultiChunkRequest) { - // Use the upper value in this header to determine where to start the next chunk. - // We should not assume that the server received all bytes sent in the request. - // https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - const range = resp.headers.range; - this.offset = Number(range.split('-')[1]) + 1; - // We should not assume that the server received all bytes sent in the request. - // - https://cloud.google.com/storage/docs/performing-resumable-uploads#chunked-upload - const missingBytes = this.numBytesWritten - this.offset; - if (missingBytes) { - // As multi-chunk uploads send one chunk per request and pulls one - // chunk into the pipeline, prepending the missing bytes back should - // be fine for the next request. - this.prependLocalBufferToUpstream(missingBytes); - this.numBytesWritten -= missingBytes; - } - else { - // No bytes missing - no need to keep the local cache - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); - } - // continue uploading next chunk - this.continueUploading(); + routePath = routePath.replace(/\{[\w-]+\}/, String(value)); + } + return routePath; +} +/** + * Replace all of the instances of searchValue in value with the provided replaceValue. + * @param value - The value to search and replace in. + * @param searchValue - The value to search for in the value argument. + * @param replaceValue - The value to replace searchValue with in the value argument. + * @returns The value where each instance of searchValue was replaced with replacedValue. + */ +function replaceAll(value, searchValue, replaceValue) { + return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || ""); +} +//# sourceMappingURL=urlHelpers.js.map + +/***/ }), + +/***/ 58463: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_RETRY_POLICY_COUNT = exports.SDK_VERSION = void 0; +exports.SDK_VERSION = "0.3.2"; +exports.DEFAULT_RETRY_POLICY_COUNT = 3; +//# sourceMappingURL=constants.js.map + +/***/ }), + +/***/ 97239: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineFromOptions = createPipelineFromOptions; +const logPolicy_js_1 = __nccwpck_require__(71610); +const pipeline_js_1 = __nccwpck_require__(34744); +const redirectPolicy_js_1 = __nccwpck_require__(45125); +const userAgentPolicy_js_1 = __nccwpck_require__(35402); +const decompressResponsePolicy_js_1 = __nccwpck_require__(74162); +const defaultRetryPolicy_js_1 = __nccwpck_require__(20297); +const formDataPolicy_js_1 = __nccwpck_require__(51393); +const checkEnvironment_js_1 = __nccwpck_require__(94121); +const proxyPolicy_js_1 = __nccwpck_require__(57954); +const agentPolicy_js_1 = __nccwpck_require__(73398); +const tlsPolicy_js_1 = __nccwpck_require__(24655); +const multipartPolicy_js_1 = __nccwpck_require__(95316); +/** + * Create a new pipeline with a default set of customizable policies. + * @param options - Options to configure a custom pipeline. + */ +function createPipelineFromOptions(options) { + const pipeline = (0, pipeline_js_1.createEmptyPipeline)(); + if (checkEnvironment_js_1.isNodeLike) { + if (options.agent) { + pipeline.addPolicy((0, agentPolicy_js_1.agentPolicy)(options.agent)); } - else if (!this.isSuccessfulResponse(resp.status) && - !shouldContinueUploadInAnotherRequest) { - const err = new Error('Upload failed'); - err.code = resp.status; - err.name = 'Upload failed'; - if (resp === null || resp === void 0 ? void 0 : resp.data) { - err.errors = [resp === null || resp === void 0 ? void 0 : resp.data]; + if (options.tlsOptions) { + pipeline.addPolicy((0, tlsPolicy_js_1.tlsPolicy)(options.tlsOptions)); + } + pipeline.addPolicy((0, proxyPolicy_js_1.proxyPolicy)(options.proxyOptions)); + pipeline.addPolicy((0, decompressResponsePolicy_js_1.decompressResponsePolicy)()); + } + pipeline.addPolicy((0, formDataPolicy_js_1.formDataPolicy)(), { beforePolicies: [multipartPolicy_js_1.multipartPolicyName] }); + pipeline.addPolicy((0, userAgentPolicy_js_1.userAgentPolicy)(options.userAgentOptions)); + // The multipart policy is added after policies with no phase, so that + // policies can be added between it and formDataPolicy to modify + // properties (e.g., making the boundary constant in recorded tests). + pipeline.addPolicy((0, multipartPolicy_js_1.multipartPolicy)(), { afterPhase: "Deserialize" }); + pipeline.addPolicy((0, defaultRetryPolicy_js_1.defaultRetryPolicy)(options.retryOptions), { phase: "Retry" }); + if (checkEnvironment_js_1.isNodeLike) { + // Both XHR and Fetch expect to handle redirects automatically, + // so only include this policy when we're in Node. + pipeline.addPolicy((0, redirectPolicy_js_1.redirectPolicy)(options.redirectOptions), { afterPhase: "Retry" }); + } + pipeline.addPolicy((0, logPolicy_js_1.logPolicy)(options.loggingOptions), { afterPhase: "Sign" }); + return pipeline; +} +//# sourceMappingURL=createPipelineFromOptions.js.map + +/***/ }), + +/***/ 42917: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultHttpClient = createDefaultHttpClient; +const nodeHttpClient_js_1 = __nccwpck_require__(63098); +/** + * Create the correct HttpClient for the current environment. + */ +function createDefaultHttpClient() { + return (0, nodeHttpClient_js_1.createNodeHttpClient)(); +} +//# sourceMappingURL=defaultHttpClient.js.map + +/***/ }), + +/***/ 66816: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createHttpHeaders = createHttpHeaders; +function normalizeName(name) { + return name.toLowerCase(); +} +function* headerIterator(map) { + for (const entry of map.values()) { + yield [entry.name, entry.value]; + } +} +class HttpHeadersImpl { + _headersMap; + constructor(rawHeaders) { + this._headersMap = new Map(); + if (rawHeaders) { + for (const headerName of Object.keys(rawHeaders)) { + this.set(headerName, rawHeaders[headerName]); + } + } + } + /** + * Set a header in this collection with the provided name and value. The name is + * case-insensitive. + * @param name - The name of the header to set. This value is case-insensitive. + * @param value - The value of the header to set. + */ + set(name, value) { + this._headersMap.set(normalizeName(name), { name, value: String(value).trim() }); + } + /** + * Get the header value for the provided header name, or undefined if no header exists in this + * collection with the provided name. + * @param name - The name of the header. This value is case-insensitive. + */ + get(name) { + return this._headersMap.get(normalizeName(name))?.value; + } + /** + * Get whether or not this header collection contains a header entry for the provided header name. + * @param name - The name of the header to set. This value is case-insensitive. + */ + has(name) { + return this._headersMap.has(normalizeName(name)); + } + /** + * Remove the header with the provided headerName. + * @param name - The name of the header to remove. + */ + delete(name) { + this._headersMap.delete(normalizeName(name)); + } + /** + * Get the JSON object representation of this HTTP header collection. + */ + toJSON(options = {}) { + const result = {}; + if (options.preserveCase) { + for (const entry of this._headersMap.values()) { + result[entry.name] = entry.value; } - this.destroy(err); } else { - // no need to keep the cache - __classPrivateFieldGet(this, _Upload_instances, "m", _Upload_resetLocalBuffersCache).call(this); - if (resp && resp.data) { - resp.data.size = Number(resp.data.size); + for (const [normalizedName, entry] of this._headersMap) { + result[normalizedName] = entry.value; } - this.emit('metadata', resp.data); - // Allow the object (Upload) to continue naturally so the user's - // "finish" event fires. - this.emit('uploadFinished'); } + return result; } /** - * Check the status of an existing resumable upload. - * - * @param cfg A configuration to use. `uri` is required. - * @returns the current upload status + * Get the string representation of this HTTP header collection. */ - async checkUploadStatus(config = {}) { - let googAPIClient = `${(0, util_js_1.getRuntimeTrackingString)()} gccl/${packageJson.version}-${(0, util_js_1.getModuleFormat)()} gccl-invocation-id/${this.currentInvocationId.checkUploadStatus}`; - if (__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")) { - googAPIClient += ` gccl-gcs-cmd/${__classPrivateFieldGet(this, _Upload_gcclGcsCmd, "f")}`; + toString() { + return JSON.stringify(this.toJSON({ preserveCase: true })); + } + /** + * Iterate over tuples of header [name, value] pairs. + */ + [Symbol.iterator]() { + return headerIterator(this._headersMap); + } +} +/** + * Creates an object that satisfies the `HttpHeaders` interface. + * @param rawHeaders - A simple object representing initial headers + */ +function createHttpHeaders(rawHeaders) { + return new HttpHeadersImpl(rawHeaders); +} +//# sourceMappingURL=httpHeaders.js.map + +/***/ }), + +/***/ 83335: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createRestError = exports.operationOptionsToRequestParameters = exports.getClient = exports.createDefaultHttpClient = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isRestError = exports.RestError = exports.createEmptyPipeline = exports.createPipelineRequest = exports.createHttpHeaders = exports.TypeSpecRuntimeLogger = exports.setLogLevel = exports.getLogLevel = exports.createClientLogger = exports.AbortError = void 0; +const tslib_1 = __nccwpck_require__(4351); +var AbortError_js_1 = __nccwpck_require__(72033); +Object.defineProperty(exports, "AbortError", ({ enumerable: true, get: function () { return AbortError_js_1.AbortError; } })); +var logger_js_1 = __nccwpck_require__(36720); +Object.defineProperty(exports, "createClientLogger", ({ enumerable: true, get: function () { return logger_js_1.createClientLogger; } })); +Object.defineProperty(exports, "getLogLevel", ({ enumerable: true, get: function () { return logger_js_1.getLogLevel; } })); +Object.defineProperty(exports, "setLogLevel", ({ enumerable: true, get: function () { return logger_js_1.setLogLevel; } })); +Object.defineProperty(exports, "TypeSpecRuntimeLogger", ({ enumerable: true, get: function () { return logger_js_1.TypeSpecRuntimeLogger; } })); +var httpHeaders_js_1 = __nccwpck_require__(66816); +Object.defineProperty(exports, "createHttpHeaders", ({ enumerable: true, get: function () { return httpHeaders_js_1.createHttpHeaders; } })); +tslib_1.__exportStar(__nccwpck_require__(65546), exports); +tslib_1.__exportStar(__nccwpck_require__(38018), exports); +var pipelineRequest_js_1 = __nccwpck_require__(47983); +Object.defineProperty(exports, "createPipelineRequest", ({ enumerable: true, get: function () { return pipelineRequest_js_1.createPipelineRequest; } })); +var pipeline_js_1 = __nccwpck_require__(34744); +Object.defineProperty(exports, "createEmptyPipeline", ({ enumerable: true, get: function () { return pipeline_js_1.createEmptyPipeline; } })); +var restError_js_1 = __nccwpck_require__(42858); +Object.defineProperty(exports, "RestError", ({ enumerable: true, get: function () { return restError_js_1.RestError; } })); +Object.defineProperty(exports, "isRestError", ({ enumerable: true, get: function () { return restError_js_1.isRestError; } })); +var bytesEncoding_js_1 = __nccwpck_require__(88943); +Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); +Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); +var defaultHttpClient_js_1 = __nccwpck_require__(42917); +Object.defineProperty(exports, "createDefaultHttpClient", ({ enumerable: true, get: function () { return defaultHttpClient_js_1.createDefaultHttpClient; } })); +var getClient_js_1 = __nccwpck_require__(15714); +Object.defineProperty(exports, "getClient", ({ enumerable: true, get: function () { return getClient_js_1.getClient; } })); +var operationOptionHelpers_js_1 = __nccwpck_require__(16857); +Object.defineProperty(exports, "operationOptionsToRequestParameters", ({ enumerable: true, get: function () { return operationOptionHelpers_js_1.operationOptionsToRequestParameters; } })); +var restError_js_2 = __nccwpck_require__(24193); +Object.defineProperty(exports, "createRestError", ({ enumerable: true, get: function () { return restError_js_2.createRestError; } })); +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ 85930: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = void 0; +const logger_js_1 = __nccwpck_require__(36720); +exports.logger = (0, logger_js_1.createClientLogger)("ts-http-runtime"); +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 34907: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const log_js_1 = __nccwpck_require__(57792); +const debugEnvVariable = (typeof process !== "undefined" && process.env && process.env.DEBUG) || undefined; +let enabledString; +let enabledNamespaces = []; +let skippedNamespaces = []; +const debuggers = []; +if (debugEnvVariable) { + enable(debugEnvVariable); +} +const debugObj = Object.assign((namespace) => { + return createDebugger(namespace); +}, { + enable, + enabled, + disable, + log: log_js_1.log, +}); +function enable(namespaces) { + enabledString = namespaces; + enabledNamespaces = []; + skippedNamespaces = []; + const namespaceList = namespaces.split(",").map((ns) => ns.trim()); + for (const ns of namespaceList) { + if (ns.startsWith("-")) { + skippedNamespaces.push(ns.substring(1)); } - const opts = { - method: 'PUT', - url: this.uri, - headers: { - 'Content-Length': 0, - 'Content-Range': 'bytes */*', - 'User-Agent': (0, util_js_1.getUserAgentString)(), - 'x-goog-api-client': googAPIClient, - }, - }; - try { - const resp = await this.makeRequest(opts); - // Successfully got the offset we can now create a new offset invocation id - this.currentInvocationId.checkUploadStatus = uuid.v4(); - return resp; + else { + enabledNamespaces.push(ns); } - catch (e) { - if (config.retry === false || - !(e instanceof Error) || - !this.retryOptions.retryableErrorFn(e)) { - throw e; - } - const retryDelay = this.getRetryDelay(); - if (retryDelay <= 0) { - throw e; - } - await new Promise(res => setTimeout(res, retryDelay)); - return this.checkUploadStatus(config); + } + for (const instance of debuggers) { + instance.enabled = enabled(instance.namespace); + } +} +function enabled(namespace) { + if (namespace.endsWith("*")) { + return true; + } + for (const skipped of skippedNamespaces) { + if (namespaceMatches(namespace, skipped)) { + return false; } } - async getAndSetOffset() { - try { - // we want to handle retries in this method. - const resp = await this.checkUploadStatus({ retry: false }); - if (resp.status === RESUMABLE_INCOMPLETE_STATUS_CODE) { - if (typeof resp.headers.range === 'string') { - this.offset = Number(resp.headers.range.split('-')[1]) + 1; - return; + for (const enabledNamespace of enabledNamespaces) { + if (namespaceMatches(namespace, enabledNamespace)) { + return true; + } + } + return false; +} +/** + * Given a namespace, check if it matches a pattern. + * Patterns only have a single wildcard character which is *. + * The behavior of * is that it matches zero or more other characters. + */ +function namespaceMatches(namespace, patternToMatch) { + // simple case, no pattern matching required + if (patternToMatch.indexOf("*") === -1) { + return namespace === patternToMatch; + } + let pattern = patternToMatch; + // normalize successive * if needed + if (patternToMatch.indexOf("**") !== -1) { + const patternParts = []; + let lastCharacter = ""; + for (const character of patternToMatch) { + if (character === "*" && lastCharacter === "*") { + continue; + } + else { + lastCharacter = character; + patternParts.push(character); + } + } + pattern = patternParts.join(""); + } + let namespaceIndex = 0; + let patternIndex = 0; + const patternLength = pattern.length; + const namespaceLength = namespace.length; + let lastWildcard = -1; + let lastWildcardNamespace = -1; + while (namespaceIndex < namespaceLength && patternIndex < patternLength) { + if (pattern[patternIndex] === "*") { + lastWildcard = patternIndex; + patternIndex++; + if (patternIndex === patternLength) { + // if wildcard is the last character, it will match the remaining namespace string + return true; + } + // now we let the wildcard eat characters until we match the next literal in the pattern + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + // reached the end of the namespace without a match + if (namespaceIndex === namespaceLength) { + return false; } } - this.offset = 0; + // now that we have a match, let's try to continue on + // however, it's possible we could find a later match + // so keep a reference in case we have to backtrack + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; } - catch (e) { - const err = e; - if (this.retryOptions.retryableErrorFn(err)) { - this.attemptDelayedRetry({ - status: NaN, - data: err, - }); - return; + else if (pattern[patternIndex] === namespace[namespaceIndex]) { + // simple case: literal pattern matches so keep going + patternIndex++; + namespaceIndex++; + } + else if (lastWildcard >= 0) { + // special case: we don't have a literal match, but there is a previous wildcard + // which we can backtrack to and try having the wildcard eat the match instead + patternIndex = lastWildcard + 1; + namespaceIndex = lastWildcardNamespace + 1; + // we've reached the end of the namespace without a match + if (namespaceIndex === namespaceLength) { + return false; } - this.destroy(err); - } - } - async makeRequest(reqOpts) { - if (this.encryption) { - reqOpts.headers = reqOpts.headers || {}; - reqOpts.headers['x-goog-encryption-algorithm'] = 'AES256'; - reqOpts.headers['x-goog-encryption-key'] = this.encryption.key.toString(); - reqOpts.headers['x-goog-encryption-key-sha256'] = - this.encryption.hash.toString(); - } - if (this.userProject) { - reqOpts.params = reqOpts.params || {}; - reqOpts.params.userProject = this.userProject; + // similar to the previous logic, let's keep going until we find the next literal match + while (namespace[namespaceIndex] !== pattern[patternIndex]) { + namespaceIndex++; + if (namespaceIndex === namespaceLength) { + return false; + } + } + lastWildcardNamespace = namespaceIndex; + namespaceIndex++; + patternIndex++; + continue; } - // Let gaxios know we will handle a 308 error code ourselves. - reqOpts.validateStatus = (status) => { - return (this.isSuccessfulResponse(status) || - status === RESUMABLE_INCOMPLETE_STATUS_CODE); - }; - const combinedReqOpts = { - ...this.customRequestOptions, - ...reqOpts, - headers: { - ...this.customRequestOptions.headers, - ...reqOpts.headers, - }, - }; - const res = await this.authClient.request(combinedReqOpts); - if (res.data && res.data.error) { - throw res.data.error; + else { + return false; } - return res; } - async makeRequestStream(reqOpts) { - const controller = new abort_controller_1.default(); - const errorCallback = () => controller.abort(); - this.once('error', errorCallback); - if (this.userProject) { - reqOpts.params = reqOpts.params || {}; - reqOpts.params.userProject = this.userProject; + const namespaceDone = namespaceIndex === namespace.length; + const patternDone = patternIndex === pattern.length; + // this is to detect the case of an unneeded final wildcard + // e.g. the pattern `ab*` should match the string `ab` + const trailingWildCard = patternIndex === pattern.length - 1 && pattern[patternIndex] === "*"; + return namespaceDone && (patternDone || trailingWildCard); +} +function disable() { + const result = enabledString || ""; + enable(""); + return result; +} +function createDebugger(namespace) { + const newDebugger = Object.assign(debug, { + enabled: enabled(namespace), + destroy, + log: debugObj.log, + namespace, + extend, + }); + function debug(...args) { + if (!newDebugger.enabled) { + return; } - reqOpts.signal = controller.signal; - reqOpts.validateStatus = () => true; - const combinedReqOpts = { - ...this.customRequestOptions, - ...reqOpts, - headers: { - ...this.customRequestOptions.headers, - ...reqOpts.headers, - }, - }; - const res = await this.authClient.request(combinedReqOpts); - const successfulRequest = this.onResponse(res); - this.removeListener('error', errorCallback); - return successfulRequest ? res : null; - } - /** - * @return {bool} is the request good? - */ - onResponse(resp) { - if (resp.status !== 200 && - this.retryOptions.retryableErrorFn({ - code: resp.status, - message: resp.statusText, - name: resp.statusText, - })) { - this.attemptDelayedRetry(resp); - return false; + if (args.length > 0) { + args[0] = `${namespace} ${args[0]}`; } - this.emit('response', resp); + newDebugger.log(...args); + } + debuggers.push(newDebugger); + return newDebugger; +} +function destroy() { + const index = debuggers.indexOf(this); + if (index >= 0) { + debuggers.splice(index, 1); return true; } - /** - * @param resp GaxiosResponse object from previous attempt - */ - attemptDelayedRetry(resp) { - if (this.numRetries < this.retryOptions.maxRetries) { - if (resp.status === NOT_FOUND_STATUS_CODE && - this.numChunksReadInRequest === 0) { - this.startUploading(); - } - else { - const retryDelay = this.getRetryDelay(); - if (retryDelay <= 0) { - this.destroy(new Error(`Retry total time limit exceeded - ${resp.data}`)); - return; - } - // Unshift the local cache back in case it's needed for the next request. - this.numBytesWritten -= this.localWriteCacheByteLength; - this.prependLocalBufferToUpstream(); - // We don't know how much data has been received by the server. - // `continueUploading` will recheck the offset via `getAndSetOffset`. - // If `offset` < `numberBytesReceived` then we will raise a RangeError - // as we've streamed too much data that has been missed - this should - // not be the case for multi-chunk uploads as `lastChunkSent` is the - // body of the entire request. - this.offset = undefined; - setTimeout(this.continueUploading.bind(this), retryDelay); + return false; +} +function extend(namespace) { + const newDebugger = createDebugger(`${this.namespace}:${namespace}`); + newDebugger.log = this.log; + return newDebugger; +} +exports["default"] = debugObj; +//# sourceMappingURL=debug.js.map + +/***/ }), + +/***/ 46244: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createLoggerContext = void 0; +var logger_js_1 = __nccwpck_require__(36720); +Object.defineProperty(exports, "createLoggerContext", ({ enumerable: true, get: function () { return logger_js_1.createLoggerContext; } })); +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 57792: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.log = log; +const tslib_1 = __nccwpck_require__(4351); +const node_os_1 = __nccwpck_require__(70612); +const node_util_1 = tslib_1.__importDefault(__nccwpck_require__(47261)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(97742)); +function log(message, ...args) { + node_process_1.default.stderr.write(`${node_util_1.default.format(message, ...args)}${node_os_1.EOL}`); +} +//# sourceMappingURL=log.js.map + +/***/ }), + +/***/ 36720: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TypeSpecRuntimeLogger = void 0; +exports.createLoggerContext = createLoggerContext; +exports.setLogLevel = setLogLevel; +exports.getLogLevel = getLogLevel; +exports.createClientLogger = createClientLogger; +const tslib_1 = __nccwpck_require__(4351); +const debug_js_1 = tslib_1.__importDefault(__nccwpck_require__(34907)); +const TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"]; +const levelMap = { + verbose: 400, + info: 300, + warning: 200, + error: 100, +}; +function patchLogMethod(parent, child) { + child.log = (...args) => { + parent.log(...args); + }; +} +function isTypeSpecRuntimeLogLevel(level) { + return TYPESPEC_RUNTIME_LOG_LEVELS.includes(level); +} +/** + * Creates a logger context base on the provided options. + * @param options - The options for creating a logger context. + * @returns The logger context. + */ +function createLoggerContext(options) { + const registeredLoggers = new Set(); + const logLevelFromEnv = (typeof process !== "undefined" && process.env && process.env[options.logLevelEnvVarName]) || + undefined; + let logLevel; + const clientLogger = (0, debug_js_1.default)(options.namespace); + clientLogger.log = (...args) => { + debug_js_1.default.log(...args); + }; + function contextSetLogLevel(level) { + if (level && !isTypeSpecRuntimeLogLevel(level)) { + throw new Error(`Unknown log level '${level}'. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(",")}`); + } + logLevel = level; + const enabledNamespaces = []; + for (const logger of registeredLoggers) { + if (shouldEnable(logger)) { + enabledNamespaces.push(logger.namespace); } - this.numRetries++; + } + debug_js_1.default.enable(enabledNamespaces.join(",")); + } + if (logLevelFromEnv) { + // avoid calling setLogLevel because we don't want a mis-set environment variable to crash + if (isTypeSpecRuntimeLogLevel(logLevelFromEnv)) { + contextSetLogLevel(logLevelFromEnv); } else { - this.destroy(new Error('Retry limit exceeded - ' + resp.data)); + console.error(`${options.logLevelEnvVarName} set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${TYPESPEC_RUNTIME_LOG_LEVELS.join(", ")}.`); } } - /** - * The amount of time to wait before retrying the request, in milliseconds. - * If negative, do not retry. - * - * @returns the amount of time to wait, in milliseconds. - */ - getRetryDelay() { - const randomMs = Math.round(Math.random() * 1000); - const waitTime = Math.pow(this.retryOptions.retryDelayMultiplier, this.numRetries) * - 1000 + - randomMs; - const maxAllowableDelayMs = this.retryOptions.totalTimeout * 1000 - - (Date.now() - this.timeOfFirstRequest); - const maxRetryDelayMs = this.retryOptions.maxRetryDelay * 1000; - return Math.min(waitTime, maxRetryDelayMs, maxAllowableDelayMs); + function shouldEnable(logger) { + return Boolean(logLevel && levelMap[logger.level] <= levelMap[logLevel]); } - /* - * Prepare user-defined API endpoint for compatibility with our API. - */ - sanitizeEndpoint(url) { - if (!exports.PROTOCOL_REGEX.test(url)) { - url = `https://${url}`; + function createLogger(parent, level) { + const logger = Object.assign(parent.extend(level), { + level, + }); + patchLogMethod(parent, logger); + if (shouldEnable(logger)) { + const enabledNamespaces = debug_js_1.default.disable(); + debug_js_1.default.enable(enabledNamespaces + "," + logger.namespace); } - return url.replace(/\/+$/, ''); // Remove trailing slashes + registeredLoggers.add(logger); + return logger; } - /** - * Check if a given status code is 2xx - * - * @param status The status code to check - * @returns if the status is 2xx - */ - isSuccessfulResponse(status) { - return status >= 200 && status < 300; + function contextGetLogLevel() { + return logLevel; } + function contextCreateClientLogger(namespace) { + const clientRootLogger = clientLogger.extend(namespace); + patchLogMethod(clientLogger, clientRootLogger); + return { + error: createLogger(clientRootLogger, "error"), + warning: createLogger(clientRootLogger, "warning"), + info: createLogger(clientRootLogger, "info"), + verbose: createLogger(clientRootLogger, "verbose"), + }; + } + return { + setLogLevel: contextSetLogLevel, + getLogLevel: contextGetLogLevel, + createClientLogger: contextCreateClientLogger, + logger: clientLogger, + }; } -exports.Upload = Upload; -_Upload_gcclGcsCmd = new WeakMap(), _Upload_instances = new WeakSet(), _Upload_resetLocalBuffersCache = function _Upload_resetLocalBuffersCache() { - this.localWriteCache = []; - this.localWriteCacheByteLength = 0; -}, _Upload_addLocalBufferCache = function _Upload_addLocalBufferCache(buf) { - this.localWriteCache.push(buf); - this.localWriteCacheByteLength += buf.byteLength; -}; -function upload(cfg) { - return new Upload(cfg); +const context = createLoggerContext({ + logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL", + namespace: "typeSpecRuntime", +}); +/** + * Immediately enables logging at the specified log level. If no level is specified, logging is disabled. + * @param level - The log level to enable for logging. + * Options from most verbose to least verbose are: + * - verbose + * - info + * - warning + * - error + */ +// eslint-disable-next-line @typescript-eslint/no-redeclare +exports.TypeSpecRuntimeLogger = context.logger; +/** + * Retrieves the currently specified log level. + */ +function setLogLevel(logLevel) { + context.setLogLevel(logLevel); } -exports.upload = upload; -function createURI(cfg, callback) { - const up = new Upload(cfg); - if (!callback) { - return up.createURI(); - } - up.createURI().then(r => callback(null, r), callback); +/** + * Retrieves the currently specified log level. + */ +function getLogLevel() { + return context.getLogLevel(); } -exports.createURI = createURI; /** - * Check the status of an existing resumable upload. - * - * @param cfg A configuration to use. `uri` is required. - * @returns the current upload status + * Creates a logger for use by the SDKs that inherits from `TypeSpecRuntimeLogger`. + * @param namespace - The name of the SDK package. + * @hidden */ -function checkUploadStatus(cfg) { - const up = new Upload(cfg); - return up.checkUploadStatus(); +function createClientLogger(namespace) { + return context.createClientLogger(namespace); } -exports.checkUploadStatus = checkUploadStatus; - +//# sourceMappingURL=logger.js.map /***/ }), -/***/ 59019: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 63098: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -// Copyright 2020 Google LLC -// -// 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. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SigningError = exports.URLSigner = exports.PATH_STYLED_HOST = exports.SignerExceptionMessages = void 0; -const crypto = __importStar(__nccwpck_require__(6113)); -const url = __importStar(__nccwpck_require__(57310)); -const storage_js_1 = __nccwpck_require__(33030); -const util_js_1 = __nccwpck_require__(59258); -var SignerExceptionMessages; -(function (SignerExceptionMessages) { - SignerExceptionMessages["ACCESSIBLE_DATE_INVALID"] = "The accessible at date provided was invalid."; - SignerExceptionMessages["EXPIRATION_BEFORE_ACCESSIBLE_DATE"] = "An expiration date cannot be before accessible date."; - SignerExceptionMessages["X_GOOG_CONTENT_SHA256"] = "The header X-Goog-Content-SHA256 must be a hexadecimal string."; -})(SignerExceptionMessages || (exports.SignerExceptionMessages = SignerExceptionMessages = {})); -/* - * Default signing version for getSignedUrl is 'v2'. - */ -const DEFAULT_SIGNING_VERSION = 'v2'; -const SEVEN_DAYS = 7 * 24 * 60 * 60; +exports.getBodyLength = getBodyLength; +exports.createNodeHttpClient = createNodeHttpClient; +const tslib_1 = __nccwpck_require__(4351); +const node_http_1 = tslib_1.__importDefault(__nccwpck_require__(88849)); +const node_https_1 = tslib_1.__importDefault(__nccwpck_require__(22286)); +const node_zlib_1 = tslib_1.__importDefault(__nccwpck_require__(65628)); +const node_stream_1 = __nccwpck_require__(84492); +const AbortError_js_1 = __nccwpck_require__(72033); +const httpHeaders_js_1 = __nccwpck_require__(66816); +const restError_js_1 = __nccwpck_require__(42858); +const log_js_1 = __nccwpck_require__(85930); +const sanitizer_js_1 = __nccwpck_require__(61416); +const DEFAULT_TLS_SETTINGS = {}; +function isReadableStream(body) { + return body && typeof body.pipe === "function"; +} +function isStreamComplete(stream) { + if (stream.readable === false) { + return Promise.resolve(); + } + return new Promise((resolve) => { + const handler = () => { + resolve(); + stream.removeListener("close", handler); + stream.removeListener("end", handler); + stream.removeListener("error", handler); + }; + stream.on("close", handler); + stream.on("end", handler); + stream.on("error", handler); + }); +} +function isArrayBuffer(body) { + return body && typeof body.byteLength === "number"; +} +class ReportTransform extends node_stream_1.Transform { + loadedBytes = 0; + progressCallback; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + _transform(chunk, _encoding, callback) { + this.push(chunk); + this.loadedBytes += chunk.length; + try { + this.progressCallback({ loadedBytes: this.loadedBytes }); + callback(); + } + catch (e) { + callback(e); + } + } + constructor(progressCallback) { + super(); + this.progressCallback = progressCallback; + } +} /** - * @const {string} - * @deprecated - unused + * A HttpClient implementation that uses Node's "https" module to send HTTPS requests. + * @internal */ -exports.PATH_STYLED_HOST = 'https://storage.googleapis.com'; -class URLSigner { - constructor(auth, bucket, file, +class NodeHttpClient { + cachedHttpAgent; + cachedHttpsAgents = new WeakMap(); /** - * A {@link Storage} object. - * - * @privateRemarks - * - * Technically this is a required field, however it would be a breaking change to - * move it before optional properties. In the next major we should refactor the - * constructor of this class to only accept a config object. + * Makes a request over an underlying transport layer and returns the response. + * @param request - The request to be made. */ - storage = new storage_js_1.Storage()) { - this.auth = auth; - this.bucket = bucket; - this.file = file; - this.storage = storage; - } - getSignedUrl(cfg) { - const expiresInSeconds = this.parseExpires(cfg.expires); - const method = cfg.method; - const accessibleAtInSeconds = this.parseAccessibleAt(cfg.accessibleAt); - if (expiresInSeconds < accessibleAtInSeconds) { - throw new Error(SignerExceptionMessages.EXPIRATION_BEFORE_ACCESSIBLE_DATE); - } - let customHost; - // Default style is `path`. - const isVirtualHostedStyle = cfg.virtualHostedStyle || false; - if (cfg.cname) { - customHost = cfg.cname; + async sendRequest(request) { + const abortController = new AbortController(); + let abortListener; + if (request.abortSignal) { + if (request.abortSignal.aborted) { + throw new AbortError_js_1.AbortError("The operation was aborted. Request has already been canceled."); + } + abortListener = (event) => { + if (event.type === "abort") { + abortController.abort(); + } + }; + request.abortSignal.addEventListener("abort", abortListener); } - else if (isVirtualHostedStyle) { - customHost = `https://${this.bucket.name}.storage.${this.storage.universeDomain}`; + let timeoutId; + if (request.timeout > 0) { + timeoutId = setTimeout(() => { + const sanitizer = new sanitizer_js_1.Sanitizer(); + log_js_1.logger.info(`request to '${sanitizer.sanitizeUrl(request.url)}' timed out. canceling...`); + abortController.abort(); + }, request.timeout); } - const secondsToMilliseconds = 1000; - const config = Object.assign({}, cfg, { - method, - expiration: expiresInSeconds, - accessibleAt: new Date(secondsToMilliseconds * accessibleAtInSeconds), - bucket: this.bucket.name, - file: this.file ? (0, util_js_1.encodeURI)(this.file.name, false) : undefined, - }); - if (customHost) { - config.cname = customHost; + const acceptEncoding = request.headers.get("Accept-Encoding"); + const shouldDecompress = acceptEncoding?.includes("gzip") || acceptEncoding?.includes("deflate"); + let body = typeof request.body === "function" ? request.body() : request.body; + if (body && !request.headers.has("Content-Length")) { + const bodyLength = getBodyLength(body); + if (bodyLength !== null) { + request.headers.set("Content-Length", bodyLength); + } } - const version = cfg.version || DEFAULT_SIGNING_VERSION; - let promise; - if (version === 'v2') { - promise = this.getSignedUrlV2(config); + let responseStream; + try { + if (body && request.onUploadProgress) { + const onUploadProgress = request.onUploadProgress; + const uploadReportStream = new ReportTransform(onUploadProgress); + uploadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in upload progress", e); + }); + if (isReadableStream(body)) { + body.pipe(uploadReportStream); + } + else { + uploadReportStream.end(body); + } + body = uploadReportStream; + } + const res = await this.makeRequest(request, abortController, body); + if (timeoutId !== undefined) { + clearTimeout(timeoutId); + } + const headers = getResponseHeaders(res); + const status = res.statusCode ?? 0; + const response = { + status, + headers, + request, + }; + // Responses to HEAD must not have a body. + // If they do return a body, that body must be ignored. + if (request.method === "HEAD") { + // call resume() and not destroy() to avoid closing the socket + // and losing keep alive + res.resume(); + return response; + } + responseStream = shouldDecompress ? getDecodedResponseStream(res, headers) : res; + const onDownloadProgress = request.onDownloadProgress; + if (onDownloadProgress) { + const downloadReportStream = new ReportTransform(onDownloadProgress); + downloadReportStream.on("error", (e) => { + log_js_1.logger.error("Error in download progress", e); + }); + responseStream.pipe(downloadReportStream); + responseStream = downloadReportStream; + } + if ( + // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code + request.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY) || + request.streamResponseStatusCodes?.has(response.status)) { + response.readableStreamBody = responseStream; + } + else { + response.bodyAsText = await streamToText(responseStream); + } + return response; } - else if (version === 'v4') { - promise = this.getSignedUrlV4(config); + finally { + // clean up event listener + if (request.abortSignal && abortListener) { + let uploadStreamDone = Promise.resolve(); + if (isReadableStream(body)) { + uploadStreamDone = isStreamComplete(body); + } + let downloadStreamDone = Promise.resolve(); + if (isReadableStream(responseStream)) { + downloadStreamDone = isStreamComplete(responseStream); + } + Promise.all([uploadStreamDone, downloadStreamDone]) + .then(() => { + // eslint-disable-next-line promise/always-return + if (abortListener) { + request.abortSignal?.removeEventListener("abort", abortListener); + } + }) + .catch((e) => { + log_js_1.logger.warning("Error when cleaning up abortListener on httpRequest", e); + }); + } } - else { - throw new Error(`Invalid signed URL version: ${version}. Supported versions are 'v2' and 'v4'.`); + } + makeRequest(request, abortController, body) { + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (isInsecure && !request.allowInsecureConnection) { + throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } - return promise.then(query => { - var _a; - query = Object.assign(query, cfg.queryParams); - const signedUrl = new url.URL(((_a = cfg.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); - signedUrl.pathname = this.getResourcePath(!!config.cname, this.bucket.name, config.file); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - signedUrl.search = (0, util_js_1.qsStringify)(query); - return signedUrl.href; + const agent = request.agent ?? this.getOrCreateAgent(request, isInsecure); + const options = { + agent, + hostname: url.hostname, + path: `${url.pathname}${url.search}`, + port: url.port, + method: request.method, + headers: request.headers.toJSON({ preserveCase: true }), + ...request.requestOverrides, + }; + return new Promise((resolve, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve) : node_https_1.default.request(options, resolve); + req.once("error", (err) => { + reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); + }); + abortController.signal.addEventListener("abort", () => { + const abortError = new AbortError_js_1.AbortError("The operation was aborted. Rejecting from abort signal callback while making request."); + req.destroy(abortError); + reject(abortError); + }); + if (body && isReadableStream(body)) { + body.pipe(req); + } + else if (body) { + if (typeof body === "string" || Buffer.isBuffer(body)) { + req.end(body); + } + else if (isArrayBuffer(body)) { + req.end(ArrayBuffer.isView(body) ? Buffer.from(body.buffer) : Buffer.from(body)); + } + else { + log_js_1.logger.error("Unrecognized body type", body); + reject(new restError_js_1.RestError("Unrecognized body type")); + } + } + else { + // streams don't like "undefined" being passed as data + req.end(); + } }); } - getSignedUrlV2(config) { - const canonicalHeadersString = this.getCanonicalHeaders(config.extensionHeaders || {}); - const resourcePath = this.getResourcePath(false, config.bucket, config.file); - const blobToSign = [ - config.method, - config.contentMd5 || '', - config.contentType || '', - config.expiration, - canonicalHeadersString + resourcePath, - ].join('\n'); - const sign = async () => { - var _a; - const auth = this.auth; - try { - const signature = await auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); - const credentials = await auth.getCredentials(); - return { - GoogleAccessId: credentials.client_email, - Expires: config.expiration, - Signature: signature, - }; + getOrCreateAgent(request, isInsecure) { + const disableKeepAlive = request.disableKeepAlive; + // Handle Insecure requests first + if (isInsecure) { + if (disableKeepAlive) { + // keepAlive:false is the default so we don't need a custom Agent + return node_http_1.default.globalAgent; } - catch (err) { - const error = err; - const signingErr = new SigningError(error.message); - signingErr.stack = error.stack; - throw signingErr; + if (!this.cachedHttpAgent) { + // If there is no cached agent create a new one and cache it. + this.cachedHttpAgent = new node_http_1.default.Agent({ keepAlive: true }); } - }; - return sign(); - } - getSignedUrlV4(config) { - var _a; - config.accessibleAt = config.accessibleAt - ? config.accessibleAt - : new Date(); - const millisecondsToSeconds = 1.0 / 1000.0; - const expiresPeriodInSeconds = config.expiration - config.accessibleAt.valueOf() * millisecondsToSeconds; - // v4 limit expiration to be 7 days maximum - if (expiresPeriodInSeconds > SEVEN_DAYS) { - throw new Error(`Max allowed expiration is seven days (${SEVEN_DAYS} seconds).`); - } - const extensionHeaders = Object.assign({}, config.extensionHeaders); - const fqdn = new url.URL(((_a = config.host) === null || _a === void 0 ? void 0 : _a.toString()) || config.cname || this.storage.apiEndpoint); - extensionHeaders.host = fqdn.hostname; - if (config.contentMd5) { - extensionHeaders['content-md5'] = config.contentMd5; + return this.cachedHttpAgent; } - if (config.contentType) { - extensionHeaders['content-type'] = config.contentType; + else { + if (disableKeepAlive && !request.tlsSettings) { + // When there are no tlsSettings and keepAlive is false + // we don't need a custom agent + return node_https_1.default.globalAgent; + } + // We use the tlsSettings to index cached clients + const tlsSettings = request.tlsSettings ?? DEFAULT_TLS_SETTINGS; + // Get the cached agent or create a new one with the + // provided values for keepAlive and tlsSettings + let agent = this.cachedHttpsAgents.get(tlsSettings); + if (agent && agent.options.keepAlive === !disableKeepAlive) { + return agent; + } + log_js_1.logger.info("No cached TLS Agent exist, creating a new Agent"); + agent = new node_https_1.default.Agent({ + // keepAlive is true if disableKeepAlive is false. + keepAlive: !disableKeepAlive, + // Since we are spreading, if no tslSettings were provided, nothing is added to the agent options. + ...tlsSettings, + }); + this.cachedHttpsAgents.set(tlsSettings, agent); + return agent; } - let contentSha256; - const sha256Header = extensionHeaders['x-goog-content-sha256']; - if (sha256Header) { - if (typeof sha256Header !== 'string' || - !/[A-Fa-f0-9]{40}/.test(sha256Header)) { - throw new Error(SignerExceptionMessages.X_GOOG_CONTENT_SHA256); + } +} +function getResponseHeaders(res) { + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + for (const header of Object.keys(res.headers)) { + const value = res.headers[header]; + if (Array.isArray(value)) { + if (value.length > 0) { + headers.set(header, value[0]); } - contentSha256 = sha256Header; } - const signedHeaders = Object.keys(extensionHeaders) - .map(header => header.toLowerCase()) - .sort() - .join(';'); - const extensionHeadersString = this.getCanonicalHeaders(extensionHeaders); - const datestamp = (0, util_js_1.formatAsUTCISO)(config.accessibleAt); - const credentialScope = `${datestamp}/auto/storage/goog4_request`; - const sign = async () => { - var _a; - const credentials = await this.auth.getCredentials(); - const credential = `${credentials.client_email}/${credentialScope}`; - const dateISO = (0, util_js_1.formatAsUTCISO)(config.accessibleAt ? config.accessibleAt : new Date(), true); - const queryParams = { - 'X-Goog-Algorithm': 'GOOG4-RSA-SHA256', - 'X-Goog-Credential': credential, - 'X-Goog-Date': dateISO, - 'X-Goog-Expires': expiresPeriodInSeconds.toString(10), - 'X-Goog-SignedHeaders': signedHeaders, - ...(config.queryParams || {}), - }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const canonicalQueryParams = this.getCanonicalQueryParams(queryParams); - const canonicalRequest = this.getCanonicalRequest(config.method, this.getResourcePath(!!config.cname, config.bucket, config.file), canonicalQueryParams, extensionHeadersString, signedHeaders, contentSha256); - const hash = crypto - .createHash('sha256') - .update(canonicalRequest) - .digest('hex'); - const blobToSign = [ - 'GOOG4-RSA-SHA256', - dateISO, - credentialScope, - hash, - ].join('\n'); - try { - const signature = await this.auth.sign(blobToSign, (_a = config.signingEndpoint) === null || _a === void 0 ? void 0 : _a.toString()); - const signatureHex = Buffer.from(signature, 'base64').toString('hex'); - const signedQuery = Object.assign({}, queryParams, { - 'X-Goog-Signature': signatureHex, - }); - return signedQuery; + else if (value) { + headers.set(header, value); + } + } + return headers; +} +function getDecodedResponseStream(stream, headers) { + const contentEncoding = headers.get("Content-Encoding"); + if (contentEncoding === "gzip") { + const unzip = node_zlib_1.default.createGunzip(); + stream.pipe(unzip); + return unzip; + } + else if (contentEncoding === "deflate") { + const inflate = node_zlib_1.default.createInflate(); + stream.pipe(inflate); + return inflate; + } + return stream; +} +function streamToText(stream) { + return new Promise((resolve, reject) => { + const buffer = []; + stream.on("data", (chunk) => { + if (Buffer.isBuffer(chunk)) { + buffer.push(chunk); } - catch (err) { - const error = err; - const signingErr = new SigningError(error.message); - signingErr.stack = error.stack; - throw signingErr; + else { + buffer.push(Buffer.from(chunk)); } - }; - return sign(); - } - /** - * Create canonical headers for signing v4 url. - * - * The canonical headers for v4-signing a request demands header names are - * first lowercased, followed by sorting the header names. - * Then, construct the canonical headers part of the request: - * + ":" + Trim() + "\n" - * .. - * + ":" + Trim() + "\n" - * - * @param headers - * @private - */ - getCanonicalHeaders(headers) { - // Sort headers by their lowercased names - const sortedHeaders = (0, util_js_1.objectEntries)(headers) - // Convert header names to lowercase - .map(([headerName, value]) => [ - headerName.toLowerCase(), - value, - ]) - .sort((a, b) => a[0].localeCompare(b[0])); - return sortedHeaders - .filter(([, value]) => value !== undefined) - .map(([headerName, value]) => { - // - Convert Array (multi-valued header) into string, delimited by - // ',' (no space). - // - Trim leading and trailing spaces. - // - Convert sequential (2+) spaces into a single space - const canonicalValue = `${value}`.trim().replace(/\s{2,}/g, ' '); - return `${headerName}:${canonicalValue}\n`; - }) - .join(''); + }); + stream.on("end", () => { + resolve(Buffer.concat(buffer).toString("utf8")); + }); + stream.on("error", (e) => { + if (e && e?.name === "AbortError") { + reject(e); + } + else { + reject(new restError_js_1.RestError(`Error reading response as text: ${e.message}`, { + code: restError_js_1.RestError.PARSE_ERROR, + })); + } + }); + }); +} +/** @internal */ +function getBodyLength(body) { + if (!body) { + return 0; } - getCanonicalRequest(method, path, query, headers, signedHeaders, contentSha256) { - return [ - method, - path, - query, - headers, - signedHeaders, - contentSha256 || 'UNSIGNED-PAYLOAD', - ].join('\n'); + else if (Buffer.isBuffer(body)) { + return body.length; } - getCanonicalQueryParams(query) { - return (0, util_js_1.objectEntries)(query) - .map(([key, value]) => [(0, util_js_1.encodeURI)(key, true), (0, util_js_1.encodeURI)(value, true)]) - .sort((a, b) => (a[0] < b[0] ? -1 : 1)) - .map(([key, value]) => `${key}=${value}`) - .join('&'); + else if (isReadableStream(body)) { + return null; } - getResourcePath(cname, bucket, file) { - if (cname) { - return '/' + (file || ''); - } - else if (file) { - return `/${bucket}/${file}`; - } - else { - return `/${bucket}`; - } + else if (isArrayBuffer(body)) { + return body.byteLength; } - parseExpires(expires, current = new Date()) { - const expiresInMSeconds = new Date(expires).valueOf(); - if (isNaN(expiresInMSeconds)) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_INVALID); - } - if (expiresInMSeconds < current.valueOf()) { - throw new Error(storage_js_1.ExceptionMessages.EXPIRATION_DATE_PAST); - } - return Math.floor(expiresInMSeconds / 1000); // The API expects seconds. + else if (typeof body === "string") { + return Buffer.from(body).length; } - parseAccessibleAt(accessibleAt) { - const accessibleAtInMSeconds = new Date(accessibleAt || new Date()).valueOf(); - if (isNaN(accessibleAtInMSeconds)) { - throw new Error(SignerExceptionMessages.ACCESSIBLE_DATE_INVALID); - } - return Math.floor(accessibleAtInMSeconds / 1000); // The API expects seconds. + else { + return null; } } -exports.URLSigner = URLSigner; /** - * Custom error type for errors related to getting signed errors and policies. - * - * @private + * Create a new HttpClient instance for the NodeJS environment. + * @internal */ -class SigningError extends Error { - constructor() { - super(...arguments); - this.name = 'SigningError'; - } +function createNodeHttpClient() { + return new NodeHttpClient(); } -exports.SigningError = SigningError; - +//# sourceMappingURL=nodeHttpClient.js.map /***/ }), -/***/ 33030: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 34744: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -// Copyright 2019 Google LLC -// -// 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. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Storage = exports.RETRYABLE_ERR_FN_DEFAULT = exports.MAX_RETRY_DELAY_DEFAULT = exports.TOTAL_TIMEOUT_DEFAULT = exports.RETRY_DELAY_MULTIPLIER_DEFAULT = exports.MAX_RETRY_DEFAULT = exports.AUTO_RETRY_DEFAULT = exports.PROTOCOL_REGEX = exports.StorageExceptionMessages = exports.ExceptionMessages = exports.IdempotencyStrategy = void 0; -const index_js_1 = __nccwpck_require__(4052); -const paginator_1 = __nccwpck_require__(46412); -const promisify_1 = __nccwpck_require__(19203); -const stream_1 = __nccwpck_require__(12781); -const bucket_js_1 = __nccwpck_require__(23973); -const channel_js_1 = __nccwpck_require__(62665); -const file_js_1 = __nccwpck_require__(4713); -const util_js_1 = __nccwpck_require__(59258); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_helper_cjs_1 = __nccwpck_require__(28568); -const hmacKey_js_1 = __nccwpck_require__(64654); -const crc32c_js_1 = __nccwpck_require__(55810); -const google_auth_library_1 = __nccwpck_require__(20810); -var IdempotencyStrategy; -(function (IdempotencyStrategy) { - IdempotencyStrategy[IdempotencyStrategy["RetryAlways"] = 0] = "RetryAlways"; - IdempotencyStrategy[IdempotencyStrategy["RetryConditional"] = 1] = "RetryConditional"; - IdempotencyStrategy[IdempotencyStrategy["RetryNever"] = 2] = "RetryNever"; -})(IdempotencyStrategy || (exports.IdempotencyStrategy = IdempotencyStrategy = {})); -var ExceptionMessages; -(function (ExceptionMessages) { - ExceptionMessages["EXPIRATION_DATE_INVALID"] = "The expiration date provided was invalid."; - ExceptionMessages["EXPIRATION_DATE_PAST"] = "An expiration date cannot be in the past."; -})(ExceptionMessages || (exports.ExceptionMessages = ExceptionMessages = {})); -var StorageExceptionMessages; -(function (StorageExceptionMessages) { - StorageExceptionMessages["BUCKET_NAME_REQUIRED"] = "A bucket name is needed to use Cloud Storage."; - StorageExceptionMessages["BUCKET_NAME_REQUIRED_CREATE"] = "A name is required to create a bucket."; - StorageExceptionMessages["HMAC_SERVICE_ACCOUNT"] = "The first argument must be a service account email to create an HMAC key."; - StorageExceptionMessages["HMAC_ACCESS_ID"] = "An access ID is needed to create an HmacKey object."; -})(StorageExceptionMessages || (exports.StorageExceptionMessages = StorageExceptionMessages = {})); -exports.PROTOCOL_REGEX = /^(\w*):\/\//; -/** - * Default behavior: Automatically retry retriable server errors. - * - * @const {boolean} - */ -exports.AUTO_RETRY_DEFAULT = true; -/** - * Default behavior: Only attempt to retry retriable errors 3 times. - * - * @const {number} - */ -exports.MAX_RETRY_DEFAULT = 3; -/** - * Default behavior: Wait twice as long as previous retry before retrying. - * - * @const {number} - */ -exports.RETRY_DELAY_MULTIPLIER_DEFAULT = 2; -/** - * Default behavior: If the operation doesn't succeed after 600 seconds, - * stop retrying. - * - * @const {number} - */ -exports.TOTAL_TIMEOUT_DEFAULT = 600; -/** - * Default behavior: Wait no more than 64 seconds between retries. - * - * @const {number} - */ -exports.MAX_RETRY_DELAY_DEFAULT = 64; -/** - * Default behavior: Retry conditionally idempotent operations if correct preconditions are set. - * - * @const {enum} - * @private - */ -const IDEMPOTENCY_STRATEGY_DEFAULT = IdempotencyStrategy.RetryConditional; +exports.createEmptyPipeline = createEmptyPipeline; +const ValidPhaseNames = new Set(["Deserialize", "Serialize", "Retry", "Sign"]); /** - * Returns true if the API request should be retried, given the error that was - * given the first time the request was attempted. - * @const - * @param {error} err - The API error to check if it is appropriate to retry. - * @return {boolean} True if the API request should be retried, false otherwise. + * A private implementation of Pipeline. + * Do not export this class from the package. + * @internal */ -const RETRYABLE_ERR_FN_DEFAULT = function (err) { - var _a; - const isConnectionProblem = (reason) => { - return (reason.includes('eai_again') || // DNS lookup error - reason === 'econnreset' || - reason === 'unexpected connection closure' || - reason === 'epipe' || - reason === 'socket connection timeout'); - }; - if (err) { - if ([408, 429, 500, 502, 503, 504].indexOf(err.code) !== -1) { - return true; +class HttpPipeline { + _policies = []; + _orderedPolicies; + constructor(policies) { + this._policies = policies?.slice(0) ?? []; + this._orderedPolicies = undefined; + } + addPolicy(policy, options = {}) { + if (options.phase && options.afterPhase) { + throw new Error("Policies inside a phase cannot specify afterPhase."); } - if (typeof err.code === 'string') { - if (['408', '429', '500', '502', '503', '504'].indexOf(err.code) !== -1) { - return true; + if (options.phase && !ValidPhaseNames.has(options.phase)) { + throw new Error(`Invalid phase name: ${options.phase}`); + } + if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) { + throw new Error(`Invalid afterPhase name: ${options.afterPhase}`); + } + this._policies.push({ + policy, + options, + }); + this._orderedPolicies = undefined; + } + removePolicy(options) { + const removedPolicies = []; + this._policies = this._policies.filter((policyDescriptor) => { + if ((options.name && policyDescriptor.policy.name === options.name) || + (options.phase && policyDescriptor.options.phase === options.phase)) { + removedPolicies.push(policyDescriptor.policy); + return false; } - const reason = err.code.toLowerCase(); - if (isConnectionProblem(reason)) { + else { return true; } + }); + this._orderedPolicies = undefined; + return removedPolicies; + } + sendRequest(httpClient, request) { + const policies = this.getOrderedPolicies(); + const pipeline = policies.reduceRight((next, policy) => { + return (req) => { + return policy.sendRequest(req, next); + }; + }, (req) => httpClient.sendRequest(req)); + return pipeline(request); + } + getOrderedPolicies() { + if (!this._orderedPolicies) { + this._orderedPolicies = this.orderPolicies(); } - if (err.errors) { - for (const e of err.errors) { - const reason = (_a = e === null || e === void 0 ? void 0 : e.reason) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase(); - if (reason && isConnectionProblem(reason)) { - return true; - } - } - } + return this._orderedPolicies; } - return false; -}; -exports.RETRYABLE_ERR_FN_DEFAULT = RETRYABLE_ERR_FN_DEFAULT; -/*! Developer Documentation - * - * Invoke this method to create a new Storage object bound with pre-determined - * configuration options. For each object that can be created (e.g., a bucket), - * there is an equivalent static and instance method. While they are classes, - * they can be instantiated without use of the `new` keyword. - */ -/** - * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share objects with other - * users and allow other users to access your buckets and objects. - * - * This object provides constants to refer to the three permission levels that - * can be granted to an entity: - * - * - `gcs.acl.OWNER_ROLE` - ("OWNER") - * - `gcs.acl.READER_ROLE` - ("READER") - * - `gcs.acl.WRITER_ROLE` - ("WRITER") - * - * See {@link https://cloud.google.com/storage/docs/access-control/lists| About Access Control Lists} - * - * @name Storage#acl - * @type {object} - * @property {string} OWNER_ROLE - * @property {string} READER_ROLE - * @property {string} WRITER_ROLE - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const albums = storage.bucket('albums'); - * - * //- - * // Make all of the files currently in a bucket publicly readable. - * //- - * const options = { - * entity: 'allUsers', - * role: storage.acl.READER_ROLE - * }; - * - * albums.acl.add(options, function(err, aclObject) {}); - * - * //- - * // Make any new objects added to a bucket publicly readable. - * //- - * albums.acl.default.add(options, function(err, aclObject) {}); - * - * //- - * // Grant a user ownership permissions to a bucket. - * //- - * albums.acl.add({ - * entity: 'user-useremail@example.com', - * role: storage.acl.OWNER_ROLE - * }, function(err, aclObject) {}); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * albums.acl.add(options).then(function(data) { - * const aclObject = data[0]; - * const apiResponse = data[1]; - * }); - * ``` - */ -/** - * Get {@link Bucket} objects for all of the buckets in your project as - * a readable object stream. - * - * @method Storage#getBucketsStream - * @param {GetBucketsRequest} [query] Query object for listing buckets. - * @returns {ReadableStream} A readable stream that emits {@link Bucket} - * instances. - * - * @example - * ``` - * storage.getBucketsStream() - * .on('error', console.error) - * .on('data', function(bucket) { - * // bucket is a Bucket object. - * }) - * .on('end', function() { - * // All buckets retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * storage.getBucketsStream() - * .on('data', function(bucket) { - * this.end(); - * }); - * ``` - */ -/** - * Get {@link HmacKey} objects for all of the HMAC keys in the project in a - * readable object stream. - * - * @method Storage#getHmacKeysStream - * @param {GetHmacKeysOptions} [options] Configuration options. - * @returns {ReadableStream} A readable stream that emits {@link HmacKey} - * instances. - * - * @example - * ``` - * storage.getHmacKeysStream() - * .on('error', console.error) - * .on('data', function(hmacKey) { - * // hmacKey is an HmacKey object. - * }) - * .on('end', function() { - * // All HmacKey retrieved. - * }); - * - * //- - * // If you anticipate many results, you can end a stream early to prevent - * // unnecessary processing and API requests. - * //- - * storage.getHmacKeysStream() - * .on('data', function(bucket) { - * this.end(); - * }); - * ``` - */ -/** - *

ACLs

- * Cloud Storage uses access control lists (ACLs) to manage object and - * bucket access. ACLs are the mechanism you use to share files with other users - * and allow other users to access your buckets and files. - * - * To learn more about ACLs, read this overview on - * {@link https://cloud.google.com/storage/docs/access-control| Access Control}. - * - * See {@link https://cloud.google.com/storage/docs/overview| Cloud Storage overview} - * See {@link https://cloud.google.com/storage/docs/access-control| Access Control} - * - * @class - */ -class Storage extends index_js_1.Service { - getBucketsStream() { - // placeholder body, overwritten in constructor - return new stream_1.Readable(); + clone() { + return new HttpPipeline(this._policies); } - getHmacKeysStream() { - // placeholder body, overwritten in constructor - return new stream_1.Readable(); + static create() { + return new HttpPipeline(); } - /** - * @callback Crc32cGeneratorToStringCallback - * A method returning the CRC32C as a base64-encoded string. - * - * @returns {string} - * - * @example - * Hashing the string 'data' should return 'rth90Q==' - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.toString(); // 'rth90Q==' - * ``` - **/ - /** - * @callback Crc32cGeneratorValidateCallback - * A method validating a base64-encoded CRC32C string. - * - * @param {string} [value] base64-encoded CRC32C string to validate - * @returns {boolean} - * - * @example - * Should return `true` if the value matches, `false` otherwise - * - * ```js - * const buffer = Buffer.from('data'); - * crc32c.update(buffer); - * crc32c.validate('DkjKuA=='); // false - * crc32c.validate('rth90Q=='); // true - * ``` - **/ - /** - * @callback Crc32cGeneratorUpdateCallback - * A method for passing `Buffer`s for CRC32C generation. - * - * @param {Buffer} [data] data to update CRC32C value with - * @returns {undefined} - * - * @example - * Hashing buffers from 'some ' and 'text\n' - * - * ```js - * const buffer1 = Buffer.from('some '); - * crc32c.update(buffer1); - * - * const buffer2 = Buffer.from('text\n'); - * crc32c.update(buffer2); - * - * crc32c.toString(); // 'DkjKuA==' - * ``` - **/ - /** - * @typedef {object} CRC32CValidator - * @property {Crc32cGeneratorToStringCallback} - * @property {Crc32cGeneratorValidateCallback} - * @property {Crc32cGeneratorUpdateCallback} - */ - /** - * @callback Crc32cGeneratorCallback - * @returns {CRC32CValidator} - */ - /** - * @typedef {object} StorageOptions - * @property {string} [projectId] The project ID from the Google Developer's - * Console, e.g. 'grape-spaceship-123'. We will also check the environment - * variable `GCLOUD_PROJECT` for your project ID. If your app is running - * in an environment which supports {@link - * https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application - * Application Default Credentials}, your project ID will be detected - * automatically. - * @property {string} [keyFilename] Full path to the a .json, .pem, or .p12 key - * downloaded from the Google Developers Console. If you provide a path to - * a JSON file, the `projectId` option above is not necessary. NOTE: .pem and - * .p12 require you to specify the `email` option as well. - * @property {string} [email] Account email address. Required when using a .pem - * or .p12 keyFilename. - * @property {object} [credentials] Credentials object. - * @property {string} [credentials.client_email] - * @property {string} [credentials.private_key] - * @property {object} [retryOptions] Options for customizing retries. Retriable server errors - * will be retried with exponential delay between them dictated by the formula - * max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout - * has been reached. Retries will only happen if autoRetry is set to true. - * @property {boolean} [retryOptions.autoRetry=true] Automatically retry requests if the - * response is related to rate limits or certain intermittent server - * errors. We will exponentially backoff subsequent requests by default. - * @property {number} [retryOptions.retryDelayMultiplier = 2] the multiplier by which to - * increase the delay time between the completion of failed requests, and the - * initiation of the subsequent retrying request. - * @property {number} [retryOptions.totalTimeout = 600] The total time, starting from - * when the initial request is sent, after which an error will - * be returned, regardless of the retrying attempts made meanwhile. - * @property {number} [retryOptions.maxRetryDelay = 64] The maximum delay time between requests. - * When this value is reached, ``retryDelayMultiplier`` will no longer be used to - * increase delay time. - * @property {number} [retryOptions.maxRetries=3] Maximum number of automatic retries - * attempted before returning the error. - * @property {function} [retryOptions.retryableErrorFn] Function that returns true if a given - * error should be retried and false otherwise. - * @property {enum} [retryOptions.idempotencyStrategy=IdempotencyStrategy.RetryConditional] Enumeration - * controls how conditionally idempotent operations are retried. Possible values are: RetryAlways - - * will respect other retry settings and attempt to retry conditionally idempotent operations. RetryConditional - - * will retry conditionally idempotent operations if the correct preconditions are set. RetryNever - never - * retry a conditionally idempotent operation. - * @property {string} [userAgent] The value to be prepended to the User-Agent - * header in API requests. - * @property {object} [authClient] `AuthClient` or `GoogleAuth` client to reuse instead of creating a new one. - * @property {number} [timeout] The amount of time in milliseconds to wait per http request before timing out. - * @property {object[]} [interceptors_] Array of custom request interceptors to be returned in the order they were assigned. - * @property {string} [apiEndpoint = storage.google.com] The API endpoint of the service used to make requests. - * @property {boolean} [useAuthWithCustomEndpoint = false] Controls whether or not to use authentication when using a custom endpoint. - * @property {Crc32cGeneratorCallback} [callback] A function that generates a CRC32C Validator. Defaults to {@link CRC32C} - */ - /** - * Constructs the Storage client. - * - * @example - * Create a client that uses Application Default Credentials - * (ADC) - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * ``` - * - * @example - * Create a client with explicit credentials - * ``` - * const storage = new Storage({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json' - * }); - * ``` - * - * @example - * Create a client with credentials passed - * by value as a JavaScript object - * ``` - * const storage = new Storage({ - * projectId: 'your-project-id', - * credentials: { - * type: 'service_account', - * project_id: 'xxxxxxx', - * private_key_id: 'xxxx', - * private_key:'-----BEGIN PRIVATE KEY-----xxxxxxx\n-----END PRIVATE KEY-----\n', - * client_email: 'xxxx', - * client_id: 'xxx', - * auth_uri: 'https://accounts.google.com/o/oauth2/auth', - * token_uri: 'https://oauth2.googleapis.com/token', - * auth_provider_x509_cert_url: 'https://www.googleapis.com/oauth2/v1/certs', - * client_x509_cert_url: 'xxx', - * } - * }); - * ``` - * - * @example - * Create a client with credentials passed - * by loading a JSON file directly from disk - * ``` - * const storage = new Storage({ - * projectId: 'your-project-id', - * credentials: require('/path/to-keyfile.json') - * }); - * ``` - * - * @example - * Create a client with an `AuthClient` (e.g. `DownscopedClient`) - * ``` - * const {DownscopedClient} = require('google-auth-library'); - * const authClient = new DownscopedClient({...}); - * - * const storage = new Storage({authClient}); - * ``` - * - * Additional samples: - * - https://github.com/googleapis/google-auth-library-nodejs#sample-usage-1 - * - https://github.com/googleapis/google-auth-library-nodejs/blob/main/samples/downscopedclient.js - * - * @param {StorageOptions} [options] Configuration options. - */ - constructor(options = {}) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; - const universe = options.universeDomain || google_auth_library_1.DEFAULT_UNIVERSE; - let apiEndpoint = `https://storage.${universe}`; - let customEndpoint = false; - // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. - const EMULATOR_HOST = process.env.STORAGE_EMULATOR_HOST; - if (typeof EMULATOR_HOST === 'string') { - apiEndpoint = Storage.sanitizeEndpoint(EMULATOR_HOST); - customEndpoint = true; - } - if (options.apiEndpoint && options.apiEndpoint !== apiEndpoint) { - apiEndpoint = Storage.sanitizeEndpoint(options.apiEndpoint); - customEndpoint = true; - } - options = Object.assign({}, options, { apiEndpoint }); - // Note: EMULATOR_HOST is an experimental configuration variable. Use apiEndpoint instead. - const baseUrl = EMULATOR_HOST || `${options.apiEndpoint}/storage/v1`; - const config = { - apiEndpoint: options.apiEndpoint, - retryOptions: { - autoRetry: ((_a = options.retryOptions) === null || _a === void 0 ? void 0 : _a.autoRetry) !== undefined - ? (_b = options.retryOptions) === null || _b === void 0 ? void 0 : _b.autoRetry - : exports.AUTO_RETRY_DEFAULT, - maxRetries: ((_c = options.retryOptions) === null || _c === void 0 ? void 0 : _c.maxRetries) - ? (_d = options.retryOptions) === null || _d === void 0 ? void 0 : _d.maxRetries - : exports.MAX_RETRY_DEFAULT, - retryDelayMultiplier: ((_e = options.retryOptions) === null || _e === void 0 ? void 0 : _e.retryDelayMultiplier) - ? (_f = options.retryOptions) === null || _f === void 0 ? void 0 : _f.retryDelayMultiplier - : exports.RETRY_DELAY_MULTIPLIER_DEFAULT, - totalTimeout: ((_g = options.retryOptions) === null || _g === void 0 ? void 0 : _g.totalTimeout) - ? (_h = options.retryOptions) === null || _h === void 0 ? void 0 : _h.totalTimeout - : exports.TOTAL_TIMEOUT_DEFAULT, - maxRetryDelay: ((_j = options.retryOptions) === null || _j === void 0 ? void 0 : _j.maxRetryDelay) - ? (_k = options.retryOptions) === null || _k === void 0 ? void 0 : _k.maxRetryDelay - : exports.MAX_RETRY_DELAY_DEFAULT, - retryableErrorFn: ((_l = options.retryOptions) === null || _l === void 0 ? void 0 : _l.retryableErrorFn) - ? (_m = options.retryOptions) === null || _m === void 0 ? void 0 : _m.retryableErrorFn - : exports.RETRYABLE_ERR_FN_DEFAULT, - idempotencyStrategy: ((_o = options.retryOptions) === null || _o === void 0 ? void 0 : _o.idempotencyStrategy) !== undefined - ? (_p = options.retryOptions) === null || _p === void 0 ? void 0 : _p.idempotencyStrategy - : IDEMPOTENCY_STRATEGY_DEFAULT, - }, - baseUrl, - customEndpoint, - useAuthWithCustomEndpoint: options === null || options === void 0 ? void 0 : options.useAuthWithCustomEndpoint, - projectIdRequired: false, - scopes: [ - 'https://www.googleapis.com/auth/iam', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/devstorage.full_control', - ], - packageJson: (0, package_json_helper_cjs_1.getPackageJSON)(), - }; - super(config, options); + orderPolicies() { /** - * Reference to {@link Storage.acl}. + * The goal of this method is to reliably order pipeline policies + * based on their declared requirements when they were added. + * + * Order is first determined by phase: + * + * 1. Serialize Phase + * 2. Policies not in a phase + * 3. Deserialize Phase + * 4. Retry Phase + * 5. Sign Phase + * + * Within each phase, policies are executed in the order + * they were added unless they were specified to execute + * before/after other policies or after a particular phase. + * + * To determine the final order, we will walk the policy list + * in phase order multiple times until all dependencies are + * satisfied. + * + * `afterPolicies` are the set of policies that must be + * executed before a given policy. This requirement is + * considered satisfied when each of the listed policies + * have been scheduled. + * + * `beforePolicies` are the set of policies that must be + * executed after a given policy. Since this dependency + * can be expressed by converting it into a equivalent + * `afterPolicies` declarations, they are normalized + * into that form for simplicity. + * + * An `afterPhase` dependency is considered satisfied when all + * policies in that phase have scheduled. * - * @name Storage#acl - * @see Storage.acl */ - this.acl = Storage.acl; - this.crc32cGenerator = - options.crc32cGenerator || crc32c_js_1.CRC32C_DEFAULT_VALIDATOR_GENERATOR; - this.retryOptions = config.retryOptions; - this.getBucketsStream = paginator_1.paginator.streamify('getBuckets'); - this.getHmacKeysStream = paginator_1.paginator.streamify('getHmacKeys'); - } - static sanitizeEndpoint(url) { - if (!exports.PROTOCOL_REGEX.test(url)) { - url = `https://${url}`; + const result = []; + // Track all policies we know about. + const policyMap = new Map(); + function createPhase(name) { + return { + name, + policies: new Set(), + hasRun: false, + hasAfterPolicies: false, + }; } - return url.replace(/\/+$/, ''); // Remove trailing slashes - } - /** - * Get a reference to a Cloud Storage bucket. - * - * @param {string} name Name of the bucket. - * @param {object} [options] Configuration object. - * @param {string} [options.kmsKeyName] A Cloud KMS key that will be used to - * encrypt objects inserted into this bucket, if no encryption method is - * specified. - * @param {string} [options.userProject] User project to be billed for all - * requests made from this Bucket object. - * @returns {Bucket} - * @see Bucket - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const albums = storage.bucket('albums'); - * const photos = storage.bucket('photos'); - * ``` - */ - bucket(name, options) { - if (!name) { - throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED); + // Track policies for each phase. + const serializePhase = createPhase("Serialize"); + const noPhase = createPhase("None"); + const deserializePhase = createPhase("Deserialize"); + const retryPhase = createPhase("Retry"); + const signPhase = createPhase("Sign"); + // a list of phases in order + const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase]; + // Small helper function to map phase name to each Phase + function getPhase(phase) { + if (phase === "Retry") { + return retryPhase; + } + else if (phase === "Serialize") { + return serializePhase; + } + else if (phase === "Deserialize") { + return deserializePhase; + } + else if (phase === "Sign") { + return signPhase; + } + else { + return noPhase; + } } - return new bucket_js_1.Bucket(this, name, options); + // First walk each policy and create a node to track metadata. + for (const descriptor of this._policies) { + const policy = descriptor.policy; + const options = descriptor.options; + const policyName = policy.name; + if (policyMap.has(policyName)) { + throw new Error("Duplicate policy names not allowed in pipeline"); + } + const node = { + policy, + dependsOn: new Set(), + dependants: new Set(), + }; + if (options.afterPhase) { + node.afterPhase = getPhase(options.afterPhase); + node.afterPhase.hasAfterPolicies = true; + } + policyMap.set(policyName, node); + const phase = getPhase(options.phase); + phase.policies.add(node); + } + // Now that each policy has a node, connect dependency references. + for (const descriptor of this._policies) { + const { policy, options } = descriptor; + const policyName = policy.name; + const node = policyMap.get(policyName); + if (!node) { + throw new Error(`Missing node for policy ${policyName}`); + } + if (options.afterPolicies) { + for (const afterPolicyName of options.afterPolicies) { + const afterNode = policyMap.get(afterPolicyName); + if (afterNode) { + // Linking in both directions helps later + // when we want to notify dependants. + node.dependsOn.add(afterNode); + afterNode.dependants.add(node); + } + } + } + if (options.beforePolicies) { + for (const beforePolicyName of options.beforePolicies) { + const beforeNode = policyMap.get(beforePolicyName); + if (beforeNode) { + // To execute before another node, make it + // depend on the current node. + beforeNode.dependsOn.add(node); + node.dependants.add(beforeNode); + } + } + } + } + function walkPhase(phase) { + phase.hasRun = true; + // Sets iterate in insertion order + for (const node of phase.policies) { + if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) { + // If this node is waiting on a phase to complete, + // we need to skip it for now. + // Even if the phase is empty, we should wait for it + // to be walked to avoid re-ordering policies. + continue; + } + if (node.dependsOn.size === 0) { + // If there's nothing else we're waiting for, we can + // add this policy to the result list. + result.push(node.policy); + // Notify anything that depends on this policy that + // the policy has been scheduled. + for (const dependant of node.dependants) { + dependant.dependsOn.delete(node); + } + policyMap.delete(node.policy.name); + phase.policies.delete(node); + } + } + } + function walkPhases() { + for (const phase of orderedPhases) { + walkPhase(phase); + // if the phase isn't complete + if (phase.policies.size > 0 && phase !== noPhase) { + if (!noPhase.hasRun) { + // Try running noPhase to see if that unblocks this phase next tick. + // This can happen if a phase that happens before noPhase + // is waiting on a noPhase policy to complete. + walkPhase(noPhase); + } + // Don't proceed to the next phase until this phase finishes. + return; + } + if (phase.hasAfterPolicies) { + // Run any policies unblocked by this phase + walkPhase(noPhase); + } + } + } + // Iterate until we've put every node in the result list. + let iteration = 0; + while (policyMap.size > 0) { + iteration++; + const initialResultLength = result.length; + // Keep walking each phase in order until we can order every node. + walkPhases(); + // The result list *should* get at least one larger each time + // after the first full pass. + // Otherwise, we're going to loop forever. + if (result.length <= initialResultLength && iteration > 1) { + throw new Error("Cannot satisfy policy dependencies due to requirements cycle."); + } + } + return result; } - /** - * Reference a channel to receive notifications about changes to your bucket. - * - * @param {string} id The ID of the channel. - * @param {string} resourceId The resource ID of the channel. - * @returns {Channel} - * @see Channel - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const channel = storage.channel('id', 'resource-id'); - * ``` - */ - channel(id, resourceId) { - return new channel_js_1.Channel(this, id, resourceId); +} +/** + * Creates a totally empty pipeline. + * Useful for testing or creating a custom one. + */ +function createEmptyPipeline() { + return HttpPipeline.create(); +} +//# sourceMappingURL=pipeline.js.map + +/***/ }), + +/***/ 47983: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPipelineRequest = createPipelineRequest; +const httpHeaders_js_1 = __nccwpck_require__(66816); +const uuidUtils_js_1 = __nccwpck_require__(2339); +class PipelineRequestImpl { + url; + method; + headers; + timeout; + withCredentials; + body; + multipartBody; + formData; + streamResponseStatusCodes; + enableBrowserStreams; + proxySettings; + disableKeepAlive; + abortSignal; + requestId; + allowInsecureConnection; + onUploadProgress; + onDownloadProgress; + requestOverrides; + authSchemes; + constructor(options) { + this.url = options.url; + this.body = options.body; + this.headers = options.headers ?? (0, httpHeaders_js_1.createHttpHeaders)(); + this.method = options.method ?? "GET"; + this.timeout = options.timeout ?? 0; + this.multipartBody = options.multipartBody; + this.formData = options.formData; + this.disableKeepAlive = options.disableKeepAlive ?? false; + this.proxySettings = options.proxySettings; + this.streamResponseStatusCodes = options.streamResponseStatusCodes; + this.withCredentials = options.withCredentials ?? false; + this.abortSignal = options.abortSignal; + this.onUploadProgress = options.onUploadProgress; + this.onDownloadProgress = options.onDownloadProgress; + this.requestId = options.requestId || (0, uuidUtils_js_1.randomUUID)(); + this.allowInsecureConnection = options.allowInsecureConnection ?? false; + this.enableBrowserStreams = options.enableBrowserStreams ?? false; + this.requestOverrides = options.requestOverrides; + this.authSchemes = options.authSchemes; } - /** - * @typedef {array} CreateBucketResponse - * @property {Bucket} 0 The new {@link Bucket}. - * @property {object} 1 The full API response. - */ - /** - * @callback CreateBucketCallback - * @param {?Error} err Request error, if any. - * @param {Bucket} bucket The new {@link Bucket}. - * @param {object} apiResponse The full API response. - */ - /** - * Metadata to set for the bucket. - * - * @typedef {object} CreateBucketRequest - * @property {boolean} [archive=false] Specify the storage class as Archive. - * @property {object} [autoclass.enabled=false] Specify whether Autoclass is - * enabled for the bucket. - * @property {object} [autoclass.terminalStorageClass='NEARLINE'] The storage class that objects in an Autoclass bucket eventually transition to if - * they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE. - * @property {boolean} [coldline=false] Specify the storage class as Coldline. - * @property {Cors[]} [cors=[]] Specify the CORS configuration to use. - * @property {CustomPlacementConfig} [customPlacementConfig={}] Specify the bucket's regions for dual-region buckets. - * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. - * @property {boolean} [dra=false] Specify the storage class as Durable Reduced - * Availability. - * @property {boolean} [enableObjectRetention=false] Specifiy whether or not object retention should be enabled on this bucket. - * @property {object} [hierarchicalNamespace.enabled=false] Specify whether or not to enable hierarchical namespace on this bucket. - * @property {string} [location] Specify the bucket's location. If specifying - * a dual-region, the `customPlacementConfig` property should be set in conjunction. - * For more information, see {@link https://cloud.google.com/storage/docs/locations| Bucket Locations}. - * @property {boolean} [multiRegional=false] Specify the storage class as - * Multi-Regional. - * @property {boolean} [nearline=false] Specify the storage class as Nearline. - * @property {boolean} [regional=false] Specify the storage class as Regional. - * @property {boolean} [requesterPays=false] **Early Access Testers Only** - * Force the use of the User Project metadata field to assign operational - * costs when an operation is made on a Bucket and its objects. - * @property {string} [rpo] For dual-region buckets, controls whether turbo - * replication is enabled (`ASYNC_TURBO`) or disabled (`DEFAULT`). - * @property {boolean} [standard=true] Specify the storage class as Standard. - * @property {string} [storageClass] The new storage class. (`standard`, - * `nearline`, `coldline`, or `archive`). - * **Note:** The storage classes `multi_regional`, `regional`, and - * `durable_reduced_availability` are now legacy and will be deprecated in - * the future. - * @property {Versioning} [versioning=undefined] Specify the versioning status. - * @property {string} [userProject] The ID of the project which will be billed - * for the request. - */ - /** - * Create a bucket. - * - * Cloud Storage uses a flat namespace, so you can't create a bucket with - * a name that is already in use. For more information, see - * {@link https://cloud.google.com/storage/docs/bucketnaming.html#requirements| Bucket Naming Guidelines}. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/insert| Buckets: insert API Documentation} - * See {@link https://cloud.google.com/storage/docs/storage-classes| Storage Classes} - * - * @param {string} name Name of the bucket to create. - * @param {CreateBucketRequest} [metadata] Metadata to set for the bucket. - * @param {CreateBucketCallback} [callback] Callback function. - * @returns {Promise} - * @throws {Error} If a name is not provided. - * @see Bucket#create - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const callback = function(err, bucket, apiResponse) { - * // `bucket` is a Bucket object. - * }; - * - * storage.createBucket('new-bucket', callback); - * - * //- - * // Create a bucket in a specific location and region. See the - * // Official JSON API docs for complete details on the `location` - * option. - * // - * //- - * const metadata = { - * location: 'US-CENTRAL1', - * regional: true - * }; - * - * storage.createBucket('new-bucket', metadata, callback); - * - * //- - * // Create a bucket with a retention policy of 6 months. - * //- - * const metadata = { - * retentionPolicy: { - * retentionPeriod: 15780000 // 6 months in seconds. - * } - * }; - * - * storage.createBucket('new-bucket', metadata, callback); - * - * //- - * // Enable versioning on a new bucket. - * //- - * const metadata = { - * versioning: { - * enabled: true - * } - * }; - * - * storage.createBucket('new-bucket', metadata, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.createBucket('new-bucket').then(function(data) { - * const bucket = data[0]; - * const apiResponse = data[1]; - * }); - * - * ``` - * @example include:samples/buckets.js - * region_tag:storage_create_bucket - * Another example: - */ - createBucket(name, metadataOrCallback, callback) { - if (!name) { - throw new Error(StorageExceptionMessages.BUCKET_NAME_REQUIRED_CREATE); +} +/** + * Creates a new pipeline request with the given options. + * This method is to allow for the easy setting of default values and not required. + * @param options - The options to create the request with. + */ +function createPipelineRequest(options) { + return new PipelineRequestImpl(options); +} +//# sourceMappingURL=pipelineRequest.js.map + +/***/ }), + +/***/ 73398: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.agentPolicyName = void 0; +exports.agentPolicy = agentPolicy; +/** + * Name of the Agent Policy + */ +exports.agentPolicyName = "agentPolicy"; +/** + * Gets a pipeline policy that sets http.agent + */ +function agentPolicy(agent) { + return { + name: exports.agentPolicyName, + sendRequest: async (req, next) => { + // Users may define an agent on the request, honor it over the client level one + if (!req.agent) { + req.agent = agent; + } + return next(req); + }, + }; +} +//# sourceMappingURL=agentPolicy.js.map + +/***/ }), + +/***/ 7937: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.apiKeyAuthenticationPolicyName = void 0; +exports.apiKeyAuthenticationPolicy = apiKeyAuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the API Key Authentication Policy + */ +exports.apiKeyAuthenticationPolicyName = "apiKeyAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds API key authentication to requests + */ +function apiKeyAuthenticationPolicy(options) { + return { + name: exports.apiKeyAuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "apiKey"); + // Skip adding authentication header if no API key authentication scheme is found + if (!scheme) { + return next(request); + } + if (scheme.apiKeyLocation !== "header") { + throw new Error(`Unsupported API key location: ${scheme.apiKeyLocation}`); + } + request.headers.set(scheme.name, options.credential.key); + return next(request); + }, + }; +} +//# sourceMappingURL=apiKeyAuthenticationPolicy.js.map + +/***/ }), + +/***/ 10068: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.basicAuthenticationPolicyName = void 0; +exports.basicAuthenticationPolicy = basicAuthenticationPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the Basic Authentication Policy + */ +exports.basicAuthenticationPolicyName = "bearerAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds basic authentication to requests + */ +function basicAuthenticationPolicy(options) { + return { + name: exports.basicAuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "basic"); + // Skip adding authentication header if no basic authentication scheme is found + if (!scheme) { + return next(request); + } + const { username, password } = options.credential; + const headerValue = (0, bytesEncoding_js_1.uint8ArrayToString)((0, bytesEncoding_js_1.stringToUint8Array)(`${username}:${password}`, "utf-8"), "base64"); + request.headers.set("Authorization", `Basic ${headerValue}`); + return next(request); + }, + }; +} +//# sourceMappingURL=basicAuthenticationPolicy.js.map + +/***/ }), + +/***/ 73054: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.bearerAuthenticationPolicyName = void 0; +exports.bearerAuthenticationPolicy = bearerAuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the Bearer Authentication Policy + */ +exports.bearerAuthenticationPolicyName = "bearerAuthenticationPolicy"; +/** + * Gets a pipeline policy that adds bearer token authentication to requests + */ +function bearerAuthenticationPolicy(options) { + return { + name: exports.bearerAuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "http" && x.scheme === "bearer"); + // Skip adding authentication header if no bearer authentication scheme is found + if (!scheme) { + return next(request); + } + const token = await options.credential.getBearerToken({ + abortSignal: request.abortSignal, + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + }, + }; +} +//# sourceMappingURL=bearerAuthenticationPolicy.js.map + +/***/ }), + +/***/ 4212: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ensureSecureConnection = ensureSecureConnection; +const log_js_1 = __nccwpck_require__(85930); +// Ensure the warining is only emitted once +let insecureConnectionWarningEmmitted = false; +/** + * Checks if the request is allowed to be sent over an insecure connection. + * + * A request is allowed to be sent over an insecure connection when: + * - The `allowInsecureConnection` option is set to `true`. + * - The request has the `allowInsecureConnection` property set to `true`. + * - The request is being sent to `localhost` or `127.0.0.1` + */ +function allowInsecureConnection(request, options) { + if (options.allowInsecureConnection && request.allowInsecureConnection) { + const url = new URL(request.url); + if (url.hostname === "localhost" || url.hostname === "127.0.0.1") { + return true; } - let metadata; - if (!callback) { - callback = metadataOrCallback; - metadata = {}; + } + return false; +} +/** + * Logs a warning about sending a token over an insecure connection. + * + * This function will emit a node warning once, but log the warning every time. + */ +function emitInsecureConnectionWarning() { + const warning = "Sending token over insecure transport. Assume any token issued is compromised."; + log_js_1.logger.warning(warning); + if (typeof process?.emitWarning === "function" && !insecureConnectionWarningEmmitted) { + insecureConnectionWarningEmmitted = true; + process.emitWarning(warning); + } +} +/** + * Ensures that authentication is only allowed over HTTPS unless explicitly allowed. + * Throws an error if the connection is not secure and not explicitly allowed. + */ +function ensureSecureConnection(request, options) { + if (!request.url.toLowerCase().startsWith("https://")) { + if (allowInsecureConnection(request, options)) { + emitInsecureConnectionWarning(); } else { - metadata = metadataOrCallback; + throw new Error("Authentication is not permitted for non-TLS protected (non-https) URLs when allowInsecureConnection is false."); } - const body = { - ...metadata, - name, - }; - const storageClasses = { - archive: 'ARCHIVE', - coldline: 'COLDLINE', - dra: 'DURABLE_REDUCED_AVAILABILITY', - multiRegional: 'MULTI_REGIONAL', - nearline: 'NEARLINE', - regional: 'REGIONAL', - standard: 'STANDARD', - }; - const storageClassKeys = Object.keys(storageClasses); - for (const storageClass of storageClassKeys) { - if (body[storageClass]) { - if (metadata.storageClass && metadata.storageClass !== storageClass) { - throw new Error(`Both \`${storageClass}\` and \`storageClass\` were provided.`); + } +} +//# sourceMappingURL=checkInsecureConnection.js.map + +/***/ }), + +/***/ 71305: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.oauth2AuthenticationPolicyName = void 0; +exports.oauth2AuthenticationPolicy = oauth2AuthenticationPolicy; +const checkInsecureConnection_js_1 = __nccwpck_require__(4212); +/** + * Name of the OAuth2 Authentication Policy + */ +exports.oauth2AuthenticationPolicyName = "oauth2AuthenticationPolicy"; +/** + * Gets a pipeline policy that adds authorization header from OAuth2 schemes + */ +function oauth2AuthenticationPolicy(options) { + return { + name: exports.oauth2AuthenticationPolicyName, + async sendRequest(request, next) { + // Ensure allowInsecureConnection is explicitly set when sending request to non-https URLs + (0, checkInsecureConnection_js_1.ensureSecureConnection)(request, options); + const scheme = (request.authSchemes ?? options.authSchemes)?.find((x) => x.kind === "oauth2"); + // Skip adding authentication header if no OAuth2 authentication scheme is found + if (!scheme) { + return next(request); + } + const token = await options.credential.getOAuth2Token(scheme.flows, { + abortSignal: request.abortSignal, + }); + request.headers.set("Authorization", `Bearer ${token}`); + return next(request); + }, + }; +} +//# sourceMappingURL=oauth2AuthenticationPolicy.js.map + +/***/ }), + +/***/ 74162: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decompressResponsePolicyName = void 0; +exports.decompressResponsePolicy = decompressResponsePolicy; +/** + * The programmatic identifier of the decompressResponsePolicy. + */ +exports.decompressResponsePolicyName = "decompressResponsePolicy"; +/** + * A policy to enable response decompression according to Accept-Encoding header + * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding + */ +function decompressResponsePolicy() { + return { + name: exports.decompressResponsePolicyName, + async sendRequest(request, next) { + // HEAD requests have no body + if (request.method !== "HEAD") { + request.headers.set("Accept-Encoding", "gzip,deflate"); + } + return next(request); + }, + }; +} +//# sourceMappingURL=decompressResponsePolicy.js.map + +/***/ }), + +/***/ 20297: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRetryPolicyName = void 0; +exports.defaultRetryPolicy = defaultRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(12283); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(90483); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); +/** + * Name of the {@link defaultRetryPolicy} + */ +exports.defaultRetryPolicyName = "defaultRetryPolicy"; +/** + * A policy that retries according to three strategies: + * - When the server sends a 429 response with a Retry-After header. + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay. + */ +function defaultRetryPolicy(options = {}) { + return { + name: exports.defaultRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)(), (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)(options)], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }).sendRequest, + }; +} +//# sourceMappingURL=defaultRetryPolicy.js.map + +/***/ }), + +/***/ 46313: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryPolicyName = void 0; +exports.exponentialRetryPolicy = exponentialRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(12283); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); +/** + * The programmatic identifier of the exponentialRetryPolicy. + */ +exports.exponentialRetryPolicyName = "exponentialRetryPolicy"; +/** + * A policy that attempts to retry requests while introducing an exponentially increasing delay. + * @param options - Options that configure retry logic. + */ +function exponentialRetryPolicy(options = {}) { + return (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreSystemErrors: true, + }), + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }); +} +//# sourceMappingURL=exponentialRetryPolicy.js.map + +/***/ }), + +/***/ 51393: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.formDataPolicyName = void 0; +exports.formDataPolicy = formDataPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const checkEnvironment_js_1 = __nccwpck_require__(94121); +const httpHeaders_js_1 = __nccwpck_require__(66816); +/** + * The programmatic identifier of the formDataPolicy. + */ +exports.formDataPolicyName = "formDataPolicy"; +function formDataToFormDataMap(formData) { + const formDataMap = {}; + for (const [key, value] of formData.entries()) { + formDataMap[key] ??= []; + formDataMap[key].push(value); + } + return formDataMap; +} +/** + * A policy that encodes FormData on the request into the body. + */ +function formDataPolicy() { + return { + name: exports.formDataPolicyName, + async sendRequest(request, next) { + if (checkEnvironment_js_1.isNodeLike && typeof FormData !== "undefined" && request.body instanceof FormData) { + request.formData = formDataToFormDataMap(request.body); + request.body = undefined; + } + if (request.formData) { + const contentType = request.headers.get("Content-Type"); + if (contentType && contentType.indexOf("application/x-www-form-urlencoded") !== -1) { + request.body = wwwFormUrlEncode(request.formData); } - body.storageClass = storageClasses[storageClass]; - delete body[storageClass]; + else { + await prepareFormData(request.formData, request); + } + request.formData = undefined; + } + return next(request); + }, + }; +} +function wwwFormUrlEncode(formData) { + const urlSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(formData)) { + if (Array.isArray(value)) { + for (const subValue of value) { + urlSearchParams.append(key, subValue.toString()); } } - if (body.requesterPays) { - body.billing = { - requesterPays: body.requesterPays, - }; - delete body.requesterPays; - } - const query = { - project: this.projectId, - }; - if (body.userProject) { - query.userProject = body.userProject; - delete body.userProject; + else { + urlSearchParams.append(key, value.toString()); } - if (body.enableObjectRetention) { - query.enableObjectRetention = body.enableObjectRetention; - delete body.enableObjectRetention; + } + return urlSearchParams.toString(); +} +async function prepareFormData(formData, request) { + // validate content type (multipart/form-data) + const contentType = request.headers.get("Content-Type"); + if (contentType && !contentType.startsWith("multipart/form-data")) { + // content type is specified and is not multipart/form-data. Exit. + return; + } + request.headers.set("Content-Type", contentType ?? "multipart/form-data"); + // set body to MultipartRequestBody using content from FormDataMap + const parts = []; + for (const [fieldName, values] of Object.entries(formData)) { + for (const value of Array.isArray(values) ? values : [values]) { + if (typeof value === "string") { + parts.push({ + headers: (0, httpHeaders_js_1.createHttpHeaders)({ + "Content-Disposition": `form-data; name="${fieldName}"`, + }), + body: (0, bytesEncoding_js_1.stringToUint8Array)(value, "utf-8"), + }); + } + else if (value === undefined || value === null || typeof value !== "object") { + throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`); + } + else { + // using || instead of ?? here since if value.name is empty we should create a file name + const fileName = value.name || "blob"; + const headers = (0, httpHeaders_js_1.createHttpHeaders)(); + headers.set("Content-Disposition", `form-data; name="${fieldName}"; filename="${fileName}"`); + // again, || is used since an empty value.type means the content type is unset + headers.set("Content-Type", value.type || "application/octet-stream"); + parts.push({ + headers, + body: value, + }); + } } - this.request({ - method: 'POST', - uri: '/b', - qs: query, - json: body, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; + } + request.multipartBody = { parts }; +} +//# sourceMappingURL=formDataPolicy.js.map + +/***/ }), + +/***/ 81914: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userAgentPolicyName = exports.userAgentPolicy = exports.tlsPolicyName = exports.tlsPolicy = exports.redirectPolicyName = exports.redirectPolicy = exports.getDefaultProxySettings = exports.proxyPolicyName = exports.proxyPolicy = exports.multipartPolicyName = exports.multipartPolicy = exports.logPolicyName = exports.logPolicy = exports.formDataPolicyName = exports.formDataPolicy = exports.throttlingRetryPolicyName = exports.throttlingRetryPolicy = exports.systemErrorRetryPolicyName = exports.systemErrorRetryPolicy = exports.retryPolicy = exports.exponentialRetryPolicyName = exports.exponentialRetryPolicy = exports.defaultRetryPolicyName = exports.defaultRetryPolicy = exports.decompressResponsePolicyName = exports.decompressResponsePolicy = exports.agentPolicyName = exports.agentPolicy = void 0; +var agentPolicy_js_1 = __nccwpck_require__(73398); +Object.defineProperty(exports, "agentPolicy", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicy; } })); +Object.defineProperty(exports, "agentPolicyName", ({ enumerable: true, get: function () { return agentPolicy_js_1.agentPolicyName; } })); +var decompressResponsePolicy_js_1 = __nccwpck_require__(74162); +Object.defineProperty(exports, "decompressResponsePolicy", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicy; } })); +Object.defineProperty(exports, "decompressResponsePolicyName", ({ enumerable: true, get: function () { return decompressResponsePolicy_js_1.decompressResponsePolicyName; } })); +var defaultRetryPolicy_js_1 = __nccwpck_require__(20297); +Object.defineProperty(exports, "defaultRetryPolicy", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicy; } })); +Object.defineProperty(exports, "defaultRetryPolicyName", ({ enumerable: true, get: function () { return defaultRetryPolicy_js_1.defaultRetryPolicyName; } })); +var exponentialRetryPolicy_js_1 = __nccwpck_require__(46313); +Object.defineProperty(exports, "exponentialRetryPolicy", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicy; } })); +Object.defineProperty(exports, "exponentialRetryPolicyName", ({ enumerable: true, get: function () { return exponentialRetryPolicy_js_1.exponentialRetryPolicyName; } })); +var retryPolicy_js_1 = __nccwpck_require__(27729); +Object.defineProperty(exports, "retryPolicy", ({ enumerable: true, get: function () { return retryPolicy_js_1.retryPolicy; } })); +var systemErrorRetryPolicy_js_1 = __nccwpck_require__(32738); +Object.defineProperty(exports, "systemErrorRetryPolicy", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicy; } })); +Object.defineProperty(exports, "systemErrorRetryPolicyName", ({ enumerable: true, get: function () { return systemErrorRetryPolicy_js_1.systemErrorRetryPolicyName; } })); +var throttlingRetryPolicy_js_1 = __nccwpck_require__(92337); +Object.defineProperty(exports, "throttlingRetryPolicy", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicy; } })); +Object.defineProperty(exports, "throttlingRetryPolicyName", ({ enumerable: true, get: function () { return throttlingRetryPolicy_js_1.throttlingRetryPolicyName; } })); +var formDataPolicy_js_1 = __nccwpck_require__(51393); +Object.defineProperty(exports, "formDataPolicy", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicy; } })); +Object.defineProperty(exports, "formDataPolicyName", ({ enumerable: true, get: function () { return formDataPolicy_js_1.formDataPolicyName; } })); +var logPolicy_js_1 = __nccwpck_require__(71610); +Object.defineProperty(exports, "logPolicy", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicy; } })); +Object.defineProperty(exports, "logPolicyName", ({ enumerable: true, get: function () { return logPolicy_js_1.logPolicyName; } })); +var multipartPolicy_js_1 = __nccwpck_require__(95316); +Object.defineProperty(exports, "multipartPolicy", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicy; } })); +Object.defineProperty(exports, "multipartPolicyName", ({ enumerable: true, get: function () { return multipartPolicy_js_1.multipartPolicyName; } })); +var proxyPolicy_js_1 = __nccwpck_require__(57954); +Object.defineProperty(exports, "proxyPolicy", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicy; } })); +Object.defineProperty(exports, "proxyPolicyName", ({ enumerable: true, get: function () { return proxyPolicy_js_1.proxyPolicyName; } })); +Object.defineProperty(exports, "getDefaultProxySettings", ({ enumerable: true, get: function () { return proxyPolicy_js_1.getDefaultProxySettings; } })); +var redirectPolicy_js_1 = __nccwpck_require__(45125); +Object.defineProperty(exports, "redirectPolicy", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicy; } })); +Object.defineProperty(exports, "redirectPolicyName", ({ enumerable: true, get: function () { return redirectPolicy_js_1.redirectPolicyName; } })); +var tlsPolicy_js_1 = __nccwpck_require__(24655); +Object.defineProperty(exports, "tlsPolicy", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicy; } })); +Object.defineProperty(exports, "tlsPolicyName", ({ enumerable: true, get: function () { return tlsPolicy_js_1.tlsPolicyName; } })); +var userAgentPolicy_js_1 = __nccwpck_require__(35402); +Object.defineProperty(exports, "userAgentPolicy", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicy; } })); +Object.defineProperty(exports, "userAgentPolicyName", ({ enumerable: true, get: function () { return userAgentPolicy_js_1.userAgentPolicyName; } })); +//# sourceMappingURL=internal.js.map + +/***/ }), + +/***/ 71610: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logPolicyName = void 0; +exports.logPolicy = logPolicy; +const log_js_1 = __nccwpck_require__(85930); +const sanitizer_js_1 = __nccwpck_require__(61416); +/** + * The programmatic identifier of the logPolicy. + */ +exports.logPolicyName = "logPolicy"; +/** + * A policy that logs all requests and responses. + * @param options - Options to configure logPolicy. + */ +function logPolicy(options = {}) { + const logger = options.logger ?? log_js_1.logger.info; + const sanitizer = new sanitizer_js_1.Sanitizer({ + additionalAllowedHeaderNames: options.additionalAllowedHeaderNames, + additionalAllowedQueryParameters: options.additionalAllowedQueryParameters, + }); + return { + name: exports.logPolicyName, + async sendRequest(request, next) { + if (!logger.enabled) { + return next(request); } - const bucket = this.bucket(name); - bucket.metadata = resp; - callback(null, bucket, resp); - }); + logger(`Request: ${sanitizer.sanitize(request)}`); + const response = await next(request); + logger(`Response status code: ${response.status}`); + logger(`Headers: ${sanitizer.sanitize(response.headers)}`); + return response; + }, + }; +} +//# sourceMappingURL=logPolicy.js.map + +/***/ }), + +/***/ 95316: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.multipartPolicyName = void 0; +exports.multipartPolicy = multipartPolicy; +const bytesEncoding_js_1 = __nccwpck_require__(88943); +const typeGuards_js_1 = __nccwpck_require__(61580); +const uuidUtils_js_1 = __nccwpck_require__(2339); +const concat_js_1 = __nccwpck_require__(96494); +function generateBoundary() { + return `----AzSDKFormBoundary${(0, uuidUtils_js_1.randomUUID)()}`; +} +function encodeHeaders(headers) { + let result = ""; + for (const [key, value] of headers) { + result += `${key}: ${value}\r\n`; } - /** - * @typedef {object} CreateHmacKeyOptions - * @property {string} [projectId] The project ID of the project that owns - * the service account of the requested HMAC key. If not provided, - * the project ID used to instantiate the Storage client will be used. - * @property {string} [userProject] This parameter is currently ignored. - */ - /** - * @typedef {object} HmacKeyMetadata - * @property {string} accessId The access id identifies which HMAC key was - * used to sign a request when authenticating with HMAC. - * @property {string} etag Used to perform a read-modify-write of the key. - * @property {string} id The resource name of the HMAC key. - * @property {string} projectId The project ID. - * @property {string} serviceAccountEmail The service account's email this - * HMAC key is created for. - * @property {string} state The state of this HMAC key. One of "ACTIVE", - * "INACTIVE" or "DELETED". - * @property {string} timeCreated The creation time of the HMAC key in - * RFC 3339 format. - * @property {string} [updated] The time this HMAC key was last updated in - * RFC 3339 format. - */ - /** - * @typedef {array} CreateHmacKeyResponse - * @property {HmacKey} 0 The HmacKey instance created from API response. - * @property {string} 1 The HMAC key's secret used to access the XML API. - * @property {object} 3 The raw API response. - */ - /** - * @callback CreateHmacKeyCallback Callback function. - * @param {?Error} err Request error, if any. - * @param {HmacKey} hmacKey The HmacKey instance created from API response. - * @param {string} secret The HMAC key's secret used to access the XML API. - * @param {object} apiResponse The raw API response. - */ - /** - * Create an HMAC key associated with an service account to authenticate - * requests to the Cloud Storage XML API. - * - * See {@link https://cloud.google.com/storage/docs/authentication/hmackeys| HMAC keys documentation} - * - * @param {string} serviceAccountEmail The service account's email address - * with which the HMAC key is created for. - * @param {CreateHmacKeyCallback} [callback] Callback function. - * @return {Promise} - * - * @example - * ``` - * const {Storage} = require('google-cloud/storage'); - * const storage = new Storage(); - * - * // Replace with your service account's email address - * const serviceAccountEmail = - * 'my-service-account@appspot.gserviceaccount.com'; - * - * storage.createHmacKey(serviceAccountEmail, function(err, hmacKey, secret) { - * if (!err) { - * // Securely store the secret for use with the XML API. - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.createHmacKey(serviceAccountEmail) - * .then((response) => { - * const hmacKey = response[0]; - * const secret = response[1]; - * // Securely store the secret for use with the XML API. - * }); - * ``` - */ - createHmacKey(serviceAccountEmail, optionsOrCb, cb) { - if (typeof serviceAccountEmail !== 'string') { - throw new Error(StorageExceptionMessages.HMAC_SERVICE_ACCOUNT); + return result; +} +function getLength(source) { + if (source instanceof Uint8Array) { + return source.byteLength; + } + else if ((0, typeGuards_js_1.isBlob)(source)) { + // if was created using createFile then -1 means we have an unknown size + return source.size === -1 ? undefined : source.size; + } + else { + return undefined; + } +} +function getTotalLength(sources) { + let total = 0; + for (const source of sources) { + const partLength = getLength(source); + if (partLength === undefined) { + return undefined; + } + else { + total += partLength; } - const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); - const query = Object.assign({}, options, { serviceAccountEmail }); - const projectId = query.projectId || this.projectId; - delete query.projectId; - this.request({ - method: 'POST', - uri: `/projects/${projectId}/hmacKeys`, - qs: query, - maxRetries: 0, //explicitly set this value since this is a non-idempotent function - }, (err, resp) => { - if (err) { - callback(err, null, null, resp); - return; - } - const metadata = resp.metadata; - const hmacKey = this.hmacKey(metadata.accessId, { - projectId: metadata.projectId, - }); - hmacKey.metadata = resp.metadata; - callback(null, hmacKey, resp.secret, resp); - }); } - /** - * Query object for listing buckets. - * - * @typedef {object} GetBucketsRequest - * @property {boolean} [autoPaginate=true] Have pagination handled - * automatically. - * @property {number} [maxApiCalls] Maximum number of API calls to make. - * @property {number} [maxResults] Maximum number of items plus prefixes to - * return per call. - * Note: By default will handle pagination automatically - * if more than 1 page worth of results are requested per call. - * When `autoPaginate` is set to `false` the smaller of `maxResults` - * or 1 page of results will be returned per call. - * @property {string} [pageToken] A previously-returned page token - * representing part of the larger set of results to view. - * @property {string} [userProject] The ID of the project which will be billed - * for the request. - */ - /** - * @typedef {array} GetBucketsResponse - * @property {Bucket[]} 0 Array of {@link Bucket} instances. - * @property {object} 1 nextQuery A query object to receive more results. - * @property {object} 2 The full API response. - */ - /** - * @callback GetBucketsCallback - * @param {?Error} err Request error, if any. - * @param {Bucket[]} buckets Array of {@link Bucket} instances. - * @param {object} nextQuery A query object to receive more results. - * @param {object} apiResponse The full API response. - */ - /** - * Get Bucket objects for all of the buckets in your project. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/buckets/list| Buckets: list API Documentation} - * - * @param {GetBucketsRequest} [query] Query object for listing buckets. - * @param {GetBucketsCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * storage.getBuckets(function(err, buckets) { - * if (!err) { - * // buckets is an array of Bucket objects. - * } - * }); - * - * //- - * // To control how many API requests are made and page through the results - * // manually, set `autoPaginate` to `false`. - * //- - * const callback = function(err, buckets, nextQuery, apiResponse) { - * if (nextQuery) { - * // More results exist. - * storage.getBuckets(nextQuery, callback); - * } - * - * // The `metadata` property is populated for you with the metadata at the - * // time of fetching. - * buckets[0].metadata; - * - * // However, in cases where you are concerned the metadata could have - * // changed, use the `getMetadata` method. - * buckets[0].getMetadata(function(err, metadata, apiResponse) {}); - * }; - * - * storage.getBuckets({ - * autoPaginate: false - * }, callback); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.getBuckets().then(function(data) { - * const buckets = data[0]; - * }); - * - * ``` - * @example include:samples/buckets.js - * region_tag:storage_list_buckets - * Another example: - */ - getBuckets(optionsOrCallback, cb) { - const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); - options.project = options.project || this.projectId; - this.request({ - uri: '/b', - qs: options, - }, (err, resp) => { - if (err) { - callback(err, null, null, resp); - return; - } - const itemsArray = resp.items ? resp.items : []; - const buckets = itemsArray.map((bucket) => { - const bucketInstance = this.bucket(bucket.id); - bucketInstance.metadata = bucket; - return bucketInstance; - }); - const nextQuery = resp.nextPageToken - ? Object.assign({}, options, { pageToken: resp.nextPageToken }) - : null; - callback(null, buckets, nextQuery, resp); - }); + return total; +} +async function buildRequestBody(request, parts, boundary) { + const sources = [ + (0, bytesEncoding_js_1.stringToUint8Array)(`--${boundary}`, "utf-8"), + ...parts.flatMap((part) => [ + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)(encodeHeaders(part.headers), "utf-8"), + (0, bytesEncoding_js_1.stringToUint8Array)("\r\n", "utf-8"), + part.body, + (0, bytesEncoding_js_1.stringToUint8Array)(`\r\n--${boundary}`, "utf-8"), + ]), + (0, bytesEncoding_js_1.stringToUint8Array)("--\r\n\r\n", "utf-8"), + ]; + const contentLength = getTotalLength(sources); + if (contentLength) { + request.headers.set("Content-Length", contentLength); } - getHmacKeys(optionsOrCb, cb) { - const { options, callback } = (0, util_js_1.normalize)(optionsOrCb, cb); - const query = Object.assign({}, options); - const projectId = query.projectId || this.projectId; - delete query.projectId; - this.request({ - uri: `/projects/${projectId}/hmacKeys`, - qs: query, - }, (err, resp) => { - if (err) { - callback(err, null, null, resp); - return; + request.body = await (0, concat_js_1.concat)(sources); +} +/** + * Name of multipart policy + */ +exports.multipartPolicyName = "multipartPolicy"; +const maxBoundaryLength = 70; +const validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`); +function assertValidBoundary(boundary) { + if (boundary.length > maxBoundaryLength) { + throw new Error(`Multipart boundary "${boundary}" exceeds maximum length of 70 characters`); + } + if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) { + throw new Error(`Multipart boundary "${boundary}" contains invalid characters`); + } +} +/** + * Pipeline policy for multipart requests + */ +function multipartPolicy() { + return { + name: exports.multipartPolicyName, + async sendRequest(request, next) { + if (!request.multipartBody) { + return next(request); } - const itemsArray = resp.items ? resp.items : []; - const hmacKeys = itemsArray.map((hmacKey) => { - const hmacKeyInstance = this.hmacKey(hmacKey.accessId, { - projectId: hmacKey.projectId, - }); - hmacKeyInstance.metadata = hmacKey; - return hmacKeyInstance; - }); - const nextQuery = resp.nextPageToken - ? Object.assign({}, options, { pageToken: resp.nextPageToken }) - : null; - callback(null, hmacKeys, nextQuery, resp); - }); + if (request.body) { + throw new Error("multipartBody and regular body cannot be set at the same time"); + } + let boundary = request.multipartBody.boundary; + const contentTypeHeader = request.headers.get("Content-Type") ?? "multipart/mixed"; + const parsedHeader = contentTypeHeader.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/); + if (!parsedHeader) { + throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`); + } + const [, contentType, parsedBoundary] = parsedHeader; + if (parsedBoundary && boundary && parsedBoundary !== boundary) { + throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`); + } + boundary ??= parsedBoundary; + if (boundary) { + assertValidBoundary(boundary); + } + else { + boundary = generateBoundary(); + } + request.headers.set("Content-Type", `${contentType}; boundary=${boundary}`); + await buildRequestBody(request, request.multipartBody.parts, boundary); + request.multipartBody = undefined; + return next(request); + }, + }; +} +//# sourceMappingURL=multipartPolicy.js.map + +/***/ }), + +/***/ 57954: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.globalNoProxyList = exports.proxyPolicyName = void 0; +exports.loadNoProxy = loadNoProxy; +exports.getDefaultProxySettings = getDefaultProxySettings; +exports.proxyPolicy = proxyPolicy; +const https_proxy_agent_1 = __nccwpck_require__(77219); +const http_proxy_agent_1 = __nccwpck_require__(23764); +const log_js_1 = __nccwpck_require__(85930); +const HTTPS_PROXY = "HTTPS_PROXY"; +const HTTP_PROXY = "HTTP_PROXY"; +const ALL_PROXY = "ALL_PROXY"; +const NO_PROXY = "NO_PROXY"; +/** + * The programmatic identifier of the proxyPolicy. + */ +exports.proxyPolicyName = "proxyPolicy"; +/** + * Stores the patterns specified in NO_PROXY environment variable. + * @internal + */ +exports.globalNoProxyList = []; +let noProxyListLoaded = false; +/** A cache of whether a host should bypass the proxy. */ +const globalBypassedMap = new Map(); +function getEnvironmentValue(name) { + if (process.env[name]) { + return process.env[name]; } - /** - * @typedef {array} GetServiceAccountResponse - * @property {object} 0 The service account resource. - * @property {object} 1 The full - * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. - */ - /** - * @callback GetServiceAccountCallback - * @param {?Error} err Request error, if any. - * @param {object} serviceAccount The serviceAccount resource. - * @param {string} serviceAccount.emailAddress The service account email - * address. - * @param {object} apiResponse The full - * {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| API response}. - */ - /** - * Get the email address of this project's Google Cloud Storage service - * account. - * - * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount/get| Projects.serviceAccount: get API Documentation} - * See {@link https://cloud.google.com/storage/docs/json_api/v1/projects/serviceAccount#resource| Projects.serviceAccount Resource} - * - * @param {object} [options] Configuration object. - * @param {string} [options.userProject] User project to be billed for this - * request. - * @param {GetServiceAccountCallback} [callback] Callback function. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * - * storage.getServiceAccount(function(err, serviceAccount, apiResponse) { - * if (!err) { - * const serviceAccountEmail = serviceAccount.emailAddress; - * } - * }); - * - * //- - * // If the callback is omitted, we'll return a Promise. - * //- - * storage.getServiceAccount().then(function(data) { - * const serviceAccountEmail = data[0].emailAddress; - * const apiResponse = data[1]; - * }); - * ``` - */ - getServiceAccount(optionsOrCallback, cb) { - const { options, callback } = (0, util_js_1.normalize)(optionsOrCallback, cb); - this.request({ - uri: `/projects/${this.projectId}/serviceAccount`, - qs: options, - }, (err, resp) => { - if (err) { - callback(err, null, resp); - return; + else if (process.env[name.toLowerCase()]) { + return process.env[name.toLowerCase()]; + } + return undefined; +} +function loadEnvironmentProxyValue() { + if (!process) { + return undefined; + } + const httpsProxy = getEnvironmentValue(HTTPS_PROXY); + const allProxy = getEnvironmentValue(ALL_PROXY); + const httpProxy = getEnvironmentValue(HTTP_PROXY); + return httpsProxy || allProxy || httpProxy; +} +/** + * Check whether the host of a given `uri` matches any pattern in the no proxy list. + * If there's a match, any request sent to the same host shouldn't have the proxy settings set. + * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210 + */ +function isBypassed(uri, noProxyList, bypassedMap) { + if (noProxyList.length === 0) { + return false; + } + const host = new URL(uri).hostname; + if (bypassedMap?.has(host)) { + return bypassedMap.get(host); + } + let isBypassedFlag = false; + for (const pattern of noProxyList) { + if (pattern[0] === ".") { + // This should match either domain it self or any subdomain or host + // .foo.com will match foo.com it self or *.foo.com + if (host.endsWith(pattern)) { + isBypassedFlag = true; } - const camelCaseResponse = {}; - for (const prop in resp) { - // eslint-disable-next-line no-prototype-builtins - if (resp.hasOwnProperty(prop)) { - const camelCaseProp = prop.replace(/_(\w)/g, (_, match) => match.toUpperCase()); - camelCaseResponse[camelCaseProp] = resp[prop]; + else { + if (host.length === pattern.length - 1 && host === pattern.slice(1)) { + isBypassedFlag = true; } } - callback(null, camelCaseResponse, resp); - }); + } + else { + if (host === pattern) { + isBypassedFlag = true; + } + } } - /** - * Get a reference to an HmacKey object. - * Note: this does not fetch the HMAC key's metadata. Use HmacKey#get() to - * retrieve and populate the metadata. - * - * To get a reference to an HMAC key that's not created for a service - * account in the same project used to instantiate the Storage client, - * supply the project's ID as `projectId` in the `options` argument. - * - * @param {string} accessId The HMAC key's access ID. - * @param {HmacKeyOptions} options HmacKey constructor options. - * @returns {HmacKey} - * @see HmacKey - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const hmacKey = storage.hmacKey('ACCESS_ID'); - * ``` - */ - hmacKey(accessId, options) { - if (!accessId) { - throw new Error(StorageExceptionMessages.HMAC_ACCESS_ID); + bypassedMap?.set(host, isBypassedFlag); + return isBypassedFlag; +} +function loadNoProxy() { + const noProxy = getEnvironmentValue(NO_PROXY); + noProxyListLoaded = true; + if (noProxy) { + return noProxy + .split(",") + .map((item) => item.trim()) + .filter((item) => item.length); + } + return []; +} +/** + * This method converts a proxy url into `ProxySettings` for use with ProxyPolicy. + * If no argument is given, it attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + * @param proxyUrl - The url of the proxy to use. May contain authentication information. + * @deprecated - Internally this method is no longer necessary when setting proxy information. + */ +function getDefaultProxySettings(proxyUrl) { + if (!proxyUrl) { + proxyUrl = loadEnvironmentProxyValue(); + if (!proxyUrl) { + return undefined; + } + } + const parsedUrl = new URL(proxyUrl); + const schema = parsedUrl.protocol ? parsedUrl.protocol + "//" : ""; + return { + host: schema + parsedUrl.hostname, + port: Number.parseInt(parsedUrl.port || "80"), + username: parsedUrl.username, + password: parsedUrl.password, + }; +} +/** + * This method attempts to parse a proxy URL from the environment + * variables `HTTPS_PROXY` or `HTTP_PROXY`. + */ +function getDefaultProxySettingsInternal() { + const envProxy = loadEnvironmentProxyValue(); + return envProxy ? new URL(envProxy) : undefined; +} +function getUrlFromProxySettings(settings) { + let parsedProxyUrl; + try { + parsedProxyUrl = new URL(settings.host); + } + catch { + throw new Error(`Expecting a valid host string in proxy settings, but found "${settings.host}".`); + } + parsedProxyUrl.port = String(settings.port); + if (settings.username) { + parsedProxyUrl.username = settings.username; + } + if (settings.password) { + parsedProxyUrl.password = settings.password; + } + return parsedProxyUrl; +} +function setProxyAgentOnRequest(request, cachedAgents, proxyUrl) { + // Custom Agent should take precedence so if one is present + // we should skip to avoid overwriting it. + if (request.agent) { + return; + } + const url = new URL(request.url); + const isInsecure = url.protocol !== "https:"; + if (request.tlsSettings) { + log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); + } + const headers = request.headers.toJSON(); + if (isInsecure) { + if (!cachedAgents.httpProxyAgent) { + cachedAgents.httpProxyAgent = new http_proxy_agent_1.HttpProxyAgent(proxyUrl, { headers }); } - return new hmacKey_js_1.HmacKey(this, accessId, options); + request.agent = cachedAgents.httpProxyAgent; + } + else { + if (!cachedAgents.httpsProxyAgent) { + cachedAgents.httpsProxyAgent = new https_proxy_agent_1.HttpsProxyAgent(proxyUrl, { headers }); + } + request.agent = cachedAgents.httpsProxyAgent; } } -exports.Storage = Storage; /** - * {@link Bucket} class. - * - * @name Storage.Bucket - * @see Bucket - * @type {Constructor} + * A policy that allows one to apply proxy settings to all requests. + * If not passed static settings, they will be retrieved from the HTTPS_PROXY + * or HTTP_PROXY environment variables. + * @param proxySettings - ProxySettings to use on each request. + * @param options - additional settings, for example, custom NO_PROXY patterns */ -Storage.Bucket = bucket_js_1.Bucket; +function proxyPolicy(proxySettings, options) { + if (!noProxyListLoaded) { + exports.globalNoProxyList.push(...loadNoProxy()); + } + const defaultProxy = proxySettings + ? getUrlFromProxySettings(proxySettings) + : getDefaultProxySettingsInternal(); + const cachedAgents = {}; + return { + name: exports.proxyPolicyName, + async sendRequest(request, next) { + if (!request.proxySettings && + defaultProxy && + !isBypassed(request.url, options?.customNoProxyList ?? exports.globalNoProxyList, options?.customNoProxyList ? undefined : globalBypassedMap)) { + setProxyAgentOnRequest(request, cachedAgents, defaultProxy); + } + else if (request.proxySettings) { + setProxyAgentOnRequest(request, cachedAgents, getUrlFromProxySettings(request.proxySettings)); + } + return next(request); + }, + }; +} +//# sourceMappingURL=proxyPolicy.js.map + +/***/ }), + +/***/ 45125: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.redirectPolicyName = void 0; +exports.redirectPolicy = redirectPolicy; /** - * {@link Channel} class. - * - * @name Storage.Channel - * @see Channel - * @type {Constructor} + * The programmatic identifier of the redirectPolicy. */ -Storage.Channel = channel_js_1.Channel; +exports.redirectPolicyName = "redirectPolicy"; /** - * {@link File} class. - * - * @name Storage.File - * @see File - * @type {Constructor} + * Methods that are allowed to follow redirects 301 and 302 */ -Storage.File = file_js_1.File; +const allowedRedirect = ["GET", "HEAD"]; /** - * {@link HmacKey} class. - * - * @name Storage.HmacKey - * @see HmacKey - * @type {Constructor} - */ -Storage.HmacKey = hmacKey_js_1.HmacKey; -Storage.acl = { - OWNER_ROLE: 'OWNER', - READER_ROLE: 'READER', - WRITER_ROLE: 'WRITER', -}; -/*! Developer Documentation - * - * These methods can be auto-paginated. - */ -paginator_1.paginator.extend(Storage, ['getBuckets', 'getHmacKeys']); -/*! Developer Documentation - * - * All async methods (except for streams) will return a Promise in the event - * that a callback is omitted. + * A policy to follow Location headers from the server in order + * to support server-side redirection. + * In the browser, this policy is not used. + * @param options - Options to control policy behavior. */ -(0, promisify_1.promisifyAll)(Storage, { - exclude: ['bucket', 'channel', 'hmacKey'], -}); - +function redirectPolicy(options = {}) { + const { maxRetries = 20 } = options; + return { + name: exports.redirectPolicyName, + async sendRequest(request, next) { + const response = await next(request); + return handleRedirect(next, response, maxRetries); + }, + }; +} +async function handleRedirect(next, response, maxRetries, currentRetries = 0) { + const { request, status, headers } = response; + const locationHeader = headers.get("location"); + if (locationHeader && + (status === 300 || + (status === 301 && allowedRedirect.includes(request.method)) || + (status === 302 && allowedRedirect.includes(request.method)) || + (status === 303 && request.method === "POST") || + status === 307) && + currentRetries < maxRetries) { + const url = new URL(locationHeader, request.url); + request.url = url.toString(); + // POST request with Status code 303 should be converted into a + // redirected GET request if the redirect url is present in the location header + if (status === 303) { + request.method = "GET"; + request.headers.delete("Content-Length"); + delete request.body; + } + request.headers.delete("Authorization"); + const res = await next(request); + return handleRedirect(next, res, maxRetries, currentRetries + 1); + } + return response; +} +//# sourceMappingURL=redirectPolicy.js.map /***/ }), -/***/ 45594: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 27729: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -/*! - * Copyright 2022 Google LLC. All Rights Reserved. - * - * 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. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -var _XMLMultiPartUploadHelper_instances, _XMLMultiPartUploadHelper_setGoogApiClientHeaders, _XMLMultiPartUploadHelper_handleErrorResponse; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TransferManager = exports.MultiPartUploadError = void 0; -const file_js_1 = __nccwpck_require__(4713); -const p_limit_1 = __importDefault(__nccwpck_require__(57684)); -const path = __importStar(__nccwpck_require__(71017)); -const fs_1 = __nccwpck_require__(57147); -const crc32c_js_1 = __nccwpck_require__(55810); -const google_auth_library_1 = __nccwpck_require__(20810); -const fast_xml_parser_1 = __nccwpck_require__(12603); -const async_retry_1 = __importDefault(__nccwpck_require__(33415)); -const crypto_1 = __nccwpck_require__(6113); -const util_js_1 = __nccwpck_require__(38064); -const util_js_2 = __nccwpck_require__(59258); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_helper_cjs_1 = __nccwpck_require__(28568); -const packageJson = (0, package_json_helper_cjs_1.getPackageJSON)(); +exports.retryPolicy = retryPolicy; +const helpers_js_1 = __nccwpck_require__(59842); +const AbortError_js_1 = __nccwpck_require__(72033); +const logger_js_1 = __nccwpck_require__(36720); +const constants_js_1 = __nccwpck_require__(58463); +const retryPolicyLogger = (0, logger_js_1.createClientLogger)("ts-http-runtime retryPolicy"); /** - * Default number of concurrently executing promises to use when calling uploadManyFiles. - * + * The programmatic identifier of the retryPolicy. */ -const DEFAULT_PARALLEL_UPLOAD_LIMIT = 5; +const retryPolicyName = "retryPolicy"; /** - * Default number of concurrently executing promises to use when calling downloadManyFiles. - * + * retryPolicy is a generic policy to enable retrying requests when certain conditions are met */ -const DEFAULT_PARALLEL_DOWNLOAD_LIMIT = 5; +function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { + const logger = options.logger || retryPolicyLogger; + return { + name: retryPolicyName, + async sendRequest(request, next) { + let response; + let responseError; + let retryCount = -1; + retryRequest: while (true) { + retryCount += 1; + response = undefined; + responseError = undefined; + try { + logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId); + response = await next(request); + logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId); + } + catch (e) { + logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId); + // RestErrors are valid targets for the retry strategies. + // If none of the retry strategies can work with them, they will be thrown later in this policy. + // If the received error is not a RestError, it is immediately thrown. + responseError = e; + if (!e || responseError.name !== "RestError") { + throw e; + } + response = responseError.response; + } + if (request.abortSignal?.aborted) { + logger.error(`Retry ${retryCount}: Request aborted.`); + const abortError = new AbortError_js_1.AbortError(); + throw abortError; + } + if (retryCount >= (options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT)) { + logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`); + if (responseError) { + throw responseError; + } + else if (response) { + return response; + } + else { + throw new Error("Maximum retries reached with no response or error to throw"); + } + } + logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`); + strategiesLoop: for (const strategy of strategies) { + const strategyLogger = strategy.logger || logger; + strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`); + const modifiers = strategy.retry({ + retryCount, + response, + responseError, + }); + if (modifiers.skipStrategy) { + strategyLogger.info(`Retry ${retryCount}: Skipped.`); + continue strategiesLoop; + } + const { errorToThrow, retryAfterInMs, redirectTo } = modifiers; + if (errorToThrow) { + strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow); + throw errorToThrow; + } + if (retryAfterInMs || retryAfterInMs === 0) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`); + await (0, helpers_js_1.delay)(retryAfterInMs, undefined, { abortSignal: request.abortSignal }); + continue retryRequest; + } + if (redirectTo) { + strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`); + request.url = redirectTo; + continue retryRequest; + } + } + if (responseError) { + logger.info(`None of the retry strategies could work with the received error. Throwing it.`); + throw responseError; + } + if (response) { + logger.info(`None of the retry strategies could work with the received response. Returning it.`); + return response; + } + // If all the retries skip and there's no response, + // we're still in the retry loop, so a new request will be sent + // until `maxRetries` is reached. + } + }, + }; +} +//# sourceMappingURL=retryPolicy.js.map + +/***/ }), + +/***/ 32738: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.systemErrorRetryPolicyName = void 0; +exports.systemErrorRetryPolicy = systemErrorRetryPolicy; +const exponentialRetryStrategy_js_1 = __nccwpck_require__(12283); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); /** - * Default number of concurrently executing promises to use when calling downloadFileInChunks. - * + * Name of the {@link systemErrorRetryPolicy} */ -const DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT = 5; +exports.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; /** - * The minimum size threshold in bytes at which to apply a chunked download strategy when calling downloadFileInChunks. - * + * A retry policy that specifically seeks to handle errors in the + * underlying transport layer (e.g. DNS lookup failures) rather than + * retryable error codes from the server itself. + * @param options - Options that customize the policy. */ -const DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD = 32 * 1024 * 1024; +function systemErrorRetryPolicy(options = {}) { + return { + name: exports.systemErrorRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([ + (0, exponentialRetryStrategy_js_1.exponentialRetryStrategy)({ + ...options, + ignoreHttpStatusCodes: true, + }), + ], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }).sendRequest, + }; +} +//# sourceMappingURL=systemErrorRetryPolicy.js.map + +/***/ }), + +/***/ 92337: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.throttlingRetryPolicyName = void 0; +exports.throttlingRetryPolicy = throttlingRetryPolicy; +const throttlingRetryStrategy_js_1 = __nccwpck_require__(90483); +const retryPolicy_js_1 = __nccwpck_require__(27729); +const constants_js_1 = __nccwpck_require__(58463); /** - * The chunk size in bytes to use when calling downloadFileInChunks. - * + * Name of the {@link throttlingRetryPolicy} */ -const DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +exports.throttlingRetryPolicyName = "throttlingRetryPolicy"; /** - * The chunk size in bytes to use when calling uploadFileInChunks. + * A policy that retries when the server sends a 429 response with a Retry-After header. + * + * To learn more, please refer to + * https://learn.microsoft.com/azure/azure-resource-manager/resource-manager-request-limits, + * https://learn.microsoft.com/azure/azure-subscription-service-limits and + * https://learn.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors * + * @param options - Options that configure retry logic. */ -const UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE = 32 * 1024 * 1024; +function throttlingRetryPolicy(options = {}) { + return { + name: exports.throttlingRetryPolicyName, + sendRequest: (0, retryPolicy_js_1.retryPolicy)([(0, throttlingRetryStrategy_js_1.throttlingRetryStrategy)()], { + maxRetries: options.maxRetries ?? constants_js_1.DEFAULT_RETRY_POLICY_COUNT, + }).sendRequest, + }; +} +//# sourceMappingURL=throttlingRetryPolicy.js.map + +/***/ }), + +/***/ 24655: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.tlsPolicyName = void 0; +exports.tlsPolicy = tlsPolicy; /** - * Default number of concurrently executing promises to use when calling uploadFileInChunks. - * + * Name of the TLS Policy */ -const DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT = 5; -const EMPTY_REGEX = '(?:)'; +exports.tlsPolicyName = "tlsPolicy"; /** - * The `gccl-gcs-cmd` value for the `X-Goog-API-Client` header. - * Example: `gccl-gcs-cmd/tm.upload_many` - * - * @see {@link GCCL_GCS_CMD}. - * @see {@link GCCL_GCS_CMD_KEY}. + * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication. */ -const GCCL_GCS_CMD_FEATURE = { - UPLOAD_MANY: 'tm.upload_many', - DOWNLOAD_MANY: 'tm.download_many', - UPLOAD_SHARDED: 'tm.upload_sharded', - DOWNLOAD_SHARDED: 'tm.download_sharded', -}; -const defaultMultiPartGenerator = (bucket, fileName, uploadId, partsMap) => { - return new XMLMultiPartUploadHelper(bucket, fileName, uploadId, partsMap); -}; -class MultiPartUploadError extends Error { - constructor(message, uploadId, partsMap) { - super(message); - this.uploadId = uploadId; - this.partsMap = partsMap; - } +function tlsPolicy(tlsSettings) { + return { + name: exports.tlsPolicyName, + sendRequest: async (req, next) => { + // Users may define a request tlsSettings, honor those over the client level one + if (!req.tlsSettings) { + req.tlsSettings = tlsSettings; + } + return next(req); + }, + }; } -exports.MultiPartUploadError = MultiPartUploadError; +//# sourceMappingURL=tlsPolicy.js.map + +/***/ }), + +/***/ 35402: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.userAgentPolicyName = void 0; +exports.userAgentPolicy = userAgentPolicy; +const userAgent_js_1 = __nccwpck_require__(8192); +const UserAgentHeaderName = (0, userAgent_js_1.getUserAgentHeaderName)(); /** - * Class representing an implementation of MPU in the XML API. This class is not meant for public usage. - * - * @private - * + * The programmatic identifier of the userAgentPolicy. */ -class XMLMultiPartUploadHelper { - constructor(bucket, fileName, uploadId, partsMap) { - _XMLMultiPartUploadHelper_instances.add(this); - this.authClient = bucket.storage.authClient || new google_auth_library_1.GoogleAuth(); - this.uploadId = uploadId || ''; - this.bucket = bucket; - this.fileName = fileName; - this.baseUrl = `https://${bucket.name}.${new URL(this.bucket.storage.apiEndpoint).hostname}/${fileName}`; - this.xmlBuilder = new fast_xml_parser_1.XMLBuilder({ arrayNodeName: 'Part' }); - this.xmlParser = new fast_xml_parser_1.XMLParser(); - this.partsMap = partsMap || new Map(); - this.retryOptions = { - retries: this.bucket.storage.retryOptions.maxRetries, - factor: this.bucket.storage.retryOptions.retryDelayMultiplier, - maxTimeout: this.bucket.storage.retryOptions.maxRetryDelay * 1000, - maxRetryTime: this.bucket.storage.retryOptions.totalTimeout * 1000, - }; - } - /** - * Initiates a multipart upload (MPU) to the XML API and stores the resultant upload id. - * - * @returns {Promise} - */ - async initiateUpload(headers = {}) { - const url = `${this.baseUrl}?uploads`; - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this, headers), - method: 'POST', - url, - }); - if (res.data && res.data.error) { - throw res.data.error; - } - const parsedXML = this.xmlParser.parse(res.data); - this.uploadId = parsedXML.InitiateMultipartUploadResult.UploadId; - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - } - }, this.retryOptions); - } - /** - * Uploads the provided chunk of data to the XML API using the previously created upload id. - * - * @param {number} partNumber the sequence number of this chunk. - * @param {Buffer} chunk the chunk of data to be uploaded. - * @param {string | false} validation whether or not to include the md5 hash in the headers to cause the server - * to validate the chunk was not corrupted. - * @returns {Promise} - */ - async uploadPart(partNumber, chunk, validation) { - const url = `${this.baseUrl}?partNumber=${partNumber}&uploadId=${this.uploadId}`; - let headers = __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this); - if (validation === 'md5') { - const hash = (0, crypto_1.createHash)('md5').update(chunk).digest('base64'); - headers = { - 'Content-MD5': hash, - }; - } - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - url, - method: 'PUT', - body: chunk, - headers, - }); - if (res.data && res.data.error) { - throw res.data.error; - } - this.partsMap.set(partNumber, res.headers['etag']); - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - } - }, this.retryOptions); - } - /** - * Sends the final request of the MPU to tell GCS the upload is now complete. - * - * @returns {Promise} - */ - async completeUpload() { - const url = `${this.baseUrl}?uploadId=${this.uploadId}`; - const sortedMap = new Map([...this.partsMap.entries()].sort((a, b) => a[0] - b[0])); - const parts = []; - for (const entry of sortedMap.entries()) { - parts.push({ PartNumber: entry[0], ETag: entry[1] }); - } - const body = `${this.xmlBuilder.build(parts)}`; - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - headers: __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_setGoogApiClientHeaders).call(this), - url, - method: 'POST', - body, - }); - if (res.data && res.data.error) { - throw res.data.error; - } - return res; - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - return; - } - }, this.retryOptions); - } - /** - * Aborts an multipart upload that is in progress. Once aborted, any parts in the process of being uploaded fail, - * and future requests using the upload ID fail. - * - * @returns {Promise} - */ - async abortUpload() { - const url = `${this.baseUrl}?uploadId=${this.uploadId}`; - return (0, async_retry_1.default)(async (bail) => { - try { - const res = await this.authClient.request({ - url, - method: 'DELETE', - }); - if (res.data && res.data.error) { - throw res.data.error; - } - } - catch (e) { - __classPrivateFieldGet(this, _XMLMultiPartUploadHelper_instances, "m", _XMLMultiPartUploadHelper_handleErrorResponse).call(this, e, bail); - return; +exports.userAgentPolicyName = "userAgentPolicy"; +/** + * A policy that sets the User-Agent header (or equivalent) to reflect + * the library version. + * @param options - Options to customize the user agent value. + */ +function userAgentPolicy(options = {}) { + const userAgentValue = (0, userAgent_js_1.getUserAgentValue)(options.userAgentPrefix); + return { + name: exports.userAgentPolicyName, + async sendRequest(request, next) { + if (!request.headers.has(UserAgentHeaderName)) { + request.headers.set(UserAgentHeaderName, await userAgentValue); } - }, this.retryOptions); - } + return next(request); + }, + }; } -_XMLMultiPartUploadHelper_instances = new WeakSet(), _XMLMultiPartUploadHelper_setGoogApiClientHeaders = function _XMLMultiPartUploadHelper_setGoogApiClientHeaders(headers = {}) { - let headerFound = false; - let userAgentFound = false; - for (const [key, value] of Object.entries(headers)) { - if (key.toLocaleLowerCase().trim() === 'x-goog-api-client') { - headerFound = true; - // Prepend command feature to value, if not already there - if (!value.includes(GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED)) { - headers[key] = - `${value} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; - } - } - else if (key.toLocaleLowerCase().trim() === 'user-agent') { - userAgentFound = true; - } - } - // If the header isn't present, add it - if (!headerFound) { - headers['x-goog-api-client'] = `${(0, util_js_2.getRuntimeTrackingString)()} gccl/${packageJson.version} gccl-gcs-cmd/${GCCL_GCS_CMD_FEATURE.UPLOAD_SHARDED}`; - } - // If the User-Agent isn't present, add it - if (!userAgentFound) { - headers['User-Agent'] = (0, util_js_2.getUserAgentString)(); - } - return headers; -}, _XMLMultiPartUploadHelper_handleErrorResponse = function _XMLMultiPartUploadHelper_handleErrorResponse(err, bail) { - if (this.bucket.storage.retryOptions.autoRetry && - this.bucket.storage.retryOptions.retryableErrorFn(err)) { - throw err; - } - else { - bail(err); - } -}; +//# sourceMappingURL=userAgentPolicy.js.map + +/***/ }), + +/***/ 42858: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RestError = void 0; +exports.isRestError = isRestError; +const error_js_1 = __nccwpck_require__(13742); +const inspect_js_1 = __nccwpck_require__(52728); +const sanitizer_js_1 = __nccwpck_require__(61416); +const errorSanitizer = new sanitizer_js_1.Sanitizer(); /** - * Create a TransferManager object to perform parallel transfer operations on a Cloud Storage bucket. - * - * @class - * @hideconstructor - * - * @param {Bucket} bucket A {@link Bucket} instance - * + * A custom error type for failed pipeline requests. */ -class TransferManager { - constructor(bucket) { - this.bucket = bucket; - } - /** - * @typedef {object} UploadManyFilesOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when uploading the files. - * @property {boolean} [skipIfExists] Do not upload the file if it already exists in - * the bucket. This will set the precondition ifGenerationMatch = 0. - * @property {string} [prefix] A prefix to append to all of the uploaded files. - * @property {object} [passthroughOptions] {@link UploadOptions} Options to be passed through - * to each individual upload operation. - * - */ +class RestError extends Error { /** - * Upload multiple files in parallel to the bucket. This is a convenience method - * that utilizes {@link Bucket#upload} to perform the upload. - * - * @param {array | string} [filePathsOrDirectory] An array of fully qualified paths to the files or a directory name. - * If a directory name is provided, the directory will be recursively walked and all files will be added to the upload list. - * to be uploaded to the bucket - * @param {UploadManyFilesOptions} [options] Configuration options. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Upload multiple files in parallel. - * //- - * const response = await transferManager.uploadManyFiles(['/local/path/file1.txt, 'local/path/file2.txt']); - * // Your bucket now contains: - * // - "local/path/file1.txt" (with the contents of '/local/path/file1.txt') - * // - "local/path/file2.txt" (with the contents of '/local/path/file2.txt') - * const response = await transferManager.uploadManyFiles('/local/directory'); - * // Your bucket will now contain all files contained in '/local/directory' maintaining the subdirectory structure. - * ``` - * + * Something went wrong when making the request. + * This means the actual request failed for some reason, + * such as a DNS issue or the connection being lost. */ - async uploadManyFiles(filePathsOrDirectory, options = {}) { - var _a; - if (options.skipIfExists && ((_a = options.passthroughOptions) === null || _a === void 0 ? void 0 : _a.preconditionOpts)) { - options.passthroughOptions.preconditionOpts.ifGenerationMatch = 0; - } - else if (options.skipIfExists && - options.passthroughOptions === undefined) { - options.passthroughOptions = { - preconditionOpts: { - ifGenerationMatch: 0, - }, - }; - } - const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_UPLOAD_LIMIT); - const promises = []; - let allPaths = []; - if (!Array.isArray(filePathsOrDirectory)) { - for await (const curPath of this.getPathsFromDirectory(filePathsOrDirectory)) { - allPaths.push(curPath); - } - } - else { - allPaths = filePathsOrDirectory; - } - for (const filePath of allPaths) { - const stat = await fs_1.promises.lstat(filePath); - if (stat.isDirectory()) { - continue; - } - const passThroughOptionsCopy = { - ...options.passthroughOptions, - [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.UPLOAD_MANY, - }; - passThroughOptionsCopy.destination = filePath - .split(path.sep) - .join(path.posix.sep); - if (options.prefix) { - passThroughOptionsCopy.destination = path.posix.join(...options.prefix.split(path.sep), passThroughOptionsCopy.destination); - } - promises.push(limit(() => this.bucket.upload(filePath, passThroughOptionsCopy))); - } - return Promise.all(promises); - } + static REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR"; /** - * @typedef {object} DownloadManyFilesOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when downloading the files. - * @property {string} [prefix] A prefix to append to all of the downloaded files. - * @property {string} [stripPrefix] A prefix to remove from all of the downloaded files. - * @property {object} [passthroughOptions] {@link DownloadOptions} Options to be passed through - * to each individual download operation. - * + * This means that parsing the response from the server failed. + * It may have been malformed. */ + static PARSE_ERROR = "PARSE_ERROR"; /** - * Download multiple files in parallel to the local filesystem. This is a convenience method - * that utilizes {@link File#download} to perform the download. - * - * @param {array | string} [filesOrFolder] An array of file name strings or file objects to be downloaded. If - * a string is provided this will be treated as a GCS prefix and all files with that prefix will be downloaded. - * @param {DownloadManyFilesOptions} [options] Configuration options. Setting options.prefix or options.stripPrefix - * or options.passthroughOptions.destination will cause the downloaded files to be written to the file system - * instead of being returned as a buffer. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Download multiple files in parallel. - * //- - * const response = await transferManager.downloadManyFiles(['file1.txt', 'file2.txt']); - * // The following files have been downloaded: - * // - "file1.txt" (with the contents from my-bucket.file1.txt) - * // - "file2.txt" (with the contents from my-bucket.file2.txt) - * const response = await transferManager.downloadManyFiles([bucket.File('file1.txt'), bucket.File('file2.txt')]); - * // The following files have been downloaded: - * // - "file1.txt" (with the contents from my-bucket.file1.txt) - * // - "file2.txt" (with the contents from my-bucket.file2.txt) - * const response = await transferManager.downloadManyFiles('test-folder'); - * // All files with GCS prefix of 'test-folder' have been downloaded. - * ``` - * + * The code of the error itself (use statics on RestError if possible.) */ - async downloadManyFiles(filesOrFolder, options = {}) { - const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_DOWNLOAD_LIMIT); - const promises = []; - let files = []; - if (!Array.isArray(filesOrFolder)) { - const directoryFiles = await this.bucket.getFiles({ - prefix: filesOrFolder, - }); - files = directoryFiles[0]; - } - else { - files = filesOrFolder.map(curFile => { - if (typeof curFile === 'string') { - return this.bucket.file(curFile); - } - return curFile; - }); - } - const stripRegexString = options.stripPrefix - ? `^${options.stripPrefix}` - : EMPTY_REGEX; - const regex = new RegExp(stripRegexString, 'g'); - for (const file of files) { - const passThroughOptionsCopy = { - ...options.passthroughOptions, - [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_MANY, - }; - if (options.prefix || passThroughOptionsCopy.destination) { - passThroughOptionsCopy.destination = path.join(options.prefix || '', passThroughOptionsCopy.destination || '', file.name); - } - if (options.stripPrefix) { - passThroughOptionsCopy.destination = file.name.replace(regex, ''); - } - promises.push(limit(async () => { - const destination = passThroughOptionsCopy.destination; - if (destination && destination.endsWith(path.sep)) { - await fs_1.promises.mkdir(destination, { recursive: true }); - return Promise.resolve([ - Buffer.alloc(0), - ]); - } - return file.download(passThroughOptionsCopy); - })); - } - return Promise.all(promises); - } + code; /** - * @typedef {object} DownloadFileInChunksOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when downloading the file. - * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be downloaded. - * @property {string | boolean} [validation] Whether or not to perform a CRC32C validation check when download is complete. - * @property {boolean} [noReturnData] Whether or not to return the downloaded data. A `true` value here would be useful for files with a size that will not fit into memory. - * + * The HTTP status code of the request (if applicable.) */ + statusCode; /** - * Download a large file in chunks utilizing parallel download operations. This is a convenience method - * that utilizes {@link File#download} to perform the download. - * - * @param {File | string} fileOrName {@link File} to download. - * @param {DownloadFileInChunksOptions} [options] Configuration options. - * @returns {Promise} - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Download a large file in chunks utilizing parallel operations. - * //- - * const response = await transferManager.downloadFileInChunks(bucket.file('large-file.txt'); - * // Your local directory now contains: - * // - "large-file.txt" (with the contents from my-bucket.large-file.txt) - * ``` - * + * The request that was made. + * This property is non-enumerable. */ - async downloadFileInChunks(fileOrName, options = {}) { - let chunkSize = options.chunkSizeBytes || DOWNLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; - let limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_DOWNLOAD_LIMIT); - const noReturnData = Boolean(options.noReturnData); - const promises = []; - const file = typeof fileOrName === 'string' - ? this.bucket.file(fileOrName) - : fileOrName; - const fileInfo = await file.get(); - const size = parseInt(fileInfo[0].metadata.size.toString()); - // If the file size does not meet the threshold download it as a single chunk. - if (size < DOWNLOAD_IN_CHUNKS_FILE_SIZE_THRESHOLD) { - limit = (0, p_limit_1.default)(1); - chunkSize = size; - } - let start = 0; - const filePath = options.destination || path.basename(file.name); - const fileToWrite = await fs_1.promises.open(filePath, 'w'); - while (start < size) { - const chunkStart = start; - let chunkEnd = start + chunkSize - 1; - chunkEnd = chunkEnd > size ? size : chunkEnd; - promises.push(limit(async () => { - const resp = await file.download({ - start: chunkStart, - end: chunkEnd, - [util_js_1.GCCL_GCS_CMD_KEY]: GCCL_GCS_CMD_FEATURE.DOWNLOAD_SHARDED, - }); - const result = await fileToWrite.write(resp[0], 0, resp[0].length, chunkStart); - if (noReturnData) - return; - return result.buffer; - })); - start += chunkSize; - } - let chunks; - try { - chunks = await Promise.all(promises); - } - finally { - await fileToWrite.close(); - } - if (options.validation === 'crc32c' && fileInfo[0].metadata.crc32c) { - const downloadedCrc32C = await crc32c_js_1.CRC32C.fromFile(filePath); - if (!downloadedCrc32C.validate(fileInfo[0].metadata.crc32c)) { - const mismatchError = new file_js_1.RequestError(file_js_1.FileExceptionMessages.DOWNLOAD_MISMATCH); - mismatchError.code = 'CONTENT_DOWNLOAD_MISMATCH'; - throw mismatchError; - } - } - if (noReturnData) - return; - return [Buffer.concat(chunks, size)]; - } + request; /** - * @typedef {object} UploadFileInChunksOptions - * @property {number} [concurrencyLimit] The number of concurrently executing promises - * to use when uploading the file. - * @property {number} [chunkSizeBytes] The size in bytes of each chunk to be uploaded. - * @property {string} [uploadName] Name of the file when saving to GCS. If ommitted the name is taken from the file path. - * @property {number} [maxQueueSize] The number of chunks to be uploaded to hold in memory concurrently. If not specified - * defaults to the specified concurrency limit. - * @property {string} [uploadId] If specified attempts to resume a previous upload. - * @property {Map} [partsMap] If specified alongside uploadId, attempts to resume a previous upload from the last chunk - * specified in partsMap - * @property {object} [headers] headers to be sent when initiating the multipart upload. - * See {@link https://cloud.google.com/storage/docs/xml-api/post-object-multipart#request_headers| Request Headers: Initiate a Multipart Upload} - * @property {boolean} [autoAbortFailure] boolean to indicate if an in progress upload session will be automatically aborted upon failure. If not set, - * failures will be automatically aborted. - * + * The response received (if any.) + * This property is non-enumerable. */ + response; /** - * Upload a large file in chunks utilizing parallel upload opertions. If the upload fails, an uploadId and - * map containing all the successfully uploaded parts will be returned to the caller. These arguments can be used to - * resume the upload. - * - * @param {string} [filePath] The path of the file to be uploaded - * @param {UploadFileInChunksOptions} [options] Configuration options. - * @param {MultiPartHelperGenerator} [generator] A function that will return a type that implements the MPU interface. Most users will not need to use this. - * @returns {Promise} If successful a promise resolving to void, otherwise a error containing the message, uploadid, and parts map. - * - * @example - * ``` - * const {Storage} = require('@google-cloud/storage'); - * const storage = new Storage(); - * const bucket = storage.bucket('my-bucket'); - * const transferManager = new TransferManager(bucket); - * - * //- - * // Upload a large file in chunks utilizing parallel operations. - * //- - * const response = await transferManager.uploadFileInChunks('large-file.txt'); - * // Your bucket now contains: - * // - "large-file.txt" - * ``` - * - * + * Bonus property set by the throw site. */ - async uploadFileInChunks(filePath, options = {}, generator = defaultMultiPartGenerator) { - const chunkSize = options.chunkSizeBytes || UPLOAD_IN_CHUNKS_DEFAULT_CHUNK_SIZE; - const limit = (0, p_limit_1.default)(options.concurrencyLimit || DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT); - const maxQueueSize = options.maxQueueSize || - options.concurrencyLimit || - DEFAULT_PARALLEL_CHUNKED_UPLOAD_LIMIT; - const fileName = options.uploadName || path.basename(filePath); - const mpuHelper = generator(this.bucket, fileName, options.uploadId, options.partsMap); - let partNumber = 1; - let promises = []; - try { - if (options.uploadId === undefined) { - await mpuHelper.initiateUpload(options.headers); - } - const startOrResumptionByte = mpuHelper.partsMap.size * chunkSize; - const readStream = (0, fs_1.createReadStream)(filePath, { - highWaterMark: chunkSize, - start: startOrResumptionByte, - }); - // p-limit only limits the number of running promises. We do not want to hold an entire - // large file in memory at once so promises acts a queue that will hold only maxQueueSize in memory. - for await (const curChunk of readStream) { - if (promises.length >= maxQueueSize) { - await Promise.all(promises); - promises = []; - } - promises.push(limit(() => mpuHelper.uploadPart(partNumber++, curChunk, options.validation))); + details; + constructor(message, options = {}) { + super(message); + this.name = "RestError"; + this.code = options.code; + this.statusCode = options.statusCode; + // The request and response may contain sensitive information in the headers or body. + // To help prevent this sensitive information being accidentally logged, the request and response + // properties are marked as non-enumerable here. This prevents them showing up in the output of + // JSON.stringify and console.log. + Object.defineProperty(this, "request", { value: options.request, enumerable: false }); + Object.defineProperty(this, "response", { value: options.response, enumerable: false }); + // Only include useful agent information in the request for logging, as the full agent object + // may contain large binary data. + const agent = this.request?.agent + ? { + maxFreeSockets: this.request.agent.maxFreeSockets, + maxSockets: this.request.agent.maxSockets, } - await Promise.all(promises); - return await mpuHelper.completeUpload(); - } - catch (e) { - if ((options.autoAbortFailure === undefined || options.autoAbortFailure) && - mpuHelper.uploadId) { - try { - await mpuHelper.abortUpload(); - return; - } - catch (e) { - throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); - } + : undefined; + // Logging method for util.inspect in Node + Object.defineProperty(this, inspect_js_1.custom, { + value: () => { + // Extract non-enumerable properties and add them back. This is OK since in this output the request and + // response get sanitized. + return `RestError: ${this.message} \n ${errorSanitizer.sanitize({ + ...this, + request: { ...this.request, agent }, + response: this.response, + })}`; + }, + enumerable: false, + }); + Object.setPrototypeOf(this, RestError.prototype); + } +} +exports.RestError = RestError; +/** + * Typeguard for RestError + * @param e - Something caught by a catch clause. + */ +function isRestError(e) { + if (e instanceof RestError) { + return true; + } + return (0, error_js_1.isError)(e) && e.name === "RestError"; +} +//# sourceMappingURL=restError.js.map + +/***/ }), + +/***/ 12283: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.exponentialRetryStrategy = exponentialRetryStrategy; +exports.isExponentialRetryResponse = isExponentialRetryResponse; +exports.isSystemError = isSystemError; +const delay_js_1 = __nccwpck_require__(34591); +const throttlingRetryStrategy_js_1 = __nccwpck_require__(90483); +// intervals are in milliseconds +const DEFAULT_CLIENT_RETRY_INTERVAL = 1000; +const DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64; +/** + * A retry strategy that retries with an exponentially increasing delay in these two cases: + * - When there are errors in the underlying transport layer (e.g. DNS lookup failures). + * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505). + */ +function exponentialRetryStrategy(options = {}) { + const retryInterval = options.retryDelayInMs ?? DEFAULT_CLIENT_RETRY_INTERVAL; + const maxRetryInterval = options.maxRetryDelayInMs ?? DEFAULT_CLIENT_MAX_RETRY_INTERVAL; + return { + name: "exponentialRetryStrategy", + retry({ retryCount, response, responseError }) { + const matchedSystemError = isSystemError(responseError); + const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors; + const isExponential = isExponentialRetryResponse(response); + const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes; + const unknownResponse = response && ((0, throttlingRetryStrategy_js_1.isThrottlingRetryResponse)(response) || !isExponential); + if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) { + return { skipStrategy: true }; } - throw new MultiPartUploadError(e.message, mpuHelper.uploadId, mpuHelper.partsMap); - } - } - async *getPathsFromDirectory(directory) { - const filesAndSubdirectories = await fs_1.promises.readdir(directory, { - withFileTypes: true, - }); - for (const curFileOrDirectory of filesAndSubdirectories) { - const fullPath = path.join(directory, curFileOrDirectory.name); - curFileOrDirectory.isDirectory() - ? yield* this.getPathsFromDirectory(fullPath) - : yield fullPath; - } + if (responseError && !matchedSystemError && !isExponential) { + return { errorToThrow: responseError }; + } + return (0, delay_js_1.calculateRetryDelay)(retryCount, { + retryDelayInMs: retryInterval, + maxRetryDelayInMs: maxRetryInterval, + }); + }, + }; +} +/** + * A response is a retry response if it has status codes: + * - 408, or + * - Greater or equal than 500, except for 501 and 505. + */ +function isExponentialRetryResponse(response) { + return Boolean(response && + response.status !== undefined && + (response.status >= 500 || response.status === 408) && + response.status !== 501 && + response.status !== 505); +} +/** + * Determines whether an error from a pipeline response was triggered in the network layer. + */ +function isSystemError(err) { + if (!err) { + return false; } + return (err.code === "ETIMEDOUT" || + err.code === "ESOCKETTIMEDOUT" || + err.code === "ECONNREFUSED" || + err.code === "ECONNRESET" || + err.code === "ENOENT" || + err.code === "ENOTFOUND"); } -exports.TransferManager = TransferManager; - +//# sourceMappingURL=exponentialRetryStrategy.js.map /***/ }), -/***/ 59258: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 90483: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -// Copyright 2019 Google LLC -// -// 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. -var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function () { - return m[k]; - } - }; - } - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); -var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; -}); -var __importStar = this && this.__importStar || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.PassThroughShim = exports.getModuleFormat = exports.getDirName = exports.getUserAgentString = exports.getRuntimeTrackingString = exports.formatAsUTCISO = exports.convertObjKeysToSnakeCase = exports.unicodeJSONStringify = exports.objectKeyToLowercase = exports.qsStringify = exports.encodeURI = exports.fixedEncodeURIComponent = exports.objectEntries = exports.normalize = void 0; -const path = __importStar(__nccwpck_require__(71017)); -const querystring = __importStar(__nccwpck_require__(63477)); -const stream_1 = __nccwpck_require__(12781); -const url = __importStar(__nccwpck_require__(57310)); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -const package_json_helper_cjs_1 = __nccwpck_require__(28568); -// Done to avoid a problem with mangling of identifiers when using esModuleInterop -const fileURLToPath = url.fileURLToPath; -const isEsm = false; -function normalize(optionsOrCallback, cb) { - const options = typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; - const callback = typeof optionsOrCallback === 'function' ? optionsOrCallback : cb; - return { - options, - callback - }; -} -exports.normalize = normalize; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isThrottlingRetryResponse = isThrottlingRetryResponse; +exports.throttlingRetryStrategy = throttlingRetryStrategy; +const helpers_js_1 = __nccwpck_require__(59842); /** - * Flatten an object into an Array of arrays, [[key, value], ..]. - * Implements Object.entries() for Node.js <8 - * @internal + * The header that comes back from services representing + * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry). */ -function objectEntries(obj) { - return Object.keys(obj).map(key => [key, obj[key]]); -} -exports.objectEntries = objectEntries; +const RetryAfterHeader = "Retry-After"; /** - * Encode `str` with encodeURIComponent, plus these - * reserved characters: `! * ' ( )`. - * - * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent| MDN: fixedEncodeURIComponent} + * The headers that come back from services representing + * the amount of time (minimum) to wait to retry. * - * @param {string} str The URI component to encode. - * @return {string} The encoded string. + * "retry-after-ms", "x-ms-retry-after-ms" : milliseconds + * "Retry-After" : seconds or timestamp */ -function fixedEncodeURIComponent(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase()); -} -exports.fixedEncodeURIComponent = fixedEncodeURIComponent; +const AllRetryAfterHeaders = ["retry-after-ms", "x-ms-retry-after-ms", RetryAfterHeader]; /** - * URI encode `uri` for generating signed URLs, using fixedEncodeURIComponent. + * A response is a throttling retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. * - * Encode every byte except `A-Z a-Z 0-9 ~ - . _`. + * Returns the `retryAfterInMs` value if the response is a throttling retry response. + * If not throttling retry response, returns `undefined`. * - * @param {string} uri The URI to encode. - * @param [boolean=false] encodeSlash If `true`, the "/" character is not encoded. - * @return {string} The encoded string. + * @internal */ -function encodeURI(uri, encodeSlash) { - // Split the string by `/`, and conditionally rejoin them with either - // %2F if encodeSlash is `true`, or '/' if `false`. - return uri.split('/').map(fixedEncodeURIComponent).join(encodeSlash ? '%2F' : '/'); +function getRetryAfterInMs(response) { + if (!(response && [429, 503].includes(response.status))) + return undefined; + try { + // Headers: "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" + for (const header of AllRetryAfterHeaders) { + const retryAfterValue = (0, helpers_js_1.parseHeaderValueAsNumber)(response, header); + if (retryAfterValue === 0 || retryAfterValue) { + // "Retry-After" header ==> seconds + // "retry-after-ms", "x-ms-retry-after-ms" headers ==> milli-seconds + const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1; + return retryAfterValue * multiplyingFactor; // in milli-seconds + } + } + // RetryAfterHeader ("Retry-After") has a special case where it might be formatted as a date instead of a number of seconds + const retryAfterHeader = response.headers.get(RetryAfterHeader); + if (!retryAfterHeader) + return; + const date = Date.parse(retryAfterHeader); + const diff = date - Date.now(); + // negative diff would mean a date in the past, so retry asap with 0 milliseconds + return Number.isFinite(diff) ? Math.max(0, diff) : undefined; + } + catch { + return undefined; + } } -exports.encodeURI = encodeURI; /** - * Serialize an object to a URL query string using util.encodeURI(uri, true). - * @param {string} url The object to serialize. - * @return {string} Serialized string. + * A response is a retry response if it has a throttling status code (429 or 503), + * as long as one of the [ "Retry-After" or "retry-after-ms" or "x-ms-retry-after-ms" ] headers has a valid value. */ -function qsStringify(qs) { - return querystring.stringify(qs, '&', '=', { - encodeURIComponent: component => encodeURI(component, true) - }); +function isThrottlingRetryResponse(response) { + return Number.isFinite(getRetryAfterInMs(response)); } -exports.qsStringify = qsStringify; -function objectKeyToLowercase(object) { - const newObj = {}; - for (let key of Object.keys(object)) { - const value = object[key]; - key = key.toLowerCase(); - newObj[key] = value; - } - return newObj; +function throttlingRetryStrategy() { + return { + name: "throttlingRetryStrategy", + retry({ response }) { + const retryAfterInMs = getRetryAfterInMs(response); + if (!Number.isFinite(retryAfterInMs)) { + return { skipStrategy: true }; + } + return { + retryAfterInMs, + }; + }, + }; } -exports.objectKeyToLowercase = objectKeyToLowercase; +//# sourceMappingURL=throttlingRetryStrategy.js.map + +/***/ }), + +/***/ 88943: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.uint8ArrayToString = uint8ArrayToString; +exports.stringToUint8Array = stringToUint8Array; /** - * JSON encode str, with unicode \u+ representation. - * @param {object} obj The object to encode. - * @return {string} Serialized string. + * The helper that transforms bytes with specific character encoding into string + * @param bytes - the uint8array bytes + * @param format - the format we use to encode the byte + * @returns a string of the encoded string */ -function unicodeJSONStringify(obj) { - return JSON.stringify(obj).replace(/[\u0080-\uFFFF]/g, char => '\\u' + ('0000' + char.charCodeAt(0).toString(16)).slice(-4)); +function uint8ArrayToString(bytes, format) { + return Buffer.from(bytes).toString(format); } -exports.unicodeJSONStringify = unicodeJSONStringify; /** - * Converts the given objects keys to snake_case - * @param {object} obj object to convert keys to snake case. - * @returns {object} object with keys converted to snake case. + * The helper that transforms string to specific character encoded bytes array. + * @param value - the string to be converted + * @param format - the format we use to decode the value + * @returns a uint8array */ -function convertObjKeysToSnakeCase(obj) { - if (obj instanceof Date || obj instanceof RegExp) { - return obj; - } - if (Array.isArray(obj)) { - return obj.map(convertObjKeysToSnakeCase); - } - if (obj instanceof Object) { - return Object.keys(obj).reduce((acc, cur) => { - const s = cur[0].toLocaleLowerCase() + cur.slice(1).replace(/([A-Z]+)/g, (match, p1) => { - return `_${p1.toLowerCase()}`; - }); - acc[s] = convertObjKeysToSnakeCase(obj[cur]); - return acc; - }, Object()); - } - return obj; +function stringToUint8Array(value, format) { + return Buffer.from(value, format); } -exports.convertObjKeysToSnakeCase = convertObjKeysToSnakeCase; +//# sourceMappingURL=bytesEncoding.js.map + +/***/ }), + +/***/ 94121: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isReactNative = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isDeno = exports.isWebWorker = exports.isBrowser = void 0; /** - * Formats the provided date object as a UTC ISO string. - * @param {Date} dateTimeToFormat date object to be formatted. - * @param {boolean} includeTime flag to include hours, minutes, seconds in output. - * @param {string} dateDelimiter delimiter between date components. - * @param {string} timeDelimiter delimiter between time components. - * @returns {string} UTC ISO format of provided date obect. + * A constant that indicates whether the environment the code is running is a Web Browser. */ -function formatAsUTCISO(dateTimeToFormat, includeTime = false, dateDelimiter = '', timeDelimiter = '') { - const year = dateTimeToFormat.getUTCFullYear(); - const month = dateTimeToFormat.getUTCMonth() + 1; - const day = dateTimeToFormat.getUTCDate(); - const hour = dateTimeToFormat.getUTCHours(); - const minute = dateTimeToFormat.getUTCMinutes(); - const second = dateTimeToFormat.getUTCSeconds(); - let resultString = `${year.toString().padStart(4, '0')}${dateDelimiter}${month.toString().padStart(2, '0')}${dateDelimiter}${day.toString().padStart(2, '0')}`; - if (includeTime) { - resultString = `${resultString}T${hour.toString().padStart(2, '0')}${timeDelimiter}${minute.toString().padStart(2, '0')}${timeDelimiter}${second.toString().padStart(2, '0')}Z`; - } - return resultString; -} -exports.formatAsUTCISO = formatAsUTCISO; +// eslint-disable-next-line @azure/azure-sdk/ts-no-window +exports.isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; /** - * Examines the runtime environment and returns the appropriate tracking string. - * @returns {string} metrics tracking string based on the current runtime environment. + * A constant that indicates whether the environment the code is running is a Web Worker. */ -function getRuntimeTrackingString() { - if ( - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - globalThis.Deno && - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - globalThis.Deno.version && - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - globalThis.Deno.version.deno) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - return `gl-deno/${globalThis.Deno.version.deno}`; - } else { - return `gl-node/${process.versions.node}`; - } -} -exports.getRuntimeTrackingString = getRuntimeTrackingString; +exports.isWebWorker = typeof self === "object" && + typeof self?.importScripts === "function" && + (self.constructor?.name === "DedicatedWorkerGlobalScope" || + self.constructor?.name === "ServiceWorkerGlobalScope" || + self.constructor?.name === "SharedWorkerGlobalScope"); /** - * Looks at package.json and creates the user-agent string to be applied to request headers. - * @returns {string} user agent string. + * A constant that indicates whether the environment the code is running is Deno. */ -function getUserAgentString() { - const pkg = (0, package_json_helper_cjs_1.getPackageJSON)(); - const hyphenatedPackageName = pkg.name.replace('@google-cloud', 'gcloud-node') // For legacy purposes. - .replace('/', '-'); // For UA spec-compliance purposes. - return hyphenatedPackageName + '/' + pkg.version; -} -exports.getUserAgentString = getUserAgentString; -function getDirName() { - let dirToUse = ''; - try { - dirToUse = __dirname; - } catch (e) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - dirToUse = __dirname; - } - return dirToUse; +exports.isDeno = typeof Deno !== "undefined" && + typeof Deno.version !== "undefined" && + typeof Deno.version.deno !== "undefined"; +/** + * A constant that indicates whether the environment the code is running is Bun.sh. + */ +exports.isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined"; +/** + * A constant that indicates whether the environment the code is running is a Node.js compatible environment. + */ +exports.isNodeLike = typeof globalThis.process !== "undefined" && + Boolean(globalThis.process.version) && + Boolean(globalThis.process.versions?.node); +/** + * A constant that indicates whether the environment the code is running is Node.JS. + */ +exports.isNodeRuntime = exports.isNodeLike && !exports.isBun && !exports.isDeno; +/** + * A constant that indicates whether the environment the code is running is in React-Native. + */ +// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js +exports.isReactNative = typeof navigator !== "undefined" && navigator?.product === "ReactNative"; +//# sourceMappingURL=checkEnvironment.js.map + +/***/ }), + +/***/ 96494: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.concat = concat; +const stream_1 = __nccwpck_require__(12781); +const typeGuards_js_1 = __nccwpck_require__(61580); +async function* streamAsyncIterator() { + const reader = this.getReader(); + try { + while (true) { + const { done, value } = await reader.read(); + if (done) { + return; + } + yield value; + } + } + finally { + reader.releaseLock(); + } } -exports.getDirName = getDirName; -function getModuleFormat() { - return isEsm ? 'ESM' : 'CJS'; +function makeAsyncIterable(webStream) { + if (!webStream[Symbol.asyncIterator]) { + webStream[Symbol.asyncIterator] = streamAsyncIterator.bind(webStream); + } + if (!webStream.values) { + webStream.values = streamAsyncIterator.bind(webStream); + } } -exports.getModuleFormat = getModuleFormat; -class PassThroughShim extends stream_1.PassThrough { - constructor() { - super(...arguments); - this.shouldEmitReading = true; - this.shouldEmitWriting = true; - } - _read(size) { - if (this.shouldEmitReading) { - this.emit('reading'); - this.shouldEmitReading = false; +function ensureNodeStream(stream) { + if (stream instanceof ReadableStream) { + makeAsyncIterable(stream); + return stream_1.Readable.fromWeb(stream); } - super._read(size); - } - _write(chunk, encoding, callback) { - if (this.shouldEmitWriting) { - this.emit('writing'); - this.shouldEmitWriting = false; + else { + return stream; } - // Per the nodejs documention, callback must be invoked on the next tick - process.nextTick(() => { - super._write(chunk, encoding, callback); - }); - } - _final(callback) { - // If the stream is empty (i.e. empty file) final will be invoked before _read / _write - // and we should still emit the proper events. - if (this.shouldEmitReading) { - this.emit('reading'); - this.shouldEmitReading = false; +} +function toStream(source) { + if (source instanceof Uint8Array) { + return stream_1.Readable.from(Buffer.from(source)); } - if (this.shouldEmitWriting) { - this.emit('writing'); - this.shouldEmitWriting = false; + else if ((0, typeGuards_js_1.isBlob)(source)) { + return ensureNodeStream(source.stream()); + } + else { + return ensureNodeStream(source); } - callback(null); - } } -exports.PassThroughShim = PassThroughShim; +/** + * Utility function that concatenates a set of binary inputs into one combined output. + * + * @param sources - array of sources for the concatenation + * @returns - in Node, a (() =\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs. + * In browser, returns a `Blob` representing all the concatenated inputs. + * + * @internal + */ +async function concat(sources) { + return function () { + const streams = sources.map((x) => (typeof x === "function" ? x() : x)).map(toStream); + return stream_1.Readable.from((async function* () { + for (const stream of streams) { + for await (const chunk of stream) { + yield chunk; + } + } + })()); + }; +} +//# sourceMappingURL=concat.js.map + +/***/ }), + +/***/ 34591: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.calculateRetryDelay = calculateRetryDelay; +const random_js_1 = __nccwpck_require__(25042); +/** + * Calculates the delay interval for retry attempts using exponential delay with jitter. + * @param retryAttempt - The current retry attempt number. + * @param config - The exponential retry configuration. + * @returns An object containing the calculated retry delay. + */ +function calculateRetryDelay(retryAttempt, config) { + // Exponentially increase the delay each time + const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt); + // Don't let the delay exceed the maximum + const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay); + // Allow the final value to have some "jitter" (within 50% of the delay size) so + // that retries across multiple clients don't occur simultaneously. + const retryAfterInMs = clampedDelay / 2 + (0, random_js_1.getRandomIntegerInclusive)(0, clampedDelay / 2); + return { retryAfterInMs }; +} +//# sourceMappingURL=delay.js.map /***/ }), -/***/ 95430: -/***/ ((module) => { +/***/ 13742: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/* - * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). +"use strict"; + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isError = isError; +const object_js_1 = __nccwpck_require__(7088); +/** + * Typeguard for an error object shape (has name and message) + * @param e - Something caught by a catch clause. */ -/******/ (() => { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ +function isError(e) { + if ((0, object_js_1.isObject)(e)) { + const hasName = typeof e.name === "string"; + const hasMessage = typeof e.message === "string"; + return hasName && hasMessage; + } + return false; +} +//# sourceMappingURL=error.js.map + +/***/ }), + +/***/ 59842: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/***/ "./node_modules/strnum/strnum.js": -/*!***************************************!*\ - !*** ./node_modules/strnum/strnum.js ***! - \***************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ toNumber)\n/* harmony export */ });\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)([0-9]*(\\.[0-9]*)?)$/;\n// const octRegex = /^0x[a-z0-9]+/;\n// const binRegex = /0x[a-z0-9]+/;\n\n \nconst consider = {\n hex : true,\n // oct: false,\n leadingZeros: true,\n decimalPoint: \"\\.\",\n eNotation: true,\n //skipLike: /regex/\n};\n\nfunction toNumber(str, options = {}){\n options = Object.assign({}, consider, options );\n if(!str || typeof str !== \"string\" ) return str;\n \n let trimmedStr = str.trim();\n \n if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str;\n else if(str===\"0\") return 0;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return parse_int(trimmedStr, 16);\n // }else if (options.oct && octRegex.test(str)) {\n // return Number.parseInt(val, 8);\n }else if (trimmedStr.search(/[eE]/)!== -1) { //eNotation\n const notation = trimmedStr.match(/^([-\\+])?(0*)([0-9]*(\\.[0-9]*)?[eE][-\\+]?[0-9]+)$/); \n // +00.123 => [ , '+', '00', '.123', ..\n if(notation){\n // console.log(notation)\n if(options.leadingZeros){ //accept with leading zeros\n trimmedStr = (notation[1] || \"\") + notation[3];\n }else{\n if(notation[2] === \"0\" && notation[3][0]=== \".\"){ //valid number\n }else{\n return str;\n }\n }\n return options.eNotation ? Number(trimmedStr) : str;\n }else{\n return str;\n }\n // }else if (options.parseBin && binRegex.test(str)) {\n // return Number.parseInt(val, 2);\n }else{\n //separate negative sign, leading zeros, and rest number\n const match = numRegex.exec(trimmedStr);\n // +00.123 => [ , '+', '00', '.123', ..\n if(match){\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros\n //trim ending zeros for floating number\n \n if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str; //-0123\n else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str; //0123\n else if(options.leadingZeros && leadingZeros===str) return 0; //00\n \n else{//no leading zeros or leading zeros are allowed\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n\n if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation\n if(options.eNotation) return num;\n else return str;\n }else if(trimmedStr.indexOf(\".\") !== -1){ //floating number\n if(numStr === \"0\" && (numTrimmedByZeros === \"\") ) return num; //0.0\n else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000\n else if( sign && numStr === \"-\"+numTrimmedByZeros) return num;\n else return str;\n }\n \n if(leadingZeros){\n return (numTrimmedByZeros === numStr) || (sign+numTrimmedByZeros === numStr) ? num : str\n }else {\n return (trimmedStr === numStr) || (trimmedStr === sign+numStr) ? num : str\n }\n }\n }else{ //non-numeric string\n return str;\n }\n }\n}\n\n/**\n * \n * @param {string} numStr without leading zeros\n * @returns \n */\nfunction trimZeros(numStr){\n if(numStr && numStr.indexOf(\".\") !== -1){//float\n numStr = numStr.replace(/0+$/, \"\"); //remove ending zeros\n if(numStr === \".\") numStr = \"0\";\n else if(numStr[0] === \".\") numStr = \"0\"+numStr;\n else if(numStr[numStr.length-1] === \".\") numStr = numStr.substr(0,numStr.length-1);\n return numStr;\n }\n return numStr;\n}\n\nfunction parse_int(numStr, base){\n //polyfill\n if(parseInt) return parseInt(numStr, base);\n else if(Number.parseInt) return Number.parseInt(numStr, base);\n else if(window && window.parseInt) return window.parseInt(numStr, base);\n else throw new Error(\"parseInt, Number.parseInt, window.parseInt are not supported\")\n}\n\n//# sourceURL=webpack://fast-xml-parser/./node_modules/strnum/strnum.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.delay = delay; +exports.parseHeaderValueAsNumber = parseHeaderValueAsNumber; +const AbortError_js_1 = __nccwpck_require__(72033); +const StandardAbortMessage = "The operation was aborted."; +/** + * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. + * @param delayInMs - The number of milliseconds to be delayed. + * @param value - The value to be resolved with after a timeout of t milliseconds. + * @param options - The options for delay - currently abort options + * - abortSignal - The abortSignal associated with containing operation. + * - abortErrorMsg - The abort error message associated with containing operation. + * @returns Resolved promise + */ +function delay(delayInMs, value, options) { + return new Promise((resolve, reject) => { + let timer = undefined; + let onAborted = undefined; + const rejectOnAbort = () => { + return reject(new AbortError_js_1.AbortError(options?.abortErrorMsg ? options?.abortErrorMsg : StandardAbortMessage)); + }; + const removeListeners = () => { + if (options?.abortSignal && onAborted) { + options.abortSignal.removeEventListener("abort", onAborted); + } + }; + onAborted = () => { + if (timer) { + clearTimeout(timer); + } + removeListeners(); + return rejectOnAbort(); + }; + if (options?.abortSignal && options.abortSignal.aborted) { + return rejectOnAbort(); + } + timer = setTimeout(() => { + removeListeners(); + resolve(value); + }, delayInMs); + if (options?.abortSignal) { + options.abortSignal.addEventListener("abort", onAborted); + } + }); +} +/** + * @internal + * @returns the parsed value or undefined if the parsed value is invalid. + */ +function parseHeaderValueAsNumber(response, headerName) { + const value = response.headers.get(headerName); + if (!value) + return; + const valueAsNum = Number(value); + if (Number.isNaN(valueAsNum)) + return; + return valueAsNum; +} +//# sourceMappingURL=helpers.js.map /***/ }), -/***/ "./src/fxp.js": -/*!********************!*\ - !*** ./src/fxp.js ***! - \********************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 52728: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ XMLBuilder: () => (/* reexport safe */ _xmlbuilder_json2xml_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ XMLParser: () => (/* reexport safe */ _xmlparser_XMLParser_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ XMLValidator: () => (/* binding */ XMLValidator)\n/* harmony export */ });\n/* harmony import */ var _validator_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./validator.js */ \"./src/validator.js\");\n/* harmony import */ var _xmlparser_XMLParser_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ./xmlparser/XMLParser.js */ \"./src/xmlparser/XMLParser.js\");\n/* harmony import */ var _xmlbuilder_json2xml_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(/*! ./xmlbuilder/json2xml.js */ \"./src/xmlbuilder/json2xml.js\");\n\n\n\n\n\n\nconst XMLValidator = {\n validate: _validator_js__WEBPACK_IMPORTED_MODULE_0__.validate\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/fxp.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.custom = void 0; +const node_util_1 = __nccwpck_require__(47261); +exports.custom = node_util_1.inspect.custom; +//# sourceMappingURL=inspect.js.map /***/ }), -/***/ "./src/ignoreAttributes.js": -/*!*********************************!*\ - !*** ./src/ignoreAttributes.js ***! - \*********************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 68152: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ getIgnoreAttributesFn)\n/* harmony export */ });\nfunction getIgnoreAttributesFn(ignoreAttributes) {\n if (typeof ignoreAttributes === 'function') {\n return ignoreAttributes\n }\n if (Array.isArray(ignoreAttributes)) {\n return (attrName) => {\n for (const pattern of ignoreAttributes) {\n if (typeof pattern === 'string' && attrName === pattern) {\n return true\n }\n if (pattern instanceof RegExp && pattern.test(attrName)) {\n return true\n }\n }\n }\n }\n return () => false\n}\n\n//# sourceURL=webpack://fast-xml-parser/./src/ignoreAttributes.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Sanitizer = exports.uint8ArrayToString = exports.stringToUint8Array = exports.isWebWorker = exports.isReactNative = exports.isDeno = exports.isNodeRuntime = exports.isNodeLike = exports.isBun = exports.isBrowser = exports.randomUUID = exports.computeSha256Hmac = exports.computeSha256Hash = exports.isError = exports.isObject = exports.getRandomIntegerInclusive = exports.calculateRetryDelay = void 0; +var delay_js_1 = __nccwpck_require__(34591); +Object.defineProperty(exports, "calculateRetryDelay", ({ enumerable: true, get: function () { return delay_js_1.calculateRetryDelay; } })); +var random_js_1 = __nccwpck_require__(25042); +Object.defineProperty(exports, "getRandomIntegerInclusive", ({ enumerable: true, get: function () { return random_js_1.getRandomIntegerInclusive; } })); +var object_js_1 = __nccwpck_require__(7088); +Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return object_js_1.isObject; } })); +var error_js_1 = __nccwpck_require__(13742); +Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return error_js_1.isError; } })); +var sha256_js_1 = __nccwpck_require__(70017); +Object.defineProperty(exports, "computeSha256Hash", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hash; } })); +Object.defineProperty(exports, "computeSha256Hmac", ({ enumerable: true, get: function () { return sha256_js_1.computeSha256Hmac; } })); +var uuidUtils_js_1 = __nccwpck_require__(2339); +Object.defineProperty(exports, "randomUUID", ({ enumerable: true, get: function () { return uuidUtils_js_1.randomUUID; } })); +var checkEnvironment_js_1 = __nccwpck_require__(94121); +Object.defineProperty(exports, "isBrowser", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBrowser; } })); +Object.defineProperty(exports, "isBun", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isBun; } })); +Object.defineProperty(exports, "isNodeLike", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeLike; } })); +Object.defineProperty(exports, "isNodeRuntime", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isNodeRuntime; } })); +Object.defineProperty(exports, "isDeno", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isDeno; } })); +Object.defineProperty(exports, "isReactNative", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isReactNative; } })); +Object.defineProperty(exports, "isWebWorker", ({ enumerable: true, get: function () { return checkEnvironment_js_1.isWebWorker; } })); +var bytesEncoding_js_1 = __nccwpck_require__(88943); +Object.defineProperty(exports, "stringToUint8Array", ({ enumerable: true, get: function () { return bytesEncoding_js_1.stringToUint8Array; } })); +Object.defineProperty(exports, "uint8ArrayToString", ({ enumerable: true, get: function () { return bytesEncoding_js_1.uint8ArrayToString; } })); +var sanitizer_js_1 = __nccwpck_require__(61416); +Object.defineProperty(exports, "Sanitizer", ({ enumerable: true, get: function () { return sanitizer_js_1.Sanitizer; } })); +//# sourceMappingURL=internal.js.map /***/ }), -/***/ "./src/util.js": -/*!*********************!*\ - !*** ./src/util.js ***! - \*********************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 7088: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ getAllMatches: () => (/* binding */ getAllMatches),\n/* harmony export */ getValue: () => (/* binding */ getValue),\n/* harmony export */ isEmptyObject: () => (/* binding */ isEmptyObject),\n/* harmony export */ isExist: () => (/* binding */ isExist),\n/* harmony export */ isName: () => (/* binding */ isName),\n/* harmony export */ merge: () => (/* binding */ merge),\n/* harmony export */ nameRegexp: () => (/* binding */ nameRegexp)\n/* harmony export */ });\n\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*';\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nfunction getAllMatches(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n}\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n}\n\nfunction isExist(v) {\n return typeof v !== 'undefined';\n}\n\nfunction isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nfunction merge(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n}\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nfunction getValue(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n}\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\n//# sourceURL=webpack://fast-xml-parser/./src/util.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isObject = isObject; +/** + * Helper to determine when an input is a generic JS object. + * @returns true when input is an object type that is not null, Array, RegExp, or Date. + */ +function isObject(input) { + return (typeof input === "object" && + input !== null && + !Array.isArray(input) && + !(input instanceof RegExp) && + !(input instanceof Date)); +} +//# sourceMappingURL=object.js.map /***/ }), -/***/ "./src/validator.js": -/*!**************************!*\ - !*** ./src/validator.js ***! - \**************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 25042: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ validate: () => (/* binding */ validate)\n/* harmony export */ });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./util.js */ \"./src/util.js\");\n\n\n\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n unpairedTags: []\n};\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nfunction validate(xmlData, options) {\n options = Object.assign({}, defaultOptions, options);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/()/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n \n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\"+tagName+\"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\"+tagName+\"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\"+otg.tagName+\"' (opened in line \"+openPos.line+\", col \"+openPos.col+\") instead of closing tag '\"+tagName+\"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else if(options.unpairedTags.indexOf(tagName) !== -1){\n //don't push into stack\n } else {\n tags.push({tagName, tagStartPos});\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }else{\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject('InvalidXml', \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if ( isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n }else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\"+tags[0].tagName+\"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n }else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '')+\n \"' found.\", {line: 1, col: 1});\n }\n\n return true;\n};\n\nfunction isWhiteSpace(char){\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n}\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.getAllMatches)(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isName)(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isName)(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/validator.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRandomIntegerInclusive = getRandomIntegerInclusive; +/** + * Returns a random integer value between a lower and upper bound, + * inclusive of both bounds. + * Note that this uses Math.random and isn't secure. If you need to use + * this for any kind of security purpose, find a better source of random. + * @param min - The smallest integer value allowed. + * @param max - The largest integer value allowed. + */ +function getRandomIntegerInclusive(min, max) { + // Make sure inputs are integers. + min = Math.ceil(min); + max = Math.floor(max); + // Pick a random offset from zero to the size of the range. + // Since Math.random() can never return 1, we have to make the range one larger + // in order to be inclusive of the maximum value after we take the floor. + const offset = Math.floor(Math.random() * (max - min + 1)); + return offset + min; +} +//# sourceMappingURL=random.js.map /***/ }), -/***/ "./src/xmlbuilder/json2xml.js": -/*!************************************!*\ - !*** ./src/xmlbuilder/json2xml.js ***! - \************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 61416: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Builder)\n/* harmony export */ });\n/* harmony import */ var _orderedJs2Xml_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./orderedJs2Xml.js */ \"./src/xmlbuilder/orderedJs2Xml.js\");\n/* harmony import */ var _ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ../ignoreAttributes.js */ \"./src/ignoreAttributes.js\");\n\n//parse Empty Node as self closing node\n\n\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.ignoreAttributesFn = (0,_ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this.options.ignoreAttributes)\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return (0,_orderedJs2Xml_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0, []).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level, ajPath) {\n let attrStr = '';\n let val = '';\n const jPath = ajPath.join('.')\n for (let key in jObj) {\n if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node only if it is not an attribute\n if (this.isAttribute(key)) {\n val += '';\n }\n } else if (jObj[key] === null) {\n // null attribute should be ignored by the attribute list, but should not cause the tag closing\n if (this.isAttribute(key)) {\n val += '';\n } else if (key === this.options.cdataPropName) {\n val += '';\n } else if (key[0] === '?') {\n val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n }\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr && !this.ignoreAttributesFn(attr, jPath)) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n } else if (!attr) {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if(this.options.oneListGroup){\n const result = this.j2x(item, level + 1, ajPath.concat(key));\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr\n }\n }else{\n listTagVal += this.processTextOrObjNode(item, key, level, ajPath)\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n }\n if(this.options.oneListGroup){\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level, ajPath)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nBuilder.prototype.buildAttrPairStr = function(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level, ajPath) {\n const result = this.j2x(object, level + 1, ajPath.concat(key));\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function(val, key, attrStr, level) {\n if(val === \"\"){\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n }else{\n\n let tagEndExp = '' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n }\n}\n\nBuilder.prototype.closeTag = function(key){\n let closeTag = \"\";\n if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(!this.options.suppressUnpairedNode) closeTag = \"/\"\n }else if(this.options.suppressEmptyNode){ //empty\n closeTag = \"/\";\n }else{\n closeTag = `>` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if(key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; \n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === ''){\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n ' 0 && this.options.processEntities){\n for (let i=0; i n.toLowerCase())); + this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase())); + } + /** + * Sanitizes an object for logging. + * @param obj - The object to sanitize + * @returns - The sanitized object as a string + */ + sanitize(obj) { + const seen = new Set(); + return JSON.stringify(obj, (key, value) => { + // Ensure Errors include their interesting non-enumerable members + if (value instanceof Error) { + return { + ...value, + name: value.name, + message: value.message, + }; + } + if (key === "headers") { + return this.sanitizeHeaders(value); + } + else if (key === "url") { + return this.sanitizeUrl(value); + } + else if (key === "query") { + return this.sanitizeQuery(value); + } + else if (key === "body") { + // Don't log the request body + return undefined; + } + else if (key === "response") { + // Don't log response again + return undefined; + } + else if (key === "operationSpec") { + // When using sendOperationRequest, the request carries a massive + // field with the autorest spec. No need to log it. + return undefined; + } + else if (Array.isArray(value) || (0, object_js_1.isObject)(value)) { + if (seen.has(value)) { + return "[Circular]"; + } + seen.add(value); + } + return value; + }, 2); + } + /** + * Sanitizes a URL for logging. + * @param value - The URL to sanitize + * @returns - The sanitized URL as a string + */ + sanitizeUrl(value) { + if (typeof value !== "string" || value === null || value === "") { + return value; + } + const url = new URL(value); + if (!url.search) { + return value; + } + for (const [key] of url.searchParams) { + if (!this.allowedQueryParameters.has(key.toLowerCase())) { + url.searchParams.set(key, RedactedString); + } + } + return url.toString(); + } + sanitizeHeaders(obj) { + const sanitized = {}; + for (const key of Object.keys(obj)) { + if (this.allowedHeaderNames.has(key.toLowerCase())) { + sanitized[key] = obj[key]; + } + else { + sanitized[key] = RedactedString; + } + } + return sanitized; + } + sanitizeQuery(value) { + if (typeof value !== "object" || value === null) { + return value; + } + const sanitized = {}; + for (const k of Object.keys(value)) { + if (this.allowedQueryParameters.has(k.toLowerCase())) { + sanitized[k] = value[k]; + } + else { + sanitized[k] = RedactedString; + } + } + return sanitized; + } +} +exports.Sanitizer = Sanitizer; +//# sourceMappingURL=sanitizer.js.map /***/ }), -/***/ "./src/xmlbuilder/orderedJs2Xml.js": -/*!*****************************************!*\ - !*** ./src/xmlbuilder/orderedJs2Xml.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 70017: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ toXml)\n/* harmony export */ });\nconst EOL = \"\\n\";\n\n/**\n * \n * @param {array} jArray \n * @param {any} options \n * @returns \n */\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\n\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if(tagName === undefined) continue;\n\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n\n return xmlStr;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(!obj.hasOwnProperty(key)) continue;\n if (key !== \":@\") return key;\n }\n}\n\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if(!attrMap.hasOwnProperty(attr)) continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlbuilder/orderedJs2Xml.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.computeSha256Hmac = computeSha256Hmac; +exports.computeSha256Hash = computeSha256Hash; +const node_crypto_1 = __nccwpck_require__(6005); +/** + * Generates a SHA-256 HMAC signature. + * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash. + * @param stringToSign - The data to be signed. + * @param encoding - The textual encoding to use for the returned HMAC digest. + */ +async function computeSha256Hmac(key, stringToSign, encoding) { + const decodedKey = Buffer.from(key, "base64"); + return (0, node_crypto_1.createHmac)("sha256", decodedKey).update(stringToSign).digest(encoding); +} +/** + * Generates a SHA-256 hash. + * @param content - The data to be included in the hash. + * @param encoding - The textual encoding to use for the returned hash. + */ +async function computeSha256Hash(content, encoding) { + return (0, node_crypto_1.createHash)("sha256").update(content).digest(encoding); +} +//# sourceMappingURL=sha256.js.map /***/ }), -/***/ "./src/xmlparser/DocTypeReader.js": -/*!****************************************!*\ - !*** ./src/xmlparser/DocTypeReader.js ***! - \****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 61580: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ readDocType)\n/* harmony export */ });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ../util.js */ \"./src/util.js\");\n\n\n//TODO: handle comments\nfunction readDocType(xmlData, i){\n \n const entities = {};\n if( xmlData[i + 3] === 'O' &&\n xmlData[i + 4] === 'C' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'Y' &&\n xmlData[i + 7] === 'P' &&\n xmlData[i + 8] === 'E')\n { \n i = i+9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for(;i') { //Read tag content\n if(comment){\n if( xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\"){\n comment = false;\n angleBracketsCount--;\n }\n }else{\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n }else if( xmlData[i] === '['){\n hasBody = true;\n }else{\n exp += xmlData[i];\n }\n }\n if(angleBracketsCount !== 0){\n throw new Error(`Unclosed DOCTYPE`);\n }\n }else{\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return {entities, i};\n}\n\nfunction readEntityExp(xmlData,i){\n //External entities are not supported\n // \n\n //Parameter entities are not supported\n // \n\n //Internal entities are supported\n // \n \n //read EntityName\n let entityName = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"' ); i++) {\n // if(xmlData[i] === \" \") continue;\n // else \n entityName += xmlData[i];\n }\n entityName = entityName.trim();\n if(entityName.indexOf(\" \") !== -1) throw new Error(\"External entites are not supported\");\n\n //read Entity Value\n const startChar = xmlData[i++];\n let val = \"\"\n for (; i < xmlData.length && xmlData[i] !== startChar ; i++) {\n val += xmlData[i];\n }\n return [entityName, val, i];\n}\n\nfunction isComment(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === '-' &&\n xmlData[i+3] === '-') return true\n return false\n}\nfunction isEntity(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'N' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'I' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'Y') return true\n return false\n}\nfunction isElement(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'E' &&\n xmlData[i+3] === 'L' &&\n xmlData[i+4] === 'E' &&\n xmlData[i+5] === 'M' &&\n xmlData[i+6] === 'E' &&\n xmlData[i+7] === 'N' &&\n xmlData[i+8] === 'T') return true\n return false\n}\n\nfunction isAttlist(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'A' &&\n xmlData[i+3] === 'T' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'L' &&\n xmlData[i+6] === 'I' &&\n xmlData[i+7] === 'S' &&\n xmlData[i+8] === 'T') return true\n return false\n}\nfunction isNotation(xmlData, i){\n if(xmlData[i+1] === '!' &&\n xmlData[i+2] === 'N' &&\n xmlData[i+3] === 'O' &&\n xmlData[i+4] === 'T' &&\n xmlData[i+5] === 'A' &&\n xmlData[i+6] === 'T' &&\n xmlData[i+7] === 'I' &&\n xmlData[i+8] === 'O' &&\n xmlData[i+9] === 'N') return true\n return false\n}\n\nfunction validateEntityName(name){\n if ((0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isName)(name))\n\treturn name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/DocTypeReader.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isNodeReadableStream = isNodeReadableStream; +exports.isWebReadableStream = isWebReadableStream; +exports.isBinaryBody = isBinaryBody; +exports.isReadableStream = isReadableStream; +exports.isBlob = isBlob; +function isNodeReadableStream(x) { + return Boolean(x && typeof x["pipe"] === "function"); +} +function isWebReadableStream(x) { + return Boolean(x && + typeof x.getReader === "function" && + typeof x.tee === "function"); +} +function isBinaryBody(body) { + return (body !== undefined && + (body instanceof Uint8Array || + isReadableStream(body) || + typeof body === "function" || + body instanceof Blob)); +} +function isReadableStream(x) { + return isNodeReadableStream(x) || isWebReadableStream(x); +} +function isBlob(x) { + return typeof x.stream === "function"; +} +//# sourceMappingURL=typeGuards.js.map /***/ }), -/***/ "./src/xmlparser/OptionsBuilder.js": -/*!*****************************************!*\ - !*** ./src/xmlparser/OptionsBuilder.js ***! - \*****************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 8192: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ buildOptions: () => (/* binding */ buildOptions),\n/* harmony export */ defaultOptions: () => (/* binding */ defaultOptions)\n/* harmony export */ });\n\nconst defaultOptions = {\n preserveOrder: false,\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n removeNSPrefix: false, // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val) {\n return val;\n },\n attributeValueProcessor: function(attrName, val) {\n return val;\n },\n stopNodes: [], //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs){\n return tagName\n },\n // skipEmptyListItem: false\n};\n \nconst buildOptions = function(options) {\n return Object.assign({}, defaultOptions, options);\n};\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/OptionsBuilder.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUserAgentHeaderName = getUserAgentHeaderName; +exports.getUserAgentValue = getUserAgentValue; +const userAgentPlatform_js_1 = __nccwpck_require__(76576); +const constants_js_1 = __nccwpck_require__(58463); +function getUserAgentString(telemetryInfo) { + const parts = []; + for (const [key, value] of telemetryInfo) { + const token = value ? `${key}/${value}` : key; + parts.push(token); + } + return parts.join(" "); +} +/** + * @internal + */ +function getUserAgentHeaderName() { + return (0, userAgentPlatform_js_1.getHeaderName)(); +} +/** + * @internal + */ +async function getUserAgentValue(prefix) { + const runtimeInfo = new Map(); + runtimeInfo.set("ts-http-runtime", constants_js_1.SDK_VERSION); + await (0, userAgentPlatform_js_1.setPlatformSpecificData)(runtimeInfo); + const defaultAgent = getUserAgentString(runtimeInfo); + const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent; + return userAgentValue; +} +//# sourceMappingURL=userAgent.js.map /***/ }), -/***/ "./src/xmlparser/OrderedObjParser.js": -/*!*******************************************!*\ - !*** ./src/xmlparser/OrderedObjParser.js ***! - \*******************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 76576: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ OrderedObjParser)\n/* harmony export */ });\n/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ../util.js */ \"./src/util.js\");\n/* harmony import */ var _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ./xmlNode.js */ \"./src/xmlparser/xmlNode.js\");\n/* harmony import */ var _DocTypeReader_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(/*! ./DocTypeReader.js */ \"./src/xmlparser/DocTypeReader.js\");\n/* harmony import */ var strnum__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(/*! strnum */ \"./node_modules/strnum/strnum.js\");\n/* harmony import */ var _ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(/*! ../ignoreAttributes.js */ \"./src/ignoreAttributes.js\");\n\n///@ts-check\n\n\n\n\n\n\n\n// const regx =\n// '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n// .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\nclass OrderedObjParser{\n constructor(options){\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\" : { regex: /&(apos|#39|#x27);/g, val : \"'\"},\n \"gt\" : { regex: /&(gt|#62|#x3E);/g, val : \">\"},\n \"lt\" : { regex: /&(lt|#60|#x3C);/g, val : \"<\"},\n \"quot\" : { regex: /&(quot|#34|#x22);/g, val : \"\\\"\"},\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : \"&\"};\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\" : { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\" : { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\" : { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\" : { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\" : { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\" : { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\" : { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val : (_, str) => String.fromCodePoint(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val : (_, str) => String.fromCodePoint(Number.parseInt(str, 16)) },\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n this.ignoreAttributesFn = (0,_ignoreAttributes_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.options.ignoreAttributes)\n }\n\n}\n\nfunction addExternalEntities(externalEntities){\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\"+ent+\";\",\"g\"),\n val : externalEntities[ent]\n }\n }\n}\n\n/**\n * @param {string} val\n * @param {string} tagName\n * @param {string} jPath\n * @param {boolean} dontTrim\n * @param {boolean} hasAttributes\n * @param {boolean} isLeafNode\n * @param {boolean} escapeEntities\n */\nfunction parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val !== undefined) {\n if (this.options.trimValues && !dontTrim) {\n val = val.trim();\n }\n if(val.length > 0){\n if(!escapeEntities) val = this.replaceEntitiesValue(val);\n \n const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);\n if(newval === null || newval === undefined){\n //don't parse\n return val;\n }else if(typeof newval !== typeof val || newval !== val){\n //overwrite\n return newval;\n }else if(this.options.trimValues){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n const trimmedVal = val.trim();\n if(trimmedVal === val){\n return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);\n }else{\n return val;\n }\n }\n }\n }\n}\n\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])([\\\\s\\\\S]*?)\\\\3)?', 'gm');\n\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (this.options.ignoreAttributes !== true && typeof attrStr === 'string') {\n // attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.getAllMatches)(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n if (this.ignoreAttributesFn(attrName, jPath)) {\n continue\n }\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if(aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== undefined) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if(newVal === null || newVal === undefined){\n //don't parse\n attrs[aName] = oldVal;\n }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){\n //overwrite\n attrs[aName] = newVal;\n }else{\n //parse\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs\n }\n}\n\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\"); //TODO: remove this line\n const xmlObj = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for(let i=0; i< xmlData.length; i++){//for each char in XML data\n const ch = xmlData[i];\n if(ch === '<'){\n // const nextIndex = i+1;\n // const _2ndChar = xmlData[nextIndex];\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(this.options.removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n if(currentNode){\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n\n //check if last tag of nested tag was unpaired tag\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\")+1);\n if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0\n if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){\n propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1)\n this.tagsNodeStack.pop();\n }else{\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n\n currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n\n let tagData = readTagExp(xmlData,i, false, \"?>\");\n if(!tagData) throw new Error(\"Pi Tag is not closed.\");\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if( (this.options.ignoreDeclaration && tagData.tagName === \"?xml\") || this.options.ignorePiTags){\n\n }else{\n \n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n \n if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n\n }\n\n\n i = tagData.closeIndex + 1;\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n const endIndex = findClosingIndex(xmlData, \"-->\", i+4, \"Comment is not closed.\")\n if(this.options.commentPropName){\n const comment = xmlData.substring(i + 4, endIndex - 2);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]);\n }\n i = endIndex;\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const result = (0,_DocTypeReader_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n\n let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if(val == undefined) val = \"\";\n\n //cdata should be set even if it is 0 length string\n if(this.options.cdataPropName){\n currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]);\n }else{\n currentNode.add(this.options.textNodeName, val);\n }\n \n i = closeIndex + 2;\n }else {//Opening tag\n let result = readTagExp(xmlData,i, this.options.removeNSPrefix);\n let tagName= result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n \n //save text as child node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n //when nested tag is found\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n\n //check if last tag was unpaired tag\n const lastTag = currentNode;\n if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if(tagName !== xmlObj.tagname){\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n //self-closing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n }\n //unpaired tag\n else if(this.options.unpairedTags.indexOf(tagName) !== -1){\n \n i = result.closeIndex;\n }\n //normal tag\n else{\n //read until closing tag is found\n const result = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if(!result) throw new Error(`Unexpected end of ${rawTagName}`);\n i = result.i;\n tagContent = result.tagContent;\n }\n\n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if(tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n \n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n \n this.addChild(currentNode, childNode, jPath)\n }else{\n //selfClosing tag\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n \n if(this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n\n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](tagName);\n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n }\n //opening tag\n else{\n const childNode = new _xmlNode_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]( tagName);\n this.tagsNodeStack.push(currentNode);\n \n if(tagName !== tagExp && attrExpPresent){\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath)\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n}\n\nfunction addChild(currentNode, childNode, jPath){\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"])\n if(result === false){\n }else if(typeof result === \"string\"){\n childNode.tagname = result\n currentNode.addChild(childNode);\n }else{\n currentNode.addChild(childNode);\n }\n}\n\nconst replaceEntitiesValue = function(val){\n\n if(this.options.processEntities){\n for(let entityName in this.docTypeEntities){\n const entity = this.docTypeEntities[entityName];\n val = val.replace( entity.regx, entity.val);\n }\n for(let entityName in this.lastEntities){\n const entity = this.lastEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n if(this.options.htmlEntities){\n for(let entityName in this.htmlEntities){\n const entity = this.htmlEntities[entityName];\n val = val.replace( entity.regex, entity.val);\n }\n }\n val = val.replace( this.ampEntity.regex, this.ampEntity.val);\n }\n return val;\n}\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) { //store previously collected data as textNode\n if(isLeafNode === undefined) isLeafNode = currentNode.child.length === 0\n \n textData = this.parseTextData(textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode);\n\n if (textData !== undefined && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\n\n//TODO: use jPath to simplify the logic\n/**\n * \n * @param {string[]} stopNodes \n * @param {string} jPath\n * @param {string} currentTagName \n */\nfunction isItStopNode(stopNodes, jPath, currentTagName){\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true;\n }\n return false;\n}\n\n/**\n * Returns the tag Expression and where it is ending handling single-double quotes situation\n * @param {string} xmlData \n * @param {number} i starting index\n * @returns \n */\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\"){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if(closingChar[1]){\n if(xmlData[index + 1] === closingChar[1]){\n return {\n data: tagExp,\n index: index\n }\n }\n }else{\n return {\n data: tagExp,\n index: index\n }\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nfunction readTagExp(xmlData,i, removeNSPrefix, closingChar = \">\"){\n const result = tagExpWithClosingIndex(xmlData, i+1, closingChar);\n if(!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if(separatorIndex !== -1){//separate tag name and attributes expression\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n\n const rawTagName = tagName;\n if(removeNSPrefix){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n return {\n tagName: tagName,\n tagExp: tagExp,\n closeIndex: closeIndex,\n attrExpPresent: attrExpPresent,\n rawTagName: rawTagName,\n }\n}\n/**\n * find paired tag for a stop node\n * @param {string} xmlData \n * @param {string} tagName \n * @param {number} i \n */\nfunction readStopNodeData(xmlData, tagName, i){\n const startIndex = i;\n // Starting at 1 since we already have an open tag\n let openTagCount = 1;\n\n for (; i < xmlData.length; i++) {\n if( xmlData[i] === \"<\"){ \n if (xmlData[i+1] === \"/\") {//close tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i+2,closeIndex).trim();\n if(closeTagName === tagName){\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i : closeIndex\n }\n }\n }\n i=closeIndex;\n } else if(xmlData[i+1] === '?') { \n const closeIndex = findClosingIndex(xmlData, \"?>\", i+1, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 3) === '!--') { \n const closeIndex = findClosingIndex(xmlData, \"-->\", i+3, \"StopNode is not closed.\")\n i=closeIndex;\n } else if(xmlData.substr(i + 1, 2) === '![') { \n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i=closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, '>')\n\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== \"/\") {\n openTagCount++;\n }\n i=tagData.closeIndex;\n }\n }\n }\n }//end for loop\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if(newval === 'true' ) return true;\n else if(newval === 'false' ) return false;\n else return (0,strnum__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(val, options);\n } else {\n if ((0,_util_js__WEBPACK_IMPORTED_MODULE_0__.isExist)(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/OrderedObjParser.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHeaderName = getHeaderName; +exports.setPlatformSpecificData = setPlatformSpecificData; +const tslib_1 = __nccwpck_require__(4351); +const node_os_1 = tslib_1.__importDefault(__nccwpck_require__(70612)); +const node_process_1 = tslib_1.__importDefault(__nccwpck_require__(97742)); +/** + * @internal + */ +function getHeaderName() { + return "User-Agent"; +} +/** + * @internal + */ +async function setPlatformSpecificData(map) { + if (node_process_1.default && node_process_1.default.versions) { + const osInfo = `${node_os_1.default.type()} ${node_os_1.default.release()}; ${node_os_1.default.arch()}`; + const versions = node_process_1.default.versions; + if (versions.bun) { + map.set("Bun", `${versions.bun} (${osInfo})`); + } + else if (versions.deno) { + map.set("Deno", `${versions.deno} (${osInfo})`); + } + else if (versions.node) { + map.set("Node", `${versions.node} (${osInfo})`); + } + } +} +//# sourceMappingURL=userAgentPlatform.js.map /***/ }), -/***/ "./src/xmlparser/XMLParser.js": -/*!************************************!*\ - !*** ./src/xmlparser/XMLParser.js ***! - \************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 2339: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ XMLParser)\n/* harmony export */ });\n/* harmony import */ var _OptionsBuilder_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(/*! ./OptionsBuilder.js */ \"./src/xmlparser/OptionsBuilder.js\");\n/* harmony import */ var _OrderedObjParser_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(/*! ./OrderedObjParser.js */ \"./src/xmlparser/OrderedObjParser.js\");\n/* harmony import */ var _node2json_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(/*! ./node2json.js */ \"./src/xmlparser/node2json.js\");\n/* harmony import */ var _validator_js__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(/*! ../validator.js */ \"./src/validator.js\");\n\n\n\n\n\nclass XMLParser{\n \n constructor(options){\n this.externalEntities = {};\n this.options = (0,_OptionsBuilder_js__WEBPACK_IMPORTED_MODULE_0__.buildOptions)(options);\n \n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData,validationOption){\n if(typeof xmlData === \"string\"){\n }else if( xmlData.toString){\n xmlData = xmlData.toString();\n }else{\n throw new Error(\"XML data is accepted in String or Bytes[] form.\")\n }\n if( validationOption){\n if(validationOption === true) validationOption = {}; //validate with default options\n \n const result = (0,_validator_js__WEBPACK_IMPORTED_MODULE_3__.validate)(xmlData, validationOption);\n if (result !== true) {\n throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` )\n }\n }\n const orderedObjParser = new _OrderedObjParser_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"](this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if(this.options.preserveOrder || orderedResult === undefined) return orderedResult;\n else return (0,_node2json_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(orderedResult, this.options);\n }\n\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value){\n if(value.indexOf(\"&\") !== -1){\n throw new Error(\"Entity value can't have '&'\")\n }else if(key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1){\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\")\n }else if(value === \"&\"){\n throw new Error(\"An entity with value '&' is not permitted\");\n }else{\n this.externalEntities[key] = value;\n }\n }\n}\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/XMLParser.js?"); +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.randomUUID = randomUUID; +/** + * Generated Universally Unique Identifier + * + * @returns RFC4122 v4 UUID. + */ +function randomUUID() { + return crypto.randomUUID(); +} +//# sourceMappingURL=uuidUtils.js.map /***/ }), -/***/ "./src/xmlparser/node2json.js": -/*!************************************!*\ - !*** ./src/xmlparser/node2json.js ***! - \************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 1263: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ prettify)\n/* harmony export */ });\n\n\n/**\n * \n * @param {array} node \n * @param {any} options \n * @returns \n */\nfunction prettify(node, options){\n return compress( node, options);\n}\n\n/**\n * \n * @param {array} arr \n * @param {object} options \n * @param {string} jPath \n * @returns object\n */\nfunction compress(arr, options, jPath){\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName(tagObj);\n let newJpath = \"\";\n if(jPath === undefined) newJpath = property;\n else newJpath = jPath + \".\" + property;\n\n if(property === options.textNodeName){\n if(text === undefined) text = tagObj[property];\n else text += \"\" + tagObj[property];\n }else if(property === undefined){\n continue;\n }else if(tagObj[property]){\n \n let val = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val, options);\n\n if(tagObj[\":@\"]){\n assignAttributes( val, tagObj[\":@\"], newJpath, options);\n }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){\n val = val[options.textNodeName];\n }else if(Object.keys(val).length === 0){\n if(options.alwaysCreateTextNode) val[options.textNodeName] = \"\";\n else val = \"\";\n }\n\n if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) {\n if(!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [ compressedObj[property] ];\n }\n compressedObj[property].push(val);\n }else{\n //TODO: if a node is not an array, then check if it should be an array\n //also determine if it is a leaf node\n if (options.isArray(property, newJpath, isLeaf )) {\n compressedObj[property] = [val];\n }else{\n compressedObj[property] = val;\n }\n }\n }\n \n }\n // if(text && text.length > 0) compressedObj[options.textNodeName] = text;\n if(typeof text === \"string\"){\n if(text.length > 0) compressedObj[options.textNodeName] = text;\n }else if(text !== undefined) compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\n\nfunction propName(obj){\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(key !== \":@\") return key;\n }\n}\n\nfunction assignAttributes(obj, attrMap, jpath, options){\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [ attrMap[atrrName] ];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\n\nfunction isLeafTag(obj, options){\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n \n if (propCount === 0) {\n return true;\n }\n\n if (\n propCount === 1 &&\n (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)\n ) {\n return true;\n }\n\n return false;\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/node2json.js?"); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.encode = encode; +exports.decodeEntity = decodeEntity; +exports.decode = decode; +var named_references_js_1 = __nccwpck_require__(15197); +var numeric_unicode_map_js_1 = __nccwpck_require__(24690); +var surrogate_pairs_js_1 = __nccwpck_require__(77955); +var allNamedReferences = __assign(__assign({}, named_references_js_1.namedReferences), { all: named_references_js_1.namedReferences.html5 }); +var encodeRegExps = { + specialChars: /[<>'"&]/g, + nonAscii: /[<>'"&\u0080-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, + nonAsciiPrintable: /[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, + nonAsciiPrintableOnly: /[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g, + extensive: /[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF\uDC00-\uDFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]?/g +}; +var defaultEncodeOptions = { + mode: 'specialChars', + level: 'all', + numeric: 'decimal' +}; +/** Encodes all the necessary (specified by `level`) characters in the text */ +function encode(text, _a) { + var _b = _a === void 0 ? defaultEncodeOptions : _a, _c = _b.mode, mode = _c === void 0 ? 'specialChars' : _c, _d = _b.numeric, numeric = _d === void 0 ? 'decimal' : _d, _e = _b.level, level = _e === void 0 ? 'all' : _e; + if (!text) { + return ''; + } + var encodeRegExp = encodeRegExps[mode]; + var references = allNamedReferences[level].characters; + var isHex = numeric === 'hexadecimal'; + return String.prototype.replace.call(text, encodeRegExp, function (input) { + var result = references[input]; + if (!result) { + var code = input.length > 1 ? (0, surrogate_pairs_js_1.getCodePoint)(input, 0) : input.charCodeAt(0); + result = (isHex ? '&#x' + code.toString(16) : '&#' + code) + ';'; + } + return result; + }); +} +var defaultDecodeOptions = { + scope: 'body', + level: 'all' +}; +var strict = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g; +var attribute = /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g; +var baseDecodeRegExps = { + xml: { + strict: strict, + attribute: attribute, + body: named_references_js_1.bodyRegExps.xml + }, + html4: { + strict: strict, + attribute: attribute, + body: named_references_js_1.bodyRegExps.html4 + }, + html5: { + strict: strict, + attribute: attribute, + body: named_references_js_1.bodyRegExps.html5 + } +}; +var decodeRegExps = __assign(__assign({}, baseDecodeRegExps), { all: baseDecodeRegExps.html5 }); +var fromCharCode = String.fromCharCode; +var outOfBoundsChar = fromCharCode(65533); +var defaultDecodeEntityOptions = { + level: 'all' +}; +function getDecodedEntity(entity, references, isAttribute, isStrict) { + var decodeResult = entity; + var decodeEntityLastChar = entity[entity.length - 1]; + if (isAttribute && decodeEntityLastChar === '=') { + decodeResult = entity; + } + else if (isStrict && decodeEntityLastChar !== ';') { + decodeResult = entity; + } + else { + var decodeResultByReference = references[entity]; + if (decodeResultByReference) { + decodeResult = decodeResultByReference; + } + else if (entity[0] === '&' && entity[1] === '#') { + var decodeSecondChar = entity[2]; + var decodeCode = decodeSecondChar == 'x' || decodeSecondChar == 'X' + ? parseInt(entity.substr(3), 16) + : parseInt(entity.substr(2)); + decodeResult = + decodeCode >= 0x10ffff + ? outOfBoundsChar + : decodeCode > 65535 + ? (0, surrogate_pairs_js_1.fromCodePoint)(decodeCode) + : fromCharCode(numeric_unicode_map_js_1.numericUnicodeMap[decodeCode] || decodeCode); + } + } + return decodeResult; +} +/** Decodes a single entity */ +function decodeEntity(entity, _a) { + var _b = _a === void 0 ? defaultDecodeEntityOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c; + if (!entity) { + return ''; + } + return getDecodedEntity(entity, allNamedReferences[level].entities, false, false); +} +/** Decodes all entities in the text */ +function decode(text, _a) { + var _b = _a === void 0 ? defaultDecodeOptions : _a, _c = _b.level, level = _c === void 0 ? 'all' : _c, _d = _b.scope, scope = _d === void 0 ? level === 'xml' ? 'strict' : 'body' : _d; + if (!text) { + return ''; + } + var decodeRegExp = decodeRegExps[level][scope]; + var references = allNamedReferences[level].entities; + var isAttribute = scope === 'attribute'; + var isStrict = scope === 'strict'; + return text.replace(decodeRegExp, function (entity) { return getDecodedEntity(entity, references, isAttribute, isStrict); }); +} +//# sourceMappingURL=index.js.map /***/ }), -/***/ "./src/xmlparser/xmlNode.js": -/*!**********************************!*\ - !*** ./src/xmlparser/xmlNode.js ***! - \**********************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { +/***/ 15197: +/***/ (function(__unused_webpack_module, exports) { -eval("__nccwpck_require__.r(__webpack_exports__);\n/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ XmlNode)\n/* harmony export */ });\n\n\nclass XmlNode{\n constructor(tagname) {\n this.tagname = tagname;\n this.child = []; //nested tags, text, cdata, comments in order\n this[\":@\"] = {}; //attributes map\n }\n add(key,val){\n // this.child.push( {name : key, val: val, isCdata: isCdata });\n if(key === \"__proto__\") key = \"#__proto__\";\n this.child.push( {[key]: val });\n }\n addChild(node) {\n if(node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if(node[\":@\"] && Object.keys(node[\":@\"]).length > 0){\n this.child.push( { [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n }else{\n this.child.push( { [node.tagname]: node.child });\n }\n }\n}\n\n\n//# sourceURL=webpack://fast-xml-parser/./src/xmlparser/xmlNode.js?"); +"use strict"; -/***/ }) +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.namedReferences = exports.bodyRegExps = void 0; +// This file is autogenerated by tools/process-named-references.ts +var pairDivider = "~"; +var blockDivider = "~~"; +function generateNamedReferences(input, prev) { + var entities = {}; + var characters = {}; + var blocks = input.split(blockDivider); + var isOptionalBlock = false; + for (var i = 0; blocks.length > i; i++) { + var entries = blocks[i].split(pairDivider); + for (var j = 0; j < entries.length; j += 2) { + var entity = entries[j]; + var character = entries[j + 1]; + var fullEntity = '&' + entity + ';'; + entities[fullEntity] = character; + if (isOptionalBlock) { + entities['&' + entity] = character; + } + characters[character] = fullEntity; + } + isOptionalBlock = true; + } + return prev ? + { entities: __assign(__assign({}, entities), prev.entities), characters: __assign(__assign({}, characters), prev.characters) } : + { entities: entities, characters: characters }; +} +exports.bodyRegExps = { + xml: /&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g, + html4: /∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g, + html5: /·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g +}; +exports.namedReferences = {}; +exports.namedReferences.xml = generateNamedReferences("lt~<~gt~>~quot~\"~apos~'~amp~&"); +exports.namedReferences.html4 = generateNamedReferences("apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~‌~zwj~‍~lrm~‎~rlm~‏~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~­~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~\"~amp~&~lt~<~gt~>"); +exports.namedReferences.html5 = generateNamedReferences("Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~⁡~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~⁣~InvisibleTimes~⁢~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~​~NegativeThickSpace~​~NegativeThinSpace~​~NegativeVeryThinSpace~​~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~⁠~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~\t~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~  ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~​~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~⁡~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~⁣~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~⁢~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~\"~REG~®", exports.namedReferences['html4']); +//# sourceMappingURL=named-references.js.map + +/***/ }), + +/***/ 24690: +/***/ ((__unused_webpack_module, exports) => { -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nested_webpack_require_83014__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_83014__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nested_webpack_require_83014__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nested_webpack_require_83014__.o(definition, key) && !__nested_webpack_require_83014__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nested_webpack_require_83014__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nested_webpack_require_83014__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module can't be inlined because the eval devtool is used. -/******/ var __webpack_exports__ = __nested_webpack_require_83014__("./src/fxp.js"); -/******/ module.exports = __webpack_exports__; -/******/ -/******/ })() -; +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.numericUnicodeMap = void 0; +exports.numericUnicodeMap = { + 0: 65533, + 128: 8364, + 130: 8218, + 131: 402, + 132: 8222, + 133: 8230, + 134: 8224, + 135: 8225, + 136: 710, + 137: 8240, + 138: 352, + 139: 8249, + 140: 338, + 142: 381, + 145: 8216, + 146: 8217, + 147: 8220, + 148: 8221, + 149: 8226, + 150: 8211, + 151: 8212, + 152: 732, + 153: 8482, + 154: 353, + 155: 8250, + 156: 339, + 158: 382, + 159: 376 +}; +//# sourceMappingURL=numeric-unicode-map.js.map + +/***/ }), + +/***/ 77955: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.highSurrogateTo = exports.highSurrogateFrom = exports.getCodePoint = exports.fromCodePoint = void 0; +exports.fromCodePoint = String.fromCodePoint || + function (astralCodePoint) { + return String.fromCharCode(Math.floor((astralCodePoint - 0x10000) / 0x400) + 0xd800, ((astralCodePoint - 0x10000) % 0x400) + 0xdc00); + }; +// @ts-expect-error - String.prototype.codePointAt might not exist in older node versions +exports.getCodePoint = String.prototype.codePointAt + ? function (input, position) { + return input.codePointAt(position); + } + : function (input, position) { + return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000; + }; +exports.highSurrogateFrom = 0xd800; +exports.highSurrogateTo = 0xdbff; +//# sourceMappingURL=surrogate-pairs.js.map /***/ }), @@ -165828,14 +172357,16 @@ exports.getPackageJSON = getPackageJSON; /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Axios v1.7.2 Copyright (c) 2024 Matt Zabriskie and contributors +/*! Axios v1.13.6 Copyright (c) 2026 Matt Zabriskie and contributors */ const FormData$1 = __nccwpck_require__(91403); +const crypto = __nccwpck_require__(6113); const url = __nccwpck_require__(57310); const proxyFromEnv = __nccwpck_require__(63329); const http = __nccwpck_require__(13685); const https = __nccwpck_require__(95687); +const http2 = __nccwpck_require__(85158); const util = __nccwpck_require__(73837); const followRedirects = __nccwpck_require__(67707); const zlib = __nccwpck_require__(59796); @@ -165845,14 +172376,24 @@ const events = __nccwpck_require__(82361); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1); +const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto); const url__default = /*#__PURE__*/_interopDefaultLegacy(url); +const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv); const http__default = /*#__PURE__*/_interopDefaultLegacy(http); const https__default = /*#__PURE__*/_interopDefaultLegacy(https); +const http2__default = /*#__PURE__*/_interopDefaultLegacy(http2); const util__default = /*#__PURE__*/_interopDefaultLegacy(util); const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects); const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib); const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream); +/** + * Create a bound version of a function with a specified `this` context + * + * @param {Function} fn - The function to bind + * @param {*} thisArg - The value to be passed as the `this` parameter + * @returns {Function} A new function that will call the original function with the specified `this` context + */ function bind(fn, thisArg) { return function wrap() { return fn.apply(thisArg, arguments); @@ -165861,29 +172402,30 @@ function bind(fn, thisArg) { // utils is a library of generic helper functions non-specific to axios -const {toString} = Object.prototype; -const {getPrototypeOf} = Object; +const { toString } = Object.prototype; +const { getPrototypeOf } = Object; +const { iterator, toStringTag } = Symbol; -const kindOf = (cache => thing => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +const kindOf = ((cache) => (thing) => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); })(Object.create(null)); const kindOfTest = (type) => { type = type.toLowerCase(); - return (thing) => kindOf(thing) === type + return (thing) => kindOf(thing) === type; }; -const typeOfTest = type => thing => typeof thing === type; +const typeOfTest = (type) => (thing) => typeof thing === type; /** - * Determine if a value is an Array + * Determine if a value is a non-null object * * @param {Object} val The value to test * * @returns {boolean} True if value is an Array, otherwise false */ -const {isArray} = Array; +const { isArray } = Array; /** * Determine if a value is undefined @@ -165902,8 +172444,14 @@ const isUndefined = typeOfTest('undefined'); * @returns {boolean} True if value is a Buffer, otherwise false */ function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); + return ( + val !== null && + !isUndefined(val) && + val.constructor !== null && + !isUndefined(val.constructor) && + isFunction$1(val.constructor.isBuffer) && + val.constructor.isBuffer(val) + ); } /** @@ -165915,7 +172463,6 @@ function isBuffer(val) { */ const isArrayBuffer = kindOfTest('ArrayBuffer'); - /** * Determine if a value is a view on an ArrayBuffer * @@ -165925,10 +172472,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer'); */ function isArrayBufferView(val) { let result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { result = ArrayBuffer.isView(val); } else { - result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); + result = val && val.buffer && isArrayBuffer(val.buffer); } return result; } @@ -165948,7 +172495,7 @@ const isString = typeOfTest('string'); * @param {*} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ -const isFunction = typeOfTest('function'); +const isFunction$1 = typeOfTest('function'); /** * Determine if a value is a Number @@ -165974,7 +172521,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object'; * @param {*} thing The value to test * @returns {boolean} True if value is a Boolean, otherwise false */ -const isBoolean = thing => thing === true || thing === false; +const isBoolean = (thing) => thing === true || thing === false; /** * Determine if a value is a plain Object @@ -165989,7 +172536,34 @@ const isPlainObject = (val) => { } const prototype = getPrototypeOf(val); - return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(toStringTag in val) && + !(iterator in val) + ); +}; + +/** + * Determine if a value is an empty object (safely handles Buffers) + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an empty object, otherwise false + */ +const isEmptyObject = (val) => { + // Early return for non-objects or Buffers to prevent RangeError + if (!isObject(val) || isBuffer(val)) { + return false; + } + + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + // Fallback for any other objects that might cause RangeError with Object.keys() + return false; + } }; /** @@ -166010,6 +172584,31 @@ const isDate = kindOfTest('Date'); */ const isFile = kindOfTest('File'); +/** + * Determine if a value is a React Native Blob + * React Native "blob": an object with a `uri` attribute. Optionally, it can + * also have a `name` and `type` attribute to specify filename and content type + * + * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 + * + * @param {*} value The value to test + * + * @returns {boolean} True if value is a React Native Blob, otherwise false + */ +const isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== 'undefined'); +}; + +/** + * Determine if environment is React Native + * ReactNative `FormData` has a non-standard `getParts()` method + * + * @param {*} formData The formData to test + * + * @returns {boolean} True if environment is React Native, otherwise false + */ +const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined'; + /** * Determine if a value is a Blob * @@ -166035,7 +172634,7 @@ const isFileList = kindOfTest('FileList'); * * @returns {boolean} True if value is a Stream, otherwise false */ -const isStream = (val) => isObject(val) && isFunction(val.pipe); +const isStream = (val) => isObject(val) && isFunction$1(val.pipe); /** * Determine if a value is a FormData @@ -166044,17 +172643,28 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe); * * @returns {boolean} True if value is an FormData, otherwise false */ +function getGlobal() { + if (typeof globalThis !== 'undefined') return globalThis; + if (typeof self !== 'undefined') return self; + if (typeof window !== 'undefined') return window; + if (typeof global !== 'undefined') return global; + return {}; +} + +const G = getGlobal(); +const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; + const isFormData = (thing) => { let kind; return thing && ( - (typeof FormData === 'function' && thing instanceof FormData) || ( - isFunction(thing.append) && ( + (FormDataCtor && thing instanceof FormDataCtor) || ( + isFunction$1(thing.append) && ( (kind = kindOf(thing)) === 'formdata' || // detect form-data instance - (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') + (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]') ) ) - ) + ); }; /** @@ -166066,7 +172676,12 @@ const isFormData = (thing) => { */ const isURLSearchParams = kindOfTest('URLSearchParams'); -const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); +const [isReadableStream, isRequest, isResponse, isHeaders] = [ + 'ReadableStream', + 'Request', + 'Response', + 'Headers', +].map(kindOfTest); /** * Trim excess whitespace off the beginning and end of a string @@ -166075,9 +172690,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', * * @returns {String} The String freed of excess whitespace */ -const trim = (str) => str.trim ? - str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); - +const trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); +}; /** * Iterate over an Array or an Object invoking a function for each item. * @@ -166087,13 +172702,14 @@ const trim = (str) => str.trim ? * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * - * @param {Object|Array} obj The object to iterate + * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item * - * @param {Boolean} [allOwnKeys = false] + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys = false] * @returns {any} */ -function forEach(obj, fn, {allOwnKeys = false} = {}) { +function forEach(obj, fn, { allOwnKeys = false } = {}) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; @@ -166114,6 +172730,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) { fn.call(null, obj[i], i, obj); } } else { + // Buffer check + if (isBuffer(obj)) { + return; + } + // Iterate over object keys const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); const len = keys.length; @@ -166126,7 +172747,19 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) { } } +/** + * Finds a key in an object, case-insensitive, returning the actual key name. + * Returns null if the object is a Buffer or if no match is found. + * + * @param {Object} obj - The object to search. + * @param {string} key - The key to find (case-insensitive). + * @returns {?string} The actual key name if found, otherwise null. + */ function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); const keys = Object.keys(obj); let i = keys.length; @@ -166142,8 +172775,8 @@ function findKey(obj, key) { const _global = (() => { /*eslint no-undef:0*/ - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) + if (typeof globalThis !== 'undefined') return globalThis; + return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; })(); const isContextDefined = (context) => !isUndefined(context) && context !== _global; @@ -166158,7 +172791,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob * Example: * * ```js - * var result = merge({foo: 123}, {foo: 456}); + * const result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * @@ -166167,17 +172800,22 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { - const {caseless} = isContextDefined(this) && this || {}; + const { caseless, skipUndefined } = (isContextDefined(this) && this) || {}; const result = {}; const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; + // Skip dangerous property names to prevent prototype pollution + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return; + } + + const targetKey = (caseless && findKey(result, key)) || key; if (isPlainObject(result[targetKey]) && isPlainObject(val)) { result[targetKey] = merge(result[targetKey], val); } else if (isPlainObject(val)) { result[targetKey] = merge({}, val); } else if (isArray(val)) { result[targetKey] = val.slice(); - } else { + } else if (!skipUndefined || !isUndefined(val)) { result[targetKey] = val; } }; @@ -166195,17 +172833,32 @@ function merge(/* obj1, obj2, obj3, ... */) { * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * - * @param {Boolean} [allOwnKeys] + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys] * @returns {Object} The resulting value of object a */ -const extend = (a, b, thisArg, {allOwnKeys}= {}) => { - forEach(b, (val, key) => { - if (thisArg && isFunction(val)) { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }, {allOwnKeys}); +const extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction$1(val)) { + Object.defineProperty(a, key, { + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true, + }); + } else { + Object.defineProperty(a, key, { + value: val, + writable: true, + enumerable: true, + configurable: true, + }); + } + }, + { allOwnKeys } + ); return a; }; @@ -166217,7 +172870,7 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => { * @returns {string} content value without BOM */ const stripBOM = (content) => { - if (content.charCodeAt(0) === 0xFEFF) { + if (content.charCodeAt(0) === 0xfeff) { content = content.slice(1); } return content; @@ -166234,9 +172887,14 @@ const stripBOM = (content) => { */ const inherits = (constructor, superConstructor, props, descriptors) => { constructor.prototype = Object.create(superConstructor.prototype, descriptors); - constructor.prototype.constructor = constructor; + Object.defineProperty(constructor.prototype, 'constructor', { + value: constructor, + writable: true, + enumerable: false, + configurable: true, + }); Object.defineProperty(constructor, 'super', { - value: superConstructor.prototype + value: superConstructor.prototype, }); props && Object.assign(constructor.prototype, props); }; @@ -166295,7 +172953,6 @@ const endsWith = (str, searchString, position) => { return lastIndex !== -1 && lastIndex === position; }; - /** * Returns new array from array like object or null if failed * @@ -166324,9 +172981,9 @@ const toArray = (thing) => { * @returns {Array} */ // eslint-disable-next-line func-names -const isTypedArray = (TypedArray => { +const isTypedArray = ((TypedArray) => { // eslint-disable-next-line func-names - return thing => { + return (thing) => { return TypedArray && thing instanceof TypedArray; }; })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); @@ -166340,13 +172997,13 @@ const isTypedArray = (TypedArray => { * @returns {void} */ const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; + const generator = obj && obj[iterator]; - const iterator = generator.call(obj); + const _iterator = generator.call(obj); let result; - while ((result = iterator.next()) && !result.done) { + while ((result = _iterator.next()) && !result.done) { const pair = result.value; fn.call(obj, pair[0], pair[1]); } @@ -166374,16 +173031,18 @@ const matchAll = (regExp, str) => { /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ const isHTMLForm = kindOfTest('HTMLFormElement'); -const toCamelCase = str => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); +const toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); }; /* Creating a function that will check if an object has a property. */ -const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); +const hasOwnProperty = ( + ({ hasOwnProperty }) => + (obj, prop) => + hasOwnProperty.call(obj, prop) +)(Object.prototype); /** * Determine if a value is a RegExp object @@ -166416,13 +173075,13 @@ const reduceDescriptors = (obj, reducer) => { const freezeMethods = (obj) => { reduceDescriptors(obj, (descriptor, name) => { // skip restricted props in strict mode - if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { + if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { return false; } const value = obj[name]; - if (!isFunction(value)) return; + if (!isFunction$1(value)) return; descriptor.enumerable = false; @@ -166433,17 +173092,25 @@ const freezeMethods = (obj) => { if (!descriptor.set) { descriptor.set = () => { - throw Error('Can not rewrite read-only method \'' + name + '\''); + throw Error("Can not rewrite read-only method '" + name + "'"); }; } }); }; +/** + * Converts an array or a delimited string into an object set with values as keys and true as values. + * Useful for fast membership checks. + * + * @param {Array|string} arrayOrString - The array or string to convert. + * @param {string} delimiter - The delimiter to use if input is a string. + * @returns {Object} An object with keys from the array or string, values set to true. + */ const toObjectSet = (arrayOrString, delimiter) => { const obj = {}; const define = (arr) => { - arr.forEach(value => { + arr.forEach((value) => { obj[value] = true; }); }; @@ -166456,27 +173123,7 @@ const toObjectSet = (arrayOrString, delimiter) => { const noop = () => {}; const toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -}; - -const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; - -const DIGIT = '0123456789'; - -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; - -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ''; - const {length} = alphabet; - while (size--) { - str += alphabet[Math.random() * length|0]; - } - - return str; + return value != null && Number.isFinite((value = +value)) ? value : defaultValue; }; /** @@ -166487,20 +173134,35 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { * @returns {boolean} */ function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); + return !!( + thing && + isFunction$1(thing.append) && + thing[toStringTag] === 'FormData' && + thing[iterator] + ); } +/** + * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. + * + * @param {Object} obj - The object to convert. + * @returns {Object} The JSON-compatible object. + */ const toJSONObject = (obj) => { const stack = new Array(10); const visit = (source, i) => { - if (isObject(source)) { if (stack.indexOf(source) >= 0) { return; } - if(!('toJSON' in source)) { + //Buffer check + if (isBuffer(source)) { + return source; + } + + if (!('toJSON' in source)) { stack[i] = source; const target = isArray(source) ? [] : {}; @@ -166521,10 +173183,76 @@ const toJSONObject = (obj) => { return visit(obj, 0); }; +/** + * Determines if a value is an async function. + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is an async function, otherwise false. + */ const isAsyncFn = kindOfTest('AsyncFunction'); +/** + * Determines if a value is thenable (has then and catch methods). + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is thenable, otherwise false. + */ const isThenable = (thing) => - thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); + thing && + (isObject(thing) || isFunction$1(thing)) && + isFunction$1(thing.then) && + isFunction$1(thing.catch); + +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +/** + * Provides a cross-platform setImmediate implementation. + * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. + * + * @param {boolean} setImmediateSupported - Whether setImmediate is supported. + * @param {boolean} postMessageSupported - Whether postMessage is supported. + * @returns {Function} A function to schedule a callback asynchronously. + */ +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + + return postMessageSupported + ? ((token, callbacks) => { + _global.addEventListener( + 'message', + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, '*'); + }; + })(`axios@${Math.random()}`, []) + : (cb) => setTimeout(cb); +})(typeof setImmediate === 'function', isFunction$1(_global.postMessage)); + +/** + * Schedules a microtask or asynchronous callback as soon as possible. + * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. + * + * @type {Function} + */ +const asap = + typeof queueMicrotask !== 'undefined' + ? queueMicrotask.bind(_global) + : (typeof process !== 'undefined' && process.nextTick) || _setImmediate; + +// ********************* + +const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]); const utils$1 = { isArray, @@ -166537,6 +173265,7 @@ const utils$1 = { isBoolean, isObject, isPlainObject, + isEmptyObject, isReadableStream, isRequest, isResponse, @@ -166544,9 +173273,11 @@ const utils$1 = { isUndefined, isDate, isFile, + isReactNativeBlob, + isReactNative, isBlob, isRegExp, - isFunction, + isFunction: isFunction$1, isStream, isURLSearchParams, isTypedArray, @@ -166576,44 +173307,66 @@ const utils$1 = { findKey, global: _global, isContextDefined, - ALPHABET, - generateString, isSpecCompliantForm, toJSONObject, isAsyncFn, - isThenable + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, }; -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ -function AxiosError(message, code, config, request, response) { - Error.call(this); +class AxiosError extends Error { + static from(error, code, config, request, response, customProps) { + const axiosError = new AxiosError(error.message, code || error.code, config, request, response); + axiosError.cause = error; + axiosError.name = error.name; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = (new Error()).stack; + // Preserve status from the original error if not already set from response + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + + customProps && Object.assign(axiosError, customProps); + return axiosError; } - this.message = message; - this.name = 'AxiosError'; - code && (this.code = code); - config && (this.config = config); - request && (this.request = request); - response && (this.response = response); -} + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + + // Make message enumerable to maintain backward compatibility + // The native Error constructor sets message as non-enumerable, + // but axios < v1.13.3 had it as enumerable + Object.defineProperty(this, 'message', { + value: message, + enumerable: true, + writable: true, + configurable: true + }); + + this.name = 'AxiosError'; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } -utils$1.inherits(AxiosError, Error, { - toJSON: function toJSON() { + toJSON() { return { // Standard message: this.message, @@ -166629,55 +173382,26 @@ utils$1.inherits(AxiosError, Error, { // Axios config: utils$1.toJSONObject(this.config), code: this.code, - status: this.response && this.response.status ? this.response.status : null + status: this.status, }; } -}); - -const prototype$1 = AxiosError.prototype; -const descriptors = {}; - -[ - 'ERR_BAD_OPTION_VALUE', - 'ERR_BAD_OPTION', - 'ECONNABORTED', - 'ETIMEDOUT', - 'ERR_NETWORK', - 'ERR_FR_TOO_MANY_REDIRECTS', - 'ERR_DEPRECATED', - 'ERR_BAD_RESPONSE', - 'ERR_BAD_REQUEST', - 'ERR_CANCELED', - 'ERR_NOT_SUPPORT', - 'ERR_INVALID_URL' -// eslint-disable-next-line func-names -].forEach(code => { - descriptors[code] = {value: code}; -}); - -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype$1, 'isAxiosError', {value: true}); - -// eslint-disable-next-line func-names -AxiosError.from = (error, code, config, request, response, customProps) => { - const axiosError = Object.create(prototype$1); - - utils$1.toFlatObject(error, axiosError, function filter(obj) { - return obj !== Error.prototype; - }, prop => { - return prop !== 'isAxiosError'; - }); - - AxiosError.call(axiosError, error.message, code, config, request, response); - - axiosError.cause = error; - - axiosError.name = error.name; +} - customProps && Object.assign(axiosError, customProps); +// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. +AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; +AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; +AxiosError.ECONNABORTED = 'ECONNABORTED'; +AxiosError.ETIMEDOUT = 'ETIMEDOUT'; +AxiosError.ERR_NETWORK = 'ERR_NETWORK'; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; +AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED'; +AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; +AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; +AxiosError.ERR_CANCELED = 'ERR_CANCELED'; +AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; +AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL'; - return axiosError; -}; +const AxiosError$1 = AxiosError; /** * Determines if the given thing is a array or js object. @@ -166712,11 +173436,14 @@ function removeBrackets(key) { */ function renderKey(path, key, dots) { if (!path) return key; - return path.concat(key).map(function each(token, i) { - // eslint-disable-next-line no-param-reassign - token = removeBrackets(token); - return !dots && i ? '[' + token + ']' : token; - }).join(dots ? '.' : ''); + return path + .concat(key) + .map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }) + .join(dots ? '.' : ''); } /** @@ -166766,21 +173493,26 @@ function toFormData(obj, formData, options) { formData = formData || new (FormData__default["default"] || FormData)(); // eslint-disable-next-line no-param-reassign - options = utils$1.toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - // eslint-disable-next-line no-eq-null,eqeqeq - return !utils$1.isUndefined(source[option]); - }); + options = utils$1.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false, + }, + false, + function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !utils$1.isUndefined(source[option]); + } + ); const metaTokens = options.metaTokens; // eslint-disable-next-line no-use-before-define const visitor = options.visitor || defaultVisitor; const dots = options.dots; const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; + const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob); const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); if (!utils$1.isFunction(visitor)) { @@ -166794,8 +173526,12 @@ function toFormData(obj, formData, options) { return value.toISOString(); } + if (utils$1.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils$1.isBlob(value)) { - throw new AxiosError('Blob is not supported. Use a Buffer instead.'); + throw new AxiosError$1('Blob is not supported. Use a Buffer instead.'); } if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { @@ -166818,6 +173554,11 @@ function toFormData(obj, formData, options) { function defaultVisitor(value, key, path) { let arr = value; + if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === 'object') { if (utils$1.endsWith(key, '{}')) { // eslint-disable-next-line no-param-reassign @@ -166826,17 +173567,22 @@ function toFormData(obj, formData, options) { value = JSON.stringify(value); } else if ( (utils$1.isArray(value) && isFlatArray(value)) || - ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)) - )) { + ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) + ) { // eslint-disable-next-line no-param-reassign key = removeBrackets(key); arr.forEach(function each(el, index) { - !(utils$1.isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), - convertValue(el) - ); + !(utils$1.isUndefined(el) || el === null) && + formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true + ? renderKey([key], index, dots) + : indexes === null + ? key + : key + '[]', + convertValue(el) + ); }); return false; } @@ -166856,7 +173602,7 @@ function toFormData(obj, formData, options) { const exposedHelpers = Object.assign(predicates, { defaultVisitor, convertValue, - isVisitable + isVisitable, }); function build(value, path) { @@ -166869,9 +173615,9 @@ function toFormData(obj, formData, options) { stack.push(value); utils$1.forEach(value, function each(el, key) { - const result = !(utils$1.isUndefined(el) || el === null) && visitor.call( - formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers - ); + const result = + !(utils$1.isUndefined(el) || el === null) && + visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); if (result === true) { build(el, path ? path.concat(key) : [key]); @@ -166906,7 +173652,7 @@ function encode$1(str) { ')': '%29', '~': '%7E', '%20': '+', - '%00': '\x00' + '%00': '\x00', }; return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { return charMap[match]; @@ -166934,13 +173680,17 @@ prototype.append = function append(name, value) { }; prototype.toString = function toString(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode$1); - } : encode$1; + const _encode = encoder + ? function (value) { + return encoder.call(this, value, encode$1); + } + : encode$1; - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + '=' + _encode(pair[1]); - }, '').join('&'); + return this._pairs + .map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '') + .join('&'); }; /** @@ -166952,13 +173702,11 @@ prototype.toString = function toString(encoder) { * @returns {string} The encoded value. */ function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); + return encodeURIComponent(val) + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(/%20/g, '+'); } /** @@ -166966,32 +173714,37 @@ function encode(val) { * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended - * @param {?object} options + * @param {?(object|Function)} options * * @returns {string} The formatted url */ function buildURL(url, params, options) { - /*eslint no-param-reassign:0*/ if (!params) { return url; } - - const _encode = options && options.encode || encode; - const serializeFn = options && options.serialize; + const _encode = (options && options.encode) || encode; + + const _options = utils$1.isFunction(options) + ? { + serialize: options, + } + : options; + + const serializeFn = _options && _options.serialize; let serializedParams; if (serializeFn) { - serializedParams = serializeFn(params, options); + serializedParams = serializeFn(params, _options); } else { - serializedParams = utils$1.isURLSearchParams(params) ? - params.toString() : - new AxiosURLSearchParams(params, options).toString(_encode); + serializedParams = utils$1.isURLSearchParams(params) + ? params.toString() + : new AxiosURLSearchParams(params, _options).toString(_encode); } if (serializedParams) { - const hashmarkIndex = url.indexOf("#"); + const hashmarkIndex = url.indexOf('#'); if (hashmarkIndex !== -1) { url = url.slice(0, hashmarkIndex); @@ -167012,6 +173765,7 @@ class InterceptorManager { * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen * * @return {Number} An ID used to remove interceptor later */ @@ -167020,7 +173774,7 @@ class InterceptorManager { fulfilled, rejected, synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null + runWhen: options ? options.runWhen : null, }); return this.handlers.length - 1; } @@ -167030,7 +173784,7 @@ class InterceptorManager { * * @param {Number} id The ID that was returned by `use` * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + * @returns {void} */ eject(id) { if (this.handlers[id]) { @@ -167073,23 +173827,50 @@ const InterceptorManager$1 = InterceptorManager; const transitionalDefaults = { silentJSONParsing: true, forcedJSONParsing: true, - clarifyTimeoutError: false + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, }; const URLSearchParams = url__default["default"].URLSearchParams; +const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; + +const DIGIT = '0123456789'; + +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT, +}; + +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const { length } = alphabet; + const randomValues = new Uint32Array(size); + crypto__default["default"].randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; + } + + return str; +}; + const platform$1 = { isNode: true, classes: { URLSearchParams, FormData: FormData__default["default"], - Blob: typeof Blob !== 'undefined' && Blob || null + Blob: (typeof Blob !== 'undefined' && Blob) || null, }, - protocols: [ 'http', 'https', 'file', 'data' ] + ALPHABET, + generateString, + protocols: ['http', 'https', 'file', 'data'], }; const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; +const _navigator = (typeof navigator === 'object' && navigator) || undefined; + /** * Determine if we're running in a standard browser environment * @@ -167107,10 +173888,9 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde * * @returns {boolean} */ -const hasStandardBrowserEnv = ( - (product) => { - return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0 - })(typeof navigator !== 'undefined' && navigator.product); +const hasStandardBrowserEnv = + hasBrowserEnv && + (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); /** * Determine if we're running in a standard browser webWorker environment @@ -167130,32 +173910,34 @@ const hasStandardBrowserWebWorkerEnv = (() => { ); })(); -const origin = hasBrowserEnv && window.location.href || 'http://localhost'; +const origin = (hasBrowserEnv && window.location.href) || 'http://localhost'; const utils = /*#__PURE__*/Object.freeze({ __proto__: null, hasBrowserEnv: hasBrowserEnv, hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, hasStandardBrowserEnv: hasStandardBrowserEnv, + navigator: _navigator, origin: origin }); const platform = { ...utils, - ...platform$1 + ...platform$1, }; function toURLEncodedForm(data, options) { - return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { + return toFormData(data, new platform.classes.URLSearchParams(), { + visitor: function (value, key, path, helpers) { if (platform.isNode && utils$1.isBuffer(value)) { this.append(key, value.toString('base64')); return false; } return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); + }, + ...options, + }); } /** @@ -167170,7 +173952,7 @@ function parsePropPath(name) { // foo.x.y.z // foo-x-y-z // foo x y z - return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => { + return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => { return match[0] === '[]' ? '' : match[1] || match[0]; }); } @@ -167274,96 +174056,107 @@ function stringifySafely(rawValue, parser, encoder) { } const defaults = { - transitional: transitionalDefaults, adapter: ['xhr', 'http', 'fetch'], - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ''; - const hasJSONContentType = contentType.indexOf('application/json') > -1; - const isObjectPayload = utils$1.isObject(data); + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils$1.isObject(data); - if (isObjectPayload && utils$1.isHTMLForm(data)) { - data = new FormData(data); - } + if (isObjectPayload && utils$1.isHTMLForm(data)) { + data = new FormData(data); + } - const isFormData = utils$1.isFormData(data); + const isFormData = utils$1.isFormData(data); - if (isFormData) { - return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; - } + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + } - if (utils$1.isArrayBuffer(data) || - utils$1.isBuffer(data) || - utils$1.isStream(data) || - utils$1.isFile(data) || - utils$1.isBlob(data) || - utils$1.isReadableStream(data) - ) { - return data; - } - if (utils$1.isArrayBufferView(data)) { - return data.buffer; - } - if (utils$1.isURLSearchParams(data)) { - headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); - return data.toString(); - } + if ( + utils$1.isArrayBuffer(data) || + utils$1.isBuffer(data) || + utils$1.isStream(data) || + utils$1.isFile(data) || + utils$1.isBlob(data) || + utils$1.isReadableStream(data) + ) { + return data; + } + if (utils$1.isArrayBufferView(data)) { + return data.buffer; + } + if (utils$1.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } - let isFileList; + let isFileList; - if (isObjectPayload) { - if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { - return toURLEncodedForm(data, this.formSerializer).toString(); - } + if (isObjectPayload) { + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } - if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { - const _FormData = this.env && this.env.FormData; + if ( + (isFileList = utils$1.isFileList(data)) || + contentType.indexOf('multipart/form-data') > -1 + ) { + const _FormData = this.env && this.env.FormData; - return toFormData( - isFileList ? {'files[]': data} : data, - _FormData && new _FormData(), - this.formSerializer - ); + return toFormData( + isFileList ? { 'files[]': data } : data, + _FormData && new _FormData(), + this.formSerializer + ); + } } - } - if (isObjectPayload || hasJSONContentType ) { - headers.setContentType('application/json', false); - return stringifySafely(data); - } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } - return data; - }], + return data; + }, + ], - transformResponse: [function transformResponse(data) { - const transitional = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional && transitional.forcedJSONParsing; - const JSONRequested = this.responseType === 'json'; + transformResponse: [ + function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === 'json'; - if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { - return data; - } + if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { + return data; + } - if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { - const silentJSONParsing = transitional && transitional.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; + if ( + data && + utils$1.isString(data) && + ((forcedJSONParsing && !this.responseType) || JSONRequested) + ) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === 'SyntaxError') { - throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); + try { + return JSON.parse(data, this.parseReviver); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; } - throw e; } } - } - return data; - }], + return data; + }, + ], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a @@ -167379,7 +174172,7 @@ const defaults = { env: { FormData: platform.classes.FormData, - Blob: platform.classes.Blob + Blob: platform.classes.Blob, }, validateStatus: function validateStatus(status) { @@ -167388,10 +174181,10 @@ const defaults = { headers: { common: { - 'Accept': 'application/json, text/plain, */*', - 'Content-Type': undefined - } - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': undefined, + }, + }, }; utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { @@ -167403,10 +174196,23 @@ const defaults$1 = defaults; // RawAxiosHeaders whose duplicates are ignored by node // c.f. https://nodejs.org/api/http.html#http_message_headers const ignoreDuplicateOf = utils$1.toObjectSet([ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' + 'age', + 'authorization', + 'content-length', + 'content-type', + 'etag', + 'expires', + 'from', + 'host', + 'if-modified-since', + 'if-unmodified-since', + 'last-modified', + 'location', + 'max-forwards', + 'proxy-authorization', + 'referer', + 'retry-after', + 'user-agent', ]); /** @@ -167423,31 +174229,32 @@ const ignoreDuplicateOf = utils$1.toObjectSet([ * * @returns {Object} Headers parsed into an object */ -const parseHeaders = rawHeaders => { +const parseHeaders = (rawHeaders) => { const parsed = {}; let key; let val; let i; - rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { - i = line.indexOf(':'); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); + rawHeaders && + rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); - if (!key || (parsed[key] && ignoreDuplicateOf[key])) { - return; - } + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } - if (key === 'set-cookie') { - if (parsed[key]) { - parsed[key].push(val); + if (key === 'set-cookie') { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } } else { - parsed[key] = [val]; + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - }); + }); return parsed; }; @@ -167501,8 +174308,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { } function formatHeader(header) { - return header.trim() - .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return header + .trim() + .toLowerCase() + .replace(/([a-z\d])(\w*)/g, (w, char, str) => { return char.toUpperCase() + str; }); } @@ -167510,12 +174319,12 @@ function formatHeader(header) { function buildAccessors(obj, header) { const accessorName = utils$1.toCamelCase(' ' + header); - ['get', 'set', 'has'].forEach(methodName => { + ['get', 'set', 'has'].forEach((methodName) => { Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { + value: function (arg1, arg2, arg3) { return this[methodName].call(this, header, arg1, arg2, arg3); }, - configurable: true + configurable: true, }); }); } @@ -167537,7 +174346,12 @@ class AxiosHeaders { const key = utils$1.findKey(self, lHeader); - if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { + if ( + !key || + self[key] === undefined || + _rewrite === true || + (_rewrite === undefined && self[key] !== false) + ) { self[key || _header] = normalizeValue(_value); } } @@ -167547,12 +174361,25 @@ class AxiosHeaders { if (utils$1.isPlainObject(header) || header instanceof this.constructor) { setHeaders(header, valueOrRewrite); - } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { setHeaders(parseHeaders(header), valueOrRewrite); - } else if (utils$1.isHeaders(header)) { - for (const [key, value] of header.entries()) { - setHeader(value, key, rewrite); + } else if (utils$1.isObject(header) && utils$1.isIterable(header)) { + let obj = {}, + dest, + key; + for (const entry of header) { + if (!utils$1.isArray(entry)) { + throw TypeError('Object iterator must return a key-value pair'); + } + + obj[(key = entry[0])] = (dest = obj[key]) + ? utils$1.isArray(dest) + ? [...dest, entry[1]] + : [dest, entry[1]] + : entry[1]; } + + setHeaders(obj, valueOrRewrite); } else { header != null && setHeader(valueOrRewrite, header, rewrite); } @@ -167596,7 +174423,11 @@ class AxiosHeaders { if (header) { const key = utils$1.findKey(this, header); - return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + return !!( + key && + this[key] !== undefined && + (!matcher || matchHeaderValue(this, this[key], key, matcher)) + ); } return false; @@ -167636,7 +174467,7 @@ class AxiosHeaders { while (i--) { const key = keys[i]; - if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { delete this[key]; deleted = true; } @@ -167680,7 +174511,9 @@ class AxiosHeaders { const obj = Object.create(null); utils$1.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); + value != null && + value !== false && + (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); }); return obj; @@ -167691,7 +174524,13 @@ class AxiosHeaders { } toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + return Object.entries(this.toJSON()) + .map(([header, value]) => header + ': ' + value) + .join('\n'); + } + + getSetCookie() { + return this.get('set-cookie') || []; } get [Symbol.toStringTag]() { @@ -167711,9 +174550,12 @@ class AxiosHeaders { } static accessor(header) { - const internals = this[$internals] = (this[$internals] = { - accessors: {} - }); + const internals = + (this[$internals] = + this[$internals] = + { + accessors: {}, + }); const accessors = internals.accessors; const prototype = this.prototype; @@ -167733,17 +174575,24 @@ class AxiosHeaders { } } -AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); +AxiosHeaders.accessor([ + 'Content-Type', + 'Content-Length', + 'Accept', + 'Accept-Encoding', + 'User-Agent', + 'Authorization', +]); // reserved names hotfix -utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { +utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` return { get: () => value, set(headerValue) { this[mapped] = headerValue; - } - } + }, + }; }); utils$1.freezeMethods(AxiosHeaders); @@ -167777,24 +174626,24 @@ function isCancel(value) { return !!(value && value.__CANCEL__); } -/** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ -function CanceledError(message, config, request) { - // eslint-disable-next-line no-eq-null,eqeqeq - AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); - this.name = 'CanceledError'; +class CanceledError extends AxiosError$1 { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request); + this.name = 'CanceledError'; + this.__CANCEL__ = true; + } } -utils$1.inherits(CanceledError, AxiosError, { - __CANCEL__: true -}); +const CanceledError$1 = CanceledError; /** * Resolve or reject a Promise based on response status. @@ -167810,13 +174659,17 @@ function settle(resolve, reject, response) { if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { - reject(new AxiosError( - 'Request failed with status code ' + response.status, - [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); + reject( + new AxiosError$1( + 'Request failed with status code ' + response.status, + [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][ + Math.floor(response.status / 100) - 4 + ], + response.config, + response.request, + response + ) + ); } } @@ -167831,6 +174684,10 @@ function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. + if (typeof url !== 'string') { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); } @@ -167858,18 +174715,19 @@ function combineURLs(baseURL, relativeURL) { * * @returns {string} The combined full path */ -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } -const VERSION = "1.7.2"; +const VERSION = "1.13.6"; function parseProtocol(url) { const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); - return match && match[1] || ''; + return (match && match[1]) || ''; } const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; @@ -167885,7 +174743,7 @@ const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; * @returns {Buffer|Blob} */ function fromDataURI(uri, asBlob, options) { - const _Blob = options && options.Blob || platform.classes.Blob; + const _Blob = (options && options.Blob) || platform.classes.Blob; const protocol = parseProtocol(uri); if (asBlob === undefined && _Blob) { @@ -167898,7 +174756,7 @@ function fromDataURI(uri, asBlob, options) { const match = DATA_URL_PATTERN.exec(uri); if (!match) { - throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); + throw new AxiosError$1('Invalid URL', AxiosError$1.ERR_INVALID_URL); } const mime = match[1]; @@ -167908,127 +174766,44 @@ function fromDataURI(uri, asBlob, options) { if (asBlob) { if (!_Blob) { - throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + throw new AxiosError$1('Blob is not supported', AxiosError$1.ERR_NOT_SUPPORT); } - return new _Blob([buffer], {type: mime}); + return new _Blob([buffer], { type: mime }); } return buffer; } - throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); -} - -/** - * Throttle decorator - * @param {Function} fn - * @param {Number} freq - * @return {Function} - */ -function throttle(fn, freq) { - let timestamp = 0; - const threshold = 1000 / freq; - let timer = null; - return function throttled() { - const force = this === true; - - const now = Date.now(); - if (force || now - timestamp > threshold) { - if (timer) { - clearTimeout(timer); - timer = null; - } - timestamp = now; - return fn.apply(null, arguments); - } - if (!timer) { - timer = setTimeout(() => { - timer = null; - timestamp = Date.now(); - return fn.apply(null, arguments); - }, threshold - (now - timestamp)); - } - }; -} - -/** - * Calculate data maxRate - * @param {Number} [samplesCount= 10] - * @param {Number} [min= 1000] - * @returns {Function} - */ -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - - min = min !== undefined ? min : 1000; - - return function push(chunkLength) { - const now = Date.now(); - - const startedAt = timestamps[tail]; - - if (!firstSampleTS) { - firstSampleTS = now; - } - - bytes[head] = chunkLength; - timestamps[head] = now; - - let i = tail; - let bytesCount = 0; - - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - - head = (head + 1) % samplesCount; - - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - - if (now - firstSampleTS < min) { - return; - } - - const passed = startedAt && now - startedAt; - - return passed ? Math.round(bytesCount * 1000 / passed) : undefined; - }; + throw new AxiosError$1('Unsupported protocol ' + protocol, AxiosError$1.ERR_NOT_SUPPORT); } const kInternals = Symbol('internals'); -class AxiosTransformStream extends stream__default["default"].Transform{ +class AxiosTransformStream extends stream__default["default"].Transform { constructor(options) { - options = utils$1.toFlatObject(options, { - maxRate: 0, - chunkSize: 64 * 1024, - minChunkSize: 100, - timeWindow: 500, - ticksRate: 2, - samplesCount: 15 - }, null, (prop, source) => { - return !utils$1.isUndefined(source[prop]); - }); + options = utils$1.toFlatObject( + options, + { + maxRate: 0, + chunkSize: 64 * 1024, + minChunkSize: 100, + timeWindow: 500, + ticksRate: 2, + samplesCount: 15, + }, + null, + (prop, source) => { + return !utils$1.isUndefined(source[prop]); + } + ); super({ - readableHighWaterMark: options.chunkSize + readableHighWaterMark: options.chunkSize, }); - const self = this; - - const internals = this[kInternals] = { - length: options.length, + const internals = (this[kInternals] = { timeWindow: options.timeWindow, - ticksRate: options.ticksRate, chunkSize: options.chunkSize, maxRate: options.maxRate, minChunkSize: options.minChunkSize, @@ -168037,51 +174812,16 @@ class AxiosTransformStream extends stream__default["default"].Transform{ notifiedBytesLoaded: 0, ts: Date.now(), bytes: 0, - onReadCallback: null - }; - - const _speedometer = speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow); + onReadCallback: null, + }); - this.on('newListener', event => { + this.on('newListener', (event) => { if (event === 'progress') { if (!internals.isCaptured) { internals.isCaptured = true; } } }); - - let bytesNotified = 0; - - internals.updateProgress = throttle(function throttledHandler() { - const totalBytes = internals.length; - const bytesTransferred = internals.bytesSeen; - const progressBytes = bytesTransferred - bytesNotified; - if (!progressBytes || self.destroyed) return; - - const rate = _speedometer(progressBytes); - - bytesNotified = bytesTransferred; - - process.nextTick(() => { - self.emit('progress', { - loaded: bytesTransferred, - total: totalBytes, - progress: totalBytes ? (bytesTransferred / totalBytes) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && totalBytes && bytesTransferred <= totalBytes ? - (totalBytes - bytesTransferred) / rate : undefined, - lengthComputable: totalBytes != null - }); - }); - }, internals.ticksRate); - - const onFinish = () => { - internals.updateProgress.call(true); - }; - - this.once('end', onFinish); - this.once('error', onFinish); } _read(size) { @@ -168095,7 +174835,6 @@ class AxiosTransformStream extends stream__default["default"].Transform{ } _transform(chunk, encoding, callback) { - const self = this; const internals = this[kInternals]; const maxRate = internals.maxRate; @@ -168104,19 +174843,20 @@ class AxiosTransformStream extends stream__default["default"].Transform{ const timeWindow = internals.timeWindow; const divider = 1000 / timeWindow; - const bytesThreshold = (maxRate / divider); - const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; + const bytesThreshold = maxRate / divider; + const minChunkSize = + internals.minChunkSize !== false + ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) + : 0; - function pushChunk(_chunk, _callback) { + const pushChunk = (_chunk, _callback) => { const bytes = Buffer.byteLength(_chunk); internals.bytesSeen += bytes; internals.bytes += bytes; - if (internals.isCaptured) { - internals.updateProgress(); - } + internals.isCaptured && this.emit('progress', internals.bytesSeen); - if (self.push(_chunk)) { + if (this.push(_chunk)) { process.nextTick(_callback); } else { internals.onReadCallback = () => { @@ -168124,7 +174864,7 @@ class AxiosTransformStream extends stream__default["default"].Transform{ process.nextTick(_callback); }; } - } + }; const transformChunk = (_chunk, _callback) => { const chunkSize = Buffer.byteLength(_chunk); @@ -168136,7 +174876,7 @@ class AxiosTransformStream extends stream__default["default"].Transform{ if (maxRate) { const now = Date.now(); - if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) { + if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { internals.ts = now; bytesLeft = bytesThreshold - internals.bytes; internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; @@ -168159,14 +174899,19 @@ class AxiosTransformStream extends stream__default["default"].Transform{ } } - if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) { + if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) { chunkRemainder = _chunk.subarray(maxChunkSize); _chunk = _chunk.subarray(0, maxChunkSize); } - pushChunk(_chunk, chunkRemainder ? () => { - process.nextTick(_callback, null, chunkRemainder); - } : _callback); + pushChunk( + _chunk, + chunkRemainder + ? () => { + process.nextTick(_callback, null, chunkRemainder); + } + : _callback + ); }; transformChunk(chunk, function transformNextChunk(err, _chunk) { @@ -168181,16 +174926,11 @@ class AxiosTransformStream extends stream__default["default"].Transform{ } }); } - - setLength(length) { - this[kInternals].length = +length; - return this; - } } const AxiosTransformStream$1 = AxiosTransformStream; -const {asyncIterator} = Symbol; +const { asyncIterator } = Symbol; const readBlob = async function* (blob) { if (blob.stream) { @@ -168206,9 +174946,9 @@ const readBlob = async function* (blob) { const readBlob$1 = readBlob; -const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_'; +const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; -const textEncoder = new util.TextEncoder(); +const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder(); const CRLF = '\r\n'; const CRLF_BYTES = textEncoder.encode(CRLF); @@ -168216,7 +174956,7 @@ const CRLF_BYTES_COUNT = 2; class FormDataPart { constructor(name, value) { - const {escapeName} = this.constructor; + const { escapeName } = this.constructor; const isStringValue = utils$1.isString(value); let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${ @@ -168226,7 +174966,7 @@ class FormDataPart { if (isStringValue) { value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); } else { - headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`; + headers += `Content-Type: ${value.type || 'application/octet-stream'}${CRLF}`; } this.headers = textEncoder.encode(headers + CRLF); @@ -168239,12 +174979,12 @@ class FormDataPart { this.value = value; } - async *encode(){ + async *encode() { yield this.headers; - const {value} = this; + const { value } = this; - if(utils$1.isTypedArray(value)) { + if (utils$1.isTypedArray(value)) { yield value; } else { yield* readBlob$1(value); @@ -168254,11 +174994,15 @@ class FormDataPart { } static escapeName(name) { - return String(name).replace(/[\r\n"]/g, (match) => ({ - '\r' : '%0D', - '\n' : '%0A', - '"' : '%22', - }[match])); + return String(name).replace( + /[\r\n"]/g, + (match) => + ({ + '\r': '%0D', + '\n': '%0A', + '"': '%22', + })[match] + ); } } @@ -168266,19 +175010,19 @@ const formDataToStream = (form, headersHandler, options) => { const { tag = 'form-data-boundary', size = 25, - boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET) + boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET), } = options || {}; - if(!utils$1.isFormData(form)) { + if (!utils$1.isFormData(form)) { throw TypeError('FormData instance required'); } if (boundary.length < 1 || boundary.length > 70) { - throw Error('boundary must be 10-70 characters long') + throw Error('boundary must be 10-70 characters long'); } const boundaryBytes = textEncoder.encode('--' + boundary + CRLF); - const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF); + const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF); let contentLength = footerBytes.byteLength; const parts = Array.from(form.entries()).map(([name, value]) => { @@ -168292,7 +175036,7 @@ const formDataToStream = (form, headersHandler, options) => { contentLength = utils$1.toFiniteNumber(contentLength); const computedHeaders = { - 'Content-Type': `multipart/form-data; boundary=${boundary}` + 'Content-Type': `multipart/form-data; boundary=${boundary}`, }; if (Number.isFinite(contentLength)) { @@ -168301,14 +175045,16 @@ const formDataToStream = (form, headersHandler, options) => { headersHandler && headersHandler(computedHeaders); - return stream.Readable.from((async function *() { - for(const part of parts) { - yield boundaryBytes; - yield* part.encode(); - } + return stream.Readable.from( + (async function* () { + for (const part of parts) { + yield boundaryBytes; + yield* part.encode(); + } - yield footerBytes; - })()); + yield footerBytes; + })() + ); }; const formDataToStream$1 = formDataToStream; @@ -168324,10 +175070,11 @@ class ZlibHeaderTransformStream extends stream__default["default"].Transform { this._transform = this.__transform; // Add Default Compression headers if no zlib headers are present - if (chunk[0] !== 120) { // Hex: 78 + if (chunk[0] !== 120) { + // Hex: 78 const header = Buffer.alloc(2); header[0] = 120; // Hex: 78 - header[1] = 156; // Hex: 9C + header[1] = 156; // Hex: 9C this.push(header, encoding); } } @@ -168339,40 +175086,367 @@ class ZlibHeaderTransformStream extends stream__default["default"].Transform { const ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream; const callbackify = (fn, reducer) => { - return utils$1.isAsyncFn(fn) ? function (...args) { - const cb = args.pop(); - fn.apply(this, args).then((value) => { - try { - reducer ? cb(null, ...reducer(value)) : cb(null, value); - } catch (err) { - cb(err); + return utils$1.isAsyncFn(fn) + ? function (...args) { + const cb = args.pop(); + fn.apply(this, args).then((value) => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); } - }, cb); - } : fn; + : fn; }; const callbackify$1 = callbackify; +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round((bytesCount * 1000) / passed) : undefined; + }; +} + +/** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Function} + */ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }; + + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + + const flush = () => lastArgs && invoke(lastArgs); + + return [throttled, flush]; +} + +const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + + return throttle((e) => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + + bytesNotified = loaded; + + const data = { + loaded, + total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total && inRange ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true, + }; + + listener(data); + }, freq); +}; + +const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + + return [ + (loaded) => + throttled[0]({ + lengthComputable, + total, + loaded, + }), + throttled[1], + ]; +}; + +const asyncDecorator = + (fn) => + (...args) => + utils$1.asap(() => fn(...args)); + +/** + * Estimate decoded byte length of a data:// URL *without* allocating large buffers. + * - For base64: compute exact decoded size using length and padding; + * handle %XX at the character-count level (no string allocation). + * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound. + * + * @param {string} url + * @returns {number} + */ +function estimateDataURLDecodedBytes(url) { + if (!url || typeof url !== 'string') return 0; + if (!url.startsWith('data:')) return 0; + + const comma = url.indexOf(','); + if (comma < 0) return 0; + + const meta = url.slice(5, comma); + const body = url.slice(comma + 1); + const isBase64 = /;base64/i.test(meta); + + if (isBase64) { + let effectiveLen = body.length; + const len = body.length; // cache length + + for (let i = 0; i < len; i++) { + if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) { + const a = body.charCodeAt(i + 1); + const b = body.charCodeAt(i + 2); + const isHex = + ((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) && + ((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102)); + + if (isHex) { + effectiveLen -= 2; + i += 2; + } + } + } + + let pad = 0; + let idx = len - 1; + + const tailIsPct3D = (j) => + j >= 2 && + body.charCodeAt(j - 2) === 37 && // '%' + body.charCodeAt(j - 1) === 51 && // '3' + (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd' + + if (idx >= 0) { + if (body.charCodeAt(idx) === 61 /* '=' */) { + pad++; + idx--; + } else if (tailIsPct3D(idx)) { + pad++; + idx -= 3; + } + } + + if (pad === 1 && idx >= 0) { + if (body.charCodeAt(idx) === 61 /* '=' */) { + pad++; + } else if (tailIsPct3D(idx)) { + pad++; + } + } + + const groups = Math.floor(effectiveLen / 4); + const bytes = groups * 3 - (pad || 0); + return bytes > 0 ? bytes : 0; + } + + return Buffer.byteLength(body, 'utf8'); +} + const zlibOptions = { flush: zlib__default["default"].constants.Z_SYNC_FLUSH, - finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH + finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH, }; const brotliOptions = { flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH + finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH, }; const isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress); -const {http: httpFollow, https: httpsFollow} = followRedirects__default["default"]; +const { http: httpFollow, https: httpsFollow } = followRedirects__default["default"]; const isHttps = /https:?/; -const supportedProtocols = platform.protocols.map(protocol => { +const supportedProtocols = platform.protocols.map((protocol) => { return protocol + ':'; }); +const flushOnFinish = (stream, [throttled, flush]) => { + stream.on('end', flush).on('error', flush); + + return throttled; +}; + +class Http2Sessions { + constructor() { + this.sessions = Object.create(null); + } + + getSession(authority, options) { + options = Object.assign( + { + sessionTimeout: 1000, + }, + options + ); + + let authoritySessions = this.sessions[authority]; + + if (authoritySessions) { + let len = authoritySessions.length; + + for (let i = 0; i < len; i++) { + const [sessionHandle, sessionOptions] = authoritySessions[i]; + if ( + !sessionHandle.destroyed && + !sessionHandle.closed && + util__default["default"].isDeepStrictEqual(sessionOptions, options) + ) { + return sessionHandle; + } + } + } + + const session = http2__default["default"].connect(authority, options); + + let removed; + + const removeSession = () => { + if (removed) { + return; + } + + removed = true; + + let entries = authoritySessions, + len = entries.length, + i = len; + + while (i--) { + if (entries[i][0] === session) { + if (len === 1) { + delete this.sessions[authority]; + } else { + entries.splice(i, 1); + } + return; + } + } + }; + + const originalRequestFn = session.request; + + const { sessionTimeout } = options; + + if (sessionTimeout != null) { + let timer; + let streamsCount = 0; + + session.request = function () { + const stream = originalRequestFn.apply(this, arguments); + + streamsCount++; + + if (timer) { + clearTimeout(timer); + timer = null; + } + + stream.once('close', () => { + if (!--streamsCount) { + timer = setTimeout(() => { + timer = null; + removeSession(); + }, sessionTimeout); + } + }); + + return stream; + }; + } + + session.once('close', removeSession); + + let entry = [session, options]; + + authoritySessions + ? authoritySessions.push(entry) + : (authoritySessions = this.sessions[authority] = [entry]); + + return session; + } +} + +const http2Sessions = new Http2Sessions(); + /** * If the proxy or config beforeRedirects functions are defined, call them with the options * object. @@ -168402,7 +175476,7 @@ function dispatchBeforeRedirect(options, responseDetails) { function setProxy(options, configProxy, location) { let proxy = configProxy; if (!proxy && proxy !== false) { - const proxyUrl = proxyFromEnv.getProxyForUrl(location); + const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location); if (proxyUrl) { proxy = new URL(proxyUrl); } @@ -168415,12 +175489,16 @@ function setProxy(options, configProxy, location) { if (proxy.auth) { // Support proxy auth object form - if (proxy.auth.username || proxy.auth.password) { + const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password); + + if (validProxyAuth) { proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || ''); + } else if (typeof proxy.auth === 'object') { + throw new AxiosError$1('Invalid proxy authorization', AxiosError$1.ERR_BAD_OPTION, { proxy }); } - const base64 = Buffer - .from(proxy.auth, 'utf8') - .toString('base64'); + + const base64 = Buffer.from(proxy.auth, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; } @@ -168443,7 +175521,8 @@ function setProxy(options, configProxy, location) { }; } -const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process'; +const isHttpAdapterSupported = + typeof process !== 'undefined' && utils$1.kindOf(process) === 'process'; // temporary hotfix @@ -168469,678 +175548,753 @@ const wrapAsync = (asyncExecutor) => { }; asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject); - }) + }); }; -const resolveFamily = ({address, family}) => { +const resolveFamily = ({ address, family }) => { if (!utils$1.isString(address)) { throw TypeError('address must be a string'); } - return ({ + return { address, - family: family || (address.indexOf('.') < 0 ? 6 : 4) - }); + family: family || (address.indexOf('.') < 0 ? 6 : 4), + }; }; -const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family}); - -/*eslint consistent-return:0*/ -const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) { - return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let {data, lookup, family} = config; - const {responseType, responseEncoding} = config; - const method = config.method.toUpperCase(); - let isDone; - let rejected = false; - let req; - - if (lookup) { - const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]); - // hotfix to support opt.all option which is required for node 20.x - lookup = (hostname, opt, cb) => { - _lookup(hostname, opt, (err, arg0, arg1) => { - if (err) { - return cb(err); - } - - const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; +const buildAddressEntry = (address, family) => + resolveFamily(utils$1.isObject(address) ? address : { address, family }); - opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); - }); - }; - } +const http2Transport = { + request(options, cb) { + const authority = + options.protocol + + '//' + + options.hostname + + ':' + + (options.port || (options.protocol === 'https:' ? 443 : 80)); - // temporary internal emitter until the AxiosRequest class will be implemented - const emitter = new events.EventEmitter(); + const { http2Options, headers } = options; - const onFinished = () => { - if (config.cancelToken) { - config.cancelToken.unsubscribe(abort); - } + const session = http2Sessions.getSession(authority, http2Options); - if (config.signal) { - config.signal.removeEventListener('abort', abort); - } + const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = + http2__default["default"].constants; - emitter.removeAllListeners(); + const http2Headers = { + [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''), + [HTTP2_HEADER_METHOD]: options.method, + [HTTP2_HEADER_PATH]: options.path, }; - onDone((value, isRejected) => { - isDone = true; - if (isRejected) { - rejected = true; - onFinished(); - } + utils$1.forEach(headers, (header, name) => { + name.charAt(0) !== ':' && (http2Headers[name] = header); }); - function abort(reason) { - emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason); - } + const req = session.request(http2Headers); - emitter.once('abort', reject); + req.once('response', (responseHeaders) => { + const response = req; //duplex - if (config.cancelToken || config.signal) { - config.cancelToken && config.cancelToken.subscribe(abort); - if (config.signal) { - config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); - } - } + responseHeaders = Object.assign({}, responseHeaders); - // Parse url - const fullPath = buildFullPath(config.baseURL, config.url); - const parsed = new URL(fullPath, 'http://localhost'); - const protocol = parsed.protocol || supportedProtocols[0]; + const status = responseHeaders[HTTP2_HEADER_STATUS]; - if (protocol === 'data:') { - let convertedData; + delete responseHeaders[HTTP2_HEADER_STATUS]; - if (method !== 'GET') { - return settle(resolve, reject, { - status: 405, - statusText: 'method not allowed', - headers: {}, - config - }); - } + response.headers = responseHeaders; - try { - convertedData = fromDataURI(config.url, responseType === 'blob', { - Blob: config.env && config.env.Blob - }); - } catch (err) { - throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config); - } + response.statusCode = +status; - if (responseType === 'text') { - convertedData = convertedData.toString(responseEncoding); + cb(response); + }); - if (!responseEncoding || responseEncoding === 'utf8') { - convertedData = utils$1.stripBOM(convertedData); - } - } else if (responseType === 'stream') { - convertedData = stream__default["default"].Readable.from(convertedData); - } + return req; + }, +}; - return settle(resolve, reject, { - data: convertedData, - status: 200, - statusText: 'OK', - headers: new AxiosHeaders$1(), - config - }); - } +/*eslint consistent-return:0*/ +const httpAdapter = isHttpAdapterSupported && + function httpAdapter(config) { + return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { + let { data, lookup, family, httpVersion = 1, http2Options } = config; + const { responseType, responseEncoding } = config; + const method = config.method.toUpperCase(); + let isDone; + let rejected = false; + let req; - if (supportedProtocols.indexOf(protocol) === -1) { - return reject(new AxiosError( - 'Unsupported protocol ' + protocol, - AxiosError.ERR_BAD_REQUEST, - config - )); - } + httpVersion = +httpVersion; - const headers = AxiosHeaders$1.from(config.headers).normalize(); + if (Number.isNaN(httpVersion)) { + throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`); + } - // Set User-Agent (required by some servers) - // See https://github.com/axios/axios/issues/69 - // User-Agent is specified; handle case where no UA header is desired - // Only set header if it hasn't been set in config - headers.set('User-Agent', 'axios/' + VERSION, false); + if (httpVersion !== 1 && httpVersion !== 2) { + throw TypeError(`Unsupported protocol version '${httpVersion}'`); + } - const onDownloadProgress = config.onDownloadProgress; - const onUploadProgress = config.onUploadProgress; - const maxRate = config.maxRate; - let maxUploadRate = undefined; - let maxDownloadRate = undefined; + const isHttp2 = httpVersion === 2; - // support for spec compliant FormData objects - if (utils$1.isSpecCompliantForm(data)) { - const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); + if (lookup) { + const _lookup = callbackify$1(lookup, (value) => (utils$1.isArray(value) ? value : [value])); + // hotfix to support opt.all option which is required for node 20.x + lookup = (hostname, opt, cb) => { + _lookup(hostname, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } - data = formDataToStream$1(data, (formHeaders) => { - headers.set(formHeaders); - }, { - tag: `axios-${VERSION}-boundary`, - boundary: userBoundary && userBoundary[1] || undefined - }); - // support for https://www.npmjs.com/package/form-data api - } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) { - headers.set(data.getHeaders()); + const addresses = utils$1.isArray(arg0) + ? arg0.map((addr) => buildAddressEntry(addr)) + : [buildAddressEntry(arg0, arg1)]; + + opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); + }); + }; + } - if (!headers.hasContentLength()) { + const abortEmitter = new events.EventEmitter(); + + function abort(reason) { try { - const knownLength = await util__default["default"].promisify(data.getLength).call(data); - Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); - /*eslint no-empty:0*/ - } catch (e) { + abortEmitter.emit( + 'abort', + !reason || reason.type ? new CanceledError$1(null, config, req) : reason + ); + } catch (err) { + console.warn('emit error', err); } } - } else if (utils$1.isBlob(data)) { - data.size && headers.setContentType(data.type || 'application/octet-stream'); - headers.setContentLength(data.size || 0); - data = stream__default["default"].Readable.from(readBlob$1(data)); - } else if (data && !utils$1.isStream(data)) { - if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils$1.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(new AxiosError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - // Add Content-Length header if data exists - headers.setContentLength(data.length, false); + abortEmitter.once('abort', reject); - if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { - return reject(new AxiosError( - 'Request body larger than maxBodyLength limit', - AxiosError.ERR_BAD_REQUEST, - config - )); - } - } + const onFinished = () => { + if (config.cancelToken) { + config.cancelToken.unsubscribe(abort); + } - const contentLength = utils$1.toFiniteNumber(headers.getContentLength()); + if (config.signal) { + config.signal.removeEventListener('abort', abort); + } - if (utils$1.isArray(maxRate)) { - maxUploadRate = maxRate[0]; - maxDownloadRate = maxRate[1]; - } else { - maxUploadRate = maxDownloadRate = maxRate; - } + abortEmitter.removeAllListeners(); + }; - if (data && (onUploadProgress || maxUploadRate)) { - if (!utils$1.isStream(data)) { - data = stream__default["default"].Readable.from(data, {objectMode: false}); + if (config.cancelToken || config.signal) { + config.cancelToken && config.cancelToken.subscribe(abort); + if (config.signal) { + config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); + } } - data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({ - length: contentLength, - maxRate: utils$1.toFiniteNumber(maxUploadRate) - })], utils$1.noop); + onDone((response, isRejected) => { + isDone = true; - onUploadProgress && data.on('progress', progress => { - onUploadProgress(Object.assign(progress, { - upload: true - })); - }); - } + if (isRejected) { + rejected = true; + onFinished(); + return; + } - // HTTP basic authentication - let auth = undefined; - if (config.auth) { - const username = config.auth.username || ''; - const password = config.auth.password || ''; - auth = username + ':' + password; - } + const { data } = response; - if (!auth && parsed.username) { - const urlUsername = parsed.username; - const urlPassword = parsed.password; - auth = urlUsername + ':' + urlPassword; - } + if (data instanceof stream__default["default"].Readable || data instanceof stream__default["default"].Duplex) { + const offListeners = stream__default["default"].finished(data, () => { + offListeners(); + onFinished(); + }); + } else { + onFinished(); + } + }); - auth && headers.delete('authorization'); + // Parse url + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); + const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined); + const protocol = parsed.protocol || supportedProtocols[0]; + + if (protocol === 'data:') { + // Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set. + if (config.maxContentLength > -1) { + // Use the exact string passed to fromDataURI (config.url); fall back to fullPath if needed. + const dataUrl = String(config.url || fullPath || ''); + const estimated = estimateDataURLDecodedBytes(dataUrl); + + if (estimated > config.maxContentLength) { + return reject( + new AxiosError$1( + 'maxContentLength size of ' + config.maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config + ) + ); + } + } - let path; + let convertedData; - try { - path = buildURL( - parsed.pathname + parsed.search, - config.params, - config.paramsSerializer - ).replace(/^\?/, ''); - } catch (err) { - const customErr = new Error(err.message); - customErr.config = config; - customErr.url = config.url; - customErr.exists = true; - return reject(customErr); - } + if (method !== 'GET') { + return settle(resolve, reject, { + status: 405, + statusText: 'method not allowed', + headers: {}, + config, + }); + } - headers.set( - 'Accept-Encoding', - 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false - ); + try { + convertedData = fromDataURI(config.url, responseType === 'blob', { + Blob: config.env && config.env.Blob, + }); + } catch (err) { + throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config); + } - const options = { - path, - method: method, - headers: headers.toJSON(), - agents: { http: config.httpAgent, https: config.httpsAgent }, - auth, - protocol, - family, - beforeRedirect: dispatchBeforeRedirect, - beforeRedirects: {} - }; + if (responseType === 'text') { + convertedData = convertedData.toString(responseEncoding); - // cacheable-lookup integration hotfix - !utils$1.isUndefined(lookup) && (options.lookup = lookup); + if (!responseEncoding || responseEncoding === 'utf8') { + convertedData = utils$1.stripBOM(convertedData); + } + } else if (responseType === 'stream') { + convertedData = stream__default["default"].Readable.from(convertedData); + } - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname; - options.port = parsed.port; - setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); - } - - let transport; - const isHttpsRequest = isHttps.test(options.protocol); - options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsRequest ? https__default["default"] : http__default["default"]; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; + return settle(resolve, reject, { + data: convertedData, + status: 200, + statusText: 'OK', + headers: new AxiosHeaders$1(), + config, + }); } - if (config.beforeRedirect) { - options.beforeRedirects.config = config.beforeRedirect; + + if (supportedProtocols.indexOf(protocol) === -1) { + return reject( + new AxiosError$1('Unsupported protocol ' + protocol, AxiosError$1.ERR_BAD_REQUEST, config) + ); } - transport = isHttpsRequest ? httpsFollow : httpFollow; - } - if (config.maxBodyLength > -1) { - options.maxBodyLength = config.maxBodyLength; - } else { - // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited - options.maxBodyLength = Infinity; - } + const headers = AxiosHeaders$1.from(config.headers).normalize(); - if (config.insecureHTTPParser) { - options.insecureHTTPParser = config.insecureHTTPParser; - } + // Set User-Agent (required by some servers) + // See https://github.com/axios/axios/issues/69 + // User-Agent is specified; handle case where no UA header is desired + // Only set header if it hasn't been set in config + headers.set('User-Agent', 'axios/' + VERSION, false); - // Create the request - req = transport.request(options, function handleResponse(res) { - if (req.destroyed) return; + const { onUploadProgress, onDownloadProgress } = config; + const maxRate = config.maxRate; + let maxUploadRate = undefined; + let maxDownloadRate = undefined; - const streams = [res]; + // support for spec compliant FormData objects + if (utils$1.isSpecCompliantForm(data)) { + const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); - const responseLength = +res.headers['content-length']; + data = formDataToStream$1( + data, + (formHeaders) => { + headers.set(formHeaders); + }, + { + tag: `axios-${VERSION}-boundary`, + boundary: (userBoundary && userBoundary[1]) || undefined, + } + ); + // support for https://www.npmjs.com/package/form-data api + } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) { + headers.set(data.getHeaders()); - if (onDownloadProgress) { - const transformStream = new AxiosTransformStream$1({ - length: utils$1.toFiniteNumber(responseLength), - maxRate: utils$1.toFiniteNumber(maxDownloadRate) - }); + if (!headers.hasContentLength()) { + try { + const knownLength = await util__default["default"].promisify(data.getLength).call(data); + Number.isFinite(knownLength) && + knownLength >= 0 && + headers.setContentLength(knownLength); + /*eslint no-empty:0*/ + } catch (e) {} + } + } else if (utils$1.isBlob(data) || utils$1.isFile(data)) { + data.size && headers.setContentType(data.type || 'application/octet-stream'); + headers.setContentLength(data.size || 0); + data = stream__default["default"].Readable.from(readBlob$1(data)); + } else if (data && !utils$1.isStream(data)) { + if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils$1.isString(data)) { + data = Buffer.from(data, 'utf-8'); + } else { + return reject( + new AxiosError$1( + 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', + AxiosError$1.ERR_BAD_REQUEST, + config + ) + ); + } - onDownloadProgress && transformStream.on('progress', progress => { - onDownloadProgress(Object.assign(progress, { - download: true - })); - }); + // Add Content-Length header if data exists + headers.setContentLength(data.length, false); - streams.push(transformStream); + if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { + return reject( + new AxiosError$1( + 'Request body larger than maxBodyLength limit', + AxiosError$1.ERR_BAD_REQUEST, + config + ) + ); + } } - // decompress the response body transparently if required - let responseStream = res; + const contentLength = utils$1.toFiniteNumber(headers.getContentLength()); - // return the last request in case of redirects - const lastRequest = res.req || req; + if (utils$1.isArray(maxRate)) { + maxUploadRate = maxRate[0]; + maxDownloadRate = maxRate[1]; + } else { + maxUploadRate = maxDownloadRate = maxRate; + } - // if decompress disabled we should not decompress - if (config.decompress !== false && res.headers['content-encoding']) { - // if no content, but headers still say that it is encoded, - // remove the header not confuse downstream operations - if (method === 'HEAD' || res.statusCode === 204) { - delete res.headers['content-encoding']; + if (data && (onUploadProgress || maxUploadRate)) { + if (!utils$1.isStream(data)) { + data = stream__default["default"].Readable.from(data, { objectMode: false }); } - switch ((res.headers['content-encoding'] || '').toLowerCase()) { - /*eslint default-case:0*/ - case 'gzip': - case 'x-gzip': - case 'compress': - case 'x-compress': - // add the unzipper to the body stream processing pipeline - streams.push(zlib__default["default"].createUnzip(zlibOptions)); + data = stream__default["default"].pipeline( + [ + data, + new AxiosTransformStream$1({ + maxRate: utils$1.toFiniteNumber(maxUploadRate), + }), + ], + utils$1.noop + ); - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'deflate': - streams.push(new ZlibHeaderTransformStream$1()); + onUploadProgress && + data.on( + 'progress', + flushOnFinish( + data, + progressEventDecorator( + contentLength, + progressEventReducer(asyncDecorator(onUploadProgress), false, 3) + ) + ) + ); + } - // add the unzipper to the body stream processing pipeline - streams.push(zlib__default["default"].createUnzip(zlibOptions)); + // HTTP basic authentication + let auth = undefined; + if (config.auth) { + const username = config.auth.username || ''; + const password = config.auth.password || ''; + auth = username + ':' + password; + } - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - case 'br': - if (isBrotliSupported) { - streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions)); - delete res.headers['content-encoding']; - } - } + if (!auth && parsed.username) { + const urlUsername = parsed.username; + const urlPassword = parsed.password; + auth = urlUsername + ':' + urlPassword; } - responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0]; + auth && headers.delete('authorization'); - const offListeners = stream__default["default"].finished(responseStream, () => { - offListeners(); - onFinished(); - }); + let path; + + try { + path = buildURL( + parsed.pathname + parsed.search, + config.params, + config.paramsSerializer + ).replace(/^\?/, ''); + } catch (err) { + const customErr = new Error(err.message); + customErr.config = config; + customErr.url = config.url; + customErr.exists = true; + return reject(customErr); + } + + headers.set( + 'Accept-Encoding', + 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), + false + ); - const response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: new AxiosHeaders$1(res.headers), - config, - request: lastRequest + const options = { + path, + method: method, + headers: headers.toJSON(), + agents: { http: config.httpAgent, https: config.httpsAgent }, + auth, + protocol, + family, + beforeRedirect: dispatchBeforeRedirect, + beforeRedirects: {}, + http2Options, }; - if (responseType === 'stream') { - response.data = responseStream; - settle(resolve, reject, response); + // cacheable-lookup integration hotfix + !utils$1.isUndefined(lookup) && (options.lookup = lookup); + + if (config.socketPath) { + options.socketPath = config.socketPath; } else { - const responseBuffer = []; - let totalResponseBytes = 0; + options.hostname = parsed.hostname.startsWith('[') + ? parsed.hostname.slice(1, -1) + : parsed.hostname; + options.port = parsed.port; + setProxy( + options, + config.proxy, + protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path + ); + } - responseStream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - totalResponseBytes += chunk.length; + let transport; + const isHttpsRequest = isHttps.test(options.protocol); + options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { - // stream.destroy() emit aborted event before calling reject() on Node.js v16 - rejected = true; - responseStream.destroy(); - reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); + if (isHttp2) { + transport = http2Transport; + } else { + if (config.transport) { + transport = config.transport; + } else if (config.maxRedirects === 0) { + transport = isHttpsRequest ? https__default["default"] : http__default["default"]; + } else { + if (config.maxRedirects) { + options.maxRedirects = config.maxRedirects; } - }); - - responseStream.on('aborted', function handlerStreamAborted() { - if (rejected) { - return; + if (config.beforeRedirect) { + options.beforeRedirects.config = config.beforeRedirect; } + transport = isHttpsRequest ? httpsFollow : httpFollow; + } + } - const err = new AxiosError( - 'maxContentLength size of ' + config.maxContentLength + ' exceeded', - AxiosError.ERR_BAD_RESPONSE, - config, - lastRequest - ); - responseStream.destroy(err); - reject(err); - }); - - responseStream.on('error', function handleStreamError(err) { - if (req.destroyed) return; - reject(AxiosError.from(err, null, config, lastRequest)); - }); - - responseStream.on('end', function handleStreamEnd() { - try { - let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); - if (responseType !== 'arraybuffer') { - responseData = responseData.toString(responseEncoding); - if (!responseEncoding || responseEncoding === 'utf8') { - responseData = utils$1.stripBOM(responseData); - } - } - response.data = responseData; - } catch (err) { - return reject(AxiosError.from(err, null, config, response.request, response)); - } - settle(resolve, reject, response); - }); + if (config.maxBodyLength > -1) { + options.maxBodyLength = config.maxBodyLength; + } else { + // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited + options.maxBodyLength = Infinity; } - emitter.once('abort', err => { - if (!responseStream.destroyed) { - responseStream.emit('error', err); - responseStream.destroy(); - } - }); - }); + if (config.insecureHTTPParser) { + options.insecureHTTPParser = config.insecureHTTPParser; + } - emitter.once('abort', err => { - reject(err); - req.destroy(err); - }); + // Create the request + req = transport.request(options, function handleResponse(res) { + if (req.destroyed) return; - // Handle errors - req.on('error', function handleRequestError(err) { - // @todo remove - // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return; - reject(AxiosError.from(err, null, config, req)); - }); + const streams = [res]; - // set tcp keep alive to prevent drop connection by peer - req.on('socket', function handleRequestSocket(socket) { - // default interval of sending ack packet is 1 minute - socket.setKeepAlive(true, 1000 * 60); - }); + const responseLength = utils$1.toFiniteNumber(res.headers['content-length']); - // Handle request timeout - if (config.timeout) { - // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. - const timeout = parseInt(config.timeout, 10); + if (onDownloadProgress || maxDownloadRate) { + const transformStream = new AxiosTransformStream$1({ + maxRate: utils$1.toFiniteNumber(maxDownloadRate), + }); - if (Number.isNaN(timeout)) { - reject(new AxiosError( - 'error trying to parse `config.timeout` to int', - AxiosError.ERR_BAD_OPTION_VALUE, - config, - req - )); + onDownloadProgress && + transformStream.on( + 'progress', + flushOnFinish( + transformStream, + progressEventDecorator( + responseLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true, 3) + ) + ) + ); - return; - } + streams.push(transformStream); + } - // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. - // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. - // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. - // And then these socket which be hang up will devouring CPU little by little. - // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. - req.setTimeout(timeout, function handleRequestTimeout() { - if (isDone) return; - let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = config.transitional || transitionalDefaults; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config, - req - )); - abort(); - }); - } + // decompress the response body transparently if required + let responseStream = res; + // return the last request in case of redirects + const lastRequest = res.req || req; - // Send the request - if (utils$1.isStream(data)) { - let ended = false; - let errored = false; + // if decompress disabled we should not decompress + if (config.decompress !== false && res.headers['content-encoding']) { + // if no content, but headers still say that it is encoded, + // remove the header not confuse downstream operations + if (method === 'HEAD' || res.statusCode === 204) { + delete res.headers['content-encoding']; + } - data.on('end', () => { - ended = true; - }); + switch ((res.headers['content-encoding'] || '').toLowerCase()) { + /*eslint default-case:0*/ + case 'gzip': + case 'x-gzip': + case 'compress': + case 'x-compress': + // add the unzipper to the body stream processing pipeline + streams.push(zlib__default["default"].createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'deflate': + streams.push(new ZlibHeaderTransformStream$1()); - data.once('error', err => { - errored = true; - req.destroy(err); - }); + // add the unzipper to the body stream processing pipeline + streams.push(zlib__default["default"].createUnzip(zlibOptions)); - data.on('close', () => { - if (!ended && !errored) { - abort(new CanceledError('Request stream has been aborted', config, req)); + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'br': + if (isBrotliSupported) { + streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions)); + delete res.headers['content-encoding']; + } + } } - }); - data.pipe(req); - } else { - req.end(data); - } - }); -}; + responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0]; -const progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = speedometer(50, 250); + const response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: new AxiosHeaders$1(res.headers), + config, + request: lastRequest, + }; - return throttle(e => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : undefined; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; + if (responseType === 'stream') { + response.data = responseStream; + settle(resolve, reject, response); + } else { + const responseBuffer = []; + let totalResponseBytes = 0; + + responseStream.on('data', function handleStreamData(chunk) { + responseBuffer.push(chunk); + totalResponseBytes += chunk.length; + + // make sure the content length is not over the maxContentLength if specified + if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { + // stream.destroy() emit aborted event before calling reject() on Node.js v16 + rejected = true; + responseStream.destroy(); + abort( + new AxiosError$1( + 'maxContentLength size of ' + config.maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config, + lastRequest + ) + ); + } + }); - bytesNotified = loaded; + responseStream.on('aborted', function handlerStreamAborted() { + if (rejected) { + return; + } - const data = { - loaded, - total, - progress: total ? (loaded / total) : undefined, - bytes: progressBytes, - rate: rate ? rate : undefined, - estimated: rate && total && inRange ? (total - loaded) / rate : undefined, - event: e, - lengthComputable: total != null - }; + const err = new AxiosError$1( + 'stream has been aborted', + AxiosError$1.ERR_BAD_RESPONSE, + config, + lastRequest + ); + responseStream.destroy(err); + reject(err); + }); - data[isDownloadStream ? 'download' : 'upload'] = true; + responseStream.on('error', function handleStreamError(err) { + if (req.destroyed) return; + reject(AxiosError$1.from(err, null, config, lastRequest)); + }); - listener(data); - }, freq); -}; + responseStream.on('end', function handleStreamEnd() { + try { + let responseData = + responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); + if (responseType !== 'arraybuffer') { + responseData = responseData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === 'utf8') { + responseData = utils$1.stripBOM(responseData); + } + } + response.data = responseData; + } catch (err) { + return reject(AxiosError$1.from(err, null, config, response.request, response)); + } + settle(resolve, reject, response); + }); + } -const isURLSameOrigin = platform.hasStandardBrowserEnv ? + abortEmitter.once('abort', (err) => { + if (!responseStream.destroyed) { + responseStream.emit('error', err); + responseStream.destroy(); + } + }); + }); -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = /(msie|trident)/i.test(navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; + abortEmitter.once('abort', (err) => { + if (req.close) { + req.close(); + } else { + req.destroy(err); + } + }); - /** - * Parse a URL to discover its components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; + // Handle errors + req.on('error', function handleRequestError(err) { + reject(AxiosError$1.from(err, null, config, req)); + }); - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } + // set tcp keep alive to prevent drop connection by peer + req.on('socket', function handleRequestSocket(socket) { + // default interval of sending ack packet is 1 minute + socket.setKeepAlive(true, 1000 * 60); + }); - urlParsingNode.setAttribute('href', href); + // Handle request timeout + if (config.timeout) { + // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. + const timeout = parseInt(config.timeout, 10); + + if (Number.isNaN(timeout)) { + abort( + new AxiosError$1( + 'error trying to parse `config.timeout` to int', + AxiosError$1.ERR_BAD_OPTION_VALUE, + config, + req + ) + ); - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } + return; + } - originURL = resolveURL(window.location.href); + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. + // And then these socket which be hang up will devouring CPU little by little. + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. + req.setTimeout(timeout, function handleRequestTimeout() { + if (isDone) return; + let timeoutErrorMessage = config.timeout + ? 'timeout of ' + config.timeout + 'ms exceeded' + : 'timeout exceeded'; + const transitional = config.transitional || transitionalDefaults; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + abort( + new AxiosError$1( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, + config, + req + ) + ); + }); + } else { + // explicitly reset the socket timeout value for a possible `keep-alive` request + req.setTimeout(0); + } - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : + // Send the request + if (utils$1.isStream(data)) { + let ended = false; + let errored = false; - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })(); + data.on('end', () => { + ended = true; + }); -const cookies = platform.hasStandardBrowserEnv ? + data.once('error', (err) => { + errored = true; + req.destroy(err); + }); - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain, secure) { - const cookie = [name + '=' + encodeURIComponent(value)]; + data.on('close', () => { + if (!ended && !errored) { + abort(new CanceledError$1('Request stream has been aborted', config, req)); + } + }); - utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); + data.pipe(req); + } else { + data && req.write(data); + req.end(); + } + }); + }; - utils$1.isString(path) && cookie.push('path=' + path); +const isURLSameOrigin = platform.hasStandardBrowserEnv + ? ((origin, isMSIE) => (url) => { + url = new URL(url, platform.origin); - utils$1.isString(domain) && cookie.push('domain=' + domain); + return ( + origin.protocol === url.protocol && + origin.host === url.host && + (isMSIE || origin.port === url.port) + ); + })( + new URL(platform.origin), + platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent) + ) + : () => true; - secure === true && cookie.push('secure'); +const cookies = platform.hasStandardBrowserEnv + ? // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === 'undefined') return; - document.cookie = cookie.join('; '); - }, + const cookie = [`${name}=${encodeURIComponent(value)}`]; - read(name) { - const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, + if (utils$1.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils$1.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils$1.isString(domain)) { + cookie.push(`domain=${domain}`); + } + if (secure === true) { + cookie.push('secure'); + } + if (utils$1.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } - remove(name) { - this.write(name, '', Date.now() - 86400000); - } - } + document.cookie = cookie.join('; '); + }, - : + read(name) { + if (typeof document === 'undefined') return null; + const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)')); + return match ? decodeURIComponent(match[1]) : null; + }, - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() {}, - read() { - return null; - }, - remove() {} - }; + remove(name) { + this.write(name, '', Date.now() - 86400000, '/'); + }, + } + : // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + remove() {}, + }; -const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing; +const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing); /** * Config-specific merge-function which creates a new config-object @@ -169156,9 +176310,9 @@ function mergeConfig(config1, config2) { config2 = config2 || {}; const config = {}; - function getMergedValue(target, source, caseless) { + function getMergedValue(target, source, prop, caseless) { if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { - return utils$1.merge.call({caseless}, target, source); + return utils$1.merge.call({ caseless }, target, source); } else if (utils$1.isPlainObject(source)) { return utils$1.merge({}, source); } else if (utils$1.isArray(source)) { @@ -169167,12 +176321,11 @@ function mergeConfig(config1, config2) { return source; } - // eslint-disable-next-line consistent-return - function mergeDeepProperties(a, b, caseless) { + function mergeDeepProperties(a, b, prop, caseless) { if (!utils$1.isUndefined(b)) { - return getMergedValue(a, b, caseless); + return getMergedValue(a, b, prop, caseless); } else if (!utils$1.isUndefined(a)) { - return getMergedValue(undefined, a, caseless); + return getMergedValue(undefined, a, prop, caseless); } } @@ -169230,11 +176383,13 @@ function mergeConfig(config1, config2) { socketPath: defaultToConfig2, responseEncoding: defaultToConfig2, validateStatus: mergeDirectKeys, - headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + headers: (a, b, prop) => + mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true), }; - utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { - const merge = mergeMap[prop] || mergeDeepProperties; + utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) { + if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return; + const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; const configValue = merge(config1[prop], config2[prop], prop); (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); }); @@ -169245,28 +176400,42 @@ function mergeConfig(config1, config2) { const resolveConfig = (config) => { const newConfig = mergeConfig({}, config); - let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig; + let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig; newConfig.headers = headers = AxiosHeaders$1.from(headers); - newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer); + newConfig.url = buildURL( + buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), + config.params, + config.paramsSerializer + ); // HTTP basic authentication if (auth) { - headers.set('Authorization', 'Basic ' + - btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')) + headers.set( + 'Authorization', + 'Basic ' + + btoa( + (auth.username || '') + + ':' + + (auth.password ? unescape(encodeURIComponent(auth.password)) : '') + ) ); } - let contentType; - if (utils$1.isFormData(data)) { if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { - headers.setContentType(undefined); // Let the browser set it - } else if ((contentType = headers.getContentType()) !== false) { - // fix semicolon duplication issue for ReactNative FormData implementation - const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; - headers.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); + headers.setContentType(undefined); // browser handles it + } else if (utils$1.isFunction(data.getHeaders)) { + // Node.js FormData (like form-data package) + const formHeaders = data.getHeaders(); + // Only set safe headers to avoid overwriting security headers + const allowedHeaders = ['content-type', 'content-length']; + Object.entries(formHeaders).forEach(([key, val]) => { + if (allowedHeaders.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); } } @@ -169292,224 +176461,265 @@ const resolveConfig = (config) => { const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; -const xhrAdapter = isXHRAdapterSupported && function (config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = resolveConfig(config); - let requestData = _config.data; - const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); - let {responseType} = _config; - let onCanceled; - function done() { - if (_config.cancelToken) { - _config.cancelToken.unsubscribe(onCanceled); - } +const xhrAdapter = isXHRAdapterSupported && + function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig(config); + let requestData = _config.data; + const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + + function done() { + flushUpload && flushUpload(); // flush events + flushDownload && flushDownload(); // flush events - if (_config.signal) { - _config.signal.removeEventListener('abort', onCanceled); + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + + _config.signal && _config.signal.removeEventListener('abort', onCanceled); } - } - let request = new XMLHttpRequest(); + let request = new XMLHttpRequest(); - request.open(_config.method.toUpperCase(), _config.url, true); + request.open(_config.method.toUpperCase(), _config.url, true); - // Set the request timeout in MS - request.timeout = _config.timeout; + // Set the request timeout in MS + request.timeout = _config.timeout; - function onloadend() { - if (!request) { - return; + function onloadend() { + if (!request) { + return; + } + // Prepare the response + const responseHeaders = AxiosHeaders$1.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = + !responseType || responseType === 'text' || responseType === 'json' + ? request.responseText + : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request, + }; + + settle( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response + ); + + // Clean up request + request = null; } - // Prepare the response - const responseHeaders = AxiosHeaders$1.from( - 'getAllResponseHeaders' in request && request.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === 'text' || responseType === 'json' ? - request.responseText : request.response; - const response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config, - request - }; - settle(function _resolve(value) { - resolve(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } - // Clean up request - request = null; - } + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if ( + request.status === 0 && + !(request.responseURL && request.responseURL.indexOf('file:') === 0) + ) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } - if ('onloadend' in request) { - // Use onloadend if available - request.onloadend = onloadend; - } else { - // Listen for ready state to emulate onloadend - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { return; } - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - // readystate handler is calling before onerror or ontimeout handlers, - // so we should call onloadend on the next 'tick' - setTimeout(onloadend); - }; - } + reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request)); - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } + // Clean up request + request = null; + }; - reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, _config, request)); + // Handle low level network errors + request.onerror = function handleError(event) { + // Browsers deliver a ProgressEvent in XHR onerror + // (message may be empty; when present, surface it) + // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event + const msg = event && event.message ? event.message : 'Network Error'; + const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request); + // attach the underlying event for consumers who want details + err.event = event || null; + reject(err); + request = null; + }; - // Clean up request - request = null; - }; + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = _config.timeout + ? 'timeout of ' + _config.timeout + 'ms exceeded' + : 'timeout exceeded'; + const transitional = _config.transitional || transitionalDefaults; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError$1( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, + config, + request + ) + ); - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, _config, request)); + // Clean up request + request = null; + }; - // Clean up request - request = null; - }; + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); - // Handle timeout - request.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; - const transitional = _config.transitional || transitionalDefaults; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; + // Add headers to the request + if ('setRequestHeader' in request) { + utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); } - reject(new AxiosError( - timeoutErrorMessage, - transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - _config, - request)); - // Clean up request - request = null; - }; + // Add withCredentials to request if needed + if (!utils$1.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } - // Remove Content-Type if data is undefined - requestData === undefined && requestHeaders.setContentType(null); + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } - // Add headers to the request - if ('setRequestHeader' in request) { - utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request.setRequestHeader(key, val); - }); - } + // Handle progress if needed + if (onDownloadProgress) { + [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + request.addEventListener('progress', downloadThrottled); + } - // Add withCredentials to request if needed - if (!utils$1.isUndefined(_config.withCredentials)) { - request.withCredentials = !!_config.withCredentials; - } + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); - // Add responseType to request if needed - if (responseType && responseType !== 'json') { - request.responseType = _config.responseType; - } + request.upload.addEventListener('progress', uploadThrottled); - // Handle progress if needed - if (typeof _config.onDownloadProgress === 'function') { - request.addEventListener('progress', progressEventReducer(_config.onDownloadProgress, true)); - } + request.upload.addEventListener('loadend', flushUpload); + } - // Not all browsers support upload events - if (typeof _config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', progressEventReducer(_config.onUploadProgress)); - } + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = (cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel); + request.abort(); + request = null; + }; - if (_config.cancelToken || _config.signal) { - // Handle cancellation - // eslint-disable-next-line func-names - onCanceled = cancel => { - if (!request) { - return; + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted + ? onCanceled() + : _config.signal.addEventListener('abort', onCanceled); } - reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); - request.abort(); - request = null; - }; - - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); } - } - - const protocol = parseProtocol(_config.url); - if (protocol && platform.protocols.indexOf(protocol) === -1) { - reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); - return; - } + const protocol = parseProtocol(_config.url); + if (protocol && platform.protocols.indexOf(protocol) === -1) { + reject( + new AxiosError$1( + 'Unsupported protocol ' + protocol + ':', + AxiosError$1.ERR_BAD_REQUEST, + config + ) + ); + return; + } - // Send the request - request.send(requestData || null); - }); -}; + // Send the request + request.send(requestData || null); + }); + }; const composeSignals = (signals, timeout) => { - let controller = new AbortController(); - - let aborted; - - const onabort = function (cancel) { - if (!aborted) { - aborted = true; - unsubscribe(); - const err = cancel instanceof Error ? cancel : this.reason; - controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); - } - }; + const { length } = (signals = signals ? signals.filter(Boolean) : []); + + if (timeout || length) { + let controller = new AbortController(); + + let aborted; + + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError$1 + ? err + : new CanceledError$1(err instanceof Error ? err.message : err) + ); + } + }; - let timer = timeout && setTimeout(() => { - onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT)); - }, timeout); + let timer = + timeout && + setTimeout(() => { + timer = null; + onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT)); + }, timeout); - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach(signal => { - signal && - (signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort)); - }); - signals = null; - } - }; + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal) => { + signal.unsubscribe + ? signal.unsubscribe(onabort) + : signal.removeEventListener('abort', onabort); + }); + signals = null; + } + }; - signals.forEach((signal) => signal && signal.addEventListener && signal.addEventListener('abort', onabort)); + signals.forEach((signal) => signal.addEventListener('abort', onabort)); - const {signal} = controller; + const { signal } = controller; - signal.unsubscribe = unsubscribe; + signal.unsubscribe = () => utils$1.asap(unsubscribe); - return [signal, () => { - timer && clearTimeout(timer); - timer = null; - }]; + return signal; + } }; const composeSignals$1 = composeSignals; @@ -169532,330 +176742,520 @@ const streamChunk = function* (chunk, chunkSize) { } }; -const readBytes = async function* (iterable, chunkSize, encode) { - for await (const chunk of iterable) { - yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize); +const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); } }; -const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => { - const iterator = readBytes(stream, chunkSize, encode); - - let bytes = 0; - - return new ReadableStream({ - type: 'bytes', - - async pull(controller) { - const {done, value} = await iterator.next(); +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (;;) { + const { done, value } = await reader.read(); if (done) { - controller.close(); - onFinish(); - return; + break; } - - let len = value.byteLength; - onProgress && onProgress(bytes += len); - controller.enqueue(new Uint8Array(value)); - }, - cancel(reason) { - onFinish(reason); - return iterator.return(); + yield value; } - }, { - highWaterMark: 2 - }) + } finally { + await reader.cancel(); + } }; -const fetchProgressDecorator = (total, fn) => { - const lengthComputable = total != null; - return (loaded) => setTimeout(() => fn({ - lengthComputable, - total, - loaded - })); -}; +const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); -const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function'; -const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function'; + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; -// used only inside the fetch adapter -const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? - ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : - async (str) => new Uint8Array(await new Response(str).arrayBuffer()) -); + return new ReadableStream( + { + async pull(controller) { + try { + const { done, value } = await iterator.next(); -const supportsRequestStream = isReadableStreamSupported && (() => { - let duplexAccessed = false; + if (done) { + _onFinish(); + controller.close(); + return; + } - const hasContentType = new Request(platform.origin, { - body: new ReadableStream(), - method: 'POST', - get duplex() { - duplexAccessed = true; - return 'half'; + let len = value.byteLength; + if (onProgress) { + let loadedBytes = (bytes += len); + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + }, }, - }).headers.has('Content-Type'); - - return duplexAccessed && !hasContentType; -})(); + { + highWaterMark: 2, + } + ); +}; const DEFAULT_CHUNK_SIZE = 64 * 1024; -const supportsResponseStream = isReadableStreamSupported && !!(()=> { - try { - return utils$1.isReadableStream(new Response('').body); - } catch(err) { - // return undefined - } -})(); +const { isFunction } = utils$1; -const resolvers = { - stream: supportsResponseStream && ((res) => res.body) -}; +const globalFetchAPI = (({ Request, Response }) => ({ + Request, + Response, +}))(utils$1.global); -isFetchSupported && (((res) => { - ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { - !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() : - (_, config) => { - throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); - }); - }); -})(new Response)); +const { ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1 } = utils$1.global; -const getBodyLength = async (body) => { - if (body == null) { - return 0; +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; } +}; - if(utils$1.isBlob(body)) { - return body.size; - } +const factory = (env) => { + env = utils$1.merge.call( + { + skipUndefined: true, + }, + globalFetchAPI, + env + ); - if(utils$1.isSpecCompliantForm(body)) { - return (await new Request(body).arrayBuffer()).byteLength; - } + const { fetch: envFetch, Request, Response } = env; + const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; + const isRequestSupported = isFunction(Request); + const isResponseSupported = isFunction(Response); - if(utils$1.isArrayBufferView(body)) { - return body.byteLength; + if (!isFetchSupported) { + return false; } - if(utils$1.isURLSearchParams(body)) { - body = body + ''; - } + const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1); - if(utils$1.isString(body)) { - return (await encodeText(body)).byteLength; - } -}; + const encodeText = + isFetchSupported && + (typeof TextEncoder$1 === 'function' + ? ( + (encoder) => (str) => + encoder.encode(str) + )(new TextEncoder$1()) + : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); -const resolveBodyLength = async (headers, body) => { - const length = utils$1.toFiniteNumber(headers.getContentLength()); + const supportsRequestStream = + isRequestSupported && + isReadableStreamSupported && + test(() => { + let duplexAccessed = false; - return length == null ? getBodyLength(body) : length; -}; + const hasContentType = new Request(platform.origin, { + body: new ReadableStream$1(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + }, + }).headers.has('Content-Type'); -const fetchAdapter = isFetchSupported && (async (config) => { - let { - url, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = 'same-origin', - fetchOptions - } = resolveConfig(config); + return duplexAccessed && !hasContentType; + }); - responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + const supportsResponseStream = + isResponseSupported && + isReadableStreamSupported && + test(() => utils$1.isReadableStream(new Response('').body)); - let [composedSignal, stopTimeout] = (signal || cancelToken || timeout) ? - composeSignals$1([signal, cancelToken], timeout) : []; + const resolvers = { + stream: supportsResponseStream && ((res) => res.body), + }; - let finished, request; + isFetchSupported && + (() => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => { + !resolvers[type] && + (resolvers[type] = (res, config) => { + let method = res && res[type]; - const onFinish = () => { - !finished && setTimeout(() => { - composedSignal && composedSignal.unsubscribe(); - }); + if (method) { + return method.call(res); + } - finished = true; - }; + throw new AxiosError$1( + `Response type '${type}' is not supported`, + AxiosError$1.ERR_NOT_SUPPORT, + config + ); + }); + }); + })(); - let requestContentLength; + const getBodyLength = async (body) => { + if (body == null) { + return 0; + } - try { - if ( - onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' && - (requestContentLength = await resolveBodyLength(headers, data)) !== 0 - ) { - let _request = new Request(url, { + if (utils$1.isBlob(body)) { + return body.size; + } + + if (utils$1.isSpecCompliantForm(body)) { + const _request = new Request(platform.origin, { method: 'POST', - body: data, - duplex: "half" + body, }); + return (await _request.arrayBuffer()).byteLength; + } - let contentTypeHeader; - - if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { - headers.setContentType(contentTypeHeader); - } + if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { + return body.byteLength; + } - if (_request.body) { - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator( - requestContentLength, - progressEventReducer(onUploadProgress) - ), null, encodeText); - } + if (utils$1.isURLSearchParams(body)) { + body = body + ''; } - if (!utils$1.isString(withCredentials)) { - withCredentials = withCredentials ? 'cors' : 'omit'; + if (utils$1.isString(body)) { + return (await encodeText(body)).byteLength; } + }; - request = new Request(url, { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - withCredentials - }); + const resolveBodyLength = async (headers, body) => { + const length = utils$1.toFiniteNumber(headers.getContentLength()); + + return length == null ? getBodyLength(body) : length; + }; + + return async (config) => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions, + } = resolveConfig(config); - let response = await fetch(request); + let _fetch = envFetch || fetch; - const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; - if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) { - const options = {}; + let composedSignal = composeSignals$1( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + + let request = null; - ['status', 'statusText', 'headers'].forEach(prop => { - options[prop] = response[prop]; + const unsubscribe = + composedSignal && + composedSignal.unsubscribe && + (() => { + composedSignal.unsubscribe(); }); - const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); + let requestContentLength; - response = new Response( - trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator( - responseContentLength, - progressEventReducer(onDownloadProgress, true) - ), isStreamResponse && onFinish, encodeText), - options - ); - } + try { + if ( + onUploadProgress && + supportsRequestStream && + method !== 'get' && + method !== 'head' && + (requestContentLength = await resolveBodyLength(headers, data)) !== 0 + ) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: 'half', + }); + + let contentTypeHeader; - responseType = responseType || 'text'; + if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { + headers.setContentType(contentTypeHeader); + } + + if (_request.body) { + const [onProgress, flush] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); + } + } + + if (!utils$1.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; + + const resolvedOptions = { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: 'half', + credentials: isCredentialsSupported ? withCredentials : undefined, + }; - let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); + request = isRequestSupported && new Request(url, resolvedOptions); - !isStreamResponse && onFinish(); + let response = await (isRequestSupported + ? _fetch(request, fetchOptions) + : _fetch(url, resolvedOptions)); + + const isStreamResponse = + supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + + if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) { + const options = {}; + + ['status', 'statusText', 'headers'].forEach((prop) => { + options[prop] = response[prop]; + }); + + const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length')); + + const [onProgress, flush] = + (onDownloadProgress && + progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + )) || + []; + + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + + responseType = responseType || 'text'; + + let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text']( + response, + config + ); - stopTimeout && stopTimeout(); + !isStreamResponse && unsubscribe && unsubscribe(); - return await new Promise((resolve, reject) => { - settle(resolve, reject, { - data: responseData, - headers: AxiosHeaders$1.from(response.headers), - status: response.status, - statusText: response.statusText, - config, - request + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders$1.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request, + }); }); - }) - } catch (err) { - onFinish(); + } catch (err) { + unsubscribe && unsubscribe(); - if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) { - throw Object.assign( - new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), - { - cause: err.cause || err - } - ) + if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError$1( + 'Network Error', + AxiosError$1.ERR_NETWORK, + config, + request, + err && err.response + ), + { + cause: err.cause || err, + } + ); + } + + throw AxiosError$1.from(err, err && err.code, config, request, err && err.response); } + }; +}; + +const seedCache = new Map(); - throw AxiosError.from(err, err && err.code, config, request); +const getFetch = (config) => { + let env = (config && config.env) || {}; + const { fetch, Request, Response } = env; + const seeds = [Request, Response, fetch]; + + let len = seeds.length, + i = len, + seed, + target, + map = seedCache; + + while (i--) { + seed = seeds[i]; + target = map.get(seed); + + target === undefined && map.set(seed, (target = i ? new Map() : factory(env))); + + map = target; } -}); + return target; +}; + +getFetch(); + +/** + * Known adapters mapping. + * Provides environment-specific adapters for Axios: + * - `http` for Node.js + * - `xhr` for browsers + * - `fetch` for fetch API-based requests + * + * @type {Object} + */ const knownAdapters = { http: httpAdapter, xhr: xhrAdapter, - fetch: fetchAdapter + fetch: { + get: getFetch, + }, }; +// Assign adapter names for easier debugging and identification utils$1.forEach(knownAdapters, (fn, value) => { if (fn) { try { - Object.defineProperty(fn, 'name', {value}); + Object.defineProperty(fn, 'name', { value }); } catch (e) { // eslint-disable-next-line no-empty } - Object.defineProperty(fn, 'adapterName', {value}); + Object.defineProperty(fn, 'adapterName', { value }); } }); +/** + * Render a rejection reason string for unknown or unsupported adapters + * + * @param {string} reason + * @returns {string} + */ const renderReason = (reason) => `- ${reason}`; -const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false; - -const adapters = { - getAdapter: (adapters) => { - adapters = utils$1.isArray(adapters) ? adapters : [adapters]; +/** + * Check if the adapter is resolved (function, null, or false) + * + * @param {Function|null|false} adapter + * @returns {boolean} + */ +const isResolvedHandle = (adapter) => + utils$1.isFunction(adapter) || adapter === null || adapter === false; - const {length} = adapters; - let nameOrAdapter; - let adapter; +/** + * Get the first suitable adapter from the provided list. + * Tries each adapter in order until a supported one is found. + * Throws an AxiosError if no adapter is suitable. + * + * @param {Array|string|Function} adapters - Adapter(s) by name or function. + * @param {Object} config - Axios request configuration + * @throws {AxiosError} If no suitable adapter is available + * @returns {Function} The resolved adapter function + */ +function getAdapter(adapters, config) { + adapters = utils$1.isArray(adapters) ? adapters : [adapters]; - const rejectedReasons = {}; + const { length } = adapters; + let nameOrAdapter; + let adapter; - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; + const rejectedReasons = {}; - adapter = nameOrAdapter; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; - if (!isResolvedHandle(nameOrAdapter)) { - adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + adapter = nameOrAdapter; - if (adapter === undefined) { - throw new AxiosError(`Unknown adapter '${id}'`); - } - } + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - if (adapter) { - break; + if (adapter === undefined) { + throw new AxiosError$1(`Unknown adapter '${id}'`); } + } - rejectedReasons[id || '#' + i] = adapter; + if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) { + break; } - if (!adapter) { + rejectedReasons[id || '#' + i] = adapter; + } - const reasons = Object.entries(rejectedReasons) - .map(([id, state]) => `adapter ${id} ` + - (state === false ? 'is not supported by the environment' : 'is not available in the build') - ); + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => + `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); - let s = length ? - (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : - 'as no adapter specified'; + let s = length + ? reasons.length > 1 + ? 'since :\n' + reasons.map(renderReason).join('\n') + : ' ' + renderReason(reasons[0]) + : 'as no adapter specified'; - throw new AxiosError( - `There is no suitable adapter to dispatch the request ` + s, - 'ERR_NOT_SUPPORT' - ); - } + throw new AxiosError$1( + `There is no suitable adapter to dispatch the request ` + s, + 'ERR_NOT_SUPPORT' + ); + } - return adapter; - }, - adapters: knownAdapters + return adapter; +} + +/** + * Exports Axios adapters and utility to resolve an adapter + */ +const adapters = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters, }; /** @@ -169871,7 +177271,7 @@ function throwIfCancellationRequested(config) { } if (config.signal && config.signal.aborted) { - throw new CanceledError(null, config); + throw new CanceledError$1(null, config); } } @@ -169888,47 +177288,43 @@ function dispatchRequest(config) { config.headers = AxiosHeaders$1.from(config.headers); // Transform request data - config.data = transformData.call( - config, - config.transformRequest - ); + config.data = transformData.call(config, config.transformRequest); if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { config.headers.setContentType('application/x-www-form-urlencoded', false); } - const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter); + const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config); - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); + return adapter(config).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config); - // Transform response data - response.data = transformData.call( - config, - config.transformResponse, - response - ); + // Transform response data + response.data = transformData.call(config, config.transformResponse, response); - response.headers = AxiosHeaders$1.from(response.headers); + response.headers = AxiosHeaders$1.from(response.headers); - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData.call( - config, - config.transformResponse, - reason.response - ); - reason.response.headers = AxiosHeaders$1.from(reason.response.headers); + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders$1.from(reason.response.headers); + } } - } - return Promise.reject(reason); - }); + return Promise.reject(reason); + } + ); } const validators$1 = {}; @@ -169953,15 +177349,23 @@ const deprecatedWarnings = {}; */ validators$1.transitional = function transitional(validator, version, message) { function formatMessage(opt, desc) { - return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + return ( + '[Axios v' + + VERSION + + "] Transitional option '" + + opt + + "'" + + desc + + (message ? '. ' + message : '') + ); } // eslint-disable-next-line func-names return (value, opt, opts) => { if (validator === false) { - throw new AxiosError( + throw new AxiosError$1( formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), - AxiosError.ERR_DEPRECATED + AxiosError$1.ERR_DEPRECATED ); } @@ -169980,6 +177384,14 @@ validators$1.transitional = function transitional(validator, version, message) { }; }; +validators$1.spelling = function spelling(correctSpelling) { + return (value, opt) => { + // eslint-disable-next-line no-console + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; + /** * Assert object's properties type * @@ -169992,7 +177404,7 @@ validators$1.transitional = function transitional(validator, version, message) { function assertOptions(options, schema, allowUnknown) { if (typeof options !== 'object') { - throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); + throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE); } const keys = Object.keys(options); let i = keys.length; @@ -170003,19 +177415,22 @@ function assertOptions(options, schema, allowUnknown) { const value = options[opt]; const result = value === undefined || validator(value, opt, options); if (result !== true) { - throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); + throw new AxiosError$1( + 'option ' + opt + ' must be ' + result, + AxiosError$1.ERR_BAD_OPTION_VALUE + ); } continue; } if (allowUnknown !== true) { - throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); + throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION); } } } const validator = { assertOptions, - validators: validators$1 + validators: validators$1, }; const validators = validator.validators; @@ -170029,10 +177444,10 @@ const validators = validator.validators; */ class Axios { constructor(instanceConfig) { - this.defaults = instanceConfig; + this.defaults = instanceConfig || {}; this.interceptors = { request: new InterceptorManager$1(), - response: new InterceptorManager$1() + response: new InterceptorManager$1(), }; } @@ -170049,9 +177464,9 @@ class Axios { return await this._request(configOrUrl, config); } catch (err) { if (err instanceof Error) { - let dummy; + let dummy = {}; - Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error()); + Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); // slice off the Error: ... line const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : ''; @@ -170083,44 +177498,64 @@ class Axios { config = mergeConfig(this.defaults, config); - const {transitional, paramsSerializer, headers} = config; + const { transitional, paramsSerializer, headers } = config; if (transitional !== undefined) { - validator.assertOptions(transitional, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); + validator.assertOptions( + transitional, + { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean), + legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), + }, + false + ); } if (paramsSerializer != null) { if (utils$1.isFunction(paramsSerializer)) { config.paramsSerializer = { - serialize: paramsSerializer + serialize: paramsSerializer, }; } else { - validator.assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); + validator.assertOptions( + paramsSerializer, + { + encode: validators.function, + serialize: validators.function, + }, + true + ); } } + // Set config.allowAbsoluteUrls + if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + + validator.assertOptions( + config, + { + baseUrl: validators.spelling('baseURL'), + withXsrfToken: validators.spelling('withXSRFToken'), + }, + true + ); + // Set config.method config.method = (config.method || this.defaults.method || 'get').toLowerCase(); // Flatten headers - let contextHeaders = headers && utils$1.merge( - headers.common, - headers[config.method] - ); + let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]); - headers && utils$1.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - (method) => { + headers && + utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => { delete headers[method]; - } - ); + }); config.headers = AxiosHeaders$1.concat(contextHeaders, headers); @@ -170134,7 +177569,15 @@ class Axios { synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + const transitional = config.transitional || transitionalDefaults; + const legacyInterceptorReqResOrdering = + transitional && transitional.legacyInterceptorReqResOrdering; + + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } }); const responseInterceptorChain = []; @@ -170148,8 +177591,8 @@ class Axios { if (!synchronousRequestInterceptors) { const chain = [dispatchRequest.bind(this), undefined]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); len = chain.length; promise = Promise.resolve(config); @@ -170165,8 +177608,6 @@ class Axios { let newConfig = config; - i = 0; - while (i < len) { const onFulfilled = requestInterceptorChain[i++]; const onRejected = requestInterceptorChain[i++]; @@ -170196,7 +177637,7 @@ class Axios { getUri(config) { config = mergeConfig(this.defaults, config); - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); return buildURL(fullPath, config.params, config.paramsSerializer); } } @@ -170204,12 +177645,14 @@ class Axios { // Provide aliases for supported request methods utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method, - url, - data: (config || {}).data - })); + Axios.prototype[method] = function (url, config) { + return this.request( + mergeConfig(config || {}, { + method, + url, + data: (config || {}).data, + }) + ); }; }); @@ -170218,14 +177661,18 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) function generateHTTPMethod(isForm) { return function httpMethod(url, data, config) { - return this.request(mergeConfig(config || {}, { - method, - headers: isForm ? { - 'Content-Type': 'multipart/form-data' - } : {}, - url, - data - })); + return this.request( + mergeConfig(config || {}, { + method, + headers: isForm + ? { + 'Content-Type': 'multipart/form-data', + } + : {}, + url, + data, + }) + ); }; } @@ -170258,7 +177705,7 @@ class CancelToken { const token = this; // eslint-disable-next-line func-names - this.promise.then(cancel => { + this.promise.then((cancel) => { if (!token._listeners) return; let i = token._listeners.length; @@ -170270,10 +177717,10 @@ class CancelToken { }); // eslint-disable-next-line func-names - this.promise.then = onfulfilled => { + this.promise.then = (onfulfilled) => { let _resolve; // eslint-disable-next-line func-names - const promise = new Promise(resolve => { + const promise = new Promise((resolve) => { token.subscribe(resolve); _resolve = resolve; }).then(onfulfilled); @@ -170291,7 +177738,7 @@ class CancelToken { return; } - token.reason = new CanceledError(message, config, request); + token.reason = new CanceledError$1(message, config, request); resolvePromise(token.reason); }); } @@ -170336,6 +177783,20 @@ class CancelToken { } } + toAbortSignal() { + const controller = new AbortController(); + + const abort = (err) => { + controller.abort(err); + }; + + this.subscribe(abort); + + controller.signal.unsubscribe = () => this.unsubscribe(abort); + + return controller.signal; + } + /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. @@ -170347,7 +177808,7 @@ class CancelToken { }); return { token, - cancel + cancel, }; } } @@ -170361,7 +177822,7 @@ const CancelToken$1 = CancelToken; * * ```js * function f(x, y, z) {} - * var args = [1, 2, 3]; + * const args = [1, 2, 3]; * f.apply(null, args); * ``` * @@ -170389,7 +177850,7 @@ function spread(callback) { * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false */ function isAxiosError(payload) { - return utils$1.isObject(payload) && (payload.isAxiosError === true); + return utils$1.isObject(payload) && payload.isAxiosError === true; } const HttpStatusCode = { @@ -170456,6 +177917,12 @@ const HttpStatusCode = { LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526, }; Object.entries(HttpStatusCode).forEach(([key, value]) => { @@ -170476,10 +177943,10 @@ function createInstance(defaultConfig) { const instance = bind(Axios$1.prototype.request, context); // Copy axios.prototype to instance - utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true}); + utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true }); // Copy context to instance - utils$1.extend(instance, context, null, {allOwnKeys: true}); + utils$1.extend(instance, context, null, { allOwnKeys: true }); // Factory for creating new instances instance.create = function create(instanceConfig) { @@ -170496,14 +177963,14 @@ const axios = createInstance(defaults$1); axios.Axios = Axios$1; // Expose Cancel & CancelToken -axios.CanceledError = CanceledError; +axios.CanceledError = CanceledError$1; axios.CancelToken = CancelToken$1; axios.isCancel = isCancel; axios.VERSION = VERSION; axios.toFormData = toFormData; // Expose AxiosError class -axios.AxiosError = AxiosError; +axios.AxiosError = AxiosError$1; // alias for CanceledError for backward compatibility axios.Cancel = axios.CanceledError; @@ -170523,7 +177990,7 @@ axios.mergeConfig = mergeConfig; axios.AxiosHeaders = AxiosHeaders$1; -axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); +axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); axios.getAdapter = adapters.getAdapter; @@ -170535,13 +178002,20 @@ module.exports = axios; //# sourceMappingURL=axios.cjs.map +/***/ }), + +/***/ 74577: +/***/ ((module) => { + +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>$t,XMLParser:()=>gt,XMLValidator:()=>It});const i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const i=[];let n=e.exec(t);for(;n;){const s=[];s.startIndex=e.lastIndex-n[0].length;const r=n.length;for(let t=0;t"!==t[r]&&" "!==t[r]&&"\t"!==t[r]&&"\n"!==t[r]&&"\r"!==t[r];r++)h+=t[r];if(h=h.trim(),"/"===h[h.length-1]&&(h=h.substring(0,h.length-1),r--),!y(h)){let e;return e=0===h.trim().length?"Invalid space after '<'.":"Tag '"+h+"' is an invalid name.",b("InvalidTag",e,w(t,r))}const l=g(t,r);if(!1===l)return b("InvalidAttr","Attributes for '"+h+"' have open quote.",w(t,r));let d=l.value;if(r=l.index,"/"===d[d.length-1]){const i=r-d.length;d=d.substring(0,d.length-1);const s=x(d,e);if(!0!==s)return b(s.err.code,s.err.msg,w(t,i+s.err.line));n=!0}else if(a){if(!l.tagClosed)return b("InvalidTag","Closing tag '"+h+"' doesn't have proper closing.",w(t,r));if(d.trim().length>0)return b("InvalidTag","Closing tag '"+h+"' can't have attributes or invalid starting.",w(t,o));if(0===i.length)return b("InvalidTag","Closing tag '"+h+"' has not been opened.",w(t,o));{const e=i.pop();if(h!==e.tagName){let i=w(t,e.tagStartPos);return b("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+i.line+", col "+i.col+") instead of closing tag '"+h+"'.",w(t,o))}0==i.length&&(s=!0)}}else{const a=x(d,e);if(!0!==a)return b(a.err.code,a.err.msg,w(t,r-d.length+a.err.line));if(!0===s)return b("InvalidXml","Multiple possible root nodes found.",w(t,r));-1!==e.unpairedTags.indexOf(h)||i.push({tagName:h,tagStartPos:o}),n=!0}for(r++;r0)||b("InvalidXml","Invalid '"+JSON.stringify(i.map(t=>t.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):b("InvalidXml","Start tag expected.",1)}function p(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const i=e;for(;e5&&"xml"===n)return b("InvalidXml","XML declaration allowed only at the start of the document.",w(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}continue}return e}function c(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let i=1;for(e+=8;e"===t[e]&&(i--,0===i))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}const d='"',f="'";function g(t,e){let i="",n="",s=!1;for(;e"===t[e]&&""===n){s=!0;break}i+=t[e]}return""===n&&{value:i,index:e,tagClosed:s}}const m=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function x(t,e){const i=s(t,m),n={};for(let t=0;to.includes(t)?"__"+t:t,P={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,i){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:T};function S(t,e){if("string"!=typeof t)return;const i=t.toLowerCase();if(o.some(t=>i===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a.some(t=>i===t.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function A(t){return"boolean"==typeof t?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:"object"==typeof t&&null!==t?{enabled:!1!==t.enabled,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??100),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:A(!0)}const O=function(t){const e=Object.assign({},P,t),i=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(const{value:t,name:e}of i)t&&S(t,e);return null===e.onDangerousProperty&&(e.onDangerousProperty=T),e.processEntities=A(e.processEntities),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),e};let C;C="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class ${constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][C]={startIndex:e})}static getMetaDataSymbol(){return C}}class I{constructor(t){this.suppressValidationErr=!t,this.options=t}readDocType(t,e){const i=Object.create(null);let n=0;if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let s=1,r=!1,o=!1,a="";for(;e"===t[e]){if(o?"-"===t[e-1]&&"-"===t[e-2]&&(o=!1,s--):s--,0===s)break}else"["===t[e]?r=!0:a+=t[e];else{if(r&&M(t,"!ENTITY",e)){let s,r;if(e+=7,[s,r,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===r.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const t=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i[s]={regx:RegExp(`&${t};`,"g"),val:r},n++}}else if(r&&M(t,"!ELEMENT",e)){e+=8;const{index:i}=this.readElementExp(t,e+1);e=i}else if(r&&M(t,"!ATTLIST",e))e+=8;else if(r&&M(t,"!NOTATION",e)){e+=9;const{index:i}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=i}else{if(!M(t,"!--",e))throw new Error("Invalid DOCTYPE");o=!0}s++,a=""}if(0!==s)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}}readEntityExp(t,e){const i=e=j(t,e);for(;ethis.options.maxEntitySize)throw new Error(`Entity "${n}" size (${s.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,s,--e]}readNotationExp(t,e){const i=e=j(t,e);for(;e{for(;e0&&(this.path[this.path.length-1].values=void 0);const n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);const s=this.siblingStacks[n],r=i?`${i}:${t}`:t,o=s.get(r)||0;let a=0;for(const t of s.values())a+=t;s.set(r,o+1);const h={tag:t,position:a,counter:o};null!=i&&(h.namespace=i),null!=e&&(h.values=e),this.path.push(h)}pop(){if(0===this.path.length)return;const t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0===this.path.length)return;const e=this.path[this.path.length-1];return e.values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const i=t||this.separator;return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i)}toArray(){return this.path.map(t=>t.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e=0&&e>=0;){const n=t[i];if("deep-wildcard"===n.type){if(i--,i<0)return!0;const n=t[i];let s=!1;for(let t=e;t>=0;t--){const r=t===this.path.length-1;if(this._matchSegment(n,this.path[t],r)){e=t-1,i--,s=!0;break}}if(!s)return!1}else{const t=e===this.path.length-1;if(!this._matchSegment(n,this.path[e],t))return!1;e--,i--}}return i<0}_matchSegment(t,e,i){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!i)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue){const i=e.values[t.attrName];if(String(i)!==String(t.attrValue))return!1}}if(void 0!==t.position){if(!i)return!1;const n=e.counter??0;if("first"===t.position&&0!==n)return!1;if("odd"===t.position&&n%2!=1)return!1;if("even"===t.position&&n%2!=0)return!1;if("nth"===t.position&&n!==t.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t))}readOnly(){return new Proxy(this,{get(t,e,i){if(L.has(e))return()=>{throw new TypeError(`Cannot call '${e}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};const n=Reflect.get(t,e,i);return"path"===e||"siblingStacks"===e?Object.freeze(Array.isArray(n)?n.map(t=>t instanceof Map?Object.freeze(new Map(t)):Object.freeze({...t})):n):"function"==typeof n?n.bind(t):n},set(t,e){throw new TypeError(`Cannot set property '${String(e)}' on a read-only Matcher.`)},deleteProperty(t,e){throw new TypeError(`Cannot delete property '${String(e)}' from a read-only Matcher.`)}})}}class R{constructor(t,e={}){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let i=0,n="";for(;i0){const i=t.substring(0,e);if("xmlns"!==i)return i}}class W{constructor(t){var e;if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>rt(e,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>rt(e,16,"&#x")}},this.addExternalEntities=Y,this.parseXml=J,this.parseTextData=z,this.resolveNameSpace=X,this.buildAttributesMap=Z,this.isItStopNode=tt,this.replaceEntitiesValue=Q,this.readStopNodeData=nt,this.saveTextToParentTag=H,this.addChild=K,this.ignoreAttributesFn="function"==typeof(e=this.options.ignoreAttributes)?e:Array.isArray(e)?t=>{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new G,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let t=0;t0)){o||(t=this.replaceEntitiesValue(t,e,i));const n=this.options.jPath?i.toString():i,a=this.options.tagValueProcessor(e,t,n,s,r);return null==a?t:typeof a!=typeof t||a!==t?a:this.options.trimValues||t.trim()===t?st(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function X(t){if(this.options.removeNSPrefix){const e=t.split(":"),i="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=i+e[1])}return t}const q=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function Z(t,e,i){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,q),r=n.length,o={},a={};for(let t=0;t0&&"object"==typeof e&&e.updateCurrent&&e.updateCurrent(a);for(let t=0;t",r,"Closing Tag is not closed.");let s=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=s.indexOf(":");-1!==t&&(s=s.substr(t+1))}s=ot(this.options.transformTagName,s,"",this.options).tagName,i&&(n=this.saveTextToParentTag(n,i,this.readonlyMatcher));const o=this.matcher.getCurrentTag();if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: `);o&&-1!==this.options.unpairedTags.indexOf(o)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,i=this.tagsNodeStack.pop(),n="",r=e}else if("?"===t[r+1]){let e=it(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,i,this.readonlyMatcher),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new $(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,this.matcher,e.tagName)),this.addChild(i,t,this.readonlyMatcher,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=et(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const s=t.substring(r+4,e-2);n=this.saveTextToParentTag(n,i,this.readonlyMatcher),i.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}r=e}else if("!D"===t.substr(r+1,2)){const e=s.readDocType(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=et(t,"]]>",r,"CDATA is not closed.")-2,s=t.substring(r+9,e);n=this.saveTextToParentTag(n,i,this.readonlyMatcher);let o=this.parseTextData(s,i.tagname,this.readonlyMatcher,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?i.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):i.add(this.options.textNodeName,o),r=e+2}else{let s=it(t,r,this.options.removeNSPrefix);if(!s){const e=t.substring(Math.max(0,r-50),Math.min(t.length,r+50));throw new Error(`readTagExp returned undefined at position ${r}. Context: "${e}"`)}let o=s.tagName;const a=s.rawTagName;let h=s.tagExp,l=s.attrExpPresent,p=s.closeIndex;if(({tagName:o,tagExp:h}=ot(this.options.transformTagName,o,h,this.options)),this.options.strictReservedNames&&(o===this.options.commentPropName||o===this.options.cdataPropName||o===this.options.textNodeName||o===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${o}`);i&&n&&"!xml"!==i.tagname&&(n=this.saveTextToParentTag(n,i,this.readonlyMatcher,!1));const u=i;u&&-1!==this.options.unpairedTags.indexOf(u.tagname)&&(i=this.tagsNodeStack.pop(),this.matcher.pop());let c=!1;h.length>0&&h.lastIndexOf("/")===h.length-1&&(c=!0,"/"===o[o.length-1]?(o=o.substr(0,o.length-1),h=o):h=h.substr(0,h.length-1),l=o!==h);let d,f=null,g={};d=B(a),o!==e.tagname&&this.matcher.push(o,{},d),o!==h&&l&&(f=this.buildAttributesMap(h,this.matcher,o),f&&(g=U(f,this.options))),o!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));const m=r;if(this.isCurrentNodeStopNode){let e="";if(c)r=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(o))r=s.closeIndex;else{const i=this.readStopNodeData(t,a,p+1);if(!i)throw new Error(`Unexpected end of ${a}`);r=i.i,e=i.tagContent}const n=new $(o);f&&(n[":@"]=f),n.add(this.options.textNodeName,e),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(i,n,this.readonlyMatcher,m)}else{if(c){({tagName:o,tagExp:h}=ot(this.options.transformTagName,o,h,this.options));const t=new $(o);f&&(t[":@"]=f),this.addChild(i,t,this.readonlyMatcher,m),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(-1!==this.options.unpairedTags.indexOf(o)){const t=new $(o);f&&(t[":@"]=f),this.addChild(i,t,this.readonlyMatcher,m),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=s.closeIndex;continue}{const t=new $(o);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(i),f&&(t[":@"]=f),this.addChild(i,t,this.readonlyMatcher,m),i=t}}n="",r=p}}else n+=t[r];return e.child};function K(t,e,i,n){this.options.captureMetaData||(n=void 0);const s=this.options.jPath?i.toString():i,r=this.options.updateTag(e.tagname,s,e[":@"]);!1===r||("string"==typeof r?(e.tagname=r,t.addChild(e,n)):t.addChild(e,n))}function Q(t,e,i){const n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){const s=this.options.jPath?i.toString():i;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return t}if(n.tagFilter){const s=this.options.jPath?i.toString():i;if(!n.tagFilter(e,s))return t}for(const e of Object.keys(this.docTypeEntities)){const i=this.docTypeEntities[e],s=t.match(i.regx);if(s){if(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const e=t.length;if(t=t.replace(i.regx,i.val),n.maxExpandedLength&&(this.currentExpandedLength+=t.length-e,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}for(const e of Object.keys(this.lastEntities)){const i=this.lastEntities[e],s=t.match(i.regex);if(s&&(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);t=t.replace(i.regex,i.val)}if(-1===t.indexOf("&"))return t;if(this.options.htmlEntities)for(const e of Object.keys(this.htmlEntities)){const i=this.htmlEntities[e],s=t.match(i.regex);if(s&&(this.entityExpansionCount+=s.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);t=t.replace(i.regex,i.val)}return t.replace(this.ampEntity.regex,this.ampEntity.val)}function H(t,e,i,n){return t&&(void 0===n&&(n=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,i,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function tt(t,e){if(!t||0===t.length)return!1;for(let i=0;i"){let n,s="";for(let r=e;r",i,`${e} is not closed`);if(t.substring(i+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(n,i),i:r};i=r}else if("?"===t[i+1])i=et(t,"?>",i+1,"StopNode is not closed.");else if("!--"===t.substr(i+1,3))i=et(t,"--\x3e",i+3,"StopNode is not closed.");else if("!["===t.substr(i+1,2))i=et(t,"]]>",i,"StopNode is not closed.")-2;else{const n=it(t,i,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&s++,i=n.closeIndex)}}function st(t,e,i){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},k,e),!t||"string"!=typeof t)return t;let i=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(i))return t;if("0"===t)return 0;if(e.hex&&D.test(i))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(i);if(isFinite(i)){if(i.includes("e")||i.includes("E"))return function(t,e,i){if(!i.eNotation)return t;const n=e.match(F);if(n){let s=n[1]||"";const r=-1===n[3].indexOf("e")?"E":"e",o=n[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:(1!==o.length||!n[3].startsWith(`.${r}`)&&n[3][0]!==r)&&o.length>0?i.leadingZeros&&!a?(e=(n[1]||"")+n[3],Number(e)):t:Number(e)}return t}(t,i,e);{const s=V.exec(i);if(s){const r=s[1]||"",o=s[2];let a=(n=s[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n):n;const h=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!h))return t;{const n=Number(i),s=String(n);if(0===n)return n;if(-1!==s.search(/[eE]/))return e.eNotation?n:t;if(-1!==i.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?n:t;let h=o?a:i;return o?h===s||r+h===s?n:t:h===s||h===r+s?n:t}}return t}}var n;return function(t,e,i){const n=e===1/0;switch(i.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return t}}(t,Number(i),e)}(t,i)}return void 0!==t?t:""}function rt(t,e,i){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):i+t+";"}function ot(t,e,i,n){if(t){const n=t(e);i===e&&(i=n),e=n}return{tagName:e=at(e,n),tagExp:i}}function at(t,e){if(a.includes(t))throw new Error(`[SECURITY] Invalid name: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);return o.includes(t)?e.onDangerousProperty(t):t}const ht=$.getMetaDataSymbol();function lt(t,e){if(!t||"object"!=typeof t)return{};if(!e)return t;const i={};for(const n in t)n.startsWith(e)?i[n.substring(e.length)]=t[n]:i[n]=t[n];return i}function pt(t,e,i,n){return ut(t,e,i,n)}function ut(t,e,i,n){let s;const r={};for(let o=0;o0&&(r[e.textNodeName]=s):void 0!==s&&(r[e.textNodeName]=s),r}function ct(t){const e=Object.keys(t);for(let t=0;t0&&(i="\n");const n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let t=0;te.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(null!=t){let i=t.toString();return i=Tt(i,e),i}return""}for(let a=0;a`,o=!1,n.pop();continue}if(l===e.commentPropName){r+=i+`\x3c!--${h[l][0][e.textNodeName]}--\x3e`,o=!0,n.pop();continue}if("?"===l[0]){const t=wt(h[":@"],e,u),s="?xml"===l?"":i;let a=h[l][0][e.textNodeName];a=0!==a.length?" "+a:"",r+=s+`<${l}${a}${t}?>`,o=!0,n.pop();continue}let c=i;""!==c&&(c+=e.indentBy);const d=i+`<${l}${wt(h[":@"],e,u)}`;let f;f=u?bt(h[l],e):xt(h[l],e,c,n,s),-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?r+=d+">":r+=d+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?r+=d+`>${f}${i}`:(r+=d+">",f&&""!==i&&(f.includes("/>")||f.includes("`):r+=d+"/>",o=!0,n.pop()}return r}function Nt(t,e){if(!t||e.ignoreAttributes)return null;const i={};let n=!1;for(let s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s]=t[s],n=!0);return n?i:null}function bt(t,e){if(!Array.isArray(t))return null!=t?t.toString():"";let i="";for(let n=0;n${n}`:i+=`<${r}${t}/>`}}}return i}function Et(t,e){let i="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=t[n];!0===s&&e.suppressBooleanAttributes?i+=` ${n.substr(e.attributeNamePrefix.length)}`:i+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return i}function yt(t){const e=Object.keys(t);for(let i=0;i0&&e.processEntities)for(let i=0;i","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function St(t){if(this.options=Object.assign({},Pt,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let t=0;t{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ct),this.processTextOrObjNode=At,this.options.format?(this.indentate=Ot,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function At(t,e,i,n){const s=this.extractAttributes(t);if(n.push(e,s),this.checkStopNode(n)){const s=this.buildRawContent(t),r=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(s,e,r,i)}const r=this.j2x(t,i+1,n);return n.pop(),void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,r.attrStr,i,n):this.buildObjectNode(r.val,e,r.attrStr,i)}function Ot(t){return this.options.indentBy.repeat(t)}function Ct(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}St.prototype.build=function(t){if(this.options.preserveOrder)return mt(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});const e=new G;return this.j2x(t,0,e).val}},St.prototype.j2x=function(t,e,i){let n="",s="";if(this.options.maxNestedTags&&i.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const r=this.options.jPath?i.toString():i,o=this.checkStopNode(i);for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a))if(void 0===t[a])this.isAttribute(a)&&(s+="");else if(null===t[a])this.isAttribute(a)||a===this.options.cdataPropName?s+="":"?"===a[0]?s+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)s+=this.buildTextValNode(t[a],a,"",e,i);else if("object"!=typeof t[a]){const h=this.isAttribute(a);if(h&&!this.ignoreAttributesFn(h,r))n+=this.buildAttrPairStr(h,""+t[a],o);else if(!h)if(a===this.options.textNodeName){let e=this.options.tagValueProcessor(a,""+t[a]);s+=this.replaceEntitiesValue(e)}else{i.push(a);const n=this.checkStopNode(i);if(i.pop(),n){const i=""+t[a];s+=""===i?this.indentate(e)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(e)+"<"+a+">"+i+""+t+"${t}`;else if("object"==typeof t&&null!==t){const n=this.buildRawContent(t),s=this.buildAttributesForStopNode(t);e+=""===n?`<${i}${s}/>`:`<${i}${s}>${n}`}}else if("object"==typeof n&&null!==n){const t=this.buildRawContent(n),s=this.buildAttributesForStopNode(n);e+=""===t?`<${i}${s}/>`:`<${i}${s}>${t}`}else e+=`<${i}>${n}`}return e},St.prototype.buildAttributesForStopNode=function(t){if(!t||"object"!=typeof t)return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const i=t[this.options.attributesGroupName];for(let t in i){if(!Object.prototype.hasOwnProperty.call(i,t))continue;const n=t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t,s=i[t];!0===s&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+s+'"'}}else for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const n=this.isAttribute(i);if(n){const s=t[i];!0===s&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+s+'"'}}return e},St.prototype.buildObjectNode=function(t,e,i,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+i+"?"+this.tagEndChar:this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar;{let s=""+t+s}},St.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+i+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(n)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+i+">"+s+"0&&this.options.processEntities)for(let e=0;e { "use strict"; -module.exports = JSON.parse('{"name":"@google-cloud/storage","description":"Cloud Storage Client Library for Node.js","version":"7.11.1","license":"Apache-2.0","author":"Google Inc.","engines":{"node":">=14"},"repository":"googleapis/nodejs-storage","main":"./build/cjs/src/index.js","types":"./build/cjs/src/index.d.ts","type":"module","exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"files":["build/cjs/src","build/cjs/package.json","!build/cjs/src/**/*.map","build/esm/src","!build/esm/src/**/*.map"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google storage","storage"],"scripts":{"all-test":"npm test && npm run system-test && npm run samples-test","benchwrapper":"node bin/benchwrapper.js","check":"gts check","clean":"rm -rf build/","compile:cjs":"tsc -p ./tsconfig.cjs.json","compile:esm":"tsc -p .","compile":"npm run compile:cjs && npm run compile:esm","conformance-test":"mocha --parallel build/cjs/conformance-test/ --require build/cjs/conformance-test/globalHooks.js","docs-test":"linkinator docs","docs":"jsdoc -c .jsdoc.json","fix":"gts fix","lint":"gts check","postcompile":"cp ./src/package-json-helper.cjs ./build/cjs/src && cp ./src/package-json-helper.cjs ./build/esm/src","postcompile:cjs":"babel --plugins gapic-tools/build/src/replaceImportMetaUrl,gapic-tools/build/src/toggleESMFlagVariable build/cjs/src/util.js -o build/cjs/src/util.js && cp internal-tooling/helpers/package.cjs.json build/cjs/package.json","precompile":"rm -rf build/","preconformance-test":"npm run compile:cjs -- --sourceMap","predocs-test":"npm run docs","predocs":"npm run compile:cjs -- --sourceMap","prelint":"cd samples; npm link ../; npm install","prepare":"npm run compile","presystem-test:esm":"npm run compile:esm","presystem-test":"npm run compile -- --sourceMap","pretest":"npm run compile -- --sourceMap","samples-test":"npm link && cd samples/ && npm link ../ && npm test && cd ../","system-test:esm":"mocha build/esm/system-test --timeout 600000 --exit","system-test":"mocha build/cjs/system-test --timeout 600000 --exit","test":"c8 mocha build/cjs/test"},"dependencies":{"@google-cloud/paginator":"^5.0.0","@google-cloud/projectify":"^4.0.0","@google-cloud/promisify":"^4.0.0","abort-controller":"^3.0.0","async-retry":"^1.3.3","duplexify":"^4.1.3","fast-xml-parser":"^4.3.0","gaxios":"^6.0.2","google-auth-library":"^9.6.3","html-entities":"^2.5.2","mime":"^3.0.0","p-limit":"^3.0.1","retry-request":"^7.0.0","teeny-request":"^9.0.0","uuid":"^8.0.0"},"devDependencies":{"@babel/cli":"^7.22.10","@babel/core":"^7.22.11","@google-cloud/pubsub":"^4.0.0","@grpc/grpc-js":"^1.0.3","@grpc/proto-loader":"^0.7.0","@types/async-retry":"^1.4.3","@types/duplexify":"^3.6.4","@types/mime":"^3.0.0","@types/mocha":"^9.1.1","@types/mockery":"^1.4.29","@types/node":"^20.4.4","@types/node-fetch":"^2.1.3","@types/proxyquire":"^1.3.28","@types/request":"^2.48.4","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^8.0.0","@types/yargs":"^17.0.10","c8":"^9.0.0","form-data":"^4.0.0","gapic-tools":"^0.4.0","gts":"^5.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^3.0.0","jsdoc-region-tag":"^3.0.0","linkinator":"^4.0.0","mocha":"^9.2.2","mockery":"^2.1.0","nock":"~13.5.0","node-fetch":"^2.6.7","pack-n-play":"^2.0.0","proxyquire":"^2.1.3","sinon":"^17.0.0","tmp":"^0.2.0","typescript":"^5.1.6","yargs":"^17.3.1"}}'); +module.exports = JSON.parse('{"name":"@google-cloud/storage","description":"Cloud Storage Client Library for Node.js","version":"7.19.0","license":"Apache-2.0","author":"Google Inc.","engines":{"node":">=14"},"repository":"googleapis/nodejs-storage","main":"./build/cjs/src/index.js","types":"./build/cjs/src/index.d.ts","type":"module","exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"files":["build/cjs/src","build/cjs/package.json","!build/cjs/src/**/*.map","build/esm/src","!build/esm/src/**/*.map"],"keywords":["google apis client","google api client","google apis","google api","google","google cloud platform","google cloud","cloud","google storage","storage"],"scripts":{"all-test":"npm test && npm run system-test && npm run samples-test","benchwrapper":"node bin/benchwrapper.js","check":"gts check","clean":"rm -rf build/","compile:cjs":"tsc -p ./tsconfig.cjs.json","compile:esm":"tsc -p .","compile":"npm run compile:cjs && npm run compile:esm","conformance-test":"mocha --parallel build/cjs/conformance-test/ --require build/cjs/conformance-test/globalHooks.js","docs-test":"linkinator docs","docs":"jsdoc -c .jsdoc.json","fix":"gts fix","lint":"gts check","postcompile":"cp ./src/package-json-helper.cjs ./build/cjs/src && cp ./src/package-json-helper.cjs ./build/esm/src","postcompile:cjs":"babel --plugins gapic-tools/build/src/replaceImportMetaUrl,gapic-tools/build/src/toggleESMFlagVariable build/cjs/src/util.js -o build/cjs/src/util.js && cp internal-tooling/helpers/package.cjs.json build/cjs/package.json","precompile":"rm -rf build/","preconformance-test":"npm run compile:cjs -- --sourceMap","predocs-test":"npm run docs","predocs":"npm run compile:cjs -- --sourceMap","prelint":"cd samples; npm link ../; npm install","prepare":"npm run compile","presystem-test:esm":"npm run compile:esm","presystem-test":"npm run compile -- --sourceMap","pretest":"npm run compile -- --sourceMap","samples-test":"npm link && cd samples/ && npm link ../ && npm test && cd ../","system-test:esm":"mocha build/esm/system-test --timeout 600000 --exit","system-test":"mocha build/cjs/system-test --timeout 600000 --exit","test":"c8 mocha build/cjs/test"},"dependencies":{"@google-cloud/paginator":"^5.0.0","@google-cloud/projectify":"^4.0.0","@google-cloud/promisify":"<4.1.0","abort-controller":"^3.0.0","async-retry":"^1.3.3","duplexify":"^4.1.3","fast-xml-parser":"^5.3.4","gaxios":"^6.0.2","google-auth-library":"^9.6.3","html-entities":"^2.5.2","mime":"^3.0.0","p-limit":"^3.0.1","retry-request":"^7.0.0","teeny-request":"^9.0.0","uuid":"^8.0.0"},"devDependencies":{"@babel/cli":"^7.22.10","@babel/core":"^7.22.11","@google-cloud/pubsub":"^4.0.0","@grpc/grpc-js":"^1.0.3","@grpc/proto-loader":"^0.8.0","@types/async-retry":"^1.4.3","@types/duplexify":"^3.6.4","@types/mime":"^3.0.0","@types/mocha":"^9.1.1","@types/mockery":"^1.4.29","@types/node":"^24.0.0","@types/node-fetch":"^2.1.3","@types/proxyquire":"^1.3.28","@types/request":"^2.48.4","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^8.0.0","@types/yargs":"^17.0.10","c8":"^9.0.0","form-data":"^4.0.4","gapic-tools":"^0.4.0","gts":"^5.0.0","jsdoc":"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0","linkinator":"^3.0.0","mocha":"^9.2.2","mockery":"^2.1.0","nock":"~13.5.0","node-fetch":"^2.6.7","pack-n-play":"^2.0.0","proxyquire":"^2.1.3","sinon":"^18.0.0","nise":"6.0.0","path-to-regexp":"6.3.0","tmp":"^0.2.0","typescript":"^5.1.6","yargs":"^17.3.1"}}'); /***/ }), @@ -170549,7 +178023,7 @@ module.exports = JSON.parse('{"name":"@google-cloud/storage","description":"Clou /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"gaxios","version":"6.6.0","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/src/index.js","types":"build/src/index.d.ts","files":["build/src"],"scripts":{"lint":"gts check","test":"c8 mocha build/test","presystem-test":"npm run compile","system-test":"mocha build/system-test --timeout 80000","compile":"tsc -p .","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"compodoc src/","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean","precompile":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=14"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@compodoc/compodoc":"1.1.21","@types/cors":"^2.8.6","@types/express":"^4.16.1","@types/extend":"^3.0.1","@types/mocha":"^9.0.0","@types/multiparty":"0.0.36","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.0.0","@types/node-fetch":"^2.5.7","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^9.0.0","abort-controller":"^3.0.0","assert":"^2.0.0","browserify":"^17.0.0","c8":"^8.0.0","cors":"^2.8.5","execa":"^5.0.0","express":"^4.16.4","form-data":"^4.0.0","gts":"^5.0.0","is-docker":"^2.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","linkinator":"^4.0.0","mocha":"^8.0.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","puppeteer":"^21.0.0","sinon":"^17.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.35.0","webpack-cli":"^4.0.0"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","is-stream":"^2.0.0","node-fetch":"^2.6.9","uuid":"^9.0.1"}}'); +module.exports = JSON.parse('{"name":"gaxios","version":"6.7.1","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/src/index.js","types":"build/src/index.d.ts","files":["build/src"],"scripts":{"lint":"gts check","test":"c8 mocha build/test","presystem-test":"npm run compile","system-test":"mocha build/system-test --timeout 80000","compile":"tsc -p .","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"compodoc src/","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean","precompile":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=14"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@compodoc/compodoc":"1.1.19","@types/cors":"^2.8.6","@types/express":"^4.16.1","@types/extend":"^3.0.1","@types/mocha":"^9.0.0","@types/multiparty":"0.0.36","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.0.0","@types/node-fetch":"^2.5.7","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","@types/uuid":"^10.0.0","abort-controller":"^3.0.0","assert":"^2.0.0","browserify":"^17.0.0","c8":"^8.0.0","cheerio":"1.0.0-rc.10","cors":"^2.8.5","execa":"^5.0.0","express":"^4.16.4","form-data":"^4.0.0","gts":"^5.0.0","is-docker":"^2.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","linkinator":"^3.0.0","mocha":"^8.0.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","puppeteer":"^19.0.0","sinon":"^18.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.35.0","webpack-cli":"^4.0.0"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","is-stream":"^2.0.0","node-fetch":"^2.6.9","uuid":"^9.0.1"}}'); /***/ }), @@ -170557,7 +178031,7 @@ module.exports = JSON.parse('{"name":"gaxios","version":"6.6.0","description":"A /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"google-auth-library","version":"9.10.0","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=14"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^6.1.1","gcp-metadata":"^6.1.0","gtoken":"^7.0.0","jws":"^4.0.0"},"devDependencies":{"@compodoc/compodoc":"1.1.23","@types/base64-js":"^1.2.5","@types/chai":"^4.1.7","@types/jws":"^3.1.0","@types/mocha":"^9.0.0","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.4.2","@types/sinon":"^10.0.0","assert-rejects":"^1.0.0","c8":"^8.0.0","chai":"^4.2.0","codecov":"^3.0.2","execa":"^5.0.0","gts":"^5.0.0","is-docker":"^2.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","keypair":"^1.0.4","linkinator":"^4.0.0","mocha":"^9.2.2","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","puppeteer":"^21.0.0","sinon":"^15.0.0","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"compodoc src/","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install","precompile":"gts clean"},"license":"Apache-2.0"}'); +module.exports = JSON.parse('{"name":"google-auth-library","version":"9.15.1","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=14"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^6.1.1","gcp-metadata":"^6.1.0","gtoken":"^7.0.0","jws":"^4.0.0"},"devDependencies":{"@types/base64-js":"^1.2.5","@types/chai":"^4.1.7","@types/jws":"^3.1.0","@types/mocha":"^9.0.0","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^20.4.2","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0","c8":"^8.0.0","chai":"^4.2.0","cheerio":"1.0.0-rc.12","codecov":"^3.0.2","engine.io":"6.6.2","gts":"^5.0.0","is-docker":"^2.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^3.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"5.0.0","keypair":"^1.0.4","linkinator":"^4.0.0","mocha":"^9.2.2","mv":"^2.1.1","ncp":"^2.0.0","nock":"^13.0.0","null-loader":"^4.0.0","pdfmake":"0.2.12","puppeteer":"^21.0.0","sinon":"^18.0.0","ts-loader":"^8.0.0","typescript":"^5.1.6","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"jsdoc -c .jsdoc.json","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install","precompile":"gts clean"},"license":"Apache-2.0"}'); /***/ }), @@ -170569,7 +178043,7 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":" /***/ }), -/***/ 1907: +/***/ 72020: /***/ ((module) => { "use strict"; diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 3503748af..b4035c6e6 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -8,6 +8,9 @@ - [Amazon Corretto](#Amazon-Corretto) - [Oracle](#Oracle) - [Alibaba Dragonwell](#Alibaba-Dragonwell) + - [SapMachine](#SapMachine) + - [GraalVM](#GraalVM) + - [JetBrains](#JetBrains) - [Installing custom Java package type](#Installing-custom-Java-package-type) - [Installing custom Java architecture](#Installing-custom-Java-architecture) - [Installing custom Java distribution from local file](#Installing-Java-from-local-file) @@ -28,8 +31,8 @@ Inputs `java-version` and `distribution` are mandatory and needs to be provided. ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '21' @@ -41,8 +44,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'adopt-hotspot' java-version: '11' @@ -53,8 +56,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'zulu' java-version: '21' @@ -66,8 +69,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'liberica' java-version: '21' @@ -79,8 +82,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'microsoft' java-version: '21' @@ -94,7 +97,7 @@ steps: To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action: ```yaml -uses: actions/setup-java@v4 +uses: actions/setup-java@v5 with: token: ${{ secrets.GH_DOTCOM_TOKEN }} distribution: 'microsoft' @@ -108,8 +111,8 @@ If the runner is not able to access github.com, any Java versions requested duri ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'corretto' java-version: '21' @@ -121,8 +124,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'oracle' java-version: '21' @@ -134,19 +137,90 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'dragonwell' java-version: '8' - run: java -cp java HelloWorldApp ``` +### SapMachine +**NOTE:** An OpenJDK release maintained and supported by SAP +```yaml +steps: +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 + with: + distribution: 'sapmachine' + java-version: '21' +- run: java -cp java HelloWorldApp +``` + +### GraalVM +**NOTE:** Oracle GraalVM is only available for JDK 17 and later. + +```yaml +steps: +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 + with: + distribution: 'graalvm' + java-version: '21' +- run: | + java -cp java HelloWorldApp + native-image -cp java HelloWorldApp +``` + +### JetBrains + +**NOTE:** JetBrains is only available for LTS versions on 11 or later (11, 17, 21, etc.). + +Not all minor LTS versions are guarenteed to be available, since JetBrains considers what to ship IntelliJ IDEA with, most commonly on JDK 11. +For example, `11.0.24` is not available but `11.0.16` is. + +```yaml +steps: +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 + with: + distribution: 'jetbrains' + java-version: '11' +- run: java -cp java HelloWorldApp +``` + +The JetBrains installer uses the GitHub API to fetch the latest version. If you believe your project is going to be running into rate limits, you can provide a +GitHub token to the action to increase the rate limit. Set the `GITHUB_TOKEN` environment variable to the value of your GitHub token in the workflow file. + +```yaml +steps: +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 + with: + distribution: 'jetbrains' + java-version: '17' + java-package: 'jdk' # optional (jdk, jre, jdk+jcef, jre+jcef, jdk+ft, or jre+ft) - defaults to jdk + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +- run: java -cp java HelloWorldApp +``` + +You can specify your package type (as shown in the [releases page](https://github.com/JetBrains/JetBrainsRuntime/releases/)) in the `java-package` parameter. +The available package types are: + +- `jdk` - JBRSDK +- `jre` - JBR (Vanilla) +- `jdk+jcef` - JBRSDK with JCEF +- `jre+jcef` - JBR with JCEF +- `jdk+ft` - JBRSDK (FreeType) +- `jre+ft` - JBR (FreeType) + + ## Installing custom Java package type ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: '' java-version: '11' @@ -154,13 +228,12 @@ steps: - run: java -cp java HelloWorldApp ``` - ## Installing custom Java architecture ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: '' java-version: '11' @@ -176,7 +249,7 @@ steps: - run: | download_url="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz" wget -O $RUNNER_TEMP/java_package.tar.gz $download_url -- uses: actions/setup-java@v4 +- uses: actions/setup-java@v5 with: distribution: 'jdkfile' jdkFile: ${{ runner.temp }}/java_package.tar.gz @@ -202,7 +275,7 @@ If your use-case requires a custom distribution (in the example, alpine-linux is latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver') echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT" - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'jdkfile' jdkFile: ${{ runner.temp }}/java_package.tar.gz @@ -223,9 +296,9 @@ jobs: java: [ '8', '11' ] name: Java ${{ matrix.Java }} (${{ matrix.distribution }}) sample steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java }} @@ -243,9 +316,9 @@ jobs: os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] name: Java ${{ matrix.Java }} (${{ matrix.os }}) sample steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: ${{ matrix.java }} @@ -260,9 +333,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up JDK 11 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: '' java-version: '11' @@ -276,7 +349,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password - name: Set up Apache Maven Central - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: # running setup-java again overwrites the settings.xml distribution: 'temurin' java-version: '11' @@ -373,9 +446,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up JDK 11 for Shared Runner - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: '' java-version: '11' @@ -399,10 +472,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up JDK 11 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: '' java-version: '11' @@ -436,14 +509,14 @@ Subsequent calls to `setup-java` with distinct distribution and version paramete ```yaml steps: -- uses: actions/setup-java@v4 +- uses: actions/setup-java@v5 with: distribution: '' java-version: | 8 11 -- uses: actions/setup-java@v4 +- uses: actions/setup-java@v5 with: distribution: '' java-version: '15' @@ -455,7 +528,7 @@ The result is a Toolchain with entries for JDKs 8, 11 and 15. You can even combi - run: | download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz" wget -O $RUNNER_TEMP/java_package.tar.gz $download_url -- uses: actions/setup-java@v4 +- uses: actions/setup-java@v5 with: distribution: 'jdkfile' jdkFile: ${{ runner.temp }}/java_package.tar.gz @@ -472,7 +545,7 @@ Each JDK provider will receive a default `vendor` using the `distribution` input - run: | download_url="https://example.com/java/jdk/6u45-b06/jdk-6u45-linux-x64.tar.gz" wget -O $RUNNER_TEMP/java_package.tar.gz $download_url -- uses: actions/setup-java@v4 +- uses: actions/setup-java@v5 with: distribution: 'jdkfile' jdkFile: ${{ runner.temp }}/java_package.tar.gz @@ -487,7 +560,7 @@ In case you install multiple versions of Java at once with multi-line `java-vers ```yaml steps: -- uses: actions/setup-java@v4 +- uses: actions/setup-java@v5 with: distribution: '' java-version: | @@ -501,8 +574,8 @@ Each JDK provider will receive a default `id` based on the combination of `distr ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-java@v4 +- uses: actions/checkout@v6 +- uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '11' @@ -514,7 +587,7 @@ In case you install multiple versions of Java at once you can use the same synta ```yaml steps: -- uses: actions/setup-java@v4 +- uses: actions/setup-java@v5 with: distribution: '' java-version: | @@ -528,18 +601,37 @@ steps: ## Java version file If the `java-version-file` input is specified, the action will extract the version from the file and install it. - Supported files are .java-version and .tool-versions. - In .java-version file, only the version should be specified (e.g., 17.0.7). - In .tool-versions file, java version should be preceded by the java keyword (e.g., java 17.0.7). - The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv). Similarly, the `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning (semver). - - If both java-version and java-version-file inputs are provided, the java-version input will be used. + Supported files are `.java-version`, `.tool-versions` and `.sdkmanrc`. + * In `.java-version` file, only the version should be specified (e.g., 17.0.7). The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv). + * In `.tool-versions` file, java version should be preceded by the java keyword (e.g., java 17.0.7). The `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning ([semver](https://semver.org/)). + * In `.sdkmanrc` file, java version should be preceded by the `java=` prefix (e.g., java=17.0.7-tem) and include the distribution. The `.sdkmanrc` file supports version specifications in accordance with [file format](https://sdkman.io/usage#env-command), see [Sdkman! documentation](https://sdkman.io/jdks) for more information. -Valid entry options: + + If both `java-version` and `java-version-file` **inputs** are provided, the `java-version` input will be used. + +**Example step using `Sdkman!`**: +```yml + - name: Setup java + uses: actions/setup-java@v5 + with: + java-version-file: '.sdkmanrc' + distribution: 'temurin' +``` + +**Example `.sdkmanrc`**: +``` +java=17.0.7-tem +``` + +Valid entry options (does not apply to `.sdkmanrc`): ``` major versions: 8, 11, 16, 17, 21 more specific versions: 8.0.282+8, 8.0.232, 11.0, 11.0.4, 17.0 early access (EA) versions: 15-ea, 15.0.0-ea versions with specified distribution: openjdk64-11.0.2 +LTS versions : temurin-21.0.5+11.0.LTS ``` If the file contains multiple versions, only the first one will be recognized. + +***NOTE***: +For the tool-version file, ensure that you use standard semantic versioning (semver) formats, as non-standard formats (such as jetbrains-21b212.1) may not be parsed correctly. Additionally, for complex version strings containing multiple version-like segments (for example, java semeru-openj9-11.0.15+10_openj9-0.32.0), the extraction logic may incorrectly capture the last segment (0.32.0) instead of the main version (11.0.15+10). diff --git a/docs/contributors.md b/docs/contributors.md index 7196d482e..0d49925a0 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -68,7 +68,7 @@ Pull requests are the easiest way to contribute changes to git repos at GitHub. Adding or changing tests is an integral part of making a change to the code. Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workflows` folder, particularly take a look at the files with `e2e` prefix, for instance, [e2e-cache.yml](https://github.com/actions/setup-java/blob/main/.github/workflows/e2e-cache.yml). -- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in his opinion, will be necessary and sufficient for testing new or changed functionality +- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in their opinion, will be necessary and sufficient for testing new or changed functionality - Tests should cover a successful execution, as well as some edge cases and possible errors - As already mentioned, pull requests without tests will be considered more carefully by maintainers. If you are sure that in this situation the tests are not needed or cannot be implemented with a commensurate effort - please add this clarification message to your pull request @@ -76,7 +76,7 @@ Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workf - CI will start automatically with some checks. Wait until the end of the execution and make sure that all checks passed successfully. If some checks fail, you can open them one by one, try to find the reason for failing and make changes to your code to resolve the problem - Maintainers will review your pull request -- If a maintainer requests changes, first of all, try to think about his request critically and only after that implement and request another review +- If a maintainer requests changes, first of all, try to think about their request critically and only after that implement and request another review - If your PR gets accepted, it will soon be merged into the main branch. But your contribution will take effect only after the release of a new version of the action and updating the major tag > Sometimes maintainers reject pull requests and that's ok! Usually, along with rejection, we supply the reason for it. Nonetheless, we still really appreciate you taking the time to do it, and we don't take that lightly :heart: diff --git a/package-lock.json b/package-lock.json index 0dad7af9d..73f45a92e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,40 +1,43 @@ { "name": "setup-java", - "version": "4.1.0", + "version": "5.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "setup-java", - "version": "4.1.0", + "version": "5.2.0", "license": "MIT", "dependencies": { "@actions/cache": "npm:github-actions.warp-cache@1.4.7", "@actions/core": "^1.10.0", "@actions/exec": "^1.0.4", - "@actions/glob": "^0.4.0", - "@actions/http-client": "^2.2.1", + "@actions/glob": "^0.5.0", + "@actions/http-client": "^2.2.3", "@actions/io": "^1.0.2", "@actions/tool-cache": "^2.0.1", "semver": "^7.6.0", "xmlbuilder2": "^2.4.0" }, "devDependencies": { - "@types/jest": "^29.5.12", - "@types/node": "^20.11.24", + "@types/jest": "^29.5.14", + "@types/node": "^24.1.0", "@types/semver": "^7.5.8", - "@typescript-eslint/eslint-plugin": "^5.54.0", - "@typescript-eslint/parser": "^5.54.0", + "@typescript-eslint/eslint-plugin": "^8.35.1", + "@typescript-eslint/parser": "^8.35.1", "@vercel/ncc": "^0.38.1", "eslint": "^8.57.0", "eslint-config-prettier": "^8.6.0", - "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-jest": "^29.0.1", "eslint-plugin-node": "^11.1.0", "jest": "^29.7.0", "jest-circus": "^29.7.0", - "prettier": "^2.8.4", - "ts-jest": "^29.1.2", + "prettier": "^3.6.2", + "ts-jest": "^29.3.0", "typescript": "^5.3.3" + }, + "engines": { + "node": ">=24.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -74,6 +77,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.2.tgz", "integrity": "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==", + "license": "MIT", "dependencies": { "@actions/core": "^1.2.6", "minimatch": "^3.0.4" @@ -88,20 +92,12 @@ } }, "node_modules/@actions/core": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", - "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", + "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", "dependencies": { - "@actions/http-client": "^2.0.1", - "uuid": "^8.3.2" - } - }, - "node_modules/@actions/core/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" + "@actions/exec": "^1.1.1", + "@actions/http-client": "^2.0.1" } }, "node_modules/@actions/exec": { @@ -113,21 +109,25 @@ } }, "node_modules/@actions/github": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", - "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.1.tgz", + "integrity": "sha512-xbZVcaqD4XnQAe35qSQqskb3SqIAfRyLBrHMd/8TuL7hJSz2QtbDwnNM8zWx4zO5l2fnGtseNE3MbEvD7BxVMw==", "license": "MIT", "dependencies": { "@actions/http-client": "^2.2.0", "@octokit/core": "^5.0.1", - "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.0.0" + "@octokit/plugin-paginate-rest": "^9.2.2", + "@octokit/plugin-rest-endpoint-methods": "^10.4.0", + "@octokit/request": "^8.4.1", + "@octokit/request-error": "^5.1.1", + "undici": "^5.28.5" } }, "node_modules/@actions/glob": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.4.0.tgz", - "integrity": "sha512-+eKIGFhsFa4EBwaf/GMyzCdWrXWymGXfFmZU3FHQvYS8mPcHtTtZONbkcqqUMzw9mJ/pImEBFET1JNifhqGsAQ==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.0.tgz", + "integrity": "sha512-tST2rjPvJLRZLuT9NMUtyBjvj9Yo0MiJS3ow004slMvm8GFM+Zv9HvMJ7HWzfUyJnGrJvDsYkWBaaG3YKXRtCw==", + "license": "MIT", "dependencies": { "@actions/core": "^1.9.1", "minimatch": "^3.0.4" @@ -194,17 +194,17 @@ } }, "node_modules/@azure/core-auth": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.9.0.tgz", - "integrity": "sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.10.1.tgz", + "integrity": "sha512-ykRMW8PjVAn+RS6ww5cmK9U2CyH9p4Q88YJwvUslfuMmN98w/2rdGRLPqJYObapBCdzBVeDgYWdJnFPFb7qzpg==", "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.11.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-util": "^1.13.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-auth/node_modules/@azure/abort-controller": { @@ -220,28 +220,26 @@ } }, "node_modules/@azure/core-client": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.9.3.tgz", - "integrity": "sha512-/wGw8fJ4mdpJ1Cum7s1S+VQyXt1ihwKLzfabS1O/RDADnmzVc01dHn44qD0BvGH6KlZNzOMW95tEpKqhkCChPA==", - "license": "MIT", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.10.1.tgz", + "integrity": "sha512-Nh5PhEOeY6PrnxNPsEHRr9eimxLwgLlpmguQaHKBinFYA/RU9+kOYVOQqOrTsCL+KSxrLLl1gD8Dk5BFW/7l/w==", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.9.1", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.6.1", - "@azure/logger": "^1.0.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-rest-pipeline": "^1.22.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-client/node_modules/@azure/abort-controller": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "license": "MIT", "dependencies": { "tslib": "^2.6.2" }, @@ -250,24 +248,22 @@ } }, "node_modules/@azure/core-http-compat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.2.0.tgz", - "integrity": "sha512-1kW8ZhN0CfbNOG6C688z5uh2yrzALE7dDXHiR9dY4vt+EbhGZQSbjDa5bQd2rf3X2pdWMsXbqbArxUyeNdvtmg==", - "license": "MIT", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.3.1.tgz", + "integrity": "sha512-az9BkXND3/d5VgdRRQVkiJb2gOmDU8Qcq4GvjtBmDICNiQ9udFmDk4ZpSB5Qq1OmtDJGlQAfBaS4palFsazQ5g==", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-client": "^1.3.0", - "@azure/core-rest-pipeline": "^1.19.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-client": "^1.10.0", + "@azure/core-rest-pipeline": "^1.22.0" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-http-compat/node_modules/@azure/abort-controller": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "license": "MIT", "dependencies": { "tslib": "^2.6.2" }, @@ -279,7 +275,6 @@ "version": "2.7.2", "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz", "integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==", - "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-util": "^1.2.0", @@ -294,7 +289,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "license": "MIT", "dependencies": { "tslib": "^2.6.2" }, @@ -306,7 +300,6 @@ "version": "1.6.2", "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.6.2.tgz", "integrity": "sha512-YKWi9YuCU04B55h25cnOYZHxXYtEvQEbKST5vqRga7hWY9ydd3FZHdeQF8pyh+acWZvppw13M/LMGx0LABUVMA==", - "license": "MIT", "dependencies": { "tslib": "^2.6.2" }, @@ -315,22 +308,21 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.19.1.tgz", - "integrity": "sha512-zHeoI3NCs53lLBbWNzQycjnYKsA1CVKlnzSNuSFcUDwBp8HHVObePxrM7HaX+Ha5Ks639H7chNC9HOaIhNS03w==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.22.2.tgz", + "integrity": "sha512-MzHym+wOi8CLUlKCQu12de0nwcq9k9Kuv43j4Wa++CsCpJwps2eeBQwD2Bu8snkxTtDKDx4GwjuR9E8yC8LNrg==", "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.8.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.10.0", + "@azure/core-tracing": "^1.3.0", + "@azure/core-util": "^1.13.0", + "@azure/logger": "^1.3.0", + "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller": { @@ -345,42 +337,29 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/@azure/core-tracing": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.2.0.tgz", - "integrity": "sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==", - "license": "MIT", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.3.1.tgz", + "integrity": "sha512-9MWKevR7Hz8kNzzPLfX4EAtGM2b8mr50HPDBvio96bURP/9C+HjdH3sBlLSNNrvRAr5/k/svoH457gB5IKpmwQ==", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-util": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.11.0.tgz", - "integrity": "sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.13.1.tgz", + "integrity": "sha512-XPArKLzsvl0Hf0CaGyKHUyVgF7oDnhKoP85Xv6M4StF/1AhfORhZudHtOyf2s+FcbuQ9dPRAjB8J2KvRRMUK2A==", "license": "MIT", "dependencies": { - "@azure/abort-controller": "^2.0.0", + "@azure/abort-controller": "^2.1.2", + "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/core-util/node_modules/@azure/abort-controller": { @@ -396,64 +375,35 @@ } }, "node_modules/@azure/core-xml": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.4.5.tgz", - "integrity": "sha512-gT4H8mTaSXRz7eGTuQyq1aIJnJqeXzpOe9Ay7Z3FrCouer14CbV3VzjnJrNrQfbBpGBLO9oy8BmrY75A0p53cA==", - "license": "MIT", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.5.0.tgz", + "integrity": "sha512-D/sdlJBMJfx7gqoj66PKVmhDDaU6TKA49ptcolxdas29X7AfvLTmfAGLjAcIMBK7UZ2o4lygHIqVckOlQU3xWw==", "dependencies": { "fast-xml-parser": "^5.0.7", "tslib": "^2.8.1" }, "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-xml/node_modules/fast-xml-parser": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.0.9.tgz", - "integrity": "sha512-2mBwCiuW3ycKQQ6SOesSB8WeF+fIGb6I/GG5vU5/XEptwFFhp9PE8b9O7fbs2dpq9fXn4ULR3UsfydNUCntf5A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - } - ], - "license": "MIT", - "dependencies": { - "strnum": "^2.0.5" - }, - "bin": { - "fxparser": "src/cli/cli.js" + "node": ">=20.0.0" } }, - "node_modules/@azure/core-xml/node_modules/strnum": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.0.5.tgz", - "integrity": "sha512-YAT3K/sgpCUxhxNMrrdhtod3jckkpYwH6JAuwmUdXZsmzH1wUyzTMrrK2wYCEEqlKwrWDd35NeuUkbBy/1iK+Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - } - ], - "license": "MIT" - }, "node_modules/@azure/logger": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz", - "integrity": "sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz", + "integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==", "license": "MIT", "dependencies": { + "@typespec/ts-http-runtime": "^0.3.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/ms-rest-js": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz", "integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==", + "license": "MIT", "dependencies": { "@azure/core-auth": "^1.1.4", "abort-controller": "^3.0.0", @@ -468,45 +418,46 @@ "node_modules/@azure/ms-rest-js/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" }, "node_modules/@azure/ms-rest-js/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/@azure/storage-blob": { - "version": "12.27.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.27.0.tgz", - "integrity": "sha512-IQjj9RIzAKatmNca3D6bT0qJ+Pkox1WZGOg2esJF2YLHb45pQKOwGPIAV+w3rfgkj7zV3RMxpn/c6iftzSOZJQ==", - "license": "MIT", + "version": "12.29.1", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.29.1.tgz", + "integrity": "sha512-7ktyY0rfTM0vo7HvtK6E3UvYnI9qfd6Oz6z/+92VhGRveWng3kJwMKeUpqmW/NmwcDNbxHpSlldG+vsUnRFnBg==", "dependencies": { "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.4.0", - "@azure/core-client": "^1.6.2", - "@azure/core-http-compat": "^2.0.0", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.3", + "@azure/core-http-compat": "^2.2.0", "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.10.1", - "@azure/core-tracing": "^1.1.2", - "@azure/core-util": "^1.6.1", - "@azure/core-xml": "^1.4.3", - "@azure/logger": "^1.0.0", + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/core-xml": "^1.4.5", + "@azure/logger": "^1.1.4", + "@azure/storage-common": "^12.1.1", "events": "^3.0.0", - "tslib": "^2.2.0" + "tslib": "^2.8.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "license": "MIT", "dependencies": { "tslib": "^2.6.2" }, @@ -514,88 +465,49 @@ "node": ">=18.0.0" } }, - "node_modules/@babel/code-frame": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.4.tgz", - "integrity": "sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, + "node_modules/@azure/storage-common": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@azure/storage-common/-/storage-common-12.1.1.tgz", + "integrity": "sha512-eIOH1pqFwI6UmVNnDQvmFeSg0XppuzDLFeUNO/Xht7ODAzRLgGDh7h550pSxoA+lPDxBl1+D2m/KG3jWzCUjTg==", "dependencies": { - "color-convert": "^1.9.0" + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-http-compat": "^2.2.0", + "@azure/core-rest-pipeline": "^1.19.1", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "@azure/logger": "^1.1.4", + "events": "^3.3.0", + "tslib": "^2.8.1" }, "engines": { - "node": ">=4" + "node": ">=20.0.0" } }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, + "node_modules/@azure/storage-common/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" + "node": ">=18.0.0" } }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { @@ -785,19 +697,21 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -812,109 +726,28 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.4.tgz", - "integrity": "sha512-HfcMizYz10cr3h29VqyfGL6ZWIjTwWfvYBMsBVGwpcbhNGe3wQ1ZXZRPzZoAHhd9OqHadHqjQ89iVKINXnbzuw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.4", - "@babel/types": "^7.23.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@babel/parser": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@babel/types": "^7.26.10" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.4.tgz", - "integrity": "sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -1100,14 +933,15 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -1144,14 +978,14 @@ } }, "node_modules/@babel/types": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.4.tgz", - "integrity": "sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1164,16 +998,19 @@ "dev": true }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } @@ -1231,6 +1068,7 @@ "version": "5.0.2", "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-5.0.2.tgz", "integrity": "sha512-DJS3s0OVH4zFDB1PzjxAsHqJT6sKVbRwwML0ZBP9PbU7Yebtu/7SWMRzvO2J3nUi9pRNITCfu4LJeooM2w4pjg==", + "license": "Apache-2.0", "dependencies": { "arrify": "^2.0.0", "extend": "^3.0.2" @@ -1243,6 +1081,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-4.0.0.tgz", "integrity": "sha512-MmaX6HeSvyPbWGwFq7mXdo0uQZLGBYCwziiLIGq5JVX+/bdI3SAq6bP98trV5eTWfLuvsMcIC1YJOF2vfteLFA==", + "license": "Apache-2.0", "engines": { "node": ">=14.0.0" } @@ -1251,22 +1090,24 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-4.0.0.tgz", "integrity": "sha512-Orxzlfb9c67A15cq2JQEyVc7wEsmFBmHjZWZYQMUyJ1qivXyMwdyNOs9odi79hze+2zqdTtu1E19IM/FtqZ10g==", + "license": "Apache-2.0", "engines": { "node": ">=14" } }, "node_modules/@google-cloud/storage": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-7.11.1.tgz", - "integrity": "sha512-tibLSvgw7nDohMyIelt26kBpJ59YGWA2Rzep++DFNzEzKaSuCSp56Se9iM13ZlM3j5nLzR21IBkpRN58CmvCIw==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-7.19.0.tgz", + "integrity": "sha512-n2FjE7NAOYyshogdc7KQOl/VZb4sneqPjWouSyia9CMDdMhRX5+RIbqalNmC7LOLzuLAN89VlF2HvG8na9G+zQ==", + "license": "Apache-2.0", "dependencies": { "@google-cloud/paginator": "^5.0.0", "@google-cloud/projectify": "^4.0.0", - "@google-cloud/promisify": "^4.0.0", + "@google-cloud/promisify": "<4.1.0", "abort-controller": "^3.0.0", "async-retry": "^1.3.3", "duplexify": "^4.1.3", - "fast-xml-parser": "^4.3.0", + "fast-xml-parser": "^5.3.4", "gaxios": "^6.0.2", "google-auth-library": "^9.6.3", "html-entities": "^2.5.2", @@ -1284,6 +1125,7 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -1360,10 +1202,11 @@ } }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -1800,9 +1643,9 @@ } }, "node_modules/@octokit/core": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz", - "integrity": "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.2.tgz", + "integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==", "license": "MIT", "dependencies": { "@octokit/auth-token": "^4.0.0", @@ -2027,6 +1870,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "license": "MIT", "engines": { "node": ">= 10" } @@ -2075,7 +1919,8 @@ "node_modules/@types/caseless": { "version": "0.12.5", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==" + "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", + "license": "MIT" }, "node_modules/@types/graceful-fs": { "version": "4.1.9", @@ -2111,38 +1956,35 @@ } }, "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, "node_modules/@types/node": { - "version": "20.11.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", - "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", + "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.8.0" } }, "node_modules/@types/request": { - "version": "2.48.12", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz", - "integrity": "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==", + "version": "2.48.13", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.13.tgz", + "integrity": "sha512-FGJ6udDNUCjd19pp0Q3iTiDkwhYup7J8hpMW9c4k53NrccQFFWKRho6hvtPPEhnXWKvukfwAlB6DbDz4yhH5Gg==", + "license": "MIT", "dependencies": { "@types/caseless": "*", "@types/node": "*", "@types/tough-cookie": "*", - "form-data": "^2.5.0" + "form-data": "^2.5.5" } }, "node_modules/@types/semver": { @@ -2160,7 +2002,8 @@ "node_modules/@types/tough-cookie": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==" + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "license": "MIT" }, "node_modules/@types/yargs": { "version": "17.0.32", @@ -2178,117 +2021,153 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.43.0.tgz", + "integrity": "sha512-8tg+gt7ENL7KewsKMKDHXR1vm8tt9eMxjJBYINf6swonlWgkYn5NwyIgXpbbDxTNU5DgpDFfj95prcTq2clIQQ==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.43.0", + "@typescript-eslint/type-utils": "8.43.0", + "@typescript-eslint/utils": "8.43.0", + "@typescript-eslint/visitor-keys": "8.43.0", "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "@typescript-eslint/parser": "^8.43.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "engines": { + "node": ">= 4" } }, "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.43.0.tgz", + "integrity": "sha512-B7RIQiTsCBBmY+yW4+ILd6mF5h1FUwJsVvpqkrgpszYifetQ2Ke+Z4u6aZh0CblkUGIdR59iYVyXqqZGkZ3aBw==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/scope-manager": "8.43.0", + "@typescript-eslint/types": "8.43.0", + "@typescript-eslint/typescript-estree": "8.43.0", + "@typescript-eslint/visitor-keys": "8.43.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.43.0.tgz", + "integrity": "sha512-htB/+D/BIGoNTQYffZw4uM4NzzuolCoaA/BusuSIcC8YjmBYQioew5VUZAYdAETPjeed0hqCaW7EHg+Robq8uw==", + "dev": true, + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.43.0", + "@typescript-eslint/types": "^8.43.0", + "debug": "^4.3.4" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.43.0.tgz", + "integrity": "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" + "@typescript-eslint/types": "8.43.0", + "@typescript-eslint/visitor-keys": "8.43.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.43.0.tgz", + "integrity": "sha512-ALC2prjZcj2YqqL5X/bwWQmHA2em6/94GcbB/KKu5SX3EBDOsqztmmX1kMkvAJHzxk7TazKzJfFiEIagNV3qEA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.43.0.tgz", + "integrity": "sha512-qaH1uLBpBuBBuRf8c1mLJ6swOfzCXryhKND04Igr4pckzSEW9JX5Aw9AgW00kwfjWJF0kk0ps9ExKTfvXfw4Qg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", + "@typescript-eslint/types": "8.43.0", + "@typescript-eslint/typescript-estree": "8.43.0", + "@typescript-eslint/utils": "8.43.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.43.0.tgz", + "integrity": "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -2296,75 +2175,123 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.43.0.tgz", + "integrity": "sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", + "@typescript-eslint/project-service": "8.43.0", + "@typescript-eslint/tsconfig-utils": "8.43.0", + "@typescript-eslint/types": "8.43.0", + "@typescript-eslint/visitor-keys": "8.43.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.43.0.tgz", + "integrity": "sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.43.0", + "@typescript-eslint/types": "8.43.0", + "@typescript-eslint/typescript-estree": "8.43.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.43.0.tgz", + "integrity": "sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "8.43.0", + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@typespec/ts-http-runtime": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.2.tgz", + "integrity": "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg==", + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -2384,6 +2311,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", "dependencies": { "event-target-shim": "^5.0.0" }, @@ -2413,12 +2341,10 @@ } }, "node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dependencies": { - "debug": "^4.3.4" - }, + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", "engines": { "node": ">= 14" } @@ -2509,27 +2435,27 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/async-retry": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "license": "MIT", "dependencies": { "retry": "0.13.1" } @@ -2537,25 +2463,30 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", + "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", + "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, "node_modules/axios/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -2700,7 +2631,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/before-after-hook": { "version": "2.2.3", @@ -2709,29 +2641,30 @@ "license": "Apache-2.0" }, "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", "engines": { "node": "*" } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2793,7 +2726,8 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" }, "node_modules/buffer-from": { "version": "1.1.2", @@ -2801,6 +2735,19 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2937,6 +2884,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -2977,10 +2925,11 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -3039,6 +2988,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -3067,18 +3017,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3091,10 +3029,25 @@ "node": ">=6.0.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexify": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", + "license": "MIT", "dependencies": { "end-of-stream": "^1.4.1", "inherits": "^2.0.3", @@ -3106,10 +3059,27 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.589", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.589.tgz", @@ -3135,9 +3105,10 @@ "dev": true }, "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", "dependencies": { "once": "^1.4.0" } @@ -3151,6 +3122,51 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3259,19 +3275,19 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", - "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.0.1.tgz", + "integrity": "sha512-EE44T0OSMCeXhDrrdsbKAhprobKkPtJTbQz5yEktysNpHeDZTAL1SfDTNKmcFfJkY6yrQLtTKZALrD3j/Gpmiw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "^5.10.0" + "@typescript-eslint/utils": "^8.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^20.12.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", - "eslint": "^7.0.0 || ^8.0.0", + "@typescript-eslint/eslint-plugin": "^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", "jest": "*" }, "peerDependenciesMeta": { @@ -3312,19 +3328,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/eslint-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", @@ -3457,15 +3460,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -3479,6 +3473,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", "engines": { "node": ">=6" } @@ -3487,7 +3482,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "license": "MIT", "engines": { "node": ">=0.8.x" } @@ -3543,7 +3537,8 @@ "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -3552,16 +3547,16 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -3591,22 +3586,36 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "node_modules/fast-xml-parser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz", - "integrity": "sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==", + "node_modules/fast-xml-builder": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz", + "integrity": "sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/NaturalIntelligence" - }, + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.1.3" + } + }, + "node_modules/fast-xml-parser": { + "version": "5.5.9", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.9.tgz", + "integrity": "sha512-jldvxr1MC6rtiZKgrFnDSvT8xuH+eJqxqOBThUVjYrxssYTo1avZLGql5l0a0BAERR01CadYzZ83kVEkbyDg+g==", + "funding": [ { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" } ], + "license": "MIT", "dependencies": { - "strnum": "^1.0.5" + "fast-xml-builder": "^1.1.4", + "path-expression-matcher": "^1.2.0", + "strnum": "^2.2.2" }, "bin": { "fxparser": "src/cli/cli.js" @@ -3642,10 +3651,42 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -3691,15 +3732,16 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -3710,13 +3752,17 @@ } }, "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", + "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.35", + "safe-buffer": "^5.2.1" }, "engines": { "node": ">= 0.12" @@ -3746,15 +3792,15 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/gaxios": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.6.0.tgz", - "integrity": "sha512-bpOZVQV5gthH/jVCSuYuokRo2bTKOcuBiVWpjmTn6C5Agl5zclGfTljuGsQZxwwDBkli+YhZhP4TdlqTnhOezQ==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", + "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", + "license": "Apache-2.0", "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", @@ -3774,16 +3820,19 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/gcp-metadata": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz", - "integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.1.tgz", + "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==", + "license": "Apache-2.0", "dependencies": { - "gaxios": "^6.0.0", + "gaxios": "^6.1.1", + "google-logging-utils": "^0.0.2", "json-bigint": "^1.0.0" }, "engines": { @@ -3808,6 +3857,30 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -3817,6 +3890,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3857,49 +3943,30 @@ "dependencies": { "is-glob": "^4.0.3" }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=10.13.0" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "type-fest": "^0.20.2" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/google-auth-library": { - "version": "9.10.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.10.0.tgz", - "integrity": "sha512-ol+oSa5NbcGdDqA+gZ3G3mev59OHBZksBTxY/tYwjtcp1H/scAFwJfSQU9/1RALoyZ7FslNbke8j4i3ipwlyuQ==", + "version": "9.15.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.1.tgz", + "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==", + "license": "Apache-2.0", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", @@ -3912,6 +3979,27 @@ "node": ">=14" } }, + "node_modules/google-logging-utils": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-0.0.2.tgz", + "integrity": "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -3928,6 +4016,7 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", + "license": "MIT", "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" @@ -3945,11 +4034,37 @@ "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -3958,9 +4073,9 @@ } }, "node_modules/html-entities": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", - "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", "funding": [ { "type": "github", @@ -3970,7 +4085,8 @@ "type": "patreon", "url": "https://patreon.com/mdevils" } - ] + ], + "license": "MIT" }, "node_modules/html-escaper": { "version": "2.0.2", @@ -3979,35 +4095,25 @@ "dev": true }, "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", "dependencies": { - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { @@ -4249,6 +4355,25 @@ "node": ">=8" } }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -4808,13 +4933,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -4838,6 +4965,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", "dependencies": { "bignumber.js": "^9.0.0" } @@ -4879,21 +5007,23 @@ } }, "node_modules/jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "license": "MIT", "dependencies": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "node_modules/jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "license": "MIT", "dependencies": { - "jwa": "^2.0.0", + "jwa": "^2.0.1", "safe-buffer": "^5.0.1" } }, @@ -5009,6 +5139,15 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5025,12 +5164,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -5041,6 +5181,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "license": "MIT", "bin": { "mime": "cli.js" }, @@ -5052,6 +5193,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5060,6 +5202,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -5098,16 +5241,11 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -5123,25 +5261,6 @@ } } }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -5292,6 +5411,21 @@ "node": ">=8" } }, + "node_modules/path-expression-matcher": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.2.0.tgz", + "integrity": "sha512-DwmPWeFn+tq7TiyJ2CxezCAirXjFxvaiD03npak3cRjlP9+OjTmSy1EpIrEbh+l6JgUundniloMLDQ/6VTdhLQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -5316,15 +5450,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -5426,15 +5551,16 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, + "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -5482,7 +5608,8 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" }, "node_modules/punycode": { "version": "2.3.1", @@ -5539,6 +5666,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -5629,6 +5757,7 @@ "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "license": "MIT", "engines": { "node": ">= 4" } @@ -5637,6 +5766,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-7.0.2.tgz", "integrity": "sha512-dUOvLMJ0/JJYEn8NrpOaGNE7X3vpI5XlZS/u0ANjqtcZVKnIxP7IgCFwrKTxENw29emmwug53awKtaMm4i9g5w==", + "license": "MIT", "dependencies": { "@types/request": "^2.48.8", "extend": "^3.0.2", @@ -5711,20 +5841,23 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz", + "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -5732,22 +5865,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5839,6 +5956,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", + "license": "MIT", "dependencies": { "stubs": "^3.0.0" } @@ -5846,12 +5964,14 @@ "node_modules/stream-shift": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==" + "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", + "license": "MIT" }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } @@ -5926,14 +6046,22 @@ } }, "node_modules/strnum": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.2.tgz", + "integrity": "sha512-DnR90I+jtXNSTXWdwrEy9FakW7UX+qUZg28gj5fk2vxxl7uS/3bpI4fjFYVmdK9etptYBPNkpahuQnEwhwECqA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" }, "node_modules/stubs": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==" + "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", + "license": "MIT" }, "node_modules/supports-color": { "version": "7.2.0", @@ -5963,6 +6091,7 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-9.0.0.tgz", "integrity": "sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g==", + "license": "Apache-2.0", "dependencies": { "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", @@ -5978,6 +6107,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", "dependencies": { "debug": "4" }, @@ -5985,10 +6115,25 @@ "node": ">= 6.0.0" } }, + "node_modules/teeny-request/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/teeny-request/node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", "dependencies": { "agent-base": "6", "debug": "4" @@ -6005,6 +6150,7 @@ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -6035,15 +6181,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -6056,29 +6193,51 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/ts-jest": { - "version": "29.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "version": "29.3.0", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.0.tgz", + "integrity": "sha512-4bfGBX7Gd1Aqz3SyeDS9O276wEU/BInZxskPrbhZLyv+c1wskDCqDFMJQJLWrIr/fKoAH4GE5dKUlrdyvo+39A==", "dev": true, + "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", "jest-util": "^29.0.0", "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.1", + "type-fest": "^4.37.0", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", "babel-jest": "^29.0.0", "jest": "^29.0.0", @@ -6088,6 +6247,9 @@ "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -6099,32 +6261,23 @@ } } }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/ts-jest/node_modules/type-fest": { + "version": "4.38.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.38.0.tgz", + "integrity": "sha512-2dBz5D5ycHIoliLYLi0Q2V7KRaDlH0uWIvmk7TYlAg5slqwiPv1ezJdZm1QEM0xgk29oYWMCbIG7E6gHpvChlg==", "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, + "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">= 6" + "node": ">=16" }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tunnel": { "version": "0.0.6", @@ -6181,9 +6334,9 @@ } }, "node_modules/undici": { - "version": "5.28.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", - "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -6192,9 +6345,10 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "license": "MIT" }, "node_modules/universal-user-agent": { "version": "6.0.1", @@ -6244,7 +6398,8 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, "node_modules/uuid": { "version": "3.4.0", @@ -6278,6 +6433,22 @@ "makeerror": "1.0.12" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6332,6 +6503,7 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "license": "MIT", "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" @@ -6344,6 +6516,7 @@ "version": "11.0.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "license": "MIT", "engines": { "node": ">=4.0" } diff --git a/package.json b/package.json index a2e75b8b6..2ded31b67 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,12 @@ { "name": "setup-java", - "version": "4.1.0", +"version": "5.2.0", "private": true, "description": "setup java action", "main": "dist/setup/index.js", + "engines": { + "node": ">=24.0.0" + }, "scripts": { "build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts", "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"", @@ -29,28 +32,28 @@ "@actions/cache": "npm:github-actions.warp-cache@1.4.7", "@actions/core": "^1.10.0", "@actions/exec": "^1.0.4", - "@actions/glob": "^0.4.0", - "@actions/http-client": "^2.2.1", + "@actions/glob": "^0.5.0", + "@actions/http-client": "^2.2.3", "@actions/io": "^1.0.2", "@actions/tool-cache": "^2.0.1", "semver": "^7.6.0", "xmlbuilder2": "^2.4.0" }, "devDependencies": { - "@types/jest": "^29.5.12", - "@types/node": "^20.11.24", + "@types/jest": "^29.5.14", + "@types/node": "^24.1.0", "@types/semver": "^7.5.8", - "@typescript-eslint/eslint-plugin": "^5.54.0", - "@typescript-eslint/parser": "^5.54.0", + "@typescript-eslint/eslint-plugin": "^8.35.1", + "@typescript-eslint/parser": "^8.35.1", "@vercel/ncc": "^0.38.1", "eslint": "^8.57.0", "eslint-config-prettier": "^8.6.0", - "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-jest": "^29.0.1", "eslint-plugin-node": "^11.1.0", "jest": "^29.7.0", "jest-circus": "^29.7.0", - "prettier": "^2.8.4", - "ts-jest": "^29.1.2", + "prettier": "^3.6.2", + "ts-jest": "^29.3.0", "typescript": "^5.3.3" }, "bugs": { diff --git a/src/cache.ts b/src/cache.ts index f75c8dfd5..7d13839ee 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -98,7 +98,7 @@ async function computeCacheKey( `No file in ${process.cwd()} matched to [${pattern}], make sure you have checked out the target repository` ); } - return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${packageManager.id}-${fileHash}`; + return `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-${packageManager.id}-${fileHash}`; } /** diff --git a/src/distributions/adopt/installer.ts b/src/distributions/adopt/installer.ts index 9887b7899..850a4a0df 100644 --- a/src/distributions/adopt/installer.ts +++ b/src/distributions/adopt/installer.ts @@ -15,7 +15,8 @@ import { import { extractJdkFile, getDownloadArchiveExtension, - isVersionSatisfies + isVersionSatisfies, + renameWinArchive } from '../../util'; export enum AdoptImplementation { @@ -73,11 +74,13 @@ export class AdoptDistribution extends JavaBase { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); - const javaArchivePath = await tc.downloadTool(javaRelease.url); + let javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); const extension = getDownloadArchiveExtension(); - + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; diff --git a/src/distributions/base-installer.ts b/src/distributions/base-installer.ts index 258ac9f4c..0fc4f0343 100644 --- a/src/distributions/base-installer.ts +++ b/src/distributions/base-installer.ts @@ -51,17 +51,115 @@ export abstract class JavaBase { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { core.info('Trying to resolve the latest version from remote'); - const javaRelease = await this.findPackageForDownload(this.version); - core.info(`Resolved latest version as ${javaRelease.version}`); - if (foundJava?.version === javaRelease.version) { - core.info(`Resolved Java ${foundJava.version} from tool-cache`); - } else { - core.info('Trying to download...'); - foundJava = await this.downloadTool(javaRelease); - core.info(`Java ${foundJava.version} was downloaded`); + const MAX_RETRIES = 4; + const RETRY_DELAY_MS = 2000; + const retryableCodes = [ + 'ETIMEDOUT', + 'ECONNRESET', + 'ENOTFOUND', + 'ECONNREFUSED' + ]; + let retries = MAX_RETRIES; + while (retries > 0) { + try { + // Clear console timers before each attempt to prevent conflicts + if (retries < MAX_RETRIES && core.isDebug()) { + const consoleAny = console as any; + consoleAny._times?.clear?.(); + } + const javaRelease = await this.findPackageForDownload(this.version); + core.info(`Resolved latest version as ${javaRelease.version}`); + if (foundJava?.version === javaRelease.version) { + core.info(`Resolved Java ${foundJava.version} from tool-cache`); + } else { + core.info('Trying to download...'); + foundJava = await this.downloadTool(javaRelease); + core.info(`Java ${foundJava.version} was downloaded`); + } + break; + } catch (error: any) { + retries--; + // Check if error is retryable (including aggregate errors) + const isRetryable = + (error instanceof tc.HTTPError && + error.httpStatusCode && + [429, 502, 503, 504, 522].includes(error.httpStatusCode)) || + retryableCodes.includes(error?.code) || + (error?.errors && + Array.isArray(error.errors) && + error.errors.some((err: any) => + retryableCodes.includes(err?.code) + )); + if (retries > 0 && isRetryable) { + core.debug( + `Attempt failed due to network or timeout issues, initiating retry... (${retries} attempts left)` + ); + await new Promise(r => setTimeout(r, RETRY_DELAY_MS)); + continue; + } + if (error instanceof tc.HTTPError) { + if (error.httpStatusCode === 403) { + core.error('HTTP 403: Permission denied or access restricted.'); + } else if (error.httpStatusCode === 429) { + core.warning( + 'HTTP 429: Rate limit exceeded. Please retry later.' + ); + } else { + core.error(`HTTP ${error.httpStatusCode}: ${error.message}`); + } + } else if (error && error.errors && Array.isArray(error.errors)) { + core.error( + `Java setup failed due to network or configuration error(s)` + ); + if (error instanceof Error && error.stack) { + core.debug(error.stack); + } + for (const err of error.errors) { + const endpoint = err?.address || err?.hostname || ''; + const port = err?.port ? `:${err.port}` : ''; + const message = err?.message || 'Aggregate error'; + const endpointInfo = !message.includes(endpoint) + ? ` ${endpoint}${port}` + : ''; + const localInfo = + err.localAddress && err.localPort + ? ` - Local (${err.localAddress}:${err.localPort})` + : ''; + const logMessage = `${message}${endpointInfo}${localInfo}`; + core.error(logMessage); + core.debug(`${err.stack || err.message}`); + Object.entries(err).forEach(([key, value]) => { + core.debug(`"${key}": ${JSON.stringify(value)}`); + }); + } + } else { + const message = + error instanceof Error ? error.message : JSON.stringify(error); + core.error(`Java setup process failed due to: ${message}`); + if (typeof error?.code === 'string') { + core.debug(error.stack); + } + const errorDetails = { + name: error.name, + message: error.message, + ...Object.getOwnPropertyNames(error) + .filter(prop => !['name', 'message', 'stack'].includes(prop)) + .reduce<{[key: string]: any}>((acc, prop) => { + acc[prop] = error[prop]; + return acc; + }, {}) + }; + Object.entries(errorDetails).forEach(([key, value]) => { + core.debug(`"${key}": ${JSON.stringify(value)}`); + }); + } + throw error; + } } } - + if (!foundJava) { + throw new Error('Failed to resolve Java version'); + } // JDK folder may contain postfix "Contents/Home" on macOS const macOSPostfixPath = path.join( foundJava.path, diff --git a/src/distributions/corretto/installer.ts b/src/distributions/corretto/installer.ts index 1e6329cb4..c2cc5f7cc 100644 --- a/src/distributions/corretto/installer.ts +++ b/src/distributions/corretto/installer.ts @@ -5,7 +5,8 @@ import path from 'path'; import { extractJdkFile, getDownloadArchiveExtension, - convertVersionToSemver + convertVersionToSemver, + renameWinArchive } from '../../util'; import {JavaBase} from '../base-installer'; import { @@ -29,14 +30,14 @@ export class CorrettoDistribution extends JavaBase { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); - const javaArchivePath = await tc.downloadTool(javaRelease.url); + let javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - - const extractedJavaPath = await extractJdkFile( - javaArchivePath, - getDownloadArchiveExtension() - ); + const extension = getDownloadArchiveExtension(); + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } + const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; const archivePath = path.join(extractedJavaPath, archiveName); @@ -93,7 +94,7 @@ export class CorrettoDistribution extends JavaBase { const imageType = this.packageType; if (core.isDebug()) { - console.time('Retrieving available versions for Coretto took'); // eslint-disable-line no-console + console.time('Retrieving available versions for Corretto took'); // eslint-disable-line no-console } const availableVersionsUrl = @@ -116,7 +117,7 @@ export class CorrettoDistribution extends JavaBase { if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('Retrieving available versions for Coretto took'); // eslint-disable-line no-console + console.timeEnd('Retrieving available versions for Corretto took'); // eslint-disable-line no-console core.debug(`Available versions: [${availableVersions.length}]`); core.debug( availableVersions diff --git a/src/distributions/distribution-factory.ts b/src/distributions/distribution-factory.ts index 52a41b5b4..9cd459e65 100644 --- a/src/distributions/distribution-factory.ts +++ b/src/distributions/distribution-factory.ts @@ -10,6 +10,9 @@ import {SemeruDistribution} from './semeru/installer'; import {CorrettoDistribution} from './corretto/installer'; import {OracleDistribution} from './oracle/installer'; import {DragonwellDistribution} from './dragonwell/installer'; +import {SapMachineDistribution} from './sapmachine/installer'; +import {GraalVMDistribution} from './graalvm/installer'; +import {JetBrainsDistribution} from './jetbrains/installer'; enum JavaDistribution { Adopt = 'adopt', @@ -23,7 +26,10 @@ enum JavaDistribution { Semeru = 'semeru', Corretto = 'corretto', Oracle = 'oracle', - Dragonwell = 'dragonwell' + Dragonwell = 'dragonwell', + SapMachine = 'sapmachine', + GraalVM = 'graalvm', + JetBrains = 'jetbrains' } export function getJavaDistribution( @@ -64,6 +70,12 @@ export function getJavaDistribution( return new OracleDistribution(installerOptions); case JavaDistribution.Dragonwell: return new DragonwellDistribution(installerOptions); + case JavaDistribution.SapMachine: + return new SapMachineDistribution(installerOptions); + case JavaDistribution.GraalVM: + return new GraalVMDistribution(installerOptions); + case JavaDistribution.JetBrains: + return new JetBrainsDistribution(installerOptions); default: return null; } diff --git a/src/distributions/dragonwell/installer.ts b/src/distributions/dragonwell/installer.ts index 8c616f36e..480cdbdcb 100644 --- a/src/distributions/dragonwell/installer.ts +++ b/src/distributions/dragonwell/installer.ts @@ -11,7 +11,8 @@ import { extractJdkFile, getDownloadArchiveExtension, getGitHubHttpHeaders, - isVersionSatisfies + isVersionSatisfies, + renameWinArchive } from '../../util'; import {IDragonwellVersions, IDragonwellAllVersions} from './models'; import { @@ -100,14 +101,14 @@ export class DragonwellDistribution extends JavaBase { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); - const javaArchivePath = await tc.downloadTool(javaRelease.url); + let javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - - const extractedJavaPath = await extractJdkFile( - javaArchivePath, - getDownloadArchiveExtension() - ); + const extension = getDownloadArchiveExtension(); + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } + const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; const archivePath = path.join(extractedJavaPath, archiveName); @@ -149,9 +150,14 @@ export class DragonwellDistribution extends JavaBase { // Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits). // Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools. - if (jdkVersion.split('.').length > 3) { - jdkVersion = convertVersionToSemver(jdkVersion); - } + const jdkVersionNums: string[] = jdkVersion + .replace('+', '.') + .split('.'); + jdkVersion = convertVersionToSemver( + `${jdkVersionNums.slice(0, 3).join('.')}.${ + jdkVersionNums[jdkVersionNums.length - 1] + }` + ); for (const edition in archMap) { eligibleVersions.push({ diff --git a/src/distributions/graalvm/installer.ts b/src/distributions/graalvm/installer.ts new file mode 100644 index 000000000..6df960c73 --- /dev/null +++ b/src/distributions/graalvm/installer.ts @@ -0,0 +1,278 @@ +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; +import fs from 'fs'; +import path from 'path'; +import {JavaBase} from '../base-installer'; +import {HttpCodes} from '@actions/http-client'; +import {GraalVMEAVersion} from './models'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import { + extractJdkFile, + getDownloadArchiveExtension, + getGitHubHttpHeaders, + renameWinArchive +} from '../../util'; + +const GRAALVM_DL_BASE = 'https://download.oracle.com/graalvm'; +const IS_WINDOWS = process.platform === 'win32'; +const GRAALVM_PLATFORM = IS_WINDOWS ? 'windows' : process.platform; +const GRAALVM_MIN_VERSION = 17; +const SUPPORTED_ARCHITECTURES = ['x64', 'aarch64'] as const; +type SupportedArchitecture = (typeof SUPPORTED_ARCHITECTURES)[number]; +type OsVersions = 'linux' | 'macos' | 'windows'; + +export class GraalVMDistribution extends JavaBase { + constructor(installerOptions: JavaInstallerOptions) { + super('GraalVM', installerOptions); + } + + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { + try { + core.info( + `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` + ); + let javaArchivePath = await tc.downloadTool(javaRelease.url); + + core.info(`Extracting Java archive...`); + const extension = getDownloadArchiveExtension(); + if (IS_WINDOWS) { + javaArchivePath = renameWinArchive(javaArchivePath); + } + + const extractedJavaPath = await extractJdkFile( + javaArchivePath, + extension + ); + + // Add validation for extracted path + if (!fs.existsSync(extractedJavaPath)) { + throw new Error( + `Extraction failed: path ${extractedJavaPath} does not exist` + ); + } + + const dirContents = fs.readdirSync(extractedJavaPath); + if (dirContents.length === 0) { + throw new Error( + 'Extraction failed: no files found in extracted directory' + ); + } + + const archivePath = path.join(extractedJavaPath, dirContents[0]); + const version = this.getToolcacheVersionName(javaRelease.version); + + const javaPath = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); + + return {version: javaRelease.version, path: javaPath}; + } catch (error) { + core.error(`Failed to download and extract GraalVM: ${error}`); + throw error; + } + } + + protected async findPackageForDownload( + range: string + ): Promise { + // Add input validation + if (!range || typeof range !== 'string') { + throw new Error('Version range is required and must be a string'); + } + + const arch = this.distributionArchitecture(); + if (!SUPPORTED_ARCHITECTURES.includes(arch as SupportedArchitecture)) { + throw new Error( + `Unsupported architecture: ${this.architecture}. Supported architectures are: ${SUPPORTED_ARCHITECTURES.join(', ')}` + ); + } + + if (!this.stable) { + return this.findEABuildDownloadUrl(`${range}-ea`); + } + + if (this.packageType !== 'jdk') { + throw new Error('GraalVM provides only the `jdk` package type'); + } + + const platform = this.getPlatform(); + const extension = getDownloadArchiveExtension(); + const major = range.includes('.') ? range.split('.')[0] : range; + const majorVersion = parseInt(major); + + if (isNaN(majorVersion)) { + throw new Error(`Invalid version format: ${range}`); + } + + if (majorVersion < GRAALVM_MIN_VERSION) { + throw new Error( + `GraalVM is only supported for JDK ${GRAALVM_MIN_VERSION} and later. Requested version: ${major}` + ); + } + + const fileUrl = this.constructFileUrl( + range, + major, + platform, + arch, + extension + ); + + const response = await this.http.head(fileUrl); + this.handleHttpResponse(response, range); + + return {url: fileUrl, version: range}; + } + + private constructFileUrl( + range: string, + major: string, + platform: string, + arch: string, + extension: string + ): string { + return range.includes('.') + ? `${GRAALVM_DL_BASE}/${major}/archive/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}` + : `${GRAALVM_DL_BASE}/${range}/latest/graalvm-jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + + private handleHttpResponse(response: any, range: string): void { + const statusCode = response.message.statusCode; + + if (statusCode === HttpCodes.NotFound) { + throw new Error( + `Could not find GraalVM for SemVer ${range}. Please check if this version is available at ${GRAALVM_DL_BASE}` + ); + } + + if ( + statusCode === HttpCodes.Unauthorized || + statusCode === HttpCodes.Forbidden + ) { + throw new Error( + `Access denied when downloading GraalVM. Status code: ${statusCode}. Please check your credentials or permissions.` + ); + } + + if (statusCode !== HttpCodes.OK) { + throw new Error( + `HTTP request for GraalVM failed with status code: ${statusCode} (${response.message.statusMessage || 'Unknown error'})` + ); + } + } + + private async findEABuildDownloadUrl( + javaEaVersion: string + ): Promise { + core.debug(`Searching for EA build: ${javaEaVersion}`); + + const versions = await this.fetchEAJson(javaEaVersion); + core.debug(`Found ${versions.length} EA versions`); + + const latestVersion = versions.find(v => v.latest); + if (!latestVersion) { + core.error( + `Available versions: ${versions.map(v => v.version).join(', ')}` + ); + throw new Error(`Unable to find latest version for '${javaEaVersion}'`); + } + + core.debug(`Latest version found: ${latestVersion.version}`); + + const arch = this.distributionArchitecture(); + const file = latestVersion.files.find( + f => f.arch === arch && f.platform === GRAALVM_PLATFORM + ); + + if (!file) { + core.error( + `Available files for architecture ${arch}: ${JSON.stringify(latestVersion.files)}` + ); + throw new Error( + `Unable to find file for architecture '${arch}' and platform '${GRAALVM_PLATFORM}'` + ); + } + + if (!file.filename.startsWith('graalvm-jdk-')) { + throw new Error( + `Invalid filename format: ${file.filename}. Expected to start with 'graalvm-jdk-'` + ); + } + + const downloadUrl = `${latestVersion.download_base_url}${file.filename}`; + core.debug(`Download URL: ${downloadUrl}`); + + return { + url: downloadUrl, + version: latestVersion.version + }; + } + + private async fetchEAJson( + javaEaVersion: string + ): Promise { + const url = `https://api.github.com/repos/graalvm/oracle-graalvm-ea-builds/contents/versions/${javaEaVersion}.json?ref=main`; + const headers = getGitHubHttpHeaders(); + + core.debug( + `Trying to fetch available version info for GraalVM EA builds from '${url}'` + ); + + try { + const response = await this.http.getJson( + url, + headers + ); + + if (!response.result) { + throw new Error( + `No GraalVM EA build found for version '${javaEaVersion}'. Please check if the version is correct.` + ); + } + + return response.result; + } catch (error) { + if (error instanceof Error) { + // Check if it's a 404 error (file not found) + if (error.message?.includes('404')) { + throw new Error( + `GraalVM EA version '${javaEaVersion}' not found. Please verify the version exists in the EA builds repository.` + ); + } + // Re-throw with more context + throw new Error( + `Failed to fetch GraalVM EA version information for '${javaEaVersion}': ${error.message}` + ); + } + // If it's not an Error instance, throw a generic error + throw new Error( + `Failed to fetch GraalVM EA version information for '${javaEaVersion}'` + ); + } + } + + public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions { + const platformMap: Record = { + darwin: 'macos', + win32: 'windows', + linux: 'linux' + }; + + const result = platformMap[platform]; + if (!result) { + throw new Error( + `Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'` + ); + } + return result; + } +} diff --git a/src/distributions/graalvm/models.ts b/src/distributions/graalvm/models.ts new file mode 100644 index 000000000..2ae1e4d96 --- /dev/null +++ b/src/distributions/graalvm/models.ts @@ -0,0 +1,14 @@ +export type OsVersions = 'linux' | 'macos' | 'windows'; + +export interface GraalVMEAFile { + filename: string; + arch: 'aarch64' | 'x64'; + platform: 'darwin' | 'linux' | 'windows'; +} + +export interface GraalVMEAVersion { + version: string; + latest?: boolean; + download_base_url: string; + files: GraalVMEAFile[]; +} diff --git a/src/distributions/jetbrains/installer.ts b/src/distributions/jetbrains/installer.ts new file mode 100644 index 000000000..b9e9b30bb --- /dev/null +++ b/src/distributions/jetbrains/installer.ts @@ -0,0 +1,246 @@ +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; + +import fs from 'fs'; +import path from 'path'; +import semver from 'semver'; + +import {JavaBase} from '../base-installer'; +import {IJetBrainsRawVersion, IJetBrainsVersion} from './models'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import {extractJdkFile, isVersionSatisfies} from '../../util'; +import {OutgoingHttpHeaders} from 'http'; +import {HttpCodes} from '@actions/http-client'; + +export class JetBrainsDistribution extends JavaBase { + constructor(installerOptions: JavaInstallerOptions) { + super('JetBrains', installerOptions); + } + + protected async findPackageForDownload( + range: string + ): Promise { + const versionsRaw = await this.getAvailableVersions(); + + const versions = versionsRaw.map(v => { + const formattedVersion = `${v.semver}+${v.build}`; + + return { + version: formattedVersion, + url: v.url + } as JavaDownloadRelease; + }); + + const satisfiedVersions = versions + .filter(item => isVersionSatisfies(range, item.version)) + .sort((a, b) => { + return -semver.compareBuild(a.version, b.version); + }); + + const resolvedFullVersion = + satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = versionsRaw + .map(item => `${item.tag_name} (${item.semver}+${item.build})`) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error( + `Could not find satisfied version for SemVer '${range}'. ${availableOptionsMessage}` + ); + } + + return resolvedFullVersion; + } + + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { + core.info( + `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` + ); + + const javaArchivePath = await tc.downloadTool(javaRelease.url); + + core.info(`Extracting Java archive...`); + const extractedJavaPath = await extractJdkFile(javaArchivePath, 'tar.gz'); + + const archiveName = fs.readdirSync(extractedJavaPath)[0]; + const archivePath = path.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + + const javaPath = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); + + return {version: javaRelease.version, path: javaPath}; + } + + private async getAvailableVersions(): Promise { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + + if (core.isDebug()) { + console.time('Retrieving available versions for JBR took'); // eslint-disable-line no-console + } + + // need to iterate through all pages to retrieve the list of all versions + // GitHub API doesn't provide way to retrieve the count of pages to iterate so infinity loop + let page_index = 1; + const rawVersions: IJetBrainsRawVersion[] = []; + const bearerToken = process.env.GITHUB_TOKEN; + + while (true) { + const requestArguments = `per_page=100&page=${page_index}`; + const requestHeaders: OutgoingHttpHeaders = {}; + + if (bearerToken) { + requestHeaders['Authorization'] = `Bearer ${bearerToken}`; + } + + const rawUrl = `https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases?${requestArguments}`; + + if (core.isDebug() && page_index === 1) { + // url is identical except page_index so print it once for debug + core.debug(`Gathering available versions from '${rawUrl}'`); + } + + const paginationPageResult = ( + await this.http.getJson(rawUrl, requestHeaders) + ).result; + if (!paginationPageResult || paginationPageResult.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + + const paginationPage: IJetBrainsRawVersion[] = + paginationPageResult.filter(version => + this.stable ? !version.prerelease : version.prerelease + ); + if (!paginationPage || paginationPage.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + + rawVersions.push(...paginationPage); + page_index++; + } + + if (this.stable) { + // Add versions not available from the API but are downloadable + const hidden = ['11_0_10b1145.115', '11_0_11b1341.60']; + rawVersions.push( + ...hidden.map(tag => ({tag_name: tag, name: tag, prerelease: false})) + ); + } + + const versions0 = rawVersions.map(async v => { + // Release tags look like one of these: + // jbr-release-21.0.3b465.3 + // jbr17-b87.7 + // jb11_0_11-b87.7 + // jbr11_0_15b2043.56 + // 11_0_11b1536.2 + // 11_0_11-b1522 + const tag = v.tag_name; + + // Extract version string + const vstring = tag + .replace('jbr-release-', '') + .replace('jbr', '') + .replace('jb', '') + .replace('-', ''); + + const vsplit = vstring.split('b'); + let semver = vsplit[0]; + const build = vsplit[1]; + + // Normalize semver + if (!semver.includes('.') && !semver.includes('_')) + semver = `${semver}.0.0`; + + // Construct URL + let type: string; + switch (this.packageType ?? '') { + case 'jre': + type = 'jbr'; + break; + case 'jdk+jcef': + type = 'jbrsdk_jcef'; + break; + case 'jre+jcef': + type = 'jbr_jcef'; + break; + case 'jdk+ft': + type = 'jbrsdk_ft'; + break; + case 'jre+ft': + type = 'jbr_ft'; + break; + default: + type = 'jbrsdk'; + break; + } + + let url = `https://cache-redirector.jetbrains.com/intellij-jbr/${type}-${semver}-${platform}-${arch}-b${build}.tar.gz`; + let include = false; + + const res = await this.http.head(url); + if (res.message.statusCode === HttpCodes.OK) { + include = true; + } else { + url = `https://cache-redirector.jetbrains.com/intellij-jbr/${type}_nomod-${semver}-${platform}-${arch}-b${build}.tar.gz`; + const res2 = await this.http.head(url); + if (res2.message.statusCode === HttpCodes.OK) { + include = true; + } + } + + const version = { + tag_name: tag, + semver: semver.replace(/_/g, '.'), + build: build, + url: url + } as IJetBrainsVersion; + + return { + item: version, + include: include + }; + }); + + const versions = await Promise.all(versions0).then(res => + res.filter(item => item.include).map(item => item.item) + ); + + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for JBR took'); // eslint-disable-line no-console + core.debug(`Available versions: [${versions.length}]`); + core.debug(versions.map(item => item.semver).join(', ')); + core.endGroup(); + } + + return versions; + } + + private getPlatformOption(): string { + // Jetbrains has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'osx'; + case 'win32': + return 'windows'; + default: + return process.platform; + } + } +} diff --git a/src/distributions/jetbrains/models.ts b/src/distributions/jetbrains/models.ts new file mode 100644 index 000000000..bad2ec68b --- /dev/null +++ b/src/distributions/jetbrains/models.ts @@ -0,0 +1,14 @@ +// Raw Model from https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases + +export interface IJetBrainsRawVersion { + tag_name: string; + name: string; + prerelease: boolean; +} + +export interface IJetBrainsVersion { + tag_name: string; + semver: string; + build: string; + url: string; +} diff --git a/src/distributions/liberica/installer.ts b/src/distributions/liberica/installer.ts index 3ed9435ab..444c46ce0 100644 --- a/src/distributions/liberica/installer.ts +++ b/src/distributions/liberica/installer.ts @@ -8,7 +8,8 @@ import semver from 'semver'; import { extractJdkFile, getDownloadArchiveExtension, - isVersionSatisfies + isVersionSatisfies, + renameWinArchive } from '../../util'; import * as core from '@actions/core'; import {ArchitectureOptions, LibericaVersion, OsVersions} from './models'; @@ -35,13 +36,8 @@ export class LibericaDistributions extends JavaBase { core.info(`Extracting Java archive...`); const extension = getDownloadArchiveExtension(); - if ( - process.platform === 'win32' && - (this.architecture === 'arm64' || this.architecture === 'aarch64') - ) { - const javaArchivePathRenamed = `${javaArchivePath}.zip`; - await fs.renameSync(javaArchivePath, javaArchivePathRenamed); - javaArchivePath = javaArchivePathRenamed; + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); } const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); diff --git a/src/distributions/microsoft/installer.ts b/src/distributions/microsoft/installer.ts index d20e55da6..0d80c3f98 100644 --- a/src/distributions/microsoft/installer.ts +++ b/src/distributions/microsoft/installer.ts @@ -7,7 +7,8 @@ import { import { extractJdkFile, getDownloadArchiveExtension, - getGitHubHttpHeaders + getGitHubHttpHeaders, + renameWinArchive } from '../../util'; import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; @@ -27,22 +28,12 @@ export class MicrosoftDistributions extends JavaBase { `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); let javaArchivePath = await tc.downloadTool(javaRelease.url); - // Rename archive to add extension because after downloading - // archive does not contain extension type and it leads to some issues - // on Windows runners without PowerShell Core. - // - // For default PowerShell Windows it should contain extension type to unpack it. - if ( - process.platform === 'win32' && - (this.architecture === 'arm64' || this.architecture === 'aarch64') - ) { - const javaArchivePathRenamed = `${javaArchivePath}.zip`; - await fs.renameSync(javaArchivePath, javaArchivePathRenamed); - javaArchivePath = javaArchivePathRenamed; - } core.info(`Extracting Java archive...`); const extension = getDownloadArchiveExtension(); + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; @@ -125,7 +116,7 @@ export class MicrosoftDistributions extends JavaBase { } } catch (err) { core.debug( - `Http request for microsoft-openjdk-versions.json failed with status code: ${response?.statusCode}` + `Http request for microsoft-openjdk-versions.json failed with status code: ${response?.statusCode}. Error: ${err}` ); return null; } diff --git a/src/distributions/microsoft/microsoft-openjdk-versions.json b/src/distributions/microsoft/microsoft-openjdk-versions.json index 4fd1e974f..5c11c026b 100644 --- a/src/distributions/microsoft/microsoft-openjdk-versions.json +++ b/src/distributions/microsoft/microsoft-openjdk-versions.json @@ -1,90 +1,133 @@ [ { - "version": "21.0.2", - "stable": true, - "release_url": "https://aka.ms/download-jdk", - "files": [ - { - "filename": "microsoft-jdk-21.0.2-macos-x64.tar.gz", - "arch": "x64", - "platform": "darwin", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-x64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.2-linux-x64.tar.gz", - "arch": "x64", - "platform": "linux", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-x64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.2-windows-x64.zip", - "arch": "x64", - "platform": "win32", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-x64.zip" - }, - { - "filename": "microsoft-jdk-21.0.2-macos-aarch64.tar.gz", - "arch": "aarch64", - "platform": "darwin", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-aarch64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.2-linux-aarch64.tar.gz", - "arch": "aarch64", - "platform": "linux", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-aarch64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.2-windows-aarch64.zip", - "arch": "aarch64", - "platform": "win32", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-aarch64.zip" - } - ] -}, + "version": "25.0.0", + "stable": true, + "release_url": "https://aka.ms/download-jdk", + "files": [ + { + "filename": "microsoft-jdk-25.0.0-macos-x64.tar.gz", + "arch": "x64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-linux-x64.tar.gz", + "arch": "x64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-windows-x64.zip", + "arch": "x64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-x64.zip" + }, + { + "filename": "microsoft-jdk-25.0.0-macos-aarch64.tar.gz", + "arch": "aarch64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-macos-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-linux-aarch64.tar.gz", + "arch": "aarch64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-linux-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-25.0.0-windows-aarch64.zip", + "arch": "aarch64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-25.0.0-windows-aarch64.zip" + } + ] + }, + { + "version": "21.0.2", + "stable": true, + "release_url": "https://aka.ms/download-jdk", + "files": [ + { + "filename": "microsoft-jdk-21.0.2-macos-x64.tar.gz", + "arch": "x64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.2-linux-x64.tar.gz", + "arch": "x64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.2-windows-x64.zip", + "arch": "x64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-x64.zip" + }, + { + "filename": "microsoft-jdk-21.0.2-macos-aarch64.tar.gz", + "arch": "aarch64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-macos-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.2-linux-aarch64.tar.gz", + "arch": "aarch64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-linux-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.2-windows-aarch64.zip", + "arch": "aarch64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.2-windows-aarch64.zip" + } + ] + }, { - "version": "21.0.1", - "stable": true, - "release_url": "https://aka.ms/download-jdk", - "files": [ - { - "filename": "microsoft-jdk-21.0.1-macos-x64.tar.gz", - "arch": "x64", - "platform": "darwin", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-x64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.1-linux-x64.tar.gz", - "arch": "x64", - "platform": "linux", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-x64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.1-windows-x64.zip", - "arch": "x64", - "platform": "win32", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-x64.zip" - }, - { - "filename": "microsoft-jdk-21.0.1-macos-aarch64.tar.gz", - "arch": "aarch64", - "platform": "darwin", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-aarch64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.1-linux-aarch64.tar.gz", - "arch": "aarch64", - "platform": "linux", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-aarch64.tar.gz" - }, - { - "filename": "microsoft-jdk-21.0.1-windows-aarch64.zip", - "arch": "aarch64", - "platform": "win32", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-aarch64.zip" - } - ] -}, + "version": "21.0.1", + "stable": true, + "release_url": "https://aka.ms/download-jdk", + "files": [ + { + "filename": "microsoft-jdk-21.0.1-macos-x64.tar.gz", + "arch": "x64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.1-linux-x64.tar.gz", + "arch": "x64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.1-windows-x64.zip", + "arch": "x64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-x64.zip" + }, + { + "filename": "microsoft-jdk-21.0.1-macos-aarch64.tar.gz", + "arch": "aarch64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-macos-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.1-linux-aarch64.tar.gz", + "arch": "aarch64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-linux-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-21.0.1-windows-aarch64.zip", + "arch": "aarch64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.1-windows-aarch64.zip" + } + ] + }, { "version": "21.0.0", "stable": true, @@ -176,42 +219,42 @@ "stable": true, "release_url": "https://aka.ms/download-jdk", "files": [ - { - "filename": "microsoft-jdk-17.0.9-macos-x64.tar.gz", - "arch": "x64", - "platform": "darwin", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-x64.tar.gz" - }, - { - "filename": "microsoft-jdk-17.0.9-linux-x64.tar.gz", - "arch": "x64", - "platform": "linux", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-x64.tar.gz" - }, - { - "filename": "microsoft-jdk-17.0.9-windows-x64.zip", - "arch": "x64", - "platform": "win32", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-x64.zip" - }, - { - "filename": "microsoft-jdk-17.0.9-macos-aarch64.tar.gz", - "arch": "aarch64", - "platform": "darwin", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-aarch64.tar.gz" - }, - { - "filename": "microsoft-jdk-17.0.9-linux-aarch64.tar.gz", - "arch": "aarch64", - "platform": "linux", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-aarch64.tar.gz" - }, - { - "filename": "microsoft-jdk-17.0.9-windows-aarch64.zip", - "arch": "aarch64", - "platform": "win32", - "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-aarch64.zip" - } + { + "filename": "microsoft-jdk-17.0.9-macos-x64.tar.gz", + "arch": "x64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-17.0.9-linux-x64.tar.gz", + "arch": "x64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-x64.tar.gz" + }, + { + "filename": "microsoft-jdk-17.0.9-windows-x64.zip", + "arch": "x64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-x64.zip" + }, + { + "filename": "microsoft-jdk-17.0.9-macos-aarch64.tar.gz", + "arch": "aarch64", + "platform": "darwin", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-macos-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-17.0.9-linux-aarch64.tar.gz", + "arch": "aarch64", + "platform": "linux", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-linux-aarch64.tar.gz" + }, + { + "filename": "microsoft-jdk-17.0.9-windows-aarch64.zip", + "arch": "aarch64", + "platform": "win32", + "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.9-windows-aarch64.zip" + } ] }, { @@ -835,4 +878,4 @@ } ] } -] +] \ No newline at end of file diff --git a/src/distributions/oracle/installer.ts b/src/distributions/oracle/installer.ts index ec0ab2157..5a492ad14 100644 --- a/src/distributions/oracle/installer.ts +++ b/src/distributions/oracle/installer.ts @@ -10,7 +10,11 @@ import { JavaInstallerOptions, JavaInstallerResults } from '../base-models'; -import {extractJdkFile, getDownloadArchiveExtension} from '../../util'; +import { + extractJdkFile, + getDownloadArchiveExtension, + renameWinArchive +} from '../../util'; import {HttpCodes} from '@actions/http-client'; const ORACLE_DL_BASE = 'https://download.oracle.com/java'; @@ -26,11 +30,13 @@ export class OracleDistribution extends JavaBase { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); - const javaArchivePath = await tc.downloadTool(javaRelease.url); + let javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); const extension = getDownloadArchiveExtension(); - + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; diff --git a/src/distributions/sapmachine/installer.ts b/src/distributions/sapmachine/installer.ts new file mode 100644 index 000000000..ab67dec34 --- /dev/null +++ b/src/distributions/sapmachine/installer.ts @@ -0,0 +1,267 @@ +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; +import semver from 'semver'; +import fs from 'fs'; +import {OutgoingHttpHeaders} from 'http'; +import path from 'path'; +import { + convertVersionToSemver, + extractJdkFile, + getDownloadArchiveExtension, + isVersionSatisfies, + renameWinArchive +} from '../../util'; +import {JavaBase} from '../base-installer'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import {ISapMachineAllVersions, ISapMachineVersions} from './models'; + +export class SapMachineDistribution extends JavaBase { + constructor(installerOptions: JavaInstallerOptions) { + super('SapMachine', installerOptions); + } + + protected async findPackageForDownload( + version: string + ): Promise { + core.debug(`Only stable versions: ${this.stable}`); + + if (!['jdk', 'jre'].includes(this.packageType)) { + throw new Error( + 'SapMachine provides only the `jdk` and `jre` package type' + ); + } + + const availableVersions = await this.getAvailableVersions(); + + const matchedVersions = availableVersions + .filter(item => { + return isVersionSatisfies(version, item.version); + }) + .map(item => { + return { + version: item.version, + url: item.downloadLink + } as JavaDownloadRelease; + }); + + if (!matchedVersions.length) { + throw new Error( + `Couldn't find any satisfied version for the specified java-version: "${version}" and architecture: "${this.architecture}".` + ); + } + + const resolvedVersion = matchedVersions[0]; + return resolvedVersion; + } + + private async getAvailableVersions(): Promise { + const platform = this.getPlatformOption(); + const arch = this.distributionArchitecture(); + + let fetchedReleasesJson = await this.fetchReleasesFromUrl( + 'https://sapmachine.io/assets/data/sapmachine-releases-all.json' + ); + + if (!fetchedReleasesJson) { + fetchedReleasesJson = await this.fetchReleasesFromUrl( + 'https://sap.github.io/SapMachine/assets/data/sapmachine-releases-all.json' + ); + } + + if (!fetchedReleasesJson) { + throw new Error( + `Couldn't fetch SapMachine versions information from both primary and backup urls` + ); + } + + core.debug( + 'Successfully fetched information about available SapMachine versions' + ); + + const availableVersions = this.parseVersions( + platform, + arch, + fetchedReleasesJson + ); + + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + core.debug(availableVersions.map(item => item.version).join(', ')); + core.endGroup(); + } + + return availableVersions; + } + + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { + core.info( + `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` + ); + let javaArchivePath = await tc.downloadTool(javaRelease.url); + + core.info(`Extracting Java archive...`); + const extension = getDownloadArchiveExtension(); + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } + const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); + + const archiveName = fs.readdirSync(extractedJavaPath)[0]; + const archivePath = path.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + + const javaPath = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); + + return {version: javaRelease.version, path: javaPath}; + } + + private parseVersions( + platform: string, + arch: string, + versions: ISapMachineAllVersions + ): ISapMachineVersions[] { + const eligibleVersions: ISapMachineVersions[] = []; + + for (const [, majorVersionMap] of Object.entries(versions)) { + for (const [, jdkVersionMap] of Object.entries(majorVersionMap.updates)) { + for (const [buildVersion, buildVersionMap] of Object.entries( + jdkVersionMap + )) { + let buildVersionWithoutPrefix = buildVersion.replace( + 'sapmachine-', + '' + ); + if (!buildVersionWithoutPrefix.includes('.')) { + // replace major version with major.minor.patch and keep the remaining build identifier after the + as is with regex + buildVersionWithoutPrefix = buildVersionWithoutPrefix.replace( + /(\d+)(\+.*)?/, + '$1.0.0$2' + ); + } + // replace + with . to convert to semver format if we have more than 3 version digits + if (buildVersionWithoutPrefix.split('.').length > 3) { + buildVersionWithoutPrefix = buildVersionWithoutPrefix.replace( + '+', + '.' + ); + } + buildVersionWithoutPrefix = convertVersionToSemver( + buildVersionWithoutPrefix + ); + + // ignore invalid version + if (!semver.valid(buildVersionWithoutPrefix)) { + core.debug(`Invalid version: ${buildVersionWithoutPrefix}`); + continue; + } + + // skip earlyAccessVersions if stable version requested + if (this.stable && buildVersionMap.ea === 'true') { + continue; + } + + for (const [edition, editionAssets] of Object.entries( + buildVersionMap.assets + )) { + if (this.packageType !== edition) { + continue; + } + for (const [archAndPlatForm, archAssets] of Object.entries( + editionAssets + )) { + let expectedArchAndPlatform = `${platform}-${arch}`; + if (platform === 'linux-musl') { + expectedArchAndPlatform = `linux-${arch}-musl`; + } + if (archAndPlatForm !== expectedArchAndPlatform) { + continue; + } + for (const [contentType, contentTypeAssets] of Object.entries( + archAssets + )) { + // skip if not tar.gz and zip files + if (contentType !== 'tar.gz' && contentType !== 'zip') { + continue; + } + eligibleVersions.push({ + os: platform, + architecture: arch, + version: buildVersionWithoutPrefix, + checksum: contentTypeAssets.checksum, + downloadLink: contentTypeAssets.url, + packageType: edition + }); + } + } + } + } + } + } + + const sortedVersions = this.sortParsedVersions(eligibleVersions); + + return sortedVersions; + } + + // Sorts versions in descending order as by default data in JSON isn't sorted + private sortParsedVersions( + eligibleVersions: ISapMachineVersions[] + ): ISapMachineVersions[] { + const sortedVersions = eligibleVersions.sort((versionObj1, versionObj2) => { + const version1 = versionObj1.version; + const version2 = versionObj2.version; + return semver.compareBuild(version1, version2); + }); + return sortedVersions.reverse(); + } + + private getPlatformOption(): string { + switch (process.platform) { + case 'win32': + return 'windows'; + case 'darwin': + return 'macos'; + case 'linux': + // figure out if alpine/musl + if (fs.existsSync('/etc/alpine-release')) { + return 'linux-musl'; + } + return 'linux'; + default: + return process.platform; + } + } + + private async fetchReleasesFromUrl( + url: string, + headers: OutgoingHttpHeaders = {} + ): Promise { + try { + core.debug( + `Trying to fetch available SapMachine versions info from the primary url: ${url}` + ); + const releases = ( + await this.http.getJson(url, headers) + ).result; + return releases; + } catch (err) { + core.debug( + `Fetching SapMachine versions info from the link: ${url} ended up with the error: ${ + (err as Error).message + }` + ); + return null; + } + } +} diff --git a/src/distributions/sapmachine/models.ts b/src/distributions/sapmachine/models.ts new file mode 100644 index 000000000..8acb3621d --- /dev/null +++ b/src/distributions/sapmachine/models.ts @@ -0,0 +1,33 @@ +export interface ISapMachineAllVersions { + [major: string]: { + lts: string; + updates: { + [full_version: string]: { + [sapmachineBuild: string]: { + release_url: string; + ea: string; + assets: { + [packageType: string]: { + [arch: string]: { + [content_type: string]: { + name: string; + checksum: string; + url: string; + }; + }; + }; + }; + }; + }; + }; + }; +} + +export interface ISapMachineVersions { + os: string; + architecture: string; + version: string; + checksum: string; + downloadLink: string; + packageType: string; +} diff --git a/src/distributions/semeru/installer.ts b/src/distributions/semeru/installer.ts index c40752611..e66708ecb 100644 --- a/src/distributions/semeru/installer.ts +++ b/src/distributions/semeru/installer.ts @@ -8,7 +8,8 @@ import semver from 'semver'; import { extractJdkFile, getDownloadArchiveExtension, - isVersionSatisfies + isVersionSatisfies, + renameWinArchive } from '../../util'; import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; @@ -33,11 +34,15 @@ export class SemeruDistribution extends JavaBase { protected async findPackageForDownload( version: string ): Promise { - if (!supportedArchitectures.includes(this.architecture)) { + const arch = this.distributionArchitecture(); + + if (!supportedArchitectures.includes(arch)) { throw new Error( `Unsupported architecture for IBM Semeru: ${ this.architecture - }, the following are supported: ${supportedArchitectures.join(', ')}` + } for your current OS version, the following are supported: ${supportedArchitectures.join( + ', ' + )}` ); } @@ -81,7 +86,7 @@ export class SemeruDistribution extends JavaBase { ? `\nAvailable versions: ${availableOptions}` : ''; throw new Error( - `Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}` + `Could not find satisfied version for SemVer version '${version}' for your current OS version for ${this.architecture} architecture ${availableOptionsMessage}` ); } @@ -94,11 +99,13 @@ export class SemeruDistribution extends JavaBase { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); - const javaArchivePath = await tc.downloadTool(javaRelease.url); + let javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); const extension = getDownloadArchiveExtension(); - + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } const extractedJavaPath: string = await extractJdkFile( javaArchivePath, extension @@ -124,7 +131,7 @@ export class SemeruDistribution extends JavaBase { public async getAvailableVersions(): Promise { const platform = this.getPlatformOption(); - const arch = this.architecture; + const arch = this.distributionArchitecture(); const imageType = this.packageType; const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions const releaseType = this.stable ? 'ga' : 'ea'; diff --git a/src/distributions/temurin/installer.ts b/src/distributions/temurin/installer.ts index 4a1989bca..1a69652ae 100644 --- a/src/distributions/temurin/installer.ts +++ b/src/distributions/temurin/installer.ts @@ -15,7 +15,8 @@ import { import { extractJdkFile, getDownloadArchiveExtension, - isVersionSatisfies + isVersionSatisfies, + renameWinArchive } from '../../util'; export enum TemurinImplementation { @@ -76,11 +77,13 @@ export class TemurinDistribution extends JavaBase { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); - const javaArchivePath = await tc.downloadTool(javaRelease.url); + let javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); const extension = getDownloadArchiveExtension(); - + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); + } const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; diff --git a/src/distributions/zulu/installer.ts b/src/distributions/zulu/installer.ts index e406c6b6d..124789b8b 100644 --- a/src/distributions/zulu/installer.ts +++ b/src/distributions/zulu/installer.ts @@ -11,7 +11,8 @@ import { extractJdkFile, getDownloadArchiveExtension, convertVersionToSemver, - isVersionSatisfies + isVersionSatisfies, + renameWinArchive } from '../../util'; import { JavaDownloadRelease, @@ -80,13 +81,8 @@ export class ZuluDistribution extends JavaBase { core.info(`Extracting Java archive...`); const extension = getDownloadArchiveExtension(); - if ( - process.platform === 'win32' && - (this.architecture === 'arm64' || this.architecture === 'aarch64') - ) { - const javaArchivePathRenamed = `${javaArchivePath}.zip`; - await fs.renameSync(javaArchivePath, javaArchivePathRenamed); - javaArchivePath = javaArchivePathRenamed; + if (process.platform === 'win32') { + javaArchivePath = renameWinArchive(javaArchivePath); } const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); diff --git a/src/toolchains.ts b/src/toolchains.ts index cbb667eb7..77cae83f7 100644 --- a/src/toolchains.ts +++ b/src/toolchains.ts @@ -59,9 +59,8 @@ export async function createToolchainsSettings({ // when an alternate m2 location is specified use only that location (no .m2 directory) // otherwise use the home/.m2/ path await io.mkdirP(settingsDirectory); - const originalToolchains = await readExistingToolchainsFile( - settingsDirectory - ); + const originalToolchains = + await readExistingToolchainsFile(settingsDirectory); const updatedToolchains = generateToolchainDefinition( originalToolchains, jdkInfo.version, diff --git a/src/util.ts b/src/util.ts index 034fc83d4..0325f7f42 100644 --- a/src/util.ts +++ b/src/util.ts @@ -92,7 +92,13 @@ export function isGhes(): boolean { const ghUrl = new URL( process.env['GITHUB_SERVER_URL'] || 'https://github.com' ); - return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'; + + const hostname = ghUrl.hostname.trimEnd().toUpperCase(); + const isGitHubHost = hostname === 'GITHUB.COM'; + const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM'); + const isLocalHost = hostname.endsWith('.LOCALHOST'); + + return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; } export function isCacheFeatureAvailable(): boolean { @@ -127,21 +133,25 @@ export function getVersionFromFileContent( const versionFileName = getFileName(versionFile); if (versionFileName == '.tool-versions') { javaVersionRegExp = - /^(java\s+)(?:\S*-)?v?(?(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m; + /^java\s+(?:\S*-)?(?\d+(?:\.\d+)*([+_.-](?:openj9[-._]?\d[\w.-]*|java\d+|jre[-_\w]*|OpenJDK\d+[\w_.-]*|[a-z0-9]+))*)/im; + } else if (versionFileName == '.sdkmanrc') { + javaVersionRegExp = /^java\s*=\s*(?[^-]+)/m; } else { javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; } - const fileContent = content.match(javaVersionRegExp)?.groups?.version + const capturedVersion = content.match(javaVersionRegExp)?.groups?.version ? (content.match(javaVersionRegExp)?.groups?.version as string) : ''; - if (!fileContent) { + + core.debug( + `Parsed version '${capturedVersion}' from file '${versionFileName}'` + ); + if (!capturedVersion) { return null; } - core.debug(`Version from file '${fileContent}'`); - - const tentativeVersion = avoidOldNotation(fileContent); + const tentativeVersion = avoidOldNotation(capturedVersion); const rawVersion = tentativeVersion.split('-')[0]; let version = semver.validRange(rawVersion) @@ -178,8 +188,8 @@ export function convertVersionToSemver(version: number[] | string) { } export function getGitHubHttpHeaders(): OutgoingHttpHeaders { - const token = core.getInput('token'); - const auth = !token ? undefined : `token ${token}`; + const resolvedToken = core.getInput('token') || process.env.GITHUB_TOKEN; + const auth = !resolvedToken ? undefined : `token ${resolvedToken}`; const headers: OutgoingHttpHeaders = { accept: 'application/vnd.github.VERSION.raw' @@ -190,3 +200,14 @@ export function getGitHubHttpHeaders(): OutgoingHttpHeaders { } return headers; } + +// Rename archive to add extension because after downloading +// archive does not contain extension type and it leads to some issues +// on Windows runners without PowerShell Core. +// +// For default PowerShell Windows it should contain extension type to unpack it. +export function renameWinArchive(javaArchivePath: string): string { + const javaArchivePathRenamed = `${javaArchivePath}.zip`; + fs.renameSync(javaArchivePath, javaArchivePathRenamed); + return javaArchivePathRenamed; +}